]> git.saurik.com Git - wxWidgets.git/blob - wxPython/src/mac/_core.py
reSWIGged after 1.3.24 update
[wxWidgets.git] / wxPython / src / mac / _core.py
1 # This file was created automatically by SWIG.
2 # Don't modify this file, modify the SWIG interface instead.
3
4 import _core_
5
6 def _swig_setattr_nondynamic(self,class_type,name,value,static=1):
7 if (name == "this"):
8 if isinstance(value, class_type):
9 self.__dict__[name] = value.this
10 if hasattr(value,"thisown"): self.__dict__["thisown"] = value.thisown
11 del value.thisown
12 return
13 method = class_type.__swig_setmethods__.get(name,None)
14 if method: return method(self,value)
15 if (not static) or hasattr(self,name) or (name == "thisown"):
16 self.__dict__[name] = value
17 else:
18 raise AttributeError("You cannot add attributes to %s" % self)
19
20 def _swig_setattr(self,class_type,name,value):
21 return _swig_setattr_nondynamic(self,class_type,name,value,0)
22
23 def _swig_getattr(self,class_type,name):
24 method = class_type.__swig_getmethods__.get(name,None)
25 if method: return method(self)
26 raise AttributeError,name
27
28 import types
29 try:
30 _object = types.ObjectType
31 _newclass = 1
32 except AttributeError:
33 class _object : pass
34 _newclass = 0
35 del types
36
37
38 def _swig_setattr_nondynamic_method(set):
39 def set_attr(self,name,value):
40 if hasattr(self,name) or (name in ("this", "thisown")):
41 set(self,name,value)
42 else:
43 raise AttributeError("You cannot add attributes to %s" % self)
44 return set_attr
45
46
47 #// Give a reference to the dictionary of this module to the C++ extension
48 #// code.
49 _core_._wxPySetDictionary(vars())
50
51 #// A little trick to make 'wx' be a reference to this module so wx.Names can
52 #// be used here.
53 import sys as _sys
54 wx = _sys.modules[__name__]
55
56
57 #----------------------------------------------------------------------------
58
59 def _deprecated(callable, msg=None):
60 """
61 Create a wrapper function that will raise a DeprecationWarning
62 before calling the callable.
63 """
64 if msg is None:
65 msg = "%s is deprecated" % callable
66 def deprecatedWrapper(*args, **kwargs):
67 import warnings
68 warnings.warn(msg, DeprecationWarning, stacklevel=2)
69 return callable(*args, **kwargs)
70 deprecatedWrapper.__doc__ = msg
71 return deprecatedWrapper
72
73
74 #----------------------------------------------------------------------------
75
76 NOT_FOUND = _core_.NOT_FOUND
77 VSCROLL = _core_.VSCROLL
78 HSCROLL = _core_.HSCROLL
79 CAPTION = _core_.CAPTION
80 DOUBLE_BORDER = _core_.DOUBLE_BORDER
81 SUNKEN_BORDER = _core_.SUNKEN_BORDER
82 RAISED_BORDER = _core_.RAISED_BORDER
83 BORDER = _core_.BORDER
84 SIMPLE_BORDER = _core_.SIMPLE_BORDER
85 STATIC_BORDER = _core_.STATIC_BORDER
86 TRANSPARENT_WINDOW = _core_.TRANSPARENT_WINDOW
87 NO_BORDER = _core_.NO_BORDER
88 TAB_TRAVERSAL = _core_.TAB_TRAVERSAL
89 WANTS_CHARS = _core_.WANTS_CHARS
90 POPUP_WINDOW = _core_.POPUP_WINDOW
91 CENTER_FRAME = _core_.CENTER_FRAME
92 CENTRE_ON_SCREEN = _core_.CENTRE_ON_SCREEN
93 CENTER_ON_SCREEN = _core_.CENTER_ON_SCREEN
94 ED_CLIENT_MARGIN = _core_.ED_CLIENT_MARGIN
95 ED_BUTTONS_BOTTOM = _core_.ED_BUTTONS_BOTTOM
96 ED_BUTTONS_RIGHT = _core_.ED_BUTTONS_RIGHT
97 ED_STATIC_LINE = _core_.ED_STATIC_LINE
98 EXT_DIALOG_STYLE = _core_.EXT_DIALOG_STYLE
99 CLIP_CHILDREN = _core_.CLIP_CHILDREN
100 CLIP_SIBLINGS = _core_.CLIP_SIBLINGS
101 ALWAYS_SHOW_SB = _core_.ALWAYS_SHOW_SB
102 RETAINED = _core_.RETAINED
103 BACKINGSTORE = _core_.BACKINGSTORE
104 COLOURED = _core_.COLOURED
105 FIXED_LENGTH = _core_.FIXED_LENGTH
106 LB_NEEDED_SB = _core_.LB_NEEDED_SB
107 LB_ALWAYS_SB = _core_.LB_ALWAYS_SB
108 LB_SORT = _core_.LB_SORT
109 LB_SINGLE = _core_.LB_SINGLE
110 LB_MULTIPLE = _core_.LB_MULTIPLE
111 LB_EXTENDED = _core_.LB_EXTENDED
112 LB_OWNERDRAW = _core_.LB_OWNERDRAW
113 LB_HSCROLL = _core_.LB_HSCROLL
114 PROCESS_ENTER = _core_.PROCESS_ENTER
115 PASSWORD = _core_.PASSWORD
116 CB_SIMPLE = _core_.CB_SIMPLE
117 CB_DROPDOWN = _core_.CB_DROPDOWN
118 CB_SORT = _core_.CB_SORT
119 CB_READONLY = _core_.CB_READONLY
120 RA_HORIZONTAL = _core_.RA_HORIZONTAL
121 RA_VERTICAL = _core_.RA_VERTICAL
122 RA_SPECIFY_ROWS = _core_.RA_SPECIFY_ROWS
123 RA_SPECIFY_COLS = _core_.RA_SPECIFY_COLS
124 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 DD_NEW_DIR_BUTTON = _core_.DD_NEW_DIR_BUTTON
292 DD_DEFAULT_STYLE = _core_.DD_DEFAULT_STYLE
293 MENU_TEAROFF = _core_.MENU_TEAROFF
294 MB_DOCKABLE = _core_.MB_DOCKABLE
295 NO_FULL_REPAINT_ON_RESIZE = _core_.NO_FULL_REPAINT_ON_RESIZE
296 FULL_REPAINT_ON_RESIZE = _core_.FULL_REPAINT_ON_RESIZE
297 LI_HORIZONTAL = _core_.LI_HORIZONTAL
298 LI_VERTICAL = _core_.LI_VERTICAL
299 WS_EX_VALIDATE_RECURSIVELY = _core_.WS_EX_VALIDATE_RECURSIVELY
300 WS_EX_BLOCK_EVENTS = _core_.WS_EX_BLOCK_EVENTS
301 WS_EX_TRANSIENT = _core_.WS_EX_TRANSIENT
302 WS_EX_THEMED_BACKGROUND = _core_.WS_EX_THEMED_BACKGROUND
303 WS_EX_PROCESS_IDLE = _core_.WS_EX_PROCESS_IDLE
304 WS_EX_PROCESS_UI_UPDATES = _core_.WS_EX_PROCESS_UI_UPDATES
305 MM_TEXT = _core_.MM_TEXT
306 MM_LOMETRIC = _core_.MM_LOMETRIC
307 MM_HIMETRIC = _core_.MM_HIMETRIC
308 MM_LOENGLISH = _core_.MM_LOENGLISH
309 MM_HIENGLISH = _core_.MM_HIENGLISH
310 MM_TWIPS = _core_.MM_TWIPS
311 MM_ISOTROPIC = _core_.MM_ISOTROPIC
312 MM_ANISOTROPIC = _core_.MM_ANISOTROPIC
313 MM_POINTS = _core_.MM_POINTS
314 MM_METRIC = _core_.MM_METRIC
315 CENTRE = _core_.CENTRE
316 CENTER = _core_.CENTER
317 HORIZONTAL = _core_.HORIZONTAL
318 VERTICAL = _core_.VERTICAL
319 BOTH = _core_.BOTH
320 LEFT = _core_.LEFT
321 RIGHT = _core_.RIGHT
322 UP = _core_.UP
323 DOWN = _core_.DOWN
324 TOP = _core_.TOP
325 BOTTOM = _core_.BOTTOM
326 NORTH = _core_.NORTH
327 SOUTH = _core_.SOUTH
328 WEST = _core_.WEST
329 EAST = _core_.EAST
330 ALL = _core_.ALL
331 ALIGN_NOT = _core_.ALIGN_NOT
332 ALIGN_CENTER_HORIZONTAL = _core_.ALIGN_CENTER_HORIZONTAL
333 ALIGN_CENTRE_HORIZONTAL = _core_.ALIGN_CENTRE_HORIZONTAL
334 ALIGN_LEFT = _core_.ALIGN_LEFT
335 ALIGN_TOP = _core_.ALIGN_TOP
336 ALIGN_RIGHT = _core_.ALIGN_RIGHT
337 ALIGN_BOTTOM = _core_.ALIGN_BOTTOM
338 ALIGN_CENTER_VERTICAL = _core_.ALIGN_CENTER_VERTICAL
339 ALIGN_CENTRE_VERTICAL = _core_.ALIGN_CENTRE_VERTICAL
340 ALIGN_CENTER = _core_.ALIGN_CENTER
341 ALIGN_CENTRE = _core_.ALIGN_CENTRE
342 ALIGN_MASK = _core_.ALIGN_MASK
343 STRETCH_NOT = _core_.STRETCH_NOT
344 SHRINK = _core_.SHRINK
345 GROW = _core_.GROW
346 EXPAND = _core_.EXPAND
347 SHAPED = _core_.SHAPED
348 FIXED_MINSIZE = _core_.FIXED_MINSIZE
349 TILE = _core_.TILE
350 ADJUST_MINSIZE = _core_.ADJUST_MINSIZE
351 BORDER_DEFAULT = _core_.BORDER_DEFAULT
352 BORDER_NONE = _core_.BORDER_NONE
353 BORDER_STATIC = _core_.BORDER_STATIC
354 BORDER_SIMPLE = _core_.BORDER_SIMPLE
355 BORDER_RAISED = _core_.BORDER_RAISED
356 BORDER_SUNKEN = _core_.BORDER_SUNKEN
357 BORDER_DOUBLE = _core_.BORDER_DOUBLE
358 BORDER_MASK = _core_.BORDER_MASK
359 BG_STYLE_SYSTEM = _core_.BG_STYLE_SYSTEM
360 BG_STYLE_COLOUR = _core_.BG_STYLE_COLOUR
361 BG_STYLE_CUSTOM = _core_.BG_STYLE_CUSTOM
362 DEFAULT = _core_.DEFAULT
363 DECORATIVE = _core_.DECORATIVE
364 ROMAN = _core_.ROMAN
365 SCRIPT = _core_.SCRIPT
366 SWISS = _core_.SWISS
367 MODERN = _core_.MODERN
368 TELETYPE = _core_.TELETYPE
369 VARIABLE = _core_.VARIABLE
370 FIXED = _core_.FIXED
371 NORMAL = _core_.NORMAL
372 LIGHT = _core_.LIGHT
373 BOLD = _core_.BOLD
374 ITALIC = _core_.ITALIC
375 SLANT = _core_.SLANT
376 SOLID = _core_.SOLID
377 DOT = _core_.DOT
378 LONG_DASH = _core_.LONG_DASH
379 SHORT_DASH = _core_.SHORT_DASH
380 DOT_DASH = _core_.DOT_DASH
381 USER_DASH = _core_.USER_DASH
382 TRANSPARENT = _core_.TRANSPARENT
383 STIPPLE = _core_.STIPPLE
384 BDIAGONAL_HATCH = _core_.BDIAGONAL_HATCH
385 CROSSDIAG_HATCH = _core_.CROSSDIAG_HATCH
386 FDIAGONAL_HATCH = _core_.FDIAGONAL_HATCH
387 CROSS_HATCH = _core_.CROSS_HATCH
388 HORIZONTAL_HATCH = _core_.HORIZONTAL_HATCH
389 VERTICAL_HATCH = _core_.VERTICAL_HATCH
390 JOIN_BEVEL = _core_.JOIN_BEVEL
391 JOIN_MITER = _core_.JOIN_MITER
392 JOIN_ROUND = _core_.JOIN_ROUND
393 CAP_ROUND = _core_.CAP_ROUND
394 CAP_PROJECTING = _core_.CAP_PROJECTING
395 CAP_BUTT = _core_.CAP_BUTT
396 CLEAR = _core_.CLEAR
397 XOR = _core_.XOR
398 INVERT = _core_.INVERT
399 OR_REVERSE = _core_.OR_REVERSE
400 AND_REVERSE = _core_.AND_REVERSE
401 COPY = _core_.COPY
402 AND = _core_.AND
403 AND_INVERT = _core_.AND_INVERT
404 NO_OP = _core_.NO_OP
405 NOR = _core_.NOR
406 EQUIV = _core_.EQUIV
407 SRC_INVERT = _core_.SRC_INVERT
408 OR_INVERT = _core_.OR_INVERT
409 NAND = _core_.NAND
410 OR = _core_.OR
411 SET = _core_.SET
412 WXK_BACK = _core_.WXK_BACK
413 WXK_TAB = _core_.WXK_TAB
414 WXK_RETURN = _core_.WXK_RETURN
415 WXK_ESCAPE = _core_.WXK_ESCAPE
416 WXK_SPACE = _core_.WXK_SPACE
417 WXK_DELETE = _core_.WXK_DELETE
418 WXK_START = _core_.WXK_START
419 WXK_LBUTTON = _core_.WXK_LBUTTON
420 WXK_RBUTTON = _core_.WXK_RBUTTON
421 WXK_CANCEL = _core_.WXK_CANCEL
422 WXK_MBUTTON = _core_.WXK_MBUTTON
423 WXK_CLEAR = _core_.WXK_CLEAR
424 WXK_SHIFT = _core_.WXK_SHIFT
425 WXK_ALT = _core_.WXK_ALT
426 WXK_CONTROL = _core_.WXK_CONTROL
427 WXK_MENU = _core_.WXK_MENU
428 WXK_PAUSE = _core_.WXK_PAUSE
429 WXK_CAPITAL = _core_.WXK_CAPITAL
430 WXK_PRIOR = _core_.WXK_PRIOR
431 WXK_NEXT = _core_.WXK_NEXT
432 WXK_END = _core_.WXK_END
433 WXK_HOME = _core_.WXK_HOME
434 WXK_LEFT = _core_.WXK_LEFT
435 WXK_UP = _core_.WXK_UP
436 WXK_RIGHT = _core_.WXK_RIGHT
437 WXK_DOWN = _core_.WXK_DOWN
438 WXK_SELECT = _core_.WXK_SELECT
439 WXK_PRINT = _core_.WXK_PRINT
440 WXK_EXECUTE = _core_.WXK_EXECUTE
441 WXK_SNAPSHOT = _core_.WXK_SNAPSHOT
442 WXK_INSERT = _core_.WXK_INSERT
443 WXK_HELP = _core_.WXK_HELP
444 WXK_NUMPAD0 = _core_.WXK_NUMPAD0
445 WXK_NUMPAD1 = _core_.WXK_NUMPAD1
446 WXK_NUMPAD2 = _core_.WXK_NUMPAD2
447 WXK_NUMPAD3 = _core_.WXK_NUMPAD3
448 WXK_NUMPAD4 = _core_.WXK_NUMPAD4
449 WXK_NUMPAD5 = _core_.WXK_NUMPAD5
450 WXK_NUMPAD6 = _core_.WXK_NUMPAD6
451 WXK_NUMPAD7 = _core_.WXK_NUMPAD7
452 WXK_NUMPAD8 = _core_.WXK_NUMPAD8
453 WXK_NUMPAD9 = _core_.WXK_NUMPAD9
454 WXK_MULTIPLY = _core_.WXK_MULTIPLY
455 WXK_ADD = _core_.WXK_ADD
456 WXK_SEPARATOR = _core_.WXK_SEPARATOR
457 WXK_SUBTRACT = _core_.WXK_SUBTRACT
458 WXK_DECIMAL = _core_.WXK_DECIMAL
459 WXK_DIVIDE = _core_.WXK_DIVIDE
460 WXK_F1 = _core_.WXK_F1
461 WXK_F2 = _core_.WXK_F2
462 WXK_F3 = _core_.WXK_F3
463 WXK_F4 = _core_.WXK_F4
464 WXK_F5 = _core_.WXK_F5
465 WXK_F6 = _core_.WXK_F6
466 WXK_F7 = _core_.WXK_F7
467 WXK_F8 = _core_.WXK_F8
468 WXK_F9 = _core_.WXK_F9
469 WXK_F10 = _core_.WXK_F10
470 WXK_F11 = _core_.WXK_F11
471 WXK_F12 = _core_.WXK_F12
472 WXK_F13 = _core_.WXK_F13
473 WXK_F14 = _core_.WXK_F14
474 WXK_F15 = _core_.WXK_F15
475 WXK_F16 = _core_.WXK_F16
476 WXK_F17 = _core_.WXK_F17
477 WXK_F18 = _core_.WXK_F18
478 WXK_F19 = _core_.WXK_F19
479 WXK_F20 = _core_.WXK_F20
480 WXK_F21 = _core_.WXK_F21
481 WXK_F22 = _core_.WXK_F22
482 WXK_F23 = _core_.WXK_F23
483 WXK_F24 = _core_.WXK_F24
484 WXK_NUMLOCK = _core_.WXK_NUMLOCK
485 WXK_SCROLL = _core_.WXK_SCROLL
486 WXK_PAGEUP = _core_.WXK_PAGEUP
487 WXK_PAGEDOWN = _core_.WXK_PAGEDOWN
488 WXK_NUMPAD_SPACE = _core_.WXK_NUMPAD_SPACE
489 WXK_NUMPAD_TAB = _core_.WXK_NUMPAD_TAB
490 WXK_NUMPAD_ENTER = _core_.WXK_NUMPAD_ENTER
491 WXK_NUMPAD_F1 = _core_.WXK_NUMPAD_F1
492 WXK_NUMPAD_F2 = _core_.WXK_NUMPAD_F2
493 WXK_NUMPAD_F3 = _core_.WXK_NUMPAD_F3
494 WXK_NUMPAD_F4 = _core_.WXK_NUMPAD_F4
495 WXK_NUMPAD_HOME = _core_.WXK_NUMPAD_HOME
496 WXK_NUMPAD_LEFT = _core_.WXK_NUMPAD_LEFT
497 WXK_NUMPAD_UP = _core_.WXK_NUMPAD_UP
498 WXK_NUMPAD_RIGHT = _core_.WXK_NUMPAD_RIGHT
499 WXK_NUMPAD_DOWN = _core_.WXK_NUMPAD_DOWN
500 WXK_NUMPAD_PRIOR = _core_.WXK_NUMPAD_PRIOR
501 WXK_NUMPAD_PAGEUP = _core_.WXK_NUMPAD_PAGEUP
502 WXK_NUMPAD_NEXT = _core_.WXK_NUMPAD_NEXT
503 WXK_NUMPAD_PAGEDOWN = _core_.WXK_NUMPAD_PAGEDOWN
504 WXK_NUMPAD_END = _core_.WXK_NUMPAD_END
505 WXK_NUMPAD_BEGIN = _core_.WXK_NUMPAD_BEGIN
506 WXK_NUMPAD_INSERT = _core_.WXK_NUMPAD_INSERT
507 WXK_NUMPAD_DELETE = _core_.WXK_NUMPAD_DELETE
508 WXK_NUMPAD_EQUAL = _core_.WXK_NUMPAD_EQUAL
509 WXK_NUMPAD_MULTIPLY = _core_.WXK_NUMPAD_MULTIPLY
510 WXK_NUMPAD_ADD = _core_.WXK_NUMPAD_ADD
511 WXK_NUMPAD_SEPARATOR = _core_.WXK_NUMPAD_SEPARATOR
512 WXK_NUMPAD_SUBTRACT = _core_.WXK_NUMPAD_SUBTRACT
513 WXK_NUMPAD_DECIMAL = _core_.WXK_NUMPAD_DECIMAL
514 WXK_NUMPAD_DIVIDE = _core_.WXK_NUMPAD_DIVIDE
515 WXK_WINDOWS_LEFT = _core_.WXK_WINDOWS_LEFT
516 WXK_WINDOWS_RIGHT = _core_.WXK_WINDOWS_RIGHT
517 WXK_WINDOWS_MENU = _core_.WXK_WINDOWS_MENU
518 PAPER_NONE = _core_.PAPER_NONE
519 PAPER_LETTER = _core_.PAPER_LETTER
520 PAPER_LEGAL = _core_.PAPER_LEGAL
521 PAPER_A4 = _core_.PAPER_A4
522 PAPER_CSHEET = _core_.PAPER_CSHEET
523 PAPER_DSHEET = _core_.PAPER_DSHEET
524 PAPER_ESHEET = _core_.PAPER_ESHEET
525 PAPER_LETTERSMALL = _core_.PAPER_LETTERSMALL
526 PAPER_TABLOID = _core_.PAPER_TABLOID
527 PAPER_LEDGER = _core_.PAPER_LEDGER
528 PAPER_STATEMENT = _core_.PAPER_STATEMENT
529 PAPER_EXECUTIVE = _core_.PAPER_EXECUTIVE
530 PAPER_A3 = _core_.PAPER_A3
531 PAPER_A4SMALL = _core_.PAPER_A4SMALL
532 PAPER_A5 = _core_.PAPER_A5
533 PAPER_B4 = _core_.PAPER_B4
534 PAPER_B5 = _core_.PAPER_B5
535 PAPER_FOLIO = _core_.PAPER_FOLIO
536 PAPER_QUARTO = _core_.PAPER_QUARTO
537 PAPER_10X14 = _core_.PAPER_10X14
538 PAPER_11X17 = _core_.PAPER_11X17
539 PAPER_NOTE = _core_.PAPER_NOTE
540 PAPER_ENV_9 = _core_.PAPER_ENV_9
541 PAPER_ENV_10 = _core_.PAPER_ENV_10
542 PAPER_ENV_11 = _core_.PAPER_ENV_11
543 PAPER_ENV_12 = _core_.PAPER_ENV_12
544 PAPER_ENV_14 = _core_.PAPER_ENV_14
545 PAPER_ENV_DL = _core_.PAPER_ENV_DL
546 PAPER_ENV_C5 = _core_.PAPER_ENV_C5
547 PAPER_ENV_C3 = _core_.PAPER_ENV_C3
548 PAPER_ENV_C4 = _core_.PAPER_ENV_C4
549 PAPER_ENV_C6 = _core_.PAPER_ENV_C6
550 PAPER_ENV_C65 = _core_.PAPER_ENV_C65
551 PAPER_ENV_B4 = _core_.PAPER_ENV_B4
552 PAPER_ENV_B5 = _core_.PAPER_ENV_B5
553 PAPER_ENV_B6 = _core_.PAPER_ENV_B6
554 PAPER_ENV_ITALY = _core_.PAPER_ENV_ITALY
555 PAPER_ENV_MONARCH = _core_.PAPER_ENV_MONARCH
556 PAPER_ENV_PERSONAL = _core_.PAPER_ENV_PERSONAL
557 PAPER_FANFOLD_US = _core_.PAPER_FANFOLD_US
558 PAPER_FANFOLD_STD_GERMAN = _core_.PAPER_FANFOLD_STD_GERMAN
559 PAPER_FANFOLD_LGL_GERMAN = _core_.PAPER_FANFOLD_LGL_GERMAN
560 PAPER_ISO_B4 = _core_.PAPER_ISO_B4
561 PAPER_JAPANESE_POSTCARD = _core_.PAPER_JAPANESE_POSTCARD
562 PAPER_9X11 = _core_.PAPER_9X11
563 PAPER_10X11 = _core_.PAPER_10X11
564 PAPER_15X11 = _core_.PAPER_15X11
565 PAPER_ENV_INVITE = _core_.PAPER_ENV_INVITE
566 PAPER_LETTER_EXTRA = _core_.PAPER_LETTER_EXTRA
567 PAPER_LEGAL_EXTRA = _core_.PAPER_LEGAL_EXTRA
568 PAPER_TABLOID_EXTRA = _core_.PAPER_TABLOID_EXTRA
569 PAPER_A4_EXTRA = _core_.PAPER_A4_EXTRA
570 PAPER_LETTER_TRANSVERSE = _core_.PAPER_LETTER_TRANSVERSE
571 PAPER_A4_TRANSVERSE = _core_.PAPER_A4_TRANSVERSE
572 PAPER_LETTER_EXTRA_TRANSVERSE = _core_.PAPER_LETTER_EXTRA_TRANSVERSE
573 PAPER_A_PLUS = _core_.PAPER_A_PLUS
574 PAPER_B_PLUS = _core_.PAPER_B_PLUS
575 PAPER_LETTER_PLUS = _core_.PAPER_LETTER_PLUS
576 PAPER_A4_PLUS = _core_.PAPER_A4_PLUS
577 PAPER_A5_TRANSVERSE = _core_.PAPER_A5_TRANSVERSE
578 PAPER_B5_TRANSVERSE = _core_.PAPER_B5_TRANSVERSE
579 PAPER_A3_EXTRA = _core_.PAPER_A3_EXTRA
580 PAPER_A5_EXTRA = _core_.PAPER_A5_EXTRA
581 PAPER_B5_EXTRA = _core_.PAPER_B5_EXTRA
582 PAPER_A2 = _core_.PAPER_A2
583 PAPER_A3_TRANSVERSE = _core_.PAPER_A3_TRANSVERSE
584 PAPER_A3_EXTRA_TRANSVERSE = _core_.PAPER_A3_EXTRA_TRANSVERSE
585 DUPLEX_SIMPLEX = _core_.DUPLEX_SIMPLEX
586 DUPLEX_HORIZONTAL = _core_.DUPLEX_HORIZONTAL
587 DUPLEX_VERTICAL = _core_.DUPLEX_VERTICAL
588 ITEM_SEPARATOR = _core_.ITEM_SEPARATOR
589 ITEM_NORMAL = _core_.ITEM_NORMAL
590 ITEM_CHECK = _core_.ITEM_CHECK
591 ITEM_RADIO = _core_.ITEM_RADIO
592 ITEM_MAX = _core_.ITEM_MAX
593 HT_NOWHERE = _core_.HT_NOWHERE
594 HT_SCROLLBAR_FIRST = _core_.HT_SCROLLBAR_FIRST
595 HT_SCROLLBAR_ARROW_LINE_1 = _core_.HT_SCROLLBAR_ARROW_LINE_1
596 HT_SCROLLBAR_ARROW_LINE_2 = _core_.HT_SCROLLBAR_ARROW_LINE_2
597 HT_SCROLLBAR_ARROW_PAGE_1 = _core_.HT_SCROLLBAR_ARROW_PAGE_1
598 HT_SCROLLBAR_ARROW_PAGE_2 = _core_.HT_SCROLLBAR_ARROW_PAGE_2
599 HT_SCROLLBAR_THUMB = _core_.HT_SCROLLBAR_THUMB
600 HT_SCROLLBAR_BAR_1 = _core_.HT_SCROLLBAR_BAR_1
601 HT_SCROLLBAR_BAR_2 = _core_.HT_SCROLLBAR_BAR_2
602 HT_SCROLLBAR_LAST = _core_.HT_SCROLLBAR_LAST
603 HT_WINDOW_OUTSIDE = _core_.HT_WINDOW_OUTSIDE
604 HT_WINDOW_INSIDE = _core_.HT_WINDOW_INSIDE
605 HT_WINDOW_VERT_SCROLLBAR = _core_.HT_WINDOW_VERT_SCROLLBAR
606 HT_WINDOW_HORZ_SCROLLBAR = _core_.HT_WINDOW_HORZ_SCROLLBAR
607 HT_WINDOW_CORNER = _core_.HT_WINDOW_CORNER
608 HT_MAX = _core_.HT_MAX
609 MOD_NONE = _core_.MOD_NONE
610 MOD_ALT = _core_.MOD_ALT
611 MOD_CONTROL = _core_.MOD_CONTROL
612 MOD_SHIFT = _core_.MOD_SHIFT
613 MOD_WIN = _core_.MOD_WIN
614 UPDATE_UI_NONE = _core_.UPDATE_UI_NONE
615 UPDATE_UI_RECURSE = _core_.UPDATE_UI_RECURSE
616 UPDATE_UI_FROMIDLE = _core_.UPDATE_UI_FROMIDLE
617 #---------------------------------------------------------------------------
618
619 class Object(object):
620 """
621 The base class for most wx objects, although in wxPython not
622 much functionality is needed nor exposed.
623 """
624 def __init__(self): raise RuntimeError, "No constructor defined"
625 def __repr__(self):
626 return "<%s.%s; proxy of C++ wxObject instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
627 def GetClassName(*args, **kwargs):
628 """
629 GetClassName(self) -> String
630
631 Returns the class name of the C++ class using wxRTTI.
632 """
633 return _core_.Object_GetClassName(*args, **kwargs)
634
635 def Destroy(*args, **kwargs):
636 """
637 Destroy(self)
638
639 Deletes the C++ object this Python object is a proxy for.
640 """
641 return _core_.Object_Destroy(*args, **kwargs)
642
643
644 class ObjectPtr(Object):
645 def __init__(self, this):
646 self.this = this
647 if not hasattr(self,"thisown"): self.thisown = 0
648 self.__class__ = Object
649 _core_.Object_swigregister(ObjectPtr)
650 _wxPySetDictionary = _core_._wxPySetDictionary
651
652 _wxPyFixStockObjects = _core_._wxPyFixStockObjects
653
654 cvar = _core_.cvar
655 EmptyString = cvar.EmptyString
656
657 #---------------------------------------------------------------------------
658
659 BITMAP_TYPE_INVALID = _core_.BITMAP_TYPE_INVALID
660 BITMAP_TYPE_BMP = _core_.BITMAP_TYPE_BMP
661 BITMAP_TYPE_ICO = _core_.BITMAP_TYPE_ICO
662 BITMAP_TYPE_CUR = _core_.BITMAP_TYPE_CUR
663 BITMAP_TYPE_XBM = _core_.BITMAP_TYPE_XBM
664 BITMAP_TYPE_XBM_DATA = _core_.BITMAP_TYPE_XBM_DATA
665 BITMAP_TYPE_XPM = _core_.BITMAP_TYPE_XPM
666 BITMAP_TYPE_XPM_DATA = _core_.BITMAP_TYPE_XPM_DATA
667 BITMAP_TYPE_TIF = _core_.BITMAP_TYPE_TIF
668 BITMAP_TYPE_GIF = _core_.BITMAP_TYPE_GIF
669 BITMAP_TYPE_PNG = _core_.BITMAP_TYPE_PNG
670 BITMAP_TYPE_JPEG = _core_.BITMAP_TYPE_JPEG
671 BITMAP_TYPE_PNM = _core_.BITMAP_TYPE_PNM
672 BITMAP_TYPE_PCX = _core_.BITMAP_TYPE_PCX
673 BITMAP_TYPE_PICT = _core_.BITMAP_TYPE_PICT
674 BITMAP_TYPE_ICON = _core_.BITMAP_TYPE_ICON
675 BITMAP_TYPE_ANI = _core_.BITMAP_TYPE_ANI
676 BITMAP_TYPE_IFF = _core_.BITMAP_TYPE_IFF
677 BITMAP_TYPE_MACCURSOR = _core_.BITMAP_TYPE_MACCURSOR
678 BITMAP_TYPE_ANY = _core_.BITMAP_TYPE_ANY
679 CURSOR_NONE = _core_.CURSOR_NONE
680 CURSOR_ARROW = _core_.CURSOR_ARROW
681 CURSOR_RIGHT_ARROW = _core_.CURSOR_RIGHT_ARROW
682 CURSOR_BULLSEYE = _core_.CURSOR_BULLSEYE
683 CURSOR_CHAR = _core_.CURSOR_CHAR
684 CURSOR_CROSS = _core_.CURSOR_CROSS
685 CURSOR_HAND = _core_.CURSOR_HAND
686 CURSOR_IBEAM = _core_.CURSOR_IBEAM
687 CURSOR_LEFT_BUTTON = _core_.CURSOR_LEFT_BUTTON
688 CURSOR_MAGNIFIER = _core_.CURSOR_MAGNIFIER
689 CURSOR_MIDDLE_BUTTON = _core_.CURSOR_MIDDLE_BUTTON
690 CURSOR_NO_ENTRY = _core_.CURSOR_NO_ENTRY
691 CURSOR_PAINT_BRUSH = _core_.CURSOR_PAINT_BRUSH
692 CURSOR_PENCIL = _core_.CURSOR_PENCIL
693 CURSOR_POINT_LEFT = _core_.CURSOR_POINT_LEFT
694 CURSOR_POINT_RIGHT = _core_.CURSOR_POINT_RIGHT
695 CURSOR_QUESTION_ARROW = _core_.CURSOR_QUESTION_ARROW
696 CURSOR_RIGHT_BUTTON = _core_.CURSOR_RIGHT_BUTTON
697 CURSOR_SIZENESW = _core_.CURSOR_SIZENESW
698 CURSOR_SIZENS = _core_.CURSOR_SIZENS
699 CURSOR_SIZENWSE = _core_.CURSOR_SIZENWSE
700 CURSOR_SIZEWE = _core_.CURSOR_SIZEWE
701 CURSOR_SIZING = _core_.CURSOR_SIZING
702 CURSOR_SPRAYCAN = _core_.CURSOR_SPRAYCAN
703 CURSOR_WAIT = _core_.CURSOR_WAIT
704 CURSOR_WATCH = _core_.CURSOR_WATCH
705 CURSOR_BLANK = _core_.CURSOR_BLANK
706 CURSOR_DEFAULT = _core_.CURSOR_DEFAULT
707 CURSOR_COPY_ARROW = _core_.CURSOR_COPY_ARROW
708 CURSOR_ARROWWAIT = _core_.CURSOR_ARROWWAIT
709 CURSOR_MAX = _core_.CURSOR_MAX
710 #---------------------------------------------------------------------------
711
712 class Size(object):
713 """
714 wx.Size is a useful data structure used to represent the size of
715 something. It simply contians integer width and height
716 proprtites. In most places in wxPython where a wx.Size is
717 expected a (width, height) tuple can be used instead.
718 """
719 def __repr__(self):
720 return "<%s.%s; proxy of C++ wxSize instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
721 width = property(_core_.Size_width_get, _core_.Size_width_set)
722 height = property(_core_.Size_height_get, _core_.Size_height_set)
723 x = width; y = height
724 def __init__(self, *args, **kwargs):
725 """
726 __init__(self, int w=0, int h=0) -> Size
727
728 Creates a size object.
729 """
730 newobj = _core_.new_Size(*args, **kwargs)
731 self.this = newobj.this
732 self.thisown = 1
733 del newobj.thisown
734 def __del__(self, destroy=_core_.delete_Size):
735 """__del__(self)"""
736 try:
737 if self.thisown: destroy(self)
738 except: pass
739
740 def __eq__(*args, **kwargs):
741 """
742 __eq__(self, Size sz) -> bool
743
744 Test for equality of wx.Size objects.
745 """
746 return _core_.Size___eq__(*args, **kwargs)
747
748 def __ne__(*args, **kwargs):
749 """
750 __ne__(self, Size sz) -> bool
751
752 Test for inequality.
753 """
754 return _core_.Size___ne__(*args, **kwargs)
755
756 def __add__(*args, **kwargs):
757 """
758 __add__(self, Size sz) -> Size
759
760 Add sz's proprties to this and return the result.
761 """
762 return _core_.Size___add__(*args, **kwargs)
763
764 def __sub__(*args, **kwargs):
765 """
766 __sub__(self, Size sz) -> Size
767
768 Subtract sz's properties from this and return the result.
769 """
770 return _core_.Size___sub__(*args, **kwargs)
771
772 def IncTo(*args, **kwargs):
773 """
774 IncTo(self, Size sz)
775
776 Increments this object so that both of its dimensions are not less
777 than the corresponding dimensions of the size.
778 """
779 return _core_.Size_IncTo(*args, **kwargs)
780
781 def DecTo(*args, **kwargs):
782 """
783 DecTo(self, Size sz)
784
785 Decrements this object so that both of its dimensions are not greater
786 than the corresponding dimensions of the size.
787 """
788 return _core_.Size_DecTo(*args, **kwargs)
789
790 def Set(*args, **kwargs):
791 """
792 Set(self, int w, int h)
793
794 Set both width and height.
795 """
796 return _core_.Size_Set(*args, **kwargs)
797
798 def SetWidth(*args, **kwargs):
799 """SetWidth(self, int w)"""
800 return _core_.Size_SetWidth(*args, **kwargs)
801
802 def SetHeight(*args, **kwargs):
803 """SetHeight(self, int h)"""
804 return _core_.Size_SetHeight(*args, **kwargs)
805
806 def GetWidth(*args, **kwargs):
807 """GetWidth(self) -> int"""
808 return _core_.Size_GetWidth(*args, **kwargs)
809
810 def GetHeight(*args, **kwargs):
811 """GetHeight(self) -> int"""
812 return _core_.Size_GetHeight(*args, **kwargs)
813
814 def IsFullySpecified(*args, **kwargs):
815 """
816 IsFullySpecified(self) -> bool
817
818 Returns True if both components of the size are non-default values.
819 """
820 return _core_.Size_IsFullySpecified(*args, **kwargs)
821
822 def SetDefaults(*args, **kwargs):
823 """
824 SetDefaults(self, Size size)
825
826 Combine this size with the other one replacing the default components
827 of this object (i.e. equal to -1) with those of the other.
828 """
829 return _core_.Size_SetDefaults(*args, **kwargs)
830
831 def Get(*args, **kwargs):
832 """
833 Get() -> (width,height)
834
835 Returns the width and height properties as a tuple.
836 """
837 return _core_.Size_Get(*args, **kwargs)
838
839 asTuple = wx._deprecated(Get, "asTuple is deprecated, use `Get` instead")
840 def __str__(self): return str(self.Get())
841 def __repr__(self): return 'wx.Size'+str(self.Get())
842 def __len__(self): return len(self.Get())
843 def __getitem__(self, index): return self.Get()[index]
844 def __setitem__(self, index, val):
845 if index == 0: self.width = val
846 elif index == 1: self.height = val
847 else: raise IndexError
848 def __nonzero__(self): return self.Get() != (0,0)
849 __safe_for_unpickling__ = True
850 def __reduce__(self): return (wx.Size, self.Get())
851
852
853 class SizePtr(Size):
854 def __init__(self, this):
855 self.this = this
856 if not hasattr(self,"thisown"): self.thisown = 0
857 self.__class__ = Size
858 _core_.Size_swigregister(SizePtr)
859
860 #---------------------------------------------------------------------------
861
862 class RealPoint(object):
863 """
864 A data structure for representing a point or position with floating
865 point x and y properties. In wxPython most places that expect a
866 wx.RealPoint can also accept a (x,y) tuple.
867 """
868 def __repr__(self):
869 return "<%s.%s; proxy of C++ wxRealPoint instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
870 x = property(_core_.RealPoint_x_get, _core_.RealPoint_x_set)
871 y = property(_core_.RealPoint_y_get, _core_.RealPoint_y_set)
872 def __init__(self, *args, **kwargs):
873 """
874 __init__(self, double x=0.0, double y=0.0) -> RealPoint
875
876 Create a wx.RealPoint object
877 """
878 newobj = _core_.new_RealPoint(*args, **kwargs)
879 self.this = newobj.this
880 self.thisown = 1
881 del newobj.thisown
882 def __del__(self, destroy=_core_.delete_RealPoint):
883 """__del__(self)"""
884 try:
885 if self.thisown: destroy(self)
886 except: pass
887
888 def __eq__(*args, **kwargs):
889 """
890 __eq__(self, RealPoint pt) -> bool
891
892 Test for equality of wx.RealPoint objects.
893 """
894 return _core_.RealPoint___eq__(*args, **kwargs)
895
896 def __ne__(*args, **kwargs):
897 """
898 __ne__(self, RealPoint pt) -> bool
899
900 Test for inequality of wx.RealPoint objects.
901 """
902 return _core_.RealPoint___ne__(*args, **kwargs)
903
904 def __add__(*args, **kwargs):
905 """
906 __add__(self, RealPoint pt) -> RealPoint
907
908 Add pt's proprties to this and return the result.
909 """
910 return _core_.RealPoint___add__(*args, **kwargs)
911
912 def __sub__(*args, **kwargs):
913 """
914 __sub__(self, RealPoint pt) -> RealPoint
915
916 Subtract pt's proprties from this and return the result
917 """
918 return _core_.RealPoint___sub__(*args, **kwargs)
919
920 def Set(*args, **kwargs):
921 """
922 Set(self, double x, double y)
923
924 Set both the x and y properties
925 """
926 return _core_.RealPoint_Set(*args, **kwargs)
927
928 def Get(*args, **kwargs):
929 """
930 Get() -> (x,y)
931
932 Return the x and y properties as a tuple.
933 """
934 return _core_.RealPoint_Get(*args, **kwargs)
935
936 asTuple = wx._deprecated(Get, "asTuple is deprecated, use `Get` instead")
937 def __str__(self): return str(self.Get())
938 def __repr__(self): return 'wx.RealPoint'+str(self.Get())
939 def __len__(self): return len(self.Get())
940 def __getitem__(self, index): return self.Get()[index]
941 def __setitem__(self, index, val):
942 if index == 0: self.x = val
943 elif index == 1: self.y = val
944 else: raise IndexError
945 def __nonzero__(self): return self.Get() != (0.0, 0.0)
946 __safe_for_unpickling__ = True
947 def __reduce__(self): return (wx.RealPoint, self.Get())
948
949
950 class RealPointPtr(RealPoint):
951 def __init__(self, this):
952 self.this = this
953 if not hasattr(self,"thisown"): self.thisown = 0
954 self.__class__ = RealPoint
955 _core_.RealPoint_swigregister(RealPointPtr)
956
957 #---------------------------------------------------------------------------
958
959 class Point(object):
960 """
961 A data structure for representing a point or position with integer x
962 and y properties. Most places in wxPython that expect a wx.Point can
963 also accept a (x,y) tuple.
964 """
965 def __repr__(self):
966 return "<%s.%s; proxy of C++ wxPoint instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
967 x = property(_core_.Point_x_get, _core_.Point_x_set)
968 y = property(_core_.Point_y_get, _core_.Point_y_set)
969 def __init__(self, *args, **kwargs):
970 """
971 __init__(self, int x=0, int y=0) -> Point
972
973 Create a wx.Point object
974 """
975 newobj = _core_.new_Point(*args, **kwargs)
976 self.this = newobj.this
977 self.thisown = 1
978 del newobj.thisown
979 def __del__(self, destroy=_core_.delete_Point):
980 """__del__(self)"""
981 try:
982 if self.thisown: destroy(self)
983 except: pass
984
985 def __eq__(*args, **kwargs):
986 """
987 __eq__(self, Point pt) -> bool
988
989 Test for equality of wx.Point objects.
990 """
991 return _core_.Point___eq__(*args, **kwargs)
992
993 def __ne__(*args, **kwargs):
994 """
995 __ne__(self, Point pt) -> bool
996
997 Test for inequality of wx.Point objects.
998 """
999 return _core_.Point___ne__(*args, **kwargs)
1000
1001 def __add__(*args, **kwargs):
1002 """
1003 __add__(self, Point pt) -> Point
1004
1005 Add pt's proprties to this and return the result.
1006 """
1007 return _core_.Point___add__(*args, **kwargs)
1008
1009 def __sub__(*args, **kwargs):
1010 """
1011 __sub__(self, Point pt) -> Point
1012
1013 Subtract pt's proprties from this and return the result
1014 """
1015 return _core_.Point___sub__(*args, **kwargs)
1016
1017 def __iadd__(*args, **kwargs):
1018 """
1019 __iadd__(self, Point pt) -> Point
1020
1021 Add pt to this object.
1022 """
1023 return _core_.Point___iadd__(*args, **kwargs)
1024
1025 def __isub__(*args, **kwargs):
1026 """
1027 __isub__(self, Point pt) -> Point
1028
1029 Subtract pt from this object.
1030 """
1031 return _core_.Point___isub__(*args, **kwargs)
1032
1033 def Set(*args, **kwargs):
1034 """
1035 Set(self, long x, long y)
1036
1037 Set both the x and y properties
1038 """
1039 return _core_.Point_Set(*args, **kwargs)
1040
1041 def Get(*args, **kwargs):
1042 """
1043 Get() -> (x,y)
1044
1045 Return the x and y properties as a tuple.
1046 """
1047 return _core_.Point_Get(*args, **kwargs)
1048
1049 asTuple = wx._deprecated(Get, "asTuple is deprecated, use `Get` instead")
1050 def __str__(self): return str(self.Get())
1051 def __repr__(self): return 'wx.Point'+str(self.Get())
1052 def __len__(self): return len(self.Get())
1053 def __getitem__(self, index): return self.Get()[index]
1054 def __setitem__(self, index, val):
1055 if index == 0: self.x = val
1056 elif index == 1: self.y = val
1057 else: raise IndexError
1058 def __nonzero__(self): return self.Get() != (0,0)
1059 __safe_for_unpickling__ = True
1060 def __reduce__(self): return (wx.Point, self.Get())
1061
1062
1063 class PointPtr(Point):
1064 def __init__(self, this):
1065 self.this = this
1066 if not hasattr(self,"thisown"): self.thisown = 0
1067 self.__class__ = Point
1068 _core_.Point_swigregister(PointPtr)
1069
1070 #---------------------------------------------------------------------------
1071
1072 class Rect(object):
1073 """
1074 A class for representing and manipulating rectangles. It has x, y,
1075 width and height properties. In wxPython most palces that expect a
1076 wx.Rect can also accept a (x,y,width,height) tuple.
1077 """
1078 def __repr__(self):
1079 return "<%s.%s; proxy of C++ wxRect instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
1080 def __init__(self, *args, **kwargs):
1081 """
1082 __init__(self, int x=0, int y=0, int width=0, int height=0) -> Rect
1083
1084 Create a new Rect object.
1085 """
1086 newobj = _core_.new_Rect(*args, **kwargs)
1087 self.this = newobj.this
1088 self.thisown = 1
1089 del newobj.thisown
1090 def __del__(self, destroy=_core_.delete_Rect):
1091 """__del__(self)"""
1092 try:
1093 if self.thisown: destroy(self)
1094 except: pass
1095
1096 def GetX(*args, **kwargs):
1097 """GetX(self) -> int"""
1098 return _core_.Rect_GetX(*args, **kwargs)
1099
1100 def SetX(*args, **kwargs):
1101 """SetX(self, int x)"""
1102 return _core_.Rect_SetX(*args, **kwargs)
1103
1104 def GetY(*args, **kwargs):
1105 """GetY(self) -> int"""
1106 return _core_.Rect_GetY(*args, **kwargs)
1107
1108 def SetY(*args, **kwargs):
1109 """SetY(self, int y)"""
1110 return _core_.Rect_SetY(*args, **kwargs)
1111
1112 def GetWidth(*args, **kwargs):
1113 """GetWidth(self) -> int"""
1114 return _core_.Rect_GetWidth(*args, **kwargs)
1115
1116 def SetWidth(*args, **kwargs):
1117 """SetWidth(self, int w)"""
1118 return _core_.Rect_SetWidth(*args, **kwargs)
1119
1120 def GetHeight(*args, **kwargs):
1121 """GetHeight(self) -> int"""
1122 return _core_.Rect_GetHeight(*args, **kwargs)
1123
1124 def SetHeight(*args, **kwargs):
1125 """SetHeight(self, int h)"""
1126 return _core_.Rect_SetHeight(*args, **kwargs)
1127
1128 def GetPosition(*args, **kwargs):
1129 """GetPosition(self) -> Point"""
1130 return _core_.Rect_GetPosition(*args, **kwargs)
1131
1132 def SetPosition(*args, **kwargs):
1133 """SetPosition(self, Point p)"""
1134 return _core_.Rect_SetPosition(*args, **kwargs)
1135
1136 def GetSize(*args, **kwargs):
1137 """GetSize(self) -> Size"""
1138 return _core_.Rect_GetSize(*args, **kwargs)
1139
1140 def SetSize(*args, **kwargs):
1141 """SetSize(self, Size s)"""
1142 return _core_.Rect_SetSize(*args, **kwargs)
1143
1144 def GetTopLeft(*args, **kwargs):
1145 """GetTopLeft(self) -> Point"""
1146 return _core_.Rect_GetTopLeft(*args, **kwargs)
1147
1148 def SetTopLeft(*args, **kwargs):
1149 """SetTopLeft(self, Point p)"""
1150 return _core_.Rect_SetTopLeft(*args, **kwargs)
1151
1152 def GetBottomRight(*args, **kwargs):
1153 """GetBottomRight(self) -> Point"""
1154 return _core_.Rect_GetBottomRight(*args, **kwargs)
1155
1156 def SetBottomRight(*args, **kwargs):
1157 """SetBottomRight(self, Point p)"""
1158 return _core_.Rect_SetBottomRight(*args, **kwargs)
1159
1160 def GetLeft(*args, **kwargs):
1161 """GetLeft(self) -> int"""
1162 return _core_.Rect_GetLeft(*args, **kwargs)
1163
1164 def GetTop(*args, **kwargs):
1165 """GetTop(self) -> int"""
1166 return _core_.Rect_GetTop(*args, **kwargs)
1167
1168 def GetBottom(*args, **kwargs):
1169 """GetBottom(self) -> int"""
1170 return _core_.Rect_GetBottom(*args, **kwargs)
1171
1172 def GetRight(*args, **kwargs):
1173 """GetRight(self) -> int"""
1174 return _core_.Rect_GetRight(*args, **kwargs)
1175
1176 def SetLeft(*args, **kwargs):
1177 """SetLeft(self, int left)"""
1178 return _core_.Rect_SetLeft(*args, **kwargs)
1179
1180 def SetRight(*args, **kwargs):
1181 """SetRight(self, int right)"""
1182 return _core_.Rect_SetRight(*args, **kwargs)
1183
1184 def SetTop(*args, **kwargs):
1185 """SetTop(self, int top)"""
1186 return _core_.Rect_SetTop(*args, **kwargs)
1187
1188 def SetBottom(*args, **kwargs):
1189 """SetBottom(self, int bottom)"""
1190 return _core_.Rect_SetBottom(*args, **kwargs)
1191
1192 position = property(GetPosition, SetPosition)
1193 size = property(GetSize, SetSize)
1194 left = property(GetLeft, SetLeft)
1195 right = property(GetRight, SetRight)
1196 top = property(GetTop, SetTop)
1197 bottom = property(GetBottom, SetBottom)
1198
1199 def Inflate(*args, **kwargs):
1200 """
1201 Inflate(self, int dx, int dy) -> Rect
1202
1203 Increase the rectangle size by dx in x direction and dy in y
1204 direction. Both (or one of) parameters may be negative to decrease the
1205 rectangle size.
1206 """
1207 return _core_.Rect_Inflate(*args, **kwargs)
1208
1209 def Deflate(*args, **kwargs):
1210 """
1211 Deflate(self, int dx, int dy) -> Rect
1212
1213 Decrease the rectangle size by dx in x direction and dy in y
1214 direction. Both (or one of) parameters may be negative to increase the
1215 rectngle size. This method is the opposite of Inflate.
1216 """
1217 return _core_.Rect_Deflate(*args, **kwargs)
1218
1219 def OffsetXY(*args, **kwargs):
1220 """
1221 OffsetXY(self, int dx, int dy)
1222
1223 Moves the rectangle by the specified offset. If dx is positive, the
1224 rectangle is moved to the right, if dy is positive, it is moved to the
1225 bottom, otherwise it is moved to the left or top respectively.
1226 """
1227 return _core_.Rect_OffsetXY(*args, **kwargs)
1228
1229 def Offset(*args, **kwargs):
1230 """
1231 Offset(self, Point pt)
1232
1233 Same as OffsetXY but uses dx,dy from Point
1234 """
1235 return _core_.Rect_Offset(*args, **kwargs)
1236
1237 def Intersect(*args, **kwargs):
1238 """
1239 Intersect(self, Rect rect) -> Rect
1240
1241 Returns the intersectsion of this rectangle and rect.
1242 """
1243 return _core_.Rect_Intersect(*args, **kwargs)
1244
1245 def Union(*args, **kwargs):
1246 """
1247 Union(self, Rect rect) -> Rect
1248
1249 Returns the union of this rectangle and rect.
1250 """
1251 return _core_.Rect_Union(*args, **kwargs)
1252
1253 def __add__(*args, **kwargs):
1254 """
1255 __add__(self, Rect rect) -> Rect
1256
1257 Add the properties of rect to this rectangle and return the result.
1258 """
1259 return _core_.Rect___add__(*args, **kwargs)
1260
1261 def __iadd__(*args, **kwargs):
1262 """
1263 __iadd__(self, Rect rect) -> Rect
1264
1265 Add the properties of rect to this rectangle, updating this rectangle.
1266 """
1267 return _core_.Rect___iadd__(*args, **kwargs)
1268
1269 def __eq__(*args, **kwargs):
1270 """
1271 __eq__(self, Rect rect) -> bool
1272
1273 Test for equality.
1274 """
1275 return _core_.Rect___eq__(*args, **kwargs)
1276
1277 def __ne__(*args, **kwargs):
1278 """
1279 __ne__(self, Rect rect) -> bool
1280
1281 Test for inequality.
1282 """
1283 return _core_.Rect___ne__(*args, **kwargs)
1284
1285 def InsideXY(*args, **kwargs):
1286 """
1287 InsideXY(self, int x, int y) -> bool
1288
1289 Return True if the point is (not strcitly) inside the rect.
1290 """
1291 return _core_.Rect_InsideXY(*args, **kwargs)
1292
1293 def Inside(*args, **kwargs):
1294 """
1295 Inside(self, Point pt) -> bool
1296
1297 Return True if the point is (not strcitly) inside the rect.
1298 """
1299 return _core_.Rect_Inside(*args, **kwargs)
1300
1301 def Intersects(*args, **kwargs):
1302 """
1303 Intersects(self, Rect rect) -> bool
1304
1305 Returns True if the rectangles have a non empty intersection.
1306 """
1307 return _core_.Rect_Intersects(*args, **kwargs)
1308
1309 x = property(_core_.Rect_x_get, _core_.Rect_x_set)
1310 y = property(_core_.Rect_y_get, _core_.Rect_y_set)
1311 width = property(_core_.Rect_width_get, _core_.Rect_width_set)
1312 height = property(_core_.Rect_height_get, _core_.Rect_height_set)
1313 def Set(*args, **kwargs):
1314 """
1315 Set(self, int x=0, int y=0, int width=0, int height=0)
1316
1317 Set all rectangle properties.
1318 """
1319 return _core_.Rect_Set(*args, **kwargs)
1320
1321 def Get(*args, **kwargs):
1322 """
1323 Get() -> (x,y,width,height)
1324
1325 Return the rectangle properties as a tuple.
1326 """
1327 return _core_.Rect_Get(*args, **kwargs)
1328
1329 asTuple = wx._deprecated(Get, "asTuple is deprecated, use `Get` instead")
1330 def __str__(self): return str(self.Get())
1331 def __repr__(self): return 'wx.Rect'+str(self.Get())
1332 def __len__(self): return len(self.Get())
1333 def __getitem__(self, index): return self.Get()[index]
1334 def __setitem__(self, index, val):
1335 if index == 0: self.x = val
1336 elif index == 1: self.y = val
1337 elif index == 2: self.width = val
1338 elif index == 3: self.height = val
1339 else: raise IndexError
1340 def __nonzero__(self): return self.Get() != (0,0,0,0)
1341 __safe_for_unpickling__ = True
1342 def __reduce__(self): return (wx.Rect, self.Get())
1343
1344
1345 class RectPtr(Rect):
1346 def __init__(self, this):
1347 self.this = this
1348 if not hasattr(self,"thisown"): self.thisown = 0
1349 self.__class__ = Rect
1350 _core_.Rect_swigregister(RectPtr)
1351
1352 def RectPP(*args, **kwargs):
1353 """
1354 RectPP(Point topLeft, Point bottomRight) -> Rect
1355
1356 Create a new Rect object from Points representing two corners.
1357 """
1358 val = _core_.new_RectPP(*args, **kwargs)
1359 val.thisown = 1
1360 return val
1361
1362 def RectPS(*args, **kwargs):
1363 """
1364 RectPS(Point pos, Size size) -> Rect
1365
1366 Create a new Rect from a position and size.
1367 """
1368 val = _core_.new_RectPS(*args, **kwargs)
1369 val.thisown = 1
1370 return val
1371
1372 def RectS(*args, **kwargs):
1373 """
1374 RectS(Size size) -> Rect
1375
1376 Create a new Rect from a size only.
1377 """
1378 val = _core_.new_RectS(*args, **kwargs)
1379 val.thisown = 1
1380 return val
1381
1382
1383 def IntersectRect(*args, **kwargs):
1384 """
1385 IntersectRect(Rect r1, Rect r2) -> Rect
1386
1387 Calculate and return the intersection of r1 and r2.
1388 """
1389 return _core_.IntersectRect(*args, **kwargs)
1390 #---------------------------------------------------------------------------
1391
1392 class Point2D(object):
1393 """
1394 wx.Point2Ds represent a point or a vector in a 2d coordinate system
1395 with floating point values.
1396 """
1397 def __repr__(self):
1398 return "<%s.%s; proxy of C++ wxPoint2D instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
1399 def __init__(self, *args, **kwargs):
1400 """
1401 __init__(self, double x=0.0, double y=0.0) -> Point2D
1402
1403 Create a w.Point2D object.
1404 """
1405 newobj = _core_.new_Point2D(*args, **kwargs)
1406 self.this = newobj.this
1407 self.thisown = 1
1408 del newobj.thisown
1409 def GetFloor(*args, **kwargs):
1410 """
1411 GetFloor() -> (x,y)
1412
1413 Convert to integer
1414 """
1415 return _core_.Point2D_GetFloor(*args, **kwargs)
1416
1417 def GetRounded(*args, **kwargs):
1418 """
1419 GetRounded() -> (x,y)
1420
1421 Convert to integer
1422 """
1423 return _core_.Point2D_GetRounded(*args, **kwargs)
1424
1425 def GetVectorLength(*args, **kwargs):
1426 """GetVectorLength(self) -> double"""
1427 return _core_.Point2D_GetVectorLength(*args, **kwargs)
1428
1429 def GetVectorAngle(*args, **kwargs):
1430 """GetVectorAngle(self) -> double"""
1431 return _core_.Point2D_GetVectorAngle(*args, **kwargs)
1432
1433 def SetVectorLength(*args, **kwargs):
1434 """SetVectorLength(self, double length)"""
1435 return _core_.Point2D_SetVectorLength(*args, **kwargs)
1436
1437 def SetVectorAngle(*args, **kwargs):
1438 """SetVectorAngle(self, double degrees)"""
1439 return _core_.Point2D_SetVectorAngle(*args, **kwargs)
1440
1441 def SetPolarCoordinates(self, angle, length):
1442 self.SetVectorLength(length)
1443 self.SetVectorAngle(angle)
1444 def Normalize(self):
1445 self.SetVectorLength(1.0)
1446
1447 def GetDistance(*args, **kwargs):
1448 """GetDistance(self, Point2D pt) -> double"""
1449 return _core_.Point2D_GetDistance(*args, **kwargs)
1450
1451 def GetDistanceSquare(*args, **kwargs):
1452 """GetDistanceSquare(self, Point2D pt) -> double"""
1453 return _core_.Point2D_GetDistanceSquare(*args, **kwargs)
1454
1455 def GetDotProduct(*args, **kwargs):
1456 """GetDotProduct(self, Point2D vec) -> double"""
1457 return _core_.Point2D_GetDotProduct(*args, **kwargs)
1458
1459 def GetCrossProduct(*args, **kwargs):
1460 """GetCrossProduct(self, Point2D vec) -> double"""
1461 return _core_.Point2D_GetCrossProduct(*args, **kwargs)
1462
1463 def __neg__(*args, **kwargs):
1464 """
1465 __neg__(self) -> Point2D
1466
1467 the reflection of this point
1468 """
1469 return _core_.Point2D___neg__(*args, **kwargs)
1470
1471 def __iadd__(*args, **kwargs):
1472 """__iadd__(self, Point2D pt) -> Point2D"""
1473 return _core_.Point2D___iadd__(*args, **kwargs)
1474
1475 def __isub__(*args, **kwargs):
1476 """__isub__(self, Point2D pt) -> Point2D"""
1477 return _core_.Point2D___isub__(*args, **kwargs)
1478
1479 def __imul__(*args, **kwargs):
1480 """__imul__(self, Point2D pt) -> Point2D"""
1481 return _core_.Point2D___imul__(*args, **kwargs)
1482
1483 def __idiv__(*args, **kwargs):
1484 """__idiv__(self, Point2D pt) -> Point2D"""
1485 return _core_.Point2D___idiv__(*args, **kwargs)
1486
1487 def __eq__(*args, **kwargs):
1488 """
1489 __eq__(self, Point2D pt) -> bool
1490
1491 Test for equality
1492 """
1493 return _core_.Point2D___eq__(*args, **kwargs)
1494
1495 def __ne__(*args, **kwargs):
1496 """
1497 __ne__(self, Point2D pt) -> bool
1498
1499 Test for inequality
1500 """
1501 return _core_.Point2D___ne__(*args, **kwargs)
1502
1503 x = property(_core_.Point2D_x_get, _core_.Point2D_x_set)
1504 y = property(_core_.Point2D_y_get, _core_.Point2D_y_set)
1505 def Set(*args, **kwargs):
1506 """Set(self, double x=0, double y=0)"""
1507 return _core_.Point2D_Set(*args, **kwargs)
1508
1509 def Get(*args, **kwargs):
1510 """
1511 Get() -> (x,y)
1512
1513 Return x and y properties as a tuple.
1514 """
1515 return _core_.Point2D_Get(*args, **kwargs)
1516
1517 asTuple = wx._deprecated(Get, "asTuple is deprecated, use `Get` instead")
1518 def __str__(self): return str(self.Get())
1519 def __repr__(self): return 'wx.Point2D'+str(self.Get())
1520 def __len__(self): return len(self.Get())
1521 def __getitem__(self, index): return self.Get()[index]
1522 def __setitem__(self, index, val):
1523 if index == 0: self.x = val
1524 elif index == 1: self.y = val
1525 else: raise IndexError
1526 def __nonzero__(self): return self.Get() != (0.0, 0.0)
1527 __safe_for_unpickling__ = True
1528 def __reduce__(self): return (wx.Point2D, self.Get())
1529
1530
1531 class Point2DPtr(Point2D):
1532 def __init__(self, this):
1533 self.this = this
1534 if not hasattr(self,"thisown"): self.thisown = 0
1535 self.__class__ = Point2D
1536 _core_.Point2D_swigregister(Point2DPtr)
1537
1538 def Point2DCopy(*args, **kwargs):
1539 """
1540 Point2DCopy(Point2D pt) -> Point2D
1541
1542 Create a w.Point2D object.
1543 """
1544 val = _core_.new_Point2DCopy(*args, **kwargs)
1545 val.thisown = 1
1546 return val
1547
1548 def Point2DFromPoint(*args, **kwargs):
1549 """
1550 Point2DFromPoint(Point pt) -> Point2D
1551
1552 Create a w.Point2D object.
1553 """
1554 val = _core_.new_Point2DFromPoint(*args, **kwargs)
1555 val.thisown = 1
1556 return val
1557
1558 #---------------------------------------------------------------------------
1559
1560 FromStart = _core_.FromStart
1561 FromCurrent = _core_.FromCurrent
1562 FromEnd = _core_.FromEnd
1563 class InputStream(object):
1564 """Proxy of C++ InputStream class"""
1565 def __repr__(self):
1566 return "<%s.%s; proxy of C++ wxPyInputStream instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
1567 def __init__(self, *args, **kwargs):
1568 """__init__(self, PyObject p) -> InputStream"""
1569 newobj = _core_.new_InputStream(*args, **kwargs)
1570 self.this = newobj.this
1571 self.thisown = 1
1572 del newobj.thisown
1573 def __del__(self, destroy=_core_.delete_InputStream):
1574 """__del__(self)"""
1575 try:
1576 if self.thisown: destroy(self)
1577 except: pass
1578
1579 def close(*args, **kwargs):
1580 """close(self)"""
1581 return _core_.InputStream_close(*args, **kwargs)
1582
1583 def flush(*args, **kwargs):
1584 """flush(self)"""
1585 return _core_.InputStream_flush(*args, **kwargs)
1586
1587 def eof(*args, **kwargs):
1588 """eof(self) -> bool"""
1589 return _core_.InputStream_eof(*args, **kwargs)
1590
1591 def read(*args, **kwargs):
1592 """read(self, int size=-1) -> PyObject"""
1593 return _core_.InputStream_read(*args, **kwargs)
1594
1595 def readline(*args, **kwargs):
1596 """readline(self, int size=-1) -> PyObject"""
1597 return _core_.InputStream_readline(*args, **kwargs)
1598
1599 def readlines(*args, **kwargs):
1600 """readlines(self, int sizehint=-1) -> PyObject"""
1601 return _core_.InputStream_readlines(*args, **kwargs)
1602
1603 def seek(*args, **kwargs):
1604 """seek(self, int offset, int whence=0)"""
1605 return _core_.InputStream_seek(*args, **kwargs)
1606
1607 def tell(*args, **kwargs):
1608 """tell(self) -> int"""
1609 return _core_.InputStream_tell(*args, **kwargs)
1610
1611 def Peek(*args, **kwargs):
1612 """Peek(self) -> char"""
1613 return _core_.InputStream_Peek(*args, **kwargs)
1614
1615 def GetC(*args, **kwargs):
1616 """GetC(self) -> char"""
1617 return _core_.InputStream_GetC(*args, **kwargs)
1618
1619 def LastRead(*args, **kwargs):
1620 """LastRead(self) -> size_t"""
1621 return _core_.InputStream_LastRead(*args, **kwargs)
1622
1623 def CanRead(*args, **kwargs):
1624 """CanRead(self) -> bool"""
1625 return _core_.InputStream_CanRead(*args, **kwargs)
1626
1627 def Eof(*args, **kwargs):
1628 """Eof(self) -> bool"""
1629 return _core_.InputStream_Eof(*args, **kwargs)
1630
1631 def Ungetch(*args, **kwargs):
1632 """Ungetch(self, char c) -> bool"""
1633 return _core_.InputStream_Ungetch(*args, **kwargs)
1634
1635 def SeekI(*args, **kwargs):
1636 """SeekI(self, long pos, int mode=FromStart) -> long"""
1637 return _core_.InputStream_SeekI(*args, **kwargs)
1638
1639 def TellI(*args, **kwargs):
1640 """TellI(self) -> long"""
1641 return _core_.InputStream_TellI(*args, **kwargs)
1642
1643
1644 class InputStreamPtr(InputStream):
1645 def __init__(self, this):
1646 self.this = this
1647 if not hasattr(self,"thisown"): self.thisown = 0
1648 self.__class__ = InputStream
1649 _core_.InputStream_swigregister(InputStreamPtr)
1650 DefaultPosition = cvar.DefaultPosition
1651 DefaultSize = cvar.DefaultSize
1652
1653 class OutputStream(object):
1654 """Proxy of C++ OutputStream class"""
1655 def __init__(self): raise RuntimeError, "No constructor defined"
1656 def __repr__(self):
1657 return "<%s.%s; proxy of C++ wxOutputStream instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
1658 def write(*args, **kwargs):
1659 """write(self, PyObject obj)"""
1660 return _core_.OutputStream_write(*args, **kwargs)
1661
1662
1663 class OutputStreamPtr(OutputStream):
1664 def __init__(self, this):
1665 self.this = this
1666 if not hasattr(self,"thisown"): self.thisown = 0
1667 self.__class__ = OutputStream
1668 _core_.OutputStream_swigregister(OutputStreamPtr)
1669
1670 #---------------------------------------------------------------------------
1671
1672 class FSFile(Object):
1673 """Proxy of C++ FSFile class"""
1674 def __repr__(self):
1675 return "<%s.%s; proxy of C++ wxFSFile instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
1676 def __init__(self, *args, **kwargs):
1677 """
1678 __init__(self, InputStream stream, String loc, String mimetype, String anchor,
1679 DateTime modif) -> FSFile
1680 """
1681 newobj = _core_.new_FSFile(*args, **kwargs)
1682 self.this = newobj.this
1683 self.thisown = 1
1684 del newobj.thisown
1685 self.thisown = 0 # It will normally be deleted by the user of the wxFileSystem
1686
1687 def __del__(self, destroy=_core_.delete_FSFile):
1688 """__del__(self)"""
1689 try:
1690 if self.thisown: destroy(self)
1691 except: pass
1692
1693 def GetStream(*args, **kwargs):
1694 """GetStream(self) -> InputStream"""
1695 return _core_.FSFile_GetStream(*args, **kwargs)
1696
1697 def GetMimeType(*args, **kwargs):
1698 """GetMimeType(self) -> String"""
1699 return _core_.FSFile_GetMimeType(*args, **kwargs)
1700
1701 def GetLocation(*args, **kwargs):
1702 """GetLocation(self) -> String"""
1703 return _core_.FSFile_GetLocation(*args, **kwargs)
1704
1705 def GetAnchor(*args, **kwargs):
1706 """GetAnchor(self) -> String"""
1707 return _core_.FSFile_GetAnchor(*args, **kwargs)
1708
1709 def GetModificationTime(*args, **kwargs):
1710 """GetModificationTime(self) -> DateTime"""
1711 return _core_.FSFile_GetModificationTime(*args, **kwargs)
1712
1713
1714 class FSFilePtr(FSFile):
1715 def __init__(self, this):
1716 self.this = this
1717 if not hasattr(self,"thisown"): self.thisown = 0
1718 self.__class__ = FSFile
1719 _core_.FSFile_swigregister(FSFilePtr)
1720
1721 class CPPFileSystemHandler(object):
1722 """Proxy of C++ CPPFileSystemHandler class"""
1723 def __init__(self): raise RuntimeError, "No constructor defined"
1724 def __repr__(self):
1725 return "<%s.%s; proxy of C++ wxFileSystemHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
1726
1727 class CPPFileSystemHandlerPtr(CPPFileSystemHandler):
1728 def __init__(self, this):
1729 self.this = this
1730 if not hasattr(self,"thisown"): self.thisown = 0
1731 self.__class__ = CPPFileSystemHandler
1732 _core_.CPPFileSystemHandler_swigregister(CPPFileSystemHandlerPtr)
1733
1734 class FileSystemHandler(CPPFileSystemHandler):
1735 """Proxy of C++ FileSystemHandler class"""
1736 def __repr__(self):
1737 return "<%s.%s; proxy of C++ wxPyFileSystemHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
1738 def __init__(self, *args, **kwargs):
1739 """__init__(self) -> FileSystemHandler"""
1740 newobj = _core_.new_FileSystemHandler(*args, **kwargs)
1741 self.this = newobj.this
1742 self.thisown = 1
1743 del newobj.thisown
1744 self._setCallbackInfo(self, FileSystemHandler)
1745
1746 def _setCallbackInfo(*args, **kwargs):
1747 """_setCallbackInfo(self, PyObject self, PyObject _class)"""
1748 return _core_.FileSystemHandler__setCallbackInfo(*args, **kwargs)
1749
1750 def CanOpen(*args, **kwargs):
1751 """CanOpen(self, String location) -> bool"""
1752 return _core_.FileSystemHandler_CanOpen(*args, **kwargs)
1753
1754 def OpenFile(*args, **kwargs):
1755 """OpenFile(self, FileSystem fs, String location) -> FSFile"""
1756 return _core_.FileSystemHandler_OpenFile(*args, **kwargs)
1757
1758 def FindFirst(*args, **kwargs):
1759 """FindFirst(self, String spec, int flags=0) -> String"""
1760 return _core_.FileSystemHandler_FindFirst(*args, **kwargs)
1761
1762 def FindNext(*args, **kwargs):
1763 """FindNext(self) -> String"""
1764 return _core_.FileSystemHandler_FindNext(*args, **kwargs)
1765
1766 def GetProtocol(*args, **kwargs):
1767 """GetProtocol(self, String location) -> String"""
1768 return _core_.FileSystemHandler_GetProtocol(*args, **kwargs)
1769
1770 def GetLeftLocation(*args, **kwargs):
1771 """GetLeftLocation(self, String location) -> String"""
1772 return _core_.FileSystemHandler_GetLeftLocation(*args, **kwargs)
1773
1774 def GetAnchor(*args, **kwargs):
1775 """GetAnchor(self, String location) -> String"""
1776 return _core_.FileSystemHandler_GetAnchor(*args, **kwargs)
1777
1778 def GetRightLocation(*args, **kwargs):
1779 """GetRightLocation(self, String location) -> String"""
1780 return _core_.FileSystemHandler_GetRightLocation(*args, **kwargs)
1781
1782 def GetMimeTypeFromExt(*args, **kwargs):
1783 """GetMimeTypeFromExt(self, String location) -> String"""
1784 return _core_.FileSystemHandler_GetMimeTypeFromExt(*args, **kwargs)
1785
1786
1787 class FileSystemHandlerPtr(FileSystemHandler):
1788 def __init__(self, this):
1789 self.this = this
1790 if not hasattr(self,"thisown"): self.thisown = 0
1791 self.__class__ = FileSystemHandler
1792 _core_.FileSystemHandler_swigregister(FileSystemHandlerPtr)
1793
1794 class FileSystem(Object):
1795 """Proxy of C++ FileSystem class"""
1796 def __repr__(self):
1797 return "<%s.%s; proxy of C++ wxFileSystem instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
1798 def __init__(self, *args, **kwargs):
1799 """__init__(self) -> FileSystem"""
1800 newobj = _core_.new_FileSystem(*args, **kwargs)
1801 self.this = newobj.this
1802 self.thisown = 1
1803 del newobj.thisown
1804 def __del__(self, destroy=_core_.delete_FileSystem):
1805 """__del__(self)"""
1806 try:
1807 if self.thisown: destroy(self)
1808 except: pass
1809
1810 def ChangePathTo(*args, **kwargs):
1811 """ChangePathTo(self, String location, bool is_dir=False)"""
1812 return _core_.FileSystem_ChangePathTo(*args, **kwargs)
1813
1814 def GetPath(*args, **kwargs):
1815 """GetPath(self) -> String"""
1816 return _core_.FileSystem_GetPath(*args, **kwargs)
1817
1818 def OpenFile(*args, **kwargs):
1819 """OpenFile(self, String location) -> FSFile"""
1820 return _core_.FileSystem_OpenFile(*args, **kwargs)
1821
1822 def FindFirst(*args, **kwargs):
1823 """FindFirst(self, String spec, int flags=0) -> String"""
1824 return _core_.FileSystem_FindFirst(*args, **kwargs)
1825
1826 def FindNext(*args, **kwargs):
1827 """FindNext(self) -> String"""
1828 return _core_.FileSystem_FindNext(*args, **kwargs)
1829
1830 def AddHandler(*args, **kwargs):
1831 """AddHandler(CPPFileSystemHandler handler)"""
1832 return _core_.FileSystem_AddHandler(*args, **kwargs)
1833
1834 AddHandler = staticmethod(AddHandler)
1835 def CleanUpHandlers(*args, **kwargs):
1836 """CleanUpHandlers()"""
1837 return _core_.FileSystem_CleanUpHandlers(*args, **kwargs)
1838
1839 CleanUpHandlers = staticmethod(CleanUpHandlers)
1840 def FileNameToURL(*args, **kwargs):
1841 """FileNameToURL(String filename) -> String"""
1842 return _core_.FileSystem_FileNameToURL(*args, **kwargs)
1843
1844 FileNameToURL = staticmethod(FileNameToURL)
1845 def URLToFileName(*args, **kwargs):
1846 """URLToFileName(String url) -> String"""
1847 return _core_.FileSystem_URLToFileName(*args, **kwargs)
1848
1849 URLToFileName = staticmethod(URLToFileName)
1850
1851 class FileSystemPtr(FileSystem):
1852 def __init__(self, this):
1853 self.this = this
1854 if not hasattr(self,"thisown"): self.thisown = 0
1855 self.__class__ = FileSystem
1856 _core_.FileSystem_swigregister(FileSystemPtr)
1857
1858 def FileSystem_AddHandler(*args, **kwargs):
1859 """FileSystem_AddHandler(CPPFileSystemHandler handler)"""
1860 return _core_.FileSystem_AddHandler(*args, **kwargs)
1861
1862 def FileSystem_CleanUpHandlers(*args, **kwargs):
1863 """FileSystem_CleanUpHandlers()"""
1864 return _core_.FileSystem_CleanUpHandlers(*args, **kwargs)
1865
1866 def FileSystem_FileNameToURL(*args, **kwargs):
1867 """FileSystem_FileNameToURL(String filename) -> String"""
1868 return _core_.FileSystem_FileNameToURL(*args, **kwargs)
1869
1870 def FileSystem_URLToFileName(*args, **kwargs):
1871 """FileSystem_URLToFileName(String url) -> String"""
1872 return _core_.FileSystem_URLToFileName(*args, **kwargs)
1873
1874 class InternetFSHandler(CPPFileSystemHandler):
1875 """Proxy of C++ InternetFSHandler class"""
1876 def __repr__(self):
1877 return "<%s.%s; proxy of C++ wxInternetFSHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
1878 def __init__(self, *args, **kwargs):
1879 """__init__(self) -> InternetFSHandler"""
1880 newobj = _core_.new_InternetFSHandler(*args, **kwargs)
1881 self.this = newobj.this
1882 self.thisown = 1
1883 del newobj.thisown
1884 def CanOpen(*args, **kwargs):
1885 """CanOpen(self, String location) -> bool"""
1886 return _core_.InternetFSHandler_CanOpen(*args, **kwargs)
1887
1888 def OpenFile(*args, **kwargs):
1889 """OpenFile(self, FileSystem fs, String location) -> FSFile"""
1890 return _core_.InternetFSHandler_OpenFile(*args, **kwargs)
1891
1892
1893 class InternetFSHandlerPtr(InternetFSHandler):
1894 def __init__(self, this):
1895 self.this = this
1896 if not hasattr(self,"thisown"): self.thisown = 0
1897 self.__class__ = InternetFSHandler
1898 _core_.InternetFSHandler_swigregister(InternetFSHandlerPtr)
1899
1900 class ZipFSHandler(CPPFileSystemHandler):
1901 """Proxy of C++ ZipFSHandler class"""
1902 def __repr__(self):
1903 return "<%s.%s; proxy of C++ wxZipFSHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
1904 def __init__(self, *args, **kwargs):
1905 """__init__(self) -> ZipFSHandler"""
1906 newobj = _core_.new_ZipFSHandler(*args, **kwargs)
1907 self.this = newobj.this
1908 self.thisown = 1
1909 del newobj.thisown
1910 def CanOpen(*args, **kwargs):
1911 """CanOpen(self, String location) -> bool"""
1912 return _core_.ZipFSHandler_CanOpen(*args, **kwargs)
1913
1914 def OpenFile(*args, **kwargs):
1915 """OpenFile(self, FileSystem fs, String location) -> FSFile"""
1916 return _core_.ZipFSHandler_OpenFile(*args, **kwargs)
1917
1918 def FindFirst(*args, **kwargs):
1919 """FindFirst(self, String spec, int flags=0) -> String"""
1920 return _core_.ZipFSHandler_FindFirst(*args, **kwargs)
1921
1922 def FindNext(*args, **kwargs):
1923 """FindNext(self) -> String"""
1924 return _core_.ZipFSHandler_FindNext(*args, **kwargs)
1925
1926
1927 class ZipFSHandlerPtr(ZipFSHandler):
1928 def __init__(self, this):
1929 self.this = this
1930 if not hasattr(self,"thisown"): self.thisown = 0
1931 self.__class__ = ZipFSHandler
1932 _core_.ZipFSHandler_swigregister(ZipFSHandlerPtr)
1933
1934
1935 def __wxMemoryFSHandler_AddFile_wxImage(*args, **kwargs):
1936 """__wxMemoryFSHandler_AddFile_wxImage(String filename, Image image, long type)"""
1937 return _core_.__wxMemoryFSHandler_AddFile_wxImage(*args, **kwargs)
1938
1939 def __wxMemoryFSHandler_AddFile_wxBitmap(*args, **kwargs):
1940 """__wxMemoryFSHandler_AddFile_wxBitmap(String filename, Bitmap bitmap, long type)"""
1941 return _core_.__wxMemoryFSHandler_AddFile_wxBitmap(*args, **kwargs)
1942
1943 def __wxMemoryFSHandler_AddFile_Data(*args, **kwargs):
1944 """__wxMemoryFSHandler_AddFile_Data(String filename, PyObject data)"""
1945 return _core_.__wxMemoryFSHandler_AddFile_Data(*args, **kwargs)
1946 def MemoryFSHandler_AddFile(filename, dataItem, imgType=-1):
1947 """
1948 Add 'file' to the memory filesystem. The dataItem parameter can
1949 either be a `wx.Bitmap`, `wx.Image` or a string that can contain
1950 arbitrary data. If a bitmap or image is used then the imgType
1951 parameter should specify what kind of image file it should be
1952 written as, wx.BITMAP_TYPE_PNG, etc.
1953 """
1954 if isinstance(dataItem, wx.Image):
1955 __wxMemoryFSHandler_AddFile_wxImage(filename, dataItem, imgType)
1956 elif isinstance(dataItem, wx.Bitmap):
1957 __wxMemoryFSHandler_AddFile_wxBitmap(filename, dataItem, imgType)
1958 elif type(dataItem) == str:
1959 __wxMemoryFSHandler_AddFile_Data(filename, dataItem)
1960 else:
1961 raise TypeError, 'wx.Image, wx.Bitmap or string expected'
1962
1963 class MemoryFSHandler(CPPFileSystemHandler):
1964 """Proxy of C++ MemoryFSHandler class"""
1965 def __repr__(self):
1966 return "<%s.%s; proxy of C++ wxMemoryFSHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
1967 def __init__(self, *args, **kwargs):
1968 """__init__(self) -> MemoryFSHandler"""
1969 newobj = _core_.new_MemoryFSHandler(*args, **kwargs)
1970 self.this = newobj.this
1971 self.thisown = 1
1972 del newobj.thisown
1973 def RemoveFile(*args, **kwargs):
1974 """RemoveFile(String filename)"""
1975 return _core_.MemoryFSHandler_RemoveFile(*args, **kwargs)
1976
1977 RemoveFile = staticmethod(RemoveFile)
1978 AddFile = staticmethod(MemoryFSHandler_AddFile)
1979 def CanOpen(*args, **kwargs):
1980 """CanOpen(self, String location) -> bool"""
1981 return _core_.MemoryFSHandler_CanOpen(*args, **kwargs)
1982
1983 def OpenFile(*args, **kwargs):
1984 """OpenFile(self, FileSystem fs, String location) -> FSFile"""
1985 return _core_.MemoryFSHandler_OpenFile(*args, **kwargs)
1986
1987 def FindFirst(*args, **kwargs):
1988 """FindFirst(self, String spec, int flags=0) -> String"""
1989 return _core_.MemoryFSHandler_FindFirst(*args, **kwargs)
1990
1991 def FindNext(*args, **kwargs):
1992 """FindNext(self) -> String"""
1993 return _core_.MemoryFSHandler_FindNext(*args, **kwargs)
1994
1995
1996 class MemoryFSHandlerPtr(MemoryFSHandler):
1997 def __init__(self, this):
1998 self.this = this
1999 if not hasattr(self,"thisown"): self.thisown = 0
2000 self.__class__ = MemoryFSHandler
2001 _core_.MemoryFSHandler_swigregister(MemoryFSHandlerPtr)
2002
2003 def MemoryFSHandler_RemoveFile(*args, **kwargs):
2004 """MemoryFSHandler_RemoveFile(String filename)"""
2005 return _core_.MemoryFSHandler_RemoveFile(*args, **kwargs)
2006
2007 #---------------------------------------------------------------------------
2008
2009 class ImageHandler(Object):
2010 """Proxy of C++ ImageHandler class"""
2011 def __init__(self): raise RuntimeError, "No constructor defined"
2012 def __repr__(self):
2013 return "<%s.%s; proxy of C++ wxImageHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
2014 def GetName(*args, **kwargs):
2015 """GetName(self) -> String"""
2016 return _core_.ImageHandler_GetName(*args, **kwargs)
2017
2018 def GetExtension(*args, **kwargs):
2019 """GetExtension(self) -> String"""
2020 return _core_.ImageHandler_GetExtension(*args, **kwargs)
2021
2022 def GetType(*args, **kwargs):
2023 """GetType(self) -> long"""
2024 return _core_.ImageHandler_GetType(*args, **kwargs)
2025
2026 def GetMimeType(*args, **kwargs):
2027 """GetMimeType(self) -> String"""
2028 return _core_.ImageHandler_GetMimeType(*args, **kwargs)
2029
2030 def CanRead(*args, **kwargs):
2031 """CanRead(self, String name) -> bool"""
2032 return _core_.ImageHandler_CanRead(*args, **kwargs)
2033
2034 def SetName(*args, **kwargs):
2035 """SetName(self, String name)"""
2036 return _core_.ImageHandler_SetName(*args, **kwargs)
2037
2038 def SetExtension(*args, **kwargs):
2039 """SetExtension(self, String extension)"""
2040 return _core_.ImageHandler_SetExtension(*args, **kwargs)
2041
2042 def SetType(*args, **kwargs):
2043 """SetType(self, long type)"""
2044 return _core_.ImageHandler_SetType(*args, **kwargs)
2045
2046 def SetMimeType(*args, **kwargs):
2047 """SetMimeType(self, String mimetype)"""
2048 return _core_.ImageHandler_SetMimeType(*args, **kwargs)
2049
2050
2051 class ImageHandlerPtr(ImageHandler):
2052 def __init__(self, this):
2053 self.this = this
2054 if not hasattr(self,"thisown"): self.thisown = 0
2055 self.__class__ = ImageHandler
2056 _core_.ImageHandler_swigregister(ImageHandlerPtr)
2057
2058 class ImageHistogram(object):
2059 """Proxy of C++ ImageHistogram class"""
2060 def __repr__(self):
2061 return "<%s.%s; proxy of C++ wxImageHistogram instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
2062 def __init__(self, *args, **kwargs):
2063 """__init__(self) -> ImageHistogram"""
2064 newobj = _core_.new_ImageHistogram(*args, **kwargs)
2065 self.this = newobj.this
2066 self.thisown = 1
2067 del newobj.thisown
2068 def MakeKey(*args, **kwargs):
2069 """
2070 MakeKey(unsigned char r, unsigned char g, unsigned char b) -> unsigned long
2071
2072 Get the key in the histogram for the given RGB values
2073 """
2074 return _core_.ImageHistogram_MakeKey(*args, **kwargs)
2075
2076 MakeKey = staticmethod(MakeKey)
2077 def FindFirstUnusedColour(*args, **kwargs):
2078 """
2079 FindFirstUnusedColour(int startR=1, int startG=0, int startB=0) -> (success, r, g, b)
2080
2081 Find first colour that is not used in the image and has higher RGB
2082 values than startR, startG, startB. Returns a tuple consisting of a
2083 success flag and rgb values.
2084 """
2085 return _core_.ImageHistogram_FindFirstUnusedColour(*args, **kwargs)
2086
2087
2088 class ImageHistogramPtr(ImageHistogram):
2089 def __init__(self, this):
2090 self.this = this
2091 if not hasattr(self,"thisown"): self.thisown = 0
2092 self.__class__ = ImageHistogram
2093 _core_.ImageHistogram_swigregister(ImageHistogramPtr)
2094
2095 def ImageHistogram_MakeKey(*args, **kwargs):
2096 """
2097 ImageHistogram_MakeKey(unsigned char r, unsigned char g, unsigned char b) -> unsigned long
2098
2099 Get the key in the histogram for the given RGB values
2100 """
2101 return _core_.ImageHistogram_MakeKey(*args, **kwargs)
2102
2103 class Image(Object):
2104 """Proxy of C++ Image class"""
2105 def __repr__(self):
2106 return "<%s.%s; proxy of C++ wxImage instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
2107 def __init__(self, *args, **kwargs):
2108 """__init__(self, String name, long type=BITMAP_TYPE_ANY, int index=-1) -> Image"""
2109 newobj = _core_.new_Image(*args, **kwargs)
2110 self.this = newobj.this
2111 self.thisown = 1
2112 del newobj.thisown
2113 def __del__(self, destroy=_core_.delete_Image):
2114 """__del__(self)"""
2115 try:
2116 if self.thisown: destroy(self)
2117 except: pass
2118
2119 def Create(*args, **kwargs):
2120 """Create(self, int width, int height)"""
2121 return _core_.Image_Create(*args, **kwargs)
2122
2123 def Destroy(*args, **kwargs):
2124 """
2125 Destroy(self)
2126
2127 Deletes the C++ object this Python object is a proxy for.
2128 """
2129 return _core_.Image_Destroy(*args, **kwargs)
2130
2131 def Scale(*args, **kwargs):
2132 """Scale(self, int width, int height) -> Image"""
2133 return _core_.Image_Scale(*args, **kwargs)
2134
2135 def ShrinkBy(*args, **kwargs):
2136 """ShrinkBy(self, int xFactor, int yFactor) -> Image"""
2137 return _core_.Image_ShrinkBy(*args, **kwargs)
2138
2139 def Rescale(*args, **kwargs):
2140 """Rescale(self, int width, int height) -> Image"""
2141 return _core_.Image_Rescale(*args, **kwargs)
2142
2143 def SetRGB(*args, **kwargs):
2144 """SetRGB(self, int x, int y, unsigned char r, unsigned char g, unsigned char b)"""
2145 return _core_.Image_SetRGB(*args, **kwargs)
2146
2147 def GetRed(*args, **kwargs):
2148 """GetRed(self, int x, int y) -> unsigned char"""
2149 return _core_.Image_GetRed(*args, **kwargs)
2150
2151 def GetGreen(*args, **kwargs):
2152 """GetGreen(self, int x, int y) -> unsigned char"""
2153 return _core_.Image_GetGreen(*args, **kwargs)
2154
2155 def GetBlue(*args, **kwargs):
2156 """GetBlue(self, int x, int y) -> unsigned char"""
2157 return _core_.Image_GetBlue(*args, **kwargs)
2158
2159 def SetAlpha(*args, **kwargs):
2160 """SetAlpha(self, int x, int y, unsigned char alpha)"""
2161 return _core_.Image_SetAlpha(*args, **kwargs)
2162
2163 def GetAlpha(*args, **kwargs):
2164 """GetAlpha(self, int x, int y) -> unsigned char"""
2165 return _core_.Image_GetAlpha(*args, **kwargs)
2166
2167 def HasAlpha(*args, **kwargs):
2168 """HasAlpha(self) -> bool"""
2169 return _core_.Image_HasAlpha(*args, **kwargs)
2170
2171 def FindFirstUnusedColour(*args, **kwargs):
2172 """
2173 FindFirstUnusedColour(int startR=1, int startG=0, int startB=0) -> (success, r, g, b)
2174
2175 Find first colour that is not used in the image and has higher RGB
2176 values than startR, startG, startB. Returns a tuple consisting of a
2177 success flag and rgb values.
2178 """
2179 return _core_.Image_FindFirstUnusedColour(*args, **kwargs)
2180
2181 def ConvertAlphaToMask(*args, **kwargs):
2182 """
2183 ConvertAlphaToMask(self, byte threshold=128) -> bool
2184
2185 If the image has alpha channel, this method converts it to mask. All pixels
2186 with alpha value less than ``threshold`` are replaced with mask colour and the
2187 alpha channel is removed. Mask colour is chosen automatically using
2188 `FindFirstUnusedColour`.
2189
2190 If the image image doesn't have alpha channel, ConvertAlphaToMask does
2191 nothing.
2192 """
2193 return _core_.Image_ConvertAlphaToMask(*args, **kwargs)
2194
2195 def ConvertColourToAlpha(*args, **kwargs):
2196 """
2197 ConvertColourToAlpha(self, unsigned char r, unsigned char g, unsigned char b) -> bool
2198
2199 This method converts an image where the original alpha information is
2200 only available as a shades of a colour (actually shades of grey)
2201 typically when you draw anti-aliased text into a bitmap. The DC
2202 drawing routines draw grey values on the black background although
2203 they actually mean to draw white with differnt alpha values. This
2204 method reverses it, assuming a black (!) background and white text.
2205 The method will then fill up the whole image with the colour given.
2206 """
2207 return _core_.Image_ConvertColourToAlpha(*args, **kwargs)
2208
2209 def SetMaskFromImage(*args, **kwargs):
2210 """SetMaskFromImage(self, Image mask, byte mr, byte mg, byte mb) -> bool"""
2211 return _core_.Image_SetMaskFromImage(*args, **kwargs)
2212
2213 def CanRead(*args, **kwargs):
2214 """CanRead(String name) -> bool"""
2215 return _core_.Image_CanRead(*args, **kwargs)
2216
2217 CanRead = staticmethod(CanRead)
2218 def GetImageCount(*args, **kwargs):
2219 """GetImageCount(String name, long type=BITMAP_TYPE_ANY) -> int"""
2220 return _core_.Image_GetImageCount(*args, **kwargs)
2221
2222 GetImageCount = staticmethod(GetImageCount)
2223 def LoadFile(*args, **kwargs):
2224 """LoadFile(self, String name, long type=BITMAP_TYPE_ANY, int index=-1) -> bool"""
2225 return _core_.Image_LoadFile(*args, **kwargs)
2226
2227 def LoadMimeFile(*args, **kwargs):
2228 """LoadMimeFile(self, String name, String mimetype, int index=-1) -> bool"""
2229 return _core_.Image_LoadMimeFile(*args, **kwargs)
2230
2231 def SaveFile(*args, **kwargs):
2232 """SaveFile(self, String name, int type) -> bool"""
2233 return _core_.Image_SaveFile(*args, **kwargs)
2234
2235 def SaveMimeFile(*args, **kwargs):
2236 """SaveMimeFile(self, String name, String mimetype) -> bool"""
2237 return _core_.Image_SaveMimeFile(*args, **kwargs)
2238
2239 def CanReadStream(*args, **kwargs):
2240 """CanReadStream(InputStream stream) -> bool"""
2241 return _core_.Image_CanReadStream(*args, **kwargs)
2242
2243 CanReadStream = staticmethod(CanReadStream)
2244 def LoadStream(*args, **kwargs):
2245 """LoadStream(self, InputStream stream, long type=BITMAP_TYPE_ANY, int index=-1) -> bool"""
2246 return _core_.Image_LoadStream(*args, **kwargs)
2247
2248 def LoadMimeStream(*args, **kwargs):
2249 """LoadMimeStream(self, InputStream stream, String mimetype, int index=-1) -> bool"""
2250 return _core_.Image_LoadMimeStream(*args, **kwargs)
2251
2252 def Ok(*args, **kwargs):
2253 """Ok(self) -> bool"""
2254 return _core_.Image_Ok(*args, **kwargs)
2255
2256 def GetWidth(*args, **kwargs):
2257 """GetWidth(self) -> int"""
2258 return _core_.Image_GetWidth(*args, **kwargs)
2259
2260 def GetHeight(*args, **kwargs):
2261 """GetHeight(self) -> int"""
2262 return _core_.Image_GetHeight(*args, **kwargs)
2263
2264 def GetSize(*args, **kwargs):
2265 """GetSize(self) -> Size"""
2266 return _core_.Image_GetSize(*args, **kwargs)
2267
2268 def GetSubImage(*args, **kwargs):
2269 """GetSubImage(self, Rect rect) -> Image"""
2270 return _core_.Image_GetSubImage(*args, **kwargs)
2271
2272 def Copy(*args, **kwargs):
2273 """Copy(self) -> Image"""
2274 return _core_.Image_Copy(*args, **kwargs)
2275
2276 def Paste(*args, **kwargs):
2277 """Paste(self, Image image, int x, int y)"""
2278 return _core_.Image_Paste(*args, **kwargs)
2279
2280 def GetData(*args, **kwargs):
2281 """GetData(self) -> PyObject"""
2282 return _core_.Image_GetData(*args, **kwargs)
2283
2284 def SetData(*args, **kwargs):
2285 """SetData(self, PyObject data)"""
2286 return _core_.Image_SetData(*args, **kwargs)
2287
2288 def GetDataBuffer(*args, **kwargs):
2289 """GetDataBuffer(self) -> PyObject"""
2290 return _core_.Image_GetDataBuffer(*args, **kwargs)
2291
2292 def SetDataBuffer(*args, **kwargs):
2293 """SetDataBuffer(self, PyObject data)"""
2294 return _core_.Image_SetDataBuffer(*args, **kwargs)
2295
2296 def GetAlphaData(*args, **kwargs):
2297 """GetAlphaData(self) -> PyObject"""
2298 return _core_.Image_GetAlphaData(*args, **kwargs)
2299
2300 def SetAlphaData(*args, **kwargs):
2301 """SetAlphaData(self, PyObject data)"""
2302 return _core_.Image_SetAlphaData(*args, **kwargs)
2303
2304 def GetAlphaBuffer(*args, **kwargs):
2305 """GetAlphaBuffer(self) -> PyObject"""
2306 return _core_.Image_GetAlphaBuffer(*args, **kwargs)
2307
2308 def SetAlphaBuffer(*args, **kwargs):
2309 """SetAlphaBuffer(self, PyObject data)"""
2310 return _core_.Image_SetAlphaBuffer(*args, **kwargs)
2311
2312 def SetMaskColour(*args, **kwargs):
2313 """SetMaskColour(self, unsigned char r, unsigned char g, unsigned char b)"""
2314 return _core_.Image_SetMaskColour(*args, **kwargs)
2315
2316 def GetMaskRed(*args, **kwargs):
2317 """GetMaskRed(self) -> unsigned char"""
2318 return _core_.Image_GetMaskRed(*args, **kwargs)
2319
2320 def GetMaskGreen(*args, **kwargs):
2321 """GetMaskGreen(self) -> unsigned char"""
2322 return _core_.Image_GetMaskGreen(*args, **kwargs)
2323
2324 def GetMaskBlue(*args, **kwargs):
2325 """GetMaskBlue(self) -> unsigned char"""
2326 return _core_.Image_GetMaskBlue(*args, **kwargs)
2327
2328 def SetMask(*args, **kwargs):
2329 """SetMask(self, bool mask=True)"""
2330 return _core_.Image_SetMask(*args, **kwargs)
2331
2332 def HasMask(*args, **kwargs):
2333 """HasMask(self) -> bool"""
2334 return _core_.Image_HasMask(*args, **kwargs)
2335
2336 def Rotate(*args, **kwargs):
2337 """
2338 Rotate(self, double angle, Point centre_of_rotation, bool interpolating=True,
2339 Point offset_after_rotation=None) -> Image
2340 """
2341 return _core_.Image_Rotate(*args, **kwargs)
2342
2343 def Rotate90(*args, **kwargs):
2344 """Rotate90(self, bool clockwise=True) -> Image"""
2345 return _core_.Image_Rotate90(*args, **kwargs)
2346
2347 def Mirror(*args, **kwargs):
2348 """Mirror(self, bool horizontally=True) -> Image"""
2349 return _core_.Image_Mirror(*args, **kwargs)
2350
2351 def Replace(*args, **kwargs):
2352 """
2353 Replace(self, unsigned char r1, unsigned char g1, unsigned char b1,
2354 unsigned char r2, unsigned char g2, unsigned char b2)
2355 """
2356 return _core_.Image_Replace(*args, **kwargs)
2357
2358 def ConvertToMono(*args, **kwargs):
2359 """ConvertToMono(self, unsigned char r, unsigned char g, unsigned char b) -> Image"""
2360 return _core_.Image_ConvertToMono(*args, **kwargs)
2361
2362 def SetOption(*args, **kwargs):
2363 """SetOption(self, String name, String value)"""
2364 return _core_.Image_SetOption(*args, **kwargs)
2365
2366 def SetOptionInt(*args, **kwargs):
2367 """SetOptionInt(self, String name, int value)"""
2368 return _core_.Image_SetOptionInt(*args, **kwargs)
2369
2370 def GetOption(*args, **kwargs):
2371 """GetOption(self, String name) -> String"""
2372 return _core_.Image_GetOption(*args, **kwargs)
2373
2374 def GetOptionInt(*args, **kwargs):
2375 """GetOptionInt(self, String name) -> int"""
2376 return _core_.Image_GetOptionInt(*args, **kwargs)
2377
2378 def HasOption(*args, **kwargs):
2379 """HasOption(self, String name) -> bool"""
2380 return _core_.Image_HasOption(*args, **kwargs)
2381
2382 def CountColours(*args, **kwargs):
2383 """CountColours(self, unsigned long stopafter=(unsigned long) -1) -> unsigned long"""
2384 return _core_.Image_CountColours(*args, **kwargs)
2385
2386 def ComputeHistogram(*args, **kwargs):
2387 """ComputeHistogram(self, ImageHistogram h) -> unsigned long"""
2388 return _core_.Image_ComputeHistogram(*args, **kwargs)
2389
2390 def AddHandler(*args, **kwargs):
2391 """AddHandler(ImageHandler handler)"""
2392 return _core_.Image_AddHandler(*args, **kwargs)
2393
2394 AddHandler = staticmethod(AddHandler)
2395 def InsertHandler(*args, **kwargs):
2396 """InsertHandler(ImageHandler handler)"""
2397 return _core_.Image_InsertHandler(*args, **kwargs)
2398
2399 InsertHandler = staticmethod(InsertHandler)
2400 def RemoveHandler(*args, **kwargs):
2401 """RemoveHandler(String name) -> bool"""
2402 return _core_.Image_RemoveHandler(*args, **kwargs)
2403
2404 RemoveHandler = staticmethod(RemoveHandler)
2405 def GetImageExtWildcard(*args, **kwargs):
2406 """GetImageExtWildcard() -> String"""
2407 return _core_.Image_GetImageExtWildcard(*args, **kwargs)
2408
2409 GetImageExtWildcard = staticmethod(GetImageExtWildcard)
2410 def ConvertToBitmap(*args, **kwargs):
2411 """ConvertToBitmap(self, int depth=-1) -> Bitmap"""
2412 return _core_.Image_ConvertToBitmap(*args, **kwargs)
2413
2414 def ConvertToMonoBitmap(*args, **kwargs):
2415 """ConvertToMonoBitmap(self, unsigned char red, unsigned char green, unsigned char blue) -> Bitmap"""
2416 return _core_.Image_ConvertToMonoBitmap(*args, **kwargs)
2417
2418 def __nonzero__(self): return self.Ok()
2419
2420 class ImagePtr(Image):
2421 def __init__(self, this):
2422 self.this = this
2423 if not hasattr(self,"thisown"): self.thisown = 0
2424 self.__class__ = Image
2425 _core_.Image_swigregister(ImagePtr)
2426
2427 def ImageFromMime(*args, **kwargs):
2428 """ImageFromMime(String name, String mimetype, int index=-1) -> Image"""
2429 val = _core_.new_ImageFromMime(*args, **kwargs)
2430 val.thisown = 1
2431 return val
2432
2433 def ImageFromStream(*args, **kwargs):
2434 """ImageFromStream(InputStream stream, long type=BITMAP_TYPE_ANY, int index=-1) -> Image"""
2435 val = _core_.new_ImageFromStream(*args, **kwargs)
2436 val.thisown = 1
2437 return val
2438
2439 def ImageFromStreamMime(*args, **kwargs):
2440 """ImageFromStreamMime(InputStream stream, String mimetype, int index=-1) -> Image"""
2441 val = _core_.new_ImageFromStreamMime(*args, **kwargs)
2442 val.thisown = 1
2443 return val
2444
2445 def EmptyImage(*args, **kwargs):
2446 """EmptyImage(int width=0, int height=0, bool clear=True) -> Image"""
2447 val = _core_.new_EmptyImage(*args, **kwargs)
2448 val.thisown = 1
2449 return val
2450
2451 def ImageFromBitmap(*args, **kwargs):
2452 """ImageFromBitmap(Bitmap bitmap) -> Image"""
2453 val = _core_.new_ImageFromBitmap(*args, **kwargs)
2454 val.thisown = 1
2455 return val
2456
2457 def ImageFromData(*args, **kwargs):
2458 """ImageFromData(int width, int height, unsigned char data) -> Image"""
2459 val = _core_.new_ImageFromData(*args, **kwargs)
2460 val.thisown = 1
2461 return val
2462
2463 def ImageFromDataWithAlpha(*args, **kwargs):
2464 """ImageFromDataWithAlpha(int width, int height, unsigned char data, unsigned char alpha) -> Image"""
2465 val = _core_.new_ImageFromDataWithAlpha(*args, **kwargs)
2466 val.thisown = 1
2467 return val
2468
2469 def Image_CanRead(*args, **kwargs):
2470 """Image_CanRead(String name) -> bool"""
2471 return _core_.Image_CanRead(*args, **kwargs)
2472
2473 def Image_GetImageCount(*args, **kwargs):
2474 """Image_GetImageCount(String name, long type=BITMAP_TYPE_ANY) -> int"""
2475 return _core_.Image_GetImageCount(*args, **kwargs)
2476
2477 def Image_CanReadStream(*args, **kwargs):
2478 """Image_CanReadStream(InputStream stream) -> bool"""
2479 return _core_.Image_CanReadStream(*args, **kwargs)
2480
2481 def Image_AddHandler(*args, **kwargs):
2482 """Image_AddHandler(ImageHandler handler)"""
2483 return _core_.Image_AddHandler(*args, **kwargs)
2484
2485 def Image_InsertHandler(*args, **kwargs):
2486 """Image_InsertHandler(ImageHandler handler)"""
2487 return _core_.Image_InsertHandler(*args, **kwargs)
2488
2489 def Image_RemoveHandler(*args, **kwargs):
2490 """Image_RemoveHandler(String name) -> bool"""
2491 return _core_.Image_RemoveHandler(*args, **kwargs)
2492
2493 def Image_GetImageExtWildcard(*args, **kwargs):
2494 """Image_GetImageExtWildcard() -> String"""
2495 return _core_.Image_GetImageExtWildcard(*args, **kwargs)
2496
2497 def InitAllImageHandlers():
2498 """
2499 The former functionality of InitAllImageHanders is now done internal to
2500 the _core_ extension module and so this function has become a simple NOP.
2501 """
2502 pass
2503
2504 IMAGE_RESOLUTION_INCHES = _core_.IMAGE_RESOLUTION_INCHES
2505 IMAGE_RESOLUTION_CM = _core_.IMAGE_RESOLUTION_CM
2506 BMP_24BPP = _core_.BMP_24BPP
2507 BMP_8BPP = _core_.BMP_8BPP
2508 BMP_8BPP_GREY = _core_.BMP_8BPP_GREY
2509 BMP_8BPP_GRAY = _core_.BMP_8BPP_GRAY
2510 BMP_8BPP_RED = _core_.BMP_8BPP_RED
2511 BMP_8BPP_PALETTE = _core_.BMP_8BPP_PALETTE
2512 BMP_4BPP = _core_.BMP_4BPP
2513 BMP_1BPP = _core_.BMP_1BPP
2514 BMP_1BPP_BW = _core_.BMP_1BPP_BW
2515 class BMPHandler(ImageHandler):
2516 """Proxy of C++ BMPHandler class"""
2517 def __repr__(self):
2518 return "<%s.%s; proxy of C++ wxBMPHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
2519 def __init__(self, *args, **kwargs):
2520 """__init__(self) -> BMPHandler"""
2521 newobj = _core_.new_BMPHandler(*args, **kwargs)
2522 self.this = newobj.this
2523 self.thisown = 1
2524 del newobj.thisown
2525
2526 class BMPHandlerPtr(BMPHandler):
2527 def __init__(self, this):
2528 self.this = this
2529 if not hasattr(self,"thisown"): self.thisown = 0
2530 self.__class__ = BMPHandler
2531 _core_.BMPHandler_swigregister(BMPHandlerPtr)
2532 NullImage = cvar.NullImage
2533 IMAGE_OPTION_BMP_FORMAT = cvar.IMAGE_OPTION_BMP_FORMAT
2534 IMAGE_OPTION_CUR_HOTSPOT_X = cvar.IMAGE_OPTION_CUR_HOTSPOT_X
2535 IMAGE_OPTION_CUR_HOTSPOT_Y = cvar.IMAGE_OPTION_CUR_HOTSPOT_Y
2536 IMAGE_OPTION_RESOLUTION = cvar.IMAGE_OPTION_RESOLUTION
2537 IMAGE_OPTION_RESOLUTIONUNIT = cvar.IMAGE_OPTION_RESOLUTIONUNIT
2538
2539 class ICOHandler(BMPHandler):
2540 """Proxy of C++ ICOHandler class"""
2541 def __repr__(self):
2542 return "<%s.%s; proxy of C++ wxICOHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
2543 def __init__(self, *args, **kwargs):
2544 """__init__(self) -> ICOHandler"""
2545 newobj = _core_.new_ICOHandler(*args, **kwargs)
2546 self.this = newobj.this
2547 self.thisown = 1
2548 del newobj.thisown
2549
2550 class ICOHandlerPtr(ICOHandler):
2551 def __init__(self, this):
2552 self.this = this
2553 if not hasattr(self,"thisown"): self.thisown = 0
2554 self.__class__ = ICOHandler
2555 _core_.ICOHandler_swigregister(ICOHandlerPtr)
2556
2557 class CURHandler(ICOHandler):
2558 """Proxy of C++ CURHandler class"""
2559 def __repr__(self):
2560 return "<%s.%s; proxy of C++ wxCURHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
2561 def __init__(self, *args, **kwargs):
2562 """__init__(self) -> CURHandler"""
2563 newobj = _core_.new_CURHandler(*args, **kwargs)
2564 self.this = newobj.this
2565 self.thisown = 1
2566 del newobj.thisown
2567
2568 class CURHandlerPtr(CURHandler):
2569 def __init__(self, this):
2570 self.this = this
2571 if not hasattr(self,"thisown"): self.thisown = 0
2572 self.__class__ = CURHandler
2573 _core_.CURHandler_swigregister(CURHandlerPtr)
2574
2575 class ANIHandler(CURHandler):
2576 """Proxy of C++ ANIHandler class"""
2577 def __repr__(self):
2578 return "<%s.%s; proxy of C++ wxANIHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
2579 def __init__(self, *args, **kwargs):
2580 """__init__(self) -> ANIHandler"""
2581 newobj = _core_.new_ANIHandler(*args, **kwargs)
2582 self.this = newobj.this
2583 self.thisown = 1
2584 del newobj.thisown
2585
2586 class ANIHandlerPtr(ANIHandler):
2587 def __init__(self, this):
2588 self.this = this
2589 if not hasattr(self,"thisown"): self.thisown = 0
2590 self.__class__ = ANIHandler
2591 _core_.ANIHandler_swigregister(ANIHandlerPtr)
2592
2593 class PNGHandler(ImageHandler):
2594 """Proxy of C++ PNGHandler class"""
2595 def __repr__(self):
2596 return "<%s.%s; proxy of C++ wxPNGHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
2597 def __init__(self, *args, **kwargs):
2598 """__init__(self) -> PNGHandler"""
2599 newobj = _core_.new_PNGHandler(*args, **kwargs)
2600 self.this = newobj.this
2601 self.thisown = 1
2602 del newobj.thisown
2603
2604 class PNGHandlerPtr(PNGHandler):
2605 def __init__(self, this):
2606 self.this = this
2607 if not hasattr(self,"thisown"): self.thisown = 0
2608 self.__class__ = PNGHandler
2609 _core_.PNGHandler_swigregister(PNGHandlerPtr)
2610
2611 class GIFHandler(ImageHandler):
2612 """Proxy of C++ GIFHandler class"""
2613 def __repr__(self):
2614 return "<%s.%s; proxy of C++ wxGIFHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
2615 def __init__(self, *args, **kwargs):
2616 """__init__(self) -> GIFHandler"""
2617 newobj = _core_.new_GIFHandler(*args, **kwargs)
2618 self.this = newobj.this
2619 self.thisown = 1
2620 del newobj.thisown
2621
2622 class GIFHandlerPtr(GIFHandler):
2623 def __init__(self, this):
2624 self.this = this
2625 if not hasattr(self,"thisown"): self.thisown = 0
2626 self.__class__ = GIFHandler
2627 _core_.GIFHandler_swigregister(GIFHandlerPtr)
2628
2629 class PCXHandler(ImageHandler):
2630 """Proxy of C++ PCXHandler class"""
2631 def __repr__(self):
2632 return "<%s.%s; proxy of C++ wxPCXHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
2633 def __init__(self, *args, **kwargs):
2634 """__init__(self) -> PCXHandler"""
2635 newobj = _core_.new_PCXHandler(*args, **kwargs)
2636 self.this = newobj.this
2637 self.thisown = 1
2638 del newobj.thisown
2639
2640 class PCXHandlerPtr(PCXHandler):
2641 def __init__(self, this):
2642 self.this = this
2643 if not hasattr(self,"thisown"): self.thisown = 0
2644 self.__class__ = PCXHandler
2645 _core_.PCXHandler_swigregister(PCXHandlerPtr)
2646
2647 class JPEGHandler(ImageHandler):
2648 """Proxy of C++ JPEGHandler class"""
2649 def __repr__(self):
2650 return "<%s.%s; proxy of C++ wxJPEGHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
2651 def __init__(self, *args, **kwargs):
2652 """__init__(self) -> JPEGHandler"""
2653 newobj = _core_.new_JPEGHandler(*args, **kwargs)
2654 self.this = newobj.this
2655 self.thisown = 1
2656 del newobj.thisown
2657
2658 class JPEGHandlerPtr(JPEGHandler):
2659 def __init__(self, this):
2660 self.this = this
2661 if not hasattr(self,"thisown"): self.thisown = 0
2662 self.__class__ = JPEGHandler
2663 _core_.JPEGHandler_swigregister(JPEGHandlerPtr)
2664
2665 class PNMHandler(ImageHandler):
2666 """Proxy of C++ PNMHandler class"""
2667 def __repr__(self):
2668 return "<%s.%s; proxy of C++ wxPNMHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
2669 def __init__(self, *args, **kwargs):
2670 """__init__(self) -> PNMHandler"""
2671 newobj = _core_.new_PNMHandler(*args, **kwargs)
2672 self.this = newobj.this
2673 self.thisown = 1
2674 del newobj.thisown
2675
2676 class PNMHandlerPtr(PNMHandler):
2677 def __init__(self, this):
2678 self.this = this
2679 if not hasattr(self,"thisown"): self.thisown = 0
2680 self.__class__ = PNMHandler
2681 _core_.PNMHandler_swigregister(PNMHandlerPtr)
2682
2683 class XPMHandler(ImageHandler):
2684 """Proxy of C++ XPMHandler class"""
2685 def __repr__(self):
2686 return "<%s.%s; proxy of C++ wxXPMHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
2687 def __init__(self, *args, **kwargs):
2688 """__init__(self) -> XPMHandler"""
2689 newobj = _core_.new_XPMHandler(*args, **kwargs)
2690 self.this = newobj.this
2691 self.thisown = 1
2692 del newobj.thisown
2693
2694 class XPMHandlerPtr(XPMHandler):
2695 def __init__(self, this):
2696 self.this = this
2697 if not hasattr(self,"thisown"): self.thisown = 0
2698 self.__class__ = XPMHandler
2699 _core_.XPMHandler_swigregister(XPMHandlerPtr)
2700
2701 class TIFFHandler(ImageHandler):
2702 """Proxy of C++ TIFFHandler class"""
2703 def __repr__(self):
2704 return "<%s.%s; proxy of C++ wxTIFFHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
2705 def __init__(self, *args, **kwargs):
2706 """__init__(self) -> TIFFHandler"""
2707 newobj = _core_.new_TIFFHandler(*args, **kwargs)
2708 self.this = newobj.this
2709 self.thisown = 1
2710 del newobj.thisown
2711
2712 class TIFFHandlerPtr(TIFFHandler):
2713 def __init__(self, this):
2714 self.this = this
2715 if not hasattr(self,"thisown"): self.thisown = 0
2716 self.__class__ = TIFFHandler
2717 _core_.TIFFHandler_swigregister(TIFFHandlerPtr)
2718
2719 QUANTIZE_INCLUDE_WINDOWS_COLOURS = _core_.QUANTIZE_INCLUDE_WINDOWS_COLOURS
2720 QUANTIZE_FILL_DESTINATION_IMAGE = _core_.QUANTIZE_FILL_DESTINATION_IMAGE
2721 class Quantize(object):
2722 """Performs quantization, or colour reduction, on a wxImage."""
2723 def __init__(self): raise RuntimeError, "No constructor defined"
2724 def __repr__(self):
2725 return "<%s.%s; proxy of C++ wxQuantize instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
2726 def Quantize(*args, **kwargs):
2727 """
2728 Quantize(Image src, Image dest, int desiredNoColours=236, int flags=wxQUANTIZE_INCLUDE_WINDOWS_COLOURS|wxQUANTIZE_FILL_DESTINATION_IMAGE) -> bool
2729
2730 Reduce the colours in the source image and put the result into the
2731 destination image, setting the palette in the destination if
2732 needed. Both images may be the same, to overwrite the source image.
2733 """
2734 return _core_.Quantize_Quantize(*args, **kwargs)
2735
2736 Quantize = staticmethod(Quantize)
2737
2738 class QuantizePtr(Quantize):
2739 def __init__(self, this):
2740 self.this = this
2741 if not hasattr(self,"thisown"): self.thisown = 0
2742 self.__class__ = Quantize
2743 _core_.Quantize_swigregister(QuantizePtr)
2744
2745 def Quantize_Quantize(*args, **kwargs):
2746 """
2747 Quantize_Quantize(Image src, Image dest, int desiredNoColours=236, int flags=wxQUANTIZE_INCLUDE_WINDOWS_COLOURS|wxQUANTIZE_FILL_DESTINATION_IMAGE) -> bool
2748
2749 Reduce the colours in the source image and put the result into the
2750 destination image, setting the palette in the destination if
2751 needed. Both images may be the same, to overwrite the source image.
2752 """
2753 return _core_.Quantize_Quantize(*args, **kwargs)
2754
2755 #---------------------------------------------------------------------------
2756
2757 class EvtHandler(Object):
2758 """Proxy of C++ EvtHandler class"""
2759 def __repr__(self):
2760 return "<%s.%s; proxy of C++ wxEvtHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
2761 def __init__(self, *args, **kwargs):
2762 """__init__(self) -> EvtHandler"""
2763 newobj = _core_.new_EvtHandler(*args, **kwargs)
2764 self.this = newobj.this
2765 self.thisown = 1
2766 del newobj.thisown
2767 def GetNextHandler(*args, **kwargs):
2768 """GetNextHandler(self) -> EvtHandler"""
2769 return _core_.EvtHandler_GetNextHandler(*args, **kwargs)
2770
2771 def GetPreviousHandler(*args, **kwargs):
2772 """GetPreviousHandler(self) -> EvtHandler"""
2773 return _core_.EvtHandler_GetPreviousHandler(*args, **kwargs)
2774
2775 def SetNextHandler(*args, **kwargs):
2776 """SetNextHandler(self, EvtHandler handler)"""
2777 return _core_.EvtHandler_SetNextHandler(*args, **kwargs)
2778
2779 def SetPreviousHandler(*args, **kwargs):
2780 """SetPreviousHandler(self, EvtHandler handler)"""
2781 return _core_.EvtHandler_SetPreviousHandler(*args, **kwargs)
2782
2783 def GetEvtHandlerEnabled(*args, **kwargs):
2784 """GetEvtHandlerEnabled(self) -> bool"""
2785 return _core_.EvtHandler_GetEvtHandlerEnabled(*args, **kwargs)
2786
2787 def SetEvtHandlerEnabled(*args, **kwargs):
2788 """SetEvtHandlerEnabled(self, bool enabled)"""
2789 return _core_.EvtHandler_SetEvtHandlerEnabled(*args, **kwargs)
2790
2791 def ProcessEvent(*args, **kwargs):
2792 """ProcessEvent(self, Event event) -> bool"""
2793 return _core_.EvtHandler_ProcessEvent(*args, **kwargs)
2794
2795 def AddPendingEvent(*args, **kwargs):
2796 """AddPendingEvent(self, Event event)"""
2797 return _core_.EvtHandler_AddPendingEvent(*args, **kwargs)
2798
2799 def ProcessPendingEvents(*args, **kwargs):
2800 """ProcessPendingEvents(self)"""
2801 return _core_.EvtHandler_ProcessPendingEvents(*args, **kwargs)
2802
2803 def Connect(*args, **kwargs):
2804 """Connect(self, int id, int lastId, int eventType, PyObject func)"""
2805 return _core_.EvtHandler_Connect(*args, **kwargs)
2806
2807 def Disconnect(*args, **kwargs):
2808 """Disconnect(self, int id, int lastId=-1, wxEventType eventType=wxEVT_NULL) -> bool"""
2809 return _core_.EvtHandler_Disconnect(*args, **kwargs)
2810
2811 def _setOORInfo(*args, **kwargs):
2812 """_setOORInfo(self, PyObject _self, bool incref=True)"""
2813 return _core_.EvtHandler__setOORInfo(*args, **kwargs)
2814
2815 def Bind(self, event, handler, source=None, id=wx.ID_ANY, id2=wx.ID_ANY):
2816 """
2817 Bind an event to an event handler.
2818
2819 :param event: One of the EVT_* objects that specifies the
2820 type of event to bind,
2821
2822 :param handler: A callable object to be invoked when the
2823 event is delivered to self. Pass None to
2824 disconnect an event handler.
2825
2826 :param source: Sometimes the event originates from a
2827 different window than self, but you still
2828 want to catch it in self. (For example, a
2829 button event delivered to a frame.) By
2830 passing the source of the event, the event
2831 handling system is able to differentiate
2832 between the same event type from different
2833 controls.
2834
2835 :param id: Used to spcify the event source by ID instead
2836 of instance.
2837
2838 :param id2: Used when it is desirable to bind a handler
2839 to a range of IDs, such as with EVT_MENU_RANGE.
2840 """
2841 if source is not None:
2842 id = source.GetId()
2843 event.Bind(self, id, id2, handler)
2844
2845 def Unbind(self, event, source=None, id=wx.ID_ANY, id2=wx.ID_ANY):
2846 """
2847 Disconencts the event handler binding for event from self.
2848 Returns True if successful.
2849 """
2850 if source is not None:
2851 id = source.GetId()
2852 return event.Unbind(self, id, id2)
2853
2854
2855 class EvtHandlerPtr(EvtHandler):
2856 def __init__(self, this):
2857 self.this = this
2858 if not hasattr(self,"thisown"): self.thisown = 0
2859 self.__class__ = EvtHandler
2860 _core_.EvtHandler_swigregister(EvtHandlerPtr)
2861
2862 #---------------------------------------------------------------------------
2863
2864 class PyEventBinder(object):
2865 """
2866 Instances of this class are used to bind specific events to event
2867 handlers.
2868 """
2869 def __init__(self, evtType, expectedIDs=0):
2870 if expectedIDs not in [0, 1, 2]:
2871 raise ValueError, "Invalid number of expectedIDs"
2872 self.expectedIDs = expectedIDs
2873
2874 if type(evtType) == list or type(evtType) == tuple:
2875 self.evtType = evtType
2876 else:
2877 self.evtType = [evtType]
2878
2879
2880 def Bind(self, target, id1, id2, function):
2881 """Bind this set of event types to target."""
2882 for et in self.evtType:
2883 target.Connect(id1, id2, et, function)
2884
2885
2886 def Unbind(self, target, id1, id2):
2887 """Remove an event binding."""
2888 success = 0
2889 for et in self.evtType:
2890 success += target.Disconnect(id1, id2, et)
2891 return success != 0
2892
2893
2894 def __call__(self, *args):
2895 """
2896 For backwards compatibility with the old EVT_* functions.
2897 Should be called with either (window, func), (window, ID,
2898 func) or (window, ID1, ID2, func) parameters depending on the
2899 type of the event.
2900 """
2901 assert len(args) == 2 + self.expectedIDs
2902 id1 = wx.ID_ANY
2903 id2 = wx.ID_ANY
2904 target = args[0]
2905 if self.expectedIDs == 0:
2906 func = args[1]
2907 elif self.expectedIDs == 1:
2908 id1 = args[1]
2909 func = args[2]
2910 elif self.expectedIDs == 2:
2911 id1 = args[1]
2912 id2 = args[2]
2913 func = args[3]
2914 else:
2915 raise ValueError, "Unexpected number of IDs"
2916
2917 self.Bind(target, id1, id2, func)
2918
2919
2920 # These two are square pegs that don't fit the PyEventBinder hole...
2921 def EVT_COMMAND(win, id, cmd, func):
2922 win.Connect(id, -1, cmd, func)
2923 def EVT_COMMAND_RANGE(win, id1, id2, cmd, func):
2924 win.Connect(id1, id2, cmd, func)
2925
2926
2927 #---------------------------------------------------------------------------
2928
2929 #---------------------------------------------------------------------------
2930
2931 EVENT_PROPAGATE_NONE = _core_.EVENT_PROPAGATE_NONE
2932 EVENT_PROPAGATE_MAX = _core_.EVENT_PROPAGATE_MAX
2933
2934 def NewEventType(*args, **kwargs):
2935 """NewEventType() -> wxEventType"""
2936 return _core_.NewEventType(*args, **kwargs)
2937 wxEVT_NULL = _core_.wxEVT_NULL
2938 wxEVT_FIRST = _core_.wxEVT_FIRST
2939 wxEVT_USER_FIRST = _core_.wxEVT_USER_FIRST
2940 wxEVT_COMMAND_BUTTON_CLICKED = _core_.wxEVT_COMMAND_BUTTON_CLICKED
2941 wxEVT_COMMAND_CHECKBOX_CLICKED = _core_.wxEVT_COMMAND_CHECKBOX_CLICKED
2942 wxEVT_COMMAND_CHOICE_SELECTED = _core_.wxEVT_COMMAND_CHOICE_SELECTED
2943 wxEVT_COMMAND_LISTBOX_SELECTED = _core_.wxEVT_COMMAND_LISTBOX_SELECTED
2944 wxEVT_COMMAND_LISTBOX_DOUBLECLICKED = _core_.wxEVT_COMMAND_LISTBOX_DOUBLECLICKED
2945 wxEVT_COMMAND_CHECKLISTBOX_TOGGLED = _core_.wxEVT_COMMAND_CHECKLISTBOX_TOGGLED
2946 wxEVT_COMMAND_MENU_SELECTED = _core_.wxEVT_COMMAND_MENU_SELECTED
2947 wxEVT_COMMAND_TOOL_CLICKED = _core_.wxEVT_COMMAND_TOOL_CLICKED
2948 wxEVT_COMMAND_SLIDER_UPDATED = _core_.wxEVT_COMMAND_SLIDER_UPDATED
2949 wxEVT_COMMAND_RADIOBOX_SELECTED = _core_.wxEVT_COMMAND_RADIOBOX_SELECTED
2950 wxEVT_COMMAND_RADIOBUTTON_SELECTED = _core_.wxEVT_COMMAND_RADIOBUTTON_SELECTED
2951 wxEVT_COMMAND_SCROLLBAR_UPDATED = _core_.wxEVT_COMMAND_SCROLLBAR_UPDATED
2952 wxEVT_COMMAND_VLBOX_SELECTED = _core_.wxEVT_COMMAND_VLBOX_SELECTED
2953 wxEVT_COMMAND_COMBOBOX_SELECTED = _core_.wxEVT_COMMAND_COMBOBOX_SELECTED
2954 wxEVT_COMMAND_TOOL_RCLICKED = _core_.wxEVT_COMMAND_TOOL_RCLICKED
2955 wxEVT_COMMAND_TOOL_ENTER = _core_.wxEVT_COMMAND_TOOL_ENTER
2956 wxEVT_LEFT_DOWN = _core_.wxEVT_LEFT_DOWN
2957 wxEVT_LEFT_UP = _core_.wxEVT_LEFT_UP
2958 wxEVT_MIDDLE_DOWN = _core_.wxEVT_MIDDLE_DOWN
2959 wxEVT_MIDDLE_UP = _core_.wxEVT_MIDDLE_UP
2960 wxEVT_RIGHT_DOWN = _core_.wxEVT_RIGHT_DOWN
2961 wxEVT_RIGHT_UP = _core_.wxEVT_RIGHT_UP
2962 wxEVT_MOTION = _core_.wxEVT_MOTION
2963 wxEVT_ENTER_WINDOW = _core_.wxEVT_ENTER_WINDOW
2964 wxEVT_LEAVE_WINDOW = _core_.wxEVT_LEAVE_WINDOW
2965 wxEVT_LEFT_DCLICK = _core_.wxEVT_LEFT_DCLICK
2966 wxEVT_MIDDLE_DCLICK = _core_.wxEVT_MIDDLE_DCLICK
2967 wxEVT_RIGHT_DCLICK = _core_.wxEVT_RIGHT_DCLICK
2968 wxEVT_SET_FOCUS = _core_.wxEVT_SET_FOCUS
2969 wxEVT_KILL_FOCUS = _core_.wxEVT_KILL_FOCUS
2970 wxEVT_CHILD_FOCUS = _core_.wxEVT_CHILD_FOCUS
2971 wxEVT_MOUSEWHEEL = _core_.wxEVT_MOUSEWHEEL
2972 wxEVT_NC_LEFT_DOWN = _core_.wxEVT_NC_LEFT_DOWN
2973 wxEVT_NC_LEFT_UP = _core_.wxEVT_NC_LEFT_UP
2974 wxEVT_NC_MIDDLE_DOWN = _core_.wxEVT_NC_MIDDLE_DOWN
2975 wxEVT_NC_MIDDLE_UP = _core_.wxEVT_NC_MIDDLE_UP
2976 wxEVT_NC_RIGHT_DOWN = _core_.wxEVT_NC_RIGHT_DOWN
2977 wxEVT_NC_RIGHT_UP = _core_.wxEVT_NC_RIGHT_UP
2978 wxEVT_NC_MOTION = _core_.wxEVT_NC_MOTION
2979 wxEVT_NC_ENTER_WINDOW = _core_.wxEVT_NC_ENTER_WINDOW
2980 wxEVT_NC_LEAVE_WINDOW = _core_.wxEVT_NC_LEAVE_WINDOW
2981 wxEVT_NC_LEFT_DCLICK = _core_.wxEVT_NC_LEFT_DCLICK
2982 wxEVT_NC_MIDDLE_DCLICK = _core_.wxEVT_NC_MIDDLE_DCLICK
2983 wxEVT_NC_RIGHT_DCLICK = _core_.wxEVT_NC_RIGHT_DCLICK
2984 wxEVT_CHAR = _core_.wxEVT_CHAR
2985 wxEVT_CHAR_HOOK = _core_.wxEVT_CHAR_HOOK
2986 wxEVT_NAVIGATION_KEY = _core_.wxEVT_NAVIGATION_KEY
2987 wxEVT_KEY_DOWN = _core_.wxEVT_KEY_DOWN
2988 wxEVT_KEY_UP = _core_.wxEVT_KEY_UP
2989 wxEVT_HOTKEY = _core_.wxEVT_HOTKEY
2990 wxEVT_SET_CURSOR = _core_.wxEVT_SET_CURSOR
2991 wxEVT_SCROLL_TOP = _core_.wxEVT_SCROLL_TOP
2992 wxEVT_SCROLL_BOTTOM = _core_.wxEVT_SCROLL_BOTTOM
2993 wxEVT_SCROLL_LINEUP = _core_.wxEVT_SCROLL_LINEUP
2994 wxEVT_SCROLL_LINEDOWN = _core_.wxEVT_SCROLL_LINEDOWN
2995 wxEVT_SCROLL_PAGEUP = _core_.wxEVT_SCROLL_PAGEUP
2996 wxEVT_SCROLL_PAGEDOWN = _core_.wxEVT_SCROLL_PAGEDOWN
2997 wxEVT_SCROLL_THUMBTRACK = _core_.wxEVT_SCROLL_THUMBTRACK
2998 wxEVT_SCROLL_THUMBRELEASE = _core_.wxEVT_SCROLL_THUMBRELEASE
2999 wxEVT_SCROLL_ENDSCROLL = _core_.wxEVT_SCROLL_ENDSCROLL
3000 wxEVT_SCROLLWIN_TOP = _core_.wxEVT_SCROLLWIN_TOP
3001 wxEVT_SCROLLWIN_BOTTOM = _core_.wxEVT_SCROLLWIN_BOTTOM
3002 wxEVT_SCROLLWIN_LINEUP = _core_.wxEVT_SCROLLWIN_LINEUP
3003 wxEVT_SCROLLWIN_LINEDOWN = _core_.wxEVT_SCROLLWIN_LINEDOWN
3004 wxEVT_SCROLLWIN_PAGEUP = _core_.wxEVT_SCROLLWIN_PAGEUP
3005 wxEVT_SCROLLWIN_PAGEDOWN = _core_.wxEVT_SCROLLWIN_PAGEDOWN
3006 wxEVT_SCROLLWIN_THUMBTRACK = _core_.wxEVT_SCROLLWIN_THUMBTRACK
3007 wxEVT_SCROLLWIN_THUMBRELEASE = _core_.wxEVT_SCROLLWIN_THUMBRELEASE
3008 wxEVT_SIZE = _core_.wxEVT_SIZE
3009 wxEVT_MOVE = _core_.wxEVT_MOVE
3010 wxEVT_CLOSE_WINDOW = _core_.wxEVT_CLOSE_WINDOW
3011 wxEVT_END_SESSION = _core_.wxEVT_END_SESSION
3012 wxEVT_QUERY_END_SESSION = _core_.wxEVT_QUERY_END_SESSION
3013 wxEVT_ACTIVATE_APP = _core_.wxEVT_ACTIVATE_APP
3014 wxEVT_POWER = _core_.wxEVT_POWER
3015 wxEVT_ACTIVATE = _core_.wxEVT_ACTIVATE
3016 wxEVT_CREATE = _core_.wxEVT_CREATE
3017 wxEVT_DESTROY = _core_.wxEVT_DESTROY
3018 wxEVT_SHOW = _core_.wxEVT_SHOW
3019 wxEVT_ICONIZE = _core_.wxEVT_ICONIZE
3020 wxEVT_MAXIMIZE = _core_.wxEVT_MAXIMIZE
3021 wxEVT_MOUSE_CAPTURE_CHANGED = _core_.wxEVT_MOUSE_CAPTURE_CHANGED
3022 wxEVT_PAINT = _core_.wxEVT_PAINT
3023 wxEVT_ERASE_BACKGROUND = _core_.wxEVT_ERASE_BACKGROUND
3024 wxEVT_NC_PAINT = _core_.wxEVT_NC_PAINT
3025 wxEVT_PAINT_ICON = _core_.wxEVT_PAINT_ICON
3026 wxEVT_MENU_OPEN = _core_.wxEVT_MENU_OPEN
3027 wxEVT_MENU_CLOSE = _core_.wxEVT_MENU_CLOSE
3028 wxEVT_MENU_HIGHLIGHT = _core_.wxEVT_MENU_HIGHLIGHT
3029 wxEVT_CONTEXT_MENU = _core_.wxEVT_CONTEXT_MENU
3030 wxEVT_SYS_COLOUR_CHANGED = _core_.wxEVT_SYS_COLOUR_CHANGED
3031 wxEVT_DISPLAY_CHANGED = _core_.wxEVT_DISPLAY_CHANGED
3032 wxEVT_SETTING_CHANGED = _core_.wxEVT_SETTING_CHANGED
3033 wxEVT_QUERY_NEW_PALETTE = _core_.wxEVT_QUERY_NEW_PALETTE
3034 wxEVT_PALETTE_CHANGED = _core_.wxEVT_PALETTE_CHANGED
3035 wxEVT_DROP_FILES = _core_.wxEVT_DROP_FILES
3036 wxEVT_DRAW_ITEM = _core_.wxEVT_DRAW_ITEM
3037 wxEVT_MEASURE_ITEM = _core_.wxEVT_MEASURE_ITEM
3038 wxEVT_COMPARE_ITEM = _core_.wxEVT_COMPARE_ITEM
3039 wxEVT_INIT_DIALOG = _core_.wxEVT_INIT_DIALOG
3040 wxEVT_IDLE = _core_.wxEVT_IDLE
3041 wxEVT_UPDATE_UI = _core_.wxEVT_UPDATE_UI
3042 wxEVT_SIZING = _core_.wxEVT_SIZING
3043 wxEVT_MOVING = _core_.wxEVT_MOVING
3044 wxEVT_COMMAND_LEFT_CLICK = _core_.wxEVT_COMMAND_LEFT_CLICK
3045 wxEVT_COMMAND_LEFT_DCLICK = _core_.wxEVT_COMMAND_LEFT_DCLICK
3046 wxEVT_COMMAND_RIGHT_CLICK = _core_.wxEVT_COMMAND_RIGHT_CLICK
3047 wxEVT_COMMAND_RIGHT_DCLICK = _core_.wxEVT_COMMAND_RIGHT_DCLICK
3048 wxEVT_COMMAND_SET_FOCUS = _core_.wxEVT_COMMAND_SET_FOCUS
3049 wxEVT_COMMAND_KILL_FOCUS = _core_.wxEVT_COMMAND_KILL_FOCUS
3050 wxEVT_COMMAND_ENTER = _core_.wxEVT_COMMAND_ENTER
3051 #
3052 # Create some event binders
3053 EVT_SIZE = wx.PyEventBinder( wxEVT_SIZE )
3054 EVT_SIZING = wx.PyEventBinder( wxEVT_SIZING )
3055 EVT_MOVE = wx.PyEventBinder( wxEVT_MOVE )
3056 EVT_MOVING = wx.PyEventBinder( wxEVT_MOVING )
3057 EVT_CLOSE = wx.PyEventBinder( wxEVT_CLOSE_WINDOW )
3058 EVT_END_SESSION = wx.PyEventBinder( wxEVT_END_SESSION )
3059 EVT_QUERY_END_SESSION = wx.PyEventBinder( wxEVT_QUERY_END_SESSION )
3060 EVT_PAINT = wx.PyEventBinder( wxEVT_PAINT )
3061 EVT_NC_PAINT = wx.PyEventBinder( wxEVT_NC_PAINT )
3062 EVT_ERASE_BACKGROUND = wx.PyEventBinder( wxEVT_ERASE_BACKGROUND )
3063 EVT_CHAR = wx.PyEventBinder( wxEVT_CHAR )
3064 EVT_KEY_DOWN = wx.PyEventBinder( wxEVT_KEY_DOWN )
3065 EVT_KEY_UP = wx.PyEventBinder( wxEVT_KEY_UP )
3066 EVT_HOTKEY = wx.PyEventBinder( wxEVT_HOTKEY, 1)
3067 EVT_CHAR_HOOK = wx.PyEventBinder( wxEVT_CHAR_HOOK )
3068 EVT_MENU_OPEN = wx.PyEventBinder( wxEVT_MENU_OPEN )
3069 EVT_MENU_CLOSE = wx.PyEventBinder( wxEVT_MENU_CLOSE )
3070 EVT_MENU_HIGHLIGHT = wx.PyEventBinder( wxEVT_MENU_HIGHLIGHT, 1)
3071 EVT_MENU_HIGHLIGHT_ALL = wx.PyEventBinder( wxEVT_MENU_HIGHLIGHT )
3072 EVT_SET_FOCUS = wx.PyEventBinder( wxEVT_SET_FOCUS )
3073 EVT_KILL_FOCUS = wx.PyEventBinder( wxEVT_KILL_FOCUS )
3074 EVT_CHILD_FOCUS = wx.PyEventBinder( wxEVT_CHILD_FOCUS )
3075 EVT_ACTIVATE = wx.PyEventBinder( wxEVT_ACTIVATE )
3076 EVT_ACTIVATE_APP = wx.PyEventBinder( wxEVT_ACTIVATE_APP )
3077 EVT_END_SESSION = wx.PyEventBinder( wxEVT_END_SESSION )
3078 EVT_QUERY_END_SESSION = wx.PyEventBinder( wxEVT_QUERY_END_SESSION )
3079 EVT_DROP_FILES = wx.PyEventBinder( wxEVT_DROP_FILES )
3080 EVT_INIT_DIALOG = wx.PyEventBinder( wxEVT_INIT_DIALOG )
3081 EVT_SYS_COLOUR_CHANGED = wx.PyEventBinder( wxEVT_SYS_COLOUR_CHANGED )
3082 EVT_DISPLAY_CHANGED = wx.PyEventBinder( wxEVT_DISPLAY_CHANGED )
3083 EVT_SHOW = wx.PyEventBinder( wxEVT_SHOW )
3084 EVT_MAXIMIZE = wx.PyEventBinder( wxEVT_MAXIMIZE )
3085 EVT_ICONIZE = wx.PyEventBinder( wxEVT_ICONIZE )
3086 EVT_NAVIGATION_KEY = wx.PyEventBinder( wxEVT_NAVIGATION_KEY )
3087 EVT_PALETTE_CHANGED = wx.PyEventBinder( wxEVT_PALETTE_CHANGED )
3088 EVT_QUERY_NEW_PALETTE = wx.PyEventBinder( wxEVT_QUERY_NEW_PALETTE )
3089 EVT_WINDOW_CREATE = wx.PyEventBinder( wxEVT_CREATE )
3090 EVT_WINDOW_DESTROY = wx.PyEventBinder( wxEVT_DESTROY )
3091 EVT_SET_CURSOR = wx.PyEventBinder( wxEVT_SET_CURSOR )
3092 EVT_MOUSE_CAPTURE_CHANGED = wx.PyEventBinder( wxEVT_MOUSE_CAPTURE_CHANGED )
3093
3094 EVT_LEFT_DOWN = wx.PyEventBinder( wxEVT_LEFT_DOWN )
3095 EVT_LEFT_UP = wx.PyEventBinder( wxEVT_LEFT_UP )
3096 EVT_MIDDLE_DOWN = wx.PyEventBinder( wxEVT_MIDDLE_DOWN )
3097 EVT_MIDDLE_UP = wx.PyEventBinder( wxEVT_MIDDLE_UP )
3098 EVT_RIGHT_DOWN = wx.PyEventBinder( wxEVT_RIGHT_DOWN )
3099 EVT_RIGHT_UP = wx.PyEventBinder( wxEVT_RIGHT_UP )
3100 EVT_MOTION = wx.PyEventBinder( wxEVT_MOTION )
3101 EVT_LEFT_DCLICK = wx.PyEventBinder( wxEVT_LEFT_DCLICK )
3102 EVT_MIDDLE_DCLICK = wx.PyEventBinder( wxEVT_MIDDLE_DCLICK )
3103 EVT_RIGHT_DCLICK = wx.PyEventBinder( wxEVT_RIGHT_DCLICK )
3104 EVT_LEAVE_WINDOW = wx.PyEventBinder( wxEVT_LEAVE_WINDOW )
3105 EVT_ENTER_WINDOW = wx.PyEventBinder( wxEVT_ENTER_WINDOW )
3106 EVT_MOUSEWHEEL = wx.PyEventBinder( wxEVT_MOUSEWHEEL )
3107
3108 EVT_MOUSE_EVENTS = wx.PyEventBinder([ wxEVT_LEFT_DOWN,
3109 wxEVT_LEFT_UP,
3110 wxEVT_MIDDLE_DOWN,
3111 wxEVT_MIDDLE_UP,
3112 wxEVT_RIGHT_DOWN,
3113 wxEVT_RIGHT_UP,
3114 wxEVT_MOTION,
3115 wxEVT_LEFT_DCLICK,
3116 wxEVT_MIDDLE_DCLICK,
3117 wxEVT_RIGHT_DCLICK,
3118 wxEVT_ENTER_WINDOW,
3119 wxEVT_LEAVE_WINDOW,
3120 wxEVT_MOUSEWHEEL
3121 ])
3122
3123
3124 # Scrolling from wxWindow (sent to wxScrolledWindow)
3125 EVT_SCROLLWIN = wx.PyEventBinder([ wxEVT_SCROLLWIN_TOP,
3126 wxEVT_SCROLLWIN_BOTTOM,
3127 wxEVT_SCROLLWIN_LINEUP,
3128 wxEVT_SCROLLWIN_LINEDOWN,
3129 wxEVT_SCROLLWIN_PAGEUP,
3130 wxEVT_SCROLLWIN_PAGEDOWN,
3131 wxEVT_SCROLLWIN_THUMBTRACK,
3132 wxEVT_SCROLLWIN_THUMBRELEASE,
3133 ])
3134
3135 EVT_SCROLLWIN_TOP = wx.PyEventBinder( wxEVT_SCROLLWIN_TOP )
3136 EVT_SCROLLWIN_BOTTOM = wx.PyEventBinder( wxEVT_SCROLLWIN_BOTTOM )
3137 EVT_SCROLLWIN_LINEUP = wx.PyEventBinder( wxEVT_SCROLLWIN_LINEUP )
3138 EVT_SCROLLWIN_LINEDOWN = wx.PyEventBinder( wxEVT_SCROLLWIN_LINEDOWN )
3139 EVT_SCROLLWIN_PAGEUP = wx.PyEventBinder( wxEVT_SCROLLWIN_PAGEUP )
3140 EVT_SCROLLWIN_PAGEDOWN = wx.PyEventBinder( wxEVT_SCROLLWIN_PAGEDOWN )
3141 EVT_SCROLLWIN_THUMBTRACK = wx.PyEventBinder( wxEVT_SCROLLWIN_THUMBTRACK )
3142 EVT_SCROLLWIN_THUMBRELEASE = wx.PyEventBinder( wxEVT_SCROLLWIN_THUMBRELEASE )
3143
3144 # Scrolling from wxSlider and wxScrollBar
3145 EVT_SCROLL = wx.PyEventBinder([ wxEVT_SCROLL_TOP,
3146 wxEVT_SCROLL_BOTTOM,
3147 wxEVT_SCROLL_LINEUP,
3148 wxEVT_SCROLL_LINEDOWN,
3149 wxEVT_SCROLL_PAGEUP,
3150 wxEVT_SCROLL_PAGEDOWN,
3151 wxEVT_SCROLL_THUMBTRACK,
3152 wxEVT_SCROLL_THUMBRELEASE,
3153 wxEVT_SCROLL_ENDSCROLL,
3154 ])
3155
3156 EVT_SCROLL_TOP = wx.PyEventBinder( wxEVT_SCROLL_TOP )
3157 EVT_SCROLL_BOTTOM = wx.PyEventBinder( wxEVT_SCROLL_BOTTOM )
3158 EVT_SCROLL_LINEUP = wx.PyEventBinder( wxEVT_SCROLL_LINEUP )
3159 EVT_SCROLL_LINEDOWN = wx.PyEventBinder( wxEVT_SCROLL_LINEDOWN )
3160 EVT_SCROLL_PAGEUP = wx.PyEventBinder( wxEVT_SCROLL_PAGEUP )
3161 EVT_SCROLL_PAGEDOWN = wx.PyEventBinder( wxEVT_SCROLL_PAGEDOWN )
3162 EVT_SCROLL_THUMBTRACK = wx.PyEventBinder( wxEVT_SCROLL_THUMBTRACK )
3163 EVT_SCROLL_THUMBRELEASE = wx.PyEventBinder( wxEVT_SCROLL_THUMBRELEASE )
3164 EVT_SCROLL_ENDSCROLL = wx.PyEventBinder( wxEVT_SCROLL_ENDSCROLL )
3165
3166 # Scrolling from wxSlider and wxScrollBar, with an id
3167 EVT_COMMAND_SCROLL = wx.PyEventBinder([ wxEVT_SCROLL_TOP,
3168 wxEVT_SCROLL_BOTTOM,
3169 wxEVT_SCROLL_LINEUP,
3170 wxEVT_SCROLL_LINEDOWN,
3171 wxEVT_SCROLL_PAGEUP,
3172 wxEVT_SCROLL_PAGEDOWN,
3173 wxEVT_SCROLL_THUMBTRACK,
3174 wxEVT_SCROLL_THUMBRELEASE,
3175 wxEVT_SCROLL_ENDSCROLL,
3176 ], 1)
3177
3178 EVT_COMMAND_SCROLL_TOP = wx.PyEventBinder( wxEVT_SCROLL_TOP, 1)
3179 EVT_COMMAND_SCROLL_BOTTOM = wx.PyEventBinder( wxEVT_SCROLL_BOTTOM, 1)
3180 EVT_COMMAND_SCROLL_LINEUP = wx.PyEventBinder( wxEVT_SCROLL_LINEUP, 1)
3181 EVT_COMMAND_SCROLL_LINEDOWN = wx.PyEventBinder( wxEVT_SCROLL_LINEDOWN, 1)
3182 EVT_COMMAND_SCROLL_PAGEUP = wx.PyEventBinder( wxEVT_SCROLL_PAGEUP, 1)
3183 EVT_COMMAND_SCROLL_PAGEDOWN = wx.PyEventBinder( wxEVT_SCROLL_PAGEDOWN, 1)
3184 EVT_COMMAND_SCROLL_THUMBTRACK = wx.PyEventBinder( wxEVT_SCROLL_THUMBTRACK, 1)
3185 EVT_COMMAND_SCROLL_THUMBRELEASE = wx.PyEventBinder( wxEVT_SCROLL_THUMBRELEASE, 1)
3186 EVT_COMMAND_SCROLL_ENDSCROLL = wx.PyEventBinder( wxEVT_SCROLL_ENDSCROLL, 1)
3187
3188 EVT_BUTTON = wx.PyEventBinder( wxEVT_COMMAND_BUTTON_CLICKED, 1)
3189 EVT_CHECKBOX = wx.PyEventBinder( wxEVT_COMMAND_CHECKBOX_CLICKED, 1)
3190 EVT_CHOICE = wx.PyEventBinder( wxEVT_COMMAND_CHOICE_SELECTED, 1)
3191 EVT_LISTBOX = wx.PyEventBinder( wxEVT_COMMAND_LISTBOX_SELECTED, 1)
3192 EVT_LISTBOX_DCLICK = wx.PyEventBinder( wxEVT_COMMAND_LISTBOX_DOUBLECLICKED, 1)
3193 EVT_MENU = wx.PyEventBinder( wxEVT_COMMAND_MENU_SELECTED, 1)
3194 EVT_MENU_RANGE = wx.PyEventBinder( wxEVT_COMMAND_MENU_SELECTED, 2)
3195 EVT_SLIDER = wx.PyEventBinder( wxEVT_COMMAND_SLIDER_UPDATED, 1)
3196 EVT_RADIOBOX = wx.PyEventBinder( wxEVT_COMMAND_RADIOBOX_SELECTED, 1)
3197 EVT_RADIOBUTTON = wx.PyEventBinder( wxEVT_COMMAND_RADIOBUTTON_SELECTED, 1)
3198
3199 EVT_SCROLLBAR = wx.PyEventBinder( wxEVT_COMMAND_SCROLLBAR_UPDATED, 1)
3200 EVT_VLBOX = wx.PyEventBinder( wxEVT_COMMAND_VLBOX_SELECTED, 1)
3201 EVT_COMBOBOX = wx.PyEventBinder( wxEVT_COMMAND_COMBOBOX_SELECTED, 1)
3202 EVT_TOOL = wx.PyEventBinder( wxEVT_COMMAND_TOOL_CLICKED, 1)
3203 EVT_TOOL_RANGE = wx.PyEventBinder( wxEVT_COMMAND_TOOL_CLICKED, 2)
3204 EVT_TOOL_RCLICKED = wx.PyEventBinder( wxEVT_COMMAND_TOOL_RCLICKED, 1)
3205 EVT_TOOL_RCLICKED_RANGE = wx.PyEventBinder( wxEVT_COMMAND_TOOL_RCLICKED, 2)
3206 EVT_TOOL_ENTER = wx.PyEventBinder( wxEVT_COMMAND_TOOL_ENTER, 1)
3207 EVT_CHECKLISTBOX = wx.PyEventBinder( wxEVT_COMMAND_CHECKLISTBOX_TOGGLED, 1)
3208
3209
3210 EVT_COMMAND_LEFT_CLICK = wx.PyEventBinder( wxEVT_COMMAND_LEFT_CLICK, 1)
3211 EVT_COMMAND_LEFT_DCLICK = wx.PyEventBinder( wxEVT_COMMAND_LEFT_DCLICK, 1)
3212 EVT_COMMAND_RIGHT_CLICK = wx.PyEventBinder( wxEVT_COMMAND_RIGHT_CLICK, 1)
3213 EVT_COMMAND_RIGHT_DCLICK = wx.PyEventBinder( wxEVT_COMMAND_RIGHT_DCLICK, 1)
3214 EVT_COMMAND_SET_FOCUS = wx.PyEventBinder( wxEVT_COMMAND_SET_FOCUS, 1)
3215 EVT_COMMAND_KILL_FOCUS = wx.PyEventBinder( wxEVT_COMMAND_KILL_FOCUS, 1)
3216 EVT_COMMAND_ENTER = wx.PyEventBinder( wxEVT_COMMAND_ENTER, 1)
3217
3218 EVT_IDLE = wx.PyEventBinder( wxEVT_IDLE )
3219
3220 EVT_UPDATE_UI = wx.PyEventBinder( wxEVT_UPDATE_UI, 1)
3221 EVT_UPDATE_UI_RANGE = wx.PyEventBinder( wxEVT_UPDATE_UI, 2)
3222
3223 EVT_CONTEXT_MENU = wx.PyEventBinder( wxEVT_CONTEXT_MENU )
3224
3225
3226
3227 #---------------------------------------------------------------------------
3228
3229 class Event(Object):
3230 """Proxy of C++ Event class"""
3231 def __init__(self): raise RuntimeError, "No constructor defined"
3232 def __repr__(self):
3233 return "<%s.%s; proxy of C++ wxEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
3234 def __del__(self, destroy=_core_.delete_Event):
3235 """__del__(self)"""
3236 try:
3237 if self.thisown: destroy(self)
3238 except: pass
3239
3240 def SetEventType(*args, **kwargs):
3241 """SetEventType(self, wxEventType typ)"""
3242 return _core_.Event_SetEventType(*args, **kwargs)
3243
3244 def GetEventType(*args, **kwargs):
3245 """GetEventType(self) -> wxEventType"""
3246 return _core_.Event_GetEventType(*args, **kwargs)
3247
3248 def GetEventObject(*args, **kwargs):
3249 """GetEventObject(self) -> Object"""
3250 return _core_.Event_GetEventObject(*args, **kwargs)
3251
3252 def SetEventObject(*args, **kwargs):
3253 """SetEventObject(self, Object obj)"""
3254 return _core_.Event_SetEventObject(*args, **kwargs)
3255
3256 def GetTimestamp(*args, **kwargs):
3257 """GetTimestamp(self) -> long"""
3258 return _core_.Event_GetTimestamp(*args, **kwargs)
3259
3260 def SetTimestamp(*args, **kwargs):
3261 """SetTimestamp(self, long ts=0)"""
3262 return _core_.Event_SetTimestamp(*args, **kwargs)
3263
3264 def GetId(*args, **kwargs):
3265 """GetId(self) -> int"""
3266 return _core_.Event_GetId(*args, **kwargs)
3267
3268 def SetId(*args, **kwargs):
3269 """SetId(self, int Id)"""
3270 return _core_.Event_SetId(*args, **kwargs)
3271
3272 def IsCommandEvent(*args, **kwargs):
3273 """IsCommandEvent(self) -> bool"""
3274 return _core_.Event_IsCommandEvent(*args, **kwargs)
3275
3276 def Skip(*args, **kwargs):
3277 """Skip(self, bool skip=True)"""
3278 return _core_.Event_Skip(*args, **kwargs)
3279
3280 def GetSkipped(*args, **kwargs):
3281 """GetSkipped(self) -> bool"""
3282 return _core_.Event_GetSkipped(*args, **kwargs)
3283
3284 def ShouldPropagate(*args, **kwargs):
3285 """ShouldPropagate(self) -> bool"""
3286 return _core_.Event_ShouldPropagate(*args, **kwargs)
3287
3288 def StopPropagation(*args, **kwargs):
3289 """StopPropagation(self) -> int"""
3290 return _core_.Event_StopPropagation(*args, **kwargs)
3291
3292 def ResumePropagation(*args, **kwargs):
3293 """ResumePropagation(self, int propagationLevel)"""
3294 return _core_.Event_ResumePropagation(*args, **kwargs)
3295
3296 def Clone(*args, **kwargs):
3297 """Clone(self) -> Event"""
3298 return _core_.Event_Clone(*args, **kwargs)
3299
3300
3301 class EventPtr(Event):
3302 def __init__(self, this):
3303 self.this = this
3304 if not hasattr(self,"thisown"): self.thisown = 0
3305 self.__class__ = Event
3306 _core_.Event_swigregister(EventPtr)
3307
3308 #---------------------------------------------------------------------------
3309
3310 class PropagationDisabler(object):
3311 """Proxy of C++ PropagationDisabler class"""
3312 def __repr__(self):
3313 return "<%s.%s; proxy of C++ wxPropagationDisabler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
3314 def __init__(self, *args, **kwargs):
3315 """__init__(self, Event event) -> PropagationDisabler"""
3316 newobj = _core_.new_PropagationDisabler(*args, **kwargs)
3317 self.this = newobj.this
3318 self.thisown = 1
3319 del newobj.thisown
3320 def __del__(self, destroy=_core_.delete_PropagationDisabler):
3321 """__del__(self)"""
3322 try:
3323 if self.thisown: destroy(self)
3324 except: pass
3325
3326
3327 class PropagationDisablerPtr(PropagationDisabler):
3328 def __init__(self, this):
3329 self.this = this
3330 if not hasattr(self,"thisown"): self.thisown = 0
3331 self.__class__ = PropagationDisabler
3332 _core_.PropagationDisabler_swigregister(PropagationDisablerPtr)
3333
3334 class PropagateOnce(object):
3335 """Proxy of C++ PropagateOnce class"""
3336 def __repr__(self):
3337 return "<%s.%s; proxy of C++ wxPropagateOnce instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
3338 def __init__(self, *args, **kwargs):
3339 """__init__(self, Event event) -> PropagateOnce"""
3340 newobj = _core_.new_PropagateOnce(*args, **kwargs)
3341 self.this = newobj.this
3342 self.thisown = 1
3343 del newobj.thisown
3344 def __del__(self, destroy=_core_.delete_PropagateOnce):
3345 """__del__(self)"""
3346 try:
3347 if self.thisown: destroy(self)
3348 except: pass
3349
3350
3351 class PropagateOncePtr(PropagateOnce):
3352 def __init__(self, this):
3353 self.this = this
3354 if not hasattr(self,"thisown"): self.thisown = 0
3355 self.__class__ = PropagateOnce
3356 _core_.PropagateOnce_swigregister(PropagateOncePtr)
3357
3358 #---------------------------------------------------------------------------
3359
3360 class CommandEvent(Event):
3361 """Proxy of C++ CommandEvent class"""
3362 def __repr__(self):
3363 return "<%s.%s; proxy of C++ wxCommandEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
3364 def __init__(self, *args, **kwargs):
3365 """__init__(self, wxEventType commandType=wxEVT_NULL, int winid=0) -> CommandEvent"""
3366 newobj = _core_.new_CommandEvent(*args, **kwargs)
3367 self.this = newobj.this
3368 self.thisown = 1
3369 del newobj.thisown
3370 def GetSelection(*args, **kwargs):
3371 """GetSelection(self) -> int"""
3372 return _core_.CommandEvent_GetSelection(*args, **kwargs)
3373
3374 def SetString(*args, **kwargs):
3375 """SetString(self, String s)"""
3376 return _core_.CommandEvent_SetString(*args, **kwargs)
3377
3378 def GetString(*args, **kwargs):
3379 """GetString(self) -> String"""
3380 return _core_.CommandEvent_GetString(*args, **kwargs)
3381
3382 def IsChecked(*args, **kwargs):
3383 """IsChecked(self) -> bool"""
3384 return _core_.CommandEvent_IsChecked(*args, **kwargs)
3385
3386 Checked = IsChecked
3387 def IsSelection(*args, **kwargs):
3388 """IsSelection(self) -> bool"""
3389 return _core_.CommandEvent_IsSelection(*args, **kwargs)
3390
3391 def SetExtraLong(*args, **kwargs):
3392 """SetExtraLong(self, long extraLong)"""
3393 return _core_.CommandEvent_SetExtraLong(*args, **kwargs)
3394
3395 def GetExtraLong(*args, **kwargs):
3396 """GetExtraLong(self) -> long"""
3397 return _core_.CommandEvent_GetExtraLong(*args, **kwargs)
3398
3399 def SetInt(*args, **kwargs):
3400 """SetInt(self, int i)"""
3401 return _core_.CommandEvent_SetInt(*args, **kwargs)
3402
3403 def GetInt(*args, **kwargs):
3404 """GetInt(self) -> long"""
3405 return _core_.CommandEvent_GetInt(*args, **kwargs)
3406
3407 def Clone(*args, **kwargs):
3408 """Clone(self) -> Event"""
3409 return _core_.CommandEvent_Clone(*args, **kwargs)
3410
3411
3412 class CommandEventPtr(CommandEvent):
3413 def __init__(self, this):
3414 self.this = this
3415 if not hasattr(self,"thisown"): self.thisown = 0
3416 self.__class__ = CommandEvent
3417 _core_.CommandEvent_swigregister(CommandEventPtr)
3418
3419 #---------------------------------------------------------------------------
3420
3421 class NotifyEvent(CommandEvent):
3422 """Proxy of C++ NotifyEvent class"""
3423 def __repr__(self):
3424 return "<%s.%s; proxy of C++ wxNotifyEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
3425 def __init__(self, *args, **kwargs):
3426 """__init__(self, wxEventType commandType=wxEVT_NULL, int winid=0) -> NotifyEvent"""
3427 newobj = _core_.new_NotifyEvent(*args, **kwargs)
3428 self.this = newobj.this
3429 self.thisown = 1
3430 del newobj.thisown
3431 def Veto(*args, **kwargs):
3432 """Veto(self)"""
3433 return _core_.NotifyEvent_Veto(*args, **kwargs)
3434
3435 def Allow(*args, **kwargs):
3436 """Allow(self)"""
3437 return _core_.NotifyEvent_Allow(*args, **kwargs)
3438
3439 def IsAllowed(*args, **kwargs):
3440 """IsAllowed(self) -> bool"""
3441 return _core_.NotifyEvent_IsAllowed(*args, **kwargs)
3442
3443
3444 class NotifyEventPtr(NotifyEvent):
3445 def __init__(self, this):
3446 self.this = this
3447 if not hasattr(self,"thisown"): self.thisown = 0
3448 self.__class__ = NotifyEvent
3449 _core_.NotifyEvent_swigregister(NotifyEventPtr)
3450
3451 #---------------------------------------------------------------------------
3452
3453 class ScrollEvent(CommandEvent):
3454 """Proxy of C++ ScrollEvent class"""
3455 def __repr__(self):
3456 return "<%s.%s; proxy of C++ wxScrollEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
3457 def __init__(self, *args, **kwargs):
3458 """
3459 __init__(self, wxEventType commandType=wxEVT_NULL, int winid=0, int pos=0,
3460 int orient=0) -> ScrollEvent
3461 """
3462 newobj = _core_.new_ScrollEvent(*args, **kwargs)
3463 self.this = newobj.this
3464 self.thisown = 1
3465 del newobj.thisown
3466 def GetOrientation(*args, **kwargs):
3467 """GetOrientation(self) -> int"""
3468 return _core_.ScrollEvent_GetOrientation(*args, **kwargs)
3469
3470 def GetPosition(*args, **kwargs):
3471 """GetPosition(self) -> int"""
3472 return _core_.ScrollEvent_GetPosition(*args, **kwargs)
3473
3474 def SetOrientation(*args, **kwargs):
3475 """SetOrientation(self, int orient)"""
3476 return _core_.ScrollEvent_SetOrientation(*args, **kwargs)
3477
3478 def SetPosition(*args, **kwargs):
3479 """SetPosition(self, int pos)"""
3480 return _core_.ScrollEvent_SetPosition(*args, **kwargs)
3481
3482
3483 class ScrollEventPtr(ScrollEvent):
3484 def __init__(self, this):
3485 self.this = this
3486 if not hasattr(self,"thisown"): self.thisown = 0
3487 self.__class__ = ScrollEvent
3488 _core_.ScrollEvent_swigregister(ScrollEventPtr)
3489
3490 #---------------------------------------------------------------------------
3491
3492 class ScrollWinEvent(Event):
3493 """Proxy of C++ ScrollWinEvent class"""
3494 def __repr__(self):
3495 return "<%s.%s; proxy of C++ wxScrollWinEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
3496 def __init__(self, *args, **kwargs):
3497 """__init__(self, wxEventType commandType=wxEVT_NULL, int pos=0, int orient=0) -> ScrollWinEvent"""
3498 newobj = _core_.new_ScrollWinEvent(*args, **kwargs)
3499 self.this = newobj.this
3500 self.thisown = 1
3501 del newobj.thisown
3502 def GetOrientation(*args, **kwargs):
3503 """GetOrientation(self) -> int"""
3504 return _core_.ScrollWinEvent_GetOrientation(*args, **kwargs)
3505
3506 def GetPosition(*args, **kwargs):
3507 """GetPosition(self) -> int"""
3508 return _core_.ScrollWinEvent_GetPosition(*args, **kwargs)
3509
3510 def SetOrientation(*args, **kwargs):
3511 """SetOrientation(self, int orient)"""
3512 return _core_.ScrollWinEvent_SetOrientation(*args, **kwargs)
3513
3514 def SetPosition(*args, **kwargs):
3515 """SetPosition(self, int pos)"""
3516 return _core_.ScrollWinEvent_SetPosition(*args, **kwargs)
3517
3518
3519 class ScrollWinEventPtr(ScrollWinEvent):
3520 def __init__(self, this):
3521 self.this = this
3522 if not hasattr(self,"thisown"): self.thisown = 0
3523 self.__class__ = ScrollWinEvent
3524 _core_.ScrollWinEvent_swigregister(ScrollWinEventPtr)
3525
3526 #---------------------------------------------------------------------------
3527
3528 MOUSE_BTN_ANY = _core_.MOUSE_BTN_ANY
3529 MOUSE_BTN_NONE = _core_.MOUSE_BTN_NONE
3530 MOUSE_BTN_LEFT = _core_.MOUSE_BTN_LEFT
3531 MOUSE_BTN_MIDDLE = _core_.MOUSE_BTN_MIDDLE
3532 MOUSE_BTN_RIGHT = _core_.MOUSE_BTN_RIGHT
3533 class MouseEvent(Event):
3534 """Proxy of C++ MouseEvent class"""
3535 def __repr__(self):
3536 return "<%s.%s; proxy of C++ wxMouseEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
3537 def __init__(self, *args, **kwargs):
3538 """__init__(self, wxEventType mouseType=wxEVT_NULL) -> MouseEvent"""
3539 newobj = _core_.new_MouseEvent(*args, **kwargs)
3540 self.this = newobj.this
3541 self.thisown = 1
3542 del newobj.thisown
3543 def IsButton(*args, **kwargs):
3544 """IsButton(self) -> bool"""
3545 return _core_.MouseEvent_IsButton(*args, **kwargs)
3546
3547 def ButtonDown(*args, **kwargs):
3548 """ButtonDown(self, int but=MOUSE_BTN_ANY) -> bool"""
3549 return _core_.MouseEvent_ButtonDown(*args, **kwargs)
3550
3551 def ButtonDClick(*args, **kwargs):
3552 """ButtonDClick(self, int but=MOUSE_BTN_ANY) -> bool"""
3553 return _core_.MouseEvent_ButtonDClick(*args, **kwargs)
3554
3555 def ButtonUp(*args, **kwargs):
3556 """ButtonUp(self, int but=MOUSE_BTN_ANY) -> bool"""
3557 return _core_.MouseEvent_ButtonUp(*args, **kwargs)
3558
3559 def Button(*args, **kwargs):
3560 """Button(self, int but) -> bool"""
3561 return _core_.MouseEvent_Button(*args, **kwargs)
3562
3563 def ButtonIsDown(*args, **kwargs):
3564 """ButtonIsDown(self, int but) -> bool"""
3565 return _core_.MouseEvent_ButtonIsDown(*args, **kwargs)
3566
3567 def GetButton(*args, **kwargs):
3568 """GetButton(self) -> int"""
3569 return _core_.MouseEvent_GetButton(*args, **kwargs)
3570
3571 def ControlDown(*args, **kwargs):
3572 """ControlDown(self) -> bool"""
3573 return _core_.MouseEvent_ControlDown(*args, **kwargs)
3574
3575 def MetaDown(*args, **kwargs):
3576 """MetaDown(self) -> bool"""
3577 return _core_.MouseEvent_MetaDown(*args, **kwargs)
3578
3579 def AltDown(*args, **kwargs):
3580 """AltDown(self) -> bool"""
3581 return _core_.MouseEvent_AltDown(*args, **kwargs)
3582
3583 def ShiftDown(*args, **kwargs):
3584 """ShiftDown(self) -> bool"""
3585 return _core_.MouseEvent_ShiftDown(*args, **kwargs)
3586
3587 def CmdDown(*args, **kwargs):
3588 """
3589 CmdDown(self) -> bool
3590
3591 "Cmd" is a pseudo key which is the same as Control for PC and Unix
3592 platforms but the special "Apple" (a.k.a as "Command") key on
3593 Macs: it makes often sense to use it instead of, say, `ControlDown`
3594 because Cmd key is used for the same thing under Mac as Ctrl
3595 elsewhere. The Ctrl still exists, it's just not used for this
3596 purpose. So for non-Mac platforms this is the same as `ControlDown`
3597 and Macs this is the same as `MetaDown`.
3598 """
3599 return _core_.MouseEvent_CmdDown(*args, **kwargs)
3600
3601 def LeftDown(*args, **kwargs):
3602 """LeftDown(self) -> bool"""
3603 return _core_.MouseEvent_LeftDown(*args, **kwargs)
3604
3605 def MiddleDown(*args, **kwargs):
3606 """MiddleDown(self) -> bool"""
3607 return _core_.MouseEvent_MiddleDown(*args, **kwargs)
3608
3609 def RightDown(*args, **kwargs):
3610 """RightDown(self) -> bool"""
3611 return _core_.MouseEvent_RightDown(*args, **kwargs)
3612
3613 def LeftUp(*args, **kwargs):
3614 """LeftUp(self) -> bool"""
3615 return _core_.MouseEvent_LeftUp(*args, **kwargs)
3616
3617 def MiddleUp(*args, **kwargs):
3618 """MiddleUp(self) -> bool"""
3619 return _core_.MouseEvent_MiddleUp(*args, **kwargs)
3620
3621 def RightUp(*args, **kwargs):
3622 """RightUp(self) -> bool"""
3623 return _core_.MouseEvent_RightUp(*args, **kwargs)
3624
3625 def LeftDClick(*args, **kwargs):
3626 """LeftDClick(self) -> bool"""
3627 return _core_.MouseEvent_LeftDClick(*args, **kwargs)
3628
3629 def MiddleDClick(*args, **kwargs):
3630 """MiddleDClick(self) -> bool"""
3631 return _core_.MouseEvent_MiddleDClick(*args, **kwargs)
3632
3633 def RightDClick(*args, **kwargs):
3634 """RightDClick(self) -> bool"""
3635 return _core_.MouseEvent_RightDClick(*args, **kwargs)
3636
3637 def LeftIsDown(*args, **kwargs):
3638 """LeftIsDown(self) -> bool"""
3639 return _core_.MouseEvent_LeftIsDown(*args, **kwargs)
3640
3641 def MiddleIsDown(*args, **kwargs):
3642 """MiddleIsDown(self) -> bool"""
3643 return _core_.MouseEvent_MiddleIsDown(*args, **kwargs)
3644
3645 def RightIsDown(*args, **kwargs):
3646 """RightIsDown(self) -> bool"""
3647 return _core_.MouseEvent_RightIsDown(*args, **kwargs)
3648
3649 def Dragging(*args, **kwargs):
3650 """Dragging(self) -> bool"""
3651 return _core_.MouseEvent_Dragging(*args, **kwargs)
3652
3653 def Moving(*args, **kwargs):
3654 """Moving(self) -> bool"""
3655 return _core_.MouseEvent_Moving(*args, **kwargs)
3656
3657 def Entering(*args, **kwargs):
3658 """Entering(self) -> bool"""
3659 return _core_.MouseEvent_Entering(*args, **kwargs)
3660
3661 def Leaving(*args, **kwargs):
3662 """Leaving(self) -> bool"""
3663 return _core_.MouseEvent_Leaving(*args, **kwargs)
3664
3665 def GetPosition(*args, **kwargs):
3666 """
3667 GetPosition(self) -> Point
3668
3669 Returns the position of the mouse in window coordinates when the event
3670 happened.
3671 """
3672 return _core_.MouseEvent_GetPosition(*args, **kwargs)
3673
3674 def GetPositionTuple(*args, **kwargs):
3675 """
3676 GetPositionTuple() -> (x,y)
3677
3678 Returns the position of the mouse in window coordinates when the event
3679 happened.
3680 """
3681 return _core_.MouseEvent_GetPositionTuple(*args, **kwargs)
3682
3683 def GetLogicalPosition(*args, **kwargs):
3684 """GetLogicalPosition(self, DC dc) -> Point"""
3685 return _core_.MouseEvent_GetLogicalPosition(*args, **kwargs)
3686
3687 def GetX(*args, **kwargs):
3688 """GetX(self) -> int"""
3689 return _core_.MouseEvent_GetX(*args, **kwargs)
3690
3691 def GetY(*args, **kwargs):
3692 """GetY(self) -> int"""
3693 return _core_.MouseEvent_GetY(*args, **kwargs)
3694
3695 def GetWheelRotation(*args, **kwargs):
3696 """GetWheelRotation(self) -> int"""
3697 return _core_.MouseEvent_GetWheelRotation(*args, **kwargs)
3698
3699 def GetWheelDelta(*args, **kwargs):
3700 """GetWheelDelta(self) -> int"""
3701 return _core_.MouseEvent_GetWheelDelta(*args, **kwargs)
3702
3703 def GetLinesPerAction(*args, **kwargs):
3704 """GetLinesPerAction(self) -> int"""
3705 return _core_.MouseEvent_GetLinesPerAction(*args, **kwargs)
3706
3707 def IsPageScroll(*args, **kwargs):
3708 """IsPageScroll(self) -> bool"""
3709 return _core_.MouseEvent_IsPageScroll(*args, **kwargs)
3710
3711 m_x = property(_core_.MouseEvent_m_x_get, _core_.MouseEvent_m_x_set)
3712 m_y = property(_core_.MouseEvent_m_y_get, _core_.MouseEvent_m_y_set)
3713 m_leftDown = property(_core_.MouseEvent_m_leftDown_get, _core_.MouseEvent_m_leftDown_set)
3714 m_middleDown = property(_core_.MouseEvent_m_middleDown_get, _core_.MouseEvent_m_middleDown_set)
3715 m_rightDown = property(_core_.MouseEvent_m_rightDown_get, _core_.MouseEvent_m_rightDown_set)
3716 m_controlDown = property(_core_.MouseEvent_m_controlDown_get, _core_.MouseEvent_m_controlDown_set)
3717 m_shiftDown = property(_core_.MouseEvent_m_shiftDown_get, _core_.MouseEvent_m_shiftDown_set)
3718 m_altDown = property(_core_.MouseEvent_m_altDown_get, _core_.MouseEvent_m_altDown_set)
3719 m_metaDown = property(_core_.MouseEvent_m_metaDown_get, _core_.MouseEvent_m_metaDown_set)
3720 m_wheelRotation = property(_core_.MouseEvent_m_wheelRotation_get, _core_.MouseEvent_m_wheelRotation_set)
3721 m_wheelDelta = property(_core_.MouseEvent_m_wheelDelta_get, _core_.MouseEvent_m_wheelDelta_set)
3722 m_linesPerAction = property(_core_.MouseEvent_m_linesPerAction_get, _core_.MouseEvent_m_linesPerAction_set)
3723
3724 class MouseEventPtr(MouseEvent):
3725 def __init__(self, this):
3726 self.this = this
3727 if not hasattr(self,"thisown"): self.thisown = 0
3728 self.__class__ = MouseEvent
3729 _core_.MouseEvent_swigregister(MouseEventPtr)
3730
3731 #---------------------------------------------------------------------------
3732
3733 class SetCursorEvent(Event):
3734 """Proxy of C++ SetCursorEvent class"""
3735 def __repr__(self):
3736 return "<%s.%s; proxy of C++ wxSetCursorEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
3737 def __init__(self, *args, **kwargs):
3738 """__init__(self, int x=0, int y=0) -> SetCursorEvent"""
3739 newobj = _core_.new_SetCursorEvent(*args, **kwargs)
3740 self.this = newobj.this
3741 self.thisown = 1
3742 del newobj.thisown
3743 def GetX(*args, **kwargs):
3744 """GetX(self) -> int"""
3745 return _core_.SetCursorEvent_GetX(*args, **kwargs)
3746
3747 def GetY(*args, **kwargs):
3748 """GetY(self) -> int"""
3749 return _core_.SetCursorEvent_GetY(*args, **kwargs)
3750
3751 def SetCursor(*args, **kwargs):
3752 """SetCursor(self, Cursor cursor)"""
3753 return _core_.SetCursorEvent_SetCursor(*args, **kwargs)
3754
3755 def GetCursor(*args, **kwargs):
3756 """GetCursor(self) -> Cursor"""
3757 return _core_.SetCursorEvent_GetCursor(*args, **kwargs)
3758
3759 def HasCursor(*args, **kwargs):
3760 """HasCursor(self) -> bool"""
3761 return _core_.SetCursorEvent_HasCursor(*args, **kwargs)
3762
3763
3764 class SetCursorEventPtr(SetCursorEvent):
3765 def __init__(self, this):
3766 self.this = this
3767 if not hasattr(self,"thisown"): self.thisown = 0
3768 self.__class__ = SetCursorEvent
3769 _core_.SetCursorEvent_swigregister(SetCursorEventPtr)
3770
3771 #---------------------------------------------------------------------------
3772
3773 class KeyEvent(Event):
3774 """Proxy of C++ KeyEvent class"""
3775 def __repr__(self):
3776 return "<%s.%s; proxy of C++ wxKeyEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
3777 def __init__(self, *args, **kwargs):
3778 """__init__(self, wxEventType keyType=wxEVT_NULL) -> KeyEvent"""
3779 newobj = _core_.new_KeyEvent(*args, **kwargs)
3780 self.this = newobj.this
3781 self.thisown = 1
3782 del newobj.thisown
3783 def ControlDown(*args, **kwargs):
3784 """ControlDown(self) -> bool"""
3785 return _core_.KeyEvent_ControlDown(*args, **kwargs)
3786
3787 def MetaDown(*args, **kwargs):
3788 """MetaDown(self) -> bool"""
3789 return _core_.KeyEvent_MetaDown(*args, **kwargs)
3790
3791 def AltDown(*args, **kwargs):
3792 """AltDown(self) -> bool"""
3793 return _core_.KeyEvent_AltDown(*args, **kwargs)
3794
3795 def ShiftDown(*args, **kwargs):
3796 """ShiftDown(self) -> bool"""
3797 return _core_.KeyEvent_ShiftDown(*args, **kwargs)
3798
3799 def CmdDown(*args, **kwargs):
3800 """
3801 CmdDown(self) -> bool
3802
3803 "Cmd" is a pseudo key which is the same as Control for PC and Unix
3804 platforms but the special "Apple" (a.k.a as "Command") key on
3805 Macs: it makes often sense to use it instead of, say, `ControlDown`
3806 because Cmd key is used for the same thing under Mac as Ctrl
3807 elsewhere. The Ctrl still exists, it's just not used for this
3808 purpose. So for non-Mac platforms this is the same as `ControlDown`
3809 and Macs this is the same as `MetaDown`.
3810 """
3811 return _core_.KeyEvent_CmdDown(*args, **kwargs)
3812
3813 def HasModifiers(*args, **kwargs):
3814 """HasModifiers(self) -> bool"""
3815 return _core_.KeyEvent_HasModifiers(*args, **kwargs)
3816
3817 def GetKeyCode(*args, **kwargs):
3818 """GetKeyCode(self) -> int"""
3819 return _core_.KeyEvent_GetKeyCode(*args, **kwargs)
3820
3821 KeyCode = GetKeyCode
3822 def GetUnicodeKey(*args, **kwargs):
3823 """GetUnicodeKey(self) -> int"""
3824 return _core_.KeyEvent_GetUnicodeKey(*args, **kwargs)
3825
3826 GetUniChar = GetUnicodeKey
3827 def GetRawKeyCode(*args, **kwargs):
3828 """GetRawKeyCode(self) -> unsigned int"""
3829 return _core_.KeyEvent_GetRawKeyCode(*args, **kwargs)
3830
3831 def GetRawKeyFlags(*args, **kwargs):
3832 """GetRawKeyFlags(self) -> unsigned int"""
3833 return _core_.KeyEvent_GetRawKeyFlags(*args, **kwargs)
3834
3835 def GetPosition(*args, **kwargs):
3836 """
3837 GetPosition(self) -> Point
3838
3839 Find the position of the event.
3840 """
3841 return _core_.KeyEvent_GetPosition(*args, **kwargs)
3842
3843 def GetPositionTuple(*args, **kwargs):
3844 """
3845 GetPositionTuple() -> (x,y)
3846
3847 Find the position of the event.
3848 """
3849 return _core_.KeyEvent_GetPositionTuple(*args, **kwargs)
3850
3851 def GetX(*args, **kwargs):
3852 """GetX(self) -> int"""
3853 return _core_.KeyEvent_GetX(*args, **kwargs)
3854
3855 def GetY(*args, **kwargs):
3856 """GetY(self) -> int"""
3857 return _core_.KeyEvent_GetY(*args, **kwargs)
3858
3859 m_x = property(_core_.KeyEvent_m_x_get, _core_.KeyEvent_m_x_set)
3860 m_y = property(_core_.KeyEvent_m_y_get, _core_.KeyEvent_m_y_set)
3861 m_keyCode = property(_core_.KeyEvent_m_keyCode_get, _core_.KeyEvent_m_keyCode_set)
3862 m_controlDown = property(_core_.KeyEvent_m_controlDown_get, _core_.KeyEvent_m_controlDown_set)
3863 m_shiftDown = property(_core_.KeyEvent_m_shiftDown_get, _core_.KeyEvent_m_shiftDown_set)
3864 m_altDown = property(_core_.KeyEvent_m_altDown_get, _core_.KeyEvent_m_altDown_set)
3865 m_metaDown = property(_core_.KeyEvent_m_metaDown_get, _core_.KeyEvent_m_metaDown_set)
3866 m_scanCode = property(_core_.KeyEvent_m_scanCode_get, _core_.KeyEvent_m_scanCode_set)
3867 m_rawCode = property(_core_.KeyEvent_m_rawCode_get, _core_.KeyEvent_m_rawCode_set)
3868 m_rawFlags = property(_core_.KeyEvent_m_rawFlags_get, _core_.KeyEvent_m_rawFlags_set)
3869
3870 class KeyEventPtr(KeyEvent):
3871 def __init__(self, this):
3872 self.this = this
3873 if not hasattr(self,"thisown"): self.thisown = 0
3874 self.__class__ = KeyEvent
3875 _core_.KeyEvent_swigregister(KeyEventPtr)
3876
3877 #---------------------------------------------------------------------------
3878
3879 class SizeEvent(Event):
3880 """Proxy of C++ SizeEvent class"""
3881 def __repr__(self):
3882 return "<%s.%s; proxy of C++ wxSizeEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
3883 def __init__(self, *args, **kwargs):
3884 """__init__(self, Size sz=DefaultSize, int winid=0) -> SizeEvent"""
3885 newobj = _core_.new_SizeEvent(*args, **kwargs)
3886 self.this = newobj.this
3887 self.thisown = 1
3888 del newobj.thisown
3889 def GetSize(*args, **kwargs):
3890 """GetSize(self) -> Size"""
3891 return _core_.SizeEvent_GetSize(*args, **kwargs)
3892
3893 def GetRect(*args, **kwargs):
3894 """GetRect(self) -> Rect"""
3895 return _core_.SizeEvent_GetRect(*args, **kwargs)
3896
3897 def SetRect(*args, **kwargs):
3898 """SetRect(self, Rect rect)"""
3899 return _core_.SizeEvent_SetRect(*args, **kwargs)
3900
3901 def SetSize(*args, **kwargs):
3902 """SetSize(self, Size size)"""
3903 return _core_.SizeEvent_SetSize(*args, **kwargs)
3904
3905 m_size = property(_core_.SizeEvent_m_size_get, _core_.SizeEvent_m_size_set)
3906 m_rect = property(_core_.SizeEvent_m_rect_get, _core_.SizeEvent_m_rect_set)
3907
3908 class SizeEventPtr(SizeEvent):
3909 def __init__(self, this):
3910 self.this = this
3911 if not hasattr(self,"thisown"): self.thisown = 0
3912 self.__class__ = SizeEvent
3913 _core_.SizeEvent_swigregister(SizeEventPtr)
3914
3915 #---------------------------------------------------------------------------
3916
3917 class MoveEvent(Event):
3918 """Proxy of C++ MoveEvent class"""
3919 def __repr__(self):
3920 return "<%s.%s; proxy of C++ wxMoveEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
3921 def __init__(self, *args, **kwargs):
3922 """__init__(self, Point pos=DefaultPosition, int winid=0) -> MoveEvent"""
3923 newobj = _core_.new_MoveEvent(*args, **kwargs)
3924 self.this = newobj.this
3925 self.thisown = 1
3926 del newobj.thisown
3927 def GetPosition(*args, **kwargs):
3928 """GetPosition(self) -> Point"""
3929 return _core_.MoveEvent_GetPosition(*args, **kwargs)
3930
3931 def GetRect(*args, **kwargs):
3932 """GetRect(self) -> Rect"""
3933 return _core_.MoveEvent_GetRect(*args, **kwargs)
3934
3935 def SetRect(*args, **kwargs):
3936 """SetRect(self, Rect rect)"""
3937 return _core_.MoveEvent_SetRect(*args, **kwargs)
3938
3939 def SetPosition(*args, **kwargs):
3940 """SetPosition(self, Point pos)"""
3941 return _core_.MoveEvent_SetPosition(*args, **kwargs)
3942
3943 m_pos = property(_core_.MoveEvent_m_pos_get, _core_.MoveEvent_m_pos_set)
3944 m_rect = property(_core_.MoveEvent_m_rect_get, _core_.MoveEvent_m_rect_set)
3945
3946 class MoveEventPtr(MoveEvent):
3947 def __init__(self, this):
3948 self.this = this
3949 if not hasattr(self,"thisown"): self.thisown = 0
3950 self.__class__ = MoveEvent
3951 _core_.MoveEvent_swigregister(MoveEventPtr)
3952
3953 #---------------------------------------------------------------------------
3954
3955 class PaintEvent(Event):
3956 """Proxy of C++ PaintEvent class"""
3957 def __repr__(self):
3958 return "<%s.%s; proxy of C++ wxPaintEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
3959 def __init__(self, *args, **kwargs):
3960 """__init__(self, int Id=0) -> PaintEvent"""
3961 newobj = _core_.new_PaintEvent(*args, **kwargs)
3962 self.this = newobj.this
3963 self.thisown = 1
3964 del newobj.thisown
3965
3966 class PaintEventPtr(PaintEvent):
3967 def __init__(self, this):
3968 self.this = this
3969 if not hasattr(self,"thisown"): self.thisown = 0
3970 self.__class__ = PaintEvent
3971 _core_.PaintEvent_swigregister(PaintEventPtr)
3972
3973 class NcPaintEvent(Event):
3974 """Proxy of C++ NcPaintEvent class"""
3975 def __repr__(self):
3976 return "<%s.%s; proxy of C++ wxNcPaintEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
3977 def __init__(self, *args, **kwargs):
3978 """__init__(self, int winid=0) -> NcPaintEvent"""
3979 newobj = _core_.new_NcPaintEvent(*args, **kwargs)
3980 self.this = newobj.this
3981 self.thisown = 1
3982 del newobj.thisown
3983
3984 class NcPaintEventPtr(NcPaintEvent):
3985 def __init__(self, this):
3986 self.this = this
3987 if not hasattr(self,"thisown"): self.thisown = 0
3988 self.__class__ = NcPaintEvent
3989 _core_.NcPaintEvent_swigregister(NcPaintEventPtr)
3990
3991 #---------------------------------------------------------------------------
3992
3993 class EraseEvent(Event):
3994 """Proxy of C++ EraseEvent class"""
3995 def __repr__(self):
3996 return "<%s.%s; proxy of C++ wxEraseEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
3997 def __init__(self, *args, **kwargs):
3998 """__init__(self, int Id=0, DC dc=(wxDC *) NULL) -> EraseEvent"""
3999 newobj = _core_.new_EraseEvent(*args, **kwargs)
4000 self.this = newobj.this
4001 self.thisown = 1
4002 del newobj.thisown
4003 def GetDC(*args, **kwargs):
4004 """GetDC(self) -> DC"""
4005 return _core_.EraseEvent_GetDC(*args, **kwargs)
4006
4007
4008 class EraseEventPtr(EraseEvent):
4009 def __init__(self, this):
4010 self.this = this
4011 if not hasattr(self,"thisown"): self.thisown = 0
4012 self.__class__ = EraseEvent
4013 _core_.EraseEvent_swigregister(EraseEventPtr)
4014
4015 #---------------------------------------------------------------------------
4016
4017 class FocusEvent(Event):
4018 """Proxy of C++ FocusEvent class"""
4019 def __repr__(self):
4020 return "<%s.%s; proxy of C++ wxFocusEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
4021 def __init__(self, *args, **kwargs):
4022 """__init__(self, wxEventType type=wxEVT_NULL, int winid=0) -> FocusEvent"""
4023 newobj = _core_.new_FocusEvent(*args, **kwargs)
4024 self.this = newobj.this
4025 self.thisown = 1
4026 del newobj.thisown
4027 def GetWindow(*args, **kwargs):
4028 """GetWindow(self) -> Window"""
4029 return _core_.FocusEvent_GetWindow(*args, **kwargs)
4030
4031 def SetWindow(*args, **kwargs):
4032 """SetWindow(self, Window win)"""
4033 return _core_.FocusEvent_SetWindow(*args, **kwargs)
4034
4035
4036 class FocusEventPtr(FocusEvent):
4037 def __init__(self, this):
4038 self.this = this
4039 if not hasattr(self,"thisown"): self.thisown = 0
4040 self.__class__ = FocusEvent
4041 _core_.FocusEvent_swigregister(FocusEventPtr)
4042
4043 #---------------------------------------------------------------------------
4044
4045 class ChildFocusEvent(CommandEvent):
4046 """Proxy of C++ ChildFocusEvent class"""
4047 def __repr__(self):
4048 return "<%s.%s; proxy of C++ wxChildFocusEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
4049 def __init__(self, *args, **kwargs):
4050 """__init__(self, Window win=None) -> ChildFocusEvent"""
4051 newobj = _core_.new_ChildFocusEvent(*args, **kwargs)
4052 self.this = newobj.this
4053 self.thisown = 1
4054 del newobj.thisown
4055 def GetWindow(*args, **kwargs):
4056 """GetWindow(self) -> Window"""
4057 return _core_.ChildFocusEvent_GetWindow(*args, **kwargs)
4058
4059
4060 class ChildFocusEventPtr(ChildFocusEvent):
4061 def __init__(self, this):
4062 self.this = this
4063 if not hasattr(self,"thisown"): self.thisown = 0
4064 self.__class__ = ChildFocusEvent
4065 _core_.ChildFocusEvent_swigregister(ChildFocusEventPtr)
4066
4067 #---------------------------------------------------------------------------
4068
4069 class ActivateEvent(Event):
4070 """Proxy of C++ ActivateEvent class"""
4071 def __repr__(self):
4072 return "<%s.%s; proxy of C++ wxActivateEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
4073 def __init__(self, *args, **kwargs):
4074 """__init__(self, wxEventType type=wxEVT_NULL, bool active=True, int Id=0) -> ActivateEvent"""
4075 newobj = _core_.new_ActivateEvent(*args, **kwargs)
4076 self.this = newobj.this
4077 self.thisown = 1
4078 del newobj.thisown
4079 def GetActive(*args, **kwargs):
4080 """GetActive(self) -> bool"""
4081 return _core_.ActivateEvent_GetActive(*args, **kwargs)
4082
4083
4084 class ActivateEventPtr(ActivateEvent):
4085 def __init__(self, this):
4086 self.this = this
4087 if not hasattr(self,"thisown"): self.thisown = 0
4088 self.__class__ = ActivateEvent
4089 _core_.ActivateEvent_swigregister(ActivateEventPtr)
4090
4091 #---------------------------------------------------------------------------
4092
4093 class InitDialogEvent(Event):
4094 """Proxy of C++ InitDialogEvent class"""
4095 def __repr__(self):
4096 return "<%s.%s; proxy of C++ wxInitDialogEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
4097 def __init__(self, *args, **kwargs):
4098 """__init__(self, int Id=0) -> InitDialogEvent"""
4099 newobj = _core_.new_InitDialogEvent(*args, **kwargs)
4100 self.this = newobj.this
4101 self.thisown = 1
4102 del newobj.thisown
4103
4104 class InitDialogEventPtr(InitDialogEvent):
4105 def __init__(self, this):
4106 self.this = this
4107 if not hasattr(self,"thisown"): self.thisown = 0
4108 self.__class__ = InitDialogEvent
4109 _core_.InitDialogEvent_swigregister(InitDialogEventPtr)
4110
4111 #---------------------------------------------------------------------------
4112
4113 class MenuEvent(Event):
4114 """Proxy of C++ MenuEvent class"""
4115 def __repr__(self):
4116 return "<%s.%s; proxy of C++ wxMenuEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
4117 def __init__(self, *args, **kwargs):
4118 """__init__(self, wxEventType type=wxEVT_NULL, int winid=0, Menu menu=None) -> MenuEvent"""
4119 newobj = _core_.new_MenuEvent(*args, **kwargs)
4120 self.this = newobj.this
4121 self.thisown = 1
4122 del newobj.thisown
4123 def GetMenuId(*args, **kwargs):
4124 """GetMenuId(self) -> int"""
4125 return _core_.MenuEvent_GetMenuId(*args, **kwargs)
4126
4127 def IsPopup(*args, **kwargs):
4128 """IsPopup(self) -> bool"""
4129 return _core_.MenuEvent_IsPopup(*args, **kwargs)
4130
4131 def GetMenu(*args, **kwargs):
4132 """GetMenu(self) -> Menu"""
4133 return _core_.MenuEvent_GetMenu(*args, **kwargs)
4134
4135
4136 class MenuEventPtr(MenuEvent):
4137 def __init__(self, this):
4138 self.this = this
4139 if not hasattr(self,"thisown"): self.thisown = 0
4140 self.__class__ = MenuEvent
4141 _core_.MenuEvent_swigregister(MenuEventPtr)
4142
4143 #---------------------------------------------------------------------------
4144
4145 class CloseEvent(Event):
4146 """Proxy of C++ CloseEvent class"""
4147 def __repr__(self):
4148 return "<%s.%s; proxy of C++ wxCloseEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
4149 def __init__(self, *args, **kwargs):
4150 """__init__(self, wxEventType type=wxEVT_NULL, int winid=0) -> CloseEvent"""
4151 newobj = _core_.new_CloseEvent(*args, **kwargs)
4152 self.this = newobj.this
4153 self.thisown = 1
4154 del newobj.thisown
4155 def SetLoggingOff(*args, **kwargs):
4156 """SetLoggingOff(self, bool logOff)"""
4157 return _core_.CloseEvent_SetLoggingOff(*args, **kwargs)
4158
4159 def GetLoggingOff(*args, **kwargs):
4160 """GetLoggingOff(self) -> bool"""
4161 return _core_.CloseEvent_GetLoggingOff(*args, **kwargs)
4162
4163 def Veto(*args, **kwargs):
4164 """Veto(self, bool veto=True)"""
4165 return _core_.CloseEvent_Veto(*args, **kwargs)
4166
4167 def SetCanVeto(*args, **kwargs):
4168 """SetCanVeto(self, bool canVeto)"""
4169 return _core_.CloseEvent_SetCanVeto(*args, **kwargs)
4170
4171 def CanVeto(*args, **kwargs):
4172 """CanVeto(self) -> bool"""
4173 return _core_.CloseEvent_CanVeto(*args, **kwargs)
4174
4175 def GetVeto(*args, **kwargs):
4176 """GetVeto(self) -> bool"""
4177 return _core_.CloseEvent_GetVeto(*args, **kwargs)
4178
4179
4180 class CloseEventPtr(CloseEvent):
4181 def __init__(self, this):
4182 self.this = this
4183 if not hasattr(self,"thisown"): self.thisown = 0
4184 self.__class__ = CloseEvent
4185 _core_.CloseEvent_swigregister(CloseEventPtr)
4186
4187 #---------------------------------------------------------------------------
4188
4189 class ShowEvent(Event):
4190 """Proxy of C++ ShowEvent class"""
4191 def __repr__(self):
4192 return "<%s.%s; proxy of C++ wxShowEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
4193 def __init__(self, *args, **kwargs):
4194 """__init__(self, int winid=0, bool show=False) -> ShowEvent"""
4195 newobj = _core_.new_ShowEvent(*args, **kwargs)
4196 self.this = newobj.this
4197 self.thisown = 1
4198 del newobj.thisown
4199 def SetShow(*args, **kwargs):
4200 """SetShow(self, bool show)"""
4201 return _core_.ShowEvent_SetShow(*args, **kwargs)
4202
4203 def GetShow(*args, **kwargs):
4204 """GetShow(self) -> bool"""
4205 return _core_.ShowEvent_GetShow(*args, **kwargs)
4206
4207
4208 class ShowEventPtr(ShowEvent):
4209 def __init__(self, this):
4210 self.this = this
4211 if not hasattr(self,"thisown"): self.thisown = 0
4212 self.__class__ = ShowEvent
4213 _core_.ShowEvent_swigregister(ShowEventPtr)
4214
4215 #---------------------------------------------------------------------------
4216
4217 class IconizeEvent(Event):
4218 """Proxy of C++ IconizeEvent class"""
4219 def __repr__(self):
4220 return "<%s.%s; proxy of C++ wxIconizeEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
4221 def __init__(self, *args, **kwargs):
4222 """__init__(self, int id=0, bool iconized=True) -> IconizeEvent"""
4223 newobj = _core_.new_IconizeEvent(*args, **kwargs)
4224 self.this = newobj.this
4225 self.thisown = 1
4226 del newobj.thisown
4227 def Iconized(*args, **kwargs):
4228 """Iconized(self) -> bool"""
4229 return _core_.IconizeEvent_Iconized(*args, **kwargs)
4230
4231
4232 class IconizeEventPtr(IconizeEvent):
4233 def __init__(self, this):
4234 self.this = this
4235 if not hasattr(self,"thisown"): self.thisown = 0
4236 self.__class__ = IconizeEvent
4237 _core_.IconizeEvent_swigregister(IconizeEventPtr)
4238
4239 #---------------------------------------------------------------------------
4240
4241 class MaximizeEvent(Event):
4242 """Proxy of C++ MaximizeEvent class"""
4243 def __repr__(self):
4244 return "<%s.%s; proxy of C++ wxMaximizeEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
4245 def __init__(self, *args, **kwargs):
4246 """__init__(self, int id=0) -> MaximizeEvent"""
4247 newobj = _core_.new_MaximizeEvent(*args, **kwargs)
4248 self.this = newobj.this
4249 self.thisown = 1
4250 del newobj.thisown
4251
4252 class MaximizeEventPtr(MaximizeEvent):
4253 def __init__(self, this):
4254 self.this = this
4255 if not hasattr(self,"thisown"): self.thisown = 0
4256 self.__class__ = MaximizeEvent
4257 _core_.MaximizeEvent_swigregister(MaximizeEventPtr)
4258
4259 #---------------------------------------------------------------------------
4260
4261 class DropFilesEvent(Event):
4262 """Proxy of C++ DropFilesEvent class"""
4263 def __init__(self): raise RuntimeError, "No constructor defined"
4264 def __repr__(self):
4265 return "<%s.%s; proxy of C++ wxDropFilesEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
4266 def GetPosition(*args, **kwargs):
4267 """GetPosition(self) -> Point"""
4268 return _core_.DropFilesEvent_GetPosition(*args, **kwargs)
4269
4270 def GetNumberOfFiles(*args, **kwargs):
4271 """GetNumberOfFiles(self) -> int"""
4272 return _core_.DropFilesEvent_GetNumberOfFiles(*args, **kwargs)
4273
4274 def GetFiles(*args, **kwargs):
4275 """GetFiles(self) -> PyObject"""
4276 return _core_.DropFilesEvent_GetFiles(*args, **kwargs)
4277
4278
4279 class DropFilesEventPtr(DropFilesEvent):
4280 def __init__(self, this):
4281 self.this = this
4282 if not hasattr(self,"thisown"): self.thisown = 0
4283 self.__class__ = DropFilesEvent
4284 _core_.DropFilesEvent_swigregister(DropFilesEventPtr)
4285
4286 #---------------------------------------------------------------------------
4287
4288 UPDATE_UI_PROCESS_ALL = _core_.UPDATE_UI_PROCESS_ALL
4289 UPDATE_UI_PROCESS_SPECIFIED = _core_.UPDATE_UI_PROCESS_SPECIFIED
4290 class UpdateUIEvent(CommandEvent):
4291 """Proxy of C++ UpdateUIEvent class"""
4292 def __repr__(self):
4293 return "<%s.%s; proxy of C++ wxUpdateUIEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
4294 def __init__(self, *args, **kwargs):
4295 """__init__(self, int commandId=0) -> UpdateUIEvent"""
4296 newobj = _core_.new_UpdateUIEvent(*args, **kwargs)
4297 self.this = newobj.this
4298 self.thisown = 1
4299 del newobj.thisown
4300 def GetChecked(*args, **kwargs):
4301 """GetChecked(self) -> bool"""
4302 return _core_.UpdateUIEvent_GetChecked(*args, **kwargs)
4303
4304 def GetEnabled(*args, **kwargs):
4305 """GetEnabled(self) -> bool"""
4306 return _core_.UpdateUIEvent_GetEnabled(*args, **kwargs)
4307
4308 def GetText(*args, **kwargs):
4309 """GetText(self) -> String"""
4310 return _core_.UpdateUIEvent_GetText(*args, **kwargs)
4311
4312 def GetSetText(*args, **kwargs):
4313 """GetSetText(self) -> bool"""
4314 return _core_.UpdateUIEvent_GetSetText(*args, **kwargs)
4315
4316 def GetSetChecked(*args, **kwargs):
4317 """GetSetChecked(self) -> bool"""
4318 return _core_.UpdateUIEvent_GetSetChecked(*args, **kwargs)
4319
4320 def GetSetEnabled(*args, **kwargs):
4321 """GetSetEnabled(self) -> bool"""
4322 return _core_.UpdateUIEvent_GetSetEnabled(*args, **kwargs)
4323
4324 def Check(*args, **kwargs):
4325 """Check(self, bool check)"""
4326 return _core_.UpdateUIEvent_Check(*args, **kwargs)
4327
4328 def Enable(*args, **kwargs):
4329 """Enable(self, bool enable)"""
4330 return _core_.UpdateUIEvent_Enable(*args, **kwargs)
4331
4332 def SetText(*args, **kwargs):
4333 """SetText(self, String text)"""
4334 return _core_.UpdateUIEvent_SetText(*args, **kwargs)
4335
4336 def SetUpdateInterval(*args, **kwargs):
4337 """SetUpdateInterval(long updateInterval)"""
4338 return _core_.UpdateUIEvent_SetUpdateInterval(*args, **kwargs)
4339
4340 SetUpdateInterval = staticmethod(SetUpdateInterval)
4341 def GetUpdateInterval(*args, **kwargs):
4342 """GetUpdateInterval() -> long"""
4343 return _core_.UpdateUIEvent_GetUpdateInterval(*args, **kwargs)
4344
4345 GetUpdateInterval = staticmethod(GetUpdateInterval)
4346 def CanUpdate(*args, **kwargs):
4347 """CanUpdate(Window win) -> bool"""
4348 return _core_.UpdateUIEvent_CanUpdate(*args, **kwargs)
4349
4350 CanUpdate = staticmethod(CanUpdate)
4351 def ResetUpdateTime(*args, **kwargs):
4352 """ResetUpdateTime()"""
4353 return _core_.UpdateUIEvent_ResetUpdateTime(*args, **kwargs)
4354
4355 ResetUpdateTime = staticmethod(ResetUpdateTime)
4356 def SetMode(*args, **kwargs):
4357 """SetMode(int mode)"""
4358 return _core_.UpdateUIEvent_SetMode(*args, **kwargs)
4359
4360 SetMode = staticmethod(SetMode)
4361 def GetMode(*args, **kwargs):
4362 """GetMode() -> int"""
4363 return _core_.UpdateUIEvent_GetMode(*args, **kwargs)
4364
4365 GetMode = staticmethod(GetMode)
4366
4367 class UpdateUIEventPtr(UpdateUIEvent):
4368 def __init__(self, this):
4369 self.this = this
4370 if not hasattr(self,"thisown"): self.thisown = 0
4371 self.__class__ = UpdateUIEvent
4372 _core_.UpdateUIEvent_swigregister(UpdateUIEventPtr)
4373
4374 def UpdateUIEvent_SetUpdateInterval(*args, **kwargs):
4375 """UpdateUIEvent_SetUpdateInterval(long updateInterval)"""
4376 return _core_.UpdateUIEvent_SetUpdateInterval(*args, **kwargs)
4377
4378 def UpdateUIEvent_GetUpdateInterval(*args, **kwargs):
4379 """UpdateUIEvent_GetUpdateInterval() -> long"""
4380 return _core_.UpdateUIEvent_GetUpdateInterval(*args, **kwargs)
4381
4382 def UpdateUIEvent_CanUpdate(*args, **kwargs):
4383 """UpdateUIEvent_CanUpdate(Window win) -> bool"""
4384 return _core_.UpdateUIEvent_CanUpdate(*args, **kwargs)
4385
4386 def UpdateUIEvent_ResetUpdateTime(*args, **kwargs):
4387 """UpdateUIEvent_ResetUpdateTime()"""
4388 return _core_.UpdateUIEvent_ResetUpdateTime(*args, **kwargs)
4389
4390 def UpdateUIEvent_SetMode(*args, **kwargs):
4391 """UpdateUIEvent_SetMode(int mode)"""
4392 return _core_.UpdateUIEvent_SetMode(*args, **kwargs)
4393
4394 def UpdateUIEvent_GetMode(*args, **kwargs):
4395 """UpdateUIEvent_GetMode() -> int"""
4396 return _core_.UpdateUIEvent_GetMode(*args, **kwargs)
4397
4398 #---------------------------------------------------------------------------
4399
4400 class SysColourChangedEvent(Event):
4401 """Proxy of C++ SysColourChangedEvent class"""
4402 def __repr__(self):
4403 return "<%s.%s; proxy of C++ wxSysColourChangedEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
4404 def __init__(self, *args, **kwargs):
4405 """__init__(self) -> SysColourChangedEvent"""
4406 newobj = _core_.new_SysColourChangedEvent(*args, **kwargs)
4407 self.this = newobj.this
4408 self.thisown = 1
4409 del newobj.thisown
4410
4411 class SysColourChangedEventPtr(SysColourChangedEvent):
4412 def __init__(self, this):
4413 self.this = this
4414 if not hasattr(self,"thisown"): self.thisown = 0
4415 self.__class__ = SysColourChangedEvent
4416 _core_.SysColourChangedEvent_swigregister(SysColourChangedEventPtr)
4417
4418 #---------------------------------------------------------------------------
4419
4420 class MouseCaptureChangedEvent(Event):
4421 """Proxy of C++ MouseCaptureChangedEvent class"""
4422 def __repr__(self):
4423 return "<%s.%s; proxy of C++ wxMouseCaptureChangedEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
4424 def __init__(self, *args, **kwargs):
4425 """__init__(self, int winid=0, Window gainedCapture=None) -> MouseCaptureChangedEvent"""
4426 newobj = _core_.new_MouseCaptureChangedEvent(*args, **kwargs)
4427 self.this = newobj.this
4428 self.thisown = 1
4429 del newobj.thisown
4430 def GetCapturedWindow(*args, **kwargs):
4431 """GetCapturedWindow(self) -> Window"""
4432 return _core_.MouseCaptureChangedEvent_GetCapturedWindow(*args, **kwargs)
4433
4434
4435 class MouseCaptureChangedEventPtr(MouseCaptureChangedEvent):
4436 def __init__(self, this):
4437 self.this = this
4438 if not hasattr(self,"thisown"): self.thisown = 0
4439 self.__class__ = MouseCaptureChangedEvent
4440 _core_.MouseCaptureChangedEvent_swigregister(MouseCaptureChangedEventPtr)
4441
4442 #---------------------------------------------------------------------------
4443
4444 class DisplayChangedEvent(Event):
4445 """Proxy of C++ DisplayChangedEvent class"""
4446 def __repr__(self):
4447 return "<%s.%s; proxy of C++ wxDisplayChangedEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
4448 def __init__(self, *args, **kwargs):
4449 """__init__(self) -> DisplayChangedEvent"""
4450 newobj = _core_.new_DisplayChangedEvent(*args, **kwargs)
4451 self.this = newobj.this
4452 self.thisown = 1
4453 del newobj.thisown
4454
4455 class DisplayChangedEventPtr(DisplayChangedEvent):
4456 def __init__(self, this):
4457 self.this = this
4458 if not hasattr(self,"thisown"): self.thisown = 0
4459 self.__class__ = DisplayChangedEvent
4460 _core_.DisplayChangedEvent_swigregister(DisplayChangedEventPtr)
4461
4462 #---------------------------------------------------------------------------
4463
4464 class PaletteChangedEvent(Event):
4465 """Proxy of C++ PaletteChangedEvent class"""
4466 def __repr__(self):
4467 return "<%s.%s; proxy of C++ wxPaletteChangedEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
4468 def __init__(self, *args, **kwargs):
4469 """__init__(self, int id=0) -> PaletteChangedEvent"""
4470 newobj = _core_.new_PaletteChangedEvent(*args, **kwargs)
4471 self.this = newobj.this
4472 self.thisown = 1
4473 del newobj.thisown
4474 def SetChangedWindow(*args, **kwargs):
4475 """SetChangedWindow(self, Window win)"""
4476 return _core_.PaletteChangedEvent_SetChangedWindow(*args, **kwargs)
4477
4478 def GetChangedWindow(*args, **kwargs):
4479 """GetChangedWindow(self) -> Window"""
4480 return _core_.PaletteChangedEvent_GetChangedWindow(*args, **kwargs)
4481
4482
4483 class PaletteChangedEventPtr(PaletteChangedEvent):
4484 def __init__(self, this):
4485 self.this = this
4486 if not hasattr(self,"thisown"): self.thisown = 0
4487 self.__class__ = PaletteChangedEvent
4488 _core_.PaletteChangedEvent_swigregister(PaletteChangedEventPtr)
4489
4490 #---------------------------------------------------------------------------
4491
4492 class QueryNewPaletteEvent(Event):
4493 """Proxy of C++ QueryNewPaletteEvent class"""
4494 def __repr__(self):
4495 return "<%s.%s; proxy of C++ wxQueryNewPaletteEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
4496 def __init__(self, *args, **kwargs):
4497 """__init__(self, int winid=0) -> QueryNewPaletteEvent"""
4498 newobj = _core_.new_QueryNewPaletteEvent(*args, **kwargs)
4499 self.this = newobj.this
4500 self.thisown = 1
4501 del newobj.thisown
4502 def SetPaletteRealized(*args, **kwargs):
4503 """SetPaletteRealized(self, bool realized)"""
4504 return _core_.QueryNewPaletteEvent_SetPaletteRealized(*args, **kwargs)
4505
4506 def GetPaletteRealized(*args, **kwargs):
4507 """GetPaletteRealized(self) -> bool"""
4508 return _core_.QueryNewPaletteEvent_GetPaletteRealized(*args, **kwargs)
4509
4510
4511 class QueryNewPaletteEventPtr(QueryNewPaletteEvent):
4512 def __init__(self, this):
4513 self.this = this
4514 if not hasattr(self,"thisown"): self.thisown = 0
4515 self.__class__ = QueryNewPaletteEvent
4516 _core_.QueryNewPaletteEvent_swigregister(QueryNewPaletteEventPtr)
4517
4518 #---------------------------------------------------------------------------
4519
4520 class NavigationKeyEvent(Event):
4521 """Proxy of C++ NavigationKeyEvent class"""
4522 def __repr__(self):
4523 return "<%s.%s; proxy of C++ wxNavigationKeyEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
4524 def __init__(self, *args, **kwargs):
4525 """__init__(self) -> NavigationKeyEvent"""
4526 newobj = _core_.new_NavigationKeyEvent(*args, **kwargs)
4527 self.this = newobj.this
4528 self.thisown = 1
4529 del newobj.thisown
4530 def GetDirection(*args, **kwargs):
4531 """GetDirection(self) -> bool"""
4532 return _core_.NavigationKeyEvent_GetDirection(*args, **kwargs)
4533
4534 def SetDirection(*args, **kwargs):
4535 """SetDirection(self, bool forward)"""
4536 return _core_.NavigationKeyEvent_SetDirection(*args, **kwargs)
4537
4538 def IsWindowChange(*args, **kwargs):
4539 """IsWindowChange(self) -> bool"""
4540 return _core_.NavigationKeyEvent_IsWindowChange(*args, **kwargs)
4541
4542 def SetWindowChange(*args, **kwargs):
4543 """SetWindowChange(self, bool ischange)"""
4544 return _core_.NavigationKeyEvent_SetWindowChange(*args, **kwargs)
4545
4546 def SetFlags(*args, **kwargs):
4547 """SetFlags(self, long flags)"""
4548 return _core_.NavigationKeyEvent_SetFlags(*args, **kwargs)
4549
4550 def GetCurrentFocus(*args, **kwargs):
4551 """GetCurrentFocus(self) -> Window"""
4552 return _core_.NavigationKeyEvent_GetCurrentFocus(*args, **kwargs)
4553
4554 def SetCurrentFocus(*args, **kwargs):
4555 """SetCurrentFocus(self, Window win)"""
4556 return _core_.NavigationKeyEvent_SetCurrentFocus(*args, **kwargs)
4557
4558 IsBackward = _core_.NavigationKeyEvent_IsBackward
4559 IsForward = _core_.NavigationKeyEvent_IsForward
4560 WinChange = _core_.NavigationKeyEvent_WinChange
4561
4562 class NavigationKeyEventPtr(NavigationKeyEvent):
4563 def __init__(self, this):
4564 self.this = this
4565 if not hasattr(self,"thisown"): self.thisown = 0
4566 self.__class__ = NavigationKeyEvent
4567 _core_.NavigationKeyEvent_swigregister(NavigationKeyEventPtr)
4568
4569 #---------------------------------------------------------------------------
4570
4571 class WindowCreateEvent(CommandEvent):
4572 """Proxy of C++ WindowCreateEvent class"""
4573 def __repr__(self):
4574 return "<%s.%s; proxy of C++ wxWindowCreateEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
4575 def __init__(self, *args, **kwargs):
4576 """__init__(self, Window win=None) -> WindowCreateEvent"""
4577 newobj = _core_.new_WindowCreateEvent(*args, **kwargs)
4578 self.this = newobj.this
4579 self.thisown = 1
4580 del newobj.thisown
4581 def GetWindow(*args, **kwargs):
4582 """GetWindow(self) -> Window"""
4583 return _core_.WindowCreateEvent_GetWindow(*args, **kwargs)
4584
4585
4586 class WindowCreateEventPtr(WindowCreateEvent):
4587 def __init__(self, this):
4588 self.this = this
4589 if not hasattr(self,"thisown"): self.thisown = 0
4590 self.__class__ = WindowCreateEvent
4591 _core_.WindowCreateEvent_swigregister(WindowCreateEventPtr)
4592
4593 class WindowDestroyEvent(CommandEvent):
4594 """Proxy of C++ WindowDestroyEvent class"""
4595 def __repr__(self):
4596 return "<%s.%s; proxy of C++ wxWindowDestroyEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
4597 def __init__(self, *args, **kwargs):
4598 """__init__(self, Window win=None) -> WindowDestroyEvent"""
4599 newobj = _core_.new_WindowDestroyEvent(*args, **kwargs)
4600 self.this = newobj.this
4601 self.thisown = 1
4602 del newobj.thisown
4603 def GetWindow(*args, **kwargs):
4604 """GetWindow(self) -> Window"""
4605 return _core_.WindowDestroyEvent_GetWindow(*args, **kwargs)
4606
4607
4608 class WindowDestroyEventPtr(WindowDestroyEvent):
4609 def __init__(self, this):
4610 self.this = this
4611 if not hasattr(self,"thisown"): self.thisown = 0
4612 self.__class__ = WindowDestroyEvent
4613 _core_.WindowDestroyEvent_swigregister(WindowDestroyEventPtr)
4614
4615 #---------------------------------------------------------------------------
4616
4617 class ContextMenuEvent(CommandEvent):
4618 """Proxy of C++ ContextMenuEvent class"""
4619 def __repr__(self):
4620 return "<%s.%s; proxy of C++ wxContextMenuEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
4621 def __init__(self, *args, **kwargs):
4622 """__init__(self, wxEventType type=wxEVT_NULL, int winid=0, Point pt=DefaultPosition) -> ContextMenuEvent"""
4623 newobj = _core_.new_ContextMenuEvent(*args, **kwargs)
4624 self.this = newobj.this
4625 self.thisown = 1
4626 del newobj.thisown
4627 def GetPosition(*args, **kwargs):
4628 """GetPosition(self) -> Point"""
4629 return _core_.ContextMenuEvent_GetPosition(*args, **kwargs)
4630
4631 def SetPosition(*args, **kwargs):
4632 """SetPosition(self, Point pos)"""
4633 return _core_.ContextMenuEvent_SetPosition(*args, **kwargs)
4634
4635
4636 class ContextMenuEventPtr(ContextMenuEvent):
4637 def __init__(self, this):
4638 self.this = this
4639 if not hasattr(self,"thisown"): self.thisown = 0
4640 self.__class__ = ContextMenuEvent
4641 _core_.ContextMenuEvent_swigregister(ContextMenuEventPtr)
4642
4643 #---------------------------------------------------------------------------
4644
4645 IDLE_PROCESS_ALL = _core_.IDLE_PROCESS_ALL
4646 IDLE_PROCESS_SPECIFIED = _core_.IDLE_PROCESS_SPECIFIED
4647 class IdleEvent(Event):
4648 """Proxy of C++ IdleEvent class"""
4649 def __repr__(self):
4650 return "<%s.%s; proxy of C++ wxIdleEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
4651 def __init__(self, *args, **kwargs):
4652 """__init__(self) -> IdleEvent"""
4653 newobj = _core_.new_IdleEvent(*args, **kwargs)
4654 self.this = newobj.this
4655 self.thisown = 1
4656 del newobj.thisown
4657 def RequestMore(*args, **kwargs):
4658 """RequestMore(self, bool needMore=True)"""
4659 return _core_.IdleEvent_RequestMore(*args, **kwargs)
4660
4661 def MoreRequested(*args, **kwargs):
4662 """MoreRequested(self) -> bool"""
4663 return _core_.IdleEvent_MoreRequested(*args, **kwargs)
4664
4665 def SetMode(*args, **kwargs):
4666 """SetMode(int mode)"""
4667 return _core_.IdleEvent_SetMode(*args, **kwargs)
4668
4669 SetMode = staticmethod(SetMode)
4670 def GetMode(*args, **kwargs):
4671 """GetMode() -> int"""
4672 return _core_.IdleEvent_GetMode(*args, **kwargs)
4673
4674 GetMode = staticmethod(GetMode)
4675 def CanSend(*args, **kwargs):
4676 """CanSend(Window win) -> bool"""
4677 return _core_.IdleEvent_CanSend(*args, **kwargs)
4678
4679 CanSend = staticmethod(CanSend)
4680
4681 class IdleEventPtr(IdleEvent):
4682 def __init__(self, this):
4683 self.this = this
4684 if not hasattr(self,"thisown"): self.thisown = 0
4685 self.__class__ = IdleEvent
4686 _core_.IdleEvent_swigregister(IdleEventPtr)
4687
4688 def IdleEvent_SetMode(*args, **kwargs):
4689 """IdleEvent_SetMode(int mode)"""
4690 return _core_.IdleEvent_SetMode(*args, **kwargs)
4691
4692 def IdleEvent_GetMode(*args, **kwargs):
4693 """IdleEvent_GetMode() -> int"""
4694 return _core_.IdleEvent_GetMode(*args, **kwargs)
4695
4696 def IdleEvent_CanSend(*args, **kwargs):
4697 """IdleEvent_CanSend(Window win) -> bool"""
4698 return _core_.IdleEvent_CanSend(*args, **kwargs)
4699
4700 #---------------------------------------------------------------------------
4701
4702 class PyEvent(Event):
4703 """Proxy of C++ PyEvent class"""
4704 def __repr__(self):
4705 return "<%s.%s; proxy of C++ wxPyEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
4706 def __init__(self, *args, **kwargs):
4707 """__init__(self, int winid=0, wxEventType commandType=wxEVT_NULL) -> PyEvent"""
4708 newobj = _core_.new_PyEvent(*args, **kwargs)
4709 self.this = newobj.this
4710 self.thisown = 1
4711 del newobj.thisown
4712 self.SetSelf(self)
4713
4714 def __del__(self, destroy=_core_.delete_PyEvent):
4715 """__del__(self)"""
4716 try:
4717 if self.thisown: destroy(self)
4718 except: pass
4719
4720 def SetSelf(*args, **kwargs):
4721 """SetSelf(self, PyObject self)"""
4722 return _core_.PyEvent_SetSelf(*args, **kwargs)
4723
4724 def GetSelf(*args, **kwargs):
4725 """GetSelf(self) -> PyObject"""
4726 return _core_.PyEvent_GetSelf(*args, **kwargs)
4727
4728
4729 class PyEventPtr(PyEvent):
4730 def __init__(self, this):
4731 self.this = this
4732 if not hasattr(self,"thisown"): self.thisown = 0
4733 self.__class__ = PyEvent
4734 _core_.PyEvent_swigregister(PyEventPtr)
4735
4736 class PyCommandEvent(CommandEvent):
4737 """Proxy of C++ PyCommandEvent class"""
4738 def __repr__(self):
4739 return "<%s.%s; proxy of C++ wxPyCommandEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
4740 def __init__(self, *args, **kwargs):
4741 """__init__(self, wxEventType commandType=wxEVT_NULL, int id=0) -> PyCommandEvent"""
4742 newobj = _core_.new_PyCommandEvent(*args, **kwargs)
4743 self.this = newobj.this
4744 self.thisown = 1
4745 del newobj.thisown
4746 self.SetSelf(self)
4747
4748 def __del__(self, destroy=_core_.delete_PyCommandEvent):
4749 """__del__(self)"""
4750 try:
4751 if self.thisown: destroy(self)
4752 except: pass
4753
4754 def SetSelf(*args, **kwargs):
4755 """SetSelf(self, PyObject self)"""
4756 return _core_.PyCommandEvent_SetSelf(*args, **kwargs)
4757
4758 def GetSelf(*args, **kwargs):
4759 """GetSelf(self) -> PyObject"""
4760 return _core_.PyCommandEvent_GetSelf(*args, **kwargs)
4761
4762
4763 class PyCommandEventPtr(PyCommandEvent):
4764 def __init__(self, this):
4765 self.this = this
4766 if not hasattr(self,"thisown"): self.thisown = 0
4767 self.__class__ = PyCommandEvent
4768 _core_.PyCommandEvent_swigregister(PyCommandEventPtr)
4769
4770 #---------------------------------------------------------------------------
4771
4772 PYAPP_ASSERT_SUPPRESS = _core_.PYAPP_ASSERT_SUPPRESS
4773 PYAPP_ASSERT_EXCEPTION = _core_.PYAPP_ASSERT_EXCEPTION
4774 PYAPP_ASSERT_DIALOG = _core_.PYAPP_ASSERT_DIALOG
4775 PYAPP_ASSERT_LOG = _core_.PYAPP_ASSERT_LOG
4776 PRINT_WINDOWS = _core_.PRINT_WINDOWS
4777 PRINT_POSTSCRIPT = _core_.PRINT_POSTSCRIPT
4778 class PyApp(EvtHandler):
4779 """
4780 The ``wx.PyApp`` class is an *implementation detail*, please use the
4781 `wx.App` class (or some other derived class) instead.
4782 """
4783 def __repr__(self):
4784 return "<%s.%s; proxy of C++ wxPyApp instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
4785 def __init__(self, *args, **kwargs):
4786 """
4787 __init__(self) -> PyApp
4788
4789 Create a new application object, starting the bootstrap process.
4790 """
4791 newobj = _core_.new_PyApp(*args, **kwargs)
4792 self.this = newobj.this
4793 self.thisown = 1
4794 del newobj.thisown
4795 self._setCallbackInfo(self, PyApp)
4796 self._setOORInfo(self)
4797
4798 def __del__(self, destroy=_core_.delete_PyApp):
4799 """__del__(self)"""
4800 try:
4801 if self.thisown: destroy(self)
4802 except: pass
4803
4804 def _setCallbackInfo(*args, **kwargs):
4805 """_setCallbackInfo(self, PyObject self, PyObject _class)"""
4806 return _core_.PyApp__setCallbackInfo(*args, **kwargs)
4807
4808 def GetAppName(*args, **kwargs):
4809 """
4810 GetAppName(self) -> String
4811
4812 Get the application name.
4813 """
4814 return _core_.PyApp_GetAppName(*args, **kwargs)
4815
4816 def SetAppName(*args, **kwargs):
4817 """
4818 SetAppName(self, String name)
4819
4820 Set the application name. This value may be used automatically by
4821 `wx.Config` and such.
4822 """
4823 return _core_.PyApp_SetAppName(*args, **kwargs)
4824
4825 def GetClassName(*args, **kwargs):
4826 """
4827 GetClassName(self) -> String
4828
4829 Get the application's class name.
4830 """
4831 return _core_.PyApp_GetClassName(*args, **kwargs)
4832
4833 def SetClassName(*args, **kwargs):
4834 """
4835 SetClassName(self, String name)
4836
4837 Set the application's class name. This value may be used for
4838 X-resources if applicable for the platform
4839 """
4840 return _core_.PyApp_SetClassName(*args, **kwargs)
4841
4842 def GetVendorName(*args, **kwargs):
4843 """
4844 GetVendorName(self) -> String
4845
4846 Get the application's vendor name.
4847 """
4848 return _core_.PyApp_GetVendorName(*args, **kwargs)
4849
4850 def SetVendorName(*args, **kwargs):
4851 """
4852 SetVendorName(self, String name)
4853
4854 Set the application's vendor name. This value may be used
4855 automatically by `wx.Config` and such.
4856 """
4857 return _core_.PyApp_SetVendorName(*args, **kwargs)
4858
4859 def GetTraits(*args, **kwargs):
4860 """
4861 GetTraits(self) -> wxAppTraits
4862
4863 Return (and create if necessary) the app traits object to which we
4864 delegate for everything which either should be configurable by the
4865 user (then he can change the default behaviour simply by overriding
4866 CreateTraits() and returning his own traits object) or which is
4867 GUI/console dependent as then wx.AppTraits allows us to abstract the
4868 differences behind the common facade.
4869
4870 :todo: Add support for overriding CreateAppTraits in wxPython.
4871 """
4872 return _core_.PyApp_GetTraits(*args, **kwargs)
4873
4874 def ProcessPendingEvents(*args, **kwargs):
4875 """
4876 ProcessPendingEvents(self)
4877
4878 Process all events in the Pending Events list -- it is necessary to
4879 call this function to process posted events. This normally happens
4880 during each event loop iteration.
4881 """
4882 return _core_.PyApp_ProcessPendingEvents(*args, **kwargs)
4883
4884 def Yield(*args, **kwargs):
4885 """
4886 Yield(self, bool onlyIfNeeded=False) -> bool
4887
4888 Process all currently pending events right now, instead of waiting
4889 until return to the event loop. It is an error to call ``Yield``
4890 recursively unless the value of ``onlyIfNeeded`` is True.
4891
4892 :warning: This function is dangerous as it can lead to unexpected
4893 reentrancies (i.e. when called from an event handler it may
4894 result in calling the same event handler again), use with
4895 extreme care or, better, don't use at all!
4896
4897 :see: `wx.Yield`, `wx.YieldIfNeeded`, `wx.SafeYield`
4898
4899 """
4900 return _core_.PyApp_Yield(*args, **kwargs)
4901
4902 def WakeUpIdle(*args, **kwargs):
4903 """
4904 WakeUpIdle(self)
4905
4906 Make sure that idle events are sent again.
4907 :see: `wx.WakeUpIdle`
4908 """
4909 return _core_.PyApp_WakeUpIdle(*args, **kwargs)
4910
4911 def IsMainLoopRunning(*args, **kwargs):
4912 """
4913 IsMainLoopRunning() -> bool
4914
4915 Returns True if we're running the main loop, i.e. if the events can
4916 currently be dispatched.
4917 """
4918 return _core_.PyApp_IsMainLoopRunning(*args, **kwargs)
4919
4920 IsMainLoopRunning = staticmethod(IsMainLoopRunning)
4921 def MainLoop(*args, **kwargs):
4922 """
4923 MainLoop(self) -> int
4924
4925 Execute the main GUI loop, the function doesn't normally return until
4926 all top level windows have been closed and destroyed.
4927 """
4928 return _core_.PyApp_MainLoop(*args, **kwargs)
4929
4930 def Exit(*args, **kwargs):
4931 """
4932 Exit(self)
4933
4934 Exit the main loop thus terminating the application.
4935 :see: `wx.Exit`
4936 """
4937 return _core_.PyApp_Exit(*args, **kwargs)
4938
4939 def ExitMainLoop(*args, **kwargs):
4940 """
4941 ExitMainLoop(self)
4942
4943 Exit the main GUI loop during the next iteration of the main
4944 loop, (i.e. it does not stop the program immediately!)
4945 """
4946 return _core_.PyApp_ExitMainLoop(*args, **kwargs)
4947
4948 def Pending(*args, **kwargs):
4949 """
4950 Pending(self) -> bool
4951
4952 Returns True if there are unprocessed events in the event queue.
4953 """
4954 return _core_.PyApp_Pending(*args, **kwargs)
4955
4956 def Dispatch(*args, **kwargs):
4957 """
4958 Dispatch(self) -> bool
4959
4960 Process the first event in the event queue (blocks until an event
4961 appears if there are none currently)
4962 """
4963 return _core_.PyApp_Dispatch(*args, **kwargs)
4964
4965 def ProcessIdle(*args, **kwargs):
4966 """
4967 ProcessIdle(self) -> bool
4968
4969 Called from the MainLoop when the application becomes idle (there are
4970 no pending events) and sends a `wx.IdleEvent` to all interested
4971 parties. Returns True if more idle events are needed, False if not.
4972 """
4973 return _core_.PyApp_ProcessIdle(*args, **kwargs)
4974
4975 def SendIdleEvents(*args, **kwargs):
4976 """
4977 SendIdleEvents(self, Window win, IdleEvent event) -> bool
4978
4979 Send idle event to window and all subwindows. Returns True if more
4980 idle time is requested.
4981 """
4982 return _core_.PyApp_SendIdleEvents(*args, **kwargs)
4983
4984 def IsActive(*args, **kwargs):
4985 """
4986 IsActive(self) -> bool
4987
4988 Return True if our app has focus.
4989 """
4990 return _core_.PyApp_IsActive(*args, **kwargs)
4991
4992 def SetTopWindow(*args, **kwargs):
4993 """
4994 SetTopWindow(self, Window win)
4995
4996 Set the *main* top level window
4997 """
4998 return _core_.PyApp_SetTopWindow(*args, **kwargs)
4999
5000 def GetTopWindow(*args, **kwargs):
5001 """
5002 GetTopWindow(self) -> Window
5003
5004 Return the *main* top level window (if it hadn't been set previously
5005 with SetTopWindow(), will return just some top level window and, if
5006 there not any, will return None)
5007 """
5008 return _core_.PyApp_GetTopWindow(*args, **kwargs)
5009
5010 def SetExitOnFrameDelete(*args, **kwargs):
5011 """
5012 SetExitOnFrameDelete(self, bool flag)
5013
5014 Control the exit behaviour: by default, the program will exit the main
5015 loop (and so, usually, terminate) when the last top-level program
5016 window is deleted. Beware that if you disable this behaviour (with
5017 SetExitOnFrameDelete(False)), you'll have to call ExitMainLoop()
5018 explicitly from somewhere.
5019 """
5020 return _core_.PyApp_SetExitOnFrameDelete(*args, **kwargs)
5021
5022 def GetExitOnFrameDelete(*args, **kwargs):
5023 """
5024 GetExitOnFrameDelete(self) -> bool
5025
5026 Get the current exit behaviour setting.
5027 """
5028 return _core_.PyApp_GetExitOnFrameDelete(*args, **kwargs)
5029
5030 def SetUseBestVisual(*args, **kwargs):
5031 """
5032 SetUseBestVisual(self, bool flag)
5033
5034 Set whether the app should try to use the best available visual on
5035 systems where more than one is available, (Sun, SGI, XFree86 4, etc.)
5036 """
5037 return _core_.PyApp_SetUseBestVisual(*args, **kwargs)
5038
5039 def GetUseBestVisual(*args, **kwargs):
5040 """
5041 GetUseBestVisual(self) -> bool
5042
5043 Get current UseBestVisual setting.
5044 """
5045 return _core_.PyApp_GetUseBestVisual(*args, **kwargs)
5046
5047 def SetPrintMode(*args, **kwargs):
5048 """SetPrintMode(self, int mode)"""
5049 return _core_.PyApp_SetPrintMode(*args, **kwargs)
5050
5051 def GetPrintMode(*args, **kwargs):
5052 """GetPrintMode(self) -> int"""
5053 return _core_.PyApp_GetPrintMode(*args, **kwargs)
5054
5055 def SetAssertMode(*args, **kwargs):
5056 """
5057 SetAssertMode(self, int mode)
5058
5059 Set the OnAssert behaviour for debug and hybrid builds.
5060 """
5061 return _core_.PyApp_SetAssertMode(*args, **kwargs)
5062
5063 def GetAssertMode(*args, **kwargs):
5064 """
5065 GetAssertMode(self) -> int
5066
5067 Get the current OnAssert behaviour setting.
5068 """
5069 return _core_.PyApp_GetAssertMode(*args, **kwargs)
5070
5071 def GetMacSupportPCMenuShortcuts(*args, **kwargs):
5072 """GetMacSupportPCMenuShortcuts() -> bool"""
5073 return _core_.PyApp_GetMacSupportPCMenuShortcuts(*args, **kwargs)
5074
5075 GetMacSupportPCMenuShortcuts = staticmethod(GetMacSupportPCMenuShortcuts)
5076 def GetMacAboutMenuItemId(*args, **kwargs):
5077 """GetMacAboutMenuItemId() -> long"""
5078 return _core_.PyApp_GetMacAboutMenuItemId(*args, **kwargs)
5079
5080 GetMacAboutMenuItemId = staticmethod(GetMacAboutMenuItemId)
5081 def GetMacPreferencesMenuItemId(*args, **kwargs):
5082 """GetMacPreferencesMenuItemId() -> long"""
5083 return _core_.PyApp_GetMacPreferencesMenuItemId(*args, **kwargs)
5084
5085 GetMacPreferencesMenuItemId = staticmethod(GetMacPreferencesMenuItemId)
5086 def GetMacExitMenuItemId(*args, **kwargs):
5087 """GetMacExitMenuItemId() -> long"""
5088 return _core_.PyApp_GetMacExitMenuItemId(*args, **kwargs)
5089
5090 GetMacExitMenuItemId = staticmethod(GetMacExitMenuItemId)
5091 def GetMacHelpMenuTitleName(*args, **kwargs):
5092 """GetMacHelpMenuTitleName() -> String"""
5093 return _core_.PyApp_GetMacHelpMenuTitleName(*args, **kwargs)
5094
5095 GetMacHelpMenuTitleName = staticmethod(GetMacHelpMenuTitleName)
5096 def SetMacSupportPCMenuShortcuts(*args, **kwargs):
5097 """SetMacSupportPCMenuShortcuts(bool val)"""
5098 return _core_.PyApp_SetMacSupportPCMenuShortcuts(*args, **kwargs)
5099
5100 SetMacSupportPCMenuShortcuts = staticmethod(SetMacSupportPCMenuShortcuts)
5101 def SetMacAboutMenuItemId(*args, **kwargs):
5102 """SetMacAboutMenuItemId(long val)"""
5103 return _core_.PyApp_SetMacAboutMenuItemId(*args, **kwargs)
5104
5105 SetMacAboutMenuItemId = staticmethod(SetMacAboutMenuItemId)
5106 def SetMacPreferencesMenuItemId(*args, **kwargs):
5107 """SetMacPreferencesMenuItemId(long val)"""
5108 return _core_.PyApp_SetMacPreferencesMenuItemId(*args, **kwargs)
5109
5110 SetMacPreferencesMenuItemId = staticmethod(SetMacPreferencesMenuItemId)
5111 def SetMacExitMenuItemId(*args, **kwargs):
5112 """SetMacExitMenuItemId(long val)"""
5113 return _core_.PyApp_SetMacExitMenuItemId(*args, **kwargs)
5114
5115 SetMacExitMenuItemId = staticmethod(SetMacExitMenuItemId)
5116 def SetMacHelpMenuTitleName(*args, **kwargs):
5117 """SetMacHelpMenuTitleName(String val)"""
5118 return _core_.PyApp_SetMacHelpMenuTitleName(*args, **kwargs)
5119
5120 SetMacHelpMenuTitleName = staticmethod(SetMacHelpMenuTitleName)
5121 def _BootstrapApp(*args, **kwargs):
5122 """
5123 _BootstrapApp(self)
5124
5125 For internal use only
5126 """
5127 return _core_.PyApp__BootstrapApp(*args, **kwargs)
5128
5129 def GetComCtl32Version(*args, **kwargs):
5130 """
5131 GetComCtl32Version() -> int
5132
5133 Returns 400, 470, 471, etc. for comctl32.dll 4.00, 4.70, 4.71 or 0 if
5134 it wasn't found at all. Raises an exception on non-Windows platforms.
5135 """
5136 return _core_.PyApp_GetComCtl32Version(*args, **kwargs)
5137
5138 GetComCtl32Version = staticmethod(GetComCtl32Version)
5139
5140 class PyAppPtr(PyApp):
5141 def __init__(self, this):
5142 self.this = this
5143 if not hasattr(self,"thisown"): self.thisown = 0
5144 self.__class__ = PyApp
5145 _core_.PyApp_swigregister(PyAppPtr)
5146
5147 def PyApp_IsMainLoopRunning(*args, **kwargs):
5148 """
5149 PyApp_IsMainLoopRunning() -> bool
5150
5151 Returns True if we're running the main loop, i.e. if the events can
5152 currently be dispatched.
5153 """
5154 return _core_.PyApp_IsMainLoopRunning(*args, **kwargs)
5155
5156 def PyApp_GetMacSupportPCMenuShortcuts(*args, **kwargs):
5157 """PyApp_GetMacSupportPCMenuShortcuts() -> bool"""
5158 return _core_.PyApp_GetMacSupportPCMenuShortcuts(*args, **kwargs)
5159
5160 def PyApp_GetMacAboutMenuItemId(*args, **kwargs):
5161 """PyApp_GetMacAboutMenuItemId() -> long"""
5162 return _core_.PyApp_GetMacAboutMenuItemId(*args, **kwargs)
5163
5164 def PyApp_GetMacPreferencesMenuItemId(*args, **kwargs):
5165 """PyApp_GetMacPreferencesMenuItemId() -> long"""
5166 return _core_.PyApp_GetMacPreferencesMenuItemId(*args, **kwargs)
5167
5168 def PyApp_GetMacExitMenuItemId(*args, **kwargs):
5169 """PyApp_GetMacExitMenuItemId() -> long"""
5170 return _core_.PyApp_GetMacExitMenuItemId(*args, **kwargs)
5171
5172 def PyApp_GetMacHelpMenuTitleName(*args, **kwargs):
5173 """PyApp_GetMacHelpMenuTitleName() -> String"""
5174 return _core_.PyApp_GetMacHelpMenuTitleName(*args, **kwargs)
5175
5176 def PyApp_SetMacSupportPCMenuShortcuts(*args, **kwargs):
5177 """PyApp_SetMacSupportPCMenuShortcuts(bool val)"""
5178 return _core_.PyApp_SetMacSupportPCMenuShortcuts(*args, **kwargs)
5179
5180 def PyApp_SetMacAboutMenuItemId(*args, **kwargs):
5181 """PyApp_SetMacAboutMenuItemId(long val)"""
5182 return _core_.PyApp_SetMacAboutMenuItemId(*args, **kwargs)
5183
5184 def PyApp_SetMacPreferencesMenuItemId(*args, **kwargs):
5185 """PyApp_SetMacPreferencesMenuItemId(long val)"""
5186 return _core_.PyApp_SetMacPreferencesMenuItemId(*args, **kwargs)
5187
5188 def PyApp_SetMacExitMenuItemId(*args, **kwargs):
5189 """PyApp_SetMacExitMenuItemId(long val)"""
5190 return _core_.PyApp_SetMacExitMenuItemId(*args, **kwargs)
5191
5192 def PyApp_SetMacHelpMenuTitleName(*args, **kwargs):
5193 """PyApp_SetMacHelpMenuTitleName(String val)"""
5194 return _core_.PyApp_SetMacHelpMenuTitleName(*args, **kwargs)
5195
5196 def PyApp_GetComCtl32Version(*args, **kwargs):
5197 """
5198 PyApp_GetComCtl32Version() -> int
5199
5200 Returns 400, 470, 471, etc. for comctl32.dll 4.00, 4.70, 4.71 or 0 if
5201 it wasn't found at all. Raises an exception on non-Windows platforms.
5202 """
5203 return _core_.PyApp_GetComCtl32Version(*args, **kwargs)
5204
5205 #---------------------------------------------------------------------------
5206
5207
5208 def Exit(*args, **kwargs):
5209 """
5210 Exit()
5211
5212 Force an exit of the application. Convenience for wx.GetApp().Exit()
5213 """
5214 return _core_.Exit(*args, **kwargs)
5215
5216 def Yield(*args, **kwargs):
5217 """
5218 Yield() -> bool
5219
5220 Yield to other apps/messages. Convenience for wx.GetApp().Yield()
5221 """
5222 return _core_.Yield(*args, **kwargs)
5223
5224 def YieldIfNeeded(*args, **kwargs):
5225 """
5226 YieldIfNeeded() -> bool
5227
5228 Yield to other apps/messages. Convenience for wx.GetApp().Yield(True)
5229 """
5230 return _core_.YieldIfNeeded(*args, **kwargs)
5231
5232 def SafeYield(*args, **kwargs):
5233 """
5234 SafeYield(Window win=None, bool onlyIfNeeded=False) -> bool
5235
5236 This function is similar to `wx.Yield`, except that it disables the
5237 user input to all program windows before calling `wx.Yield` and
5238 re-enables it again afterwards. If ``win`` is not None, this window
5239 will remain enabled, allowing the implementation of some limited user
5240 interaction.
5241
5242 :Returns: the result of the call to `wx.Yield`.
5243 """
5244 return _core_.SafeYield(*args, **kwargs)
5245
5246 def WakeUpIdle(*args, **kwargs):
5247 """
5248 WakeUpIdle()
5249
5250 Cause the message queue to become empty again, so idle events will be
5251 sent.
5252 """
5253 return _core_.WakeUpIdle(*args, **kwargs)
5254
5255 def PostEvent(*args, **kwargs):
5256 """
5257 PostEvent(EvtHandler dest, Event event)
5258
5259 Send an event to a window or other wx.EvtHandler to be processed
5260 later.
5261 """
5262 return _core_.PostEvent(*args, **kwargs)
5263
5264 def App_CleanUp(*args, **kwargs):
5265 """
5266 App_CleanUp()
5267
5268 For internal use only, it is used to cleanup after wxWidgets when
5269 Python shuts down.
5270 """
5271 return _core_.App_CleanUp(*args, **kwargs)
5272
5273 def GetApp(*args, **kwargs):
5274 """
5275 GetApp() -> PyApp
5276
5277 Return a reference to the current wx.App object.
5278 """
5279 return _core_.GetApp(*args, **kwargs)
5280
5281 def SetDefaultPyEncoding(*args, **kwargs):
5282 """
5283 SetDefaultPyEncoding(string encoding)
5284
5285 Sets the encoding that wxPython will use when it needs to convert a
5286 Python string or unicode object to or from a wxString.
5287 """
5288 return _core_.SetDefaultPyEncoding(*args, **kwargs)
5289
5290 def GetDefaultPyEncoding(*args, **kwargs):
5291 """
5292 GetDefaultPyEncoding() -> string
5293
5294 Gets the current encoding that wxPython will use when it needs to
5295 convert a Python string or unicode object to or from a wxString.
5296 """
5297 return _core_.GetDefaultPyEncoding(*args, **kwargs)
5298 #----------------------------------------------------------------------
5299
5300 class PyOnDemandOutputWindow:
5301 """
5302 A class that can be used for redirecting Python's stdout and
5303 stderr streams. It will do nothing until something is wrriten to
5304 the stream at which point it will create a Frame with a text area
5305 and write the text there.
5306 """
5307 def __init__(self, title = "wxPython: stdout/stderr"):
5308 self.frame = None
5309 self.title = title
5310 self.pos = wx.DefaultPosition
5311 self.size = (450, 300)
5312 self.parent = None
5313
5314 def SetParent(self, parent):
5315 """Set the window to be used as the popup Frame's parent."""
5316 self.parent = parent
5317
5318
5319 def CreateOutputWindow(self, st):
5320 self.frame = wx.Frame(self.parent, -1, self.title, self.pos, self.size,
5321 style=wx.DEFAULT_FRAME_STYLE)
5322 self.text = wx.TextCtrl(self.frame, -1, "",
5323 style=wx.TE_MULTILINE|wx.TE_READONLY)
5324 self.text.AppendText(st)
5325 self.frame.Show(True)
5326 EVT_CLOSE(self.frame, self.OnCloseWindow)
5327
5328
5329 def OnCloseWindow(self, event):
5330 if self.frame is not None:
5331 self.frame.Destroy()
5332 self.frame = None
5333 self.text = None
5334
5335
5336 # These methods provide the file-like output behaviour.
5337 def write(self, text):
5338 """
5339 Create the output window if needed and write the string to it.
5340 If not called in the context of the gui thread then uses
5341 CallAfter to do the work there.
5342 """
5343 if self.frame is None:
5344 if not wx.Thread_IsMain():
5345 wx.CallAfter(self.CreateOutputWindow, text)
5346 else:
5347 self.CreateOutputWindow(text)
5348 else:
5349 if not wx.Thread_IsMain():
5350 wx.CallAfter(self.text.AppendText, text)
5351 else:
5352 self.text.AppendText(text)
5353
5354
5355 def close(self):
5356 if self.frame is not None:
5357 wx.CallAfter(self.frame.Close)
5358
5359
5360 def flush(self):
5361 pass
5362
5363
5364
5365 #----------------------------------------------------------------------
5366
5367 _defRedirect = (wx.Platform == '__WXMSW__' or wx.Platform == '__WXMAC__')
5368
5369 class App(wx.PyApp):
5370 """
5371 The ``wx.App`` class represents the application and is used to:
5372
5373 * bootstrap the wxPython system and initialize the underlying
5374 gui toolkit
5375 * set and get application-wide properties
5376 * implement the windowing system main message or event loop,
5377 and to dispatch events to window instances
5378 * etc.
5379
5380 Every application must have a ``wx.App`` instance, and all
5381 creation of UI objects should be delayed until after the
5382 ``wx.App`` object has been created in order to ensure that the gui
5383 platform and wxWidgets have been fully initialized.
5384
5385 Normally you would derive from this class and implement an
5386 ``OnInit`` method that creates a frame and then calls
5387 ``self.SetTopWindow(frame)``.
5388
5389 :see: `wx.PySimpleApp` for a simpler app class that can be used
5390 directly.
5391 """
5392
5393 outputWindowClass = PyOnDemandOutputWindow
5394
5395 def __init__(self, redirect=_defRedirect, filename=None,
5396 useBestVisual=False, clearSigInt=True):
5397 """
5398 Construct a ``wx.App`` object.
5399
5400 :param redirect: Should ``sys.stdout`` and ``sys.stderr`` be
5401 redirected? Defaults to True on Windows and Mac, False
5402 otherwise. If `filename` is None then output will be
5403 redirected to a window that pops up as needed. (You can
5404 control what kind of window is created for the output by
5405 resetting the class variable ``outputWindowClass`` to a
5406 class of your choosing.)
5407
5408 :param filename: The name of a file to redirect output to, if
5409 redirect is True.
5410
5411 :param useBestVisual: Should the app try to use the best
5412 available visual provided by the system (only relevant on
5413 systems that have more than one visual.) This parameter
5414 must be used instead of calling `SetUseBestVisual` later
5415 on because it must be set before the underlying GUI
5416 toolkit is initialized.
5417
5418 :param clearSigInt: Should SIGINT be cleared? This allows the
5419 app to terminate upon a Ctrl-C in the console like other
5420 GUI apps will.
5421
5422 :note: You should override OnInit to do applicaition
5423 initialization to ensure that the system, toolkit and
5424 wxWidgets are fully initialized.
5425 """
5426 wx.PyApp.__init__(self)
5427
5428 if wx.Platform == "__WXMAC__":
5429 try:
5430 import MacOS
5431 if not MacOS.WMAvailable():
5432 print """\
5433 This program needs access to the screen. Please run with 'pythonw',
5434 not 'python', and only when you are logged in on the main display of
5435 your Mac."""
5436 _sys.exit(1)
5437 except SystemExit:
5438 raise
5439 except:
5440 pass
5441
5442 # This has to be done before OnInit
5443 self.SetUseBestVisual(useBestVisual)
5444
5445 # Set the default handler for SIGINT. This fixes a problem
5446 # where if Ctrl-C is pressed in the console that started this
5447 # app then it will not appear to do anything, (not even send
5448 # KeyboardInterrupt???) but will later segfault on exit. By
5449 # setting the default handler then the app will exit, as
5450 # expected (depending on platform.)
5451 if clearSigInt:
5452 try:
5453 import signal
5454 signal.signal(signal.SIGINT, signal.SIG_DFL)
5455 except:
5456 pass
5457
5458 # Save and redirect the stdio to a window?
5459 self.stdioWin = None
5460 self.saveStdio = (_sys.stdout, _sys.stderr)
5461 if redirect:
5462 self.RedirectStdio(filename)
5463
5464 # Use Python's install prefix as the default
5465 wx.StandardPaths.Get().SetInstallPrefix(_sys.prefix)
5466
5467 # This finishes the initialization of wxWindows and then calls
5468 # the OnInit that should be present in the derived class
5469 self._BootstrapApp()
5470
5471
5472 def __del__(self):
5473 try:
5474 self.RestoreStdio() # Just in case the MainLoop was overridden
5475 except:
5476 pass
5477
5478
5479 def SetTopWindow(self, frame):
5480 """Set the \"main\" top level window"""
5481 if self.stdioWin:
5482 self.stdioWin.SetParent(frame)
5483 wx.PyApp.SetTopWindow(self, frame)
5484
5485
5486 def MainLoop(self):
5487 """Execute the main GUI event loop"""
5488 wx.PyApp.MainLoop(self)
5489 self.RestoreStdio()
5490
5491
5492 def RedirectStdio(self, filename=None):
5493 """Redirect sys.stdout and sys.stderr to a file or a popup window."""
5494 if filename:
5495 _sys.stdout = _sys.stderr = open(filename, 'a')
5496 else:
5497 self.stdioWin = self.outputWindowClass()
5498 _sys.stdout = _sys.stderr = self.stdioWin
5499
5500
5501 def RestoreStdio(self):
5502 _sys.stdout, _sys.stderr = self.saveStdio
5503
5504
5505 def SetOutputWindowAttributes(self, title=None, pos=None, size=None):
5506 """
5507 Set the title, position and/or size of the output window if
5508 the stdio has been redirected. This should be called before
5509 any output would cause the output window to be created.
5510 """
5511 if self.stdioWin:
5512 if title is not None:
5513 self.stdioWin.title = title
5514 if pos is not None:
5515 self.stdioWin.pos = pos
5516 if size is not None:
5517 self.stdioWin.size = size
5518
5519
5520
5521
5522 # change from wx.PyApp_XX to wx.App_XX
5523 App_GetMacSupportPCMenuShortcuts = _core_.PyApp_GetMacSupportPCMenuShortcuts
5524 App_GetMacAboutMenuItemId = _core_.PyApp_GetMacAboutMenuItemId
5525 App_GetMacPreferencesMenuItemId = _core_.PyApp_GetMacPreferencesMenuItemId
5526 App_GetMacExitMenuItemId = _core_.PyApp_GetMacExitMenuItemId
5527 App_GetMacHelpMenuTitleName = _core_.PyApp_GetMacHelpMenuTitleName
5528 App_SetMacSupportPCMenuShortcuts = _core_.PyApp_SetMacSupportPCMenuShortcuts
5529 App_SetMacAboutMenuItemId = _core_.PyApp_SetMacAboutMenuItemId
5530 App_SetMacPreferencesMenuItemId = _core_.PyApp_SetMacPreferencesMenuItemId
5531 App_SetMacExitMenuItemId = _core_.PyApp_SetMacExitMenuItemId
5532 App_SetMacHelpMenuTitleName = _core_.PyApp_SetMacHelpMenuTitleName
5533 App_GetComCtl32Version = _core_.PyApp_GetComCtl32Version
5534
5535 #----------------------------------------------------------------------------
5536
5537 class PySimpleApp(wx.App):
5538 """
5539 A simple application class. You can just create one of these and
5540 then then make your top level windows later, and not have to worry
5541 about OnInit. For example::
5542
5543 app = wx.PySimpleApp()
5544 frame = wx.Frame(None, title='Hello World')
5545 frame.Show()
5546 app.MainLoop()
5547
5548 :see: `wx.App`
5549 """
5550
5551 def __init__(self, redirect=False, filename=None,
5552 useBestVisual=False, clearSigInt=True):
5553 """
5554 :see: `wx.App.__init__`
5555 """
5556 wx.App.__init__(self, redirect, filename, useBestVisual, clearSigInt)
5557
5558 def OnInit(self):
5559 return True
5560
5561
5562
5563 # Is anybody using this one?
5564 class PyWidgetTester(wx.App):
5565 def __init__(self, size = (250, 100)):
5566 self.size = size
5567 wx.App.__init__(self, 0)
5568
5569 def OnInit(self):
5570 self.frame = wx.Frame(None, -1, "Widget Tester", pos=(0,0), size=self.size)
5571 self.SetTopWindow(self.frame)
5572 return True
5573
5574 def SetWidget(self, widgetClass, *args, **kwargs):
5575 w = widgetClass(self.frame, *args, **kwargs)
5576 self.frame.Show(True)
5577
5578 #----------------------------------------------------------------------------
5579 # DO NOT hold any other references to this object. This is how we
5580 # know when to cleanup system resources that wxWidgets is holding. When
5581 # the sys module is unloaded, the refcount on sys.__wxPythonCleanup
5582 # goes to zero and it calls the wx.App_CleanUp function.
5583
5584 class __wxPyCleanup:
5585 def __init__(self):
5586 self.cleanup = _core_.App_CleanUp
5587 def __del__(self):
5588 self.cleanup()
5589
5590 _sys.__wxPythonCleanup = __wxPyCleanup()
5591
5592 ## # another possible solution, but it gets called too early...
5593 ## import atexit
5594 ## atexit.register(_core_.wxApp_CleanUp)
5595
5596
5597 #----------------------------------------------------------------------------
5598
5599 #---------------------------------------------------------------------------
5600
5601 class EventLoop(object):
5602 """Proxy of C++ EventLoop class"""
5603 def __repr__(self):
5604 return "<%s.%s; proxy of C++ wxEventLoop instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
5605 def __init__(self, *args, **kwargs):
5606 """__init__(self) -> EventLoop"""
5607 newobj = _core_.new_EventLoop(*args, **kwargs)
5608 self.this = newobj.this
5609 self.thisown = 1
5610 del newobj.thisown
5611 def __del__(self, destroy=_core_.delete_EventLoop):
5612 """__del__(self)"""
5613 try:
5614 if self.thisown: destroy(self)
5615 except: pass
5616
5617 def Run(*args, **kwargs):
5618 """Run(self) -> int"""
5619 return _core_.EventLoop_Run(*args, **kwargs)
5620
5621 def Exit(*args, **kwargs):
5622 """Exit(self, int rc=0)"""
5623 return _core_.EventLoop_Exit(*args, **kwargs)
5624
5625 def Pending(*args, **kwargs):
5626 """Pending(self) -> bool"""
5627 return _core_.EventLoop_Pending(*args, **kwargs)
5628
5629 def Dispatch(*args, **kwargs):
5630 """Dispatch(self) -> bool"""
5631 return _core_.EventLoop_Dispatch(*args, **kwargs)
5632
5633 def IsRunning(*args, **kwargs):
5634 """IsRunning(self) -> bool"""
5635 return _core_.EventLoop_IsRunning(*args, **kwargs)
5636
5637 def GetActive(*args, **kwargs):
5638 """GetActive() -> EventLoop"""
5639 return _core_.EventLoop_GetActive(*args, **kwargs)
5640
5641 GetActive = staticmethod(GetActive)
5642 def SetActive(*args, **kwargs):
5643 """SetActive(EventLoop loop)"""
5644 return _core_.EventLoop_SetActive(*args, **kwargs)
5645
5646 SetActive = staticmethod(SetActive)
5647
5648 class EventLoopPtr(EventLoop):
5649 def __init__(self, this):
5650 self.this = this
5651 if not hasattr(self,"thisown"): self.thisown = 0
5652 self.__class__ = EventLoop
5653 _core_.EventLoop_swigregister(EventLoopPtr)
5654
5655 def EventLoop_GetActive(*args, **kwargs):
5656 """EventLoop_GetActive() -> EventLoop"""
5657 return _core_.EventLoop_GetActive(*args, **kwargs)
5658
5659 def EventLoop_SetActive(*args, **kwargs):
5660 """EventLoop_SetActive(EventLoop loop)"""
5661 return _core_.EventLoop_SetActive(*args, **kwargs)
5662
5663 #---------------------------------------------------------------------------
5664
5665 class AcceleratorEntry(object):
5666 """
5667 A class used to define items in an `wx.AcceleratorTable`. wxPython
5668 programs can choose to use wx.AcceleratorEntry objects, but using a
5669 list of 3-tuple of integers (flags, keyCode, cmdID) usually works just
5670 as well. See `__init__` for of the tuple values.
5671
5672 :see: `wx.AcceleratorTable`
5673 """
5674 def __repr__(self):
5675 return "<%s.%s; proxy of C++ wxAcceleratorEntry instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
5676 def __init__(self, *args, **kwargs):
5677 """
5678 __init__(self, int flags=0, int keyCode=0, int cmdID=0) -> AcceleratorEntry
5679
5680 Construct a wx.AcceleratorEntry.
5681 """
5682 newobj = _core_.new_AcceleratorEntry(*args, **kwargs)
5683 self.this = newobj.this
5684 self.thisown = 1
5685 del newobj.thisown
5686 def __del__(self, destroy=_core_.delete_AcceleratorEntry):
5687 """__del__(self)"""
5688 try:
5689 if self.thisown: destroy(self)
5690 except: pass
5691
5692 def Set(*args, **kwargs):
5693 """
5694 Set(self, int flags, int keyCode, int cmd)
5695
5696 (Re)set the attributes of a wx.AcceleratorEntry.
5697 :see `__init__`
5698 """
5699 return _core_.AcceleratorEntry_Set(*args, **kwargs)
5700
5701 def GetFlags(*args, **kwargs):
5702 """
5703 GetFlags(self) -> int
5704
5705 Get the AcceleratorEntry's flags.
5706 """
5707 return _core_.AcceleratorEntry_GetFlags(*args, **kwargs)
5708
5709 def GetKeyCode(*args, **kwargs):
5710 """
5711 GetKeyCode(self) -> int
5712
5713 Get the AcceleratorEntry's keycode.
5714 """
5715 return _core_.AcceleratorEntry_GetKeyCode(*args, **kwargs)
5716
5717 def GetCommand(*args, **kwargs):
5718 """
5719 GetCommand(self) -> int
5720
5721 Get the AcceleratorEntry's command ID.
5722 """
5723 return _core_.AcceleratorEntry_GetCommand(*args, **kwargs)
5724
5725
5726 class AcceleratorEntryPtr(AcceleratorEntry):
5727 def __init__(self, this):
5728 self.this = this
5729 if not hasattr(self,"thisown"): self.thisown = 0
5730 self.__class__ = AcceleratorEntry
5731 _core_.AcceleratorEntry_swigregister(AcceleratorEntryPtr)
5732
5733 class AcceleratorTable(Object):
5734 """
5735 An accelerator table allows the application to specify a table of
5736 keyboard shortcuts for menus or other commands. On Windows, menu or
5737 button commands are supported; on GTK, only menu commands are
5738 supported.
5739 """
5740 def __repr__(self):
5741 return "<%s.%s; proxy of C++ wxAcceleratorTable instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
5742 def __init__(self, *args, **kwargs):
5743 """
5744 __init__(entries) -> AcceleratorTable
5745
5746 Construct an AcceleratorTable from a list of `wx.AcceleratorEntry`
5747 items or or of 3-tuples (flags, keyCode, cmdID)
5748
5749 :see: `wx.AcceleratorEntry`
5750 """
5751 newobj = _core_.new_AcceleratorTable(*args, **kwargs)
5752 self.this = newobj.this
5753 self.thisown = 1
5754 del newobj.thisown
5755 def __del__(self, destroy=_core_.delete_AcceleratorTable):
5756 """__del__(self)"""
5757 try:
5758 if self.thisown: destroy(self)
5759 except: pass
5760
5761 def Ok(*args, **kwargs):
5762 """Ok(self) -> bool"""
5763 return _core_.AcceleratorTable_Ok(*args, **kwargs)
5764
5765
5766 class AcceleratorTablePtr(AcceleratorTable):
5767 def __init__(self, this):
5768 self.this = this
5769 if not hasattr(self,"thisown"): self.thisown = 0
5770 self.__class__ = AcceleratorTable
5771 _core_.AcceleratorTable_swigregister(AcceleratorTablePtr)
5772
5773
5774 def GetAccelFromString(*args, **kwargs):
5775 """GetAccelFromString(String label) -> AcceleratorEntry"""
5776 return _core_.GetAccelFromString(*args, **kwargs)
5777 #---------------------------------------------------------------------------
5778
5779 class VisualAttributes(object):
5780 """struct containing all the visual attributes of a control"""
5781 def __repr__(self):
5782 return "<%s.%s; proxy of C++ wxVisualAttributes instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
5783 def __init__(self, *args, **kwargs):
5784 """
5785 __init__(self) -> VisualAttributes
5786
5787 struct containing all the visual attributes of a control
5788 """
5789 newobj = _core_.new_VisualAttributes(*args, **kwargs)
5790 self.this = newobj.this
5791 self.thisown = 1
5792 del newobj.thisown
5793 def __del__(self, destroy=_core_.delete_VisualAttributes):
5794 """__del__(self)"""
5795 try:
5796 if self.thisown: destroy(self)
5797 except: pass
5798
5799 font = property(_core_.VisualAttributes_font_get, _core_.VisualAttributes_font_set)
5800 colFg = property(_core_.VisualAttributes_colFg_get, _core_.VisualAttributes_colFg_set)
5801 colBg = property(_core_.VisualAttributes_colBg_get, _core_.VisualAttributes_colBg_set)
5802
5803 class VisualAttributesPtr(VisualAttributes):
5804 def __init__(self, this):
5805 self.this = this
5806 if not hasattr(self,"thisown"): self.thisown = 0
5807 self.__class__ = VisualAttributes
5808 _core_.VisualAttributes_swigregister(VisualAttributesPtr)
5809 NullAcceleratorTable = cvar.NullAcceleratorTable
5810 PanelNameStr = cvar.PanelNameStr
5811
5812 WINDOW_VARIANT_NORMAL = _core_.WINDOW_VARIANT_NORMAL
5813 WINDOW_VARIANT_SMALL = _core_.WINDOW_VARIANT_SMALL
5814 WINDOW_VARIANT_MINI = _core_.WINDOW_VARIANT_MINI
5815 WINDOW_VARIANT_LARGE = _core_.WINDOW_VARIANT_LARGE
5816 WINDOW_VARIANT_MAX = _core_.WINDOW_VARIANT_MAX
5817 class Window(EvtHandler):
5818 """
5819 wx.Window is the base class for all windows and represents any visible
5820 object on the screen. All controls, top level windows and so on are
5821 wx.Windows. Sizers and device contexts are not however, as they don't
5822 appear on screen themselves.
5823
5824 """
5825 def __repr__(self):
5826 return "<%s.%s; proxy of C++ wxWindow instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
5827 def __init__(self, *args, **kwargs):
5828 """
5829 __init__(self, Window parent, int id=-1, Point pos=DefaultPosition,
5830 Size size=DefaultSize, long style=0, String name=PanelNameStr) -> Window
5831
5832 Construct and show a generic Window.
5833 """
5834 newobj = _core_.new_Window(*args, **kwargs)
5835 self.this = newobj.this
5836 self.thisown = 1
5837 del newobj.thisown
5838 self._setOORInfo(self)
5839
5840 def Create(*args, **kwargs):
5841 """
5842 Create(self, Window parent, int id=-1, Point pos=DefaultPosition,
5843 Size size=DefaultSize, long style=0, String name=PanelNameStr) -> bool
5844
5845 Create the GUI part of the Window for 2-phase creation mode.
5846 """
5847 return _core_.Window_Create(*args, **kwargs)
5848
5849 def Close(*args, **kwargs):
5850 """
5851 Close(self, bool force=False) -> bool
5852
5853 This function simply generates a EVT_CLOSE event whose handler usually
5854 tries to close the window. It doesn't close the window itself,
5855 however. If force is False (the default) then the window's close
5856 handler will be allowed to veto the destruction of the window.
5857 """
5858 return _core_.Window_Close(*args, **kwargs)
5859
5860 def Destroy(*args, **kwargs):
5861 """
5862 Destroy(self) -> bool
5863
5864 Destroys the window safely. Frames and dialogs are not destroyed
5865 immediately when this function is called -- they are added to a list
5866 of windows to be deleted on idle time, when all the window's events
5867 have been processed. This prevents problems with events being sent to
5868 non-existent windows.
5869
5870 Returns True if the window has either been successfully deleted, or it
5871 has been added to the list of windows pending real deletion.
5872 """
5873 return _core_.Window_Destroy(*args, **kwargs)
5874
5875 def DestroyChildren(*args, **kwargs):
5876 """
5877 DestroyChildren(self) -> bool
5878
5879 Destroys all children of a window. Called automatically by the
5880 destructor.
5881 """
5882 return _core_.Window_DestroyChildren(*args, **kwargs)
5883
5884 def IsBeingDeleted(*args, **kwargs):
5885 """
5886 IsBeingDeleted(self) -> bool
5887
5888 Is the window in the process of being deleted?
5889 """
5890 return _core_.Window_IsBeingDeleted(*args, **kwargs)
5891
5892 def SetTitle(*args, **kwargs):
5893 """
5894 SetTitle(self, String title)
5895
5896 Sets the window's title. Applicable only to frames and dialogs.
5897 """
5898 return _core_.Window_SetTitle(*args, **kwargs)
5899
5900 def GetTitle(*args, **kwargs):
5901 """
5902 GetTitle(self) -> String
5903
5904 Gets the window's title. Applicable only to frames and dialogs.
5905 """
5906 return _core_.Window_GetTitle(*args, **kwargs)
5907
5908 def SetLabel(*args, **kwargs):
5909 """
5910 SetLabel(self, String label)
5911
5912 Set the text which the window shows in its label if applicable.
5913 """
5914 return _core_.Window_SetLabel(*args, **kwargs)
5915
5916 def GetLabel(*args, **kwargs):
5917 """
5918 GetLabel(self) -> String
5919
5920 Generic way of getting a label from any window, for identification
5921 purposes. The interpretation of this function differs from class to
5922 class. For frames and dialogs, the value returned is the title. For
5923 buttons or static text controls, it is the button text. This function
5924 can be useful for meta-programs such as testing tools or special-needs
5925 access programs)which need to identify windows by name.
5926 """
5927 return _core_.Window_GetLabel(*args, **kwargs)
5928
5929 def SetName(*args, **kwargs):
5930 """
5931 SetName(self, String name)
5932
5933 Sets the window's name. The window name is used for ressource setting
5934 in X, it is not the same as the window title/label
5935 """
5936 return _core_.Window_SetName(*args, **kwargs)
5937
5938 def GetName(*args, **kwargs):
5939 """
5940 GetName(self) -> String
5941
5942 Returns the windows name. This name is not guaranteed to be unique;
5943 it is up to the programmer to supply an appropriate name in the window
5944 constructor or via wx.Window.SetName.
5945 """
5946 return _core_.Window_GetName(*args, **kwargs)
5947
5948 def SetWindowVariant(*args, **kwargs):
5949 """
5950 SetWindowVariant(self, int variant)
5951
5952 Sets the variant of the window/font size to use for this window, if
5953 the platform supports variants, for example, wxMac.
5954 """
5955 return _core_.Window_SetWindowVariant(*args, **kwargs)
5956
5957 def GetWindowVariant(*args, **kwargs):
5958 """GetWindowVariant(self) -> int"""
5959 return _core_.Window_GetWindowVariant(*args, **kwargs)
5960
5961 def SetId(*args, **kwargs):
5962 """
5963 SetId(self, int winid)
5964
5965 Sets the identifier of the window. Each window has an integer
5966 identifier. If the application has not provided one, an identifier
5967 will be generated. Normally, the identifier should be provided on
5968 creation and should not be modified subsequently.
5969 """
5970 return _core_.Window_SetId(*args, **kwargs)
5971
5972 def GetId(*args, **kwargs):
5973 """
5974 GetId(self) -> int
5975
5976 Returns the identifier of the window. Each window has an integer
5977 identifier. If the application has not provided one (or the default Id
5978 -1 is used) then an unique identifier with a negative value will be
5979 generated.
5980 """
5981 return _core_.Window_GetId(*args, **kwargs)
5982
5983 def NewControlId(*args, **kwargs):
5984 """
5985 NewControlId() -> int
5986
5987 Generate a control id for the controls which were not given one.
5988 """
5989 return _core_.Window_NewControlId(*args, **kwargs)
5990
5991 NewControlId = staticmethod(NewControlId)
5992 def NextControlId(*args, **kwargs):
5993 """
5994 NextControlId(int winid) -> int
5995
5996 Get the id of the control following the one with the given
5997 autogenerated) id
5998 """
5999 return _core_.Window_NextControlId(*args, **kwargs)
6000
6001 NextControlId = staticmethod(NextControlId)
6002 def PrevControlId(*args, **kwargs):
6003 """
6004 PrevControlId(int winid) -> int
6005
6006 Get the id of the control preceding the one with the given
6007 autogenerated) id
6008 """
6009 return _core_.Window_PrevControlId(*args, **kwargs)
6010
6011 PrevControlId = staticmethod(PrevControlId)
6012 def SetSize(*args, **kwargs):
6013 """
6014 SetSize(self, Size size)
6015
6016 Sets the size of the window in pixels.
6017 """
6018 return _core_.Window_SetSize(*args, **kwargs)
6019
6020 def SetDimensions(*args, **kwargs):
6021 """
6022 SetDimensions(self, int x, int y, int width, int height, int sizeFlags=SIZE_AUTO)
6023
6024 Sets the position and size of the window in pixels. The sizeFlags
6025 parameter indicates the interpretation of the other params if they are
6026 -1. wx.SIZE_AUTO*: a -1 indicates that a class-specific default
6027 shoudl be used. wx.SIZE_USE_EXISTING: existing dimensions should be
6028 used if -1 values are supplied. wxSIZE_ALLOW_MINUS_ONE: allow
6029 dimensions of -1 and less to be interpreted as real dimensions, not
6030 default values.
6031 """
6032 return _core_.Window_SetDimensions(*args, **kwargs)
6033
6034 def SetRect(*args, **kwargs):
6035 """
6036 SetRect(self, Rect rect, int sizeFlags=SIZE_AUTO)
6037
6038 Sets the position and size of the window in pixels using a wx.Rect.
6039 """
6040 return _core_.Window_SetRect(*args, **kwargs)
6041
6042 def SetSizeWH(*args, **kwargs):
6043 """
6044 SetSizeWH(self, int width, int height)
6045
6046 Sets the size of the window in pixels.
6047 """
6048 return _core_.Window_SetSizeWH(*args, **kwargs)
6049
6050 def Move(*args, **kwargs):
6051 """
6052 Move(self, Point pt, int flags=SIZE_USE_EXISTING)
6053
6054 Moves the window to the given position.
6055 """
6056 return _core_.Window_Move(*args, **kwargs)
6057
6058 SetPosition = Move
6059 def MoveXY(*args, **kwargs):
6060 """
6061 MoveXY(self, int x, int y, int flags=SIZE_USE_EXISTING)
6062
6063 Moves the window to the given position.
6064 """
6065 return _core_.Window_MoveXY(*args, **kwargs)
6066
6067 def SetBestFittingSize(*args, **kwargs):
6068 """
6069 SetBestFittingSize(self, Size size=DefaultSize)
6070
6071 A 'Smart' SetSize that will fill in default size components with the
6072 window's *best size* values. Also set's the minsize for use with sizers.
6073 """
6074 return _core_.Window_SetBestFittingSize(*args, **kwargs)
6075
6076 def Raise(*args, **kwargs):
6077 """
6078 Raise(self)
6079
6080 Raises the window to the top of the window hierarchy if it is a
6081 managed window (dialog or frame).
6082 """
6083 return _core_.Window_Raise(*args, **kwargs)
6084
6085 def Lower(*args, **kwargs):
6086 """
6087 Lower(self)
6088
6089 Lowers the window to the bottom of the window hierarchy if it is a
6090 managed window (dialog or frame).
6091 """
6092 return _core_.Window_Lower(*args, **kwargs)
6093
6094 def SetClientSize(*args, **kwargs):
6095 """
6096 SetClientSize(self, Size size)
6097
6098 This sets the size of the window client area in pixels. Using this
6099 function to size a window tends to be more device-independent than
6100 wx.Window.SetSize, since the application need not worry about what
6101 dimensions the border or title bar have when trying to fit the window
6102 around panel items, for example.
6103 """
6104 return _core_.Window_SetClientSize(*args, **kwargs)
6105
6106 def SetClientSizeWH(*args, **kwargs):
6107 """
6108 SetClientSizeWH(self, int width, int height)
6109
6110 This sets the size of the window client area in pixels. Using this
6111 function to size a window tends to be more device-independent than
6112 wx.Window.SetSize, since the application need not worry about what
6113 dimensions the border or title bar have when trying to fit the window
6114 around panel items, for example.
6115 """
6116 return _core_.Window_SetClientSizeWH(*args, **kwargs)
6117
6118 def SetClientRect(*args, **kwargs):
6119 """
6120 SetClientRect(self, Rect rect)
6121
6122 This sets the size of the window client area in pixels. Using this
6123 function to size a window tends to be more device-independent than
6124 wx.Window.SetSize, since the application need not worry about what
6125 dimensions the border or title bar have when trying to fit the window
6126 around panel items, for example.
6127 """
6128 return _core_.Window_SetClientRect(*args, **kwargs)
6129
6130 def GetPosition(*args, **kwargs):
6131 """
6132 GetPosition(self) -> Point
6133
6134 Get the window's position.
6135 """
6136 return _core_.Window_GetPosition(*args, **kwargs)
6137
6138 def GetPositionTuple(*args, **kwargs):
6139 """
6140 GetPositionTuple() -> (x,y)
6141
6142 Get the window's position.
6143 """
6144 return _core_.Window_GetPositionTuple(*args, **kwargs)
6145
6146 def GetSize(*args, **kwargs):
6147 """
6148 GetSize(self) -> Size
6149
6150 Get the window size.
6151 """
6152 return _core_.Window_GetSize(*args, **kwargs)
6153
6154 def GetSizeTuple(*args, **kwargs):
6155 """
6156 GetSizeTuple() -> (width, height)
6157
6158 Get the window size.
6159 """
6160 return _core_.Window_GetSizeTuple(*args, **kwargs)
6161
6162 def GetRect(*args, **kwargs):
6163 """
6164 GetRect(self) -> Rect
6165
6166 Returns the size and position of the window as a wx.Rect object.
6167 """
6168 return _core_.Window_GetRect(*args, **kwargs)
6169
6170 def GetClientSize(*args, **kwargs):
6171 """
6172 GetClientSize(self) -> Size
6173
6174 This gets the size of the window's 'client area' in pixels. The client
6175 area is the area which may be drawn on by the programmer, excluding
6176 title bar, border, scrollbars, etc.
6177 """
6178 return _core_.Window_GetClientSize(*args, **kwargs)
6179
6180 def GetClientSizeTuple(*args, **kwargs):
6181 """
6182 GetClientSizeTuple() -> (width, height)
6183
6184 This gets the size of the window's 'client area' in pixels. The client
6185 area is the area which may be drawn on by the programmer, excluding
6186 title bar, border, scrollbars, etc.
6187 """
6188 return _core_.Window_GetClientSizeTuple(*args, **kwargs)
6189
6190 def GetClientAreaOrigin(*args, **kwargs):
6191 """
6192 GetClientAreaOrigin(self) -> Point
6193
6194 Get the origin of the client area of the window relative to the
6195 window's top left corner (the client area may be shifted because of
6196 the borders, scrollbars, other decorations...)
6197 """
6198 return _core_.Window_GetClientAreaOrigin(*args, **kwargs)
6199
6200 def GetClientRect(*args, **kwargs):
6201 """
6202 GetClientRect(self) -> Rect
6203
6204 Get the client area position and size as a `wx.Rect` object.
6205 """
6206 return _core_.Window_GetClientRect(*args, **kwargs)
6207
6208 def GetBestSize(*args, **kwargs):
6209 """
6210 GetBestSize(self) -> Size
6211
6212 This function returns the best acceptable minimal size for the
6213 window, if applicable. For example, for a static text control, it will
6214 be the minimal size such that the control label is not truncated. For
6215 windows containing subwindows (suzh aswx.Panel), the size returned by
6216 this function will be the same as the size the window would have had
6217 after calling Fit.
6218 """
6219 return _core_.Window_GetBestSize(*args, **kwargs)
6220
6221 def GetBestSizeTuple(*args, **kwargs):
6222 """
6223 GetBestSizeTuple() -> (width, height)
6224
6225 This function returns the best acceptable minimal size for the
6226 window, if applicable. For example, for a static text control, it will
6227 be the minimal size such that the control label is not truncated. For
6228 windows containing subwindows (suzh aswx.Panel), the size returned by
6229 this function will be the same as the size the window would have had
6230 after calling Fit.
6231 """
6232 return _core_.Window_GetBestSizeTuple(*args, **kwargs)
6233
6234 def InvalidateBestSize(*args, **kwargs):
6235 """
6236 InvalidateBestSize(self)
6237
6238 Reset the cached best size value so it will be recalculated the next
6239 time it is needed.
6240 """
6241 return _core_.Window_InvalidateBestSize(*args, **kwargs)
6242
6243 def GetBestFittingSize(*args, **kwargs):
6244 """
6245 GetBestFittingSize(self) -> Size
6246
6247 This function will merge the window's best size into the window's
6248 minimum size, giving priority to the min size components, and returns
6249 the results.
6250
6251 """
6252 return _core_.Window_GetBestFittingSize(*args, **kwargs)
6253
6254 def GetAdjustedBestSize(*args, **kwargs):
6255 """
6256 GetAdjustedBestSize(self) -> Size
6257
6258 This method is similar to GetBestSize, except in one
6259 thing. GetBestSize should return the minimum untruncated size of the
6260 window, while this method will return the largest of BestSize and any
6261 user specified minimum size. ie. it is the minimum size the window
6262 should currently be drawn at, not the minimal size it can possibly
6263 tolerate.
6264 """
6265 return _core_.Window_GetAdjustedBestSize(*args, **kwargs)
6266
6267 def Center(*args, **kwargs):
6268 """
6269 Center(self, int direction=BOTH)
6270
6271 Centers the window. The parameter specifies the direction for
6272 cetering, and may be wx.HORIZONTAL, wx.VERTICAL or wx.BOTH. It may
6273 also include wx.CENTER_ON_SCREEN flag if you want to center the window
6274 on the entire screen and not on its parent window. If it is a
6275 top-level window and has no parent then it will always be centered
6276 relative to the screen.
6277 """
6278 return _core_.Window_Center(*args, **kwargs)
6279
6280 Centre = Center
6281 def CenterOnScreen(*args, **kwargs):
6282 """
6283 CenterOnScreen(self, int dir=BOTH)
6284
6285 Center on screen (only works for top level windows)
6286 """
6287 return _core_.Window_CenterOnScreen(*args, **kwargs)
6288
6289 CentreOnScreen = CenterOnScreen
6290 def CenterOnParent(*args, **kwargs):
6291 """
6292 CenterOnParent(self, int dir=BOTH)
6293
6294 Center with respect to the the parent window
6295 """
6296 return _core_.Window_CenterOnParent(*args, **kwargs)
6297
6298 CentreOnParent = CenterOnParent
6299 def Fit(*args, **kwargs):
6300 """
6301 Fit(self)
6302
6303 Sizes the window so that it fits around its subwindows. This function
6304 won't do anything if there are no subwindows and will only really work
6305 correctly if sizers are used for the subwindows layout. Also, if the
6306 window has exactly one subwindow it is better (faster and the result
6307 is more precise as Fit adds some margin to account for fuzziness of
6308 its calculations) to call window.SetClientSize(child.GetSize())
6309 instead of calling Fit.
6310 """
6311 return _core_.Window_Fit(*args, **kwargs)
6312
6313 def FitInside(*args, **kwargs):
6314 """
6315 FitInside(self)
6316
6317 Similar to Fit, but sizes the interior (virtual) size of a
6318 window. Mainly useful with scrolled windows to reset scrollbars after
6319 sizing changes that do not trigger a size event, and/or scrolled
6320 windows without an interior sizer. This function similarly won't do
6321 anything if there are no subwindows.
6322 """
6323 return _core_.Window_FitInside(*args, **kwargs)
6324
6325 def SetSizeHints(*args, **kwargs):
6326 """
6327 SetSizeHints(self, int minW, int minH, int maxW=-1, int maxH=-1, int incW=-1,
6328 int incH=-1)
6329
6330 Allows specification of minimum and maximum window sizes, and window
6331 size increments. If a pair of values is not set (or set to -1), the
6332 default values will be used. If this function is called, the user
6333 will not be able to size the window outside the given bounds (if it is
6334 a top-level window.) Sizers will also inspect the minimum window size
6335 and will use that value if set when calculating layout.
6336
6337 The resizing increments are only significant under Motif or Xt.
6338 """
6339 return _core_.Window_SetSizeHints(*args, **kwargs)
6340
6341 def SetSizeHintsSz(*args, **kwargs):
6342 """
6343 SetSizeHintsSz(self, Size minSize, Size maxSize=DefaultSize, Size incSize=DefaultSize)
6344
6345 Allows specification of minimum and maximum window sizes, and window
6346 size increments. If a pair of values is not set (or set to -1), the
6347 default values will be used. If this function is called, the user
6348 will not be able to size the window outside the given bounds (if it is
6349 a top-level window.) Sizers will also inspect the minimum window size
6350 and will use that value if set when calculating layout.
6351
6352 The resizing increments are only significant under Motif or Xt.
6353 """
6354 return _core_.Window_SetSizeHintsSz(*args, **kwargs)
6355
6356 def SetVirtualSizeHints(*args, **kwargs):
6357 """
6358 SetVirtualSizeHints(self, int minW, int minH, int maxW=-1, int maxH=-1)
6359
6360 Allows specification of minimum and maximum virtual window sizes. If a
6361 pair of values is not set (or set to -1), the default values will be
6362 used. If this function is called, the user will not be able to size
6363 the virtual area of the window outside the given bounds.
6364 """
6365 return _core_.Window_SetVirtualSizeHints(*args, **kwargs)
6366
6367 def SetVirtualSizeHintsSz(*args, **kwargs):
6368 """
6369 SetVirtualSizeHintsSz(self, Size minSize, Size maxSize=DefaultSize)
6370
6371 Allows specification of minimum and maximum virtual window sizes. If a
6372 pair of values is not set (or set to -1), the default values will be
6373 used. If this function is called, the user will not be able to size
6374 the virtual area of the window outside the given bounds.
6375 """
6376 return _core_.Window_SetVirtualSizeHintsSz(*args, **kwargs)
6377
6378 def GetMaxSize(*args, **kwargs):
6379 """GetMaxSize(self) -> Size"""
6380 return _core_.Window_GetMaxSize(*args, **kwargs)
6381
6382 def GetMinSize(*args, **kwargs):
6383 """GetMinSize(self) -> Size"""
6384 return _core_.Window_GetMinSize(*args, **kwargs)
6385
6386 def SetMinSize(*args, **kwargs):
6387 """
6388 SetMinSize(self, Size minSize)
6389
6390 A more convenient method than `SetSizeHints` for setting just the
6391 min size.
6392 """
6393 return _core_.Window_SetMinSize(*args, **kwargs)
6394
6395 def SetMaxSize(*args, **kwargs):
6396 """
6397 SetMaxSize(self, Size maxSize)
6398
6399 A more convenient method than `SetSizeHints` for setting just the
6400 max size.
6401 """
6402 return _core_.Window_SetMaxSize(*args, **kwargs)
6403
6404 def GetMinWidth(*args, **kwargs):
6405 """GetMinWidth(self) -> int"""
6406 return _core_.Window_GetMinWidth(*args, **kwargs)
6407
6408 def GetMinHeight(*args, **kwargs):
6409 """GetMinHeight(self) -> int"""
6410 return _core_.Window_GetMinHeight(*args, **kwargs)
6411
6412 def GetMaxWidth(*args, **kwargs):
6413 """GetMaxWidth(self) -> int"""
6414 return _core_.Window_GetMaxWidth(*args, **kwargs)
6415
6416 def GetMaxHeight(*args, **kwargs):
6417 """GetMaxHeight(self) -> int"""
6418 return _core_.Window_GetMaxHeight(*args, **kwargs)
6419
6420 def SetVirtualSize(*args, **kwargs):
6421 """
6422 SetVirtualSize(self, Size size)
6423
6424 Set the the virtual size of a window in pixels. For most windows this
6425 is just the client area of the window, but for some like scrolled
6426 windows it is more or less independent of the screen window size.
6427 """
6428 return _core_.Window_SetVirtualSize(*args, **kwargs)
6429
6430 def SetVirtualSizeWH(*args, **kwargs):
6431 """
6432 SetVirtualSizeWH(self, int w, int h)
6433
6434 Set the the virtual size of a window in pixels. For most windows this
6435 is just the client area of the window, but for some like scrolled
6436 windows it is more or less independent of the screen window size.
6437 """
6438 return _core_.Window_SetVirtualSizeWH(*args, **kwargs)
6439
6440 def GetVirtualSize(*args, **kwargs):
6441 """
6442 GetVirtualSize(self) -> Size
6443
6444 Get the the virtual size of the window in pixels. For most windows
6445 this is just the client area of the window, but for some like scrolled
6446 windows it is more or less independent of the screen window size.
6447 """
6448 return _core_.Window_GetVirtualSize(*args, **kwargs)
6449
6450 def GetVirtualSizeTuple(*args, **kwargs):
6451 """
6452 GetVirtualSizeTuple() -> (width, height)
6453
6454 Get the the virtual size of the window in pixels. For most windows
6455 this is just the client area of the window, but for some like scrolled
6456 windows it is more or less independent of the screen window size.
6457 """
6458 return _core_.Window_GetVirtualSizeTuple(*args, **kwargs)
6459
6460 def GetBestVirtualSize(*args, **kwargs):
6461 """
6462 GetBestVirtualSize(self) -> Size
6463
6464 Return the largest of ClientSize and BestSize (as determined by a
6465 sizer, interior children, or other means)
6466 """
6467 return _core_.Window_GetBestVirtualSize(*args, **kwargs)
6468
6469 def Show(*args, **kwargs):
6470 """
6471 Show(self, bool show=True) -> bool
6472
6473 Shows or hides the window. You may need to call Raise for a top level
6474 window if you want to bring it to top, although this is not needed if
6475 Show is called immediately after the frame creation. Returns True if
6476 the window has been shown or hidden or False if nothing was done
6477 because it already was in the requested state.
6478 """
6479 return _core_.Window_Show(*args, **kwargs)
6480
6481 def Hide(*args, **kwargs):
6482 """
6483 Hide(self) -> bool
6484
6485 Equivalent to calling Show(False).
6486 """
6487 return _core_.Window_Hide(*args, **kwargs)
6488
6489 def Enable(*args, **kwargs):
6490 """
6491 Enable(self, bool enable=True) -> bool
6492
6493 Enable or disable the window for user input. Note that when a parent
6494 window is disabled, all of its children are disabled as well and they
6495 are reenabled again when the parent is. Returns true if the window
6496 has been enabled or disabled, false if nothing was done, i.e. if the
6497 window had already been in the specified state.
6498 """
6499 return _core_.Window_Enable(*args, **kwargs)
6500
6501 def Disable(*args, **kwargs):
6502 """
6503 Disable(self) -> bool
6504
6505 Disables the window, same as Enable(false).
6506 """
6507 return _core_.Window_Disable(*args, **kwargs)
6508
6509 def IsShown(*args, **kwargs):
6510 """
6511 IsShown(self) -> bool
6512
6513 Returns true if the window is shown, false if it has been hidden.
6514 """
6515 return _core_.Window_IsShown(*args, **kwargs)
6516
6517 def IsEnabled(*args, **kwargs):
6518 """
6519 IsEnabled(self) -> bool
6520
6521 Returns true if the window is enabled for input, false otherwise.
6522 """
6523 return _core_.Window_IsEnabled(*args, **kwargs)
6524
6525 def SetWindowStyleFlag(*args, **kwargs):
6526 """
6527 SetWindowStyleFlag(self, long style)
6528
6529 Sets the style of the window. Please note that some styles cannot be
6530 changed after the window creation and that Refresh() might need to be
6531 called after changing the others for the change to take place
6532 immediately.
6533 """
6534 return _core_.Window_SetWindowStyleFlag(*args, **kwargs)
6535
6536 def GetWindowStyleFlag(*args, **kwargs):
6537 """
6538 GetWindowStyleFlag(self) -> long
6539
6540 Gets the window style that was passed to the constructor or Create
6541 method.
6542 """
6543 return _core_.Window_GetWindowStyleFlag(*args, **kwargs)
6544
6545 SetWindowStyle = SetWindowStyleFlag; GetWindowStyle = GetWindowStyleFlag
6546 def HasFlag(*args, **kwargs):
6547 """
6548 HasFlag(self, int flag) -> bool
6549
6550 Test if the given style is set for this window.
6551 """
6552 return _core_.Window_HasFlag(*args, **kwargs)
6553
6554 def IsRetained(*args, **kwargs):
6555 """
6556 IsRetained(self) -> bool
6557
6558 Returns true if the window is retained, false otherwise. Retained
6559 windows are only available on X platforms.
6560 """
6561 return _core_.Window_IsRetained(*args, **kwargs)
6562
6563 def SetExtraStyle(*args, **kwargs):
6564 """
6565 SetExtraStyle(self, long exStyle)
6566
6567 Sets the extra style bits for the window. Extra styles are the less
6568 often used style bits which can't be set with the constructor or with
6569 SetWindowStyleFlag()
6570 """
6571 return _core_.Window_SetExtraStyle(*args, **kwargs)
6572
6573 def GetExtraStyle(*args, **kwargs):
6574 """
6575 GetExtraStyle(self) -> long
6576
6577 Returns the extra style bits for the window.
6578 """
6579 return _core_.Window_GetExtraStyle(*args, **kwargs)
6580
6581 def MakeModal(*args, **kwargs):
6582 """
6583 MakeModal(self, bool modal=True)
6584
6585 Disables all other windows in the application so that the user can
6586 only interact with this window. Passing False will reverse this
6587 effect.
6588 """
6589 return _core_.Window_MakeModal(*args, **kwargs)
6590
6591 def SetThemeEnabled(*args, **kwargs):
6592 """
6593 SetThemeEnabled(self, bool enableTheme)
6594
6595 This function tells a window if it should use the system's "theme"
6596 code to draw the windows' background instead if its own background
6597 drawing code. This will only have an effect on platforms that support
6598 the notion of themes in user defined windows. One such platform is
6599 GTK+ where windows can have (very colourful) backgrounds defined by a
6600 user's selected theme.
6601
6602 Dialogs, notebook pages and the status bar have this flag set to true
6603 by default so that the default look and feel is simulated best.
6604 """
6605 return _core_.Window_SetThemeEnabled(*args, **kwargs)
6606
6607 def GetThemeEnabled(*args, **kwargs):
6608 """
6609 GetThemeEnabled(self) -> bool
6610
6611 Return the themeEnabled flag.
6612 """
6613 return _core_.Window_GetThemeEnabled(*args, **kwargs)
6614
6615 def SetFocus(*args, **kwargs):
6616 """
6617 SetFocus(self)
6618
6619 Set's the focus to this window, allowing it to receive keyboard input.
6620 """
6621 return _core_.Window_SetFocus(*args, **kwargs)
6622
6623 def SetFocusFromKbd(*args, **kwargs):
6624 """
6625 SetFocusFromKbd(self)
6626
6627 Set focus to this window as the result of a keyboard action. Normally
6628 only called internally.
6629 """
6630 return _core_.Window_SetFocusFromKbd(*args, **kwargs)
6631
6632 def FindFocus(*args, **kwargs):
6633 """
6634 FindFocus() -> Window
6635
6636 Returns the window or control that currently has the keyboard focus,
6637 or None.
6638 """
6639 return _core_.Window_FindFocus(*args, **kwargs)
6640
6641 FindFocus = staticmethod(FindFocus)
6642 def AcceptsFocus(*args, **kwargs):
6643 """
6644 AcceptsFocus(self) -> bool
6645
6646 Can this window have focus?
6647 """
6648 return _core_.Window_AcceptsFocus(*args, **kwargs)
6649
6650 def AcceptsFocusFromKeyboard(*args, **kwargs):
6651 """
6652 AcceptsFocusFromKeyboard(self) -> bool
6653
6654 Can this window be given focus by keyboard navigation? if not, the
6655 only way to give it focus (provided it accepts it at all) is to click
6656 it.
6657 """
6658 return _core_.Window_AcceptsFocusFromKeyboard(*args, **kwargs)
6659
6660 def GetDefaultItem(*args, **kwargs):
6661 """
6662 GetDefaultItem(self) -> Window
6663
6664 Get the default child of this parent, i.e. the one which is activated
6665 by pressing <Enter> such as the OK button on a wx.Dialog.
6666 """
6667 return _core_.Window_GetDefaultItem(*args, **kwargs)
6668
6669 def SetDefaultItem(*args, **kwargs):
6670 """
6671 SetDefaultItem(self, Window child) -> Window
6672
6673 Set this child as default, return the old default.
6674 """
6675 return _core_.Window_SetDefaultItem(*args, **kwargs)
6676
6677 def SetTmpDefaultItem(*args, **kwargs):
6678 """
6679 SetTmpDefaultItem(self, Window win)
6680
6681 Set this child as temporary default
6682 """
6683 return _core_.Window_SetTmpDefaultItem(*args, **kwargs)
6684
6685 def Navigate(*args, **kwargs):
6686 """
6687 Navigate(self, int flags=NavigationKeyEvent.IsForward) -> bool
6688
6689 Does keyboard navigation from this window to another, by sending a
6690 `wx.NavigationKeyEvent`.
6691 """
6692 return _core_.Window_Navigate(*args, **kwargs)
6693
6694 def MoveAfterInTabOrder(*args, **kwargs):
6695 """
6696 MoveAfterInTabOrder(self, Window win)
6697
6698 Moves this window in the tab navigation order after the specified
6699 sibling window. This means that when the user presses the TAB key on
6700 that other window, the focus switches to this window.
6701
6702 The default tab order is the same as creation order. This function
6703 and `MoveBeforeInTabOrder` allow to change it after creating all the
6704 windows.
6705
6706 """
6707 return _core_.Window_MoveAfterInTabOrder(*args, **kwargs)
6708
6709 def MoveBeforeInTabOrder(*args, **kwargs):
6710 """
6711 MoveBeforeInTabOrder(self, Window win)
6712
6713 Same as `MoveAfterInTabOrder` except that it inserts this window just
6714 before win instead of putting it right after it.
6715 """
6716 return _core_.Window_MoveBeforeInTabOrder(*args, **kwargs)
6717
6718 def GetChildren(*args, **kwargs):
6719 """
6720 GetChildren(self) -> PyObject
6721
6722 Returns a list of the window's children. NOTE: Currently this is a
6723 copy of the child window list maintained by the window, so the return
6724 value of this function is only valid as long as the window's children
6725 do not change.
6726 """
6727 return _core_.Window_GetChildren(*args, **kwargs)
6728
6729 def GetParent(*args, **kwargs):
6730 """
6731 GetParent(self) -> Window
6732
6733 Returns the parent window of this window, or None if there isn't one.
6734 """
6735 return _core_.Window_GetParent(*args, **kwargs)
6736
6737 def GetGrandParent(*args, **kwargs):
6738 """
6739 GetGrandParent(self) -> Window
6740
6741 Returns the parent of the parent of this window, or None if there
6742 isn't one.
6743 """
6744 return _core_.Window_GetGrandParent(*args, **kwargs)
6745
6746 def IsTopLevel(*args, **kwargs):
6747 """
6748 IsTopLevel(self) -> bool
6749
6750 Returns true if the given window is a top-level one. Currently all
6751 frames and dialogs are always considered to be top-level windows (even
6752 if they have a parent window).
6753 """
6754 return _core_.Window_IsTopLevel(*args, **kwargs)
6755
6756 def Reparent(*args, **kwargs):
6757 """
6758 Reparent(self, Window newParent) -> bool
6759
6760 Reparents the window, i.e the window will be removed from its current
6761 parent window (e.g. a non-standard toolbar in a wxFrame) and then
6762 re-inserted into another. Available on Windows and GTK. Returns True
6763 if the parent was changed, False otherwise (error or newParent ==
6764 oldParent)
6765 """
6766 return _core_.Window_Reparent(*args, **kwargs)
6767
6768 def AddChild(*args, **kwargs):
6769 """
6770 AddChild(self, Window child)
6771
6772 Adds a child window. This is called automatically by window creation
6773 functions so should not be required by the application programmer.
6774 """
6775 return _core_.Window_AddChild(*args, **kwargs)
6776
6777 def RemoveChild(*args, **kwargs):
6778 """
6779 RemoveChild(self, Window child)
6780
6781 Removes a child window. This is called automatically by window
6782 deletion functions so should not be required by the application
6783 programmer.
6784 """
6785 return _core_.Window_RemoveChild(*args, **kwargs)
6786
6787 def FindWindowById(*args, **kwargs):
6788 """
6789 FindWindowById(self, long winid) -> Window
6790
6791 Find a chld of this window by window ID
6792 """
6793 return _core_.Window_FindWindowById(*args, **kwargs)
6794
6795 def FindWindowByName(*args, **kwargs):
6796 """
6797 FindWindowByName(self, String name) -> Window
6798
6799 Find a child of this window by name
6800 """
6801 return _core_.Window_FindWindowByName(*args, **kwargs)
6802
6803 def GetEventHandler(*args, **kwargs):
6804 """
6805 GetEventHandler(self) -> EvtHandler
6806
6807 Returns the event handler for this window. By default, the window is
6808 its own event handler.
6809 """
6810 return _core_.Window_GetEventHandler(*args, **kwargs)
6811
6812 def SetEventHandler(*args, **kwargs):
6813 """
6814 SetEventHandler(self, EvtHandler handler)
6815
6816 Sets the event handler for this window. An event handler is an object
6817 that is capable of processing the events sent to a window. By default,
6818 the window is its own event handler, but an application may wish to
6819 substitute another, for example to allow central implementation of
6820 event-handling for a variety of different window classes.
6821
6822 It is usually better to use `wx.Window.PushEventHandler` since this sets
6823 up a chain of event handlers, where an event not handled by one event
6824 handler is handed to the next one in the chain.
6825 """
6826 return _core_.Window_SetEventHandler(*args, **kwargs)
6827
6828 def PushEventHandler(*args, **kwargs):
6829 """
6830 PushEventHandler(self, EvtHandler handler)
6831
6832 Pushes this event handler onto the event handler stack for the window.
6833 An event handler is an object that is capable of processing the events
6834 sent to a window. By default, the window is its own event handler, but
6835 an application may wish to substitute another, for example to allow
6836 central implementation of event-handling for a variety of different
6837 window classes.
6838
6839 wx.Window.PushEventHandler allows an application to set up a chain of
6840 event handlers, where an event not handled by one event handler is
6841 handed to the next one in the chain. Use `wx.Window.PopEventHandler` to
6842 remove the event handler.
6843 """
6844 return _core_.Window_PushEventHandler(*args, **kwargs)
6845
6846 def PopEventHandler(*args, **kwargs):
6847 """
6848 PopEventHandler(self, bool deleteHandler=False) -> EvtHandler
6849
6850 Removes and returns the top-most event handler on the event handler
6851 stack. If deleteHandler is True then the wx.EvtHandler object will be
6852 destroyed after it is popped.
6853 """
6854 return _core_.Window_PopEventHandler(*args, **kwargs)
6855
6856 def RemoveEventHandler(*args, **kwargs):
6857 """
6858 RemoveEventHandler(self, EvtHandler handler) -> bool
6859
6860 Find the given handler in the event handler chain and remove (but not
6861 delete) it from the event handler chain, return True if it was found
6862 and False otherwise (this also results in an assert failure so this
6863 function should only be called when the handler is supposed to be
6864 there.)
6865 """
6866 return _core_.Window_RemoveEventHandler(*args, **kwargs)
6867
6868 def SetValidator(*args, **kwargs):
6869 """
6870 SetValidator(self, Validator validator)
6871
6872 Deletes the current validator (if any) and sets the window validator,
6873 having called wx.Validator.Clone to create a new validator of this
6874 type.
6875 """
6876 return _core_.Window_SetValidator(*args, **kwargs)
6877
6878 def GetValidator(*args, **kwargs):
6879 """
6880 GetValidator(self) -> Validator
6881
6882 Returns a pointer to the current validator for the window, or None if
6883 there is none.
6884 """
6885 return _core_.Window_GetValidator(*args, **kwargs)
6886
6887 def Validate(*args, **kwargs):
6888 """
6889 Validate(self) -> bool
6890
6891 Validates the current values of the child controls using their
6892 validators. If the window has wx.WS_EX_VALIDATE_RECURSIVELY extra
6893 style flag set, the method will also call Validate() of all child
6894 windows. Returns false if any of the validations failed.
6895 """
6896 return _core_.Window_Validate(*args, **kwargs)
6897
6898 def TransferDataToWindow(*args, **kwargs):
6899 """
6900 TransferDataToWindow(self) -> bool
6901
6902 Transfers values to child controls from data areas specified by their
6903 validators. If the window has wx.WS_EX_VALIDATE_RECURSIVELY extra
6904 style flag set, the method will also call TransferDataToWindow() of
6905 all child windows.
6906 """
6907 return _core_.Window_TransferDataToWindow(*args, **kwargs)
6908
6909 def TransferDataFromWindow(*args, **kwargs):
6910 """
6911 TransferDataFromWindow(self) -> bool
6912
6913 Transfers values from child controls to data areas specified by their
6914 validators. Returns false if a transfer failed. If the window has
6915 wx.WS_EX_VALIDATE_RECURSIVELY extra style flag set, the method will
6916 also call TransferDataFromWindow() of all child windows.
6917 """
6918 return _core_.Window_TransferDataFromWindow(*args, **kwargs)
6919
6920 def InitDialog(*args, **kwargs):
6921 """
6922 InitDialog(self)
6923
6924 Sends an EVT_INIT_DIALOG event, whose handler usually transfers data
6925 to the dialog via validators.
6926 """
6927 return _core_.Window_InitDialog(*args, **kwargs)
6928
6929 def SetAcceleratorTable(*args, **kwargs):
6930 """
6931 SetAcceleratorTable(self, AcceleratorTable accel)
6932
6933 Sets the accelerator table for this window.
6934 """
6935 return _core_.Window_SetAcceleratorTable(*args, **kwargs)
6936
6937 def GetAcceleratorTable(*args, **kwargs):
6938 """
6939 GetAcceleratorTable(self) -> AcceleratorTable
6940
6941 Gets the accelerator table for this window.
6942 """
6943 return _core_.Window_GetAcceleratorTable(*args, **kwargs)
6944
6945 def RegisterHotKey(*args, **kwargs):
6946 """
6947 RegisterHotKey(self, int hotkeyId, int modifiers, int keycode) -> bool
6948
6949 Registers a system wide hotkey. Every time the user presses the hotkey
6950 registered here, this window will receive a hotkey event. It will
6951 receive the event even if the application is in the background and
6952 does not have the input focus because the user is working with some
6953 other application. To bind an event handler function to this hotkey
6954 use EVT_HOTKEY with an id equal to hotkeyId. Returns True if the
6955 hotkey was registered successfully.
6956 """
6957 return _core_.Window_RegisterHotKey(*args, **kwargs)
6958
6959 def UnregisterHotKey(*args, **kwargs):
6960 """
6961 UnregisterHotKey(self, int hotkeyId) -> bool
6962
6963 Unregisters a system wide hotkey.
6964 """
6965 return _core_.Window_UnregisterHotKey(*args, **kwargs)
6966
6967 def ConvertDialogPointToPixels(*args, **kwargs):
6968 """
6969 ConvertDialogPointToPixels(self, Point pt) -> Point
6970
6971 Converts a point or size from dialog units to pixels. Dialog units
6972 are used for maintaining a dialog's proportions even if the font
6973 changes. For the x dimension, the dialog units are multiplied by the
6974 average character width and then divided by 4. For the y dimension,
6975 the dialog units are multiplied by the average character height and
6976 then divided by 8.
6977 """
6978 return _core_.Window_ConvertDialogPointToPixels(*args, **kwargs)
6979
6980 def ConvertDialogSizeToPixels(*args, **kwargs):
6981 """
6982 ConvertDialogSizeToPixels(self, Size sz) -> Size
6983
6984 Converts a point or size from dialog units to pixels. Dialog units
6985 are used for maintaining a dialog's proportions even if the font
6986 changes. For the x dimension, the dialog units are multiplied by the
6987 average character width and then divided by 4. For the y dimension,
6988 the dialog units are multiplied by the average character height and
6989 then divided by 8.
6990 """
6991 return _core_.Window_ConvertDialogSizeToPixels(*args, **kwargs)
6992
6993 def DLG_PNT(*args, **kwargs):
6994 """
6995 DLG_PNT(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_DLG_PNT(*args, **kwargs)
7005
7006 def DLG_SZE(*args, **kwargs):
7007 """
7008 DLG_SZE(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_DLG_SZE(*args, **kwargs)
7018
7019 def ConvertPixelPointToDialog(*args, **kwargs):
7020 """ConvertPixelPointToDialog(self, Point pt) -> Point"""
7021 return _core_.Window_ConvertPixelPointToDialog(*args, **kwargs)
7022
7023 def ConvertPixelSizeToDialog(*args, **kwargs):
7024 """ConvertPixelSizeToDialog(self, Size sz) -> Size"""
7025 return _core_.Window_ConvertPixelSizeToDialog(*args, **kwargs)
7026
7027 def WarpPointer(*args, **kwargs):
7028 """
7029 WarpPointer(self, int x, int y)
7030
7031 Moves the pointer to the given position on the window.
7032
7033 NOTE: This function is not supported under Mac because Apple Human
7034 Interface Guidelines forbid moving the mouse cursor programmatically.
7035 """
7036 return _core_.Window_WarpPointer(*args, **kwargs)
7037
7038 def CaptureMouse(*args, **kwargs):
7039 """
7040 CaptureMouse(self)
7041
7042 Directs all mouse input to this window. Call wx.Window.ReleaseMouse to
7043 release the capture.
7044
7045 Note that wxWindows maintains the stack of windows having captured the
7046 mouse and when the mouse is released the capture returns to the window
7047 which had had captured it previously and it is only really released if
7048 there were no previous window. In particular, this means that you must
7049 release the mouse as many times as you capture it.
7050 """
7051 return _core_.Window_CaptureMouse(*args, **kwargs)
7052
7053 def ReleaseMouse(*args, **kwargs):
7054 """
7055 ReleaseMouse(self)
7056
7057 Releases mouse input captured with wx.Window.CaptureMouse.
7058 """
7059 return _core_.Window_ReleaseMouse(*args, **kwargs)
7060
7061 def GetCapture(*args, **kwargs):
7062 """
7063 GetCapture() -> Window
7064
7065 Returns the window which currently captures the mouse or None
7066 """
7067 return _core_.Window_GetCapture(*args, **kwargs)
7068
7069 GetCapture = staticmethod(GetCapture)
7070 def HasCapture(*args, **kwargs):
7071 """
7072 HasCapture(self) -> bool
7073
7074 Returns true if this window has the current mouse capture.
7075 """
7076 return _core_.Window_HasCapture(*args, **kwargs)
7077
7078 def Refresh(*args, **kwargs):
7079 """
7080 Refresh(self, bool eraseBackground=True, Rect rect=None)
7081
7082 Mark the specified rectangle (or the whole window) as "dirty" so it
7083 will be repainted. Causes an EVT_PAINT event to be generated and sent
7084 to the window.
7085 """
7086 return _core_.Window_Refresh(*args, **kwargs)
7087
7088 def RefreshRect(*args, **kwargs):
7089 """
7090 RefreshRect(self, Rect rect)
7091
7092 Redraws the contents of the given rectangle: the area inside it will
7093 be repainted. This is the same as Refresh but has a nicer syntax.
7094 """
7095 return _core_.Window_RefreshRect(*args, **kwargs)
7096
7097 def Update(*args, **kwargs):
7098 """
7099 Update(self)
7100
7101 Calling this method immediately repaints the invalidated area of the
7102 window instead of waiting for the EVT_PAINT event to happen, (normally
7103 this would usually only happen when the flow of control returns to the
7104 event loop.) Notice that this function doesn't refresh the window and
7105 does nothing if the window has been already repainted. Use Refresh
7106 first if you want to immediately redraw the window (or some portion of
7107 it) unconditionally.
7108 """
7109 return _core_.Window_Update(*args, **kwargs)
7110
7111 def ClearBackground(*args, **kwargs):
7112 """
7113 ClearBackground(self)
7114
7115 Clears the window by filling it with the current background
7116 colour. Does not cause an erase background event to be generated.
7117 """
7118 return _core_.Window_ClearBackground(*args, **kwargs)
7119
7120 def Freeze(*args, **kwargs):
7121 """
7122 Freeze(self)
7123
7124 Freezes the window or, in other words, prevents any updates from
7125 taking place on screen, the window is not redrawn at all. Thaw must be
7126 called to reenable window redrawing. Calls to Freeze/Thaw may be
7127 nested, with the actual Thaw being delayed until all the nesting has
7128 been undone.
7129
7130 This method is useful for visual appearance optimization (for example,
7131 it is a good idea to use it before inserting large amount of text into
7132 a wxTextCtrl under wxGTK) but is not implemented on all platforms nor
7133 for all controls so it is mostly just a hint to wxWindows and not a
7134 mandatory directive.
7135 """
7136 return _core_.Window_Freeze(*args, **kwargs)
7137
7138 def Thaw(*args, **kwargs):
7139 """
7140 Thaw(self)
7141
7142 Reenables window updating after a previous call to Freeze. Calls to
7143 Freeze/Thaw may be nested, so Thaw must be called the same number of
7144 times that Freeze was before the window will be updated.
7145 """
7146 return _core_.Window_Thaw(*args, **kwargs)
7147
7148 def PrepareDC(*args, **kwargs):
7149 """
7150 PrepareDC(self, DC dc)
7151
7152 Call this function to prepare the device context for drawing a
7153 scrolled image. It sets the device origin according to the current
7154 scroll position.
7155 """
7156 return _core_.Window_PrepareDC(*args, **kwargs)
7157
7158 def GetUpdateRegion(*args, **kwargs):
7159 """
7160 GetUpdateRegion(self) -> Region
7161
7162 Returns the region specifying which parts of the window have been
7163 damaged. Should only be called within an EVT_PAINT handler.
7164 """
7165 return _core_.Window_GetUpdateRegion(*args, **kwargs)
7166
7167 def GetUpdateClientRect(*args, **kwargs):
7168 """
7169 GetUpdateClientRect(self) -> Rect
7170
7171 Get the update rectangle region bounding box in client coords.
7172 """
7173 return _core_.Window_GetUpdateClientRect(*args, **kwargs)
7174
7175 def IsExposed(*args, **kwargs):
7176 """
7177 IsExposed(self, int x, int y, int w=1, int h=1) -> bool
7178
7179 Returns true if the given point or rectangle area has been exposed
7180 since the last repaint. Call this in an paint event handler to
7181 optimize redrawing by only redrawing those areas, which have been
7182 exposed.
7183 """
7184 return _core_.Window_IsExposed(*args, **kwargs)
7185
7186 def IsExposedPoint(*args, **kwargs):
7187 """
7188 IsExposedPoint(self, Point pt) -> bool
7189
7190 Returns true if the given point or rectangle area has been exposed
7191 since the last repaint. Call this in an paint event handler to
7192 optimize redrawing by only redrawing those areas, which have been
7193 exposed.
7194 """
7195 return _core_.Window_IsExposedPoint(*args, **kwargs)
7196
7197 def IsExposedRect(*args, **kwargs):
7198 """
7199 IsExposedRect(self, Rect rect) -> bool
7200
7201 Returns true if the given point or rectangle area has been exposed
7202 since the last repaint. Call this in an paint event handler to
7203 optimize redrawing by only redrawing those areas, which have been
7204 exposed.
7205 """
7206 return _core_.Window_IsExposedRect(*args, **kwargs)
7207
7208 def GetDefaultAttributes(*args, **kwargs):
7209 """
7210 GetDefaultAttributes(self) -> VisualAttributes
7211
7212 Get the default attributes for an instance of this class. This is
7213 useful if you want to use the same font or colour in your own control
7214 as in a standard control -- which is a much better idea than hard
7215 coding specific colours or fonts which might look completely out of
7216 place on the user's system, especially if it uses themes.
7217 """
7218 return _core_.Window_GetDefaultAttributes(*args, **kwargs)
7219
7220 def GetClassDefaultAttributes(*args, **kwargs):
7221 """
7222 GetClassDefaultAttributes(int variant=WINDOW_VARIANT_NORMAL) -> VisualAttributes
7223
7224 Get the default attributes for this class. This is useful if you want
7225 to use the same font or colour in your own control as in a standard
7226 control -- which is a much better idea than hard coding specific
7227 colours or fonts which might look completely out of place on the
7228 user's system, especially if it uses themes.
7229
7230 The variant parameter is only relevant under Mac currently and is
7231 ignore under other platforms. Under Mac, it will change the size of
7232 the returned font. See `wx.Window.SetWindowVariant` for more about
7233 this.
7234 """
7235 return _core_.Window_GetClassDefaultAttributes(*args, **kwargs)
7236
7237 GetClassDefaultAttributes = staticmethod(GetClassDefaultAttributes)
7238 def SetBackgroundColour(*args, **kwargs):
7239 """
7240 SetBackgroundColour(self, Colour colour) -> bool
7241
7242 Sets the background colour of the window. Returns True if the colour
7243 was changed. The background colour is usually painted by the default
7244 EVT_ERASE_BACKGROUND event handler function under Windows and
7245 automatically under GTK. Using `wx.NullColour` will reset the window
7246 to the default background colour.
7247
7248 Note that setting the background colour may not cause an immediate
7249 refresh, so you may wish to call `ClearBackground` or `Refresh` after
7250 calling this function.
7251
7252 Using this function will disable attempts to use themes for this
7253 window, if the system supports them. Use with care since usually the
7254 themes represent the appearance chosen by the user to be used for all
7255 applications on the system.
7256 """
7257 return _core_.Window_SetBackgroundColour(*args, **kwargs)
7258
7259 def SetOwnBackgroundColour(*args, **kwargs):
7260 """SetOwnBackgroundColour(self, Colour colour)"""
7261 return _core_.Window_SetOwnBackgroundColour(*args, **kwargs)
7262
7263 def SetForegroundColour(*args, **kwargs):
7264 """
7265 SetForegroundColour(self, Colour colour) -> bool
7266
7267 Sets the foreground colour of the window. Returns True is the colour
7268 was changed. The interpretation of foreground colour is dependent on
7269 the window class; it may be the text colour or other colour, or it may
7270 not be used at all.
7271 """
7272 return _core_.Window_SetForegroundColour(*args, **kwargs)
7273
7274 def SetOwnForegroundColour(*args, **kwargs):
7275 """SetOwnForegroundColour(self, Colour colour)"""
7276 return _core_.Window_SetOwnForegroundColour(*args, **kwargs)
7277
7278 def GetBackgroundColour(*args, **kwargs):
7279 """
7280 GetBackgroundColour(self) -> Colour
7281
7282 Returns the background colour of the window.
7283 """
7284 return _core_.Window_GetBackgroundColour(*args, **kwargs)
7285
7286 def GetForegroundColour(*args, **kwargs):
7287 """
7288 GetForegroundColour(self) -> Colour
7289
7290 Returns the foreground colour of the window. The interpretation of
7291 foreground colour is dependent on the window class; it may be the text
7292 colour or other colour, or it may not be used at all.
7293 """
7294 return _core_.Window_GetForegroundColour(*args, **kwargs)
7295
7296 def SetBackgroundStyle(*args, **kwargs):
7297 """
7298 SetBackgroundStyle(self, int style) -> bool
7299
7300 Returns the background style of the window. The background style
7301 indicates how the background of the window is drawn.
7302
7303 ====================== ========================================
7304 wx.BG_STYLE_SYSTEM The background colour or pattern should
7305 be determined by the system
7306 wx.BG_STYLE_COLOUR The background should be a solid colour
7307 wx.BG_STYLE_CUSTOM The background will be implemented by the
7308 application.
7309 ====================== ========================================
7310
7311 On GTK+, use of wx.BG_STYLE_CUSTOM allows the flicker-free drawing of
7312 a custom background, such as a tiled bitmap. Currently the style has
7313 no effect on other platforms.
7314
7315 :see: `GetBackgroundStyle`, `SetBackgroundColour`
7316 """
7317 return _core_.Window_SetBackgroundStyle(*args, **kwargs)
7318
7319 def GetBackgroundStyle(*args, **kwargs):
7320 """
7321 GetBackgroundStyle(self) -> int
7322
7323 Returns the background style of the window.
7324
7325 :see: `SetBackgroundStyle`
7326 """
7327 return _core_.Window_GetBackgroundStyle(*args, **kwargs)
7328
7329 def SetCursor(*args, **kwargs):
7330 """
7331 SetCursor(self, Cursor cursor) -> bool
7332
7333 Sets the window's cursor. Notice that the window cursor also sets it
7334 for the children of the window implicitly.
7335
7336 The cursor may be wx.NullCursor in which case the window cursor will
7337 be reset back to default.
7338 """
7339 return _core_.Window_SetCursor(*args, **kwargs)
7340
7341 def GetCursor(*args, **kwargs):
7342 """
7343 GetCursor(self) -> Cursor
7344
7345 Return the cursor associated with this window.
7346 """
7347 return _core_.Window_GetCursor(*args, **kwargs)
7348
7349 def SetFont(*args, **kwargs):
7350 """
7351 SetFont(self, Font font) -> bool
7352
7353 Sets the font for this window.
7354 """
7355 return _core_.Window_SetFont(*args, **kwargs)
7356
7357 def SetOwnFont(*args, **kwargs):
7358 """SetOwnFont(self, Font font)"""
7359 return _core_.Window_SetOwnFont(*args, **kwargs)
7360
7361 def GetFont(*args, **kwargs):
7362 """
7363 GetFont(self) -> Font
7364
7365 Returns the default font used for this window.
7366 """
7367 return _core_.Window_GetFont(*args, **kwargs)
7368
7369 def SetCaret(*args, **kwargs):
7370 """
7371 SetCaret(self, Caret caret)
7372
7373 Sets the caret associated with the window.
7374 """
7375 return _core_.Window_SetCaret(*args, **kwargs)
7376
7377 def GetCaret(*args, **kwargs):
7378 """
7379 GetCaret(self) -> Caret
7380
7381 Returns the caret associated with the window.
7382 """
7383 return _core_.Window_GetCaret(*args, **kwargs)
7384
7385 def GetCharHeight(*args, **kwargs):
7386 """
7387 GetCharHeight(self) -> int
7388
7389 Get the (average) character size for the current font.
7390 """
7391 return _core_.Window_GetCharHeight(*args, **kwargs)
7392
7393 def GetCharWidth(*args, **kwargs):
7394 """
7395 GetCharWidth(self) -> int
7396
7397 Get the (average) character size for the current font.
7398 """
7399 return _core_.Window_GetCharWidth(*args, **kwargs)
7400
7401 def GetTextExtent(*args, **kwargs):
7402 """
7403 GetTextExtent(String string) -> (width, height)
7404
7405 Get the width and height of the text using the current font.
7406 """
7407 return _core_.Window_GetTextExtent(*args, **kwargs)
7408
7409 def GetFullTextExtent(*args, **kwargs):
7410 """
7411 GetFullTextExtent(String string, Font font=None) ->
7412 (width, height, descent, externalLeading)
7413
7414 Get the width, height, decent and leading of the text using the
7415 current or specified font.
7416 """
7417 return _core_.Window_GetFullTextExtent(*args, **kwargs)
7418
7419 def ClientToScreenXY(*args, **kwargs):
7420 """
7421 ClientToScreenXY(int x, int y) -> (x,y)
7422
7423 Converts to screen coordinates from coordinates relative to this window.
7424 """
7425 return _core_.Window_ClientToScreenXY(*args, **kwargs)
7426
7427 def ScreenToClientXY(*args, **kwargs):
7428 """
7429 ScreenToClientXY(int x, int y) -> (x,y)
7430
7431 Converts from screen to client window coordinates.
7432 """
7433 return _core_.Window_ScreenToClientXY(*args, **kwargs)
7434
7435 def ClientToScreen(*args, **kwargs):
7436 """
7437 ClientToScreen(self, Point pt) -> Point
7438
7439 Converts to screen coordinates from coordinates relative to this window.
7440 """
7441 return _core_.Window_ClientToScreen(*args, **kwargs)
7442
7443 def ScreenToClient(*args, **kwargs):
7444 """
7445 ScreenToClient(self, Point pt) -> Point
7446
7447 Converts from screen to client window coordinates.
7448 """
7449 return _core_.Window_ScreenToClient(*args, **kwargs)
7450
7451 def HitTestXY(*args, **kwargs):
7452 """
7453 HitTestXY(self, int x, int y) -> int
7454
7455 Test where the given (in client coords) point lies
7456 """
7457 return _core_.Window_HitTestXY(*args, **kwargs)
7458
7459 def HitTest(*args, **kwargs):
7460 """
7461 HitTest(self, Point pt) -> int
7462
7463 Test where the given (in client coords) point lies
7464 """
7465 return _core_.Window_HitTest(*args, **kwargs)
7466
7467 def GetBorder(*args):
7468 """
7469 GetBorder(self, long flags) -> int
7470 GetBorder(self) -> int
7471
7472 Get border for the flags of this window
7473 """
7474 return _core_.Window_GetBorder(*args)
7475
7476 def UpdateWindowUI(*args, **kwargs):
7477 """
7478 UpdateWindowUI(self, long flags=UPDATE_UI_NONE)
7479
7480 This function sends EVT_UPDATE_UI events to the window. The particular
7481 implementation depends on the window; for example a wx.ToolBar will
7482 send an update UI event for each toolbar button, and a wx.Frame will
7483 send an update UI event for each menubar menu item. You can call this
7484 function from your application to ensure that your UI is up-to-date at
7485 a particular point in time (as far as your EVT_UPDATE_UI handlers are
7486 concerned). This may be necessary if you have called
7487 wx.UpdateUIEvent.SetMode or wx.UpdateUIEvent.SetUpdateInterval to
7488 limit the overhead that wxWindows incurs by sending update UI events
7489 in idle time.
7490 """
7491 return _core_.Window_UpdateWindowUI(*args, **kwargs)
7492
7493 def PopupMenuXY(*args, **kwargs):
7494 """
7495 PopupMenuXY(self, Menu menu, int x=-1, int y=-1) -> bool
7496
7497 Pops up the given menu at the specified coordinates, relative to this window,
7498 and returns control when the user has dismissed the menu. If a menu item is
7499 selected, the corresponding menu event is generated and will be processed as
7500 usual. If the default position is given then the current position of the
7501 mouse cursor will be used.
7502 """
7503 return _core_.Window_PopupMenuXY(*args, **kwargs)
7504
7505 def PopupMenu(*args, **kwargs):
7506 """
7507 PopupMenu(self, Menu menu, Point pos=DefaultPosition) -> bool
7508
7509 Pops up the given menu at the specified coordinates, relative to this window,
7510 and returns control when the user has dismissed the menu. If a menu item is
7511 selected, the corresponding menu event is generated and will be processed as
7512 usual. If the default position is given then the current position of the
7513 mouse cursor will be used.
7514 """
7515 return _core_.Window_PopupMenu(*args, **kwargs)
7516
7517 def GetHandle(*args, **kwargs):
7518 """
7519 GetHandle(self) -> long
7520
7521 Returns the platform-specific handle (as a long integer) of the
7522 physical window. Currently on wxMac it returns the handle of the
7523 toplevel parent of the window.
7524 """
7525 return _core_.Window_GetHandle(*args, **kwargs)
7526
7527 def AssociateHandle(*args, **kwargs):
7528 """
7529 AssociateHandle(self, long handle)
7530
7531 Associate the window with a new native handle
7532 """
7533 return _core_.Window_AssociateHandle(*args, **kwargs)
7534
7535 def DissociateHandle(*args, **kwargs):
7536 """
7537 DissociateHandle(self)
7538
7539 Dissociate the current native handle from the window
7540 """
7541 return _core_.Window_DissociateHandle(*args, **kwargs)
7542
7543 def HasScrollbar(*args, **kwargs):
7544 """
7545 HasScrollbar(self, int orient) -> bool
7546
7547 Does the window have the scrollbar for this orientation?
7548 """
7549 return _core_.Window_HasScrollbar(*args, **kwargs)
7550
7551 def SetScrollbar(*args, **kwargs):
7552 """
7553 SetScrollbar(self, int orientation, int position, int thumbSize, int range,
7554 bool refresh=True)
7555
7556 Sets the scrollbar properties of a built-in scrollbar.
7557 """
7558 return _core_.Window_SetScrollbar(*args, **kwargs)
7559
7560 def SetScrollPos(*args, **kwargs):
7561 """
7562 SetScrollPos(self, int orientation, int pos, bool refresh=True)
7563
7564 Sets the position of one of the built-in scrollbars.
7565 """
7566 return _core_.Window_SetScrollPos(*args, **kwargs)
7567
7568 def GetScrollPos(*args, **kwargs):
7569 """
7570 GetScrollPos(self, int orientation) -> int
7571
7572 Returns the built-in scrollbar position.
7573 """
7574 return _core_.Window_GetScrollPos(*args, **kwargs)
7575
7576 def GetScrollThumb(*args, **kwargs):
7577 """
7578 GetScrollThumb(self, int orientation) -> int
7579
7580 Returns the built-in scrollbar thumb size.
7581 """
7582 return _core_.Window_GetScrollThumb(*args, **kwargs)
7583
7584 def GetScrollRange(*args, **kwargs):
7585 """
7586 GetScrollRange(self, int orientation) -> int
7587
7588 Returns the built-in scrollbar range.
7589 """
7590 return _core_.Window_GetScrollRange(*args, **kwargs)
7591
7592 def ScrollWindow(*args, **kwargs):
7593 """
7594 ScrollWindow(self, int dx, int dy, Rect rect=None)
7595
7596 Physically scrolls the pixels in the window and move child windows
7597 accordingly. Use this function to optimise your scrolling
7598 implementations, to minimise the area that must be redrawn. Note that
7599 it is rarely required to call this function from a user program.
7600 """
7601 return _core_.Window_ScrollWindow(*args, **kwargs)
7602
7603 def ScrollLines(*args, **kwargs):
7604 """
7605 ScrollLines(self, int lines) -> bool
7606
7607 If the platform and window class supports it, scrolls the window by
7608 the given number of lines down, if lines is positive, or up if lines
7609 is negative. Returns True if the window was scrolled, False if it was
7610 already on top/bottom and nothing was done.
7611 """
7612 return _core_.Window_ScrollLines(*args, **kwargs)
7613
7614 def ScrollPages(*args, **kwargs):
7615 """
7616 ScrollPages(self, int pages) -> bool
7617
7618 If the platform and window class supports it, scrolls the window by
7619 the given number of pages down, if pages is positive, or up if pages
7620 is negative. Returns True if the window was scrolled, False if it was
7621 already on top/bottom and nothing was done.
7622 """
7623 return _core_.Window_ScrollPages(*args, **kwargs)
7624
7625 def LineUp(*args, **kwargs):
7626 """
7627 LineUp(self) -> bool
7628
7629 This is just a wrapper for ScrollLines(-1).
7630 """
7631 return _core_.Window_LineUp(*args, **kwargs)
7632
7633 def LineDown(*args, **kwargs):
7634 """
7635 LineDown(self) -> bool
7636
7637 This is just a wrapper for ScrollLines(1).
7638 """
7639 return _core_.Window_LineDown(*args, **kwargs)
7640
7641 def PageUp(*args, **kwargs):
7642 """
7643 PageUp(self) -> bool
7644
7645 This is just a wrapper for ScrollPages(-1).
7646 """
7647 return _core_.Window_PageUp(*args, **kwargs)
7648
7649 def PageDown(*args, **kwargs):
7650 """
7651 PageDown(self) -> bool
7652
7653 This is just a wrapper for ScrollPages(1).
7654 """
7655 return _core_.Window_PageDown(*args, **kwargs)
7656
7657 def SetHelpText(*args, **kwargs):
7658 """
7659 SetHelpText(self, String text)
7660
7661 Sets the help text to be used as context-sensitive help for this
7662 window. Note that the text is actually stored by the current
7663 wxHelpProvider implementation, and not in the window object itself.
7664 """
7665 return _core_.Window_SetHelpText(*args, **kwargs)
7666
7667 def SetHelpTextForId(*args, **kwargs):
7668 """
7669 SetHelpTextForId(self, String text)
7670
7671 Associate this help text with all windows with the same id as this
7672 one.
7673 """
7674 return _core_.Window_SetHelpTextForId(*args, **kwargs)
7675
7676 def GetHelpText(*args, **kwargs):
7677 """
7678 GetHelpText(self) -> String
7679
7680 Gets the help text to be used as context-sensitive help for this
7681 window. Note that the text is actually stored by the current
7682 wxHelpProvider implementation, and not in the window object itself.
7683 """
7684 return _core_.Window_GetHelpText(*args, **kwargs)
7685
7686 def SetToolTipString(*args, **kwargs):
7687 """
7688 SetToolTipString(self, String tip)
7689
7690 Attach a tooltip to the window.
7691 """
7692 return _core_.Window_SetToolTipString(*args, **kwargs)
7693
7694 def SetToolTip(*args, **kwargs):
7695 """
7696 SetToolTip(self, ToolTip tip)
7697
7698 Attach a tooltip to the window.
7699 """
7700 return _core_.Window_SetToolTip(*args, **kwargs)
7701
7702 def GetToolTip(*args, **kwargs):
7703 """
7704 GetToolTip(self) -> ToolTip
7705
7706 get the associated tooltip or None if none
7707 """
7708 return _core_.Window_GetToolTip(*args, **kwargs)
7709
7710 def SetDropTarget(*args, **kwargs):
7711 """
7712 SetDropTarget(self, DropTarget dropTarget)
7713
7714 Associates a drop target with this window. If the window already has
7715 a drop target, it is deleted.
7716 """
7717 return _core_.Window_SetDropTarget(*args, **kwargs)
7718
7719 def GetDropTarget(*args, **kwargs):
7720 """
7721 GetDropTarget(self) -> DropTarget
7722
7723 Returns the associated drop target, which may be None.
7724 """
7725 return _core_.Window_GetDropTarget(*args, **kwargs)
7726
7727 def SetConstraints(*args, **kwargs):
7728 """
7729 SetConstraints(self, LayoutConstraints constraints)
7730
7731 Sets the window to have the given layout constraints. If an existing
7732 layout constraints object is already owned by the window, it will be
7733 deleted. Pass None to disassociate and delete the window's current
7734 constraints.
7735
7736 You must call SetAutoLayout to tell a window to use the constraints
7737 automatically in its default EVT_SIZE handler; otherwise, you must
7738 handle EVT_SIZE yourself and call Layout() explicitly. When setting
7739 both a wx.LayoutConstraints and a wx.Sizer, only the sizer will have
7740 effect.
7741 """
7742 return _core_.Window_SetConstraints(*args, **kwargs)
7743
7744 def GetConstraints(*args, **kwargs):
7745 """
7746 GetConstraints(self) -> LayoutConstraints
7747
7748 Returns a pointer to the window's layout constraints, or None if there
7749 are none.
7750 """
7751 return _core_.Window_GetConstraints(*args, **kwargs)
7752
7753 def SetAutoLayout(*args, **kwargs):
7754 """
7755 SetAutoLayout(self, bool autoLayout)
7756
7757 Determines whether the Layout function will be called automatically
7758 when the window is resized. It is called implicitly by SetSizer but
7759 if you use SetConstraints you should call it manually or otherwise the
7760 window layout won't be correctly updated when its size changes.
7761 """
7762 return _core_.Window_SetAutoLayout(*args, **kwargs)
7763
7764 def GetAutoLayout(*args, **kwargs):
7765 """
7766 GetAutoLayout(self) -> bool
7767
7768 Returns the current autoLayout setting
7769 """
7770 return _core_.Window_GetAutoLayout(*args, **kwargs)
7771
7772 def Layout(*args, **kwargs):
7773 """
7774 Layout(self) -> bool
7775
7776 Invokes the constraint-based layout algorithm or the sizer-based
7777 algorithm for this window. See SetAutoLayout: when auto layout is on,
7778 this function gets called automatically by the default EVT_SIZE
7779 handler when the window is resized.
7780 """
7781 return _core_.Window_Layout(*args, **kwargs)
7782
7783 def SetSizer(*args, **kwargs):
7784 """
7785 SetSizer(self, Sizer sizer, bool deleteOld=True)
7786
7787 Sets the window to have the given layout sizer. The window will then
7788 own the object, and will take care of its deletion. If an existing
7789 layout sizer object is already owned by the window, it will be deleted
7790 if the deleteOld parameter is true. Note that this function will also
7791 call SetAutoLayout implicitly with a True parameter if the sizer is
7792 non-None, and False otherwise.
7793 """
7794 return _core_.Window_SetSizer(*args, **kwargs)
7795
7796 def SetSizerAndFit(*args, **kwargs):
7797 """
7798 SetSizerAndFit(self, Sizer sizer, bool deleteOld=True)
7799
7800 The same as SetSizer, except it also sets the size hints for the
7801 window based on the sizer's minimum size.
7802 """
7803 return _core_.Window_SetSizerAndFit(*args, **kwargs)
7804
7805 def GetSizer(*args, **kwargs):
7806 """
7807 GetSizer(self) -> Sizer
7808
7809 Return the sizer associated with the window by a previous call to
7810 SetSizer or None if there isn't one.
7811 """
7812 return _core_.Window_GetSizer(*args, **kwargs)
7813
7814 def SetContainingSizer(*args, **kwargs):
7815 """
7816 SetContainingSizer(self, Sizer sizer)
7817
7818 This normally does not need to be called by application code. It is
7819 called internally when a window is added to a sizer, and is used so
7820 the window can remove itself from the sizer when it is destroyed.
7821 """
7822 return _core_.Window_SetContainingSizer(*args, **kwargs)
7823
7824 def GetContainingSizer(*args, **kwargs):
7825 """
7826 GetContainingSizer(self) -> Sizer
7827
7828 Return the sizer that this window is a member of, if any, otherwise None.
7829 """
7830 return _core_.Window_GetContainingSizer(*args, **kwargs)
7831
7832 def InheritAttributes(*args, **kwargs):
7833 """
7834 InheritAttributes(self)
7835
7836 This function is (or should be, in case of custom controls) called
7837 during window creation to intelligently set up the window visual
7838 attributes, that is the font and the foreground and background
7839 colours.
7840
7841 By 'intelligently' the following is meant: by default, all windows use
7842 their own default attributes. However if some of the parent's
7843 attributes are explicitly changed (that is, using SetFont and not
7844 SetOwnFont) and if the corresponding attribute hadn't been
7845 explicitly set for this window itself, then this window takes the same
7846 value as used by the parent. In addition, if the window overrides
7847 ShouldInheritColours to return false, the colours will not be changed
7848 no matter what and only the font might.
7849
7850 This rather complicated logic is necessary in order to accommodate the
7851 different usage scenarios. The most common one is when all default
7852 attributes are used and in this case, nothing should be inherited as
7853 in modern GUIs different controls use different fonts (and colours)
7854 than their siblings so they can't inherit the same value from the
7855 parent. However it was also deemed desirable to allow to simply change
7856 the attributes of all children at once by just changing the font or
7857 colour of their common parent, hence in this case we do inherit the
7858 parents attributes.
7859
7860 """
7861 return _core_.Window_InheritAttributes(*args, **kwargs)
7862
7863 def ShouldInheritColours(*args, **kwargs):
7864 """
7865 ShouldInheritColours(self) -> bool
7866
7867 Return true from here to allow the colours of this window to be
7868 changed by InheritAttributes, returning false forbids inheriting them
7869 from the parent window.
7870
7871 The base class version returns false, but this method is overridden in
7872 wxControl where it returns true.
7873 """
7874 return _core_.Window_ShouldInheritColours(*args, **kwargs)
7875
7876 def PostCreate(self, pre):
7877 """
7878 Phase 3 of the 2-phase create <wink!>
7879 Call this method after precreating the window with the 2-phase create method.
7880 """
7881 self.this = pre.this
7882 self.thisown = pre.thisown
7883 pre.thisown = 0
7884 if hasattr(self, '_setOORInfo'):
7885 self._setOORInfo(self)
7886 if hasattr(self, '_setCallbackInfo'):
7887 self._setCallbackInfo(self, self.__class__)
7888
7889
7890 class WindowPtr(Window):
7891 def __init__(self, this):
7892 self.this = this
7893 if not hasattr(self,"thisown"): self.thisown = 0
7894 self.__class__ = Window
7895 _core_.Window_swigregister(WindowPtr)
7896
7897 def PreWindow(*args, **kwargs):
7898 """
7899 PreWindow() -> Window
7900
7901 Precreate a Window for 2-phase creation.
7902 """
7903 val = _core_.new_PreWindow(*args, **kwargs)
7904 val.thisown = 1
7905 return val
7906
7907 def Window_NewControlId(*args, **kwargs):
7908 """
7909 Window_NewControlId() -> int
7910
7911 Generate a control id for the controls which were not given one.
7912 """
7913 return _core_.Window_NewControlId(*args, **kwargs)
7914
7915 def Window_NextControlId(*args, **kwargs):
7916 """
7917 Window_NextControlId(int winid) -> int
7918
7919 Get the id of the control following the one with the given
7920 autogenerated) id
7921 """
7922 return _core_.Window_NextControlId(*args, **kwargs)
7923
7924 def Window_PrevControlId(*args, **kwargs):
7925 """
7926 Window_PrevControlId(int winid) -> int
7927
7928 Get the id of the control preceding the one with the given
7929 autogenerated) id
7930 """
7931 return _core_.Window_PrevControlId(*args, **kwargs)
7932
7933 def Window_FindFocus(*args, **kwargs):
7934 """
7935 Window_FindFocus() -> Window
7936
7937 Returns the window or control that currently has the keyboard focus,
7938 or None.
7939 """
7940 return _core_.Window_FindFocus(*args, **kwargs)
7941
7942 def Window_GetCapture(*args, **kwargs):
7943 """
7944 Window_GetCapture() -> Window
7945
7946 Returns the window which currently captures the mouse or None
7947 """
7948 return _core_.Window_GetCapture(*args, **kwargs)
7949
7950 def Window_GetClassDefaultAttributes(*args, **kwargs):
7951 """
7952 Window_GetClassDefaultAttributes(int variant=WINDOW_VARIANT_NORMAL) -> VisualAttributes
7953
7954 Get the default attributes for this class. This is useful if you want
7955 to use the same font or colour in your own control as in a standard
7956 control -- which is a much better idea than hard coding specific
7957 colours or fonts which might look completely out of place on the
7958 user's system, especially if it uses themes.
7959
7960 The variant parameter is only relevant under Mac currently and is
7961 ignore under other platforms. Under Mac, it will change the size of
7962 the returned font. See `wx.Window.SetWindowVariant` for more about
7963 this.
7964 """
7965 return _core_.Window_GetClassDefaultAttributes(*args, **kwargs)
7966
7967 def DLG_PNT(win, point_or_x, y=None):
7968 """
7969 Convenience function for converting a Point or (x,y) in
7970 dialog units to pixel units.
7971 """
7972 if y is None:
7973 return win.ConvertDialogPointToPixels(point_or_x)
7974 else:
7975 return win.ConvertDialogPointToPixels(wx.Point(point_or_x, y))
7976
7977 def DLG_SZE(win, size_width, height=None):
7978 """
7979 Convenience function for converting a Size or (w,h) in
7980 dialog units to pixel units.
7981 """
7982 if height is None:
7983 return win.ConvertDialogSizeToPixels(size_width)
7984 else:
7985 return win.ConvertDialogSizeToPixels(wx.Size(size_width, height))
7986
7987
7988 def FindWindowById(*args, **kwargs):
7989 """
7990 FindWindowById(long id, Window parent=None) -> Window
7991
7992 Find the first window in the application with the given id. If parent
7993 is None, the search will start from all top-level frames and dialog
7994 boxes; if non-None, the search will be limited to the given window
7995 hierarchy. The search is recursive in both cases.
7996 """
7997 return _core_.FindWindowById(*args, **kwargs)
7998
7999 def FindWindowByName(*args, **kwargs):
8000 """
8001 FindWindowByName(String name, Window parent=None) -> Window
8002
8003 Find a window by its name (as given in a window constructor or Create
8004 function call). If parent is None, the search will start from all
8005 top-level frames and dialog boxes; if non-None, the search will be
8006 limited to the given window hierarchy. The search is recursive in both
8007 cases.
8008
8009 If no window with such name is found, wx.FindWindowByLabel is called.
8010 """
8011 return _core_.FindWindowByName(*args, **kwargs)
8012
8013 def FindWindowByLabel(*args, **kwargs):
8014 """
8015 FindWindowByLabel(String label, Window parent=None) -> Window
8016
8017 Find a window by its label. Depending on the type of window, the label
8018 may be a window title or panel item label. If parent is None, the
8019 search will start from all top-level frames and dialog boxes; if
8020 non-None, the search will be limited to the given window
8021 hierarchy. The search is recursive in both cases.
8022 """
8023 return _core_.FindWindowByLabel(*args, **kwargs)
8024
8025 def Window_FromHWND(*args, **kwargs):
8026 """Window_FromHWND(Window parent, unsigned long _hWnd) -> Window"""
8027 return _core_.Window_FromHWND(*args, **kwargs)
8028 #---------------------------------------------------------------------------
8029
8030 class Validator(EvtHandler):
8031 """Proxy of C++ Validator class"""
8032 def __repr__(self):
8033 return "<%s.%s; proxy of C++ wxValidator instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
8034 def __init__(self, *args, **kwargs):
8035 """__init__(self) -> Validator"""
8036 newobj = _core_.new_Validator(*args, **kwargs)
8037 self.this = newobj.this
8038 self.thisown = 1
8039 del newobj.thisown
8040 self._setOORInfo(self)
8041
8042 def Clone(*args, **kwargs):
8043 """Clone(self) -> Validator"""
8044 return _core_.Validator_Clone(*args, **kwargs)
8045
8046 def Validate(*args, **kwargs):
8047 """Validate(self, Window parent) -> bool"""
8048 return _core_.Validator_Validate(*args, **kwargs)
8049
8050 def TransferToWindow(*args, **kwargs):
8051 """TransferToWindow(self) -> bool"""
8052 return _core_.Validator_TransferToWindow(*args, **kwargs)
8053
8054 def TransferFromWindow(*args, **kwargs):
8055 """TransferFromWindow(self) -> bool"""
8056 return _core_.Validator_TransferFromWindow(*args, **kwargs)
8057
8058 def GetWindow(*args, **kwargs):
8059 """GetWindow(self) -> Window"""
8060 return _core_.Validator_GetWindow(*args, **kwargs)
8061
8062 def SetWindow(*args, **kwargs):
8063 """SetWindow(self, Window window)"""
8064 return _core_.Validator_SetWindow(*args, **kwargs)
8065
8066 def IsSilent(*args, **kwargs):
8067 """IsSilent() -> bool"""
8068 return _core_.Validator_IsSilent(*args, **kwargs)
8069
8070 IsSilent = staticmethod(IsSilent)
8071 def SetBellOnError(*args, **kwargs):
8072 """SetBellOnError(int doIt=True)"""
8073 return _core_.Validator_SetBellOnError(*args, **kwargs)
8074
8075 SetBellOnError = staticmethod(SetBellOnError)
8076
8077 class ValidatorPtr(Validator):
8078 def __init__(self, this):
8079 self.this = this
8080 if not hasattr(self,"thisown"): self.thisown = 0
8081 self.__class__ = Validator
8082 _core_.Validator_swigregister(ValidatorPtr)
8083
8084 def Validator_IsSilent(*args, **kwargs):
8085 """Validator_IsSilent() -> bool"""
8086 return _core_.Validator_IsSilent(*args, **kwargs)
8087
8088 def Validator_SetBellOnError(*args, **kwargs):
8089 """Validator_SetBellOnError(int doIt=True)"""
8090 return _core_.Validator_SetBellOnError(*args, **kwargs)
8091
8092 class PyValidator(Validator):
8093 """Proxy of C++ PyValidator class"""
8094 def __repr__(self):
8095 return "<%s.%s; proxy of C++ wxPyValidator instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
8096 def __init__(self, *args, **kwargs):
8097 """__init__(self) -> PyValidator"""
8098 newobj = _core_.new_PyValidator(*args, **kwargs)
8099 self.this = newobj.this
8100 self.thisown = 1
8101 del newobj.thisown
8102
8103 self._setCallbackInfo(self, PyValidator, 1)
8104 self._setOORInfo(self)
8105
8106 def _setCallbackInfo(*args, **kwargs):
8107 """_setCallbackInfo(self, PyObject self, PyObject _class, int incref=True)"""
8108 return _core_.PyValidator__setCallbackInfo(*args, **kwargs)
8109
8110
8111 class PyValidatorPtr(PyValidator):
8112 def __init__(self, this):
8113 self.this = this
8114 if not hasattr(self,"thisown"): self.thisown = 0
8115 self.__class__ = PyValidator
8116 _core_.PyValidator_swigregister(PyValidatorPtr)
8117
8118 #---------------------------------------------------------------------------
8119
8120 class Menu(EvtHandler):
8121 """Proxy of C++ Menu class"""
8122 def __repr__(self):
8123 return "<%s.%s; proxy of C++ wxMenu instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
8124 def __init__(self, *args, **kwargs):
8125 """__init__(self, String title=EmptyString, long style=0) -> Menu"""
8126 newobj = _core_.new_Menu(*args, **kwargs)
8127 self.this = newobj.this
8128 self.thisown = 1
8129 del newobj.thisown
8130 self._setOORInfo(self)
8131
8132 def Append(*args, **kwargs):
8133 """Append(self, int id, String text, String help=EmptyString, int kind=ITEM_NORMAL) -> MenuItem"""
8134 return _core_.Menu_Append(*args, **kwargs)
8135
8136 def AppendSeparator(*args, **kwargs):
8137 """AppendSeparator(self) -> MenuItem"""
8138 return _core_.Menu_AppendSeparator(*args, **kwargs)
8139
8140 def AppendCheckItem(*args, **kwargs):
8141 """AppendCheckItem(self, int id, String text, String help=EmptyString) -> MenuItem"""
8142 return _core_.Menu_AppendCheckItem(*args, **kwargs)
8143
8144 def AppendRadioItem(*args, **kwargs):
8145 """AppendRadioItem(self, int id, String text, String help=EmptyString) -> MenuItem"""
8146 return _core_.Menu_AppendRadioItem(*args, **kwargs)
8147
8148 def AppendMenu(*args, **kwargs):
8149 """AppendMenu(self, int id, String text, Menu submenu, String help=EmptyString) -> MenuItem"""
8150 return _core_.Menu_AppendMenu(*args, **kwargs)
8151
8152 def AppendItem(*args, **kwargs):
8153 """AppendItem(self, MenuItem item) -> MenuItem"""
8154 return _core_.Menu_AppendItem(*args, **kwargs)
8155
8156 def Break(*args, **kwargs):
8157 """Break(self)"""
8158 return _core_.Menu_Break(*args, **kwargs)
8159
8160 def InsertItem(*args, **kwargs):
8161 """InsertItem(self, size_t pos, MenuItem item) -> MenuItem"""
8162 return _core_.Menu_InsertItem(*args, **kwargs)
8163
8164 def Insert(*args, **kwargs):
8165 """
8166 Insert(self, size_t pos, int id, String text, String help=EmptyString,
8167 int kind=ITEM_NORMAL) -> MenuItem
8168 """
8169 return _core_.Menu_Insert(*args, **kwargs)
8170
8171 def InsertSeparator(*args, **kwargs):
8172 """InsertSeparator(self, size_t pos) -> MenuItem"""
8173 return _core_.Menu_InsertSeparator(*args, **kwargs)
8174
8175 def InsertCheckItem(*args, **kwargs):
8176 """InsertCheckItem(self, size_t pos, int id, String text, String help=EmptyString) -> MenuItem"""
8177 return _core_.Menu_InsertCheckItem(*args, **kwargs)
8178
8179 def InsertRadioItem(*args, **kwargs):
8180 """InsertRadioItem(self, size_t pos, int id, String text, String help=EmptyString) -> MenuItem"""
8181 return _core_.Menu_InsertRadioItem(*args, **kwargs)
8182
8183 def InsertMenu(*args, **kwargs):
8184 """InsertMenu(self, size_t pos, int id, String text, Menu submenu, String help=EmptyString) -> MenuItem"""
8185 return _core_.Menu_InsertMenu(*args, **kwargs)
8186
8187 def PrependItem(*args, **kwargs):
8188 """PrependItem(self, MenuItem item) -> MenuItem"""
8189 return _core_.Menu_PrependItem(*args, **kwargs)
8190
8191 def Prepend(*args, **kwargs):
8192 """Prepend(self, int id, String text, String help=EmptyString, int kind=ITEM_NORMAL) -> MenuItem"""
8193 return _core_.Menu_Prepend(*args, **kwargs)
8194
8195 def PrependSeparator(*args, **kwargs):
8196 """PrependSeparator(self) -> MenuItem"""
8197 return _core_.Menu_PrependSeparator(*args, **kwargs)
8198
8199 def PrependCheckItem(*args, **kwargs):
8200 """PrependCheckItem(self, int id, String text, String help=EmptyString) -> MenuItem"""
8201 return _core_.Menu_PrependCheckItem(*args, **kwargs)
8202
8203 def PrependRadioItem(*args, **kwargs):
8204 """PrependRadioItem(self, int id, String text, String help=EmptyString) -> MenuItem"""
8205 return _core_.Menu_PrependRadioItem(*args, **kwargs)
8206
8207 def PrependMenu(*args, **kwargs):
8208 """PrependMenu(self, int id, String text, Menu submenu, String help=EmptyString) -> MenuItem"""
8209 return _core_.Menu_PrependMenu(*args, **kwargs)
8210
8211 def Remove(*args, **kwargs):
8212 """Remove(self, int id) -> MenuItem"""
8213 return _core_.Menu_Remove(*args, **kwargs)
8214
8215 def RemoveItem(*args, **kwargs):
8216 """RemoveItem(self, MenuItem item) -> MenuItem"""
8217 return _core_.Menu_RemoveItem(*args, **kwargs)
8218
8219 def Delete(*args, **kwargs):
8220 """Delete(self, int id) -> bool"""
8221 return _core_.Menu_Delete(*args, **kwargs)
8222
8223 def DeleteItem(*args, **kwargs):
8224 """DeleteItem(self, MenuItem item) -> bool"""
8225 return _core_.Menu_DeleteItem(*args, **kwargs)
8226
8227 def Destroy(*args, **kwargs):
8228 """
8229 Destroy(self)
8230
8231 Deletes the C++ object this Python object is a proxy for.
8232 """
8233 return _core_.Menu_Destroy(*args, **kwargs)
8234
8235 def DestroyId(*args, **kwargs):
8236 """
8237 DestroyId(self, int id) -> bool
8238
8239 Deletes the C++ object this Python object is a proxy for.
8240 """
8241 return _core_.Menu_DestroyId(*args, **kwargs)
8242
8243 def DestroyItem(*args, **kwargs):
8244 """
8245 DestroyItem(self, MenuItem item) -> bool
8246
8247 Deletes the C++ object this Python object is a proxy for.
8248 """
8249 return _core_.Menu_DestroyItem(*args, **kwargs)
8250
8251 def GetMenuItemCount(*args, **kwargs):
8252 """GetMenuItemCount(self) -> size_t"""
8253 return _core_.Menu_GetMenuItemCount(*args, **kwargs)
8254
8255 def GetMenuItems(*args, **kwargs):
8256 """GetMenuItems(self) -> PyObject"""
8257 return _core_.Menu_GetMenuItems(*args, **kwargs)
8258
8259 def FindItem(*args, **kwargs):
8260 """FindItem(self, String item) -> int"""
8261 return _core_.Menu_FindItem(*args, **kwargs)
8262
8263 def FindItemById(*args, **kwargs):
8264 """FindItemById(self, int id) -> MenuItem"""
8265 return _core_.Menu_FindItemById(*args, **kwargs)
8266
8267 def FindItemByPosition(*args, **kwargs):
8268 """FindItemByPosition(self, size_t position) -> MenuItem"""
8269 return _core_.Menu_FindItemByPosition(*args, **kwargs)
8270
8271 def Enable(*args, **kwargs):
8272 """Enable(self, int id, bool enable)"""
8273 return _core_.Menu_Enable(*args, **kwargs)
8274
8275 def IsEnabled(*args, **kwargs):
8276 """IsEnabled(self, int id) -> bool"""
8277 return _core_.Menu_IsEnabled(*args, **kwargs)
8278
8279 def Check(*args, **kwargs):
8280 """Check(self, int id, bool check)"""
8281 return _core_.Menu_Check(*args, **kwargs)
8282
8283 def IsChecked(*args, **kwargs):
8284 """IsChecked(self, int id) -> bool"""
8285 return _core_.Menu_IsChecked(*args, **kwargs)
8286
8287 def SetLabel(*args, **kwargs):
8288 """SetLabel(self, int id, String label)"""
8289 return _core_.Menu_SetLabel(*args, **kwargs)
8290
8291 def GetLabel(*args, **kwargs):
8292 """GetLabel(self, int id) -> String"""
8293 return _core_.Menu_GetLabel(*args, **kwargs)
8294
8295 def SetHelpString(*args, **kwargs):
8296 """SetHelpString(self, int id, String helpString)"""
8297 return _core_.Menu_SetHelpString(*args, **kwargs)
8298
8299 def GetHelpString(*args, **kwargs):
8300 """GetHelpString(self, int id) -> String"""
8301 return _core_.Menu_GetHelpString(*args, **kwargs)
8302
8303 def SetTitle(*args, **kwargs):
8304 """SetTitle(self, String title)"""
8305 return _core_.Menu_SetTitle(*args, **kwargs)
8306
8307 def GetTitle(*args, **kwargs):
8308 """GetTitle(self) -> String"""
8309 return _core_.Menu_GetTitle(*args, **kwargs)
8310
8311 def SetEventHandler(*args, **kwargs):
8312 """SetEventHandler(self, EvtHandler handler)"""
8313 return _core_.Menu_SetEventHandler(*args, **kwargs)
8314
8315 def GetEventHandler(*args, **kwargs):
8316 """GetEventHandler(self) -> EvtHandler"""
8317 return _core_.Menu_GetEventHandler(*args, **kwargs)
8318
8319 def SetInvokingWindow(*args, **kwargs):
8320 """SetInvokingWindow(self, Window win)"""
8321 return _core_.Menu_SetInvokingWindow(*args, **kwargs)
8322
8323 def GetInvokingWindow(*args, **kwargs):
8324 """GetInvokingWindow(self) -> Window"""
8325 return _core_.Menu_GetInvokingWindow(*args, **kwargs)
8326
8327 def GetStyle(*args, **kwargs):
8328 """GetStyle(self) -> long"""
8329 return _core_.Menu_GetStyle(*args, **kwargs)
8330
8331 def UpdateUI(*args, **kwargs):
8332 """UpdateUI(self, EvtHandler source=None)"""
8333 return _core_.Menu_UpdateUI(*args, **kwargs)
8334
8335 def GetMenuBar(*args, **kwargs):
8336 """GetMenuBar(self) -> MenuBar"""
8337 return _core_.Menu_GetMenuBar(*args, **kwargs)
8338
8339 def Attach(*args, **kwargs):
8340 """Attach(self, wxMenuBarBase menubar)"""
8341 return _core_.Menu_Attach(*args, **kwargs)
8342
8343 def Detach(*args, **kwargs):
8344 """Detach(self)"""
8345 return _core_.Menu_Detach(*args, **kwargs)
8346
8347 def IsAttached(*args, **kwargs):
8348 """IsAttached(self) -> bool"""
8349 return _core_.Menu_IsAttached(*args, **kwargs)
8350
8351 def SetParent(*args, **kwargs):
8352 """SetParent(self, Menu parent)"""
8353 return _core_.Menu_SetParent(*args, **kwargs)
8354
8355 def GetParent(*args, **kwargs):
8356 """GetParent(self) -> Menu"""
8357 return _core_.Menu_GetParent(*args, **kwargs)
8358
8359
8360 class MenuPtr(Menu):
8361 def __init__(self, this):
8362 self.this = this
8363 if not hasattr(self,"thisown"): self.thisown = 0
8364 self.__class__ = Menu
8365 _core_.Menu_swigregister(MenuPtr)
8366 DefaultValidator = cvar.DefaultValidator
8367
8368 #---------------------------------------------------------------------------
8369
8370 class MenuBar(Window):
8371 """Proxy of C++ MenuBar class"""
8372 def __repr__(self):
8373 return "<%s.%s; proxy of C++ wxMenuBar instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
8374 def __init__(self, *args, **kwargs):
8375 """__init__(self, long style=0) -> MenuBar"""
8376 newobj = _core_.new_MenuBar(*args, **kwargs)
8377 self.this = newobj.this
8378 self.thisown = 1
8379 del newobj.thisown
8380 self._setOORInfo(self)
8381
8382 def Append(*args, **kwargs):
8383 """Append(self, Menu menu, String title) -> bool"""
8384 return _core_.MenuBar_Append(*args, **kwargs)
8385
8386 def Insert(*args, **kwargs):
8387 """Insert(self, size_t pos, Menu menu, String title) -> bool"""
8388 return _core_.MenuBar_Insert(*args, **kwargs)
8389
8390 def GetMenuCount(*args, **kwargs):
8391 """GetMenuCount(self) -> size_t"""
8392 return _core_.MenuBar_GetMenuCount(*args, **kwargs)
8393
8394 def GetMenu(*args, **kwargs):
8395 """GetMenu(self, size_t pos) -> Menu"""
8396 return _core_.MenuBar_GetMenu(*args, **kwargs)
8397
8398 def Replace(*args, **kwargs):
8399 """Replace(self, size_t pos, Menu menu, String title) -> Menu"""
8400 return _core_.MenuBar_Replace(*args, **kwargs)
8401
8402 def Remove(*args, **kwargs):
8403 """Remove(self, size_t pos) -> Menu"""
8404 return _core_.MenuBar_Remove(*args, **kwargs)
8405
8406 def EnableTop(*args, **kwargs):
8407 """EnableTop(self, size_t pos, bool enable)"""
8408 return _core_.MenuBar_EnableTop(*args, **kwargs)
8409
8410 def IsEnabledTop(*args, **kwargs):
8411 """IsEnabledTop(self, size_t pos) -> bool"""
8412 return _core_.MenuBar_IsEnabledTop(*args, **kwargs)
8413
8414 def SetLabelTop(*args, **kwargs):
8415 """SetLabelTop(self, size_t pos, String label)"""
8416 return _core_.MenuBar_SetLabelTop(*args, **kwargs)
8417
8418 def GetLabelTop(*args, **kwargs):
8419 """GetLabelTop(self, size_t pos) -> String"""
8420 return _core_.MenuBar_GetLabelTop(*args, **kwargs)
8421
8422 def FindMenuItem(*args, **kwargs):
8423 """FindMenuItem(self, String menu, String item) -> int"""
8424 return _core_.MenuBar_FindMenuItem(*args, **kwargs)
8425
8426 def FindItemById(*args, **kwargs):
8427 """FindItemById(self, int id) -> MenuItem"""
8428 return _core_.MenuBar_FindItemById(*args, **kwargs)
8429
8430 def FindMenu(*args, **kwargs):
8431 """FindMenu(self, String title) -> int"""
8432 return _core_.MenuBar_FindMenu(*args, **kwargs)
8433
8434 def Enable(*args, **kwargs):
8435 """Enable(self, int id, bool enable)"""
8436 return _core_.MenuBar_Enable(*args, **kwargs)
8437
8438 def Check(*args, **kwargs):
8439 """Check(self, int id, bool check)"""
8440 return _core_.MenuBar_Check(*args, **kwargs)
8441
8442 def IsChecked(*args, **kwargs):
8443 """IsChecked(self, int id) -> bool"""
8444 return _core_.MenuBar_IsChecked(*args, **kwargs)
8445
8446 def IsEnabled(*args, **kwargs):
8447 """IsEnabled(self, int id) -> bool"""
8448 return _core_.MenuBar_IsEnabled(*args, **kwargs)
8449
8450 def SetLabel(*args, **kwargs):
8451 """SetLabel(self, int id, String label)"""
8452 return _core_.MenuBar_SetLabel(*args, **kwargs)
8453
8454 def GetLabel(*args, **kwargs):
8455 """GetLabel(self, int id) -> String"""
8456 return _core_.MenuBar_GetLabel(*args, **kwargs)
8457
8458 def SetHelpString(*args, **kwargs):
8459 """SetHelpString(self, int id, String helpString)"""
8460 return _core_.MenuBar_SetHelpString(*args, **kwargs)
8461
8462 def GetHelpString(*args, **kwargs):
8463 """GetHelpString(self, int id) -> String"""
8464 return _core_.MenuBar_GetHelpString(*args, **kwargs)
8465
8466 def GetFrame(*args, **kwargs):
8467 """GetFrame(self) -> wxFrame"""
8468 return _core_.MenuBar_GetFrame(*args, **kwargs)
8469
8470 def IsAttached(*args, **kwargs):
8471 """IsAttached(self) -> bool"""
8472 return _core_.MenuBar_IsAttached(*args, **kwargs)
8473
8474 def Attach(*args, **kwargs):
8475 """Attach(self, wxFrame frame)"""
8476 return _core_.MenuBar_Attach(*args, **kwargs)
8477
8478 def Detach(*args, **kwargs):
8479 """Detach(self)"""
8480 return _core_.MenuBar_Detach(*args, **kwargs)
8481
8482
8483 class MenuBarPtr(MenuBar):
8484 def __init__(self, this):
8485 self.this = this
8486 if not hasattr(self,"thisown"): self.thisown = 0
8487 self.__class__ = MenuBar
8488 _core_.MenuBar_swigregister(MenuBarPtr)
8489
8490 #---------------------------------------------------------------------------
8491
8492 class MenuItem(Object):
8493 """Proxy of C++ MenuItem class"""
8494 def __repr__(self):
8495 return "<%s.%s; proxy of C++ wxMenuItem instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
8496 def __init__(self, *args, **kwargs):
8497 """
8498 __init__(self, Menu parentMenu=None, int id=ID_ANY, String text=EmptyString,
8499 String help=EmptyString, int kind=ITEM_NORMAL,
8500 Menu subMenu=None) -> MenuItem
8501 """
8502 newobj = _core_.new_MenuItem(*args, **kwargs)
8503 self.this = newobj.this
8504 self.thisown = 1
8505 del newobj.thisown
8506 def GetMenu(*args, **kwargs):
8507 """GetMenu(self) -> Menu"""
8508 return _core_.MenuItem_GetMenu(*args, **kwargs)
8509
8510 def SetMenu(*args, **kwargs):
8511 """SetMenu(self, Menu menu)"""
8512 return _core_.MenuItem_SetMenu(*args, **kwargs)
8513
8514 def SetId(*args, **kwargs):
8515 """SetId(self, int id)"""
8516 return _core_.MenuItem_SetId(*args, **kwargs)
8517
8518 def GetId(*args, **kwargs):
8519 """GetId(self) -> int"""
8520 return _core_.MenuItem_GetId(*args, **kwargs)
8521
8522 def IsSeparator(*args, **kwargs):
8523 """IsSeparator(self) -> bool"""
8524 return _core_.MenuItem_IsSeparator(*args, **kwargs)
8525
8526 def SetText(*args, **kwargs):
8527 """SetText(self, String str)"""
8528 return _core_.MenuItem_SetText(*args, **kwargs)
8529
8530 def GetLabel(*args, **kwargs):
8531 """GetLabel(self) -> String"""
8532 return _core_.MenuItem_GetLabel(*args, **kwargs)
8533
8534 def GetText(*args, **kwargs):
8535 """GetText(self) -> String"""
8536 return _core_.MenuItem_GetText(*args, **kwargs)
8537
8538 def GetLabelFromText(*args, **kwargs):
8539 """GetLabelFromText(String text) -> String"""
8540 return _core_.MenuItem_GetLabelFromText(*args, **kwargs)
8541
8542 GetLabelFromText = staticmethod(GetLabelFromText)
8543 def GetKind(*args, **kwargs):
8544 """GetKind(self) -> int"""
8545 return _core_.MenuItem_GetKind(*args, **kwargs)
8546
8547 def SetKind(*args, **kwargs):
8548 """SetKind(self, int kind)"""
8549 return _core_.MenuItem_SetKind(*args, **kwargs)
8550
8551 def SetCheckable(*args, **kwargs):
8552 """SetCheckable(self, bool checkable)"""
8553 return _core_.MenuItem_SetCheckable(*args, **kwargs)
8554
8555 def IsCheckable(*args, **kwargs):
8556 """IsCheckable(self) -> bool"""
8557 return _core_.MenuItem_IsCheckable(*args, **kwargs)
8558
8559 def IsSubMenu(*args, **kwargs):
8560 """IsSubMenu(self) -> bool"""
8561 return _core_.MenuItem_IsSubMenu(*args, **kwargs)
8562
8563 def SetSubMenu(*args, **kwargs):
8564 """SetSubMenu(self, Menu menu)"""
8565 return _core_.MenuItem_SetSubMenu(*args, **kwargs)
8566
8567 def GetSubMenu(*args, **kwargs):
8568 """GetSubMenu(self) -> Menu"""
8569 return _core_.MenuItem_GetSubMenu(*args, **kwargs)
8570
8571 def Enable(*args, **kwargs):
8572 """Enable(self, bool enable=True)"""
8573 return _core_.MenuItem_Enable(*args, **kwargs)
8574
8575 def IsEnabled(*args, **kwargs):
8576 """IsEnabled(self) -> bool"""
8577 return _core_.MenuItem_IsEnabled(*args, **kwargs)
8578
8579 def Check(*args, **kwargs):
8580 """Check(self, bool check=True)"""
8581 return _core_.MenuItem_Check(*args, **kwargs)
8582
8583 def IsChecked(*args, **kwargs):
8584 """IsChecked(self) -> bool"""
8585 return _core_.MenuItem_IsChecked(*args, **kwargs)
8586
8587 def Toggle(*args, **kwargs):
8588 """Toggle(self)"""
8589 return _core_.MenuItem_Toggle(*args, **kwargs)
8590
8591 def SetHelp(*args, **kwargs):
8592 """SetHelp(self, String str)"""
8593 return _core_.MenuItem_SetHelp(*args, **kwargs)
8594
8595 def GetHelp(*args, **kwargs):
8596 """GetHelp(self) -> String"""
8597 return _core_.MenuItem_GetHelp(*args, **kwargs)
8598
8599 def GetAccel(*args, **kwargs):
8600 """GetAccel(self) -> AcceleratorEntry"""
8601 return _core_.MenuItem_GetAccel(*args, **kwargs)
8602
8603 def SetAccel(*args, **kwargs):
8604 """SetAccel(self, AcceleratorEntry accel)"""
8605 return _core_.MenuItem_SetAccel(*args, **kwargs)
8606
8607 def GetDefaultMarginWidth(*args, **kwargs):
8608 """GetDefaultMarginWidth() -> int"""
8609 return _core_.MenuItem_GetDefaultMarginWidth(*args, **kwargs)
8610
8611 GetDefaultMarginWidth = staticmethod(GetDefaultMarginWidth)
8612 def SetBitmap(*args, **kwargs):
8613 """SetBitmap(self, Bitmap bitmap)"""
8614 return _core_.MenuItem_SetBitmap(*args, **kwargs)
8615
8616 def GetBitmap(*args, **kwargs):
8617 """GetBitmap(self) -> Bitmap"""
8618 return _core_.MenuItem_GetBitmap(*args, **kwargs)
8619
8620
8621 class MenuItemPtr(MenuItem):
8622 def __init__(self, this):
8623 self.this = this
8624 if not hasattr(self,"thisown"): self.thisown = 0
8625 self.__class__ = MenuItem
8626 _core_.MenuItem_swigregister(MenuItemPtr)
8627
8628 def MenuItem_GetLabelFromText(*args, **kwargs):
8629 """MenuItem_GetLabelFromText(String text) -> String"""
8630 return _core_.MenuItem_GetLabelFromText(*args, **kwargs)
8631
8632 def MenuItem_GetDefaultMarginWidth(*args, **kwargs):
8633 """MenuItem_GetDefaultMarginWidth() -> int"""
8634 return _core_.MenuItem_GetDefaultMarginWidth(*args, **kwargs)
8635
8636 #---------------------------------------------------------------------------
8637
8638 class Control(Window):
8639 """
8640 This is the base class for a control or 'widget'.
8641
8642 A control is generally a small window which processes user input
8643 and/or displays one or more item of data.
8644 """
8645 def __repr__(self):
8646 return "<%s.%s; proxy of C++ wxControl instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
8647 def __init__(self, *args, **kwargs):
8648 """
8649 __init__(self, Window parent, int id=-1, Point pos=DefaultPosition,
8650 Size size=DefaultSize, long style=0, Validator validator=DefaultValidator,
8651 String name=ControlNameStr) -> Control
8652
8653 Create a Control. Normally you should only call this from a subclass'
8654 __init__ as a plain old wx.Control is not very useful.
8655 """
8656 newobj = _core_.new_Control(*args, **kwargs)
8657 self.this = newobj.this
8658 self.thisown = 1
8659 del newobj.thisown
8660 self._setOORInfo(self)
8661
8662 def Create(*args, **kwargs):
8663 """
8664 Create(self, Window parent, int id=-1, Point pos=DefaultPosition,
8665 Size size=DefaultSize, long style=0, Validator validator=DefaultValidator,
8666 String name=ControlNameStr) -> bool
8667
8668 Do the 2nd phase and create the GUI control.
8669 """
8670 return _core_.Control_Create(*args, **kwargs)
8671
8672 def Command(*args, **kwargs):
8673 """
8674 Command(self, CommandEvent event)
8675
8676 Simulates the effect of the user issuing a command to the item.
8677
8678 :see: `wx.CommandEvent`
8679
8680 """
8681 return _core_.Control_Command(*args, **kwargs)
8682
8683 def GetLabel(*args, **kwargs):
8684 """
8685 GetLabel(self) -> String
8686
8687 Return a control's text.
8688 """
8689 return _core_.Control_GetLabel(*args, **kwargs)
8690
8691 def SetLabel(*args, **kwargs):
8692 """
8693 SetLabel(self, String label)
8694
8695 Sets the item's text.
8696 """
8697 return _core_.Control_SetLabel(*args, **kwargs)
8698
8699 def GetClassDefaultAttributes(*args, **kwargs):
8700 """
8701 GetClassDefaultAttributes(int variant=WINDOW_VARIANT_NORMAL) -> VisualAttributes
8702
8703 Get the default attributes for this class. This is useful if you want
8704 to use the same font or colour in your own control as in a standard
8705 control -- which is a much better idea than hard coding specific
8706 colours or fonts which might look completely out of place on the
8707 user's system, especially if it uses themes.
8708
8709 The variant parameter is only relevant under Mac currently and is
8710 ignore under other platforms. Under Mac, it will change the size of
8711 the returned font. See `wx.Window.SetWindowVariant` for more about
8712 this.
8713 """
8714 return _core_.Control_GetClassDefaultAttributes(*args, **kwargs)
8715
8716 GetClassDefaultAttributes = staticmethod(GetClassDefaultAttributes)
8717
8718 class ControlPtr(Control):
8719 def __init__(self, this):
8720 self.this = this
8721 if not hasattr(self,"thisown"): self.thisown = 0
8722 self.__class__ = Control
8723 _core_.Control_swigregister(ControlPtr)
8724 ControlNameStr = cvar.ControlNameStr
8725
8726 def PreControl(*args, **kwargs):
8727 """
8728 PreControl() -> Control
8729
8730 Precreate a Control control for 2-phase creation
8731 """
8732 val = _core_.new_PreControl(*args, **kwargs)
8733 val.thisown = 1
8734 return val
8735
8736 def Control_GetClassDefaultAttributes(*args, **kwargs):
8737 """
8738 Control_GetClassDefaultAttributes(int variant=WINDOW_VARIANT_NORMAL) -> VisualAttributes
8739
8740 Get the default attributes for this class. This is useful if you want
8741 to use the same font or colour in your own control as in a standard
8742 control -- which is a much better idea than hard coding specific
8743 colours or fonts which might look completely out of place on the
8744 user's system, especially if it uses themes.
8745
8746 The variant parameter is only relevant under Mac currently and is
8747 ignore under other platforms. Under Mac, it will change the size of
8748 the returned font. See `wx.Window.SetWindowVariant` for more about
8749 this.
8750 """
8751 return _core_.Control_GetClassDefaultAttributes(*args, **kwargs)
8752
8753 #---------------------------------------------------------------------------
8754
8755 class ItemContainer(object):
8756 """
8757 wx.ItemContainer defines an interface which is implemented by all
8758 controls which have string subitems, each of which may be selected,
8759 such as `wx.ListBox`, `wx.CheckListBox`, `wx.Choice` as well as
8760 `wx.ComboBox` which implements an extended interface deriving from
8761 this one.
8762
8763 It defines the methods for accessing the control's items and although
8764 each of the derived classes implements them differently, they still
8765 all conform to the same interface.
8766
8767 The items in a wx.ItemContainer have (non empty) string labels and,
8768 optionally, client data associated with them.
8769
8770 """
8771 def __init__(self): raise RuntimeError, "No constructor defined"
8772 def __repr__(self):
8773 return "<%s.%s; proxy of C++ wxItemContainer instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
8774 def Append(*args, **kwargs):
8775 """
8776 Append(self, String item, PyObject clientData=None) -> int
8777
8778 Adds the item to the control, associating the given data with the item
8779 if not None. The return value is the index of the newly added item
8780 which may be different from the last one if the control is sorted (e.g.
8781 has wx.LB_SORT or wx.CB_SORT style).
8782 """
8783 return _core_.ItemContainer_Append(*args, **kwargs)
8784
8785 def AppendItems(*args, **kwargs):
8786 """
8787 AppendItems(self, List strings)
8788
8789 Apend several items at once to the control. Notice that calling this
8790 method may be much faster than appending the items one by one if you
8791 need to add a lot of items.
8792 """
8793 return _core_.ItemContainer_AppendItems(*args, **kwargs)
8794
8795 def Insert(*args, **kwargs):
8796 """
8797 Insert(self, String item, int pos, PyObject clientData=None) -> int
8798
8799 Insert an item into the control before the item at the ``pos`` index,
8800 optionally associating some data object with the item.
8801 """
8802 return _core_.ItemContainer_Insert(*args, **kwargs)
8803
8804 def Clear(*args, **kwargs):
8805 """
8806 Clear(self)
8807
8808 Removes all items from the control.
8809 """
8810 return _core_.ItemContainer_Clear(*args, **kwargs)
8811
8812 def Delete(*args, **kwargs):
8813 """
8814 Delete(self, int n)
8815
8816 Deletes the item at the zero-based index 'n' from the control. Note
8817 that it is an error (signalled by a `wx.PyAssertionError` exception if
8818 enabled) to remove an item with the index negative or greater or equal
8819 than the number of items in the control.
8820 """
8821 return _core_.ItemContainer_Delete(*args, **kwargs)
8822
8823 def GetCount(*args, **kwargs):
8824 """
8825 GetCount(self) -> int
8826
8827 Returns the number of items in the control.
8828 """
8829 return _core_.ItemContainer_GetCount(*args, **kwargs)
8830
8831 def IsEmpty(*args, **kwargs):
8832 """
8833 IsEmpty(self) -> bool
8834
8835 Returns True if the control is empty or False if it has some items.
8836 """
8837 return _core_.ItemContainer_IsEmpty(*args, **kwargs)
8838
8839 def GetString(*args, **kwargs):
8840 """
8841 GetString(self, int n) -> String
8842
8843 Returns the label of the item with the given index.
8844 """
8845 return _core_.ItemContainer_GetString(*args, **kwargs)
8846
8847 def GetStrings(*args, **kwargs):
8848 """GetStrings(self) -> wxArrayString"""
8849 return _core_.ItemContainer_GetStrings(*args, **kwargs)
8850
8851 def SetString(*args, **kwargs):
8852 """
8853 SetString(self, int n, String s)
8854
8855 Sets the label for the given item.
8856 """
8857 return _core_.ItemContainer_SetString(*args, **kwargs)
8858
8859 def FindString(*args, **kwargs):
8860 """
8861 FindString(self, String s) -> int
8862
8863 Finds an item whose label matches the given string. Returns the
8864 zero-based position of the item, or ``wx.NOT_FOUND`` if the string was not
8865 found.
8866 """
8867 return _core_.ItemContainer_FindString(*args, **kwargs)
8868
8869 def Select(*args, **kwargs):
8870 """
8871 Select(self, int n)
8872
8873 Sets the item at index 'n' to be the selected item.
8874 """
8875 return _core_.ItemContainer_Select(*args, **kwargs)
8876
8877 SetSelection = Select
8878 def GetSelection(*args, **kwargs):
8879 """
8880 GetSelection(self) -> int
8881
8882 Returns the index of the selected item or ``wx.NOT_FOUND`` if no item
8883 is selected.
8884 """
8885 return _core_.ItemContainer_GetSelection(*args, **kwargs)
8886
8887 def GetStringSelection(*args, **kwargs):
8888 """
8889 GetStringSelection(self) -> String
8890
8891 Returns the label of the selected item or an empty string if no item
8892 is selected.
8893 """
8894 return _core_.ItemContainer_GetStringSelection(*args, **kwargs)
8895
8896 def GetClientData(*args, **kwargs):
8897 """
8898 GetClientData(self, int n) -> PyObject
8899
8900 Returns the client data associated with the given item, (if any.)
8901 """
8902 return _core_.ItemContainer_GetClientData(*args, **kwargs)
8903
8904 def SetClientData(*args, **kwargs):
8905 """
8906 SetClientData(self, int n, PyObject clientData)
8907
8908 Associate the given client data with the item at position n.
8909 """
8910 return _core_.ItemContainer_SetClientData(*args, **kwargs)
8911
8912
8913 class ItemContainerPtr(ItemContainer):
8914 def __init__(self, this):
8915 self.this = this
8916 if not hasattr(self,"thisown"): self.thisown = 0
8917 self.__class__ = ItemContainer
8918 _core_.ItemContainer_swigregister(ItemContainerPtr)
8919
8920 #---------------------------------------------------------------------------
8921
8922 class ControlWithItems(Control,ItemContainer):
8923 """
8924 wx.ControlWithItems combines the ``wx.ItemContainer`` class with the
8925 wx.Control class, and is used for the base class of various controls
8926 that have items.
8927 """
8928 def __init__(self): raise RuntimeError, "No constructor defined"
8929 def __repr__(self):
8930 return "<%s.%s; proxy of C++ wxControlWithItems instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
8931
8932 class ControlWithItemsPtr(ControlWithItems):
8933 def __init__(self, this):
8934 self.this = this
8935 if not hasattr(self,"thisown"): self.thisown = 0
8936 self.__class__ = ControlWithItems
8937 _core_.ControlWithItems_swigregister(ControlWithItemsPtr)
8938
8939 #---------------------------------------------------------------------------
8940
8941 class SizerItem(Object):
8942 """
8943 The wx.SizerItem class is used to track the position, size and other
8944 attributes of each item managed by a `wx.Sizer`. In normal usage user
8945 code should never need to deal directly with a wx.SizerItem, but
8946 custom classes derived from `wx.PySizer` will probably need to use the
8947 collection of wx.SizerItems held by wx.Sizer when calculating layout.
8948
8949 :see: `wx.Sizer`, `wx.GBSizerItem`
8950 """
8951 def __repr__(self):
8952 return "<%s.%s; proxy of C++ wxSizerItem instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
8953 def __init__(self, *args, **kwargs):
8954 """
8955 __init__(self) -> SizerItem
8956
8957 Constructs an empty wx.SizerItem. Either a window, sizer or spacer
8958 size will need to be set before this item can be used in a Sizer.
8959
8960 You will probably never need to create a wx.SizerItem directly as they
8961 are created automatically when the sizer's Add, Insert or Prepend
8962 methods are called.
8963
8964 :see: `wx.SizerItemSpacer`, `wx.SizerItemWindow`, `wx.SizerItemSizer`
8965 """
8966 newobj = _core_.new_SizerItem(*args, **kwargs)
8967 self.this = newobj.this
8968 self.thisown = 1
8969 del newobj.thisown
8970 def DeleteWindows(*args, **kwargs):
8971 """
8972 DeleteWindows(self)
8973
8974 Destroy the window or the windows in a subsizer, depending on the type
8975 of item.
8976 """
8977 return _core_.SizerItem_DeleteWindows(*args, **kwargs)
8978
8979 def DetachSizer(*args, **kwargs):
8980 """
8981 DetachSizer(self)
8982
8983 Enable deleting the SizerItem without destroying the contained sizer.
8984 """
8985 return _core_.SizerItem_DetachSizer(*args, **kwargs)
8986
8987 def GetSize(*args, **kwargs):
8988 """
8989 GetSize(self) -> Size
8990
8991 Get the current size of the item, as set in the last Layout.
8992 """
8993 return _core_.SizerItem_GetSize(*args, **kwargs)
8994
8995 def CalcMin(*args, **kwargs):
8996 """
8997 CalcMin(self) -> Size
8998
8999 Calculates the minimum desired size for the item, including any space
9000 needed by borders.
9001 """
9002 return _core_.SizerItem_CalcMin(*args, **kwargs)
9003
9004 def SetDimension(*args, **kwargs):
9005 """
9006 SetDimension(self, Point pos, Size size)
9007
9008 Set the position and size of the space allocated for this item by the
9009 sizer, and adjust the position and size of the item (window or
9010 subsizer) to be within that space taking alignment and borders into
9011 account.
9012 """
9013 return _core_.SizerItem_SetDimension(*args, **kwargs)
9014
9015 def GetMinSize(*args, **kwargs):
9016 """
9017 GetMinSize(self) -> Size
9018
9019 Get the minimum size needed for the item.
9020 """
9021 return _core_.SizerItem_GetMinSize(*args, **kwargs)
9022
9023 def GetMinSizeWithBorder(*args, **kwargs):
9024 """
9025 GetMinSizeWithBorder(self) -> Size
9026
9027 Get the minimum size needed for the item with space for the borders
9028 added, if needed.
9029 """
9030 return _core_.SizerItem_GetMinSizeWithBorder(*args, **kwargs)
9031
9032 def SetInitSize(*args, **kwargs):
9033 """SetInitSize(self, int x, int y)"""
9034 return _core_.SizerItem_SetInitSize(*args, **kwargs)
9035
9036 def SetRatioWH(*args, **kwargs):
9037 """
9038 SetRatioWH(self, int width, int height)
9039
9040 Set the ratio item attribute.
9041 """
9042 return _core_.SizerItem_SetRatioWH(*args, **kwargs)
9043
9044 def SetRatioSize(*args, **kwargs):
9045 """
9046 SetRatioSize(self, Size size)
9047
9048 Set the ratio item attribute.
9049 """
9050 return _core_.SizerItem_SetRatioSize(*args, **kwargs)
9051
9052 def SetRatio(*args, **kwargs):
9053 """
9054 SetRatio(self, float ratio)
9055
9056 Set the ratio item attribute.
9057 """
9058 return _core_.SizerItem_SetRatio(*args, **kwargs)
9059
9060 def GetRatio(*args, **kwargs):
9061 """
9062 GetRatio(self) -> float
9063
9064 Set the ratio item attribute.
9065 """
9066 return _core_.SizerItem_GetRatio(*args, **kwargs)
9067
9068 def GetRect(*args, **kwargs):
9069 """
9070 GetRect(self) -> Rect
9071
9072 Returns the rectangle that the sizer item should occupy
9073 """
9074 return _core_.SizerItem_GetRect(*args, **kwargs)
9075
9076 def IsWindow(*args, **kwargs):
9077 """
9078 IsWindow(self) -> bool
9079
9080 Is this sizer item a window?
9081 """
9082 return _core_.SizerItem_IsWindow(*args, **kwargs)
9083
9084 def IsSizer(*args, **kwargs):
9085 """
9086 IsSizer(self) -> bool
9087
9088 Is this sizer item a subsizer?
9089 """
9090 return _core_.SizerItem_IsSizer(*args, **kwargs)
9091
9092 def IsSpacer(*args, **kwargs):
9093 """
9094 IsSpacer(self) -> bool
9095
9096 Is this sizer item a spacer?
9097 """
9098 return _core_.SizerItem_IsSpacer(*args, **kwargs)
9099
9100 def SetProportion(*args, **kwargs):
9101 """
9102 SetProportion(self, int proportion)
9103
9104 Set the proportion value for this item.
9105 """
9106 return _core_.SizerItem_SetProportion(*args, **kwargs)
9107
9108 def GetProportion(*args, **kwargs):
9109 """
9110 GetProportion(self) -> int
9111
9112 Get the proportion value for this item.
9113 """
9114 return _core_.SizerItem_GetProportion(*args, **kwargs)
9115
9116 SetOption = wx._deprecated(SetProportion, "Please use `SetProportion` instead.")
9117 GetOption = wx._deprecated(GetProportion, "Please use `GetProportion` instead.")
9118 def SetFlag(*args, **kwargs):
9119 """
9120 SetFlag(self, int flag)
9121
9122 Set the flag value for this item.
9123 """
9124 return _core_.SizerItem_SetFlag(*args, **kwargs)
9125
9126 def GetFlag(*args, **kwargs):
9127 """
9128 GetFlag(self) -> int
9129
9130 Get the flag value for this item.
9131 """
9132 return _core_.SizerItem_GetFlag(*args, **kwargs)
9133
9134 def SetBorder(*args, **kwargs):
9135 """
9136 SetBorder(self, int border)
9137
9138 Set the border value for this item.
9139 """
9140 return _core_.SizerItem_SetBorder(*args, **kwargs)
9141
9142 def GetBorder(*args, **kwargs):
9143 """
9144 GetBorder(self) -> int
9145
9146 Get the border value for this item.
9147 """
9148 return _core_.SizerItem_GetBorder(*args, **kwargs)
9149
9150 def GetWindow(*args, **kwargs):
9151 """
9152 GetWindow(self) -> Window
9153
9154 Get the window (if any) that is managed by this sizer item.
9155 """
9156 return _core_.SizerItem_GetWindow(*args, **kwargs)
9157
9158 def SetWindow(*args, **kwargs):
9159 """
9160 SetWindow(self, Window window)
9161
9162 Set the window to be managed by this sizer item.
9163 """
9164 return _core_.SizerItem_SetWindow(*args, **kwargs)
9165
9166 def GetSizer(*args, **kwargs):
9167 """
9168 GetSizer(self) -> Sizer
9169
9170 Get the subsizer (if any) that is managed by this sizer item.
9171 """
9172 return _core_.SizerItem_GetSizer(*args, **kwargs)
9173
9174 def SetSizer(*args, **kwargs):
9175 """
9176 SetSizer(self, Sizer sizer)
9177
9178 Set the subsizer to be managed by this sizer item.
9179 """
9180 return _core_.SizerItem_SetSizer(*args, **kwargs)
9181
9182 def GetSpacer(*args, **kwargs):
9183 """
9184 GetSpacer(self) -> Size
9185
9186 Get the size of the spacer managed by this sizer item.
9187 """
9188 return _core_.SizerItem_GetSpacer(*args, **kwargs)
9189
9190 def SetSpacer(*args, **kwargs):
9191 """
9192 SetSpacer(self, Size size)
9193
9194 Set the size of the spacer to be managed by this sizer item.
9195 """
9196 return _core_.SizerItem_SetSpacer(*args, **kwargs)
9197
9198 def Show(*args, **kwargs):
9199 """
9200 Show(self, bool show)
9201
9202 Set the show item attribute, which sizers use to determine if the item
9203 is to be made part of the layout or not. If the item is tracking a
9204 window then it is shown or hidden as needed.
9205 """
9206 return _core_.SizerItem_Show(*args, **kwargs)
9207
9208 def IsShown(*args, **kwargs):
9209 """
9210 IsShown(self) -> bool
9211
9212 Is the item to be shown in the layout?
9213 """
9214 return _core_.SizerItem_IsShown(*args, **kwargs)
9215
9216 def GetPosition(*args, **kwargs):
9217 """
9218 GetPosition(self) -> Point
9219
9220 Returns the current position of the item, as set in the last Layout.
9221 """
9222 return _core_.SizerItem_GetPosition(*args, **kwargs)
9223
9224 def GetUserData(*args, **kwargs):
9225 """
9226 GetUserData(self) -> PyObject
9227
9228 Returns the userData associated with this sizer item, or None if there
9229 isn't any.
9230 """
9231 return _core_.SizerItem_GetUserData(*args, **kwargs)
9232
9233
9234 class SizerItemPtr(SizerItem):
9235 def __init__(self, this):
9236 self.this = this
9237 if not hasattr(self,"thisown"): self.thisown = 0
9238 self.__class__ = SizerItem
9239 _core_.SizerItem_swigregister(SizerItemPtr)
9240
9241 def SizerItemWindow(*args, **kwargs):
9242 """
9243 SizerItemWindow(Window window, int proportion, int flag, int border,
9244 PyObject userData=None) -> SizerItem
9245
9246 Constructs a `wx.SizerItem` for tracking a window.
9247 """
9248 val = _core_.new_SizerItemWindow(*args, **kwargs)
9249 val.thisown = 1
9250 return val
9251
9252 def SizerItemSpacer(*args, **kwargs):
9253 """
9254 SizerItemSpacer(int width, int height, int proportion, int flag, int border,
9255 PyObject userData=None) -> SizerItem
9256
9257 Constructs a `wx.SizerItem` for tracking a spacer.
9258 """
9259 val = _core_.new_SizerItemSpacer(*args, **kwargs)
9260 val.thisown = 1
9261 return val
9262
9263 def SizerItemSizer(*args, **kwargs):
9264 """
9265 SizerItemSizer(Sizer sizer, int proportion, int flag, int border,
9266 PyObject userData=None) -> SizerItem
9267
9268 Constructs a `wx.SizerItem` for tracking a subsizer
9269 """
9270 val = _core_.new_SizerItemSizer(*args, **kwargs)
9271 val.thisown = 1
9272 return val
9273
9274 class Sizer(Object):
9275 """
9276 wx.Sizer is the abstract base class used for laying out subwindows in
9277 a window. You cannot use wx.Sizer directly; instead, you will have to
9278 use one of the sizer classes derived from it such as `wx.BoxSizer`,
9279 `wx.StaticBoxSizer`, `wx.NotebookSizer`, `wx.GridSizer`, `wx.FlexGridSizer`
9280 and `wx.GridBagSizer`.
9281
9282 The concept implemented by sizers in wxWidgets is closely related to
9283 layout tools in other GUI toolkits, such as Java's AWT, the GTK
9284 toolkit or the Qt toolkit. It is based upon the idea of the individual
9285 subwindows reporting their minimal required size and their ability to
9286 get stretched if the size of the parent window has changed. This will
9287 most often mean that the programmer does not set the original size of
9288 a dialog in the beginning, rather the dialog will assigned a sizer and
9289 this sizer will be queried about the recommended size. The sizer in
9290 turn will query its children, which can be normal windows or contorls,
9291 empty space or other sizers, so that a hierarchy of sizers can be
9292 constructed. Note that wxSizer does not derive from wxWindow and thus
9293 do not interfere with tab ordering and requires very little resources
9294 compared to a real window on screen.
9295
9296 What makes sizers so well fitted for use in wxWidgets is the fact that
9297 every control reports its own minimal size and the algorithm can
9298 handle differences in font sizes or different window (dialog item)
9299 sizes on different platforms without problems. If for example the
9300 standard font as well as the overall design of Mac widgets requires
9301 more space than on Windows, then the initial size of a dialog using a
9302 sizer will automatically be bigger on Mac than on Windows.
9303 """
9304 def __init__(self): raise RuntimeError, "No constructor defined"
9305 def __repr__(self):
9306 return "<%s.%s; proxy of C++ wxSizer instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
9307 def _setOORInfo(*args, **kwargs):
9308 """_setOORInfo(self, PyObject _self)"""
9309 return _core_.Sizer__setOORInfo(*args, **kwargs)
9310
9311 def Add(*args, **kwargs):
9312 """
9313 Add(self, item, int proportion=0, int flag=0, int border=0,
9314 PyObject userData=None) -> wx.SizerItem
9315
9316 Appends a child item to the sizer.
9317 """
9318 return _core_.Sizer_Add(*args, **kwargs)
9319
9320 def Insert(*args, **kwargs):
9321 """
9322 Insert(self, int before, item, int proportion=0, int flag=0, int border=0,
9323 PyObject userData=None) -> wx.SizerItem
9324
9325 Inserts a new item into the list of items managed by this sizer before
9326 the item at index *before*. See `Add` for a description of the parameters.
9327 """
9328 return _core_.Sizer_Insert(*args, **kwargs)
9329
9330 def Prepend(*args, **kwargs):
9331 """
9332 Prepend(self, item, int proportion=0, int flag=0, int border=0,
9333 PyObject userData=None) -> wx.SizerItem
9334
9335 Adds a new item to the begining of the list of sizer items managed by
9336 this sizer. See `Add` for a description of the parameters.
9337 """
9338 return _core_.Sizer_Prepend(*args, **kwargs)
9339
9340 def Remove(*args, **kwargs):
9341 """
9342 Remove(self, item) -> bool
9343
9344 Removes an item from the sizer and destroys it. This method does not
9345 cause any layout or resizing to take place, call `Layout` to update
9346 the layout on screen after removing a child from the sizer. The
9347 *item* parameter can be either a window, a sizer, or the zero-based
9348 index of an item to remove. Returns True if the child item was found
9349 and removed.
9350 """
9351 return _core_.Sizer_Remove(*args, **kwargs)
9352
9353 def Detach(*args, **kwargs):
9354 """
9355 Detach(self, item) -> bool
9356
9357 Detaches an item from the sizer without destroying it. This method
9358 does not cause any layout or resizing to take place, call `Layout` to
9359 do so. The *item* parameter can be either a window, a sizer, or the
9360 zero-based index of the item to be detached. Returns True if the child item
9361 was found and detached.
9362 """
9363 return _core_.Sizer_Detach(*args, **kwargs)
9364
9365 def GetItem(*args, **kwargs):
9366 """
9367 GetItem(self, item) -> wx.SizerItem
9368
9369 Returns the `wx.SizerItem` which holds the *item* given. The *item*
9370 parameter can be either a window, a sizer, or the zero-based index of
9371 the item to be detached.
9372 """
9373 return _core_.Sizer_GetItem(*args, **kwargs)
9374
9375 def _SetItemMinSize(*args, **kwargs):
9376 """_SetItemMinSize(self, PyObject item, Size size)"""
9377 return _core_.Sizer__SetItemMinSize(*args, **kwargs)
9378
9379 def SetItemMinSize(self, item, *args):
9380 """
9381 SetItemMinSize(self, item, Size size)
9382
9383 Sets the minimum size that will be allocated for an item in the sizer.
9384 The *item* parameter can be either a window, a sizer, or the
9385 zero-based index of the item. If a window or sizer is given then it
9386 will be searched for recursivly in subsizers if neccessary.
9387 """
9388 if len(args) == 2:
9389 # for backward compatibility accept separate width,height args too
9390 return self._SetItemMinSize(item, args)
9391 else:
9392 return self._SetItemMinSize(item, args[0])
9393
9394 def AddItem(*args, **kwargs):
9395 """
9396 AddItem(self, SizerItem item)
9397
9398 Adds a `wx.SizerItem` to the sizer.
9399 """
9400 return _core_.Sizer_AddItem(*args, **kwargs)
9401
9402 def InsertItem(*args, **kwargs):
9403 """
9404 InsertItem(self, int index, SizerItem item)
9405
9406 Inserts a `wx.SizerItem` to the sizer at the position given by *index*.
9407 """
9408 return _core_.Sizer_InsertItem(*args, **kwargs)
9409
9410 def PrependItem(*args, **kwargs):
9411 """
9412 PrependItem(self, SizerItem item)
9413
9414 Prepends a `wx.SizerItem` to the sizer.
9415 """
9416 return _core_.Sizer_PrependItem(*args, **kwargs)
9417
9418 def AddMany(self, items):
9419 """
9420 AddMany is a convenience method for adding several items
9421 to a sizer at one time. Simply pass it a list of tuples,
9422 where each tuple consists of the parameters that you
9423 would normally pass to the `Add` method.
9424 """
9425 for item in items:
9426 if type(item) != type(()) or (len(item) == 2 and type(item[0]) == type(1)):
9427 item = (item, )
9428 self.Add(*item)
9429
9430 # for backwards compatibility only, please do not use in new code
9431 AddWindow = wx._deprecated(Add, "AddWindow is deprecated, use `Add` instead.")
9432 AddSizer = wx._deprecated(Add, "AddSizer is deprecated, use `Add` instead.")
9433 AddSpacer = wx._deprecated(Add, "AddSpacer is deprecated, use `Add` instead.")
9434 PrependWindow = wx._deprecated(Prepend, "PrependWindow is deprecated, use `Prepend` instead.")
9435 PrependSizer = wx._deprecated(Prepend, "PrependSizer is deprecated, use `Prepend` instead.")
9436 PrependSpacer = wx._deprecated(Prepend, "PrependSpacer is deprecated, use `Prepend` instead.")
9437 InsertWindow = wx._deprecated(Insert, "InsertWindow is deprecated, use `Insert` instead.")
9438 InsertSizer = wx._deprecated(Insert, "InsertSizer is deprecated, use `Insert` instead.")
9439 InsertSpacer = wx._deprecated(Insert, "InsertSpacer is deprecated, use `Insert` instead.")
9440 RemoveWindow = wx._deprecated(Remove, "RemoveWindow is deprecated, use `Remove` instead.")
9441 RemoveSizer = wx._deprecated(Remove, "RemoveSizer is deprecated, use `Remove` instead.")
9442 RemovePos = wx._deprecated(Remove, "RemovePos is deprecated, use `Remove` instead.")
9443
9444
9445 def SetDimension(*args, **kwargs):
9446 """
9447 SetDimension(self, int x, int y, int width, int height)
9448
9449 Call this to force the sizer to take the given dimension and thus
9450 force the items owned by the sizer to resize themselves according to
9451 the rules defined by the parameter in the `Add`, `Insert` or `Prepend`
9452 methods.
9453 """
9454 return _core_.Sizer_SetDimension(*args, **kwargs)
9455
9456 def SetMinSize(*args, **kwargs):
9457 """
9458 SetMinSize(self, Size size)
9459
9460 Call this to give the sizer a minimal size. Normally, the sizer will
9461 calculate its minimal size based purely on how much space its children
9462 need. After calling this method `GetMinSize` will return either the
9463 minimal size as requested by its children or the minimal size set
9464 here, depending on which is bigger.
9465 """
9466 return _core_.Sizer_SetMinSize(*args, **kwargs)
9467
9468 def GetSize(*args, **kwargs):
9469 """
9470 GetSize(self) -> Size
9471
9472 Returns the current size of the space managed by the sizer.
9473 """
9474 return _core_.Sizer_GetSize(*args, **kwargs)
9475
9476 def GetPosition(*args, **kwargs):
9477 """
9478 GetPosition(self) -> Point
9479
9480 Returns the current position of the sizer's managed space.
9481 """
9482 return _core_.Sizer_GetPosition(*args, **kwargs)
9483
9484 def GetMinSize(*args, **kwargs):
9485 """
9486 GetMinSize(self) -> Size
9487
9488 Returns the minimal size of the sizer. This is either the combined
9489 minimal size of all the children and their borders or the minimal size
9490 set by SetMinSize, depending on which is bigger.
9491 """
9492 return _core_.Sizer_GetMinSize(*args, **kwargs)
9493
9494 def GetSizeTuple(self):
9495 return self.GetSize().Get()
9496 def GetPositionTuple(self):
9497 return self.GetPosition().Get()
9498 def GetMinSizeTuple(self):
9499 return self.GetMinSize().Get()
9500
9501 def RecalcSizes(*args, **kwargs):
9502 """
9503 RecalcSizes(self)
9504
9505 Using the sizes calculated by `CalcMin` reposition and resize all the
9506 items managed by this sizer. You should not need to call this directly as
9507 it is called by `Layout`.
9508 """
9509 return _core_.Sizer_RecalcSizes(*args, **kwargs)
9510
9511 def CalcMin(*args, **kwargs):
9512 """
9513 CalcMin(self) -> Size
9514
9515 This method is where the sizer will do the actual calculation of its
9516 children's minimal sizes. You should not need to call this directly as
9517 it is called by `Layout`.
9518 """
9519 return _core_.Sizer_CalcMin(*args, **kwargs)
9520
9521 def Layout(*args, **kwargs):
9522 """
9523 Layout(self)
9524
9525 This method will force the recalculation and layout of the items
9526 controlled by the sizer using the current space allocated to the
9527 sizer. Normally this is called automatically from the owning window's
9528 EVT_SIZE handler, but it is also useful to call it from user code when
9529 one of the items in a sizer change size, or items are added or
9530 removed.
9531 """
9532 return _core_.Sizer_Layout(*args, **kwargs)
9533
9534 def Fit(*args, **kwargs):
9535 """
9536 Fit(self, Window window) -> Size
9537
9538 Tell the sizer to resize the *window* to match the sizer's minimal
9539 size. This is commonly done in the constructor of the window itself in
9540 order to set its initial size to match the needs of the children as
9541 determined by the sizer. Returns the new size.
9542
9543 For a top level window this is the total window size, not the client size.
9544 """
9545 return _core_.Sizer_Fit(*args, **kwargs)
9546
9547 def FitInside(*args, **kwargs):
9548 """
9549 FitInside(self, Window window)
9550
9551 Tell the sizer to resize the *virtual size* of the *window* to match the
9552 sizer's minimal size. This will not alter the on screen size of the
9553 window, but may cause the addition/removal/alteration of scrollbars
9554 required to view the virtual area in windows which manage it.
9555
9556 :see: `wx.ScrolledWindow.SetScrollbars`, `SetVirtualSizeHints`
9557
9558 """
9559 return _core_.Sizer_FitInside(*args, **kwargs)
9560
9561 def SetSizeHints(*args, **kwargs):
9562 """
9563 SetSizeHints(self, Window window)
9564
9565 Tell the sizer to set (and `Fit`) the minimal size of the *window* to
9566 match the sizer's minimal size. This is commonly done in the
9567 constructor of the window itself if the window is resizable (as are
9568 many dialogs under Unix and frames on probably all platforms) in order
9569 to prevent the window from being sized smaller than the minimal size
9570 required by the sizer.
9571 """
9572 return _core_.Sizer_SetSizeHints(*args, **kwargs)
9573
9574 def SetVirtualSizeHints(*args, **kwargs):
9575 """
9576 SetVirtualSizeHints(self, Window window)
9577
9578 Tell the sizer to set the minimal size of the window virtual area to
9579 match the sizer's minimal size. For windows with managed scrollbars
9580 this will set them appropriately.
9581
9582 :see: `wx.ScrolledWindow.SetScrollbars`
9583
9584 """
9585 return _core_.Sizer_SetVirtualSizeHints(*args, **kwargs)
9586
9587 def Clear(*args, **kwargs):
9588 """
9589 Clear(self, bool deleteWindows=False)
9590
9591 Clear all items from the sizer, optionally destroying the window items
9592 as well.
9593 """
9594 return _core_.Sizer_Clear(*args, **kwargs)
9595
9596 def DeleteWindows(*args, **kwargs):
9597 """
9598 DeleteWindows(self)
9599
9600 Destroy all windows managed by the sizer.
9601 """
9602 return _core_.Sizer_DeleteWindows(*args, **kwargs)
9603
9604 def GetChildren(*args, **kwargs):
9605 """
9606 GetChildren(sefl) -> list
9607
9608 Returns a list of all the `wx.SizerItem` objects managed by the sizer.
9609 """
9610 return _core_.Sizer_GetChildren(*args, **kwargs)
9611
9612 def Show(*args, **kwargs):
9613 """
9614 Show(self, item, bool show=True, bool recursive=false) -> bool
9615
9616 Shows or hides an item managed by the sizer. To make a sizer item
9617 disappear or reappear, use Show followed by `Layout`. The *item*
9618 parameter can be either a window, a sizer, or the zero-based index of
9619 the item. Use the recursive parameter to show or hide an item in a
9620 subsizer. Returns True if the item was found.
9621 """
9622 return _core_.Sizer_Show(*args, **kwargs)
9623
9624 def IsShown(*args, **kwargs):
9625 """
9626 IsShown(self, item)
9627
9628 Determines if the item is currently shown. sizer. To make a sizer
9629 item disappear or reappear, use Show followed by `Layout`. The *item*
9630 parameter can be either a window, a sizer, or the zero-based index of
9631 the item.
9632 """
9633 return _core_.Sizer_IsShown(*args, **kwargs)
9634
9635 def Hide(self, item, recursive=False):
9636 """
9637 A convenience method for Show(item, False, recursive).
9638 """
9639 return self.Show(item, False, recursive)
9640
9641 def ShowItems(*args, **kwargs):
9642 """
9643 ShowItems(self, bool show)
9644
9645 Recursively call `wx.SizerItem.Show` on all sizer items.
9646 """
9647 return _core_.Sizer_ShowItems(*args, **kwargs)
9648
9649
9650 class SizerPtr(Sizer):
9651 def __init__(self, this):
9652 self.this = this
9653 if not hasattr(self,"thisown"): self.thisown = 0
9654 self.__class__ = Sizer
9655 _core_.Sizer_swigregister(SizerPtr)
9656
9657 class PySizer(Sizer):
9658 """
9659 wx.PySizer is a special version of `wx.Sizer` that has been
9660 instrumented to allow the C++ virtual methods to be overloaded in
9661 Python derived classes. You would derive from this class if you are
9662 wanting to implement a custom sizer in Python code. Simply implement
9663 `CalcMin` and `RecalcSizes` in the derived class and you're all set.
9664 For example::
9665
9666 class MySizer(wx.PySizer):
9667 def __init__(self):
9668 wx.PySizer.__init__(self)
9669
9670 def CalcMin(self):
9671 for item in self.GetChildren():
9672 # calculate the total minimum width and height needed
9673 # by all items in the sizer according to this sizer's
9674 # layout algorithm.
9675 ...
9676 return wx.Size(width, height)
9677
9678 def RecalcSizes(self):
9679 # find the space allotted to this sizer
9680 pos = self.GetPosition()
9681 size = self.GetSize()
9682 for item in self.GetChildren():
9683 # Recalculate (if necessary) the position and size of
9684 # each item and then call item.SetDimension to do the
9685 # actual positioning and sizing of the items within the
9686 # space alloted to this sizer.
9687 ...
9688 item.SetDimension(itemPos, itemSize)
9689
9690
9691 When `Layout` is called it first calls `CalcMin` followed by
9692 `RecalcSizes` so you can optimize a bit by saving the results of
9693 `CalcMin` and resuing them in `RecalcSizes`.
9694
9695 :see: `wx.SizerItem`, `wx.Sizer.GetChildren`
9696
9697
9698 """
9699 def __repr__(self):
9700 return "<%s.%s; proxy of C++ wxPySizer instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
9701 def __init__(self, *args, **kwargs):
9702 """
9703 __init__(self) -> PySizer
9704
9705 Creates a wx.PySizer. Must be called from the __init__ in the derived
9706 class.
9707 """
9708 newobj = _core_.new_PySizer(*args, **kwargs)
9709 self.this = newobj.this
9710 self.thisown = 1
9711 del newobj.thisown
9712 self._setCallbackInfo(self, PySizer);self._setOORInfo(self)
9713
9714 def _setCallbackInfo(*args, **kwargs):
9715 """_setCallbackInfo(self, PyObject self, PyObject _class)"""
9716 return _core_.PySizer__setCallbackInfo(*args, **kwargs)
9717
9718
9719 class PySizerPtr(PySizer):
9720 def __init__(self, this):
9721 self.this = this
9722 if not hasattr(self,"thisown"): self.thisown = 0
9723 self.__class__ = PySizer
9724 _core_.PySizer_swigregister(PySizerPtr)
9725
9726 #---------------------------------------------------------------------------
9727
9728 class BoxSizer(Sizer):
9729 """
9730 The basic idea behind a box sizer is that windows will most often be
9731 laid out in rather simple basic geometry, typically in a row or a
9732 column or nested hierarchies of either. A wx.BoxSizer will lay out
9733 its items in a simple row or column, depending on the orientation
9734 parameter passed to the constructor.
9735 """
9736 def __repr__(self):
9737 return "<%s.%s; proxy of C++ wxBoxSizer instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
9738 def __init__(self, *args, **kwargs):
9739 """
9740 __init__(self, int orient=HORIZONTAL) -> BoxSizer
9741
9742 Constructor for a wx.BoxSizer. *orient* may be one of ``wx.VERTICAL``
9743 or ``wx.HORIZONTAL`` for creating either a column sizer or a row
9744 sizer.
9745 """
9746 newobj = _core_.new_BoxSizer(*args, **kwargs)
9747 self.this = newobj.this
9748 self.thisown = 1
9749 del newobj.thisown
9750 self._setOORInfo(self)
9751
9752 def GetOrientation(*args, **kwargs):
9753 """
9754 GetOrientation(self) -> int
9755
9756 Returns the current orientation of the sizer.
9757 """
9758 return _core_.BoxSizer_GetOrientation(*args, **kwargs)
9759
9760 def SetOrientation(*args, **kwargs):
9761 """
9762 SetOrientation(self, int orient)
9763
9764 Resets the orientation of the sizer.
9765 """
9766 return _core_.BoxSizer_SetOrientation(*args, **kwargs)
9767
9768
9769 class BoxSizerPtr(BoxSizer):
9770 def __init__(self, this):
9771 self.this = this
9772 if not hasattr(self,"thisown"): self.thisown = 0
9773 self.__class__ = BoxSizer
9774 _core_.BoxSizer_swigregister(BoxSizerPtr)
9775
9776 #---------------------------------------------------------------------------
9777
9778 class StaticBoxSizer(BoxSizer):
9779 """
9780 wx.StaticBoxSizer derives from and functions identically to the
9781 `wx.BoxSizer` and adds a `wx.StaticBox` around the items that the sizer
9782 manages. Note that this static box must be created separately and
9783 passed to the sizer constructor.
9784 """
9785 def __repr__(self):
9786 return "<%s.%s; proxy of C++ wxStaticBoxSizer instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
9787 def __init__(self, *args, **kwargs):
9788 """
9789 __init__(self, StaticBox box, int orient=HORIZONTAL) -> StaticBoxSizer
9790
9791 Constructor. It takes an associated static box and the orientation
9792 *orient* as parameters - orient can be either of ``wx.VERTICAL`` or
9793 ``wx.HORIZONTAL``.
9794 """
9795 newobj = _core_.new_StaticBoxSizer(*args, **kwargs)
9796 self.this = newobj.this
9797 self.thisown = 1
9798 del newobj.thisown
9799 self._setOORInfo(self)
9800
9801 def GetStaticBox(*args, **kwargs):
9802 """
9803 GetStaticBox(self) -> StaticBox
9804
9805 Returns the static box associated with this sizer.
9806 """
9807 return _core_.StaticBoxSizer_GetStaticBox(*args, **kwargs)
9808
9809
9810 class StaticBoxSizerPtr(StaticBoxSizer):
9811 def __init__(self, this):
9812 self.this = this
9813 if not hasattr(self,"thisown"): self.thisown = 0
9814 self.__class__ = StaticBoxSizer
9815 _core_.StaticBoxSizer_swigregister(StaticBoxSizerPtr)
9816
9817 #---------------------------------------------------------------------------
9818
9819 class GridSizer(Sizer):
9820 """
9821 A grid sizer is a sizer which lays out its children in a
9822 two-dimensional table with all cells having the same size. In other
9823 words, the width of each cell within the grid is the width of the
9824 widest item added to the sizer and the height of each grid cell is the
9825 height of the tallest item. An optional vertical and/or horizontal
9826 gap between items can also be specified (in pixels.)
9827
9828 Items are placed in the cells of the grid in the order they are added,
9829 in row-major order. In other words, the first row is filled first,
9830 then the second, and so on until all items have been added. (If
9831 neccessary, additional rows will be added as items are added.) If you
9832 need to have greater control over the cells that items are placed in
9833 then use the `wx.GridBagSizer`.
9834
9835 """
9836 def __repr__(self):
9837 return "<%s.%s; proxy of C++ wxGridSizer instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
9838 def __init__(self, *args, **kwargs):
9839 """
9840 __init__(self, int rows=1, int cols=0, int vgap=0, int hgap=0) -> GridSizer
9841
9842 Constructor for a wx.GridSizer. *rows* and *cols* determine the number
9843 of columns and rows in the sizer - if either of the parameters is
9844 zero, it will be calculated to from the total number of children in
9845 the sizer, thus making the sizer grow dynamically. *vgap* and *hgap*
9846 define extra space between all children.
9847 """
9848 newobj = _core_.new_GridSizer(*args, **kwargs)
9849 self.this = newobj.this
9850 self.thisown = 1
9851 del newobj.thisown
9852 self._setOORInfo(self)
9853
9854 def SetCols(*args, **kwargs):
9855 """
9856 SetCols(self, int cols)
9857
9858 Sets the number of columns in the sizer.
9859 """
9860 return _core_.GridSizer_SetCols(*args, **kwargs)
9861
9862 def SetRows(*args, **kwargs):
9863 """
9864 SetRows(self, int rows)
9865
9866 Sets the number of rows in the sizer.
9867 """
9868 return _core_.GridSizer_SetRows(*args, **kwargs)
9869
9870 def SetVGap(*args, **kwargs):
9871 """
9872 SetVGap(self, int gap)
9873
9874 Sets the vertical gap (in pixels) between the cells in the sizer.
9875 """
9876 return _core_.GridSizer_SetVGap(*args, **kwargs)
9877
9878 def SetHGap(*args, **kwargs):
9879 """
9880 SetHGap(self, int gap)
9881
9882 Sets the horizontal gap (in pixels) between cells in the sizer
9883 """
9884 return _core_.GridSizer_SetHGap(*args, **kwargs)
9885
9886 def GetCols(*args, **kwargs):
9887 """
9888 GetCols(self) -> int
9889
9890 Returns the number of columns in the sizer.
9891 """
9892 return _core_.GridSizer_GetCols(*args, **kwargs)
9893
9894 def GetRows(*args, **kwargs):
9895 """
9896 GetRows(self) -> int
9897
9898 Returns the number of rows in the sizer.
9899 """
9900 return _core_.GridSizer_GetRows(*args, **kwargs)
9901
9902 def GetVGap(*args, **kwargs):
9903 """
9904 GetVGap(self) -> int
9905
9906 Returns the vertical gap (in pixels) between the cells in the sizer.
9907 """
9908 return _core_.GridSizer_GetVGap(*args, **kwargs)
9909
9910 def GetHGap(*args, **kwargs):
9911 """
9912 GetHGap(self) -> int
9913
9914 Returns the horizontal gap (in pixels) between cells in the sizer.
9915 """
9916 return _core_.GridSizer_GetHGap(*args, **kwargs)
9917
9918
9919 class GridSizerPtr(GridSizer):
9920 def __init__(self, this):
9921 self.this = this
9922 if not hasattr(self,"thisown"): self.thisown = 0
9923 self.__class__ = GridSizer
9924 _core_.GridSizer_swigregister(GridSizerPtr)
9925
9926 #---------------------------------------------------------------------------
9927
9928 FLEX_GROWMODE_NONE = _core_.FLEX_GROWMODE_NONE
9929 FLEX_GROWMODE_SPECIFIED = _core_.FLEX_GROWMODE_SPECIFIED
9930 FLEX_GROWMODE_ALL = _core_.FLEX_GROWMODE_ALL
9931 class FlexGridSizer(GridSizer):
9932 """
9933 A flex grid sizer is a sizer which lays out its children in a
9934 two-dimensional table with all table cells in one row having the same
9935 height and all cells in one column having the same width, but all
9936 rows or all columns are not necessarily the same height or width as in
9937 the `wx.GridSizer`.
9938
9939 wx.FlexGridSizer can also size items equally in one direction but
9940 unequally ("flexibly") in the other. If the sizer is only flexible
9941 in one direction (this can be changed using `SetFlexibleDirection`), it
9942 needs to be decided how the sizer should grow in the other ("non
9943 flexible") direction in order to fill the available space. The
9944 `SetNonFlexibleGrowMode` method serves this purpose.
9945
9946
9947 """
9948 def __repr__(self):
9949 return "<%s.%s; proxy of C++ wxFlexGridSizer instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
9950 def __init__(self, *args, **kwargs):
9951 """
9952 __init__(self, int rows=1, int cols=0, int vgap=0, int hgap=0) -> FlexGridSizer
9953
9954 Constructor for a wx.FlexGridSizer. *rows* and *cols* determine the
9955 number of columns and rows in the sizer - if either of the parameters
9956 is zero, it will be calculated to from the total number of children in
9957 the sizer, thus making the sizer grow dynamically. *vgap* and *hgap*
9958 define extra space between all children.
9959 """
9960 newobj = _core_.new_FlexGridSizer(*args, **kwargs)
9961 self.this = newobj.this
9962 self.thisown = 1
9963 del newobj.thisown
9964 self._setOORInfo(self)
9965
9966 def AddGrowableRow(*args, **kwargs):
9967 """
9968 AddGrowableRow(self, size_t idx, int proportion=0)
9969
9970 Specifies that row *idx* (starting from zero) should be grown if there
9971 is extra space available to the sizer.
9972
9973 The *proportion* parameter has the same meaning as the stretch factor
9974 for the box sizers except that if all proportions are 0, then all
9975 columns are resized equally (instead of not being resized at all).
9976 """
9977 return _core_.FlexGridSizer_AddGrowableRow(*args, **kwargs)
9978
9979 def RemoveGrowableRow(*args, **kwargs):
9980 """
9981 RemoveGrowableRow(self, size_t idx)
9982
9983 Specifies that row *idx* is no longer growable.
9984 """
9985 return _core_.FlexGridSizer_RemoveGrowableRow(*args, **kwargs)
9986
9987 def AddGrowableCol(*args, **kwargs):
9988 """
9989 AddGrowableCol(self, size_t idx, int proportion=0)
9990
9991 Specifies that column *idx* (starting from zero) should be grown if
9992 there is extra space available to the sizer.
9993
9994 The *proportion* parameter has the same meaning as the stretch factor
9995 for the box sizers except that if all proportions are 0, then all
9996 columns are resized equally (instead of not being resized at all).
9997 """
9998 return _core_.FlexGridSizer_AddGrowableCol(*args, **kwargs)
9999
10000 def RemoveGrowableCol(*args, **kwargs):
10001 """
10002 RemoveGrowableCol(self, size_t idx)
10003
10004 Specifies that column *idx* is no longer growable.
10005 """
10006 return _core_.FlexGridSizer_RemoveGrowableCol(*args, **kwargs)
10007
10008 def SetFlexibleDirection(*args, **kwargs):
10009 """
10010 SetFlexibleDirection(self, int direction)
10011
10012 Specifies whether the sizer should flexibly resize its columns, rows,
10013 or both. Argument *direction* can be one of the following values. Any
10014 other value is ignored.
10015
10016 ============== =======================================
10017 wx.VERTICAL Rows are flexibly sized.
10018 wx.HORIZONTAL Columns are flexibly sized.
10019 wx.BOTH Both rows and columns are flexibly sized
10020 (this is the default value).
10021 ============== =======================================
10022
10023 Note that this method does not trigger relayout.
10024
10025 """
10026 return _core_.FlexGridSizer_SetFlexibleDirection(*args, **kwargs)
10027
10028 def GetFlexibleDirection(*args, **kwargs):
10029 """
10030 GetFlexibleDirection(self) -> int
10031
10032 Returns a value that specifies whether the sizer
10033 flexibly resizes its columns, rows, or both (default).
10034
10035 :see: `SetFlexibleDirection`
10036 """
10037 return _core_.FlexGridSizer_GetFlexibleDirection(*args, **kwargs)
10038
10039 def SetNonFlexibleGrowMode(*args, **kwargs):
10040 """
10041 SetNonFlexibleGrowMode(self, int mode)
10042
10043 Specifies how the sizer should grow in the non-flexible direction if
10044 there is one (so `SetFlexibleDirection` must have been called
10045 previously). Argument *mode* can be one of the following values:
10046
10047 ========================== =================================================
10048 wx.FLEX_GROWMODE_NONE Sizer doesn't grow in the non flexible direction.
10049 wx.FLEX_GROWMODE_SPECIFIED Sizer honors growable columns/rows set with
10050 `AddGrowableCol` and `AddGrowableRow`. In this
10051 case equal sizing applies to minimum sizes of
10052 columns or rows (this is the default value).
10053 wx.FLEX_GROWMODE_ALL Sizer equally stretches all columns or rows in
10054 the non flexible direction, whether they are
10055 growable or not in the flexbile direction.
10056 ========================== =================================================
10057
10058 Note that this method does not trigger relayout.
10059
10060
10061 """
10062 return _core_.FlexGridSizer_SetNonFlexibleGrowMode(*args, **kwargs)
10063
10064 def GetNonFlexibleGrowMode(*args, **kwargs):
10065 """
10066 GetNonFlexibleGrowMode(self) -> int
10067
10068 Returns the value that specifies how the sizer grows in the
10069 non-flexible direction if there is one.
10070
10071 :see: `SetNonFlexibleGrowMode`
10072 """
10073 return _core_.FlexGridSizer_GetNonFlexibleGrowMode(*args, **kwargs)
10074
10075 def GetRowHeights(*args, **kwargs):
10076 """
10077 GetRowHeights(self) -> list
10078
10079 Returns a list of integers representing the heights of each of the
10080 rows in the sizer.
10081 """
10082 return _core_.FlexGridSizer_GetRowHeights(*args, **kwargs)
10083
10084 def GetColWidths(*args, **kwargs):
10085 """
10086 GetColWidths(self) -> list
10087
10088 Returns a list of integers representing the widths of each of the
10089 columns in the sizer.
10090 """
10091 return _core_.FlexGridSizer_GetColWidths(*args, **kwargs)
10092
10093
10094 class FlexGridSizerPtr(FlexGridSizer):
10095 def __init__(self, this):
10096 self.this = this
10097 if not hasattr(self,"thisown"): self.thisown = 0
10098 self.__class__ = FlexGridSizer
10099 _core_.FlexGridSizer_swigregister(FlexGridSizerPtr)
10100
10101 #---------------------------------------------------------------------------
10102
10103 class GBPosition(object):
10104 """
10105 This class represents the position of an item in a virtual grid of
10106 rows and columns managed by a `wx.GridBagSizer`. wxPython has
10107 typemaps that will automatically convert from a 2-element sequence of
10108 integers to a wx.GBPosition, so you can use the more pythonic
10109 representation of the position nearly transparently in Python code.
10110 """
10111 def __repr__(self):
10112 return "<%s.%s; proxy of C++ wxGBPosition instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
10113 def __init__(self, *args, **kwargs):
10114 """
10115 __init__(self, int row=0, int col=0) -> GBPosition
10116
10117 This class represents the position of an item in a virtual grid of
10118 rows and columns managed by a `wx.GridBagSizer`. wxPython has
10119 typemaps that will automatically convert from a 2-element sequence of
10120 integers to a wx.GBPosition, so you can use the more pythonic
10121 representation of the position nearly transparently in Python code.
10122 """
10123 newobj = _core_.new_GBPosition(*args, **kwargs)
10124 self.this = newobj.this
10125 self.thisown = 1
10126 del newobj.thisown
10127 def GetRow(*args, **kwargs):
10128 """GetRow(self) -> int"""
10129 return _core_.GBPosition_GetRow(*args, **kwargs)
10130
10131 def GetCol(*args, **kwargs):
10132 """GetCol(self) -> int"""
10133 return _core_.GBPosition_GetCol(*args, **kwargs)
10134
10135 def SetRow(*args, **kwargs):
10136 """SetRow(self, int row)"""
10137 return _core_.GBPosition_SetRow(*args, **kwargs)
10138
10139 def SetCol(*args, **kwargs):
10140 """SetCol(self, int col)"""
10141 return _core_.GBPosition_SetCol(*args, **kwargs)
10142
10143 def __eq__(*args, **kwargs):
10144 """__eq__(self, GBPosition other) -> bool"""
10145 return _core_.GBPosition___eq__(*args, **kwargs)
10146
10147 def __ne__(*args, **kwargs):
10148 """__ne__(self, GBPosition other) -> bool"""
10149 return _core_.GBPosition___ne__(*args, **kwargs)
10150
10151 def Set(*args, **kwargs):
10152 """Set(self, int row=0, int col=0)"""
10153 return _core_.GBPosition_Set(*args, **kwargs)
10154
10155 def Get(*args, **kwargs):
10156 """Get(self) -> PyObject"""
10157 return _core_.GBPosition_Get(*args, **kwargs)
10158
10159 asTuple = wx._deprecated(Get, "asTuple is deprecated, use `Get` instead")
10160 def __str__(self): return str(self.Get())
10161 def __repr__(self): return 'wx.GBPosition'+str(self.Get())
10162 def __len__(self): return len(self.Get())
10163 def __getitem__(self, index): return self.Get()[index]
10164 def __setitem__(self, index, val):
10165 if index == 0: self.SetRow(val)
10166 elif index == 1: self.SetCol(val)
10167 else: raise IndexError
10168 def __nonzero__(self): return self.Get() != (0,0)
10169 __safe_for_unpickling__ = True
10170 def __reduce__(self): return (wx.GBPosition, self.Get())
10171
10172 row = property(GetRow, SetRow)
10173 col = property(GetCol, SetCol)
10174
10175
10176 class GBPositionPtr(GBPosition):
10177 def __init__(self, this):
10178 self.this = this
10179 if not hasattr(self,"thisown"): self.thisown = 0
10180 self.__class__ = GBPosition
10181 _core_.GBPosition_swigregister(GBPositionPtr)
10182
10183 class GBSpan(object):
10184 """
10185 This class is used to hold the row and column spanning attributes of
10186 items in a `wx.GridBagSizer`. wxPython has typemaps that will
10187 automatically convert from a 2-element sequence of integers to a
10188 wx.GBSpan, so you can use the more pythonic representation of the span
10189 nearly transparently in Python code.
10190
10191 """
10192 def __repr__(self):
10193 return "<%s.%s; proxy of C++ wxGBSpan instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
10194 def __init__(self, *args, **kwargs):
10195 """
10196 __init__(self, int rowspan=1, int colspan=1) -> GBSpan
10197
10198 Construct a new wxGBSpan, optionally setting the rowspan and
10199 colspan. The default is (1,1). (Meaning that the item occupies one
10200 cell in each direction.
10201 """
10202 newobj = _core_.new_GBSpan(*args, **kwargs)
10203 self.this = newobj.this
10204 self.thisown = 1
10205 del newobj.thisown
10206 def GetRowspan(*args, **kwargs):
10207 """GetRowspan(self) -> int"""
10208 return _core_.GBSpan_GetRowspan(*args, **kwargs)
10209
10210 def GetColspan(*args, **kwargs):
10211 """GetColspan(self) -> int"""
10212 return _core_.GBSpan_GetColspan(*args, **kwargs)
10213
10214 def SetRowspan(*args, **kwargs):
10215 """SetRowspan(self, int rowspan)"""
10216 return _core_.GBSpan_SetRowspan(*args, **kwargs)
10217
10218 def SetColspan(*args, **kwargs):
10219 """SetColspan(self, int colspan)"""
10220 return _core_.GBSpan_SetColspan(*args, **kwargs)
10221
10222 def __eq__(*args, **kwargs):
10223 """__eq__(self, GBSpan other) -> bool"""
10224 return _core_.GBSpan___eq__(*args, **kwargs)
10225
10226 def __ne__(*args, **kwargs):
10227 """__ne__(self, GBSpan other) -> bool"""
10228 return _core_.GBSpan___ne__(*args, **kwargs)
10229
10230 def Set(*args, **kwargs):
10231 """Set(self, int rowspan=1, int colspan=1)"""
10232 return _core_.GBSpan_Set(*args, **kwargs)
10233
10234 def Get(*args, **kwargs):
10235 """Get(self) -> PyObject"""
10236 return _core_.GBSpan_Get(*args, **kwargs)
10237
10238 asTuple = wx._deprecated(Get, "asTuple is deprecated, use `Get` instead")
10239 def __str__(self): return str(self.Get())
10240 def __repr__(self): return 'wx.GBSpan'+str(self.Get())
10241 def __len__(self): return len(self.Get())
10242 def __getitem__(self, index): return self.Get()[index]
10243 def __setitem__(self, index, val):
10244 if index == 0: self.SetRowspan(val)
10245 elif index == 1: self.SetColspan(val)
10246 else: raise IndexError
10247 def __nonzero__(self): return self.Get() != (0,0)
10248 __safe_for_unpickling__ = True
10249 def __reduce__(self): return (wx.GBSpan, self.Get())
10250
10251 rowspan = property(GetRowspan, SetRowspan)
10252 colspan = property(GetColspan, SetColspan)
10253
10254
10255 class GBSpanPtr(GBSpan):
10256 def __init__(self, this):
10257 self.this = this
10258 if not hasattr(self,"thisown"): self.thisown = 0
10259 self.__class__ = GBSpan
10260 _core_.GBSpan_swigregister(GBSpanPtr)
10261
10262 class GBSizerItem(SizerItem):
10263 """
10264 The wx.GBSizerItem class is used to track the additional data about
10265 items in a `wx.GridBagSizer` such as the item's position in the grid
10266 and how many rows or columns it spans.
10267
10268 """
10269 def __repr__(self):
10270 return "<%s.%s; proxy of C++ wxGBSizerItem instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
10271 def __init__(self, *args, **kwargs):
10272 """
10273 __init__(self) -> GBSizerItem
10274
10275 Constructs an empty wx.GBSizerItem. Either a window, sizer or spacer
10276 size will need to be set, as well as a position and span before this
10277 item can be used in a Sizer.
10278
10279 You will probably never need to create a wx.GBSizerItem directly as they
10280 are created automatically when the sizer's Add method is called.
10281 """
10282 newobj = _core_.new_GBSizerItem(*args, **kwargs)
10283 self.this = newobj.this
10284 self.thisown = 1
10285 del newobj.thisown
10286 def GetPos(*args, **kwargs):
10287 """
10288 GetPos(self) -> GBPosition
10289
10290 Get the grid position of the item
10291 """
10292 return _core_.GBSizerItem_GetPos(*args, **kwargs)
10293
10294 def GetPosTuple(self): return self.GetPos().Get()
10295 def GetSpan(*args, **kwargs):
10296 """
10297 GetSpan(self) -> GBSpan
10298
10299 Get the row and column spanning of the item
10300 """
10301 return _core_.GBSizerItem_GetSpan(*args, **kwargs)
10302
10303 def GetSpanTuple(self): return self.GetSpan().Get()
10304 def SetPos(*args, **kwargs):
10305 """
10306 SetPos(self, GBPosition pos) -> bool
10307
10308 If the item is already a member of a sizer then first ensure that
10309 there is no other item that would intersect with this one at the new
10310 position, then set the new position. Returns True if the change is
10311 successful and after the next Layout() the item will be moved.
10312 """
10313 return _core_.GBSizerItem_SetPos(*args, **kwargs)
10314
10315 def SetSpan(*args, **kwargs):
10316 """
10317 SetSpan(self, GBSpan span) -> bool
10318
10319 If the item is already a member of a sizer then first ensure that
10320 there is no other item that would intersect with this one with its new
10321 spanning size, then set the new spanning. Returns True if the change
10322 is successful and after the next Layout() the item will be resized.
10323
10324 """
10325 return _core_.GBSizerItem_SetSpan(*args, **kwargs)
10326
10327 def Intersects(*args, **kwargs):
10328 """
10329 Intersects(self, GBSizerItem other) -> bool
10330
10331 Returns True if this item and the other item instersect.
10332 """
10333 return _core_.GBSizerItem_Intersects(*args, **kwargs)
10334
10335 def IntersectsPos(*args, **kwargs):
10336 """
10337 IntersectsPos(self, GBPosition pos, GBSpan span) -> bool
10338
10339 Returns True if the given pos/span would intersect with this item.
10340 """
10341 return _core_.GBSizerItem_IntersectsPos(*args, **kwargs)
10342
10343 def GetEndPos(*args, **kwargs):
10344 """
10345 GetEndPos(self) -> GBPosition
10346
10347 Get the row and column of the endpoint of this item.
10348 """
10349 return _core_.GBSizerItem_GetEndPos(*args, **kwargs)
10350
10351 def GetGBSizer(*args, **kwargs):
10352 """
10353 GetGBSizer(self) -> GridBagSizer
10354
10355 Get the sizer this item is a member of.
10356 """
10357 return _core_.GBSizerItem_GetGBSizer(*args, **kwargs)
10358
10359 def SetGBSizer(*args, **kwargs):
10360 """
10361 SetGBSizer(self, GridBagSizer sizer)
10362
10363 Set the sizer this item is a member of.
10364 """
10365 return _core_.GBSizerItem_SetGBSizer(*args, **kwargs)
10366
10367
10368 class GBSizerItemPtr(GBSizerItem):
10369 def __init__(self, this):
10370 self.this = this
10371 if not hasattr(self,"thisown"): self.thisown = 0
10372 self.__class__ = GBSizerItem
10373 _core_.GBSizerItem_swigregister(GBSizerItemPtr)
10374 DefaultSpan = cvar.DefaultSpan
10375
10376 def GBSizerItemWindow(*args, **kwargs):
10377 """
10378 GBSizerItemWindow(Window window, GBPosition pos, GBSpan span, int flag,
10379 int border, PyObject userData=None) -> GBSizerItem
10380
10381 Construct a `wx.GBSizerItem` for a window.
10382 """
10383 val = _core_.new_GBSizerItemWindow(*args, **kwargs)
10384 val.thisown = 1
10385 return val
10386
10387 def GBSizerItemSizer(*args, **kwargs):
10388 """
10389 GBSizerItemSizer(Sizer sizer, GBPosition pos, GBSpan span, int flag,
10390 int border, PyObject userData=None) -> GBSizerItem
10391
10392 Construct a `wx.GBSizerItem` for a sizer
10393 """
10394 val = _core_.new_GBSizerItemSizer(*args, **kwargs)
10395 val.thisown = 1
10396 return val
10397
10398 def GBSizerItemSpacer(*args, **kwargs):
10399 """
10400 GBSizerItemSpacer(int width, int height, GBPosition pos, GBSpan span,
10401 int flag, int border, PyObject userData=None) -> GBSizerItem
10402
10403 Construct a `wx.GBSizerItem` for a spacer.
10404 """
10405 val = _core_.new_GBSizerItemSpacer(*args, **kwargs)
10406 val.thisown = 1
10407 return val
10408
10409 class GridBagSizer(FlexGridSizer):
10410 """
10411 A `wx.Sizer` that can lay out items in a virtual grid like a
10412 `wx.FlexGridSizer` but in this case explicit positioning of the items
10413 is allowed using `wx.GBPosition`, and items can optionally span more
10414 than one row and/or column using `wx.GBSpan`. The total size of the
10415 virtual grid is determined by the largest row and column that items are
10416 positioned at, adjusted for spanning.
10417
10418 """
10419 def __repr__(self):
10420 return "<%s.%s; proxy of C++ wxGridBagSizer instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
10421 def __init__(self, *args, **kwargs):
10422 """
10423 __init__(self, int vgap=0, int hgap=0) -> GridBagSizer
10424
10425 Constructor, with optional parameters to specify the gap between the
10426 rows and columns.
10427 """
10428 newobj = _core_.new_GridBagSizer(*args, **kwargs)
10429 self.this = newobj.this
10430 self.thisown = 1
10431 del newobj.thisown
10432 self._setOORInfo(self)
10433
10434 def Add(*args, **kwargs):
10435 """
10436 Add(self, item, GBPosition pos, GBSpan span=DefaultSpan, int flag=0,
10437 int border=0, userData=None) -> wx.GBSizerItem
10438
10439 Adds an item to the sizer at the grid cell *pos*, optionally spanning
10440 more than one row or column as specified with *span*. The remaining
10441 args behave similarly to `wx.Sizer.Add`.
10442
10443 Returns True if the item was successfully placed at the given cell
10444 position, False if something was already there.
10445
10446 """
10447 return _core_.GridBagSizer_Add(*args, **kwargs)
10448
10449 def AddItem(*args, **kwargs):
10450 """
10451 Add(self, GBSizerItem item) -> wx.GBSizerItem
10452
10453 Add an item to the sizer using a `wx.GBSizerItem`. Returns True if
10454 the item was successfully placed at its given cell position, False if
10455 something was already there.
10456 """
10457 return _core_.GridBagSizer_AddItem(*args, **kwargs)
10458
10459 def GetCellSize(*args, **kwargs):
10460 """
10461 GetCellSize(self, int row, int col) -> Size
10462
10463 Get the size of the specified cell, including hgap and
10464 vgap. Only valid after a Layout.
10465 """
10466 return _core_.GridBagSizer_GetCellSize(*args, **kwargs)
10467
10468 def GetEmptyCellSize(*args, **kwargs):
10469 """
10470 GetEmptyCellSize(self) -> Size
10471
10472 Get the size used for cells in the grid with no item.
10473 """
10474 return _core_.GridBagSizer_GetEmptyCellSize(*args, **kwargs)
10475
10476 def SetEmptyCellSize(*args, **kwargs):
10477 """
10478 SetEmptyCellSize(self, Size sz)
10479
10480 Set the size used for cells in the grid with no item.
10481 """
10482 return _core_.GridBagSizer_SetEmptyCellSize(*args, **kwargs)
10483
10484 def GetItemPosition(*args):
10485 """
10486 GetItemPosition(self, item) -> GBPosition
10487
10488 Get the grid position of the specified *item* where *item* is either a
10489 window or subsizer that is a member of this sizer, or a zero-based
10490 index of an item.
10491 """
10492 return _core_.GridBagSizer_GetItemPosition(*args)
10493
10494 def SetItemPosition(*args):
10495 """
10496 SetItemPosition(self, item, GBPosition pos) -> bool
10497
10498 Set the grid position of the specified *item* where *item* is either a
10499 window or subsizer that is a member of this sizer, or a zero-based
10500 index of an item. Returns True on success. If the move is not
10501 allowed (because an item is already there) then False is returned.
10502
10503 """
10504 return _core_.GridBagSizer_SetItemPosition(*args)
10505
10506 def GetItemSpan(*args):
10507 """
10508 GetItemSpan(self, item) -> GBSpan
10509
10510 Get the row/col spanning of the specified *item* where *item* is
10511 either a window or subsizer that is a member of this sizer, or a
10512 zero-based index of an item.
10513 """
10514 return _core_.GridBagSizer_GetItemSpan(*args)
10515
10516 def SetItemSpan(*args):
10517 """
10518 SetItemSpan(self, item, GBSpan span) -> bool
10519
10520 Set the row/col spanning of the specified *item* where *item* is
10521 either a window or subsizer that is a member of this sizer, or a
10522 zero-based index of an item. Returns True on success. If the move is
10523 not allowed (because an item is already there) then False is returned.
10524 """
10525 return _core_.GridBagSizer_SetItemSpan(*args)
10526
10527 def FindItem(*args):
10528 """
10529 FindItem(self, item) -> GBSizerItem
10530
10531 Find the sizer item for the given window or subsizer, returns None if
10532 not found. (non-recursive)
10533 """
10534 return _core_.GridBagSizer_FindItem(*args)
10535
10536 def FindItemAtPosition(*args, **kwargs):
10537 """
10538 FindItemAtPosition(self, GBPosition pos) -> GBSizerItem
10539
10540 Return the sizer item for the given grid cell, or None if there is no
10541 item at that position. (non-recursive)
10542 """
10543 return _core_.GridBagSizer_FindItemAtPosition(*args, **kwargs)
10544
10545 def FindItemAtPoint(*args, **kwargs):
10546 """
10547 FindItemAtPoint(self, Point pt) -> GBSizerItem
10548
10549 Return the sizer item located at the point given in *pt*, or None if
10550 there is no item at that point. The (x,y) coordinates in pt correspond
10551 to the client coordinates of the window using the sizer for
10552 layout. (non-recursive)
10553 """
10554 return _core_.GridBagSizer_FindItemAtPoint(*args, **kwargs)
10555
10556 def CheckForIntersection(*args, **kwargs):
10557 """
10558 CheckForIntersection(self, GBSizerItem item, GBSizerItem excludeItem=None) -> bool
10559
10560 Look at all items and see if any intersect (or would overlap) the
10561 given *item*. Returns True if so, False if there would be no overlap.
10562 If an *excludeItem* is given then it will not be checked for
10563 intersection, for example it may be the item we are checking the
10564 position of.
10565
10566 """
10567 return _core_.GridBagSizer_CheckForIntersection(*args, **kwargs)
10568
10569 def CheckForIntersectionPos(*args, **kwargs):
10570 """
10571 CheckForIntersectionPos(self, GBPosition pos, GBSpan span, GBSizerItem excludeItem=None) -> bool
10572
10573 Look at all items and see if any intersect (or would overlap) the
10574 given position and span. Returns True if so, False if there would be
10575 no overlap. If an *excludeItem* is given then it will not be checked
10576 for intersection, for example it may be the item we are checking the
10577 position of.
10578 """
10579 return _core_.GridBagSizer_CheckForIntersectionPos(*args, **kwargs)
10580
10581
10582 class GridBagSizerPtr(GridBagSizer):
10583 def __init__(self, this):
10584 self.this = this
10585 if not hasattr(self,"thisown"): self.thisown = 0
10586 self.__class__ = GridBagSizer
10587 _core_.GridBagSizer_swigregister(GridBagSizerPtr)
10588
10589 #---------------------------------------------------------------------------
10590
10591 Left = _core_.Left
10592 Top = _core_.Top
10593 Right = _core_.Right
10594 Bottom = _core_.Bottom
10595 Width = _core_.Width
10596 Height = _core_.Height
10597 Centre = _core_.Centre
10598 Center = _core_.Center
10599 CentreX = _core_.CentreX
10600 CentreY = _core_.CentreY
10601 Unconstrained = _core_.Unconstrained
10602 AsIs = _core_.AsIs
10603 PercentOf = _core_.PercentOf
10604 Above = _core_.Above
10605 Below = _core_.Below
10606 LeftOf = _core_.LeftOf
10607 RightOf = _core_.RightOf
10608 SameAs = _core_.SameAs
10609 Absolute = _core_.Absolute
10610 class IndividualLayoutConstraint(Object):
10611 """
10612 Objects of this class are stored in the `wx.LayoutConstraints` class as
10613 one of eight possible constraints that a window can be involved in.
10614 You will never need to create an instance of
10615 wx.IndividualLayoutConstraint, rather you should create a
10616 `wx.LayoutConstraints` instance and use the individual contstraints
10617 that it contains.
10618 """
10619 def __init__(self): raise RuntimeError, "No constructor defined"
10620 def __repr__(self):
10621 return "<%s.%s; proxy of C++ wxIndividualLayoutConstraint instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
10622 def Set(*args, **kwargs):
10623 """
10624 Set(self, int rel, Window otherW, int otherE, int val=0, int marg=wxLAYOUT_DEFAULT_MARGIN)
10625
10626 Sets the properties of the constraint. Normally called by one of the
10627 convenience functions such as Above, RightOf, SameAs.
10628 """
10629 return _core_.IndividualLayoutConstraint_Set(*args, **kwargs)
10630
10631 def LeftOf(*args, **kwargs):
10632 """
10633 LeftOf(self, Window sibling, int marg=0)
10634
10635 Constrains this edge to be to the left of the given window, with an
10636 optional margin. Implicitly, this is relative to the left edge of the
10637 other window.
10638 """
10639 return _core_.IndividualLayoutConstraint_LeftOf(*args, **kwargs)
10640
10641 def RightOf(*args, **kwargs):
10642 """
10643 RightOf(self, Window sibling, int marg=0)
10644
10645 Constrains this edge to be to the right of the given window, with an
10646 optional margin. Implicitly, this is relative to the right edge of the
10647 other window.
10648 """
10649 return _core_.IndividualLayoutConstraint_RightOf(*args, **kwargs)
10650
10651 def Above(*args, **kwargs):
10652 """
10653 Above(self, Window sibling, int marg=0)
10654
10655 Constrains this edge to be above the given window, with an optional
10656 margin. Implicitly, this is relative to the top edge of the other
10657 window.
10658 """
10659 return _core_.IndividualLayoutConstraint_Above(*args, **kwargs)
10660
10661 def Below(*args, **kwargs):
10662 """
10663 Below(self, Window sibling, int marg=0)
10664
10665 Constrains this edge to be below the given window, with an optional
10666 margin. Implicitly, this is relative to the bottom edge of the other
10667 window.
10668 """
10669 return _core_.IndividualLayoutConstraint_Below(*args, **kwargs)
10670
10671 def SameAs(*args, **kwargs):
10672 """
10673 SameAs(self, Window otherW, int edge, int marg=0)
10674
10675 Constrains this edge or dimension to be to the same as the edge of the
10676 given window, with an optional margin.
10677 """
10678 return _core_.IndividualLayoutConstraint_SameAs(*args, **kwargs)
10679
10680 def PercentOf(*args, **kwargs):
10681 """
10682 PercentOf(self, Window otherW, int wh, int per)
10683
10684 Constrains this edge or dimension to be to a percentage of the given
10685 window, with an optional margin.
10686 """
10687 return _core_.IndividualLayoutConstraint_PercentOf(*args, **kwargs)
10688
10689 def Absolute(*args, **kwargs):
10690 """
10691 Absolute(self, int val)
10692
10693 Constrains this edge or dimension to be the given absolute value.
10694 """
10695 return _core_.IndividualLayoutConstraint_Absolute(*args, **kwargs)
10696
10697 def Unconstrained(*args, **kwargs):
10698 """
10699 Unconstrained(self)
10700
10701 Sets this edge or dimension to be unconstrained, that is, dependent on
10702 other edges and dimensions from which this value can be deduced.
10703 """
10704 return _core_.IndividualLayoutConstraint_Unconstrained(*args, **kwargs)
10705
10706 def AsIs(*args, **kwargs):
10707 """
10708 AsIs(self)
10709
10710 Sets this edge or constraint to be whatever the window's value is at
10711 the moment. If either of the width and height constraints are *as is*,
10712 the window will not be resized, but moved instead. This is important
10713 when considering panel items which are intended to have a default
10714 size, such as a button, which may take its size from the size of the
10715 button label.
10716 """
10717 return _core_.IndividualLayoutConstraint_AsIs(*args, **kwargs)
10718
10719 def GetOtherWindow(*args, **kwargs):
10720 """GetOtherWindow(self) -> Window"""
10721 return _core_.IndividualLayoutConstraint_GetOtherWindow(*args, **kwargs)
10722
10723 def GetMyEdge(*args, **kwargs):
10724 """GetMyEdge(self) -> int"""
10725 return _core_.IndividualLayoutConstraint_GetMyEdge(*args, **kwargs)
10726
10727 def SetEdge(*args, **kwargs):
10728 """SetEdge(self, int which)"""
10729 return _core_.IndividualLayoutConstraint_SetEdge(*args, **kwargs)
10730
10731 def SetValue(*args, **kwargs):
10732 """SetValue(self, int v)"""
10733 return _core_.IndividualLayoutConstraint_SetValue(*args, **kwargs)
10734
10735 def GetMargin(*args, **kwargs):
10736 """GetMargin(self) -> int"""
10737 return _core_.IndividualLayoutConstraint_GetMargin(*args, **kwargs)
10738
10739 def SetMargin(*args, **kwargs):
10740 """SetMargin(self, int m)"""
10741 return _core_.IndividualLayoutConstraint_SetMargin(*args, **kwargs)
10742
10743 def GetValue(*args, **kwargs):
10744 """GetValue(self) -> int"""
10745 return _core_.IndividualLayoutConstraint_GetValue(*args, **kwargs)
10746
10747 def GetPercent(*args, **kwargs):
10748 """GetPercent(self) -> int"""
10749 return _core_.IndividualLayoutConstraint_GetPercent(*args, **kwargs)
10750
10751 def GetOtherEdge(*args, **kwargs):
10752 """GetOtherEdge(self) -> int"""
10753 return _core_.IndividualLayoutConstraint_GetOtherEdge(*args, **kwargs)
10754
10755 def GetDone(*args, **kwargs):
10756 """GetDone(self) -> bool"""
10757 return _core_.IndividualLayoutConstraint_GetDone(*args, **kwargs)
10758
10759 def SetDone(*args, **kwargs):
10760 """SetDone(self, bool d)"""
10761 return _core_.IndividualLayoutConstraint_SetDone(*args, **kwargs)
10762
10763 def GetRelationship(*args, **kwargs):
10764 """GetRelationship(self) -> int"""
10765 return _core_.IndividualLayoutConstraint_GetRelationship(*args, **kwargs)
10766
10767 def SetRelationship(*args, **kwargs):
10768 """SetRelationship(self, int r)"""
10769 return _core_.IndividualLayoutConstraint_SetRelationship(*args, **kwargs)
10770
10771 def ResetIfWin(*args, **kwargs):
10772 """
10773 ResetIfWin(self, Window otherW) -> bool
10774
10775 Reset constraint if it mentions otherWin
10776 """
10777 return _core_.IndividualLayoutConstraint_ResetIfWin(*args, **kwargs)
10778
10779 def SatisfyConstraint(*args, **kwargs):
10780 """
10781 SatisfyConstraint(self, LayoutConstraints constraints, Window win) -> bool
10782
10783 Try to satisfy constraint
10784 """
10785 return _core_.IndividualLayoutConstraint_SatisfyConstraint(*args, **kwargs)
10786
10787 def GetEdge(*args, **kwargs):
10788 """
10789 GetEdge(self, int which, Window thisWin, Window other) -> int
10790
10791 Get the value of this edge or dimension, or if this
10792 is not determinable, -1.
10793 """
10794 return _core_.IndividualLayoutConstraint_GetEdge(*args, **kwargs)
10795
10796
10797 class IndividualLayoutConstraintPtr(IndividualLayoutConstraint):
10798 def __init__(self, this):
10799 self.this = this
10800 if not hasattr(self,"thisown"): self.thisown = 0
10801 self.__class__ = IndividualLayoutConstraint
10802 _core_.IndividualLayoutConstraint_swigregister(IndividualLayoutConstraintPtr)
10803
10804 class LayoutConstraints(Object):
10805 """
10806 **Note:** constraints are now deprecated and you should use sizers
10807 instead.
10808
10809 Objects of this class can be associated with a window to define its
10810 layout constraints, with respect to siblings or its parent.
10811
10812 The class consists of the following eight constraints of class
10813 wx.IndividualLayoutConstraint, some or all of which should be accessed
10814 directly to set the appropriate constraints.
10815
10816 * left: represents the left hand edge of the window
10817 * right: represents the right hand edge of the window
10818 * top: represents the top edge of the window
10819 * bottom: represents the bottom edge of the window
10820 * width: represents the width of the window
10821 * height: represents the height of the window
10822 * centreX: represents the horizontal centre point of the window
10823 * centreY: represents the vertical centre point of the window
10824
10825 Most constraints are initially set to have the relationship
10826 wxUnconstrained, which means that their values should be calculated by
10827 looking at known constraints. The exceptions are width and height,
10828 which are set to wxAsIs to ensure that if the user does not specify a
10829 constraint, the existing width and height will be used, to be
10830 compatible with panel items which often have take a default size. If
10831 the constraint is ``wx.AsIs``, the dimension will not be changed.
10832
10833 :see: `wx.IndividualLayoutConstraint`, `wx.Window.SetConstraints`
10834
10835 """
10836 def __repr__(self):
10837 return "<%s.%s; proxy of C++ wxLayoutConstraints instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
10838 left = property(_core_.LayoutConstraints_left_get)
10839 top = property(_core_.LayoutConstraints_top_get)
10840 right = property(_core_.LayoutConstraints_right_get)
10841 bottom = property(_core_.LayoutConstraints_bottom_get)
10842 width = property(_core_.LayoutConstraints_width_get)
10843 height = property(_core_.LayoutConstraints_height_get)
10844 centreX = property(_core_.LayoutConstraints_centreX_get)
10845 centreY = property(_core_.LayoutConstraints_centreY_get)
10846 def __init__(self, *args, **kwargs):
10847 """__init__(self) -> LayoutConstraints"""
10848 newobj = _core_.new_LayoutConstraints(*args, **kwargs)
10849 self.this = newobj.this
10850 self.thisown = 1
10851 del newobj.thisown
10852 def SatisfyConstraints(*args, **kwargs):
10853 """SatisfyConstraints(Window win) -> (areSatisfied, noChanges)"""
10854 return _core_.LayoutConstraints_SatisfyConstraints(*args, **kwargs)
10855
10856 def AreSatisfied(*args, **kwargs):
10857 """AreSatisfied(self) -> bool"""
10858 return _core_.LayoutConstraints_AreSatisfied(*args, **kwargs)
10859
10860
10861 class LayoutConstraintsPtr(LayoutConstraints):
10862 def __init__(self, this):
10863 self.this = this
10864 if not hasattr(self,"thisown"): self.thisown = 0
10865 self.__class__ = LayoutConstraints
10866 _core_.LayoutConstraints_swigregister(LayoutConstraintsPtr)
10867
10868 #----------------------------------------------------------------------------
10869
10870 # Use Python's bool constants if available, make some if not
10871 try:
10872 True
10873 except NameError:
10874 __builtins__.True = 1==1
10875 __builtins__.False = 1==0
10876 def bool(value): return not not value
10877 __builtins__.bool = bool
10878
10879
10880
10881 # workarounds for bad wxRTTI names
10882 __wxPyPtrTypeMap['wxGauge95'] = 'wxGauge'
10883 __wxPyPtrTypeMap['wxSlider95'] = 'wxSlider'
10884 __wxPyPtrTypeMap['wxStatusBar95'] = 'wxStatusBar'
10885
10886
10887 #----------------------------------------------------------------------------
10888 # Load version numbers from __version__... Ensure that major and minor
10889 # versions are the same for both wxPython and wxWidgets.
10890
10891 from __version__ import *
10892 __version__ = VERSION_STRING
10893
10894 assert MAJOR_VERSION == _core_.MAJOR_VERSION, "wxPython/wxWidgets version mismatch"
10895 assert MINOR_VERSION == _core_.MINOR_VERSION, "wxPython/wxWidgets version mismatch"
10896 if RELEASE_VERSION != _core_.RELEASE_VERSION:
10897 import warnings
10898 warnings.warn("wxPython/wxWidgets release number mismatch")
10899
10900 #----------------------------------------------------------------------------
10901
10902 # Set the default string conversion encoding from the locale
10903 import locale
10904 default = locale.getdefaultlocale()[1]
10905 if default:
10906 wx.SetDefaultPyEncoding(default)
10907 del default
10908 del locale
10909
10910 #----------------------------------------------------------------------------
10911
10912 class PyDeadObjectError(AttributeError):
10913 pass
10914
10915 class _wxPyDeadObject(object):
10916 """
10917 Instances of wx objects that are OOR capable will have their __class__
10918 changed to this class when the C++ object is deleted. This should help
10919 prevent crashes due to referencing a bogus C++ pointer.
10920 """
10921 reprStr = "wxPython wrapper for DELETED %s object! (The C++ object no longer exists.)"
10922 attrStr = "The C++ part of the %s object has been deleted, attribute access no longer allowed."
10923
10924 def __repr__(self):
10925 if not hasattr(self, "_name"):
10926 self._name = "[unknown]"
10927 return self.reprStr % self._name
10928
10929 def __getattr__(self, *args):
10930 if not hasattr(self, "_name"):
10931 self._name = "[unknown]"
10932 raise PyDeadObjectError(self.attrStr % self._name)
10933
10934 def __nonzero__(self):
10935 return 0
10936
10937
10938
10939 class PyUnbornObjectError(AttributeError):
10940 pass
10941
10942 class _wxPyUnbornObject(object):
10943 """
10944 Some stock objects are created when the wx._core module is
10945 imported, but their C++ instance is not created until the wx.App
10946 object is created and initialized. These object instances will
10947 temporarily have their __class__ changed to this class so an
10948 exception will be raised if they are used before the C++ instance
10949 is ready.
10950 """
10951
10952 reprStr = "wxPython wrapper for UNBORN object! (The C++ object is not initialized yet.)"
10953 attrStr = "The C++ part of this object has not been initialized, attribute access not allowed."
10954
10955 def __repr__(self):
10956 #if not hasattr(self, "_name"):
10957 # self._name = "[unknown]"
10958 return self.reprStr #% self._name
10959
10960 def __getattr__(self, *args):
10961 #if not hasattr(self, "_name"):
10962 # self._name = "[unknown]"
10963 raise PyUnbornObjectError(self.attrStr) # % self._name )
10964
10965 def __nonzero__(self):
10966 return 0
10967
10968
10969 #----------------------------------------------------------------------------
10970
10971 def CallAfter(callable, *args, **kw):
10972 """
10973 Call the specified function after the current and pending event
10974 handlers have been completed. This is also good for making GUI
10975 method calls from non-GUI threads. Any extra positional or
10976 keyword args are passed on to the callable when it is called.
10977
10978 :see: `wx.FutureCall`
10979 """
10980 app = wx.GetApp()
10981 assert app is not None, 'No wx.App created yet'
10982
10983 if not hasattr(app, "_CallAfterId"):
10984 app._CallAfterId = wx.NewEventType()
10985 app.Connect(-1, -1, app._CallAfterId,
10986 lambda event: event.callable(*event.args, **event.kw) )
10987 evt = wx.PyEvent()
10988 evt.SetEventType(app._CallAfterId)
10989 evt.callable = callable
10990 evt.args = args
10991 evt.kw = kw
10992 wx.PostEvent(app, evt)
10993
10994 #----------------------------------------------------------------------------
10995
10996
10997 class FutureCall:
10998 """
10999 A convenience class for `wx.Timer`, that calls the given callable
11000 object once after the given amount of milliseconds, passing any
11001 positional or keyword args. The return value of the callable is
11002 availbale after it has been run with the `GetResult` method.
11003
11004 If you don't need to get the return value or restart the timer
11005 then there is no need to hold a reference to this object. It will
11006 hold a reference to itself while the timer is running (the timer
11007 has a reference to self.Notify) but the cycle will be broken when
11008 the timer completes, automatically cleaning up the wx.FutureCall
11009 object.
11010
11011 :see: `wx.CallAfter`
11012 """
11013 def __init__(self, millis, callable, *args, **kwargs):
11014 self.millis = millis
11015 self.callable = callable
11016 self.SetArgs(*args, **kwargs)
11017 self.runCount = 0
11018 self.running = False
11019 self.hasRun = False
11020 self.result = None
11021 self.timer = None
11022 self.Start()
11023
11024 def __del__(self):
11025 self.Stop()
11026
11027
11028 def Start(self, millis=None, *args, **kwargs):
11029 """
11030 (Re)start the timer
11031 """
11032 self.hasRun = False
11033 if millis is not None:
11034 self.millis = millis
11035 if args or kwargs:
11036 self.SetArgs(*args, **kwargs)
11037 self.Stop()
11038 self.timer = wx.PyTimer(self.Notify)
11039 self.timer.Start(self.millis, wx.TIMER_ONE_SHOT)
11040 self.running = True
11041 Restart = Start
11042
11043
11044 def Stop(self):
11045 """
11046 Stop and destroy the timer.
11047 """
11048 if self.timer is not None:
11049 self.timer.Stop()
11050 self.timer = None
11051
11052
11053 def GetInterval(self):
11054 if self.timer is not None:
11055 return self.timer.GetInterval()
11056 else:
11057 return 0
11058
11059
11060 def IsRunning(self):
11061 return self.timer is not None and self.timer.IsRunning()
11062
11063
11064 def SetArgs(self, *args, **kwargs):
11065 """
11066 (Re)set the args passed to the callable object. This is
11067 useful in conjunction with Restart if you want to schedule a
11068 new call to the same callable object but with different
11069 parameters.
11070 """
11071 self.args = args
11072 self.kwargs = kwargs
11073
11074
11075 def HasRun(self):
11076 return self.hasRun
11077
11078 def GetResult(self):
11079 return self.result
11080
11081 def Notify(self):
11082 """
11083 The timer has expired so call the callable.
11084 """
11085 if self.callable and getattr(self.callable, 'im_self', True):
11086 self.runCount += 1
11087 self.running = False
11088 self.result = self.callable(*self.args, **self.kwargs)
11089 self.hasRun = True
11090 if not self.running:
11091 # if it wasn't restarted, then cleanup
11092 wx.CallAfter(self.Stop)
11093
11094
11095
11096 #----------------------------------------------------------------------------
11097 # Control which items in this module should be documented by epydoc.
11098 # We allow only classes and functions, which will help reduce the size
11099 # of the docs by filtering out the zillions of constants, EVT objects,
11100 # and etc that don't make much sense by themselves, but are instead
11101 # documented (or will be) as part of the classes/functions/methods
11102 # where they should be used.
11103
11104 class __DocFilter:
11105 """
11106 A filter for epydoc that only allows non-Ptr classes and
11107 fucntions, in order to reduce the clutter in the API docs.
11108 """
11109 def __init__(self, globals):
11110 self._globals = globals
11111
11112 def __call__(self, name):
11113 import types
11114 obj = self._globals.get(name, None)
11115 if type(obj) not in [type, types.ClassType, types.FunctionType, types.BuiltinFunctionType]:
11116 return False
11117 if name.startswith('_') or name.endswith('Ptr') or name.startswith('EVT'):
11118 return False
11119 return True
11120
11121 #----------------------------------------------------------------------------
11122 #----------------------------------------------------------------------------
11123
11124 # Import other modules in this package that should show up in the
11125 # "core" wx namespace
11126 from _gdi import *
11127 from _windows import *
11128 from _controls import *
11129 from _misc import *
11130
11131
11132 # Fixup the stock objects since they can't be used yet. (They will be
11133 # restored in wx.PyApp.OnInit.)
11134 _core_._wxPyFixStockObjects()
11135
11136 #----------------------------------------------------------------------------
11137 #----------------------------------------------------------------------------
11138
11139