]> git.saurik.com Git - wxWidgets.git/blob - wxPython/src/mac/_core.py
return name and extension by const ref, not by value, to prevent bugs as the one...
[wxWidgets.git] / wxPython / src / mac / _core.py
1 # This file was created automatically by SWIG.
2 # Don't modify this file, modify the SWIG interface instead.
3
4 import _core_
5
6 def _swig_setattr_nondynamic(self,class_type,name,value,static=1):
7 if (name == "this"):
8 if isinstance(value, class_type):
9 self.__dict__[name] = value.this
10 if hasattr(value,"thisown"): self.__dict__["thisown"] = value.thisown
11 del value.thisown
12 return
13 method = class_type.__swig_setmethods__.get(name,None)
14 if method: return method(self,value)
15 if (not static) or hasattr(self,name) or (name == "thisown"):
16 self.__dict__[name] = value
17 else:
18 raise AttributeError("You cannot add attributes to %s" % self)
19
20 def _swig_setattr(self,class_type,name,value):
21 return _swig_setattr_nondynamic(self,class_type,name,value,0)
22
23 def _swig_getattr(self,class_type,name):
24 method = class_type.__swig_getmethods__.get(name,None)
25 if method: return method(self)
26 raise AttributeError,name
27
28 import types
29 try:
30 _object = types.ObjectType
31 _newclass = 1
32 except AttributeError:
33 class _object : pass
34 _newclass = 0
35 del types
36
37
38 def _swig_setattr_nondynamic_method(set):
39 def set_attr(self,name,value):
40 if hasattr(self,name) or (name in ("this", "thisown")):
41 set(self,name,value)
42 else:
43 raise AttributeError("You cannot add attributes to %s" % self)
44 return set_attr
45
46
47 #// Give a reference to the dictionary of this module to the C++ extension
48 #// code.
49 _core_._wxPySetDictionary(vars())
50
51 #// A little trick to make 'wx' be a reference to this module so wx.Names can
52 #// be used here.
53 import sys as _sys
54 wx = _sys.modules[__name__]
55
56
57 #----------------------------------------------------------------------------
58
59 def _deprecated(callable, msg=None):
60 """
61 Create a wrapper function that will raise a DeprecationWarning
62 before calling the callable.
63 """
64 if msg is None:
65 msg = "%s is deprecated" % callable
66 def deprecatedWrapper(*args, **kwargs):
67 import warnings
68 warnings.warn(msg, DeprecationWarning, stacklevel=2)
69 return callable(*args, **kwargs)
70 deprecatedWrapper.__doc__ = msg
71 return deprecatedWrapper
72
73
74 #----------------------------------------------------------------------------
75
76 NOT_FOUND = _core_.NOT_FOUND
77 VSCROLL = _core_.VSCROLL
78 HSCROLL = _core_.HSCROLL
79 CAPTION = _core_.CAPTION
80 DOUBLE_BORDER = _core_.DOUBLE_BORDER
81 SUNKEN_BORDER = _core_.SUNKEN_BORDER
82 RAISED_BORDER = _core_.RAISED_BORDER
83 BORDER = _core_.BORDER
84 SIMPLE_BORDER = _core_.SIMPLE_BORDER
85 STATIC_BORDER = _core_.STATIC_BORDER
86 TRANSPARENT_WINDOW = _core_.TRANSPARENT_WINDOW
87 NO_BORDER = _core_.NO_BORDER
88 TAB_TRAVERSAL = _core_.TAB_TRAVERSAL
89 WANTS_CHARS = _core_.WANTS_CHARS
90 POPUP_WINDOW = _core_.POPUP_WINDOW
91 CENTER_FRAME = _core_.CENTER_FRAME
92 CENTRE_ON_SCREEN = _core_.CENTRE_ON_SCREEN
93 CENTER_ON_SCREEN = _core_.CENTER_ON_SCREEN
94 ED_CLIENT_MARGIN = _core_.ED_CLIENT_MARGIN
95 ED_BUTTONS_BOTTOM = _core_.ED_BUTTONS_BOTTOM
96 ED_BUTTONS_RIGHT = _core_.ED_BUTTONS_RIGHT
97 ED_STATIC_LINE = _core_.ED_STATIC_LINE
98 EXT_DIALOG_STYLE = _core_.EXT_DIALOG_STYLE
99 CLIP_CHILDREN = _core_.CLIP_CHILDREN
100 CLIP_SIBLINGS = _core_.CLIP_SIBLINGS
101 ALWAYS_SHOW_SB = _core_.ALWAYS_SHOW_SB
102 RETAINED = _core_.RETAINED
103 BACKINGSTORE = _core_.BACKINGSTORE
104 COLOURED = _core_.COLOURED
105 FIXED_LENGTH = _core_.FIXED_LENGTH
106 LB_NEEDED_SB = _core_.LB_NEEDED_SB
107 LB_ALWAYS_SB = _core_.LB_ALWAYS_SB
108 LB_SORT = _core_.LB_SORT
109 LB_SINGLE = _core_.LB_SINGLE
110 LB_MULTIPLE = _core_.LB_MULTIPLE
111 LB_EXTENDED = _core_.LB_EXTENDED
112 LB_OWNERDRAW = _core_.LB_OWNERDRAW
113 LB_HSCROLL = _core_.LB_HSCROLL
114 PROCESS_ENTER = _core_.PROCESS_ENTER
115 PASSWORD = _core_.PASSWORD
116 CB_SIMPLE = _core_.CB_SIMPLE
117 CB_DROPDOWN = _core_.CB_DROPDOWN
118 CB_SORT = _core_.CB_SORT
119 CB_READONLY = _core_.CB_READONLY
120 RA_HORIZONTAL = _core_.RA_HORIZONTAL
121 RA_VERTICAL = _core_.RA_VERTICAL
122 RA_SPECIFY_ROWS = _core_.RA_SPECIFY_ROWS
123 RA_SPECIFY_COLS = _core_.RA_SPECIFY_COLS
124 RA_USE_CHECKBOX = _core_.RA_USE_CHECKBOX
125 RB_GROUP = _core_.RB_GROUP
126 RB_SINGLE = _core_.RB_SINGLE
127 SB_HORIZONTAL = _core_.SB_HORIZONTAL
128 SB_VERTICAL = _core_.SB_VERTICAL
129 RB_USE_CHECKBOX = _core_.RB_USE_CHECKBOX
130 ST_SIZEGRIP = _core_.ST_SIZEGRIP
131 ST_NO_AUTORESIZE = _core_.ST_NO_AUTORESIZE
132 FLOOD_SURFACE = _core_.FLOOD_SURFACE
133 FLOOD_BORDER = _core_.FLOOD_BORDER
134 ODDEVEN_RULE = _core_.ODDEVEN_RULE
135 WINDING_RULE = _core_.WINDING_RULE
136 TOOL_TOP = _core_.TOOL_TOP
137 TOOL_BOTTOM = _core_.TOOL_BOTTOM
138 TOOL_LEFT = _core_.TOOL_LEFT
139 TOOL_RIGHT = _core_.TOOL_RIGHT
140 OK = _core_.OK
141 YES_NO = _core_.YES_NO
142 CANCEL = _core_.CANCEL
143 YES = _core_.YES
144 NO = _core_.NO
145 NO_DEFAULT = _core_.NO_DEFAULT
146 YES_DEFAULT = _core_.YES_DEFAULT
147 ICON_EXCLAMATION = _core_.ICON_EXCLAMATION
148 ICON_HAND = _core_.ICON_HAND
149 ICON_QUESTION = _core_.ICON_QUESTION
150 ICON_INFORMATION = _core_.ICON_INFORMATION
151 ICON_STOP = _core_.ICON_STOP
152 ICON_ASTERISK = _core_.ICON_ASTERISK
153 ICON_MASK = _core_.ICON_MASK
154 ICON_WARNING = _core_.ICON_WARNING
155 ICON_ERROR = _core_.ICON_ERROR
156 FORWARD = _core_.FORWARD
157 BACKWARD = _core_.BACKWARD
158 RESET = _core_.RESET
159 HELP = _core_.HELP
160 MORE = _core_.MORE
161 SETUP = _core_.SETUP
162 SIZE_AUTO_WIDTH = _core_.SIZE_AUTO_WIDTH
163 SIZE_AUTO_HEIGHT = _core_.SIZE_AUTO_HEIGHT
164 SIZE_AUTO = _core_.SIZE_AUTO
165 SIZE_USE_EXISTING = _core_.SIZE_USE_EXISTING
166 SIZE_ALLOW_MINUS_ONE = _core_.SIZE_ALLOW_MINUS_ONE
167 PORTRAIT = _core_.PORTRAIT
168 LANDSCAPE = _core_.LANDSCAPE
169 PRINT_QUALITY_HIGH = _core_.PRINT_QUALITY_HIGH
170 PRINT_QUALITY_MEDIUM = _core_.PRINT_QUALITY_MEDIUM
171 PRINT_QUALITY_LOW = _core_.PRINT_QUALITY_LOW
172 PRINT_QUALITY_DRAFT = _core_.PRINT_QUALITY_DRAFT
173 ID_ANY = _core_.ID_ANY
174 ID_SEPARATOR = _core_.ID_SEPARATOR
175 ID_LOWEST = _core_.ID_LOWEST
176 ID_OPEN = _core_.ID_OPEN
177 ID_CLOSE = _core_.ID_CLOSE
178 ID_NEW = _core_.ID_NEW
179 ID_SAVE = _core_.ID_SAVE
180 ID_SAVEAS = _core_.ID_SAVEAS
181 ID_REVERT = _core_.ID_REVERT
182 ID_EXIT = _core_.ID_EXIT
183 ID_UNDO = _core_.ID_UNDO
184 ID_REDO = _core_.ID_REDO
185 ID_HELP = _core_.ID_HELP
186 ID_PRINT = _core_.ID_PRINT
187 ID_PRINT_SETUP = _core_.ID_PRINT_SETUP
188 ID_PREVIEW = _core_.ID_PREVIEW
189 ID_ABOUT = _core_.ID_ABOUT
190 ID_HELP_CONTENTS = _core_.ID_HELP_CONTENTS
191 ID_HELP_COMMANDS = _core_.ID_HELP_COMMANDS
192 ID_HELP_PROCEDURES = _core_.ID_HELP_PROCEDURES
193 ID_HELP_CONTEXT = _core_.ID_HELP_CONTEXT
194 ID_CLOSE_ALL = _core_.ID_CLOSE_ALL
195 ID_PREFERENCES = _core_.ID_PREFERENCES
196 ID_CUT = _core_.ID_CUT
197 ID_COPY = _core_.ID_COPY
198 ID_PASTE = _core_.ID_PASTE
199 ID_CLEAR = _core_.ID_CLEAR
200 ID_FIND = _core_.ID_FIND
201 ID_DUPLICATE = _core_.ID_DUPLICATE
202 ID_SELECTALL = _core_.ID_SELECTALL
203 ID_DELETE = _core_.ID_DELETE
204 ID_REPLACE = _core_.ID_REPLACE
205 ID_REPLACE_ALL = _core_.ID_REPLACE_ALL
206 ID_PROPERTIES = _core_.ID_PROPERTIES
207 ID_VIEW_DETAILS = _core_.ID_VIEW_DETAILS
208 ID_VIEW_LARGEICONS = _core_.ID_VIEW_LARGEICONS
209 ID_VIEW_SMALLICONS = _core_.ID_VIEW_SMALLICONS
210 ID_VIEW_LIST = _core_.ID_VIEW_LIST
211 ID_VIEW_SORTDATE = _core_.ID_VIEW_SORTDATE
212 ID_VIEW_SORTNAME = _core_.ID_VIEW_SORTNAME
213 ID_VIEW_SORTSIZE = _core_.ID_VIEW_SORTSIZE
214 ID_VIEW_SORTTYPE = _core_.ID_VIEW_SORTTYPE
215 ID_FILE1 = _core_.ID_FILE1
216 ID_FILE2 = _core_.ID_FILE2
217 ID_FILE3 = _core_.ID_FILE3
218 ID_FILE4 = _core_.ID_FILE4
219 ID_FILE5 = _core_.ID_FILE5
220 ID_FILE6 = _core_.ID_FILE6
221 ID_FILE7 = _core_.ID_FILE7
222 ID_FILE8 = _core_.ID_FILE8
223 ID_FILE9 = _core_.ID_FILE9
224 ID_OK = _core_.ID_OK
225 ID_CANCEL = _core_.ID_CANCEL
226 ID_APPLY = _core_.ID_APPLY
227 ID_YES = _core_.ID_YES
228 ID_NO = _core_.ID_NO
229 ID_STATIC = _core_.ID_STATIC
230 ID_FORWARD = _core_.ID_FORWARD
231 ID_BACKWARD = _core_.ID_BACKWARD
232 ID_DEFAULT = _core_.ID_DEFAULT
233 ID_MORE = _core_.ID_MORE
234 ID_SETUP = _core_.ID_SETUP
235 ID_RESET = _core_.ID_RESET
236 ID_CONTEXT_HELP = _core_.ID_CONTEXT_HELP
237 ID_YESTOALL = _core_.ID_YESTOALL
238 ID_NOTOALL = _core_.ID_NOTOALL
239 ID_ABORT = _core_.ID_ABORT
240 ID_RETRY = _core_.ID_RETRY
241 ID_IGNORE = _core_.ID_IGNORE
242 ID_ADD = _core_.ID_ADD
243 ID_REMOVE = _core_.ID_REMOVE
244 ID_UP = _core_.ID_UP
245 ID_DOWN = _core_.ID_DOWN
246 ID_HOME = _core_.ID_HOME
247 ID_REFRESH = _core_.ID_REFRESH
248 ID_STOP = _core_.ID_STOP
249 ID_INDEX = _core_.ID_INDEX
250 ID_BOLD = _core_.ID_BOLD
251 ID_ITALIC = _core_.ID_ITALIC
252 ID_JUSTIFY_CENTER = _core_.ID_JUSTIFY_CENTER
253 ID_JUSTIFY_FILL = _core_.ID_JUSTIFY_FILL
254 ID_JUSTIFY_RIGHT = _core_.ID_JUSTIFY_RIGHT
255 ID_JUSTIFY_LEFT = _core_.ID_JUSTIFY_LEFT
256 ID_UNDERLINE = _core_.ID_UNDERLINE
257 ID_INDENT = _core_.ID_INDENT
258 ID_UNINDENT = _core_.ID_UNINDENT
259 ID_ZOOM_100 = _core_.ID_ZOOM_100
260 ID_ZOOM_FIT = _core_.ID_ZOOM_FIT
261 ID_ZOOM_IN = _core_.ID_ZOOM_IN
262 ID_ZOOM_OUT = _core_.ID_ZOOM_OUT
263 ID_UNDELETE = _core_.ID_UNDELETE
264 ID_REVERT_TO_SAVED = _core_.ID_REVERT_TO_SAVED
265 ID_HIGHEST = _core_.ID_HIGHEST
266 OPEN = _core_.OPEN
267 SAVE = _core_.SAVE
268 HIDE_READONLY = _core_.HIDE_READONLY
269 OVERWRITE_PROMPT = _core_.OVERWRITE_PROMPT
270 FILE_MUST_EXIST = _core_.FILE_MUST_EXIST
271 MULTIPLE = _core_.MULTIPLE
272 CHANGE_DIR = _core_.CHANGE_DIR
273 ACCEL_ALT = _core_.ACCEL_ALT
274 ACCEL_CTRL = _core_.ACCEL_CTRL
275 ACCEL_SHIFT = _core_.ACCEL_SHIFT
276 ACCEL_NORMAL = _core_.ACCEL_NORMAL
277 PD_AUTO_HIDE = _core_.PD_AUTO_HIDE
278 PD_APP_MODAL = _core_.PD_APP_MODAL
279 PD_CAN_ABORT = _core_.PD_CAN_ABORT
280 PD_ELAPSED_TIME = _core_.PD_ELAPSED_TIME
281 PD_ESTIMATED_TIME = _core_.PD_ESTIMATED_TIME
282 PD_REMAINING_TIME = _core_.PD_REMAINING_TIME
283 PD_SMOOTH = _core_.PD_SMOOTH
284 PD_CAN_SKIP = _core_.PD_CAN_SKIP
285 DD_NEW_DIR_BUTTON = _core_.DD_NEW_DIR_BUTTON
286 DD_DEFAULT_STYLE = _core_.DD_DEFAULT_STYLE
287 MENU_TEAROFF = _core_.MENU_TEAROFF
288 MB_DOCKABLE = _core_.MB_DOCKABLE
289 NO_FULL_REPAINT_ON_RESIZE = _core_.NO_FULL_REPAINT_ON_RESIZE
290 FULL_REPAINT_ON_RESIZE = _core_.FULL_REPAINT_ON_RESIZE
291 LI_HORIZONTAL = _core_.LI_HORIZONTAL
292 LI_VERTICAL = _core_.LI_VERTICAL
293 WS_EX_VALIDATE_RECURSIVELY = _core_.WS_EX_VALIDATE_RECURSIVELY
294 WS_EX_BLOCK_EVENTS = _core_.WS_EX_BLOCK_EVENTS
295 WS_EX_TRANSIENT = _core_.WS_EX_TRANSIENT
296 WS_EX_THEMED_BACKGROUND = _core_.WS_EX_THEMED_BACKGROUND
297 WS_EX_PROCESS_IDLE = _core_.WS_EX_PROCESS_IDLE
298 WS_EX_PROCESS_UI_UPDATES = _core_.WS_EX_PROCESS_UI_UPDATES
299 MM_TEXT = _core_.MM_TEXT
300 MM_LOMETRIC = _core_.MM_LOMETRIC
301 MM_HIMETRIC = _core_.MM_HIMETRIC
302 MM_LOENGLISH = _core_.MM_LOENGLISH
303 MM_HIENGLISH = _core_.MM_HIENGLISH
304 MM_TWIPS = _core_.MM_TWIPS
305 MM_ISOTROPIC = _core_.MM_ISOTROPIC
306 MM_ANISOTROPIC = _core_.MM_ANISOTROPIC
307 MM_POINTS = _core_.MM_POINTS
308 MM_METRIC = _core_.MM_METRIC
309 CENTRE = _core_.CENTRE
310 CENTER = _core_.CENTER
311 HORIZONTAL = _core_.HORIZONTAL
312 VERTICAL = _core_.VERTICAL
313 BOTH = _core_.BOTH
314 LEFT = _core_.LEFT
315 RIGHT = _core_.RIGHT
316 UP = _core_.UP
317 DOWN = _core_.DOWN
318 TOP = _core_.TOP
319 BOTTOM = _core_.BOTTOM
320 NORTH = _core_.NORTH
321 SOUTH = _core_.SOUTH
322 WEST = _core_.WEST
323 EAST = _core_.EAST
324 ALL = _core_.ALL
325 ALIGN_NOT = _core_.ALIGN_NOT
326 ALIGN_CENTER_HORIZONTAL = _core_.ALIGN_CENTER_HORIZONTAL
327 ALIGN_CENTRE_HORIZONTAL = _core_.ALIGN_CENTRE_HORIZONTAL
328 ALIGN_LEFT = _core_.ALIGN_LEFT
329 ALIGN_TOP = _core_.ALIGN_TOP
330 ALIGN_RIGHT = _core_.ALIGN_RIGHT
331 ALIGN_BOTTOM = _core_.ALIGN_BOTTOM
332 ALIGN_CENTER_VERTICAL = _core_.ALIGN_CENTER_VERTICAL
333 ALIGN_CENTRE_VERTICAL = _core_.ALIGN_CENTRE_VERTICAL
334 ALIGN_CENTER = _core_.ALIGN_CENTER
335 ALIGN_CENTRE = _core_.ALIGN_CENTRE
336 ALIGN_MASK = _core_.ALIGN_MASK
337 STRETCH_NOT = _core_.STRETCH_NOT
338 SHRINK = _core_.SHRINK
339 GROW = _core_.GROW
340 EXPAND = _core_.EXPAND
341 SHAPED = _core_.SHAPED
342 FIXED_MINSIZE = _core_.FIXED_MINSIZE
343 TILE = _core_.TILE
344 ADJUST_MINSIZE = _core_.ADJUST_MINSIZE
345 BORDER_DEFAULT = _core_.BORDER_DEFAULT
346 BORDER_NONE = _core_.BORDER_NONE
347 BORDER_STATIC = _core_.BORDER_STATIC
348 BORDER_SIMPLE = _core_.BORDER_SIMPLE
349 BORDER_RAISED = _core_.BORDER_RAISED
350 BORDER_SUNKEN = _core_.BORDER_SUNKEN
351 BORDER_DOUBLE = _core_.BORDER_DOUBLE
352 BORDER_MASK = _core_.BORDER_MASK
353 BG_STYLE_SYSTEM = _core_.BG_STYLE_SYSTEM
354 BG_STYLE_COLOUR = _core_.BG_STYLE_COLOUR
355 BG_STYLE_CUSTOM = _core_.BG_STYLE_CUSTOM
356 DEFAULT = _core_.DEFAULT
357 DECORATIVE = _core_.DECORATIVE
358 ROMAN = _core_.ROMAN
359 SCRIPT = _core_.SCRIPT
360 SWISS = _core_.SWISS
361 MODERN = _core_.MODERN
362 TELETYPE = _core_.TELETYPE
363 VARIABLE = _core_.VARIABLE
364 FIXED = _core_.FIXED
365 NORMAL = _core_.NORMAL
366 LIGHT = _core_.LIGHT
367 BOLD = _core_.BOLD
368 ITALIC = _core_.ITALIC
369 SLANT = _core_.SLANT
370 SOLID = _core_.SOLID
371 DOT = _core_.DOT
372 LONG_DASH = _core_.LONG_DASH
373 SHORT_DASH = _core_.SHORT_DASH
374 DOT_DASH = _core_.DOT_DASH
375 USER_DASH = _core_.USER_DASH
376 TRANSPARENT = _core_.TRANSPARENT
377 STIPPLE = _core_.STIPPLE
378 BDIAGONAL_HATCH = _core_.BDIAGONAL_HATCH
379 CROSSDIAG_HATCH = _core_.CROSSDIAG_HATCH
380 FDIAGONAL_HATCH = _core_.FDIAGONAL_HATCH
381 CROSS_HATCH = _core_.CROSS_HATCH
382 HORIZONTAL_HATCH = _core_.HORIZONTAL_HATCH
383 VERTICAL_HATCH = _core_.VERTICAL_HATCH
384 JOIN_BEVEL = _core_.JOIN_BEVEL
385 JOIN_MITER = _core_.JOIN_MITER
386 JOIN_ROUND = _core_.JOIN_ROUND
387 CAP_ROUND = _core_.CAP_ROUND
388 CAP_PROJECTING = _core_.CAP_PROJECTING
389 CAP_BUTT = _core_.CAP_BUTT
390 CLEAR = _core_.CLEAR
391 XOR = _core_.XOR
392 INVERT = _core_.INVERT
393 OR_REVERSE = _core_.OR_REVERSE
394 AND_REVERSE = _core_.AND_REVERSE
395 COPY = _core_.COPY
396 AND = _core_.AND
397 AND_INVERT = _core_.AND_INVERT
398 NO_OP = _core_.NO_OP
399 NOR = _core_.NOR
400 EQUIV = _core_.EQUIV
401 SRC_INVERT = _core_.SRC_INVERT
402 OR_INVERT = _core_.OR_INVERT
403 NAND = _core_.NAND
404 OR = _core_.OR
405 SET = _core_.SET
406 WXK_BACK = _core_.WXK_BACK
407 WXK_TAB = _core_.WXK_TAB
408 WXK_RETURN = _core_.WXK_RETURN
409 WXK_ESCAPE = _core_.WXK_ESCAPE
410 WXK_SPACE = _core_.WXK_SPACE
411 WXK_DELETE = _core_.WXK_DELETE
412 WXK_START = _core_.WXK_START
413 WXK_LBUTTON = _core_.WXK_LBUTTON
414 WXK_RBUTTON = _core_.WXK_RBUTTON
415 WXK_CANCEL = _core_.WXK_CANCEL
416 WXK_MBUTTON = _core_.WXK_MBUTTON
417 WXK_CLEAR = _core_.WXK_CLEAR
418 WXK_SHIFT = _core_.WXK_SHIFT
419 WXK_ALT = _core_.WXK_ALT
420 WXK_CONTROL = _core_.WXK_CONTROL
421 WXK_MENU = _core_.WXK_MENU
422 WXK_PAUSE = _core_.WXK_PAUSE
423 WXK_CAPITAL = _core_.WXK_CAPITAL
424 WXK_PRIOR = _core_.WXK_PRIOR
425 WXK_NEXT = _core_.WXK_NEXT
426 WXK_END = _core_.WXK_END
427 WXK_HOME = _core_.WXK_HOME
428 WXK_LEFT = _core_.WXK_LEFT
429 WXK_UP = _core_.WXK_UP
430 WXK_RIGHT = _core_.WXK_RIGHT
431 WXK_DOWN = _core_.WXK_DOWN
432 WXK_SELECT = _core_.WXK_SELECT
433 WXK_PRINT = _core_.WXK_PRINT
434 WXK_EXECUTE = _core_.WXK_EXECUTE
435 WXK_SNAPSHOT = _core_.WXK_SNAPSHOT
436 WXK_INSERT = _core_.WXK_INSERT
437 WXK_HELP = _core_.WXK_HELP
438 WXK_NUMPAD0 = _core_.WXK_NUMPAD0
439 WXK_NUMPAD1 = _core_.WXK_NUMPAD1
440 WXK_NUMPAD2 = _core_.WXK_NUMPAD2
441 WXK_NUMPAD3 = _core_.WXK_NUMPAD3
442 WXK_NUMPAD4 = _core_.WXK_NUMPAD4
443 WXK_NUMPAD5 = _core_.WXK_NUMPAD5
444 WXK_NUMPAD6 = _core_.WXK_NUMPAD6
445 WXK_NUMPAD7 = _core_.WXK_NUMPAD7
446 WXK_NUMPAD8 = _core_.WXK_NUMPAD8
447 WXK_NUMPAD9 = _core_.WXK_NUMPAD9
448 WXK_MULTIPLY = _core_.WXK_MULTIPLY
449 WXK_ADD = _core_.WXK_ADD
450 WXK_SEPARATOR = _core_.WXK_SEPARATOR
451 WXK_SUBTRACT = _core_.WXK_SUBTRACT
452 WXK_DECIMAL = _core_.WXK_DECIMAL
453 WXK_DIVIDE = _core_.WXK_DIVIDE
454 WXK_F1 = _core_.WXK_F1
455 WXK_F2 = _core_.WXK_F2
456 WXK_F3 = _core_.WXK_F3
457 WXK_F4 = _core_.WXK_F4
458 WXK_F5 = _core_.WXK_F5
459 WXK_F6 = _core_.WXK_F6
460 WXK_F7 = _core_.WXK_F7
461 WXK_F8 = _core_.WXK_F8
462 WXK_F9 = _core_.WXK_F9
463 WXK_F10 = _core_.WXK_F10
464 WXK_F11 = _core_.WXK_F11
465 WXK_F12 = _core_.WXK_F12
466 WXK_F13 = _core_.WXK_F13
467 WXK_F14 = _core_.WXK_F14
468 WXK_F15 = _core_.WXK_F15
469 WXK_F16 = _core_.WXK_F16
470 WXK_F17 = _core_.WXK_F17
471 WXK_F18 = _core_.WXK_F18
472 WXK_F19 = _core_.WXK_F19
473 WXK_F20 = _core_.WXK_F20
474 WXK_F21 = _core_.WXK_F21
475 WXK_F22 = _core_.WXK_F22
476 WXK_F23 = _core_.WXK_F23
477 WXK_F24 = _core_.WXK_F24
478 WXK_NUMLOCK = _core_.WXK_NUMLOCK
479 WXK_SCROLL = _core_.WXK_SCROLL
480 WXK_PAGEUP = _core_.WXK_PAGEUP
481 WXK_PAGEDOWN = _core_.WXK_PAGEDOWN
482 WXK_NUMPAD_SPACE = _core_.WXK_NUMPAD_SPACE
483 WXK_NUMPAD_TAB = _core_.WXK_NUMPAD_TAB
484 WXK_NUMPAD_ENTER = _core_.WXK_NUMPAD_ENTER
485 WXK_NUMPAD_F1 = _core_.WXK_NUMPAD_F1
486 WXK_NUMPAD_F2 = _core_.WXK_NUMPAD_F2
487 WXK_NUMPAD_F3 = _core_.WXK_NUMPAD_F3
488 WXK_NUMPAD_F4 = _core_.WXK_NUMPAD_F4
489 WXK_NUMPAD_HOME = _core_.WXK_NUMPAD_HOME
490 WXK_NUMPAD_LEFT = _core_.WXK_NUMPAD_LEFT
491 WXK_NUMPAD_UP = _core_.WXK_NUMPAD_UP
492 WXK_NUMPAD_RIGHT = _core_.WXK_NUMPAD_RIGHT
493 WXK_NUMPAD_DOWN = _core_.WXK_NUMPAD_DOWN
494 WXK_NUMPAD_PRIOR = _core_.WXK_NUMPAD_PRIOR
495 WXK_NUMPAD_PAGEUP = _core_.WXK_NUMPAD_PAGEUP
496 WXK_NUMPAD_NEXT = _core_.WXK_NUMPAD_NEXT
497 WXK_NUMPAD_PAGEDOWN = _core_.WXK_NUMPAD_PAGEDOWN
498 WXK_NUMPAD_END = _core_.WXK_NUMPAD_END
499 WXK_NUMPAD_BEGIN = _core_.WXK_NUMPAD_BEGIN
500 WXK_NUMPAD_INSERT = _core_.WXK_NUMPAD_INSERT
501 WXK_NUMPAD_DELETE = _core_.WXK_NUMPAD_DELETE
502 WXK_NUMPAD_EQUAL = _core_.WXK_NUMPAD_EQUAL
503 WXK_NUMPAD_MULTIPLY = _core_.WXK_NUMPAD_MULTIPLY
504 WXK_NUMPAD_ADD = _core_.WXK_NUMPAD_ADD
505 WXK_NUMPAD_SEPARATOR = _core_.WXK_NUMPAD_SEPARATOR
506 WXK_NUMPAD_SUBTRACT = _core_.WXK_NUMPAD_SUBTRACT
507 WXK_NUMPAD_DECIMAL = _core_.WXK_NUMPAD_DECIMAL
508 WXK_NUMPAD_DIVIDE = _core_.WXK_NUMPAD_DIVIDE
509 WXK_WINDOWS_LEFT = _core_.WXK_WINDOWS_LEFT
510 WXK_WINDOWS_RIGHT = _core_.WXK_WINDOWS_RIGHT
511 WXK_WINDOWS_MENU = _core_.WXK_WINDOWS_MENU
512 PAPER_NONE = _core_.PAPER_NONE
513 PAPER_LETTER = _core_.PAPER_LETTER
514 PAPER_LEGAL = _core_.PAPER_LEGAL
515 PAPER_A4 = _core_.PAPER_A4
516 PAPER_CSHEET = _core_.PAPER_CSHEET
517 PAPER_DSHEET = _core_.PAPER_DSHEET
518 PAPER_ESHEET = _core_.PAPER_ESHEET
519 PAPER_LETTERSMALL = _core_.PAPER_LETTERSMALL
520 PAPER_TABLOID = _core_.PAPER_TABLOID
521 PAPER_LEDGER = _core_.PAPER_LEDGER
522 PAPER_STATEMENT = _core_.PAPER_STATEMENT
523 PAPER_EXECUTIVE = _core_.PAPER_EXECUTIVE
524 PAPER_A3 = _core_.PAPER_A3
525 PAPER_A4SMALL = _core_.PAPER_A4SMALL
526 PAPER_A5 = _core_.PAPER_A5
527 PAPER_B4 = _core_.PAPER_B4
528 PAPER_B5 = _core_.PAPER_B5
529 PAPER_FOLIO = _core_.PAPER_FOLIO
530 PAPER_QUARTO = _core_.PAPER_QUARTO
531 PAPER_10X14 = _core_.PAPER_10X14
532 PAPER_11X17 = _core_.PAPER_11X17
533 PAPER_NOTE = _core_.PAPER_NOTE
534 PAPER_ENV_9 = _core_.PAPER_ENV_9
535 PAPER_ENV_10 = _core_.PAPER_ENV_10
536 PAPER_ENV_11 = _core_.PAPER_ENV_11
537 PAPER_ENV_12 = _core_.PAPER_ENV_12
538 PAPER_ENV_14 = _core_.PAPER_ENV_14
539 PAPER_ENV_DL = _core_.PAPER_ENV_DL
540 PAPER_ENV_C5 = _core_.PAPER_ENV_C5
541 PAPER_ENV_C3 = _core_.PAPER_ENV_C3
542 PAPER_ENV_C4 = _core_.PAPER_ENV_C4
543 PAPER_ENV_C6 = _core_.PAPER_ENV_C6
544 PAPER_ENV_C65 = _core_.PAPER_ENV_C65
545 PAPER_ENV_B4 = _core_.PAPER_ENV_B4
546 PAPER_ENV_B5 = _core_.PAPER_ENV_B5
547 PAPER_ENV_B6 = _core_.PAPER_ENV_B6
548 PAPER_ENV_ITALY = _core_.PAPER_ENV_ITALY
549 PAPER_ENV_MONARCH = _core_.PAPER_ENV_MONARCH
550 PAPER_ENV_PERSONAL = _core_.PAPER_ENV_PERSONAL
551 PAPER_FANFOLD_US = _core_.PAPER_FANFOLD_US
552 PAPER_FANFOLD_STD_GERMAN = _core_.PAPER_FANFOLD_STD_GERMAN
553 PAPER_FANFOLD_LGL_GERMAN = _core_.PAPER_FANFOLD_LGL_GERMAN
554 PAPER_ISO_B4 = _core_.PAPER_ISO_B4
555 PAPER_JAPANESE_POSTCARD = _core_.PAPER_JAPANESE_POSTCARD
556 PAPER_9X11 = _core_.PAPER_9X11
557 PAPER_10X11 = _core_.PAPER_10X11
558 PAPER_15X11 = _core_.PAPER_15X11
559 PAPER_ENV_INVITE = _core_.PAPER_ENV_INVITE
560 PAPER_LETTER_EXTRA = _core_.PAPER_LETTER_EXTRA
561 PAPER_LEGAL_EXTRA = _core_.PAPER_LEGAL_EXTRA
562 PAPER_TABLOID_EXTRA = _core_.PAPER_TABLOID_EXTRA
563 PAPER_A4_EXTRA = _core_.PAPER_A4_EXTRA
564 PAPER_LETTER_TRANSVERSE = _core_.PAPER_LETTER_TRANSVERSE
565 PAPER_A4_TRANSVERSE = _core_.PAPER_A4_TRANSVERSE
566 PAPER_LETTER_EXTRA_TRANSVERSE = _core_.PAPER_LETTER_EXTRA_TRANSVERSE
567 PAPER_A_PLUS = _core_.PAPER_A_PLUS
568 PAPER_B_PLUS = _core_.PAPER_B_PLUS
569 PAPER_LETTER_PLUS = _core_.PAPER_LETTER_PLUS
570 PAPER_A4_PLUS = _core_.PAPER_A4_PLUS
571 PAPER_A5_TRANSVERSE = _core_.PAPER_A5_TRANSVERSE
572 PAPER_B5_TRANSVERSE = _core_.PAPER_B5_TRANSVERSE
573 PAPER_A3_EXTRA = _core_.PAPER_A3_EXTRA
574 PAPER_A5_EXTRA = _core_.PAPER_A5_EXTRA
575 PAPER_B5_EXTRA = _core_.PAPER_B5_EXTRA
576 PAPER_A2 = _core_.PAPER_A2
577 PAPER_A3_TRANSVERSE = _core_.PAPER_A3_TRANSVERSE
578 PAPER_A3_EXTRA_TRANSVERSE = _core_.PAPER_A3_EXTRA_TRANSVERSE
579 DUPLEX_SIMPLEX = _core_.DUPLEX_SIMPLEX
580 DUPLEX_HORIZONTAL = _core_.DUPLEX_HORIZONTAL
581 DUPLEX_VERTICAL = _core_.DUPLEX_VERTICAL
582 ITEM_SEPARATOR = _core_.ITEM_SEPARATOR
583 ITEM_NORMAL = _core_.ITEM_NORMAL
584 ITEM_CHECK = _core_.ITEM_CHECK
585 ITEM_RADIO = _core_.ITEM_RADIO
586 ITEM_MAX = _core_.ITEM_MAX
587 HT_NOWHERE = _core_.HT_NOWHERE
588 HT_SCROLLBAR_FIRST = _core_.HT_SCROLLBAR_FIRST
589 HT_SCROLLBAR_ARROW_LINE_1 = _core_.HT_SCROLLBAR_ARROW_LINE_1
590 HT_SCROLLBAR_ARROW_LINE_2 = _core_.HT_SCROLLBAR_ARROW_LINE_2
591 HT_SCROLLBAR_ARROW_PAGE_1 = _core_.HT_SCROLLBAR_ARROW_PAGE_1
592 HT_SCROLLBAR_ARROW_PAGE_2 = _core_.HT_SCROLLBAR_ARROW_PAGE_2
593 HT_SCROLLBAR_THUMB = _core_.HT_SCROLLBAR_THUMB
594 HT_SCROLLBAR_BAR_1 = _core_.HT_SCROLLBAR_BAR_1
595 HT_SCROLLBAR_BAR_2 = _core_.HT_SCROLLBAR_BAR_2
596 HT_SCROLLBAR_LAST = _core_.HT_SCROLLBAR_LAST
597 HT_WINDOW_OUTSIDE = _core_.HT_WINDOW_OUTSIDE
598 HT_WINDOW_INSIDE = _core_.HT_WINDOW_INSIDE
599 HT_WINDOW_VERT_SCROLLBAR = _core_.HT_WINDOW_VERT_SCROLLBAR
600 HT_WINDOW_HORZ_SCROLLBAR = _core_.HT_WINDOW_HORZ_SCROLLBAR
601 HT_WINDOW_CORNER = _core_.HT_WINDOW_CORNER
602 HT_MAX = _core_.HT_MAX
603 MOD_NONE = _core_.MOD_NONE
604 MOD_ALT = _core_.MOD_ALT
605 MOD_CONTROL = _core_.MOD_CONTROL
606 MOD_SHIFT = _core_.MOD_SHIFT
607 MOD_WIN = _core_.MOD_WIN
608 UPDATE_UI_NONE = _core_.UPDATE_UI_NONE
609 UPDATE_UI_RECURSE = _core_.UPDATE_UI_RECURSE
610 UPDATE_UI_FROMIDLE = _core_.UPDATE_UI_FROMIDLE
611 #---------------------------------------------------------------------------
612
613 class Object(object):
614 """
615 The base class for most wx objects, although in wxPython not
616 much functionality is needed nor exposed.
617 """
618 def __init__(self): raise RuntimeError, "No constructor defined"
619 def __repr__(self):
620 return "<%s.%s; proxy of C++ wxObject instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
621 def GetClassName(*args, **kwargs):
622 """
623 GetClassName(self) -> String
624
625 Returns the class name of the C++ class using wxRTTI.
626 """
627 return _core_.Object_GetClassName(*args, **kwargs)
628
629 def Destroy(*args, **kwargs):
630 """
631 Destroy(self)
632
633 Deletes the C++ object this Python object is a proxy for.
634 """
635 return _core_.Object_Destroy(*args, **kwargs)
636
637
638 class ObjectPtr(Object):
639 def __init__(self, this):
640 self.this = this
641 if not hasattr(self,"thisown"): self.thisown = 0
642 self.__class__ = Object
643 _core_.Object_swigregister(ObjectPtr)
644 _wxPySetDictionary = _core_._wxPySetDictionary
645
646 _wxPyFixStockObjects = _core_._wxPyFixStockObjects
647
648 cvar = _core_.cvar
649 EmptyString = cvar.EmptyString
650
651 #---------------------------------------------------------------------------
652
653 BITMAP_TYPE_INVALID = _core_.BITMAP_TYPE_INVALID
654 BITMAP_TYPE_BMP = _core_.BITMAP_TYPE_BMP
655 BITMAP_TYPE_ICO = _core_.BITMAP_TYPE_ICO
656 BITMAP_TYPE_CUR = _core_.BITMAP_TYPE_CUR
657 BITMAP_TYPE_XBM = _core_.BITMAP_TYPE_XBM
658 BITMAP_TYPE_XBM_DATA = _core_.BITMAP_TYPE_XBM_DATA
659 BITMAP_TYPE_XPM = _core_.BITMAP_TYPE_XPM
660 BITMAP_TYPE_XPM_DATA = _core_.BITMAP_TYPE_XPM_DATA
661 BITMAP_TYPE_TIF = _core_.BITMAP_TYPE_TIF
662 BITMAP_TYPE_GIF = _core_.BITMAP_TYPE_GIF
663 BITMAP_TYPE_PNG = _core_.BITMAP_TYPE_PNG
664 BITMAP_TYPE_JPEG = _core_.BITMAP_TYPE_JPEG
665 BITMAP_TYPE_PNM = _core_.BITMAP_TYPE_PNM
666 BITMAP_TYPE_PCX = _core_.BITMAP_TYPE_PCX
667 BITMAP_TYPE_PICT = _core_.BITMAP_TYPE_PICT
668 BITMAP_TYPE_ICON = _core_.BITMAP_TYPE_ICON
669 BITMAP_TYPE_ANI = _core_.BITMAP_TYPE_ANI
670 BITMAP_TYPE_IFF = _core_.BITMAP_TYPE_IFF
671 BITMAP_TYPE_MACCURSOR = _core_.BITMAP_TYPE_MACCURSOR
672 BITMAP_TYPE_ANY = _core_.BITMAP_TYPE_ANY
673 CURSOR_NONE = _core_.CURSOR_NONE
674 CURSOR_ARROW = _core_.CURSOR_ARROW
675 CURSOR_RIGHT_ARROW = _core_.CURSOR_RIGHT_ARROW
676 CURSOR_BULLSEYE = _core_.CURSOR_BULLSEYE
677 CURSOR_CHAR = _core_.CURSOR_CHAR
678 CURSOR_CROSS = _core_.CURSOR_CROSS
679 CURSOR_HAND = _core_.CURSOR_HAND
680 CURSOR_IBEAM = _core_.CURSOR_IBEAM
681 CURSOR_LEFT_BUTTON = _core_.CURSOR_LEFT_BUTTON
682 CURSOR_MAGNIFIER = _core_.CURSOR_MAGNIFIER
683 CURSOR_MIDDLE_BUTTON = _core_.CURSOR_MIDDLE_BUTTON
684 CURSOR_NO_ENTRY = _core_.CURSOR_NO_ENTRY
685 CURSOR_PAINT_BRUSH = _core_.CURSOR_PAINT_BRUSH
686 CURSOR_PENCIL = _core_.CURSOR_PENCIL
687 CURSOR_POINT_LEFT = _core_.CURSOR_POINT_LEFT
688 CURSOR_POINT_RIGHT = _core_.CURSOR_POINT_RIGHT
689 CURSOR_QUESTION_ARROW = _core_.CURSOR_QUESTION_ARROW
690 CURSOR_RIGHT_BUTTON = _core_.CURSOR_RIGHT_BUTTON
691 CURSOR_SIZENESW = _core_.CURSOR_SIZENESW
692 CURSOR_SIZENS = _core_.CURSOR_SIZENS
693 CURSOR_SIZENWSE = _core_.CURSOR_SIZENWSE
694 CURSOR_SIZEWE = _core_.CURSOR_SIZEWE
695 CURSOR_SIZING = _core_.CURSOR_SIZING
696 CURSOR_SPRAYCAN = _core_.CURSOR_SPRAYCAN
697 CURSOR_WAIT = _core_.CURSOR_WAIT
698 CURSOR_WATCH = _core_.CURSOR_WATCH
699 CURSOR_BLANK = _core_.CURSOR_BLANK
700 CURSOR_DEFAULT = _core_.CURSOR_DEFAULT
701 CURSOR_COPY_ARROW = _core_.CURSOR_COPY_ARROW
702 CURSOR_ARROWWAIT = _core_.CURSOR_ARROWWAIT
703 CURSOR_MAX = _core_.CURSOR_MAX
704 #---------------------------------------------------------------------------
705
706 class Size(object):
707 """
708 wx.Size is a useful data structure used to represent the size of
709 something. It simply contians integer width and height
710 proprtites. In most places in wxPython where a wx.Size is
711 expected a (width, height) tuple can be used instead.
712 """
713 def __repr__(self):
714 return "<%s.%s; proxy of C++ wxSize instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
715 width = property(_core_.Size_width_get, _core_.Size_width_set)
716 height = property(_core_.Size_height_get, _core_.Size_height_set)
717 x = width; y = height
718 def __init__(self, *args, **kwargs):
719 """
720 __init__(self, int w=0, int h=0) -> Size
721
722 Creates a size object.
723 """
724 newobj = _core_.new_Size(*args, **kwargs)
725 self.this = newobj.this
726 self.thisown = 1
727 del newobj.thisown
728 def __del__(self, destroy=_core_.delete_Size):
729 """__del__(self)"""
730 try:
731 if self.thisown: destroy(self)
732 except: pass
733
734 def __eq__(*args, **kwargs):
735 """
736 __eq__(self, Size sz) -> bool
737
738 Test for equality of wx.Size objects.
739 """
740 return _core_.Size___eq__(*args, **kwargs)
741
742 def __ne__(*args, **kwargs):
743 """
744 __ne__(self, Size sz) -> bool
745
746 Test for inequality.
747 """
748 return _core_.Size___ne__(*args, **kwargs)
749
750 def __add__(*args, **kwargs):
751 """
752 __add__(self, Size sz) -> Size
753
754 Add sz's proprties to this and return the result.
755 """
756 return _core_.Size___add__(*args, **kwargs)
757
758 def __sub__(*args, **kwargs):
759 """
760 __sub__(self, Size sz) -> Size
761
762 Subtract sz's properties from this and return the result.
763 """
764 return _core_.Size___sub__(*args, **kwargs)
765
766 def IncTo(*args, **kwargs):
767 """
768 IncTo(self, Size sz)
769
770 Increments this object so that both of its dimensions are not less
771 than the corresponding dimensions of the size.
772 """
773 return _core_.Size_IncTo(*args, **kwargs)
774
775 def DecTo(*args, **kwargs):
776 """
777 DecTo(self, Size sz)
778
779 Decrements this object so that both of its dimensions are not greater
780 than the corresponding dimensions of the size.
781 """
782 return _core_.Size_DecTo(*args, **kwargs)
783
784 def Set(*args, **kwargs):
785 """
786 Set(self, int w, int h)
787
788 Set both width and height.
789 """
790 return _core_.Size_Set(*args, **kwargs)
791
792 def SetWidth(*args, **kwargs):
793 """SetWidth(self, int w)"""
794 return _core_.Size_SetWidth(*args, **kwargs)
795
796 def SetHeight(*args, **kwargs):
797 """SetHeight(self, int h)"""
798 return _core_.Size_SetHeight(*args, **kwargs)
799
800 def GetWidth(*args, **kwargs):
801 """GetWidth(self) -> int"""
802 return _core_.Size_GetWidth(*args, **kwargs)
803
804 def GetHeight(*args, **kwargs):
805 """GetHeight(self) -> int"""
806 return _core_.Size_GetHeight(*args, **kwargs)
807
808 def IsFullySpecified(*args, **kwargs):
809 """
810 IsFullySpecified(self) -> bool
811
812 Returns True if both components of the size are non-default values.
813 """
814 return _core_.Size_IsFullySpecified(*args, **kwargs)
815
816 def SetDefaults(*args, **kwargs):
817 """
818 SetDefaults(self, Size size)
819
820 Combine this size with the other one replacing the default components
821 of this object (i.e. equal to -1) with those of the other.
822 """
823 return _core_.Size_SetDefaults(*args, **kwargs)
824
825 def Get(*args, **kwargs):
826 """
827 Get() -> (width,height)
828
829 Returns the width and height properties as a tuple.
830 """
831 return _core_.Size_Get(*args, **kwargs)
832
833 asTuple = wx._deprecated(Get, "asTuple is deprecated, use `Get` instead")
834 def __str__(self): return str(self.Get())
835 def __repr__(self): return 'wx.Size'+str(self.Get())
836 def __len__(self): return len(self.Get())
837 def __getitem__(self, index): return self.Get()[index]
838 def __setitem__(self, index, val):
839 if index == 0: self.width = val
840 elif index == 1: self.height = val
841 else: raise IndexError
842 def __nonzero__(self): return self.Get() != (0,0)
843 __safe_for_unpickling__ = True
844 def __reduce__(self): return (wx.Size, self.Get())
845
846
847 class SizePtr(Size):
848 def __init__(self, this):
849 self.this = this
850 if not hasattr(self,"thisown"): self.thisown = 0
851 self.__class__ = Size
852 _core_.Size_swigregister(SizePtr)
853
854 #---------------------------------------------------------------------------
855
856 class RealPoint(object):
857 """
858 A data structure for representing a point or position with floating
859 point x and y properties. In wxPython most places that expect a
860 wx.RealPoint can also accept a (x,y) tuple.
861 """
862 def __repr__(self):
863 return "<%s.%s; proxy of C++ wxRealPoint instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
864 x = property(_core_.RealPoint_x_get, _core_.RealPoint_x_set)
865 y = property(_core_.RealPoint_y_get, _core_.RealPoint_y_set)
866 def __init__(self, *args, **kwargs):
867 """
868 __init__(self, double x=0.0, double y=0.0) -> RealPoint
869
870 Create a wx.RealPoint object
871 """
872 newobj = _core_.new_RealPoint(*args, **kwargs)
873 self.this = newobj.this
874 self.thisown = 1
875 del newobj.thisown
876 def __del__(self, destroy=_core_.delete_RealPoint):
877 """__del__(self)"""
878 try:
879 if self.thisown: destroy(self)
880 except: pass
881
882 def __eq__(*args, **kwargs):
883 """
884 __eq__(self, RealPoint pt) -> bool
885
886 Test for equality of wx.RealPoint objects.
887 """
888 return _core_.RealPoint___eq__(*args, **kwargs)
889
890 def __ne__(*args, **kwargs):
891 """
892 __ne__(self, RealPoint pt) -> bool
893
894 Test for inequality of wx.RealPoint objects.
895 """
896 return _core_.RealPoint___ne__(*args, **kwargs)
897
898 def __add__(*args, **kwargs):
899 """
900 __add__(self, RealPoint pt) -> RealPoint
901
902 Add pt's proprties to this and return the result.
903 """
904 return _core_.RealPoint___add__(*args, **kwargs)
905
906 def __sub__(*args, **kwargs):
907 """
908 __sub__(self, RealPoint pt) -> RealPoint
909
910 Subtract pt's proprties from this and return the result
911 """
912 return _core_.RealPoint___sub__(*args, **kwargs)
913
914 def Set(*args, **kwargs):
915 """
916 Set(self, double x, double y)
917
918 Set both the x and y properties
919 """
920 return _core_.RealPoint_Set(*args, **kwargs)
921
922 def Get(*args, **kwargs):
923 """
924 Get() -> (x,y)
925
926 Return the x and y properties as a tuple.
927 """
928 return _core_.RealPoint_Get(*args, **kwargs)
929
930 asTuple = wx._deprecated(Get, "asTuple is deprecated, use `Get` instead")
931 def __str__(self): return str(self.Get())
932 def __repr__(self): return 'wx.RealPoint'+str(self.Get())
933 def __len__(self): return len(self.Get())
934 def __getitem__(self, index): return self.Get()[index]
935 def __setitem__(self, index, val):
936 if index == 0: self.x = val
937 elif index == 1: self.y = val
938 else: raise IndexError
939 def __nonzero__(self): return self.Get() != (0.0, 0.0)
940 __safe_for_unpickling__ = True
941 def __reduce__(self): return (wx.RealPoint, self.Get())
942
943
944 class RealPointPtr(RealPoint):
945 def __init__(self, this):
946 self.this = this
947 if not hasattr(self,"thisown"): self.thisown = 0
948 self.__class__ = RealPoint
949 _core_.RealPoint_swigregister(RealPointPtr)
950
951 #---------------------------------------------------------------------------
952
953 class Point(object):
954 """
955 A data structure for representing a point or position with integer x
956 and y properties. Most places in wxPython that expect a wx.Point can
957 also accept a (x,y) tuple.
958 """
959 def __repr__(self):
960 return "<%s.%s; proxy of C++ wxPoint instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
961 x = property(_core_.Point_x_get, _core_.Point_x_set)
962 y = property(_core_.Point_y_get, _core_.Point_y_set)
963 def __init__(self, *args, **kwargs):
964 """
965 __init__(self, int x=0, int y=0) -> Point
966
967 Create a wx.Point object
968 """
969 newobj = _core_.new_Point(*args, **kwargs)
970 self.this = newobj.this
971 self.thisown = 1
972 del newobj.thisown
973 def __del__(self, destroy=_core_.delete_Point):
974 """__del__(self)"""
975 try:
976 if self.thisown: destroy(self)
977 except: pass
978
979 def __eq__(*args, **kwargs):
980 """
981 __eq__(self, Point pt) -> bool
982
983 Test for equality of wx.Point objects.
984 """
985 return _core_.Point___eq__(*args, **kwargs)
986
987 def __ne__(*args, **kwargs):
988 """
989 __ne__(self, Point pt) -> bool
990
991 Test for inequality of wx.Point objects.
992 """
993 return _core_.Point___ne__(*args, **kwargs)
994
995 def __add__(*args, **kwargs):
996 """
997 __add__(self, Point pt) -> Point
998
999 Add pt's proprties to this and return the result.
1000 """
1001 return _core_.Point___add__(*args, **kwargs)
1002
1003 def __sub__(*args, **kwargs):
1004 """
1005 __sub__(self, Point pt) -> Point
1006
1007 Subtract pt's proprties from this and return the result
1008 """
1009 return _core_.Point___sub__(*args, **kwargs)
1010
1011 def __iadd__(*args, **kwargs):
1012 """
1013 __iadd__(self, Point pt) -> Point
1014
1015 Add pt to this object.
1016 """
1017 return _core_.Point___iadd__(*args, **kwargs)
1018
1019 def __isub__(*args, **kwargs):
1020 """
1021 __isub__(self, Point pt) -> Point
1022
1023 Subtract pt from this object.
1024 """
1025 return _core_.Point___isub__(*args, **kwargs)
1026
1027 def Set(*args, **kwargs):
1028 """
1029 Set(self, long x, long y)
1030
1031 Set both the x and y properties
1032 """
1033 return _core_.Point_Set(*args, **kwargs)
1034
1035 def Get(*args, **kwargs):
1036 """
1037 Get() -> (x,y)
1038
1039 Return the x and y properties as a tuple.
1040 """
1041 return _core_.Point_Get(*args, **kwargs)
1042
1043 asTuple = wx._deprecated(Get, "asTuple is deprecated, use `Get` instead")
1044 def __str__(self): return str(self.Get())
1045 def __repr__(self): return 'wx.Point'+str(self.Get())
1046 def __len__(self): return len(self.Get())
1047 def __getitem__(self, index): return self.Get()[index]
1048 def __setitem__(self, index, val):
1049 if index == 0: self.x = val
1050 elif index == 1: self.y = val
1051 else: raise IndexError
1052 def __nonzero__(self): return self.Get() != (0,0)
1053 __safe_for_unpickling__ = True
1054 def __reduce__(self): return (wx.Point, self.Get())
1055
1056
1057 class PointPtr(Point):
1058 def __init__(self, this):
1059 self.this = this
1060 if not hasattr(self,"thisown"): self.thisown = 0
1061 self.__class__ = Point
1062 _core_.Point_swigregister(PointPtr)
1063
1064 #---------------------------------------------------------------------------
1065
1066 class Rect(object):
1067 """
1068 A class for representing and manipulating rectangles. It has x, y,
1069 width and height properties. In wxPython most palces that expect a
1070 wx.Rect can also accept a (x,y,width,height) tuple.
1071 """
1072 def __repr__(self):
1073 return "<%s.%s; proxy of C++ wxRect instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
1074 def __init__(self, *args, **kwargs):
1075 """
1076 __init__(self, int x=0, int y=0, int width=0, int height=0) -> Rect
1077
1078 Create a new Rect object.
1079 """
1080 newobj = _core_.new_Rect(*args, **kwargs)
1081 self.this = newobj.this
1082 self.thisown = 1
1083 del newobj.thisown
1084 def __del__(self, destroy=_core_.delete_Rect):
1085 """__del__(self)"""
1086 try:
1087 if self.thisown: destroy(self)
1088 except: pass
1089
1090 def GetX(*args, **kwargs):
1091 """GetX(self) -> int"""
1092 return _core_.Rect_GetX(*args, **kwargs)
1093
1094 def SetX(*args, **kwargs):
1095 """SetX(self, int x)"""
1096 return _core_.Rect_SetX(*args, **kwargs)
1097
1098 def GetY(*args, **kwargs):
1099 """GetY(self) -> int"""
1100 return _core_.Rect_GetY(*args, **kwargs)
1101
1102 def SetY(*args, **kwargs):
1103 """SetY(self, int y)"""
1104 return _core_.Rect_SetY(*args, **kwargs)
1105
1106 def GetWidth(*args, **kwargs):
1107 """GetWidth(self) -> int"""
1108 return _core_.Rect_GetWidth(*args, **kwargs)
1109
1110 def SetWidth(*args, **kwargs):
1111 """SetWidth(self, int w)"""
1112 return _core_.Rect_SetWidth(*args, **kwargs)
1113
1114 def GetHeight(*args, **kwargs):
1115 """GetHeight(self) -> int"""
1116 return _core_.Rect_GetHeight(*args, **kwargs)
1117
1118 def SetHeight(*args, **kwargs):
1119 """SetHeight(self, int h)"""
1120 return _core_.Rect_SetHeight(*args, **kwargs)
1121
1122 def GetPosition(*args, **kwargs):
1123 """GetPosition(self) -> Point"""
1124 return _core_.Rect_GetPosition(*args, **kwargs)
1125
1126 def SetPosition(*args, **kwargs):
1127 """SetPosition(self, Point p)"""
1128 return _core_.Rect_SetPosition(*args, **kwargs)
1129
1130 def GetSize(*args, **kwargs):
1131 """GetSize(self) -> Size"""
1132 return _core_.Rect_GetSize(*args, **kwargs)
1133
1134 def SetSize(*args, **kwargs):
1135 """SetSize(self, Size s)"""
1136 return _core_.Rect_SetSize(*args, **kwargs)
1137
1138 def IsEmpty(*args, **kwargs):
1139 """IsEmpty(self) -> bool"""
1140 return _core_.Rect_IsEmpty(*args, **kwargs)
1141
1142 def GetTopLeft(*args, **kwargs):
1143 """GetTopLeft(self) -> Point"""
1144 return _core_.Rect_GetTopLeft(*args, **kwargs)
1145
1146 def SetTopLeft(*args, **kwargs):
1147 """SetTopLeft(self, Point p)"""
1148 return _core_.Rect_SetTopLeft(*args, **kwargs)
1149
1150 def GetBottomRight(*args, **kwargs):
1151 """GetBottomRight(self) -> Point"""
1152 return _core_.Rect_GetBottomRight(*args, **kwargs)
1153
1154 def SetBottomRight(*args, **kwargs):
1155 """SetBottomRight(self, Point p)"""
1156 return _core_.Rect_SetBottomRight(*args, **kwargs)
1157
1158 def GetLeft(*args, **kwargs):
1159 """GetLeft(self) -> int"""
1160 return _core_.Rect_GetLeft(*args, **kwargs)
1161
1162 def GetTop(*args, **kwargs):
1163 """GetTop(self) -> int"""
1164 return _core_.Rect_GetTop(*args, **kwargs)
1165
1166 def GetBottom(*args, **kwargs):
1167 """GetBottom(self) -> int"""
1168 return _core_.Rect_GetBottom(*args, **kwargs)
1169
1170 def GetRight(*args, **kwargs):
1171 """GetRight(self) -> int"""
1172 return _core_.Rect_GetRight(*args, **kwargs)
1173
1174 def SetLeft(*args, **kwargs):
1175 """SetLeft(self, int left)"""
1176 return _core_.Rect_SetLeft(*args, **kwargs)
1177
1178 def SetRight(*args, **kwargs):
1179 """SetRight(self, int right)"""
1180 return _core_.Rect_SetRight(*args, **kwargs)
1181
1182 def SetTop(*args, **kwargs):
1183 """SetTop(self, int top)"""
1184 return _core_.Rect_SetTop(*args, **kwargs)
1185
1186 def SetBottom(*args, **kwargs):
1187 """SetBottom(self, int bottom)"""
1188 return _core_.Rect_SetBottom(*args, **kwargs)
1189
1190 position = property(GetPosition, SetPosition)
1191 size = property(GetSize, SetSize)
1192 left = property(GetLeft, SetLeft)
1193 right = property(GetRight, SetRight)
1194 top = property(GetTop, SetTop)
1195 bottom = property(GetBottom, SetBottom)
1196
1197 def Inflate(*args, **kwargs):
1198 """
1199 Inflate(self, int dx, int dy) -> Rect
1200
1201 Increases the size of the rectangle.
1202
1203 The left border is moved farther left and the right border is moved
1204 farther right by ``dx``. The upper border is moved farther up and the
1205 bottom border is moved farther down by ``dy``. (Note the the width and
1206 height of the rectangle thus change by ``2*dx`` and ``2*dy``,
1207 respectively.) If one or both of ``dx`` and ``dy`` are negative, the
1208 opposite happens: the rectangle size decreases in the respective
1209 direction.
1210
1211 The change is made to the rectangle inplace, if instead you need a
1212 copy that is inflated, preserving the original then make the copy
1213 first::
1214
1215 copy = wx.Rect(*original)
1216 copy.Inflate(10,15)
1217
1218
1219 """
1220 return _core_.Rect_Inflate(*args, **kwargs)
1221
1222 def Deflate(*args, **kwargs):
1223 """
1224 Deflate(self, int dx, int dy) -> Rect
1225
1226 Decrease the rectangle size. This method is the opposite of `Inflate`
1227 in that Deflate(a,b) is equivalent to Inflate(-a,-b). Please refer to
1228 `Inflate` for a full description.
1229 """
1230 return _core_.Rect_Deflate(*args, **kwargs)
1231
1232 def OffsetXY(*args, **kwargs):
1233 """
1234 OffsetXY(self, int dx, int dy)
1235
1236 Moves the rectangle by the specified offset. If dx is positive, the
1237 rectangle is moved to the right, if dy is positive, it is moved to the
1238 bottom, otherwise it is moved to the left or top respectively.
1239 """
1240 return _core_.Rect_OffsetXY(*args, **kwargs)
1241
1242 def Offset(*args, **kwargs):
1243 """
1244 Offset(self, Point pt)
1245
1246 Same as OffsetXY but uses dx,dy from Point
1247 """
1248 return _core_.Rect_Offset(*args, **kwargs)
1249
1250 def Intersect(*args, **kwargs):
1251 """
1252 Intersect(self, Rect rect) -> Rect
1253
1254 Returns the intersectsion of this rectangle and rect.
1255 """
1256 return _core_.Rect_Intersect(*args, **kwargs)
1257
1258 def Union(*args, **kwargs):
1259 """
1260 Union(self, Rect rect) -> Rect
1261
1262 Returns the union of this rectangle and rect.
1263 """
1264 return _core_.Rect_Union(*args, **kwargs)
1265
1266 def __add__(*args, **kwargs):
1267 """
1268 __add__(self, Rect rect) -> Rect
1269
1270 Add the properties of rect to this rectangle and return the result.
1271 """
1272 return _core_.Rect___add__(*args, **kwargs)
1273
1274 def __iadd__(*args, **kwargs):
1275 """
1276 __iadd__(self, Rect rect) -> Rect
1277
1278 Add the properties of rect to this rectangle, updating this rectangle.
1279 """
1280 return _core_.Rect___iadd__(*args, **kwargs)
1281
1282 def __eq__(*args, **kwargs):
1283 """
1284 __eq__(self, Rect rect) -> bool
1285
1286 Test for equality.
1287 """
1288 return _core_.Rect___eq__(*args, **kwargs)
1289
1290 def __ne__(*args, **kwargs):
1291 """
1292 __ne__(self, Rect rect) -> bool
1293
1294 Test for inequality.
1295 """
1296 return _core_.Rect___ne__(*args, **kwargs)
1297
1298 def InsideXY(*args, **kwargs):
1299 """
1300 InsideXY(self, int x, int y) -> bool
1301
1302 Return True if the point is (not strcitly) inside the rect.
1303 """
1304 return _core_.Rect_InsideXY(*args, **kwargs)
1305
1306 def Inside(*args, **kwargs):
1307 """
1308 Inside(self, Point pt) -> bool
1309
1310 Return True if the point is (not strcitly) inside the rect.
1311 """
1312 return _core_.Rect_Inside(*args, **kwargs)
1313
1314 def Intersects(*args, **kwargs):
1315 """
1316 Intersects(self, Rect rect) -> bool
1317
1318 Returns True if the rectangles have a non empty intersection.
1319 """
1320 return _core_.Rect_Intersects(*args, **kwargs)
1321
1322 x = property(_core_.Rect_x_get, _core_.Rect_x_set)
1323 y = property(_core_.Rect_y_get, _core_.Rect_y_set)
1324 width = property(_core_.Rect_width_get, _core_.Rect_width_set)
1325 height = property(_core_.Rect_height_get, _core_.Rect_height_set)
1326 def Set(*args, **kwargs):
1327 """
1328 Set(self, int x=0, int y=0, int width=0, int height=0)
1329
1330 Set all rectangle properties.
1331 """
1332 return _core_.Rect_Set(*args, **kwargs)
1333
1334 def Get(*args, **kwargs):
1335 """
1336 Get() -> (x,y,width,height)
1337
1338 Return the rectangle properties as a tuple.
1339 """
1340 return _core_.Rect_Get(*args, **kwargs)
1341
1342 asTuple = wx._deprecated(Get, "asTuple is deprecated, use `Get` instead")
1343 def __str__(self): return str(self.Get())
1344 def __repr__(self): return 'wx.Rect'+str(self.Get())
1345 def __len__(self): return len(self.Get())
1346 def __getitem__(self, index): return self.Get()[index]
1347 def __setitem__(self, index, val):
1348 if index == 0: self.x = val
1349 elif index == 1: self.y = val
1350 elif index == 2: self.width = val
1351 elif index == 3: self.height = val
1352 else: raise IndexError
1353 def __nonzero__(self): return self.Get() != (0,0,0,0)
1354 __safe_for_unpickling__ = True
1355 def __reduce__(self): return (wx.Rect, self.Get())
1356
1357
1358 class RectPtr(Rect):
1359 def __init__(self, this):
1360 self.this = this
1361 if not hasattr(self,"thisown"): self.thisown = 0
1362 self.__class__ = Rect
1363 _core_.Rect_swigregister(RectPtr)
1364
1365 def RectPP(*args, **kwargs):
1366 """
1367 RectPP(Point topLeft, Point bottomRight) -> Rect
1368
1369 Create a new Rect object from Points representing two corners.
1370 """
1371 val = _core_.new_RectPP(*args, **kwargs)
1372 val.thisown = 1
1373 return val
1374
1375 def RectPS(*args, **kwargs):
1376 """
1377 RectPS(Point pos, Size size) -> Rect
1378
1379 Create a new Rect from a position and size.
1380 """
1381 val = _core_.new_RectPS(*args, **kwargs)
1382 val.thisown = 1
1383 return val
1384
1385 def RectS(*args, **kwargs):
1386 """
1387 RectS(Size size) -> Rect
1388
1389 Create a new Rect from a size only.
1390 """
1391 val = _core_.new_RectS(*args, **kwargs)
1392 val.thisown = 1
1393 return val
1394
1395
1396 def IntersectRect(*args, **kwargs):
1397 """
1398 IntersectRect(Rect r1, Rect r2) -> Rect
1399
1400 Calculate and return the intersection of r1 and r2.
1401 """
1402 return _core_.IntersectRect(*args, **kwargs)
1403 #---------------------------------------------------------------------------
1404
1405 class Point2D(object):
1406 """
1407 wx.Point2Ds represent a point or a vector in a 2d coordinate system
1408 with floating point values.
1409 """
1410 def __repr__(self):
1411 return "<%s.%s; proxy of C++ wxPoint2D instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
1412 def __init__(self, *args, **kwargs):
1413 """
1414 __init__(self, double x=0.0, double y=0.0) -> Point2D
1415
1416 Create a w.Point2D object.
1417 """
1418 newobj = _core_.new_Point2D(*args, **kwargs)
1419 self.this = newobj.this
1420 self.thisown = 1
1421 del newobj.thisown
1422 def GetFloor(*args, **kwargs):
1423 """
1424 GetFloor() -> (x,y)
1425
1426 Convert to integer
1427 """
1428 return _core_.Point2D_GetFloor(*args, **kwargs)
1429
1430 def GetRounded(*args, **kwargs):
1431 """
1432 GetRounded() -> (x,y)
1433
1434 Convert to integer
1435 """
1436 return _core_.Point2D_GetRounded(*args, **kwargs)
1437
1438 def GetVectorLength(*args, **kwargs):
1439 """GetVectorLength(self) -> double"""
1440 return _core_.Point2D_GetVectorLength(*args, **kwargs)
1441
1442 def GetVectorAngle(*args, **kwargs):
1443 """GetVectorAngle(self) -> double"""
1444 return _core_.Point2D_GetVectorAngle(*args, **kwargs)
1445
1446 def SetVectorLength(*args, **kwargs):
1447 """SetVectorLength(self, double length)"""
1448 return _core_.Point2D_SetVectorLength(*args, **kwargs)
1449
1450 def SetVectorAngle(*args, **kwargs):
1451 """SetVectorAngle(self, double degrees)"""
1452 return _core_.Point2D_SetVectorAngle(*args, **kwargs)
1453
1454 def SetPolarCoordinates(self, angle, length):
1455 self.SetVectorLength(length)
1456 self.SetVectorAngle(angle)
1457 def Normalize(self):
1458 self.SetVectorLength(1.0)
1459
1460 def GetDistance(*args, **kwargs):
1461 """GetDistance(self, Point2D pt) -> double"""
1462 return _core_.Point2D_GetDistance(*args, **kwargs)
1463
1464 def GetDistanceSquare(*args, **kwargs):
1465 """GetDistanceSquare(self, Point2D pt) -> double"""
1466 return _core_.Point2D_GetDistanceSquare(*args, **kwargs)
1467
1468 def GetDotProduct(*args, **kwargs):
1469 """GetDotProduct(self, Point2D vec) -> double"""
1470 return _core_.Point2D_GetDotProduct(*args, **kwargs)
1471
1472 def GetCrossProduct(*args, **kwargs):
1473 """GetCrossProduct(self, Point2D vec) -> double"""
1474 return _core_.Point2D_GetCrossProduct(*args, **kwargs)
1475
1476 def __neg__(*args, **kwargs):
1477 """
1478 __neg__(self) -> Point2D
1479
1480 the reflection of this point
1481 """
1482 return _core_.Point2D___neg__(*args, **kwargs)
1483
1484 def __iadd__(*args, **kwargs):
1485 """__iadd__(self, Point2D pt) -> Point2D"""
1486 return _core_.Point2D___iadd__(*args, **kwargs)
1487
1488 def __isub__(*args, **kwargs):
1489 """__isub__(self, Point2D pt) -> Point2D"""
1490 return _core_.Point2D___isub__(*args, **kwargs)
1491
1492 def __imul__(*args, **kwargs):
1493 """__imul__(self, Point2D pt) -> Point2D"""
1494 return _core_.Point2D___imul__(*args, **kwargs)
1495
1496 def __idiv__(*args, **kwargs):
1497 """__idiv__(self, Point2D pt) -> Point2D"""
1498 return _core_.Point2D___idiv__(*args, **kwargs)
1499
1500 def __eq__(*args, **kwargs):
1501 """
1502 __eq__(self, Point2D pt) -> bool
1503
1504 Test for equality
1505 """
1506 return _core_.Point2D___eq__(*args, **kwargs)
1507
1508 def __ne__(*args, **kwargs):
1509 """
1510 __ne__(self, Point2D pt) -> bool
1511
1512 Test for inequality
1513 """
1514 return _core_.Point2D___ne__(*args, **kwargs)
1515
1516 x = property(_core_.Point2D_x_get, _core_.Point2D_x_set)
1517 y = property(_core_.Point2D_y_get, _core_.Point2D_y_set)
1518 def Set(*args, **kwargs):
1519 """Set(self, double x=0, double y=0)"""
1520 return _core_.Point2D_Set(*args, **kwargs)
1521
1522 def Get(*args, **kwargs):
1523 """
1524 Get() -> (x,y)
1525
1526 Return x and y properties as a tuple.
1527 """
1528 return _core_.Point2D_Get(*args, **kwargs)
1529
1530 asTuple = wx._deprecated(Get, "asTuple is deprecated, use `Get` instead")
1531 def __str__(self): return str(self.Get())
1532 def __repr__(self): return 'wx.Point2D'+str(self.Get())
1533 def __len__(self): return len(self.Get())
1534 def __getitem__(self, index): return self.Get()[index]
1535 def __setitem__(self, index, val):
1536 if index == 0: self.x = val
1537 elif index == 1: self.y = val
1538 else: raise IndexError
1539 def __nonzero__(self): return self.Get() != (0.0, 0.0)
1540 __safe_for_unpickling__ = True
1541 def __reduce__(self): return (wx.Point2D, self.Get())
1542
1543
1544 class Point2DPtr(Point2D):
1545 def __init__(self, this):
1546 self.this = this
1547 if not hasattr(self,"thisown"): self.thisown = 0
1548 self.__class__ = Point2D
1549 _core_.Point2D_swigregister(Point2DPtr)
1550
1551 def Point2DCopy(*args, **kwargs):
1552 """
1553 Point2DCopy(Point2D pt) -> Point2D
1554
1555 Create a w.Point2D object.
1556 """
1557 val = _core_.new_Point2DCopy(*args, **kwargs)
1558 val.thisown = 1
1559 return val
1560
1561 def Point2DFromPoint(*args, **kwargs):
1562 """
1563 Point2DFromPoint(Point pt) -> Point2D
1564
1565 Create a w.Point2D object.
1566 """
1567 val = _core_.new_Point2DFromPoint(*args, **kwargs)
1568 val.thisown = 1
1569 return val
1570
1571 #---------------------------------------------------------------------------
1572
1573 FromStart = _core_.FromStart
1574 FromCurrent = _core_.FromCurrent
1575 FromEnd = _core_.FromEnd
1576 class InputStream(object):
1577 """Proxy of C++ InputStream class"""
1578 def __repr__(self):
1579 return "<%s.%s; proxy of C++ wxPyInputStream instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
1580 def __init__(self, *args, **kwargs):
1581 """__init__(self, PyObject p) -> InputStream"""
1582 newobj = _core_.new_InputStream(*args, **kwargs)
1583 self.this = newobj.this
1584 self.thisown = 1
1585 del newobj.thisown
1586 def __del__(self, destroy=_core_.delete_InputStream):
1587 """__del__(self)"""
1588 try:
1589 if self.thisown: destroy(self)
1590 except: pass
1591
1592 def close(*args, **kwargs):
1593 """close(self)"""
1594 return _core_.InputStream_close(*args, **kwargs)
1595
1596 def flush(*args, **kwargs):
1597 """flush(self)"""
1598 return _core_.InputStream_flush(*args, **kwargs)
1599
1600 def eof(*args, **kwargs):
1601 """eof(self) -> bool"""
1602 return _core_.InputStream_eof(*args, **kwargs)
1603
1604 def read(*args, **kwargs):
1605 """read(self, int size=-1) -> PyObject"""
1606 return _core_.InputStream_read(*args, **kwargs)
1607
1608 def readline(*args, **kwargs):
1609 """readline(self, int size=-1) -> PyObject"""
1610 return _core_.InputStream_readline(*args, **kwargs)
1611
1612 def readlines(*args, **kwargs):
1613 """readlines(self, int sizehint=-1) -> PyObject"""
1614 return _core_.InputStream_readlines(*args, **kwargs)
1615
1616 def seek(*args, **kwargs):
1617 """seek(self, int offset, int whence=0)"""
1618 return _core_.InputStream_seek(*args, **kwargs)
1619
1620 def tell(*args, **kwargs):
1621 """tell(self) -> int"""
1622 return _core_.InputStream_tell(*args, **kwargs)
1623
1624 def Peek(*args, **kwargs):
1625 """Peek(self) -> char"""
1626 return _core_.InputStream_Peek(*args, **kwargs)
1627
1628 def GetC(*args, **kwargs):
1629 """GetC(self) -> char"""
1630 return _core_.InputStream_GetC(*args, **kwargs)
1631
1632 def LastRead(*args, **kwargs):
1633 """LastRead(self) -> size_t"""
1634 return _core_.InputStream_LastRead(*args, **kwargs)
1635
1636 def CanRead(*args, **kwargs):
1637 """CanRead(self) -> bool"""
1638 return _core_.InputStream_CanRead(*args, **kwargs)
1639
1640 def Eof(*args, **kwargs):
1641 """Eof(self) -> bool"""
1642 return _core_.InputStream_Eof(*args, **kwargs)
1643
1644 def Ungetch(*args, **kwargs):
1645 """Ungetch(self, char c) -> bool"""
1646 return _core_.InputStream_Ungetch(*args, **kwargs)
1647
1648 def SeekI(*args, **kwargs):
1649 """SeekI(self, long pos, int mode=FromStart) -> long"""
1650 return _core_.InputStream_SeekI(*args, **kwargs)
1651
1652 def TellI(*args, **kwargs):
1653 """TellI(self) -> long"""
1654 return _core_.InputStream_TellI(*args, **kwargs)
1655
1656
1657 class InputStreamPtr(InputStream):
1658 def __init__(self, this):
1659 self.this = this
1660 if not hasattr(self,"thisown"): self.thisown = 0
1661 self.__class__ = InputStream
1662 _core_.InputStream_swigregister(InputStreamPtr)
1663 DefaultPosition = cvar.DefaultPosition
1664 DefaultSize = cvar.DefaultSize
1665
1666 class OutputStream(object):
1667 """Proxy of C++ OutputStream class"""
1668 def __init__(self): raise RuntimeError, "No constructor defined"
1669 def __repr__(self):
1670 return "<%s.%s; proxy of C++ wxOutputStream instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
1671 def write(*args, **kwargs):
1672 """write(self, PyObject obj)"""
1673 return _core_.OutputStream_write(*args, **kwargs)
1674
1675
1676 class OutputStreamPtr(OutputStream):
1677 def __init__(self, this):
1678 self.this = this
1679 if not hasattr(self,"thisown"): self.thisown = 0
1680 self.__class__ = OutputStream
1681 _core_.OutputStream_swigregister(OutputStreamPtr)
1682
1683 #---------------------------------------------------------------------------
1684
1685 class FSFile(Object):
1686 """Proxy of C++ FSFile class"""
1687 def __repr__(self):
1688 return "<%s.%s; proxy of C++ wxFSFile instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
1689 def __init__(self, *args, **kwargs):
1690 """
1691 __init__(self, InputStream stream, String loc, String mimetype, String anchor,
1692 DateTime modif) -> FSFile
1693 """
1694 newobj = _core_.new_FSFile(*args, **kwargs)
1695 self.this = newobj.this
1696 self.thisown = 1
1697 del newobj.thisown
1698 self.thisown = 0 # It will normally be deleted by the user of the wx.FileSystem
1699
1700 def __del__(self, destroy=_core_.delete_FSFile):
1701 """__del__(self)"""
1702 try:
1703 if self.thisown: destroy(self)
1704 except: pass
1705
1706 def GetStream(*args, **kwargs):
1707 """GetStream(self) -> InputStream"""
1708 return _core_.FSFile_GetStream(*args, **kwargs)
1709
1710 def GetMimeType(*args, **kwargs):
1711 """GetMimeType(self) -> String"""
1712 return _core_.FSFile_GetMimeType(*args, **kwargs)
1713
1714 def GetLocation(*args, **kwargs):
1715 """GetLocation(self) -> String"""
1716 return _core_.FSFile_GetLocation(*args, **kwargs)
1717
1718 def GetAnchor(*args, **kwargs):
1719 """GetAnchor(self) -> String"""
1720 return _core_.FSFile_GetAnchor(*args, **kwargs)
1721
1722 def GetModificationTime(*args, **kwargs):
1723 """GetModificationTime(self) -> DateTime"""
1724 return _core_.FSFile_GetModificationTime(*args, **kwargs)
1725
1726
1727 class FSFilePtr(FSFile):
1728 def __init__(self, this):
1729 self.this = this
1730 if not hasattr(self,"thisown"): self.thisown = 0
1731 self.__class__ = FSFile
1732 _core_.FSFile_swigregister(FSFilePtr)
1733
1734 class CPPFileSystemHandler(object):
1735 """Proxy of C++ CPPFileSystemHandler class"""
1736 def __init__(self): raise RuntimeError, "No constructor defined"
1737 def __repr__(self):
1738 return "<%s.%s; proxy of C++ wxFileSystemHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
1739
1740 class CPPFileSystemHandlerPtr(CPPFileSystemHandler):
1741 def __init__(self, this):
1742 self.this = this
1743 if not hasattr(self,"thisown"): self.thisown = 0
1744 self.__class__ = CPPFileSystemHandler
1745 _core_.CPPFileSystemHandler_swigregister(CPPFileSystemHandlerPtr)
1746
1747 class FileSystemHandler(CPPFileSystemHandler):
1748 """Proxy of C++ FileSystemHandler class"""
1749 def __repr__(self):
1750 return "<%s.%s; proxy of C++ wxPyFileSystemHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
1751 def __init__(self, *args, **kwargs):
1752 """__init__(self) -> FileSystemHandler"""
1753 newobj = _core_.new_FileSystemHandler(*args, **kwargs)
1754 self.this = newobj.this
1755 self.thisown = 1
1756 del newobj.thisown
1757 self._setCallbackInfo(self, FileSystemHandler)
1758
1759 def _setCallbackInfo(*args, **kwargs):
1760 """_setCallbackInfo(self, PyObject self, PyObject _class)"""
1761 return _core_.FileSystemHandler__setCallbackInfo(*args, **kwargs)
1762
1763 def CanOpen(*args, **kwargs):
1764 """CanOpen(self, String location) -> bool"""
1765 return _core_.FileSystemHandler_CanOpen(*args, **kwargs)
1766
1767 def OpenFile(*args, **kwargs):
1768 """OpenFile(self, FileSystem fs, String location) -> FSFile"""
1769 return _core_.FileSystemHandler_OpenFile(*args, **kwargs)
1770
1771 def FindFirst(*args, **kwargs):
1772 """FindFirst(self, String spec, int flags=0) -> String"""
1773 return _core_.FileSystemHandler_FindFirst(*args, **kwargs)
1774
1775 def FindNext(*args, **kwargs):
1776 """FindNext(self) -> String"""
1777 return _core_.FileSystemHandler_FindNext(*args, **kwargs)
1778
1779 def GetProtocol(*args, **kwargs):
1780 """GetProtocol(self, String location) -> String"""
1781 return _core_.FileSystemHandler_GetProtocol(*args, **kwargs)
1782
1783 def GetLeftLocation(*args, **kwargs):
1784 """GetLeftLocation(self, String location) -> String"""
1785 return _core_.FileSystemHandler_GetLeftLocation(*args, **kwargs)
1786
1787 def GetAnchor(*args, **kwargs):
1788 """GetAnchor(self, String location) -> String"""
1789 return _core_.FileSystemHandler_GetAnchor(*args, **kwargs)
1790
1791 def GetRightLocation(*args, **kwargs):
1792 """GetRightLocation(self, String location) -> String"""
1793 return _core_.FileSystemHandler_GetRightLocation(*args, **kwargs)
1794
1795 def GetMimeTypeFromExt(*args, **kwargs):
1796 """GetMimeTypeFromExt(self, String location) -> String"""
1797 return _core_.FileSystemHandler_GetMimeTypeFromExt(*args, **kwargs)
1798
1799
1800 class FileSystemHandlerPtr(FileSystemHandler):
1801 def __init__(self, this):
1802 self.this = this
1803 if not hasattr(self,"thisown"): self.thisown = 0
1804 self.__class__ = FileSystemHandler
1805 _core_.FileSystemHandler_swigregister(FileSystemHandlerPtr)
1806
1807 class FileSystem(Object):
1808 """Proxy of C++ FileSystem class"""
1809 def __repr__(self):
1810 return "<%s.%s; proxy of C++ wxFileSystem instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
1811 def __init__(self, *args, **kwargs):
1812 """__init__(self) -> FileSystem"""
1813 newobj = _core_.new_FileSystem(*args, **kwargs)
1814 self.this = newobj.this
1815 self.thisown = 1
1816 del newobj.thisown
1817 def __del__(self, destroy=_core_.delete_FileSystem):
1818 """__del__(self)"""
1819 try:
1820 if self.thisown: destroy(self)
1821 except: pass
1822
1823 def ChangePathTo(*args, **kwargs):
1824 """ChangePathTo(self, String location, bool is_dir=False)"""
1825 return _core_.FileSystem_ChangePathTo(*args, **kwargs)
1826
1827 def GetPath(*args, **kwargs):
1828 """GetPath(self) -> String"""
1829 return _core_.FileSystem_GetPath(*args, **kwargs)
1830
1831 def OpenFile(*args, **kwargs):
1832 """OpenFile(self, String location) -> FSFile"""
1833 return _core_.FileSystem_OpenFile(*args, **kwargs)
1834
1835 def FindFirst(*args, **kwargs):
1836 """FindFirst(self, String spec, int flags=0) -> String"""
1837 return _core_.FileSystem_FindFirst(*args, **kwargs)
1838
1839 def FindNext(*args, **kwargs):
1840 """FindNext(self) -> String"""
1841 return _core_.FileSystem_FindNext(*args, **kwargs)
1842
1843 def AddHandler(*args, **kwargs):
1844 """AddHandler(CPPFileSystemHandler handler)"""
1845 return _core_.FileSystem_AddHandler(*args, **kwargs)
1846
1847 AddHandler = staticmethod(AddHandler)
1848 def CleanUpHandlers(*args, **kwargs):
1849 """CleanUpHandlers()"""
1850 return _core_.FileSystem_CleanUpHandlers(*args, **kwargs)
1851
1852 CleanUpHandlers = staticmethod(CleanUpHandlers)
1853 def FileNameToURL(*args, **kwargs):
1854 """FileNameToURL(String filename) -> String"""
1855 return _core_.FileSystem_FileNameToURL(*args, **kwargs)
1856
1857 FileNameToURL = staticmethod(FileNameToURL)
1858 def URLToFileName(*args, **kwargs):
1859 """URLToFileName(String url) -> String"""
1860 return _core_.FileSystem_URLToFileName(*args, **kwargs)
1861
1862 URLToFileName = staticmethod(URLToFileName)
1863
1864 class FileSystemPtr(FileSystem):
1865 def __init__(self, this):
1866 self.this = this
1867 if not hasattr(self,"thisown"): self.thisown = 0
1868 self.__class__ = FileSystem
1869 _core_.FileSystem_swigregister(FileSystemPtr)
1870
1871 def FileSystem_AddHandler(*args, **kwargs):
1872 """FileSystem_AddHandler(CPPFileSystemHandler handler)"""
1873 return _core_.FileSystem_AddHandler(*args, **kwargs)
1874
1875 def FileSystem_CleanUpHandlers(*args, **kwargs):
1876 """FileSystem_CleanUpHandlers()"""
1877 return _core_.FileSystem_CleanUpHandlers(*args, **kwargs)
1878
1879 def FileSystem_FileNameToURL(*args, **kwargs):
1880 """FileSystem_FileNameToURL(String filename) -> String"""
1881 return _core_.FileSystem_FileNameToURL(*args, **kwargs)
1882
1883 def FileSystem_URLToFileName(*args, **kwargs):
1884 """FileSystem_URLToFileName(String url) -> String"""
1885 return _core_.FileSystem_URLToFileName(*args, **kwargs)
1886
1887 class InternetFSHandler(CPPFileSystemHandler):
1888 """Proxy of C++ InternetFSHandler class"""
1889 def __repr__(self):
1890 return "<%s.%s; proxy of C++ wxInternetFSHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
1891 def __init__(self, *args, **kwargs):
1892 """__init__(self) -> InternetFSHandler"""
1893 newobj = _core_.new_InternetFSHandler(*args, **kwargs)
1894 self.this = newobj.this
1895 self.thisown = 1
1896 del newobj.thisown
1897 def CanOpen(*args, **kwargs):
1898 """CanOpen(self, String location) -> bool"""
1899 return _core_.InternetFSHandler_CanOpen(*args, **kwargs)
1900
1901 def OpenFile(*args, **kwargs):
1902 """OpenFile(self, FileSystem fs, String location) -> FSFile"""
1903 return _core_.InternetFSHandler_OpenFile(*args, **kwargs)
1904
1905
1906 class InternetFSHandlerPtr(InternetFSHandler):
1907 def __init__(self, this):
1908 self.this = this
1909 if not hasattr(self,"thisown"): self.thisown = 0
1910 self.__class__ = InternetFSHandler
1911 _core_.InternetFSHandler_swigregister(InternetFSHandlerPtr)
1912
1913 class ZipFSHandler(CPPFileSystemHandler):
1914 """Proxy of C++ ZipFSHandler class"""
1915 def __repr__(self):
1916 return "<%s.%s; proxy of C++ wxZipFSHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
1917 def __init__(self, *args, **kwargs):
1918 """__init__(self) -> ZipFSHandler"""
1919 newobj = _core_.new_ZipFSHandler(*args, **kwargs)
1920 self.this = newobj.this
1921 self.thisown = 1
1922 del newobj.thisown
1923 def CanOpen(*args, **kwargs):
1924 """CanOpen(self, String location) -> bool"""
1925 return _core_.ZipFSHandler_CanOpen(*args, **kwargs)
1926
1927 def OpenFile(*args, **kwargs):
1928 """OpenFile(self, FileSystem fs, String location) -> FSFile"""
1929 return _core_.ZipFSHandler_OpenFile(*args, **kwargs)
1930
1931 def FindFirst(*args, **kwargs):
1932 """FindFirst(self, String spec, int flags=0) -> String"""
1933 return _core_.ZipFSHandler_FindFirst(*args, **kwargs)
1934
1935 def FindNext(*args, **kwargs):
1936 """FindNext(self) -> String"""
1937 return _core_.ZipFSHandler_FindNext(*args, **kwargs)
1938
1939
1940 class ZipFSHandlerPtr(ZipFSHandler):
1941 def __init__(self, this):
1942 self.this = this
1943 if not hasattr(self,"thisown"): self.thisown = 0
1944 self.__class__ = ZipFSHandler
1945 _core_.ZipFSHandler_swigregister(ZipFSHandlerPtr)
1946
1947
1948 def __wxMemoryFSHandler_AddFile_wxImage(*args, **kwargs):
1949 """__wxMemoryFSHandler_AddFile_wxImage(String filename, Image image, long type)"""
1950 return _core_.__wxMemoryFSHandler_AddFile_wxImage(*args, **kwargs)
1951
1952 def __wxMemoryFSHandler_AddFile_wxBitmap(*args, **kwargs):
1953 """__wxMemoryFSHandler_AddFile_wxBitmap(String filename, Bitmap bitmap, long type)"""
1954 return _core_.__wxMemoryFSHandler_AddFile_wxBitmap(*args, **kwargs)
1955
1956 def __wxMemoryFSHandler_AddFile_Data(*args, **kwargs):
1957 """__wxMemoryFSHandler_AddFile_Data(String filename, PyObject data)"""
1958 return _core_.__wxMemoryFSHandler_AddFile_Data(*args, **kwargs)
1959 def MemoryFSHandler_AddFile(filename, dataItem, imgType=-1):
1960 """
1961 Add 'file' to the memory filesystem. The dataItem parameter can
1962 either be a `wx.Bitmap`, `wx.Image` or a string that can contain
1963 arbitrary data. If a bitmap or image is used then the imgType
1964 parameter should specify what kind of image file it should be
1965 written as, wx.BITMAP_TYPE_PNG, etc.
1966 """
1967 if isinstance(dataItem, wx.Image):
1968 __wxMemoryFSHandler_AddFile_wxImage(filename, dataItem, imgType)
1969 elif isinstance(dataItem, wx.Bitmap):
1970 __wxMemoryFSHandler_AddFile_wxBitmap(filename, dataItem, imgType)
1971 elif type(dataItem) == str:
1972 __wxMemoryFSHandler_AddFile_Data(filename, dataItem)
1973 else:
1974 raise TypeError, 'wx.Image, wx.Bitmap or string expected'
1975
1976 class MemoryFSHandler(CPPFileSystemHandler):
1977 """Proxy of C++ MemoryFSHandler class"""
1978 def __repr__(self):
1979 return "<%s.%s; proxy of C++ wxMemoryFSHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
1980 def __init__(self, *args, **kwargs):
1981 """__init__(self) -> MemoryFSHandler"""
1982 newobj = _core_.new_MemoryFSHandler(*args, **kwargs)
1983 self.this = newobj.this
1984 self.thisown = 1
1985 del newobj.thisown
1986 def RemoveFile(*args, **kwargs):
1987 """RemoveFile(String filename)"""
1988 return _core_.MemoryFSHandler_RemoveFile(*args, **kwargs)
1989
1990 RemoveFile = staticmethod(RemoveFile)
1991 AddFile = staticmethod(MemoryFSHandler_AddFile)
1992 def CanOpen(*args, **kwargs):
1993 """CanOpen(self, String location) -> bool"""
1994 return _core_.MemoryFSHandler_CanOpen(*args, **kwargs)
1995
1996 def OpenFile(*args, **kwargs):
1997 """OpenFile(self, FileSystem fs, String location) -> FSFile"""
1998 return _core_.MemoryFSHandler_OpenFile(*args, **kwargs)
1999
2000 def FindFirst(*args, **kwargs):
2001 """FindFirst(self, String spec, int flags=0) -> String"""
2002 return _core_.MemoryFSHandler_FindFirst(*args, **kwargs)
2003
2004 def FindNext(*args, **kwargs):
2005 """FindNext(self) -> String"""
2006 return _core_.MemoryFSHandler_FindNext(*args, **kwargs)
2007
2008
2009 class MemoryFSHandlerPtr(MemoryFSHandler):
2010 def __init__(self, this):
2011 self.this = this
2012 if not hasattr(self,"thisown"): self.thisown = 0
2013 self.__class__ = MemoryFSHandler
2014 _core_.MemoryFSHandler_swigregister(MemoryFSHandlerPtr)
2015
2016 def MemoryFSHandler_RemoveFile(*args, **kwargs):
2017 """MemoryFSHandler_RemoveFile(String filename)"""
2018 return _core_.MemoryFSHandler_RemoveFile(*args, **kwargs)
2019
2020 #---------------------------------------------------------------------------
2021
2022 class ImageHandler(Object):
2023 """Proxy of C++ ImageHandler class"""
2024 def __init__(self): raise RuntimeError, "No constructor defined"
2025 def __repr__(self):
2026 return "<%s.%s; proxy of C++ wxImageHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
2027 def GetName(*args, **kwargs):
2028 """GetName(self) -> String"""
2029 return _core_.ImageHandler_GetName(*args, **kwargs)
2030
2031 def GetExtension(*args, **kwargs):
2032 """GetExtension(self) -> String"""
2033 return _core_.ImageHandler_GetExtension(*args, **kwargs)
2034
2035 def GetType(*args, **kwargs):
2036 """GetType(self) -> long"""
2037 return _core_.ImageHandler_GetType(*args, **kwargs)
2038
2039 def GetMimeType(*args, **kwargs):
2040 """GetMimeType(self) -> String"""
2041 return _core_.ImageHandler_GetMimeType(*args, **kwargs)
2042
2043 def CanRead(*args, **kwargs):
2044 """CanRead(self, String name) -> bool"""
2045 return _core_.ImageHandler_CanRead(*args, **kwargs)
2046
2047 def SetName(*args, **kwargs):
2048 """SetName(self, String name)"""
2049 return _core_.ImageHandler_SetName(*args, **kwargs)
2050
2051 def SetExtension(*args, **kwargs):
2052 """SetExtension(self, String extension)"""
2053 return _core_.ImageHandler_SetExtension(*args, **kwargs)
2054
2055 def SetType(*args, **kwargs):
2056 """SetType(self, long type)"""
2057 return _core_.ImageHandler_SetType(*args, **kwargs)
2058
2059 def SetMimeType(*args, **kwargs):
2060 """SetMimeType(self, String mimetype)"""
2061 return _core_.ImageHandler_SetMimeType(*args, **kwargs)
2062
2063
2064 class ImageHandlerPtr(ImageHandler):
2065 def __init__(self, this):
2066 self.this = this
2067 if not hasattr(self,"thisown"): self.thisown = 0
2068 self.__class__ = ImageHandler
2069 _core_.ImageHandler_swigregister(ImageHandlerPtr)
2070
2071 class ImageHistogram(object):
2072 """Proxy of C++ ImageHistogram class"""
2073 def __repr__(self):
2074 return "<%s.%s; proxy of C++ wxImageHistogram instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
2075 def __init__(self, *args, **kwargs):
2076 """__init__(self) -> ImageHistogram"""
2077 newobj = _core_.new_ImageHistogram(*args, **kwargs)
2078 self.this = newobj.this
2079 self.thisown = 1
2080 del newobj.thisown
2081 def MakeKey(*args, **kwargs):
2082 """
2083 MakeKey(unsigned char r, unsigned char g, unsigned char b) -> unsigned long
2084
2085 Get the key in the histogram for the given RGB values
2086 """
2087 return _core_.ImageHistogram_MakeKey(*args, **kwargs)
2088
2089 MakeKey = staticmethod(MakeKey)
2090 def FindFirstUnusedColour(*args, **kwargs):
2091 """
2092 FindFirstUnusedColour(int startR=1, int startG=0, int startB=0) -> (success, r, g, b)
2093
2094 Find first colour that is not used in the image and has higher RGB
2095 values than startR, startG, startB. Returns a tuple consisting of a
2096 success flag and rgb values.
2097 """
2098 return _core_.ImageHistogram_FindFirstUnusedColour(*args, **kwargs)
2099
2100
2101 class ImageHistogramPtr(ImageHistogram):
2102 def __init__(self, this):
2103 self.this = this
2104 if not hasattr(self,"thisown"): self.thisown = 0
2105 self.__class__ = ImageHistogram
2106 _core_.ImageHistogram_swigregister(ImageHistogramPtr)
2107
2108 def ImageHistogram_MakeKey(*args, **kwargs):
2109 """
2110 ImageHistogram_MakeKey(unsigned char r, unsigned char g, unsigned char b) -> unsigned long
2111
2112 Get the key in the histogram for the given RGB values
2113 """
2114 return _core_.ImageHistogram_MakeKey(*args, **kwargs)
2115
2116 class Image(Object):
2117 """Proxy of C++ Image class"""
2118 def __repr__(self):
2119 return "<%s.%s; proxy of C++ wxImage instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
2120 def __init__(self, *args, **kwargs):
2121 """__init__(self, String name, long type=BITMAP_TYPE_ANY, int index=-1) -> Image"""
2122 newobj = _core_.new_Image(*args, **kwargs)
2123 self.this = newobj.this
2124 self.thisown = 1
2125 del newobj.thisown
2126 def __del__(self, destroy=_core_.delete_Image):
2127 """__del__(self)"""
2128 try:
2129 if self.thisown: destroy(self)
2130 except: pass
2131
2132 def Create(*args, **kwargs):
2133 """Create(self, int width, int height)"""
2134 return _core_.Image_Create(*args, **kwargs)
2135
2136 def Destroy(*args, **kwargs):
2137 """
2138 Destroy(self)
2139
2140 Deletes the C++ object this Python object is a proxy for.
2141 """
2142 return _core_.Image_Destroy(*args, **kwargs)
2143
2144 def Scale(*args, **kwargs):
2145 """Scale(self, int width, int height) -> Image"""
2146 return _core_.Image_Scale(*args, **kwargs)
2147
2148 def ShrinkBy(*args, **kwargs):
2149 """ShrinkBy(self, int xFactor, int yFactor) -> Image"""
2150 return _core_.Image_ShrinkBy(*args, **kwargs)
2151
2152 def Rescale(*args, **kwargs):
2153 """Rescale(self, int width, int height) -> Image"""
2154 return _core_.Image_Rescale(*args, **kwargs)
2155
2156 def Resize(*args, **kwargs):
2157 """Resize(self, Size size, Point pos, int r=-1, int g=-1, int b=-1) -> Image"""
2158 return _core_.Image_Resize(*args, **kwargs)
2159
2160 def SetRGB(*args, **kwargs):
2161 """SetRGB(self, int x, int y, unsigned char r, unsigned char g, unsigned char b)"""
2162 return _core_.Image_SetRGB(*args, **kwargs)
2163
2164 def SetRGBRect(*args, **kwargs):
2165 """SetRGBRect(self, Rect rect, unsigned char r, unsigned char g, unsigned char b)"""
2166 return _core_.Image_SetRGBRect(*args, **kwargs)
2167
2168 def GetRed(*args, **kwargs):
2169 """GetRed(self, int x, int y) -> unsigned char"""
2170 return _core_.Image_GetRed(*args, **kwargs)
2171
2172 def GetGreen(*args, **kwargs):
2173 """GetGreen(self, int x, int y) -> unsigned char"""
2174 return _core_.Image_GetGreen(*args, **kwargs)
2175
2176 def GetBlue(*args, **kwargs):
2177 """GetBlue(self, int x, int y) -> unsigned char"""
2178 return _core_.Image_GetBlue(*args, **kwargs)
2179
2180 def SetAlpha(*args, **kwargs):
2181 """SetAlpha(self, int x, int y, unsigned char alpha)"""
2182 return _core_.Image_SetAlpha(*args, **kwargs)
2183
2184 def GetAlpha(*args, **kwargs):
2185 """GetAlpha(self, int x, int y) -> unsigned char"""
2186 return _core_.Image_GetAlpha(*args, **kwargs)
2187
2188 def HasAlpha(*args, **kwargs):
2189 """HasAlpha(self) -> bool"""
2190 return _core_.Image_HasAlpha(*args, **kwargs)
2191
2192 def InitAlpha(*args, **kwargs):
2193 """
2194 InitAlpha(self)
2195
2196 Initializes the image alpha channel data. It is an error to call it if
2197 the image already has alpha data. If it doesn't, alpha data will be by
2198 default initialized to all pixels being fully opaque. But if the image
2199 has a a mask colour, all mask pixels will be completely transparent.
2200 """
2201 return _core_.Image_InitAlpha(*args, **kwargs)
2202
2203 def FindFirstUnusedColour(*args, **kwargs):
2204 """
2205 FindFirstUnusedColour(int startR=1, int startG=0, int startB=0) -> (success, r, g, b)
2206
2207 Find first colour that is not used in the image and has higher RGB
2208 values than startR, startG, startB. Returns a tuple consisting of a
2209 success flag and rgb values.
2210 """
2211 return _core_.Image_FindFirstUnusedColour(*args, **kwargs)
2212
2213 def ConvertAlphaToMask(*args, **kwargs):
2214 """
2215 ConvertAlphaToMask(self, byte threshold=128) -> bool
2216
2217 If the image has alpha channel, this method converts it to mask. All pixels
2218 with alpha value less than ``threshold`` are replaced with mask colour and the
2219 alpha channel is removed. Mask colour is chosen automatically using
2220 `FindFirstUnusedColour`.
2221
2222 If the image image doesn't have alpha channel, ConvertAlphaToMask does
2223 nothing.
2224 """
2225 return _core_.Image_ConvertAlphaToMask(*args, **kwargs)
2226
2227 def ConvertColourToAlpha(*args, **kwargs):
2228 """
2229 ConvertColourToAlpha(self, unsigned char r, unsigned char g, unsigned char b) -> bool
2230
2231 This method converts an image where the original alpha information is
2232 only available as a shades of a colour (actually shades of grey)
2233 typically when you draw anti-aliased text into a bitmap. The DC
2234 drawing routines draw grey values on the black background although
2235 they actually mean to draw white with differnt alpha values. This
2236 method reverses it, assuming a black (!) background and white text.
2237 The method will then fill up the whole image with the colour given.
2238 """
2239 return _core_.Image_ConvertColourToAlpha(*args, **kwargs)
2240
2241 def SetMaskFromImage(*args, **kwargs):
2242 """SetMaskFromImage(self, Image mask, byte mr, byte mg, byte mb) -> bool"""
2243 return _core_.Image_SetMaskFromImage(*args, **kwargs)
2244
2245 def CanRead(*args, **kwargs):
2246 """CanRead(String name) -> bool"""
2247 return _core_.Image_CanRead(*args, **kwargs)
2248
2249 CanRead = staticmethod(CanRead)
2250 def GetImageCount(*args, **kwargs):
2251 """GetImageCount(String name, long type=BITMAP_TYPE_ANY) -> int"""
2252 return _core_.Image_GetImageCount(*args, **kwargs)
2253
2254 GetImageCount = staticmethod(GetImageCount)
2255 def LoadFile(*args, **kwargs):
2256 """LoadFile(self, String name, long type=BITMAP_TYPE_ANY, int index=-1) -> bool"""
2257 return _core_.Image_LoadFile(*args, **kwargs)
2258
2259 def LoadMimeFile(*args, **kwargs):
2260 """LoadMimeFile(self, String name, String mimetype, int index=-1) -> bool"""
2261 return _core_.Image_LoadMimeFile(*args, **kwargs)
2262
2263 def SaveFile(*args, **kwargs):
2264 """SaveFile(self, String name, int type) -> bool"""
2265 return _core_.Image_SaveFile(*args, **kwargs)
2266
2267 def SaveMimeFile(*args, **kwargs):
2268 """SaveMimeFile(self, String name, String mimetype) -> bool"""
2269 return _core_.Image_SaveMimeFile(*args, **kwargs)
2270
2271 def CanReadStream(*args, **kwargs):
2272 """CanReadStream(InputStream stream) -> bool"""
2273 return _core_.Image_CanReadStream(*args, **kwargs)
2274
2275 CanReadStream = staticmethod(CanReadStream)
2276 def LoadStream(*args, **kwargs):
2277 """LoadStream(self, InputStream stream, long type=BITMAP_TYPE_ANY, int index=-1) -> bool"""
2278 return _core_.Image_LoadStream(*args, **kwargs)
2279
2280 def LoadMimeStream(*args, **kwargs):
2281 """LoadMimeStream(self, InputStream stream, String mimetype, int index=-1) -> bool"""
2282 return _core_.Image_LoadMimeStream(*args, **kwargs)
2283
2284 def Ok(*args, **kwargs):
2285 """Ok(self) -> bool"""
2286 return _core_.Image_Ok(*args, **kwargs)
2287
2288 def GetWidth(*args, **kwargs):
2289 """GetWidth(self) -> int"""
2290 return _core_.Image_GetWidth(*args, **kwargs)
2291
2292 def GetHeight(*args, **kwargs):
2293 """GetHeight(self) -> int"""
2294 return _core_.Image_GetHeight(*args, **kwargs)
2295
2296 def GetSize(*args, **kwargs):
2297 """GetSize(self) -> Size"""
2298 return _core_.Image_GetSize(*args, **kwargs)
2299
2300 def GetSubImage(*args, **kwargs):
2301 """GetSubImage(self, Rect rect) -> Image"""
2302 return _core_.Image_GetSubImage(*args, **kwargs)
2303
2304 def Size(*args, **kwargs):
2305 """Size(self, Size size, Point pos, int r=-1, int g=-1, int b=-1) -> Image"""
2306 return _core_.Image_Size(*args, **kwargs)
2307
2308 def Copy(*args, **kwargs):
2309 """Copy(self) -> Image"""
2310 return _core_.Image_Copy(*args, **kwargs)
2311
2312 def Paste(*args, **kwargs):
2313 """Paste(self, Image image, int x, int y)"""
2314 return _core_.Image_Paste(*args, **kwargs)
2315
2316 def GetData(*args, **kwargs):
2317 """GetData(self) -> PyObject"""
2318 return _core_.Image_GetData(*args, **kwargs)
2319
2320 def SetData(*args, **kwargs):
2321 """SetData(self, PyObject data)"""
2322 return _core_.Image_SetData(*args, **kwargs)
2323
2324 def GetDataBuffer(*args, **kwargs):
2325 """GetDataBuffer(self) -> PyObject"""
2326 return _core_.Image_GetDataBuffer(*args, **kwargs)
2327
2328 def SetDataBuffer(*args, **kwargs):
2329 """SetDataBuffer(self, PyObject data)"""
2330 return _core_.Image_SetDataBuffer(*args, **kwargs)
2331
2332 def GetAlphaData(*args, **kwargs):
2333 """GetAlphaData(self) -> PyObject"""
2334 return _core_.Image_GetAlphaData(*args, **kwargs)
2335
2336 def SetAlphaData(*args, **kwargs):
2337 """SetAlphaData(self, PyObject data)"""
2338 return _core_.Image_SetAlphaData(*args, **kwargs)
2339
2340 def GetAlphaBuffer(*args, **kwargs):
2341 """GetAlphaBuffer(self) -> PyObject"""
2342 return _core_.Image_GetAlphaBuffer(*args, **kwargs)
2343
2344 def SetAlphaBuffer(*args, **kwargs):
2345 """SetAlphaBuffer(self, PyObject data)"""
2346 return _core_.Image_SetAlphaBuffer(*args, **kwargs)
2347
2348 def SetMaskColour(*args, **kwargs):
2349 """SetMaskColour(self, unsigned char r, unsigned char g, unsigned char b)"""
2350 return _core_.Image_SetMaskColour(*args, **kwargs)
2351
2352 def GetOrFindMaskColour(*args, **kwargs):
2353 """
2354 GetOrFindMaskColour() -> (r,g,b)
2355
2356 Get the current mask colour or find a suitable colour.
2357 """
2358 return _core_.Image_GetOrFindMaskColour(*args, **kwargs)
2359
2360 def GetMaskRed(*args, **kwargs):
2361 """GetMaskRed(self) -> unsigned char"""
2362 return _core_.Image_GetMaskRed(*args, **kwargs)
2363
2364 def GetMaskGreen(*args, **kwargs):
2365 """GetMaskGreen(self) -> unsigned char"""
2366 return _core_.Image_GetMaskGreen(*args, **kwargs)
2367
2368 def GetMaskBlue(*args, **kwargs):
2369 """GetMaskBlue(self) -> unsigned char"""
2370 return _core_.Image_GetMaskBlue(*args, **kwargs)
2371
2372 def SetMask(*args, **kwargs):
2373 """SetMask(self, bool mask=True)"""
2374 return _core_.Image_SetMask(*args, **kwargs)
2375
2376 def HasMask(*args, **kwargs):
2377 """HasMask(self) -> bool"""
2378 return _core_.Image_HasMask(*args, **kwargs)
2379
2380 def Rotate(*args, **kwargs):
2381 """
2382 Rotate(self, double angle, Point centre_of_rotation, bool interpolating=True,
2383 Point offset_after_rotation=None) -> Image
2384 """
2385 return _core_.Image_Rotate(*args, **kwargs)
2386
2387 def Rotate90(*args, **kwargs):
2388 """Rotate90(self, bool clockwise=True) -> Image"""
2389 return _core_.Image_Rotate90(*args, **kwargs)
2390
2391 def Mirror(*args, **kwargs):
2392 """Mirror(self, bool horizontally=True) -> Image"""
2393 return _core_.Image_Mirror(*args, **kwargs)
2394
2395 def Replace(*args, **kwargs):
2396 """
2397 Replace(self, unsigned char r1, unsigned char g1, unsigned char b1,
2398 unsigned char r2, unsigned char g2, unsigned char b2)
2399 """
2400 return _core_.Image_Replace(*args, **kwargs)
2401
2402 def ConvertToMono(*args, **kwargs):
2403 """ConvertToMono(self, unsigned char r, unsigned char g, unsigned char b) -> Image"""
2404 return _core_.Image_ConvertToMono(*args, **kwargs)
2405
2406 def SetOption(*args, **kwargs):
2407 """SetOption(self, String name, String value)"""
2408 return _core_.Image_SetOption(*args, **kwargs)
2409
2410 def SetOptionInt(*args, **kwargs):
2411 """SetOptionInt(self, String name, int value)"""
2412 return _core_.Image_SetOptionInt(*args, **kwargs)
2413
2414 def GetOption(*args, **kwargs):
2415 """GetOption(self, String name) -> String"""
2416 return _core_.Image_GetOption(*args, **kwargs)
2417
2418 def GetOptionInt(*args, **kwargs):
2419 """GetOptionInt(self, String name) -> int"""
2420 return _core_.Image_GetOptionInt(*args, **kwargs)
2421
2422 def HasOption(*args, **kwargs):
2423 """HasOption(self, String name) -> bool"""
2424 return _core_.Image_HasOption(*args, **kwargs)
2425
2426 def CountColours(*args, **kwargs):
2427 """CountColours(self, unsigned long stopafter=(unsigned long) -1) -> unsigned long"""
2428 return _core_.Image_CountColours(*args, **kwargs)
2429
2430 def ComputeHistogram(*args, **kwargs):
2431 """ComputeHistogram(self, ImageHistogram h) -> unsigned long"""
2432 return _core_.Image_ComputeHistogram(*args, **kwargs)
2433
2434 def AddHandler(*args, **kwargs):
2435 """AddHandler(ImageHandler handler)"""
2436 return _core_.Image_AddHandler(*args, **kwargs)
2437
2438 AddHandler = staticmethod(AddHandler)
2439 def InsertHandler(*args, **kwargs):
2440 """InsertHandler(ImageHandler handler)"""
2441 return _core_.Image_InsertHandler(*args, **kwargs)
2442
2443 InsertHandler = staticmethod(InsertHandler)
2444 def RemoveHandler(*args, **kwargs):
2445 """RemoveHandler(String name) -> bool"""
2446 return _core_.Image_RemoveHandler(*args, **kwargs)
2447
2448 RemoveHandler = staticmethod(RemoveHandler)
2449 def GetImageExtWildcard(*args, **kwargs):
2450 """GetImageExtWildcard() -> String"""
2451 return _core_.Image_GetImageExtWildcard(*args, **kwargs)
2452
2453 GetImageExtWildcard = staticmethod(GetImageExtWildcard)
2454 def ConvertToBitmap(*args, **kwargs):
2455 """ConvertToBitmap(self, int depth=-1) -> Bitmap"""
2456 return _core_.Image_ConvertToBitmap(*args, **kwargs)
2457
2458 def ConvertToMonoBitmap(*args, **kwargs):
2459 """ConvertToMonoBitmap(self, unsigned char red, unsigned char green, unsigned char blue) -> Bitmap"""
2460 return _core_.Image_ConvertToMonoBitmap(*args, **kwargs)
2461
2462 def __nonzero__(self): return self.Ok()
2463
2464 class ImagePtr(Image):
2465 def __init__(self, this):
2466 self.this = this
2467 if not hasattr(self,"thisown"): self.thisown = 0
2468 self.__class__ = Image
2469 _core_.Image_swigregister(ImagePtr)
2470
2471 def ImageFromMime(*args, **kwargs):
2472 """ImageFromMime(String name, String mimetype, int index=-1) -> Image"""
2473 val = _core_.new_ImageFromMime(*args, **kwargs)
2474 val.thisown = 1
2475 return val
2476
2477 def ImageFromStream(*args, **kwargs):
2478 """ImageFromStream(InputStream stream, long type=BITMAP_TYPE_ANY, int index=-1) -> Image"""
2479 val = _core_.new_ImageFromStream(*args, **kwargs)
2480 val.thisown = 1
2481 return val
2482
2483 def ImageFromStreamMime(*args, **kwargs):
2484 """ImageFromStreamMime(InputStream stream, String mimetype, int index=-1) -> Image"""
2485 val = _core_.new_ImageFromStreamMime(*args, **kwargs)
2486 val.thisown = 1
2487 return val
2488
2489 def EmptyImage(*args, **kwargs):
2490 """EmptyImage(int width=0, int height=0, bool clear=True) -> Image"""
2491 val = _core_.new_EmptyImage(*args, **kwargs)
2492 val.thisown = 1
2493 return val
2494
2495 def ImageFromBitmap(*args, **kwargs):
2496 """ImageFromBitmap(Bitmap bitmap) -> Image"""
2497 val = _core_.new_ImageFromBitmap(*args, **kwargs)
2498 val.thisown = 1
2499 return val
2500
2501 def ImageFromData(*args, **kwargs):
2502 """ImageFromData(int width, int height, unsigned char data) -> Image"""
2503 val = _core_.new_ImageFromData(*args, **kwargs)
2504 val.thisown = 1
2505 return val
2506
2507 def ImageFromDataWithAlpha(*args, **kwargs):
2508 """ImageFromDataWithAlpha(int width, int height, unsigned char data, unsigned char alpha) -> Image"""
2509 val = _core_.new_ImageFromDataWithAlpha(*args, **kwargs)
2510 val.thisown = 1
2511 return val
2512
2513 def Image_CanRead(*args, **kwargs):
2514 """Image_CanRead(String name) -> bool"""
2515 return _core_.Image_CanRead(*args, **kwargs)
2516
2517 def Image_GetImageCount(*args, **kwargs):
2518 """Image_GetImageCount(String name, long type=BITMAP_TYPE_ANY) -> int"""
2519 return _core_.Image_GetImageCount(*args, **kwargs)
2520
2521 def Image_CanReadStream(*args, **kwargs):
2522 """Image_CanReadStream(InputStream stream) -> bool"""
2523 return _core_.Image_CanReadStream(*args, **kwargs)
2524
2525 def Image_AddHandler(*args, **kwargs):
2526 """Image_AddHandler(ImageHandler handler)"""
2527 return _core_.Image_AddHandler(*args, **kwargs)
2528
2529 def Image_InsertHandler(*args, **kwargs):
2530 """Image_InsertHandler(ImageHandler handler)"""
2531 return _core_.Image_InsertHandler(*args, **kwargs)
2532
2533 def Image_RemoveHandler(*args, **kwargs):
2534 """Image_RemoveHandler(String name) -> bool"""
2535 return _core_.Image_RemoveHandler(*args, **kwargs)
2536
2537 def Image_GetImageExtWildcard(*args, **kwargs):
2538 """Image_GetImageExtWildcard() -> String"""
2539 return _core_.Image_GetImageExtWildcard(*args, **kwargs)
2540
2541 def InitAllImageHandlers():
2542 """
2543 The former functionality of InitAllImageHanders is now done internal to
2544 the _core_ extension module and so this function has become a simple NOP.
2545 """
2546 pass
2547
2548 IMAGE_RESOLUTION_INCHES = _core_.IMAGE_RESOLUTION_INCHES
2549 IMAGE_RESOLUTION_CM = _core_.IMAGE_RESOLUTION_CM
2550 PNG_TYPE_COLOUR = _core_.PNG_TYPE_COLOUR
2551 PNG_TYPE_GREY = _core_.PNG_TYPE_GREY
2552 PNG_TYPE_GREY_RED = _core_.PNG_TYPE_GREY_RED
2553 BMP_24BPP = _core_.BMP_24BPP
2554 BMP_8BPP = _core_.BMP_8BPP
2555 BMP_8BPP_GREY = _core_.BMP_8BPP_GREY
2556 BMP_8BPP_GRAY = _core_.BMP_8BPP_GRAY
2557 BMP_8BPP_RED = _core_.BMP_8BPP_RED
2558 BMP_8BPP_PALETTE = _core_.BMP_8BPP_PALETTE
2559 BMP_4BPP = _core_.BMP_4BPP
2560 BMP_1BPP = _core_.BMP_1BPP
2561 BMP_1BPP_BW = _core_.BMP_1BPP_BW
2562 class BMPHandler(ImageHandler):
2563 """Proxy of C++ BMPHandler class"""
2564 def __repr__(self):
2565 return "<%s.%s; proxy of C++ wxBMPHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
2566 def __init__(self, *args, **kwargs):
2567 """__init__(self) -> BMPHandler"""
2568 newobj = _core_.new_BMPHandler(*args, **kwargs)
2569 self.this = newobj.this
2570 self.thisown = 1
2571 del newobj.thisown
2572
2573 class BMPHandlerPtr(BMPHandler):
2574 def __init__(self, this):
2575 self.this = this
2576 if not hasattr(self,"thisown"): self.thisown = 0
2577 self.__class__ = BMPHandler
2578 _core_.BMPHandler_swigregister(BMPHandlerPtr)
2579 NullImage = cvar.NullImage
2580 IMAGE_OPTION_FILENAME = cvar.IMAGE_OPTION_FILENAME
2581 IMAGE_OPTION_BMP_FORMAT = cvar.IMAGE_OPTION_BMP_FORMAT
2582 IMAGE_OPTION_CUR_HOTSPOT_X = cvar.IMAGE_OPTION_CUR_HOTSPOT_X
2583 IMAGE_OPTION_CUR_HOTSPOT_Y = cvar.IMAGE_OPTION_CUR_HOTSPOT_Y
2584 IMAGE_OPTION_RESOLUTION = cvar.IMAGE_OPTION_RESOLUTION
2585 IMAGE_OPTION_RESOLUTIONX = cvar.IMAGE_OPTION_RESOLUTIONX
2586 IMAGE_OPTION_RESOLUTIONY = cvar.IMAGE_OPTION_RESOLUTIONY
2587 IMAGE_OPTION_RESOLUTIONUNIT = cvar.IMAGE_OPTION_RESOLUTIONUNIT
2588 IMAGE_OPTION_QUALITY = cvar.IMAGE_OPTION_QUALITY
2589 IMAGE_OPTION_BITSPERSAMPLE = cvar.IMAGE_OPTION_BITSPERSAMPLE
2590 IMAGE_OPTION_SAMPLESPERPIXEL = cvar.IMAGE_OPTION_SAMPLESPERPIXEL
2591 IMAGE_OPTION_COMPRESSION = cvar.IMAGE_OPTION_COMPRESSION
2592 IMAGE_OPTION_IMAGEDESCRIPTOR = cvar.IMAGE_OPTION_IMAGEDESCRIPTOR
2593 IMAGE_OPTION_PNG_FORMAT = cvar.IMAGE_OPTION_PNG_FORMAT
2594 IMAGE_OPTION_PNG_BITDEPTH = cvar.IMAGE_OPTION_PNG_BITDEPTH
2595
2596 class ICOHandler(BMPHandler):
2597 """Proxy of C++ ICOHandler class"""
2598 def __repr__(self):
2599 return "<%s.%s; proxy of C++ wxICOHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
2600 def __init__(self, *args, **kwargs):
2601 """__init__(self) -> ICOHandler"""
2602 newobj = _core_.new_ICOHandler(*args, **kwargs)
2603 self.this = newobj.this
2604 self.thisown = 1
2605 del newobj.thisown
2606
2607 class ICOHandlerPtr(ICOHandler):
2608 def __init__(self, this):
2609 self.this = this
2610 if not hasattr(self,"thisown"): self.thisown = 0
2611 self.__class__ = ICOHandler
2612 _core_.ICOHandler_swigregister(ICOHandlerPtr)
2613
2614 class CURHandler(ICOHandler):
2615 """Proxy of C++ CURHandler class"""
2616 def __repr__(self):
2617 return "<%s.%s; proxy of C++ wxCURHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
2618 def __init__(self, *args, **kwargs):
2619 """__init__(self) -> CURHandler"""
2620 newobj = _core_.new_CURHandler(*args, **kwargs)
2621 self.this = newobj.this
2622 self.thisown = 1
2623 del newobj.thisown
2624
2625 class CURHandlerPtr(CURHandler):
2626 def __init__(self, this):
2627 self.this = this
2628 if not hasattr(self,"thisown"): self.thisown = 0
2629 self.__class__ = CURHandler
2630 _core_.CURHandler_swigregister(CURHandlerPtr)
2631
2632 class ANIHandler(CURHandler):
2633 """Proxy of C++ ANIHandler class"""
2634 def __repr__(self):
2635 return "<%s.%s; proxy of C++ wxANIHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
2636 def __init__(self, *args, **kwargs):
2637 """__init__(self) -> ANIHandler"""
2638 newobj = _core_.new_ANIHandler(*args, **kwargs)
2639 self.this = newobj.this
2640 self.thisown = 1
2641 del newobj.thisown
2642
2643 class ANIHandlerPtr(ANIHandler):
2644 def __init__(self, this):
2645 self.this = this
2646 if not hasattr(self,"thisown"): self.thisown = 0
2647 self.__class__ = ANIHandler
2648 _core_.ANIHandler_swigregister(ANIHandlerPtr)
2649
2650 class PNGHandler(ImageHandler):
2651 """Proxy of C++ PNGHandler class"""
2652 def __repr__(self):
2653 return "<%s.%s; proxy of C++ wxPNGHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
2654 def __init__(self, *args, **kwargs):
2655 """__init__(self) -> PNGHandler"""
2656 newobj = _core_.new_PNGHandler(*args, **kwargs)
2657 self.this = newobj.this
2658 self.thisown = 1
2659 del newobj.thisown
2660
2661 class PNGHandlerPtr(PNGHandler):
2662 def __init__(self, this):
2663 self.this = this
2664 if not hasattr(self,"thisown"): self.thisown = 0
2665 self.__class__ = PNGHandler
2666 _core_.PNGHandler_swigregister(PNGHandlerPtr)
2667
2668 class GIFHandler(ImageHandler):
2669 """Proxy of C++ GIFHandler class"""
2670 def __repr__(self):
2671 return "<%s.%s; proxy of C++ wxGIFHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
2672 def __init__(self, *args, **kwargs):
2673 """__init__(self) -> GIFHandler"""
2674 newobj = _core_.new_GIFHandler(*args, **kwargs)
2675 self.this = newobj.this
2676 self.thisown = 1
2677 del newobj.thisown
2678
2679 class GIFHandlerPtr(GIFHandler):
2680 def __init__(self, this):
2681 self.this = this
2682 if not hasattr(self,"thisown"): self.thisown = 0
2683 self.__class__ = GIFHandler
2684 _core_.GIFHandler_swigregister(GIFHandlerPtr)
2685
2686 class PCXHandler(ImageHandler):
2687 """Proxy of C++ PCXHandler class"""
2688 def __repr__(self):
2689 return "<%s.%s; proxy of C++ wxPCXHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
2690 def __init__(self, *args, **kwargs):
2691 """__init__(self) -> PCXHandler"""
2692 newobj = _core_.new_PCXHandler(*args, **kwargs)
2693 self.this = newobj.this
2694 self.thisown = 1
2695 del newobj.thisown
2696
2697 class PCXHandlerPtr(PCXHandler):
2698 def __init__(self, this):
2699 self.this = this
2700 if not hasattr(self,"thisown"): self.thisown = 0
2701 self.__class__ = PCXHandler
2702 _core_.PCXHandler_swigregister(PCXHandlerPtr)
2703
2704 class JPEGHandler(ImageHandler):
2705 """Proxy of C++ JPEGHandler class"""
2706 def __repr__(self):
2707 return "<%s.%s; proxy of C++ wxJPEGHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
2708 def __init__(self, *args, **kwargs):
2709 """__init__(self) -> JPEGHandler"""
2710 newobj = _core_.new_JPEGHandler(*args, **kwargs)
2711 self.this = newobj.this
2712 self.thisown = 1
2713 del newobj.thisown
2714
2715 class JPEGHandlerPtr(JPEGHandler):
2716 def __init__(self, this):
2717 self.this = this
2718 if not hasattr(self,"thisown"): self.thisown = 0
2719 self.__class__ = JPEGHandler
2720 _core_.JPEGHandler_swigregister(JPEGHandlerPtr)
2721
2722 class PNMHandler(ImageHandler):
2723 """Proxy of C++ PNMHandler class"""
2724 def __repr__(self):
2725 return "<%s.%s; proxy of C++ wxPNMHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
2726 def __init__(self, *args, **kwargs):
2727 """__init__(self) -> PNMHandler"""
2728 newobj = _core_.new_PNMHandler(*args, **kwargs)
2729 self.this = newobj.this
2730 self.thisown = 1
2731 del newobj.thisown
2732
2733 class PNMHandlerPtr(PNMHandler):
2734 def __init__(self, this):
2735 self.this = this
2736 if not hasattr(self,"thisown"): self.thisown = 0
2737 self.__class__ = PNMHandler
2738 _core_.PNMHandler_swigregister(PNMHandlerPtr)
2739
2740 class XPMHandler(ImageHandler):
2741 """Proxy of C++ XPMHandler class"""
2742 def __repr__(self):
2743 return "<%s.%s; proxy of C++ wxXPMHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
2744 def __init__(self, *args, **kwargs):
2745 """__init__(self) -> XPMHandler"""
2746 newobj = _core_.new_XPMHandler(*args, **kwargs)
2747 self.this = newobj.this
2748 self.thisown = 1
2749 del newobj.thisown
2750
2751 class XPMHandlerPtr(XPMHandler):
2752 def __init__(self, this):
2753 self.this = this
2754 if not hasattr(self,"thisown"): self.thisown = 0
2755 self.__class__ = XPMHandler
2756 _core_.XPMHandler_swigregister(XPMHandlerPtr)
2757
2758 class TIFFHandler(ImageHandler):
2759 """Proxy of C++ TIFFHandler class"""
2760 def __repr__(self):
2761 return "<%s.%s; proxy of C++ wxTIFFHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
2762 def __init__(self, *args, **kwargs):
2763 """__init__(self) -> TIFFHandler"""
2764 newobj = _core_.new_TIFFHandler(*args, **kwargs)
2765 self.this = newobj.this
2766 self.thisown = 1
2767 del newobj.thisown
2768
2769 class TIFFHandlerPtr(TIFFHandler):
2770 def __init__(self, this):
2771 self.this = this
2772 if not hasattr(self,"thisown"): self.thisown = 0
2773 self.__class__ = TIFFHandler
2774 _core_.TIFFHandler_swigregister(TIFFHandlerPtr)
2775
2776 QUANTIZE_INCLUDE_WINDOWS_COLOURS = _core_.QUANTIZE_INCLUDE_WINDOWS_COLOURS
2777 QUANTIZE_FILL_DESTINATION_IMAGE = _core_.QUANTIZE_FILL_DESTINATION_IMAGE
2778 class Quantize(object):
2779 """Performs quantization, or colour reduction, on a wxImage."""
2780 def __init__(self): raise RuntimeError, "No constructor defined"
2781 def __repr__(self):
2782 return "<%s.%s; proxy of C++ wxQuantize instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
2783 def Quantize(*args, **kwargs):
2784 """
2785 Quantize(Image src, Image dest, int desiredNoColours=236, int flags=wxQUANTIZE_INCLUDE_WINDOWS_COLOURS|wxQUANTIZE_FILL_DESTINATION_IMAGE) -> bool
2786
2787 Reduce the colours in the source image and put the result into the
2788 destination image, setting the palette in the destination if
2789 needed. Both images may be the same, to overwrite the source image.
2790 """
2791 return _core_.Quantize_Quantize(*args, **kwargs)
2792
2793 Quantize = staticmethod(Quantize)
2794
2795 class QuantizePtr(Quantize):
2796 def __init__(self, this):
2797 self.this = this
2798 if not hasattr(self,"thisown"): self.thisown = 0
2799 self.__class__ = Quantize
2800 _core_.Quantize_swigregister(QuantizePtr)
2801
2802 def Quantize_Quantize(*args, **kwargs):
2803 """
2804 Quantize_Quantize(Image src, Image dest, int desiredNoColours=236, int flags=wxQUANTIZE_INCLUDE_WINDOWS_COLOURS|wxQUANTIZE_FILL_DESTINATION_IMAGE) -> bool
2805
2806 Reduce the colours in the source image and put the result into the
2807 destination image, setting the palette in the destination if
2808 needed. Both images may be the same, to overwrite the source image.
2809 """
2810 return _core_.Quantize_Quantize(*args, **kwargs)
2811
2812 #---------------------------------------------------------------------------
2813
2814 class EvtHandler(Object):
2815 """Proxy of C++ EvtHandler class"""
2816 def __repr__(self):
2817 return "<%s.%s; proxy of C++ wxEvtHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
2818 def __init__(self, *args, **kwargs):
2819 """__init__(self) -> EvtHandler"""
2820 newobj = _core_.new_EvtHandler(*args, **kwargs)
2821 self.this = newobj.this
2822 self.thisown = 1
2823 del newobj.thisown
2824 def GetNextHandler(*args, **kwargs):
2825 """GetNextHandler(self) -> EvtHandler"""
2826 return _core_.EvtHandler_GetNextHandler(*args, **kwargs)
2827
2828 def GetPreviousHandler(*args, **kwargs):
2829 """GetPreviousHandler(self) -> EvtHandler"""
2830 return _core_.EvtHandler_GetPreviousHandler(*args, **kwargs)
2831
2832 def SetNextHandler(*args, **kwargs):
2833 """SetNextHandler(self, EvtHandler handler)"""
2834 return _core_.EvtHandler_SetNextHandler(*args, **kwargs)
2835
2836 def SetPreviousHandler(*args, **kwargs):
2837 """SetPreviousHandler(self, EvtHandler handler)"""
2838 return _core_.EvtHandler_SetPreviousHandler(*args, **kwargs)
2839
2840 def GetEvtHandlerEnabled(*args, **kwargs):
2841 """GetEvtHandlerEnabled(self) -> bool"""
2842 return _core_.EvtHandler_GetEvtHandlerEnabled(*args, **kwargs)
2843
2844 def SetEvtHandlerEnabled(*args, **kwargs):
2845 """SetEvtHandlerEnabled(self, bool enabled)"""
2846 return _core_.EvtHandler_SetEvtHandlerEnabled(*args, **kwargs)
2847
2848 def ProcessEvent(*args, **kwargs):
2849 """ProcessEvent(self, Event event) -> bool"""
2850 return _core_.EvtHandler_ProcessEvent(*args, **kwargs)
2851
2852 def AddPendingEvent(*args, **kwargs):
2853 """AddPendingEvent(self, Event event)"""
2854 return _core_.EvtHandler_AddPendingEvent(*args, **kwargs)
2855
2856 def ProcessPendingEvents(*args, **kwargs):
2857 """ProcessPendingEvents(self)"""
2858 return _core_.EvtHandler_ProcessPendingEvents(*args, **kwargs)
2859
2860 def Connect(*args, **kwargs):
2861 """Connect(self, int id, int lastId, int eventType, PyObject func)"""
2862 return _core_.EvtHandler_Connect(*args, **kwargs)
2863
2864 def Disconnect(*args, **kwargs):
2865 """Disconnect(self, int id, int lastId=-1, wxEventType eventType=wxEVT_NULL) -> bool"""
2866 return _core_.EvtHandler_Disconnect(*args, **kwargs)
2867
2868 def _setOORInfo(*args, **kwargs):
2869 """_setOORInfo(self, PyObject _self, bool incref=True)"""
2870 return _core_.EvtHandler__setOORInfo(*args, **kwargs)
2871
2872 def Bind(self, event, handler, source=None, id=wx.ID_ANY, id2=wx.ID_ANY):
2873 """
2874 Bind an event to an event handler.
2875
2876 :param event: One of the EVT_* objects that specifies the
2877 type of event to bind,
2878
2879 :param handler: A callable object to be invoked when the
2880 event is delivered to self. Pass None to
2881 disconnect an event handler.
2882
2883 :param source: Sometimes the event originates from a
2884 different window than self, but you still
2885 want to catch it in self. (For example, a
2886 button event delivered to a frame.) By
2887 passing the source of the event, the event
2888 handling system is able to differentiate
2889 between the same event type from different
2890 controls.
2891
2892 :param id: Used to spcify the event source by ID instead
2893 of instance.
2894
2895 :param id2: Used when it is desirable to bind a handler
2896 to a range of IDs, such as with EVT_MENU_RANGE.
2897 """
2898 if source is not None:
2899 id = source.GetId()
2900 event.Bind(self, id, id2, handler)
2901
2902 def Unbind(self, event, source=None, id=wx.ID_ANY, id2=wx.ID_ANY):
2903 """
2904 Disconencts the event handler binding for event from self.
2905 Returns True if successful.
2906 """
2907 if source is not None:
2908 id = source.GetId()
2909 return event.Unbind(self, id, id2)
2910
2911
2912 class EvtHandlerPtr(EvtHandler):
2913 def __init__(self, this):
2914 self.this = this
2915 if not hasattr(self,"thisown"): self.thisown = 0
2916 self.__class__ = EvtHandler
2917 _core_.EvtHandler_swigregister(EvtHandlerPtr)
2918
2919 #---------------------------------------------------------------------------
2920
2921 class PyEventBinder(object):
2922 """
2923 Instances of this class are used to bind specific events to event
2924 handlers.
2925 """
2926 def __init__(self, evtType, expectedIDs=0):
2927 if expectedIDs not in [0, 1, 2]:
2928 raise ValueError, "Invalid number of expectedIDs"
2929 self.expectedIDs = expectedIDs
2930
2931 if type(evtType) == list or type(evtType) == tuple:
2932 self.evtType = evtType
2933 else:
2934 self.evtType = [evtType]
2935
2936
2937 def Bind(self, target, id1, id2, function):
2938 """Bind this set of event types to target."""
2939 for et in self.evtType:
2940 target.Connect(id1, id2, et, function)
2941
2942
2943 def Unbind(self, target, id1, id2):
2944 """Remove an event binding."""
2945 success = 0
2946 for et in self.evtType:
2947 success += target.Disconnect(id1, id2, et)
2948 return success != 0
2949
2950
2951 def __call__(self, *args):
2952 """
2953 For backwards compatibility with the old EVT_* functions.
2954 Should be called with either (window, func), (window, ID,
2955 func) or (window, ID1, ID2, func) parameters depending on the
2956 type of the event.
2957 """
2958 assert len(args) == 2 + self.expectedIDs
2959 id1 = wx.ID_ANY
2960 id2 = wx.ID_ANY
2961 target = args[0]
2962 if self.expectedIDs == 0:
2963 func = args[1]
2964 elif self.expectedIDs == 1:
2965 id1 = args[1]
2966 func = args[2]
2967 elif self.expectedIDs == 2:
2968 id1 = args[1]
2969 id2 = args[2]
2970 func = args[3]
2971 else:
2972 raise ValueError, "Unexpected number of IDs"
2973
2974 self.Bind(target, id1, id2, func)
2975
2976
2977 # These two are square pegs that don't fit the PyEventBinder hole...
2978 def EVT_COMMAND(win, id, cmd, func):
2979 win.Connect(id, -1, cmd, func)
2980 def EVT_COMMAND_RANGE(win, id1, id2, cmd, func):
2981 win.Connect(id1, id2, cmd, func)
2982
2983
2984 #---------------------------------------------------------------------------
2985
2986 #---------------------------------------------------------------------------
2987
2988 EVENT_PROPAGATE_NONE = _core_.EVENT_PROPAGATE_NONE
2989 EVENT_PROPAGATE_MAX = _core_.EVENT_PROPAGATE_MAX
2990
2991 def NewEventType(*args, **kwargs):
2992 """NewEventType() -> wxEventType"""
2993 return _core_.NewEventType(*args, **kwargs)
2994 wxEVT_NULL = _core_.wxEVT_NULL
2995 wxEVT_FIRST = _core_.wxEVT_FIRST
2996 wxEVT_USER_FIRST = _core_.wxEVT_USER_FIRST
2997 wxEVT_COMMAND_BUTTON_CLICKED = _core_.wxEVT_COMMAND_BUTTON_CLICKED
2998 wxEVT_COMMAND_CHECKBOX_CLICKED = _core_.wxEVT_COMMAND_CHECKBOX_CLICKED
2999 wxEVT_COMMAND_CHOICE_SELECTED = _core_.wxEVT_COMMAND_CHOICE_SELECTED
3000 wxEVT_COMMAND_LISTBOX_SELECTED = _core_.wxEVT_COMMAND_LISTBOX_SELECTED
3001 wxEVT_COMMAND_LISTBOX_DOUBLECLICKED = _core_.wxEVT_COMMAND_LISTBOX_DOUBLECLICKED
3002 wxEVT_COMMAND_CHECKLISTBOX_TOGGLED = _core_.wxEVT_COMMAND_CHECKLISTBOX_TOGGLED
3003 wxEVT_COMMAND_MENU_SELECTED = _core_.wxEVT_COMMAND_MENU_SELECTED
3004 wxEVT_COMMAND_TOOL_CLICKED = _core_.wxEVT_COMMAND_TOOL_CLICKED
3005 wxEVT_COMMAND_SLIDER_UPDATED = _core_.wxEVT_COMMAND_SLIDER_UPDATED
3006 wxEVT_COMMAND_RADIOBOX_SELECTED = _core_.wxEVT_COMMAND_RADIOBOX_SELECTED
3007 wxEVT_COMMAND_RADIOBUTTON_SELECTED = _core_.wxEVT_COMMAND_RADIOBUTTON_SELECTED
3008 wxEVT_COMMAND_SCROLLBAR_UPDATED = _core_.wxEVT_COMMAND_SCROLLBAR_UPDATED
3009 wxEVT_COMMAND_VLBOX_SELECTED = _core_.wxEVT_COMMAND_VLBOX_SELECTED
3010 wxEVT_COMMAND_COMBOBOX_SELECTED = _core_.wxEVT_COMMAND_COMBOBOX_SELECTED
3011 wxEVT_COMMAND_TOOL_RCLICKED = _core_.wxEVT_COMMAND_TOOL_RCLICKED
3012 wxEVT_COMMAND_TOOL_ENTER = _core_.wxEVT_COMMAND_TOOL_ENTER
3013 wxEVT_LEFT_DOWN = _core_.wxEVT_LEFT_DOWN
3014 wxEVT_LEFT_UP = _core_.wxEVT_LEFT_UP
3015 wxEVT_MIDDLE_DOWN = _core_.wxEVT_MIDDLE_DOWN
3016 wxEVT_MIDDLE_UP = _core_.wxEVT_MIDDLE_UP
3017 wxEVT_RIGHT_DOWN = _core_.wxEVT_RIGHT_DOWN
3018 wxEVT_RIGHT_UP = _core_.wxEVT_RIGHT_UP
3019 wxEVT_MOTION = _core_.wxEVT_MOTION
3020 wxEVT_ENTER_WINDOW = _core_.wxEVT_ENTER_WINDOW
3021 wxEVT_LEAVE_WINDOW = _core_.wxEVT_LEAVE_WINDOW
3022 wxEVT_LEFT_DCLICK = _core_.wxEVT_LEFT_DCLICK
3023 wxEVT_MIDDLE_DCLICK = _core_.wxEVT_MIDDLE_DCLICK
3024 wxEVT_RIGHT_DCLICK = _core_.wxEVT_RIGHT_DCLICK
3025 wxEVT_SET_FOCUS = _core_.wxEVT_SET_FOCUS
3026 wxEVT_KILL_FOCUS = _core_.wxEVT_KILL_FOCUS
3027 wxEVT_CHILD_FOCUS = _core_.wxEVT_CHILD_FOCUS
3028 wxEVT_MOUSEWHEEL = _core_.wxEVT_MOUSEWHEEL
3029 wxEVT_NC_LEFT_DOWN = _core_.wxEVT_NC_LEFT_DOWN
3030 wxEVT_NC_LEFT_UP = _core_.wxEVT_NC_LEFT_UP
3031 wxEVT_NC_MIDDLE_DOWN = _core_.wxEVT_NC_MIDDLE_DOWN
3032 wxEVT_NC_MIDDLE_UP = _core_.wxEVT_NC_MIDDLE_UP
3033 wxEVT_NC_RIGHT_DOWN = _core_.wxEVT_NC_RIGHT_DOWN
3034 wxEVT_NC_RIGHT_UP = _core_.wxEVT_NC_RIGHT_UP
3035 wxEVT_NC_MOTION = _core_.wxEVT_NC_MOTION
3036 wxEVT_NC_ENTER_WINDOW = _core_.wxEVT_NC_ENTER_WINDOW
3037 wxEVT_NC_LEAVE_WINDOW = _core_.wxEVT_NC_LEAVE_WINDOW
3038 wxEVT_NC_LEFT_DCLICK = _core_.wxEVT_NC_LEFT_DCLICK
3039 wxEVT_NC_MIDDLE_DCLICK = _core_.wxEVT_NC_MIDDLE_DCLICK
3040 wxEVT_NC_RIGHT_DCLICK = _core_.wxEVT_NC_RIGHT_DCLICK
3041 wxEVT_CHAR = _core_.wxEVT_CHAR
3042 wxEVT_CHAR_HOOK = _core_.wxEVT_CHAR_HOOK
3043 wxEVT_NAVIGATION_KEY = _core_.wxEVT_NAVIGATION_KEY
3044 wxEVT_KEY_DOWN = _core_.wxEVT_KEY_DOWN
3045 wxEVT_KEY_UP = _core_.wxEVT_KEY_UP
3046 wxEVT_HOTKEY = _core_.wxEVT_HOTKEY
3047 wxEVT_SET_CURSOR = _core_.wxEVT_SET_CURSOR
3048 wxEVT_SCROLL_TOP = _core_.wxEVT_SCROLL_TOP
3049 wxEVT_SCROLL_BOTTOM = _core_.wxEVT_SCROLL_BOTTOM
3050 wxEVT_SCROLL_LINEUP = _core_.wxEVT_SCROLL_LINEUP
3051 wxEVT_SCROLL_LINEDOWN = _core_.wxEVT_SCROLL_LINEDOWN
3052 wxEVT_SCROLL_PAGEUP = _core_.wxEVT_SCROLL_PAGEUP
3053 wxEVT_SCROLL_PAGEDOWN = _core_.wxEVT_SCROLL_PAGEDOWN
3054 wxEVT_SCROLL_THUMBTRACK = _core_.wxEVT_SCROLL_THUMBTRACK
3055 wxEVT_SCROLL_THUMBRELEASE = _core_.wxEVT_SCROLL_THUMBRELEASE
3056 wxEVT_SCROLL_ENDSCROLL = _core_.wxEVT_SCROLL_ENDSCROLL
3057 wxEVT_SCROLLWIN_TOP = _core_.wxEVT_SCROLLWIN_TOP
3058 wxEVT_SCROLLWIN_BOTTOM = _core_.wxEVT_SCROLLWIN_BOTTOM
3059 wxEVT_SCROLLWIN_LINEUP = _core_.wxEVT_SCROLLWIN_LINEUP
3060 wxEVT_SCROLLWIN_LINEDOWN = _core_.wxEVT_SCROLLWIN_LINEDOWN
3061 wxEVT_SCROLLWIN_PAGEUP = _core_.wxEVT_SCROLLWIN_PAGEUP
3062 wxEVT_SCROLLWIN_PAGEDOWN = _core_.wxEVT_SCROLLWIN_PAGEDOWN
3063 wxEVT_SCROLLWIN_THUMBTRACK = _core_.wxEVT_SCROLLWIN_THUMBTRACK
3064 wxEVT_SCROLLWIN_THUMBRELEASE = _core_.wxEVT_SCROLLWIN_THUMBRELEASE
3065 wxEVT_SIZE = _core_.wxEVT_SIZE
3066 wxEVT_MOVE = _core_.wxEVT_MOVE
3067 wxEVT_CLOSE_WINDOW = _core_.wxEVT_CLOSE_WINDOW
3068 wxEVT_END_SESSION = _core_.wxEVT_END_SESSION
3069 wxEVT_QUERY_END_SESSION = _core_.wxEVT_QUERY_END_SESSION
3070 wxEVT_ACTIVATE_APP = _core_.wxEVT_ACTIVATE_APP
3071 wxEVT_POWER = _core_.wxEVT_POWER
3072 wxEVT_ACTIVATE = _core_.wxEVT_ACTIVATE
3073 wxEVT_CREATE = _core_.wxEVT_CREATE
3074 wxEVT_DESTROY = _core_.wxEVT_DESTROY
3075 wxEVT_SHOW = _core_.wxEVT_SHOW
3076 wxEVT_ICONIZE = _core_.wxEVT_ICONIZE
3077 wxEVT_MAXIMIZE = _core_.wxEVT_MAXIMIZE
3078 wxEVT_MOUSE_CAPTURE_CHANGED = _core_.wxEVT_MOUSE_CAPTURE_CHANGED
3079 wxEVT_PAINT = _core_.wxEVT_PAINT
3080 wxEVT_ERASE_BACKGROUND = _core_.wxEVT_ERASE_BACKGROUND
3081 wxEVT_NC_PAINT = _core_.wxEVT_NC_PAINT
3082 wxEVT_PAINT_ICON = _core_.wxEVT_PAINT_ICON
3083 wxEVT_MENU_OPEN = _core_.wxEVT_MENU_OPEN
3084 wxEVT_MENU_CLOSE = _core_.wxEVT_MENU_CLOSE
3085 wxEVT_MENU_HIGHLIGHT = _core_.wxEVT_MENU_HIGHLIGHT
3086 wxEVT_CONTEXT_MENU = _core_.wxEVT_CONTEXT_MENU
3087 wxEVT_SYS_COLOUR_CHANGED = _core_.wxEVT_SYS_COLOUR_CHANGED
3088 wxEVT_DISPLAY_CHANGED = _core_.wxEVT_DISPLAY_CHANGED
3089 wxEVT_SETTING_CHANGED = _core_.wxEVT_SETTING_CHANGED
3090 wxEVT_QUERY_NEW_PALETTE = _core_.wxEVT_QUERY_NEW_PALETTE
3091 wxEVT_PALETTE_CHANGED = _core_.wxEVT_PALETTE_CHANGED
3092 wxEVT_DROP_FILES = _core_.wxEVT_DROP_FILES
3093 wxEVT_DRAW_ITEM = _core_.wxEVT_DRAW_ITEM
3094 wxEVT_MEASURE_ITEM = _core_.wxEVT_MEASURE_ITEM
3095 wxEVT_COMPARE_ITEM = _core_.wxEVT_COMPARE_ITEM
3096 wxEVT_INIT_DIALOG = _core_.wxEVT_INIT_DIALOG
3097 wxEVT_IDLE = _core_.wxEVT_IDLE
3098 wxEVT_UPDATE_UI = _core_.wxEVT_UPDATE_UI
3099 wxEVT_SIZING = _core_.wxEVT_SIZING
3100 wxEVT_MOVING = _core_.wxEVT_MOVING
3101 wxEVT_COMMAND_LEFT_CLICK = _core_.wxEVT_COMMAND_LEFT_CLICK
3102 wxEVT_COMMAND_LEFT_DCLICK = _core_.wxEVT_COMMAND_LEFT_DCLICK
3103 wxEVT_COMMAND_RIGHT_CLICK = _core_.wxEVT_COMMAND_RIGHT_CLICK
3104 wxEVT_COMMAND_RIGHT_DCLICK = _core_.wxEVT_COMMAND_RIGHT_DCLICK
3105 wxEVT_COMMAND_SET_FOCUS = _core_.wxEVT_COMMAND_SET_FOCUS
3106 wxEVT_COMMAND_KILL_FOCUS = _core_.wxEVT_COMMAND_KILL_FOCUS
3107 wxEVT_COMMAND_ENTER = _core_.wxEVT_COMMAND_ENTER
3108 #
3109 # Create some event binders
3110 EVT_SIZE = wx.PyEventBinder( wxEVT_SIZE )
3111 EVT_SIZING = wx.PyEventBinder( wxEVT_SIZING )
3112 EVT_MOVE = wx.PyEventBinder( wxEVT_MOVE )
3113 EVT_MOVING = wx.PyEventBinder( wxEVT_MOVING )
3114 EVT_CLOSE = wx.PyEventBinder( wxEVT_CLOSE_WINDOW )
3115 EVT_END_SESSION = wx.PyEventBinder( wxEVT_END_SESSION )
3116 EVT_QUERY_END_SESSION = wx.PyEventBinder( wxEVT_QUERY_END_SESSION )
3117 EVT_PAINT = wx.PyEventBinder( wxEVT_PAINT )
3118 EVT_NC_PAINT = wx.PyEventBinder( wxEVT_NC_PAINT )
3119 EVT_ERASE_BACKGROUND = wx.PyEventBinder( wxEVT_ERASE_BACKGROUND )
3120 EVT_CHAR = wx.PyEventBinder( wxEVT_CHAR )
3121 EVT_KEY_DOWN = wx.PyEventBinder( wxEVT_KEY_DOWN )
3122 EVT_KEY_UP = wx.PyEventBinder( wxEVT_KEY_UP )
3123 EVT_HOTKEY = wx.PyEventBinder( wxEVT_HOTKEY, 1)
3124 EVT_CHAR_HOOK = wx.PyEventBinder( wxEVT_CHAR_HOOK )
3125 EVT_MENU_OPEN = wx.PyEventBinder( wxEVT_MENU_OPEN )
3126 EVT_MENU_CLOSE = wx.PyEventBinder( wxEVT_MENU_CLOSE )
3127 EVT_MENU_HIGHLIGHT = wx.PyEventBinder( wxEVT_MENU_HIGHLIGHT, 1)
3128 EVT_MENU_HIGHLIGHT_ALL = wx.PyEventBinder( wxEVT_MENU_HIGHLIGHT )
3129 EVT_SET_FOCUS = wx.PyEventBinder( wxEVT_SET_FOCUS )
3130 EVT_KILL_FOCUS = wx.PyEventBinder( wxEVT_KILL_FOCUS )
3131 EVT_CHILD_FOCUS = wx.PyEventBinder( wxEVT_CHILD_FOCUS )
3132 EVT_ACTIVATE = wx.PyEventBinder( wxEVT_ACTIVATE )
3133 EVT_ACTIVATE_APP = wx.PyEventBinder( wxEVT_ACTIVATE_APP )
3134 EVT_END_SESSION = wx.PyEventBinder( wxEVT_END_SESSION )
3135 EVT_QUERY_END_SESSION = wx.PyEventBinder( wxEVT_QUERY_END_SESSION )
3136 EVT_DROP_FILES = wx.PyEventBinder( wxEVT_DROP_FILES )
3137 EVT_INIT_DIALOG = wx.PyEventBinder( wxEVT_INIT_DIALOG )
3138 EVT_SYS_COLOUR_CHANGED = wx.PyEventBinder( wxEVT_SYS_COLOUR_CHANGED )
3139 EVT_DISPLAY_CHANGED = wx.PyEventBinder( wxEVT_DISPLAY_CHANGED )
3140 EVT_SHOW = wx.PyEventBinder( wxEVT_SHOW )
3141 EVT_MAXIMIZE = wx.PyEventBinder( wxEVT_MAXIMIZE )
3142 EVT_ICONIZE = wx.PyEventBinder( wxEVT_ICONIZE )
3143 EVT_NAVIGATION_KEY = wx.PyEventBinder( wxEVT_NAVIGATION_KEY )
3144 EVT_PALETTE_CHANGED = wx.PyEventBinder( wxEVT_PALETTE_CHANGED )
3145 EVT_QUERY_NEW_PALETTE = wx.PyEventBinder( wxEVT_QUERY_NEW_PALETTE )
3146 EVT_WINDOW_CREATE = wx.PyEventBinder( wxEVT_CREATE )
3147 EVT_WINDOW_DESTROY = wx.PyEventBinder( wxEVT_DESTROY )
3148 EVT_SET_CURSOR = wx.PyEventBinder( wxEVT_SET_CURSOR )
3149 EVT_MOUSE_CAPTURE_CHANGED = wx.PyEventBinder( wxEVT_MOUSE_CAPTURE_CHANGED )
3150
3151 EVT_LEFT_DOWN = wx.PyEventBinder( wxEVT_LEFT_DOWN )
3152 EVT_LEFT_UP = wx.PyEventBinder( wxEVT_LEFT_UP )
3153 EVT_MIDDLE_DOWN = wx.PyEventBinder( wxEVT_MIDDLE_DOWN )
3154 EVT_MIDDLE_UP = wx.PyEventBinder( wxEVT_MIDDLE_UP )
3155 EVT_RIGHT_DOWN = wx.PyEventBinder( wxEVT_RIGHT_DOWN )
3156 EVT_RIGHT_UP = wx.PyEventBinder( wxEVT_RIGHT_UP )
3157 EVT_MOTION = wx.PyEventBinder( wxEVT_MOTION )
3158 EVT_LEFT_DCLICK = wx.PyEventBinder( wxEVT_LEFT_DCLICK )
3159 EVT_MIDDLE_DCLICK = wx.PyEventBinder( wxEVT_MIDDLE_DCLICK )
3160 EVT_RIGHT_DCLICK = wx.PyEventBinder( wxEVT_RIGHT_DCLICK )
3161 EVT_LEAVE_WINDOW = wx.PyEventBinder( wxEVT_LEAVE_WINDOW )
3162 EVT_ENTER_WINDOW = wx.PyEventBinder( wxEVT_ENTER_WINDOW )
3163 EVT_MOUSEWHEEL = wx.PyEventBinder( wxEVT_MOUSEWHEEL )
3164
3165 EVT_MOUSE_EVENTS = wx.PyEventBinder([ wxEVT_LEFT_DOWN,
3166 wxEVT_LEFT_UP,
3167 wxEVT_MIDDLE_DOWN,
3168 wxEVT_MIDDLE_UP,
3169 wxEVT_RIGHT_DOWN,
3170 wxEVT_RIGHT_UP,
3171 wxEVT_MOTION,
3172 wxEVT_LEFT_DCLICK,
3173 wxEVT_MIDDLE_DCLICK,
3174 wxEVT_RIGHT_DCLICK,
3175 wxEVT_ENTER_WINDOW,
3176 wxEVT_LEAVE_WINDOW,
3177 wxEVT_MOUSEWHEEL
3178 ])
3179
3180
3181 # Scrolling from wxWindow (sent to wxScrolledWindow)
3182 EVT_SCROLLWIN = wx.PyEventBinder([ wxEVT_SCROLLWIN_TOP,
3183 wxEVT_SCROLLWIN_BOTTOM,
3184 wxEVT_SCROLLWIN_LINEUP,
3185 wxEVT_SCROLLWIN_LINEDOWN,
3186 wxEVT_SCROLLWIN_PAGEUP,
3187 wxEVT_SCROLLWIN_PAGEDOWN,
3188 wxEVT_SCROLLWIN_THUMBTRACK,
3189 wxEVT_SCROLLWIN_THUMBRELEASE,
3190 ])
3191
3192 EVT_SCROLLWIN_TOP = wx.PyEventBinder( wxEVT_SCROLLWIN_TOP )
3193 EVT_SCROLLWIN_BOTTOM = wx.PyEventBinder( wxEVT_SCROLLWIN_BOTTOM )
3194 EVT_SCROLLWIN_LINEUP = wx.PyEventBinder( wxEVT_SCROLLWIN_LINEUP )
3195 EVT_SCROLLWIN_LINEDOWN = wx.PyEventBinder( wxEVT_SCROLLWIN_LINEDOWN )
3196 EVT_SCROLLWIN_PAGEUP = wx.PyEventBinder( wxEVT_SCROLLWIN_PAGEUP )
3197 EVT_SCROLLWIN_PAGEDOWN = wx.PyEventBinder( wxEVT_SCROLLWIN_PAGEDOWN )
3198 EVT_SCROLLWIN_THUMBTRACK = wx.PyEventBinder( wxEVT_SCROLLWIN_THUMBTRACK )
3199 EVT_SCROLLWIN_THUMBRELEASE = wx.PyEventBinder( wxEVT_SCROLLWIN_THUMBRELEASE )
3200
3201 # Scrolling from wxSlider and wxScrollBar
3202 EVT_SCROLL = wx.PyEventBinder([ wxEVT_SCROLL_TOP,
3203 wxEVT_SCROLL_BOTTOM,
3204 wxEVT_SCROLL_LINEUP,
3205 wxEVT_SCROLL_LINEDOWN,
3206 wxEVT_SCROLL_PAGEUP,
3207 wxEVT_SCROLL_PAGEDOWN,
3208 wxEVT_SCROLL_THUMBTRACK,
3209 wxEVT_SCROLL_THUMBRELEASE,
3210 wxEVT_SCROLL_ENDSCROLL,
3211 ])
3212
3213 EVT_SCROLL_TOP = wx.PyEventBinder( wxEVT_SCROLL_TOP )
3214 EVT_SCROLL_BOTTOM = wx.PyEventBinder( wxEVT_SCROLL_BOTTOM )
3215 EVT_SCROLL_LINEUP = wx.PyEventBinder( wxEVT_SCROLL_LINEUP )
3216 EVT_SCROLL_LINEDOWN = wx.PyEventBinder( wxEVT_SCROLL_LINEDOWN )
3217 EVT_SCROLL_PAGEUP = wx.PyEventBinder( wxEVT_SCROLL_PAGEUP )
3218 EVT_SCROLL_PAGEDOWN = wx.PyEventBinder( wxEVT_SCROLL_PAGEDOWN )
3219 EVT_SCROLL_THUMBTRACK = wx.PyEventBinder( wxEVT_SCROLL_THUMBTRACK )
3220 EVT_SCROLL_THUMBRELEASE = wx.PyEventBinder( wxEVT_SCROLL_THUMBRELEASE )
3221 EVT_SCROLL_ENDSCROLL = wx.PyEventBinder( wxEVT_SCROLL_ENDSCROLL )
3222
3223 # Scrolling from wxSlider and wxScrollBar, with an id
3224 EVT_COMMAND_SCROLL = wx.PyEventBinder([ wxEVT_SCROLL_TOP,
3225 wxEVT_SCROLL_BOTTOM,
3226 wxEVT_SCROLL_LINEUP,
3227 wxEVT_SCROLL_LINEDOWN,
3228 wxEVT_SCROLL_PAGEUP,
3229 wxEVT_SCROLL_PAGEDOWN,
3230 wxEVT_SCROLL_THUMBTRACK,
3231 wxEVT_SCROLL_THUMBRELEASE,
3232 wxEVT_SCROLL_ENDSCROLL,
3233 ], 1)
3234
3235 EVT_COMMAND_SCROLL_TOP = wx.PyEventBinder( wxEVT_SCROLL_TOP, 1)
3236 EVT_COMMAND_SCROLL_BOTTOM = wx.PyEventBinder( wxEVT_SCROLL_BOTTOM, 1)
3237 EVT_COMMAND_SCROLL_LINEUP = wx.PyEventBinder( wxEVT_SCROLL_LINEUP, 1)
3238 EVT_COMMAND_SCROLL_LINEDOWN = wx.PyEventBinder( wxEVT_SCROLL_LINEDOWN, 1)
3239 EVT_COMMAND_SCROLL_PAGEUP = wx.PyEventBinder( wxEVT_SCROLL_PAGEUP, 1)
3240 EVT_COMMAND_SCROLL_PAGEDOWN = wx.PyEventBinder( wxEVT_SCROLL_PAGEDOWN, 1)
3241 EVT_COMMAND_SCROLL_THUMBTRACK = wx.PyEventBinder( wxEVT_SCROLL_THUMBTRACK, 1)
3242 EVT_COMMAND_SCROLL_THUMBRELEASE = wx.PyEventBinder( wxEVT_SCROLL_THUMBRELEASE, 1)
3243 EVT_COMMAND_SCROLL_ENDSCROLL = wx.PyEventBinder( wxEVT_SCROLL_ENDSCROLL, 1)
3244
3245 EVT_BUTTON = wx.PyEventBinder( wxEVT_COMMAND_BUTTON_CLICKED, 1)
3246 EVT_CHECKBOX = wx.PyEventBinder( wxEVT_COMMAND_CHECKBOX_CLICKED, 1)
3247 EVT_CHOICE = wx.PyEventBinder( wxEVT_COMMAND_CHOICE_SELECTED, 1)
3248 EVT_LISTBOX = wx.PyEventBinder( wxEVT_COMMAND_LISTBOX_SELECTED, 1)
3249 EVT_LISTBOX_DCLICK = wx.PyEventBinder( wxEVT_COMMAND_LISTBOX_DOUBLECLICKED, 1)
3250 EVT_MENU = wx.PyEventBinder( wxEVT_COMMAND_MENU_SELECTED, 1)
3251 EVT_MENU_RANGE = wx.PyEventBinder( wxEVT_COMMAND_MENU_SELECTED, 2)
3252 EVT_SLIDER = wx.PyEventBinder( wxEVT_COMMAND_SLIDER_UPDATED, 1)
3253 EVT_RADIOBOX = wx.PyEventBinder( wxEVT_COMMAND_RADIOBOX_SELECTED, 1)
3254 EVT_RADIOBUTTON = wx.PyEventBinder( wxEVT_COMMAND_RADIOBUTTON_SELECTED, 1)
3255
3256 EVT_SCROLLBAR = wx.PyEventBinder( wxEVT_COMMAND_SCROLLBAR_UPDATED, 1)
3257 EVT_VLBOX = wx.PyEventBinder( wxEVT_COMMAND_VLBOX_SELECTED, 1)
3258 EVT_COMBOBOX = wx.PyEventBinder( wxEVT_COMMAND_COMBOBOX_SELECTED, 1)
3259 EVT_TOOL = wx.PyEventBinder( wxEVT_COMMAND_TOOL_CLICKED, 1)
3260 EVT_TOOL_RANGE = wx.PyEventBinder( wxEVT_COMMAND_TOOL_CLICKED, 2)
3261 EVT_TOOL_RCLICKED = wx.PyEventBinder( wxEVT_COMMAND_TOOL_RCLICKED, 1)
3262 EVT_TOOL_RCLICKED_RANGE = wx.PyEventBinder( wxEVT_COMMAND_TOOL_RCLICKED, 2)
3263 EVT_TOOL_ENTER = wx.PyEventBinder( wxEVT_COMMAND_TOOL_ENTER, 1)
3264 EVT_CHECKLISTBOX = wx.PyEventBinder( wxEVT_COMMAND_CHECKLISTBOX_TOGGLED, 1)
3265
3266
3267 EVT_COMMAND_LEFT_CLICK = wx.PyEventBinder( wxEVT_COMMAND_LEFT_CLICK, 1)
3268 EVT_COMMAND_LEFT_DCLICK = wx.PyEventBinder( wxEVT_COMMAND_LEFT_DCLICK, 1)
3269 EVT_COMMAND_RIGHT_CLICK = wx.PyEventBinder( wxEVT_COMMAND_RIGHT_CLICK, 1)
3270 EVT_COMMAND_RIGHT_DCLICK = wx.PyEventBinder( wxEVT_COMMAND_RIGHT_DCLICK, 1)
3271 EVT_COMMAND_SET_FOCUS = wx.PyEventBinder( wxEVT_COMMAND_SET_FOCUS, 1)
3272 EVT_COMMAND_KILL_FOCUS = wx.PyEventBinder( wxEVT_COMMAND_KILL_FOCUS, 1)
3273 EVT_COMMAND_ENTER = wx.PyEventBinder( wxEVT_COMMAND_ENTER, 1)
3274
3275 EVT_IDLE = wx.PyEventBinder( wxEVT_IDLE )
3276
3277 EVT_UPDATE_UI = wx.PyEventBinder( wxEVT_UPDATE_UI, 1)
3278 EVT_UPDATE_UI_RANGE = wx.PyEventBinder( wxEVT_UPDATE_UI, 2)
3279
3280 EVT_CONTEXT_MENU = wx.PyEventBinder( wxEVT_CONTEXT_MENU )
3281
3282
3283
3284 #---------------------------------------------------------------------------
3285
3286 class Event(Object):
3287 """Proxy of C++ Event class"""
3288 def __init__(self): raise RuntimeError, "No constructor defined"
3289 def __repr__(self):
3290 return "<%s.%s; proxy of C++ wxEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
3291 def __del__(self, destroy=_core_.delete_Event):
3292 """__del__(self)"""
3293 try:
3294 if self.thisown: destroy(self)
3295 except: pass
3296
3297 def SetEventType(*args, **kwargs):
3298 """SetEventType(self, wxEventType typ)"""
3299 return _core_.Event_SetEventType(*args, **kwargs)
3300
3301 def GetEventType(*args, **kwargs):
3302 """GetEventType(self) -> wxEventType"""
3303 return _core_.Event_GetEventType(*args, **kwargs)
3304
3305 def GetEventObject(*args, **kwargs):
3306 """GetEventObject(self) -> Object"""
3307 return _core_.Event_GetEventObject(*args, **kwargs)
3308
3309 def SetEventObject(*args, **kwargs):
3310 """SetEventObject(self, Object obj)"""
3311 return _core_.Event_SetEventObject(*args, **kwargs)
3312
3313 def GetTimestamp(*args, **kwargs):
3314 """GetTimestamp(self) -> long"""
3315 return _core_.Event_GetTimestamp(*args, **kwargs)
3316
3317 def SetTimestamp(*args, **kwargs):
3318 """SetTimestamp(self, long ts=0)"""
3319 return _core_.Event_SetTimestamp(*args, **kwargs)
3320
3321 def GetId(*args, **kwargs):
3322 """GetId(self) -> int"""
3323 return _core_.Event_GetId(*args, **kwargs)
3324
3325 def SetId(*args, **kwargs):
3326 """SetId(self, int Id)"""
3327 return _core_.Event_SetId(*args, **kwargs)
3328
3329 def IsCommandEvent(*args, **kwargs):
3330 """IsCommandEvent(self) -> bool"""
3331 return _core_.Event_IsCommandEvent(*args, **kwargs)
3332
3333 def Skip(*args, **kwargs):
3334 """
3335 Skip(self, bool skip=True)
3336
3337 Called by an event handler, it controls whether additional event
3338 handlers bound to this event will be called after the current event
3339 handler returns. Skip(false) (the default setting) will prevent
3340 additional event handlers from being called and control will be
3341 returned to the sender of the event immediately after the current
3342 handler has finished. Skip(True) will cause the event processing
3343 system to continue searching for a handler function for this event.
3344
3345 """
3346 return _core_.Event_Skip(*args, **kwargs)
3347
3348 def GetSkipped(*args, **kwargs):
3349 """GetSkipped(self) -> bool"""
3350 return _core_.Event_GetSkipped(*args, **kwargs)
3351
3352 def ShouldPropagate(*args, **kwargs):
3353 """ShouldPropagate(self) -> bool"""
3354 return _core_.Event_ShouldPropagate(*args, **kwargs)
3355
3356 def StopPropagation(*args, **kwargs):
3357 """StopPropagation(self) -> int"""
3358 return _core_.Event_StopPropagation(*args, **kwargs)
3359
3360 def ResumePropagation(*args, **kwargs):
3361 """ResumePropagation(self, int propagationLevel)"""
3362 return _core_.Event_ResumePropagation(*args, **kwargs)
3363
3364 def Clone(*args, **kwargs):
3365 """Clone(self) -> Event"""
3366 return _core_.Event_Clone(*args, **kwargs)
3367
3368
3369 class EventPtr(Event):
3370 def __init__(self, this):
3371 self.this = this
3372 if not hasattr(self,"thisown"): self.thisown = 0
3373 self.__class__ = Event
3374 _core_.Event_swigregister(EventPtr)
3375
3376 #---------------------------------------------------------------------------
3377
3378 class PropagationDisabler(object):
3379 """Proxy of C++ PropagationDisabler class"""
3380 def __repr__(self):
3381 return "<%s.%s; proxy of C++ wxPropagationDisabler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
3382 def __init__(self, *args, **kwargs):
3383 """__init__(self, Event event) -> PropagationDisabler"""
3384 newobj = _core_.new_PropagationDisabler(*args, **kwargs)
3385 self.this = newobj.this
3386 self.thisown = 1
3387 del newobj.thisown
3388 def __del__(self, destroy=_core_.delete_PropagationDisabler):
3389 """__del__(self)"""
3390 try:
3391 if self.thisown: destroy(self)
3392 except: pass
3393
3394
3395 class PropagationDisablerPtr(PropagationDisabler):
3396 def __init__(self, this):
3397 self.this = this
3398 if not hasattr(self,"thisown"): self.thisown = 0
3399 self.__class__ = PropagationDisabler
3400 _core_.PropagationDisabler_swigregister(PropagationDisablerPtr)
3401
3402 class PropagateOnce(object):
3403 """Proxy of C++ PropagateOnce class"""
3404 def __repr__(self):
3405 return "<%s.%s; proxy of C++ wxPropagateOnce instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
3406 def __init__(self, *args, **kwargs):
3407 """__init__(self, Event event) -> PropagateOnce"""
3408 newobj = _core_.new_PropagateOnce(*args, **kwargs)
3409 self.this = newobj.this
3410 self.thisown = 1
3411 del newobj.thisown
3412 def __del__(self, destroy=_core_.delete_PropagateOnce):
3413 """__del__(self)"""
3414 try:
3415 if self.thisown: destroy(self)
3416 except: pass
3417
3418
3419 class PropagateOncePtr(PropagateOnce):
3420 def __init__(self, this):
3421 self.this = this
3422 if not hasattr(self,"thisown"): self.thisown = 0
3423 self.__class__ = PropagateOnce
3424 _core_.PropagateOnce_swigregister(PropagateOncePtr)
3425
3426 #---------------------------------------------------------------------------
3427
3428 class CommandEvent(Event):
3429 """Proxy of C++ CommandEvent class"""
3430 def __repr__(self):
3431 return "<%s.%s; proxy of C++ wxCommandEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
3432 def __init__(self, *args, **kwargs):
3433 """__init__(self, wxEventType commandType=wxEVT_NULL, int winid=0) -> CommandEvent"""
3434 newobj = _core_.new_CommandEvent(*args, **kwargs)
3435 self.this = newobj.this
3436 self.thisown = 1
3437 del newobj.thisown
3438 def GetSelection(*args, **kwargs):
3439 """GetSelection(self) -> int"""
3440 return _core_.CommandEvent_GetSelection(*args, **kwargs)
3441
3442 def SetString(*args, **kwargs):
3443 """SetString(self, String s)"""
3444 return _core_.CommandEvent_SetString(*args, **kwargs)
3445
3446 def GetString(*args, **kwargs):
3447 """GetString(self) -> String"""
3448 return _core_.CommandEvent_GetString(*args, **kwargs)
3449
3450 def IsChecked(*args, **kwargs):
3451 """IsChecked(self) -> bool"""
3452 return _core_.CommandEvent_IsChecked(*args, **kwargs)
3453
3454 Checked = IsChecked
3455 def IsSelection(*args, **kwargs):
3456 """IsSelection(self) -> bool"""
3457 return _core_.CommandEvent_IsSelection(*args, **kwargs)
3458
3459 def SetExtraLong(*args, **kwargs):
3460 """SetExtraLong(self, long extraLong)"""
3461 return _core_.CommandEvent_SetExtraLong(*args, **kwargs)
3462
3463 def GetExtraLong(*args, **kwargs):
3464 """GetExtraLong(self) -> long"""
3465 return _core_.CommandEvent_GetExtraLong(*args, **kwargs)
3466
3467 def SetInt(*args, **kwargs):
3468 """SetInt(self, int i)"""
3469 return _core_.CommandEvent_SetInt(*args, **kwargs)
3470
3471 def GetInt(*args, **kwargs):
3472 """GetInt(self) -> long"""
3473 return _core_.CommandEvent_GetInt(*args, **kwargs)
3474
3475 def Clone(*args, **kwargs):
3476 """Clone(self) -> Event"""
3477 return _core_.CommandEvent_Clone(*args, **kwargs)
3478
3479
3480 class CommandEventPtr(CommandEvent):
3481 def __init__(self, this):
3482 self.this = this
3483 if not hasattr(self,"thisown"): self.thisown = 0
3484 self.__class__ = CommandEvent
3485 _core_.CommandEvent_swigregister(CommandEventPtr)
3486
3487 #---------------------------------------------------------------------------
3488
3489 class NotifyEvent(CommandEvent):
3490 """Proxy of C++ NotifyEvent class"""
3491 def __repr__(self):
3492 return "<%s.%s; proxy of C++ wxNotifyEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
3493 def __init__(self, *args, **kwargs):
3494 """__init__(self, wxEventType commandType=wxEVT_NULL, int winid=0) -> NotifyEvent"""
3495 newobj = _core_.new_NotifyEvent(*args, **kwargs)
3496 self.this = newobj.this
3497 self.thisown = 1
3498 del newobj.thisown
3499 def Veto(*args, **kwargs):
3500 """Veto(self)"""
3501 return _core_.NotifyEvent_Veto(*args, **kwargs)
3502
3503 def Allow(*args, **kwargs):
3504 """Allow(self)"""
3505 return _core_.NotifyEvent_Allow(*args, **kwargs)
3506
3507 def IsAllowed(*args, **kwargs):
3508 """IsAllowed(self) -> bool"""
3509 return _core_.NotifyEvent_IsAllowed(*args, **kwargs)
3510
3511
3512 class NotifyEventPtr(NotifyEvent):
3513 def __init__(self, this):
3514 self.this = this
3515 if not hasattr(self,"thisown"): self.thisown = 0
3516 self.__class__ = NotifyEvent
3517 _core_.NotifyEvent_swigregister(NotifyEventPtr)
3518
3519 #---------------------------------------------------------------------------
3520
3521 class ScrollEvent(CommandEvent):
3522 """Proxy of C++ ScrollEvent class"""
3523 def __repr__(self):
3524 return "<%s.%s; proxy of C++ wxScrollEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
3525 def __init__(self, *args, **kwargs):
3526 """
3527 __init__(self, wxEventType commandType=wxEVT_NULL, int winid=0, int pos=0,
3528 int orient=0) -> ScrollEvent
3529 """
3530 newobj = _core_.new_ScrollEvent(*args, **kwargs)
3531 self.this = newobj.this
3532 self.thisown = 1
3533 del newobj.thisown
3534 def GetOrientation(*args, **kwargs):
3535 """GetOrientation(self) -> int"""
3536 return _core_.ScrollEvent_GetOrientation(*args, **kwargs)
3537
3538 def GetPosition(*args, **kwargs):
3539 """GetPosition(self) -> int"""
3540 return _core_.ScrollEvent_GetPosition(*args, **kwargs)
3541
3542 def SetOrientation(*args, **kwargs):
3543 """SetOrientation(self, int orient)"""
3544 return _core_.ScrollEvent_SetOrientation(*args, **kwargs)
3545
3546 def SetPosition(*args, **kwargs):
3547 """SetPosition(self, int pos)"""
3548 return _core_.ScrollEvent_SetPosition(*args, **kwargs)
3549
3550
3551 class ScrollEventPtr(ScrollEvent):
3552 def __init__(self, this):
3553 self.this = this
3554 if not hasattr(self,"thisown"): self.thisown = 0
3555 self.__class__ = ScrollEvent
3556 _core_.ScrollEvent_swigregister(ScrollEventPtr)
3557
3558 #---------------------------------------------------------------------------
3559
3560 class ScrollWinEvent(Event):
3561 """Proxy of C++ ScrollWinEvent class"""
3562 def __repr__(self):
3563 return "<%s.%s; proxy of C++ wxScrollWinEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
3564 def __init__(self, *args, **kwargs):
3565 """__init__(self, wxEventType commandType=wxEVT_NULL, int pos=0, int orient=0) -> ScrollWinEvent"""
3566 newobj = _core_.new_ScrollWinEvent(*args, **kwargs)
3567 self.this = newobj.this
3568 self.thisown = 1
3569 del newobj.thisown
3570 def GetOrientation(*args, **kwargs):
3571 """GetOrientation(self) -> int"""
3572 return _core_.ScrollWinEvent_GetOrientation(*args, **kwargs)
3573
3574 def GetPosition(*args, **kwargs):
3575 """GetPosition(self) -> int"""
3576 return _core_.ScrollWinEvent_GetPosition(*args, **kwargs)
3577
3578 def SetOrientation(*args, **kwargs):
3579 """SetOrientation(self, int orient)"""
3580 return _core_.ScrollWinEvent_SetOrientation(*args, **kwargs)
3581
3582 def SetPosition(*args, **kwargs):
3583 """SetPosition(self, int pos)"""
3584 return _core_.ScrollWinEvent_SetPosition(*args, **kwargs)
3585
3586
3587 class ScrollWinEventPtr(ScrollWinEvent):
3588 def __init__(self, this):
3589 self.this = this
3590 if not hasattr(self,"thisown"): self.thisown = 0
3591 self.__class__ = ScrollWinEvent
3592 _core_.ScrollWinEvent_swigregister(ScrollWinEventPtr)
3593
3594 #---------------------------------------------------------------------------
3595
3596 MOUSE_BTN_ANY = _core_.MOUSE_BTN_ANY
3597 MOUSE_BTN_NONE = _core_.MOUSE_BTN_NONE
3598 MOUSE_BTN_LEFT = _core_.MOUSE_BTN_LEFT
3599 MOUSE_BTN_MIDDLE = _core_.MOUSE_BTN_MIDDLE
3600 MOUSE_BTN_RIGHT = _core_.MOUSE_BTN_RIGHT
3601 class MouseEvent(Event):
3602 """Proxy of C++ MouseEvent class"""
3603 def __repr__(self):
3604 return "<%s.%s; proxy of C++ wxMouseEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
3605 def __init__(self, *args, **kwargs):
3606 """__init__(self, wxEventType mouseType=wxEVT_NULL) -> MouseEvent"""
3607 newobj = _core_.new_MouseEvent(*args, **kwargs)
3608 self.this = newobj.this
3609 self.thisown = 1
3610 del newobj.thisown
3611 def IsButton(*args, **kwargs):
3612 """IsButton(self) -> bool"""
3613 return _core_.MouseEvent_IsButton(*args, **kwargs)
3614
3615 def ButtonDown(*args, **kwargs):
3616 """ButtonDown(self, int but=MOUSE_BTN_ANY) -> bool"""
3617 return _core_.MouseEvent_ButtonDown(*args, **kwargs)
3618
3619 def ButtonDClick(*args, **kwargs):
3620 """ButtonDClick(self, int but=MOUSE_BTN_ANY) -> bool"""
3621 return _core_.MouseEvent_ButtonDClick(*args, **kwargs)
3622
3623 def ButtonUp(*args, **kwargs):
3624 """ButtonUp(self, int but=MOUSE_BTN_ANY) -> bool"""
3625 return _core_.MouseEvent_ButtonUp(*args, **kwargs)
3626
3627 def Button(*args, **kwargs):
3628 """Button(self, int but) -> bool"""
3629 return _core_.MouseEvent_Button(*args, **kwargs)
3630
3631 def ButtonIsDown(*args, **kwargs):
3632 """ButtonIsDown(self, int but) -> bool"""
3633 return _core_.MouseEvent_ButtonIsDown(*args, **kwargs)
3634
3635 def GetButton(*args, **kwargs):
3636 """GetButton(self) -> int"""
3637 return _core_.MouseEvent_GetButton(*args, **kwargs)
3638
3639 def ControlDown(*args, **kwargs):
3640 """ControlDown(self) -> bool"""
3641 return _core_.MouseEvent_ControlDown(*args, **kwargs)
3642
3643 def MetaDown(*args, **kwargs):
3644 """MetaDown(self) -> bool"""
3645 return _core_.MouseEvent_MetaDown(*args, **kwargs)
3646
3647 def AltDown(*args, **kwargs):
3648 """AltDown(self) -> bool"""
3649 return _core_.MouseEvent_AltDown(*args, **kwargs)
3650
3651 def ShiftDown(*args, **kwargs):
3652 """ShiftDown(self) -> bool"""
3653 return _core_.MouseEvent_ShiftDown(*args, **kwargs)
3654
3655 def CmdDown(*args, **kwargs):
3656 """
3657 CmdDown(self) -> bool
3658
3659 "Cmd" is a pseudo key which is the same as Control for PC and Unix
3660 platforms but the special "Apple" (a.k.a as "Command") key on
3661 Macs: it makes often sense to use it instead of, say, `ControlDown`
3662 because Cmd key is used for the same thing under Mac as Ctrl
3663 elsewhere. The Ctrl still exists, it's just not used for this
3664 purpose. So for non-Mac platforms this is the same as `ControlDown`
3665 and Macs this is the same as `MetaDown`.
3666 """
3667 return _core_.MouseEvent_CmdDown(*args, **kwargs)
3668
3669 def LeftDown(*args, **kwargs):
3670 """LeftDown(self) -> bool"""
3671 return _core_.MouseEvent_LeftDown(*args, **kwargs)
3672
3673 def MiddleDown(*args, **kwargs):
3674 """MiddleDown(self) -> bool"""
3675 return _core_.MouseEvent_MiddleDown(*args, **kwargs)
3676
3677 def RightDown(*args, **kwargs):
3678 """RightDown(self) -> bool"""
3679 return _core_.MouseEvent_RightDown(*args, **kwargs)
3680
3681 def LeftUp(*args, **kwargs):
3682 """LeftUp(self) -> bool"""
3683 return _core_.MouseEvent_LeftUp(*args, **kwargs)
3684
3685 def MiddleUp(*args, **kwargs):
3686 """MiddleUp(self) -> bool"""
3687 return _core_.MouseEvent_MiddleUp(*args, **kwargs)
3688
3689 def RightUp(*args, **kwargs):
3690 """RightUp(self) -> bool"""
3691 return _core_.MouseEvent_RightUp(*args, **kwargs)
3692
3693 def LeftDClick(*args, **kwargs):
3694 """LeftDClick(self) -> bool"""
3695 return _core_.MouseEvent_LeftDClick(*args, **kwargs)
3696
3697 def MiddleDClick(*args, **kwargs):
3698 """MiddleDClick(self) -> bool"""
3699 return _core_.MouseEvent_MiddleDClick(*args, **kwargs)
3700
3701 def RightDClick(*args, **kwargs):
3702 """RightDClick(self) -> bool"""
3703 return _core_.MouseEvent_RightDClick(*args, **kwargs)
3704
3705 def LeftIsDown(*args, **kwargs):
3706 """LeftIsDown(self) -> bool"""
3707 return _core_.MouseEvent_LeftIsDown(*args, **kwargs)
3708
3709 def MiddleIsDown(*args, **kwargs):
3710 """MiddleIsDown(self) -> bool"""
3711 return _core_.MouseEvent_MiddleIsDown(*args, **kwargs)
3712
3713 def RightIsDown(*args, **kwargs):
3714 """RightIsDown(self) -> bool"""
3715 return _core_.MouseEvent_RightIsDown(*args, **kwargs)
3716
3717 def Dragging(*args, **kwargs):
3718 """Dragging(self) -> bool"""
3719 return _core_.MouseEvent_Dragging(*args, **kwargs)
3720
3721 def Moving(*args, **kwargs):
3722 """Moving(self) -> bool"""
3723 return _core_.MouseEvent_Moving(*args, **kwargs)
3724
3725 def Entering(*args, **kwargs):
3726 """Entering(self) -> bool"""
3727 return _core_.MouseEvent_Entering(*args, **kwargs)
3728
3729 def Leaving(*args, **kwargs):
3730 """Leaving(self) -> bool"""
3731 return _core_.MouseEvent_Leaving(*args, **kwargs)
3732
3733 def GetPosition(*args, **kwargs):
3734 """
3735 GetPosition(self) -> Point
3736
3737 Returns the position of the mouse in window coordinates when the event
3738 happened.
3739 """
3740 return _core_.MouseEvent_GetPosition(*args, **kwargs)
3741
3742 def GetPositionTuple(*args, **kwargs):
3743 """
3744 GetPositionTuple() -> (x,y)
3745
3746 Returns the position of the mouse in window coordinates when the event
3747 happened.
3748 """
3749 return _core_.MouseEvent_GetPositionTuple(*args, **kwargs)
3750
3751 def GetLogicalPosition(*args, **kwargs):
3752 """GetLogicalPosition(self, DC dc) -> Point"""
3753 return _core_.MouseEvent_GetLogicalPosition(*args, **kwargs)
3754
3755 def GetX(*args, **kwargs):
3756 """GetX(self) -> int"""
3757 return _core_.MouseEvent_GetX(*args, **kwargs)
3758
3759 def GetY(*args, **kwargs):
3760 """GetY(self) -> int"""
3761 return _core_.MouseEvent_GetY(*args, **kwargs)
3762
3763 def GetWheelRotation(*args, **kwargs):
3764 """GetWheelRotation(self) -> int"""
3765 return _core_.MouseEvent_GetWheelRotation(*args, **kwargs)
3766
3767 def GetWheelDelta(*args, **kwargs):
3768 """GetWheelDelta(self) -> int"""
3769 return _core_.MouseEvent_GetWheelDelta(*args, **kwargs)
3770
3771 def GetLinesPerAction(*args, **kwargs):
3772 """GetLinesPerAction(self) -> int"""
3773 return _core_.MouseEvent_GetLinesPerAction(*args, **kwargs)
3774
3775 def IsPageScroll(*args, **kwargs):
3776 """IsPageScroll(self) -> bool"""
3777 return _core_.MouseEvent_IsPageScroll(*args, **kwargs)
3778
3779 m_x = property(_core_.MouseEvent_m_x_get, _core_.MouseEvent_m_x_set)
3780 m_y = property(_core_.MouseEvent_m_y_get, _core_.MouseEvent_m_y_set)
3781 m_leftDown = property(_core_.MouseEvent_m_leftDown_get, _core_.MouseEvent_m_leftDown_set)
3782 m_middleDown = property(_core_.MouseEvent_m_middleDown_get, _core_.MouseEvent_m_middleDown_set)
3783 m_rightDown = property(_core_.MouseEvent_m_rightDown_get, _core_.MouseEvent_m_rightDown_set)
3784 m_controlDown = property(_core_.MouseEvent_m_controlDown_get, _core_.MouseEvent_m_controlDown_set)
3785 m_shiftDown = property(_core_.MouseEvent_m_shiftDown_get, _core_.MouseEvent_m_shiftDown_set)
3786 m_altDown = property(_core_.MouseEvent_m_altDown_get, _core_.MouseEvent_m_altDown_set)
3787 m_metaDown = property(_core_.MouseEvent_m_metaDown_get, _core_.MouseEvent_m_metaDown_set)
3788 m_wheelRotation = property(_core_.MouseEvent_m_wheelRotation_get, _core_.MouseEvent_m_wheelRotation_set)
3789 m_wheelDelta = property(_core_.MouseEvent_m_wheelDelta_get, _core_.MouseEvent_m_wheelDelta_set)
3790 m_linesPerAction = property(_core_.MouseEvent_m_linesPerAction_get, _core_.MouseEvent_m_linesPerAction_set)
3791
3792 class MouseEventPtr(MouseEvent):
3793 def __init__(self, this):
3794 self.this = this
3795 if not hasattr(self,"thisown"): self.thisown = 0
3796 self.__class__ = MouseEvent
3797 _core_.MouseEvent_swigregister(MouseEventPtr)
3798
3799 #---------------------------------------------------------------------------
3800
3801 class SetCursorEvent(Event):
3802 """Proxy of C++ SetCursorEvent class"""
3803 def __repr__(self):
3804 return "<%s.%s; proxy of C++ wxSetCursorEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
3805 def __init__(self, *args, **kwargs):
3806 """__init__(self, int x=0, int y=0) -> SetCursorEvent"""
3807 newobj = _core_.new_SetCursorEvent(*args, **kwargs)
3808 self.this = newobj.this
3809 self.thisown = 1
3810 del newobj.thisown
3811 def GetX(*args, **kwargs):
3812 """GetX(self) -> int"""
3813 return _core_.SetCursorEvent_GetX(*args, **kwargs)
3814
3815 def GetY(*args, **kwargs):
3816 """GetY(self) -> int"""
3817 return _core_.SetCursorEvent_GetY(*args, **kwargs)
3818
3819 def SetCursor(*args, **kwargs):
3820 """SetCursor(self, Cursor cursor)"""
3821 return _core_.SetCursorEvent_SetCursor(*args, **kwargs)
3822
3823 def GetCursor(*args, **kwargs):
3824 """GetCursor(self) -> Cursor"""
3825 return _core_.SetCursorEvent_GetCursor(*args, **kwargs)
3826
3827 def HasCursor(*args, **kwargs):
3828 """HasCursor(self) -> bool"""
3829 return _core_.SetCursorEvent_HasCursor(*args, **kwargs)
3830
3831
3832 class SetCursorEventPtr(SetCursorEvent):
3833 def __init__(self, this):
3834 self.this = this
3835 if not hasattr(self,"thisown"): self.thisown = 0
3836 self.__class__ = SetCursorEvent
3837 _core_.SetCursorEvent_swigregister(SetCursorEventPtr)
3838
3839 #---------------------------------------------------------------------------
3840
3841 class KeyEvent(Event):
3842 """Proxy of C++ KeyEvent class"""
3843 def __repr__(self):
3844 return "<%s.%s; proxy of C++ wxKeyEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
3845 def __init__(self, *args, **kwargs):
3846 """__init__(self, wxEventType keyType=wxEVT_NULL) -> KeyEvent"""
3847 newobj = _core_.new_KeyEvent(*args, **kwargs)
3848 self.this = newobj.this
3849 self.thisown = 1
3850 del newobj.thisown
3851 def ControlDown(*args, **kwargs):
3852 """ControlDown(self) -> bool"""
3853 return _core_.KeyEvent_ControlDown(*args, **kwargs)
3854
3855 def MetaDown(*args, **kwargs):
3856 """MetaDown(self) -> bool"""
3857 return _core_.KeyEvent_MetaDown(*args, **kwargs)
3858
3859 def AltDown(*args, **kwargs):
3860 """AltDown(self) -> bool"""
3861 return _core_.KeyEvent_AltDown(*args, **kwargs)
3862
3863 def ShiftDown(*args, **kwargs):
3864 """ShiftDown(self) -> bool"""
3865 return _core_.KeyEvent_ShiftDown(*args, **kwargs)
3866
3867 def CmdDown(*args, **kwargs):
3868 """
3869 CmdDown(self) -> bool
3870
3871 "Cmd" is a pseudo key which is the same as Control for PC and Unix
3872 platforms but the special "Apple" (a.k.a as "Command") key on
3873 Macs: it makes often sense to use it instead of, say, `ControlDown`
3874 because Cmd key is used for the same thing under Mac as Ctrl
3875 elsewhere. The Ctrl still exists, it's just not used for this
3876 purpose. So for non-Mac platforms this is the same as `ControlDown`
3877 and Macs this is the same as `MetaDown`.
3878 """
3879 return _core_.KeyEvent_CmdDown(*args, **kwargs)
3880
3881 def HasModifiers(*args, **kwargs):
3882 """HasModifiers(self) -> bool"""
3883 return _core_.KeyEvent_HasModifiers(*args, **kwargs)
3884
3885 def GetKeyCode(*args, **kwargs):
3886 """GetKeyCode(self) -> int"""
3887 return _core_.KeyEvent_GetKeyCode(*args, **kwargs)
3888
3889 KeyCode = GetKeyCode
3890 def GetUnicodeKey(*args, **kwargs):
3891 """GetUnicodeKey(self) -> int"""
3892 return _core_.KeyEvent_GetUnicodeKey(*args, **kwargs)
3893
3894 GetUniChar = GetUnicodeKey
3895 def GetRawKeyCode(*args, **kwargs):
3896 """GetRawKeyCode(self) -> unsigned int"""
3897 return _core_.KeyEvent_GetRawKeyCode(*args, **kwargs)
3898
3899 def GetRawKeyFlags(*args, **kwargs):
3900 """GetRawKeyFlags(self) -> unsigned int"""
3901 return _core_.KeyEvent_GetRawKeyFlags(*args, **kwargs)
3902
3903 def GetPosition(*args, **kwargs):
3904 """
3905 GetPosition(self) -> Point
3906
3907 Find the position of the event.
3908 """
3909 return _core_.KeyEvent_GetPosition(*args, **kwargs)
3910
3911 def GetPositionTuple(*args, **kwargs):
3912 """
3913 GetPositionTuple() -> (x,y)
3914
3915 Find the position of the event.
3916 """
3917 return _core_.KeyEvent_GetPositionTuple(*args, **kwargs)
3918
3919 def GetX(*args, **kwargs):
3920 """GetX(self) -> int"""
3921 return _core_.KeyEvent_GetX(*args, **kwargs)
3922
3923 def GetY(*args, **kwargs):
3924 """GetY(self) -> int"""
3925 return _core_.KeyEvent_GetY(*args, **kwargs)
3926
3927 m_x = property(_core_.KeyEvent_m_x_get, _core_.KeyEvent_m_x_set)
3928 m_y = property(_core_.KeyEvent_m_y_get, _core_.KeyEvent_m_y_set)
3929 m_keyCode = property(_core_.KeyEvent_m_keyCode_get, _core_.KeyEvent_m_keyCode_set)
3930 m_controlDown = property(_core_.KeyEvent_m_controlDown_get, _core_.KeyEvent_m_controlDown_set)
3931 m_shiftDown = property(_core_.KeyEvent_m_shiftDown_get, _core_.KeyEvent_m_shiftDown_set)
3932 m_altDown = property(_core_.KeyEvent_m_altDown_get, _core_.KeyEvent_m_altDown_set)
3933 m_metaDown = property(_core_.KeyEvent_m_metaDown_get, _core_.KeyEvent_m_metaDown_set)
3934 m_scanCode = property(_core_.KeyEvent_m_scanCode_get, _core_.KeyEvent_m_scanCode_set)
3935 m_rawCode = property(_core_.KeyEvent_m_rawCode_get, _core_.KeyEvent_m_rawCode_set)
3936 m_rawFlags = property(_core_.KeyEvent_m_rawFlags_get, _core_.KeyEvent_m_rawFlags_set)
3937
3938 class KeyEventPtr(KeyEvent):
3939 def __init__(self, this):
3940 self.this = this
3941 if not hasattr(self,"thisown"): self.thisown = 0
3942 self.__class__ = KeyEvent
3943 _core_.KeyEvent_swigregister(KeyEventPtr)
3944
3945 #---------------------------------------------------------------------------
3946
3947 class SizeEvent(Event):
3948 """Proxy of C++ SizeEvent class"""
3949 def __repr__(self):
3950 return "<%s.%s; proxy of C++ wxSizeEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
3951 def __init__(self, *args, **kwargs):
3952 """__init__(self, Size sz=DefaultSize, int winid=0) -> SizeEvent"""
3953 newobj = _core_.new_SizeEvent(*args, **kwargs)
3954 self.this = newobj.this
3955 self.thisown = 1
3956 del newobj.thisown
3957 def GetSize(*args, **kwargs):
3958 """GetSize(self) -> Size"""
3959 return _core_.SizeEvent_GetSize(*args, **kwargs)
3960
3961 def GetRect(*args, **kwargs):
3962 """GetRect(self) -> Rect"""
3963 return _core_.SizeEvent_GetRect(*args, **kwargs)
3964
3965 def SetRect(*args, **kwargs):
3966 """SetRect(self, Rect rect)"""
3967 return _core_.SizeEvent_SetRect(*args, **kwargs)
3968
3969 def SetSize(*args, **kwargs):
3970 """SetSize(self, Size size)"""
3971 return _core_.SizeEvent_SetSize(*args, **kwargs)
3972
3973 m_size = property(_core_.SizeEvent_m_size_get, _core_.SizeEvent_m_size_set)
3974 m_rect = property(_core_.SizeEvent_m_rect_get, _core_.SizeEvent_m_rect_set)
3975
3976 class SizeEventPtr(SizeEvent):
3977 def __init__(self, this):
3978 self.this = this
3979 if not hasattr(self,"thisown"): self.thisown = 0
3980 self.__class__ = SizeEvent
3981 _core_.SizeEvent_swigregister(SizeEventPtr)
3982
3983 #---------------------------------------------------------------------------
3984
3985 class MoveEvent(Event):
3986 """Proxy of C++ MoveEvent class"""
3987 def __repr__(self):
3988 return "<%s.%s; proxy of C++ wxMoveEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
3989 def __init__(self, *args, **kwargs):
3990 """__init__(self, Point pos=DefaultPosition, int winid=0) -> MoveEvent"""
3991 newobj = _core_.new_MoveEvent(*args, **kwargs)
3992 self.this = newobj.this
3993 self.thisown = 1
3994 del newobj.thisown
3995 def GetPosition(*args, **kwargs):
3996 """GetPosition(self) -> Point"""
3997 return _core_.MoveEvent_GetPosition(*args, **kwargs)
3998
3999 def GetRect(*args, **kwargs):
4000 """GetRect(self) -> Rect"""
4001 return _core_.MoveEvent_GetRect(*args, **kwargs)
4002
4003 def SetRect(*args, **kwargs):
4004 """SetRect(self, Rect rect)"""
4005 return _core_.MoveEvent_SetRect(*args, **kwargs)
4006
4007 def SetPosition(*args, **kwargs):
4008 """SetPosition(self, Point pos)"""
4009 return _core_.MoveEvent_SetPosition(*args, **kwargs)
4010
4011 m_pos = property(GetPosition, SetPosition)
4012 m_rect = property(GetRect, SetRect)
4013
4014
4015 class MoveEventPtr(MoveEvent):
4016 def __init__(self, this):
4017 self.this = this
4018 if not hasattr(self,"thisown"): self.thisown = 0
4019 self.__class__ = MoveEvent
4020 _core_.MoveEvent_swigregister(MoveEventPtr)
4021
4022 #---------------------------------------------------------------------------
4023
4024 class PaintEvent(Event):
4025 """Proxy of C++ PaintEvent class"""
4026 def __repr__(self):
4027 return "<%s.%s; proxy of C++ wxPaintEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
4028 def __init__(self, *args, **kwargs):
4029 """__init__(self, int Id=0) -> PaintEvent"""
4030 newobj = _core_.new_PaintEvent(*args, **kwargs)
4031 self.this = newobj.this
4032 self.thisown = 1
4033 del newobj.thisown
4034
4035 class PaintEventPtr(PaintEvent):
4036 def __init__(self, this):
4037 self.this = this
4038 if not hasattr(self,"thisown"): self.thisown = 0
4039 self.__class__ = PaintEvent
4040 _core_.PaintEvent_swigregister(PaintEventPtr)
4041
4042 class NcPaintEvent(Event):
4043 """Proxy of C++ NcPaintEvent class"""
4044 def __repr__(self):
4045 return "<%s.%s; proxy of C++ wxNcPaintEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
4046 def __init__(self, *args, **kwargs):
4047 """__init__(self, int winid=0) -> NcPaintEvent"""
4048 newobj = _core_.new_NcPaintEvent(*args, **kwargs)
4049 self.this = newobj.this
4050 self.thisown = 1
4051 del newobj.thisown
4052
4053 class NcPaintEventPtr(NcPaintEvent):
4054 def __init__(self, this):
4055 self.this = this
4056 if not hasattr(self,"thisown"): self.thisown = 0
4057 self.__class__ = NcPaintEvent
4058 _core_.NcPaintEvent_swigregister(NcPaintEventPtr)
4059
4060 #---------------------------------------------------------------------------
4061
4062 class EraseEvent(Event):
4063 """Proxy of C++ EraseEvent class"""
4064 def __repr__(self):
4065 return "<%s.%s; proxy of C++ wxEraseEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
4066 def __init__(self, *args, **kwargs):
4067 """__init__(self, int Id=0, DC dc=(wxDC *) NULL) -> EraseEvent"""
4068 newobj = _core_.new_EraseEvent(*args, **kwargs)
4069 self.this = newobj.this
4070 self.thisown = 1
4071 del newobj.thisown
4072 def GetDC(*args, **kwargs):
4073 """GetDC(self) -> DC"""
4074 return _core_.EraseEvent_GetDC(*args, **kwargs)
4075
4076
4077 class EraseEventPtr(EraseEvent):
4078 def __init__(self, this):
4079 self.this = this
4080 if not hasattr(self,"thisown"): self.thisown = 0
4081 self.__class__ = EraseEvent
4082 _core_.EraseEvent_swigregister(EraseEventPtr)
4083
4084 #---------------------------------------------------------------------------
4085
4086 class FocusEvent(Event):
4087 """Proxy of C++ FocusEvent class"""
4088 def __repr__(self):
4089 return "<%s.%s; proxy of C++ wxFocusEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
4090 def __init__(self, *args, **kwargs):
4091 """__init__(self, wxEventType type=wxEVT_NULL, int winid=0) -> FocusEvent"""
4092 newobj = _core_.new_FocusEvent(*args, **kwargs)
4093 self.this = newobj.this
4094 self.thisown = 1
4095 del newobj.thisown
4096 def GetWindow(*args, **kwargs):
4097 """GetWindow(self) -> Window"""
4098 return _core_.FocusEvent_GetWindow(*args, **kwargs)
4099
4100 def SetWindow(*args, **kwargs):
4101 """SetWindow(self, Window win)"""
4102 return _core_.FocusEvent_SetWindow(*args, **kwargs)
4103
4104
4105 class FocusEventPtr(FocusEvent):
4106 def __init__(self, this):
4107 self.this = this
4108 if not hasattr(self,"thisown"): self.thisown = 0
4109 self.__class__ = FocusEvent
4110 _core_.FocusEvent_swigregister(FocusEventPtr)
4111
4112 #---------------------------------------------------------------------------
4113
4114 class ChildFocusEvent(CommandEvent):
4115 """Proxy of C++ ChildFocusEvent class"""
4116 def __repr__(self):
4117 return "<%s.%s; proxy of C++ wxChildFocusEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
4118 def __init__(self, *args, **kwargs):
4119 """__init__(self, Window win=None) -> ChildFocusEvent"""
4120 newobj = _core_.new_ChildFocusEvent(*args, **kwargs)
4121 self.this = newobj.this
4122 self.thisown = 1
4123 del newobj.thisown
4124 def GetWindow(*args, **kwargs):
4125 """GetWindow(self) -> Window"""
4126 return _core_.ChildFocusEvent_GetWindow(*args, **kwargs)
4127
4128
4129 class ChildFocusEventPtr(ChildFocusEvent):
4130 def __init__(self, this):
4131 self.this = this
4132 if not hasattr(self,"thisown"): self.thisown = 0
4133 self.__class__ = ChildFocusEvent
4134 _core_.ChildFocusEvent_swigregister(ChildFocusEventPtr)
4135
4136 #---------------------------------------------------------------------------
4137
4138 class ActivateEvent(Event):
4139 """Proxy of C++ ActivateEvent class"""
4140 def __repr__(self):
4141 return "<%s.%s; proxy of C++ wxActivateEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
4142 def __init__(self, *args, **kwargs):
4143 """__init__(self, wxEventType type=wxEVT_NULL, bool active=True, int Id=0) -> ActivateEvent"""
4144 newobj = _core_.new_ActivateEvent(*args, **kwargs)
4145 self.this = newobj.this
4146 self.thisown = 1
4147 del newobj.thisown
4148 def GetActive(*args, **kwargs):
4149 """GetActive(self) -> bool"""
4150 return _core_.ActivateEvent_GetActive(*args, **kwargs)
4151
4152
4153 class ActivateEventPtr(ActivateEvent):
4154 def __init__(self, this):
4155 self.this = this
4156 if not hasattr(self,"thisown"): self.thisown = 0
4157 self.__class__ = ActivateEvent
4158 _core_.ActivateEvent_swigregister(ActivateEventPtr)
4159
4160 #---------------------------------------------------------------------------
4161
4162 class InitDialogEvent(Event):
4163 """Proxy of C++ InitDialogEvent class"""
4164 def __repr__(self):
4165 return "<%s.%s; proxy of C++ wxInitDialogEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
4166 def __init__(self, *args, **kwargs):
4167 """__init__(self, int Id=0) -> InitDialogEvent"""
4168 newobj = _core_.new_InitDialogEvent(*args, **kwargs)
4169 self.this = newobj.this
4170 self.thisown = 1
4171 del newobj.thisown
4172
4173 class InitDialogEventPtr(InitDialogEvent):
4174 def __init__(self, this):
4175 self.this = this
4176 if not hasattr(self,"thisown"): self.thisown = 0
4177 self.__class__ = InitDialogEvent
4178 _core_.InitDialogEvent_swigregister(InitDialogEventPtr)
4179
4180 #---------------------------------------------------------------------------
4181
4182 class MenuEvent(Event):
4183 """Proxy of C++ MenuEvent class"""
4184 def __repr__(self):
4185 return "<%s.%s; proxy of C++ wxMenuEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
4186 def __init__(self, *args, **kwargs):
4187 """__init__(self, wxEventType type=wxEVT_NULL, int winid=0, Menu menu=None) -> MenuEvent"""
4188 newobj = _core_.new_MenuEvent(*args, **kwargs)
4189 self.this = newobj.this
4190 self.thisown = 1
4191 del newobj.thisown
4192 def GetMenuId(*args, **kwargs):
4193 """GetMenuId(self) -> int"""
4194 return _core_.MenuEvent_GetMenuId(*args, **kwargs)
4195
4196 def IsPopup(*args, **kwargs):
4197 """IsPopup(self) -> bool"""
4198 return _core_.MenuEvent_IsPopup(*args, **kwargs)
4199
4200 def GetMenu(*args, **kwargs):
4201 """GetMenu(self) -> Menu"""
4202 return _core_.MenuEvent_GetMenu(*args, **kwargs)
4203
4204
4205 class MenuEventPtr(MenuEvent):
4206 def __init__(self, this):
4207 self.this = this
4208 if not hasattr(self,"thisown"): self.thisown = 0
4209 self.__class__ = MenuEvent
4210 _core_.MenuEvent_swigregister(MenuEventPtr)
4211
4212 #---------------------------------------------------------------------------
4213
4214 class CloseEvent(Event):
4215 """Proxy of C++ CloseEvent class"""
4216 def __repr__(self):
4217 return "<%s.%s; proxy of C++ wxCloseEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
4218 def __init__(self, *args, **kwargs):
4219 """__init__(self, wxEventType type=wxEVT_NULL, int winid=0) -> CloseEvent"""
4220 newobj = _core_.new_CloseEvent(*args, **kwargs)
4221 self.this = newobj.this
4222 self.thisown = 1
4223 del newobj.thisown
4224 def SetLoggingOff(*args, **kwargs):
4225 """SetLoggingOff(self, bool logOff)"""
4226 return _core_.CloseEvent_SetLoggingOff(*args, **kwargs)
4227
4228 def GetLoggingOff(*args, **kwargs):
4229 """GetLoggingOff(self) -> bool"""
4230 return _core_.CloseEvent_GetLoggingOff(*args, **kwargs)
4231
4232 def Veto(*args, **kwargs):
4233 """Veto(self, bool veto=True)"""
4234 return _core_.CloseEvent_Veto(*args, **kwargs)
4235
4236 def SetCanVeto(*args, **kwargs):
4237 """SetCanVeto(self, bool canVeto)"""
4238 return _core_.CloseEvent_SetCanVeto(*args, **kwargs)
4239
4240 def CanVeto(*args, **kwargs):
4241 """CanVeto(self) -> bool"""
4242 return _core_.CloseEvent_CanVeto(*args, **kwargs)
4243
4244 def GetVeto(*args, **kwargs):
4245 """GetVeto(self) -> bool"""
4246 return _core_.CloseEvent_GetVeto(*args, **kwargs)
4247
4248
4249 class CloseEventPtr(CloseEvent):
4250 def __init__(self, this):
4251 self.this = this
4252 if not hasattr(self,"thisown"): self.thisown = 0
4253 self.__class__ = CloseEvent
4254 _core_.CloseEvent_swigregister(CloseEventPtr)
4255
4256 #---------------------------------------------------------------------------
4257
4258 class ShowEvent(Event):
4259 """Proxy of C++ ShowEvent class"""
4260 def __repr__(self):
4261 return "<%s.%s; proxy of C++ wxShowEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
4262 def __init__(self, *args, **kwargs):
4263 """__init__(self, int winid=0, bool show=False) -> ShowEvent"""
4264 newobj = _core_.new_ShowEvent(*args, **kwargs)
4265 self.this = newobj.this
4266 self.thisown = 1
4267 del newobj.thisown
4268 def SetShow(*args, **kwargs):
4269 """SetShow(self, bool show)"""
4270 return _core_.ShowEvent_SetShow(*args, **kwargs)
4271
4272 def GetShow(*args, **kwargs):
4273 """GetShow(self) -> bool"""
4274 return _core_.ShowEvent_GetShow(*args, **kwargs)
4275
4276
4277 class ShowEventPtr(ShowEvent):
4278 def __init__(self, this):
4279 self.this = this
4280 if not hasattr(self,"thisown"): self.thisown = 0
4281 self.__class__ = ShowEvent
4282 _core_.ShowEvent_swigregister(ShowEventPtr)
4283
4284 #---------------------------------------------------------------------------
4285
4286 class IconizeEvent(Event):
4287 """Proxy of C++ IconizeEvent class"""
4288 def __repr__(self):
4289 return "<%s.%s; proxy of C++ wxIconizeEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
4290 def __init__(self, *args, **kwargs):
4291 """__init__(self, int id=0, bool iconized=True) -> IconizeEvent"""
4292 newobj = _core_.new_IconizeEvent(*args, **kwargs)
4293 self.this = newobj.this
4294 self.thisown = 1
4295 del newobj.thisown
4296 def Iconized(*args, **kwargs):
4297 """Iconized(self) -> bool"""
4298 return _core_.IconizeEvent_Iconized(*args, **kwargs)
4299
4300
4301 class IconizeEventPtr(IconizeEvent):
4302 def __init__(self, this):
4303 self.this = this
4304 if not hasattr(self,"thisown"): self.thisown = 0
4305 self.__class__ = IconizeEvent
4306 _core_.IconizeEvent_swigregister(IconizeEventPtr)
4307
4308 #---------------------------------------------------------------------------
4309
4310 class MaximizeEvent(Event):
4311 """Proxy of C++ MaximizeEvent class"""
4312 def __repr__(self):
4313 return "<%s.%s; proxy of C++ wxMaximizeEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
4314 def __init__(self, *args, **kwargs):
4315 """__init__(self, int id=0) -> MaximizeEvent"""
4316 newobj = _core_.new_MaximizeEvent(*args, **kwargs)
4317 self.this = newobj.this
4318 self.thisown = 1
4319 del newobj.thisown
4320
4321 class MaximizeEventPtr(MaximizeEvent):
4322 def __init__(self, this):
4323 self.this = this
4324 if not hasattr(self,"thisown"): self.thisown = 0
4325 self.__class__ = MaximizeEvent
4326 _core_.MaximizeEvent_swigregister(MaximizeEventPtr)
4327
4328 #---------------------------------------------------------------------------
4329
4330 class DropFilesEvent(Event):
4331 """Proxy of C++ DropFilesEvent class"""
4332 def __init__(self): raise RuntimeError, "No constructor defined"
4333 def __repr__(self):
4334 return "<%s.%s; proxy of C++ wxDropFilesEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
4335 def GetPosition(*args, **kwargs):
4336 """GetPosition(self) -> Point"""
4337 return _core_.DropFilesEvent_GetPosition(*args, **kwargs)
4338
4339 def GetNumberOfFiles(*args, **kwargs):
4340 """GetNumberOfFiles(self) -> int"""
4341 return _core_.DropFilesEvent_GetNumberOfFiles(*args, **kwargs)
4342
4343 def GetFiles(*args, **kwargs):
4344 """GetFiles(self) -> PyObject"""
4345 return _core_.DropFilesEvent_GetFiles(*args, **kwargs)
4346
4347
4348 class DropFilesEventPtr(DropFilesEvent):
4349 def __init__(self, this):
4350 self.this = this
4351 if not hasattr(self,"thisown"): self.thisown = 0
4352 self.__class__ = DropFilesEvent
4353 _core_.DropFilesEvent_swigregister(DropFilesEventPtr)
4354
4355 #---------------------------------------------------------------------------
4356
4357 UPDATE_UI_PROCESS_ALL = _core_.UPDATE_UI_PROCESS_ALL
4358 UPDATE_UI_PROCESS_SPECIFIED = _core_.UPDATE_UI_PROCESS_SPECIFIED
4359 class UpdateUIEvent(CommandEvent):
4360 """Proxy of C++ UpdateUIEvent class"""
4361 def __repr__(self):
4362 return "<%s.%s; proxy of C++ wxUpdateUIEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
4363 def __init__(self, *args, **kwargs):
4364 """__init__(self, int commandId=0) -> UpdateUIEvent"""
4365 newobj = _core_.new_UpdateUIEvent(*args, **kwargs)
4366 self.this = newobj.this
4367 self.thisown = 1
4368 del newobj.thisown
4369 def GetChecked(*args, **kwargs):
4370 """GetChecked(self) -> bool"""
4371 return _core_.UpdateUIEvent_GetChecked(*args, **kwargs)
4372
4373 def GetEnabled(*args, **kwargs):
4374 """GetEnabled(self) -> bool"""
4375 return _core_.UpdateUIEvent_GetEnabled(*args, **kwargs)
4376
4377 def GetText(*args, **kwargs):
4378 """GetText(self) -> String"""
4379 return _core_.UpdateUIEvent_GetText(*args, **kwargs)
4380
4381 def GetSetText(*args, **kwargs):
4382 """GetSetText(self) -> bool"""
4383 return _core_.UpdateUIEvent_GetSetText(*args, **kwargs)
4384
4385 def GetSetChecked(*args, **kwargs):
4386 """GetSetChecked(self) -> bool"""
4387 return _core_.UpdateUIEvent_GetSetChecked(*args, **kwargs)
4388
4389 def GetSetEnabled(*args, **kwargs):
4390 """GetSetEnabled(self) -> bool"""
4391 return _core_.UpdateUIEvent_GetSetEnabled(*args, **kwargs)
4392
4393 def Check(*args, **kwargs):
4394 """Check(self, bool check)"""
4395 return _core_.UpdateUIEvent_Check(*args, **kwargs)
4396
4397 def Enable(*args, **kwargs):
4398 """Enable(self, bool enable)"""
4399 return _core_.UpdateUIEvent_Enable(*args, **kwargs)
4400
4401 def SetText(*args, **kwargs):
4402 """SetText(self, String text)"""
4403 return _core_.UpdateUIEvent_SetText(*args, **kwargs)
4404
4405 def SetUpdateInterval(*args, **kwargs):
4406 """SetUpdateInterval(long updateInterval)"""
4407 return _core_.UpdateUIEvent_SetUpdateInterval(*args, **kwargs)
4408
4409 SetUpdateInterval = staticmethod(SetUpdateInterval)
4410 def GetUpdateInterval(*args, **kwargs):
4411 """GetUpdateInterval() -> long"""
4412 return _core_.UpdateUIEvent_GetUpdateInterval(*args, **kwargs)
4413
4414 GetUpdateInterval = staticmethod(GetUpdateInterval)
4415 def CanUpdate(*args, **kwargs):
4416 """CanUpdate(Window win) -> bool"""
4417 return _core_.UpdateUIEvent_CanUpdate(*args, **kwargs)
4418
4419 CanUpdate = staticmethod(CanUpdate)
4420 def ResetUpdateTime(*args, **kwargs):
4421 """ResetUpdateTime()"""
4422 return _core_.UpdateUIEvent_ResetUpdateTime(*args, **kwargs)
4423
4424 ResetUpdateTime = staticmethod(ResetUpdateTime)
4425 def SetMode(*args, **kwargs):
4426 """SetMode(int mode)"""
4427 return _core_.UpdateUIEvent_SetMode(*args, **kwargs)
4428
4429 SetMode = staticmethod(SetMode)
4430 def GetMode(*args, **kwargs):
4431 """GetMode() -> int"""
4432 return _core_.UpdateUIEvent_GetMode(*args, **kwargs)
4433
4434 GetMode = staticmethod(GetMode)
4435
4436 class UpdateUIEventPtr(UpdateUIEvent):
4437 def __init__(self, this):
4438 self.this = this
4439 if not hasattr(self,"thisown"): self.thisown = 0
4440 self.__class__ = UpdateUIEvent
4441 _core_.UpdateUIEvent_swigregister(UpdateUIEventPtr)
4442
4443 def UpdateUIEvent_SetUpdateInterval(*args, **kwargs):
4444 """UpdateUIEvent_SetUpdateInterval(long updateInterval)"""
4445 return _core_.UpdateUIEvent_SetUpdateInterval(*args, **kwargs)
4446
4447 def UpdateUIEvent_GetUpdateInterval(*args, **kwargs):
4448 """UpdateUIEvent_GetUpdateInterval() -> long"""
4449 return _core_.UpdateUIEvent_GetUpdateInterval(*args, **kwargs)
4450
4451 def UpdateUIEvent_CanUpdate(*args, **kwargs):
4452 """UpdateUIEvent_CanUpdate(Window win) -> bool"""
4453 return _core_.UpdateUIEvent_CanUpdate(*args, **kwargs)
4454
4455 def UpdateUIEvent_ResetUpdateTime(*args, **kwargs):
4456 """UpdateUIEvent_ResetUpdateTime()"""
4457 return _core_.UpdateUIEvent_ResetUpdateTime(*args, **kwargs)
4458
4459 def UpdateUIEvent_SetMode(*args, **kwargs):
4460 """UpdateUIEvent_SetMode(int mode)"""
4461 return _core_.UpdateUIEvent_SetMode(*args, **kwargs)
4462
4463 def UpdateUIEvent_GetMode(*args, **kwargs):
4464 """UpdateUIEvent_GetMode() -> int"""
4465 return _core_.UpdateUIEvent_GetMode(*args, **kwargs)
4466
4467 #---------------------------------------------------------------------------
4468
4469 class SysColourChangedEvent(Event):
4470 """Proxy of C++ SysColourChangedEvent class"""
4471 def __repr__(self):
4472 return "<%s.%s; proxy of C++ wxSysColourChangedEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
4473 def __init__(self, *args, **kwargs):
4474 """__init__(self) -> SysColourChangedEvent"""
4475 newobj = _core_.new_SysColourChangedEvent(*args, **kwargs)
4476 self.this = newobj.this
4477 self.thisown = 1
4478 del newobj.thisown
4479
4480 class SysColourChangedEventPtr(SysColourChangedEvent):
4481 def __init__(self, this):
4482 self.this = this
4483 if not hasattr(self,"thisown"): self.thisown = 0
4484 self.__class__ = SysColourChangedEvent
4485 _core_.SysColourChangedEvent_swigregister(SysColourChangedEventPtr)
4486
4487 #---------------------------------------------------------------------------
4488
4489 class MouseCaptureChangedEvent(Event):
4490 """Proxy of C++ MouseCaptureChangedEvent class"""
4491 def __repr__(self):
4492 return "<%s.%s; proxy of C++ wxMouseCaptureChangedEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
4493 def __init__(self, *args, **kwargs):
4494 """__init__(self, int winid=0, Window gainedCapture=None) -> MouseCaptureChangedEvent"""
4495 newobj = _core_.new_MouseCaptureChangedEvent(*args, **kwargs)
4496 self.this = newobj.this
4497 self.thisown = 1
4498 del newobj.thisown
4499 def GetCapturedWindow(*args, **kwargs):
4500 """GetCapturedWindow(self) -> Window"""
4501 return _core_.MouseCaptureChangedEvent_GetCapturedWindow(*args, **kwargs)
4502
4503
4504 class MouseCaptureChangedEventPtr(MouseCaptureChangedEvent):
4505 def __init__(self, this):
4506 self.this = this
4507 if not hasattr(self,"thisown"): self.thisown = 0
4508 self.__class__ = MouseCaptureChangedEvent
4509 _core_.MouseCaptureChangedEvent_swigregister(MouseCaptureChangedEventPtr)
4510
4511 #---------------------------------------------------------------------------
4512
4513 class DisplayChangedEvent(Event):
4514 """Proxy of C++ DisplayChangedEvent class"""
4515 def __repr__(self):
4516 return "<%s.%s; proxy of C++ wxDisplayChangedEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
4517 def __init__(self, *args, **kwargs):
4518 """__init__(self) -> DisplayChangedEvent"""
4519 newobj = _core_.new_DisplayChangedEvent(*args, **kwargs)
4520 self.this = newobj.this
4521 self.thisown = 1
4522 del newobj.thisown
4523
4524 class DisplayChangedEventPtr(DisplayChangedEvent):
4525 def __init__(self, this):
4526 self.this = this
4527 if not hasattr(self,"thisown"): self.thisown = 0
4528 self.__class__ = DisplayChangedEvent
4529 _core_.DisplayChangedEvent_swigregister(DisplayChangedEventPtr)
4530
4531 #---------------------------------------------------------------------------
4532
4533 class PaletteChangedEvent(Event):
4534 """Proxy of C++ PaletteChangedEvent class"""
4535 def __repr__(self):
4536 return "<%s.%s; proxy of C++ wxPaletteChangedEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
4537 def __init__(self, *args, **kwargs):
4538 """__init__(self, int id=0) -> PaletteChangedEvent"""
4539 newobj = _core_.new_PaletteChangedEvent(*args, **kwargs)
4540 self.this = newobj.this
4541 self.thisown = 1
4542 del newobj.thisown
4543 def SetChangedWindow(*args, **kwargs):
4544 """SetChangedWindow(self, Window win)"""
4545 return _core_.PaletteChangedEvent_SetChangedWindow(*args, **kwargs)
4546
4547 def GetChangedWindow(*args, **kwargs):
4548 """GetChangedWindow(self) -> Window"""
4549 return _core_.PaletteChangedEvent_GetChangedWindow(*args, **kwargs)
4550
4551
4552 class PaletteChangedEventPtr(PaletteChangedEvent):
4553 def __init__(self, this):
4554 self.this = this
4555 if not hasattr(self,"thisown"): self.thisown = 0
4556 self.__class__ = PaletteChangedEvent
4557 _core_.PaletteChangedEvent_swigregister(PaletteChangedEventPtr)
4558
4559 #---------------------------------------------------------------------------
4560
4561 class QueryNewPaletteEvent(Event):
4562 """Proxy of C++ QueryNewPaletteEvent class"""
4563 def __repr__(self):
4564 return "<%s.%s; proxy of C++ wxQueryNewPaletteEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
4565 def __init__(self, *args, **kwargs):
4566 """__init__(self, int winid=0) -> QueryNewPaletteEvent"""
4567 newobj = _core_.new_QueryNewPaletteEvent(*args, **kwargs)
4568 self.this = newobj.this
4569 self.thisown = 1
4570 del newobj.thisown
4571 def SetPaletteRealized(*args, **kwargs):
4572 """SetPaletteRealized(self, bool realized)"""
4573 return _core_.QueryNewPaletteEvent_SetPaletteRealized(*args, **kwargs)
4574
4575 def GetPaletteRealized(*args, **kwargs):
4576 """GetPaletteRealized(self) -> bool"""
4577 return _core_.QueryNewPaletteEvent_GetPaletteRealized(*args, **kwargs)
4578
4579
4580 class QueryNewPaletteEventPtr(QueryNewPaletteEvent):
4581 def __init__(self, this):
4582 self.this = this
4583 if not hasattr(self,"thisown"): self.thisown = 0
4584 self.__class__ = QueryNewPaletteEvent
4585 _core_.QueryNewPaletteEvent_swigregister(QueryNewPaletteEventPtr)
4586
4587 #---------------------------------------------------------------------------
4588
4589 class NavigationKeyEvent(Event):
4590 """Proxy of C++ NavigationKeyEvent class"""
4591 def __repr__(self):
4592 return "<%s.%s; proxy of C++ wxNavigationKeyEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
4593 def __init__(self, *args, **kwargs):
4594 """__init__(self) -> NavigationKeyEvent"""
4595 newobj = _core_.new_NavigationKeyEvent(*args, **kwargs)
4596 self.this = newobj.this
4597 self.thisown = 1
4598 del newobj.thisown
4599 def GetDirection(*args, **kwargs):
4600 """GetDirection(self) -> bool"""
4601 return _core_.NavigationKeyEvent_GetDirection(*args, **kwargs)
4602
4603 def SetDirection(*args, **kwargs):
4604 """SetDirection(self, bool forward)"""
4605 return _core_.NavigationKeyEvent_SetDirection(*args, **kwargs)
4606
4607 def IsWindowChange(*args, **kwargs):
4608 """IsWindowChange(self) -> bool"""
4609 return _core_.NavigationKeyEvent_IsWindowChange(*args, **kwargs)
4610
4611 def SetWindowChange(*args, **kwargs):
4612 """SetWindowChange(self, bool ischange)"""
4613 return _core_.NavigationKeyEvent_SetWindowChange(*args, **kwargs)
4614
4615 def IsFromTab(*args, **kwargs):
4616 """IsFromTab(self) -> bool"""
4617 return _core_.NavigationKeyEvent_IsFromTab(*args, **kwargs)
4618
4619 def SetFromTab(*args, **kwargs):
4620 """SetFromTab(self, bool bIs)"""
4621 return _core_.NavigationKeyEvent_SetFromTab(*args, **kwargs)
4622
4623 def SetFlags(*args, **kwargs):
4624 """SetFlags(self, long flags)"""
4625 return _core_.NavigationKeyEvent_SetFlags(*args, **kwargs)
4626
4627 def GetCurrentFocus(*args, **kwargs):
4628 """GetCurrentFocus(self) -> Window"""
4629 return _core_.NavigationKeyEvent_GetCurrentFocus(*args, **kwargs)
4630
4631 def SetCurrentFocus(*args, **kwargs):
4632 """SetCurrentFocus(self, Window win)"""
4633 return _core_.NavigationKeyEvent_SetCurrentFocus(*args, **kwargs)
4634
4635 IsBackward = _core_.NavigationKeyEvent_IsBackward
4636 IsForward = _core_.NavigationKeyEvent_IsForward
4637 WinChange = _core_.NavigationKeyEvent_WinChange
4638 FromTab = _core_.NavigationKeyEvent_FromTab
4639
4640 class NavigationKeyEventPtr(NavigationKeyEvent):
4641 def __init__(self, this):
4642 self.this = this
4643 if not hasattr(self,"thisown"): self.thisown = 0
4644 self.__class__ = NavigationKeyEvent
4645 _core_.NavigationKeyEvent_swigregister(NavigationKeyEventPtr)
4646
4647 #---------------------------------------------------------------------------
4648
4649 class WindowCreateEvent(CommandEvent):
4650 """Proxy of C++ WindowCreateEvent class"""
4651 def __repr__(self):
4652 return "<%s.%s; proxy of C++ wxWindowCreateEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
4653 def __init__(self, *args, **kwargs):
4654 """__init__(self, Window win=None) -> WindowCreateEvent"""
4655 newobj = _core_.new_WindowCreateEvent(*args, **kwargs)
4656 self.this = newobj.this
4657 self.thisown = 1
4658 del newobj.thisown
4659 def GetWindow(*args, **kwargs):
4660 """GetWindow(self) -> Window"""
4661 return _core_.WindowCreateEvent_GetWindow(*args, **kwargs)
4662
4663
4664 class WindowCreateEventPtr(WindowCreateEvent):
4665 def __init__(self, this):
4666 self.this = this
4667 if not hasattr(self,"thisown"): self.thisown = 0
4668 self.__class__ = WindowCreateEvent
4669 _core_.WindowCreateEvent_swigregister(WindowCreateEventPtr)
4670
4671 class WindowDestroyEvent(CommandEvent):
4672 """Proxy of C++ WindowDestroyEvent class"""
4673 def __repr__(self):
4674 return "<%s.%s; proxy of C++ wxWindowDestroyEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
4675 def __init__(self, *args, **kwargs):
4676 """__init__(self, Window win=None) -> WindowDestroyEvent"""
4677 newobj = _core_.new_WindowDestroyEvent(*args, **kwargs)
4678 self.this = newobj.this
4679 self.thisown = 1
4680 del newobj.thisown
4681 def GetWindow(*args, **kwargs):
4682 """GetWindow(self) -> Window"""
4683 return _core_.WindowDestroyEvent_GetWindow(*args, **kwargs)
4684
4685
4686 class WindowDestroyEventPtr(WindowDestroyEvent):
4687 def __init__(self, this):
4688 self.this = this
4689 if not hasattr(self,"thisown"): self.thisown = 0
4690 self.__class__ = WindowDestroyEvent
4691 _core_.WindowDestroyEvent_swigregister(WindowDestroyEventPtr)
4692
4693 #---------------------------------------------------------------------------
4694
4695 class ContextMenuEvent(CommandEvent):
4696 """Proxy of C++ ContextMenuEvent class"""
4697 def __repr__(self):
4698 return "<%s.%s; proxy of C++ wxContextMenuEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
4699 def __init__(self, *args, **kwargs):
4700 """__init__(self, wxEventType type=wxEVT_NULL, int winid=0, Point pt=DefaultPosition) -> ContextMenuEvent"""
4701 newobj = _core_.new_ContextMenuEvent(*args, **kwargs)
4702 self.this = newobj.this
4703 self.thisown = 1
4704 del newobj.thisown
4705 def GetPosition(*args, **kwargs):
4706 """GetPosition(self) -> Point"""
4707 return _core_.ContextMenuEvent_GetPosition(*args, **kwargs)
4708
4709 def SetPosition(*args, **kwargs):
4710 """SetPosition(self, Point pos)"""
4711 return _core_.ContextMenuEvent_SetPosition(*args, **kwargs)
4712
4713
4714 class ContextMenuEventPtr(ContextMenuEvent):
4715 def __init__(self, this):
4716 self.this = this
4717 if not hasattr(self,"thisown"): self.thisown = 0
4718 self.__class__ = ContextMenuEvent
4719 _core_.ContextMenuEvent_swigregister(ContextMenuEventPtr)
4720
4721 #---------------------------------------------------------------------------
4722
4723 IDLE_PROCESS_ALL = _core_.IDLE_PROCESS_ALL
4724 IDLE_PROCESS_SPECIFIED = _core_.IDLE_PROCESS_SPECIFIED
4725 class IdleEvent(Event):
4726 """Proxy of C++ IdleEvent class"""
4727 def __repr__(self):
4728 return "<%s.%s; proxy of C++ wxIdleEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
4729 def __init__(self, *args, **kwargs):
4730 """__init__(self) -> IdleEvent"""
4731 newobj = _core_.new_IdleEvent(*args, **kwargs)
4732 self.this = newobj.this
4733 self.thisown = 1
4734 del newobj.thisown
4735 def RequestMore(*args, **kwargs):
4736 """RequestMore(self, bool needMore=True)"""
4737 return _core_.IdleEvent_RequestMore(*args, **kwargs)
4738
4739 def MoreRequested(*args, **kwargs):
4740 """MoreRequested(self) -> bool"""
4741 return _core_.IdleEvent_MoreRequested(*args, **kwargs)
4742
4743 def SetMode(*args, **kwargs):
4744 """SetMode(int mode)"""
4745 return _core_.IdleEvent_SetMode(*args, **kwargs)
4746
4747 SetMode = staticmethod(SetMode)
4748 def GetMode(*args, **kwargs):
4749 """GetMode() -> int"""
4750 return _core_.IdleEvent_GetMode(*args, **kwargs)
4751
4752 GetMode = staticmethod(GetMode)
4753 def CanSend(*args, **kwargs):
4754 """CanSend(Window win) -> bool"""
4755 return _core_.IdleEvent_CanSend(*args, **kwargs)
4756
4757 CanSend = staticmethod(CanSend)
4758
4759 class IdleEventPtr(IdleEvent):
4760 def __init__(self, this):
4761 self.this = this
4762 if not hasattr(self,"thisown"): self.thisown = 0
4763 self.__class__ = IdleEvent
4764 _core_.IdleEvent_swigregister(IdleEventPtr)
4765
4766 def IdleEvent_SetMode(*args, **kwargs):
4767 """IdleEvent_SetMode(int mode)"""
4768 return _core_.IdleEvent_SetMode(*args, **kwargs)
4769
4770 def IdleEvent_GetMode(*args, **kwargs):
4771 """IdleEvent_GetMode() -> int"""
4772 return _core_.IdleEvent_GetMode(*args, **kwargs)
4773
4774 def IdleEvent_CanSend(*args, **kwargs):
4775 """IdleEvent_CanSend(Window win) -> bool"""
4776 return _core_.IdleEvent_CanSend(*args, **kwargs)
4777
4778 #---------------------------------------------------------------------------
4779
4780 class PyEvent(Event):
4781 """Proxy of C++ PyEvent class"""
4782 def __repr__(self):
4783 return "<%s.%s; proxy of C++ wxPyEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
4784 def __init__(self, *args, **kwargs):
4785 """__init__(self, int winid=0, wxEventType commandType=wxEVT_NULL) -> PyEvent"""
4786 newobj = _core_.new_PyEvent(*args, **kwargs)
4787 self.this = newobj.this
4788 self.thisown = 1
4789 del newobj.thisown
4790 self.SetSelf(self)
4791
4792 def __del__(self, destroy=_core_.delete_PyEvent):
4793 """__del__(self)"""
4794 try:
4795 if self.thisown: destroy(self)
4796 except: pass
4797
4798 def SetSelf(*args, **kwargs):
4799 """SetSelf(self, PyObject self)"""
4800 return _core_.PyEvent_SetSelf(*args, **kwargs)
4801
4802 def GetSelf(*args, **kwargs):
4803 """GetSelf(self) -> PyObject"""
4804 return _core_.PyEvent_GetSelf(*args, **kwargs)
4805
4806
4807 class PyEventPtr(PyEvent):
4808 def __init__(self, this):
4809 self.this = this
4810 if not hasattr(self,"thisown"): self.thisown = 0
4811 self.__class__ = PyEvent
4812 _core_.PyEvent_swigregister(PyEventPtr)
4813
4814 class PyCommandEvent(CommandEvent):
4815 """Proxy of C++ PyCommandEvent class"""
4816 def __repr__(self):
4817 return "<%s.%s; proxy of C++ wxPyCommandEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
4818 def __init__(self, *args, **kwargs):
4819 """__init__(self, wxEventType commandType=wxEVT_NULL, int id=0) -> PyCommandEvent"""
4820 newobj = _core_.new_PyCommandEvent(*args, **kwargs)
4821 self.this = newobj.this
4822 self.thisown = 1
4823 del newobj.thisown
4824 self.SetSelf(self)
4825
4826 def __del__(self, destroy=_core_.delete_PyCommandEvent):
4827 """__del__(self)"""
4828 try:
4829 if self.thisown: destroy(self)
4830 except: pass
4831
4832 def SetSelf(*args, **kwargs):
4833 """SetSelf(self, PyObject self)"""
4834 return _core_.PyCommandEvent_SetSelf(*args, **kwargs)
4835
4836 def GetSelf(*args, **kwargs):
4837 """GetSelf(self) -> PyObject"""
4838 return _core_.PyCommandEvent_GetSelf(*args, **kwargs)
4839
4840
4841 class PyCommandEventPtr(PyCommandEvent):
4842 def __init__(self, this):
4843 self.this = this
4844 if not hasattr(self,"thisown"): self.thisown = 0
4845 self.__class__ = PyCommandEvent
4846 _core_.PyCommandEvent_swigregister(PyCommandEventPtr)
4847
4848 class DateEvent(CommandEvent):
4849 """Proxy of C++ DateEvent class"""
4850 def __repr__(self):
4851 return "<%s.%s; proxy of C++ wxDateEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
4852 def __init__(self, *args, **kwargs):
4853 """__init__(self, Window win, DateTime dt, wxEventType type) -> DateEvent"""
4854 newobj = _core_.new_DateEvent(*args, **kwargs)
4855 self.this = newobj.this
4856 self.thisown = 1
4857 del newobj.thisown
4858 def GetDate(*args, **kwargs):
4859 """GetDate(self) -> DateTime"""
4860 return _core_.DateEvent_GetDate(*args, **kwargs)
4861
4862 def SetDate(*args, **kwargs):
4863 """SetDate(self, DateTime date)"""
4864 return _core_.DateEvent_SetDate(*args, **kwargs)
4865
4866
4867 class DateEventPtr(DateEvent):
4868 def __init__(self, this):
4869 self.this = this
4870 if not hasattr(self,"thisown"): self.thisown = 0
4871 self.__class__ = DateEvent
4872 _core_.DateEvent_swigregister(DateEventPtr)
4873
4874 wxEVT_DATE_CHANGED = _core_.wxEVT_DATE_CHANGED
4875 EVT_DATE_CHANGED = wx.PyEventBinder( wxEVT_DATE_CHANGED, 1 )
4876
4877 #---------------------------------------------------------------------------
4878
4879 PYAPP_ASSERT_SUPPRESS = _core_.PYAPP_ASSERT_SUPPRESS
4880 PYAPP_ASSERT_EXCEPTION = _core_.PYAPP_ASSERT_EXCEPTION
4881 PYAPP_ASSERT_DIALOG = _core_.PYAPP_ASSERT_DIALOG
4882 PYAPP_ASSERT_LOG = _core_.PYAPP_ASSERT_LOG
4883 PRINT_WINDOWS = _core_.PRINT_WINDOWS
4884 PRINT_POSTSCRIPT = _core_.PRINT_POSTSCRIPT
4885 class PyApp(EvtHandler):
4886 """
4887 The ``wx.PyApp`` class is an *implementation detail*, please use the
4888 `wx.App` class (or some other derived class) instead.
4889 """
4890 def __repr__(self):
4891 return "<%s.%s; proxy of C++ wxPyApp instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
4892 def __init__(self, *args, **kwargs):
4893 """
4894 __init__(self) -> PyApp
4895
4896 Create a new application object, starting the bootstrap process.
4897 """
4898 newobj = _core_.new_PyApp(*args, **kwargs)
4899 self.this = newobj.this
4900 self.thisown = 1
4901 del newobj.thisown
4902 self._setCallbackInfo(self, PyApp)
4903 self._setOORInfo(self)
4904
4905 def __del__(self, destroy=_core_.delete_PyApp):
4906 """__del__(self)"""
4907 try:
4908 if self.thisown: destroy(self)
4909 except: pass
4910
4911 def _setCallbackInfo(*args, **kwargs):
4912 """_setCallbackInfo(self, PyObject self, PyObject _class)"""
4913 return _core_.PyApp__setCallbackInfo(*args, **kwargs)
4914
4915 def GetAppName(*args, **kwargs):
4916 """
4917 GetAppName(self) -> String
4918
4919 Get the application name.
4920 """
4921 return _core_.PyApp_GetAppName(*args, **kwargs)
4922
4923 def SetAppName(*args, **kwargs):
4924 """
4925 SetAppName(self, String name)
4926
4927 Set the application name. This value may be used automatically by
4928 `wx.Config` and such.
4929 """
4930 return _core_.PyApp_SetAppName(*args, **kwargs)
4931
4932 def GetClassName(*args, **kwargs):
4933 """
4934 GetClassName(self) -> String
4935
4936 Get the application's class name.
4937 """
4938 return _core_.PyApp_GetClassName(*args, **kwargs)
4939
4940 def SetClassName(*args, **kwargs):
4941 """
4942 SetClassName(self, String name)
4943
4944 Set the application's class name. This value may be used for
4945 X-resources if applicable for the platform
4946 """
4947 return _core_.PyApp_SetClassName(*args, **kwargs)
4948
4949 def GetVendorName(*args, **kwargs):
4950 """
4951 GetVendorName(self) -> String
4952
4953 Get the application's vendor name.
4954 """
4955 return _core_.PyApp_GetVendorName(*args, **kwargs)
4956
4957 def SetVendorName(*args, **kwargs):
4958 """
4959 SetVendorName(self, String name)
4960
4961 Set the application's vendor name. This value may be used
4962 automatically by `wx.Config` and such.
4963 """
4964 return _core_.PyApp_SetVendorName(*args, **kwargs)
4965
4966 def GetTraits(*args, **kwargs):
4967 """
4968 GetTraits(self) -> wxAppTraits
4969
4970 Return (and create if necessary) the app traits object to which we
4971 delegate for everything which either should be configurable by the
4972 user (then he can change the default behaviour simply by overriding
4973 CreateTraits() and returning his own traits object) or which is
4974 GUI/console dependent as then wx.AppTraits allows us to abstract the
4975 differences behind the common facade.
4976
4977 :todo: Add support for overriding CreateAppTraits in wxPython.
4978 """
4979 return _core_.PyApp_GetTraits(*args, **kwargs)
4980
4981 def ProcessPendingEvents(*args, **kwargs):
4982 """
4983 ProcessPendingEvents(self)
4984
4985 Process all events in the Pending Events list -- it is necessary to
4986 call this function to process posted events. This normally happens
4987 during each event loop iteration.
4988 """
4989 return _core_.PyApp_ProcessPendingEvents(*args, **kwargs)
4990
4991 def Yield(*args, **kwargs):
4992 """
4993 Yield(self, bool onlyIfNeeded=False) -> bool
4994
4995 Process all currently pending events right now, instead of waiting
4996 until return to the event loop. It is an error to call ``Yield``
4997 recursively unless the value of ``onlyIfNeeded`` is True.
4998
4999 :warning: This function is dangerous as it can lead to unexpected
5000 reentrancies (i.e. when called from an event handler it may
5001 result in calling the same event handler again), use with
5002 extreme care or, better, don't use at all!
5003
5004 :see: `wx.Yield`, `wx.YieldIfNeeded`, `wx.SafeYield`
5005
5006 """
5007 return _core_.PyApp_Yield(*args, **kwargs)
5008
5009 def WakeUpIdle(*args, **kwargs):
5010 """
5011 WakeUpIdle(self)
5012
5013 Make sure that idle events are sent again.
5014 :see: `wx.WakeUpIdle`
5015 """
5016 return _core_.PyApp_WakeUpIdle(*args, **kwargs)
5017
5018 def IsMainLoopRunning(*args, **kwargs):
5019 """
5020 IsMainLoopRunning() -> bool
5021
5022 Returns True if we're running the main loop, i.e. if the events can
5023 currently be dispatched.
5024 """
5025 return _core_.PyApp_IsMainLoopRunning(*args, **kwargs)
5026
5027 IsMainLoopRunning = staticmethod(IsMainLoopRunning)
5028 def MainLoop(*args, **kwargs):
5029 """
5030 MainLoop(self) -> int
5031
5032 Execute the main GUI loop, the function doesn't normally return until
5033 all top level windows have been closed and destroyed.
5034 """
5035 return _core_.PyApp_MainLoop(*args, **kwargs)
5036
5037 def Exit(*args, **kwargs):
5038 """
5039 Exit(self)
5040
5041 Exit the main loop thus terminating the application.
5042 :see: `wx.Exit`
5043 """
5044 return _core_.PyApp_Exit(*args, **kwargs)
5045
5046 def ExitMainLoop(*args, **kwargs):
5047 """
5048 ExitMainLoop(self)
5049
5050 Exit the main GUI loop during the next iteration of the main
5051 loop, (i.e. it does not stop the program immediately!)
5052 """
5053 return _core_.PyApp_ExitMainLoop(*args, **kwargs)
5054
5055 def Pending(*args, **kwargs):
5056 """
5057 Pending(self) -> bool
5058
5059 Returns True if there are unprocessed events in the event queue.
5060 """
5061 return _core_.PyApp_Pending(*args, **kwargs)
5062
5063 def Dispatch(*args, **kwargs):
5064 """
5065 Dispatch(self) -> bool
5066
5067 Process the first event in the event queue (blocks until an event
5068 appears if there are none currently)
5069 """
5070 return _core_.PyApp_Dispatch(*args, **kwargs)
5071
5072 def ProcessIdle(*args, **kwargs):
5073 """
5074 ProcessIdle(self) -> bool
5075
5076 Called from the MainLoop when the application becomes idle (there are
5077 no pending events) and sends a `wx.IdleEvent` to all interested
5078 parties. Returns True if more idle events are needed, False if not.
5079 """
5080 return _core_.PyApp_ProcessIdle(*args, **kwargs)
5081
5082 def SendIdleEvents(*args, **kwargs):
5083 """
5084 SendIdleEvents(self, Window win, IdleEvent event) -> bool
5085
5086 Send idle event to window and all subwindows. Returns True if more
5087 idle time is requested.
5088 """
5089 return _core_.PyApp_SendIdleEvents(*args, **kwargs)
5090
5091 def IsActive(*args, **kwargs):
5092 """
5093 IsActive(self) -> bool
5094
5095 Return True if our app has focus.
5096 """
5097 return _core_.PyApp_IsActive(*args, **kwargs)
5098
5099 def SetTopWindow(*args, **kwargs):
5100 """
5101 SetTopWindow(self, Window win)
5102
5103 Set the *main* top level window
5104 """
5105 return _core_.PyApp_SetTopWindow(*args, **kwargs)
5106
5107 def GetTopWindow(*args, **kwargs):
5108 """
5109 GetTopWindow(self) -> Window
5110
5111 Return the *main* top level window (if it hadn't been set previously
5112 with SetTopWindow(), will return just some top level window and, if
5113 there not any, will return None)
5114 """
5115 return _core_.PyApp_GetTopWindow(*args, **kwargs)
5116
5117 def SetExitOnFrameDelete(*args, **kwargs):
5118 """
5119 SetExitOnFrameDelete(self, bool flag)
5120
5121 Control the exit behaviour: by default, the program will exit the main
5122 loop (and so, usually, terminate) when the last top-level program
5123 window is deleted. Beware that if you disable this behaviour (with
5124 SetExitOnFrameDelete(False)), you'll have to call ExitMainLoop()
5125 explicitly from somewhere.
5126 """
5127 return _core_.PyApp_SetExitOnFrameDelete(*args, **kwargs)
5128
5129 def GetExitOnFrameDelete(*args, **kwargs):
5130 """
5131 GetExitOnFrameDelete(self) -> bool
5132
5133 Get the current exit behaviour setting.
5134 """
5135 return _core_.PyApp_GetExitOnFrameDelete(*args, **kwargs)
5136
5137 def SetUseBestVisual(*args, **kwargs):
5138 """
5139 SetUseBestVisual(self, bool flag)
5140
5141 Set whether the app should try to use the best available visual on
5142 systems where more than one is available, (Sun, SGI, XFree86 4, etc.)
5143 """
5144 return _core_.PyApp_SetUseBestVisual(*args, **kwargs)
5145
5146 def GetUseBestVisual(*args, **kwargs):
5147 """
5148 GetUseBestVisual(self) -> bool
5149
5150 Get current UseBestVisual setting.
5151 """
5152 return _core_.PyApp_GetUseBestVisual(*args, **kwargs)
5153
5154 def SetPrintMode(*args, **kwargs):
5155 """SetPrintMode(self, int mode)"""
5156 return _core_.PyApp_SetPrintMode(*args, **kwargs)
5157
5158 def GetPrintMode(*args, **kwargs):
5159 """GetPrintMode(self) -> int"""
5160 return _core_.PyApp_GetPrintMode(*args, **kwargs)
5161
5162 def SetAssertMode(*args, **kwargs):
5163 """
5164 SetAssertMode(self, int mode)
5165
5166 Set the OnAssert behaviour for debug and hybrid builds.
5167 """
5168 return _core_.PyApp_SetAssertMode(*args, **kwargs)
5169
5170 def GetAssertMode(*args, **kwargs):
5171 """
5172 GetAssertMode(self) -> int
5173
5174 Get the current OnAssert behaviour setting.
5175 """
5176 return _core_.PyApp_GetAssertMode(*args, **kwargs)
5177
5178 def GetMacSupportPCMenuShortcuts(*args, **kwargs):
5179 """GetMacSupportPCMenuShortcuts() -> bool"""
5180 return _core_.PyApp_GetMacSupportPCMenuShortcuts(*args, **kwargs)
5181
5182 GetMacSupportPCMenuShortcuts = staticmethod(GetMacSupportPCMenuShortcuts)
5183 def GetMacAboutMenuItemId(*args, **kwargs):
5184 """GetMacAboutMenuItemId() -> long"""
5185 return _core_.PyApp_GetMacAboutMenuItemId(*args, **kwargs)
5186
5187 GetMacAboutMenuItemId = staticmethod(GetMacAboutMenuItemId)
5188 def GetMacPreferencesMenuItemId(*args, **kwargs):
5189 """GetMacPreferencesMenuItemId() -> long"""
5190 return _core_.PyApp_GetMacPreferencesMenuItemId(*args, **kwargs)
5191
5192 GetMacPreferencesMenuItemId = staticmethod(GetMacPreferencesMenuItemId)
5193 def GetMacExitMenuItemId(*args, **kwargs):
5194 """GetMacExitMenuItemId() -> long"""
5195 return _core_.PyApp_GetMacExitMenuItemId(*args, **kwargs)
5196
5197 GetMacExitMenuItemId = staticmethod(GetMacExitMenuItemId)
5198 def GetMacHelpMenuTitleName(*args, **kwargs):
5199 """GetMacHelpMenuTitleName() -> String"""
5200 return _core_.PyApp_GetMacHelpMenuTitleName(*args, **kwargs)
5201
5202 GetMacHelpMenuTitleName = staticmethod(GetMacHelpMenuTitleName)
5203 def SetMacSupportPCMenuShortcuts(*args, **kwargs):
5204 """SetMacSupportPCMenuShortcuts(bool val)"""
5205 return _core_.PyApp_SetMacSupportPCMenuShortcuts(*args, **kwargs)
5206
5207 SetMacSupportPCMenuShortcuts = staticmethod(SetMacSupportPCMenuShortcuts)
5208 def SetMacAboutMenuItemId(*args, **kwargs):
5209 """SetMacAboutMenuItemId(long val)"""
5210 return _core_.PyApp_SetMacAboutMenuItemId(*args, **kwargs)
5211
5212 SetMacAboutMenuItemId = staticmethod(SetMacAboutMenuItemId)
5213 def SetMacPreferencesMenuItemId(*args, **kwargs):
5214 """SetMacPreferencesMenuItemId(long val)"""
5215 return _core_.PyApp_SetMacPreferencesMenuItemId(*args, **kwargs)
5216
5217 SetMacPreferencesMenuItemId = staticmethod(SetMacPreferencesMenuItemId)
5218 def SetMacExitMenuItemId(*args, **kwargs):
5219 """SetMacExitMenuItemId(long val)"""
5220 return _core_.PyApp_SetMacExitMenuItemId(*args, **kwargs)
5221
5222 SetMacExitMenuItemId = staticmethod(SetMacExitMenuItemId)
5223 def SetMacHelpMenuTitleName(*args, **kwargs):
5224 """SetMacHelpMenuTitleName(String val)"""
5225 return _core_.PyApp_SetMacHelpMenuTitleName(*args, **kwargs)
5226
5227 SetMacHelpMenuTitleName = staticmethod(SetMacHelpMenuTitleName)
5228 def _BootstrapApp(*args, **kwargs):
5229 """
5230 _BootstrapApp(self)
5231
5232 For internal use only
5233 """
5234 return _core_.PyApp__BootstrapApp(*args, **kwargs)
5235
5236 def GetComCtl32Version(*args, **kwargs):
5237 """
5238 GetComCtl32Version() -> int
5239
5240 Returns 400, 470, 471, etc. for comctl32.dll 4.00, 4.70, 4.71 or 0 if
5241 it wasn't found at all. Raises an exception on non-Windows platforms.
5242 """
5243 return _core_.PyApp_GetComCtl32Version(*args, **kwargs)
5244
5245 GetComCtl32Version = staticmethod(GetComCtl32Version)
5246
5247 class PyAppPtr(PyApp):
5248 def __init__(self, this):
5249 self.this = this
5250 if not hasattr(self,"thisown"): self.thisown = 0
5251 self.__class__ = PyApp
5252 _core_.PyApp_swigregister(PyAppPtr)
5253
5254 def PyApp_IsMainLoopRunning(*args, **kwargs):
5255 """
5256 PyApp_IsMainLoopRunning() -> bool
5257
5258 Returns True if we're running the main loop, i.e. if the events can
5259 currently be dispatched.
5260 """
5261 return _core_.PyApp_IsMainLoopRunning(*args, **kwargs)
5262
5263 def PyApp_GetMacSupportPCMenuShortcuts(*args, **kwargs):
5264 """PyApp_GetMacSupportPCMenuShortcuts() -> bool"""
5265 return _core_.PyApp_GetMacSupportPCMenuShortcuts(*args, **kwargs)
5266
5267 def PyApp_GetMacAboutMenuItemId(*args, **kwargs):
5268 """PyApp_GetMacAboutMenuItemId() -> long"""
5269 return _core_.PyApp_GetMacAboutMenuItemId(*args, **kwargs)
5270
5271 def PyApp_GetMacPreferencesMenuItemId(*args, **kwargs):
5272 """PyApp_GetMacPreferencesMenuItemId() -> long"""
5273 return _core_.PyApp_GetMacPreferencesMenuItemId(*args, **kwargs)
5274
5275 def PyApp_GetMacExitMenuItemId(*args, **kwargs):
5276 """PyApp_GetMacExitMenuItemId() -> long"""
5277 return _core_.PyApp_GetMacExitMenuItemId(*args, **kwargs)
5278
5279 def PyApp_GetMacHelpMenuTitleName(*args, **kwargs):
5280 """PyApp_GetMacHelpMenuTitleName() -> String"""
5281 return _core_.PyApp_GetMacHelpMenuTitleName(*args, **kwargs)
5282
5283 def PyApp_SetMacSupportPCMenuShortcuts(*args, **kwargs):
5284 """PyApp_SetMacSupportPCMenuShortcuts(bool val)"""
5285 return _core_.PyApp_SetMacSupportPCMenuShortcuts(*args, **kwargs)
5286
5287 def PyApp_SetMacAboutMenuItemId(*args, **kwargs):
5288 """PyApp_SetMacAboutMenuItemId(long val)"""
5289 return _core_.PyApp_SetMacAboutMenuItemId(*args, **kwargs)
5290
5291 def PyApp_SetMacPreferencesMenuItemId(*args, **kwargs):
5292 """PyApp_SetMacPreferencesMenuItemId(long val)"""
5293 return _core_.PyApp_SetMacPreferencesMenuItemId(*args, **kwargs)
5294
5295 def PyApp_SetMacExitMenuItemId(*args, **kwargs):
5296 """PyApp_SetMacExitMenuItemId(long val)"""
5297 return _core_.PyApp_SetMacExitMenuItemId(*args, **kwargs)
5298
5299 def PyApp_SetMacHelpMenuTitleName(*args, **kwargs):
5300 """PyApp_SetMacHelpMenuTitleName(String val)"""
5301 return _core_.PyApp_SetMacHelpMenuTitleName(*args, **kwargs)
5302
5303 def PyApp_GetComCtl32Version(*args, **kwargs):
5304 """
5305 PyApp_GetComCtl32Version() -> int
5306
5307 Returns 400, 470, 471, etc. for comctl32.dll 4.00, 4.70, 4.71 or 0 if
5308 it wasn't found at all. Raises an exception on non-Windows platforms.
5309 """
5310 return _core_.PyApp_GetComCtl32Version(*args, **kwargs)
5311
5312 #---------------------------------------------------------------------------
5313
5314
5315 def Exit(*args, **kwargs):
5316 """
5317 Exit()
5318
5319 Force an exit of the application. Convenience for wx.GetApp().Exit()
5320 """
5321 return _core_.Exit(*args, **kwargs)
5322
5323 def Yield(*args, **kwargs):
5324 """
5325 Yield() -> bool
5326
5327 Yield to other apps/messages. Convenience for wx.GetApp().Yield()
5328 """
5329 return _core_.Yield(*args, **kwargs)
5330
5331 def YieldIfNeeded(*args, **kwargs):
5332 """
5333 YieldIfNeeded() -> bool
5334
5335 Yield to other apps/messages. Convenience for wx.GetApp().Yield(True)
5336 """
5337 return _core_.YieldIfNeeded(*args, **kwargs)
5338
5339 def SafeYield(*args, **kwargs):
5340 """
5341 SafeYield(Window win=None, bool onlyIfNeeded=False) -> bool
5342
5343 This function is similar to `wx.Yield`, except that it disables the
5344 user input to all program windows before calling `wx.Yield` and
5345 re-enables it again afterwards. If ``win`` is not None, this window
5346 will remain enabled, allowing the implementation of some limited user
5347 interaction.
5348
5349 :Returns: the result of the call to `wx.Yield`.
5350 """
5351 return _core_.SafeYield(*args, **kwargs)
5352
5353 def WakeUpIdle(*args, **kwargs):
5354 """
5355 WakeUpIdle()
5356
5357 Cause the message queue to become empty again, so idle events will be
5358 sent.
5359 """
5360 return _core_.WakeUpIdle(*args, **kwargs)
5361
5362 def PostEvent(*args, **kwargs):
5363 """
5364 PostEvent(EvtHandler dest, Event event)
5365
5366 Send an event to a window or other wx.EvtHandler to be processed
5367 later.
5368 """
5369 return _core_.PostEvent(*args, **kwargs)
5370
5371 def App_CleanUp(*args, **kwargs):
5372 """
5373 App_CleanUp()
5374
5375 For internal use only, it is used to cleanup after wxWidgets when
5376 Python shuts down.
5377 """
5378 return _core_.App_CleanUp(*args, **kwargs)
5379
5380 def GetApp(*args, **kwargs):
5381 """
5382 GetApp() -> PyApp
5383
5384 Return a reference to the current wx.App object.
5385 """
5386 return _core_.GetApp(*args, **kwargs)
5387
5388 def SetDefaultPyEncoding(*args, **kwargs):
5389 """
5390 SetDefaultPyEncoding(string encoding)
5391
5392 Sets the encoding that wxPython will use when it needs to convert a
5393 Python string or unicode object to or from a wxString.
5394
5395 The default encoding is the value of ``locale.getdefaultlocale()[1]``
5396 but please be aware that the default encoding within the same locale
5397 may be slightly different on different platforms. For example, please
5398 see http://www.alanwood.net/demos/charsetdiffs.html for differences
5399 between the common latin/roman encodings.
5400 """
5401 return _core_.SetDefaultPyEncoding(*args, **kwargs)
5402
5403 def GetDefaultPyEncoding(*args, **kwargs):
5404 """
5405 GetDefaultPyEncoding() -> string
5406
5407 Gets the current encoding that wxPython will use when it needs to
5408 convert a Python string or unicode object to or from a wxString.
5409 """
5410 return _core_.GetDefaultPyEncoding(*args, **kwargs)
5411 #----------------------------------------------------------------------
5412
5413 class PyOnDemandOutputWindow:
5414 """
5415 A class that can be used for redirecting Python's stdout and
5416 stderr streams. It will do nothing until something is wrriten to
5417 the stream at which point it will create a Frame with a text area
5418 and write the text there.
5419 """
5420 def __init__(self, title = "wxPython: stdout/stderr"):
5421 self.frame = None
5422 self.title = title
5423 self.pos = wx.DefaultPosition
5424 self.size = (450, 300)
5425 self.parent = None
5426
5427 def SetParent(self, parent):
5428 """Set the window to be used as the popup Frame's parent."""
5429 self.parent = parent
5430
5431
5432 def CreateOutputWindow(self, st):
5433 self.frame = wx.Frame(self.parent, -1, self.title, self.pos, self.size,
5434 style=wx.DEFAULT_FRAME_STYLE)
5435 self.text = wx.TextCtrl(self.frame, -1, "",
5436 style=wx.TE_MULTILINE|wx.TE_READONLY)
5437 self.text.AppendText(st)
5438 self.frame.Show(True)
5439 EVT_CLOSE(self.frame, self.OnCloseWindow)
5440
5441
5442 def OnCloseWindow(self, event):
5443 if self.frame is not None:
5444 self.frame.Destroy()
5445 self.frame = None
5446 self.text = None
5447
5448
5449 # These methods provide the file-like output behaviour.
5450 def write(self, text):
5451 """
5452 Create the output window if needed and write the string to it.
5453 If not called in the context of the gui thread then uses
5454 CallAfter to do the work there.
5455 """
5456 if self.frame is None:
5457 if not wx.Thread_IsMain():
5458 wx.CallAfter(self.CreateOutputWindow, text)
5459 else:
5460 self.CreateOutputWindow(text)
5461 else:
5462 if not wx.Thread_IsMain():
5463 wx.CallAfter(self.text.AppendText, text)
5464 else:
5465 self.text.AppendText(text)
5466
5467
5468 def close(self):
5469 if self.frame is not None:
5470 wx.CallAfter(self.frame.Close)
5471
5472
5473 def flush(self):
5474 pass
5475
5476
5477
5478 #----------------------------------------------------------------------
5479
5480 _defRedirect = (wx.Platform == '__WXMSW__' or wx.Platform == '__WXMAC__')
5481
5482 class App(wx.PyApp):
5483 """
5484 The ``wx.App`` class represents the application and is used to:
5485
5486 * bootstrap the wxPython system and initialize the underlying
5487 gui toolkit
5488 * set and get application-wide properties
5489 * implement the windowing system main message or event loop,
5490 and to dispatch events to window instances
5491 * etc.
5492
5493 Every application must have a ``wx.App`` instance, and all
5494 creation of UI objects should be delayed until after the
5495 ``wx.App`` object has been created in order to ensure that the gui
5496 platform and wxWidgets have been fully initialized.
5497
5498 Normally you would derive from this class and implement an
5499 ``OnInit`` method that creates a frame and then calls
5500 ``self.SetTopWindow(frame)``.
5501
5502 :see: `wx.PySimpleApp` for a simpler app class that can be used
5503 directly.
5504 """
5505
5506 outputWindowClass = PyOnDemandOutputWindow
5507
5508 def __init__(self, redirect=_defRedirect, filename=None,
5509 useBestVisual=False, clearSigInt=True):
5510 """
5511 Construct a ``wx.App`` object.
5512
5513 :param redirect: Should ``sys.stdout`` and ``sys.stderr`` be
5514 redirected? Defaults to True on Windows and Mac, False
5515 otherwise. If `filename` is None then output will be
5516 redirected to a window that pops up as needed. (You can
5517 control what kind of window is created for the output by
5518 resetting the class variable ``outputWindowClass`` to a
5519 class of your choosing.)
5520
5521 :param filename: The name of a file to redirect output to, if
5522 redirect is True.
5523
5524 :param useBestVisual: Should the app try to use the best
5525 available visual provided by the system (only relevant on
5526 systems that have more than one visual.) This parameter
5527 must be used instead of calling `SetUseBestVisual` later
5528 on because it must be set before the underlying GUI
5529 toolkit is initialized.
5530
5531 :param clearSigInt: Should SIGINT be cleared? This allows the
5532 app to terminate upon a Ctrl-C in the console like other
5533 GUI apps will.
5534
5535 :note: You should override OnInit to do applicaition
5536 initialization to ensure that the system, toolkit and
5537 wxWidgets are fully initialized.
5538 """
5539 wx.PyApp.__init__(self)
5540
5541 if wx.Platform == "__WXMAC__":
5542 try:
5543 import MacOS
5544 if not MacOS.WMAvailable():
5545 print """\
5546 This program needs access to the screen. Please run with 'pythonw',
5547 not 'python', and only when you are logged in on the main display of
5548 your Mac."""
5549 _sys.exit(1)
5550 except SystemExit:
5551 raise
5552 except:
5553 pass
5554
5555 # This has to be done before OnInit
5556 self.SetUseBestVisual(useBestVisual)
5557
5558 # Set the default handler for SIGINT. This fixes a problem
5559 # where if Ctrl-C is pressed in the console that started this
5560 # app then it will not appear to do anything, (not even send
5561 # KeyboardInterrupt???) but will later segfault on exit. By
5562 # setting the default handler then the app will exit, as
5563 # expected (depending on platform.)
5564 if clearSigInt:
5565 try:
5566 import signal
5567 signal.signal(signal.SIGINT, signal.SIG_DFL)
5568 except:
5569 pass
5570
5571 # Save and redirect the stdio to a window?
5572 self.stdioWin = None
5573 self.saveStdio = (_sys.stdout, _sys.stderr)
5574 if redirect:
5575 self.RedirectStdio(filename)
5576
5577 # Use Python's install prefix as the default
5578 wx.StandardPaths.Get().SetInstallPrefix(_sys.prefix)
5579
5580 # This finishes the initialization of wxWindows and then calls
5581 # the OnInit that should be present in the derived class
5582 self._BootstrapApp()
5583
5584
5585 def __del__(self):
5586 try:
5587 self.RestoreStdio() # Just in case the MainLoop was overridden
5588 except:
5589 pass
5590
5591
5592 def SetTopWindow(self, frame):
5593 """Set the \"main\" top level window"""
5594 if self.stdioWin:
5595 self.stdioWin.SetParent(frame)
5596 wx.PyApp.SetTopWindow(self, frame)
5597
5598
5599 def MainLoop(self):
5600 """Execute the main GUI event loop"""
5601 wx.PyApp.MainLoop(self)
5602 self.RestoreStdio()
5603
5604
5605 def RedirectStdio(self, filename=None):
5606 """Redirect sys.stdout and sys.stderr to a file or a popup window."""
5607 if filename:
5608 _sys.stdout = _sys.stderr = open(filename, 'a')
5609 else:
5610 self.stdioWin = self.outputWindowClass()
5611 _sys.stdout = _sys.stderr = self.stdioWin
5612
5613
5614 def RestoreStdio(self):
5615 _sys.stdout, _sys.stderr = self.saveStdio
5616
5617
5618 def SetOutputWindowAttributes(self, title=None, pos=None, size=None):
5619 """
5620 Set the title, position and/or size of the output window if
5621 the stdio has been redirected. This should be called before
5622 any output would cause the output window to be created.
5623 """
5624 if self.stdioWin:
5625 if title is not None:
5626 self.stdioWin.title = title
5627 if pos is not None:
5628 self.stdioWin.pos = pos
5629 if size is not None:
5630 self.stdioWin.size = size
5631
5632
5633
5634
5635 # change from wx.PyApp_XX to wx.App_XX
5636 App_GetMacSupportPCMenuShortcuts = _core_.PyApp_GetMacSupportPCMenuShortcuts
5637 App_GetMacAboutMenuItemId = _core_.PyApp_GetMacAboutMenuItemId
5638 App_GetMacPreferencesMenuItemId = _core_.PyApp_GetMacPreferencesMenuItemId
5639 App_GetMacExitMenuItemId = _core_.PyApp_GetMacExitMenuItemId
5640 App_GetMacHelpMenuTitleName = _core_.PyApp_GetMacHelpMenuTitleName
5641 App_SetMacSupportPCMenuShortcuts = _core_.PyApp_SetMacSupportPCMenuShortcuts
5642 App_SetMacAboutMenuItemId = _core_.PyApp_SetMacAboutMenuItemId
5643 App_SetMacPreferencesMenuItemId = _core_.PyApp_SetMacPreferencesMenuItemId
5644 App_SetMacExitMenuItemId = _core_.PyApp_SetMacExitMenuItemId
5645 App_SetMacHelpMenuTitleName = _core_.PyApp_SetMacHelpMenuTitleName
5646 App_GetComCtl32Version = _core_.PyApp_GetComCtl32Version
5647
5648 #----------------------------------------------------------------------------
5649
5650 class PySimpleApp(wx.App):
5651 """
5652 A simple application class. You can just create one of these and
5653 then then make your top level windows later, and not have to worry
5654 about OnInit. For example::
5655
5656 app = wx.PySimpleApp()
5657 frame = wx.Frame(None, title='Hello World')
5658 frame.Show()
5659 app.MainLoop()
5660
5661 :see: `wx.App`
5662 """
5663
5664 def __init__(self, redirect=False, filename=None,
5665 useBestVisual=False, clearSigInt=True):
5666 """
5667 :see: `wx.App.__init__`
5668 """
5669 wx.App.__init__(self, redirect, filename, useBestVisual, clearSigInt)
5670
5671 def OnInit(self):
5672 return True
5673
5674
5675
5676 # Is anybody using this one?
5677 class PyWidgetTester(wx.App):
5678 def __init__(self, size = (250, 100)):
5679 self.size = size
5680 wx.App.__init__(self, 0)
5681
5682 def OnInit(self):
5683 self.frame = wx.Frame(None, -1, "Widget Tester", pos=(0,0), size=self.size)
5684 self.SetTopWindow(self.frame)
5685 return True
5686
5687 def SetWidget(self, widgetClass, *args, **kwargs):
5688 w = widgetClass(self.frame, *args, **kwargs)
5689 self.frame.Show(True)
5690
5691 #----------------------------------------------------------------------------
5692 # DO NOT hold any other references to this object. This is how we
5693 # know when to cleanup system resources that wxWidgets is holding. When
5694 # the sys module is unloaded, the refcount on sys.__wxPythonCleanup
5695 # goes to zero and it calls the wx.App_CleanUp function.
5696
5697 class __wxPyCleanup:
5698 def __init__(self):
5699 self.cleanup = _core_.App_CleanUp
5700 def __del__(self):
5701 self.cleanup()
5702
5703 _sys.__wxPythonCleanup = __wxPyCleanup()
5704
5705 ## # another possible solution, but it gets called too early...
5706 ## import atexit
5707 ## atexit.register(_core_.wxApp_CleanUp)
5708
5709
5710 #----------------------------------------------------------------------------
5711
5712 #---------------------------------------------------------------------------
5713
5714 class EventLoop(object):
5715 """Proxy of C++ EventLoop class"""
5716 def __repr__(self):
5717 return "<%s.%s; proxy of C++ wxEventLoop instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
5718 def __init__(self, *args, **kwargs):
5719 """__init__(self) -> EventLoop"""
5720 newobj = _core_.new_EventLoop(*args, **kwargs)
5721 self.this = newobj.this
5722 self.thisown = 1
5723 del newobj.thisown
5724 def __del__(self, destroy=_core_.delete_EventLoop):
5725 """__del__(self)"""
5726 try:
5727 if self.thisown: destroy(self)
5728 except: pass
5729
5730 def Run(*args, **kwargs):
5731 """Run(self) -> int"""
5732 return _core_.EventLoop_Run(*args, **kwargs)
5733
5734 def Exit(*args, **kwargs):
5735 """Exit(self, int rc=0)"""
5736 return _core_.EventLoop_Exit(*args, **kwargs)
5737
5738 def Pending(*args, **kwargs):
5739 """Pending(self) -> bool"""
5740 return _core_.EventLoop_Pending(*args, **kwargs)
5741
5742 def Dispatch(*args, **kwargs):
5743 """Dispatch(self) -> bool"""
5744 return _core_.EventLoop_Dispatch(*args, **kwargs)
5745
5746 def IsRunning(*args, **kwargs):
5747 """IsRunning(self) -> bool"""
5748 return _core_.EventLoop_IsRunning(*args, **kwargs)
5749
5750 def GetActive(*args, **kwargs):
5751 """GetActive() -> EventLoop"""
5752 return _core_.EventLoop_GetActive(*args, **kwargs)
5753
5754 GetActive = staticmethod(GetActive)
5755 def SetActive(*args, **kwargs):
5756 """SetActive(EventLoop loop)"""
5757 return _core_.EventLoop_SetActive(*args, **kwargs)
5758
5759 SetActive = staticmethod(SetActive)
5760
5761 class EventLoopPtr(EventLoop):
5762 def __init__(self, this):
5763 self.this = this
5764 if not hasattr(self,"thisown"): self.thisown = 0
5765 self.__class__ = EventLoop
5766 _core_.EventLoop_swigregister(EventLoopPtr)
5767
5768 def EventLoop_GetActive(*args, **kwargs):
5769 """EventLoop_GetActive() -> EventLoop"""
5770 return _core_.EventLoop_GetActive(*args, **kwargs)
5771
5772 def EventLoop_SetActive(*args, **kwargs):
5773 """EventLoop_SetActive(EventLoop loop)"""
5774 return _core_.EventLoop_SetActive(*args, **kwargs)
5775
5776 #---------------------------------------------------------------------------
5777
5778 class AcceleratorEntry(object):
5779 """
5780 A class used to define items in an `wx.AcceleratorTable`. wxPython
5781 programs can choose to use wx.AcceleratorEntry objects, but using a
5782 list of 3-tuple of integers (flags, keyCode, cmdID) usually works just
5783 as well. See `__init__` for of the tuple values.
5784
5785 :see: `wx.AcceleratorTable`
5786 """
5787 def __repr__(self):
5788 return "<%s.%s; proxy of C++ wxAcceleratorEntry instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
5789 def __init__(self, *args, **kwargs):
5790 """
5791 __init__(self, int flags=0, int keyCode=0, int cmdID=0) -> AcceleratorEntry
5792
5793 Construct a wx.AcceleratorEntry.
5794 """
5795 newobj = _core_.new_AcceleratorEntry(*args, **kwargs)
5796 self.this = newobj.this
5797 self.thisown = 1
5798 del newobj.thisown
5799 def __del__(self, destroy=_core_.delete_AcceleratorEntry):
5800 """__del__(self)"""
5801 try:
5802 if self.thisown: destroy(self)
5803 except: pass
5804
5805 def Set(*args, **kwargs):
5806 """
5807 Set(self, int flags, int keyCode, int cmd)
5808
5809 (Re)set the attributes of a wx.AcceleratorEntry.
5810 :see `__init__`
5811 """
5812 return _core_.AcceleratorEntry_Set(*args, **kwargs)
5813
5814 def GetFlags(*args, **kwargs):
5815 """
5816 GetFlags(self) -> int
5817
5818 Get the AcceleratorEntry's flags.
5819 """
5820 return _core_.AcceleratorEntry_GetFlags(*args, **kwargs)
5821
5822 def GetKeyCode(*args, **kwargs):
5823 """
5824 GetKeyCode(self) -> int
5825
5826 Get the AcceleratorEntry's keycode.
5827 """
5828 return _core_.AcceleratorEntry_GetKeyCode(*args, **kwargs)
5829
5830 def GetCommand(*args, **kwargs):
5831 """
5832 GetCommand(self) -> int
5833
5834 Get the AcceleratorEntry's command ID.
5835 """
5836 return _core_.AcceleratorEntry_GetCommand(*args, **kwargs)
5837
5838
5839 class AcceleratorEntryPtr(AcceleratorEntry):
5840 def __init__(self, this):
5841 self.this = this
5842 if not hasattr(self,"thisown"): self.thisown = 0
5843 self.__class__ = AcceleratorEntry
5844 _core_.AcceleratorEntry_swigregister(AcceleratorEntryPtr)
5845
5846 class AcceleratorTable(Object):
5847 """
5848 An accelerator table allows the application to specify a table of
5849 keyboard shortcuts for menus or other commands. On Windows, menu or
5850 button commands are supported; on GTK, only menu commands are
5851 supported.
5852 """
5853 def __repr__(self):
5854 return "<%s.%s; proxy of C++ wxAcceleratorTable instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
5855 def __init__(self, *args, **kwargs):
5856 """
5857 __init__(entries) -> AcceleratorTable
5858
5859 Construct an AcceleratorTable from a list of `wx.AcceleratorEntry`
5860 items or or of 3-tuples (flags, keyCode, cmdID)
5861
5862 :see: `wx.AcceleratorEntry`
5863 """
5864 newobj = _core_.new_AcceleratorTable(*args, **kwargs)
5865 self.this = newobj.this
5866 self.thisown = 1
5867 del newobj.thisown
5868 def __del__(self, destroy=_core_.delete_AcceleratorTable):
5869 """__del__(self)"""
5870 try:
5871 if self.thisown: destroy(self)
5872 except: pass
5873
5874 def Ok(*args, **kwargs):
5875 """Ok(self) -> bool"""
5876 return _core_.AcceleratorTable_Ok(*args, **kwargs)
5877
5878
5879 class AcceleratorTablePtr(AcceleratorTable):
5880 def __init__(self, this):
5881 self.this = this
5882 if not hasattr(self,"thisown"): self.thisown = 0
5883 self.__class__ = AcceleratorTable
5884 _core_.AcceleratorTable_swigregister(AcceleratorTablePtr)
5885
5886
5887 def GetAccelFromString(*args, **kwargs):
5888 """GetAccelFromString(String label) -> AcceleratorEntry"""
5889 return _core_.GetAccelFromString(*args, **kwargs)
5890 #---------------------------------------------------------------------------
5891
5892 class VisualAttributes(object):
5893 """struct containing all the visual attributes of a control"""
5894 def __repr__(self):
5895 return "<%s.%s; proxy of C++ wxVisualAttributes instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
5896 def __init__(self, *args, **kwargs):
5897 """
5898 __init__(self) -> VisualAttributes
5899
5900 struct containing all the visual attributes of a control
5901 """
5902 newobj = _core_.new_VisualAttributes(*args, **kwargs)
5903 self.this = newobj.this
5904 self.thisown = 1
5905 del newobj.thisown
5906 def __del__(self, destroy=_core_.delete_VisualAttributes):
5907 """__del__(self)"""
5908 try:
5909 if self.thisown: destroy(self)
5910 except: pass
5911
5912 font = property(_core_.VisualAttributes_font_get, _core_.VisualAttributes_font_set)
5913 colFg = property(_core_.VisualAttributes_colFg_get, _core_.VisualAttributes_colFg_set)
5914 colBg = property(_core_.VisualAttributes_colBg_get, _core_.VisualAttributes_colBg_set)
5915
5916 class VisualAttributesPtr(VisualAttributes):
5917 def __init__(self, this):
5918 self.this = this
5919 if not hasattr(self,"thisown"): self.thisown = 0
5920 self.__class__ = VisualAttributes
5921 _core_.VisualAttributes_swigregister(VisualAttributesPtr)
5922 NullAcceleratorTable = cvar.NullAcceleratorTable
5923 PanelNameStr = cvar.PanelNameStr
5924
5925 WINDOW_VARIANT_NORMAL = _core_.WINDOW_VARIANT_NORMAL
5926 WINDOW_VARIANT_SMALL = _core_.WINDOW_VARIANT_SMALL
5927 WINDOW_VARIANT_MINI = _core_.WINDOW_VARIANT_MINI
5928 WINDOW_VARIANT_LARGE = _core_.WINDOW_VARIANT_LARGE
5929 WINDOW_VARIANT_MAX = _core_.WINDOW_VARIANT_MAX
5930 class Window(EvtHandler):
5931 """
5932 wx.Window is the base class for all windows and represents any visible
5933 object on the screen. All controls, top level windows and so on are
5934 wx.Windows. Sizers and device contexts are not however, as they don't
5935 appear on screen themselves.
5936
5937 """
5938 def __repr__(self):
5939 return "<%s.%s; proxy of C++ wxWindow instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
5940 def __init__(self, *args, **kwargs):
5941 """
5942 __init__(self, Window parent, int id=-1, Point pos=DefaultPosition,
5943 Size size=DefaultSize, long style=0, String name=PanelNameStr) -> Window
5944
5945 Construct and show a generic Window.
5946 """
5947 newobj = _core_.new_Window(*args, **kwargs)
5948 self.this = newobj.this
5949 self.thisown = 1
5950 del newobj.thisown
5951 self._setOORInfo(self)
5952
5953 def Create(*args, **kwargs):
5954 """
5955 Create(self, Window parent, int id=-1, Point pos=DefaultPosition,
5956 Size size=DefaultSize, long style=0, String name=PanelNameStr) -> bool
5957
5958 Create the GUI part of the Window for 2-phase creation mode.
5959 """
5960 return _core_.Window_Create(*args, **kwargs)
5961
5962 def Close(*args, **kwargs):
5963 """
5964 Close(self, bool force=False) -> bool
5965
5966 This function simply generates a EVT_CLOSE event whose handler usually
5967 tries to close the window. It doesn't close the window itself,
5968 however. If force is False (the default) then the window's close
5969 handler will be allowed to veto the destruction of the window.
5970 """
5971 return _core_.Window_Close(*args, **kwargs)
5972
5973 def Destroy(*args, **kwargs):
5974 """
5975 Destroy(self) -> bool
5976
5977 Destroys the window safely. Frames and dialogs are not destroyed
5978 immediately when this function is called -- they are added to a list
5979 of windows to be deleted on idle time, when all the window's events
5980 have been processed. This prevents problems with events being sent to
5981 non-existent windows.
5982
5983 Returns True if the window has either been successfully deleted, or it
5984 has been added to the list of windows pending real deletion.
5985 """
5986 return _core_.Window_Destroy(*args, **kwargs)
5987
5988 def DestroyChildren(*args, **kwargs):
5989 """
5990 DestroyChildren(self) -> bool
5991
5992 Destroys all children of a window. Called automatically by the
5993 destructor.
5994 """
5995 return _core_.Window_DestroyChildren(*args, **kwargs)
5996
5997 def IsBeingDeleted(*args, **kwargs):
5998 """
5999 IsBeingDeleted(self) -> bool
6000
6001 Is the window in the process of being deleted?
6002 """
6003 return _core_.Window_IsBeingDeleted(*args, **kwargs)
6004
6005 def SetTitle(*args, **kwargs):
6006 """
6007 SetTitle(self, String title)
6008
6009 Sets the window's title. Applicable only to frames and dialogs.
6010 """
6011 return _core_.Window_SetTitle(*args, **kwargs)
6012
6013 def GetTitle(*args, **kwargs):
6014 """
6015 GetTitle(self) -> String
6016
6017 Gets the window's title. Applicable only to frames and dialogs.
6018 """
6019 return _core_.Window_GetTitle(*args, **kwargs)
6020
6021 def SetLabel(*args, **kwargs):
6022 """
6023 SetLabel(self, String label)
6024
6025 Set the text which the window shows in its label if applicable.
6026 """
6027 return _core_.Window_SetLabel(*args, **kwargs)
6028
6029 def GetLabel(*args, **kwargs):
6030 """
6031 GetLabel(self) -> String
6032
6033 Generic way of getting a label from any window, for identification
6034 purposes. The interpretation of this function differs from class to
6035 class. For frames and dialogs, the value returned is the title. For
6036 buttons or static text controls, it is the button text. This function
6037 can be useful for meta-programs such as testing tools or special-needs
6038 access programs)which need to identify windows by name.
6039 """
6040 return _core_.Window_GetLabel(*args, **kwargs)
6041
6042 def SetName(*args, **kwargs):
6043 """
6044 SetName(self, String name)
6045
6046 Sets the window's name. The window name is used for ressource setting
6047 in X, it is not the same as the window title/label
6048 """
6049 return _core_.Window_SetName(*args, **kwargs)
6050
6051 def GetName(*args, **kwargs):
6052 """
6053 GetName(self) -> String
6054
6055 Returns the windows name. This name is not guaranteed to be unique;
6056 it is up to the programmer to supply an appropriate name in the window
6057 constructor or via wx.Window.SetName.
6058 """
6059 return _core_.Window_GetName(*args, **kwargs)
6060
6061 def SetWindowVariant(*args, **kwargs):
6062 """
6063 SetWindowVariant(self, int variant)
6064
6065 Sets the variant of the window/font size to use for this window, if
6066 the platform supports variants, for example, wxMac.
6067 """
6068 return _core_.Window_SetWindowVariant(*args, **kwargs)
6069
6070 def GetWindowVariant(*args, **kwargs):
6071 """GetWindowVariant(self) -> int"""
6072 return _core_.Window_GetWindowVariant(*args, **kwargs)
6073
6074 def SetId(*args, **kwargs):
6075 """
6076 SetId(self, int winid)
6077
6078 Sets the identifier of the window. Each window has an integer
6079 identifier. If the application has not provided one, an identifier
6080 will be generated. Normally, the identifier should be provided on
6081 creation and should not be modified subsequently.
6082 """
6083 return _core_.Window_SetId(*args, **kwargs)
6084
6085 def GetId(*args, **kwargs):
6086 """
6087 GetId(self) -> int
6088
6089 Returns the identifier of the window. Each window has an integer
6090 identifier. If the application has not provided one (or the default Id
6091 -1 is used) then an unique identifier with a negative value will be
6092 generated.
6093 """
6094 return _core_.Window_GetId(*args, **kwargs)
6095
6096 def NewControlId(*args, **kwargs):
6097 """
6098 NewControlId() -> int
6099
6100 Generate a control id for the controls which were not given one.
6101 """
6102 return _core_.Window_NewControlId(*args, **kwargs)
6103
6104 NewControlId = staticmethod(NewControlId)
6105 def NextControlId(*args, **kwargs):
6106 """
6107 NextControlId(int winid) -> int
6108
6109 Get the id of the control following the one with the given
6110 autogenerated) id
6111 """
6112 return _core_.Window_NextControlId(*args, **kwargs)
6113
6114 NextControlId = staticmethod(NextControlId)
6115 def PrevControlId(*args, **kwargs):
6116 """
6117 PrevControlId(int winid) -> int
6118
6119 Get the id of the control preceding the one with the given
6120 autogenerated) id
6121 """
6122 return _core_.Window_PrevControlId(*args, **kwargs)
6123
6124 PrevControlId = staticmethod(PrevControlId)
6125 def SetSize(*args, **kwargs):
6126 """
6127 SetSize(self, Size size)
6128
6129 Sets the size of the window in pixels.
6130 """
6131 return _core_.Window_SetSize(*args, **kwargs)
6132
6133 def SetDimensions(*args, **kwargs):
6134 """
6135 SetDimensions(self, int x, int y, int width, int height, int sizeFlags=SIZE_AUTO)
6136
6137 Sets the position and size of the window in pixels. The sizeFlags
6138 parameter indicates the interpretation of the other params if they are
6139 equal to -1.
6140
6141 ======================== ======================================
6142 wx.SIZE_AUTO A -1 indicates that a class-specific
6143 default should be used.
6144 wx.SIZE_USE_EXISTING Axisting dimensions should be used if
6145 -1 values are supplied.
6146 wxSIZE_ALLOW_MINUS_ONE Allow dimensions of -1 and less to be
6147 interpreted as real dimensions, not
6148 default values.
6149 ======================== ======================================
6150
6151 """
6152 return _core_.Window_SetDimensions(*args, **kwargs)
6153
6154 def SetRect(*args, **kwargs):
6155 """
6156 SetRect(self, Rect rect, int sizeFlags=SIZE_AUTO)
6157
6158 Sets the position and size of the window in pixels using a wx.Rect.
6159 """
6160 return _core_.Window_SetRect(*args, **kwargs)
6161
6162 def SetSizeWH(*args, **kwargs):
6163 """
6164 SetSizeWH(self, int width, int height)
6165
6166 Sets the size of the window in pixels.
6167 """
6168 return _core_.Window_SetSizeWH(*args, **kwargs)
6169
6170 def Move(*args, **kwargs):
6171 """
6172 Move(self, Point pt, int flags=SIZE_USE_EXISTING)
6173
6174 Moves the window to the given position.
6175 """
6176 return _core_.Window_Move(*args, **kwargs)
6177
6178 SetPosition = Move
6179 def MoveXY(*args, **kwargs):
6180 """
6181 MoveXY(self, int x, int y, int flags=SIZE_USE_EXISTING)
6182
6183 Moves the window to the given position.
6184 """
6185 return _core_.Window_MoveXY(*args, **kwargs)
6186
6187 def SetBestFittingSize(*args, **kwargs):
6188 """
6189 SetBestFittingSize(self, Size size=DefaultSize)
6190
6191 A 'Smart' SetSize that will fill in default size components with the
6192 window's *best size* values. Also set's the minsize for use with sizers.
6193 """
6194 return _core_.Window_SetBestFittingSize(*args, **kwargs)
6195
6196 def Raise(*args, **kwargs):
6197 """
6198 Raise(self)
6199
6200 Raises the window to the top of the window hierarchy if it is a
6201 managed window (dialog or frame).
6202 """
6203 return _core_.Window_Raise(*args, **kwargs)
6204
6205 def Lower(*args, **kwargs):
6206 """
6207 Lower(self)
6208
6209 Lowers the window to the bottom of the window hierarchy if it is a
6210 managed window (dialog or frame).
6211 """
6212 return _core_.Window_Lower(*args, **kwargs)
6213
6214 def SetClientSize(*args, **kwargs):
6215 """
6216 SetClientSize(self, Size size)
6217
6218 This sets the size of the window client area in pixels. Using this
6219 function to size a window tends to be more device-independent than
6220 wx.Window.SetSize, since the application need not worry about what
6221 dimensions the border or title bar have when trying to fit the window
6222 around panel items, for example.
6223 """
6224 return _core_.Window_SetClientSize(*args, **kwargs)
6225
6226 def SetClientSizeWH(*args, **kwargs):
6227 """
6228 SetClientSizeWH(self, int width, int height)
6229
6230 This sets the size of the window client area in pixels. Using this
6231 function to size a window tends to be more device-independent than
6232 wx.Window.SetSize, since the application need not worry about what
6233 dimensions the border or title bar have when trying to fit the window
6234 around panel items, for example.
6235 """
6236 return _core_.Window_SetClientSizeWH(*args, **kwargs)
6237
6238 def SetClientRect(*args, **kwargs):
6239 """
6240 SetClientRect(self, Rect rect)
6241
6242 This sets the size of the window client area in pixels. Using this
6243 function to size a window tends to be more device-independent than
6244 wx.Window.SetSize, since the application need not worry about what
6245 dimensions the border or title bar have when trying to fit the window
6246 around panel items, for example.
6247 """
6248 return _core_.Window_SetClientRect(*args, **kwargs)
6249
6250 def GetPosition(*args, **kwargs):
6251 """
6252 GetPosition(self) -> Point
6253
6254 Get the window's position.
6255 """
6256 return _core_.Window_GetPosition(*args, **kwargs)
6257
6258 def GetPositionTuple(*args, **kwargs):
6259 """
6260 GetPositionTuple() -> (x,y)
6261
6262 Get the window's position.
6263 """
6264 return _core_.Window_GetPositionTuple(*args, **kwargs)
6265
6266 def GetSize(*args, **kwargs):
6267 """
6268 GetSize(self) -> Size
6269
6270 Get the window size.
6271 """
6272 return _core_.Window_GetSize(*args, **kwargs)
6273
6274 def GetSizeTuple(*args, **kwargs):
6275 """
6276 GetSizeTuple() -> (width, height)
6277
6278 Get the window size.
6279 """
6280 return _core_.Window_GetSizeTuple(*args, **kwargs)
6281
6282 def GetRect(*args, **kwargs):
6283 """
6284 GetRect(self) -> Rect
6285
6286 Returns the size and position of the window as a wx.Rect object.
6287 """
6288 return _core_.Window_GetRect(*args, **kwargs)
6289
6290 def GetClientSize(*args, **kwargs):
6291 """
6292 GetClientSize(self) -> Size
6293
6294 This gets the size of the window's 'client area' in pixels. The client
6295 area is the area which may be drawn on by the programmer, excluding
6296 title bar, border, scrollbars, etc.
6297 """
6298 return _core_.Window_GetClientSize(*args, **kwargs)
6299
6300 def GetClientSizeTuple(*args, **kwargs):
6301 """
6302 GetClientSizeTuple() -> (width, height)
6303
6304 This gets the size of the window's 'client area' in pixels. The client
6305 area is the area which may be drawn on by the programmer, excluding
6306 title bar, border, scrollbars, etc.
6307 """
6308 return _core_.Window_GetClientSizeTuple(*args, **kwargs)
6309
6310 def GetClientAreaOrigin(*args, **kwargs):
6311 """
6312 GetClientAreaOrigin(self) -> Point
6313
6314 Get the origin of the client area of the window relative to the
6315 window's top left corner (the client area may be shifted because of
6316 the borders, scrollbars, other decorations...)
6317 """
6318 return _core_.Window_GetClientAreaOrigin(*args, **kwargs)
6319
6320 def GetClientRect(*args, **kwargs):
6321 """
6322 GetClientRect(self) -> Rect
6323
6324 Get the client area position and size as a `wx.Rect` object.
6325 """
6326 return _core_.Window_GetClientRect(*args, **kwargs)
6327
6328 def GetBestSize(*args, **kwargs):
6329 """
6330 GetBestSize(self) -> Size
6331
6332 This function returns the best acceptable minimal size for the
6333 window, if applicable. For example, for a static text control, it will
6334 be the minimal size such that the control label is not truncated. For
6335 windows containing subwindows (suzh aswx.Panel), the size returned by
6336 this function will be the same as the size the window would have had
6337 after calling Fit.
6338 """
6339 return _core_.Window_GetBestSize(*args, **kwargs)
6340
6341 def GetBestSizeTuple(*args, **kwargs):
6342 """
6343 GetBestSizeTuple() -> (width, height)
6344
6345 This function returns the best acceptable minimal size for the
6346 window, if applicable. For example, for a static text control, it will
6347 be the minimal size such that the control label is not truncated. For
6348 windows containing subwindows (suzh aswx.Panel), the size returned by
6349 this function will be the same as the size the window would have had
6350 after calling Fit.
6351 """
6352 return _core_.Window_GetBestSizeTuple(*args, **kwargs)
6353
6354 def InvalidateBestSize(*args, **kwargs):
6355 """
6356 InvalidateBestSize(self)
6357
6358 Reset the cached best size value so it will be recalculated the next
6359 time it is needed.
6360 """
6361 return _core_.Window_InvalidateBestSize(*args, **kwargs)
6362
6363 def GetBestFittingSize(*args, **kwargs):
6364 """
6365 GetBestFittingSize(self) -> Size
6366
6367 This function will merge the window's best size into the window's
6368 minimum size, giving priority to the min size components, and returns
6369 the results.
6370
6371 """
6372 return _core_.Window_GetBestFittingSize(*args, **kwargs)
6373
6374 def GetAdjustedBestSize(*args, **kwargs):
6375 """
6376 GetAdjustedBestSize(self) -> Size
6377
6378 This method is similar to GetBestSize, except in one
6379 thing. GetBestSize should return the minimum untruncated size of the
6380 window, while this method will return the largest of BestSize and any
6381 user specified minimum size. ie. it is the minimum size the window
6382 should currently be drawn at, not the minimal size it can possibly
6383 tolerate.
6384 """
6385 return _core_.Window_GetAdjustedBestSize(*args, **kwargs)
6386
6387 def Center(*args, **kwargs):
6388 """
6389 Center(self, int direction=BOTH)
6390
6391 Centers the window. The parameter specifies the direction for
6392 cetering, and may be wx.HORIZONTAL, wx.VERTICAL or wx.BOTH. It may
6393 also include wx.CENTER_ON_SCREEN flag if you want to center the window
6394 on the entire screen and not on its parent window. If it is a
6395 top-level window and has no parent then it will always be centered
6396 relative to the screen.
6397 """
6398 return _core_.Window_Center(*args, **kwargs)
6399
6400 Centre = Center
6401 def CenterOnScreen(*args, **kwargs):
6402 """
6403 CenterOnScreen(self, int dir=BOTH)
6404
6405 Center on screen (only works for top level windows)
6406 """
6407 return _core_.Window_CenterOnScreen(*args, **kwargs)
6408
6409 CentreOnScreen = CenterOnScreen
6410 def CenterOnParent(*args, **kwargs):
6411 """
6412 CenterOnParent(self, int dir=BOTH)
6413
6414 Center with respect to the the parent window
6415 """
6416 return _core_.Window_CenterOnParent(*args, **kwargs)
6417
6418 CentreOnParent = CenterOnParent
6419 def Fit(*args, **kwargs):
6420 """
6421 Fit(self)
6422
6423 Sizes the window so that it fits around its subwindows. This function
6424 won't do anything if there are no subwindows and will only really work
6425 correctly if sizers are used for the subwindows layout. Also, if the
6426 window has exactly one subwindow it is better (faster and the result
6427 is more precise as Fit adds some margin to account for fuzziness of
6428 its calculations) to call window.SetClientSize(child.GetSize())
6429 instead of calling Fit.
6430 """
6431 return _core_.Window_Fit(*args, **kwargs)
6432
6433 def FitInside(*args, **kwargs):
6434 """
6435 FitInside(self)
6436
6437 Similar to Fit, but sizes the interior (virtual) size of a
6438 window. Mainly useful with scrolled windows to reset scrollbars after
6439 sizing changes that do not trigger a size event, and/or scrolled
6440 windows without an interior sizer. This function similarly won't do
6441 anything if there are no subwindows.
6442 """
6443 return _core_.Window_FitInside(*args, **kwargs)
6444
6445 def SetSizeHints(*args, **kwargs):
6446 """
6447 SetSizeHints(self, int minW, int minH, int maxW=-1, int maxH=-1, int incW=-1,
6448 int incH=-1)
6449
6450 Allows specification of minimum and maximum window sizes, and window
6451 size increments. If a pair of values is not set (or set to -1), the
6452 default values will be used. If this function is called, the user
6453 will not be able to size the window outside the given bounds (if it is
6454 a top-level window.) Sizers will also inspect the minimum window size
6455 and will use that value if set when calculating layout.
6456
6457 The resizing increments are only significant under Motif or Xt.
6458 """
6459 return _core_.Window_SetSizeHints(*args, **kwargs)
6460
6461 def SetSizeHintsSz(*args, **kwargs):
6462 """
6463 SetSizeHintsSz(self, Size minSize, Size maxSize=DefaultSize, Size incSize=DefaultSize)
6464
6465 Allows specification of minimum and maximum window sizes, and window
6466 size increments. If a pair of values is not set (or set to -1), the
6467 default values will be used. If this function is called, the user
6468 will not be able to size the window outside the given bounds (if it is
6469 a top-level window.) Sizers will also inspect the minimum window size
6470 and will use that value if set when calculating layout.
6471
6472 The resizing increments are only significant under Motif or Xt.
6473 """
6474 return _core_.Window_SetSizeHintsSz(*args, **kwargs)
6475
6476 def SetVirtualSizeHints(*args, **kwargs):
6477 """
6478 SetVirtualSizeHints(self, int minW, int minH, int maxW=-1, int maxH=-1)
6479
6480 Allows specification of minimum and maximum virtual window sizes. If a
6481 pair of values is not set (or set to -1), the default values will be
6482 used. If this function is called, the user will not be able to size
6483 the virtual area of the window outside the given bounds.
6484 """
6485 return _core_.Window_SetVirtualSizeHints(*args, **kwargs)
6486
6487 def SetVirtualSizeHintsSz(*args, **kwargs):
6488 """
6489 SetVirtualSizeHintsSz(self, Size minSize, Size maxSize=DefaultSize)
6490
6491 Allows specification of minimum and maximum virtual window sizes. If a
6492 pair of values is not set (or set to -1), the default values will be
6493 used. If this function is called, the user will not be able to size
6494 the virtual area of the window outside the given bounds.
6495 """
6496 return _core_.Window_SetVirtualSizeHintsSz(*args, **kwargs)
6497
6498 def GetMaxSize(*args, **kwargs):
6499 """GetMaxSize(self) -> Size"""
6500 return _core_.Window_GetMaxSize(*args, **kwargs)
6501
6502 def GetMinSize(*args, **kwargs):
6503 """GetMinSize(self) -> Size"""
6504 return _core_.Window_GetMinSize(*args, **kwargs)
6505
6506 def SetMinSize(*args, **kwargs):
6507 """
6508 SetMinSize(self, Size minSize)
6509
6510 A more convenient method than `SetSizeHints` for setting just the
6511 min size.
6512 """
6513 return _core_.Window_SetMinSize(*args, **kwargs)
6514
6515 def SetMaxSize(*args, **kwargs):
6516 """
6517 SetMaxSize(self, Size maxSize)
6518
6519 A more convenient method than `SetSizeHints` for setting just the
6520 max size.
6521 """
6522 return _core_.Window_SetMaxSize(*args, **kwargs)
6523
6524 def GetMinWidth(*args, **kwargs):
6525 """GetMinWidth(self) -> int"""
6526 return _core_.Window_GetMinWidth(*args, **kwargs)
6527
6528 def GetMinHeight(*args, **kwargs):
6529 """GetMinHeight(self) -> int"""
6530 return _core_.Window_GetMinHeight(*args, **kwargs)
6531
6532 def GetMaxWidth(*args, **kwargs):
6533 """GetMaxWidth(self) -> int"""
6534 return _core_.Window_GetMaxWidth(*args, **kwargs)
6535
6536 def GetMaxHeight(*args, **kwargs):
6537 """GetMaxHeight(self) -> int"""
6538 return _core_.Window_GetMaxHeight(*args, **kwargs)
6539
6540 def SetVirtualSize(*args, **kwargs):
6541 """
6542 SetVirtualSize(self, Size size)
6543
6544 Set the the virtual size of a window in pixels. For most windows this
6545 is just the client area of the window, but for some like scrolled
6546 windows it is more or less independent of the screen window size.
6547 """
6548 return _core_.Window_SetVirtualSize(*args, **kwargs)
6549
6550 def SetVirtualSizeWH(*args, **kwargs):
6551 """
6552 SetVirtualSizeWH(self, int w, int h)
6553
6554 Set the the virtual size of a window in pixels. For most windows this
6555 is just the client area of the window, but for some like scrolled
6556 windows it is more or less independent of the screen window size.
6557 """
6558 return _core_.Window_SetVirtualSizeWH(*args, **kwargs)
6559
6560 def GetVirtualSize(*args, **kwargs):
6561 """
6562 GetVirtualSize(self) -> Size
6563
6564 Get the the virtual size of the window in pixels. For most windows
6565 this is just the client area of the window, but for some like scrolled
6566 windows it is more or less independent of the screen window size.
6567 """
6568 return _core_.Window_GetVirtualSize(*args, **kwargs)
6569
6570 def GetVirtualSizeTuple(*args, **kwargs):
6571 """
6572 GetVirtualSizeTuple() -> (width, height)
6573
6574 Get the the virtual size of the window in pixels. For most windows
6575 this is just the client area of the window, but for some like scrolled
6576 windows it is more or less independent of the screen window size.
6577 """
6578 return _core_.Window_GetVirtualSizeTuple(*args, **kwargs)
6579
6580 def GetBestVirtualSize(*args, **kwargs):
6581 """
6582 GetBestVirtualSize(self) -> Size
6583
6584 Return the largest of ClientSize and BestSize (as determined by a
6585 sizer, interior children, or other means)
6586 """
6587 return _core_.Window_GetBestVirtualSize(*args, **kwargs)
6588
6589 def Show(*args, **kwargs):
6590 """
6591 Show(self, bool show=True) -> bool
6592
6593 Shows or hides the window. You may need to call Raise for a top level
6594 window if you want to bring it to top, although this is not needed if
6595 Show is called immediately after the frame creation. Returns True if
6596 the window has been shown or hidden or False if nothing was done
6597 because it already was in the requested state.
6598 """
6599 return _core_.Window_Show(*args, **kwargs)
6600
6601 def Hide(*args, **kwargs):
6602 """
6603 Hide(self) -> bool
6604
6605 Equivalent to calling Show(False).
6606 """
6607 return _core_.Window_Hide(*args, **kwargs)
6608
6609 def Enable(*args, **kwargs):
6610 """
6611 Enable(self, bool enable=True) -> bool
6612
6613 Enable or disable the window for user input. Note that when a parent
6614 window is disabled, all of its children are disabled as well and they
6615 are reenabled again when the parent is. Returns true if the window
6616 has been enabled or disabled, false if nothing was done, i.e. if the
6617 window had already been in the specified state.
6618 """
6619 return _core_.Window_Enable(*args, **kwargs)
6620
6621 def Disable(*args, **kwargs):
6622 """
6623 Disable(self) -> bool
6624
6625 Disables the window, same as Enable(false).
6626 """
6627 return _core_.Window_Disable(*args, **kwargs)
6628
6629 def IsShown(*args, **kwargs):
6630 """
6631 IsShown(self) -> bool
6632
6633 Returns true if the window is shown, false if it has been hidden.
6634 """
6635 return _core_.Window_IsShown(*args, **kwargs)
6636
6637 def IsEnabled(*args, **kwargs):
6638 """
6639 IsEnabled(self) -> bool
6640
6641 Returns true if the window is enabled for input, false otherwise.
6642 """
6643 return _core_.Window_IsEnabled(*args, **kwargs)
6644
6645 def SetWindowStyleFlag(*args, **kwargs):
6646 """
6647 SetWindowStyleFlag(self, long style)
6648
6649 Sets the style of the window. Please note that some styles cannot be
6650 changed after the window creation and that Refresh() might need to be
6651 called after changing the others for the change to take place
6652 immediately.
6653 """
6654 return _core_.Window_SetWindowStyleFlag(*args, **kwargs)
6655
6656 def GetWindowStyleFlag(*args, **kwargs):
6657 """
6658 GetWindowStyleFlag(self) -> long
6659
6660 Gets the window style that was passed to the constructor or Create
6661 method.
6662 """
6663 return _core_.Window_GetWindowStyleFlag(*args, **kwargs)
6664
6665 SetWindowStyle = SetWindowStyleFlag; GetWindowStyle = GetWindowStyleFlag
6666 def HasFlag(*args, **kwargs):
6667 """
6668 HasFlag(self, int flag) -> bool
6669
6670 Test if the given style is set for this window.
6671 """
6672 return _core_.Window_HasFlag(*args, **kwargs)
6673
6674 def IsRetained(*args, **kwargs):
6675 """
6676 IsRetained(self) -> bool
6677
6678 Returns true if the window is retained, false otherwise. Retained
6679 windows are only available on X platforms.
6680 """
6681 return _core_.Window_IsRetained(*args, **kwargs)
6682
6683 def SetExtraStyle(*args, **kwargs):
6684 """
6685 SetExtraStyle(self, long exStyle)
6686
6687 Sets the extra style bits for the window. Extra styles are the less
6688 often used style bits which can't be set with the constructor or with
6689 SetWindowStyleFlag()
6690 """
6691 return _core_.Window_SetExtraStyle(*args, **kwargs)
6692
6693 def GetExtraStyle(*args, **kwargs):
6694 """
6695 GetExtraStyle(self) -> long
6696
6697 Returns the extra style bits for the window.
6698 """
6699 return _core_.Window_GetExtraStyle(*args, **kwargs)
6700
6701 def MakeModal(*args, **kwargs):
6702 """
6703 MakeModal(self, bool modal=True)
6704
6705 Disables all other windows in the application so that the user can
6706 only interact with this window. Passing False will reverse this
6707 effect.
6708 """
6709 return _core_.Window_MakeModal(*args, **kwargs)
6710
6711 def SetThemeEnabled(*args, **kwargs):
6712 """
6713 SetThemeEnabled(self, bool enableTheme)
6714
6715 This function tells a window if it should use the system's "theme"
6716 code to draw the windows' background instead if its own background
6717 drawing code. This will only have an effect on platforms that support
6718 the notion of themes in user defined windows. One such platform is
6719 GTK+ where windows can have (very colourful) backgrounds defined by a
6720 user's selected theme.
6721
6722 Dialogs, notebook pages and the status bar have this flag set to true
6723 by default so that the default look and feel is simulated best.
6724 """
6725 return _core_.Window_SetThemeEnabled(*args, **kwargs)
6726
6727 def GetThemeEnabled(*args, **kwargs):
6728 """
6729 GetThemeEnabled(self) -> bool
6730
6731 Return the themeEnabled flag.
6732 """
6733 return _core_.Window_GetThemeEnabled(*args, **kwargs)
6734
6735 def SetFocus(*args, **kwargs):
6736 """
6737 SetFocus(self)
6738
6739 Set's the focus to this window, allowing it to receive keyboard input.
6740 """
6741 return _core_.Window_SetFocus(*args, **kwargs)
6742
6743 def SetFocusFromKbd(*args, **kwargs):
6744 """
6745 SetFocusFromKbd(self)
6746
6747 Set focus to this window as the result of a keyboard action. Normally
6748 only called internally.
6749 """
6750 return _core_.Window_SetFocusFromKbd(*args, **kwargs)
6751
6752 def FindFocus(*args, **kwargs):
6753 """
6754 FindFocus() -> Window
6755
6756 Returns the window or control that currently has the keyboard focus,
6757 or None.
6758 """
6759 return _core_.Window_FindFocus(*args, **kwargs)
6760
6761 FindFocus = staticmethod(FindFocus)
6762 def AcceptsFocus(*args, **kwargs):
6763 """
6764 AcceptsFocus(self) -> bool
6765
6766 Can this window have focus?
6767 """
6768 return _core_.Window_AcceptsFocus(*args, **kwargs)
6769
6770 def AcceptsFocusFromKeyboard(*args, **kwargs):
6771 """
6772 AcceptsFocusFromKeyboard(self) -> bool
6773
6774 Can this window be given focus by keyboard navigation? if not, the
6775 only way to give it focus (provided it accepts it at all) is to click
6776 it.
6777 """
6778 return _core_.Window_AcceptsFocusFromKeyboard(*args, **kwargs)
6779
6780 def GetDefaultItem(*args, **kwargs):
6781 """
6782 GetDefaultItem(self) -> Window
6783
6784 Get the default child of this parent, i.e. the one which is activated
6785 by pressing <Enter> such as the OK button on a wx.Dialog.
6786 """
6787 return _core_.Window_GetDefaultItem(*args, **kwargs)
6788
6789 def SetDefaultItem(*args, **kwargs):
6790 """
6791 SetDefaultItem(self, Window child) -> Window
6792
6793 Set this child as default, return the old default.
6794 """
6795 return _core_.Window_SetDefaultItem(*args, **kwargs)
6796
6797 def SetTmpDefaultItem(*args, **kwargs):
6798 """
6799 SetTmpDefaultItem(self, Window win)
6800
6801 Set this child as temporary default
6802 """
6803 return _core_.Window_SetTmpDefaultItem(*args, **kwargs)
6804
6805 def Navigate(*args, **kwargs):
6806 """
6807 Navigate(self, int flags=NavigationKeyEvent.IsForward) -> bool
6808
6809 Does keyboard navigation from this window to another, by sending a
6810 `wx.NavigationKeyEvent`.
6811 """
6812 return _core_.Window_Navigate(*args, **kwargs)
6813
6814 def MoveAfterInTabOrder(*args, **kwargs):
6815 """
6816 MoveAfterInTabOrder(self, Window win)
6817
6818 Moves this window in the tab navigation order after the specified
6819 sibling window. This means that when the user presses the TAB key on
6820 that other window, the focus switches to this window.
6821
6822 The default tab order is the same as creation order. This function
6823 and `MoveBeforeInTabOrder` allow to change it after creating all the
6824 windows.
6825
6826 """
6827 return _core_.Window_MoveAfterInTabOrder(*args, **kwargs)
6828
6829 def MoveBeforeInTabOrder(*args, **kwargs):
6830 """
6831 MoveBeforeInTabOrder(self, Window win)
6832
6833 Same as `MoveAfterInTabOrder` except that it inserts this window just
6834 before win instead of putting it right after it.
6835 """
6836 return _core_.Window_MoveBeforeInTabOrder(*args, **kwargs)
6837
6838 def GetChildren(*args, **kwargs):
6839 """
6840 GetChildren(self) -> PyObject
6841
6842 Returns a list of the window's children. NOTE: Currently this is a
6843 copy of the child window list maintained by the window, so the return
6844 value of this function is only valid as long as the window's children
6845 do not change.
6846 """
6847 return _core_.Window_GetChildren(*args, **kwargs)
6848
6849 def GetParent(*args, **kwargs):
6850 """
6851 GetParent(self) -> Window
6852
6853 Returns the parent window of this window, or None if there isn't one.
6854 """
6855 return _core_.Window_GetParent(*args, **kwargs)
6856
6857 def GetGrandParent(*args, **kwargs):
6858 """
6859 GetGrandParent(self) -> Window
6860
6861 Returns the parent of the parent of this window, or None if there
6862 isn't one.
6863 """
6864 return _core_.Window_GetGrandParent(*args, **kwargs)
6865
6866 def IsTopLevel(*args, **kwargs):
6867 """
6868 IsTopLevel(self) -> bool
6869
6870 Returns true if the given window is a top-level one. Currently all
6871 frames and dialogs are always considered to be top-level windows (even
6872 if they have a parent window).
6873 """
6874 return _core_.Window_IsTopLevel(*args, **kwargs)
6875
6876 def Reparent(*args, **kwargs):
6877 """
6878 Reparent(self, Window newParent) -> bool
6879
6880 Reparents the window, i.e the window will be removed from its current
6881 parent window (e.g. a non-standard toolbar in a wxFrame) and then
6882 re-inserted into another. Available on Windows and GTK. Returns True
6883 if the parent was changed, False otherwise (error or newParent ==
6884 oldParent)
6885 """
6886 return _core_.Window_Reparent(*args, **kwargs)
6887
6888 def AddChild(*args, **kwargs):
6889 """
6890 AddChild(self, Window child)
6891
6892 Adds a child window. This is called automatically by window creation
6893 functions so should not be required by the application programmer.
6894 """
6895 return _core_.Window_AddChild(*args, **kwargs)
6896
6897 def RemoveChild(*args, **kwargs):
6898 """
6899 RemoveChild(self, Window child)
6900
6901 Removes a child window. This is called automatically by window
6902 deletion functions so should not be required by the application
6903 programmer.
6904 """
6905 return _core_.Window_RemoveChild(*args, **kwargs)
6906
6907 def FindWindowById(*args, **kwargs):
6908 """
6909 FindWindowById(self, long winid) -> Window
6910
6911 Find a chld of this window by window ID
6912 """
6913 return _core_.Window_FindWindowById(*args, **kwargs)
6914
6915 def FindWindowByName(*args, **kwargs):
6916 """
6917 FindWindowByName(self, String name) -> Window
6918
6919 Find a child of this window by name
6920 """
6921 return _core_.Window_FindWindowByName(*args, **kwargs)
6922
6923 def GetEventHandler(*args, **kwargs):
6924 """
6925 GetEventHandler(self) -> EvtHandler
6926
6927 Returns the event handler for this window. By default, the window is
6928 its own event handler.
6929 """
6930 return _core_.Window_GetEventHandler(*args, **kwargs)
6931
6932 def SetEventHandler(*args, **kwargs):
6933 """
6934 SetEventHandler(self, EvtHandler handler)
6935
6936 Sets the event handler for this window. An event handler is an object
6937 that is capable of processing the events sent to a window. By default,
6938 the window is its own event handler, but an application may wish to
6939 substitute another, for example to allow central implementation of
6940 event-handling for a variety of different window classes.
6941
6942 It is usually better to use `wx.Window.PushEventHandler` since this sets
6943 up a chain of event handlers, where an event not handled by one event
6944 handler is handed to the next one in the chain.
6945 """
6946 return _core_.Window_SetEventHandler(*args, **kwargs)
6947
6948 def PushEventHandler(*args, **kwargs):
6949 """
6950 PushEventHandler(self, EvtHandler handler)
6951
6952 Pushes this event handler onto the event handler stack for the window.
6953 An event handler is an object that is capable of processing the events
6954 sent to a window. By default, the window is its own event handler, but
6955 an application may wish to substitute another, for example to allow
6956 central implementation of event-handling for a variety of different
6957 window classes.
6958
6959 wx.Window.PushEventHandler allows an application to set up a chain of
6960 event handlers, where an event not handled by one event handler is
6961 handed to the next one in the chain. Use `wx.Window.PopEventHandler` to
6962 remove the event handler.
6963 """
6964 return _core_.Window_PushEventHandler(*args, **kwargs)
6965
6966 def PopEventHandler(*args, **kwargs):
6967 """
6968 PopEventHandler(self, bool deleteHandler=False) -> EvtHandler
6969
6970 Removes and returns the top-most event handler on the event handler
6971 stack. If deleteHandler is True then the wx.EvtHandler object will be
6972 destroyed after it is popped.
6973 """
6974 return _core_.Window_PopEventHandler(*args, **kwargs)
6975
6976 def RemoveEventHandler(*args, **kwargs):
6977 """
6978 RemoveEventHandler(self, EvtHandler handler) -> bool
6979
6980 Find the given handler in the event handler chain and remove (but not
6981 delete) it from the event handler chain, return True if it was found
6982 and False otherwise (this also results in an assert failure so this
6983 function should only be called when the handler is supposed to be
6984 there.)
6985 """
6986 return _core_.Window_RemoveEventHandler(*args, **kwargs)
6987
6988 def SetValidator(*args, **kwargs):
6989 """
6990 SetValidator(self, Validator validator)
6991
6992 Deletes the current validator (if any) and sets the window validator,
6993 having called wx.Validator.Clone to create a new validator of this
6994 type.
6995 """
6996 return _core_.Window_SetValidator(*args, **kwargs)
6997
6998 def GetValidator(*args, **kwargs):
6999 """
7000 GetValidator(self) -> Validator
7001
7002 Returns a pointer to the current validator for the window, or None if
7003 there is none.
7004 """
7005 return _core_.Window_GetValidator(*args, **kwargs)
7006
7007 def Validate(*args, **kwargs):
7008 """
7009 Validate(self) -> bool
7010
7011 Validates the current values of the child controls using their
7012 validators. If the window has wx.WS_EX_VALIDATE_RECURSIVELY extra
7013 style flag set, the method will also call Validate() of all child
7014 windows. Returns false if any of the validations failed.
7015 """
7016 return _core_.Window_Validate(*args, **kwargs)
7017
7018 def TransferDataToWindow(*args, **kwargs):
7019 """
7020 TransferDataToWindow(self) -> bool
7021
7022 Transfers values to child controls from data areas specified by their
7023 validators. If the window has wx.WS_EX_VALIDATE_RECURSIVELY extra
7024 style flag set, the method will also call TransferDataToWindow() of
7025 all child windows.
7026 """
7027 return _core_.Window_TransferDataToWindow(*args, **kwargs)
7028
7029 def TransferDataFromWindow(*args, **kwargs):
7030 """
7031 TransferDataFromWindow(self) -> bool
7032
7033 Transfers values from child controls to data areas specified by their
7034 validators. Returns false if a transfer failed. If the window has
7035 wx.WS_EX_VALIDATE_RECURSIVELY extra style flag set, the method will
7036 also call TransferDataFromWindow() of all child windows.
7037 """
7038 return _core_.Window_TransferDataFromWindow(*args, **kwargs)
7039
7040 def InitDialog(*args, **kwargs):
7041 """
7042 InitDialog(self)
7043
7044 Sends an EVT_INIT_DIALOG event, whose handler usually transfers data
7045 to the dialog via validators.
7046 """
7047 return _core_.Window_InitDialog(*args, **kwargs)
7048
7049 def SetAcceleratorTable(*args, **kwargs):
7050 """
7051 SetAcceleratorTable(self, AcceleratorTable accel)
7052
7053 Sets the accelerator table for this window.
7054 """
7055 return _core_.Window_SetAcceleratorTable(*args, **kwargs)
7056
7057 def GetAcceleratorTable(*args, **kwargs):
7058 """
7059 GetAcceleratorTable(self) -> AcceleratorTable
7060
7061 Gets the accelerator table for this window.
7062 """
7063 return _core_.Window_GetAcceleratorTable(*args, **kwargs)
7064
7065 def RegisterHotKey(*args, **kwargs):
7066 """
7067 RegisterHotKey(self, int hotkeyId, int modifiers, int keycode) -> bool
7068
7069 Registers a system wide hotkey. Every time the user presses the hotkey
7070 registered here, this window will receive a hotkey event. It will
7071 receive the event even if the application is in the background and
7072 does not have the input focus because the user is working with some
7073 other application. To bind an event handler function to this hotkey
7074 use EVT_HOTKEY with an id equal to hotkeyId. Returns True if the
7075 hotkey was registered successfully.
7076 """
7077 return _core_.Window_RegisterHotKey(*args, **kwargs)
7078
7079 def UnregisterHotKey(*args, **kwargs):
7080 """
7081 UnregisterHotKey(self, int hotkeyId) -> bool
7082
7083 Unregisters a system wide hotkey.
7084 """
7085 return _core_.Window_UnregisterHotKey(*args, **kwargs)
7086
7087 def ConvertDialogPointToPixels(*args, **kwargs):
7088 """
7089 ConvertDialogPointToPixels(self, Point pt) -> Point
7090
7091 Converts a point or size from dialog units to pixels. Dialog units
7092 are used for maintaining a dialog's proportions even if the font
7093 changes. For the x dimension, the dialog units are multiplied by the
7094 average character width and then divided by 4. For the y dimension,
7095 the dialog units are multiplied by the average character height and
7096 then divided by 8.
7097 """
7098 return _core_.Window_ConvertDialogPointToPixels(*args, **kwargs)
7099
7100 def ConvertDialogSizeToPixels(*args, **kwargs):
7101 """
7102 ConvertDialogSizeToPixels(self, Size sz) -> Size
7103
7104 Converts a point or size from dialog units to pixels. Dialog units
7105 are used for maintaining a dialog's proportions even if the font
7106 changes. For the x dimension, the dialog units are multiplied by the
7107 average character width and then divided by 4. For the y dimension,
7108 the dialog units are multiplied by the average character height and
7109 then divided by 8.
7110 """
7111 return _core_.Window_ConvertDialogSizeToPixels(*args, **kwargs)
7112
7113 def DLG_PNT(*args, **kwargs):
7114 """
7115 DLG_PNT(self, Point pt) -> Point
7116
7117 Converts a point or size from dialog units to pixels. Dialog units
7118 are used for maintaining a dialog's proportions even if the font
7119 changes. For the x dimension, the dialog units are multiplied by the
7120 average character width and then divided by 4. For the y dimension,
7121 the dialog units are multiplied by the average character height and
7122 then divided by 8.
7123 """
7124 return _core_.Window_DLG_PNT(*args, **kwargs)
7125
7126 def DLG_SZE(*args, **kwargs):
7127 """
7128 DLG_SZE(self, Size sz) -> Size
7129
7130 Converts a point or size from dialog units to pixels. Dialog units
7131 are used for maintaining a dialog's proportions even if the font
7132 changes. For the x dimension, the dialog units are multiplied by the
7133 average character width and then divided by 4. For the y dimension,
7134 the dialog units are multiplied by the average character height and
7135 then divided by 8.
7136 """
7137 return _core_.Window_DLG_SZE(*args, **kwargs)
7138
7139 def ConvertPixelPointToDialog(*args, **kwargs):
7140 """ConvertPixelPointToDialog(self, Point pt) -> Point"""
7141 return _core_.Window_ConvertPixelPointToDialog(*args, **kwargs)
7142
7143 def ConvertPixelSizeToDialog(*args, **kwargs):
7144 """ConvertPixelSizeToDialog(self, Size sz) -> Size"""
7145 return _core_.Window_ConvertPixelSizeToDialog(*args, **kwargs)
7146
7147 def WarpPointer(*args, **kwargs):
7148 """
7149 WarpPointer(self, int x, int y)
7150
7151 Moves the pointer to the given position on the window.
7152
7153 NOTE: This function is not supported under Mac because Apple Human
7154 Interface Guidelines forbid moving the mouse cursor programmatically.
7155 """
7156 return _core_.Window_WarpPointer(*args, **kwargs)
7157
7158 def CaptureMouse(*args, **kwargs):
7159 """
7160 CaptureMouse(self)
7161
7162 Directs all mouse input to this window. Call wx.Window.ReleaseMouse to
7163 release the capture.
7164
7165 Note that wxWindows maintains the stack of windows having captured the
7166 mouse and when the mouse is released the capture returns to the window
7167 which had had captured it previously and it is only really released if
7168 there were no previous window. In particular, this means that you must
7169 release the mouse as many times as you capture it.
7170 """
7171 return _core_.Window_CaptureMouse(*args, **kwargs)
7172
7173 def ReleaseMouse(*args, **kwargs):
7174 """
7175 ReleaseMouse(self)
7176
7177 Releases mouse input captured with wx.Window.CaptureMouse.
7178 """
7179 return _core_.Window_ReleaseMouse(*args, **kwargs)
7180
7181 def GetCapture(*args, **kwargs):
7182 """
7183 GetCapture() -> Window
7184
7185 Returns the window which currently captures the mouse or None
7186 """
7187 return _core_.Window_GetCapture(*args, **kwargs)
7188
7189 GetCapture = staticmethod(GetCapture)
7190 def HasCapture(*args, **kwargs):
7191 """
7192 HasCapture(self) -> bool
7193
7194 Returns true if this window has the current mouse capture.
7195 """
7196 return _core_.Window_HasCapture(*args, **kwargs)
7197
7198 def Refresh(*args, **kwargs):
7199 """
7200 Refresh(self, bool eraseBackground=True, Rect rect=None)
7201
7202 Mark the specified rectangle (or the whole window) as "dirty" so it
7203 will be repainted. Causes an EVT_PAINT event to be generated and sent
7204 to the window.
7205 """
7206 return _core_.Window_Refresh(*args, **kwargs)
7207
7208 def RefreshRect(*args, **kwargs):
7209 """
7210 RefreshRect(self, Rect rect, bool eraseBackground=True)
7211
7212 Redraws the contents of the given rectangle: the area inside it will
7213 be repainted. This is the same as Refresh but has a nicer syntax.
7214 """
7215 return _core_.Window_RefreshRect(*args, **kwargs)
7216
7217 def Update(*args, **kwargs):
7218 """
7219 Update(self)
7220
7221 Calling this method immediately repaints the invalidated area of the
7222 window instead of waiting for the EVT_PAINT event to happen, (normally
7223 this would usually only happen when the flow of control returns to the
7224 event loop.) Notice that this function doesn't refresh the window and
7225 does nothing if the window has been already repainted. Use Refresh
7226 first if you want to immediately redraw the window (or some portion of
7227 it) unconditionally.
7228 """
7229 return _core_.Window_Update(*args, **kwargs)
7230
7231 def ClearBackground(*args, **kwargs):
7232 """
7233 ClearBackground(self)
7234
7235 Clears the window by filling it with the current background
7236 colour. Does not cause an erase background event to be generated.
7237 """
7238 return _core_.Window_ClearBackground(*args, **kwargs)
7239
7240 def Freeze(*args, **kwargs):
7241 """
7242 Freeze(self)
7243
7244 Freezes the window or, in other words, prevents any updates from
7245 taking place on screen, the window is not redrawn at all. Thaw must be
7246 called to reenable window redrawing. Calls to Freeze/Thaw may be
7247 nested, with the actual Thaw being delayed until all the nesting has
7248 been undone.
7249
7250 This method is useful for visual appearance optimization (for example,
7251 it is a good idea to use it before inserting large amount of text into
7252 a wxTextCtrl under wxGTK) but is not implemented on all platforms nor
7253 for all controls so it is mostly just a hint to wxWindows and not a
7254 mandatory directive.
7255 """
7256 return _core_.Window_Freeze(*args, **kwargs)
7257
7258 def Thaw(*args, **kwargs):
7259 """
7260 Thaw(self)
7261
7262 Reenables window updating after a previous call to Freeze. Calls to
7263 Freeze/Thaw may be nested, so Thaw must be called the same number of
7264 times that Freeze was before the window will be updated.
7265 """
7266 return _core_.Window_Thaw(*args, **kwargs)
7267
7268 def PrepareDC(*args, **kwargs):
7269 """
7270 PrepareDC(self, DC dc)
7271
7272 Call this function to prepare the device context for drawing a
7273 scrolled image. It sets the device origin according to the current
7274 scroll position.
7275 """
7276 return _core_.Window_PrepareDC(*args, **kwargs)
7277
7278 def GetUpdateRegion(*args, **kwargs):
7279 """
7280 GetUpdateRegion(self) -> Region
7281
7282 Returns the region specifying which parts of the window have been
7283 damaged. Should only be called within an EVT_PAINT handler.
7284 """
7285 return _core_.Window_GetUpdateRegion(*args, **kwargs)
7286
7287 def GetUpdateClientRect(*args, **kwargs):
7288 """
7289 GetUpdateClientRect(self) -> Rect
7290
7291 Get the update rectangle region bounding box in client coords.
7292 """
7293 return _core_.Window_GetUpdateClientRect(*args, **kwargs)
7294
7295 def IsExposed(*args, **kwargs):
7296 """
7297 IsExposed(self, int x, int y, int w=1, int h=1) -> bool
7298
7299 Returns true if the given point or rectangle area has been exposed
7300 since the last repaint. Call this in an paint event handler to
7301 optimize redrawing by only redrawing those areas, which have been
7302 exposed.
7303 """
7304 return _core_.Window_IsExposed(*args, **kwargs)
7305
7306 def IsExposedPoint(*args, **kwargs):
7307 """
7308 IsExposedPoint(self, Point pt) -> bool
7309
7310 Returns true if the given point or rectangle area has been exposed
7311 since the last repaint. Call this in an paint event handler to
7312 optimize redrawing by only redrawing those areas, which have been
7313 exposed.
7314 """
7315 return _core_.Window_IsExposedPoint(*args, **kwargs)
7316
7317 def IsExposedRect(*args, **kwargs):
7318 """
7319 IsExposedRect(self, Rect rect) -> bool
7320
7321 Returns true if the given point or rectangle area has been exposed
7322 since the last repaint. Call this in an paint event handler to
7323 optimize redrawing by only redrawing those areas, which have been
7324 exposed.
7325 """
7326 return _core_.Window_IsExposedRect(*args, **kwargs)
7327
7328 def GetDefaultAttributes(*args, **kwargs):
7329 """
7330 GetDefaultAttributes(self) -> VisualAttributes
7331
7332 Get the default attributes for an instance of this class. This is
7333 useful if you want to use the same font or colour in your own control
7334 as in a standard control -- which is a much better idea than hard
7335 coding specific colours or fonts which might look completely out of
7336 place on the user's system, especially if it uses themes.
7337 """
7338 return _core_.Window_GetDefaultAttributes(*args, **kwargs)
7339
7340 def GetClassDefaultAttributes(*args, **kwargs):
7341 """
7342 GetClassDefaultAttributes(int variant=WINDOW_VARIANT_NORMAL) -> VisualAttributes
7343
7344 Get the default attributes for this class. This is useful if you want
7345 to use the same font or colour in your own control as in a standard
7346 control -- which is a much better idea than hard coding specific
7347 colours or fonts which might look completely out of place on the
7348 user's system, especially if it uses themes.
7349
7350 The variant parameter is only relevant under Mac currently and is
7351 ignore under other platforms. Under Mac, it will change the size of
7352 the returned font. See `wx.Window.SetWindowVariant` for more about
7353 this.
7354 """
7355 return _core_.Window_GetClassDefaultAttributes(*args, **kwargs)
7356
7357 GetClassDefaultAttributes = staticmethod(GetClassDefaultAttributes)
7358 def SetBackgroundColour(*args, **kwargs):
7359 """
7360 SetBackgroundColour(self, Colour colour) -> bool
7361
7362 Sets the background colour of the window. Returns True if the colour
7363 was changed. The background colour is usually painted by the default
7364 EVT_ERASE_BACKGROUND event handler function under Windows and
7365 automatically under GTK. Using `wx.NullColour` will reset the window
7366 to the default background colour.
7367
7368 Note that setting the background colour may not cause an immediate
7369 refresh, so you may wish to call `ClearBackground` or `Refresh` after
7370 calling this function.
7371
7372 Using this function will disable attempts to use themes for this
7373 window, if the system supports them. Use with care since usually the
7374 themes represent the appearance chosen by the user to be used for all
7375 applications on the system.
7376 """
7377 return _core_.Window_SetBackgroundColour(*args, **kwargs)
7378
7379 def SetOwnBackgroundColour(*args, **kwargs):
7380 """SetOwnBackgroundColour(self, Colour colour)"""
7381 return _core_.Window_SetOwnBackgroundColour(*args, **kwargs)
7382
7383 def SetForegroundColour(*args, **kwargs):
7384 """
7385 SetForegroundColour(self, Colour colour) -> bool
7386
7387 Sets the foreground colour of the window. Returns True is the colour
7388 was changed. The interpretation of foreground colour is dependent on
7389 the window class; it may be the text colour or other colour, or it may
7390 not be used at all.
7391 """
7392 return _core_.Window_SetForegroundColour(*args, **kwargs)
7393
7394 def SetOwnForegroundColour(*args, **kwargs):
7395 """SetOwnForegroundColour(self, Colour colour)"""
7396 return _core_.Window_SetOwnForegroundColour(*args, **kwargs)
7397
7398 def GetBackgroundColour(*args, **kwargs):
7399 """
7400 GetBackgroundColour(self) -> Colour
7401
7402 Returns the background colour of the window.
7403 """
7404 return _core_.Window_GetBackgroundColour(*args, **kwargs)
7405
7406 def GetForegroundColour(*args, **kwargs):
7407 """
7408 GetForegroundColour(self) -> Colour
7409
7410 Returns the foreground colour of the window. The interpretation of
7411 foreground colour is dependent on the window class; it may be the text
7412 colour or other colour, or it may not be used at all.
7413 """
7414 return _core_.Window_GetForegroundColour(*args, **kwargs)
7415
7416 def InheritsBackgroundColour(*args, **kwargs):
7417 """InheritsBackgroundColour(self) -> bool"""
7418 return _core_.Window_InheritsBackgroundColour(*args, **kwargs)
7419
7420 def UseBgCol(*args, **kwargs):
7421 """UseBgCol(self) -> bool"""
7422 return _core_.Window_UseBgCol(*args, **kwargs)
7423
7424 def SetBackgroundStyle(*args, **kwargs):
7425 """
7426 SetBackgroundStyle(self, int style) -> bool
7427
7428 Returns the background style of the window. The background style
7429 indicates how the background of the window is drawn.
7430
7431 ====================== ========================================
7432 wx.BG_STYLE_SYSTEM The background colour or pattern should
7433 be determined by the system
7434 wx.BG_STYLE_COLOUR The background should be a solid colour
7435 wx.BG_STYLE_CUSTOM The background will be implemented by the
7436 application.
7437 ====================== ========================================
7438
7439 On GTK+, use of wx.BG_STYLE_CUSTOM allows the flicker-free drawing of
7440 a custom background, such as a tiled bitmap. Currently the style has
7441 no effect on other platforms.
7442
7443 :see: `GetBackgroundStyle`, `SetBackgroundColour`
7444 """
7445 return _core_.Window_SetBackgroundStyle(*args, **kwargs)
7446
7447 def GetBackgroundStyle(*args, **kwargs):
7448 """
7449 GetBackgroundStyle(self) -> int
7450
7451 Returns the background style of the window.
7452
7453 :see: `SetBackgroundStyle`
7454 """
7455 return _core_.Window_GetBackgroundStyle(*args, **kwargs)
7456
7457 def HasTransparentBackground(*args, **kwargs):
7458 """
7459 HasTransparentBackground(self) -> bool
7460
7461 Returns True if this window's background is transparent (as, for
7462 example, for `wx.StaticText`) and should show the parent window's
7463 background.
7464
7465 This method is mostly used internally by the library itself and you
7466 normally shouldn't have to call it. You may, however, have to override
7467 it in your custom control classes to ensure that background is painted
7468 correctly.
7469 """
7470 return _core_.Window_HasTransparentBackground(*args, **kwargs)
7471
7472 def SetCursor(*args, **kwargs):
7473 """
7474 SetCursor(self, Cursor cursor) -> bool
7475
7476 Sets the window's cursor. Notice that the window cursor also sets it
7477 for the children of the window implicitly.
7478
7479 The cursor may be wx.NullCursor in which case the window cursor will
7480 be reset back to default.
7481 """
7482 return _core_.Window_SetCursor(*args, **kwargs)
7483
7484 def GetCursor(*args, **kwargs):
7485 """
7486 GetCursor(self) -> Cursor
7487
7488 Return the cursor associated with this window.
7489 """
7490 return _core_.Window_GetCursor(*args, **kwargs)
7491
7492 def SetFont(*args, **kwargs):
7493 """
7494 SetFont(self, Font font) -> bool
7495
7496 Sets the font for this window.
7497 """
7498 return _core_.Window_SetFont(*args, **kwargs)
7499
7500 def SetOwnFont(*args, **kwargs):
7501 """SetOwnFont(self, Font font)"""
7502 return _core_.Window_SetOwnFont(*args, **kwargs)
7503
7504 def GetFont(*args, **kwargs):
7505 """
7506 GetFont(self) -> Font
7507
7508 Returns the default font used for this window.
7509 """
7510 return _core_.Window_GetFont(*args, **kwargs)
7511
7512 def SetCaret(*args, **kwargs):
7513 """
7514 SetCaret(self, Caret caret)
7515
7516 Sets the caret associated with the window.
7517 """
7518 return _core_.Window_SetCaret(*args, **kwargs)
7519
7520 def GetCaret(*args, **kwargs):
7521 """
7522 GetCaret(self) -> Caret
7523
7524 Returns the caret associated with the window.
7525 """
7526 return _core_.Window_GetCaret(*args, **kwargs)
7527
7528 def GetCharHeight(*args, **kwargs):
7529 """
7530 GetCharHeight(self) -> int
7531
7532 Get the (average) character size for the current font.
7533 """
7534 return _core_.Window_GetCharHeight(*args, **kwargs)
7535
7536 def GetCharWidth(*args, **kwargs):
7537 """
7538 GetCharWidth(self) -> int
7539
7540 Get the (average) character size for the current font.
7541 """
7542 return _core_.Window_GetCharWidth(*args, **kwargs)
7543
7544 def GetTextExtent(*args, **kwargs):
7545 """
7546 GetTextExtent(String string) -> (width, height)
7547
7548 Get the width and height of the text using the current font.
7549 """
7550 return _core_.Window_GetTextExtent(*args, **kwargs)
7551
7552 def GetFullTextExtent(*args, **kwargs):
7553 """
7554 GetFullTextExtent(String string, Font font=None) ->
7555 (width, height, descent, externalLeading)
7556
7557 Get the width, height, decent and leading of the text using the
7558 current or specified font.
7559 """
7560 return _core_.Window_GetFullTextExtent(*args, **kwargs)
7561
7562 def ClientToScreenXY(*args, **kwargs):
7563 """
7564 ClientToScreenXY(int x, int y) -> (x,y)
7565
7566 Converts to screen coordinates from coordinates relative to this window.
7567 """
7568 return _core_.Window_ClientToScreenXY(*args, **kwargs)
7569
7570 def ScreenToClientXY(*args, **kwargs):
7571 """
7572 ScreenToClientXY(int x, int y) -> (x,y)
7573
7574 Converts from screen to client window coordinates.
7575 """
7576 return _core_.Window_ScreenToClientXY(*args, **kwargs)
7577
7578 def ClientToScreen(*args, **kwargs):
7579 """
7580 ClientToScreen(self, Point pt) -> Point
7581
7582 Converts to screen coordinates from coordinates relative to this window.
7583 """
7584 return _core_.Window_ClientToScreen(*args, **kwargs)
7585
7586 def ScreenToClient(*args, **kwargs):
7587 """
7588 ScreenToClient(self, Point pt) -> Point
7589
7590 Converts from screen to client window coordinates.
7591 """
7592 return _core_.Window_ScreenToClient(*args, **kwargs)
7593
7594 def HitTestXY(*args, **kwargs):
7595 """
7596 HitTestXY(self, int x, int y) -> int
7597
7598 Test where the given (in client coords) point lies
7599 """
7600 return _core_.Window_HitTestXY(*args, **kwargs)
7601
7602 def HitTest(*args, **kwargs):
7603 """
7604 HitTest(self, Point pt) -> int
7605
7606 Test where the given (in client coords) point lies
7607 """
7608 return _core_.Window_HitTest(*args, **kwargs)
7609
7610 def GetBorder(*args):
7611 """
7612 GetBorder(self, long flags) -> int
7613 GetBorder(self) -> int
7614
7615 Get border for the flags of this window
7616 """
7617 return _core_.Window_GetBorder(*args)
7618
7619 def UpdateWindowUI(*args, **kwargs):
7620 """
7621 UpdateWindowUI(self, long flags=UPDATE_UI_NONE)
7622
7623 This function sends EVT_UPDATE_UI events to the window. The particular
7624 implementation depends on the window; for example a wx.ToolBar will
7625 send an update UI event for each toolbar button, and a wx.Frame will
7626 send an update UI event for each menubar menu item. You can call this
7627 function from your application to ensure that your UI is up-to-date at
7628 a particular point in time (as far as your EVT_UPDATE_UI handlers are
7629 concerned). This may be necessary if you have called
7630 wx.UpdateUIEvent.SetMode or wx.UpdateUIEvent.SetUpdateInterval to
7631 limit the overhead that wxWindows incurs by sending update UI events
7632 in idle time.
7633 """
7634 return _core_.Window_UpdateWindowUI(*args, **kwargs)
7635
7636 def PopupMenuXY(*args, **kwargs):
7637 """
7638 PopupMenuXY(self, Menu menu, int x=-1, int y=-1) -> bool
7639
7640 Pops up the given menu at the specified coordinates, relative to this window,
7641 and returns control when the user has dismissed the menu. If a menu item is
7642 selected, the corresponding menu event is generated and will be processed as
7643 usual. If the default position is given then the current position of the
7644 mouse cursor will be used.
7645 """
7646 return _core_.Window_PopupMenuXY(*args, **kwargs)
7647
7648 def PopupMenu(*args, **kwargs):
7649 """
7650 PopupMenu(self, Menu menu, Point pos=DefaultPosition) -> bool
7651
7652 Pops up the given menu at the specified coordinates, relative to this window,
7653 and returns control when the user has dismissed the menu. If a menu item is
7654 selected, the corresponding menu event is generated and will be processed as
7655 usual. If the default position is given then the current position of the
7656 mouse cursor will be used.
7657 """
7658 return _core_.Window_PopupMenu(*args, **kwargs)
7659
7660 def GetHandle(*args, **kwargs):
7661 """
7662 GetHandle(self) -> long
7663
7664 Returns the platform-specific handle (as a long integer) of the
7665 physical window. Currently on wxMac it returns the handle of the
7666 toplevel parent of the window.
7667 """
7668 return _core_.Window_GetHandle(*args, **kwargs)
7669
7670 def AssociateHandle(*args, **kwargs):
7671 """
7672 AssociateHandle(self, long handle)
7673
7674 Associate the window with a new native handle
7675 """
7676 return _core_.Window_AssociateHandle(*args, **kwargs)
7677
7678 def DissociateHandle(*args, **kwargs):
7679 """
7680 DissociateHandle(self)
7681
7682 Dissociate the current native handle from the window
7683 """
7684 return _core_.Window_DissociateHandle(*args, **kwargs)
7685
7686 def HasScrollbar(*args, **kwargs):
7687 """
7688 HasScrollbar(self, int orient) -> bool
7689
7690 Does the window have the scrollbar for this orientation?
7691 """
7692 return _core_.Window_HasScrollbar(*args, **kwargs)
7693
7694 def SetScrollbar(*args, **kwargs):
7695 """
7696 SetScrollbar(self, int orientation, int position, int thumbSize, int range,
7697 bool refresh=True)
7698
7699 Sets the scrollbar properties of a built-in scrollbar.
7700 """
7701 return _core_.Window_SetScrollbar(*args, **kwargs)
7702
7703 def SetScrollPos(*args, **kwargs):
7704 """
7705 SetScrollPos(self, int orientation, int pos, bool refresh=True)
7706
7707 Sets the position of one of the built-in scrollbars.
7708 """
7709 return _core_.Window_SetScrollPos(*args, **kwargs)
7710
7711 def GetScrollPos(*args, **kwargs):
7712 """
7713 GetScrollPos(self, int orientation) -> int
7714
7715 Returns the built-in scrollbar position.
7716 """
7717 return _core_.Window_GetScrollPos(*args, **kwargs)
7718
7719 def GetScrollThumb(*args, **kwargs):
7720 """
7721 GetScrollThumb(self, int orientation) -> int
7722
7723 Returns the built-in scrollbar thumb size.
7724 """
7725 return _core_.Window_GetScrollThumb(*args, **kwargs)
7726
7727 def GetScrollRange(*args, **kwargs):
7728 """
7729 GetScrollRange(self, int orientation) -> int
7730
7731 Returns the built-in scrollbar range.
7732 """
7733 return _core_.Window_GetScrollRange(*args, **kwargs)
7734
7735 def ScrollWindow(*args, **kwargs):
7736 """
7737 ScrollWindow(self, int dx, int dy, Rect rect=None)
7738
7739 Physically scrolls the pixels in the window and move child windows
7740 accordingly. Use this function to optimise your scrolling
7741 implementations, to minimise the area that must be redrawn. Note that
7742 it is rarely required to call this function from a user program.
7743 """
7744 return _core_.Window_ScrollWindow(*args, **kwargs)
7745
7746 def ScrollLines(*args, **kwargs):
7747 """
7748 ScrollLines(self, int lines) -> bool
7749
7750 If the platform and window class supports it, scrolls the window by
7751 the given number of lines down, if lines is positive, or up if lines
7752 is negative. Returns True if the window was scrolled, False if it was
7753 already on top/bottom and nothing was done.
7754 """
7755 return _core_.Window_ScrollLines(*args, **kwargs)
7756
7757 def ScrollPages(*args, **kwargs):
7758 """
7759 ScrollPages(self, int pages) -> bool
7760
7761 If the platform and window class supports it, scrolls the window by
7762 the given number of pages down, if pages is positive, or up if pages
7763 is negative. Returns True if the window was scrolled, False if it was
7764 already on top/bottom and nothing was done.
7765 """
7766 return _core_.Window_ScrollPages(*args, **kwargs)
7767
7768 def LineUp(*args, **kwargs):
7769 """
7770 LineUp(self) -> bool
7771
7772 This is just a wrapper for ScrollLines(-1).
7773 """
7774 return _core_.Window_LineUp(*args, **kwargs)
7775
7776 def LineDown(*args, **kwargs):
7777 """
7778 LineDown(self) -> bool
7779
7780 This is just a wrapper for ScrollLines(1).
7781 """
7782 return _core_.Window_LineDown(*args, **kwargs)
7783
7784 def PageUp(*args, **kwargs):
7785 """
7786 PageUp(self) -> bool
7787
7788 This is just a wrapper for ScrollPages(-1).
7789 """
7790 return _core_.Window_PageUp(*args, **kwargs)
7791
7792 def PageDown(*args, **kwargs):
7793 """
7794 PageDown(self) -> bool
7795
7796 This is just a wrapper for ScrollPages(1).
7797 """
7798 return _core_.Window_PageDown(*args, **kwargs)
7799
7800 def SetHelpText(*args, **kwargs):
7801 """
7802 SetHelpText(self, String text)
7803
7804 Sets the help text to be used as context-sensitive help for this
7805 window. Note that the text is actually stored by the current
7806 wxHelpProvider implementation, and not in the window object itself.
7807 """
7808 return _core_.Window_SetHelpText(*args, **kwargs)
7809
7810 def SetHelpTextForId(*args, **kwargs):
7811 """
7812 SetHelpTextForId(self, String text)
7813
7814 Associate this help text with all windows with the same id as this
7815 one.
7816 """
7817 return _core_.Window_SetHelpTextForId(*args, **kwargs)
7818
7819 def GetHelpText(*args, **kwargs):
7820 """
7821 GetHelpText(self) -> String
7822
7823 Gets the help text to be used as context-sensitive help for this
7824 window. Note that the text is actually stored by the current
7825 wxHelpProvider implementation, and not in the window object itself.
7826 """
7827 return _core_.Window_GetHelpText(*args, **kwargs)
7828
7829 def SetToolTipString(*args, **kwargs):
7830 """
7831 SetToolTipString(self, String tip)
7832
7833 Attach a tooltip to the window.
7834 """
7835 return _core_.Window_SetToolTipString(*args, **kwargs)
7836
7837 def SetToolTip(*args, **kwargs):
7838 """
7839 SetToolTip(self, ToolTip tip)
7840
7841 Attach a tooltip to the window.
7842 """
7843 return _core_.Window_SetToolTip(*args, **kwargs)
7844
7845 def GetToolTip(*args, **kwargs):
7846 """
7847 GetToolTip(self) -> ToolTip
7848
7849 get the associated tooltip or None if none
7850 """
7851 return _core_.Window_GetToolTip(*args, **kwargs)
7852
7853 def SetDropTarget(*args, **kwargs):
7854 """
7855 SetDropTarget(self, DropTarget dropTarget)
7856
7857 Associates a drop target with this window. If the window already has
7858 a drop target, it is deleted.
7859 """
7860 return _core_.Window_SetDropTarget(*args, **kwargs)
7861
7862 def GetDropTarget(*args, **kwargs):
7863 """
7864 GetDropTarget(self) -> DropTarget
7865
7866 Returns the associated drop target, which may be None.
7867 """
7868 return _core_.Window_GetDropTarget(*args, **kwargs)
7869
7870 def SetConstraints(*args, **kwargs):
7871 """
7872 SetConstraints(self, LayoutConstraints constraints)
7873
7874 Sets the window to have the given layout constraints. If an existing
7875 layout constraints object is already owned by the window, it will be
7876 deleted. Pass None to disassociate and delete the window's current
7877 constraints.
7878
7879 You must call SetAutoLayout to tell a window to use the constraints
7880 automatically in its default EVT_SIZE handler; otherwise, you must
7881 handle EVT_SIZE yourself and call Layout() explicitly. When setting
7882 both a wx.LayoutConstraints and a wx.Sizer, only the sizer will have
7883 effect.
7884 """
7885 return _core_.Window_SetConstraints(*args, **kwargs)
7886
7887 def GetConstraints(*args, **kwargs):
7888 """
7889 GetConstraints(self) -> LayoutConstraints
7890
7891 Returns a pointer to the window's layout constraints, or None if there
7892 are none.
7893 """
7894 return _core_.Window_GetConstraints(*args, **kwargs)
7895
7896 def SetAutoLayout(*args, **kwargs):
7897 """
7898 SetAutoLayout(self, bool autoLayout)
7899
7900 Determines whether the Layout function will be called automatically
7901 when the window is resized. It is called implicitly by SetSizer but
7902 if you use SetConstraints you should call it manually or otherwise the
7903 window layout won't be correctly updated when its size changes.
7904 """
7905 return _core_.Window_SetAutoLayout(*args, **kwargs)
7906
7907 def GetAutoLayout(*args, **kwargs):
7908 """
7909 GetAutoLayout(self) -> bool
7910
7911 Returns the current autoLayout setting
7912 """
7913 return _core_.Window_GetAutoLayout(*args, **kwargs)
7914
7915 def Layout(*args, **kwargs):
7916 """
7917 Layout(self) -> bool
7918
7919 Invokes the constraint-based layout algorithm or the sizer-based
7920 algorithm for this window. See SetAutoLayout: when auto layout is on,
7921 this function gets called automatically by the default EVT_SIZE
7922 handler when the window is resized.
7923 """
7924 return _core_.Window_Layout(*args, **kwargs)
7925
7926 def SetSizer(*args, **kwargs):
7927 """
7928 SetSizer(self, Sizer sizer, bool deleteOld=True)
7929
7930 Sets the window to have the given layout sizer. The window will then
7931 own the object, and will take care of its deletion. If an existing
7932 layout sizer object is already owned by the window, it will be deleted
7933 if the deleteOld parameter is true. Note that this function will also
7934 call SetAutoLayout implicitly with a True parameter if the sizer is
7935 non-None, and False otherwise.
7936 """
7937 return _core_.Window_SetSizer(*args, **kwargs)
7938
7939 def SetSizerAndFit(*args, **kwargs):
7940 """
7941 SetSizerAndFit(self, Sizer sizer, bool deleteOld=True)
7942
7943 The same as SetSizer, except it also sets the size hints for the
7944 window based on the sizer's minimum size.
7945 """
7946 return _core_.Window_SetSizerAndFit(*args, **kwargs)
7947
7948 def GetSizer(*args, **kwargs):
7949 """
7950 GetSizer(self) -> Sizer
7951
7952 Return the sizer associated with the window by a previous call to
7953 SetSizer or None if there isn't one.
7954 """
7955 return _core_.Window_GetSizer(*args, **kwargs)
7956
7957 def SetContainingSizer(*args, **kwargs):
7958 """
7959 SetContainingSizer(self, Sizer sizer)
7960
7961 This normally does not need to be called by application code. It is
7962 called internally when a window is added to a sizer, and is used so
7963 the window can remove itself from the sizer when it is destroyed.
7964 """
7965 return _core_.Window_SetContainingSizer(*args, **kwargs)
7966
7967 def GetContainingSizer(*args, **kwargs):
7968 """
7969 GetContainingSizer(self) -> Sizer
7970
7971 Return the sizer that this window is a member of, if any, otherwise None.
7972 """
7973 return _core_.Window_GetContainingSizer(*args, **kwargs)
7974
7975 def InheritAttributes(*args, **kwargs):
7976 """
7977 InheritAttributes(self)
7978
7979 This function is (or should be, in case of custom controls) called
7980 during window creation to intelligently set up the window visual
7981 attributes, that is the font and the foreground and background
7982 colours.
7983
7984 By 'intelligently' the following is meant: by default, all windows use
7985 their own default attributes. However if some of the parent's
7986 attributes are explicitly changed (that is, using SetFont and not
7987 SetOwnFont) and if the corresponding attribute hadn't been
7988 explicitly set for this window itself, then this window takes the same
7989 value as used by the parent. In addition, if the window overrides
7990 ShouldInheritColours to return false, the colours will not be changed
7991 no matter what and only the font might.
7992
7993 This rather complicated logic is necessary in order to accommodate the
7994 different usage scenarios. The most common one is when all default
7995 attributes are used and in this case, nothing should be inherited as
7996 in modern GUIs different controls use different fonts (and colours)
7997 than their siblings so they can't inherit the same value from the
7998 parent. However it was also deemed desirable to allow to simply change
7999 the attributes of all children at once by just changing the font or
8000 colour of their common parent, hence in this case we do inherit the
8001 parents attributes.
8002
8003 """
8004 return _core_.Window_InheritAttributes(*args, **kwargs)
8005
8006 def ShouldInheritColours(*args, **kwargs):
8007 """
8008 ShouldInheritColours(self) -> bool
8009
8010 Return true from here to allow the colours of this window to be
8011 changed by InheritAttributes, returning false forbids inheriting them
8012 from the parent window.
8013
8014 The base class version returns false, but this method is overridden in
8015 wxControl where it returns true.
8016 """
8017 return _core_.Window_ShouldInheritColours(*args, **kwargs)
8018
8019 def PostCreate(self, pre):
8020 """
8021 Phase 3 of the 2-phase create <wink!>
8022 Call this method after precreating the window with the 2-phase create method.
8023 """
8024 self.this = pre.this
8025 self.thisown = pre.thisown
8026 pre.thisown = 0
8027 if hasattr(self, '_setOORInfo'):
8028 self._setOORInfo(self)
8029 if hasattr(self, '_setCallbackInfo'):
8030 self._setCallbackInfo(self, self.__class__)
8031
8032
8033 class WindowPtr(Window):
8034 def __init__(self, this):
8035 self.this = this
8036 if not hasattr(self,"thisown"): self.thisown = 0
8037 self.__class__ = Window
8038 _core_.Window_swigregister(WindowPtr)
8039
8040 def PreWindow(*args, **kwargs):
8041 """
8042 PreWindow() -> Window
8043
8044 Precreate a Window for 2-phase creation.
8045 """
8046 val = _core_.new_PreWindow(*args, **kwargs)
8047 val.thisown = 1
8048 return val
8049
8050 def Window_NewControlId(*args, **kwargs):
8051 """
8052 Window_NewControlId() -> int
8053
8054 Generate a control id for the controls which were not given one.
8055 """
8056 return _core_.Window_NewControlId(*args, **kwargs)
8057
8058 def Window_NextControlId(*args, **kwargs):
8059 """
8060 Window_NextControlId(int winid) -> int
8061
8062 Get the id of the control following the one with the given
8063 autogenerated) id
8064 """
8065 return _core_.Window_NextControlId(*args, **kwargs)
8066
8067 def Window_PrevControlId(*args, **kwargs):
8068 """
8069 Window_PrevControlId(int winid) -> int
8070
8071 Get the id of the control preceding the one with the given
8072 autogenerated) id
8073 """
8074 return _core_.Window_PrevControlId(*args, **kwargs)
8075
8076 def Window_FindFocus(*args, **kwargs):
8077 """
8078 Window_FindFocus() -> Window
8079
8080 Returns the window or control that currently has the keyboard focus,
8081 or None.
8082 """
8083 return _core_.Window_FindFocus(*args, **kwargs)
8084
8085 def Window_GetCapture(*args, **kwargs):
8086 """
8087 Window_GetCapture() -> Window
8088
8089 Returns the window which currently captures the mouse or None
8090 """
8091 return _core_.Window_GetCapture(*args, **kwargs)
8092
8093 def Window_GetClassDefaultAttributes(*args, **kwargs):
8094 """
8095 Window_GetClassDefaultAttributes(int variant=WINDOW_VARIANT_NORMAL) -> VisualAttributes
8096
8097 Get the default attributes for this class. This is useful if you want
8098 to use the same font or colour in your own control as in a standard
8099 control -- which is a much better idea than hard coding specific
8100 colours or fonts which might look completely out of place on the
8101 user's system, especially if it uses themes.
8102
8103 The variant parameter is only relevant under Mac currently and is
8104 ignore under other platforms. Under Mac, it will change the size of
8105 the returned font. See `wx.Window.SetWindowVariant` for more about
8106 this.
8107 """
8108 return _core_.Window_GetClassDefaultAttributes(*args, **kwargs)
8109
8110 def DLG_PNT(win, point_or_x, y=None):
8111 """
8112 Convenience function for converting a Point or (x,y) in
8113 dialog units to pixel units.
8114 """
8115 if y is None:
8116 return win.ConvertDialogPointToPixels(point_or_x)
8117 else:
8118 return win.ConvertDialogPointToPixels(wx.Point(point_or_x, y))
8119
8120 def DLG_SZE(win, size_width, height=None):
8121 """
8122 Convenience function for converting a Size or (w,h) in
8123 dialog units to pixel units.
8124 """
8125 if height is None:
8126 return win.ConvertDialogSizeToPixels(size_width)
8127 else:
8128 return win.ConvertDialogSizeToPixels(wx.Size(size_width, height))
8129
8130
8131 def FindWindowById(*args, **kwargs):
8132 """
8133 FindWindowById(long id, Window parent=None) -> Window
8134
8135 Find the first window in the application with the given id. If parent
8136 is None, the search will start from all top-level frames and dialog
8137 boxes; if non-None, the search will be limited to the given window
8138 hierarchy. The search is recursive in both cases.
8139 """
8140 return _core_.FindWindowById(*args, **kwargs)
8141
8142 def FindWindowByName(*args, **kwargs):
8143 """
8144 FindWindowByName(String name, Window parent=None) -> Window
8145
8146 Find a window by its name (as given in a window constructor or Create
8147 function call). If parent is None, the search will start from all
8148 top-level frames and dialog boxes; if non-None, the search will be
8149 limited to the given window hierarchy. The search is recursive in both
8150 cases.
8151
8152 If no window with such name is found, wx.FindWindowByLabel is called.
8153 """
8154 return _core_.FindWindowByName(*args, **kwargs)
8155
8156 def FindWindowByLabel(*args, **kwargs):
8157 """
8158 FindWindowByLabel(String label, Window parent=None) -> Window
8159
8160 Find a window by its label. Depending on the type of window, the label
8161 may be a window title or panel item label. If parent is None, the
8162 search will start from all top-level frames and dialog boxes; if
8163 non-None, the search will be limited to the given window
8164 hierarchy. The search is recursive in both cases.
8165 """
8166 return _core_.FindWindowByLabel(*args, **kwargs)
8167
8168 def Window_FromHWND(*args, **kwargs):
8169 """Window_FromHWND(Window parent, unsigned long _hWnd) -> Window"""
8170 return _core_.Window_FromHWND(*args, **kwargs)
8171 #---------------------------------------------------------------------------
8172
8173 class Validator(EvtHandler):
8174 """Proxy of C++ Validator class"""
8175 def __repr__(self):
8176 return "<%s.%s; proxy of C++ wxValidator instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
8177 def __init__(self, *args, **kwargs):
8178 """__init__(self) -> Validator"""
8179 newobj = _core_.new_Validator(*args, **kwargs)
8180 self.this = newobj.this
8181 self.thisown = 1
8182 del newobj.thisown
8183 self._setOORInfo(self)
8184
8185 def Clone(*args, **kwargs):
8186 """Clone(self) -> Validator"""
8187 return _core_.Validator_Clone(*args, **kwargs)
8188
8189 def Validate(*args, **kwargs):
8190 """Validate(self, Window parent) -> bool"""
8191 return _core_.Validator_Validate(*args, **kwargs)
8192
8193 def TransferToWindow(*args, **kwargs):
8194 """TransferToWindow(self) -> bool"""
8195 return _core_.Validator_TransferToWindow(*args, **kwargs)
8196
8197 def TransferFromWindow(*args, **kwargs):
8198 """TransferFromWindow(self) -> bool"""
8199 return _core_.Validator_TransferFromWindow(*args, **kwargs)
8200
8201 def GetWindow(*args, **kwargs):
8202 """GetWindow(self) -> Window"""
8203 return _core_.Validator_GetWindow(*args, **kwargs)
8204
8205 def SetWindow(*args, **kwargs):
8206 """SetWindow(self, Window window)"""
8207 return _core_.Validator_SetWindow(*args, **kwargs)
8208
8209 def IsSilent(*args, **kwargs):
8210 """IsSilent() -> bool"""
8211 return _core_.Validator_IsSilent(*args, **kwargs)
8212
8213 IsSilent = staticmethod(IsSilent)
8214 def SetBellOnError(*args, **kwargs):
8215 """SetBellOnError(int doIt=True)"""
8216 return _core_.Validator_SetBellOnError(*args, **kwargs)
8217
8218 SetBellOnError = staticmethod(SetBellOnError)
8219
8220 class ValidatorPtr(Validator):
8221 def __init__(self, this):
8222 self.this = this
8223 if not hasattr(self,"thisown"): self.thisown = 0
8224 self.__class__ = Validator
8225 _core_.Validator_swigregister(ValidatorPtr)
8226
8227 def Validator_IsSilent(*args, **kwargs):
8228 """Validator_IsSilent() -> bool"""
8229 return _core_.Validator_IsSilent(*args, **kwargs)
8230
8231 def Validator_SetBellOnError(*args, **kwargs):
8232 """Validator_SetBellOnError(int doIt=True)"""
8233 return _core_.Validator_SetBellOnError(*args, **kwargs)
8234
8235 class PyValidator(Validator):
8236 """Proxy of C++ PyValidator class"""
8237 def __repr__(self):
8238 return "<%s.%s; proxy of C++ wxPyValidator instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
8239 def __init__(self, *args, **kwargs):
8240 """__init__(self) -> PyValidator"""
8241 newobj = _core_.new_PyValidator(*args, **kwargs)
8242 self.this = newobj.this
8243 self.thisown = 1
8244 del newobj.thisown
8245
8246 self._setCallbackInfo(self, PyValidator, 1)
8247 self._setOORInfo(self)
8248
8249 def _setCallbackInfo(*args, **kwargs):
8250 """_setCallbackInfo(self, PyObject self, PyObject _class, int incref=True)"""
8251 return _core_.PyValidator__setCallbackInfo(*args, **kwargs)
8252
8253
8254 class PyValidatorPtr(PyValidator):
8255 def __init__(self, this):
8256 self.this = this
8257 if not hasattr(self,"thisown"): self.thisown = 0
8258 self.__class__ = PyValidator
8259 _core_.PyValidator_swigregister(PyValidatorPtr)
8260
8261 #---------------------------------------------------------------------------
8262
8263 class Menu(EvtHandler):
8264 """Proxy of C++ Menu class"""
8265 def __repr__(self):
8266 return "<%s.%s; proxy of C++ wxMenu instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
8267 def __init__(self, *args, **kwargs):
8268 """__init__(self, String title=EmptyString, long style=0) -> Menu"""
8269 newobj = _core_.new_Menu(*args, **kwargs)
8270 self.this = newobj.this
8271 self.thisown = 1
8272 del newobj.thisown
8273 self._setOORInfo(self)
8274
8275 def Append(*args, **kwargs):
8276 """Append(self, int id, String text, String help=EmptyString, int kind=ITEM_NORMAL) -> MenuItem"""
8277 return _core_.Menu_Append(*args, **kwargs)
8278
8279 def AppendSeparator(*args, **kwargs):
8280 """AppendSeparator(self) -> MenuItem"""
8281 return _core_.Menu_AppendSeparator(*args, **kwargs)
8282
8283 def AppendCheckItem(*args, **kwargs):
8284 """AppendCheckItem(self, int id, String text, String help=EmptyString) -> MenuItem"""
8285 return _core_.Menu_AppendCheckItem(*args, **kwargs)
8286
8287 def AppendRadioItem(*args, **kwargs):
8288 """AppendRadioItem(self, int id, String text, String help=EmptyString) -> MenuItem"""
8289 return _core_.Menu_AppendRadioItem(*args, **kwargs)
8290
8291 def AppendMenu(*args, **kwargs):
8292 """AppendMenu(self, int id, String text, Menu submenu, String help=EmptyString) -> MenuItem"""
8293 return _core_.Menu_AppendMenu(*args, **kwargs)
8294
8295 def AppendItem(*args, **kwargs):
8296 """AppendItem(self, MenuItem item) -> MenuItem"""
8297 return _core_.Menu_AppendItem(*args, **kwargs)
8298
8299 def Break(*args, **kwargs):
8300 """Break(self)"""
8301 return _core_.Menu_Break(*args, **kwargs)
8302
8303 def InsertItem(*args, **kwargs):
8304 """InsertItem(self, size_t pos, MenuItem item) -> MenuItem"""
8305 return _core_.Menu_InsertItem(*args, **kwargs)
8306
8307 def Insert(*args, **kwargs):
8308 """
8309 Insert(self, size_t pos, int id, String text, String help=EmptyString,
8310 int kind=ITEM_NORMAL) -> MenuItem
8311 """
8312 return _core_.Menu_Insert(*args, **kwargs)
8313
8314 def InsertSeparator(*args, **kwargs):
8315 """InsertSeparator(self, size_t pos) -> MenuItem"""
8316 return _core_.Menu_InsertSeparator(*args, **kwargs)
8317
8318 def InsertCheckItem(*args, **kwargs):
8319 """InsertCheckItem(self, size_t pos, int id, String text, String help=EmptyString) -> MenuItem"""
8320 return _core_.Menu_InsertCheckItem(*args, **kwargs)
8321
8322 def InsertRadioItem(*args, **kwargs):
8323 """InsertRadioItem(self, size_t pos, int id, String text, String help=EmptyString) -> MenuItem"""
8324 return _core_.Menu_InsertRadioItem(*args, **kwargs)
8325
8326 def InsertMenu(*args, **kwargs):
8327 """InsertMenu(self, size_t pos, int id, String text, Menu submenu, String help=EmptyString) -> MenuItem"""
8328 return _core_.Menu_InsertMenu(*args, **kwargs)
8329
8330 def PrependItem(*args, **kwargs):
8331 """PrependItem(self, MenuItem item) -> MenuItem"""
8332 return _core_.Menu_PrependItem(*args, **kwargs)
8333
8334 def Prepend(*args, **kwargs):
8335 """Prepend(self, int id, String text, String help=EmptyString, int kind=ITEM_NORMAL) -> MenuItem"""
8336 return _core_.Menu_Prepend(*args, **kwargs)
8337
8338 def PrependSeparator(*args, **kwargs):
8339 """PrependSeparator(self) -> MenuItem"""
8340 return _core_.Menu_PrependSeparator(*args, **kwargs)
8341
8342 def PrependCheckItem(*args, **kwargs):
8343 """PrependCheckItem(self, int id, String text, String help=EmptyString) -> MenuItem"""
8344 return _core_.Menu_PrependCheckItem(*args, **kwargs)
8345
8346 def PrependRadioItem(*args, **kwargs):
8347 """PrependRadioItem(self, int id, String text, String help=EmptyString) -> MenuItem"""
8348 return _core_.Menu_PrependRadioItem(*args, **kwargs)
8349
8350 def PrependMenu(*args, **kwargs):
8351 """PrependMenu(self, int id, String text, Menu submenu, String help=EmptyString) -> MenuItem"""
8352 return _core_.Menu_PrependMenu(*args, **kwargs)
8353
8354 def Remove(*args, **kwargs):
8355 """Remove(self, int id) -> MenuItem"""
8356 return _core_.Menu_Remove(*args, **kwargs)
8357
8358 def RemoveItem(*args, **kwargs):
8359 """RemoveItem(self, MenuItem item) -> MenuItem"""
8360 return _core_.Menu_RemoveItem(*args, **kwargs)
8361
8362 def Delete(*args, **kwargs):
8363 """Delete(self, int id) -> bool"""
8364 return _core_.Menu_Delete(*args, **kwargs)
8365
8366 def DeleteItem(*args, **kwargs):
8367 """DeleteItem(self, MenuItem item) -> bool"""
8368 return _core_.Menu_DeleteItem(*args, **kwargs)
8369
8370 def Destroy(*args, **kwargs):
8371 """
8372 Destroy(self)
8373
8374 Deletes the C++ object this Python object is a proxy for.
8375 """
8376 return _core_.Menu_Destroy(*args, **kwargs)
8377
8378 def DestroyId(*args, **kwargs):
8379 """
8380 DestroyId(self, int id) -> bool
8381
8382 Deletes the C++ object this Python object is a proxy for.
8383 """
8384 return _core_.Menu_DestroyId(*args, **kwargs)
8385
8386 def DestroyItem(*args, **kwargs):
8387 """
8388 DestroyItem(self, MenuItem item) -> bool
8389
8390 Deletes the C++ object this Python object is a proxy for.
8391 """
8392 return _core_.Menu_DestroyItem(*args, **kwargs)
8393
8394 def GetMenuItemCount(*args, **kwargs):
8395 """GetMenuItemCount(self) -> size_t"""
8396 return _core_.Menu_GetMenuItemCount(*args, **kwargs)
8397
8398 def GetMenuItems(*args, **kwargs):
8399 """GetMenuItems(self) -> PyObject"""
8400 return _core_.Menu_GetMenuItems(*args, **kwargs)
8401
8402 def FindItem(*args, **kwargs):
8403 """FindItem(self, String item) -> int"""
8404 return _core_.Menu_FindItem(*args, **kwargs)
8405
8406 def FindItemById(*args, **kwargs):
8407 """FindItemById(self, int id) -> MenuItem"""
8408 return _core_.Menu_FindItemById(*args, **kwargs)
8409
8410 def FindItemByPosition(*args, **kwargs):
8411 """FindItemByPosition(self, size_t position) -> MenuItem"""
8412 return _core_.Menu_FindItemByPosition(*args, **kwargs)
8413
8414 def Enable(*args, **kwargs):
8415 """Enable(self, int id, bool enable)"""
8416 return _core_.Menu_Enable(*args, **kwargs)
8417
8418 def IsEnabled(*args, **kwargs):
8419 """IsEnabled(self, int id) -> bool"""
8420 return _core_.Menu_IsEnabled(*args, **kwargs)
8421
8422 def Check(*args, **kwargs):
8423 """Check(self, int id, bool check)"""
8424 return _core_.Menu_Check(*args, **kwargs)
8425
8426 def IsChecked(*args, **kwargs):
8427 """IsChecked(self, int id) -> bool"""
8428 return _core_.Menu_IsChecked(*args, **kwargs)
8429
8430 def SetLabel(*args, **kwargs):
8431 """SetLabel(self, int id, String label)"""
8432 return _core_.Menu_SetLabel(*args, **kwargs)
8433
8434 def GetLabel(*args, **kwargs):
8435 """GetLabel(self, int id) -> String"""
8436 return _core_.Menu_GetLabel(*args, **kwargs)
8437
8438 def SetHelpString(*args, **kwargs):
8439 """SetHelpString(self, int id, String helpString)"""
8440 return _core_.Menu_SetHelpString(*args, **kwargs)
8441
8442 def GetHelpString(*args, **kwargs):
8443 """GetHelpString(self, int id) -> String"""
8444 return _core_.Menu_GetHelpString(*args, **kwargs)
8445
8446 def SetTitle(*args, **kwargs):
8447 """SetTitle(self, String title)"""
8448 return _core_.Menu_SetTitle(*args, **kwargs)
8449
8450 def GetTitle(*args, **kwargs):
8451 """GetTitle(self) -> String"""
8452 return _core_.Menu_GetTitle(*args, **kwargs)
8453
8454 def SetEventHandler(*args, **kwargs):
8455 """SetEventHandler(self, EvtHandler handler)"""
8456 return _core_.Menu_SetEventHandler(*args, **kwargs)
8457
8458 def GetEventHandler(*args, **kwargs):
8459 """GetEventHandler(self) -> EvtHandler"""
8460 return _core_.Menu_GetEventHandler(*args, **kwargs)
8461
8462 def SetInvokingWindow(*args, **kwargs):
8463 """SetInvokingWindow(self, Window win)"""
8464 return _core_.Menu_SetInvokingWindow(*args, **kwargs)
8465
8466 def GetInvokingWindow(*args, **kwargs):
8467 """GetInvokingWindow(self) -> Window"""
8468 return _core_.Menu_GetInvokingWindow(*args, **kwargs)
8469
8470 def GetStyle(*args, **kwargs):
8471 """GetStyle(self) -> long"""
8472 return _core_.Menu_GetStyle(*args, **kwargs)
8473
8474 def UpdateUI(*args, **kwargs):
8475 """UpdateUI(self, EvtHandler source=None)"""
8476 return _core_.Menu_UpdateUI(*args, **kwargs)
8477
8478 def GetMenuBar(*args, **kwargs):
8479 """GetMenuBar(self) -> MenuBar"""
8480 return _core_.Menu_GetMenuBar(*args, **kwargs)
8481
8482 def Attach(*args, **kwargs):
8483 """Attach(self, wxMenuBarBase menubar)"""
8484 return _core_.Menu_Attach(*args, **kwargs)
8485
8486 def Detach(*args, **kwargs):
8487 """Detach(self)"""
8488 return _core_.Menu_Detach(*args, **kwargs)
8489
8490 def IsAttached(*args, **kwargs):
8491 """IsAttached(self) -> bool"""
8492 return _core_.Menu_IsAttached(*args, **kwargs)
8493
8494 def SetParent(*args, **kwargs):
8495 """SetParent(self, Menu parent)"""
8496 return _core_.Menu_SetParent(*args, **kwargs)
8497
8498 def GetParent(*args, **kwargs):
8499 """GetParent(self) -> Menu"""
8500 return _core_.Menu_GetParent(*args, **kwargs)
8501
8502
8503 class MenuPtr(Menu):
8504 def __init__(self, this):
8505 self.this = this
8506 if not hasattr(self,"thisown"): self.thisown = 0
8507 self.__class__ = Menu
8508 _core_.Menu_swigregister(MenuPtr)
8509 DefaultValidator = cvar.DefaultValidator
8510
8511 #---------------------------------------------------------------------------
8512
8513 class MenuBar(Window):
8514 """Proxy of C++ MenuBar class"""
8515 def __repr__(self):
8516 return "<%s.%s; proxy of C++ wxMenuBar instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
8517 def __init__(self, *args, **kwargs):
8518 """__init__(self, long style=0) -> MenuBar"""
8519 newobj = _core_.new_MenuBar(*args, **kwargs)
8520 self.this = newobj.this
8521 self.thisown = 1
8522 del newobj.thisown
8523 self._setOORInfo(self)
8524
8525 def Append(*args, **kwargs):
8526 """Append(self, Menu menu, String title) -> bool"""
8527 return _core_.MenuBar_Append(*args, **kwargs)
8528
8529 def Insert(*args, **kwargs):
8530 """Insert(self, size_t pos, Menu menu, String title) -> bool"""
8531 return _core_.MenuBar_Insert(*args, **kwargs)
8532
8533 def GetMenuCount(*args, **kwargs):
8534 """GetMenuCount(self) -> size_t"""
8535 return _core_.MenuBar_GetMenuCount(*args, **kwargs)
8536
8537 def GetMenu(*args, **kwargs):
8538 """GetMenu(self, size_t pos) -> Menu"""
8539 return _core_.MenuBar_GetMenu(*args, **kwargs)
8540
8541 def Replace(*args, **kwargs):
8542 """Replace(self, size_t pos, Menu menu, String title) -> Menu"""
8543 return _core_.MenuBar_Replace(*args, **kwargs)
8544
8545 def Remove(*args, **kwargs):
8546 """Remove(self, size_t pos) -> Menu"""
8547 return _core_.MenuBar_Remove(*args, **kwargs)
8548
8549 def EnableTop(*args, **kwargs):
8550 """EnableTop(self, size_t pos, bool enable)"""
8551 return _core_.MenuBar_EnableTop(*args, **kwargs)
8552
8553 def IsEnabledTop(*args, **kwargs):
8554 """IsEnabledTop(self, size_t pos) -> bool"""
8555 return _core_.MenuBar_IsEnabledTop(*args, **kwargs)
8556
8557 def SetLabelTop(*args, **kwargs):
8558 """SetLabelTop(self, size_t pos, String label)"""
8559 return _core_.MenuBar_SetLabelTop(*args, **kwargs)
8560
8561 def GetLabelTop(*args, **kwargs):
8562 """GetLabelTop(self, size_t pos) -> String"""
8563 return _core_.MenuBar_GetLabelTop(*args, **kwargs)
8564
8565 def FindMenuItem(*args, **kwargs):
8566 """FindMenuItem(self, String menu, String item) -> int"""
8567 return _core_.MenuBar_FindMenuItem(*args, **kwargs)
8568
8569 def FindItemById(*args, **kwargs):
8570 """FindItemById(self, int id) -> MenuItem"""
8571 return _core_.MenuBar_FindItemById(*args, **kwargs)
8572
8573 def FindMenu(*args, **kwargs):
8574 """FindMenu(self, String title) -> int"""
8575 return _core_.MenuBar_FindMenu(*args, **kwargs)
8576
8577 def Enable(*args, **kwargs):
8578 """Enable(self, int id, bool enable)"""
8579 return _core_.MenuBar_Enable(*args, **kwargs)
8580
8581 def Check(*args, **kwargs):
8582 """Check(self, int id, bool check)"""
8583 return _core_.MenuBar_Check(*args, **kwargs)
8584
8585 def IsChecked(*args, **kwargs):
8586 """IsChecked(self, int id) -> bool"""
8587 return _core_.MenuBar_IsChecked(*args, **kwargs)
8588
8589 def IsEnabled(*args, **kwargs):
8590 """IsEnabled(self, int id) -> bool"""
8591 return _core_.MenuBar_IsEnabled(*args, **kwargs)
8592
8593 def SetLabel(*args, **kwargs):
8594 """SetLabel(self, int id, String label)"""
8595 return _core_.MenuBar_SetLabel(*args, **kwargs)
8596
8597 def GetLabel(*args, **kwargs):
8598 """GetLabel(self, int id) -> String"""
8599 return _core_.MenuBar_GetLabel(*args, **kwargs)
8600
8601 def SetHelpString(*args, **kwargs):
8602 """SetHelpString(self, int id, String helpString)"""
8603 return _core_.MenuBar_SetHelpString(*args, **kwargs)
8604
8605 def GetHelpString(*args, **kwargs):
8606 """GetHelpString(self, int id) -> String"""
8607 return _core_.MenuBar_GetHelpString(*args, **kwargs)
8608
8609 def GetFrame(*args, **kwargs):
8610 """GetFrame(self) -> wxFrame"""
8611 return _core_.MenuBar_GetFrame(*args, **kwargs)
8612
8613 def IsAttached(*args, **kwargs):
8614 """IsAttached(self) -> bool"""
8615 return _core_.MenuBar_IsAttached(*args, **kwargs)
8616
8617 def Attach(*args, **kwargs):
8618 """Attach(self, wxFrame frame)"""
8619 return _core_.MenuBar_Attach(*args, **kwargs)
8620
8621 def Detach(*args, **kwargs):
8622 """Detach(self)"""
8623 return _core_.MenuBar_Detach(*args, **kwargs)
8624
8625
8626 class MenuBarPtr(MenuBar):
8627 def __init__(self, this):
8628 self.this = this
8629 if not hasattr(self,"thisown"): self.thisown = 0
8630 self.__class__ = MenuBar
8631 _core_.MenuBar_swigregister(MenuBarPtr)
8632
8633 #---------------------------------------------------------------------------
8634
8635 class MenuItem(Object):
8636 """Proxy of C++ MenuItem class"""
8637 def __repr__(self):
8638 return "<%s.%s; proxy of C++ wxMenuItem instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
8639 def __init__(self, *args, **kwargs):
8640 """
8641 __init__(self, Menu parentMenu=None, int id=ID_ANY, String text=EmptyString,
8642 String help=EmptyString, int kind=ITEM_NORMAL,
8643 Menu subMenu=None) -> MenuItem
8644 """
8645 newobj = _core_.new_MenuItem(*args, **kwargs)
8646 self.this = newobj.this
8647 self.thisown = 1
8648 del newobj.thisown
8649 def GetMenu(*args, **kwargs):
8650 """GetMenu(self) -> Menu"""
8651 return _core_.MenuItem_GetMenu(*args, **kwargs)
8652
8653 def SetMenu(*args, **kwargs):
8654 """SetMenu(self, Menu menu)"""
8655 return _core_.MenuItem_SetMenu(*args, **kwargs)
8656
8657 def SetId(*args, **kwargs):
8658 """SetId(self, int id)"""
8659 return _core_.MenuItem_SetId(*args, **kwargs)
8660
8661 def GetId(*args, **kwargs):
8662 """GetId(self) -> int"""
8663 return _core_.MenuItem_GetId(*args, **kwargs)
8664
8665 def IsSeparator(*args, **kwargs):
8666 """IsSeparator(self) -> bool"""
8667 return _core_.MenuItem_IsSeparator(*args, **kwargs)
8668
8669 def SetText(*args, **kwargs):
8670 """SetText(self, String str)"""
8671 return _core_.MenuItem_SetText(*args, **kwargs)
8672
8673 def GetLabel(*args, **kwargs):
8674 """GetLabel(self) -> String"""
8675 return _core_.MenuItem_GetLabel(*args, **kwargs)
8676
8677 def GetText(*args, **kwargs):
8678 """GetText(self) -> String"""
8679 return _core_.MenuItem_GetText(*args, **kwargs)
8680
8681 def GetLabelFromText(*args, **kwargs):
8682 """GetLabelFromText(String text) -> String"""
8683 return _core_.MenuItem_GetLabelFromText(*args, **kwargs)
8684
8685 GetLabelFromText = staticmethod(GetLabelFromText)
8686 def GetKind(*args, **kwargs):
8687 """GetKind(self) -> int"""
8688 return _core_.MenuItem_GetKind(*args, **kwargs)
8689
8690 def SetKind(*args, **kwargs):
8691 """SetKind(self, int kind)"""
8692 return _core_.MenuItem_SetKind(*args, **kwargs)
8693
8694 def SetCheckable(*args, **kwargs):
8695 """SetCheckable(self, bool checkable)"""
8696 return _core_.MenuItem_SetCheckable(*args, **kwargs)
8697
8698 def IsCheckable(*args, **kwargs):
8699 """IsCheckable(self) -> bool"""
8700 return _core_.MenuItem_IsCheckable(*args, **kwargs)
8701
8702 def IsSubMenu(*args, **kwargs):
8703 """IsSubMenu(self) -> bool"""
8704 return _core_.MenuItem_IsSubMenu(*args, **kwargs)
8705
8706 def SetSubMenu(*args, **kwargs):
8707 """SetSubMenu(self, Menu menu)"""
8708 return _core_.MenuItem_SetSubMenu(*args, **kwargs)
8709
8710 def GetSubMenu(*args, **kwargs):
8711 """GetSubMenu(self) -> Menu"""
8712 return _core_.MenuItem_GetSubMenu(*args, **kwargs)
8713
8714 def Enable(*args, **kwargs):
8715 """Enable(self, bool enable=True)"""
8716 return _core_.MenuItem_Enable(*args, **kwargs)
8717
8718 def IsEnabled(*args, **kwargs):
8719 """IsEnabled(self) -> bool"""
8720 return _core_.MenuItem_IsEnabled(*args, **kwargs)
8721
8722 def Check(*args, **kwargs):
8723 """Check(self, bool check=True)"""
8724 return _core_.MenuItem_Check(*args, **kwargs)
8725
8726 def IsChecked(*args, **kwargs):
8727 """IsChecked(self) -> bool"""
8728 return _core_.MenuItem_IsChecked(*args, **kwargs)
8729
8730 def Toggle(*args, **kwargs):
8731 """Toggle(self)"""
8732 return _core_.MenuItem_Toggle(*args, **kwargs)
8733
8734 def SetHelp(*args, **kwargs):
8735 """SetHelp(self, String str)"""
8736 return _core_.MenuItem_SetHelp(*args, **kwargs)
8737
8738 def GetHelp(*args, **kwargs):
8739 """GetHelp(self) -> String"""
8740 return _core_.MenuItem_GetHelp(*args, **kwargs)
8741
8742 def GetAccel(*args, **kwargs):
8743 """GetAccel(self) -> AcceleratorEntry"""
8744 return _core_.MenuItem_GetAccel(*args, **kwargs)
8745
8746 def SetAccel(*args, **kwargs):
8747 """SetAccel(self, AcceleratorEntry accel)"""
8748 return _core_.MenuItem_SetAccel(*args, **kwargs)
8749
8750 def SetFont(*args, **kwargs):
8751 """SetFont(self, Font font)"""
8752 return _core_.MenuItem_SetFont(*args, **kwargs)
8753
8754 def GetFont(*args, **kwargs):
8755 """GetFont(self) -> Font"""
8756 return _core_.MenuItem_GetFont(*args, **kwargs)
8757
8758 def SetTextColour(*args, **kwargs):
8759 """SetTextColour(self, Colour colText)"""
8760 return _core_.MenuItem_SetTextColour(*args, **kwargs)
8761
8762 def GetTextColour(*args, **kwargs):
8763 """GetTextColour(self) -> Colour"""
8764 return _core_.MenuItem_GetTextColour(*args, **kwargs)
8765
8766 def SetBackgroundColour(*args, **kwargs):
8767 """SetBackgroundColour(self, Colour colBack)"""
8768 return _core_.MenuItem_SetBackgroundColour(*args, **kwargs)
8769
8770 def GetBackgroundColour(*args, **kwargs):
8771 """GetBackgroundColour(self) -> Colour"""
8772 return _core_.MenuItem_GetBackgroundColour(*args, **kwargs)
8773
8774 def SetBitmaps(*args, **kwargs):
8775 """SetBitmaps(self, Bitmap bmpChecked, Bitmap bmpUnchecked=wxNullBitmap)"""
8776 return _core_.MenuItem_SetBitmaps(*args, **kwargs)
8777
8778 def SetDisabledBitmap(*args, **kwargs):
8779 """SetDisabledBitmap(self, Bitmap bmpDisabled)"""
8780 return _core_.MenuItem_SetDisabledBitmap(*args, **kwargs)
8781
8782 def GetDisabledBitmap(*args, **kwargs):
8783 """GetDisabledBitmap(self) -> Bitmap"""
8784 return _core_.MenuItem_GetDisabledBitmap(*args, **kwargs)
8785
8786 def SetMarginWidth(*args, **kwargs):
8787 """SetMarginWidth(self, int nWidth)"""
8788 return _core_.MenuItem_SetMarginWidth(*args, **kwargs)
8789
8790 def GetMarginWidth(*args, **kwargs):
8791 """GetMarginWidth(self) -> int"""
8792 return _core_.MenuItem_GetMarginWidth(*args, **kwargs)
8793
8794 def GetDefaultMarginWidth(*args, **kwargs):
8795 """GetDefaultMarginWidth() -> int"""
8796 return _core_.MenuItem_GetDefaultMarginWidth(*args, **kwargs)
8797
8798 GetDefaultMarginWidth = staticmethod(GetDefaultMarginWidth)
8799 def IsOwnerDrawn(*args, **kwargs):
8800 """IsOwnerDrawn(self) -> bool"""
8801 return _core_.MenuItem_IsOwnerDrawn(*args, **kwargs)
8802
8803 def SetOwnerDrawn(*args, **kwargs):
8804 """SetOwnerDrawn(self, bool ownerDrawn=True)"""
8805 return _core_.MenuItem_SetOwnerDrawn(*args, **kwargs)
8806
8807 def ResetOwnerDrawn(*args, **kwargs):
8808 """ResetOwnerDrawn(self)"""
8809 return _core_.MenuItem_ResetOwnerDrawn(*args, **kwargs)
8810
8811 def SetBitmap(*args, **kwargs):
8812 """SetBitmap(self, Bitmap bitmap)"""
8813 return _core_.MenuItem_SetBitmap(*args, **kwargs)
8814
8815 def GetBitmap(*args, **kwargs):
8816 """GetBitmap(self) -> Bitmap"""
8817 return _core_.MenuItem_GetBitmap(*args, **kwargs)
8818
8819
8820 class MenuItemPtr(MenuItem):
8821 def __init__(self, this):
8822 self.this = this
8823 if not hasattr(self,"thisown"): self.thisown = 0
8824 self.__class__ = MenuItem
8825 _core_.MenuItem_swigregister(MenuItemPtr)
8826
8827 def MenuItem_GetLabelFromText(*args, **kwargs):
8828 """MenuItem_GetLabelFromText(String text) -> String"""
8829 return _core_.MenuItem_GetLabelFromText(*args, **kwargs)
8830
8831 def MenuItem_GetDefaultMarginWidth(*args, **kwargs):
8832 """MenuItem_GetDefaultMarginWidth() -> int"""
8833 return _core_.MenuItem_GetDefaultMarginWidth(*args, **kwargs)
8834
8835 #---------------------------------------------------------------------------
8836
8837 class Control(Window):
8838 """
8839 This is the base class for a control or 'widget'.
8840
8841 A control is generally a small window which processes user input
8842 and/or displays one or more item of data.
8843 """
8844 def __repr__(self):
8845 return "<%s.%s; proxy of C++ wxControl instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
8846 def __init__(self, *args, **kwargs):
8847 """
8848 __init__(self, Window parent, int id=-1, Point pos=DefaultPosition,
8849 Size size=DefaultSize, long style=0, Validator validator=DefaultValidator,
8850 String name=ControlNameStr) -> Control
8851
8852 Create a Control. Normally you should only call this from a subclass'
8853 __init__ as a plain old wx.Control is not very useful.
8854 """
8855 newobj = _core_.new_Control(*args, **kwargs)
8856 self.this = newobj.this
8857 self.thisown = 1
8858 del newobj.thisown
8859 self._setOORInfo(self)
8860
8861 def Create(*args, **kwargs):
8862 """
8863 Create(self, Window parent, int id=-1, Point pos=DefaultPosition,
8864 Size size=DefaultSize, long style=0, Validator validator=DefaultValidator,
8865 String name=ControlNameStr) -> bool
8866
8867 Do the 2nd phase and create the GUI control.
8868 """
8869 return _core_.Control_Create(*args, **kwargs)
8870
8871 def Command(*args, **kwargs):
8872 """
8873 Command(self, CommandEvent event)
8874
8875 Simulates the effect of the user issuing a command to the item.
8876
8877 :see: `wx.CommandEvent`
8878
8879 """
8880 return _core_.Control_Command(*args, **kwargs)
8881
8882 def GetLabel(*args, **kwargs):
8883 """
8884 GetLabel(self) -> String
8885
8886 Return a control's text.
8887 """
8888 return _core_.Control_GetLabel(*args, **kwargs)
8889
8890 def SetLabel(*args, **kwargs):
8891 """
8892 SetLabel(self, String label)
8893
8894 Sets the item's text.
8895 """
8896 return _core_.Control_SetLabel(*args, **kwargs)
8897
8898 def GetClassDefaultAttributes(*args, **kwargs):
8899 """
8900 GetClassDefaultAttributes(int variant=WINDOW_VARIANT_NORMAL) -> VisualAttributes
8901
8902 Get the default attributes for this class. This is useful if you want
8903 to use the same font or colour in your own control as in a standard
8904 control -- which is a much better idea than hard coding specific
8905 colours or fonts which might look completely out of place on the
8906 user's system, especially if it uses themes.
8907
8908 The variant parameter is only relevant under Mac currently and is
8909 ignore under other platforms. Under Mac, it will change the size of
8910 the returned font. See `wx.Window.SetWindowVariant` for more about
8911 this.
8912 """
8913 return _core_.Control_GetClassDefaultAttributes(*args, **kwargs)
8914
8915 GetClassDefaultAttributes = staticmethod(GetClassDefaultAttributes)
8916
8917 class ControlPtr(Control):
8918 def __init__(self, this):
8919 self.this = this
8920 if not hasattr(self,"thisown"): self.thisown = 0
8921 self.__class__ = Control
8922 _core_.Control_swigregister(ControlPtr)
8923 ControlNameStr = cvar.ControlNameStr
8924
8925 def PreControl(*args, **kwargs):
8926 """
8927 PreControl() -> Control
8928
8929 Precreate a Control control for 2-phase creation
8930 """
8931 val = _core_.new_PreControl(*args, **kwargs)
8932 val.thisown = 1
8933 return val
8934
8935 def Control_GetClassDefaultAttributes(*args, **kwargs):
8936 """
8937 Control_GetClassDefaultAttributes(int variant=WINDOW_VARIANT_NORMAL) -> VisualAttributes
8938
8939 Get the default attributes for this class. This is useful if you want
8940 to use the same font or colour in your own control as in a standard
8941 control -- which is a much better idea than hard coding specific
8942 colours or fonts which might look completely out of place on the
8943 user's system, especially if it uses themes.
8944
8945 The variant parameter is only relevant under Mac currently and is
8946 ignore under other platforms. Under Mac, it will change the size of
8947 the returned font. See `wx.Window.SetWindowVariant` for more about
8948 this.
8949 """
8950 return _core_.Control_GetClassDefaultAttributes(*args, **kwargs)
8951
8952 #---------------------------------------------------------------------------
8953
8954 class ItemContainer(object):
8955 """
8956 The wx.ItemContainer class defines an interface which is implemented
8957 by all controls which have string subitems, each of which may be
8958 selected, such as `wx.ListBox`, `wx.CheckListBox`, `wx.Choice` as well
8959 as `wx.ComboBox` which implements an extended interface deriving from
8960 this one.
8961
8962 It defines the methods for accessing the control's items and although
8963 each of the derived classes implements them differently, they still
8964 all conform to the same interface.
8965
8966 The items in a wx.ItemContainer have (non empty) string labels and,
8967 optionally, client data associated with them.
8968
8969 """
8970 def __init__(self): raise RuntimeError, "No constructor defined"
8971 def __repr__(self):
8972 return "<%s.%s; proxy of C++ wxItemContainer instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
8973 def Append(*args, **kwargs):
8974 """
8975 Append(self, String item, PyObject clientData=None) -> int
8976
8977 Adds the item to the control, associating the given data with the item
8978 if not None. The return value is the index of the newly added item
8979 which may be different from the last one if the control is sorted (e.g.
8980 has wx.LB_SORT or wx.CB_SORT style).
8981 """
8982 return _core_.ItemContainer_Append(*args, **kwargs)
8983
8984 def AppendItems(*args, **kwargs):
8985 """
8986 AppendItems(self, List strings)
8987
8988 Apend several items at once to the control. Notice that calling this
8989 method may be much faster than appending the items one by one if you
8990 need to add a lot of items.
8991 """
8992 return _core_.ItemContainer_AppendItems(*args, **kwargs)
8993
8994 def Insert(*args, **kwargs):
8995 """
8996 Insert(self, String item, int pos, PyObject clientData=None) -> int
8997
8998 Insert an item into the control before the item at the ``pos`` index,
8999 optionally associating some data object with the item.
9000 """
9001 return _core_.ItemContainer_Insert(*args, **kwargs)
9002
9003 def Clear(*args, **kwargs):
9004 """
9005 Clear(self)
9006
9007 Removes all items from the control.
9008 """
9009 return _core_.ItemContainer_Clear(*args, **kwargs)
9010
9011 def Delete(*args, **kwargs):
9012 """
9013 Delete(self, int n)
9014
9015 Deletes the item at the zero-based index 'n' from the control. Note
9016 that it is an error (signalled by a `wx.PyAssertionError` exception if
9017 enabled) to remove an item with the index negative or greater or equal
9018 than the number of items in the control.
9019 """
9020 return _core_.ItemContainer_Delete(*args, **kwargs)
9021
9022 def GetClientData(*args, **kwargs):
9023 """
9024 GetClientData(self, int n) -> PyObject
9025
9026 Returns the client data associated with the given item, (if any.)
9027 """
9028 return _core_.ItemContainer_GetClientData(*args, **kwargs)
9029
9030 def SetClientData(*args, **kwargs):
9031 """
9032 SetClientData(self, int n, PyObject clientData)
9033
9034 Associate the given client data with the item at position n.
9035 """
9036 return _core_.ItemContainer_SetClientData(*args, **kwargs)
9037
9038 def GetCount(*args, **kwargs):
9039 """
9040 GetCount(self) -> int
9041
9042 Returns the number of items in the control.
9043 """
9044 return _core_.ItemContainer_GetCount(*args, **kwargs)
9045
9046 def IsEmpty(*args, **kwargs):
9047 """
9048 IsEmpty(self) -> bool
9049
9050 Returns True if the control is empty or False if it has some items.
9051 """
9052 return _core_.ItemContainer_IsEmpty(*args, **kwargs)
9053
9054 def GetString(*args, **kwargs):
9055 """
9056 GetString(self, int n) -> String
9057
9058 Returns the label of the item with the given index.
9059 """
9060 return _core_.ItemContainer_GetString(*args, **kwargs)
9061
9062 def GetStrings(*args, **kwargs):
9063 """GetStrings(self) -> wxArrayString"""
9064 return _core_.ItemContainer_GetStrings(*args, **kwargs)
9065
9066 def SetString(*args, **kwargs):
9067 """
9068 SetString(self, int n, String s)
9069
9070 Sets the label for the given item.
9071 """
9072 return _core_.ItemContainer_SetString(*args, **kwargs)
9073
9074 def FindString(*args, **kwargs):
9075 """
9076 FindString(self, String s) -> int
9077
9078 Finds an item whose label matches the given string. Returns the
9079 zero-based position of the item, or ``wx.NOT_FOUND`` if the string was not
9080 found.
9081 """
9082 return _core_.ItemContainer_FindString(*args, **kwargs)
9083
9084 def SetSelection(*args, **kwargs):
9085 """
9086 SetSelection(self, int n)
9087
9088 Sets the item at index 'n' to be the selected item.
9089 """
9090 return _core_.ItemContainer_SetSelection(*args, **kwargs)
9091
9092 def GetSelection(*args, **kwargs):
9093 """
9094 GetSelection(self) -> int
9095
9096 Returns the index of the selected item or ``wx.NOT_FOUND`` if no item
9097 is selected.
9098 """
9099 return _core_.ItemContainer_GetSelection(*args, **kwargs)
9100
9101 def SetStringSelection(*args, **kwargs):
9102 """SetStringSelection(self, String s) -> bool"""
9103 return _core_.ItemContainer_SetStringSelection(*args, **kwargs)
9104
9105 def GetStringSelection(*args, **kwargs):
9106 """
9107 GetStringSelection(self) -> String
9108
9109 Returns the label of the selected item or an empty string if no item
9110 is selected.
9111 """
9112 return _core_.ItemContainer_GetStringSelection(*args, **kwargs)
9113
9114 def Select(*args, **kwargs):
9115 """
9116 Select(self, int n)
9117
9118 This is the same as `SetSelection` and exists only because it is
9119 slightly more natural for controls which support multiple selection.
9120 """
9121 return _core_.ItemContainer_Select(*args, **kwargs)
9122
9123
9124 class ItemContainerPtr(ItemContainer):
9125 def __init__(self, this):
9126 self.this = this
9127 if not hasattr(self,"thisown"): self.thisown = 0
9128 self.__class__ = ItemContainer
9129 _core_.ItemContainer_swigregister(ItemContainerPtr)
9130
9131 #---------------------------------------------------------------------------
9132
9133 class ControlWithItems(Control,ItemContainer):
9134 """
9135 wx.ControlWithItems combines the ``wx.ItemContainer`` class with the
9136 wx.Control class, and is used for the base class of various controls
9137 that have items.
9138 """
9139 def __init__(self): raise RuntimeError, "No constructor defined"
9140 def __repr__(self):
9141 return "<%s.%s; proxy of C++ wxControlWithItems instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
9142
9143 class ControlWithItemsPtr(ControlWithItems):
9144 def __init__(self, this):
9145 self.this = this
9146 if not hasattr(self,"thisown"): self.thisown = 0
9147 self.__class__ = ControlWithItems
9148 _core_.ControlWithItems_swigregister(ControlWithItemsPtr)
9149
9150 #---------------------------------------------------------------------------
9151
9152 class SizerItem(Object):
9153 """
9154 The wx.SizerItem class is used to track the position, size and other
9155 attributes of each item managed by a `wx.Sizer`. In normal usage user
9156 code should never need to deal directly with a wx.SizerItem, but
9157 custom classes derived from `wx.PySizer` will probably need to use the
9158 collection of wx.SizerItems held by wx.Sizer when calculating layout.
9159
9160 :see: `wx.Sizer`, `wx.GBSizerItem`
9161 """
9162 def __repr__(self):
9163 return "<%s.%s; proxy of C++ wxSizerItem instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
9164 def __init__(self, *args, **kwargs):
9165 """
9166 __init__(self) -> SizerItem
9167
9168 Constructs an empty wx.SizerItem. Either a window, sizer or spacer
9169 size will need to be set before this item can be used in a Sizer.
9170
9171 You will probably never need to create a wx.SizerItem directly as they
9172 are created automatically when the sizer's Add, Insert or Prepend
9173 methods are called.
9174
9175 :see: `wx.SizerItemSpacer`, `wx.SizerItemWindow`, `wx.SizerItemSizer`
9176 """
9177 newobj = _core_.new_SizerItem(*args, **kwargs)
9178 self.this = newobj.this
9179 self.thisown = 1
9180 del newobj.thisown
9181 def DeleteWindows(*args, **kwargs):
9182 """
9183 DeleteWindows(self)
9184
9185 Destroy the window or the windows in a subsizer, depending on the type
9186 of item.
9187 """
9188 return _core_.SizerItem_DeleteWindows(*args, **kwargs)
9189
9190 def DetachSizer(*args, **kwargs):
9191 """
9192 DetachSizer(self)
9193
9194 Enable deleting the SizerItem without destroying the contained sizer.
9195 """
9196 return _core_.SizerItem_DetachSizer(*args, **kwargs)
9197
9198 def GetSize(*args, **kwargs):
9199 """
9200 GetSize(self) -> Size
9201
9202 Get the current size of the item, as set in the last Layout.
9203 """
9204 return _core_.SizerItem_GetSize(*args, **kwargs)
9205
9206 def CalcMin(*args, **kwargs):
9207 """
9208 CalcMin(self) -> Size
9209
9210 Calculates the minimum desired size for the item, including any space
9211 needed by borders.
9212 """
9213 return _core_.SizerItem_CalcMin(*args, **kwargs)
9214
9215 def SetDimension(*args, **kwargs):
9216 """
9217 SetDimension(self, Point pos, Size size)
9218
9219 Set the position and size of the space allocated for this item by the
9220 sizer, and adjust the position and size of the item (window or
9221 subsizer) to be within that space taking alignment and borders into
9222 account.
9223 """
9224 return _core_.SizerItem_SetDimension(*args, **kwargs)
9225
9226 def GetMinSize(*args, **kwargs):
9227 """
9228 GetMinSize(self) -> Size
9229
9230 Get the minimum size needed for the item.
9231 """
9232 return _core_.SizerItem_GetMinSize(*args, **kwargs)
9233
9234 def GetMinSizeWithBorder(*args, **kwargs):
9235 """
9236 GetMinSizeWithBorder(self) -> Size
9237
9238 Get the minimum size needed for the item with space for the borders
9239 added, if needed.
9240 """
9241 return _core_.SizerItem_GetMinSizeWithBorder(*args, **kwargs)
9242
9243 def SetInitSize(*args, **kwargs):
9244 """SetInitSize(self, int x, int y)"""
9245 return _core_.SizerItem_SetInitSize(*args, **kwargs)
9246
9247 def SetRatioWH(*args, **kwargs):
9248 """
9249 SetRatioWH(self, int width, int height)
9250
9251 Set the ratio item attribute.
9252 """
9253 return _core_.SizerItem_SetRatioWH(*args, **kwargs)
9254
9255 def SetRatioSize(*args, **kwargs):
9256 """
9257 SetRatioSize(self, Size size)
9258
9259 Set the ratio item attribute.
9260 """
9261 return _core_.SizerItem_SetRatioSize(*args, **kwargs)
9262
9263 def SetRatio(*args, **kwargs):
9264 """
9265 SetRatio(self, float ratio)
9266
9267 Set the ratio item attribute.
9268 """
9269 return _core_.SizerItem_SetRatio(*args, **kwargs)
9270
9271 def GetRatio(*args, **kwargs):
9272 """
9273 GetRatio(self) -> float
9274
9275 Set the ratio item attribute.
9276 """
9277 return _core_.SizerItem_GetRatio(*args, **kwargs)
9278
9279 def GetRect(*args, **kwargs):
9280 """
9281 GetRect(self) -> Rect
9282
9283 Returns the rectangle that the sizer item should occupy
9284 """
9285 return _core_.SizerItem_GetRect(*args, **kwargs)
9286
9287 def IsWindow(*args, **kwargs):
9288 """
9289 IsWindow(self) -> bool
9290
9291 Is this sizer item a window?
9292 """
9293 return _core_.SizerItem_IsWindow(*args, **kwargs)
9294
9295 def IsSizer(*args, **kwargs):
9296 """
9297 IsSizer(self) -> bool
9298
9299 Is this sizer item a subsizer?
9300 """
9301 return _core_.SizerItem_IsSizer(*args, **kwargs)
9302
9303 def IsSpacer(*args, **kwargs):
9304 """
9305 IsSpacer(self) -> bool
9306
9307 Is this sizer item a spacer?
9308 """
9309 return _core_.SizerItem_IsSpacer(*args, **kwargs)
9310
9311 def SetProportion(*args, **kwargs):
9312 """
9313 SetProportion(self, int proportion)
9314
9315 Set the proportion value for this item.
9316 """
9317 return _core_.SizerItem_SetProportion(*args, **kwargs)
9318
9319 def GetProportion(*args, **kwargs):
9320 """
9321 GetProportion(self) -> int
9322
9323 Get the proportion value for this item.
9324 """
9325 return _core_.SizerItem_GetProportion(*args, **kwargs)
9326
9327 SetOption = wx._deprecated(SetProportion, "Please use `SetProportion` instead.")
9328 GetOption = wx._deprecated(GetProportion, "Please use `GetProportion` instead.")
9329 def SetFlag(*args, **kwargs):
9330 """
9331 SetFlag(self, int flag)
9332
9333 Set the flag value for this item.
9334 """
9335 return _core_.SizerItem_SetFlag(*args, **kwargs)
9336
9337 def GetFlag(*args, **kwargs):
9338 """
9339 GetFlag(self) -> int
9340
9341 Get the flag value for this item.
9342 """
9343 return _core_.SizerItem_GetFlag(*args, **kwargs)
9344
9345 def SetBorder(*args, **kwargs):
9346 """
9347 SetBorder(self, int border)
9348
9349 Set the border value for this item.
9350 """
9351 return _core_.SizerItem_SetBorder(*args, **kwargs)
9352
9353 def GetBorder(*args, **kwargs):
9354 """
9355 GetBorder(self) -> int
9356
9357 Get the border value for this item.
9358 """
9359 return _core_.SizerItem_GetBorder(*args, **kwargs)
9360
9361 def GetWindow(*args, **kwargs):
9362 """
9363 GetWindow(self) -> Window
9364
9365 Get the window (if any) that is managed by this sizer item.
9366 """
9367 return _core_.SizerItem_GetWindow(*args, **kwargs)
9368
9369 def SetWindow(*args, **kwargs):
9370 """
9371 SetWindow(self, Window window)
9372
9373 Set the window to be managed by this sizer item.
9374 """
9375 return _core_.SizerItem_SetWindow(*args, **kwargs)
9376
9377 def GetSizer(*args, **kwargs):
9378 """
9379 GetSizer(self) -> Sizer
9380
9381 Get the subsizer (if any) that is managed by this sizer item.
9382 """
9383 return _core_.SizerItem_GetSizer(*args, **kwargs)
9384
9385 def SetSizer(*args, **kwargs):
9386 """
9387 SetSizer(self, Sizer sizer)
9388
9389 Set the subsizer to be managed by this sizer item.
9390 """
9391 return _core_.SizerItem_SetSizer(*args, **kwargs)
9392
9393 def GetSpacer(*args, **kwargs):
9394 """
9395 GetSpacer(self) -> Size
9396
9397 Get the size of the spacer managed by this sizer item.
9398 """
9399 return _core_.SizerItem_GetSpacer(*args, **kwargs)
9400
9401 def SetSpacer(*args, **kwargs):
9402 """
9403 SetSpacer(self, Size size)
9404
9405 Set the size of the spacer to be managed by this sizer item.
9406 """
9407 return _core_.SizerItem_SetSpacer(*args, **kwargs)
9408
9409 def Show(*args, **kwargs):
9410 """
9411 Show(self, bool show)
9412
9413 Set the show item attribute, which sizers use to determine if the item
9414 is to be made part of the layout or not. If the item is tracking a
9415 window then it is shown or hidden as needed.
9416 """
9417 return _core_.SizerItem_Show(*args, **kwargs)
9418
9419 def IsShown(*args, **kwargs):
9420 """
9421 IsShown(self) -> bool
9422
9423 Is the item to be shown in the layout?
9424 """
9425 return _core_.SizerItem_IsShown(*args, **kwargs)
9426
9427 def GetPosition(*args, **kwargs):
9428 """
9429 GetPosition(self) -> Point
9430
9431 Returns the current position of the item, as set in the last Layout.
9432 """
9433 return _core_.SizerItem_GetPosition(*args, **kwargs)
9434
9435 def GetUserData(*args, **kwargs):
9436 """
9437 GetUserData(self) -> PyObject
9438
9439 Returns the userData associated with this sizer item, or None if there
9440 isn't any.
9441 """
9442 return _core_.SizerItem_GetUserData(*args, **kwargs)
9443
9444
9445 class SizerItemPtr(SizerItem):
9446 def __init__(self, this):
9447 self.this = this
9448 if not hasattr(self,"thisown"): self.thisown = 0
9449 self.__class__ = SizerItem
9450 _core_.SizerItem_swigregister(SizerItemPtr)
9451
9452 def SizerItemWindow(*args, **kwargs):
9453 """
9454 SizerItemWindow(Window window, int proportion, int flag, int border,
9455 PyObject userData=None) -> SizerItem
9456
9457 Constructs a `wx.SizerItem` for tracking a window.
9458 """
9459 val = _core_.new_SizerItemWindow(*args, **kwargs)
9460 val.thisown = 1
9461 return val
9462
9463 def SizerItemSpacer(*args, **kwargs):
9464 """
9465 SizerItemSpacer(int width, int height, int proportion, int flag, int border,
9466 PyObject userData=None) -> SizerItem
9467
9468 Constructs a `wx.SizerItem` for tracking a spacer.
9469 """
9470 val = _core_.new_SizerItemSpacer(*args, **kwargs)
9471 val.thisown = 1
9472 return val
9473
9474 def SizerItemSizer(*args, **kwargs):
9475 """
9476 SizerItemSizer(Sizer sizer, int proportion, int flag, int border,
9477 PyObject userData=None) -> SizerItem
9478
9479 Constructs a `wx.SizerItem` for tracking a subsizer
9480 """
9481 val = _core_.new_SizerItemSizer(*args, **kwargs)
9482 val.thisown = 1
9483 return val
9484
9485 class Sizer(Object):
9486 """
9487 wx.Sizer is the abstract base class used for laying out subwindows in
9488 a window. You cannot use wx.Sizer directly; instead, you will have to
9489 use one of the sizer classes derived from it such as `wx.BoxSizer`,
9490 `wx.StaticBoxSizer`, `wx.NotebookSizer`, `wx.GridSizer`, `wx.FlexGridSizer`
9491 and `wx.GridBagSizer`.
9492
9493 The concept implemented by sizers in wxWidgets is closely related to
9494 layout tools in other GUI toolkits, such as Java's AWT, the GTK
9495 toolkit or the Qt toolkit. It is based upon the idea of the individual
9496 subwindows reporting their minimal required size and their ability to
9497 get stretched if the size of the parent window has changed. This will
9498 most often mean that the programmer does not set the original size of
9499 a dialog in the beginning, rather the dialog will assigned a sizer and
9500 this sizer will be queried about the recommended size. The sizer in
9501 turn will query its children, which can be normal windows or contorls,
9502 empty space or other sizers, so that a hierarchy of sizers can be
9503 constructed. Note that wxSizer does not derive from wxWindow and thus
9504 do not interfere with tab ordering and requires very little resources
9505 compared to a real window on screen.
9506
9507 What makes sizers so well fitted for use in wxWidgets is the fact that
9508 every control reports its own minimal size and the algorithm can
9509 handle differences in font sizes or different window (dialog item)
9510 sizes on different platforms without problems. If for example the
9511 standard font as well as the overall design of Mac widgets requires
9512 more space than on Windows, then the initial size of a dialog using a
9513 sizer will automatically be bigger on Mac than on Windows.
9514 """
9515 def __init__(self): raise RuntimeError, "No constructor defined"
9516 def __repr__(self):
9517 return "<%s.%s; proxy of C++ wxSizer instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
9518 def _setOORInfo(*args, **kwargs):
9519 """_setOORInfo(self, PyObject _self)"""
9520 return _core_.Sizer__setOORInfo(*args, **kwargs)
9521
9522 def Add(*args, **kwargs):
9523 """
9524 Add(self, item, int proportion=0, int flag=0, int border=0,
9525 PyObject userData=None) -> wx.SizerItem
9526
9527 Appends a child item to the sizer.
9528 """
9529 return _core_.Sizer_Add(*args, **kwargs)
9530
9531 def Insert(*args, **kwargs):
9532 """
9533 Insert(self, int before, item, int proportion=0, int flag=0, int border=0,
9534 PyObject userData=None) -> wx.SizerItem
9535
9536 Inserts a new item into the list of items managed by this sizer before
9537 the item at index *before*. See `Add` for a description of the parameters.
9538 """
9539 return _core_.Sizer_Insert(*args, **kwargs)
9540
9541 def Prepend(*args, **kwargs):
9542 """
9543 Prepend(self, item, int proportion=0, int flag=0, int border=0,
9544 PyObject userData=None) -> wx.SizerItem
9545
9546 Adds a new item to the begining of the list of sizer items managed by
9547 this sizer. See `Add` for a description of the parameters.
9548 """
9549 return _core_.Sizer_Prepend(*args, **kwargs)
9550
9551 def Remove(*args, **kwargs):
9552 """
9553 Remove(self, item) -> bool
9554
9555 Removes an item from the sizer and destroys it. This method does not
9556 cause any layout or resizing to take place, call `Layout` to update
9557 the layout on screen after removing a child from the sizer. The
9558 *item* parameter can be either a window, a sizer, or the zero-based
9559 index of an item to remove. Returns True if the child item was found
9560 and removed.
9561 """
9562 return _core_.Sizer_Remove(*args, **kwargs)
9563
9564 def Detach(*args, **kwargs):
9565 """
9566 Detach(self, item) -> bool
9567
9568 Detaches an item from the sizer without destroying it. This method
9569 does not cause any layout or resizing to take place, call `Layout` to
9570 do so. The *item* parameter can be either a window, a sizer, or the
9571 zero-based index of the item to be detached. Returns True if the child item
9572 was found and detached.
9573 """
9574 return _core_.Sizer_Detach(*args, **kwargs)
9575
9576 def GetItem(*args, **kwargs):
9577 """
9578 GetItem(self, item) -> wx.SizerItem
9579
9580 Returns the `wx.SizerItem` which holds the *item* given. The *item*
9581 parameter can be either a window, a sizer, or the zero-based index of
9582 the item to be detached.
9583 """
9584 return _core_.Sizer_GetItem(*args, **kwargs)
9585
9586 def _SetItemMinSize(*args, **kwargs):
9587 """_SetItemMinSize(self, PyObject item, Size size)"""
9588 return _core_.Sizer__SetItemMinSize(*args, **kwargs)
9589
9590 def SetItemMinSize(self, item, *args):
9591 """
9592 SetItemMinSize(self, item, Size size)
9593
9594 Sets the minimum size that will be allocated for an item in the sizer.
9595 The *item* parameter can be either a window, a sizer, or the
9596 zero-based index of the item. If a window or sizer is given then it
9597 will be searched for recursivly in subsizers if neccessary.
9598 """
9599 if len(args) == 2:
9600 # for backward compatibility accept separate width,height args too
9601 return self._SetItemMinSize(item, args)
9602 else:
9603 return self._SetItemMinSize(item, args[0])
9604
9605 def AddItem(*args, **kwargs):
9606 """
9607 AddItem(self, SizerItem item)
9608
9609 Adds a `wx.SizerItem` to the sizer.
9610 """
9611 return _core_.Sizer_AddItem(*args, **kwargs)
9612
9613 def InsertItem(*args, **kwargs):
9614 """
9615 InsertItem(self, int index, SizerItem item)
9616
9617 Inserts a `wx.SizerItem` to the sizer at the position given by *index*.
9618 """
9619 return _core_.Sizer_InsertItem(*args, **kwargs)
9620
9621 def PrependItem(*args, **kwargs):
9622 """
9623 PrependItem(self, SizerItem item)
9624
9625 Prepends a `wx.SizerItem` to the sizer.
9626 """
9627 return _core_.Sizer_PrependItem(*args, **kwargs)
9628
9629 def AddMany(self, items):
9630 """
9631 AddMany is a convenience method for adding several items
9632 to a sizer at one time. Simply pass it a list of tuples,
9633 where each tuple consists of the parameters that you
9634 would normally pass to the `Add` method.
9635 """
9636 for item in items:
9637 if type(item) != type(()) or (len(item) == 2 and type(item[0]) == type(1)):
9638 item = (item, )
9639 self.Add(*item)
9640
9641 # for backwards compatibility only, please do not use in new code
9642 def AddWindow(self, *args, **kw):
9643 """Compatibility alias for `Add`."""
9644 return self.Add(*args, **kw)
9645 def AddSizer(self, *args, **kw):
9646 """Compatibility alias for `Add`."""
9647 return self.Add(*args, **kw)
9648 def AddSpacer(self, *args, **kw):
9649 """Compatibility alias for `Add`."""
9650 return self.Add(*args, **kw)
9651
9652 def PrependWindow(self, *args, **kw):
9653 """Compatibility alias for `Prepend`."""
9654 return self.Prepend(*args, **kw)
9655 def PrependSizer(self, *args, **kw):
9656 """Compatibility alias for `Prepend`."""
9657 return self.Prepend(*args, **kw)
9658 def PrependSpacer(self, *args, **kw):
9659 """Compatibility alias for `Prepend`."""
9660 return self.Prepend(*args, **kw)
9661
9662 def InsertWindow(self, *args, **kw):
9663 """Compatibility alias for `Insert`."""
9664 return self.Insert(*args, **kw)
9665 def InsertSizer(self, *args, **kw):
9666 """Compatibility alias for `Insert`."""
9667 return self.Insert(*args, **kw)
9668 def InsertSpacer(self, *args, **kw):
9669 """Compatibility alias for `Insert`."""
9670 return self.Insert(*args, **kw)
9671
9672 def RemoveWindow(self, *args, **kw):
9673 """Compatibility alias for `Remove`."""
9674 return self.Remove(*args, **kw)
9675 def RemoveSizer(self, *args, **kw):
9676 """Compatibility alias for `Remove`."""
9677 return self.Remove(*args, **kw)
9678 def RemovePos(self, *args, **kw):
9679 """Compatibility alias for `Remove`."""
9680 return self.Remove(*args, **kw)
9681
9682
9683 def SetDimension(*args, **kwargs):
9684 """
9685 SetDimension(self, int x, int y, int width, int height)
9686
9687 Call this to force the sizer to take the given dimension and thus
9688 force the items owned by the sizer to resize themselves according to
9689 the rules defined by the parameter in the `Add`, `Insert` or `Prepend`
9690 methods.
9691 """
9692 return _core_.Sizer_SetDimension(*args, **kwargs)
9693
9694 def SetMinSize(*args, **kwargs):
9695 """
9696 SetMinSize(self, Size size)
9697
9698 Call this to give the sizer a minimal size. Normally, the sizer will
9699 calculate its minimal size based purely on how much space its children
9700 need. After calling this method `GetMinSize` will return either the
9701 minimal size as requested by its children or the minimal size set
9702 here, depending on which is bigger.
9703 """
9704 return _core_.Sizer_SetMinSize(*args, **kwargs)
9705
9706 def GetSize(*args, **kwargs):
9707 """
9708 GetSize(self) -> Size
9709
9710 Returns the current size of the space managed by the sizer.
9711 """
9712 return _core_.Sizer_GetSize(*args, **kwargs)
9713
9714 def GetPosition(*args, **kwargs):
9715 """
9716 GetPosition(self) -> Point
9717
9718 Returns the current position of the sizer's managed space.
9719 """
9720 return _core_.Sizer_GetPosition(*args, **kwargs)
9721
9722 def GetMinSize(*args, **kwargs):
9723 """
9724 GetMinSize(self) -> Size
9725
9726 Returns the minimal size of the sizer. This is either the combined
9727 minimal size of all the children and their borders or the minimal size
9728 set by SetMinSize, depending on which is bigger.
9729 """
9730 return _core_.Sizer_GetMinSize(*args, **kwargs)
9731
9732 def GetSizeTuple(self):
9733 return self.GetSize().Get()
9734 def GetPositionTuple(self):
9735 return self.GetPosition().Get()
9736 def GetMinSizeTuple(self):
9737 return self.GetMinSize().Get()
9738
9739 def RecalcSizes(*args, **kwargs):
9740 """
9741 RecalcSizes(self)
9742
9743 Using the sizes calculated by `CalcMin` reposition and resize all the
9744 items managed by this sizer. You should not need to call this directly as
9745 it is called by `Layout`.
9746 """
9747 return _core_.Sizer_RecalcSizes(*args, **kwargs)
9748
9749 def CalcMin(*args, **kwargs):
9750 """
9751 CalcMin(self) -> Size
9752
9753 This method is where the sizer will do the actual calculation of its
9754 children's minimal sizes. You should not need to call this directly as
9755 it is called by `Layout`.
9756 """
9757 return _core_.Sizer_CalcMin(*args, **kwargs)
9758
9759 def Layout(*args, **kwargs):
9760 """
9761 Layout(self)
9762
9763 This method will force the recalculation and layout of the items
9764 controlled by the sizer using the current space allocated to the
9765 sizer. Normally this is called automatically from the owning window's
9766 EVT_SIZE handler, but it is also useful to call it from user code when
9767 one of the items in a sizer change size, or items are added or
9768 removed.
9769 """
9770 return _core_.Sizer_Layout(*args, **kwargs)
9771
9772 def Fit(*args, **kwargs):
9773 """
9774 Fit(self, Window window) -> Size
9775
9776 Tell the sizer to resize the *window* to match the sizer's minimal
9777 size. This is commonly done in the constructor of the window itself in
9778 order to set its initial size to match the needs of the children as
9779 determined by the sizer. Returns the new size.
9780
9781 For a top level window this is the total window size, not the client size.
9782 """
9783 return _core_.Sizer_Fit(*args, **kwargs)
9784
9785 def FitInside(*args, **kwargs):
9786 """
9787 FitInside(self, Window window)
9788
9789 Tell the sizer to resize the *virtual size* of the *window* to match the
9790 sizer's minimal size. This will not alter the on screen size of the
9791 window, but may cause the addition/removal/alteration of scrollbars
9792 required to view the virtual area in windows which manage it.
9793
9794 :see: `wx.ScrolledWindow.SetScrollbars`, `SetVirtualSizeHints`
9795
9796 """
9797 return _core_.Sizer_FitInside(*args, **kwargs)
9798
9799 def SetSizeHints(*args, **kwargs):
9800 """
9801 SetSizeHints(self, Window window)
9802
9803 Tell the sizer to set (and `Fit`) the minimal size of the *window* to
9804 match the sizer's minimal size. This is commonly done in the
9805 constructor of the window itself if the window is resizable (as are
9806 many dialogs under Unix and frames on probably all platforms) in order
9807 to prevent the window from being sized smaller than the minimal size
9808 required by the sizer.
9809 """
9810 return _core_.Sizer_SetSizeHints(*args, **kwargs)
9811
9812 def SetVirtualSizeHints(*args, **kwargs):
9813 """
9814 SetVirtualSizeHints(self, Window window)
9815
9816 Tell the sizer to set the minimal size of the window virtual area to
9817 match the sizer's minimal size. For windows with managed scrollbars
9818 this will set them appropriately.
9819
9820 :see: `wx.ScrolledWindow.SetScrollbars`
9821
9822 """
9823 return _core_.Sizer_SetVirtualSizeHints(*args, **kwargs)
9824
9825 def Clear(*args, **kwargs):
9826 """
9827 Clear(self, bool deleteWindows=False)
9828
9829 Clear all items from the sizer, optionally destroying the window items
9830 as well.
9831 """
9832 return _core_.Sizer_Clear(*args, **kwargs)
9833
9834 def DeleteWindows(*args, **kwargs):
9835 """
9836 DeleteWindows(self)
9837
9838 Destroy all windows managed by the sizer.
9839 """
9840 return _core_.Sizer_DeleteWindows(*args, **kwargs)
9841
9842 def GetChildren(*args, **kwargs):
9843 """
9844 GetChildren(self) -> list
9845
9846 Returns a list of all the `wx.SizerItem` objects managed by the sizer.
9847 """
9848 return _core_.Sizer_GetChildren(*args, **kwargs)
9849
9850 def Show(*args, **kwargs):
9851 """
9852 Show(self, item, bool show=True, bool recursive=false) -> bool
9853
9854 Shows or hides an item managed by the sizer. To make a sizer item
9855 disappear or reappear, use Show followed by `Layout`. The *item*
9856 parameter can be either a window, a sizer, or the zero-based index of
9857 the item. Use the recursive parameter to show or hide an item in a
9858 subsizer. Returns True if the item was found.
9859 """
9860 return _core_.Sizer_Show(*args, **kwargs)
9861
9862 def IsShown(*args, **kwargs):
9863 """
9864 IsShown(self, item)
9865
9866 Determines if the item is currently shown. sizer. To make a sizer
9867 item disappear or reappear, use Show followed by `Layout`. The *item*
9868 parameter can be either a window, a sizer, or the zero-based index of
9869 the item.
9870 """
9871 return _core_.Sizer_IsShown(*args, **kwargs)
9872
9873 def Hide(self, item, recursive=False):
9874 """
9875 A convenience method for Show(item, False, recursive).
9876 """
9877 return self.Show(item, False, recursive)
9878
9879 def ShowItems(*args, **kwargs):
9880 """
9881 ShowItems(self, bool show)
9882
9883 Recursively call `wx.SizerItem.Show` on all sizer items.
9884 """
9885 return _core_.Sizer_ShowItems(*args, **kwargs)
9886
9887
9888 class SizerPtr(Sizer):
9889 def __init__(self, this):
9890 self.this = this
9891 if not hasattr(self,"thisown"): self.thisown = 0
9892 self.__class__ = Sizer
9893 _core_.Sizer_swigregister(SizerPtr)
9894
9895 class PySizer(Sizer):
9896 """
9897 wx.PySizer is a special version of `wx.Sizer` that has been
9898 instrumented to allow the C++ virtual methods to be overloaded in
9899 Python derived classes. You would derive from this class if you are
9900 wanting to implement a custom sizer in Python code. Simply implement
9901 `CalcMin` and `RecalcSizes` in the derived class and you're all set.
9902 For example::
9903
9904 class MySizer(wx.PySizer):
9905 def __init__(self):
9906 wx.PySizer.__init__(self)
9907
9908 def CalcMin(self):
9909 for item in self.GetChildren():
9910 # calculate the total minimum width and height needed
9911 # by all items in the sizer according to this sizer's
9912 # layout algorithm.
9913 ...
9914 return wx.Size(width, height)
9915
9916 def RecalcSizes(self):
9917 # find the space allotted to this sizer
9918 pos = self.GetPosition()
9919 size = self.GetSize()
9920 for item in self.GetChildren():
9921 # Recalculate (if necessary) the position and size of
9922 # each item and then call item.SetDimension to do the
9923 # actual positioning and sizing of the items within the
9924 # space alloted to this sizer.
9925 ...
9926 item.SetDimension(itemPos, itemSize)
9927
9928
9929 When `Layout` is called it first calls `CalcMin` followed by
9930 `RecalcSizes` so you can optimize a bit by saving the results of
9931 `CalcMin` and reusing them in `RecalcSizes`.
9932
9933 :see: `wx.SizerItem`, `wx.Sizer.GetChildren`
9934
9935
9936 """
9937 def __repr__(self):
9938 return "<%s.%s; proxy of C++ wxPySizer instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
9939 def __init__(self, *args, **kwargs):
9940 """
9941 __init__(self) -> PySizer
9942
9943 Creates a wx.PySizer. Must be called from the __init__ in the derived
9944 class.
9945 """
9946 newobj = _core_.new_PySizer(*args, **kwargs)
9947 self.this = newobj.this
9948 self.thisown = 1
9949 del newobj.thisown
9950 self._setCallbackInfo(self, PySizer);self._setOORInfo(self)
9951
9952 def _setCallbackInfo(*args, **kwargs):
9953 """_setCallbackInfo(self, PyObject self, PyObject _class)"""
9954 return _core_.PySizer__setCallbackInfo(*args, **kwargs)
9955
9956
9957 class PySizerPtr(PySizer):
9958 def __init__(self, this):
9959 self.this = this
9960 if not hasattr(self,"thisown"): self.thisown = 0
9961 self.__class__ = PySizer
9962 _core_.PySizer_swigregister(PySizerPtr)
9963
9964 #---------------------------------------------------------------------------
9965
9966 class BoxSizer(Sizer):
9967 """
9968 The basic idea behind a box sizer is that windows will most often be
9969 laid out in rather simple basic geometry, typically in a row or a
9970 column or nested hierarchies of either. A wx.BoxSizer will lay out
9971 its items in a simple row or column, depending on the orientation
9972 parameter passed to the constructor.
9973 """
9974 def __repr__(self):
9975 return "<%s.%s; proxy of C++ wxBoxSizer instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
9976 def __init__(self, *args, **kwargs):
9977 """
9978 __init__(self, int orient=HORIZONTAL) -> BoxSizer
9979
9980 Constructor for a wx.BoxSizer. *orient* may be one of ``wx.VERTICAL``
9981 or ``wx.HORIZONTAL`` for creating either a column sizer or a row
9982 sizer.
9983 """
9984 newobj = _core_.new_BoxSizer(*args, **kwargs)
9985 self.this = newobj.this
9986 self.thisown = 1
9987 del newobj.thisown
9988 self._setOORInfo(self)
9989
9990 def GetOrientation(*args, **kwargs):
9991 """
9992 GetOrientation(self) -> int
9993
9994 Returns the current orientation of the sizer.
9995 """
9996 return _core_.BoxSizer_GetOrientation(*args, **kwargs)
9997
9998 def SetOrientation(*args, **kwargs):
9999 """
10000 SetOrientation(self, int orient)
10001
10002 Resets the orientation of the sizer.
10003 """
10004 return _core_.BoxSizer_SetOrientation(*args, **kwargs)
10005
10006
10007 class BoxSizerPtr(BoxSizer):
10008 def __init__(self, this):
10009 self.this = this
10010 if not hasattr(self,"thisown"): self.thisown = 0
10011 self.__class__ = BoxSizer
10012 _core_.BoxSizer_swigregister(BoxSizerPtr)
10013
10014 #---------------------------------------------------------------------------
10015
10016 class StaticBoxSizer(BoxSizer):
10017 """
10018 wx.StaticBoxSizer derives from and functions identically to the
10019 `wx.BoxSizer` and adds a `wx.StaticBox` around the items that the sizer
10020 manages. Note that this static box must be created separately and
10021 passed to the sizer constructor.
10022 """
10023 def __repr__(self):
10024 return "<%s.%s; proxy of C++ wxStaticBoxSizer instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
10025 def __init__(self, *args, **kwargs):
10026 """
10027 __init__(self, StaticBox box, int orient=HORIZONTAL) -> StaticBoxSizer
10028
10029 Constructor. It takes an associated static box and the orientation
10030 *orient* as parameters - orient can be either of ``wx.VERTICAL`` or
10031 ``wx.HORIZONTAL``.
10032 """
10033 newobj = _core_.new_StaticBoxSizer(*args, **kwargs)
10034 self.this = newobj.this
10035 self.thisown = 1
10036 del newobj.thisown
10037 self._setOORInfo(self)
10038
10039 def GetStaticBox(*args, **kwargs):
10040 """
10041 GetStaticBox(self) -> StaticBox
10042
10043 Returns the static box associated with this sizer.
10044 """
10045 return _core_.StaticBoxSizer_GetStaticBox(*args, **kwargs)
10046
10047
10048 class StaticBoxSizerPtr(StaticBoxSizer):
10049 def __init__(self, this):
10050 self.this = this
10051 if not hasattr(self,"thisown"): self.thisown = 0
10052 self.__class__ = StaticBoxSizer
10053 _core_.StaticBoxSizer_swigregister(StaticBoxSizerPtr)
10054
10055 #---------------------------------------------------------------------------
10056
10057 class GridSizer(Sizer):
10058 """
10059 A grid sizer is a sizer which lays out its children in a
10060 two-dimensional table with all cells having the same size. In other
10061 words, the width of each cell within the grid is the width of the
10062 widest item added to the sizer and the height of each grid cell is the
10063 height of the tallest item. An optional vertical and/or horizontal
10064 gap between items can also be specified (in pixels.)
10065
10066 Items are placed in the cells of the grid in the order they are added,
10067 in row-major order. In other words, the first row is filled first,
10068 then the second, and so on until all items have been added. (If
10069 neccessary, additional rows will be added as items are added.) If you
10070 need to have greater control over the cells that items are placed in
10071 then use the `wx.GridBagSizer`.
10072
10073 """
10074 def __repr__(self):
10075 return "<%s.%s; proxy of C++ wxGridSizer instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
10076 def __init__(self, *args, **kwargs):
10077 """
10078 __init__(self, int rows=1, int cols=0, int vgap=0, int hgap=0) -> GridSizer
10079
10080 Constructor for a wx.GridSizer. *rows* and *cols* determine the number
10081 of columns and rows in the sizer - if either of the parameters is
10082 zero, it will be calculated to from the total number of children in
10083 the sizer, thus making the sizer grow dynamically. *vgap* and *hgap*
10084 define extra space between all children.
10085 """
10086 newobj = _core_.new_GridSizer(*args, **kwargs)
10087 self.this = newobj.this
10088 self.thisown = 1
10089 del newobj.thisown
10090 self._setOORInfo(self)
10091
10092 def SetCols(*args, **kwargs):
10093 """
10094 SetCols(self, int cols)
10095
10096 Sets the number of columns in the sizer.
10097 """
10098 return _core_.GridSizer_SetCols(*args, **kwargs)
10099
10100 def SetRows(*args, **kwargs):
10101 """
10102 SetRows(self, int rows)
10103
10104 Sets the number of rows in the sizer.
10105 """
10106 return _core_.GridSizer_SetRows(*args, **kwargs)
10107
10108 def SetVGap(*args, **kwargs):
10109 """
10110 SetVGap(self, int gap)
10111
10112 Sets the vertical gap (in pixels) between the cells in the sizer.
10113 """
10114 return _core_.GridSizer_SetVGap(*args, **kwargs)
10115
10116 def SetHGap(*args, **kwargs):
10117 """
10118 SetHGap(self, int gap)
10119
10120 Sets the horizontal gap (in pixels) between cells in the sizer
10121 """
10122 return _core_.GridSizer_SetHGap(*args, **kwargs)
10123
10124 def GetCols(*args, **kwargs):
10125 """
10126 GetCols(self) -> int
10127
10128 Returns the number of columns in the sizer.
10129 """
10130 return _core_.GridSizer_GetCols(*args, **kwargs)
10131
10132 def GetRows(*args, **kwargs):
10133 """
10134 GetRows(self) -> int
10135
10136 Returns the number of rows in the sizer.
10137 """
10138 return _core_.GridSizer_GetRows(*args, **kwargs)
10139
10140 def GetVGap(*args, **kwargs):
10141 """
10142 GetVGap(self) -> int
10143
10144 Returns the vertical gap (in pixels) between the cells in the sizer.
10145 """
10146 return _core_.GridSizer_GetVGap(*args, **kwargs)
10147
10148 def GetHGap(*args, **kwargs):
10149 """
10150 GetHGap(self) -> int
10151
10152 Returns the horizontal gap (in pixels) between cells in the sizer.
10153 """
10154 return _core_.GridSizer_GetHGap(*args, **kwargs)
10155
10156
10157 class GridSizerPtr(GridSizer):
10158 def __init__(self, this):
10159 self.this = this
10160 if not hasattr(self,"thisown"): self.thisown = 0
10161 self.__class__ = GridSizer
10162 _core_.GridSizer_swigregister(GridSizerPtr)
10163
10164 #---------------------------------------------------------------------------
10165
10166 FLEX_GROWMODE_NONE = _core_.FLEX_GROWMODE_NONE
10167 FLEX_GROWMODE_SPECIFIED = _core_.FLEX_GROWMODE_SPECIFIED
10168 FLEX_GROWMODE_ALL = _core_.FLEX_GROWMODE_ALL
10169 class FlexGridSizer(GridSizer):
10170 """
10171 A flex grid sizer is a sizer which lays out its children in a
10172 two-dimensional table with all table cells in one row having the same
10173 height and all cells in one column having the same width, but all
10174 rows or all columns are not necessarily the same height or width as in
10175 the `wx.GridSizer`.
10176
10177 wx.FlexGridSizer can also size items equally in one direction but
10178 unequally ("flexibly") in the other. If the sizer is only flexible
10179 in one direction (this can be changed using `SetFlexibleDirection`), it
10180 needs to be decided how the sizer should grow in the other ("non
10181 flexible") direction in order to fill the available space. The
10182 `SetNonFlexibleGrowMode` method serves this purpose.
10183
10184
10185 """
10186 def __repr__(self):
10187 return "<%s.%s; proxy of C++ wxFlexGridSizer instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
10188 def __init__(self, *args, **kwargs):
10189 """
10190 __init__(self, int rows=1, int cols=0, int vgap=0, int hgap=0) -> FlexGridSizer
10191
10192 Constructor for a wx.FlexGridSizer. *rows* and *cols* determine the
10193 number of columns and rows in the sizer - if either of the parameters
10194 is zero, it will be calculated to from the total number of children in
10195 the sizer, thus making the sizer grow dynamically. *vgap* and *hgap*
10196 define extra space between all children.
10197 """
10198 newobj = _core_.new_FlexGridSizer(*args, **kwargs)
10199 self.this = newobj.this
10200 self.thisown = 1
10201 del newobj.thisown
10202 self._setOORInfo(self)
10203
10204 def AddGrowableRow(*args, **kwargs):
10205 """
10206 AddGrowableRow(self, size_t idx, int proportion=0)
10207
10208 Specifies that row *idx* (starting from zero) should be grown if there
10209 is extra space available to the sizer.
10210
10211 The *proportion* parameter has the same meaning as the stretch factor
10212 for the box sizers except that if all proportions are 0, then all
10213 columns are resized equally (instead of not being resized at all).
10214 """
10215 return _core_.FlexGridSizer_AddGrowableRow(*args, **kwargs)
10216
10217 def RemoveGrowableRow(*args, **kwargs):
10218 """
10219 RemoveGrowableRow(self, size_t idx)
10220
10221 Specifies that row *idx* is no longer growable.
10222 """
10223 return _core_.FlexGridSizer_RemoveGrowableRow(*args, **kwargs)
10224
10225 def AddGrowableCol(*args, **kwargs):
10226 """
10227 AddGrowableCol(self, size_t idx, int proportion=0)
10228
10229 Specifies that column *idx* (starting from zero) should be grown if
10230 there is extra space available to the sizer.
10231
10232 The *proportion* parameter has the same meaning as the stretch factor
10233 for the box sizers except that if all proportions are 0, then all
10234 columns are resized equally (instead of not being resized at all).
10235 """
10236 return _core_.FlexGridSizer_AddGrowableCol(*args, **kwargs)
10237
10238 def RemoveGrowableCol(*args, **kwargs):
10239 """
10240 RemoveGrowableCol(self, size_t idx)
10241
10242 Specifies that column *idx* is no longer growable.
10243 """
10244 return _core_.FlexGridSizer_RemoveGrowableCol(*args, **kwargs)
10245
10246 def SetFlexibleDirection(*args, **kwargs):
10247 """
10248 SetFlexibleDirection(self, int direction)
10249
10250 Specifies whether the sizer should flexibly resize its columns, rows,
10251 or both. Argument *direction* can be one of the following values. Any
10252 other value is ignored.
10253
10254 ============== =======================================
10255 wx.VERTICAL Rows are flexibly sized.
10256 wx.HORIZONTAL Columns are flexibly sized.
10257 wx.BOTH Both rows and columns are flexibly sized
10258 (this is the default value).
10259 ============== =======================================
10260
10261 Note that this method does not trigger relayout.
10262
10263 """
10264 return _core_.FlexGridSizer_SetFlexibleDirection(*args, **kwargs)
10265
10266 def GetFlexibleDirection(*args, **kwargs):
10267 """
10268 GetFlexibleDirection(self) -> int
10269
10270 Returns a value that specifies whether the sizer
10271 flexibly resizes its columns, rows, or both (default).
10272
10273 :see: `SetFlexibleDirection`
10274 """
10275 return _core_.FlexGridSizer_GetFlexibleDirection(*args, **kwargs)
10276
10277 def SetNonFlexibleGrowMode(*args, **kwargs):
10278 """
10279 SetNonFlexibleGrowMode(self, int mode)
10280
10281 Specifies how the sizer should grow in the non-flexible direction if
10282 there is one (so `SetFlexibleDirection` must have been called
10283 previously). Argument *mode* can be one of the following values:
10284
10285 ========================== =================================================
10286 wx.FLEX_GROWMODE_NONE Sizer doesn't grow in the non flexible direction.
10287 wx.FLEX_GROWMODE_SPECIFIED Sizer honors growable columns/rows set with
10288 `AddGrowableCol` and `AddGrowableRow`. In this
10289 case equal sizing applies to minimum sizes of
10290 columns or rows (this is the default value).
10291 wx.FLEX_GROWMODE_ALL Sizer equally stretches all columns or rows in
10292 the non flexible direction, whether they are
10293 growable or not in the flexbile direction.
10294 ========================== =================================================
10295
10296 Note that this method does not trigger relayout.
10297
10298
10299 """
10300 return _core_.FlexGridSizer_SetNonFlexibleGrowMode(*args, **kwargs)
10301
10302 def GetNonFlexibleGrowMode(*args, **kwargs):
10303 """
10304 GetNonFlexibleGrowMode(self) -> int
10305
10306 Returns the value that specifies how the sizer grows in the
10307 non-flexible direction if there is one.
10308
10309 :see: `SetNonFlexibleGrowMode`
10310 """
10311 return _core_.FlexGridSizer_GetNonFlexibleGrowMode(*args, **kwargs)
10312
10313 def GetRowHeights(*args, **kwargs):
10314 """
10315 GetRowHeights(self) -> list
10316
10317 Returns a list of integers representing the heights of each of the
10318 rows in the sizer.
10319 """
10320 return _core_.FlexGridSizer_GetRowHeights(*args, **kwargs)
10321
10322 def GetColWidths(*args, **kwargs):
10323 """
10324 GetColWidths(self) -> list
10325
10326 Returns a list of integers representing the widths of each of the
10327 columns in the sizer.
10328 """
10329 return _core_.FlexGridSizer_GetColWidths(*args, **kwargs)
10330
10331
10332 class FlexGridSizerPtr(FlexGridSizer):
10333 def __init__(self, this):
10334 self.this = this
10335 if not hasattr(self,"thisown"): self.thisown = 0
10336 self.__class__ = FlexGridSizer
10337 _core_.FlexGridSizer_swigregister(FlexGridSizerPtr)
10338
10339 class StdDialogButtonSizer(BoxSizer):
10340 """
10341 A special sizer that knows how to order and position standard buttons
10342 in order to conform to the current platform's standards. You simply
10343 need to add each `wx.Button` to the sizer, and be sure to create the
10344 buttons using the standard ID's. Then call `Realize` and the sizer
10345 will take care of the rest.
10346
10347 """
10348 def __repr__(self):
10349 return "<%s.%s; proxy of C++ wxStdDialogButtonSizer instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
10350 def __init__(self, *args, **kwargs):
10351 """__init__(self) -> StdDialogButtonSizer"""
10352 newobj = _core_.new_StdDialogButtonSizer(*args, **kwargs)
10353 self.this = newobj.this
10354 self.thisown = 1
10355 del newobj.thisown
10356 def AddButton(*args, **kwargs):
10357 """
10358 AddButton(self, wxButton button)
10359
10360 Use this to add the buttons to this sizer. Do not use the `Add`
10361 method in the base class.
10362 """
10363 return _core_.StdDialogButtonSizer_AddButton(*args, **kwargs)
10364
10365 def Realize(*args, **kwargs):
10366 """
10367 Realize(self)
10368
10369 This funciton needs to be called after all the buttons have been added
10370 to the sizer. It will reorder them and position them in a platform
10371 specifc manner.
10372 """
10373 return _core_.StdDialogButtonSizer_Realize(*args, **kwargs)
10374
10375 def SetAffirmativeButton(*args, **kwargs):
10376 """SetAffirmativeButton(self, wxButton button)"""
10377 return _core_.StdDialogButtonSizer_SetAffirmativeButton(*args, **kwargs)
10378
10379 def SetNegativeButton(*args, **kwargs):
10380 """SetNegativeButton(self, wxButton button)"""
10381 return _core_.StdDialogButtonSizer_SetNegativeButton(*args, **kwargs)
10382
10383 def SetCancelButton(*args, **kwargs):
10384 """SetCancelButton(self, wxButton button)"""
10385 return _core_.StdDialogButtonSizer_SetCancelButton(*args, **kwargs)
10386
10387 def GetAffirmativeButton(*args, **kwargs):
10388 """GetAffirmativeButton(self) -> wxButton"""
10389 return _core_.StdDialogButtonSizer_GetAffirmativeButton(*args, **kwargs)
10390
10391 def GetApplyButton(*args, **kwargs):
10392 """GetApplyButton(self) -> wxButton"""
10393 return _core_.StdDialogButtonSizer_GetApplyButton(*args, **kwargs)
10394
10395 def GetNegativeButton(*args, **kwargs):
10396 """GetNegativeButton(self) -> wxButton"""
10397 return _core_.StdDialogButtonSizer_GetNegativeButton(*args, **kwargs)
10398
10399 def GetCancelButton(*args, **kwargs):
10400 """GetCancelButton(self) -> wxButton"""
10401 return _core_.StdDialogButtonSizer_GetCancelButton(*args, **kwargs)
10402
10403 def GetHelpButton(*args, **kwargs):
10404 """GetHelpButton(self) -> wxButton"""
10405 return _core_.StdDialogButtonSizer_GetHelpButton(*args, **kwargs)
10406
10407
10408 class StdDialogButtonSizerPtr(StdDialogButtonSizer):
10409 def __init__(self, this):
10410 self.this = this
10411 if not hasattr(self,"thisown"): self.thisown = 0
10412 self.__class__ = StdDialogButtonSizer
10413 _core_.StdDialogButtonSizer_swigregister(StdDialogButtonSizerPtr)
10414
10415 #---------------------------------------------------------------------------
10416
10417 class GBPosition(object):
10418 """
10419 This class represents the position of an item in a virtual grid of
10420 rows and columns managed by a `wx.GridBagSizer`. wxPython has
10421 typemaps that will automatically convert from a 2-element sequence of
10422 integers to a wx.GBPosition, so you can use the more pythonic
10423 representation of the position nearly transparently in Python code.
10424 """
10425 def __repr__(self):
10426 return "<%s.%s; proxy of C++ wxGBPosition instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
10427 def __init__(self, *args, **kwargs):
10428 """
10429 __init__(self, int row=0, int col=0) -> GBPosition
10430
10431 This class represents the position of an item in a virtual grid of
10432 rows and columns managed by a `wx.GridBagSizer`. wxPython has
10433 typemaps that will automatically convert from a 2-element sequence of
10434 integers to a wx.GBPosition, so you can use the more pythonic
10435 representation of the position nearly transparently in Python code.
10436 """
10437 newobj = _core_.new_GBPosition(*args, **kwargs)
10438 self.this = newobj.this
10439 self.thisown = 1
10440 del newobj.thisown
10441 def GetRow(*args, **kwargs):
10442 """GetRow(self) -> int"""
10443 return _core_.GBPosition_GetRow(*args, **kwargs)
10444
10445 def GetCol(*args, **kwargs):
10446 """GetCol(self) -> int"""
10447 return _core_.GBPosition_GetCol(*args, **kwargs)
10448
10449 def SetRow(*args, **kwargs):
10450 """SetRow(self, int row)"""
10451 return _core_.GBPosition_SetRow(*args, **kwargs)
10452
10453 def SetCol(*args, **kwargs):
10454 """SetCol(self, int col)"""
10455 return _core_.GBPosition_SetCol(*args, **kwargs)
10456
10457 def __eq__(*args, **kwargs):
10458 """__eq__(self, GBPosition other) -> bool"""
10459 return _core_.GBPosition___eq__(*args, **kwargs)
10460
10461 def __ne__(*args, **kwargs):
10462 """__ne__(self, GBPosition other) -> bool"""
10463 return _core_.GBPosition___ne__(*args, **kwargs)
10464
10465 def Set(*args, **kwargs):
10466 """Set(self, int row=0, int col=0)"""
10467 return _core_.GBPosition_Set(*args, **kwargs)
10468
10469 def Get(*args, **kwargs):
10470 """Get(self) -> PyObject"""
10471 return _core_.GBPosition_Get(*args, **kwargs)
10472
10473 asTuple = wx._deprecated(Get, "asTuple is deprecated, use `Get` instead")
10474 def __str__(self): return str(self.Get())
10475 def __repr__(self): return 'wx.GBPosition'+str(self.Get())
10476 def __len__(self): return len(self.Get())
10477 def __getitem__(self, index): return self.Get()[index]
10478 def __setitem__(self, index, val):
10479 if index == 0: self.SetRow(val)
10480 elif index == 1: self.SetCol(val)
10481 else: raise IndexError
10482 def __nonzero__(self): return self.Get() != (0,0)
10483 __safe_for_unpickling__ = True
10484 def __reduce__(self): return (wx.GBPosition, self.Get())
10485
10486 row = property(GetRow, SetRow)
10487 col = property(GetCol, SetCol)
10488
10489
10490 class GBPositionPtr(GBPosition):
10491 def __init__(self, this):
10492 self.this = this
10493 if not hasattr(self,"thisown"): self.thisown = 0
10494 self.__class__ = GBPosition
10495 _core_.GBPosition_swigregister(GBPositionPtr)
10496
10497 class GBSpan(object):
10498 """
10499 This class is used to hold the row and column spanning attributes of
10500 items in a `wx.GridBagSizer`. wxPython has typemaps that will
10501 automatically convert from a 2-element sequence of integers to a
10502 wx.GBSpan, so you can use the more pythonic representation of the span
10503 nearly transparently in Python code.
10504
10505 """
10506 def __repr__(self):
10507 return "<%s.%s; proxy of C++ wxGBSpan instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
10508 def __init__(self, *args, **kwargs):
10509 """
10510 __init__(self, int rowspan=1, int colspan=1) -> GBSpan
10511
10512 Construct a new wxGBSpan, optionally setting the rowspan and
10513 colspan. The default is (1,1). (Meaning that the item occupies one
10514 cell in each direction.
10515 """
10516 newobj = _core_.new_GBSpan(*args, **kwargs)
10517 self.this = newobj.this
10518 self.thisown = 1
10519 del newobj.thisown
10520 def GetRowspan(*args, **kwargs):
10521 """GetRowspan(self) -> int"""
10522 return _core_.GBSpan_GetRowspan(*args, **kwargs)
10523
10524 def GetColspan(*args, **kwargs):
10525 """GetColspan(self) -> int"""
10526 return _core_.GBSpan_GetColspan(*args, **kwargs)
10527
10528 def SetRowspan(*args, **kwargs):
10529 """SetRowspan(self, int rowspan)"""
10530 return _core_.GBSpan_SetRowspan(*args, **kwargs)
10531
10532 def SetColspan(*args, **kwargs):
10533 """SetColspan(self, int colspan)"""
10534 return _core_.GBSpan_SetColspan(*args, **kwargs)
10535
10536 def __eq__(*args, **kwargs):
10537 """__eq__(self, GBSpan other) -> bool"""
10538 return _core_.GBSpan___eq__(*args, **kwargs)
10539
10540 def __ne__(*args, **kwargs):
10541 """__ne__(self, GBSpan other) -> bool"""
10542 return _core_.GBSpan___ne__(*args, **kwargs)
10543
10544 def Set(*args, **kwargs):
10545 """Set(self, int rowspan=1, int colspan=1)"""
10546 return _core_.GBSpan_Set(*args, **kwargs)
10547
10548 def Get(*args, **kwargs):
10549 """Get(self) -> PyObject"""
10550 return _core_.GBSpan_Get(*args, **kwargs)
10551
10552 asTuple = wx._deprecated(Get, "asTuple is deprecated, use `Get` instead")
10553 def __str__(self): return str(self.Get())
10554 def __repr__(self): return 'wx.GBSpan'+str(self.Get())
10555 def __len__(self): return len(self.Get())
10556 def __getitem__(self, index): return self.Get()[index]
10557 def __setitem__(self, index, val):
10558 if index == 0: self.SetRowspan(val)
10559 elif index == 1: self.SetColspan(val)
10560 else: raise IndexError
10561 def __nonzero__(self): return self.Get() != (0,0)
10562 __safe_for_unpickling__ = True
10563 def __reduce__(self): return (wx.GBSpan, self.Get())
10564
10565 rowspan = property(GetRowspan, SetRowspan)
10566 colspan = property(GetColspan, SetColspan)
10567
10568
10569 class GBSpanPtr(GBSpan):
10570 def __init__(self, this):
10571 self.this = this
10572 if not hasattr(self,"thisown"): self.thisown = 0
10573 self.__class__ = GBSpan
10574 _core_.GBSpan_swigregister(GBSpanPtr)
10575
10576 class GBSizerItem(SizerItem):
10577 """
10578 The wx.GBSizerItem class is used to track the additional data about
10579 items in a `wx.GridBagSizer` such as the item's position in the grid
10580 and how many rows or columns it spans.
10581
10582 """
10583 def __repr__(self):
10584 return "<%s.%s; proxy of C++ wxGBSizerItem instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
10585 def __init__(self, *args, **kwargs):
10586 """
10587 __init__(self) -> GBSizerItem
10588
10589 Constructs an empty wx.GBSizerItem. Either a window, sizer or spacer
10590 size will need to be set, as well as a position and span before this
10591 item can be used in a Sizer.
10592
10593 You will probably never need to create a wx.GBSizerItem directly as they
10594 are created automatically when the sizer's Add method is called.
10595 """
10596 newobj = _core_.new_GBSizerItem(*args, **kwargs)
10597 self.this = newobj.this
10598 self.thisown = 1
10599 del newobj.thisown
10600 def GetPos(*args, **kwargs):
10601 """
10602 GetPos(self) -> GBPosition
10603
10604 Get the grid position of the item
10605 """
10606 return _core_.GBSizerItem_GetPos(*args, **kwargs)
10607
10608 def GetPosTuple(self): return self.GetPos().Get()
10609 def GetSpan(*args, **kwargs):
10610 """
10611 GetSpan(self) -> GBSpan
10612
10613 Get the row and column spanning of the item
10614 """
10615 return _core_.GBSizerItem_GetSpan(*args, **kwargs)
10616
10617 def GetSpanTuple(self): return self.GetSpan().Get()
10618 def SetPos(*args, **kwargs):
10619 """
10620 SetPos(self, GBPosition pos) -> bool
10621
10622 If the item is already a member of a sizer then first ensure that
10623 there is no other item that would intersect with this one at the new
10624 position, then set the new position. Returns True if the change is
10625 successful and after the next Layout() the item will be moved.
10626 """
10627 return _core_.GBSizerItem_SetPos(*args, **kwargs)
10628
10629 def SetSpan(*args, **kwargs):
10630 """
10631 SetSpan(self, GBSpan span) -> bool
10632
10633 If the item is already a member of a sizer then first ensure that
10634 there is no other item that would intersect with this one with its new
10635 spanning size, then set the new spanning. Returns True if the change
10636 is successful and after the next Layout() the item will be resized.
10637
10638 """
10639 return _core_.GBSizerItem_SetSpan(*args, **kwargs)
10640
10641 def Intersects(*args, **kwargs):
10642 """
10643 Intersects(self, GBSizerItem other) -> bool
10644
10645 Returns True if this item and the other item instersect.
10646 """
10647 return _core_.GBSizerItem_Intersects(*args, **kwargs)
10648
10649 def IntersectsPos(*args, **kwargs):
10650 """
10651 IntersectsPos(self, GBPosition pos, GBSpan span) -> bool
10652
10653 Returns True if the given pos/span would intersect with this item.
10654 """
10655 return _core_.GBSizerItem_IntersectsPos(*args, **kwargs)
10656
10657 def GetEndPos(*args, **kwargs):
10658 """
10659 GetEndPos(self) -> GBPosition
10660
10661 Get the row and column of the endpoint of this item.
10662 """
10663 return _core_.GBSizerItem_GetEndPos(*args, **kwargs)
10664
10665 def GetGBSizer(*args, **kwargs):
10666 """
10667 GetGBSizer(self) -> GridBagSizer
10668
10669 Get the sizer this item is a member of.
10670 """
10671 return _core_.GBSizerItem_GetGBSizer(*args, **kwargs)
10672
10673 def SetGBSizer(*args, **kwargs):
10674 """
10675 SetGBSizer(self, GridBagSizer sizer)
10676
10677 Set the sizer this item is a member of.
10678 """
10679 return _core_.GBSizerItem_SetGBSizer(*args, **kwargs)
10680
10681
10682 class GBSizerItemPtr(GBSizerItem):
10683 def __init__(self, this):
10684 self.this = this
10685 if not hasattr(self,"thisown"): self.thisown = 0
10686 self.__class__ = GBSizerItem
10687 _core_.GBSizerItem_swigregister(GBSizerItemPtr)
10688 DefaultSpan = cvar.DefaultSpan
10689
10690 def GBSizerItemWindow(*args, **kwargs):
10691 """
10692 GBSizerItemWindow(Window window, GBPosition pos, GBSpan span, int flag,
10693 int border, PyObject userData=None) -> GBSizerItem
10694
10695 Construct a `wx.GBSizerItem` for a window.
10696 """
10697 val = _core_.new_GBSizerItemWindow(*args, **kwargs)
10698 val.thisown = 1
10699 return val
10700
10701 def GBSizerItemSizer(*args, **kwargs):
10702 """
10703 GBSizerItemSizer(Sizer sizer, GBPosition pos, GBSpan span, int flag,
10704 int border, PyObject userData=None) -> GBSizerItem
10705
10706 Construct a `wx.GBSizerItem` for a sizer
10707 """
10708 val = _core_.new_GBSizerItemSizer(*args, **kwargs)
10709 val.thisown = 1
10710 return val
10711
10712 def GBSizerItemSpacer(*args, **kwargs):
10713 """
10714 GBSizerItemSpacer(int width, int height, GBPosition pos, GBSpan span,
10715 int flag, int border, PyObject userData=None) -> GBSizerItem
10716
10717 Construct a `wx.GBSizerItem` for a spacer.
10718 """
10719 val = _core_.new_GBSizerItemSpacer(*args, **kwargs)
10720 val.thisown = 1
10721 return val
10722
10723 class GridBagSizer(FlexGridSizer):
10724 """
10725 A `wx.Sizer` that can lay out items in a virtual grid like a
10726 `wx.FlexGridSizer` but in this case explicit positioning of the items
10727 is allowed using `wx.GBPosition`, and items can optionally span more
10728 than one row and/or column using `wx.GBSpan`. The total size of the
10729 virtual grid is determined by the largest row and column that items are
10730 positioned at, adjusted for spanning.
10731
10732 """
10733 def __repr__(self):
10734 return "<%s.%s; proxy of C++ wxGridBagSizer instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
10735 def __init__(self, *args, **kwargs):
10736 """
10737 __init__(self, int vgap=0, int hgap=0) -> GridBagSizer
10738
10739 Constructor, with optional parameters to specify the gap between the
10740 rows and columns.
10741 """
10742 newobj = _core_.new_GridBagSizer(*args, **kwargs)
10743 self.this = newobj.this
10744 self.thisown = 1
10745 del newobj.thisown
10746 self._setOORInfo(self)
10747
10748 def Add(*args, **kwargs):
10749 """
10750 Add(self, item, GBPosition pos, GBSpan span=DefaultSpan, int flag=0,
10751 int border=0, userData=None) -> wx.GBSizerItem
10752
10753 Adds an item to the sizer at the grid cell *pos*, optionally spanning
10754 more than one row or column as specified with *span*. The remaining
10755 args behave similarly to `wx.Sizer.Add`.
10756
10757 Returns True if the item was successfully placed at the given cell
10758 position, False if something was already there.
10759
10760 """
10761 return _core_.GridBagSizer_Add(*args, **kwargs)
10762
10763 def AddItem(*args, **kwargs):
10764 """
10765 Add(self, GBSizerItem item) -> wx.GBSizerItem
10766
10767 Add an item to the sizer using a `wx.GBSizerItem`. Returns True if
10768 the item was successfully placed at its given cell position, False if
10769 something was already there.
10770 """
10771 return _core_.GridBagSizer_AddItem(*args, **kwargs)
10772
10773 def GetCellSize(*args, **kwargs):
10774 """
10775 GetCellSize(self, int row, int col) -> Size
10776
10777 Get the size of the specified cell, including hgap and
10778 vgap. Only valid after a Layout.
10779 """
10780 return _core_.GridBagSizer_GetCellSize(*args, **kwargs)
10781
10782 def GetEmptyCellSize(*args, **kwargs):
10783 """
10784 GetEmptyCellSize(self) -> Size
10785
10786 Get the size used for cells in the grid with no item.
10787 """
10788 return _core_.GridBagSizer_GetEmptyCellSize(*args, **kwargs)
10789
10790 def SetEmptyCellSize(*args, **kwargs):
10791 """
10792 SetEmptyCellSize(self, Size sz)
10793
10794 Set the size used for cells in the grid with no item.
10795 """
10796 return _core_.GridBagSizer_SetEmptyCellSize(*args, **kwargs)
10797
10798 def GetItemPosition(*args):
10799 """
10800 GetItemPosition(self, item) -> GBPosition
10801
10802 Get the grid position of the specified *item* where *item* is either a
10803 window or subsizer that is a member of this sizer, or a zero-based
10804 index of an item.
10805 """
10806 return _core_.GridBagSizer_GetItemPosition(*args)
10807
10808 def SetItemPosition(*args):
10809 """
10810 SetItemPosition(self, item, GBPosition pos) -> bool
10811
10812 Set the grid position of the specified *item* where *item* is either a
10813 window or subsizer that is a member of this sizer, or a zero-based
10814 index of an item. Returns True on success. If the move is not
10815 allowed (because an item is already there) then False is returned.
10816
10817 """
10818 return _core_.GridBagSizer_SetItemPosition(*args)
10819
10820 def GetItemSpan(*args):
10821 """
10822 GetItemSpan(self, item) -> GBSpan
10823
10824 Get the row/col spanning of the specified *item* where *item* is
10825 either a window or subsizer that is a member of this sizer, or a
10826 zero-based index of an item.
10827 """
10828 return _core_.GridBagSizer_GetItemSpan(*args)
10829
10830 def SetItemSpan(*args):
10831 """
10832 SetItemSpan(self, item, GBSpan span) -> bool
10833
10834 Set the row/col spanning of the specified *item* where *item* is
10835 either a window or subsizer that is a member of this sizer, or a
10836 zero-based index of an item. Returns True on success. If the move is
10837 not allowed (because an item is already there) then False is returned.
10838 """
10839 return _core_.GridBagSizer_SetItemSpan(*args)
10840
10841 def FindItem(*args):
10842 """
10843 FindItem(self, item) -> GBSizerItem
10844
10845 Find the sizer item for the given window or subsizer, returns None if
10846 not found. (non-recursive)
10847 """
10848 return _core_.GridBagSizer_FindItem(*args)
10849
10850 def FindItemAtPosition(*args, **kwargs):
10851 """
10852 FindItemAtPosition(self, GBPosition pos) -> GBSizerItem
10853
10854 Return the sizer item for the given grid cell, or None if there is no
10855 item at that position. (non-recursive)
10856 """
10857 return _core_.GridBagSizer_FindItemAtPosition(*args, **kwargs)
10858
10859 def FindItemAtPoint(*args, **kwargs):
10860 """
10861 FindItemAtPoint(self, Point pt) -> GBSizerItem
10862
10863 Return the sizer item located at the point given in *pt*, or None if
10864 there is no item at that point. The (x,y) coordinates in pt correspond
10865 to the client coordinates of the window using the sizer for
10866 layout. (non-recursive)
10867 """
10868 return _core_.GridBagSizer_FindItemAtPoint(*args, **kwargs)
10869
10870 def CheckForIntersection(*args, **kwargs):
10871 """
10872 CheckForIntersection(self, GBSizerItem item, GBSizerItem excludeItem=None) -> bool
10873
10874 Look at all items and see if any intersect (or would overlap) the
10875 given *item*. Returns True if so, False if there would be no overlap.
10876 If an *excludeItem* is given then it will not be checked for
10877 intersection, for example it may be the item we are checking the
10878 position of.
10879
10880 """
10881 return _core_.GridBagSizer_CheckForIntersection(*args, **kwargs)
10882
10883 def CheckForIntersectionPos(*args, **kwargs):
10884 """
10885 CheckForIntersectionPos(self, GBPosition pos, GBSpan span, GBSizerItem excludeItem=None) -> bool
10886
10887 Look at all items and see if any intersect (or would overlap) the
10888 given position and span. Returns True if so, False if there would be
10889 no overlap. If an *excludeItem* is given then it will not be checked
10890 for intersection, for example it may be the item we are checking the
10891 position of.
10892 """
10893 return _core_.GridBagSizer_CheckForIntersectionPos(*args, **kwargs)
10894
10895
10896 class GridBagSizerPtr(GridBagSizer):
10897 def __init__(self, this):
10898 self.this = this
10899 if not hasattr(self,"thisown"): self.thisown = 0
10900 self.__class__ = GridBagSizer
10901 _core_.GridBagSizer_swigregister(GridBagSizerPtr)
10902
10903 #---------------------------------------------------------------------------
10904
10905 Left = _core_.Left
10906 Top = _core_.Top
10907 Right = _core_.Right
10908 Bottom = _core_.Bottom
10909 Width = _core_.Width
10910 Height = _core_.Height
10911 Centre = _core_.Centre
10912 Center = _core_.Center
10913 CentreX = _core_.CentreX
10914 CentreY = _core_.CentreY
10915 Unconstrained = _core_.Unconstrained
10916 AsIs = _core_.AsIs
10917 PercentOf = _core_.PercentOf
10918 Above = _core_.Above
10919 Below = _core_.Below
10920 LeftOf = _core_.LeftOf
10921 RightOf = _core_.RightOf
10922 SameAs = _core_.SameAs
10923 Absolute = _core_.Absolute
10924 class IndividualLayoutConstraint(Object):
10925 """
10926 Objects of this class are stored in the `wx.LayoutConstraints` class as
10927 one of eight possible constraints that a window can be involved in.
10928 You will never need to create an instance of
10929 wx.IndividualLayoutConstraint, rather you should create a
10930 `wx.LayoutConstraints` instance and use the individual contstraints
10931 that it contains.
10932 """
10933 def __init__(self): raise RuntimeError, "No constructor defined"
10934 def __repr__(self):
10935 return "<%s.%s; proxy of C++ wxIndividualLayoutConstraint instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
10936 def Set(*args, **kwargs):
10937 """
10938 Set(self, int rel, Window otherW, int otherE, int val=0, int marg=wxLAYOUT_DEFAULT_MARGIN)
10939
10940 Sets the properties of the constraint. Normally called by one of the
10941 convenience functions such as Above, RightOf, SameAs.
10942 """
10943 return _core_.IndividualLayoutConstraint_Set(*args, **kwargs)
10944
10945 def LeftOf(*args, **kwargs):
10946 """
10947 LeftOf(self, Window sibling, int marg=0)
10948
10949 Constrains this edge to be to the left of the given window, with an
10950 optional margin. Implicitly, this is relative to the left edge of the
10951 other window.
10952 """
10953 return _core_.IndividualLayoutConstraint_LeftOf(*args, **kwargs)
10954
10955 def RightOf(*args, **kwargs):
10956 """
10957 RightOf(self, Window sibling, int marg=0)
10958
10959 Constrains this edge to be to the right of the given window, with an
10960 optional margin. Implicitly, this is relative to the right edge of the
10961 other window.
10962 """
10963 return _core_.IndividualLayoutConstraint_RightOf(*args, **kwargs)
10964
10965 def Above(*args, **kwargs):
10966 """
10967 Above(self, Window sibling, int marg=0)
10968
10969 Constrains this edge to be above the given window, with an optional
10970 margin. Implicitly, this is relative to the top edge of the other
10971 window.
10972 """
10973 return _core_.IndividualLayoutConstraint_Above(*args, **kwargs)
10974
10975 def Below(*args, **kwargs):
10976 """
10977 Below(self, Window sibling, int marg=0)
10978
10979 Constrains this edge to be below the given window, with an optional
10980 margin. Implicitly, this is relative to the bottom edge of the other
10981 window.
10982 """
10983 return _core_.IndividualLayoutConstraint_Below(*args, **kwargs)
10984
10985 def SameAs(*args, **kwargs):
10986 """
10987 SameAs(self, Window otherW, int edge, int marg=0)
10988
10989 Constrains this edge or dimension to be to the same as the edge of the
10990 given window, with an optional margin.
10991 """
10992 return _core_.IndividualLayoutConstraint_SameAs(*args, **kwargs)
10993
10994 def PercentOf(*args, **kwargs):
10995 """
10996 PercentOf(self, Window otherW, int wh, int per)
10997
10998 Constrains this edge or dimension to be to a percentage of the given
10999 window, with an optional margin.
11000 """
11001 return _core_.IndividualLayoutConstraint_PercentOf(*args, **kwargs)
11002
11003 def Absolute(*args, **kwargs):
11004 """
11005 Absolute(self, int val)
11006
11007 Constrains this edge or dimension to be the given absolute value.
11008 """
11009 return _core_.IndividualLayoutConstraint_Absolute(*args, **kwargs)
11010
11011 def Unconstrained(*args, **kwargs):
11012 """
11013 Unconstrained(self)
11014
11015 Sets this edge or dimension to be unconstrained, that is, dependent on
11016 other edges and dimensions from which this value can be deduced.
11017 """
11018 return _core_.IndividualLayoutConstraint_Unconstrained(*args, **kwargs)
11019
11020 def AsIs(*args, **kwargs):
11021 """
11022 AsIs(self)
11023
11024 Sets this edge or constraint to be whatever the window's value is at
11025 the moment. If either of the width and height constraints are *as is*,
11026 the window will not be resized, but moved instead. This is important
11027 when considering panel items which are intended to have a default
11028 size, such as a button, which may take its size from the size of the
11029 button label.
11030 """
11031 return _core_.IndividualLayoutConstraint_AsIs(*args, **kwargs)
11032
11033 def GetOtherWindow(*args, **kwargs):
11034 """GetOtherWindow(self) -> Window"""
11035 return _core_.IndividualLayoutConstraint_GetOtherWindow(*args, **kwargs)
11036
11037 def GetMyEdge(*args, **kwargs):
11038 """GetMyEdge(self) -> int"""
11039 return _core_.IndividualLayoutConstraint_GetMyEdge(*args, **kwargs)
11040
11041 def SetEdge(*args, **kwargs):
11042 """SetEdge(self, int which)"""
11043 return _core_.IndividualLayoutConstraint_SetEdge(*args, **kwargs)
11044
11045 def SetValue(*args, **kwargs):
11046 """SetValue(self, int v)"""
11047 return _core_.IndividualLayoutConstraint_SetValue(*args, **kwargs)
11048
11049 def GetMargin(*args, **kwargs):
11050 """GetMargin(self) -> int"""
11051 return _core_.IndividualLayoutConstraint_GetMargin(*args, **kwargs)
11052
11053 def SetMargin(*args, **kwargs):
11054 """SetMargin(self, int m)"""
11055 return _core_.IndividualLayoutConstraint_SetMargin(*args, **kwargs)
11056
11057 def GetValue(*args, **kwargs):
11058 """GetValue(self) -> int"""
11059 return _core_.IndividualLayoutConstraint_GetValue(*args, **kwargs)
11060
11061 def GetPercent(*args, **kwargs):
11062 """GetPercent(self) -> int"""
11063 return _core_.IndividualLayoutConstraint_GetPercent(*args, **kwargs)
11064
11065 def GetOtherEdge(*args, **kwargs):
11066 """GetOtherEdge(self) -> int"""
11067 return _core_.IndividualLayoutConstraint_GetOtherEdge(*args, **kwargs)
11068
11069 def GetDone(*args, **kwargs):
11070 """GetDone(self) -> bool"""
11071 return _core_.IndividualLayoutConstraint_GetDone(*args, **kwargs)
11072
11073 def SetDone(*args, **kwargs):
11074 """SetDone(self, bool d)"""
11075 return _core_.IndividualLayoutConstraint_SetDone(*args, **kwargs)
11076
11077 def GetRelationship(*args, **kwargs):
11078 """GetRelationship(self) -> int"""
11079 return _core_.IndividualLayoutConstraint_GetRelationship(*args, **kwargs)
11080
11081 def SetRelationship(*args, **kwargs):
11082 """SetRelationship(self, int r)"""
11083 return _core_.IndividualLayoutConstraint_SetRelationship(*args, **kwargs)
11084
11085 def ResetIfWin(*args, **kwargs):
11086 """
11087 ResetIfWin(self, Window otherW) -> bool
11088
11089 Reset constraint if it mentions otherWin
11090 """
11091 return _core_.IndividualLayoutConstraint_ResetIfWin(*args, **kwargs)
11092
11093 def SatisfyConstraint(*args, **kwargs):
11094 """
11095 SatisfyConstraint(self, LayoutConstraints constraints, Window win) -> bool
11096
11097 Try to satisfy constraint
11098 """
11099 return _core_.IndividualLayoutConstraint_SatisfyConstraint(*args, **kwargs)
11100
11101 def GetEdge(*args, **kwargs):
11102 """
11103 GetEdge(self, int which, Window thisWin, Window other) -> int
11104
11105 Get the value of this edge or dimension, or if this
11106 is not determinable, -1.
11107 """
11108 return _core_.IndividualLayoutConstraint_GetEdge(*args, **kwargs)
11109
11110
11111 class IndividualLayoutConstraintPtr(IndividualLayoutConstraint):
11112 def __init__(self, this):
11113 self.this = this
11114 if not hasattr(self,"thisown"): self.thisown = 0
11115 self.__class__ = IndividualLayoutConstraint
11116 _core_.IndividualLayoutConstraint_swigregister(IndividualLayoutConstraintPtr)
11117
11118 class LayoutConstraints(Object):
11119 """
11120 **Note:** constraints are now deprecated and you should use sizers
11121 instead.
11122
11123 Objects of this class can be associated with a window to define its
11124 layout constraints, with respect to siblings or its parent.
11125
11126 The class consists of the following eight constraints of class
11127 wx.IndividualLayoutConstraint, some or all of which should be accessed
11128 directly to set the appropriate constraints.
11129
11130 * left: represents the left hand edge of the window
11131 * right: represents the right hand edge of the window
11132 * top: represents the top edge of the window
11133 * bottom: represents the bottom edge of the window
11134 * width: represents the width of the window
11135 * height: represents the height of the window
11136 * centreX: represents the horizontal centre point of the window
11137 * centreY: represents the vertical centre point of the window
11138
11139 Most constraints are initially set to have the relationship
11140 wxUnconstrained, which means that their values should be calculated by
11141 looking at known constraints. The exceptions are width and height,
11142 which are set to wxAsIs to ensure that if the user does not specify a
11143 constraint, the existing width and height will be used, to be
11144 compatible with panel items which often have take a default size. If
11145 the constraint is ``wx.AsIs``, the dimension will not be changed.
11146
11147 :see: `wx.IndividualLayoutConstraint`, `wx.Window.SetConstraints`
11148
11149 """
11150 def __repr__(self):
11151 return "<%s.%s; proxy of C++ wxLayoutConstraints instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
11152 left = property(_core_.LayoutConstraints_left_get)
11153 top = property(_core_.LayoutConstraints_top_get)
11154 right = property(_core_.LayoutConstraints_right_get)
11155 bottom = property(_core_.LayoutConstraints_bottom_get)
11156 width = property(_core_.LayoutConstraints_width_get)
11157 height = property(_core_.LayoutConstraints_height_get)
11158 centreX = property(_core_.LayoutConstraints_centreX_get)
11159 centreY = property(_core_.LayoutConstraints_centreY_get)
11160 def __init__(self, *args, **kwargs):
11161 """__init__(self) -> LayoutConstraints"""
11162 newobj = _core_.new_LayoutConstraints(*args, **kwargs)
11163 self.this = newobj.this
11164 self.thisown = 1
11165 del newobj.thisown
11166 def SatisfyConstraints(*args, **kwargs):
11167 """SatisfyConstraints(Window win) -> (areSatisfied, noChanges)"""
11168 return _core_.LayoutConstraints_SatisfyConstraints(*args, **kwargs)
11169
11170 def AreSatisfied(*args, **kwargs):
11171 """AreSatisfied(self) -> bool"""
11172 return _core_.LayoutConstraints_AreSatisfied(*args, **kwargs)
11173
11174
11175 class LayoutConstraintsPtr(LayoutConstraints):
11176 def __init__(self, this):
11177 self.this = this
11178 if not hasattr(self,"thisown"): self.thisown = 0
11179 self.__class__ = LayoutConstraints
11180 _core_.LayoutConstraints_swigregister(LayoutConstraintsPtr)
11181
11182 #----------------------------------------------------------------------------
11183
11184 # Use Python's bool constants if available, make some if not
11185 try:
11186 True
11187 except NameError:
11188 __builtins__.True = 1==1
11189 __builtins__.False = 1==0
11190 def bool(value): return not not value
11191 __builtins__.bool = bool
11192
11193
11194
11195 # workarounds for bad wxRTTI names
11196 __wxPyPtrTypeMap['wxGauge95'] = 'wxGauge'
11197 __wxPyPtrTypeMap['wxSlider95'] = 'wxSlider'
11198 __wxPyPtrTypeMap['wxStatusBar95'] = 'wxStatusBar'
11199
11200
11201 #----------------------------------------------------------------------------
11202 # Load version numbers from __version__... Ensure that major and minor
11203 # versions are the same for both wxPython and wxWidgets.
11204
11205 from __version__ import *
11206 __version__ = VERSION_STRING
11207
11208 assert MAJOR_VERSION == _core_.MAJOR_VERSION, "wxPython/wxWidgets version mismatch"
11209 assert MINOR_VERSION == _core_.MINOR_VERSION, "wxPython/wxWidgets version mismatch"
11210 if RELEASE_VERSION != _core_.RELEASE_VERSION:
11211 import warnings
11212 warnings.warn("wxPython/wxWidgets release number mismatch")
11213
11214 #----------------------------------------------------------------------------
11215
11216 # Set the default string<-->unicode conversion encoding from the
11217 # locale. This encoding is used when string or unicode objects need
11218 # to be converted in order to pass them to wxWidgets. Please be aware
11219 # that the default encoding within the same locale may be slightly
11220 # different on different platforms. For example, please see
11221 # http://www.alanwood.net/demos/charsetdiffs.html for differences
11222 # between the common latin/roman encodings.
11223 import locale
11224 default = locale.getdefaultlocale()[1]
11225 if default:
11226 wx.SetDefaultPyEncoding(default)
11227 del default
11228 del locale
11229
11230 #----------------------------------------------------------------------------
11231
11232 class PyDeadObjectError(AttributeError):
11233 pass
11234
11235 class _wxPyDeadObject(object):
11236 """
11237 Instances of wx objects that are OOR capable will have their __class__
11238 changed to this class when the C++ object is deleted. This should help
11239 prevent crashes due to referencing a bogus C++ pointer.
11240 """
11241 reprStr = "wxPython wrapper for DELETED %s object! (The C++ object no longer exists.)"
11242 attrStr = "The C++ part of the %s object has been deleted, attribute access no longer allowed."
11243
11244 def __repr__(self):
11245 if not hasattr(self, "_name"):
11246 self._name = "[unknown]"
11247 return self.reprStr % self._name
11248
11249 def __getattr__(self, *args):
11250 if not hasattr(self, "_name"):
11251 self._name = "[unknown]"
11252 raise PyDeadObjectError(self.attrStr % self._name)
11253
11254 def __nonzero__(self):
11255 return 0
11256
11257
11258
11259 class PyUnbornObjectError(AttributeError):
11260 pass
11261
11262 class _wxPyUnbornObject(object):
11263 """
11264 Some stock objects are created when the wx._core module is
11265 imported, but their C++ instance is not created until the wx.App
11266 object is created and initialized. These object instances will
11267 temporarily have their __class__ changed to this class so an
11268 exception will be raised if they are used before the C++ instance
11269 is ready.
11270 """
11271
11272 reprStr = "wxPython wrapper for UNBORN object! (The C++ object is not initialized yet.)"
11273 attrStr = "The C++ part of this object has not been initialized, attribute access not allowed."
11274
11275 def __repr__(self):
11276 #if not hasattr(self, "_name"):
11277 # self._name = "[unknown]"
11278 return self.reprStr #% self._name
11279
11280 def __getattr__(self, *args):
11281 #if not hasattr(self, "_name"):
11282 # self._name = "[unknown]"
11283 raise PyUnbornObjectError(self.attrStr) # % self._name )
11284
11285 def __nonzero__(self):
11286 return 0
11287
11288
11289 #----------------------------------------------------------------------------
11290
11291 def CallAfter(callable, *args, **kw):
11292 """
11293 Call the specified function after the current and pending event
11294 handlers have been completed. This is also good for making GUI
11295 method calls from non-GUI threads. Any extra positional or
11296 keyword args are passed on to the callable when it is called.
11297
11298 :see: `wx.FutureCall`
11299 """
11300 app = wx.GetApp()
11301 assert app is not None, 'No wx.App created yet'
11302
11303 if not hasattr(app, "_CallAfterId"):
11304 app._CallAfterId = wx.NewEventType()
11305 app.Connect(-1, -1, app._CallAfterId,
11306 lambda event: event.callable(*event.args, **event.kw) )
11307 evt = wx.PyEvent()
11308 evt.SetEventType(app._CallAfterId)
11309 evt.callable = callable
11310 evt.args = args
11311 evt.kw = kw
11312 wx.PostEvent(app, evt)
11313
11314 #----------------------------------------------------------------------------
11315
11316
11317 class FutureCall:
11318 """
11319 A convenience class for `wx.Timer`, that calls the given callable
11320 object once after the given amount of milliseconds, passing any
11321 positional or keyword args. The return value of the callable is
11322 availbale after it has been run with the `GetResult` method.
11323
11324 If you don't need to get the return value or restart the timer
11325 then there is no need to hold a reference to this object. It will
11326 hold a reference to itself while the timer is running (the timer
11327 has a reference to self.Notify) but the cycle will be broken when
11328 the timer completes, automatically cleaning up the wx.FutureCall
11329 object.
11330
11331 :see: `wx.CallAfter`
11332 """
11333 def __init__(self, millis, callable, *args, **kwargs):
11334 self.millis = millis
11335 self.callable = callable
11336 self.SetArgs(*args, **kwargs)
11337 self.runCount = 0
11338 self.running = False
11339 self.hasRun = False
11340 self.result = None
11341 self.timer = None
11342 self.Start()
11343
11344 def __del__(self):
11345 self.Stop()
11346
11347
11348 def Start(self, millis=None, *args, **kwargs):
11349 """
11350 (Re)start the timer
11351 """
11352 self.hasRun = False
11353 if millis is not None:
11354 self.millis = millis
11355 if args or kwargs:
11356 self.SetArgs(*args, **kwargs)
11357 self.Stop()
11358 self.timer = wx.PyTimer(self.Notify)
11359 self.timer.Start(self.millis, wx.TIMER_ONE_SHOT)
11360 self.running = True
11361 Restart = Start
11362
11363
11364 def Stop(self):
11365 """
11366 Stop and destroy the timer.
11367 """
11368 if self.timer is not None:
11369 self.timer.Stop()
11370 self.timer = None
11371
11372
11373 def GetInterval(self):
11374 if self.timer is not None:
11375 return self.timer.GetInterval()
11376 else:
11377 return 0
11378
11379
11380 def IsRunning(self):
11381 return self.timer is not None and self.timer.IsRunning()
11382
11383
11384 def SetArgs(self, *args, **kwargs):
11385 """
11386 (Re)set the args passed to the callable object. This is
11387 useful in conjunction with Restart if you want to schedule a
11388 new call to the same callable object but with different
11389 parameters.
11390 """
11391 self.args = args
11392 self.kwargs = kwargs
11393
11394
11395 def HasRun(self):
11396 return self.hasRun
11397
11398 def GetResult(self):
11399 return self.result
11400
11401 def Notify(self):
11402 """
11403 The timer has expired so call the callable.
11404 """
11405 if self.callable and getattr(self.callable, 'im_self', True):
11406 self.runCount += 1
11407 self.running = False
11408 self.result = self.callable(*self.args, **self.kwargs)
11409 self.hasRun = True
11410 if not self.running:
11411 # if it wasn't restarted, then cleanup
11412 wx.CallAfter(self.Stop)
11413
11414
11415
11416 #----------------------------------------------------------------------------
11417 # Control which items in this module should be documented by epydoc.
11418 # We allow only classes and functions, which will help reduce the size
11419 # of the docs by filtering out the zillions of constants, EVT objects,
11420 # and etc that don't make much sense by themselves, but are instead
11421 # documented (or will be) as part of the classes/functions/methods
11422 # where they should be used.
11423
11424 class __DocFilter:
11425 """
11426 A filter for epydoc that only allows non-Ptr classes and
11427 fucntions, in order to reduce the clutter in the API docs.
11428 """
11429 def __init__(self, globals):
11430 self._globals = globals
11431
11432 def __call__(self, name):
11433 import types
11434 obj = self._globals.get(name, None)
11435 if type(obj) not in [type, types.ClassType, types.FunctionType, types.BuiltinFunctionType]:
11436 return False
11437 if name.startswith('_') or name.endswith('Ptr') or name.startswith('EVT'):
11438 return False
11439 return True
11440
11441 #----------------------------------------------------------------------------
11442 #----------------------------------------------------------------------------
11443
11444 # Import other modules in this package that should show up in the
11445 # "core" wx namespace
11446 from _gdi import *
11447 from _windows import *
11448 from _controls import *
11449 from _misc import *
11450
11451
11452 # Fixup the stock objects since they can't be used yet. (They will be
11453 # restored in wx.PyApp.OnInit.)
11454 _core_._wxPyFixStockObjects()
11455
11456 #----------------------------------------------------------------------------
11457 #----------------------------------------------------------------------------
11458
11459