]> git.saurik.com Git - wxWidgets.git/blob - wxPython/src/msw/_core.py
reSWIGged
[wxWidgets.git] / wxPython / src / msw / _core.py
1 # This file was created automatically by SWIG.
2 # Don't modify this file, modify the SWIG interface instead.
3
4 import _core_
5
6 def _swig_setattr_nondynamic(self,class_type,name,value,static=1):
7 if (name == "this"):
8 if isinstance(value, class_type):
9 self.__dict__[name] = value.this
10 if hasattr(value,"thisown"): self.__dict__["thisown"] = value.thisown
11 del value.thisown
12 return
13 method = class_type.__swig_setmethods__.get(name,None)
14 if method: return method(self,value)
15 if (not static) or hasattr(self,name) or (name == "thisown"):
16 self.__dict__[name] = value
17 else:
18 raise AttributeError("You cannot add attributes to %s" % self)
19
20 def _swig_setattr(self,class_type,name,value):
21 return _swig_setattr_nondynamic(self,class_type,name,value,0)
22
23 def _swig_getattr(self,class_type,name):
24 method = class_type.__swig_getmethods__.get(name,None)
25 if method: return method(self)
26 raise AttributeError,name
27
28 import types
29 try:
30 _object = types.ObjectType
31 _newclass = 1
32 except AttributeError:
33 class _object : pass
34 _newclass = 0
35 del types
36
37
38 def _swig_setattr_nondynamic_method(set):
39 def set_attr(self,name,value):
40 if hasattr(self,name) or (name in ("this", "thisown")):
41 set(self,name,value)
42 else:
43 raise AttributeError("You cannot add attributes to %s" % self)
44 return set_attr
45
46
47 #// Give a reference to the dictionary of this module to the C++ extension
48 #// code.
49 _core_._wxPySetDictionary(vars())
50
51 #// A little trick to make 'wx' be a reference to this module so wx.Names can
52 #// be used here.
53 import sys as _sys
54 wx = _sys.modules[__name__]
55
56
57 #----------------------------------------------------------------------------
58
59 def _deprecated(callable, msg=None):
60 """
61 Create a wrapper function that will raise a DeprecationWarning
62 before calling the callable.
63 """
64 if msg is None:
65 msg = "%s is deprecated" % callable
66 def deprecatedWrapper(*args, **kwargs):
67 import warnings
68 warnings.warn(msg, DeprecationWarning, stacklevel=2)
69 return callable(*args, **kwargs)
70 deprecatedWrapper.__doc__ = msg
71 return deprecatedWrapper
72
73
74 #----------------------------------------------------------------------------
75
76 NOT_FOUND = _core_.NOT_FOUND
77 VSCROLL = _core_.VSCROLL
78 HSCROLL = _core_.HSCROLL
79 CAPTION = _core_.CAPTION
80 DOUBLE_BORDER = _core_.DOUBLE_BORDER
81 SUNKEN_BORDER = _core_.SUNKEN_BORDER
82 RAISED_BORDER = _core_.RAISED_BORDER
83 BORDER = _core_.BORDER
84 SIMPLE_BORDER = _core_.SIMPLE_BORDER
85 STATIC_BORDER = _core_.STATIC_BORDER
86 TRANSPARENT_WINDOW = _core_.TRANSPARENT_WINDOW
87 NO_BORDER = _core_.NO_BORDER
88 DEFAULT_CONTROL_BORDER = _core_.DEFAULT_CONTROL_BORDER
89 DEFAULT_STATUSBAR_STYLE = _core_.DEFAULT_STATUSBAR_STYLE
90 TAB_TRAVERSAL = _core_.TAB_TRAVERSAL
91 WANTS_CHARS = _core_.WANTS_CHARS
92 POPUP_WINDOW = _core_.POPUP_WINDOW
93 CENTER_FRAME = _core_.CENTER_FRAME
94 CENTRE_ON_SCREEN = _core_.CENTRE_ON_SCREEN
95 CENTER_ON_SCREEN = _core_.CENTER_ON_SCREEN
96 CLIP_CHILDREN = _core_.CLIP_CHILDREN
97 CLIP_SIBLINGS = _core_.CLIP_SIBLINGS
98 ALWAYS_SHOW_SB = _core_.ALWAYS_SHOW_SB
99 RETAINED = _core_.RETAINED
100 BACKINGSTORE = _core_.BACKINGSTORE
101 COLOURED = _core_.COLOURED
102 FIXED_LENGTH = _core_.FIXED_LENGTH
103 LB_NEEDED_SB = _core_.LB_NEEDED_SB
104 LB_ALWAYS_SB = _core_.LB_ALWAYS_SB
105 LB_SORT = _core_.LB_SORT
106 LB_SINGLE = _core_.LB_SINGLE
107 LB_MULTIPLE = _core_.LB_MULTIPLE
108 LB_EXTENDED = _core_.LB_EXTENDED
109 LB_OWNERDRAW = _core_.LB_OWNERDRAW
110 LB_HSCROLL = _core_.LB_HSCROLL
111 PROCESS_ENTER = _core_.PROCESS_ENTER
112 PASSWORD = _core_.PASSWORD
113 CB_SIMPLE = _core_.CB_SIMPLE
114 CB_DROPDOWN = _core_.CB_DROPDOWN
115 CB_SORT = _core_.CB_SORT
116 CB_READONLY = _core_.CB_READONLY
117 RA_HORIZONTAL = _core_.RA_HORIZONTAL
118 RA_VERTICAL = _core_.RA_VERTICAL
119 RA_SPECIFY_ROWS = _core_.RA_SPECIFY_ROWS
120 RA_SPECIFY_COLS = _core_.RA_SPECIFY_COLS
121 RA_USE_CHECKBOX = _core_.RA_USE_CHECKBOX
122 RB_GROUP = _core_.RB_GROUP
123 RB_SINGLE = _core_.RB_SINGLE
124 SB_HORIZONTAL = _core_.SB_HORIZONTAL
125 SB_VERTICAL = _core_.SB_VERTICAL
126 RB_USE_CHECKBOX = _core_.RB_USE_CHECKBOX
127 ST_SIZEGRIP = _core_.ST_SIZEGRIP
128 ST_NO_AUTORESIZE = _core_.ST_NO_AUTORESIZE
129 FLOOD_SURFACE = _core_.FLOOD_SURFACE
130 FLOOD_BORDER = _core_.FLOOD_BORDER
131 ODDEVEN_RULE = _core_.ODDEVEN_RULE
132 WINDING_RULE = _core_.WINDING_RULE
133 TOOL_TOP = _core_.TOOL_TOP
134 TOOL_BOTTOM = _core_.TOOL_BOTTOM
135 TOOL_LEFT = _core_.TOOL_LEFT
136 TOOL_RIGHT = _core_.TOOL_RIGHT
137 OK = _core_.OK
138 YES_NO = _core_.YES_NO
139 CANCEL = _core_.CANCEL
140 YES = _core_.YES
141 NO = _core_.NO
142 NO_DEFAULT = _core_.NO_DEFAULT
143 YES_DEFAULT = _core_.YES_DEFAULT
144 ICON_EXCLAMATION = _core_.ICON_EXCLAMATION
145 ICON_HAND = _core_.ICON_HAND
146 ICON_QUESTION = _core_.ICON_QUESTION
147 ICON_INFORMATION = _core_.ICON_INFORMATION
148 ICON_STOP = _core_.ICON_STOP
149 ICON_ASTERISK = _core_.ICON_ASTERISK
150 ICON_MASK = _core_.ICON_MASK
151 ICON_WARNING = _core_.ICON_WARNING
152 ICON_ERROR = _core_.ICON_ERROR
153 FORWARD = _core_.FORWARD
154 BACKWARD = _core_.BACKWARD
155 RESET = _core_.RESET
156 HELP = _core_.HELP
157 MORE = _core_.MORE
158 SETUP = _core_.SETUP
159 SIZE_AUTO_WIDTH = _core_.SIZE_AUTO_WIDTH
160 SIZE_AUTO_HEIGHT = _core_.SIZE_AUTO_HEIGHT
161 SIZE_AUTO = _core_.SIZE_AUTO
162 SIZE_USE_EXISTING = _core_.SIZE_USE_EXISTING
163 SIZE_ALLOW_MINUS_ONE = _core_.SIZE_ALLOW_MINUS_ONE
164 PORTRAIT = _core_.PORTRAIT
165 LANDSCAPE = _core_.LANDSCAPE
166 PRINT_QUALITY_HIGH = _core_.PRINT_QUALITY_HIGH
167 PRINT_QUALITY_MEDIUM = _core_.PRINT_QUALITY_MEDIUM
168 PRINT_QUALITY_LOW = _core_.PRINT_QUALITY_LOW
169 PRINT_QUALITY_DRAFT = _core_.PRINT_QUALITY_DRAFT
170 ID_ANY = _core_.ID_ANY
171 ID_SEPARATOR = _core_.ID_SEPARATOR
172 ID_LOWEST = _core_.ID_LOWEST
173 ID_OPEN = _core_.ID_OPEN
174 ID_CLOSE = _core_.ID_CLOSE
175 ID_NEW = _core_.ID_NEW
176 ID_SAVE = _core_.ID_SAVE
177 ID_SAVEAS = _core_.ID_SAVEAS
178 ID_REVERT = _core_.ID_REVERT
179 ID_EXIT = _core_.ID_EXIT
180 ID_UNDO = _core_.ID_UNDO
181 ID_REDO = _core_.ID_REDO
182 ID_HELP = _core_.ID_HELP
183 ID_PRINT = _core_.ID_PRINT
184 ID_PRINT_SETUP = _core_.ID_PRINT_SETUP
185 ID_PREVIEW = _core_.ID_PREVIEW
186 ID_ABOUT = _core_.ID_ABOUT
187 ID_HELP_CONTENTS = _core_.ID_HELP_CONTENTS
188 ID_HELP_COMMANDS = _core_.ID_HELP_COMMANDS
189 ID_HELP_PROCEDURES = _core_.ID_HELP_PROCEDURES
190 ID_HELP_CONTEXT = _core_.ID_HELP_CONTEXT
191 ID_CLOSE_ALL = _core_.ID_CLOSE_ALL
192 ID_PREFERENCES = _core_.ID_PREFERENCES
193 ID_CUT = _core_.ID_CUT
194 ID_COPY = _core_.ID_COPY
195 ID_PASTE = _core_.ID_PASTE
196 ID_CLEAR = _core_.ID_CLEAR
197 ID_FIND = _core_.ID_FIND
198 ID_DUPLICATE = _core_.ID_DUPLICATE
199 ID_SELECTALL = _core_.ID_SELECTALL
200 ID_DELETE = _core_.ID_DELETE
201 ID_REPLACE = _core_.ID_REPLACE
202 ID_REPLACE_ALL = _core_.ID_REPLACE_ALL
203 ID_PROPERTIES = _core_.ID_PROPERTIES
204 ID_VIEW_DETAILS = _core_.ID_VIEW_DETAILS
205 ID_VIEW_LARGEICONS = _core_.ID_VIEW_LARGEICONS
206 ID_VIEW_SMALLICONS = _core_.ID_VIEW_SMALLICONS
207 ID_VIEW_LIST = _core_.ID_VIEW_LIST
208 ID_VIEW_SORTDATE = _core_.ID_VIEW_SORTDATE
209 ID_VIEW_SORTNAME = _core_.ID_VIEW_SORTNAME
210 ID_VIEW_SORTSIZE = _core_.ID_VIEW_SORTSIZE
211 ID_VIEW_SORTTYPE = _core_.ID_VIEW_SORTTYPE
212 ID_FILE1 = _core_.ID_FILE1
213 ID_FILE2 = _core_.ID_FILE2
214 ID_FILE3 = _core_.ID_FILE3
215 ID_FILE4 = _core_.ID_FILE4
216 ID_FILE5 = _core_.ID_FILE5
217 ID_FILE6 = _core_.ID_FILE6
218 ID_FILE7 = _core_.ID_FILE7
219 ID_FILE8 = _core_.ID_FILE8
220 ID_FILE9 = _core_.ID_FILE9
221 ID_OK = _core_.ID_OK
222 ID_CANCEL = _core_.ID_CANCEL
223 ID_APPLY = _core_.ID_APPLY
224 ID_YES = _core_.ID_YES
225 ID_NO = _core_.ID_NO
226 ID_STATIC = _core_.ID_STATIC
227 ID_FORWARD = _core_.ID_FORWARD
228 ID_BACKWARD = _core_.ID_BACKWARD
229 ID_DEFAULT = _core_.ID_DEFAULT
230 ID_MORE = _core_.ID_MORE
231 ID_SETUP = _core_.ID_SETUP
232 ID_RESET = _core_.ID_RESET
233 ID_CONTEXT_HELP = _core_.ID_CONTEXT_HELP
234 ID_YESTOALL = _core_.ID_YESTOALL
235 ID_NOTOALL = _core_.ID_NOTOALL
236 ID_ABORT = _core_.ID_ABORT
237 ID_RETRY = _core_.ID_RETRY
238 ID_IGNORE = _core_.ID_IGNORE
239 ID_ADD = _core_.ID_ADD
240 ID_REMOVE = _core_.ID_REMOVE
241 ID_UP = _core_.ID_UP
242 ID_DOWN = _core_.ID_DOWN
243 ID_HOME = _core_.ID_HOME
244 ID_REFRESH = _core_.ID_REFRESH
245 ID_STOP = _core_.ID_STOP
246 ID_INDEX = _core_.ID_INDEX
247 ID_BOLD = _core_.ID_BOLD
248 ID_ITALIC = _core_.ID_ITALIC
249 ID_JUSTIFY_CENTER = _core_.ID_JUSTIFY_CENTER
250 ID_JUSTIFY_FILL = _core_.ID_JUSTIFY_FILL
251 ID_JUSTIFY_RIGHT = _core_.ID_JUSTIFY_RIGHT
252 ID_JUSTIFY_LEFT = _core_.ID_JUSTIFY_LEFT
253 ID_UNDERLINE = _core_.ID_UNDERLINE
254 ID_INDENT = _core_.ID_INDENT
255 ID_UNINDENT = _core_.ID_UNINDENT
256 ID_ZOOM_100 = _core_.ID_ZOOM_100
257 ID_ZOOM_FIT = _core_.ID_ZOOM_FIT
258 ID_ZOOM_IN = _core_.ID_ZOOM_IN
259 ID_ZOOM_OUT = _core_.ID_ZOOM_OUT
260 ID_UNDELETE = _core_.ID_UNDELETE
261 ID_REVERT_TO_SAVED = _core_.ID_REVERT_TO_SAVED
262 ID_HIGHEST = _core_.ID_HIGHEST
263 OPEN = _core_.OPEN
264 SAVE = _core_.SAVE
265 HIDE_READONLY = _core_.HIDE_READONLY
266 OVERWRITE_PROMPT = _core_.OVERWRITE_PROMPT
267 FILE_MUST_EXIST = _core_.FILE_MUST_EXIST
268 MULTIPLE = _core_.MULTIPLE
269 CHANGE_DIR = _core_.CHANGE_DIR
270 ACCEL_ALT = _core_.ACCEL_ALT
271 ACCEL_CTRL = _core_.ACCEL_CTRL
272 ACCEL_SHIFT = _core_.ACCEL_SHIFT
273 ACCEL_NORMAL = _core_.ACCEL_NORMAL
274 PD_AUTO_HIDE = _core_.PD_AUTO_HIDE
275 PD_APP_MODAL = _core_.PD_APP_MODAL
276 PD_CAN_ABORT = _core_.PD_CAN_ABORT
277 PD_ELAPSED_TIME = _core_.PD_ELAPSED_TIME
278 PD_ESTIMATED_TIME = _core_.PD_ESTIMATED_TIME
279 PD_REMAINING_TIME = _core_.PD_REMAINING_TIME
280 PD_SMOOTH = _core_.PD_SMOOTH
281 PD_CAN_SKIP = _core_.PD_CAN_SKIP
282 DD_NEW_DIR_BUTTON = _core_.DD_NEW_DIR_BUTTON
283 DD_DEFAULT_STYLE = _core_.DD_DEFAULT_STYLE
284 MENU_TEAROFF = _core_.MENU_TEAROFF
285 MB_DOCKABLE = _core_.MB_DOCKABLE
286 NO_FULL_REPAINT_ON_RESIZE = _core_.NO_FULL_REPAINT_ON_RESIZE
287 FULL_REPAINT_ON_RESIZE = _core_.FULL_REPAINT_ON_RESIZE
288 LI_HORIZONTAL = _core_.LI_HORIZONTAL
289 LI_VERTICAL = _core_.LI_VERTICAL
290 WS_EX_VALIDATE_RECURSIVELY = _core_.WS_EX_VALIDATE_RECURSIVELY
291 WS_EX_BLOCK_EVENTS = _core_.WS_EX_BLOCK_EVENTS
292 WS_EX_TRANSIENT = _core_.WS_EX_TRANSIENT
293 WS_EX_THEMED_BACKGROUND = _core_.WS_EX_THEMED_BACKGROUND
294 WS_EX_PROCESS_IDLE = _core_.WS_EX_PROCESS_IDLE
295 WS_EX_PROCESS_UI_UPDATES = _core_.WS_EX_PROCESS_UI_UPDATES
296 MM_TEXT = _core_.MM_TEXT
297 MM_LOMETRIC = _core_.MM_LOMETRIC
298 MM_HIMETRIC = _core_.MM_HIMETRIC
299 MM_LOENGLISH = _core_.MM_LOENGLISH
300 MM_HIENGLISH = _core_.MM_HIENGLISH
301 MM_TWIPS = _core_.MM_TWIPS
302 MM_ISOTROPIC = _core_.MM_ISOTROPIC
303 MM_ANISOTROPIC = _core_.MM_ANISOTROPIC
304 MM_POINTS = _core_.MM_POINTS
305 MM_METRIC = _core_.MM_METRIC
306 CENTRE = _core_.CENTRE
307 CENTER = _core_.CENTER
308 HORIZONTAL = _core_.HORIZONTAL
309 VERTICAL = _core_.VERTICAL
310 BOTH = _core_.BOTH
311 LEFT = _core_.LEFT
312 RIGHT = _core_.RIGHT
313 UP = _core_.UP
314 DOWN = _core_.DOWN
315 TOP = _core_.TOP
316 BOTTOM = _core_.BOTTOM
317 NORTH = _core_.NORTH
318 SOUTH = _core_.SOUTH
319 WEST = _core_.WEST
320 EAST = _core_.EAST
321 ALL = _core_.ALL
322 ALIGN_NOT = _core_.ALIGN_NOT
323 ALIGN_CENTER_HORIZONTAL = _core_.ALIGN_CENTER_HORIZONTAL
324 ALIGN_CENTRE_HORIZONTAL = _core_.ALIGN_CENTRE_HORIZONTAL
325 ALIGN_LEFT = _core_.ALIGN_LEFT
326 ALIGN_TOP = _core_.ALIGN_TOP
327 ALIGN_RIGHT = _core_.ALIGN_RIGHT
328 ALIGN_BOTTOM = _core_.ALIGN_BOTTOM
329 ALIGN_CENTER_VERTICAL = _core_.ALIGN_CENTER_VERTICAL
330 ALIGN_CENTRE_VERTICAL = _core_.ALIGN_CENTRE_VERTICAL
331 ALIGN_CENTER = _core_.ALIGN_CENTER
332 ALIGN_CENTRE = _core_.ALIGN_CENTRE
333 ALIGN_MASK = _core_.ALIGN_MASK
334 STRETCH_NOT = _core_.STRETCH_NOT
335 SHRINK = _core_.SHRINK
336 GROW = _core_.GROW
337 EXPAND = _core_.EXPAND
338 SHAPED = _core_.SHAPED
339 FIXED_MINSIZE = _core_.FIXED_MINSIZE
340 TILE = _core_.TILE
341 ADJUST_MINSIZE = _core_.ADJUST_MINSIZE
342 BORDER_DEFAULT = _core_.BORDER_DEFAULT
343 BORDER_NONE = _core_.BORDER_NONE
344 BORDER_STATIC = _core_.BORDER_STATIC
345 BORDER_SIMPLE = _core_.BORDER_SIMPLE
346 BORDER_RAISED = _core_.BORDER_RAISED
347 BORDER_SUNKEN = _core_.BORDER_SUNKEN
348 BORDER_DOUBLE = _core_.BORDER_DOUBLE
349 BORDER_MASK = _core_.BORDER_MASK
350 BG_STYLE_SYSTEM = _core_.BG_STYLE_SYSTEM
351 BG_STYLE_COLOUR = _core_.BG_STYLE_COLOUR
352 BG_STYLE_CUSTOM = _core_.BG_STYLE_CUSTOM
353 DEFAULT = _core_.DEFAULT
354 DECORATIVE = _core_.DECORATIVE
355 ROMAN = _core_.ROMAN
356 SCRIPT = _core_.SCRIPT
357 SWISS = _core_.SWISS
358 MODERN = _core_.MODERN
359 TELETYPE = _core_.TELETYPE
360 VARIABLE = _core_.VARIABLE
361 FIXED = _core_.FIXED
362 NORMAL = _core_.NORMAL
363 LIGHT = _core_.LIGHT
364 BOLD = _core_.BOLD
365 ITALIC = _core_.ITALIC
366 SLANT = _core_.SLANT
367 SOLID = _core_.SOLID
368 DOT = _core_.DOT
369 LONG_DASH = _core_.LONG_DASH
370 SHORT_DASH = _core_.SHORT_DASH
371 DOT_DASH = _core_.DOT_DASH
372 USER_DASH = _core_.USER_DASH
373 TRANSPARENT = _core_.TRANSPARENT
374 STIPPLE = _core_.STIPPLE
375 BDIAGONAL_HATCH = _core_.BDIAGONAL_HATCH
376 CROSSDIAG_HATCH = _core_.CROSSDIAG_HATCH
377 FDIAGONAL_HATCH = _core_.FDIAGONAL_HATCH
378 CROSS_HATCH = _core_.CROSS_HATCH
379 HORIZONTAL_HATCH = _core_.HORIZONTAL_HATCH
380 VERTICAL_HATCH = _core_.VERTICAL_HATCH
381 JOIN_BEVEL = _core_.JOIN_BEVEL
382 JOIN_MITER = _core_.JOIN_MITER
383 JOIN_ROUND = _core_.JOIN_ROUND
384 CAP_ROUND = _core_.CAP_ROUND
385 CAP_PROJECTING = _core_.CAP_PROJECTING
386 CAP_BUTT = _core_.CAP_BUTT
387 CLEAR = _core_.CLEAR
388 XOR = _core_.XOR
389 INVERT = _core_.INVERT
390 OR_REVERSE = _core_.OR_REVERSE
391 AND_REVERSE = _core_.AND_REVERSE
392 COPY = _core_.COPY
393 AND = _core_.AND
394 AND_INVERT = _core_.AND_INVERT
395 NO_OP = _core_.NO_OP
396 NOR = _core_.NOR
397 EQUIV = _core_.EQUIV
398 SRC_INVERT = _core_.SRC_INVERT
399 OR_INVERT = _core_.OR_INVERT
400 NAND = _core_.NAND
401 OR = _core_.OR
402 SET = _core_.SET
403 WXK_BACK = _core_.WXK_BACK
404 WXK_TAB = _core_.WXK_TAB
405 WXK_RETURN = _core_.WXK_RETURN
406 WXK_ESCAPE = _core_.WXK_ESCAPE
407 WXK_SPACE = _core_.WXK_SPACE
408 WXK_DELETE = _core_.WXK_DELETE
409 WXK_START = _core_.WXK_START
410 WXK_LBUTTON = _core_.WXK_LBUTTON
411 WXK_RBUTTON = _core_.WXK_RBUTTON
412 WXK_CANCEL = _core_.WXK_CANCEL
413 WXK_MBUTTON = _core_.WXK_MBUTTON
414 WXK_CLEAR = _core_.WXK_CLEAR
415 WXK_SHIFT = _core_.WXK_SHIFT
416 WXK_ALT = _core_.WXK_ALT
417 WXK_CONTROL = _core_.WXK_CONTROL
418 WXK_MENU = _core_.WXK_MENU
419 WXK_PAUSE = _core_.WXK_PAUSE
420 WXK_CAPITAL = _core_.WXK_CAPITAL
421 WXK_PRIOR = _core_.WXK_PRIOR
422 WXK_NEXT = _core_.WXK_NEXT
423 WXK_END = _core_.WXK_END
424 WXK_HOME = _core_.WXK_HOME
425 WXK_LEFT = _core_.WXK_LEFT
426 WXK_UP = _core_.WXK_UP
427 WXK_RIGHT = _core_.WXK_RIGHT
428 WXK_DOWN = _core_.WXK_DOWN
429 WXK_SELECT = _core_.WXK_SELECT
430 WXK_PRINT = _core_.WXK_PRINT
431 WXK_EXECUTE = _core_.WXK_EXECUTE
432 WXK_SNAPSHOT = _core_.WXK_SNAPSHOT
433 WXK_INSERT = _core_.WXK_INSERT
434 WXK_HELP = _core_.WXK_HELP
435 WXK_NUMPAD0 = _core_.WXK_NUMPAD0
436 WXK_NUMPAD1 = _core_.WXK_NUMPAD1
437 WXK_NUMPAD2 = _core_.WXK_NUMPAD2
438 WXK_NUMPAD3 = _core_.WXK_NUMPAD3
439 WXK_NUMPAD4 = _core_.WXK_NUMPAD4
440 WXK_NUMPAD5 = _core_.WXK_NUMPAD5
441 WXK_NUMPAD6 = _core_.WXK_NUMPAD6
442 WXK_NUMPAD7 = _core_.WXK_NUMPAD7
443 WXK_NUMPAD8 = _core_.WXK_NUMPAD8
444 WXK_NUMPAD9 = _core_.WXK_NUMPAD9
445 WXK_MULTIPLY = _core_.WXK_MULTIPLY
446 WXK_ADD = _core_.WXK_ADD
447 WXK_SEPARATOR = _core_.WXK_SEPARATOR
448 WXK_SUBTRACT = _core_.WXK_SUBTRACT
449 WXK_DECIMAL = _core_.WXK_DECIMAL
450 WXK_DIVIDE = _core_.WXK_DIVIDE
451 WXK_F1 = _core_.WXK_F1
452 WXK_F2 = _core_.WXK_F2
453 WXK_F3 = _core_.WXK_F3
454 WXK_F4 = _core_.WXK_F4
455 WXK_F5 = _core_.WXK_F5
456 WXK_F6 = _core_.WXK_F6
457 WXK_F7 = _core_.WXK_F7
458 WXK_F8 = _core_.WXK_F8
459 WXK_F9 = _core_.WXK_F9
460 WXK_F10 = _core_.WXK_F10
461 WXK_F11 = _core_.WXK_F11
462 WXK_F12 = _core_.WXK_F12
463 WXK_F13 = _core_.WXK_F13
464 WXK_F14 = _core_.WXK_F14
465 WXK_F15 = _core_.WXK_F15
466 WXK_F16 = _core_.WXK_F16
467 WXK_F17 = _core_.WXK_F17
468 WXK_F18 = _core_.WXK_F18
469 WXK_F19 = _core_.WXK_F19
470 WXK_F20 = _core_.WXK_F20
471 WXK_F21 = _core_.WXK_F21
472 WXK_F22 = _core_.WXK_F22
473 WXK_F23 = _core_.WXK_F23
474 WXK_F24 = _core_.WXK_F24
475 WXK_NUMLOCK = _core_.WXK_NUMLOCK
476 WXK_SCROLL = _core_.WXK_SCROLL
477 WXK_PAGEUP = _core_.WXK_PAGEUP
478 WXK_PAGEDOWN = _core_.WXK_PAGEDOWN
479 WXK_NUMPAD_SPACE = _core_.WXK_NUMPAD_SPACE
480 WXK_NUMPAD_TAB = _core_.WXK_NUMPAD_TAB
481 WXK_NUMPAD_ENTER = _core_.WXK_NUMPAD_ENTER
482 WXK_NUMPAD_F1 = _core_.WXK_NUMPAD_F1
483 WXK_NUMPAD_F2 = _core_.WXK_NUMPAD_F2
484 WXK_NUMPAD_F3 = _core_.WXK_NUMPAD_F3
485 WXK_NUMPAD_F4 = _core_.WXK_NUMPAD_F4
486 WXK_NUMPAD_HOME = _core_.WXK_NUMPAD_HOME
487 WXK_NUMPAD_LEFT = _core_.WXK_NUMPAD_LEFT
488 WXK_NUMPAD_UP = _core_.WXK_NUMPAD_UP
489 WXK_NUMPAD_RIGHT = _core_.WXK_NUMPAD_RIGHT
490 WXK_NUMPAD_DOWN = _core_.WXK_NUMPAD_DOWN
491 WXK_NUMPAD_PRIOR = _core_.WXK_NUMPAD_PRIOR
492 WXK_NUMPAD_PAGEUP = _core_.WXK_NUMPAD_PAGEUP
493 WXK_NUMPAD_NEXT = _core_.WXK_NUMPAD_NEXT
494 WXK_NUMPAD_PAGEDOWN = _core_.WXK_NUMPAD_PAGEDOWN
495 WXK_NUMPAD_END = _core_.WXK_NUMPAD_END
496 WXK_NUMPAD_BEGIN = _core_.WXK_NUMPAD_BEGIN
497 WXK_NUMPAD_INSERT = _core_.WXK_NUMPAD_INSERT
498 WXK_NUMPAD_DELETE = _core_.WXK_NUMPAD_DELETE
499 WXK_NUMPAD_EQUAL = _core_.WXK_NUMPAD_EQUAL
500 WXK_NUMPAD_MULTIPLY = _core_.WXK_NUMPAD_MULTIPLY
501 WXK_NUMPAD_ADD = _core_.WXK_NUMPAD_ADD
502 WXK_NUMPAD_SEPARATOR = _core_.WXK_NUMPAD_SEPARATOR
503 WXK_NUMPAD_SUBTRACT = _core_.WXK_NUMPAD_SUBTRACT
504 WXK_NUMPAD_DECIMAL = _core_.WXK_NUMPAD_DECIMAL
505 WXK_NUMPAD_DIVIDE = _core_.WXK_NUMPAD_DIVIDE
506 WXK_WINDOWS_LEFT = _core_.WXK_WINDOWS_LEFT
507 WXK_WINDOWS_RIGHT = _core_.WXK_WINDOWS_RIGHT
508 WXK_WINDOWS_MENU = _core_.WXK_WINDOWS_MENU
509 WXK_COMMAND = _core_.WXK_COMMAND
510 WXK_SPECIAL1 = _core_.WXK_SPECIAL1
511 WXK_SPECIAL2 = _core_.WXK_SPECIAL2
512 WXK_SPECIAL3 = _core_.WXK_SPECIAL3
513 WXK_SPECIAL4 = _core_.WXK_SPECIAL4
514 WXK_SPECIAL5 = _core_.WXK_SPECIAL5
515 WXK_SPECIAL6 = _core_.WXK_SPECIAL6
516 WXK_SPECIAL7 = _core_.WXK_SPECIAL7
517 WXK_SPECIAL8 = _core_.WXK_SPECIAL8
518 WXK_SPECIAL9 = _core_.WXK_SPECIAL9
519 WXK_SPECIAL10 = _core_.WXK_SPECIAL10
520 WXK_SPECIAL11 = _core_.WXK_SPECIAL11
521 WXK_SPECIAL12 = _core_.WXK_SPECIAL12
522 WXK_SPECIAL13 = _core_.WXK_SPECIAL13
523 WXK_SPECIAL14 = _core_.WXK_SPECIAL14
524 WXK_SPECIAL15 = _core_.WXK_SPECIAL15
525 WXK_SPECIAL16 = _core_.WXK_SPECIAL16
526 WXK_SPECIAL17 = _core_.WXK_SPECIAL17
527 WXK_SPECIAL18 = _core_.WXK_SPECIAL18
528 WXK_SPECIAL19 = _core_.WXK_SPECIAL19
529 WXK_SPECIAL20 = _core_.WXK_SPECIAL20
530 PAPER_NONE = _core_.PAPER_NONE
531 PAPER_LETTER = _core_.PAPER_LETTER
532 PAPER_LEGAL = _core_.PAPER_LEGAL
533 PAPER_A4 = _core_.PAPER_A4
534 PAPER_CSHEET = _core_.PAPER_CSHEET
535 PAPER_DSHEET = _core_.PAPER_DSHEET
536 PAPER_ESHEET = _core_.PAPER_ESHEET
537 PAPER_LETTERSMALL = _core_.PAPER_LETTERSMALL
538 PAPER_TABLOID = _core_.PAPER_TABLOID
539 PAPER_LEDGER = _core_.PAPER_LEDGER
540 PAPER_STATEMENT = _core_.PAPER_STATEMENT
541 PAPER_EXECUTIVE = _core_.PAPER_EXECUTIVE
542 PAPER_A3 = _core_.PAPER_A3
543 PAPER_A4SMALL = _core_.PAPER_A4SMALL
544 PAPER_A5 = _core_.PAPER_A5
545 PAPER_B4 = _core_.PAPER_B4
546 PAPER_B5 = _core_.PAPER_B5
547 PAPER_FOLIO = _core_.PAPER_FOLIO
548 PAPER_QUARTO = _core_.PAPER_QUARTO
549 PAPER_10X14 = _core_.PAPER_10X14
550 PAPER_11X17 = _core_.PAPER_11X17
551 PAPER_NOTE = _core_.PAPER_NOTE
552 PAPER_ENV_9 = _core_.PAPER_ENV_9
553 PAPER_ENV_10 = _core_.PAPER_ENV_10
554 PAPER_ENV_11 = _core_.PAPER_ENV_11
555 PAPER_ENV_12 = _core_.PAPER_ENV_12
556 PAPER_ENV_14 = _core_.PAPER_ENV_14
557 PAPER_ENV_DL = _core_.PAPER_ENV_DL
558 PAPER_ENV_C5 = _core_.PAPER_ENV_C5
559 PAPER_ENV_C3 = _core_.PAPER_ENV_C3
560 PAPER_ENV_C4 = _core_.PAPER_ENV_C4
561 PAPER_ENV_C6 = _core_.PAPER_ENV_C6
562 PAPER_ENV_C65 = _core_.PAPER_ENV_C65
563 PAPER_ENV_B4 = _core_.PAPER_ENV_B4
564 PAPER_ENV_B5 = _core_.PAPER_ENV_B5
565 PAPER_ENV_B6 = _core_.PAPER_ENV_B6
566 PAPER_ENV_ITALY = _core_.PAPER_ENV_ITALY
567 PAPER_ENV_MONARCH = _core_.PAPER_ENV_MONARCH
568 PAPER_ENV_PERSONAL = _core_.PAPER_ENV_PERSONAL
569 PAPER_FANFOLD_US = _core_.PAPER_FANFOLD_US
570 PAPER_FANFOLD_STD_GERMAN = _core_.PAPER_FANFOLD_STD_GERMAN
571 PAPER_FANFOLD_LGL_GERMAN = _core_.PAPER_FANFOLD_LGL_GERMAN
572 PAPER_ISO_B4 = _core_.PAPER_ISO_B4
573 PAPER_JAPANESE_POSTCARD = _core_.PAPER_JAPANESE_POSTCARD
574 PAPER_9X11 = _core_.PAPER_9X11
575 PAPER_10X11 = _core_.PAPER_10X11
576 PAPER_15X11 = _core_.PAPER_15X11
577 PAPER_ENV_INVITE = _core_.PAPER_ENV_INVITE
578 PAPER_LETTER_EXTRA = _core_.PAPER_LETTER_EXTRA
579 PAPER_LEGAL_EXTRA = _core_.PAPER_LEGAL_EXTRA
580 PAPER_TABLOID_EXTRA = _core_.PAPER_TABLOID_EXTRA
581 PAPER_A4_EXTRA = _core_.PAPER_A4_EXTRA
582 PAPER_LETTER_TRANSVERSE = _core_.PAPER_LETTER_TRANSVERSE
583 PAPER_A4_TRANSVERSE = _core_.PAPER_A4_TRANSVERSE
584 PAPER_LETTER_EXTRA_TRANSVERSE = _core_.PAPER_LETTER_EXTRA_TRANSVERSE
585 PAPER_A_PLUS = _core_.PAPER_A_PLUS
586 PAPER_B_PLUS = _core_.PAPER_B_PLUS
587 PAPER_LETTER_PLUS = _core_.PAPER_LETTER_PLUS
588 PAPER_A4_PLUS = _core_.PAPER_A4_PLUS
589 PAPER_A5_TRANSVERSE = _core_.PAPER_A5_TRANSVERSE
590 PAPER_B5_TRANSVERSE = _core_.PAPER_B5_TRANSVERSE
591 PAPER_A3_EXTRA = _core_.PAPER_A3_EXTRA
592 PAPER_A5_EXTRA = _core_.PAPER_A5_EXTRA
593 PAPER_B5_EXTRA = _core_.PAPER_B5_EXTRA
594 PAPER_A2 = _core_.PAPER_A2
595 PAPER_A3_TRANSVERSE = _core_.PAPER_A3_TRANSVERSE
596 PAPER_A3_EXTRA_TRANSVERSE = _core_.PAPER_A3_EXTRA_TRANSVERSE
597 DUPLEX_SIMPLEX = _core_.DUPLEX_SIMPLEX
598 DUPLEX_HORIZONTAL = _core_.DUPLEX_HORIZONTAL
599 DUPLEX_VERTICAL = _core_.DUPLEX_VERTICAL
600 ITEM_SEPARATOR = _core_.ITEM_SEPARATOR
601 ITEM_NORMAL = _core_.ITEM_NORMAL
602 ITEM_CHECK = _core_.ITEM_CHECK
603 ITEM_RADIO = _core_.ITEM_RADIO
604 ITEM_MAX = _core_.ITEM_MAX
605 HT_NOWHERE = _core_.HT_NOWHERE
606 HT_SCROLLBAR_FIRST = _core_.HT_SCROLLBAR_FIRST
607 HT_SCROLLBAR_ARROW_LINE_1 = _core_.HT_SCROLLBAR_ARROW_LINE_1
608 HT_SCROLLBAR_ARROW_LINE_2 = _core_.HT_SCROLLBAR_ARROW_LINE_2
609 HT_SCROLLBAR_ARROW_PAGE_1 = _core_.HT_SCROLLBAR_ARROW_PAGE_1
610 HT_SCROLLBAR_ARROW_PAGE_2 = _core_.HT_SCROLLBAR_ARROW_PAGE_2
611 HT_SCROLLBAR_THUMB = _core_.HT_SCROLLBAR_THUMB
612 HT_SCROLLBAR_BAR_1 = _core_.HT_SCROLLBAR_BAR_1
613 HT_SCROLLBAR_BAR_2 = _core_.HT_SCROLLBAR_BAR_2
614 HT_SCROLLBAR_LAST = _core_.HT_SCROLLBAR_LAST
615 HT_WINDOW_OUTSIDE = _core_.HT_WINDOW_OUTSIDE
616 HT_WINDOW_INSIDE = _core_.HT_WINDOW_INSIDE
617 HT_WINDOW_VERT_SCROLLBAR = _core_.HT_WINDOW_VERT_SCROLLBAR
618 HT_WINDOW_HORZ_SCROLLBAR = _core_.HT_WINDOW_HORZ_SCROLLBAR
619 HT_WINDOW_CORNER = _core_.HT_WINDOW_CORNER
620 HT_MAX = _core_.HT_MAX
621 MOD_NONE = _core_.MOD_NONE
622 MOD_ALT = _core_.MOD_ALT
623 MOD_CONTROL = _core_.MOD_CONTROL
624 MOD_SHIFT = _core_.MOD_SHIFT
625 MOD_WIN = _core_.MOD_WIN
626 UPDATE_UI_NONE = _core_.UPDATE_UI_NONE
627 UPDATE_UI_RECURSE = _core_.UPDATE_UI_RECURSE
628 UPDATE_UI_FROMIDLE = _core_.UPDATE_UI_FROMIDLE
629 #---------------------------------------------------------------------------
630
631 class Object(object):
632 """
633 The base class for most wx objects, although in wxPython not
634 much functionality is needed nor exposed.
635 """
636 def __init__(self): raise RuntimeError, "No constructor defined"
637 def __repr__(self):
638 return "<%s.%s; proxy of C++ wxObject instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
639 def GetClassName(*args, **kwargs):
640 """
641 GetClassName(self) -> String
642
643 Returns the class name of the C++ class using wxRTTI.
644 """
645 return _core_.Object_GetClassName(*args, **kwargs)
646
647 def Destroy(*args, **kwargs):
648 """
649 Destroy(self)
650
651 Deletes the C++ object this Python object is a proxy for.
652 """
653 return _core_.Object_Destroy(*args, **kwargs)
654
655
656 class ObjectPtr(Object):
657 def __init__(self, this):
658 self.this = this
659 if not hasattr(self,"thisown"): self.thisown = 0
660 self.__class__ = Object
661 _core_.Object_swigregister(ObjectPtr)
662 _wxPySetDictionary = _core_._wxPySetDictionary
663
664 _wxPyFixStockObjects = _core_._wxPyFixStockObjects
665
666 cvar = _core_.cvar
667 EmptyString = cvar.EmptyString
668
669 #---------------------------------------------------------------------------
670
671 BITMAP_TYPE_INVALID = _core_.BITMAP_TYPE_INVALID
672 BITMAP_TYPE_BMP = _core_.BITMAP_TYPE_BMP
673 BITMAP_TYPE_ICO = _core_.BITMAP_TYPE_ICO
674 BITMAP_TYPE_CUR = _core_.BITMAP_TYPE_CUR
675 BITMAP_TYPE_XBM = _core_.BITMAP_TYPE_XBM
676 BITMAP_TYPE_XBM_DATA = _core_.BITMAP_TYPE_XBM_DATA
677 BITMAP_TYPE_XPM = _core_.BITMAP_TYPE_XPM
678 BITMAP_TYPE_XPM_DATA = _core_.BITMAP_TYPE_XPM_DATA
679 BITMAP_TYPE_TIF = _core_.BITMAP_TYPE_TIF
680 BITMAP_TYPE_GIF = _core_.BITMAP_TYPE_GIF
681 BITMAP_TYPE_PNG = _core_.BITMAP_TYPE_PNG
682 BITMAP_TYPE_JPEG = _core_.BITMAP_TYPE_JPEG
683 BITMAP_TYPE_PNM = _core_.BITMAP_TYPE_PNM
684 BITMAP_TYPE_PCX = _core_.BITMAP_TYPE_PCX
685 BITMAP_TYPE_PICT = _core_.BITMAP_TYPE_PICT
686 BITMAP_TYPE_ICON = _core_.BITMAP_TYPE_ICON
687 BITMAP_TYPE_ANI = _core_.BITMAP_TYPE_ANI
688 BITMAP_TYPE_IFF = _core_.BITMAP_TYPE_IFF
689 BITMAP_TYPE_MACCURSOR = _core_.BITMAP_TYPE_MACCURSOR
690 BITMAP_TYPE_ANY = _core_.BITMAP_TYPE_ANY
691 CURSOR_NONE = _core_.CURSOR_NONE
692 CURSOR_ARROW = _core_.CURSOR_ARROW
693 CURSOR_RIGHT_ARROW = _core_.CURSOR_RIGHT_ARROW
694 CURSOR_BULLSEYE = _core_.CURSOR_BULLSEYE
695 CURSOR_CHAR = _core_.CURSOR_CHAR
696 CURSOR_CROSS = _core_.CURSOR_CROSS
697 CURSOR_HAND = _core_.CURSOR_HAND
698 CURSOR_IBEAM = _core_.CURSOR_IBEAM
699 CURSOR_LEFT_BUTTON = _core_.CURSOR_LEFT_BUTTON
700 CURSOR_MAGNIFIER = _core_.CURSOR_MAGNIFIER
701 CURSOR_MIDDLE_BUTTON = _core_.CURSOR_MIDDLE_BUTTON
702 CURSOR_NO_ENTRY = _core_.CURSOR_NO_ENTRY
703 CURSOR_PAINT_BRUSH = _core_.CURSOR_PAINT_BRUSH
704 CURSOR_PENCIL = _core_.CURSOR_PENCIL
705 CURSOR_POINT_LEFT = _core_.CURSOR_POINT_LEFT
706 CURSOR_POINT_RIGHT = _core_.CURSOR_POINT_RIGHT
707 CURSOR_QUESTION_ARROW = _core_.CURSOR_QUESTION_ARROW
708 CURSOR_RIGHT_BUTTON = _core_.CURSOR_RIGHT_BUTTON
709 CURSOR_SIZENESW = _core_.CURSOR_SIZENESW
710 CURSOR_SIZENS = _core_.CURSOR_SIZENS
711 CURSOR_SIZENWSE = _core_.CURSOR_SIZENWSE
712 CURSOR_SIZEWE = _core_.CURSOR_SIZEWE
713 CURSOR_SIZING = _core_.CURSOR_SIZING
714 CURSOR_SPRAYCAN = _core_.CURSOR_SPRAYCAN
715 CURSOR_WAIT = _core_.CURSOR_WAIT
716 CURSOR_WATCH = _core_.CURSOR_WATCH
717 CURSOR_BLANK = _core_.CURSOR_BLANK
718 CURSOR_DEFAULT = _core_.CURSOR_DEFAULT
719 CURSOR_COPY_ARROW = _core_.CURSOR_COPY_ARROW
720 CURSOR_ARROWWAIT = _core_.CURSOR_ARROWWAIT
721 CURSOR_MAX = _core_.CURSOR_MAX
722 #---------------------------------------------------------------------------
723
724 class Size(object):
725 """
726 wx.Size is a useful data structure used to represent the size of
727 something. It simply contians integer width and height
728 proprtites. In most places in wxPython where a wx.Size is
729 expected a (width, height) tuple can be used instead.
730 """
731 def __repr__(self):
732 return "<%s.%s; proxy of C++ wxSize instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
733 width = property(_core_.Size_width_get, _core_.Size_width_set)
734 height = property(_core_.Size_height_get, _core_.Size_height_set)
735 x = width; y = height
736 def __init__(self, *args, **kwargs):
737 """
738 __init__(self, int w=0, int h=0) -> Size
739
740 Creates a size object.
741 """
742 newobj = _core_.new_Size(*args, **kwargs)
743 self.this = newobj.this
744 self.thisown = 1
745 del newobj.thisown
746 def __del__(self, destroy=_core_.delete_Size):
747 """__del__(self)"""
748 try:
749 if self.thisown: destroy(self)
750 except: pass
751
752 def __eq__(*args, **kwargs):
753 """
754 __eq__(self, Size sz) -> bool
755
756 Test for equality of wx.Size objects.
757 """
758 return _core_.Size___eq__(*args, **kwargs)
759
760 def __ne__(*args, **kwargs):
761 """
762 __ne__(self, Size sz) -> bool
763
764 Test for inequality.
765 """
766 return _core_.Size___ne__(*args, **kwargs)
767
768 def __add__(*args, **kwargs):
769 """
770 __add__(self, Size sz) -> Size
771
772 Add sz's proprties to this and return the result.
773 """
774 return _core_.Size___add__(*args, **kwargs)
775
776 def __sub__(*args, **kwargs):
777 """
778 __sub__(self, Size sz) -> Size
779
780 Subtract sz's properties from this and return the result.
781 """
782 return _core_.Size___sub__(*args, **kwargs)
783
784 def IncTo(*args, **kwargs):
785 """
786 IncTo(self, Size sz)
787
788 Increments this object so that both of its dimensions are not less
789 than the corresponding dimensions of the size.
790 """
791 return _core_.Size_IncTo(*args, **kwargs)
792
793 def DecTo(*args, **kwargs):
794 """
795 DecTo(self, Size sz)
796
797 Decrements this object so that both of its dimensions are not greater
798 than the corresponding dimensions of the size.
799 """
800 return _core_.Size_DecTo(*args, **kwargs)
801
802 def Set(*args, **kwargs):
803 """
804 Set(self, int w, int h)
805
806 Set both width and height.
807 """
808 return _core_.Size_Set(*args, **kwargs)
809
810 def SetWidth(*args, **kwargs):
811 """SetWidth(self, int w)"""
812 return _core_.Size_SetWidth(*args, **kwargs)
813
814 def SetHeight(*args, **kwargs):
815 """SetHeight(self, int h)"""
816 return _core_.Size_SetHeight(*args, **kwargs)
817
818 def GetWidth(*args, **kwargs):
819 """GetWidth(self) -> int"""
820 return _core_.Size_GetWidth(*args, **kwargs)
821
822 def GetHeight(*args, **kwargs):
823 """GetHeight(self) -> int"""
824 return _core_.Size_GetHeight(*args, **kwargs)
825
826 def IsFullySpecified(*args, **kwargs):
827 """
828 IsFullySpecified(self) -> bool
829
830 Returns True if both components of the size are non-default values.
831 """
832 return _core_.Size_IsFullySpecified(*args, **kwargs)
833
834 def SetDefaults(*args, **kwargs):
835 """
836 SetDefaults(self, Size size)
837
838 Combine this size with the other one replacing the default components
839 of this object (i.e. equal to -1) with those of the other.
840 """
841 return _core_.Size_SetDefaults(*args, **kwargs)
842
843 def Get(*args, **kwargs):
844 """
845 Get() -> (width,height)
846
847 Returns the width and height properties as a tuple.
848 """
849 return _core_.Size_Get(*args, **kwargs)
850
851 asTuple = wx._deprecated(Get, "asTuple is deprecated, use `Get` instead")
852 def __str__(self): return str(self.Get())
853 def __repr__(self): return 'wx.Size'+str(self.Get())
854 def __len__(self): return len(self.Get())
855 def __getitem__(self, index): return self.Get()[index]
856 def __setitem__(self, index, val):
857 if index == 0: self.width = val
858 elif index == 1: self.height = val
859 else: raise IndexError
860 def __nonzero__(self): return self.Get() != (0,0)
861 __safe_for_unpickling__ = True
862 def __reduce__(self): return (wx.Size, self.Get())
863
864
865 class SizePtr(Size):
866 def __init__(self, this):
867 self.this = this
868 if not hasattr(self,"thisown"): self.thisown = 0
869 self.__class__ = Size
870 _core_.Size_swigregister(SizePtr)
871
872 #---------------------------------------------------------------------------
873
874 class RealPoint(object):
875 """
876 A data structure for representing a point or position with floating
877 point x and y properties. In wxPython most places that expect a
878 wx.RealPoint can also accept a (x,y) tuple.
879 """
880 def __repr__(self):
881 return "<%s.%s; proxy of C++ wxRealPoint instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
882 x = property(_core_.RealPoint_x_get, _core_.RealPoint_x_set)
883 y = property(_core_.RealPoint_y_get, _core_.RealPoint_y_set)
884 def __init__(self, *args, **kwargs):
885 """
886 __init__(self, double x=0.0, double y=0.0) -> RealPoint
887
888 Create a wx.RealPoint object
889 """
890 newobj = _core_.new_RealPoint(*args, **kwargs)
891 self.this = newobj.this
892 self.thisown = 1
893 del newobj.thisown
894 def __del__(self, destroy=_core_.delete_RealPoint):
895 """__del__(self)"""
896 try:
897 if self.thisown: destroy(self)
898 except: pass
899
900 def __eq__(*args, **kwargs):
901 """
902 __eq__(self, RealPoint pt) -> bool
903
904 Test for equality of wx.RealPoint objects.
905 """
906 return _core_.RealPoint___eq__(*args, **kwargs)
907
908 def __ne__(*args, **kwargs):
909 """
910 __ne__(self, RealPoint pt) -> bool
911
912 Test for inequality of wx.RealPoint objects.
913 """
914 return _core_.RealPoint___ne__(*args, **kwargs)
915
916 def __add__(*args, **kwargs):
917 """
918 __add__(self, RealPoint pt) -> RealPoint
919
920 Add pt's proprties to this and return the result.
921 """
922 return _core_.RealPoint___add__(*args, **kwargs)
923
924 def __sub__(*args, **kwargs):
925 """
926 __sub__(self, RealPoint pt) -> RealPoint
927
928 Subtract pt's proprties from this and return the result
929 """
930 return _core_.RealPoint___sub__(*args, **kwargs)
931
932 def Set(*args, **kwargs):
933 """
934 Set(self, double x, double y)
935
936 Set both the x and y properties
937 """
938 return _core_.RealPoint_Set(*args, **kwargs)
939
940 def Get(*args, **kwargs):
941 """
942 Get() -> (x,y)
943
944 Return the x and y properties as a tuple.
945 """
946 return _core_.RealPoint_Get(*args, **kwargs)
947
948 asTuple = wx._deprecated(Get, "asTuple is deprecated, use `Get` instead")
949 def __str__(self): return str(self.Get())
950 def __repr__(self): return 'wx.RealPoint'+str(self.Get())
951 def __len__(self): return len(self.Get())
952 def __getitem__(self, index): return self.Get()[index]
953 def __setitem__(self, index, val):
954 if index == 0: self.x = val
955 elif index == 1: self.y = val
956 else: raise IndexError
957 def __nonzero__(self): return self.Get() != (0.0, 0.0)
958 __safe_for_unpickling__ = True
959 def __reduce__(self): return (wx.RealPoint, self.Get())
960
961
962 class RealPointPtr(RealPoint):
963 def __init__(self, this):
964 self.this = this
965 if not hasattr(self,"thisown"): self.thisown = 0
966 self.__class__ = RealPoint
967 _core_.RealPoint_swigregister(RealPointPtr)
968
969 #---------------------------------------------------------------------------
970
971 class Point(object):
972 """
973 A data structure for representing a point or position with integer x
974 and y properties. Most places in wxPython that expect a wx.Point can
975 also accept a (x,y) tuple.
976 """
977 def __repr__(self):
978 return "<%s.%s; proxy of C++ wxPoint instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
979 x = property(_core_.Point_x_get, _core_.Point_x_set)
980 y = property(_core_.Point_y_get, _core_.Point_y_set)
981 def __init__(self, *args, **kwargs):
982 """
983 __init__(self, int x=0, int y=0) -> Point
984
985 Create a wx.Point object
986 """
987 newobj = _core_.new_Point(*args, **kwargs)
988 self.this = newobj.this
989 self.thisown = 1
990 del newobj.thisown
991 def __del__(self, destroy=_core_.delete_Point):
992 """__del__(self)"""
993 try:
994 if self.thisown: destroy(self)
995 except: pass
996
997 def __eq__(*args, **kwargs):
998 """
999 __eq__(self, Point pt) -> bool
1000
1001 Test for equality of wx.Point objects.
1002 """
1003 return _core_.Point___eq__(*args, **kwargs)
1004
1005 def __ne__(*args, **kwargs):
1006 """
1007 __ne__(self, Point pt) -> bool
1008
1009 Test for inequality of wx.Point objects.
1010 """
1011 return _core_.Point___ne__(*args, **kwargs)
1012
1013 def __add__(*args, **kwargs):
1014 """
1015 __add__(self, Point pt) -> Point
1016
1017 Add pt's proprties to this and return the result.
1018 """
1019 return _core_.Point___add__(*args, **kwargs)
1020
1021 def __sub__(*args, **kwargs):
1022 """
1023 __sub__(self, Point pt) -> Point
1024
1025 Subtract pt's proprties from this and return the result
1026 """
1027 return _core_.Point___sub__(*args, **kwargs)
1028
1029 def __iadd__(*args, **kwargs):
1030 """
1031 __iadd__(self, Point pt) -> Point
1032
1033 Add pt to this object.
1034 """
1035 return _core_.Point___iadd__(*args, **kwargs)
1036
1037 def __isub__(*args, **kwargs):
1038 """
1039 __isub__(self, Point pt) -> Point
1040
1041 Subtract pt from this object.
1042 """
1043 return _core_.Point___isub__(*args, **kwargs)
1044
1045 def Set(*args, **kwargs):
1046 """
1047 Set(self, long x, long y)
1048
1049 Set both the x and y properties
1050 """
1051 return _core_.Point_Set(*args, **kwargs)
1052
1053 def Get(*args, **kwargs):
1054 """
1055 Get() -> (x,y)
1056
1057 Return the x and y properties as a tuple.
1058 """
1059 return _core_.Point_Get(*args, **kwargs)
1060
1061 asTuple = wx._deprecated(Get, "asTuple is deprecated, use `Get` instead")
1062 def __str__(self): return str(self.Get())
1063 def __repr__(self): return 'wx.Point'+str(self.Get())
1064 def __len__(self): return len(self.Get())
1065 def __getitem__(self, index): return self.Get()[index]
1066 def __setitem__(self, index, val):
1067 if index == 0: self.x = val
1068 elif index == 1: self.y = val
1069 else: raise IndexError
1070 def __nonzero__(self): return self.Get() != (0,0)
1071 __safe_for_unpickling__ = True
1072 def __reduce__(self): return (wx.Point, self.Get())
1073
1074
1075 class PointPtr(Point):
1076 def __init__(self, this):
1077 self.this = this
1078 if not hasattr(self,"thisown"): self.thisown = 0
1079 self.__class__ = Point
1080 _core_.Point_swigregister(PointPtr)
1081
1082 #---------------------------------------------------------------------------
1083
1084 class Rect(object):
1085 """
1086 A class for representing and manipulating rectangles. It has x, y,
1087 width and height properties. In wxPython most palces that expect a
1088 wx.Rect can also accept a (x,y,width,height) tuple.
1089 """
1090 def __repr__(self):
1091 return "<%s.%s; proxy of C++ wxRect instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
1092 def __init__(self, *args, **kwargs):
1093 """
1094 __init__(self, int x=0, int y=0, int width=0, int height=0) -> Rect
1095
1096 Create a new Rect object.
1097 """
1098 newobj = _core_.new_Rect(*args, **kwargs)
1099 self.this = newobj.this
1100 self.thisown = 1
1101 del newobj.thisown
1102 def __del__(self, destroy=_core_.delete_Rect):
1103 """__del__(self)"""
1104 try:
1105 if self.thisown: destroy(self)
1106 except: pass
1107
1108 def GetX(*args, **kwargs):
1109 """GetX(self) -> int"""
1110 return _core_.Rect_GetX(*args, **kwargs)
1111
1112 def SetX(*args, **kwargs):
1113 """SetX(self, int x)"""
1114 return _core_.Rect_SetX(*args, **kwargs)
1115
1116 def GetY(*args, **kwargs):
1117 """GetY(self) -> int"""
1118 return _core_.Rect_GetY(*args, **kwargs)
1119
1120 def SetY(*args, **kwargs):
1121 """SetY(self, int y)"""
1122 return _core_.Rect_SetY(*args, **kwargs)
1123
1124 def GetWidth(*args, **kwargs):
1125 """GetWidth(self) -> int"""
1126 return _core_.Rect_GetWidth(*args, **kwargs)
1127
1128 def SetWidth(*args, **kwargs):
1129 """SetWidth(self, int w)"""
1130 return _core_.Rect_SetWidth(*args, **kwargs)
1131
1132 def GetHeight(*args, **kwargs):
1133 """GetHeight(self) -> int"""
1134 return _core_.Rect_GetHeight(*args, **kwargs)
1135
1136 def SetHeight(*args, **kwargs):
1137 """SetHeight(self, int h)"""
1138 return _core_.Rect_SetHeight(*args, **kwargs)
1139
1140 def GetPosition(*args, **kwargs):
1141 """GetPosition(self) -> Point"""
1142 return _core_.Rect_GetPosition(*args, **kwargs)
1143
1144 def SetPosition(*args, **kwargs):
1145 """SetPosition(self, Point p)"""
1146 return _core_.Rect_SetPosition(*args, **kwargs)
1147
1148 def GetSize(*args, **kwargs):
1149 """GetSize(self) -> Size"""
1150 return _core_.Rect_GetSize(*args, **kwargs)
1151
1152 def SetSize(*args, **kwargs):
1153 """SetSize(self, Size s)"""
1154 return _core_.Rect_SetSize(*args, **kwargs)
1155
1156 def IsEmpty(*args, **kwargs):
1157 """IsEmpty(self) -> bool"""
1158 return _core_.Rect_IsEmpty(*args, **kwargs)
1159
1160 def GetTopLeft(*args, **kwargs):
1161 """GetTopLeft(self) -> Point"""
1162 return _core_.Rect_GetTopLeft(*args, **kwargs)
1163
1164 def SetTopLeft(*args, **kwargs):
1165 """SetTopLeft(self, Point p)"""
1166 return _core_.Rect_SetTopLeft(*args, **kwargs)
1167
1168 def GetBottomRight(*args, **kwargs):
1169 """GetBottomRight(self) -> Point"""
1170 return _core_.Rect_GetBottomRight(*args, **kwargs)
1171
1172 def SetBottomRight(*args, **kwargs):
1173 """SetBottomRight(self, Point p)"""
1174 return _core_.Rect_SetBottomRight(*args, **kwargs)
1175
1176 def GetLeft(*args, **kwargs):
1177 """GetLeft(self) -> int"""
1178 return _core_.Rect_GetLeft(*args, **kwargs)
1179
1180 def GetTop(*args, **kwargs):
1181 """GetTop(self) -> int"""
1182 return _core_.Rect_GetTop(*args, **kwargs)
1183
1184 def GetBottom(*args, **kwargs):
1185 """GetBottom(self) -> int"""
1186 return _core_.Rect_GetBottom(*args, **kwargs)
1187
1188 def GetRight(*args, **kwargs):
1189 """GetRight(self) -> int"""
1190 return _core_.Rect_GetRight(*args, **kwargs)
1191
1192 def SetLeft(*args, **kwargs):
1193 """SetLeft(self, int left)"""
1194 return _core_.Rect_SetLeft(*args, **kwargs)
1195
1196 def SetRight(*args, **kwargs):
1197 """SetRight(self, int right)"""
1198 return _core_.Rect_SetRight(*args, **kwargs)
1199
1200 def SetTop(*args, **kwargs):
1201 """SetTop(self, int top)"""
1202 return _core_.Rect_SetTop(*args, **kwargs)
1203
1204 def SetBottom(*args, **kwargs):
1205 """SetBottom(self, int bottom)"""
1206 return _core_.Rect_SetBottom(*args, **kwargs)
1207
1208 position = property(GetPosition, SetPosition)
1209 size = property(GetSize, SetSize)
1210 left = property(GetLeft, SetLeft)
1211 right = property(GetRight, SetRight)
1212 top = property(GetTop, SetTop)
1213 bottom = property(GetBottom, SetBottom)
1214
1215 def Inflate(*args, **kwargs):
1216 """
1217 Inflate(self, int dx, int dy) -> Rect
1218
1219 Increases the size of the rectangle.
1220
1221 The left border is moved farther left and the right border is moved
1222 farther right by ``dx``. The upper border is moved farther up and the
1223 bottom border is moved farther down by ``dy``. (Note the the width and
1224 height of the rectangle thus change by ``2*dx`` and ``2*dy``,
1225 respectively.) If one or both of ``dx`` and ``dy`` are negative, the
1226 opposite happens: the rectangle size decreases in the respective
1227 direction.
1228
1229 The change is made to the rectangle inplace, if instead you need a
1230 copy that is inflated, preserving the original then make the copy
1231 first::
1232
1233 copy = wx.Rect(*original)
1234 copy.Inflate(10,15)
1235
1236
1237 """
1238 return _core_.Rect_Inflate(*args, **kwargs)
1239
1240 def Deflate(*args, **kwargs):
1241 """
1242 Deflate(self, int dx, int dy) -> Rect
1243
1244 Decrease the rectangle size. This method is the opposite of `Inflate`
1245 in that Deflate(a,b) is equivalent to Inflate(-a,-b). Please refer to
1246 `Inflate` for a full description.
1247 """
1248 return _core_.Rect_Deflate(*args, **kwargs)
1249
1250 def OffsetXY(*args, **kwargs):
1251 """
1252 OffsetXY(self, int dx, int dy)
1253
1254 Moves the rectangle by the specified offset. If dx is positive, the
1255 rectangle is moved to the right, if dy is positive, it is moved to the
1256 bottom, otherwise it is moved to the left or top respectively.
1257 """
1258 return _core_.Rect_OffsetXY(*args, **kwargs)
1259
1260 def Offset(*args, **kwargs):
1261 """
1262 Offset(self, Point pt)
1263
1264 Same as OffsetXY but uses dx,dy from Point
1265 """
1266 return _core_.Rect_Offset(*args, **kwargs)
1267
1268 def Intersect(*args, **kwargs):
1269 """
1270 Intersect(self, Rect rect) -> Rect
1271
1272 Returns the intersectsion of this rectangle and rect.
1273 """
1274 return _core_.Rect_Intersect(*args, **kwargs)
1275
1276 def Union(*args, **kwargs):
1277 """
1278 Union(self, Rect rect) -> Rect
1279
1280 Returns the union of this rectangle and rect.
1281 """
1282 return _core_.Rect_Union(*args, **kwargs)
1283
1284 def __add__(*args, **kwargs):
1285 """
1286 __add__(self, Rect rect) -> Rect
1287
1288 Add the properties of rect to this rectangle and return the result.
1289 """
1290 return _core_.Rect___add__(*args, **kwargs)
1291
1292 def __iadd__(*args, **kwargs):
1293 """
1294 __iadd__(self, Rect rect) -> Rect
1295
1296 Add the properties of rect to this rectangle, updating this rectangle.
1297 """
1298 return _core_.Rect___iadd__(*args, **kwargs)
1299
1300 def __eq__(*args, **kwargs):
1301 """
1302 __eq__(self, Rect rect) -> bool
1303
1304 Test for equality.
1305 """
1306 return _core_.Rect___eq__(*args, **kwargs)
1307
1308 def __ne__(*args, **kwargs):
1309 """
1310 __ne__(self, Rect rect) -> bool
1311
1312 Test for inequality.
1313 """
1314 return _core_.Rect___ne__(*args, **kwargs)
1315
1316 def InsideXY(*args, **kwargs):
1317 """
1318 InsideXY(self, int x, int y) -> bool
1319
1320 Return True if the point is (not strcitly) inside the rect.
1321 """
1322 return _core_.Rect_InsideXY(*args, **kwargs)
1323
1324 def Inside(*args, **kwargs):
1325 """
1326 Inside(self, Point pt) -> bool
1327
1328 Return True if the point is (not strcitly) inside the rect.
1329 """
1330 return _core_.Rect_Inside(*args, **kwargs)
1331
1332 def Intersects(*args, **kwargs):
1333 """
1334 Intersects(self, Rect rect) -> bool
1335
1336 Returns True if the rectangles have a non empty intersection.
1337 """
1338 return _core_.Rect_Intersects(*args, **kwargs)
1339
1340 x = property(_core_.Rect_x_get, _core_.Rect_x_set)
1341 y = property(_core_.Rect_y_get, _core_.Rect_y_set)
1342 width = property(_core_.Rect_width_get, _core_.Rect_width_set)
1343 height = property(_core_.Rect_height_get, _core_.Rect_height_set)
1344 def Set(*args, **kwargs):
1345 """
1346 Set(self, int x=0, int y=0, int width=0, int height=0)
1347
1348 Set all rectangle properties.
1349 """
1350 return _core_.Rect_Set(*args, **kwargs)
1351
1352 def Get(*args, **kwargs):
1353 """
1354 Get() -> (x,y,width,height)
1355
1356 Return the rectangle properties as a tuple.
1357 """
1358 return _core_.Rect_Get(*args, **kwargs)
1359
1360 asTuple = wx._deprecated(Get, "asTuple is deprecated, use `Get` instead")
1361 def __str__(self): return str(self.Get())
1362 def __repr__(self): return 'wx.Rect'+str(self.Get())
1363 def __len__(self): return len(self.Get())
1364 def __getitem__(self, index): return self.Get()[index]
1365 def __setitem__(self, index, val):
1366 if index == 0: self.x = val
1367 elif index == 1: self.y = val
1368 elif index == 2: self.width = val
1369 elif index == 3: self.height = val
1370 else: raise IndexError
1371 def __nonzero__(self): return self.Get() != (0,0,0,0)
1372 __safe_for_unpickling__ = True
1373 def __reduce__(self): return (wx.Rect, self.Get())
1374
1375
1376 class RectPtr(Rect):
1377 def __init__(self, this):
1378 self.this = this
1379 if not hasattr(self,"thisown"): self.thisown = 0
1380 self.__class__ = Rect
1381 _core_.Rect_swigregister(RectPtr)
1382
1383 def RectPP(*args, **kwargs):
1384 """
1385 RectPP(Point topLeft, Point bottomRight) -> Rect
1386
1387 Create a new Rect object from Points representing two corners.
1388 """
1389 val = _core_.new_RectPP(*args, **kwargs)
1390 val.thisown = 1
1391 return val
1392
1393 def RectPS(*args, **kwargs):
1394 """
1395 RectPS(Point pos, Size size) -> Rect
1396
1397 Create a new Rect from a position and size.
1398 """
1399 val = _core_.new_RectPS(*args, **kwargs)
1400 val.thisown = 1
1401 return val
1402
1403 def RectS(*args, **kwargs):
1404 """
1405 RectS(Size size) -> Rect
1406
1407 Create a new Rect from a size only.
1408 """
1409 val = _core_.new_RectS(*args, **kwargs)
1410 val.thisown = 1
1411 return val
1412
1413
1414 def IntersectRect(*args, **kwargs):
1415 """
1416 IntersectRect(Rect r1, Rect r2) -> Rect
1417
1418 Calculate and return the intersection of r1 and r2.
1419 """
1420 return _core_.IntersectRect(*args, **kwargs)
1421 #---------------------------------------------------------------------------
1422
1423 class Point2D(object):
1424 """
1425 wx.Point2Ds represent a point or a vector in a 2d coordinate system
1426 with floating point values.
1427 """
1428 def __repr__(self):
1429 return "<%s.%s; proxy of C++ wxPoint2D instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
1430 def __init__(self, *args, **kwargs):
1431 """
1432 __init__(self, double x=0.0, double y=0.0) -> Point2D
1433
1434 Create a w.Point2D object.
1435 """
1436 newobj = _core_.new_Point2D(*args, **kwargs)
1437 self.this = newobj.this
1438 self.thisown = 1
1439 del newobj.thisown
1440 def GetFloor(*args, **kwargs):
1441 """
1442 GetFloor() -> (x,y)
1443
1444 Convert to integer
1445 """
1446 return _core_.Point2D_GetFloor(*args, **kwargs)
1447
1448 def GetRounded(*args, **kwargs):
1449 """
1450 GetRounded() -> (x,y)
1451
1452 Convert to integer
1453 """
1454 return _core_.Point2D_GetRounded(*args, **kwargs)
1455
1456 def GetVectorLength(*args, **kwargs):
1457 """GetVectorLength(self) -> double"""
1458 return _core_.Point2D_GetVectorLength(*args, **kwargs)
1459
1460 def GetVectorAngle(*args, **kwargs):
1461 """GetVectorAngle(self) -> double"""
1462 return _core_.Point2D_GetVectorAngle(*args, **kwargs)
1463
1464 def SetVectorLength(*args, **kwargs):
1465 """SetVectorLength(self, double length)"""
1466 return _core_.Point2D_SetVectorLength(*args, **kwargs)
1467
1468 def SetVectorAngle(*args, **kwargs):
1469 """SetVectorAngle(self, double degrees)"""
1470 return _core_.Point2D_SetVectorAngle(*args, **kwargs)
1471
1472 def SetPolarCoordinates(self, angle, length):
1473 self.SetVectorLength(length)
1474 self.SetVectorAngle(angle)
1475 def Normalize(self):
1476 self.SetVectorLength(1.0)
1477
1478 def GetDistance(*args, **kwargs):
1479 """GetDistance(self, Point2D pt) -> double"""
1480 return _core_.Point2D_GetDistance(*args, **kwargs)
1481
1482 def GetDistanceSquare(*args, **kwargs):
1483 """GetDistanceSquare(self, Point2D pt) -> double"""
1484 return _core_.Point2D_GetDistanceSquare(*args, **kwargs)
1485
1486 def GetDotProduct(*args, **kwargs):
1487 """GetDotProduct(self, Point2D vec) -> double"""
1488 return _core_.Point2D_GetDotProduct(*args, **kwargs)
1489
1490 def GetCrossProduct(*args, **kwargs):
1491 """GetCrossProduct(self, Point2D vec) -> double"""
1492 return _core_.Point2D_GetCrossProduct(*args, **kwargs)
1493
1494 def __neg__(*args, **kwargs):
1495 """
1496 __neg__(self) -> Point2D
1497
1498 the reflection of this point
1499 """
1500 return _core_.Point2D___neg__(*args, **kwargs)
1501
1502 def __iadd__(*args, **kwargs):
1503 """__iadd__(self, Point2D pt) -> Point2D"""
1504 return _core_.Point2D___iadd__(*args, **kwargs)
1505
1506 def __isub__(*args, **kwargs):
1507 """__isub__(self, Point2D pt) -> Point2D"""
1508 return _core_.Point2D___isub__(*args, **kwargs)
1509
1510 def __imul__(*args, **kwargs):
1511 """__imul__(self, Point2D pt) -> Point2D"""
1512 return _core_.Point2D___imul__(*args, **kwargs)
1513
1514 def __idiv__(*args, **kwargs):
1515 """__idiv__(self, Point2D pt) -> Point2D"""
1516 return _core_.Point2D___idiv__(*args, **kwargs)
1517
1518 def __eq__(*args, **kwargs):
1519 """
1520 __eq__(self, Point2D pt) -> bool
1521
1522 Test for equality
1523 """
1524 return _core_.Point2D___eq__(*args, **kwargs)
1525
1526 def __ne__(*args, **kwargs):
1527 """
1528 __ne__(self, Point2D pt) -> bool
1529
1530 Test for inequality
1531 """
1532 return _core_.Point2D___ne__(*args, **kwargs)
1533
1534 x = property(_core_.Point2D_x_get, _core_.Point2D_x_set)
1535 y = property(_core_.Point2D_y_get, _core_.Point2D_y_set)
1536 def Set(*args, **kwargs):
1537 """Set(self, double x=0, double y=0)"""
1538 return _core_.Point2D_Set(*args, **kwargs)
1539
1540 def Get(*args, **kwargs):
1541 """
1542 Get() -> (x,y)
1543
1544 Return x and y properties as a tuple.
1545 """
1546 return _core_.Point2D_Get(*args, **kwargs)
1547
1548 asTuple = wx._deprecated(Get, "asTuple is deprecated, use `Get` instead")
1549 def __str__(self): return str(self.Get())
1550 def __repr__(self): return 'wx.Point2D'+str(self.Get())
1551 def __len__(self): return len(self.Get())
1552 def __getitem__(self, index): return self.Get()[index]
1553 def __setitem__(self, index, val):
1554 if index == 0: self.x = val
1555 elif index == 1: self.y = val
1556 else: raise IndexError
1557 def __nonzero__(self): return self.Get() != (0.0, 0.0)
1558 __safe_for_unpickling__ = True
1559 def __reduce__(self): return (wx.Point2D, self.Get())
1560
1561
1562 class Point2DPtr(Point2D):
1563 def __init__(self, this):
1564 self.this = this
1565 if not hasattr(self,"thisown"): self.thisown = 0
1566 self.__class__ = Point2D
1567 _core_.Point2D_swigregister(Point2DPtr)
1568
1569 def Point2DCopy(*args, **kwargs):
1570 """
1571 Point2DCopy(Point2D pt) -> Point2D
1572
1573 Create a w.Point2D object.
1574 """
1575 val = _core_.new_Point2DCopy(*args, **kwargs)
1576 val.thisown = 1
1577 return val
1578
1579 def Point2DFromPoint(*args, **kwargs):
1580 """
1581 Point2DFromPoint(Point pt) -> Point2D
1582
1583 Create a w.Point2D object.
1584 """
1585 val = _core_.new_Point2DFromPoint(*args, **kwargs)
1586 val.thisown = 1
1587 return val
1588
1589 #---------------------------------------------------------------------------
1590
1591 FromStart = _core_.FromStart
1592 FromCurrent = _core_.FromCurrent
1593 FromEnd = _core_.FromEnd
1594 class InputStream(object):
1595 """Proxy of C++ InputStream class"""
1596 def __repr__(self):
1597 return "<%s.%s; proxy of C++ wxPyInputStream instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
1598 def __init__(self, *args, **kwargs):
1599 """__init__(self, PyObject p) -> InputStream"""
1600 newobj = _core_.new_InputStream(*args, **kwargs)
1601 self.this = newobj.this
1602 self.thisown = 1
1603 del newobj.thisown
1604 def __del__(self, destroy=_core_.delete_InputStream):
1605 """__del__(self)"""
1606 try:
1607 if self.thisown: destroy(self)
1608 except: pass
1609
1610 def close(*args, **kwargs):
1611 """close(self)"""
1612 return _core_.InputStream_close(*args, **kwargs)
1613
1614 def flush(*args, **kwargs):
1615 """flush(self)"""
1616 return _core_.InputStream_flush(*args, **kwargs)
1617
1618 def eof(*args, **kwargs):
1619 """eof(self) -> bool"""
1620 return _core_.InputStream_eof(*args, **kwargs)
1621
1622 def read(*args, **kwargs):
1623 """read(self, int size=-1) -> PyObject"""
1624 return _core_.InputStream_read(*args, **kwargs)
1625
1626 def readline(*args, **kwargs):
1627 """readline(self, int size=-1) -> PyObject"""
1628 return _core_.InputStream_readline(*args, **kwargs)
1629
1630 def readlines(*args, **kwargs):
1631 """readlines(self, int sizehint=-1) -> PyObject"""
1632 return _core_.InputStream_readlines(*args, **kwargs)
1633
1634 def seek(*args, **kwargs):
1635 """seek(self, int offset, int whence=0)"""
1636 return _core_.InputStream_seek(*args, **kwargs)
1637
1638 def tell(*args, **kwargs):
1639 """tell(self) -> int"""
1640 return _core_.InputStream_tell(*args, **kwargs)
1641
1642 def Peek(*args, **kwargs):
1643 """Peek(self) -> char"""
1644 return _core_.InputStream_Peek(*args, **kwargs)
1645
1646 def GetC(*args, **kwargs):
1647 """GetC(self) -> char"""
1648 return _core_.InputStream_GetC(*args, **kwargs)
1649
1650 def LastRead(*args, **kwargs):
1651 """LastRead(self) -> size_t"""
1652 return _core_.InputStream_LastRead(*args, **kwargs)
1653
1654 def CanRead(*args, **kwargs):
1655 """CanRead(self) -> bool"""
1656 return _core_.InputStream_CanRead(*args, **kwargs)
1657
1658 def Eof(*args, **kwargs):
1659 """Eof(self) -> bool"""
1660 return _core_.InputStream_Eof(*args, **kwargs)
1661
1662 def Ungetch(*args, **kwargs):
1663 """Ungetch(self, char c) -> bool"""
1664 return _core_.InputStream_Ungetch(*args, **kwargs)
1665
1666 def SeekI(*args, **kwargs):
1667 """SeekI(self, long pos, int mode=FromStart) -> long"""
1668 return _core_.InputStream_SeekI(*args, **kwargs)
1669
1670 def TellI(*args, **kwargs):
1671 """TellI(self) -> long"""
1672 return _core_.InputStream_TellI(*args, **kwargs)
1673
1674
1675 class InputStreamPtr(InputStream):
1676 def __init__(self, this):
1677 self.this = this
1678 if not hasattr(self,"thisown"): self.thisown = 0
1679 self.__class__ = InputStream
1680 _core_.InputStream_swigregister(InputStreamPtr)
1681 DefaultPosition = cvar.DefaultPosition
1682 DefaultSize = cvar.DefaultSize
1683
1684 class OutputStream(object):
1685 """Proxy of C++ OutputStream class"""
1686 def __init__(self): raise RuntimeError, "No constructor defined"
1687 def __repr__(self):
1688 return "<%s.%s; proxy of C++ wxOutputStream instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
1689 def write(*args, **kwargs):
1690 """write(self, PyObject obj)"""
1691 return _core_.OutputStream_write(*args, **kwargs)
1692
1693
1694 class OutputStreamPtr(OutputStream):
1695 def __init__(self, this):
1696 self.this = this
1697 if not hasattr(self,"thisown"): self.thisown = 0
1698 self.__class__ = OutputStream
1699 _core_.OutputStream_swigregister(OutputStreamPtr)
1700
1701 #---------------------------------------------------------------------------
1702
1703 class FSFile(Object):
1704 """Proxy of C++ FSFile class"""
1705 def __repr__(self):
1706 return "<%s.%s; proxy of C++ wxFSFile instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
1707 def __init__(self, *args, **kwargs):
1708 """
1709 __init__(self, InputStream stream, String loc, String mimetype, String anchor,
1710 DateTime modif) -> FSFile
1711 """
1712 newobj = _core_.new_FSFile(*args, **kwargs)
1713 self.this = newobj.this
1714 self.thisown = 1
1715 del newobj.thisown
1716 self.thisown = 0 # It will normally be deleted by the user of the wx.FileSystem
1717
1718 def __del__(self, destroy=_core_.delete_FSFile):
1719 """__del__(self)"""
1720 try:
1721 if self.thisown: destroy(self)
1722 except: pass
1723
1724 def GetStream(*args, **kwargs):
1725 """GetStream(self) -> InputStream"""
1726 return _core_.FSFile_GetStream(*args, **kwargs)
1727
1728 def GetMimeType(*args, **kwargs):
1729 """GetMimeType(self) -> String"""
1730 return _core_.FSFile_GetMimeType(*args, **kwargs)
1731
1732 def GetLocation(*args, **kwargs):
1733 """GetLocation(self) -> String"""
1734 return _core_.FSFile_GetLocation(*args, **kwargs)
1735
1736 def GetAnchor(*args, **kwargs):
1737 """GetAnchor(self) -> String"""
1738 return _core_.FSFile_GetAnchor(*args, **kwargs)
1739
1740 def GetModificationTime(*args, **kwargs):
1741 """GetModificationTime(self) -> DateTime"""
1742 return _core_.FSFile_GetModificationTime(*args, **kwargs)
1743
1744
1745 class FSFilePtr(FSFile):
1746 def __init__(self, this):
1747 self.this = this
1748 if not hasattr(self,"thisown"): self.thisown = 0
1749 self.__class__ = FSFile
1750 _core_.FSFile_swigregister(FSFilePtr)
1751
1752 class CPPFileSystemHandler(object):
1753 """Proxy of C++ CPPFileSystemHandler class"""
1754 def __init__(self): raise RuntimeError, "No constructor defined"
1755 def __repr__(self):
1756 return "<%s.%s; proxy of C++ wxFileSystemHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
1757
1758 class CPPFileSystemHandlerPtr(CPPFileSystemHandler):
1759 def __init__(self, this):
1760 self.this = this
1761 if not hasattr(self,"thisown"): self.thisown = 0
1762 self.__class__ = CPPFileSystemHandler
1763 _core_.CPPFileSystemHandler_swigregister(CPPFileSystemHandlerPtr)
1764
1765 class FileSystemHandler(CPPFileSystemHandler):
1766 """Proxy of C++ FileSystemHandler class"""
1767 def __repr__(self):
1768 return "<%s.%s; proxy of C++ wxPyFileSystemHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
1769 def __init__(self, *args, **kwargs):
1770 """__init__(self) -> FileSystemHandler"""
1771 newobj = _core_.new_FileSystemHandler(*args, **kwargs)
1772 self.this = newobj.this
1773 self.thisown = 1
1774 del newobj.thisown
1775 self._setCallbackInfo(self, FileSystemHandler)
1776
1777 def _setCallbackInfo(*args, **kwargs):
1778 """_setCallbackInfo(self, PyObject self, PyObject _class)"""
1779 return _core_.FileSystemHandler__setCallbackInfo(*args, **kwargs)
1780
1781 def CanOpen(*args, **kwargs):
1782 """CanOpen(self, String location) -> bool"""
1783 return _core_.FileSystemHandler_CanOpen(*args, **kwargs)
1784
1785 def OpenFile(*args, **kwargs):
1786 """OpenFile(self, FileSystem fs, String location) -> FSFile"""
1787 return _core_.FileSystemHandler_OpenFile(*args, **kwargs)
1788
1789 def FindFirst(*args, **kwargs):
1790 """FindFirst(self, String spec, int flags=0) -> String"""
1791 return _core_.FileSystemHandler_FindFirst(*args, **kwargs)
1792
1793 def FindNext(*args, **kwargs):
1794 """FindNext(self) -> String"""
1795 return _core_.FileSystemHandler_FindNext(*args, **kwargs)
1796
1797 def GetProtocol(*args, **kwargs):
1798 """GetProtocol(self, String location) -> String"""
1799 return _core_.FileSystemHandler_GetProtocol(*args, **kwargs)
1800
1801 def GetLeftLocation(*args, **kwargs):
1802 """GetLeftLocation(self, String location) -> String"""
1803 return _core_.FileSystemHandler_GetLeftLocation(*args, **kwargs)
1804
1805 def GetAnchor(*args, **kwargs):
1806 """GetAnchor(self, String location) -> String"""
1807 return _core_.FileSystemHandler_GetAnchor(*args, **kwargs)
1808
1809 def GetRightLocation(*args, **kwargs):
1810 """GetRightLocation(self, String location) -> String"""
1811 return _core_.FileSystemHandler_GetRightLocation(*args, **kwargs)
1812
1813 def GetMimeTypeFromExt(*args, **kwargs):
1814 """GetMimeTypeFromExt(self, String location) -> String"""
1815 return _core_.FileSystemHandler_GetMimeTypeFromExt(*args, **kwargs)
1816
1817
1818 class FileSystemHandlerPtr(FileSystemHandler):
1819 def __init__(self, this):
1820 self.this = this
1821 if not hasattr(self,"thisown"): self.thisown = 0
1822 self.__class__ = FileSystemHandler
1823 _core_.FileSystemHandler_swigregister(FileSystemHandlerPtr)
1824
1825 class FileSystem(Object):
1826 """Proxy of C++ FileSystem class"""
1827 def __repr__(self):
1828 return "<%s.%s; proxy of C++ wxFileSystem instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
1829 def __init__(self, *args, **kwargs):
1830 """__init__(self) -> FileSystem"""
1831 newobj = _core_.new_FileSystem(*args, **kwargs)
1832 self.this = newobj.this
1833 self.thisown = 1
1834 del newobj.thisown
1835 def __del__(self, destroy=_core_.delete_FileSystem):
1836 """__del__(self)"""
1837 try:
1838 if self.thisown: destroy(self)
1839 except: pass
1840
1841 def ChangePathTo(*args, **kwargs):
1842 """ChangePathTo(self, String location, bool is_dir=False)"""
1843 return _core_.FileSystem_ChangePathTo(*args, **kwargs)
1844
1845 def GetPath(*args, **kwargs):
1846 """GetPath(self) -> String"""
1847 return _core_.FileSystem_GetPath(*args, **kwargs)
1848
1849 def OpenFile(*args, **kwargs):
1850 """OpenFile(self, String location) -> FSFile"""
1851 return _core_.FileSystem_OpenFile(*args, **kwargs)
1852
1853 def FindFirst(*args, **kwargs):
1854 """FindFirst(self, String spec, int flags=0) -> String"""
1855 return _core_.FileSystem_FindFirst(*args, **kwargs)
1856
1857 def FindNext(*args, **kwargs):
1858 """FindNext(self) -> String"""
1859 return _core_.FileSystem_FindNext(*args, **kwargs)
1860
1861 def AddHandler(*args, **kwargs):
1862 """AddHandler(CPPFileSystemHandler handler)"""
1863 return _core_.FileSystem_AddHandler(*args, **kwargs)
1864
1865 AddHandler = staticmethod(AddHandler)
1866 def CleanUpHandlers(*args, **kwargs):
1867 """CleanUpHandlers()"""
1868 return _core_.FileSystem_CleanUpHandlers(*args, **kwargs)
1869
1870 CleanUpHandlers = staticmethod(CleanUpHandlers)
1871 def FileNameToURL(*args, **kwargs):
1872 """FileNameToURL(String filename) -> String"""
1873 return _core_.FileSystem_FileNameToURL(*args, **kwargs)
1874
1875 FileNameToURL = staticmethod(FileNameToURL)
1876 def URLToFileName(*args, **kwargs):
1877 """URLToFileName(String url) -> String"""
1878 return _core_.FileSystem_URLToFileName(*args, **kwargs)
1879
1880 URLToFileName = staticmethod(URLToFileName)
1881
1882 class FileSystemPtr(FileSystem):
1883 def __init__(self, this):
1884 self.this = this
1885 if not hasattr(self,"thisown"): self.thisown = 0
1886 self.__class__ = FileSystem
1887 _core_.FileSystem_swigregister(FileSystemPtr)
1888
1889 def FileSystem_AddHandler(*args, **kwargs):
1890 """FileSystem_AddHandler(CPPFileSystemHandler handler)"""
1891 return _core_.FileSystem_AddHandler(*args, **kwargs)
1892
1893 def FileSystem_CleanUpHandlers(*args, **kwargs):
1894 """FileSystem_CleanUpHandlers()"""
1895 return _core_.FileSystem_CleanUpHandlers(*args, **kwargs)
1896
1897 def FileSystem_FileNameToURL(*args, **kwargs):
1898 """FileSystem_FileNameToURL(String filename) -> String"""
1899 return _core_.FileSystem_FileNameToURL(*args, **kwargs)
1900
1901 def FileSystem_URLToFileName(*args, **kwargs):
1902 """FileSystem_URLToFileName(String url) -> String"""
1903 return _core_.FileSystem_URLToFileName(*args, **kwargs)
1904
1905 class InternetFSHandler(CPPFileSystemHandler):
1906 """Proxy of C++ InternetFSHandler class"""
1907 def __repr__(self):
1908 return "<%s.%s; proxy of C++ wxInternetFSHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
1909 def __init__(self, *args, **kwargs):
1910 """__init__(self) -> InternetFSHandler"""
1911 newobj = _core_.new_InternetFSHandler(*args, **kwargs)
1912 self.this = newobj.this
1913 self.thisown = 1
1914 del newobj.thisown
1915 def CanOpen(*args, **kwargs):
1916 """CanOpen(self, String location) -> bool"""
1917 return _core_.InternetFSHandler_CanOpen(*args, **kwargs)
1918
1919 def OpenFile(*args, **kwargs):
1920 """OpenFile(self, FileSystem fs, String location) -> FSFile"""
1921 return _core_.InternetFSHandler_OpenFile(*args, **kwargs)
1922
1923
1924 class InternetFSHandlerPtr(InternetFSHandler):
1925 def __init__(self, this):
1926 self.this = this
1927 if not hasattr(self,"thisown"): self.thisown = 0
1928 self.__class__ = InternetFSHandler
1929 _core_.InternetFSHandler_swigregister(InternetFSHandlerPtr)
1930
1931 class ZipFSHandler(CPPFileSystemHandler):
1932 """Proxy of C++ ZipFSHandler class"""
1933 def __repr__(self):
1934 return "<%s.%s; proxy of C++ wxZipFSHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
1935 def __init__(self, *args, **kwargs):
1936 """__init__(self) -> ZipFSHandler"""
1937 newobj = _core_.new_ZipFSHandler(*args, **kwargs)
1938 self.this = newobj.this
1939 self.thisown = 1
1940 del newobj.thisown
1941 def CanOpen(*args, **kwargs):
1942 """CanOpen(self, String location) -> bool"""
1943 return _core_.ZipFSHandler_CanOpen(*args, **kwargs)
1944
1945 def OpenFile(*args, **kwargs):
1946 """OpenFile(self, FileSystem fs, String location) -> FSFile"""
1947 return _core_.ZipFSHandler_OpenFile(*args, **kwargs)
1948
1949 def FindFirst(*args, **kwargs):
1950 """FindFirst(self, String spec, int flags=0) -> String"""
1951 return _core_.ZipFSHandler_FindFirst(*args, **kwargs)
1952
1953 def FindNext(*args, **kwargs):
1954 """FindNext(self) -> String"""
1955 return _core_.ZipFSHandler_FindNext(*args, **kwargs)
1956
1957
1958 class ZipFSHandlerPtr(ZipFSHandler):
1959 def __init__(self, this):
1960 self.this = this
1961 if not hasattr(self,"thisown"): self.thisown = 0
1962 self.__class__ = ZipFSHandler
1963 _core_.ZipFSHandler_swigregister(ZipFSHandlerPtr)
1964
1965
1966 def __wxMemoryFSHandler_AddFile_wxImage(*args, **kwargs):
1967 """__wxMemoryFSHandler_AddFile_wxImage(String filename, Image image, long type)"""
1968 return _core_.__wxMemoryFSHandler_AddFile_wxImage(*args, **kwargs)
1969
1970 def __wxMemoryFSHandler_AddFile_wxBitmap(*args, **kwargs):
1971 """__wxMemoryFSHandler_AddFile_wxBitmap(String filename, Bitmap bitmap, long type)"""
1972 return _core_.__wxMemoryFSHandler_AddFile_wxBitmap(*args, **kwargs)
1973
1974 def __wxMemoryFSHandler_AddFile_Data(*args, **kwargs):
1975 """__wxMemoryFSHandler_AddFile_Data(String filename, PyObject data)"""
1976 return _core_.__wxMemoryFSHandler_AddFile_Data(*args, **kwargs)
1977 def MemoryFSHandler_AddFile(filename, dataItem, imgType=-1):
1978 """
1979 Add 'file' to the memory filesystem. The dataItem parameter can
1980 either be a `wx.Bitmap`, `wx.Image` or a string that can contain
1981 arbitrary data. If a bitmap or image is used then the imgType
1982 parameter should specify what kind of image file it should be
1983 written as, wx.BITMAP_TYPE_PNG, etc.
1984 """
1985 if isinstance(dataItem, wx.Image):
1986 __wxMemoryFSHandler_AddFile_wxImage(filename, dataItem, imgType)
1987 elif isinstance(dataItem, wx.Bitmap):
1988 __wxMemoryFSHandler_AddFile_wxBitmap(filename, dataItem, imgType)
1989 elif type(dataItem) == str:
1990 __wxMemoryFSHandler_AddFile_Data(filename, dataItem)
1991 else:
1992 raise TypeError, 'wx.Image, wx.Bitmap or string expected'
1993
1994 class MemoryFSHandler(CPPFileSystemHandler):
1995 """Proxy of C++ MemoryFSHandler class"""
1996 def __repr__(self):
1997 return "<%s.%s; proxy of C++ wxMemoryFSHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
1998 def __init__(self, *args, **kwargs):
1999 """__init__(self) -> MemoryFSHandler"""
2000 newobj = _core_.new_MemoryFSHandler(*args, **kwargs)
2001 self.this = newobj.this
2002 self.thisown = 1
2003 del newobj.thisown
2004 def RemoveFile(*args, **kwargs):
2005 """RemoveFile(String filename)"""
2006 return _core_.MemoryFSHandler_RemoveFile(*args, **kwargs)
2007
2008 RemoveFile = staticmethod(RemoveFile)
2009 AddFile = staticmethod(MemoryFSHandler_AddFile)
2010 def CanOpen(*args, **kwargs):
2011 """CanOpen(self, String location) -> bool"""
2012 return _core_.MemoryFSHandler_CanOpen(*args, **kwargs)
2013
2014 def OpenFile(*args, **kwargs):
2015 """OpenFile(self, FileSystem fs, String location) -> FSFile"""
2016 return _core_.MemoryFSHandler_OpenFile(*args, **kwargs)
2017
2018 def FindFirst(*args, **kwargs):
2019 """FindFirst(self, String spec, int flags=0) -> String"""
2020 return _core_.MemoryFSHandler_FindFirst(*args, **kwargs)
2021
2022 def FindNext(*args, **kwargs):
2023 """FindNext(self) -> String"""
2024 return _core_.MemoryFSHandler_FindNext(*args, **kwargs)
2025
2026
2027 class MemoryFSHandlerPtr(MemoryFSHandler):
2028 def __init__(self, this):
2029 self.this = this
2030 if not hasattr(self,"thisown"): self.thisown = 0
2031 self.__class__ = MemoryFSHandler
2032 _core_.MemoryFSHandler_swigregister(MemoryFSHandlerPtr)
2033
2034 def MemoryFSHandler_RemoveFile(*args, **kwargs):
2035 """MemoryFSHandler_RemoveFile(String filename)"""
2036 return _core_.MemoryFSHandler_RemoveFile(*args, **kwargs)
2037
2038 IMAGE_ALPHA_TRANSPARENT = _core_.IMAGE_ALPHA_TRANSPARENT
2039 IMAGE_ALPHA_THRESHOLD = _core_.IMAGE_ALPHA_THRESHOLD
2040 IMAGE_ALPHA_OPAQUE = _core_.IMAGE_ALPHA_OPAQUE
2041 #---------------------------------------------------------------------------
2042
2043 class ImageHandler(Object):
2044 """Proxy of C++ ImageHandler class"""
2045 def __init__(self): raise RuntimeError, "No constructor defined"
2046 def __repr__(self):
2047 return "<%s.%s; proxy of C++ wxImageHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
2048 def GetName(*args, **kwargs):
2049 """GetName(self) -> String"""
2050 return _core_.ImageHandler_GetName(*args, **kwargs)
2051
2052 def GetExtension(*args, **kwargs):
2053 """GetExtension(self) -> String"""
2054 return _core_.ImageHandler_GetExtension(*args, **kwargs)
2055
2056 def GetType(*args, **kwargs):
2057 """GetType(self) -> long"""
2058 return _core_.ImageHandler_GetType(*args, **kwargs)
2059
2060 def GetMimeType(*args, **kwargs):
2061 """GetMimeType(self) -> String"""
2062 return _core_.ImageHandler_GetMimeType(*args, **kwargs)
2063
2064 def CanRead(*args, **kwargs):
2065 """CanRead(self, String name) -> bool"""
2066 return _core_.ImageHandler_CanRead(*args, **kwargs)
2067
2068 def SetName(*args, **kwargs):
2069 """SetName(self, String name)"""
2070 return _core_.ImageHandler_SetName(*args, **kwargs)
2071
2072 def SetExtension(*args, **kwargs):
2073 """SetExtension(self, String extension)"""
2074 return _core_.ImageHandler_SetExtension(*args, **kwargs)
2075
2076 def SetType(*args, **kwargs):
2077 """SetType(self, long type)"""
2078 return _core_.ImageHandler_SetType(*args, **kwargs)
2079
2080 def SetMimeType(*args, **kwargs):
2081 """SetMimeType(self, String mimetype)"""
2082 return _core_.ImageHandler_SetMimeType(*args, **kwargs)
2083
2084
2085 class ImageHandlerPtr(ImageHandler):
2086 def __init__(self, this):
2087 self.this = this
2088 if not hasattr(self,"thisown"): self.thisown = 0
2089 self.__class__ = ImageHandler
2090 _core_.ImageHandler_swigregister(ImageHandlerPtr)
2091
2092 class ImageHistogram(object):
2093 """Proxy of C++ ImageHistogram class"""
2094 def __repr__(self):
2095 return "<%s.%s; proxy of C++ wxImageHistogram instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
2096 def __init__(self, *args, **kwargs):
2097 """__init__(self) -> ImageHistogram"""
2098 newobj = _core_.new_ImageHistogram(*args, **kwargs)
2099 self.this = newobj.this
2100 self.thisown = 1
2101 del newobj.thisown
2102 def MakeKey(*args, **kwargs):
2103 """
2104 MakeKey(unsigned char r, unsigned char g, unsigned char b) -> unsigned long
2105
2106 Get the key in the histogram for the given RGB values
2107 """
2108 return _core_.ImageHistogram_MakeKey(*args, **kwargs)
2109
2110 MakeKey = staticmethod(MakeKey)
2111 def FindFirstUnusedColour(*args, **kwargs):
2112 """
2113 FindFirstUnusedColour(int startR=1, int startG=0, int startB=0) -> (success, r, g, b)
2114
2115 Find first colour that is not used in the image and has higher RGB
2116 values than startR, startG, startB. Returns a tuple consisting of a
2117 success flag and rgb values.
2118 """
2119 return _core_.ImageHistogram_FindFirstUnusedColour(*args, **kwargs)
2120
2121 def GetCount(*args, **kwargs):
2122 """
2123 GetCount(self, unsigned long key) -> unsigned long
2124
2125 Returns the pixel count for the given key. Use `MakeKey` to create a
2126 key value from a RGB tripple.
2127 """
2128 return _core_.ImageHistogram_GetCount(*args, **kwargs)
2129
2130 def GetCountRGB(*args, **kwargs):
2131 """
2132 GetCountRGB(self, unsigned char r, unsigned char g, unsigned char b) -> unsigned long
2133
2134 Returns the pixel count for the given RGB values.
2135 """
2136 return _core_.ImageHistogram_GetCountRGB(*args, **kwargs)
2137
2138 def GetCountColour(*args, **kwargs):
2139 """
2140 GetCountColour(self, Colour colour) -> unsigned long
2141
2142 Returns the pixel count for the given `wx.Colour` value.
2143 """
2144 return _core_.ImageHistogram_GetCountColour(*args, **kwargs)
2145
2146
2147 class ImageHistogramPtr(ImageHistogram):
2148 def __init__(self, this):
2149 self.this = this
2150 if not hasattr(self,"thisown"): self.thisown = 0
2151 self.__class__ = ImageHistogram
2152 _core_.ImageHistogram_swigregister(ImageHistogramPtr)
2153
2154 def ImageHistogram_MakeKey(*args, **kwargs):
2155 """
2156 ImageHistogram_MakeKey(unsigned char r, unsigned char g, unsigned char b) -> unsigned long
2157
2158 Get the key in the histogram for the given RGB values
2159 """
2160 return _core_.ImageHistogram_MakeKey(*args, **kwargs)
2161
2162 class Image(Object):
2163 """Proxy of C++ Image class"""
2164 def __repr__(self):
2165 return "<%s.%s; proxy of C++ wxImage instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
2166 def __init__(self, *args, **kwargs):
2167 """__init__(self, String name, long type=BITMAP_TYPE_ANY, int index=-1) -> Image"""
2168 newobj = _core_.new_Image(*args, **kwargs)
2169 self.this = newobj.this
2170 self.thisown = 1
2171 del newobj.thisown
2172 def __del__(self, destroy=_core_.delete_Image):
2173 """__del__(self)"""
2174 try:
2175 if self.thisown: destroy(self)
2176 except: pass
2177
2178 def Create(*args, **kwargs):
2179 """Create(self, int width, int height)"""
2180 return _core_.Image_Create(*args, **kwargs)
2181
2182 def Destroy(*args, **kwargs):
2183 """
2184 Destroy(self)
2185
2186 Deletes the C++ object this Python object is a proxy for.
2187 """
2188 return _core_.Image_Destroy(*args, **kwargs)
2189
2190 def Scale(*args, **kwargs):
2191 """Scale(self, int width, int height) -> Image"""
2192 return _core_.Image_Scale(*args, **kwargs)
2193
2194 def ShrinkBy(*args, **kwargs):
2195 """ShrinkBy(self, int xFactor, int yFactor) -> Image"""
2196 return _core_.Image_ShrinkBy(*args, **kwargs)
2197
2198 def Rescale(*args, **kwargs):
2199 """Rescale(self, int width, int height) -> Image"""
2200 return _core_.Image_Rescale(*args, **kwargs)
2201
2202 def Resize(*args, **kwargs):
2203 """Resize(self, Size size, Point pos, int r=-1, int g=-1, int b=-1) -> Image"""
2204 return _core_.Image_Resize(*args, **kwargs)
2205
2206 def SetRGB(*args, **kwargs):
2207 """SetRGB(self, int x, int y, unsigned char r, unsigned char g, unsigned char b)"""
2208 return _core_.Image_SetRGB(*args, **kwargs)
2209
2210 def SetRGBRect(*args, **kwargs):
2211 """SetRGBRect(self, Rect rect, unsigned char r, unsigned char g, unsigned char b)"""
2212 return _core_.Image_SetRGBRect(*args, **kwargs)
2213
2214 def GetRed(*args, **kwargs):
2215 """GetRed(self, int x, int y) -> unsigned char"""
2216 return _core_.Image_GetRed(*args, **kwargs)
2217
2218 def GetGreen(*args, **kwargs):
2219 """GetGreen(self, int x, int y) -> unsigned char"""
2220 return _core_.Image_GetGreen(*args, **kwargs)
2221
2222 def GetBlue(*args, **kwargs):
2223 """GetBlue(self, int x, int y) -> unsigned char"""
2224 return _core_.Image_GetBlue(*args, **kwargs)
2225
2226 def SetAlpha(*args, **kwargs):
2227 """SetAlpha(self, int x, int y, unsigned char alpha)"""
2228 return _core_.Image_SetAlpha(*args, **kwargs)
2229
2230 def GetAlpha(*args, **kwargs):
2231 """GetAlpha(self, int x, int y) -> unsigned char"""
2232 return _core_.Image_GetAlpha(*args, **kwargs)
2233
2234 def HasAlpha(*args, **kwargs):
2235 """HasAlpha(self) -> bool"""
2236 return _core_.Image_HasAlpha(*args, **kwargs)
2237
2238 def InitAlpha(*args, **kwargs):
2239 """
2240 InitAlpha(self)
2241
2242 Initializes the image alpha channel data. It is an error to call it if
2243 the image already has alpha data. If it doesn't, alpha data will be by
2244 default initialized to all pixels being fully opaque. But if the image
2245 has a a mask colour, all mask pixels will be completely transparent.
2246 """
2247 return _core_.Image_InitAlpha(*args, **kwargs)
2248
2249 def IsTransparent(*args, **kwargs):
2250 """
2251 IsTransparent(self, int x, int y, unsigned char threshold=IMAGE_ALPHA_THRESHOLD) -> bool
2252
2253 Returns True if this pixel is masked or has an alpha value less than
2254 the spcified threshold.
2255 """
2256 return _core_.Image_IsTransparent(*args, **kwargs)
2257
2258 def FindFirstUnusedColour(*args, **kwargs):
2259 """
2260 FindFirstUnusedColour(int startR=1, int startG=0, int startB=0) -> (success, r, g, b)
2261
2262 Find first colour that is not used in the image and has higher RGB
2263 values than startR, startG, startB. Returns a tuple consisting of a
2264 success flag and rgb values.
2265 """
2266 return _core_.Image_FindFirstUnusedColour(*args, **kwargs)
2267
2268 def ConvertAlphaToMask(*args, **kwargs):
2269 """
2270 ConvertAlphaToMask(self, byte threshold=IMAGE_ALPHA_THRESHOLD) -> bool
2271
2272 If the image has alpha channel, this method converts it to mask. All pixels
2273 with alpha value less than ``threshold`` are replaced with mask colour and the
2274 alpha channel is removed. Mask colour is chosen automatically using
2275 `FindFirstUnusedColour`.
2276
2277 If the image image doesn't have alpha channel, ConvertAlphaToMask does
2278 nothing.
2279 """
2280 return _core_.Image_ConvertAlphaToMask(*args, **kwargs)
2281
2282 def ConvertColourToAlpha(*args, **kwargs):
2283 """
2284 ConvertColourToAlpha(self, unsigned char r, unsigned char g, unsigned char b) -> bool
2285
2286 This method converts an image where the original alpha information is
2287 only available as a shades of a colour (actually shades of grey)
2288 typically when you draw anti-aliased text into a bitmap. The DC
2289 drawing routines draw grey values on the black background although
2290 they actually mean to draw white with differnt alpha values. This
2291 method reverses it, assuming a black (!) background and white text.
2292 The method will then fill up the whole image with the colour given.
2293 """
2294 return _core_.Image_ConvertColourToAlpha(*args, **kwargs)
2295
2296 def SetMaskFromImage(*args, **kwargs):
2297 """SetMaskFromImage(self, Image mask, byte mr, byte mg, byte mb) -> bool"""
2298 return _core_.Image_SetMaskFromImage(*args, **kwargs)
2299
2300 def CanRead(*args, **kwargs):
2301 """CanRead(String name) -> bool"""
2302 return _core_.Image_CanRead(*args, **kwargs)
2303
2304 CanRead = staticmethod(CanRead)
2305 def GetImageCount(*args, **kwargs):
2306 """GetImageCount(String name, long type=BITMAP_TYPE_ANY) -> int"""
2307 return _core_.Image_GetImageCount(*args, **kwargs)
2308
2309 GetImageCount = staticmethod(GetImageCount)
2310 def LoadFile(*args, **kwargs):
2311 """LoadFile(self, String name, long type=BITMAP_TYPE_ANY, int index=-1) -> bool"""
2312 return _core_.Image_LoadFile(*args, **kwargs)
2313
2314 def LoadMimeFile(*args, **kwargs):
2315 """LoadMimeFile(self, String name, String mimetype, int index=-1) -> bool"""
2316 return _core_.Image_LoadMimeFile(*args, **kwargs)
2317
2318 def SaveFile(*args, **kwargs):
2319 """SaveFile(self, String name, int type) -> bool"""
2320 return _core_.Image_SaveFile(*args, **kwargs)
2321
2322 def SaveMimeFile(*args, **kwargs):
2323 """SaveMimeFile(self, String name, String mimetype) -> bool"""
2324 return _core_.Image_SaveMimeFile(*args, **kwargs)
2325
2326 def CanReadStream(*args, **kwargs):
2327 """CanReadStream(InputStream stream) -> bool"""
2328 return _core_.Image_CanReadStream(*args, **kwargs)
2329
2330 CanReadStream = staticmethod(CanReadStream)
2331 def LoadStream(*args, **kwargs):
2332 """LoadStream(self, InputStream stream, long type=BITMAP_TYPE_ANY, int index=-1) -> bool"""
2333 return _core_.Image_LoadStream(*args, **kwargs)
2334
2335 def LoadMimeStream(*args, **kwargs):
2336 """LoadMimeStream(self, InputStream stream, String mimetype, int index=-1) -> bool"""
2337 return _core_.Image_LoadMimeStream(*args, **kwargs)
2338
2339 def Ok(*args, **kwargs):
2340 """Ok(self) -> bool"""
2341 return _core_.Image_Ok(*args, **kwargs)
2342
2343 def GetWidth(*args, **kwargs):
2344 """GetWidth(self) -> int"""
2345 return _core_.Image_GetWidth(*args, **kwargs)
2346
2347 def GetHeight(*args, **kwargs):
2348 """GetHeight(self) -> int"""
2349 return _core_.Image_GetHeight(*args, **kwargs)
2350
2351 def GetSize(*args, **kwargs):
2352 """GetSize(self) -> Size"""
2353 return _core_.Image_GetSize(*args, **kwargs)
2354
2355 def GetSubImage(*args, **kwargs):
2356 """GetSubImage(self, Rect rect) -> Image"""
2357 return _core_.Image_GetSubImage(*args, **kwargs)
2358
2359 def Size(*args, **kwargs):
2360 """Size(self, Size size, Point pos, int r=-1, int g=-1, int b=-1) -> Image"""
2361 return _core_.Image_Size(*args, **kwargs)
2362
2363 def Copy(*args, **kwargs):
2364 """Copy(self) -> Image"""
2365 return _core_.Image_Copy(*args, **kwargs)
2366
2367 def Paste(*args, **kwargs):
2368 """Paste(self, Image image, int x, int y)"""
2369 return _core_.Image_Paste(*args, **kwargs)
2370
2371 def GetData(*args, **kwargs):
2372 """
2373 GetData(self) -> PyObject
2374
2375 Returns a string containing a copy of the RGB bytes of the image.
2376 """
2377 return _core_.Image_GetData(*args, **kwargs)
2378
2379 def SetData(*args, **kwargs):
2380 """
2381 SetData(self, buffer data)
2382
2383 Resets the Image's RGB data from a buffer of RGB bytes. Accepts
2384 either a string or a buffer object holding the data and the length of
2385 the data must be width*height*3.
2386 """
2387 return _core_.Image_SetData(*args, **kwargs)
2388
2389 def GetDataBuffer(*args, **kwargs):
2390 """
2391 GetDataBuffer(self) -> PyObject
2392
2393 Returns a writable Python buffer object that is pointing at the RGB
2394 image data buffer inside the wx.Image.
2395 """
2396 return _core_.Image_GetDataBuffer(*args, **kwargs)
2397
2398 def SetDataBuffer(*args, **kwargs):
2399 """
2400 SetDataBuffer(self, buffer data)
2401
2402 Sets the internal image data pointer to point at a Python buffer
2403 object. This can save a copy of the data but you must ensure that the
2404 buffer object lives longer than the wx.Image does.
2405 """
2406 return _core_.Image_SetDataBuffer(*args, **kwargs)
2407
2408 def GetAlphaData(*args, **kwargs):
2409 """
2410 GetAlphaData(self) -> PyObject
2411
2412 Returns a string containing a copy of the alpha bytes of the image.
2413 """
2414 return _core_.Image_GetAlphaData(*args, **kwargs)
2415
2416 def SetAlphaData(*args, **kwargs):
2417 """
2418 SetAlphaData(self, buffer alpha)
2419
2420 Resets the Image's alpha data from a buffer of bytes. Accepts either
2421 a string or a buffer object holding the data and the length of the
2422 data must be width*height.
2423 """
2424 return _core_.Image_SetAlphaData(*args, **kwargs)
2425
2426 def GetAlphaBuffer(*args, **kwargs):
2427 """GetAlphaBuffer(self) -> PyObject"""
2428 return _core_.Image_GetAlphaBuffer(*args, **kwargs)
2429
2430 def SetAlphaBuffer(*args, **kwargs):
2431 """SetAlphaBuffer(self, buffer alpha)"""
2432 return _core_.Image_SetAlphaBuffer(*args, **kwargs)
2433
2434 def SetMaskColour(*args, **kwargs):
2435 """SetMaskColour(self, unsigned char r, unsigned char g, unsigned char b)"""
2436 return _core_.Image_SetMaskColour(*args, **kwargs)
2437
2438 def GetOrFindMaskColour(*args, **kwargs):
2439 """
2440 GetOrFindMaskColour() -> (r,g,b)
2441
2442 Get the current mask colour or find a suitable colour.
2443 """
2444 return _core_.Image_GetOrFindMaskColour(*args, **kwargs)
2445
2446 def GetMaskRed(*args, **kwargs):
2447 """GetMaskRed(self) -> unsigned char"""
2448 return _core_.Image_GetMaskRed(*args, **kwargs)
2449
2450 def GetMaskGreen(*args, **kwargs):
2451 """GetMaskGreen(self) -> unsigned char"""
2452 return _core_.Image_GetMaskGreen(*args, **kwargs)
2453
2454 def GetMaskBlue(*args, **kwargs):
2455 """GetMaskBlue(self) -> unsigned char"""
2456 return _core_.Image_GetMaskBlue(*args, **kwargs)
2457
2458 def SetMask(*args, **kwargs):
2459 """SetMask(self, bool mask=True)"""
2460 return _core_.Image_SetMask(*args, **kwargs)
2461
2462 def HasMask(*args, **kwargs):
2463 """HasMask(self) -> bool"""
2464 return _core_.Image_HasMask(*args, **kwargs)
2465
2466 def Rotate(*args, **kwargs):
2467 """
2468 Rotate(self, double angle, Point centre_of_rotation, bool interpolating=True,
2469 Point offset_after_rotation=None) -> Image
2470 """
2471 return _core_.Image_Rotate(*args, **kwargs)
2472
2473 def Rotate90(*args, **kwargs):
2474 """Rotate90(self, bool clockwise=True) -> Image"""
2475 return _core_.Image_Rotate90(*args, **kwargs)
2476
2477 def Mirror(*args, **kwargs):
2478 """Mirror(self, bool horizontally=True) -> Image"""
2479 return _core_.Image_Mirror(*args, **kwargs)
2480
2481 def Replace(*args, **kwargs):
2482 """
2483 Replace(self, unsigned char r1, unsigned char g1, unsigned char b1,
2484 unsigned char r2, unsigned char g2, unsigned char b2)
2485 """
2486 return _core_.Image_Replace(*args, **kwargs)
2487
2488 def ConvertToMono(*args, **kwargs):
2489 """ConvertToMono(self, unsigned char r, unsigned char g, unsigned char b) -> Image"""
2490 return _core_.Image_ConvertToMono(*args, **kwargs)
2491
2492 def SetOption(*args, **kwargs):
2493 """SetOption(self, String name, String value)"""
2494 return _core_.Image_SetOption(*args, **kwargs)
2495
2496 def SetOptionInt(*args, **kwargs):
2497 """SetOptionInt(self, String name, int value)"""
2498 return _core_.Image_SetOptionInt(*args, **kwargs)
2499
2500 def GetOption(*args, **kwargs):
2501 """GetOption(self, String name) -> String"""
2502 return _core_.Image_GetOption(*args, **kwargs)
2503
2504 def GetOptionInt(*args, **kwargs):
2505 """GetOptionInt(self, String name) -> int"""
2506 return _core_.Image_GetOptionInt(*args, **kwargs)
2507
2508 def HasOption(*args, **kwargs):
2509 """HasOption(self, String name) -> bool"""
2510 return _core_.Image_HasOption(*args, **kwargs)
2511
2512 def CountColours(*args, **kwargs):
2513 """CountColours(self, unsigned long stopafter=(unsigned long) -1) -> unsigned long"""
2514 return _core_.Image_CountColours(*args, **kwargs)
2515
2516 def ComputeHistogram(*args, **kwargs):
2517 """ComputeHistogram(self, ImageHistogram h) -> unsigned long"""
2518 return _core_.Image_ComputeHistogram(*args, **kwargs)
2519
2520 def AddHandler(*args, **kwargs):
2521 """AddHandler(ImageHandler handler)"""
2522 return _core_.Image_AddHandler(*args, **kwargs)
2523
2524 AddHandler = staticmethod(AddHandler)
2525 def InsertHandler(*args, **kwargs):
2526 """InsertHandler(ImageHandler handler)"""
2527 return _core_.Image_InsertHandler(*args, **kwargs)
2528
2529 InsertHandler = staticmethod(InsertHandler)
2530 def RemoveHandler(*args, **kwargs):
2531 """RemoveHandler(String name) -> bool"""
2532 return _core_.Image_RemoveHandler(*args, **kwargs)
2533
2534 RemoveHandler = staticmethod(RemoveHandler)
2535 def GetImageExtWildcard(*args, **kwargs):
2536 """GetImageExtWildcard() -> String"""
2537 return _core_.Image_GetImageExtWildcard(*args, **kwargs)
2538
2539 GetImageExtWildcard = staticmethod(GetImageExtWildcard)
2540 def ConvertToBitmap(*args, **kwargs):
2541 """ConvertToBitmap(self, int depth=-1) -> Bitmap"""
2542 return _core_.Image_ConvertToBitmap(*args, **kwargs)
2543
2544 def ConvertToMonoBitmap(*args, **kwargs):
2545 """ConvertToMonoBitmap(self, unsigned char red, unsigned char green, unsigned char blue) -> Bitmap"""
2546 return _core_.Image_ConvertToMonoBitmap(*args, **kwargs)
2547
2548 def __nonzero__(self): return self.Ok()
2549
2550 class ImagePtr(Image):
2551 def __init__(self, this):
2552 self.this = this
2553 if not hasattr(self,"thisown"): self.thisown = 0
2554 self.__class__ = Image
2555 _core_.Image_swigregister(ImagePtr)
2556
2557 def ImageFromMime(*args, **kwargs):
2558 """ImageFromMime(String name, String mimetype, int index=-1) -> Image"""
2559 val = _core_.new_ImageFromMime(*args, **kwargs)
2560 val.thisown = 1
2561 return val
2562
2563 def ImageFromStream(*args, **kwargs):
2564 """ImageFromStream(InputStream stream, long type=BITMAP_TYPE_ANY, int index=-1) -> Image"""
2565 val = _core_.new_ImageFromStream(*args, **kwargs)
2566 val.thisown = 1
2567 return val
2568
2569 def ImageFromStreamMime(*args, **kwargs):
2570 """ImageFromStreamMime(InputStream stream, String mimetype, int index=-1) -> Image"""
2571 val = _core_.new_ImageFromStreamMime(*args, **kwargs)
2572 val.thisown = 1
2573 return val
2574
2575 def EmptyImage(*args, **kwargs):
2576 """
2577 EmptyImage(int width=0, int height=0, bool clear=True) -> Image
2578
2579 Construct an empty image of a given size, optionally setting all
2580 pixels to black.
2581 """
2582 val = _core_.new_EmptyImage(*args, **kwargs)
2583 val.thisown = 1
2584 return val
2585
2586 def ImageFromBitmap(*args, **kwargs):
2587 """
2588 ImageFromBitmap(Bitmap bitmap) -> Image
2589
2590 Construct an Image from a `wx.Bitmap`.
2591 """
2592 val = _core_.new_ImageFromBitmap(*args, **kwargs)
2593 val.thisown = 1
2594 return val
2595
2596 def ImageFromData(*args, **kwargs):
2597 """
2598 ImageFromData(int width, int height, buffer data) -> Image
2599
2600 Construct an Image from a buffer of RGB bytes. Accepts either a
2601 string or a buffer object holding the data and the length of the data
2602 must be width*height*3.
2603 """
2604 val = _core_.new_ImageFromData(*args, **kwargs)
2605 val.thisown = 1
2606 return val
2607
2608 def ImageFromDataWithAlpha(*args, **kwargs):
2609 """
2610 ImageFromDataWithAlpha(int width, int height, buffer data, buffer alpha) -> Image
2611
2612 Construct an Image from a buffer of RGB bytes with an Alpha channel.
2613 Accepts either a string or a buffer object holding the data and the
2614 length of the data must be width*height*3.
2615 """
2616 val = _core_.new_ImageFromDataWithAlpha(*args, **kwargs)
2617 val.thisown = 1
2618 return val
2619
2620 def Image_CanRead(*args, **kwargs):
2621 """Image_CanRead(String name) -> bool"""
2622 return _core_.Image_CanRead(*args, **kwargs)
2623
2624 def Image_GetImageCount(*args, **kwargs):
2625 """Image_GetImageCount(String name, long type=BITMAP_TYPE_ANY) -> int"""
2626 return _core_.Image_GetImageCount(*args, **kwargs)
2627
2628 def Image_CanReadStream(*args, **kwargs):
2629 """Image_CanReadStream(InputStream stream) -> bool"""
2630 return _core_.Image_CanReadStream(*args, **kwargs)
2631
2632 def Image_AddHandler(*args, **kwargs):
2633 """Image_AddHandler(ImageHandler handler)"""
2634 return _core_.Image_AddHandler(*args, **kwargs)
2635
2636 def Image_InsertHandler(*args, **kwargs):
2637 """Image_InsertHandler(ImageHandler handler)"""
2638 return _core_.Image_InsertHandler(*args, **kwargs)
2639
2640 def Image_RemoveHandler(*args, **kwargs):
2641 """Image_RemoveHandler(String name) -> bool"""
2642 return _core_.Image_RemoveHandler(*args, **kwargs)
2643
2644 def Image_GetImageExtWildcard(*args, **kwargs):
2645 """Image_GetImageExtWildcard() -> String"""
2646 return _core_.Image_GetImageExtWildcard(*args, **kwargs)
2647
2648 def InitAllImageHandlers():
2649 """
2650 The former functionality of InitAllImageHanders is now done internal to
2651 the _core_ extension module and so this function has become a simple NOP.
2652 """
2653 pass
2654
2655 IMAGE_RESOLUTION_INCHES = _core_.IMAGE_RESOLUTION_INCHES
2656 IMAGE_RESOLUTION_CM = _core_.IMAGE_RESOLUTION_CM
2657 PNG_TYPE_COLOUR = _core_.PNG_TYPE_COLOUR
2658 PNG_TYPE_GREY = _core_.PNG_TYPE_GREY
2659 PNG_TYPE_GREY_RED = _core_.PNG_TYPE_GREY_RED
2660 BMP_24BPP = _core_.BMP_24BPP
2661 BMP_8BPP = _core_.BMP_8BPP
2662 BMP_8BPP_GREY = _core_.BMP_8BPP_GREY
2663 BMP_8BPP_GRAY = _core_.BMP_8BPP_GRAY
2664 BMP_8BPP_RED = _core_.BMP_8BPP_RED
2665 BMP_8BPP_PALETTE = _core_.BMP_8BPP_PALETTE
2666 BMP_4BPP = _core_.BMP_4BPP
2667 BMP_1BPP = _core_.BMP_1BPP
2668 BMP_1BPP_BW = _core_.BMP_1BPP_BW
2669 class BMPHandler(ImageHandler):
2670 """Proxy of C++ BMPHandler class"""
2671 def __repr__(self):
2672 return "<%s.%s; proxy of C++ wxBMPHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
2673 def __init__(self, *args, **kwargs):
2674 """__init__(self) -> BMPHandler"""
2675 newobj = _core_.new_BMPHandler(*args, **kwargs)
2676 self.this = newobj.this
2677 self.thisown = 1
2678 del newobj.thisown
2679
2680 class BMPHandlerPtr(BMPHandler):
2681 def __init__(self, this):
2682 self.this = this
2683 if not hasattr(self,"thisown"): self.thisown = 0
2684 self.__class__ = BMPHandler
2685 _core_.BMPHandler_swigregister(BMPHandlerPtr)
2686 NullImage = cvar.NullImage
2687 IMAGE_OPTION_FILENAME = cvar.IMAGE_OPTION_FILENAME
2688 IMAGE_OPTION_BMP_FORMAT = cvar.IMAGE_OPTION_BMP_FORMAT
2689 IMAGE_OPTION_CUR_HOTSPOT_X = cvar.IMAGE_OPTION_CUR_HOTSPOT_X
2690 IMAGE_OPTION_CUR_HOTSPOT_Y = cvar.IMAGE_OPTION_CUR_HOTSPOT_Y
2691 IMAGE_OPTION_RESOLUTION = cvar.IMAGE_OPTION_RESOLUTION
2692 IMAGE_OPTION_RESOLUTIONX = cvar.IMAGE_OPTION_RESOLUTIONX
2693 IMAGE_OPTION_RESOLUTIONY = cvar.IMAGE_OPTION_RESOLUTIONY
2694 IMAGE_OPTION_RESOLUTIONUNIT = cvar.IMAGE_OPTION_RESOLUTIONUNIT
2695 IMAGE_OPTION_QUALITY = cvar.IMAGE_OPTION_QUALITY
2696 IMAGE_OPTION_BITSPERSAMPLE = cvar.IMAGE_OPTION_BITSPERSAMPLE
2697 IMAGE_OPTION_SAMPLESPERPIXEL = cvar.IMAGE_OPTION_SAMPLESPERPIXEL
2698 IMAGE_OPTION_COMPRESSION = cvar.IMAGE_OPTION_COMPRESSION
2699 IMAGE_OPTION_IMAGEDESCRIPTOR = cvar.IMAGE_OPTION_IMAGEDESCRIPTOR
2700 IMAGE_OPTION_PNG_FORMAT = cvar.IMAGE_OPTION_PNG_FORMAT
2701 IMAGE_OPTION_PNG_BITDEPTH = cvar.IMAGE_OPTION_PNG_BITDEPTH
2702
2703 class ICOHandler(BMPHandler):
2704 """Proxy of C++ ICOHandler class"""
2705 def __repr__(self):
2706 return "<%s.%s; proxy of C++ wxICOHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
2707 def __init__(self, *args, **kwargs):
2708 """__init__(self) -> ICOHandler"""
2709 newobj = _core_.new_ICOHandler(*args, **kwargs)
2710 self.this = newobj.this
2711 self.thisown = 1
2712 del newobj.thisown
2713
2714 class ICOHandlerPtr(ICOHandler):
2715 def __init__(self, this):
2716 self.this = this
2717 if not hasattr(self,"thisown"): self.thisown = 0
2718 self.__class__ = ICOHandler
2719 _core_.ICOHandler_swigregister(ICOHandlerPtr)
2720
2721 class CURHandler(ICOHandler):
2722 """Proxy of C++ CURHandler class"""
2723 def __repr__(self):
2724 return "<%s.%s; proxy of C++ wxCURHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
2725 def __init__(self, *args, **kwargs):
2726 """__init__(self) -> CURHandler"""
2727 newobj = _core_.new_CURHandler(*args, **kwargs)
2728 self.this = newobj.this
2729 self.thisown = 1
2730 del newobj.thisown
2731
2732 class CURHandlerPtr(CURHandler):
2733 def __init__(self, this):
2734 self.this = this
2735 if not hasattr(self,"thisown"): self.thisown = 0
2736 self.__class__ = CURHandler
2737 _core_.CURHandler_swigregister(CURHandlerPtr)
2738
2739 class ANIHandler(CURHandler):
2740 """Proxy of C++ ANIHandler class"""
2741 def __repr__(self):
2742 return "<%s.%s; proxy of C++ wxANIHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
2743 def __init__(self, *args, **kwargs):
2744 """__init__(self) -> ANIHandler"""
2745 newobj = _core_.new_ANIHandler(*args, **kwargs)
2746 self.this = newobj.this
2747 self.thisown = 1
2748 del newobj.thisown
2749
2750 class ANIHandlerPtr(ANIHandler):
2751 def __init__(self, this):
2752 self.this = this
2753 if not hasattr(self,"thisown"): self.thisown = 0
2754 self.__class__ = ANIHandler
2755 _core_.ANIHandler_swigregister(ANIHandlerPtr)
2756
2757 class PNGHandler(ImageHandler):
2758 """Proxy of C++ PNGHandler class"""
2759 def __repr__(self):
2760 return "<%s.%s; proxy of C++ wxPNGHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
2761 def __init__(self, *args, **kwargs):
2762 """__init__(self) -> PNGHandler"""
2763 newobj = _core_.new_PNGHandler(*args, **kwargs)
2764 self.this = newobj.this
2765 self.thisown = 1
2766 del newobj.thisown
2767
2768 class PNGHandlerPtr(PNGHandler):
2769 def __init__(self, this):
2770 self.this = this
2771 if not hasattr(self,"thisown"): self.thisown = 0
2772 self.__class__ = PNGHandler
2773 _core_.PNGHandler_swigregister(PNGHandlerPtr)
2774
2775 class GIFHandler(ImageHandler):
2776 """Proxy of C++ GIFHandler class"""
2777 def __repr__(self):
2778 return "<%s.%s; proxy of C++ wxGIFHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
2779 def __init__(self, *args, **kwargs):
2780 """__init__(self) -> GIFHandler"""
2781 newobj = _core_.new_GIFHandler(*args, **kwargs)
2782 self.this = newobj.this
2783 self.thisown = 1
2784 del newobj.thisown
2785
2786 class GIFHandlerPtr(GIFHandler):
2787 def __init__(self, this):
2788 self.this = this
2789 if not hasattr(self,"thisown"): self.thisown = 0
2790 self.__class__ = GIFHandler
2791 _core_.GIFHandler_swigregister(GIFHandlerPtr)
2792
2793 class PCXHandler(ImageHandler):
2794 """Proxy of C++ PCXHandler class"""
2795 def __repr__(self):
2796 return "<%s.%s; proxy of C++ wxPCXHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
2797 def __init__(self, *args, **kwargs):
2798 """__init__(self) -> PCXHandler"""
2799 newobj = _core_.new_PCXHandler(*args, **kwargs)
2800 self.this = newobj.this
2801 self.thisown = 1
2802 del newobj.thisown
2803
2804 class PCXHandlerPtr(PCXHandler):
2805 def __init__(self, this):
2806 self.this = this
2807 if not hasattr(self,"thisown"): self.thisown = 0
2808 self.__class__ = PCXHandler
2809 _core_.PCXHandler_swigregister(PCXHandlerPtr)
2810
2811 class JPEGHandler(ImageHandler):
2812 """Proxy of C++ JPEGHandler class"""
2813 def __repr__(self):
2814 return "<%s.%s; proxy of C++ wxJPEGHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
2815 def __init__(self, *args, **kwargs):
2816 """__init__(self) -> JPEGHandler"""
2817 newobj = _core_.new_JPEGHandler(*args, **kwargs)
2818 self.this = newobj.this
2819 self.thisown = 1
2820 del newobj.thisown
2821
2822 class JPEGHandlerPtr(JPEGHandler):
2823 def __init__(self, this):
2824 self.this = this
2825 if not hasattr(self,"thisown"): self.thisown = 0
2826 self.__class__ = JPEGHandler
2827 _core_.JPEGHandler_swigregister(JPEGHandlerPtr)
2828
2829 class PNMHandler(ImageHandler):
2830 """Proxy of C++ PNMHandler class"""
2831 def __repr__(self):
2832 return "<%s.%s; proxy of C++ wxPNMHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
2833 def __init__(self, *args, **kwargs):
2834 """__init__(self) -> PNMHandler"""
2835 newobj = _core_.new_PNMHandler(*args, **kwargs)
2836 self.this = newobj.this
2837 self.thisown = 1
2838 del newobj.thisown
2839
2840 class PNMHandlerPtr(PNMHandler):
2841 def __init__(self, this):
2842 self.this = this
2843 if not hasattr(self,"thisown"): self.thisown = 0
2844 self.__class__ = PNMHandler
2845 _core_.PNMHandler_swigregister(PNMHandlerPtr)
2846
2847 class XPMHandler(ImageHandler):
2848 """Proxy of C++ XPMHandler class"""
2849 def __repr__(self):
2850 return "<%s.%s; proxy of C++ wxXPMHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
2851 def __init__(self, *args, **kwargs):
2852 """__init__(self) -> XPMHandler"""
2853 newobj = _core_.new_XPMHandler(*args, **kwargs)
2854 self.this = newobj.this
2855 self.thisown = 1
2856 del newobj.thisown
2857
2858 class XPMHandlerPtr(XPMHandler):
2859 def __init__(self, this):
2860 self.this = this
2861 if not hasattr(self,"thisown"): self.thisown = 0
2862 self.__class__ = XPMHandler
2863 _core_.XPMHandler_swigregister(XPMHandlerPtr)
2864
2865 class TIFFHandler(ImageHandler):
2866 """Proxy of C++ TIFFHandler class"""
2867 def __repr__(self):
2868 return "<%s.%s; proxy of C++ wxTIFFHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
2869 def __init__(self, *args, **kwargs):
2870 """__init__(self) -> TIFFHandler"""
2871 newobj = _core_.new_TIFFHandler(*args, **kwargs)
2872 self.this = newobj.this
2873 self.thisown = 1
2874 del newobj.thisown
2875
2876 class TIFFHandlerPtr(TIFFHandler):
2877 def __init__(self, this):
2878 self.this = this
2879 if not hasattr(self,"thisown"): self.thisown = 0
2880 self.__class__ = TIFFHandler
2881 _core_.TIFFHandler_swigregister(TIFFHandlerPtr)
2882
2883 QUANTIZE_INCLUDE_WINDOWS_COLOURS = _core_.QUANTIZE_INCLUDE_WINDOWS_COLOURS
2884 QUANTIZE_FILL_DESTINATION_IMAGE = _core_.QUANTIZE_FILL_DESTINATION_IMAGE
2885 class Quantize(object):
2886 """Performs quantization, or colour reduction, on a wxImage."""
2887 def __init__(self): raise RuntimeError, "No constructor defined"
2888 def __repr__(self):
2889 return "<%s.%s; proxy of C++ wxQuantize instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
2890 def Quantize(*args, **kwargs):
2891 """
2892 Quantize(Image src, Image dest, int desiredNoColours=236, int flags=wxQUANTIZE_INCLUDE_WINDOWS_COLOURS|wxQUANTIZE_FILL_DESTINATION_IMAGE) -> bool
2893
2894 Reduce the colours in the source image and put the result into the
2895 destination image, setting the palette in the destination if
2896 needed. Both images may be the same, to overwrite the source image.
2897 """
2898 return _core_.Quantize_Quantize(*args, **kwargs)
2899
2900 Quantize = staticmethod(Quantize)
2901
2902 class QuantizePtr(Quantize):
2903 def __init__(self, this):
2904 self.this = this
2905 if not hasattr(self,"thisown"): self.thisown = 0
2906 self.__class__ = Quantize
2907 _core_.Quantize_swigregister(QuantizePtr)
2908
2909 def Quantize_Quantize(*args, **kwargs):
2910 """
2911 Quantize_Quantize(Image src, Image dest, int desiredNoColours=236, int flags=wxQUANTIZE_INCLUDE_WINDOWS_COLOURS|wxQUANTIZE_FILL_DESTINATION_IMAGE) -> bool
2912
2913 Reduce the colours in the source image and put the result into the
2914 destination image, setting the palette in the destination if
2915 needed. Both images may be the same, to overwrite the source image.
2916 """
2917 return _core_.Quantize_Quantize(*args, **kwargs)
2918
2919 #---------------------------------------------------------------------------
2920
2921 class EvtHandler(Object):
2922 """Proxy of C++ EvtHandler class"""
2923 def __repr__(self):
2924 return "<%s.%s; proxy of C++ wxEvtHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
2925 def __init__(self, *args, **kwargs):
2926 """__init__(self) -> EvtHandler"""
2927 newobj = _core_.new_EvtHandler(*args, **kwargs)
2928 self.this = newobj.this
2929 self.thisown = 1
2930 del newobj.thisown
2931 def GetNextHandler(*args, **kwargs):
2932 """GetNextHandler(self) -> EvtHandler"""
2933 return _core_.EvtHandler_GetNextHandler(*args, **kwargs)
2934
2935 def GetPreviousHandler(*args, **kwargs):
2936 """GetPreviousHandler(self) -> EvtHandler"""
2937 return _core_.EvtHandler_GetPreviousHandler(*args, **kwargs)
2938
2939 def SetNextHandler(*args, **kwargs):
2940 """SetNextHandler(self, EvtHandler handler)"""
2941 return _core_.EvtHandler_SetNextHandler(*args, **kwargs)
2942
2943 def SetPreviousHandler(*args, **kwargs):
2944 """SetPreviousHandler(self, EvtHandler handler)"""
2945 return _core_.EvtHandler_SetPreviousHandler(*args, **kwargs)
2946
2947 def GetEvtHandlerEnabled(*args, **kwargs):
2948 """GetEvtHandlerEnabled(self) -> bool"""
2949 return _core_.EvtHandler_GetEvtHandlerEnabled(*args, **kwargs)
2950
2951 def SetEvtHandlerEnabled(*args, **kwargs):
2952 """SetEvtHandlerEnabled(self, bool enabled)"""
2953 return _core_.EvtHandler_SetEvtHandlerEnabled(*args, **kwargs)
2954
2955 def ProcessEvent(*args, **kwargs):
2956 """ProcessEvent(self, Event event) -> bool"""
2957 return _core_.EvtHandler_ProcessEvent(*args, **kwargs)
2958
2959 def AddPendingEvent(*args, **kwargs):
2960 """AddPendingEvent(self, Event event)"""
2961 return _core_.EvtHandler_AddPendingEvent(*args, **kwargs)
2962
2963 def ProcessPendingEvents(*args, **kwargs):
2964 """ProcessPendingEvents(self)"""
2965 return _core_.EvtHandler_ProcessPendingEvents(*args, **kwargs)
2966
2967 def Connect(*args, **kwargs):
2968 """Connect(self, int id, int lastId, int eventType, PyObject func)"""
2969 return _core_.EvtHandler_Connect(*args, **kwargs)
2970
2971 def Disconnect(*args, **kwargs):
2972 """Disconnect(self, int id, int lastId=-1, wxEventType eventType=wxEVT_NULL) -> bool"""
2973 return _core_.EvtHandler_Disconnect(*args, **kwargs)
2974
2975 def _setOORInfo(*args, **kwargs):
2976 """_setOORInfo(self, PyObject _self, bool incref=True)"""
2977 return _core_.EvtHandler__setOORInfo(*args, **kwargs)
2978
2979 def Bind(self, event, handler, source=None, id=wx.ID_ANY, id2=wx.ID_ANY):
2980 """
2981 Bind an event to an event handler.
2982
2983 :param event: One of the EVT_* objects that specifies the
2984 type of event to bind,
2985
2986 :param handler: A callable object to be invoked when the
2987 event is delivered to self. Pass None to
2988 disconnect an event handler.
2989
2990 :param source: Sometimes the event originates from a
2991 different window than self, but you still
2992 want to catch it in self. (For example, a
2993 button event delivered to a frame.) By
2994 passing the source of the event, the event
2995 handling system is able to differentiate
2996 between the same event type from different
2997 controls.
2998
2999 :param id: Used to spcify the event source by ID instead
3000 of instance.
3001
3002 :param id2: Used when it is desirable to bind a handler
3003 to a range of IDs, such as with EVT_MENU_RANGE.
3004 """
3005 if source is not None:
3006 id = source.GetId()
3007 event.Bind(self, id, id2, handler)
3008
3009 def Unbind(self, event, source=None, id=wx.ID_ANY, id2=wx.ID_ANY):
3010 """
3011 Disconencts the event handler binding for event from self.
3012 Returns True if successful.
3013 """
3014 if source is not None:
3015 id = source.GetId()
3016 return event.Unbind(self, id, id2)
3017
3018
3019 class EvtHandlerPtr(EvtHandler):
3020 def __init__(self, this):
3021 self.this = this
3022 if not hasattr(self,"thisown"): self.thisown = 0
3023 self.__class__ = EvtHandler
3024 _core_.EvtHandler_swigregister(EvtHandlerPtr)
3025
3026 #---------------------------------------------------------------------------
3027
3028 class PyEventBinder(object):
3029 """
3030 Instances of this class are used to bind specific events to event
3031 handlers.
3032 """
3033 def __init__(self, evtType, expectedIDs=0):
3034 if expectedIDs not in [0, 1, 2]:
3035 raise ValueError, "Invalid number of expectedIDs"
3036 self.expectedIDs = expectedIDs
3037
3038 if type(evtType) == list or type(evtType) == tuple:
3039 self.evtType = evtType
3040 else:
3041 self.evtType = [evtType]
3042
3043
3044 def Bind(self, target, id1, id2, function):
3045 """Bind this set of event types to target."""
3046 for et in self.evtType:
3047 target.Connect(id1, id2, et, function)
3048
3049
3050 def Unbind(self, target, id1, id2):
3051 """Remove an event binding."""
3052 success = 0
3053 for et in self.evtType:
3054 success += target.Disconnect(id1, id2, et)
3055 return success != 0
3056
3057
3058 def __call__(self, *args):
3059 """
3060 For backwards compatibility with the old EVT_* functions.
3061 Should be called with either (window, func), (window, ID,
3062 func) or (window, ID1, ID2, func) parameters depending on the
3063 type of the event.
3064 """
3065 assert len(args) == 2 + self.expectedIDs
3066 id1 = wx.ID_ANY
3067 id2 = wx.ID_ANY
3068 target = args[0]
3069 if self.expectedIDs == 0:
3070 func = args[1]
3071 elif self.expectedIDs == 1:
3072 id1 = args[1]
3073 func = args[2]
3074 elif self.expectedIDs == 2:
3075 id1 = args[1]
3076 id2 = args[2]
3077 func = args[3]
3078 else:
3079 raise ValueError, "Unexpected number of IDs"
3080
3081 self.Bind(target, id1, id2, func)
3082
3083
3084 # These two are square pegs that don't fit the PyEventBinder hole...
3085 def EVT_COMMAND(win, id, cmd, func):
3086 win.Connect(id, -1, cmd, func)
3087 def EVT_COMMAND_RANGE(win, id1, id2, cmd, func):
3088 win.Connect(id1, id2, cmd, func)
3089
3090
3091 #---------------------------------------------------------------------------
3092
3093 #---------------------------------------------------------------------------
3094
3095 EVENT_PROPAGATE_NONE = _core_.EVENT_PROPAGATE_NONE
3096 EVENT_PROPAGATE_MAX = _core_.EVENT_PROPAGATE_MAX
3097
3098 def NewEventType(*args, **kwargs):
3099 """NewEventType() -> wxEventType"""
3100 return _core_.NewEventType(*args, **kwargs)
3101 wxEVT_NULL = _core_.wxEVT_NULL
3102 wxEVT_FIRST = _core_.wxEVT_FIRST
3103 wxEVT_USER_FIRST = _core_.wxEVT_USER_FIRST
3104 wxEVT_COMMAND_BUTTON_CLICKED = _core_.wxEVT_COMMAND_BUTTON_CLICKED
3105 wxEVT_COMMAND_CHECKBOX_CLICKED = _core_.wxEVT_COMMAND_CHECKBOX_CLICKED
3106 wxEVT_COMMAND_CHOICE_SELECTED = _core_.wxEVT_COMMAND_CHOICE_SELECTED
3107 wxEVT_COMMAND_LISTBOX_SELECTED = _core_.wxEVT_COMMAND_LISTBOX_SELECTED
3108 wxEVT_COMMAND_LISTBOX_DOUBLECLICKED = _core_.wxEVT_COMMAND_LISTBOX_DOUBLECLICKED
3109 wxEVT_COMMAND_CHECKLISTBOX_TOGGLED = _core_.wxEVT_COMMAND_CHECKLISTBOX_TOGGLED
3110 wxEVT_COMMAND_MENU_SELECTED = _core_.wxEVT_COMMAND_MENU_SELECTED
3111 wxEVT_COMMAND_TOOL_CLICKED = _core_.wxEVT_COMMAND_TOOL_CLICKED
3112 wxEVT_COMMAND_SLIDER_UPDATED = _core_.wxEVT_COMMAND_SLIDER_UPDATED
3113 wxEVT_COMMAND_RADIOBOX_SELECTED = _core_.wxEVT_COMMAND_RADIOBOX_SELECTED
3114 wxEVT_COMMAND_RADIOBUTTON_SELECTED = _core_.wxEVT_COMMAND_RADIOBUTTON_SELECTED
3115 wxEVT_COMMAND_SCROLLBAR_UPDATED = _core_.wxEVT_COMMAND_SCROLLBAR_UPDATED
3116 wxEVT_COMMAND_VLBOX_SELECTED = _core_.wxEVT_COMMAND_VLBOX_SELECTED
3117 wxEVT_COMMAND_COMBOBOX_SELECTED = _core_.wxEVT_COMMAND_COMBOBOX_SELECTED
3118 wxEVT_COMMAND_TOOL_RCLICKED = _core_.wxEVT_COMMAND_TOOL_RCLICKED
3119 wxEVT_COMMAND_TOOL_ENTER = _core_.wxEVT_COMMAND_TOOL_ENTER
3120 wxEVT_LEFT_DOWN = _core_.wxEVT_LEFT_DOWN
3121 wxEVT_LEFT_UP = _core_.wxEVT_LEFT_UP
3122 wxEVT_MIDDLE_DOWN = _core_.wxEVT_MIDDLE_DOWN
3123 wxEVT_MIDDLE_UP = _core_.wxEVT_MIDDLE_UP
3124 wxEVT_RIGHT_DOWN = _core_.wxEVT_RIGHT_DOWN
3125 wxEVT_RIGHT_UP = _core_.wxEVT_RIGHT_UP
3126 wxEVT_MOTION = _core_.wxEVT_MOTION
3127 wxEVT_ENTER_WINDOW = _core_.wxEVT_ENTER_WINDOW
3128 wxEVT_LEAVE_WINDOW = _core_.wxEVT_LEAVE_WINDOW
3129 wxEVT_LEFT_DCLICK = _core_.wxEVT_LEFT_DCLICK
3130 wxEVT_MIDDLE_DCLICK = _core_.wxEVT_MIDDLE_DCLICK
3131 wxEVT_RIGHT_DCLICK = _core_.wxEVT_RIGHT_DCLICK
3132 wxEVT_SET_FOCUS = _core_.wxEVT_SET_FOCUS
3133 wxEVT_KILL_FOCUS = _core_.wxEVT_KILL_FOCUS
3134 wxEVT_CHILD_FOCUS = _core_.wxEVT_CHILD_FOCUS
3135 wxEVT_MOUSEWHEEL = _core_.wxEVT_MOUSEWHEEL
3136 wxEVT_NC_LEFT_DOWN = _core_.wxEVT_NC_LEFT_DOWN
3137 wxEVT_NC_LEFT_UP = _core_.wxEVT_NC_LEFT_UP
3138 wxEVT_NC_MIDDLE_DOWN = _core_.wxEVT_NC_MIDDLE_DOWN
3139 wxEVT_NC_MIDDLE_UP = _core_.wxEVT_NC_MIDDLE_UP
3140 wxEVT_NC_RIGHT_DOWN = _core_.wxEVT_NC_RIGHT_DOWN
3141 wxEVT_NC_RIGHT_UP = _core_.wxEVT_NC_RIGHT_UP
3142 wxEVT_NC_MOTION = _core_.wxEVT_NC_MOTION
3143 wxEVT_NC_ENTER_WINDOW = _core_.wxEVT_NC_ENTER_WINDOW
3144 wxEVT_NC_LEAVE_WINDOW = _core_.wxEVT_NC_LEAVE_WINDOW
3145 wxEVT_NC_LEFT_DCLICK = _core_.wxEVT_NC_LEFT_DCLICK
3146 wxEVT_NC_MIDDLE_DCLICK = _core_.wxEVT_NC_MIDDLE_DCLICK
3147 wxEVT_NC_RIGHT_DCLICK = _core_.wxEVT_NC_RIGHT_DCLICK
3148 wxEVT_CHAR = _core_.wxEVT_CHAR
3149 wxEVT_CHAR_HOOK = _core_.wxEVT_CHAR_HOOK
3150 wxEVT_NAVIGATION_KEY = _core_.wxEVT_NAVIGATION_KEY
3151 wxEVT_KEY_DOWN = _core_.wxEVT_KEY_DOWN
3152 wxEVT_KEY_UP = _core_.wxEVT_KEY_UP
3153 wxEVT_HOTKEY = _core_.wxEVT_HOTKEY
3154 wxEVT_SET_CURSOR = _core_.wxEVT_SET_CURSOR
3155 wxEVT_SCROLL_TOP = _core_.wxEVT_SCROLL_TOP
3156 wxEVT_SCROLL_BOTTOM = _core_.wxEVT_SCROLL_BOTTOM
3157 wxEVT_SCROLL_LINEUP = _core_.wxEVT_SCROLL_LINEUP
3158 wxEVT_SCROLL_LINEDOWN = _core_.wxEVT_SCROLL_LINEDOWN
3159 wxEVT_SCROLL_PAGEUP = _core_.wxEVT_SCROLL_PAGEUP
3160 wxEVT_SCROLL_PAGEDOWN = _core_.wxEVT_SCROLL_PAGEDOWN
3161 wxEVT_SCROLL_THUMBTRACK = _core_.wxEVT_SCROLL_THUMBTRACK
3162 wxEVT_SCROLL_THUMBRELEASE = _core_.wxEVT_SCROLL_THUMBRELEASE
3163 wxEVT_SCROLL_ENDSCROLL = _core_.wxEVT_SCROLL_ENDSCROLL
3164 wxEVT_SCROLLWIN_TOP = _core_.wxEVT_SCROLLWIN_TOP
3165 wxEVT_SCROLLWIN_BOTTOM = _core_.wxEVT_SCROLLWIN_BOTTOM
3166 wxEVT_SCROLLWIN_LINEUP = _core_.wxEVT_SCROLLWIN_LINEUP
3167 wxEVT_SCROLLWIN_LINEDOWN = _core_.wxEVT_SCROLLWIN_LINEDOWN
3168 wxEVT_SCROLLWIN_PAGEUP = _core_.wxEVT_SCROLLWIN_PAGEUP
3169 wxEVT_SCROLLWIN_PAGEDOWN = _core_.wxEVT_SCROLLWIN_PAGEDOWN
3170 wxEVT_SCROLLWIN_THUMBTRACK = _core_.wxEVT_SCROLLWIN_THUMBTRACK
3171 wxEVT_SCROLLWIN_THUMBRELEASE = _core_.wxEVT_SCROLLWIN_THUMBRELEASE
3172 wxEVT_SIZE = _core_.wxEVT_SIZE
3173 wxEVT_MOVE = _core_.wxEVT_MOVE
3174 wxEVT_CLOSE_WINDOW = _core_.wxEVT_CLOSE_WINDOW
3175 wxEVT_END_SESSION = _core_.wxEVT_END_SESSION
3176 wxEVT_QUERY_END_SESSION = _core_.wxEVT_QUERY_END_SESSION
3177 wxEVT_ACTIVATE_APP = _core_.wxEVT_ACTIVATE_APP
3178 wxEVT_POWER = _core_.wxEVT_POWER
3179 wxEVT_ACTIVATE = _core_.wxEVT_ACTIVATE
3180 wxEVT_CREATE = _core_.wxEVT_CREATE
3181 wxEVT_DESTROY = _core_.wxEVT_DESTROY
3182 wxEVT_SHOW = _core_.wxEVT_SHOW
3183 wxEVT_ICONIZE = _core_.wxEVT_ICONIZE
3184 wxEVT_MAXIMIZE = _core_.wxEVT_MAXIMIZE
3185 wxEVT_MOUSE_CAPTURE_CHANGED = _core_.wxEVT_MOUSE_CAPTURE_CHANGED
3186 wxEVT_PAINT = _core_.wxEVT_PAINT
3187 wxEVT_ERASE_BACKGROUND = _core_.wxEVT_ERASE_BACKGROUND
3188 wxEVT_NC_PAINT = _core_.wxEVT_NC_PAINT
3189 wxEVT_PAINT_ICON = _core_.wxEVT_PAINT_ICON
3190 wxEVT_MENU_OPEN = _core_.wxEVT_MENU_OPEN
3191 wxEVT_MENU_CLOSE = _core_.wxEVT_MENU_CLOSE
3192 wxEVT_MENU_HIGHLIGHT = _core_.wxEVT_MENU_HIGHLIGHT
3193 wxEVT_CONTEXT_MENU = _core_.wxEVT_CONTEXT_MENU
3194 wxEVT_SYS_COLOUR_CHANGED = _core_.wxEVT_SYS_COLOUR_CHANGED
3195 wxEVT_DISPLAY_CHANGED = _core_.wxEVT_DISPLAY_CHANGED
3196 wxEVT_SETTING_CHANGED = _core_.wxEVT_SETTING_CHANGED
3197 wxEVT_QUERY_NEW_PALETTE = _core_.wxEVT_QUERY_NEW_PALETTE
3198 wxEVT_PALETTE_CHANGED = _core_.wxEVT_PALETTE_CHANGED
3199 wxEVT_DROP_FILES = _core_.wxEVT_DROP_FILES
3200 wxEVT_DRAW_ITEM = _core_.wxEVT_DRAW_ITEM
3201 wxEVT_MEASURE_ITEM = _core_.wxEVT_MEASURE_ITEM
3202 wxEVT_COMPARE_ITEM = _core_.wxEVT_COMPARE_ITEM
3203 wxEVT_INIT_DIALOG = _core_.wxEVT_INIT_DIALOG
3204 wxEVT_IDLE = _core_.wxEVT_IDLE
3205 wxEVT_UPDATE_UI = _core_.wxEVT_UPDATE_UI
3206 wxEVT_SIZING = _core_.wxEVT_SIZING
3207 wxEVT_MOVING = _core_.wxEVT_MOVING
3208 wxEVT_HIBERNATE = _core_.wxEVT_HIBERNATE
3209 wxEVT_COMMAND_LEFT_CLICK = _core_.wxEVT_COMMAND_LEFT_CLICK
3210 wxEVT_COMMAND_LEFT_DCLICK = _core_.wxEVT_COMMAND_LEFT_DCLICK
3211 wxEVT_COMMAND_RIGHT_CLICK = _core_.wxEVT_COMMAND_RIGHT_CLICK
3212 wxEVT_COMMAND_RIGHT_DCLICK = _core_.wxEVT_COMMAND_RIGHT_DCLICK
3213 wxEVT_COMMAND_SET_FOCUS = _core_.wxEVT_COMMAND_SET_FOCUS
3214 wxEVT_COMMAND_KILL_FOCUS = _core_.wxEVT_COMMAND_KILL_FOCUS
3215 wxEVT_COMMAND_ENTER = _core_.wxEVT_COMMAND_ENTER
3216 #
3217 # Create some event binders
3218 EVT_SIZE = wx.PyEventBinder( wxEVT_SIZE )
3219 EVT_SIZING = wx.PyEventBinder( wxEVT_SIZING )
3220 EVT_MOVE = wx.PyEventBinder( wxEVT_MOVE )
3221 EVT_MOVING = wx.PyEventBinder( wxEVT_MOVING )
3222 EVT_CLOSE = wx.PyEventBinder( wxEVT_CLOSE_WINDOW )
3223 EVT_END_SESSION = wx.PyEventBinder( wxEVT_END_SESSION )
3224 EVT_QUERY_END_SESSION = wx.PyEventBinder( wxEVT_QUERY_END_SESSION )
3225 EVT_PAINT = wx.PyEventBinder( wxEVT_PAINT )
3226 EVT_NC_PAINT = wx.PyEventBinder( wxEVT_NC_PAINT )
3227 EVT_ERASE_BACKGROUND = wx.PyEventBinder( wxEVT_ERASE_BACKGROUND )
3228 EVT_CHAR = wx.PyEventBinder( wxEVT_CHAR )
3229 EVT_KEY_DOWN = wx.PyEventBinder( wxEVT_KEY_DOWN )
3230 EVT_KEY_UP = wx.PyEventBinder( wxEVT_KEY_UP )
3231 EVT_HOTKEY = wx.PyEventBinder( wxEVT_HOTKEY, 1)
3232 EVT_CHAR_HOOK = wx.PyEventBinder( wxEVT_CHAR_HOOK )
3233 EVT_MENU_OPEN = wx.PyEventBinder( wxEVT_MENU_OPEN )
3234 EVT_MENU_CLOSE = wx.PyEventBinder( wxEVT_MENU_CLOSE )
3235 EVT_MENU_HIGHLIGHT = wx.PyEventBinder( wxEVT_MENU_HIGHLIGHT, 1)
3236 EVT_MENU_HIGHLIGHT_ALL = wx.PyEventBinder( wxEVT_MENU_HIGHLIGHT )
3237 EVT_SET_FOCUS = wx.PyEventBinder( wxEVT_SET_FOCUS )
3238 EVT_KILL_FOCUS = wx.PyEventBinder( wxEVT_KILL_FOCUS )
3239 EVT_CHILD_FOCUS = wx.PyEventBinder( wxEVT_CHILD_FOCUS )
3240 EVT_ACTIVATE = wx.PyEventBinder( wxEVT_ACTIVATE )
3241 EVT_ACTIVATE_APP = wx.PyEventBinder( wxEVT_ACTIVATE_APP )
3242 EVT_HIBERNATE = wx.PyEventBinder( wxEVT_HIBERNATE )
3243 EVT_END_SESSION = wx.PyEventBinder( wxEVT_END_SESSION )
3244 EVT_QUERY_END_SESSION = wx.PyEventBinder( wxEVT_QUERY_END_SESSION )
3245 EVT_DROP_FILES = wx.PyEventBinder( wxEVT_DROP_FILES )
3246 EVT_INIT_DIALOG = wx.PyEventBinder( wxEVT_INIT_DIALOG )
3247 EVT_SYS_COLOUR_CHANGED = wx.PyEventBinder( wxEVT_SYS_COLOUR_CHANGED )
3248 EVT_DISPLAY_CHANGED = wx.PyEventBinder( wxEVT_DISPLAY_CHANGED )
3249 EVT_SHOW = wx.PyEventBinder( wxEVT_SHOW )
3250 EVT_MAXIMIZE = wx.PyEventBinder( wxEVT_MAXIMIZE )
3251 EVT_ICONIZE = wx.PyEventBinder( wxEVT_ICONIZE )
3252 EVT_NAVIGATION_KEY = wx.PyEventBinder( wxEVT_NAVIGATION_KEY )
3253 EVT_PALETTE_CHANGED = wx.PyEventBinder( wxEVT_PALETTE_CHANGED )
3254 EVT_QUERY_NEW_PALETTE = wx.PyEventBinder( wxEVT_QUERY_NEW_PALETTE )
3255 EVT_WINDOW_CREATE = wx.PyEventBinder( wxEVT_CREATE )
3256 EVT_WINDOW_DESTROY = wx.PyEventBinder( wxEVT_DESTROY )
3257 EVT_SET_CURSOR = wx.PyEventBinder( wxEVT_SET_CURSOR )
3258 EVT_MOUSE_CAPTURE_CHANGED = wx.PyEventBinder( wxEVT_MOUSE_CAPTURE_CHANGED )
3259
3260 EVT_LEFT_DOWN = wx.PyEventBinder( wxEVT_LEFT_DOWN )
3261 EVT_LEFT_UP = wx.PyEventBinder( wxEVT_LEFT_UP )
3262 EVT_MIDDLE_DOWN = wx.PyEventBinder( wxEVT_MIDDLE_DOWN )
3263 EVT_MIDDLE_UP = wx.PyEventBinder( wxEVT_MIDDLE_UP )
3264 EVT_RIGHT_DOWN = wx.PyEventBinder( wxEVT_RIGHT_DOWN )
3265 EVT_RIGHT_UP = wx.PyEventBinder( wxEVT_RIGHT_UP )
3266 EVT_MOTION = wx.PyEventBinder( wxEVT_MOTION )
3267 EVT_LEFT_DCLICK = wx.PyEventBinder( wxEVT_LEFT_DCLICK )
3268 EVT_MIDDLE_DCLICK = wx.PyEventBinder( wxEVT_MIDDLE_DCLICK )
3269 EVT_RIGHT_DCLICK = wx.PyEventBinder( wxEVT_RIGHT_DCLICK )
3270 EVT_LEAVE_WINDOW = wx.PyEventBinder( wxEVT_LEAVE_WINDOW )
3271 EVT_ENTER_WINDOW = wx.PyEventBinder( wxEVT_ENTER_WINDOW )
3272 EVT_MOUSEWHEEL = wx.PyEventBinder( wxEVT_MOUSEWHEEL )
3273
3274 EVT_MOUSE_EVENTS = wx.PyEventBinder([ wxEVT_LEFT_DOWN,
3275 wxEVT_LEFT_UP,
3276 wxEVT_MIDDLE_DOWN,
3277 wxEVT_MIDDLE_UP,
3278 wxEVT_RIGHT_DOWN,
3279 wxEVT_RIGHT_UP,
3280 wxEVT_MOTION,
3281 wxEVT_LEFT_DCLICK,
3282 wxEVT_MIDDLE_DCLICK,
3283 wxEVT_RIGHT_DCLICK,
3284 wxEVT_ENTER_WINDOW,
3285 wxEVT_LEAVE_WINDOW,
3286 wxEVT_MOUSEWHEEL
3287 ])
3288
3289
3290 # Scrolling from wxWindow (sent to wxScrolledWindow)
3291 EVT_SCROLLWIN = wx.PyEventBinder([ wxEVT_SCROLLWIN_TOP,
3292 wxEVT_SCROLLWIN_BOTTOM,
3293 wxEVT_SCROLLWIN_LINEUP,
3294 wxEVT_SCROLLWIN_LINEDOWN,
3295 wxEVT_SCROLLWIN_PAGEUP,
3296 wxEVT_SCROLLWIN_PAGEDOWN,
3297 wxEVT_SCROLLWIN_THUMBTRACK,
3298 wxEVT_SCROLLWIN_THUMBRELEASE,
3299 ])
3300
3301 EVT_SCROLLWIN_TOP = wx.PyEventBinder( wxEVT_SCROLLWIN_TOP )
3302 EVT_SCROLLWIN_BOTTOM = wx.PyEventBinder( wxEVT_SCROLLWIN_BOTTOM )
3303 EVT_SCROLLWIN_LINEUP = wx.PyEventBinder( wxEVT_SCROLLWIN_LINEUP )
3304 EVT_SCROLLWIN_LINEDOWN = wx.PyEventBinder( wxEVT_SCROLLWIN_LINEDOWN )
3305 EVT_SCROLLWIN_PAGEUP = wx.PyEventBinder( wxEVT_SCROLLWIN_PAGEUP )
3306 EVT_SCROLLWIN_PAGEDOWN = wx.PyEventBinder( wxEVT_SCROLLWIN_PAGEDOWN )
3307 EVT_SCROLLWIN_THUMBTRACK = wx.PyEventBinder( wxEVT_SCROLLWIN_THUMBTRACK )
3308 EVT_SCROLLWIN_THUMBRELEASE = wx.PyEventBinder( wxEVT_SCROLLWIN_THUMBRELEASE )
3309
3310 # Scrolling from wxSlider and wxScrollBar
3311 EVT_SCROLL = wx.PyEventBinder([ wxEVT_SCROLL_TOP,
3312 wxEVT_SCROLL_BOTTOM,
3313 wxEVT_SCROLL_LINEUP,
3314 wxEVT_SCROLL_LINEDOWN,
3315 wxEVT_SCROLL_PAGEUP,
3316 wxEVT_SCROLL_PAGEDOWN,
3317 wxEVT_SCROLL_THUMBTRACK,
3318 wxEVT_SCROLL_THUMBRELEASE,
3319 wxEVT_SCROLL_ENDSCROLL,
3320 ])
3321
3322 EVT_SCROLL_TOP = wx.PyEventBinder( wxEVT_SCROLL_TOP )
3323 EVT_SCROLL_BOTTOM = wx.PyEventBinder( wxEVT_SCROLL_BOTTOM )
3324 EVT_SCROLL_LINEUP = wx.PyEventBinder( wxEVT_SCROLL_LINEUP )
3325 EVT_SCROLL_LINEDOWN = wx.PyEventBinder( wxEVT_SCROLL_LINEDOWN )
3326 EVT_SCROLL_PAGEUP = wx.PyEventBinder( wxEVT_SCROLL_PAGEUP )
3327 EVT_SCROLL_PAGEDOWN = wx.PyEventBinder( wxEVT_SCROLL_PAGEDOWN )
3328 EVT_SCROLL_THUMBTRACK = wx.PyEventBinder( wxEVT_SCROLL_THUMBTRACK )
3329 EVT_SCROLL_THUMBRELEASE = wx.PyEventBinder( wxEVT_SCROLL_THUMBRELEASE )
3330 EVT_SCROLL_ENDSCROLL = wx.PyEventBinder( wxEVT_SCROLL_ENDSCROLL )
3331
3332 # Scrolling from wxSlider and wxScrollBar, with an id
3333 EVT_COMMAND_SCROLL = wx.PyEventBinder([ wxEVT_SCROLL_TOP,
3334 wxEVT_SCROLL_BOTTOM,
3335 wxEVT_SCROLL_LINEUP,
3336 wxEVT_SCROLL_LINEDOWN,
3337 wxEVT_SCROLL_PAGEUP,
3338 wxEVT_SCROLL_PAGEDOWN,
3339 wxEVT_SCROLL_THUMBTRACK,
3340 wxEVT_SCROLL_THUMBRELEASE,
3341 wxEVT_SCROLL_ENDSCROLL,
3342 ], 1)
3343
3344 EVT_COMMAND_SCROLL_TOP = wx.PyEventBinder( wxEVT_SCROLL_TOP, 1)
3345 EVT_COMMAND_SCROLL_BOTTOM = wx.PyEventBinder( wxEVT_SCROLL_BOTTOM, 1)
3346 EVT_COMMAND_SCROLL_LINEUP = wx.PyEventBinder( wxEVT_SCROLL_LINEUP, 1)
3347 EVT_COMMAND_SCROLL_LINEDOWN = wx.PyEventBinder( wxEVT_SCROLL_LINEDOWN, 1)
3348 EVT_COMMAND_SCROLL_PAGEUP = wx.PyEventBinder( wxEVT_SCROLL_PAGEUP, 1)
3349 EVT_COMMAND_SCROLL_PAGEDOWN = wx.PyEventBinder( wxEVT_SCROLL_PAGEDOWN, 1)
3350 EVT_COMMAND_SCROLL_THUMBTRACK = wx.PyEventBinder( wxEVT_SCROLL_THUMBTRACK, 1)
3351 EVT_COMMAND_SCROLL_THUMBRELEASE = wx.PyEventBinder( wxEVT_SCROLL_THUMBRELEASE, 1)
3352 EVT_COMMAND_SCROLL_ENDSCROLL = wx.PyEventBinder( wxEVT_SCROLL_ENDSCROLL, 1)
3353
3354 EVT_BUTTON = wx.PyEventBinder( wxEVT_COMMAND_BUTTON_CLICKED, 1)
3355 EVT_CHECKBOX = wx.PyEventBinder( wxEVT_COMMAND_CHECKBOX_CLICKED, 1)
3356 EVT_CHOICE = wx.PyEventBinder( wxEVT_COMMAND_CHOICE_SELECTED, 1)
3357 EVT_LISTBOX = wx.PyEventBinder( wxEVT_COMMAND_LISTBOX_SELECTED, 1)
3358 EVT_LISTBOX_DCLICK = wx.PyEventBinder( wxEVT_COMMAND_LISTBOX_DOUBLECLICKED, 1)
3359 EVT_MENU = wx.PyEventBinder( wxEVT_COMMAND_MENU_SELECTED, 1)
3360 EVT_MENU_RANGE = wx.PyEventBinder( wxEVT_COMMAND_MENU_SELECTED, 2)
3361 EVT_SLIDER = wx.PyEventBinder( wxEVT_COMMAND_SLIDER_UPDATED, 1)
3362 EVT_RADIOBOX = wx.PyEventBinder( wxEVT_COMMAND_RADIOBOX_SELECTED, 1)
3363 EVT_RADIOBUTTON = wx.PyEventBinder( wxEVT_COMMAND_RADIOBUTTON_SELECTED, 1)
3364
3365 EVT_SCROLLBAR = wx.PyEventBinder( wxEVT_COMMAND_SCROLLBAR_UPDATED, 1)
3366 EVT_VLBOX = wx.PyEventBinder( wxEVT_COMMAND_VLBOX_SELECTED, 1)
3367 EVT_COMBOBOX = wx.PyEventBinder( wxEVT_COMMAND_COMBOBOX_SELECTED, 1)
3368 EVT_TOOL = wx.PyEventBinder( wxEVT_COMMAND_TOOL_CLICKED, 1)
3369 EVT_TOOL_RANGE = wx.PyEventBinder( wxEVT_COMMAND_TOOL_CLICKED, 2)
3370 EVT_TOOL_RCLICKED = wx.PyEventBinder( wxEVT_COMMAND_TOOL_RCLICKED, 1)
3371 EVT_TOOL_RCLICKED_RANGE = wx.PyEventBinder( wxEVT_COMMAND_TOOL_RCLICKED, 2)
3372 EVT_TOOL_ENTER = wx.PyEventBinder( wxEVT_COMMAND_TOOL_ENTER, 1)
3373 EVT_CHECKLISTBOX = wx.PyEventBinder( wxEVT_COMMAND_CHECKLISTBOX_TOGGLED, 1)
3374
3375
3376 EVT_COMMAND_LEFT_CLICK = wx.PyEventBinder( wxEVT_COMMAND_LEFT_CLICK, 1)
3377 EVT_COMMAND_LEFT_DCLICK = wx.PyEventBinder( wxEVT_COMMAND_LEFT_DCLICK, 1)
3378 EVT_COMMAND_RIGHT_CLICK = wx.PyEventBinder( wxEVT_COMMAND_RIGHT_CLICK, 1)
3379 EVT_COMMAND_RIGHT_DCLICK = wx.PyEventBinder( wxEVT_COMMAND_RIGHT_DCLICK, 1)
3380 EVT_COMMAND_SET_FOCUS = wx.PyEventBinder( wxEVT_COMMAND_SET_FOCUS, 1)
3381 EVT_COMMAND_KILL_FOCUS = wx.PyEventBinder( wxEVT_COMMAND_KILL_FOCUS, 1)
3382 EVT_COMMAND_ENTER = wx.PyEventBinder( wxEVT_COMMAND_ENTER, 1)
3383
3384 EVT_IDLE = wx.PyEventBinder( wxEVT_IDLE )
3385
3386 EVT_UPDATE_UI = wx.PyEventBinder( wxEVT_UPDATE_UI, 1)
3387 EVT_UPDATE_UI_RANGE = wx.PyEventBinder( wxEVT_UPDATE_UI, 2)
3388
3389 EVT_CONTEXT_MENU = wx.PyEventBinder( wxEVT_CONTEXT_MENU )
3390
3391
3392
3393 #---------------------------------------------------------------------------
3394
3395 class Event(Object):
3396 """Proxy of C++ Event class"""
3397 def __init__(self): raise RuntimeError, "No constructor defined"
3398 def __repr__(self):
3399 return "<%s.%s; proxy of C++ wxEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
3400 def __del__(self, destroy=_core_.delete_Event):
3401 """__del__(self)"""
3402 try:
3403 if self.thisown: destroy(self)
3404 except: pass
3405
3406 def SetEventType(*args, **kwargs):
3407 """SetEventType(self, wxEventType typ)"""
3408 return _core_.Event_SetEventType(*args, **kwargs)
3409
3410 def GetEventType(*args, **kwargs):
3411 """GetEventType(self) -> wxEventType"""
3412 return _core_.Event_GetEventType(*args, **kwargs)
3413
3414 def GetEventObject(*args, **kwargs):
3415 """GetEventObject(self) -> Object"""
3416 return _core_.Event_GetEventObject(*args, **kwargs)
3417
3418 def SetEventObject(*args, **kwargs):
3419 """SetEventObject(self, Object obj)"""
3420 return _core_.Event_SetEventObject(*args, **kwargs)
3421
3422 def GetTimestamp(*args, **kwargs):
3423 """GetTimestamp(self) -> long"""
3424 return _core_.Event_GetTimestamp(*args, **kwargs)
3425
3426 def SetTimestamp(*args, **kwargs):
3427 """SetTimestamp(self, long ts=0)"""
3428 return _core_.Event_SetTimestamp(*args, **kwargs)
3429
3430 def GetId(*args, **kwargs):
3431 """GetId(self) -> int"""
3432 return _core_.Event_GetId(*args, **kwargs)
3433
3434 def SetId(*args, **kwargs):
3435 """SetId(self, int Id)"""
3436 return _core_.Event_SetId(*args, **kwargs)
3437
3438 def IsCommandEvent(*args, **kwargs):
3439 """IsCommandEvent(self) -> bool"""
3440 return _core_.Event_IsCommandEvent(*args, **kwargs)
3441
3442 def Skip(*args, **kwargs):
3443 """
3444 Skip(self, bool skip=True)
3445
3446 Called by an event handler, it controls whether additional event
3447 handlers bound to this event will be called after the current event
3448 handler returns. Skip(false) (the default setting) will prevent
3449 additional event handlers from being called and control will be
3450 returned to the sender of the event immediately after the current
3451 handler has finished. Skip(True) will cause the event processing
3452 system to continue searching for a handler function for this event.
3453
3454 """
3455 return _core_.Event_Skip(*args, **kwargs)
3456
3457 def GetSkipped(*args, **kwargs):
3458 """GetSkipped(self) -> bool"""
3459 return _core_.Event_GetSkipped(*args, **kwargs)
3460
3461 def ShouldPropagate(*args, **kwargs):
3462 """ShouldPropagate(self) -> bool"""
3463 return _core_.Event_ShouldPropagate(*args, **kwargs)
3464
3465 def StopPropagation(*args, **kwargs):
3466 """StopPropagation(self) -> int"""
3467 return _core_.Event_StopPropagation(*args, **kwargs)
3468
3469 def ResumePropagation(*args, **kwargs):
3470 """ResumePropagation(self, int propagationLevel)"""
3471 return _core_.Event_ResumePropagation(*args, **kwargs)
3472
3473 def Clone(*args, **kwargs):
3474 """Clone(self) -> Event"""
3475 return _core_.Event_Clone(*args, **kwargs)
3476
3477
3478 class EventPtr(Event):
3479 def __init__(self, this):
3480 self.this = this
3481 if not hasattr(self,"thisown"): self.thisown = 0
3482 self.__class__ = Event
3483 _core_.Event_swigregister(EventPtr)
3484
3485 #---------------------------------------------------------------------------
3486
3487 class PropagationDisabler(object):
3488 """Proxy of C++ PropagationDisabler class"""
3489 def __repr__(self):
3490 return "<%s.%s; proxy of C++ wxPropagationDisabler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
3491 def __init__(self, *args, **kwargs):
3492 """__init__(self, Event event) -> PropagationDisabler"""
3493 newobj = _core_.new_PropagationDisabler(*args, **kwargs)
3494 self.this = newobj.this
3495 self.thisown = 1
3496 del newobj.thisown
3497 def __del__(self, destroy=_core_.delete_PropagationDisabler):
3498 """__del__(self)"""
3499 try:
3500 if self.thisown: destroy(self)
3501 except: pass
3502
3503
3504 class PropagationDisablerPtr(PropagationDisabler):
3505 def __init__(self, this):
3506 self.this = this
3507 if not hasattr(self,"thisown"): self.thisown = 0
3508 self.__class__ = PropagationDisabler
3509 _core_.PropagationDisabler_swigregister(PropagationDisablerPtr)
3510
3511 class PropagateOnce(object):
3512 """Proxy of C++ PropagateOnce class"""
3513 def __repr__(self):
3514 return "<%s.%s; proxy of C++ wxPropagateOnce instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
3515 def __init__(self, *args, **kwargs):
3516 """__init__(self, Event event) -> PropagateOnce"""
3517 newobj = _core_.new_PropagateOnce(*args, **kwargs)
3518 self.this = newobj.this
3519 self.thisown = 1
3520 del newobj.thisown
3521 def __del__(self, destroy=_core_.delete_PropagateOnce):
3522 """__del__(self)"""
3523 try:
3524 if self.thisown: destroy(self)
3525 except: pass
3526
3527
3528 class PropagateOncePtr(PropagateOnce):
3529 def __init__(self, this):
3530 self.this = this
3531 if not hasattr(self,"thisown"): self.thisown = 0
3532 self.__class__ = PropagateOnce
3533 _core_.PropagateOnce_swigregister(PropagateOncePtr)
3534
3535 #---------------------------------------------------------------------------
3536
3537 class CommandEvent(Event):
3538 """Proxy of C++ CommandEvent class"""
3539 def __repr__(self):
3540 return "<%s.%s; proxy of C++ wxCommandEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
3541 def __init__(self, *args, **kwargs):
3542 """__init__(self, wxEventType commandType=wxEVT_NULL, int winid=0) -> CommandEvent"""
3543 newobj = _core_.new_CommandEvent(*args, **kwargs)
3544 self.this = newobj.this
3545 self.thisown = 1
3546 del newobj.thisown
3547 def GetSelection(*args, **kwargs):
3548 """GetSelection(self) -> int"""
3549 return _core_.CommandEvent_GetSelection(*args, **kwargs)
3550
3551 def SetString(*args, **kwargs):
3552 """SetString(self, String s)"""
3553 return _core_.CommandEvent_SetString(*args, **kwargs)
3554
3555 def GetString(*args, **kwargs):
3556 """GetString(self) -> String"""
3557 return _core_.CommandEvent_GetString(*args, **kwargs)
3558
3559 def IsChecked(*args, **kwargs):
3560 """IsChecked(self) -> bool"""
3561 return _core_.CommandEvent_IsChecked(*args, **kwargs)
3562
3563 Checked = IsChecked
3564 def IsSelection(*args, **kwargs):
3565 """IsSelection(self) -> bool"""
3566 return _core_.CommandEvent_IsSelection(*args, **kwargs)
3567
3568 def SetExtraLong(*args, **kwargs):
3569 """SetExtraLong(self, long extraLong)"""
3570 return _core_.CommandEvent_SetExtraLong(*args, **kwargs)
3571
3572 def GetExtraLong(*args, **kwargs):
3573 """GetExtraLong(self) -> long"""
3574 return _core_.CommandEvent_GetExtraLong(*args, **kwargs)
3575
3576 def SetInt(*args, **kwargs):
3577 """SetInt(self, int i)"""
3578 return _core_.CommandEvent_SetInt(*args, **kwargs)
3579
3580 def GetInt(*args, **kwargs):
3581 """GetInt(self) -> long"""
3582 return _core_.CommandEvent_GetInt(*args, **kwargs)
3583
3584 def Clone(*args, **kwargs):
3585 """Clone(self) -> Event"""
3586 return _core_.CommandEvent_Clone(*args, **kwargs)
3587
3588
3589 class CommandEventPtr(CommandEvent):
3590 def __init__(self, this):
3591 self.this = this
3592 if not hasattr(self,"thisown"): self.thisown = 0
3593 self.__class__ = CommandEvent
3594 _core_.CommandEvent_swigregister(CommandEventPtr)
3595
3596 #---------------------------------------------------------------------------
3597
3598 class NotifyEvent(CommandEvent):
3599 """Proxy of C++ NotifyEvent class"""
3600 def __repr__(self):
3601 return "<%s.%s; proxy of C++ wxNotifyEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
3602 def __init__(self, *args, **kwargs):
3603 """__init__(self, wxEventType commandType=wxEVT_NULL, int winid=0) -> NotifyEvent"""
3604 newobj = _core_.new_NotifyEvent(*args, **kwargs)
3605 self.this = newobj.this
3606 self.thisown = 1
3607 del newobj.thisown
3608 def Veto(*args, **kwargs):
3609 """Veto(self)"""
3610 return _core_.NotifyEvent_Veto(*args, **kwargs)
3611
3612 def Allow(*args, **kwargs):
3613 """Allow(self)"""
3614 return _core_.NotifyEvent_Allow(*args, **kwargs)
3615
3616 def IsAllowed(*args, **kwargs):
3617 """IsAllowed(self) -> bool"""
3618 return _core_.NotifyEvent_IsAllowed(*args, **kwargs)
3619
3620
3621 class NotifyEventPtr(NotifyEvent):
3622 def __init__(self, this):
3623 self.this = this
3624 if not hasattr(self,"thisown"): self.thisown = 0
3625 self.__class__ = NotifyEvent
3626 _core_.NotifyEvent_swigregister(NotifyEventPtr)
3627
3628 #---------------------------------------------------------------------------
3629
3630 class ScrollEvent(CommandEvent):
3631 """Proxy of C++ ScrollEvent class"""
3632 def __repr__(self):
3633 return "<%s.%s; proxy of C++ wxScrollEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
3634 def __init__(self, *args, **kwargs):
3635 """
3636 __init__(self, wxEventType commandType=wxEVT_NULL, int winid=0, int pos=0,
3637 int orient=0) -> ScrollEvent
3638 """
3639 newobj = _core_.new_ScrollEvent(*args, **kwargs)
3640 self.this = newobj.this
3641 self.thisown = 1
3642 del newobj.thisown
3643 def GetOrientation(*args, **kwargs):
3644 """GetOrientation(self) -> int"""
3645 return _core_.ScrollEvent_GetOrientation(*args, **kwargs)
3646
3647 def GetPosition(*args, **kwargs):
3648 """GetPosition(self) -> int"""
3649 return _core_.ScrollEvent_GetPosition(*args, **kwargs)
3650
3651 def SetOrientation(*args, **kwargs):
3652 """SetOrientation(self, int orient)"""
3653 return _core_.ScrollEvent_SetOrientation(*args, **kwargs)
3654
3655 def SetPosition(*args, **kwargs):
3656 """SetPosition(self, int pos)"""
3657 return _core_.ScrollEvent_SetPosition(*args, **kwargs)
3658
3659
3660 class ScrollEventPtr(ScrollEvent):
3661 def __init__(self, this):
3662 self.this = this
3663 if not hasattr(self,"thisown"): self.thisown = 0
3664 self.__class__ = ScrollEvent
3665 _core_.ScrollEvent_swigregister(ScrollEventPtr)
3666
3667 #---------------------------------------------------------------------------
3668
3669 class ScrollWinEvent(Event):
3670 """Proxy of C++ ScrollWinEvent class"""
3671 def __repr__(self):
3672 return "<%s.%s; proxy of C++ wxScrollWinEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
3673 def __init__(self, *args, **kwargs):
3674 """__init__(self, wxEventType commandType=wxEVT_NULL, int pos=0, int orient=0) -> ScrollWinEvent"""
3675 newobj = _core_.new_ScrollWinEvent(*args, **kwargs)
3676 self.this = newobj.this
3677 self.thisown = 1
3678 del newobj.thisown
3679 def GetOrientation(*args, **kwargs):
3680 """GetOrientation(self) -> int"""
3681 return _core_.ScrollWinEvent_GetOrientation(*args, **kwargs)
3682
3683 def GetPosition(*args, **kwargs):
3684 """GetPosition(self) -> int"""
3685 return _core_.ScrollWinEvent_GetPosition(*args, **kwargs)
3686
3687 def SetOrientation(*args, **kwargs):
3688 """SetOrientation(self, int orient)"""
3689 return _core_.ScrollWinEvent_SetOrientation(*args, **kwargs)
3690
3691 def SetPosition(*args, **kwargs):
3692 """SetPosition(self, int pos)"""
3693 return _core_.ScrollWinEvent_SetPosition(*args, **kwargs)
3694
3695
3696 class ScrollWinEventPtr(ScrollWinEvent):
3697 def __init__(self, this):
3698 self.this = this
3699 if not hasattr(self,"thisown"): self.thisown = 0
3700 self.__class__ = ScrollWinEvent
3701 _core_.ScrollWinEvent_swigregister(ScrollWinEventPtr)
3702
3703 #---------------------------------------------------------------------------
3704
3705 MOUSE_BTN_ANY = _core_.MOUSE_BTN_ANY
3706 MOUSE_BTN_NONE = _core_.MOUSE_BTN_NONE
3707 MOUSE_BTN_LEFT = _core_.MOUSE_BTN_LEFT
3708 MOUSE_BTN_MIDDLE = _core_.MOUSE_BTN_MIDDLE
3709 MOUSE_BTN_RIGHT = _core_.MOUSE_BTN_RIGHT
3710 class MouseEvent(Event):
3711 """Proxy of C++ MouseEvent class"""
3712 def __repr__(self):
3713 return "<%s.%s; proxy of C++ wxMouseEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
3714 def __init__(self, *args, **kwargs):
3715 """__init__(self, wxEventType mouseType=wxEVT_NULL) -> MouseEvent"""
3716 newobj = _core_.new_MouseEvent(*args, **kwargs)
3717 self.this = newobj.this
3718 self.thisown = 1
3719 del newobj.thisown
3720 def IsButton(*args, **kwargs):
3721 """IsButton(self) -> bool"""
3722 return _core_.MouseEvent_IsButton(*args, **kwargs)
3723
3724 def ButtonDown(*args, **kwargs):
3725 """ButtonDown(self, int but=MOUSE_BTN_ANY) -> bool"""
3726 return _core_.MouseEvent_ButtonDown(*args, **kwargs)
3727
3728 def ButtonDClick(*args, **kwargs):
3729 """ButtonDClick(self, int but=MOUSE_BTN_ANY) -> bool"""
3730 return _core_.MouseEvent_ButtonDClick(*args, **kwargs)
3731
3732 def ButtonUp(*args, **kwargs):
3733 """ButtonUp(self, int but=MOUSE_BTN_ANY) -> bool"""
3734 return _core_.MouseEvent_ButtonUp(*args, **kwargs)
3735
3736 def Button(*args, **kwargs):
3737 """Button(self, int but) -> bool"""
3738 return _core_.MouseEvent_Button(*args, **kwargs)
3739
3740 def ButtonIsDown(*args, **kwargs):
3741 """ButtonIsDown(self, int but) -> bool"""
3742 return _core_.MouseEvent_ButtonIsDown(*args, **kwargs)
3743
3744 def GetButton(*args, **kwargs):
3745 """GetButton(self) -> int"""
3746 return _core_.MouseEvent_GetButton(*args, **kwargs)
3747
3748 def ControlDown(*args, **kwargs):
3749 """ControlDown(self) -> bool"""
3750 return _core_.MouseEvent_ControlDown(*args, **kwargs)
3751
3752 def MetaDown(*args, **kwargs):
3753 """MetaDown(self) -> bool"""
3754 return _core_.MouseEvent_MetaDown(*args, **kwargs)
3755
3756 def AltDown(*args, **kwargs):
3757 """AltDown(self) -> bool"""
3758 return _core_.MouseEvent_AltDown(*args, **kwargs)
3759
3760 def ShiftDown(*args, **kwargs):
3761 """ShiftDown(self) -> bool"""
3762 return _core_.MouseEvent_ShiftDown(*args, **kwargs)
3763
3764 def CmdDown(*args, **kwargs):
3765 """
3766 CmdDown(self) -> bool
3767
3768 "Cmd" is a pseudo key which is the same as Control for PC and Unix
3769 platforms but the special "Apple" (a.k.a as "Command") key on
3770 Macs: it makes often sense to use it instead of, say, `ControlDown`
3771 because Cmd key is used for the same thing under Mac as Ctrl
3772 elsewhere. The Ctrl still exists, it's just not used for this
3773 purpose. So for non-Mac platforms this is the same as `ControlDown`
3774 and Macs this is the same as `MetaDown`.
3775 """
3776 return _core_.MouseEvent_CmdDown(*args, **kwargs)
3777
3778 def LeftDown(*args, **kwargs):
3779 """LeftDown(self) -> bool"""
3780 return _core_.MouseEvent_LeftDown(*args, **kwargs)
3781
3782 def MiddleDown(*args, **kwargs):
3783 """MiddleDown(self) -> bool"""
3784 return _core_.MouseEvent_MiddleDown(*args, **kwargs)
3785
3786 def RightDown(*args, **kwargs):
3787 """RightDown(self) -> bool"""
3788 return _core_.MouseEvent_RightDown(*args, **kwargs)
3789
3790 def LeftUp(*args, **kwargs):
3791 """LeftUp(self) -> bool"""
3792 return _core_.MouseEvent_LeftUp(*args, **kwargs)
3793
3794 def MiddleUp(*args, **kwargs):
3795 """MiddleUp(self) -> bool"""
3796 return _core_.MouseEvent_MiddleUp(*args, **kwargs)
3797
3798 def RightUp(*args, **kwargs):
3799 """RightUp(self) -> bool"""
3800 return _core_.MouseEvent_RightUp(*args, **kwargs)
3801
3802 def LeftDClick(*args, **kwargs):
3803 """LeftDClick(self) -> bool"""
3804 return _core_.MouseEvent_LeftDClick(*args, **kwargs)
3805
3806 def MiddleDClick(*args, **kwargs):
3807 """MiddleDClick(self) -> bool"""
3808 return _core_.MouseEvent_MiddleDClick(*args, **kwargs)
3809
3810 def RightDClick(*args, **kwargs):
3811 """RightDClick(self) -> bool"""
3812 return _core_.MouseEvent_RightDClick(*args, **kwargs)
3813
3814 def LeftIsDown(*args, **kwargs):
3815 """LeftIsDown(self) -> bool"""
3816 return _core_.MouseEvent_LeftIsDown(*args, **kwargs)
3817
3818 def MiddleIsDown(*args, **kwargs):
3819 """MiddleIsDown(self) -> bool"""
3820 return _core_.MouseEvent_MiddleIsDown(*args, **kwargs)
3821
3822 def RightIsDown(*args, **kwargs):
3823 """RightIsDown(self) -> bool"""
3824 return _core_.MouseEvent_RightIsDown(*args, **kwargs)
3825
3826 def Dragging(*args, **kwargs):
3827 """Dragging(self) -> bool"""
3828 return _core_.MouseEvent_Dragging(*args, **kwargs)
3829
3830 def Moving(*args, **kwargs):
3831 """Moving(self) -> bool"""
3832 return _core_.MouseEvent_Moving(*args, **kwargs)
3833
3834 def Entering(*args, **kwargs):
3835 """Entering(self) -> bool"""
3836 return _core_.MouseEvent_Entering(*args, **kwargs)
3837
3838 def Leaving(*args, **kwargs):
3839 """Leaving(self) -> bool"""
3840 return _core_.MouseEvent_Leaving(*args, **kwargs)
3841
3842 def GetPosition(*args, **kwargs):
3843 """
3844 GetPosition(self) -> Point
3845
3846 Returns the position of the mouse in window coordinates when the event
3847 happened.
3848 """
3849 return _core_.MouseEvent_GetPosition(*args, **kwargs)
3850
3851 def GetPositionTuple(*args, **kwargs):
3852 """
3853 GetPositionTuple() -> (x,y)
3854
3855 Returns the position of the mouse in window coordinates when the event
3856 happened.
3857 """
3858 return _core_.MouseEvent_GetPositionTuple(*args, **kwargs)
3859
3860 def GetLogicalPosition(*args, **kwargs):
3861 """GetLogicalPosition(self, DC dc) -> Point"""
3862 return _core_.MouseEvent_GetLogicalPosition(*args, **kwargs)
3863
3864 def GetX(*args, **kwargs):
3865 """GetX(self) -> int"""
3866 return _core_.MouseEvent_GetX(*args, **kwargs)
3867
3868 def GetY(*args, **kwargs):
3869 """GetY(self) -> int"""
3870 return _core_.MouseEvent_GetY(*args, **kwargs)
3871
3872 def GetWheelRotation(*args, **kwargs):
3873 """GetWheelRotation(self) -> int"""
3874 return _core_.MouseEvent_GetWheelRotation(*args, **kwargs)
3875
3876 def GetWheelDelta(*args, **kwargs):
3877 """GetWheelDelta(self) -> int"""
3878 return _core_.MouseEvent_GetWheelDelta(*args, **kwargs)
3879
3880 def GetLinesPerAction(*args, **kwargs):
3881 """GetLinesPerAction(self) -> int"""
3882 return _core_.MouseEvent_GetLinesPerAction(*args, **kwargs)
3883
3884 def IsPageScroll(*args, **kwargs):
3885 """IsPageScroll(self) -> bool"""
3886 return _core_.MouseEvent_IsPageScroll(*args, **kwargs)
3887
3888 m_x = property(_core_.MouseEvent_m_x_get, _core_.MouseEvent_m_x_set)
3889 m_y = property(_core_.MouseEvent_m_y_get, _core_.MouseEvent_m_y_set)
3890 m_leftDown = property(_core_.MouseEvent_m_leftDown_get, _core_.MouseEvent_m_leftDown_set)
3891 m_middleDown = property(_core_.MouseEvent_m_middleDown_get, _core_.MouseEvent_m_middleDown_set)
3892 m_rightDown = property(_core_.MouseEvent_m_rightDown_get, _core_.MouseEvent_m_rightDown_set)
3893 m_controlDown = property(_core_.MouseEvent_m_controlDown_get, _core_.MouseEvent_m_controlDown_set)
3894 m_shiftDown = property(_core_.MouseEvent_m_shiftDown_get, _core_.MouseEvent_m_shiftDown_set)
3895 m_altDown = property(_core_.MouseEvent_m_altDown_get, _core_.MouseEvent_m_altDown_set)
3896 m_metaDown = property(_core_.MouseEvent_m_metaDown_get, _core_.MouseEvent_m_metaDown_set)
3897 m_wheelRotation = property(_core_.MouseEvent_m_wheelRotation_get, _core_.MouseEvent_m_wheelRotation_set)
3898 m_wheelDelta = property(_core_.MouseEvent_m_wheelDelta_get, _core_.MouseEvent_m_wheelDelta_set)
3899 m_linesPerAction = property(_core_.MouseEvent_m_linesPerAction_get, _core_.MouseEvent_m_linesPerAction_set)
3900
3901 class MouseEventPtr(MouseEvent):
3902 def __init__(self, this):
3903 self.this = this
3904 if not hasattr(self,"thisown"): self.thisown = 0
3905 self.__class__ = MouseEvent
3906 _core_.MouseEvent_swigregister(MouseEventPtr)
3907
3908 #---------------------------------------------------------------------------
3909
3910 class SetCursorEvent(Event):
3911 """Proxy of C++ SetCursorEvent class"""
3912 def __repr__(self):
3913 return "<%s.%s; proxy of C++ wxSetCursorEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
3914 def __init__(self, *args, **kwargs):
3915 """__init__(self, int x=0, int y=0) -> SetCursorEvent"""
3916 newobj = _core_.new_SetCursorEvent(*args, **kwargs)
3917 self.this = newobj.this
3918 self.thisown = 1
3919 del newobj.thisown
3920 def GetX(*args, **kwargs):
3921 """GetX(self) -> int"""
3922 return _core_.SetCursorEvent_GetX(*args, **kwargs)
3923
3924 def GetY(*args, **kwargs):
3925 """GetY(self) -> int"""
3926 return _core_.SetCursorEvent_GetY(*args, **kwargs)
3927
3928 def SetCursor(*args, **kwargs):
3929 """SetCursor(self, Cursor cursor)"""
3930 return _core_.SetCursorEvent_SetCursor(*args, **kwargs)
3931
3932 def GetCursor(*args, **kwargs):
3933 """GetCursor(self) -> Cursor"""
3934 return _core_.SetCursorEvent_GetCursor(*args, **kwargs)
3935
3936 def HasCursor(*args, **kwargs):
3937 """HasCursor(self) -> bool"""
3938 return _core_.SetCursorEvent_HasCursor(*args, **kwargs)
3939
3940
3941 class SetCursorEventPtr(SetCursorEvent):
3942 def __init__(self, this):
3943 self.this = this
3944 if not hasattr(self,"thisown"): self.thisown = 0
3945 self.__class__ = SetCursorEvent
3946 _core_.SetCursorEvent_swigregister(SetCursorEventPtr)
3947
3948 #---------------------------------------------------------------------------
3949
3950 class KeyEvent(Event):
3951 """Proxy of C++ KeyEvent class"""
3952 def __repr__(self):
3953 return "<%s.%s; proxy of C++ wxKeyEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
3954 def __init__(self, *args, **kwargs):
3955 """__init__(self, wxEventType keyType=wxEVT_NULL) -> KeyEvent"""
3956 newobj = _core_.new_KeyEvent(*args, **kwargs)
3957 self.this = newobj.this
3958 self.thisown = 1
3959 del newobj.thisown
3960 def ControlDown(*args, **kwargs):
3961 """ControlDown(self) -> bool"""
3962 return _core_.KeyEvent_ControlDown(*args, **kwargs)
3963
3964 def MetaDown(*args, **kwargs):
3965 """MetaDown(self) -> bool"""
3966 return _core_.KeyEvent_MetaDown(*args, **kwargs)
3967
3968 def AltDown(*args, **kwargs):
3969 """AltDown(self) -> bool"""
3970 return _core_.KeyEvent_AltDown(*args, **kwargs)
3971
3972 def ShiftDown(*args, **kwargs):
3973 """ShiftDown(self) -> bool"""
3974 return _core_.KeyEvent_ShiftDown(*args, **kwargs)
3975
3976 def CmdDown(*args, **kwargs):
3977 """
3978 CmdDown(self) -> bool
3979
3980 "Cmd" is a pseudo key which is the same as Control for PC and Unix
3981 platforms but the special "Apple" (a.k.a as "Command") key on
3982 Macs: it makes often sense to use it instead of, say, `ControlDown`
3983 because Cmd key is used for the same thing under Mac as Ctrl
3984 elsewhere. The Ctrl still exists, it's just not used for this
3985 purpose. So for non-Mac platforms this is the same as `ControlDown`
3986 and Macs this is the same as `MetaDown`.
3987 """
3988 return _core_.KeyEvent_CmdDown(*args, **kwargs)
3989
3990 def HasModifiers(*args, **kwargs):
3991 """HasModifiers(self) -> bool"""
3992 return _core_.KeyEvent_HasModifiers(*args, **kwargs)
3993
3994 def GetKeyCode(*args, **kwargs):
3995 """GetKeyCode(self) -> int"""
3996 return _core_.KeyEvent_GetKeyCode(*args, **kwargs)
3997
3998 KeyCode = GetKeyCode
3999 def GetUnicodeKey(*args, **kwargs):
4000 """GetUnicodeKey(self) -> int"""
4001 return _core_.KeyEvent_GetUnicodeKey(*args, **kwargs)
4002
4003 GetUniChar = GetUnicodeKey
4004 def GetRawKeyCode(*args, **kwargs):
4005 """GetRawKeyCode(self) -> unsigned int"""
4006 return _core_.KeyEvent_GetRawKeyCode(*args, **kwargs)
4007
4008 def GetRawKeyFlags(*args, **kwargs):
4009 """GetRawKeyFlags(self) -> unsigned int"""
4010 return _core_.KeyEvent_GetRawKeyFlags(*args, **kwargs)
4011
4012 def GetPosition(*args, **kwargs):
4013 """
4014 GetPosition(self) -> Point
4015
4016 Find the position of the event.
4017 """
4018 return _core_.KeyEvent_GetPosition(*args, **kwargs)
4019
4020 def GetPositionTuple(*args, **kwargs):
4021 """
4022 GetPositionTuple() -> (x,y)
4023
4024 Find the position of the event.
4025 """
4026 return _core_.KeyEvent_GetPositionTuple(*args, **kwargs)
4027
4028 def GetX(*args, **kwargs):
4029 """GetX(self) -> int"""
4030 return _core_.KeyEvent_GetX(*args, **kwargs)
4031
4032 def GetY(*args, **kwargs):
4033 """GetY(self) -> int"""
4034 return _core_.KeyEvent_GetY(*args, **kwargs)
4035
4036 m_x = property(_core_.KeyEvent_m_x_get, _core_.KeyEvent_m_x_set)
4037 m_y = property(_core_.KeyEvent_m_y_get, _core_.KeyEvent_m_y_set)
4038 m_keyCode = property(_core_.KeyEvent_m_keyCode_get, _core_.KeyEvent_m_keyCode_set)
4039 m_controlDown = property(_core_.KeyEvent_m_controlDown_get, _core_.KeyEvent_m_controlDown_set)
4040 m_shiftDown = property(_core_.KeyEvent_m_shiftDown_get, _core_.KeyEvent_m_shiftDown_set)
4041 m_altDown = property(_core_.KeyEvent_m_altDown_get, _core_.KeyEvent_m_altDown_set)
4042 m_metaDown = property(_core_.KeyEvent_m_metaDown_get, _core_.KeyEvent_m_metaDown_set)
4043 m_scanCode = property(_core_.KeyEvent_m_scanCode_get, _core_.KeyEvent_m_scanCode_set)
4044 m_rawCode = property(_core_.KeyEvent_m_rawCode_get, _core_.KeyEvent_m_rawCode_set)
4045 m_rawFlags = property(_core_.KeyEvent_m_rawFlags_get, _core_.KeyEvent_m_rawFlags_set)
4046
4047 class KeyEventPtr(KeyEvent):
4048 def __init__(self, this):
4049 self.this = this
4050 if not hasattr(self,"thisown"): self.thisown = 0
4051 self.__class__ = KeyEvent
4052 _core_.KeyEvent_swigregister(KeyEventPtr)
4053
4054 #---------------------------------------------------------------------------
4055
4056 class SizeEvent(Event):
4057 """Proxy of C++ SizeEvent class"""
4058 def __repr__(self):
4059 return "<%s.%s; proxy of C++ wxSizeEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
4060 def __init__(self, *args, **kwargs):
4061 """__init__(self, Size sz=DefaultSize, int winid=0) -> SizeEvent"""
4062 newobj = _core_.new_SizeEvent(*args, **kwargs)
4063 self.this = newobj.this
4064 self.thisown = 1
4065 del newobj.thisown
4066 def GetSize(*args, **kwargs):
4067 """GetSize(self) -> Size"""
4068 return _core_.SizeEvent_GetSize(*args, **kwargs)
4069
4070 def GetRect(*args, **kwargs):
4071 """GetRect(self) -> Rect"""
4072 return _core_.SizeEvent_GetRect(*args, **kwargs)
4073
4074 def SetRect(*args, **kwargs):
4075 """SetRect(self, Rect rect)"""
4076 return _core_.SizeEvent_SetRect(*args, **kwargs)
4077
4078 def SetSize(*args, **kwargs):
4079 """SetSize(self, Size size)"""
4080 return _core_.SizeEvent_SetSize(*args, **kwargs)
4081
4082 m_size = property(_core_.SizeEvent_m_size_get, _core_.SizeEvent_m_size_set)
4083 m_rect = property(_core_.SizeEvent_m_rect_get, _core_.SizeEvent_m_rect_set)
4084
4085 class SizeEventPtr(SizeEvent):
4086 def __init__(self, this):
4087 self.this = this
4088 if not hasattr(self,"thisown"): self.thisown = 0
4089 self.__class__ = SizeEvent
4090 _core_.SizeEvent_swigregister(SizeEventPtr)
4091
4092 #---------------------------------------------------------------------------
4093
4094 class MoveEvent(Event):
4095 """Proxy of C++ MoveEvent class"""
4096 def __repr__(self):
4097 return "<%s.%s; proxy of C++ wxMoveEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
4098 def __init__(self, *args, **kwargs):
4099 """__init__(self, Point pos=DefaultPosition, int winid=0) -> MoveEvent"""
4100 newobj = _core_.new_MoveEvent(*args, **kwargs)
4101 self.this = newobj.this
4102 self.thisown = 1
4103 del newobj.thisown
4104 def GetPosition(*args, **kwargs):
4105 """GetPosition(self) -> Point"""
4106 return _core_.MoveEvent_GetPosition(*args, **kwargs)
4107
4108 def GetRect(*args, **kwargs):
4109 """GetRect(self) -> Rect"""
4110 return _core_.MoveEvent_GetRect(*args, **kwargs)
4111
4112 def SetRect(*args, **kwargs):
4113 """SetRect(self, Rect rect)"""
4114 return _core_.MoveEvent_SetRect(*args, **kwargs)
4115
4116 def SetPosition(*args, **kwargs):
4117 """SetPosition(self, Point pos)"""
4118 return _core_.MoveEvent_SetPosition(*args, **kwargs)
4119
4120 m_pos = property(GetPosition, SetPosition)
4121 m_rect = property(GetRect, SetRect)
4122
4123
4124 class MoveEventPtr(MoveEvent):
4125 def __init__(self, this):
4126 self.this = this
4127 if not hasattr(self,"thisown"): self.thisown = 0
4128 self.__class__ = MoveEvent
4129 _core_.MoveEvent_swigregister(MoveEventPtr)
4130
4131 #---------------------------------------------------------------------------
4132
4133 class PaintEvent(Event):
4134 """Proxy of C++ PaintEvent class"""
4135 def __repr__(self):
4136 return "<%s.%s; proxy of C++ wxPaintEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
4137 def __init__(self, *args, **kwargs):
4138 """__init__(self, int Id=0) -> PaintEvent"""
4139 newobj = _core_.new_PaintEvent(*args, **kwargs)
4140 self.this = newobj.this
4141 self.thisown = 1
4142 del newobj.thisown
4143
4144 class PaintEventPtr(PaintEvent):
4145 def __init__(self, this):
4146 self.this = this
4147 if not hasattr(self,"thisown"): self.thisown = 0
4148 self.__class__ = PaintEvent
4149 _core_.PaintEvent_swigregister(PaintEventPtr)
4150
4151 class NcPaintEvent(Event):
4152 """Proxy of C++ NcPaintEvent class"""
4153 def __repr__(self):
4154 return "<%s.%s; proxy of C++ wxNcPaintEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
4155 def __init__(self, *args, **kwargs):
4156 """__init__(self, int winid=0) -> NcPaintEvent"""
4157 newobj = _core_.new_NcPaintEvent(*args, **kwargs)
4158 self.this = newobj.this
4159 self.thisown = 1
4160 del newobj.thisown
4161
4162 class NcPaintEventPtr(NcPaintEvent):
4163 def __init__(self, this):
4164 self.this = this
4165 if not hasattr(self,"thisown"): self.thisown = 0
4166 self.__class__ = NcPaintEvent
4167 _core_.NcPaintEvent_swigregister(NcPaintEventPtr)
4168
4169 #---------------------------------------------------------------------------
4170
4171 class EraseEvent(Event):
4172 """Proxy of C++ EraseEvent class"""
4173 def __repr__(self):
4174 return "<%s.%s; proxy of C++ wxEraseEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
4175 def __init__(self, *args, **kwargs):
4176 """__init__(self, int Id=0, DC dc=(wxDC *) NULL) -> EraseEvent"""
4177 newobj = _core_.new_EraseEvent(*args, **kwargs)
4178 self.this = newobj.this
4179 self.thisown = 1
4180 del newobj.thisown
4181 def GetDC(*args, **kwargs):
4182 """GetDC(self) -> DC"""
4183 return _core_.EraseEvent_GetDC(*args, **kwargs)
4184
4185
4186 class EraseEventPtr(EraseEvent):
4187 def __init__(self, this):
4188 self.this = this
4189 if not hasattr(self,"thisown"): self.thisown = 0
4190 self.__class__ = EraseEvent
4191 _core_.EraseEvent_swigregister(EraseEventPtr)
4192
4193 #---------------------------------------------------------------------------
4194
4195 class FocusEvent(Event):
4196 """Proxy of C++ FocusEvent class"""
4197 def __repr__(self):
4198 return "<%s.%s; proxy of C++ wxFocusEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
4199 def __init__(self, *args, **kwargs):
4200 """__init__(self, wxEventType type=wxEVT_NULL, int winid=0) -> FocusEvent"""
4201 newobj = _core_.new_FocusEvent(*args, **kwargs)
4202 self.this = newobj.this
4203 self.thisown = 1
4204 del newobj.thisown
4205 def GetWindow(*args, **kwargs):
4206 """GetWindow(self) -> Window"""
4207 return _core_.FocusEvent_GetWindow(*args, **kwargs)
4208
4209 def SetWindow(*args, **kwargs):
4210 """SetWindow(self, Window win)"""
4211 return _core_.FocusEvent_SetWindow(*args, **kwargs)
4212
4213
4214 class FocusEventPtr(FocusEvent):
4215 def __init__(self, this):
4216 self.this = this
4217 if not hasattr(self,"thisown"): self.thisown = 0
4218 self.__class__ = FocusEvent
4219 _core_.FocusEvent_swigregister(FocusEventPtr)
4220
4221 #---------------------------------------------------------------------------
4222
4223 class ChildFocusEvent(CommandEvent):
4224 """Proxy of C++ ChildFocusEvent class"""
4225 def __repr__(self):
4226 return "<%s.%s; proxy of C++ wxChildFocusEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
4227 def __init__(self, *args, **kwargs):
4228 """__init__(self, Window win=None) -> ChildFocusEvent"""
4229 newobj = _core_.new_ChildFocusEvent(*args, **kwargs)
4230 self.this = newobj.this
4231 self.thisown = 1
4232 del newobj.thisown
4233 def GetWindow(*args, **kwargs):
4234 """GetWindow(self) -> Window"""
4235 return _core_.ChildFocusEvent_GetWindow(*args, **kwargs)
4236
4237
4238 class ChildFocusEventPtr(ChildFocusEvent):
4239 def __init__(self, this):
4240 self.this = this
4241 if not hasattr(self,"thisown"): self.thisown = 0
4242 self.__class__ = ChildFocusEvent
4243 _core_.ChildFocusEvent_swigregister(ChildFocusEventPtr)
4244
4245 #---------------------------------------------------------------------------
4246
4247 class ActivateEvent(Event):
4248 """Proxy of C++ ActivateEvent class"""
4249 def __repr__(self):
4250 return "<%s.%s; proxy of C++ wxActivateEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
4251 def __init__(self, *args, **kwargs):
4252 """__init__(self, wxEventType type=wxEVT_NULL, bool active=True, int Id=0) -> ActivateEvent"""
4253 newobj = _core_.new_ActivateEvent(*args, **kwargs)
4254 self.this = newobj.this
4255 self.thisown = 1
4256 del newobj.thisown
4257 def GetActive(*args, **kwargs):
4258 """GetActive(self) -> bool"""
4259 return _core_.ActivateEvent_GetActive(*args, **kwargs)
4260
4261
4262 class ActivateEventPtr(ActivateEvent):
4263 def __init__(self, this):
4264 self.this = this
4265 if not hasattr(self,"thisown"): self.thisown = 0
4266 self.__class__ = ActivateEvent
4267 _core_.ActivateEvent_swigregister(ActivateEventPtr)
4268
4269 #---------------------------------------------------------------------------
4270
4271 class InitDialogEvent(Event):
4272 """Proxy of C++ InitDialogEvent class"""
4273 def __repr__(self):
4274 return "<%s.%s; proxy of C++ wxInitDialogEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
4275 def __init__(self, *args, **kwargs):
4276 """__init__(self, int Id=0) -> InitDialogEvent"""
4277 newobj = _core_.new_InitDialogEvent(*args, **kwargs)
4278 self.this = newobj.this
4279 self.thisown = 1
4280 del newobj.thisown
4281
4282 class InitDialogEventPtr(InitDialogEvent):
4283 def __init__(self, this):
4284 self.this = this
4285 if not hasattr(self,"thisown"): self.thisown = 0
4286 self.__class__ = InitDialogEvent
4287 _core_.InitDialogEvent_swigregister(InitDialogEventPtr)
4288
4289 #---------------------------------------------------------------------------
4290
4291 class MenuEvent(Event):
4292 """Proxy of C++ MenuEvent class"""
4293 def __repr__(self):
4294 return "<%s.%s; proxy of C++ wxMenuEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
4295 def __init__(self, *args, **kwargs):
4296 """__init__(self, wxEventType type=wxEVT_NULL, int winid=0, Menu menu=None) -> MenuEvent"""
4297 newobj = _core_.new_MenuEvent(*args, **kwargs)
4298 self.this = newobj.this
4299 self.thisown = 1
4300 del newobj.thisown
4301 def GetMenuId(*args, **kwargs):
4302 """GetMenuId(self) -> int"""
4303 return _core_.MenuEvent_GetMenuId(*args, **kwargs)
4304
4305 def IsPopup(*args, **kwargs):
4306 """IsPopup(self) -> bool"""
4307 return _core_.MenuEvent_IsPopup(*args, **kwargs)
4308
4309 def GetMenu(*args, **kwargs):
4310 """GetMenu(self) -> Menu"""
4311 return _core_.MenuEvent_GetMenu(*args, **kwargs)
4312
4313
4314 class MenuEventPtr(MenuEvent):
4315 def __init__(self, this):
4316 self.this = this
4317 if not hasattr(self,"thisown"): self.thisown = 0
4318 self.__class__ = MenuEvent
4319 _core_.MenuEvent_swigregister(MenuEventPtr)
4320
4321 #---------------------------------------------------------------------------
4322
4323 class CloseEvent(Event):
4324 """Proxy of C++ CloseEvent class"""
4325 def __repr__(self):
4326 return "<%s.%s; proxy of C++ wxCloseEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
4327 def __init__(self, *args, **kwargs):
4328 """__init__(self, wxEventType type=wxEVT_NULL, int winid=0) -> CloseEvent"""
4329 newobj = _core_.new_CloseEvent(*args, **kwargs)
4330 self.this = newobj.this
4331 self.thisown = 1
4332 del newobj.thisown
4333 def SetLoggingOff(*args, **kwargs):
4334 """SetLoggingOff(self, bool logOff)"""
4335 return _core_.CloseEvent_SetLoggingOff(*args, **kwargs)
4336
4337 def GetLoggingOff(*args, **kwargs):
4338 """GetLoggingOff(self) -> bool"""
4339 return _core_.CloseEvent_GetLoggingOff(*args, **kwargs)
4340
4341 def Veto(*args, **kwargs):
4342 """Veto(self, bool veto=True)"""
4343 return _core_.CloseEvent_Veto(*args, **kwargs)
4344
4345 def SetCanVeto(*args, **kwargs):
4346 """SetCanVeto(self, bool canVeto)"""
4347 return _core_.CloseEvent_SetCanVeto(*args, **kwargs)
4348
4349 def CanVeto(*args, **kwargs):
4350 """CanVeto(self) -> bool"""
4351 return _core_.CloseEvent_CanVeto(*args, **kwargs)
4352
4353 def GetVeto(*args, **kwargs):
4354 """GetVeto(self) -> bool"""
4355 return _core_.CloseEvent_GetVeto(*args, **kwargs)
4356
4357
4358 class CloseEventPtr(CloseEvent):
4359 def __init__(self, this):
4360 self.this = this
4361 if not hasattr(self,"thisown"): self.thisown = 0
4362 self.__class__ = CloseEvent
4363 _core_.CloseEvent_swigregister(CloseEventPtr)
4364
4365 #---------------------------------------------------------------------------
4366
4367 class ShowEvent(Event):
4368 """Proxy of C++ ShowEvent class"""
4369 def __repr__(self):
4370 return "<%s.%s; proxy of C++ wxShowEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
4371 def __init__(self, *args, **kwargs):
4372 """__init__(self, int winid=0, bool show=False) -> ShowEvent"""
4373 newobj = _core_.new_ShowEvent(*args, **kwargs)
4374 self.this = newobj.this
4375 self.thisown = 1
4376 del newobj.thisown
4377 def SetShow(*args, **kwargs):
4378 """SetShow(self, bool show)"""
4379 return _core_.ShowEvent_SetShow(*args, **kwargs)
4380
4381 def GetShow(*args, **kwargs):
4382 """GetShow(self) -> bool"""
4383 return _core_.ShowEvent_GetShow(*args, **kwargs)
4384
4385
4386 class ShowEventPtr(ShowEvent):
4387 def __init__(self, this):
4388 self.this = this
4389 if not hasattr(self,"thisown"): self.thisown = 0
4390 self.__class__ = ShowEvent
4391 _core_.ShowEvent_swigregister(ShowEventPtr)
4392
4393 #---------------------------------------------------------------------------
4394
4395 class IconizeEvent(Event):
4396 """Proxy of C++ IconizeEvent class"""
4397 def __repr__(self):
4398 return "<%s.%s; proxy of C++ wxIconizeEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
4399 def __init__(self, *args, **kwargs):
4400 """__init__(self, int id=0, bool iconized=True) -> IconizeEvent"""
4401 newobj = _core_.new_IconizeEvent(*args, **kwargs)
4402 self.this = newobj.this
4403 self.thisown = 1
4404 del newobj.thisown
4405 def Iconized(*args, **kwargs):
4406 """Iconized(self) -> bool"""
4407 return _core_.IconizeEvent_Iconized(*args, **kwargs)
4408
4409
4410 class IconizeEventPtr(IconizeEvent):
4411 def __init__(self, this):
4412 self.this = this
4413 if not hasattr(self,"thisown"): self.thisown = 0
4414 self.__class__ = IconizeEvent
4415 _core_.IconizeEvent_swigregister(IconizeEventPtr)
4416
4417 #---------------------------------------------------------------------------
4418
4419 class MaximizeEvent(Event):
4420 """Proxy of C++ MaximizeEvent class"""
4421 def __repr__(self):
4422 return "<%s.%s; proxy of C++ wxMaximizeEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
4423 def __init__(self, *args, **kwargs):
4424 """__init__(self, int id=0) -> MaximizeEvent"""
4425 newobj = _core_.new_MaximizeEvent(*args, **kwargs)
4426 self.this = newobj.this
4427 self.thisown = 1
4428 del newobj.thisown
4429
4430 class MaximizeEventPtr(MaximizeEvent):
4431 def __init__(self, this):
4432 self.this = this
4433 if not hasattr(self,"thisown"): self.thisown = 0
4434 self.__class__ = MaximizeEvent
4435 _core_.MaximizeEvent_swigregister(MaximizeEventPtr)
4436
4437 #---------------------------------------------------------------------------
4438
4439 class DropFilesEvent(Event):
4440 """Proxy of C++ DropFilesEvent class"""
4441 def __init__(self): raise RuntimeError, "No constructor defined"
4442 def __repr__(self):
4443 return "<%s.%s; proxy of C++ wxDropFilesEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
4444 def GetPosition(*args, **kwargs):
4445 """GetPosition(self) -> Point"""
4446 return _core_.DropFilesEvent_GetPosition(*args, **kwargs)
4447
4448 def GetNumberOfFiles(*args, **kwargs):
4449 """GetNumberOfFiles(self) -> int"""
4450 return _core_.DropFilesEvent_GetNumberOfFiles(*args, **kwargs)
4451
4452 def GetFiles(*args, **kwargs):
4453 """GetFiles(self) -> PyObject"""
4454 return _core_.DropFilesEvent_GetFiles(*args, **kwargs)
4455
4456
4457 class DropFilesEventPtr(DropFilesEvent):
4458 def __init__(self, this):
4459 self.this = this
4460 if not hasattr(self,"thisown"): self.thisown = 0
4461 self.__class__ = DropFilesEvent
4462 _core_.DropFilesEvent_swigregister(DropFilesEventPtr)
4463
4464 #---------------------------------------------------------------------------
4465
4466 UPDATE_UI_PROCESS_ALL = _core_.UPDATE_UI_PROCESS_ALL
4467 UPDATE_UI_PROCESS_SPECIFIED = _core_.UPDATE_UI_PROCESS_SPECIFIED
4468 class UpdateUIEvent(CommandEvent):
4469 """Proxy of C++ UpdateUIEvent class"""
4470 def __repr__(self):
4471 return "<%s.%s; proxy of C++ wxUpdateUIEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
4472 def __init__(self, *args, **kwargs):
4473 """__init__(self, int commandId=0) -> UpdateUIEvent"""
4474 newobj = _core_.new_UpdateUIEvent(*args, **kwargs)
4475 self.this = newobj.this
4476 self.thisown = 1
4477 del newobj.thisown
4478 def GetChecked(*args, **kwargs):
4479 """GetChecked(self) -> bool"""
4480 return _core_.UpdateUIEvent_GetChecked(*args, **kwargs)
4481
4482 def GetEnabled(*args, **kwargs):
4483 """GetEnabled(self) -> bool"""
4484 return _core_.UpdateUIEvent_GetEnabled(*args, **kwargs)
4485
4486 def GetText(*args, **kwargs):
4487 """GetText(self) -> String"""
4488 return _core_.UpdateUIEvent_GetText(*args, **kwargs)
4489
4490 def GetSetText(*args, **kwargs):
4491 """GetSetText(self) -> bool"""
4492 return _core_.UpdateUIEvent_GetSetText(*args, **kwargs)
4493
4494 def GetSetChecked(*args, **kwargs):
4495 """GetSetChecked(self) -> bool"""
4496 return _core_.UpdateUIEvent_GetSetChecked(*args, **kwargs)
4497
4498 def GetSetEnabled(*args, **kwargs):
4499 """GetSetEnabled(self) -> bool"""
4500 return _core_.UpdateUIEvent_GetSetEnabled(*args, **kwargs)
4501
4502 def Check(*args, **kwargs):
4503 """Check(self, bool check)"""
4504 return _core_.UpdateUIEvent_Check(*args, **kwargs)
4505
4506 def Enable(*args, **kwargs):
4507 """Enable(self, bool enable)"""
4508 return _core_.UpdateUIEvent_Enable(*args, **kwargs)
4509
4510 def SetText(*args, **kwargs):
4511 """SetText(self, String text)"""
4512 return _core_.UpdateUIEvent_SetText(*args, **kwargs)
4513
4514 def SetUpdateInterval(*args, **kwargs):
4515 """SetUpdateInterval(long updateInterval)"""
4516 return _core_.UpdateUIEvent_SetUpdateInterval(*args, **kwargs)
4517
4518 SetUpdateInterval = staticmethod(SetUpdateInterval)
4519 def GetUpdateInterval(*args, **kwargs):
4520 """GetUpdateInterval() -> long"""
4521 return _core_.UpdateUIEvent_GetUpdateInterval(*args, **kwargs)
4522
4523 GetUpdateInterval = staticmethod(GetUpdateInterval)
4524 def CanUpdate(*args, **kwargs):
4525 """CanUpdate(Window win) -> bool"""
4526 return _core_.UpdateUIEvent_CanUpdate(*args, **kwargs)
4527
4528 CanUpdate = staticmethod(CanUpdate)
4529 def ResetUpdateTime(*args, **kwargs):
4530 """ResetUpdateTime()"""
4531 return _core_.UpdateUIEvent_ResetUpdateTime(*args, **kwargs)
4532
4533 ResetUpdateTime = staticmethod(ResetUpdateTime)
4534 def SetMode(*args, **kwargs):
4535 """SetMode(int mode)"""
4536 return _core_.UpdateUIEvent_SetMode(*args, **kwargs)
4537
4538 SetMode = staticmethod(SetMode)
4539 def GetMode(*args, **kwargs):
4540 """GetMode() -> int"""
4541 return _core_.UpdateUIEvent_GetMode(*args, **kwargs)
4542
4543 GetMode = staticmethod(GetMode)
4544
4545 class UpdateUIEventPtr(UpdateUIEvent):
4546 def __init__(self, this):
4547 self.this = this
4548 if not hasattr(self,"thisown"): self.thisown = 0
4549 self.__class__ = UpdateUIEvent
4550 _core_.UpdateUIEvent_swigregister(UpdateUIEventPtr)
4551
4552 def UpdateUIEvent_SetUpdateInterval(*args, **kwargs):
4553 """UpdateUIEvent_SetUpdateInterval(long updateInterval)"""
4554 return _core_.UpdateUIEvent_SetUpdateInterval(*args, **kwargs)
4555
4556 def UpdateUIEvent_GetUpdateInterval(*args, **kwargs):
4557 """UpdateUIEvent_GetUpdateInterval() -> long"""
4558 return _core_.UpdateUIEvent_GetUpdateInterval(*args, **kwargs)
4559
4560 def UpdateUIEvent_CanUpdate(*args, **kwargs):
4561 """UpdateUIEvent_CanUpdate(Window win) -> bool"""
4562 return _core_.UpdateUIEvent_CanUpdate(*args, **kwargs)
4563
4564 def UpdateUIEvent_ResetUpdateTime(*args, **kwargs):
4565 """UpdateUIEvent_ResetUpdateTime()"""
4566 return _core_.UpdateUIEvent_ResetUpdateTime(*args, **kwargs)
4567
4568 def UpdateUIEvent_SetMode(*args, **kwargs):
4569 """UpdateUIEvent_SetMode(int mode)"""
4570 return _core_.UpdateUIEvent_SetMode(*args, **kwargs)
4571
4572 def UpdateUIEvent_GetMode(*args, **kwargs):
4573 """UpdateUIEvent_GetMode() -> int"""
4574 return _core_.UpdateUIEvent_GetMode(*args, **kwargs)
4575
4576 #---------------------------------------------------------------------------
4577
4578 class SysColourChangedEvent(Event):
4579 """Proxy of C++ SysColourChangedEvent class"""
4580 def __repr__(self):
4581 return "<%s.%s; proxy of C++ wxSysColourChangedEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
4582 def __init__(self, *args, **kwargs):
4583 """__init__(self) -> SysColourChangedEvent"""
4584 newobj = _core_.new_SysColourChangedEvent(*args, **kwargs)
4585 self.this = newobj.this
4586 self.thisown = 1
4587 del newobj.thisown
4588
4589 class SysColourChangedEventPtr(SysColourChangedEvent):
4590 def __init__(self, this):
4591 self.this = this
4592 if not hasattr(self,"thisown"): self.thisown = 0
4593 self.__class__ = SysColourChangedEvent
4594 _core_.SysColourChangedEvent_swigregister(SysColourChangedEventPtr)
4595
4596 #---------------------------------------------------------------------------
4597
4598 class MouseCaptureChangedEvent(Event):
4599 """Proxy of C++ MouseCaptureChangedEvent class"""
4600 def __repr__(self):
4601 return "<%s.%s; proxy of C++ wxMouseCaptureChangedEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
4602 def __init__(self, *args, **kwargs):
4603 """__init__(self, int winid=0, Window gainedCapture=None) -> MouseCaptureChangedEvent"""
4604 newobj = _core_.new_MouseCaptureChangedEvent(*args, **kwargs)
4605 self.this = newobj.this
4606 self.thisown = 1
4607 del newobj.thisown
4608 def GetCapturedWindow(*args, **kwargs):
4609 """GetCapturedWindow(self) -> Window"""
4610 return _core_.MouseCaptureChangedEvent_GetCapturedWindow(*args, **kwargs)
4611
4612
4613 class MouseCaptureChangedEventPtr(MouseCaptureChangedEvent):
4614 def __init__(self, this):
4615 self.this = this
4616 if not hasattr(self,"thisown"): self.thisown = 0
4617 self.__class__ = MouseCaptureChangedEvent
4618 _core_.MouseCaptureChangedEvent_swigregister(MouseCaptureChangedEventPtr)
4619
4620 #---------------------------------------------------------------------------
4621
4622 class DisplayChangedEvent(Event):
4623 """Proxy of C++ DisplayChangedEvent class"""
4624 def __repr__(self):
4625 return "<%s.%s; proxy of C++ wxDisplayChangedEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
4626 def __init__(self, *args, **kwargs):
4627 """__init__(self) -> DisplayChangedEvent"""
4628 newobj = _core_.new_DisplayChangedEvent(*args, **kwargs)
4629 self.this = newobj.this
4630 self.thisown = 1
4631 del newobj.thisown
4632
4633 class DisplayChangedEventPtr(DisplayChangedEvent):
4634 def __init__(self, this):
4635 self.this = this
4636 if not hasattr(self,"thisown"): self.thisown = 0
4637 self.__class__ = DisplayChangedEvent
4638 _core_.DisplayChangedEvent_swigregister(DisplayChangedEventPtr)
4639
4640 #---------------------------------------------------------------------------
4641
4642 class PaletteChangedEvent(Event):
4643 """Proxy of C++ PaletteChangedEvent class"""
4644 def __repr__(self):
4645 return "<%s.%s; proxy of C++ wxPaletteChangedEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
4646 def __init__(self, *args, **kwargs):
4647 """__init__(self, int id=0) -> PaletteChangedEvent"""
4648 newobj = _core_.new_PaletteChangedEvent(*args, **kwargs)
4649 self.this = newobj.this
4650 self.thisown = 1
4651 del newobj.thisown
4652 def SetChangedWindow(*args, **kwargs):
4653 """SetChangedWindow(self, Window win)"""
4654 return _core_.PaletteChangedEvent_SetChangedWindow(*args, **kwargs)
4655
4656 def GetChangedWindow(*args, **kwargs):
4657 """GetChangedWindow(self) -> Window"""
4658 return _core_.PaletteChangedEvent_GetChangedWindow(*args, **kwargs)
4659
4660
4661 class PaletteChangedEventPtr(PaletteChangedEvent):
4662 def __init__(self, this):
4663 self.this = this
4664 if not hasattr(self,"thisown"): self.thisown = 0
4665 self.__class__ = PaletteChangedEvent
4666 _core_.PaletteChangedEvent_swigregister(PaletteChangedEventPtr)
4667
4668 #---------------------------------------------------------------------------
4669
4670 class QueryNewPaletteEvent(Event):
4671 """Proxy of C++ QueryNewPaletteEvent class"""
4672 def __repr__(self):
4673 return "<%s.%s; proxy of C++ wxQueryNewPaletteEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
4674 def __init__(self, *args, **kwargs):
4675 """__init__(self, int winid=0) -> QueryNewPaletteEvent"""
4676 newobj = _core_.new_QueryNewPaletteEvent(*args, **kwargs)
4677 self.this = newobj.this
4678 self.thisown = 1
4679 del newobj.thisown
4680 def SetPaletteRealized(*args, **kwargs):
4681 """SetPaletteRealized(self, bool realized)"""
4682 return _core_.QueryNewPaletteEvent_SetPaletteRealized(*args, **kwargs)
4683
4684 def GetPaletteRealized(*args, **kwargs):
4685 """GetPaletteRealized(self) -> bool"""
4686 return _core_.QueryNewPaletteEvent_GetPaletteRealized(*args, **kwargs)
4687
4688
4689 class QueryNewPaletteEventPtr(QueryNewPaletteEvent):
4690 def __init__(self, this):
4691 self.this = this
4692 if not hasattr(self,"thisown"): self.thisown = 0
4693 self.__class__ = QueryNewPaletteEvent
4694 _core_.QueryNewPaletteEvent_swigregister(QueryNewPaletteEventPtr)
4695
4696 #---------------------------------------------------------------------------
4697
4698 class NavigationKeyEvent(Event):
4699 """Proxy of C++ NavigationKeyEvent class"""
4700 def __repr__(self):
4701 return "<%s.%s; proxy of C++ wxNavigationKeyEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
4702 def __init__(self, *args, **kwargs):
4703 """__init__(self) -> NavigationKeyEvent"""
4704 newobj = _core_.new_NavigationKeyEvent(*args, **kwargs)
4705 self.this = newobj.this
4706 self.thisown = 1
4707 del newobj.thisown
4708 def GetDirection(*args, **kwargs):
4709 """GetDirection(self) -> bool"""
4710 return _core_.NavigationKeyEvent_GetDirection(*args, **kwargs)
4711
4712 def SetDirection(*args, **kwargs):
4713 """SetDirection(self, bool forward)"""
4714 return _core_.NavigationKeyEvent_SetDirection(*args, **kwargs)
4715
4716 def IsWindowChange(*args, **kwargs):
4717 """IsWindowChange(self) -> bool"""
4718 return _core_.NavigationKeyEvent_IsWindowChange(*args, **kwargs)
4719
4720 def SetWindowChange(*args, **kwargs):
4721 """SetWindowChange(self, bool ischange)"""
4722 return _core_.NavigationKeyEvent_SetWindowChange(*args, **kwargs)
4723
4724 def IsFromTab(*args, **kwargs):
4725 """IsFromTab(self) -> bool"""
4726 return _core_.NavigationKeyEvent_IsFromTab(*args, **kwargs)
4727
4728 def SetFromTab(*args, **kwargs):
4729 """SetFromTab(self, bool bIs)"""
4730 return _core_.NavigationKeyEvent_SetFromTab(*args, **kwargs)
4731
4732 def SetFlags(*args, **kwargs):
4733 """SetFlags(self, long flags)"""
4734 return _core_.NavigationKeyEvent_SetFlags(*args, **kwargs)
4735
4736 def GetCurrentFocus(*args, **kwargs):
4737 """GetCurrentFocus(self) -> Window"""
4738 return _core_.NavigationKeyEvent_GetCurrentFocus(*args, **kwargs)
4739
4740 def SetCurrentFocus(*args, **kwargs):
4741 """SetCurrentFocus(self, Window win)"""
4742 return _core_.NavigationKeyEvent_SetCurrentFocus(*args, **kwargs)
4743
4744 IsBackward = _core_.NavigationKeyEvent_IsBackward
4745 IsForward = _core_.NavigationKeyEvent_IsForward
4746 WinChange = _core_.NavigationKeyEvent_WinChange
4747 FromTab = _core_.NavigationKeyEvent_FromTab
4748
4749 class NavigationKeyEventPtr(NavigationKeyEvent):
4750 def __init__(self, this):
4751 self.this = this
4752 if not hasattr(self,"thisown"): self.thisown = 0
4753 self.__class__ = NavigationKeyEvent
4754 _core_.NavigationKeyEvent_swigregister(NavigationKeyEventPtr)
4755
4756 #---------------------------------------------------------------------------
4757
4758 class WindowCreateEvent(CommandEvent):
4759 """Proxy of C++ WindowCreateEvent class"""
4760 def __repr__(self):
4761 return "<%s.%s; proxy of C++ wxWindowCreateEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
4762 def __init__(self, *args, **kwargs):
4763 """__init__(self, Window win=None) -> WindowCreateEvent"""
4764 newobj = _core_.new_WindowCreateEvent(*args, **kwargs)
4765 self.this = newobj.this
4766 self.thisown = 1
4767 del newobj.thisown
4768 def GetWindow(*args, **kwargs):
4769 """GetWindow(self) -> Window"""
4770 return _core_.WindowCreateEvent_GetWindow(*args, **kwargs)
4771
4772
4773 class WindowCreateEventPtr(WindowCreateEvent):
4774 def __init__(self, this):
4775 self.this = this
4776 if not hasattr(self,"thisown"): self.thisown = 0
4777 self.__class__ = WindowCreateEvent
4778 _core_.WindowCreateEvent_swigregister(WindowCreateEventPtr)
4779
4780 class WindowDestroyEvent(CommandEvent):
4781 """Proxy of C++ WindowDestroyEvent class"""
4782 def __repr__(self):
4783 return "<%s.%s; proxy of C++ wxWindowDestroyEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
4784 def __init__(self, *args, **kwargs):
4785 """__init__(self, Window win=None) -> WindowDestroyEvent"""
4786 newobj = _core_.new_WindowDestroyEvent(*args, **kwargs)
4787 self.this = newobj.this
4788 self.thisown = 1
4789 del newobj.thisown
4790 def GetWindow(*args, **kwargs):
4791 """GetWindow(self) -> Window"""
4792 return _core_.WindowDestroyEvent_GetWindow(*args, **kwargs)
4793
4794
4795 class WindowDestroyEventPtr(WindowDestroyEvent):
4796 def __init__(self, this):
4797 self.this = this
4798 if not hasattr(self,"thisown"): self.thisown = 0
4799 self.__class__ = WindowDestroyEvent
4800 _core_.WindowDestroyEvent_swigregister(WindowDestroyEventPtr)
4801
4802 #---------------------------------------------------------------------------
4803
4804 class ContextMenuEvent(CommandEvent):
4805 """Proxy of C++ ContextMenuEvent class"""
4806 def __repr__(self):
4807 return "<%s.%s; proxy of C++ wxContextMenuEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
4808 def __init__(self, *args, **kwargs):
4809 """__init__(self, wxEventType type=wxEVT_NULL, int winid=0, Point pt=DefaultPosition) -> ContextMenuEvent"""
4810 newobj = _core_.new_ContextMenuEvent(*args, **kwargs)
4811 self.this = newobj.this
4812 self.thisown = 1
4813 del newobj.thisown
4814 def GetPosition(*args, **kwargs):
4815 """GetPosition(self) -> Point"""
4816 return _core_.ContextMenuEvent_GetPosition(*args, **kwargs)
4817
4818 def SetPosition(*args, **kwargs):
4819 """SetPosition(self, Point pos)"""
4820 return _core_.ContextMenuEvent_SetPosition(*args, **kwargs)
4821
4822
4823 class ContextMenuEventPtr(ContextMenuEvent):
4824 def __init__(self, this):
4825 self.this = this
4826 if not hasattr(self,"thisown"): self.thisown = 0
4827 self.__class__ = ContextMenuEvent
4828 _core_.ContextMenuEvent_swigregister(ContextMenuEventPtr)
4829
4830 #---------------------------------------------------------------------------
4831
4832 IDLE_PROCESS_ALL = _core_.IDLE_PROCESS_ALL
4833 IDLE_PROCESS_SPECIFIED = _core_.IDLE_PROCESS_SPECIFIED
4834 class IdleEvent(Event):
4835 """Proxy of C++ IdleEvent class"""
4836 def __repr__(self):
4837 return "<%s.%s; proxy of C++ wxIdleEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
4838 def __init__(self, *args, **kwargs):
4839 """__init__(self) -> IdleEvent"""
4840 newobj = _core_.new_IdleEvent(*args, **kwargs)
4841 self.this = newobj.this
4842 self.thisown = 1
4843 del newobj.thisown
4844 def RequestMore(*args, **kwargs):
4845 """RequestMore(self, bool needMore=True)"""
4846 return _core_.IdleEvent_RequestMore(*args, **kwargs)
4847
4848 def MoreRequested(*args, **kwargs):
4849 """MoreRequested(self) -> bool"""
4850 return _core_.IdleEvent_MoreRequested(*args, **kwargs)
4851
4852 def SetMode(*args, **kwargs):
4853 """SetMode(int mode)"""
4854 return _core_.IdleEvent_SetMode(*args, **kwargs)
4855
4856 SetMode = staticmethod(SetMode)
4857 def GetMode(*args, **kwargs):
4858 """GetMode() -> int"""
4859 return _core_.IdleEvent_GetMode(*args, **kwargs)
4860
4861 GetMode = staticmethod(GetMode)
4862 def CanSend(*args, **kwargs):
4863 """CanSend(Window win) -> bool"""
4864 return _core_.IdleEvent_CanSend(*args, **kwargs)
4865
4866 CanSend = staticmethod(CanSend)
4867
4868 class IdleEventPtr(IdleEvent):
4869 def __init__(self, this):
4870 self.this = this
4871 if not hasattr(self,"thisown"): self.thisown = 0
4872 self.__class__ = IdleEvent
4873 _core_.IdleEvent_swigregister(IdleEventPtr)
4874
4875 def IdleEvent_SetMode(*args, **kwargs):
4876 """IdleEvent_SetMode(int mode)"""
4877 return _core_.IdleEvent_SetMode(*args, **kwargs)
4878
4879 def IdleEvent_GetMode(*args, **kwargs):
4880 """IdleEvent_GetMode() -> int"""
4881 return _core_.IdleEvent_GetMode(*args, **kwargs)
4882
4883 def IdleEvent_CanSend(*args, **kwargs):
4884 """IdleEvent_CanSend(Window win) -> bool"""
4885 return _core_.IdleEvent_CanSend(*args, **kwargs)
4886
4887 #---------------------------------------------------------------------------
4888
4889 class PyEvent(Event):
4890 """Proxy of C++ PyEvent class"""
4891 def __repr__(self):
4892 return "<%s.%s; proxy of C++ wxPyEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
4893 def __init__(self, *args, **kwargs):
4894 """__init__(self, int winid=0, wxEventType commandType=wxEVT_NULL) -> PyEvent"""
4895 newobj = _core_.new_PyEvent(*args, **kwargs)
4896 self.this = newobj.this
4897 self.thisown = 1
4898 del newobj.thisown
4899 self.SetSelf(self)
4900
4901 def __del__(self, destroy=_core_.delete_PyEvent):
4902 """__del__(self)"""
4903 try:
4904 if self.thisown: destroy(self)
4905 except: pass
4906
4907 def SetSelf(*args, **kwargs):
4908 """SetSelf(self, PyObject self)"""
4909 return _core_.PyEvent_SetSelf(*args, **kwargs)
4910
4911 def GetSelf(*args, **kwargs):
4912 """GetSelf(self) -> PyObject"""
4913 return _core_.PyEvent_GetSelf(*args, **kwargs)
4914
4915
4916 class PyEventPtr(PyEvent):
4917 def __init__(self, this):
4918 self.this = this
4919 if not hasattr(self,"thisown"): self.thisown = 0
4920 self.__class__ = PyEvent
4921 _core_.PyEvent_swigregister(PyEventPtr)
4922
4923 class PyCommandEvent(CommandEvent):
4924 """Proxy of C++ PyCommandEvent class"""
4925 def __repr__(self):
4926 return "<%s.%s; proxy of C++ wxPyCommandEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
4927 def __init__(self, *args, **kwargs):
4928 """__init__(self, wxEventType commandType=wxEVT_NULL, int id=0) -> PyCommandEvent"""
4929 newobj = _core_.new_PyCommandEvent(*args, **kwargs)
4930 self.this = newobj.this
4931 self.thisown = 1
4932 del newobj.thisown
4933 self.SetSelf(self)
4934
4935 def __del__(self, destroy=_core_.delete_PyCommandEvent):
4936 """__del__(self)"""
4937 try:
4938 if self.thisown: destroy(self)
4939 except: pass
4940
4941 def SetSelf(*args, **kwargs):
4942 """SetSelf(self, PyObject self)"""
4943 return _core_.PyCommandEvent_SetSelf(*args, **kwargs)
4944
4945 def GetSelf(*args, **kwargs):
4946 """GetSelf(self) -> PyObject"""
4947 return _core_.PyCommandEvent_GetSelf(*args, **kwargs)
4948
4949
4950 class PyCommandEventPtr(PyCommandEvent):
4951 def __init__(self, this):
4952 self.this = this
4953 if not hasattr(self,"thisown"): self.thisown = 0
4954 self.__class__ = PyCommandEvent
4955 _core_.PyCommandEvent_swigregister(PyCommandEventPtr)
4956
4957 class DateEvent(CommandEvent):
4958 """Proxy of C++ DateEvent class"""
4959 def __repr__(self):
4960 return "<%s.%s; proxy of C++ wxDateEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
4961 def __init__(self, *args, **kwargs):
4962 """__init__(self, Window win, DateTime dt, wxEventType type) -> DateEvent"""
4963 newobj = _core_.new_DateEvent(*args, **kwargs)
4964 self.this = newobj.this
4965 self.thisown = 1
4966 del newobj.thisown
4967 def GetDate(*args, **kwargs):
4968 """GetDate(self) -> DateTime"""
4969 return _core_.DateEvent_GetDate(*args, **kwargs)
4970
4971 def SetDate(*args, **kwargs):
4972 """SetDate(self, DateTime date)"""
4973 return _core_.DateEvent_SetDate(*args, **kwargs)
4974
4975
4976 class DateEventPtr(DateEvent):
4977 def __init__(self, this):
4978 self.this = this
4979 if not hasattr(self,"thisown"): self.thisown = 0
4980 self.__class__ = DateEvent
4981 _core_.DateEvent_swigregister(DateEventPtr)
4982
4983 wxEVT_DATE_CHANGED = _core_.wxEVT_DATE_CHANGED
4984 EVT_DATE_CHANGED = wx.PyEventBinder( wxEVT_DATE_CHANGED, 1 )
4985
4986 #---------------------------------------------------------------------------
4987
4988 PYAPP_ASSERT_SUPPRESS = _core_.PYAPP_ASSERT_SUPPRESS
4989 PYAPP_ASSERT_EXCEPTION = _core_.PYAPP_ASSERT_EXCEPTION
4990 PYAPP_ASSERT_DIALOG = _core_.PYAPP_ASSERT_DIALOG
4991 PYAPP_ASSERT_LOG = _core_.PYAPP_ASSERT_LOG
4992 PRINT_WINDOWS = _core_.PRINT_WINDOWS
4993 PRINT_POSTSCRIPT = _core_.PRINT_POSTSCRIPT
4994 class PyApp(EvtHandler):
4995 """
4996 The ``wx.PyApp`` class is an *implementation detail*, please use the
4997 `wx.App` class (or some other derived class) instead.
4998 """
4999 def __repr__(self):
5000 return "<%s.%s; proxy of C++ wxPyApp instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
5001 def __init__(self, *args, **kwargs):
5002 """
5003 __init__(self) -> PyApp
5004
5005 Create a new application object, starting the bootstrap process.
5006 """
5007 newobj = _core_.new_PyApp(*args, **kwargs)
5008 self.this = newobj.this
5009 self.thisown = 1
5010 del newobj.thisown
5011 self._setCallbackInfo(self, PyApp, False)
5012 self._setOORInfo(self, False)
5013
5014 def __del__(self, destroy=_core_.delete_PyApp):
5015 """__del__(self)"""
5016 try:
5017 if self.thisown: destroy(self)
5018 except: pass
5019
5020 def _setCallbackInfo(*args, **kwargs):
5021 """_setCallbackInfo(self, PyObject self, PyObject _class, bool incref)"""
5022 return _core_.PyApp__setCallbackInfo(*args, **kwargs)
5023
5024 def GetAppName(*args, **kwargs):
5025 """
5026 GetAppName(self) -> String
5027
5028 Get the application name.
5029 """
5030 return _core_.PyApp_GetAppName(*args, **kwargs)
5031
5032 def SetAppName(*args, **kwargs):
5033 """
5034 SetAppName(self, String name)
5035
5036 Set the application name. This value may be used automatically by
5037 `wx.Config` and such.
5038 """
5039 return _core_.PyApp_SetAppName(*args, **kwargs)
5040
5041 def GetClassName(*args, **kwargs):
5042 """
5043 GetClassName(self) -> String
5044
5045 Get the application's class name.
5046 """
5047 return _core_.PyApp_GetClassName(*args, **kwargs)
5048
5049 def SetClassName(*args, **kwargs):
5050 """
5051 SetClassName(self, String name)
5052
5053 Set the application's class name. This value may be used for
5054 X-resources if applicable for the platform
5055 """
5056 return _core_.PyApp_SetClassName(*args, **kwargs)
5057
5058 def GetVendorName(*args, **kwargs):
5059 """
5060 GetVendorName(self) -> String
5061
5062 Get the application's vendor name.
5063 """
5064 return _core_.PyApp_GetVendorName(*args, **kwargs)
5065
5066 def SetVendorName(*args, **kwargs):
5067 """
5068 SetVendorName(self, String name)
5069
5070 Set the application's vendor name. This value may be used
5071 automatically by `wx.Config` and such.
5072 """
5073 return _core_.PyApp_SetVendorName(*args, **kwargs)
5074
5075 def GetTraits(*args, **kwargs):
5076 """
5077 GetTraits(self) -> wxAppTraits
5078
5079 Return (and create if necessary) the app traits object to which we
5080 delegate for everything which either should be configurable by the
5081 user (then he can change the default behaviour simply by overriding
5082 CreateTraits() and returning his own traits object) or which is
5083 GUI/console dependent as then wx.AppTraits allows us to abstract the
5084 differences behind the common facade.
5085
5086 :todo: Add support for overriding CreateAppTraits in wxPython.
5087 """
5088 return _core_.PyApp_GetTraits(*args, **kwargs)
5089
5090 def ProcessPendingEvents(*args, **kwargs):
5091 """
5092 ProcessPendingEvents(self)
5093
5094 Process all events in the Pending Events list -- it is necessary to
5095 call this function to process posted events. This normally happens
5096 during each event loop iteration.
5097 """
5098 return _core_.PyApp_ProcessPendingEvents(*args, **kwargs)
5099
5100 def Yield(*args, **kwargs):
5101 """
5102 Yield(self, bool onlyIfNeeded=False) -> bool
5103
5104 Process all currently pending events right now, instead of waiting
5105 until return to the event loop. It is an error to call ``Yield``
5106 recursively unless the value of ``onlyIfNeeded`` is True.
5107
5108 :warning: This function is dangerous as it can lead to unexpected
5109 reentrancies (i.e. when called from an event handler it may
5110 result in calling the same event handler again), use with
5111 extreme care or, better, don't use at all!
5112
5113 :see: `wx.Yield`, `wx.YieldIfNeeded`, `wx.SafeYield`
5114
5115 """
5116 return _core_.PyApp_Yield(*args, **kwargs)
5117
5118 def WakeUpIdle(*args, **kwargs):
5119 """
5120 WakeUpIdle(self)
5121
5122 Make sure that idle events are sent again.
5123 :see: `wx.WakeUpIdle`
5124 """
5125 return _core_.PyApp_WakeUpIdle(*args, **kwargs)
5126
5127 def IsMainLoopRunning(*args, **kwargs):
5128 """
5129 IsMainLoopRunning() -> bool
5130
5131 Returns True if we're running the main loop, i.e. if the events can
5132 currently be dispatched.
5133 """
5134 return _core_.PyApp_IsMainLoopRunning(*args, **kwargs)
5135
5136 IsMainLoopRunning = staticmethod(IsMainLoopRunning)
5137 def MainLoop(*args, **kwargs):
5138 """
5139 MainLoop(self) -> int
5140
5141 Execute the main GUI loop, the function doesn't normally return until
5142 all top level windows have been closed and destroyed.
5143 """
5144 return _core_.PyApp_MainLoop(*args, **kwargs)
5145
5146 def Exit(*args, **kwargs):
5147 """
5148 Exit(self)
5149
5150 Exit the main loop thus terminating the application.
5151 :see: `wx.Exit`
5152 """
5153 return _core_.PyApp_Exit(*args, **kwargs)
5154
5155 def ExitMainLoop(*args, **kwargs):
5156 """
5157 ExitMainLoop(self)
5158
5159 Exit the main GUI loop during the next iteration of the main
5160 loop, (i.e. it does not stop the program immediately!)
5161 """
5162 return _core_.PyApp_ExitMainLoop(*args, **kwargs)
5163
5164 def Pending(*args, **kwargs):
5165 """
5166 Pending(self) -> bool
5167
5168 Returns True if there are unprocessed events in the event queue.
5169 """
5170 return _core_.PyApp_Pending(*args, **kwargs)
5171
5172 def Dispatch(*args, **kwargs):
5173 """
5174 Dispatch(self) -> bool
5175
5176 Process the first event in the event queue (blocks until an event
5177 appears if there are none currently)
5178 """
5179 return _core_.PyApp_Dispatch(*args, **kwargs)
5180
5181 def ProcessIdle(*args, **kwargs):
5182 """
5183 ProcessIdle(self) -> bool
5184
5185 Called from the MainLoop when the application becomes idle (there are
5186 no pending events) and sends a `wx.IdleEvent` to all interested
5187 parties. Returns True if more idle events are needed, False if not.
5188 """
5189 return _core_.PyApp_ProcessIdle(*args, **kwargs)
5190
5191 def SendIdleEvents(*args, **kwargs):
5192 """
5193 SendIdleEvents(self, Window win, IdleEvent event) -> bool
5194
5195 Send idle event to window and all subwindows. Returns True if more
5196 idle time is requested.
5197 """
5198 return _core_.PyApp_SendIdleEvents(*args, **kwargs)
5199
5200 def IsActive(*args, **kwargs):
5201 """
5202 IsActive(self) -> bool
5203
5204 Return True if our app has focus.
5205 """
5206 return _core_.PyApp_IsActive(*args, **kwargs)
5207
5208 def SetTopWindow(*args, **kwargs):
5209 """
5210 SetTopWindow(self, Window win)
5211
5212 Set the *main* top level window
5213 """
5214 return _core_.PyApp_SetTopWindow(*args, **kwargs)
5215
5216 def GetTopWindow(*args, **kwargs):
5217 """
5218 GetTopWindow(self) -> Window
5219
5220 Return the *main* top level window (if it hadn't been set previously
5221 with SetTopWindow(), will return just some top level window and, if
5222 there not any, will return None)
5223 """
5224 return _core_.PyApp_GetTopWindow(*args, **kwargs)
5225
5226 def SetExitOnFrameDelete(*args, **kwargs):
5227 """
5228 SetExitOnFrameDelete(self, bool flag)
5229
5230 Control the exit behaviour: by default, the program will exit the main
5231 loop (and so, usually, terminate) when the last top-level program
5232 window is deleted. Beware that if you disable this behaviour (with
5233 SetExitOnFrameDelete(False)), you'll have to call ExitMainLoop()
5234 explicitly from somewhere.
5235 """
5236 return _core_.PyApp_SetExitOnFrameDelete(*args, **kwargs)
5237
5238 def GetExitOnFrameDelete(*args, **kwargs):
5239 """
5240 GetExitOnFrameDelete(self) -> bool
5241
5242 Get the current exit behaviour setting.
5243 """
5244 return _core_.PyApp_GetExitOnFrameDelete(*args, **kwargs)
5245
5246 def SetUseBestVisual(*args, **kwargs):
5247 """
5248 SetUseBestVisual(self, bool flag)
5249
5250 Set whether the app should try to use the best available visual on
5251 systems where more than one is available, (Sun, SGI, XFree86 4, etc.)
5252 """
5253 return _core_.PyApp_SetUseBestVisual(*args, **kwargs)
5254
5255 def GetUseBestVisual(*args, **kwargs):
5256 """
5257 GetUseBestVisual(self) -> bool
5258
5259 Get current UseBestVisual setting.
5260 """
5261 return _core_.PyApp_GetUseBestVisual(*args, **kwargs)
5262
5263 def SetPrintMode(*args, **kwargs):
5264 """SetPrintMode(self, int mode)"""
5265 return _core_.PyApp_SetPrintMode(*args, **kwargs)
5266
5267 def GetPrintMode(*args, **kwargs):
5268 """GetPrintMode(self) -> int"""
5269 return _core_.PyApp_GetPrintMode(*args, **kwargs)
5270
5271 def SetAssertMode(*args, **kwargs):
5272 """
5273 SetAssertMode(self, int mode)
5274
5275 Set the OnAssert behaviour for debug and hybrid builds.
5276 """
5277 return _core_.PyApp_SetAssertMode(*args, **kwargs)
5278
5279 def GetAssertMode(*args, **kwargs):
5280 """
5281 GetAssertMode(self) -> int
5282
5283 Get the current OnAssert behaviour setting.
5284 """
5285 return _core_.PyApp_GetAssertMode(*args, **kwargs)
5286
5287 def GetMacSupportPCMenuShortcuts(*args, **kwargs):
5288 """GetMacSupportPCMenuShortcuts() -> bool"""
5289 return _core_.PyApp_GetMacSupportPCMenuShortcuts(*args, **kwargs)
5290
5291 GetMacSupportPCMenuShortcuts = staticmethod(GetMacSupportPCMenuShortcuts)
5292 def GetMacAboutMenuItemId(*args, **kwargs):
5293 """GetMacAboutMenuItemId() -> long"""
5294 return _core_.PyApp_GetMacAboutMenuItemId(*args, **kwargs)
5295
5296 GetMacAboutMenuItemId = staticmethod(GetMacAboutMenuItemId)
5297 def GetMacPreferencesMenuItemId(*args, **kwargs):
5298 """GetMacPreferencesMenuItemId() -> long"""
5299 return _core_.PyApp_GetMacPreferencesMenuItemId(*args, **kwargs)
5300
5301 GetMacPreferencesMenuItemId = staticmethod(GetMacPreferencesMenuItemId)
5302 def GetMacExitMenuItemId(*args, **kwargs):
5303 """GetMacExitMenuItemId() -> long"""
5304 return _core_.PyApp_GetMacExitMenuItemId(*args, **kwargs)
5305
5306 GetMacExitMenuItemId = staticmethod(GetMacExitMenuItemId)
5307 def GetMacHelpMenuTitleName(*args, **kwargs):
5308 """GetMacHelpMenuTitleName() -> String"""
5309 return _core_.PyApp_GetMacHelpMenuTitleName(*args, **kwargs)
5310
5311 GetMacHelpMenuTitleName = staticmethod(GetMacHelpMenuTitleName)
5312 def SetMacSupportPCMenuShortcuts(*args, **kwargs):
5313 """SetMacSupportPCMenuShortcuts(bool val)"""
5314 return _core_.PyApp_SetMacSupportPCMenuShortcuts(*args, **kwargs)
5315
5316 SetMacSupportPCMenuShortcuts = staticmethod(SetMacSupportPCMenuShortcuts)
5317 def SetMacAboutMenuItemId(*args, **kwargs):
5318 """SetMacAboutMenuItemId(long val)"""
5319 return _core_.PyApp_SetMacAboutMenuItemId(*args, **kwargs)
5320
5321 SetMacAboutMenuItemId = staticmethod(SetMacAboutMenuItemId)
5322 def SetMacPreferencesMenuItemId(*args, **kwargs):
5323 """SetMacPreferencesMenuItemId(long val)"""
5324 return _core_.PyApp_SetMacPreferencesMenuItemId(*args, **kwargs)
5325
5326 SetMacPreferencesMenuItemId = staticmethod(SetMacPreferencesMenuItemId)
5327 def SetMacExitMenuItemId(*args, **kwargs):
5328 """SetMacExitMenuItemId(long val)"""
5329 return _core_.PyApp_SetMacExitMenuItemId(*args, **kwargs)
5330
5331 SetMacExitMenuItemId = staticmethod(SetMacExitMenuItemId)
5332 def SetMacHelpMenuTitleName(*args, **kwargs):
5333 """SetMacHelpMenuTitleName(String val)"""
5334 return _core_.PyApp_SetMacHelpMenuTitleName(*args, **kwargs)
5335
5336 SetMacHelpMenuTitleName = staticmethod(SetMacHelpMenuTitleName)
5337 def _BootstrapApp(*args, **kwargs):
5338 """
5339 _BootstrapApp(self)
5340
5341 For internal use only
5342 """
5343 return _core_.PyApp__BootstrapApp(*args, **kwargs)
5344
5345 def GetComCtl32Version(*args, **kwargs):
5346 """
5347 GetComCtl32Version() -> int
5348
5349 Returns 400, 470, 471, etc. for comctl32.dll 4.00, 4.70, 4.71 or 0 if
5350 it wasn't found at all. Raises an exception on non-Windows platforms.
5351 """
5352 return _core_.PyApp_GetComCtl32Version(*args, **kwargs)
5353
5354 GetComCtl32Version = staticmethod(GetComCtl32Version)
5355
5356 class PyAppPtr(PyApp):
5357 def __init__(self, this):
5358 self.this = this
5359 if not hasattr(self,"thisown"): self.thisown = 0
5360 self.__class__ = PyApp
5361 _core_.PyApp_swigregister(PyAppPtr)
5362
5363 def PyApp_IsMainLoopRunning(*args, **kwargs):
5364 """
5365 PyApp_IsMainLoopRunning() -> bool
5366
5367 Returns True if we're running the main loop, i.e. if the events can
5368 currently be dispatched.
5369 """
5370 return _core_.PyApp_IsMainLoopRunning(*args, **kwargs)
5371
5372 def PyApp_GetMacSupportPCMenuShortcuts(*args, **kwargs):
5373 """PyApp_GetMacSupportPCMenuShortcuts() -> bool"""
5374 return _core_.PyApp_GetMacSupportPCMenuShortcuts(*args, **kwargs)
5375
5376 def PyApp_GetMacAboutMenuItemId(*args, **kwargs):
5377 """PyApp_GetMacAboutMenuItemId() -> long"""
5378 return _core_.PyApp_GetMacAboutMenuItemId(*args, **kwargs)
5379
5380 def PyApp_GetMacPreferencesMenuItemId(*args, **kwargs):
5381 """PyApp_GetMacPreferencesMenuItemId() -> long"""
5382 return _core_.PyApp_GetMacPreferencesMenuItemId(*args, **kwargs)
5383
5384 def PyApp_GetMacExitMenuItemId(*args, **kwargs):
5385 """PyApp_GetMacExitMenuItemId() -> long"""
5386 return _core_.PyApp_GetMacExitMenuItemId(*args, **kwargs)
5387
5388 def PyApp_GetMacHelpMenuTitleName(*args, **kwargs):
5389 """PyApp_GetMacHelpMenuTitleName() -> String"""
5390 return _core_.PyApp_GetMacHelpMenuTitleName(*args, **kwargs)
5391
5392 def PyApp_SetMacSupportPCMenuShortcuts(*args, **kwargs):
5393 """PyApp_SetMacSupportPCMenuShortcuts(bool val)"""
5394 return _core_.PyApp_SetMacSupportPCMenuShortcuts(*args, **kwargs)
5395
5396 def PyApp_SetMacAboutMenuItemId(*args, **kwargs):
5397 """PyApp_SetMacAboutMenuItemId(long val)"""
5398 return _core_.PyApp_SetMacAboutMenuItemId(*args, **kwargs)
5399
5400 def PyApp_SetMacPreferencesMenuItemId(*args, **kwargs):
5401 """PyApp_SetMacPreferencesMenuItemId(long val)"""
5402 return _core_.PyApp_SetMacPreferencesMenuItemId(*args, **kwargs)
5403
5404 def PyApp_SetMacExitMenuItemId(*args, **kwargs):
5405 """PyApp_SetMacExitMenuItemId(long val)"""
5406 return _core_.PyApp_SetMacExitMenuItemId(*args, **kwargs)
5407
5408 def PyApp_SetMacHelpMenuTitleName(*args, **kwargs):
5409 """PyApp_SetMacHelpMenuTitleName(String val)"""
5410 return _core_.PyApp_SetMacHelpMenuTitleName(*args, **kwargs)
5411
5412 def PyApp_GetComCtl32Version(*args, **kwargs):
5413 """
5414 PyApp_GetComCtl32Version() -> int
5415
5416 Returns 400, 470, 471, etc. for comctl32.dll 4.00, 4.70, 4.71 or 0 if
5417 it wasn't found at all. Raises an exception on non-Windows platforms.
5418 """
5419 return _core_.PyApp_GetComCtl32Version(*args, **kwargs)
5420
5421 #---------------------------------------------------------------------------
5422
5423
5424 def Exit(*args, **kwargs):
5425 """
5426 Exit()
5427
5428 Force an exit of the application. Convenience for wx.GetApp().Exit()
5429 """
5430 return _core_.Exit(*args, **kwargs)
5431
5432 def Yield(*args, **kwargs):
5433 """
5434 Yield() -> bool
5435
5436 Yield to other apps/messages. Convenience for wx.GetApp().Yield()
5437 """
5438 return _core_.Yield(*args, **kwargs)
5439
5440 def YieldIfNeeded(*args, **kwargs):
5441 """
5442 YieldIfNeeded() -> bool
5443
5444 Yield to other apps/messages. Convenience for wx.GetApp().Yield(True)
5445 """
5446 return _core_.YieldIfNeeded(*args, **kwargs)
5447
5448 def SafeYield(*args, **kwargs):
5449 """
5450 SafeYield(Window win=None, bool onlyIfNeeded=False) -> bool
5451
5452 This function is similar to `wx.Yield`, except that it disables the
5453 user input to all program windows before calling `wx.Yield` and
5454 re-enables it again afterwards. If ``win`` is not None, this window
5455 will remain enabled, allowing the implementation of some limited user
5456 interaction.
5457
5458 :Returns: the result of the call to `wx.Yield`.
5459 """
5460 return _core_.SafeYield(*args, **kwargs)
5461
5462 def WakeUpIdle(*args, **kwargs):
5463 """
5464 WakeUpIdle()
5465
5466 Cause the message queue to become empty again, so idle events will be
5467 sent.
5468 """
5469 return _core_.WakeUpIdle(*args, **kwargs)
5470
5471 def PostEvent(*args, **kwargs):
5472 """
5473 PostEvent(EvtHandler dest, Event event)
5474
5475 Send an event to a window or other wx.EvtHandler to be processed
5476 later.
5477 """
5478 return _core_.PostEvent(*args, **kwargs)
5479
5480 def App_CleanUp(*args, **kwargs):
5481 """
5482 App_CleanUp()
5483
5484 For internal use only, it is used to cleanup after wxWidgets when
5485 Python shuts down.
5486 """
5487 return _core_.App_CleanUp(*args, **kwargs)
5488
5489 def GetApp(*args, **kwargs):
5490 """
5491 GetApp() -> PyApp
5492
5493 Return a reference to the current wx.App object.
5494 """
5495 return _core_.GetApp(*args, **kwargs)
5496
5497 def SetDefaultPyEncoding(*args, **kwargs):
5498 """
5499 SetDefaultPyEncoding(string encoding)
5500
5501 Sets the encoding that wxPython will use when it needs to convert a
5502 Python string or unicode object to or from a wxString.
5503
5504 The default encoding is the value of ``locale.getdefaultlocale()[1]``
5505 but please be aware that the default encoding within the same locale
5506 may be slightly different on different platforms. For example, please
5507 see http://www.alanwood.net/demos/charsetdiffs.html for differences
5508 between the common latin/roman encodings.
5509 """
5510 return _core_.SetDefaultPyEncoding(*args, **kwargs)
5511
5512 def GetDefaultPyEncoding(*args, **kwargs):
5513 """
5514 GetDefaultPyEncoding() -> string
5515
5516 Gets the current encoding that wxPython will use when it needs to
5517 convert a Python string or unicode object to or from a wxString.
5518 """
5519 return _core_.GetDefaultPyEncoding(*args, **kwargs)
5520 #----------------------------------------------------------------------
5521
5522 class PyOnDemandOutputWindow:
5523 """
5524 A class that can be used for redirecting Python's stdout and
5525 stderr streams. It will do nothing until something is wrriten to
5526 the stream at which point it will create a Frame with a text area
5527 and write the text there.
5528 """
5529 def __init__(self, title = "wxPython: stdout/stderr"):
5530 self.frame = None
5531 self.title = title
5532 self.pos = wx.DefaultPosition
5533 self.size = (450, 300)
5534 self.parent = None
5535
5536 def SetParent(self, parent):
5537 """Set the window to be used as the popup Frame's parent."""
5538 self.parent = parent
5539
5540
5541 def CreateOutputWindow(self, st):
5542 self.frame = wx.Frame(self.parent, -1, self.title, self.pos, self.size,
5543 style=wx.DEFAULT_FRAME_STYLE)
5544 self.text = wx.TextCtrl(self.frame, -1, "",
5545 style=wx.TE_MULTILINE|wx.TE_READONLY)
5546 self.text.AppendText(st)
5547 self.frame.Show(True)
5548 EVT_CLOSE(self.frame, self.OnCloseWindow)
5549
5550
5551 def OnCloseWindow(self, event):
5552 if self.frame is not None:
5553 self.frame.Destroy()
5554 self.frame = None
5555 self.text = None
5556
5557
5558 # These methods provide the file-like output behaviour.
5559 def write(self, text):
5560 """
5561 Create the output window if needed and write the string to it.
5562 If not called in the context of the gui thread then uses
5563 CallAfter to do the work there.
5564 """
5565 if self.frame is None:
5566 if not wx.Thread_IsMain():
5567 wx.CallAfter(self.CreateOutputWindow, text)
5568 else:
5569 self.CreateOutputWindow(text)
5570 else:
5571 if not wx.Thread_IsMain():
5572 wx.CallAfter(self.text.AppendText, text)
5573 else:
5574 self.text.AppendText(text)
5575
5576
5577 def close(self):
5578 if self.frame is not None:
5579 wx.CallAfter(self.frame.Close)
5580
5581
5582 def flush(self):
5583 pass
5584
5585
5586
5587 #----------------------------------------------------------------------
5588
5589 _defRedirect = (wx.Platform == '__WXMSW__' or wx.Platform == '__WXMAC__')
5590
5591 class App(wx.PyApp):
5592 """
5593 The ``wx.App`` class represents the application and is used to:
5594
5595 * bootstrap the wxPython system and initialize the underlying
5596 gui toolkit
5597 * set and get application-wide properties
5598 * implement the windowing system main message or event loop,
5599 and to dispatch events to window instances
5600 * etc.
5601
5602 Every application must have a ``wx.App`` instance, and all
5603 creation of UI objects should be delayed until after the
5604 ``wx.App`` object has been created in order to ensure that the gui
5605 platform and wxWidgets have been fully initialized.
5606
5607 Normally you would derive from this class and implement an
5608 ``OnInit`` method that creates a frame and then calls
5609 ``self.SetTopWindow(frame)``.
5610
5611 :see: `wx.PySimpleApp` for a simpler app class that can be used
5612 directly.
5613 """
5614
5615 outputWindowClass = PyOnDemandOutputWindow
5616
5617 def __init__(self, redirect=_defRedirect, filename=None,
5618 useBestVisual=False, clearSigInt=True):
5619 """
5620 Construct a ``wx.App`` object.
5621
5622 :param redirect: Should ``sys.stdout`` and ``sys.stderr`` be
5623 redirected? Defaults to True on Windows and Mac, False
5624 otherwise. If `filename` is None then output will be
5625 redirected to a window that pops up as needed. (You can
5626 control what kind of window is created for the output by
5627 resetting the class variable ``outputWindowClass`` to a
5628 class of your choosing.)
5629
5630 :param filename: The name of a file to redirect output to, if
5631 redirect is True.
5632
5633 :param useBestVisual: Should the app try to use the best
5634 available visual provided by the system (only relevant on
5635 systems that have more than one visual.) This parameter
5636 must be used instead of calling `SetUseBestVisual` later
5637 on because it must be set before the underlying GUI
5638 toolkit is initialized.
5639
5640 :param clearSigInt: Should SIGINT be cleared? This allows the
5641 app to terminate upon a Ctrl-C in the console like other
5642 GUI apps will.
5643
5644 :note: You should override OnInit to do applicaition
5645 initialization to ensure that the system, toolkit and
5646 wxWidgets are fully initialized.
5647 """
5648 wx.PyApp.__init__(self)
5649
5650 if wx.Platform == "__WXMAC__":
5651 try:
5652 import MacOS
5653 if not MacOS.WMAvailable():
5654 print """\
5655 This program needs access to the screen. Please run with 'pythonw',
5656 not 'python', and only when you are logged in on the main display of
5657 your Mac."""
5658 _sys.exit(1)
5659 except SystemExit:
5660 raise
5661 except:
5662 pass
5663
5664 # This has to be done before OnInit
5665 self.SetUseBestVisual(useBestVisual)
5666
5667 # Set the default handler for SIGINT. This fixes a problem
5668 # where if Ctrl-C is pressed in the console that started this
5669 # app then it will not appear to do anything, (not even send
5670 # KeyboardInterrupt???) but will later segfault on exit. By
5671 # setting the default handler then the app will exit, as
5672 # expected (depending on platform.)
5673 if clearSigInt:
5674 try:
5675 import signal
5676 signal.signal(signal.SIGINT, signal.SIG_DFL)
5677 except:
5678 pass
5679
5680 # Save and redirect the stdio to a window?
5681 self.stdioWin = None
5682 self.saveStdio = (_sys.stdout, _sys.stderr)
5683 if redirect:
5684 self.RedirectStdio(filename)
5685
5686 # Use Python's install prefix as the default
5687 wx.StandardPaths.Get().SetInstallPrefix(_sys.prefix)
5688
5689 # This finishes the initialization of wxWindows and then calls
5690 # the OnInit that should be present in the derived class
5691 self._BootstrapApp()
5692
5693
5694 def __del__(self):
5695 try:
5696 self.RestoreStdio() # Just in case the MainLoop was overridden
5697 finally:
5698 wx.PyApp.__del__(self)
5699
5700 def Destroy(self):
5701 wx.PyApp.Destroy(self)
5702 self.thisown = 0
5703
5704 def SetTopWindow(self, frame):
5705 """Set the \"main\" top level window"""
5706 if self.stdioWin:
5707 self.stdioWin.SetParent(frame)
5708 wx.PyApp.SetTopWindow(self, frame)
5709
5710
5711 def MainLoop(self):
5712 """Execute the main GUI event loop"""
5713 wx.PyApp.MainLoop(self)
5714 self.RestoreStdio()
5715
5716
5717 def RedirectStdio(self, filename=None):
5718 """Redirect sys.stdout and sys.stderr to a file or a popup window."""
5719 if filename:
5720 _sys.stdout = _sys.stderr = open(filename, 'a')
5721 else:
5722 self.stdioWin = self.outputWindowClass()
5723 _sys.stdout = _sys.stderr = self.stdioWin
5724
5725
5726 def RestoreStdio(self):
5727 _sys.stdout, _sys.stderr = self.saveStdio
5728
5729
5730 def SetOutputWindowAttributes(self, title=None, pos=None, size=None):
5731 """
5732 Set the title, position and/or size of the output window if
5733 the stdio has been redirected. This should be called before
5734 any output would cause the output window to be created.
5735 """
5736 if self.stdioWin:
5737 if title is not None:
5738 self.stdioWin.title = title
5739 if pos is not None:
5740 self.stdioWin.pos = pos
5741 if size is not None:
5742 self.stdioWin.size = size
5743
5744
5745
5746
5747 # change from wx.PyApp_XX to wx.App_XX
5748 App_GetMacSupportPCMenuShortcuts = _core_.PyApp_GetMacSupportPCMenuShortcuts
5749 App_GetMacAboutMenuItemId = _core_.PyApp_GetMacAboutMenuItemId
5750 App_GetMacPreferencesMenuItemId = _core_.PyApp_GetMacPreferencesMenuItemId
5751 App_GetMacExitMenuItemId = _core_.PyApp_GetMacExitMenuItemId
5752 App_GetMacHelpMenuTitleName = _core_.PyApp_GetMacHelpMenuTitleName
5753 App_SetMacSupportPCMenuShortcuts = _core_.PyApp_SetMacSupportPCMenuShortcuts
5754 App_SetMacAboutMenuItemId = _core_.PyApp_SetMacAboutMenuItemId
5755 App_SetMacPreferencesMenuItemId = _core_.PyApp_SetMacPreferencesMenuItemId
5756 App_SetMacExitMenuItemId = _core_.PyApp_SetMacExitMenuItemId
5757 App_SetMacHelpMenuTitleName = _core_.PyApp_SetMacHelpMenuTitleName
5758 App_GetComCtl32Version = _core_.PyApp_GetComCtl32Version
5759
5760 #----------------------------------------------------------------------------
5761
5762 class PySimpleApp(wx.App):
5763 """
5764 A simple application class. You can just create one of these and
5765 then then make your top level windows later, and not have to worry
5766 about OnInit. For example::
5767
5768 app = wx.PySimpleApp()
5769 frame = wx.Frame(None, title='Hello World')
5770 frame.Show()
5771 app.MainLoop()
5772
5773 :see: `wx.App`
5774 """
5775
5776 def __init__(self, redirect=False, filename=None,
5777 useBestVisual=False, clearSigInt=True):
5778 """
5779 :see: `wx.App.__init__`
5780 """
5781 wx.App.__init__(self, redirect, filename, useBestVisual, clearSigInt)
5782
5783 def OnInit(self):
5784 return True
5785
5786
5787
5788 # Is anybody using this one?
5789 class PyWidgetTester(wx.App):
5790 def __init__(self, size = (250, 100)):
5791 self.size = size
5792 wx.App.__init__(self, 0)
5793
5794 def OnInit(self):
5795 self.frame = wx.Frame(None, -1, "Widget Tester", pos=(0,0), size=self.size)
5796 self.SetTopWindow(self.frame)
5797 return True
5798
5799 def SetWidget(self, widgetClass, *args, **kwargs):
5800 w = widgetClass(self.frame, *args, **kwargs)
5801 self.frame.Show(True)
5802
5803 #----------------------------------------------------------------------------
5804 # DO NOT hold any other references to this object. This is how we
5805 # know when to cleanup system resources that wxWidgets is holding. When
5806 # the sys module is unloaded, the refcount on sys.__wxPythonCleanup
5807 # goes to zero and it calls the wx.App_CleanUp function.
5808
5809 class __wxPyCleanup:
5810 def __init__(self):
5811 self.cleanup = _core_.App_CleanUp
5812 def __del__(self):
5813 self.cleanup()
5814
5815 _sys.__wxPythonCleanup = __wxPyCleanup()
5816
5817 ## # another possible solution, but it gets called too early...
5818 ## import atexit
5819 ## atexit.register(_core_.wxApp_CleanUp)
5820
5821
5822 #----------------------------------------------------------------------------
5823
5824 #---------------------------------------------------------------------------
5825
5826 class EventLoop(object):
5827 """Proxy of C++ EventLoop class"""
5828 def __repr__(self):
5829 return "<%s.%s; proxy of C++ wxEventLoop instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
5830 def __init__(self, *args, **kwargs):
5831 """__init__(self) -> EventLoop"""
5832 newobj = _core_.new_EventLoop(*args, **kwargs)
5833 self.this = newobj.this
5834 self.thisown = 1
5835 del newobj.thisown
5836 def __del__(self, destroy=_core_.delete_EventLoop):
5837 """__del__(self)"""
5838 try:
5839 if self.thisown: destroy(self)
5840 except: pass
5841
5842 def Run(*args, **kwargs):
5843 """Run(self) -> int"""
5844 return _core_.EventLoop_Run(*args, **kwargs)
5845
5846 def Exit(*args, **kwargs):
5847 """Exit(self, int rc=0)"""
5848 return _core_.EventLoop_Exit(*args, **kwargs)
5849
5850 def Pending(*args, **kwargs):
5851 """Pending(self) -> bool"""
5852 return _core_.EventLoop_Pending(*args, **kwargs)
5853
5854 def Dispatch(*args, **kwargs):
5855 """Dispatch(self) -> bool"""
5856 return _core_.EventLoop_Dispatch(*args, **kwargs)
5857
5858 def IsRunning(*args, **kwargs):
5859 """IsRunning(self) -> bool"""
5860 return _core_.EventLoop_IsRunning(*args, **kwargs)
5861
5862 def GetActive(*args, **kwargs):
5863 """GetActive() -> EventLoop"""
5864 return _core_.EventLoop_GetActive(*args, **kwargs)
5865
5866 GetActive = staticmethod(GetActive)
5867 def SetActive(*args, **kwargs):
5868 """SetActive(EventLoop loop)"""
5869 return _core_.EventLoop_SetActive(*args, **kwargs)
5870
5871 SetActive = staticmethod(SetActive)
5872
5873 class EventLoopPtr(EventLoop):
5874 def __init__(self, this):
5875 self.this = this
5876 if not hasattr(self,"thisown"): self.thisown = 0
5877 self.__class__ = EventLoop
5878 _core_.EventLoop_swigregister(EventLoopPtr)
5879
5880 def EventLoop_GetActive(*args, **kwargs):
5881 """EventLoop_GetActive() -> EventLoop"""
5882 return _core_.EventLoop_GetActive(*args, **kwargs)
5883
5884 def EventLoop_SetActive(*args, **kwargs):
5885 """EventLoop_SetActive(EventLoop loop)"""
5886 return _core_.EventLoop_SetActive(*args, **kwargs)
5887
5888 #---------------------------------------------------------------------------
5889
5890 class AcceleratorEntry(object):
5891 """
5892 A class used to define items in an `wx.AcceleratorTable`. wxPython
5893 programs can choose to use wx.AcceleratorEntry objects, but using a
5894 list of 3-tuple of integers (flags, keyCode, cmdID) usually works just
5895 as well. See `__init__` for of the tuple values.
5896
5897 :see: `wx.AcceleratorTable`
5898 """
5899 def __repr__(self):
5900 return "<%s.%s; proxy of C++ wxAcceleratorEntry instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
5901 def __init__(self, *args, **kwargs):
5902 """
5903 __init__(self, int flags=0, int keyCode=0, int cmdID=0) -> AcceleratorEntry
5904
5905 Construct a wx.AcceleratorEntry.
5906 """
5907 newobj = _core_.new_AcceleratorEntry(*args, **kwargs)
5908 self.this = newobj.this
5909 self.thisown = 1
5910 del newobj.thisown
5911 def __del__(self, destroy=_core_.delete_AcceleratorEntry):
5912 """__del__(self)"""
5913 try:
5914 if self.thisown: destroy(self)
5915 except: pass
5916
5917 def Set(*args, **kwargs):
5918 """
5919 Set(self, int flags, int keyCode, int cmd)
5920
5921 (Re)set the attributes of a wx.AcceleratorEntry.
5922 :see `__init__`
5923 """
5924 return _core_.AcceleratorEntry_Set(*args, **kwargs)
5925
5926 def GetFlags(*args, **kwargs):
5927 """
5928 GetFlags(self) -> int
5929
5930 Get the AcceleratorEntry's flags.
5931 """
5932 return _core_.AcceleratorEntry_GetFlags(*args, **kwargs)
5933
5934 def GetKeyCode(*args, **kwargs):
5935 """
5936 GetKeyCode(self) -> int
5937
5938 Get the AcceleratorEntry's keycode.
5939 """
5940 return _core_.AcceleratorEntry_GetKeyCode(*args, **kwargs)
5941
5942 def GetCommand(*args, **kwargs):
5943 """
5944 GetCommand(self) -> int
5945
5946 Get the AcceleratorEntry's command ID.
5947 """
5948 return _core_.AcceleratorEntry_GetCommand(*args, **kwargs)
5949
5950
5951 class AcceleratorEntryPtr(AcceleratorEntry):
5952 def __init__(self, this):
5953 self.this = this
5954 if not hasattr(self,"thisown"): self.thisown = 0
5955 self.__class__ = AcceleratorEntry
5956 _core_.AcceleratorEntry_swigregister(AcceleratorEntryPtr)
5957
5958 class AcceleratorTable(Object):
5959 """
5960 An accelerator table allows the application to specify a table of
5961 keyboard shortcuts for menus or other commands. On Windows, menu or
5962 button commands are supported; on GTK, only menu commands are
5963 supported.
5964 """
5965 def __repr__(self):
5966 return "<%s.%s; proxy of C++ wxAcceleratorTable instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
5967 def __init__(self, *args, **kwargs):
5968 """
5969 __init__(entries) -> AcceleratorTable
5970
5971 Construct an AcceleratorTable from a list of `wx.AcceleratorEntry`
5972 items or or of 3-tuples (flags, keyCode, cmdID)
5973
5974 :see: `wx.AcceleratorEntry`
5975 """
5976 newobj = _core_.new_AcceleratorTable(*args, **kwargs)
5977 self.this = newobj.this
5978 self.thisown = 1
5979 del newobj.thisown
5980 def __del__(self, destroy=_core_.delete_AcceleratorTable):
5981 """__del__(self)"""
5982 try:
5983 if self.thisown: destroy(self)
5984 except: pass
5985
5986 def Ok(*args, **kwargs):
5987 """Ok(self) -> bool"""
5988 return _core_.AcceleratorTable_Ok(*args, **kwargs)
5989
5990
5991 class AcceleratorTablePtr(AcceleratorTable):
5992 def __init__(self, this):
5993 self.this = this
5994 if not hasattr(self,"thisown"): self.thisown = 0
5995 self.__class__ = AcceleratorTable
5996 _core_.AcceleratorTable_swigregister(AcceleratorTablePtr)
5997
5998
5999 def GetAccelFromString(*args, **kwargs):
6000 """GetAccelFromString(String label) -> AcceleratorEntry"""
6001 return _core_.GetAccelFromString(*args, **kwargs)
6002 #---------------------------------------------------------------------------
6003
6004 class VisualAttributes(object):
6005 """struct containing all the visual attributes of a control"""
6006 def __repr__(self):
6007 return "<%s.%s; proxy of C++ wxVisualAttributes instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
6008 def __init__(self, *args, **kwargs):
6009 """
6010 __init__(self) -> VisualAttributes
6011
6012 struct containing all the visual attributes of a control
6013 """
6014 newobj = _core_.new_VisualAttributes(*args, **kwargs)
6015 self.this = newobj.this
6016 self.thisown = 1
6017 del newobj.thisown
6018 def __del__(self, destroy=_core_.delete_VisualAttributes):
6019 """__del__(self)"""
6020 try:
6021 if self.thisown: destroy(self)
6022 except: pass
6023
6024 font = property(_core_.VisualAttributes_font_get, _core_.VisualAttributes_font_set)
6025 colFg = property(_core_.VisualAttributes_colFg_get, _core_.VisualAttributes_colFg_set)
6026 colBg = property(_core_.VisualAttributes_colBg_get, _core_.VisualAttributes_colBg_set)
6027
6028 class VisualAttributesPtr(VisualAttributes):
6029 def __init__(self, this):
6030 self.this = this
6031 if not hasattr(self,"thisown"): self.thisown = 0
6032 self.__class__ = VisualAttributes
6033 _core_.VisualAttributes_swigregister(VisualAttributesPtr)
6034 NullAcceleratorTable = cvar.NullAcceleratorTable
6035 PanelNameStr = cvar.PanelNameStr
6036
6037 WINDOW_VARIANT_NORMAL = _core_.WINDOW_VARIANT_NORMAL
6038 WINDOW_VARIANT_SMALL = _core_.WINDOW_VARIANT_SMALL
6039 WINDOW_VARIANT_MINI = _core_.WINDOW_VARIANT_MINI
6040 WINDOW_VARIANT_LARGE = _core_.WINDOW_VARIANT_LARGE
6041 WINDOW_VARIANT_MAX = _core_.WINDOW_VARIANT_MAX
6042 class Window(EvtHandler):
6043 """
6044 wx.Window is the base class for all windows and represents any visible
6045 object on the screen. All controls, top level windows and so on are
6046 wx.Windows. Sizers and device contexts are not however, as they don't
6047 appear on screen themselves.
6048
6049 """
6050 def __repr__(self):
6051 return "<%s.%s; proxy of C++ wxWindow instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
6052 def __init__(self, *args, **kwargs):
6053 """
6054 __init__(self, Window parent, int id=-1, Point pos=DefaultPosition,
6055 Size size=DefaultSize, long style=0, String name=PanelNameStr) -> Window
6056
6057 Construct and show a generic Window.
6058 """
6059 newobj = _core_.new_Window(*args, **kwargs)
6060 self.this = newobj.this
6061 self.thisown = 1
6062 del newobj.thisown
6063 self._setOORInfo(self)
6064
6065 def Create(*args, **kwargs):
6066 """
6067 Create(self, Window parent, int id=-1, Point pos=DefaultPosition,
6068 Size size=DefaultSize, long style=0, String name=PanelNameStr) -> bool
6069
6070 Create the GUI part of the Window for 2-phase creation mode.
6071 """
6072 return _core_.Window_Create(*args, **kwargs)
6073
6074 def Close(*args, **kwargs):
6075 """
6076 Close(self, bool force=False) -> bool
6077
6078 This function simply generates a EVT_CLOSE event whose handler usually
6079 tries to close the window. It doesn't close the window itself,
6080 however. If force is False (the default) then the window's close
6081 handler will be allowed to veto the destruction of the window.
6082 """
6083 return _core_.Window_Close(*args, **kwargs)
6084
6085 def Destroy(*args, **kwargs):
6086 """
6087 Destroy(self) -> bool
6088
6089 Destroys the window safely. Frames and dialogs are not destroyed
6090 immediately when this function is called -- they are added to a list
6091 of windows to be deleted on idle time, when all the window's events
6092 have been processed. This prevents problems with events being sent to
6093 non-existent windows.
6094
6095 Returns True if the window has either been successfully deleted, or it
6096 has been added to the list of windows pending real deletion.
6097 """
6098 return _core_.Window_Destroy(*args, **kwargs)
6099
6100 def DestroyChildren(*args, **kwargs):
6101 """
6102 DestroyChildren(self) -> bool
6103
6104 Destroys all children of a window. Called automatically by the
6105 destructor.
6106 """
6107 return _core_.Window_DestroyChildren(*args, **kwargs)
6108
6109 def IsBeingDeleted(*args, **kwargs):
6110 """
6111 IsBeingDeleted(self) -> bool
6112
6113 Is the window in the process of being deleted?
6114 """
6115 return _core_.Window_IsBeingDeleted(*args, **kwargs)
6116
6117 def SetTitle(*args, **kwargs):
6118 """
6119 SetTitle(self, String title)
6120
6121 Sets the window's title. Applicable only to frames and dialogs.
6122 """
6123 return _core_.Window_SetTitle(*args, **kwargs)
6124
6125 def GetTitle(*args, **kwargs):
6126 """
6127 GetTitle(self) -> String
6128
6129 Gets the window's title. Applicable only to frames and dialogs.
6130 """
6131 return _core_.Window_GetTitle(*args, **kwargs)
6132
6133 def SetLabel(*args, **kwargs):
6134 """
6135 SetLabel(self, String label)
6136
6137 Set the text which the window shows in its label if applicable.
6138 """
6139 return _core_.Window_SetLabel(*args, **kwargs)
6140
6141 def GetLabel(*args, **kwargs):
6142 """
6143 GetLabel(self) -> String
6144
6145 Generic way of getting a label from any window, for identification
6146 purposes. The interpretation of this function differs from class to
6147 class. For frames and dialogs, the value returned is the title. For
6148 buttons or static text controls, it is the button text. This function
6149 can be useful for meta-programs such as testing tools or special-needs
6150 access programs)which need to identify windows by name.
6151 """
6152 return _core_.Window_GetLabel(*args, **kwargs)
6153
6154 def SetName(*args, **kwargs):
6155 """
6156 SetName(self, String name)
6157
6158 Sets the window's name. The window name is used for ressource setting
6159 in X, it is not the same as the window title/label
6160 """
6161 return _core_.Window_SetName(*args, **kwargs)
6162
6163 def GetName(*args, **kwargs):
6164 """
6165 GetName(self) -> String
6166
6167 Returns the windows name. This name is not guaranteed to be unique;
6168 it is up to the programmer to supply an appropriate name in the window
6169 constructor or via wx.Window.SetName.
6170 """
6171 return _core_.Window_GetName(*args, **kwargs)
6172
6173 def SetWindowVariant(*args, **kwargs):
6174 """
6175 SetWindowVariant(self, int variant)
6176
6177 Sets the variant of the window/font size to use for this window, if
6178 the platform supports variants, for example, wxMac.
6179 """
6180 return _core_.Window_SetWindowVariant(*args, **kwargs)
6181
6182 def GetWindowVariant(*args, **kwargs):
6183 """GetWindowVariant(self) -> int"""
6184 return _core_.Window_GetWindowVariant(*args, **kwargs)
6185
6186 def SetId(*args, **kwargs):
6187 """
6188 SetId(self, int winid)
6189
6190 Sets the identifier of the window. Each window has an integer
6191 identifier. If the application has not provided one, an identifier
6192 will be generated. Normally, the identifier should be provided on
6193 creation and should not be modified subsequently.
6194 """
6195 return _core_.Window_SetId(*args, **kwargs)
6196
6197 def GetId(*args, **kwargs):
6198 """
6199 GetId(self) -> int
6200
6201 Returns the identifier of the window. Each window has an integer
6202 identifier. If the application has not provided one (or the default Id
6203 -1 is used) then an unique identifier with a negative value will be
6204 generated.
6205 """
6206 return _core_.Window_GetId(*args, **kwargs)
6207
6208 def NewControlId(*args, **kwargs):
6209 """
6210 NewControlId() -> int
6211
6212 Generate a control id for the controls which were not given one.
6213 """
6214 return _core_.Window_NewControlId(*args, **kwargs)
6215
6216 NewControlId = staticmethod(NewControlId)
6217 def NextControlId(*args, **kwargs):
6218 """
6219 NextControlId(int winid) -> int
6220
6221 Get the id of the control following the one with the given
6222 autogenerated) id
6223 """
6224 return _core_.Window_NextControlId(*args, **kwargs)
6225
6226 NextControlId = staticmethod(NextControlId)
6227 def PrevControlId(*args, **kwargs):
6228 """
6229 PrevControlId(int winid) -> int
6230
6231 Get the id of the control preceding the one with the given
6232 autogenerated) id
6233 """
6234 return _core_.Window_PrevControlId(*args, **kwargs)
6235
6236 PrevControlId = staticmethod(PrevControlId)
6237 def SetSize(*args, **kwargs):
6238 """
6239 SetSize(self, Size size)
6240
6241 Sets the size of the window in pixels.
6242 """
6243 return _core_.Window_SetSize(*args, **kwargs)
6244
6245 def SetDimensions(*args, **kwargs):
6246 """
6247 SetDimensions(self, int x, int y, int width, int height, int sizeFlags=SIZE_AUTO)
6248
6249 Sets the position and size of the window in pixels. The sizeFlags
6250 parameter indicates the interpretation of the other params if they are
6251 equal to -1.
6252
6253 ======================== ======================================
6254 wx.SIZE_AUTO A -1 indicates that a class-specific
6255 default should be used.
6256 wx.SIZE_USE_EXISTING Axisting dimensions should be used if
6257 -1 values are supplied.
6258 wxSIZE_ALLOW_MINUS_ONE Allow dimensions of -1 and less to be
6259 interpreted as real dimensions, not
6260 default values.
6261 ======================== ======================================
6262
6263 """
6264 return _core_.Window_SetDimensions(*args, **kwargs)
6265
6266 def SetRect(*args, **kwargs):
6267 """
6268 SetRect(self, Rect rect, int sizeFlags=SIZE_AUTO)
6269
6270 Sets the position and size of the window in pixels using a wx.Rect.
6271 """
6272 return _core_.Window_SetRect(*args, **kwargs)
6273
6274 def SetSizeWH(*args, **kwargs):
6275 """
6276 SetSizeWH(self, int width, int height)
6277
6278 Sets the size of the window in pixels.
6279 """
6280 return _core_.Window_SetSizeWH(*args, **kwargs)
6281
6282 def Move(*args, **kwargs):
6283 """
6284 Move(self, Point pt, int flags=SIZE_USE_EXISTING)
6285
6286 Moves the window to the given position.
6287 """
6288 return _core_.Window_Move(*args, **kwargs)
6289
6290 SetPosition = Move
6291 def MoveXY(*args, **kwargs):
6292 """
6293 MoveXY(self, int x, int y, int flags=SIZE_USE_EXISTING)
6294
6295 Moves the window to the given position.
6296 """
6297 return _core_.Window_MoveXY(*args, **kwargs)
6298
6299 def SetBestFittingSize(*args, **kwargs):
6300 """
6301 SetBestFittingSize(self, Size size=DefaultSize)
6302
6303 A 'Smart' SetSize that will fill in default size components with the
6304 window's *best size* values. Also set's the minsize for use with sizers.
6305 """
6306 return _core_.Window_SetBestFittingSize(*args, **kwargs)
6307
6308 def Raise(*args, **kwargs):
6309 """
6310 Raise(self)
6311
6312 Raises the window to the top of the window hierarchy if it is a
6313 managed window (dialog or frame).
6314 """
6315 return _core_.Window_Raise(*args, **kwargs)
6316
6317 def Lower(*args, **kwargs):
6318 """
6319 Lower(self)
6320
6321 Lowers the window to the bottom of the window hierarchy if it is a
6322 managed window (dialog or frame).
6323 """
6324 return _core_.Window_Lower(*args, **kwargs)
6325
6326 def SetClientSize(*args, **kwargs):
6327 """
6328 SetClientSize(self, Size size)
6329
6330 This sets the size of the window client area in pixels. Using this
6331 function to size a window tends to be more device-independent than
6332 wx.Window.SetSize, since the application need not worry about what
6333 dimensions the border or title bar have when trying to fit the window
6334 around panel items, for example.
6335 """
6336 return _core_.Window_SetClientSize(*args, **kwargs)
6337
6338 def SetClientSizeWH(*args, **kwargs):
6339 """
6340 SetClientSizeWH(self, int width, int height)
6341
6342 This sets the size of the window client area in pixels. Using this
6343 function to size a window tends to be more device-independent than
6344 wx.Window.SetSize, since the application need not worry about what
6345 dimensions the border or title bar have when trying to fit the window
6346 around panel items, for example.
6347 """
6348 return _core_.Window_SetClientSizeWH(*args, **kwargs)
6349
6350 def SetClientRect(*args, **kwargs):
6351 """
6352 SetClientRect(self, Rect rect)
6353
6354 This sets the size of the window client area in pixels. Using this
6355 function to size a window tends to be more device-independent than
6356 wx.Window.SetSize, since the application need not worry about what
6357 dimensions the border or title bar have when trying to fit the window
6358 around panel items, for example.
6359 """
6360 return _core_.Window_SetClientRect(*args, **kwargs)
6361
6362 def GetPosition(*args, **kwargs):
6363 """
6364 GetPosition(self) -> Point
6365
6366 Get the window's position.
6367 """
6368 return _core_.Window_GetPosition(*args, **kwargs)
6369
6370 def GetPositionTuple(*args, **kwargs):
6371 """
6372 GetPositionTuple() -> (x,y)
6373
6374 Get the window's position.
6375 """
6376 return _core_.Window_GetPositionTuple(*args, **kwargs)
6377
6378 def GetSize(*args, **kwargs):
6379 """
6380 GetSize(self) -> Size
6381
6382 Get the window size.
6383 """
6384 return _core_.Window_GetSize(*args, **kwargs)
6385
6386 def GetSizeTuple(*args, **kwargs):
6387 """
6388 GetSizeTuple() -> (width, height)
6389
6390 Get the window size.
6391 """
6392 return _core_.Window_GetSizeTuple(*args, **kwargs)
6393
6394 def GetRect(*args, **kwargs):
6395 """
6396 GetRect(self) -> Rect
6397
6398 Returns the size and position of the window as a wx.Rect object.
6399 """
6400 return _core_.Window_GetRect(*args, **kwargs)
6401
6402 def GetClientSize(*args, **kwargs):
6403 """
6404 GetClientSize(self) -> Size
6405
6406 This gets the size of the window's 'client area' in pixels. The client
6407 area is the area which may be drawn on by the programmer, excluding
6408 title bar, border, scrollbars, etc.
6409 """
6410 return _core_.Window_GetClientSize(*args, **kwargs)
6411
6412 def GetClientSizeTuple(*args, **kwargs):
6413 """
6414 GetClientSizeTuple() -> (width, height)
6415
6416 This gets the size of the window's 'client area' in pixels. The client
6417 area is the area which may be drawn on by the programmer, excluding
6418 title bar, border, scrollbars, etc.
6419 """
6420 return _core_.Window_GetClientSizeTuple(*args, **kwargs)
6421
6422 def GetClientAreaOrigin(*args, **kwargs):
6423 """
6424 GetClientAreaOrigin(self) -> Point
6425
6426 Get the origin of the client area of the window relative to the
6427 window's top left corner (the client area may be shifted because of
6428 the borders, scrollbars, other decorations...)
6429 """
6430 return _core_.Window_GetClientAreaOrigin(*args, **kwargs)
6431
6432 def GetClientRect(*args, **kwargs):
6433 """
6434 GetClientRect(self) -> Rect
6435
6436 Get the client area position and size as a `wx.Rect` object.
6437 """
6438 return _core_.Window_GetClientRect(*args, **kwargs)
6439
6440 def GetBestSize(*args, **kwargs):
6441 """
6442 GetBestSize(self) -> Size
6443
6444 This function returns the best acceptable minimal size for the
6445 window, if applicable. For example, for a static text control, it will
6446 be the minimal size such that the control label is not truncated. For
6447 windows containing subwindows (suzh aswx.Panel), the size returned by
6448 this function will be the same as the size the window would have had
6449 after calling Fit.
6450 """
6451 return _core_.Window_GetBestSize(*args, **kwargs)
6452
6453 def GetBestSizeTuple(*args, **kwargs):
6454 """
6455 GetBestSizeTuple() -> (width, height)
6456
6457 This function returns the best acceptable minimal size for the
6458 window, if applicable. For example, for a static text control, it will
6459 be the minimal size such that the control label is not truncated. For
6460 windows containing subwindows (suzh aswx.Panel), the size returned by
6461 this function will be the same as the size the window would have had
6462 after calling Fit.
6463 """
6464 return _core_.Window_GetBestSizeTuple(*args, **kwargs)
6465
6466 def InvalidateBestSize(*args, **kwargs):
6467 """
6468 InvalidateBestSize(self)
6469
6470 Reset the cached best size value so it will be recalculated the next
6471 time it is needed.
6472 """
6473 return _core_.Window_InvalidateBestSize(*args, **kwargs)
6474
6475 def GetBestFittingSize(*args, **kwargs):
6476 """
6477 GetBestFittingSize(self) -> Size
6478
6479 This function will merge the window's best size into the window's
6480 minimum size, giving priority to the min size components, and returns
6481 the results.
6482
6483 """
6484 return _core_.Window_GetBestFittingSize(*args, **kwargs)
6485
6486 def GetAdjustedBestSize(*args, **kwargs):
6487 """
6488 GetAdjustedBestSize(self) -> Size
6489
6490 This method is similar to GetBestSize, except in one
6491 thing. GetBestSize should return the minimum untruncated size of the
6492 window, while this method will return the largest of BestSize and any
6493 user specified minimum size. ie. it is the minimum size the window
6494 should currently be drawn at, not the minimal size it can possibly
6495 tolerate.
6496 """
6497 return _core_.Window_GetAdjustedBestSize(*args, **kwargs)
6498
6499 def Center(*args, **kwargs):
6500 """
6501 Center(self, int direction=BOTH)
6502
6503 Centers the window. The parameter specifies the direction for
6504 cetering, and may be wx.HORIZONTAL, wx.VERTICAL or wx.BOTH. It may
6505 also include wx.CENTER_ON_SCREEN flag if you want to center the window
6506 on the entire screen and not on its parent window. If it is a
6507 top-level window and has no parent then it will always be centered
6508 relative to the screen.
6509 """
6510 return _core_.Window_Center(*args, **kwargs)
6511
6512 Centre = Center
6513 def CenterOnScreen(*args, **kwargs):
6514 """
6515 CenterOnScreen(self, int dir=BOTH)
6516
6517 Center on screen (only works for top level windows)
6518 """
6519 return _core_.Window_CenterOnScreen(*args, **kwargs)
6520
6521 CentreOnScreen = CenterOnScreen
6522 def CenterOnParent(*args, **kwargs):
6523 """
6524 CenterOnParent(self, int dir=BOTH)
6525
6526 Center with respect to the the parent window
6527 """
6528 return _core_.Window_CenterOnParent(*args, **kwargs)
6529
6530 CentreOnParent = CenterOnParent
6531 def Fit(*args, **kwargs):
6532 """
6533 Fit(self)
6534
6535 Sizes the window so that it fits around its subwindows. This function
6536 won't do anything if there are no subwindows and will only really work
6537 correctly if sizers are used for the subwindows layout. Also, if the
6538 window has exactly one subwindow it is better (faster and the result
6539 is more precise as Fit adds some margin to account for fuzziness of
6540 its calculations) to call window.SetClientSize(child.GetSize())
6541 instead of calling Fit.
6542 """
6543 return _core_.Window_Fit(*args, **kwargs)
6544
6545 def FitInside(*args, **kwargs):
6546 """
6547 FitInside(self)
6548
6549 Similar to Fit, but sizes the interior (virtual) size of a
6550 window. Mainly useful with scrolled windows to reset scrollbars after
6551 sizing changes that do not trigger a size event, and/or scrolled
6552 windows without an interior sizer. This function similarly won't do
6553 anything if there are no subwindows.
6554 """
6555 return _core_.Window_FitInside(*args, **kwargs)
6556
6557 def SetSizeHints(*args, **kwargs):
6558 """
6559 SetSizeHints(self, int minW, int minH, int maxW=-1, int maxH=-1, int incW=-1,
6560 int incH=-1)
6561
6562 Allows specification of minimum and maximum window sizes, and window
6563 size increments. If a pair of values is not set (or set to -1), the
6564 default values will be used. If this function is called, the user
6565 will not be able to size the window outside the given bounds (if it is
6566 a top-level window.) Sizers will also inspect the minimum window size
6567 and will use that value if set when calculating layout.
6568
6569 The resizing increments are only significant under Motif or Xt.
6570 """
6571 return _core_.Window_SetSizeHints(*args, **kwargs)
6572
6573 def SetSizeHintsSz(*args, **kwargs):
6574 """
6575 SetSizeHintsSz(self, Size minSize, Size maxSize=DefaultSize, Size incSize=DefaultSize)
6576
6577 Allows specification of minimum and maximum window sizes, and window
6578 size increments. If a pair of values is not set (or set to -1), the
6579 default values will be used. If this function is called, the user
6580 will not be able to size the window outside the given bounds (if it is
6581 a top-level window.) Sizers will also inspect the minimum window size
6582 and will use that value if set when calculating layout.
6583
6584 The resizing increments are only significant under Motif or Xt.
6585 """
6586 return _core_.Window_SetSizeHintsSz(*args, **kwargs)
6587
6588 def SetVirtualSizeHints(*args, **kwargs):
6589 """
6590 SetVirtualSizeHints(self, int minW, int minH, int maxW=-1, int maxH=-1)
6591
6592 Allows specification of minimum and maximum virtual window sizes. If a
6593 pair of values is not set (or set to -1), the default values will be
6594 used. If this function is called, the user will not be able to size
6595 the virtual area of the window outside the given bounds.
6596 """
6597 return _core_.Window_SetVirtualSizeHints(*args, **kwargs)
6598
6599 def SetVirtualSizeHintsSz(*args, **kwargs):
6600 """
6601 SetVirtualSizeHintsSz(self, Size minSize, Size maxSize=DefaultSize)
6602
6603 Allows specification of minimum and maximum virtual window sizes. If a
6604 pair of values is not set (or set to -1), the default values will be
6605 used. If this function is called, the user will not be able to size
6606 the virtual area of the window outside the given bounds.
6607 """
6608 return _core_.Window_SetVirtualSizeHintsSz(*args, **kwargs)
6609
6610 def GetMaxSize(*args, **kwargs):
6611 """GetMaxSize(self) -> Size"""
6612 return _core_.Window_GetMaxSize(*args, **kwargs)
6613
6614 def GetMinSize(*args, **kwargs):
6615 """GetMinSize(self) -> Size"""
6616 return _core_.Window_GetMinSize(*args, **kwargs)
6617
6618 def SetMinSize(*args, **kwargs):
6619 """
6620 SetMinSize(self, Size minSize)
6621
6622 A more convenient method than `SetSizeHints` for setting just the
6623 min size.
6624 """
6625 return _core_.Window_SetMinSize(*args, **kwargs)
6626
6627 def SetMaxSize(*args, **kwargs):
6628 """
6629 SetMaxSize(self, Size maxSize)
6630
6631 A more convenient method than `SetSizeHints` for setting just the
6632 max size.
6633 """
6634 return _core_.Window_SetMaxSize(*args, **kwargs)
6635
6636 def GetMinWidth(*args, **kwargs):
6637 """GetMinWidth(self) -> int"""
6638 return _core_.Window_GetMinWidth(*args, **kwargs)
6639
6640 def GetMinHeight(*args, **kwargs):
6641 """GetMinHeight(self) -> int"""
6642 return _core_.Window_GetMinHeight(*args, **kwargs)
6643
6644 def GetMaxWidth(*args, **kwargs):
6645 """GetMaxWidth(self) -> int"""
6646 return _core_.Window_GetMaxWidth(*args, **kwargs)
6647
6648 def GetMaxHeight(*args, **kwargs):
6649 """GetMaxHeight(self) -> int"""
6650 return _core_.Window_GetMaxHeight(*args, **kwargs)
6651
6652 def SetVirtualSize(*args, **kwargs):
6653 """
6654 SetVirtualSize(self, Size size)
6655
6656 Set the the virtual size of a window in pixels. For most windows this
6657 is just the client area of the window, but for some like scrolled
6658 windows it is more or less independent of the screen window size.
6659 """
6660 return _core_.Window_SetVirtualSize(*args, **kwargs)
6661
6662 def SetVirtualSizeWH(*args, **kwargs):
6663 """
6664 SetVirtualSizeWH(self, int w, int h)
6665
6666 Set the the virtual size of a window in pixels. For most windows this
6667 is just the client area of the window, but for some like scrolled
6668 windows it is more or less independent of the screen window size.
6669 """
6670 return _core_.Window_SetVirtualSizeWH(*args, **kwargs)
6671
6672 def GetVirtualSize(*args, **kwargs):
6673 """
6674 GetVirtualSize(self) -> Size
6675
6676 Get the the virtual size of the window in pixels. For most windows
6677 this is just the client area of the window, but for some like scrolled
6678 windows it is more or less independent of the screen window size.
6679 """
6680 return _core_.Window_GetVirtualSize(*args, **kwargs)
6681
6682 def GetVirtualSizeTuple(*args, **kwargs):
6683 """
6684 GetVirtualSizeTuple() -> (width, height)
6685
6686 Get the the virtual size of the window in pixels. For most windows
6687 this is just the client area of the window, but for some like scrolled
6688 windows it is more or less independent of the screen window size.
6689 """
6690 return _core_.Window_GetVirtualSizeTuple(*args, **kwargs)
6691
6692 def GetBestVirtualSize(*args, **kwargs):
6693 """
6694 GetBestVirtualSize(self) -> Size
6695
6696 Return the largest of ClientSize and BestSize (as determined by a
6697 sizer, interior children, or other means)
6698 """
6699 return _core_.Window_GetBestVirtualSize(*args, **kwargs)
6700
6701 def Show(*args, **kwargs):
6702 """
6703 Show(self, bool show=True) -> bool
6704
6705 Shows or hides the window. You may need to call Raise for a top level
6706 window if you want to bring it to top, although this is not needed if
6707 Show is called immediately after the frame creation. Returns True if
6708 the window has been shown or hidden or False if nothing was done
6709 because it already was in the requested state.
6710 """
6711 return _core_.Window_Show(*args, **kwargs)
6712
6713 def Hide(*args, **kwargs):
6714 """
6715 Hide(self) -> bool
6716
6717 Equivalent to calling Show(False).
6718 """
6719 return _core_.Window_Hide(*args, **kwargs)
6720
6721 def Enable(*args, **kwargs):
6722 """
6723 Enable(self, bool enable=True) -> bool
6724
6725 Enable or disable the window for user input. Note that when a parent
6726 window is disabled, all of its children are disabled as well and they
6727 are reenabled again when the parent is. Returns true if the window
6728 has been enabled or disabled, false if nothing was done, i.e. if the
6729 window had already been in the specified state.
6730 """
6731 return _core_.Window_Enable(*args, **kwargs)
6732
6733 def Disable(*args, **kwargs):
6734 """
6735 Disable(self) -> bool
6736
6737 Disables the window, same as Enable(false).
6738 """
6739 return _core_.Window_Disable(*args, **kwargs)
6740
6741 def IsShown(*args, **kwargs):
6742 """
6743 IsShown(self) -> bool
6744
6745 Returns true if the window is shown, false if it has been hidden.
6746 """
6747 return _core_.Window_IsShown(*args, **kwargs)
6748
6749 def IsEnabled(*args, **kwargs):
6750 """
6751 IsEnabled(self) -> bool
6752
6753 Returns true if the window is enabled for input, false otherwise.
6754 """
6755 return _core_.Window_IsEnabled(*args, **kwargs)
6756
6757 def SetWindowStyleFlag(*args, **kwargs):
6758 """
6759 SetWindowStyleFlag(self, long style)
6760
6761 Sets the style of the window. Please note that some styles cannot be
6762 changed after the window creation and that Refresh() might need to be
6763 called after changing the others for the change to take place
6764 immediately.
6765 """
6766 return _core_.Window_SetWindowStyleFlag(*args, **kwargs)
6767
6768 def GetWindowStyleFlag(*args, **kwargs):
6769 """
6770 GetWindowStyleFlag(self) -> long
6771
6772 Gets the window style that was passed to the constructor or Create
6773 method.
6774 """
6775 return _core_.Window_GetWindowStyleFlag(*args, **kwargs)
6776
6777 SetWindowStyle = SetWindowStyleFlag; GetWindowStyle = GetWindowStyleFlag
6778 def HasFlag(*args, **kwargs):
6779 """
6780 HasFlag(self, int flag) -> bool
6781
6782 Test if the given style is set for this window.
6783 """
6784 return _core_.Window_HasFlag(*args, **kwargs)
6785
6786 def IsRetained(*args, **kwargs):
6787 """
6788 IsRetained(self) -> bool
6789
6790 Returns true if the window is retained, false otherwise. Retained
6791 windows are only available on X platforms.
6792 """
6793 return _core_.Window_IsRetained(*args, **kwargs)
6794
6795 def SetExtraStyle(*args, **kwargs):
6796 """
6797 SetExtraStyle(self, long exStyle)
6798
6799 Sets the extra style bits for the window. Extra styles are the less
6800 often used style bits which can't be set with the constructor or with
6801 SetWindowStyleFlag()
6802 """
6803 return _core_.Window_SetExtraStyle(*args, **kwargs)
6804
6805 def GetExtraStyle(*args, **kwargs):
6806 """
6807 GetExtraStyle(self) -> long
6808
6809 Returns the extra style bits for the window.
6810 """
6811 return _core_.Window_GetExtraStyle(*args, **kwargs)
6812
6813 def MakeModal(*args, **kwargs):
6814 """
6815 MakeModal(self, bool modal=True)
6816
6817 Disables all other windows in the application so that the user can
6818 only interact with this window. Passing False will reverse this
6819 effect.
6820 """
6821 return _core_.Window_MakeModal(*args, **kwargs)
6822
6823 def SetThemeEnabled(*args, **kwargs):
6824 """
6825 SetThemeEnabled(self, bool enableTheme)
6826
6827 This function tells a window if it should use the system's "theme"
6828 code to draw the windows' background instead if its own background
6829 drawing code. This will only have an effect on platforms that support
6830 the notion of themes in user defined windows. One such platform is
6831 GTK+ where windows can have (very colourful) backgrounds defined by a
6832 user's selected theme.
6833
6834 Dialogs, notebook pages and the status bar have this flag set to true
6835 by default so that the default look and feel is simulated best.
6836 """
6837 return _core_.Window_SetThemeEnabled(*args, **kwargs)
6838
6839 def GetThemeEnabled(*args, **kwargs):
6840 """
6841 GetThemeEnabled(self) -> bool
6842
6843 Return the themeEnabled flag.
6844 """
6845 return _core_.Window_GetThemeEnabled(*args, **kwargs)
6846
6847 def SetFocus(*args, **kwargs):
6848 """
6849 SetFocus(self)
6850
6851 Set's the focus to this window, allowing it to receive keyboard input.
6852 """
6853 return _core_.Window_SetFocus(*args, **kwargs)
6854
6855 def SetFocusFromKbd(*args, **kwargs):
6856 """
6857 SetFocusFromKbd(self)
6858
6859 Set focus to this window as the result of a keyboard action. Normally
6860 only called internally.
6861 """
6862 return _core_.Window_SetFocusFromKbd(*args, **kwargs)
6863
6864 def FindFocus(*args, **kwargs):
6865 """
6866 FindFocus() -> Window
6867
6868 Returns the window or control that currently has the keyboard focus,
6869 or None.
6870 """
6871 return _core_.Window_FindFocus(*args, **kwargs)
6872
6873 FindFocus = staticmethod(FindFocus)
6874 def AcceptsFocus(*args, **kwargs):
6875 """
6876 AcceptsFocus(self) -> bool
6877
6878 Can this window have focus?
6879 """
6880 return _core_.Window_AcceptsFocus(*args, **kwargs)
6881
6882 def AcceptsFocusFromKeyboard(*args, **kwargs):
6883 """
6884 AcceptsFocusFromKeyboard(self) -> bool
6885
6886 Can this window be given focus by keyboard navigation? if not, the
6887 only way to give it focus (provided it accepts it at all) is to click
6888 it.
6889 """
6890 return _core_.Window_AcceptsFocusFromKeyboard(*args, **kwargs)
6891
6892 def GetDefaultItem(*args, **kwargs):
6893 """
6894 GetDefaultItem(self) -> Window
6895
6896 Get the default child of this parent, i.e. the one which is activated
6897 by pressing <Enter> such as the OK button on a wx.Dialog.
6898 """
6899 return _core_.Window_GetDefaultItem(*args, **kwargs)
6900
6901 def SetDefaultItem(*args, **kwargs):
6902 """
6903 SetDefaultItem(self, Window child) -> Window
6904
6905 Set this child as default, return the old default.
6906 """
6907 return _core_.Window_SetDefaultItem(*args, **kwargs)
6908
6909 def SetTmpDefaultItem(*args, **kwargs):
6910 """
6911 SetTmpDefaultItem(self, Window win)
6912
6913 Set this child as temporary default
6914 """
6915 return _core_.Window_SetTmpDefaultItem(*args, **kwargs)
6916
6917 def Navigate(*args, **kwargs):
6918 """
6919 Navigate(self, int flags=NavigationKeyEvent.IsForward) -> bool
6920
6921 Does keyboard navigation from this window to another, by sending a
6922 `wx.NavigationKeyEvent`.
6923 """
6924 return _core_.Window_Navigate(*args, **kwargs)
6925
6926 def MoveAfterInTabOrder(*args, **kwargs):
6927 """
6928 MoveAfterInTabOrder(self, Window win)
6929
6930 Moves this window in the tab navigation order after the specified
6931 sibling window. This means that when the user presses the TAB key on
6932 that other window, the focus switches to this window.
6933
6934 The default tab order is the same as creation order. This function
6935 and `MoveBeforeInTabOrder` allow to change it after creating all the
6936 windows.
6937
6938 """
6939 return _core_.Window_MoveAfterInTabOrder(*args, **kwargs)
6940
6941 def MoveBeforeInTabOrder(*args, **kwargs):
6942 """
6943 MoveBeforeInTabOrder(self, Window win)
6944
6945 Same as `MoveAfterInTabOrder` except that it inserts this window just
6946 before win instead of putting it right after it.
6947 """
6948 return _core_.Window_MoveBeforeInTabOrder(*args, **kwargs)
6949
6950 def GetChildren(*args, **kwargs):
6951 """
6952 GetChildren(self) -> PyObject
6953
6954 Returns a list of the window's children. NOTE: Currently this is a
6955 copy of the child window list maintained by the window, so the return
6956 value of this function is only valid as long as the window's children
6957 do not change.
6958 """
6959 return _core_.Window_GetChildren(*args, **kwargs)
6960
6961 def GetParent(*args, **kwargs):
6962 """
6963 GetParent(self) -> Window
6964
6965 Returns the parent window of this window, or None if there isn't one.
6966 """
6967 return _core_.Window_GetParent(*args, **kwargs)
6968
6969 def GetGrandParent(*args, **kwargs):
6970 """
6971 GetGrandParent(self) -> Window
6972
6973 Returns the parent of the parent of this window, or None if there
6974 isn't one.
6975 """
6976 return _core_.Window_GetGrandParent(*args, **kwargs)
6977
6978 def IsTopLevel(*args, **kwargs):
6979 """
6980 IsTopLevel(self) -> bool
6981
6982 Returns true if the given window is a top-level one. Currently all
6983 frames and dialogs are always considered to be top-level windows (even
6984 if they have a parent window).
6985 """
6986 return _core_.Window_IsTopLevel(*args, **kwargs)
6987
6988 def Reparent(*args, **kwargs):
6989 """
6990 Reparent(self, Window newParent) -> bool
6991
6992 Reparents the window, i.e the window will be removed from its current
6993 parent window (e.g. a non-standard toolbar in a wxFrame) and then
6994 re-inserted into another. Available on Windows and GTK. Returns True
6995 if the parent was changed, False otherwise (error or newParent ==
6996 oldParent)
6997 """
6998 return _core_.Window_Reparent(*args, **kwargs)
6999
7000 def AddChild(*args, **kwargs):
7001 """
7002 AddChild(self, Window child)
7003
7004 Adds a child window. This is called automatically by window creation
7005 functions so should not be required by the application programmer.
7006 """
7007 return _core_.Window_AddChild(*args, **kwargs)
7008
7009 def RemoveChild(*args, **kwargs):
7010 """
7011 RemoveChild(self, Window child)
7012
7013 Removes a child window. This is called automatically by window
7014 deletion functions so should not be required by the application
7015 programmer.
7016 """
7017 return _core_.Window_RemoveChild(*args, **kwargs)
7018
7019 def FindWindowById(*args, **kwargs):
7020 """
7021 FindWindowById(self, long winid) -> Window
7022
7023 Find a chld of this window by window ID
7024 """
7025 return _core_.Window_FindWindowById(*args, **kwargs)
7026
7027 def FindWindowByName(*args, **kwargs):
7028 """
7029 FindWindowByName(self, String name) -> Window
7030
7031 Find a child of this window by name
7032 """
7033 return _core_.Window_FindWindowByName(*args, **kwargs)
7034
7035 def GetEventHandler(*args, **kwargs):
7036 """
7037 GetEventHandler(self) -> EvtHandler
7038
7039 Returns the event handler for this window. By default, the window is
7040 its own event handler.
7041 """
7042 return _core_.Window_GetEventHandler(*args, **kwargs)
7043
7044 def SetEventHandler(*args, **kwargs):
7045 """
7046 SetEventHandler(self, EvtHandler handler)
7047
7048 Sets the event handler for this window. An event handler is an object
7049 that is capable of processing the events sent to a window. By default,
7050 the window is its own event handler, but an application may wish to
7051 substitute another, for example to allow central implementation of
7052 event-handling for a variety of different window classes.
7053
7054 It is usually better to use `wx.Window.PushEventHandler` since this sets
7055 up a chain of event handlers, where an event not handled by one event
7056 handler is handed to the next one in the chain.
7057 """
7058 return _core_.Window_SetEventHandler(*args, **kwargs)
7059
7060 def PushEventHandler(*args, **kwargs):
7061 """
7062 PushEventHandler(self, EvtHandler handler)
7063
7064 Pushes this event handler onto the event handler stack for the window.
7065 An event handler is an object that is capable of processing the events
7066 sent to a window. By default, the window is its own event handler, but
7067 an application may wish to substitute another, for example to allow
7068 central implementation of event-handling for a variety of different
7069 window classes.
7070
7071 wx.Window.PushEventHandler allows an application to set up a chain of
7072 event handlers, where an event not handled by one event handler is
7073 handed to the next one in the chain. Use `wx.Window.PopEventHandler` to
7074 remove the event handler.
7075 """
7076 return _core_.Window_PushEventHandler(*args, **kwargs)
7077
7078 def PopEventHandler(*args, **kwargs):
7079 """
7080 PopEventHandler(self, bool deleteHandler=False) -> EvtHandler
7081
7082 Removes and returns the top-most event handler on the event handler
7083 stack. If deleteHandler is True then the wx.EvtHandler object will be
7084 destroyed after it is popped.
7085 """
7086 return _core_.Window_PopEventHandler(*args, **kwargs)
7087
7088 def RemoveEventHandler(*args, **kwargs):
7089 """
7090 RemoveEventHandler(self, EvtHandler handler) -> bool
7091
7092 Find the given handler in the event handler chain and remove (but not
7093 delete) it from the event handler chain, return True if it was found
7094 and False otherwise (this also results in an assert failure so this
7095 function should only be called when the handler is supposed to be
7096 there.)
7097 """
7098 return _core_.Window_RemoveEventHandler(*args, **kwargs)
7099
7100 def SetValidator(*args, **kwargs):
7101 """
7102 SetValidator(self, Validator validator)
7103
7104 Deletes the current validator (if any) and sets the window validator,
7105 having called wx.Validator.Clone to create a new validator of this
7106 type.
7107 """
7108 return _core_.Window_SetValidator(*args, **kwargs)
7109
7110 def GetValidator(*args, **kwargs):
7111 """
7112 GetValidator(self) -> Validator
7113
7114 Returns a pointer to the current validator for the window, or None if
7115 there is none.
7116 """
7117 return _core_.Window_GetValidator(*args, **kwargs)
7118
7119 def Validate(*args, **kwargs):
7120 """
7121 Validate(self) -> bool
7122
7123 Validates the current values of the child controls using their
7124 validators. If the window has wx.WS_EX_VALIDATE_RECURSIVELY extra
7125 style flag set, the method will also call Validate() of all child
7126 windows. Returns false if any of the validations failed.
7127 """
7128 return _core_.Window_Validate(*args, **kwargs)
7129
7130 def TransferDataToWindow(*args, **kwargs):
7131 """
7132 TransferDataToWindow(self) -> bool
7133
7134 Transfers values to child controls from data areas specified by their
7135 validators. If the window has wx.WS_EX_VALIDATE_RECURSIVELY extra
7136 style flag set, the method will also call TransferDataToWindow() of
7137 all child windows.
7138 """
7139 return _core_.Window_TransferDataToWindow(*args, **kwargs)
7140
7141 def TransferDataFromWindow(*args, **kwargs):
7142 """
7143 TransferDataFromWindow(self) -> bool
7144
7145 Transfers values from child controls to data areas specified by their
7146 validators. Returns false if a transfer failed. If the window has
7147 wx.WS_EX_VALIDATE_RECURSIVELY extra style flag set, the method will
7148 also call TransferDataFromWindow() of all child windows.
7149 """
7150 return _core_.Window_TransferDataFromWindow(*args, **kwargs)
7151
7152 def InitDialog(*args, **kwargs):
7153 """
7154 InitDialog(self)
7155
7156 Sends an EVT_INIT_DIALOG event, whose handler usually transfers data
7157 to the dialog via validators.
7158 """
7159 return _core_.Window_InitDialog(*args, **kwargs)
7160
7161 def SetAcceleratorTable(*args, **kwargs):
7162 """
7163 SetAcceleratorTable(self, AcceleratorTable accel)
7164
7165 Sets the accelerator table for this window.
7166 """
7167 return _core_.Window_SetAcceleratorTable(*args, **kwargs)
7168
7169 def GetAcceleratorTable(*args, **kwargs):
7170 """
7171 GetAcceleratorTable(self) -> AcceleratorTable
7172
7173 Gets the accelerator table for this window.
7174 """
7175 return _core_.Window_GetAcceleratorTable(*args, **kwargs)
7176
7177 def RegisterHotKey(*args, **kwargs):
7178 """
7179 RegisterHotKey(self, int hotkeyId, int modifiers, int keycode) -> bool
7180
7181 Registers a system wide hotkey. Every time the user presses the hotkey
7182 registered here, this window will receive a hotkey event. It will
7183 receive the event even if the application is in the background and
7184 does not have the input focus because the user is working with some
7185 other application. To bind an event handler function to this hotkey
7186 use EVT_HOTKEY with an id equal to hotkeyId. Returns True if the
7187 hotkey was registered successfully.
7188 """
7189 return _core_.Window_RegisterHotKey(*args, **kwargs)
7190
7191 def UnregisterHotKey(*args, **kwargs):
7192 """
7193 UnregisterHotKey(self, int hotkeyId) -> bool
7194
7195 Unregisters a system wide hotkey.
7196 """
7197 return _core_.Window_UnregisterHotKey(*args, **kwargs)
7198
7199 def ConvertDialogPointToPixels(*args, **kwargs):
7200 """
7201 ConvertDialogPointToPixels(self, Point pt) -> Point
7202
7203 Converts a point or size from dialog units to pixels. Dialog units
7204 are used for maintaining a dialog's proportions even if the font
7205 changes. For the x dimension, the dialog units are multiplied by the
7206 average character width and then divided by 4. For the y dimension,
7207 the dialog units are multiplied by the average character height and
7208 then divided by 8.
7209 """
7210 return _core_.Window_ConvertDialogPointToPixels(*args, **kwargs)
7211
7212 def ConvertDialogSizeToPixels(*args, **kwargs):
7213 """
7214 ConvertDialogSizeToPixels(self, Size sz) -> Size
7215
7216 Converts a point or size from dialog units to pixels. Dialog units
7217 are used for maintaining a dialog's proportions even if the font
7218 changes. For the x dimension, the dialog units are multiplied by the
7219 average character width and then divided by 4. For the y dimension,
7220 the dialog units are multiplied by the average character height and
7221 then divided by 8.
7222 """
7223 return _core_.Window_ConvertDialogSizeToPixels(*args, **kwargs)
7224
7225 def DLG_PNT(*args, **kwargs):
7226 """
7227 DLG_PNT(self, Point pt) -> Point
7228
7229 Converts a point or size from dialog units to pixels. Dialog units
7230 are used for maintaining a dialog's proportions even if the font
7231 changes. For the x dimension, the dialog units are multiplied by the
7232 average character width and then divided by 4. For the y dimension,
7233 the dialog units are multiplied by the average character height and
7234 then divided by 8.
7235 """
7236 return _core_.Window_DLG_PNT(*args, **kwargs)
7237
7238 def DLG_SZE(*args, **kwargs):
7239 """
7240 DLG_SZE(self, Size sz) -> Size
7241
7242 Converts a point or size from dialog units to pixels. Dialog units
7243 are used for maintaining a dialog's proportions even if the font
7244 changes. For the x dimension, the dialog units are multiplied by the
7245 average character width and then divided by 4. For the y dimension,
7246 the dialog units are multiplied by the average character height and
7247 then divided by 8.
7248 """
7249 return _core_.Window_DLG_SZE(*args, **kwargs)
7250
7251 def ConvertPixelPointToDialog(*args, **kwargs):
7252 """ConvertPixelPointToDialog(self, Point pt) -> Point"""
7253 return _core_.Window_ConvertPixelPointToDialog(*args, **kwargs)
7254
7255 def ConvertPixelSizeToDialog(*args, **kwargs):
7256 """ConvertPixelSizeToDialog(self, Size sz) -> Size"""
7257 return _core_.Window_ConvertPixelSizeToDialog(*args, **kwargs)
7258
7259 def WarpPointer(*args, **kwargs):
7260 """
7261 WarpPointer(self, int x, int y)
7262
7263 Moves the pointer to the given position on the window.
7264
7265 NOTE: This function is not supported under Mac because Apple Human
7266 Interface Guidelines forbid moving the mouse cursor programmatically.
7267 """
7268 return _core_.Window_WarpPointer(*args, **kwargs)
7269
7270 def CaptureMouse(*args, **kwargs):
7271 """
7272 CaptureMouse(self)
7273
7274 Directs all mouse input to this window. Call wx.Window.ReleaseMouse to
7275 release the capture.
7276
7277 Note that wxWindows maintains the stack of windows having captured the
7278 mouse and when the mouse is released the capture returns to the window
7279 which had had captured it previously and it is only really released if
7280 there were no previous window. In particular, this means that you must
7281 release the mouse as many times as you capture it.
7282 """
7283 return _core_.Window_CaptureMouse(*args, **kwargs)
7284
7285 def ReleaseMouse(*args, **kwargs):
7286 """
7287 ReleaseMouse(self)
7288
7289 Releases mouse input captured with wx.Window.CaptureMouse.
7290 """
7291 return _core_.Window_ReleaseMouse(*args, **kwargs)
7292
7293 def GetCapture(*args, **kwargs):
7294 """
7295 GetCapture() -> Window
7296
7297 Returns the window which currently captures the mouse or None
7298 """
7299 return _core_.Window_GetCapture(*args, **kwargs)
7300
7301 GetCapture = staticmethod(GetCapture)
7302 def HasCapture(*args, **kwargs):
7303 """
7304 HasCapture(self) -> bool
7305
7306 Returns true if this window has the current mouse capture.
7307 """
7308 return _core_.Window_HasCapture(*args, **kwargs)
7309
7310 def Refresh(*args, **kwargs):
7311 """
7312 Refresh(self, bool eraseBackground=True, Rect rect=None)
7313
7314 Mark the specified rectangle (or the whole window) as "dirty" so it
7315 will be repainted. Causes an EVT_PAINT event to be generated and sent
7316 to the window.
7317 """
7318 return _core_.Window_Refresh(*args, **kwargs)
7319
7320 def RefreshRect(*args, **kwargs):
7321 """
7322 RefreshRect(self, Rect rect, bool eraseBackground=True)
7323
7324 Redraws the contents of the given rectangle: the area inside it will
7325 be repainted. This is the same as Refresh but has a nicer syntax.
7326 """
7327 return _core_.Window_RefreshRect(*args, **kwargs)
7328
7329 def Update(*args, **kwargs):
7330 """
7331 Update(self)
7332
7333 Calling this method immediately repaints the invalidated area of the
7334 window instead of waiting for the EVT_PAINT event to happen, (normally
7335 this would usually only happen when the flow of control returns to the
7336 event loop.) Notice that this function doesn't refresh the window and
7337 does nothing if the window has been already repainted. Use Refresh
7338 first if you want to immediately redraw the window (or some portion of
7339 it) unconditionally.
7340 """
7341 return _core_.Window_Update(*args, **kwargs)
7342
7343 def ClearBackground(*args, **kwargs):
7344 """
7345 ClearBackground(self)
7346
7347 Clears the window by filling it with the current background
7348 colour. Does not cause an erase background event to be generated.
7349 """
7350 return _core_.Window_ClearBackground(*args, **kwargs)
7351
7352 def Freeze(*args, **kwargs):
7353 """
7354 Freeze(self)
7355
7356 Freezes the window or, in other words, prevents any updates from
7357 taking place on screen, the window is not redrawn at all. Thaw must be
7358 called to reenable window redrawing. Calls to Freeze/Thaw may be
7359 nested, with the actual Thaw being delayed until all the nesting has
7360 been undone.
7361
7362 This method is useful for visual appearance optimization (for example,
7363 it is a good idea to use it before inserting large amount of text into
7364 a wxTextCtrl under wxGTK) but is not implemented on all platforms nor
7365 for all controls so it is mostly just a hint to wxWindows and not a
7366 mandatory directive.
7367 """
7368 return _core_.Window_Freeze(*args, **kwargs)
7369
7370 def Thaw(*args, **kwargs):
7371 """
7372 Thaw(self)
7373
7374 Reenables window updating after a previous call to Freeze. Calls to
7375 Freeze/Thaw may be nested, so Thaw must be called the same number of
7376 times that Freeze was before the window will be updated.
7377 """
7378 return _core_.Window_Thaw(*args, **kwargs)
7379
7380 def PrepareDC(*args, **kwargs):
7381 """
7382 PrepareDC(self, DC dc)
7383
7384 Call this function to prepare the device context for drawing a
7385 scrolled image. It sets the device origin according to the current
7386 scroll position.
7387 """
7388 return _core_.Window_PrepareDC(*args, **kwargs)
7389
7390 def GetUpdateRegion(*args, **kwargs):
7391 """
7392 GetUpdateRegion(self) -> Region
7393
7394 Returns the region specifying which parts of the window have been
7395 damaged. Should only be called within an EVT_PAINT handler.
7396 """
7397 return _core_.Window_GetUpdateRegion(*args, **kwargs)
7398
7399 def GetUpdateClientRect(*args, **kwargs):
7400 """
7401 GetUpdateClientRect(self) -> Rect
7402
7403 Get the update rectangle region bounding box in client coords.
7404 """
7405 return _core_.Window_GetUpdateClientRect(*args, **kwargs)
7406
7407 def IsExposed(*args, **kwargs):
7408 """
7409 IsExposed(self, int x, int y, int w=1, int h=1) -> bool
7410
7411 Returns true if the given point or rectangle area has been exposed
7412 since the last repaint. Call this in an paint event handler to
7413 optimize redrawing by only redrawing those areas, which have been
7414 exposed.
7415 """
7416 return _core_.Window_IsExposed(*args, **kwargs)
7417
7418 def IsExposedPoint(*args, **kwargs):
7419 """
7420 IsExposedPoint(self, Point pt) -> bool
7421
7422 Returns true if the given point or rectangle area has been exposed
7423 since the last repaint. Call this in an paint event handler to
7424 optimize redrawing by only redrawing those areas, which have been
7425 exposed.
7426 """
7427 return _core_.Window_IsExposedPoint(*args, **kwargs)
7428
7429 def IsExposedRect(*args, **kwargs):
7430 """
7431 IsExposedRect(self, Rect rect) -> bool
7432
7433 Returns true if the given point or rectangle area has been exposed
7434 since the last repaint. Call this in an paint event handler to
7435 optimize redrawing by only redrawing those areas, which have been
7436 exposed.
7437 """
7438 return _core_.Window_IsExposedRect(*args, **kwargs)
7439
7440 def GetDefaultAttributes(*args, **kwargs):
7441 """
7442 GetDefaultAttributes(self) -> VisualAttributes
7443
7444 Get the default attributes for an instance of this class. This is
7445 useful if you want to use the same font or colour in your own control
7446 as in a standard control -- which is a much better idea than hard
7447 coding specific colours or fonts which might look completely out of
7448 place on the user's system, especially if it uses themes.
7449 """
7450 return _core_.Window_GetDefaultAttributes(*args, **kwargs)
7451
7452 def GetClassDefaultAttributes(*args, **kwargs):
7453 """
7454 GetClassDefaultAttributes(int variant=WINDOW_VARIANT_NORMAL) -> VisualAttributes
7455
7456 Get the default attributes for this class. This is useful if you want
7457 to use the same font or colour in your own control as in a standard
7458 control -- which is a much better idea than hard coding specific
7459 colours or fonts which might look completely out of place on the
7460 user's system, especially if it uses themes.
7461
7462 The variant parameter is only relevant under Mac currently and is
7463 ignore under other platforms. Under Mac, it will change the size of
7464 the returned font. See `wx.Window.SetWindowVariant` for more about
7465 this.
7466 """
7467 return _core_.Window_GetClassDefaultAttributes(*args, **kwargs)
7468
7469 GetClassDefaultAttributes = staticmethod(GetClassDefaultAttributes)
7470 def SetBackgroundColour(*args, **kwargs):
7471 """
7472 SetBackgroundColour(self, Colour colour) -> bool
7473
7474 Sets the background colour of the window. Returns True if the colour
7475 was changed. The background colour is usually painted by the default
7476 EVT_ERASE_BACKGROUND event handler function under Windows and
7477 automatically under GTK. Using `wx.NullColour` will reset the window
7478 to the default background colour.
7479
7480 Note that setting the background colour may not cause an immediate
7481 refresh, so you may wish to call `ClearBackground` or `Refresh` after
7482 calling this function.
7483
7484 Using this function will disable attempts to use themes for this
7485 window, if the system supports them. Use with care since usually the
7486 themes represent the appearance chosen by the user to be used for all
7487 applications on the system.
7488 """
7489 return _core_.Window_SetBackgroundColour(*args, **kwargs)
7490
7491 def SetOwnBackgroundColour(*args, **kwargs):
7492 """SetOwnBackgroundColour(self, Colour colour)"""
7493 return _core_.Window_SetOwnBackgroundColour(*args, **kwargs)
7494
7495 def SetForegroundColour(*args, **kwargs):
7496 """
7497 SetForegroundColour(self, Colour colour) -> bool
7498
7499 Sets the foreground colour of the window. Returns True is the colour
7500 was changed. The interpretation of foreground colour is dependent on
7501 the window class; it may be the text colour or other colour, or it may
7502 not be used at all.
7503 """
7504 return _core_.Window_SetForegroundColour(*args, **kwargs)
7505
7506 def SetOwnForegroundColour(*args, **kwargs):
7507 """SetOwnForegroundColour(self, Colour colour)"""
7508 return _core_.Window_SetOwnForegroundColour(*args, **kwargs)
7509
7510 def GetBackgroundColour(*args, **kwargs):
7511 """
7512 GetBackgroundColour(self) -> Colour
7513
7514 Returns the background colour of the window.
7515 """
7516 return _core_.Window_GetBackgroundColour(*args, **kwargs)
7517
7518 def GetForegroundColour(*args, **kwargs):
7519 """
7520 GetForegroundColour(self) -> Colour
7521
7522 Returns the foreground colour of the window. The interpretation of
7523 foreground colour is dependent on the window class; it may be the text
7524 colour or other colour, or it may not be used at all.
7525 """
7526 return _core_.Window_GetForegroundColour(*args, **kwargs)
7527
7528 def InheritsBackgroundColour(*args, **kwargs):
7529 """InheritsBackgroundColour(self) -> bool"""
7530 return _core_.Window_InheritsBackgroundColour(*args, **kwargs)
7531
7532 def UseBgCol(*args, **kwargs):
7533 """UseBgCol(self) -> bool"""
7534 return _core_.Window_UseBgCol(*args, **kwargs)
7535
7536 def SetBackgroundStyle(*args, **kwargs):
7537 """
7538 SetBackgroundStyle(self, int style) -> bool
7539
7540 Returns the background style of the window. The background style
7541 indicates how the background of the window is drawn.
7542
7543 ====================== ========================================
7544 wx.BG_STYLE_SYSTEM The background colour or pattern should
7545 be determined by the system
7546 wx.BG_STYLE_COLOUR The background should be a solid colour
7547 wx.BG_STYLE_CUSTOM The background will be implemented by the
7548 application.
7549 ====================== ========================================
7550
7551 On GTK+, use of wx.BG_STYLE_CUSTOM allows the flicker-free drawing of
7552 a custom background, such as a tiled bitmap. Currently the style has
7553 no effect on other platforms.
7554
7555 :see: `GetBackgroundStyle`, `SetBackgroundColour`
7556 """
7557 return _core_.Window_SetBackgroundStyle(*args, **kwargs)
7558
7559 def GetBackgroundStyle(*args, **kwargs):
7560 """
7561 GetBackgroundStyle(self) -> int
7562
7563 Returns the background style of the window.
7564
7565 :see: `SetBackgroundStyle`
7566 """
7567 return _core_.Window_GetBackgroundStyle(*args, **kwargs)
7568
7569 def HasTransparentBackground(*args, **kwargs):
7570 """
7571 HasTransparentBackground(self) -> bool
7572
7573 Returns True if this window's background is transparent (as, for
7574 example, for `wx.StaticText`) and should show the parent window's
7575 background.
7576
7577 This method is mostly used internally by the library itself and you
7578 normally shouldn't have to call it. You may, however, have to override
7579 it in your custom control classes to ensure that background is painted
7580 correctly.
7581 """
7582 return _core_.Window_HasTransparentBackground(*args, **kwargs)
7583
7584 def SetCursor(*args, **kwargs):
7585 """
7586 SetCursor(self, Cursor cursor) -> bool
7587
7588 Sets the window's cursor. Notice that the window cursor also sets it
7589 for the children of the window implicitly.
7590
7591 The cursor may be wx.NullCursor in which case the window cursor will
7592 be reset back to default.
7593 """
7594 return _core_.Window_SetCursor(*args, **kwargs)
7595
7596 def GetCursor(*args, **kwargs):
7597 """
7598 GetCursor(self) -> Cursor
7599
7600 Return the cursor associated with this window.
7601 """
7602 return _core_.Window_GetCursor(*args, **kwargs)
7603
7604 def SetFont(*args, **kwargs):
7605 """
7606 SetFont(self, Font font) -> bool
7607
7608 Sets the font for this window.
7609 """
7610 return _core_.Window_SetFont(*args, **kwargs)
7611
7612 def SetOwnFont(*args, **kwargs):
7613 """SetOwnFont(self, Font font)"""
7614 return _core_.Window_SetOwnFont(*args, **kwargs)
7615
7616 def GetFont(*args, **kwargs):
7617 """
7618 GetFont(self) -> Font
7619
7620 Returns the default font used for this window.
7621 """
7622 return _core_.Window_GetFont(*args, **kwargs)
7623
7624 def SetCaret(*args, **kwargs):
7625 """
7626 SetCaret(self, Caret caret)
7627
7628 Sets the caret associated with the window.
7629 """
7630 return _core_.Window_SetCaret(*args, **kwargs)
7631
7632 def GetCaret(*args, **kwargs):
7633 """
7634 GetCaret(self) -> Caret
7635
7636 Returns the caret associated with the window.
7637 """
7638 return _core_.Window_GetCaret(*args, **kwargs)
7639
7640 def GetCharHeight(*args, **kwargs):
7641 """
7642 GetCharHeight(self) -> int
7643
7644 Get the (average) character size for the current font.
7645 """
7646 return _core_.Window_GetCharHeight(*args, **kwargs)
7647
7648 def GetCharWidth(*args, **kwargs):
7649 """
7650 GetCharWidth(self) -> int
7651
7652 Get the (average) character size for the current font.
7653 """
7654 return _core_.Window_GetCharWidth(*args, **kwargs)
7655
7656 def GetTextExtent(*args, **kwargs):
7657 """
7658 GetTextExtent(String string) -> (width, height)
7659
7660 Get the width and height of the text using the current font.
7661 """
7662 return _core_.Window_GetTextExtent(*args, **kwargs)
7663
7664 def GetFullTextExtent(*args, **kwargs):
7665 """
7666 GetFullTextExtent(String string, Font font=None) ->
7667 (width, height, descent, externalLeading)
7668
7669 Get the width, height, decent and leading of the text using the
7670 current or specified font.
7671 """
7672 return _core_.Window_GetFullTextExtent(*args, **kwargs)
7673
7674 def ClientToScreenXY(*args, **kwargs):
7675 """
7676 ClientToScreenXY(int x, int y) -> (x,y)
7677
7678 Converts to screen coordinates from coordinates relative to this window.
7679 """
7680 return _core_.Window_ClientToScreenXY(*args, **kwargs)
7681
7682 def ScreenToClientXY(*args, **kwargs):
7683 """
7684 ScreenToClientXY(int x, int y) -> (x,y)
7685
7686 Converts from screen to client window coordinates.
7687 """
7688 return _core_.Window_ScreenToClientXY(*args, **kwargs)
7689
7690 def ClientToScreen(*args, **kwargs):
7691 """
7692 ClientToScreen(self, Point pt) -> Point
7693
7694 Converts to screen coordinates from coordinates relative to this window.
7695 """
7696 return _core_.Window_ClientToScreen(*args, **kwargs)
7697
7698 def ScreenToClient(*args, **kwargs):
7699 """
7700 ScreenToClient(self, Point pt) -> Point
7701
7702 Converts from screen to client window coordinates.
7703 """
7704 return _core_.Window_ScreenToClient(*args, **kwargs)
7705
7706 def HitTestXY(*args, **kwargs):
7707 """
7708 HitTestXY(self, int x, int y) -> int
7709
7710 Test where the given (in client coords) point lies
7711 """
7712 return _core_.Window_HitTestXY(*args, **kwargs)
7713
7714 def HitTest(*args, **kwargs):
7715 """
7716 HitTest(self, Point pt) -> int
7717
7718 Test where the given (in client coords) point lies
7719 """
7720 return _core_.Window_HitTest(*args, **kwargs)
7721
7722 def GetBorder(*args):
7723 """
7724 GetBorder(self, long flags) -> int
7725 GetBorder(self) -> int
7726
7727 Get border for the flags of this window
7728 """
7729 return _core_.Window_GetBorder(*args)
7730
7731 def UpdateWindowUI(*args, **kwargs):
7732 """
7733 UpdateWindowUI(self, long flags=UPDATE_UI_NONE)
7734
7735 This function sends EVT_UPDATE_UI events to the window. The particular
7736 implementation depends on the window; for example a wx.ToolBar will
7737 send an update UI event for each toolbar button, and a wx.Frame will
7738 send an update UI event for each menubar menu item. You can call this
7739 function from your application to ensure that your UI is up-to-date at
7740 a particular point in time (as far as your EVT_UPDATE_UI handlers are
7741 concerned). This may be necessary if you have called
7742 wx.UpdateUIEvent.SetMode or wx.UpdateUIEvent.SetUpdateInterval to
7743 limit the overhead that wxWindows incurs by sending update UI events
7744 in idle time.
7745 """
7746 return _core_.Window_UpdateWindowUI(*args, **kwargs)
7747
7748 def PopupMenuXY(*args, **kwargs):
7749 """
7750 PopupMenuXY(self, Menu menu, int x=-1, int y=-1) -> bool
7751
7752 Pops up the given menu at the specified coordinates, relative to this window,
7753 and returns control when the user has dismissed the menu. If a menu item is
7754 selected, the corresponding menu event is generated and will be processed as
7755 usual. If the default position is given then the current position of the
7756 mouse cursor will be used.
7757 """
7758 return _core_.Window_PopupMenuXY(*args, **kwargs)
7759
7760 def PopupMenu(*args, **kwargs):
7761 """
7762 PopupMenu(self, Menu menu, Point pos=DefaultPosition) -> bool
7763
7764 Pops up the given menu at the specified coordinates, relative to this window,
7765 and returns control when the user has dismissed the menu. If a menu item is
7766 selected, the corresponding menu event is generated and will be processed as
7767 usual. If the default position is given then the current position of the
7768 mouse cursor will be used.
7769 """
7770 return _core_.Window_PopupMenu(*args, **kwargs)
7771
7772 def GetHandle(*args, **kwargs):
7773 """
7774 GetHandle(self) -> long
7775
7776 Returns the platform-specific handle (as a long integer) of the
7777 physical window. Currently on wxMac it returns the handle of the
7778 toplevel parent of the window.
7779 """
7780 return _core_.Window_GetHandle(*args, **kwargs)
7781
7782 def AssociateHandle(*args, **kwargs):
7783 """
7784 AssociateHandle(self, long handle)
7785
7786 Associate the window with a new native handle
7787 """
7788 return _core_.Window_AssociateHandle(*args, **kwargs)
7789
7790 def DissociateHandle(*args, **kwargs):
7791 """
7792 DissociateHandle(self)
7793
7794 Dissociate the current native handle from the window
7795 """
7796 return _core_.Window_DissociateHandle(*args, **kwargs)
7797
7798 def OnPaint(*args, **kwargs):
7799 """OnPaint(self, PaintEvent event)"""
7800 return _core_.Window_OnPaint(*args, **kwargs)
7801
7802 def HasScrollbar(*args, **kwargs):
7803 """
7804 HasScrollbar(self, int orient) -> bool
7805
7806 Does the window have the scrollbar for this orientation?
7807 """
7808 return _core_.Window_HasScrollbar(*args, **kwargs)
7809
7810 def SetScrollbar(*args, **kwargs):
7811 """
7812 SetScrollbar(self, int orientation, int position, int thumbSize, int range,
7813 bool refresh=True)
7814
7815 Sets the scrollbar properties of a built-in scrollbar.
7816 """
7817 return _core_.Window_SetScrollbar(*args, **kwargs)
7818
7819 def SetScrollPos(*args, **kwargs):
7820 """
7821 SetScrollPos(self, int orientation, int pos, bool refresh=True)
7822
7823 Sets the position of one of the built-in scrollbars.
7824 """
7825 return _core_.Window_SetScrollPos(*args, **kwargs)
7826
7827 def GetScrollPos(*args, **kwargs):
7828 """
7829 GetScrollPos(self, int orientation) -> int
7830
7831 Returns the built-in scrollbar position.
7832 """
7833 return _core_.Window_GetScrollPos(*args, **kwargs)
7834
7835 def GetScrollThumb(*args, **kwargs):
7836 """
7837 GetScrollThumb(self, int orientation) -> int
7838
7839 Returns the built-in scrollbar thumb size.
7840 """
7841 return _core_.Window_GetScrollThumb(*args, **kwargs)
7842
7843 def GetScrollRange(*args, **kwargs):
7844 """
7845 GetScrollRange(self, int orientation) -> int
7846
7847 Returns the built-in scrollbar range.
7848 """
7849 return _core_.Window_GetScrollRange(*args, **kwargs)
7850
7851 def ScrollWindow(*args, **kwargs):
7852 """
7853 ScrollWindow(self, int dx, int dy, Rect rect=None)
7854
7855 Physically scrolls the pixels in the window and move child windows
7856 accordingly. Use this function to optimise your scrolling
7857 implementations, to minimise the area that must be redrawn. Note that
7858 it is rarely required to call this function from a user program.
7859 """
7860 return _core_.Window_ScrollWindow(*args, **kwargs)
7861
7862 def ScrollLines(*args, **kwargs):
7863 """
7864 ScrollLines(self, int lines) -> bool
7865
7866 If the platform and window class supports it, scrolls the window by
7867 the given number of lines down, if lines is positive, or up if lines
7868 is negative. Returns True if the window was scrolled, False if it was
7869 already on top/bottom and nothing was done.
7870 """
7871 return _core_.Window_ScrollLines(*args, **kwargs)
7872
7873 def ScrollPages(*args, **kwargs):
7874 """
7875 ScrollPages(self, int pages) -> bool
7876
7877 If the platform and window class supports it, scrolls the window by
7878 the given number of pages down, if pages is positive, or up if pages
7879 is negative. Returns True if the window was scrolled, False if it was
7880 already on top/bottom and nothing was done.
7881 """
7882 return _core_.Window_ScrollPages(*args, **kwargs)
7883
7884 def LineUp(*args, **kwargs):
7885 """
7886 LineUp(self) -> bool
7887
7888 This is just a wrapper for ScrollLines(-1).
7889 """
7890 return _core_.Window_LineUp(*args, **kwargs)
7891
7892 def LineDown(*args, **kwargs):
7893 """
7894 LineDown(self) -> bool
7895
7896 This is just a wrapper for ScrollLines(1).
7897 """
7898 return _core_.Window_LineDown(*args, **kwargs)
7899
7900 def PageUp(*args, **kwargs):
7901 """
7902 PageUp(self) -> bool
7903
7904 This is just a wrapper for ScrollPages(-1).
7905 """
7906 return _core_.Window_PageUp(*args, **kwargs)
7907
7908 def PageDown(*args, **kwargs):
7909 """
7910 PageDown(self) -> bool
7911
7912 This is just a wrapper for ScrollPages(1).
7913 """
7914 return _core_.Window_PageDown(*args, **kwargs)
7915
7916 def SetHelpText(*args, **kwargs):
7917 """
7918 SetHelpText(self, String text)
7919
7920 Sets the help text to be used as context-sensitive help for this
7921 window. Note that the text is actually stored by the current
7922 wxHelpProvider implementation, and not in the window object itself.
7923 """
7924 return _core_.Window_SetHelpText(*args, **kwargs)
7925
7926 def SetHelpTextForId(*args, **kwargs):
7927 """
7928 SetHelpTextForId(self, String text)
7929
7930 Associate this help text with all windows with the same id as this
7931 one.
7932 """
7933 return _core_.Window_SetHelpTextForId(*args, **kwargs)
7934
7935 def GetHelpText(*args, **kwargs):
7936 """
7937 GetHelpText(self) -> String
7938
7939 Gets the help text to be used as context-sensitive help for this
7940 window. Note that the text is actually stored by the current
7941 wxHelpProvider implementation, and not in the window object itself.
7942 """
7943 return _core_.Window_GetHelpText(*args, **kwargs)
7944
7945 def SetToolTipString(*args, **kwargs):
7946 """
7947 SetToolTipString(self, String tip)
7948
7949 Attach a tooltip to the window.
7950 """
7951 return _core_.Window_SetToolTipString(*args, **kwargs)
7952
7953 def SetToolTip(*args, **kwargs):
7954 """
7955 SetToolTip(self, ToolTip tip)
7956
7957 Attach a tooltip to the window.
7958 """
7959 return _core_.Window_SetToolTip(*args, **kwargs)
7960
7961 def GetToolTip(*args, **kwargs):
7962 """
7963 GetToolTip(self) -> ToolTip
7964
7965 get the associated tooltip or None if none
7966 """
7967 return _core_.Window_GetToolTip(*args, **kwargs)
7968
7969 def SetDropTarget(*args, **kwargs):
7970 """
7971 SetDropTarget(self, DropTarget dropTarget)
7972
7973 Associates a drop target with this window. If the window already has
7974 a drop target, it is deleted.
7975 """
7976 return _core_.Window_SetDropTarget(*args, **kwargs)
7977
7978 def GetDropTarget(*args, **kwargs):
7979 """
7980 GetDropTarget(self) -> DropTarget
7981
7982 Returns the associated drop target, which may be None.
7983 """
7984 return _core_.Window_GetDropTarget(*args, **kwargs)
7985
7986 def DragAcceptFiles(*args, **kwargs):
7987 """
7988 DragAcceptFiles(self, bool accept)
7989
7990 Enables or disables eligibility for drop file events, EVT_DROP_FILES.
7991 Only available on Windows.
7992 """
7993 return _core_.Window_DragAcceptFiles(*args, **kwargs)
7994
7995 def SetConstraints(*args, **kwargs):
7996 """
7997 SetConstraints(self, LayoutConstraints constraints)
7998
7999 Sets the window to have the given layout constraints. If an existing
8000 layout constraints object is already owned by the window, it will be
8001 deleted. Pass None to disassociate and delete the window's current
8002 constraints.
8003
8004 You must call SetAutoLayout to tell a window to use the constraints
8005 automatically in its default EVT_SIZE handler; otherwise, you must
8006 handle EVT_SIZE yourself and call Layout() explicitly. When setting
8007 both a wx.LayoutConstraints and a wx.Sizer, only the sizer will have
8008 effect.
8009 """
8010 return _core_.Window_SetConstraints(*args, **kwargs)
8011
8012 def GetConstraints(*args, **kwargs):
8013 """
8014 GetConstraints(self) -> LayoutConstraints
8015
8016 Returns a pointer to the window's layout constraints, or None if there
8017 are none.
8018 """
8019 return _core_.Window_GetConstraints(*args, **kwargs)
8020
8021 def SetAutoLayout(*args, **kwargs):
8022 """
8023 SetAutoLayout(self, bool autoLayout)
8024
8025 Determines whether the Layout function will be called automatically
8026 when the window is resized. It is called implicitly by SetSizer but
8027 if you use SetConstraints you should call it manually or otherwise the
8028 window layout won't be correctly updated when its size changes.
8029 """
8030 return _core_.Window_SetAutoLayout(*args, **kwargs)
8031
8032 def GetAutoLayout(*args, **kwargs):
8033 """
8034 GetAutoLayout(self) -> bool
8035
8036 Returns the current autoLayout setting
8037 """
8038 return _core_.Window_GetAutoLayout(*args, **kwargs)
8039
8040 def Layout(*args, **kwargs):
8041 """
8042 Layout(self) -> bool
8043
8044 Invokes the constraint-based layout algorithm or the sizer-based
8045 algorithm for this window. See SetAutoLayout: when auto layout is on,
8046 this function gets called automatically by the default EVT_SIZE
8047 handler when the window is resized.
8048 """
8049 return _core_.Window_Layout(*args, **kwargs)
8050
8051 def SetSizer(*args, **kwargs):
8052 """
8053 SetSizer(self, Sizer sizer, bool deleteOld=True)
8054
8055 Sets the window to have the given layout sizer. The window will then
8056 own the object, and will take care of its deletion. If an existing
8057 layout sizer object is already owned by the window, it will be deleted
8058 if the deleteOld parameter is true. Note that this function will also
8059 call SetAutoLayout implicitly with a True parameter if the sizer is
8060 non-None, and False otherwise.
8061 """
8062 return _core_.Window_SetSizer(*args, **kwargs)
8063
8064 def SetSizerAndFit(*args, **kwargs):
8065 """
8066 SetSizerAndFit(self, Sizer sizer, bool deleteOld=True)
8067
8068 The same as SetSizer, except it also sets the size hints for the
8069 window based on the sizer's minimum size.
8070 """
8071 return _core_.Window_SetSizerAndFit(*args, **kwargs)
8072
8073 def GetSizer(*args, **kwargs):
8074 """
8075 GetSizer(self) -> Sizer
8076
8077 Return the sizer associated with the window by a previous call to
8078 SetSizer or None if there isn't one.
8079 """
8080 return _core_.Window_GetSizer(*args, **kwargs)
8081
8082 def SetContainingSizer(*args, **kwargs):
8083 """
8084 SetContainingSizer(self, Sizer sizer)
8085
8086 This normally does not need to be called by application code. It is
8087 called internally when a window is added to a sizer, and is used so
8088 the window can remove itself from the sizer when it is destroyed.
8089 """
8090 return _core_.Window_SetContainingSizer(*args, **kwargs)
8091
8092 def GetContainingSizer(*args, **kwargs):
8093 """
8094 GetContainingSizer(self) -> Sizer
8095
8096 Return the sizer that this window is a member of, if any, otherwise None.
8097 """
8098 return _core_.Window_GetContainingSizer(*args, **kwargs)
8099
8100 def InheritAttributes(*args, **kwargs):
8101 """
8102 InheritAttributes(self)
8103
8104 This function is (or should be, in case of custom controls) called
8105 during window creation to intelligently set up the window visual
8106 attributes, that is the font and the foreground and background
8107 colours.
8108
8109 By 'intelligently' the following is meant: by default, all windows use
8110 their own default attributes. However if some of the parent's
8111 attributes are explicitly changed (that is, using SetFont and not
8112 SetOwnFont) and if the corresponding attribute hadn't been
8113 explicitly set for this window itself, then this window takes the same
8114 value as used by the parent. In addition, if the window overrides
8115 ShouldInheritColours to return false, the colours will not be changed
8116 no matter what and only the font might.
8117
8118 This rather complicated logic is necessary in order to accommodate the
8119 different usage scenarios. The most common one is when all default
8120 attributes are used and in this case, nothing should be inherited as
8121 in modern GUIs different controls use different fonts (and colours)
8122 than their siblings so they can't inherit the same value from the
8123 parent. However it was also deemed desirable to allow to simply change
8124 the attributes of all children at once by just changing the font or
8125 colour of their common parent, hence in this case we do inherit the
8126 parents attributes.
8127
8128 """
8129 return _core_.Window_InheritAttributes(*args, **kwargs)
8130
8131 def ShouldInheritColours(*args, **kwargs):
8132 """
8133 ShouldInheritColours(self) -> bool
8134
8135 Return true from here to allow the colours of this window to be
8136 changed by InheritAttributes, returning false forbids inheriting them
8137 from the parent window.
8138
8139 The base class version returns false, but this method is overridden in
8140 wxControl where it returns true.
8141 """
8142 return _core_.Window_ShouldInheritColours(*args, **kwargs)
8143
8144 def PostCreate(self, pre):
8145 """
8146 Phase 3 of the 2-phase create <wink!>
8147 Call this method after precreating the window with the 2-phase create method.
8148 """
8149 self.this = pre.this
8150 self.thisown = pre.thisown
8151 pre.thisown = 0
8152 if hasattr(self, '_setOORInfo'):
8153 self._setOORInfo(self)
8154 if hasattr(self, '_setCallbackInfo'):
8155 self._setCallbackInfo(self, self.__class__)
8156
8157
8158 class WindowPtr(Window):
8159 def __init__(self, this):
8160 self.this = this
8161 if not hasattr(self,"thisown"): self.thisown = 0
8162 self.__class__ = Window
8163 _core_.Window_swigregister(WindowPtr)
8164
8165 def PreWindow(*args, **kwargs):
8166 """
8167 PreWindow() -> Window
8168
8169 Precreate a Window for 2-phase creation.
8170 """
8171 val = _core_.new_PreWindow(*args, **kwargs)
8172 val.thisown = 1
8173 return val
8174
8175 def Window_NewControlId(*args, **kwargs):
8176 """
8177 Window_NewControlId() -> int
8178
8179 Generate a control id for the controls which were not given one.
8180 """
8181 return _core_.Window_NewControlId(*args, **kwargs)
8182
8183 def Window_NextControlId(*args, **kwargs):
8184 """
8185 Window_NextControlId(int winid) -> int
8186
8187 Get the id of the control following the one with the given
8188 autogenerated) id
8189 """
8190 return _core_.Window_NextControlId(*args, **kwargs)
8191
8192 def Window_PrevControlId(*args, **kwargs):
8193 """
8194 Window_PrevControlId(int winid) -> int
8195
8196 Get the id of the control preceding the one with the given
8197 autogenerated) id
8198 """
8199 return _core_.Window_PrevControlId(*args, **kwargs)
8200
8201 def Window_FindFocus(*args, **kwargs):
8202 """
8203 Window_FindFocus() -> Window
8204
8205 Returns the window or control that currently has the keyboard focus,
8206 or None.
8207 """
8208 return _core_.Window_FindFocus(*args, **kwargs)
8209
8210 def Window_GetCapture(*args, **kwargs):
8211 """
8212 Window_GetCapture() -> Window
8213
8214 Returns the window which currently captures the mouse or None
8215 """
8216 return _core_.Window_GetCapture(*args, **kwargs)
8217
8218 def Window_GetClassDefaultAttributes(*args, **kwargs):
8219 """
8220 Window_GetClassDefaultAttributes(int variant=WINDOW_VARIANT_NORMAL) -> VisualAttributes
8221
8222 Get the default attributes for this class. This is useful if you want
8223 to use the same font or colour in your own control as in a standard
8224 control -- which is a much better idea than hard coding specific
8225 colours or fonts which might look completely out of place on the
8226 user's system, especially if it uses themes.
8227
8228 The variant parameter is only relevant under Mac currently and is
8229 ignore under other platforms. Under Mac, it will change the size of
8230 the returned font. See `wx.Window.SetWindowVariant` for more about
8231 this.
8232 """
8233 return _core_.Window_GetClassDefaultAttributes(*args, **kwargs)
8234
8235 def DLG_PNT(win, point_or_x, y=None):
8236 """
8237 Convenience function for converting a Point or (x,y) in
8238 dialog units to pixel units.
8239 """
8240 if y is None:
8241 return win.ConvertDialogPointToPixels(point_or_x)
8242 else:
8243 return win.ConvertDialogPointToPixels(wx.Point(point_or_x, y))
8244
8245 def DLG_SZE(win, size_width, height=None):
8246 """
8247 Convenience function for converting a Size or (w,h) in
8248 dialog units to pixel units.
8249 """
8250 if height is None:
8251 return win.ConvertDialogSizeToPixels(size_width)
8252 else:
8253 return win.ConvertDialogSizeToPixels(wx.Size(size_width, height))
8254
8255
8256 def FindWindowById(*args, **kwargs):
8257 """
8258 FindWindowById(long id, Window parent=None) -> Window
8259
8260 Find the first window in the application with the given id. If parent
8261 is None, the search will start from all top-level frames and dialog
8262 boxes; if non-None, the search will be limited to the given window
8263 hierarchy. The search is recursive in both cases.
8264 """
8265 return _core_.FindWindowById(*args, **kwargs)
8266
8267 def FindWindowByName(*args, **kwargs):
8268 """
8269 FindWindowByName(String name, Window parent=None) -> Window
8270
8271 Find a window by its name (as given in a window constructor or Create
8272 function call). If parent is None, the search will start from all
8273 top-level frames and dialog boxes; if non-None, the search will be
8274 limited to the given window hierarchy. The search is recursive in both
8275 cases.
8276
8277 If no window with such name is found, wx.FindWindowByLabel is called.
8278 """
8279 return _core_.FindWindowByName(*args, **kwargs)
8280
8281 def FindWindowByLabel(*args, **kwargs):
8282 """
8283 FindWindowByLabel(String label, Window parent=None) -> Window
8284
8285 Find a window by its label. Depending on the type of window, the label
8286 may be a window title or panel item label. If parent is None, the
8287 search will start from all top-level frames and dialog boxes; if
8288 non-None, the search will be limited to the given window
8289 hierarchy. The search is recursive in both cases.
8290 """
8291 return _core_.FindWindowByLabel(*args, **kwargs)
8292
8293 def Window_FromHWND(*args, **kwargs):
8294 """Window_FromHWND(Window parent, unsigned long _hWnd) -> Window"""
8295 return _core_.Window_FromHWND(*args, **kwargs)
8296
8297 def GetTopLevelWindows(*args, **kwargs):
8298 """
8299 GetTopLevelWindows() -> PyObject
8300
8301 Returns a list of the the application's top-level windows, (frames,
8302 dialogs, etc.) NOTE: Currently this is a copy of the list maintained
8303 by wxWidgets, and so it is only valid as long as no top-level windows
8304 are closed or new top-level windows are created.
8305
8306 """
8307 return _core_.GetTopLevelWindows(*args, **kwargs)
8308 #---------------------------------------------------------------------------
8309
8310 class Validator(EvtHandler):
8311 """Proxy of C++ Validator class"""
8312 def __repr__(self):
8313 return "<%s.%s; proxy of C++ wxValidator instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
8314 def __init__(self, *args, **kwargs):
8315 """__init__(self) -> Validator"""
8316 newobj = _core_.new_Validator(*args, **kwargs)
8317 self.this = newobj.this
8318 self.thisown = 1
8319 del newobj.thisown
8320 self._setOORInfo(self)
8321
8322 def Clone(*args, **kwargs):
8323 """Clone(self) -> Validator"""
8324 return _core_.Validator_Clone(*args, **kwargs)
8325
8326 def Validate(*args, **kwargs):
8327 """Validate(self, Window parent) -> bool"""
8328 return _core_.Validator_Validate(*args, **kwargs)
8329
8330 def TransferToWindow(*args, **kwargs):
8331 """TransferToWindow(self) -> bool"""
8332 return _core_.Validator_TransferToWindow(*args, **kwargs)
8333
8334 def TransferFromWindow(*args, **kwargs):
8335 """TransferFromWindow(self) -> bool"""
8336 return _core_.Validator_TransferFromWindow(*args, **kwargs)
8337
8338 def GetWindow(*args, **kwargs):
8339 """GetWindow(self) -> Window"""
8340 return _core_.Validator_GetWindow(*args, **kwargs)
8341
8342 def SetWindow(*args, **kwargs):
8343 """SetWindow(self, Window window)"""
8344 return _core_.Validator_SetWindow(*args, **kwargs)
8345
8346 def IsSilent(*args, **kwargs):
8347 """IsSilent() -> bool"""
8348 return _core_.Validator_IsSilent(*args, **kwargs)
8349
8350 IsSilent = staticmethod(IsSilent)
8351 def SetBellOnError(*args, **kwargs):
8352 """SetBellOnError(int doIt=True)"""
8353 return _core_.Validator_SetBellOnError(*args, **kwargs)
8354
8355 SetBellOnError = staticmethod(SetBellOnError)
8356
8357 class ValidatorPtr(Validator):
8358 def __init__(self, this):
8359 self.this = this
8360 if not hasattr(self,"thisown"): self.thisown = 0
8361 self.__class__ = Validator
8362 _core_.Validator_swigregister(ValidatorPtr)
8363
8364 def Validator_IsSilent(*args, **kwargs):
8365 """Validator_IsSilent() -> bool"""
8366 return _core_.Validator_IsSilent(*args, **kwargs)
8367
8368 def Validator_SetBellOnError(*args, **kwargs):
8369 """Validator_SetBellOnError(int doIt=True)"""
8370 return _core_.Validator_SetBellOnError(*args, **kwargs)
8371
8372 class PyValidator(Validator):
8373 """Proxy of C++ PyValidator class"""
8374 def __repr__(self):
8375 return "<%s.%s; proxy of C++ wxPyValidator instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
8376 def __init__(self, *args, **kwargs):
8377 """__init__(self) -> PyValidator"""
8378 newobj = _core_.new_PyValidator(*args, **kwargs)
8379 self.this = newobj.this
8380 self.thisown = 1
8381 del newobj.thisown
8382
8383 self._setCallbackInfo(self, PyValidator, 1)
8384 self._setOORInfo(self)
8385
8386 def _setCallbackInfo(*args, **kwargs):
8387 """_setCallbackInfo(self, PyObject self, PyObject _class, int incref=True)"""
8388 return _core_.PyValidator__setCallbackInfo(*args, **kwargs)
8389
8390
8391 class PyValidatorPtr(PyValidator):
8392 def __init__(self, this):
8393 self.this = this
8394 if not hasattr(self,"thisown"): self.thisown = 0
8395 self.__class__ = PyValidator
8396 _core_.PyValidator_swigregister(PyValidatorPtr)
8397
8398 #---------------------------------------------------------------------------
8399
8400 class Menu(EvtHandler):
8401 """Proxy of C++ Menu class"""
8402 def __repr__(self):
8403 return "<%s.%s; proxy of C++ wxMenu instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
8404 def __init__(self, *args, **kwargs):
8405 """__init__(self, String title=EmptyString, long style=0) -> Menu"""
8406 newobj = _core_.new_Menu(*args, **kwargs)
8407 self.this = newobj.this
8408 self.thisown = 1
8409 del newobj.thisown
8410 self._setOORInfo(self)
8411
8412 def Append(*args, **kwargs):
8413 """Append(self, int id, String text, String help=EmptyString, int kind=ITEM_NORMAL) -> MenuItem"""
8414 return _core_.Menu_Append(*args, **kwargs)
8415
8416 def AppendSeparator(*args, **kwargs):
8417 """AppendSeparator(self) -> MenuItem"""
8418 return _core_.Menu_AppendSeparator(*args, **kwargs)
8419
8420 def AppendCheckItem(*args, **kwargs):
8421 """AppendCheckItem(self, int id, String text, String help=EmptyString) -> MenuItem"""
8422 return _core_.Menu_AppendCheckItem(*args, **kwargs)
8423
8424 def AppendRadioItem(*args, **kwargs):
8425 """AppendRadioItem(self, int id, String text, String help=EmptyString) -> MenuItem"""
8426 return _core_.Menu_AppendRadioItem(*args, **kwargs)
8427
8428 def AppendMenu(*args, **kwargs):
8429 """AppendMenu(self, int id, String text, Menu submenu, String help=EmptyString) -> MenuItem"""
8430 return _core_.Menu_AppendMenu(*args, **kwargs)
8431
8432 def AppendItem(*args, **kwargs):
8433 """AppendItem(self, MenuItem item) -> MenuItem"""
8434 return _core_.Menu_AppendItem(*args, **kwargs)
8435
8436 def Break(*args, **kwargs):
8437 """Break(self)"""
8438 return _core_.Menu_Break(*args, **kwargs)
8439
8440 def InsertItem(*args, **kwargs):
8441 """InsertItem(self, size_t pos, MenuItem item) -> MenuItem"""
8442 return _core_.Menu_InsertItem(*args, **kwargs)
8443
8444 def Insert(*args, **kwargs):
8445 """
8446 Insert(self, size_t pos, int id, String text, String help=EmptyString,
8447 int kind=ITEM_NORMAL) -> MenuItem
8448 """
8449 return _core_.Menu_Insert(*args, **kwargs)
8450
8451 def InsertSeparator(*args, **kwargs):
8452 """InsertSeparator(self, size_t pos) -> MenuItem"""
8453 return _core_.Menu_InsertSeparator(*args, **kwargs)
8454
8455 def InsertCheckItem(*args, **kwargs):
8456 """InsertCheckItem(self, size_t pos, int id, String text, String help=EmptyString) -> MenuItem"""
8457 return _core_.Menu_InsertCheckItem(*args, **kwargs)
8458
8459 def InsertRadioItem(*args, **kwargs):
8460 """InsertRadioItem(self, size_t pos, int id, String text, String help=EmptyString) -> MenuItem"""
8461 return _core_.Menu_InsertRadioItem(*args, **kwargs)
8462
8463 def InsertMenu(*args, **kwargs):
8464 """InsertMenu(self, size_t pos, int id, String text, Menu submenu, String help=EmptyString) -> MenuItem"""
8465 return _core_.Menu_InsertMenu(*args, **kwargs)
8466
8467 def PrependItem(*args, **kwargs):
8468 """PrependItem(self, MenuItem item) -> MenuItem"""
8469 return _core_.Menu_PrependItem(*args, **kwargs)
8470
8471 def Prepend(*args, **kwargs):
8472 """Prepend(self, int id, String text, String help=EmptyString, int kind=ITEM_NORMAL) -> MenuItem"""
8473 return _core_.Menu_Prepend(*args, **kwargs)
8474
8475 def PrependSeparator(*args, **kwargs):
8476 """PrependSeparator(self) -> MenuItem"""
8477 return _core_.Menu_PrependSeparator(*args, **kwargs)
8478
8479 def PrependCheckItem(*args, **kwargs):
8480 """PrependCheckItem(self, int id, String text, String help=EmptyString) -> MenuItem"""
8481 return _core_.Menu_PrependCheckItem(*args, **kwargs)
8482
8483 def PrependRadioItem(*args, **kwargs):
8484 """PrependRadioItem(self, int id, String text, String help=EmptyString) -> MenuItem"""
8485 return _core_.Menu_PrependRadioItem(*args, **kwargs)
8486
8487 def PrependMenu(*args, **kwargs):
8488 """PrependMenu(self, int id, String text, Menu submenu, String help=EmptyString) -> MenuItem"""
8489 return _core_.Menu_PrependMenu(*args, **kwargs)
8490
8491 def Remove(*args, **kwargs):
8492 """Remove(self, int id) -> MenuItem"""
8493 return _core_.Menu_Remove(*args, **kwargs)
8494
8495 def RemoveItem(*args, **kwargs):
8496 """RemoveItem(self, MenuItem item) -> MenuItem"""
8497 return _core_.Menu_RemoveItem(*args, **kwargs)
8498
8499 def Delete(*args, **kwargs):
8500 """Delete(self, int id) -> bool"""
8501 return _core_.Menu_Delete(*args, **kwargs)
8502
8503 def DeleteItem(*args, **kwargs):
8504 """DeleteItem(self, MenuItem item) -> bool"""
8505 return _core_.Menu_DeleteItem(*args, **kwargs)
8506
8507 def Destroy(*args, **kwargs):
8508 """
8509 Destroy(self)
8510
8511 Deletes the C++ object this Python object is a proxy for.
8512 """
8513 return _core_.Menu_Destroy(*args, **kwargs)
8514
8515 def DestroyId(*args, **kwargs):
8516 """
8517 DestroyId(self, int id) -> bool
8518
8519 Deletes the C++ object this Python object is a proxy for.
8520 """
8521 return _core_.Menu_DestroyId(*args, **kwargs)
8522
8523 def DestroyItem(*args, **kwargs):
8524 """
8525 DestroyItem(self, MenuItem item) -> bool
8526
8527 Deletes the C++ object this Python object is a proxy for.
8528 """
8529 return _core_.Menu_DestroyItem(*args, **kwargs)
8530
8531 def GetMenuItemCount(*args, **kwargs):
8532 """GetMenuItemCount(self) -> size_t"""
8533 return _core_.Menu_GetMenuItemCount(*args, **kwargs)
8534
8535 def GetMenuItems(*args, **kwargs):
8536 """GetMenuItems(self) -> PyObject"""
8537 return _core_.Menu_GetMenuItems(*args, **kwargs)
8538
8539 def FindItem(*args, **kwargs):
8540 """FindItem(self, String item) -> int"""
8541 return _core_.Menu_FindItem(*args, **kwargs)
8542
8543 def FindItemById(*args, **kwargs):
8544 """FindItemById(self, int id) -> MenuItem"""
8545 return _core_.Menu_FindItemById(*args, **kwargs)
8546
8547 def FindItemByPosition(*args, **kwargs):
8548 """FindItemByPosition(self, size_t position) -> MenuItem"""
8549 return _core_.Menu_FindItemByPosition(*args, **kwargs)
8550
8551 def Enable(*args, **kwargs):
8552 """Enable(self, int id, bool enable)"""
8553 return _core_.Menu_Enable(*args, **kwargs)
8554
8555 def IsEnabled(*args, **kwargs):
8556 """IsEnabled(self, int id) -> bool"""
8557 return _core_.Menu_IsEnabled(*args, **kwargs)
8558
8559 def Check(*args, **kwargs):
8560 """Check(self, int id, bool check)"""
8561 return _core_.Menu_Check(*args, **kwargs)
8562
8563 def IsChecked(*args, **kwargs):
8564 """IsChecked(self, int id) -> bool"""
8565 return _core_.Menu_IsChecked(*args, **kwargs)
8566
8567 def SetLabel(*args, **kwargs):
8568 """SetLabel(self, int id, String label)"""
8569 return _core_.Menu_SetLabel(*args, **kwargs)
8570
8571 def GetLabel(*args, **kwargs):
8572 """GetLabel(self, int id) -> String"""
8573 return _core_.Menu_GetLabel(*args, **kwargs)
8574
8575 def SetHelpString(*args, **kwargs):
8576 """SetHelpString(self, int id, String helpString)"""
8577 return _core_.Menu_SetHelpString(*args, **kwargs)
8578
8579 def GetHelpString(*args, **kwargs):
8580 """GetHelpString(self, int id) -> String"""
8581 return _core_.Menu_GetHelpString(*args, **kwargs)
8582
8583 def SetTitle(*args, **kwargs):
8584 """SetTitle(self, String title)"""
8585 return _core_.Menu_SetTitle(*args, **kwargs)
8586
8587 def GetTitle(*args, **kwargs):
8588 """GetTitle(self) -> String"""
8589 return _core_.Menu_GetTitle(*args, **kwargs)
8590
8591 def SetEventHandler(*args, **kwargs):
8592 """SetEventHandler(self, EvtHandler handler)"""
8593 return _core_.Menu_SetEventHandler(*args, **kwargs)
8594
8595 def GetEventHandler(*args, **kwargs):
8596 """GetEventHandler(self) -> EvtHandler"""
8597 return _core_.Menu_GetEventHandler(*args, **kwargs)
8598
8599 def SetInvokingWindow(*args, **kwargs):
8600 """SetInvokingWindow(self, Window win)"""
8601 return _core_.Menu_SetInvokingWindow(*args, **kwargs)
8602
8603 def GetInvokingWindow(*args, **kwargs):
8604 """GetInvokingWindow(self) -> Window"""
8605 return _core_.Menu_GetInvokingWindow(*args, **kwargs)
8606
8607 def GetStyle(*args, **kwargs):
8608 """GetStyle(self) -> long"""
8609 return _core_.Menu_GetStyle(*args, **kwargs)
8610
8611 def UpdateUI(*args, **kwargs):
8612 """UpdateUI(self, EvtHandler source=None)"""
8613 return _core_.Menu_UpdateUI(*args, **kwargs)
8614
8615 def GetMenuBar(*args, **kwargs):
8616 """GetMenuBar(self) -> MenuBar"""
8617 return _core_.Menu_GetMenuBar(*args, **kwargs)
8618
8619 def Attach(*args, **kwargs):
8620 """Attach(self, wxMenuBarBase menubar)"""
8621 return _core_.Menu_Attach(*args, **kwargs)
8622
8623 def Detach(*args, **kwargs):
8624 """Detach(self)"""
8625 return _core_.Menu_Detach(*args, **kwargs)
8626
8627 def IsAttached(*args, **kwargs):
8628 """IsAttached(self) -> bool"""
8629 return _core_.Menu_IsAttached(*args, **kwargs)
8630
8631 def SetParent(*args, **kwargs):
8632 """SetParent(self, Menu parent)"""
8633 return _core_.Menu_SetParent(*args, **kwargs)
8634
8635 def GetParent(*args, **kwargs):
8636 """GetParent(self) -> Menu"""
8637 return _core_.Menu_GetParent(*args, **kwargs)
8638
8639
8640 class MenuPtr(Menu):
8641 def __init__(self, this):
8642 self.this = this
8643 if not hasattr(self,"thisown"): self.thisown = 0
8644 self.__class__ = Menu
8645 _core_.Menu_swigregister(MenuPtr)
8646 DefaultValidator = cvar.DefaultValidator
8647
8648 #---------------------------------------------------------------------------
8649
8650 class MenuBar(Window):
8651 """Proxy of C++ MenuBar class"""
8652 def __repr__(self):
8653 return "<%s.%s; proxy of C++ wxMenuBar instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
8654 def __init__(self, *args, **kwargs):
8655 """__init__(self, long style=0) -> MenuBar"""
8656 newobj = _core_.new_MenuBar(*args, **kwargs)
8657 self.this = newobj.this
8658 self.thisown = 1
8659 del newobj.thisown
8660 self._setOORInfo(self)
8661
8662 def Append(*args, **kwargs):
8663 """Append(self, Menu menu, String title) -> bool"""
8664 return _core_.MenuBar_Append(*args, **kwargs)
8665
8666 def Insert(*args, **kwargs):
8667 """Insert(self, size_t pos, Menu menu, String title) -> bool"""
8668 return _core_.MenuBar_Insert(*args, **kwargs)
8669
8670 def GetMenuCount(*args, **kwargs):
8671 """GetMenuCount(self) -> size_t"""
8672 return _core_.MenuBar_GetMenuCount(*args, **kwargs)
8673
8674 def GetMenu(*args, **kwargs):
8675 """GetMenu(self, size_t pos) -> Menu"""
8676 return _core_.MenuBar_GetMenu(*args, **kwargs)
8677
8678 def Replace(*args, **kwargs):
8679 """Replace(self, size_t pos, Menu menu, String title) -> Menu"""
8680 return _core_.MenuBar_Replace(*args, **kwargs)
8681
8682 def Remove(*args, **kwargs):
8683 """Remove(self, size_t pos) -> Menu"""
8684 return _core_.MenuBar_Remove(*args, **kwargs)
8685
8686 def EnableTop(*args, **kwargs):
8687 """EnableTop(self, size_t pos, bool enable)"""
8688 return _core_.MenuBar_EnableTop(*args, **kwargs)
8689
8690 def IsEnabledTop(*args, **kwargs):
8691 """IsEnabledTop(self, size_t pos) -> bool"""
8692 return _core_.MenuBar_IsEnabledTop(*args, **kwargs)
8693
8694 def SetLabelTop(*args, **kwargs):
8695 """SetLabelTop(self, size_t pos, String label)"""
8696 return _core_.MenuBar_SetLabelTop(*args, **kwargs)
8697
8698 def GetLabelTop(*args, **kwargs):
8699 """GetLabelTop(self, size_t pos) -> String"""
8700 return _core_.MenuBar_GetLabelTop(*args, **kwargs)
8701
8702 def FindMenuItem(*args, **kwargs):
8703 """FindMenuItem(self, String menu, String item) -> int"""
8704 return _core_.MenuBar_FindMenuItem(*args, **kwargs)
8705
8706 def FindItemById(*args, **kwargs):
8707 """FindItemById(self, int id) -> MenuItem"""
8708 return _core_.MenuBar_FindItemById(*args, **kwargs)
8709
8710 def FindMenu(*args, **kwargs):
8711 """FindMenu(self, String title) -> int"""
8712 return _core_.MenuBar_FindMenu(*args, **kwargs)
8713
8714 def Enable(*args, **kwargs):
8715 """Enable(self, int id, bool enable)"""
8716 return _core_.MenuBar_Enable(*args, **kwargs)
8717
8718 def Check(*args, **kwargs):
8719 """Check(self, int id, bool check)"""
8720 return _core_.MenuBar_Check(*args, **kwargs)
8721
8722 def IsChecked(*args, **kwargs):
8723 """IsChecked(self, int id) -> bool"""
8724 return _core_.MenuBar_IsChecked(*args, **kwargs)
8725
8726 def IsEnabled(*args, **kwargs):
8727 """IsEnabled(self, int id) -> bool"""
8728 return _core_.MenuBar_IsEnabled(*args, **kwargs)
8729
8730 def SetLabel(*args, **kwargs):
8731 """SetLabel(self, int id, String label)"""
8732 return _core_.MenuBar_SetLabel(*args, **kwargs)
8733
8734 def GetLabel(*args, **kwargs):
8735 """GetLabel(self, int id) -> String"""
8736 return _core_.MenuBar_GetLabel(*args, **kwargs)
8737
8738 def SetHelpString(*args, **kwargs):
8739 """SetHelpString(self, int id, String helpString)"""
8740 return _core_.MenuBar_SetHelpString(*args, **kwargs)
8741
8742 def GetHelpString(*args, **kwargs):
8743 """GetHelpString(self, int id) -> String"""
8744 return _core_.MenuBar_GetHelpString(*args, **kwargs)
8745
8746 def GetFrame(*args, **kwargs):
8747 """GetFrame(self) -> wxFrame"""
8748 return _core_.MenuBar_GetFrame(*args, **kwargs)
8749
8750 def IsAttached(*args, **kwargs):
8751 """IsAttached(self) -> bool"""
8752 return _core_.MenuBar_IsAttached(*args, **kwargs)
8753
8754 def Attach(*args, **kwargs):
8755 """Attach(self, wxFrame frame)"""
8756 return _core_.MenuBar_Attach(*args, **kwargs)
8757
8758 def Detach(*args, **kwargs):
8759 """Detach(self)"""
8760 return _core_.MenuBar_Detach(*args, **kwargs)
8761
8762
8763 class MenuBarPtr(MenuBar):
8764 def __init__(self, this):
8765 self.this = this
8766 if not hasattr(self,"thisown"): self.thisown = 0
8767 self.__class__ = MenuBar
8768 _core_.MenuBar_swigregister(MenuBarPtr)
8769
8770 #---------------------------------------------------------------------------
8771
8772 class MenuItem(Object):
8773 """Proxy of C++ MenuItem class"""
8774 def __repr__(self):
8775 return "<%s.%s; proxy of C++ wxMenuItem instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
8776 def __init__(self, *args, **kwargs):
8777 """
8778 __init__(self, Menu parentMenu=None, int id=ID_ANY, String text=EmptyString,
8779 String help=EmptyString, int kind=ITEM_NORMAL,
8780 Menu subMenu=None) -> MenuItem
8781 """
8782 newobj = _core_.new_MenuItem(*args, **kwargs)
8783 self.this = newobj.this
8784 self.thisown = 1
8785 del newobj.thisown
8786 def GetMenu(*args, **kwargs):
8787 """GetMenu(self) -> Menu"""
8788 return _core_.MenuItem_GetMenu(*args, **kwargs)
8789
8790 def SetMenu(*args, **kwargs):
8791 """SetMenu(self, Menu menu)"""
8792 return _core_.MenuItem_SetMenu(*args, **kwargs)
8793
8794 def SetId(*args, **kwargs):
8795 """SetId(self, int id)"""
8796 return _core_.MenuItem_SetId(*args, **kwargs)
8797
8798 def GetId(*args, **kwargs):
8799 """GetId(self) -> int"""
8800 return _core_.MenuItem_GetId(*args, **kwargs)
8801
8802 def IsSeparator(*args, **kwargs):
8803 """IsSeparator(self) -> bool"""
8804 return _core_.MenuItem_IsSeparator(*args, **kwargs)
8805
8806 def SetText(*args, **kwargs):
8807 """SetText(self, String str)"""
8808 return _core_.MenuItem_SetText(*args, **kwargs)
8809
8810 def GetLabel(*args, **kwargs):
8811 """GetLabel(self) -> String"""
8812 return _core_.MenuItem_GetLabel(*args, **kwargs)
8813
8814 def GetText(*args, **kwargs):
8815 """GetText(self) -> String"""
8816 return _core_.MenuItem_GetText(*args, **kwargs)
8817
8818 def GetLabelFromText(*args, **kwargs):
8819 """GetLabelFromText(String text) -> String"""
8820 return _core_.MenuItem_GetLabelFromText(*args, **kwargs)
8821
8822 GetLabelFromText = staticmethod(GetLabelFromText)
8823 def GetKind(*args, **kwargs):
8824 """GetKind(self) -> int"""
8825 return _core_.MenuItem_GetKind(*args, **kwargs)
8826
8827 def SetKind(*args, **kwargs):
8828 """SetKind(self, int kind)"""
8829 return _core_.MenuItem_SetKind(*args, **kwargs)
8830
8831 def SetCheckable(*args, **kwargs):
8832 """SetCheckable(self, bool checkable)"""
8833 return _core_.MenuItem_SetCheckable(*args, **kwargs)
8834
8835 def IsCheckable(*args, **kwargs):
8836 """IsCheckable(self) -> bool"""
8837 return _core_.MenuItem_IsCheckable(*args, **kwargs)
8838
8839 def IsSubMenu(*args, **kwargs):
8840 """IsSubMenu(self) -> bool"""
8841 return _core_.MenuItem_IsSubMenu(*args, **kwargs)
8842
8843 def SetSubMenu(*args, **kwargs):
8844 """SetSubMenu(self, Menu menu)"""
8845 return _core_.MenuItem_SetSubMenu(*args, **kwargs)
8846
8847 def GetSubMenu(*args, **kwargs):
8848 """GetSubMenu(self) -> Menu"""
8849 return _core_.MenuItem_GetSubMenu(*args, **kwargs)
8850
8851 def Enable(*args, **kwargs):
8852 """Enable(self, bool enable=True)"""
8853 return _core_.MenuItem_Enable(*args, **kwargs)
8854
8855 def IsEnabled(*args, **kwargs):
8856 """IsEnabled(self) -> bool"""
8857 return _core_.MenuItem_IsEnabled(*args, **kwargs)
8858
8859 def Check(*args, **kwargs):
8860 """Check(self, bool check=True)"""
8861 return _core_.MenuItem_Check(*args, **kwargs)
8862
8863 def IsChecked(*args, **kwargs):
8864 """IsChecked(self) -> bool"""
8865 return _core_.MenuItem_IsChecked(*args, **kwargs)
8866
8867 def Toggle(*args, **kwargs):
8868 """Toggle(self)"""
8869 return _core_.MenuItem_Toggle(*args, **kwargs)
8870
8871 def SetHelp(*args, **kwargs):
8872 """SetHelp(self, String str)"""
8873 return _core_.MenuItem_SetHelp(*args, **kwargs)
8874
8875 def GetHelp(*args, **kwargs):
8876 """GetHelp(self) -> String"""
8877 return _core_.MenuItem_GetHelp(*args, **kwargs)
8878
8879 def GetAccel(*args, **kwargs):
8880 """GetAccel(self) -> AcceleratorEntry"""
8881 return _core_.MenuItem_GetAccel(*args, **kwargs)
8882
8883 def SetAccel(*args, **kwargs):
8884 """SetAccel(self, AcceleratorEntry accel)"""
8885 return _core_.MenuItem_SetAccel(*args, **kwargs)
8886
8887 def SetFont(*args, **kwargs):
8888 """SetFont(self, Font font)"""
8889 return _core_.MenuItem_SetFont(*args, **kwargs)
8890
8891 def GetFont(*args, **kwargs):
8892 """GetFont(self) -> Font"""
8893 return _core_.MenuItem_GetFont(*args, **kwargs)
8894
8895 def SetTextColour(*args, **kwargs):
8896 """SetTextColour(self, Colour colText)"""
8897 return _core_.MenuItem_SetTextColour(*args, **kwargs)
8898
8899 def GetTextColour(*args, **kwargs):
8900 """GetTextColour(self) -> Colour"""
8901 return _core_.MenuItem_GetTextColour(*args, **kwargs)
8902
8903 def SetBackgroundColour(*args, **kwargs):
8904 """SetBackgroundColour(self, Colour colBack)"""
8905 return _core_.MenuItem_SetBackgroundColour(*args, **kwargs)
8906
8907 def GetBackgroundColour(*args, **kwargs):
8908 """GetBackgroundColour(self) -> Colour"""
8909 return _core_.MenuItem_GetBackgroundColour(*args, **kwargs)
8910
8911 def SetBitmaps(*args, **kwargs):
8912 """SetBitmaps(self, Bitmap bmpChecked, Bitmap bmpUnchecked=wxNullBitmap)"""
8913 return _core_.MenuItem_SetBitmaps(*args, **kwargs)
8914
8915 def SetDisabledBitmap(*args, **kwargs):
8916 """SetDisabledBitmap(self, Bitmap bmpDisabled)"""
8917 return _core_.MenuItem_SetDisabledBitmap(*args, **kwargs)
8918
8919 def GetDisabledBitmap(*args, **kwargs):
8920 """GetDisabledBitmap(self) -> Bitmap"""
8921 return _core_.MenuItem_GetDisabledBitmap(*args, **kwargs)
8922
8923 def SetMarginWidth(*args, **kwargs):
8924 """SetMarginWidth(self, int nWidth)"""
8925 return _core_.MenuItem_SetMarginWidth(*args, **kwargs)
8926
8927 def GetMarginWidth(*args, **kwargs):
8928 """GetMarginWidth(self) -> int"""
8929 return _core_.MenuItem_GetMarginWidth(*args, **kwargs)
8930
8931 def GetDefaultMarginWidth(*args, **kwargs):
8932 """GetDefaultMarginWidth() -> int"""
8933 return _core_.MenuItem_GetDefaultMarginWidth(*args, **kwargs)
8934
8935 GetDefaultMarginWidth = staticmethod(GetDefaultMarginWidth)
8936 def IsOwnerDrawn(*args, **kwargs):
8937 """IsOwnerDrawn(self) -> bool"""
8938 return _core_.MenuItem_IsOwnerDrawn(*args, **kwargs)
8939
8940 def SetOwnerDrawn(*args, **kwargs):
8941 """SetOwnerDrawn(self, bool ownerDrawn=True)"""
8942 return _core_.MenuItem_SetOwnerDrawn(*args, **kwargs)
8943
8944 def ResetOwnerDrawn(*args, **kwargs):
8945 """ResetOwnerDrawn(self)"""
8946 return _core_.MenuItem_ResetOwnerDrawn(*args, **kwargs)
8947
8948 def SetBitmap(*args, **kwargs):
8949 """SetBitmap(self, Bitmap bitmap)"""
8950 return _core_.MenuItem_SetBitmap(*args, **kwargs)
8951
8952 def GetBitmap(*args, **kwargs):
8953 """GetBitmap(self) -> Bitmap"""
8954 return _core_.MenuItem_GetBitmap(*args, **kwargs)
8955
8956
8957 class MenuItemPtr(MenuItem):
8958 def __init__(self, this):
8959 self.this = this
8960 if not hasattr(self,"thisown"): self.thisown = 0
8961 self.__class__ = MenuItem
8962 _core_.MenuItem_swigregister(MenuItemPtr)
8963
8964 def MenuItem_GetLabelFromText(*args, **kwargs):
8965 """MenuItem_GetLabelFromText(String text) -> String"""
8966 return _core_.MenuItem_GetLabelFromText(*args, **kwargs)
8967
8968 def MenuItem_GetDefaultMarginWidth(*args, **kwargs):
8969 """MenuItem_GetDefaultMarginWidth() -> int"""
8970 return _core_.MenuItem_GetDefaultMarginWidth(*args, **kwargs)
8971
8972 #---------------------------------------------------------------------------
8973
8974 class Control(Window):
8975 """
8976 This is the base class for a control or 'widget'.
8977
8978 A control is generally a small window which processes user input
8979 and/or displays one or more item of data.
8980 """
8981 def __repr__(self):
8982 return "<%s.%s; proxy of C++ wxControl instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
8983 def __init__(self, *args, **kwargs):
8984 """
8985 __init__(self, Window parent, int id=-1, Point pos=DefaultPosition,
8986 Size size=DefaultSize, long style=0, Validator validator=DefaultValidator,
8987 String name=ControlNameStr) -> Control
8988
8989 Create a Control. Normally you should only call this from a subclass'
8990 __init__ as a plain old wx.Control is not very useful.
8991 """
8992 newobj = _core_.new_Control(*args, **kwargs)
8993 self.this = newobj.this
8994 self.thisown = 1
8995 del newobj.thisown
8996 self._setOORInfo(self)
8997
8998 def Create(*args, **kwargs):
8999 """
9000 Create(self, Window parent, int id=-1, Point pos=DefaultPosition,
9001 Size size=DefaultSize, long style=0, Validator validator=DefaultValidator,
9002 String name=ControlNameStr) -> bool
9003
9004 Do the 2nd phase and create the GUI control.
9005 """
9006 return _core_.Control_Create(*args, **kwargs)
9007
9008 def Command(*args, **kwargs):
9009 """
9010 Command(self, CommandEvent event)
9011
9012 Simulates the effect of the user issuing a command to the item.
9013
9014 :see: `wx.CommandEvent`
9015
9016 """
9017 return _core_.Control_Command(*args, **kwargs)
9018
9019 def GetLabel(*args, **kwargs):
9020 """
9021 GetLabel(self) -> String
9022
9023 Return a control's text.
9024 """
9025 return _core_.Control_GetLabel(*args, **kwargs)
9026
9027 def SetLabel(*args, **kwargs):
9028 """
9029 SetLabel(self, String label)
9030
9031 Sets the item's text.
9032 """
9033 return _core_.Control_SetLabel(*args, **kwargs)
9034
9035 def GetClassDefaultAttributes(*args, **kwargs):
9036 """
9037 GetClassDefaultAttributes(int variant=WINDOW_VARIANT_NORMAL) -> VisualAttributes
9038
9039 Get the default attributes for this class. This is useful if you want
9040 to use the same font or colour in your own control as in a standard
9041 control -- which is a much better idea than hard coding specific
9042 colours or fonts which might look completely out of place on the
9043 user's system, especially if it uses themes.
9044
9045 The variant parameter is only relevant under Mac currently and is
9046 ignore under other platforms. Under Mac, it will change the size of
9047 the returned font. See `wx.Window.SetWindowVariant` for more about
9048 this.
9049 """
9050 return _core_.Control_GetClassDefaultAttributes(*args, **kwargs)
9051
9052 GetClassDefaultAttributes = staticmethod(GetClassDefaultAttributes)
9053
9054 class ControlPtr(Control):
9055 def __init__(self, this):
9056 self.this = this
9057 if not hasattr(self,"thisown"): self.thisown = 0
9058 self.__class__ = Control
9059 _core_.Control_swigregister(ControlPtr)
9060 ControlNameStr = cvar.ControlNameStr
9061
9062 def PreControl(*args, **kwargs):
9063 """
9064 PreControl() -> Control
9065
9066 Precreate a Control control for 2-phase creation
9067 """
9068 val = _core_.new_PreControl(*args, **kwargs)
9069 val.thisown = 1
9070 return val
9071
9072 def Control_GetClassDefaultAttributes(*args, **kwargs):
9073 """
9074 Control_GetClassDefaultAttributes(int variant=WINDOW_VARIANT_NORMAL) -> VisualAttributes
9075
9076 Get the default attributes for this class. This is useful if you want
9077 to use the same font or colour in your own control as in a standard
9078 control -- which is a much better idea than hard coding specific
9079 colours or fonts which might look completely out of place on the
9080 user's system, especially if it uses themes.
9081
9082 The variant parameter is only relevant under Mac currently and is
9083 ignore under other platforms. Under Mac, it will change the size of
9084 the returned font. See `wx.Window.SetWindowVariant` for more about
9085 this.
9086 """
9087 return _core_.Control_GetClassDefaultAttributes(*args, **kwargs)
9088
9089 #---------------------------------------------------------------------------
9090
9091 class ItemContainer(object):
9092 """
9093 The wx.ItemContainer class defines an interface which is implemented
9094 by all controls which have string subitems, each of which may be
9095 selected, such as `wx.ListBox`, `wx.CheckListBox`, `wx.Choice` as well
9096 as `wx.ComboBox` which implements an extended interface deriving from
9097 this one.
9098
9099 It defines the methods for accessing the control's items and although
9100 each of the derived classes implements them differently, they still
9101 all conform to the same interface.
9102
9103 The items in a wx.ItemContainer have (non empty) string labels and,
9104 optionally, client data associated with them.
9105
9106 """
9107 def __init__(self): raise RuntimeError, "No constructor defined"
9108 def __repr__(self):
9109 return "<%s.%s; proxy of C++ wxItemContainer instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
9110 def Append(*args, **kwargs):
9111 """
9112 Append(self, String item, PyObject clientData=None) -> int
9113
9114 Adds the item to the control, associating the given data with the item
9115 if not None. The return value is the index of the newly added item
9116 which may be different from the last one if the control is sorted (e.g.
9117 has wx.LB_SORT or wx.CB_SORT style).
9118 """
9119 return _core_.ItemContainer_Append(*args, **kwargs)
9120
9121 def AppendItems(*args, **kwargs):
9122 """
9123 AppendItems(self, List strings)
9124
9125 Apend several items at once to the control. Notice that calling this
9126 method may be much faster than appending the items one by one if you
9127 need to add a lot of items.
9128 """
9129 return _core_.ItemContainer_AppendItems(*args, **kwargs)
9130
9131 def Insert(*args, **kwargs):
9132 """
9133 Insert(self, String item, int pos, PyObject clientData=None) -> int
9134
9135 Insert an item into the control before the item at the ``pos`` index,
9136 optionally associating some data object with the item.
9137 """
9138 return _core_.ItemContainer_Insert(*args, **kwargs)
9139
9140 def Clear(*args, **kwargs):
9141 """
9142 Clear(self)
9143
9144 Removes all items from the control.
9145 """
9146 return _core_.ItemContainer_Clear(*args, **kwargs)
9147
9148 def Delete(*args, **kwargs):
9149 """
9150 Delete(self, int n)
9151
9152 Deletes the item at the zero-based index 'n' from the control. Note
9153 that it is an error (signalled by a `wx.PyAssertionError` exception if
9154 enabled) to remove an item with the index negative or greater or equal
9155 than the number of items in the control.
9156 """
9157 return _core_.ItemContainer_Delete(*args, **kwargs)
9158
9159 def GetClientData(*args, **kwargs):
9160 """
9161 GetClientData(self, int n) -> PyObject
9162
9163 Returns the client data associated with the given item, (if any.)
9164 """
9165 return _core_.ItemContainer_GetClientData(*args, **kwargs)
9166
9167 def SetClientData(*args, **kwargs):
9168 """
9169 SetClientData(self, int n, PyObject clientData)
9170
9171 Associate the given client data with the item at position n.
9172 """
9173 return _core_.ItemContainer_SetClientData(*args, **kwargs)
9174
9175 def GetCount(*args, **kwargs):
9176 """
9177 GetCount(self) -> int
9178
9179 Returns the number of items in the control.
9180 """
9181 return _core_.ItemContainer_GetCount(*args, **kwargs)
9182
9183 def IsEmpty(*args, **kwargs):
9184 """
9185 IsEmpty(self) -> bool
9186
9187 Returns True if the control is empty or False if it has some items.
9188 """
9189 return _core_.ItemContainer_IsEmpty(*args, **kwargs)
9190
9191 def GetString(*args, **kwargs):
9192 """
9193 GetString(self, int n) -> String
9194
9195 Returns the label of the item with the given index.
9196 """
9197 return _core_.ItemContainer_GetString(*args, **kwargs)
9198
9199 def GetStrings(*args, **kwargs):
9200 """GetStrings(self) -> wxArrayString"""
9201 return _core_.ItemContainer_GetStrings(*args, **kwargs)
9202
9203 def SetString(*args, **kwargs):
9204 """
9205 SetString(self, int n, String s)
9206
9207 Sets the label for the given item.
9208 """
9209 return _core_.ItemContainer_SetString(*args, **kwargs)
9210
9211 def FindString(*args, **kwargs):
9212 """
9213 FindString(self, String s) -> int
9214
9215 Finds an item whose label matches the given string. Returns the
9216 zero-based position of the item, or ``wx.NOT_FOUND`` if the string was not
9217 found.
9218 """
9219 return _core_.ItemContainer_FindString(*args, **kwargs)
9220
9221 def SetSelection(*args, **kwargs):
9222 """
9223 SetSelection(self, int n)
9224
9225 Sets the item at index 'n' to be the selected item.
9226 """
9227 return _core_.ItemContainer_SetSelection(*args, **kwargs)
9228
9229 def GetSelection(*args, **kwargs):
9230 """
9231 GetSelection(self) -> int
9232
9233 Returns the index of the selected item or ``wx.NOT_FOUND`` if no item
9234 is selected.
9235 """
9236 return _core_.ItemContainer_GetSelection(*args, **kwargs)
9237
9238 def SetStringSelection(*args, **kwargs):
9239 """SetStringSelection(self, String s) -> bool"""
9240 return _core_.ItemContainer_SetStringSelection(*args, **kwargs)
9241
9242 def GetStringSelection(*args, **kwargs):
9243 """
9244 GetStringSelection(self) -> String
9245
9246 Returns the label of the selected item or an empty string if no item
9247 is selected.
9248 """
9249 return _core_.ItemContainer_GetStringSelection(*args, **kwargs)
9250
9251 def Select(*args, **kwargs):
9252 """
9253 Select(self, int n)
9254
9255 This is the same as `SetSelection` and exists only because it is
9256 slightly more natural for controls which support multiple selection.
9257 """
9258 return _core_.ItemContainer_Select(*args, **kwargs)
9259
9260
9261 class ItemContainerPtr(ItemContainer):
9262 def __init__(self, this):
9263 self.this = this
9264 if not hasattr(self,"thisown"): self.thisown = 0
9265 self.__class__ = ItemContainer
9266 _core_.ItemContainer_swigregister(ItemContainerPtr)
9267
9268 #---------------------------------------------------------------------------
9269
9270 class ControlWithItems(Control,ItemContainer):
9271 """
9272 wx.ControlWithItems combines the ``wx.ItemContainer`` class with the
9273 wx.Control class, and is used for the base class of various controls
9274 that have items.
9275 """
9276 def __init__(self): raise RuntimeError, "No constructor defined"
9277 def __repr__(self):
9278 return "<%s.%s; proxy of C++ wxControlWithItems instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
9279
9280 class ControlWithItemsPtr(ControlWithItems):
9281 def __init__(self, this):
9282 self.this = this
9283 if not hasattr(self,"thisown"): self.thisown = 0
9284 self.__class__ = ControlWithItems
9285 _core_.ControlWithItems_swigregister(ControlWithItemsPtr)
9286
9287 #---------------------------------------------------------------------------
9288
9289 class SizerItem(Object):
9290 """
9291 The wx.SizerItem class is used to track the position, size and other
9292 attributes of each item managed by a `wx.Sizer`. In normal usage user
9293 code should never need to deal directly with a wx.SizerItem, but
9294 custom classes derived from `wx.PySizer` will probably need to use the
9295 collection of wx.SizerItems held by wx.Sizer when calculating layout.
9296
9297 :see: `wx.Sizer`, `wx.GBSizerItem`
9298 """
9299 def __repr__(self):
9300 return "<%s.%s; proxy of C++ wxSizerItem instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
9301 def __init__(self, *args, **kwargs):
9302 """
9303 __init__(self) -> SizerItem
9304
9305 Constructs an empty wx.SizerItem. Either a window, sizer or spacer
9306 size will need to be set before this item can be used in a Sizer.
9307
9308 You will probably never need to create a wx.SizerItem directly as they
9309 are created automatically when the sizer's Add, Insert or Prepend
9310 methods are called.
9311
9312 :see: `wx.SizerItemSpacer`, `wx.SizerItemWindow`, `wx.SizerItemSizer`
9313 """
9314 newobj = _core_.new_SizerItem(*args, **kwargs)
9315 self.this = newobj.this
9316 self.thisown = 1
9317 del newobj.thisown
9318 def DeleteWindows(*args, **kwargs):
9319 """
9320 DeleteWindows(self)
9321
9322 Destroy the window or the windows in a subsizer, depending on the type
9323 of item.
9324 """
9325 return _core_.SizerItem_DeleteWindows(*args, **kwargs)
9326
9327 def DetachSizer(*args, **kwargs):
9328 """
9329 DetachSizer(self)
9330
9331 Enable deleting the SizerItem without destroying the contained sizer.
9332 """
9333 return _core_.SizerItem_DetachSizer(*args, **kwargs)
9334
9335 def GetSize(*args, **kwargs):
9336 """
9337 GetSize(self) -> Size
9338
9339 Get the current size of the item, as set in the last Layout.
9340 """
9341 return _core_.SizerItem_GetSize(*args, **kwargs)
9342
9343 def CalcMin(*args, **kwargs):
9344 """
9345 CalcMin(self) -> Size
9346
9347 Calculates the minimum desired size for the item, including any space
9348 needed by borders.
9349 """
9350 return _core_.SizerItem_CalcMin(*args, **kwargs)
9351
9352 def SetDimension(*args, **kwargs):
9353 """
9354 SetDimension(self, Point pos, Size size)
9355
9356 Set the position and size of the space allocated for this item by the
9357 sizer, and adjust the position and size of the item (window or
9358 subsizer) to be within that space taking alignment and borders into
9359 account.
9360 """
9361 return _core_.SizerItem_SetDimension(*args, **kwargs)
9362
9363 def GetMinSize(*args, **kwargs):
9364 """
9365 GetMinSize(self) -> Size
9366
9367 Get the minimum size needed for the item.
9368 """
9369 return _core_.SizerItem_GetMinSize(*args, **kwargs)
9370
9371 def GetMinSizeWithBorder(*args, **kwargs):
9372 """
9373 GetMinSizeWithBorder(self) -> Size
9374
9375 Get the minimum size needed for the item with space for the borders
9376 added, if needed.
9377 """
9378 return _core_.SizerItem_GetMinSizeWithBorder(*args, **kwargs)
9379
9380 def SetInitSize(*args, **kwargs):
9381 """SetInitSize(self, int x, int y)"""
9382 return _core_.SizerItem_SetInitSize(*args, **kwargs)
9383
9384 def SetRatioWH(*args, **kwargs):
9385 """
9386 SetRatioWH(self, int width, int height)
9387
9388 Set the ratio item attribute.
9389 """
9390 return _core_.SizerItem_SetRatioWH(*args, **kwargs)
9391
9392 def SetRatioSize(*args, **kwargs):
9393 """
9394 SetRatioSize(self, Size size)
9395
9396 Set the ratio item attribute.
9397 """
9398 return _core_.SizerItem_SetRatioSize(*args, **kwargs)
9399
9400 def SetRatio(*args, **kwargs):
9401 """
9402 SetRatio(self, float ratio)
9403
9404 Set the ratio item attribute.
9405 """
9406 return _core_.SizerItem_SetRatio(*args, **kwargs)
9407
9408 def GetRatio(*args, **kwargs):
9409 """
9410 GetRatio(self) -> float
9411
9412 Set the ratio item attribute.
9413 """
9414 return _core_.SizerItem_GetRatio(*args, **kwargs)
9415
9416 def GetRect(*args, **kwargs):
9417 """
9418 GetRect(self) -> Rect
9419
9420 Returns the rectangle that the sizer item should occupy
9421 """
9422 return _core_.SizerItem_GetRect(*args, **kwargs)
9423
9424 def IsWindow(*args, **kwargs):
9425 """
9426 IsWindow(self) -> bool
9427
9428 Is this sizer item a window?
9429 """
9430 return _core_.SizerItem_IsWindow(*args, **kwargs)
9431
9432 def IsSizer(*args, **kwargs):
9433 """
9434 IsSizer(self) -> bool
9435
9436 Is this sizer item a subsizer?
9437 """
9438 return _core_.SizerItem_IsSizer(*args, **kwargs)
9439
9440 def IsSpacer(*args, **kwargs):
9441 """
9442 IsSpacer(self) -> bool
9443
9444 Is this sizer item a spacer?
9445 """
9446 return _core_.SizerItem_IsSpacer(*args, **kwargs)
9447
9448 def SetProportion(*args, **kwargs):
9449 """
9450 SetProportion(self, int proportion)
9451
9452 Set the proportion value for this item.
9453 """
9454 return _core_.SizerItem_SetProportion(*args, **kwargs)
9455
9456 def GetProportion(*args, **kwargs):
9457 """
9458 GetProportion(self) -> int
9459
9460 Get the proportion value for this item.
9461 """
9462 return _core_.SizerItem_GetProportion(*args, **kwargs)
9463
9464 SetOption = wx._deprecated(SetProportion, "Please use `SetProportion` instead.")
9465 GetOption = wx._deprecated(GetProportion, "Please use `GetProportion` instead.")
9466 def SetFlag(*args, **kwargs):
9467 """
9468 SetFlag(self, int flag)
9469
9470 Set the flag value for this item.
9471 """
9472 return _core_.SizerItem_SetFlag(*args, **kwargs)
9473
9474 def GetFlag(*args, **kwargs):
9475 """
9476 GetFlag(self) -> int
9477
9478 Get the flag value for this item.
9479 """
9480 return _core_.SizerItem_GetFlag(*args, **kwargs)
9481
9482 def SetBorder(*args, **kwargs):
9483 """
9484 SetBorder(self, int border)
9485
9486 Set the border value for this item.
9487 """
9488 return _core_.SizerItem_SetBorder(*args, **kwargs)
9489
9490 def GetBorder(*args, **kwargs):
9491 """
9492 GetBorder(self) -> int
9493
9494 Get the border value for this item.
9495 """
9496 return _core_.SizerItem_GetBorder(*args, **kwargs)
9497
9498 def GetWindow(*args, **kwargs):
9499 """
9500 GetWindow(self) -> Window
9501
9502 Get the window (if any) that is managed by this sizer item.
9503 """
9504 return _core_.SizerItem_GetWindow(*args, **kwargs)
9505
9506 def SetWindow(*args, **kwargs):
9507 """
9508 SetWindow(self, Window window)
9509
9510 Set the window to be managed by this sizer item.
9511 """
9512 return _core_.SizerItem_SetWindow(*args, **kwargs)
9513
9514 def GetSizer(*args, **kwargs):
9515 """
9516 GetSizer(self) -> Sizer
9517
9518 Get the subsizer (if any) that is managed by this sizer item.
9519 """
9520 return _core_.SizerItem_GetSizer(*args, **kwargs)
9521
9522 def SetSizer(*args, **kwargs):
9523 """
9524 SetSizer(self, Sizer sizer)
9525
9526 Set the subsizer to be managed by this sizer item.
9527 """
9528 return _core_.SizerItem_SetSizer(*args, **kwargs)
9529
9530 def GetSpacer(*args, **kwargs):
9531 """
9532 GetSpacer(self) -> Size
9533
9534 Get the size of the spacer managed by this sizer item.
9535 """
9536 return _core_.SizerItem_GetSpacer(*args, **kwargs)
9537
9538 def SetSpacer(*args, **kwargs):
9539 """
9540 SetSpacer(self, Size size)
9541
9542 Set the size of the spacer to be managed by this sizer item.
9543 """
9544 return _core_.SizerItem_SetSpacer(*args, **kwargs)
9545
9546 def Show(*args, **kwargs):
9547 """
9548 Show(self, bool show)
9549
9550 Set the show item attribute, which sizers use to determine if the item
9551 is to be made part of the layout or not. If the item is tracking a
9552 window then it is shown or hidden as needed.
9553 """
9554 return _core_.SizerItem_Show(*args, **kwargs)
9555
9556 def IsShown(*args, **kwargs):
9557 """
9558 IsShown(self) -> bool
9559
9560 Is the item to be shown in the layout?
9561 """
9562 return _core_.SizerItem_IsShown(*args, **kwargs)
9563
9564 def GetPosition(*args, **kwargs):
9565 """
9566 GetPosition(self) -> Point
9567
9568 Returns the current position of the item, as set in the last Layout.
9569 """
9570 return _core_.SizerItem_GetPosition(*args, **kwargs)
9571
9572 def GetUserData(*args, **kwargs):
9573 """
9574 GetUserData(self) -> PyObject
9575
9576 Returns the userData associated with this sizer item, or None if there
9577 isn't any.
9578 """
9579 return _core_.SizerItem_GetUserData(*args, **kwargs)
9580
9581
9582 class SizerItemPtr(SizerItem):
9583 def __init__(self, this):
9584 self.this = this
9585 if not hasattr(self,"thisown"): self.thisown = 0
9586 self.__class__ = SizerItem
9587 _core_.SizerItem_swigregister(SizerItemPtr)
9588
9589 def SizerItemWindow(*args, **kwargs):
9590 """
9591 SizerItemWindow(Window window, int proportion, int flag, int border,
9592 PyObject userData=None) -> SizerItem
9593
9594 Constructs a `wx.SizerItem` for tracking a window.
9595 """
9596 val = _core_.new_SizerItemWindow(*args, **kwargs)
9597 val.thisown = 1
9598 return val
9599
9600 def SizerItemSpacer(*args, **kwargs):
9601 """
9602 SizerItemSpacer(int width, int height, int proportion, int flag, int border,
9603 PyObject userData=None) -> SizerItem
9604
9605 Constructs a `wx.SizerItem` for tracking a spacer.
9606 """
9607 val = _core_.new_SizerItemSpacer(*args, **kwargs)
9608 val.thisown = 1
9609 return val
9610
9611 def SizerItemSizer(*args, **kwargs):
9612 """
9613 SizerItemSizer(Sizer sizer, int proportion, int flag, int border,
9614 PyObject userData=None) -> SizerItem
9615
9616 Constructs a `wx.SizerItem` for tracking a subsizer
9617 """
9618 val = _core_.new_SizerItemSizer(*args, **kwargs)
9619 val.thisown = 1
9620 return val
9621
9622 class Sizer(Object):
9623 """
9624 wx.Sizer is the abstract base class used for laying out subwindows in
9625 a window. You cannot use wx.Sizer directly; instead, you will have to
9626 use one of the sizer classes derived from it such as `wx.BoxSizer`,
9627 `wx.StaticBoxSizer`, `wx.NotebookSizer`, `wx.GridSizer`, `wx.FlexGridSizer`
9628 and `wx.GridBagSizer`.
9629
9630 The concept implemented by sizers in wxWidgets is closely related to
9631 layout tools in other GUI toolkits, such as Java's AWT, the GTK
9632 toolkit or the Qt toolkit. It is based upon the idea of the individual
9633 subwindows reporting their minimal required size and their ability to
9634 get stretched if the size of the parent window has changed. This will
9635 most often mean that the programmer does not set the original size of
9636 a dialog in the beginning, rather the dialog will assigned a sizer and
9637 this sizer will be queried about the recommended size. The sizer in
9638 turn will query its children, which can be normal windows or contorls,
9639 empty space or other sizers, so that a hierarchy of sizers can be
9640 constructed. Note that wxSizer does not derive from wxWindow and thus
9641 do not interfere with tab ordering and requires very little resources
9642 compared to a real window on screen.
9643
9644 What makes sizers so well fitted for use in wxWidgets is the fact that
9645 every control reports its own minimal size and the algorithm can
9646 handle differences in font sizes or different window (dialog item)
9647 sizes on different platforms without problems. If for example the
9648 standard font as well as the overall design of Mac widgets requires
9649 more space than on Windows, then the initial size of a dialog using a
9650 sizer will automatically be bigger on Mac than on Windows.
9651 """
9652 def __init__(self): raise RuntimeError, "No constructor defined"
9653 def __repr__(self):
9654 return "<%s.%s; proxy of C++ wxSizer instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
9655 def _setOORInfo(*args, **kwargs):
9656 """_setOORInfo(self, PyObject _self)"""
9657 return _core_.Sizer__setOORInfo(*args, **kwargs)
9658
9659 def Add(*args, **kwargs):
9660 """
9661 Add(self, item, int proportion=0, int flag=0, int border=0,
9662 PyObject userData=None) -> wx.SizerItem
9663
9664 Appends a child item to the sizer.
9665 """
9666 return _core_.Sizer_Add(*args, **kwargs)
9667
9668 def Insert(*args, **kwargs):
9669 """
9670 Insert(self, int before, item, int proportion=0, int flag=0, int border=0,
9671 PyObject userData=None) -> wx.SizerItem
9672
9673 Inserts a new item into the list of items managed by this sizer before
9674 the item at index *before*. See `Add` for a description of the parameters.
9675 """
9676 return _core_.Sizer_Insert(*args, **kwargs)
9677
9678 def Prepend(*args, **kwargs):
9679 """
9680 Prepend(self, item, int proportion=0, int flag=0, int border=0,
9681 PyObject userData=None) -> wx.SizerItem
9682
9683 Adds a new item to the begining of the list of sizer items managed by
9684 this sizer. See `Add` for a description of the parameters.
9685 """
9686 return _core_.Sizer_Prepend(*args, **kwargs)
9687
9688 def Remove(*args, **kwargs):
9689 """
9690 Remove(self, item) -> bool
9691
9692 Removes an item from the sizer and destroys it. This method does not
9693 cause any layout or resizing to take place, call `Layout` to update
9694 the layout on screen after removing a child from the sizer. The
9695 *item* parameter can be either a window, a sizer, or the zero-based
9696 index of an item to remove. Returns True if the child item was found
9697 and removed.
9698 """
9699 return _core_.Sizer_Remove(*args, **kwargs)
9700
9701 def Detach(*args, **kwargs):
9702 """
9703 Detach(self, item) -> bool
9704
9705 Detaches an item from the sizer without destroying it. This method
9706 does not cause any layout or resizing to take place, call `Layout` to
9707 do so. The *item* parameter can be either a window, a sizer, or the
9708 zero-based index of the item to be detached. Returns True if the child item
9709 was found and detached.
9710 """
9711 return _core_.Sizer_Detach(*args, **kwargs)
9712
9713 def GetItem(*args, **kwargs):
9714 """
9715 GetItem(self, item) -> wx.SizerItem
9716
9717 Returns the `wx.SizerItem` which holds the *item* given. The *item*
9718 parameter can be either a window, a sizer, or the zero-based index of
9719 the item to be detached.
9720 """
9721 return _core_.Sizer_GetItem(*args, **kwargs)
9722
9723 def _SetItemMinSize(*args, **kwargs):
9724 """_SetItemMinSize(self, PyObject item, Size size)"""
9725 return _core_.Sizer__SetItemMinSize(*args, **kwargs)
9726
9727 def SetItemMinSize(self, item, *args):
9728 """
9729 SetItemMinSize(self, item, Size size)
9730
9731 Sets the minimum size that will be allocated for an item in the sizer.
9732 The *item* parameter can be either a window, a sizer, or the
9733 zero-based index of the item. If a window or sizer is given then it
9734 will be searched for recursivly in subsizers if neccessary.
9735 """
9736 if len(args) == 2:
9737 # for backward compatibility accept separate width,height args too
9738 return self._SetItemMinSize(item, args)
9739 else:
9740 return self._SetItemMinSize(item, args[0])
9741
9742 def AddItem(*args, **kwargs):
9743 """
9744 AddItem(self, SizerItem item)
9745
9746 Adds a `wx.SizerItem` to the sizer.
9747 """
9748 return _core_.Sizer_AddItem(*args, **kwargs)
9749
9750 def InsertItem(*args, **kwargs):
9751 """
9752 InsertItem(self, int index, SizerItem item)
9753
9754 Inserts a `wx.SizerItem` to the sizer at the position given by *index*.
9755 """
9756 return _core_.Sizer_InsertItem(*args, **kwargs)
9757
9758 def PrependItem(*args, **kwargs):
9759 """
9760 PrependItem(self, SizerItem item)
9761
9762 Prepends a `wx.SizerItem` to the sizer.
9763 """
9764 return _core_.Sizer_PrependItem(*args, **kwargs)
9765
9766 def AddMany(self, items):
9767 """
9768 AddMany is a convenience method for adding several items
9769 to a sizer at one time. Simply pass it a list of tuples,
9770 where each tuple consists of the parameters that you
9771 would normally pass to the `Add` method.
9772 """
9773 for item in items:
9774 if type(item) != type(()) or (len(item) == 2 and type(item[0]) == type(1)):
9775 item = (item, )
9776 self.Add(*item)
9777
9778 # for backwards compatibility only, please do not use in new code
9779 def AddWindow(self, *args, **kw):
9780 """Compatibility alias for `Add`."""
9781 return self.Add(*args, **kw)
9782 def AddSizer(self, *args, **kw):
9783 """Compatibility alias for `Add`."""
9784 return self.Add(*args, **kw)
9785 def AddSpacer(self, *args, **kw):
9786 """Compatibility alias for `Add`."""
9787 return self.Add(*args, **kw)
9788
9789 def PrependWindow(self, *args, **kw):
9790 """Compatibility alias for `Prepend`."""
9791 return self.Prepend(*args, **kw)
9792 def PrependSizer(self, *args, **kw):
9793 """Compatibility alias for `Prepend`."""
9794 return self.Prepend(*args, **kw)
9795 def PrependSpacer(self, *args, **kw):
9796 """Compatibility alias for `Prepend`."""
9797 return self.Prepend(*args, **kw)
9798
9799 def InsertWindow(self, *args, **kw):
9800 """Compatibility alias for `Insert`."""
9801 return self.Insert(*args, **kw)
9802 def InsertSizer(self, *args, **kw):
9803 """Compatibility alias for `Insert`."""
9804 return self.Insert(*args, **kw)
9805 def InsertSpacer(self, *args, **kw):
9806 """Compatibility alias for `Insert`."""
9807 return self.Insert(*args, **kw)
9808
9809 def RemoveWindow(self, *args, **kw):
9810 """Compatibility alias for `Remove`."""
9811 return self.Remove(*args, **kw)
9812 def RemoveSizer(self, *args, **kw):
9813 """Compatibility alias for `Remove`."""
9814 return self.Remove(*args, **kw)
9815 def RemovePos(self, *args, **kw):
9816 """Compatibility alias for `Remove`."""
9817 return self.Remove(*args, **kw)
9818
9819
9820 def SetDimension(*args, **kwargs):
9821 """
9822 SetDimension(self, int x, int y, int width, int height)
9823
9824 Call this to force the sizer to take the given dimension and thus
9825 force the items owned by the sizer to resize themselves according to
9826 the rules defined by the parameter in the `Add`, `Insert` or `Prepend`
9827 methods.
9828 """
9829 return _core_.Sizer_SetDimension(*args, **kwargs)
9830
9831 def SetMinSize(*args, **kwargs):
9832 """
9833 SetMinSize(self, Size size)
9834
9835 Call this to give the sizer a minimal size. Normally, the sizer will
9836 calculate its minimal size based purely on how much space its children
9837 need. After calling this method `GetMinSize` will return either the
9838 minimal size as requested by its children or the minimal size set
9839 here, depending on which is bigger.
9840 """
9841 return _core_.Sizer_SetMinSize(*args, **kwargs)
9842
9843 def GetSize(*args, **kwargs):
9844 """
9845 GetSize(self) -> Size
9846
9847 Returns the current size of the space managed by the sizer.
9848 """
9849 return _core_.Sizer_GetSize(*args, **kwargs)
9850
9851 def GetPosition(*args, **kwargs):
9852 """
9853 GetPosition(self) -> Point
9854
9855 Returns the current position of the sizer's managed space.
9856 """
9857 return _core_.Sizer_GetPosition(*args, **kwargs)
9858
9859 def GetMinSize(*args, **kwargs):
9860 """
9861 GetMinSize(self) -> Size
9862
9863 Returns the minimal size of the sizer. This is either the combined
9864 minimal size of all the children and their borders or the minimal size
9865 set by SetMinSize, depending on which is bigger.
9866 """
9867 return _core_.Sizer_GetMinSize(*args, **kwargs)
9868
9869 def GetSizeTuple(self):
9870 return self.GetSize().Get()
9871 def GetPositionTuple(self):
9872 return self.GetPosition().Get()
9873 def GetMinSizeTuple(self):
9874 return self.GetMinSize().Get()
9875
9876 def RecalcSizes(*args, **kwargs):
9877 """
9878 RecalcSizes(self)
9879
9880 Using the sizes calculated by `CalcMin` reposition and resize all the
9881 items managed by this sizer. You should not need to call this directly as
9882 it is called by `Layout`.
9883 """
9884 return _core_.Sizer_RecalcSizes(*args, **kwargs)
9885
9886 def CalcMin(*args, **kwargs):
9887 """
9888 CalcMin(self) -> Size
9889
9890 This method is where the sizer will do the actual calculation of its
9891 children's minimal sizes. You should not need to call this directly as
9892 it is called by `Layout`.
9893 """
9894 return _core_.Sizer_CalcMin(*args, **kwargs)
9895
9896 def Layout(*args, **kwargs):
9897 """
9898 Layout(self)
9899
9900 This method will force the recalculation and layout of the items
9901 controlled by the sizer using the current space allocated to the
9902 sizer. Normally this is called automatically from the owning window's
9903 EVT_SIZE handler, but it is also useful to call it from user code when
9904 one of the items in a sizer change size, or items are added or
9905 removed.
9906 """
9907 return _core_.Sizer_Layout(*args, **kwargs)
9908
9909 def Fit(*args, **kwargs):
9910 """
9911 Fit(self, Window window) -> Size
9912
9913 Tell the sizer to resize the *window* to match the sizer's minimal
9914 size. This is commonly done in the constructor of the window itself in
9915 order to set its initial size to match the needs of the children as
9916 determined by the sizer. Returns the new size.
9917
9918 For a top level window this is the total window size, not the client size.
9919 """
9920 return _core_.Sizer_Fit(*args, **kwargs)
9921
9922 def FitInside(*args, **kwargs):
9923 """
9924 FitInside(self, Window window)
9925
9926 Tell the sizer to resize the *virtual size* of the *window* to match the
9927 sizer's minimal size. This will not alter the on screen size of the
9928 window, but may cause the addition/removal/alteration of scrollbars
9929 required to view the virtual area in windows which manage it.
9930
9931 :see: `wx.ScrolledWindow.SetScrollbars`, `SetVirtualSizeHints`
9932
9933 """
9934 return _core_.Sizer_FitInside(*args, **kwargs)
9935
9936 def SetSizeHints(*args, **kwargs):
9937 """
9938 SetSizeHints(self, Window window)
9939
9940 Tell the sizer to set (and `Fit`) the minimal size of the *window* to
9941 match the sizer's minimal size. This is commonly done in the
9942 constructor of the window itself if the window is resizable (as are
9943 many dialogs under Unix and frames on probably all platforms) in order
9944 to prevent the window from being sized smaller than the minimal size
9945 required by the sizer.
9946 """
9947 return _core_.Sizer_SetSizeHints(*args, **kwargs)
9948
9949 def SetVirtualSizeHints(*args, **kwargs):
9950 """
9951 SetVirtualSizeHints(self, Window window)
9952
9953 Tell the sizer to set the minimal size of the window virtual area to
9954 match the sizer's minimal size. For windows with managed scrollbars
9955 this will set them appropriately.
9956
9957 :see: `wx.ScrolledWindow.SetScrollbars`
9958
9959 """
9960 return _core_.Sizer_SetVirtualSizeHints(*args, **kwargs)
9961
9962 def Clear(*args, **kwargs):
9963 """
9964 Clear(self, bool deleteWindows=False)
9965
9966 Clear all items from the sizer, optionally destroying the window items
9967 as well.
9968 """
9969 return _core_.Sizer_Clear(*args, **kwargs)
9970
9971 def DeleteWindows(*args, **kwargs):
9972 """
9973 DeleteWindows(self)
9974
9975 Destroy all windows managed by the sizer.
9976 """
9977 return _core_.Sizer_DeleteWindows(*args, **kwargs)
9978
9979 def GetChildren(*args, **kwargs):
9980 """
9981 GetChildren(self) -> list
9982
9983 Returns a list of all the `wx.SizerItem` objects managed by the sizer.
9984 """
9985 return _core_.Sizer_GetChildren(*args, **kwargs)
9986
9987 def Show(*args, **kwargs):
9988 """
9989 Show(self, item, bool show=True, bool recursive=false) -> bool
9990
9991 Shows or hides an item managed by the sizer. To make a sizer item
9992 disappear or reappear, use Show followed by `Layout`. The *item*
9993 parameter can be either a window, a sizer, or the zero-based index of
9994 the item. Use the recursive parameter to show or hide an item in a
9995 subsizer. Returns True if the item was found.
9996 """
9997 return _core_.Sizer_Show(*args, **kwargs)
9998
9999 def IsShown(*args, **kwargs):
10000 """
10001 IsShown(self, item)
10002
10003 Determines if the item is currently shown. sizer. To make a sizer
10004 item disappear or reappear, use Show followed by `Layout`. The *item*
10005 parameter can be either a window, a sizer, or the zero-based index of
10006 the item.
10007 """
10008 return _core_.Sizer_IsShown(*args, **kwargs)
10009
10010 def Hide(self, item, recursive=False):
10011 """
10012 A convenience method for `Show`(item, False, recursive).
10013 """
10014 return self.Show(item, False, recursive)
10015
10016 def ShowItems(*args, **kwargs):
10017 """
10018 ShowItems(self, bool show)
10019
10020 Recursively call `wx.SizerItem.Show` on all sizer items.
10021 """
10022 return _core_.Sizer_ShowItems(*args, **kwargs)
10023
10024
10025 class SizerPtr(Sizer):
10026 def __init__(self, this):
10027 self.this = this
10028 if not hasattr(self,"thisown"): self.thisown = 0
10029 self.__class__ = Sizer
10030 _core_.Sizer_swigregister(SizerPtr)
10031
10032 class PySizer(Sizer):
10033 """
10034 wx.PySizer is a special version of `wx.Sizer` that has been
10035 instrumented to allow the C++ virtual methods to be overloaded in
10036 Python derived classes. You would derive from this class if you are
10037 wanting to implement a custom sizer in Python code. Simply implement
10038 `CalcMin` and `RecalcSizes` in the derived class and you're all set.
10039 For example::
10040
10041 class MySizer(wx.PySizer):
10042 def __init__(self):
10043 wx.PySizer.__init__(self)
10044
10045 def CalcMin(self):
10046 for item in self.GetChildren():
10047 # calculate the total minimum width and height needed
10048 # by all items in the sizer according to this sizer's
10049 # layout algorithm.
10050 ...
10051 return wx.Size(width, height)
10052
10053 def RecalcSizes(self):
10054 # find the space allotted to this sizer
10055 pos = self.GetPosition()
10056 size = self.GetSize()
10057 for item in self.GetChildren():
10058 # Recalculate (if necessary) the position and size of
10059 # each item and then call item.SetDimension to do the
10060 # actual positioning and sizing of the items within the
10061 # space alloted to this sizer.
10062 ...
10063 item.SetDimension(itemPos, itemSize)
10064
10065
10066 When `Layout` is called it first calls `CalcMin` followed by
10067 `RecalcSizes` so you can optimize a bit by saving the results of
10068 `CalcMin` and reusing them in `RecalcSizes`.
10069
10070 :see: `wx.SizerItem`, `wx.Sizer.GetChildren`
10071
10072
10073 """
10074 def __repr__(self):
10075 return "<%s.%s; proxy of C++ wxPySizer instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
10076 def __init__(self, *args, **kwargs):
10077 """
10078 __init__(self) -> PySizer
10079
10080 Creates a wx.PySizer. Must be called from the __init__ in the derived
10081 class.
10082 """
10083 newobj = _core_.new_PySizer(*args, **kwargs)
10084 self.this = newobj.this
10085 self.thisown = 1
10086 del newobj.thisown
10087 self._setCallbackInfo(self, PySizer);self._setOORInfo(self)
10088
10089 def _setCallbackInfo(*args, **kwargs):
10090 """_setCallbackInfo(self, PyObject self, PyObject _class)"""
10091 return _core_.PySizer__setCallbackInfo(*args, **kwargs)
10092
10093
10094 class PySizerPtr(PySizer):
10095 def __init__(self, this):
10096 self.this = this
10097 if not hasattr(self,"thisown"): self.thisown = 0
10098 self.__class__ = PySizer
10099 _core_.PySizer_swigregister(PySizerPtr)
10100
10101 #---------------------------------------------------------------------------
10102
10103 class BoxSizer(Sizer):
10104 """
10105 The basic idea behind a box sizer is that windows will most often be
10106 laid out in rather simple basic geometry, typically in a row or a
10107 column or nested hierarchies of either. A wx.BoxSizer will lay out
10108 its items in a simple row or column, depending on the orientation
10109 parameter passed to the constructor.
10110 """
10111 def __repr__(self):
10112 return "<%s.%s; proxy of C++ wxBoxSizer instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
10113 def __init__(self, *args, **kwargs):
10114 """
10115 __init__(self, int orient=HORIZONTAL) -> BoxSizer
10116
10117 Constructor for a wx.BoxSizer. *orient* may be one of ``wx.VERTICAL``
10118 or ``wx.HORIZONTAL`` for creating either a column sizer or a row
10119 sizer.
10120 """
10121 newobj = _core_.new_BoxSizer(*args, **kwargs)
10122 self.this = newobj.this
10123 self.thisown = 1
10124 del newobj.thisown
10125 self._setOORInfo(self)
10126
10127 def GetOrientation(*args, **kwargs):
10128 """
10129 GetOrientation(self) -> int
10130
10131 Returns the current orientation of the sizer.
10132 """
10133 return _core_.BoxSizer_GetOrientation(*args, **kwargs)
10134
10135 def SetOrientation(*args, **kwargs):
10136 """
10137 SetOrientation(self, int orient)
10138
10139 Resets the orientation of the sizer.
10140 """
10141 return _core_.BoxSizer_SetOrientation(*args, **kwargs)
10142
10143
10144 class BoxSizerPtr(BoxSizer):
10145 def __init__(self, this):
10146 self.this = this
10147 if not hasattr(self,"thisown"): self.thisown = 0
10148 self.__class__ = BoxSizer
10149 _core_.BoxSizer_swigregister(BoxSizerPtr)
10150
10151 #---------------------------------------------------------------------------
10152
10153 class StaticBoxSizer(BoxSizer):
10154 """
10155 wx.StaticBoxSizer derives from and functions identically to the
10156 `wx.BoxSizer` and adds a `wx.StaticBox` around the items that the sizer
10157 manages. Note that this static box must be created separately and
10158 passed to the sizer constructor.
10159 """
10160 def __repr__(self):
10161 return "<%s.%s; proxy of C++ wxStaticBoxSizer instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
10162 def __init__(self, *args, **kwargs):
10163 """
10164 __init__(self, StaticBox box, int orient=HORIZONTAL) -> StaticBoxSizer
10165
10166 Constructor. It takes an associated static box and the orientation
10167 *orient* as parameters - orient can be either of ``wx.VERTICAL`` or
10168 ``wx.HORIZONTAL``.
10169 """
10170 newobj = _core_.new_StaticBoxSizer(*args, **kwargs)
10171 self.this = newobj.this
10172 self.thisown = 1
10173 del newobj.thisown
10174 self._setOORInfo(self)
10175
10176 def GetStaticBox(*args, **kwargs):
10177 """
10178 GetStaticBox(self) -> StaticBox
10179
10180 Returns the static box associated with this sizer.
10181 """
10182 return _core_.StaticBoxSizer_GetStaticBox(*args, **kwargs)
10183
10184
10185 class StaticBoxSizerPtr(StaticBoxSizer):
10186 def __init__(self, this):
10187 self.this = this
10188 if not hasattr(self,"thisown"): self.thisown = 0
10189 self.__class__ = StaticBoxSizer
10190 _core_.StaticBoxSizer_swigregister(StaticBoxSizerPtr)
10191
10192 #---------------------------------------------------------------------------
10193
10194 class GridSizer(Sizer):
10195 """
10196 A grid sizer is a sizer which lays out its children in a
10197 two-dimensional table with all cells having the same size. In other
10198 words, the width of each cell within the grid is the width of the
10199 widest item added to the sizer and the height of each grid cell is the
10200 height of the tallest item. An optional vertical and/or horizontal
10201 gap between items can also be specified (in pixels.)
10202
10203 Items are placed in the cells of the grid in the order they are added,
10204 in row-major order. In other words, the first row is filled first,
10205 then the second, and so on until all items have been added. (If
10206 neccessary, additional rows will be added as items are added.) If you
10207 need to have greater control over the cells that items are placed in
10208 then use the `wx.GridBagSizer`.
10209
10210 """
10211 def __repr__(self):
10212 return "<%s.%s; proxy of C++ wxGridSizer instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
10213 def __init__(self, *args, **kwargs):
10214 """
10215 __init__(self, int rows=1, int cols=0, int vgap=0, int hgap=0) -> GridSizer
10216
10217 Constructor for a wx.GridSizer. *rows* and *cols* determine the number
10218 of columns and rows in the sizer - if either of the parameters is
10219 zero, it will be calculated to from the total number of children in
10220 the sizer, thus making the sizer grow dynamically. *vgap* and *hgap*
10221 define extra space between all children.
10222 """
10223 newobj = _core_.new_GridSizer(*args, **kwargs)
10224 self.this = newobj.this
10225 self.thisown = 1
10226 del newobj.thisown
10227 self._setOORInfo(self)
10228
10229 def SetCols(*args, **kwargs):
10230 """
10231 SetCols(self, int cols)
10232
10233 Sets the number of columns in the sizer.
10234 """
10235 return _core_.GridSizer_SetCols(*args, **kwargs)
10236
10237 def SetRows(*args, **kwargs):
10238 """
10239 SetRows(self, int rows)
10240
10241 Sets the number of rows in the sizer.
10242 """
10243 return _core_.GridSizer_SetRows(*args, **kwargs)
10244
10245 def SetVGap(*args, **kwargs):
10246 """
10247 SetVGap(self, int gap)
10248
10249 Sets the vertical gap (in pixels) between the cells in the sizer.
10250 """
10251 return _core_.GridSizer_SetVGap(*args, **kwargs)
10252
10253 def SetHGap(*args, **kwargs):
10254 """
10255 SetHGap(self, int gap)
10256
10257 Sets the horizontal gap (in pixels) between cells in the sizer
10258 """
10259 return _core_.GridSizer_SetHGap(*args, **kwargs)
10260
10261 def GetCols(*args, **kwargs):
10262 """
10263 GetCols(self) -> int
10264
10265 Returns the number of columns in the sizer.
10266 """
10267 return _core_.GridSizer_GetCols(*args, **kwargs)
10268
10269 def GetRows(*args, **kwargs):
10270 """
10271 GetRows(self) -> int
10272
10273 Returns the number of rows in the sizer.
10274 """
10275 return _core_.GridSizer_GetRows(*args, **kwargs)
10276
10277 def GetVGap(*args, **kwargs):
10278 """
10279 GetVGap(self) -> int
10280
10281 Returns the vertical gap (in pixels) between the cells in the sizer.
10282 """
10283 return _core_.GridSizer_GetVGap(*args, **kwargs)
10284
10285 def GetHGap(*args, **kwargs):
10286 """
10287 GetHGap(self) -> int
10288
10289 Returns the horizontal gap (in pixels) between cells in the sizer.
10290 """
10291 return _core_.GridSizer_GetHGap(*args, **kwargs)
10292
10293
10294 class GridSizerPtr(GridSizer):
10295 def __init__(self, this):
10296 self.this = this
10297 if not hasattr(self,"thisown"): self.thisown = 0
10298 self.__class__ = GridSizer
10299 _core_.GridSizer_swigregister(GridSizerPtr)
10300
10301 #---------------------------------------------------------------------------
10302
10303 FLEX_GROWMODE_NONE = _core_.FLEX_GROWMODE_NONE
10304 FLEX_GROWMODE_SPECIFIED = _core_.FLEX_GROWMODE_SPECIFIED
10305 FLEX_GROWMODE_ALL = _core_.FLEX_GROWMODE_ALL
10306 class FlexGridSizer(GridSizer):
10307 """
10308 A flex grid sizer is a sizer which lays out its children in a
10309 two-dimensional table with all table cells in one row having the same
10310 height and all cells in one column having the same width, but all
10311 rows or all columns are not necessarily the same height or width as in
10312 the `wx.GridSizer`.
10313
10314 wx.FlexGridSizer can also size items equally in one direction but
10315 unequally ("flexibly") in the other. If the sizer is only flexible
10316 in one direction (this can be changed using `SetFlexibleDirection`), it
10317 needs to be decided how the sizer should grow in the other ("non
10318 flexible") direction in order to fill the available space. The
10319 `SetNonFlexibleGrowMode` method serves this purpose.
10320
10321
10322 """
10323 def __repr__(self):
10324 return "<%s.%s; proxy of C++ wxFlexGridSizer instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
10325 def __init__(self, *args, **kwargs):
10326 """
10327 __init__(self, int rows=1, int cols=0, int vgap=0, int hgap=0) -> FlexGridSizer
10328
10329 Constructor for a wx.FlexGridSizer. *rows* and *cols* determine the
10330 number of columns and rows in the sizer - if either of the parameters
10331 is zero, it will be calculated to from the total number of children in
10332 the sizer, thus making the sizer grow dynamically. *vgap* and *hgap*
10333 define extra space between all children.
10334 """
10335 newobj = _core_.new_FlexGridSizer(*args, **kwargs)
10336 self.this = newobj.this
10337 self.thisown = 1
10338 del newobj.thisown
10339 self._setOORInfo(self)
10340
10341 def AddGrowableRow(*args, **kwargs):
10342 """
10343 AddGrowableRow(self, size_t idx, int proportion=0)
10344
10345 Specifies that row *idx* (starting from zero) should be grown if there
10346 is extra space available to the sizer.
10347
10348 The *proportion* parameter has the same meaning as the stretch factor
10349 for the box sizers except that if all proportions are 0, then all
10350 columns are resized equally (instead of not being resized at all).
10351 """
10352 return _core_.FlexGridSizer_AddGrowableRow(*args, **kwargs)
10353
10354 def RemoveGrowableRow(*args, **kwargs):
10355 """
10356 RemoveGrowableRow(self, size_t idx)
10357
10358 Specifies that row *idx* is no longer growable.
10359 """
10360 return _core_.FlexGridSizer_RemoveGrowableRow(*args, **kwargs)
10361
10362 def AddGrowableCol(*args, **kwargs):
10363 """
10364 AddGrowableCol(self, size_t idx, int proportion=0)
10365
10366 Specifies that column *idx* (starting from zero) should be grown if
10367 there is extra space available to the sizer.
10368
10369 The *proportion* parameter has the same meaning as the stretch factor
10370 for the box sizers except that if all proportions are 0, then all
10371 columns are resized equally (instead of not being resized at all).
10372 """
10373 return _core_.FlexGridSizer_AddGrowableCol(*args, **kwargs)
10374
10375 def RemoveGrowableCol(*args, **kwargs):
10376 """
10377 RemoveGrowableCol(self, size_t idx)
10378
10379 Specifies that column *idx* is no longer growable.
10380 """
10381 return _core_.FlexGridSizer_RemoveGrowableCol(*args, **kwargs)
10382
10383 def SetFlexibleDirection(*args, **kwargs):
10384 """
10385 SetFlexibleDirection(self, int direction)
10386
10387 Specifies whether the sizer should flexibly resize its columns, rows,
10388 or both. Argument *direction* can be one of the following values. Any
10389 other value is ignored.
10390
10391 ============== =======================================
10392 wx.VERTICAL Rows are flexibly sized.
10393 wx.HORIZONTAL Columns are flexibly sized.
10394 wx.BOTH Both rows and columns are flexibly sized
10395 (this is the default value).
10396 ============== =======================================
10397
10398 Note that this method does not trigger relayout.
10399
10400 """
10401 return _core_.FlexGridSizer_SetFlexibleDirection(*args, **kwargs)
10402
10403 def GetFlexibleDirection(*args, **kwargs):
10404 """
10405 GetFlexibleDirection(self) -> int
10406
10407 Returns a value that specifies whether the sizer
10408 flexibly resizes its columns, rows, or both (default).
10409
10410 :see: `SetFlexibleDirection`
10411 """
10412 return _core_.FlexGridSizer_GetFlexibleDirection(*args, **kwargs)
10413
10414 def SetNonFlexibleGrowMode(*args, **kwargs):
10415 """
10416 SetNonFlexibleGrowMode(self, int mode)
10417
10418 Specifies how the sizer should grow in the non-flexible direction if
10419 there is one (so `SetFlexibleDirection` must have been called
10420 previously). Argument *mode* can be one of the following values:
10421
10422 ========================== =================================================
10423 wx.FLEX_GROWMODE_NONE Sizer doesn't grow in the non flexible direction.
10424 wx.FLEX_GROWMODE_SPECIFIED Sizer honors growable columns/rows set with
10425 `AddGrowableCol` and `AddGrowableRow`. In this
10426 case equal sizing applies to minimum sizes of
10427 columns or rows (this is the default value).
10428 wx.FLEX_GROWMODE_ALL Sizer equally stretches all columns or rows in
10429 the non flexible direction, whether they are
10430 growable or not in the flexbile direction.
10431 ========================== =================================================
10432
10433 Note that this method does not trigger relayout.
10434
10435
10436 """
10437 return _core_.FlexGridSizer_SetNonFlexibleGrowMode(*args, **kwargs)
10438
10439 def GetNonFlexibleGrowMode(*args, **kwargs):
10440 """
10441 GetNonFlexibleGrowMode(self) -> int
10442
10443 Returns the value that specifies how the sizer grows in the
10444 non-flexible direction if there is one.
10445
10446 :see: `SetNonFlexibleGrowMode`
10447 """
10448 return _core_.FlexGridSizer_GetNonFlexibleGrowMode(*args, **kwargs)
10449
10450 def GetRowHeights(*args, **kwargs):
10451 """
10452 GetRowHeights(self) -> list
10453
10454 Returns a list of integers representing the heights of each of the
10455 rows in the sizer.
10456 """
10457 return _core_.FlexGridSizer_GetRowHeights(*args, **kwargs)
10458
10459 def GetColWidths(*args, **kwargs):
10460 """
10461 GetColWidths(self) -> list
10462
10463 Returns a list of integers representing the widths of each of the
10464 columns in the sizer.
10465 """
10466 return _core_.FlexGridSizer_GetColWidths(*args, **kwargs)
10467
10468
10469 class FlexGridSizerPtr(FlexGridSizer):
10470 def __init__(self, this):
10471 self.this = this
10472 if not hasattr(self,"thisown"): self.thisown = 0
10473 self.__class__ = FlexGridSizer
10474 _core_.FlexGridSizer_swigregister(FlexGridSizerPtr)
10475
10476 class StdDialogButtonSizer(BoxSizer):
10477 """
10478 A special sizer that knows how to order and position standard buttons
10479 in order to conform to the current platform's standards. You simply
10480 need to add each `wx.Button` to the sizer, and be sure to create the
10481 buttons using the standard ID's. Then call `Realize` and the sizer
10482 will take care of the rest.
10483
10484 """
10485 def __repr__(self):
10486 return "<%s.%s; proxy of C++ wxStdDialogButtonSizer instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
10487 def __init__(self, *args, **kwargs):
10488 """__init__(self) -> StdDialogButtonSizer"""
10489 newobj = _core_.new_StdDialogButtonSizer(*args, **kwargs)
10490 self.this = newobj.this
10491 self.thisown = 1
10492 del newobj.thisown
10493 def AddButton(*args, **kwargs):
10494 """
10495 AddButton(self, wxButton button)
10496
10497 Use this to add the buttons to this sizer. Do not use the `Add`
10498 method in the base class.
10499 """
10500 return _core_.StdDialogButtonSizer_AddButton(*args, **kwargs)
10501
10502 def Realize(*args, **kwargs):
10503 """
10504 Realize(self)
10505
10506 This funciton needs to be called after all the buttons have been added
10507 to the sizer. It will reorder them and position them in a platform
10508 specifc manner.
10509 """
10510 return _core_.StdDialogButtonSizer_Realize(*args, **kwargs)
10511
10512 def SetAffirmativeButton(*args, **kwargs):
10513 """SetAffirmativeButton(self, wxButton button)"""
10514 return _core_.StdDialogButtonSizer_SetAffirmativeButton(*args, **kwargs)
10515
10516 def SetNegativeButton(*args, **kwargs):
10517 """SetNegativeButton(self, wxButton button)"""
10518 return _core_.StdDialogButtonSizer_SetNegativeButton(*args, **kwargs)
10519
10520 def SetCancelButton(*args, **kwargs):
10521 """SetCancelButton(self, wxButton button)"""
10522 return _core_.StdDialogButtonSizer_SetCancelButton(*args, **kwargs)
10523
10524 def GetAffirmativeButton(*args, **kwargs):
10525 """GetAffirmativeButton(self) -> wxButton"""
10526 return _core_.StdDialogButtonSizer_GetAffirmativeButton(*args, **kwargs)
10527
10528 def GetApplyButton(*args, **kwargs):
10529 """GetApplyButton(self) -> wxButton"""
10530 return _core_.StdDialogButtonSizer_GetApplyButton(*args, **kwargs)
10531
10532 def GetNegativeButton(*args, **kwargs):
10533 """GetNegativeButton(self) -> wxButton"""
10534 return _core_.StdDialogButtonSizer_GetNegativeButton(*args, **kwargs)
10535
10536 def GetCancelButton(*args, **kwargs):
10537 """GetCancelButton(self) -> wxButton"""
10538 return _core_.StdDialogButtonSizer_GetCancelButton(*args, **kwargs)
10539
10540 def GetHelpButton(*args, **kwargs):
10541 """GetHelpButton(self) -> wxButton"""
10542 return _core_.StdDialogButtonSizer_GetHelpButton(*args, **kwargs)
10543
10544
10545 class StdDialogButtonSizerPtr(StdDialogButtonSizer):
10546 def __init__(self, this):
10547 self.this = this
10548 if not hasattr(self,"thisown"): self.thisown = 0
10549 self.__class__ = StdDialogButtonSizer
10550 _core_.StdDialogButtonSizer_swigregister(StdDialogButtonSizerPtr)
10551
10552 #---------------------------------------------------------------------------
10553
10554 class GBPosition(object):
10555 """
10556 This class represents the position of an item in a virtual grid of
10557 rows and columns managed by a `wx.GridBagSizer`. wxPython has
10558 typemaps that will automatically convert from a 2-element sequence of
10559 integers to a wx.GBPosition, so you can use the more pythonic
10560 representation of the position nearly transparently in Python code.
10561 """
10562 def __repr__(self):
10563 return "<%s.%s; proxy of C++ wxGBPosition instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
10564 def __init__(self, *args, **kwargs):
10565 """
10566 __init__(self, int row=0, int col=0) -> GBPosition
10567
10568 This class represents the position of an item in a virtual grid of
10569 rows and columns managed by a `wx.GridBagSizer`. wxPython has
10570 typemaps that will automatically convert from a 2-element sequence of
10571 integers to a wx.GBPosition, so you can use the more pythonic
10572 representation of the position nearly transparently in Python code.
10573 """
10574 newobj = _core_.new_GBPosition(*args, **kwargs)
10575 self.this = newobj.this
10576 self.thisown = 1
10577 del newobj.thisown
10578 def GetRow(*args, **kwargs):
10579 """GetRow(self) -> int"""
10580 return _core_.GBPosition_GetRow(*args, **kwargs)
10581
10582 def GetCol(*args, **kwargs):
10583 """GetCol(self) -> int"""
10584 return _core_.GBPosition_GetCol(*args, **kwargs)
10585
10586 def SetRow(*args, **kwargs):
10587 """SetRow(self, int row)"""
10588 return _core_.GBPosition_SetRow(*args, **kwargs)
10589
10590 def SetCol(*args, **kwargs):
10591 """SetCol(self, int col)"""
10592 return _core_.GBPosition_SetCol(*args, **kwargs)
10593
10594 def __eq__(*args, **kwargs):
10595 """__eq__(self, GBPosition other) -> bool"""
10596 return _core_.GBPosition___eq__(*args, **kwargs)
10597
10598 def __ne__(*args, **kwargs):
10599 """__ne__(self, GBPosition other) -> bool"""
10600 return _core_.GBPosition___ne__(*args, **kwargs)
10601
10602 def Set(*args, **kwargs):
10603 """Set(self, int row=0, int col=0)"""
10604 return _core_.GBPosition_Set(*args, **kwargs)
10605
10606 def Get(*args, **kwargs):
10607 """Get(self) -> PyObject"""
10608 return _core_.GBPosition_Get(*args, **kwargs)
10609
10610 asTuple = wx._deprecated(Get, "asTuple is deprecated, use `Get` instead")
10611 def __str__(self): return str(self.Get())
10612 def __repr__(self): return 'wx.GBPosition'+str(self.Get())
10613 def __len__(self): return len(self.Get())
10614 def __getitem__(self, index): return self.Get()[index]
10615 def __setitem__(self, index, val):
10616 if index == 0: self.SetRow(val)
10617 elif index == 1: self.SetCol(val)
10618 else: raise IndexError
10619 def __nonzero__(self): return self.Get() != (0,0)
10620 __safe_for_unpickling__ = True
10621 def __reduce__(self): return (wx.GBPosition, self.Get())
10622
10623 row = property(GetRow, SetRow)
10624 col = property(GetCol, SetCol)
10625
10626
10627 class GBPositionPtr(GBPosition):
10628 def __init__(self, this):
10629 self.this = this
10630 if not hasattr(self,"thisown"): self.thisown = 0
10631 self.__class__ = GBPosition
10632 _core_.GBPosition_swigregister(GBPositionPtr)
10633
10634 class GBSpan(object):
10635 """
10636 This class is used to hold the row and column spanning attributes of
10637 items in a `wx.GridBagSizer`. wxPython has typemaps that will
10638 automatically convert from a 2-element sequence of integers to a
10639 wx.GBSpan, so you can use the more pythonic representation of the span
10640 nearly transparently in Python code.
10641
10642 """
10643 def __repr__(self):
10644 return "<%s.%s; proxy of C++ wxGBSpan instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
10645 def __init__(self, *args, **kwargs):
10646 """
10647 __init__(self, int rowspan=1, int colspan=1) -> GBSpan
10648
10649 Construct a new wxGBSpan, optionally setting the rowspan and
10650 colspan. The default is (1,1). (Meaning that the item occupies one
10651 cell in each direction.
10652 """
10653 newobj = _core_.new_GBSpan(*args, **kwargs)
10654 self.this = newobj.this
10655 self.thisown = 1
10656 del newobj.thisown
10657 def GetRowspan(*args, **kwargs):
10658 """GetRowspan(self) -> int"""
10659 return _core_.GBSpan_GetRowspan(*args, **kwargs)
10660
10661 def GetColspan(*args, **kwargs):
10662 """GetColspan(self) -> int"""
10663 return _core_.GBSpan_GetColspan(*args, **kwargs)
10664
10665 def SetRowspan(*args, **kwargs):
10666 """SetRowspan(self, int rowspan)"""
10667 return _core_.GBSpan_SetRowspan(*args, **kwargs)
10668
10669 def SetColspan(*args, **kwargs):
10670 """SetColspan(self, int colspan)"""
10671 return _core_.GBSpan_SetColspan(*args, **kwargs)
10672
10673 def __eq__(*args, **kwargs):
10674 """__eq__(self, GBSpan other) -> bool"""
10675 return _core_.GBSpan___eq__(*args, **kwargs)
10676
10677 def __ne__(*args, **kwargs):
10678 """__ne__(self, GBSpan other) -> bool"""
10679 return _core_.GBSpan___ne__(*args, **kwargs)
10680
10681 def Set(*args, **kwargs):
10682 """Set(self, int rowspan=1, int colspan=1)"""
10683 return _core_.GBSpan_Set(*args, **kwargs)
10684
10685 def Get(*args, **kwargs):
10686 """Get(self) -> PyObject"""
10687 return _core_.GBSpan_Get(*args, **kwargs)
10688
10689 asTuple = wx._deprecated(Get, "asTuple is deprecated, use `Get` instead")
10690 def __str__(self): return str(self.Get())
10691 def __repr__(self): return 'wx.GBSpan'+str(self.Get())
10692 def __len__(self): return len(self.Get())
10693 def __getitem__(self, index): return self.Get()[index]
10694 def __setitem__(self, index, val):
10695 if index == 0: self.SetRowspan(val)
10696 elif index == 1: self.SetColspan(val)
10697 else: raise IndexError
10698 def __nonzero__(self): return self.Get() != (0,0)
10699 __safe_for_unpickling__ = True
10700 def __reduce__(self): return (wx.GBSpan, self.Get())
10701
10702 rowspan = property(GetRowspan, SetRowspan)
10703 colspan = property(GetColspan, SetColspan)
10704
10705
10706 class GBSpanPtr(GBSpan):
10707 def __init__(self, this):
10708 self.this = this
10709 if not hasattr(self,"thisown"): self.thisown = 0
10710 self.__class__ = GBSpan
10711 _core_.GBSpan_swigregister(GBSpanPtr)
10712
10713 class GBSizerItem(SizerItem):
10714 """
10715 The wx.GBSizerItem class is used to track the additional data about
10716 items in a `wx.GridBagSizer` such as the item's position in the grid
10717 and how many rows or columns it spans.
10718
10719 """
10720 def __repr__(self):
10721 return "<%s.%s; proxy of C++ wxGBSizerItem instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
10722 def __init__(self, *args, **kwargs):
10723 """
10724 __init__(self) -> GBSizerItem
10725
10726 Constructs an empty wx.GBSizerItem. Either a window, sizer or spacer
10727 size will need to be set, as well as a position and span before this
10728 item can be used in a Sizer.
10729
10730 You will probably never need to create a wx.GBSizerItem directly as they
10731 are created automatically when the sizer's Add method is called.
10732 """
10733 newobj = _core_.new_GBSizerItem(*args, **kwargs)
10734 self.this = newobj.this
10735 self.thisown = 1
10736 del newobj.thisown
10737 def GetPos(*args, **kwargs):
10738 """
10739 GetPos(self) -> GBPosition
10740
10741 Get the grid position of the item
10742 """
10743 return _core_.GBSizerItem_GetPos(*args, **kwargs)
10744
10745 def GetPosTuple(self): return self.GetPos().Get()
10746 def GetSpan(*args, **kwargs):
10747 """
10748 GetSpan(self) -> GBSpan
10749
10750 Get the row and column spanning of the item
10751 """
10752 return _core_.GBSizerItem_GetSpan(*args, **kwargs)
10753
10754 def GetSpanTuple(self): return self.GetSpan().Get()
10755 def SetPos(*args, **kwargs):
10756 """
10757 SetPos(self, GBPosition pos) -> bool
10758
10759 If the item is already a member of a sizer then first ensure that
10760 there is no other item that would intersect with this one at the new
10761 position, then set the new position. Returns True if the change is
10762 successful and after the next Layout() the item will be moved.
10763 """
10764 return _core_.GBSizerItem_SetPos(*args, **kwargs)
10765
10766 def SetSpan(*args, **kwargs):
10767 """
10768 SetSpan(self, GBSpan span) -> bool
10769
10770 If the item is already a member of a sizer then first ensure that
10771 there is no other item that would intersect with this one with its new
10772 spanning size, then set the new spanning. Returns True if the change
10773 is successful and after the next Layout() the item will be resized.
10774
10775 """
10776 return _core_.GBSizerItem_SetSpan(*args, **kwargs)
10777
10778 def Intersects(*args, **kwargs):
10779 """
10780 Intersects(self, GBSizerItem other) -> bool
10781
10782 Returns True if this item and the other item instersect.
10783 """
10784 return _core_.GBSizerItem_Intersects(*args, **kwargs)
10785
10786 def IntersectsPos(*args, **kwargs):
10787 """
10788 IntersectsPos(self, GBPosition pos, GBSpan span) -> bool
10789
10790 Returns True if the given pos/span would intersect with this item.
10791 """
10792 return _core_.GBSizerItem_IntersectsPos(*args, **kwargs)
10793
10794 def GetEndPos(*args, **kwargs):
10795 """
10796 GetEndPos(self) -> GBPosition
10797
10798 Get the row and column of the endpoint of this item.
10799 """
10800 return _core_.GBSizerItem_GetEndPos(*args, **kwargs)
10801
10802 def GetGBSizer(*args, **kwargs):
10803 """
10804 GetGBSizer(self) -> GridBagSizer
10805
10806 Get the sizer this item is a member of.
10807 """
10808 return _core_.GBSizerItem_GetGBSizer(*args, **kwargs)
10809
10810 def SetGBSizer(*args, **kwargs):
10811 """
10812 SetGBSizer(self, GridBagSizer sizer)
10813
10814 Set the sizer this item is a member of.
10815 """
10816 return _core_.GBSizerItem_SetGBSizer(*args, **kwargs)
10817
10818
10819 class GBSizerItemPtr(GBSizerItem):
10820 def __init__(self, this):
10821 self.this = this
10822 if not hasattr(self,"thisown"): self.thisown = 0
10823 self.__class__ = GBSizerItem
10824 _core_.GBSizerItem_swigregister(GBSizerItemPtr)
10825 DefaultSpan = cvar.DefaultSpan
10826
10827 def GBSizerItemWindow(*args, **kwargs):
10828 """
10829 GBSizerItemWindow(Window window, GBPosition pos, GBSpan span, int flag,
10830 int border, PyObject userData=None) -> GBSizerItem
10831
10832 Construct a `wx.GBSizerItem` for a window.
10833 """
10834 val = _core_.new_GBSizerItemWindow(*args, **kwargs)
10835 val.thisown = 1
10836 return val
10837
10838 def GBSizerItemSizer(*args, **kwargs):
10839 """
10840 GBSizerItemSizer(Sizer sizer, GBPosition pos, GBSpan span, int flag,
10841 int border, PyObject userData=None) -> GBSizerItem
10842
10843 Construct a `wx.GBSizerItem` for a sizer
10844 """
10845 val = _core_.new_GBSizerItemSizer(*args, **kwargs)
10846 val.thisown = 1
10847 return val
10848
10849 def GBSizerItemSpacer(*args, **kwargs):
10850 """
10851 GBSizerItemSpacer(int width, int height, GBPosition pos, GBSpan span,
10852 int flag, int border, PyObject userData=None) -> GBSizerItem
10853
10854 Construct a `wx.GBSizerItem` for a spacer.
10855 """
10856 val = _core_.new_GBSizerItemSpacer(*args, **kwargs)
10857 val.thisown = 1
10858 return val
10859
10860 class GridBagSizer(FlexGridSizer):
10861 """
10862 A `wx.Sizer` that can lay out items in a virtual grid like a
10863 `wx.FlexGridSizer` but in this case explicit positioning of the items
10864 is allowed using `wx.GBPosition`, and items can optionally span more
10865 than one row and/or column using `wx.GBSpan`. The total size of the
10866 virtual grid is determined by the largest row and column that items are
10867 positioned at, adjusted for spanning.
10868
10869 """
10870 def __repr__(self):
10871 return "<%s.%s; proxy of C++ wxGridBagSizer instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
10872 def __init__(self, *args, **kwargs):
10873 """
10874 __init__(self, int vgap=0, int hgap=0) -> GridBagSizer
10875
10876 Constructor, with optional parameters to specify the gap between the
10877 rows and columns.
10878 """
10879 newobj = _core_.new_GridBagSizer(*args, **kwargs)
10880 self.this = newobj.this
10881 self.thisown = 1
10882 del newobj.thisown
10883 self._setOORInfo(self)
10884
10885 def Add(*args, **kwargs):
10886 """
10887 Add(self, item, GBPosition pos, GBSpan span=DefaultSpan, int flag=0,
10888 int border=0, userData=None) -> wx.GBSizerItem
10889
10890 Adds an item to the sizer at the grid cell *pos*, optionally spanning
10891 more than one row or column as specified with *span*. The remaining
10892 args behave similarly to `wx.Sizer.Add`.
10893
10894 Returns True if the item was successfully placed at the given cell
10895 position, False if something was already there.
10896
10897 """
10898 return _core_.GridBagSizer_Add(*args, **kwargs)
10899
10900 def AddItem(*args, **kwargs):
10901 """
10902 Add(self, GBSizerItem item) -> wx.GBSizerItem
10903
10904 Add an item to the sizer using a `wx.GBSizerItem`. Returns True if
10905 the item was successfully placed at its given cell position, False if
10906 something was already there.
10907 """
10908 return _core_.GridBagSizer_AddItem(*args, **kwargs)
10909
10910 def GetCellSize(*args, **kwargs):
10911 """
10912 GetCellSize(self, int row, int col) -> Size
10913
10914 Get the size of the specified cell, including hgap and
10915 vgap. Only valid after a Layout.
10916 """
10917 return _core_.GridBagSizer_GetCellSize(*args, **kwargs)
10918
10919 def GetEmptyCellSize(*args, **kwargs):
10920 """
10921 GetEmptyCellSize(self) -> Size
10922
10923 Get the size used for cells in the grid with no item.
10924 """
10925 return _core_.GridBagSizer_GetEmptyCellSize(*args, **kwargs)
10926
10927 def SetEmptyCellSize(*args, **kwargs):
10928 """
10929 SetEmptyCellSize(self, Size sz)
10930
10931 Set the size used for cells in the grid with no item.
10932 """
10933 return _core_.GridBagSizer_SetEmptyCellSize(*args, **kwargs)
10934
10935 def GetItemPosition(*args):
10936 """
10937 GetItemPosition(self, item) -> GBPosition
10938
10939 Get the grid position of the specified *item* where *item* is either a
10940 window or subsizer that is a member of this sizer, or a zero-based
10941 index of an item.
10942 """
10943 return _core_.GridBagSizer_GetItemPosition(*args)
10944
10945 def SetItemPosition(*args):
10946 """
10947 SetItemPosition(self, item, GBPosition pos) -> bool
10948
10949 Set the grid position of the specified *item* where *item* is either a
10950 window or subsizer that is a member of this sizer, or a zero-based
10951 index of an item. Returns True on success. If the move is not
10952 allowed (because an item is already there) then False is returned.
10953
10954 """
10955 return _core_.GridBagSizer_SetItemPosition(*args)
10956
10957 def GetItemSpan(*args):
10958 """
10959 GetItemSpan(self, item) -> GBSpan
10960
10961 Get the row/col spanning of the specified *item* where *item* is
10962 either a window or subsizer that is a member of this sizer, or a
10963 zero-based index of an item.
10964 """
10965 return _core_.GridBagSizer_GetItemSpan(*args)
10966
10967 def SetItemSpan(*args):
10968 """
10969 SetItemSpan(self, item, GBSpan span) -> bool
10970
10971 Set the row/col spanning of the specified *item* where *item* is
10972 either a window or subsizer that is a member of this sizer, or a
10973 zero-based index of an item. Returns True on success. If the move is
10974 not allowed (because an item is already there) then False is returned.
10975 """
10976 return _core_.GridBagSizer_SetItemSpan(*args)
10977
10978 def FindItem(*args):
10979 """
10980 FindItem(self, item) -> GBSizerItem
10981
10982 Find the sizer item for the given window or subsizer, returns None if
10983 not found. (non-recursive)
10984 """
10985 return _core_.GridBagSizer_FindItem(*args)
10986
10987 def FindItemAtPosition(*args, **kwargs):
10988 """
10989 FindItemAtPosition(self, GBPosition pos) -> GBSizerItem
10990
10991 Return the sizer item for the given grid cell, or None if there is no
10992 item at that position. (non-recursive)
10993 """
10994 return _core_.GridBagSizer_FindItemAtPosition(*args, **kwargs)
10995
10996 def FindItemAtPoint(*args, **kwargs):
10997 """
10998 FindItemAtPoint(self, Point pt) -> GBSizerItem
10999
11000 Return the sizer item located at the point given in *pt*, or None if
11001 there is no item at that point. The (x,y) coordinates in pt correspond
11002 to the client coordinates of the window using the sizer for
11003 layout. (non-recursive)
11004 """
11005 return _core_.GridBagSizer_FindItemAtPoint(*args, **kwargs)
11006
11007 def CheckForIntersection(*args, **kwargs):
11008 """
11009 CheckForIntersection(self, GBSizerItem item, GBSizerItem excludeItem=None) -> bool
11010
11011 Look at all items and see if any intersect (or would overlap) the
11012 given *item*. Returns True if so, False if there would be no overlap.
11013 If an *excludeItem* is given then it will not be checked for
11014 intersection, for example it may be the item we are checking the
11015 position of.
11016
11017 """
11018 return _core_.GridBagSizer_CheckForIntersection(*args, **kwargs)
11019
11020 def CheckForIntersectionPos(*args, **kwargs):
11021 """
11022 CheckForIntersectionPos(self, GBPosition pos, GBSpan span, GBSizerItem excludeItem=None) -> bool
11023
11024 Look at all items and see if any intersect (or would overlap) the
11025 given position and span. Returns True if so, False if there would be
11026 no overlap. If an *excludeItem* is given then it will not be checked
11027 for intersection, for example it may be the item we are checking the
11028 position of.
11029 """
11030 return _core_.GridBagSizer_CheckForIntersectionPos(*args, **kwargs)
11031
11032
11033 class GridBagSizerPtr(GridBagSizer):
11034 def __init__(self, this):
11035 self.this = this
11036 if not hasattr(self,"thisown"): self.thisown = 0
11037 self.__class__ = GridBagSizer
11038 _core_.GridBagSizer_swigregister(GridBagSizerPtr)
11039
11040 #---------------------------------------------------------------------------
11041
11042 Left = _core_.Left
11043 Top = _core_.Top
11044 Right = _core_.Right
11045 Bottom = _core_.Bottom
11046 Width = _core_.Width
11047 Height = _core_.Height
11048 Centre = _core_.Centre
11049 Center = _core_.Center
11050 CentreX = _core_.CentreX
11051 CentreY = _core_.CentreY
11052 Unconstrained = _core_.Unconstrained
11053 AsIs = _core_.AsIs
11054 PercentOf = _core_.PercentOf
11055 Above = _core_.Above
11056 Below = _core_.Below
11057 LeftOf = _core_.LeftOf
11058 RightOf = _core_.RightOf
11059 SameAs = _core_.SameAs
11060 Absolute = _core_.Absolute
11061 class IndividualLayoutConstraint(Object):
11062 """
11063 Objects of this class are stored in the `wx.LayoutConstraints` class as
11064 one of eight possible constraints that a window can be involved in.
11065 You will never need to create an instance of
11066 wx.IndividualLayoutConstraint, rather you should create a
11067 `wx.LayoutConstraints` instance and use the individual contstraints
11068 that it contains.
11069 """
11070 def __init__(self): raise RuntimeError, "No constructor defined"
11071 def __repr__(self):
11072 return "<%s.%s; proxy of C++ wxIndividualLayoutConstraint instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
11073 def Set(*args, **kwargs):
11074 """
11075 Set(self, int rel, Window otherW, int otherE, int val=0, int marg=wxLAYOUT_DEFAULT_MARGIN)
11076
11077 Sets the properties of the constraint. Normally called by one of the
11078 convenience functions such as Above, RightOf, SameAs.
11079 """
11080 return _core_.IndividualLayoutConstraint_Set(*args, **kwargs)
11081
11082 def LeftOf(*args, **kwargs):
11083 """
11084 LeftOf(self, Window sibling, int marg=0)
11085
11086 Constrains this edge to be to the left of the given window, with an
11087 optional margin. Implicitly, this is relative to the left edge of the
11088 other window.
11089 """
11090 return _core_.IndividualLayoutConstraint_LeftOf(*args, **kwargs)
11091
11092 def RightOf(*args, **kwargs):
11093 """
11094 RightOf(self, Window sibling, int marg=0)
11095
11096 Constrains this edge to be to the right of the given window, with an
11097 optional margin. Implicitly, this is relative to the right edge of the
11098 other window.
11099 """
11100 return _core_.IndividualLayoutConstraint_RightOf(*args, **kwargs)
11101
11102 def Above(*args, **kwargs):
11103 """
11104 Above(self, Window sibling, int marg=0)
11105
11106 Constrains this edge to be above the given window, with an optional
11107 margin. Implicitly, this is relative to the top edge of the other
11108 window.
11109 """
11110 return _core_.IndividualLayoutConstraint_Above(*args, **kwargs)
11111
11112 def Below(*args, **kwargs):
11113 """
11114 Below(self, Window sibling, int marg=0)
11115
11116 Constrains this edge to be below the given window, with an optional
11117 margin. Implicitly, this is relative to the bottom edge of the other
11118 window.
11119 """
11120 return _core_.IndividualLayoutConstraint_Below(*args, **kwargs)
11121
11122 def SameAs(*args, **kwargs):
11123 """
11124 SameAs(self, Window otherW, int edge, int marg=0)
11125
11126 Constrains this edge or dimension to be to the same as the edge of the
11127 given window, with an optional margin.
11128 """
11129 return _core_.IndividualLayoutConstraint_SameAs(*args, **kwargs)
11130
11131 def PercentOf(*args, **kwargs):
11132 """
11133 PercentOf(self, Window otherW, int wh, int per)
11134
11135 Constrains this edge or dimension to be to a percentage of the given
11136 window, with an optional margin.
11137 """
11138 return _core_.IndividualLayoutConstraint_PercentOf(*args, **kwargs)
11139
11140 def Absolute(*args, **kwargs):
11141 """
11142 Absolute(self, int val)
11143
11144 Constrains this edge or dimension to be the given absolute value.
11145 """
11146 return _core_.IndividualLayoutConstraint_Absolute(*args, **kwargs)
11147
11148 def Unconstrained(*args, **kwargs):
11149 """
11150 Unconstrained(self)
11151
11152 Sets this edge or dimension to be unconstrained, that is, dependent on
11153 other edges and dimensions from which this value can be deduced.
11154 """
11155 return _core_.IndividualLayoutConstraint_Unconstrained(*args, **kwargs)
11156
11157 def AsIs(*args, **kwargs):
11158 """
11159 AsIs(self)
11160
11161 Sets this edge or constraint to be whatever the window's value is at
11162 the moment. If either of the width and height constraints are *as is*,
11163 the window will not be resized, but moved instead. This is important
11164 when considering panel items which are intended to have a default
11165 size, such as a button, which may take its size from the size of the
11166 button label.
11167 """
11168 return _core_.IndividualLayoutConstraint_AsIs(*args, **kwargs)
11169
11170 def GetOtherWindow(*args, **kwargs):
11171 """GetOtherWindow(self) -> Window"""
11172 return _core_.IndividualLayoutConstraint_GetOtherWindow(*args, **kwargs)
11173
11174 def GetMyEdge(*args, **kwargs):
11175 """GetMyEdge(self) -> int"""
11176 return _core_.IndividualLayoutConstraint_GetMyEdge(*args, **kwargs)
11177
11178 def SetEdge(*args, **kwargs):
11179 """SetEdge(self, int which)"""
11180 return _core_.IndividualLayoutConstraint_SetEdge(*args, **kwargs)
11181
11182 def SetValue(*args, **kwargs):
11183 """SetValue(self, int v)"""
11184 return _core_.IndividualLayoutConstraint_SetValue(*args, **kwargs)
11185
11186 def GetMargin(*args, **kwargs):
11187 """GetMargin(self) -> int"""
11188 return _core_.IndividualLayoutConstraint_GetMargin(*args, **kwargs)
11189
11190 def SetMargin(*args, **kwargs):
11191 """SetMargin(self, int m)"""
11192 return _core_.IndividualLayoutConstraint_SetMargin(*args, **kwargs)
11193
11194 def GetValue(*args, **kwargs):
11195 """GetValue(self) -> int"""
11196 return _core_.IndividualLayoutConstraint_GetValue(*args, **kwargs)
11197
11198 def GetPercent(*args, **kwargs):
11199 """GetPercent(self) -> int"""
11200 return _core_.IndividualLayoutConstraint_GetPercent(*args, **kwargs)
11201
11202 def GetOtherEdge(*args, **kwargs):
11203 """GetOtherEdge(self) -> int"""
11204 return _core_.IndividualLayoutConstraint_GetOtherEdge(*args, **kwargs)
11205
11206 def GetDone(*args, **kwargs):
11207 """GetDone(self) -> bool"""
11208 return _core_.IndividualLayoutConstraint_GetDone(*args, **kwargs)
11209
11210 def SetDone(*args, **kwargs):
11211 """SetDone(self, bool d)"""
11212 return _core_.IndividualLayoutConstraint_SetDone(*args, **kwargs)
11213
11214 def GetRelationship(*args, **kwargs):
11215 """GetRelationship(self) -> int"""
11216 return _core_.IndividualLayoutConstraint_GetRelationship(*args, **kwargs)
11217
11218 def SetRelationship(*args, **kwargs):
11219 """SetRelationship(self, int r)"""
11220 return _core_.IndividualLayoutConstraint_SetRelationship(*args, **kwargs)
11221
11222 def ResetIfWin(*args, **kwargs):
11223 """
11224 ResetIfWin(self, Window otherW) -> bool
11225
11226 Reset constraint if it mentions otherWin
11227 """
11228 return _core_.IndividualLayoutConstraint_ResetIfWin(*args, **kwargs)
11229
11230 def SatisfyConstraint(*args, **kwargs):
11231 """
11232 SatisfyConstraint(self, LayoutConstraints constraints, Window win) -> bool
11233
11234 Try to satisfy constraint
11235 """
11236 return _core_.IndividualLayoutConstraint_SatisfyConstraint(*args, **kwargs)
11237
11238 def GetEdge(*args, **kwargs):
11239 """
11240 GetEdge(self, int which, Window thisWin, Window other) -> int
11241
11242 Get the value of this edge or dimension, or if this
11243 is not determinable, -1.
11244 """
11245 return _core_.IndividualLayoutConstraint_GetEdge(*args, **kwargs)
11246
11247
11248 class IndividualLayoutConstraintPtr(IndividualLayoutConstraint):
11249 def __init__(self, this):
11250 self.this = this
11251 if not hasattr(self,"thisown"): self.thisown = 0
11252 self.__class__ = IndividualLayoutConstraint
11253 _core_.IndividualLayoutConstraint_swigregister(IndividualLayoutConstraintPtr)
11254
11255 class LayoutConstraints(Object):
11256 """
11257 **Note:** constraints are now deprecated and you should use sizers
11258 instead.
11259
11260 Objects of this class can be associated with a window to define its
11261 layout constraints, with respect to siblings or its parent.
11262
11263 The class consists of the following eight constraints of class
11264 wx.IndividualLayoutConstraint, some or all of which should be accessed
11265 directly to set the appropriate constraints.
11266
11267 * left: represents the left hand edge of the window
11268 * right: represents the right hand edge of the window
11269 * top: represents the top edge of the window
11270 * bottom: represents the bottom edge of the window
11271 * width: represents the width of the window
11272 * height: represents the height of the window
11273 * centreX: represents the horizontal centre point of the window
11274 * centreY: represents the vertical centre point of the window
11275
11276 Most constraints are initially set to have the relationship
11277 wxUnconstrained, which means that their values should be calculated by
11278 looking at known constraints. The exceptions are width and height,
11279 which are set to wxAsIs to ensure that if the user does not specify a
11280 constraint, the existing width and height will be used, to be
11281 compatible with panel items which often have take a default size. If
11282 the constraint is ``wx.AsIs``, the dimension will not be changed.
11283
11284 :see: `wx.IndividualLayoutConstraint`, `wx.Window.SetConstraints`
11285
11286 """
11287 def __repr__(self):
11288 return "<%s.%s; proxy of C++ wxLayoutConstraints instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
11289 left = property(_core_.LayoutConstraints_left_get)
11290 top = property(_core_.LayoutConstraints_top_get)
11291 right = property(_core_.LayoutConstraints_right_get)
11292 bottom = property(_core_.LayoutConstraints_bottom_get)
11293 width = property(_core_.LayoutConstraints_width_get)
11294 height = property(_core_.LayoutConstraints_height_get)
11295 centreX = property(_core_.LayoutConstraints_centreX_get)
11296 centreY = property(_core_.LayoutConstraints_centreY_get)
11297 def __init__(self, *args, **kwargs):
11298 """__init__(self) -> LayoutConstraints"""
11299 newobj = _core_.new_LayoutConstraints(*args, **kwargs)
11300 self.this = newobj.this
11301 self.thisown = 1
11302 del newobj.thisown
11303 def SatisfyConstraints(*args, **kwargs):
11304 """SatisfyConstraints(Window win) -> (areSatisfied, noChanges)"""
11305 return _core_.LayoutConstraints_SatisfyConstraints(*args, **kwargs)
11306
11307 def AreSatisfied(*args, **kwargs):
11308 """AreSatisfied(self) -> bool"""
11309 return _core_.LayoutConstraints_AreSatisfied(*args, **kwargs)
11310
11311
11312 class LayoutConstraintsPtr(LayoutConstraints):
11313 def __init__(self, this):
11314 self.this = this
11315 if not hasattr(self,"thisown"): self.thisown = 0
11316 self.__class__ = LayoutConstraints
11317 _core_.LayoutConstraints_swigregister(LayoutConstraintsPtr)
11318
11319 #----------------------------------------------------------------------------
11320
11321 # Use Python's bool constants if available, make some if not
11322 try:
11323 True
11324 except NameError:
11325 __builtins__.True = 1==1
11326 __builtins__.False = 1==0
11327 def bool(value): return not not value
11328 __builtins__.bool = bool
11329
11330
11331
11332 # workarounds for bad wxRTTI names
11333 __wxPyPtrTypeMap['wxGauge95'] = 'wxGauge'
11334 __wxPyPtrTypeMap['wxSlider95'] = 'wxSlider'
11335 __wxPyPtrTypeMap['wxStatusBar95'] = 'wxStatusBar'
11336
11337
11338 #----------------------------------------------------------------------------
11339 # Load version numbers from __version__... Ensure that major and minor
11340 # versions are the same for both wxPython and wxWidgets.
11341
11342 from __version__ import *
11343 __version__ = VERSION_STRING
11344
11345 assert MAJOR_VERSION == _core_.MAJOR_VERSION, "wxPython/wxWidgets version mismatch"
11346 assert MINOR_VERSION == _core_.MINOR_VERSION, "wxPython/wxWidgets version mismatch"
11347 if RELEASE_VERSION != _core_.RELEASE_VERSION:
11348 import warnings
11349 warnings.warn("wxPython/wxWidgets release number mismatch")
11350
11351 #----------------------------------------------------------------------------
11352
11353 # Set wxPython's default string<-->unicode conversion encoding from
11354 # the locale, but only if Python's default hasn't been changed. (We
11355 # assume that if the user has customized it already then that is the
11356 # encoding we need to use as well.)
11357 #
11358 # The encoding selected here is used when string or unicode objects
11359 # need to be converted in order to pass them to wxWidgets. Please be
11360 # aware that the default encoding within the same locale may be
11361 # slightly different on different platforms. For example, please see
11362 # http://www.alanwood.net/demos/charsetdiffs.html for differences
11363 # between the common latin/roman encodings.
11364
11365 default = _sys.getdefaultencoding()
11366 if default == 'ascii':
11367 import locale
11368 import codecs
11369 try:
11370 default = locale.getdefaultlocale()[1]
11371 codecs.lookup(default)
11372 except (ValueError, LookupError, TypeError):
11373 default = _sys.getdefaultencoding()
11374 del locale
11375 del codecs
11376 if default:
11377 wx.SetDefaultPyEncoding(default)
11378 del default
11379
11380 #----------------------------------------------------------------------------
11381
11382 class PyDeadObjectError(AttributeError):
11383 pass
11384
11385 class _wxPyDeadObject(object):
11386 """
11387 Instances of wx objects that are OOR capable will have their __class__
11388 changed to this class when the C++ object is deleted. This should help
11389 prevent crashes due to referencing a bogus C++ pointer.
11390 """
11391 reprStr = "wxPython wrapper for DELETED %s object! (The C++ object no longer exists.)"
11392 attrStr = "The C++ part of the %s object has been deleted, attribute access no longer allowed."
11393
11394 def __repr__(self):
11395 if not hasattr(self, "_name"):
11396 self._name = "[unknown]"
11397 return self.reprStr % self._name
11398
11399 def __getattr__(self, *args):
11400 if not hasattr(self, "_name"):
11401 self._name = "[unknown]"
11402 raise PyDeadObjectError(self.attrStr % self._name)
11403
11404 def __nonzero__(self):
11405 return 0
11406
11407
11408
11409 class PyUnbornObjectError(AttributeError):
11410 pass
11411
11412 class _wxPyUnbornObject(object):
11413 """
11414 Some stock objects are created when the wx._core module is
11415 imported, but their C++ instance is not created until the wx.App
11416 object is created and initialized. These object instances will
11417 temporarily have their __class__ changed to this class so an
11418 exception will be raised if they are used before the C++ instance
11419 is ready.
11420 """
11421
11422 reprStr = "wxPython wrapper for UNBORN object! (The C++ object is not initialized yet.)"
11423 attrStr = "The C++ part of this object has not been initialized, attribute access not allowed."
11424
11425 def __repr__(self):
11426 #if not hasattr(self, "_name"):
11427 # self._name = "[unknown]"
11428 return self.reprStr #% self._name
11429
11430 def __getattr__(self, *args):
11431 #if not hasattr(self, "_name"):
11432 # self._name = "[unknown]"
11433 raise PyUnbornObjectError(self.attrStr) # % self._name )
11434
11435 def __nonzero__(self):
11436 return 0
11437
11438
11439 #----------------------------------------------------------------------------
11440
11441 def CallAfter(callable, *args, **kw):
11442 """
11443 Call the specified function after the current and pending event
11444 handlers have been completed. This is also good for making GUI
11445 method calls from non-GUI threads. Any extra positional or
11446 keyword args are passed on to the callable when it is called.
11447
11448 :see: `wx.FutureCall`
11449 """
11450 app = wx.GetApp()
11451 assert app is not None, 'No wx.App created yet'
11452
11453 if not hasattr(app, "_CallAfterId"):
11454 app._CallAfterId = wx.NewEventType()
11455 app.Connect(-1, -1, app._CallAfterId,
11456 lambda event: event.callable(*event.args, **event.kw) )
11457 evt = wx.PyEvent()
11458 evt.SetEventType(app._CallAfterId)
11459 evt.callable = callable
11460 evt.args = args
11461 evt.kw = kw
11462 wx.PostEvent(app, evt)
11463
11464 #----------------------------------------------------------------------------
11465
11466
11467 class FutureCall:
11468 """
11469 A convenience class for `wx.Timer`, that calls the given callable
11470 object once after the given amount of milliseconds, passing any
11471 positional or keyword args. The return value of the callable is
11472 availbale after it has been run with the `GetResult` method.
11473
11474 If you don't need to get the return value or restart the timer
11475 then there is no need to hold a reference to this object. It will
11476 hold a reference to itself while the timer is running (the timer
11477 has a reference to self.Notify) but the cycle will be broken when
11478 the timer completes, automatically cleaning up the wx.FutureCall
11479 object.
11480
11481 :see: `wx.CallAfter`
11482 """
11483 def __init__(self, millis, callable, *args, **kwargs):
11484 self.millis = millis
11485 self.callable = callable
11486 self.SetArgs(*args, **kwargs)
11487 self.runCount = 0
11488 self.running = False
11489 self.hasRun = False
11490 self.result = None
11491 self.timer = None
11492 self.Start()
11493
11494 def __del__(self):
11495 self.Stop()
11496
11497
11498 def Start(self, millis=None, *args, **kwargs):
11499 """
11500 (Re)start the timer
11501 """
11502 self.hasRun = False
11503 if millis is not None:
11504 self.millis = millis
11505 if args or kwargs:
11506 self.SetArgs(*args, **kwargs)
11507 self.Stop()
11508 self.timer = wx.PyTimer(self.Notify)
11509 self.timer.Start(self.millis, wx.TIMER_ONE_SHOT)
11510 self.running = True
11511 Restart = Start
11512
11513
11514 def Stop(self):
11515 """
11516 Stop and destroy the timer.
11517 """
11518 if self.timer is not None:
11519 self.timer.Stop()
11520 self.timer = None
11521
11522
11523 def GetInterval(self):
11524 if self.timer is not None:
11525 return self.timer.GetInterval()
11526 else:
11527 return 0
11528
11529
11530 def IsRunning(self):
11531 return self.timer is not None and self.timer.IsRunning()
11532
11533
11534 def SetArgs(self, *args, **kwargs):
11535 """
11536 (Re)set the args passed to the callable object. This is
11537 useful in conjunction with Restart if you want to schedule a
11538 new call to the same callable object but with different
11539 parameters.
11540 """
11541 self.args = args
11542 self.kwargs = kwargs
11543
11544
11545 def HasRun(self):
11546 return self.hasRun
11547
11548 def GetResult(self):
11549 return self.result
11550
11551 def Notify(self):
11552 """
11553 The timer has expired so call the callable.
11554 """
11555 if self.callable and getattr(self.callable, 'im_self', True):
11556 self.runCount += 1
11557 self.running = False
11558 self.result = self.callable(*self.args, **self.kwargs)
11559 self.hasRun = True
11560 if not self.running:
11561 # if it wasn't restarted, then cleanup
11562 wx.CallAfter(self.Stop)
11563
11564
11565
11566 #----------------------------------------------------------------------------
11567 # Control which items in this module should be documented by epydoc.
11568 # We allow only classes and functions, which will help reduce the size
11569 # of the docs by filtering out the zillions of constants, EVT objects,
11570 # and etc that don't make much sense by themselves, but are instead
11571 # documented (or will be) as part of the classes/functions/methods
11572 # where they should be used.
11573
11574 class __DocFilter:
11575 """
11576 A filter for epydoc that only allows non-Ptr classes and
11577 fucntions, in order to reduce the clutter in the API docs.
11578 """
11579 def __init__(self, globals):
11580 self._globals = globals
11581
11582 def __call__(self, name):
11583 import types
11584 obj = self._globals.get(name, None)
11585 if type(obj) not in [type, types.ClassType, types.FunctionType, types.BuiltinFunctionType]:
11586 return False
11587 if name.startswith('_') or name.endswith('Ptr') or name.startswith('EVT'):
11588 return False
11589 return True
11590
11591 #----------------------------------------------------------------------------
11592 #----------------------------------------------------------------------------
11593
11594 # Import other modules in this package that should show up in the
11595 # "core" wx namespace
11596 from _gdi import *
11597 from _windows import *
11598 from _controls import *
11599 from _misc import *
11600
11601
11602 # Fixup the stock objects since they can't be used yet. (They will be
11603 # restored in wx.PyApp.OnInit.)
11604 _core_._wxPyFixStockObjects()
11605
11606 #----------------------------------------------------------------------------
11607 #----------------------------------------------------------------------------
11608
11609