]> git.saurik.com Git - wxWidgets.git/blob - wxPython/src/gtk/_core.py
reSWIGtged
[wxWidgets.git] / wxPython / src / gtk / _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 WINDOW_STYLE_MASK = _core_.WINDOW_STYLE_MASK
106 ALWAYS_SHOW_SB = _core_.ALWAYS_SHOW_SB
107 RETAINED = _core_.RETAINED
108 BACKINGSTORE = _core_.BACKINGSTORE
109 COLOURED = _core_.COLOURED
110 FIXED_LENGTH = _core_.FIXED_LENGTH
111 LB_NEEDED_SB = _core_.LB_NEEDED_SB
112 LB_ALWAYS_SB = _core_.LB_ALWAYS_SB
113 LB_SORT = _core_.LB_SORT
114 LB_SINGLE = _core_.LB_SINGLE
115 LB_MULTIPLE = _core_.LB_MULTIPLE
116 LB_EXTENDED = _core_.LB_EXTENDED
117 LB_OWNERDRAW = _core_.LB_OWNERDRAW
118 LB_HSCROLL = _core_.LB_HSCROLL
119 PROCESS_ENTER = _core_.PROCESS_ENTER
120 PASSWORD = _core_.PASSWORD
121 CB_SIMPLE = _core_.CB_SIMPLE
122 CB_DROPDOWN = _core_.CB_DROPDOWN
123 CB_SORT = _core_.CB_SORT
124 CB_READONLY = _core_.CB_READONLY
125 RA_HORIZONTAL = _core_.RA_HORIZONTAL
126 RA_VERTICAL = _core_.RA_VERTICAL
127 RA_SPECIFY_ROWS = _core_.RA_SPECIFY_ROWS
128 RA_SPECIFY_COLS = _core_.RA_SPECIFY_COLS
129 RA_USE_CHECKBOX = _core_.RA_USE_CHECKBOX
130 RB_GROUP = _core_.RB_GROUP
131 RB_SINGLE = _core_.RB_SINGLE
132 SB_HORIZONTAL = _core_.SB_HORIZONTAL
133 SB_VERTICAL = _core_.SB_VERTICAL
134 RB_USE_CHECKBOX = _core_.RB_USE_CHECKBOX
135 ST_SIZEGRIP = _core_.ST_SIZEGRIP
136 ST_NO_AUTORESIZE = _core_.ST_NO_AUTORESIZE
137 ST_DOTS_MIDDLE = _core_.ST_DOTS_MIDDLE
138 ST_DOTS_END = _core_.ST_DOTS_END
139 FLOOD_SURFACE = _core_.FLOOD_SURFACE
140 FLOOD_BORDER = _core_.FLOOD_BORDER
141 ODDEVEN_RULE = _core_.ODDEVEN_RULE
142 WINDING_RULE = _core_.WINDING_RULE
143 TOOL_TOP = _core_.TOOL_TOP
144 TOOL_BOTTOM = _core_.TOOL_BOTTOM
145 TOOL_LEFT = _core_.TOOL_LEFT
146 TOOL_RIGHT = _core_.TOOL_RIGHT
147 OK = _core_.OK
148 YES_NO = _core_.YES_NO
149 CANCEL = _core_.CANCEL
150 YES = _core_.YES
151 NO = _core_.NO
152 NO_DEFAULT = _core_.NO_DEFAULT
153 YES_DEFAULT = _core_.YES_DEFAULT
154 ICON_EXCLAMATION = _core_.ICON_EXCLAMATION
155 ICON_HAND = _core_.ICON_HAND
156 ICON_QUESTION = _core_.ICON_QUESTION
157 ICON_INFORMATION = _core_.ICON_INFORMATION
158 ICON_STOP = _core_.ICON_STOP
159 ICON_ASTERISK = _core_.ICON_ASTERISK
160 ICON_MASK = _core_.ICON_MASK
161 ICON_WARNING = _core_.ICON_WARNING
162 ICON_ERROR = _core_.ICON_ERROR
163 FORWARD = _core_.FORWARD
164 BACKWARD = _core_.BACKWARD
165 RESET = _core_.RESET
166 HELP = _core_.HELP
167 MORE = _core_.MORE
168 SETUP = _core_.SETUP
169 SIZE_AUTO_WIDTH = _core_.SIZE_AUTO_WIDTH
170 SIZE_AUTO_HEIGHT = _core_.SIZE_AUTO_HEIGHT
171 SIZE_AUTO = _core_.SIZE_AUTO
172 SIZE_USE_EXISTING = _core_.SIZE_USE_EXISTING
173 SIZE_ALLOW_MINUS_ONE = _core_.SIZE_ALLOW_MINUS_ONE
174 SIZE_FORCE = _core_.SIZE_FORCE
175 PORTRAIT = _core_.PORTRAIT
176 LANDSCAPE = _core_.LANDSCAPE
177 PRINT_QUALITY_HIGH = _core_.PRINT_QUALITY_HIGH
178 PRINT_QUALITY_MEDIUM = _core_.PRINT_QUALITY_MEDIUM
179 PRINT_QUALITY_LOW = _core_.PRINT_QUALITY_LOW
180 PRINT_QUALITY_DRAFT = _core_.PRINT_QUALITY_DRAFT
181 ID_ANY = _core_.ID_ANY
182 ID_SEPARATOR = _core_.ID_SEPARATOR
183 ID_NONE = _core_.ID_NONE
184 ID_LOWEST = _core_.ID_LOWEST
185 ID_OPEN = _core_.ID_OPEN
186 ID_CLOSE = _core_.ID_CLOSE
187 ID_NEW = _core_.ID_NEW
188 ID_SAVE = _core_.ID_SAVE
189 ID_SAVEAS = _core_.ID_SAVEAS
190 ID_REVERT = _core_.ID_REVERT
191 ID_EXIT = _core_.ID_EXIT
192 ID_UNDO = _core_.ID_UNDO
193 ID_REDO = _core_.ID_REDO
194 ID_HELP = _core_.ID_HELP
195 ID_PRINT = _core_.ID_PRINT
196 ID_PRINT_SETUP = _core_.ID_PRINT_SETUP
197 ID_PAGE_SETUP = _core_.ID_PAGE_SETUP
198 ID_PREVIEW = _core_.ID_PREVIEW
199 ID_ABOUT = _core_.ID_ABOUT
200 ID_HELP_CONTENTS = _core_.ID_HELP_CONTENTS
201 ID_HELP_COMMANDS = _core_.ID_HELP_COMMANDS
202 ID_HELP_PROCEDURES = _core_.ID_HELP_PROCEDURES
203 ID_HELP_CONTEXT = _core_.ID_HELP_CONTEXT
204 ID_HELP_INDEX = _core_.ID_HELP_INDEX
205 ID_HELP_SEARCH = _core_.ID_HELP_SEARCH
206 ID_CLOSE_ALL = _core_.ID_CLOSE_ALL
207 ID_PREFERENCES = _core_.ID_PREFERENCES
208 ID_EDIT = _core_.ID_EDIT
209 ID_CUT = _core_.ID_CUT
210 ID_COPY = _core_.ID_COPY
211 ID_PASTE = _core_.ID_PASTE
212 ID_CLEAR = _core_.ID_CLEAR
213 ID_FIND = _core_.ID_FIND
214 ID_DUPLICATE = _core_.ID_DUPLICATE
215 ID_SELECTALL = _core_.ID_SELECTALL
216 ID_DELETE = _core_.ID_DELETE
217 ID_REPLACE = _core_.ID_REPLACE
218 ID_REPLACE_ALL = _core_.ID_REPLACE_ALL
219 ID_PROPERTIES = _core_.ID_PROPERTIES
220 ID_VIEW_DETAILS = _core_.ID_VIEW_DETAILS
221 ID_VIEW_LARGEICONS = _core_.ID_VIEW_LARGEICONS
222 ID_VIEW_SMALLICONS = _core_.ID_VIEW_SMALLICONS
223 ID_VIEW_LIST = _core_.ID_VIEW_LIST
224 ID_VIEW_SORTDATE = _core_.ID_VIEW_SORTDATE
225 ID_VIEW_SORTNAME = _core_.ID_VIEW_SORTNAME
226 ID_VIEW_SORTSIZE = _core_.ID_VIEW_SORTSIZE
227 ID_VIEW_SORTTYPE = _core_.ID_VIEW_SORTTYPE
228 ID_FILE = _core_.ID_FILE
229 ID_FILE1 = _core_.ID_FILE1
230 ID_FILE2 = _core_.ID_FILE2
231 ID_FILE3 = _core_.ID_FILE3
232 ID_FILE4 = _core_.ID_FILE4
233 ID_FILE5 = _core_.ID_FILE5
234 ID_FILE6 = _core_.ID_FILE6
235 ID_FILE7 = _core_.ID_FILE7
236 ID_FILE8 = _core_.ID_FILE8
237 ID_FILE9 = _core_.ID_FILE9
238 ID_OK = _core_.ID_OK
239 ID_CANCEL = _core_.ID_CANCEL
240 ID_APPLY = _core_.ID_APPLY
241 ID_YES = _core_.ID_YES
242 ID_NO = _core_.ID_NO
243 ID_STATIC = _core_.ID_STATIC
244 ID_FORWARD = _core_.ID_FORWARD
245 ID_BACKWARD = _core_.ID_BACKWARD
246 ID_DEFAULT = _core_.ID_DEFAULT
247 ID_MORE = _core_.ID_MORE
248 ID_SETUP = _core_.ID_SETUP
249 ID_RESET = _core_.ID_RESET
250 ID_CONTEXT_HELP = _core_.ID_CONTEXT_HELP
251 ID_YESTOALL = _core_.ID_YESTOALL
252 ID_NOTOALL = _core_.ID_NOTOALL
253 ID_ABORT = _core_.ID_ABORT
254 ID_RETRY = _core_.ID_RETRY
255 ID_IGNORE = _core_.ID_IGNORE
256 ID_ADD = _core_.ID_ADD
257 ID_REMOVE = _core_.ID_REMOVE
258 ID_UP = _core_.ID_UP
259 ID_DOWN = _core_.ID_DOWN
260 ID_HOME = _core_.ID_HOME
261 ID_REFRESH = _core_.ID_REFRESH
262 ID_STOP = _core_.ID_STOP
263 ID_INDEX = _core_.ID_INDEX
264 ID_BOLD = _core_.ID_BOLD
265 ID_ITALIC = _core_.ID_ITALIC
266 ID_JUSTIFY_CENTER = _core_.ID_JUSTIFY_CENTER
267 ID_JUSTIFY_FILL = _core_.ID_JUSTIFY_FILL
268 ID_JUSTIFY_RIGHT = _core_.ID_JUSTIFY_RIGHT
269 ID_JUSTIFY_LEFT = _core_.ID_JUSTIFY_LEFT
270 ID_UNDERLINE = _core_.ID_UNDERLINE
271 ID_INDENT = _core_.ID_INDENT
272 ID_UNINDENT = _core_.ID_UNINDENT
273 ID_ZOOM_100 = _core_.ID_ZOOM_100
274 ID_ZOOM_FIT = _core_.ID_ZOOM_FIT
275 ID_ZOOM_IN = _core_.ID_ZOOM_IN
276 ID_ZOOM_OUT = _core_.ID_ZOOM_OUT
277 ID_UNDELETE = _core_.ID_UNDELETE
278 ID_REVERT_TO_SAVED = _core_.ID_REVERT_TO_SAVED
279 ID_HIGHEST = _core_.ID_HIGHEST
280 MENU_TEAROFF = _core_.MENU_TEAROFF
281 MB_DOCKABLE = _core_.MB_DOCKABLE
282 NO_FULL_REPAINT_ON_RESIZE = _core_.NO_FULL_REPAINT_ON_RESIZE
283 FULL_REPAINT_ON_RESIZE = _core_.FULL_REPAINT_ON_RESIZE
284 LI_HORIZONTAL = _core_.LI_HORIZONTAL
285 LI_VERTICAL = _core_.LI_VERTICAL
286 WS_EX_VALIDATE_RECURSIVELY = _core_.WS_EX_VALIDATE_RECURSIVELY
287 WS_EX_BLOCK_EVENTS = _core_.WS_EX_BLOCK_EVENTS
288 WS_EX_TRANSIENT = _core_.WS_EX_TRANSIENT
289 WS_EX_THEMED_BACKGROUND = _core_.WS_EX_THEMED_BACKGROUND
290 WS_EX_PROCESS_IDLE = _core_.WS_EX_PROCESS_IDLE
291 WS_EX_PROCESS_UI_UPDATES = _core_.WS_EX_PROCESS_UI_UPDATES
292 MM_TEXT = _core_.MM_TEXT
293 MM_LOMETRIC = _core_.MM_LOMETRIC
294 MM_HIMETRIC = _core_.MM_HIMETRIC
295 MM_LOENGLISH = _core_.MM_LOENGLISH
296 MM_HIENGLISH = _core_.MM_HIENGLISH
297 MM_TWIPS = _core_.MM_TWIPS
298 MM_ISOTROPIC = _core_.MM_ISOTROPIC
299 MM_ANISOTROPIC = _core_.MM_ANISOTROPIC
300 MM_POINTS = _core_.MM_POINTS
301 MM_METRIC = _core_.MM_METRIC
302 CENTRE = _core_.CENTRE
303 CENTER = _core_.CENTER
304 HORIZONTAL = _core_.HORIZONTAL
305 VERTICAL = _core_.VERTICAL
306 BOTH = _core_.BOTH
307 LEFT = _core_.LEFT
308 RIGHT = _core_.RIGHT
309 UP = _core_.UP
310 DOWN = _core_.DOWN
311 TOP = _core_.TOP
312 BOTTOM = _core_.BOTTOM
313 NORTH = _core_.NORTH
314 SOUTH = _core_.SOUTH
315 WEST = _core_.WEST
316 EAST = _core_.EAST
317 ALL = _core_.ALL
318 ALIGN_NOT = _core_.ALIGN_NOT
319 ALIGN_CENTER_HORIZONTAL = _core_.ALIGN_CENTER_HORIZONTAL
320 ALIGN_CENTRE_HORIZONTAL = _core_.ALIGN_CENTRE_HORIZONTAL
321 ALIGN_LEFT = _core_.ALIGN_LEFT
322 ALIGN_TOP = _core_.ALIGN_TOP
323 ALIGN_RIGHT = _core_.ALIGN_RIGHT
324 ALIGN_BOTTOM = _core_.ALIGN_BOTTOM
325 ALIGN_CENTER_VERTICAL = _core_.ALIGN_CENTER_VERTICAL
326 ALIGN_CENTRE_VERTICAL = _core_.ALIGN_CENTRE_VERTICAL
327 ALIGN_CENTER = _core_.ALIGN_CENTER
328 ALIGN_CENTRE = _core_.ALIGN_CENTRE
329 ALIGN_MASK = _core_.ALIGN_MASK
330 STRETCH_NOT = _core_.STRETCH_NOT
331 SHRINK = _core_.SHRINK
332 GROW = _core_.GROW
333 EXPAND = _core_.EXPAND
334 SHAPED = _core_.SHAPED
335 FIXED_MINSIZE = _core_.FIXED_MINSIZE
336 TILE = _core_.TILE
337 ADJUST_MINSIZE = _core_.ADJUST_MINSIZE
338 BORDER_DEFAULT = _core_.BORDER_DEFAULT
339 BORDER_NONE = _core_.BORDER_NONE
340 BORDER_STATIC = _core_.BORDER_STATIC
341 BORDER_SIMPLE = _core_.BORDER_SIMPLE
342 BORDER_RAISED = _core_.BORDER_RAISED
343 BORDER_SUNKEN = _core_.BORDER_SUNKEN
344 BORDER_DOUBLE = _core_.BORDER_DOUBLE
345 BORDER_MASK = _core_.BORDER_MASK
346 BG_STYLE_SYSTEM = _core_.BG_STYLE_SYSTEM
347 BG_STYLE_COLOUR = _core_.BG_STYLE_COLOUR
348 BG_STYLE_CUSTOM = _core_.BG_STYLE_CUSTOM
349 DEFAULT = _core_.DEFAULT
350 DECORATIVE = _core_.DECORATIVE
351 ROMAN = _core_.ROMAN
352 SCRIPT = _core_.SCRIPT
353 SWISS = _core_.SWISS
354 MODERN = _core_.MODERN
355 TELETYPE = _core_.TELETYPE
356 VARIABLE = _core_.VARIABLE
357 FIXED = _core_.FIXED
358 NORMAL = _core_.NORMAL
359 LIGHT = _core_.LIGHT
360 BOLD = _core_.BOLD
361 ITALIC = _core_.ITALIC
362 SLANT = _core_.SLANT
363 SOLID = _core_.SOLID
364 DOT = _core_.DOT
365 LONG_DASH = _core_.LONG_DASH
366 SHORT_DASH = _core_.SHORT_DASH
367 DOT_DASH = _core_.DOT_DASH
368 USER_DASH = _core_.USER_DASH
369 TRANSPARENT = _core_.TRANSPARENT
370 STIPPLE = _core_.STIPPLE
371 STIPPLE_MASK = _core_.STIPPLE_MASK
372 STIPPLE_MASK_OPAQUE = _core_.STIPPLE_MASK_OPAQUE
373 BDIAGONAL_HATCH = _core_.BDIAGONAL_HATCH
374 CROSSDIAG_HATCH = _core_.CROSSDIAG_HATCH
375 FDIAGONAL_HATCH = _core_.FDIAGONAL_HATCH
376 CROSS_HATCH = _core_.CROSS_HATCH
377 HORIZONTAL_HATCH = _core_.HORIZONTAL_HATCH
378 VERTICAL_HATCH = _core_.VERTICAL_HATCH
379 JOIN_BEVEL = _core_.JOIN_BEVEL
380 JOIN_MITER = _core_.JOIN_MITER
381 JOIN_ROUND = _core_.JOIN_ROUND
382 CAP_ROUND = _core_.CAP_ROUND
383 CAP_PROJECTING = _core_.CAP_PROJECTING
384 CAP_BUTT = _core_.CAP_BUTT
385 CLEAR = _core_.CLEAR
386 XOR = _core_.XOR
387 INVERT = _core_.INVERT
388 OR_REVERSE = _core_.OR_REVERSE
389 AND_REVERSE = _core_.AND_REVERSE
390 COPY = _core_.COPY
391 AND = _core_.AND
392 AND_INVERT = _core_.AND_INVERT
393 NO_OP = _core_.NO_OP
394 NOR = _core_.NOR
395 EQUIV = _core_.EQUIV
396 SRC_INVERT = _core_.SRC_INVERT
397 OR_INVERT = _core_.OR_INVERT
398 NAND = _core_.NAND
399 OR = _core_.OR
400 SET = _core_.SET
401 WXK_BACK = _core_.WXK_BACK
402 WXK_TAB = _core_.WXK_TAB
403 WXK_RETURN = _core_.WXK_RETURN
404 WXK_ESCAPE = _core_.WXK_ESCAPE
405 WXK_SPACE = _core_.WXK_SPACE
406 WXK_DELETE = _core_.WXK_DELETE
407 WXK_START = _core_.WXK_START
408 WXK_LBUTTON = _core_.WXK_LBUTTON
409 WXK_RBUTTON = _core_.WXK_RBUTTON
410 WXK_CANCEL = _core_.WXK_CANCEL
411 WXK_MBUTTON = _core_.WXK_MBUTTON
412 WXK_CLEAR = _core_.WXK_CLEAR
413 WXK_SHIFT = _core_.WXK_SHIFT
414 WXK_ALT = _core_.WXK_ALT
415 WXK_CONTROL = _core_.WXK_CONTROL
416 WXK_MENU = _core_.WXK_MENU
417 WXK_PAUSE = _core_.WXK_PAUSE
418 WXK_CAPITAL = _core_.WXK_CAPITAL
419 WXK_PRIOR = _core_.WXK_PRIOR
420 WXK_NEXT = _core_.WXK_NEXT
421 WXK_END = _core_.WXK_END
422 WXK_HOME = _core_.WXK_HOME
423 WXK_LEFT = _core_.WXK_LEFT
424 WXK_UP = _core_.WXK_UP
425 WXK_RIGHT = _core_.WXK_RIGHT
426 WXK_DOWN = _core_.WXK_DOWN
427 WXK_SELECT = _core_.WXK_SELECT
428 WXK_PRINT = _core_.WXK_PRINT
429 WXK_EXECUTE = _core_.WXK_EXECUTE
430 WXK_SNAPSHOT = _core_.WXK_SNAPSHOT
431 WXK_INSERT = _core_.WXK_INSERT
432 WXK_HELP = _core_.WXK_HELP
433 WXK_NUMPAD0 = _core_.WXK_NUMPAD0
434 WXK_NUMPAD1 = _core_.WXK_NUMPAD1
435 WXK_NUMPAD2 = _core_.WXK_NUMPAD2
436 WXK_NUMPAD3 = _core_.WXK_NUMPAD3
437 WXK_NUMPAD4 = _core_.WXK_NUMPAD4
438 WXK_NUMPAD5 = _core_.WXK_NUMPAD5
439 WXK_NUMPAD6 = _core_.WXK_NUMPAD6
440 WXK_NUMPAD7 = _core_.WXK_NUMPAD7
441 WXK_NUMPAD8 = _core_.WXK_NUMPAD8
442 WXK_NUMPAD9 = _core_.WXK_NUMPAD9
443 WXK_MULTIPLY = _core_.WXK_MULTIPLY
444 WXK_ADD = _core_.WXK_ADD
445 WXK_SEPARATOR = _core_.WXK_SEPARATOR
446 WXK_SUBTRACT = _core_.WXK_SUBTRACT
447 WXK_DECIMAL = _core_.WXK_DECIMAL
448 WXK_DIVIDE = _core_.WXK_DIVIDE
449 WXK_F1 = _core_.WXK_F1
450 WXK_F2 = _core_.WXK_F2
451 WXK_F3 = _core_.WXK_F3
452 WXK_F4 = _core_.WXK_F4
453 WXK_F5 = _core_.WXK_F5
454 WXK_F6 = _core_.WXK_F6
455 WXK_F7 = _core_.WXK_F7
456 WXK_F8 = _core_.WXK_F8
457 WXK_F9 = _core_.WXK_F9
458 WXK_F10 = _core_.WXK_F10
459 WXK_F11 = _core_.WXK_F11
460 WXK_F12 = _core_.WXK_F12
461 WXK_F13 = _core_.WXK_F13
462 WXK_F14 = _core_.WXK_F14
463 WXK_F15 = _core_.WXK_F15
464 WXK_F16 = _core_.WXK_F16
465 WXK_F17 = _core_.WXK_F17
466 WXK_F18 = _core_.WXK_F18
467 WXK_F19 = _core_.WXK_F19
468 WXK_F20 = _core_.WXK_F20
469 WXK_F21 = _core_.WXK_F21
470 WXK_F22 = _core_.WXK_F22
471 WXK_F23 = _core_.WXK_F23
472 WXK_F24 = _core_.WXK_F24
473 WXK_NUMLOCK = _core_.WXK_NUMLOCK
474 WXK_SCROLL = _core_.WXK_SCROLL
475 WXK_PAGEUP = _core_.WXK_PAGEUP
476 WXK_PAGEDOWN = _core_.WXK_PAGEDOWN
477 WXK_NUMPAD_SPACE = _core_.WXK_NUMPAD_SPACE
478 WXK_NUMPAD_TAB = _core_.WXK_NUMPAD_TAB
479 WXK_NUMPAD_ENTER = _core_.WXK_NUMPAD_ENTER
480 WXK_NUMPAD_F1 = _core_.WXK_NUMPAD_F1
481 WXK_NUMPAD_F2 = _core_.WXK_NUMPAD_F2
482 WXK_NUMPAD_F3 = _core_.WXK_NUMPAD_F3
483 WXK_NUMPAD_F4 = _core_.WXK_NUMPAD_F4
484 WXK_NUMPAD_HOME = _core_.WXK_NUMPAD_HOME
485 WXK_NUMPAD_LEFT = _core_.WXK_NUMPAD_LEFT
486 WXK_NUMPAD_UP = _core_.WXK_NUMPAD_UP
487 WXK_NUMPAD_RIGHT = _core_.WXK_NUMPAD_RIGHT
488 WXK_NUMPAD_DOWN = _core_.WXK_NUMPAD_DOWN
489 WXK_NUMPAD_PRIOR = _core_.WXK_NUMPAD_PRIOR
490 WXK_NUMPAD_PAGEUP = _core_.WXK_NUMPAD_PAGEUP
491 WXK_NUMPAD_NEXT = _core_.WXK_NUMPAD_NEXT
492 WXK_NUMPAD_PAGEDOWN = _core_.WXK_NUMPAD_PAGEDOWN
493 WXK_NUMPAD_END = _core_.WXK_NUMPAD_END
494 WXK_NUMPAD_BEGIN = _core_.WXK_NUMPAD_BEGIN
495 WXK_NUMPAD_INSERT = _core_.WXK_NUMPAD_INSERT
496 WXK_NUMPAD_DELETE = _core_.WXK_NUMPAD_DELETE
497 WXK_NUMPAD_EQUAL = _core_.WXK_NUMPAD_EQUAL
498 WXK_NUMPAD_MULTIPLY = _core_.WXK_NUMPAD_MULTIPLY
499 WXK_NUMPAD_ADD = _core_.WXK_NUMPAD_ADD
500 WXK_NUMPAD_SEPARATOR = _core_.WXK_NUMPAD_SEPARATOR
501 WXK_NUMPAD_SUBTRACT = _core_.WXK_NUMPAD_SUBTRACT
502 WXK_NUMPAD_DECIMAL = _core_.WXK_NUMPAD_DECIMAL
503 WXK_NUMPAD_DIVIDE = _core_.WXK_NUMPAD_DIVIDE
504 WXK_WINDOWS_LEFT = _core_.WXK_WINDOWS_LEFT
505 WXK_WINDOWS_RIGHT = _core_.WXK_WINDOWS_RIGHT
506 WXK_WINDOWS_MENU = _core_.WXK_WINDOWS_MENU
507 WXK_COMMAND = _core_.WXK_COMMAND
508 WXK_SPECIAL1 = _core_.WXK_SPECIAL1
509 WXK_SPECIAL2 = _core_.WXK_SPECIAL2
510 WXK_SPECIAL3 = _core_.WXK_SPECIAL3
511 WXK_SPECIAL4 = _core_.WXK_SPECIAL4
512 WXK_SPECIAL5 = _core_.WXK_SPECIAL5
513 WXK_SPECIAL6 = _core_.WXK_SPECIAL6
514 WXK_SPECIAL7 = _core_.WXK_SPECIAL7
515 WXK_SPECIAL8 = _core_.WXK_SPECIAL8
516 WXK_SPECIAL9 = _core_.WXK_SPECIAL9
517 WXK_SPECIAL10 = _core_.WXK_SPECIAL10
518 WXK_SPECIAL11 = _core_.WXK_SPECIAL11
519 WXK_SPECIAL12 = _core_.WXK_SPECIAL12
520 WXK_SPECIAL13 = _core_.WXK_SPECIAL13
521 WXK_SPECIAL14 = _core_.WXK_SPECIAL14
522 WXK_SPECIAL15 = _core_.WXK_SPECIAL15
523 WXK_SPECIAL16 = _core_.WXK_SPECIAL16
524 WXK_SPECIAL17 = _core_.WXK_SPECIAL17
525 WXK_SPECIAL18 = _core_.WXK_SPECIAL18
526 WXK_SPECIAL19 = _core_.WXK_SPECIAL19
527 WXK_SPECIAL20 = _core_.WXK_SPECIAL20
528 PAPER_NONE = _core_.PAPER_NONE
529 PAPER_LETTER = _core_.PAPER_LETTER
530 PAPER_LEGAL = _core_.PAPER_LEGAL
531 PAPER_A4 = _core_.PAPER_A4
532 PAPER_CSHEET = _core_.PAPER_CSHEET
533 PAPER_DSHEET = _core_.PAPER_DSHEET
534 PAPER_ESHEET = _core_.PAPER_ESHEET
535 PAPER_LETTERSMALL = _core_.PAPER_LETTERSMALL
536 PAPER_TABLOID = _core_.PAPER_TABLOID
537 PAPER_LEDGER = _core_.PAPER_LEDGER
538 PAPER_STATEMENT = _core_.PAPER_STATEMENT
539 PAPER_EXECUTIVE = _core_.PAPER_EXECUTIVE
540 PAPER_A3 = _core_.PAPER_A3
541 PAPER_A4SMALL = _core_.PAPER_A4SMALL
542 PAPER_A5 = _core_.PAPER_A5
543 PAPER_B4 = _core_.PAPER_B4
544 PAPER_B5 = _core_.PAPER_B5
545 PAPER_FOLIO = _core_.PAPER_FOLIO
546 PAPER_QUARTO = _core_.PAPER_QUARTO
547 PAPER_10X14 = _core_.PAPER_10X14
548 PAPER_11X17 = _core_.PAPER_11X17
549 PAPER_NOTE = _core_.PAPER_NOTE
550 PAPER_ENV_9 = _core_.PAPER_ENV_9
551 PAPER_ENV_10 = _core_.PAPER_ENV_10
552 PAPER_ENV_11 = _core_.PAPER_ENV_11
553 PAPER_ENV_12 = _core_.PAPER_ENV_12
554 PAPER_ENV_14 = _core_.PAPER_ENV_14
555 PAPER_ENV_DL = _core_.PAPER_ENV_DL
556 PAPER_ENV_C5 = _core_.PAPER_ENV_C5
557 PAPER_ENV_C3 = _core_.PAPER_ENV_C3
558 PAPER_ENV_C4 = _core_.PAPER_ENV_C4
559 PAPER_ENV_C6 = _core_.PAPER_ENV_C6
560 PAPER_ENV_C65 = _core_.PAPER_ENV_C65
561 PAPER_ENV_B4 = _core_.PAPER_ENV_B4
562 PAPER_ENV_B5 = _core_.PAPER_ENV_B5
563 PAPER_ENV_B6 = _core_.PAPER_ENV_B6
564 PAPER_ENV_ITALY = _core_.PAPER_ENV_ITALY
565 PAPER_ENV_MONARCH = _core_.PAPER_ENV_MONARCH
566 PAPER_ENV_PERSONAL = _core_.PAPER_ENV_PERSONAL
567 PAPER_FANFOLD_US = _core_.PAPER_FANFOLD_US
568 PAPER_FANFOLD_STD_GERMAN = _core_.PAPER_FANFOLD_STD_GERMAN
569 PAPER_FANFOLD_LGL_GERMAN = _core_.PAPER_FANFOLD_LGL_GERMAN
570 PAPER_ISO_B4 = _core_.PAPER_ISO_B4
571 PAPER_JAPANESE_POSTCARD = _core_.PAPER_JAPANESE_POSTCARD
572 PAPER_9X11 = _core_.PAPER_9X11
573 PAPER_10X11 = _core_.PAPER_10X11
574 PAPER_15X11 = _core_.PAPER_15X11
575 PAPER_ENV_INVITE = _core_.PAPER_ENV_INVITE
576 PAPER_LETTER_EXTRA = _core_.PAPER_LETTER_EXTRA
577 PAPER_LEGAL_EXTRA = _core_.PAPER_LEGAL_EXTRA
578 PAPER_TABLOID_EXTRA = _core_.PAPER_TABLOID_EXTRA
579 PAPER_A4_EXTRA = _core_.PAPER_A4_EXTRA
580 PAPER_LETTER_TRANSVERSE = _core_.PAPER_LETTER_TRANSVERSE
581 PAPER_A4_TRANSVERSE = _core_.PAPER_A4_TRANSVERSE
582 PAPER_LETTER_EXTRA_TRANSVERSE = _core_.PAPER_LETTER_EXTRA_TRANSVERSE
583 PAPER_A_PLUS = _core_.PAPER_A_PLUS
584 PAPER_B_PLUS = _core_.PAPER_B_PLUS
585 PAPER_LETTER_PLUS = _core_.PAPER_LETTER_PLUS
586 PAPER_A4_PLUS = _core_.PAPER_A4_PLUS
587 PAPER_A5_TRANSVERSE = _core_.PAPER_A5_TRANSVERSE
588 PAPER_B5_TRANSVERSE = _core_.PAPER_B5_TRANSVERSE
589 PAPER_A3_EXTRA = _core_.PAPER_A3_EXTRA
590 PAPER_A5_EXTRA = _core_.PAPER_A5_EXTRA
591 PAPER_B5_EXTRA = _core_.PAPER_B5_EXTRA
592 PAPER_A2 = _core_.PAPER_A2
593 PAPER_A3_TRANSVERSE = _core_.PAPER_A3_TRANSVERSE
594 PAPER_A3_EXTRA_TRANSVERSE = _core_.PAPER_A3_EXTRA_TRANSVERSE
595 PAPER_DBL_JAPANESE_POSTCARD = _core_.PAPER_DBL_JAPANESE_POSTCARD
596 PAPER_A6 = _core_.PAPER_A6
597 PAPER_JENV_KAKU2 = _core_.PAPER_JENV_KAKU2
598 PAPER_JENV_KAKU3 = _core_.PAPER_JENV_KAKU3
599 PAPER_JENV_CHOU3 = _core_.PAPER_JENV_CHOU3
600 PAPER_JENV_CHOU4 = _core_.PAPER_JENV_CHOU4
601 PAPER_LETTER_ROTATED = _core_.PAPER_LETTER_ROTATED
602 PAPER_A3_ROTATED = _core_.PAPER_A3_ROTATED
603 PAPER_A4_ROTATED = _core_.PAPER_A4_ROTATED
604 PAPER_A5_ROTATED = _core_.PAPER_A5_ROTATED
605 PAPER_B4_JIS_ROTATED = _core_.PAPER_B4_JIS_ROTATED
606 PAPER_B5_JIS_ROTATED = _core_.PAPER_B5_JIS_ROTATED
607 PAPER_JAPANESE_POSTCARD_ROTATED = _core_.PAPER_JAPANESE_POSTCARD_ROTATED
608 PAPER_DBL_JAPANESE_POSTCARD_ROTATED = _core_.PAPER_DBL_JAPANESE_POSTCARD_ROTATED
609 PAPER_A6_ROTATED = _core_.PAPER_A6_ROTATED
610 PAPER_JENV_KAKU2_ROTATED = _core_.PAPER_JENV_KAKU2_ROTATED
611 PAPER_JENV_KAKU3_ROTATED = _core_.PAPER_JENV_KAKU3_ROTATED
612 PAPER_JENV_CHOU3_ROTATED = _core_.PAPER_JENV_CHOU3_ROTATED
613 PAPER_JENV_CHOU4_ROTATED = _core_.PAPER_JENV_CHOU4_ROTATED
614 PAPER_B6_JIS = _core_.PAPER_B6_JIS
615 PAPER_B6_JIS_ROTATED = _core_.PAPER_B6_JIS_ROTATED
616 PAPER_12X11 = _core_.PAPER_12X11
617 PAPER_JENV_YOU4 = _core_.PAPER_JENV_YOU4
618 PAPER_JENV_YOU4_ROTATED = _core_.PAPER_JENV_YOU4_ROTATED
619 PAPER_P16K = _core_.PAPER_P16K
620 PAPER_P32K = _core_.PAPER_P32K
621 PAPER_P32KBIG = _core_.PAPER_P32KBIG
622 PAPER_PENV_1 = _core_.PAPER_PENV_1
623 PAPER_PENV_2 = _core_.PAPER_PENV_2
624 PAPER_PENV_3 = _core_.PAPER_PENV_3
625 PAPER_PENV_4 = _core_.PAPER_PENV_4
626 PAPER_PENV_5 = _core_.PAPER_PENV_5
627 PAPER_PENV_6 = _core_.PAPER_PENV_6
628 PAPER_PENV_7 = _core_.PAPER_PENV_7
629 PAPER_PENV_8 = _core_.PAPER_PENV_8
630 PAPER_PENV_9 = _core_.PAPER_PENV_9
631 PAPER_PENV_10 = _core_.PAPER_PENV_10
632 PAPER_P16K_ROTATED = _core_.PAPER_P16K_ROTATED
633 PAPER_P32K_ROTATED = _core_.PAPER_P32K_ROTATED
634 PAPER_P32KBIG_ROTATED = _core_.PAPER_P32KBIG_ROTATED
635 PAPER_PENV_1_ROTATED = _core_.PAPER_PENV_1_ROTATED
636 PAPER_PENV_2_ROTATED = _core_.PAPER_PENV_2_ROTATED
637 PAPER_PENV_3_ROTATED = _core_.PAPER_PENV_3_ROTATED
638 PAPER_PENV_4_ROTATED = _core_.PAPER_PENV_4_ROTATED
639 PAPER_PENV_5_ROTATED = _core_.PAPER_PENV_5_ROTATED
640 PAPER_PENV_6_ROTATED = _core_.PAPER_PENV_6_ROTATED
641 PAPER_PENV_7_ROTATED = _core_.PAPER_PENV_7_ROTATED
642 PAPER_PENV_8_ROTATED = _core_.PAPER_PENV_8_ROTATED
643 PAPER_PENV_9_ROTATED = _core_.PAPER_PENV_9_ROTATED
644 PAPER_PENV_10_ROTATED = _core_.PAPER_PENV_10_ROTATED
645 DUPLEX_SIMPLEX = _core_.DUPLEX_SIMPLEX
646 DUPLEX_HORIZONTAL = _core_.DUPLEX_HORIZONTAL
647 DUPLEX_VERTICAL = _core_.DUPLEX_VERTICAL
648 ITEM_SEPARATOR = _core_.ITEM_SEPARATOR
649 ITEM_NORMAL = _core_.ITEM_NORMAL
650 ITEM_CHECK = _core_.ITEM_CHECK
651 ITEM_RADIO = _core_.ITEM_RADIO
652 ITEM_MAX = _core_.ITEM_MAX
653 HT_NOWHERE = _core_.HT_NOWHERE
654 HT_SCROLLBAR_FIRST = _core_.HT_SCROLLBAR_FIRST
655 HT_SCROLLBAR_ARROW_LINE_1 = _core_.HT_SCROLLBAR_ARROW_LINE_1
656 HT_SCROLLBAR_ARROW_LINE_2 = _core_.HT_SCROLLBAR_ARROW_LINE_2
657 HT_SCROLLBAR_ARROW_PAGE_1 = _core_.HT_SCROLLBAR_ARROW_PAGE_1
658 HT_SCROLLBAR_ARROW_PAGE_2 = _core_.HT_SCROLLBAR_ARROW_PAGE_2
659 HT_SCROLLBAR_THUMB = _core_.HT_SCROLLBAR_THUMB
660 HT_SCROLLBAR_BAR_1 = _core_.HT_SCROLLBAR_BAR_1
661 HT_SCROLLBAR_BAR_2 = _core_.HT_SCROLLBAR_BAR_2
662 HT_SCROLLBAR_LAST = _core_.HT_SCROLLBAR_LAST
663 HT_WINDOW_OUTSIDE = _core_.HT_WINDOW_OUTSIDE
664 HT_WINDOW_INSIDE = _core_.HT_WINDOW_INSIDE
665 HT_WINDOW_VERT_SCROLLBAR = _core_.HT_WINDOW_VERT_SCROLLBAR
666 HT_WINDOW_HORZ_SCROLLBAR = _core_.HT_WINDOW_HORZ_SCROLLBAR
667 HT_WINDOW_CORNER = _core_.HT_WINDOW_CORNER
668 HT_MAX = _core_.HT_MAX
669 MOD_NONE = _core_.MOD_NONE
670 MOD_ALT = _core_.MOD_ALT
671 MOD_CONTROL = _core_.MOD_CONTROL
672 MOD_ALTGR = _core_.MOD_ALTGR
673 MOD_SHIFT = _core_.MOD_SHIFT
674 MOD_META = _core_.MOD_META
675 MOD_WIN = _core_.MOD_WIN
676 MOD_CMD = _core_.MOD_CMD
677 MOD_ALL = _core_.MOD_ALL
678 UPDATE_UI_NONE = _core_.UPDATE_UI_NONE
679 UPDATE_UI_RECURSE = _core_.UPDATE_UI_RECURSE
680 UPDATE_UI_FROMIDLE = _core_.UPDATE_UI_FROMIDLE
681 #---------------------------------------------------------------------------
682
683 class Object(object):
684 """
685 The base class for most wx objects, although in wxPython not
686 much functionality is needed nor exposed.
687 """
688 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
689 def __init__(self): raise AttributeError, "No constructor defined"
690 __repr__ = _swig_repr
691 def GetClassName(*args, **kwargs):
692 """
693 GetClassName(self) -> String
694
695 Returns the class name of the C++ class using wxRTTI.
696 """
697 return _core_.Object_GetClassName(*args, **kwargs)
698
699 def Destroy(*args, **kwargs):
700 """
701 Destroy(self)
702
703 Deletes the C++ object this Python object is a proxy for.
704 """
705 val = _core_.Object_Destroy(*args, **kwargs)
706 args[0].thisown = 0
707 return val
708
709 _core_.Object_swigregister(Object)
710 _wxPySetDictionary = _core_._wxPySetDictionary
711 cvar = _core_.cvar
712 EmptyString = cvar.EmptyString
713
714 #---------------------------------------------------------------------------
715
716 BITMAP_TYPE_INVALID = _core_.BITMAP_TYPE_INVALID
717 BITMAP_TYPE_BMP = _core_.BITMAP_TYPE_BMP
718 BITMAP_TYPE_ICO = _core_.BITMAP_TYPE_ICO
719 BITMAP_TYPE_CUR = _core_.BITMAP_TYPE_CUR
720 BITMAP_TYPE_XBM = _core_.BITMAP_TYPE_XBM
721 BITMAP_TYPE_XBM_DATA = _core_.BITMAP_TYPE_XBM_DATA
722 BITMAP_TYPE_XPM = _core_.BITMAP_TYPE_XPM
723 BITMAP_TYPE_XPM_DATA = _core_.BITMAP_TYPE_XPM_DATA
724 BITMAP_TYPE_TIF = _core_.BITMAP_TYPE_TIF
725 BITMAP_TYPE_GIF = _core_.BITMAP_TYPE_GIF
726 BITMAP_TYPE_PNG = _core_.BITMAP_TYPE_PNG
727 BITMAP_TYPE_JPEG = _core_.BITMAP_TYPE_JPEG
728 BITMAP_TYPE_PNM = _core_.BITMAP_TYPE_PNM
729 BITMAP_TYPE_PCX = _core_.BITMAP_TYPE_PCX
730 BITMAP_TYPE_PICT = _core_.BITMAP_TYPE_PICT
731 BITMAP_TYPE_ICON = _core_.BITMAP_TYPE_ICON
732 BITMAP_TYPE_ANI = _core_.BITMAP_TYPE_ANI
733 BITMAP_TYPE_IFF = _core_.BITMAP_TYPE_IFF
734 BITMAP_TYPE_MACCURSOR = _core_.BITMAP_TYPE_MACCURSOR
735 BITMAP_TYPE_ANY = _core_.BITMAP_TYPE_ANY
736 CURSOR_NONE = _core_.CURSOR_NONE
737 CURSOR_ARROW = _core_.CURSOR_ARROW
738 CURSOR_RIGHT_ARROW = _core_.CURSOR_RIGHT_ARROW
739 CURSOR_BULLSEYE = _core_.CURSOR_BULLSEYE
740 CURSOR_CHAR = _core_.CURSOR_CHAR
741 CURSOR_CROSS = _core_.CURSOR_CROSS
742 CURSOR_HAND = _core_.CURSOR_HAND
743 CURSOR_IBEAM = _core_.CURSOR_IBEAM
744 CURSOR_LEFT_BUTTON = _core_.CURSOR_LEFT_BUTTON
745 CURSOR_MAGNIFIER = _core_.CURSOR_MAGNIFIER
746 CURSOR_MIDDLE_BUTTON = _core_.CURSOR_MIDDLE_BUTTON
747 CURSOR_NO_ENTRY = _core_.CURSOR_NO_ENTRY
748 CURSOR_PAINT_BRUSH = _core_.CURSOR_PAINT_BRUSH
749 CURSOR_PENCIL = _core_.CURSOR_PENCIL
750 CURSOR_POINT_LEFT = _core_.CURSOR_POINT_LEFT
751 CURSOR_POINT_RIGHT = _core_.CURSOR_POINT_RIGHT
752 CURSOR_QUESTION_ARROW = _core_.CURSOR_QUESTION_ARROW
753 CURSOR_RIGHT_BUTTON = _core_.CURSOR_RIGHT_BUTTON
754 CURSOR_SIZENESW = _core_.CURSOR_SIZENESW
755 CURSOR_SIZENS = _core_.CURSOR_SIZENS
756 CURSOR_SIZENWSE = _core_.CURSOR_SIZENWSE
757 CURSOR_SIZEWE = _core_.CURSOR_SIZEWE
758 CURSOR_SIZING = _core_.CURSOR_SIZING
759 CURSOR_SPRAYCAN = _core_.CURSOR_SPRAYCAN
760 CURSOR_WAIT = _core_.CURSOR_WAIT
761 CURSOR_WATCH = _core_.CURSOR_WATCH
762 CURSOR_BLANK = _core_.CURSOR_BLANK
763 CURSOR_DEFAULT = _core_.CURSOR_DEFAULT
764 CURSOR_COPY_ARROW = _core_.CURSOR_COPY_ARROW
765 CURSOR_ARROWWAIT = _core_.CURSOR_ARROWWAIT
766 CURSOR_MAX = _core_.CURSOR_MAX
767 #---------------------------------------------------------------------------
768
769 class Size(object):
770 """
771 wx.Size is a useful data structure used to represent the size of
772 something. It simply contains integer width and height
773 properties. In most places in wxPython where a wx.Size is
774 expected a (width, height) tuple can be used instead.
775 """
776 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
777 __repr__ = _swig_repr
778 width = property(_core_.Size_width_get, _core_.Size_width_set)
779 height = property(_core_.Size_height_get, _core_.Size_height_set)
780 x = width; y = height
781 def __init__(self, *args, **kwargs):
782 """
783 __init__(self, int w=0, int h=0) -> Size
784
785 Creates a size object.
786 """
787 _core_.Size_swiginit(self,_core_.new_Size(*args, **kwargs))
788 __swig_destroy__ = _core_.delete_Size
789 __del__ = lambda self : None;
790 def __eq__(*args, **kwargs):
791 """
792 __eq__(self, PyObject other) -> bool
793
794 Test for equality of wx.Size objects.
795 """
796 return _core_.Size___eq__(*args, **kwargs)
797
798 def __ne__(*args, **kwargs):
799 """
800 __ne__(self, PyObject other) -> bool
801
802 Test for inequality of wx.Size objects.
803 """
804 return _core_.Size___ne__(*args, **kwargs)
805
806 def __add__(*args, **kwargs):
807 """
808 __add__(self, Size sz) -> Size
809
810 Add sz's proprties to this and return the result.
811 """
812 return _core_.Size___add__(*args, **kwargs)
813
814 def __sub__(*args, **kwargs):
815 """
816 __sub__(self, Size sz) -> Size
817
818 Subtract sz's properties from this and return the result.
819 """
820 return _core_.Size___sub__(*args, **kwargs)
821
822 def IncTo(*args, **kwargs):
823 """
824 IncTo(self, Size sz)
825
826 Increments this object so that both of its dimensions are not less
827 than the corresponding dimensions of the size.
828 """
829 return _core_.Size_IncTo(*args, **kwargs)
830
831 def DecTo(*args, **kwargs):
832 """
833 DecTo(self, Size sz)
834
835 Decrements this object so that both of its dimensions are not greater
836 than the corresponding dimensions of the size.
837 """
838 return _core_.Size_DecTo(*args, **kwargs)
839
840 def Scale(*args, **kwargs):
841 """
842 Scale(self, float xscale, float yscale)
843
844 Scales the dimensions of this object by the given factors.
845 """
846 return _core_.Size_Scale(*args, **kwargs)
847
848 def Set(*args, **kwargs):
849 """
850 Set(self, int w, int h)
851
852 Set both width and height.
853 """
854 return _core_.Size_Set(*args, **kwargs)
855
856 def SetWidth(*args, **kwargs):
857 """SetWidth(self, int w)"""
858 return _core_.Size_SetWidth(*args, **kwargs)
859
860 def SetHeight(*args, **kwargs):
861 """SetHeight(self, int h)"""
862 return _core_.Size_SetHeight(*args, **kwargs)
863
864 def GetWidth(*args, **kwargs):
865 """GetWidth(self) -> int"""
866 return _core_.Size_GetWidth(*args, **kwargs)
867
868 def GetHeight(*args, **kwargs):
869 """GetHeight(self) -> int"""
870 return _core_.Size_GetHeight(*args, **kwargs)
871
872 def IsFullySpecified(*args, **kwargs):
873 """
874 IsFullySpecified(self) -> bool
875
876 Returns True if both components of the size are non-default values.
877 """
878 return _core_.Size_IsFullySpecified(*args, **kwargs)
879
880 def SetDefaults(*args, **kwargs):
881 """
882 SetDefaults(self, Size size)
883
884 Combine this size with the other one replacing the default components
885 of this object (i.e. equal to -1) with those of the other.
886 """
887 return _core_.Size_SetDefaults(*args, **kwargs)
888
889 def Get(*args, **kwargs):
890 """
891 Get() -> (width,height)
892
893 Returns the width and height properties as a tuple.
894 """
895 return _core_.Size_Get(*args, **kwargs)
896
897 asTuple = wx._deprecated(Get, "asTuple is deprecated, use `Get` instead")
898 def __str__(self): return str(self.Get())
899 def __repr__(self): return 'wx.Size'+str(self.Get())
900 def __len__(self): return len(self.Get())
901 def __getitem__(self, index): return self.Get()[index]
902 def __setitem__(self, index, val):
903 if index == 0: self.width = val
904 elif index == 1: self.height = val
905 else: raise IndexError
906 def __nonzero__(self): return self.Get() != (0,0)
907 __safe_for_unpickling__ = True
908 def __reduce__(self): return (wx.Size, self.Get())
909
910 _core_.Size_swigregister(Size)
911
912 #---------------------------------------------------------------------------
913
914 class RealPoint(object):
915 """
916 A data structure for representing a point or position with floating
917 point x and y properties. In wxPython most places that expect a
918 wx.RealPoint can also accept a (x,y) tuple.
919 """
920 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
921 __repr__ = _swig_repr
922 x = property(_core_.RealPoint_x_get, _core_.RealPoint_x_set)
923 y = property(_core_.RealPoint_y_get, _core_.RealPoint_y_set)
924 def __init__(self, *args, **kwargs):
925 """
926 __init__(self, double x=0.0, double y=0.0) -> RealPoint
927
928 Create a wx.RealPoint object
929 """
930 _core_.RealPoint_swiginit(self,_core_.new_RealPoint(*args, **kwargs))
931 __swig_destroy__ = _core_.delete_RealPoint
932 __del__ = lambda self : None;
933 def __eq__(*args, **kwargs):
934 """
935 __eq__(self, PyObject other) -> bool
936
937 Test for equality of wx.RealPoint objects.
938 """
939 return _core_.RealPoint___eq__(*args, **kwargs)
940
941 def __ne__(*args, **kwargs):
942 """
943 __ne__(self, PyObject other) -> bool
944
945 Test for inequality of wx.RealPoint objects.
946 """
947 return _core_.RealPoint___ne__(*args, **kwargs)
948
949 def __add__(*args, **kwargs):
950 """
951 __add__(self, RealPoint pt) -> RealPoint
952
953 Add pt's proprties to this and return the result.
954 """
955 return _core_.RealPoint___add__(*args, **kwargs)
956
957 def __sub__(*args, **kwargs):
958 """
959 __sub__(self, RealPoint pt) -> RealPoint
960
961 Subtract pt's proprties from this and return the result
962 """
963 return _core_.RealPoint___sub__(*args, **kwargs)
964
965 def Set(*args, **kwargs):
966 """
967 Set(self, double x, double y)
968
969 Set both the x and y properties
970 """
971 return _core_.RealPoint_Set(*args, **kwargs)
972
973 def Get(*args, **kwargs):
974 """
975 Get() -> (x,y)
976
977 Return the x and y properties as a tuple.
978 """
979 return _core_.RealPoint_Get(*args, **kwargs)
980
981 asTuple = wx._deprecated(Get, "asTuple is deprecated, use `Get` instead")
982 def __str__(self): return str(self.Get())
983 def __repr__(self): return 'wx.RealPoint'+str(self.Get())
984 def __len__(self): return len(self.Get())
985 def __getitem__(self, index): return self.Get()[index]
986 def __setitem__(self, index, val):
987 if index == 0: self.x = val
988 elif index == 1: self.y = val
989 else: raise IndexError
990 def __nonzero__(self): return self.Get() != (0.0, 0.0)
991 __safe_for_unpickling__ = True
992 def __reduce__(self): return (wx.RealPoint, self.Get())
993
994 _core_.RealPoint_swigregister(RealPoint)
995
996 #---------------------------------------------------------------------------
997
998 class Point(object):
999 """
1000 A data structure for representing a point or position with integer x
1001 and y properties. Most places in wxPython that expect a wx.Point can
1002 also accept a (x,y) tuple.
1003 """
1004 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
1005 __repr__ = _swig_repr
1006 x = property(_core_.Point_x_get, _core_.Point_x_set)
1007 y = property(_core_.Point_y_get, _core_.Point_y_set)
1008 def __init__(self, *args, **kwargs):
1009 """
1010 __init__(self, int x=0, int y=0) -> Point
1011
1012 Create a wx.Point object
1013 """
1014 _core_.Point_swiginit(self,_core_.new_Point(*args, **kwargs))
1015 __swig_destroy__ = _core_.delete_Point
1016 __del__ = lambda self : None;
1017 def __eq__(*args, **kwargs):
1018 """
1019 __eq__(self, PyObject other) -> bool
1020
1021 Test for equality of wx.Point objects.
1022 """
1023 return _core_.Point___eq__(*args, **kwargs)
1024
1025 def __ne__(*args, **kwargs):
1026 """
1027 __ne__(self, PyObject other) -> bool
1028
1029 Test for inequality of wx.Point objects.
1030 """
1031 return _core_.Point___ne__(*args, **kwargs)
1032
1033 def __add__(*args, **kwargs):
1034 """
1035 __add__(self, Point pt) -> Point
1036
1037 Add pt's proprties to this and return the result.
1038 """
1039 return _core_.Point___add__(*args, **kwargs)
1040
1041 def __sub__(*args, **kwargs):
1042 """
1043 __sub__(self, Point pt) -> Point
1044
1045 Subtract pt's proprties from this and return the result
1046 """
1047 return _core_.Point___sub__(*args, **kwargs)
1048
1049 def __iadd__(*args, **kwargs):
1050 """
1051 __iadd__(self, Point pt) -> Point
1052
1053 Add pt to this object.
1054 """
1055 return _core_.Point___iadd__(*args, **kwargs)
1056
1057 def __isub__(*args, **kwargs):
1058 """
1059 __isub__(self, Point pt) -> Point
1060
1061 Subtract pt from this object.
1062 """
1063 return _core_.Point___isub__(*args, **kwargs)
1064
1065 def Set(*args, **kwargs):
1066 """
1067 Set(self, long x, long y)
1068
1069 Set both the x and y properties
1070 """
1071 return _core_.Point_Set(*args, **kwargs)
1072
1073 def Get(*args, **kwargs):
1074 """
1075 Get() -> (x,y)
1076
1077 Return the x and y properties as a tuple.
1078 """
1079 return _core_.Point_Get(*args, **kwargs)
1080
1081 asTuple = wx._deprecated(Get, "asTuple is deprecated, use `Get` instead")
1082 def __str__(self): return str(self.Get())
1083 def __repr__(self): return 'wx.Point'+str(self.Get())
1084 def __len__(self): return len(self.Get())
1085 def __getitem__(self, index): return self.Get()[index]
1086 def __setitem__(self, index, val):
1087 if index == 0: self.x = val
1088 elif index == 1: self.y = val
1089 else: raise IndexError
1090 def __nonzero__(self): return self.Get() != (0,0)
1091 __safe_for_unpickling__ = True
1092 def __reduce__(self): return (wx.Point, self.Get())
1093
1094 _core_.Point_swigregister(Point)
1095
1096 #---------------------------------------------------------------------------
1097
1098 class Rect(object):
1099 """
1100 A class for representing and manipulating rectangles. It has x, y,
1101 width and height properties. In wxPython most palces that expect a
1102 wx.Rect can also accept a (x,y,width,height) tuple.
1103 """
1104 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
1105 __repr__ = _swig_repr
1106 def __init__(self, *args, **kwargs):
1107 """
1108 __init__(self, int x=0, int y=0, int width=0, int height=0) -> Rect
1109
1110 Create a new Rect object.
1111 """
1112 _core_.Rect_swiginit(self,_core_.new_Rect(*args, **kwargs))
1113 __swig_destroy__ = _core_.delete_Rect
1114 __del__ = lambda self : None;
1115 def GetX(*args, **kwargs):
1116 """GetX(self) -> int"""
1117 return _core_.Rect_GetX(*args, **kwargs)
1118
1119 def SetX(*args, **kwargs):
1120 """SetX(self, int x)"""
1121 return _core_.Rect_SetX(*args, **kwargs)
1122
1123 def GetY(*args, **kwargs):
1124 """GetY(self) -> int"""
1125 return _core_.Rect_GetY(*args, **kwargs)
1126
1127 def SetY(*args, **kwargs):
1128 """SetY(self, int y)"""
1129 return _core_.Rect_SetY(*args, **kwargs)
1130
1131 def GetWidth(*args, **kwargs):
1132 """GetWidth(self) -> int"""
1133 return _core_.Rect_GetWidth(*args, **kwargs)
1134
1135 def SetWidth(*args, **kwargs):
1136 """SetWidth(self, int w)"""
1137 return _core_.Rect_SetWidth(*args, **kwargs)
1138
1139 def GetHeight(*args, **kwargs):
1140 """GetHeight(self) -> int"""
1141 return _core_.Rect_GetHeight(*args, **kwargs)
1142
1143 def SetHeight(*args, **kwargs):
1144 """SetHeight(self, int h)"""
1145 return _core_.Rect_SetHeight(*args, **kwargs)
1146
1147 def GetPosition(*args, **kwargs):
1148 """GetPosition(self) -> Point"""
1149 return _core_.Rect_GetPosition(*args, **kwargs)
1150
1151 def SetPosition(*args, **kwargs):
1152 """SetPosition(self, Point p)"""
1153 return _core_.Rect_SetPosition(*args, **kwargs)
1154
1155 def GetSize(*args, **kwargs):
1156 """GetSize(self) -> Size"""
1157 return _core_.Rect_GetSize(*args, **kwargs)
1158
1159 def SetSize(*args, **kwargs):
1160 """SetSize(self, Size s)"""
1161 return _core_.Rect_SetSize(*args, **kwargs)
1162
1163 def IsEmpty(*args, **kwargs):
1164 """IsEmpty(self) -> bool"""
1165 return _core_.Rect_IsEmpty(*args, **kwargs)
1166
1167 def GetTopLeft(*args, **kwargs):
1168 """GetTopLeft(self) -> Point"""
1169 return _core_.Rect_GetTopLeft(*args, **kwargs)
1170
1171 def SetTopLeft(*args, **kwargs):
1172 """SetTopLeft(self, Point p)"""
1173 return _core_.Rect_SetTopLeft(*args, **kwargs)
1174
1175 def GetBottomRight(*args, **kwargs):
1176 """GetBottomRight(self) -> Point"""
1177 return _core_.Rect_GetBottomRight(*args, **kwargs)
1178
1179 def SetBottomRight(*args, **kwargs):
1180 """SetBottomRight(self, Point p)"""
1181 return _core_.Rect_SetBottomRight(*args, **kwargs)
1182
1183 def GetLeft(*args, **kwargs):
1184 """GetLeft(self) -> int"""
1185 return _core_.Rect_GetLeft(*args, **kwargs)
1186
1187 def GetTop(*args, **kwargs):
1188 """GetTop(self) -> int"""
1189 return _core_.Rect_GetTop(*args, **kwargs)
1190
1191 def GetBottom(*args, **kwargs):
1192 """GetBottom(self) -> int"""
1193 return _core_.Rect_GetBottom(*args, **kwargs)
1194
1195 def GetRight(*args, **kwargs):
1196 """GetRight(self) -> int"""
1197 return _core_.Rect_GetRight(*args, **kwargs)
1198
1199 def SetLeft(*args, **kwargs):
1200 """SetLeft(self, int left)"""
1201 return _core_.Rect_SetLeft(*args, **kwargs)
1202
1203 def SetRight(*args, **kwargs):
1204 """SetRight(self, int right)"""
1205 return _core_.Rect_SetRight(*args, **kwargs)
1206
1207 def SetTop(*args, **kwargs):
1208 """SetTop(self, int top)"""
1209 return _core_.Rect_SetTop(*args, **kwargs)
1210
1211 def SetBottom(*args, **kwargs):
1212 """SetBottom(self, int bottom)"""
1213 return _core_.Rect_SetBottom(*args, **kwargs)
1214
1215 position = property(GetPosition, SetPosition)
1216 size = property(GetSize, SetSize)
1217 left = property(GetLeft, SetLeft)
1218 right = property(GetRight, SetRight)
1219 top = property(GetTop, SetTop)
1220 bottom = property(GetBottom, SetBottom)
1221
1222 def Inflate(*args, **kwargs):
1223 """
1224 Inflate(self, int dx, int dy) -> Rect
1225
1226 Increases the size of the rectangle.
1227
1228 The left border is moved farther left and the right border is moved
1229 farther right by ``dx``. The upper border is moved farther up and the
1230 bottom border is moved farther down by ``dy``. (Note the the width and
1231 height of the rectangle thus change by ``2*dx`` and ``2*dy``,
1232 respectively.) If one or both of ``dx`` and ``dy`` are negative, the
1233 opposite happens: the rectangle size decreases in the respective
1234 direction.
1235
1236 The change is made to the rectangle inplace, if instead you need a
1237 copy that is inflated, preserving the original then make the copy
1238 first::
1239
1240 copy = wx.Rect(*original)
1241 copy.Inflate(10,15)
1242
1243
1244 """
1245 return _core_.Rect_Inflate(*args, **kwargs)
1246
1247 def Deflate(*args, **kwargs):
1248 """
1249 Deflate(self, int dx, int dy) -> Rect
1250
1251 Decrease the rectangle size. This method is the opposite of `Inflate`
1252 in that Deflate(a,b) is equivalent to Inflate(-a,-b). Please refer to
1253 `Inflate` for a full description.
1254 """
1255 return _core_.Rect_Deflate(*args, **kwargs)
1256
1257 def OffsetXY(*args, **kwargs):
1258 """
1259 OffsetXY(self, int dx, int dy)
1260
1261 Moves the rectangle by the specified offset. If dx is positive, the
1262 rectangle is moved to the right, if dy is positive, it is moved to the
1263 bottom, otherwise it is moved to the left or top respectively.
1264 """
1265 return _core_.Rect_OffsetXY(*args, **kwargs)
1266
1267 def Offset(*args, **kwargs):
1268 """
1269 Offset(self, Point pt)
1270
1271 Same as `OffsetXY` but uses dx,dy from Point
1272 """
1273 return _core_.Rect_Offset(*args, **kwargs)
1274
1275 def Intersect(*args, **kwargs):
1276 """
1277 Intersect(self, Rect rect) -> Rect
1278
1279 Returns the intersectsion of this rectangle and rect.
1280 """
1281 return _core_.Rect_Intersect(*args, **kwargs)
1282
1283 def Union(*args, **kwargs):
1284 """
1285 Union(self, Rect rect) -> Rect
1286
1287 Returns the union of this rectangle and rect.
1288 """
1289 return _core_.Rect_Union(*args, **kwargs)
1290
1291 def __add__(*args, **kwargs):
1292 """
1293 __add__(self, Rect rect) -> Rect
1294
1295 Add the properties of rect to this rectangle and return the result.
1296 """
1297 return _core_.Rect___add__(*args, **kwargs)
1298
1299 def __iadd__(*args, **kwargs):
1300 """
1301 __iadd__(self, Rect rect) -> Rect
1302
1303 Add the properties of rect to this rectangle, updating this rectangle.
1304 """
1305 return _core_.Rect___iadd__(*args, **kwargs)
1306
1307 def __eq__(*args, **kwargs):
1308 """
1309 __eq__(self, PyObject other) -> bool
1310
1311 Test for equality of wx.Rect objects.
1312 """
1313 return _core_.Rect___eq__(*args, **kwargs)
1314
1315 def __ne__(*args, **kwargs):
1316 """
1317 __ne__(self, PyObject other) -> bool
1318
1319 Test for inequality of wx.Rect objects.
1320 """
1321 return _core_.Rect___ne__(*args, **kwargs)
1322
1323 def InsideXY(*args, **kwargs):
1324 """
1325 InsideXY(self, int x, int y) -> bool
1326
1327 Return True if the point is (not strcitly) inside the rect.
1328 """
1329 return _core_.Rect_InsideXY(*args, **kwargs)
1330
1331 def Inside(*args, **kwargs):
1332 """
1333 Inside(self, Point pt) -> bool
1334
1335 Return True if the point is (not strcitly) inside the rect.
1336 """
1337 return _core_.Rect_Inside(*args, **kwargs)
1338
1339 def InsideRect(*args, **kwargs):
1340 """
1341 InsideRect(self, Rect rect) -> bool
1342
1343 Returns ``True`` if the given rectangle is completely inside this
1344 rectangle or touches its boundary.
1345 """
1346 return _core_.Rect_InsideRect(*args, **kwargs)
1347
1348 def Intersects(*args, **kwargs):
1349 """
1350 Intersects(self, Rect rect) -> bool
1351
1352 Returns True if the rectangles have a non empty intersection.
1353 """
1354 return _core_.Rect_Intersects(*args, **kwargs)
1355
1356 def CenterIn(*args, **kwargs):
1357 """
1358 CenterIn(self, Rect r, int dir=BOTH) -> Rect
1359
1360 Center this rectangle within the one passed to the method, which is
1361 usually, but not necessarily, the larger one.
1362 """
1363 return _core_.Rect_CenterIn(*args, **kwargs)
1364
1365 CentreIn = CenterIn
1366 x = property(_core_.Rect_x_get, _core_.Rect_x_set)
1367 y = property(_core_.Rect_y_get, _core_.Rect_y_set)
1368 width = property(_core_.Rect_width_get, _core_.Rect_width_set)
1369 height = property(_core_.Rect_height_get, _core_.Rect_height_set)
1370 def Set(*args, **kwargs):
1371 """
1372 Set(self, int x=0, int y=0, int width=0, int height=0)
1373
1374 Set all rectangle properties.
1375 """
1376 return _core_.Rect_Set(*args, **kwargs)
1377
1378 def Get(*args, **kwargs):
1379 """
1380 Get() -> (x,y,width,height)
1381
1382 Return the rectangle properties as a tuple.
1383 """
1384 return _core_.Rect_Get(*args, **kwargs)
1385
1386 asTuple = wx._deprecated(Get, "asTuple is deprecated, use `Get` instead")
1387 def __str__(self): return str(self.Get())
1388 def __repr__(self): return 'wx.Rect'+str(self.Get())
1389 def __len__(self): return len(self.Get())
1390 def __getitem__(self, index): return self.Get()[index]
1391 def __setitem__(self, index, val):
1392 if index == 0: self.x = val
1393 elif index == 1: self.y = val
1394 elif index == 2: self.width = val
1395 elif index == 3: self.height = val
1396 else: raise IndexError
1397 def __nonzero__(self): return self.Get() != (0,0,0,0)
1398 __safe_for_unpickling__ = True
1399 def __reduce__(self): return (wx.Rect, self.Get())
1400
1401 _core_.Rect_swigregister(Rect)
1402
1403 def RectPP(*args, **kwargs):
1404 """
1405 RectPP(Point topLeft, Point bottomRight) -> Rect
1406
1407 Create a new Rect object from Points representing two corners.
1408 """
1409 val = _core_.new_RectPP(*args, **kwargs)
1410 return val
1411
1412 def RectPS(*args, **kwargs):
1413 """
1414 RectPS(Point pos, Size size) -> Rect
1415
1416 Create a new Rect from a position and size.
1417 """
1418 val = _core_.new_RectPS(*args, **kwargs)
1419 return val
1420
1421 def RectS(*args, **kwargs):
1422 """
1423 RectS(Size size) -> Rect
1424
1425 Create a new Rect from a size only.
1426 """
1427 val = _core_.new_RectS(*args, **kwargs)
1428 return val
1429
1430
1431 def IntersectRect(*args, **kwargs):
1432 """
1433 IntersectRect(Rect r1, Rect r2) -> Rect
1434
1435 Calculate and return the intersection of r1 and r2.
1436 """
1437 return _core_.IntersectRect(*args, **kwargs)
1438 #---------------------------------------------------------------------------
1439
1440 class Point2D(object):
1441 """
1442 wx.Point2Ds represent a point or a vector in a 2d coordinate system
1443 with floating point values.
1444 """
1445 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
1446 __repr__ = _swig_repr
1447 def __init__(self, *args, **kwargs):
1448 """
1449 __init__(self, double x=0.0, double y=0.0) -> Point2D
1450
1451 Create a w.Point2D object.
1452 """
1453 _core_.Point2D_swiginit(self,_core_.new_Point2D(*args, **kwargs))
1454 def GetFloor(*args, **kwargs):
1455 """
1456 GetFloor() -> (x,y)
1457
1458 Convert to integer
1459 """
1460 return _core_.Point2D_GetFloor(*args, **kwargs)
1461
1462 def GetRounded(*args, **kwargs):
1463 """
1464 GetRounded() -> (x,y)
1465
1466 Convert to integer
1467 """
1468 return _core_.Point2D_GetRounded(*args, **kwargs)
1469
1470 def GetVectorLength(*args, **kwargs):
1471 """GetVectorLength(self) -> double"""
1472 return _core_.Point2D_GetVectorLength(*args, **kwargs)
1473
1474 def GetVectorAngle(*args, **kwargs):
1475 """GetVectorAngle(self) -> double"""
1476 return _core_.Point2D_GetVectorAngle(*args, **kwargs)
1477
1478 def SetVectorLength(*args, **kwargs):
1479 """SetVectorLength(self, double length)"""
1480 return _core_.Point2D_SetVectorLength(*args, **kwargs)
1481
1482 def SetVectorAngle(*args, **kwargs):
1483 """SetVectorAngle(self, double degrees)"""
1484 return _core_.Point2D_SetVectorAngle(*args, **kwargs)
1485
1486 def SetPolarCoordinates(self, angle, length):
1487 self.SetVectorLength(length)
1488 self.SetVectorAngle(angle)
1489 def Normalize(self):
1490 self.SetVectorLength(1.0)
1491
1492 def GetDistance(*args, **kwargs):
1493 """GetDistance(self, Point2D pt) -> double"""
1494 return _core_.Point2D_GetDistance(*args, **kwargs)
1495
1496 def GetDistanceSquare(*args, **kwargs):
1497 """GetDistanceSquare(self, Point2D pt) -> double"""
1498 return _core_.Point2D_GetDistanceSquare(*args, **kwargs)
1499
1500 def GetDotProduct(*args, **kwargs):
1501 """GetDotProduct(self, Point2D vec) -> double"""
1502 return _core_.Point2D_GetDotProduct(*args, **kwargs)
1503
1504 def GetCrossProduct(*args, **kwargs):
1505 """GetCrossProduct(self, Point2D vec) -> double"""
1506 return _core_.Point2D_GetCrossProduct(*args, **kwargs)
1507
1508 def __neg__(*args, **kwargs):
1509 """
1510 __neg__(self) -> Point2D
1511
1512 the reflection of this point
1513 """
1514 return _core_.Point2D___neg__(*args, **kwargs)
1515
1516 def __iadd__(*args, **kwargs):
1517 """__iadd__(self, Point2D pt) -> Point2D"""
1518 return _core_.Point2D___iadd__(*args, **kwargs)
1519
1520 def __isub__(*args, **kwargs):
1521 """__isub__(self, Point2D pt) -> Point2D"""
1522 return _core_.Point2D___isub__(*args, **kwargs)
1523
1524 def __imul__(*args, **kwargs):
1525 """__imul__(self, Point2D pt) -> Point2D"""
1526 return _core_.Point2D___imul__(*args, **kwargs)
1527
1528 def __idiv__(*args, **kwargs):
1529 """__idiv__(self, Point2D pt) -> Point2D"""
1530 return _core_.Point2D___idiv__(*args, **kwargs)
1531
1532 def __eq__(*args, **kwargs):
1533 """
1534 __eq__(self, PyObject other) -> bool
1535
1536 Test for equality of wx.Point2D objects.
1537 """
1538 return _core_.Point2D___eq__(*args, **kwargs)
1539
1540 def __ne__(*args, **kwargs):
1541 """
1542 __ne__(self, PyObject other) -> bool
1543
1544 Test for inequality of wx.Point2D objects.
1545 """
1546 return _core_.Point2D___ne__(*args, **kwargs)
1547
1548 x = property(_core_.Point2D_x_get, _core_.Point2D_x_set)
1549 y = property(_core_.Point2D_y_get, _core_.Point2D_y_set)
1550 def Set(*args, **kwargs):
1551 """Set(self, double x=0, double y=0)"""
1552 return _core_.Point2D_Set(*args, **kwargs)
1553
1554 def Get(*args, **kwargs):
1555 """
1556 Get() -> (x,y)
1557
1558 Return x and y properties as a tuple.
1559 """
1560 return _core_.Point2D_Get(*args, **kwargs)
1561
1562 asTuple = wx._deprecated(Get, "asTuple is deprecated, use `Get` instead")
1563 def __str__(self): return str(self.Get())
1564 def __repr__(self): return 'wx.Point2D'+str(self.Get())
1565 def __len__(self): return len(self.Get())
1566 def __getitem__(self, index): return self.Get()[index]
1567 def __setitem__(self, index, val):
1568 if index == 0: self.x = val
1569 elif index == 1: self.y = val
1570 else: raise IndexError
1571 def __nonzero__(self): return self.Get() != (0.0, 0.0)
1572 __safe_for_unpickling__ = True
1573 def __reduce__(self): return (wx.Point2D, self.Get())
1574
1575 _core_.Point2D_swigregister(Point2D)
1576
1577 def Point2DCopy(*args, **kwargs):
1578 """
1579 Point2DCopy(Point2D pt) -> Point2D
1580
1581 Create a w.Point2D object.
1582 """
1583 val = _core_.new_Point2DCopy(*args, **kwargs)
1584 return val
1585
1586 def Point2DFromPoint(*args, **kwargs):
1587 """
1588 Point2DFromPoint(Point pt) -> Point2D
1589
1590 Create a w.Point2D object.
1591 """
1592 val = _core_.new_Point2DFromPoint(*args, **kwargs)
1593 return val
1594
1595 #---------------------------------------------------------------------------
1596
1597 FromStart = _core_.FromStart
1598 FromCurrent = _core_.FromCurrent
1599 FromEnd = _core_.FromEnd
1600 class InputStream(object):
1601 """Proxy of C++ InputStream class"""
1602 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
1603 __repr__ = _swig_repr
1604 def __init__(self, *args, **kwargs):
1605 """__init__(self, PyObject p) -> InputStream"""
1606 _core_.InputStream_swiginit(self,_core_.new_InputStream(*args, **kwargs))
1607 __swig_destroy__ = _core_.delete_InputStream
1608 __del__ = lambda self : None;
1609 def close(*args, **kwargs):
1610 """close(self)"""
1611 return _core_.InputStream_close(*args, **kwargs)
1612
1613 def flush(*args, **kwargs):
1614 """flush(self)"""
1615 return _core_.InputStream_flush(*args, **kwargs)
1616
1617 def eof(*args, **kwargs):
1618 """eof(self) -> bool"""
1619 return _core_.InputStream_eof(*args, **kwargs)
1620
1621 def read(*args, **kwargs):
1622 """read(self, int size=-1) -> PyObject"""
1623 return _core_.InputStream_read(*args, **kwargs)
1624
1625 def readline(*args, **kwargs):
1626 """readline(self, int size=-1) -> PyObject"""
1627 return _core_.InputStream_readline(*args, **kwargs)
1628
1629 def readlines(*args, **kwargs):
1630 """readlines(self, int sizehint=-1) -> PyObject"""
1631 return _core_.InputStream_readlines(*args, **kwargs)
1632
1633 def seek(*args, **kwargs):
1634 """seek(self, int offset, int whence=0)"""
1635 return _core_.InputStream_seek(*args, **kwargs)
1636
1637 def tell(*args, **kwargs):
1638 """tell(self) -> int"""
1639 return _core_.InputStream_tell(*args, **kwargs)
1640
1641 def Peek(*args, **kwargs):
1642 """Peek(self) -> char"""
1643 return _core_.InputStream_Peek(*args, **kwargs)
1644
1645 def GetC(*args, **kwargs):
1646 """GetC(self) -> char"""
1647 return _core_.InputStream_GetC(*args, **kwargs)
1648
1649 def LastRead(*args, **kwargs):
1650 """LastRead(self) -> size_t"""
1651 return _core_.InputStream_LastRead(*args, **kwargs)
1652
1653 def CanRead(*args, **kwargs):
1654 """CanRead(self) -> bool"""
1655 return _core_.InputStream_CanRead(*args, **kwargs)
1656
1657 def Eof(*args, **kwargs):
1658 """Eof(self) -> bool"""
1659 return _core_.InputStream_Eof(*args, **kwargs)
1660
1661 def Ungetch(*args, **kwargs):
1662 """Ungetch(self, char c) -> bool"""
1663 return _core_.InputStream_Ungetch(*args, **kwargs)
1664
1665 def SeekI(*args, **kwargs):
1666 """SeekI(self, long pos, int mode=FromStart) -> long"""
1667 return _core_.InputStream_SeekI(*args, **kwargs)
1668
1669 def TellI(*args, **kwargs):
1670 """TellI(self) -> long"""
1671 return _core_.InputStream_TellI(*args, **kwargs)
1672
1673 _core_.InputStream_swigregister(InputStream)
1674 DefaultPosition = cvar.DefaultPosition
1675 DefaultSize = cvar.DefaultSize
1676
1677 class OutputStream(object):
1678 """Proxy of C++ OutputStream class"""
1679 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
1680 def __init__(self): raise AttributeError, "No constructor defined"
1681 __repr__ = _swig_repr
1682 def write(*args, **kwargs):
1683 """write(self, PyObject obj)"""
1684 return _core_.OutputStream_write(*args, **kwargs)
1685
1686 def LastWrite(*args, **kwargs):
1687 """LastWrite(self) -> size_t"""
1688 return _core_.OutputStream_LastWrite(*args, **kwargs)
1689
1690 _core_.OutputStream_swigregister(OutputStream)
1691
1692 #---------------------------------------------------------------------------
1693
1694 class FSFile(Object):
1695 """Proxy of C++ FSFile class"""
1696 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
1697 __repr__ = _swig_repr
1698 def __init__(self, *args, **kwargs):
1699 """
1700 __init__(self, InputStream stream, String loc, String mimetype, String anchor,
1701 DateTime modif) -> FSFile
1702 """
1703 _core_.FSFile_swiginit(self,_core_.new_FSFile(*args, **kwargs))
1704 __swig_destroy__ = _core_.delete_FSFile
1705 __del__ = lambda self : None;
1706 def GetStream(*args, **kwargs):
1707 """GetStream(self) -> InputStream"""
1708 return _core_.FSFile_GetStream(*args, **kwargs)
1709
1710 def DetachStream(*args, **kwargs):
1711 """DetachStream(self)"""
1712 return _core_.FSFile_DetachStream(*args, **kwargs)
1713
1714 def GetMimeType(*args, **kwargs):
1715 """GetMimeType(self) -> String"""
1716 return _core_.FSFile_GetMimeType(*args, **kwargs)
1717
1718 def GetLocation(*args, **kwargs):
1719 """GetLocation(self) -> String"""
1720 return _core_.FSFile_GetLocation(*args, **kwargs)
1721
1722 def GetAnchor(*args, **kwargs):
1723 """GetAnchor(self) -> String"""
1724 return _core_.FSFile_GetAnchor(*args, **kwargs)
1725
1726 def GetModificationTime(*args, **kwargs):
1727 """GetModificationTime(self) -> DateTime"""
1728 return _core_.FSFile_GetModificationTime(*args, **kwargs)
1729
1730 Anchor = property(GetAnchor,doc="See `GetAnchor`")
1731 Location = property(GetLocation,doc="See `GetLocation`")
1732 MimeType = property(GetMimeType,doc="See `GetMimeType`")
1733 ModificationTime = property(GetModificationTime,doc="See `GetModificationTime`")
1734 Stream = property(GetStream,doc="See `GetStream`")
1735 _core_.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 _core_.CPPFileSystemHandler_swigregister(CPPFileSystemHandler)
1745
1746 class FileSystemHandler(CPPFileSystemHandler):
1747 """Proxy of C++ FileSystemHandler class"""
1748 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
1749 __repr__ = _swig_repr
1750 def __init__(self, *args, **kwargs):
1751 """__init__(self) -> FileSystemHandler"""
1752 _core_.FileSystemHandler_swiginit(self,_core_.new_FileSystemHandler(*args, **kwargs))
1753 self._setCallbackInfo(self, FileSystemHandler)
1754
1755 def _setCallbackInfo(*args, **kwargs):
1756 """_setCallbackInfo(self, PyObject self, PyObject _class)"""
1757 return _core_.FileSystemHandler__setCallbackInfo(*args, **kwargs)
1758
1759 def CanOpen(*args, **kwargs):
1760 """CanOpen(self, String location) -> bool"""
1761 return _core_.FileSystemHandler_CanOpen(*args, **kwargs)
1762
1763 def OpenFile(*args, **kwargs):
1764 """OpenFile(self, FileSystem fs, String location) -> FSFile"""
1765 return _core_.FileSystemHandler_OpenFile(*args, **kwargs)
1766
1767 def FindFirst(*args, **kwargs):
1768 """FindFirst(self, String spec, int flags=0) -> String"""
1769 return _core_.FileSystemHandler_FindFirst(*args, **kwargs)
1770
1771 def FindNext(*args, **kwargs):
1772 """FindNext(self) -> String"""
1773 return _core_.FileSystemHandler_FindNext(*args, **kwargs)
1774
1775 def GetProtocol(*args, **kwargs):
1776 """GetProtocol(self, String location) -> String"""
1777 return _core_.FileSystemHandler_GetProtocol(*args, **kwargs)
1778
1779 def GetLeftLocation(*args, **kwargs):
1780 """GetLeftLocation(self, String location) -> String"""
1781 return _core_.FileSystemHandler_GetLeftLocation(*args, **kwargs)
1782
1783 def GetAnchor(*args, **kwargs):
1784 """GetAnchor(self, String location) -> String"""
1785 return _core_.FileSystemHandler_GetAnchor(*args, **kwargs)
1786
1787 def GetRightLocation(*args, **kwargs):
1788 """GetRightLocation(self, String location) -> String"""
1789 return _core_.FileSystemHandler_GetRightLocation(*args, **kwargs)
1790
1791 def GetMimeTypeFromExt(*args, **kwargs):
1792 """GetMimeTypeFromExt(self, String location) -> String"""
1793 return _core_.FileSystemHandler_GetMimeTypeFromExt(*args, **kwargs)
1794
1795 Anchor = property(GetAnchor,doc="See `GetAnchor`")
1796 LeftLocation = property(GetLeftLocation,doc="See `GetLeftLocation`")
1797 MimeTypeFromExt = property(GetMimeTypeFromExt,doc="See `GetMimeTypeFromExt`")
1798 Protocol = property(GetProtocol,doc="See `GetProtocol`")
1799 RightLocation = property(GetRightLocation,doc="See `GetRightLocation`")
1800 _core_.FileSystemHandler_swigregister(FileSystemHandler)
1801
1802 class FileSystem(Object):
1803 """Proxy of C++ FileSystem class"""
1804 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
1805 __repr__ = _swig_repr
1806 def __init__(self, *args, **kwargs):
1807 """__init__(self) -> FileSystem"""
1808 _core_.FileSystem_swiginit(self,_core_.new_FileSystem(*args, **kwargs))
1809 __swig_destroy__ = _core_.delete_FileSystem
1810 __del__ = lambda self : None;
1811 def ChangePathTo(*args, **kwargs):
1812 """ChangePathTo(self, String location, bool is_dir=False)"""
1813 return _core_.FileSystem_ChangePathTo(*args, **kwargs)
1814
1815 def GetPath(*args, **kwargs):
1816 """GetPath(self) -> String"""
1817 return _core_.FileSystem_GetPath(*args, **kwargs)
1818
1819 def OpenFile(*args, **kwargs):
1820 """OpenFile(self, String location) -> FSFile"""
1821 return _core_.FileSystem_OpenFile(*args, **kwargs)
1822
1823 def FindFirst(*args, **kwargs):
1824 """FindFirst(self, String spec, int flags=0) -> String"""
1825 return _core_.FileSystem_FindFirst(*args, **kwargs)
1826
1827 def FindNext(*args, **kwargs):
1828 """FindNext(self) -> String"""
1829 return _core_.FileSystem_FindNext(*args, **kwargs)
1830
1831 def AddHandler(*args, **kwargs):
1832 """AddHandler(CPPFileSystemHandler handler)"""
1833 return _core_.FileSystem_AddHandler(*args, **kwargs)
1834
1835 AddHandler = staticmethod(AddHandler)
1836 def RemoveHandler(*args, **kwargs):
1837 """RemoveHandler(CPPFileSystemHandler handler) -> CPPFileSystemHandler"""
1838 return _core_.FileSystem_RemoveHandler(*args, **kwargs)
1839
1840 RemoveHandler = staticmethod(RemoveHandler)
1841 def CleanUpHandlers(*args, **kwargs):
1842 """CleanUpHandlers()"""
1843 return _core_.FileSystem_CleanUpHandlers(*args, **kwargs)
1844
1845 CleanUpHandlers = staticmethod(CleanUpHandlers)
1846 def FileNameToURL(*args, **kwargs):
1847 """FileNameToURL(String filename) -> String"""
1848 return _core_.FileSystem_FileNameToURL(*args, **kwargs)
1849
1850 FileNameToURL = staticmethod(FileNameToURL)
1851 def URLToFileName(*args, **kwargs):
1852 """URLToFileName(String url) -> String"""
1853 return _core_.FileSystem_URLToFileName(*args, **kwargs)
1854
1855 URLToFileName = staticmethod(URLToFileName)
1856 Path = property(GetPath,doc="See `GetPath`")
1857 _core_.FileSystem_swigregister(FileSystem)
1858
1859 def FileSystem_AddHandler(*args, **kwargs):
1860 """FileSystem_AddHandler(CPPFileSystemHandler handler)"""
1861 return _core_.FileSystem_AddHandler(*args, **kwargs)
1862
1863 def FileSystem_RemoveHandler(*args, **kwargs):
1864 """FileSystem_RemoveHandler(CPPFileSystemHandler handler) -> CPPFileSystemHandler"""
1865 return _core_.FileSystem_RemoveHandler(*args, **kwargs)
1866
1867 def FileSystem_CleanUpHandlers(*args):
1868 """FileSystem_CleanUpHandlers()"""
1869 return _core_.FileSystem_CleanUpHandlers(*args)
1870
1871 def FileSystem_FileNameToURL(*args, **kwargs):
1872 """FileSystem_FileNameToURL(String filename) -> String"""
1873 return _core_.FileSystem_FileNameToURL(*args, **kwargs)
1874
1875 def FileSystem_URLToFileName(*args, **kwargs):
1876 """FileSystem_URLToFileName(String url) -> String"""
1877 return _core_.FileSystem_URLToFileName(*args, **kwargs)
1878
1879 class InternetFSHandler(CPPFileSystemHandler):
1880 """Proxy of C++ InternetFSHandler class"""
1881 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
1882 __repr__ = _swig_repr
1883 def __init__(self, *args, **kwargs):
1884 """__init__(self) -> InternetFSHandler"""
1885 _core_.InternetFSHandler_swiginit(self,_core_.new_InternetFSHandler(*args, **kwargs))
1886 def CanOpen(*args, **kwargs):
1887 """CanOpen(self, String location) -> bool"""
1888 return _core_.InternetFSHandler_CanOpen(*args, **kwargs)
1889
1890 def OpenFile(*args, **kwargs):
1891 """OpenFile(self, FileSystem fs, String location) -> FSFile"""
1892 return _core_.InternetFSHandler_OpenFile(*args, **kwargs)
1893
1894 _core_.InternetFSHandler_swigregister(InternetFSHandler)
1895
1896 class ZipFSHandler(CPPFileSystemHandler):
1897 """Proxy of C++ ZipFSHandler class"""
1898 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
1899 __repr__ = _swig_repr
1900 def __init__(self, *args, **kwargs):
1901 """__init__(self) -> ZipFSHandler"""
1902 _core_.ZipFSHandler_swiginit(self,_core_.new_ZipFSHandler(*args, **kwargs))
1903 def CanOpen(*args, **kwargs):
1904 """CanOpen(self, String location) -> bool"""
1905 return _core_.ZipFSHandler_CanOpen(*args, **kwargs)
1906
1907 def OpenFile(*args, **kwargs):
1908 """OpenFile(self, FileSystem fs, String location) -> FSFile"""
1909 return _core_.ZipFSHandler_OpenFile(*args, **kwargs)
1910
1911 def FindFirst(*args, **kwargs):
1912 """FindFirst(self, String spec, int flags=0) -> String"""
1913 return _core_.ZipFSHandler_FindFirst(*args, **kwargs)
1914
1915 def FindNext(*args, **kwargs):
1916 """FindNext(self) -> String"""
1917 return _core_.ZipFSHandler_FindNext(*args, **kwargs)
1918
1919 _core_.ZipFSHandler_swigregister(ZipFSHandler)
1920
1921
1922 def __wxMemoryFSHandler_AddFile_wxImage(*args, **kwargs):
1923 """__wxMemoryFSHandler_AddFile_wxImage(String filename, Image image, long type)"""
1924 return _core_.__wxMemoryFSHandler_AddFile_wxImage(*args, **kwargs)
1925
1926 def __wxMemoryFSHandler_AddFile_wxBitmap(*args, **kwargs):
1927 """__wxMemoryFSHandler_AddFile_wxBitmap(String filename, Bitmap bitmap, long type)"""
1928 return _core_.__wxMemoryFSHandler_AddFile_wxBitmap(*args, **kwargs)
1929
1930 def __wxMemoryFSHandler_AddFile_Data(*args, **kwargs):
1931 """__wxMemoryFSHandler_AddFile_Data(String filename, PyObject data)"""
1932 return _core_.__wxMemoryFSHandler_AddFile_Data(*args, **kwargs)
1933 def MemoryFSHandler_AddFile(filename, dataItem, imgType=-1):
1934 """
1935 Add 'file' to the memory filesystem. The dataItem parameter can
1936 either be a `wx.Bitmap`, `wx.Image` or a string that can contain
1937 arbitrary data. If a bitmap or image is used then the imgType
1938 parameter should specify what kind of image file it should be
1939 written as, wx.BITMAP_TYPE_PNG, etc.
1940 """
1941 if isinstance(dataItem, wx.Image):
1942 __wxMemoryFSHandler_AddFile_wxImage(filename, dataItem, imgType)
1943 elif isinstance(dataItem, wx.Bitmap):
1944 __wxMemoryFSHandler_AddFile_wxBitmap(filename, dataItem, imgType)
1945 elif type(dataItem) == str:
1946 __wxMemoryFSHandler_AddFile_Data(filename, dataItem)
1947 else:
1948 raise TypeError, 'wx.Image, wx.Bitmap or string expected'
1949
1950 class MemoryFSHandler(CPPFileSystemHandler):
1951 """Proxy of C++ MemoryFSHandler class"""
1952 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
1953 __repr__ = _swig_repr
1954 def __init__(self, *args, **kwargs):
1955 """__init__(self) -> MemoryFSHandler"""
1956 _core_.MemoryFSHandler_swiginit(self,_core_.new_MemoryFSHandler(*args, **kwargs))
1957 def RemoveFile(*args, **kwargs):
1958 """RemoveFile(String filename)"""
1959 return _core_.MemoryFSHandler_RemoveFile(*args, **kwargs)
1960
1961 RemoveFile = staticmethod(RemoveFile)
1962 AddFile = staticmethod(MemoryFSHandler_AddFile)
1963 def CanOpen(*args, **kwargs):
1964 """CanOpen(self, String location) -> bool"""
1965 return _core_.MemoryFSHandler_CanOpen(*args, **kwargs)
1966
1967 def OpenFile(*args, **kwargs):
1968 """OpenFile(self, FileSystem fs, String location) -> FSFile"""
1969 return _core_.MemoryFSHandler_OpenFile(*args, **kwargs)
1970
1971 def FindFirst(*args, **kwargs):
1972 """FindFirst(self, String spec, int flags=0) -> String"""
1973 return _core_.MemoryFSHandler_FindFirst(*args, **kwargs)
1974
1975 def FindNext(*args, **kwargs):
1976 """FindNext(self) -> String"""
1977 return _core_.MemoryFSHandler_FindNext(*args, **kwargs)
1978
1979 _core_.MemoryFSHandler_swigregister(MemoryFSHandler)
1980
1981 def MemoryFSHandler_RemoveFile(*args, **kwargs):
1982 """MemoryFSHandler_RemoveFile(String filename)"""
1983 return _core_.MemoryFSHandler_RemoveFile(*args, **kwargs)
1984
1985 IMAGE_ALPHA_TRANSPARENT = _core_.IMAGE_ALPHA_TRANSPARENT
1986 IMAGE_ALPHA_THRESHOLD = _core_.IMAGE_ALPHA_THRESHOLD
1987 IMAGE_ALPHA_OPAQUE = _core_.IMAGE_ALPHA_OPAQUE
1988 #---------------------------------------------------------------------------
1989
1990 class ImageHandler(Object):
1991 """
1992 This is the base class for implementing image file loading/saving, and
1993 image creation from data. It is used within `wx.Image` and is not
1994 normally seen by the application.
1995 """
1996 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
1997 def __init__(self): raise AttributeError, "No constructor defined"
1998 __repr__ = _swig_repr
1999 def GetName(*args, **kwargs):
2000 """GetName(self) -> String"""
2001 return _core_.ImageHandler_GetName(*args, **kwargs)
2002
2003 def GetExtension(*args, **kwargs):
2004 """GetExtension(self) -> String"""
2005 return _core_.ImageHandler_GetExtension(*args, **kwargs)
2006
2007 def GetType(*args, **kwargs):
2008 """GetType(self) -> long"""
2009 return _core_.ImageHandler_GetType(*args, **kwargs)
2010
2011 def GetMimeType(*args, **kwargs):
2012 """GetMimeType(self) -> String"""
2013 return _core_.ImageHandler_GetMimeType(*args, **kwargs)
2014
2015 def CanRead(*args, **kwargs):
2016 """CanRead(self, String name) -> bool"""
2017 return _core_.ImageHandler_CanRead(*args, **kwargs)
2018
2019 def CanReadStream(*args, **kwargs):
2020 """CanReadStream(self, InputStream stream) -> bool"""
2021 return _core_.ImageHandler_CanReadStream(*args, **kwargs)
2022
2023 def SetName(*args, **kwargs):
2024 """SetName(self, String name)"""
2025 return _core_.ImageHandler_SetName(*args, **kwargs)
2026
2027 def SetExtension(*args, **kwargs):
2028 """SetExtension(self, String extension)"""
2029 return _core_.ImageHandler_SetExtension(*args, **kwargs)
2030
2031 def SetType(*args, **kwargs):
2032 """SetType(self, long type)"""
2033 return _core_.ImageHandler_SetType(*args, **kwargs)
2034
2035 def SetMimeType(*args, **kwargs):
2036 """SetMimeType(self, String mimetype)"""
2037 return _core_.ImageHandler_SetMimeType(*args, **kwargs)
2038
2039 Extension = property(GetExtension,SetExtension,doc="See `GetExtension` and `SetExtension`")
2040 MimeType = property(GetMimeType,SetMimeType,doc="See `GetMimeType` and `SetMimeType`")
2041 Name = property(GetName,SetName,doc="See `GetName` and `SetName`")
2042 Type = property(GetType,SetType,doc="See `GetType` and `SetType`")
2043 _core_.ImageHandler_swigregister(ImageHandler)
2044
2045 class PyImageHandler(ImageHandler):
2046 """
2047 This is the base class for implementing image file loading/saving, and
2048 image creation from data, all written in Python. To create a custom
2049 image handler derive a new class from wx.PyImageHandler and provide
2050 the following methods::
2051
2052 def DoCanRead(self, stream) --> bool
2053 '''Check if this handler can read the image on the stream'''
2054
2055 def LoadFile(self, image, stream, verbose, index) --> bool
2056 '''Load image data from the stream and load it into image.'''
2057
2058 def SaveFile(self, image, stream, verbose) --> bool
2059 '''Save the iamge data in image to the stream using
2060 this handler's image file format.'''
2061
2062 def GetImageCount(self, stream) --> int
2063 '''If this image format can hold more than one image,
2064 how many does the image on the stream have?'''
2065
2066 To activate your handler create an instance of it and pass it to
2067 `wx.Image_AddHandler`. Be sure to call `SetName`, `SetType`, and
2068 `SetExtension` from your constructor.
2069
2070 """
2071 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
2072 __repr__ = _swig_repr
2073 def __init__(self, *args, **kwargs):
2074 """
2075 __init__(self) -> PyImageHandler
2076
2077 This is the base class for implementing image file loading/saving, and
2078 image creation from data, all written in Python. To create a custom
2079 image handler derive a new class from wx.PyImageHandler and provide
2080 the following methods::
2081
2082 def DoCanRead(self, stream) --> bool
2083 '''Check if this handler can read the image on the stream'''
2084
2085 def LoadFile(self, image, stream, verbose, index) --> bool
2086 '''Load image data from the stream and load it into image.'''
2087
2088 def SaveFile(self, image, stream, verbose) --> bool
2089 '''Save the iamge data in image to the stream using
2090 this handler's image file format.'''
2091
2092 def GetImageCount(self, stream) --> int
2093 '''If this image format can hold more than one image,
2094 how many does the image on the stream have?'''
2095
2096 To activate your handler create an instance of it and pass it to
2097 `wx.Image_AddHandler`. Be sure to call `SetName`, `SetType`, and
2098 `SetExtension` from your constructor.
2099
2100 """
2101 _core_.PyImageHandler_swiginit(self,_core_.new_PyImageHandler(*args, **kwargs))
2102 self._SetSelf(self)
2103
2104 def _SetSelf(*args, **kwargs):
2105 """_SetSelf(self, PyObject self)"""
2106 return _core_.PyImageHandler__SetSelf(*args, **kwargs)
2107
2108 _core_.PyImageHandler_swigregister(PyImageHandler)
2109
2110 class ImageHistogram(object):
2111 """Proxy of C++ ImageHistogram class"""
2112 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
2113 __repr__ = _swig_repr
2114 def __init__(self, *args, **kwargs):
2115 """__init__(self) -> ImageHistogram"""
2116 _core_.ImageHistogram_swiginit(self,_core_.new_ImageHistogram(*args, **kwargs))
2117 def MakeKey(*args, **kwargs):
2118 """
2119 MakeKey(byte r, byte g, byte b) -> unsigned long
2120
2121 Get the key in the histogram for the given RGB values
2122 """
2123 return _core_.ImageHistogram_MakeKey(*args, **kwargs)
2124
2125 MakeKey = staticmethod(MakeKey)
2126 def FindFirstUnusedColour(*args, **kwargs):
2127 """
2128 FindFirstUnusedColour(int startR=1, int startG=0, int startB=0) -> (success, r, g, b)
2129
2130 Find first colour that is not used in the image and has higher RGB
2131 values than startR, startG, startB. Returns a tuple consisting of a
2132 success flag and rgb values.
2133 """
2134 return _core_.ImageHistogram_FindFirstUnusedColour(*args, **kwargs)
2135
2136 def GetCount(*args, **kwargs):
2137 """
2138 GetCount(self, unsigned long key) -> unsigned long
2139
2140 Returns the pixel count for the given key. Use `MakeKey` to create a
2141 key value from a RGB tripple.
2142 """
2143 return _core_.ImageHistogram_GetCount(*args, **kwargs)
2144
2145 def GetCountRGB(*args, **kwargs):
2146 """
2147 GetCountRGB(self, byte r, byte g, byte b) -> unsigned long
2148
2149 Returns the pixel count for the given RGB values.
2150 """
2151 return _core_.ImageHistogram_GetCountRGB(*args, **kwargs)
2152
2153 def GetCountColour(*args, **kwargs):
2154 """
2155 GetCountColour(self, Colour colour) -> unsigned long
2156
2157 Returns the pixel count for the given `wx.Colour` value.
2158 """
2159 return _core_.ImageHistogram_GetCountColour(*args, **kwargs)
2160
2161 _core_.ImageHistogram_swigregister(ImageHistogram)
2162
2163 def ImageHistogram_MakeKey(*args, **kwargs):
2164 """
2165 ImageHistogram_MakeKey(byte r, byte g, byte b) -> unsigned long
2166
2167 Get the key in the histogram for the given RGB values
2168 """
2169 return _core_.ImageHistogram_MakeKey(*args, **kwargs)
2170
2171 class Image_RGBValue(object):
2172 """
2173 An object that contains values for red, green and blue which represent
2174 the value of a color. It is used by `wx.Image.HSVtoRGB` and
2175 `wx.Image.RGBtoHSV`, which converts between HSV color space and RGB
2176 color space.
2177 """
2178 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
2179 __repr__ = _swig_repr
2180 def __init__(self, *args, **kwargs):
2181 """
2182 __init__(self, byte r=0, byte g=0, byte b=0) -> Image_RGBValue
2183
2184 Constructor.
2185 """
2186 _core_.Image_RGBValue_swiginit(self,_core_.new_Image_RGBValue(*args, **kwargs))
2187 red = property(_core_.Image_RGBValue_red_get, _core_.Image_RGBValue_red_set)
2188 green = property(_core_.Image_RGBValue_green_get, _core_.Image_RGBValue_green_set)
2189 blue = property(_core_.Image_RGBValue_blue_get, _core_.Image_RGBValue_blue_set)
2190 _core_.Image_RGBValue_swigregister(Image_RGBValue)
2191
2192 class Image_HSVValue(object):
2193 """
2194 An object that contains values for hue, saturation and value which
2195 represent the value of a color. It is used by `wx.Image.HSVtoRGB` and
2196 `wx.Image.RGBtoHSV`, which +converts between HSV color space and RGB
2197 color space.
2198 """
2199 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
2200 __repr__ = _swig_repr
2201 def __init__(self, *args, **kwargs):
2202 """
2203 __init__(self, double h=0.0, double s=0.0, double v=0.0) -> Image_HSVValue
2204
2205 Constructor.
2206 """
2207 _core_.Image_HSVValue_swiginit(self,_core_.new_Image_HSVValue(*args, **kwargs))
2208 hue = property(_core_.Image_HSVValue_hue_get, _core_.Image_HSVValue_hue_set)
2209 saturation = property(_core_.Image_HSVValue_saturation_get, _core_.Image_HSVValue_saturation_set)
2210 value = property(_core_.Image_HSVValue_value_get, _core_.Image_HSVValue_value_set)
2211 _core_.Image_HSVValue_swigregister(Image_HSVValue)
2212
2213 class Image(Object):
2214 """
2215 A platform-independent image class. An image can be created from
2216 data, or using `wx.Bitmap.ConvertToImage`, or loaded from a file in a
2217 variety of formats. Functions are available to set and get image
2218 bits, so it can be used for basic image manipulation.
2219
2220 A wx.Image cannot be drawn directly to a `wx.DC`. Instead, a
2221 platform-specific `wx.Bitmap` object must be created from it using the
2222 `wx.BitmapFromImage` constructor. This bitmap can then be drawn in a
2223 device context, using `wx.DC.DrawBitmap`.
2224
2225 One colour value of the image may be used as a mask colour which will
2226 lead to the automatic creation of a `wx.Mask` object associated to the
2227 bitmap object.
2228
2229 wx.Image supports alpha channel data, that is in addition to a byte
2230 for the red, green and blue colour components for each pixel it also
2231 stores a byte representing the pixel opacity. An alpha value of 0
2232 corresponds to a transparent pixel (null opacity) while a value of 255
2233 means that the pixel is 100% opaque.
2234
2235 Unlike RGB data, not all images have an alpha channel and before using
2236 `GetAlpha` you should check if this image contains an alpha channel
2237 with `HasAlpha`. Note that currently only images loaded from PNG files
2238 with transparency information will have an alpha channel.
2239 """
2240 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
2241 __repr__ = _swig_repr
2242 def __init__(self, *args, **kwargs):
2243 """
2244 __init__(self, String name, long type=BITMAP_TYPE_ANY, int index=-1) -> Image
2245
2246 Loads an image from a file.
2247 """
2248 _core_.Image_swiginit(self,_core_.new_Image(*args, **kwargs))
2249 __swig_destroy__ = _core_.delete_Image
2250 __del__ = lambda self : None;
2251 def Create(*args, **kwargs):
2252 """
2253 Create(self, int width, int height, bool clear=True)
2254
2255 Creates a fresh image. If clear is ``True``, the new image will be
2256 initialized to black. Otherwise, the image data will be uninitialized.
2257 """
2258 return _core_.Image_Create(*args, **kwargs)
2259
2260 def Destroy(*args, **kwargs):
2261 """
2262 Destroy(self)
2263
2264 Destroys the image data.
2265 """
2266 val = _core_.Image_Destroy(*args, **kwargs)
2267 args[0].thisown = 0
2268 return val
2269
2270 def Scale(*args, **kwargs):
2271 """
2272 Scale(self, int width, int height) -> Image
2273
2274 Returns a scaled version of the image. This is also useful for scaling
2275 bitmaps in general as the only other way to scale bitmaps is to blit a
2276 `wx.MemoryDC` into another `wx.MemoryDC`.
2277 """
2278 return _core_.Image_Scale(*args, **kwargs)
2279
2280 def ShrinkBy(*args, **kwargs):
2281 """
2282 ShrinkBy(self, int xFactor, int yFactor) -> Image
2283
2284 Return a version of the image scaled smaller by the given factors.
2285 """
2286 return _core_.Image_ShrinkBy(*args, **kwargs)
2287
2288 def Rescale(*args, **kwargs):
2289 """
2290 Rescale(self, int width, int height) -> Image
2291
2292 Changes the size of the image in-place by scaling it: after a call to
2293 this function, the image will have the given width and height.
2294
2295 Returns the (modified) image itself.
2296 """
2297 return _core_.Image_Rescale(*args, **kwargs)
2298
2299 def Resize(*args, **kwargs):
2300 """
2301 Resize(self, Size size, Point pos, int r=-1, int g=-1, int b=-1) -> Image
2302
2303 Changes the size of the image in-place without scaling it, by adding
2304 either a border with the given colour or cropping as necessary. The
2305 image is pasted into a new image with the given size and background
2306 colour at the position pos relative to the upper left of the new
2307 image. If red = green = blue = -1 then use either the current mask
2308 colour if set or find, use, and set a suitable mask colour for any
2309 newly exposed areas.
2310
2311 Returns the (modified) image itself.
2312 """
2313 return _core_.Image_Resize(*args, **kwargs)
2314
2315 def SetRGB(*args, **kwargs):
2316 """
2317 SetRGB(self, int x, int y, byte r, byte g, byte b)
2318
2319 Sets the pixel at the given coordinate. This routine performs
2320 bounds-checks for the coordinate so it can be considered a safe way to
2321 manipulate the data, but in some cases this might be too slow so that
2322 the data will have to be set directly. In that case you will have to
2323 get access to the image data using the `GetData` method.
2324 """
2325 return _core_.Image_SetRGB(*args, **kwargs)
2326
2327 def SetRGBRect(*args, **kwargs):
2328 """
2329 SetRGBRect(self, Rect rect, byte r, byte g, byte b)
2330
2331 Sets the colour of the pixels within the given rectangle. This routine
2332 performs bounds-checks for the rectangle so it can be considered a
2333 safe way to manipulate the data.
2334 """
2335 return _core_.Image_SetRGBRect(*args, **kwargs)
2336
2337 def GetRed(*args, **kwargs):
2338 """
2339 GetRed(self, int x, int y) -> byte
2340
2341 Returns the red intensity at the given coordinate.
2342 """
2343 return _core_.Image_GetRed(*args, **kwargs)
2344
2345 def GetGreen(*args, **kwargs):
2346 """
2347 GetGreen(self, int x, int y) -> byte
2348
2349 Returns the green intensity at the given coordinate.
2350 """
2351 return _core_.Image_GetGreen(*args, **kwargs)
2352
2353 def GetBlue(*args, **kwargs):
2354 """
2355 GetBlue(self, int x, int y) -> byte
2356
2357 Returns the blue intensity at the given coordinate.
2358 """
2359 return _core_.Image_GetBlue(*args, **kwargs)
2360
2361 def SetAlpha(*args, **kwargs):
2362 """
2363 SetAlpha(self, int x, int y, byte alpha)
2364
2365 Sets the alpha value for the given pixel. This function should only be
2366 called if the image has alpha channel data, use `HasAlpha` to check
2367 for this.
2368 """
2369 return _core_.Image_SetAlpha(*args, **kwargs)
2370
2371 def GetAlpha(*args, **kwargs):
2372 """
2373 GetAlpha(self, int x, int y) -> byte
2374
2375 Returns the alpha value for the given pixel. This function may only be
2376 called for the images with alpha channel, use `HasAlpha` to check for
2377 this.
2378
2379 The returned value is the *opacity* of the image, i.e. the value of 0
2380 corresponds to the fully transparent pixels while the value of 255 to
2381 the fully opaque pixels.
2382 """
2383 return _core_.Image_GetAlpha(*args, **kwargs)
2384
2385 def HasAlpha(*args, **kwargs):
2386 """
2387 HasAlpha(self) -> bool
2388
2389 Returns true if this image has alpha channel, false otherwise.
2390 """
2391 return _core_.Image_HasAlpha(*args, **kwargs)
2392
2393 def InitAlpha(*args, **kwargs):
2394 """
2395 InitAlpha(self)
2396
2397 Initializes the image alpha channel data. It is an error to call it if
2398 the image already has alpha data. If it doesn't, alpha data will be by
2399 default initialized to all pixels being fully opaque. But if the image
2400 has a a mask colour, all mask pixels will be completely transparent.
2401 """
2402 return _core_.Image_InitAlpha(*args, **kwargs)
2403
2404 def IsTransparent(*args, **kwargs):
2405 """
2406 IsTransparent(self, int x, int y, byte threshold=IMAGE_ALPHA_THRESHOLD) -> bool
2407
2408 Returns ``True`` if this pixel is masked or has an alpha value less
2409 than the spcified threshold.
2410 """
2411 return _core_.Image_IsTransparent(*args, **kwargs)
2412
2413 def FindFirstUnusedColour(*args, **kwargs):
2414 """
2415 FindFirstUnusedColour(int startR=1, int startG=0, int startB=0) -> (success, r, g, b)
2416
2417 Find first colour that is not used in the image and has higher RGB
2418 values than startR, startG, startB. Returns a tuple consisting of a
2419 success flag and rgb values.
2420 """
2421 return _core_.Image_FindFirstUnusedColour(*args, **kwargs)
2422
2423 def ConvertAlphaToMask(*args, **kwargs):
2424 """
2425 ConvertAlphaToMask(self, byte threshold=IMAGE_ALPHA_THRESHOLD) -> bool
2426
2427 If the image has alpha channel, this method converts it to mask. All
2428 pixels with alpha value less than ``threshold`` are replaced with the
2429 mask colour and the alpha channel is removed. The mask colour is
2430 chosen automatically using `FindFirstUnusedColour`.
2431
2432 If the image image doesn't have alpha channel, ConvertAlphaToMask does
2433 nothing.
2434 """
2435 return _core_.Image_ConvertAlphaToMask(*args, **kwargs)
2436
2437 def ConvertColourToAlpha(*args, **kwargs):
2438 """
2439 ConvertColourToAlpha(self, byte r, byte g, byte b) -> bool
2440
2441 This method converts an image where the original alpha information is
2442 only available as a shades of a colour (actually shades of grey)
2443 typically when you draw anti-aliased text into a bitmap. The DC
2444 drawing routines draw grey values on the black background although
2445 they actually mean to draw white with differnt alpha values. This
2446 method reverses it, assuming a black (!) background and white text.
2447 The method will then fill up the whole image with the colour given.
2448 """
2449 return _core_.Image_ConvertColourToAlpha(*args, **kwargs)
2450
2451 def SetMaskFromImage(*args, **kwargs):
2452 """
2453 SetMaskFromImage(self, Image mask, byte mr, byte mg, byte mb) -> bool
2454
2455 Sets the image's mask so that the pixels that have RGB value of
2456 ``(mr,mg,mb)`` in ``mask`` will be masked in this image. This is done
2457 by first finding an unused colour in the image, setting this colour as
2458 the mask colour and then using this colour to draw all pixels in the
2459 image who corresponding pixel in mask has given RGB value.
2460
2461 Returns ``False`` if ``mask`` does not have same dimensions as the
2462 image or if there is no unused colour left. Returns ``True`` if the
2463 mask was successfully applied.
2464
2465 Note that this method involves computing the histogram, which is
2466 computationally intensive operation.
2467 """
2468 return _core_.Image_SetMaskFromImage(*args, **kwargs)
2469
2470 def CanRead(*args, **kwargs):
2471 """
2472 CanRead(String filename) -> bool
2473
2474 Returns True if the image handlers can read this file.
2475 """
2476 return _core_.Image_CanRead(*args, **kwargs)
2477
2478 CanRead = staticmethod(CanRead)
2479 def GetImageCount(*args, **kwargs):
2480 """
2481 GetImageCount(String filename, long type=BITMAP_TYPE_ANY) -> int
2482
2483 If the image file contains more than one image and the image handler
2484 is capable of retrieving these individually, this function will return
2485 the number of available images.
2486 """
2487 return _core_.Image_GetImageCount(*args, **kwargs)
2488
2489 GetImageCount = staticmethod(GetImageCount)
2490 def LoadFile(*args, **kwargs):
2491 """
2492 LoadFile(self, String name, long type=BITMAP_TYPE_ANY, int index=-1) -> bool
2493
2494 Loads an image from a file. If no handler type is provided, the
2495 library will try to autodetect the format.
2496 """
2497 return _core_.Image_LoadFile(*args, **kwargs)
2498
2499 def LoadMimeFile(*args, **kwargs):
2500 """
2501 LoadMimeFile(self, String name, String mimetype, int index=-1) -> bool
2502
2503 Loads an image from a file, specifying the image type with a MIME type
2504 string.
2505 """
2506 return _core_.Image_LoadMimeFile(*args, **kwargs)
2507
2508 def SaveFile(*args, **kwargs):
2509 """
2510 SaveFile(self, String name, int type) -> bool
2511
2512 Saves an image in the named file.
2513 """
2514 return _core_.Image_SaveFile(*args, **kwargs)
2515
2516 def SaveMimeFile(*args, **kwargs):
2517 """
2518 SaveMimeFile(self, String name, String mimetype) -> bool
2519
2520 Saves an image in the named file.
2521 """
2522 return _core_.Image_SaveMimeFile(*args, **kwargs)
2523
2524 def CanReadStream(*args, **kwargs):
2525 """
2526 CanReadStream(InputStream stream) -> bool
2527
2528 Returns True if the image handlers can read an image file from the
2529 data currently on the input stream, or a readable Python file-like
2530 object.
2531 """
2532 return _core_.Image_CanReadStream(*args, **kwargs)
2533
2534 CanReadStream = staticmethod(CanReadStream)
2535 def LoadStream(*args, **kwargs):
2536 """
2537 LoadStream(self, InputStream stream, long type=BITMAP_TYPE_ANY, int index=-1) -> bool
2538
2539 Loads an image from an input stream or a readable Python file-like
2540 object. If no handler type is provided, the library will try to
2541 autodetect the format.
2542 """
2543 return _core_.Image_LoadStream(*args, **kwargs)
2544
2545 def LoadMimeStream(*args, **kwargs):
2546 """
2547 LoadMimeStream(self, InputStream stream, String mimetype, int index=-1) -> bool
2548
2549 Loads an image from an input stream or a readable Python file-like
2550 object, using a MIME type string to specify the image file format.
2551 """
2552 return _core_.Image_LoadMimeStream(*args, **kwargs)
2553
2554 def Ok(*args, **kwargs):
2555 """
2556 Ok(self) -> bool
2557
2558 Returns true if image data is present.
2559 """
2560 return _core_.Image_Ok(*args, **kwargs)
2561
2562 def GetWidth(*args, **kwargs):
2563 """
2564 GetWidth(self) -> int
2565
2566 Gets the width of the image in pixels.
2567 """
2568 return _core_.Image_GetWidth(*args, **kwargs)
2569
2570 def GetHeight(*args, **kwargs):
2571 """
2572 GetHeight(self) -> int
2573
2574 Gets the height of the image in pixels.
2575 """
2576 return _core_.Image_GetHeight(*args, **kwargs)
2577
2578 def GetSize(*args, **kwargs):
2579 """
2580 GetSize(self) -> Size
2581
2582 Returns the size of the image in pixels.
2583 """
2584 return _core_.Image_GetSize(*args, **kwargs)
2585
2586 def GetSubImage(*args, **kwargs):
2587 """
2588 GetSubImage(self, Rect rect) -> Image
2589
2590 Returns a sub image of the current one as long as the rect belongs
2591 entirely to the image.
2592 """
2593 return _core_.Image_GetSubImage(*args, **kwargs)
2594
2595 def Size(*args, **kwargs):
2596 """
2597 Size(self, Size size, Point pos, int r=-1, int g=-1, int b=-1) -> Image
2598
2599 Returns a resized version of this image without scaling it by adding
2600 either a border with the given colour or cropping as necessary. The
2601 image is pasted into a new image with the given size and background
2602 colour at the position ``pos`` relative to the upper left of the new
2603 image. If red = green = blue = -1 then use either the current mask
2604 colour if set or find, use, and set a suitable mask colour for any
2605 newly exposed areas.
2606 """
2607 return _core_.Image_Size(*args, **kwargs)
2608
2609 def Copy(*args, **kwargs):
2610 """
2611 Copy(self) -> Image
2612
2613 Returns an identical copy of the image.
2614 """
2615 return _core_.Image_Copy(*args, **kwargs)
2616
2617 def Paste(*args, **kwargs):
2618 """
2619 Paste(self, Image image, int x, int y)
2620
2621 Pastes ``image`` into this instance and takes care of the mask colour
2622 and any out of bounds problems.
2623 """
2624 return _core_.Image_Paste(*args, **kwargs)
2625
2626 def GetData(*args, **kwargs):
2627 """
2628 GetData(self) -> PyObject
2629
2630 Returns a string containing a copy of the RGB bytes of the image.
2631 """
2632 return _core_.Image_GetData(*args, **kwargs)
2633
2634 def SetData(*args, **kwargs):
2635 """
2636 SetData(self, buffer data)
2637
2638 Resets the Image's RGB data from a buffer of RGB bytes. Accepts
2639 either a string or a buffer object holding the data and the length of
2640 the data must be width*height*3.
2641 """
2642 return _core_.Image_SetData(*args, **kwargs)
2643
2644 def GetDataBuffer(*args, **kwargs):
2645 """
2646 GetDataBuffer(self) -> PyObject
2647
2648 Returns a writable Python buffer object that is pointing at the RGB
2649 image data buffer inside the wx.Image. You need to ensure that you do
2650 not use this buffer object after the image has been destroyed.
2651 """
2652 return _core_.Image_GetDataBuffer(*args, **kwargs)
2653
2654 def SetDataBuffer(*args, **kwargs):
2655 """
2656 SetDataBuffer(self, buffer data)
2657
2658 Sets the internal image data pointer to point at a Python buffer
2659 object. This can save making an extra copy of the data but you must
2660 ensure that the buffer object lives longer than the wx.Image does.
2661 """
2662 return _core_.Image_SetDataBuffer(*args, **kwargs)
2663
2664 def GetAlphaData(*args, **kwargs):
2665 """
2666 GetAlphaData(self) -> PyObject
2667
2668 Returns a string containing a copy of the alpha bytes of the image.
2669 """
2670 return _core_.Image_GetAlphaData(*args, **kwargs)
2671
2672 def SetAlphaData(*args, **kwargs):
2673 """
2674 SetAlphaData(self, buffer alpha)
2675
2676 Resets the Image's alpha data from a buffer of bytes. Accepts either
2677 a string or a buffer object holding the data and the length of the
2678 data must be width*height.
2679 """
2680 return _core_.Image_SetAlphaData(*args, **kwargs)
2681
2682 def GetAlphaBuffer(*args, **kwargs):
2683 """
2684 GetAlphaBuffer(self) -> PyObject
2685
2686 Returns a writable Python buffer object that is pointing at the Alpha
2687 data buffer inside the wx.Image. You need to ensure that you do not
2688 use this buffer object after the image has been destroyed.
2689 """
2690 return _core_.Image_GetAlphaBuffer(*args, **kwargs)
2691
2692 def SetAlphaBuffer(*args, **kwargs):
2693 """
2694 SetAlphaBuffer(self, buffer alpha)
2695
2696 Sets the internal image alpha pointer to point at a Python buffer
2697 object. This can save making an extra copy of the data but you must
2698 ensure that the buffer object lives as long as the wx.Image does.
2699 """
2700 return _core_.Image_SetAlphaBuffer(*args, **kwargs)
2701
2702 def SetMaskColour(*args, **kwargs):
2703 """
2704 SetMaskColour(self, byte r, byte g, byte b)
2705
2706 Sets the mask colour for this image (and tells the image to use the
2707 mask).
2708 """
2709 return _core_.Image_SetMaskColour(*args, **kwargs)
2710
2711 def GetOrFindMaskColour(*args, **kwargs):
2712 """
2713 GetOrFindMaskColour() -> (r,g,b)
2714
2715 Get the current mask colour or find a suitable colour.
2716 """
2717 return _core_.Image_GetOrFindMaskColour(*args, **kwargs)
2718
2719 def GetMaskRed(*args, **kwargs):
2720 """
2721 GetMaskRed(self) -> byte
2722
2723 Gets the red component of the mask colour.
2724 """
2725 return _core_.Image_GetMaskRed(*args, **kwargs)
2726
2727 def GetMaskGreen(*args, **kwargs):
2728 """
2729 GetMaskGreen(self) -> byte
2730
2731 Gets the green component of the mask colour.
2732 """
2733 return _core_.Image_GetMaskGreen(*args, **kwargs)
2734
2735 def GetMaskBlue(*args, **kwargs):
2736 """
2737 GetMaskBlue(self) -> byte
2738
2739 Gets the blue component of the mask colour.
2740 """
2741 return _core_.Image_GetMaskBlue(*args, **kwargs)
2742
2743 def SetMask(*args, **kwargs):
2744 """
2745 SetMask(self, bool mask=True)
2746
2747 Specifies whether there is a mask or not. The area of the mask is
2748 determined by the current mask colour.
2749 """
2750 return _core_.Image_SetMask(*args, **kwargs)
2751
2752 def HasMask(*args, **kwargs):
2753 """
2754 HasMask(self) -> bool
2755
2756 Returns ``True`` if there is a mask active, ``False`` otherwise.
2757 """
2758 return _core_.Image_HasMask(*args, **kwargs)
2759
2760 def Rotate(*args, **kwargs):
2761 """
2762 Rotate(self, double angle, Point centre_of_rotation, bool interpolating=True,
2763 Point offset_after_rotation=None) -> Image
2764
2765 Rotates the image about the given point, by ``angle`` radians. Passing
2766 ``True`` to ``interpolating`` results in better image quality, but is
2767 slower. If the image has a mask, then the mask colour is used for the
2768 uncovered pixels in the rotated image background. Otherwise, black
2769 will be used as the fill colour.
2770
2771 Returns the rotated image, leaving this image intact.
2772 """
2773 return _core_.Image_Rotate(*args, **kwargs)
2774
2775 def Rotate90(*args, **kwargs):
2776 """
2777 Rotate90(self, bool clockwise=True) -> Image
2778
2779 Returns a copy of the image rotated 90 degrees in the direction
2780 indicated by ``clockwise``.
2781 """
2782 return _core_.Image_Rotate90(*args, **kwargs)
2783
2784 def Mirror(*args, **kwargs):
2785 """
2786 Mirror(self, bool horizontally=True) -> Image
2787
2788 Returns a mirrored copy of the image. The parameter ``horizontally``
2789 indicates the orientation.
2790 """
2791 return _core_.Image_Mirror(*args, **kwargs)
2792
2793 def Replace(*args, **kwargs):
2794 """
2795 Replace(self, byte r1, byte g1, byte b1, byte r2, byte g2, byte b2)
2796
2797 Replaces the colour specified by ``(r1,g1,b1)`` by the colour
2798 ``(r2,g2,b2)``.
2799 """
2800 return _core_.Image_Replace(*args, **kwargs)
2801
2802 def ConvertToGreyscale(*args, **kwargs):
2803 """
2804 ConvertToGreyscale(self, double lr=0.299, double lg=0.587, double lb=0.114) -> Image
2805
2806 Convert to greyscale image. Uses the luminance component (Y) of the
2807 image. The luma value (YUV) is calculated using (R * lr) + (G * lg) + (B * lb),
2808 defaults to ITU-T BT.601
2809 """
2810 return _core_.Image_ConvertToGreyscale(*args, **kwargs)
2811
2812 def ConvertToMono(*args, **kwargs):
2813 """
2814 ConvertToMono(self, byte r, byte g, byte b) -> Image
2815
2816 Returns monochromatic version of the image. The returned image has
2817 white colour where the original has ``(r,g,b)`` colour and black
2818 colour everywhere else.
2819 """
2820 return _core_.Image_ConvertToMono(*args, **kwargs)
2821
2822 def SetOption(*args, **kwargs):
2823 """
2824 SetOption(self, String name, String value)
2825
2826 Sets an image handler defined option. For example, when saving as a
2827 JPEG file, the option ``wx.IMAGE_OPTION_QUALITY`` is used, which is a
2828 number between 0 and 100 (0 is terrible, 100 is very good).
2829 """
2830 return _core_.Image_SetOption(*args, **kwargs)
2831
2832 def SetOptionInt(*args, **kwargs):
2833 """
2834 SetOptionInt(self, String name, int value)
2835
2836 Sets an image option as an integer.
2837 """
2838 return _core_.Image_SetOptionInt(*args, **kwargs)
2839
2840 def GetOption(*args, **kwargs):
2841 """
2842 GetOption(self, String name) -> String
2843
2844 Gets the value of an image handler option.
2845 """
2846 return _core_.Image_GetOption(*args, **kwargs)
2847
2848 def GetOptionInt(*args, **kwargs):
2849 """
2850 GetOptionInt(self, String name) -> int
2851
2852 Gets the value of an image handler option as an integer. If the given
2853 option is not present, the function returns 0.
2854 """
2855 return _core_.Image_GetOptionInt(*args, **kwargs)
2856
2857 def HasOption(*args, **kwargs):
2858 """
2859 HasOption(self, String name) -> bool
2860
2861 Returns true if the given option is present.
2862 """
2863 return _core_.Image_HasOption(*args, **kwargs)
2864
2865 def CountColours(*args, **kwargs):
2866 """CountColours(self, unsigned long stopafter=(unsigned long) -1) -> unsigned long"""
2867 return _core_.Image_CountColours(*args, **kwargs)
2868
2869 def ComputeHistogram(*args, **kwargs):
2870 """ComputeHistogram(self, ImageHistogram h) -> unsigned long"""
2871 return _core_.Image_ComputeHistogram(*args, **kwargs)
2872
2873 def AddHandler(*args, **kwargs):
2874 """AddHandler(ImageHandler handler)"""
2875 return _core_.Image_AddHandler(*args, **kwargs)
2876
2877 AddHandler = staticmethod(AddHandler)
2878 def InsertHandler(*args, **kwargs):
2879 """InsertHandler(ImageHandler handler)"""
2880 return _core_.Image_InsertHandler(*args, **kwargs)
2881
2882 InsertHandler = staticmethod(InsertHandler)
2883 def RemoveHandler(*args, **kwargs):
2884 """RemoveHandler(String name) -> bool"""
2885 return _core_.Image_RemoveHandler(*args, **kwargs)
2886
2887 RemoveHandler = staticmethod(RemoveHandler)
2888 def GetHandlers(*args, **kwargs):
2889 """GetHandlers() -> PyObject"""
2890 return _core_.Image_GetHandlers(*args, **kwargs)
2891
2892 GetHandlers = staticmethod(GetHandlers)
2893 def GetImageExtWildcard(*args, **kwargs):
2894 """
2895 GetImageExtWildcard() -> String
2896
2897 Iterates all registered wxImageHandler objects, and returns a string
2898 containing file extension masks suitable for passing to file open/save
2899 dialog boxes.
2900 """
2901 return _core_.Image_GetImageExtWildcard(*args, **kwargs)
2902
2903 GetImageExtWildcard = staticmethod(GetImageExtWildcard)
2904 def ConvertToBitmap(*args, **kwargs):
2905 """ConvertToBitmap(self, int depth=-1) -> Bitmap"""
2906 return _core_.Image_ConvertToBitmap(*args, **kwargs)
2907
2908 def ConvertToMonoBitmap(*args, **kwargs):
2909 """ConvertToMonoBitmap(self, byte red, byte green, byte blue) -> Bitmap"""
2910 return _core_.Image_ConvertToMonoBitmap(*args, **kwargs)
2911
2912 def RotateHue(*args, **kwargs):
2913 """
2914 RotateHue(self, double angle)
2915
2916 Rotates the hue of each pixel of the image. Hue is a double in the
2917 range -1.0..1.0 where -1.0 is -360 degrees and 1.0 is 360 degrees
2918 """
2919 return _core_.Image_RotateHue(*args, **kwargs)
2920
2921 def RGBtoHSV(*args, **kwargs):
2922 """
2923 RGBtoHSV(Image_RGBValue rgb) -> Image_HSVValue
2924
2925 Converts a color in RGB color space to HSV color space.
2926 """
2927 return _core_.Image_RGBtoHSV(*args, **kwargs)
2928
2929 RGBtoHSV = staticmethod(RGBtoHSV)
2930 def HSVtoRGB(*args, **kwargs):
2931 """
2932 HSVtoRGB(Image_HSVValue hsv) -> Image_RGBValue
2933
2934 Converts a color in HSV color space to RGB color space.
2935 """
2936 return _core_.Image_HSVtoRGB(*args, **kwargs)
2937
2938 HSVtoRGB = staticmethod(HSVtoRGB)
2939 def __nonzero__(self): return self.Ok()
2940 AlphaBuffer = property(GetAlphaBuffer,SetAlphaBuffer,doc="See `GetAlphaBuffer` and `SetAlphaBuffer`")
2941 AlphaData = property(GetAlphaData,SetAlphaData,doc="See `GetAlphaData` and `SetAlphaData`")
2942 Data = property(GetData,SetData,doc="See `GetData` and `SetData`")
2943 DataBuffer = property(GetDataBuffer,SetDataBuffer,doc="See `GetDataBuffer` and `SetDataBuffer`")
2944 Height = property(GetHeight,doc="See `GetHeight`")
2945 MaskBlue = property(GetMaskBlue,doc="See `GetMaskBlue`")
2946 MaskGreen = property(GetMaskGreen,doc="See `GetMaskGreen`")
2947 MaskRed = property(GetMaskRed,doc="See `GetMaskRed`")
2948 Size = property(GetSize,doc="See `GetSize`")
2949 Width = property(GetWidth,doc="See `GetWidth`")
2950 _core_.Image_swigregister(Image)
2951
2952 def ImageFromMime(*args, **kwargs):
2953 """
2954 ImageFromMime(String name, String mimetype, int index=-1) -> Image
2955
2956 Loads an image from a file, using a MIME type string (such as
2957 'image/jpeg') to specify image type.
2958 """
2959 val = _core_.new_ImageFromMime(*args, **kwargs)
2960 return val
2961
2962 def ImageFromStream(*args, **kwargs):
2963 """
2964 ImageFromStream(InputStream stream, long type=BITMAP_TYPE_ANY, int index=-1) -> Image
2965
2966 Loads an image from an input stream, or any readable Python file-like
2967 object.
2968 """
2969 val = _core_.new_ImageFromStream(*args, **kwargs)
2970 return val
2971
2972 def ImageFromStreamMime(*args, **kwargs):
2973 """
2974 ImageFromStreamMime(InputStream stream, String mimetype, int index=-1) -> Image
2975
2976 Loads an image from an input stream, or any readable Python file-like
2977 object, specifying the image format with a MIME type string.
2978 """
2979 val = _core_.new_ImageFromStreamMime(*args, **kwargs)
2980 return val
2981
2982 def EmptyImage(*args, **kwargs):
2983 """
2984 EmptyImage(int width=0, int height=0, bool clear=True) -> Image
2985
2986 Construct an empty image of a given size, optionally setting all
2987 pixels to black.
2988 """
2989 val = _core_.new_EmptyImage(*args, **kwargs)
2990 return val
2991
2992 def ImageFromBitmap(*args, **kwargs):
2993 """
2994 ImageFromBitmap(Bitmap bitmap) -> Image
2995
2996 Construct an Image from a `wx.Bitmap`.
2997 """
2998 val = _core_.new_ImageFromBitmap(*args, **kwargs)
2999 return val
3000
3001 def ImageFromData(*args, **kwargs):
3002 """
3003 ImageFromData(int width, int height, buffer data) -> Image
3004
3005 Construct an Image from a buffer of RGB bytes. Accepts either a
3006 string or a buffer object holding the data and the length of the data
3007 must be width*height*3.
3008 """
3009 val = _core_.new_ImageFromData(*args, **kwargs)
3010 return val
3011
3012 def ImageFromDataWithAlpha(*args, **kwargs):
3013 """
3014 ImageFromDataWithAlpha(int width, int height, buffer data, buffer alpha) -> Image
3015
3016 Construct an Image from a buffer of RGB bytes with an Alpha channel.
3017 Accepts either a string or a buffer object holding the data and the
3018 length of the data must be width*height*3 bytes, and the length of the
3019 alpha data must be width*height bytes.
3020 """
3021 val = _core_.new_ImageFromDataWithAlpha(*args, **kwargs)
3022 return val
3023
3024 def Image_CanRead(*args, **kwargs):
3025 """
3026 Image_CanRead(String filename) -> bool
3027
3028 Returns True if the image handlers can read this file.
3029 """
3030 return _core_.Image_CanRead(*args, **kwargs)
3031
3032 def Image_GetImageCount(*args, **kwargs):
3033 """
3034 Image_GetImageCount(String filename, long type=BITMAP_TYPE_ANY) -> int
3035
3036 If the image file contains more than one image and the image handler
3037 is capable of retrieving these individually, this function will return
3038 the number of available images.
3039 """
3040 return _core_.Image_GetImageCount(*args, **kwargs)
3041
3042 def Image_CanReadStream(*args, **kwargs):
3043 """
3044 Image_CanReadStream(InputStream stream) -> bool
3045
3046 Returns True if the image handlers can read an image file from the
3047 data currently on the input stream, or a readable Python file-like
3048 object.
3049 """
3050 return _core_.Image_CanReadStream(*args, **kwargs)
3051
3052 def Image_AddHandler(*args, **kwargs):
3053 """Image_AddHandler(ImageHandler handler)"""
3054 return _core_.Image_AddHandler(*args, **kwargs)
3055
3056 def Image_InsertHandler(*args, **kwargs):
3057 """Image_InsertHandler(ImageHandler handler)"""
3058 return _core_.Image_InsertHandler(*args, **kwargs)
3059
3060 def Image_RemoveHandler(*args, **kwargs):
3061 """Image_RemoveHandler(String name) -> bool"""
3062 return _core_.Image_RemoveHandler(*args, **kwargs)
3063
3064 def Image_GetHandlers(*args):
3065 """Image_GetHandlers() -> PyObject"""
3066 return _core_.Image_GetHandlers(*args)
3067
3068 def Image_GetImageExtWildcard(*args):
3069 """
3070 Image_GetImageExtWildcard() -> String
3071
3072 Iterates all registered wxImageHandler objects, and returns a string
3073 containing file extension masks suitable for passing to file open/save
3074 dialog boxes.
3075 """
3076 return _core_.Image_GetImageExtWildcard(*args)
3077
3078 def Image_RGBtoHSV(*args, **kwargs):
3079 """
3080 Image_RGBtoHSV(Image_RGBValue rgb) -> Image_HSVValue
3081
3082 Converts a color in RGB color space to HSV color space.
3083 """
3084 return _core_.Image_RGBtoHSV(*args, **kwargs)
3085
3086 def Image_HSVtoRGB(*args, **kwargs):
3087 """
3088 Image_HSVtoRGB(Image_HSVValue hsv) -> Image_RGBValue
3089
3090 Converts a color in HSV color space to RGB color space.
3091 """
3092 return _core_.Image_HSVtoRGB(*args, **kwargs)
3093
3094
3095 def _ImageFromBuffer(*args, **kwargs):
3096 """_ImageFromBuffer(int width, int height, buffer data, buffer alpha=None) -> Image"""
3097 return _core_._ImageFromBuffer(*args, **kwargs)
3098 def ImageFromBuffer(width, height, dataBuffer, alphaBuffer=None):
3099 """
3100 Creates a `wx.Image` from the data in dataBuffer. The dataBuffer
3101 parameter must be a Python object that implements the buffer interface,
3102 such as a string, array, etc. The dataBuffer object is expected to
3103 contain a series of RGB bytes and be width*height*3 bytes long. A buffer
3104 object can optionally be supplied for the image's alpha channel data, and
3105 it is expected to be width*height bytes long.
3106
3107 The wx.Image will be created with its data and alpha pointers initialized
3108 to the memory address pointed to by the buffer objects, thus saving the
3109 time needed to copy the image data from the buffer object to the wx.Image.
3110 While this has advantages, it also has the shoot-yourself-in-the-foot
3111 risks associated with sharing a C pointer between two objects.
3112
3113 To help alleviate the risk a reference to the data and alpha buffer
3114 objects are kept with the wx.Image, so that they won't get deleted until
3115 after the wx.Image is deleted. However please be aware that it is not
3116 guaranteed that an object won't move its memory buffer to a new location
3117 when it needs to resize its contents. If that happens then the wx.Image
3118 will end up referring to an invalid memory location and could cause the
3119 application to crash. Therefore care should be taken to not manipulate
3120 the objects used for the data and alpha buffers in a way that would cause
3121 them to change size.
3122 """
3123 image = _core_._ImageFromBuffer(width, height, dataBuffer, alphaBuffer)
3124 image._buffer = dataBuffer
3125 image._alpha = alphaBuffer
3126 return image
3127
3128 def InitAllImageHandlers():
3129 """
3130 The former functionality of InitAllImageHanders is now done internal to
3131 the _core_ extension module and so this function has become a simple NOP.
3132 """
3133 pass
3134
3135 IMAGE_RESOLUTION_INCHES = _core_.IMAGE_RESOLUTION_INCHES
3136 IMAGE_RESOLUTION_CM = _core_.IMAGE_RESOLUTION_CM
3137 PNG_TYPE_COLOUR = _core_.PNG_TYPE_COLOUR
3138 PNG_TYPE_GREY = _core_.PNG_TYPE_GREY
3139 PNG_TYPE_GREY_RED = _core_.PNG_TYPE_GREY_RED
3140 BMP_24BPP = _core_.BMP_24BPP
3141 BMP_8BPP = _core_.BMP_8BPP
3142 BMP_8BPP_GREY = _core_.BMP_8BPP_GREY
3143 BMP_8BPP_GRAY = _core_.BMP_8BPP_GRAY
3144 BMP_8BPP_RED = _core_.BMP_8BPP_RED
3145 BMP_8BPP_PALETTE = _core_.BMP_8BPP_PALETTE
3146 BMP_4BPP = _core_.BMP_4BPP
3147 BMP_1BPP = _core_.BMP_1BPP
3148 BMP_1BPP_BW = _core_.BMP_1BPP_BW
3149 class BMPHandler(ImageHandler):
3150 """A `wx.ImageHandler` for \*.bmp bitmap files."""
3151 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
3152 __repr__ = _swig_repr
3153 def __init__(self, *args, **kwargs):
3154 """
3155 __init__(self) -> BMPHandler
3156
3157 A `wx.ImageHandler` for \*.bmp bitmap files.
3158 """
3159 _core_.BMPHandler_swiginit(self,_core_.new_BMPHandler(*args, **kwargs))
3160 _core_.BMPHandler_swigregister(BMPHandler)
3161 NullImage = cvar.NullImage
3162 IMAGE_OPTION_FILENAME = cvar.IMAGE_OPTION_FILENAME
3163 IMAGE_OPTION_BMP_FORMAT = cvar.IMAGE_OPTION_BMP_FORMAT
3164 IMAGE_OPTION_CUR_HOTSPOT_X = cvar.IMAGE_OPTION_CUR_HOTSPOT_X
3165 IMAGE_OPTION_CUR_HOTSPOT_Y = cvar.IMAGE_OPTION_CUR_HOTSPOT_Y
3166 IMAGE_OPTION_RESOLUTION = cvar.IMAGE_OPTION_RESOLUTION
3167 IMAGE_OPTION_RESOLUTIONX = cvar.IMAGE_OPTION_RESOLUTIONX
3168 IMAGE_OPTION_RESOLUTIONY = cvar.IMAGE_OPTION_RESOLUTIONY
3169 IMAGE_OPTION_RESOLUTIONUNIT = cvar.IMAGE_OPTION_RESOLUTIONUNIT
3170 IMAGE_OPTION_QUALITY = cvar.IMAGE_OPTION_QUALITY
3171 IMAGE_OPTION_BITSPERSAMPLE = cvar.IMAGE_OPTION_BITSPERSAMPLE
3172 IMAGE_OPTION_SAMPLESPERPIXEL = cvar.IMAGE_OPTION_SAMPLESPERPIXEL
3173 IMAGE_OPTION_COMPRESSION = cvar.IMAGE_OPTION_COMPRESSION
3174 IMAGE_OPTION_IMAGEDESCRIPTOR = cvar.IMAGE_OPTION_IMAGEDESCRIPTOR
3175 IMAGE_OPTION_PNG_FORMAT = cvar.IMAGE_OPTION_PNG_FORMAT
3176 IMAGE_OPTION_PNG_BITDEPTH = cvar.IMAGE_OPTION_PNG_BITDEPTH
3177
3178 class ICOHandler(BMPHandler):
3179 """A `wx.ImageHandler` for \*.ico icon files."""
3180 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
3181 __repr__ = _swig_repr
3182 def __init__(self, *args, **kwargs):
3183 """
3184 __init__(self) -> ICOHandler
3185
3186 A `wx.ImageHandler` for \*.ico icon files.
3187 """
3188 _core_.ICOHandler_swiginit(self,_core_.new_ICOHandler(*args, **kwargs))
3189 _core_.ICOHandler_swigregister(ICOHandler)
3190
3191 class CURHandler(ICOHandler):
3192 """A `wx.ImageHandler` for \*.cur cursor files."""
3193 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
3194 __repr__ = _swig_repr
3195 def __init__(self, *args, **kwargs):
3196 """
3197 __init__(self) -> CURHandler
3198
3199 A `wx.ImageHandler` for \*.cur cursor files.
3200 """
3201 _core_.CURHandler_swiginit(self,_core_.new_CURHandler(*args, **kwargs))
3202 _core_.CURHandler_swigregister(CURHandler)
3203
3204 class ANIHandler(CURHandler):
3205 """A `wx.ImageHandler` for \*.ani animated cursor files."""
3206 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
3207 __repr__ = _swig_repr
3208 def __init__(self, *args, **kwargs):
3209 """
3210 __init__(self) -> ANIHandler
3211
3212 A `wx.ImageHandler` for \*.ani animated cursor files.
3213 """
3214 _core_.ANIHandler_swiginit(self,_core_.new_ANIHandler(*args, **kwargs))
3215 _core_.ANIHandler_swigregister(ANIHandler)
3216
3217 class PNGHandler(ImageHandler):
3218 """A `wx.ImageHandler` for PNG image files."""
3219 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
3220 __repr__ = _swig_repr
3221 def __init__(self, *args, **kwargs):
3222 """
3223 __init__(self) -> PNGHandler
3224
3225 A `wx.ImageHandler` for PNG image files.
3226 """
3227 _core_.PNGHandler_swiginit(self,_core_.new_PNGHandler(*args, **kwargs))
3228 _core_.PNGHandler_swigregister(PNGHandler)
3229
3230 class GIFHandler(ImageHandler):
3231 """A `wx.ImageHandler` for GIF image files."""
3232 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
3233 __repr__ = _swig_repr
3234 def __init__(self, *args, **kwargs):
3235 """
3236 __init__(self) -> GIFHandler
3237
3238 A `wx.ImageHandler` for GIF image files.
3239 """
3240 _core_.GIFHandler_swiginit(self,_core_.new_GIFHandler(*args, **kwargs))
3241 _core_.GIFHandler_swigregister(GIFHandler)
3242
3243 class PCXHandler(ImageHandler):
3244 """A `wx.ImageHandler` for PCX imager files."""
3245 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
3246 __repr__ = _swig_repr
3247 def __init__(self, *args, **kwargs):
3248 """
3249 __init__(self) -> PCXHandler
3250
3251 A `wx.ImageHandler` for PCX imager files.
3252 """
3253 _core_.PCXHandler_swiginit(self,_core_.new_PCXHandler(*args, **kwargs))
3254 _core_.PCXHandler_swigregister(PCXHandler)
3255
3256 class JPEGHandler(ImageHandler):
3257 """A `wx.ImageHandler` for JPEG/JPG image files."""
3258 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
3259 __repr__ = _swig_repr
3260 def __init__(self, *args, **kwargs):
3261 """
3262 __init__(self) -> JPEGHandler
3263
3264 A `wx.ImageHandler` for JPEG/JPG image files.
3265 """
3266 _core_.JPEGHandler_swiginit(self,_core_.new_JPEGHandler(*args, **kwargs))
3267 _core_.JPEGHandler_swigregister(JPEGHandler)
3268
3269 class PNMHandler(ImageHandler):
3270 """A `wx.ImageHandler` for PNM image files."""
3271 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
3272 __repr__ = _swig_repr
3273 def __init__(self, *args, **kwargs):
3274 """
3275 __init__(self) -> PNMHandler
3276
3277 A `wx.ImageHandler` for PNM image files.
3278 """
3279 _core_.PNMHandler_swiginit(self,_core_.new_PNMHandler(*args, **kwargs))
3280 _core_.PNMHandler_swigregister(PNMHandler)
3281
3282 class XPMHandler(ImageHandler):
3283 """A `wx.ImageHandler` for XPM image."""
3284 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
3285 __repr__ = _swig_repr
3286 def __init__(self, *args, **kwargs):
3287 """
3288 __init__(self) -> XPMHandler
3289
3290 A `wx.ImageHandler` for XPM image.
3291 """
3292 _core_.XPMHandler_swiginit(self,_core_.new_XPMHandler(*args, **kwargs))
3293 _core_.XPMHandler_swigregister(XPMHandler)
3294
3295 class TIFFHandler(ImageHandler):
3296 """A `wx.ImageHandler` for TIFF image files."""
3297 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
3298 __repr__ = _swig_repr
3299 def __init__(self, *args, **kwargs):
3300 """
3301 __init__(self) -> TIFFHandler
3302
3303 A `wx.ImageHandler` for TIFF image files.
3304 """
3305 _core_.TIFFHandler_swiginit(self,_core_.new_TIFFHandler(*args, **kwargs))
3306 _core_.TIFFHandler_swigregister(TIFFHandler)
3307
3308 QUANTIZE_INCLUDE_WINDOWS_COLOURS = _core_.QUANTIZE_INCLUDE_WINDOWS_COLOURS
3309 QUANTIZE_FILL_DESTINATION_IMAGE = _core_.QUANTIZE_FILL_DESTINATION_IMAGE
3310 class Quantize(object):
3311 """Performs quantization, or colour reduction, on a wxImage."""
3312 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
3313 def __init__(self): raise AttributeError, "No constructor defined"
3314 __repr__ = _swig_repr
3315 def Quantize(*args, **kwargs):
3316 """
3317 Quantize(Image src, Image dest, int desiredNoColours=236, int flags=wxQUANTIZE_INCLUDE_WINDOWS_COLOURS|wxQUANTIZE_FILL_DESTINATION_IMAGE) -> bool
3318
3319 Reduce the colours in the source image and put the result into the
3320 destination image, setting the palette in the destination if
3321 needed. Both images may be the same, to overwrite the source image.
3322 """
3323 return _core_.Quantize_Quantize(*args, **kwargs)
3324
3325 Quantize = staticmethod(Quantize)
3326 _core_.Quantize_swigregister(Quantize)
3327
3328 def Quantize_Quantize(*args, **kwargs):
3329 """
3330 Quantize_Quantize(Image src, Image dest, int desiredNoColours=236, int flags=wxQUANTIZE_INCLUDE_WINDOWS_COLOURS|wxQUANTIZE_FILL_DESTINATION_IMAGE) -> bool
3331
3332 Reduce the colours in the source image and put the result into the
3333 destination image, setting the palette in the destination if
3334 needed. Both images may be the same, to overwrite the source image.
3335 """
3336 return _core_.Quantize_Quantize(*args, **kwargs)
3337
3338 #---------------------------------------------------------------------------
3339
3340 class EvtHandler(Object):
3341 """Proxy of C++ EvtHandler class"""
3342 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
3343 __repr__ = _swig_repr
3344 def __init__(self, *args, **kwargs):
3345 """__init__(self) -> EvtHandler"""
3346 _core_.EvtHandler_swiginit(self,_core_.new_EvtHandler(*args, **kwargs))
3347 def GetNextHandler(*args, **kwargs):
3348 """GetNextHandler(self) -> EvtHandler"""
3349 return _core_.EvtHandler_GetNextHandler(*args, **kwargs)
3350
3351 def GetPreviousHandler(*args, **kwargs):
3352 """GetPreviousHandler(self) -> EvtHandler"""
3353 return _core_.EvtHandler_GetPreviousHandler(*args, **kwargs)
3354
3355 def SetNextHandler(*args, **kwargs):
3356 """SetNextHandler(self, EvtHandler handler)"""
3357 return _core_.EvtHandler_SetNextHandler(*args, **kwargs)
3358
3359 def SetPreviousHandler(*args, **kwargs):
3360 """SetPreviousHandler(self, EvtHandler handler)"""
3361 return _core_.EvtHandler_SetPreviousHandler(*args, **kwargs)
3362
3363 def GetEvtHandlerEnabled(*args, **kwargs):
3364 """GetEvtHandlerEnabled(self) -> bool"""
3365 return _core_.EvtHandler_GetEvtHandlerEnabled(*args, **kwargs)
3366
3367 def SetEvtHandlerEnabled(*args, **kwargs):
3368 """SetEvtHandlerEnabled(self, bool enabled)"""
3369 return _core_.EvtHandler_SetEvtHandlerEnabled(*args, **kwargs)
3370
3371 def ProcessEvent(*args, **kwargs):
3372 """ProcessEvent(self, Event event) -> bool"""
3373 return _core_.EvtHandler_ProcessEvent(*args, **kwargs)
3374
3375 def AddPendingEvent(*args, **kwargs):
3376 """AddPendingEvent(self, Event event)"""
3377 return _core_.EvtHandler_AddPendingEvent(*args, **kwargs)
3378
3379 def ProcessPendingEvents(*args, **kwargs):
3380 """ProcessPendingEvents(self)"""
3381 return _core_.EvtHandler_ProcessPendingEvents(*args, **kwargs)
3382
3383 def Connect(*args, **kwargs):
3384 """Connect(self, int id, int lastId, int eventType, PyObject func)"""
3385 return _core_.EvtHandler_Connect(*args, **kwargs)
3386
3387 def Disconnect(*args, **kwargs):
3388 """Disconnect(self, int id, int lastId=-1, EventType eventType=wxEVT_NULL) -> bool"""
3389 return _core_.EvtHandler_Disconnect(*args, **kwargs)
3390
3391 def _setOORInfo(*args, **kwargs):
3392 """_setOORInfo(self, PyObject _self, bool incref=True)"""
3393 val = _core_.EvtHandler__setOORInfo(*args, **kwargs)
3394 args[0].thisown = 0
3395 return val
3396
3397 def Bind(self, event, handler, source=None, id=wx.ID_ANY, id2=wx.ID_ANY):
3398 """
3399 Bind an event to an event handler.
3400
3401 :param event: One of the EVT_* objects that specifies the
3402 type of event to bind,
3403
3404 :param handler: A callable object to be invoked when the
3405 event is delivered to self. Pass None to
3406 disconnect an event handler.
3407
3408 :param source: Sometimes the event originates from a
3409 different window than self, but you still
3410 want to catch it in self. (For example, a
3411 button event delivered to a frame.) By
3412 passing the source of the event, the event
3413 handling system is able to differentiate
3414 between the same event type from different
3415 controls.
3416
3417 :param id: Used to spcify the event source by ID instead
3418 of instance.
3419
3420 :param id2: Used when it is desirable to bind a handler
3421 to a range of IDs, such as with EVT_MENU_RANGE.
3422 """
3423 if source is not None:
3424 id = source.GetId()
3425 event.Bind(self, id, id2, handler)
3426
3427 def Unbind(self, event, source=None, id=wx.ID_ANY, id2=wx.ID_ANY):
3428 """
3429 Disconencts the event handler binding for event from self.
3430 Returns True if successful.
3431 """
3432 if source is not None:
3433 id = source.GetId()
3434 return event.Unbind(self, id, id2)
3435
3436 EvtHandlerEnabled = property(GetEvtHandlerEnabled,SetEvtHandlerEnabled,doc="See `GetEvtHandlerEnabled` and `SetEvtHandlerEnabled`")
3437 NextHandler = property(GetNextHandler,SetNextHandler,doc="See `GetNextHandler` and `SetNextHandler`")
3438 PreviousHandler = property(GetPreviousHandler,SetPreviousHandler,doc="See `GetPreviousHandler` and `SetPreviousHandler`")
3439 _core_.EvtHandler_swigregister(EvtHandler)
3440
3441 #---------------------------------------------------------------------------
3442
3443 class PyEventBinder(object):
3444 """
3445 Instances of this class are used to bind specific events to event
3446 handlers.
3447 """
3448 def __init__(self, evtType, expectedIDs=0):
3449 if expectedIDs not in [0, 1, 2]:
3450 raise ValueError, "Invalid number of expectedIDs"
3451 self.expectedIDs = expectedIDs
3452
3453 if type(evtType) == list or type(evtType) == tuple:
3454 self.evtType = evtType
3455 else:
3456 self.evtType = [evtType]
3457
3458
3459 def Bind(self, target, id1, id2, function):
3460 """Bind this set of event types to target."""
3461 for et in self.evtType:
3462 target.Connect(id1, id2, et, function)
3463
3464
3465 def Unbind(self, target, id1, id2):
3466 """Remove an event binding."""
3467 success = 0
3468 for et in self.evtType:
3469 success += target.Disconnect(id1, id2, et)
3470 return success != 0
3471
3472
3473 def __call__(self, *args):
3474 """
3475 For backwards compatibility with the old EVT_* functions.
3476 Should be called with either (window, func), (window, ID,
3477 func) or (window, ID1, ID2, func) parameters depending on the
3478 type of the event.
3479 """
3480 assert len(args) == 2 + self.expectedIDs
3481 id1 = wx.ID_ANY
3482 id2 = wx.ID_ANY
3483 target = args[0]
3484 if self.expectedIDs == 0:
3485 func = args[1]
3486 elif self.expectedIDs == 1:
3487 id1 = args[1]
3488 func = args[2]
3489 elif self.expectedIDs == 2:
3490 id1 = args[1]
3491 id2 = args[2]
3492 func = args[3]
3493 else:
3494 raise ValueError, "Unexpected number of IDs"
3495
3496 self.Bind(target, id1, id2, func)
3497
3498
3499 # These two are square pegs that don't fit the PyEventBinder hole...
3500 def EVT_COMMAND(win, id, cmd, func):
3501 win.Connect(id, -1, cmd, func)
3502 def EVT_COMMAND_RANGE(win, id1, id2, cmd, func):
3503 win.Connect(id1, id2, cmd, func)
3504
3505
3506 #---------------------------------------------------------------------------
3507
3508 #---------------------------------------------------------------------------
3509
3510 EVENT_PROPAGATE_NONE = _core_.EVENT_PROPAGATE_NONE
3511 EVENT_PROPAGATE_MAX = _core_.EVENT_PROPAGATE_MAX
3512
3513 def NewEventType(*args):
3514 """NewEventType() -> EventType"""
3515 return _core_.NewEventType(*args)
3516 wxEVT_NULL = _core_.wxEVT_NULL
3517 wxEVT_FIRST = _core_.wxEVT_FIRST
3518 wxEVT_USER_FIRST = _core_.wxEVT_USER_FIRST
3519 wxEVT_COMMAND_BUTTON_CLICKED = _core_.wxEVT_COMMAND_BUTTON_CLICKED
3520 wxEVT_COMMAND_CHECKBOX_CLICKED = _core_.wxEVT_COMMAND_CHECKBOX_CLICKED
3521 wxEVT_COMMAND_CHOICE_SELECTED = _core_.wxEVT_COMMAND_CHOICE_SELECTED
3522 wxEVT_COMMAND_LISTBOX_SELECTED = _core_.wxEVT_COMMAND_LISTBOX_SELECTED
3523 wxEVT_COMMAND_LISTBOX_DOUBLECLICKED = _core_.wxEVT_COMMAND_LISTBOX_DOUBLECLICKED
3524 wxEVT_COMMAND_CHECKLISTBOX_TOGGLED = _core_.wxEVT_COMMAND_CHECKLISTBOX_TOGGLED
3525 wxEVT_COMMAND_MENU_SELECTED = _core_.wxEVT_COMMAND_MENU_SELECTED
3526 wxEVT_COMMAND_TOOL_CLICKED = _core_.wxEVT_COMMAND_TOOL_CLICKED
3527 wxEVT_COMMAND_SLIDER_UPDATED = _core_.wxEVT_COMMAND_SLIDER_UPDATED
3528 wxEVT_COMMAND_RADIOBOX_SELECTED = _core_.wxEVT_COMMAND_RADIOBOX_SELECTED
3529 wxEVT_COMMAND_RADIOBUTTON_SELECTED = _core_.wxEVT_COMMAND_RADIOBUTTON_SELECTED
3530 wxEVT_COMMAND_SCROLLBAR_UPDATED = _core_.wxEVT_COMMAND_SCROLLBAR_UPDATED
3531 wxEVT_COMMAND_VLBOX_SELECTED = _core_.wxEVT_COMMAND_VLBOX_SELECTED
3532 wxEVT_COMMAND_COMBOBOX_SELECTED = _core_.wxEVT_COMMAND_COMBOBOX_SELECTED
3533 wxEVT_COMMAND_TOOL_RCLICKED = _core_.wxEVT_COMMAND_TOOL_RCLICKED
3534 wxEVT_COMMAND_TOOL_ENTER = _core_.wxEVT_COMMAND_TOOL_ENTER
3535 wxEVT_LEFT_DOWN = _core_.wxEVT_LEFT_DOWN
3536 wxEVT_LEFT_UP = _core_.wxEVT_LEFT_UP
3537 wxEVT_MIDDLE_DOWN = _core_.wxEVT_MIDDLE_DOWN
3538 wxEVT_MIDDLE_UP = _core_.wxEVT_MIDDLE_UP
3539 wxEVT_RIGHT_DOWN = _core_.wxEVT_RIGHT_DOWN
3540 wxEVT_RIGHT_UP = _core_.wxEVT_RIGHT_UP
3541 wxEVT_MOTION = _core_.wxEVT_MOTION
3542 wxEVT_ENTER_WINDOW = _core_.wxEVT_ENTER_WINDOW
3543 wxEVT_LEAVE_WINDOW = _core_.wxEVT_LEAVE_WINDOW
3544 wxEVT_LEFT_DCLICK = _core_.wxEVT_LEFT_DCLICK
3545 wxEVT_MIDDLE_DCLICK = _core_.wxEVT_MIDDLE_DCLICK
3546 wxEVT_RIGHT_DCLICK = _core_.wxEVT_RIGHT_DCLICK
3547 wxEVT_SET_FOCUS = _core_.wxEVT_SET_FOCUS
3548 wxEVT_KILL_FOCUS = _core_.wxEVT_KILL_FOCUS
3549 wxEVT_CHILD_FOCUS = _core_.wxEVT_CHILD_FOCUS
3550 wxEVT_MOUSEWHEEL = _core_.wxEVT_MOUSEWHEEL
3551 wxEVT_NC_LEFT_DOWN = _core_.wxEVT_NC_LEFT_DOWN
3552 wxEVT_NC_LEFT_UP = _core_.wxEVT_NC_LEFT_UP
3553 wxEVT_NC_MIDDLE_DOWN = _core_.wxEVT_NC_MIDDLE_DOWN
3554 wxEVT_NC_MIDDLE_UP = _core_.wxEVT_NC_MIDDLE_UP
3555 wxEVT_NC_RIGHT_DOWN = _core_.wxEVT_NC_RIGHT_DOWN
3556 wxEVT_NC_RIGHT_UP = _core_.wxEVT_NC_RIGHT_UP
3557 wxEVT_NC_MOTION = _core_.wxEVT_NC_MOTION
3558 wxEVT_NC_ENTER_WINDOW = _core_.wxEVT_NC_ENTER_WINDOW
3559 wxEVT_NC_LEAVE_WINDOW = _core_.wxEVT_NC_LEAVE_WINDOW
3560 wxEVT_NC_LEFT_DCLICK = _core_.wxEVT_NC_LEFT_DCLICK
3561 wxEVT_NC_MIDDLE_DCLICK = _core_.wxEVT_NC_MIDDLE_DCLICK
3562 wxEVT_NC_RIGHT_DCLICK = _core_.wxEVT_NC_RIGHT_DCLICK
3563 wxEVT_CHAR = _core_.wxEVT_CHAR
3564 wxEVT_CHAR_HOOK = _core_.wxEVT_CHAR_HOOK
3565 wxEVT_NAVIGATION_KEY = _core_.wxEVT_NAVIGATION_KEY
3566 wxEVT_KEY_DOWN = _core_.wxEVT_KEY_DOWN
3567 wxEVT_KEY_UP = _core_.wxEVT_KEY_UP
3568 wxEVT_HOTKEY = _core_.wxEVT_HOTKEY
3569 wxEVT_SET_CURSOR = _core_.wxEVT_SET_CURSOR
3570 wxEVT_SCROLL_TOP = _core_.wxEVT_SCROLL_TOP
3571 wxEVT_SCROLL_BOTTOM = _core_.wxEVT_SCROLL_BOTTOM
3572 wxEVT_SCROLL_LINEUP = _core_.wxEVT_SCROLL_LINEUP
3573 wxEVT_SCROLL_LINEDOWN = _core_.wxEVT_SCROLL_LINEDOWN
3574 wxEVT_SCROLL_PAGEUP = _core_.wxEVT_SCROLL_PAGEUP
3575 wxEVT_SCROLL_PAGEDOWN = _core_.wxEVT_SCROLL_PAGEDOWN
3576 wxEVT_SCROLL_THUMBTRACK = _core_.wxEVT_SCROLL_THUMBTRACK
3577 wxEVT_SCROLL_THUMBRELEASE = _core_.wxEVT_SCROLL_THUMBRELEASE
3578 wxEVT_SCROLL_CHANGED = _core_.wxEVT_SCROLL_CHANGED
3579 wxEVT_SCROLL_ENDSCROLL = wxEVT_SCROLL_CHANGED
3580 wxEVT_SCROLLWIN_TOP = _core_.wxEVT_SCROLLWIN_TOP
3581 wxEVT_SCROLLWIN_BOTTOM = _core_.wxEVT_SCROLLWIN_BOTTOM
3582 wxEVT_SCROLLWIN_LINEUP = _core_.wxEVT_SCROLLWIN_LINEUP
3583 wxEVT_SCROLLWIN_LINEDOWN = _core_.wxEVT_SCROLLWIN_LINEDOWN
3584 wxEVT_SCROLLWIN_PAGEUP = _core_.wxEVT_SCROLLWIN_PAGEUP
3585 wxEVT_SCROLLWIN_PAGEDOWN = _core_.wxEVT_SCROLLWIN_PAGEDOWN
3586 wxEVT_SCROLLWIN_THUMBTRACK = _core_.wxEVT_SCROLLWIN_THUMBTRACK
3587 wxEVT_SCROLLWIN_THUMBRELEASE = _core_.wxEVT_SCROLLWIN_THUMBRELEASE
3588 wxEVT_SIZE = _core_.wxEVT_SIZE
3589 wxEVT_MOVE = _core_.wxEVT_MOVE
3590 wxEVT_CLOSE_WINDOW = _core_.wxEVT_CLOSE_WINDOW
3591 wxEVT_END_SESSION = _core_.wxEVT_END_SESSION
3592 wxEVT_QUERY_END_SESSION = _core_.wxEVT_QUERY_END_SESSION
3593 wxEVT_ACTIVATE_APP = _core_.wxEVT_ACTIVATE_APP
3594 wxEVT_ACTIVATE = _core_.wxEVT_ACTIVATE
3595 wxEVT_CREATE = _core_.wxEVT_CREATE
3596 wxEVT_DESTROY = _core_.wxEVT_DESTROY
3597 wxEVT_SHOW = _core_.wxEVT_SHOW
3598 wxEVT_ICONIZE = _core_.wxEVT_ICONIZE
3599 wxEVT_MAXIMIZE = _core_.wxEVT_MAXIMIZE
3600 wxEVT_MOUSE_CAPTURE_CHANGED = _core_.wxEVT_MOUSE_CAPTURE_CHANGED
3601 wxEVT_MOUSE_CAPTURE_LOST = _core_.wxEVT_MOUSE_CAPTURE_LOST
3602 wxEVT_PAINT = _core_.wxEVT_PAINT
3603 wxEVT_ERASE_BACKGROUND = _core_.wxEVT_ERASE_BACKGROUND
3604 wxEVT_NC_PAINT = _core_.wxEVT_NC_PAINT
3605 wxEVT_PAINT_ICON = _core_.wxEVT_PAINT_ICON
3606 wxEVT_MENU_OPEN = _core_.wxEVT_MENU_OPEN
3607 wxEVT_MENU_CLOSE = _core_.wxEVT_MENU_CLOSE
3608 wxEVT_MENU_HIGHLIGHT = _core_.wxEVT_MENU_HIGHLIGHT
3609 wxEVT_CONTEXT_MENU = _core_.wxEVT_CONTEXT_MENU
3610 wxEVT_SYS_COLOUR_CHANGED = _core_.wxEVT_SYS_COLOUR_CHANGED
3611 wxEVT_DISPLAY_CHANGED = _core_.wxEVT_DISPLAY_CHANGED
3612 wxEVT_SETTING_CHANGED = _core_.wxEVT_SETTING_CHANGED
3613 wxEVT_QUERY_NEW_PALETTE = _core_.wxEVT_QUERY_NEW_PALETTE
3614 wxEVT_PALETTE_CHANGED = _core_.wxEVT_PALETTE_CHANGED
3615 wxEVT_DROP_FILES = _core_.wxEVT_DROP_FILES
3616 wxEVT_DRAW_ITEM = _core_.wxEVT_DRAW_ITEM
3617 wxEVT_MEASURE_ITEM = _core_.wxEVT_MEASURE_ITEM
3618 wxEVT_COMPARE_ITEM = _core_.wxEVT_COMPARE_ITEM
3619 wxEVT_INIT_DIALOG = _core_.wxEVT_INIT_DIALOG
3620 wxEVT_IDLE = _core_.wxEVT_IDLE
3621 wxEVT_UPDATE_UI = _core_.wxEVT_UPDATE_UI
3622 wxEVT_SIZING = _core_.wxEVT_SIZING
3623 wxEVT_MOVING = _core_.wxEVT_MOVING
3624 wxEVT_HIBERNATE = _core_.wxEVT_HIBERNATE
3625 wxEVT_COMMAND_TEXT_COPY = _core_.wxEVT_COMMAND_TEXT_COPY
3626 wxEVT_COMMAND_TEXT_CUT = _core_.wxEVT_COMMAND_TEXT_CUT
3627 wxEVT_COMMAND_TEXT_PASTE = _core_.wxEVT_COMMAND_TEXT_PASTE
3628 wxEVT_COMMAND_LEFT_CLICK = _core_.wxEVT_COMMAND_LEFT_CLICK
3629 wxEVT_COMMAND_LEFT_DCLICK = _core_.wxEVT_COMMAND_LEFT_DCLICK
3630 wxEVT_COMMAND_RIGHT_CLICK = _core_.wxEVT_COMMAND_RIGHT_CLICK
3631 wxEVT_COMMAND_RIGHT_DCLICK = _core_.wxEVT_COMMAND_RIGHT_DCLICK
3632 wxEVT_COMMAND_SET_FOCUS = _core_.wxEVT_COMMAND_SET_FOCUS
3633 wxEVT_COMMAND_KILL_FOCUS = _core_.wxEVT_COMMAND_KILL_FOCUS
3634 wxEVT_COMMAND_ENTER = _core_.wxEVT_COMMAND_ENTER
3635 #
3636 # Create some event binders
3637 EVT_SIZE = wx.PyEventBinder( wxEVT_SIZE )
3638 EVT_SIZING = wx.PyEventBinder( wxEVT_SIZING )
3639 EVT_MOVE = wx.PyEventBinder( wxEVT_MOVE )
3640 EVT_MOVING = wx.PyEventBinder( wxEVT_MOVING )
3641 EVT_CLOSE = wx.PyEventBinder( wxEVT_CLOSE_WINDOW )
3642 EVT_END_SESSION = wx.PyEventBinder( wxEVT_END_SESSION )
3643 EVT_QUERY_END_SESSION = wx.PyEventBinder( wxEVT_QUERY_END_SESSION )
3644 EVT_PAINT = wx.PyEventBinder( wxEVT_PAINT )
3645 EVT_NC_PAINT = wx.PyEventBinder( wxEVT_NC_PAINT )
3646 EVT_ERASE_BACKGROUND = wx.PyEventBinder( wxEVT_ERASE_BACKGROUND )
3647 EVT_CHAR = wx.PyEventBinder( wxEVT_CHAR )
3648 EVT_KEY_DOWN = wx.PyEventBinder( wxEVT_KEY_DOWN )
3649 EVT_KEY_UP = wx.PyEventBinder( wxEVT_KEY_UP )
3650 EVT_HOTKEY = wx.PyEventBinder( wxEVT_HOTKEY, 1)
3651 EVT_CHAR_HOOK = wx.PyEventBinder( wxEVT_CHAR_HOOK )
3652 EVT_MENU_OPEN = wx.PyEventBinder( wxEVT_MENU_OPEN )
3653 EVT_MENU_CLOSE = wx.PyEventBinder( wxEVT_MENU_CLOSE )
3654 EVT_MENU_HIGHLIGHT = wx.PyEventBinder( wxEVT_MENU_HIGHLIGHT, 1)
3655 EVT_MENU_HIGHLIGHT_ALL = wx.PyEventBinder( wxEVT_MENU_HIGHLIGHT )
3656 EVT_SET_FOCUS = wx.PyEventBinder( wxEVT_SET_FOCUS )
3657 EVT_KILL_FOCUS = wx.PyEventBinder( wxEVT_KILL_FOCUS )
3658 EVT_CHILD_FOCUS = wx.PyEventBinder( wxEVT_CHILD_FOCUS )
3659 EVT_ACTIVATE = wx.PyEventBinder( wxEVT_ACTIVATE )
3660 EVT_ACTIVATE_APP = wx.PyEventBinder( wxEVT_ACTIVATE_APP )
3661 EVT_HIBERNATE = wx.PyEventBinder( wxEVT_HIBERNATE )
3662 EVT_END_SESSION = wx.PyEventBinder( wxEVT_END_SESSION )
3663 EVT_QUERY_END_SESSION = wx.PyEventBinder( wxEVT_QUERY_END_SESSION )
3664 EVT_DROP_FILES = wx.PyEventBinder( wxEVT_DROP_FILES )
3665 EVT_INIT_DIALOG = wx.PyEventBinder( wxEVT_INIT_DIALOG )
3666 EVT_SYS_COLOUR_CHANGED = wx.PyEventBinder( wxEVT_SYS_COLOUR_CHANGED )
3667 EVT_DISPLAY_CHANGED = wx.PyEventBinder( wxEVT_DISPLAY_CHANGED )
3668 EVT_SHOW = wx.PyEventBinder( wxEVT_SHOW )
3669 EVT_MAXIMIZE = wx.PyEventBinder( wxEVT_MAXIMIZE )
3670 EVT_ICONIZE = wx.PyEventBinder( wxEVT_ICONIZE )
3671 EVT_NAVIGATION_KEY = wx.PyEventBinder( wxEVT_NAVIGATION_KEY )
3672 EVT_PALETTE_CHANGED = wx.PyEventBinder( wxEVT_PALETTE_CHANGED )
3673 EVT_QUERY_NEW_PALETTE = wx.PyEventBinder( wxEVT_QUERY_NEW_PALETTE )
3674 EVT_WINDOW_CREATE = wx.PyEventBinder( wxEVT_CREATE )
3675 EVT_WINDOW_DESTROY = wx.PyEventBinder( wxEVT_DESTROY )
3676 EVT_SET_CURSOR = wx.PyEventBinder( wxEVT_SET_CURSOR )
3677 EVT_MOUSE_CAPTURE_CHANGED = wx.PyEventBinder( wxEVT_MOUSE_CAPTURE_CHANGED )
3678 EVT_MOUSE_CAPTURE_LOST = wx.PyEventBinder( wxEVT_MOUSE_CAPTURE_LOST )
3679
3680 EVT_LEFT_DOWN = wx.PyEventBinder( wxEVT_LEFT_DOWN )
3681 EVT_LEFT_UP = wx.PyEventBinder( wxEVT_LEFT_UP )
3682 EVT_MIDDLE_DOWN = wx.PyEventBinder( wxEVT_MIDDLE_DOWN )
3683 EVT_MIDDLE_UP = wx.PyEventBinder( wxEVT_MIDDLE_UP )
3684 EVT_RIGHT_DOWN = wx.PyEventBinder( wxEVT_RIGHT_DOWN )
3685 EVT_RIGHT_UP = wx.PyEventBinder( wxEVT_RIGHT_UP )
3686 EVT_MOTION = wx.PyEventBinder( wxEVT_MOTION )
3687 EVT_LEFT_DCLICK = wx.PyEventBinder( wxEVT_LEFT_DCLICK )
3688 EVT_MIDDLE_DCLICK = wx.PyEventBinder( wxEVT_MIDDLE_DCLICK )
3689 EVT_RIGHT_DCLICK = wx.PyEventBinder( wxEVT_RIGHT_DCLICK )
3690 EVT_LEAVE_WINDOW = wx.PyEventBinder( wxEVT_LEAVE_WINDOW )
3691 EVT_ENTER_WINDOW = wx.PyEventBinder( wxEVT_ENTER_WINDOW )
3692 EVT_MOUSEWHEEL = wx.PyEventBinder( wxEVT_MOUSEWHEEL )
3693
3694 EVT_MOUSE_EVENTS = wx.PyEventBinder([ wxEVT_LEFT_DOWN,
3695 wxEVT_LEFT_UP,
3696 wxEVT_MIDDLE_DOWN,
3697 wxEVT_MIDDLE_UP,
3698 wxEVT_RIGHT_DOWN,
3699 wxEVT_RIGHT_UP,
3700 wxEVT_MOTION,
3701 wxEVT_LEFT_DCLICK,
3702 wxEVT_MIDDLE_DCLICK,
3703 wxEVT_RIGHT_DCLICK,
3704 wxEVT_ENTER_WINDOW,
3705 wxEVT_LEAVE_WINDOW,
3706 wxEVT_MOUSEWHEEL
3707 ])
3708
3709
3710 # Scrolling from wxWindow (sent to wxScrolledWindow)
3711 EVT_SCROLLWIN = wx.PyEventBinder([ wxEVT_SCROLLWIN_TOP,
3712 wxEVT_SCROLLWIN_BOTTOM,
3713 wxEVT_SCROLLWIN_LINEUP,
3714 wxEVT_SCROLLWIN_LINEDOWN,
3715 wxEVT_SCROLLWIN_PAGEUP,
3716 wxEVT_SCROLLWIN_PAGEDOWN,
3717 wxEVT_SCROLLWIN_THUMBTRACK,
3718 wxEVT_SCROLLWIN_THUMBRELEASE,
3719 ])
3720
3721 EVT_SCROLLWIN_TOP = wx.PyEventBinder( wxEVT_SCROLLWIN_TOP )
3722 EVT_SCROLLWIN_BOTTOM = wx.PyEventBinder( wxEVT_SCROLLWIN_BOTTOM )
3723 EVT_SCROLLWIN_LINEUP = wx.PyEventBinder( wxEVT_SCROLLWIN_LINEUP )
3724 EVT_SCROLLWIN_LINEDOWN = wx.PyEventBinder( wxEVT_SCROLLWIN_LINEDOWN )
3725 EVT_SCROLLWIN_PAGEUP = wx.PyEventBinder( wxEVT_SCROLLWIN_PAGEUP )
3726 EVT_SCROLLWIN_PAGEDOWN = wx.PyEventBinder( wxEVT_SCROLLWIN_PAGEDOWN )
3727 EVT_SCROLLWIN_THUMBTRACK = wx.PyEventBinder( wxEVT_SCROLLWIN_THUMBTRACK )
3728 EVT_SCROLLWIN_THUMBRELEASE = wx.PyEventBinder( wxEVT_SCROLLWIN_THUMBRELEASE )
3729
3730 # Scrolling from wx.Slider and wx.ScrollBar
3731 EVT_SCROLL = wx.PyEventBinder([ wxEVT_SCROLL_TOP,
3732 wxEVT_SCROLL_BOTTOM,
3733 wxEVT_SCROLL_LINEUP,
3734 wxEVT_SCROLL_LINEDOWN,
3735 wxEVT_SCROLL_PAGEUP,
3736 wxEVT_SCROLL_PAGEDOWN,
3737 wxEVT_SCROLL_THUMBTRACK,
3738 wxEVT_SCROLL_THUMBRELEASE,
3739 wxEVT_SCROLL_CHANGED,
3740 ])
3741
3742 EVT_SCROLL_TOP = wx.PyEventBinder( wxEVT_SCROLL_TOP )
3743 EVT_SCROLL_BOTTOM = wx.PyEventBinder( wxEVT_SCROLL_BOTTOM )
3744 EVT_SCROLL_LINEUP = wx.PyEventBinder( wxEVT_SCROLL_LINEUP )
3745 EVT_SCROLL_LINEDOWN = wx.PyEventBinder( wxEVT_SCROLL_LINEDOWN )
3746 EVT_SCROLL_PAGEUP = wx.PyEventBinder( wxEVT_SCROLL_PAGEUP )
3747 EVT_SCROLL_PAGEDOWN = wx.PyEventBinder( wxEVT_SCROLL_PAGEDOWN )
3748 EVT_SCROLL_THUMBTRACK = wx.PyEventBinder( wxEVT_SCROLL_THUMBTRACK )
3749 EVT_SCROLL_THUMBRELEASE = wx.PyEventBinder( wxEVT_SCROLL_THUMBRELEASE )
3750 EVT_SCROLL_CHANGED = wx.PyEventBinder( wxEVT_SCROLL_CHANGED )
3751 EVT_SCROLL_ENDSCROLL = EVT_SCROLL_CHANGED
3752
3753 # Scrolling from wx.Slider and wx.ScrollBar, with an id
3754 EVT_COMMAND_SCROLL = wx.PyEventBinder([ wxEVT_SCROLL_TOP,
3755 wxEVT_SCROLL_BOTTOM,
3756 wxEVT_SCROLL_LINEUP,
3757 wxEVT_SCROLL_LINEDOWN,
3758 wxEVT_SCROLL_PAGEUP,
3759 wxEVT_SCROLL_PAGEDOWN,
3760 wxEVT_SCROLL_THUMBTRACK,
3761 wxEVT_SCROLL_THUMBRELEASE,
3762 wxEVT_SCROLL_CHANGED,
3763 ], 1)
3764
3765 EVT_COMMAND_SCROLL_TOP = wx.PyEventBinder( wxEVT_SCROLL_TOP, 1)
3766 EVT_COMMAND_SCROLL_BOTTOM = wx.PyEventBinder( wxEVT_SCROLL_BOTTOM, 1)
3767 EVT_COMMAND_SCROLL_LINEUP = wx.PyEventBinder( wxEVT_SCROLL_LINEUP, 1)
3768 EVT_COMMAND_SCROLL_LINEDOWN = wx.PyEventBinder( wxEVT_SCROLL_LINEDOWN, 1)
3769 EVT_COMMAND_SCROLL_PAGEUP = wx.PyEventBinder( wxEVT_SCROLL_PAGEUP, 1)
3770 EVT_COMMAND_SCROLL_PAGEDOWN = wx.PyEventBinder( wxEVT_SCROLL_PAGEDOWN, 1)
3771 EVT_COMMAND_SCROLL_THUMBTRACK = wx.PyEventBinder( wxEVT_SCROLL_THUMBTRACK, 1)
3772 EVT_COMMAND_SCROLL_THUMBRELEASE = wx.PyEventBinder( wxEVT_SCROLL_THUMBRELEASE, 1)
3773 EVT_COMMAND_SCROLL_CHANGED = wx.PyEventBinder( wxEVT_SCROLL_CHANGED, 1)
3774 EVT_COMMAND_SCROLL_ENDSCROLL = EVT_COMMAND_SCROLL_CHANGED
3775
3776 EVT_BUTTON = wx.PyEventBinder( wxEVT_COMMAND_BUTTON_CLICKED, 1)
3777 EVT_CHECKBOX = wx.PyEventBinder( wxEVT_COMMAND_CHECKBOX_CLICKED, 1)
3778 EVT_CHOICE = wx.PyEventBinder( wxEVT_COMMAND_CHOICE_SELECTED, 1)
3779 EVT_LISTBOX = wx.PyEventBinder( wxEVT_COMMAND_LISTBOX_SELECTED, 1)
3780 EVT_LISTBOX_DCLICK = wx.PyEventBinder( wxEVT_COMMAND_LISTBOX_DOUBLECLICKED, 1)
3781 EVT_MENU = wx.PyEventBinder( wxEVT_COMMAND_MENU_SELECTED, 1)
3782 EVT_MENU_RANGE = wx.PyEventBinder( wxEVT_COMMAND_MENU_SELECTED, 2)
3783 EVT_SLIDER = wx.PyEventBinder( wxEVT_COMMAND_SLIDER_UPDATED, 1)
3784 EVT_RADIOBOX = wx.PyEventBinder( wxEVT_COMMAND_RADIOBOX_SELECTED, 1)
3785 EVT_RADIOBUTTON = wx.PyEventBinder( wxEVT_COMMAND_RADIOBUTTON_SELECTED, 1)
3786
3787 EVT_SCROLLBAR = wx.PyEventBinder( wxEVT_COMMAND_SCROLLBAR_UPDATED, 1)
3788 EVT_VLBOX = wx.PyEventBinder( wxEVT_COMMAND_VLBOX_SELECTED, 1)
3789 EVT_COMBOBOX = wx.PyEventBinder( wxEVT_COMMAND_COMBOBOX_SELECTED, 1)
3790 EVT_TOOL = wx.PyEventBinder( wxEVT_COMMAND_TOOL_CLICKED, 1)
3791 EVT_TOOL_RANGE = wx.PyEventBinder( wxEVT_COMMAND_TOOL_CLICKED, 2)
3792 EVT_TOOL_RCLICKED = wx.PyEventBinder( wxEVT_COMMAND_TOOL_RCLICKED, 1)
3793 EVT_TOOL_RCLICKED_RANGE = wx.PyEventBinder( wxEVT_COMMAND_TOOL_RCLICKED, 2)
3794 EVT_TOOL_ENTER = wx.PyEventBinder( wxEVT_COMMAND_TOOL_ENTER, 1)
3795 EVT_CHECKLISTBOX = wx.PyEventBinder( wxEVT_COMMAND_CHECKLISTBOX_TOGGLED, 1)
3796
3797
3798 EVT_COMMAND_LEFT_CLICK = wx.PyEventBinder( wxEVT_COMMAND_LEFT_CLICK, 1)
3799 EVT_COMMAND_LEFT_DCLICK = wx.PyEventBinder( wxEVT_COMMAND_LEFT_DCLICK, 1)
3800 EVT_COMMAND_RIGHT_CLICK = wx.PyEventBinder( wxEVT_COMMAND_RIGHT_CLICK, 1)
3801 EVT_COMMAND_RIGHT_DCLICK = wx.PyEventBinder( wxEVT_COMMAND_RIGHT_DCLICK, 1)
3802 EVT_COMMAND_SET_FOCUS = wx.PyEventBinder( wxEVT_COMMAND_SET_FOCUS, 1)
3803 EVT_COMMAND_KILL_FOCUS = wx.PyEventBinder( wxEVT_COMMAND_KILL_FOCUS, 1)
3804 EVT_COMMAND_ENTER = wx.PyEventBinder( wxEVT_COMMAND_ENTER, 1)
3805
3806 EVT_IDLE = wx.PyEventBinder( wxEVT_IDLE )
3807
3808 EVT_UPDATE_UI = wx.PyEventBinder( wxEVT_UPDATE_UI, 1)
3809 EVT_UPDATE_UI_RANGE = wx.PyEventBinder( wxEVT_UPDATE_UI, 2)
3810
3811 EVT_CONTEXT_MENU = wx.PyEventBinder( wxEVT_CONTEXT_MENU )
3812
3813 EVT_TEXT_CUT = wx.PyEventBinder( wxEVT_COMMAND_TEXT_CUT )
3814 EVT_TEXT_COPY = wx.PyEventBinder( wxEVT_COMMAND_TEXT_COPY )
3815 EVT_TEXT_PASTE = wx.PyEventBinder( wxEVT_COMMAND_TEXT_PASTE )
3816
3817
3818 #---------------------------------------------------------------------------
3819
3820 class Event(Object):
3821 """
3822 An event is a structure holding information about an event passed to a
3823 callback or member function. wx.Event is an abstract base class for
3824 other event classes
3825 """
3826 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
3827 def __init__(self): raise AttributeError, "No constructor defined"
3828 __repr__ = _swig_repr
3829 __swig_destroy__ = _core_.delete_Event
3830 __del__ = lambda self : None;
3831 def SetEventType(*args, **kwargs):
3832 """
3833 SetEventType(self, EventType typ)
3834
3835 Sets the specific type of the event.
3836 """
3837 return _core_.Event_SetEventType(*args, **kwargs)
3838
3839 def GetEventType(*args, **kwargs):
3840 """
3841 GetEventType(self) -> EventType
3842
3843 Returns the identifier of the given event type, such as
3844 ``wxEVT_COMMAND_BUTTON_CLICKED``.
3845 """
3846 return _core_.Event_GetEventType(*args, **kwargs)
3847
3848 def GetEventObject(*args, **kwargs):
3849 """
3850 GetEventObject(self) -> Object
3851
3852 Returns the object (usually a window) associated with the event, if
3853 any.
3854 """
3855 return _core_.Event_GetEventObject(*args, **kwargs)
3856
3857 def SetEventObject(*args, **kwargs):
3858 """
3859 SetEventObject(self, Object obj)
3860
3861 Sets the originating object, or in other words, obj is normally the
3862 object that is sending the event.
3863 """
3864 return _core_.Event_SetEventObject(*args, **kwargs)
3865
3866 def GetTimestamp(*args, **kwargs):
3867 """GetTimestamp(self) -> long"""
3868 return _core_.Event_GetTimestamp(*args, **kwargs)
3869
3870 def SetTimestamp(*args, **kwargs):
3871 """SetTimestamp(self, long ts=0)"""
3872 return _core_.Event_SetTimestamp(*args, **kwargs)
3873
3874 def GetId(*args, **kwargs):
3875 """
3876 GetId(self) -> int
3877
3878 Returns the identifier associated with this event, such as a button
3879 command id.
3880 """
3881 return _core_.Event_GetId(*args, **kwargs)
3882
3883 def SetId(*args, **kwargs):
3884 """
3885 SetId(self, int Id)
3886
3887 Set's the ID for the event. This is usually the ID of the window that
3888 is sending the event, but it can also be a command id from a menu
3889 item, etc.
3890 """
3891 return _core_.Event_SetId(*args, **kwargs)
3892
3893 def IsCommandEvent(*args, **kwargs):
3894 """
3895 IsCommandEvent(self) -> bool
3896
3897 Returns true if the event is or is derived from `wx.CommandEvent` else
3898 it returns false. Note: Exists only for optimization purposes.
3899 """
3900 return _core_.Event_IsCommandEvent(*args, **kwargs)
3901
3902 def Skip(*args, **kwargs):
3903 """
3904 Skip(self, bool skip=True)
3905
3906 Called by an event handler, it controls whether additional event
3907 handlers bound to this event will be called after the current event
3908 handler returns. Skip(false) (the default setting) will prevent
3909 additional event handlers from being called and control will be
3910 returned to the sender of the event immediately after the current
3911 handler has finished. Skip(True) will cause the event processing
3912 system to continue searching for a handler function for this event.
3913
3914 """
3915 return _core_.Event_Skip(*args, **kwargs)
3916
3917 def GetSkipped(*args, **kwargs):
3918 """
3919 GetSkipped(self) -> bool
3920
3921 Returns true if the event handler should be skipped, false otherwise.
3922 :see: `Skip`
3923 """
3924 return _core_.Event_GetSkipped(*args, **kwargs)
3925
3926 def ShouldPropagate(*args, **kwargs):
3927 """
3928 ShouldPropagate(self) -> bool
3929
3930 Test if this event should be propagated to the parent window or not,
3931 i.e. if the propagation level is currently greater than 0.
3932 """
3933 return _core_.Event_ShouldPropagate(*args, **kwargs)
3934
3935 def StopPropagation(*args, **kwargs):
3936 """
3937 StopPropagation(self) -> int
3938
3939 Stop the event from propagating to its parent window. Returns the old
3940 propagation level value which may be later passed to
3941 `ResumePropagation` to allow propagating the event again.
3942 """
3943 return _core_.Event_StopPropagation(*args, **kwargs)
3944
3945 def ResumePropagation(*args, **kwargs):
3946 """
3947 ResumePropagation(self, int propagationLevel)
3948
3949 Resume the event propagation by restoring the propagation level. (For
3950 example, you can use the value returned by an earlier call to
3951 `StopPropagation`.)
3952
3953 """
3954 return _core_.Event_ResumePropagation(*args, **kwargs)
3955
3956 def Clone(*args, **kwargs):
3957 """Clone(self) -> Event"""
3958 return _core_.Event_Clone(*args, **kwargs)
3959
3960 EventObject = property(GetEventObject,SetEventObject,doc="See `GetEventObject` and `SetEventObject`")
3961 EventType = property(GetEventType,SetEventType,doc="See `GetEventType` and `SetEventType`")
3962 Id = property(GetId,SetId,doc="See `GetId` and `SetId`")
3963 Skipped = property(GetSkipped,doc="See `GetSkipped`")
3964 Timestamp = property(GetTimestamp,SetTimestamp,doc="See `GetTimestamp` and `SetTimestamp`")
3965 _core_.Event_swigregister(Event)
3966
3967 #---------------------------------------------------------------------------
3968
3969 class PropagationDisabler(object):
3970 """
3971 Helper class to temporarily change an event not to propagate. Simply
3972 create an instance of this class and then whe it is destroyed the
3973 propogation of the event will be restored.
3974 """
3975 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
3976 __repr__ = _swig_repr
3977 def __init__(self, *args, **kwargs):
3978 """
3979 __init__(self, Event event) -> PropagationDisabler
3980
3981 Helper class to temporarily change an event not to propagate. Simply
3982 create an instance of this class and then whe it is destroyed the
3983 propogation of the event will be restored.
3984 """
3985 _core_.PropagationDisabler_swiginit(self,_core_.new_PropagationDisabler(*args, **kwargs))
3986 __swig_destroy__ = _core_.delete_PropagationDisabler
3987 __del__ = lambda self : None;
3988 _core_.PropagationDisabler_swigregister(PropagationDisabler)
3989
3990 class PropagateOnce(object):
3991 """
3992 A helper class that will temporarily lower propagation level of an
3993 event. Simply create an instance of this class and then whe it is
3994 destroyed the propogation of the event will be restored.
3995 """
3996 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
3997 __repr__ = _swig_repr
3998 def __init__(self, *args, **kwargs):
3999 """
4000 __init__(self, Event event) -> PropagateOnce
4001
4002 A helper class that will temporarily lower propagation level of an
4003 event. Simply create an instance of this class and then whe it is
4004 destroyed the propogation of the event will be restored.
4005 """
4006 _core_.PropagateOnce_swiginit(self,_core_.new_PropagateOnce(*args, **kwargs))
4007 __swig_destroy__ = _core_.delete_PropagateOnce
4008 __del__ = lambda self : None;
4009 _core_.PropagateOnce_swigregister(PropagateOnce)
4010
4011 #---------------------------------------------------------------------------
4012
4013 class CommandEvent(Event):
4014 """
4015 This event class contains information about command events, which
4016 originate from a variety of simple controls, as well as menus and
4017 toolbars.
4018 """
4019 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
4020 __repr__ = _swig_repr
4021 def __init__(self, *args, **kwargs):
4022 """
4023 __init__(self, EventType commandType=wxEVT_NULL, int winid=0) -> CommandEvent
4024
4025 This event class contains information about command events, which
4026 originate from a variety of simple controls, as well as menus and
4027 toolbars.
4028 """
4029 _core_.CommandEvent_swiginit(self,_core_.new_CommandEvent(*args, **kwargs))
4030 def GetSelection(*args, **kwargs):
4031 """
4032 GetSelection(self) -> int
4033
4034 Returns item index for a listbox or choice selection event (not valid
4035 for a deselection).
4036 """
4037 return _core_.CommandEvent_GetSelection(*args, **kwargs)
4038
4039 def SetString(*args, **kwargs):
4040 """SetString(self, String s)"""
4041 return _core_.CommandEvent_SetString(*args, **kwargs)
4042
4043 def GetString(*args, **kwargs):
4044 """
4045 GetString(self) -> String
4046
4047 Returns item string for a listbox or choice selection event (not valid
4048 for a deselection).
4049 """
4050 return _core_.CommandEvent_GetString(*args, **kwargs)
4051
4052 def IsChecked(*args, **kwargs):
4053 """
4054 IsChecked(self) -> bool
4055
4056 This method can be used with checkbox and menu events: for the
4057 checkboxes, the method returns true for a selection event and false
4058 for a deselection one. For the menu events, this method indicates if
4059 the menu item just has become checked or unchecked (and thus only
4060 makes sense for checkable menu items).
4061 """
4062 return _core_.CommandEvent_IsChecked(*args, **kwargs)
4063
4064 Checked = IsChecked
4065 def IsSelection(*args, **kwargs):
4066 """
4067 IsSelection(self) -> bool
4068
4069 For a listbox or similar event, returns true if it is a selection,
4070 false if it is a deselection.
4071 """
4072 return _core_.CommandEvent_IsSelection(*args, **kwargs)
4073
4074 def SetExtraLong(*args, **kwargs):
4075 """SetExtraLong(self, long extraLong)"""
4076 return _core_.CommandEvent_SetExtraLong(*args, **kwargs)
4077
4078 def GetExtraLong(*args, **kwargs):
4079 """
4080 GetExtraLong(self) -> long
4081
4082 Returns extra information dependant on the event objects type. If the
4083 event comes from a listbox selection, it is a boolean determining
4084 whether the event was a selection (true) or a deselection (false). A
4085 listbox deselection only occurs for multiple-selection boxes, and in
4086 this case the index and string values are indeterminate and the
4087 listbox must be examined by the application.
4088 """
4089 return _core_.CommandEvent_GetExtraLong(*args, **kwargs)
4090
4091 def SetInt(*args, **kwargs):
4092 """SetInt(self, int i)"""
4093 return _core_.CommandEvent_SetInt(*args, **kwargs)
4094
4095 def GetInt(*args, **kwargs):
4096 """
4097 GetInt(self) -> int
4098
4099 Returns the integer identifier corresponding to a listbox, choice or
4100 radiobox selection (only if the event was a selection, not a
4101 deselection), or a boolean value representing the value of a checkbox.
4102 """
4103 return _core_.CommandEvent_GetInt(*args, **kwargs)
4104
4105 def GetClientData(*args, **kwargs):
4106 """
4107 GetClientData(self) -> PyObject
4108
4109 Returns the client data object for a listbox or choice selection event, (if any.)
4110 """
4111 return _core_.CommandEvent_GetClientData(*args, **kwargs)
4112
4113 def SetClientData(*args, **kwargs):
4114 """
4115 SetClientData(self, PyObject clientData)
4116
4117 Associate the given client data with the item at position n.
4118 """
4119 return _core_.CommandEvent_SetClientData(*args, **kwargs)
4120
4121 GetClientObject = GetClientData
4122 SetClientObject = SetClientData
4123
4124 def Clone(*args, **kwargs):
4125 """Clone(self) -> Event"""
4126 return _core_.CommandEvent_Clone(*args, **kwargs)
4127
4128 ClientData = property(GetClientData,SetClientData,doc="See `GetClientData` and `SetClientData`")
4129 ClientObject = property(GetClientObject,SetClientObject,doc="See `GetClientObject` and `SetClientObject`")
4130 ExtraLong = property(GetExtraLong,SetExtraLong,doc="See `GetExtraLong` and `SetExtraLong`")
4131 Int = property(GetInt,SetInt,doc="See `GetInt` and `SetInt`")
4132 Selection = property(GetSelection,doc="See `GetSelection`")
4133 String = property(GetString,SetString,doc="See `GetString` and `SetString`")
4134 _core_.CommandEvent_swigregister(CommandEvent)
4135
4136 #---------------------------------------------------------------------------
4137
4138 class NotifyEvent(CommandEvent):
4139 """
4140 An instance of this class (or one of its derived classes) is sent from
4141 a control when the control's state is being changed and the control
4142 allows that change to be prevented from happening. The event handler
4143 can call `Veto` or `Allow` to tell the control what to do.
4144 """
4145 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
4146 __repr__ = _swig_repr
4147 def __init__(self, *args, **kwargs):
4148 """
4149 __init__(self, EventType commandType=wxEVT_NULL, int winid=0) -> NotifyEvent
4150
4151 An instance of this class (or one of its derived classes) is sent from
4152 a control when the control's state is being changed and the control
4153 allows that change to be prevented from happening. The event handler
4154 can call `Veto` or `Allow` to tell the control what to do.
4155 """
4156 _core_.NotifyEvent_swiginit(self,_core_.new_NotifyEvent(*args, **kwargs))
4157 def Veto(*args, **kwargs):
4158 """
4159 Veto(self)
4160
4161 Prevents the change announced by this event from happening.
4162
4163 It is in general a good idea to notify the user about the reasons for
4164 vetoing the change because otherwise the applications behaviour (which
4165 just refuses to do what the user wants) might be quite surprising.
4166 """
4167 return _core_.NotifyEvent_Veto(*args, **kwargs)
4168
4169 def Allow(*args, **kwargs):
4170 """
4171 Allow(self)
4172
4173 This is the opposite of `Veto`: it explicitly allows the event to be
4174 processed. For most events it is not necessary to call this method as
4175 the events are allowed anyhow but some are forbidden by default (this
4176 will be mentioned in the corresponding event description).
4177 """
4178 return _core_.NotifyEvent_Allow(*args, **kwargs)
4179
4180 def IsAllowed(*args, **kwargs):
4181 """
4182 IsAllowed(self) -> bool
4183
4184 Returns true if the change is allowed (`Veto` hasn't been called) or
4185 false otherwise (if it was).
4186 """
4187 return _core_.NotifyEvent_IsAllowed(*args, **kwargs)
4188
4189 _core_.NotifyEvent_swigregister(NotifyEvent)
4190
4191 #---------------------------------------------------------------------------
4192
4193 class ScrollEvent(CommandEvent):
4194 """
4195 A scroll event holds information about events sent from stand-alone
4196 scrollbars and sliders. Note that scrolled windows do not send
4197 instnaces of this event class, but send the `wx.ScrollWinEvent`
4198 instead.
4199 """
4200 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
4201 __repr__ = _swig_repr
4202 def __init__(self, *args, **kwargs):
4203 """
4204 __init__(self, EventType commandType=wxEVT_NULL, int winid=0, int pos=0,
4205 int orient=0) -> ScrollEvent
4206 """
4207 _core_.ScrollEvent_swiginit(self,_core_.new_ScrollEvent(*args, **kwargs))
4208 def GetOrientation(*args, **kwargs):
4209 """
4210 GetOrientation(self) -> int
4211
4212 Returns wx.HORIZONTAL or wx.VERTICAL, depending on the orientation of
4213 the scrollbar.
4214 """
4215 return _core_.ScrollEvent_GetOrientation(*args, **kwargs)
4216
4217 def GetPosition(*args, **kwargs):
4218 """
4219 GetPosition(self) -> int
4220
4221 Returns the position of the scrollbar.
4222 """
4223 return _core_.ScrollEvent_GetPosition(*args, **kwargs)
4224
4225 def SetOrientation(*args, **kwargs):
4226 """SetOrientation(self, int orient)"""
4227 return _core_.ScrollEvent_SetOrientation(*args, **kwargs)
4228
4229 def SetPosition(*args, **kwargs):
4230 """SetPosition(self, int pos)"""
4231 return _core_.ScrollEvent_SetPosition(*args, **kwargs)
4232
4233 _core_.ScrollEvent_swigregister(ScrollEvent)
4234
4235 #---------------------------------------------------------------------------
4236
4237 class ScrollWinEvent(Event):
4238 """
4239 A wx.ScrollWinEvent holds information about scrolling and is sent from
4240 scrolling windows.
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, EventType commandType=wxEVT_NULL, int pos=0, int orient=0) -> ScrollWinEvent
4247
4248 A wx.ScrollWinEvent holds information about scrolling and is sent from
4249 scrolling windows.
4250 """
4251 _core_.ScrollWinEvent_swiginit(self,_core_.new_ScrollWinEvent(*args, **kwargs))
4252 def GetOrientation(*args, **kwargs):
4253 """
4254 GetOrientation(self) -> int
4255
4256 Returns wx.HORIZONTAL or wx.VERTICAL, depending on the orientation of
4257 the scrollbar.
4258 """
4259 return _core_.ScrollWinEvent_GetOrientation(*args, **kwargs)
4260
4261 def GetPosition(*args, **kwargs):
4262 """
4263 GetPosition(self) -> int
4264
4265 Returns the position of the scrollbar for the thumb track and release
4266 events. Note that this field can't be used for the other events, you
4267 need to query the window itself for the current position in that case.
4268 """
4269 return _core_.ScrollWinEvent_GetPosition(*args, **kwargs)
4270
4271 def SetOrientation(*args, **kwargs):
4272 """SetOrientation(self, int orient)"""
4273 return _core_.ScrollWinEvent_SetOrientation(*args, **kwargs)
4274
4275 def SetPosition(*args, **kwargs):
4276 """SetPosition(self, int pos)"""
4277 return _core_.ScrollWinEvent_SetPosition(*args, **kwargs)
4278
4279 _core_.ScrollWinEvent_swigregister(ScrollWinEvent)
4280
4281 #---------------------------------------------------------------------------
4282
4283 MOUSE_BTN_ANY = _core_.MOUSE_BTN_ANY
4284 MOUSE_BTN_NONE = _core_.MOUSE_BTN_NONE
4285 MOUSE_BTN_LEFT = _core_.MOUSE_BTN_LEFT
4286 MOUSE_BTN_MIDDLE = _core_.MOUSE_BTN_MIDDLE
4287 MOUSE_BTN_RIGHT = _core_.MOUSE_BTN_RIGHT
4288 class MouseEvent(Event):
4289 """
4290 This event class contains information about the events generated by
4291 the mouse: they include mouse buttons press and release events and
4292 mouse move events.
4293
4294 All mouse events involving the buttons use ``wx.MOUSE_BTN_LEFT`` for
4295 the left mouse button, ``wx.MOUSE_BTN_MIDDLE`` for the middle one and
4296 ``wx.MOUSE_BTN_RIGHT`` for the right one. Note that not all mice have
4297 a middle button so a portable application should avoid relying on the
4298 events from it.
4299
4300 Note the difference between methods like `LeftDown` and `LeftIsDown`:
4301 the former returns true when the event corresponds to the left mouse
4302 button click while the latter returns true if the left mouse button is
4303 currently being pressed. For example, when the user is dragging the
4304 mouse you can use `LeftIsDown` to test whether the left mouse button
4305 is (still) depressed. Also, by convention, if `LeftDown` returns true,
4306 `LeftIsDown` will also return true in wxWidgets whatever the
4307 underlying GUI behaviour is (which is platform-dependent). The same
4308 applies, of course, to other mouse buttons as well.
4309 """
4310 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
4311 __repr__ = _swig_repr
4312 def __init__(self, *args, **kwargs):
4313 """
4314 __init__(self, EventType mouseType=wxEVT_NULL) -> MouseEvent
4315
4316 Constructs a wx.MouseEvent. Valid event types are:
4317
4318 * wxEVT_ENTER_WINDOW
4319 * wxEVT_LEAVE_WINDOW
4320 * wxEVT_LEFT_DOWN
4321 * wxEVT_LEFT_UP
4322 * wxEVT_LEFT_DCLICK
4323 * wxEVT_MIDDLE_DOWN
4324 * wxEVT_MIDDLE_UP
4325 * wxEVT_MIDDLE_DCLICK
4326 * wxEVT_RIGHT_DOWN
4327 * wxEVT_RIGHT_UP
4328 * wxEVT_RIGHT_DCLICK
4329 * wxEVT_MOTION
4330 * wxEVT_MOUSEWHEEL
4331 """
4332 _core_.MouseEvent_swiginit(self,_core_.new_MouseEvent(*args, **kwargs))
4333 def IsButton(*args, **kwargs):
4334 """
4335 IsButton(self) -> bool
4336
4337 Returns true if the event was a mouse button event (not necessarily a
4338 button down event - that may be tested using `ButtonDown`).
4339 """
4340 return _core_.MouseEvent_IsButton(*args, **kwargs)
4341
4342 def ButtonDown(*args, **kwargs):
4343 """
4344 ButtonDown(self, int but=MOUSE_BTN_ANY) -> bool
4345
4346 If the argument is omitted, this returns true if the event was any
4347 mouse button down event. Otherwise the argument specifies which
4348 button-down event shold be checked for (see `Button` for the possible
4349 values).
4350 """
4351 return _core_.MouseEvent_ButtonDown(*args, **kwargs)
4352
4353 def ButtonDClick(*args, **kwargs):
4354 """
4355 ButtonDClick(self, int but=MOUSE_BTN_ANY) -> bool
4356
4357 If the argument is omitted, this returns true if the event was any
4358 mouse double click event. Otherwise the argument specifies which
4359 double click event to check for (see `Button` for the possible
4360 values).
4361 """
4362 return _core_.MouseEvent_ButtonDClick(*args, **kwargs)
4363
4364 def ButtonUp(*args, **kwargs):
4365 """
4366 ButtonUp(self, int but=MOUSE_BTN_ANY) -> bool
4367
4368 If the argument is omitted, this returns true if the event was any
4369 mouse button up event. Otherwise the argument specifies which button
4370 up event to check for (see `Button` for the possible values).
4371 """
4372 return _core_.MouseEvent_ButtonUp(*args, **kwargs)
4373
4374 def Button(*args, **kwargs):
4375 """
4376 Button(self, int button) -> bool
4377
4378 Returns true if the identified mouse button is changing state. Valid
4379 values of button are:
4380
4381 ==================== =====================================
4382 wx.MOUSE_BTN_LEFT check if left button was pressed
4383 wx.MOUSE_BTN_MIDDLE check if middle button was pressed
4384 wx.MOUSE_BTN_RIGHT check if right button was pressed
4385 wx.MOUSE_BTN_ANY check if any button was pressed
4386 ==================== =====================================
4387
4388 """
4389 return _core_.MouseEvent_Button(*args, **kwargs)
4390
4391 def ButtonIsDown(*args, **kwargs):
4392 """ButtonIsDown(self, int but) -> bool"""
4393 return _core_.MouseEvent_ButtonIsDown(*args, **kwargs)
4394
4395 def GetButton(*args, **kwargs):
4396 """
4397 GetButton(self) -> int
4398
4399 Returns the mouse button which generated this event or
4400 wx.MOUSE_BTN_NONE if no button is involved (for mouse move, enter or
4401 leave event, for example). Otherwise wx.MOUSE_BTN_LEFT is returned for
4402 the left button down, up and double click events, wx.MOUSE_BTN_MIDDLE
4403 and wx.MOUSE_BTN_RIGHT for the same events for the middle and the
4404 right buttons respectively.
4405 """
4406 return _core_.MouseEvent_GetButton(*args, **kwargs)
4407
4408 def ControlDown(*args, **kwargs):
4409 """
4410 ControlDown(self) -> bool
4411
4412 Returns true if the control key was down at the time of the event.
4413 """
4414 return _core_.MouseEvent_ControlDown(*args, **kwargs)
4415
4416 def MetaDown(*args, **kwargs):
4417 """
4418 MetaDown(self) -> bool
4419
4420 Returns true if the Meta key was down at the time of the event.
4421 """
4422 return _core_.MouseEvent_MetaDown(*args, **kwargs)
4423
4424 def AltDown(*args, **kwargs):
4425 """
4426 AltDown(self) -> bool
4427
4428 Returns true if the Alt key was down at the time of the event.
4429 """
4430 return _core_.MouseEvent_AltDown(*args, **kwargs)
4431
4432 def ShiftDown(*args, **kwargs):
4433 """
4434 ShiftDown(self) -> bool
4435
4436 Returns true if the Shift key was down at the time of the event.
4437 """
4438 return _core_.MouseEvent_ShiftDown(*args, **kwargs)
4439
4440 def CmdDown(*args, **kwargs):
4441 """
4442 CmdDown(self) -> bool
4443
4444 "Cmd" is a pseudo key which is the same as Control for PC and Unix
4445 platforms but the special "Apple" (a.k.a as "Command") key on
4446 Macs. It often makes sense to use it instead of, say, `ControlDown`
4447 because Cmd key is used for the same thing under Mac as Ctrl
4448 elsewhere. The Ctrl key still exists, it's just not used for this
4449 purpose. So for non-Mac platforms this is the same as `ControlDown`
4450 and Macs this is the same as `MetaDown`.
4451 """
4452 return _core_.MouseEvent_CmdDown(*args, **kwargs)
4453
4454 def LeftDown(*args, **kwargs):
4455 """
4456 LeftDown(self) -> bool
4457
4458 Returns true if the left mouse button state changed to down.
4459 """
4460 return _core_.MouseEvent_LeftDown(*args, **kwargs)
4461
4462 def MiddleDown(*args, **kwargs):
4463 """
4464 MiddleDown(self) -> bool
4465
4466 Returns true if the middle mouse button state changed to down.
4467 """
4468 return _core_.MouseEvent_MiddleDown(*args, **kwargs)
4469
4470 def RightDown(*args, **kwargs):
4471 """
4472 RightDown(self) -> bool
4473
4474 Returns true if the right mouse button state changed to down.
4475 """
4476 return _core_.MouseEvent_RightDown(*args, **kwargs)
4477
4478 def LeftUp(*args, **kwargs):
4479 """
4480 LeftUp(self) -> bool
4481
4482 Returns true if the left mouse button state changed to up.
4483 """
4484 return _core_.MouseEvent_LeftUp(*args, **kwargs)
4485
4486 def MiddleUp(*args, **kwargs):
4487 """
4488 MiddleUp(self) -> bool
4489
4490 Returns true if the middle mouse button state changed to up.
4491 """
4492 return _core_.MouseEvent_MiddleUp(*args, **kwargs)
4493
4494 def RightUp(*args, **kwargs):
4495 """
4496 RightUp(self) -> bool
4497
4498 Returns true if the right mouse button state changed to up.
4499 """
4500 return _core_.MouseEvent_RightUp(*args, **kwargs)
4501
4502 def LeftDClick(*args, **kwargs):
4503 """
4504 LeftDClick(self) -> bool
4505
4506 Returns true if the event was a left button double click.
4507 """
4508 return _core_.MouseEvent_LeftDClick(*args, **kwargs)
4509
4510 def MiddleDClick(*args, **kwargs):
4511 """
4512 MiddleDClick(self) -> bool
4513
4514 Returns true if the event was a middle button double click.
4515 """
4516 return _core_.MouseEvent_MiddleDClick(*args, **kwargs)
4517
4518 def RightDClick(*args, **kwargs):
4519 """
4520 RightDClick(self) -> bool
4521
4522 Returns true if the event was a right button double click.
4523 """
4524 return _core_.MouseEvent_RightDClick(*args, **kwargs)
4525
4526 def LeftIsDown(*args, **kwargs):
4527 """
4528 LeftIsDown(self) -> bool
4529
4530 Returns true if the left mouse button is currently down, independent
4531 of the current event type.
4532
4533 Please notice that it is not the same as LeftDown which returns true
4534 if the left mouse button was just pressed. Rather, it describes the
4535 state of the mouse button before the event happened.
4536
4537 This event is usually used in the mouse event handlers which process
4538 "move mouse" messages to determine whether the user is (still)
4539 dragging the mouse.
4540 """
4541 return _core_.MouseEvent_LeftIsDown(*args, **kwargs)
4542
4543 def MiddleIsDown(*args, **kwargs):
4544 """
4545 MiddleIsDown(self) -> bool
4546
4547 Returns true if the middle mouse button is currently down, independent
4548 of the current event type.
4549 """
4550 return _core_.MouseEvent_MiddleIsDown(*args, **kwargs)
4551
4552 def RightIsDown(*args, **kwargs):
4553 """
4554 RightIsDown(self) -> bool
4555
4556 Returns true if the right mouse button is currently down, independent
4557 of the current event type.
4558 """
4559 return _core_.MouseEvent_RightIsDown(*args, **kwargs)
4560
4561 def Dragging(*args, **kwargs):
4562 """
4563 Dragging(self) -> bool
4564
4565 Returns true if this was a dragging event (motion while a button is
4566 depressed).
4567 """
4568 return _core_.MouseEvent_Dragging(*args, **kwargs)
4569
4570 def Moving(*args, **kwargs):
4571 """
4572 Moving(self) -> bool
4573
4574 Returns true if this was a motion event and no mouse buttons were
4575 pressed. If any mouse button is held pressed, then this method returns
4576 false and Dragging returns true.
4577 """
4578 return _core_.MouseEvent_Moving(*args, **kwargs)
4579
4580 def Entering(*args, **kwargs):
4581 """
4582 Entering(self) -> bool
4583
4584 Returns true if the mouse was entering the window.
4585 """
4586 return _core_.MouseEvent_Entering(*args, **kwargs)
4587
4588 def Leaving(*args, **kwargs):
4589 """
4590 Leaving(self) -> bool
4591
4592 Returns true if the mouse was leaving the window.
4593 """
4594 return _core_.MouseEvent_Leaving(*args, **kwargs)
4595
4596 def GetPosition(*args, **kwargs):
4597 """
4598 GetPosition(self) -> Point
4599
4600 Returns the pixel position of the mouse in window coordinates when the
4601 event happened.
4602 """
4603 return _core_.MouseEvent_GetPosition(*args, **kwargs)
4604
4605 def GetPositionTuple(*args, **kwargs):
4606 """
4607 GetPositionTuple() -> (x,y)
4608
4609 Returns the pixel position of the mouse in window coordinates when the
4610 event happened.
4611 """
4612 return _core_.MouseEvent_GetPositionTuple(*args, **kwargs)
4613
4614 def GetLogicalPosition(*args, **kwargs):
4615 """
4616 GetLogicalPosition(self, DC dc) -> Point
4617
4618 Returns the logical mouse position in pixels (i.e. translated
4619 according to the translation set for the DC, which usually indicates
4620 that the window has been scrolled).
4621 """
4622 return _core_.MouseEvent_GetLogicalPosition(*args, **kwargs)
4623
4624 def GetX(*args, **kwargs):
4625 """
4626 GetX(self) -> int
4627
4628 Returns X coordinate of the physical mouse event position.
4629 """
4630 return _core_.MouseEvent_GetX(*args, **kwargs)
4631
4632 def GetY(*args, **kwargs):
4633 """
4634 GetY(self) -> int
4635
4636 Returns Y coordinate of the physical mouse event position.
4637 """
4638 return _core_.MouseEvent_GetY(*args, **kwargs)
4639
4640 def GetWheelRotation(*args, **kwargs):
4641 """
4642 GetWheelRotation(self) -> int
4643
4644 Get wheel rotation, positive or negative indicates direction of
4645 rotation. Current devices all send an event when rotation is equal to
4646 +/-WheelDelta, but this allows for finer resolution devices to be
4647 created in the future. Because of this you shouldn't assume that one
4648 event is equal to 1 line or whatever, but you should be able to either
4649 do partial line scrolling or wait until +/-WheelDelta rotation values
4650 have been accumulated before scrolling.
4651 """
4652 return _core_.MouseEvent_GetWheelRotation(*args, **kwargs)
4653
4654 def GetWheelDelta(*args, **kwargs):
4655 """
4656 GetWheelDelta(self) -> int
4657
4658 Get wheel delta, normally 120. This is the threshold for action to be
4659 taken, and one such action (for example, scrolling one increment)
4660 should occur for each delta.
4661 """
4662 return _core_.MouseEvent_GetWheelDelta(*args, **kwargs)
4663
4664 def GetLinesPerAction(*args, **kwargs):
4665 """
4666 GetLinesPerAction(self) -> int
4667
4668 Returns the configured number of lines (or whatever) to be scrolled
4669 per wheel action. Defaults to three.
4670 """
4671 return _core_.MouseEvent_GetLinesPerAction(*args, **kwargs)
4672
4673 def IsPageScroll(*args, **kwargs):
4674 """
4675 IsPageScroll(self) -> bool
4676
4677 Returns true if the system has been setup to do page scrolling with
4678 the mouse wheel instead of line scrolling.
4679 """
4680 return _core_.MouseEvent_IsPageScroll(*args, **kwargs)
4681
4682 m_x = property(_core_.MouseEvent_m_x_get, _core_.MouseEvent_m_x_set)
4683 m_y = property(_core_.MouseEvent_m_y_get, _core_.MouseEvent_m_y_set)
4684 m_leftDown = property(_core_.MouseEvent_m_leftDown_get, _core_.MouseEvent_m_leftDown_set)
4685 m_middleDown = property(_core_.MouseEvent_m_middleDown_get, _core_.MouseEvent_m_middleDown_set)
4686 m_rightDown = property(_core_.MouseEvent_m_rightDown_get, _core_.MouseEvent_m_rightDown_set)
4687 m_controlDown = property(_core_.MouseEvent_m_controlDown_get, _core_.MouseEvent_m_controlDown_set)
4688 m_shiftDown = property(_core_.MouseEvent_m_shiftDown_get, _core_.MouseEvent_m_shiftDown_set)
4689 m_altDown = property(_core_.MouseEvent_m_altDown_get, _core_.MouseEvent_m_altDown_set)
4690 m_metaDown = property(_core_.MouseEvent_m_metaDown_get, _core_.MouseEvent_m_metaDown_set)
4691 m_wheelRotation = property(_core_.MouseEvent_m_wheelRotation_get, _core_.MouseEvent_m_wheelRotation_set)
4692 m_wheelDelta = property(_core_.MouseEvent_m_wheelDelta_get, _core_.MouseEvent_m_wheelDelta_set)
4693 m_linesPerAction = property(_core_.MouseEvent_m_linesPerAction_get, _core_.MouseEvent_m_linesPerAction_set)
4694 _core_.MouseEvent_swigregister(MouseEvent)
4695
4696 #---------------------------------------------------------------------------
4697
4698 class SetCursorEvent(Event):
4699 """
4700 A SetCursorEvent is generated when the mouse cursor is about to be set
4701 as a result of mouse motion. This event gives the application the
4702 chance to perform specific mouse cursor processing based on the
4703 current position of the mouse within the window. Use the `SetCursor`
4704 method to specify the cursor you want to be displayed.
4705 """
4706 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
4707 __repr__ = _swig_repr
4708 def __init__(self, *args, **kwargs):
4709 """
4710 __init__(self, int x=0, int y=0) -> SetCursorEvent
4711
4712 Construct a new `wx.SetCursorEvent`.
4713 """
4714 _core_.SetCursorEvent_swiginit(self,_core_.new_SetCursorEvent(*args, **kwargs))
4715 def GetX(*args, **kwargs):
4716 """
4717 GetX(self) -> int
4718
4719 Returns the X coordinate of the mouse in client coordinates.
4720 """
4721 return _core_.SetCursorEvent_GetX(*args, **kwargs)
4722
4723 def GetY(*args, **kwargs):
4724 """
4725 GetY(self) -> int
4726
4727 Returns the Y coordinate of the mouse in client coordinates.
4728 """
4729 return _core_.SetCursorEvent_GetY(*args, **kwargs)
4730
4731 def SetCursor(*args, **kwargs):
4732 """
4733 SetCursor(self, Cursor cursor)
4734
4735 Sets the cursor associated with this event.
4736 """
4737 return _core_.SetCursorEvent_SetCursor(*args, **kwargs)
4738
4739 def GetCursor(*args, **kwargs):
4740 """
4741 GetCursor(self) -> Cursor
4742
4743 Returns a reference to the cursor specified by this event.
4744 """
4745 return _core_.SetCursorEvent_GetCursor(*args, **kwargs)
4746
4747 def HasCursor(*args, **kwargs):
4748 """
4749 HasCursor(self) -> bool
4750
4751 Returns true if the cursor specified by this event is a valid cursor.
4752 """
4753 return _core_.SetCursorEvent_HasCursor(*args, **kwargs)
4754
4755 _core_.SetCursorEvent_swigregister(SetCursorEvent)
4756
4757 #---------------------------------------------------------------------------
4758
4759 class KeyEvent(Event):
4760 """
4761 This event class contains information about keypress and character
4762 events. These events are only sent to the widget that currently has
4763 the keyboard focus.
4764
4765 Notice that there are three different kinds of keyboard events in
4766 wxWidgets: key down and up events and char events. The difference
4767 between the first two is clear - the first corresponds to a key press
4768 and the second to a key release - otherwise they are identical. Just
4769 note that if the key is maintained in a pressed state you will
4770 typically get a lot of (automatically generated) down events but only
4771 one up so it is wrong to assume that there is one up event
4772 corresponding to each down one.
4773
4774 Both key events provide untranslated key codes while the char event
4775 carries the translated one. The untranslated code for alphanumeric
4776 keys is always an upper case value. For the other keys it is one of
4777 WXK_XXX values from the keycodes table. The translated key is, in
4778 general, the character the user expects to appear as the result of the
4779 key combination when typing the text into a text entry zone, for
4780 example.
4781
4782 A few examples to clarify this (all assume that CAPS LOCK is unpressed
4783 and the standard US keyboard): when the 'A' key is pressed, the key
4784 down event key code is equal to ASCII A == 65. But the char event key
4785 code is ASCII a == 97. On the other hand, if you press both SHIFT and
4786 'A' keys simultaneously , the key code in key down event will still be
4787 just 'A' while the char event key code parameter will now be 'A' as
4788 well.
4789
4790 Although in this simple case it is clear that the correct key code
4791 could be found in the key down event handler by checking the value
4792 returned by `ShiftDown`, in general you should use EVT_CHAR for this
4793 as for non alphanumeric keys or non-US keyboard layouts the
4794 translation is keyboard-layout dependent and can only be done properly
4795 by the system itself.
4796
4797 Another kind of translation is done when the control key is pressed:
4798 for example, for CTRL-A key press the key down event still carries the
4799 same key code 'A' as usual but the char event will have key code of 1,
4800 the ASCII value of this key combination.
4801
4802 You may discover how the other keys on your system behave
4803 interactively by running the KeyEvents sample in the wxPython demo and
4804 pressing some keys while the blue box at the top has the keyboard
4805 focus.
4806
4807 **Note**: If a key down event is caught and the event handler does not
4808 call event.Skip() then the coresponding char event will not
4809 happen. This is by design and enables the programs that handle both
4810 types of events to be a bit simpler.
4811
4812 **Note for Windows programmers**: The key and char events in wxWidgets
4813 are similar to but slightly different from Windows WM_KEYDOWN and
4814 WM_CHAR events. In particular, Alt-x combination will generate a char
4815 event in wxWidgets (unless it is used as an accelerator).
4816
4817 **Tip**: be sure to call event.Skip() for events that you don't
4818 process in key event function, otherwise menu shortcuts may cease to
4819 work under Windows.
4820
4821 """
4822 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
4823 __repr__ = _swig_repr
4824 def __init__(self, *args, **kwargs):
4825 """
4826 __init__(self, EventType eventType=wxEVT_NULL) -> KeyEvent
4827
4828 Construct a new `wx.KeyEvent`. Valid event types are:
4829 *
4830 """
4831 _core_.KeyEvent_swiginit(self,_core_.new_KeyEvent(*args, **kwargs))
4832 def GetModifiers(*args, **kwargs):
4833 """
4834 GetModifiers(self) -> int
4835
4836 Returns a bitmask of the current modifier settings. Can be used to
4837 check if the key event has exactly the given modifiers without having
4838 to explicitly check that the other modifiers are not down. For
4839 example::
4840
4841 if event.GetModifers() == wx.MOD_CONTROL:
4842 DoSomething()
4843
4844 """
4845 return _core_.KeyEvent_GetModifiers(*args, **kwargs)
4846
4847 def ControlDown(*args, **kwargs):
4848 """
4849 ControlDown(self) -> bool
4850
4851 Returns ``True`` if the Control key was down at the time of the event.
4852 """
4853 return _core_.KeyEvent_ControlDown(*args, **kwargs)
4854
4855 def MetaDown(*args, **kwargs):
4856 """
4857 MetaDown(self) -> bool
4858
4859 Returns ``True`` if the Meta key was down at the time of the event.
4860 """
4861 return _core_.KeyEvent_MetaDown(*args, **kwargs)
4862
4863 def AltDown(*args, **kwargs):
4864 """
4865 AltDown(self) -> bool
4866
4867 Returns ``True`` if the Alt key was down at the time of the event.
4868 """
4869 return _core_.KeyEvent_AltDown(*args, **kwargs)
4870
4871 def ShiftDown(*args, **kwargs):
4872 """
4873 ShiftDown(self) -> bool
4874
4875 Returns ``True`` if the Shift key was down at the time of the event.
4876 """
4877 return _core_.KeyEvent_ShiftDown(*args, **kwargs)
4878
4879 def CmdDown(*args, **kwargs):
4880 """
4881 CmdDown(self) -> bool
4882
4883 "Cmd" is a pseudo key which is the same as Control for PC and Unix
4884 platforms but the special "Apple" (a.k.a as "Command") key on
4885 Macs. It makes often sense to use it instead of, say, `ControlDown`
4886 because Cmd key is used for the same thing under Mac as Ctrl
4887 elsewhere. The Ctrl still exists, it's just not used for this
4888 purpose. So for non-Mac platforms this is the same as `ControlDown`
4889 and Macs this is the same as `MetaDown`.
4890 """
4891 return _core_.KeyEvent_CmdDown(*args, **kwargs)
4892
4893 def HasModifiers(*args, **kwargs):
4894 """
4895 HasModifiers(self) -> bool
4896
4897 Returns true if either CTRL or ALT keys was down at the time of the
4898 key event. Note that this function does not take into account neither
4899 SHIFT nor META key states (the reason for ignoring the latter is that
4900 it is common for NUMLOCK key to be configured as META under X but the
4901 key presses even while NUMLOCK is on should be still processed
4902 normally).
4903 """
4904 return _core_.KeyEvent_HasModifiers(*args, **kwargs)
4905
4906 def GetKeyCode(*args, **kwargs):
4907 """
4908 GetKeyCode(self) -> int
4909
4910 Returns the virtual key code. ASCII events return normal ASCII values,
4911 while non-ASCII events return values such as WXK_LEFT for the left
4912 cursor key. See `wx.KeyEvent` for a full list of the virtual key
4913 codes.
4914
4915 Note that in Unicode build, the returned value is meaningful only if
4916 the user entered a character that can be represented in current
4917 locale's default charset. You can obtain the corresponding Unicode
4918 character using `GetUnicodeKey`.
4919 """
4920 return _core_.KeyEvent_GetKeyCode(*args, **kwargs)
4921
4922 def GetUnicodeKey(*args, **kwargs):
4923 """
4924 GetUnicodeKey(self) -> int
4925
4926 Returns the Unicode character corresponding to this key event. This
4927 function is only meaningfule in a Unicode build of wxPython.
4928 """
4929 return _core_.KeyEvent_GetUnicodeKey(*args, **kwargs)
4930
4931 GetUniChar = GetUnicodeKey
4932 def SetUnicodeKey(*args, **kwargs):
4933 """
4934 SetUnicodeKey(self, int uniChar)
4935
4936 Set the Unicode value of the key event, but only if this is a Unicode
4937 build of wxPython.
4938 """
4939 return _core_.KeyEvent_SetUnicodeKey(*args, **kwargs)
4940
4941 def GetRawKeyCode(*args, **kwargs):
4942 """
4943 GetRawKeyCode(self) -> unsigned int
4944
4945 Returns the raw key code for this event. This is a platform-dependent
4946 scan code which should only be used in advanced
4947 applications. Currently the raw key codes are not supported by all
4948 ports.
4949 """
4950 return _core_.KeyEvent_GetRawKeyCode(*args, **kwargs)
4951
4952 def GetRawKeyFlags(*args, **kwargs):
4953 """
4954 GetRawKeyFlags(self) -> unsigned int
4955
4956 Returns the low level key flags for this event. The flags are
4957 platform-dependent and should only be used in advanced applications.
4958 Currently the raw key flags are not supported by all ports.
4959 """
4960 return _core_.KeyEvent_GetRawKeyFlags(*args, **kwargs)
4961
4962 def GetPosition(*args, **kwargs):
4963 """
4964 GetPosition(self) -> Point
4965
4966 Find the position of the event, if applicable.
4967 """
4968 return _core_.KeyEvent_GetPosition(*args, **kwargs)
4969
4970 def GetPositionTuple(*args, **kwargs):
4971 """
4972 GetPositionTuple() -> (x,y)
4973
4974 Find the position of the event, if applicable.
4975 """
4976 return _core_.KeyEvent_GetPositionTuple(*args, **kwargs)
4977
4978 def GetX(*args, **kwargs):
4979 """
4980 GetX(self) -> int
4981
4982 Returns the X position (in client coordinates) of the event, if
4983 applicable.
4984 """
4985 return _core_.KeyEvent_GetX(*args, **kwargs)
4986
4987 def GetY(*args, **kwargs):
4988 """
4989 GetY(self) -> int
4990
4991 Returns the Y position (in client coordinates) of the event, if
4992 applicable.
4993 """
4994 return _core_.KeyEvent_GetY(*args, **kwargs)
4995
4996 m_x = property(_core_.KeyEvent_m_x_get, _core_.KeyEvent_m_x_set)
4997 m_y = property(_core_.KeyEvent_m_y_get, _core_.KeyEvent_m_y_set)
4998 m_keyCode = property(_core_.KeyEvent_m_keyCode_get, _core_.KeyEvent_m_keyCode_set)
4999 m_controlDown = property(_core_.KeyEvent_m_controlDown_get, _core_.KeyEvent_m_controlDown_set)
5000 m_shiftDown = property(_core_.KeyEvent_m_shiftDown_get, _core_.KeyEvent_m_shiftDown_set)
5001 m_altDown = property(_core_.KeyEvent_m_altDown_get, _core_.KeyEvent_m_altDown_set)
5002 m_metaDown = property(_core_.KeyEvent_m_metaDown_get, _core_.KeyEvent_m_metaDown_set)
5003 m_scanCode = property(_core_.KeyEvent_m_scanCode_get, _core_.KeyEvent_m_scanCode_set)
5004 m_rawCode = property(_core_.KeyEvent_m_rawCode_get, _core_.KeyEvent_m_rawCode_set)
5005 m_rawFlags = property(_core_.KeyEvent_m_rawFlags_get, _core_.KeyEvent_m_rawFlags_set)
5006 KeyCode = property(GetKeyCode,doc="See `GetKeyCode`")
5007 Modifiers = property(GetModifiers,doc="See `GetModifiers`")
5008 Position = property(GetPosition,doc="See `GetPosition`")
5009 RawKeyCode = property(GetRawKeyCode,doc="See `GetRawKeyCode`")
5010 RawKeyFlags = property(GetRawKeyFlags,doc="See `GetRawKeyFlags`")
5011 UnicodeKey = property(GetUnicodeKey,SetUnicodeKey,doc="See `GetUnicodeKey` and `SetUnicodeKey`")
5012 X = property(GetX,doc="See `GetX`")
5013 Y = property(GetY,doc="See `GetY`")
5014 _core_.KeyEvent_swigregister(KeyEvent)
5015
5016 #---------------------------------------------------------------------------
5017
5018 class SizeEvent(Event):
5019 """
5020 A size event holds information about size change events. The EVT_SIZE
5021 handler function will be called when the window it is bound to has
5022 been resized.
5023
5024 Note that the size passed is of the whole window: call
5025 `wx.Window.GetClientSize` for the area which may be used by the
5026 application.
5027
5028 When a window is resized, usually only a small part of the window is
5029 damaged and and that area is all that is in the update region for the
5030 next paint event. However, if your drawing depends on the size of the
5031 window, you may need to clear the DC explicitly and repaint the whole
5032 window. In which case, you may need to call `wx.Window.Refresh` to
5033 invalidate the entire window.
5034
5035 """
5036 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
5037 __repr__ = _swig_repr
5038 def __init__(self, *args, **kwargs):
5039 """
5040 __init__(self, Size sz=DefaultSize, int winid=0) -> SizeEvent
5041
5042 Construct a new ``wx.SizeEvent``.
5043 """
5044 _core_.SizeEvent_swiginit(self,_core_.new_SizeEvent(*args, **kwargs))
5045 def GetSize(*args, **kwargs):
5046 """
5047 GetSize(self) -> Size
5048
5049 Returns the entire size of the window generating the size change
5050 event.
5051 """
5052 return _core_.SizeEvent_GetSize(*args, **kwargs)
5053
5054 def GetRect(*args, **kwargs):
5055 """GetRect(self) -> Rect"""
5056 return _core_.SizeEvent_GetRect(*args, **kwargs)
5057
5058 def SetRect(*args, **kwargs):
5059 """SetRect(self, Rect rect)"""
5060 return _core_.SizeEvent_SetRect(*args, **kwargs)
5061
5062 def SetSize(*args, **kwargs):
5063 """SetSize(self, Size size)"""
5064 return _core_.SizeEvent_SetSize(*args, **kwargs)
5065
5066 m_size = property(_core_.SizeEvent_m_size_get, _core_.SizeEvent_m_size_set)
5067 m_rect = property(_core_.SizeEvent_m_rect_get, _core_.SizeEvent_m_rect_set)
5068 _core_.SizeEvent_swigregister(SizeEvent)
5069
5070 #---------------------------------------------------------------------------
5071
5072 class MoveEvent(Event):
5073 """
5074 This event object is sent for EVT_MOVE event bindings when a window is
5075 moved to a new position.
5076 """
5077 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
5078 __repr__ = _swig_repr
5079 def __init__(self, *args, **kwargs):
5080 """
5081 __init__(self, Point pos=DefaultPosition, int winid=0) -> MoveEvent
5082
5083 Constructor.
5084 """
5085 _core_.MoveEvent_swiginit(self,_core_.new_MoveEvent(*args, **kwargs))
5086 def GetPosition(*args, **kwargs):
5087 """
5088 GetPosition(self) -> Point
5089
5090 Returns the position of the window generating the move change event.
5091 """
5092 return _core_.MoveEvent_GetPosition(*args, **kwargs)
5093
5094 def GetRect(*args, **kwargs):
5095 """GetRect(self) -> Rect"""
5096 return _core_.MoveEvent_GetRect(*args, **kwargs)
5097
5098 def SetRect(*args, **kwargs):
5099 """SetRect(self, Rect rect)"""
5100 return _core_.MoveEvent_SetRect(*args, **kwargs)
5101
5102 def SetPosition(*args, **kwargs):
5103 """SetPosition(self, Point pos)"""
5104 return _core_.MoveEvent_SetPosition(*args, **kwargs)
5105
5106 m_pos = property(GetPosition, SetPosition)
5107 m_rect = property(GetRect, SetRect)
5108
5109 _core_.MoveEvent_swigregister(MoveEvent)
5110
5111 #---------------------------------------------------------------------------
5112
5113 class PaintEvent(Event):
5114 """
5115 A paint event is sent when a window's contents needs to be repainted.
5116 Note that in an EVT_PAINT handler the application must *always* create
5117 a `wx.PaintDC` object, even if you do not use it. Otherwise MS
5118 Windows assumes that the window has not been painted yet and will send
5119 the event again, causing endless refreshes.
5120
5121 You can optimize painting by retrieving the rectangles that have been
5122 damaged using `wx.Window.GetUpdateRegion` and/or `wx.RegionIterator`,
5123 and only repainting these rectangles. The rectangles are in terms of
5124 the client area, and are unscrolled, so you will need to do some
5125 calculations using the current view position to obtain logical,
5126 scrolled units.
5127
5128 """
5129 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
5130 __repr__ = _swig_repr
5131 def __init__(self, *args, **kwargs):
5132 """__init__(self, int Id=0) -> PaintEvent"""
5133 _core_.PaintEvent_swiginit(self,_core_.new_PaintEvent(*args, **kwargs))
5134 _core_.PaintEvent_swigregister(PaintEvent)
5135
5136 class NcPaintEvent(Event):
5137 """Proxy of C++ NcPaintEvent class"""
5138 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
5139 __repr__ = _swig_repr
5140 def __init__(self, *args, **kwargs):
5141 """__init__(self, int winid=0) -> NcPaintEvent"""
5142 _core_.NcPaintEvent_swiginit(self,_core_.new_NcPaintEvent(*args, **kwargs))
5143 _core_.NcPaintEvent_swigregister(NcPaintEvent)
5144
5145 #---------------------------------------------------------------------------
5146
5147 class EraseEvent(Event):
5148 """
5149 An erase event is sent whenever the background of a window needs to be
5150 repainted. To intercept this event use the EVT_ERASE_BACKGROUND event
5151 binder. On some platforms, such as GTK+, this event is simulated
5152 (simply generated just before the paint event) and may cause flicker.
5153
5154 To paint a custom background use the `GetDC` method and use the returned
5155 device context if it is not ``None``, otherwise create a temporary
5156 `wx.ClientDC` and draw on that.
5157
5158 """
5159 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
5160 __repr__ = _swig_repr
5161 def __init__(self, *args, **kwargs):
5162 """
5163 __init__(self, int Id=0, DC dc=None) -> EraseEvent
5164
5165 Constructor
5166 """
5167 _core_.EraseEvent_swiginit(self,_core_.new_EraseEvent(*args, **kwargs))
5168 def GetDC(*args, **kwargs):
5169 """
5170 GetDC(self) -> DC
5171
5172 Returns the device context the event handler should draw upon. If
5173 ``None`` is returned then create a temporary `wx.ClientDC` and use
5174 that instead.
5175 """
5176 return _core_.EraseEvent_GetDC(*args, **kwargs)
5177
5178 DC = property(GetDC,doc="See `GetDC`")
5179 _core_.EraseEvent_swigregister(EraseEvent)
5180
5181 #---------------------------------------------------------------------------
5182
5183 class FocusEvent(Event):
5184 """
5185 A focus event is sent when a window's focus changes. The window losing
5186 focus receives an EVT_KILL_FOCUS event while the window gaining it
5187 gets an EVT_SET_FOCUS event.
5188
5189 Notice that the set focus event happens both when the user gives focus
5190 to the window (whether using the mouse or keyboard) and when it is
5191 done from the program itself using `wx.Window.SetFocus`.
5192
5193 """
5194 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
5195 __repr__ = _swig_repr
5196 def __init__(self, *args, **kwargs):
5197 """
5198 __init__(self, EventType type=wxEVT_NULL, int winid=0) -> FocusEvent
5199
5200 Constructor
5201 """
5202 _core_.FocusEvent_swiginit(self,_core_.new_FocusEvent(*args, **kwargs))
5203 def GetWindow(*args, **kwargs):
5204 """
5205 GetWindow(self) -> Window
5206
5207 Returns the other window associated with this event, that is the
5208 window which had the focus before for the EVT_SET_FOCUS event and the
5209 window which is going to receive focus for the wxEVT_KILL_FOCUS event.
5210
5211 Warning: the window returned may be None!
5212 """
5213 return _core_.FocusEvent_GetWindow(*args, **kwargs)
5214
5215 def SetWindow(*args, **kwargs):
5216 """SetWindow(self, Window win)"""
5217 return _core_.FocusEvent_SetWindow(*args, **kwargs)
5218
5219 Window = property(GetWindow,SetWindow,doc="See `GetWindow` and `SetWindow`")
5220 _core_.FocusEvent_swigregister(FocusEvent)
5221
5222 #---------------------------------------------------------------------------
5223
5224 class ChildFocusEvent(CommandEvent):
5225 """
5226 wx.ChildFocusEvent notifies the parent that a child has received the
5227 focus. Unlike `wx.FocusEvent` it is propagated up the window
5228 heirarchy.
5229 """
5230 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
5231 __repr__ = _swig_repr
5232 def __init__(self, *args, **kwargs):
5233 """
5234 __init__(self, Window win=None) -> ChildFocusEvent
5235
5236 Constructor
5237 """
5238 _core_.ChildFocusEvent_swiginit(self,_core_.new_ChildFocusEvent(*args, **kwargs))
5239 def GetWindow(*args, **kwargs):
5240 """
5241 GetWindow(self) -> Window
5242
5243 The window which has just received the focus.
5244 """
5245 return _core_.ChildFocusEvent_GetWindow(*args, **kwargs)
5246
5247 Window = property(GetWindow,doc="See `GetWindow`")
5248 _core_.ChildFocusEvent_swigregister(ChildFocusEvent)
5249
5250 #---------------------------------------------------------------------------
5251
5252 class ActivateEvent(Event):
5253 """
5254 An activate event is sent when a top-level window or the entire
5255 application is being activated or deactivated.
5256
5257 A top-level window (a dialog or frame) receives an activate event when
5258 is being activated or deactivated. This is indicated visually by the
5259 title bar changing colour, and a subwindow gaining the keyboard focus.
5260 An application is activated or deactivated when one of its frames
5261 becomes activated, or a frame becomes inactivate resulting in all
5262 application frames being inactive.
5263
5264 Please note that usually you should call event.Skip() in your handlers
5265 for these events so the default handlers will still be called, as not
5266 doing so can result in strange effects.
5267
5268 """
5269 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
5270 __repr__ = _swig_repr
5271 def __init__(self, *args, **kwargs):
5272 """
5273 __init__(self, EventType type=wxEVT_NULL, bool active=True, int Id=0) -> ActivateEvent
5274
5275 Constructor
5276 """
5277 _core_.ActivateEvent_swiginit(self,_core_.new_ActivateEvent(*args, **kwargs))
5278 def GetActive(*args, **kwargs):
5279 """
5280 GetActive(self) -> bool
5281
5282 Returns true if the application or window is being activated, false
5283 otherwise.
5284 """
5285 return _core_.ActivateEvent_GetActive(*args, **kwargs)
5286
5287 Active = property(GetActive,doc="See `GetActive`")
5288 _core_.ActivateEvent_swigregister(ActivateEvent)
5289
5290 #---------------------------------------------------------------------------
5291
5292 class InitDialogEvent(Event):
5293 """
5294 A wx.InitDialogEvent is sent as a dialog is being initialised, or for
5295 any window when `wx.Window.InitDialog` is called. Handlers for this
5296 event can transfer data to the window, or anything else that should be
5297 done before the user begins editing the form. The default handler
5298 calls `wx.Window.TransferDataToWindow`.
5299 """
5300 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
5301 __repr__ = _swig_repr
5302 def __init__(self, *args, **kwargs):
5303 """
5304 __init__(self, int Id=0) -> InitDialogEvent
5305
5306 Constructor
5307 """
5308 _core_.InitDialogEvent_swiginit(self,_core_.new_InitDialogEvent(*args, **kwargs))
5309 _core_.InitDialogEvent_swigregister(InitDialogEvent)
5310
5311 #---------------------------------------------------------------------------
5312
5313 class MenuEvent(Event):
5314 """
5315 This class is used for a variety of menu-related events. Note that
5316 these do not include menu command events, which are handled by sending
5317 `wx.CommandEvent` objects.
5318
5319 The default handler for wx.EVT_MENU_HIGHLIGHT displays menu item help
5320 text in the first field of the status bar.
5321 """
5322 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
5323 __repr__ = _swig_repr
5324 def __init__(self, *args, **kwargs):
5325 """
5326 __init__(self, EventType type=wxEVT_NULL, int winid=0, Menu menu=None) -> MenuEvent
5327
5328 Constructor
5329 """
5330 _core_.MenuEvent_swiginit(self,_core_.new_MenuEvent(*args, **kwargs))
5331 def GetMenuId(*args, **kwargs):
5332 """
5333 GetMenuId(self) -> int
5334
5335 Returns the menu identifier associated with the event. This method
5336 should be only used with the HIGHLIGHT events.
5337 """
5338 return _core_.MenuEvent_GetMenuId(*args, **kwargs)
5339
5340 def IsPopup(*args, **kwargs):
5341 """
5342 IsPopup(self) -> bool
5343
5344 Returns ``True`` if the menu which is being opened or closed is a
5345 popup menu, ``False`` if it is a normal one. This method should only
5346 be used with the OPEN and CLOSE events.
5347 """
5348 return _core_.MenuEvent_IsPopup(*args, **kwargs)
5349
5350 def GetMenu(*args, **kwargs):
5351 """
5352 GetMenu(self) -> Menu
5353
5354 Returns the menu which is being opened or closed. This method should
5355 only be used with the OPEN and CLOSE events.
5356 """
5357 return _core_.MenuEvent_GetMenu(*args, **kwargs)
5358
5359 _core_.MenuEvent_swigregister(MenuEvent)
5360
5361 #---------------------------------------------------------------------------
5362
5363 class CloseEvent(Event):
5364 """
5365 This event class contains information about window and session close
5366 events.
5367
5368 The handler function for EVT_CLOSE is called when the user has tried
5369 to close a a frame or dialog box using the window manager controls or
5370 the system menu. It can also be invoked by the application itself
5371 programmatically, for example by calling the `wx.Window.Close`
5372 function.
5373
5374 You should check whether the application is forcing the deletion of
5375 the window using `CanVeto`. If it returns ``False``, you must destroy
5376 the window using `wx.Window.Destroy`. If the return value is ``True``,
5377 it is up to you whether you respond by destroying the window or not.
5378 For example you may wish to display a message dialog prompting to save
5379 files or to cancel the close.
5380
5381 If you don't destroy the window, you should call `Veto` to let the
5382 calling code know that you did not destroy the window. This allows the
5383 `wx.Window.Close` function to return ``True`` or ``False`` depending
5384 on whether the close instruction was honored or not.
5385 """
5386 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
5387 __repr__ = _swig_repr
5388 def __init__(self, *args, **kwargs):
5389 """
5390 __init__(self, EventType type=wxEVT_NULL, int winid=0) -> CloseEvent
5391
5392 Constructor.
5393 """
5394 _core_.CloseEvent_swiginit(self,_core_.new_CloseEvent(*args, **kwargs))
5395 def SetLoggingOff(*args, **kwargs):
5396 """
5397 SetLoggingOff(self, bool logOff)
5398
5399 Sets the 'logging off' flag.
5400 """
5401 return _core_.CloseEvent_SetLoggingOff(*args, **kwargs)
5402
5403 def GetLoggingOff(*args, **kwargs):
5404 """
5405 GetLoggingOff(self) -> bool
5406
5407 Returns ``True`` if the user is logging off or ``False`` if the
5408 system is shutting down. This method can only be called for end
5409 session and query end session events, it doesn't make sense for close
5410 window event.
5411 """
5412 return _core_.CloseEvent_GetLoggingOff(*args, **kwargs)
5413
5414 def Veto(*args, **kwargs):
5415 """
5416 Veto(self, bool veto=True)
5417
5418 Call this from your event handler to veto a system shutdown or to
5419 signal to the calling application that a window close did not happen.
5420
5421 You can only veto a shutdown or close if `CanVeto` returns true.
5422 """
5423 return _core_.CloseEvent_Veto(*args, **kwargs)
5424
5425 def GetVeto(*args, **kwargs):
5426 """GetVeto(self) -> bool"""
5427 return _core_.CloseEvent_GetVeto(*args, **kwargs)
5428
5429 def SetCanVeto(*args, **kwargs):
5430 """
5431 SetCanVeto(self, bool canVeto)
5432
5433 Sets the 'can veto' flag.
5434 """
5435 return _core_.CloseEvent_SetCanVeto(*args, **kwargs)
5436
5437 def CanVeto(*args, **kwargs):
5438 """
5439 CanVeto(self) -> bool
5440
5441 Returns true if you can veto a system shutdown or a window close
5442 event. Vetoing a window close event is not possible if the calling
5443 code wishes to force the application to exit, and so this function
5444 must be called to check this.
5445 """
5446 return _core_.CloseEvent_CanVeto(*args, **kwargs)
5447
5448 LoggingOff = property(GetLoggingOff,SetLoggingOff,doc="See `GetLoggingOff` and `SetLoggingOff`")
5449 _core_.CloseEvent_swigregister(CloseEvent)
5450
5451 #---------------------------------------------------------------------------
5452
5453 class ShowEvent(Event):
5454 """An EVT_SHOW event is sent when a window is shown or hidden."""
5455 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
5456 __repr__ = _swig_repr
5457 def __init__(self, *args, **kwargs):
5458 """
5459 __init__(self, int winid=0, bool show=False) -> ShowEvent
5460
5461 An EVT_SHOW event is sent when a window is shown or hidden.
5462 """
5463 _core_.ShowEvent_swiginit(self,_core_.new_ShowEvent(*args, **kwargs))
5464 def SetShow(*args, **kwargs):
5465 """SetShow(self, bool show)"""
5466 return _core_.ShowEvent_SetShow(*args, **kwargs)
5467
5468 def GetShow(*args, **kwargs):
5469 """GetShow(self) -> bool"""
5470 return _core_.ShowEvent_GetShow(*args, **kwargs)
5471
5472 _core_.ShowEvent_swigregister(ShowEvent)
5473
5474 #---------------------------------------------------------------------------
5475
5476 class IconizeEvent(Event):
5477 """
5478 An EVT_ICONIZE event is sent when a frame is iconized (minimized) or
5479 restored.
5480 """
5481 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
5482 __repr__ = _swig_repr
5483 def __init__(self, *args, **kwargs):
5484 """
5485 __init__(self, int id=0, bool iconized=True) -> IconizeEvent
5486
5487 An EVT_ICONIZE event is sent when a frame is iconized (minimized) or
5488 restored.
5489 """
5490 _core_.IconizeEvent_swiginit(self,_core_.new_IconizeEvent(*args, **kwargs))
5491 def Iconized(*args, **kwargs):
5492 """
5493 Iconized(self) -> bool
5494
5495 Returns ``True`` if the frame has been iconized, ``False`` if it has
5496 been restored.
5497 """
5498 return _core_.IconizeEvent_Iconized(*args, **kwargs)
5499
5500 _core_.IconizeEvent_swigregister(IconizeEvent)
5501
5502 #---------------------------------------------------------------------------
5503
5504 class MaximizeEvent(Event):
5505 """An EVT_MAXIMIZE event is sent when a frame is maximized or restored."""
5506 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
5507 __repr__ = _swig_repr
5508 def __init__(self, *args, **kwargs):
5509 """
5510 __init__(self, int id=0) -> MaximizeEvent
5511
5512 An EVT_MAXIMIZE event is sent when a frame is maximized or restored.
5513 """
5514 _core_.MaximizeEvent_swiginit(self,_core_.new_MaximizeEvent(*args, **kwargs))
5515 _core_.MaximizeEvent_swigregister(MaximizeEvent)
5516
5517 #---------------------------------------------------------------------------
5518
5519 class DropFilesEvent(Event):
5520 """
5521 This class is used for drop files events, that is, when files have
5522 been dropped onto the window. This functionality is only available
5523 under Windows. The window must have previously been enabled for
5524 dropping by calling `wx.Window.DragAcceptFiles`.
5525
5526 Important note: this is a separate implementation to the more general
5527 drag and drop implementation using `wx.FileDropTarget`, and etc. This
5528 implementation uses the older, Windows message-based approach of
5529 dropping files.
5530
5531 Use wx.EVT_DROP_FILES to bind an event handler to receive file drop
5532 events.
5533
5534 """
5535 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
5536 def __init__(self): raise AttributeError, "No constructor defined"
5537 __repr__ = _swig_repr
5538 def GetPosition(*args, **kwargs):
5539 """
5540 GetPosition(self) -> Point
5541
5542 Returns the position at which the files were dropped.
5543 """
5544 return _core_.DropFilesEvent_GetPosition(*args, **kwargs)
5545
5546 def GetNumberOfFiles(*args, **kwargs):
5547 """
5548 GetNumberOfFiles(self) -> int
5549
5550 Returns the number of files dropped.
5551 """
5552 return _core_.DropFilesEvent_GetNumberOfFiles(*args, **kwargs)
5553
5554 def GetFiles(*args, **kwargs):
5555 """
5556 GetFiles(self) -> PyObject
5557
5558 Returns a list of the filenames that were dropped.
5559 """
5560 return _core_.DropFilesEvent_GetFiles(*args, **kwargs)
5561
5562 Files = property(GetFiles,doc="See `GetFiles`")
5563 NumberOfFiles = property(GetNumberOfFiles,doc="See `GetNumberOfFiles`")
5564 Position = property(GetPosition,doc="See `GetPosition`")
5565 _core_.DropFilesEvent_swigregister(DropFilesEvent)
5566
5567 #---------------------------------------------------------------------------
5568
5569 UPDATE_UI_PROCESS_ALL = _core_.UPDATE_UI_PROCESS_ALL
5570 UPDATE_UI_PROCESS_SPECIFIED = _core_.UPDATE_UI_PROCESS_SPECIFIED
5571 class UpdateUIEvent(CommandEvent):
5572 """
5573 This class is used for EVT_UPDATE_UI pseudo-events which are sent by
5574 wxWidgets to give an application the chance to update various user
5575 interface elements.
5576
5577 Without update UI events, an application has to work hard to
5578 check/uncheck, enable/disable, and set the text for elements such as
5579 menu items and toolbar buttons. The code for doing this has to be
5580 mixed up with the code that is invoked when an action is invoked for a
5581 menu item or button.
5582
5583 With update UI events, you define an event handler to look at the
5584 state of the application and change UI elements accordingly. wxWidgets
5585 will call your handler functions in idle time, so you don't have to
5586 worry where to call this code. In addition to being a clearer and more
5587 declarative method, it also means you don't have to worry whether
5588 you're updating a toolbar or menubar identifier. The same handler can
5589 update a menu item and toolbar button, if the ID values are the same.
5590
5591 Instead of directly manipulating the menu or button, you call
5592 functions in the event object, such as `Check`. wxWidgets will
5593 determine whether such a call has been made, and which UI element to
5594 update.
5595
5596 These events will work for popup menus as well as menubars. Just
5597 before a menu is popped up, `wx.Menu.UpdateUI` is called to process
5598 any UI events for the window that owns the menu.
5599
5600 If you find that the overhead of UI update processing is affecting
5601 your application, you can do one or both of the following:
5602
5603 1. Call `wx.UpdateUIEvent.SetMode` with a value of
5604 wx.UPDATE_UI_PROCESS_SPECIFIED, and set the extra style
5605 wx.WS_EX_PROCESS_UPDATE_EVENTS for every window that should
5606 receive update events. No other windows will receive update
5607 events.
5608
5609 2. Call `wx.UpdateUIEvent.SetUpdateInterval` with a millisecond
5610 value to set the delay between updates. You may need to call
5611 `wx.Window.UpdateWindowUI` at critical points, for example when
5612 a dialog is about to be shown, in case the user sees a slight
5613 delay before windows are updated.
5614
5615 Note that although events are sent in idle time, defining a EVT_IDLE
5616 handler for a window does not affect this because the events are sent
5617 from an internal idle handler.
5618
5619 wxWidgets tries to optimize update events on some platforms. On
5620 Windows and GTK+, events for menubar items are only sent when the menu
5621 is about to be shown, and not in idle time.
5622
5623 """
5624 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
5625 __repr__ = _swig_repr
5626 def __init__(self, *args, **kwargs):
5627 """
5628 __init__(self, int commandId=0) -> UpdateUIEvent
5629
5630 Constructor
5631 """
5632 _core_.UpdateUIEvent_swiginit(self,_core_.new_UpdateUIEvent(*args, **kwargs))
5633 def GetChecked(*args, **kwargs):
5634 """
5635 GetChecked(self) -> bool
5636
5637 Returns ``True`` if the UI element should be checked.
5638 """
5639 return _core_.UpdateUIEvent_GetChecked(*args, **kwargs)
5640
5641 def GetEnabled(*args, **kwargs):
5642 """
5643 GetEnabled(self) -> bool
5644
5645 Returns ``True`` if the UI element should be enabled.
5646 """
5647 return _core_.UpdateUIEvent_GetEnabled(*args, **kwargs)
5648
5649 def GetShown(*args, **kwargs):
5650 """
5651 GetShown(self) -> bool
5652
5653 Returns ``True`` if the UI element should be shown.
5654 """
5655 return _core_.UpdateUIEvent_GetShown(*args, **kwargs)
5656
5657 def GetText(*args, **kwargs):
5658 """
5659 GetText(self) -> String
5660
5661 Returns the text that should be set for the UI element.
5662 """
5663 return _core_.UpdateUIEvent_GetText(*args, **kwargs)
5664
5665 def GetSetText(*args, **kwargs):
5666 """
5667 GetSetText(self) -> bool
5668
5669 Returns ``True`` if the application has called `SetText`. For
5670 wxWidgets internal use only.
5671 """
5672 return _core_.UpdateUIEvent_GetSetText(*args, **kwargs)
5673
5674 def GetSetChecked(*args, **kwargs):
5675 """
5676 GetSetChecked(self) -> bool
5677
5678 Returns ``True`` if the application has called `Check`. For wxWidgets
5679 internal use only.
5680 """
5681 return _core_.UpdateUIEvent_GetSetChecked(*args, **kwargs)
5682
5683 def GetSetEnabled(*args, **kwargs):
5684 """
5685 GetSetEnabled(self) -> bool
5686
5687 Returns ``True`` if the application has called `Enable`. For wxWidgets
5688 internal use only.
5689 """
5690 return _core_.UpdateUIEvent_GetSetEnabled(*args, **kwargs)
5691
5692 def GetSetShown(*args, **kwargs):
5693 """
5694 GetSetShown(self) -> bool
5695
5696 Returns ``True`` if the application has called `Show`. For wxWidgets
5697 internal use only.
5698 """
5699 return _core_.UpdateUIEvent_GetSetShown(*args, **kwargs)
5700
5701 def Check(*args, **kwargs):
5702 """
5703 Check(self, bool check)
5704
5705 Check or uncheck the UI element.
5706 """
5707 return _core_.UpdateUIEvent_Check(*args, **kwargs)
5708
5709 def Enable(*args, **kwargs):
5710 """
5711 Enable(self, bool enable)
5712
5713 Enable or disable the UI element.
5714 """
5715 return _core_.UpdateUIEvent_Enable(*args, **kwargs)
5716
5717 def Show(*args, **kwargs):
5718 """
5719 Show(self, bool show)
5720
5721 Show or hide the UI element.
5722 """
5723 return _core_.UpdateUIEvent_Show(*args, **kwargs)
5724
5725 def SetText(*args, **kwargs):
5726 """
5727 SetText(self, String text)
5728
5729 Sets the text for this UI element.
5730 """
5731 return _core_.UpdateUIEvent_SetText(*args, **kwargs)
5732
5733 def SetUpdateInterval(*args, **kwargs):
5734 """
5735 SetUpdateInterval(long updateInterval)
5736
5737 Sets the interval between updates in milliseconds. Set to -1 to
5738 disable updates, or to 0 to update as frequently as possible. The
5739 default is 0.
5740
5741 Use this to reduce the overhead of UI update events if your
5742 application has a lot of windows. If you set the value to -1 or
5743 greater than 0, you may also need to call `wx.Window.UpdateWindowUI`
5744 at appropriate points in your application, such as when a dialog is
5745 about to be shown.
5746 """
5747 return _core_.UpdateUIEvent_SetUpdateInterval(*args, **kwargs)
5748
5749 SetUpdateInterval = staticmethod(SetUpdateInterval)
5750 def GetUpdateInterval(*args, **kwargs):
5751 """
5752 GetUpdateInterval() -> long
5753
5754 Returns the current interval between updates in milliseconds. -1
5755 disables updates, 0 updates as frequently as possible.
5756 """
5757 return _core_.UpdateUIEvent_GetUpdateInterval(*args, **kwargs)
5758
5759 GetUpdateInterval = staticmethod(GetUpdateInterval)
5760 def CanUpdate(*args, **kwargs):
5761 """
5762 CanUpdate(Window win) -> bool
5763
5764 Returns ``True`` if it is appropriate to update (send UI update events
5765 to) this window.
5766
5767 This function looks at the mode used (see `wx.UpdateUIEvent.SetMode`),
5768 the wx.WS_EX_PROCESS_UPDATE_EVENTS flag in window, the time update
5769 events were last sent in idle time, and the update interval, to
5770 determine whether events should be sent to this window now. By default
5771 this will always return true because the update mode is initially
5772 wx.UPDATE_UI_PROCESS_ALL and the interval is set to 0; so update
5773 events will be sent as often as possible. You can reduce the frequency
5774 that events are sent by changing the mode and/or setting an update
5775 interval.
5776
5777 """
5778 return _core_.UpdateUIEvent_CanUpdate(*args, **kwargs)
5779
5780 CanUpdate = staticmethod(CanUpdate)
5781 def ResetUpdateTime(*args, **kwargs):
5782 """
5783 ResetUpdateTime()
5784
5785 Used internally to reset the last-updated time to the current time. It
5786 is assumed that update events are normally sent in idle time, so this
5787 is called at the end of idle processing.
5788 """
5789 return _core_.UpdateUIEvent_ResetUpdateTime(*args, **kwargs)
5790
5791 ResetUpdateTime = staticmethod(ResetUpdateTime)
5792 def SetMode(*args, **kwargs):
5793 """
5794 SetMode(int mode)
5795
5796 Specify how wxWidgets will send update events: to all windows, or only
5797 to those which specify that they will process the events.
5798
5799 The mode may be one of the following values:
5800
5801 ============================= ==========================================
5802 wxUPDATE_UI_PROCESS_ALL Send UI update events to all windows. This
5803 is the default setting.
5804 wxUPDATE_UI_PROCESS_SPECIFIED Send UI update events only to windows that
5805 have the wx.WS_EX_PROCESS_UI_UPDATES extra
5806 style set.
5807 ============================= ==========================================
5808
5809 """
5810 return _core_.UpdateUIEvent_SetMode(*args, **kwargs)
5811
5812 SetMode = staticmethod(SetMode)
5813 def GetMode(*args, **kwargs):
5814 """
5815 GetMode() -> int
5816
5817 Returns a value specifying how wxWidgets will send update events: to
5818 all windows, or only to those which specify that they will process the
5819 events.
5820 """
5821 return _core_.UpdateUIEvent_GetMode(*args, **kwargs)
5822
5823 GetMode = staticmethod(GetMode)
5824 _core_.UpdateUIEvent_swigregister(UpdateUIEvent)
5825
5826 def UpdateUIEvent_SetUpdateInterval(*args, **kwargs):
5827 """
5828 UpdateUIEvent_SetUpdateInterval(long updateInterval)
5829
5830 Sets the interval between updates in milliseconds. Set to -1 to
5831 disable updates, or to 0 to update as frequently as possible. The
5832 default is 0.
5833
5834 Use this to reduce the overhead of UI update events if your
5835 application has a lot of windows. If you set the value to -1 or
5836 greater than 0, you may also need to call `wx.Window.UpdateWindowUI`
5837 at appropriate points in your application, such as when a dialog is
5838 about to be shown.
5839 """
5840 return _core_.UpdateUIEvent_SetUpdateInterval(*args, **kwargs)
5841
5842 def UpdateUIEvent_GetUpdateInterval(*args):
5843 """
5844 UpdateUIEvent_GetUpdateInterval() -> long
5845
5846 Returns the current interval between updates in milliseconds. -1
5847 disables updates, 0 updates as frequently as possible.
5848 """
5849 return _core_.UpdateUIEvent_GetUpdateInterval(*args)
5850
5851 def UpdateUIEvent_CanUpdate(*args, **kwargs):
5852 """
5853 UpdateUIEvent_CanUpdate(Window win) -> bool
5854
5855 Returns ``True`` if it is appropriate to update (send UI update events
5856 to) this window.
5857
5858 This function looks at the mode used (see `wx.UpdateUIEvent.SetMode`),
5859 the wx.WS_EX_PROCESS_UPDATE_EVENTS flag in window, the time update
5860 events were last sent in idle time, and the update interval, to
5861 determine whether events should be sent to this window now. By default
5862 this will always return true because the update mode is initially
5863 wx.UPDATE_UI_PROCESS_ALL and the interval is set to 0; so update
5864 events will be sent as often as possible. You can reduce the frequency
5865 that events are sent by changing the mode and/or setting an update
5866 interval.
5867
5868 """
5869 return _core_.UpdateUIEvent_CanUpdate(*args, **kwargs)
5870
5871 def UpdateUIEvent_ResetUpdateTime(*args):
5872 """
5873 UpdateUIEvent_ResetUpdateTime()
5874
5875 Used internally to reset the last-updated time to the current time. It
5876 is assumed that update events are normally sent in idle time, so this
5877 is called at the end of idle processing.
5878 """
5879 return _core_.UpdateUIEvent_ResetUpdateTime(*args)
5880
5881 def UpdateUIEvent_SetMode(*args, **kwargs):
5882 """
5883 UpdateUIEvent_SetMode(int mode)
5884
5885 Specify how wxWidgets will send update events: to all windows, or only
5886 to those which specify that they will process the events.
5887
5888 The mode may be one of the following values:
5889
5890 ============================= ==========================================
5891 wxUPDATE_UI_PROCESS_ALL Send UI update events to all windows. This
5892 is the default setting.
5893 wxUPDATE_UI_PROCESS_SPECIFIED Send UI update events only to windows that
5894 have the wx.WS_EX_PROCESS_UI_UPDATES extra
5895 style set.
5896 ============================= ==========================================
5897
5898 """
5899 return _core_.UpdateUIEvent_SetMode(*args, **kwargs)
5900
5901 def UpdateUIEvent_GetMode(*args):
5902 """
5903 UpdateUIEvent_GetMode() -> int
5904
5905 Returns a value specifying how wxWidgets will send update events: to
5906 all windows, or only to those which specify that they will process the
5907 events.
5908 """
5909 return _core_.UpdateUIEvent_GetMode(*args)
5910
5911 #---------------------------------------------------------------------------
5912
5913 class SysColourChangedEvent(Event):
5914 """
5915 This class is used for EVT_SYS_COLOUR_CHANGED, which are generated
5916 when the user changes the colour settings using the control
5917 panel. This is only applicable under Windows.
5918
5919 The default event handler for this event propagates the event to child
5920 windows, since Windows only sends the events to top-level windows. If
5921 intercepting this event for a top-level window, remember to call
5922 `Skip` so the the base class handler will still be executed, or to
5923 pass the event on to the window's children explicitly.
5924
5925 """
5926 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
5927 __repr__ = _swig_repr
5928 def __init__(self, *args, **kwargs):
5929 """
5930 __init__(self) -> SysColourChangedEvent
5931
5932 Constructor
5933 """
5934 _core_.SysColourChangedEvent_swiginit(self,_core_.new_SysColourChangedEvent(*args, **kwargs))
5935 _core_.SysColourChangedEvent_swigregister(SysColourChangedEvent)
5936
5937 #---------------------------------------------------------------------------
5938
5939 class MouseCaptureChangedEvent(Event):
5940 """
5941 An mouse capture changed event (EVT_MOUSE_CAPTURE_CHANGED) is sent to
5942 a window that loses its mouse capture. This is called even if
5943 `wx.Window.ReleaseMouse` was called by the application code. Handling
5944 this event allows an application to cater for unexpected capture
5945 releases which might otherwise confuse mouse handling code.
5946
5947 This event is implemented under Windows only.
5948 """
5949 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
5950 __repr__ = _swig_repr
5951 def __init__(self, *args, **kwargs):
5952 """
5953 __init__(self, int winid=0, Window gainedCapture=None) -> MouseCaptureChangedEvent
5954
5955 Constructor
5956 """
5957 _core_.MouseCaptureChangedEvent_swiginit(self,_core_.new_MouseCaptureChangedEvent(*args, **kwargs))
5958 def GetCapturedWindow(*args, **kwargs):
5959 """
5960 GetCapturedWindow(self) -> Window
5961
5962 Returns the window that gained the capture, or ``None`` if it was a
5963 non-wxWidgets window.
5964 """
5965 return _core_.MouseCaptureChangedEvent_GetCapturedWindow(*args, **kwargs)
5966
5967 _core_.MouseCaptureChangedEvent_swigregister(MouseCaptureChangedEvent)
5968
5969 #---------------------------------------------------------------------------
5970
5971 class MouseCaptureLostEvent(Event):
5972 """
5973 A mouse capture lost event is sent to a window that obtained mouse
5974 capture, which was subsequently loss due to "external" event, for
5975 example when a dialog box is shown or if another application captures
5976 the mouse.
5977
5978 If this happens, this event is sent to all windows that are on the
5979 capture stack (i.e. a window that called `wx.Window.CaptureMouse`, but
5980 didn't call `wx.Window.ReleaseMouse` yet). The event is *not* sent
5981 if the capture changes because of a call to CaptureMouse or
5982 ReleaseMouse.
5983
5984 This event is currently emitted under Windows only.
5985
5986 """
5987 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
5988 __repr__ = _swig_repr
5989 def __init__(self, *args, **kwargs):
5990 """
5991 __init__(self, int winid=0) -> MouseCaptureLostEvent
5992
5993 A mouse capture lost event is sent to a window that obtained mouse
5994 capture, which was subsequently loss due to "external" event, for
5995 example when a dialog box is shown or if another application captures
5996 the mouse.
5997
5998 If this happens, this event is sent to all windows that are on the
5999 capture stack (i.e. a window that called `wx.Window.CaptureMouse`, but
6000 didn't call `wx.Window.ReleaseMouse` yet). The event is *not* sent
6001 if the capture changes because of a call to CaptureMouse or
6002 ReleaseMouse.
6003
6004 This event is currently emitted under Windows only.
6005
6006 """
6007 _core_.MouseCaptureLostEvent_swiginit(self,_core_.new_MouseCaptureLostEvent(*args, **kwargs))
6008 _core_.MouseCaptureLostEvent_swigregister(MouseCaptureLostEvent)
6009
6010 #---------------------------------------------------------------------------
6011
6012 class DisplayChangedEvent(Event):
6013 """
6014 An EVT_DISPLAY_CHANGED event is sent to all windows when the display
6015 resolution has changed.
6016
6017 This event is implemented under Windows only.
6018 """
6019 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
6020 __repr__ = _swig_repr
6021 def __init__(self, *args, **kwargs):
6022 """__init__(self) -> DisplayChangedEvent"""
6023 _core_.DisplayChangedEvent_swiginit(self,_core_.new_DisplayChangedEvent(*args, **kwargs))
6024 _core_.DisplayChangedEvent_swigregister(DisplayChangedEvent)
6025
6026 #---------------------------------------------------------------------------
6027
6028 class PaletteChangedEvent(Event):
6029 """
6030 An EVT_PALETTE_CHANGED event is sent when the system palette has
6031 changed, thereby giving each window a chance to redo their own to
6032 match.
6033
6034 This event is implemented under Windows only.
6035 """
6036 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
6037 __repr__ = _swig_repr
6038 def __init__(self, *args, **kwargs):
6039 """
6040 __init__(self, int id=0) -> PaletteChangedEvent
6041
6042 An EVT_PALETTE_CHANGED event is sent when the system palette has
6043 changed, thereby giving each window a chance to redo their own to
6044 match.
6045
6046 This event is implemented under Windows only.
6047 """
6048 _core_.PaletteChangedEvent_swiginit(self,_core_.new_PaletteChangedEvent(*args, **kwargs))
6049 def SetChangedWindow(*args, **kwargs):
6050 """SetChangedWindow(self, Window win)"""
6051 return _core_.PaletteChangedEvent_SetChangedWindow(*args, **kwargs)
6052
6053 def GetChangedWindow(*args, **kwargs):
6054 """GetChangedWindow(self) -> Window"""
6055 return _core_.PaletteChangedEvent_GetChangedWindow(*args, **kwargs)
6056
6057 _core_.PaletteChangedEvent_swigregister(PaletteChangedEvent)
6058
6059 #---------------------------------------------------------------------------
6060
6061 class QueryNewPaletteEvent(Event):
6062 """
6063 An EVT_QUERY_NEW_PALETE event indicates the window is getting keyboard
6064 focus and should re-do its palette.
6065
6066 This event is implemented under Windows only.
6067 """
6068 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
6069 __repr__ = _swig_repr
6070 def __init__(self, *args, **kwargs):
6071 """
6072 __init__(self, int winid=0) -> QueryNewPaletteEvent
6073
6074 Constructor.
6075 """
6076 _core_.QueryNewPaletteEvent_swiginit(self,_core_.new_QueryNewPaletteEvent(*args, **kwargs))
6077 def SetPaletteRealized(*args, **kwargs):
6078 """
6079 SetPaletteRealized(self, bool realized)
6080
6081 App should set this if it changes the palette.
6082 """
6083 return _core_.QueryNewPaletteEvent_SetPaletteRealized(*args, **kwargs)
6084
6085 def GetPaletteRealized(*args, **kwargs):
6086 """GetPaletteRealized(self) -> bool"""
6087 return _core_.QueryNewPaletteEvent_GetPaletteRealized(*args, **kwargs)
6088
6089 _core_.QueryNewPaletteEvent_swigregister(QueryNewPaletteEvent)
6090
6091 #---------------------------------------------------------------------------
6092
6093 class NavigationKeyEvent(Event):
6094 """
6095 EVT_NAVIGATION_KEY events are used to control moving the focus between
6096 widgets, otherwise known as tab-traversal. You woudl normally not
6097 catch navigation events in applications as there are already
6098 appropriate handlers in `wx.Dialog` and `wx.Panel`, but you may find
6099 it useful to send navigation events in certain situations to change
6100 the focus in certain ways, although it's probably easier to just call
6101 `wx.Window.Navigate`.
6102 """
6103 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
6104 __repr__ = _swig_repr
6105 def __init__(self, *args, **kwargs):
6106 """__init__(self) -> NavigationKeyEvent"""
6107 _core_.NavigationKeyEvent_swiginit(self,_core_.new_NavigationKeyEvent(*args, **kwargs))
6108 def GetDirection(*args, **kwargs):
6109 """
6110 GetDirection(self) -> bool
6111
6112 Returns ``True`` if the direction is forward, ``False`` otherwise.
6113 """
6114 return _core_.NavigationKeyEvent_GetDirection(*args, **kwargs)
6115
6116 def SetDirection(*args, **kwargs):
6117 """
6118 SetDirection(self, bool forward)
6119
6120 Specify the direction that the navigation should take. Usually the
6121 difference between using Tab and Shift-Tab.
6122 """
6123 return _core_.NavigationKeyEvent_SetDirection(*args, **kwargs)
6124
6125 def IsWindowChange(*args, **kwargs):
6126 """
6127 IsWindowChange(self) -> bool
6128
6129 Returns ``True`` if window change is allowed.
6130 """
6131 return _core_.NavigationKeyEvent_IsWindowChange(*args, **kwargs)
6132
6133 def SetWindowChange(*args, **kwargs):
6134 """
6135 SetWindowChange(self, bool ischange)
6136
6137 Specify if the navigation should be able to change parent windows.
6138 For example, changing notebook pages, etc. This is usually implemented
6139 by using Control-Tab.
6140 """
6141 return _core_.NavigationKeyEvent_SetWindowChange(*args, **kwargs)
6142
6143 def IsFromTab(*args, **kwargs):
6144 """
6145 IsFromTab(self) -> bool
6146
6147 Returns ``True`` if the navigation event is originated from the Tab
6148 key.
6149 """
6150 return _core_.NavigationKeyEvent_IsFromTab(*args, **kwargs)
6151
6152 def SetFromTab(*args, **kwargs):
6153 """
6154 SetFromTab(self, bool bIs)
6155
6156 Set to true under MSW if the event was generated using the tab key.
6157 This is required for proper navogation over radio buttons.
6158 """
6159 return _core_.NavigationKeyEvent_SetFromTab(*args, **kwargs)
6160
6161 def SetFlags(*args, **kwargs):
6162 """
6163 SetFlags(self, long flags)
6164
6165 Set the navigation flags to a combination of the following:
6166
6167 * wx.NavigationKeyEvent.IsBackward
6168 * wx.NavigationKeyEvent.IsForward
6169 * wx.NavigationKeyEvent.WinChange
6170 * wx.NavigationKeyEvent.FromTab
6171
6172 """
6173 return _core_.NavigationKeyEvent_SetFlags(*args, **kwargs)
6174
6175 def GetCurrentFocus(*args, **kwargs):
6176 """
6177 GetCurrentFocus(self) -> Window
6178
6179 Returns the child window which currenty has the focus. May be
6180 ``None``.
6181 """
6182 return _core_.NavigationKeyEvent_GetCurrentFocus(*args, **kwargs)
6183
6184 def SetCurrentFocus(*args, **kwargs):
6185 """
6186 SetCurrentFocus(self, Window win)
6187
6188 Set the window that has the focus.
6189 """
6190 return _core_.NavigationKeyEvent_SetCurrentFocus(*args, **kwargs)
6191
6192 IsBackward = _core_.NavigationKeyEvent_IsBackward
6193 IsForward = _core_.NavigationKeyEvent_IsForward
6194 WinChange = _core_.NavigationKeyEvent_WinChange
6195 FromTab = _core_.NavigationKeyEvent_FromTab
6196 _core_.NavigationKeyEvent_swigregister(NavigationKeyEvent)
6197
6198 #---------------------------------------------------------------------------
6199
6200 class WindowCreateEvent(CommandEvent):
6201 """
6202 The EVT_WINDOW_CREATE event is sent as soon as the window object (the
6203 underlying GUI object) exists.
6204 """
6205 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
6206 __repr__ = _swig_repr
6207 def __init__(self, *args, **kwargs):
6208 """
6209 __init__(self, Window win=None) -> WindowCreateEvent
6210
6211 The EVT_WINDOW_CREATE event is sent as soon as the window object (the
6212 underlying GUI object) exists.
6213 """
6214 _core_.WindowCreateEvent_swiginit(self,_core_.new_WindowCreateEvent(*args, **kwargs))
6215 def GetWindow(*args, **kwargs):
6216 """
6217 GetWindow(self) -> Window
6218
6219 Returns the window that this event refers to.
6220 """
6221 return _core_.WindowCreateEvent_GetWindow(*args, **kwargs)
6222
6223 _core_.WindowCreateEvent_swigregister(WindowCreateEvent)
6224
6225 class WindowDestroyEvent(CommandEvent):
6226 """
6227 The EVT_WINDOW_DESTROY event is sent from the `wx.Window` destructor
6228 when the GUI window is destroyed.
6229
6230 When a class derived from `wx.Window` is destroyed its destructor will
6231 have already run by the time this event is sent. Therefore this event
6232 will not usually be received at all by the window itself. Since it is
6233 received after the destructor has run, an object should not try to
6234 handle its own wx.WindowDestroyEvent, but it can be used to get
6235 notification of the destruction of another window.
6236 """
6237 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
6238 __repr__ = _swig_repr
6239 def __init__(self, *args, **kwargs):
6240 """
6241 __init__(self, Window win=None) -> WindowDestroyEvent
6242
6243 The EVT_WINDOW_DESTROY event is sent from the `wx.Window` destructor
6244 when the GUI window is destroyed.
6245
6246 When a class derived from `wx.Window` is destroyed its destructor will
6247 have already run by the time this event is sent. Therefore this event
6248 will not usually be received at all by the window itself. Since it is
6249 received after the destructor has run, an object should not try to
6250 handle its own wx.WindowDestroyEvent, but it can be used to get
6251 notification of the destruction of another window.
6252 """
6253 _core_.WindowDestroyEvent_swiginit(self,_core_.new_WindowDestroyEvent(*args, **kwargs))
6254 def GetWindow(*args, **kwargs):
6255 """
6256 GetWindow(self) -> Window
6257
6258 Returns the window that this event refers to.
6259 """
6260 return _core_.WindowDestroyEvent_GetWindow(*args, **kwargs)
6261
6262 _core_.WindowDestroyEvent_swigregister(WindowDestroyEvent)
6263
6264 #---------------------------------------------------------------------------
6265
6266 class ContextMenuEvent(CommandEvent):
6267 """
6268 This class is used for context menu events (EVT_CONTECT_MENU,) sent to
6269 give the application a chance to show a context (popup) menu.
6270 """
6271 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
6272 __repr__ = _swig_repr
6273 def __init__(self, *args, **kwargs):
6274 """
6275 __init__(self, EventType type=wxEVT_NULL, int winid=0, Point pt=DefaultPosition) -> ContextMenuEvent
6276
6277 Constructor.
6278 """
6279 _core_.ContextMenuEvent_swiginit(self,_core_.new_ContextMenuEvent(*args, **kwargs))
6280 def GetPosition(*args, **kwargs):
6281 """
6282 GetPosition(self) -> Point
6283
6284 Returns the position (in screen coordinants) at which the menu should
6285 be shown.
6286 """
6287 return _core_.ContextMenuEvent_GetPosition(*args, **kwargs)
6288
6289 def SetPosition(*args, **kwargs):
6290 """
6291 SetPosition(self, Point pos)
6292
6293 Sets the position at which the menu should be shown.
6294 """
6295 return _core_.ContextMenuEvent_SetPosition(*args, **kwargs)
6296
6297 Position = property(GetPosition,SetPosition,doc="See `GetPosition` and `SetPosition`")
6298 _core_.ContextMenuEvent_swigregister(ContextMenuEvent)
6299
6300 #---------------------------------------------------------------------------
6301
6302 IDLE_PROCESS_ALL = _core_.IDLE_PROCESS_ALL
6303 IDLE_PROCESS_SPECIFIED = _core_.IDLE_PROCESS_SPECIFIED
6304 class IdleEvent(Event):
6305 """
6306 This class is used for EVT_IDLE events, which are generated and sent
6307 when the application *becomes* idle. In other words, the when the
6308 event queue becomes empty then idle events are sent to all windows (by
6309 default) and as long as none of them call `RequestMore` then there are
6310 no more idle events until after the system event queue has some normal
6311 events and then becomes empty again.
6312
6313 By default, idle events are sent to all windows. If this is causing a
6314 significant overhead in your application, you can call
6315 `wx.IdleEvent.SetMode` with the value wx.IDLE_PROCESS_SPECIFIED, and
6316 set the wx.WS_EX_PROCESS_IDLE extra window style for every window
6317 which should receive idle events. Then idle events will only be sent
6318 to those windows and not to any others.
6319 """
6320 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
6321 __repr__ = _swig_repr
6322 def __init__(self, *args, **kwargs):
6323 """
6324 __init__(self) -> IdleEvent
6325
6326 Constructor
6327 """
6328 _core_.IdleEvent_swiginit(self,_core_.new_IdleEvent(*args, **kwargs))
6329 def RequestMore(*args, **kwargs):
6330 """
6331 RequestMore(self, bool needMore=True)
6332
6333 Tells wxWidgets that more processing is required. This function can be
6334 called by an EVT_IDLE handler for a window to indicate that the
6335 application should forward the EVT_IDLE event once more to the
6336 application windows. If no window calls this function during its
6337 EVT_IDLE handler, then the application will remain in a passive event
6338 loop until a new event is posted to the application by the windowing
6339 system.
6340 """
6341 return _core_.IdleEvent_RequestMore(*args, **kwargs)
6342
6343 def MoreRequested(*args, **kwargs):
6344 """
6345 MoreRequested(self) -> bool
6346
6347 Returns ``True`` if the OnIdle function processing this event
6348 requested more processing time.
6349 """
6350 return _core_.IdleEvent_MoreRequested(*args, **kwargs)
6351
6352 def SetMode(*args, **kwargs):
6353 """
6354 SetMode(int mode)
6355
6356 Static method for specifying how wxWidgets will send idle events: to
6357 all windows, or only to those which specify that they will process the
6358 events.
6359
6360 The mode can be one of the following values:
6361
6362 ========================= ========================================
6363 wx.IDLE_PROCESS_ALL Send idle events to all windows
6364 wx.IDLE_PROCESS_SPECIFIED Send idle events only to windows that have
6365 the wx.WS_EX_PROCESS_IDLE extra style
6366 flag set.
6367 ========================= ========================================
6368
6369 """
6370 return _core_.IdleEvent_SetMode(*args, **kwargs)
6371
6372 SetMode = staticmethod(SetMode)
6373 def GetMode(*args, **kwargs):
6374 """
6375 GetMode() -> int
6376
6377 Static method returning a value specifying how wxWidgets will send
6378 idle events: to all windows, or only to those which specify that they
6379 will process the events.
6380 """
6381 return _core_.IdleEvent_GetMode(*args, **kwargs)
6382
6383 GetMode = staticmethod(GetMode)
6384 def CanSend(*args, **kwargs):
6385 """
6386 CanSend(Window win) -> bool
6387
6388 Returns ``True`` if it is appropriate to send idle events to this
6389 window.
6390
6391 This function looks at the mode used (see `wx.IdleEvent.SetMode`), and
6392 the wx.WS_EX_PROCESS_IDLE style in window to determine whether idle
6393 events should be sent to this window now. By default this will always
6394 return ``True`` because the update mode is initially
6395 wx.IDLE_PROCESS_ALL. You can change the mode to only send idle events
6396 to windows with the wx.WS_EX_PROCESS_IDLE extra window style set.
6397 """
6398 return _core_.IdleEvent_CanSend(*args, **kwargs)
6399
6400 CanSend = staticmethod(CanSend)
6401 _core_.IdleEvent_swigregister(IdleEvent)
6402
6403 def IdleEvent_SetMode(*args, **kwargs):
6404 """
6405 IdleEvent_SetMode(int mode)
6406
6407 Static method for specifying how wxWidgets will send idle events: to
6408 all windows, or only to those which specify that they will process the
6409 events.
6410
6411 The mode can be one of the following values:
6412
6413 ========================= ========================================
6414 wx.IDLE_PROCESS_ALL Send idle events to all windows
6415 wx.IDLE_PROCESS_SPECIFIED Send idle events only to windows that have
6416 the wx.WS_EX_PROCESS_IDLE extra style
6417 flag set.
6418 ========================= ========================================
6419
6420 """
6421 return _core_.IdleEvent_SetMode(*args, **kwargs)
6422
6423 def IdleEvent_GetMode(*args):
6424 """
6425 IdleEvent_GetMode() -> int
6426
6427 Static method returning a value specifying how wxWidgets will send
6428 idle events: to all windows, or only to those which specify that they
6429 will process the events.
6430 """
6431 return _core_.IdleEvent_GetMode(*args)
6432
6433 def IdleEvent_CanSend(*args, **kwargs):
6434 """
6435 IdleEvent_CanSend(Window win) -> bool
6436
6437 Returns ``True`` if it is appropriate to send idle events to this
6438 window.
6439
6440 This function looks at the mode used (see `wx.IdleEvent.SetMode`), and
6441 the wx.WS_EX_PROCESS_IDLE style in window to determine whether idle
6442 events should be sent to this window now. By default this will always
6443 return ``True`` because the update mode is initially
6444 wx.IDLE_PROCESS_ALL. You can change the mode to only send idle events
6445 to windows with the wx.WS_EX_PROCESS_IDLE extra window style set.
6446 """
6447 return _core_.IdleEvent_CanSend(*args, **kwargs)
6448
6449 #---------------------------------------------------------------------------
6450
6451 class ClipboardTextEvent(CommandEvent):
6452 """
6453 A Clipboard Text event is sent when a window intercepts a text
6454 copy/cut/paste message, i.e. the user has cut/copied/pasted data
6455 from/into a text control via ctrl-C/X/V, ctrl/shift-del/insert, a
6456 popup menu command, etc. NOTE : under windows these events are *NOT*
6457 generated automatically for a Rich Edit text control.
6458 """
6459 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
6460 __repr__ = _swig_repr
6461 def __init__(self, *args, **kwargs):
6462 """
6463 __init__(self, EventType type=wxEVT_NULL, int winid=0) -> ClipboardTextEvent
6464
6465 A Clipboard Text event is sent when a window intercepts a text
6466 copy/cut/paste message, i.e. the user has cut/copied/pasted data
6467 from/into a text control via ctrl-C/X/V, ctrl/shift-del/insert, a
6468 popup menu command, etc. NOTE : under windows these events are *NOT*
6469 generated automatically for a Rich Edit text control.
6470 """
6471 _core_.ClipboardTextEvent_swiginit(self,_core_.new_ClipboardTextEvent(*args, **kwargs))
6472 _core_.ClipboardTextEvent_swigregister(ClipboardTextEvent)
6473
6474 #---------------------------------------------------------------------------
6475
6476 class PyEvent(Event):
6477 """
6478 wx.PyEvent can be used as a base class for implementing custom event
6479 types in Python. You should derived from this class instead of
6480 `wx.Event` because this class is Python-aware and is able to transport
6481 its Python bits safely through the wxWidgets event system and have
6482 them still be there when the event handler is invoked.
6483
6484 :see: `wx.PyCommandEvent`
6485
6486 """
6487 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
6488 __repr__ = _swig_repr
6489 def __init__(self, *args, **kwargs):
6490 """__init__(self, int winid=0, EventType eventType=wxEVT_NULL) -> PyEvent"""
6491 _core_.PyEvent_swiginit(self,_core_.new_PyEvent(*args, **kwargs))
6492 self._SetSelf(self)
6493
6494 __swig_destroy__ = _core_.delete_PyEvent
6495 __del__ = lambda self : None;
6496 def _SetSelf(*args, **kwargs):
6497 """_SetSelf(self, PyObject self)"""
6498 return _core_.PyEvent__SetSelf(*args, **kwargs)
6499
6500 def _GetSelf(*args, **kwargs):
6501 """_GetSelf(self) -> PyObject"""
6502 return _core_.PyEvent__GetSelf(*args, **kwargs)
6503
6504 _core_.PyEvent_swigregister(PyEvent)
6505
6506 class PyCommandEvent(CommandEvent):
6507 """
6508 wx.PyCommandEvent can be used as a base class for implementing custom
6509 event types in Python, where the event shoudl travel up to parent
6510 windows looking for a handler. You should derived from this class
6511 instead of `wx.CommandEvent` because this class is Python-aware and is
6512 able to transport its Python bits safely through the wxWidgets event
6513 system and have them still be there when the event handler is invoked.
6514
6515 :see: `wx.PyEvent`
6516
6517 """
6518 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
6519 __repr__ = _swig_repr
6520 def __init__(self, *args, **kwargs):
6521 """__init__(self, EventType eventType=wxEVT_NULL, int id=0) -> PyCommandEvent"""
6522 _core_.PyCommandEvent_swiginit(self,_core_.new_PyCommandEvent(*args, **kwargs))
6523 self._SetSelf(self)
6524
6525 __swig_destroy__ = _core_.delete_PyCommandEvent
6526 __del__ = lambda self : None;
6527 def _SetSelf(*args, **kwargs):
6528 """_SetSelf(self, PyObject self)"""
6529 return _core_.PyCommandEvent__SetSelf(*args, **kwargs)
6530
6531 def _GetSelf(*args, **kwargs):
6532 """_GetSelf(self) -> PyObject"""
6533 return _core_.PyCommandEvent__GetSelf(*args, **kwargs)
6534
6535 _core_.PyCommandEvent_swigregister(PyCommandEvent)
6536
6537 class DateEvent(CommandEvent):
6538 """
6539 This event class holds information about a date change event and is
6540 used together with `wx.DatePickerCtrl`. It also serves as a base class
6541 for `wx.calendar.CalendarEvent`. Bind these event types with
6542 EVT_DATE_CHANGED.
6543 """
6544 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
6545 __repr__ = _swig_repr
6546 def __init__(self, *args, **kwargs):
6547 """__init__(self, Window win, DateTime dt, EventType type) -> DateEvent"""
6548 _core_.DateEvent_swiginit(self,_core_.new_DateEvent(*args, **kwargs))
6549 def GetDate(*args, **kwargs):
6550 """
6551 GetDate(self) -> DateTime
6552
6553 Returns the date.
6554 """
6555 return _core_.DateEvent_GetDate(*args, **kwargs)
6556
6557 def SetDate(*args, **kwargs):
6558 """
6559 SetDate(self, DateTime date)
6560
6561 Sets the date carried by the event, normally only used by the library
6562 internally.
6563 """
6564 return _core_.DateEvent_SetDate(*args, **kwargs)
6565
6566 Date = property(GetDate,SetDate,doc="See `GetDate` and `SetDate`")
6567 _core_.DateEvent_swigregister(DateEvent)
6568
6569 wxEVT_DATE_CHANGED = _core_.wxEVT_DATE_CHANGED
6570 EVT_DATE_CHANGED = wx.PyEventBinder( wxEVT_DATE_CHANGED, 1 )
6571
6572 #---------------------------------------------------------------------------
6573
6574 PYAPP_ASSERT_SUPPRESS = _core_.PYAPP_ASSERT_SUPPRESS
6575 PYAPP_ASSERT_EXCEPTION = _core_.PYAPP_ASSERT_EXCEPTION
6576 PYAPP_ASSERT_DIALOG = _core_.PYAPP_ASSERT_DIALOG
6577 PYAPP_ASSERT_LOG = _core_.PYAPP_ASSERT_LOG
6578 PRINT_WINDOWS = _core_.PRINT_WINDOWS
6579 PRINT_POSTSCRIPT = _core_.PRINT_POSTSCRIPT
6580 class PyApp(EvtHandler):
6581 """
6582 The ``wx.PyApp`` class is an *implementation detail*, please use the
6583 `wx.App` class (or some other derived class) instead.
6584 """
6585 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
6586 __repr__ = _swig_repr
6587 def __init__(self, *args, **kwargs):
6588 """
6589 __init__(self) -> PyApp
6590
6591 Create a new application object, starting the bootstrap process.
6592 """
6593 _core_.PyApp_swiginit(self,_core_.new_PyApp(*args, **kwargs))
6594 self._setCallbackInfo(self, PyApp, False)
6595 self._setOORInfo(self, False)
6596
6597 __swig_destroy__ = _core_.delete_PyApp
6598 __del__ = lambda self : None;
6599 def _setCallbackInfo(*args, **kwargs):
6600 """_setCallbackInfo(self, PyObject self, PyObject _class, bool incref)"""
6601 return _core_.PyApp__setCallbackInfo(*args, **kwargs)
6602
6603 def GetAppName(*args, **kwargs):
6604 """
6605 GetAppName(self) -> String
6606
6607 Get the application name.
6608 """
6609 return _core_.PyApp_GetAppName(*args, **kwargs)
6610
6611 def SetAppName(*args, **kwargs):
6612 """
6613 SetAppName(self, String name)
6614
6615 Set the application name. This value may be used automatically by
6616 `wx.Config` and such.
6617 """
6618 return _core_.PyApp_SetAppName(*args, **kwargs)
6619
6620 def GetClassName(*args, **kwargs):
6621 """
6622 GetClassName(self) -> String
6623
6624 Get the application's class name.
6625 """
6626 return _core_.PyApp_GetClassName(*args, **kwargs)
6627
6628 def SetClassName(*args, **kwargs):
6629 """
6630 SetClassName(self, String name)
6631
6632 Set the application's class name. This value may be used for
6633 X-resources if applicable for the platform
6634 """
6635 return _core_.PyApp_SetClassName(*args, **kwargs)
6636
6637 def GetVendorName(*args, **kwargs):
6638 """
6639 GetVendorName(self) -> String
6640
6641 Get the application's vendor name.
6642 """
6643 return _core_.PyApp_GetVendorName(*args, **kwargs)
6644
6645 def SetVendorName(*args, **kwargs):
6646 """
6647 SetVendorName(self, String name)
6648
6649 Set the application's vendor name. This value may be used
6650 automatically by `wx.Config` and such.
6651 """
6652 return _core_.PyApp_SetVendorName(*args, **kwargs)
6653
6654 def GetTraits(*args, **kwargs):
6655 """
6656 GetTraits(self) -> wxAppTraits
6657
6658 Return (and create if necessary) the app traits object to which we
6659 delegate for everything which either should be configurable by the
6660 user (then he can change the default behaviour simply by overriding
6661 CreateTraits() and returning his own traits object) or which is
6662 GUI/console dependent as then wx.AppTraits allows us to abstract the
6663 differences behind the common facade.
6664
6665 :todo: Add support for overriding CreateAppTraits in wxPython.
6666 """
6667 return _core_.PyApp_GetTraits(*args, **kwargs)
6668
6669 def ProcessPendingEvents(*args, **kwargs):
6670 """
6671 ProcessPendingEvents(self)
6672
6673 Process all events in the Pending Events list -- it is necessary to
6674 call this function to process posted events. This normally happens
6675 during each event loop iteration.
6676 """
6677 return _core_.PyApp_ProcessPendingEvents(*args, **kwargs)
6678
6679 def Yield(*args, **kwargs):
6680 """
6681 Yield(self, bool onlyIfNeeded=False) -> bool
6682
6683 Process all currently pending events right now, instead of waiting
6684 until return to the event loop. It is an error to call ``Yield``
6685 recursively unless the value of ``onlyIfNeeded`` is True.
6686
6687 :warning: This function is dangerous as it can lead to unexpected
6688 reentrancies (i.e. when called from an event handler it may
6689 result in calling the same event handler again), use with
6690 extreme care or, better, don't use at all!
6691
6692 :see: `wx.Yield`, `wx.YieldIfNeeded`, `wx.SafeYield`
6693
6694 """
6695 return _core_.PyApp_Yield(*args, **kwargs)
6696
6697 def WakeUpIdle(*args, **kwargs):
6698 """
6699 WakeUpIdle(self)
6700
6701 Make sure that idle events are sent again.
6702 :see: `wx.WakeUpIdle`
6703 """
6704 return _core_.PyApp_WakeUpIdle(*args, **kwargs)
6705
6706 def IsMainLoopRunning(*args, **kwargs):
6707 """
6708 IsMainLoopRunning() -> bool
6709
6710 Returns True if we're running the main loop, i.e. if the events can
6711 currently be dispatched.
6712 """
6713 return _core_.PyApp_IsMainLoopRunning(*args, **kwargs)
6714
6715 IsMainLoopRunning = staticmethod(IsMainLoopRunning)
6716 def MainLoop(*args, **kwargs):
6717 """
6718 MainLoop(self) -> int
6719
6720 Execute the main GUI loop, the function doesn't normally return until
6721 all top level windows have been closed and destroyed.
6722 """
6723 return _core_.PyApp_MainLoop(*args, **kwargs)
6724
6725 def Exit(*args, **kwargs):
6726 """
6727 Exit(self)
6728
6729 Exit the main loop thus terminating the application.
6730 :see: `wx.Exit`
6731 """
6732 return _core_.PyApp_Exit(*args, **kwargs)
6733
6734 def GetLayoutDirection(*args, **kwargs):
6735 """
6736 GetLayoutDirection(self) -> wxLayoutDirection
6737
6738 Return the layout direction for the current locale.
6739 """
6740 return _core_.PyApp_GetLayoutDirection(*args, **kwargs)
6741
6742 def ExitMainLoop(*args, **kwargs):
6743 """
6744 ExitMainLoop(self)
6745
6746 Exit the main GUI loop during the next iteration of the main
6747 loop, (i.e. it does not stop the program immediately!)
6748 """
6749 return _core_.PyApp_ExitMainLoop(*args, **kwargs)
6750
6751 def Pending(*args, **kwargs):
6752 """
6753 Pending(self) -> bool
6754
6755 Returns True if there are unprocessed events in the event queue.
6756 """
6757 return _core_.PyApp_Pending(*args, **kwargs)
6758
6759 def Dispatch(*args, **kwargs):
6760 """
6761 Dispatch(self) -> bool
6762
6763 Process the first event in the event queue (blocks until an event
6764 appears if there are none currently)
6765 """
6766 return _core_.PyApp_Dispatch(*args, **kwargs)
6767
6768 def ProcessIdle(*args, **kwargs):
6769 """
6770 ProcessIdle(self) -> bool
6771
6772 Called from the MainLoop when the application becomes idle (there are
6773 no pending events) and sends a `wx.IdleEvent` to all interested
6774 parties. Returns True if more idle events are needed, False if not.
6775 """
6776 return _core_.PyApp_ProcessIdle(*args, **kwargs)
6777
6778 def SendIdleEvents(*args, **kwargs):
6779 """
6780 SendIdleEvents(self, Window win, IdleEvent event) -> bool
6781
6782 Send idle event to window and all subwindows. Returns True if more
6783 idle time is requested.
6784 """
6785 return _core_.PyApp_SendIdleEvents(*args, **kwargs)
6786
6787 def IsActive(*args, **kwargs):
6788 """
6789 IsActive(self) -> bool
6790
6791 Return True if our app has focus.
6792 """
6793 return _core_.PyApp_IsActive(*args, **kwargs)
6794
6795 def SetTopWindow(*args, **kwargs):
6796 """
6797 SetTopWindow(self, Window win)
6798
6799 Set the *main* top level window
6800 """
6801 return _core_.PyApp_SetTopWindow(*args, **kwargs)
6802
6803 def GetTopWindow(*args, **kwargs):
6804 """
6805 GetTopWindow(self) -> Window
6806
6807 Return the *main* top level window (if it hadn't been set previously
6808 with SetTopWindow(), will return just some top level window and, if
6809 there not any, will return None)
6810 """
6811 return _core_.PyApp_GetTopWindow(*args, **kwargs)
6812
6813 def SetExitOnFrameDelete(*args, **kwargs):
6814 """
6815 SetExitOnFrameDelete(self, bool flag)
6816
6817 Control the exit behaviour: by default, the program will exit the main
6818 loop (and so, usually, terminate) when the last top-level program
6819 window is deleted. Beware that if you disable this behaviour (with
6820 SetExitOnFrameDelete(False)), you'll have to call ExitMainLoop()
6821 explicitly from somewhere.
6822 """
6823 return _core_.PyApp_SetExitOnFrameDelete(*args, **kwargs)
6824
6825 def GetExitOnFrameDelete(*args, **kwargs):
6826 """
6827 GetExitOnFrameDelete(self) -> bool
6828
6829 Get the current exit behaviour setting.
6830 """
6831 return _core_.PyApp_GetExitOnFrameDelete(*args, **kwargs)
6832
6833 def SetUseBestVisual(*args, **kwargs):
6834 """
6835 SetUseBestVisual(self, bool flag)
6836
6837 Set whether the app should try to use the best available visual on
6838 systems where more than one is available, (Sun, SGI, XFree86 4, etc.)
6839 """
6840 return _core_.PyApp_SetUseBestVisual(*args, **kwargs)
6841
6842 def GetUseBestVisual(*args, **kwargs):
6843 """
6844 GetUseBestVisual(self) -> bool
6845
6846 Get current UseBestVisual setting.
6847 """
6848 return _core_.PyApp_GetUseBestVisual(*args, **kwargs)
6849
6850 def SetPrintMode(*args, **kwargs):
6851 """SetPrintMode(self, int mode)"""
6852 return _core_.PyApp_SetPrintMode(*args, **kwargs)
6853
6854 def GetPrintMode(*args, **kwargs):
6855 """GetPrintMode(self) -> int"""
6856 return _core_.PyApp_GetPrintMode(*args, **kwargs)
6857
6858 def SetAssertMode(*args, **kwargs):
6859 """
6860 SetAssertMode(self, int mode)
6861
6862 Set the OnAssert behaviour for debug and hybrid builds.
6863 """
6864 return _core_.PyApp_SetAssertMode(*args, **kwargs)
6865
6866 def GetAssertMode(*args, **kwargs):
6867 """
6868 GetAssertMode(self) -> int
6869
6870 Get the current OnAssert behaviour setting.
6871 """
6872 return _core_.PyApp_GetAssertMode(*args, **kwargs)
6873
6874 def GetMacSupportPCMenuShortcuts(*args, **kwargs):
6875 """GetMacSupportPCMenuShortcuts() -> bool"""
6876 return _core_.PyApp_GetMacSupportPCMenuShortcuts(*args, **kwargs)
6877
6878 GetMacSupportPCMenuShortcuts = staticmethod(GetMacSupportPCMenuShortcuts)
6879 def GetMacAboutMenuItemId(*args, **kwargs):
6880 """GetMacAboutMenuItemId() -> long"""
6881 return _core_.PyApp_GetMacAboutMenuItemId(*args, **kwargs)
6882
6883 GetMacAboutMenuItemId = staticmethod(GetMacAboutMenuItemId)
6884 def GetMacPreferencesMenuItemId(*args, **kwargs):
6885 """GetMacPreferencesMenuItemId() -> long"""
6886 return _core_.PyApp_GetMacPreferencesMenuItemId(*args, **kwargs)
6887
6888 GetMacPreferencesMenuItemId = staticmethod(GetMacPreferencesMenuItemId)
6889 def GetMacExitMenuItemId(*args, **kwargs):
6890 """GetMacExitMenuItemId() -> long"""
6891 return _core_.PyApp_GetMacExitMenuItemId(*args, **kwargs)
6892
6893 GetMacExitMenuItemId = staticmethod(GetMacExitMenuItemId)
6894 def GetMacHelpMenuTitleName(*args, **kwargs):
6895 """GetMacHelpMenuTitleName() -> String"""
6896 return _core_.PyApp_GetMacHelpMenuTitleName(*args, **kwargs)
6897
6898 GetMacHelpMenuTitleName = staticmethod(GetMacHelpMenuTitleName)
6899 def SetMacSupportPCMenuShortcuts(*args, **kwargs):
6900 """SetMacSupportPCMenuShortcuts(bool val)"""
6901 return _core_.PyApp_SetMacSupportPCMenuShortcuts(*args, **kwargs)
6902
6903 SetMacSupportPCMenuShortcuts = staticmethod(SetMacSupportPCMenuShortcuts)
6904 def SetMacAboutMenuItemId(*args, **kwargs):
6905 """SetMacAboutMenuItemId(long val)"""
6906 return _core_.PyApp_SetMacAboutMenuItemId(*args, **kwargs)
6907
6908 SetMacAboutMenuItemId = staticmethod(SetMacAboutMenuItemId)
6909 def SetMacPreferencesMenuItemId(*args, **kwargs):
6910 """SetMacPreferencesMenuItemId(long val)"""
6911 return _core_.PyApp_SetMacPreferencesMenuItemId(*args, **kwargs)
6912
6913 SetMacPreferencesMenuItemId = staticmethod(SetMacPreferencesMenuItemId)
6914 def SetMacExitMenuItemId(*args, **kwargs):
6915 """SetMacExitMenuItemId(long val)"""
6916 return _core_.PyApp_SetMacExitMenuItemId(*args, **kwargs)
6917
6918 SetMacExitMenuItemId = staticmethod(SetMacExitMenuItemId)
6919 def SetMacHelpMenuTitleName(*args, **kwargs):
6920 """SetMacHelpMenuTitleName(String val)"""
6921 return _core_.PyApp_SetMacHelpMenuTitleName(*args, **kwargs)
6922
6923 SetMacHelpMenuTitleName = staticmethod(SetMacHelpMenuTitleName)
6924 def _BootstrapApp(*args, **kwargs):
6925 """
6926 _BootstrapApp(self)
6927
6928 For internal use only
6929 """
6930 return _core_.PyApp__BootstrapApp(*args, **kwargs)
6931
6932 def GetComCtl32Version(*args, **kwargs):
6933 """
6934 GetComCtl32Version() -> int
6935
6936 Returns 400, 470, 471, etc. for comctl32.dll 4.00, 4.70, 4.71 or 0 if
6937 it wasn't found at all. Raises an exception on non-Windows platforms.
6938 """
6939 return _core_.PyApp_GetComCtl32Version(*args, **kwargs)
6940
6941 GetComCtl32Version = staticmethod(GetComCtl32Version)
6942 def DisplayAvailable(*args, **kwargs):
6943 """
6944 DisplayAvailable() -> bool
6945
6946 Tests if it is possible to create a GUI in the current environment.
6947 This will mean different things on the different platforms.
6948
6949 * On X Windows systems this function will return ``False`` if it is
6950 not able to open a connection to the X display, which can happen
6951 if $DISPLAY is not set, or is not set correctly.
6952
6953 * On Mac OS X a ``False`` return value will mean that wx is not
6954 able to access the window manager, which can happen if logged in
6955 remotely or if running from the normal version of python instead
6956 of the framework version, (i.e., pythonw.)
6957
6958 * On MS Windows...
6959
6960 """
6961 return _core_.PyApp_DisplayAvailable(*args, **kwargs)
6962
6963 DisplayAvailable = staticmethod(DisplayAvailable)
6964 _core_.PyApp_swigregister(PyApp)
6965
6966 def PyApp_IsMainLoopRunning(*args):
6967 """
6968 PyApp_IsMainLoopRunning() -> bool
6969
6970 Returns True if we're running the main loop, i.e. if the events can
6971 currently be dispatched.
6972 """
6973 return _core_.PyApp_IsMainLoopRunning(*args)
6974
6975 def PyApp_GetMacSupportPCMenuShortcuts(*args):
6976 """PyApp_GetMacSupportPCMenuShortcuts() -> bool"""
6977 return _core_.PyApp_GetMacSupportPCMenuShortcuts(*args)
6978
6979 def PyApp_GetMacAboutMenuItemId(*args):
6980 """PyApp_GetMacAboutMenuItemId() -> long"""
6981 return _core_.PyApp_GetMacAboutMenuItemId(*args)
6982
6983 def PyApp_GetMacPreferencesMenuItemId(*args):
6984 """PyApp_GetMacPreferencesMenuItemId() -> long"""
6985 return _core_.PyApp_GetMacPreferencesMenuItemId(*args)
6986
6987 def PyApp_GetMacExitMenuItemId(*args):
6988 """PyApp_GetMacExitMenuItemId() -> long"""
6989 return _core_.PyApp_GetMacExitMenuItemId(*args)
6990
6991 def PyApp_GetMacHelpMenuTitleName(*args):
6992 """PyApp_GetMacHelpMenuTitleName() -> String"""
6993 return _core_.PyApp_GetMacHelpMenuTitleName(*args)
6994
6995 def PyApp_SetMacSupportPCMenuShortcuts(*args, **kwargs):
6996 """PyApp_SetMacSupportPCMenuShortcuts(bool val)"""
6997 return _core_.PyApp_SetMacSupportPCMenuShortcuts(*args, **kwargs)
6998
6999 def PyApp_SetMacAboutMenuItemId(*args, **kwargs):
7000 """PyApp_SetMacAboutMenuItemId(long val)"""
7001 return _core_.PyApp_SetMacAboutMenuItemId(*args, **kwargs)
7002
7003 def PyApp_SetMacPreferencesMenuItemId(*args, **kwargs):
7004 """PyApp_SetMacPreferencesMenuItemId(long val)"""
7005 return _core_.PyApp_SetMacPreferencesMenuItemId(*args, **kwargs)
7006
7007 def PyApp_SetMacExitMenuItemId(*args, **kwargs):
7008 """PyApp_SetMacExitMenuItemId(long val)"""
7009 return _core_.PyApp_SetMacExitMenuItemId(*args, **kwargs)
7010
7011 def PyApp_SetMacHelpMenuTitleName(*args, **kwargs):
7012 """PyApp_SetMacHelpMenuTitleName(String val)"""
7013 return _core_.PyApp_SetMacHelpMenuTitleName(*args, **kwargs)
7014
7015 def PyApp_GetComCtl32Version(*args):
7016 """
7017 PyApp_GetComCtl32Version() -> int
7018
7019 Returns 400, 470, 471, etc. for comctl32.dll 4.00, 4.70, 4.71 or 0 if
7020 it wasn't found at all. Raises an exception on non-Windows platforms.
7021 """
7022 return _core_.PyApp_GetComCtl32Version(*args)
7023
7024 def PyApp_DisplayAvailable(*args):
7025 """
7026 PyApp_DisplayAvailable() -> bool
7027
7028 Tests if it is possible to create a GUI in the current environment.
7029 This will mean different things on the different platforms.
7030
7031 * On X Windows systems this function will return ``False`` if it is
7032 not able to open a connection to the X display, which can happen
7033 if $DISPLAY is not set, or is not set correctly.
7034
7035 * On Mac OS X a ``False`` return value will mean that wx is not
7036 able to access the window manager, which can happen if logged in
7037 remotely or if running from the normal version of python instead
7038 of the framework version, (i.e., pythonw.)
7039
7040 * On MS Windows...
7041
7042 """
7043 return _core_.PyApp_DisplayAvailable(*args)
7044
7045 #---------------------------------------------------------------------------
7046
7047
7048 def Exit(*args):
7049 """
7050 Exit()
7051
7052 Force an exit of the application. Convenience for wx.GetApp().Exit()
7053 """
7054 return _core_.Exit(*args)
7055
7056 def Yield(*args):
7057 """
7058 Yield() -> bool
7059
7060 Yield to other apps/messages. Convenience for wx.GetApp().Yield()
7061 """
7062 return _core_.Yield(*args)
7063
7064 def YieldIfNeeded(*args):
7065 """
7066 YieldIfNeeded() -> bool
7067
7068 Yield to other apps/messages. Convenience for wx.GetApp().Yield(True)
7069 """
7070 return _core_.YieldIfNeeded(*args)
7071
7072 def SafeYield(*args, **kwargs):
7073 """
7074 SafeYield(Window win=None, bool onlyIfNeeded=False) -> bool
7075
7076 This function is similar to `wx.Yield`, except that it disables the
7077 user input to all program windows before calling `wx.Yield` and
7078 re-enables it again afterwards. If ``win`` is not None, this window
7079 will remain enabled, allowing the implementation of some limited user
7080 interaction.
7081
7082 :Returns: the result of the call to `wx.Yield`.
7083 """
7084 return _core_.SafeYield(*args, **kwargs)
7085
7086 def WakeUpIdle(*args):
7087 """
7088 WakeUpIdle()
7089
7090 Cause the message queue to become empty again, so idle events will be
7091 sent.
7092 """
7093 return _core_.WakeUpIdle(*args)
7094
7095 def PostEvent(*args, **kwargs):
7096 """
7097 PostEvent(EvtHandler dest, Event event)
7098
7099 Send an event to a window or other wx.EvtHandler to be processed
7100 later.
7101 """
7102 return _core_.PostEvent(*args, **kwargs)
7103
7104 def App_CleanUp(*args):
7105 """
7106 App_CleanUp()
7107
7108 For internal use only, it is used to cleanup after wxWidgets when
7109 Python shuts down.
7110 """
7111 return _core_.App_CleanUp(*args)
7112
7113 def GetApp(*args):
7114 """
7115 GetApp() -> PyApp
7116
7117 Return a reference to the current wx.App object.
7118 """
7119 return _core_.GetApp(*args)
7120
7121 def SetDefaultPyEncoding(*args, **kwargs):
7122 """
7123 SetDefaultPyEncoding(string encoding)
7124
7125 Sets the encoding that wxPython will use when it needs to convert a
7126 Python string or unicode object to or from a wxString.
7127
7128 The default encoding is the value of ``locale.getdefaultlocale()[1]``
7129 but please be aware that the default encoding within the same locale
7130 may be slightly different on different platforms. For example, please
7131 see http://www.alanwood.net/demos/charsetdiffs.html for differences
7132 between the common latin/roman encodings.
7133 """
7134 return _core_.SetDefaultPyEncoding(*args, **kwargs)
7135
7136 def GetDefaultPyEncoding(*args):
7137 """
7138 GetDefaultPyEncoding() -> string
7139
7140 Gets the current encoding that wxPython will use when it needs to
7141 convert a Python string or unicode object to or from a wxString.
7142 """
7143 return _core_.GetDefaultPyEncoding(*args)
7144 #----------------------------------------------------------------------
7145
7146 class PyOnDemandOutputWindow:
7147 """
7148 A class that can be used for redirecting Python's stdout and
7149 stderr streams. It will do nothing until something is wrriten to
7150 the stream at which point it will create a Frame with a text area
7151 and write the text there.
7152 """
7153 def __init__(self, title = "wxPython: stdout/stderr"):
7154 self.frame = None
7155 self.title = title
7156 self.pos = wx.DefaultPosition
7157 self.size = (450, 300)
7158 self.parent = None
7159
7160 def SetParent(self, parent):
7161 """Set the window to be used as the popup Frame's parent."""
7162 self.parent = parent
7163
7164
7165 def CreateOutputWindow(self, st):
7166 self.frame = wx.Frame(self.parent, -1, self.title, self.pos, self.size,
7167 style=wx.DEFAULT_FRAME_STYLE)
7168 self.text = wx.TextCtrl(self.frame, -1, "",
7169 style=wx.TE_MULTILINE|wx.TE_READONLY)
7170 self.text.AppendText(st)
7171 self.frame.Show(True)
7172 self.frame.Bind(wx.EVT_CLOSE, self.OnCloseWindow)
7173
7174
7175 def OnCloseWindow(self, event):
7176 if self.frame is not None:
7177 self.frame.Destroy()
7178 self.frame = None
7179 self.text = None
7180
7181
7182 # These methods provide the file-like output behaviour.
7183 def write(self, text):
7184 """
7185 Create the output window if needed and write the string to it.
7186 If not called in the context of the gui thread then uses
7187 CallAfter to do the work there.
7188 """
7189 if self.frame is None:
7190 if not wx.Thread_IsMain():
7191 wx.CallAfter(self.CreateOutputWindow, text)
7192 else:
7193 self.CreateOutputWindow(text)
7194 else:
7195 if not wx.Thread_IsMain():
7196 wx.CallAfter(self.text.AppendText, text)
7197 else:
7198 self.text.AppendText(text)
7199
7200
7201 def close(self):
7202 if self.frame is not None:
7203 wx.CallAfter(self.frame.Close)
7204
7205
7206 def flush(self):
7207 pass
7208
7209
7210
7211 #----------------------------------------------------------------------
7212
7213 _defRedirect = (wx.Platform == '__WXMSW__' or wx.Platform == '__WXMAC__')
7214
7215 class App(wx.PyApp):
7216 """
7217 The ``wx.App`` class represents the application and is used to:
7218
7219 * bootstrap the wxPython system and initialize the underlying
7220 gui toolkit
7221 * set and get application-wide properties
7222 * implement the windowing system main message or event loop,
7223 and to dispatch events to window instances
7224 * etc.
7225
7226 Every application must have a ``wx.App`` instance, and all
7227 creation of UI objects should be delayed until after the
7228 ``wx.App`` object has been created in order to ensure that the gui
7229 platform and wxWidgets have been fully initialized.
7230
7231 Normally you would derive from this class and implement an
7232 ``OnInit`` method that creates a frame and then calls
7233 ``self.SetTopWindow(frame)``.
7234
7235 :see: `wx.PySimpleApp` for a simpler app class that can be used
7236 directly.
7237 """
7238
7239 outputWindowClass = PyOnDemandOutputWindow
7240
7241 def __init__(self, redirect=_defRedirect, filename=None,
7242 useBestVisual=False, clearSigInt=True):
7243 """
7244 Construct a ``wx.App`` object.
7245
7246 :param redirect: Should ``sys.stdout`` and ``sys.stderr`` be
7247 redirected? Defaults to True on Windows and Mac, False
7248 otherwise. If `filename` is None then output will be
7249 redirected to a window that pops up as needed. (You can
7250 control what kind of window is created for the output by
7251 resetting the class variable ``outputWindowClass`` to a
7252 class of your choosing.)
7253
7254 :param filename: The name of a file to redirect output to, if
7255 redirect is True.
7256
7257 :param useBestVisual: Should the app try to use the best
7258 available visual provided by the system (only relevant on
7259 systems that have more than one visual.) This parameter
7260 must be used instead of calling `SetUseBestVisual` later
7261 on because it must be set before the underlying GUI
7262 toolkit is initialized.
7263
7264 :param clearSigInt: Should SIGINT be cleared? This allows the
7265 app to terminate upon a Ctrl-C in the console like other
7266 GUI apps will.
7267
7268 :note: You should override OnInit to do applicaition
7269 initialization to ensure that the system, toolkit and
7270 wxWidgets are fully initialized.
7271 """
7272
7273 wx.PyApp.__init__(self)
7274
7275 # make sure we can create a GUI
7276 if not self.DisplayAvailable():
7277
7278 if wx.Platform == "__WXMAC__":
7279 msg = """This program needs access to the screen.
7280 Please run with 'pythonw', not 'python', and only when you are logged
7281 in on the main display of your Mac."""
7282
7283 elif wx.Platform == "__WXGTK__":
7284 msg ="Unable to access the X Display, is $DISPLAY set properly?"
7285
7286 else:
7287 msg = "Unable to create GUI"
7288 # TODO: more description is needed for wxMSW...
7289
7290 raise SystemExit(msg)
7291
7292 # This has to be done before OnInit
7293 self.SetUseBestVisual(useBestVisual)
7294
7295 # Set the default handler for SIGINT. This fixes a problem
7296 # where if Ctrl-C is pressed in the console that started this
7297 # app then it will not appear to do anything, (not even send
7298 # KeyboardInterrupt???) but will later segfault on exit. By
7299 # setting the default handler then the app will exit, as
7300 # expected (depending on platform.)
7301 if clearSigInt:
7302 try:
7303 import signal
7304 signal.signal(signal.SIGINT, signal.SIG_DFL)
7305 except:
7306 pass
7307
7308 # Save and redirect the stdio to a window?
7309 self.stdioWin = None
7310 self.saveStdio = (_sys.stdout, _sys.stderr)
7311 if redirect:
7312 self.RedirectStdio(filename)
7313
7314 # Use Python's install prefix as the default
7315 wx.StandardPaths.Get().SetInstallPrefix(_sys.prefix)
7316
7317 # This finishes the initialization of wxWindows and then calls
7318 # the OnInit that should be present in the derived class
7319 self._BootstrapApp()
7320
7321
7322 def OnPreInit(self):
7323 """
7324 Things that must be done after _BootstrapApp has done its
7325 thing, but would be nice if they were already done by the time
7326 that OnInit is called.
7327 """
7328 wx.StockGDI._initStockObjects()
7329
7330
7331 def __del__(self, destroy=wx.PyApp.__del__):
7332 self.RestoreStdio() # Just in case the MainLoop was overridden
7333 destroy(self)
7334
7335 def Destroy(self):
7336 wx.PyApp.Destroy(self)
7337 self.thisown = 0
7338
7339 def SetTopWindow(self, frame):
7340 """Set the \"main\" top level window"""
7341 if self.stdioWin:
7342 self.stdioWin.SetParent(frame)
7343 wx.PyApp.SetTopWindow(self, frame)
7344
7345
7346 def MainLoop(self):
7347 """Execute the main GUI event loop"""
7348 wx.PyApp.MainLoop(self)
7349 self.RestoreStdio()
7350
7351
7352 def RedirectStdio(self, filename=None):
7353 """Redirect sys.stdout and sys.stderr to a file or a popup window."""
7354 if filename:
7355 _sys.stdout = _sys.stderr = open(filename, 'a')
7356 else:
7357 self.stdioWin = self.outputWindowClass()
7358 _sys.stdout = _sys.stderr = self.stdioWin
7359
7360
7361 def RestoreStdio(self):
7362 try:
7363 _sys.stdout, _sys.stderr = self.saveStdio
7364 except:
7365 pass
7366
7367
7368 def SetOutputWindowAttributes(self, title=None, pos=None, size=None):
7369 """
7370 Set the title, position and/or size of the output window if
7371 the stdio has been redirected. This should be called before
7372 any output would cause the output window to be created.
7373 """
7374 if self.stdioWin:
7375 if title is not None:
7376 self.stdioWin.title = title
7377 if pos is not None:
7378 self.stdioWin.pos = pos
7379 if size is not None:
7380 self.stdioWin.size = size
7381
7382
7383
7384
7385 # change from wx.PyApp_XX to wx.App_XX
7386 App_GetMacSupportPCMenuShortcuts = _core_.PyApp_GetMacSupportPCMenuShortcuts
7387 App_GetMacAboutMenuItemId = _core_.PyApp_GetMacAboutMenuItemId
7388 App_GetMacPreferencesMenuItemId = _core_.PyApp_GetMacPreferencesMenuItemId
7389 App_GetMacExitMenuItemId = _core_.PyApp_GetMacExitMenuItemId
7390 App_GetMacHelpMenuTitleName = _core_.PyApp_GetMacHelpMenuTitleName
7391 App_SetMacSupportPCMenuShortcuts = _core_.PyApp_SetMacSupportPCMenuShortcuts
7392 App_SetMacAboutMenuItemId = _core_.PyApp_SetMacAboutMenuItemId
7393 App_SetMacPreferencesMenuItemId = _core_.PyApp_SetMacPreferencesMenuItemId
7394 App_SetMacExitMenuItemId = _core_.PyApp_SetMacExitMenuItemId
7395 App_SetMacHelpMenuTitleName = _core_.PyApp_SetMacHelpMenuTitleName
7396 App_GetComCtl32Version = _core_.PyApp_GetComCtl32Version
7397
7398 #----------------------------------------------------------------------------
7399
7400 class PySimpleApp(wx.App):
7401 """
7402 A simple application class. You can just create one of these and
7403 then then make your top level windows later, and not have to worry
7404 about OnInit. For example::
7405
7406 app = wx.PySimpleApp()
7407 frame = wx.Frame(None, title='Hello World')
7408 frame.Show()
7409 app.MainLoop()
7410
7411 :see: `wx.App`
7412 """
7413
7414 def __init__(self, redirect=False, filename=None,
7415 useBestVisual=False, clearSigInt=True):
7416 """
7417 :see: `wx.App.__init__`
7418 """
7419 wx.App.__init__(self, redirect, filename, useBestVisual, clearSigInt)
7420
7421 def OnInit(self):
7422 return True
7423
7424
7425
7426 # Is anybody using this one?
7427 class PyWidgetTester(wx.App):
7428 def __init__(self, size = (250, 100)):
7429 self.size = size
7430 wx.App.__init__(self, 0)
7431
7432 def OnInit(self):
7433 self.frame = wx.Frame(None, -1, "Widget Tester", pos=(0,0), size=self.size)
7434 self.SetTopWindow(self.frame)
7435 return True
7436
7437 def SetWidget(self, widgetClass, *args, **kwargs):
7438 w = widgetClass(self.frame, *args, **kwargs)
7439 self.frame.Show(True)
7440
7441 #----------------------------------------------------------------------------
7442 # DO NOT hold any other references to this object. This is how we
7443 # know when to cleanup system resources that wxWidgets is holding. When
7444 # the sys module is unloaded, the refcount on sys.__wxPythonCleanup
7445 # goes to zero and it calls the wx.App_CleanUp function.
7446
7447 class __wxPyCleanup:
7448 def __init__(self):
7449 self.cleanup = _core_.App_CleanUp
7450 def __del__(self):
7451 self.cleanup()
7452
7453 _sys.__wxPythonCleanup = __wxPyCleanup()
7454
7455 ## # another possible solution, but it gets called too early...
7456 ## import atexit
7457 ## atexit.register(_core_.wxApp_CleanUp)
7458
7459
7460 #----------------------------------------------------------------------------
7461
7462 #---------------------------------------------------------------------------
7463
7464 class EventLoop(object):
7465 """Proxy of C++ EventLoop class"""
7466 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
7467 __repr__ = _swig_repr
7468 def __init__(self, *args, **kwargs):
7469 """__init__(self) -> EventLoop"""
7470 _core_.EventLoop_swiginit(self,_core_.new_EventLoop(*args, **kwargs))
7471 __swig_destroy__ = _core_.delete_EventLoop
7472 __del__ = lambda self : None;
7473 def Run(*args, **kwargs):
7474 """Run(self) -> int"""
7475 return _core_.EventLoop_Run(*args, **kwargs)
7476
7477 def Exit(*args, **kwargs):
7478 """Exit(self, int rc=0)"""
7479 return _core_.EventLoop_Exit(*args, **kwargs)
7480
7481 def Pending(*args, **kwargs):
7482 """Pending(self) -> bool"""
7483 return _core_.EventLoop_Pending(*args, **kwargs)
7484
7485 def Dispatch(*args, **kwargs):
7486 """Dispatch(self) -> bool"""
7487 return _core_.EventLoop_Dispatch(*args, **kwargs)
7488
7489 def IsRunning(*args, **kwargs):
7490 """IsRunning(self) -> bool"""
7491 return _core_.EventLoop_IsRunning(*args, **kwargs)
7492
7493 def GetActive(*args, **kwargs):
7494 """GetActive() -> EventLoop"""
7495 return _core_.EventLoop_GetActive(*args, **kwargs)
7496
7497 GetActive = staticmethod(GetActive)
7498 def SetActive(*args, **kwargs):
7499 """SetActive(EventLoop loop)"""
7500 return _core_.EventLoop_SetActive(*args, **kwargs)
7501
7502 SetActive = staticmethod(SetActive)
7503 _core_.EventLoop_swigregister(EventLoop)
7504
7505 def EventLoop_GetActive(*args):
7506 """EventLoop_GetActive() -> EventLoop"""
7507 return _core_.EventLoop_GetActive(*args)
7508
7509 def EventLoop_SetActive(*args, **kwargs):
7510 """EventLoop_SetActive(EventLoop loop)"""
7511 return _core_.EventLoop_SetActive(*args, **kwargs)
7512
7513 class EventLoopActivator(object):
7514 """Proxy of C++ EventLoopActivator class"""
7515 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
7516 __repr__ = _swig_repr
7517 def __init__(self, *args, **kwargs):
7518 """__init__(self, EventLoop evtLoop) -> EventLoopActivator"""
7519 _core_.EventLoopActivator_swiginit(self,_core_.new_EventLoopActivator(*args, **kwargs))
7520 __swig_destroy__ = _core_.delete_EventLoopActivator
7521 __del__ = lambda self : None;
7522 _core_.EventLoopActivator_swigregister(EventLoopActivator)
7523
7524 #---------------------------------------------------------------------------
7525
7526 ACCEL_ALT = _core_.ACCEL_ALT
7527 ACCEL_CTRL = _core_.ACCEL_CTRL
7528 ACCEL_SHIFT = _core_.ACCEL_SHIFT
7529 ACCEL_NORMAL = _core_.ACCEL_NORMAL
7530 ACCEL_CMD = _core_.ACCEL_CMD
7531 class AcceleratorEntry(object):
7532 """
7533 A class used to define items in an `wx.AcceleratorTable`. wxPython
7534 programs can choose to use wx.AcceleratorEntry objects, but using a
7535 list of 3-tuple of integers (flags, keyCode, cmdID) usually works just
7536 as well. See `__init__` for of the tuple values.
7537
7538 :see: `wx.AcceleratorTable`
7539 """
7540 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
7541 __repr__ = _swig_repr
7542 def __init__(self, *args, **kwargs):
7543 """
7544 __init__(self, int flags=0, int keyCode=0, int cmdID=0) -> AcceleratorEntry
7545
7546 Construct a wx.AcceleratorEntry.
7547 """
7548 _core_.AcceleratorEntry_swiginit(self,_core_.new_AcceleratorEntry(*args, **kwargs))
7549 __swig_destroy__ = _core_.delete_AcceleratorEntry
7550 __del__ = lambda self : None;
7551 def Set(*args, **kwargs):
7552 """
7553 Set(self, int flags, int keyCode, int cmd)
7554
7555 (Re)set the attributes of a wx.AcceleratorEntry.
7556 :see `__init__`
7557 """
7558 return _core_.AcceleratorEntry_Set(*args, **kwargs)
7559
7560 def Create(*args, **kwargs):
7561 """
7562 Create(String str) -> AcceleratorEntry
7563
7564 Create accelerator corresponding to the specified string, or None if
7565 it coulnd't be parsed.
7566 """
7567 return _core_.AcceleratorEntry_Create(*args, **kwargs)
7568
7569 Create = staticmethod(Create)
7570 def GetFlags(*args, **kwargs):
7571 """
7572 GetFlags(self) -> int
7573
7574 Get the AcceleratorEntry's flags.
7575 """
7576 return _core_.AcceleratorEntry_GetFlags(*args, **kwargs)
7577
7578 def GetKeyCode(*args, **kwargs):
7579 """
7580 GetKeyCode(self) -> int
7581
7582 Get the AcceleratorEntry's keycode.
7583 """
7584 return _core_.AcceleratorEntry_GetKeyCode(*args, **kwargs)
7585
7586 def GetCommand(*args, **kwargs):
7587 """
7588 GetCommand(self) -> int
7589
7590 Get the AcceleratorEntry's command ID.
7591 """
7592 return _core_.AcceleratorEntry_GetCommand(*args, **kwargs)
7593
7594 def IsOk(*args, **kwargs):
7595 """IsOk(self) -> bool"""
7596 return _core_.AcceleratorEntry_IsOk(*args, **kwargs)
7597
7598 def ToString(*args, **kwargs):
7599 """
7600 ToString(self) -> String
7601
7602 Returns a string representation for the this accelerator. The string
7603 is formatted using the <flags>-<keycode> format where <flags> maybe a
7604 hyphen-separed list of "shift|alt|ctrl"
7605
7606 """
7607 return _core_.AcceleratorEntry_ToString(*args, **kwargs)
7608
7609 def FromString(*args, **kwargs):
7610 """
7611 FromString(self, String str) -> bool
7612
7613 Returns true if the given string correctly initialized this object.
7614 """
7615 return _core_.AcceleratorEntry_FromString(*args, **kwargs)
7616
7617 Command = property(GetCommand,doc="See `GetCommand`")
7618 Flags = property(GetFlags,doc="See `GetFlags`")
7619 KeyCode = property(GetKeyCode,doc="See `GetKeyCode`")
7620 _core_.AcceleratorEntry_swigregister(AcceleratorEntry)
7621
7622 def AcceleratorEntry_Create(*args, **kwargs):
7623 """
7624 AcceleratorEntry_Create(String str) -> AcceleratorEntry
7625
7626 Create accelerator corresponding to the specified string, or None if
7627 it coulnd't be parsed.
7628 """
7629 return _core_.AcceleratorEntry_Create(*args, **kwargs)
7630
7631 class AcceleratorTable(Object):
7632 """
7633 An accelerator table allows the application to specify a table of
7634 keyboard shortcuts for menus or other commands. On Windows, menu or
7635 button commands are supported; on GTK, only menu commands are
7636 supported.
7637 """
7638 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
7639 __repr__ = _swig_repr
7640 def __init__(self, *args, **kwargs):
7641 """
7642 __init__(entries) -> AcceleratorTable
7643
7644 Construct an AcceleratorTable from a list of `wx.AcceleratorEntry`
7645 items or or of 3-tuples (flags, keyCode, cmdID)
7646
7647 :see: `wx.AcceleratorEntry`
7648 """
7649 _core_.AcceleratorTable_swiginit(self,_core_.new_AcceleratorTable(*args, **kwargs))
7650 __swig_destroy__ = _core_.delete_AcceleratorTable
7651 __del__ = lambda self : None;
7652 def Ok(*args, **kwargs):
7653 """Ok(self) -> bool"""
7654 return _core_.AcceleratorTable_Ok(*args, **kwargs)
7655
7656 _core_.AcceleratorTable_swigregister(AcceleratorTable)
7657
7658
7659 def GetAccelFromString(*args, **kwargs):
7660 """GetAccelFromString(String label) -> AcceleratorEntry"""
7661 return _core_.GetAccelFromString(*args, **kwargs)
7662 #---------------------------------------------------------------------------
7663
7664 class VisualAttributes(object):
7665 """struct containing all the visual attributes of a control"""
7666 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
7667 __repr__ = _swig_repr
7668 def __init__(self, *args, **kwargs):
7669 """
7670 __init__(self) -> VisualAttributes
7671
7672 struct containing all the visual attributes of a control
7673 """
7674 _core_.VisualAttributes_swiginit(self,_core_.new_VisualAttributes(*args, **kwargs))
7675 __swig_destroy__ = _core_.delete_VisualAttributes
7676 __del__ = lambda self : None;
7677 font = property(_core_.VisualAttributes_font_get, _core_.VisualAttributes_font_set)
7678 colFg = property(_core_.VisualAttributes_colFg_get, _core_.VisualAttributes_colFg_set)
7679 colBg = property(_core_.VisualAttributes_colBg_get, _core_.VisualAttributes_colBg_set)
7680 _core_.VisualAttributes_swigregister(VisualAttributes)
7681 NullAcceleratorTable = cvar.NullAcceleratorTable
7682 PanelNameStr = cvar.PanelNameStr
7683
7684 WINDOW_VARIANT_NORMAL = _core_.WINDOW_VARIANT_NORMAL
7685 WINDOW_VARIANT_SMALL = _core_.WINDOW_VARIANT_SMALL
7686 WINDOW_VARIANT_MINI = _core_.WINDOW_VARIANT_MINI
7687 WINDOW_VARIANT_LARGE = _core_.WINDOW_VARIANT_LARGE
7688 WINDOW_VARIANT_MAX = _core_.WINDOW_VARIANT_MAX
7689 class Window(EvtHandler):
7690 """
7691 wx.Window is the base class for all windows and represents any visible
7692 object on the screen. All controls, top level windows and so on are
7693 wx.Windows. Sizers and device contexts are not however, as they don't
7694 appear on screen themselves.
7695
7696 """
7697 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
7698 __repr__ = _swig_repr
7699 def __init__(self, *args, **kwargs):
7700 """
7701 __init__(self, Window parent, int id=-1, Point pos=DefaultPosition,
7702 Size size=DefaultSize, long style=0, String name=PanelNameStr) -> Window
7703
7704 Construct and show a generic Window.
7705 """
7706 _core_.Window_swiginit(self,_core_.new_Window(*args, **kwargs))
7707 self._setOORInfo(self)
7708
7709 def Create(*args, **kwargs):
7710 """
7711 Create(self, Window parent, int id=-1, Point pos=DefaultPosition,
7712 Size size=DefaultSize, long style=0, String name=PanelNameStr) -> bool
7713
7714 Create the GUI part of the Window for 2-phase creation mode.
7715 """
7716 return _core_.Window_Create(*args, **kwargs)
7717
7718 def Close(*args, **kwargs):
7719 """
7720 Close(self, bool force=False) -> bool
7721
7722 This function simply generates a EVT_CLOSE event whose handler usually
7723 tries to close the window. It doesn't close the window itself,
7724 however. If force is False (the default) then the window's close
7725 handler will be allowed to veto the destruction of the window.
7726 """
7727 return _core_.Window_Close(*args, **kwargs)
7728
7729 def Destroy(*args, **kwargs):
7730 """
7731 Destroy(self) -> bool
7732
7733 Destroys the window safely. Frames and dialogs are not destroyed
7734 immediately when this function is called -- they are added to a list
7735 of windows to be deleted on idle time, when all the window's events
7736 have been processed. This prevents problems with events being sent to
7737 non-existent windows.
7738
7739 Returns True if the window has either been successfully deleted, or it
7740 has been added to the list of windows pending real deletion.
7741 """
7742 val = _core_.Window_Destroy(*args, **kwargs)
7743 args[0].thisown = 0
7744 return val
7745
7746 def DestroyChildren(*args, **kwargs):
7747 """
7748 DestroyChildren(self) -> bool
7749
7750 Destroys all children of a window. Called automatically by the
7751 destructor.
7752 """
7753 return _core_.Window_DestroyChildren(*args, **kwargs)
7754
7755 def IsBeingDeleted(*args, **kwargs):
7756 """
7757 IsBeingDeleted(self) -> bool
7758
7759 Is the window in the process of being deleted?
7760 """
7761 return _core_.Window_IsBeingDeleted(*args, **kwargs)
7762
7763 def SetLabel(*args, **kwargs):
7764 """
7765 SetLabel(self, String label)
7766
7767 Set the text which the window shows in its label if applicable.
7768 """
7769 return _core_.Window_SetLabel(*args, **kwargs)
7770
7771 def GetLabel(*args, **kwargs):
7772 """
7773 GetLabel(self) -> String
7774
7775 Generic way of getting a label from any window, for identification
7776 purposes. The interpretation of this function differs from class to
7777 class. For frames and dialogs, the value returned is the title. For
7778 buttons or static text controls, it is the button text. This function
7779 can be useful for meta-programs such as testing tools or special-needs
7780 access programs)which need to identify windows by name.
7781 """
7782 return _core_.Window_GetLabel(*args, **kwargs)
7783
7784 def SetName(*args, **kwargs):
7785 """
7786 SetName(self, String name)
7787
7788 Sets the window's name. The window name is used for ressource setting
7789 in X, it is not the same as the window title/label
7790 """
7791 return _core_.Window_SetName(*args, **kwargs)
7792
7793 def GetName(*args, **kwargs):
7794 """
7795 GetName(self) -> String
7796
7797 Returns the windows name. This name is not guaranteed to be unique;
7798 it is up to the programmer to supply an appropriate name in the window
7799 constructor or via wx.Window.SetName.
7800 """
7801 return _core_.Window_GetName(*args, **kwargs)
7802
7803 def SetWindowVariant(*args, **kwargs):
7804 """
7805 SetWindowVariant(self, int variant)
7806
7807 Sets the variant of the window/font size to use for this window, if
7808 the platform supports variants, for example, wxMac.
7809 """
7810 return _core_.Window_SetWindowVariant(*args, **kwargs)
7811
7812 def GetWindowVariant(*args, **kwargs):
7813 """GetWindowVariant(self) -> int"""
7814 return _core_.Window_GetWindowVariant(*args, **kwargs)
7815
7816 def SetId(*args, **kwargs):
7817 """
7818 SetId(self, int winid)
7819
7820 Sets the identifier of the window. Each window has an integer
7821 identifier. If the application has not provided one, an identifier
7822 will be generated. Normally, the identifier should be provided on
7823 creation and should not be modified subsequently.
7824 """
7825 return _core_.Window_SetId(*args, **kwargs)
7826
7827 def GetId(*args, **kwargs):
7828 """
7829 GetId(self) -> int
7830
7831 Returns the identifier of the window. Each window has an integer
7832 identifier. If the application has not provided one (or the default Id
7833 -1 is used) then an unique identifier with a negative value will be
7834 generated.
7835 """
7836 return _core_.Window_GetId(*args, **kwargs)
7837
7838 def NewControlId(*args, **kwargs):
7839 """
7840 NewControlId() -> int
7841
7842 Generate a control id for the controls which were not given one.
7843 """
7844 return _core_.Window_NewControlId(*args, **kwargs)
7845
7846 NewControlId = staticmethod(NewControlId)
7847 def NextControlId(*args, **kwargs):
7848 """
7849 NextControlId(int winid) -> int
7850
7851 Get the id of the control following the one with the given
7852 autogenerated) id
7853 """
7854 return _core_.Window_NextControlId(*args, **kwargs)
7855
7856 NextControlId = staticmethod(NextControlId)
7857 def PrevControlId(*args, **kwargs):
7858 """
7859 PrevControlId(int winid) -> int
7860
7861 Get the id of the control preceding the one with the given
7862 autogenerated) id
7863 """
7864 return _core_.Window_PrevControlId(*args, **kwargs)
7865
7866 PrevControlId = staticmethod(PrevControlId)
7867 def GetLayoutDirection(*args, **kwargs):
7868 """
7869 GetLayoutDirection(self) -> wxLayoutDirection
7870
7871 Get the layout direction (LTR or RTL) for this window. Returns
7872 ``wx.Layout_Default`` if layout direction is not supported.
7873 """
7874 return _core_.Window_GetLayoutDirection(*args, **kwargs)
7875
7876 def SetLayoutDirection(*args, **kwargs):
7877 """
7878 SetLayoutDirection(self, wxLayoutDirection dir)
7879
7880 Set the layout direction (LTR or RTL) for this window.
7881 """
7882 return _core_.Window_SetLayoutDirection(*args, **kwargs)
7883
7884 def AdjustForLayoutDirection(*args, **kwargs):
7885 """
7886 AdjustForLayoutDirection(self, int x, int width, int widthTotal) -> int
7887
7888 Mirror coordinates for RTL layout if this window uses it and if the
7889 mirroring is not done automatically like Win32.
7890 """
7891 return _core_.Window_AdjustForLayoutDirection(*args, **kwargs)
7892
7893 def SetSize(*args, **kwargs):
7894 """
7895 SetSize(self, Size size)
7896
7897 Sets the size of the window in pixels.
7898 """
7899 return _core_.Window_SetSize(*args, **kwargs)
7900
7901 def SetDimensions(*args, **kwargs):
7902 """
7903 SetDimensions(self, int x, int y, int width, int height, int sizeFlags=SIZE_AUTO)
7904
7905 Sets the position and size of the window in pixels. The sizeFlags
7906 parameter indicates the interpretation of the other params if they are
7907 equal to -1.
7908
7909 ======================== ======================================
7910 wx.SIZE_AUTO A -1 indicates that a class-specific
7911 default should be used.
7912 wx.SIZE_USE_EXISTING Axisting dimensions should be used if
7913 -1 values are supplied.
7914 wxSIZE_ALLOW_MINUS_ONE Allow dimensions of -1 and less to be
7915 interpreted as real dimensions, not
7916 default values.
7917 ======================== ======================================
7918
7919 """
7920 return _core_.Window_SetDimensions(*args, **kwargs)
7921
7922 def SetRect(*args, **kwargs):
7923 """
7924 SetRect(self, Rect rect, int sizeFlags=SIZE_AUTO)
7925
7926 Sets the position and size of the window in pixels using a wx.Rect.
7927 """
7928 return _core_.Window_SetRect(*args, **kwargs)
7929
7930 def SetSizeWH(*args, **kwargs):
7931 """
7932 SetSizeWH(self, int width, int height)
7933
7934 Sets the size of the window in pixels.
7935 """
7936 return _core_.Window_SetSizeWH(*args, **kwargs)
7937
7938 def Move(*args, **kwargs):
7939 """
7940 Move(self, Point pt, int flags=SIZE_USE_EXISTING)
7941
7942 Moves the window to the given position.
7943 """
7944 return _core_.Window_Move(*args, **kwargs)
7945
7946 SetPosition = Move
7947 def MoveXY(*args, **kwargs):
7948 """
7949 MoveXY(self, int x, int y, int flags=SIZE_USE_EXISTING)
7950
7951 Moves the window to the given position.
7952 """
7953 return _core_.Window_MoveXY(*args, **kwargs)
7954
7955 def SetBestFittingSize(*args, **kwargs):
7956 """
7957 SetBestFittingSize(self, Size size=DefaultSize)
7958
7959 A 'Smart' SetSize that will fill in default size components with the
7960 window's *best size* values. Also set's the minsize for use with sizers.
7961 """
7962 return _core_.Window_SetBestFittingSize(*args, **kwargs)
7963
7964 def Raise(*args, **kwargs):
7965 """
7966 Raise(self)
7967
7968 Raises the window to the top of the window hierarchy. In current
7969 version of wxWidgets this works both for manage and child windows.
7970 """
7971 return _core_.Window_Raise(*args, **kwargs)
7972
7973 def Lower(*args, **kwargs):
7974 """
7975 Lower(self)
7976
7977 Lowers the window to the bottom of the window hierarchy. In current
7978 version of wxWidgets this works both for manage and child windows.
7979 """
7980 return _core_.Window_Lower(*args, **kwargs)
7981
7982 def SetClientSize(*args, **kwargs):
7983 """
7984 SetClientSize(self, Size size)
7985
7986 This sets the size of the window client area in pixels. Using this
7987 function to size a window tends to be more device-independent than
7988 wx.Window.SetSize, since the application need not worry about what
7989 dimensions the border or title bar have when trying to fit the window
7990 around panel items, for example.
7991 """
7992 return _core_.Window_SetClientSize(*args, **kwargs)
7993
7994 def SetClientSizeWH(*args, **kwargs):
7995 """
7996 SetClientSizeWH(self, int width, int height)
7997
7998 This sets the size of the window client area in pixels. Using this
7999 function to size a window tends to be more device-independent than
8000 wx.Window.SetSize, since the application need not worry about what
8001 dimensions the border or title bar have when trying to fit the window
8002 around panel items, for example.
8003 """
8004 return _core_.Window_SetClientSizeWH(*args, **kwargs)
8005
8006 def SetClientRect(*args, **kwargs):
8007 """
8008 SetClientRect(self, Rect rect)
8009
8010 This sets the size of the window client area in pixels. Using this
8011 function to size a window tends to be more device-independent than
8012 wx.Window.SetSize, since the application need not worry about what
8013 dimensions the border or title bar have when trying to fit the window
8014 around panel items, for example.
8015 """
8016 return _core_.Window_SetClientRect(*args, **kwargs)
8017
8018 def GetPosition(*args, **kwargs):
8019 """
8020 GetPosition(self) -> Point
8021
8022 Get the window's position. Notice that the position is in client
8023 coordinates for child windows and screen coordinates for the top level
8024 ones, use `GetScreenPosition` if you need screen coordinates for all
8025 kinds of windows.
8026 """
8027 return _core_.Window_GetPosition(*args, **kwargs)
8028
8029 def GetPositionTuple(*args, **kwargs):
8030 """
8031 GetPositionTuple() -> (x,y)
8032
8033 Get the window's position. Notice that the position is in client
8034 coordinates for child windows and screen coordinates for the top level
8035 ones, use `GetScreenPosition` if you need screen coordinates for all
8036 kinds of windows.
8037 """
8038 return _core_.Window_GetPositionTuple(*args, **kwargs)
8039
8040 def GetScreenPosition(*args, **kwargs):
8041 """
8042 GetScreenPosition(self) -> Point
8043
8044 Get the position of the window in screen coordinantes.
8045 """
8046 return _core_.Window_GetScreenPosition(*args, **kwargs)
8047
8048 def GetScreenPositionTuple(*args, **kwargs):
8049 """
8050 GetScreenPositionTuple() -> (x,y)
8051
8052 Get the position of the window in screen coordinantes.
8053 """
8054 return _core_.Window_GetScreenPositionTuple(*args, **kwargs)
8055
8056 def GetScreenRect(*args, **kwargs):
8057 """
8058 GetScreenRect(self) -> Rect
8059
8060 Returns the size and position of the window in screen coordinantes as
8061 a `wx.Rect` object.
8062 """
8063 return _core_.Window_GetScreenRect(*args, **kwargs)
8064
8065 def GetSize(*args, **kwargs):
8066 """
8067 GetSize(self) -> Size
8068
8069 Get the window size.
8070 """
8071 return _core_.Window_GetSize(*args, **kwargs)
8072
8073 def GetSizeTuple(*args, **kwargs):
8074 """
8075 GetSizeTuple() -> (width, height)
8076
8077 Get the window size.
8078 """
8079 return _core_.Window_GetSizeTuple(*args, **kwargs)
8080
8081 def GetRect(*args, **kwargs):
8082 """
8083 GetRect(self) -> Rect
8084
8085 Returns the size and position of the window as a `wx.Rect` object.
8086 """
8087 return _core_.Window_GetRect(*args, **kwargs)
8088
8089 def GetClientSize(*args, **kwargs):
8090 """
8091 GetClientSize(self) -> Size
8092
8093 This gets the size of the window's 'client area' in pixels. The client
8094 area is the area which may be drawn on by the programmer, excluding
8095 title bar, border, scrollbars, etc.
8096 """
8097 return _core_.Window_GetClientSize(*args, **kwargs)
8098
8099 def GetClientSizeTuple(*args, **kwargs):
8100 """
8101 GetClientSizeTuple() -> (width, height)
8102
8103 This gets the size of the window's 'client area' in pixels. The client
8104 area is the area which may be drawn on by the programmer, excluding
8105 title bar, border, scrollbars, etc.
8106 """
8107 return _core_.Window_GetClientSizeTuple(*args, **kwargs)
8108
8109 def GetClientAreaOrigin(*args, **kwargs):
8110 """
8111 GetClientAreaOrigin(self) -> Point
8112
8113 Get the origin of the client area of the window relative to the
8114 window's top left corner (the client area may be shifted because of
8115 the borders, scrollbars, other decorations...)
8116 """
8117 return _core_.Window_GetClientAreaOrigin(*args, **kwargs)
8118
8119 def GetClientRect(*args, **kwargs):
8120 """
8121 GetClientRect(self) -> Rect
8122
8123 Get the client area position and size as a `wx.Rect` object.
8124 """
8125 return _core_.Window_GetClientRect(*args, **kwargs)
8126
8127 def GetBestSize(*args, **kwargs):
8128 """
8129 GetBestSize(self) -> Size
8130
8131 This function returns the best acceptable minimal size for the
8132 window, if applicable. For example, for a static text control, it will
8133 be the minimal size such that the control label is not truncated. For
8134 windows containing subwindows (suzh aswx.Panel), the size returned by
8135 this function will be the same as the size the window would have had
8136 after calling Fit.
8137 """
8138 return _core_.Window_GetBestSize(*args, **kwargs)
8139
8140 def GetBestSizeTuple(*args, **kwargs):
8141 """
8142 GetBestSizeTuple() -> (width, height)
8143
8144 This function returns the best acceptable minimal size for the
8145 window, if applicable. For example, for a static text control, it will
8146 be the minimal size such that the control label is not truncated. For
8147 windows containing subwindows (suzh aswx.Panel), the size returned by
8148 this function will be the same as the size the window would have had
8149 after calling Fit.
8150 """
8151 return _core_.Window_GetBestSizeTuple(*args, **kwargs)
8152
8153 def InvalidateBestSize(*args, **kwargs):
8154 """
8155 InvalidateBestSize(self)
8156
8157 Reset the cached best size value so it will be recalculated the next
8158 time it is needed.
8159 """
8160 return _core_.Window_InvalidateBestSize(*args, **kwargs)
8161
8162 def CacheBestSize(*args, **kwargs):
8163 """
8164 CacheBestSize(self, Size size)
8165
8166 Cache the best size so it doesn't need to be calculated again, (at least until
8167 some properties of the window change.)
8168 """
8169 return _core_.Window_CacheBestSize(*args, **kwargs)
8170
8171 def GetBestFittingSize(*args, **kwargs):
8172 """
8173 GetBestFittingSize(self) -> Size
8174
8175 This function will merge the window's best size into the window's
8176 minimum size, giving priority to the min size components, and returns
8177 the results.
8178
8179 """
8180 return _core_.Window_GetBestFittingSize(*args, **kwargs)
8181
8182 def GetAdjustedBestSize(*args, **kwargs):
8183 """
8184 GetAdjustedBestSize(self) -> Size
8185
8186 This method is similar to GetBestSize, except in one
8187 thing. GetBestSize should return the minimum untruncated size of the
8188 window, while this method will return the largest of BestSize and any
8189 user specified minimum size. ie. it is the minimum size the window
8190 should currently be drawn at, not the minimal size it can possibly
8191 tolerate.
8192 """
8193 return _core_.Window_GetAdjustedBestSize(*args, **kwargs)
8194
8195 def Center(*args, **kwargs):
8196 """
8197 Center(self, int direction=BOTH)
8198
8199 Centers the window. The parameter specifies the direction for
8200 cetering, and may be wx.HORIZONTAL, wx.VERTICAL or wx.BOTH. It may
8201 also include wx.CENTER_ON_SCREEN flag if you want to center the window
8202 on the entire screen and not on its parent window. If it is a
8203 top-level window and has no parent then it will always be centered
8204 relative to the screen.
8205 """
8206 return _core_.Window_Center(*args, **kwargs)
8207
8208 Centre = Center
8209 def CenterOnParent(*args, **kwargs):
8210 """
8211 CenterOnParent(self, int dir=BOTH)
8212
8213 Center with respect to the the parent window
8214 """
8215 return _core_.Window_CenterOnParent(*args, **kwargs)
8216
8217 CentreOnParent = CenterOnParent
8218 def Fit(*args, **kwargs):
8219 """
8220 Fit(self)
8221
8222 Sizes the window so that it fits around its subwindows. This function
8223 won't do anything if there are no subwindows and will only really work
8224 correctly if sizers are used for the subwindows layout. Also, if the
8225 window has exactly one subwindow it is better (faster and the result
8226 is more precise as Fit adds some margin to account for fuzziness of
8227 its calculations) to call window.SetClientSize(child.GetSize())
8228 instead of calling Fit.
8229 """
8230 return _core_.Window_Fit(*args, **kwargs)
8231
8232 def FitInside(*args, **kwargs):
8233 """
8234 FitInside(self)
8235
8236 Similar to Fit, but sizes the interior (virtual) size of a
8237 window. Mainly useful with scrolled windows to reset scrollbars after
8238 sizing changes that do not trigger a size event, and/or scrolled
8239 windows without an interior sizer. This function similarly won't do
8240 anything if there are no subwindows.
8241 """
8242 return _core_.Window_FitInside(*args, **kwargs)
8243
8244 def SetSizeHints(*args, **kwargs):
8245 """
8246 SetSizeHints(self, int minW, int minH, int maxW=-1, int maxH=-1, int incW=-1,
8247 int incH=-1)
8248
8249 Allows specification of minimum and maximum window sizes, and window
8250 size increments. If a pair of values is not set (or set to -1), the
8251 default values will be used. If this function is called, the user
8252 will not be able to size the window outside the given bounds (if it is
8253 a top-level window.) Sizers will also inspect the minimum window size
8254 and will use that value if set when calculating layout.
8255
8256 The resizing increments are only significant under Motif or Xt.
8257 """
8258 return _core_.Window_SetSizeHints(*args, **kwargs)
8259
8260 def SetSizeHintsSz(*args, **kwargs):
8261 """
8262 SetSizeHintsSz(self, Size minSize, Size maxSize=DefaultSize, Size incSize=DefaultSize)
8263
8264 Allows specification of minimum and maximum window sizes, and window
8265 size increments. If a pair of values is not set (or set to -1), the
8266 default values will be used. If this function is called, the user
8267 will not be able to size the window outside the given bounds (if it is
8268 a top-level window.) Sizers will also inspect the minimum window size
8269 and will use that value if set when calculating layout.
8270
8271 The resizing increments are only significant under Motif or Xt.
8272 """
8273 return _core_.Window_SetSizeHintsSz(*args, **kwargs)
8274
8275 def SetVirtualSizeHints(*args, **kwargs):
8276 """
8277 SetVirtualSizeHints(self, int minW, int minH, int maxW=-1, int maxH=-1)
8278
8279 Allows specification of minimum and maximum virtual window sizes. If a
8280 pair of values is not set (or set to -1), the default values will be
8281 used. If this function is called, the user will not be able to size
8282 the virtual area of the window outside the given bounds.
8283 """
8284 return _core_.Window_SetVirtualSizeHints(*args, **kwargs)
8285
8286 def SetVirtualSizeHintsSz(*args, **kwargs):
8287 """
8288 SetVirtualSizeHintsSz(self, Size minSize, Size maxSize=DefaultSize)
8289
8290 Allows specification of minimum and maximum virtual window sizes. If a
8291 pair of values is not set (or set to -1), the default values will be
8292 used. If this function is called, the user will not be able to size
8293 the virtual area of the window outside the given bounds.
8294 """
8295 return _core_.Window_SetVirtualSizeHintsSz(*args, **kwargs)
8296
8297 def GetMaxSize(*args, **kwargs):
8298 """GetMaxSize(self) -> Size"""
8299 return _core_.Window_GetMaxSize(*args, **kwargs)
8300
8301 def GetMinSize(*args, **kwargs):
8302 """GetMinSize(self) -> Size"""
8303 return _core_.Window_GetMinSize(*args, **kwargs)
8304
8305 def SetMinSize(*args, **kwargs):
8306 """
8307 SetMinSize(self, Size minSize)
8308
8309 A more convenient method than `SetSizeHints` for setting just the
8310 min size.
8311 """
8312 return _core_.Window_SetMinSize(*args, **kwargs)
8313
8314 def SetMaxSize(*args, **kwargs):
8315 """
8316 SetMaxSize(self, Size maxSize)
8317
8318 A more convenient method than `SetSizeHints` for setting just the
8319 max size.
8320 """
8321 return _core_.Window_SetMaxSize(*args, **kwargs)
8322
8323 def GetMinWidth(*args, **kwargs):
8324 """GetMinWidth(self) -> int"""
8325 return _core_.Window_GetMinWidth(*args, **kwargs)
8326
8327 def GetMinHeight(*args, **kwargs):
8328 """GetMinHeight(self) -> int"""
8329 return _core_.Window_GetMinHeight(*args, **kwargs)
8330
8331 def GetMaxWidth(*args, **kwargs):
8332 """GetMaxWidth(self) -> int"""
8333 return _core_.Window_GetMaxWidth(*args, **kwargs)
8334
8335 def GetMaxHeight(*args, **kwargs):
8336 """GetMaxHeight(self) -> int"""
8337 return _core_.Window_GetMaxHeight(*args, **kwargs)
8338
8339 def SetVirtualSize(*args, **kwargs):
8340 """
8341 SetVirtualSize(self, Size size)
8342
8343 Set the the virtual size of a window in pixels. For most windows this
8344 is just the client area of the window, but for some like scrolled
8345 windows it is more or less independent of the screen window size.
8346 """
8347 return _core_.Window_SetVirtualSize(*args, **kwargs)
8348
8349 def SetVirtualSizeWH(*args, **kwargs):
8350 """
8351 SetVirtualSizeWH(self, int w, int h)
8352
8353 Set the the virtual size of a window in pixels. For most windows this
8354 is just the client area of the window, but for some like scrolled
8355 windows it is more or less independent of the screen window size.
8356 """
8357 return _core_.Window_SetVirtualSizeWH(*args, **kwargs)
8358
8359 def GetVirtualSize(*args, **kwargs):
8360 """
8361 GetVirtualSize(self) -> Size
8362
8363 Get the the virtual size of the window in pixels. For most windows
8364 this is just the client area of the window, but for some like scrolled
8365 windows it is more or less independent of the screen window size.
8366 """
8367 return _core_.Window_GetVirtualSize(*args, **kwargs)
8368
8369 def GetVirtualSizeTuple(*args, **kwargs):
8370 """
8371 GetVirtualSizeTuple() -> (width, height)
8372
8373 Get the the virtual size of the window in pixels. For most windows
8374 this is just the client area of the window, but for some like scrolled
8375 windows it is more or less independent of the screen window size.
8376 """
8377 return _core_.Window_GetVirtualSizeTuple(*args, **kwargs)
8378
8379 def GetBestVirtualSize(*args, **kwargs):
8380 """
8381 GetBestVirtualSize(self) -> Size
8382
8383 Return the largest of ClientSize and BestSize (as determined by a
8384 sizer, interior children, or other means)
8385 """
8386 return _core_.Window_GetBestVirtualSize(*args, **kwargs)
8387
8388 def Show(*args, **kwargs):
8389 """
8390 Show(self, bool show=True) -> bool
8391
8392 Shows or hides the window. You may need to call Raise for a top level
8393 window if you want to bring it to top, although this is not needed if
8394 Show is called immediately after the frame creation. Returns True if
8395 the window has been shown or hidden or False if nothing was done
8396 because it already was in the requested state.
8397 """
8398 return _core_.Window_Show(*args, **kwargs)
8399
8400 def Hide(*args, **kwargs):
8401 """
8402 Hide(self) -> bool
8403
8404 Equivalent to calling Show(False).
8405 """
8406 return _core_.Window_Hide(*args, **kwargs)
8407
8408 def Enable(*args, **kwargs):
8409 """
8410 Enable(self, bool enable=True) -> bool
8411
8412 Enable or disable the window for user input. Note that when a parent
8413 window is disabled, all of its children are disabled as well and they
8414 are reenabled again when the parent is. Returns true if the window
8415 has been enabled or disabled, false if nothing was done, i.e. if the
8416 window had already been in the specified state.
8417 """
8418 return _core_.Window_Enable(*args, **kwargs)
8419
8420 def Disable(*args, **kwargs):
8421 """
8422 Disable(self) -> bool
8423
8424 Disables the window, same as Enable(false).
8425 """
8426 return _core_.Window_Disable(*args, **kwargs)
8427
8428 def IsShown(*args, **kwargs):
8429 """
8430 IsShown(self) -> bool
8431
8432 Returns true if the window is shown, false if it has been hidden.
8433 """
8434 return _core_.Window_IsShown(*args, **kwargs)
8435
8436 def IsEnabled(*args, **kwargs):
8437 """
8438 IsEnabled(self) -> bool
8439
8440 Returns true if the window is enabled for input, false otherwise.
8441 """
8442 return _core_.Window_IsEnabled(*args, **kwargs)
8443
8444 def SetWindowStyleFlag(*args, **kwargs):
8445 """
8446 SetWindowStyleFlag(self, long style)
8447
8448 Sets the style of the window. Please note that some styles cannot be
8449 changed after the window creation and that Refresh() might need to be
8450 called after changing the others for the change to take place
8451 immediately.
8452 """
8453 return _core_.Window_SetWindowStyleFlag(*args, **kwargs)
8454
8455 def GetWindowStyleFlag(*args, **kwargs):
8456 """
8457 GetWindowStyleFlag(self) -> long
8458
8459 Gets the window style that was passed to the constructor or Create
8460 method.
8461 """
8462 return _core_.Window_GetWindowStyleFlag(*args, **kwargs)
8463
8464 SetWindowStyle = SetWindowStyleFlag; GetWindowStyle = GetWindowStyleFlag
8465 def HasFlag(*args, **kwargs):
8466 """
8467 HasFlag(self, int flag) -> bool
8468
8469 Test if the given style is set for this window.
8470 """
8471 return _core_.Window_HasFlag(*args, **kwargs)
8472
8473 def IsRetained(*args, **kwargs):
8474 """
8475 IsRetained(self) -> bool
8476
8477 Returns true if the window is retained, false otherwise. Retained
8478 windows are only available on X platforms.
8479 """
8480 return _core_.Window_IsRetained(*args, **kwargs)
8481
8482 def SetExtraStyle(*args, **kwargs):
8483 """
8484 SetExtraStyle(self, long exStyle)
8485
8486 Sets the extra style bits for the window. Extra styles are the less
8487 often used style bits which can't be set with the constructor or with
8488 SetWindowStyleFlag()
8489 """
8490 return _core_.Window_SetExtraStyle(*args, **kwargs)
8491
8492 def GetExtraStyle(*args, **kwargs):
8493 """
8494 GetExtraStyle(self) -> long
8495
8496 Returns the extra style bits for the window.
8497 """
8498 return _core_.Window_GetExtraStyle(*args, **kwargs)
8499
8500 def MakeModal(*args, **kwargs):
8501 """
8502 MakeModal(self, bool modal=True)
8503
8504 Disables all other windows in the application so that the user can
8505 only interact with this window. Passing False will reverse this
8506 effect.
8507 """
8508 return _core_.Window_MakeModal(*args, **kwargs)
8509
8510 def SetThemeEnabled(*args, **kwargs):
8511 """
8512 SetThemeEnabled(self, bool enableTheme)
8513
8514 This function tells a window if it should use the system's "theme"
8515 code to draw the windows' background instead if its own background
8516 drawing code. This will only have an effect on platforms that support
8517 the notion of themes in user defined windows. One such platform is
8518 GTK+ where windows can have (very colourful) backgrounds defined by a
8519 user's selected theme.
8520
8521 Dialogs, notebook pages and the status bar have this flag set to true
8522 by default so that the default look and feel is simulated best.
8523 """
8524 return _core_.Window_SetThemeEnabled(*args, **kwargs)
8525
8526 def GetThemeEnabled(*args, **kwargs):
8527 """
8528 GetThemeEnabled(self) -> bool
8529
8530 Return the themeEnabled flag.
8531 """
8532 return _core_.Window_GetThemeEnabled(*args, **kwargs)
8533
8534 def SetFocus(*args, **kwargs):
8535 """
8536 SetFocus(self)
8537
8538 Set's the focus to this window, allowing it to receive keyboard input.
8539 """
8540 return _core_.Window_SetFocus(*args, **kwargs)
8541
8542 def SetFocusFromKbd(*args, **kwargs):
8543 """
8544 SetFocusFromKbd(self)
8545
8546 Set focus to this window as the result of a keyboard action. Normally
8547 only called internally.
8548 """
8549 return _core_.Window_SetFocusFromKbd(*args, **kwargs)
8550
8551 def FindFocus(*args, **kwargs):
8552 """
8553 FindFocus() -> Window
8554
8555 Returns the window or control that currently has the keyboard focus,
8556 or None.
8557 """
8558 return _core_.Window_FindFocus(*args, **kwargs)
8559
8560 FindFocus = staticmethod(FindFocus)
8561 def AcceptsFocus(*args, **kwargs):
8562 """
8563 AcceptsFocus(self) -> bool
8564
8565 Can this window have focus?
8566 """
8567 return _core_.Window_AcceptsFocus(*args, **kwargs)
8568
8569 def AcceptsFocusFromKeyboard(*args, **kwargs):
8570 """
8571 AcceptsFocusFromKeyboard(self) -> bool
8572
8573 Can this window be given focus by keyboard navigation? if not, the
8574 only way to give it focus (provided it accepts it at all) is to click
8575 it.
8576 """
8577 return _core_.Window_AcceptsFocusFromKeyboard(*args, **kwargs)
8578
8579 def Navigate(*args, **kwargs):
8580 """
8581 Navigate(self, int flags=NavigationKeyEvent.IsForward) -> bool
8582
8583 Does keyboard navigation from this window to another, by sending a
8584 `wx.NavigationKeyEvent`.
8585 """
8586 return _core_.Window_Navigate(*args, **kwargs)
8587
8588 def MoveAfterInTabOrder(*args, **kwargs):
8589 """
8590 MoveAfterInTabOrder(self, Window win)
8591
8592 Moves this window in the tab navigation order after the specified
8593 sibling window. This means that when the user presses the TAB key on
8594 that other window, the focus switches to this window.
8595
8596 The default tab order is the same as creation order. This function
8597 and `MoveBeforeInTabOrder` allow to change it after creating all the
8598 windows.
8599
8600 """
8601 return _core_.Window_MoveAfterInTabOrder(*args, **kwargs)
8602
8603 def MoveBeforeInTabOrder(*args, **kwargs):
8604 """
8605 MoveBeforeInTabOrder(self, Window win)
8606
8607 Same as `MoveAfterInTabOrder` except that it inserts this window just
8608 before win instead of putting it right after it.
8609 """
8610 return _core_.Window_MoveBeforeInTabOrder(*args, **kwargs)
8611
8612 def GetChildren(*args, **kwargs):
8613 """
8614 GetChildren(self) -> PyObject
8615
8616 Returns a list of the window's children. NOTE: Currently this is a
8617 copy of the child window list maintained by the window, so the return
8618 value of this function is only valid as long as the window's children
8619 do not change.
8620 """
8621 return _core_.Window_GetChildren(*args, **kwargs)
8622
8623 def GetParent(*args, **kwargs):
8624 """
8625 GetParent(self) -> Window
8626
8627 Returns the parent window of this window, or None if there isn't one.
8628 """
8629 return _core_.Window_GetParent(*args, **kwargs)
8630
8631 def GetGrandParent(*args, **kwargs):
8632 """
8633 GetGrandParent(self) -> Window
8634
8635 Returns the parent of the parent of this window, or None if there
8636 isn't one.
8637 """
8638 return _core_.Window_GetGrandParent(*args, **kwargs)
8639
8640 def IsTopLevel(*args, **kwargs):
8641 """
8642 IsTopLevel(self) -> bool
8643
8644 Returns true if the given window is a top-level one. Currently all
8645 frames and dialogs are always considered to be top-level windows (even
8646 if they have a parent window).
8647 """
8648 return _core_.Window_IsTopLevel(*args, **kwargs)
8649
8650 def Reparent(*args, **kwargs):
8651 """
8652 Reparent(self, Window newParent) -> bool
8653
8654 Reparents the window, i.e the window will be removed from its current
8655 parent window (e.g. a non-standard toolbar in a wxFrame) and then
8656 re-inserted into another. Available on Windows and GTK. Returns True
8657 if the parent was changed, False otherwise (error or newParent ==
8658 oldParent)
8659 """
8660 return _core_.Window_Reparent(*args, **kwargs)
8661
8662 def AddChild(*args, **kwargs):
8663 """
8664 AddChild(self, Window child)
8665
8666 Adds a child window. This is called automatically by window creation
8667 functions so should not be required by the application programmer.
8668 """
8669 return _core_.Window_AddChild(*args, **kwargs)
8670
8671 def RemoveChild(*args, **kwargs):
8672 """
8673 RemoveChild(self, Window child)
8674
8675 Removes a child window. This is called automatically by window
8676 deletion functions so should not be required by the application
8677 programmer.
8678 """
8679 return _core_.Window_RemoveChild(*args, **kwargs)
8680
8681 def SetDoubleBuffered(*args, **kwargs):
8682 """
8683 SetDoubleBuffered(self, bool on)
8684
8685 Currently wxGTK2 only.
8686 """
8687 return _core_.Window_SetDoubleBuffered(*args, **kwargs)
8688
8689 def FindWindowById(*args, **kwargs):
8690 """
8691 FindWindowById(self, long winid) -> Window
8692
8693 Find a chld of this window by window ID
8694 """
8695 return _core_.Window_FindWindowById(*args, **kwargs)
8696
8697 def FindWindowByName(*args, **kwargs):
8698 """
8699 FindWindowByName(self, String name) -> Window
8700
8701 Find a child of this window by name
8702 """
8703 return _core_.Window_FindWindowByName(*args, **kwargs)
8704
8705 def GetEventHandler(*args, **kwargs):
8706 """
8707 GetEventHandler(self) -> EvtHandler
8708
8709 Returns the event handler for this window. By default, the window is
8710 its own event handler.
8711 """
8712 return _core_.Window_GetEventHandler(*args, **kwargs)
8713
8714 def SetEventHandler(*args, **kwargs):
8715 """
8716 SetEventHandler(self, EvtHandler handler)
8717
8718 Sets the event handler for this window. An event handler is an object
8719 that is capable of processing the events sent to a window. By default,
8720 the window is its own event handler, but an application may wish to
8721 substitute another, for example to allow central implementation of
8722 event-handling for a variety of different window classes.
8723
8724 It is usually better to use `wx.Window.PushEventHandler` since this sets
8725 up a chain of event handlers, where an event not handled by one event
8726 handler is handed to the next one in the chain.
8727 """
8728 return _core_.Window_SetEventHandler(*args, **kwargs)
8729
8730 def PushEventHandler(*args, **kwargs):
8731 """
8732 PushEventHandler(self, EvtHandler handler)
8733
8734 Pushes this event handler onto the event handler stack for the window.
8735 An event handler is an object that is capable of processing the events
8736 sent to a window. By default, the window is its own event handler, but
8737 an application may wish to substitute another, for example to allow
8738 central implementation of event-handling for a variety of different
8739 window classes.
8740
8741 wx.Window.PushEventHandler allows an application to set up a chain of
8742 event handlers, where an event not handled by one event handler is
8743 handed to the next one in the chain. Use `wx.Window.PopEventHandler` to
8744 remove the event handler.
8745 """
8746 return _core_.Window_PushEventHandler(*args, **kwargs)
8747
8748 def PopEventHandler(*args, **kwargs):
8749 """
8750 PopEventHandler(self, bool deleteHandler=False) -> EvtHandler
8751
8752 Removes and returns the top-most event handler on the event handler
8753 stack. If deleteHandler is True then the wx.EvtHandler object will be
8754 destroyed after it is popped.
8755 """
8756 return _core_.Window_PopEventHandler(*args, **kwargs)
8757
8758 def RemoveEventHandler(*args, **kwargs):
8759 """
8760 RemoveEventHandler(self, EvtHandler handler) -> bool
8761
8762 Find the given handler in the event handler chain and remove (but not
8763 delete) it from the event handler chain, return True if it was found
8764 and False otherwise (this also results in an assert failure so this
8765 function should only be called when the handler is supposed to be
8766 there.)
8767 """
8768 return _core_.Window_RemoveEventHandler(*args, **kwargs)
8769
8770 def SetValidator(*args, **kwargs):
8771 """
8772 SetValidator(self, Validator validator)
8773
8774 Deletes the current validator (if any) and sets the window validator,
8775 having called wx.Validator.Clone to create a new validator of this
8776 type.
8777 """
8778 return _core_.Window_SetValidator(*args, **kwargs)
8779
8780 def GetValidator(*args, **kwargs):
8781 """
8782 GetValidator(self) -> Validator
8783
8784 Returns a pointer to the current validator for the window, or None if
8785 there is none.
8786 """
8787 return _core_.Window_GetValidator(*args, **kwargs)
8788
8789 def Validate(*args, **kwargs):
8790 """
8791 Validate(self) -> bool
8792
8793 Validates the current values of the child controls using their
8794 validators. If the window has wx.WS_EX_VALIDATE_RECURSIVELY extra
8795 style flag set, the method will also call Validate() of all child
8796 windows. Returns false if any of the validations failed.
8797 """
8798 return _core_.Window_Validate(*args, **kwargs)
8799
8800 def TransferDataToWindow(*args, **kwargs):
8801 """
8802 TransferDataToWindow(self) -> bool
8803
8804 Transfers values to child controls from data areas specified by their
8805 validators. If the window has wx.WS_EX_VALIDATE_RECURSIVELY extra
8806 style flag set, the method will also call TransferDataToWindow() of
8807 all child windows.
8808 """
8809 return _core_.Window_TransferDataToWindow(*args, **kwargs)
8810
8811 def TransferDataFromWindow(*args, **kwargs):
8812 """
8813 TransferDataFromWindow(self) -> bool
8814
8815 Transfers values from child controls to data areas specified by their
8816 validators. Returns false if a transfer failed. If the window has
8817 wx.WS_EX_VALIDATE_RECURSIVELY extra style flag set, the method will
8818 also call TransferDataFromWindow() of all child windows.
8819 """
8820 return _core_.Window_TransferDataFromWindow(*args, **kwargs)
8821
8822 def InitDialog(*args, **kwargs):
8823 """
8824 InitDialog(self)
8825
8826 Sends an EVT_INIT_DIALOG event, whose handler usually transfers data
8827 to the dialog via validators.
8828 """
8829 return _core_.Window_InitDialog(*args, **kwargs)
8830
8831 def SetAcceleratorTable(*args, **kwargs):
8832 """
8833 SetAcceleratorTable(self, AcceleratorTable accel)
8834
8835 Sets the accelerator table for this window.
8836 """
8837 return _core_.Window_SetAcceleratorTable(*args, **kwargs)
8838
8839 def GetAcceleratorTable(*args, **kwargs):
8840 """
8841 GetAcceleratorTable(self) -> AcceleratorTable
8842
8843 Gets the accelerator table for this window.
8844 """
8845 return _core_.Window_GetAcceleratorTable(*args, **kwargs)
8846
8847 def RegisterHotKey(*args, **kwargs):
8848 """
8849 RegisterHotKey(self, int hotkeyId, int modifiers, int keycode) -> bool
8850
8851 Registers a system wide hotkey. Every time the user presses the hotkey
8852 registered here, this window will receive a hotkey event. It will
8853 receive the event even if the application is in the background and
8854 does not have the input focus because the user is working with some
8855 other application. To bind an event handler function to this hotkey
8856 use EVT_HOTKEY with an id equal to hotkeyId. Returns True if the
8857 hotkey was registered successfully.
8858 """
8859 return _core_.Window_RegisterHotKey(*args, **kwargs)
8860
8861 def UnregisterHotKey(*args, **kwargs):
8862 """
8863 UnregisterHotKey(self, int hotkeyId) -> bool
8864
8865 Unregisters a system wide hotkey.
8866 """
8867 return _core_.Window_UnregisterHotKey(*args, **kwargs)
8868
8869 def ConvertDialogPointToPixels(*args, **kwargs):
8870 """
8871 ConvertDialogPointToPixels(self, Point pt) -> Point
8872
8873 Converts a point or size from dialog units to pixels. Dialog units
8874 are used for maintaining a dialog's proportions even if the font
8875 changes. For the x dimension, the dialog units are multiplied by the
8876 average character width and then divided by 4. For the y dimension,
8877 the dialog units are multiplied by the average character height and
8878 then divided by 8.
8879 """
8880 return _core_.Window_ConvertDialogPointToPixels(*args, **kwargs)
8881
8882 def ConvertDialogSizeToPixels(*args, **kwargs):
8883 """
8884 ConvertDialogSizeToPixels(self, Size sz) -> Size
8885
8886 Converts a point or size from dialog units to pixels. Dialog units
8887 are used for maintaining a dialog's proportions even if the font
8888 changes. For the x dimension, the dialog units are multiplied by the
8889 average character width and then divided by 4. For the y dimension,
8890 the dialog units are multiplied by the average character height and
8891 then divided by 8.
8892 """
8893 return _core_.Window_ConvertDialogSizeToPixels(*args, **kwargs)
8894
8895 def DLG_PNT(*args, **kwargs):
8896 """
8897 DLG_PNT(self, Point pt) -> Point
8898
8899 Converts a point or size from dialog units to pixels. Dialog units
8900 are used for maintaining a dialog's proportions even if the font
8901 changes. For the x dimension, the dialog units are multiplied by the
8902 average character width and then divided by 4. For the y dimension,
8903 the dialog units are multiplied by the average character height and
8904 then divided by 8.
8905 """
8906 return _core_.Window_DLG_PNT(*args, **kwargs)
8907
8908 def DLG_SZE(*args, **kwargs):
8909 """
8910 DLG_SZE(self, Size sz) -> Size
8911
8912 Converts a point or size from dialog units to pixels. Dialog units
8913 are used for maintaining a dialog's proportions even if the font
8914 changes. For the x dimension, the dialog units are multiplied by the
8915 average character width and then divided by 4. For the y dimension,
8916 the dialog units are multiplied by the average character height and
8917 then divided by 8.
8918 """
8919 return _core_.Window_DLG_SZE(*args, **kwargs)
8920
8921 def ConvertPixelPointToDialog(*args, **kwargs):
8922 """ConvertPixelPointToDialog(self, Point pt) -> Point"""
8923 return _core_.Window_ConvertPixelPointToDialog(*args, **kwargs)
8924
8925 def ConvertPixelSizeToDialog(*args, **kwargs):
8926 """ConvertPixelSizeToDialog(self, Size sz) -> Size"""
8927 return _core_.Window_ConvertPixelSizeToDialog(*args, **kwargs)
8928
8929 def WarpPointer(*args, **kwargs):
8930 """
8931 WarpPointer(self, int x, int y)
8932
8933 Moves the pointer to the given position on the window.
8934
8935 NOTE: This function is not supported under Mac because Apple Human
8936 Interface Guidelines forbid moving the mouse cursor programmatically.
8937 """
8938 return _core_.Window_WarpPointer(*args, **kwargs)
8939
8940 def CaptureMouse(*args, **kwargs):
8941 """
8942 CaptureMouse(self)
8943
8944 Directs all mouse input to this window. Call wx.Window.ReleaseMouse to
8945 release the capture.
8946
8947 Note that wxWindows maintains the stack of windows having captured the
8948 mouse and when the mouse is released the capture returns to the window
8949 which had had captured it previously and it is only really released if
8950 there were no previous window. In particular, this means that you must
8951 release the mouse as many times as you capture it, unless the window
8952 receives the `wx.MouseCaptureLostEvent` event.
8953
8954 Any application which captures the mouse in the beginning of some
8955 operation *must* handle `wx.MouseCaptureLostEvent` and cancel this
8956 operation when it receives the event. The event handler must not
8957 recapture mouse.
8958 """
8959 return _core_.Window_CaptureMouse(*args, **kwargs)
8960
8961 def ReleaseMouse(*args, **kwargs):
8962 """
8963 ReleaseMouse(self)
8964
8965 Releases mouse input captured with wx.Window.CaptureMouse.
8966 """
8967 return _core_.Window_ReleaseMouse(*args, **kwargs)
8968
8969 def GetCapture(*args, **kwargs):
8970 """
8971 GetCapture() -> Window
8972
8973 Returns the window which currently captures the mouse or None
8974 """
8975 return _core_.Window_GetCapture(*args, **kwargs)
8976
8977 GetCapture = staticmethod(GetCapture)
8978 def HasCapture(*args, **kwargs):
8979 """
8980 HasCapture(self) -> bool
8981
8982 Returns true if this window has the current mouse capture.
8983 """
8984 return _core_.Window_HasCapture(*args, **kwargs)
8985
8986 def Refresh(*args, **kwargs):
8987 """
8988 Refresh(self, bool eraseBackground=True, Rect rect=None)
8989
8990 Mark the specified rectangle (or the whole window) as "dirty" so it
8991 will be repainted. Causes an EVT_PAINT event to be generated and sent
8992 to the window.
8993 """
8994 return _core_.Window_Refresh(*args, **kwargs)
8995
8996 def RefreshRect(*args, **kwargs):
8997 """
8998 RefreshRect(self, Rect rect, bool eraseBackground=True)
8999
9000 Redraws the contents of the given rectangle: the area inside it will
9001 be repainted. This is the same as Refresh but has a nicer syntax.
9002 """
9003 return _core_.Window_RefreshRect(*args, **kwargs)
9004
9005 def Update(*args, **kwargs):
9006 """
9007 Update(self)
9008
9009 Calling this method immediately repaints the invalidated area of the
9010 window instead of waiting for the EVT_PAINT event to happen, (normally
9011 this would usually only happen when the flow of control returns to the
9012 event loop.) Notice that this function doesn't refresh the window and
9013 does nothing if the window has been already repainted. Use Refresh
9014 first if you want to immediately redraw the window (or some portion of
9015 it) unconditionally.
9016 """
9017 return _core_.Window_Update(*args, **kwargs)
9018
9019 def ClearBackground(*args, **kwargs):
9020 """
9021 ClearBackground(self)
9022
9023 Clears the window by filling it with the current background
9024 colour. Does not cause an erase background event to be generated.
9025 """
9026 return _core_.Window_ClearBackground(*args, **kwargs)
9027
9028 def Freeze(*args, **kwargs):
9029 """
9030 Freeze(self)
9031
9032 Freezes the window or, in other words, prevents any updates from
9033 taking place on screen, the window is not redrawn at all. Thaw must be
9034 called to reenable window redrawing. Calls to Freeze/Thaw may be
9035 nested, with the actual Thaw being delayed until all the nesting has
9036 been undone.
9037
9038 This method is useful for visual appearance optimization (for example,
9039 it is a good idea to use it before inserting large amount of text into
9040 a wxTextCtrl under wxGTK) but is not implemented on all platforms nor
9041 for all controls so it is mostly just a hint to wxWindows and not a
9042 mandatory directive.
9043 """
9044 return _core_.Window_Freeze(*args, **kwargs)
9045
9046 def Thaw(*args, **kwargs):
9047 """
9048 Thaw(self)
9049
9050 Reenables window updating after a previous call to Freeze. Calls to
9051 Freeze/Thaw may be nested, so Thaw must be called the same number of
9052 times that Freeze was before the window will be updated.
9053 """
9054 return _core_.Window_Thaw(*args, **kwargs)
9055
9056 def PrepareDC(*args, **kwargs):
9057 """
9058 PrepareDC(self, DC dc)
9059
9060 Call this function to prepare the device context for drawing a
9061 scrolled image. It sets the device origin according to the current
9062 scroll position.
9063 """
9064 return _core_.Window_PrepareDC(*args, **kwargs)
9065
9066 def GetUpdateRegion(*args, **kwargs):
9067 """
9068 GetUpdateRegion(self) -> Region
9069
9070 Returns the region specifying which parts of the window have been
9071 damaged. Should only be called within an EVT_PAINT handler.
9072 """
9073 return _core_.Window_GetUpdateRegion(*args, **kwargs)
9074
9075 def GetUpdateClientRect(*args, **kwargs):
9076 """
9077 GetUpdateClientRect(self) -> Rect
9078
9079 Get the update rectangle region bounding box in client coords.
9080 """
9081 return _core_.Window_GetUpdateClientRect(*args, **kwargs)
9082
9083 def IsExposed(*args, **kwargs):
9084 """
9085 IsExposed(self, int x, int y, int w=1, int h=1) -> bool
9086
9087 Returns true if the given point or rectangle area has been exposed
9088 since the last repaint. Call this in an paint event handler to
9089 optimize redrawing by only redrawing those areas, which have been
9090 exposed.
9091 """
9092 return _core_.Window_IsExposed(*args, **kwargs)
9093
9094 def IsExposedPoint(*args, **kwargs):
9095 """
9096 IsExposedPoint(self, Point pt) -> bool
9097
9098 Returns true if the given point or rectangle area has been exposed
9099 since the last repaint. Call this in an paint event handler to
9100 optimize redrawing by only redrawing those areas, which have been
9101 exposed.
9102 """
9103 return _core_.Window_IsExposedPoint(*args, **kwargs)
9104
9105 def IsExposedRect(*args, **kwargs):
9106 """
9107 IsExposedRect(self, Rect rect) -> bool
9108
9109 Returns true if the given point or rectangle area has been exposed
9110 since the last repaint. Call this in an paint event handler to
9111 optimize redrawing by only redrawing those areas, which have been
9112 exposed.
9113 """
9114 return _core_.Window_IsExposedRect(*args, **kwargs)
9115
9116 def GetDefaultAttributes(*args, **kwargs):
9117 """
9118 GetDefaultAttributes(self) -> VisualAttributes
9119
9120 Get the default attributes for an instance of this class. This is
9121 useful if you want to use the same font or colour in your own control
9122 as in a standard control -- which is a much better idea than hard
9123 coding specific colours or fonts which might look completely out of
9124 place on the user's system, especially if it uses themes.
9125 """
9126 return _core_.Window_GetDefaultAttributes(*args, **kwargs)
9127
9128 def GetClassDefaultAttributes(*args, **kwargs):
9129 """
9130 GetClassDefaultAttributes(int variant=WINDOW_VARIANT_NORMAL) -> VisualAttributes
9131
9132 Get the default attributes for this class. This is useful if you want
9133 to use the same font or colour in your own control as in a standard
9134 control -- which is a much better idea than hard coding specific
9135 colours or fonts which might look completely out of place on the
9136 user's system, especially if it uses themes.
9137
9138 The variant parameter is only relevant under Mac currently and is
9139 ignore under other platforms. Under Mac, it will change the size of
9140 the returned font. See `wx.Window.SetWindowVariant` for more about
9141 this.
9142 """
9143 return _core_.Window_GetClassDefaultAttributes(*args, **kwargs)
9144
9145 GetClassDefaultAttributes = staticmethod(GetClassDefaultAttributes)
9146 def SetBackgroundColour(*args, **kwargs):
9147 """
9148 SetBackgroundColour(self, Colour colour) -> bool
9149
9150 Sets the background colour of the window. Returns True if the colour
9151 was changed. The background colour is usually painted by the default
9152 EVT_ERASE_BACKGROUND event handler function under Windows and
9153 automatically under GTK. Using `wx.NullColour` will reset the window
9154 to the default background colour.
9155
9156 Note that setting the background colour may not cause an immediate
9157 refresh, so you may wish to call `ClearBackground` or `Refresh` after
9158 calling this function.
9159
9160 Using this function will disable attempts to use themes for this
9161 window, if the system supports them. Use with care since usually the
9162 themes represent the appearance chosen by the user to be used for all
9163 applications on the system.
9164 """
9165 return _core_.Window_SetBackgroundColour(*args, **kwargs)
9166
9167 def SetOwnBackgroundColour(*args, **kwargs):
9168 """SetOwnBackgroundColour(self, Colour colour)"""
9169 return _core_.Window_SetOwnBackgroundColour(*args, **kwargs)
9170
9171 def SetForegroundColour(*args, **kwargs):
9172 """
9173 SetForegroundColour(self, Colour colour) -> bool
9174
9175 Sets the foreground colour of the window. Returns True is the colour
9176 was changed. The interpretation of foreground colour is dependent on
9177 the window class; it may be the text colour or other colour, or it may
9178 not be used at all.
9179 """
9180 return _core_.Window_SetForegroundColour(*args, **kwargs)
9181
9182 def SetOwnForegroundColour(*args, **kwargs):
9183 """SetOwnForegroundColour(self, Colour colour)"""
9184 return _core_.Window_SetOwnForegroundColour(*args, **kwargs)
9185
9186 def GetBackgroundColour(*args, **kwargs):
9187 """
9188 GetBackgroundColour(self) -> Colour
9189
9190 Returns the background colour of the window.
9191 """
9192 return _core_.Window_GetBackgroundColour(*args, **kwargs)
9193
9194 def GetForegroundColour(*args, **kwargs):
9195 """
9196 GetForegroundColour(self) -> Colour
9197
9198 Returns the foreground colour of the window. The interpretation of
9199 foreground colour is dependent on the window class; it may be the text
9200 colour or other colour, or it may not be used at all.
9201 """
9202 return _core_.Window_GetForegroundColour(*args, **kwargs)
9203
9204 def InheritsBackgroundColour(*args, **kwargs):
9205 """InheritsBackgroundColour(self) -> bool"""
9206 return _core_.Window_InheritsBackgroundColour(*args, **kwargs)
9207
9208 def UseBgCol(*args, **kwargs):
9209 """UseBgCol(self) -> bool"""
9210 return _core_.Window_UseBgCol(*args, **kwargs)
9211
9212 def SetBackgroundStyle(*args, **kwargs):
9213 """
9214 SetBackgroundStyle(self, int style) -> bool
9215
9216 Returns the background style of the window. The background style
9217 indicates how the background of the window is drawn.
9218
9219 ====================== ========================================
9220 wx.BG_STYLE_SYSTEM The background colour or pattern should
9221 be determined by the system
9222 wx.BG_STYLE_COLOUR The background should be a solid colour
9223 wx.BG_STYLE_CUSTOM The background will be implemented by the
9224 application.
9225 ====================== ========================================
9226
9227 On GTK+, use of wx.BG_STYLE_CUSTOM allows the flicker-free drawing of
9228 a custom background, such as a tiled bitmap. Currently the style has
9229 no effect on other platforms.
9230
9231 :see: `GetBackgroundStyle`, `SetBackgroundColour`
9232 """
9233 return _core_.Window_SetBackgroundStyle(*args, **kwargs)
9234
9235 def GetBackgroundStyle(*args, **kwargs):
9236 """
9237 GetBackgroundStyle(self) -> int
9238
9239 Returns the background style of the window.
9240
9241 :see: `SetBackgroundStyle`
9242 """
9243 return _core_.Window_GetBackgroundStyle(*args, **kwargs)
9244
9245 def HasTransparentBackground(*args, **kwargs):
9246 """
9247 HasTransparentBackground(self) -> bool
9248
9249 Returns True if this window's background is transparent (as, for
9250 example, for `wx.StaticText`) and should show the parent window's
9251 background.
9252
9253 This method is mostly used internally by the library itself and you
9254 normally shouldn't have to call it. You may, however, have to override
9255 it in your custom control classes to ensure that background is painted
9256 correctly.
9257 """
9258 return _core_.Window_HasTransparentBackground(*args, **kwargs)
9259
9260 def SetCursor(*args, **kwargs):
9261 """
9262 SetCursor(self, Cursor cursor) -> bool
9263
9264 Sets the window's cursor. Notice that the window cursor also sets it
9265 for the children of the window implicitly.
9266
9267 The cursor may be wx.NullCursor in which case the window cursor will
9268 be reset back to default.
9269 """
9270 return _core_.Window_SetCursor(*args, **kwargs)
9271
9272 def GetCursor(*args, **kwargs):
9273 """
9274 GetCursor(self) -> Cursor
9275
9276 Return the cursor associated with this window.
9277 """
9278 return _core_.Window_GetCursor(*args, **kwargs)
9279
9280 def SetFont(*args, **kwargs):
9281 """
9282 SetFont(self, Font font) -> bool
9283
9284 Sets the font for this window.
9285 """
9286 return _core_.Window_SetFont(*args, **kwargs)
9287
9288 def SetOwnFont(*args, **kwargs):
9289 """SetOwnFont(self, Font font)"""
9290 return _core_.Window_SetOwnFont(*args, **kwargs)
9291
9292 def GetFont(*args, **kwargs):
9293 """
9294 GetFont(self) -> Font
9295
9296 Returns the default font used for this window.
9297 """
9298 return _core_.Window_GetFont(*args, **kwargs)
9299
9300 def SetCaret(*args, **kwargs):
9301 """
9302 SetCaret(self, Caret caret)
9303
9304 Sets the caret associated with the window.
9305 """
9306 return _core_.Window_SetCaret(*args, **kwargs)
9307
9308 def GetCaret(*args, **kwargs):
9309 """
9310 GetCaret(self) -> Caret
9311
9312 Returns the caret associated with the window.
9313 """
9314 return _core_.Window_GetCaret(*args, **kwargs)
9315
9316 def GetCharHeight(*args, **kwargs):
9317 """
9318 GetCharHeight(self) -> int
9319
9320 Get the (average) character size for the current font.
9321 """
9322 return _core_.Window_GetCharHeight(*args, **kwargs)
9323
9324 def GetCharWidth(*args, **kwargs):
9325 """
9326 GetCharWidth(self) -> int
9327
9328 Get the (average) character size for the current font.
9329 """
9330 return _core_.Window_GetCharWidth(*args, **kwargs)
9331
9332 def GetTextExtent(*args, **kwargs):
9333 """
9334 GetTextExtent(String string) -> (width, height)
9335
9336 Get the width and height of the text using the current font.
9337 """
9338 return _core_.Window_GetTextExtent(*args, **kwargs)
9339
9340 def GetFullTextExtent(*args, **kwargs):
9341 """
9342 GetFullTextExtent(String string, Font font=None) ->
9343 (width, height, descent, externalLeading)
9344
9345 Get the width, height, decent and leading of the text using the
9346 current or specified font.
9347 """
9348 return _core_.Window_GetFullTextExtent(*args, **kwargs)
9349
9350 def ClientToScreenXY(*args, **kwargs):
9351 """
9352 ClientToScreenXY(int x, int y) -> (x,y)
9353
9354 Converts to screen coordinates from coordinates relative to this window.
9355 """
9356 return _core_.Window_ClientToScreenXY(*args, **kwargs)
9357
9358 def ScreenToClientXY(*args, **kwargs):
9359 """
9360 ScreenToClientXY(int x, int y) -> (x,y)
9361
9362 Converts from screen to client window coordinates.
9363 """
9364 return _core_.Window_ScreenToClientXY(*args, **kwargs)
9365
9366 def ClientToScreen(*args, **kwargs):
9367 """
9368 ClientToScreen(self, Point pt) -> Point
9369
9370 Converts to screen coordinates from coordinates relative to this window.
9371 """
9372 return _core_.Window_ClientToScreen(*args, **kwargs)
9373
9374 def ScreenToClient(*args, **kwargs):
9375 """
9376 ScreenToClient(self, Point pt) -> Point
9377
9378 Converts from screen to client window coordinates.
9379 """
9380 return _core_.Window_ScreenToClient(*args, **kwargs)
9381
9382 def HitTestXY(*args, **kwargs):
9383 """
9384 HitTestXY(self, int x, int y) -> int
9385
9386 Test where the given (in client coords) point lies
9387 """
9388 return _core_.Window_HitTestXY(*args, **kwargs)
9389
9390 def HitTest(*args, **kwargs):
9391 """
9392 HitTest(self, Point pt) -> int
9393
9394 Test where the given (in client coords) point lies
9395 """
9396 return _core_.Window_HitTest(*args, **kwargs)
9397
9398 def GetBorder(*args):
9399 """
9400 GetBorder(self, long flags) -> int
9401 GetBorder(self) -> int
9402
9403 Get border for the flags of this window
9404 """
9405 return _core_.Window_GetBorder(*args)
9406
9407 def UpdateWindowUI(*args, **kwargs):
9408 """
9409 UpdateWindowUI(self, long flags=UPDATE_UI_NONE)
9410
9411 This function sends EVT_UPDATE_UI events to the window. The particular
9412 implementation depends on the window; for example a wx.ToolBar will
9413 send an update UI event for each toolbar button, and a wx.Frame will
9414 send an update UI event for each menubar menu item. You can call this
9415 function from your application to ensure that your UI is up-to-date at
9416 a particular point in time (as far as your EVT_UPDATE_UI handlers are
9417 concerned). This may be necessary if you have called
9418 `wx.UpdateUIEvent.SetMode` or `wx.UpdateUIEvent.SetUpdateInterval` to
9419 limit the overhead that wxWindows incurs by sending update UI events
9420 in idle time.
9421 """
9422 return _core_.Window_UpdateWindowUI(*args, **kwargs)
9423
9424 def PopupMenuXY(*args, **kwargs):
9425 """
9426 PopupMenuXY(self, Menu menu, int x=-1, int y=-1) -> bool
9427
9428 Pops up the given menu at the specified coordinates, relative to this window,
9429 and returns control when the user has dismissed the menu. If a menu item is
9430 selected, the corresponding menu event is generated and will be processed as
9431 usual. If the default position is given then the current position of the
9432 mouse cursor will be used.
9433 """
9434 return _core_.Window_PopupMenuXY(*args, **kwargs)
9435
9436 def PopupMenu(*args, **kwargs):
9437 """
9438 PopupMenu(self, Menu menu, Point pos=DefaultPosition) -> bool
9439
9440 Pops up the given menu at the specified coordinates, relative to this window,
9441 and returns control when the user has dismissed the menu. If a menu item is
9442 selected, the corresponding menu event is generated and will be processed as
9443 usual. If the default position is given then the current position of the
9444 mouse cursor will be used.
9445 """
9446 return _core_.Window_PopupMenu(*args, **kwargs)
9447
9448 def HasMultiplePages(*args, **kwargs):
9449 """HasMultiplePages(self) -> bool"""
9450 return _core_.Window_HasMultiplePages(*args, **kwargs)
9451
9452 def GetHandle(*args, **kwargs):
9453 """
9454 GetHandle(self) -> long
9455
9456 Returns the platform-specific handle (as a long integer) of the
9457 physical window. Currently on wxMac it returns the handle of the
9458 toplevel parent of the window.
9459 """
9460 return _core_.Window_GetHandle(*args, **kwargs)
9461
9462 def AssociateHandle(*args, **kwargs):
9463 """
9464 AssociateHandle(self, long handle)
9465
9466 Associate the window with a new native handle
9467 """
9468 return _core_.Window_AssociateHandle(*args, **kwargs)
9469
9470 def DissociateHandle(*args, **kwargs):
9471 """
9472 DissociateHandle(self)
9473
9474 Dissociate the current native handle from the window
9475 """
9476 return _core_.Window_DissociateHandle(*args, **kwargs)
9477
9478 def HasScrollbar(*args, **kwargs):
9479 """
9480 HasScrollbar(self, int orient) -> bool
9481
9482 Does the window have the scrollbar for this orientation?
9483 """
9484 return _core_.Window_HasScrollbar(*args, **kwargs)
9485
9486 def SetScrollbar(*args, **kwargs):
9487 """
9488 SetScrollbar(self, int orientation, int position, int thumbSize, int range,
9489 bool refresh=True)
9490
9491 Sets the scrollbar properties of a built-in scrollbar.
9492 """
9493 return _core_.Window_SetScrollbar(*args, **kwargs)
9494
9495 def SetScrollPos(*args, **kwargs):
9496 """
9497 SetScrollPos(self, int orientation, int pos, bool refresh=True)
9498
9499 Sets the position of one of the built-in scrollbars.
9500 """
9501 return _core_.Window_SetScrollPos(*args, **kwargs)
9502
9503 def GetScrollPos(*args, **kwargs):
9504 """
9505 GetScrollPos(self, int orientation) -> int
9506
9507 Returns the built-in scrollbar position.
9508 """
9509 return _core_.Window_GetScrollPos(*args, **kwargs)
9510
9511 def GetScrollThumb(*args, **kwargs):
9512 """
9513 GetScrollThumb(self, int orientation) -> int
9514
9515 Returns the built-in scrollbar thumb size.
9516 """
9517 return _core_.Window_GetScrollThumb(*args, **kwargs)
9518
9519 def GetScrollRange(*args, **kwargs):
9520 """
9521 GetScrollRange(self, int orientation) -> int
9522
9523 Returns the built-in scrollbar range.
9524 """
9525 return _core_.Window_GetScrollRange(*args, **kwargs)
9526
9527 def ScrollWindow(*args, **kwargs):
9528 """
9529 ScrollWindow(self, int dx, int dy, Rect rect=None)
9530
9531 Physically scrolls the pixels in the window and move child windows
9532 accordingly. Use this function to optimise your scrolling
9533 implementations, to minimise the area that must be redrawn. Note that
9534 it is rarely required to call this function from a user program.
9535 """
9536 return _core_.Window_ScrollWindow(*args, **kwargs)
9537
9538 def ScrollLines(*args, **kwargs):
9539 """
9540 ScrollLines(self, int lines) -> bool
9541
9542 If the platform and window class supports it, scrolls the window by
9543 the given number of lines down, if lines is positive, or up if lines
9544 is negative. Returns True if the window was scrolled, False if it was
9545 already on top/bottom and nothing was done.
9546 """
9547 return _core_.Window_ScrollLines(*args, **kwargs)
9548
9549 def ScrollPages(*args, **kwargs):
9550 """
9551 ScrollPages(self, int pages) -> bool
9552
9553 If the platform and window class supports it, scrolls the window by
9554 the given number of pages down, if pages is positive, or up if pages
9555 is negative. Returns True if the window was scrolled, False if it was
9556 already on top/bottom and nothing was done.
9557 """
9558 return _core_.Window_ScrollPages(*args, **kwargs)
9559
9560 def LineUp(*args, **kwargs):
9561 """
9562 LineUp(self) -> bool
9563
9564 This is just a wrapper for ScrollLines(-1).
9565 """
9566 return _core_.Window_LineUp(*args, **kwargs)
9567
9568 def LineDown(*args, **kwargs):
9569 """
9570 LineDown(self) -> bool
9571
9572 This is just a wrapper for ScrollLines(1).
9573 """
9574 return _core_.Window_LineDown(*args, **kwargs)
9575
9576 def PageUp(*args, **kwargs):
9577 """
9578 PageUp(self) -> bool
9579
9580 This is just a wrapper for ScrollPages(-1).
9581 """
9582 return _core_.Window_PageUp(*args, **kwargs)
9583
9584 def PageDown(*args, **kwargs):
9585 """
9586 PageDown(self) -> bool
9587
9588 This is just a wrapper for ScrollPages(1).
9589 """
9590 return _core_.Window_PageDown(*args, **kwargs)
9591
9592 def SetHelpText(*args, **kwargs):
9593 """
9594 SetHelpText(self, String text)
9595
9596 Sets the help text to be used as context-sensitive help for this
9597 window. Note that the text is actually stored by the current
9598 `wx.HelpProvider` implementation, and not in the window object itself.
9599 """
9600 return _core_.Window_SetHelpText(*args, **kwargs)
9601
9602 def SetHelpTextForId(*args, **kwargs):
9603 """
9604 SetHelpTextForId(self, String text)
9605
9606 Associate this help text with all windows with the same id as this
9607 one.
9608 """
9609 return _core_.Window_SetHelpTextForId(*args, **kwargs)
9610
9611 def GetHelpTextAtPoint(*args, **kwargs):
9612 """
9613 GetHelpTextAtPoint(self, Point pt, wxHelpEvent::Origin origin) -> String
9614
9615 Get the help string associated with the given position in this window.
9616
9617 Notice that pt may be invalid if event origin is keyboard or unknown
9618 and this method should return the global window help text then
9619
9620 """
9621 return _core_.Window_GetHelpTextAtPoint(*args, **kwargs)
9622
9623 def GetHelpText(*args, **kwargs):
9624 """
9625 GetHelpText(self) -> String
9626
9627 Gets the help text to be used as context-sensitive help for this
9628 window. Note that the text is actually stored by the current
9629 `wx.HelpProvider` implementation, and not in the window object itself.
9630 """
9631 return _core_.Window_GetHelpText(*args, **kwargs)
9632
9633 def SetToolTipString(*args, **kwargs):
9634 """
9635 SetToolTipString(self, String tip)
9636
9637 Attach a tooltip to the window.
9638 """
9639 return _core_.Window_SetToolTipString(*args, **kwargs)
9640
9641 def SetToolTip(*args, **kwargs):
9642 """
9643 SetToolTip(self, ToolTip tip)
9644
9645 Attach a tooltip to the window.
9646 """
9647 return _core_.Window_SetToolTip(*args, **kwargs)
9648
9649 def GetToolTip(*args, **kwargs):
9650 """
9651 GetToolTip(self) -> ToolTip
9652
9653 get the associated tooltip or None if none
9654 """
9655 return _core_.Window_GetToolTip(*args, **kwargs)
9656
9657 def SetDropTarget(*args, **kwargs):
9658 """
9659 SetDropTarget(self, DropTarget dropTarget)
9660
9661 Associates a drop target with this window. If the window already has
9662 a drop target, it is deleted.
9663 """
9664 return _core_.Window_SetDropTarget(*args, **kwargs)
9665
9666 def GetDropTarget(*args, **kwargs):
9667 """
9668 GetDropTarget(self) -> DropTarget
9669
9670 Returns the associated drop target, which may be None.
9671 """
9672 return _core_.Window_GetDropTarget(*args, **kwargs)
9673
9674 def DragAcceptFiles(*args, **kwargs):
9675 """
9676 DragAcceptFiles(self, bool accept)
9677
9678 Enables or disables eligibility for drop file events, EVT_DROP_FILES.
9679 Only functional on Windows.
9680 """
9681 return _core_.Window_DragAcceptFiles(*args, **kwargs)
9682
9683 def SetConstraints(*args, **kwargs):
9684 """
9685 SetConstraints(self, LayoutConstraints constraints)
9686
9687 Sets the window to have the given layout constraints. If an existing
9688 layout constraints object is already owned by the window, it will be
9689 deleted. Pass None to disassociate and delete the window's current
9690 constraints.
9691
9692 You must call SetAutoLayout to tell a window to use the constraints
9693 automatically in its default EVT_SIZE handler; otherwise, you must
9694 handle EVT_SIZE yourself and call Layout() explicitly. When setting
9695 both a wx.LayoutConstraints and a wx.Sizer, only the sizer will have
9696 effect.
9697 """
9698 return _core_.Window_SetConstraints(*args, **kwargs)
9699
9700 def GetConstraints(*args, **kwargs):
9701 """
9702 GetConstraints(self) -> LayoutConstraints
9703
9704 Returns a pointer to the window's layout constraints, or None if there
9705 are none.
9706 """
9707 return _core_.Window_GetConstraints(*args, **kwargs)
9708
9709 def SetAutoLayout(*args, **kwargs):
9710 """
9711 SetAutoLayout(self, bool autoLayout)
9712
9713 Determines whether the Layout function will be called automatically
9714 when the window is resized. lease note that this only happens for the
9715 windows usually used to contain children, namely `wx.Panel` and
9716 `wx.TopLevelWindow` (and the classes deriving from them).
9717
9718 This method is called implicitly by `SetSizer` but if you use
9719 `SetConstraints` you should call it manually or otherwise the window
9720 layout won't be correctly updated when its size changes.
9721 """
9722 return _core_.Window_SetAutoLayout(*args, **kwargs)
9723
9724 def GetAutoLayout(*args, **kwargs):
9725 """
9726 GetAutoLayout(self) -> bool
9727
9728 Returns the current autoLayout setting
9729 """
9730 return _core_.Window_GetAutoLayout(*args, **kwargs)
9731
9732 def Layout(*args, **kwargs):
9733 """
9734 Layout(self) -> bool
9735
9736 Invokes the constraint-based layout algorithm or the sizer-based
9737 algorithm for this window. See SetAutoLayout: when auto layout is on,
9738 this function gets called automatically by the default EVT_SIZE
9739 handler when the window is resized.
9740 """
9741 return _core_.Window_Layout(*args, **kwargs)
9742
9743 def SetSizer(*args, **kwargs):
9744 """
9745 SetSizer(self, Sizer sizer, bool deleteOld=True)
9746
9747 Sets the window to have the given layout sizer. The window will then
9748 own the object, and will take care of its deletion. If an existing
9749 layout sizer object is already owned by the window, it will be deleted
9750 if the deleteOld parameter is true. Note that this function will also
9751 call SetAutoLayout implicitly with a True parameter if the sizer is
9752 non-None, and False otherwise.
9753 """
9754 return _core_.Window_SetSizer(*args, **kwargs)
9755
9756 def SetSizerAndFit(*args, **kwargs):
9757 """
9758 SetSizerAndFit(self, Sizer sizer, bool deleteOld=True)
9759
9760 The same as SetSizer, except it also sets the size hints for the
9761 window based on the sizer's minimum size.
9762 """
9763 return _core_.Window_SetSizerAndFit(*args, **kwargs)
9764
9765 def GetSizer(*args, **kwargs):
9766 """
9767 GetSizer(self) -> Sizer
9768
9769 Return the sizer associated with the window by a previous call to
9770 SetSizer or None if there isn't one.
9771 """
9772 return _core_.Window_GetSizer(*args, **kwargs)
9773
9774 def SetContainingSizer(*args, **kwargs):
9775 """
9776 SetContainingSizer(self, Sizer sizer)
9777
9778 This normally does not need to be called by application code. It is
9779 called internally when a window is added to a sizer, and is used so
9780 the window can remove itself from the sizer when it is destroyed.
9781 """
9782 return _core_.Window_SetContainingSizer(*args, **kwargs)
9783
9784 def GetContainingSizer(*args, **kwargs):
9785 """
9786 GetContainingSizer(self) -> Sizer
9787
9788 Return the sizer that this window is a member of, if any, otherwise None.
9789 """
9790 return _core_.Window_GetContainingSizer(*args, **kwargs)
9791
9792 def InheritAttributes(*args, **kwargs):
9793 """
9794 InheritAttributes(self)
9795
9796 This function is (or should be, in case of custom controls) called
9797 during window creation to intelligently set up the window visual
9798 attributes, that is the font and the foreground and background
9799 colours.
9800
9801 By 'intelligently' the following is meant: by default, all windows use
9802 their own default attributes. However if some of the parent's
9803 attributes are explicitly changed (that is, using SetFont and not
9804 SetOwnFont) and if the corresponding attribute hadn't been
9805 explicitly set for this window itself, then this window takes the same
9806 value as used by the parent. In addition, if the window overrides
9807 ShouldInheritColours to return false, the colours will not be changed
9808 no matter what and only the font might.
9809
9810 This rather complicated logic is necessary in order to accommodate the
9811 different usage scenarios. The most common one is when all default
9812 attributes are used and in this case, nothing should be inherited as
9813 in modern GUIs different controls use different fonts (and colours)
9814 than their siblings so they can't inherit the same value from the
9815 parent. However it was also deemed desirable to allow to simply change
9816 the attributes of all children at once by just changing the font or
9817 colour of their common parent, hence in this case we do inherit the
9818 parents attributes.
9819
9820 """
9821 return _core_.Window_InheritAttributes(*args, **kwargs)
9822
9823 def ShouldInheritColours(*args, **kwargs):
9824 """
9825 ShouldInheritColours(self) -> bool
9826
9827 Return true from here to allow the colours of this window to be
9828 changed by InheritAttributes, returning false forbids inheriting them
9829 from the parent window.
9830
9831 The base class version returns false, but this method is overridden in
9832 wxControl where it returns true.
9833 """
9834 return _core_.Window_ShouldInheritColours(*args, **kwargs)
9835
9836 def CanSetTransparent(*args, **kwargs):
9837 """
9838 CanSetTransparent(self) -> bool
9839
9840 Returns ``True`` if the platform supports setting the transparency for
9841 this window. Note that this method will err on the side of caution,
9842 so it is possible that this will return ``False`` when it is in fact
9843 possible to set the transparency.
9844
9845 NOTE: On X-windows systems the X server must have the composite
9846 extension loaded, and there must be a composite manager program (such
9847 as xcompmgr) running.
9848 """
9849 return _core_.Window_CanSetTransparent(*args, **kwargs)
9850
9851 def SetTransparent(*args, **kwargs):
9852 """
9853 SetTransparent(self, byte alpha) -> bool
9854
9855 Attempt to set the transparency of this window to the ``alpha`` value,
9856 returns True on success. The ``alpha`` value is an integer in the
9857 range of 0 to 255, where 0 is fully transparent and 255 is fully
9858 opaque.
9859 """
9860 return _core_.Window_SetTransparent(*args, **kwargs)
9861
9862 def PostCreate(self, pre):
9863 """
9864 Phase 3 of the 2-phase create <wink!>
9865 Call this method after precreating the window with the 2-phase create method.
9866 """
9867 self.this = pre.this
9868 self.thisown = pre.thisown
9869 pre.thisown = 0
9870 if hasattr(self, '_setOORInfo'):
9871 self._setOORInfo(self)
9872 if hasattr(self, '_setCallbackInfo'):
9873 self._setCallbackInfo(self, self.__class__)
9874
9875 def SendSizeEvent(self):
9876 self.GetEventHandler().ProcessEvent(wx.SizeEvent((-1,-1)))
9877
9878 AcceleratorTable = property(GetAcceleratorTable,SetAcceleratorTable,doc="See `GetAcceleratorTable` and `SetAcceleratorTable`")
9879 AdjustedBestSize = property(GetAdjustedBestSize,doc="See `GetAdjustedBestSize`")
9880 AutoLayout = property(GetAutoLayout,SetAutoLayout,doc="See `GetAutoLayout` and `SetAutoLayout`")
9881 BackgroundColour = property(GetBackgroundColour,SetBackgroundColour,doc="See `GetBackgroundColour` and `SetBackgroundColour`")
9882 BackgroundStyle = property(GetBackgroundStyle,SetBackgroundStyle,doc="See `GetBackgroundStyle` and `SetBackgroundStyle`")
9883 BestFittingSize = property(GetBestFittingSize,SetBestFittingSize,doc="See `GetBestFittingSize` and `SetBestFittingSize`")
9884 BestSize = property(GetBestSize,doc="See `GetBestSize`")
9885 BestVirtualSize = property(GetBestVirtualSize,doc="See `GetBestVirtualSize`")
9886 Border = property(GetBorder,doc="See `GetBorder`")
9887 Caret = property(GetCaret,SetCaret,doc="See `GetCaret` and `SetCaret`")
9888 CharHeight = property(GetCharHeight,doc="See `GetCharHeight`")
9889 CharWidth = property(GetCharWidth,doc="See `GetCharWidth`")
9890 Children = property(GetChildren,doc="See `GetChildren`")
9891 ClientAreaOrigin = property(GetClientAreaOrigin,doc="See `GetClientAreaOrigin`")
9892 ClientRect = property(GetClientRect,SetClientRect,doc="See `GetClientRect` and `SetClientRect`")
9893 ClientSize = property(GetClientSize,SetClientSize,doc="See `GetClientSize` and `SetClientSize`")
9894 Constraints = property(GetConstraints,SetConstraints,doc="See `GetConstraints` and `SetConstraints`")
9895 ContainingSizer = property(GetContainingSizer,SetContainingSizer,doc="See `GetContainingSizer` and `SetContainingSizer`")
9896 Cursor = property(GetCursor,SetCursor,doc="See `GetCursor` and `SetCursor`")
9897 DefaultAttributes = property(GetDefaultAttributes,doc="See `GetDefaultAttributes`")
9898 DropTarget = property(GetDropTarget,SetDropTarget,doc="See `GetDropTarget` and `SetDropTarget`")
9899 EventHandler = property(GetEventHandler,SetEventHandler,doc="See `GetEventHandler` and `SetEventHandler`")
9900 ExtraStyle = property(GetExtraStyle,SetExtraStyle,doc="See `GetExtraStyle` and `SetExtraStyle`")
9901 Font = property(GetFont,SetFont,doc="See `GetFont` and `SetFont`")
9902 ForegroundColour = property(GetForegroundColour,SetForegroundColour,doc="See `GetForegroundColour` and `SetForegroundColour`")
9903 GrandParent = property(GetGrandParent,doc="See `GetGrandParent`")
9904 Handle = property(GetHandle,doc="See `GetHandle`")
9905 HelpText = property(GetHelpText,SetHelpText,doc="See `GetHelpText` and `SetHelpText`")
9906 Id = property(GetId,SetId,doc="See `GetId` and `SetId`")
9907 Label = property(GetLabel,SetLabel,doc="See `GetLabel` and `SetLabel`")
9908 MaxHeight = property(GetMaxHeight,doc="See `GetMaxHeight`")
9909 MaxSize = property(GetMaxSize,SetMaxSize,doc="See `GetMaxSize` and `SetMaxSize`")
9910 MaxWidth = property(GetMaxWidth,doc="See `GetMaxWidth`")
9911 MinHeight = property(GetMinHeight,doc="See `GetMinHeight`")
9912 MinSize = property(GetMinSize,SetMinSize,doc="See `GetMinSize` and `SetMinSize`")
9913 MinWidth = property(GetMinWidth,doc="See `GetMinWidth`")
9914 Name = property(GetName,SetName,doc="See `GetName` and `SetName`")
9915 Parent = property(GetParent,doc="See `GetParent`")
9916 Position = property(GetPosition,SetPosition,doc="See `GetPosition` and `SetPosition`")
9917 Rect = property(GetRect,SetRect,doc="See `GetRect` and `SetRect`")
9918 ScreenPosition = property(GetScreenPosition,doc="See `GetScreenPosition`")
9919 ScreenRect = property(GetScreenRect,doc="See `GetScreenRect`")
9920 Size = property(GetSize,SetSize,doc="See `GetSize` and `SetSize`")
9921 Sizer = property(GetSizer,SetSizer,doc="See `GetSizer` and `SetSizer`")
9922 ThemeEnabled = property(GetThemeEnabled,SetThemeEnabled,doc="See `GetThemeEnabled` and `SetThemeEnabled`")
9923 ToolTip = property(GetToolTip,SetToolTip,doc="See `GetToolTip` and `SetToolTip`")
9924 UpdateClientRect = property(GetUpdateClientRect,doc="See `GetUpdateClientRect`")
9925 UpdateRegion = property(GetUpdateRegion,doc="See `GetUpdateRegion`")
9926 Validator = property(GetValidator,SetValidator,doc="See `GetValidator` and `SetValidator`")
9927 VirtualSize = property(GetVirtualSize,SetVirtualSize,doc="See `GetVirtualSize` and `SetVirtualSize`")
9928 WindowStyle = property(GetWindowStyle,SetWindowStyle,doc="See `GetWindowStyle` and `SetWindowStyle`")
9929 WindowStyleFlag = property(GetWindowStyleFlag,SetWindowStyleFlag,doc="See `GetWindowStyleFlag` and `SetWindowStyleFlag`")
9930 WindowVariant = property(GetWindowVariant,SetWindowVariant,doc="See `GetWindowVariant` and `SetWindowVariant`")
9931 Shown = property(IsShown,Show,doc="See `IsShown` and `Show`")
9932 Enabled = property(IsEnabled,Enable,doc="See `IsEnabled` and `Enable`")
9933 TopLevel = property(IsTopLevel,doc="See `IsTopLevel`")
9934 _core_.Window_swigregister(Window)
9935
9936 def PreWindow(*args, **kwargs):
9937 """
9938 PreWindow() -> Window
9939
9940 Precreate a Window for 2-phase creation.
9941 """
9942 val = _core_.new_PreWindow(*args, **kwargs)
9943 return val
9944
9945 def Window_NewControlId(*args):
9946 """
9947 Window_NewControlId() -> int
9948
9949 Generate a control id for the controls which were not given one.
9950 """
9951 return _core_.Window_NewControlId(*args)
9952
9953 def Window_NextControlId(*args, **kwargs):
9954 """
9955 Window_NextControlId(int winid) -> int
9956
9957 Get the id of the control following the one with the given
9958 autogenerated) id
9959 """
9960 return _core_.Window_NextControlId(*args, **kwargs)
9961
9962 def Window_PrevControlId(*args, **kwargs):
9963 """
9964 Window_PrevControlId(int winid) -> int
9965
9966 Get the id of the control preceding the one with the given
9967 autogenerated) id
9968 """
9969 return _core_.Window_PrevControlId(*args, **kwargs)
9970
9971 def Window_FindFocus(*args):
9972 """
9973 Window_FindFocus() -> Window
9974
9975 Returns the window or control that currently has the keyboard focus,
9976 or None.
9977 """
9978 return _core_.Window_FindFocus(*args)
9979
9980 def Window_GetCapture(*args):
9981 """
9982 Window_GetCapture() -> Window
9983
9984 Returns the window which currently captures the mouse or None
9985 """
9986 return _core_.Window_GetCapture(*args)
9987
9988 def Window_GetClassDefaultAttributes(*args, **kwargs):
9989 """
9990 Window_GetClassDefaultAttributes(int variant=WINDOW_VARIANT_NORMAL) -> VisualAttributes
9991
9992 Get the default attributes for this class. This is useful if you want
9993 to use the same font or colour in your own control as in a standard
9994 control -- which is a much better idea than hard coding specific
9995 colours or fonts which might look completely out of place on the
9996 user's system, especially if it uses themes.
9997
9998 The variant parameter is only relevant under Mac currently and is
9999 ignore under other platforms. Under Mac, it will change the size of
10000 the returned font. See `wx.Window.SetWindowVariant` for more about
10001 this.
10002 """
10003 return _core_.Window_GetClassDefaultAttributes(*args, **kwargs)
10004
10005 def DLG_PNT(win, point_or_x, y=None):
10006 """
10007 Convenience function for converting a Point or (x,y) in
10008 dialog units to pixel units.
10009 """
10010 if y is None:
10011 return win.ConvertDialogPointToPixels(point_or_x)
10012 else:
10013 return win.ConvertDialogPointToPixels(wx.Point(point_or_x, y))
10014
10015 def DLG_SZE(win, size_width, height=None):
10016 """
10017 Convenience function for converting a Size or (w,h) in
10018 dialog units to pixel units.
10019 """
10020 if height is None:
10021 return win.ConvertDialogSizeToPixels(size_width)
10022 else:
10023 return win.ConvertDialogSizeToPixels(wx.Size(size_width, height))
10024
10025
10026 def FindWindowById(*args, **kwargs):
10027 """
10028 FindWindowById(long id, Window parent=None) -> Window
10029
10030 Find the first window in the application with the given id. If parent
10031 is None, the search will start from all top-level frames and dialog
10032 boxes; if non-None, the search will be limited to the given window
10033 hierarchy. The search is recursive in both cases.
10034 """
10035 return _core_.FindWindowById(*args, **kwargs)
10036
10037 def FindWindowByName(*args, **kwargs):
10038 """
10039 FindWindowByName(String name, Window parent=None) -> Window
10040
10041 Find a window by its name (as given in a window constructor or Create
10042 function call). If parent is None, the search will start from all
10043 top-level frames and dialog boxes; if non-None, the search will be
10044 limited to the given window hierarchy. The search is recursive in both
10045 cases.
10046
10047 If no window with such name is found, wx.FindWindowByLabel is called.
10048 """
10049 return _core_.FindWindowByName(*args, **kwargs)
10050
10051 def FindWindowByLabel(*args, **kwargs):
10052 """
10053 FindWindowByLabel(String label, Window parent=None) -> Window
10054
10055 Find a window by its label. Depending on the type of window, the label
10056 may be a window title or panel item label. If parent is None, the
10057 search will start from all top-level frames and dialog boxes; if
10058 non-None, the search will be limited to the given window
10059 hierarchy. The search is recursive in both cases.
10060 """
10061 return _core_.FindWindowByLabel(*args, **kwargs)
10062
10063 def Window_FromHWND(*args, **kwargs):
10064 """Window_FromHWND(Window parent, unsigned long _hWnd) -> Window"""
10065 return _core_.Window_FromHWND(*args, **kwargs)
10066
10067 def GetTopLevelWindows(*args):
10068 """
10069 GetTopLevelWindows() -> PyObject
10070
10071 Returns a list of the the application's top-level windows, (frames,
10072 dialogs, etc.) NOTE: Currently this is a copy of the list maintained
10073 by wxWidgets, and so it is only valid as long as no top-level windows
10074 are closed or new top-level windows are created.
10075
10076 """
10077 return _core_.GetTopLevelWindows(*args)
10078 #---------------------------------------------------------------------------
10079
10080 class Validator(EvtHandler):
10081 """Proxy of C++ Validator class"""
10082 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
10083 __repr__ = _swig_repr
10084 def __init__(self, *args, **kwargs):
10085 """__init__(self) -> Validator"""
10086 _core_.Validator_swiginit(self,_core_.new_Validator(*args, **kwargs))
10087 self._setOORInfo(self)
10088
10089 def Clone(*args, **kwargs):
10090 """Clone(self) -> Validator"""
10091 return _core_.Validator_Clone(*args, **kwargs)
10092
10093 def Validate(*args, **kwargs):
10094 """Validate(self, Window parent) -> bool"""
10095 return _core_.Validator_Validate(*args, **kwargs)
10096
10097 def TransferToWindow(*args, **kwargs):
10098 """TransferToWindow(self) -> bool"""
10099 return _core_.Validator_TransferToWindow(*args, **kwargs)
10100
10101 def TransferFromWindow(*args, **kwargs):
10102 """TransferFromWindow(self) -> bool"""
10103 return _core_.Validator_TransferFromWindow(*args, **kwargs)
10104
10105 def GetWindow(*args, **kwargs):
10106 """GetWindow(self) -> Window"""
10107 return _core_.Validator_GetWindow(*args, **kwargs)
10108
10109 def SetWindow(*args, **kwargs):
10110 """SetWindow(self, Window window)"""
10111 return _core_.Validator_SetWindow(*args, **kwargs)
10112
10113 def IsSilent(*args, **kwargs):
10114 """IsSilent() -> bool"""
10115 return _core_.Validator_IsSilent(*args, **kwargs)
10116
10117 IsSilent = staticmethod(IsSilent)
10118 def SetBellOnError(*args, **kwargs):
10119 """SetBellOnError(int doIt=True)"""
10120 return _core_.Validator_SetBellOnError(*args, **kwargs)
10121
10122 SetBellOnError = staticmethod(SetBellOnError)
10123 _core_.Validator_swigregister(Validator)
10124
10125 def Validator_IsSilent(*args):
10126 """Validator_IsSilent() -> bool"""
10127 return _core_.Validator_IsSilent(*args)
10128
10129 def Validator_SetBellOnError(*args, **kwargs):
10130 """Validator_SetBellOnError(int doIt=True)"""
10131 return _core_.Validator_SetBellOnError(*args, **kwargs)
10132
10133 class PyValidator(Validator):
10134 """Proxy of C++ PyValidator class"""
10135 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
10136 __repr__ = _swig_repr
10137 def __init__(self, *args, **kwargs):
10138 """__init__(self) -> PyValidator"""
10139 _core_.PyValidator_swiginit(self,_core_.new_PyValidator(*args, **kwargs))
10140
10141 self._setCallbackInfo(self, PyValidator, 1)
10142 self._setOORInfo(self)
10143
10144 def _setCallbackInfo(*args, **kwargs):
10145 """_setCallbackInfo(self, PyObject self, PyObject _class, int incref=True)"""
10146 return _core_.PyValidator__setCallbackInfo(*args, **kwargs)
10147
10148 _core_.PyValidator_swigregister(PyValidator)
10149
10150 #---------------------------------------------------------------------------
10151
10152 class Menu(EvtHandler):
10153 """Proxy of C++ Menu class"""
10154 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
10155 __repr__ = _swig_repr
10156 def __init__(self, *args, **kwargs):
10157 """__init__(self, String title=EmptyString, long style=0) -> Menu"""
10158 _core_.Menu_swiginit(self,_core_.new_Menu(*args, **kwargs))
10159 self._setOORInfo(self)
10160
10161 def Append(*args, **kwargs):
10162 """
10163 Append(self, int id, String text=EmptyString, String help=EmptyString,
10164 int kind=ITEM_NORMAL) -> MenuItem
10165 """
10166 return _core_.Menu_Append(*args, **kwargs)
10167
10168 def AppendSeparator(*args, **kwargs):
10169 """AppendSeparator(self) -> MenuItem"""
10170 return _core_.Menu_AppendSeparator(*args, **kwargs)
10171
10172 def AppendCheckItem(*args, **kwargs):
10173 """AppendCheckItem(self, int id, String text, String help=EmptyString) -> MenuItem"""
10174 return _core_.Menu_AppendCheckItem(*args, **kwargs)
10175
10176 def AppendRadioItem(*args, **kwargs):
10177 """AppendRadioItem(self, int id, String text, String help=EmptyString) -> MenuItem"""
10178 return _core_.Menu_AppendRadioItem(*args, **kwargs)
10179
10180 def AppendMenu(*args, **kwargs):
10181 """AppendMenu(self, int id, String text, Menu submenu, String help=EmptyString) -> MenuItem"""
10182 return _core_.Menu_AppendMenu(*args, **kwargs)
10183
10184 def AppendSubMenu(*args, **kwargs):
10185 """AppendSubMenu(self, Menu submenu, String text, String help=EmptyString) -> MenuItem"""
10186 return _core_.Menu_AppendSubMenu(*args, **kwargs)
10187
10188 def AppendItem(*args, **kwargs):
10189 """AppendItem(self, MenuItem item) -> MenuItem"""
10190 return _core_.Menu_AppendItem(*args, **kwargs)
10191
10192 def InsertItem(*args, **kwargs):
10193 """InsertItem(self, size_t pos, MenuItem item) -> MenuItem"""
10194 return _core_.Menu_InsertItem(*args, **kwargs)
10195
10196 def PrependItem(*args, **kwargs):
10197 """PrependItem(self, MenuItem item) -> MenuItem"""
10198 return _core_.Menu_PrependItem(*args, **kwargs)
10199
10200 def Break(*args, **kwargs):
10201 """Break(self)"""
10202 return _core_.Menu_Break(*args, **kwargs)
10203
10204 def Insert(*args, **kwargs):
10205 """
10206 Insert(self, size_t pos, int id, String text=EmptyString, String help=EmptyString,
10207 int kind=ITEM_NORMAL) -> MenuItem
10208 """
10209 return _core_.Menu_Insert(*args, **kwargs)
10210
10211 def InsertSeparator(*args, **kwargs):
10212 """InsertSeparator(self, size_t pos) -> MenuItem"""
10213 return _core_.Menu_InsertSeparator(*args, **kwargs)
10214
10215 def InsertCheckItem(*args, **kwargs):
10216 """InsertCheckItem(self, size_t pos, int id, String text, String help=EmptyString) -> MenuItem"""
10217 return _core_.Menu_InsertCheckItem(*args, **kwargs)
10218
10219 def InsertRadioItem(*args, **kwargs):
10220 """InsertRadioItem(self, size_t pos, int id, String text, String help=EmptyString) -> MenuItem"""
10221 return _core_.Menu_InsertRadioItem(*args, **kwargs)
10222
10223 def InsertMenu(*args, **kwargs):
10224 """InsertMenu(self, size_t pos, int id, String text, Menu submenu, String help=EmptyString) -> MenuItem"""
10225 return _core_.Menu_InsertMenu(*args, **kwargs)
10226
10227 def Prepend(*args, **kwargs):
10228 """
10229 Prepend(self, int id, String text=EmptyString, String help=EmptyString,
10230 int kind=ITEM_NORMAL) -> MenuItem
10231 """
10232 return _core_.Menu_Prepend(*args, **kwargs)
10233
10234 def PrependSeparator(*args, **kwargs):
10235 """PrependSeparator(self) -> MenuItem"""
10236 return _core_.Menu_PrependSeparator(*args, **kwargs)
10237
10238 def PrependCheckItem(*args, **kwargs):
10239 """PrependCheckItem(self, int id, String text, String help=EmptyString) -> MenuItem"""
10240 return _core_.Menu_PrependCheckItem(*args, **kwargs)
10241
10242 def PrependRadioItem(*args, **kwargs):
10243 """PrependRadioItem(self, int id, String text, String help=EmptyString) -> MenuItem"""
10244 return _core_.Menu_PrependRadioItem(*args, **kwargs)
10245
10246 def PrependMenu(*args, **kwargs):
10247 """PrependMenu(self, int id, String text, Menu submenu, String help=EmptyString) -> MenuItem"""
10248 return _core_.Menu_PrependMenu(*args, **kwargs)
10249
10250 def Remove(*args, **kwargs):
10251 """Remove(self, int id) -> MenuItem"""
10252 return _core_.Menu_Remove(*args, **kwargs)
10253
10254 def RemoveItem(*args, **kwargs):
10255 """RemoveItem(self, MenuItem item) -> MenuItem"""
10256 return _core_.Menu_RemoveItem(*args, **kwargs)
10257
10258 def Delete(*args, **kwargs):
10259 """Delete(self, int id) -> bool"""
10260 return _core_.Menu_Delete(*args, **kwargs)
10261
10262 def DeleteItem(*args, **kwargs):
10263 """DeleteItem(self, MenuItem item) -> bool"""
10264 return _core_.Menu_DeleteItem(*args, **kwargs)
10265
10266 def Destroy(*args, **kwargs):
10267 """
10268 Destroy(self)
10269
10270 Deletes the C++ object this Python object is a proxy for.
10271 """
10272 val = _core_.Menu_Destroy(*args, **kwargs)
10273 args[0].thisown = 0
10274 return val
10275
10276 def DestroyId(*args, **kwargs):
10277 """
10278 DestroyId(self, int id) -> bool
10279
10280 Deletes the C++ object this Python object is a proxy for.
10281 """
10282 val = _core_.Menu_DestroyId(*args, **kwargs)
10283 args[0].thisown = 0
10284 return val
10285
10286 def DestroyItem(*args, **kwargs):
10287 """
10288 DestroyItem(self, MenuItem item) -> bool
10289
10290 Deletes the C++ object this Python object is a proxy for.
10291 """
10292 val = _core_.Menu_DestroyItem(*args, **kwargs)
10293 args[0].thisown = 0
10294 return val
10295
10296 def GetMenuItemCount(*args, **kwargs):
10297 """GetMenuItemCount(self) -> size_t"""
10298 return _core_.Menu_GetMenuItemCount(*args, **kwargs)
10299
10300 def GetMenuItems(*args, **kwargs):
10301 """GetMenuItems(self) -> PyObject"""
10302 return _core_.Menu_GetMenuItems(*args, **kwargs)
10303
10304 def FindItem(*args, **kwargs):
10305 """FindItem(self, String item) -> int"""
10306 return _core_.Menu_FindItem(*args, **kwargs)
10307
10308 def FindItemById(*args, **kwargs):
10309 """FindItemById(self, int id) -> MenuItem"""
10310 return _core_.Menu_FindItemById(*args, **kwargs)
10311
10312 def FindItemByPosition(*args, **kwargs):
10313 """FindItemByPosition(self, size_t position) -> MenuItem"""
10314 return _core_.Menu_FindItemByPosition(*args, **kwargs)
10315
10316 def Enable(*args, **kwargs):
10317 """Enable(self, int id, bool enable)"""
10318 return _core_.Menu_Enable(*args, **kwargs)
10319
10320 def IsEnabled(*args, **kwargs):
10321 """IsEnabled(self, int id) -> bool"""
10322 return _core_.Menu_IsEnabled(*args, **kwargs)
10323
10324 def Check(*args, **kwargs):
10325 """Check(self, int id, bool check)"""
10326 return _core_.Menu_Check(*args, **kwargs)
10327
10328 def IsChecked(*args, **kwargs):
10329 """IsChecked(self, int id) -> bool"""
10330 return _core_.Menu_IsChecked(*args, **kwargs)
10331
10332 def SetLabel(*args, **kwargs):
10333 """SetLabel(self, int id, String label)"""
10334 return _core_.Menu_SetLabel(*args, **kwargs)
10335
10336 def GetLabel(*args, **kwargs):
10337 """GetLabel(self, int id) -> String"""
10338 return _core_.Menu_GetLabel(*args, **kwargs)
10339
10340 def SetHelpString(*args, **kwargs):
10341 """SetHelpString(self, int id, String helpString)"""
10342 return _core_.Menu_SetHelpString(*args, **kwargs)
10343
10344 def GetHelpString(*args, **kwargs):
10345 """GetHelpString(self, int id) -> String"""
10346 return _core_.Menu_GetHelpString(*args, **kwargs)
10347
10348 def SetTitle(*args, **kwargs):
10349 """SetTitle(self, String title)"""
10350 return _core_.Menu_SetTitle(*args, **kwargs)
10351
10352 def GetTitle(*args, **kwargs):
10353 """GetTitle(self) -> String"""
10354 return _core_.Menu_GetTitle(*args, **kwargs)
10355
10356 def SetEventHandler(*args, **kwargs):
10357 """SetEventHandler(self, EvtHandler handler)"""
10358 return _core_.Menu_SetEventHandler(*args, **kwargs)
10359
10360 def GetEventHandler(*args, **kwargs):
10361 """GetEventHandler(self) -> EvtHandler"""
10362 return _core_.Menu_GetEventHandler(*args, **kwargs)
10363
10364 def SetInvokingWindow(*args, **kwargs):
10365 """SetInvokingWindow(self, Window win)"""
10366 return _core_.Menu_SetInvokingWindow(*args, **kwargs)
10367
10368 def GetInvokingWindow(*args, **kwargs):
10369 """GetInvokingWindow(self) -> Window"""
10370 return _core_.Menu_GetInvokingWindow(*args, **kwargs)
10371
10372 def GetStyle(*args, **kwargs):
10373 """GetStyle(self) -> long"""
10374 return _core_.Menu_GetStyle(*args, **kwargs)
10375
10376 def UpdateUI(*args, **kwargs):
10377 """UpdateUI(self, EvtHandler source=None)"""
10378 return _core_.Menu_UpdateUI(*args, **kwargs)
10379
10380 def GetMenuBar(*args, **kwargs):
10381 """GetMenuBar(self) -> MenuBar"""
10382 return _core_.Menu_GetMenuBar(*args, **kwargs)
10383
10384 def Attach(*args, **kwargs):
10385 """Attach(self, wxMenuBarBase menubar)"""
10386 return _core_.Menu_Attach(*args, **kwargs)
10387
10388 def Detach(*args, **kwargs):
10389 """Detach(self)"""
10390 return _core_.Menu_Detach(*args, **kwargs)
10391
10392 def IsAttached(*args, **kwargs):
10393 """IsAttached(self) -> bool"""
10394 return _core_.Menu_IsAttached(*args, **kwargs)
10395
10396 def SetParent(*args, **kwargs):
10397 """SetParent(self, Menu parent)"""
10398 return _core_.Menu_SetParent(*args, **kwargs)
10399
10400 def GetParent(*args, **kwargs):
10401 """GetParent(self) -> Menu"""
10402 return _core_.Menu_GetParent(*args, **kwargs)
10403
10404 _core_.Menu_swigregister(Menu)
10405 DefaultValidator = cvar.DefaultValidator
10406
10407 #---------------------------------------------------------------------------
10408
10409 class MenuBar(Window):
10410 """Proxy of C++ MenuBar class"""
10411 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
10412 __repr__ = _swig_repr
10413 def __init__(self, *args, **kwargs):
10414 """__init__(self, long style=0) -> MenuBar"""
10415 _core_.MenuBar_swiginit(self,_core_.new_MenuBar(*args, **kwargs))
10416 self._setOORInfo(self)
10417
10418 def Append(*args, **kwargs):
10419 """Append(self, Menu menu, String title) -> bool"""
10420 return _core_.MenuBar_Append(*args, **kwargs)
10421
10422 def Insert(*args, **kwargs):
10423 """Insert(self, size_t pos, Menu menu, String title) -> bool"""
10424 return _core_.MenuBar_Insert(*args, **kwargs)
10425
10426 def GetMenuCount(*args, **kwargs):
10427 """GetMenuCount(self) -> size_t"""
10428 return _core_.MenuBar_GetMenuCount(*args, **kwargs)
10429
10430 def GetMenu(*args, **kwargs):
10431 """GetMenu(self, size_t pos) -> Menu"""
10432 return _core_.MenuBar_GetMenu(*args, **kwargs)
10433
10434 def Replace(*args, **kwargs):
10435 """Replace(self, size_t pos, Menu menu, String title) -> Menu"""
10436 return _core_.MenuBar_Replace(*args, **kwargs)
10437
10438 def Remove(*args, **kwargs):
10439 """Remove(self, size_t pos) -> Menu"""
10440 return _core_.MenuBar_Remove(*args, **kwargs)
10441
10442 def EnableTop(*args, **kwargs):
10443 """EnableTop(self, size_t pos, bool enable)"""
10444 return _core_.MenuBar_EnableTop(*args, **kwargs)
10445
10446 def IsEnabledTop(*args, **kwargs):
10447 """IsEnabledTop(self, size_t pos) -> bool"""
10448 return _core_.MenuBar_IsEnabledTop(*args, **kwargs)
10449
10450 def SetLabelTop(*args, **kwargs):
10451 """SetLabelTop(self, size_t pos, String label)"""
10452 return _core_.MenuBar_SetLabelTop(*args, **kwargs)
10453
10454 def GetLabelTop(*args, **kwargs):
10455 """GetLabelTop(self, size_t pos) -> String"""
10456 return _core_.MenuBar_GetLabelTop(*args, **kwargs)
10457
10458 def FindMenuItem(*args, **kwargs):
10459 """FindMenuItem(self, String menu, String item) -> int"""
10460 return _core_.MenuBar_FindMenuItem(*args, **kwargs)
10461
10462 def FindItemById(*args, **kwargs):
10463 """FindItemById(self, int id) -> MenuItem"""
10464 return _core_.MenuBar_FindItemById(*args, **kwargs)
10465
10466 def FindMenu(*args, **kwargs):
10467 """FindMenu(self, String title) -> int"""
10468 return _core_.MenuBar_FindMenu(*args, **kwargs)
10469
10470 def Enable(*args, **kwargs):
10471 """Enable(self, int id, bool enable)"""
10472 return _core_.MenuBar_Enable(*args, **kwargs)
10473
10474 def Check(*args, **kwargs):
10475 """Check(self, int id, bool check)"""
10476 return _core_.MenuBar_Check(*args, **kwargs)
10477
10478 def IsChecked(*args, **kwargs):
10479 """IsChecked(self, int id) -> bool"""
10480 return _core_.MenuBar_IsChecked(*args, **kwargs)
10481
10482 def IsEnabled(*args, **kwargs):
10483 """IsEnabled(self, int id) -> bool"""
10484 return _core_.MenuBar_IsEnabled(*args, **kwargs)
10485
10486 def SetLabel(*args, **kwargs):
10487 """SetLabel(self, int id, String label)"""
10488 return _core_.MenuBar_SetLabel(*args, **kwargs)
10489
10490 def GetLabel(*args, **kwargs):
10491 """GetLabel(self, int id) -> String"""
10492 return _core_.MenuBar_GetLabel(*args, **kwargs)
10493
10494 def SetHelpString(*args, **kwargs):
10495 """SetHelpString(self, int id, String helpString)"""
10496 return _core_.MenuBar_SetHelpString(*args, **kwargs)
10497
10498 def GetHelpString(*args, **kwargs):
10499 """GetHelpString(self, int id) -> String"""
10500 return _core_.MenuBar_GetHelpString(*args, **kwargs)
10501
10502 def GetFrame(*args, **kwargs):
10503 """GetFrame(self) -> wxFrame"""
10504 return _core_.MenuBar_GetFrame(*args, **kwargs)
10505
10506 def IsAttached(*args, **kwargs):
10507 """IsAttached(self) -> bool"""
10508 return _core_.MenuBar_IsAttached(*args, **kwargs)
10509
10510 def Attach(*args, **kwargs):
10511 """Attach(self, wxFrame frame)"""
10512 return _core_.MenuBar_Attach(*args, **kwargs)
10513
10514 def Detach(*args, **kwargs):
10515 """Detach(self)"""
10516 return _core_.MenuBar_Detach(*args, **kwargs)
10517
10518 def UpdateMenus(*args, **kwargs):
10519 """UpdateMenus(self)"""
10520 return _core_.MenuBar_UpdateMenus(*args, **kwargs)
10521
10522 def SetAutoWindowMenu(*args, **kwargs):
10523 """SetAutoWindowMenu(bool enable)"""
10524 return _core_.MenuBar_SetAutoWindowMenu(*args, **kwargs)
10525
10526 SetAutoWindowMenu = staticmethod(SetAutoWindowMenu)
10527 def GetAutoWindowMenu(*args, **kwargs):
10528 """GetAutoWindowMenu() -> bool"""
10529 return _core_.MenuBar_GetAutoWindowMenu(*args, **kwargs)
10530
10531 GetAutoWindowMenu = staticmethod(GetAutoWindowMenu)
10532 def GetMenus(self):
10533 """Return a list of (menu, label) items for the menus in the MenuBar. """
10534 return [(self.GetMenu(i), self.GetLabelTop(i))
10535 for i in range(self.GetMenuCount())]
10536
10537 def SetMenus(self, items):
10538 """Clear and add new menus to the MenuBar from a list of (menu, label) items. """
10539 for i in range(self.GetMenuCount()-1, -1, -1):
10540 self.Remove(i)
10541 for m, l in items:
10542 self.Append(m, l)
10543
10544 Menus = property(GetMenus,SetMenus)
10545 _core_.MenuBar_swigregister(MenuBar)
10546
10547 def MenuBar_SetAutoWindowMenu(*args, **kwargs):
10548 """MenuBar_SetAutoWindowMenu(bool enable)"""
10549 return _core_.MenuBar_SetAutoWindowMenu(*args, **kwargs)
10550
10551 def MenuBar_GetAutoWindowMenu(*args):
10552 """MenuBar_GetAutoWindowMenu() -> bool"""
10553 return _core_.MenuBar_GetAutoWindowMenu(*args)
10554
10555 #---------------------------------------------------------------------------
10556
10557 class MenuItem(Object):
10558 """Proxy of C++ MenuItem class"""
10559 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
10560 __repr__ = _swig_repr
10561 def __init__(self, *args, **kwargs):
10562 """
10563 __init__(self, Menu parentMenu=None, int id=ID_ANY, String text=EmptyString,
10564 String help=EmptyString, int kind=ITEM_NORMAL,
10565 Menu subMenu=None) -> MenuItem
10566 """
10567 _core_.MenuItem_swiginit(self,_core_.new_MenuItem(*args, **kwargs))
10568 __swig_destroy__ = _core_.delete_MenuItem
10569 __del__ = lambda self : None;
10570 def GetMenu(*args, **kwargs):
10571 """GetMenu(self) -> Menu"""
10572 return _core_.MenuItem_GetMenu(*args, **kwargs)
10573
10574 def SetMenu(*args, **kwargs):
10575 """SetMenu(self, Menu menu)"""
10576 return _core_.MenuItem_SetMenu(*args, **kwargs)
10577
10578 def SetId(*args, **kwargs):
10579 """SetId(self, int id)"""
10580 return _core_.MenuItem_SetId(*args, **kwargs)
10581
10582 def GetId(*args, **kwargs):
10583 """GetId(self) -> int"""
10584 return _core_.MenuItem_GetId(*args, **kwargs)
10585
10586 def IsSeparator(*args, **kwargs):
10587 """IsSeparator(self) -> bool"""
10588 return _core_.MenuItem_IsSeparator(*args, **kwargs)
10589
10590 def SetText(*args, **kwargs):
10591 """SetText(self, String str)"""
10592 return _core_.MenuItem_SetText(*args, **kwargs)
10593
10594 def GetLabel(*args, **kwargs):
10595 """GetLabel(self) -> String"""
10596 return _core_.MenuItem_GetLabel(*args, **kwargs)
10597
10598 def GetText(*args, **kwargs):
10599 """GetText(self) -> String"""
10600 return _core_.MenuItem_GetText(*args, **kwargs)
10601
10602 def GetLabelFromText(*args, **kwargs):
10603 """GetLabelFromText(String text) -> String"""
10604 return _core_.MenuItem_GetLabelFromText(*args, **kwargs)
10605
10606 GetLabelFromText = staticmethod(GetLabelFromText)
10607 def GetKind(*args, **kwargs):
10608 """GetKind(self) -> int"""
10609 return _core_.MenuItem_GetKind(*args, **kwargs)
10610
10611 def SetKind(*args, **kwargs):
10612 """SetKind(self, int kind)"""
10613 return _core_.MenuItem_SetKind(*args, **kwargs)
10614
10615 def SetCheckable(*args, **kwargs):
10616 """SetCheckable(self, bool checkable)"""
10617 return _core_.MenuItem_SetCheckable(*args, **kwargs)
10618
10619 def IsCheckable(*args, **kwargs):
10620 """IsCheckable(self) -> bool"""
10621 return _core_.MenuItem_IsCheckable(*args, **kwargs)
10622
10623 def IsSubMenu(*args, **kwargs):
10624 """IsSubMenu(self) -> bool"""
10625 return _core_.MenuItem_IsSubMenu(*args, **kwargs)
10626
10627 def SetSubMenu(*args, **kwargs):
10628 """SetSubMenu(self, Menu menu)"""
10629 return _core_.MenuItem_SetSubMenu(*args, **kwargs)
10630
10631 def GetSubMenu(*args, **kwargs):
10632 """GetSubMenu(self) -> Menu"""
10633 return _core_.MenuItem_GetSubMenu(*args, **kwargs)
10634
10635 def Enable(*args, **kwargs):
10636 """Enable(self, bool enable=True)"""
10637 return _core_.MenuItem_Enable(*args, **kwargs)
10638
10639 def IsEnabled(*args, **kwargs):
10640 """IsEnabled(self) -> bool"""
10641 return _core_.MenuItem_IsEnabled(*args, **kwargs)
10642
10643 def Check(*args, **kwargs):
10644 """Check(self, bool check=True)"""
10645 return _core_.MenuItem_Check(*args, **kwargs)
10646
10647 def IsChecked(*args, **kwargs):
10648 """IsChecked(self) -> bool"""
10649 return _core_.MenuItem_IsChecked(*args, **kwargs)
10650
10651 def Toggle(*args, **kwargs):
10652 """Toggle(self)"""
10653 return _core_.MenuItem_Toggle(*args, **kwargs)
10654
10655 def SetHelp(*args, **kwargs):
10656 """SetHelp(self, String str)"""
10657 return _core_.MenuItem_SetHelp(*args, **kwargs)
10658
10659 def GetHelp(*args, **kwargs):
10660 """GetHelp(self) -> String"""
10661 return _core_.MenuItem_GetHelp(*args, **kwargs)
10662
10663 def GetAccel(*args, **kwargs):
10664 """GetAccel(self) -> AcceleratorEntry"""
10665 return _core_.MenuItem_GetAccel(*args, **kwargs)
10666
10667 def SetAccel(*args, **kwargs):
10668 """SetAccel(self, AcceleratorEntry accel)"""
10669 return _core_.MenuItem_SetAccel(*args, **kwargs)
10670
10671 def SetBitmap(*args, **kwargs):
10672 """SetBitmap(self, Bitmap bitmap)"""
10673 return _core_.MenuItem_SetBitmap(*args, **kwargs)
10674
10675 def GetBitmap(*args, **kwargs):
10676 """GetBitmap(self) -> Bitmap"""
10677 return _core_.MenuItem_GetBitmap(*args, **kwargs)
10678
10679 def SetFont(*args, **kwargs):
10680 """SetFont(self, Font font)"""
10681 return _core_.MenuItem_SetFont(*args, **kwargs)
10682
10683 def GetFont(*args, **kwargs):
10684 """GetFont(self) -> Font"""
10685 return _core_.MenuItem_GetFont(*args, **kwargs)
10686
10687 def SetTextColour(*args, **kwargs):
10688 """SetTextColour(self, Colour colText)"""
10689 return _core_.MenuItem_SetTextColour(*args, **kwargs)
10690
10691 def GetTextColour(*args, **kwargs):
10692 """GetTextColour(self) -> Colour"""
10693 return _core_.MenuItem_GetTextColour(*args, **kwargs)
10694
10695 def SetBackgroundColour(*args, **kwargs):
10696 """SetBackgroundColour(self, Colour colBack)"""
10697 return _core_.MenuItem_SetBackgroundColour(*args, **kwargs)
10698
10699 def GetBackgroundColour(*args, **kwargs):
10700 """GetBackgroundColour(self) -> Colour"""
10701 return _core_.MenuItem_GetBackgroundColour(*args, **kwargs)
10702
10703 def SetBitmaps(*args, **kwargs):
10704 """SetBitmaps(self, Bitmap bmpChecked, Bitmap bmpUnchecked=wxNullBitmap)"""
10705 return _core_.MenuItem_SetBitmaps(*args, **kwargs)
10706
10707 def SetDisabledBitmap(*args, **kwargs):
10708 """SetDisabledBitmap(self, Bitmap bmpDisabled)"""
10709 return _core_.MenuItem_SetDisabledBitmap(*args, **kwargs)
10710
10711 def GetDisabledBitmap(*args, **kwargs):
10712 """GetDisabledBitmap(self) -> Bitmap"""
10713 return _core_.MenuItem_GetDisabledBitmap(*args, **kwargs)
10714
10715 def SetMarginWidth(*args, **kwargs):
10716 """SetMarginWidth(self, int nWidth)"""
10717 return _core_.MenuItem_SetMarginWidth(*args, **kwargs)
10718
10719 def GetMarginWidth(*args, **kwargs):
10720 """GetMarginWidth(self) -> int"""
10721 return _core_.MenuItem_GetMarginWidth(*args, **kwargs)
10722
10723 def GetDefaultMarginWidth(*args, **kwargs):
10724 """GetDefaultMarginWidth() -> int"""
10725 return _core_.MenuItem_GetDefaultMarginWidth(*args, **kwargs)
10726
10727 GetDefaultMarginWidth = staticmethod(GetDefaultMarginWidth)
10728 def IsOwnerDrawn(*args, **kwargs):
10729 """IsOwnerDrawn(self) -> bool"""
10730 return _core_.MenuItem_IsOwnerDrawn(*args, **kwargs)
10731
10732 def SetOwnerDrawn(*args, **kwargs):
10733 """SetOwnerDrawn(self, bool ownerDrawn=True)"""
10734 return _core_.MenuItem_SetOwnerDrawn(*args, **kwargs)
10735
10736 def ResetOwnerDrawn(*args, **kwargs):
10737 """ResetOwnerDrawn(self)"""
10738 return _core_.MenuItem_ResetOwnerDrawn(*args, **kwargs)
10739
10740 _core_.MenuItem_swigregister(MenuItem)
10741
10742 def MenuItem_GetLabelFromText(*args, **kwargs):
10743 """MenuItem_GetLabelFromText(String text) -> String"""
10744 return _core_.MenuItem_GetLabelFromText(*args, **kwargs)
10745
10746 def MenuItem_GetDefaultMarginWidth(*args):
10747 """MenuItem_GetDefaultMarginWidth() -> int"""
10748 return _core_.MenuItem_GetDefaultMarginWidth(*args)
10749
10750 #---------------------------------------------------------------------------
10751
10752 class Control(Window):
10753 """
10754 This is the base class for a control or 'widget'.
10755
10756 A control is generally a small window which processes user input
10757 and/or displays one or more item of data.
10758 """
10759 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
10760 __repr__ = _swig_repr
10761 def __init__(self, *args, **kwargs):
10762 """
10763 __init__(self, Window parent, int id=-1, Point pos=DefaultPosition,
10764 Size size=DefaultSize, long style=0, Validator validator=DefaultValidator,
10765 String name=ControlNameStr) -> Control
10766
10767 Create a Control. Normally you should only call this from a subclass'
10768 __init__ as a plain old wx.Control is not very useful.
10769 """
10770 _core_.Control_swiginit(self,_core_.new_Control(*args, **kwargs))
10771 self._setOORInfo(self)
10772
10773 def Create(*args, **kwargs):
10774 """
10775 Create(self, Window parent, int id=-1, Point pos=DefaultPosition,
10776 Size size=DefaultSize, long style=0, Validator validator=DefaultValidator,
10777 String name=ControlNameStr) -> bool
10778
10779 Do the 2nd phase and create the GUI control.
10780 """
10781 return _core_.Control_Create(*args, **kwargs)
10782
10783 def GetAlignment(*args, **kwargs):
10784 """
10785 GetAlignment(self) -> int
10786
10787 Get the control alignment (left/right/centre, top/bottom/centre)
10788 """
10789 return _core_.Control_GetAlignment(*args, **kwargs)
10790
10791 def GetLabelText(*args, **kwargs):
10792 """
10793 GetLabelText(self) -> String
10794
10795 Get just the text of the label, without mnemonic characters ('&')
10796 """
10797 return _core_.Control_GetLabelText(*args, **kwargs)
10798
10799 def Command(*args, **kwargs):
10800 """
10801 Command(self, CommandEvent event)
10802
10803 Simulates the effect of the user issuing a command to the item.
10804
10805 :see: `wx.CommandEvent`
10806
10807 """
10808 return _core_.Control_Command(*args, **kwargs)
10809
10810 def GetLabel(*args, **kwargs):
10811 """
10812 GetLabel(self) -> String
10813
10814 Return a control's text.
10815 """
10816 return _core_.Control_GetLabel(*args, **kwargs)
10817
10818 def GetClassDefaultAttributes(*args, **kwargs):
10819 """
10820 GetClassDefaultAttributes(int variant=WINDOW_VARIANT_NORMAL) -> VisualAttributes
10821
10822 Get the default attributes for this class. This is useful if you want
10823 to use the same font or colour in your own control as in a standard
10824 control -- which is a much better idea than hard coding specific
10825 colours or fonts which might look completely out of place on the
10826 user's system, especially if it uses themes.
10827
10828 The variant parameter is only relevant under Mac currently and is
10829 ignore under other platforms. Under Mac, it will change the size of
10830 the returned font. See `wx.Window.SetWindowVariant` for more about
10831 this.
10832 """
10833 return _core_.Control_GetClassDefaultAttributes(*args, **kwargs)
10834
10835 GetClassDefaultAttributes = staticmethod(GetClassDefaultAttributes)
10836 Alignment = property(GetAlignment,doc="See `GetAlignment`")
10837 Label = property(GetLabel,doc="See `GetLabel`")
10838 LabelText = property(GetLabelText,doc="See `GetLabelText`")
10839 _core_.Control_swigregister(Control)
10840 ControlNameStr = cvar.ControlNameStr
10841
10842 def PreControl(*args, **kwargs):
10843 """
10844 PreControl() -> Control
10845
10846 Precreate a Control control for 2-phase creation
10847 """
10848 val = _core_.new_PreControl(*args, **kwargs)
10849 return val
10850
10851 def Control_GetClassDefaultAttributes(*args, **kwargs):
10852 """
10853 Control_GetClassDefaultAttributes(int variant=WINDOW_VARIANT_NORMAL) -> VisualAttributes
10854
10855 Get the default attributes for this class. This is useful if you want
10856 to use the same font or colour in your own control as in a standard
10857 control -- which is a much better idea than hard coding specific
10858 colours or fonts which might look completely out of place on the
10859 user's system, especially if it uses themes.
10860
10861 The variant parameter is only relevant under Mac currently and is
10862 ignore under other platforms. Under Mac, it will change the size of
10863 the returned font. See `wx.Window.SetWindowVariant` for more about
10864 this.
10865 """
10866 return _core_.Control_GetClassDefaultAttributes(*args, **kwargs)
10867
10868 #---------------------------------------------------------------------------
10869
10870 class ItemContainer(object):
10871 """
10872 The wx.ItemContainer class defines an interface which is implemented
10873 by all controls which have string subitems, each of which may be
10874 selected, such as `wx.ListBox`, `wx.CheckListBox`, `wx.Choice` as well
10875 as `wx.ComboBox` which implements an extended interface deriving from
10876 this one.
10877
10878 It defines the methods for accessing the control's items and although
10879 each of the derived classes implements them differently, they still
10880 all conform to the same interface.
10881
10882 The items in a wx.ItemContainer have (non empty) string labels and,
10883 optionally, client data associated with them.
10884
10885 """
10886 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
10887 def __init__(self): raise AttributeError, "No constructor defined"
10888 __repr__ = _swig_repr
10889 def Append(*args, **kwargs):
10890 """
10891 Append(self, String item, PyObject clientData=None) -> int
10892
10893 Adds the item to the control, associating the given data with the item
10894 if not None. The return value is the index of the newly added item
10895 which may be different from the last one if the control is sorted (e.g.
10896 has wx.LB_SORT or wx.CB_SORT style).
10897 """
10898 return _core_.ItemContainer_Append(*args, **kwargs)
10899
10900 def AppendItems(*args, **kwargs):
10901 """
10902 AppendItems(self, List strings)
10903
10904 Apend several items at once to the control. Notice that calling this
10905 method may be much faster than appending the items one by one if you
10906 need to add a lot of items.
10907 """
10908 return _core_.ItemContainer_AppendItems(*args, **kwargs)
10909
10910 def Insert(*args, **kwargs):
10911 """
10912 Insert(self, String item, unsigned int pos, PyObject clientData=None) -> int
10913
10914 Insert an item into the control before the item at the ``pos`` index,
10915 optionally associating some data object with the item.
10916 """
10917 return _core_.ItemContainer_Insert(*args, **kwargs)
10918
10919 def Clear(*args, **kwargs):
10920 """
10921 Clear(self)
10922
10923 Removes all items from the control.
10924 """
10925 return _core_.ItemContainer_Clear(*args, **kwargs)
10926
10927 def Delete(*args, **kwargs):
10928 """
10929 Delete(self, unsigned int n)
10930
10931 Deletes the item at the zero-based index 'n' from the control. Note
10932 that it is an error (signalled by a `wx.PyAssertionError` exception if
10933 enabled) to remove an item with the index negative or greater or equal
10934 than the number of items in the control.
10935 """
10936 return _core_.ItemContainer_Delete(*args, **kwargs)
10937
10938 def GetClientData(*args, **kwargs):
10939 """
10940 GetClientData(self, unsigned int n) -> PyObject
10941
10942 Returns the client data associated with the given item, (if any.)
10943 """
10944 return _core_.ItemContainer_GetClientData(*args, **kwargs)
10945
10946 def SetClientData(*args, **kwargs):
10947 """
10948 SetClientData(self, unsigned int n, PyObject clientData)
10949
10950 Associate the given client data with the item at position n.
10951 """
10952 return _core_.ItemContainer_SetClientData(*args, **kwargs)
10953
10954 def GetCount(*args, **kwargs):
10955 """
10956 GetCount(self) -> unsigned int
10957
10958 Returns the number of items in the control.
10959 """
10960 return _core_.ItemContainer_GetCount(*args, **kwargs)
10961
10962 def IsEmpty(*args, **kwargs):
10963 """
10964 IsEmpty(self) -> bool
10965
10966 Returns True if the control is empty or False if it has some items.
10967 """
10968 return _core_.ItemContainer_IsEmpty(*args, **kwargs)
10969
10970 def GetString(*args, **kwargs):
10971 """
10972 GetString(self, unsigned int n) -> String
10973
10974 Returns the label of the item with the given index.
10975 """
10976 return _core_.ItemContainer_GetString(*args, **kwargs)
10977
10978 def GetStrings(*args, **kwargs):
10979 """GetStrings(self) -> wxArrayString"""
10980 return _core_.ItemContainer_GetStrings(*args, **kwargs)
10981
10982 def SetString(*args, **kwargs):
10983 """
10984 SetString(self, unsigned int n, String s)
10985
10986 Sets the label for the given item.
10987 """
10988 return _core_.ItemContainer_SetString(*args, **kwargs)
10989
10990 def FindString(*args, **kwargs):
10991 """
10992 FindString(self, String s) -> int
10993
10994 Finds an item whose label matches the given string. Returns the
10995 zero-based position of the item, or ``wx.NOT_FOUND`` if the string was not
10996 found.
10997 """
10998 return _core_.ItemContainer_FindString(*args, **kwargs)
10999
11000 def SetSelection(*args, **kwargs):
11001 """
11002 SetSelection(self, int n)
11003
11004 Sets the item at index 'n' to be the selected item.
11005 """
11006 return _core_.ItemContainer_SetSelection(*args, **kwargs)
11007
11008 def GetSelection(*args, **kwargs):
11009 """
11010 GetSelection(self) -> int
11011
11012 Returns the index of the selected item or ``wx.NOT_FOUND`` if no item
11013 is selected.
11014 """
11015 return _core_.ItemContainer_GetSelection(*args, **kwargs)
11016
11017 def SetStringSelection(*args, **kwargs):
11018 """SetStringSelection(self, String s) -> bool"""
11019 return _core_.ItemContainer_SetStringSelection(*args, **kwargs)
11020
11021 def GetStringSelection(*args, **kwargs):
11022 """
11023 GetStringSelection(self) -> String
11024
11025 Returns the label of the selected item or an empty string if no item
11026 is selected.
11027 """
11028 return _core_.ItemContainer_GetStringSelection(*args, **kwargs)
11029
11030 def Select(*args, **kwargs):
11031 """
11032 Select(self, int n)
11033
11034 This is the same as `SetSelection` and exists only because it is
11035 slightly more natural for controls which support multiple selection.
11036 """
11037 return _core_.ItemContainer_Select(*args, **kwargs)
11038
11039 def GetItems(self):
11040 """Return a list of the strings in the control"""
11041 return [self.GetString(i) for i in xrange(self.GetCount())]
11042
11043 def SetItems(self, items):
11044 """Clear and set the strings in the control from a list"""
11045 self.Clear()
11046 for i in items:
11047 self.Append(i)
11048
11049 Count = property(GetCount,doc="See `GetCount`")
11050 Items = property(GetItems,SetItems,doc="See `GetItems` and `SetItems`")
11051 Selection = property(GetSelection,SetSelection,doc="See `GetSelection` and `SetSelection`")
11052 StringSelection = property(GetStringSelection,SetStringSelection,doc="See `GetStringSelection` and `SetStringSelection`")
11053 Strings = property(GetStrings,doc="See `GetStrings`")
11054 _core_.ItemContainer_swigregister(ItemContainer)
11055
11056 #---------------------------------------------------------------------------
11057
11058 class ControlWithItems(Control,ItemContainer):
11059 """
11060 wx.ControlWithItems combines the ``wx.ItemContainer`` class with the
11061 wx.Control class, and is used for the base class of various controls
11062 that have items.
11063 """
11064 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
11065 def __init__(self): raise AttributeError, "No constructor defined"
11066 __repr__ = _swig_repr
11067 _core_.ControlWithItems_swigregister(ControlWithItems)
11068
11069 #---------------------------------------------------------------------------
11070
11071 class SizerItem(Object):
11072 """
11073 The wx.SizerItem class is used to track the position, size and other
11074 attributes of each item managed by a `wx.Sizer`. It is not usually
11075 necessary to use this class because the sizer elements can also be
11076 identified by their positions or window or sizer references but
11077 sometimes it may be more convenient to use wx.SizerItem directly.
11078 Also, custom classes derived from `wx.PySizer` will probably need to
11079 use the collection of wx.SizerItems held by wx.Sizer when calculating
11080 layout.
11081
11082 :see: `wx.Sizer`, `wx.GBSizerItem`
11083 """
11084 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
11085 __repr__ = _swig_repr
11086 def __init__(self, *args, **kwargs):
11087 """
11088 __init__(self) -> SizerItem
11089
11090 Constructs an empty wx.SizerItem. Either a window, sizer or spacer
11091 size will need to be set before this item can be used in a Sizer.
11092
11093 You will probably never need to create a wx.SizerItem directly as they
11094 are created automatically when the sizer's Add, Insert or Prepend
11095 methods are called.
11096
11097 :see: `wx.SizerItemSpacer`, `wx.SizerItemWindow`, `wx.SizerItemSizer`
11098 """
11099 _core_.SizerItem_swiginit(self,_core_.new_SizerItem(*args, **kwargs))
11100 __swig_destroy__ = _core_.delete_SizerItem
11101 __del__ = lambda self : None;
11102 def DeleteWindows(*args, **kwargs):
11103 """
11104 DeleteWindows(self)
11105
11106 Destroy the window or the windows in a subsizer, depending on the type
11107 of item.
11108 """
11109 return _core_.SizerItem_DeleteWindows(*args, **kwargs)
11110
11111 def DetachSizer(*args, **kwargs):
11112 """
11113 DetachSizer(self)
11114
11115 Enable deleting the SizerItem without destroying the contained sizer.
11116 """
11117 return _core_.SizerItem_DetachSizer(*args, **kwargs)
11118
11119 def GetSize(*args, **kwargs):
11120 """
11121 GetSize(self) -> Size
11122
11123 Get the current size of the item, as set in the last Layout.
11124 """
11125 return _core_.SizerItem_GetSize(*args, **kwargs)
11126
11127 def CalcMin(*args, **kwargs):
11128 """
11129 CalcMin(self) -> Size
11130
11131 Calculates the minimum desired size for the item, including any space
11132 needed by borders.
11133 """
11134 return _core_.SizerItem_CalcMin(*args, **kwargs)
11135
11136 def SetDimension(*args, **kwargs):
11137 """
11138 SetDimension(self, Point pos, Size size)
11139
11140 Set the position and size of the space allocated for this item by the
11141 sizer, and adjust the position and size of the item (window or
11142 subsizer) to be within that space taking alignment and borders into
11143 account.
11144 """
11145 return _core_.SizerItem_SetDimension(*args, **kwargs)
11146
11147 def GetMinSize(*args, **kwargs):
11148 """
11149 GetMinSize(self) -> Size
11150
11151 Get the minimum size needed for the item.
11152 """
11153 return _core_.SizerItem_GetMinSize(*args, **kwargs)
11154
11155 def GetMinSizeWithBorder(*args, **kwargs):
11156 """
11157 GetMinSizeWithBorder(self) -> Size
11158
11159 Get the minimum size needed for the item with space for the borders
11160 added, if needed.
11161 """
11162 return _core_.SizerItem_GetMinSizeWithBorder(*args, **kwargs)
11163
11164 def SetInitSize(*args, **kwargs):
11165 """SetInitSize(self, int x, int y)"""
11166 return _core_.SizerItem_SetInitSize(*args, **kwargs)
11167
11168 def SetRatioWH(*args, **kwargs):
11169 """
11170 SetRatioWH(self, int width, int height)
11171
11172 Set the ratio item attribute.
11173 """
11174 return _core_.SizerItem_SetRatioWH(*args, **kwargs)
11175
11176 def SetRatioSize(*args, **kwargs):
11177 """
11178 SetRatioSize(self, Size size)
11179
11180 Set the ratio item attribute.
11181 """
11182 return _core_.SizerItem_SetRatioSize(*args, **kwargs)
11183
11184 def SetRatio(*args, **kwargs):
11185 """
11186 SetRatio(self, float ratio)
11187
11188 Set the ratio item attribute.
11189 """
11190 return _core_.SizerItem_SetRatio(*args, **kwargs)
11191
11192 def GetRatio(*args, **kwargs):
11193 """
11194 GetRatio(self) -> float
11195
11196 Set the ratio item attribute.
11197 """
11198 return _core_.SizerItem_GetRatio(*args, **kwargs)
11199
11200 def GetRect(*args, **kwargs):
11201 """
11202 GetRect(self) -> Rect
11203
11204 Returns the rectangle that the sizer item should occupy
11205 """
11206 return _core_.SizerItem_GetRect(*args, **kwargs)
11207
11208 def IsWindow(*args, **kwargs):
11209 """
11210 IsWindow(self) -> bool
11211
11212 Is this sizer item a window?
11213 """
11214 return _core_.SizerItem_IsWindow(*args, **kwargs)
11215
11216 def IsSizer(*args, **kwargs):
11217 """
11218 IsSizer(self) -> bool
11219
11220 Is this sizer item a subsizer?
11221 """
11222 return _core_.SizerItem_IsSizer(*args, **kwargs)
11223
11224 def IsSpacer(*args, **kwargs):
11225 """
11226 IsSpacer(self) -> bool
11227
11228 Is this sizer item a spacer?
11229 """
11230 return _core_.SizerItem_IsSpacer(*args, **kwargs)
11231
11232 def SetProportion(*args, **kwargs):
11233 """
11234 SetProportion(self, int proportion)
11235
11236 Set the proportion value for this item.
11237 """
11238 return _core_.SizerItem_SetProportion(*args, **kwargs)
11239
11240 def GetProportion(*args, **kwargs):
11241 """
11242 GetProportion(self) -> int
11243
11244 Get the proportion value for this item.
11245 """
11246 return _core_.SizerItem_GetProportion(*args, **kwargs)
11247
11248 SetOption = wx._deprecated(SetProportion, "Please use `SetProportion` instead.")
11249 GetOption = wx._deprecated(GetProportion, "Please use `GetProportion` instead.")
11250 def SetFlag(*args, **kwargs):
11251 """
11252 SetFlag(self, int flag)
11253
11254 Set the flag value for this item.
11255 """
11256 return _core_.SizerItem_SetFlag(*args, **kwargs)
11257
11258 def GetFlag(*args, **kwargs):
11259 """
11260 GetFlag(self) -> int
11261
11262 Get the flag value for this item.
11263 """
11264 return _core_.SizerItem_GetFlag(*args, **kwargs)
11265
11266 def SetBorder(*args, **kwargs):
11267 """
11268 SetBorder(self, int border)
11269
11270 Set the border value for this item.
11271 """
11272 return _core_.SizerItem_SetBorder(*args, **kwargs)
11273
11274 def GetBorder(*args, **kwargs):
11275 """
11276 GetBorder(self) -> int
11277
11278 Get the border value for this item.
11279 """
11280 return _core_.SizerItem_GetBorder(*args, **kwargs)
11281
11282 def GetWindow(*args, **kwargs):
11283 """
11284 GetWindow(self) -> Window
11285
11286 Get the window (if any) that is managed by this sizer item.
11287 """
11288 return _core_.SizerItem_GetWindow(*args, **kwargs)
11289
11290 def SetWindow(*args, **kwargs):
11291 """
11292 SetWindow(self, Window window)
11293
11294 Set the window to be managed by this sizer item.
11295 """
11296 return _core_.SizerItem_SetWindow(*args, **kwargs)
11297
11298 def GetSizer(*args, **kwargs):
11299 """
11300 GetSizer(self) -> Sizer
11301
11302 Get the subsizer (if any) that is managed by this sizer item.
11303 """
11304 return _core_.SizerItem_GetSizer(*args, **kwargs)
11305
11306 def SetSizer(*args, **kwargs):
11307 """
11308 SetSizer(self, Sizer sizer)
11309
11310 Set the subsizer to be managed by this sizer item.
11311 """
11312 return _core_.SizerItem_SetSizer(*args, **kwargs)
11313
11314 def GetSpacer(*args, **kwargs):
11315 """
11316 GetSpacer(self) -> Size
11317
11318 Get the size of the spacer managed by this sizer item.
11319 """
11320 return _core_.SizerItem_GetSpacer(*args, **kwargs)
11321
11322 def SetSpacer(*args, **kwargs):
11323 """
11324 SetSpacer(self, Size size)
11325
11326 Set the size of the spacer to be managed by this sizer item.
11327 """
11328 return _core_.SizerItem_SetSpacer(*args, **kwargs)
11329
11330 def Show(*args, **kwargs):
11331 """
11332 Show(self, bool show)
11333
11334 Set the show item attribute, which sizers use to determine if the item
11335 is to be made part of the layout or not. If the item is tracking a
11336 window then it is shown or hidden as needed.
11337 """
11338 return _core_.SizerItem_Show(*args, **kwargs)
11339
11340 def IsShown(*args, **kwargs):
11341 """
11342 IsShown(self) -> bool
11343
11344 Is the item to be shown in the layout?
11345 """
11346 return _core_.SizerItem_IsShown(*args, **kwargs)
11347
11348 def GetPosition(*args, **kwargs):
11349 """
11350 GetPosition(self) -> Point
11351
11352 Returns the current position of the item, as set in the last Layout.
11353 """
11354 return _core_.SizerItem_GetPosition(*args, **kwargs)
11355
11356 def GetUserData(*args, **kwargs):
11357 """
11358 GetUserData(self) -> PyObject
11359
11360 Returns the userData associated with this sizer item, or None if there
11361 isn't any.
11362 """
11363 return _core_.SizerItem_GetUserData(*args, **kwargs)
11364
11365 def SetUserData(*args, **kwargs):
11366 """
11367 SetUserData(self, PyObject userData)
11368
11369 Associate a Python object with this sizer item.
11370 """
11371 return _core_.SizerItem_SetUserData(*args, **kwargs)
11372
11373 _core_.SizerItem_swigregister(SizerItem)
11374
11375 def SizerItemWindow(*args, **kwargs):
11376 """
11377 SizerItemWindow(Window window, int proportion, int flag, int border,
11378 PyObject userData=None) -> SizerItem
11379
11380 Constructs a `wx.SizerItem` for tracking a window.
11381 """
11382 val = _core_.new_SizerItemWindow(*args, **kwargs)
11383 return val
11384
11385 def SizerItemSpacer(*args, **kwargs):
11386 """
11387 SizerItemSpacer(int width, int height, int proportion, int flag, int border,
11388 PyObject userData=None) -> SizerItem
11389
11390 Constructs a `wx.SizerItem` for tracking a spacer.
11391 """
11392 val = _core_.new_SizerItemSpacer(*args, **kwargs)
11393 return val
11394
11395 def SizerItemSizer(*args, **kwargs):
11396 """
11397 SizerItemSizer(Sizer sizer, int proportion, int flag, int border,
11398 PyObject userData=None) -> SizerItem
11399
11400 Constructs a `wx.SizerItem` for tracking a subsizer
11401 """
11402 val = _core_.new_SizerItemSizer(*args, **kwargs)
11403 return val
11404
11405 class Sizer(Object):
11406 """
11407 wx.Sizer is the abstract base class used for laying out subwindows in
11408 a window. You cannot use wx.Sizer directly; instead, you will have to
11409 use one of the sizer classes derived from it such as `wx.BoxSizer`,
11410 `wx.StaticBoxSizer`, `wx.GridSizer`, `wx.FlexGridSizer` and
11411 `wx.GridBagSizer`.
11412
11413 The concept implemented by sizers in wxWidgets is closely related to
11414 layout tools in other GUI toolkits, such as Java's AWT, the GTK
11415 toolkit or the Qt toolkit. It is based upon the idea of the individual
11416 subwindows reporting their minimal required size and their ability to
11417 get stretched if the size of the parent window has changed. This will
11418 most often mean that the programmer does not set the original size of
11419 a dialog in the beginning, rather the dialog will assigned a sizer and
11420 this sizer will be queried about the recommended size. The sizer in
11421 turn will query its children, which can be normal windows or contorls,
11422 empty space or other sizers, so that a hierarchy of sizers can be
11423 constructed. Note that wxSizer does not derive from wxWindow and thus
11424 do not interfere with tab ordering and requires very little resources
11425 compared to a real window on screen.
11426
11427 What makes sizers so well fitted for use in wxWidgets is the fact that
11428 every control reports its own minimal size and the algorithm can
11429 handle differences in font sizes or different window (dialog item)
11430 sizes on different platforms without problems. If for example the
11431 standard font as well as the overall design of Mac widgets requires
11432 more space than on Windows, then the initial size of a dialog using a
11433 sizer will automatically be bigger on Mac than on Windows.
11434 """
11435 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
11436 def __init__(self): raise AttributeError, "No constructor defined"
11437 __repr__ = _swig_repr
11438 __swig_destroy__ = _core_.delete_Sizer
11439 __del__ = lambda self : None;
11440 def _setOORInfo(*args, **kwargs):
11441 """_setOORInfo(self, PyObject _self)"""
11442 return _core_.Sizer__setOORInfo(*args, **kwargs)
11443
11444 def Add(*args, **kwargs):
11445 """
11446 Add(self, item, int proportion=0, int flag=0, int border=0,
11447 PyObject userData=None) -> wx.SizerItem
11448
11449 Appends a child item to the sizer.
11450 """
11451 return _core_.Sizer_Add(*args, **kwargs)
11452
11453 def Insert(*args, **kwargs):
11454 """
11455 Insert(self, int before, item, int proportion=0, int flag=0, int border=0,
11456 PyObject userData=None) -> wx.SizerItem
11457
11458 Inserts a new item into the list of items managed by this sizer before
11459 the item at index *before*. See `Add` for a description of the parameters.
11460 """
11461 return _core_.Sizer_Insert(*args, **kwargs)
11462
11463 def Prepend(*args, **kwargs):
11464 """
11465 Prepend(self, item, int proportion=0, int flag=0, int border=0,
11466 PyObject userData=None) -> wx.SizerItem
11467
11468 Adds a new item to the begining of the list of sizer items managed by
11469 this sizer. See `Add` for a description of the parameters.
11470 """
11471 return _core_.Sizer_Prepend(*args, **kwargs)
11472
11473 def Remove(*args, **kwargs):
11474 """
11475 Remove(self, item) -> bool
11476
11477 Removes an item from the sizer and destroys it. This method does not
11478 cause any layout or resizing to take place, call `Layout` to update
11479 the layout on screen after removing a child from the sizer. The
11480 *item* parameter can be either a window, a sizer, or the zero-based
11481 index of an item to remove. Returns True if the child item was found
11482 and removed.
11483 """
11484 return _core_.Sizer_Remove(*args, **kwargs)
11485
11486 def Detach(*args, **kwargs):
11487 """
11488 Detach(self, item) -> bool
11489
11490 Detaches an item from the sizer without destroying it. This method
11491 does not cause any layout or resizing to take place, call `Layout` to
11492 do so. The *item* parameter can be either a window, a sizer, or the
11493 zero-based index of the item to be detached. Returns True if the child item
11494 was found and detached.
11495 """
11496 return _core_.Sizer_Detach(*args, **kwargs)
11497
11498 def GetItem(*args, **kwargs):
11499 """
11500 GetItem(self, item) -> wx.SizerItem
11501
11502 Returns the `wx.SizerItem` which holds the *item* given. The *item*
11503 parameter can be either a window, a sizer, or the zero-based index of
11504 the item to be found.
11505 """
11506 return _core_.Sizer_GetItem(*args, **kwargs)
11507
11508 def _SetItemMinSize(*args, **kwargs):
11509 """_SetItemMinSize(self, PyObject item, Size size)"""
11510 return _core_.Sizer__SetItemMinSize(*args, **kwargs)
11511
11512 def _ReplaceWin(*args, **kwargs):
11513 """_ReplaceWin(self, Window oldwin, Window newwin, bool recursive=False) -> bool"""
11514 return _core_.Sizer__ReplaceWin(*args, **kwargs)
11515
11516 def _ReplaceSizer(*args, **kwargs):
11517 """_ReplaceSizer(self, Sizer oldsz, Sizer newsz, bool recursive=False) -> bool"""
11518 return _core_.Sizer__ReplaceSizer(*args, **kwargs)
11519
11520 def _ReplaceItem(*args, **kwargs):
11521 """_ReplaceItem(self, size_t index, SizerItem newitem) -> bool"""
11522 return _core_.Sizer__ReplaceItem(*args, **kwargs)
11523
11524 def Replace(self, olditem, item, recursive=False):
11525 """
11526 Detaches the given ``olditem`` from the sizer and replaces it with
11527 ``item`` which can be a window, sizer, or `wx.SizerItem`. The
11528 detached child is destroyed only if it is not a window, (because
11529 windows are owned by their parent, not the sizer.) The
11530 ``recursive`` parameter can be used to search for the given
11531 element recursivly in subsizers.
11532
11533 This method does not cause any layout or resizing to take place,
11534 call `Layout` to do so.
11535
11536 Returns ``True`` if the child item was found and removed.
11537 """
11538 if isinstance(olditem, wx.Window):
11539 return self._ReplaceWin(olditem, item, recursive)
11540 elif isinstnace(olditem, wx.Sizer):
11541 return self._ReplaceSizer(olditem, item, recursive)
11542 elif isinstnace(olditem, int):
11543 return self._ReplaceItem(olditem, item)
11544 else:
11545 raise TypeError("Expected Window, Sizer, or integer for first parameter.")
11546
11547 def SetContainingWindow(*args, **kwargs):
11548 """
11549 SetContainingWindow(self, Window window)
11550
11551 Set (or unset) the window this sizer is used in.
11552 """
11553 return _core_.Sizer_SetContainingWindow(*args, **kwargs)
11554
11555 def GetContainingWindow(*args, **kwargs):
11556 """
11557 GetContainingWindow(self) -> Window
11558
11559 Get the window this sizer is used in.
11560 """
11561 return _core_.Sizer_GetContainingWindow(*args, **kwargs)
11562
11563 def SetItemMinSize(self, item, *args):
11564 """
11565 SetItemMinSize(self, item, Size size)
11566
11567 Sets the minimum size that will be allocated for an item in the sizer.
11568 The *item* parameter can be either a window, a sizer, or the
11569 zero-based index of the item. If a window or sizer is given then it
11570 will be searched for recursivly in subsizers if neccessary.
11571 """
11572 if len(args) == 2:
11573 # for backward compatibility accept separate width,height args too
11574 return self._SetItemMinSize(item, args)
11575 else:
11576 return self._SetItemMinSize(item, args[0])
11577
11578 def AddItem(*args, **kwargs):
11579 """
11580 AddItem(self, SizerItem item)
11581
11582 Adds a `wx.SizerItem` to the sizer.
11583 """
11584 return _core_.Sizer_AddItem(*args, **kwargs)
11585
11586 def InsertItem(*args, **kwargs):
11587 """
11588 InsertItem(self, int index, SizerItem item)
11589
11590 Inserts a `wx.SizerItem` to the sizer at the position given by *index*.
11591 """
11592 return _core_.Sizer_InsertItem(*args, **kwargs)
11593
11594 def PrependItem(*args, **kwargs):
11595 """
11596 PrependItem(self, SizerItem item)
11597
11598 Prepends a `wx.SizerItem` to the sizer.
11599 """
11600 return _core_.Sizer_PrependItem(*args, **kwargs)
11601
11602 def AddMany(self, items):
11603 """
11604 AddMany is a convenience method for adding several items
11605 to a sizer at one time. Simply pass it a list of tuples,
11606 where each tuple consists of the parameters that you
11607 would normally pass to the `Add` method.
11608 """
11609 for item in items:
11610 if type(item) != type(()) or (len(item) == 2 and type(item[0]) == type(1)):
11611 item = (item, )
11612 self.Add(*item)
11613
11614 def AddSpacer(self, *args, **kw):
11615 """AddSpacer(int size) --> SizerItem
11616
11617 Add a spacer that is (size,size) pixels.
11618 """
11619 if args and type(args[0]) == int:
11620 return self.Add( (args[0],args[0] ), 0)
11621 else: # otherwise stay compatible with old AddSpacer
11622 return self.Add(*args, **kw)
11623 def PrependSpacer(self, *args, **kw):
11624 """PrependSpacer(int size) --> SizerItem
11625
11626 Prepend a spacer that is (size, size) pixels."""
11627 if args and type(args[0]) == int:
11628 return self.Prepend( (args[0],args[0] ), 0)
11629 else: # otherwise stay compatible with old PrependSpacer
11630 return self.Prepend(*args, **kw)
11631 def InsertSpacer(self, index, *args, **kw):
11632 """InsertSpacer(int index, int size) --> SizerItem
11633
11634 Insert a spacer at position index that is (size, size) pixels."""
11635 if args and type(args[0]) == int:
11636 return self.Insert( index, (args[0],args[0] ), 0)
11637 else: # otherwise stay compatible with old InsertSpacer
11638 return self.Insert(index, *args, **kw)
11639
11640
11641 def AddStretchSpacer(self, prop=1):
11642 """AddStretchSpacer(int prop=1) --> SizerItem
11643
11644 Add a stretchable spacer."""
11645 return self.Add((0,0), prop)
11646 def PrependStretchSpacer(self, prop=1):
11647 """PrependStretchSpacer(int prop=1) --> SizerItem
11648
11649 Prepend a stretchable spacer."""
11650 return self.Prepend((0,0), prop)
11651 def InsertStretchSpacer(self, index, prop=1):
11652 """InsertStretchSpacer(int index, int prop=1) --> SizerItem
11653
11654 Insert a stretchable spacer."""
11655 return self.Insert(index, (0,0), prop)
11656
11657
11658 # for backwards compatibility only, please do not use in new code
11659 def AddWindow(self, *args, **kw):
11660 """Compatibility alias for `Add`."""
11661 return self.Add(*args, **kw)
11662 def AddSizer(self, *args, **kw):
11663 """Compatibility alias for `Add`."""
11664 return self.Add(*args, **kw)
11665
11666 def PrependWindow(self, *args, **kw):
11667 """Compatibility alias for `Prepend`."""
11668 return self.Prepend(*args, **kw)
11669 def PrependSizer(self, *args, **kw):
11670 """Compatibility alias for `Prepend`."""
11671 return self.Prepend(*args, **kw)
11672
11673 def InsertWindow(self, *args, **kw):
11674 """Compatibility alias for `Insert`."""
11675 return self.Insert(*args, **kw)
11676 def InsertSizer(self, *args, **kw):
11677 """Compatibility alias for `Insert`."""
11678 return self.Insert(*args, **kw)
11679
11680 def RemoveWindow(self, *args, **kw):
11681 """Compatibility alias for `Remove`."""
11682 return self.Remove(*args, **kw)
11683 def RemoveSizer(self, *args, **kw):
11684 """Compatibility alias for `Remove`."""
11685 return self.Remove(*args, **kw)
11686 def RemovePos(self, *args, **kw):
11687 """Compatibility alias for `Remove`."""
11688 return self.Remove(*args, **kw)
11689
11690
11691 def SetDimension(*args, **kwargs):
11692 """
11693 SetDimension(self, int x, int y, int width, int height)
11694
11695 Call this to force the sizer to take the given dimension and thus
11696 force the items owned by the sizer to resize themselves according to
11697 the rules defined by the parameter in the `Add`, `Insert` or `Prepend`
11698 methods.
11699 """
11700 return _core_.Sizer_SetDimension(*args, **kwargs)
11701
11702 def SetMinSize(*args, **kwargs):
11703 """
11704 SetMinSize(self, Size size)
11705
11706 Call this to give the sizer a minimal size. Normally, the sizer will
11707 calculate its minimal size based purely on how much space its children
11708 need. After calling this method `GetMinSize` will return either the
11709 minimal size as requested by its children or the minimal size set
11710 here, depending on which is bigger.
11711 """
11712 return _core_.Sizer_SetMinSize(*args, **kwargs)
11713
11714 def GetSize(*args, **kwargs):
11715 """
11716 GetSize(self) -> Size
11717
11718 Returns the current size of the space managed by the sizer.
11719 """
11720 return _core_.Sizer_GetSize(*args, **kwargs)
11721
11722 def GetPosition(*args, **kwargs):
11723 """
11724 GetPosition(self) -> Point
11725
11726 Returns the current position of the sizer's managed space.
11727 """
11728 return _core_.Sizer_GetPosition(*args, **kwargs)
11729
11730 def GetMinSize(*args, **kwargs):
11731 """
11732 GetMinSize(self) -> Size
11733
11734 Returns the minimal size of the sizer. This is either the combined
11735 minimal size of all the children and their borders or the minimal size
11736 set by SetMinSize, depending on which is bigger.
11737 """
11738 return _core_.Sizer_GetMinSize(*args, **kwargs)
11739
11740 def GetSizeTuple(self):
11741 return self.GetSize().Get()
11742 def GetPositionTuple(self):
11743 return self.GetPosition().Get()
11744 def GetMinSizeTuple(self):
11745 return self.GetMinSize().Get()
11746
11747 def RecalcSizes(*args, **kwargs):
11748 """
11749 RecalcSizes(self)
11750
11751 Using the sizes calculated by `CalcMin` reposition and resize all the
11752 items managed by this sizer. You should not need to call this directly as
11753 it is called by `Layout`.
11754 """
11755 return _core_.Sizer_RecalcSizes(*args, **kwargs)
11756
11757 def CalcMin(*args, **kwargs):
11758 """
11759 CalcMin(self) -> Size
11760
11761 This method is where the sizer will do the actual calculation of its
11762 children's minimal sizes. You should not need to call this directly as
11763 it is called by `Layout`.
11764 """
11765 return _core_.Sizer_CalcMin(*args, **kwargs)
11766
11767 def Layout(*args, **kwargs):
11768 """
11769 Layout(self)
11770
11771 This method will force the recalculation and layout of the items
11772 controlled by the sizer using the current space allocated to the
11773 sizer. Normally this is called automatically from the owning window's
11774 EVT_SIZE handler, but it is also useful to call it from user code when
11775 one of the items in a sizer change size, or items are added or
11776 removed.
11777 """
11778 return _core_.Sizer_Layout(*args, **kwargs)
11779
11780 def Fit(*args, **kwargs):
11781 """
11782 Fit(self, Window window) -> Size
11783
11784 Tell the sizer to resize the *window* to match the sizer's minimal
11785 size. This is commonly done in the constructor of the window itself in
11786 order to set its initial size to match the needs of the children as
11787 determined by the sizer. Returns the new size.
11788
11789 For a top level window this is the total window size, not the client size.
11790 """
11791 return _core_.Sizer_Fit(*args, **kwargs)
11792
11793 def FitInside(*args, **kwargs):
11794 """
11795 FitInside(self, Window window)
11796
11797 Tell the sizer to resize the *virtual size* of the *window* to match the
11798 sizer's minimal size. This will not alter the on screen size of the
11799 window, but may cause the addition/removal/alteration of scrollbars
11800 required to view the virtual area in windows which manage it.
11801
11802 :see: `wx.ScrolledWindow.SetScrollbars`, `SetVirtualSizeHints`
11803
11804 """
11805 return _core_.Sizer_FitInside(*args, **kwargs)
11806
11807 def SetSizeHints(*args, **kwargs):
11808 """
11809 SetSizeHints(self, Window window)
11810
11811 Tell the sizer to set (and `Fit`) the minimal size of the *window* to
11812 match the sizer's minimal size. This is commonly done in the
11813 constructor of the window itself if the window is resizable (as are
11814 many dialogs under Unix and frames on probably all platforms) in order
11815 to prevent the window from being sized smaller than the minimal size
11816 required by the sizer.
11817 """
11818 return _core_.Sizer_SetSizeHints(*args, **kwargs)
11819
11820 def SetVirtualSizeHints(*args, **kwargs):
11821 """
11822 SetVirtualSizeHints(self, Window window)
11823
11824 Tell the sizer to set the minimal size of the window virtual area to
11825 match the sizer's minimal size. For windows with managed scrollbars
11826 this will set them appropriately.
11827
11828 :see: `wx.ScrolledWindow.SetScrollbars`
11829
11830 """
11831 return _core_.Sizer_SetVirtualSizeHints(*args, **kwargs)
11832
11833 def Clear(*args, **kwargs):
11834 """
11835 Clear(self, bool deleteWindows=False)
11836
11837 Clear all items from the sizer, optionally destroying the window items
11838 as well.
11839 """
11840 return _core_.Sizer_Clear(*args, **kwargs)
11841
11842 def DeleteWindows(*args, **kwargs):
11843 """
11844 DeleteWindows(self)
11845
11846 Destroy all windows managed by the sizer.
11847 """
11848 return _core_.Sizer_DeleteWindows(*args, **kwargs)
11849
11850 def GetChildren(*args, **kwargs):
11851 """
11852 GetChildren(self) -> list
11853
11854 Returns a list of all the `wx.SizerItem` objects managed by the sizer.
11855 """
11856 return _core_.Sizer_GetChildren(*args, **kwargs)
11857
11858 def Show(*args, **kwargs):
11859 """
11860 Show(self, item, bool show=True, bool recursive=false) -> bool
11861
11862 Shows or hides an item managed by the sizer. To make a sizer item
11863 disappear or reappear, use Show followed by `Layout`. The *item*
11864 parameter can be either a window, a sizer, or the zero-based index of
11865 the item. Use the recursive parameter to show or hide an item in a
11866 subsizer. Returns True if the item was found.
11867 """
11868 return _core_.Sizer_Show(*args, **kwargs)
11869
11870 def IsShown(*args, **kwargs):
11871 """
11872 IsShown(self, item)
11873
11874 Determines if the item is currently shown. To make a sizer
11875 item disappear or reappear, use Show followed by `Layout`. The *item*
11876 parameter can be either a window, a sizer, or the zero-based index of
11877 the item.
11878 """
11879 return _core_.Sizer_IsShown(*args, **kwargs)
11880
11881 def Hide(self, item, recursive=False):
11882 """
11883 A convenience method for `Show` (item, False, recursive).
11884 """
11885 return self.Show(item, False, recursive)
11886
11887 def ShowItems(*args, **kwargs):
11888 """
11889 ShowItems(self, bool show)
11890
11891 Recursively call `wx.SizerItem.Show` on all sizer items.
11892 """
11893 return _core_.Sizer_ShowItems(*args, **kwargs)
11894
11895 _core_.Sizer_swigregister(Sizer)
11896
11897 class PySizer(Sizer):
11898 """
11899 wx.PySizer is a special version of `wx.Sizer` that has been
11900 instrumented to allow the C++ virtual methods to be overloaded in
11901 Python derived classes. You would derive from this class if you are
11902 wanting to implement a custom sizer in Python code. Simply implement
11903 `CalcMin` and `RecalcSizes` in the derived class and you're all set.
11904 For example::
11905
11906 class MySizer(wx.PySizer):
11907 def __init__(self):
11908 wx.PySizer.__init__(self)
11909
11910 def CalcMin(self):
11911 for item in self.GetChildren():
11912 # calculate the total minimum width and height needed
11913 # by all items in the sizer according to this sizer's
11914 # layout algorithm.
11915 ...
11916 return wx.Size(width, height)
11917
11918 def RecalcSizes(self):
11919 # find the space allotted to this sizer
11920 pos = self.GetPosition()
11921 size = self.GetSize()
11922 for item in self.GetChildren():
11923 # Recalculate (if necessary) the position and size of
11924 # each item and then call item.SetDimension to do the
11925 # actual positioning and sizing of the items within the
11926 # space alloted to this sizer.
11927 ...
11928 item.SetDimension(itemPos, itemSize)
11929
11930
11931 When `Layout` is called it first calls `CalcMin` followed by
11932 `RecalcSizes` so you can optimize a bit by saving the results of
11933 `CalcMin` and reusing them in `RecalcSizes`.
11934
11935 :see: `wx.SizerItem`, `wx.Sizer.GetChildren`
11936
11937
11938 """
11939 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
11940 __repr__ = _swig_repr
11941 def __init__(self, *args, **kwargs):
11942 """
11943 __init__(self) -> PySizer
11944
11945 Creates a wx.PySizer. Must be called from the __init__ in the derived
11946 class.
11947 """
11948 _core_.PySizer_swiginit(self,_core_.new_PySizer(*args, **kwargs))
11949 self._setCallbackInfo(self, PySizer);self._setOORInfo(self)
11950
11951 def _setCallbackInfo(*args, **kwargs):
11952 """_setCallbackInfo(self, PyObject self, PyObject _class)"""
11953 return _core_.PySizer__setCallbackInfo(*args, **kwargs)
11954
11955 _core_.PySizer_swigregister(PySizer)
11956
11957 #---------------------------------------------------------------------------
11958
11959 class BoxSizer(Sizer):
11960 """
11961 The basic idea behind a box sizer is that windows will most often be
11962 laid out in rather simple basic geometry, typically in a row or a
11963 column or nested hierarchies of either. A wx.BoxSizer will lay out
11964 its items in a simple row or column, depending on the orientation
11965 parameter passed to the constructor.
11966 """
11967 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
11968 __repr__ = _swig_repr
11969 def __init__(self, *args, **kwargs):
11970 """
11971 __init__(self, int orient=HORIZONTAL) -> BoxSizer
11972
11973 Constructor for a wx.BoxSizer. *orient* may be one of ``wx.VERTICAL``
11974 or ``wx.HORIZONTAL`` for creating either a column sizer or a row
11975 sizer.
11976 """
11977 _core_.BoxSizer_swiginit(self,_core_.new_BoxSizer(*args, **kwargs))
11978 self._setOORInfo(self)
11979
11980 def GetOrientation(*args, **kwargs):
11981 """
11982 GetOrientation(self) -> int
11983
11984 Returns the current orientation of the sizer.
11985 """
11986 return _core_.BoxSizer_GetOrientation(*args, **kwargs)
11987
11988 def SetOrientation(*args, **kwargs):
11989 """
11990 SetOrientation(self, int orient)
11991
11992 Resets the orientation of the sizer.
11993 """
11994 return _core_.BoxSizer_SetOrientation(*args, **kwargs)
11995
11996 Orientation = property(GetOrientation,SetOrientation,doc="See `GetOrientation` and `SetOrientation`")
11997 _core_.BoxSizer_swigregister(BoxSizer)
11998
11999 #---------------------------------------------------------------------------
12000
12001 class StaticBoxSizer(BoxSizer):
12002 """
12003 wx.StaticBoxSizer derives from and functions identically to the
12004 `wx.BoxSizer` and adds a `wx.StaticBox` around the items that the sizer
12005 manages. Note that this static box must be created separately and
12006 passed to the sizer constructor.
12007 """
12008 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
12009 __repr__ = _swig_repr
12010 def __init__(self, *args, **kwargs):
12011 """
12012 __init__(self, StaticBox box, int orient=HORIZONTAL) -> StaticBoxSizer
12013
12014 Constructor. It takes an associated static box and the orientation
12015 *orient* as parameters - orient can be either of ``wx.VERTICAL`` or
12016 ``wx.HORIZONTAL``.
12017 """
12018 _core_.StaticBoxSizer_swiginit(self,_core_.new_StaticBoxSizer(*args, **kwargs))
12019 self._setOORInfo(self)
12020
12021 def GetStaticBox(*args, **kwargs):
12022 """
12023 GetStaticBox(self) -> StaticBox
12024
12025 Returns the static box associated with this sizer.
12026 """
12027 return _core_.StaticBoxSizer_GetStaticBox(*args, **kwargs)
12028
12029 _core_.StaticBoxSizer_swigregister(StaticBoxSizer)
12030
12031 #---------------------------------------------------------------------------
12032
12033 class GridSizer(Sizer):
12034 """
12035 A grid sizer is a sizer which lays out its children in a
12036 two-dimensional table with all cells having the same size. In other
12037 words, the width of each cell within the grid is the width of the
12038 widest item added to the sizer and the height of each grid cell is the
12039 height of the tallest item. An optional vertical and/or horizontal
12040 gap between items can also be specified (in pixels.)
12041
12042 Items are placed in the cells of the grid in the order they are added,
12043 in row-major order. In other words, the first row is filled first,
12044 then the second, and so on until all items have been added. (If
12045 neccessary, additional rows will be added as items are added.) If you
12046 need to have greater control over the cells that items are placed in
12047 then use the `wx.GridBagSizer`.
12048
12049 """
12050 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
12051 __repr__ = _swig_repr
12052 def __init__(self, *args, **kwargs):
12053 """
12054 __init__(self, int rows=1, int cols=0, int vgap=0, int hgap=0) -> GridSizer
12055
12056 Constructor for a wx.GridSizer. *rows* and *cols* determine the number
12057 of columns and rows in the sizer - if either of the parameters is
12058 zero, it will be calculated to from the total number of children in
12059 the sizer, thus making the sizer grow dynamically. *vgap* and *hgap*
12060 define extra space between all children.
12061 """
12062 _core_.GridSizer_swiginit(self,_core_.new_GridSizer(*args, **kwargs))
12063 self._setOORInfo(self)
12064
12065 def SetCols(*args, **kwargs):
12066 """
12067 SetCols(self, int cols)
12068
12069 Sets the number of columns in the sizer.
12070 """
12071 return _core_.GridSizer_SetCols(*args, **kwargs)
12072
12073 def SetRows(*args, **kwargs):
12074 """
12075 SetRows(self, int rows)
12076
12077 Sets the number of rows in the sizer.
12078 """
12079 return _core_.GridSizer_SetRows(*args, **kwargs)
12080
12081 def SetVGap(*args, **kwargs):
12082 """
12083 SetVGap(self, int gap)
12084
12085 Sets the vertical gap (in pixels) between the cells in the sizer.
12086 """
12087 return _core_.GridSizer_SetVGap(*args, **kwargs)
12088
12089 def SetHGap(*args, **kwargs):
12090 """
12091 SetHGap(self, int gap)
12092
12093 Sets the horizontal gap (in pixels) between cells in the sizer
12094 """
12095 return _core_.GridSizer_SetHGap(*args, **kwargs)
12096
12097 def GetCols(*args, **kwargs):
12098 """
12099 GetCols(self) -> int
12100
12101 Returns the number of columns in the sizer.
12102 """
12103 return _core_.GridSizer_GetCols(*args, **kwargs)
12104
12105 def GetRows(*args, **kwargs):
12106 """
12107 GetRows(self) -> int
12108
12109 Returns the number of rows in the sizer.
12110 """
12111 return _core_.GridSizer_GetRows(*args, **kwargs)
12112
12113 def GetVGap(*args, **kwargs):
12114 """
12115 GetVGap(self) -> int
12116
12117 Returns the vertical gap (in pixels) between the cells in the sizer.
12118 """
12119 return _core_.GridSizer_GetVGap(*args, **kwargs)
12120
12121 def GetHGap(*args, **kwargs):
12122 """
12123 GetHGap(self) -> int
12124
12125 Returns the horizontal gap (in pixels) between cells in the sizer.
12126 """
12127 return _core_.GridSizer_GetHGap(*args, **kwargs)
12128
12129 def CalcRowsCols(self):
12130 """
12131 CalcRowsCols() -> (rows, cols)
12132
12133 Calculates how many rows and columns will be in the sizer based
12134 on the current number of items and also the rows, cols specified
12135 in the constructor.
12136 """
12137 nitems = len(self.GetChildren())
12138 rows = self.GetRows()
12139 cols = self.GetCols()
12140 assert rows != 0 or cols != 0, "Grid sizer must have either rows or columns fixed"
12141 if cols != 0:
12142 rows = (nitems + cols - 1) / cols
12143 elif rows != 0:
12144 cols = (nitems + rows - 1) / rows
12145 return (rows, cols)
12146
12147 Cols = property(GetCols,SetCols,doc="See `GetCols` and `SetCols`")
12148 HGap = property(GetHGap,SetHGap,doc="See `GetHGap` and `SetHGap`")
12149 Rows = property(GetRows,SetRows,doc="See `GetRows` and `SetRows`")
12150 VGap = property(GetVGap,SetVGap,doc="See `GetVGap` and `SetVGap`")
12151 _core_.GridSizer_swigregister(GridSizer)
12152
12153 #---------------------------------------------------------------------------
12154
12155 FLEX_GROWMODE_NONE = _core_.FLEX_GROWMODE_NONE
12156 FLEX_GROWMODE_SPECIFIED = _core_.FLEX_GROWMODE_SPECIFIED
12157 FLEX_GROWMODE_ALL = _core_.FLEX_GROWMODE_ALL
12158 class FlexGridSizer(GridSizer):
12159 """
12160 A flex grid sizer is a sizer which lays out its children in a
12161 two-dimensional table with all table cells in one row having the same
12162 height and all cells in one column having the same width, but all
12163 rows or all columns are not necessarily the same height or width as in
12164 the `wx.GridSizer`.
12165
12166 wx.FlexGridSizer can also size items equally in one direction but
12167 unequally ("flexibly") in the other. If the sizer is only flexible
12168 in one direction (this can be changed using `SetFlexibleDirection`), it
12169 needs to be decided how the sizer should grow in the other ("non
12170 flexible") direction in order to fill the available space. The
12171 `SetNonFlexibleGrowMode` method serves this purpose.
12172
12173
12174 """
12175 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
12176 __repr__ = _swig_repr
12177 def __init__(self, *args, **kwargs):
12178 """
12179 __init__(self, int rows=1, int cols=0, int vgap=0, int hgap=0) -> FlexGridSizer
12180
12181 Constructor for a wx.FlexGridSizer. *rows* and *cols* determine the
12182 number of columns and rows in the sizer - if either of the parameters
12183 is zero, it will be calculated to from the total number of children in
12184 the sizer, thus making the sizer grow dynamically. *vgap* and *hgap*
12185 define extra space between all children.
12186 """
12187 _core_.FlexGridSizer_swiginit(self,_core_.new_FlexGridSizer(*args, **kwargs))
12188 self._setOORInfo(self)
12189
12190 def AddGrowableRow(*args, **kwargs):
12191 """
12192 AddGrowableRow(self, size_t idx, int proportion=0)
12193
12194 Specifies that row *idx* (starting from zero) should be grown if there
12195 is extra space available to the sizer.
12196
12197 The *proportion* parameter has the same meaning as the stretch factor
12198 for the box sizers except that if all proportions are 0, then all
12199 columns are resized equally (instead of not being resized at all).
12200 """
12201 return _core_.FlexGridSizer_AddGrowableRow(*args, **kwargs)
12202
12203 def RemoveGrowableRow(*args, **kwargs):
12204 """
12205 RemoveGrowableRow(self, size_t idx)
12206
12207 Specifies that row *idx* is no longer growable.
12208 """
12209 return _core_.FlexGridSizer_RemoveGrowableRow(*args, **kwargs)
12210
12211 def AddGrowableCol(*args, **kwargs):
12212 """
12213 AddGrowableCol(self, size_t idx, int proportion=0)
12214
12215 Specifies that column *idx* (starting from zero) should be grown if
12216 there is extra space available to the sizer.
12217
12218 The *proportion* parameter has the same meaning as the stretch factor
12219 for the box sizers except that if all proportions are 0, then all
12220 columns are resized equally (instead of not being resized at all).
12221 """
12222 return _core_.FlexGridSizer_AddGrowableCol(*args, **kwargs)
12223
12224 def RemoveGrowableCol(*args, **kwargs):
12225 """
12226 RemoveGrowableCol(self, size_t idx)
12227
12228 Specifies that column *idx* is no longer growable.
12229 """
12230 return _core_.FlexGridSizer_RemoveGrowableCol(*args, **kwargs)
12231
12232 def SetFlexibleDirection(*args, **kwargs):
12233 """
12234 SetFlexibleDirection(self, int direction)
12235
12236 Specifies whether the sizer should flexibly resize its columns, rows,
12237 or both. Argument *direction* can be one of the following values. Any
12238 other value is ignored.
12239
12240 ============== =======================================
12241 wx.VERTICAL Rows are flexibly sized.
12242 wx.HORIZONTAL Columns are flexibly sized.
12243 wx.BOTH Both rows and columns are flexibly sized
12244 (this is the default value).
12245 ============== =======================================
12246
12247 Note that this method does not trigger relayout.
12248
12249 """
12250 return _core_.FlexGridSizer_SetFlexibleDirection(*args, **kwargs)
12251
12252 def GetFlexibleDirection(*args, **kwargs):
12253 """
12254 GetFlexibleDirection(self) -> int
12255
12256 Returns a value that specifies whether the sizer
12257 flexibly resizes its columns, rows, or both (default).
12258
12259 :see: `SetFlexibleDirection`
12260 """
12261 return _core_.FlexGridSizer_GetFlexibleDirection(*args, **kwargs)
12262
12263 def SetNonFlexibleGrowMode(*args, **kwargs):
12264 """
12265 SetNonFlexibleGrowMode(self, int mode)
12266
12267 Specifies how the sizer should grow in the non-flexible direction if
12268 there is one (so `SetFlexibleDirection` must have been called
12269 previously). Argument *mode* can be one of the following values:
12270
12271 ========================== =================================================
12272 wx.FLEX_GROWMODE_NONE Sizer doesn't grow in the non flexible direction.
12273 wx.FLEX_GROWMODE_SPECIFIED Sizer honors growable columns/rows set with
12274 `AddGrowableCol` and `AddGrowableRow`. In this
12275 case equal sizing applies to minimum sizes of
12276 columns or rows (this is the default value).
12277 wx.FLEX_GROWMODE_ALL Sizer equally stretches all columns or rows in
12278 the non flexible direction, whether they are
12279 growable or not in the flexbile direction.
12280 ========================== =================================================
12281
12282 Note that this method does not trigger relayout.
12283 """
12284 return _core_.FlexGridSizer_SetNonFlexibleGrowMode(*args, **kwargs)
12285
12286 def GetNonFlexibleGrowMode(*args, **kwargs):
12287 """
12288 GetNonFlexibleGrowMode(self) -> int
12289
12290 Returns the value that specifies how the sizer grows in the
12291 non-flexible direction if there is one.
12292
12293 :see: `SetNonFlexibleGrowMode`
12294 """
12295 return _core_.FlexGridSizer_GetNonFlexibleGrowMode(*args, **kwargs)
12296
12297 def GetRowHeights(*args, **kwargs):
12298 """
12299 GetRowHeights(self) -> list
12300
12301 Returns a list of integers representing the heights of each of the
12302 rows in the sizer.
12303 """
12304 return _core_.FlexGridSizer_GetRowHeights(*args, **kwargs)
12305
12306 def GetColWidths(*args, **kwargs):
12307 """
12308 GetColWidths(self) -> list
12309
12310 Returns a list of integers representing the widths of each of the
12311 columns in the sizer.
12312 """
12313 return _core_.FlexGridSizer_GetColWidths(*args, **kwargs)
12314
12315 ColWidths = property(GetColWidths,doc="See `GetColWidths`")
12316 FlexibleDirection = property(GetFlexibleDirection,SetFlexibleDirection,doc="See `GetFlexibleDirection` and `SetFlexibleDirection`")
12317 NonFlexibleGrowMode = property(GetNonFlexibleGrowMode,SetNonFlexibleGrowMode,doc="See `GetNonFlexibleGrowMode` and `SetNonFlexibleGrowMode`")
12318 RowHeights = property(GetRowHeights,doc="See `GetRowHeights`")
12319 _core_.FlexGridSizer_swigregister(FlexGridSizer)
12320
12321 class StdDialogButtonSizer(BoxSizer):
12322 """
12323 A special sizer that knows how to order and position standard buttons
12324 in order to conform to the current platform's standards. You simply
12325 need to add each `wx.Button` to the sizer, and be sure to create the
12326 buttons using the standard ID's. Then call `Realize` and the sizer
12327 will take care of the rest.
12328
12329 """
12330 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
12331 __repr__ = _swig_repr
12332 def __init__(self, *args, **kwargs):
12333 """__init__(self) -> StdDialogButtonSizer"""
12334 _core_.StdDialogButtonSizer_swiginit(self,_core_.new_StdDialogButtonSizer(*args, **kwargs))
12335 def AddButton(*args, **kwargs):
12336 """
12337 AddButton(self, wxButton button)
12338
12339 Use this to add the buttons to this sizer. Do not use the `Add`
12340 method in the base class.
12341 """
12342 return _core_.StdDialogButtonSizer_AddButton(*args, **kwargs)
12343
12344 def Realize(*args, **kwargs):
12345 """
12346 Realize(self)
12347
12348 This funciton needs to be called after all the buttons have been added
12349 to the sizer. It will reorder them and position them in a platform
12350 specifc manner.
12351 """
12352 return _core_.StdDialogButtonSizer_Realize(*args, **kwargs)
12353
12354 def SetAffirmativeButton(*args, **kwargs):
12355 """SetAffirmativeButton(self, wxButton button)"""
12356 return _core_.StdDialogButtonSizer_SetAffirmativeButton(*args, **kwargs)
12357
12358 def SetNegativeButton(*args, **kwargs):
12359 """SetNegativeButton(self, wxButton button)"""
12360 return _core_.StdDialogButtonSizer_SetNegativeButton(*args, **kwargs)
12361
12362 def SetCancelButton(*args, **kwargs):
12363 """SetCancelButton(self, wxButton button)"""
12364 return _core_.StdDialogButtonSizer_SetCancelButton(*args, **kwargs)
12365
12366 def GetAffirmativeButton(*args, **kwargs):
12367 """GetAffirmativeButton(self) -> wxButton"""
12368 return _core_.StdDialogButtonSizer_GetAffirmativeButton(*args, **kwargs)
12369
12370 def GetApplyButton(*args, **kwargs):
12371 """GetApplyButton(self) -> wxButton"""
12372 return _core_.StdDialogButtonSizer_GetApplyButton(*args, **kwargs)
12373
12374 def GetNegativeButton(*args, **kwargs):
12375 """GetNegativeButton(self) -> wxButton"""
12376 return _core_.StdDialogButtonSizer_GetNegativeButton(*args, **kwargs)
12377
12378 def GetCancelButton(*args, **kwargs):
12379 """GetCancelButton(self) -> wxButton"""
12380 return _core_.StdDialogButtonSizer_GetCancelButton(*args, **kwargs)
12381
12382 def GetHelpButton(*args, **kwargs):
12383 """GetHelpButton(self) -> wxButton"""
12384 return _core_.StdDialogButtonSizer_GetHelpButton(*args, **kwargs)
12385
12386 _core_.StdDialogButtonSizer_swigregister(StdDialogButtonSizer)
12387
12388 #---------------------------------------------------------------------------
12389
12390 class GBPosition(object):
12391 """
12392 This class represents the position of an item in a virtual grid of
12393 rows and columns managed by a `wx.GridBagSizer`. wxPython has
12394 typemaps that will automatically convert from a 2-element sequence of
12395 integers to a wx.GBPosition, so you can use the more pythonic
12396 representation of the position nearly transparently in Python code.
12397 """
12398 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
12399 __repr__ = _swig_repr
12400 def __init__(self, *args, **kwargs):
12401 """
12402 __init__(self, int row=0, int col=0) -> GBPosition
12403
12404 This class represents the position of an item in a virtual grid of
12405 rows and columns managed by a `wx.GridBagSizer`. wxPython has
12406 typemaps that will automatically convert from a 2-element sequence of
12407 integers to a wx.GBPosition, so you can use the more pythonic
12408 representation of the position nearly transparently in Python code.
12409 """
12410 _core_.GBPosition_swiginit(self,_core_.new_GBPosition(*args, **kwargs))
12411 __swig_destroy__ = _core_.delete_GBPosition
12412 __del__ = lambda self : None;
12413 def GetRow(*args, **kwargs):
12414 """GetRow(self) -> int"""
12415 return _core_.GBPosition_GetRow(*args, **kwargs)
12416
12417 def GetCol(*args, **kwargs):
12418 """GetCol(self) -> int"""
12419 return _core_.GBPosition_GetCol(*args, **kwargs)
12420
12421 def SetRow(*args, **kwargs):
12422 """SetRow(self, int row)"""
12423 return _core_.GBPosition_SetRow(*args, **kwargs)
12424
12425 def SetCol(*args, **kwargs):
12426 """SetCol(self, int col)"""
12427 return _core_.GBPosition_SetCol(*args, **kwargs)
12428
12429 def __eq__(*args, **kwargs):
12430 """
12431 __eq__(self, PyObject other) -> bool
12432
12433 Compare GBPosition for equality.
12434 """
12435 return _core_.GBPosition___eq__(*args, **kwargs)
12436
12437 def __ne__(*args, **kwargs):
12438 """
12439 __ne__(self, PyObject other) -> bool
12440
12441 Compare GBPosition for inequality.
12442 """
12443 return _core_.GBPosition___ne__(*args, **kwargs)
12444
12445 def Set(*args, **kwargs):
12446 """Set(self, int row=0, int col=0)"""
12447 return _core_.GBPosition_Set(*args, **kwargs)
12448
12449 def Get(*args, **kwargs):
12450 """Get(self) -> PyObject"""
12451 return _core_.GBPosition_Get(*args, **kwargs)
12452
12453 asTuple = wx._deprecated(Get, "asTuple is deprecated, use `Get` instead")
12454 def __str__(self): return str(self.Get())
12455 def __repr__(self): return 'wx.GBPosition'+str(self.Get())
12456 def __len__(self): return len(self.Get())
12457 def __getitem__(self, index): return self.Get()[index]
12458 def __setitem__(self, index, val):
12459 if index == 0: self.SetRow(val)
12460 elif index == 1: self.SetCol(val)
12461 else: raise IndexError
12462 def __nonzero__(self): return self.Get() != (0,0)
12463 __safe_for_unpickling__ = True
12464 def __reduce__(self): return (wx.GBPosition, self.Get())
12465
12466 row = property(GetRow, SetRow)
12467 col = property(GetCol, SetCol)
12468
12469 _core_.GBPosition_swigregister(GBPosition)
12470
12471 class GBSpan(object):
12472 """
12473 This class is used to hold the row and column spanning attributes of
12474 items in a `wx.GridBagSizer`. wxPython has typemaps that will
12475 automatically convert from a 2-element sequence of integers to a
12476 wx.GBSpan, so you can use the more pythonic representation of the span
12477 nearly transparently in Python code.
12478
12479 """
12480 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
12481 __repr__ = _swig_repr
12482 def __init__(self, *args, **kwargs):
12483 """
12484 __init__(self, int rowspan=1, int colspan=1) -> GBSpan
12485
12486 Construct a new wxGBSpan, optionally setting the rowspan and
12487 colspan. The default is (1,1). (Meaning that the item occupies one
12488 cell in each direction.
12489 """
12490 _core_.GBSpan_swiginit(self,_core_.new_GBSpan(*args, **kwargs))
12491 __swig_destroy__ = _core_.delete_GBSpan
12492 __del__ = lambda self : None;
12493 def GetRowspan(*args, **kwargs):
12494 """GetRowspan(self) -> int"""
12495 return _core_.GBSpan_GetRowspan(*args, **kwargs)
12496
12497 def GetColspan(*args, **kwargs):
12498 """GetColspan(self) -> int"""
12499 return _core_.GBSpan_GetColspan(*args, **kwargs)
12500
12501 def SetRowspan(*args, **kwargs):
12502 """SetRowspan(self, int rowspan)"""
12503 return _core_.GBSpan_SetRowspan(*args, **kwargs)
12504
12505 def SetColspan(*args, **kwargs):
12506 """SetColspan(self, int colspan)"""
12507 return _core_.GBSpan_SetColspan(*args, **kwargs)
12508
12509 def __eq__(*args, **kwargs):
12510 """
12511 __eq__(self, PyObject other) -> bool
12512
12513 Compare wxGBSpan for equality.
12514 """
12515 return _core_.GBSpan___eq__(*args, **kwargs)
12516
12517 def __ne__(*args, **kwargs):
12518 """
12519 __ne__(self, PyObject other) -> bool
12520
12521 Compare GBSpan for inequality.
12522 """
12523 return _core_.GBSpan___ne__(*args, **kwargs)
12524
12525 def Set(*args, **kwargs):
12526 """Set(self, int rowspan=1, int colspan=1)"""
12527 return _core_.GBSpan_Set(*args, **kwargs)
12528
12529 def Get(*args, **kwargs):
12530 """Get(self) -> PyObject"""
12531 return _core_.GBSpan_Get(*args, **kwargs)
12532
12533 asTuple = wx._deprecated(Get, "asTuple is deprecated, use `Get` instead")
12534 def __str__(self): return str(self.Get())
12535 def __repr__(self): return 'wx.GBSpan'+str(self.Get())
12536 def __len__(self): return len(self.Get())
12537 def __getitem__(self, index): return self.Get()[index]
12538 def __setitem__(self, index, val):
12539 if index == 0: self.SetRowspan(val)
12540 elif index == 1: self.SetColspan(val)
12541 else: raise IndexError
12542 def __nonzero__(self): return self.Get() != (0,0)
12543 __safe_for_unpickling__ = True
12544 def __reduce__(self): return (wx.GBSpan, self.Get())
12545
12546 rowspan = property(GetRowspan, SetRowspan)
12547 colspan = property(GetColspan, SetColspan)
12548
12549 _core_.GBSpan_swigregister(GBSpan)
12550
12551 class GBSizerItem(SizerItem):
12552 """
12553 The wx.GBSizerItem class is used to track the additional data about
12554 items in a `wx.GridBagSizer` such as the item's position in the grid
12555 and how many rows or columns it spans.
12556
12557 """
12558 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
12559 __repr__ = _swig_repr
12560 def __init__(self, *args, **kwargs):
12561 """
12562 __init__(self) -> GBSizerItem
12563
12564 Constructs an empty wx.GBSizerItem. Either a window, sizer or spacer
12565 size will need to be set, as well as a position and span before this
12566 item can be used in a Sizer.
12567
12568 You will probably never need to create a wx.GBSizerItem directly as they
12569 are created automatically when the sizer's Add method is called.
12570 """
12571 _core_.GBSizerItem_swiginit(self,_core_.new_GBSizerItem(*args, **kwargs))
12572 __swig_destroy__ = _core_.delete_GBSizerItem
12573 __del__ = lambda self : None;
12574 def GetPos(*args, **kwargs):
12575 """
12576 GetPos(self) -> GBPosition
12577
12578 Get the grid position of the item
12579 """
12580 return _core_.GBSizerItem_GetPos(*args, **kwargs)
12581
12582 def GetPosTuple(self): return self.GetPos().Get()
12583 def GetSpan(*args, **kwargs):
12584 """
12585 GetSpan(self) -> GBSpan
12586
12587 Get the row and column spanning of the item
12588 """
12589 return _core_.GBSizerItem_GetSpan(*args, **kwargs)
12590
12591 def GetSpanTuple(self): return self.GetSpan().Get()
12592 def SetPos(*args, **kwargs):
12593 """
12594 SetPos(self, GBPosition pos) -> bool
12595
12596 If the item is already a member of a sizer then first ensure that
12597 there is no other item that would intersect with this one at the new
12598 position, then set the new position. Returns True if the change is
12599 successful and after the next Layout() the item will be moved.
12600 """
12601 return _core_.GBSizerItem_SetPos(*args, **kwargs)
12602
12603 def SetSpan(*args, **kwargs):
12604 """
12605 SetSpan(self, GBSpan span) -> bool
12606
12607 If the item is already a member of a sizer then first ensure that
12608 there is no other item that would intersect with this one with its new
12609 spanning size, then set the new spanning. Returns True if the change
12610 is successful and after the next Layout() the item will be resized.
12611
12612 """
12613 return _core_.GBSizerItem_SetSpan(*args, **kwargs)
12614
12615 def Intersects(*args, **kwargs):
12616 """
12617 Intersects(self, GBSizerItem other) -> bool
12618
12619 Returns True if this item and the other item instersect.
12620 """
12621 return _core_.GBSizerItem_Intersects(*args, **kwargs)
12622
12623 def IntersectsPos(*args, **kwargs):
12624 """
12625 IntersectsPos(self, GBPosition pos, GBSpan span) -> bool
12626
12627 Returns True if the given pos/span would intersect with this item.
12628 """
12629 return _core_.GBSizerItem_IntersectsPos(*args, **kwargs)
12630
12631 def GetEndPos(*args, **kwargs):
12632 """
12633 GetEndPos(self) -> GBPosition
12634
12635 Get the row and column of the endpoint of this item.
12636 """
12637 return _core_.GBSizerItem_GetEndPos(*args, **kwargs)
12638
12639 def GetGBSizer(*args, **kwargs):
12640 """
12641 GetGBSizer(self) -> GridBagSizer
12642
12643 Get the sizer this item is a member of.
12644 """
12645 return _core_.GBSizerItem_GetGBSizer(*args, **kwargs)
12646
12647 def SetGBSizer(*args, **kwargs):
12648 """
12649 SetGBSizer(self, GridBagSizer sizer)
12650
12651 Set the sizer this item is a member of.
12652 """
12653 return _core_.GBSizerItem_SetGBSizer(*args, **kwargs)
12654
12655 EndPos = property(GetEndPos,doc="See `GetEndPos`")
12656 GBSizer = property(GetGBSizer,SetGBSizer,doc="See `GetGBSizer` and `SetGBSizer`")
12657 Pos = property(GetPos,SetPos,doc="See `GetPos` and `SetPos`")
12658 Span = property(GetSpan,SetSpan,doc="See `GetSpan` and `SetSpan`")
12659 _core_.GBSizerItem_swigregister(GBSizerItem)
12660 DefaultSpan = cvar.DefaultSpan
12661
12662 def GBSizerItemWindow(*args, **kwargs):
12663 """
12664 GBSizerItemWindow(Window window, GBPosition pos, GBSpan span, int flag,
12665 int border, PyObject userData=None) -> GBSizerItem
12666
12667 Construct a `wx.GBSizerItem` for a window.
12668 """
12669 val = _core_.new_GBSizerItemWindow(*args, **kwargs)
12670 return val
12671
12672 def GBSizerItemSizer(*args, **kwargs):
12673 """
12674 GBSizerItemSizer(Sizer sizer, GBPosition pos, GBSpan span, int flag,
12675 int border, PyObject userData=None) -> GBSizerItem
12676
12677 Construct a `wx.GBSizerItem` for a sizer
12678 """
12679 val = _core_.new_GBSizerItemSizer(*args, **kwargs)
12680 return val
12681
12682 def GBSizerItemSpacer(*args, **kwargs):
12683 """
12684 GBSizerItemSpacer(int width, int height, GBPosition pos, GBSpan span,
12685 int flag, int border, PyObject userData=None) -> GBSizerItem
12686
12687 Construct a `wx.GBSizerItem` for a spacer.
12688 """
12689 val = _core_.new_GBSizerItemSpacer(*args, **kwargs)
12690 return val
12691
12692 class GridBagSizer(FlexGridSizer):
12693 """
12694 A `wx.Sizer` that can lay out items in a virtual grid like a
12695 `wx.FlexGridSizer` but in this case explicit positioning of the items
12696 is allowed using `wx.GBPosition`, and items can optionally span more
12697 than one row and/or column using `wx.GBSpan`. The total size of the
12698 virtual grid is determined by the largest row and column that items are
12699 positioned at, adjusted for spanning.
12700
12701 """
12702 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
12703 __repr__ = _swig_repr
12704 def __init__(self, *args, **kwargs):
12705 """
12706 __init__(self, int vgap=0, int hgap=0) -> GridBagSizer
12707
12708 Constructor, with optional parameters to specify the gap between the
12709 rows and columns.
12710 """
12711 _core_.GridBagSizer_swiginit(self,_core_.new_GridBagSizer(*args, **kwargs))
12712 self._setOORInfo(self)
12713
12714 def Add(*args, **kwargs):
12715 """
12716 Add(self, item, GBPosition pos, GBSpan span=DefaultSpan, int flag=0,
12717 int border=0, userData=None) -> wx.GBSizerItem
12718
12719 Adds an item to the sizer at the grid cell *pos*, optionally spanning
12720 more than one row or column as specified with *span*. The remaining
12721 args behave similarly to `wx.Sizer.Add`.
12722
12723 Returns True if the item was successfully placed at the given cell
12724 position, False if something was already there.
12725
12726 """
12727 return _core_.GridBagSizer_Add(*args, **kwargs)
12728
12729 def AddItem(*args, **kwargs):
12730 """
12731 Add(self, GBSizerItem item) -> wx.GBSizerItem
12732
12733 Add an item to the sizer using a `wx.GBSizerItem`. Returns True if
12734 the item was successfully placed at its given cell position, False if
12735 something was already there.
12736 """
12737 return _core_.GridBagSizer_AddItem(*args, **kwargs)
12738
12739 def GetCellSize(*args, **kwargs):
12740 """
12741 GetCellSize(self, int row, int col) -> Size
12742
12743 Get the size of the specified cell, including hgap and
12744 vgap. Only valid after a Layout.
12745 """
12746 return _core_.GridBagSizer_GetCellSize(*args, **kwargs)
12747
12748 def GetEmptyCellSize(*args, **kwargs):
12749 """
12750 GetEmptyCellSize(self) -> Size
12751
12752 Get the size used for cells in the grid with no item.
12753 """
12754 return _core_.GridBagSizer_GetEmptyCellSize(*args, **kwargs)
12755
12756 def SetEmptyCellSize(*args, **kwargs):
12757 """
12758 SetEmptyCellSize(self, Size sz)
12759
12760 Set the size used for cells in the grid with no item.
12761 """
12762 return _core_.GridBagSizer_SetEmptyCellSize(*args, **kwargs)
12763
12764 def GetItemPosition(*args):
12765 """
12766 GetItemPosition(self, item) -> GBPosition
12767
12768 Get the grid position of the specified *item* where *item* is either a
12769 window or subsizer that is a member of this sizer, or a zero-based
12770 index of an item.
12771 """
12772 return _core_.GridBagSizer_GetItemPosition(*args)
12773
12774 def SetItemPosition(*args):
12775 """
12776 SetItemPosition(self, item, GBPosition pos) -> bool
12777
12778 Set the grid position of the specified *item* where *item* is either a
12779 window or subsizer that is a member of this sizer, or a zero-based
12780 index of an item. Returns True on success. If the move is not
12781 allowed (because an item is already there) then False is returned.
12782
12783 """
12784 return _core_.GridBagSizer_SetItemPosition(*args)
12785
12786 def GetItemSpan(*args):
12787 """
12788 GetItemSpan(self, item) -> GBSpan
12789
12790 Get the row/col spanning of the specified *item* where *item* is
12791 either a window or subsizer that is a member of this sizer, or a
12792 zero-based index of an item.
12793 """
12794 return _core_.GridBagSizer_GetItemSpan(*args)
12795
12796 def SetItemSpan(*args):
12797 """
12798 SetItemSpan(self, item, GBSpan span) -> bool
12799
12800 Set the row/col spanning of the specified *item* where *item* is
12801 either a window or subsizer that is a member of this sizer, or a
12802 zero-based index of an item. Returns True on success. If the move is
12803 not allowed (because an item is already there) then False is returned.
12804 """
12805 return _core_.GridBagSizer_SetItemSpan(*args)
12806
12807 def FindItem(*args):
12808 """
12809 FindItem(self, item) -> GBSizerItem
12810
12811 Find the sizer item for the given window or subsizer, returns None if
12812 not found. (non-recursive)
12813 """
12814 return _core_.GridBagSizer_FindItem(*args)
12815
12816 def FindItemAtPosition(*args, **kwargs):
12817 """
12818 FindItemAtPosition(self, GBPosition pos) -> GBSizerItem
12819
12820 Return the sizer item for the given grid cell, or None if there is no
12821 item at that position. (non-recursive)
12822 """
12823 return _core_.GridBagSizer_FindItemAtPosition(*args, **kwargs)
12824
12825 def FindItemAtPoint(*args, **kwargs):
12826 """
12827 FindItemAtPoint(self, Point pt) -> GBSizerItem
12828
12829 Return the sizer item located at the point given in *pt*, or None if
12830 there is no item at that point. The (x,y) coordinates in pt correspond
12831 to the client coordinates of the window using the sizer for
12832 layout. (non-recursive)
12833 """
12834 return _core_.GridBagSizer_FindItemAtPoint(*args, **kwargs)
12835
12836 def CheckForIntersection(*args, **kwargs):
12837 """
12838 CheckForIntersection(self, GBSizerItem item, GBSizerItem excludeItem=None) -> bool
12839
12840 Look at all items and see if any intersect (or would overlap) the
12841 given *item*. Returns True if so, False if there would be no overlap.
12842 If an *excludeItem* is given then it will not be checked for
12843 intersection, for example it may be the item we are checking the
12844 position of.
12845
12846 """
12847 return _core_.GridBagSizer_CheckForIntersection(*args, **kwargs)
12848
12849 def CheckForIntersectionPos(*args, **kwargs):
12850 """
12851 CheckForIntersectionPos(self, GBPosition pos, GBSpan span, GBSizerItem excludeItem=None) -> bool
12852
12853 Look at all items and see if any intersect (or would overlap) the
12854 given position and span. Returns True if so, False if there would be
12855 no overlap. If an *excludeItem* is given then it will not be checked
12856 for intersection, for example it may be the item we are checking the
12857 position of.
12858 """
12859 return _core_.GridBagSizer_CheckForIntersectionPos(*args, **kwargs)
12860
12861 _core_.GridBagSizer_swigregister(GridBagSizer)
12862
12863 #---------------------------------------------------------------------------
12864
12865 Left = _core_.Left
12866 Top = _core_.Top
12867 Right = _core_.Right
12868 Bottom = _core_.Bottom
12869 Width = _core_.Width
12870 Height = _core_.Height
12871 Centre = _core_.Centre
12872 Center = _core_.Center
12873 CentreX = _core_.CentreX
12874 CentreY = _core_.CentreY
12875 Unconstrained = _core_.Unconstrained
12876 AsIs = _core_.AsIs
12877 PercentOf = _core_.PercentOf
12878 Above = _core_.Above
12879 Below = _core_.Below
12880 LeftOf = _core_.LeftOf
12881 RightOf = _core_.RightOf
12882 SameAs = _core_.SameAs
12883 Absolute = _core_.Absolute
12884 class IndividualLayoutConstraint(Object):
12885 """
12886 Objects of this class are stored in the `wx.LayoutConstraints` class as
12887 one of eight possible constraints that a window can be involved in.
12888 You will never need to create an instance of
12889 wx.IndividualLayoutConstraint, rather you should create a
12890 `wx.LayoutConstraints` instance and use the individual contstraints
12891 that it contains.
12892 """
12893 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
12894 def __init__(self): raise AttributeError, "No constructor defined"
12895 __repr__ = _swig_repr
12896 def Set(*args, **kwargs):
12897 """
12898 Set(self, int rel, Window otherW, int otherE, int val=0, int marg=wxLAYOUT_DEFAULT_MARGIN)
12899
12900 Sets the properties of the constraint. Normally called by one of the
12901 convenience functions such as Above, RightOf, SameAs.
12902 """
12903 return _core_.IndividualLayoutConstraint_Set(*args, **kwargs)
12904
12905 def LeftOf(*args, **kwargs):
12906 """
12907 LeftOf(self, Window sibling, int marg=0)
12908
12909 Constrains this edge to be to the left of the given window, with an
12910 optional margin. Implicitly, this is relative to the left edge of the
12911 other window.
12912 """
12913 return _core_.IndividualLayoutConstraint_LeftOf(*args, **kwargs)
12914
12915 def RightOf(*args, **kwargs):
12916 """
12917 RightOf(self, Window sibling, int marg=0)
12918
12919 Constrains this edge to be to the right of the given window, with an
12920 optional margin. Implicitly, this is relative to the right edge of the
12921 other window.
12922 """
12923 return _core_.IndividualLayoutConstraint_RightOf(*args, **kwargs)
12924
12925 def Above(*args, **kwargs):
12926 """
12927 Above(self, Window sibling, int marg=0)
12928
12929 Constrains this edge to be above the given window, with an optional
12930 margin. Implicitly, this is relative to the top edge of the other
12931 window.
12932 """
12933 return _core_.IndividualLayoutConstraint_Above(*args, **kwargs)
12934
12935 def Below(*args, **kwargs):
12936 """
12937 Below(self, Window sibling, int marg=0)
12938
12939 Constrains this edge to be below the given window, with an optional
12940 margin. Implicitly, this is relative to the bottom edge of the other
12941 window.
12942 """
12943 return _core_.IndividualLayoutConstraint_Below(*args, **kwargs)
12944
12945 def SameAs(*args, **kwargs):
12946 """
12947 SameAs(self, Window otherW, int edge, int marg=0)
12948
12949 Constrains this edge or dimension to be to the same as the edge of the
12950 given window, with an optional margin.
12951 """
12952 return _core_.IndividualLayoutConstraint_SameAs(*args, **kwargs)
12953
12954 def PercentOf(*args, **kwargs):
12955 """
12956 PercentOf(self, Window otherW, int wh, int per)
12957
12958 Constrains this edge or dimension to be to a percentage of the given
12959 window, with an optional margin.
12960 """
12961 return _core_.IndividualLayoutConstraint_PercentOf(*args, **kwargs)
12962
12963 def Absolute(*args, **kwargs):
12964 """
12965 Absolute(self, int val)
12966
12967 Constrains this edge or dimension to be the given absolute value.
12968 """
12969 return _core_.IndividualLayoutConstraint_Absolute(*args, **kwargs)
12970
12971 def Unconstrained(*args, **kwargs):
12972 """
12973 Unconstrained(self)
12974
12975 Sets this edge or dimension to be unconstrained, that is, dependent on
12976 other edges and dimensions from which this value can be deduced.
12977 """
12978 return _core_.IndividualLayoutConstraint_Unconstrained(*args, **kwargs)
12979
12980 def AsIs(*args, **kwargs):
12981 """
12982 AsIs(self)
12983
12984 Sets this edge or constraint to be whatever the window's value is at
12985 the moment. If either of the width and height constraints are *as is*,
12986 the window will not be resized, but moved instead. This is important
12987 when considering panel items which are intended to have a default
12988 size, such as a button, which may take its size from the size of the
12989 button label.
12990 """
12991 return _core_.IndividualLayoutConstraint_AsIs(*args, **kwargs)
12992
12993 def GetOtherWindow(*args, **kwargs):
12994 """GetOtherWindow(self) -> Window"""
12995 return _core_.IndividualLayoutConstraint_GetOtherWindow(*args, **kwargs)
12996
12997 def GetMyEdge(*args, **kwargs):
12998 """GetMyEdge(self) -> int"""
12999 return _core_.IndividualLayoutConstraint_GetMyEdge(*args, **kwargs)
13000
13001 def SetEdge(*args, **kwargs):
13002 """SetEdge(self, int which)"""
13003 return _core_.IndividualLayoutConstraint_SetEdge(*args, **kwargs)
13004
13005 def SetValue(*args, **kwargs):
13006 """SetValue(self, int v)"""
13007 return _core_.IndividualLayoutConstraint_SetValue(*args, **kwargs)
13008
13009 def GetMargin(*args, **kwargs):
13010 """GetMargin(self) -> int"""
13011 return _core_.IndividualLayoutConstraint_GetMargin(*args, **kwargs)
13012
13013 def SetMargin(*args, **kwargs):
13014 """SetMargin(self, int m)"""
13015 return _core_.IndividualLayoutConstraint_SetMargin(*args, **kwargs)
13016
13017 def GetValue(*args, **kwargs):
13018 """GetValue(self) -> int"""
13019 return _core_.IndividualLayoutConstraint_GetValue(*args, **kwargs)
13020
13021 def GetPercent(*args, **kwargs):
13022 """GetPercent(self) -> int"""
13023 return _core_.IndividualLayoutConstraint_GetPercent(*args, **kwargs)
13024
13025 def GetOtherEdge(*args, **kwargs):
13026 """GetOtherEdge(self) -> int"""
13027 return _core_.IndividualLayoutConstraint_GetOtherEdge(*args, **kwargs)
13028
13029 def GetDone(*args, **kwargs):
13030 """GetDone(self) -> bool"""
13031 return _core_.IndividualLayoutConstraint_GetDone(*args, **kwargs)
13032
13033 def SetDone(*args, **kwargs):
13034 """SetDone(self, bool d)"""
13035 return _core_.IndividualLayoutConstraint_SetDone(*args, **kwargs)
13036
13037 def GetRelationship(*args, **kwargs):
13038 """GetRelationship(self) -> int"""
13039 return _core_.IndividualLayoutConstraint_GetRelationship(*args, **kwargs)
13040
13041 def SetRelationship(*args, **kwargs):
13042 """SetRelationship(self, int r)"""
13043 return _core_.IndividualLayoutConstraint_SetRelationship(*args, **kwargs)
13044
13045 def ResetIfWin(*args, **kwargs):
13046 """
13047 ResetIfWin(self, Window otherW) -> bool
13048
13049 Reset constraint if it mentions otherWin
13050 """
13051 return _core_.IndividualLayoutConstraint_ResetIfWin(*args, **kwargs)
13052
13053 def SatisfyConstraint(*args, **kwargs):
13054 """
13055 SatisfyConstraint(self, LayoutConstraints constraints, Window win) -> bool
13056
13057 Try to satisfy constraint
13058 """
13059 return _core_.IndividualLayoutConstraint_SatisfyConstraint(*args, **kwargs)
13060
13061 def GetEdge(*args, **kwargs):
13062 """
13063 GetEdge(self, int which, Window thisWin, Window other) -> int
13064
13065 Get the value of this edge or dimension, or if this
13066 is not determinable, -1.
13067 """
13068 return _core_.IndividualLayoutConstraint_GetEdge(*args, **kwargs)
13069
13070 Done = property(GetDone,SetDone,doc="See `GetDone` and `SetDone`")
13071 Margin = property(GetMargin,SetMargin,doc="See `GetMargin` and `SetMargin`")
13072 MyEdge = property(GetMyEdge,doc="See `GetMyEdge`")
13073 OtherEdge = property(GetOtherEdge,doc="See `GetOtherEdge`")
13074 OtherWindow = property(GetOtherWindow,doc="See `GetOtherWindow`")
13075 Percent = property(GetPercent,doc="See `GetPercent`")
13076 Relationship = property(GetRelationship,SetRelationship,doc="See `GetRelationship` and `SetRelationship`")
13077 Value = property(GetValue,SetValue,doc="See `GetValue` and `SetValue`")
13078 _core_.IndividualLayoutConstraint_swigregister(IndividualLayoutConstraint)
13079
13080 class LayoutConstraints(Object):
13081 """
13082 **Note:** constraints are now deprecated and you should use sizers
13083 instead.
13084
13085 Objects of this class can be associated with a window to define its
13086 layout constraints, with respect to siblings or its parent.
13087
13088 The class consists of the following eight constraints of class
13089 wx.IndividualLayoutConstraint, some or all of which should be accessed
13090 directly to set the appropriate constraints.
13091
13092 * left: represents the left hand edge of the window
13093 * right: represents the right hand edge of the window
13094 * top: represents the top edge of the window
13095 * bottom: represents the bottom edge of the window
13096 * width: represents the width of the window
13097 * height: represents the height of the window
13098 * centreX: represents the horizontal centre point of the window
13099 * centreY: represents the vertical centre point of the window
13100
13101 Most constraints are initially set to have the relationship
13102 wxUnconstrained, which means that their values should be calculated by
13103 looking at known constraints. The exceptions are width and height,
13104 which are set to wxAsIs to ensure that if the user does not specify a
13105 constraint, the existing width and height will be used, to be
13106 compatible with panel items which often have take a default size. If
13107 the constraint is ``wx.AsIs``, the dimension will not be changed.
13108
13109 :see: `wx.IndividualLayoutConstraint`, `wx.Window.SetConstraints`
13110
13111 """
13112 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag')
13113 __repr__ = _swig_repr
13114 left = property(_core_.LayoutConstraints_left_get)
13115 top = property(_core_.LayoutConstraints_top_get)
13116 right = property(_core_.LayoutConstraints_right_get)
13117 bottom = property(_core_.LayoutConstraints_bottom_get)
13118 width = property(_core_.LayoutConstraints_width_get)
13119 height = property(_core_.LayoutConstraints_height_get)
13120 centreX = property(_core_.LayoutConstraints_centreX_get)
13121 centreY = property(_core_.LayoutConstraints_centreY_get)
13122 def __init__(self, *args, **kwargs):
13123 """__init__(self) -> LayoutConstraints"""
13124 _core_.LayoutConstraints_swiginit(self,_core_.new_LayoutConstraints(*args, **kwargs))
13125 __swig_destroy__ = _core_.delete_LayoutConstraints
13126 __del__ = lambda self : None;
13127 def SatisfyConstraints(*args, **kwargs):
13128 """SatisfyConstraints(Window win) -> (areSatisfied, noChanges)"""
13129 return _core_.LayoutConstraints_SatisfyConstraints(*args, **kwargs)
13130
13131 def AreSatisfied(*args, **kwargs):
13132 """AreSatisfied(self) -> bool"""
13133 return _core_.LayoutConstraints_AreSatisfied(*args, **kwargs)
13134
13135 _core_.LayoutConstraints_swigregister(LayoutConstraints)
13136
13137 #----------------------------------------------------------------------------
13138
13139 # Use Python's bool constants if available, make some if not
13140 try:
13141 True
13142 except NameError:
13143 __builtins__.True = 1==1
13144 __builtins__.False = 1==0
13145 def bool(value): return not not value
13146 __builtins__.bool = bool
13147
13148
13149
13150 # workarounds for bad wxRTTI names
13151 __wxPyPtrTypeMap['wxGauge95'] = 'wxGauge'
13152 __wxPyPtrTypeMap['wxSlider95'] = 'wxSlider'
13153 __wxPyPtrTypeMap['wxStatusBar95'] = 'wxStatusBar'
13154
13155
13156 #----------------------------------------------------------------------------
13157 # Load version numbers from __version__... Ensure that major and minor
13158 # versions are the same for both wxPython and wxWidgets.
13159
13160 from __version__ import *
13161 __version__ = VERSION_STRING
13162
13163 assert MAJOR_VERSION == _core_.MAJOR_VERSION, "wxPython/wxWidgets version mismatch"
13164 assert MINOR_VERSION == _core_.MINOR_VERSION, "wxPython/wxWidgets version mismatch"
13165 if RELEASE_VERSION != _core_.RELEASE_VERSION:
13166 import warnings
13167 warnings.warn("wxPython/wxWidgets release number mismatch")
13168
13169 #----------------------------------------------------------------------------
13170
13171 # Set wxPython's default string<-->unicode conversion encoding from
13172 # the locale, but only if Python's default hasn't been changed. (We
13173 # assume that if the user has customized it already then that is the
13174 # encoding we need to use as well.)
13175 #
13176 # The encoding selected here is used when string or unicode objects
13177 # need to be converted in order to pass them to wxWidgets. Please be
13178 # aware that the default encoding within the same locale may be
13179 # slightly different on different platforms. For example, please see
13180 # http://www.alanwood.net/demos/charsetdiffs.html for differences
13181 # between the common latin/roman encodings.
13182
13183 default = _sys.getdefaultencoding()
13184 if default == 'ascii':
13185 import locale
13186 import codecs
13187 try:
13188 default = locale.getdefaultlocale()[1]
13189 codecs.lookup(default)
13190 except (ValueError, LookupError, TypeError):
13191 default = _sys.getdefaultencoding()
13192 del locale
13193 del codecs
13194 if default:
13195 wx.SetDefaultPyEncoding(default)
13196 del default
13197
13198 #----------------------------------------------------------------------------
13199
13200 class PyDeadObjectError(AttributeError):
13201 pass
13202
13203 class _wxPyDeadObject(object):
13204 """
13205 Instances of wx objects that are OOR capable will have their __class__
13206 changed to this class when the C++ object is deleted. This should help
13207 prevent crashes due to referencing a bogus C++ pointer.
13208 """
13209 reprStr = "wxPython wrapper for DELETED %s object! (The C++ object no longer exists.)"
13210 attrStr = "The C++ part of the %s object has been deleted, attribute access no longer allowed."
13211
13212 def __repr__(self):
13213 if not hasattr(self, "_name"):
13214 self._name = "[unknown]"
13215 return self.reprStr % self._name
13216
13217 def __getattr__(self, *args):
13218 if not hasattr(self, "_name"):
13219 self._name = "[unknown]"
13220 raise PyDeadObjectError(self.attrStr % self._name)
13221
13222 def __nonzero__(self):
13223 return 0
13224
13225
13226
13227 class PyUnbornObjectError(AttributeError):
13228 pass
13229
13230 class _wxPyUnbornObject(object):
13231 """
13232 Some stock objects are created when the wx._core module is
13233 imported, but their C++ instance is not created until the wx.App
13234 object is created and initialized. These object instances will
13235 temporarily have their __class__ changed to this class so an
13236 exception will be raised if they are used before the C++ instance
13237 is ready.
13238 """
13239
13240 reprStr = "wxPython wrapper for UNBORN object! (The C++ object is not initialized yet.)"
13241 attrStr = "The C++ part of this object has not been initialized, attribute access not allowed."
13242
13243 def __repr__(self):
13244 #if not hasattr(self, "_name"):
13245 # self._name = "[unknown]"
13246 return self.reprStr #% self._name
13247
13248 def __getattr__(self, *args):
13249 #if not hasattr(self, "_name"):
13250 # self._name = "[unknown]"
13251 raise PyUnbornObjectError(self.attrStr) # % self._name )
13252
13253 def __nonzero__(self):
13254 return 0
13255
13256
13257 #----------------------------------------------------------------------------
13258
13259 def CallAfter(callable, *args, **kw):
13260 """
13261 Call the specified function after the current and pending event
13262 handlers have been completed. This is also good for making GUI
13263 method calls from non-GUI threads. Any extra positional or
13264 keyword args are passed on to the callable when it is called.
13265
13266 :see: `wx.FutureCall`
13267 """
13268 app = wx.GetApp()
13269 assert app is not None, 'No wx.App created yet'
13270
13271 if not hasattr(app, "_CallAfterId"):
13272 app._CallAfterId = wx.NewEventType()
13273 app.Connect(-1, -1, app._CallAfterId,
13274 lambda event: event.callable(*event.args, **event.kw) )
13275 evt = wx.PyEvent()
13276 evt.SetEventType(app._CallAfterId)
13277 evt.callable = callable
13278 evt.args = args
13279 evt.kw = kw
13280 wx.PostEvent(app, evt)
13281
13282 #----------------------------------------------------------------------------
13283
13284
13285 class FutureCall:
13286 """
13287 A convenience class for `wx.Timer`, that calls the given callable
13288 object once after the given amount of milliseconds, passing any
13289 positional or keyword args. The return value of the callable is
13290 availbale after it has been run with the `GetResult` method.
13291
13292 If you don't need to get the return value or restart the timer
13293 then there is no need to hold a reference to this object. It will
13294 hold a reference to itself while the timer is running (the timer
13295 has a reference to self.Notify) but the cycle will be broken when
13296 the timer completes, automatically cleaning up the wx.FutureCall
13297 object.
13298
13299 :see: `wx.CallAfter`
13300 """
13301 def __init__(self, millis, callable, *args, **kwargs):
13302 self.millis = millis
13303 self.callable = callable
13304 self.SetArgs(*args, **kwargs)
13305 self.runCount = 0
13306 self.running = False
13307 self.hasRun = False
13308 self.result = None
13309 self.timer = None
13310 self.Start()
13311
13312 def __del__(self):
13313 self.Stop()
13314
13315
13316 def Start(self, millis=None, *args, **kwargs):
13317 """
13318 (Re)start the timer
13319 """
13320 self.hasRun = False
13321 if millis is not None:
13322 self.millis = millis
13323 if args or kwargs:
13324 self.SetArgs(*args, **kwargs)
13325 self.Stop()
13326 self.timer = wx.PyTimer(self.Notify)
13327 self.timer.Start(self.millis, wx.TIMER_ONE_SHOT)
13328 self.running = True
13329 Restart = Start
13330
13331
13332 def Stop(self):
13333 """
13334 Stop and destroy the timer.
13335 """
13336 if self.timer is not None:
13337 self.timer.Stop()
13338 self.timer = None
13339
13340
13341 def GetInterval(self):
13342 if self.timer is not None:
13343 return self.timer.GetInterval()
13344 else:
13345 return 0
13346
13347
13348 def IsRunning(self):
13349 return self.timer is not None and self.timer.IsRunning()
13350
13351
13352 def SetArgs(self, *args, **kwargs):
13353 """
13354 (Re)set the args passed to the callable object. This is
13355 useful in conjunction with Restart if you want to schedule a
13356 new call to the same callable object but with different
13357 parameters.
13358 """
13359 self.args = args
13360 self.kwargs = kwargs
13361
13362
13363 def HasRun(self):
13364 return self.hasRun
13365
13366 def GetResult(self):
13367 return self.result
13368
13369 def Notify(self):
13370 """
13371 The timer has expired so call the callable.
13372 """
13373 if self.callable and getattr(self.callable, 'im_self', True):
13374 self.runCount += 1
13375 self.running = False
13376 self.result = self.callable(*self.args, **self.kwargs)
13377 self.hasRun = True
13378 if not self.running:
13379 # if it wasn't restarted, then cleanup
13380 wx.CallAfter(self.Stop)
13381
13382 Interval = property(GetInterval)
13383 Result = property(GetResult)
13384
13385
13386 #----------------------------------------------------------------------------
13387 # Control which items in this module should be documented by epydoc.
13388 # We allow only classes and functions, which will help reduce the size
13389 # of the docs by filtering out the zillions of constants, EVT objects,
13390 # and etc that don't make much sense by themselves, but are instead
13391 # documented (or will be) as part of the classes/functions/methods
13392 # where they should be used.
13393
13394 class __DocFilter:
13395 """
13396 A filter for epydoc that only allows non-Ptr classes and
13397 functions, in order to reduce the clutter in the API docs.
13398 """
13399 def __init__(self, globals):
13400 self._globals = globals
13401
13402 def __call__(self, name):
13403 import types
13404 obj = self._globals.get(name, None)
13405
13406 # only document classes and function
13407 if type(obj) not in [type, types.ClassType, types.FunctionType, types.BuiltinFunctionType]:
13408 return False
13409
13410 # skip other things that are private or will be documented as part of somethign else
13411 if name.startswith('_') or name.startswith('EVT') or name.endswith('_swigregister') or name.endswith('Ptr') :
13412 return False
13413
13414 # skip functions that are duplicates of static functions in a class
13415 if name.find('_') != -1:
13416 cls = self._globals.get(name.split('_')[0], None)
13417 methname = name.split('_')[1]
13418 if hasattr(cls, methname) and type(getattr(cls, methname)) is types.FunctionType:
13419 return False
13420
13421 return True
13422
13423 #----------------------------------------------------------------------------
13424 #----------------------------------------------------------------------------
13425
13426 # Import other modules in this package that should show up in the
13427 # "core" wx namespace
13428 from _gdi import *
13429 from _windows import *
13430 from _controls import *
13431 from _misc import *
13432
13433 #----------------------------------------------------------------------------
13434 #----------------------------------------------------------------------------
13435
13436
13437