]> git.saurik.com Git - wxWidgets.git/blob - wxPython/src/msw/_core.py
1d1772290160c5365e1e144e99079b66ddf3a4ea
[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 TAB_TRAVERSAL = _core_.TAB_TRAVERSAL
89 WANTS_CHARS = _core_.WANTS_CHARS
90 POPUP_WINDOW = _core_.POPUP_WINDOW
91 CENTER_FRAME = _core_.CENTER_FRAME
92 CENTRE_ON_SCREEN = _core_.CENTRE_ON_SCREEN
93 CENTER_ON_SCREEN = _core_.CENTER_ON_SCREEN
94 ED_CLIENT_MARGIN = _core_.ED_CLIENT_MARGIN
95 ED_BUTTONS_BOTTOM = _core_.ED_BUTTONS_BOTTOM
96 ED_BUTTONS_RIGHT = _core_.ED_BUTTONS_RIGHT
97 ED_STATIC_LINE = _core_.ED_STATIC_LINE
98 EXT_DIALOG_STYLE = _core_.EXT_DIALOG_STYLE
99 CLIP_CHILDREN = _core_.CLIP_CHILDREN
100 CLIP_SIBLINGS = _core_.CLIP_SIBLINGS
101 ALWAYS_SHOW_SB = _core_.ALWAYS_SHOW_SB
102 RETAINED = _core_.RETAINED
103 BACKINGSTORE = _core_.BACKINGSTORE
104 COLOURED = _core_.COLOURED
105 FIXED_LENGTH = _core_.FIXED_LENGTH
106 LB_NEEDED_SB = _core_.LB_NEEDED_SB
107 LB_ALWAYS_SB = _core_.LB_ALWAYS_SB
108 LB_SORT = _core_.LB_SORT
109 LB_SINGLE = _core_.LB_SINGLE
110 LB_MULTIPLE = _core_.LB_MULTIPLE
111 LB_EXTENDED = _core_.LB_EXTENDED
112 LB_OWNERDRAW = _core_.LB_OWNERDRAW
113 LB_HSCROLL = _core_.LB_HSCROLL
114 PROCESS_ENTER = _core_.PROCESS_ENTER
115 PASSWORD = _core_.PASSWORD
116 CB_SIMPLE = _core_.CB_SIMPLE
117 CB_DROPDOWN = _core_.CB_DROPDOWN
118 CB_SORT = _core_.CB_SORT
119 CB_READONLY = _core_.CB_READONLY
120 RA_HORIZONTAL = _core_.RA_HORIZONTAL
121 RA_VERTICAL = _core_.RA_VERTICAL
122 RA_SPECIFY_ROWS = _core_.RA_SPECIFY_ROWS
123 RA_SPECIFY_COLS = _core_.RA_SPECIFY_COLS
124 RB_GROUP = _core_.RB_GROUP
125 RB_SINGLE = _core_.RB_SINGLE
126 SL_HORIZONTAL = _core_.SL_HORIZONTAL
127 SL_VERTICAL = _core_.SL_VERTICAL
128 SL_AUTOTICKS = _core_.SL_AUTOTICKS
129 SL_LABELS = _core_.SL_LABELS
130 SL_LEFT = _core_.SL_LEFT
131 SL_TOP = _core_.SL_TOP
132 SL_RIGHT = _core_.SL_RIGHT
133 SL_BOTTOM = _core_.SL_BOTTOM
134 SL_BOTH = _core_.SL_BOTH
135 SL_SELRANGE = _core_.SL_SELRANGE
136 SB_HORIZONTAL = _core_.SB_HORIZONTAL
137 SB_VERTICAL = _core_.SB_VERTICAL
138 ST_SIZEGRIP = _core_.ST_SIZEGRIP
139 ST_NO_AUTORESIZE = _core_.ST_NO_AUTORESIZE
140 FLOOD_SURFACE = _core_.FLOOD_SURFACE
141 FLOOD_BORDER = _core_.FLOOD_BORDER
142 ODDEVEN_RULE = _core_.ODDEVEN_RULE
143 WINDING_RULE = _core_.WINDING_RULE
144 TOOL_TOP = _core_.TOOL_TOP
145 TOOL_BOTTOM = _core_.TOOL_BOTTOM
146 TOOL_LEFT = _core_.TOOL_LEFT
147 TOOL_RIGHT = _core_.TOOL_RIGHT
148 OK = _core_.OK
149 YES_NO = _core_.YES_NO
150 CANCEL = _core_.CANCEL
151 YES = _core_.YES
152 NO = _core_.NO
153 NO_DEFAULT = _core_.NO_DEFAULT
154 YES_DEFAULT = _core_.YES_DEFAULT
155 ICON_EXCLAMATION = _core_.ICON_EXCLAMATION
156 ICON_HAND = _core_.ICON_HAND
157 ICON_QUESTION = _core_.ICON_QUESTION
158 ICON_INFORMATION = _core_.ICON_INFORMATION
159 ICON_STOP = _core_.ICON_STOP
160 ICON_ASTERISK = _core_.ICON_ASTERISK
161 ICON_MASK = _core_.ICON_MASK
162 ICON_WARNING = _core_.ICON_WARNING
163 ICON_ERROR = _core_.ICON_ERROR
164 FORWARD = _core_.FORWARD
165 BACKWARD = _core_.BACKWARD
166 RESET = _core_.RESET
167 HELP = _core_.HELP
168 MORE = _core_.MORE
169 SETUP = _core_.SETUP
170 SIZE_AUTO_WIDTH = _core_.SIZE_AUTO_WIDTH
171 SIZE_AUTO_HEIGHT = _core_.SIZE_AUTO_HEIGHT
172 SIZE_AUTO = _core_.SIZE_AUTO
173 SIZE_USE_EXISTING = _core_.SIZE_USE_EXISTING
174 SIZE_ALLOW_MINUS_ONE = _core_.SIZE_ALLOW_MINUS_ONE
175 PORTRAIT = _core_.PORTRAIT
176 LANDSCAPE = _core_.LANDSCAPE
177 PRINT_QUALITY_HIGH = _core_.PRINT_QUALITY_HIGH
178 PRINT_QUALITY_MEDIUM = _core_.PRINT_QUALITY_MEDIUM
179 PRINT_QUALITY_LOW = _core_.PRINT_QUALITY_LOW
180 PRINT_QUALITY_DRAFT = _core_.PRINT_QUALITY_DRAFT
181 ID_ANY = _core_.ID_ANY
182 ID_SEPARATOR = _core_.ID_SEPARATOR
183 ID_LOWEST = _core_.ID_LOWEST
184 ID_OPEN = _core_.ID_OPEN
185 ID_CLOSE = _core_.ID_CLOSE
186 ID_NEW = _core_.ID_NEW
187 ID_SAVE = _core_.ID_SAVE
188 ID_SAVEAS = _core_.ID_SAVEAS
189 ID_REVERT = _core_.ID_REVERT
190 ID_EXIT = _core_.ID_EXIT
191 ID_UNDO = _core_.ID_UNDO
192 ID_REDO = _core_.ID_REDO
193 ID_HELP = _core_.ID_HELP
194 ID_PRINT = _core_.ID_PRINT
195 ID_PRINT_SETUP = _core_.ID_PRINT_SETUP
196 ID_PREVIEW = _core_.ID_PREVIEW
197 ID_ABOUT = _core_.ID_ABOUT
198 ID_HELP_CONTENTS = _core_.ID_HELP_CONTENTS
199 ID_HELP_COMMANDS = _core_.ID_HELP_COMMANDS
200 ID_HELP_PROCEDURES = _core_.ID_HELP_PROCEDURES
201 ID_HELP_CONTEXT = _core_.ID_HELP_CONTEXT
202 ID_CLOSE_ALL = _core_.ID_CLOSE_ALL
203 ID_PREFERENCES = _core_.ID_PREFERENCES
204 ID_CUT = _core_.ID_CUT
205 ID_COPY = _core_.ID_COPY
206 ID_PASTE = _core_.ID_PASTE
207 ID_CLEAR = _core_.ID_CLEAR
208 ID_FIND = _core_.ID_FIND
209 ID_DUPLICATE = _core_.ID_DUPLICATE
210 ID_SELECTALL = _core_.ID_SELECTALL
211 ID_DELETE = _core_.ID_DELETE
212 ID_REPLACE = _core_.ID_REPLACE
213 ID_REPLACE_ALL = _core_.ID_REPLACE_ALL
214 ID_PROPERTIES = _core_.ID_PROPERTIES
215 ID_VIEW_DETAILS = _core_.ID_VIEW_DETAILS
216 ID_VIEW_LARGEICONS = _core_.ID_VIEW_LARGEICONS
217 ID_VIEW_SMALLICONS = _core_.ID_VIEW_SMALLICONS
218 ID_VIEW_LIST = _core_.ID_VIEW_LIST
219 ID_VIEW_SORTDATE = _core_.ID_VIEW_SORTDATE
220 ID_VIEW_SORTNAME = _core_.ID_VIEW_SORTNAME
221 ID_VIEW_SORTSIZE = _core_.ID_VIEW_SORTSIZE
222 ID_VIEW_SORTTYPE = _core_.ID_VIEW_SORTTYPE
223 ID_FILE1 = _core_.ID_FILE1
224 ID_FILE2 = _core_.ID_FILE2
225 ID_FILE3 = _core_.ID_FILE3
226 ID_FILE4 = _core_.ID_FILE4
227 ID_FILE5 = _core_.ID_FILE5
228 ID_FILE6 = _core_.ID_FILE6
229 ID_FILE7 = _core_.ID_FILE7
230 ID_FILE8 = _core_.ID_FILE8
231 ID_FILE9 = _core_.ID_FILE9
232 ID_OK = _core_.ID_OK
233 ID_CANCEL = _core_.ID_CANCEL
234 ID_APPLY = _core_.ID_APPLY
235 ID_YES = _core_.ID_YES
236 ID_NO = _core_.ID_NO
237 ID_STATIC = _core_.ID_STATIC
238 ID_FORWARD = _core_.ID_FORWARD
239 ID_BACKWARD = _core_.ID_BACKWARD
240 ID_DEFAULT = _core_.ID_DEFAULT
241 ID_MORE = _core_.ID_MORE
242 ID_SETUP = _core_.ID_SETUP
243 ID_RESET = _core_.ID_RESET
244 ID_CONTEXT_HELP = _core_.ID_CONTEXT_HELP
245 ID_YESTOALL = _core_.ID_YESTOALL
246 ID_NOTOALL = _core_.ID_NOTOALL
247 ID_ABORT = _core_.ID_ABORT
248 ID_RETRY = _core_.ID_RETRY
249 ID_IGNORE = _core_.ID_IGNORE
250 ID_ADD = _core_.ID_ADD
251 ID_REMOVE = _core_.ID_REMOVE
252 ID_UP = _core_.ID_UP
253 ID_DOWN = _core_.ID_DOWN
254 ID_HOME = _core_.ID_HOME
255 ID_REFRESH = _core_.ID_REFRESH
256 ID_STOP = _core_.ID_STOP
257 ID_INDEX = _core_.ID_INDEX
258 ID_BOLD = _core_.ID_BOLD
259 ID_ITALIC = _core_.ID_ITALIC
260 ID_JUSTIFY_CENTER = _core_.ID_JUSTIFY_CENTER
261 ID_JUSTIFY_FILL = _core_.ID_JUSTIFY_FILL
262 ID_JUSTIFY_RIGHT = _core_.ID_JUSTIFY_RIGHT
263 ID_JUSTIFY_LEFT = _core_.ID_JUSTIFY_LEFT
264 ID_UNDERLINE = _core_.ID_UNDERLINE
265 ID_INDENT = _core_.ID_INDENT
266 ID_UNINDENT = _core_.ID_UNINDENT
267 ID_ZOOM_100 = _core_.ID_ZOOM_100
268 ID_ZOOM_FIT = _core_.ID_ZOOM_FIT
269 ID_ZOOM_IN = _core_.ID_ZOOM_IN
270 ID_ZOOM_OUT = _core_.ID_ZOOM_OUT
271 ID_UNDELETE = _core_.ID_UNDELETE
272 ID_REVERT_TO_SAVED = _core_.ID_REVERT_TO_SAVED
273 ID_HIGHEST = _core_.ID_HIGHEST
274 OPEN = _core_.OPEN
275 SAVE = _core_.SAVE
276 HIDE_READONLY = _core_.HIDE_READONLY
277 OVERWRITE_PROMPT = _core_.OVERWRITE_PROMPT
278 FILE_MUST_EXIST = _core_.FILE_MUST_EXIST
279 MULTIPLE = _core_.MULTIPLE
280 CHANGE_DIR = _core_.CHANGE_DIR
281 ACCEL_ALT = _core_.ACCEL_ALT
282 ACCEL_CTRL = _core_.ACCEL_CTRL
283 ACCEL_SHIFT = _core_.ACCEL_SHIFT
284 ACCEL_NORMAL = _core_.ACCEL_NORMAL
285 PD_AUTO_HIDE = _core_.PD_AUTO_HIDE
286 PD_APP_MODAL = _core_.PD_APP_MODAL
287 PD_CAN_ABORT = _core_.PD_CAN_ABORT
288 PD_ELAPSED_TIME = _core_.PD_ELAPSED_TIME
289 PD_ESTIMATED_TIME = _core_.PD_ESTIMATED_TIME
290 PD_REMAINING_TIME = _core_.PD_REMAINING_TIME
291 PD_SMOOTH = _core_.PD_SMOOTH
292 PD_CAN_SKIP = _core_.PD_CAN_SKIP
293 DD_NEW_DIR_BUTTON = _core_.DD_NEW_DIR_BUTTON
294 DD_DEFAULT_STYLE = _core_.DD_DEFAULT_STYLE
295 MENU_TEAROFF = _core_.MENU_TEAROFF
296 MB_DOCKABLE = _core_.MB_DOCKABLE
297 NO_FULL_REPAINT_ON_RESIZE = _core_.NO_FULL_REPAINT_ON_RESIZE
298 FULL_REPAINT_ON_RESIZE = _core_.FULL_REPAINT_ON_RESIZE
299 LI_HORIZONTAL = _core_.LI_HORIZONTAL
300 LI_VERTICAL = _core_.LI_VERTICAL
301 WS_EX_VALIDATE_RECURSIVELY = _core_.WS_EX_VALIDATE_RECURSIVELY
302 WS_EX_BLOCK_EVENTS = _core_.WS_EX_BLOCK_EVENTS
303 WS_EX_TRANSIENT = _core_.WS_EX_TRANSIENT
304 WS_EX_THEMED_BACKGROUND = _core_.WS_EX_THEMED_BACKGROUND
305 WS_EX_PROCESS_IDLE = _core_.WS_EX_PROCESS_IDLE
306 WS_EX_PROCESS_UI_UPDATES = _core_.WS_EX_PROCESS_UI_UPDATES
307 MM_TEXT = _core_.MM_TEXT
308 MM_LOMETRIC = _core_.MM_LOMETRIC
309 MM_HIMETRIC = _core_.MM_HIMETRIC
310 MM_LOENGLISH = _core_.MM_LOENGLISH
311 MM_HIENGLISH = _core_.MM_HIENGLISH
312 MM_TWIPS = _core_.MM_TWIPS
313 MM_ISOTROPIC = _core_.MM_ISOTROPIC
314 MM_ANISOTROPIC = _core_.MM_ANISOTROPIC
315 MM_POINTS = _core_.MM_POINTS
316 MM_METRIC = _core_.MM_METRIC
317 CENTRE = _core_.CENTRE
318 CENTER = _core_.CENTER
319 HORIZONTAL = _core_.HORIZONTAL
320 VERTICAL = _core_.VERTICAL
321 BOTH = _core_.BOTH
322 LEFT = _core_.LEFT
323 RIGHT = _core_.RIGHT
324 UP = _core_.UP
325 DOWN = _core_.DOWN
326 TOP = _core_.TOP
327 BOTTOM = _core_.BOTTOM
328 NORTH = _core_.NORTH
329 SOUTH = _core_.SOUTH
330 WEST = _core_.WEST
331 EAST = _core_.EAST
332 ALL = _core_.ALL
333 ALIGN_NOT = _core_.ALIGN_NOT
334 ALIGN_CENTER_HORIZONTAL = _core_.ALIGN_CENTER_HORIZONTAL
335 ALIGN_CENTRE_HORIZONTAL = _core_.ALIGN_CENTRE_HORIZONTAL
336 ALIGN_LEFT = _core_.ALIGN_LEFT
337 ALIGN_TOP = _core_.ALIGN_TOP
338 ALIGN_RIGHT = _core_.ALIGN_RIGHT
339 ALIGN_BOTTOM = _core_.ALIGN_BOTTOM
340 ALIGN_CENTER_VERTICAL = _core_.ALIGN_CENTER_VERTICAL
341 ALIGN_CENTRE_VERTICAL = _core_.ALIGN_CENTRE_VERTICAL
342 ALIGN_CENTER = _core_.ALIGN_CENTER
343 ALIGN_CENTRE = _core_.ALIGN_CENTRE
344 ALIGN_MASK = _core_.ALIGN_MASK
345 STRETCH_NOT = _core_.STRETCH_NOT
346 SHRINK = _core_.SHRINK
347 GROW = _core_.GROW
348 EXPAND = _core_.EXPAND
349 SHAPED = _core_.SHAPED
350 FIXED_MINSIZE = _core_.FIXED_MINSIZE
351 TILE = _core_.TILE
352 ADJUST_MINSIZE = _core_.ADJUST_MINSIZE
353 BORDER_DEFAULT = _core_.BORDER_DEFAULT
354 BORDER_NONE = _core_.BORDER_NONE
355 BORDER_STATIC = _core_.BORDER_STATIC
356 BORDER_SIMPLE = _core_.BORDER_SIMPLE
357 BORDER_RAISED = _core_.BORDER_RAISED
358 BORDER_SUNKEN = _core_.BORDER_SUNKEN
359 BORDER_DOUBLE = _core_.BORDER_DOUBLE
360 BORDER_MASK = _core_.BORDER_MASK
361 BG_STYLE_SYSTEM = _core_.BG_STYLE_SYSTEM
362 BG_STYLE_COLOUR = _core_.BG_STYLE_COLOUR
363 BG_STYLE_CUSTOM = _core_.BG_STYLE_CUSTOM
364 DEFAULT = _core_.DEFAULT
365 DECORATIVE = _core_.DECORATIVE
366 ROMAN = _core_.ROMAN
367 SCRIPT = _core_.SCRIPT
368 SWISS = _core_.SWISS
369 MODERN = _core_.MODERN
370 TELETYPE = _core_.TELETYPE
371 VARIABLE = _core_.VARIABLE
372 FIXED = _core_.FIXED
373 NORMAL = _core_.NORMAL
374 LIGHT = _core_.LIGHT
375 BOLD = _core_.BOLD
376 ITALIC = _core_.ITALIC
377 SLANT = _core_.SLANT
378 SOLID = _core_.SOLID
379 DOT = _core_.DOT
380 LONG_DASH = _core_.LONG_DASH
381 SHORT_DASH = _core_.SHORT_DASH
382 DOT_DASH = _core_.DOT_DASH
383 USER_DASH = _core_.USER_DASH
384 TRANSPARENT = _core_.TRANSPARENT
385 STIPPLE = _core_.STIPPLE
386 BDIAGONAL_HATCH = _core_.BDIAGONAL_HATCH
387 CROSSDIAG_HATCH = _core_.CROSSDIAG_HATCH
388 FDIAGONAL_HATCH = _core_.FDIAGONAL_HATCH
389 CROSS_HATCH = _core_.CROSS_HATCH
390 HORIZONTAL_HATCH = _core_.HORIZONTAL_HATCH
391 VERTICAL_HATCH = _core_.VERTICAL_HATCH
392 JOIN_BEVEL = _core_.JOIN_BEVEL
393 JOIN_MITER = _core_.JOIN_MITER
394 JOIN_ROUND = _core_.JOIN_ROUND
395 CAP_ROUND = _core_.CAP_ROUND
396 CAP_PROJECTING = _core_.CAP_PROJECTING
397 CAP_BUTT = _core_.CAP_BUTT
398 CLEAR = _core_.CLEAR
399 XOR = _core_.XOR
400 INVERT = _core_.INVERT
401 OR_REVERSE = _core_.OR_REVERSE
402 AND_REVERSE = _core_.AND_REVERSE
403 COPY = _core_.COPY
404 AND = _core_.AND
405 AND_INVERT = _core_.AND_INVERT
406 NO_OP = _core_.NO_OP
407 NOR = _core_.NOR
408 EQUIV = _core_.EQUIV
409 SRC_INVERT = _core_.SRC_INVERT
410 OR_INVERT = _core_.OR_INVERT
411 NAND = _core_.NAND
412 OR = _core_.OR
413 SET = _core_.SET
414 WXK_BACK = _core_.WXK_BACK
415 WXK_TAB = _core_.WXK_TAB
416 WXK_RETURN = _core_.WXK_RETURN
417 WXK_ESCAPE = _core_.WXK_ESCAPE
418 WXK_SPACE = _core_.WXK_SPACE
419 WXK_DELETE = _core_.WXK_DELETE
420 WXK_START = _core_.WXK_START
421 WXK_LBUTTON = _core_.WXK_LBUTTON
422 WXK_RBUTTON = _core_.WXK_RBUTTON
423 WXK_CANCEL = _core_.WXK_CANCEL
424 WXK_MBUTTON = _core_.WXK_MBUTTON
425 WXK_CLEAR = _core_.WXK_CLEAR
426 WXK_SHIFT = _core_.WXK_SHIFT
427 WXK_ALT = _core_.WXK_ALT
428 WXK_CONTROL = _core_.WXK_CONTROL
429 WXK_MENU = _core_.WXK_MENU
430 WXK_PAUSE = _core_.WXK_PAUSE
431 WXK_CAPITAL = _core_.WXK_CAPITAL
432 WXK_PRIOR = _core_.WXK_PRIOR
433 WXK_NEXT = _core_.WXK_NEXT
434 WXK_END = _core_.WXK_END
435 WXK_HOME = _core_.WXK_HOME
436 WXK_LEFT = _core_.WXK_LEFT
437 WXK_UP = _core_.WXK_UP
438 WXK_RIGHT = _core_.WXK_RIGHT
439 WXK_DOWN = _core_.WXK_DOWN
440 WXK_SELECT = _core_.WXK_SELECT
441 WXK_PRINT = _core_.WXK_PRINT
442 WXK_EXECUTE = _core_.WXK_EXECUTE
443 WXK_SNAPSHOT = _core_.WXK_SNAPSHOT
444 WXK_INSERT = _core_.WXK_INSERT
445 WXK_HELP = _core_.WXK_HELP
446 WXK_NUMPAD0 = _core_.WXK_NUMPAD0
447 WXK_NUMPAD1 = _core_.WXK_NUMPAD1
448 WXK_NUMPAD2 = _core_.WXK_NUMPAD2
449 WXK_NUMPAD3 = _core_.WXK_NUMPAD3
450 WXK_NUMPAD4 = _core_.WXK_NUMPAD4
451 WXK_NUMPAD5 = _core_.WXK_NUMPAD5
452 WXK_NUMPAD6 = _core_.WXK_NUMPAD6
453 WXK_NUMPAD7 = _core_.WXK_NUMPAD7
454 WXK_NUMPAD8 = _core_.WXK_NUMPAD8
455 WXK_NUMPAD9 = _core_.WXK_NUMPAD9
456 WXK_MULTIPLY = _core_.WXK_MULTIPLY
457 WXK_ADD = _core_.WXK_ADD
458 WXK_SEPARATOR = _core_.WXK_SEPARATOR
459 WXK_SUBTRACT = _core_.WXK_SUBTRACT
460 WXK_DECIMAL = _core_.WXK_DECIMAL
461 WXK_DIVIDE = _core_.WXK_DIVIDE
462 WXK_F1 = _core_.WXK_F1
463 WXK_F2 = _core_.WXK_F2
464 WXK_F3 = _core_.WXK_F3
465 WXK_F4 = _core_.WXK_F4
466 WXK_F5 = _core_.WXK_F5
467 WXK_F6 = _core_.WXK_F6
468 WXK_F7 = _core_.WXK_F7
469 WXK_F8 = _core_.WXK_F8
470 WXK_F9 = _core_.WXK_F9
471 WXK_F10 = _core_.WXK_F10
472 WXK_F11 = _core_.WXK_F11
473 WXK_F12 = _core_.WXK_F12
474 WXK_F13 = _core_.WXK_F13
475 WXK_F14 = _core_.WXK_F14
476 WXK_F15 = _core_.WXK_F15
477 WXK_F16 = _core_.WXK_F16
478 WXK_F17 = _core_.WXK_F17
479 WXK_F18 = _core_.WXK_F18
480 WXK_F19 = _core_.WXK_F19
481 WXK_F20 = _core_.WXK_F20
482 WXK_F21 = _core_.WXK_F21
483 WXK_F22 = _core_.WXK_F22
484 WXK_F23 = _core_.WXK_F23
485 WXK_F24 = _core_.WXK_F24
486 WXK_NUMLOCK = _core_.WXK_NUMLOCK
487 WXK_SCROLL = _core_.WXK_SCROLL
488 WXK_PAGEUP = _core_.WXK_PAGEUP
489 WXK_PAGEDOWN = _core_.WXK_PAGEDOWN
490 WXK_NUMPAD_SPACE = _core_.WXK_NUMPAD_SPACE
491 WXK_NUMPAD_TAB = _core_.WXK_NUMPAD_TAB
492 WXK_NUMPAD_ENTER = _core_.WXK_NUMPAD_ENTER
493 WXK_NUMPAD_F1 = _core_.WXK_NUMPAD_F1
494 WXK_NUMPAD_F2 = _core_.WXK_NUMPAD_F2
495 WXK_NUMPAD_F3 = _core_.WXK_NUMPAD_F3
496 WXK_NUMPAD_F4 = _core_.WXK_NUMPAD_F4
497 WXK_NUMPAD_HOME = _core_.WXK_NUMPAD_HOME
498 WXK_NUMPAD_LEFT = _core_.WXK_NUMPAD_LEFT
499 WXK_NUMPAD_UP = _core_.WXK_NUMPAD_UP
500 WXK_NUMPAD_RIGHT = _core_.WXK_NUMPAD_RIGHT
501 WXK_NUMPAD_DOWN = _core_.WXK_NUMPAD_DOWN
502 WXK_NUMPAD_PRIOR = _core_.WXK_NUMPAD_PRIOR
503 WXK_NUMPAD_PAGEUP = _core_.WXK_NUMPAD_PAGEUP
504 WXK_NUMPAD_NEXT = _core_.WXK_NUMPAD_NEXT
505 WXK_NUMPAD_PAGEDOWN = _core_.WXK_NUMPAD_PAGEDOWN
506 WXK_NUMPAD_END = _core_.WXK_NUMPAD_END
507 WXK_NUMPAD_BEGIN = _core_.WXK_NUMPAD_BEGIN
508 WXK_NUMPAD_INSERT = _core_.WXK_NUMPAD_INSERT
509 WXK_NUMPAD_DELETE = _core_.WXK_NUMPAD_DELETE
510 WXK_NUMPAD_EQUAL = _core_.WXK_NUMPAD_EQUAL
511 WXK_NUMPAD_MULTIPLY = _core_.WXK_NUMPAD_MULTIPLY
512 WXK_NUMPAD_ADD = _core_.WXK_NUMPAD_ADD
513 WXK_NUMPAD_SEPARATOR = _core_.WXK_NUMPAD_SEPARATOR
514 WXK_NUMPAD_SUBTRACT = _core_.WXK_NUMPAD_SUBTRACT
515 WXK_NUMPAD_DECIMAL = _core_.WXK_NUMPAD_DECIMAL
516 WXK_NUMPAD_DIVIDE = _core_.WXK_NUMPAD_DIVIDE
517 WXK_WINDOWS_LEFT = _core_.WXK_WINDOWS_LEFT
518 WXK_WINDOWS_RIGHT = _core_.WXK_WINDOWS_RIGHT
519 WXK_WINDOWS_MENU = _core_.WXK_WINDOWS_MENU
520 PAPER_NONE = _core_.PAPER_NONE
521 PAPER_LETTER = _core_.PAPER_LETTER
522 PAPER_LEGAL = _core_.PAPER_LEGAL
523 PAPER_A4 = _core_.PAPER_A4
524 PAPER_CSHEET = _core_.PAPER_CSHEET
525 PAPER_DSHEET = _core_.PAPER_DSHEET
526 PAPER_ESHEET = _core_.PAPER_ESHEET
527 PAPER_LETTERSMALL = _core_.PAPER_LETTERSMALL
528 PAPER_TABLOID = _core_.PAPER_TABLOID
529 PAPER_LEDGER = _core_.PAPER_LEDGER
530 PAPER_STATEMENT = _core_.PAPER_STATEMENT
531 PAPER_EXECUTIVE = _core_.PAPER_EXECUTIVE
532 PAPER_A3 = _core_.PAPER_A3
533 PAPER_A4SMALL = _core_.PAPER_A4SMALL
534 PAPER_A5 = _core_.PAPER_A5
535 PAPER_B4 = _core_.PAPER_B4
536 PAPER_B5 = _core_.PAPER_B5
537 PAPER_FOLIO = _core_.PAPER_FOLIO
538 PAPER_QUARTO = _core_.PAPER_QUARTO
539 PAPER_10X14 = _core_.PAPER_10X14
540 PAPER_11X17 = _core_.PAPER_11X17
541 PAPER_NOTE = _core_.PAPER_NOTE
542 PAPER_ENV_9 = _core_.PAPER_ENV_9
543 PAPER_ENV_10 = _core_.PAPER_ENV_10
544 PAPER_ENV_11 = _core_.PAPER_ENV_11
545 PAPER_ENV_12 = _core_.PAPER_ENV_12
546 PAPER_ENV_14 = _core_.PAPER_ENV_14
547 PAPER_ENV_DL = _core_.PAPER_ENV_DL
548 PAPER_ENV_C5 = _core_.PAPER_ENV_C5
549 PAPER_ENV_C3 = _core_.PAPER_ENV_C3
550 PAPER_ENV_C4 = _core_.PAPER_ENV_C4
551 PAPER_ENV_C6 = _core_.PAPER_ENV_C6
552 PAPER_ENV_C65 = _core_.PAPER_ENV_C65
553 PAPER_ENV_B4 = _core_.PAPER_ENV_B4
554 PAPER_ENV_B5 = _core_.PAPER_ENV_B5
555 PAPER_ENV_B6 = _core_.PAPER_ENV_B6
556 PAPER_ENV_ITALY = _core_.PAPER_ENV_ITALY
557 PAPER_ENV_MONARCH = _core_.PAPER_ENV_MONARCH
558 PAPER_ENV_PERSONAL = _core_.PAPER_ENV_PERSONAL
559 PAPER_FANFOLD_US = _core_.PAPER_FANFOLD_US
560 PAPER_FANFOLD_STD_GERMAN = _core_.PAPER_FANFOLD_STD_GERMAN
561 PAPER_FANFOLD_LGL_GERMAN = _core_.PAPER_FANFOLD_LGL_GERMAN
562 PAPER_ISO_B4 = _core_.PAPER_ISO_B4
563 PAPER_JAPANESE_POSTCARD = _core_.PAPER_JAPANESE_POSTCARD
564 PAPER_9X11 = _core_.PAPER_9X11
565 PAPER_10X11 = _core_.PAPER_10X11
566 PAPER_15X11 = _core_.PAPER_15X11
567 PAPER_ENV_INVITE = _core_.PAPER_ENV_INVITE
568 PAPER_LETTER_EXTRA = _core_.PAPER_LETTER_EXTRA
569 PAPER_LEGAL_EXTRA = _core_.PAPER_LEGAL_EXTRA
570 PAPER_TABLOID_EXTRA = _core_.PAPER_TABLOID_EXTRA
571 PAPER_A4_EXTRA = _core_.PAPER_A4_EXTRA
572 PAPER_LETTER_TRANSVERSE = _core_.PAPER_LETTER_TRANSVERSE
573 PAPER_A4_TRANSVERSE = _core_.PAPER_A4_TRANSVERSE
574 PAPER_LETTER_EXTRA_TRANSVERSE = _core_.PAPER_LETTER_EXTRA_TRANSVERSE
575 PAPER_A_PLUS = _core_.PAPER_A_PLUS
576 PAPER_B_PLUS = _core_.PAPER_B_PLUS
577 PAPER_LETTER_PLUS = _core_.PAPER_LETTER_PLUS
578 PAPER_A4_PLUS = _core_.PAPER_A4_PLUS
579 PAPER_A5_TRANSVERSE = _core_.PAPER_A5_TRANSVERSE
580 PAPER_B5_TRANSVERSE = _core_.PAPER_B5_TRANSVERSE
581 PAPER_A3_EXTRA = _core_.PAPER_A3_EXTRA
582 PAPER_A5_EXTRA = _core_.PAPER_A5_EXTRA
583 PAPER_B5_EXTRA = _core_.PAPER_B5_EXTRA
584 PAPER_A2 = _core_.PAPER_A2
585 PAPER_A3_TRANSVERSE = _core_.PAPER_A3_TRANSVERSE
586 PAPER_A3_EXTRA_TRANSVERSE = _core_.PAPER_A3_EXTRA_TRANSVERSE
587 DUPLEX_SIMPLEX = _core_.DUPLEX_SIMPLEX
588 DUPLEX_HORIZONTAL = _core_.DUPLEX_HORIZONTAL
589 DUPLEX_VERTICAL = _core_.DUPLEX_VERTICAL
590 ITEM_SEPARATOR = _core_.ITEM_SEPARATOR
591 ITEM_NORMAL = _core_.ITEM_NORMAL
592 ITEM_CHECK = _core_.ITEM_CHECK
593 ITEM_RADIO = _core_.ITEM_RADIO
594 ITEM_MAX = _core_.ITEM_MAX
595 HT_NOWHERE = _core_.HT_NOWHERE
596 HT_SCROLLBAR_FIRST = _core_.HT_SCROLLBAR_FIRST
597 HT_SCROLLBAR_ARROW_LINE_1 = _core_.HT_SCROLLBAR_ARROW_LINE_1
598 HT_SCROLLBAR_ARROW_LINE_2 = _core_.HT_SCROLLBAR_ARROW_LINE_2
599 HT_SCROLLBAR_ARROW_PAGE_1 = _core_.HT_SCROLLBAR_ARROW_PAGE_1
600 HT_SCROLLBAR_ARROW_PAGE_2 = _core_.HT_SCROLLBAR_ARROW_PAGE_2
601 HT_SCROLLBAR_THUMB = _core_.HT_SCROLLBAR_THUMB
602 HT_SCROLLBAR_BAR_1 = _core_.HT_SCROLLBAR_BAR_1
603 HT_SCROLLBAR_BAR_2 = _core_.HT_SCROLLBAR_BAR_2
604 HT_SCROLLBAR_LAST = _core_.HT_SCROLLBAR_LAST
605 HT_WINDOW_OUTSIDE = _core_.HT_WINDOW_OUTSIDE
606 HT_WINDOW_INSIDE = _core_.HT_WINDOW_INSIDE
607 HT_WINDOW_VERT_SCROLLBAR = _core_.HT_WINDOW_VERT_SCROLLBAR
608 HT_WINDOW_HORZ_SCROLLBAR = _core_.HT_WINDOW_HORZ_SCROLLBAR
609 HT_WINDOW_CORNER = _core_.HT_WINDOW_CORNER
610 HT_MAX = _core_.HT_MAX
611 MOD_NONE = _core_.MOD_NONE
612 MOD_ALT = _core_.MOD_ALT
613 MOD_CONTROL = _core_.MOD_CONTROL
614 MOD_SHIFT = _core_.MOD_SHIFT
615 MOD_WIN = _core_.MOD_WIN
616 UPDATE_UI_NONE = _core_.UPDATE_UI_NONE
617 UPDATE_UI_RECURSE = _core_.UPDATE_UI_RECURSE
618 UPDATE_UI_FROMIDLE = _core_.UPDATE_UI_FROMIDLE
619 #---------------------------------------------------------------------------
620
621 class Object(object):
622 """
623 The base class for most wx objects, although in wxPython not
624 much functionality is needed nor exposed.
625 """
626 def __init__(self): raise RuntimeError, "No constructor defined"
627 def __repr__(self):
628 return "<%s.%s; proxy of C++ wxObject instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
629 def GetClassName(*args, **kwargs):
630 """
631 GetClassName(self) -> String
632
633 Returns the class name of the C++ class using wxRTTI.
634 """
635 return _core_.Object_GetClassName(*args, **kwargs)
636
637 def Destroy(*args, **kwargs):
638 """
639 Destroy(self)
640
641 Deletes the C++ object this Python object is a proxy for.
642 """
643 return _core_.Object_Destroy(*args, **kwargs)
644
645
646 class ObjectPtr(Object):
647 def __init__(self, this):
648 self.this = this
649 if not hasattr(self,"thisown"): self.thisown = 0
650 self.__class__ = Object
651 _core_.Object_swigregister(ObjectPtr)
652 _wxPySetDictionary = _core_._wxPySetDictionary
653
654 _wxPyFixStockObjects = _core_._wxPyFixStockObjects
655
656 cvar = _core_.cvar
657 EmptyString = cvar.EmptyString
658
659 #---------------------------------------------------------------------------
660
661 BITMAP_TYPE_INVALID = _core_.BITMAP_TYPE_INVALID
662 BITMAP_TYPE_BMP = _core_.BITMAP_TYPE_BMP
663 BITMAP_TYPE_ICO = _core_.BITMAP_TYPE_ICO
664 BITMAP_TYPE_CUR = _core_.BITMAP_TYPE_CUR
665 BITMAP_TYPE_XBM = _core_.BITMAP_TYPE_XBM
666 BITMAP_TYPE_XBM_DATA = _core_.BITMAP_TYPE_XBM_DATA
667 BITMAP_TYPE_XPM = _core_.BITMAP_TYPE_XPM
668 BITMAP_TYPE_XPM_DATA = _core_.BITMAP_TYPE_XPM_DATA
669 BITMAP_TYPE_TIF = _core_.BITMAP_TYPE_TIF
670 BITMAP_TYPE_GIF = _core_.BITMAP_TYPE_GIF
671 BITMAP_TYPE_PNG = _core_.BITMAP_TYPE_PNG
672 BITMAP_TYPE_JPEG = _core_.BITMAP_TYPE_JPEG
673 BITMAP_TYPE_PNM = _core_.BITMAP_TYPE_PNM
674 BITMAP_TYPE_PCX = _core_.BITMAP_TYPE_PCX
675 BITMAP_TYPE_PICT = _core_.BITMAP_TYPE_PICT
676 BITMAP_TYPE_ICON = _core_.BITMAP_TYPE_ICON
677 BITMAP_TYPE_ANI = _core_.BITMAP_TYPE_ANI
678 BITMAP_TYPE_IFF = _core_.BITMAP_TYPE_IFF
679 BITMAP_TYPE_MACCURSOR = _core_.BITMAP_TYPE_MACCURSOR
680 BITMAP_TYPE_ANY = _core_.BITMAP_TYPE_ANY
681 CURSOR_NONE = _core_.CURSOR_NONE
682 CURSOR_ARROW = _core_.CURSOR_ARROW
683 CURSOR_RIGHT_ARROW = _core_.CURSOR_RIGHT_ARROW
684 CURSOR_BULLSEYE = _core_.CURSOR_BULLSEYE
685 CURSOR_CHAR = _core_.CURSOR_CHAR
686 CURSOR_CROSS = _core_.CURSOR_CROSS
687 CURSOR_HAND = _core_.CURSOR_HAND
688 CURSOR_IBEAM = _core_.CURSOR_IBEAM
689 CURSOR_LEFT_BUTTON = _core_.CURSOR_LEFT_BUTTON
690 CURSOR_MAGNIFIER = _core_.CURSOR_MAGNIFIER
691 CURSOR_MIDDLE_BUTTON = _core_.CURSOR_MIDDLE_BUTTON
692 CURSOR_NO_ENTRY = _core_.CURSOR_NO_ENTRY
693 CURSOR_PAINT_BRUSH = _core_.CURSOR_PAINT_BRUSH
694 CURSOR_PENCIL = _core_.CURSOR_PENCIL
695 CURSOR_POINT_LEFT = _core_.CURSOR_POINT_LEFT
696 CURSOR_POINT_RIGHT = _core_.CURSOR_POINT_RIGHT
697 CURSOR_QUESTION_ARROW = _core_.CURSOR_QUESTION_ARROW
698 CURSOR_RIGHT_BUTTON = _core_.CURSOR_RIGHT_BUTTON
699 CURSOR_SIZENESW = _core_.CURSOR_SIZENESW
700 CURSOR_SIZENS = _core_.CURSOR_SIZENS
701 CURSOR_SIZENWSE = _core_.CURSOR_SIZENWSE
702 CURSOR_SIZEWE = _core_.CURSOR_SIZEWE
703 CURSOR_SIZING = _core_.CURSOR_SIZING
704 CURSOR_SPRAYCAN = _core_.CURSOR_SPRAYCAN
705 CURSOR_WAIT = _core_.CURSOR_WAIT
706 CURSOR_WATCH = _core_.CURSOR_WATCH
707 CURSOR_BLANK = _core_.CURSOR_BLANK
708 CURSOR_DEFAULT = _core_.CURSOR_DEFAULT
709 CURSOR_COPY_ARROW = _core_.CURSOR_COPY_ARROW
710 CURSOR_ARROWWAIT = _core_.CURSOR_ARROWWAIT
711 CURSOR_MAX = _core_.CURSOR_MAX
712 #---------------------------------------------------------------------------
713
714 class Size(object):
715 """
716 wx.Size is a useful data structure used to represent the size of
717 something. It simply contians integer width and height
718 proprtites. In most places in wxPython where a wx.Size is
719 expected a (width, height) tuple can be used instead.
720 """
721 def __repr__(self):
722 return "<%s.%s; proxy of C++ wxSize instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
723 width = property(_core_.Size_width_get, _core_.Size_width_set)
724 height = property(_core_.Size_height_get, _core_.Size_height_set)
725 x = width; y = height
726 def __init__(self, *args, **kwargs):
727 """
728 __init__(self, int w=0, int h=0) -> Size
729
730 Creates a size object.
731 """
732 newobj = _core_.new_Size(*args, **kwargs)
733 self.this = newobj.this
734 self.thisown = 1
735 del newobj.thisown
736 def __del__(self, destroy=_core_.delete_Size):
737 """__del__(self)"""
738 try:
739 if self.thisown: destroy(self)
740 except: pass
741
742 def __eq__(*args, **kwargs):
743 """
744 __eq__(self, Size sz) -> bool
745
746 Test for equality of wx.Size objects.
747 """
748 return _core_.Size___eq__(*args, **kwargs)
749
750 def __ne__(*args, **kwargs):
751 """
752 __ne__(self, Size sz) -> bool
753
754 Test for inequality.
755 """
756 return _core_.Size___ne__(*args, **kwargs)
757
758 def __add__(*args, **kwargs):
759 """
760 __add__(self, Size sz) -> Size
761
762 Add sz's proprties to this and return the result.
763 """
764 return _core_.Size___add__(*args, **kwargs)
765
766 def __sub__(*args, **kwargs):
767 """
768 __sub__(self, Size sz) -> Size
769
770 Subtract sz's properties from this and return the result.
771 """
772 return _core_.Size___sub__(*args, **kwargs)
773
774 def IncTo(*args, **kwargs):
775 """
776 IncTo(self, Size sz)
777
778 Increments this object so that both of its dimensions are not less
779 than the corresponding dimensions of the size.
780 """
781 return _core_.Size_IncTo(*args, **kwargs)
782
783 def DecTo(*args, **kwargs):
784 """
785 DecTo(self, Size sz)
786
787 Decrements this object so that both of its dimensions are not greater
788 than the corresponding dimensions of the size.
789 """
790 return _core_.Size_DecTo(*args, **kwargs)
791
792 def Set(*args, **kwargs):
793 """
794 Set(self, int w, int h)
795
796 Set both width and height.
797 """
798 return _core_.Size_Set(*args, **kwargs)
799
800 def SetWidth(*args, **kwargs):
801 """SetWidth(self, int w)"""
802 return _core_.Size_SetWidth(*args, **kwargs)
803
804 def SetHeight(*args, **kwargs):
805 """SetHeight(self, int h)"""
806 return _core_.Size_SetHeight(*args, **kwargs)
807
808 def GetWidth(*args, **kwargs):
809 """GetWidth(self) -> int"""
810 return _core_.Size_GetWidth(*args, **kwargs)
811
812 def GetHeight(*args, **kwargs):
813 """GetHeight(self) -> int"""
814 return _core_.Size_GetHeight(*args, **kwargs)
815
816 def IsFullySpecified(*args, **kwargs):
817 """
818 IsFullySpecified(self) -> bool
819
820 Returns True if both components of the size are non-default values.
821 """
822 return _core_.Size_IsFullySpecified(*args, **kwargs)
823
824 def SetDefaults(*args, **kwargs):
825 """
826 SetDefaults(self, Size size)
827
828 Combine this size with the other one replacing the default components
829 of this object (i.e. equal to -1) with those of the other.
830 """
831 return _core_.Size_SetDefaults(*args, **kwargs)
832
833 def Get(*args, **kwargs):
834 """
835 Get() -> (width,height)
836
837 Returns the width and height properties as a tuple.
838 """
839 return _core_.Size_Get(*args, **kwargs)
840
841 asTuple = wx._deprecated(Get, "asTuple is deprecated, use `Get` instead")
842 def __str__(self): return str(self.Get())
843 def __repr__(self): return 'wx.Size'+str(self.Get())
844 def __len__(self): return len(self.Get())
845 def __getitem__(self, index): return self.Get()[index]
846 def __setitem__(self, index, val):
847 if index == 0: self.width = val
848 elif index == 1: self.height = val
849 else: raise IndexError
850 def __nonzero__(self): return self.Get() != (0,0)
851 __safe_for_unpickling__ = True
852 def __reduce__(self): return (wx.Size, self.Get())
853
854
855 class SizePtr(Size):
856 def __init__(self, this):
857 self.this = this
858 if not hasattr(self,"thisown"): self.thisown = 0
859 self.__class__ = Size
860 _core_.Size_swigregister(SizePtr)
861
862 #---------------------------------------------------------------------------
863
864 class RealPoint(object):
865 """
866 A data structure for representing a point or position with floating
867 point x and y properties. In wxPython most places that expect a
868 wx.RealPoint can also accept a (x,y) tuple.
869 """
870 def __repr__(self):
871 return "<%s.%s; proxy of C++ wxRealPoint instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
872 x = property(_core_.RealPoint_x_get, _core_.RealPoint_x_set)
873 y = property(_core_.RealPoint_y_get, _core_.RealPoint_y_set)
874 def __init__(self, *args, **kwargs):
875 """
876 __init__(self, double x=0.0, double y=0.0) -> RealPoint
877
878 Create a wx.RealPoint object
879 """
880 newobj = _core_.new_RealPoint(*args, **kwargs)
881 self.this = newobj.this
882 self.thisown = 1
883 del newobj.thisown
884 def __del__(self, destroy=_core_.delete_RealPoint):
885 """__del__(self)"""
886 try:
887 if self.thisown: destroy(self)
888 except: pass
889
890 def __eq__(*args, **kwargs):
891 """
892 __eq__(self, RealPoint pt) -> bool
893
894 Test for equality of wx.RealPoint objects.
895 """
896 return _core_.RealPoint___eq__(*args, **kwargs)
897
898 def __ne__(*args, **kwargs):
899 """
900 __ne__(self, RealPoint pt) -> bool
901
902 Test for inequality of wx.RealPoint objects.
903 """
904 return _core_.RealPoint___ne__(*args, **kwargs)
905
906 def __add__(*args, **kwargs):
907 """
908 __add__(self, RealPoint pt) -> RealPoint
909
910 Add pt's proprties to this and return the result.
911 """
912 return _core_.RealPoint___add__(*args, **kwargs)
913
914 def __sub__(*args, **kwargs):
915 """
916 __sub__(self, RealPoint pt) -> RealPoint
917
918 Subtract pt's proprties from this and return the result
919 """
920 return _core_.RealPoint___sub__(*args, **kwargs)
921
922 def Set(*args, **kwargs):
923 """
924 Set(self, double x, double y)
925
926 Set both the x and y properties
927 """
928 return _core_.RealPoint_Set(*args, **kwargs)
929
930 def Get(*args, **kwargs):
931 """
932 Get() -> (x,y)
933
934 Return the x and y properties as a tuple.
935 """
936 return _core_.RealPoint_Get(*args, **kwargs)
937
938 asTuple = wx._deprecated(Get, "asTuple is deprecated, use `Get` instead")
939 def __str__(self): return str(self.Get())
940 def __repr__(self): return 'wx.RealPoint'+str(self.Get())
941 def __len__(self): return len(self.Get())
942 def __getitem__(self, index): return self.Get()[index]
943 def __setitem__(self, index, val):
944 if index == 0: self.x = val
945 elif index == 1: self.y = val
946 else: raise IndexError
947 def __nonzero__(self): return self.Get() != (0.0, 0.0)
948 __safe_for_unpickling__ = True
949 def __reduce__(self): return (wx.RealPoint, self.Get())
950
951
952 class RealPointPtr(RealPoint):
953 def __init__(self, this):
954 self.this = this
955 if not hasattr(self,"thisown"): self.thisown = 0
956 self.__class__ = RealPoint
957 _core_.RealPoint_swigregister(RealPointPtr)
958
959 #---------------------------------------------------------------------------
960
961 class Point(object):
962 """
963 A data structure for representing a point or position with integer x
964 and y properties. Most places in wxPython that expect a wx.Point can
965 also accept a (x,y) tuple.
966 """
967 def __repr__(self):
968 return "<%s.%s; proxy of C++ wxPoint instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
969 x = property(_core_.Point_x_get, _core_.Point_x_set)
970 y = property(_core_.Point_y_get, _core_.Point_y_set)
971 def __init__(self, *args, **kwargs):
972 """
973 __init__(self, int x=0, int y=0) -> Point
974
975 Create a wx.Point object
976 """
977 newobj = _core_.new_Point(*args, **kwargs)
978 self.this = newobj.this
979 self.thisown = 1
980 del newobj.thisown
981 def __del__(self, destroy=_core_.delete_Point):
982 """__del__(self)"""
983 try:
984 if self.thisown: destroy(self)
985 except: pass
986
987 def __eq__(*args, **kwargs):
988 """
989 __eq__(self, Point pt) -> bool
990
991 Test for equality of wx.Point objects.
992 """
993 return _core_.Point___eq__(*args, **kwargs)
994
995 def __ne__(*args, **kwargs):
996 """
997 __ne__(self, Point pt) -> bool
998
999 Test for inequality of wx.Point objects.
1000 """
1001 return _core_.Point___ne__(*args, **kwargs)
1002
1003 def __add__(*args, **kwargs):
1004 """
1005 __add__(self, Point pt) -> Point
1006
1007 Add pt's proprties to this and return the result.
1008 """
1009 return _core_.Point___add__(*args, **kwargs)
1010
1011 def __sub__(*args, **kwargs):
1012 """
1013 __sub__(self, Point pt) -> Point
1014
1015 Subtract pt's proprties from this and return the result
1016 """
1017 return _core_.Point___sub__(*args, **kwargs)
1018
1019 def __iadd__(*args, **kwargs):
1020 """
1021 __iadd__(self, Point pt) -> Point
1022
1023 Add pt to this object.
1024 """
1025 return _core_.Point___iadd__(*args, **kwargs)
1026
1027 def __isub__(*args, **kwargs):
1028 """
1029 __isub__(self, Point pt) -> Point
1030
1031 Subtract pt from this object.
1032 """
1033 return _core_.Point___isub__(*args, **kwargs)
1034
1035 def Set(*args, **kwargs):
1036 """
1037 Set(self, long x, long y)
1038
1039 Set both the x and y properties
1040 """
1041 return _core_.Point_Set(*args, **kwargs)
1042
1043 def Get(*args, **kwargs):
1044 """
1045 Get() -> (x,y)
1046
1047 Return the x and y properties as a tuple.
1048 """
1049 return _core_.Point_Get(*args, **kwargs)
1050
1051 asTuple = wx._deprecated(Get, "asTuple is deprecated, use `Get` instead")
1052 def __str__(self): return str(self.Get())
1053 def __repr__(self): return 'wx.Point'+str(self.Get())
1054 def __len__(self): return len(self.Get())
1055 def __getitem__(self, index): return self.Get()[index]
1056 def __setitem__(self, index, val):
1057 if index == 0: self.x = val
1058 elif index == 1: self.y = val
1059 else: raise IndexError
1060 def __nonzero__(self): return self.Get() != (0,0)
1061 __safe_for_unpickling__ = True
1062 def __reduce__(self): return (wx.Point, self.Get())
1063
1064
1065 class PointPtr(Point):
1066 def __init__(self, this):
1067 self.this = this
1068 if not hasattr(self,"thisown"): self.thisown = 0
1069 self.__class__ = Point
1070 _core_.Point_swigregister(PointPtr)
1071
1072 #---------------------------------------------------------------------------
1073
1074 class Rect(object):
1075 """
1076 A class for representing and manipulating rectangles. It has x, y,
1077 width and height properties. In wxPython most palces that expect a
1078 wx.Rect can also accept a (x,y,width,height) tuple.
1079 """
1080 def __repr__(self):
1081 return "<%s.%s; proxy of C++ wxRect instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
1082 def __init__(self, *args, **kwargs):
1083 """
1084 __init__(self, int x=0, int y=0, int width=0, int height=0) -> Rect
1085
1086 Create a new Rect object.
1087 """
1088 newobj = _core_.new_Rect(*args, **kwargs)
1089 self.this = newobj.this
1090 self.thisown = 1
1091 del newobj.thisown
1092 def __del__(self, destroy=_core_.delete_Rect):
1093 """__del__(self)"""
1094 try:
1095 if self.thisown: destroy(self)
1096 except: pass
1097
1098 def GetX(*args, **kwargs):
1099 """GetX(self) -> int"""
1100 return _core_.Rect_GetX(*args, **kwargs)
1101
1102 def SetX(*args, **kwargs):
1103 """SetX(self, int x)"""
1104 return _core_.Rect_SetX(*args, **kwargs)
1105
1106 def GetY(*args, **kwargs):
1107 """GetY(self) -> int"""
1108 return _core_.Rect_GetY(*args, **kwargs)
1109
1110 def SetY(*args, **kwargs):
1111 """SetY(self, int y)"""
1112 return _core_.Rect_SetY(*args, **kwargs)
1113
1114 def GetWidth(*args, **kwargs):
1115 """GetWidth(self) -> int"""
1116 return _core_.Rect_GetWidth(*args, **kwargs)
1117
1118 def SetWidth(*args, **kwargs):
1119 """SetWidth(self, int w)"""
1120 return _core_.Rect_SetWidth(*args, **kwargs)
1121
1122 def GetHeight(*args, **kwargs):
1123 """GetHeight(self) -> int"""
1124 return _core_.Rect_GetHeight(*args, **kwargs)
1125
1126 def SetHeight(*args, **kwargs):
1127 """SetHeight(self, int h)"""
1128 return _core_.Rect_SetHeight(*args, **kwargs)
1129
1130 def GetPosition(*args, **kwargs):
1131 """GetPosition(self) -> Point"""
1132 return _core_.Rect_GetPosition(*args, **kwargs)
1133
1134 def SetPosition(*args, **kwargs):
1135 """SetPosition(self, Point p)"""
1136 return _core_.Rect_SetPosition(*args, **kwargs)
1137
1138 def GetSize(*args, **kwargs):
1139 """GetSize(self) -> Size"""
1140 return _core_.Rect_GetSize(*args, **kwargs)
1141
1142 def SetSize(*args, **kwargs):
1143 """SetSize(self, Size s)"""
1144 return _core_.Rect_SetSize(*args, **kwargs)
1145
1146 def GetTopLeft(*args, **kwargs):
1147 """GetTopLeft(self) -> Point"""
1148 return _core_.Rect_GetTopLeft(*args, **kwargs)
1149
1150 def SetTopLeft(*args, **kwargs):
1151 """SetTopLeft(self, Point p)"""
1152 return _core_.Rect_SetTopLeft(*args, **kwargs)
1153
1154 def GetBottomRight(*args, **kwargs):
1155 """GetBottomRight(self) -> Point"""
1156 return _core_.Rect_GetBottomRight(*args, **kwargs)
1157
1158 def SetBottomRight(*args, **kwargs):
1159 """SetBottomRight(self, Point p)"""
1160 return _core_.Rect_SetBottomRight(*args, **kwargs)
1161
1162 def GetLeft(*args, **kwargs):
1163 """GetLeft(self) -> int"""
1164 return _core_.Rect_GetLeft(*args, **kwargs)
1165
1166 def GetTop(*args, **kwargs):
1167 """GetTop(self) -> int"""
1168 return _core_.Rect_GetTop(*args, **kwargs)
1169
1170 def GetBottom(*args, **kwargs):
1171 """GetBottom(self) -> int"""
1172 return _core_.Rect_GetBottom(*args, **kwargs)
1173
1174 def GetRight(*args, **kwargs):
1175 """GetRight(self) -> int"""
1176 return _core_.Rect_GetRight(*args, **kwargs)
1177
1178 def SetLeft(*args, **kwargs):
1179 """SetLeft(self, int left)"""
1180 return _core_.Rect_SetLeft(*args, **kwargs)
1181
1182 def SetRight(*args, **kwargs):
1183 """SetRight(self, int right)"""
1184 return _core_.Rect_SetRight(*args, **kwargs)
1185
1186 def SetTop(*args, **kwargs):
1187 """SetTop(self, int top)"""
1188 return _core_.Rect_SetTop(*args, **kwargs)
1189
1190 def SetBottom(*args, **kwargs):
1191 """SetBottom(self, int bottom)"""
1192 return _core_.Rect_SetBottom(*args, **kwargs)
1193
1194 position = property(GetPosition, SetPosition)
1195 size = property(GetSize, SetSize)
1196 left = property(GetLeft, SetLeft)
1197 right = property(GetRight, SetRight)
1198 top = property(GetTop, SetTop)
1199 bottom = property(GetBottom, SetBottom)
1200
1201 def Inflate(*args, **kwargs):
1202 """
1203 Inflate(self, int dx, int dy) -> Rect
1204
1205 Increase the rectangle size by dx in x direction and dy in y
1206 direction. Both (or one of) parameters may be negative to decrease the
1207 rectangle size.
1208 """
1209 return _core_.Rect_Inflate(*args, **kwargs)
1210
1211 def Deflate(*args, **kwargs):
1212 """
1213 Deflate(self, int dx, int dy) -> Rect
1214
1215 Decrease the rectangle size by dx in x direction and dy in y
1216 direction. Both (or one of) parameters may be negative to increase the
1217 rectngle size. This method is the opposite of Inflate.
1218 """
1219 return _core_.Rect_Deflate(*args, **kwargs)
1220
1221 def OffsetXY(*args, **kwargs):
1222 """
1223 OffsetXY(self, int dx, int dy)
1224
1225 Moves the rectangle by the specified offset. If dx is positive, the
1226 rectangle is moved to the right, if dy is positive, it is moved to the
1227 bottom, otherwise it is moved to the left or top respectively.
1228 """
1229 return _core_.Rect_OffsetXY(*args, **kwargs)
1230
1231 def Offset(*args, **kwargs):
1232 """
1233 Offset(self, Point pt)
1234
1235 Same as OffsetXY but uses dx,dy from Point
1236 """
1237 return _core_.Rect_Offset(*args, **kwargs)
1238
1239 def Intersect(*args, **kwargs):
1240 """
1241 Intersect(self, Rect rect) -> Rect
1242
1243 Returns the intersectsion of this rectangle and rect.
1244 """
1245 return _core_.Rect_Intersect(*args, **kwargs)
1246
1247 def Union(*args, **kwargs):
1248 """
1249 Union(self, Rect rect) -> Rect
1250
1251 Returns the union of this rectangle and rect.
1252 """
1253 return _core_.Rect_Union(*args, **kwargs)
1254
1255 def __add__(*args, **kwargs):
1256 """
1257 __add__(self, Rect rect) -> Rect
1258
1259 Add the properties of rect to this rectangle and return the result.
1260 """
1261 return _core_.Rect___add__(*args, **kwargs)
1262
1263 def __iadd__(*args, **kwargs):
1264 """
1265 __iadd__(self, Rect rect) -> Rect
1266
1267 Add the properties of rect to this rectangle, updating this rectangle.
1268 """
1269 return _core_.Rect___iadd__(*args, **kwargs)
1270
1271 def __eq__(*args, **kwargs):
1272 """
1273 __eq__(self, Rect rect) -> bool
1274
1275 Test for equality.
1276 """
1277 return _core_.Rect___eq__(*args, **kwargs)
1278
1279 def __ne__(*args, **kwargs):
1280 """
1281 __ne__(self, Rect rect) -> bool
1282
1283 Test for inequality.
1284 """
1285 return _core_.Rect___ne__(*args, **kwargs)
1286
1287 def InsideXY(*args, **kwargs):
1288 """
1289 InsideXY(self, int x, int y) -> bool
1290
1291 Return True if the point is (not strcitly) inside the rect.
1292 """
1293 return _core_.Rect_InsideXY(*args, **kwargs)
1294
1295 def Inside(*args, **kwargs):
1296 """
1297 Inside(self, Point pt) -> bool
1298
1299 Return True if the point is (not strcitly) inside the rect.
1300 """
1301 return _core_.Rect_Inside(*args, **kwargs)
1302
1303 def Intersects(*args, **kwargs):
1304 """
1305 Intersects(self, Rect rect) -> bool
1306
1307 Returns True if the rectangles have a non empty intersection.
1308 """
1309 return _core_.Rect_Intersects(*args, **kwargs)
1310
1311 x = property(_core_.Rect_x_get, _core_.Rect_x_set)
1312 y = property(_core_.Rect_y_get, _core_.Rect_y_set)
1313 width = property(_core_.Rect_width_get, _core_.Rect_width_set)
1314 height = property(_core_.Rect_height_get, _core_.Rect_height_set)
1315 def Set(*args, **kwargs):
1316 """
1317 Set(self, int x=0, int y=0, int width=0, int height=0)
1318
1319 Set all rectangle properties.
1320 """
1321 return _core_.Rect_Set(*args, **kwargs)
1322
1323 def Get(*args, **kwargs):
1324 """
1325 Get() -> (x,y,width,height)
1326
1327 Return the rectangle properties as a tuple.
1328 """
1329 return _core_.Rect_Get(*args, **kwargs)
1330
1331 asTuple = wx._deprecated(Get, "asTuple is deprecated, use `Get` instead")
1332 def __str__(self): return str(self.Get())
1333 def __repr__(self): return 'wx.Rect'+str(self.Get())
1334 def __len__(self): return len(self.Get())
1335 def __getitem__(self, index): return self.Get()[index]
1336 def __setitem__(self, index, val):
1337 if index == 0: self.x = val
1338 elif index == 1: self.y = val
1339 elif index == 2: self.width = val
1340 elif index == 3: self.height = val
1341 else: raise IndexError
1342 def __nonzero__(self): return self.Get() != (0,0,0,0)
1343 __safe_for_unpickling__ = True
1344 def __reduce__(self): return (wx.Rect, self.Get())
1345
1346
1347 class RectPtr(Rect):
1348 def __init__(self, this):
1349 self.this = this
1350 if not hasattr(self,"thisown"): self.thisown = 0
1351 self.__class__ = Rect
1352 _core_.Rect_swigregister(RectPtr)
1353
1354 def RectPP(*args, **kwargs):
1355 """
1356 RectPP(Point topLeft, Point bottomRight) -> Rect
1357
1358 Create a new Rect object from Points representing two corners.
1359 """
1360 val = _core_.new_RectPP(*args, **kwargs)
1361 val.thisown = 1
1362 return val
1363
1364 def RectPS(*args, **kwargs):
1365 """
1366 RectPS(Point pos, Size size) -> Rect
1367
1368 Create a new Rect from a position and size.
1369 """
1370 val = _core_.new_RectPS(*args, **kwargs)
1371 val.thisown = 1
1372 return val
1373
1374 def RectS(*args, **kwargs):
1375 """
1376 RectS(Size size) -> Rect
1377
1378 Create a new Rect from a size only.
1379 """
1380 val = _core_.new_RectS(*args, **kwargs)
1381 val.thisown = 1
1382 return val
1383
1384
1385 def IntersectRect(*args, **kwargs):
1386 """
1387 IntersectRect(Rect r1, Rect r2) -> Rect
1388
1389 Calculate and return the intersection of r1 and r2.
1390 """
1391 return _core_.IntersectRect(*args, **kwargs)
1392 #---------------------------------------------------------------------------
1393
1394 class Point2D(object):
1395 """
1396 wx.Point2Ds represent a point or a vector in a 2d coordinate system
1397 with floating point values.
1398 """
1399 def __repr__(self):
1400 return "<%s.%s; proxy of C++ wxPoint2D instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
1401 def __init__(self, *args, **kwargs):
1402 """
1403 __init__(self, double x=0.0, double y=0.0) -> Point2D
1404
1405 Create a w.Point2D object.
1406 """
1407 newobj = _core_.new_Point2D(*args, **kwargs)
1408 self.this = newobj.this
1409 self.thisown = 1
1410 del newobj.thisown
1411 def GetFloor(*args, **kwargs):
1412 """
1413 GetFloor() -> (x,y)
1414
1415 Convert to integer
1416 """
1417 return _core_.Point2D_GetFloor(*args, **kwargs)
1418
1419 def GetRounded(*args, **kwargs):
1420 """
1421 GetRounded() -> (x,y)
1422
1423 Convert to integer
1424 """
1425 return _core_.Point2D_GetRounded(*args, **kwargs)
1426
1427 def GetVectorLength(*args, **kwargs):
1428 """GetVectorLength(self) -> double"""
1429 return _core_.Point2D_GetVectorLength(*args, **kwargs)
1430
1431 def GetVectorAngle(*args, **kwargs):
1432 """GetVectorAngle(self) -> double"""
1433 return _core_.Point2D_GetVectorAngle(*args, **kwargs)
1434
1435 def SetVectorLength(*args, **kwargs):
1436 """SetVectorLength(self, double length)"""
1437 return _core_.Point2D_SetVectorLength(*args, **kwargs)
1438
1439 def SetVectorAngle(*args, **kwargs):
1440 """SetVectorAngle(self, double degrees)"""
1441 return _core_.Point2D_SetVectorAngle(*args, **kwargs)
1442
1443 def SetPolarCoordinates(self, angle, length):
1444 self.SetVectorLength(length)
1445 self.SetVectorAngle(angle)
1446 def Normalize(self):
1447 self.SetVectorLength(1.0)
1448
1449 def GetDistance(*args, **kwargs):
1450 """GetDistance(self, Point2D pt) -> double"""
1451 return _core_.Point2D_GetDistance(*args, **kwargs)
1452
1453 def GetDistanceSquare(*args, **kwargs):
1454 """GetDistanceSquare(self, Point2D pt) -> double"""
1455 return _core_.Point2D_GetDistanceSquare(*args, **kwargs)
1456
1457 def GetDotProduct(*args, **kwargs):
1458 """GetDotProduct(self, Point2D vec) -> double"""
1459 return _core_.Point2D_GetDotProduct(*args, **kwargs)
1460
1461 def GetCrossProduct(*args, **kwargs):
1462 """GetCrossProduct(self, Point2D vec) -> double"""
1463 return _core_.Point2D_GetCrossProduct(*args, **kwargs)
1464
1465 def __neg__(*args, **kwargs):
1466 """
1467 __neg__(self) -> Point2D
1468
1469 the reflection of this point
1470 """
1471 return _core_.Point2D___neg__(*args, **kwargs)
1472
1473 def __iadd__(*args, **kwargs):
1474 """__iadd__(self, Point2D pt) -> Point2D"""
1475 return _core_.Point2D___iadd__(*args, **kwargs)
1476
1477 def __isub__(*args, **kwargs):
1478 """__isub__(self, Point2D pt) -> Point2D"""
1479 return _core_.Point2D___isub__(*args, **kwargs)
1480
1481 def __imul__(*args, **kwargs):
1482 """__imul__(self, Point2D pt) -> Point2D"""
1483 return _core_.Point2D___imul__(*args, **kwargs)
1484
1485 def __idiv__(*args, **kwargs):
1486 """__idiv__(self, Point2D pt) -> Point2D"""
1487 return _core_.Point2D___idiv__(*args, **kwargs)
1488
1489 def __eq__(*args, **kwargs):
1490 """
1491 __eq__(self, Point2D pt) -> bool
1492
1493 Test for equality
1494 """
1495 return _core_.Point2D___eq__(*args, **kwargs)
1496
1497 def __ne__(*args, **kwargs):
1498 """
1499 __ne__(self, Point2D pt) -> bool
1500
1501 Test for inequality
1502 """
1503 return _core_.Point2D___ne__(*args, **kwargs)
1504
1505 x = property(_core_.Point2D_x_get, _core_.Point2D_x_set)
1506 y = property(_core_.Point2D_y_get, _core_.Point2D_y_set)
1507 def Set(*args, **kwargs):
1508 """Set(self, double x=0, double y=0)"""
1509 return _core_.Point2D_Set(*args, **kwargs)
1510
1511 def Get(*args, **kwargs):
1512 """
1513 Get() -> (x,y)
1514
1515 Return x and y properties as a tuple.
1516 """
1517 return _core_.Point2D_Get(*args, **kwargs)
1518
1519 asTuple = wx._deprecated(Get, "asTuple is deprecated, use `Get` instead")
1520 def __str__(self): return str(self.Get())
1521 def __repr__(self): return 'wx.Point2D'+str(self.Get())
1522 def __len__(self): return len(self.Get())
1523 def __getitem__(self, index): return self.Get()[index]
1524 def __setitem__(self, index, val):
1525 if index == 0: self.x = val
1526 elif index == 1: self.y = val
1527 else: raise IndexError
1528 def __nonzero__(self): return self.Get() != (0.0, 0.0)
1529 __safe_for_unpickling__ = True
1530 def __reduce__(self): return (wx.Point2D, self.Get())
1531
1532
1533 class Point2DPtr(Point2D):
1534 def __init__(self, this):
1535 self.this = this
1536 if not hasattr(self,"thisown"): self.thisown = 0
1537 self.__class__ = Point2D
1538 _core_.Point2D_swigregister(Point2DPtr)
1539
1540 def Point2DCopy(*args, **kwargs):
1541 """
1542 Point2DCopy(Point2D pt) -> Point2D
1543
1544 Create a w.Point2D object.
1545 """
1546 val = _core_.new_Point2DCopy(*args, **kwargs)
1547 val.thisown = 1
1548 return val
1549
1550 def Point2DFromPoint(*args, **kwargs):
1551 """
1552 Point2DFromPoint(Point pt) -> Point2D
1553
1554 Create a w.Point2D object.
1555 """
1556 val = _core_.new_Point2DFromPoint(*args, **kwargs)
1557 val.thisown = 1
1558 return val
1559
1560 #---------------------------------------------------------------------------
1561
1562 FromStart = _core_.FromStart
1563 FromCurrent = _core_.FromCurrent
1564 FromEnd = _core_.FromEnd
1565 class InputStream(object):
1566 """Proxy of C++ InputStream class"""
1567 def __repr__(self):
1568 return "<%s.%s; proxy of C++ wxPyInputStream instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
1569 def __init__(self, *args, **kwargs):
1570 """__init__(self, PyObject p) -> InputStream"""
1571 newobj = _core_.new_InputStream(*args, **kwargs)
1572 self.this = newobj.this
1573 self.thisown = 1
1574 del newobj.thisown
1575 def __del__(self, destroy=_core_.delete_InputStream):
1576 """__del__(self)"""
1577 try:
1578 if self.thisown: destroy(self)
1579 except: pass
1580
1581 def close(*args, **kwargs):
1582 """close(self)"""
1583 return _core_.InputStream_close(*args, **kwargs)
1584
1585 def flush(*args, **kwargs):
1586 """flush(self)"""
1587 return _core_.InputStream_flush(*args, **kwargs)
1588
1589 def eof(*args, **kwargs):
1590 """eof(self) -> bool"""
1591 return _core_.InputStream_eof(*args, **kwargs)
1592
1593 def read(*args, **kwargs):
1594 """read(self, int size=-1) -> PyObject"""
1595 return _core_.InputStream_read(*args, **kwargs)
1596
1597 def readline(*args, **kwargs):
1598 """readline(self, int size=-1) -> PyObject"""
1599 return _core_.InputStream_readline(*args, **kwargs)
1600
1601 def readlines(*args, **kwargs):
1602 """readlines(self, int sizehint=-1) -> PyObject"""
1603 return _core_.InputStream_readlines(*args, **kwargs)
1604
1605 def seek(*args, **kwargs):
1606 """seek(self, int offset, int whence=0)"""
1607 return _core_.InputStream_seek(*args, **kwargs)
1608
1609 def tell(*args, **kwargs):
1610 """tell(self) -> int"""
1611 return _core_.InputStream_tell(*args, **kwargs)
1612
1613 def Peek(*args, **kwargs):
1614 """Peek(self) -> char"""
1615 return _core_.InputStream_Peek(*args, **kwargs)
1616
1617 def GetC(*args, **kwargs):
1618 """GetC(self) -> char"""
1619 return _core_.InputStream_GetC(*args, **kwargs)
1620
1621 def LastRead(*args, **kwargs):
1622 """LastRead(self) -> size_t"""
1623 return _core_.InputStream_LastRead(*args, **kwargs)
1624
1625 def CanRead(*args, **kwargs):
1626 """CanRead(self) -> bool"""
1627 return _core_.InputStream_CanRead(*args, **kwargs)
1628
1629 def Eof(*args, **kwargs):
1630 """Eof(self) -> bool"""
1631 return _core_.InputStream_Eof(*args, **kwargs)
1632
1633 def Ungetch(*args, **kwargs):
1634 """Ungetch(self, char c) -> bool"""
1635 return _core_.InputStream_Ungetch(*args, **kwargs)
1636
1637 def SeekI(*args, **kwargs):
1638 """SeekI(self, long pos, int mode=FromStart) -> long"""
1639 return _core_.InputStream_SeekI(*args, **kwargs)
1640
1641 def TellI(*args, **kwargs):
1642 """TellI(self) -> long"""
1643 return _core_.InputStream_TellI(*args, **kwargs)
1644
1645
1646 class InputStreamPtr(InputStream):
1647 def __init__(self, this):
1648 self.this = this
1649 if not hasattr(self,"thisown"): self.thisown = 0
1650 self.__class__ = InputStream
1651 _core_.InputStream_swigregister(InputStreamPtr)
1652 DefaultPosition = cvar.DefaultPosition
1653 DefaultSize = cvar.DefaultSize
1654
1655 class OutputStream(object):
1656 """Proxy of C++ OutputStream class"""
1657 def __init__(self): raise RuntimeError, "No constructor defined"
1658 def __repr__(self):
1659 return "<%s.%s; proxy of C++ wxOutputStream instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
1660 def write(*args, **kwargs):
1661 """write(self, PyObject obj)"""
1662 return _core_.OutputStream_write(*args, **kwargs)
1663
1664
1665 class OutputStreamPtr(OutputStream):
1666 def __init__(self, this):
1667 self.this = this
1668 if not hasattr(self,"thisown"): self.thisown = 0
1669 self.__class__ = OutputStream
1670 _core_.OutputStream_swigregister(OutputStreamPtr)
1671
1672 #---------------------------------------------------------------------------
1673
1674 class FSFile(Object):
1675 """Proxy of C++ FSFile class"""
1676 def __repr__(self):
1677 return "<%s.%s; proxy of C++ wxFSFile instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
1678 def __init__(self, *args, **kwargs):
1679 """
1680 __init__(self, InputStream stream, String loc, String mimetype, String anchor,
1681 DateTime modif) -> FSFile
1682 """
1683 newobj = _core_.new_FSFile(*args, **kwargs)
1684 self.this = newobj.this
1685 self.thisown = 1
1686 del newobj.thisown
1687 self.thisown = 0 # It will normally be deleted by the user of the wxFileSystem
1688
1689 def __del__(self, destroy=_core_.delete_FSFile):
1690 """__del__(self)"""
1691 try:
1692 if self.thisown: destroy(self)
1693 except: pass
1694
1695 def GetStream(*args, **kwargs):
1696 """GetStream(self) -> InputStream"""
1697 return _core_.FSFile_GetStream(*args, **kwargs)
1698
1699 def GetMimeType(*args, **kwargs):
1700 """GetMimeType(self) -> String"""
1701 return _core_.FSFile_GetMimeType(*args, **kwargs)
1702
1703 def GetLocation(*args, **kwargs):
1704 """GetLocation(self) -> String"""
1705 return _core_.FSFile_GetLocation(*args, **kwargs)
1706
1707 def GetAnchor(*args, **kwargs):
1708 """GetAnchor(self) -> String"""
1709 return _core_.FSFile_GetAnchor(*args, **kwargs)
1710
1711 def GetModificationTime(*args, **kwargs):
1712 """GetModificationTime(self) -> DateTime"""
1713 return _core_.FSFile_GetModificationTime(*args, **kwargs)
1714
1715
1716 class FSFilePtr(FSFile):
1717 def __init__(self, this):
1718 self.this = this
1719 if not hasattr(self,"thisown"): self.thisown = 0
1720 self.__class__ = FSFile
1721 _core_.FSFile_swigregister(FSFilePtr)
1722
1723 class CPPFileSystemHandler(object):
1724 """Proxy of C++ CPPFileSystemHandler class"""
1725 def __init__(self): raise RuntimeError, "No constructor defined"
1726 def __repr__(self):
1727 return "<%s.%s; proxy of C++ wxFileSystemHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
1728
1729 class CPPFileSystemHandlerPtr(CPPFileSystemHandler):
1730 def __init__(self, this):
1731 self.this = this
1732 if not hasattr(self,"thisown"): self.thisown = 0
1733 self.__class__ = CPPFileSystemHandler
1734 _core_.CPPFileSystemHandler_swigregister(CPPFileSystemHandlerPtr)
1735
1736 class FileSystemHandler(CPPFileSystemHandler):
1737 """Proxy of C++ FileSystemHandler class"""
1738 def __repr__(self):
1739 return "<%s.%s; proxy of C++ wxPyFileSystemHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
1740 def __init__(self, *args, **kwargs):
1741 """__init__(self) -> FileSystemHandler"""
1742 newobj = _core_.new_FileSystemHandler(*args, **kwargs)
1743 self.this = newobj.this
1744 self.thisown = 1
1745 del newobj.thisown
1746 self._setCallbackInfo(self, FileSystemHandler)
1747
1748 def _setCallbackInfo(*args, **kwargs):
1749 """_setCallbackInfo(self, PyObject self, PyObject _class)"""
1750 return _core_.FileSystemHandler__setCallbackInfo(*args, **kwargs)
1751
1752 def CanOpen(*args, **kwargs):
1753 """CanOpen(self, String location) -> bool"""
1754 return _core_.FileSystemHandler_CanOpen(*args, **kwargs)
1755
1756 def OpenFile(*args, **kwargs):
1757 """OpenFile(self, FileSystem fs, String location) -> FSFile"""
1758 return _core_.FileSystemHandler_OpenFile(*args, **kwargs)
1759
1760 def FindFirst(*args, **kwargs):
1761 """FindFirst(self, String spec, int flags=0) -> String"""
1762 return _core_.FileSystemHandler_FindFirst(*args, **kwargs)
1763
1764 def FindNext(*args, **kwargs):
1765 """FindNext(self) -> String"""
1766 return _core_.FileSystemHandler_FindNext(*args, **kwargs)
1767
1768 def GetProtocol(*args, **kwargs):
1769 """GetProtocol(self, String location) -> String"""
1770 return _core_.FileSystemHandler_GetProtocol(*args, **kwargs)
1771
1772 def GetLeftLocation(*args, **kwargs):
1773 """GetLeftLocation(self, String location) -> String"""
1774 return _core_.FileSystemHandler_GetLeftLocation(*args, **kwargs)
1775
1776 def GetAnchor(*args, **kwargs):
1777 """GetAnchor(self, String location) -> String"""
1778 return _core_.FileSystemHandler_GetAnchor(*args, **kwargs)
1779
1780 def GetRightLocation(*args, **kwargs):
1781 """GetRightLocation(self, String location) -> String"""
1782 return _core_.FileSystemHandler_GetRightLocation(*args, **kwargs)
1783
1784 def GetMimeTypeFromExt(*args, **kwargs):
1785 """GetMimeTypeFromExt(self, String location) -> String"""
1786 return _core_.FileSystemHandler_GetMimeTypeFromExt(*args, **kwargs)
1787
1788
1789 class FileSystemHandlerPtr(FileSystemHandler):
1790 def __init__(self, this):
1791 self.this = this
1792 if not hasattr(self,"thisown"): self.thisown = 0
1793 self.__class__ = FileSystemHandler
1794 _core_.FileSystemHandler_swigregister(FileSystemHandlerPtr)
1795
1796 class FileSystem(Object):
1797 """Proxy of C++ FileSystem class"""
1798 def __repr__(self):
1799 return "<%s.%s; proxy of C++ wxFileSystem instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
1800 def __init__(self, *args, **kwargs):
1801 """__init__(self) -> FileSystem"""
1802 newobj = _core_.new_FileSystem(*args, **kwargs)
1803 self.this = newobj.this
1804 self.thisown = 1
1805 del newobj.thisown
1806 def __del__(self, destroy=_core_.delete_FileSystem):
1807 """__del__(self)"""
1808 try:
1809 if self.thisown: destroy(self)
1810 except: pass
1811
1812 def ChangePathTo(*args, **kwargs):
1813 """ChangePathTo(self, String location, bool is_dir=False)"""
1814 return _core_.FileSystem_ChangePathTo(*args, **kwargs)
1815
1816 def GetPath(*args, **kwargs):
1817 """GetPath(self) -> String"""
1818 return _core_.FileSystem_GetPath(*args, **kwargs)
1819
1820 def OpenFile(*args, **kwargs):
1821 """OpenFile(self, String location) -> FSFile"""
1822 return _core_.FileSystem_OpenFile(*args, **kwargs)
1823
1824 def FindFirst(*args, **kwargs):
1825 """FindFirst(self, String spec, int flags=0) -> String"""
1826 return _core_.FileSystem_FindFirst(*args, **kwargs)
1827
1828 def FindNext(*args, **kwargs):
1829 """FindNext(self) -> String"""
1830 return _core_.FileSystem_FindNext(*args, **kwargs)
1831
1832 def AddHandler(*args, **kwargs):
1833 """AddHandler(CPPFileSystemHandler handler)"""
1834 return _core_.FileSystem_AddHandler(*args, **kwargs)
1835
1836 AddHandler = staticmethod(AddHandler)
1837 def CleanUpHandlers(*args, **kwargs):
1838 """CleanUpHandlers()"""
1839 return _core_.FileSystem_CleanUpHandlers(*args, **kwargs)
1840
1841 CleanUpHandlers = staticmethod(CleanUpHandlers)
1842 def FileNameToURL(*args, **kwargs):
1843 """FileNameToURL(String filename) -> String"""
1844 return _core_.FileSystem_FileNameToURL(*args, **kwargs)
1845
1846 FileNameToURL = staticmethod(FileNameToURL)
1847 def URLToFileName(*args, **kwargs):
1848 """URLToFileName(String url) -> String"""
1849 return _core_.FileSystem_URLToFileName(*args, **kwargs)
1850
1851 URLToFileName = staticmethod(URLToFileName)
1852
1853 class FileSystemPtr(FileSystem):
1854 def __init__(self, this):
1855 self.this = this
1856 if not hasattr(self,"thisown"): self.thisown = 0
1857 self.__class__ = FileSystem
1858 _core_.FileSystem_swigregister(FileSystemPtr)
1859
1860 def FileSystem_AddHandler(*args, **kwargs):
1861 """FileSystem_AddHandler(CPPFileSystemHandler handler)"""
1862 return _core_.FileSystem_AddHandler(*args, **kwargs)
1863
1864 def FileSystem_CleanUpHandlers(*args, **kwargs):
1865 """FileSystem_CleanUpHandlers()"""
1866 return _core_.FileSystem_CleanUpHandlers(*args, **kwargs)
1867
1868 def FileSystem_FileNameToURL(*args, **kwargs):
1869 """FileSystem_FileNameToURL(String filename) -> String"""
1870 return _core_.FileSystem_FileNameToURL(*args, **kwargs)
1871
1872 def FileSystem_URLToFileName(*args, **kwargs):
1873 """FileSystem_URLToFileName(String url) -> String"""
1874 return _core_.FileSystem_URLToFileName(*args, **kwargs)
1875
1876 class InternetFSHandler(CPPFileSystemHandler):
1877 """Proxy of C++ InternetFSHandler class"""
1878 def __repr__(self):
1879 return "<%s.%s; proxy of C++ wxInternetFSHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
1880 def __init__(self, *args, **kwargs):
1881 """__init__(self) -> InternetFSHandler"""
1882 newobj = _core_.new_InternetFSHandler(*args, **kwargs)
1883 self.this = newobj.this
1884 self.thisown = 1
1885 del newobj.thisown
1886 def CanOpen(*args, **kwargs):
1887 """CanOpen(self, String location) -> bool"""
1888 return _core_.InternetFSHandler_CanOpen(*args, **kwargs)
1889
1890 def OpenFile(*args, **kwargs):
1891 """OpenFile(self, FileSystem fs, String location) -> FSFile"""
1892 return _core_.InternetFSHandler_OpenFile(*args, **kwargs)
1893
1894
1895 class InternetFSHandlerPtr(InternetFSHandler):
1896 def __init__(self, this):
1897 self.this = this
1898 if not hasattr(self,"thisown"): self.thisown = 0
1899 self.__class__ = InternetFSHandler
1900 _core_.InternetFSHandler_swigregister(InternetFSHandlerPtr)
1901
1902 class ZipFSHandler(CPPFileSystemHandler):
1903 """Proxy of C++ ZipFSHandler class"""
1904 def __repr__(self):
1905 return "<%s.%s; proxy of C++ wxZipFSHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
1906 def __init__(self, *args, **kwargs):
1907 """__init__(self) -> ZipFSHandler"""
1908 newobj = _core_.new_ZipFSHandler(*args, **kwargs)
1909 self.this = newobj.this
1910 self.thisown = 1
1911 del newobj.thisown
1912 def CanOpen(*args, **kwargs):
1913 """CanOpen(self, String location) -> bool"""
1914 return _core_.ZipFSHandler_CanOpen(*args, **kwargs)
1915
1916 def OpenFile(*args, **kwargs):
1917 """OpenFile(self, FileSystem fs, String location) -> FSFile"""
1918 return _core_.ZipFSHandler_OpenFile(*args, **kwargs)
1919
1920 def FindFirst(*args, **kwargs):
1921 """FindFirst(self, String spec, int flags=0) -> String"""
1922 return _core_.ZipFSHandler_FindFirst(*args, **kwargs)
1923
1924 def FindNext(*args, **kwargs):
1925 """FindNext(self) -> String"""
1926 return _core_.ZipFSHandler_FindNext(*args, **kwargs)
1927
1928
1929 class ZipFSHandlerPtr(ZipFSHandler):
1930 def __init__(self, this):
1931 self.this = this
1932 if not hasattr(self,"thisown"): self.thisown = 0
1933 self.__class__ = ZipFSHandler
1934 _core_.ZipFSHandler_swigregister(ZipFSHandlerPtr)
1935
1936
1937 def __wxMemoryFSHandler_AddFile_wxImage(*args, **kwargs):
1938 """__wxMemoryFSHandler_AddFile_wxImage(String filename, Image image, long type)"""
1939 return _core_.__wxMemoryFSHandler_AddFile_wxImage(*args, **kwargs)
1940
1941 def __wxMemoryFSHandler_AddFile_wxBitmap(*args, **kwargs):
1942 """__wxMemoryFSHandler_AddFile_wxBitmap(String filename, Bitmap bitmap, long type)"""
1943 return _core_.__wxMemoryFSHandler_AddFile_wxBitmap(*args, **kwargs)
1944
1945 def __wxMemoryFSHandler_AddFile_Data(*args, **kwargs):
1946 """__wxMemoryFSHandler_AddFile_Data(String filename, PyObject data)"""
1947 return _core_.__wxMemoryFSHandler_AddFile_Data(*args, **kwargs)
1948 def MemoryFSHandler_AddFile(filename, dataItem, imgType=-1):
1949 """
1950 Add 'file' to the memory filesystem. The dataItem parameter can
1951 either be a `wx.Bitmap`, `wx.Image` or a string that can contain
1952 arbitrary data. If a bitmap or image is used then the imgType
1953 parameter should specify what kind of image file it should be
1954 written as, wx.BITMAP_TYPE_PNG, etc.
1955 """
1956 if isinstance(dataItem, wx.Image):
1957 __wxMemoryFSHandler_AddFile_wxImage(filename, dataItem, imgType)
1958 elif isinstance(dataItem, wx.Bitmap):
1959 __wxMemoryFSHandler_AddFile_wxBitmap(filename, dataItem, imgType)
1960 elif type(dataItem) == str:
1961 __wxMemoryFSHandler_AddFile_Data(filename, dataItem)
1962 else:
1963 raise TypeError, 'wx.Image, wx.Bitmap or string expected'
1964
1965 class MemoryFSHandler(CPPFileSystemHandler):
1966 """Proxy of C++ MemoryFSHandler class"""
1967 def __repr__(self):
1968 return "<%s.%s; proxy of C++ wxMemoryFSHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
1969 def __init__(self, *args, **kwargs):
1970 """__init__(self) -> MemoryFSHandler"""
1971 newobj = _core_.new_MemoryFSHandler(*args, **kwargs)
1972 self.this = newobj.this
1973 self.thisown = 1
1974 del newobj.thisown
1975 def RemoveFile(*args, **kwargs):
1976 """RemoveFile(String filename)"""
1977 return _core_.MemoryFSHandler_RemoveFile(*args, **kwargs)
1978
1979 RemoveFile = staticmethod(RemoveFile)
1980 AddFile = staticmethod(MemoryFSHandler_AddFile)
1981 def CanOpen(*args, **kwargs):
1982 """CanOpen(self, String location) -> bool"""
1983 return _core_.MemoryFSHandler_CanOpen(*args, **kwargs)
1984
1985 def OpenFile(*args, **kwargs):
1986 """OpenFile(self, FileSystem fs, String location) -> FSFile"""
1987 return _core_.MemoryFSHandler_OpenFile(*args, **kwargs)
1988
1989 def FindFirst(*args, **kwargs):
1990 """FindFirst(self, String spec, int flags=0) -> String"""
1991 return _core_.MemoryFSHandler_FindFirst(*args, **kwargs)
1992
1993 def FindNext(*args, **kwargs):
1994 """FindNext(self) -> String"""
1995 return _core_.MemoryFSHandler_FindNext(*args, **kwargs)
1996
1997
1998 class MemoryFSHandlerPtr(MemoryFSHandler):
1999 def __init__(self, this):
2000 self.this = this
2001 if not hasattr(self,"thisown"): self.thisown = 0
2002 self.__class__ = MemoryFSHandler
2003 _core_.MemoryFSHandler_swigregister(MemoryFSHandlerPtr)
2004
2005 def MemoryFSHandler_RemoveFile(*args, **kwargs):
2006 """MemoryFSHandler_RemoveFile(String filename)"""
2007 return _core_.MemoryFSHandler_RemoveFile(*args, **kwargs)
2008
2009 #---------------------------------------------------------------------------
2010
2011 class ImageHandler(Object):
2012 """Proxy of C++ ImageHandler class"""
2013 def __init__(self): raise RuntimeError, "No constructor defined"
2014 def __repr__(self):
2015 return "<%s.%s; proxy of C++ wxImageHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
2016 def GetName(*args, **kwargs):
2017 """GetName(self) -> String"""
2018 return _core_.ImageHandler_GetName(*args, **kwargs)
2019
2020 def GetExtension(*args, **kwargs):
2021 """GetExtension(self) -> String"""
2022 return _core_.ImageHandler_GetExtension(*args, **kwargs)
2023
2024 def GetType(*args, **kwargs):
2025 """GetType(self) -> long"""
2026 return _core_.ImageHandler_GetType(*args, **kwargs)
2027
2028 def GetMimeType(*args, **kwargs):
2029 """GetMimeType(self) -> String"""
2030 return _core_.ImageHandler_GetMimeType(*args, **kwargs)
2031
2032 def CanRead(*args, **kwargs):
2033 """CanRead(self, String name) -> bool"""
2034 return _core_.ImageHandler_CanRead(*args, **kwargs)
2035
2036 def SetName(*args, **kwargs):
2037 """SetName(self, String name)"""
2038 return _core_.ImageHandler_SetName(*args, **kwargs)
2039
2040 def SetExtension(*args, **kwargs):
2041 """SetExtension(self, String extension)"""
2042 return _core_.ImageHandler_SetExtension(*args, **kwargs)
2043
2044 def SetType(*args, **kwargs):
2045 """SetType(self, long type)"""
2046 return _core_.ImageHandler_SetType(*args, **kwargs)
2047
2048 def SetMimeType(*args, **kwargs):
2049 """SetMimeType(self, String mimetype)"""
2050 return _core_.ImageHandler_SetMimeType(*args, **kwargs)
2051
2052
2053 class ImageHandlerPtr(ImageHandler):
2054 def __init__(self, this):
2055 self.this = this
2056 if not hasattr(self,"thisown"): self.thisown = 0
2057 self.__class__ = ImageHandler
2058 _core_.ImageHandler_swigregister(ImageHandlerPtr)
2059
2060 class ImageHistogram(object):
2061 """Proxy of C++ ImageHistogram class"""
2062 def __repr__(self):
2063 return "<%s.%s; proxy of C++ wxImageHistogram instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
2064 def __init__(self, *args, **kwargs):
2065 """__init__(self) -> ImageHistogram"""
2066 newobj = _core_.new_ImageHistogram(*args, **kwargs)
2067 self.this = newobj.this
2068 self.thisown = 1
2069 del newobj.thisown
2070 def MakeKey(*args, **kwargs):
2071 """
2072 MakeKey(unsigned char r, unsigned char g, unsigned char b) -> unsigned long
2073
2074 Get the key in the histogram for the given RGB values
2075 """
2076 return _core_.ImageHistogram_MakeKey(*args, **kwargs)
2077
2078 MakeKey = staticmethod(MakeKey)
2079 def FindFirstUnusedColour(*args, **kwargs):
2080 """
2081 FindFirstUnusedColour(int startR=1, int startG=0, int startB=0) -> (success, r, g, b)
2082
2083 Find first colour that is not used in the image and has higher RGB
2084 values than startR, startG, startB. Returns a tuple consisting of a
2085 success flag and rgb values.
2086 """
2087 return _core_.ImageHistogram_FindFirstUnusedColour(*args, **kwargs)
2088
2089
2090 class ImageHistogramPtr(ImageHistogram):
2091 def __init__(self, this):
2092 self.this = this
2093 if not hasattr(self,"thisown"): self.thisown = 0
2094 self.__class__ = ImageHistogram
2095 _core_.ImageHistogram_swigregister(ImageHistogramPtr)
2096
2097 def ImageHistogram_MakeKey(*args, **kwargs):
2098 """
2099 ImageHistogram_MakeKey(unsigned char r, unsigned char g, unsigned char b) -> unsigned long
2100
2101 Get the key in the histogram for the given RGB values
2102 """
2103 return _core_.ImageHistogram_MakeKey(*args, **kwargs)
2104
2105 class Image(Object):
2106 """Proxy of C++ Image class"""
2107 def __repr__(self):
2108 return "<%s.%s; proxy of C++ wxImage instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
2109 def __init__(self, *args, **kwargs):
2110 """__init__(self, String name, long type=BITMAP_TYPE_ANY, int index=-1) -> Image"""
2111 newobj = _core_.new_Image(*args, **kwargs)
2112 self.this = newobj.this
2113 self.thisown = 1
2114 del newobj.thisown
2115 def __del__(self, destroy=_core_.delete_Image):
2116 """__del__(self)"""
2117 try:
2118 if self.thisown: destroy(self)
2119 except: pass
2120
2121 def Create(*args, **kwargs):
2122 """Create(self, int width, int height)"""
2123 return _core_.Image_Create(*args, **kwargs)
2124
2125 def Destroy(*args, **kwargs):
2126 """
2127 Destroy(self)
2128
2129 Deletes the C++ object this Python object is a proxy for.
2130 """
2131 return _core_.Image_Destroy(*args, **kwargs)
2132
2133 def Scale(*args, **kwargs):
2134 """Scale(self, int width, int height) -> Image"""
2135 return _core_.Image_Scale(*args, **kwargs)
2136
2137 def ShrinkBy(*args, **kwargs):
2138 """ShrinkBy(self, int xFactor, int yFactor) -> Image"""
2139 return _core_.Image_ShrinkBy(*args, **kwargs)
2140
2141 def Rescale(*args, **kwargs):
2142 """Rescale(self, int width, int height) -> Image"""
2143 return _core_.Image_Rescale(*args, **kwargs)
2144
2145 def SetRGB(*args, **kwargs):
2146 """SetRGB(self, int x, int y, unsigned char r, unsigned char g, unsigned char b)"""
2147 return _core_.Image_SetRGB(*args, **kwargs)
2148
2149 def GetRed(*args, **kwargs):
2150 """GetRed(self, int x, int y) -> unsigned char"""
2151 return _core_.Image_GetRed(*args, **kwargs)
2152
2153 def GetGreen(*args, **kwargs):
2154 """GetGreen(self, int x, int y) -> unsigned char"""
2155 return _core_.Image_GetGreen(*args, **kwargs)
2156
2157 def GetBlue(*args, **kwargs):
2158 """GetBlue(self, int x, int y) -> unsigned char"""
2159 return _core_.Image_GetBlue(*args, **kwargs)
2160
2161 def SetAlpha(*args, **kwargs):
2162 """SetAlpha(self, int x, int y, unsigned char alpha)"""
2163 return _core_.Image_SetAlpha(*args, **kwargs)
2164
2165 def GetAlpha(*args, **kwargs):
2166 """GetAlpha(self, int x, int y) -> unsigned char"""
2167 return _core_.Image_GetAlpha(*args, **kwargs)
2168
2169 def HasAlpha(*args, **kwargs):
2170 """HasAlpha(self) -> bool"""
2171 return _core_.Image_HasAlpha(*args, **kwargs)
2172
2173 def FindFirstUnusedColour(*args, **kwargs):
2174 """
2175 FindFirstUnusedColour(int startR=1, int startG=0, int startB=0) -> (success, r, g, b)
2176
2177 Find first colour that is not used in the image and has higher RGB
2178 values than startR, startG, startB. Returns a tuple consisting of a
2179 success flag and rgb values.
2180 """
2181 return _core_.Image_FindFirstUnusedColour(*args, **kwargs)
2182
2183 def ConvertAlphaToMask(*args, **kwargs):
2184 """
2185 ConvertAlphaToMask(self, byte threshold=128) -> bool
2186
2187 If the image has alpha channel, this method converts it to mask. All pixels
2188 with alpha value less than ``threshold`` are replaced with mask colour and the
2189 alpha channel is removed. Mask colour is chosen automatically using
2190 `FindFirstUnusedColour`.
2191
2192 If the image image doesn't have alpha channel, ConvertAlphaToMask does
2193 nothing.
2194 """
2195 return _core_.Image_ConvertAlphaToMask(*args, **kwargs)
2196
2197 def ConvertColourToAlpha(*args, **kwargs):
2198 """
2199 ConvertColourToAlpha(self, unsigned char r, unsigned char g, unsigned char b) -> bool
2200
2201 This method converts an image where the original alpha information is
2202 only available as a shades of a colour (actually shades of grey)
2203 typically when you draw anti-aliased text into a bitmap. The DC
2204 drawing routines draw grey values on the black background although
2205 they actually mean to draw white with differnt alpha values. This
2206 method reverses it, assuming a black (!) background and white text.
2207 The method will then fill up the whole image with the colour given.
2208 """
2209 return _core_.Image_ConvertColourToAlpha(*args, **kwargs)
2210
2211 def SetMaskFromImage(*args, **kwargs):
2212 """SetMaskFromImage(self, Image mask, byte mr, byte mg, byte mb) -> bool"""
2213 return _core_.Image_SetMaskFromImage(*args, **kwargs)
2214
2215 def CanRead(*args, **kwargs):
2216 """CanRead(String name) -> bool"""
2217 return _core_.Image_CanRead(*args, **kwargs)
2218
2219 CanRead = staticmethod(CanRead)
2220 def GetImageCount(*args, **kwargs):
2221 """GetImageCount(String name, long type=BITMAP_TYPE_ANY) -> int"""
2222 return _core_.Image_GetImageCount(*args, **kwargs)
2223
2224 GetImageCount = staticmethod(GetImageCount)
2225 def LoadFile(*args, **kwargs):
2226 """LoadFile(self, String name, long type=BITMAP_TYPE_ANY, int index=-1) -> bool"""
2227 return _core_.Image_LoadFile(*args, **kwargs)
2228
2229 def LoadMimeFile(*args, **kwargs):
2230 """LoadMimeFile(self, String name, String mimetype, int index=-1) -> bool"""
2231 return _core_.Image_LoadMimeFile(*args, **kwargs)
2232
2233 def SaveFile(*args, **kwargs):
2234 """SaveFile(self, String name, int type) -> bool"""
2235 return _core_.Image_SaveFile(*args, **kwargs)
2236
2237 def SaveMimeFile(*args, **kwargs):
2238 """SaveMimeFile(self, String name, String mimetype) -> bool"""
2239 return _core_.Image_SaveMimeFile(*args, **kwargs)
2240
2241 def CanReadStream(*args, **kwargs):
2242 """CanReadStream(InputStream stream) -> bool"""
2243 return _core_.Image_CanReadStream(*args, **kwargs)
2244
2245 CanReadStream = staticmethod(CanReadStream)
2246 def LoadStream(*args, **kwargs):
2247 """LoadStream(self, InputStream stream, long type=BITMAP_TYPE_ANY, int index=-1) -> bool"""
2248 return _core_.Image_LoadStream(*args, **kwargs)
2249
2250 def LoadMimeStream(*args, **kwargs):
2251 """LoadMimeStream(self, InputStream stream, String mimetype, int index=-1) -> bool"""
2252 return _core_.Image_LoadMimeStream(*args, **kwargs)
2253
2254 def Ok(*args, **kwargs):
2255 """Ok(self) -> bool"""
2256 return _core_.Image_Ok(*args, **kwargs)
2257
2258 def GetWidth(*args, **kwargs):
2259 """GetWidth(self) -> int"""
2260 return _core_.Image_GetWidth(*args, **kwargs)
2261
2262 def GetHeight(*args, **kwargs):
2263 """GetHeight(self) -> int"""
2264 return _core_.Image_GetHeight(*args, **kwargs)
2265
2266 def GetSize(*args, **kwargs):
2267 """GetSize(self) -> Size"""
2268 return _core_.Image_GetSize(*args, **kwargs)
2269
2270 def GetSubImage(*args, **kwargs):
2271 """GetSubImage(self, Rect rect) -> Image"""
2272 return _core_.Image_GetSubImage(*args, **kwargs)
2273
2274 def Copy(*args, **kwargs):
2275 """Copy(self) -> Image"""
2276 return _core_.Image_Copy(*args, **kwargs)
2277
2278 def Paste(*args, **kwargs):
2279 """Paste(self, Image image, int x, int y)"""
2280 return _core_.Image_Paste(*args, **kwargs)
2281
2282 def GetData(*args, **kwargs):
2283 """GetData(self) -> PyObject"""
2284 return _core_.Image_GetData(*args, **kwargs)
2285
2286 def SetData(*args, **kwargs):
2287 """SetData(self, PyObject data)"""
2288 return _core_.Image_SetData(*args, **kwargs)
2289
2290 def GetDataBuffer(*args, **kwargs):
2291 """GetDataBuffer(self) -> PyObject"""
2292 return _core_.Image_GetDataBuffer(*args, **kwargs)
2293
2294 def SetDataBuffer(*args, **kwargs):
2295 """SetDataBuffer(self, PyObject data)"""
2296 return _core_.Image_SetDataBuffer(*args, **kwargs)
2297
2298 def GetAlphaData(*args, **kwargs):
2299 """GetAlphaData(self) -> PyObject"""
2300 return _core_.Image_GetAlphaData(*args, **kwargs)
2301
2302 def SetAlphaData(*args, **kwargs):
2303 """SetAlphaData(self, PyObject data)"""
2304 return _core_.Image_SetAlphaData(*args, **kwargs)
2305
2306 def GetAlphaBuffer(*args, **kwargs):
2307 """GetAlphaBuffer(self) -> PyObject"""
2308 return _core_.Image_GetAlphaBuffer(*args, **kwargs)
2309
2310 def SetAlphaBuffer(*args, **kwargs):
2311 """SetAlphaBuffer(self, PyObject data)"""
2312 return _core_.Image_SetAlphaBuffer(*args, **kwargs)
2313
2314 def SetMaskColour(*args, **kwargs):
2315 """SetMaskColour(self, unsigned char r, unsigned char g, unsigned char b)"""
2316 return _core_.Image_SetMaskColour(*args, **kwargs)
2317
2318 def GetMaskRed(*args, **kwargs):
2319 """GetMaskRed(self) -> unsigned char"""
2320 return _core_.Image_GetMaskRed(*args, **kwargs)
2321
2322 def GetMaskGreen(*args, **kwargs):
2323 """GetMaskGreen(self) -> unsigned char"""
2324 return _core_.Image_GetMaskGreen(*args, **kwargs)
2325
2326 def GetMaskBlue(*args, **kwargs):
2327 """GetMaskBlue(self) -> unsigned char"""
2328 return _core_.Image_GetMaskBlue(*args, **kwargs)
2329
2330 def SetMask(*args, **kwargs):
2331 """SetMask(self, bool mask=True)"""
2332 return _core_.Image_SetMask(*args, **kwargs)
2333
2334 def HasMask(*args, **kwargs):
2335 """HasMask(self) -> bool"""
2336 return _core_.Image_HasMask(*args, **kwargs)
2337
2338 def Rotate(*args, **kwargs):
2339 """
2340 Rotate(self, double angle, Point centre_of_rotation, bool interpolating=True,
2341 Point offset_after_rotation=None) -> Image
2342 """
2343 return _core_.Image_Rotate(*args, **kwargs)
2344
2345 def Rotate90(*args, **kwargs):
2346 """Rotate90(self, bool clockwise=True) -> Image"""
2347 return _core_.Image_Rotate90(*args, **kwargs)
2348
2349 def Mirror(*args, **kwargs):
2350 """Mirror(self, bool horizontally=True) -> Image"""
2351 return _core_.Image_Mirror(*args, **kwargs)
2352
2353 def Replace(*args, **kwargs):
2354 """
2355 Replace(self, unsigned char r1, unsigned char g1, unsigned char b1,
2356 unsigned char r2, unsigned char g2, unsigned char b2)
2357 """
2358 return _core_.Image_Replace(*args, **kwargs)
2359
2360 def ConvertToMono(*args, **kwargs):
2361 """ConvertToMono(self, unsigned char r, unsigned char g, unsigned char b) -> Image"""
2362 return _core_.Image_ConvertToMono(*args, **kwargs)
2363
2364 def SetOption(*args, **kwargs):
2365 """SetOption(self, String name, String value)"""
2366 return _core_.Image_SetOption(*args, **kwargs)
2367
2368 def SetOptionInt(*args, **kwargs):
2369 """SetOptionInt(self, String name, int value)"""
2370 return _core_.Image_SetOptionInt(*args, **kwargs)
2371
2372 def GetOption(*args, **kwargs):
2373 """GetOption(self, String name) -> String"""
2374 return _core_.Image_GetOption(*args, **kwargs)
2375
2376 def GetOptionInt(*args, **kwargs):
2377 """GetOptionInt(self, String name) -> int"""
2378 return _core_.Image_GetOptionInt(*args, **kwargs)
2379
2380 def HasOption(*args, **kwargs):
2381 """HasOption(self, String name) -> bool"""
2382 return _core_.Image_HasOption(*args, **kwargs)
2383
2384 def CountColours(*args, **kwargs):
2385 """CountColours(self, unsigned long stopafter=(unsigned long) -1) -> unsigned long"""
2386 return _core_.Image_CountColours(*args, **kwargs)
2387
2388 def ComputeHistogram(*args, **kwargs):
2389 """ComputeHistogram(self, ImageHistogram h) -> unsigned long"""
2390 return _core_.Image_ComputeHistogram(*args, **kwargs)
2391
2392 def AddHandler(*args, **kwargs):
2393 """AddHandler(ImageHandler handler)"""
2394 return _core_.Image_AddHandler(*args, **kwargs)
2395
2396 AddHandler = staticmethod(AddHandler)
2397 def InsertHandler(*args, **kwargs):
2398 """InsertHandler(ImageHandler handler)"""
2399 return _core_.Image_InsertHandler(*args, **kwargs)
2400
2401 InsertHandler = staticmethod(InsertHandler)
2402 def RemoveHandler(*args, **kwargs):
2403 """RemoveHandler(String name) -> bool"""
2404 return _core_.Image_RemoveHandler(*args, **kwargs)
2405
2406 RemoveHandler = staticmethod(RemoveHandler)
2407 def GetImageExtWildcard(*args, **kwargs):
2408 """GetImageExtWildcard() -> String"""
2409 return _core_.Image_GetImageExtWildcard(*args, **kwargs)
2410
2411 GetImageExtWildcard = staticmethod(GetImageExtWildcard)
2412 def ConvertToBitmap(*args, **kwargs):
2413 """ConvertToBitmap(self, int depth=-1) -> Bitmap"""
2414 return _core_.Image_ConvertToBitmap(*args, **kwargs)
2415
2416 def ConvertToMonoBitmap(*args, **kwargs):
2417 """ConvertToMonoBitmap(self, unsigned char red, unsigned char green, unsigned char blue) -> Bitmap"""
2418 return _core_.Image_ConvertToMonoBitmap(*args, **kwargs)
2419
2420 def __nonzero__(self): return self.Ok()
2421
2422 class ImagePtr(Image):
2423 def __init__(self, this):
2424 self.this = this
2425 if not hasattr(self,"thisown"): self.thisown = 0
2426 self.__class__ = Image
2427 _core_.Image_swigregister(ImagePtr)
2428
2429 def ImageFromMime(*args, **kwargs):
2430 """ImageFromMime(String name, String mimetype, int index=-1) -> Image"""
2431 val = _core_.new_ImageFromMime(*args, **kwargs)
2432 val.thisown = 1
2433 return val
2434
2435 def ImageFromStream(*args, **kwargs):
2436 """ImageFromStream(InputStream stream, long type=BITMAP_TYPE_ANY, int index=-1) -> Image"""
2437 val = _core_.new_ImageFromStream(*args, **kwargs)
2438 val.thisown = 1
2439 return val
2440
2441 def ImageFromStreamMime(*args, **kwargs):
2442 """ImageFromStreamMime(InputStream stream, String mimetype, int index=-1) -> Image"""
2443 val = _core_.new_ImageFromStreamMime(*args, **kwargs)
2444 val.thisown = 1
2445 return val
2446
2447 def EmptyImage(*args, **kwargs):
2448 """EmptyImage(int width=0, int height=0, bool clear=True) -> Image"""
2449 val = _core_.new_EmptyImage(*args, **kwargs)
2450 val.thisown = 1
2451 return val
2452
2453 def ImageFromBitmap(*args, **kwargs):
2454 """ImageFromBitmap(Bitmap bitmap) -> Image"""
2455 val = _core_.new_ImageFromBitmap(*args, **kwargs)
2456 val.thisown = 1
2457 return val
2458
2459 def ImageFromData(*args, **kwargs):
2460 """ImageFromData(int width, int height, unsigned char data) -> Image"""
2461 val = _core_.new_ImageFromData(*args, **kwargs)
2462 val.thisown = 1
2463 return val
2464
2465 def ImageFromDataWithAlpha(*args, **kwargs):
2466 """ImageFromDataWithAlpha(int width, int height, unsigned char data, unsigned char alpha) -> Image"""
2467 val = _core_.new_ImageFromDataWithAlpha(*args, **kwargs)
2468 val.thisown = 1
2469 return val
2470
2471 def Image_CanRead(*args, **kwargs):
2472 """Image_CanRead(String name) -> bool"""
2473 return _core_.Image_CanRead(*args, **kwargs)
2474
2475 def Image_GetImageCount(*args, **kwargs):
2476 """Image_GetImageCount(String name, long type=BITMAP_TYPE_ANY) -> int"""
2477 return _core_.Image_GetImageCount(*args, **kwargs)
2478
2479 def Image_CanReadStream(*args, **kwargs):
2480 """Image_CanReadStream(InputStream stream) -> bool"""
2481 return _core_.Image_CanReadStream(*args, **kwargs)
2482
2483 def Image_AddHandler(*args, **kwargs):
2484 """Image_AddHandler(ImageHandler handler)"""
2485 return _core_.Image_AddHandler(*args, **kwargs)
2486
2487 def Image_InsertHandler(*args, **kwargs):
2488 """Image_InsertHandler(ImageHandler handler)"""
2489 return _core_.Image_InsertHandler(*args, **kwargs)
2490
2491 def Image_RemoveHandler(*args, **kwargs):
2492 """Image_RemoveHandler(String name) -> bool"""
2493 return _core_.Image_RemoveHandler(*args, **kwargs)
2494
2495 def Image_GetImageExtWildcard(*args, **kwargs):
2496 """Image_GetImageExtWildcard() -> String"""
2497 return _core_.Image_GetImageExtWildcard(*args, **kwargs)
2498
2499 def InitAllImageHandlers():
2500 """
2501 The former functionality of InitAllImageHanders is now done internal to
2502 the _core_ extension module and so this function has become a simple NOP.
2503 """
2504 pass
2505
2506 IMAGE_RESOLUTION_INCHES = _core_.IMAGE_RESOLUTION_INCHES
2507 IMAGE_RESOLUTION_CM = _core_.IMAGE_RESOLUTION_CM
2508 BMP_24BPP = _core_.BMP_24BPP
2509 BMP_8BPP = _core_.BMP_8BPP
2510 BMP_8BPP_GREY = _core_.BMP_8BPP_GREY
2511 BMP_8BPP_GRAY = _core_.BMP_8BPP_GRAY
2512 BMP_8BPP_RED = _core_.BMP_8BPP_RED
2513 BMP_8BPP_PALETTE = _core_.BMP_8BPP_PALETTE
2514 BMP_4BPP = _core_.BMP_4BPP
2515 BMP_1BPP = _core_.BMP_1BPP
2516 BMP_1BPP_BW = _core_.BMP_1BPP_BW
2517 class BMPHandler(ImageHandler):
2518 """Proxy of C++ BMPHandler class"""
2519 def __repr__(self):
2520 return "<%s.%s; proxy of C++ wxBMPHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
2521 def __init__(self, *args, **kwargs):
2522 """__init__(self) -> BMPHandler"""
2523 newobj = _core_.new_BMPHandler(*args, **kwargs)
2524 self.this = newobj.this
2525 self.thisown = 1
2526 del newobj.thisown
2527
2528 class BMPHandlerPtr(BMPHandler):
2529 def __init__(self, this):
2530 self.this = this
2531 if not hasattr(self,"thisown"): self.thisown = 0
2532 self.__class__ = BMPHandler
2533 _core_.BMPHandler_swigregister(BMPHandlerPtr)
2534 NullImage = cvar.NullImage
2535 IMAGE_OPTION_BMP_FORMAT = cvar.IMAGE_OPTION_BMP_FORMAT
2536 IMAGE_OPTION_CUR_HOTSPOT_X = cvar.IMAGE_OPTION_CUR_HOTSPOT_X
2537 IMAGE_OPTION_CUR_HOTSPOT_Y = cvar.IMAGE_OPTION_CUR_HOTSPOT_Y
2538 IMAGE_OPTION_RESOLUTION = cvar.IMAGE_OPTION_RESOLUTION
2539 IMAGE_OPTION_RESOLUTIONUNIT = cvar.IMAGE_OPTION_RESOLUTIONUNIT
2540
2541 class ICOHandler(BMPHandler):
2542 """Proxy of C++ ICOHandler class"""
2543 def __repr__(self):
2544 return "<%s.%s; proxy of C++ wxICOHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
2545 def __init__(self, *args, **kwargs):
2546 """__init__(self) -> ICOHandler"""
2547 newobj = _core_.new_ICOHandler(*args, **kwargs)
2548 self.this = newobj.this
2549 self.thisown = 1
2550 del newobj.thisown
2551
2552 class ICOHandlerPtr(ICOHandler):
2553 def __init__(self, this):
2554 self.this = this
2555 if not hasattr(self,"thisown"): self.thisown = 0
2556 self.__class__ = ICOHandler
2557 _core_.ICOHandler_swigregister(ICOHandlerPtr)
2558
2559 class CURHandler(ICOHandler):
2560 """Proxy of C++ CURHandler class"""
2561 def __repr__(self):
2562 return "<%s.%s; proxy of C++ wxCURHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
2563 def __init__(self, *args, **kwargs):
2564 """__init__(self) -> CURHandler"""
2565 newobj = _core_.new_CURHandler(*args, **kwargs)
2566 self.this = newobj.this
2567 self.thisown = 1
2568 del newobj.thisown
2569
2570 class CURHandlerPtr(CURHandler):
2571 def __init__(self, this):
2572 self.this = this
2573 if not hasattr(self,"thisown"): self.thisown = 0
2574 self.__class__ = CURHandler
2575 _core_.CURHandler_swigregister(CURHandlerPtr)
2576
2577 class ANIHandler(CURHandler):
2578 """Proxy of C++ ANIHandler class"""
2579 def __repr__(self):
2580 return "<%s.%s; proxy of C++ wxANIHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
2581 def __init__(self, *args, **kwargs):
2582 """__init__(self) -> ANIHandler"""
2583 newobj = _core_.new_ANIHandler(*args, **kwargs)
2584 self.this = newobj.this
2585 self.thisown = 1
2586 del newobj.thisown
2587
2588 class ANIHandlerPtr(ANIHandler):
2589 def __init__(self, this):
2590 self.this = this
2591 if not hasattr(self,"thisown"): self.thisown = 0
2592 self.__class__ = ANIHandler
2593 _core_.ANIHandler_swigregister(ANIHandlerPtr)
2594
2595 class PNGHandler(ImageHandler):
2596 """Proxy of C++ PNGHandler class"""
2597 def __repr__(self):
2598 return "<%s.%s; proxy of C++ wxPNGHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
2599 def __init__(self, *args, **kwargs):
2600 """__init__(self) -> PNGHandler"""
2601 newobj = _core_.new_PNGHandler(*args, **kwargs)
2602 self.this = newobj.this
2603 self.thisown = 1
2604 del newobj.thisown
2605
2606 class PNGHandlerPtr(PNGHandler):
2607 def __init__(self, this):
2608 self.this = this
2609 if not hasattr(self,"thisown"): self.thisown = 0
2610 self.__class__ = PNGHandler
2611 _core_.PNGHandler_swigregister(PNGHandlerPtr)
2612
2613 class GIFHandler(ImageHandler):
2614 """Proxy of C++ GIFHandler class"""
2615 def __repr__(self):
2616 return "<%s.%s; proxy of C++ wxGIFHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
2617 def __init__(self, *args, **kwargs):
2618 """__init__(self) -> GIFHandler"""
2619 newobj = _core_.new_GIFHandler(*args, **kwargs)
2620 self.this = newobj.this
2621 self.thisown = 1
2622 del newobj.thisown
2623
2624 class GIFHandlerPtr(GIFHandler):
2625 def __init__(self, this):
2626 self.this = this
2627 if not hasattr(self,"thisown"): self.thisown = 0
2628 self.__class__ = GIFHandler
2629 _core_.GIFHandler_swigregister(GIFHandlerPtr)
2630
2631 class PCXHandler(ImageHandler):
2632 """Proxy of C++ PCXHandler class"""
2633 def __repr__(self):
2634 return "<%s.%s; proxy of C++ wxPCXHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
2635 def __init__(self, *args, **kwargs):
2636 """__init__(self) -> PCXHandler"""
2637 newobj = _core_.new_PCXHandler(*args, **kwargs)
2638 self.this = newobj.this
2639 self.thisown = 1
2640 del newobj.thisown
2641
2642 class PCXHandlerPtr(PCXHandler):
2643 def __init__(self, this):
2644 self.this = this
2645 if not hasattr(self,"thisown"): self.thisown = 0
2646 self.__class__ = PCXHandler
2647 _core_.PCXHandler_swigregister(PCXHandlerPtr)
2648
2649 class JPEGHandler(ImageHandler):
2650 """Proxy of C++ JPEGHandler class"""
2651 def __repr__(self):
2652 return "<%s.%s; proxy of C++ wxJPEGHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
2653 def __init__(self, *args, **kwargs):
2654 """__init__(self) -> JPEGHandler"""
2655 newobj = _core_.new_JPEGHandler(*args, **kwargs)
2656 self.this = newobj.this
2657 self.thisown = 1
2658 del newobj.thisown
2659
2660 class JPEGHandlerPtr(JPEGHandler):
2661 def __init__(self, this):
2662 self.this = this
2663 if not hasattr(self,"thisown"): self.thisown = 0
2664 self.__class__ = JPEGHandler
2665 _core_.JPEGHandler_swigregister(JPEGHandlerPtr)
2666
2667 class PNMHandler(ImageHandler):
2668 """Proxy of C++ PNMHandler class"""
2669 def __repr__(self):
2670 return "<%s.%s; proxy of C++ wxPNMHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
2671 def __init__(self, *args, **kwargs):
2672 """__init__(self) -> PNMHandler"""
2673 newobj = _core_.new_PNMHandler(*args, **kwargs)
2674 self.this = newobj.this
2675 self.thisown = 1
2676 del newobj.thisown
2677
2678 class PNMHandlerPtr(PNMHandler):
2679 def __init__(self, this):
2680 self.this = this
2681 if not hasattr(self,"thisown"): self.thisown = 0
2682 self.__class__ = PNMHandler
2683 _core_.PNMHandler_swigregister(PNMHandlerPtr)
2684
2685 class XPMHandler(ImageHandler):
2686 """Proxy of C++ XPMHandler class"""
2687 def __repr__(self):
2688 return "<%s.%s; proxy of C++ wxXPMHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
2689 def __init__(self, *args, **kwargs):
2690 """__init__(self) -> XPMHandler"""
2691 newobj = _core_.new_XPMHandler(*args, **kwargs)
2692 self.this = newobj.this
2693 self.thisown = 1
2694 del newobj.thisown
2695
2696 class XPMHandlerPtr(XPMHandler):
2697 def __init__(self, this):
2698 self.this = this
2699 if not hasattr(self,"thisown"): self.thisown = 0
2700 self.__class__ = XPMHandler
2701 _core_.XPMHandler_swigregister(XPMHandlerPtr)
2702
2703 class TIFFHandler(ImageHandler):
2704 """Proxy of C++ TIFFHandler class"""
2705 def __repr__(self):
2706 return "<%s.%s; proxy of C++ wxTIFFHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
2707 def __init__(self, *args, **kwargs):
2708 """__init__(self) -> TIFFHandler"""
2709 newobj = _core_.new_TIFFHandler(*args, **kwargs)
2710 self.this = newobj.this
2711 self.thisown = 1
2712 del newobj.thisown
2713
2714 class TIFFHandlerPtr(TIFFHandler):
2715 def __init__(self, this):
2716 self.this = this
2717 if not hasattr(self,"thisown"): self.thisown = 0
2718 self.__class__ = TIFFHandler
2719 _core_.TIFFHandler_swigregister(TIFFHandlerPtr)
2720
2721 QUANTIZE_INCLUDE_WINDOWS_COLOURS = _core_.QUANTIZE_INCLUDE_WINDOWS_COLOURS
2722 QUANTIZE_FILL_DESTINATION_IMAGE = _core_.QUANTIZE_FILL_DESTINATION_IMAGE
2723 class Quantize(object):
2724 """Performs quantization, or colour reduction, on a wxImage."""
2725 def __init__(self): raise RuntimeError, "No constructor defined"
2726 def __repr__(self):
2727 return "<%s.%s; proxy of C++ wxQuantize instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
2728 def Quantize(*args, **kwargs):
2729 """
2730 Quantize(Image src, Image dest, int desiredNoColours=236, int flags=wxQUANTIZE_INCLUDE_WINDOWS_COLOURS|wxQUANTIZE_FILL_DESTINATION_IMAGE) -> bool
2731
2732 Reduce the colours in the source image and put the result into the
2733 destination image, setting the palette in the destination if
2734 needed. Both images may be the same, to overwrite the source image.
2735 """
2736 return _core_.Quantize_Quantize(*args, **kwargs)
2737
2738 Quantize = staticmethod(Quantize)
2739
2740 class QuantizePtr(Quantize):
2741 def __init__(self, this):
2742 self.this = this
2743 if not hasattr(self,"thisown"): self.thisown = 0
2744 self.__class__ = Quantize
2745 _core_.Quantize_swigregister(QuantizePtr)
2746
2747 def Quantize_Quantize(*args, **kwargs):
2748 """
2749 Quantize_Quantize(Image src, Image dest, int desiredNoColours=236, int flags=wxQUANTIZE_INCLUDE_WINDOWS_COLOURS|wxQUANTIZE_FILL_DESTINATION_IMAGE) -> bool
2750
2751 Reduce the colours in the source image and put the result into the
2752 destination image, setting the palette in the destination if
2753 needed. Both images may be the same, to overwrite the source image.
2754 """
2755 return _core_.Quantize_Quantize(*args, **kwargs)
2756
2757 #---------------------------------------------------------------------------
2758
2759 class EvtHandler(Object):
2760 """Proxy of C++ EvtHandler class"""
2761 def __repr__(self):
2762 return "<%s.%s; proxy of C++ wxEvtHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
2763 def __init__(self, *args, **kwargs):
2764 """__init__(self) -> EvtHandler"""
2765 newobj = _core_.new_EvtHandler(*args, **kwargs)
2766 self.this = newobj.this
2767 self.thisown = 1
2768 del newobj.thisown
2769 def GetNextHandler(*args, **kwargs):
2770 """GetNextHandler(self) -> EvtHandler"""
2771 return _core_.EvtHandler_GetNextHandler(*args, **kwargs)
2772
2773 def GetPreviousHandler(*args, **kwargs):
2774 """GetPreviousHandler(self) -> EvtHandler"""
2775 return _core_.EvtHandler_GetPreviousHandler(*args, **kwargs)
2776
2777 def SetNextHandler(*args, **kwargs):
2778 """SetNextHandler(self, EvtHandler handler)"""
2779 return _core_.EvtHandler_SetNextHandler(*args, **kwargs)
2780
2781 def SetPreviousHandler(*args, **kwargs):
2782 """SetPreviousHandler(self, EvtHandler handler)"""
2783 return _core_.EvtHandler_SetPreviousHandler(*args, **kwargs)
2784
2785 def GetEvtHandlerEnabled(*args, **kwargs):
2786 """GetEvtHandlerEnabled(self) -> bool"""
2787 return _core_.EvtHandler_GetEvtHandlerEnabled(*args, **kwargs)
2788
2789 def SetEvtHandlerEnabled(*args, **kwargs):
2790 """SetEvtHandlerEnabled(self, bool enabled)"""
2791 return _core_.EvtHandler_SetEvtHandlerEnabled(*args, **kwargs)
2792
2793 def ProcessEvent(*args, **kwargs):
2794 """ProcessEvent(self, Event event) -> bool"""
2795 return _core_.EvtHandler_ProcessEvent(*args, **kwargs)
2796
2797 def AddPendingEvent(*args, **kwargs):
2798 """AddPendingEvent(self, Event event)"""
2799 return _core_.EvtHandler_AddPendingEvent(*args, **kwargs)
2800
2801 def ProcessPendingEvents(*args, **kwargs):
2802 """ProcessPendingEvents(self)"""
2803 return _core_.EvtHandler_ProcessPendingEvents(*args, **kwargs)
2804
2805 def Connect(*args, **kwargs):
2806 """Connect(self, int id, int lastId, int eventType, PyObject func)"""
2807 return _core_.EvtHandler_Connect(*args, **kwargs)
2808
2809 def Disconnect(*args, **kwargs):
2810 """Disconnect(self, int id, int lastId=-1, wxEventType eventType=wxEVT_NULL) -> bool"""
2811 return _core_.EvtHandler_Disconnect(*args, **kwargs)
2812
2813 def _setOORInfo(*args, **kwargs):
2814 """_setOORInfo(self, PyObject _self, bool incref=True)"""
2815 return _core_.EvtHandler__setOORInfo(*args, **kwargs)
2816
2817 def Bind(self, event, handler, source=None, id=wx.ID_ANY, id2=wx.ID_ANY):
2818 """
2819 Bind an event to an event handler.
2820
2821 :param event: One of the EVT_* objects that specifies the
2822 type of event to bind,
2823
2824 :param handler: A callable object to be invoked when the
2825 event is delivered to self. Pass None to
2826 disconnect an event handler.
2827
2828 :param source: Sometimes the event originates from a
2829 different window than self, but you still
2830 want to catch it in self. (For example, a
2831 button event delivered to a frame.) By
2832 passing the source of the event, the event
2833 handling system is able to differentiate
2834 between the same event type from different
2835 controls.
2836
2837 :param id: Used to spcify the event source by ID instead
2838 of instance.
2839
2840 :param id2: Used when it is desirable to bind a handler
2841 to a range of IDs, such as with EVT_MENU_RANGE.
2842 """
2843 if source is not None:
2844 id = source.GetId()
2845 event.Bind(self, id, id2, handler)
2846
2847 def Unbind(self, event, source=None, id=wx.ID_ANY, id2=wx.ID_ANY):
2848 """
2849 Disconencts the event handler binding for event from self.
2850 Returns True if successful.
2851 """
2852 if source is not None:
2853 id = source.GetId()
2854 return event.Unbind(self, id, id2)
2855
2856
2857 class EvtHandlerPtr(EvtHandler):
2858 def __init__(self, this):
2859 self.this = this
2860 if not hasattr(self,"thisown"): self.thisown = 0
2861 self.__class__ = EvtHandler
2862 _core_.EvtHandler_swigregister(EvtHandlerPtr)
2863
2864 #---------------------------------------------------------------------------
2865
2866 class PyEventBinder(object):
2867 """
2868 Instances of this class are used to bind specific events to event
2869 handlers.
2870 """
2871 def __init__(self, evtType, expectedIDs=0):
2872 if expectedIDs not in [0, 1, 2]:
2873 raise ValueError, "Invalid number of expectedIDs"
2874 self.expectedIDs = expectedIDs
2875
2876 if type(evtType) == list or type(evtType) == tuple:
2877 self.evtType = evtType
2878 else:
2879 self.evtType = [evtType]
2880
2881
2882 def Bind(self, target, id1, id2, function):
2883 """Bind this set of event types to target."""
2884 for et in self.evtType:
2885 target.Connect(id1, id2, et, function)
2886
2887
2888 def Unbind(self, target, id1, id2):
2889 """Remove an event binding."""
2890 success = 0
2891 for et in self.evtType:
2892 success += target.Disconnect(id1, id2, et)
2893 return success != 0
2894
2895
2896 def __call__(self, *args):
2897 """
2898 For backwards compatibility with the old EVT_* functions.
2899 Should be called with either (window, func), (window, ID,
2900 func) or (window, ID1, ID2, func) parameters depending on the
2901 type of the event.
2902 """
2903 assert len(args) == 2 + self.expectedIDs
2904 id1 = wx.ID_ANY
2905 id2 = wx.ID_ANY
2906 target = args[0]
2907 if self.expectedIDs == 0:
2908 func = args[1]
2909 elif self.expectedIDs == 1:
2910 id1 = args[1]
2911 func = args[2]
2912 elif self.expectedIDs == 2:
2913 id1 = args[1]
2914 id2 = args[2]
2915 func = args[3]
2916 else:
2917 raise ValueError, "Unexpected number of IDs"
2918
2919 self.Bind(target, id1, id2, func)
2920
2921
2922 # These two are square pegs that don't fit the PyEventBinder hole...
2923 def EVT_COMMAND(win, id, cmd, func):
2924 win.Connect(id, -1, cmd, func)
2925 def EVT_COMMAND_RANGE(win, id1, id2, cmd, func):
2926 win.Connect(id1, id2, cmd, func)
2927
2928
2929 #---------------------------------------------------------------------------
2930
2931 #---------------------------------------------------------------------------
2932
2933 EVENT_PROPAGATE_NONE = _core_.EVENT_PROPAGATE_NONE
2934 EVENT_PROPAGATE_MAX = _core_.EVENT_PROPAGATE_MAX
2935
2936 def NewEventType(*args, **kwargs):
2937 """NewEventType() -> wxEventType"""
2938 return _core_.NewEventType(*args, **kwargs)
2939 wxEVT_NULL = _core_.wxEVT_NULL
2940 wxEVT_FIRST = _core_.wxEVT_FIRST
2941 wxEVT_USER_FIRST = _core_.wxEVT_USER_FIRST
2942 wxEVT_COMMAND_BUTTON_CLICKED = _core_.wxEVT_COMMAND_BUTTON_CLICKED
2943 wxEVT_COMMAND_CHECKBOX_CLICKED = _core_.wxEVT_COMMAND_CHECKBOX_CLICKED
2944 wxEVT_COMMAND_CHOICE_SELECTED = _core_.wxEVT_COMMAND_CHOICE_SELECTED
2945 wxEVT_COMMAND_LISTBOX_SELECTED = _core_.wxEVT_COMMAND_LISTBOX_SELECTED
2946 wxEVT_COMMAND_LISTBOX_DOUBLECLICKED = _core_.wxEVT_COMMAND_LISTBOX_DOUBLECLICKED
2947 wxEVT_COMMAND_CHECKLISTBOX_TOGGLED = _core_.wxEVT_COMMAND_CHECKLISTBOX_TOGGLED
2948 wxEVT_COMMAND_MENU_SELECTED = _core_.wxEVT_COMMAND_MENU_SELECTED
2949 wxEVT_COMMAND_TOOL_CLICKED = _core_.wxEVT_COMMAND_TOOL_CLICKED
2950 wxEVT_COMMAND_SLIDER_UPDATED = _core_.wxEVT_COMMAND_SLIDER_UPDATED
2951 wxEVT_COMMAND_RADIOBOX_SELECTED = _core_.wxEVT_COMMAND_RADIOBOX_SELECTED
2952 wxEVT_COMMAND_RADIOBUTTON_SELECTED = _core_.wxEVT_COMMAND_RADIOBUTTON_SELECTED
2953 wxEVT_COMMAND_SCROLLBAR_UPDATED = _core_.wxEVT_COMMAND_SCROLLBAR_UPDATED
2954 wxEVT_COMMAND_VLBOX_SELECTED = _core_.wxEVT_COMMAND_VLBOX_SELECTED
2955 wxEVT_COMMAND_COMBOBOX_SELECTED = _core_.wxEVT_COMMAND_COMBOBOX_SELECTED
2956 wxEVT_COMMAND_TOOL_RCLICKED = _core_.wxEVT_COMMAND_TOOL_RCLICKED
2957 wxEVT_COMMAND_TOOL_ENTER = _core_.wxEVT_COMMAND_TOOL_ENTER
2958 wxEVT_LEFT_DOWN = _core_.wxEVT_LEFT_DOWN
2959 wxEVT_LEFT_UP = _core_.wxEVT_LEFT_UP
2960 wxEVT_MIDDLE_DOWN = _core_.wxEVT_MIDDLE_DOWN
2961 wxEVT_MIDDLE_UP = _core_.wxEVT_MIDDLE_UP
2962 wxEVT_RIGHT_DOWN = _core_.wxEVT_RIGHT_DOWN
2963 wxEVT_RIGHT_UP = _core_.wxEVT_RIGHT_UP
2964 wxEVT_MOTION = _core_.wxEVT_MOTION
2965 wxEVT_ENTER_WINDOW = _core_.wxEVT_ENTER_WINDOW
2966 wxEVT_LEAVE_WINDOW = _core_.wxEVT_LEAVE_WINDOW
2967 wxEVT_LEFT_DCLICK = _core_.wxEVT_LEFT_DCLICK
2968 wxEVT_MIDDLE_DCLICK = _core_.wxEVT_MIDDLE_DCLICK
2969 wxEVT_RIGHT_DCLICK = _core_.wxEVT_RIGHT_DCLICK
2970 wxEVT_SET_FOCUS = _core_.wxEVT_SET_FOCUS
2971 wxEVT_KILL_FOCUS = _core_.wxEVT_KILL_FOCUS
2972 wxEVT_CHILD_FOCUS = _core_.wxEVT_CHILD_FOCUS
2973 wxEVT_MOUSEWHEEL = _core_.wxEVT_MOUSEWHEEL
2974 wxEVT_NC_LEFT_DOWN = _core_.wxEVT_NC_LEFT_DOWN
2975 wxEVT_NC_LEFT_UP = _core_.wxEVT_NC_LEFT_UP
2976 wxEVT_NC_MIDDLE_DOWN = _core_.wxEVT_NC_MIDDLE_DOWN
2977 wxEVT_NC_MIDDLE_UP = _core_.wxEVT_NC_MIDDLE_UP
2978 wxEVT_NC_RIGHT_DOWN = _core_.wxEVT_NC_RIGHT_DOWN
2979 wxEVT_NC_RIGHT_UP = _core_.wxEVT_NC_RIGHT_UP
2980 wxEVT_NC_MOTION = _core_.wxEVT_NC_MOTION
2981 wxEVT_NC_ENTER_WINDOW = _core_.wxEVT_NC_ENTER_WINDOW
2982 wxEVT_NC_LEAVE_WINDOW = _core_.wxEVT_NC_LEAVE_WINDOW
2983 wxEVT_NC_LEFT_DCLICK = _core_.wxEVT_NC_LEFT_DCLICK
2984 wxEVT_NC_MIDDLE_DCLICK = _core_.wxEVT_NC_MIDDLE_DCLICK
2985 wxEVT_NC_RIGHT_DCLICK = _core_.wxEVT_NC_RIGHT_DCLICK
2986 wxEVT_CHAR = _core_.wxEVT_CHAR
2987 wxEVT_CHAR_HOOK = _core_.wxEVT_CHAR_HOOK
2988 wxEVT_NAVIGATION_KEY = _core_.wxEVT_NAVIGATION_KEY
2989 wxEVT_KEY_DOWN = _core_.wxEVT_KEY_DOWN
2990 wxEVT_KEY_UP = _core_.wxEVT_KEY_UP
2991 wxEVT_HOTKEY = _core_.wxEVT_HOTKEY
2992 wxEVT_SET_CURSOR = _core_.wxEVT_SET_CURSOR
2993 wxEVT_SCROLL_TOP = _core_.wxEVT_SCROLL_TOP
2994 wxEVT_SCROLL_BOTTOM = _core_.wxEVT_SCROLL_BOTTOM
2995 wxEVT_SCROLL_LINEUP = _core_.wxEVT_SCROLL_LINEUP
2996 wxEVT_SCROLL_LINEDOWN = _core_.wxEVT_SCROLL_LINEDOWN
2997 wxEVT_SCROLL_PAGEUP = _core_.wxEVT_SCROLL_PAGEUP
2998 wxEVT_SCROLL_PAGEDOWN = _core_.wxEVT_SCROLL_PAGEDOWN
2999 wxEVT_SCROLL_THUMBTRACK = _core_.wxEVT_SCROLL_THUMBTRACK
3000 wxEVT_SCROLL_THUMBRELEASE = _core_.wxEVT_SCROLL_THUMBRELEASE
3001 wxEVT_SCROLL_ENDSCROLL = _core_.wxEVT_SCROLL_ENDSCROLL
3002 wxEVT_SCROLLWIN_TOP = _core_.wxEVT_SCROLLWIN_TOP
3003 wxEVT_SCROLLWIN_BOTTOM = _core_.wxEVT_SCROLLWIN_BOTTOM
3004 wxEVT_SCROLLWIN_LINEUP = _core_.wxEVT_SCROLLWIN_LINEUP
3005 wxEVT_SCROLLWIN_LINEDOWN = _core_.wxEVT_SCROLLWIN_LINEDOWN
3006 wxEVT_SCROLLWIN_PAGEUP = _core_.wxEVT_SCROLLWIN_PAGEUP
3007 wxEVT_SCROLLWIN_PAGEDOWN = _core_.wxEVT_SCROLLWIN_PAGEDOWN
3008 wxEVT_SCROLLWIN_THUMBTRACK = _core_.wxEVT_SCROLLWIN_THUMBTRACK
3009 wxEVT_SCROLLWIN_THUMBRELEASE = _core_.wxEVT_SCROLLWIN_THUMBRELEASE
3010 wxEVT_SIZE = _core_.wxEVT_SIZE
3011 wxEVT_MOVE = _core_.wxEVT_MOVE
3012 wxEVT_CLOSE_WINDOW = _core_.wxEVT_CLOSE_WINDOW
3013 wxEVT_END_SESSION = _core_.wxEVT_END_SESSION
3014 wxEVT_QUERY_END_SESSION = _core_.wxEVT_QUERY_END_SESSION
3015 wxEVT_ACTIVATE_APP = _core_.wxEVT_ACTIVATE_APP
3016 wxEVT_POWER = _core_.wxEVT_POWER
3017 wxEVT_ACTIVATE = _core_.wxEVT_ACTIVATE
3018 wxEVT_CREATE = _core_.wxEVT_CREATE
3019 wxEVT_DESTROY = _core_.wxEVT_DESTROY
3020 wxEVT_SHOW = _core_.wxEVT_SHOW
3021 wxEVT_ICONIZE = _core_.wxEVT_ICONIZE
3022 wxEVT_MAXIMIZE = _core_.wxEVT_MAXIMIZE
3023 wxEVT_MOUSE_CAPTURE_CHANGED = _core_.wxEVT_MOUSE_CAPTURE_CHANGED
3024 wxEVT_PAINT = _core_.wxEVT_PAINT
3025 wxEVT_ERASE_BACKGROUND = _core_.wxEVT_ERASE_BACKGROUND
3026 wxEVT_NC_PAINT = _core_.wxEVT_NC_PAINT
3027 wxEVT_PAINT_ICON = _core_.wxEVT_PAINT_ICON
3028 wxEVT_MENU_OPEN = _core_.wxEVT_MENU_OPEN
3029 wxEVT_MENU_CLOSE = _core_.wxEVT_MENU_CLOSE
3030 wxEVT_MENU_HIGHLIGHT = _core_.wxEVT_MENU_HIGHLIGHT
3031 wxEVT_CONTEXT_MENU = _core_.wxEVT_CONTEXT_MENU
3032 wxEVT_SYS_COLOUR_CHANGED = _core_.wxEVT_SYS_COLOUR_CHANGED
3033 wxEVT_DISPLAY_CHANGED = _core_.wxEVT_DISPLAY_CHANGED
3034 wxEVT_SETTING_CHANGED = _core_.wxEVT_SETTING_CHANGED
3035 wxEVT_QUERY_NEW_PALETTE = _core_.wxEVT_QUERY_NEW_PALETTE
3036 wxEVT_PALETTE_CHANGED = _core_.wxEVT_PALETTE_CHANGED
3037 wxEVT_DROP_FILES = _core_.wxEVT_DROP_FILES
3038 wxEVT_DRAW_ITEM = _core_.wxEVT_DRAW_ITEM
3039 wxEVT_MEASURE_ITEM = _core_.wxEVT_MEASURE_ITEM
3040 wxEVT_COMPARE_ITEM = _core_.wxEVT_COMPARE_ITEM
3041 wxEVT_INIT_DIALOG = _core_.wxEVT_INIT_DIALOG
3042 wxEVT_IDLE = _core_.wxEVT_IDLE
3043 wxEVT_UPDATE_UI = _core_.wxEVT_UPDATE_UI
3044 wxEVT_SIZING = _core_.wxEVT_SIZING
3045 wxEVT_MOVING = _core_.wxEVT_MOVING
3046 wxEVT_COMMAND_LEFT_CLICK = _core_.wxEVT_COMMAND_LEFT_CLICK
3047 wxEVT_COMMAND_LEFT_DCLICK = _core_.wxEVT_COMMAND_LEFT_DCLICK
3048 wxEVT_COMMAND_RIGHT_CLICK = _core_.wxEVT_COMMAND_RIGHT_CLICK
3049 wxEVT_COMMAND_RIGHT_DCLICK = _core_.wxEVT_COMMAND_RIGHT_DCLICK
3050 wxEVT_COMMAND_SET_FOCUS = _core_.wxEVT_COMMAND_SET_FOCUS
3051 wxEVT_COMMAND_KILL_FOCUS = _core_.wxEVT_COMMAND_KILL_FOCUS
3052 wxEVT_COMMAND_ENTER = _core_.wxEVT_COMMAND_ENTER
3053 #
3054 # Create some event binders
3055 EVT_SIZE = wx.PyEventBinder( wxEVT_SIZE )
3056 EVT_SIZING = wx.PyEventBinder( wxEVT_SIZING )
3057 EVT_MOVE = wx.PyEventBinder( wxEVT_MOVE )
3058 EVT_MOVING = wx.PyEventBinder( wxEVT_MOVING )
3059 EVT_CLOSE = wx.PyEventBinder( wxEVT_CLOSE_WINDOW )
3060 EVT_END_SESSION = wx.PyEventBinder( wxEVT_END_SESSION )
3061 EVT_QUERY_END_SESSION = wx.PyEventBinder( wxEVT_QUERY_END_SESSION )
3062 EVT_PAINT = wx.PyEventBinder( wxEVT_PAINT )
3063 EVT_NC_PAINT = wx.PyEventBinder( wxEVT_NC_PAINT )
3064 EVT_ERASE_BACKGROUND = wx.PyEventBinder( wxEVT_ERASE_BACKGROUND )
3065 EVT_CHAR = wx.PyEventBinder( wxEVT_CHAR )
3066 EVT_KEY_DOWN = wx.PyEventBinder( wxEVT_KEY_DOWN )
3067 EVT_KEY_UP = wx.PyEventBinder( wxEVT_KEY_UP )
3068 EVT_HOTKEY = wx.PyEventBinder( wxEVT_HOTKEY, 1)
3069 EVT_CHAR_HOOK = wx.PyEventBinder( wxEVT_CHAR_HOOK )
3070 EVT_MENU_OPEN = wx.PyEventBinder( wxEVT_MENU_OPEN )
3071 EVT_MENU_CLOSE = wx.PyEventBinder( wxEVT_MENU_CLOSE )
3072 EVT_MENU_HIGHLIGHT = wx.PyEventBinder( wxEVT_MENU_HIGHLIGHT, 1)
3073 EVT_MENU_HIGHLIGHT_ALL = wx.PyEventBinder( wxEVT_MENU_HIGHLIGHT )
3074 EVT_SET_FOCUS = wx.PyEventBinder( wxEVT_SET_FOCUS )
3075 EVT_KILL_FOCUS = wx.PyEventBinder( wxEVT_KILL_FOCUS )
3076 EVT_CHILD_FOCUS = wx.PyEventBinder( wxEVT_CHILD_FOCUS )
3077 EVT_ACTIVATE = wx.PyEventBinder( wxEVT_ACTIVATE )
3078 EVT_ACTIVATE_APP = wx.PyEventBinder( wxEVT_ACTIVATE_APP )
3079 EVT_END_SESSION = wx.PyEventBinder( wxEVT_END_SESSION )
3080 EVT_QUERY_END_SESSION = wx.PyEventBinder( wxEVT_QUERY_END_SESSION )
3081 EVT_DROP_FILES = wx.PyEventBinder( wxEVT_DROP_FILES )
3082 EVT_INIT_DIALOG = wx.PyEventBinder( wxEVT_INIT_DIALOG )
3083 EVT_SYS_COLOUR_CHANGED = wx.PyEventBinder( wxEVT_SYS_COLOUR_CHANGED )
3084 EVT_DISPLAY_CHANGED = wx.PyEventBinder( wxEVT_DISPLAY_CHANGED )
3085 EVT_SHOW = wx.PyEventBinder( wxEVT_SHOW )
3086 EVT_MAXIMIZE = wx.PyEventBinder( wxEVT_MAXIMIZE )
3087 EVT_ICONIZE = wx.PyEventBinder( wxEVT_ICONIZE )
3088 EVT_NAVIGATION_KEY = wx.PyEventBinder( wxEVT_NAVIGATION_KEY )
3089 EVT_PALETTE_CHANGED = wx.PyEventBinder( wxEVT_PALETTE_CHANGED )
3090 EVT_QUERY_NEW_PALETTE = wx.PyEventBinder( wxEVT_QUERY_NEW_PALETTE )
3091 EVT_WINDOW_CREATE = wx.PyEventBinder( wxEVT_CREATE )
3092 EVT_WINDOW_DESTROY = wx.PyEventBinder( wxEVT_DESTROY )
3093 EVT_SET_CURSOR = wx.PyEventBinder( wxEVT_SET_CURSOR )
3094 EVT_MOUSE_CAPTURE_CHANGED = wx.PyEventBinder( wxEVT_MOUSE_CAPTURE_CHANGED )
3095
3096 EVT_LEFT_DOWN = wx.PyEventBinder( wxEVT_LEFT_DOWN )
3097 EVT_LEFT_UP = wx.PyEventBinder( wxEVT_LEFT_UP )
3098 EVT_MIDDLE_DOWN = wx.PyEventBinder( wxEVT_MIDDLE_DOWN )
3099 EVT_MIDDLE_UP = wx.PyEventBinder( wxEVT_MIDDLE_UP )
3100 EVT_RIGHT_DOWN = wx.PyEventBinder( wxEVT_RIGHT_DOWN )
3101 EVT_RIGHT_UP = wx.PyEventBinder( wxEVT_RIGHT_UP )
3102 EVT_MOTION = wx.PyEventBinder( wxEVT_MOTION )
3103 EVT_LEFT_DCLICK = wx.PyEventBinder( wxEVT_LEFT_DCLICK )
3104 EVT_MIDDLE_DCLICK = wx.PyEventBinder( wxEVT_MIDDLE_DCLICK )
3105 EVT_RIGHT_DCLICK = wx.PyEventBinder( wxEVT_RIGHT_DCLICK )
3106 EVT_LEAVE_WINDOW = wx.PyEventBinder( wxEVT_LEAVE_WINDOW )
3107 EVT_ENTER_WINDOW = wx.PyEventBinder( wxEVT_ENTER_WINDOW )
3108 EVT_MOUSEWHEEL = wx.PyEventBinder( wxEVT_MOUSEWHEEL )
3109
3110 EVT_MOUSE_EVENTS = wx.PyEventBinder([ wxEVT_LEFT_DOWN,
3111 wxEVT_LEFT_UP,
3112 wxEVT_MIDDLE_DOWN,
3113 wxEVT_MIDDLE_UP,
3114 wxEVT_RIGHT_DOWN,
3115 wxEVT_RIGHT_UP,
3116 wxEVT_MOTION,
3117 wxEVT_LEFT_DCLICK,
3118 wxEVT_MIDDLE_DCLICK,
3119 wxEVT_RIGHT_DCLICK,
3120 wxEVT_ENTER_WINDOW,
3121 wxEVT_LEAVE_WINDOW,
3122 wxEVT_MOUSEWHEEL
3123 ])
3124
3125
3126 # Scrolling from wxWindow (sent to wxScrolledWindow)
3127 EVT_SCROLLWIN = wx.PyEventBinder([ wxEVT_SCROLLWIN_TOP,
3128 wxEVT_SCROLLWIN_BOTTOM,
3129 wxEVT_SCROLLWIN_LINEUP,
3130 wxEVT_SCROLLWIN_LINEDOWN,
3131 wxEVT_SCROLLWIN_PAGEUP,
3132 wxEVT_SCROLLWIN_PAGEDOWN,
3133 wxEVT_SCROLLWIN_THUMBTRACK,
3134 wxEVT_SCROLLWIN_THUMBRELEASE,
3135 ])
3136
3137 EVT_SCROLLWIN_TOP = wx.PyEventBinder( wxEVT_SCROLLWIN_TOP )
3138 EVT_SCROLLWIN_BOTTOM = wx.PyEventBinder( wxEVT_SCROLLWIN_BOTTOM )
3139 EVT_SCROLLWIN_LINEUP = wx.PyEventBinder( wxEVT_SCROLLWIN_LINEUP )
3140 EVT_SCROLLWIN_LINEDOWN = wx.PyEventBinder( wxEVT_SCROLLWIN_LINEDOWN )
3141 EVT_SCROLLWIN_PAGEUP = wx.PyEventBinder( wxEVT_SCROLLWIN_PAGEUP )
3142 EVT_SCROLLWIN_PAGEDOWN = wx.PyEventBinder( wxEVT_SCROLLWIN_PAGEDOWN )
3143 EVT_SCROLLWIN_THUMBTRACK = wx.PyEventBinder( wxEVT_SCROLLWIN_THUMBTRACK )
3144 EVT_SCROLLWIN_THUMBRELEASE = wx.PyEventBinder( wxEVT_SCROLLWIN_THUMBRELEASE )
3145
3146 # Scrolling from wxSlider and wxScrollBar
3147 EVT_SCROLL = wx.PyEventBinder([ wxEVT_SCROLL_TOP,
3148 wxEVT_SCROLL_BOTTOM,
3149 wxEVT_SCROLL_LINEUP,
3150 wxEVT_SCROLL_LINEDOWN,
3151 wxEVT_SCROLL_PAGEUP,
3152 wxEVT_SCROLL_PAGEDOWN,
3153 wxEVT_SCROLL_THUMBTRACK,
3154 wxEVT_SCROLL_THUMBRELEASE,
3155 wxEVT_SCROLL_ENDSCROLL,
3156 ])
3157
3158 EVT_SCROLL_TOP = wx.PyEventBinder( wxEVT_SCROLL_TOP )
3159 EVT_SCROLL_BOTTOM = wx.PyEventBinder( wxEVT_SCROLL_BOTTOM )
3160 EVT_SCROLL_LINEUP = wx.PyEventBinder( wxEVT_SCROLL_LINEUP )
3161 EVT_SCROLL_LINEDOWN = wx.PyEventBinder( wxEVT_SCROLL_LINEDOWN )
3162 EVT_SCROLL_PAGEUP = wx.PyEventBinder( wxEVT_SCROLL_PAGEUP )
3163 EVT_SCROLL_PAGEDOWN = wx.PyEventBinder( wxEVT_SCROLL_PAGEDOWN )
3164 EVT_SCROLL_THUMBTRACK = wx.PyEventBinder( wxEVT_SCROLL_THUMBTRACK )
3165 EVT_SCROLL_THUMBRELEASE = wx.PyEventBinder( wxEVT_SCROLL_THUMBRELEASE )
3166 EVT_SCROLL_ENDSCROLL = wx.PyEventBinder( wxEVT_SCROLL_ENDSCROLL )
3167
3168 # Scrolling from wxSlider and wxScrollBar, with an id
3169 EVT_COMMAND_SCROLL = wx.PyEventBinder([ wxEVT_SCROLL_TOP,
3170 wxEVT_SCROLL_BOTTOM,
3171 wxEVT_SCROLL_LINEUP,
3172 wxEVT_SCROLL_LINEDOWN,
3173 wxEVT_SCROLL_PAGEUP,
3174 wxEVT_SCROLL_PAGEDOWN,
3175 wxEVT_SCROLL_THUMBTRACK,
3176 wxEVT_SCROLL_THUMBRELEASE,
3177 wxEVT_SCROLL_ENDSCROLL,
3178 ], 1)
3179
3180 EVT_COMMAND_SCROLL_TOP = wx.PyEventBinder( wxEVT_SCROLL_TOP, 1)
3181 EVT_COMMAND_SCROLL_BOTTOM = wx.PyEventBinder( wxEVT_SCROLL_BOTTOM, 1)
3182 EVT_COMMAND_SCROLL_LINEUP = wx.PyEventBinder( wxEVT_SCROLL_LINEUP, 1)
3183 EVT_COMMAND_SCROLL_LINEDOWN = wx.PyEventBinder( wxEVT_SCROLL_LINEDOWN, 1)
3184 EVT_COMMAND_SCROLL_PAGEUP = wx.PyEventBinder( wxEVT_SCROLL_PAGEUP, 1)
3185 EVT_COMMAND_SCROLL_PAGEDOWN = wx.PyEventBinder( wxEVT_SCROLL_PAGEDOWN, 1)
3186 EVT_COMMAND_SCROLL_THUMBTRACK = wx.PyEventBinder( wxEVT_SCROLL_THUMBTRACK, 1)
3187 EVT_COMMAND_SCROLL_THUMBRELEASE = wx.PyEventBinder( wxEVT_SCROLL_THUMBRELEASE, 1)
3188 EVT_COMMAND_SCROLL_ENDSCROLL = wx.PyEventBinder( wxEVT_SCROLL_ENDSCROLL, 1)
3189
3190 EVT_BUTTON = wx.PyEventBinder( wxEVT_COMMAND_BUTTON_CLICKED, 1)
3191 EVT_CHECKBOX = wx.PyEventBinder( wxEVT_COMMAND_CHECKBOX_CLICKED, 1)
3192 EVT_CHOICE = wx.PyEventBinder( wxEVT_COMMAND_CHOICE_SELECTED, 1)
3193 EVT_LISTBOX = wx.PyEventBinder( wxEVT_COMMAND_LISTBOX_SELECTED, 1)
3194 EVT_LISTBOX_DCLICK = wx.PyEventBinder( wxEVT_COMMAND_LISTBOX_DOUBLECLICKED, 1)
3195 EVT_MENU = wx.PyEventBinder( wxEVT_COMMAND_MENU_SELECTED, 1)
3196 EVT_MENU_RANGE = wx.PyEventBinder( wxEVT_COMMAND_MENU_SELECTED, 2)
3197 EVT_SLIDER = wx.PyEventBinder( wxEVT_COMMAND_SLIDER_UPDATED, 1)
3198 EVT_RADIOBOX = wx.PyEventBinder( wxEVT_COMMAND_RADIOBOX_SELECTED, 1)
3199 EVT_RADIOBUTTON = wx.PyEventBinder( wxEVT_COMMAND_RADIOBUTTON_SELECTED, 1)
3200
3201 EVT_SCROLLBAR = wx.PyEventBinder( wxEVT_COMMAND_SCROLLBAR_UPDATED, 1)
3202 EVT_VLBOX = wx.PyEventBinder( wxEVT_COMMAND_VLBOX_SELECTED, 1)
3203 EVT_COMBOBOX = wx.PyEventBinder( wxEVT_COMMAND_COMBOBOX_SELECTED, 1)
3204 EVT_TOOL = wx.PyEventBinder( wxEVT_COMMAND_TOOL_CLICKED, 1)
3205 EVT_TOOL_RANGE = wx.PyEventBinder( wxEVT_COMMAND_TOOL_CLICKED, 2)
3206 EVT_TOOL_RCLICKED = wx.PyEventBinder( wxEVT_COMMAND_TOOL_RCLICKED, 1)
3207 EVT_TOOL_RCLICKED_RANGE = wx.PyEventBinder( wxEVT_COMMAND_TOOL_RCLICKED, 2)
3208 EVT_TOOL_ENTER = wx.PyEventBinder( wxEVT_COMMAND_TOOL_ENTER, 1)
3209 EVT_CHECKLISTBOX = wx.PyEventBinder( wxEVT_COMMAND_CHECKLISTBOX_TOGGLED, 1)
3210
3211
3212 EVT_COMMAND_LEFT_CLICK = wx.PyEventBinder( wxEVT_COMMAND_LEFT_CLICK, 1)
3213 EVT_COMMAND_LEFT_DCLICK = wx.PyEventBinder( wxEVT_COMMAND_LEFT_DCLICK, 1)
3214 EVT_COMMAND_RIGHT_CLICK = wx.PyEventBinder( wxEVT_COMMAND_RIGHT_CLICK, 1)
3215 EVT_COMMAND_RIGHT_DCLICK = wx.PyEventBinder( wxEVT_COMMAND_RIGHT_DCLICK, 1)
3216 EVT_COMMAND_SET_FOCUS = wx.PyEventBinder( wxEVT_COMMAND_SET_FOCUS, 1)
3217 EVT_COMMAND_KILL_FOCUS = wx.PyEventBinder( wxEVT_COMMAND_KILL_FOCUS, 1)
3218 EVT_COMMAND_ENTER = wx.PyEventBinder( wxEVT_COMMAND_ENTER, 1)
3219
3220 EVT_IDLE = wx.PyEventBinder( wxEVT_IDLE )
3221
3222 EVT_UPDATE_UI = wx.PyEventBinder( wxEVT_UPDATE_UI, 1)
3223 EVT_UPDATE_UI_RANGE = wx.PyEventBinder( wxEVT_UPDATE_UI, 2)
3224
3225 EVT_CONTEXT_MENU = wx.PyEventBinder( wxEVT_CONTEXT_MENU )
3226
3227
3228
3229 #---------------------------------------------------------------------------
3230
3231 class Event(Object):
3232 """Proxy of C++ Event class"""
3233 def __init__(self): raise RuntimeError, "No constructor defined"
3234 def __repr__(self):
3235 return "<%s.%s; proxy of C++ wxEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
3236 def __del__(self, destroy=_core_.delete_Event):
3237 """__del__(self)"""
3238 try:
3239 if self.thisown: destroy(self)
3240 except: pass
3241
3242 def SetEventType(*args, **kwargs):
3243 """SetEventType(self, wxEventType typ)"""
3244 return _core_.Event_SetEventType(*args, **kwargs)
3245
3246 def GetEventType(*args, **kwargs):
3247 """GetEventType(self) -> wxEventType"""
3248 return _core_.Event_GetEventType(*args, **kwargs)
3249
3250 def GetEventObject(*args, **kwargs):
3251 """GetEventObject(self) -> Object"""
3252 return _core_.Event_GetEventObject(*args, **kwargs)
3253
3254 def SetEventObject(*args, **kwargs):
3255 """SetEventObject(self, Object obj)"""
3256 return _core_.Event_SetEventObject(*args, **kwargs)
3257
3258 def GetTimestamp(*args, **kwargs):
3259 """GetTimestamp(self) -> long"""
3260 return _core_.Event_GetTimestamp(*args, **kwargs)
3261
3262 def SetTimestamp(*args, **kwargs):
3263 """SetTimestamp(self, long ts=0)"""
3264 return _core_.Event_SetTimestamp(*args, **kwargs)
3265
3266 def GetId(*args, **kwargs):
3267 """GetId(self) -> int"""
3268 return _core_.Event_GetId(*args, **kwargs)
3269
3270 def SetId(*args, **kwargs):
3271 """SetId(self, int Id)"""
3272 return _core_.Event_SetId(*args, **kwargs)
3273
3274 def IsCommandEvent(*args, **kwargs):
3275 """IsCommandEvent(self) -> bool"""
3276 return _core_.Event_IsCommandEvent(*args, **kwargs)
3277
3278 def Skip(*args, **kwargs):
3279 """
3280 Skip(self, bool skip=True)
3281
3282 Called by an event handler, it controls whether additional event
3283 handlers bound to this event will be called after the current event
3284 handler returns. Skip(false) (the default setting) will prevent
3285 additional event handlers from being called and control will be
3286 returned to the sender of the event immediately after the current
3287 handler has finished. Skip(True) will cause the event processing
3288 system to continue searching for a handler function for this event.
3289
3290 """
3291 return _core_.Event_Skip(*args, **kwargs)
3292
3293 def GetSkipped(*args, **kwargs):
3294 """GetSkipped(self) -> bool"""
3295 return _core_.Event_GetSkipped(*args, **kwargs)
3296
3297 def ShouldPropagate(*args, **kwargs):
3298 """ShouldPropagate(self) -> bool"""
3299 return _core_.Event_ShouldPropagate(*args, **kwargs)
3300
3301 def StopPropagation(*args, **kwargs):
3302 """StopPropagation(self) -> int"""
3303 return _core_.Event_StopPropagation(*args, **kwargs)
3304
3305 def ResumePropagation(*args, **kwargs):
3306 """ResumePropagation(self, int propagationLevel)"""
3307 return _core_.Event_ResumePropagation(*args, **kwargs)
3308
3309 def Clone(*args, **kwargs):
3310 """Clone(self) -> Event"""
3311 return _core_.Event_Clone(*args, **kwargs)
3312
3313
3314 class EventPtr(Event):
3315 def __init__(self, this):
3316 self.this = this
3317 if not hasattr(self,"thisown"): self.thisown = 0
3318 self.__class__ = Event
3319 _core_.Event_swigregister(EventPtr)
3320
3321 #---------------------------------------------------------------------------
3322
3323 class PropagationDisabler(object):
3324 """Proxy of C++ PropagationDisabler class"""
3325 def __repr__(self):
3326 return "<%s.%s; proxy of C++ wxPropagationDisabler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
3327 def __init__(self, *args, **kwargs):
3328 """__init__(self, Event event) -> PropagationDisabler"""
3329 newobj = _core_.new_PropagationDisabler(*args, **kwargs)
3330 self.this = newobj.this
3331 self.thisown = 1
3332 del newobj.thisown
3333 def __del__(self, destroy=_core_.delete_PropagationDisabler):
3334 """__del__(self)"""
3335 try:
3336 if self.thisown: destroy(self)
3337 except: pass
3338
3339
3340 class PropagationDisablerPtr(PropagationDisabler):
3341 def __init__(self, this):
3342 self.this = this
3343 if not hasattr(self,"thisown"): self.thisown = 0
3344 self.__class__ = PropagationDisabler
3345 _core_.PropagationDisabler_swigregister(PropagationDisablerPtr)
3346
3347 class PropagateOnce(object):
3348 """Proxy of C++ PropagateOnce class"""
3349 def __repr__(self):
3350 return "<%s.%s; proxy of C++ wxPropagateOnce instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
3351 def __init__(self, *args, **kwargs):
3352 """__init__(self, Event event) -> PropagateOnce"""
3353 newobj = _core_.new_PropagateOnce(*args, **kwargs)
3354 self.this = newobj.this
3355 self.thisown = 1
3356 del newobj.thisown
3357 def __del__(self, destroy=_core_.delete_PropagateOnce):
3358 """__del__(self)"""
3359 try:
3360 if self.thisown: destroy(self)
3361 except: pass
3362
3363
3364 class PropagateOncePtr(PropagateOnce):
3365 def __init__(self, this):
3366 self.this = this
3367 if not hasattr(self,"thisown"): self.thisown = 0
3368 self.__class__ = PropagateOnce
3369 _core_.PropagateOnce_swigregister(PropagateOncePtr)
3370
3371 #---------------------------------------------------------------------------
3372
3373 class CommandEvent(Event):
3374 """Proxy of C++ CommandEvent class"""
3375 def __repr__(self):
3376 return "<%s.%s; proxy of C++ wxCommandEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
3377 def __init__(self, *args, **kwargs):
3378 """__init__(self, wxEventType commandType=wxEVT_NULL, int winid=0) -> CommandEvent"""
3379 newobj = _core_.new_CommandEvent(*args, **kwargs)
3380 self.this = newobj.this
3381 self.thisown = 1
3382 del newobj.thisown
3383 def GetSelection(*args, **kwargs):
3384 """GetSelection(self) -> int"""
3385 return _core_.CommandEvent_GetSelection(*args, **kwargs)
3386
3387 def SetString(*args, **kwargs):
3388 """SetString(self, String s)"""
3389 return _core_.CommandEvent_SetString(*args, **kwargs)
3390
3391 def GetString(*args, **kwargs):
3392 """GetString(self) -> String"""
3393 return _core_.CommandEvent_GetString(*args, **kwargs)
3394
3395 def IsChecked(*args, **kwargs):
3396 """IsChecked(self) -> bool"""
3397 return _core_.CommandEvent_IsChecked(*args, **kwargs)
3398
3399 Checked = IsChecked
3400 def IsSelection(*args, **kwargs):
3401 """IsSelection(self) -> bool"""
3402 return _core_.CommandEvent_IsSelection(*args, **kwargs)
3403
3404 def SetExtraLong(*args, **kwargs):
3405 """SetExtraLong(self, long extraLong)"""
3406 return _core_.CommandEvent_SetExtraLong(*args, **kwargs)
3407
3408 def GetExtraLong(*args, **kwargs):
3409 """GetExtraLong(self) -> long"""
3410 return _core_.CommandEvent_GetExtraLong(*args, **kwargs)
3411
3412 def SetInt(*args, **kwargs):
3413 """SetInt(self, int i)"""
3414 return _core_.CommandEvent_SetInt(*args, **kwargs)
3415
3416 def GetInt(*args, **kwargs):
3417 """GetInt(self) -> long"""
3418 return _core_.CommandEvent_GetInt(*args, **kwargs)
3419
3420 def Clone(*args, **kwargs):
3421 """Clone(self) -> Event"""
3422 return _core_.CommandEvent_Clone(*args, **kwargs)
3423
3424
3425 class CommandEventPtr(CommandEvent):
3426 def __init__(self, this):
3427 self.this = this
3428 if not hasattr(self,"thisown"): self.thisown = 0
3429 self.__class__ = CommandEvent
3430 _core_.CommandEvent_swigregister(CommandEventPtr)
3431
3432 #---------------------------------------------------------------------------
3433
3434 class NotifyEvent(CommandEvent):
3435 """Proxy of C++ NotifyEvent class"""
3436 def __repr__(self):
3437 return "<%s.%s; proxy of C++ wxNotifyEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
3438 def __init__(self, *args, **kwargs):
3439 """__init__(self, wxEventType commandType=wxEVT_NULL, int winid=0) -> NotifyEvent"""
3440 newobj = _core_.new_NotifyEvent(*args, **kwargs)
3441 self.this = newobj.this
3442 self.thisown = 1
3443 del newobj.thisown
3444 def Veto(*args, **kwargs):
3445 """Veto(self)"""
3446 return _core_.NotifyEvent_Veto(*args, **kwargs)
3447
3448 def Allow(*args, **kwargs):
3449 """Allow(self)"""
3450 return _core_.NotifyEvent_Allow(*args, **kwargs)
3451
3452 def IsAllowed(*args, **kwargs):
3453 """IsAllowed(self) -> bool"""
3454 return _core_.NotifyEvent_IsAllowed(*args, **kwargs)
3455
3456
3457 class NotifyEventPtr(NotifyEvent):
3458 def __init__(self, this):
3459 self.this = this
3460 if not hasattr(self,"thisown"): self.thisown = 0
3461 self.__class__ = NotifyEvent
3462 _core_.NotifyEvent_swigregister(NotifyEventPtr)
3463
3464 #---------------------------------------------------------------------------
3465
3466 class ScrollEvent(CommandEvent):
3467 """Proxy of C++ ScrollEvent class"""
3468 def __repr__(self):
3469 return "<%s.%s; proxy of C++ wxScrollEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
3470 def __init__(self, *args, **kwargs):
3471 """
3472 __init__(self, wxEventType commandType=wxEVT_NULL, int winid=0, int pos=0,
3473 int orient=0) -> ScrollEvent
3474 """
3475 newobj = _core_.new_ScrollEvent(*args, **kwargs)
3476 self.this = newobj.this
3477 self.thisown = 1
3478 del newobj.thisown
3479 def GetOrientation(*args, **kwargs):
3480 """GetOrientation(self) -> int"""
3481 return _core_.ScrollEvent_GetOrientation(*args, **kwargs)
3482
3483 def GetPosition(*args, **kwargs):
3484 """GetPosition(self) -> int"""
3485 return _core_.ScrollEvent_GetPosition(*args, **kwargs)
3486
3487 def SetOrientation(*args, **kwargs):
3488 """SetOrientation(self, int orient)"""
3489 return _core_.ScrollEvent_SetOrientation(*args, **kwargs)
3490
3491 def SetPosition(*args, **kwargs):
3492 """SetPosition(self, int pos)"""
3493 return _core_.ScrollEvent_SetPosition(*args, **kwargs)
3494
3495
3496 class ScrollEventPtr(ScrollEvent):
3497 def __init__(self, this):
3498 self.this = this
3499 if not hasattr(self,"thisown"): self.thisown = 0
3500 self.__class__ = ScrollEvent
3501 _core_.ScrollEvent_swigregister(ScrollEventPtr)
3502
3503 #---------------------------------------------------------------------------
3504
3505 class ScrollWinEvent(Event):
3506 """Proxy of C++ ScrollWinEvent class"""
3507 def __repr__(self):
3508 return "<%s.%s; proxy of C++ wxScrollWinEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
3509 def __init__(self, *args, **kwargs):
3510 """__init__(self, wxEventType commandType=wxEVT_NULL, int pos=0, int orient=0) -> ScrollWinEvent"""
3511 newobj = _core_.new_ScrollWinEvent(*args, **kwargs)
3512 self.this = newobj.this
3513 self.thisown = 1
3514 del newobj.thisown
3515 def GetOrientation(*args, **kwargs):
3516 """GetOrientation(self) -> int"""
3517 return _core_.ScrollWinEvent_GetOrientation(*args, **kwargs)
3518
3519 def GetPosition(*args, **kwargs):
3520 """GetPosition(self) -> int"""
3521 return _core_.ScrollWinEvent_GetPosition(*args, **kwargs)
3522
3523 def SetOrientation(*args, **kwargs):
3524 """SetOrientation(self, int orient)"""
3525 return _core_.ScrollWinEvent_SetOrientation(*args, **kwargs)
3526
3527 def SetPosition(*args, **kwargs):
3528 """SetPosition(self, int pos)"""
3529 return _core_.ScrollWinEvent_SetPosition(*args, **kwargs)
3530
3531
3532 class ScrollWinEventPtr(ScrollWinEvent):
3533 def __init__(self, this):
3534 self.this = this
3535 if not hasattr(self,"thisown"): self.thisown = 0
3536 self.__class__ = ScrollWinEvent
3537 _core_.ScrollWinEvent_swigregister(ScrollWinEventPtr)
3538
3539 #---------------------------------------------------------------------------
3540
3541 MOUSE_BTN_ANY = _core_.MOUSE_BTN_ANY
3542 MOUSE_BTN_NONE = _core_.MOUSE_BTN_NONE
3543 MOUSE_BTN_LEFT = _core_.MOUSE_BTN_LEFT
3544 MOUSE_BTN_MIDDLE = _core_.MOUSE_BTN_MIDDLE
3545 MOUSE_BTN_RIGHT = _core_.MOUSE_BTN_RIGHT
3546 class MouseEvent(Event):
3547 """Proxy of C++ MouseEvent class"""
3548 def __repr__(self):
3549 return "<%s.%s; proxy of C++ wxMouseEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
3550 def __init__(self, *args, **kwargs):
3551 """__init__(self, wxEventType mouseType=wxEVT_NULL) -> MouseEvent"""
3552 newobj = _core_.new_MouseEvent(*args, **kwargs)
3553 self.this = newobj.this
3554 self.thisown = 1
3555 del newobj.thisown
3556 def IsButton(*args, **kwargs):
3557 """IsButton(self) -> bool"""
3558 return _core_.MouseEvent_IsButton(*args, **kwargs)
3559
3560 def ButtonDown(*args, **kwargs):
3561 """ButtonDown(self, int but=MOUSE_BTN_ANY) -> bool"""
3562 return _core_.MouseEvent_ButtonDown(*args, **kwargs)
3563
3564 def ButtonDClick(*args, **kwargs):
3565 """ButtonDClick(self, int but=MOUSE_BTN_ANY) -> bool"""
3566 return _core_.MouseEvent_ButtonDClick(*args, **kwargs)
3567
3568 def ButtonUp(*args, **kwargs):
3569 """ButtonUp(self, int but=MOUSE_BTN_ANY) -> bool"""
3570 return _core_.MouseEvent_ButtonUp(*args, **kwargs)
3571
3572 def Button(*args, **kwargs):
3573 """Button(self, int but) -> bool"""
3574 return _core_.MouseEvent_Button(*args, **kwargs)
3575
3576 def ButtonIsDown(*args, **kwargs):
3577 """ButtonIsDown(self, int but) -> bool"""
3578 return _core_.MouseEvent_ButtonIsDown(*args, **kwargs)
3579
3580 def GetButton(*args, **kwargs):
3581 """GetButton(self) -> int"""
3582 return _core_.MouseEvent_GetButton(*args, **kwargs)
3583
3584 def ControlDown(*args, **kwargs):
3585 """ControlDown(self) -> bool"""
3586 return _core_.MouseEvent_ControlDown(*args, **kwargs)
3587
3588 def MetaDown(*args, **kwargs):
3589 """MetaDown(self) -> bool"""
3590 return _core_.MouseEvent_MetaDown(*args, **kwargs)
3591
3592 def AltDown(*args, **kwargs):
3593 """AltDown(self) -> bool"""
3594 return _core_.MouseEvent_AltDown(*args, **kwargs)
3595
3596 def ShiftDown(*args, **kwargs):
3597 """ShiftDown(self) -> bool"""
3598 return _core_.MouseEvent_ShiftDown(*args, **kwargs)
3599
3600 def CmdDown(*args, **kwargs):
3601 """
3602 CmdDown(self) -> bool
3603
3604 "Cmd" is a pseudo key which is the same as Control for PC and Unix
3605 platforms but the special "Apple" (a.k.a as "Command") key on
3606 Macs: it makes often sense to use it instead of, say, `ControlDown`
3607 because Cmd key is used for the same thing under Mac as Ctrl
3608 elsewhere. The Ctrl still exists, it's just not used for this
3609 purpose. So for non-Mac platforms this is the same as `ControlDown`
3610 and Macs this is the same as `MetaDown`.
3611 """
3612 return _core_.MouseEvent_CmdDown(*args, **kwargs)
3613
3614 def LeftDown(*args, **kwargs):
3615 """LeftDown(self) -> bool"""
3616 return _core_.MouseEvent_LeftDown(*args, **kwargs)
3617
3618 def MiddleDown(*args, **kwargs):
3619 """MiddleDown(self) -> bool"""
3620 return _core_.MouseEvent_MiddleDown(*args, **kwargs)
3621
3622 def RightDown(*args, **kwargs):
3623 """RightDown(self) -> bool"""
3624 return _core_.MouseEvent_RightDown(*args, **kwargs)
3625
3626 def LeftUp(*args, **kwargs):
3627 """LeftUp(self) -> bool"""
3628 return _core_.MouseEvent_LeftUp(*args, **kwargs)
3629
3630 def MiddleUp(*args, **kwargs):
3631 """MiddleUp(self) -> bool"""
3632 return _core_.MouseEvent_MiddleUp(*args, **kwargs)
3633
3634 def RightUp(*args, **kwargs):
3635 """RightUp(self) -> bool"""
3636 return _core_.MouseEvent_RightUp(*args, **kwargs)
3637
3638 def LeftDClick(*args, **kwargs):
3639 """LeftDClick(self) -> bool"""
3640 return _core_.MouseEvent_LeftDClick(*args, **kwargs)
3641
3642 def MiddleDClick(*args, **kwargs):
3643 """MiddleDClick(self) -> bool"""
3644 return _core_.MouseEvent_MiddleDClick(*args, **kwargs)
3645
3646 def RightDClick(*args, **kwargs):
3647 """RightDClick(self) -> bool"""
3648 return _core_.MouseEvent_RightDClick(*args, **kwargs)
3649
3650 def LeftIsDown(*args, **kwargs):
3651 """LeftIsDown(self) -> bool"""
3652 return _core_.MouseEvent_LeftIsDown(*args, **kwargs)
3653
3654 def MiddleIsDown(*args, **kwargs):
3655 """MiddleIsDown(self) -> bool"""
3656 return _core_.MouseEvent_MiddleIsDown(*args, **kwargs)
3657
3658 def RightIsDown(*args, **kwargs):
3659 """RightIsDown(self) -> bool"""
3660 return _core_.MouseEvent_RightIsDown(*args, **kwargs)
3661
3662 def Dragging(*args, **kwargs):
3663 """Dragging(self) -> bool"""
3664 return _core_.MouseEvent_Dragging(*args, **kwargs)
3665
3666 def Moving(*args, **kwargs):
3667 """Moving(self) -> bool"""
3668 return _core_.MouseEvent_Moving(*args, **kwargs)
3669
3670 def Entering(*args, **kwargs):
3671 """Entering(self) -> bool"""
3672 return _core_.MouseEvent_Entering(*args, **kwargs)
3673
3674 def Leaving(*args, **kwargs):
3675 """Leaving(self) -> bool"""
3676 return _core_.MouseEvent_Leaving(*args, **kwargs)
3677
3678 def GetPosition(*args, **kwargs):
3679 """
3680 GetPosition(self) -> Point
3681
3682 Returns the position of the mouse in window coordinates when the event
3683 happened.
3684 """
3685 return _core_.MouseEvent_GetPosition(*args, **kwargs)
3686
3687 def GetPositionTuple(*args, **kwargs):
3688 """
3689 GetPositionTuple() -> (x,y)
3690
3691 Returns the position of the mouse in window coordinates when the event
3692 happened.
3693 """
3694 return _core_.MouseEvent_GetPositionTuple(*args, **kwargs)
3695
3696 def GetLogicalPosition(*args, **kwargs):
3697 """GetLogicalPosition(self, DC dc) -> Point"""
3698 return _core_.MouseEvent_GetLogicalPosition(*args, **kwargs)
3699
3700 def GetX(*args, **kwargs):
3701 """GetX(self) -> int"""
3702 return _core_.MouseEvent_GetX(*args, **kwargs)
3703
3704 def GetY(*args, **kwargs):
3705 """GetY(self) -> int"""
3706 return _core_.MouseEvent_GetY(*args, **kwargs)
3707
3708 def GetWheelRotation(*args, **kwargs):
3709 """GetWheelRotation(self) -> int"""
3710 return _core_.MouseEvent_GetWheelRotation(*args, **kwargs)
3711
3712 def GetWheelDelta(*args, **kwargs):
3713 """GetWheelDelta(self) -> int"""
3714 return _core_.MouseEvent_GetWheelDelta(*args, **kwargs)
3715
3716 def GetLinesPerAction(*args, **kwargs):
3717 """GetLinesPerAction(self) -> int"""
3718 return _core_.MouseEvent_GetLinesPerAction(*args, **kwargs)
3719
3720 def IsPageScroll(*args, **kwargs):
3721 """IsPageScroll(self) -> bool"""
3722 return _core_.MouseEvent_IsPageScroll(*args, **kwargs)
3723
3724 m_x = property(_core_.MouseEvent_m_x_get, _core_.MouseEvent_m_x_set)
3725 m_y = property(_core_.MouseEvent_m_y_get, _core_.MouseEvent_m_y_set)
3726 m_leftDown = property(_core_.MouseEvent_m_leftDown_get, _core_.MouseEvent_m_leftDown_set)
3727 m_middleDown = property(_core_.MouseEvent_m_middleDown_get, _core_.MouseEvent_m_middleDown_set)
3728 m_rightDown = property(_core_.MouseEvent_m_rightDown_get, _core_.MouseEvent_m_rightDown_set)
3729 m_controlDown = property(_core_.MouseEvent_m_controlDown_get, _core_.MouseEvent_m_controlDown_set)
3730 m_shiftDown = property(_core_.MouseEvent_m_shiftDown_get, _core_.MouseEvent_m_shiftDown_set)
3731 m_altDown = property(_core_.MouseEvent_m_altDown_get, _core_.MouseEvent_m_altDown_set)
3732 m_metaDown = property(_core_.MouseEvent_m_metaDown_get, _core_.MouseEvent_m_metaDown_set)
3733 m_wheelRotation = property(_core_.MouseEvent_m_wheelRotation_get, _core_.MouseEvent_m_wheelRotation_set)
3734 m_wheelDelta = property(_core_.MouseEvent_m_wheelDelta_get, _core_.MouseEvent_m_wheelDelta_set)
3735 m_linesPerAction = property(_core_.MouseEvent_m_linesPerAction_get, _core_.MouseEvent_m_linesPerAction_set)
3736
3737 class MouseEventPtr(MouseEvent):
3738 def __init__(self, this):
3739 self.this = this
3740 if not hasattr(self,"thisown"): self.thisown = 0
3741 self.__class__ = MouseEvent
3742 _core_.MouseEvent_swigregister(MouseEventPtr)
3743
3744 #---------------------------------------------------------------------------
3745
3746 class SetCursorEvent(Event):
3747 """Proxy of C++ SetCursorEvent class"""
3748 def __repr__(self):
3749 return "<%s.%s; proxy of C++ wxSetCursorEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
3750 def __init__(self, *args, **kwargs):
3751 """__init__(self, int x=0, int y=0) -> SetCursorEvent"""
3752 newobj = _core_.new_SetCursorEvent(*args, **kwargs)
3753 self.this = newobj.this
3754 self.thisown = 1
3755 del newobj.thisown
3756 def GetX(*args, **kwargs):
3757 """GetX(self) -> int"""
3758 return _core_.SetCursorEvent_GetX(*args, **kwargs)
3759
3760 def GetY(*args, **kwargs):
3761 """GetY(self) -> int"""
3762 return _core_.SetCursorEvent_GetY(*args, **kwargs)
3763
3764 def SetCursor(*args, **kwargs):
3765 """SetCursor(self, Cursor cursor)"""
3766 return _core_.SetCursorEvent_SetCursor(*args, **kwargs)
3767
3768 def GetCursor(*args, **kwargs):
3769 """GetCursor(self) -> Cursor"""
3770 return _core_.SetCursorEvent_GetCursor(*args, **kwargs)
3771
3772 def HasCursor(*args, **kwargs):
3773 """HasCursor(self) -> bool"""
3774 return _core_.SetCursorEvent_HasCursor(*args, **kwargs)
3775
3776
3777 class SetCursorEventPtr(SetCursorEvent):
3778 def __init__(self, this):
3779 self.this = this
3780 if not hasattr(self,"thisown"): self.thisown = 0
3781 self.__class__ = SetCursorEvent
3782 _core_.SetCursorEvent_swigregister(SetCursorEventPtr)
3783
3784 #---------------------------------------------------------------------------
3785
3786 class KeyEvent(Event):
3787 """Proxy of C++ KeyEvent class"""
3788 def __repr__(self):
3789 return "<%s.%s; proxy of C++ wxKeyEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
3790 def __init__(self, *args, **kwargs):
3791 """__init__(self, wxEventType keyType=wxEVT_NULL) -> KeyEvent"""
3792 newobj = _core_.new_KeyEvent(*args, **kwargs)
3793 self.this = newobj.this
3794 self.thisown = 1
3795 del newobj.thisown
3796 def ControlDown(*args, **kwargs):
3797 """ControlDown(self) -> bool"""
3798 return _core_.KeyEvent_ControlDown(*args, **kwargs)
3799
3800 def MetaDown(*args, **kwargs):
3801 """MetaDown(self) -> bool"""
3802 return _core_.KeyEvent_MetaDown(*args, **kwargs)
3803
3804 def AltDown(*args, **kwargs):
3805 """AltDown(self) -> bool"""
3806 return _core_.KeyEvent_AltDown(*args, **kwargs)
3807
3808 def ShiftDown(*args, **kwargs):
3809 """ShiftDown(self) -> bool"""
3810 return _core_.KeyEvent_ShiftDown(*args, **kwargs)
3811
3812 def CmdDown(*args, **kwargs):
3813 """
3814 CmdDown(self) -> bool
3815
3816 "Cmd" is a pseudo key which is the same as Control for PC and Unix
3817 platforms but the special "Apple" (a.k.a as "Command") key on
3818 Macs: it makes often sense to use it instead of, say, `ControlDown`
3819 because Cmd key is used for the same thing under Mac as Ctrl
3820 elsewhere. The Ctrl still exists, it's just not used for this
3821 purpose. So for non-Mac platforms this is the same as `ControlDown`
3822 and Macs this is the same as `MetaDown`.
3823 """
3824 return _core_.KeyEvent_CmdDown(*args, **kwargs)
3825
3826 def HasModifiers(*args, **kwargs):
3827 """HasModifiers(self) -> bool"""
3828 return _core_.KeyEvent_HasModifiers(*args, **kwargs)
3829
3830 def GetKeyCode(*args, **kwargs):
3831 """GetKeyCode(self) -> int"""
3832 return _core_.KeyEvent_GetKeyCode(*args, **kwargs)
3833
3834 KeyCode = GetKeyCode
3835 def GetUnicodeKey(*args, **kwargs):
3836 """GetUnicodeKey(self) -> int"""
3837 return _core_.KeyEvent_GetUnicodeKey(*args, **kwargs)
3838
3839 GetUniChar = GetUnicodeKey
3840 def GetRawKeyCode(*args, **kwargs):
3841 """GetRawKeyCode(self) -> unsigned int"""
3842 return _core_.KeyEvent_GetRawKeyCode(*args, **kwargs)
3843
3844 def GetRawKeyFlags(*args, **kwargs):
3845 """GetRawKeyFlags(self) -> unsigned int"""
3846 return _core_.KeyEvent_GetRawKeyFlags(*args, **kwargs)
3847
3848 def GetPosition(*args, **kwargs):
3849 """
3850 GetPosition(self) -> Point
3851
3852 Find the position of the event.
3853 """
3854 return _core_.KeyEvent_GetPosition(*args, **kwargs)
3855
3856 def GetPositionTuple(*args, **kwargs):
3857 """
3858 GetPositionTuple() -> (x,y)
3859
3860 Find the position of the event.
3861 """
3862 return _core_.KeyEvent_GetPositionTuple(*args, **kwargs)
3863
3864 def GetX(*args, **kwargs):
3865 """GetX(self) -> int"""
3866 return _core_.KeyEvent_GetX(*args, **kwargs)
3867
3868 def GetY(*args, **kwargs):
3869 """GetY(self) -> int"""
3870 return _core_.KeyEvent_GetY(*args, **kwargs)
3871
3872 m_x = property(_core_.KeyEvent_m_x_get, _core_.KeyEvent_m_x_set)
3873 m_y = property(_core_.KeyEvent_m_y_get, _core_.KeyEvent_m_y_set)
3874 m_keyCode = property(_core_.KeyEvent_m_keyCode_get, _core_.KeyEvent_m_keyCode_set)
3875 m_controlDown = property(_core_.KeyEvent_m_controlDown_get, _core_.KeyEvent_m_controlDown_set)
3876 m_shiftDown = property(_core_.KeyEvent_m_shiftDown_get, _core_.KeyEvent_m_shiftDown_set)
3877 m_altDown = property(_core_.KeyEvent_m_altDown_get, _core_.KeyEvent_m_altDown_set)
3878 m_metaDown = property(_core_.KeyEvent_m_metaDown_get, _core_.KeyEvent_m_metaDown_set)
3879 m_scanCode = property(_core_.KeyEvent_m_scanCode_get, _core_.KeyEvent_m_scanCode_set)
3880 m_rawCode = property(_core_.KeyEvent_m_rawCode_get, _core_.KeyEvent_m_rawCode_set)
3881 m_rawFlags = property(_core_.KeyEvent_m_rawFlags_get, _core_.KeyEvent_m_rawFlags_set)
3882
3883 class KeyEventPtr(KeyEvent):
3884 def __init__(self, this):
3885 self.this = this
3886 if not hasattr(self,"thisown"): self.thisown = 0
3887 self.__class__ = KeyEvent
3888 _core_.KeyEvent_swigregister(KeyEventPtr)
3889
3890 #---------------------------------------------------------------------------
3891
3892 class SizeEvent(Event):
3893 """Proxy of C++ SizeEvent class"""
3894 def __repr__(self):
3895 return "<%s.%s; proxy of C++ wxSizeEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
3896 def __init__(self, *args, **kwargs):
3897 """__init__(self, Size sz=DefaultSize, int winid=0) -> SizeEvent"""
3898 newobj = _core_.new_SizeEvent(*args, **kwargs)
3899 self.this = newobj.this
3900 self.thisown = 1
3901 del newobj.thisown
3902 def GetSize(*args, **kwargs):
3903 """GetSize(self) -> Size"""
3904 return _core_.SizeEvent_GetSize(*args, **kwargs)
3905
3906 def GetRect(*args, **kwargs):
3907 """GetRect(self) -> Rect"""
3908 return _core_.SizeEvent_GetRect(*args, **kwargs)
3909
3910 def SetRect(*args, **kwargs):
3911 """SetRect(self, Rect rect)"""
3912 return _core_.SizeEvent_SetRect(*args, **kwargs)
3913
3914 def SetSize(*args, **kwargs):
3915 """SetSize(self, Size size)"""
3916 return _core_.SizeEvent_SetSize(*args, **kwargs)
3917
3918 m_size = property(_core_.SizeEvent_m_size_get, _core_.SizeEvent_m_size_set)
3919 m_rect = property(_core_.SizeEvent_m_rect_get, _core_.SizeEvent_m_rect_set)
3920
3921 class SizeEventPtr(SizeEvent):
3922 def __init__(self, this):
3923 self.this = this
3924 if not hasattr(self,"thisown"): self.thisown = 0
3925 self.__class__ = SizeEvent
3926 _core_.SizeEvent_swigregister(SizeEventPtr)
3927
3928 #---------------------------------------------------------------------------
3929
3930 class MoveEvent(Event):
3931 """Proxy of C++ MoveEvent class"""
3932 def __repr__(self):
3933 return "<%s.%s; proxy of C++ wxMoveEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
3934 def __init__(self, *args, **kwargs):
3935 """__init__(self, Point pos=DefaultPosition, int winid=0) -> MoveEvent"""
3936 newobj = _core_.new_MoveEvent(*args, **kwargs)
3937 self.this = newobj.this
3938 self.thisown = 1
3939 del newobj.thisown
3940 def GetPosition(*args, **kwargs):
3941 """GetPosition(self) -> Point"""
3942 return _core_.MoveEvent_GetPosition(*args, **kwargs)
3943
3944 def GetRect(*args, **kwargs):
3945 """GetRect(self) -> Rect"""
3946 return _core_.MoveEvent_GetRect(*args, **kwargs)
3947
3948 def SetRect(*args, **kwargs):
3949 """SetRect(self, Rect rect)"""
3950 return _core_.MoveEvent_SetRect(*args, **kwargs)
3951
3952 def SetPosition(*args, **kwargs):
3953 """SetPosition(self, Point pos)"""
3954 return _core_.MoveEvent_SetPosition(*args, **kwargs)
3955
3956 m_pos = property(_core_.MoveEvent_m_pos_get, _core_.MoveEvent_m_pos_set)
3957 m_rect = property(_core_.MoveEvent_m_rect_get, _core_.MoveEvent_m_rect_set)
3958
3959 class MoveEventPtr(MoveEvent):
3960 def __init__(self, this):
3961 self.this = this
3962 if not hasattr(self,"thisown"): self.thisown = 0
3963 self.__class__ = MoveEvent
3964 _core_.MoveEvent_swigregister(MoveEventPtr)
3965
3966 #---------------------------------------------------------------------------
3967
3968 class PaintEvent(Event):
3969 """Proxy of C++ PaintEvent class"""
3970 def __repr__(self):
3971 return "<%s.%s; proxy of C++ wxPaintEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
3972 def __init__(self, *args, **kwargs):
3973 """__init__(self, int Id=0) -> PaintEvent"""
3974 newobj = _core_.new_PaintEvent(*args, **kwargs)
3975 self.this = newobj.this
3976 self.thisown = 1
3977 del newobj.thisown
3978
3979 class PaintEventPtr(PaintEvent):
3980 def __init__(self, this):
3981 self.this = this
3982 if not hasattr(self,"thisown"): self.thisown = 0
3983 self.__class__ = PaintEvent
3984 _core_.PaintEvent_swigregister(PaintEventPtr)
3985
3986 class NcPaintEvent(Event):
3987 """Proxy of C++ NcPaintEvent class"""
3988 def __repr__(self):
3989 return "<%s.%s; proxy of C++ wxNcPaintEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
3990 def __init__(self, *args, **kwargs):
3991 """__init__(self, int winid=0) -> NcPaintEvent"""
3992 newobj = _core_.new_NcPaintEvent(*args, **kwargs)
3993 self.this = newobj.this
3994 self.thisown = 1
3995 del newobj.thisown
3996
3997 class NcPaintEventPtr(NcPaintEvent):
3998 def __init__(self, this):
3999 self.this = this
4000 if not hasattr(self,"thisown"): self.thisown = 0
4001 self.__class__ = NcPaintEvent
4002 _core_.NcPaintEvent_swigregister(NcPaintEventPtr)
4003
4004 #---------------------------------------------------------------------------
4005
4006 class EraseEvent(Event):
4007 """Proxy of C++ EraseEvent class"""
4008 def __repr__(self):
4009 return "<%s.%s; proxy of C++ wxEraseEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
4010 def __init__(self, *args, **kwargs):
4011 """__init__(self, int Id=0, DC dc=(wxDC *) NULL) -> EraseEvent"""
4012 newobj = _core_.new_EraseEvent(*args, **kwargs)
4013 self.this = newobj.this
4014 self.thisown = 1
4015 del newobj.thisown
4016 def GetDC(*args, **kwargs):
4017 """GetDC(self) -> DC"""
4018 return _core_.EraseEvent_GetDC(*args, **kwargs)
4019
4020
4021 class EraseEventPtr(EraseEvent):
4022 def __init__(self, this):
4023 self.this = this
4024 if not hasattr(self,"thisown"): self.thisown = 0
4025 self.__class__ = EraseEvent
4026 _core_.EraseEvent_swigregister(EraseEventPtr)
4027
4028 #---------------------------------------------------------------------------
4029
4030 class FocusEvent(Event):
4031 """Proxy of C++ FocusEvent class"""
4032 def __repr__(self):
4033 return "<%s.%s; proxy of C++ wxFocusEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
4034 def __init__(self, *args, **kwargs):
4035 """__init__(self, wxEventType type=wxEVT_NULL, int winid=0) -> FocusEvent"""
4036 newobj = _core_.new_FocusEvent(*args, **kwargs)
4037 self.this = newobj.this
4038 self.thisown = 1
4039 del newobj.thisown
4040 def GetWindow(*args, **kwargs):
4041 """GetWindow(self) -> Window"""
4042 return _core_.FocusEvent_GetWindow(*args, **kwargs)
4043
4044 def SetWindow(*args, **kwargs):
4045 """SetWindow(self, Window win)"""
4046 return _core_.FocusEvent_SetWindow(*args, **kwargs)
4047
4048
4049 class FocusEventPtr(FocusEvent):
4050 def __init__(self, this):
4051 self.this = this
4052 if not hasattr(self,"thisown"): self.thisown = 0
4053 self.__class__ = FocusEvent
4054 _core_.FocusEvent_swigregister(FocusEventPtr)
4055
4056 #---------------------------------------------------------------------------
4057
4058 class ChildFocusEvent(CommandEvent):
4059 """Proxy of C++ ChildFocusEvent class"""
4060 def __repr__(self):
4061 return "<%s.%s; proxy of C++ wxChildFocusEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
4062 def __init__(self, *args, **kwargs):
4063 """__init__(self, Window win=None) -> ChildFocusEvent"""
4064 newobj = _core_.new_ChildFocusEvent(*args, **kwargs)
4065 self.this = newobj.this
4066 self.thisown = 1
4067 del newobj.thisown
4068 def GetWindow(*args, **kwargs):
4069 """GetWindow(self) -> Window"""
4070 return _core_.ChildFocusEvent_GetWindow(*args, **kwargs)
4071
4072
4073 class ChildFocusEventPtr(ChildFocusEvent):
4074 def __init__(self, this):
4075 self.this = this
4076 if not hasattr(self,"thisown"): self.thisown = 0
4077 self.__class__ = ChildFocusEvent
4078 _core_.ChildFocusEvent_swigregister(ChildFocusEventPtr)
4079
4080 #---------------------------------------------------------------------------
4081
4082 class ActivateEvent(Event):
4083 """Proxy of C++ ActivateEvent class"""
4084 def __repr__(self):
4085 return "<%s.%s; proxy of C++ wxActivateEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
4086 def __init__(self, *args, **kwargs):
4087 """__init__(self, wxEventType type=wxEVT_NULL, bool active=True, int Id=0) -> ActivateEvent"""
4088 newobj = _core_.new_ActivateEvent(*args, **kwargs)
4089 self.this = newobj.this
4090 self.thisown = 1
4091 del newobj.thisown
4092 def GetActive(*args, **kwargs):
4093 """GetActive(self) -> bool"""
4094 return _core_.ActivateEvent_GetActive(*args, **kwargs)
4095
4096
4097 class ActivateEventPtr(ActivateEvent):
4098 def __init__(self, this):
4099 self.this = this
4100 if not hasattr(self,"thisown"): self.thisown = 0
4101 self.__class__ = ActivateEvent
4102 _core_.ActivateEvent_swigregister(ActivateEventPtr)
4103
4104 #---------------------------------------------------------------------------
4105
4106 class InitDialogEvent(Event):
4107 """Proxy of C++ InitDialogEvent class"""
4108 def __repr__(self):
4109 return "<%s.%s; proxy of C++ wxInitDialogEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
4110 def __init__(self, *args, **kwargs):
4111 """__init__(self, int Id=0) -> InitDialogEvent"""
4112 newobj = _core_.new_InitDialogEvent(*args, **kwargs)
4113 self.this = newobj.this
4114 self.thisown = 1
4115 del newobj.thisown
4116
4117 class InitDialogEventPtr(InitDialogEvent):
4118 def __init__(self, this):
4119 self.this = this
4120 if not hasattr(self,"thisown"): self.thisown = 0
4121 self.__class__ = InitDialogEvent
4122 _core_.InitDialogEvent_swigregister(InitDialogEventPtr)
4123
4124 #---------------------------------------------------------------------------
4125
4126 class MenuEvent(Event):
4127 """Proxy of C++ MenuEvent class"""
4128 def __repr__(self):
4129 return "<%s.%s; proxy of C++ wxMenuEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
4130 def __init__(self, *args, **kwargs):
4131 """__init__(self, wxEventType type=wxEVT_NULL, int winid=0, Menu menu=None) -> MenuEvent"""
4132 newobj = _core_.new_MenuEvent(*args, **kwargs)
4133 self.this = newobj.this
4134 self.thisown = 1
4135 del newobj.thisown
4136 def GetMenuId(*args, **kwargs):
4137 """GetMenuId(self) -> int"""
4138 return _core_.MenuEvent_GetMenuId(*args, **kwargs)
4139
4140 def IsPopup(*args, **kwargs):
4141 """IsPopup(self) -> bool"""
4142 return _core_.MenuEvent_IsPopup(*args, **kwargs)
4143
4144 def GetMenu(*args, **kwargs):
4145 """GetMenu(self) -> Menu"""
4146 return _core_.MenuEvent_GetMenu(*args, **kwargs)
4147
4148
4149 class MenuEventPtr(MenuEvent):
4150 def __init__(self, this):
4151 self.this = this
4152 if not hasattr(self,"thisown"): self.thisown = 0
4153 self.__class__ = MenuEvent
4154 _core_.MenuEvent_swigregister(MenuEventPtr)
4155
4156 #---------------------------------------------------------------------------
4157
4158 class CloseEvent(Event):
4159 """Proxy of C++ CloseEvent class"""
4160 def __repr__(self):
4161 return "<%s.%s; proxy of C++ wxCloseEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
4162 def __init__(self, *args, **kwargs):
4163 """__init__(self, wxEventType type=wxEVT_NULL, int winid=0) -> CloseEvent"""
4164 newobj = _core_.new_CloseEvent(*args, **kwargs)
4165 self.this = newobj.this
4166 self.thisown = 1
4167 del newobj.thisown
4168 def SetLoggingOff(*args, **kwargs):
4169 """SetLoggingOff(self, bool logOff)"""
4170 return _core_.CloseEvent_SetLoggingOff(*args, **kwargs)
4171
4172 def GetLoggingOff(*args, **kwargs):
4173 """GetLoggingOff(self) -> bool"""
4174 return _core_.CloseEvent_GetLoggingOff(*args, **kwargs)
4175
4176 def Veto(*args, **kwargs):
4177 """Veto(self, bool veto=True)"""
4178 return _core_.CloseEvent_Veto(*args, **kwargs)
4179
4180 def SetCanVeto(*args, **kwargs):
4181 """SetCanVeto(self, bool canVeto)"""
4182 return _core_.CloseEvent_SetCanVeto(*args, **kwargs)
4183
4184 def CanVeto(*args, **kwargs):
4185 """CanVeto(self) -> bool"""
4186 return _core_.CloseEvent_CanVeto(*args, **kwargs)
4187
4188 def GetVeto(*args, **kwargs):
4189 """GetVeto(self) -> bool"""
4190 return _core_.CloseEvent_GetVeto(*args, **kwargs)
4191
4192
4193 class CloseEventPtr(CloseEvent):
4194 def __init__(self, this):
4195 self.this = this
4196 if not hasattr(self,"thisown"): self.thisown = 0
4197 self.__class__ = CloseEvent
4198 _core_.CloseEvent_swigregister(CloseEventPtr)
4199
4200 #---------------------------------------------------------------------------
4201
4202 class ShowEvent(Event):
4203 """Proxy of C++ ShowEvent class"""
4204 def __repr__(self):
4205 return "<%s.%s; proxy of C++ wxShowEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
4206 def __init__(self, *args, **kwargs):
4207 """__init__(self, int winid=0, bool show=False) -> ShowEvent"""
4208 newobj = _core_.new_ShowEvent(*args, **kwargs)
4209 self.this = newobj.this
4210 self.thisown = 1
4211 del newobj.thisown
4212 def SetShow(*args, **kwargs):
4213 """SetShow(self, bool show)"""
4214 return _core_.ShowEvent_SetShow(*args, **kwargs)
4215
4216 def GetShow(*args, **kwargs):
4217 """GetShow(self) -> bool"""
4218 return _core_.ShowEvent_GetShow(*args, **kwargs)
4219
4220
4221 class ShowEventPtr(ShowEvent):
4222 def __init__(self, this):
4223 self.this = this
4224 if not hasattr(self,"thisown"): self.thisown = 0
4225 self.__class__ = ShowEvent
4226 _core_.ShowEvent_swigregister(ShowEventPtr)
4227
4228 #---------------------------------------------------------------------------
4229
4230 class IconizeEvent(Event):
4231 """Proxy of C++ IconizeEvent class"""
4232 def __repr__(self):
4233 return "<%s.%s; proxy of C++ wxIconizeEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
4234 def __init__(self, *args, **kwargs):
4235 """__init__(self, int id=0, bool iconized=True) -> IconizeEvent"""
4236 newobj = _core_.new_IconizeEvent(*args, **kwargs)
4237 self.this = newobj.this
4238 self.thisown = 1
4239 del newobj.thisown
4240 def Iconized(*args, **kwargs):
4241 """Iconized(self) -> bool"""
4242 return _core_.IconizeEvent_Iconized(*args, **kwargs)
4243
4244
4245 class IconizeEventPtr(IconizeEvent):
4246 def __init__(self, this):
4247 self.this = this
4248 if not hasattr(self,"thisown"): self.thisown = 0
4249 self.__class__ = IconizeEvent
4250 _core_.IconizeEvent_swigregister(IconizeEventPtr)
4251
4252 #---------------------------------------------------------------------------
4253
4254 class MaximizeEvent(Event):
4255 """Proxy of C++ MaximizeEvent class"""
4256 def __repr__(self):
4257 return "<%s.%s; proxy of C++ wxMaximizeEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
4258 def __init__(self, *args, **kwargs):
4259 """__init__(self, int id=0) -> MaximizeEvent"""
4260 newobj = _core_.new_MaximizeEvent(*args, **kwargs)
4261 self.this = newobj.this
4262 self.thisown = 1
4263 del newobj.thisown
4264
4265 class MaximizeEventPtr(MaximizeEvent):
4266 def __init__(self, this):
4267 self.this = this
4268 if not hasattr(self,"thisown"): self.thisown = 0
4269 self.__class__ = MaximizeEvent
4270 _core_.MaximizeEvent_swigregister(MaximizeEventPtr)
4271
4272 #---------------------------------------------------------------------------
4273
4274 class DropFilesEvent(Event):
4275 """Proxy of C++ DropFilesEvent class"""
4276 def __init__(self): raise RuntimeError, "No constructor defined"
4277 def __repr__(self):
4278 return "<%s.%s; proxy of C++ wxDropFilesEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
4279 def GetPosition(*args, **kwargs):
4280 """GetPosition(self) -> Point"""
4281 return _core_.DropFilesEvent_GetPosition(*args, **kwargs)
4282
4283 def GetNumberOfFiles(*args, **kwargs):
4284 """GetNumberOfFiles(self) -> int"""
4285 return _core_.DropFilesEvent_GetNumberOfFiles(*args, **kwargs)
4286
4287 def GetFiles(*args, **kwargs):
4288 """GetFiles(self) -> PyObject"""
4289 return _core_.DropFilesEvent_GetFiles(*args, **kwargs)
4290
4291
4292 class DropFilesEventPtr(DropFilesEvent):
4293 def __init__(self, this):
4294 self.this = this
4295 if not hasattr(self,"thisown"): self.thisown = 0
4296 self.__class__ = DropFilesEvent
4297 _core_.DropFilesEvent_swigregister(DropFilesEventPtr)
4298
4299 #---------------------------------------------------------------------------
4300
4301 UPDATE_UI_PROCESS_ALL = _core_.UPDATE_UI_PROCESS_ALL
4302 UPDATE_UI_PROCESS_SPECIFIED = _core_.UPDATE_UI_PROCESS_SPECIFIED
4303 class UpdateUIEvent(CommandEvent):
4304 """Proxy of C++ UpdateUIEvent class"""
4305 def __repr__(self):
4306 return "<%s.%s; proxy of C++ wxUpdateUIEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
4307 def __init__(self, *args, **kwargs):
4308 """__init__(self, int commandId=0) -> UpdateUIEvent"""
4309 newobj = _core_.new_UpdateUIEvent(*args, **kwargs)
4310 self.this = newobj.this
4311 self.thisown = 1
4312 del newobj.thisown
4313 def GetChecked(*args, **kwargs):
4314 """GetChecked(self) -> bool"""
4315 return _core_.UpdateUIEvent_GetChecked(*args, **kwargs)
4316
4317 def GetEnabled(*args, **kwargs):
4318 """GetEnabled(self) -> bool"""
4319 return _core_.UpdateUIEvent_GetEnabled(*args, **kwargs)
4320
4321 def GetText(*args, **kwargs):
4322 """GetText(self) -> String"""
4323 return _core_.UpdateUIEvent_GetText(*args, **kwargs)
4324
4325 def GetSetText(*args, **kwargs):
4326 """GetSetText(self) -> bool"""
4327 return _core_.UpdateUIEvent_GetSetText(*args, **kwargs)
4328
4329 def GetSetChecked(*args, **kwargs):
4330 """GetSetChecked(self) -> bool"""
4331 return _core_.UpdateUIEvent_GetSetChecked(*args, **kwargs)
4332
4333 def GetSetEnabled(*args, **kwargs):
4334 """GetSetEnabled(self) -> bool"""
4335 return _core_.UpdateUIEvent_GetSetEnabled(*args, **kwargs)
4336
4337 def Check(*args, **kwargs):
4338 """Check(self, bool check)"""
4339 return _core_.UpdateUIEvent_Check(*args, **kwargs)
4340
4341 def Enable(*args, **kwargs):
4342 """Enable(self, bool enable)"""
4343 return _core_.UpdateUIEvent_Enable(*args, **kwargs)
4344
4345 def SetText(*args, **kwargs):
4346 """SetText(self, String text)"""
4347 return _core_.UpdateUIEvent_SetText(*args, **kwargs)
4348
4349 def SetUpdateInterval(*args, **kwargs):
4350 """SetUpdateInterval(long updateInterval)"""
4351 return _core_.UpdateUIEvent_SetUpdateInterval(*args, **kwargs)
4352
4353 SetUpdateInterval = staticmethod(SetUpdateInterval)
4354 def GetUpdateInterval(*args, **kwargs):
4355 """GetUpdateInterval() -> long"""
4356 return _core_.UpdateUIEvent_GetUpdateInterval(*args, **kwargs)
4357
4358 GetUpdateInterval = staticmethod(GetUpdateInterval)
4359 def CanUpdate(*args, **kwargs):
4360 """CanUpdate(Window win) -> bool"""
4361 return _core_.UpdateUIEvent_CanUpdate(*args, **kwargs)
4362
4363 CanUpdate = staticmethod(CanUpdate)
4364 def ResetUpdateTime(*args, **kwargs):
4365 """ResetUpdateTime()"""
4366 return _core_.UpdateUIEvent_ResetUpdateTime(*args, **kwargs)
4367
4368 ResetUpdateTime = staticmethod(ResetUpdateTime)
4369 def SetMode(*args, **kwargs):
4370 """SetMode(int mode)"""
4371 return _core_.UpdateUIEvent_SetMode(*args, **kwargs)
4372
4373 SetMode = staticmethod(SetMode)
4374 def GetMode(*args, **kwargs):
4375 """GetMode() -> int"""
4376 return _core_.UpdateUIEvent_GetMode(*args, **kwargs)
4377
4378 GetMode = staticmethod(GetMode)
4379
4380 class UpdateUIEventPtr(UpdateUIEvent):
4381 def __init__(self, this):
4382 self.this = this
4383 if not hasattr(self,"thisown"): self.thisown = 0
4384 self.__class__ = UpdateUIEvent
4385 _core_.UpdateUIEvent_swigregister(UpdateUIEventPtr)
4386
4387 def UpdateUIEvent_SetUpdateInterval(*args, **kwargs):
4388 """UpdateUIEvent_SetUpdateInterval(long updateInterval)"""
4389 return _core_.UpdateUIEvent_SetUpdateInterval(*args, **kwargs)
4390
4391 def UpdateUIEvent_GetUpdateInterval(*args, **kwargs):
4392 """UpdateUIEvent_GetUpdateInterval() -> long"""
4393 return _core_.UpdateUIEvent_GetUpdateInterval(*args, **kwargs)
4394
4395 def UpdateUIEvent_CanUpdate(*args, **kwargs):
4396 """UpdateUIEvent_CanUpdate(Window win) -> bool"""
4397 return _core_.UpdateUIEvent_CanUpdate(*args, **kwargs)
4398
4399 def UpdateUIEvent_ResetUpdateTime(*args, **kwargs):
4400 """UpdateUIEvent_ResetUpdateTime()"""
4401 return _core_.UpdateUIEvent_ResetUpdateTime(*args, **kwargs)
4402
4403 def UpdateUIEvent_SetMode(*args, **kwargs):
4404 """UpdateUIEvent_SetMode(int mode)"""
4405 return _core_.UpdateUIEvent_SetMode(*args, **kwargs)
4406
4407 def UpdateUIEvent_GetMode(*args, **kwargs):
4408 """UpdateUIEvent_GetMode() -> int"""
4409 return _core_.UpdateUIEvent_GetMode(*args, **kwargs)
4410
4411 #---------------------------------------------------------------------------
4412
4413 class SysColourChangedEvent(Event):
4414 """Proxy of C++ SysColourChangedEvent class"""
4415 def __repr__(self):
4416 return "<%s.%s; proxy of C++ wxSysColourChangedEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
4417 def __init__(self, *args, **kwargs):
4418 """__init__(self) -> SysColourChangedEvent"""
4419 newobj = _core_.new_SysColourChangedEvent(*args, **kwargs)
4420 self.this = newobj.this
4421 self.thisown = 1
4422 del newobj.thisown
4423
4424 class SysColourChangedEventPtr(SysColourChangedEvent):
4425 def __init__(self, this):
4426 self.this = this
4427 if not hasattr(self,"thisown"): self.thisown = 0
4428 self.__class__ = SysColourChangedEvent
4429 _core_.SysColourChangedEvent_swigregister(SysColourChangedEventPtr)
4430
4431 #---------------------------------------------------------------------------
4432
4433 class MouseCaptureChangedEvent(Event):
4434 """Proxy of C++ MouseCaptureChangedEvent class"""
4435 def __repr__(self):
4436 return "<%s.%s; proxy of C++ wxMouseCaptureChangedEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
4437 def __init__(self, *args, **kwargs):
4438 """__init__(self, int winid=0, Window gainedCapture=None) -> MouseCaptureChangedEvent"""
4439 newobj = _core_.new_MouseCaptureChangedEvent(*args, **kwargs)
4440 self.this = newobj.this
4441 self.thisown = 1
4442 del newobj.thisown
4443 def GetCapturedWindow(*args, **kwargs):
4444 """GetCapturedWindow(self) -> Window"""
4445 return _core_.MouseCaptureChangedEvent_GetCapturedWindow(*args, **kwargs)
4446
4447
4448 class MouseCaptureChangedEventPtr(MouseCaptureChangedEvent):
4449 def __init__(self, this):
4450 self.this = this
4451 if not hasattr(self,"thisown"): self.thisown = 0
4452 self.__class__ = MouseCaptureChangedEvent
4453 _core_.MouseCaptureChangedEvent_swigregister(MouseCaptureChangedEventPtr)
4454
4455 #---------------------------------------------------------------------------
4456
4457 class DisplayChangedEvent(Event):
4458 """Proxy of C++ DisplayChangedEvent class"""
4459 def __repr__(self):
4460 return "<%s.%s; proxy of C++ wxDisplayChangedEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
4461 def __init__(self, *args, **kwargs):
4462 """__init__(self) -> DisplayChangedEvent"""
4463 newobj = _core_.new_DisplayChangedEvent(*args, **kwargs)
4464 self.this = newobj.this
4465 self.thisown = 1
4466 del newobj.thisown
4467
4468 class DisplayChangedEventPtr(DisplayChangedEvent):
4469 def __init__(self, this):
4470 self.this = this
4471 if not hasattr(self,"thisown"): self.thisown = 0
4472 self.__class__ = DisplayChangedEvent
4473 _core_.DisplayChangedEvent_swigregister(DisplayChangedEventPtr)
4474
4475 #---------------------------------------------------------------------------
4476
4477 class PaletteChangedEvent(Event):
4478 """Proxy of C++ PaletteChangedEvent class"""
4479 def __repr__(self):
4480 return "<%s.%s; proxy of C++ wxPaletteChangedEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
4481 def __init__(self, *args, **kwargs):
4482 """__init__(self, int id=0) -> PaletteChangedEvent"""
4483 newobj = _core_.new_PaletteChangedEvent(*args, **kwargs)
4484 self.this = newobj.this
4485 self.thisown = 1
4486 del newobj.thisown
4487 def SetChangedWindow(*args, **kwargs):
4488 """SetChangedWindow(self, Window win)"""
4489 return _core_.PaletteChangedEvent_SetChangedWindow(*args, **kwargs)
4490
4491 def GetChangedWindow(*args, **kwargs):
4492 """GetChangedWindow(self) -> Window"""
4493 return _core_.PaletteChangedEvent_GetChangedWindow(*args, **kwargs)
4494
4495
4496 class PaletteChangedEventPtr(PaletteChangedEvent):
4497 def __init__(self, this):
4498 self.this = this
4499 if not hasattr(self,"thisown"): self.thisown = 0
4500 self.__class__ = PaletteChangedEvent
4501 _core_.PaletteChangedEvent_swigregister(PaletteChangedEventPtr)
4502
4503 #---------------------------------------------------------------------------
4504
4505 class QueryNewPaletteEvent(Event):
4506 """Proxy of C++ QueryNewPaletteEvent class"""
4507 def __repr__(self):
4508 return "<%s.%s; proxy of C++ wxQueryNewPaletteEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
4509 def __init__(self, *args, **kwargs):
4510 """__init__(self, int winid=0) -> QueryNewPaletteEvent"""
4511 newobj = _core_.new_QueryNewPaletteEvent(*args, **kwargs)
4512 self.this = newobj.this
4513 self.thisown = 1
4514 del newobj.thisown
4515 def SetPaletteRealized(*args, **kwargs):
4516 """SetPaletteRealized(self, bool realized)"""
4517 return _core_.QueryNewPaletteEvent_SetPaletteRealized(*args, **kwargs)
4518
4519 def GetPaletteRealized(*args, **kwargs):
4520 """GetPaletteRealized(self) -> bool"""
4521 return _core_.QueryNewPaletteEvent_GetPaletteRealized(*args, **kwargs)
4522
4523
4524 class QueryNewPaletteEventPtr(QueryNewPaletteEvent):
4525 def __init__(self, this):
4526 self.this = this
4527 if not hasattr(self,"thisown"): self.thisown = 0
4528 self.__class__ = QueryNewPaletteEvent
4529 _core_.QueryNewPaletteEvent_swigregister(QueryNewPaletteEventPtr)
4530
4531 #---------------------------------------------------------------------------
4532
4533 class NavigationKeyEvent(Event):
4534 """Proxy of C++ NavigationKeyEvent class"""
4535 def __repr__(self):
4536 return "<%s.%s; proxy of C++ wxNavigationKeyEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
4537 def __init__(self, *args, **kwargs):
4538 """__init__(self) -> NavigationKeyEvent"""
4539 newobj = _core_.new_NavigationKeyEvent(*args, **kwargs)
4540 self.this = newobj.this
4541 self.thisown = 1
4542 del newobj.thisown
4543 def GetDirection(*args, **kwargs):
4544 """GetDirection(self) -> bool"""
4545 return _core_.NavigationKeyEvent_GetDirection(*args, **kwargs)
4546
4547 def SetDirection(*args, **kwargs):
4548 """SetDirection(self, bool forward)"""
4549 return _core_.NavigationKeyEvent_SetDirection(*args, **kwargs)
4550
4551 def IsWindowChange(*args, **kwargs):
4552 """IsWindowChange(self) -> bool"""
4553 return _core_.NavigationKeyEvent_IsWindowChange(*args, **kwargs)
4554
4555 def SetWindowChange(*args, **kwargs):
4556 """SetWindowChange(self, bool ischange)"""
4557 return _core_.NavigationKeyEvent_SetWindowChange(*args, **kwargs)
4558
4559 def SetFlags(*args, **kwargs):
4560 """SetFlags(self, long flags)"""
4561 return _core_.NavigationKeyEvent_SetFlags(*args, **kwargs)
4562
4563 def GetCurrentFocus(*args, **kwargs):
4564 """GetCurrentFocus(self) -> Window"""
4565 return _core_.NavigationKeyEvent_GetCurrentFocus(*args, **kwargs)
4566
4567 def SetCurrentFocus(*args, **kwargs):
4568 """SetCurrentFocus(self, Window win)"""
4569 return _core_.NavigationKeyEvent_SetCurrentFocus(*args, **kwargs)
4570
4571 IsBackward = _core_.NavigationKeyEvent_IsBackward
4572 IsForward = _core_.NavigationKeyEvent_IsForward
4573 WinChange = _core_.NavigationKeyEvent_WinChange
4574
4575 class NavigationKeyEventPtr(NavigationKeyEvent):
4576 def __init__(self, this):
4577 self.this = this
4578 if not hasattr(self,"thisown"): self.thisown = 0
4579 self.__class__ = NavigationKeyEvent
4580 _core_.NavigationKeyEvent_swigregister(NavigationKeyEventPtr)
4581
4582 #---------------------------------------------------------------------------
4583
4584 class WindowCreateEvent(CommandEvent):
4585 """Proxy of C++ WindowCreateEvent class"""
4586 def __repr__(self):
4587 return "<%s.%s; proxy of C++ wxWindowCreateEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
4588 def __init__(self, *args, **kwargs):
4589 """__init__(self, Window win=None) -> WindowCreateEvent"""
4590 newobj = _core_.new_WindowCreateEvent(*args, **kwargs)
4591 self.this = newobj.this
4592 self.thisown = 1
4593 del newobj.thisown
4594 def GetWindow(*args, **kwargs):
4595 """GetWindow(self) -> Window"""
4596 return _core_.WindowCreateEvent_GetWindow(*args, **kwargs)
4597
4598
4599 class WindowCreateEventPtr(WindowCreateEvent):
4600 def __init__(self, this):
4601 self.this = this
4602 if not hasattr(self,"thisown"): self.thisown = 0
4603 self.__class__ = WindowCreateEvent
4604 _core_.WindowCreateEvent_swigregister(WindowCreateEventPtr)
4605
4606 class WindowDestroyEvent(CommandEvent):
4607 """Proxy of C++ WindowDestroyEvent class"""
4608 def __repr__(self):
4609 return "<%s.%s; proxy of C++ wxWindowDestroyEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
4610 def __init__(self, *args, **kwargs):
4611 """__init__(self, Window win=None) -> WindowDestroyEvent"""
4612 newobj = _core_.new_WindowDestroyEvent(*args, **kwargs)
4613 self.this = newobj.this
4614 self.thisown = 1
4615 del newobj.thisown
4616 def GetWindow(*args, **kwargs):
4617 """GetWindow(self) -> Window"""
4618 return _core_.WindowDestroyEvent_GetWindow(*args, **kwargs)
4619
4620
4621 class WindowDestroyEventPtr(WindowDestroyEvent):
4622 def __init__(self, this):
4623 self.this = this
4624 if not hasattr(self,"thisown"): self.thisown = 0
4625 self.__class__ = WindowDestroyEvent
4626 _core_.WindowDestroyEvent_swigregister(WindowDestroyEventPtr)
4627
4628 #---------------------------------------------------------------------------
4629
4630 class ContextMenuEvent(CommandEvent):
4631 """Proxy of C++ ContextMenuEvent class"""
4632 def __repr__(self):
4633 return "<%s.%s; proxy of C++ wxContextMenuEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
4634 def __init__(self, *args, **kwargs):
4635 """__init__(self, wxEventType type=wxEVT_NULL, int winid=0, Point pt=DefaultPosition) -> ContextMenuEvent"""
4636 newobj = _core_.new_ContextMenuEvent(*args, **kwargs)
4637 self.this = newobj.this
4638 self.thisown = 1
4639 del newobj.thisown
4640 def GetPosition(*args, **kwargs):
4641 """GetPosition(self) -> Point"""
4642 return _core_.ContextMenuEvent_GetPosition(*args, **kwargs)
4643
4644 def SetPosition(*args, **kwargs):
4645 """SetPosition(self, Point pos)"""
4646 return _core_.ContextMenuEvent_SetPosition(*args, **kwargs)
4647
4648
4649 class ContextMenuEventPtr(ContextMenuEvent):
4650 def __init__(self, this):
4651 self.this = this
4652 if not hasattr(self,"thisown"): self.thisown = 0
4653 self.__class__ = ContextMenuEvent
4654 _core_.ContextMenuEvent_swigregister(ContextMenuEventPtr)
4655
4656 #---------------------------------------------------------------------------
4657
4658 IDLE_PROCESS_ALL = _core_.IDLE_PROCESS_ALL
4659 IDLE_PROCESS_SPECIFIED = _core_.IDLE_PROCESS_SPECIFIED
4660 class IdleEvent(Event):
4661 """Proxy of C++ IdleEvent class"""
4662 def __repr__(self):
4663 return "<%s.%s; proxy of C++ wxIdleEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
4664 def __init__(self, *args, **kwargs):
4665 """__init__(self) -> IdleEvent"""
4666 newobj = _core_.new_IdleEvent(*args, **kwargs)
4667 self.this = newobj.this
4668 self.thisown = 1
4669 del newobj.thisown
4670 def RequestMore(*args, **kwargs):
4671 """RequestMore(self, bool needMore=True)"""
4672 return _core_.IdleEvent_RequestMore(*args, **kwargs)
4673
4674 def MoreRequested(*args, **kwargs):
4675 """MoreRequested(self) -> bool"""
4676 return _core_.IdleEvent_MoreRequested(*args, **kwargs)
4677
4678 def SetMode(*args, **kwargs):
4679 """SetMode(int mode)"""
4680 return _core_.IdleEvent_SetMode(*args, **kwargs)
4681
4682 SetMode = staticmethod(SetMode)
4683 def GetMode(*args, **kwargs):
4684 """GetMode() -> int"""
4685 return _core_.IdleEvent_GetMode(*args, **kwargs)
4686
4687 GetMode = staticmethod(GetMode)
4688 def CanSend(*args, **kwargs):
4689 """CanSend(Window win) -> bool"""
4690 return _core_.IdleEvent_CanSend(*args, **kwargs)
4691
4692 CanSend = staticmethod(CanSend)
4693
4694 class IdleEventPtr(IdleEvent):
4695 def __init__(self, this):
4696 self.this = this
4697 if not hasattr(self,"thisown"): self.thisown = 0
4698 self.__class__ = IdleEvent
4699 _core_.IdleEvent_swigregister(IdleEventPtr)
4700
4701 def IdleEvent_SetMode(*args, **kwargs):
4702 """IdleEvent_SetMode(int mode)"""
4703 return _core_.IdleEvent_SetMode(*args, **kwargs)
4704
4705 def IdleEvent_GetMode(*args, **kwargs):
4706 """IdleEvent_GetMode() -> int"""
4707 return _core_.IdleEvent_GetMode(*args, **kwargs)
4708
4709 def IdleEvent_CanSend(*args, **kwargs):
4710 """IdleEvent_CanSend(Window win) -> bool"""
4711 return _core_.IdleEvent_CanSend(*args, **kwargs)
4712
4713 #---------------------------------------------------------------------------
4714
4715 class PyEvent(Event):
4716 """Proxy of C++ PyEvent class"""
4717 def __repr__(self):
4718 return "<%s.%s; proxy of C++ wxPyEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
4719 def __init__(self, *args, **kwargs):
4720 """__init__(self, int winid=0, wxEventType commandType=wxEVT_NULL) -> PyEvent"""
4721 newobj = _core_.new_PyEvent(*args, **kwargs)
4722 self.this = newobj.this
4723 self.thisown = 1
4724 del newobj.thisown
4725 self.SetSelf(self)
4726
4727 def __del__(self, destroy=_core_.delete_PyEvent):
4728 """__del__(self)"""
4729 try:
4730 if self.thisown: destroy(self)
4731 except: pass
4732
4733 def SetSelf(*args, **kwargs):
4734 """SetSelf(self, PyObject self)"""
4735 return _core_.PyEvent_SetSelf(*args, **kwargs)
4736
4737 def GetSelf(*args, **kwargs):
4738 """GetSelf(self) -> PyObject"""
4739 return _core_.PyEvent_GetSelf(*args, **kwargs)
4740
4741
4742 class PyEventPtr(PyEvent):
4743 def __init__(self, this):
4744 self.this = this
4745 if not hasattr(self,"thisown"): self.thisown = 0
4746 self.__class__ = PyEvent
4747 _core_.PyEvent_swigregister(PyEventPtr)
4748
4749 class PyCommandEvent(CommandEvent):
4750 """Proxy of C++ PyCommandEvent class"""
4751 def __repr__(self):
4752 return "<%s.%s; proxy of C++ wxPyCommandEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
4753 def __init__(self, *args, **kwargs):
4754 """__init__(self, wxEventType commandType=wxEVT_NULL, int id=0) -> PyCommandEvent"""
4755 newobj = _core_.new_PyCommandEvent(*args, **kwargs)
4756 self.this = newobj.this
4757 self.thisown = 1
4758 del newobj.thisown
4759 self.SetSelf(self)
4760
4761 def __del__(self, destroy=_core_.delete_PyCommandEvent):
4762 """__del__(self)"""
4763 try:
4764 if self.thisown: destroy(self)
4765 except: pass
4766
4767 def SetSelf(*args, **kwargs):
4768 """SetSelf(self, PyObject self)"""
4769 return _core_.PyCommandEvent_SetSelf(*args, **kwargs)
4770
4771 def GetSelf(*args, **kwargs):
4772 """GetSelf(self) -> PyObject"""
4773 return _core_.PyCommandEvent_GetSelf(*args, **kwargs)
4774
4775
4776 class PyCommandEventPtr(PyCommandEvent):
4777 def __init__(self, this):
4778 self.this = this
4779 if not hasattr(self,"thisown"): self.thisown = 0
4780 self.__class__ = PyCommandEvent
4781 _core_.PyCommandEvent_swigregister(PyCommandEventPtr)
4782
4783 #---------------------------------------------------------------------------
4784
4785 PYAPP_ASSERT_SUPPRESS = _core_.PYAPP_ASSERT_SUPPRESS
4786 PYAPP_ASSERT_EXCEPTION = _core_.PYAPP_ASSERT_EXCEPTION
4787 PYAPP_ASSERT_DIALOG = _core_.PYAPP_ASSERT_DIALOG
4788 PYAPP_ASSERT_LOG = _core_.PYAPP_ASSERT_LOG
4789 PRINT_WINDOWS = _core_.PRINT_WINDOWS
4790 PRINT_POSTSCRIPT = _core_.PRINT_POSTSCRIPT
4791 class PyApp(EvtHandler):
4792 """
4793 The ``wx.PyApp`` class is an *implementation detail*, please use the
4794 `wx.App` class (or some other derived class) instead.
4795 """
4796 def __repr__(self):
4797 return "<%s.%s; proxy of C++ wxPyApp instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
4798 def __init__(self, *args, **kwargs):
4799 """
4800 __init__(self) -> PyApp
4801
4802 Create a new application object, starting the bootstrap process.
4803 """
4804 newobj = _core_.new_PyApp(*args, **kwargs)
4805 self.this = newobj.this
4806 self.thisown = 1
4807 del newobj.thisown
4808 self._setCallbackInfo(self, PyApp)
4809 self._setOORInfo(self)
4810
4811 def __del__(self, destroy=_core_.delete_PyApp):
4812 """__del__(self)"""
4813 try:
4814 if self.thisown: destroy(self)
4815 except: pass
4816
4817 def _setCallbackInfo(*args, **kwargs):
4818 """_setCallbackInfo(self, PyObject self, PyObject _class)"""
4819 return _core_.PyApp__setCallbackInfo(*args, **kwargs)
4820
4821 def GetAppName(*args, **kwargs):
4822 """
4823 GetAppName(self) -> String
4824
4825 Get the application name.
4826 """
4827 return _core_.PyApp_GetAppName(*args, **kwargs)
4828
4829 def SetAppName(*args, **kwargs):
4830 """
4831 SetAppName(self, String name)
4832
4833 Set the application name. This value may be used automatically by
4834 `wx.Config` and such.
4835 """
4836 return _core_.PyApp_SetAppName(*args, **kwargs)
4837
4838 def GetClassName(*args, **kwargs):
4839 """
4840 GetClassName(self) -> String
4841
4842 Get the application's class name.
4843 """
4844 return _core_.PyApp_GetClassName(*args, **kwargs)
4845
4846 def SetClassName(*args, **kwargs):
4847 """
4848 SetClassName(self, String name)
4849
4850 Set the application's class name. This value may be used for
4851 X-resources if applicable for the platform
4852 """
4853 return _core_.PyApp_SetClassName(*args, **kwargs)
4854
4855 def GetVendorName(*args, **kwargs):
4856 """
4857 GetVendorName(self) -> String
4858
4859 Get the application's vendor name.
4860 """
4861 return _core_.PyApp_GetVendorName(*args, **kwargs)
4862
4863 def SetVendorName(*args, **kwargs):
4864 """
4865 SetVendorName(self, String name)
4866
4867 Set the application's vendor name. This value may be used
4868 automatically by `wx.Config` and such.
4869 """
4870 return _core_.PyApp_SetVendorName(*args, **kwargs)
4871
4872 def GetTraits(*args, **kwargs):
4873 """
4874 GetTraits(self) -> wxAppTraits
4875
4876 Return (and create if necessary) the app traits object to which we
4877 delegate for everything which either should be configurable by the
4878 user (then he can change the default behaviour simply by overriding
4879 CreateTraits() and returning his own traits object) or which is
4880 GUI/console dependent as then wx.AppTraits allows us to abstract the
4881 differences behind the common facade.
4882
4883 :todo: Add support for overriding CreateAppTraits in wxPython.
4884 """
4885 return _core_.PyApp_GetTraits(*args, **kwargs)
4886
4887 def ProcessPendingEvents(*args, **kwargs):
4888 """
4889 ProcessPendingEvents(self)
4890
4891 Process all events in the Pending Events list -- it is necessary to
4892 call this function to process posted events. This normally happens
4893 during each event loop iteration.
4894 """
4895 return _core_.PyApp_ProcessPendingEvents(*args, **kwargs)
4896
4897 def Yield(*args, **kwargs):
4898 """
4899 Yield(self, bool onlyIfNeeded=False) -> bool
4900
4901 Process all currently pending events right now, instead of waiting
4902 until return to the event loop. It is an error to call ``Yield``
4903 recursively unless the value of ``onlyIfNeeded`` is True.
4904
4905 :warning: This function is dangerous as it can lead to unexpected
4906 reentrancies (i.e. when called from an event handler it may
4907 result in calling the same event handler again), use with
4908 extreme care or, better, don't use at all!
4909
4910 :see: `wx.Yield`, `wx.YieldIfNeeded`, `wx.SafeYield`
4911
4912 """
4913 return _core_.PyApp_Yield(*args, **kwargs)
4914
4915 def WakeUpIdle(*args, **kwargs):
4916 """
4917 WakeUpIdle(self)
4918
4919 Make sure that idle events are sent again.
4920 :see: `wx.WakeUpIdle`
4921 """
4922 return _core_.PyApp_WakeUpIdle(*args, **kwargs)
4923
4924 def IsMainLoopRunning(*args, **kwargs):
4925 """
4926 IsMainLoopRunning() -> bool
4927
4928 Returns True if we're running the main loop, i.e. if the events can
4929 currently be dispatched.
4930 """
4931 return _core_.PyApp_IsMainLoopRunning(*args, **kwargs)
4932
4933 IsMainLoopRunning = staticmethod(IsMainLoopRunning)
4934 def MainLoop(*args, **kwargs):
4935 """
4936 MainLoop(self) -> int
4937
4938 Execute the main GUI loop, the function doesn't normally return until
4939 all top level windows have been closed and destroyed.
4940 """
4941 return _core_.PyApp_MainLoop(*args, **kwargs)
4942
4943 def Exit(*args, **kwargs):
4944 """
4945 Exit(self)
4946
4947 Exit the main loop thus terminating the application.
4948 :see: `wx.Exit`
4949 """
4950 return _core_.PyApp_Exit(*args, **kwargs)
4951
4952 def ExitMainLoop(*args, **kwargs):
4953 """
4954 ExitMainLoop(self)
4955
4956 Exit the main GUI loop during the next iteration of the main
4957 loop, (i.e. it does not stop the program immediately!)
4958 """
4959 return _core_.PyApp_ExitMainLoop(*args, **kwargs)
4960
4961 def Pending(*args, **kwargs):
4962 """
4963 Pending(self) -> bool
4964
4965 Returns True if there are unprocessed events in the event queue.
4966 """
4967 return _core_.PyApp_Pending(*args, **kwargs)
4968
4969 def Dispatch(*args, **kwargs):
4970 """
4971 Dispatch(self) -> bool
4972
4973 Process the first event in the event queue (blocks until an event
4974 appears if there are none currently)
4975 """
4976 return _core_.PyApp_Dispatch(*args, **kwargs)
4977
4978 def ProcessIdle(*args, **kwargs):
4979 """
4980 ProcessIdle(self) -> bool
4981
4982 Called from the MainLoop when the application becomes idle (there are
4983 no pending events) and sends a `wx.IdleEvent` to all interested
4984 parties. Returns True if more idle events are needed, False if not.
4985 """
4986 return _core_.PyApp_ProcessIdle(*args, **kwargs)
4987
4988 def SendIdleEvents(*args, **kwargs):
4989 """
4990 SendIdleEvents(self, Window win, IdleEvent event) -> bool
4991
4992 Send idle event to window and all subwindows. Returns True if more
4993 idle time is requested.
4994 """
4995 return _core_.PyApp_SendIdleEvents(*args, **kwargs)
4996
4997 def IsActive(*args, **kwargs):
4998 """
4999 IsActive(self) -> bool
5000
5001 Return True if our app has focus.
5002 """
5003 return _core_.PyApp_IsActive(*args, **kwargs)
5004
5005 def SetTopWindow(*args, **kwargs):
5006 """
5007 SetTopWindow(self, Window win)
5008
5009 Set the *main* top level window
5010 """
5011 return _core_.PyApp_SetTopWindow(*args, **kwargs)
5012
5013 def GetTopWindow(*args, **kwargs):
5014 """
5015 GetTopWindow(self) -> Window
5016
5017 Return the *main* top level window (if it hadn't been set previously
5018 with SetTopWindow(), will return just some top level window and, if
5019 there not any, will return None)
5020 """
5021 return _core_.PyApp_GetTopWindow(*args, **kwargs)
5022
5023 def SetExitOnFrameDelete(*args, **kwargs):
5024 """
5025 SetExitOnFrameDelete(self, bool flag)
5026
5027 Control the exit behaviour: by default, the program will exit the main
5028 loop (and so, usually, terminate) when the last top-level program
5029 window is deleted. Beware that if you disable this behaviour (with
5030 SetExitOnFrameDelete(False)), you'll have to call ExitMainLoop()
5031 explicitly from somewhere.
5032 """
5033 return _core_.PyApp_SetExitOnFrameDelete(*args, **kwargs)
5034
5035 def GetExitOnFrameDelete(*args, **kwargs):
5036 """
5037 GetExitOnFrameDelete(self) -> bool
5038
5039 Get the current exit behaviour setting.
5040 """
5041 return _core_.PyApp_GetExitOnFrameDelete(*args, **kwargs)
5042
5043 def SetUseBestVisual(*args, **kwargs):
5044 """
5045 SetUseBestVisual(self, bool flag)
5046
5047 Set whether the app should try to use the best available visual on
5048 systems where more than one is available, (Sun, SGI, XFree86 4, etc.)
5049 """
5050 return _core_.PyApp_SetUseBestVisual(*args, **kwargs)
5051
5052 def GetUseBestVisual(*args, **kwargs):
5053 """
5054 GetUseBestVisual(self) -> bool
5055
5056 Get current UseBestVisual setting.
5057 """
5058 return _core_.PyApp_GetUseBestVisual(*args, **kwargs)
5059
5060 def SetPrintMode(*args, **kwargs):
5061 """SetPrintMode(self, int mode)"""
5062 return _core_.PyApp_SetPrintMode(*args, **kwargs)
5063
5064 def GetPrintMode(*args, **kwargs):
5065 """GetPrintMode(self) -> int"""
5066 return _core_.PyApp_GetPrintMode(*args, **kwargs)
5067
5068 def SetAssertMode(*args, **kwargs):
5069 """
5070 SetAssertMode(self, int mode)
5071
5072 Set the OnAssert behaviour for debug and hybrid builds.
5073 """
5074 return _core_.PyApp_SetAssertMode(*args, **kwargs)
5075
5076 def GetAssertMode(*args, **kwargs):
5077 """
5078 GetAssertMode(self) -> int
5079
5080 Get the current OnAssert behaviour setting.
5081 """
5082 return _core_.PyApp_GetAssertMode(*args, **kwargs)
5083
5084 def GetMacSupportPCMenuShortcuts(*args, **kwargs):
5085 """GetMacSupportPCMenuShortcuts() -> bool"""
5086 return _core_.PyApp_GetMacSupportPCMenuShortcuts(*args, **kwargs)
5087
5088 GetMacSupportPCMenuShortcuts = staticmethod(GetMacSupportPCMenuShortcuts)
5089 def GetMacAboutMenuItemId(*args, **kwargs):
5090 """GetMacAboutMenuItemId() -> long"""
5091 return _core_.PyApp_GetMacAboutMenuItemId(*args, **kwargs)
5092
5093 GetMacAboutMenuItemId = staticmethod(GetMacAboutMenuItemId)
5094 def GetMacPreferencesMenuItemId(*args, **kwargs):
5095 """GetMacPreferencesMenuItemId() -> long"""
5096 return _core_.PyApp_GetMacPreferencesMenuItemId(*args, **kwargs)
5097
5098 GetMacPreferencesMenuItemId = staticmethod(GetMacPreferencesMenuItemId)
5099 def GetMacExitMenuItemId(*args, **kwargs):
5100 """GetMacExitMenuItemId() -> long"""
5101 return _core_.PyApp_GetMacExitMenuItemId(*args, **kwargs)
5102
5103 GetMacExitMenuItemId = staticmethod(GetMacExitMenuItemId)
5104 def GetMacHelpMenuTitleName(*args, **kwargs):
5105 """GetMacHelpMenuTitleName() -> String"""
5106 return _core_.PyApp_GetMacHelpMenuTitleName(*args, **kwargs)
5107
5108 GetMacHelpMenuTitleName = staticmethod(GetMacHelpMenuTitleName)
5109 def SetMacSupportPCMenuShortcuts(*args, **kwargs):
5110 """SetMacSupportPCMenuShortcuts(bool val)"""
5111 return _core_.PyApp_SetMacSupportPCMenuShortcuts(*args, **kwargs)
5112
5113 SetMacSupportPCMenuShortcuts = staticmethod(SetMacSupportPCMenuShortcuts)
5114 def SetMacAboutMenuItemId(*args, **kwargs):
5115 """SetMacAboutMenuItemId(long val)"""
5116 return _core_.PyApp_SetMacAboutMenuItemId(*args, **kwargs)
5117
5118 SetMacAboutMenuItemId = staticmethod(SetMacAboutMenuItemId)
5119 def SetMacPreferencesMenuItemId(*args, **kwargs):
5120 """SetMacPreferencesMenuItemId(long val)"""
5121 return _core_.PyApp_SetMacPreferencesMenuItemId(*args, **kwargs)
5122
5123 SetMacPreferencesMenuItemId = staticmethod(SetMacPreferencesMenuItemId)
5124 def SetMacExitMenuItemId(*args, **kwargs):
5125 """SetMacExitMenuItemId(long val)"""
5126 return _core_.PyApp_SetMacExitMenuItemId(*args, **kwargs)
5127
5128 SetMacExitMenuItemId = staticmethod(SetMacExitMenuItemId)
5129 def SetMacHelpMenuTitleName(*args, **kwargs):
5130 """SetMacHelpMenuTitleName(String val)"""
5131 return _core_.PyApp_SetMacHelpMenuTitleName(*args, **kwargs)
5132
5133 SetMacHelpMenuTitleName = staticmethod(SetMacHelpMenuTitleName)
5134 def _BootstrapApp(*args, **kwargs):
5135 """
5136 _BootstrapApp(self)
5137
5138 For internal use only
5139 """
5140 return _core_.PyApp__BootstrapApp(*args, **kwargs)
5141
5142 def GetComCtl32Version(*args, **kwargs):
5143 """
5144 GetComCtl32Version() -> int
5145
5146 Returns 400, 470, 471, etc. for comctl32.dll 4.00, 4.70, 4.71 or 0 if
5147 it wasn't found at all. Raises an exception on non-Windows platforms.
5148 """
5149 return _core_.PyApp_GetComCtl32Version(*args, **kwargs)
5150
5151 GetComCtl32Version = staticmethod(GetComCtl32Version)
5152
5153 class PyAppPtr(PyApp):
5154 def __init__(self, this):
5155 self.this = this
5156 if not hasattr(self,"thisown"): self.thisown = 0
5157 self.__class__ = PyApp
5158 _core_.PyApp_swigregister(PyAppPtr)
5159
5160 def PyApp_IsMainLoopRunning(*args, **kwargs):
5161 """
5162 PyApp_IsMainLoopRunning() -> bool
5163
5164 Returns True if we're running the main loop, i.e. if the events can
5165 currently be dispatched.
5166 """
5167 return _core_.PyApp_IsMainLoopRunning(*args, **kwargs)
5168
5169 def PyApp_GetMacSupportPCMenuShortcuts(*args, **kwargs):
5170 """PyApp_GetMacSupportPCMenuShortcuts() -> bool"""
5171 return _core_.PyApp_GetMacSupportPCMenuShortcuts(*args, **kwargs)
5172
5173 def PyApp_GetMacAboutMenuItemId(*args, **kwargs):
5174 """PyApp_GetMacAboutMenuItemId() -> long"""
5175 return _core_.PyApp_GetMacAboutMenuItemId(*args, **kwargs)
5176
5177 def PyApp_GetMacPreferencesMenuItemId(*args, **kwargs):
5178 """PyApp_GetMacPreferencesMenuItemId() -> long"""
5179 return _core_.PyApp_GetMacPreferencesMenuItemId(*args, **kwargs)
5180
5181 def PyApp_GetMacExitMenuItemId(*args, **kwargs):
5182 """PyApp_GetMacExitMenuItemId() -> long"""
5183 return _core_.PyApp_GetMacExitMenuItemId(*args, **kwargs)
5184
5185 def PyApp_GetMacHelpMenuTitleName(*args, **kwargs):
5186 """PyApp_GetMacHelpMenuTitleName() -> String"""
5187 return _core_.PyApp_GetMacHelpMenuTitleName(*args, **kwargs)
5188
5189 def PyApp_SetMacSupportPCMenuShortcuts(*args, **kwargs):
5190 """PyApp_SetMacSupportPCMenuShortcuts(bool val)"""
5191 return _core_.PyApp_SetMacSupportPCMenuShortcuts(*args, **kwargs)
5192
5193 def PyApp_SetMacAboutMenuItemId(*args, **kwargs):
5194 """PyApp_SetMacAboutMenuItemId(long val)"""
5195 return _core_.PyApp_SetMacAboutMenuItemId(*args, **kwargs)
5196
5197 def PyApp_SetMacPreferencesMenuItemId(*args, **kwargs):
5198 """PyApp_SetMacPreferencesMenuItemId(long val)"""
5199 return _core_.PyApp_SetMacPreferencesMenuItemId(*args, **kwargs)
5200
5201 def PyApp_SetMacExitMenuItemId(*args, **kwargs):
5202 """PyApp_SetMacExitMenuItemId(long val)"""
5203 return _core_.PyApp_SetMacExitMenuItemId(*args, **kwargs)
5204
5205 def PyApp_SetMacHelpMenuTitleName(*args, **kwargs):
5206 """PyApp_SetMacHelpMenuTitleName(String val)"""
5207 return _core_.PyApp_SetMacHelpMenuTitleName(*args, **kwargs)
5208
5209 def PyApp_GetComCtl32Version(*args, **kwargs):
5210 """
5211 PyApp_GetComCtl32Version() -> int
5212
5213 Returns 400, 470, 471, etc. for comctl32.dll 4.00, 4.70, 4.71 or 0 if
5214 it wasn't found at all. Raises an exception on non-Windows platforms.
5215 """
5216 return _core_.PyApp_GetComCtl32Version(*args, **kwargs)
5217
5218 #---------------------------------------------------------------------------
5219
5220
5221 def Exit(*args, **kwargs):
5222 """
5223 Exit()
5224
5225 Force an exit of the application. Convenience for wx.GetApp().Exit()
5226 """
5227 return _core_.Exit(*args, **kwargs)
5228
5229 def Yield(*args, **kwargs):
5230 """
5231 Yield() -> bool
5232
5233 Yield to other apps/messages. Convenience for wx.GetApp().Yield()
5234 """
5235 return _core_.Yield(*args, **kwargs)
5236
5237 def YieldIfNeeded(*args, **kwargs):
5238 """
5239 YieldIfNeeded() -> bool
5240
5241 Yield to other apps/messages. Convenience for wx.GetApp().Yield(True)
5242 """
5243 return _core_.YieldIfNeeded(*args, **kwargs)
5244
5245 def SafeYield(*args, **kwargs):
5246 """
5247 SafeYield(Window win=None, bool onlyIfNeeded=False) -> bool
5248
5249 This function is similar to `wx.Yield`, except that it disables the
5250 user input to all program windows before calling `wx.Yield` and
5251 re-enables it again afterwards. If ``win`` is not None, this window
5252 will remain enabled, allowing the implementation of some limited user
5253 interaction.
5254
5255 :Returns: the result of the call to `wx.Yield`.
5256 """
5257 return _core_.SafeYield(*args, **kwargs)
5258
5259 def WakeUpIdle(*args, **kwargs):
5260 """
5261 WakeUpIdle()
5262
5263 Cause the message queue to become empty again, so idle events will be
5264 sent.
5265 """
5266 return _core_.WakeUpIdle(*args, **kwargs)
5267
5268 def PostEvent(*args, **kwargs):
5269 """
5270 PostEvent(EvtHandler dest, Event event)
5271
5272 Send an event to a window or other wx.EvtHandler to be processed
5273 later.
5274 """
5275 return _core_.PostEvent(*args, **kwargs)
5276
5277 def App_CleanUp(*args, **kwargs):
5278 """
5279 App_CleanUp()
5280
5281 For internal use only, it is used to cleanup after wxWidgets when
5282 Python shuts down.
5283 """
5284 return _core_.App_CleanUp(*args, **kwargs)
5285
5286 def GetApp(*args, **kwargs):
5287 """
5288 GetApp() -> PyApp
5289
5290 Return a reference to the current wx.App object.
5291 """
5292 return _core_.GetApp(*args, **kwargs)
5293
5294 def SetDefaultPyEncoding(*args, **kwargs):
5295 """
5296 SetDefaultPyEncoding(string encoding)
5297
5298 Sets the encoding that wxPython will use when it needs to convert a
5299 Python string or unicode object to or from a wxString.
5300
5301 The default encoding is the value of ``locale.getdefaultlocale()[1]``
5302 but please be aware that the default encoding within the same locale
5303 may be slightly different on different platforms. For example, please
5304 see http://www.alanwood.net/demos/charsetdiffs.html for differences
5305 between the common latin/roman encodings.
5306 """
5307 return _core_.SetDefaultPyEncoding(*args, **kwargs)
5308
5309 def GetDefaultPyEncoding(*args, **kwargs):
5310 """
5311 GetDefaultPyEncoding() -> string
5312
5313 Gets the current encoding that wxPython will use when it needs to
5314 convert a Python string or unicode object to or from a wxString.
5315 """
5316 return _core_.GetDefaultPyEncoding(*args, **kwargs)
5317 #----------------------------------------------------------------------
5318
5319 class PyOnDemandOutputWindow:
5320 """
5321 A class that can be used for redirecting Python's stdout and
5322 stderr streams. It will do nothing until something is wrriten to
5323 the stream at which point it will create a Frame with a text area
5324 and write the text there.
5325 """
5326 def __init__(self, title = "wxPython: stdout/stderr"):
5327 self.frame = None
5328 self.title = title
5329 self.pos = wx.DefaultPosition
5330 self.size = (450, 300)
5331 self.parent = None
5332
5333 def SetParent(self, parent):
5334 """Set the window to be used as the popup Frame's parent."""
5335 self.parent = parent
5336
5337
5338 def CreateOutputWindow(self, st):
5339 self.frame = wx.Frame(self.parent, -1, self.title, self.pos, self.size,
5340 style=wx.DEFAULT_FRAME_STYLE)
5341 self.text = wx.TextCtrl(self.frame, -1, "",
5342 style=wx.TE_MULTILINE|wx.TE_READONLY)
5343 self.text.AppendText(st)
5344 self.frame.Show(True)
5345 EVT_CLOSE(self.frame, self.OnCloseWindow)
5346
5347
5348 def OnCloseWindow(self, event):
5349 if self.frame is not None:
5350 self.frame.Destroy()
5351 self.frame = None
5352 self.text = None
5353
5354
5355 # These methods provide the file-like output behaviour.
5356 def write(self, text):
5357 """
5358 Create the output window if needed and write the string to it.
5359 If not called in the context of the gui thread then uses
5360 CallAfter to do the work there.
5361 """
5362 if self.frame is None:
5363 if not wx.Thread_IsMain():
5364 wx.CallAfter(self.CreateOutputWindow, text)
5365 else:
5366 self.CreateOutputWindow(text)
5367 else:
5368 if not wx.Thread_IsMain():
5369 wx.CallAfter(self.text.AppendText, text)
5370 else:
5371 self.text.AppendText(text)
5372
5373
5374 def close(self):
5375 if self.frame is not None:
5376 wx.CallAfter(self.frame.Close)
5377
5378
5379 def flush(self):
5380 pass
5381
5382
5383
5384 #----------------------------------------------------------------------
5385
5386 _defRedirect = (wx.Platform == '__WXMSW__' or wx.Platform == '__WXMAC__')
5387
5388 class App(wx.PyApp):
5389 """
5390 The ``wx.App`` class represents the application and is used to:
5391
5392 * bootstrap the wxPython system and initialize the underlying
5393 gui toolkit
5394 * set and get application-wide properties
5395 * implement the windowing system main message or event loop,
5396 and to dispatch events to window instances
5397 * etc.
5398
5399 Every application must have a ``wx.App`` instance, and all
5400 creation of UI objects should be delayed until after the
5401 ``wx.App`` object has been created in order to ensure that the gui
5402 platform and wxWidgets have been fully initialized.
5403
5404 Normally you would derive from this class and implement an
5405 ``OnInit`` method that creates a frame and then calls
5406 ``self.SetTopWindow(frame)``.
5407
5408 :see: `wx.PySimpleApp` for a simpler app class that can be used
5409 directly.
5410 """
5411
5412 outputWindowClass = PyOnDemandOutputWindow
5413
5414 def __init__(self, redirect=_defRedirect, filename=None,
5415 useBestVisual=False, clearSigInt=True):
5416 """
5417 Construct a ``wx.App`` object.
5418
5419 :param redirect: Should ``sys.stdout`` and ``sys.stderr`` be
5420 redirected? Defaults to True on Windows and Mac, False
5421 otherwise. If `filename` is None then output will be
5422 redirected to a window that pops up as needed. (You can
5423 control what kind of window is created for the output by
5424 resetting the class variable ``outputWindowClass`` to a
5425 class of your choosing.)
5426
5427 :param filename: The name of a file to redirect output to, if
5428 redirect is True.
5429
5430 :param useBestVisual: Should the app try to use the best
5431 available visual provided by the system (only relevant on
5432 systems that have more than one visual.) This parameter
5433 must be used instead of calling `SetUseBestVisual` later
5434 on because it must be set before the underlying GUI
5435 toolkit is initialized.
5436
5437 :param clearSigInt: Should SIGINT be cleared? This allows the
5438 app to terminate upon a Ctrl-C in the console like other
5439 GUI apps will.
5440
5441 :note: You should override OnInit to do applicaition
5442 initialization to ensure that the system, toolkit and
5443 wxWidgets are fully initialized.
5444 """
5445 wx.PyApp.__init__(self)
5446
5447 if wx.Platform == "__WXMAC__":
5448 try:
5449 import MacOS
5450 if not MacOS.WMAvailable():
5451 print """\
5452 This program needs access to the screen. Please run with 'pythonw',
5453 not 'python', and only when you are logged in on the main display of
5454 your Mac."""
5455 _sys.exit(1)
5456 except SystemExit:
5457 raise
5458 except:
5459 pass
5460
5461 # This has to be done before OnInit
5462 self.SetUseBestVisual(useBestVisual)
5463
5464 # Set the default handler for SIGINT. This fixes a problem
5465 # where if Ctrl-C is pressed in the console that started this
5466 # app then it will not appear to do anything, (not even send
5467 # KeyboardInterrupt???) but will later segfault on exit. By
5468 # setting the default handler then the app will exit, as
5469 # expected (depending on platform.)
5470 if clearSigInt:
5471 try:
5472 import signal
5473 signal.signal(signal.SIGINT, signal.SIG_DFL)
5474 except:
5475 pass
5476
5477 # Save and redirect the stdio to a window?
5478 self.stdioWin = None
5479 self.saveStdio = (_sys.stdout, _sys.stderr)
5480 if redirect:
5481 self.RedirectStdio(filename)
5482
5483 # Use Python's install prefix as the default
5484 wx.StandardPaths.Get().SetInstallPrefix(_sys.prefix)
5485
5486 # This finishes the initialization of wxWindows and then calls
5487 # the OnInit that should be present in the derived class
5488 self._BootstrapApp()
5489
5490
5491 def __del__(self):
5492 try:
5493 self.RestoreStdio() # Just in case the MainLoop was overridden
5494 except:
5495 pass
5496
5497
5498 def SetTopWindow(self, frame):
5499 """Set the \"main\" top level window"""
5500 if self.stdioWin:
5501 self.stdioWin.SetParent(frame)
5502 wx.PyApp.SetTopWindow(self, frame)
5503
5504
5505 def MainLoop(self):
5506 """Execute the main GUI event loop"""
5507 wx.PyApp.MainLoop(self)
5508 self.RestoreStdio()
5509
5510
5511 def RedirectStdio(self, filename=None):
5512 """Redirect sys.stdout and sys.stderr to a file or a popup window."""
5513 if filename:
5514 _sys.stdout = _sys.stderr = open(filename, 'a')
5515 else:
5516 self.stdioWin = self.outputWindowClass()
5517 _sys.stdout = _sys.stderr = self.stdioWin
5518
5519
5520 def RestoreStdio(self):
5521 _sys.stdout, _sys.stderr = self.saveStdio
5522
5523
5524 def SetOutputWindowAttributes(self, title=None, pos=None, size=None):
5525 """
5526 Set the title, position and/or size of the output window if
5527 the stdio has been redirected. This should be called before
5528 any output would cause the output window to be created.
5529 """
5530 if self.stdioWin:
5531 if title is not None:
5532 self.stdioWin.title = title
5533 if pos is not None:
5534 self.stdioWin.pos = pos
5535 if size is not None:
5536 self.stdioWin.size = size
5537
5538
5539
5540
5541 # change from wx.PyApp_XX to wx.App_XX
5542 App_GetMacSupportPCMenuShortcuts = _core_.PyApp_GetMacSupportPCMenuShortcuts
5543 App_GetMacAboutMenuItemId = _core_.PyApp_GetMacAboutMenuItemId
5544 App_GetMacPreferencesMenuItemId = _core_.PyApp_GetMacPreferencesMenuItemId
5545 App_GetMacExitMenuItemId = _core_.PyApp_GetMacExitMenuItemId
5546 App_GetMacHelpMenuTitleName = _core_.PyApp_GetMacHelpMenuTitleName
5547 App_SetMacSupportPCMenuShortcuts = _core_.PyApp_SetMacSupportPCMenuShortcuts
5548 App_SetMacAboutMenuItemId = _core_.PyApp_SetMacAboutMenuItemId
5549 App_SetMacPreferencesMenuItemId = _core_.PyApp_SetMacPreferencesMenuItemId
5550 App_SetMacExitMenuItemId = _core_.PyApp_SetMacExitMenuItemId
5551 App_SetMacHelpMenuTitleName = _core_.PyApp_SetMacHelpMenuTitleName
5552 App_GetComCtl32Version = _core_.PyApp_GetComCtl32Version
5553
5554 #----------------------------------------------------------------------------
5555
5556 class PySimpleApp(wx.App):
5557 """
5558 A simple application class. You can just create one of these and
5559 then then make your top level windows later, and not have to worry
5560 about OnInit. For example::
5561
5562 app = wx.PySimpleApp()
5563 frame = wx.Frame(None, title='Hello World')
5564 frame.Show()
5565 app.MainLoop()
5566
5567 :see: `wx.App`
5568 """
5569
5570 def __init__(self, redirect=False, filename=None,
5571 useBestVisual=False, clearSigInt=True):
5572 """
5573 :see: `wx.App.__init__`
5574 """
5575 wx.App.__init__(self, redirect, filename, useBestVisual, clearSigInt)
5576
5577 def OnInit(self):
5578 return True
5579
5580
5581
5582 # Is anybody using this one?
5583 class PyWidgetTester(wx.App):
5584 def __init__(self, size = (250, 100)):
5585 self.size = size
5586 wx.App.__init__(self, 0)
5587
5588 def OnInit(self):
5589 self.frame = wx.Frame(None, -1, "Widget Tester", pos=(0,0), size=self.size)
5590 self.SetTopWindow(self.frame)
5591 return True
5592
5593 def SetWidget(self, widgetClass, *args, **kwargs):
5594 w = widgetClass(self.frame, *args, **kwargs)
5595 self.frame.Show(True)
5596
5597 #----------------------------------------------------------------------------
5598 # DO NOT hold any other references to this object. This is how we
5599 # know when to cleanup system resources that wxWidgets is holding. When
5600 # the sys module is unloaded, the refcount on sys.__wxPythonCleanup
5601 # goes to zero and it calls the wx.App_CleanUp function.
5602
5603 class __wxPyCleanup:
5604 def __init__(self):
5605 self.cleanup = _core_.App_CleanUp
5606 def __del__(self):
5607 self.cleanup()
5608
5609 _sys.__wxPythonCleanup = __wxPyCleanup()
5610
5611 ## # another possible solution, but it gets called too early...
5612 ## import atexit
5613 ## atexit.register(_core_.wxApp_CleanUp)
5614
5615
5616 #----------------------------------------------------------------------------
5617
5618 #---------------------------------------------------------------------------
5619
5620 class EventLoop(object):
5621 """Proxy of C++ EventLoop class"""
5622 def __repr__(self):
5623 return "<%s.%s; proxy of C++ wxEventLoop instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
5624 def __init__(self, *args, **kwargs):
5625 """__init__(self) -> EventLoop"""
5626 newobj = _core_.new_EventLoop(*args, **kwargs)
5627 self.this = newobj.this
5628 self.thisown = 1
5629 del newobj.thisown
5630 def __del__(self, destroy=_core_.delete_EventLoop):
5631 """__del__(self)"""
5632 try:
5633 if self.thisown: destroy(self)
5634 except: pass
5635
5636 def Run(*args, **kwargs):
5637 """Run(self) -> int"""
5638 return _core_.EventLoop_Run(*args, **kwargs)
5639
5640 def Exit(*args, **kwargs):
5641 """Exit(self, int rc=0)"""
5642 return _core_.EventLoop_Exit(*args, **kwargs)
5643
5644 def Pending(*args, **kwargs):
5645 """Pending(self) -> bool"""
5646 return _core_.EventLoop_Pending(*args, **kwargs)
5647
5648 def Dispatch(*args, **kwargs):
5649 """Dispatch(self) -> bool"""
5650 return _core_.EventLoop_Dispatch(*args, **kwargs)
5651
5652 def IsRunning(*args, **kwargs):
5653 """IsRunning(self) -> bool"""
5654 return _core_.EventLoop_IsRunning(*args, **kwargs)
5655
5656 def GetActive(*args, **kwargs):
5657 """GetActive() -> EventLoop"""
5658 return _core_.EventLoop_GetActive(*args, **kwargs)
5659
5660 GetActive = staticmethod(GetActive)
5661 def SetActive(*args, **kwargs):
5662 """SetActive(EventLoop loop)"""
5663 return _core_.EventLoop_SetActive(*args, **kwargs)
5664
5665 SetActive = staticmethod(SetActive)
5666
5667 class EventLoopPtr(EventLoop):
5668 def __init__(self, this):
5669 self.this = this
5670 if not hasattr(self,"thisown"): self.thisown = 0
5671 self.__class__ = EventLoop
5672 _core_.EventLoop_swigregister(EventLoopPtr)
5673
5674 def EventLoop_GetActive(*args, **kwargs):
5675 """EventLoop_GetActive() -> EventLoop"""
5676 return _core_.EventLoop_GetActive(*args, **kwargs)
5677
5678 def EventLoop_SetActive(*args, **kwargs):
5679 """EventLoop_SetActive(EventLoop loop)"""
5680 return _core_.EventLoop_SetActive(*args, **kwargs)
5681
5682 #---------------------------------------------------------------------------
5683
5684 class AcceleratorEntry(object):
5685 """
5686 A class used to define items in an `wx.AcceleratorTable`. wxPython
5687 programs can choose to use wx.AcceleratorEntry objects, but using a
5688 list of 3-tuple of integers (flags, keyCode, cmdID) usually works just
5689 as well. See `__init__` for of the tuple values.
5690
5691 :see: `wx.AcceleratorTable`
5692 """
5693 def __repr__(self):
5694 return "<%s.%s; proxy of C++ wxAcceleratorEntry instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
5695 def __init__(self, *args, **kwargs):
5696 """
5697 __init__(self, int flags=0, int keyCode=0, int cmdID=0) -> AcceleratorEntry
5698
5699 Construct a wx.AcceleratorEntry.
5700 """
5701 newobj = _core_.new_AcceleratorEntry(*args, **kwargs)
5702 self.this = newobj.this
5703 self.thisown = 1
5704 del newobj.thisown
5705 def __del__(self, destroy=_core_.delete_AcceleratorEntry):
5706 """__del__(self)"""
5707 try:
5708 if self.thisown: destroy(self)
5709 except: pass
5710
5711 def Set(*args, **kwargs):
5712 """
5713 Set(self, int flags, int keyCode, int cmd)
5714
5715 (Re)set the attributes of a wx.AcceleratorEntry.
5716 :see `__init__`
5717 """
5718 return _core_.AcceleratorEntry_Set(*args, **kwargs)
5719
5720 def GetFlags(*args, **kwargs):
5721 """
5722 GetFlags(self) -> int
5723
5724 Get the AcceleratorEntry's flags.
5725 """
5726 return _core_.AcceleratorEntry_GetFlags(*args, **kwargs)
5727
5728 def GetKeyCode(*args, **kwargs):
5729 """
5730 GetKeyCode(self) -> int
5731
5732 Get the AcceleratorEntry's keycode.
5733 """
5734 return _core_.AcceleratorEntry_GetKeyCode(*args, **kwargs)
5735
5736 def GetCommand(*args, **kwargs):
5737 """
5738 GetCommand(self) -> int
5739
5740 Get the AcceleratorEntry's command ID.
5741 """
5742 return _core_.AcceleratorEntry_GetCommand(*args, **kwargs)
5743
5744
5745 class AcceleratorEntryPtr(AcceleratorEntry):
5746 def __init__(self, this):
5747 self.this = this
5748 if not hasattr(self,"thisown"): self.thisown = 0
5749 self.__class__ = AcceleratorEntry
5750 _core_.AcceleratorEntry_swigregister(AcceleratorEntryPtr)
5751
5752 class AcceleratorTable(Object):
5753 """
5754 An accelerator table allows the application to specify a table of
5755 keyboard shortcuts for menus or other commands. On Windows, menu or
5756 button commands are supported; on GTK, only menu commands are
5757 supported.
5758 """
5759 def __repr__(self):
5760 return "<%s.%s; proxy of C++ wxAcceleratorTable instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
5761 def __init__(self, *args, **kwargs):
5762 """
5763 __init__(entries) -> AcceleratorTable
5764
5765 Construct an AcceleratorTable from a list of `wx.AcceleratorEntry`
5766 items or or of 3-tuples (flags, keyCode, cmdID)
5767
5768 :see: `wx.AcceleratorEntry`
5769 """
5770 newobj = _core_.new_AcceleratorTable(*args, **kwargs)
5771 self.this = newobj.this
5772 self.thisown = 1
5773 del newobj.thisown
5774 def __del__(self, destroy=_core_.delete_AcceleratorTable):
5775 """__del__(self)"""
5776 try:
5777 if self.thisown: destroy(self)
5778 except: pass
5779
5780 def Ok(*args, **kwargs):
5781 """Ok(self) -> bool"""
5782 return _core_.AcceleratorTable_Ok(*args, **kwargs)
5783
5784
5785 class AcceleratorTablePtr(AcceleratorTable):
5786 def __init__(self, this):
5787 self.this = this
5788 if not hasattr(self,"thisown"): self.thisown = 0
5789 self.__class__ = AcceleratorTable
5790 _core_.AcceleratorTable_swigregister(AcceleratorTablePtr)
5791
5792
5793 def GetAccelFromString(*args, **kwargs):
5794 """GetAccelFromString(String label) -> AcceleratorEntry"""
5795 return _core_.GetAccelFromString(*args, **kwargs)
5796 #---------------------------------------------------------------------------
5797
5798 class VisualAttributes(object):
5799 """struct containing all the visual attributes of a control"""
5800 def __repr__(self):
5801 return "<%s.%s; proxy of C++ wxVisualAttributes instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
5802 def __init__(self, *args, **kwargs):
5803 """
5804 __init__(self) -> VisualAttributes
5805
5806 struct containing all the visual attributes of a control
5807 """
5808 newobj = _core_.new_VisualAttributes(*args, **kwargs)
5809 self.this = newobj.this
5810 self.thisown = 1
5811 del newobj.thisown
5812 def __del__(self, destroy=_core_.delete_VisualAttributes):
5813 """__del__(self)"""
5814 try:
5815 if self.thisown: destroy(self)
5816 except: pass
5817
5818 font = property(_core_.VisualAttributes_font_get, _core_.VisualAttributes_font_set)
5819 colFg = property(_core_.VisualAttributes_colFg_get, _core_.VisualAttributes_colFg_set)
5820 colBg = property(_core_.VisualAttributes_colBg_get, _core_.VisualAttributes_colBg_set)
5821
5822 class VisualAttributesPtr(VisualAttributes):
5823 def __init__(self, this):
5824 self.this = this
5825 if not hasattr(self,"thisown"): self.thisown = 0
5826 self.__class__ = VisualAttributes
5827 _core_.VisualAttributes_swigregister(VisualAttributesPtr)
5828 NullAcceleratorTable = cvar.NullAcceleratorTable
5829 PanelNameStr = cvar.PanelNameStr
5830
5831 WINDOW_VARIANT_NORMAL = _core_.WINDOW_VARIANT_NORMAL
5832 WINDOW_VARIANT_SMALL = _core_.WINDOW_VARIANT_SMALL
5833 WINDOW_VARIANT_MINI = _core_.WINDOW_VARIANT_MINI
5834 WINDOW_VARIANT_LARGE = _core_.WINDOW_VARIANT_LARGE
5835 WINDOW_VARIANT_MAX = _core_.WINDOW_VARIANT_MAX
5836 class Window(EvtHandler):
5837 """
5838 wx.Window is the base class for all windows and represents any visible
5839 object on the screen. All controls, top level windows and so on are
5840 wx.Windows. Sizers and device contexts are not however, as they don't
5841 appear on screen themselves.
5842
5843 """
5844 def __repr__(self):
5845 return "<%s.%s; proxy of C++ wxWindow instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
5846 def __init__(self, *args, **kwargs):
5847 """
5848 __init__(self, Window parent, int id=-1, Point pos=DefaultPosition,
5849 Size size=DefaultSize, long style=0, String name=PanelNameStr) -> Window
5850
5851 Construct and show a generic Window.
5852 """
5853 newobj = _core_.new_Window(*args, **kwargs)
5854 self.this = newobj.this
5855 self.thisown = 1
5856 del newobj.thisown
5857 self._setOORInfo(self)
5858
5859 def Create(*args, **kwargs):
5860 """
5861 Create(self, Window parent, int id=-1, Point pos=DefaultPosition,
5862 Size size=DefaultSize, long style=0, String name=PanelNameStr) -> bool
5863
5864 Create the GUI part of the Window for 2-phase creation mode.
5865 """
5866 return _core_.Window_Create(*args, **kwargs)
5867
5868 def Close(*args, **kwargs):
5869 """
5870 Close(self, bool force=False) -> bool
5871
5872 This function simply generates a EVT_CLOSE event whose handler usually
5873 tries to close the window. It doesn't close the window itself,
5874 however. If force is False (the default) then the window's close
5875 handler will be allowed to veto the destruction of the window.
5876 """
5877 return _core_.Window_Close(*args, **kwargs)
5878
5879 def Destroy(*args, **kwargs):
5880 """
5881 Destroy(self) -> bool
5882
5883 Destroys the window safely. Frames and dialogs are not destroyed
5884 immediately when this function is called -- they are added to a list
5885 of windows to be deleted on idle time, when all the window's events
5886 have been processed. This prevents problems with events being sent to
5887 non-existent windows.
5888
5889 Returns True if the window has either been successfully deleted, or it
5890 has been added to the list of windows pending real deletion.
5891 """
5892 return _core_.Window_Destroy(*args, **kwargs)
5893
5894 def DestroyChildren(*args, **kwargs):
5895 """
5896 DestroyChildren(self) -> bool
5897
5898 Destroys all children of a window. Called automatically by the
5899 destructor.
5900 """
5901 return _core_.Window_DestroyChildren(*args, **kwargs)
5902
5903 def IsBeingDeleted(*args, **kwargs):
5904 """
5905 IsBeingDeleted(self) -> bool
5906
5907 Is the window in the process of being deleted?
5908 """
5909 return _core_.Window_IsBeingDeleted(*args, **kwargs)
5910
5911 def SetTitle(*args, **kwargs):
5912 """
5913 SetTitle(self, String title)
5914
5915 Sets the window's title. Applicable only to frames and dialogs.
5916 """
5917 return _core_.Window_SetTitle(*args, **kwargs)
5918
5919 def GetTitle(*args, **kwargs):
5920 """
5921 GetTitle(self) -> String
5922
5923 Gets the window's title. Applicable only to frames and dialogs.
5924 """
5925 return _core_.Window_GetTitle(*args, **kwargs)
5926
5927 def SetLabel(*args, **kwargs):
5928 """
5929 SetLabel(self, String label)
5930
5931 Set the text which the window shows in its label if applicable.
5932 """
5933 return _core_.Window_SetLabel(*args, **kwargs)
5934
5935 def GetLabel(*args, **kwargs):
5936 """
5937 GetLabel(self) -> String
5938
5939 Generic way of getting a label from any window, for identification
5940 purposes. The interpretation of this function differs from class to
5941 class. For frames and dialogs, the value returned is the title. For
5942 buttons or static text controls, it is the button text. This function
5943 can be useful for meta-programs such as testing tools or special-needs
5944 access programs)which need to identify windows by name.
5945 """
5946 return _core_.Window_GetLabel(*args, **kwargs)
5947
5948 def SetName(*args, **kwargs):
5949 """
5950 SetName(self, String name)
5951
5952 Sets the window's name. The window name is used for ressource setting
5953 in X, it is not the same as the window title/label
5954 """
5955 return _core_.Window_SetName(*args, **kwargs)
5956
5957 def GetName(*args, **kwargs):
5958 """
5959 GetName(self) -> String
5960
5961 Returns the windows name. This name is not guaranteed to be unique;
5962 it is up to the programmer to supply an appropriate name in the window
5963 constructor or via wx.Window.SetName.
5964 """
5965 return _core_.Window_GetName(*args, **kwargs)
5966
5967 def SetWindowVariant(*args, **kwargs):
5968 """
5969 SetWindowVariant(self, int variant)
5970
5971 Sets the variant of the window/font size to use for this window, if
5972 the platform supports variants, for example, wxMac.
5973 """
5974 return _core_.Window_SetWindowVariant(*args, **kwargs)
5975
5976 def GetWindowVariant(*args, **kwargs):
5977 """GetWindowVariant(self) -> int"""
5978 return _core_.Window_GetWindowVariant(*args, **kwargs)
5979
5980 def SetId(*args, **kwargs):
5981 """
5982 SetId(self, int winid)
5983
5984 Sets the identifier of the window. Each window has an integer
5985 identifier. If the application has not provided one, an identifier
5986 will be generated. Normally, the identifier should be provided on
5987 creation and should not be modified subsequently.
5988 """
5989 return _core_.Window_SetId(*args, **kwargs)
5990
5991 def GetId(*args, **kwargs):
5992 """
5993 GetId(self) -> int
5994
5995 Returns the identifier of the window. Each window has an integer
5996 identifier. If the application has not provided one (or the default Id
5997 -1 is used) then an unique identifier with a negative value will be
5998 generated.
5999 """
6000 return _core_.Window_GetId(*args, **kwargs)
6001
6002 def NewControlId(*args, **kwargs):
6003 """
6004 NewControlId() -> int
6005
6006 Generate a control id for the controls which were not given one.
6007 """
6008 return _core_.Window_NewControlId(*args, **kwargs)
6009
6010 NewControlId = staticmethod(NewControlId)
6011 def NextControlId(*args, **kwargs):
6012 """
6013 NextControlId(int winid) -> int
6014
6015 Get the id of the control following the one with the given
6016 autogenerated) id
6017 """
6018 return _core_.Window_NextControlId(*args, **kwargs)
6019
6020 NextControlId = staticmethod(NextControlId)
6021 def PrevControlId(*args, **kwargs):
6022 """
6023 PrevControlId(int winid) -> int
6024
6025 Get the id of the control preceding the one with the given
6026 autogenerated) id
6027 """
6028 return _core_.Window_PrevControlId(*args, **kwargs)
6029
6030 PrevControlId = staticmethod(PrevControlId)
6031 def SetSize(*args, **kwargs):
6032 """
6033 SetSize(self, Size size)
6034
6035 Sets the size of the window in pixels.
6036 """
6037 return _core_.Window_SetSize(*args, **kwargs)
6038
6039 def SetDimensions(*args, **kwargs):
6040 """
6041 SetDimensions(self, int x, int y, int width, int height, int sizeFlags=SIZE_AUTO)
6042
6043 Sets the position and size of the window in pixels. The sizeFlags
6044 parameter indicates the interpretation of the other params if they are
6045 equal to -1.
6046
6047 ======================== ======================================
6048 wx.SIZE_AUTO A -1 indicates that a class-specific
6049 default should be used.
6050 wx.SIZE_USE_EXISTING Axisting dimensions should be used if
6051 -1 values are supplied.
6052 wxSIZE_ALLOW_MINUS_ONE Allow dimensions of -1 and less to be
6053 interpreted as real dimensions, not
6054 default values.
6055 ======================== ======================================
6056
6057 """
6058 return _core_.Window_SetDimensions(*args, **kwargs)
6059
6060 def SetRect(*args, **kwargs):
6061 """
6062 SetRect(self, Rect rect, int sizeFlags=SIZE_AUTO)
6063
6064 Sets the position and size of the window in pixels using a wx.Rect.
6065 """
6066 return _core_.Window_SetRect(*args, **kwargs)
6067
6068 def SetSizeWH(*args, **kwargs):
6069 """
6070 SetSizeWH(self, int width, int height)
6071
6072 Sets the size of the window in pixels.
6073 """
6074 return _core_.Window_SetSizeWH(*args, **kwargs)
6075
6076 def Move(*args, **kwargs):
6077 """
6078 Move(self, Point pt, int flags=SIZE_USE_EXISTING)
6079
6080 Moves the window to the given position.
6081 """
6082 return _core_.Window_Move(*args, **kwargs)
6083
6084 SetPosition = Move
6085 def MoveXY(*args, **kwargs):
6086 """
6087 MoveXY(self, int x, int y, int flags=SIZE_USE_EXISTING)
6088
6089 Moves the window to the given position.
6090 """
6091 return _core_.Window_MoveXY(*args, **kwargs)
6092
6093 def SetBestFittingSize(*args, **kwargs):
6094 """
6095 SetBestFittingSize(self, Size size=DefaultSize)
6096
6097 A 'Smart' SetSize that will fill in default size components with the
6098 window's *best size* values. Also set's the minsize for use with sizers.
6099 """
6100 return _core_.Window_SetBestFittingSize(*args, **kwargs)
6101
6102 def Raise(*args, **kwargs):
6103 """
6104 Raise(self)
6105
6106 Raises the window to the top of the window hierarchy if it is a
6107 managed window (dialog or frame).
6108 """
6109 return _core_.Window_Raise(*args, **kwargs)
6110
6111 def Lower(*args, **kwargs):
6112 """
6113 Lower(self)
6114
6115 Lowers the window to the bottom of the window hierarchy if it is a
6116 managed window (dialog or frame).
6117 """
6118 return _core_.Window_Lower(*args, **kwargs)
6119
6120 def SetClientSize(*args, **kwargs):
6121 """
6122 SetClientSize(self, Size size)
6123
6124 This sets the size of the window client area in pixels. Using this
6125 function to size a window tends to be more device-independent than
6126 wx.Window.SetSize, since the application need not worry about what
6127 dimensions the border or title bar have when trying to fit the window
6128 around panel items, for example.
6129 """
6130 return _core_.Window_SetClientSize(*args, **kwargs)
6131
6132 def SetClientSizeWH(*args, **kwargs):
6133 """
6134 SetClientSizeWH(self, int width, int height)
6135
6136 This sets the size of the window client area in pixels. Using this
6137 function to size a window tends to be more device-independent than
6138 wx.Window.SetSize, since the application need not worry about what
6139 dimensions the border or title bar have when trying to fit the window
6140 around panel items, for example.
6141 """
6142 return _core_.Window_SetClientSizeWH(*args, **kwargs)
6143
6144 def SetClientRect(*args, **kwargs):
6145 """
6146 SetClientRect(self, Rect rect)
6147
6148 This sets the size of the window client area in pixels. Using this
6149 function to size a window tends to be more device-independent than
6150 wx.Window.SetSize, since the application need not worry about what
6151 dimensions the border or title bar have when trying to fit the window
6152 around panel items, for example.
6153 """
6154 return _core_.Window_SetClientRect(*args, **kwargs)
6155
6156 def GetPosition(*args, **kwargs):
6157 """
6158 GetPosition(self) -> Point
6159
6160 Get the window's position.
6161 """
6162 return _core_.Window_GetPosition(*args, **kwargs)
6163
6164 def GetPositionTuple(*args, **kwargs):
6165 """
6166 GetPositionTuple() -> (x,y)
6167
6168 Get the window's position.
6169 """
6170 return _core_.Window_GetPositionTuple(*args, **kwargs)
6171
6172 def GetSize(*args, **kwargs):
6173 """
6174 GetSize(self) -> Size
6175
6176 Get the window size.
6177 """
6178 return _core_.Window_GetSize(*args, **kwargs)
6179
6180 def GetSizeTuple(*args, **kwargs):
6181 """
6182 GetSizeTuple() -> (width, height)
6183
6184 Get the window size.
6185 """
6186 return _core_.Window_GetSizeTuple(*args, **kwargs)
6187
6188 def GetRect(*args, **kwargs):
6189 """
6190 GetRect(self) -> Rect
6191
6192 Returns the size and position of the window as a wx.Rect object.
6193 """
6194 return _core_.Window_GetRect(*args, **kwargs)
6195
6196 def GetClientSize(*args, **kwargs):
6197 """
6198 GetClientSize(self) -> Size
6199
6200 This gets the size of the window's 'client area' in pixels. The client
6201 area is the area which may be drawn on by the programmer, excluding
6202 title bar, border, scrollbars, etc.
6203 """
6204 return _core_.Window_GetClientSize(*args, **kwargs)
6205
6206 def GetClientSizeTuple(*args, **kwargs):
6207 """
6208 GetClientSizeTuple() -> (width, height)
6209
6210 This gets the size of the window's 'client area' in pixels. The client
6211 area is the area which may be drawn on by the programmer, excluding
6212 title bar, border, scrollbars, etc.
6213 """
6214 return _core_.Window_GetClientSizeTuple(*args, **kwargs)
6215
6216 def GetClientAreaOrigin(*args, **kwargs):
6217 """
6218 GetClientAreaOrigin(self) -> Point
6219
6220 Get the origin of the client area of the window relative to the
6221 window's top left corner (the client area may be shifted because of
6222 the borders, scrollbars, other decorations...)
6223 """
6224 return _core_.Window_GetClientAreaOrigin(*args, **kwargs)
6225
6226 def GetClientRect(*args, **kwargs):
6227 """
6228 GetClientRect(self) -> Rect
6229
6230 Get the client area position and size as a `wx.Rect` object.
6231 """
6232 return _core_.Window_GetClientRect(*args, **kwargs)
6233
6234 def GetBestSize(*args, **kwargs):
6235 """
6236 GetBestSize(self) -> Size
6237
6238 This function returns the best acceptable minimal size for the
6239 window, if applicable. For example, for a static text control, it will
6240 be the minimal size such that the control label is not truncated. For
6241 windows containing subwindows (suzh aswx.Panel), the size returned by
6242 this function will be the same as the size the window would have had
6243 after calling Fit.
6244 """
6245 return _core_.Window_GetBestSize(*args, **kwargs)
6246
6247 def GetBestSizeTuple(*args, **kwargs):
6248 """
6249 GetBestSizeTuple() -> (width, height)
6250
6251 This function returns the best acceptable minimal size for the
6252 window, if applicable. For example, for a static text control, it will
6253 be the minimal size such that the control label is not truncated. For
6254 windows containing subwindows (suzh aswx.Panel), the size returned by
6255 this function will be the same as the size the window would have had
6256 after calling Fit.
6257 """
6258 return _core_.Window_GetBestSizeTuple(*args, **kwargs)
6259
6260 def InvalidateBestSize(*args, **kwargs):
6261 """
6262 InvalidateBestSize(self)
6263
6264 Reset the cached best size value so it will be recalculated the next
6265 time it is needed.
6266 """
6267 return _core_.Window_InvalidateBestSize(*args, **kwargs)
6268
6269 def GetBestFittingSize(*args, **kwargs):
6270 """
6271 GetBestFittingSize(self) -> Size
6272
6273 This function will merge the window's best size into the window's
6274 minimum size, giving priority to the min size components, and returns
6275 the results.
6276
6277 """
6278 return _core_.Window_GetBestFittingSize(*args, **kwargs)
6279
6280 def GetAdjustedBestSize(*args, **kwargs):
6281 """
6282 GetAdjustedBestSize(self) -> Size
6283
6284 This method is similar to GetBestSize, except in one
6285 thing. GetBestSize should return the minimum untruncated size of the
6286 window, while this method will return the largest of BestSize and any
6287 user specified minimum size. ie. it is the minimum size the window
6288 should currently be drawn at, not the minimal size it can possibly
6289 tolerate.
6290 """
6291 return _core_.Window_GetAdjustedBestSize(*args, **kwargs)
6292
6293 def Center(*args, **kwargs):
6294 """
6295 Center(self, int direction=BOTH)
6296
6297 Centers the window. The parameter specifies the direction for
6298 cetering, and may be wx.HORIZONTAL, wx.VERTICAL or wx.BOTH. It may
6299 also include wx.CENTER_ON_SCREEN flag if you want to center the window
6300 on the entire screen and not on its parent window. If it is a
6301 top-level window and has no parent then it will always be centered
6302 relative to the screen.
6303 """
6304 return _core_.Window_Center(*args, **kwargs)
6305
6306 Centre = Center
6307 def CenterOnScreen(*args, **kwargs):
6308 """
6309 CenterOnScreen(self, int dir=BOTH)
6310
6311 Center on screen (only works for top level windows)
6312 """
6313 return _core_.Window_CenterOnScreen(*args, **kwargs)
6314
6315 CentreOnScreen = CenterOnScreen
6316 def CenterOnParent(*args, **kwargs):
6317 """
6318 CenterOnParent(self, int dir=BOTH)
6319
6320 Center with respect to the the parent window
6321 """
6322 return _core_.Window_CenterOnParent(*args, **kwargs)
6323
6324 CentreOnParent = CenterOnParent
6325 def Fit(*args, **kwargs):
6326 """
6327 Fit(self)
6328
6329 Sizes the window so that it fits around its subwindows. This function
6330 won't do anything if there are no subwindows and will only really work
6331 correctly if sizers are used for the subwindows layout. Also, if the
6332 window has exactly one subwindow it is better (faster and the result
6333 is more precise as Fit adds some margin to account for fuzziness of
6334 its calculations) to call window.SetClientSize(child.GetSize())
6335 instead of calling Fit.
6336 """
6337 return _core_.Window_Fit(*args, **kwargs)
6338
6339 def FitInside(*args, **kwargs):
6340 """
6341 FitInside(self)
6342
6343 Similar to Fit, but sizes the interior (virtual) size of a
6344 window. Mainly useful with scrolled windows to reset scrollbars after
6345 sizing changes that do not trigger a size event, and/or scrolled
6346 windows without an interior sizer. This function similarly won't do
6347 anything if there are no subwindows.
6348 """
6349 return _core_.Window_FitInside(*args, **kwargs)
6350
6351 def SetSizeHints(*args, **kwargs):
6352 """
6353 SetSizeHints(self, int minW, int minH, int maxW=-1, int maxH=-1, int incW=-1,
6354 int incH=-1)
6355
6356 Allows specification of minimum and maximum window sizes, and window
6357 size increments. If a pair of values is not set (or set to -1), the
6358 default values will be used. If this function is called, the user
6359 will not be able to size the window outside the given bounds (if it is
6360 a top-level window.) Sizers will also inspect the minimum window size
6361 and will use that value if set when calculating layout.
6362
6363 The resizing increments are only significant under Motif or Xt.
6364 """
6365 return _core_.Window_SetSizeHints(*args, **kwargs)
6366
6367 def SetSizeHintsSz(*args, **kwargs):
6368 """
6369 SetSizeHintsSz(self, Size minSize, Size maxSize=DefaultSize, Size incSize=DefaultSize)
6370
6371 Allows specification of minimum and maximum window sizes, and window
6372 size increments. If a pair of values is not set (or set to -1), the
6373 default values will be used. If this function is called, the user
6374 will not be able to size the window outside the given bounds (if it is
6375 a top-level window.) Sizers will also inspect the minimum window size
6376 and will use that value if set when calculating layout.
6377
6378 The resizing increments are only significant under Motif or Xt.
6379 """
6380 return _core_.Window_SetSizeHintsSz(*args, **kwargs)
6381
6382 def SetVirtualSizeHints(*args, **kwargs):
6383 """
6384 SetVirtualSizeHints(self, int minW, int minH, int maxW=-1, int maxH=-1)
6385
6386 Allows specification of minimum and maximum virtual window sizes. If a
6387 pair of values is not set (or set to -1), the default values will be
6388 used. If this function is called, the user will not be able to size
6389 the virtual area of the window outside the given bounds.
6390 """
6391 return _core_.Window_SetVirtualSizeHints(*args, **kwargs)
6392
6393 def SetVirtualSizeHintsSz(*args, **kwargs):
6394 """
6395 SetVirtualSizeHintsSz(self, Size minSize, Size maxSize=DefaultSize)
6396
6397 Allows specification of minimum and maximum virtual window sizes. If a
6398 pair of values is not set (or set to -1), the default values will be
6399 used. If this function is called, the user will not be able to size
6400 the virtual area of the window outside the given bounds.
6401 """
6402 return _core_.Window_SetVirtualSizeHintsSz(*args, **kwargs)
6403
6404 def GetMaxSize(*args, **kwargs):
6405 """GetMaxSize(self) -> Size"""
6406 return _core_.Window_GetMaxSize(*args, **kwargs)
6407
6408 def GetMinSize(*args, **kwargs):
6409 """GetMinSize(self) -> Size"""
6410 return _core_.Window_GetMinSize(*args, **kwargs)
6411
6412 def SetMinSize(*args, **kwargs):
6413 """
6414 SetMinSize(self, Size minSize)
6415
6416 A more convenient method than `SetSizeHints` for setting just the
6417 min size.
6418 """
6419 return _core_.Window_SetMinSize(*args, **kwargs)
6420
6421 def SetMaxSize(*args, **kwargs):
6422 """
6423 SetMaxSize(self, Size maxSize)
6424
6425 A more convenient method than `SetSizeHints` for setting just the
6426 max size.
6427 """
6428 return _core_.Window_SetMaxSize(*args, **kwargs)
6429
6430 def GetMinWidth(*args, **kwargs):
6431 """GetMinWidth(self) -> int"""
6432 return _core_.Window_GetMinWidth(*args, **kwargs)
6433
6434 def GetMinHeight(*args, **kwargs):
6435 """GetMinHeight(self) -> int"""
6436 return _core_.Window_GetMinHeight(*args, **kwargs)
6437
6438 def GetMaxWidth(*args, **kwargs):
6439 """GetMaxWidth(self) -> int"""
6440 return _core_.Window_GetMaxWidth(*args, **kwargs)
6441
6442 def GetMaxHeight(*args, **kwargs):
6443 """GetMaxHeight(self) -> int"""
6444 return _core_.Window_GetMaxHeight(*args, **kwargs)
6445
6446 def SetVirtualSize(*args, **kwargs):
6447 """
6448 SetVirtualSize(self, Size size)
6449
6450 Set the the virtual size of a window in pixels. For most windows this
6451 is just the client area of the window, but for some like scrolled
6452 windows it is more or less independent of the screen window size.
6453 """
6454 return _core_.Window_SetVirtualSize(*args, **kwargs)
6455
6456 def SetVirtualSizeWH(*args, **kwargs):
6457 """
6458 SetVirtualSizeWH(self, int w, int h)
6459
6460 Set the the virtual size of a window in pixels. For most windows this
6461 is just the client area of the window, but for some like scrolled
6462 windows it is more or less independent of the screen window size.
6463 """
6464 return _core_.Window_SetVirtualSizeWH(*args, **kwargs)
6465
6466 def GetVirtualSize(*args, **kwargs):
6467 """
6468 GetVirtualSize(self) -> Size
6469
6470 Get the the virtual size of the window in pixels. For most windows
6471 this is just the client area of the window, but for some like scrolled
6472 windows it is more or less independent of the screen window size.
6473 """
6474 return _core_.Window_GetVirtualSize(*args, **kwargs)
6475
6476 def GetVirtualSizeTuple(*args, **kwargs):
6477 """
6478 GetVirtualSizeTuple() -> (width, height)
6479
6480 Get the the virtual size of the window in pixels. For most windows
6481 this is just the client area of the window, but for some like scrolled
6482 windows it is more or less independent of the screen window size.
6483 """
6484 return _core_.Window_GetVirtualSizeTuple(*args, **kwargs)
6485
6486 def GetBestVirtualSize(*args, **kwargs):
6487 """
6488 GetBestVirtualSize(self) -> Size
6489
6490 Return the largest of ClientSize and BestSize (as determined by a
6491 sizer, interior children, or other means)
6492 """
6493 return _core_.Window_GetBestVirtualSize(*args, **kwargs)
6494
6495 def Show(*args, **kwargs):
6496 """
6497 Show(self, bool show=True) -> bool
6498
6499 Shows or hides the window. You may need to call Raise for a top level
6500 window if you want to bring it to top, although this is not needed if
6501 Show is called immediately after the frame creation. Returns True if
6502 the window has been shown or hidden or False if nothing was done
6503 because it already was in the requested state.
6504 """
6505 return _core_.Window_Show(*args, **kwargs)
6506
6507 def Hide(*args, **kwargs):
6508 """
6509 Hide(self) -> bool
6510
6511 Equivalent to calling Show(False).
6512 """
6513 return _core_.Window_Hide(*args, **kwargs)
6514
6515 def Enable(*args, **kwargs):
6516 """
6517 Enable(self, bool enable=True) -> bool
6518
6519 Enable or disable the window for user input. Note that when a parent
6520 window is disabled, all of its children are disabled as well and they
6521 are reenabled again when the parent is. Returns true if the window
6522 has been enabled or disabled, false if nothing was done, i.e. if the
6523 window had already been in the specified state.
6524 """
6525 return _core_.Window_Enable(*args, **kwargs)
6526
6527 def Disable(*args, **kwargs):
6528 """
6529 Disable(self) -> bool
6530
6531 Disables the window, same as Enable(false).
6532 """
6533 return _core_.Window_Disable(*args, **kwargs)
6534
6535 def IsShown(*args, **kwargs):
6536 """
6537 IsShown(self) -> bool
6538
6539 Returns true if the window is shown, false if it has been hidden.
6540 """
6541 return _core_.Window_IsShown(*args, **kwargs)
6542
6543 def IsEnabled(*args, **kwargs):
6544 """
6545 IsEnabled(self) -> bool
6546
6547 Returns true if the window is enabled for input, false otherwise.
6548 """
6549 return _core_.Window_IsEnabled(*args, **kwargs)
6550
6551 def SetWindowStyleFlag(*args, **kwargs):
6552 """
6553 SetWindowStyleFlag(self, long style)
6554
6555 Sets the style of the window. Please note that some styles cannot be
6556 changed after the window creation and that Refresh() might need to be
6557 called after changing the others for the change to take place
6558 immediately.
6559 """
6560 return _core_.Window_SetWindowStyleFlag(*args, **kwargs)
6561
6562 def GetWindowStyleFlag(*args, **kwargs):
6563 """
6564 GetWindowStyleFlag(self) -> long
6565
6566 Gets the window style that was passed to the constructor or Create
6567 method.
6568 """
6569 return _core_.Window_GetWindowStyleFlag(*args, **kwargs)
6570
6571 SetWindowStyle = SetWindowStyleFlag; GetWindowStyle = GetWindowStyleFlag
6572 def HasFlag(*args, **kwargs):
6573 """
6574 HasFlag(self, int flag) -> bool
6575
6576 Test if the given style is set for this window.
6577 """
6578 return _core_.Window_HasFlag(*args, **kwargs)
6579
6580 def IsRetained(*args, **kwargs):
6581 """
6582 IsRetained(self) -> bool
6583
6584 Returns true if the window is retained, false otherwise. Retained
6585 windows are only available on X platforms.
6586 """
6587 return _core_.Window_IsRetained(*args, **kwargs)
6588
6589 def SetExtraStyle(*args, **kwargs):
6590 """
6591 SetExtraStyle(self, long exStyle)
6592
6593 Sets the extra style bits for the window. Extra styles are the less
6594 often used style bits which can't be set with the constructor or with
6595 SetWindowStyleFlag()
6596 """
6597 return _core_.Window_SetExtraStyle(*args, **kwargs)
6598
6599 def GetExtraStyle(*args, **kwargs):
6600 """
6601 GetExtraStyle(self) -> long
6602
6603 Returns the extra style bits for the window.
6604 """
6605 return _core_.Window_GetExtraStyle(*args, **kwargs)
6606
6607 def MakeModal(*args, **kwargs):
6608 """
6609 MakeModal(self, bool modal=True)
6610
6611 Disables all other windows in the application so that the user can
6612 only interact with this window. Passing False will reverse this
6613 effect.
6614 """
6615 return _core_.Window_MakeModal(*args, **kwargs)
6616
6617 def SetThemeEnabled(*args, **kwargs):
6618 """
6619 SetThemeEnabled(self, bool enableTheme)
6620
6621 This function tells a window if it should use the system's "theme"
6622 code to draw the windows' background instead if its own background
6623 drawing code. This will only have an effect on platforms that support
6624 the notion of themes in user defined windows. One such platform is
6625 GTK+ where windows can have (very colourful) backgrounds defined by a
6626 user's selected theme.
6627
6628 Dialogs, notebook pages and the status bar have this flag set to true
6629 by default so that the default look and feel is simulated best.
6630 """
6631 return _core_.Window_SetThemeEnabled(*args, **kwargs)
6632
6633 def GetThemeEnabled(*args, **kwargs):
6634 """
6635 GetThemeEnabled(self) -> bool
6636
6637 Return the themeEnabled flag.
6638 """
6639 return _core_.Window_GetThemeEnabled(*args, **kwargs)
6640
6641 def SetFocus(*args, **kwargs):
6642 """
6643 SetFocus(self)
6644
6645 Set's the focus to this window, allowing it to receive keyboard input.
6646 """
6647 return _core_.Window_SetFocus(*args, **kwargs)
6648
6649 def SetFocusFromKbd(*args, **kwargs):
6650 """
6651 SetFocusFromKbd(self)
6652
6653 Set focus to this window as the result of a keyboard action. Normally
6654 only called internally.
6655 """
6656 return _core_.Window_SetFocusFromKbd(*args, **kwargs)
6657
6658 def FindFocus(*args, **kwargs):
6659 """
6660 FindFocus() -> Window
6661
6662 Returns the window or control that currently has the keyboard focus,
6663 or None.
6664 """
6665 return _core_.Window_FindFocus(*args, **kwargs)
6666
6667 FindFocus = staticmethod(FindFocus)
6668 def AcceptsFocus(*args, **kwargs):
6669 """
6670 AcceptsFocus(self) -> bool
6671
6672 Can this window have focus?
6673 """
6674 return _core_.Window_AcceptsFocus(*args, **kwargs)
6675
6676 def AcceptsFocusFromKeyboard(*args, **kwargs):
6677 """
6678 AcceptsFocusFromKeyboard(self) -> bool
6679
6680 Can this window be given focus by keyboard navigation? if not, the
6681 only way to give it focus (provided it accepts it at all) is to click
6682 it.
6683 """
6684 return _core_.Window_AcceptsFocusFromKeyboard(*args, **kwargs)
6685
6686 def GetDefaultItem(*args, **kwargs):
6687 """
6688 GetDefaultItem(self) -> Window
6689
6690 Get the default child of this parent, i.e. the one which is activated
6691 by pressing <Enter> such as the OK button on a wx.Dialog.
6692 """
6693 return _core_.Window_GetDefaultItem(*args, **kwargs)
6694
6695 def SetDefaultItem(*args, **kwargs):
6696 """
6697 SetDefaultItem(self, Window child) -> Window
6698
6699 Set this child as default, return the old default.
6700 """
6701 return _core_.Window_SetDefaultItem(*args, **kwargs)
6702
6703 def SetTmpDefaultItem(*args, **kwargs):
6704 """
6705 SetTmpDefaultItem(self, Window win)
6706
6707 Set this child as temporary default
6708 """
6709 return _core_.Window_SetTmpDefaultItem(*args, **kwargs)
6710
6711 def Navigate(*args, **kwargs):
6712 """
6713 Navigate(self, int flags=NavigationKeyEvent.IsForward) -> bool
6714
6715 Does keyboard navigation from this window to another, by sending a
6716 `wx.NavigationKeyEvent`.
6717 """
6718 return _core_.Window_Navigate(*args, **kwargs)
6719
6720 def MoveAfterInTabOrder(*args, **kwargs):
6721 """
6722 MoveAfterInTabOrder(self, Window win)
6723
6724 Moves this window in the tab navigation order after the specified
6725 sibling window. This means that when the user presses the TAB key on
6726 that other window, the focus switches to this window.
6727
6728 The default tab order is the same as creation order. This function
6729 and `MoveBeforeInTabOrder` allow to change it after creating all the
6730 windows.
6731
6732 """
6733 return _core_.Window_MoveAfterInTabOrder(*args, **kwargs)
6734
6735 def MoveBeforeInTabOrder(*args, **kwargs):
6736 """
6737 MoveBeforeInTabOrder(self, Window win)
6738
6739 Same as `MoveAfterInTabOrder` except that it inserts this window just
6740 before win instead of putting it right after it.
6741 """
6742 return _core_.Window_MoveBeforeInTabOrder(*args, **kwargs)
6743
6744 def GetChildren(*args, **kwargs):
6745 """
6746 GetChildren(self) -> PyObject
6747
6748 Returns a list of the window's children. NOTE: Currently this is a
6749 copy of the child window list maintained by the window, so the return
6750 value of this function is only valid as long as the window's children
6751 do not change.
6752 """
6753 return _core_.Window_GetChildren(*args, **kwargs)
6754
6755 def GetParent(*args, **kwargs):
6756 """
6757 GetParent(self) -> Window
6758
6759 Returns the parent window of this window, or None if there isn't one.
6760 """
6761 return _core_.Window_GetParent(*args, **kwargs)
6762
6763 def GetGrandParent(*args, **kwargs):
6764 """
6765 GetGrandParent(self) -> Window
6766
6767 Returns the parent of the parent of this window, or None if there
6768 isn't one.
6769 """
6770 return _core_.Window_GetGrandParent(*args, **kwargs)
6771
6772 def IsTopLevel(*args, **kwargs):
6773 """
6774 IsTopLevel(self) -> bool
6775
6776 Returns true if the given window is a top-level one. Currently all
6777 frames and dialogs are always considered to be top-level windows (even
6778 if they have a parent window).
6779 """
6780 return _core_.Window_IsTopLevel(*args, **kwargs)
6781
6782 def Reparent(*args, **kwargs):
6783 """
6784 Reparent(self, Window newParent) -> bool
6785
6786 Reparents the window, i.e the window will be removed from its current
6787 parent window (e.g. a non-standard toolbar in a wxFrame) and then
6788 re-inserted into another. Available on Windows and GTK. Returns True
6789 if the parent was changed, False otherwise (error or newParent ==
6790 oldParent)
6791 """
6792 return _core_.Window_Reparent(*args, **kwargs)
6793
6794 def AddChild(*args, **kwargs):
6795 """
6796 AddChild(self, Window child)
6797
6798 Adds a child window. This is called automatically by window creation
6799 functions so should not be required by the application programmer.
6800 """
6801 return _core_.Window_AddChild(*args, **kwargs)
6802
6803 def RemoveChild(*args, **kwargs):
6804 """
6805 RemoveChild(self, Window child)
6806
6807 Removes a child window. This is called automatically by window
6808 deletion functions so should not be required by the application
6809 programmer.
6810 """
6811 return _core_.Window_RemoveChild(*args, **kwargs)
6812
6813 def FindWindowById(*args, **kwargs):
6814 """
6815 FindWindowById(self, long winid) -> Window
6816
6817 Find a chld of this window by window ID
6818 """
6819 return _core_.Window_FindWindowById(*args, **kwargs)
6820
6821 def FindWindowByName(*args, **kwargs):
6822 """
6823 FindWindowByName(self, String name) -> Window
6824
6825 Find a child of this window by name
6826 """
6827 return _core_.Window_FindWindowByName(*args, **kwargs)
6828
6829 def GetEventHandler(*args, **kwargs):
6830 """
6831 GetEventHandler(self) -> EvtHandler
6832
6833 Returns the event handler for this window. By default, the window is
6834 its own event handler.
6835 """
6836 return _core_.Window_GetEventHandler(*args, **kwargs)
6837
6838 def SetEventHandler(*args, **kwargs):
6839 """
6840 SetEventHandler(self, EvtHandler handler)
6841
6842 Sets the event handler for this window. An event handler is an object
6843 that is capable of processing the events sent to a window. By default,
6844 the window is its own event handler, but an application may wish to
6845 substitute another, for example to allow central implementation of
6846 event-handling for a variety of different window classes.
6847
6848 It is usually better to use `wx.Window.PushEventHandler` since this sets
6849 up a chain of event handlers, where an event not handled by one event
6850 handler is handed to the next one in the chain.
6851 """
6852 return _core_.Window_SetEventHandler(*args, **kwargs)
6853
6854 def PushEventHandler(*args, **kwargs):
6855 """
6856 PushEventHandler(self, EvtHandler handler)
6857
6858 Pushes this event handler onto the event handler stack for the window.
6859 An event handler is an object that is capable of processing the events
6860 sent to a window. By default, the window is its own event handler, but
6861 an application may wish to substitute another, for example to allow
6862 central implementation of event-handling for a variety of different
6863 window classes.
6864
6865 wx.Window.PushEventHandler allows an application to set up a chain of
6866 event handlers, where an event not handled by one event handler is
6867 handed to the next one in the chain. Use `wx.Window.PopEventHandler` to
6868 remove the event handler.
6869 """
6870 return _core_.Window_PushEventHandler(*args, **kwargs)
6871
6872 def PopEventHandler(*args, **kwargs):
6873 """
6874 PopEventHandler(self, bool deleteHandler=False) -> EvtHandler
6875
6876 Removes and returns the top-most event handler on the event handler
6877 stack. If deleteHandler is True then the wx.EvtHandler object will be
6878 destroyed after it is popped.
6879 """
6880 return _core_.Window_PopEventHandler(*args, **kwargs)
6881
6882 def RemoveEventHandler(*args, **kwargs):
6883 """
6884 RemoveEventHandler(self, EvtHandler handler) -> bool
6885
6886 Find the given handler in the event handler chain and remove (but not
6887 delete) it from the event handler chain, return True if it was found
6888 and False otherwise (this also results in an assert failure so this
6889 function should only be called when the handler is supposed to be
6890 there.)
6891 """
6892 return _core_.Window_RemoveEventHandler(*args, **kwargs)
6893
6894 def SetValidator(*args, **kwargs):
6895 """
6896 SetValidator(self, Validator validator)
6897
6898 Deletes the current validator (if any) and sets the window validator,
6899 having called wx.Validator.Clone to create a new validator of this
6900 type.
6901 """
6902 return _core_.Window_SetValidator(*args, **kwargs)
6903
6904 def GetValidator(*args, **kwargs):
6905 """
6906 GetValidator(self) -> Validator
6907
6908 Returns a pointer to the current validator for the window, or None if
6909 there is none.
6910 """
6911 return _core_.Window_GetValidator(*args, **kwargs)
6912
6913 def Validate(*args, **kwargs):
6914 """
6915 Validate(self) -> bool
6916
6917 Validates the current values of the child controls using their
6918 validators. If the window has wx.WS_EX_VALIDATE_RECURSIVELY extra
6919 style flag set, the method will also call Validate() of all child
6920 windows. Returns false if any of the validations failed.
6921 """
6922 return _core_.Window_Validate(*args, **kwargs)
6923
6924 def TransferDataToWindow(*args, **kwargs):
6925 """
6926 TransferDataToWindow(self) -> bool
6927
6928 Transfers values to child controls from data areas specified by their
6929 validators. If the window has wx.WS_EX_VALIDATE_RECURSIVELY extra
6930 style flag set, the method will also call TransferDataToWindow() of
6931 all child windows.
6932 """
6933 return _core_.Window_TransferDataToWindow(*args, **kwargs)
6934
6935 def TransferDataFromWindow(*args, **kwargs):
6936 """
6937 TransferDataFromWindow(self) -> bool
6938
6939 Transfers values from child controls to data areas specified by their
6940 validators. Returns false if a transfer failed. If the window has
6941 wx.WS_EX_VALIDATE_RECURSIVELY extra style flag set, the method will
6942 also call TransferDataFromWindow() of all child windows.
6943 """
6944 return _core_.Window_TransferDataFromWindow(*args, **kwargs)
6945
6946 def InitDialog(*args, **kwargs):
6947 """
6948 InitDialog(self)
6949
6950 Sends an EVT_INIT_DIALOG event, whose handler usually transfers data
6951 to the dialog via validators.
6952 """
6953 return _core_.Window_InitDialog(*args, **kwargs)
6954
6955 def SetAcceleratorTable(*args, **kwargs):
6956 """
6957 SetAcceleratorTable(self, AcceleratorTable accel)
6958
6959 Sets the accelerator table for this window.
6960 """
6961 return _core_.Window_SetAcceleratorTable(*args, **kwargs)
6962
6963 def GetAcceleratorTable(*args, **kwargs):
6964 """
6965 GetAcceleratorTable(self) -> AcceleratorTable
6966
6967 Gets the accelerator table for this window.
6968 """
6969 return _core_.Window_GetAcceleratorTable(*args, **kwargs)
6970
6971 def RegisterHotKey(*args, **kwargs):
6972 """
6973 RegisterHotKey(self, int hotkeyId, int modifiers, int keycode) -> bool
6974
6975 Registers a system wide hotkey. Every time the user presses the hotkey
6976 registered here, this window will receive a hotkey event. It will
6977 receive the event even if the application is in the background and
6978 does not have the input focus because the user is working with some
6979 other application. To bind an event handler function to this hotkey
6980 use EVT_HOTKEY with an id equal to hotkeyId. Returns True if the
6981 hotkey was registered successfully.
6982 """
6983 return _core_.Window_RegisterHotKey(*args, **kwargs)
6984
6985 def UnregisterHotKey(*args, **kwargs):
6986 """
6987 UnregisterHotKey(self, int hotkeyId) -> bool
6988
6989 Unregisters a system wide hotkey.
6990 """
6991 return _core_.Window_UnregisterHotKey(*args, **kwargs)
6992
6993 def ConvertDialogPointToPixels(*args, **kwargs):
6994 """
6995 ConvertDialogPointToPixels(self, Point pt) -> Point
6996
6997 Converts a point or size from dialog units to pixels. Dialog units
6998 are used for maintaining a dialog's proportions even if the font
6999 changes. For the x dimension, the dialog units are multiplied by the
7000 average character width and then divided by 4. For the y dimension,
7001 the dialog units are multiplied by the average character height and
7002 then divided by 8.
7003 """
7004 return _core_.Window_ConvertDialogPointToPixels(*args, **kwargs)
7005
7006 def ConvertDialogSizeToPixels(*args, **kwargs):
7007 """
7008 ConvertDialogSizeToPixels(self, Size sz) -> Size
7009
7010 Converts a point or size from dialog units to pixels. Dialog units
7011 are used for maintaining a dialog's proportions even if the font
7012 changes. For the x dimension, the dialog units are multiplied by the
7013 average character width and then divided by 4. For the y dimension,
7014 the dialog units are multiplied by the average character height and
7015 then divided by 8.
7016 """
7017 return _core_.Window_ConvertDialogSizeToPixels(*args, **kwargs)
7018
7019 def DLG_PNT(*args, **kwargs):
7020 """
7021 DLG_PNT(self, Point pt) -> Point
7022
7023 Converts a point or size from dialog units to pixels. Dialog units
7024 are used for maintaining a dialog's proportions even if the font
7025 changes. For the x dimension, the dialog units are multiplied by the
7026 average character width and then divided by 4. For the y dimension,
7027 the dialog units are multiplied by the average character height and
7028 then divided by 8.
7029 """
7030 return _core_.Window_DLG_PNT(*args, **kwargs)
7031
7032 def DLG_SZE(*args, **kwargs):
7033 """
7034 DLG_SZE(self, Size sz) -> Size
7035
7036 Converts a point or size from dialog units to pixels. Dialog units
7037 are used for maintaining a dialog's proportions even if the font
7038 changes. For the x dimension, the dialog units are multiplied by the
7039 average character width and then divided by 4. For the y dimension,
7040 the dialog units are multiplied by the average character height and
7041 then divided by 8.
7042 """
7043 return _core_.Window_DLG_SZE(*args, **kwargs)
7044
7045 def ConvertPixelPointToDialog(*args, **kwargs):
7046 """ConvertPixelPointToDialog(self, Point pt) -> Point"""
7047 return _core_.Window_ConvertPixelPointToDialog(*args, **kwargs)
7048
7049 def ConvertPixelSizeToDialog(*args, **kwargs):
7050 """ConvertPixelSizeToDialog(self, Size sz) -> Size"""
7051 return _core_.Window_ConvertPixelSizeToDialog(*args, **kwargs)
7052
7053 def WarpPointer(*args, **kwargs):
7054 """
7055 WarpPointer(self, int x, int y)
7056
7057 Moves the pointer to the given position on the window.
7058
7059 NOTE: This function is not supported under Mac because Apple Human
7060 Interface Guidelines forbid moving the mouse cursor programmatically.
7061 """
7062 return _core_.Window_WarpPointer(*args, **kwargs)
7063
7064 def CaptureMouse(*args, **kwargs):
7065 """
7066 CaptureMouse(self)
7067
7068 Directs all mouse input to this window. Call wx.Window.ReleaseMouse to
7069 release the capture.
7070
7071 Note that wxWindows maintains the stack of windows having captured the
7072 mouse and when the mouse is released the capture returns to the window
7073 which had had captured it previously and it is only really released if
7074 there were no previous window. In particular, this means that you must
7075 release the mouse as many times as you capture it.
7076 """
7077 return _core_.Window_CaptureMouse(*args, **kwargs)
7078
7079 def ReleaseMouse(*args, **kwargs):
7080 """
7081 ReleaseMouse(self)
7082
7083 Releases mouse input captured with wx.Window.CaptureMouse.
7084 """
7085 return _core_.Window_ReleaseMouse(*args, **kwargs)
7086
7087 def GetCapture(*args, **kwargs):
7088 """
7089 GetCapture() -> Window
7090
7091 Returns the window which currently captures the mouse or None
7092 """
7093 return _core_.Window_GetCapture(*args, **kwargs)
7094
7095 GetCapture = staticmethod(GetCapture)
7096 def HasCapture(*args, **kwargs):
7097 """
7098 HasCapture(self) -> bool
7099
7100 Returns true if this window has the current mouse capture.
7101 """
7102 return _core_.Window_HasCapture(*args, **kwargs)
7103
7104 def Refresh(*args, **kwargs):
7105 """
7106 Refresh(self, bool eraseBackground=True, Rect rect=None)
7107
7108 Mark the specified rectangle (or the whole window) as "dirty" so it
7109 will be repainted. Causes an EVT_PAINT event to be generated and sent
7110 to the window.
7111 """
7112 return _core_.Window_Refresh(*args, **kwargs)
7113
7114 def RefreshRect(*args, **kwargs):
7115 """
7116 RefreshRect(self, Rect rect)
7117
7118 Redraws the contents of the given rectangle: the area inside it will
7119 be repainted. This is the same as Refresh but has a nicer syntax.
7120 """
7121 return _core_.Window_RefreshRect(*args, **kwargs)
7122
7123 def Update(*args, **kwargs):
7124 """
7125 Update(self)
7126
7127 Calling this method immediately repaints the invalidated area of the
7128 window instead of waiting for the EVT_PAINT event to happen, (normally
7129 this would usually only happen when the flow of control returns to the
7130 event loop.) Notice that this function doesn't refresh the window and
7131 does nothing if the window has been already repainted. Use Refresh
7132 first if you want to immediately redraw the window (or some portion of
7133 it) unconditionally.
7134 """
7135 return _core_.Window_Update(*args, **kwargs)
7136
7137 def ClearBackground(*args, **kwargs):
7138 """
7139 ClearBackground(self)
7140
7141 Clears the window by filling it with the current background
7142 colour. Does not cause an erase background event to be generated.
7143 """
7144 return _core_.Window_ClearBackground(*args, **kwargs)
7145
7146 def Freeze(*args, **kwargs):
7147 """
7148 Freeze(self)
7149
7150 Freezes the window or, in other words, prevents any updates from
7151 taking place on screen, the window is not redrawn at all. Thaw must be
7152 called to reenable window redrawing. Calls to Freeze/Thaw may be
7153 nested, with the actual Thaw being delayed until all the nesting has
7154 been undone.
7155
7156 This method is useful for visual appearance optimization (for example,
7157 it is a good idea to use it before inserting large amount of text into
7158 a wxTextCtrl under wxGTK) but is not implemented on all platforms nor
7159 for all controls so it is mostly just a hint to wxWindows and not a
7160 mandatory directive.
7161 """
7162 return _core_.Window_Freeze(*args, **kwargs)
7163
7164 def Thaw(*args, **kwargs):
7165 """
7166 Thaw(self)
7167
7168 Reenables window updating after a previous call to Freeze. Calls to
7169 Freeze/Thaw may be nested, so Thaw must be called the same number of
7170 times that Freeze was before the window will be updated.
7171 """
7172 return _core_.Window_Thaw(*args, **kwargs)
7173
7174 def PrepareDC(*args, **kwargs):
7175 """
7176 PrepareDC(self, DC dc)
7177
7178 Call this function to prepare the device context for drawing a
7179 scrolled image. It sets the device origin according to the current
7180 scroll position.
7181 """
7182 return _core_.Window_PrepareDC(*args, **kwargs)
7183
7184 def GetUpdateRegion(*args, **kwargs):
7185 """
7186 GetUpdateRegion(self) -> Region
7187
7188 Returns the region specifying which parts of the window have been
7189 damaged. Should only be called within an EVT_PAINT handler.
7190 """
7191 return _core_.Window_GetUpdateRegion(*args, **kwargs)
7192
7193 def GetUpdateClientRect(*args, **kwargs):
7194 """
7195 GetUpdateClientRect(self) -> Rect
7196
7197 Get the update rectangle region bounding box in client coords.
7198 """
7199 return _core_.Window_GetUpdateClientRect(*args, **kwargs)
7200
7201 def IsExposed(*args, **kwargs):
7202 """
7203 IsExposed(self, int x, int y, int w=1, int h=1) -> bool
7204
7205 Returns true if the given point or rectangle area has been exposed
7206 since the last repaint. Call this in an paint event handler to
7207 optimize redrawing by only redrawing those areas, which have been
7208 exposed.
7209 """
7210 return _core_.Window_IsExposed(*args, **kwargs)
7211
7212 def IsExposedPoint(*args, **kwargs):
7213 """
7214 IsExposedPoint(self, Point pt) -> bool
7215
7216 Returns true if the given point or rectangle area has been exposed
7217 since the last repaint. Call this in an paint event handler to
7218 optimize redrawing by only redrawing those areas, which have been
7219 exposed.
7220 """
7221 return _core_.Window_IsExposedPoint(*args, **kwargs)
7222
7223 def IsExposedRect(*args, **kwargs):
7224 """
7225 IsExposedRect(self, Rect rect) -> bool
7226
7227 Returns true if the given point or rectangle area has been exposed
7228 since the last repaint. Call this in an paint event handler to
7229 optimize redrawing by only redrawing those areas, which have been
7230 exposed.
7231 """
7232 return _core_.Window_IsExposedRect(*args, **kwargs)
7233
7234 def GetDefaultAttributes(*args, **kwargs):
7235 """
7236 GetDefaultAttributes(self) -> VisualAttributes
7237
7238 Get the default attributes for an instance of this class. This is
7239 useful if you want to use the same font or colour in your own control
7240 as in a standard control -- which is a much better idea than hard
7241 coding specific colours or fonts which might look completely out of
7242 place on the user's system, especially if it uses themes.
7243 """
7244 return _core_.Window_GetDefaultAttributes(*args, **kwargs)
7245
7246 def GetClassDefaultAttributes(*args, **kwargs):
7247 """
7248 GetClassDefaultAttributes(int variant=WINDOW_VARIANT_NORMAL) -> VisualAttributes
7249
7250 Get the default attributes for this class. This is useful if you want
7251 to use the same font or colour in your own control as in a standard
7252 control -- which is a much better idea than hard coding specific
7253 colours or fonts which might look completely out of place on the
7254 user's system, especially if it uses themes.
7255
7256 The variant parameter is only relevant under Mac currently and is
7257 ignore under other platforms. Under Mac, it will change the size of
7258 the returned font. See `wx.Window.SetWindowVariant` for more about
7259 this.
7260 """
7261 return _core_.Window_GetClassDefaultAttributes(*args, **kwargs)
7262
7263 GetClassDefaultAttributes = staticmethod(GetClassDefaultAttributes)
7264 def SetBackgroundColour(*args, **kwargs):
7265 """
7266 SetBackgroundColour(self, Colour colour) -> bool
7267
7268 Sets the background colour of the window. Returns True if the colour
7269 was changed. The background colour is usually painted by the default
7270 EVT_ERASE_BACKGROUND event handler function under Windows and
7271 automatically under GTK. Using `wx.NullColour` will reset the window
7272 to the default background colour.
7273
7274 Note that setting the background colour may not cause an immediate
7275 refresh, so you may wish to call `ClearBackground` or `Refresh` after
7276 calling this function.
7277
7278 Using this function will disable attempts to use themes for this
7279 window, if the system supports them. Use with care since usually the
7280 themes represent the appearance chosen by the user to be used for all
7281 applications on the system.
7282 """
7283 return _core_.Window_SetBackgroundColour(*args, **kwargs)
7284
7285 def SetOwnBackgroundColour(*args, **kwargs):
7286 """SetOwnBackgroundColour(self, Colour colour)"""
7287 return _core_.Window_SetOwnBackgroundColour(*args, **kwargs)
7288
7289 def SetForegroundColour(*args, **kwargs):
7290 """
7291 SetForegroundColour(self, Colour colour) -> bool
7292
7293 Sets the foreground colour of the window. Returns True is the colour
7294 was changed. The interpretation of foreground colour is dependent on
7295 the window class; it may be the text colour or other colour, or it may
7296 not be used at all.
7297 """
7298 return _core_.Window_SetForegroundColour(*args, **kwargs)
7299
7300 def SetOwnForegroundColour(*args, **kwargs):
7301 """SetOwnForegroundColour(self, Colour colour)"""
7302 return _core_.Window_SetOwnForegroundColour(*args, **kwargs)
7303
7304 def GetBackgroundColour(*args, **kwargs):
7305 """
7306 GetBackgroundColour(self) -> Colour
7307
7308 Returns the background colour of the window.
7309 """
7310 return _core_.Window_GetBackgroundColour(*args, **kwargs)
7311
7312 def GetForegroundColour(*args, **kwargs):
7313 """
7314 GetForegroundColour(self) -> Colour
7315
7316 Returns the foreground colour of the window. The interpretation of
7317 foreground colour is dependent on the window class; it may be the text
7318 colour or other colour, or it may not be used at all.
7319 """
7320 return _core_.Window_GetForegroundColour(*args, **kwargs)
7321
7322 def SetBackgroundStyle(*args, **kwargs):
7323 """
7324 SetBackgroundStyle(self, int style) -> bool
7325
7326 Returns the background style of the window. The background style
7327 indicates how the background of the window is drawn.
7328
7329 ====================== ========================================
7330 wx.BG_STYLE_SYSTEM The background colour or pattern should
7331 be determined by the system
7332 wx.BG_STYLE_COLOUR The background should be a solid colour
7333 wx.BG_STYLE_CUSTOM The background will be implemented by the
7334 application.
7335 ====================== ========================================
7336
7337 On GTK+, use of wx.BG_STYLE_CUSTOM allows the flicker-free drawing of
7338 a custom background, such as a tiled bitmap. Currently the style has
7339 no effect on other platforms.
7340
7341 :see: `GetBackgroundStyle`, `SetBackgroundColour`
7342 """
7343 return _core_.Window_SetBackgroundStyle(*args, **kwargs)
7344
7345 def GetBackgroundStyle(*args, **kwargs):
7346 """
7347 GetBackgroundStyle(self) -> int
7348
7349 Returns the background style of the window.
7350
7351 :see: `SetBackgroundStyle`
7352 """
7353 return _core_.Window_GetBackgroundStyle(*args, **kwargs)
7354
7355 def HasTransparentBackground(*args, **kwargs):
7356 """
7357 HasTransparentBackground(self) -> bool
7358
7359 Returns True if this window's background is transparent (as, for
7360 example, for `wx.StaticText`) and should show the parent window's
7361 background.
7362
7363 This method is mostly used internally by the library itself and you
7364 normally shouldn't have to call it. You may, however, have to override
7365 it in your custom control classes to ensure that background is painted
7366 correctly.
7367 """
7368 return _core_.Window_HasTransparentBackground(*args, **kwargs)
7369
7370 def SetCursor(*args, **kwargs):
7371 """
7372 SetCursor(self, Cursor cursor) -> bool
7373
7374 Sets the window's cursor. Notice that the window cursor also sets it
7375 for the children of the window implicitly.
7376
7377 The cursor may be wx.NullCursor in which case the window cursor will
7378 be reset back to default.
7379 """
7380 return _core_.Window_SetCursor(*args, **kwargs)
7381
7382 def GetCursor(*args, **kwargs):
7383 """
7384 GetCursor(self) -> Cursor
7385
7386 Return the cursor associated with this window.
7387 """
7388 return _core_.Window_GetCursor(*args, **kwargs)
7389
7390 def SetFont(*args, **kwargs):
7391 """
7392 SetFont(self, Font font) -> bool
7393
7394 Sets the font for this window.
7395 """
7396 return _core_.Window_SetFont(*args, **kwargs)
7397
7398 def SetOwnFont(*args, **kwargs):
7399 """SetOwnFont(self, Font font)"""
7400 return _core_.Window_SetOwnFont(*args, **kwargs)
7401
7402 def GetFont(*args, **kwargs):
7403 """
7404 GetFont(self) -> Font
7405
7406 Returns the default font used for this window.
7407 """
7408 return _core_.Window_GetFont(*args, **kwargs)
7409
7410 def SetCaret(*args, **kwargs):
7411 """
7412 SetCaret(self, Caret caret)
7413
7414 Sets the caret associated with the window.
7415 """
7416 return _core_.Window_SetCaret(*args, **kwargs)
7417
7418 def GetCaret(*args, **kwargs):
7419 """
7420 GetCaret(self) -> Caret
7421
7422 Returns the caret associated with the window.
7423 """
7424 return _core_.Window_GetCaret(*args, **kwargs)
7425
7426 def GetCharHeight(*args, **kwargs):
7427 """
7428 GetCharHeight(self) -> int
7429
7430 Get the (average) character size for the current font.
7431 """
7432 return _core_.Window_GetCharHeight(*args, **kwargs)
7433
7434 def GetCharWidth(*args, **kwargs):
7435 """
7436 GetCharWidth(self) -> int
7437
7438 Get the (average) character size for the current font.
7439 """
7440 return _core_.Window_GetCharWidth(*args, **kwargs)
7441
7442 def GetTextExtent(*args, **kwargs):
7443 """
7444 GetTextExtent(String string) -> (width, height)
7445
7446 Get the width and height of the text using the current font.
7447 """
7448 return _core_.Window_GetTextExtent(*args, **kwargs)
7449
7450 def GetFullTextExtent(*args, **kwargs):
7451 """
7452 GetFullTextExtent(String string, Font font=None) ->
7453 (width, height, descent, externalLeading)
7454
7455 Get the width, height, decent and leading of the text using the
7456 current or specified font.
7457 """
7458 return _core_.Window_GetFullTextExtent(*args, **kwargs)
7459
7460 def ClientToScreenXY(*args, **kwargs):
7461 """
7462 ClientToScreenXY(int x, int y) -> (x,y)
7463
7464 Converts to screen coordinates from coordinates relative to this window.
7465 """
7466 return _core_.Window_ClientToScreenXY(*args, **kwargs)
7467
7468 def ScreenToClientXY(*args, **kwargs):
7469 """
7470 ScreenToClientXY(int x, int y) -> (x,y)
7471
7472 Converts from screen to client window coordinates.
7473 """
7474 return _core_.Window_ScreenToClientXY(*args, **kwargs)
7475
7476 def ClientToScreen(*args, **kwargs):
7477 """
7478 ClientToScreen(self, Point pt) -> Point
7479
7480 Converts to screen coordinates from coordinates relative to this window.
7481 """
7482 return _core_.Window_ClientToScreen(*args, **kwargs)
7483
7484 def ScreenToClient(*args, **kwargs):
7485 """
7486 ScreenToClient(self, Point pt) -> Point
7487
7488 Converts from screen to client window coordinates.
7489 """
7490 return _core_.Window_ScreenToClient(*args, **kwargs)
7491
7492 def HitTestXY(*args, **kwargs):
7493 """
7494 HitTestXY(self, int x, int y) -> int
7495
7496 Test where the given (in client coords) point lies
7497 """
7498 return _core_.Window_HitTestXY(*args, **kwargs)
7499
7500 def HitTest(*args, **kwargs):
7501 """
7502 HitTest(self, Point pt) -> int
7503
7504 Test where the given (in client coords) point lies
7505 """
7506 return _core_.Window_HitTest(*args, **kwargs)
7507
7508 def GetBorder(*args):
7509 """
7510 GetBorder(self, long flags) -> int
7511 GetBorder(self) -> int
7512
7513 Get border for the flags of this window
7514 """
7515 return _core_.Window_GetBorder(*args)
7516
7517 def UpdateWindowUI(*args, **kwargs):
7518 """
7519 UpdateWindowUI(self, long flags=UPDATE_UI_NONE)
7520
7521 This function sends EVT_UPDATE_UI events to the window. The particular
7522 implementation depends on the window; for example a wx.ToolBar will
7523 send an update UI event for each toolbar button, and a wx.Frame will
7524 send an update UI event for each menubar menu item. You can call this
7525 function from your application to ensure that your UI is up-to-date at
7526 a particular point in time (as far as your EVT_UPDATE_UI handlers are
7527 concerned). This may be necessary if you have called
7528 wx.UpdateUIEvent.SetMode or wx.UpdateUIEvent.SetUpdateInterval to
7529 limit the overhead that wxWindows incurs by sending update UI events
7530 in idle time.
7531 """
7532 return _core_.Window_UpdateWindowUI(*args, **kwargs)
7533
7534 def PopupMenuXY(*args, **kwargs):
7535 """
7536 PopupMenuXY(self, Menu menu, int x=-1, int y=-1) -> bool
7537
7538 Pops up the given menu at the specified coordinates, relative to this window,
7539 and returns control when the user has dismissed the menu. If a menu item is
7540 selected, the corresponding menu event is generated and will be processed as
7541 usual. If the default position is given then the current position of the
7542 mouse cursor will be used.
7543 """
7544 return _core_.Window_PopupMenuXY(*args, **kwargs)
7545
7546 def PopupMenu(*args, **kwargs):
7547 """
7548 PopupMenu(self, Menu menu, Point pos=DefaultPosition) -> bool
7549
7550 Pops up the given menu at the specified coordinates, relative to this window,
7551 and returns control when the user has dismissed the menu. If a menu item is
7552 selected, the corresponding menu event is generated and will be processed as
7553 usual. If the default position is given then the current position of the
7554 mouse cursor will be used.
7555 """
7556 return _core_.Window_PopupMenu(*args, **kwargs)
7557
7558 def GetHandle(*args, **kwargs):
7559 """
7560 GetHandle(self) -> long
7561
7562 Returns the platform-specific handle (as a long integer) of the
7563 physical window. Currently on wxMac it returns the handle of the
7564 toplevel parent of the window.
7565 """
7566 return _core_.Window_GetHandle(*args, **kwargs)
7567
7568 def AssociateHandle(*args, **kwargs):
7569 """
7570 AssociateHandle(self, long handle)
7571
7572 Associate the window with a new native handle
7573 """
7574 return _core_.Window_AssociateHandle(*args, **kwargs)
7575
7576 def DissociateHandle(*args, **kwargs):
7577 """
7578 DissociateHandle(self)
7579
7580 Dissociate the current native handle from the window
7581 """
7582 return _core_.Window_DissociateHandle(*args, **kwargs)
7583
7584 def OnPaint(*args, **kwargs):
7585 """OnPaint(self, PaintEvent event)"""
7586 return _core_.Window_OnPaint(*args, **kwargs)
7587
7588 def HasScrollbar(*args, **kwargs):
7589 """
7590 HasScrollbar(self, int orient) -> bool
7591
7592 Does the window have the scrollbar for this orientation?
7593 """
7594 return _core_.Window_HasScrollbar(*args, **kwargs)
7595
7596 def SetScrollbar(*args, **kwargs):
7597 """
7598 SetScrollbar(self, int orientation, int position, int thumbSize, int range,
7599 bool refresh=True)
7600
7601 Sets the scrollbar properties of a built-in scrollbar.
7602 """
7603 return _core_.Window_SetScrollbar(*args, **kwargs)
7604
7605 def SetScrollPos(*args, **kwargs):
7606 """
7607 SetScrollPos(self, int orientation, int pos, bool refresh=True)
7608
7609 Sets the position of one of the built-in scrollbars.
7610 """
7611 return _core_.Window_SetScrollPos(*args, **kwargs)
7612
7613 def GetScrollPos(*args, **kwargs):
7614 """
7615 GetScrollPos(self, int orientation) -> int
7616
7617 Returns the built-in scrollbar position.
7618 """
7619 return _core_.Window_GetScrollPos(*args, **kwargs)
7620
7621 def GetScrollThumb(*args, **kwargs):
7622 """
7623 GetScrollThumb(self, int orientation) -> int
7624
7625 Returns the built-in scrollbar thumb size.
7626 """
7627 return _core_.Window_GetScrollThumb(*args, **kwargs)
7628
7629 def GetScrollRange(*args, **kwargs):
7630 """
7631 GetScrollRange(self, int orientation) -> int
7632
7633 Returns the built-in scrollbar range.
7634 """
7635 return _core_.Window_GetScrollRange(*args, **kwargs)
7636
7637 def ScrollWindow(*args, **kwargs):
7638 """
7639 ScrollWindow(self, int dx, int dy, Rect rect=None)
7640
7641 Physically scrolls the pixels in the window and move child windows
7642 accordingly. Use this function to optimise your scrolling
7643 implementations, to minimise the area that must be redrawn. Note that
7644 it is rarely required to call this function from a user program.
7645 """
7646 return _core_.Window_ScrollWindow(*args, **kwargs)
7647
7648 def ScrollLines(*args, **kwargs):
7649 """
7650 ScrollLines(self, int lines) -> bool
7651
7652 If the platform and window class supports it, scrolls the window by
7653 the given number of lines down, if lines is positive, or up if lines
7654 is negative. Returns True if the window was scrolled, False if it was
7655 already on top/bottom and nothing was done.
7656 """
7657 return _core_.Window_ScrollLines(*args, **kwargs)
7658
7659 def ScrollPages(*args, **kwargs):
7660 """
7661 ScrollPages(self, int pages) -> bool
7662
7663 If the platform and window class supports it, scrolls the window by
7664 the given number of pages down, if pages is positive, or up if pages
7665 is negative. Returns True if the window was scrolled, False if it was
7666 already on top/bottom and nothing was done.
7667 """
7668 return _core_.Window_ScrollPages(*args, **kwargs)
7669
7670 def LineUp(*args, **kwargs):
7671 """
7672 LineUp(self) -> bool
7673
7674 This is just a wrapper for ScrollLines(-1).
7675 """
7676 return _core_.Window_LineUp(*args, **kwargs)
7677
7678 def LineDown(*args, **kwargs):
7679 """
7680 LineDown(self) -> bool
7681
7682 This is just a wrapper for ScrollLines(1).
7683 """
7684 return _core_.Window_LineDown(*args, **kwargs)
7685
7686 def PageUp(*args, **kwargs):
7687 """
7688 PageUp(self) -> bool
7689
7690 This is just a wrapper for ScrollPages(-1).
7691 """
7692 return _core_.Window_PageUp(*args, **kwargs)
7693
7694 def PageDown(*args, **kwargs):
7695 """
7696 PageDown(self) -> bool
7697
7698 This is just a wrapper for ScrollPages(1).
7699 """
7700 return _core_.Window_PageDown(*args, **kwargs)
7701
7702 def SetHelpText(*args, **kwargs):
7703 """
7704 SetHelpText(self, String text)
7705
7706 Sets the help text to be used as context-sensitive help for this
7707 window. Note that the text is actually stored by the current
7708 wxHelpProvider implementation, and not in the window object itself.
7709 """
7710 return _core_.Window_SetHelpText(*args, **kwargs)
7711
7712 def SetHelpTextForId(*args, **kwargs):
7713 """
7714 SetHelpTextForId(self, String text)
7715
7716 Associate this help text with all windows with the same id as this
7717 one.
7718 """
7719 return _core_.Window_SetHelpTextForId(*args, **kwargs)
7720
7721 def GetHelpText(*args, **kwargs):
7722 """
7723 GetHelpText(self) -> String
7724
7725 Gets the help text to be used as context-sensitive help for this
7726 window. Note that the text is actually stored by the current
7727 wxHelpProvider implementation, and not in the window object itself.
7728 """
7729 return _core_.Window_GetHelpText(*args, **kwargs)
7730
7731 def SetToolTipString(*args, **kwargs):
7732 """
7733 SetToolTipString(self, String tip)
7734
7735 Attach a tooltip to the window.
7736 """
7737 return _core_.Window_SetToolTipString(*args, **kwargs)
7738
7739 def SetToolTip(*args, **kwargs):
7740 """
7741 SetToolTip(self, ToolTip tip)
7742
7743 Attach a tooltip to the window.
7744 """
7745 return _core_.Window_SetToolTip(*args, **kwargs)
7746
7747 def GetToolTip(*args, **kwargs):
7748 """
7749 GetToolTip(self) -> ToolTip
7750
7751 get the associated tooltip or None if none
7752 """
7753 return _core_.Window_GetToolTip(*args, **kwargs)
7754
7755 def SetDropTarget(*args, **kwargs):
7756 """
7757 SetDropTarget(self, DropTarget dropTarget)
7758
7759 Associates a drop target with this window. If the window already has
7760 a drop target, it is deleted.
7761 """
7762 return _core_.Window_SetDropTarget(*args, **kwargs)
7763
7764 def GetDropTarget(*args, **kwargs):
7765 """
7766 GetDropTarget(self) -> DropTarget
7767
7768 Returns the associated drop target, which may be None.
7769 """
7770 return _core_.Window_GetDropTarget(*args, **kwargs)
7771
7772 def DragAcceptFiles(*args, **kwargs):
7773 """
7774 DragAcceptFiles(self, bool accept)
7775
7776 Enables or disables eligibility for drop file events, EVT_DROP_FILES.
7777 Only available on Windows.
7778 """
7779 return _core_.Window_DragAcceptFiles(*args, **kwargs)
7780
7781 def SetConstraints(*args, **kwargs):
7782 """
7783 SetConstraints(self, LayoutConstraints constraints)
7784
7785 Sets the window to have the given layout constraints. If an existing
7786 layout constraints object is already owned by the window, it will be
7787 deleted. Pass None to disassociate and delete the window's current
7788 constraints.
7789
7790 You must call SetAutoLayout to tell a window to use the constraints
7791 automatically in its default EVT_SIZE handler; otherwise, you must
7792 handle EVT_SIZE yourself and call Layout() explicitly. When setting
7793 both a wx.LayoutConstraints and a wx.Sizer, only the sizer will have
7794 effect.
7795 """
7796 return _core_.Window_SetConstraints(*args, **kwargs)
7797
7798 def GetConstraints(*args, **kwargs):
7799 """
7800 GetConstraints(self) -> LayoutConstraints
7801
7802 Returns a pointer to the window's layout constraints, or None if there
7803 are none.
7804 """
7805 return _core_.Window_GetConstraints(*args, **kwargs)
7806
7807 def SetAutoLayout(*args, **kwargs):
7808 """
7809 SetAutoLayout(self, bool autoLayout)
7810
7811 Determines whether the Layout function will be called automatically
7812 when the window is resized. It is called implicitly by SetSizer but
7813 if you use SetConstraints you should call it manually or otherwise the
7814 window layout won't be correctly updated when its size changes.
7815 """
7816 return _core_.Window_SetAutoLayout(*args, **kwargs)
7817
7818 def GetAutoLayout(*args, **kwargs):
7819 """
7820 GetAutoLayout(self) -> bool
7821
7822 Returns the current autoLayout setting
7823 """
7824 return _core_.Window_GetAutoLayout(*args, **kwargs)
7825
7826 def Layout(*args, **kwargs):
7827 """
7828 Layout(self) -> bool
7829
7830 Invokes the constraint-based layout algorithm or the sizer-based
7831 algorithm for this window. See SetAutoLayout: when auto layout is on,
7832 this function gets called automatically by the default EVT_SIZE
7833 handler when the window is resized.
7834 """
7835 return _core_.Window_Layout(*args, **kwargs)
7836
7837 def SetSizer(*args, **kwargs):
7838 """
7839 SetSizer(self, Sizer sizer, bool deleteOld=True)
7840
7841 Sets the window to have the given layout sizer. The window will then
7842 own the object, and will take care of its deletion. If an existing
7843 layout sizer object is already owned by the window, it will be deleted
7844 if the deleteOld parameter is true. Note that this function will also
7845 call SetAutoLayout implicitly with a True parameter if the sizer is
7846 non-None, and False otherwise.
7847 """
7848 return _core_.Window_SetSizer(*args, **kwargs)
7849
7850 def SetSizerAndFit(*args, **kwargs):
7851 """
7852 SetSizerAndFit(self, Sizer sizer, bool deleteOld=True)
7853
7854 The same as SetSizer, except it also sets the size hints for the
7855 window based on the sizer's minimum size.
7856 """
7857 return _core_.Window_SetSizerAndFit(*args, **kwargs)
7858
7859 def GetSizer(*args, **kwargs):
7860 """
7861 GetSizer(self) -> Sizer
7862
7863 Return the sizer associated with the window by a previous call to
7864 SetSizer or None if there isn't one.
7865 """
7866 return _core_.Window_GetSizer(*args, **kwargs)
7867
7868 def SetContainingSizer(*args, **kwargs):
7869 """
7870 SetContainingSizer(self, Sizer sizer)
7871
7872 This normally does not need to be called by application code. It is
7873 called internally when a window is added to a sizer, and is used so
7874 the window can remove itself from the sizer when it is destroyed.
7875 """
7876 return _core_.Window_SetContainingSizer(*args, **kwargs)
7877
7878 def GetContainingSizer(*args, **kwargs):
7879 """
7880 GetContainingSizer(self) -> Sizer
7881
7882 Return the sizer that this window is a member of, if any, otherwise None.
7883 """
7884 return _core_.Window_GetContainingSizer(*args, **kwargs)
7885
7886 def InheritAttributes(*args, **kwargs):
7887 """
7888 InheritAttributes(self)
7889
7890 This function is (or should be, in case of custom controls) called
7891 during window creation to intelligently set up the window visual
7892 attributes, that is the font and the foreground and background
7893 colours.
7894
7895 By 'intelligently' the following is meant: by default, all windows use
7896 their own default attributes. However if some of the parent's
7897 attributes are explicitly changed (that is, using SetFont and not
7898 SetOwnFont) and if the corresponding attribute hadn't been
7899 explicitly set for this window itself, then this window takes the same
7900 value as used by the parent. In addition, if the window overrides
7901 ShouldInheritColours to return false, the colours will not be changed
7902 no matter what and only the font might.
7903
7904 This rather complicated logic is necessary in order to accommodate the
7905 different usage scenarios. The most common one is when all default
7906 attributes are used and in this case, nothing should be inherited as
7907 in modern GUIs different controls use different fonts (and colours)
7908 than their siblings so they can't inherit the same value from the
7909 parent. However it was also deemed desirable to allow to simply change
7910 the attributes of all children at once by just changing the font or
7911 colour of their common parent, hence in this case we do inherit the
7912 parents attributes.
7913
7914 """
7915 return _core_.Window_InheritAttributes(*args, **kwargs)
7916
7917 def ShouldInheritColours(*args, **kwargs):
7918 """
7919 ShouldInheritColours(self) -> bool
7920
7921 Return true from here to allow the colours of this window to be
7922 changed by InheritAttributes, returning false forbids inheriting them
7923 from the parent window.
7924
7925 The base class version returns false, but this method is overridden in
7926 wxControl where it returns true.
7927 """
7928 return _core_.Window_ShouldInheritColours(*args, **kwargs)
7929
7930 def PostCreate(self, pre):
7931 """
7932 Phase 3 of the 2-phase create <wink!>
7933 Call this method after precreating the window with the 2-phase create method.
7934 """
7935 self.this = pre.this
7936 self.thisown = pre.thisown
7937 pre.thisown = 0
7938 if hasattr(self, '_setOORInfo'):
7939 self._setOORInfo(self)
7940 if hasattr(self, '_setCallbackInfo'):
7941 self._setCallbackInfo(self, self.__class__)
7942
7943
7944 class WindowPtr(Window):
7945 def __init__(self, this):
7946 self.this = this
7947 if not hasattr(self,"thisown"): self.thisown = 0
7948 self.__class__ = Window
7949 _core_.Window_swigregister(WindowPtr)
7950
7951 def PreWindow(*args, **kwargs):
7952 """
7953 PreWindow() -> Window
7954
7955 Precreate a Window for 2-phase creation.
7956 """
7957 val = _core_.new_PreWindow(*args, **kwargs)
7958 val.thisown = 1
7959 return val
7960
7961 def Window_NewControlId(*args, **kwargs):
7962 """
7963 Window_NewControlId() -> int
7964
7965 Generate a control id for the controls which were not given one.
7966 """
7967 return _core_.Window_NewControlId(*args, **kwargs)
7968
7969 def Window_NextControlId(*args, **kwargs):
7970 """
7971 Window_NextControlId(int winid) -> int
7972
7973 Get the id of the control following the one with the given
7974 autogenerated) id
7975 """
7976 return _core_.Window_NextControlId(*args, **kwargs)
7977
7978 def Window_PrevControlId(*args, **kwargs):
7979 """
7980 Window_PrevControlId(int winid) -> int
7981
7982 Get the id of the control preceding the one with the given
7983 autogenerated) id
7984 """
7985 return _core_.Window_PrevControlId(*args, **kwargs)
7986
7987 def Window_FindFocus(*args, **kwargs):
7988 """
7989 Window_FindFocus() -> Window
7990
7991 Returns the window or control that currently has the keyboard focus,
7992 or None.
7993 """
7994 return _core_.Window_FindFocus(*args, **kwargs)
7995
7996 def Window_GetCapture(*args, **kwargs):
7997 """
7998 Window_GetCapture() -> Window
7999
8000 Returns the window which currently captures the mouse or None
8001 """
8002 return _core_.Window_GetCapture(*args, **kwargs)
8003
8004 def Window_GetClassDefaultAttributes(*args, **kwargs):
8005 """
8006 Window_GetClassDefaultAttributes(int variant=WINDOW_VARIANT_NORMAL) -> VisualAttributes
8007
8008 Get the default attributes for this class. This is useful if you want
8009 to use the same font or colour in your own control as in a standard
8010 control -- which is a much better idea than hard coding specific
8011 colours or fonts which might look completely out of place on the
8012 user's system, especially if it uses themes.
8013
8014 The variant parameter is only relevant under Mac currently and is
8015 ignore under other platforms. Under Mac, it will change the size of
8016 the returned font. See `wx.Window.SetWindowVariant` for more about
8017 this.
8018 """
8019 return _core_.Window_GetClassDefaultAttributes(*args, **kwargs)
8020
8021 def DLG_PNT(win, point_or_x, y=None):
8022 """
8023 Convenience function for converting a Point or (x,y) in
8024 dialog units to pixel units.
8025 """
8026 if y is None:
8027 return win.ConvertDialogPointToPixels(point_or_x)
8028 else:
8029 return win.ConvertDialogPointToPixels(wx.Point(point_or_x, y))
8030
8031 def DLG_SZE(win, size_width, height=None):
8032 """
8033 Convenience function for converting a Size or (w,h) in
8034 dialog units to pixel units.
8035 """
8036 if height is None:
8037 return win.ConvertDialogSizeToPixels(size_width)
8038 else:
8039 return win.ConvertDialogSizeToPixels(wx.Size(size_width, height))
8040
8041
8042 def FindWindowById(*args, **kwargs):
8043 """
8044 FindWindowById(long id, Window parent=None) -> Window
8045
8046 Find the first window in the application with the given id. If parent
8047 is None, the search will start from all top-level frames and dialog
8048 boxes; if non-None, the search will be limited to the given window
8049 hierarchy. The search is recursive in both cases.
8050 """
8051 return _core_.FindWindowById(*args, **kwargs)
8052
8053 def FindWindowByName(*args, **kwargs):
8054 """
8055 FindWindowByName(String name, Window parent=None) -> Window
8056
8057 Find a window by its name (as given in a window constructor or Create
8058 function call). If parent is None, the search will start from all
8059 top-level frames and dialog boxes; if non-None, the search will be
8060 limited to the given window hierarchy. The search is recursive in both
8061 cases.
8062
8063 If no window with such name is found, wx.FindWindowByLabel is called.
8064 """
8065 return _core_.FindWindowByName(*args, **kwargs)
8066
8067 def FindWindowByLabel(*args, **kwargs):
8068 """
8069 FindWindowByLabel(String label, Window parent=None) -> Window
8070
8071 Find a window by its label. Depending on the type of window, the label
8072 may be a window title or panel item label. If parent is None, the
8073 search will start from all top-level frames and dialog boxes; if
8074 non-None, the search will be limited to the given window
8075 hierarchy. The search is recursive in both cases.
8076 """
8077 return _core_.FindWindowByLabel(*args, **kwargs)
8078
8079 def Window_FromHWND(*args, **kwargs):
8080 """Window_FromHWND(Window parent, unsigned long _hWnd) -> Window"""
8081 return _core_.Window_FromHWND(*args, **kwargs)
8082 #---------------------------------------------------------------------------
8083
8084 class Validator(EvtHandler):
8085 """Proxy of C++ Validator class"""
8086 def __repr__(self):
8087 return "<%s.%s; proxy of C++ wxValidator instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
8088 def __init__(self, *args, **kwargs):
8089 """__init__(self) -> Validator"""
8090 newobj = _core_.new_Validator(*args, **kwargs)
8091 self.this = newobj.this
8092 self.thisown = 1
8093 del newobj.thisown
8094 self._setOORInfo(self)
8095
8096 def Clone(*args, **kwargs):
8097 """Clone(self) -> Validator"""
8098 return _core_.Validator_Clone(*args, **kwargs)
8099
8100 def Validate(*args, **kwargs):
8101 """Validate(self, Window parent) -> bool"""
8102 return _core_.Validator_Validate(*args, **kwargs)
8103
8104 def TransferToWindow(*args, **kwargs):
8105 """TransferToWindow(self) -> bool"""
8106 return _core_.Validator_TransferToWindow(*args, **kwargs)
8107
8108 def TransferFromWindow(*args, **kwargs):
8109 """TransferFromWindow(self) -> bool"""
8110 return _core_.Validator_TransferFromWindow(*args, **kwargs)
8111
8112 def GetWindow(*args, **kwargs):
8113 """GetWindow(self) -> Window"""
8114 return _core_.Validator_GetWindow(*args, **kwargs)
8115
8116 def SetWindow(*args, **kwargs):
8117 """SetWindow(self, Window window)"""
8118 return _core_.Validator_SetWindow(*args, **kwargs)
8119
8120 def IsSilent(*args, **kwargs):
8121 """IsSilent() -> bool"""
8122 return _core_.Validator_IsSilent(*args, **kwargs)
8123
8124 IsSilent = staticmethod(IsSilent)
8125 def SetBellOnError(*args, **kwargs):
8126 """SetBellOnError(int doIt=True)"""
8127 return _core_.Validator_SetBellOnError(*args, **kwargs)
8128
8129 SetBellOnError = staticmethod(SetBellOnError)
8130
8131 class ValidatorPtr(Validator):
8132 def __init__(self, this):
8133 self.this = this
8134 if not hasattr(self,"thisown"): self.thisown = 0
8135 self.__class__ = Validator
8136 _core_.Validator_swigregister(ValidatorPtr)
8137
8138 def Validator_IsSilent(*args, **kwargs):
8139 """Validator_IsSilent() -> bool"""
8140 return _core_.Validator_IsSilent(*args, **kwargs)
8141
8142 def Validator_SetBellOnError(*args, **kwargs):
8143 """Validator_SetBellOnError(int doIt=True)"""
8144 return _core_.Validator_SetBellOnError(*args, **kwargs)
8145
8146 class PyValidator(Validator):
8147 """Proxy of C++ PyValidator class"""
8148 def __repr__(self):
8149 return "<%s.%s; proxy of C++ wxPyValidator instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
8150 def __init__(self, *args, **kwargs):
8151 """__init__(self) -> PyValidator"""
8152 newobj = _core_.new_PyValidator(*args, **kwargs)
8153 self.this = newobj.this
8154 self.thisown = 1
8155 del newobj.thisown
8156
8157 self._setCallbackInfo(self, PyValidator, 1)
8158 self._setOORInfo(self)
8159
8160 def _setCallbackInfo(*args, **kwargs):
8161 """_setCallbackInfo(self, PyObject self, PyObject _class, int incref=True)"""
8162 return _core_.PyValidator__setCallbackInfo(*args, **kwargs)
8163
8164
8165 class PyValidatorPtr(PyValidator):
8166 def __init__(self, this):
8167 self.this = this
8168 if not hasattr(self,"thisown"): self.thisown = 0
8169 self.__class__ = PyValidator
8170 _core_.PyValidator_swigregister(PyValidatorPtr)
8171
8172 #---------------------------------------------------------------------------
8173
8174 class Menu(EvtHandler):
8175 """Proxy of C++ Menu class"""
8176 def __repr__(self):
8177 return "<%s.%s; proxy of C++ wxMenu instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
8178 def __init__(self, *args, **kwargs):
8179 """__init__(self, String title=EmptyString, long style=0) -> Menu"""
8180 newobj = _core_.new_Menu(*args, **kwargs)
8181 self.this = newobj.this
8182 self.thisown = 1
8183 del newobj.thisown
8184 self._setOORInfo(self)
8185
8186 def Append(*args, **kwargs):
8187 """Append(self, int id, String text, String help=EmptyString, int kind=ITEM_NORMAL) -> MenuItem"""
8188 return _core_.Menu_Append(*args, **kwargs)
8189
8190 def AppendSeparator(*args, **kwargs):
8191 """AppendSeparator(self) -> MenuItem"""
8192 return _core_.Menu_AppendSeparator(*args, **kwargs)
8193
8194 def AppendCheckItem(*args, **kwargs):
8195 """AppendCheckItem(self, int id, String text, String help=EmptyString) -> MenuItem"""
8196 return _core_.Menu_AppendCheckItem(*args, **kwargs)
8197
8198 def AppendRadioItem(*args, **kwargs):
8199 """AppendRadioItem(self, int id, String text, String help=EmptyString) -> MenuItem"""
8200 return _core_.Menu_AppendRadioItem(*args, **kwargs)
8201
8202 def AppendMenu(*args, **kwargs):
8203 """AppendMenu(self, int id, String text, Menu submenu, String help=EmptyString) -> MenuItem"""
8204 return _core_.Menu_AppendMenu(*args, **kwargs)
8205
8206 def AppendItem(*args, **kwargs):
8207 """AppendItem(self, MenuItem item) -> MenuItem"""
8208 return _core_.Menu_AppendItem(*args, **kwargs)
8209
8210 def Break(*args, **kwargs):
8211 """Break(self)"""
8212 return _core_.Menu_Break(*args, **kwargs)
8213
8214 def InsertItem(*args, **kwargs):
8215 """InsertItem(self, size_t pos, MenuItem item) -> MenuItem"""
8216 return _core_.Menu_InsertItem(*args, **kwargs)
8217
8218 def Insert(*args, **kwargs):
8219 """
8220 Insert(self, size_t pos, int id, String text, String help=EmptyString,
8221 int kind=ITEM_NORMAL) -> MenuItem
8222 """
8223 return _core_.Menu_Insert(*args, **kwargs)
8224
8225 def InsertSeparator(*args, **kwargs):
8226 """InsertSeparator(self, size_t pos) -> MenuItem"""
8227 return _core_.Menu_InsertSeparator(*args, **kwargs)
8228
8229 def InsertCheckItem(*args, **kwargs):
8230 """InsertCheckItem(self, size_t pos, int id, String text, String help=EmptyString) -> MenuItem"""
8231 return _core_.Menu_InsertCheckItem(*args, **kwargs)
8232
8233 def InsertRadioItem(*args, **kwargs):
8234 """InsertRadioItem(self, size_t pos, int id, String text, String help=EmptyString) -> MenuItem"""
8235 return _core_.Menu_InsertRadioItem(*args, **kwargs)
8236
8237 def InsertMenu(*args, **kwargs):
8238 """InsertMenu(self, size_t pos, int id, String text, Menu submenu, String help=EmptyString) -> MenuItem"""
8239 return _core_.Menu_InsertMenu(*args, **kwargs)
8240
8241 def PrependItem(*args, **kwargs):
8242 """PrependItem(self, MenuItem item) -> MenuItem"""
8243 return _core_.Menu_PrependItem(*args, **kwargs)
8244
8245 def Prepend(*args, **kwargs):
8246 """Prepend(self, int id, String text, String help=EmptyString, int kind=ITEM_NORMAL) -> MenuItem"""
8247 return _core_.Menu_Prepend(*args, **kwargs)
8248
8249 def PrependSeparator(*args, **kwargs):
8250 """PrependSeparator(self) -> MenuItem"""
8251 return _core_.Menu_PrependSeparator(*args, **kwargs)
8252
8253 def PrependCheckItem(*args, **kwargs):
8254 """PrependCheckItem(self, int id, String text, String help=EmptyString) -> MenuItem"""
8255 return _core_.Menu_PrependCheckItem(*args, **kwargs)
8256
8257 def PrependRadioItem(*args, **kwargs):
8258 """PrependRadioItem(self, int id, String text, String help=EmptyString) -> MenuItem"""
8259 return _core_.Menu_PrependRadioItem(*args, **kwargs)
8260
8261 def PrependMenu(*args, **kwargs):
8262 """PrependMenu(self, int id, String text, Menu submenu, String help=EmptyString) -> MenuItem"""
8263 return _core_.Menu_PrependMenu(*args, **kwargs)
8264
8265 def Remove(*args, **kwargs):
8266 """Remove(self, int id) -> MenuItem"""
8267 return _core_.Menu_Remove(*args, **kwargs)
8268
8269 def RemoveItem(*args, **kwargs):
8270 """RemoveItem(self, MenuItem item) -> MenuItem"""
8271 return _core_.Menu_RemoveItem(*args, **kwargs)
8272
8273 def Delete(*args, **kwargs):
8274 """Delete(self, int id) -> bool"""
8275 return _core_.Menu_Delete(*args, **kwargs)
8276
8277 def DeleteItem(*args, **kwargs):
8278 """DeleteItem(self, MenuItem item) -> bool"""
8279 return _core_.Menu_DeleteItem(*args, **kwargs)
8280
8281 def Destroy(*args, **kwargs):
8282 """
8283 Destroy(self)
8284
8285 Deletes the C++ object this Python object is a proxy for.
8286 """
8287 return _core_.Menu_Destroy(*args, **kwargs)
8288
8289 def DestroyId(*args, **kwargs):
8290 """
8291 DestroyId(self, int id) -> bool
8292
8293 Deletes the C++ object this Python object is a proxy for.
8294 """
8295 return _core_.Menu_DestroyId(*args, **kwargs)
8296
8297 def DestroyItem(*args, **kwargs):
8298 """
8299 DestroyItem(self, MenuItem item) -> bool
8300
8301 Deletes the C++ object this Python object is a proxy for.
8302 """
8303 return _core_.Menu_DestroyItem(*args, **kwargs)
8304
8305 def GetMenuItemCount(*args, **kwargs):
8306 """GetMenuItemCount(self) -> size_t"""
8307 return _core_.Menu_GetMenuItemCount(*args, **kwargs)
8308
8309 def GetMenuItems(*args, **kwargs):
8310 """GetMenuItems(self) -> PyObject"""
8311 return _core_.Menu_GetMenuItems(*args, **kwargs)
8312
8313 def FindItem(*args, **kwargs):
8314 """FindItem(self, String item) -> int"""
8315 return _core_.Menu_FindItem(*args, **kwargs)
8316
8317 def FindItemById(*args, **kwargs):
8318 """FindItemById(self, int id) -> MenuItem"""
8319 return _core_.Menu_FindItemById(*args, **kwargs)
8320
8321 def FindItemByPosition(*args, **kwargs):
8322 """FindItemByPosition(self, size_t position) -> MenuItem"""
8323 return _core_.Menu_FindItemByPosition(*args, **kwargs)
8324
8325 def Enable(*args, **kwargs):
8326 """Enable(self, int id, bool enable)"""
8327 return _core_.Menu_Enable(*args, **kwargs)
8328
8329 def IsEnabled(*args, **kwargs):
8330 """IsEnabled(self, int id) -> bool"""
8331 return _core_.Menu_IsEnabled(*args, **kwargs)
8332
8333 def Check(*args, **kwargs):
8334 """Check(self, int id, bool check)"""
8335 return _core_.Menu_Check(*args, **kwargs)
8336
8337 def IsChecked(*args, **kwargs):
8338 """IsChecked(self, int id) -> bool"""
8339 return _core_.Menu_IsChecked(*args, **kwargs)
8340
8341 def SetLabel(*args, **kwargs):
8342 """SetLabel(self, int id, String label)"""
8343 return _core_.Menu_SetLabel(*args, **kwargs)
8344
8345 def GetLabel(*args, **kwargs):
8346 """GetLabel(self, int id) -> String"""
8347 return _core_.Menu_GetLabel(*args, **kwargs)
8348
8349 def SetHelpString(*args, **kwargs):
8350 """SetHelpString(self, int id, String helpString)"""
8351 return _core_.Menu_SetHelpString(*args, **kwargs)
8352
8353 def GetHelpString(*args, **kwargs):
8354 """GetHelpString(self, int id) -> String"""
8355 return _core_.Menu_GetHelpString(*args, **kwargs)
8356
8357 def SetTitle(*args, **kwargs):
8358 """SetTitle(self, String title)"""
8359 return _core_.Menu_SetTitle(*args, **kwargs)
8360
8361 def GetTitle(*args, **kwargs):
8362 """GetTitle(self) -> String"""
8363 return _core_.Menu_GetTitle(*args, **kwargs)
8364
8365 def SetEventHandler(*args, **kwargs):
8366 """SetEventHandler(self, EvtHandler handler)"""
8367 return _core_.Menu_SetEventHandler(*args, **kwargs)
8368
8369 def GetEventHandler(*args, **kwargs):
8370 """GetEventHandler(self) -> EvtHandler"""
8371 return _core_.Menu_GetEventHandler(*args, **kwargs)
8372
8373 def SetInvokingWindow(*args, **kwargs):
8374 """SetInvokingWindow(self, Window win)"""
8375 return _core_.Menu_SetInvokingWindow(*args, **kwargs)
8376
8377 def GetInvokingWindow(*args, **kwargs):
8378 """GetInvokingWindow(self) -> Window"""
8379 return _core_.Menu_GetInvokingWindow(*args, **kwargs)
8380
8381 def GetStyle(*args, **kwargs):
8382 """GetStyle(self) -> long"""
8383 return _core_.Menu_GetStyle(*args, **kwargs)
8384
8385 def UpdateUI(*args, **kwargs):
8386 """UpdateUI(self, EvtHandler source=None)"""
8387 return _core_.Menu_UpdateUI(*args, **kwargs)
8388
8389 def GetMenuBar(*args, **kwargs):
8390 """GetMenuBar(self) -> MenuBar"""
8391 return _core_.Menu_GetMenuBar(*args, **kwargs)
8392
8393 def Attach(*args, **kwargs):
8394 """Attach(self, wxMenuBarBase menubar)"""
8395 return _core_.Menu_Attach(*args, **kwargs)
8396
8397 def Detach(*args, **kwargs):
8398 """Detach(self)"""
8399 return _core_.Menu_Detach(*args, **kwargs)
8400
8401 def IsAttached(*args, **kwargs):
8402 """IsAttached(self) -> bool"""
8403 return _core_.Menu_IsAttached(*args, **kwargs)
8404
8405 def SetParent(*args, **kwargs):
8406 """SetParent(self, Menu parent)"""
8407 return _core_.Menu_SetParent(*args, **kwargs)
8408
8409 def GetParent(*args, **kwargs):
8410 """GetParent(self) -> Menu"""
8411 return _core_.Menu_GetParent(*args, **kwargs)
8412
8413
8414 class MenuPtr(Menu):
8415 def __init__(self, this):
8416 self.this = this
8417 if not hasattr(self,"thisown"): self.thisown = 0
8418 self.__class__ = Menu
8419 _core_.Menu_swigregister(MenuPtr)
8420 DefaultValidator = cvar.DefaultValidator
8421
8422 #---------------------------------------------------------------------------
8423
8424 class MenuBar(Window):
8425 """Proxy of C++ MenuBar class"""
8426 def __repr__(self):
8427 return "<%s.%s; proxy of C++ wxMenuBar instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
8428 def __init__(self, *args, **kwargs):
8429 """__init__(self, long style=0) -> MenuBar"""
8430 newobj = _core_.new_MenuBar(*args, **kwargs)
8431 self.this = newobj.this
8432 self.thisown = 1
8433 del newobj.thisown
8434 self._setOORInfo(self)
8435
8436 def Append(*args, **kwargs):
8437 """Append(self, Menu menu, String title) -> bool"""
8438 return _core_.MenuBar_Append(*args, **kwargs)
8439
8440 def Insert(*args, **kwargs):
8441 """Insert(self, size_t pos, Menu menu, String title) -> bool"""
8442 return _core_.MenuBar_Insert(*args, **kwargs)
8443
8444 def GetMenuCount(*args, **kwargs):
8445 """GetMenuCount(self) -> size_t"""
8446 return _core_.MenuBar_GetMenuCount(*args, **kwargs)
8447
8448 def GetMenu(*args, **kwargs):
8449 """GetMenu(self, size_t pos) -> Menu"""
8450 return _core_.MenuBar_GetMenu(*args, **kwargs)
8451
8452 def Replace(*args, **kwargs):
8453 """Replace(self, size_t pos, Menu menu, String title) -> Menu"""
8454 return _core_.MenuBar_Replace(*args, **kwargs)
8455
8456 def Remove(*args, **kwargs):
8457 """Remove(self, size_t pos) -> Menu"""
8458 return _core_.MenuBar_Remove(*args, **kwargs)
8459
8460 def EnableTop(*args, **kwargs):
8461 """EnableTop(self, size_t pos, bool enable)"""
8462 return _core_.MenuBar_EnableTop(*args, **kwargs)
8463
8464 def IsEnabledTop(*args, **kwargs):
8465 """IsEnabledTop(self, size_t pos) -> bool"""
8466 return _core_.MenuBar_IsEnabledTop(*args, **kwargs)
8467
8468 def SetLabelTop(*args, **kwargs):
8469 """SetLabelTop(self, size_t pos, String label)"""
8470 return _core_.MenuBar_SetLabelTop(*args, **kwargs)
8471
8472 def GetLabelTop(*args, **kwargs):
8473 """GetLabelTop(self, size_t pos) -> String"""
8474 return _core_.MenuBar_GetLabelTop(*args, **kwargs)
8475
8476 def FindMenuItem(*args, **kwargs):
8477 """FindMenuItem(self, String menu, String item) -> int"""
8478 return _core_.MenuBar_FindMenuItem(*args, **kwargs)
8479
8480 def FindItemById(*args, **kwargs):
8481 """FindItemById(self, int id) -> MenuItem"""
8482 return _core_.MenuBar_FindItemById(*args, **kwargs)
8483
8484 def FindMenu(*args, **kwargs):
8485 """FindMenu(self, String title) -> int"""
8486 return _core_.MenuBar_FindMenu(*args, **kwargs)
8487
8488 def Enable(*args, **kwargs):
8489 """Enable(self, int id, bool enable)"""
8490 return _core_.MenuBar_Enable(*args, **kwargs)
8491
8492 def Check(*args, **kwargs):
8493 """Check(self, int id, bool check)"""
8494 return _core_.MenuBar_Check(*args, **kwargs)
8495
8496 def IsChecked(*args, **kwargs):
8497 """IsChecked(self, int id) -> bool"""
8498 return _core_.MenuBar_IsChecked(*args, **kwargs)
8499
8500 def IsEnabled(*args, **kwargs):
8501 """IsEnabled(self, int id) -> bool"""
8502 return _core_.MenuBar_IsEnabled(*args, **kwargs)
8503
8504 def SetLabel(*args, **kwargs):
8505 """SetLabel(self, int id, String label)"""
8506 return _core_.MenuBar_SetLabel(*args, **kwargs)
8507
8508 def GetLabel(*args, **kwargs):
8509 """GetLabel(self, int id) -> String"""
8510 return _core_.MenuBar_GetLabel(*args, **kwargs)
8511
8512 def SetHelpString(*args, **kwargs):
8513 """SetHelpString(self, int id, String helpString)"""
8514 return _core_.MenuBar_SetHelpString(*args, **kwargs)
8515
8516 def GetHelpString(*args, **kwargs):
8517 """GetHelpString(self, int id) -> String"""
8518 return _core_.MenuBar_GetHelpString(*args, **kwargs)
8519
8520 def GetFrame(*args, **kwargs):
8521 """GetFrame(self) -> wxFrame"""
8522 return _core_.MenuBar_GetFrame(*args, **kwargs)
8523
8524 def IsAttached(*args, **kwargs):
8525 """IsAttached(self) -> bool"""
8526 return _core_.MenuBar_IsAttached(*args, **kwargs)
8527
8528 def Attach(*args, **kwargs):
8529 """Attach(self, wxFrame frame)"""
8530 return _core_.MenuBar_Attach(*args, **kwargs)
8531
8532 def Detach(*args, **kwargs):
8533 """Detach(self)"""
8534 return _core_.MenuBar_Detach(*args, **kwargs)
8535
8536
8537 class MenuBarPtr(MenuBar):
8538 def __init__(self, this):
8539 self.this = this
8540 if not hasattr(self,"thisown"): self.thisown = 0
8541 self.__class__ = MenuBar
8542 _core_.MenuBar_swigregister(MenuBarPtr)
8543
8544 #---------------------------------------------------------------------------
8545
8546 class MenuItem(Object):
8547 """Proxy of C++ MenuItem class"""
8548 def __repr__(self):
8549 return "<%s.%s; proxy of C++ wxMenuItem instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
8550 def __init__(self, *args, **kwargs):
8551 """
8552 __init__(self, Menu parentMenu=None, int id=ID_ANY, String text=EmptyString,
8553 String help=EmptyString, int kind=ITEM_NORMAL,
8554 Menu subMenu=None) -> MenuItem
8555 """
8556 newobj = _core_.new_MenuItem(*args, **kwargs)
8557 self.this = newobj.this
8558 self.thisown = 1
8559 del newobj.thisown
8560 def GetMenu(*args, **kwargs):
8561 """GetMenu(self) -> Menu"""
8562 return _core_.MenuItem_GetMenu(*args, **kwargs)
8563
8564 def SetMenu(*args, **kwargs):
8565 """SetMenu(self, Menu menu)"""
8566 return _core_.MenuItem_SetMenu(*args, **kwargs)
8567
8568 def SetId(*args, **kwargs):
8569 """SetId(self, int id)"""
8570 return _core_.MenuItem_SetId(*args, **kwargs)
8571
8572 def GetId(*args, **kwargs):
8573 """GetId(self) -> int"""
8574 return _core_.MenuItem_GetId(*args, **kwargs)
8575
8576 def IsSeparator(*args, **kwargs):
8577 """IsSeparator(self) -> bool"""
8578 return _core_.MenuItem_IsSeparator(*args, **kwargs)
8579
8580 def SetText(*args, **kwargs):
8581 """SetText(self, String str)"""
8582 return _core_.MenuItem_SetText(*args, **kwargs)
8583
8584 def GetLabel(*args, **kwargs):
8585 """GetLabel(self) -> String"""
8586 return _core_.MenuItem_GetLabel(*args, **kwargs)
8587
8588 def GetText(*args, **kwargs):
8589 """GetText(self) -> String"""
8590 return _core_.MenuItem_GetText(*args, **kwargs)
8591
8592 def GetLabelFromText(*args, **kwargs):
8593 """GetLabelFromText(String text) -> String"""
8594 return _core_.MenuItem_GetLabelFromText(*args, **kwargs)
8595
8596 GetLabelFromText = staticmethod(GetLabelFromText)
8597 def GetKind(*args, **kwargs):
8598 """GetKind(self) -> int"""
8599 return _core_.MenuItem_GetKind(*args, **kwargs)
8600
8601 def SetKind(*args, **kwargs):
8602 """SetKind(self, int kind)"""
8603 return _core_.MenuItem_SetKind(*args, **kwargs)
8604
8605 def SetCheckable(*args, **kwargs):
8606 """SetCheckable(self, bool checkable)"""
8607 return _core_.MenuItem_SetCheckable(*args, **kwargs)
8608
8609 def IsCheckable(*args, **kwargs):
8610 """IsCheckable(self) -> bool"""
8611 return _core_.MenuItem_IsCheckable(*args, **kwargs)
8612
8613 def IsSubMenu(*args, **kwargs):
8614 """IsSubMenu(self) -> bool"""
8615 return _core_.MenuItem_IsSubMenu(*args, **kwargs)
8616
8617 def SetSubMenu(*args, **kwargs):
8618 """SetSubMenu(self, Menu menu)"""
8619 return _core_.MenuItem_SetSubMenu(*args, **kwargs)
8620
8621 def GetSubMenu(*args, **kwargs):
8622 """GetSubMenu(self) -> Menu"""
8623 return _core_.MenuItem_GetSubMenu(*args, **kwargs)
8624
8625 def Enable(*args, **kwargs):
8626 """Enable(self, bool enable=True)"""
8627 return _core_.MenuItem_Enable(*args, **kwargs)
8628
8629 def IsEnabled(*args, **kwargs):
8630 """IsEnabled(self) -> bool"""
8631 return _core_.MenuItem_IsEnabled(*args, **kwargs)
8632
8633 def Check(*args, **kwargs):
8634 """Check(self, bool check=True)"""
8635 return _core_.MenuItem_Check(*args, **kwargs)
8636
8637 def IsChecked(*args, **kwargs):
8638 """IsChecked(self) -> bool"""
8639 return _core_.MenuItem_IsChecked(*args, **kwargs)
8640
8641 def Toggle(*args, **kwargs):
8642 """Toggle(self)"""
8643 return _core_.MenuItem_Toggle(*args, **kwargs)
8644
8645 def SetHelp(*args, **kwargs):
8646 """SetHelp(self, String str)"""
8647 return _core_.MenuItem_SetHelp(*args, **kwargs)
8648
8649 def GetHelp(*args, **kwargs):
8650 """GetHelp(self) -> String"""
8651 return _core_.MenuItem_GetHelp(*args, **kwargs)
8652
8653 def GetAccel(*args, **kwargs):
8654 """GetAccel(self) -> AcceleratorEntry"""
8655 return _core_.MenuItem_GetAccel(*args, **kwargs)
8656
8657 def SetAccel(*args, **kwargs):
8658 """SetAccel(self, AcceleratorEntry accel)"""
8659 return _core_.MenuItem_SetAccel(*args, **kwargs)
8660
8661 def SetFont(*args, **kwargs):
8662 """SetFont(self, Font font)"""
8663 return _core_.MenuItem_SetFont(*args, **kwargs)
8664
8665 def GetFont(*args, **kwargs):
8666 """GetFont(self) -> Font"""
8667 return _core_.MenuItem_GetFont(*args, **kwargs)
8668
8669 def SetTextColour(*args, **kwargs):
8670 """SetTextColour(self, Colour colText)"""
8671 return _core_.MenuItem_SetTextColour(*args, **kwargs)
8672
8673 def GetTextColour(*args, **kwargs):
8674 """GetTextColour(self) -> Colour"""
8675 return _core_.MenuItem_GetTextColour(*args, **kwargs)
8676
8677 def SetBackgroundColour(*args, **kwargs):
8678 """SetBackgroundColour(self, Colour colBack)"""
8679 return _core_.MenuItem_SetBackgroundColour(*args, **kwargs)
8680
8681 def GetBackgroundColour(*args, **kwargs):
8682 """GetBackgroundColour(self) -> Colour"""
8683 return _core_.MenuItem_GetBackgroundColour(*args, **kwargs)
8684
8685 def SetBitmaps(*args, **kwargs):
8686 """SetBitmaps(self, Bitmap bmpChecked, Bitmap bmpUnchecked=wxNullBitmap)"""
8687 return _core_.MenuItem_SetBitmaps(*args, **kwargs)
8688
8689 def SetDisabledBitmap(*args, **kwargs):
8690 """SetDisabledBitmap(self, Bitmap bmpDisabled)"""
8691 return _core_.MenuItem_SetDisabledBitmap(*args, **kwargs)
8692
8693 def GetDisabledBitmap(*args, **kwargs):
8694 """GetDisabledBitmap(self) -> Bitmap"""
8695 return _core_.MenuItem_GetDisabledBitmap(*args, **kwargs)
8696
8697 def SetMarginWidth(*args, **kwargs):
8698 """SetMarginWidth(self, int nWidth)"""
8699 return _core_.MenuItem_SetMarginWidth(*args, **kwargs)
8700
8701 def GetMarginWidth(*args, **kwargs):
8702 """GetMarginWidth(self) -> int"""
8703 return _core_.MenuItem_GetMarginWidth(*args, **kwargs)
8704
8705 def GetDefaultMarginWidth(*args, **kwargs):
8706 """GetDefaultMarginWidth() -> int"""
8707 return _core_.MenuItem_GetDefaultMarginWidth(*args, **kwargs)
8708
8709 GetDefaultMarginWidth = staticmethod(GetDefaultMarginWidth)
8710 def IsOwnerDrawn(*args, **kwargs):
8711 """IsOwnerDrawn(self) -> bool"""
8712 return _core_.MenuItem_IsOwnerDrawn(*args, **kwargs)
8713
8714 def SetOwnerDrawn(*args, **kwargs):
8715 """SetOwnerDrawn(self, bool ownerDrawn=True)"""
8716 return _core_.MenuItem_SetOwnerDrawn(*args, **kwargs)
8717
8718 def ResetOwnerDrawn(*args, **kwargs):
8719 """ResetOwnerDrawn(self)"""
8720 return _core_.MenuItem_ResetOwnerDrawn(*args, **kwargs)
8721
8722 def SetBitmap(*args, **kwargs):
8723 """SetBitmap(self, Bitmap bitmap)"""
8724 return _core_.MenuItem_SetBitmap(*args, **kwargs)
8725
8726 def GetBitmap(*args, **kwargs):
8727 """GetBitmap(self) -> Bitmap"""
8728 return _core_.MenuItem_GetBitmap(*args, **kwargs)
8729
8730
8731 class MenuItemPtr(MenuItem):
8732 def __init__(self, this):
8733 self.this = this
8734 if not hasattr(self,"thisown"): self.thisown = 0
8735 self.__class__ = MenuItem
8736 _core_.MenuItem_swigregister(MenuItemPtr)
8737
8738 def MenuItem_GetLabelFromText(*args, **kwargs):
8739 """MenuItem_GetLabelFromText(String text) -> String"""
8740 return _core_.MenuItem_GetLabelFromText(*args, **kwargs)
8741
8742 def MenuItem_GetDefaultMarginWidth(*args, **kwargs):
8743 """MenuItem_GetDefaultMarginWidth() -> int"""
8744 return _core_.MenuItem_GetDefaultMarginWidth(*args, **kwargs)
8745
8746 #---------------------------------------------------------------------------
8747
8748 class Control(Window):
8749 """
8750 This is the base class for a control or 'widget'.
8751
8752 A control is generally a small window which processes user input
8753 and/or displays one or more item of data.
8754 """
8755 def __repr__(self):
8756 return "<%s.%s; proxy of C++ wxControl instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
8757 def __init__(self, *args, **kwargs):
8758 """
8759 __init__(self, Window parent, int id=-1, Point pos=DefaultPosition,
8760 Size size=DefaultSize, long style=0, Validator validator=DefaultValidator,
8761 String name=ControlNameStr) -> Control
8762
8763 Create a Control. Normally you should only call this from a subclass'
8764 __init__ as a plain old wx.Control is not very useful.
8765 """
8766 newobj = _core_.new_Control(*args, **kwargs)
8767 self.this = newobj.this
8768 self.thisown = 1
8769 del newobj.thisown
8770 self._setOORInfo(self)
8771
8772 def Create(*args, **kwargs):
8773 """
8774 Create(self, Window parent, int id=-1, Point pos=DefaultPosition,
8775 Size size=DefaultSize, long style=0, Validator validator=DefaultValidator,
8776 String name=ControlNameStr) -> bool
8777
8778 Do the 2nd phase and create the GUI control.
8779 """
8780 return _core_.Control_Create(*args, **kwargs)
8781
8782 def Command(*args, **kwargs):
8783 """
8784 Command(self, CommandEvent event)
8785
8786 Simulates the effect of the user issuing a command to the item.
8787
8788 :see: `wx.CommandEvent`
8789
8790 """
8791 return _core_.Control_Command(*args, **kwargs)
8792
8793 def GetLabel(*args, **kwargs):
8794 """
8795 GetLabel(self) -> String
8796
8797 Return a control's text.
8798 """
8799 return _core_.Control_GetLabel(*args, **kwargs)
8800
8801 def SetLabel(*args, **kwargs):
8802 """
8803 SetLabel(self, String label)
8804
8805 Sets the item's text.
8806 """
8807 return _core_.Control_SetLabel(*args, **kwargs)
8808
8809 def GetClassDefaultAttributes(*args, **kwargs):
8810 """
8811 GetClassDefaultAttributes(int variant=WINDOW_VARIANT_NORMAL) -> VisualAttributes
8812
8813 Get the default attributes for this class. This is useful if you want
8814 to use the same font or colour in your own control as in a standard
8815 control -- which is a much better idea than hard coding specific
8816 colours or fonts which might look completely out of place on the
8817 user's system, especially if it uses themes.
8818
8819 The variant parameter is only relevant under Mac currently and is
8820 ignore under other platforms. Under Mac, it will change the size of
8821 the returned font. See `wx.Window.SetWindowVariant` for more about
8822 this.
8823 """
8824 return _core_.Control_GetClassDefaultAttributes(*args, **kwargs)
8825
8826 GetClassDefaultAttributes = staticmethod(GetClassDefaultAttributes)
8827
8828 class ControlPtr(Control):
8829 def __init__(self, this):
8830 self.this = this
8831 if not hasattr(self,"thisown"): self.thisown = 0
8832 self.__class__ = Control
8833 _core_.Control_swigregister(ControlPtr)
8834 ControlNameStr = cvar.ControlNameStr
8835
8836 def PreControl(*args, **kwargs):
8837 """
8838 PreControl() -> Control
8839
8840 Precreate a Control control for 2-phase creation
8841 """
8842 val = _core_.new_PreControl(*args, **kwargs)
8843 val.thisown = 1
8844 return val
8845
8846 def Control_GetClassDefaultAttributes(*args, **kwargs):
8847 """
8848 Control_GetClassDefaultAttributes(int variant=WINDOW_VARIANT_NORMAL) -> VisualAttributes
8849
8850 Get the default attributes for this class. This is useful if you want
8851 to use the same font or colour in your own control as in a standard
8852 control -- which is a much better idea than hard coding specific
8853 colours or fonts which might look completely out of place on the
8854 user's system, especially if it uses themes.
8855
8856 The variant parameter is only relevant under Mac currently and is
8857 ignore under other platforms. Under Mac, it will change the size of
8858 the returned font. See `wx.Window.SetWindowVariant` for more about
8859 this.
8860 """
8861 return _core_.Control_GetClassDefaultAttributes(*args, **kwargs)
8862
8863 #---------------------------------------------------------------------------
8864
8865 class ItemContainer(object):
8866 """
8867 wx.ItemContainer defines an interface which is implemented by all
8868 controls which have string subitems, each of which may be selected,
8869 such as `wx.ListBox`, `wx.CheckListBox`, `wx.Choice` as well as
8870 `wx.ComboBox` which implements an extended interface deriving from
8871 this one.
8872
8873 It defines the methods for accessing the control's items and although
8874 each of the derived classes implements them differently, they still
8875 all conform to the same interface.
8876
8877 The items in a wx.ItemContainer have (non empty) string labels and,
8878 optionally, client data associated with them.
8879
8880 """
8881 def __init__(self): raise RuntimeError, "No constructor defined"
8882 def __repr__(self):
8883 return "<%s.%s; proxy of C++ wxItemContainer instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
8884 def Append(*args, **kwargs):
8885 """
8886 Append(self, String item, PyObject clientData=None) -> int
8887
8888 Adds the item to the control, associating the given data with the item
8889 if not None. The return value is the index of the newly added item
8890 which may be different from the last one if the control is sorted (e.g.
8891 has wx.LB_SORT or wx.CB_SORT style).
8892 """
8893 return _core_.ItemContainer_Append(*args, **kwargs)
8894
8895 def AppendItems(*args, **kwargs):
8896 """
8897 AppendItems(self, List strings)
8898
8899 Apend several items at once to the control. Notice that calling this
8900 method may be much faster than appending the items one by one if you
8901 need to add a lot of items.
8902 """
8903 return _core_.ItemContainer_AppendItems(*args, **kwargs)
8904
8905 def Insert(*args, **kwargs):
8906 """
8907 Insert(self, String item, int pos, PyObject clientData=None) -> int
8908
8909 Insert an item into the control before the item at the ``pos`` index,
8910 optionally associating some data object with the item.
8911 """
8912 return _core_.ItemContainer_Insert(*args, **kwargs)
8913
8914 def Clear(*args, **kwargs):
8915 """
8916 Clear(self)
8917
8918 Removes all items from the control.
8919 """
8920 return _core_.ItemContainer_Clear(*args, **kwargs)
8921
8922 def Delete(*args, **kwargs):
8923 """
8924 Delete(self, int n)
8925
8926 Deletes the item at the zero-based index 'n' from the control. Note
8927 that it is an error (signalled by a `wx.PyAssertionError` exception if
8928 enabled) to remove an item with the index negative or greater or equal
8929 than the number of items in the control.
8930 """
8931 return _core_.ItemContainer_Delete(*args, **kwargs)
8932
8933 def GetCount(*args, **kwargs):
8934 """
8935 GetCount(self) -> int
8936
8937 Returns the number of items in the control.
8938 """
8939 return _core_.ItemContainer_GetCount(*args, **kwargs)
8940
8941 def IsEmpty(*args, **kwargs):
8942 """
8943 IsEmpty(self) -> bool
8944
8945 Returns True if the control is empty or False if it has some items.
8946 """
8947 return _core_.ItemContainer_IsEmpty(*args, **kwargs)
8948
8949 def GetString(*args, **kwargs):
8950 """
8951 GetString(self, int n) -> String
8952
8953 Returns the label of the item with the given index.
8954 """
8955 return _core_.ItemContainer_GetString(*args, **kwargs)
8956
8957 def GetStrings(*args, **kwargs):
8958 """GetStrings(self) -> wxArrayString"""
8959 return _core_.ItemContainer_GetStrings(*args, **kwargs)
8960
8961 def SetString(*args, **kwargs):
8962 """
8963 SetString(self, int n, String s)
8964
8965 Sets the label for the given item.
8966 """
8967 return _core_.ItemContainer_SetString(*args, **kwargs)
8968
8969 def FindString(*args, **kwargs):
8970 """
8971 FindString(self, String s) -> int
8972
8973 Finds an item whose label matches the given string. Returns the
8974 zero-based position of the item, or ``wx.NOT_FOUND`` if the string was not
8975 found.
8976 """
8977 return _core_.ItemContainer_FindString(*args, **kwargs)
8978
8979 def Select(*args, **kwargs):
8980 """
8981 Select(self, int n)
8982
8983 Sets the item at index 'n' to be the selected item.
8984 """
8985 return _core_.ItemContainer_Select(*args, **kwargs)
8986
8987 SetSelection = Select
8988 def GetSelection(*args, **kwargs):
8989 """
8990 GetSelection(self) -> int
8991
8992 Returns the index of the selected item or ``wx.NOT_FOUND`` if no item
8993 is selected.
8994 """
8995 return _core_.ItemContainer_GetSelection(*args, **kwargs)
8996
8997 def GetStringSelection(*args, **kwargs):
8998 """
8999 GetStringSelection(self) -> String
9000
9001 Returns the label of the selected item or an empty string if no item
9002 is selected.
9003 """
9004 return _core_.ItemContainer_GetStringSelection(*args, **kwargs)
9005
9006 def GetClientData(*args, **kwargs):
9007 """
9008 GetClientData(self, int n) -> PyObject
9009
9010 Returns the client data associated with the given item, (if any.)
9011 """
9012 return _core_.ItemContainer_GetClientData(*args, **kwargs)
9013
9014 def SetClientData(*args, **kwargs):
9015 """
9016 SetClientData(self, int n, PyObject clientData)
9017
9018 Associate the given client data with the item at position n.
9019 """
9020 return _core_.ItemContainer_SetClientData(*args, **kwargs)
9021
9022
9023 class ItemContainerPtr(ItemContainer):
9024 def __init__(self, this):
9025 self.this = this
9026 if not hasattr(self,"thisown"): self.thisown = 0
9027 self.__class__ = ItemContainer
9028 _core_.ItemContainer_swigregister(ItemContainerPtr)
9029
9030 #---------------------------------------------------------------------------
9031
9032 class ControlWithItems(Control,ItemContainer):
9033 """
9034 wx.ControlWithItems combines the ``wx.ItemContainer`` class with the
9035 wx.Control class, and is used for the base class of various controls
9036 that have items.
9037 """
9038 def __init__(self): raise RuntimeError, "No constructor defined"
9039 def __repr__(self):
9040 return "<%s.%s; proxy of C++ wxControlWithItems instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
9041
9042 class ControlWithItemsPtr(ControlWithItems):
9043 def __init__(self, this):
9044 self.this = this
9045 if not hasattr(self,"thisown"): self.thisown = 0
9046 self.__class__ = ControlWithItems
9047 _core_.ControlWithItems_swigregister(ControlWithItemsPtr)
9048
9049 #---------------------------------------------------------------------------
9050
9051 class SizerItem(Object):
9052 """
9053 The wx.SizerItem class is used to track the position, size and other
9054 attributes of each item managed by a `wx.Sizer`. In normal usage user
9055 code should never need to deal directly with a wx.SizerItem, but
9056 custom classes derived from `wx.PySizer` will probably need to use the
9057 collection of wx.SizerItems held by wx.Sizer when calculating layout.
9058
9059 :see: `wx.Sizer`, `wx.GBSizerItem`
9060 """
9061 def __repr__(self):
9062 return "<%s.%s; proxy of C++ wxSizerItem instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
9063 def __init__(self, *args, **kwargs):
9064 """
9065 __init__(self) -> SizerItem
9066
9067 Constructs an empty wx.SizerItem. Either a window, sizer or spacer
9068 size will need to be set before this item can be used in a Sizer.
9069
9070 You will probably never need to create a wx.SizerItem directly as they
9071 are created automatically when the sizer's Add, Insert or Prepend
9072 methods are called.
9073
9074 :see: `wx.SizerItemSpacer`, `wx.SizerItemWindow`, `wx.SizerItemSizer`
9075 """
9076 newobj = _core_.new_SizerItem(*args, **kwargs)
9077 self.this = newobj.this
9078 self.thisown = 1
9079 del newobj.thisown
9080 def DeleteWindows(*args, **kwargs):
9081 """
9082 DeleteWindows(self)
9083
9084 Destroy the window or the windows in a subsizer, depending on the type
9085 of item.
9086 """
9087 return _core_.SizerItem_DeleteWindows(*args, **kwargs)
9088
9089 def DetachSizer(*args, **kwargs):
9090 """
9091 DetachSizer(self)
9092
9093 Enable deleting the SizerItem without destroying the contained sizer.
9094 """
9095 return _core_.SizerItem_DetachSizer(*args, **kwargs)
9096
9097 def GetSize(*args, **kwargs):
9098 """
9099 GetSize(self) -> Size
9100
9101 Get the current size of the item, as set in the last Layout.
9102 """
9103 return _core_.SizerItem_GetSize(*args, **kwargs)
9104
9105 def CalcMin(*args, **kwargs):
9106 """
9107 CalcMin(self) -> Size
9108
9109 Calculates the minimum desired size for the item, including any space
9110 needed by borders.
9111 """
9112 return _core_.SizerItem_CalcMin(*args, **kwargs)
9113
9114 def SetDimension(*args, **kwargs):
9115 """
9116 SetDimension(self, Point pos, Size size)
9117
9118 Set the position and size of the space allocated for this item by the
9119 sizer, and adjust the position and size of the item (window or
9120 subsizer) to be within that space taking alignment and borders into
9121 account.
9122 """
9123 return _core_.SizerItem_SetDimension(*args, **kwargs)
9124
9125 def GetMinSize(*args, **kwargs):
9126 """
9127 GetMinSize(self) -> Size
9128
9129 Get the minimum size needed for the item.
9130 """
9131 return _core_.SizerItem_GetMinSize(*args, **kwargs)
9132
9133 def GetMinSizeWithBorder(*args, **kwargs):
9134 """
9135 GetMinSizeWithBorder(self) -> Size
9136
9137 Get the minimum size needed for the item with space for the borders
9138 added, if needed.
9139 """
9140 return _core_.SizerItem_GetMinSizeWithBorder(*args, **kwargs)
9141
9142 def SetInitSize(*args, **kwargs):
9143 """SetInitSize(self, int x, int y)"""
9144 return _core_.SizerItem_SetInitSize(*args, **kwargs)
9145
9146 def SetRatioWH(*args, **kwargs):
9147 """
9148 SetRatioWH(self, int width, int height)
9149
9150 Set the ratio item attribute.
9151 """
9152 return _core_.SizerItem_SetRatioWH(*args, **kwargs)
9153
9154 def SetRatioSize(*args, **kwargs):
9155 """
9156 SetRatioSize(self, Size size)
9157
9158 Set the ratio item attribute.
9159 """
9160 return _core_.SizerItem_SetRatioSize(*args, **kwargs)
9161
9162 def SetRatio(*args, **kwargs):
9163 """
9164 SetRatio(self, float ratio)
9165
9166 Set the ratio item attribute.
9167 """
9168 return _core_.SizerItem_SetRatio(*args, **kwargs)
9169
9170 def GetRatio(*args, **kwargs):
9171 """
9172 GetRatio(self) -> float
9173
9174 Set the ratio item attribute.
9175 """
9176 return _core_.SizerItem_GetRatio(*args, **kwargs)
9177
9178 def GetRect(*args, **kwargs):
9179 """
9180 GetRect(self) -> Rect
9181
9182 Returns the rectangle that the sizer item should occupy
9183 """
9184 return _core_.SizerItem_GetRect(*args, **kwargs)
9185
9186 def IsWindow(*args, **kwargs):
9187 """
9188 IsWindow(self) -> bool
9189
9190 Is this sizer item a window?
9191 """
9192 return _core_.SizerItem_IsWindow(*args, **kwargs)
9193
9194 def IsSizer(*args, **kwargs):
9195 """
9196 IsSizer(self) -> bool
9197
9198 Is this sizer item a subsizer?
9199 """
9200 return _core_.SizerItem_IsSizer(*args, **kwargs)
9201
9202 def IsSpacer(*args, **kwargs):
9203 """
9204 IsSpacer(self) -> bool
9205
9206 Is this sizer item a spacer?
9207 """
9208 return _core_.SizerItem_IsSpacer(*args, **kwargs)
9209
9210 def SetProportion(*args, **kwargs):
9211 """
9212 SetProportion(self, int proportion)
9213
9214 Set the proportion value for this item.
9215 """
9216 return _core_.SizerItem_SetProportion(*args, **kwargs)
9217
9218 def GetProportion(*args, **kwargs):
9219 """
9220 GetProportion(self) -> int
9221
9222 Get the proportion value for this item.
9223 """
9224 return _core_.SizerItem_GetProportion(*args, **kwargs)
9225
9226 SetOption = wx._deprecated(SetProportion, "Please use `SetProportion` instead.")
9227 GetOption = wx._deprecated(GetProportion, "Please use `GetProportion` instead.")
9228 def SetFlag(*args, **kwargs):
9229 """
9230 SetFlag(self, int flag)
9231
9232 Set the flag value for this item.
9233 """
9234 return _core_.SizerItem_SetFlag(*args, **kwargs)
9235
9236 def GetFlag(*args, **kwargs):
9237 """
9238 GetFlag(self) -> int
9239
9240 Get the flag value for this item.
9241 """
9242 return _core_.SizerItem_GetFlag(*args, **kwargs)
9243
9244 def SetBorder(*args, **kwargs):
9245 """
9246 SetBorder(self, int border)
9247
9248 Set the border value for this item.
9249 """
9250 return _core_.SizerItem_SetBorder(*args, **kwargs)
9251
9252 def GetBorder(*args, **kwargs):
9253 """
9254 GetBorder(self) -> int
9255
9256 Get the border value for this item.
9257 """
9258 return _core_.SizerItem_GetBorder(*args, **kwargs)
9259
9260 def GetWindow(*args, **kwargs):
9261 """
9262 GetWindow(self) -> Window
9263
9264 Get the window (if any) that is managed by this sizer item.
9265 """
9266 return _core_.SizerItem_GetWindow(*args, **kwargs)
9267
9268 def SetWindow(*args, **kwargs):
9269 """
9270 SetWindow(self, Window window)
9271
9272 Set the window to be managed by this sizer item.
9273 """
9274 return _core_.SizerItem_SetWindow(*args, **kwargs)
9275
9276 def GetSizer(*args, **kwargs):
9277 """
9278 GetSizer(self) -> Sizer
9279
9280 Get the subsizer (if any) that is managed by this sizer item.
9281 """
9282 return _core_.SizerItem_GetSizer(*args, **kwargs)
9283
9284 def SetSizer(*args, **kwargs):
9285 """
9286 SetSizer(self, Sizer sizer)
9287
9288 Set the subsizer to be managed by this sizer item.
9289 """
9290 return _core_.SizerItem_SetSizer(*args, **kwargs)
9291
9292 def GetSpacer(*args, **kwargs):
9293 """
9294 GetSpacer(self) -> Size
9295
9296 Get the size of the spacer managed by this sizer item.
9297 """
9298 return _core_.SizerItem_GetSpacer(*args, **kwargs)
9299
9300 def SetSpacer(*args, **kwargs):
9301 """
9302 SetSpacer(self, Size size)
9303
9304 Set the size of the spacer to be managed by this sizer item.
9305 """
9306 return _core_.SizerItem_SetSpacer(*args, **kwargs)
9307
9308 def Show(*args, **kwargs):
9309 """
9310 Show(self, bool show)
9311
9312 Set the show item attribute, which sizers use to determine if the item
9313 is to be made part of the layout or not. If the item is tracking a
9314 window then it is shown or hidden as needed.
9315 """
9316 return _core_.SizerItem_Show(*args, **kwargs)
9317
9318 def IsShown(*args, **kwargs):
9319 """
9320 IsShown(self) -> bool
9321
9322 Is the item to be shown in the layout?
9323 """
9324 return _core_.SizerItem_IsShown(*args, **kwargs)
9325
9326 def GetPosition(*args, **kwargs):
9327 """
9328 GetPosition(self) -> Point
9329
9330 Returns the current position of the item, as set in the last Layout.
9331 """
9332 return _core_.SizerItem_GetPosition(*args, **kwargs)
9333
9334 def GetUserData(*args, **kwargs):
9335 """
9336 GetUserData(self) -> PyObject
9337
9338 Returns the userData associated with this sizer item, or None if there
9339 isn't any.
9340 """
9341 return _core_.SizerItem_GetUserData(*args, **kwargs)
9342
9343
9344 class SizerItemPtr(SizerItem):
9345 def __init__(self, this):
9346 self.this = this
9347 if not hasattr(self,"thisown"): self.thisown = 0
9348 self.__class__ = SizerItem
9349 _core_.SizerItem_swigregister(SizerItemPtr)
9350
9351 def SizerItemWindow(*args, **kwargs):
9352 """
9353 SizerItemWindow(Window window, int proportion, int flag, int border,
9354 PyObject userData=None) -> SizerItem
9355
9356 Constructs a `wx.SizerItem` for tracking a window.
9357 """
9358 val = _core_.new_SizerItemWindow(*args, **kwargs)
9359 val.thisown = 1
9360 return val
9361
9362 def SizerItemSpacer(*args, **kwargs):
9363 """
9364 SizerItemSpacer(int width, int height, int proportion, int flag, int border,
9365 PyObject userData=None) -> SizerItem
9366
9367 Constructs a `wx.SizerItem` for tracking a spacer.
9368 """
9369 val = _core_.new_SizerItemSpacer(*args, **kwargs)
9370 val.thisown = 1
9371 return val
9372
9373 def SizerItemSizer(*args, **kwargs):
9374 """
9375 SizerItemSizer(Sizer sizer, int proportion, int flag, int border,
9376 PyObject userData=None) -> SizerItem
9377
9378 Constructs a `wx.SizerItem` for tracking a subsizer
9379 """
9380 val = _core_.new_SizerItemSizer(*args, **kwargs)
9381 val.thisown = 1
9382 return val
9383
9384 class Sizer(Object):
9385 """
9386 wx.Sizer is the abstract base class used for laying out subwindows in
9387 a window. You cannot use wx.Sizer directly; instead, you will have to
9388 use one of the sizer classes derived from it such as `wx.BoxSizer`,
9389 `wx.StaticBoxSizer`, `wx.NotebookSizer`, `wx.GridSizer`, `wx.FlexGridSizer`
9390 and `wx.GridBagSizer`.
9391
9392 The concept implemented by sizers in wxWidgets is closely related to
9393 layout tools in other GUI toolkits, such as Java's AWT, the GTK
9394 toolkit or the Qt toolkit. It is based upon the idea of the individual
9395 subwindows reporting their minimal required size and their ability to
9396 get stretched if the size of the parent window has changed. This will
9397 most often mean that the programmer does not set the original size of
9398 a dialog in the beginning, rather the dialog will assigned a sizer and
9399 this sizer will be queried about the recommended size. The sizer in
9400 turn will query its children, which can be normal windows or contorls,
9401 empty space or other sizers, so that a hierarchy of sizers can be
9402 constructed. Note that wxSizer does not derive from wxWindow and thus
9403 do not interfere with tab ordering and requires very little resources
9404 compared to a real window on screen.
9405
9406 What makes sizers so well fitted for use in wxWidgets is the fact that
9407 every control reports its own minimal size and the algorithm can
9408 handle differences in font sizes or different window (dialog item)
9409 sizes on different platforms without problems. If for example the
9410 standard font as well as the overall design of Mac widgets requires
9411 more space than on Windows, then the initial size of a dialog using a
9412 sizer will automatically be bigger on Mac than on Windows.
9413 """
9414 def __init__(self): raise RuntimeError, "No constructor defined"
9415 def __repr__(self):
9416 return "<%s.%s; proxy of C++ wxSizer instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
9417 def _setOORInfo(*args, **kwargs):
9418 """_setOORInfo(self, PyObject _self)"""
9419 return _core_.Sizer__setOORInfo(*args, **kwargs)
9420
9421 def Add(*args, **kwargs):
9422 """
9423 Add(self, item, int proportion=0, int flag=0, int border=0,
9424 PyObject userData=None) -> wx.SizerItem
9425
9426 Appends a child item to the sizer.
9427 """
9428 return _core_.Sizer_Add(*args, **kwargs)
9429
9430 def Insert(*args, **kwargs):
9431 """
9432 Insert(self, int before, item, int proportion=0, int flag=0, int border=0,
9433 PyObject userData=None) -> wx.SizerItem
9434
9435 Inserts a new item into the list of items managed by this sizer before
9436 the item at index *before*. See `Add` for a description of the parameters.
9437 """
9438 return _core_.Sizer_Insert(*args, **kwargs)
9439
9440 def Prepend(*args, **kwargs):
9441 """
9442 Prepend(self, item, int proportion=0, int flag=0, int border=0,
9443 PyObject userData=None) -> wx.SizerItem
9444
9445 Adds a new item to the begining of the list of sizer items managed by
9446 this sizer. See `Add` for a description of the parameters.
9447 """
9448 return _core_.Sizer_Prepend(*args, **kwargs)
9449
9450 def Remove(*args, **kwargs):
9451 """
9452 Remove(self, item) -> bool
9453
9454 Removes an item from the sizer and destroys it. This method does not
9455 cause any layout or resizing to take place, call `Layout` to update
9456 the layout on screen after removing a child from the sizer. The
9457 *item* parameter can be either a window, a sizer, or the zero-based
9458 index of an item to remove. Returns True if the child item was found
9459 and removed.
9460 """
9461 return _core_.Sizer_Remove(*args, **kwargs)
9462
9463 def Detach(*args, **kwargs):
9464 """
9465 Detach(self, item) -> bool
9466
9467 Detaches an item from the sizer without destroying it. This method
9468 does not cause any layout or resizing to take place, call `Layout` to
9469 do so. The *item* parameter can be either a window, a sizer, or the
9470 zero-based index of the item to be detached. Returns True if the child item
9471 was found and detached.
9472 """
9473 return _core_.Sizer_Detach(*args, **kwargs)
9474
9475 def GetItem(*args, **kwargs):
9476 """
9477 GetItem(self, item) -> wx.SizerItem
9478
9479 Returns the `wx.SizerItem` which holds the *item* given. The *item*
9480 parameter can be either a window, a sizer, or the zero-based index of
9481 the item to be detached.
9482 """
9483 return _core_.Sizer_GetItem(*args, **kwargs)
9484
9485 def _SetItemMinSize(*args, **kwargs):
9486 """_SetItemMinSize(self, PyObject item, Size size)"""
9487 return _core_.Sizer__SetItemMinSize(*args, **kwargs)
9488
9489 def SetItemMinSize(self, item, *args):
9490 """
9491 SetItemMinSize(self, item, Size size)
9492
9493 Sets the minimum size that will be allocated for an item in the sizer.
9494 The *item* parameter can be either a window, a sizer, or the
9495 zero-based index of the item. If a window or sizer is given then it
9496 will be searched for recursivly in subsizers if neccessary.
9497 """
9498 if len(args) == 2:
9499 # for backward compatibility accept separate width,height args too
9500 return self._SetItemMinSize(item, args)
9501 else:
9502 return self._SetItemMinSize(item, args[0])
9503
9504 def AddItem(*args, **kwargs):
9505 """
9506 AddItem(self, SizerItem item)
9507
9508 Adds a `wx.SizerItem` to the sizer.
9509 """
9510 return _core_.Sizer_AddItem(*args, **kwargs)
9511
9512 def InsertItem(*args, **kwargs):
9513 """
9514 InsertItem(self, int index, SizerItem item)
9515
9516 Inserts a `wx.SizerItem` to the sizer at the position given by *index*.
9517 """
9518 return _core_.Sizer_InsertItem(*args, **kwargs)
9519
9520 def PrependItem(*args, **kwargs):
9521 """
9522 PrependItem(self, SizerItem item)
9523
9524 Prepends a `wx.SizerItem` to the sizer.
9525 """
9526 return _core_.Sizer_PrependItem(*args, **kwargs)
9527
9528 def AddMany(self, items):
9529 """
9530 AddMany is a convenience method for adding several items
9531 to a sizer at one time. Simply pass it a list of tuples,
9532 where each tuple consists of the parameters that you
9533 would normally pass to the `Add` method.
9534 """
9535 for item in items:
9536 if type(item) != type(()) or (len(item) == 2 and type(item[0]) == type(1)):
9537 item = (item, )
9538 self.Add(*item)
9539
9540 # for backwards compatibility only, please do not use in new code
9541 AddWindow = wx._deprecated(Add, "AddWindow is deprecated, use `Add` instead.")
9542 AddSizer = wx._deprecated(Add, "AddSizer is deprecated, use `Add` instead.")
9543 AddSpacer = wx._deprecated(Add, "AddSpacer is deprecated, use `Add` instead.")
9544 PrependWindow = wx._deprecated(Prepend, "PrependWindow is deprecated, use `Prepend` instead.")
9545 PrependSizer = wx._deprecated(Prepend, "PrependSizer is deprecated, use `Prepend` instead.")
9546 PrependSpacer = wx._deprecated(Prepend, "PrependSpacer is deprecated, use `Prepend` instead.")
9547 InsertWindow = wx._deprecated(Insert, "InsertWindow is deprecated, use `Insert` instead.")
9548 InsertSizer = wx._deprecated(Insert, "InsertSizer is deprecated, use `Insert` instead.")
9549 InsertSpacer = wx._deprecated(Insert, "InsertSpacer is deprecated, use `Insert` instead.")
9550 RemoveWindow = wx._deprecated(Remove, "RemoveWindow is deprecated, use `Remove` instead.")
9551 RemoveSizer = wx._deprecated(Remove, "RemoveSizer is deprecated, use `Remove` instead.")
9552 RemovePos = wx._deprecated(Remove, "RemovePos is deprecated, use `Remove` instead.")
9553
9554
9555 def SetDimension(*args, **kwargs):
9556 """
9557 SetDimension(self, int x, int y, int width, int height)
9558
9559 Call this to force the sizer to take the given dimension and thus
9560 force the items owned by the sizer to resize themselves according to
9561 the rules defined by the parameter in the `Add`, `Insert` or `Prepend`
9562 methods.
9563 """
9564 return _core_.Sizer_SetDimension(*args, **kwargs)
9565
9566 def SetMinSize(*args, **kwargs):
9567 """
9568 SetMinSize(self, Size size)
9569
9570 Call this to give the sizer a minimal size. Normally, the sizer will
9571 calculate its minimal size based purely on how much space its children
9572 need. After calling this method `GetMinSize` will return either the
9573 minimal size as requested by its children or the minimal size set
9574 here, depending on which is bigger.
9575 """
9576 return _core_.Sizer_SetMinSize(*args, **kwargs)
9577
9578 def GetSize(*args, **kwargs):
9579 """
9580 GetSize(self) -> Size
9581
9582 Returns the current size of the space managed by the sizer.
9583 """
9584 return _core_.Sizer_GetSize(*args, **kwargs)
9585
9586 def GetPosition(*args, **kwargs):
9587 """
9588 GetPosition(self) -> Point
9589
9590 Returns the current position of the sizer's managed space.
9591 """
9592 return _core_.Sizer_GetPosition(*args, **kwargs)
9593
9594 def GetMinSize(*args, **kwargs):
9595 """
9596 GetMinSize(self) -> Size
9597
9598 Returns the minimal size of the sizer. This is either the combined
9599 minimal size of all the children and their borders or the minimal size
9600 set by SetMinSize, depending on which is bigger.
9601 """
9602 return _core_.Sizer_GetMinSize(*args, **kwargs)
9603
9604 def GetSizeTuple(self):
9605 return self.GetSize().Get()
9606 def GetPositionTuple(self):
9607 return self.GetPosition().Get()
9608 def GetMinSizeTuple(self):
9609 return self.GetMinSize().Get()
9610
9611 def RecalcSizes(*args, **kwargs):
9612 """
9613 RecalcSizes(self)
9614
9615 Using the sizes calculated by `CalcMin` reposition and resize all the
9616 items managed by this sizer. You should not need to call this directly as
9617 it is called by `Layout`.
9618 """
9619 return _core_.Sizer_RecalcSizes(*args, **kwargs)
9620
9621 def CalcMin(*args, **kwargs):
9622 """
9623 CalcMin(self) -> Size
9624
9625 This method is where the sizer will do the actual calculation of its
9626 children's minimal sizes. You should not need to call this directly as
9627 it is called by `Layout`.
9628 """
9629 return _core_.Sizer_CalcMin(*args, **kwargs)
9630
9631 def Layout(*args, **kwargs):
9632 """
9633 Layout(self)
9634
9635 This method will force the recalculation and layout of the items
9636 controlled by the sizer using the current space allocated to the
9637 sizer. Normally this is called automatically from the owning window's
9638 EVT_SIZE handler, but it is also useful to call it from user code when
9639 one of the items in a sizer change size, or items are added or
9640 removed.
9641 """
9642 return _core_.Sizer_Layout(*args, **kwargs)
9643
9644 def Fit(*args, **kwargs):
9645 """
9646 Fit(self, Window window) -> Size
9647
9648 Tell the sizer to resize the *window* to match the sizer's minimal
9649 size. This is commonly done in the constructor of the window itself in
9650 order to set its initial size to match the needs of the children as
9651 determined by the sizer. Returns the new size.
9652
9653 For a top level window this is the total window size, not the client size.
9654 """
9655 return _core_.Sizer_Fit(*args, **kwargs)
9656
9657 def FitInside(*args, **kwargs):
9658 """
9659 FitInside(self, Window window)
9660
9661 Tell the sizer to resize the *virtual size* of the *window* to match the
9662 sizer's minimal size. This will not alter the on screen size of the
9663 window, but may cause the addition/removal/alteration of scrollbars
9664 required to view the virtual area in windows which manage it.
9665
9666 :see: `wx.ScrolledWindow.SetScrollbars`, `SetVirtualSizeHints`
9667
9668 """
9669 return _core_.Sizer_FitInside(*args, **kwargs)
9670
9671 def SetSizeHints(*args, **kwargs):
9672 """
9673 SetSizeHints(self, Window window)
9674
9675 Tell the sizer to set (and `Fit`) the minimal size of the *window* to
9676 match the sizer's minimal size. This is commonly done in the
9677 constructor of the window itself if the window is resizable (as are
9678 many dialogs under Unix and frames on probably all platforms) in order
9679 to prevent the window from being sized smaller than the minimal size
9680 required by the sizer.
9681 """
9682 return _core_.Sizer_SetSizeHints(*args, **kwargs)
9683
9684 def SetVirtualSizeHints(*args, **kwargs):
9685 """
9686 SetVirtualSizeHints(self, Window window)
9687
9688 Tell the sizer to set the minimal size of the window virtual area to
9689 match the sizer's minimal size. For windows with managed scrollbars
9690 this will set them appropriately.
9691
9692 :see: `wx.ScrolledWindow.SetScrollbars`
9693
9694 """
9695 return _core_.Sizer_SetVirtualSizeHints(*args, **kwargs)
9696
9697 def Clear(*args, **kwargs):
9698 """
9699 Clear(self, bool deleteWindows=False)
9700
9701 Clear all items from the sizer, optionally destroying the window items
9702 as well.
9703 """
9704 return _core_.Sizer_Clear(*args, **kwargs)
9705
9706 def DeleteWindows(*args, **kwargs):
9707 """
9708 DeleteWindows(self)
9709
9710 Destroy all windows managed by the sizer.
9711 """
9712 return _core_.Sizer_DeleteWindows(*args, **kwargs)
9713
9714 def GetChildren(*args, **kwargs):
9715 """
9716 GetChildren(self) -> list
9717
9718 Returns a list of all the `wx.SizerItem` objects managed by the sizer.
9719 """
9720 return _core_.Sizer_GetChildren(*args, **kwargs)
9721
9722 def Show(*args, **kwargs):
9723 """
9724 Show(self, item, bool show=True, bool recursive=false) -> bool
9725
9726 Shows or hides an item managed by the sizer. To make a sizer item
9727 disappear or reappear, use Show followed by `Layout`. The *item*
9728 parameter can be either a window, a sizer, or the zero-based index of
9729 the item. Use the recursive parameter to show or hide an item in a
9730 subsizer. Returns True if the item was found.
9731 """
9732 return _core_.Sizer_Show(*args, **kwargs)
9733
9734 def IsShown(*args, **kwargs):
9735 """
9736 IsShown(self, item)
9737
9738 Determines if the item is currently shown. sizer. To make a sizer
9739 item disappear or reappear, use Show followed by `Layout`. The *item*
9740 parameter can be either a window, a sizer, or the zero-based index of
9741 the item.
9742 """
9743 return _core_.Sizer_IsShown(*args, **kwargs)
9744
9745 def Hide(self, item, recursive=False):
9746 """
9747 A convenience method for Show(item, False, recursive).
9748 """
9749 return self.Show(item, False, recursive)
9750
9751 def ShowItems(*args, **kwargs):
9752 """
9753 ShowItems(self, bool show)
9754
9755 Recursively call `wx.SizerItem.Show` on all sizer items.
9756 """
9757 return _core_.Sizer_ShowItems(*args, **kwargs)
9758
9759
9760 class SizerPtr(Sizer):
9761 def __init__(self, this):
9762 self.this = this
9763 if not hasattr(self,"thisown"): self.thisown = 0
9764 self.__class__ = Sizer
9765 _core_.Sizer_swigregister(SizerPtr)
9766
9767 class PySizer(Sizer):
9768 """
9769 wx.PySizer is a special version of `wx.Sizer` that has been
9770 instrumented to allow the C++ virtual methods to be overloaded in
9771 Python derived classes. You would derive from this class if you are
9772 wanting to implement a custom sizer in Python code. Simply implement
9773 `CalcMin` and `RecalcSizes` in the derived class and you're all set.
9774 For example::
9775
9776 class MySizer(wx.PySizer):
9777 def __init__(self):
9778 wx.PySizer.__init__(self)
9779
9780 def CalcMin(self):
9781 for item in self.GetChildren():
9782 # calculate the total minimum width and height needed
9783 # by all items in the sizer according to this sizer's
9784 # layout algorithm.
9785 ...
9786 return wx.Size(width, height)
9787
9788 def RecalcSizes(self):
9789 # find the space allotted to this sizer
9790 pos = self.GetPosition()
9791 size = self.GetSize()
9792 for item in self.GetChildren():
9793 # Recalculate (if necessary) the position and size of
9794 # each item and then call item.SetDimension to do the
9795 # actual positioning and sizing of the items within the
9796 # space alloted to this sizer.
9797 ...
9798 item.SetDimension(itemPos, itemSize)
9799
9800
9801 When `Layout` is called it first calls `CalcMin` followed by
9802 `RecalcSizes` so you can optimize a bit by saving the results of
9803 `CalcMin` and reusing them in `RecalcSizes`.
9804
9805 :see: `wx.SizerItem`, `wx.Sizer.GetChildren`
9806
9807
9808 """
9809 def __repr__(self):
9810 return "<%s.%s; proxy of C++ wxPySizer instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
9811 def __init__(self, *args, **kwargs):
9812 """
9813 __init__(self) -> PySizer
9814
9815 Creates a wx.PySizer. Must be called from the __init__ in the derived
9816 class.
9817 """
9818 newobj = _core_.new_PySizer(*args, **kwargs)
9819 self.this = newobj.this
9820 self.thisown = 1
9821 del newobj.thisown
9822 self._setCallbackInfo(self, PySizer);self._setOORInfo(self)
9823
9824 def _setCallbackInfo(*args, **kwargs):
9825 """_setCallbackInfo(self, PyObject self, PyObject _class)"""
9826 return _core_.PySizer__setCallbackInfo(*args, **kwargs)
9827
9828
9829 class PySizerPtr(PySizer):
9830 def __init__(self, this):
9831 self.this = this
9832 if not hasattr(self,"thisown"): self.thisown = 0
9833 self.__class__ = PySizer
9834 _core_.PySizer_swigregister(PySizerPtr)
9835
9836 #---------------------------------------------------------------------------
9837
9838 class BoxSizer(Sizer):
9839 """
9840 The basic idea behind a box sizer is that windows will most often be
9841 laid out in rather simple basic geometry, typically in a row or a
9842 column or nested hierarchies of either. A wx.BoxSizer will lay out
9843 its items in a simple row or column, depending on the orientation
9844 parameter passed to the constructor.
9845 """
9846 def __repr__(self):
9847 return "<%s.%s; proxy of C++ wxBoxSizer instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
9848 def __init__(self, *args, **kwargs):
9849 """
9850 __init__(self, int orient=HORIZONTAL) -> BoxSizer
9851
9852 Constructor for a wx.BoxSizer. *orient* may be one of ``wx.VERTICAL``
9853 or ``wx.HORIZONTAL`` for creating either a column sizer or a row
9854 sizer.
9855 """
9856 newobj = _core_.new_BoxSizer(*args, **kwargs)
9857 self.this = newobj.this
9858 self.thisown = 1
9859 del newobj.thisown
9860 self._setOORInfo(self)
9861
9862 def GetOrientation(*args, **kwargs):
9863 """
9864 GetOrientation(self) -> int
9865
9866 Returns the current orientation of the sizer.
9867 """
9868 return _core_.BoxSizer_GetOrientation(*args, **kwargs)
9869
9870 def SetOrientation(*args, **kwargs):
9871 """
9872 SetOrientation(self, int orient)
9873
9874 Resets the orientation of the sizer.
9875 """
9876 return _core_.BoxSizer_SetOrientation(*args, **kwargs)
9877
9878
9879 class BoxSizerPtr(BoxSizer):
9880 def __init__(self, this):
9881 self.this = this
9882 if not hasattr(self,"thisown"): self.thisown = 0
9883 self.__class__ = BoxSizer
9884 _core_.BoxSizer_swigregister(BoxSizerPtr)
9885
9886 #---------------------------------------------------------------------------
9887
9888 class StaticBoxSizer(BoxSizer):
9889 """
9890 wx.StaticBoxSizer derives from and functions identically to the
9891 `wx.BoxSizer` and adds a `wx.StaticBox` around the items that the sizer
9892 manages. Note that this static box must be created separately and
9893 passed to the sizer constructor.
9894 """
9895 def __repr__(self):
9896 return "<%s.%s; proxy of C++ wxStaticBoxSizer instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
9897 def __init__(self, *args, **kwargs):
9898 """
9899 __init__(self, StaticBox box, int orient=HORIZONTAL) -> StaticBoxSizer
9900
9901 Constructor. It takes an associated static box and the orientation
9902 *orient* as parameters - orient can be either of ``wx.VERTICAL`` or
9903 ``wx.HORIZONTAL``.
9904 """
9905 newobj = _core_.new_StaticBoxSizer(*args, **kwargs)
9906 self.this = newobj.this
9907 self.thisown = 1
9908 del newobj.thisown
9909 self._setOORInfo(self)
9910
9911 def GetStaticBox(*args, **kwargs):
9912 """
9913 GetStaticBox(self) -> StaticBox
9914
9915 Returns the static box associated with this sizer.
9916 """
9917 return _core_.StaticBoxSizer_GetStaticBox(*args, **kwargs)
9918
9919
9920 class StaticBoxSizerPtr(StaticBoxSizer):
9921 def __init__(self, this):
9922 self.this = this
9923 if not hasattr(self,"thisown"): self.thisown = 0
9924 self.__class__ = StaticBoxSizer
9925 _core_.StaticBoxSizer_swigregister(StaticBoxSizerPtr)
9926
9927 #---------------------------------------------------------------------------
9928
9929 class GridSizer(Sizer):
9930 """
9931 A grid sizer is a sizer which lays out its children in a
9932 two-dimensional table with all cells having the same size. In other
9933 words, the width of each cell within the grid is the width of the
9934 widest item added to the sizer and the height of each grid cell is the
9935 height of the tallest item. An optional vertical and/or horizontal
9936 gap between items can also be specified (in pixels.)
9937
9938 Items are placed in the cells of the grid in the order they are added,
9939 in row-major order. In other words, the first row is filled first,
9940 then the second, and so on until all items have been added. (If
9941 neccessary, additional rows will be added as items are added.) If you
9942 need to have greater control over the cells that items are placed in
9943 then use the `wx.GridBagSizer`.
9944
9945 """
9946 def __repr__(self):
9947 return "<%s.%s; proxy of C++ wxGridSizer instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
9948 def __init__(self, *args, **kwargs):
9949 """
9950 __init__(self, int rows=1, int cols=0, int vgap=0, int hgap=0) -> GridSizer
9951
9952 Constructor for a wx.GridSizer. *rows* and *cols* determine the number
9953 of columns and rows in the sizer - if either of the parameters is
9954 zero, it will be calculated to from the total number of children in
9955 the sizer, thus making the sizer grow dynamically. *vgap* and *hgap*
9956 define extra space between all children.
9957 """
9958 newobj = _core_.new_GridSizer(*args, **kwargs)
9959 self.this = newobj.this
9960 self.thisown = 1
9961 del newobj.thisown
9962 self._setOORInfo(self)
9963
9964 def SetCols(*args, **kwargs):
9965 """
9966 SetCols(self, int cols)
9967
9968 Sets the number of columns in the sizer.
9969 """
9970 return _core_.GridSizer_SetCols(*args, **kwargs)
9971
9972 def SetRows(*args, **kwargs):
9973 """
9974 SetRows(self, int rows)
9975
9976 Sets the number of rows in the sizer.
9977 """
9978 return _core_.GridSizer_SetRows(*args, **kwargs)
9979
9980 def SetVGap(*args, **kwargs):
9981 """
9982 SetVGap(self, int gap)
9983
9984 Sets the vertical gap (in pixels) between the cells in the sizer.
9985 """
9986 return _core_.GridSizer_SetVGap(*args, **kwargs)
9987
9988 def SetHGap(*args, **kwargs):
9989 """
9990 SetHGap(self, int gap)
9991
9992 Sets the horizontal gap (in pixels) between cells in the sizer
9993 """
9994 return _core_.GridSizer_SetHGap(*args, **kwargs)
9995
9996 def GetCols(*args, **kwargs):
9997 """
9998 GetCols(self) -> int
9999
10000 Returns the number of columns in the sizer.
10001 """
10002 return _core_.GridSizer_GetCols(*args, **kwargs)
10003
10004 def GetRows(*args, **kwargs):
10005 """
10006 GetRows(self) -> int
10007
10008 Returns the number of rows in the sizer.
10009 """
10010 return _core_.GridSizer_GetRows(*args, **kwargs)
10011
10012 def GetVGap(*args, **kwargs):
10013 """
10014 GetVGap(self) -> int
10015
10016 Returns the vertical gap (in pixels) between the cells in the sizer.
10017 """
10018 return _core_.GridSizer_GetVGap(*args, **kwargs)
10019
10020 def GetHGap(*args, **kwargs):
10021 """
10022 GetHGap(self) -> int
10023
10024 Returns the horizontal gap (in pixels) between cells in the sizer.
10025 """
10026 return _core_.GridSizer_GetHGap(*args, **kwargs)
10027
10028
10029 class GridSizerPtr(GridSizer):
10030 def __init__(self, this):
10031 self.this = this
10032 if not hasattr(self,"thisown"): self.thisown = 0
10033 self.__class__ = GridSizer
10034 _core_.GridSizer_swigregister(GridSizerPtr)
10035
10036 #---------------------------------------------------------------------------
10037
10038 FLEX_GROWMODE_NONE = _core_.FLEX_GROWMODE_NONE
10039 FLEX_GROWMODE_SPECIFIED = _core_.FLEX_GROWMODE_SPECIFIED
10040 FLEX_GROWMODE_ALL = _core_.FLEX_GROWMODE_ALL
10041 class FlexGridSizer(GridSizer):
10042 """
10043 A flex grid sizer is a sizer which lays out its children in a
10044 two-dimensional table with all table cells in one row having the same
10045 height and all cells in one column having the same width, but all
10046 rows or all columns are not necessarily the same height or width as in
10047 the `wx.GridSizer`.
10048
10049 wx.FlexGridSizer can also size items equally in one direction but
10050 unequally ("flexibly") in the other. If the sizer is only flexible
10051 in one direction (this can be changed using `SetFlexibleDirection`), it
10052 needs to be decided how the sizer should grow in the other ("non
10053 flexible") direction in order to fill the available space. The
10054 `SetNonFlexibleGrowMode` method serves this purpose.
10055
10056
10057 """
10058 def __repr__(self):
10059 return "<%s.%s; proxy of C++ wxFlexGridSizer instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
10060 def __init__(self, *args, **kwargs):
10061 """
10062 __init__(self, int rows=1, int cols=0, int vgap=0, int hgap=0) -> FlexGridSizer
10063
10064 Constructor for a wx.FlexGridSizer. *rows* and *cols* determine the
10065 number of columns and rows in the sizer - if either of the parameters
10066 is zero, it will be calculated to from the total number of children in
10067 the sizer, thus making the sizer grow dynamically. *vgap* and *hgap*
10068 define extra space between all children.
10069 """
10070 newobj = _core_.new_FlexGridSizer(*args, **kwargs)
10071 self.this = newobj.this
10072 self.thisown = 1
10073 del newobj.thisown
10074 self._setOORInfo(self)
10075
10076 def AddGrowableRow(*args, **kwargs):
10077 """
10078 AddGrowableRow(self, size_t idx, int proportion=0)
10079
10080 Specifies that row *idx* (starting from zero) should be grown if there
10081 is extra space available to the sizer.
10082
10083 The *proportion* parameter has the same meaning as the stretch factor
10084 for the box sizers except that if all proportions are 0, then all
10085 columns are resized equally (instead of not being resized at all).
10086 """
10087 return _core_.FlexGridSizer_AddGrowableRow(*args, **kwargs)
10088
10089 def RemoveGrowableRow(*args, **kwargs):
10090 """
10091 RemoveGrowableRow(self, size_t idx)
10092
10093 Specifies that row *idx* is no longer growable.
10094 """
10095 return _core_.FlexGridSizer_RemoveGrowableRow(*args, **kwargs)
10096
10097 def AddGrowableCol(*args, **kwargs):
10098 """
10099 AddGrowableCol(self, size_t idx, int proportion=0)
10100
10101 Specifies that column *idx* (starting from zero) should be grown if
10102 there is extra space available to the sizer.
10103
10104 The *proportion* parameter has the same meaning as the stretch factor
10105 for the box sizers except that if all proportions are 0, then all
10106 columns are resized equally (instead of not being resized at all).
10107 """
10108 return _core_.FlexGridSizer_AddGrowableCol(*args, **kwargs)
10109
10110 def RemoveGrowableCol(*args, **kwargs):
10111 """
10112 RemoveGrowableCol(self, size_t idx)
10113
10114 Specifies that column *idx* is no longer growable.
10115 """
10116 return _core_.FlexGridSizer_RemoveGrowableCol(*args, **kwargs)
10117
10118 def SetFlexibleDirection(*args, **kwargs):
10119 """
10120 SetFlexibleDirection(self, int direction)
10121
10122 Specifies whether the sizer should flexibly resize its columns, rows,
10123 or both. Argument *direction* can be one of the following values. Any
10124 other value is ignored.
10125
10126 ============== =======================================
10127 wx.VERTICAL Rows are flexibly sized.
10128 wx.HORIZONTAL Columns are flexibly sized.
10129 wx.BOTH Both rows and columns are flexibly sized
10130 (this is the default value).
10131 ============== =======================================
10132
10133 Note that this method does not trigger relayout.
10134
10135 """
10136 return _core_.FlexGridSizer_SetFlexibleDirection(*args, **kwargs)
10137
10138 def GetFlexibleDirection(*args, **kwargs):
10139 """
10140 GetFlexibleDirection(self) -> int
10141
10142 Returns a value that specifies whether the sizer
10143 flexibly resizes its columns, rows, or both (default).
10144
10145 :see: `SetFlexibleDirection`
10146 """
10147 return _core_.FlexGridSizer_GetFlexibleDirection(*args, **kwargs)
10148
10149 def SetNonFlexibleGrowMode(*args, **kwargs):
10150 """
10151 SetNonFlexibleGrowMode(self, int mode)
10152
10153 Specifies how the sizer should grow in the non-flexible direction if
10154 there is one (so `SetFlexibleDirection` must have been called
10155 previously). Argument *mode* can be one of the following values:
10156
10157 ========================== =================================================
10158 wx.FLEX_GROWMODE_NONE Sizer doesn't grow in the non flexible direction.
10159 wx.FLEX_GROWMODE_SPECIFIED Sizer honors growable columns/rows set with
10160 `AddGrowableCol` and `AddGrowableRow`. In this
10161 case equal sizing applies to minimum sizes of
10162 columns or rows (this is the default value).
10163 wx.FLEX_GROWMODE_ALL Sizer equally stretches all columns or rows in
10164 the non flexible direction, whether they are
10165 growable or not in the flexbile direction.
10166 ========================== =================================================
10167
10168 Note that this method does not trigger relayout.
10169
10170
10171 """
10172 return _core_.FlexGridSizer_SetNonFlexibleGrowMode(*args, **kwargs)
10173
10174 def GetNonFlexibleGrowMode(*args, **kwargs):
10175 """
10176 GetNonFlexibleGrowMode(self) -> int
10177
10178 Returns the value that specifies how the sizer grows in the
10179 non-flexible direction if there is one.
10180
10181 :see: `SetNonFlexibleGrowMode`
10182 """
10183 return _core_.FlexGridSizer_GetNonFlexibleGrowMode(*args, **kwargs)
10184
10185 def GetRowHeights(*args, **kwargs):
10186 """
10187 GetRowHeights(self) -> list
10188
10189 Returns a list of integers representing the heights of each of the
10190 rows in the sizer.
10191 """
10192 return _core_.FlexGridSizer_GetRowHeights(*args, **kwargs)
10193
10194 def GetColWidths(*args, **kwargs):
10195 """
10196 GetColWidths(self) -> list
10197
10198 Returns a list of integers representing the widths of each of the
10199 columns in the sizer.
10200 """
10201 return _core_.FlexGridSizer_GetColWidths(*args, **kwargs)
10202
10203
10204 class FlexGridSizerPtr(FlexGridSizer):
10205 def __init__(self, this):
10206 self.this = this
10207 if not hasattr(self,"thisown"): self.thisown = 0
10208 self.__class__ = FlexGridSizer
10209 _core_.FlexGridSizer_swigregister(FlexGridSizerPtr)
10210
10211 class StdDialogButtonSizer(BoxSizer):
10212 """
10213 A special sizer that knows how to order and position standard buttons
10214 in order to conform to the current platform's standards. You simply
10215 need to add each `wx.Button` to the sizer, and be sure to create the
10216 buttons using the standard ID's. Then call `Finalize` and the sizer
10217 will take care of the rest.
10218
10219 """
10220 def __repr__(self):
10221 return "<%s.%s; proxy of C++ wxStdDialogButtonSizer instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
10222 def __init__(self, *args, **kwargs):
10223 """__init__(self) -> StdDialogButtonSizer"""
10224 newobj = _core_.new_StdDialogButtonSizer(*args, **kwargs)
10225 self.this = newobj.this
10226 self.thisown = 1
10227 del newobj.thisown
10228 def AddButton(*args, **kwargs):
10229 """
10230 AddButton(self, wxButton button)
10231
10232 Use this to add the buttons to this sizer. Do not use the `Add`
10233 method in the base class.
10234 """
10235 return _core_.StdDialogButtonSizer_AddButton(*args, **kwargs)
10236
10237 def Finalise(*args, **kwargs):
10238 """
10239 Finalise(self)
10240
10241 This funciton needs to be called after all the buttons have been added
10242 to the sizer. It will reorder them and position them in a platform
10243 specifc manner.
10244 """
10245 return _core_.StdDialogButtonSizer_Finalise(*args, **kwargs)
10246
10247 def SetAffirmativeButton(*args, **kwargs):
10248 """SetAffirmativeButton(self, wxButton button)"""
10249 return _core_.StdDialogButtonSizer_SetAffirmativeButton(*args, **kwargs)
10250
10251 def SetNegativeButton(*args, **kwargs):
10252 """SetNegativeButton(self, wxButton button)"""
10253 return _core_.StdDialogButtonSizer_SetNegativeButton(*args, **kwargs)
10254
10255 def SetCancelButton(*args, **kwargs):
10256 """SetCancelButton(self, wxButton button)"""
10257 return _core_.StdDialogButtonSizer_SetCancelButton(*args, **kwargs)
10258
10259 def GetAffirmativeButton(*args, **kwargs):
10260 """GetAffirmativeButton(self) -> wxButton"""
10261 return _core_.StdDialogButtonSizer_GetAffirmativeButton(*args, **kwargs)
10262
10263 def GetApplyButton(*args, **kwargs):
10264 """GetApplyButton(self) -> wxButton"""
10265 return _core_.StdDialogButtonSizer_GetApplyButton(*args, **kwargs)
10266
10267 def GetNegativeButton(*args, **kwargs):
10268 """GetNegativeButton(self) -> wxButton"""
10269 return _core_.StdDialogButtonSizer_GetNegativeButton(*args, **kwargs)
10270
10271 def GetCancelButton(*args, **kwargs):
10272 """GetCancelButton(self) -> wxButton"""
10273 return _core_.StdDialogButtonSizer_GetCancelButton(*args, **kwargs)
10274
10275 def GetHelpButton(*args, **kwargs):
10276 """GetHelpButton(self) -> wxButton"""
10277 return _core_.StdDialogButtonSizer_GetHelpButton(*args, **kwargs)
10278
10279
10280 class StdDialogButtonSizerPtr(StdDialogButtonSizer):
10281 def __init__(self, this):
10282 self.this = this
10283 if not hasattr(self,"thisown"): self.thisown = 0
10284 self.__class__ = StdDialogButtonSizer
10285 _core_.StdDialogButtonSizer_swigregister(StdDialogButtonSizerPtr)
10286
10287 #---------------------------------------------------------------------------
10288
10289 class GBPosition(object):
10290 """
10291 This class represents the position of an item in a virtual grid of
10292 rows and columns managed by a `wx.GridBagSizer`. wxPython has
10293 typemaps that will automatically convert from a 2-element sequence of
10294 integers to a wx.GBPosition, so you can use the more pythonic
10295 representation of the position nearly transparently in Python code.
10296 """
10297 def __repr__(self):
10298 return "<%s.%s; proxy of C++ wxGBPosition instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
10299 def __init__(self, *args, **kwargs):
10300 """
10301 __init__(self, int row=0, int col=0) -> GBPosition
10302
10303 This class represents the position of an item in a virtual grid of
10304 rows and columns managed by a `wx.GridBagSizer`. wxPython has
10305 typemaps that will automatically convert from a 2-element sequence of
10306 integers to a wx.GBPosition, so you can use the more pythonic
10307 representation of the position nearly transparently in Python code.
10308 """
10309 newobj = _core_.new_GBPosition(*args, **kwargs)
10310 self.this = newobj.this
10311 self.thisown = 1
10312 del newobj.thisown
10313 def GetRow(*args, **kwargs):
10314 """GetRow(self) -> int"""
10315 return _core_.GBPosition_GetRow(*args, **kwargs)
10316
10317 def GetCol(*args, **kwargs):
10318 """GetCol(self) -> int"""
10319 return _core_.GBPosition_GetCol(*args, **kwargs)
10320
10321 def SetRow(*args, **kwargs):
10322 """SetRow(self, int row)"""
10323 return _core_.GBPosition_SetRow(*args, **kwargs)
10324
10325 def SetCol(*args, **kwargs):
10326 """SetCol(self, int col)"""
10327 return _core_.GBPosition_SetCol(*args, **kwargs)
10328
10329 def __eq__(*args, **kwargs):
10330 """__eq__(self, GBPosition other) -> bool"""
10331 return _core_.GBPosition___eq__(*args, **kwargs)
10332
10333 def __ne__(*args, **kwargs):
10334 """__ne__(self, GBPosition other) -> bool"""
10335 return _core_.GBPosition___ne__(*args, **kwargs)
10336
10337 def Set(*args, **kwargs):
10338 """Set(self, int row=0, int col=0)"""
10339 return _core_.GBPosition_Set(*args, **kwargs)
10340
10341 def Get(*args, **kwargs):
10342 """Get(self) -> PyObject"""
10343 return _core_.GBPosition_Get(*args, **kwargs)
10344
10345 asTuple = wx._deprecated(Get, "asTuple is deprecated, use `Get` instead")
10346 def __str__(self): return str(self.Get())
10347 def __repr__(self): return 'wx.GBPosition'+str(self.Get())
10348 def __len__(self): return len(self.Get())
10349 def __getitem__(self, index): return self.Get()[index]
10350 def __setitem__(self, index, val):
10351 if index == 0: self.SetRow(val)
10352 elif index == 1: self.SetCol(val)
10353 else: raise IndexError
10354 def __nonzero__(self): return self.Get() != (0,0)
10355 __safe_for_unpickling__ = True
10356 def __reduce__(self): return (wx.GBPosition, self.Get())
10357
10358 row = property(GetRow, SetRow)
10359 col = property(GetCol, SetCol)
10360
10361
10362 class GBPositionPtr(GBPosition):
10363 def __init__(self, this):
10364 self.this = this
10365 if not hasattr(self,"thisown"): self.thisown = 0
10366 self.__class__ = GBPosition
10367 _core_.GBPosition_swigregister(GBPositionPtr)
10368
10369 class GBSpan(object):
10370 """
10371 This class is used to hold the row and column spanning attributes of
10372 items in a `wx.GridBagSizer`. wxPython has typemaps that will
10373 automatically convert from a 2-element sequence of integers to a
10374 wx.GBSpan, so you can use the more pythonic representation of the span
10375 nearly transparently in Python code.
10376
10377 """
10378 def __repr__(self):
10379 return "<%s.%s; proxy of C++ wxGBSpan instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
10380 def __init__(self, *args, **kwargs):
10381 """
10382 __init__(self, int rowspan=1, int colspan=1) -> GBSpan
10383
10384 Construct a new wxGBSpan, optionally setting the rowspan and
10385 colspan. The default is (1,1). (Meaning that the item occupies one
10386 cell in each direction.
10387 """
10388 newobj = _core_.new_GBSpan(*args, **kwargs)
10389 self.this = newobj.this
10390 self.thisown = 1
10391 del newobj.thisown
10392 def GetRowspan(*args, **kwargs):
10393 """GetRowspan(self) -> int"""
10394 return _core_.GBSpan_GetRowspan(*args, **kwargs)
10395
10396 def GetColspan(*args, **kwargs):
10397 """GetColspan(self) -> int"""
10398 return _core_.GBSpan_GetColspan(*args, **kwargs)
10399
10400 def SetRowspan(*args, **kwargs):
10401 """SetRowspan(self, int rowspan)"""
10402 return _core_.GBSpan_SetRowspan(*args, **kwargs)
10403
10404 def SetColspan(*args, **kwargs):
10405 """SetColspan(self, int colspan)"""
10406 return _core_.GBSpan_SetColspan(*args, **kwargs)
10407
10408 def __eq__(*args, **kwargs):
10409 """__eq__(self, GBSpan other) -> bool"""
10410 return _core_.GBSpan___eq__(*args, **kwargs)
10411
10412 def __ne__(*args, **kwargs):
10413 """__ne__(self, GBSpan other) -> bool"""
10414 return _core_.GBSpan___ne__(*args, **kwargs)
10415
10416 def Set(*args, **kwargs):
10417 """Set(self, int rowspan=1, int colspan=1)"""
10418 return _core_.GBSpan_Set(*args, **kwargs)
10419
10420 def Get(*args, **kwargs):
10421 """Get(self) -> PyObject"""
10422 return _core_.GBSpan_Get(*args, **kwargs)
10423
10424 asTuple = wx._deprecated(Get, "asTuple is deprecated, use `Get` instead")
10425 def __str__(self): return str(self.Get())
10426 def __repr__(self): return 'wx.GBSpan'+str(self.Get())
10427 def __len__(self): return len(self.Get())
10428 def __getitem__(self, index): return self.Get()[index]
10429 def __setitem__(self, index, val):
10430 if index == 0: self.SetRowspan(val)
10431 elif index == 1: self.SetColspan(val)
10432 else: raise IndexError
10433 def __nonzero__(self): return self.Get() != (0,0)
10434 __safe_for_unpickling__ = True
10435 def __reduce__(self): return (wx.GBSpan, self.Get())
10436
10437 rowspan = property(GetRowspan, SetRowspan)
10438 colspan = property(GetColspan, SetColspan)
10439
10440
10441 class GBSpanPtr(GBSpan):
10442 def __init__(self, this):
10443 self.this = this
10444 if not hasattr(self,"thisown"): self.thisown = 0
10445 self.__class__ = GBSpan
10446 _core_.GBSpan_swigregister(GBSpanPtr)
10447
10448 class GBSizerItem(SizerItem):
10449 """
10450 The wx.GBSizerItem class is used to track the additional data about
10451 items in a `wx.GridBagSizer` such as the item's position in the grid
10452 and how many rows or columns it spans.
10453
10454 """
10455 def __repr__(self):
10456 return "<%s.%s; proxy of C++ wxGBSizerItem instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
10457 def __init__(self, *args, **kwargs):
10458 """
10459 __init__(self) -> GBSizerItem
10460
10461 Constructs an empty wx.GBSizerItem. Either a window, sizer or spacer
10462 size will need to be set, as well as a position and span before this
10463 item can be used in a Sizer.
10464
10465 You will probably never need to create a wx.GBSizerItem directly as they
10466 are created automatically when the sizer's Add method is called.
10467 """
10468 newobj = _core_.new_GBSizerItem(*args, **kwargs)
10469 self.this = newobj.this
10470 self.thisown = 1
10471 del newobj.thisown
10472 def GetPos(*args, **kwargs):
10473 """
10474 GetPos(self) -> GBPosition
10475
10476 Get the grid position of the item
10477 """
10478 return _core_.GBSizerItem_GetPos(*args, **kwargs)
10479
10480 def GetPosTuple(self): return self.GetPos().Get()
10481 def GetSpan(*args, **kwargs):
10482 """
10483 GetSpan(self) -> GBSpan
10484
10485 Get the row and column spanning of the item
10486 """
10487 return _core_.GBSizerItem_GetSpan(*args, **kwargs)
10488
10489 def GetSpanTuple(self): return self.GetSpan().Get()
10490 def SetPos(*args, **kwargs):
10491 """
10492 SetPos(self, GBPosition pos) -> bool
10493
10494 If the item is already a member of a sizer then first ensure that
10495 there is no other item that would intersect with this one at the new
10496 position, then set the new position. Returns True if the change is
10497 successful and after the next Layout() the item will be moved.
10498 """
10499 return _core_.GBSizerItem_SetPos(*args, **kwargs)
10500
10501 def SetSpan(*args, **kwargs):
10502 """
10503 SetSpan(self, GBSpan span) -> bool
10504
10505 If the item is already a member of a sizer then first ensure that
10506 there is no other item that would intersect with this one with its new
10507 spanning size, then set the new spanning. Returns True if the change
10508 is successful and after the next Layout() the item will be resized.
10509
10510 """
10511 return _core_.GBSizerItem_SetSpan(*args, **kwargs)
10512
10513 def Intersects(*args, **kwargs):
10514 """
10515 Intersects(self, GBSizerItem other) -> bool
10516
10517 Returns True if this item and the other item instersect.
10518 """
10519 return _core_.GBSizerItem_Intersects(*args, **kwargs)
10520
10521 def IntersectsPos(*args, **kwargs):
10522 """
10523 IntersectsPos(self, GBPosition pos, GBSpan span) -> bool
10524
10525 Returns True if the given pos/span would intersect with this item.
10526 """
10527 return _core_.GBSizerItem_IntersectsPos(*args, **kwargs)
10528
10529 def GetEndPos(*args, **kwargs):
10530 """
10531 GetEndPos(self) -> GBPosition
10532
10533 Get the row and column of the endpoint of this item.
10534 """
10535 return _core_.GBSizerItem_GetEndPos(*args, **kwargs)
10536
10537 def GetGBSizer(*args, **kwargs):
10538 """
10539 GetGBSizer(self) -> GridBagSizer
10540
10541 Get the sizer this item is a member of.
10542 """
10543 return _core_.GBSizerItem_GetGBSizer(*args, **kwargs)
10544
10545 def SetGBSizer(*args, **kwargs):
10546 """
10547 SetGBSizer(self, GridBagSizer sizer)
10548
10549 Set the sizer this item is a member of.
10550 """
10551 return _core_.GBSizerItem_SetGBSizer(*args, **kwargs)
10552
10553
10554 class GBSizerItemPtr(GBSizerItem):
10555 def __init__(self, this):
10556 self.this = this
10557 if not hasattr(self,"thisown"): self.thisown = 0
10558 self.__class__ = GBSizerItem
10559 _core_.GBSizerItem_swigregister(GBSizerItemPtr)
10560 DefaultSpan = cvar.DefaultSpan
10561
10562 def GBSizerItemWindow(*args, **kwargs):
10563 """
10564 GBSizerItemWindow(Window window, GBPosition pos, GBSpan span, int flag,
10565 int border, PyObject userData=None) -> GBSizerItem
10566
10567 Construct a `wx.GBSizerItem` for a window.
10568 """
10569 val = _core_.new_GBSizerItemWindow(*args, **kwargs)
10570 val.thisown = 1
10571 return val
10572
10573 def GBSizerItemSizer(*args, **kwargs):
10574 """
10575 GBSizerItemSizer(Sizer sizer, GBPosition pos, GBSpan span, int flag,
10576 int border, PyObject userData=None) -> GBSizerItem
10577
10578 Construct a `wx.GBSizerItem` for a sizer
10579 """
10580 val = _core_.new_GBSizerItemSizer(*args, **kwargs)
10581 val.thisown = 1
10582 return val
10583
10584 def GBSizerItemSpacer(*args, **kwargs):
10585 """
10586 GBSizerItemSpacer(int width, int height, GBPosition pos, GBSpan span,
10587 int flag, int border, PyObject userData=None) -> GBSizerItem
10588
10589 Construct a `wx.GBSizerItem` for a spacer.
10590 """
10591 val = _core_.new_GBSizerItemSpacer(*args, **kwargs)
10592 val.thisown = 1
10593 return val
10594
10595 class GridBagSizer(FlexGridSizer):
10596 """
10597 A `wx.Sizer` that can lay out items in a virtual grid like a
10598 `wx.FlexGridSizer` but in this case explicit positioning of the items
10599 is allowed using `wx.GBPosition`, and items can optionally span more
10600 than one row and/or column using `wx.GBSpan`. The total size of the
10601 virtual grid is determined by the largest row and column that items are
10602 positioned at, adjusted for spanning.
10603
10604 """
10605 def __repr__(self):
10606 return "<%s.%s; proxy of C++ wxGridBagSizer instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
10607 def __init__(self, *args, **kwargs):
10608 """
10609 __init__(self, int vgap=0, int hgap=0) -> GridBagSizer
10610
10611 Constructor, with optional parameters to specify the gap between the
10612 rows and columns.
10613 """
10614 newobj = _core_.new_GridBagSizer(*args, **kwargs)
10615 self.this = newobj.this
10616 self.thisown = 1
10617 del newobj.thisown
10618 self._setOORInfo(self)
10619
10620 def Add(*args, **kwargs):
10621 """
10622 Add(self, item, GBPosition pos, GBSpan span=DefaultSpan, int flag=0,
10623 int border=0, userData=None) -> wx.GBSizerItem
10624
10625 Adds an item to the sizer at the grid cell *pos*, optionally spanning
10626 more than one row or column as specified with *span*. The remaining
10627 args behave similarly to `wx.Sizer.Add`.
10628
10629 Returns True if the item was successfully placed at the given cell
10630 position, False if something was already there.
10631
10632 """
10633 return _core_.GridBagSizer_Add(*args, **kwargs)
10634
10635 def AddItem(*args, **kwargs):
10636 """
10637 Add(self, GBSizerItem item) -> wx.GBSizerItem
10638
10639 Add an item to the sizer using a `wx.GBSizerItem`. Returns True if
10640 the item was successfully placed at its given cell position, False if
10641 something was already there.
10642 """
10643 return _core_.GridBagSizer_AddItem(*args, **kwargs)
10644
10645 def GetCellSize(*args, **kwargs):
10646 """
10647 GetCellSize(self, int row, int col) -> Size
10648
10649 Get the size of the specified cell, including hgap and
10650 vgap. Only valid after a Layout.
10651 """
10652 return _core_.GridBagSizer_GetCellSize(*args, **kwargs)
10653
10654 def GetEmptyCellSize(*args, **kwargs):
10655 """
10656 GetEmptyCellSize(self) -> Size
10657
10658 Get the size used for cells in the grid with no item.
10659 """
10660 return _core_.GridBagSizer_GetEmptyCellSize(*args, **kwargs)
10661
10662 def SetEmptyCellSize(*args, **kwargs):
10663 """
10664 SetEmptyCellSize(self, Size sz)
10665
10666 Set the size used for cells in the grid with no item.
10667 """
10668 return _core_.GridBagSizer_SetEmptyCellSize(*args, **kwargs)
10669
10670 def GetItemPosition(*args):
10671 """
10672 GetItemPosition(self, item) -> GBPosition
10673
10674 Get the grid position of the specified *item* where *item* is either a
10675 window or subsizer that is a member of this sizer, or a zero-based
10676 index of an item.
10677 """
10678 return _core_.GridBagSizer_GetItemPosition(*args)
10679
10680 def SetItemPosition(*args):
10681 """
10682 SetItemPosition(self, item, GBPosition pos) -> bool
10683
10684 Set the grid position of the specified *item* where *item* is either a
10685 window or subsizer that is a member of this sizer, or a zero-based
10686 index of an item. Returns True on success. If the move is not
10687 allowed (because an item is already there) then False is returned.
10688
10689 """
10690 return _core_.GridBagSizer_SetItemPosition(*args)
10691
10692 def GetItemSpan(*args):
10693 """
10694 GetItemSpan(self, item) -> GBSpan
10695
10696 Get the row/col spanning of the specified *item* where *item* is
10697 either a window or subsizer that is a member of this sizer, or a
10698 zero-based index of an item.
10699 """
10700 return _core_.GridBagSizer_GetItemSpan(*args)
10701
10702 def SetItemSpan(*args):
10703 """
10704 SetItemSpan(self, item, GBSpan span) -> bool
10705
10706 Set the row/col spanning of the specified *item* where *item* is
10707 either a window or subsizer that is a member of this sizer, or a
10708 zero-based index of an item. Returns True on success. If the move is
10709 not allowed (because an item is already there) then False is returned.
10710 """
10711 return _core_.GridBagSizer_SetItemSpan(*args)
10712
10713 def FindItem(*args):
10714 """
10715 FindItem(self, item) -> GBSizerItem
10716
10717 Find the sizer item for the given window or subsizer, returns None if
10718 not found. (non-recursive)
10719 """
10720 return _core_.GridBagSizer_FindItem(*args)
10721
10722 def FindItemAtPosition(*args, **kwargs):
10723 """
10724 FindItemAtPosition(self, GBPosition pos) -> GBSizerItem
10725
10726 Return the sizer item for the given grid cell, or None if there is no
10727 item at that position. (non-recursive)
10728 """
10729 return _core_.GridBagSizer_FindItemAtPosition(*args, **kwargs)
10730
10731 def FindItemAtPoint(*args, **kwargs):
10732 """
10733 FindItemAtPoint(self, Point pt) -> GBSizerItem
10734
10735 Return the sizer item located at the point given in *pt*, or None if
10736 there is no item at that point. The (x,y) coordinates in pt correspond
10737 to the client coordinates of the window using the sizer for
10738 layout. (non-recursive)
10739 """
10740 return _core_.GridBagSizer_FindItemAtPoint(*args, **kwargs)
10741
10742 def CheckForIntersection(*args, **kwargs):
10743 """
10744 CheckForIntersection(self, GBSizerItem item, GBSizerItem excludeItem=None) -> bool
10745
10746 Look at all items and see if any intersect (or would overlap) the
10747 given *item*. Returns True if so, False if there would be no overlap.
10748 If an *excludeItem* is given then it will not be checked for
10749 intersection, for example it may be the item we are checking the
10750 position of.
10751
10752 """
10753 return _core_.GridBagSizer_CheckForIntersection(*args, **kwargs)
10754
10755 def CheckForIntersectionPos(*args, **kwargs):
10756 """
10757 CheckForIntersectionPos(self, GBPosition pos, GBSpan span, GBSizerItem excludeItem=None) -> bool
10758
10759 Look at all items and see if any intersect (or would overlap) the
10760 given position and span. Returns True if so, False if there would be
10761 no overlap. If an *excludeItem* is given then it will not be checked
10762 for intersection, for example it may be the item we are checking the
10763 position of.
10764 """
10765 return _core_.GridBagSizer_CheckForIntersectionPos(*args, **kwargs)
10766
10767
10768 class GridBagSizerPtr(GridBagSizer):
10769 def __init__(self, this):
10770 self.this = this
10771 if not hasattr(self,"thisown"): self.thisown = 0
10772 self.__class__ = GridBagSizer
10773 _core_.GridBagSizer_swigregister(GridBagSizerPtr)
10774
10775 #---------------------------------------------------------------------------
10776
10777 Left = _core_.Left
10778 Top = _core_.Top
10779 Right = _core_.Right
10780 Bottom = _core_.Bottom
10781 Width = _core_.Width
10782 Height = _core_.Height
10783 Centre = _core_.Centre
10784 Center = _core_.Center
10785 CentreX = _core_.CentreX
10786 CentreY = _core_.CentreY
10787 Unconstrained = _core_.Unconstrained
10788 AsIs = _core_.AsIs
10789 PercentOf = _core_.PercentOf
10790 Above = _core_.Above
10791 Below = _core_.Below
10792 LeftOf = _core_.LeftOf
10793 RightOf = _core_.RightOf
10794 SameAs = _core_.SameAs
10795 Absolute = _core_.Absolute
10796 class IndividualLayoutConstraint(Object):
10797 """
10798 Objects of this class are stored in the `wx.LayoutConstraints` class as
10799 one of eight possible constraints that a window can be involved in.
10800 You will never need to create an instance of
10801 wx.IndividualLayoutConstraint, rather you should create a
10802 `wx.LayoutConstraints` instance and use the individual contstraints
10803 that it contains.
10804 """
10805 def __init__(self): raise RuntimeError, "No constructor defined"
10806 def __repr__(self):
10807 return "<%s.%s; proxy of C++ wxIndividualLayoutConstraint instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
10808 def Set(*args, **kwargs):
10809 """
10810 Set(self, int rel, Window otherW, int otherE, int val=0, int marg=wxLAYOUT_DEFAULT_MARGIN)
10811
10812 Sets the properties of the constraint. Normally called by one of the
10813 convenience functions such as Above, RightOf, SameAs.
10814 """
10815 return _core_.IndividualLayoutConstraint_Set(*args, **kwargs)
10816
10817 def LeftOf(*args, **kwargs):
10818 """
10819 LeftOf(self, Window sibling, int marg=0)
10820
10821 Constrains this edge to be to the left of the given window, with an
10822 optional margin. Implicitly, this is relative to the left edge of the
10823 other window.
10824 """
10825 return _core_.IndividualLayoutConstraint_LeftOf(*args, **kwargs)
10826
10827 def RightOf(*args, **kwargs):
10828 """
10829 RightOf(self, Window sibling, int marg=0)
10830
10831 Constrains this edge to be to the right of the given window, with an
10832 optional margin. Implicitly, this is relative to the right edge of the
10833 other window.
10834 """
10835 return _core_.IndividualLayoutConstraint_RightOf(*args, **kwargs)
10836
10837 def Above(*args, **kwargs):
10838 """
10839 Above(self, Window sibling, int marg=0)
10840
10841 Constrains this edge to be above the given window, with an optional
10842 margin. Implicitly, this is relative to the top edge of the other
10843 window.
10844 """
10845 return _core_.IndividualLayoutConstraint_Above(*args, **kwargs)
10846
10847 def Below(*args, **kwargs):
10848 """
10849 Below(self, Window sibling, int marg=0)
10850
10851 Constrains this edge to be below the given window, with an optional
10852 margin. Implicitly, this is relative to the bottom edge of the other
10853 window.
10854 """
10855 return _core_.IndividualLayoutConstraint_Below(*args, **kwargs)
10856
10857 def SameAs(*args, **kwargs):
10858 """
10859 SameAs(self, Window otherW, int edge, int marg=0)
10860
10861 Constrains this edge or dimension to be to the same as the edge of the
10862 given window, with an optional margin.
10863 """
10864 return _core_.IndividualLayoutConstraint_SameAs(*args, **kwargs)
10865
10866 def PercentOf(*args, **kwargs):
10867 """
10868 PercentOf(self, Window otherW, int wh, int per)
10869
10870 Constrains this edge or dimension to be to a percentage of the given
10871 window, with an optional margin.
10872 """
10873 return _core_.IndividualLayoutConstraint_PercentOf(*args, **kwargs)
10874
10875 def Absolute(*args, **kwargs):
10876 """
10877 Absolute(self, int val)
10878
10879 Constrains this edge or dimension to be the given absolute value.
10880 """
10881 return _core_.IndividualLayoutConstraint_Absolute(*args, **kwargs)
10882
10883 def Unconstrained(*args, **kwargs):
10884 """
10885 Unconstrained(self)
10886
10887 Sets this edge or dimension to be unconstrained, that is, dependent on
10888 other edges and dimensions from which this value can be deduced.
10889 """
10890 return _core_.IndividualLayoutConstraint_Unconstrained(*args, **kwargs)
10891
10892 def AsIs(*args, **kwargs):
10893 """
10894 AsIs(self)
10895
10896 Sets this edge or constraint to be whatever the window's value is at
10897 the moment. If either of the width and height constraints are *as is*,
10898 the window will not be resized, but moved instead. This is important
10899 when considering panel items which are intended to have a default
10900 size, such as a button, which may take its size from the size of the
10901 button label.
10902 """
10903 return _core_.IndividualLayoutConstraint_AsIs(*args, **kwargs)
10904
10905 def GetOtherWindow(*args, **kwargs):
10906 """GetOtherWindow(self) -> Window"""
10907 return _core_.IndividualLayoutConstraint_GetOtherWindow(*args, **kwargs)
10908
10909 def GetMyEdge(*args, **kwargs):
10910 """GetMyEdge(self) -> int"""
10911 return _core_.IndividualLayoutConstraint_GetMyEdge(*args, **kwargs)
10912
10913 def SetEdge(*args, **kwargs):
10914 """SetEdge(self, int which)"""
10915 return _core_.IndividualLayoutConstraint_SetEdge(*args, **kwargs)
10916
10917 def SetValue(*args, **kwargs):
10918 """SetValue(self, int v)"""
10919 return _core_.IndividualLayoutConstraint_SetValue(*args, **kwargs)
10920
10921 def GetMargin(*args, **kwargs):
10922 """GetMargin(self) -> int"""
10923 return _core_.IndividualLayoutConstraint_GetMargin(*args, **kwargs)
10924
10925 def SetMargin(*args, **kwargs):
10926 """SetMargin(self, int m)"""
10927 return _core_.IndividualLayoutConstraint_SetMargin(*args, **kwargs)
10928
10929 def GetValue(*args, **kwargs):
10930 """GetValue(self) -> int"""
10931 return _core_.IndividualLayoutConstraint_GetValue(*args, **kwargs)
10932
10933 def GetPercent(*args, **kwargs):
10934 """GetPercent(self) -> int"""
10935 return _core_.IndividualLayoutConstraint_GetPercent(*args, **kwargs)
10936
10937 def GetOtherEdge(*args, **kwargs):
10938 """GetOtherEdge(self) -> int"""
10939 return _core_.IndividualLayoutConstraint_GetOtherEdge(*args, **kwargs)
10940
10941 def GetDone(*args, **kwargs):
10942 """GetDone(self) -> bool"""
10943 return _core_.IndividualLayoutConstraint_GetDone(*args, **kwargs)
10944
10945 def SetDone(*args, **kwargs):
10946 """SetDone(self, bool d)"""
10947 return _core_.IndividualLayoutConstraint_SetDone(*args, **kwargs)
10948
10949 def GetRelationship(*args, **kwargs):
10950 """GetRelationship(self) -> int"""
10951 return _core_.IndividualLayoutConstraint_GetRelationship(*args, **kwargs)
10952
10953 def SetRelationship(*args, **kwargs):
10954 """SetRelationship(self, int r)"""
10955 return _core_.IndividualLayoutConstraint_SetRelationship(*args, **kwargs)
10956
10957 def ResetIfWin(*args, **kwargs):
10958 """
10959 ResetIfWin(self, Window otherW) -> bool
10960
10961 Reset constraint if it mentions otherWin
10962 """
10963 return _core_.IndividualLayoutConstraint_ResetIfWin(*args, **kwargs)
10964
10965 def SatisfyConstraint(*args, **kwargs):
10966 """
10967 SatisfyConstraint(self, LayoutConstraints constraints, Window win) -> bool
10968
10969 Try to satisfy constraint
10970 """
10971 return _core_.IndividualLayoutConstraint_SatisfyConstraint(*args, **kwargs)
10972
10973 def GetEdge(*args, **kwargs):
10974 """
10975 GetEdge(self, int which, Window thisWin, Window other) -> int
10976
10977 Get the value of this edge or dimension, or if this
10978 is not determinable, -1.
10979 """
10980 return _core_.IndividualLayoutConstraint_GetEdge(*args, **kwargs)
10981
10982
10983 class IndividualLayoutConstraintPtr(IndividualLayoutConstraint):
10984 def __init__(self, this):
10985 self.this = this
10986 if not hasattr(self,"thisown"): self.thisown = 0
10987 self.__class__ = IndividualLayoutConstraint
10988 _core_.IndividualLayoutConstraint_swigregister(IndividualLayoutConstraintPtr)
10989
10990 class LayoutConstraints(Object):
10991 """
10992 **Note:** constraints are now deprecated and you should use sizers
10993 instead.
10994
10995 Objects of this class can be associated with a window to define its
10996 layout constraints, with respect to siblings or its parent.
10997
10998 The class consists of the following eight constraints of class
10999 wx.IndividualLayoutConstraint, some or all of which should be accessed
11000 directly to set the appropriate constraints.
11001
11002 * left: represents the left hand edge of the window
11003 * right: represents the right hand edge of the window
11004 * top: represents the top edge of the window
11005 * bottom: represents the bottom edge of the window
11006 * width: represents the width of the window
11007 * height: represents the height of the window
11008 * centreX: represents the horizontal centre point of the window
11009 * centreY: represents the vertical centre point of the window
11010
11011 Most constraints are initially set to have the relationship
11012 wxUnconstrained, which means that their values should be calculated by
11013 looking at known constraints. The exceptions are width and height,
11014 which are set to wxAsIs to ensure that if the user does not specify a
11015 constraint, the existing width and height will be used, to be
11016 compatible with panel items which often have take a default size. If
11017 the constraint is ``wx.AsIs``, the dimension will not be changed.
11018
11019 :see: `wx.IndividualLayoutConstraint`, `wx.Window.SetConstraints`
11020
11021 """
11022 def __repr__(self):
11023 return "<%s.%s; proxy of C++ wxLayoutConstraints instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
11024 left = property(_core_.LayoutConstraints_left_get)
11025 top = property(_core_.LayoutConstraints_top_get)
11026 right = property(_core_.LayoutConstraints_right_get)
11027 bottom = property(_core_.LayoutConstraints_bottom_get)
11028 width = property(_core_.LayoutConstraints_width_get)
11029 height = property(_core_.LayoutConstraints_height_get)
11030 centreX = property(_core_.LayoutConstraints_centreX_get)
11031 centreY = property(_core_.LayoutConstraints_centreY_get)
11032 def __init__(self, *args, **kwargs):
11033 """__init__(self) -> LayoutConstraints"""
11034 newobj = _core_.new_LayoutConstraints(*args, **kwargs)
11035 self.this = newobj.this
11036 self.thisown = 1
11037 del newobj.thisown
11038 def SatisfyConstraints(*args, **kwargs):
11039 """SatisfyConstraints(Window win) -> (areSatisfied, noChanges)"""
11040 return _core_.LayoutConstraints_SatisfyConstraints(*args, **kwargs)
11041
11042 def AreSatisfied(*args, **kwargs):
11043 """AreSatisfied(self) -> bool"""
11044 return _core_.LayoutConstraints_AreSatisfied(*args, **kwargs)
11045
11046
11047 class LayoutConstraintsPtr(LayoutConstraints):
11048 def __init__(self, this):
11049 self.this = this
11050 if not hasattr(self,"thisown"): self.thisown = 0
11051 self.__class__ = LayoutConstraints
11052 _core_.LayoutConstraints_swigregister(LayoutConstraintsPtr)
11053
11054 #----------------------------------------------------------------------------
11055
11056 # Use Python's bool constants if available, make some if not
11057 try:
11058 True
11059 except NameError:
11060 __builtins__.True = 1==1
11061 __builtins__.False = 1==0
11062 def bool(value): return not not value
11063 __builtins__.bool = bool
11064
11065
11066
11067 # workarounds for bad wxRTTI names
11068 __wxPyPtrTypeMap['wxGauge95'] = 'wxGauge'
11069 __wxPyPtrTypeMap['wxSlider95'] = 'wxSlider'
11070 __wxPyPtrTypeMap['wxStatusBar95'] = 'wxStatusBar'
11071
11072
11073 #----------------------------------------------------------------------------
11074 # Load version numbers from __version__... Ensure that major and minor
11075 # versions are the same for both wxPython and wxWidgets.
11076
11077 from __version__ import *
11078 __version__ = VERSION_STRING
11079
11080 assert MAJOR_VERSION == _core_.MAJOR_VERSION, "wxPython/wxWidgets version mismatch"
11081 assert MINOR_VERSION == _core_.MINOR_VERSION, "wxPython/wxWidgets version mismatch"
11082 if RELEASE_VERSION != _core_.RELEASE_VERSION:
11083 import warnings
11084 warnings.warn("wxPython/wxWidgets release number mismatch")
11085
11086 #----------------------------------------------------------------------------
11087
11088 # Set the default string<-->unicode conversion encoding from the
11089 # locale. This encoding is used when string or unicode objects need
11090 # to be converted in order to pass them to wxWidgets. Please be aware
11091 # that the default encoding within the same locale may be slightly
11092 # different on different platforms. For example, please see
11093 # http://www.alanwood.net/demos/charsetdiffs.html for differences
11094 # between the common latin/roman encodings.
11095 import locale
11096 default = locale.getdefaultlocale()[1]
11097 if default:
11098 wx.SetDefaultPyEncoding(default)
11099 del default
11100 del locale
11101
11102 #----------------------------------------------------------------------------
11103
11104 class PyDeadObjectError(AttributeError):
11105 pass
11106
11107 class _wxPyDeadObject(object):
11108 """
11109 Instances of wx objects that are OOR capable will have their __class__
11110 changed to this class when the C++ object is deleted. This should help
11111 prevent crashes due to referencing a bogus C++ pointer.
11112 """
11113 reprStr = "wxPython wrapper for DELETED %s object! (The C++ object no longer exists.)"
11114 attrStr = "The C++ part of the %s object has been deleted, attribute access no longer allowed."
11115
11116 def __repr__(self):
11117 if not hasattr(self, "_name"):
11118 self._name = "[unknown]"
11119 return self.reprStr % self._name
11120
11121 def __getattr__(self, *args):
11122 if not hasattr(self, "_name"):
11123 self._name = "[unknown]"
11124 raise PyDeadObjectError(self.attrStr % self._name)
11125
11126 def __nonzero__(self):
11127 return 0
11128
11129
11130
11131 class PyUnbornObjectError(AttributeError):
11132 pass
11133
11134 class _wxPyUnbornObject(object):
11135 """
11136 Some stock objects are created when the wx._core module is
11137 imported, but their C++ instance is not created until the wx.App
11138 object is created and initialized. These object instances will
11139 temporarily have their __class__ changed to this class so an
11140 exception will be raised if they are used before the C++ instance
11141 is ready.
11142 """
11143
11144 reprStr = "wxPython wrapper for UNBORN object! (The C++ object is not initialized yet.)"
11145 attrStr = "The C++ part of this object has not been initialized, attribute access not allowed."
11146
11147 def __repr__(self):
11148 #if not hasattr(self, "_name"):
11149 # self._name = "[unknown]"
11150 return self.reprStr #% self._name
11151
11152 def __getattr__(self, *args):
11153 #if not hasattr(self, "_name"):
11154 # self._name = "[unknown]"
11155 raise PyUnbornObjectError(self.attrStr) # % self._name )
11156
11157 def __nonzero__(self):
11158 return 0
11159
11160
11161 #----------------------------------------------------------------------------
11162
11163 def CallAfter(callable, *args, **kw):
11164 """
11165 Call the specified function after the current and pending event
11166 handlers have been completed. This is also good for making GUI
11167 method calls from non-GUI threads. Any extra positional or
11168 keyword args are passed on to the callable when it is called.
11169
11170 :see: `wx.FutureCall`
11171 """
11172 app = wx.GetApp()
11173 assert app is not None, 'No wx.App created yet'
11174
11175 if not hasattr(app, "_CallAfterId"):
11176 app._CallAfterId = wx.NewEventType()
11177 app.Connect(-1, -1, app._CallAfterId,
11178 lambda event: event.callable(*event.args, **event.kw) )
11179 evt = wx.PyEvent()
11180 evt.SetEventType(app._CallAfterId)
11181 evt.callable = callable
11182 evt.args = args
11183 evt.kw = kw
11184 wx.PostEvent(app, evt)
11185
11186 #----------------------------------------------------------------------------
11187
11188
11189 class FutureCall:
11190 """
11191 A convenience class for `wx.Timer`, that calls the given callable
11192 object once after the given amount of milliseconds, passing any
11193 positional or keyword args. The return value of the callable is
11194 availbale after it has been run with the `GetResult` method.
11195
11196 If you don't need to get the return value or restart the timer
11197 then there is no need to hold a reference to this object. It will
11198 hold a reference to itself while the timer is running (the timer
11199 has a reference to self.Notify) but the cycle will be broken when
11200 the timer completes, automatically cleaning up the wx.FutureCall
11201 object.
11202
11203 :see: `wx.CallAfter`
11204 """
11205 def __init__(self, millis, callable, *args, **kwargs):
11206 self.millis = millis
11207 self.callable = callable
11208 self.SetArgs(*args, **kwargs)
11209 self.runCount = 0
11210 self.running = False
11211 self.hasRun = False
11212 self.result = None
11213 self.timer = None
11214 self.Start()
11215
11216 def __del__(self):
11217 self.Stop()
11218
11219
11220 def Start(self, millis=None, *args, **kwargs):
11221 """
11222 (Re)start the timer
11223 """
11224 self.hasRun = False
11225 if millis is not None:
11226 self.millis = millis
11227 if args or kwargs:
11228 self.SetArgs(*args, **kwargs)
11229 self.Stop()
11230 self.timer = wx.PyTimer(self.Notify)
11231 self.timer.Start(self.millis, wx.TIMER_ONE_SHOT)
11232 self.running = True
11233 Restart = Start
11234
11235
11236 def Stop(self):
11237 """
11238 Stop and destroy the timer.
11239 """
11240 if self.timer is not None:
11241 self.timer.Stop()
11242 self.timer = None
11243
11244
11245 def GetInterval(self):
11246 if self.timer is not None:
11247 return self.timer.GetInterval()
11248 else:
11249 return 0
11250
11251
11252 def IsRunning(self):
11253 return self.timer is not None and self.timer.IsRunning()
11254
11255
11256 def SetArgs(self, *args, **kwargs):
11257 """
11258 (Re)set the args passed to the callable object. This is
11259 useful in conjunction with Restart if you want to schedule a
11260 new call to the same callable object but with different
11261 parameters.
11262 """
11263 self.args = args
11264 self.kwargs = kwargs
11265
11266
11267 def HasRun(self):
11268 return self.hasRun
11269
11270 def GetResult(self):
11271 return self.result
11272
11273 def Notify(self):
11274 """
11275 The timer has expired so call the callable.
11276 """
11277 if self.callable and getattr(self.callable, 'im_self', True):
11278 self.runCount += 1
11279 self.running = False
11280 self.result = self.callable(*self.args, **self.kwargs)
11281 self.hasRun = True
11282 if not self.running:
11283 # if it wasn't restarted, then cleanup
11284 wx.CallAfter(self.Stop)
11285
11286
11287
11288 #----------------------------------------------------------------------------
11289 # Control which items in this module should be documented by epydoc.
11290 # We allow only classes and functions, which will help reduce the size
11291 # of the docs by filtering out the zillions of constants, EVT objects,
11292 # and etc that don't make much sense by themselves, but are instead
11293 # documented (or will be) as part of the classes/functions/methods
11294 # where they should be used.
11295
11296 class __DocFilter:
11297 """
11298 A filter for epydoc that only allows non-Ptr classes and
11299 fucntions, in order to reduce the clutter in the API docs.
11300 """
11301 def __init__(self, globals):
11302 self._globals = globals
11303
11304 def __call__(self, name):
11305 import types
11306 obj = self._globals.get(name, None)
11307 if type(obj) not in [type, types.ClassType, types.FunctionType, types.BuiltinFunctionType]:
11308 return False
11309 if name.startswith('_') or name.endswith('Ptr') or name.startswith('EVT'):
11310 return False
11311 return True
11312
11313 #----------------------------------------------------------------------------
11314 #----------------------------------------------------------------------------
11315
11316 # Import other modules in this package that should show up in the
11317 # "core" wx namespace
11318 from _gdi import *
11319 from _windows import *
11320 from _controls import *
11321 from _misc import *
11322
11323
11324 # Fixup the stock objects since they can't be used yet. (They will be
11325 # restored in wx.PyApp.OnInit.)
11326 _core_._wxPyFixStockObjects()
11327
11328 #----------------------------------------------------------------------------
11329 #----------------------------------------------------------------------------
11330
11331