]> git.saurik.com Git - wxWidgets.git/blob - wxPython/src/msw/_core.py
wxDEFAULT_STATUSBAR_STYLE
[wxWidgets.git] / wxPython / src / msw / _core.py
1 # This file was created automatically by SWIG.
2 # Don't modify this file, modify the SWIG interface instead.
3
4 import _core_
5
6 def _swig_setattr_nondynamic(self,class_type,name,value,static=1):
7 if (name == "this"):
8 if isinstance(value, class_type):
9 self.__dict__[name] = value.this
10 if hasattr(value,"thisown"): self.__dict__["thisown"] = value.thisown
11 del value.thisown
12 return
13 method = class_type.__swig_setmethods__.get(name,None)
14 if method: return method(self,value)
15 if (not static) or hasattr(self,name) or (name == "thisown"):
16 self.__dict__[name] = value
17 else:
18 raise AttributeError("You cannot add attributes to %s" % self)
19
20 def _swig_setattr(self,class_type,name,value):
21 return _swig_setattr_nondynamic(self,class_type,name,value,0)
22
23 def _swig_getattr(self,class_type,name):
24 method = class_type.__swig_getmethods__.get(name,None)
25 if method: return method(self)
26 raise AttributeError,name
27
28 import types
29 try:
30 _object = types.ObjectType
31 _newclass = 1
32 except AttributeError:
33 class _object : pass
34 _newclass = 0
35 del types
36
37
38 def _swig_setattr_nondynamic_method(set):
39 def set_attr(self,name,value):
40 if hasattr(self,name) or (name in ("this", "thisown")):
41 set(self,name,value)
42 else:
43 raise AttributeError("You cannot add attributes to %s" % self)
44 return set_attr
45
46
47 #// Give a reference to the dictionary of this module to the C++ extension
48 #// code.
49 _core_._wxPySetDictionary(vars())
50
51 #// A little trick to make 'wx' be a reference to this module so wx.Names can
52 #// be used here.
53 import sys as _sys
54 wx = _sys.modules[__name__]
55
56
57 #----------------------------------------------------------------------------
58
59 def _deprecated(callable, msg=None):
60 """
61 Create a wrapper function that will raise a DeprecationWarning
62 before calling the callable.
63 """
64 if msg is None:
65 msg = "%s is deprecated" % callable
66 def deprecatedWrapper(*args, **kwargs):
67 import warnings
68 warnings.warn(msg, DeprecationWarning, stacklevel=2)
69 return callable(*args, **kwargs)
70 deprecatedWrapper.__doc__ = msg
71 return deprecatedWrapper
72
73
74 #----------------------------------------------------------------------------
75
76 NOT_FOUND = _core_.NOT_FOUND
77 VSCROLL = _core_.VSCROLL
78 HSCROLL = _core_.HSCROLL
79 CAPTION = _core_.CAPTION
80 DOUBLE_BORDER = _core_.DOUBLE_BORDER
81 SUNKEN_BORDER = _core_.SUNKEN_BORDER
82 RAISED_BORDER = _core_.RAISED_BORDER
83 BORDER = _core_.BORDER
84 SIMPLE_BORDER = _core_.SIMPLE_BORDER
85 STATIC_BORDER = _core_.STATIC_BORDER
86 TRANSPARENT_WINDOW = _core_.TRANSPARENT_WINDOW
87 NO_BORDER = _core_.NO_BORDER
88 DEFAULT_CONTROL_BORDER = _core_.DEFAULT_CONTROL_BORDER
89 TAB_TRAVERSAL = _core_.TAB_TRAVERSAL
90 WANTS_CHARS = _core_.WANTS_CHARS
91 POPUP_WINDOW = _core_.POPUP_WINDOW
92 CENTER_FRAME = _core_.CENTER_FRAME
93 CENTRE_ON_SCREEN = _core_.CENTRE_ON_SCREEN
94 CENTER_ON_SCREEN = _core_.CENTER_ON_SCREEN
95 CLIP_CHILDREN = _core_.CLIP_CHILDREN
96 CLIP_SIBLINGS = _core_.CLIP_SIBLINGS
97 ALWAYS_SHOW_SB = _core_.ALWAYS_SHOW_SB
98 RETAINED = _core_.RETAINED
99 BACKINGSTORE = _core_.BACKINGSTORE
100 COLOURED = _core_.COLOURED
101 FIXED_LENGTH = _core_.FIXED_LENGTH
102 LB_NEEDED_SB = _core_.LB_NEEDED_SB
103 LB_ALWAYS_SB = _core_.LB_ALWAYS_SB
104 LB_SORT = _core_.LB_SORT
105 LB_SINGLE = _core_.LB_SINGLE
106 LB_MULTIPLE = _core_.LB_MULTIPLE
107 LB_EXTENDED = _core_.LB_EXTENDED
108 LB_OWNERDRAW = _core_.LB_OWNERDRAW
109 LB_HSCROLL = _core_.LB_HSCROLL
110 PROCESS_ENTER = _core_.PROCESS_ENTER
111 PASSWORD = _core_.PASSWORD
112 CB_SIMPLE = _core_.CB_SIMPLE
113 CB_DROPDOWN = _core_.CB_DROPDOWN
114 CB_SORT = _core_.CB_SORT
115 CB_READONLY = _core_.CB_READONLY
116 RA_HORIZONTAL = _core_.RA_HORIZONTAL
117 RA_VERTICAL = _core_.RA_VERTICAL
118 RA_SPECIFY_ROWS = _core_.RA_SPECIFY_ROWS
119 RA_SPECIFY_COLS = _core_.RA_SPECIFY_COLS
120 RA_USE_CHECKBOX = _core_.RA_USE_CHECKBOX
121 RB_GROUP = _core_.RB_GROUP
122 RB_SINGLE = _core_.RB_SINGLE
123 SB_HORIZONTAL = _core_.SB_HORIZONTAL
124 SB_VERTICAL = _core_.SB_VERTICAL
125 RB_USE_CHECKBOX = _core_.RB_USE_CHECKBOX
126 ST_SIZEGRIP = _core_.ST_SIZEGRIP
127 ST_NO_AUTORESIZE = _core_.ST_NO_AUTORESIZE
128 FLOOD_SURFACE = _core_.FLOOD_SURFACE
129 FLOOD_BORDER = _core_.FLOOD_BORDER
130 ODDEVEN_RULE = _core_.ODDEVEN_RULE
131 WINDING_RULE = _core_.WINDING_RULE
132 TOOL_TOP = _core_.TOOL_TOP
133 TOOL_BOTTOM = _core_.TOOL_BOTTOM
134 TOOL_LEFT = _core_.TOOL_LEFT
135 TOOL_RIGHT = _core_.TOOL_RIGHT
136 OK = _core_.OK
137 YES_NO = _core_.YES_NO
138 CANCEL = _core_.CANCEL
139 YES = _core_.YES
140 NO = _core_.NO
141 NO_DEFAULT = _core_.NO_DEFAULT
142 YES_DEFAULT = _core_.YES_DEFAULT
143 ICON_EXCLAMATION = _core_.ICON_EXCLAMATION
144 ICON_HAND = _core_.ICON_HAND
145 ICON_QUESTION = _core_.ICON_QUESTION
146 ICON_INFORMATION = _core_.ICON_INFORMATION
147 ICON_STOP = _core_.ICON_STOP
148 ICON_ASTERISK = _core_.ICON_ASTERISK
149 ICON_MASK = _core_.ICON_MASK
150 ICON_WARNING = _core_.ICON_WARNING
151 ICON_ERROR = _core_.ICON_ERROR
152 FORWARD = _core_.FORWARD
153 BACKWARD = _core_.BACKWARD
154 RESET = _core_.RESET
155 HELP = _core_.HELP
156 MORE = _core_.MORE
157 SETUP = _core_.SETUP
158 SIZE_AUTO_WIDTH = _core_.SIZE_AUTO_WIDTH
159 SIZE_AUTO_HEIGHT = _core_.SIZE_AUTO_HEIGHT
160 SIZE_AUTO = _core_.SIZE_AUTO
161 SIZE_USE_EXISTING = _core_.SIZE_USE_EXISTING
162 SIZE_ALLOW_MINUS_ONE = _core_.SIZE_ALLOW_MINUS_ONE
163 PORTRAIT = _core_.PORTRAIT
164 LANDSCAPE = _core_.LANDSCAPE
165 PRINT_QUALITY_HIGH = _core_.PRINT_QUALITY_HIGH
166 PRINT_QUALITY_MEDIUM = _core_.PRINT_QUALITY_MEDIUM
167 PRINT_QUALITY_LOW = _core_.PRINT_QUALITY_LOW
168 PRINT_QUALITY_DRAFT = _core_.PRINT_QUALITY_DRAFT
169 ID_ANY = _core_.ID_ANY
170 ID_SEPARATOR = _core_.ID_SEPARATOR
171 ID_LOWEST = _core_.ID_LOWEST
172 ID_OPEN = _core_.ID_OPEN
173 ID_CLOSE = _core_.ID_CLOSE
174 ID_NEW = _core_.ID_NEW
175 ID_SAVE = _core_.ID_SAVE
176 ID_SAVEAS = _core_.ID_SAVEAS
177 ID_REVERT = _core_.ID_REVERT
178 ID_EXIT = _core_.ID_EXIT
179 ID_UNDO = _core_.ID_UNDO
180 ID_REDO = _core_.ID_REDO
181 ID_HELP = _core_.ID_HELP
182 ID_PRINT = _core_.ID_PRINT
183 ID_PRINT_SETUP = _core_.ID_PRINT_SETUP
184 ID_PREVIEW = _core_.ID_PREVIEW
185 ID_ABOUT = _core_.ID_ABOUT
186 ID_HELP_CONTENTS = _core_.ID_HELP_CONTENTS
187 ID_HELP_COMMANDS = _core_.ID_HELP_COMMANDS
188 ID_HELP_PROCEDURES = _core_.ID_HELP_PROCEDURES
189 ID_HELP_CONTEXT = _core_.ID_HELP_CONTEXT
190 ID_CLOSE_ALL = _core_.ID_CLOSE_ALL
191 ID_PREFERENCES = _core_.ID_PREFERENCES
192 ID_CUT = _core_.ID_CUT
193 ID_COPY = _core_.ID_COPY
194 ID_PASTE = _core_.ID_PASTE
195 ID_CLEAR = _core_.ID_CLEAR
196 ID_FIND = _core_.ID_FIND
197 ID_DUPLICATE = _core_.ID_DUPLICATE
198 ID_SELECTALL = _core_.ID_SELECTALL
199 ID_DELETE = _core_.ID_DELETE
200 ID_REPLACE = _core_.ID_REPLACE
201 ID_REPLACE_ALL = _core_.ID_REPLACE_ALL
202 ID_PROPERTIES = _core_.ID_PROPERTIES
203 ID_VIEW_DETAILS = _core_.ID_VIEW_DETAILS
204 ID_VIEW_LARGEICONS = _core_.ID_VIEW_LARGEICONS
205 ID_VIEW_SMALLICONS = _core_.ID_VIEW_SMALLICONS
206 ID_VIEW_LIST = _core_.ID_VIEW_LIST
207 ID_VIEW_SORTDATE = _core_.ID_VIEW_SORTDATE
208 ID_VIEW_SORTNAME = _core_.ID_VIEW_SORTNAME
209 ID_VIEW_SORTSIZE = _core_.ID_VIEW_SORTSIZE
210 ID_VIEW_SORTTYPE = _core_.ID_VIEW_SORTTYPE
211 ID_FILE1 = _core_.ID_FILE1
212 ID_FILE2 = _core_.ID_FILE2
213 ID_FILE3 = _core_.ID_FILE3
214 ID_FILE4 = _core_.ID_FILE4
215 ID_FILE5 = _core_.ID_FILE5
216 ID_FILE6 = _core_.ID_FILE6
217 ID_FILE7 = _core_.ID_FILE7
218 ID_FILE8 = _core_.ID_FILE8
219 ID_FILE9 = _core_.ID_FILE9
220 ID_OK = _core_.ID_OK
221 ID_CANCEL = _core_.ID_CANCEL
222 ID_APPLY = _core_.ID_APPLY
223 ID_YES = _core_.ID_YES
224 ID_NO = _core_.ID_NO
225 ID_STATIC = _core_.ID_STATIC
226 ID_FORWARD = _core_.ID_FORWARD
227 ID_BACKWARD = _core_.ID_BACKWARD
228 ID_DEFAULT = _core_.ID_DEFAULT
229 ID_MORE = _core_.ID_MORE
230 ID_SETUP = _core_.ID_SETUP
231 ID_RESET = _core_.ID_RESET
232 ID_CONTEXT_HELP = _core_.ID_CONTEXT_HELP
233 ID_YESTOALL = _core_.ID_YESTOALL
234 ID_NOTOALL = _core_.ID_NOTOALL
235 ID_ABORT = _core_.ID_ABORT
236 ID_RETRY = _core_.ID_RETRY
237 ID_IGNORE = _core_.ID_IGNORE
238 ID_ADD = _core_.ID_ADD
239 ID_REMOVE = _core_.ID_REMOVE
240 ID_UP = _core_.ID_UP
241 ID_DOWN = _core_.ID_DOWN
242 ID_HOME = _core_.ID_HOME
243 ID_REFRESH = _core_.ID_REFRESH
244 ID_STOP = _core_.ID_STOP
245 ID_INDEX = _core_.ID_INDEX
246 ID_BOLD = _core_.ID_BOLD
247 ID_ITALIC = _core_.ID_ITALIC
248 ID_JUSTIFY_CENTER = _core_.ID_JUSTIFY_CENTER
249 ID_JUSTIFY_FILL = _core_.ID_JUSTIFY_FILL
250 ID_JUSTIFY_RIGHT = _core_.ID_JUSTIFY_RIGHT
251 ID_JUSTIFY_LEFT = _core_.ID_JUSTIFY_LEFT
252 ID_UNDERLINE = _core_.ID_UNDERLINE
253 ID_INDENT = _core_.ID_INDENT
254 ID_UNINDENT = _core_.ID_UNINDENT
255 ID_ZOOM_100 = _core_.ID_ZOOM_100
256 ID_ZOOM_FIT = _core_.ID_ZOOM_FIT
257 ID_ZOOM_IN = _core_.ID_ZOOM_IN
258 ID_ZOOM_OUT = _core_.ID_ZOOM_OUT
259 ID_UNDELETE = _core_.ID_UNDELETE
260 ID_REVERT_TO_SAVED = _core_.ID_REVERT_TO_SAVED
261 ID_HIGHEST = _core_.ID_HIGHEST
262 OPEN = _core_.OPEN
263 SAVE = _core_.SAVE
264 HIDE_READONLY = _core_.HIDE_READONLY
265 OVERWRITE_PROMPT = _core_.OVERWRITE_PROMPT
266 FILE_MUST_EXIST = _core_.FILE_MUST_EXIST
267 MULTIPLE = _core_.MULTIPLE
268 CHANGE_DIR = _core_.CHANGE_DIR
269 ACCEL_ALT = _core_.ACCEL_ALT
270 ACCEL_CTRL = _core_.ACCEL_CTRL
271 ACCEL_SHIFT = _core_.ACCEL_SHIFT
272 ACCEL_NORMAL = _core_.ACCEL_NORMAL
273 PD_AUTO_HIDE = _core_.PD_AUTO_HIDE
274 PD_APP_MODAL = _core_.PD_APP_MODAL
275 PD_CAN_ABORT = _core_.PD_CAN_ABORT
276 PD_ELAPSED_TIME = _core_.PD_ELAPSED_TIME
277 PD_ESTIMATED_TIME = _core_.PD_ESTIMATED_TIME
278 PD_REMAINING_TIME = _core_.PD_REMAINING_TIME
279 PD_SMOOTH = _core_.PD_SMOOTH
280 PD_CAN_SKIP = _core_.PD_CAN_SKIP
281 DD_NEW_DIR_BUTTON = _core_.DD_NEW_DIR_BUTTON
282 DD_DEFAULT_STYLE = _core_.DD_DEFAULT_STYLE
283 MENU_TEAROFF = _core_.MENU_TEAROFF
284 MB_DOCKABLE = _core_.MB_DOCKABLE
285 NO_FULL_REPAINT_ON_RESIZE = _core_.NO_FULL_REPAINT_ON_RESIZE
286 FULL_REPAINT_ON_RESIZE = _core_.FULL_REPAINT_ON_RESIZE
287 LI_HORIZONTAL = _core_.LI_HORIZONTAL
288 LI_VERTICAL = _core_.LI_VERTICAL
289 WS_EX_VALIDATE_RECURSIVELY = _core_.WS_EX_VALIDATE_RECURSIVELY
290 WS_EX_BLOCK_EVENTS = _core_.WS_EX_BLOCK_EVENTS
291 WS_EX_TRANSIENT = _core_.WS_EX_TRANSIENT
292 WS_EX_THEMED_BACKGROUND = _core_.WS_EX_THEMED_BACKGROUND
293 WS_EX_PROCESS_IDLE = _core_.WS_EX_PROCESS_IDLE
294 WS_EX_PROCESS_UI_UPDATES = _core_.WS_EX_PROCESS_UI_UPDATES
295 MM_TEXT = _core_.MM_TEXT
296 MM_LOMETRIC = _core_.MM_LOMETRIC
297 MM_HIMETRIC = _core_.MM_HIMETRIC
298 MM_LOENGLISH = _core_.MM_LOENGLISH
299 MM_HIENGLISH = _core_.MM_HIENGLISH
300 MM_TWIPS = _core_.MM_TWIPS
301 MM_ISOTROPIC = _core_.MM_ISOTROPIC
302 MM_ANISOTROPIC = _core_.MM_ANISOTROPIC
303 MM_POINTS = _core_.MM_POINTS
304 MM_METRIC = _core_.MM_METRIC
305 CENTRE = _core_.CENTRE
306 CENTER = _core_.CENTER
307 HORIZONTAL = _core_.HORIZONTAL
308 VERTICAL = _core_.VERTICAL
309 BOTH = _core_.BOTH
310 LEFT = _core_.LEFT
311 RIGHT = _core_.RIGHT
312 UP = _core_.UP
313 DOWN = _core_.DOWN
314 TOP = _core_.TOP
315 BOTTOM = _core_.BOTTOM
316 NORTH = _core_.NORTH
317 SOUTH = _core_.SOUTH
318 WEST = _core_.WEST
319 EAST = _core_.EAST
320 ALL = _core_.ALL
321 ALIGN_NOT = _core_.ALIGN_NOT
322 ALIGN_CENTER_HORIZONTAL = _core_.ALIGN_CENTER_HORIZONTAL
323 ALIGN_CENTRE_HORIZONTAL = _core_.ALIGN_CENTRE_HORIZONTAL
324 ALIGN_LEFT = _core_.ALIGN_LEFT
325 ALIGN_TOP = _core_.ALIGN_TOP
326 ALIGN_RIGHT = _core_.ALIGN_RIGHT
327 ALIGN_BOTTOM = _core_.ALIGN_BOTTOM
328 ALIGN_CENTER_VERTICAL = _core_.ALIGN_CENTER_VERTICAL
329 ALIGN_CENTRE_VERTICAL = _core_.ALIGN_CENTRE_VERTICAL
330 ALIGN_CENTER = _core_.ALIGN_CENTER
331 ALIGN_CENTRE = _core_.ALIGN_CENTRE
332 ALIGN_MASK = _core_.ALIGN_MASK
333 STRETCH_NOT = _core_.STRETCH_NOT
334 SHRINK = _core_.SHRINK
335 GROW = _core_.GROW
336 EXPAND = _core_.EXPAND
337 SHAPED = _core_.SHAPED
338 FIXED_MINSIZE = _core_.FIXED_MINSIZE
339 TILE = _core_.TILE
340 ADJUST_MINSIZE = _core_.ADJUST_MINSIZE
341 BORDER_DEFAULT = _core_.BORDER_DEFAULT
342 BORDER_NONE = _core_.BORDER_NONE
343 BORDER_STATIC = _core_.BORDER_STATIC
344 BORDER_SIMPLE = _core_.BORDER_SIMPLE
345 BORDER_RAISED = _core_.BORDER_RAISED
346 BORDER_SUNKEN = _core_.BORDER_SUNKEN
347 BORDER_DOUBLE = _core_.BORDER_DOUBLE
348 BORDER_MASK = _core_.BORDER_MASK
349 BG_STYLE_SYSTEM = _core_.BG_STYLE_SYSTEM
350 BG_STYLE_COLOUR = _core_.BG_STYLE_COLOUR
351 BG_STYLE_CUSTOM = _core_.BG_STYLE_CUSTOM
352 DEFAULT = _core_.DEFAULT
353 DECORATIVE = _core_.DECORATIVE
354 ROMAN = _core_.ROMAN
355 SCRIPT = _core_.SCRIPT
356 SWISS = _core_.SWISS
357 MODERN = _core_.MODERN
358 TELETYPE = _core_.TELETYPE
359 VARIABLE = _core_.VARIABLE
360 FIXED = _core_.FIXED
361 NORMAL = _core_.NORMAL
362 LIGHT = _core_.LIGHT
363 BOLD = _core_.BOLD
364 ITALIC = _core_.ITALIC
365 SLANT = _core_.SLANT
366 SOLID = _core_.SOLID
367 DOT = _core_.DOT
368 LONG_DASH = _core_.LONG_DASH
369 SHORT_DASH = _core_.SHORT_DASH
370 DOT_DASH = _core_.DOT_DASH
371 USER_DASH = _core_.USER_DASH
372 TRANSPARENT = _core_.TRANSPARENT
373 STIPPLE = _core_.STIPPLE
374 BDIAGONAL_HATCH = _core_.BDIAGONAL_HATCH
375 CROSSDIAG_HATCH = _core_.CROSSDIAG_HATCH
376 FDIAGONAL_HATCH = _core_.FDIAGONAL_HATCH
377 CROSS_HATCH = _core_.CROSS_HATCH
378 HORIZONTAL_HATCH = _core_.HORIZONTAL_HATCH
379 VERTICAL_HATCH = _core_.VERTICAL_HATCH
380 JOIN_BEVEL = _core_.JOIN_BEVEL
381 JOIN_MITER = _core_.JOIN_MITER
382 JOIN_ROUND = _core_.JOIN_ROUND
383 CAP_ROUND = _core_.CAP_ROUND
384 CAP_PROJECTING = _core_.CAP_PROJECTING
385 CAP_BUTT = _core_.CAP_BUTT
386 CLEAR = _core_.CLEAR
387 XOR = _core_.XOR
388 INVERT = _core_.INVERT
389 OR_REVERSE = _core_.OR_REVERSE
390 AND_REVERSE = _core_.AND_REVERSE
391 COPY = _core_.COPY
392 AND = _core_.AND
393 AND_INVERT = _core_.AND_INVERT
394 NO_OP = _core_.NO_OP
395 NOR = _core_.NOR
396 EQUIV = _core_.EQUIV
397 SRC_INVERT = _core_.SRC_INVERT
398 OR_INVERT = _core_.OR_INVERT
399 NAND = _core_.NAND
400 OR = _core_.OR
401 SET = _core_.SET
402 WXK_BACK = _core_.WXK_BACK
403 WXK_TAB = _core_.WXK_TAB
404 WXK_RETURN = _core_.WXK_RETURN
405 WXK_ESCAPE = _core_.WXK_ESCAPE
406 WXK_SPACE = _core_.WXK_SPACE
407 WXK_DELETE = _core_.WXK_DELETE
408 WXK_START = _core_.WXK_START
409 WXK_LBUTTON = _core_.WXK_LBUTTON
410 WXK_RBUTTON = _core_.WXK_RBUTTON
411 WXK_CANCEL = _core_.WXK_CANCEL
412 WXK_MBUTTON = _core_.WXK_MBUTTON
413 WXK_CLEAR = _core_.WXK_CLEAR
414 WXK_SHIFT = _core_.WXK_SHIFT
415 WXK_ALT = _core_.WXK_ALT
416 WXK_CONTROL = _core_.WXK_CONTROL
417 WXK_MENU = _core_.WXK_MENU
418 WXK_PAUSE = _core_.WXK_PAUSE
419 WXK_CAPITAL = _core_.WXK_CAPITAL
420 WXK_PRIOR = _core_.WXK_PRIOR
421 WXK_NEXT = _core_.WXK_NEXT
422 WXK_END = _core_.WXK_END
423 WXK_HOME = _core_.WXK_HOME
424 WXK_LEFT = _core_.WXK_LEFT
425 WXK_UP = _core_.WXK_UP
426 WXK_RIGHT = _core_.WXK_RIGHT
427 WXK_DOWN = _core_.WXK_DOWN
428 WXK_SELECT = _core_.WXK_SELECT
429 WXK_PRINT = _core_.WXK_PRINT
430 WXK_EXECUTE = _core_.WXK_EXECUTE
431 WXK_SNAPSHOT = _core_.WXK_SNAPSHOT
432 WXK_INSERT = _core_.WXK_INSERT
433 WXK_HELP = _core_.WXK_HELP
434 WXK_NUMPAD0 = _core_.WXK_NUMPAD0
435 WXK_NUMPAD1 = _core_.WXK_NUMPAD1
436 WXK_NUMPAD2 = _core_.WXK_NUMPAD2
437 WXK_NUMPAD3 = _core_.WXK_NUMPAD3
438 WXK_NUMPAD4 = _core_.WXK_NUMPAD4
439 WXK_NUMPAD5 = _core_.WXK_NUMPAD5
440 WXK_NUMPAD6 = _core_.WXK_NUMPAD6
441 WXK_NUMPAD7 = _core_.WXK_NUMPAD7
442 WXK_NUMPAD8 = _core_.WXK_NUMPAD8
443 WXK_NUMPAD9 = _core_.WXK_NUMPAD9
444 WXK_MULTIPLY = _core_.WXK_MULTIPLY
445 WXK_ADD = _core_.WXK_ADD
446 WXK_SEPARATOR = _core_.WXK_SEPARATOR
447 WXK_SUBTRACT = _core_.WXK_SUBTRACT
448 WXK_DECIMAL = _core_.WXK_DECIMAL
449 WXK_DIVIDE = _core_.WXK_DIVIDE
450 WXK_F1 = _core_.WXK_F1
451 WXK_F2 = _core_.WXK_F2
452 WXK_F3 = _core_.WXK_F3
453 WXK_F4 = _core_.WXK_F4
454 WXK_F5 = _core_.WXK_F5
455 WXK_F6 = _core_.WXK_F6
456 WXK_F7 = _core_.WXK_F7
457 WXK_F8 = _core_.WXK_F8
458 WXK_F9 = _core_.WXK_F9
459 WXK_F10 = _core_.WXK_F10
460 WXK_F11 = _core_.WXK_F11
461 WXK_F12 = _core_.WXK_F12
462 WXK_F13 = _core_.WXK_F13
463 WXK_F14 = _core_.WXK_F14
464 WXK_F15 = _core_.WXK_F15
465 WXK_F16 = _core_.WXK_F16
466 WXK_F17 = _core_.WXK_F17
467 WXK_F18 = _core_.WXK_F18
468 WXK_F19 = _core_.WXK_F19
469 WXK_F20 = _core_.WXK_F20
470 WXK_F21 = _core_.WXK_F21
471 WXK_F22 = _core_.WXK_F22
472 WXK_F23 = _core_.WXK_F23
473 WXK_F24 = _core_.WXK_F24
474 WXK_NUMLOCK = _core_.WXK_NUMLOCK
475 WXK_SCROLL = _core_.WXK_SCROLL
476 WXK_PAGEUP = _core_.WXK_PAGEUP
477 WXK_PAGEDOWN = _core_.WXK_PAGEDOWN
478 WXK_NUMPAD_SPACE = _core_.WXK_NUMPAD_SPACE
479 WXK_NUMPAD_TAB = _core_.WXK_NUMPAD_TAB
480 WXK_NUMPAD_ENTER = _core_.WXK_NUMPAD_ENTER
481 WXK_NUMPAD_F1 = _core_.WXK_NUMPAD_F1
482 WXK_NUMPAD_F2 = _core_.WXK_NUMPAD_F2
483 WXK_NUMPAD_F3 = _core_.WXK_NUMPAD_F3
484 WXK_NUMPAD_F4 = _core_.WXK_NUMPAD_F4
485 WXK_NUMPAD_HOME = _core_.WXK_NUMPAD_HOME
486 WXK_NUMPAD_LEFT = _core_.WXK_NUMPAD_LEFT
487 WXK_NUMPAD_UP = _core_.WXK_NUMPAD_UP
488 WXK_NUMPAD_RIGHT = _core_.WXK_NUMPAD_RIGHT
489 WXK_NUMPAD_DOWN = _core_.WXK_NUMPAD_DOWN
490 WXK_NUMPAD_PRIOR = _core_.WXK_NUMPAD_PRIOR
491 WXK_NUMPAD_PAGEUP = _core_.WXK_NUMPAD_PAGEUP
492 WXK_NUMPAD_NEXT = _core_.WXK_NUMPAD_NEXT
493 WXK_NUMPAD_PAGEDOWN = _core_.WXK_NUMPAD_PAGEDOWN
494 WXK_NUMPAD_END = _core_.WXK_NUMPAD_END
495 WXK_NUMPAD_BEGIN = _core_.WXK_NUMPAD_BEGIN
496 WXK_NUMPAD_INSERT = _core_.WXK_NUMPAD_INSERT
497 WXK_NUMPAD_DELETE = _core_.WXK_NUMPAD_DELETE
498 WXK_NUMPAD_EQUAL = _core_.WXK_NUMPAD_EQUAL
499 WXK_NUMPAD_MULTIPLY = _core_.WXK_NUMPAD_MULTIPLY
500 WXK_NUMPAD_ADD = _core_.WXK_NUMPAD_ADD
501 WXK_NUMPAD_SEPARATOR = _core_.WXK_NUMPAD_SEPARATOR
502 WXK_NUMPAD_SUBTRACT = _core_.WXK_NUMPAD_SUBTRACT
503 WXK_NUMPAD_DECIMAL = _core_.WXK_NUMPAD_DECIMAL
504 WXK_NUMPAD_DIVIDE = _core_.WXK_NUMPAD_DIVIDE
505 WXK_WINDOWS_LEFT = _core_.WXK_WINDOWS_LEFT
506 WXK_WINDOWS_RIGHT = _core_.WXK_WINDOWS_RIGHT
507 WXK_WINDOWS_MENU = _core_.WXK_WINDOWS_MENU
508 WXK_COMMAND = _core_.WXK_COMMAND
509 WXK_SPECIAL1 = _core_.WXK_SPECIAL1
510 WXK_SPECIAL2 = _core_.WXK_SPECIAL2
511 WXK_SPECIAL3 = _core_.WXK_SPECIAL3
512 WXK_SPECIAL4 = _core_.WXK_SPECIAL4
513 WXK_SPECIAL5 = _core_.WXK_SPECIAL5
514 WXK_SPECIAL6 = _core_.WXK_SPECIAL6
515 WXK_SPECIAL7 = _core_.WXK_SPECIAL7
516 WXK_SPECIAL8 = _core_.WXK_SPECIAL8
517 WXK_SPECIAL9 = _core_.WXK_SPECIAL9
518 WXK_SPECIAL10 = _core_.WXK_SPECIAL10
519 WXK_SPECIAL11 = _core_.WXK_SPECIAL11
520 WXK_SPECIAL12 = _core_.WXK_SPECIAL12
521 WXK_SPECIAL13 = _core_.WXK_SPECIAL13
522 WXK_SPECIAL14 = _core_.WXK_SPECIAL14
523 WXK_SPECIAL15 = _core_.WXK_SPECIAL15
524 WXK_SPECIAL16 = _core_.WXK_SPECIAL16
525 WXK_SPECIAL17 = _core_.WXK_SPECIAL17
526 WXK_SPECIAL18 = _core_.WXK_SPECIAL18
527 WXK_SPECIAL19 = _core_.WXK_SPECIAL19
528 WXK_SPECIAL20 = _core_.WXK_SPECIAL20
529 PAPER_NONE = _core_.PAPER_NONE
530 PAPER_LETTER = _core_.PAPER_LETTER
531 PAPER_LEGAL = _core_.PAPER_LEGAL
532 PAPER_A4 = _core_.PAPER_A4
533 PAPER_CSHEET = _core_.PAPER_CSHEET
534 PAPER_DSHEET = _core_.PAPER_DSHEET
535 PAPER_ESHEET = _core_.PAPER_ESHEET
536 PAPER_LETTERSMALL = _core_.PAPER_LETTERSMALL
537 PAPER_TABLOID = _core_.PAPER_TABLOID
538 PAPER_LEDGER = _core_.PAPER_LEDGER
539 PAPER_STATEMENT = _core_.PAPER_STATEMENT
540 PAPER_EXECUTIVE = _core_.PAPER_EXECUTIVE
541 PAPER_A3 = _core_.PAPER_A3
542 PAPER_A4SMALL = _core_.PAPER_A4SMALL
543 PAPER_A5 = _core_.PAPER_A5
544 PAPER_B4 = _core_.PAPER_B4
545 PAPER_B5 = _core_.PAPER_B5
546 PAPER_FOLIO = _core_.PAPER_FOLIO
547 PAPER_QUARTO = _core_.PAPER_QUARTO
548 PAPER_10X14 = _core_.PAPER_10X14
549 PAPER_11X17 = _core_.PAPER_11X17
550 PAPER_NOTE = _core_.PAPER_NOTE
551 PAPER_ENV_9 = _core_.PAPER_ENV_9
552 PAPER_ENV_10 = _core_.PAPER_ENV_10
553 PAPER_ENV_11 = _core_.PAPER_ENV_11
554 PAPER_ENV_12 = _core_.PAPER_ENV_12
555 PAPER_ENV_14 = _core_.PAPER_ENV_14
556 PAPER_ENV_DL = _core_.PAPER_ENV_DL
557 PAPER_ENV_C5 = _core_.PAPER_ENV_C5
558 PAPER_ENV_C3 = _core_.PAPER_ENV_C3
559 PAPER_ENV_C4 = _core_.PAPER_ENV_C4
560 PAPER_ENV_C6 = _core_.PAPER_ENV_C6
561 PAPER_ENV_C65 = _core_.PAPER_ENV_C65
562 PAPER_ENV_B4 = _core_.PAPER_ENV_B4
563 PAPER_ENV_B5 = _core_.PAPER_ENV_B5
564 PAPER_ENV_B6 = _core_.PAPER_ENV_B6
565 PAPER_ENV_ITALY = _core_.PAPER_ENV_ITALY
566 PAPER_ENV_MONARCH = _core_.PAPER_ENV_MONARCH
567 PAPER_ENV_PERSONAL = _core_.PAPER_ENV_PERSONAL
568 PAPER_FANFOLD_US = _core_.PAPER_FANFOLD_US
569 PAPER_FANFOLD_STD_GERMAN = _core_.PAPER_FANFOLD_STD_GERMAN
570 PAPER_FANFOLD_LGL_GERMAN = _core_.PAPER_FANFOLD_LGL_GERMAN
571 PAPER_ISO_B4 = _core_.PAPER_ISO_B4
572 PAPER_JAPANESE_POSTCARD = _core_.PAPER_JAPANESE_POSTCARD
573 PAPER_9X11 = _core_.PAPER_9X11
574 PAPER_10X11 = _core_.PAPER_10X11
575 PAPER_15X11 = _core_.PAPER_15X11
576 PAPER_ENV_INVITE = _core_.PAPER_ENV_INVITE
577 PAPER_LETTER_EXTRA = _core_.PAPER_LETTER_EXTRA
578 PAPER_LEGAL_EXTRA = _core_.PAPER_LEGAL_EXTRA
579 PAPER_TABLOID_EXTRA = _core_.PAPER_TABLOID_EXTRA
580 PAPER_A4_EXTRA = _core_.PAPER_A4_EXTRA
581 PAPER_LETTER_TRANSVERSE = _core_.PAPER_LETTER_TRANSVERSE
582 PAPER_A4_TRANSVERSE = _core_.PAPER_A4_TRANSVERSE
583 PAPER_LETTER_EXTRA_TRANSVERSE = _core_.PAPER_LETTER_EXTRA_TRANSVERSE
584 PAPER_A_PLUS = _core_.PAPER_A_PLUS
585 PAPER_B_PLUS = _core_.PAPER_B_PLUS
586 PAPER_LETTER_PLUS = _core_.PAPER_LETTER_PLUS
587 PAPER_A4_PLUS = _core_.PAPER_A4_PLUS
588 PAPER_A5_TRANSVERSE = _core_.PAPER_A5_TRANSVERSE
589 PAPER_B5_TRANSVERSE = _core_.PAPER_B5_TRANSVERSE
590 PAPER_A3_EXTRA = _core_.PAPER_A3_EXTRA
591 PAPER_A5_EXTRA = _core_.PAPER_A5_EXTRA
592 PAPER_B5_EXTRA = _core_.PAPER_B5_EXTRA
593 PAPER_A2 = _core_.PAPER_A2
594 PAPER_A3_TRANSVERSE = _core_.PAPER_A3_TRANSVERSE
595 PAPER_A3_EXTRA_TRANSVERSE = _core_.PAPER_A3_EXTRA_TRANSVERSE
596 DUPLEX_SIMPLEX = _core_.DUPLEX_SIMPLEX
597 DUPLEX_HORIZONTAL = _core_.DUPLEX_HORIZONTAL
598 DUPLEX_VERTICAL = _core_.DUPLEX_VERTICAL
599 ITEM_SEPARATOR = _core_.ITEM_SEPARATOR
600 ITEM_NORMAL = _core_.ITEM_NORMAL
601 ITEM_CHECK = _core_.ITEM_CHECK
602 ITEM_RADIO = _core_.ITEM_RADIO
603 ITEM_MAX = _core_.ITEM_MAX
604 HT_NOWHERE = _core_.HT_NOWHERE
605 HT_SCROLLBAR_FIRST = _core_.HT_SCROLLBAR_FIRST
606 HT_SCROLLBAR_ARROW_LINE_1 = _core_.HT_SCROLLBAR_ARROW_LINE_1
607 HT_SCROLLBAR_ARROW_LINE_2 = _core_.HT_SCROLLBAR_ARROW_LINE_2
608 HT_SCROLLBAR_ARROW_PAGE_1 = _core_.HT_SCROLLBAR_ARROW_PAGE_1
609 HT_SCROLLBAR_ARROW_PAGE_2 = _core_.HT_SCROLLBAR_ARROW_PAGE_2
610 HT_SCROLLBAR_THUMB = _core_.HT_SCROLLBAR_THUMB
611 HT_SCROLLBAR_BAR_1 = _core_.HT_SCROLLBAR_BAR_1
612 HT_SCROLLBAR_BAR_2 = _core_.HT_SCROLLBAR_BAR_2
613 HT_SCROLLBAR_LAST = _core_.HT_SCROLLBAR_LAST
614 HT_WINDOW_OUTSIDE = _core_.HT_WINDOW_OUTSIDE
615 HT_WINDOW_INSIDE = _core_.HT_WINDOW_INSIDE
616 HT_WINDOW_VERT_SCROLLBAR = _core_.HT_WINDOW_VERT_SCROLLBAR
617 HT_WINDOW_HORZ_SCROLLBAR = _core_.HT_WINDOW_HORZ_SCROLLBAR
618 HT_WINDOW_CORNER = _core_.HT_WINDOW_CORNER
619 HT_MAX = _core_.HT_MAX
620 MOD_NONE = _core_.MOD_NONE
621 MOD_ALT = _core_.MOD_ALT
622 MOD_CONTROL = _core_.MOD_CONTROL
623 MOD_SHIFT = _core_.MOD_SHIFT
624 MOD_WIN = _core_.MOD_WIN
625 UPDATE_UI_NONE = _core_.UPDATE_UI_NONE
626 UPDATE_UI_RECURSE = _core_.UPDATE_UI_RECURSE
627 UPDATE_UI_FROMIDLE = _core_.UPDATE_UI_FROMIDLE
628 #---------------------------------------------------------------------------
629
630 class Object(object):
631 """
632 The base class for most wx objects, although in wxPython not
633 much functionality is needed nor exposed.
634 """
635 def __init__(self): raise RuntimeError, "No constructor defined"
636 def __repr__(self):
637 return "<%s.%s; proxy of C++ wxObject instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
638 def GetClassName(*args, **kwargs):
639 """
640 GetClassName(self) -> String
641
642 Returns the class name of the C++ class using wxRTTI.
643 """
644 return _core_.Object_GetClassName(*args, **kwargs)
645
646 def Destroy(*args, **kwargs):
647 """
648 Destroy(self)
649
650 Deletes the C++ object this Python object is a proxy for.
651 """
652 return _core_.Object_Destroy(*args, **kwargs)
653
654
655 class ObjectPtr(Object):
656 def __init__(self, this):
657 self.this = this
658 if not hasattr(self,"thisown"): self.thisown = 0
659 self.__class__ = Object
660 _core_.Object_swigregister(ObjectPtr)
661 _wxPySetDictionary = _core_._wxPySetDictionary
662
663 _wxPyFixStockObjects = _core_._wxPyFixStockObjects
664
665 cvar = _core_.cvar
666 EmptyString = cvar.EmptyString
667
668 #---------------------------------------------------------------------------
669
670 BITMAP_TYPE_INVALID = _core_.BITMAP_TYPE_INVALID
671 BITMAP_TYPE_BMP = _core_.BITMAP_TYPE_BMP
672 BITMAP_TYPE_ICO = _core_.BITMAP_TYPE_ICO
673 BITMAP_TYPE_CUR = _core_.BITMAP_TYPE_CUR
674 BITMAP_TYPE_XBM = _core_.BITMAP_TYPE_XBM
675 BITMAP_TYPE_XBM_DATA = _core_.BITMAP_TYPE_XBM_DATA
676 BITMAP_TYPE_XPM = _core_.BITMAP_TYPE_XPM
677 BITMAP_TYPE_XPM_DATA = _core_.BITMAP_TYPE_XPM_DATA
678 BITMAP_TYPE_TIF = _core_.BITMAP_TYPE_TIF
679 BITMAP_TYPE_GIF = _core_.BITMAP_TYPE_GIF
680 BITMAP_TYPE_PNG = _core_.BITMAP_TYPE_PNG
681 BITMAP_TYPE_JPEG = _core_.BITMAP_TYPE_JPEG
682 BITMAP_TYPE_PNM = _core_.BITMAP_TYPE_PNM
683 BITMAP_TYPE_PCX = _core_.BITMAP_TYPE_PCX
684 BITMAP_TYPE_PICT = _core_.BITMAP_TYPE_PICT
685 BITMAP_TYPE_ICON = _core_.BITMAP_TYPE_ICON
686 BITMAP_TYPE_ANI = _core_.BITMAP_TYPE_ANI
687 BITMAP_TYPE_IFF = _core_.BITMAP_TYPE_IFF
688 BITMAP_TYPE_MACCURSOR = _core_.BITMAP_TYPE_MACCURSOR
689 BITMAP_TYPE_ANY = _core_.BITMAP_TYPE_ANY
690 CURSOR_NONE = _core_.CURSOR_NONE
691 CURSOR_ARROW = _core_.CURSOR_ARROW
692 CURSOR_RIGHT_ARROW = _core_.CURSOR_RIGHT_ARROW
693 CURSOR_BULLSEYE = _core_.CURSOR_BULLSEYE
694 CURSOR_CHAR = _core_.CURSOR_CHAR
695 CURSOR_CROSS = _core_.CURSOR_CROSS
696 CURSOR_HAND = _core_.CURSOR_HAND
697 CURSOR_IBEAM = _core_.CURSOR_IBEAM
698 CURSOR_LEFT_BUTTON = _core_.CURSOR_LEFT_BUTTON
699 CURSOR_MAGNIFIER = _core_.CURSOR_MAGNIFIER
700 CURSOR_MIDDLE_BUTTON = _core_.CURSOR_MIDDLE_BUTTON
701 CURSOR_NO_ENTRY = _core_.CURSOR_NO_ENTRY
702 CURSOR_PAINT_BRUSH = _core_.CURSOR_PAINT_BRUSH
703 CURSOR_PENCIL = _core_.CURSOR_PENCIL
704 CURSOR_POINT_LEFT = _core_.CURSOR_POINT_LEFT
705 CURSOR_POINT_RIGHT = _core_.CURSOR_POINT_RIGHT
706 CURSOR_QUESTION_ARROW = _core_.CURSOR_QUESTION_ARROW
707 CURSOR_RIGHT_BUTTON = _core_.CURSOR_RIGHT_BUTTON
708 CURSOR_SIZENESW = _core_.CURSOR_SIZENESW
709 CURSOR_SIZENS = _core_.CURSOR_SIZENS
710 CURSOR_SIZENWSE = _core_.CURSOR_SIZENWSE
711 CURSOR_SIZEWE = _core_.CURSOR_SIZEWE
712 CURSOR_SIZING = _core_.CURSOR_SIZING
713 CURSOR_SPRAYCAN = _core_.CURSOR_SPRAYCAN
714 CURSOR_WAIT = _core_.CURSOR_WAIT
715 CURSOR_WATCH = _core_.CURSOR_WATCH
716 CURSOR_BLANK = _core_.CURSOR_BLANK
717 CURSOR_DEFAULT = _core_.CURSOR_DEFAULT
718 CURSOR_COPY_ARROW = _core_.CURSOR_COPY_ARROW
719 CURSOR_ARROWWAIT = _core_.CURSOR_ARROWWAIT
720 CURSOR_MAX = _core_.CURSOR_MAX
721 #---------------------------------------------------------------------------
722
723 class Size(object):
724 """
725 wx.Size is a useful data structure used to represent the size of
726 something. It simply contians integer width and height
727 proprtites. In most places in wxPython where a wx.Size is
728 expected a (width, height) tuple can be used instead.
729 """
730 def __repr__(self):
731 return "<%s.%s; proxy of C++ wxSize instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
732 width = property(_core_.Size_width_get, _core_.Size_width_set)
733 height = property(_core_.Size_height_get, _core_.Size_height_set)
734 x = width; y = height
735 def __init__(self, *args, **kwargs):
736 """
737 __init__(self, int w=0, int h=0) -> Size
738
739 Creates a size object.
740 """
741 newobj = _core_.new_Size(*args, **kwargs)
742 self.this = newobj.this
743 self.thisown = 1
744 del newobj.thisown
745 def __del__(self, destroy=_core_.delete_Size):
746 """__del__(self)"""
747 try:
748 if self.thisown: destroy(self)
749 except: pass
750
751 def __eq__(*args, **kwargs):
752 """
753 __eq__(self, Size sz) -> bool
754
755 Test for equality of wx.Size objects.
756 """
757 return _core_.Size___eq__(*args, **kwargs)
758
759 def __ne__(*args, **kwargs):
760 """
761 __ne__(self, Size sz) -> bool
762
763 Test for inequality.
764 """
765 return _core_.Size___ne__(*args, **kwargs)
766
767 def __add__(*args, **kwargs):
768 """
769 __add__(self, Size sz) -> Size
770
771 Add sz's proprties to this and return the result.
772 """
773 return _core_.Size___add__(*args, **kwargs)
774
775 def __sub__(*args, **kwargs):
776 """
777 __sub__(self, Size sz) -> Size
778
779 Subtract sz's properties from this and return the result.
780 """
781 return _core_.Size___sub__(*args, **kwargs)
782
783 def IncTo(*args, **kwargs):
784 """
785 IncTo(self, Size sz)
786
787 Increments this object so that both of its dimensions are not less
788 than the corresponding dimensions of the size.
789 """
790 return _core_.Size_IncTo(*args, **kwargs)
791
792 def DecTo(*args, **kwargs):
793 """
794 DecTo(self, Size sz)
795
796 Decrements this object so that both of its dimensions are not greater
797 than the corresponding dimensions of the size.
798 """
799 return _core_.Size_DecTo(*args, **kwargs)
800
801 def Set(*args, **kwargs):
802 """
803 Set(self, int w, int h)
804
805 Set both width and height.
806 """
807 return _core_.Size_Set(*args, **kwargs)
808
809 def SetWidth(*args, **kwargs):
810 """SetWidth(self, int w)"""
811 return _core_.Size_SetWidth(*args, **kwargs)
812
813 def SetHeight(*args, **kwargs):
814 """SetHeight(self, int h)"""
815 return _core_.Size_SetHeight(*args, **kwargs)
816
817 def GetWidth(*args, **kwargs):
818 """GetWidth(self) -> int"""
819 return _core_.Size_GetWidth(*args, **kwargs)
820
821 def GetHeight(*args, **kwargs):
822 """GetHeight(self) -> int"""
823 return _core_.Size_GetHeight(*args, **kwargs)
824
825 def IsFullySpecified(*args, **kwargs):
826 """
827 IsFullySpecified(self) -> bool
828
829 Returns True if both components of the size are non-default values.
830 """
831 return _core_.Size_IsFullySpecified(*args, **kwargs)
832
833 def SetDefaults(*args, **kwargs):
834 """
835 SetDefaults(self, Size size)
836
837 Combine this size with the other one replacing the default components
838 of this object (i.e. equal to -1) with those of the other.
839 """
840 return _core_.Size_SetDefaults(*args, **kwargs)
841
842 def Get(*args, **kwargs):
843 """
844 Get() -> (width,height)
845
846 Returns the width and height properties as a tuple.
847 """
848 return _core_.Size_Get(*args, **kwargs)
849
850 asTuple = wx._deprecated(Get, "asTuple is deprecated, use `Get` instead")
851 def __str__(self): return str(self.Get())
852 def __repr__(self): return 'wx.Size'+str(self.Get())
853 def __len__(self): return len(self.Get())
854 def __getitem__(self, index): return self.Get()[index]
855 def __setitem__(self, index, val):
856 if index == 0: self.width = val
857 elif index == 1: self.height = val
858 else: raise IndexError
859 def __nonzero__(self): return self.Get() != (0,0)
860 __safe_for_unpickling__ = True
861 def __reduce__(self): return (wx.Size, self.Get())
862
863
864 class SizePtr(Size):
865 def __init__(self, this):
866 self.this = this
867 if not hasattr(self,"thisown"): self.thisown = 0
868 self.__class__ = Size
869 _core_.Size_swigregister(SizePtr)
870
871 #---------------------------------------------------------------------------
872
873 class RealPoint(object):
874 """
875 A data structure for representing a point or position with floating
876 point x and y properties. In wxPython most places that expect a
877 wx.RealPoint can also accept a (x,y) tuple.
878 """
879 def __repr__(self):
880 return "<%s.%s; proxy of C++ wxRealPoint instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
881 x = property(_core_.RealPoint_x_get, _core_.RealPoint_x_set)
882 y = property(_core_.RealPoint_y_get, _core_.RealPoint_y_set)
883 def __init__(self, *args, **kwargs):
884 """
885 __init__(self, double x=0.0, double y=0.0) -> RealPoint
886
887 Create a wx.RealPoint object
888 """
889 newobj = _core_.new_RealPoint(*args, **kwargs)
890 self.this = newobj.this
891 self.thisown = 1
892 del newobj.thisown
893 def __del__(self, destroy=_core_.delete_RealPoint):
894 """__del__(self)"""
895 try:
896 if self.thisown: destroy(self)
897 except: pass
898
899 def __eq__(*args, **kwargs):
900 """
901 __eq__(self, RealPoint pt) -> bool
902
903 Test for equality of wx.RealPoint objects.
904 """
905 return _core_.RealPoint___eq__(*args, **kwargs)
906
907 def __ne__(*args, **kwargs):
908 """
909 __ne__(self, RealPoint pt) -> bool
910
911 Test for inequality of wx.RealPoint objects.
912 """
913 return _core_.RealPoint___ne__(*args, **kwargs)
914
915 def __add__(*args, **kwargs):
916 """
917 __add__(self, RealPoint pt) -> RealPoint
918
919 Add pt's proprties to this and return the result.
920 """
921 return _core_.RealPoint___add__(*args, **kwargs)
922
923 def __sub__(*args, **kwargs):
924 """
925 __sub__(self, RealPoint pt) -> RealPoint
926
927 Subtract pt's proprties from this and return the result
928 """
929 return _core_.RealPoint___sub__(*args, **kwargs)
930
931 def Set(*args, **kwargs):
932 """
933 Set(self, double x, double y)
934
935 Set both the x and y properties
936 """
937 return _core_.RealPoint_Set(*args, **kwargs)
938
939 def Get(*args, **kwargs):
940 """
941 Get() -> (x,y)
942
943 Return the x and y properties as a tuple.
944 """
945 return _core_.RealPoint_Get(*args, **kwargs)
946
947 asTuple = wx._deprecated(Get, "asTuple is deprecated, use `Get` instead")
948 def __str__(self): return str(self.Get())
949 def __repr__(self): return 'wx.RealPoint'+str(self.Get())
950 def __len__(self): return len(self.Get())
951 def __getitem__(self, index): return self.Get()[index]
952 def __setitem__(self, index, val):
953 if index == 0: self.x = val
954 elif index == 1: self.y = val
955 else: raise IndexError
956 def __nonzero__(self): return self.Get() != (0.0, 0.0)
957 __safe_for_unpickling__ = True
958 def __reduce__(self): return (wx.RealPoint, self.Get())
959
960
961 class RealPointPtr(RealPoint):
962 def __init__(self, this):
963 self.this = this
964 if not hasattr(self,"thisown"): self.thisown = 0
965 self.__class__ = RealPoint
966 _core_.RealPoint_swigregister(RealPointPtr)
967
968 #---------------------------------------------------------------------------
969
970 class Point(object):
971 """
972 A data structure for representing a point or position with integer x
973 and y properties. Most places in wxPython that expect a wx.Point can
974 also accept a (x,y) tuple.
975 """
976 def __repr__(self):
977 return "<%s.%s; proxy of C++ wxPoint instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
978 x = property(_core_.Point_x_get, _core_.Point_x_set)
979 y = property(_core_.Point_y_get, _core_.Point_y_set)
980 def __init__(self, *args, **kwargs):
981 """
982 __init__(self, int x=0, int y=0) -> Point
983
984 Create a wx.Point object
985 """
986 newobj = _core_.new_Point(*args, **kwargs)
987 self.this = newobj.this
988 self.thisown = 1
989 del newobj.thisown
990 def __del__(self, destroy=_core_.delete_Point):
991 """__del__(self)"""
992 try:
993 if self.thisown: destroy(self)
994 except: pass
995
996 def __eq__(*args, **kwargs):
997 """
998 __eq__(self, Point pt) -> bool
999
1000 Test for equality of wx.Point objects.
1001 """
1002 return _core_.Point___eq__(*args, **kwargs)
1003
1004 def __ne__(*args, **kwargs):
1005 """
1006 __ne__(self, Point pt) -> bool
1007
1008 Test for inequality of wx.Point objects.
1009 """
1010 return _core_.Point___ne__(*args, **kwargs)
1011
1012 def __add__(*args, **kwargs):
1013 """
1014 __add__(self, Point pt) -> Point
1015
1016 Add pt's proprties to this and return the result.
1017 """
1018 return _core_.Point___add__(*args, **kwargs)
1019
1020 def __sub__(*args, **kwargs):
1021 """
1022 __sub__(self, Point pt) -> Point
1023
1024 Subtract pt's proprties from this and return the result
1025 """
1026 return _core_.Point___sub__(*args, **kwargs)
1027
1028 def __iadd__(*args, **kwargs):
1029 """
1030 __iadd__(self, Point pt) -> Point
1031
1032 Add pt to this object.
1033 """
1034 return _core_.Point___iadd__(*args, **kwargs)
1035
1036 def __isub__(*args, **kwargs):
1037 """
1038 __isub__(self, Point pt) -> Point
1039
1040 Subtract pt from this object.
1041 """
1042 return _core_.Point___isub__(*args, **kwargs)
1043
1044 def Set(*args, **kwargs):
1045 """
1046 Set(self, long x, long y)
1047
1048 Set both the x and y properties
1049 """
1050 return _core_.Point_Set(*args, **kwargs)
1051
1052 def Get(*args, **kwargs):
1053 """
1054 Get() -> (x,y)
1055
1056 Return the x and y properties as a tuple.
1057 """
1058 return _core_.Point_Get(*args, **kwargs)
1059
1060 asTuple = wx._deprecated(Get, "asTuple is deprecated, use `Get` instead")
1061 def __str__(self): return str(self.Get())
1062 def __repr__(self): return 'wx.Point'+str(self.Get())
1063 def __len__(self): return len(self.Get())
1064 def __getitem__(self, index): return self.Get()[index]
1065 def __setitem__(self, index, val):
1066 if index == 0: self.x = val
1067 elif index == 1: self.y = val
1068 else: raise IndexError
1069 def __nonzero__(self): return self.Get() != (0,0)
1070 __safe_for_unpickling__ = True
1071 def __reduce__(self): return (wx.Point, self.Get())
1072
1073
1074 class PointPtr(Point):
1075 def __init__(self, this):
1076 self.this = this
1077 if not hasattr(self,"thisown"): self.thisown = 0
1078 self.__class__ = Point
1079 _core_.Point_swigregister(PointPtr)
1080
1081 #---------------------------------------------------------------------------
1082
1083 class Rect(object):
1084 """
1085 A class for representing and manipulating rectangles. It has x, y,
1086 width and height properties. In wxPython most palces that expect a
1087 wx.Rect can also accept a (x,y,width,height) tuple.
1088 """
1089 def __repr__(self):
1090 return "<%s.%s; proxy of C++ wxRect instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
1091 def __init__(self, *args, **kwargs):
1092 """
1093 __init__(self, int x=0, int y=0, int width=0, int height=0) -> Rect
1094
1095 Create a new Rect object.
1096 """
1097 newobj = _core_.new_Rect(*args, **kwargs)
1098 self.this = newobj.this
1099 self.thisown = 1
1100 del newobj.thisown
1101 def __del__(self, destroy=_core_.delete_Rect):
1102 """__del__(self)"""
1103 try:
1104 if self.thisown: destroy(self)
1105 except: pass
1106
1107 def GetX(*args, **kwargs):
1108 """GetX(self) -> int"""
1109 return _core_.Rect_GetX(*args, **kwargs)
1110
1111 def SetX(*args, **kwargs):
1112 """SetX(self, int x)"""
1113 return _core_.Rect_SetX(*args, **kwargs)
1114
1115 def GetY(*args, **kwargs):
1116 """GetY(self) -> int"""
1117 return _core_.Rect_GetY(*args, **kwargs)
1118
1119 def SetY(*args, **kwargs):
1120 """SetY(self, int y)"""
1121 return _core_.Rect_SetY(*args, **kwargs)
1122
1123 def GetWidth(*args, **kwargs):
1124 """GetWidth(self) -> int"""
1125 return _core_.Rect_GetWidth(*args, **kwargs)
1126
1127 def SetWidth(*args, **kwargs):
1128 """SetWidth(self, int w)"""
1129 return _core_.Rect_SetWidth(*args, **kwargs)
1130
1131 def GetHeight(*args, **kwargs):
1132 """GetHeight(self) -> int"""
1133 return _core_.Rect_GetHeight(*args, **kwargs)
1134
1135 def SetHeight(*args, **kwargs):
1136 """SetHeight(self, int h)"""
1137 return _core_.Rect_SetHeight(*args, **kwargs)
1138
1139 def GetPosition(*args, **kwargs):
1140 """GetPosition(self) -> Point"""
1141 return _core_.Rect_GetPosition(*args, **kwargs)
1142
1143 def SetPosition(*args, **kwargs):
1144 """SetPosition(self, Point p)"""
1145 return _core_.Rect_SetPosition(*args, **kwargs)
1146
1147 def GetSize(*args, **kwargs):
1148 """GetSize(self) -> Size"""
1149 return _core_.Rect_GetSize(*args, **kwargs)
1150
1151 def SetSize(*args, **kwargs):
1152 """SetSize(self, Size s)"""
1153 return _core_.Rect_SetSize(*args, **kwargs)
1154
1155 def IsEmpty(*args, **kwargs):
1156 """IsEmpty(self) -> bool"""
1157 return _core_.Rect_IsEmpty(*args, **kwargs)
1158
1159 def GetTopLeft(*args, **kwargs):
1160 """GetTopLeft(self) -> Point"""
1161 return _core_.Rect_GetTopLeft(*args, **kwargs)
1162
1163 def SetTopLeft(*args, **kwargs):
1164 """SetTopLeft(self, Point p)"""
1165 return _core_.Rect_SetTopLeft(*args, **kwargs)
1166
1167 def GetBottomRight(*args, **kwargs):
1168 """GetBottomRight(self) -> Point"""
1169 return _core_.Rect_GetBottomRight(*args, **kwargs)
1170
1171 def SetBottomRight(*args, **kwargs):
1172 """SetBottomRight(self, Point p)"""
1173 return _core_.Rect_SetBottomRight(*args, **kwargs)
1174
1175 def GetLeft(*args, **kwargs):
1176 """GetLeft(self) -> int"""
1177 return _core_.Rect_GetLeft(*args, **kwargs)
1178
1179 def GetTop(*args, **kwargs):
1180 """GetTop(self) -> int"""
1181 return _core_.Rect_GetTop(*args, **kwargs)
1182
1183 def GetBottom(*args, **kwargs):
1184 """GetBottom(self) -> int"""
1185 return _core_.Rect_GetBottom(*args, **kwargs)
1186
1187 def GetRight(*args, **kwargs):
1188 """GetRight(self) -> int"""
1189 return _core_.Rect_GetRight(*args, **kwargs)
1190
1191 def SetLeft(*args, **kwargs):
1192 """SetLeft(self, int left)"""
1193 return _core_.Rect_SetLeft(*args, **kwargs)
1194
1195 def SetRight(*args, **kwargs):
1196 """SetRight(self, int right)"""
1197 return _core_.Rect_SetRight(*args, **kwargs)
1198
1199 def SetTop(*args, **kwargs):
1200 """SetTop(self, int top)"""
1201 return _core_.Rect_SetTop(*args, **kwargs)
1202
1203 def SetBottom(*args, **kwargs):
1204 """SetBottom(self, int bottom)"""
1205 return _core_.Rect_SetBottom(*args, **kwargs)
1206
1207 position = property(GetPosition, SetPosition)
1208 size = property(GetSize, SetSize)
1209 left = property(GetLeft, SetLeft)
1210 right = property(GetRight, SetRight)
1211 top = property(GetTop, SetTop)
1212 bottom = property(GetBottom, SetBottom)
1213
1214 def Inflate(*args, **kwargs):
1215 """
1216 Inflate(self, int dx, int dy) -> Rect
1217
1218 Increases the size of the rectangle.
1219
1220 The left border is moved farther left and the right border is moved
1221 farther right by ``dx``. The upper border is moved farther up and the
1222 bottom border is moved farther down by ``dy``. (Note the the width and
1223 height of the rectangle thus change by ``2*dx`` and ``2*dy``,
1224 respectively.) If one or both of ``dx`` and ``dy`` are negative, the
1225 opposite happens: the rectangle size decreases in the respective
1226 direction.
1227
1228 The change is made to the rectangle inplace, if instead you need a
1229 copy that is inflated, preserving the original then make the copy
1230 first::
1231
1232 copy = wx.Rect(*original)
1233 copy.Inflate(10,15)
1234
1235
1236 """
1237 return _core_.Rect_Inflate(*args, **kwargs)
1238
1239 def Deflate(*args, **kwargs):
1240 """
1241 Deflate(self, int dx, int dy) -> Rect
1242
1243 Decrease the rectangle size. This method is the opposite of `Inflate`
1244 in that Deflate(a,b) is equivalent to Inflate(-a,-b). Please refer to
1245 `Inflate` for a full description.
1246 """
1247 return _core_.Rect_Deflate(*args, **kwargs)
1248
1249 def OffsetXY(*args, **kwargs):
1250 """
1251 OffsetXY(self, int dx, int dy)
1252
1253 Moves the rectangle by the specified offset. If dx is positive, the
1254 rectangle is moved to the right, if dy is positive, it is moved to the
1255 bottom, otherwise it is moved to the left or top respectively.
1256 """
1257 return _core_.Rect_OffsetXY(*args, **kwargs)
1258
1259 def Offset(*args, **kwargs):
1260 """
1261 Offset(self, Point pt)
1262
1263 Same as OffsetXY but uses dx,dy from Point
1264 """
1265 return _core_.Rect_Offset(*args, **kwargs)
1266
1267 def Intersect(*args, **kwargs):
1268 """
1269 Intersect(self, Rect rect) -> Rect
1270
1271 Returns the intersectsion of this rectangle and rect.
1272 """
1273 return _core_.Rect_Intersect(*args, **kwargs)
1274
1275 def Union(*args, **kwargs):
1276 """
1277 Union(self, Rect rect) -> Rect
1278
1279 Returns the union of this rectangle and rect.
1280 """
1281 return _core_.Rect_Union(*args, **kwargs)
1282
1283 def __add__(*args, **kwargs):
1284 """
1285 __add__(self, Rect rect) -> Rect
1286
1287 Add the properties of rect to this rectangle and return the result.
1288 """
1289 return _core_.Rect___add__(*args, **kwargs)
1290
1291 def __iadd__(*args, **kwargs):
1292 """
1293 __iadd__(self, Rect rect) -> Rect
1294
1295 Add the properties of rect to this rectangle, updating this rectangle.
1296 """
1297 return _core_.Rect___iadd__(*args, **kwargs)
1298
1299 def __eq__(*args, **kwargs):
1300 """
1301 __eq__(self, Rect rect) -> bool
1302
1303 Test for equality.
1304 """
1305 return _core_.Rect___eq__(*args, **kwargs)
1306
1307 def __ne__(*args, **kwargs):
1308 """
1309 __ne__(self, Rect rect) -> bool
1310
1311 Test for inequality.
1312 """
1313 return _core_.Rect___ne__(*args, **kwargs)
1314
1315 def InsideXY(*args, **kwargs):
1316 """
1317 InsideXY(self, int x, int y) -> bool
1318
1319 Return True if the point is (not strcitly) inside the rect.
1320 """
1321 return _core_.Rect_InsideXY(*args, **kwargs)
1322
1323 def Inside(*args, **kwargs):
1324 """
1325 Inside(self, Point pt) -> bool
1326
1327 Return True if the point is (not strcitly) inside the rect.
1328 """
1329 return _core_.Rect_Inside(*args, **kwargs)
1330
1331 def Intersects(*args, **kwargs):
1332 """
1333 Intersects(self, Rect rect) -> bool
1334
1335 Returns True if the rectangles have a non empty intersection.
1336 """
1337 return _core_.Rect_Intersects(*args, **kwargs)
1338
1339 x = property(_core_.Rect_x_get, _core_.Rect_x_set)
1340 y = property(_core_.Rect_y_get, _core_.Rect_y_set)
1341 width = property(_core_.Rect_width_get, _core_.Rect_width_set)
1342 height = property(_core_.Rect_height_get, _core_.Rect_height_set)
1343 def Set(*args, **kwargs):
1344 """
1345 Set(self, int x=0, int y=0, int width=0, int height=0)
1346
1347 Set all rectangle properties.
1348 """
1349 return _core_.Rect_Set(*args, **kwargs)
1350
1351 def Get(*args, **kwargs):
1352 """
1353 Get() -> (x,y,width,height)
1354
1355 Return the rectangle properties as a tuple.
1356 """
1357 return _core_.Rect_Get(*args, **kwargs)
1358
1359 asTuple = wx._deprecated(Get, "asTuple is deprecated, use `Get` instead")
1360 def __str__(self): return str(self.Get())
1361 def __repr__(self): return 'wx.Rect'+str(self.Get())
1362 def __len__(self): return len(self.Get())
1363 def __getitem__(self, index): return self.Get()[index]
1364 def __setitem__(self, index, val):
1365 if index == 0: self.x = val
1366 elif index == 1: self.y = val
1367 elif index == 2: self.width = val
1368 elif index == 3: self.height = val
1369 else: raise IndexError
1370 def __nonzero__(self): return self.Get() != (0,0,0,0)
1371 __safe_for_unpickling__ = True
1372 def __reduce__(self): return (wx.Rect, self.Get())
1373
1374
1375 class RectPtr(Rect):
1376 def __init__(self, this):
1377 self.this = this
1378 if not hasattr(self,"thisown"): self.thisown = 0
1379 self.__class__ = Rect
1380 _core_.Rect_swigregister(RectPtr)
1381
1382 def RectPP(*args, **kwargs):
1383 """
1384 RectPP(Point topLeft, Point bottomRight) -> Rect
1385
1386 Create a new Rect object from Points representing two corners.
1387 """
1388 val = _core_.new_RectPP(*args, **kwargs)
1389 val.thisown = 1
1390 return val
1391
1392 def RectPS(*args, **kwargs):
1393 """
1394 RectPS(Point pos, Size size) -> Rect
1395
1396 Create a new Rect from a position and size.
1397 """
1398 val = _core_.new_RectPS(*args, **kwargs)
1399 val.thisown = 1
1400 return val
1401
1402 def RectS(*args, **kwargs):
1403 """
1404 RectS(Size size) -> Rect
1405
1406 Create a new Rect from a size only.
1407 """
1408 val = _core_.new_RectS(*args, **kwargs)
1409 val.thisown = 1
1410 return val
1411
1412
1413 def IntersectRect(*args, **kwargs):
1414 """
1415 IntersectRect(Rect r1, Rect r2) -> Rect
1416
1417 Calculate and return the intersection of r1 and r2.
1418 """
1419 return _core_.IntersectRect(*args, **kwargs)
1420 #---------------------------------------------------------------------------
1421
1422 class Point2D(object):
1423 """
1424 wx.Point2Ds represent a point or a vector in a 2d coordinate system
1425 with floating point values.
1426 """
1427 def __repr__(self):
1428 return "<%s.%s; proxy of C++ wxPoint2D instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
1429 def __init__(self, *args, **kwargs):
1430 """
1431 __init__(self, double x=0.0, double y=0.0) -> Point2D
1432
1433 Create a w.Point2D object.
1434 """
1435 newobj = _core_.new_Point2D(*args, **kwargs)
1436 self.this = newobj.this
1437 self.thisown = 1
1438 del newobj.thisown
1439 def GetFloor(*args, **kwargs):
1440 """
1441 GetFloor() -> (x,y)
1442
1443 Convert to integer
1444 """
1445 return _core_.Point2D_GetFloor(*args, **kwargs)
1446
1447 def GetRounded(*args, **kwargs):
1448 """
1449 GetRounded() -> (x,y)
1450
1451 Convert to integer
1452 """
1453 return _core_.Point2D_GetRounded(*args, **kwargs)
1454
1455 def GetVectorLength(*args, **kwargs):
1456 """GetVectorLength(self) -> double"""
1457 return _core_.Point2D_GetVectorLength(*args, **kwargs)
1458
1459 def GetVectorAngle(*args, **kwargs):
1460 """GetVectorAngle(self) -> double"""
1461 return _core_.Point2D_GetVectorAngle(*args, **kwargs)
1462
1463 def SetVectorLength(*args, **kwargs):
1464 """SetVectorLength(self, double length)"""
1465 return _core_.Point2D_SetVectorLength(*args, **kwargs)
1466
1467 def SetVectorAngle(*args, **kwargs):
1468 """SetVectorAngle(self, double degrees)"""
1469 return _core_.Point2D_SetVectorAngle(*args, **kwargs)
1470
1471 def SetPolarCoordinates(self, angle, length):
1472 self.SetVectorLength(length)
1473 self.SetVectorAngle(angle)
1474 def Normalize(self):
1475 self.SetVectorLength(1.0)
1476
1477 def GetDistance(*args, **kwargs):
1478 """GetDistance(self, Point2D pt) -> double"""
1479 return _core_.Point2D_GetDistance(*args, **kwargs)
1480
1481 def GetDistanceSquare(*args, **kwargs):
1482 """GetDistanceSquare(self, Point2D pt) -> double"""
1483 return _core_.Point2D_GetDistanceSquare(*args, **kwargs)
1484
1485 def GetDotProduct(*args, **kwargs):
1486 """GetDotProduct(self, Point2D vec) -> double"""
1487 return _core_.Point2D_GetDotProduct(*args, **kwargs)
1488
1489 def GetCrossProduct(*args, **kwargs):
1490 """GetCrossProduct(self, Point2D vec) -> double"""
1491 return _core_.Point2D_GetCrossProduct(*args, **kwargs)
1492
1493 def __neg__(*args, **kwargs):
1494 """
1495 __neg__(self) -> Point2D
1496
1497 the reflection of this point
1498 """
1499 return _core_.Point2D___neg__(*args, **kwargs)
1500
1501 def __iadd__(*args, **kwargs):
1502 """__iadd__(self, Point2D pt) -> Point2D"""
1503 return _core_.Point2D___iadd__(*args, **kwargs)
1504
1505 def __isub__(*args, **kwargs):
1506 """__isub__(self, Point2D pt) -> Point2D"""
1507 return _core_.Point2D___isub__(*args, **kwargs)
1508
1509 def __imul__(*args, **kwargs):
1510 """__imul__(self, Point2D pt) -> Point2D"""
1511 return _core_.Point2D___imul__(*args, **kwargs)
1512
1513 def __idiv__(*args, **kwargs):
1514 """__idiv__(self, Point2D pt) -> Point2D"""
1515 return _core_.Point2D___idiv__(*args, **kwargs)
1516
1517 def __eq__(*args, **kwargs):
1518 """
1519 __eq__(self, Point2D pt) -> bool
1520
1521 Test for equality
1522 """
1523 return _core_.Point2D___eq__(*args, **kwargs)
1524
1525 def __ne__(*args, **kwargs):
1526 """
1527 __ne__(self, Point2D pt) -> bool
1528
1529 Test for inequality
1530 """
1531 return _core_.Point2D___ne__(*args, **kwargs)
1532
1533 x = property(_core_.Point2D_x_get, _core_.Point2D_x_set)
1534 y = property(_core_.Point2D_y_get, _core_.Point2D_y_set)
1535 def Set(*args, **kwargs):
1536 """Set(self, double x=0, double y=0)"""
1537 return _core_.Point2D_Set(*args, **kwargs)
1538
1539 def Get(*args, **kwargs):
1540 """
1541 Get() -> (x,y)
1542
1543 Return x and y properties as a tuple.
1544 """
1545 return _core_.Point2D_Get(*args, **kwargs)
1546
1547 asTuple = wx._deprecated(Get, "asTuple is deprecated, use `Get` instead")
1548 def __str__(self): return str(self.Get())
1549 def __repr__(self): return 'wx.Point2D'+str(self.Get())
1550 def __len__(self): return len(self.Get())
1551 def __getitem__(self, index): return self.Get()[index]
1552 def __setitem__(self, index, val):
1553 if index == 0: self.x = val
1554 elif index == 1: self.y = val
1555 else: raise IndexError
1556 def __nonzero__(self): return self.Get() != (0.0, 0.0)
1557 __safe_for_unpickling__ = True
1558 def __reduce__(self): return (wx.Point2D, self.Get())
1559
1560
1561 class Point2DPtr(Point2D):
1562 def __init__(self, this):
1563 self.this = this
1564 if not hasattr(self,"thisown"): self.thisown = 0
1565 self.__class__ = Point2D
1566 _core_.Point2D_swigregister(Point2DPtr)
1567
1568 def Point2DCopy(*args, **kwargs):
1569 """
1570 Point2DCopy(Point2D pt) -> Point2D
1571
1572 Create a w.Point2D object.
1573 """
1574 val = _core_.new_Point2DCopy(*args, **kwargs)
1575 val.thisown = 1
1576 return val
1577
1578 def Point2DFromPoint(*args, **kwargs):
1579 """
1580 Point2DFromPoint(Point pt) -> Point2D
1581
1582 Create a w.Point2D object.
1583 """
1584 val = _core_.new_Point2DFromPoint(*args, **kwargs)
1585 val.thisown = 1
1586 return val
1587
1588 #---------------------------------------------------------------------------
1589
1590 FromStart = _core_.FromStart
1591 FromCurrent = _core_.FromCurrent
1592 FromEnd = _core_.FromEnd
1593 class InputStream(object):
1594 """Proxy of C++ InputStream class"""
1595 def __repr__(self):
1596 return "<%s.%s; proxy of C++ wxPyInputStream instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
1597 def __init__(self, *args, **kwargs):
1598 """__init__(self, PyObject p) -> InputStream"""
1599 newobj = _core_.new_InputStream(*args, **kwargs)
1600 self.this = newobj.this
1601 self.thisown = 1
1602 del newobj.thisown
1603 def __del__(self, destroy=_core_.delete_InputStream):
1604 """__del__(self)"""
1605 try:
1606 if self.thisown: destroy(self)
1607 except: pass
1608
1609 def close(*args, **kwargs):
1610 """close(self)"""
1611 return _core_.InputStream_close(*args, **kwargs)
1612
1613 def flush(*args, **kwargs):
1614 """flush(self)"""
1615 return _core_.InputStream_flush(*args, **kwargs)
1616
1617 def eof(*args, **kwargs):
1618 """eof(self) -> bool"""
1619 return _core_.InputStream_eof(*args, **kwargs)
1620
1621 def read(*args, **kwargs):
1622 """read(self, int size=-1) -> PyObject"""
1623 return _core_.InputStream_read(*args, **kwargs)
1624
1625 def readline(*args, **kwargs):
1626 """readline(self, int size=-1) -> PyObject"""
1627 return _core_.InputStream_readline(*args, **kwargs)
1628
1629 def readlines(*args, **kwargs):
1630 """readlines(self, int sizehint=-1) -> PyObject"""
1631 return _core_.InputStream_readlines(*args, **kwargs)
1632
1633 def seek(*args, **kwargs):
1634 """seek(self, int offset, int whence=0)"""
1635 return _core_.InputStream_seek(*args, **kwargs)
1636
1637 def tell(*args, **kwargs):
1638 """tell(self) -> int"""
1639 return _core_.InputStream_tell(*args, **kwargs)
1640
1641 def Peek(*args, **kwargs):
1642 """Peek(self) -> char"""
1643 return _core_.InputStream_Peek(*args, **kwargs)
1644
1645 def GetC(*args, **kwargs):
1646 """GetC(self) -> char"""
1647 return _core_.InputStream_GetC(*args, **kwargs)
1648
1649 def LastRead(*args, **kwargs):
1650 """LastRead(self) -> size_t"""
1651 return _core_.InputStream_LastRead(*args, **kwargs)
1652
1653 def CanRead(*args, **kwargs):
1654 """CanRead(self) -> bool"""
1655 return _core_.InputStream_CanRead(*args, **kwargs)
1656
1657 def Eof(*args, **kwargs):
1658 """Eof(self) -> bool"""
1659 return _core_.InputStream_Eof(*args, **kwargs)
1660
1661 def Ungetch(*args, **kwargs):
1662 """Ungetch(self, char c) -> bool"""
1663 return _core_.InputStream_Ungetch(*args, **kwargs)
1664
1665 def SeekI(*args, **kwargs):
1666 """SeekI(self, long pos, int mode=FromStart) -> long"""
1667 return _core_.InputStream_SeekI(*args, **kwargs)
1668
1669 def TellI(*args, **kwargs):
1670 """TellI(self) -> long"""
1671 return _core_.InputStream_TellI(*args, **kwargs)
1672
1673
1674 class InputStreamPtr(InputStream):
1675 def __init__(self, this):
1676 self.this = this
1677 if not hasattr(self,"thisown"): self.thisown = 0
1678 self.__class__ = InputStream
1679 _core_.InputStream_swigregister(InputStreamPtr)
1680 DefaultPosition = cvar.DefaultPosition
1681 DefaultSize = cvar.DefaultSize
1682
1683 class OutputStream(object):
1684 """Proxy of C++ OutputStream class"""
1685 def __init__(self): raise RuntimeError, "No constructor defined"
1686 def __repr__(self):
1687 return "<%s.%s; proxy of C++ wxOutputStream instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
1688 def write(*args, **kwargs):
1689 """write(self, PyObject obj)"""
1690 return _core_.OutputStream_write(*args, **kwargs)
1691
1692
1693 class OutputStreamPtr(OutputStream):
1694 def __init__(self, this):
1695 self.this = this
1696 if not hasattr(self,"thisown"): self.thisown = 0
1697 self.__class__ = OutputStream
1698 _core_.OutputStream_swigregister(OutputStreamPtr)
1699
1700 #---------------------------------------------------------------------------
1701
1702 class FSFile(Object):
1703 """Proxy of C++ FSFile class"""
1704 def __repr__(self):
1705 return "<%s.%s; proxy of C++ wxFSFile instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
1706 def __init__(self, *args, **kwargs):
1707 """
1708 __init__(self, InputStream stream, String loc, String mimetype, String anchor,
1709 DateTime modif) -> FSFile
1710 """
1711 newobj = _core_.new_FSFile(*args, **kwargs)
1712 self.this = newobj.this
1713 self.thisown = 1
1714 del newobj.thisown
1715 self.thisown = 0 # It will normally be deleted by the user of the wx.FileSystem
1716
1717 def __del__(self, destroy=_core_.delete_FSFile):
1718 """__del__(self)"""
1719 try:
1720 if self.thisown: destroy(self)
1721 except: pass
1722
1723 def GetStream(*args, **kwargs):
1724 """GetStream(self) -> InputStream"""
1725 return _core_.FSFile_GetStream(*args, **kwargs)
1726
1727 def GetMimeType(*args, **kwargs):
1728 """GetMimeType(self) -> String"""
1729 return _core_.FSFile_GetMimeType(*args, **kwargs)
1730
1731 def GetLocation(*args, **kwargs):
1732 """GetLocation(self) -> String"""
1733 return _core_.FSFile_GetLocation(*args, **kwargs)
1734
1735 def GetAnchor(*args, **kwargs):
1736 """GetAnchor(self) -> String"""
1737 return _core_.FSFile_GetAnchor(*args, **kwargs)
1738
1739 def GetModificationTime(*args, **kwargs):
1740 """GetModificationTime(self) -> DateTime"""
1741 return _core_.FSFile_GetModificationTime(*args, **kwargs)
1742
1743
1744 class FSFilePtr(FSFile):
1745 def __init__(self, this):
1746 self.this = this
1747 if not hasattr(self,"thisown"): self.thisown = 0
1748 self.__class__ = FSFile
1749 _core_.FSFile_swigregister(FSFilePtr)
1750
1751 class CPPFileSystemHandler(object):
1752 """Proxy of C++ CPPFileSystemHandler class"""
1753 def __init__(self): raise RuntimeError, "No constructor defined"
1754 def __repr__(self):
1755 return "<%s.%s; proxy of C++ wxFileSystemHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
1756
1757 class CPPFileSystemHandlerPtr(CPPFileSystemHandler):
1758 def __init__(self, this):
1759 self.this = this
1760 if not hasattr(self,"thisown"): self.thisown = 0
1761 self.__class__ = CPPFileSystemHandler
1762 _core_.CPPFileSystemHandler_swigregister(CPPFileSystemHandlerPtr)
1763
1764 class FileSystemHandler(CPPFileSystemHandler):
1765 """Proxy of C++ FileSystemHandler class"""
1766 def __repr__(self):
1767 return "<%s.%s; proxy of C++ wxPyFileSystemHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
1768 def __init__(self, *args, **kwargs):
1769 """__init__(self) -> FileSystemHandler"""
1770 newobj = _core_.new_FileSystemHandler(*args, **kwargs)
1771 self.this = newobj.this
1772 self.thisown = 1
1773 del newobj.thisown
1774 self._setCallbackInfo(self, FileSystemHandler)
1775
1776 def _setCallbackInfo(*args, **kwargs):
1777 """_setCallbackInfo(self, PyObject self, PyObject _class)"""
1778 return _core_.FileSystemHandler__setCallbackInfo(*args, **kwargs)
1779
1780 def CanOpen(*args, **kwargs):
1781 """CanOpen(self, String location) -> bool"""
1782 return _core_.FileSystemHandler_CanOpen(*args, **kwargs)
1783
1784 def OpenFile(*args, **kwargs):
1785 """OpenFile(self, FileSystem fs, String location) -> FSFile"""
1786 return _core_.FileSystemHandler_OpenFile(*args, **kwargs)
1787
1788 def FindFirst(*args, **kwargs):
1789 """FindFirst(self, String spec, int flags=0) -> String"""
1790 return _core_.FileSystemHandler_FindFirst(*args, **kwargs)
1791
1792 def FindNext(*args, **kwargs):
1793 """FindNext(self) -> String"""
1794 return _core_.FileSystemHandler_FindNext(*args, **kwargs)
1795
1796 def GetProtocol(*args, **kwargs):
1797 """GetProtocol(self, String location) -> String"""
1798 return _core_.FileSystemHandler_GetProtocol(*args, **kwargs)
1799
1800 def GetLeftLocation(*args, **kwargs):
1801 """GetLeftLocation(self, String location) -> String"""
1802 return _core_.FileSystemHandler_GetLeftLocation(*args, **kwargs)
1803
1804 def GetAnchor(*args, **kwargs):
1805 """GetAnchor(self, String location) -> String"""
1806 return _core_.FileSystemHandler_GetAnchor(*args, **kwargs)
1807
1808 def GetRightLocation(*args, **kwargs):
1809 """GetRightLocation(self, String location) -> String"""
1810 return _core_.FileSystemHandler_GetRightLocation(*args, **kwargs)
1811
1812 def GetMimeTypeFromExt(*args, **kwargs):
1813 """GetMimeTypeFromExt(self, String location) -> String"""
1814 return _core_.FileSystemHandler_GetMimeTypeFromExt(*args, **kwargs)
1815
1816
1817 class FileSystemHandlerPtr(FileSystemHandler):
1818 def __init__(self, this):
1819 self.this = this
1820 if not hasattr(self,"thisown"): self.thisown = 0
1821 self.__class__ = FileSystemHandler
1822 _core_.FileSystemHandler_swigregister(FileSystemHandlerPtr)
1823
1824 class FileSystem(Object):
1825 """Proxy of C++ FileSystem class"""
1826 def __repr__(self):
1827 return "<%s.%s; proxy of C++ wxFileSystem instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
1828 def __init__(self, *args, **kwargs):
1829 """__init__(self) -> FileSystem"""
1830 newobj = _core_.new_FileSystem(*args, **kwargs)
1831 self.this = newobj.this
1832 self.thisown = 1
1833 del newobj.thisown
1834 def __del__(self, destroy=_core_.delete_FileSystem):
1835 """__del__(self)"""
1836 try:
1837 if self.thisown: destroy(self)
1838 except: pass
1839
1840 def ChangePathTo(*args, **kwargs):
1841 """ChangePathTo(self, String location, bool is_dir=False)"""
1842 return _core_.FileSystem_ChangePathTo(*args, **kwargs)
1843
1844 def GetPath(*args, **kwargs):
1845 """GetPath(self) -> String"""
1846 return _core_.FileSystem_GetPath(*args, **kwargs)
1847
1848 def OpenFile(*args, **kwargs):
1849 """OpenFile(self, String location) -> FSFile"""
1850 return _core_.FileSystem_OpenFile(*args, **kwargs)
1851
1852 def FindFirst(*args, **kwargs):
1853 """FindFirst(self, String spec, int flags=0) -> String"""
1854 return _core_.FileSystem_FindFirst(*args, **kwargs)
1855
1856 def FindNext(*args, **kwargs):
1857 """FindNext(self) -> String"""
1858 return _core_.FileSystem_FindNext(*args, **kwargs)
1859
1860 def AddHandler(*args, **kwargs):
1861 """AddHandler(CPPFileSystemHandler handler)"""
1862 return _core_.FileSystem_AddHandler(*args, **kwargs)
1863
1864 AddHandler = staticmethod(AddHandler)
1865 def CleanUpHandlers(*args, **kwargs):
1866 """CleanUpHandlers()"""
1867 return _core_.FileSystem_CleanUpHandlers(*args, **kwargs)
1868
1869 CleanUpHandlers = staticmethod(CleanUpHandlers)
1870 def FileNameToURL(*args, **kwargs):
1871 """FileNameToURL(String filename) -> String"""
1872 return _core_.FileSystem_FileNameToURL(*args, **kwargs)
1873
1874 FileNameToURL = staticmethod(FileNameToURL)
1875 def URLToFileName(*args, **kwargs):
1876 """URLToFileName(String url) -> String"""
1877 return _core_.FileSystem_URLToFileName(*args, **kwargs)
1878
1879 URLToFileName = staticmethod(URLToFileName)
1880
1881 class FileSystemPtr(FileSystem):
1882 def __init__(self, this):
1883 self.this = this
1884 if not hasattr(self,"thisown"): self.thisown = 0
1885 self.__class__ = FileSystem
1886 _core_.FileSystem_swigregister(FileSystemPtr)
1887
1888 def FileSystem_AddHandler(*args, **kwargs):
1889 """FileSystem_AddHandler(CPPFileSystemHandler handler)"""
1890 return _core_.FileSystem_AddHandler(*args, **kwargs)
1891
1892 def FileSystem_CleanUpHandlers(*args, **kwargs):
1893 """FileSystem_CleanUpHandlers()"""
1894 return _core_.FileSystem_CleanUpHandlers(*args, **kwargs)
1895
1896 def FileSystem_FileNameToURL(*args, **kwargs):
1897 """FileSystem_FileNameToURL(String filename) -> String"""
1898 return _core_.FileSystem_FileNameToURL(*args, **kwargs)
1899
1900 def FileSystem_URLToFileName(*args, **kwargs):
1901 """FileSystem_URLToFileName(String url) -> String"""
1902 return _core_.FileSystem_URLToFileName(*args, **kwargs)
1903
1904 class InternetFSHandler(CPPFileSystemHandler):
1905 """Proxy of C++ InternetFSHandler class"""
1906 def __repr__(self):
1907 return "<%s.%s; proxy of C++ wxInternetFSHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
1908 def __init__(self, *args, **kwargs):
1909 """__init__(self) -> InternetFSHandler"""
1910 newobj = _core_.new_InternetFSHandler(*args, **kwargs)
1911 self.this = newobj.this
1912 self.thisown = 1
1913 del newobj.thisown
1914 def CanOpen(*args, **kwargs):
1915 """CanOpen(self, String location) -> bool"""
1916 return _core_.InternetFSHandler_CanOpen(*args, **kwargs)
1917
1918 def OpenFile(*args, **kwargs):
1919 """OpenFile(self, FileSystem fs, String location) -> FSFile"""
1920 return _core_.InternetFSHandler_OpenFile(*args, **kwargs)
1921
1922
1923 class InternetFSHandlerPtr(InternetFSHandler):
1924 def __init__(self, this):
1925 self.this = this
1926 if not hasattr(self,"thisown"): self.thisown = 0
1927 self.__class__ = InternetFSHandler
1928 _core_.InternetFSHandler_swigregister(InternetFSHandlerPtr)
1929
1930 class ZipFSHandler(CPPFileSystemHandler):
1931 """Proxy of C++ ZipFSHandler class"""
1932 def __repr__(self):
1933 return "<%s.%s; proxy of C++ wxZipFSHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
1934 def __init__(self, *args, **kwargs):
1935 """__init__(self) -> ZipFSHandler"""
1936 newobj = _core_.new_ZipFSHandler(*args, **kwargs)
1937 self.this = newobj.this
1938 self.thisown = 1
1939 del newobj.thisown
1940 def CanOpen(*args, **kwargs):
1941 """CanOpen(self, String location) -> bool"""
1942 return _core_.ZipFSHandler_CanOpen(*args, **kwargs)
1943
1944 def OpenFile(*args, **kwargs):
1945 """OpenFile(self, FileSystem fs, String location) -> FSFile"""
1946 return _core_.ZipFSHandler_OpenFile(*args, **kwargs)
1947
1948 def FindFirst(*args, **kwargs):
1949 """FindFirst(self, String spec, int flags=0) -> String"""
1950 return _core_.ZipFSHandler_FindFirst(*args, **kwargs)
1951
1952 def FindNext(*args, **kwargs):
1953 """FindNext(self) -> String"""
1954 return _core_.ZipFSHandler_FindNext(*args, **kwargs)
1955
1956
1957 class ZipFSHandlerPtr(ZipFSHandler):
1958 def __init__(self, this):
1959 self.this = this
1960 if not hasattr(self,"thisown"): self.thisown = 0
1961 self.__class__ = ZipFSHandler
1962 _core_.ZipFSHandler_swigregister(ZipFSHandlerPtr)
1963
1964
1965 def __wxMemoryFSHandler_AddFile_wxImage(*args, **kwargs):
1966 """__wxMemoryFSHandler_AddFile_wxImage(String filename, Image image, long type)"""
1967 return _core_.__wxMemoryFSHandler_AddFile_wxImage(*args, **kwargs)
1968
1969 def __wxMemoryFSHandler_AddFile_wxBitmap(*args, **kwargs):
1970 """__wxMemoryFSHandler_AddFile_wxBitmap(String filename, Bitmap bitmap, long type)"""
1971 return _core_.__wxMemoryFSHandler_AddFile_wxBitmap(*args, **kwargs)
1972
1973 def __wxMemoryFSHandler_AddFile_Data(*args, **kwargs):
1974 """__wxMemoryFSHandler_AddFile_Data(String filename, PyObject data)"""
1975 return _core_.__wxMemoryFSHandler_AddFile_Data(*args, **kwargs)
1976 def MemoryFSHandler_AddFile(filename, dataItem, imgType=-1):
1977 """
1978 Add 'file' to the memory filesystem. The dataItem parameter can
1979 either be a `wx.Bitmap`, `wx.Image` or a string that can contain
1980 arbitrary data. If a bitmap or image is used then the imgType
1981 parameter should specify what kind of image file it should be
1982 written as, wx.BITMAP_TYPE_PNG, etc.
1983 """
1984 if isinstance(dataItem, wx.Image):
1985 __wxMemoryFSHandler_AddFile_wxImage(filename, dataItem, imgType)
1986 elif isinstance(dataItem, wx.Bitmap):
1987 __wxMemoryFSHandler_AddFile_wxBitmap(filename, dataItem, imgType)
1988 elif type(dataItem) == str:
1989 __wxMemoryFSHandler_AddFile_Data(filename, dataItem)
1990 else:
1991 raise TypeError, 'wx.Image, wx.Bitmap or string expected'
1992
1993 class MemoryFSHandler(CPPFileSystemHandler):
1994 """Proxy of C++ MemoryFSHandler class"""
1995 def __repr__(self):
1996 return "<%s.%s; proxy of C++ wxMemoryFSHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
1997 def __init__(self, *args, **kwargs):
1998 """__init__(self) -> MemoryFSHandler"""
1999 newobj = _core_.new_MemoryFSHandler(*args, **kwargs)
2000 self.this = newobj.this
2001 self.thisown = 1
2002 del newobj.thisown
2003 def RemoveFile(*args, **kwargs):
2004 """RemoveFile(String filename)"""
2005 return _core_.MemoryFSHandler_RemoveFile(*args, **kwargs)
2006
2007 RemoveFile = staticmethod(RemoveFile)
2008 AddFile = staticmethod(MemoryFSHandler_AddFile)
2009 def CanOpen(*args, **kwargs):
2010 """CanOpen(self, String location) -> bool"""
2011 return _core_.MemoryFSHandler_CanOpen(*args, **kwargs)
2012
2013 def OpenFile(*args, **kwargs):
2014 """OpenFile(self, FileSystem fs, String location) -> FSFile"""
2015 return _core_.MemoryFSHandler_OpenFile(*args, **kwargs)
2016
2017 def FindFirst(*args, **kwargs):
2018 """FindFirst(self, String spec, int flags=0) -> String"""
2019 return _core_.MemoryFSHandler_FindFirst(*args, **kwargs)
2020
2021 def FindNext(*args, **kwargs):
2022 """FindNext(self) -> String"""
2023 return _core_.MemoryFSHandler_FindNext(*args, **kwargs)
2024
2025
2026 class MemoryFSHandlerPtr(MemoryFSHandler):
2027 def __init__(self, this):
2028 self.this = this
2029 if not hasattr(self,"thisown"): self.thisown = 0
2030 self.__class__ = MemoryFSHandler
2031 _core_.MemoryFSHandler_swigregister(MemoryFSHandlerPtr)
2032
2033 def MemoryFSHandler_RemoveFile(*args, **kwargs):
2034 """MemoryFSHandler_RemoveFile(String filename)"""
2035 return _core_.MemoryFSHandler_RemoveFile(*args, **kwargs)
2036
2037 IMAGE_ALPHA_TRANSPARENT = _core_.IMAGE_ALPHA_TRANSPARENT
2038 IMAGE_ALPHA_THRESHOLD = _core_.IMAGE_ALPHA_THRESHOLD
2039 IMAGE_ALPHA_OPAQUE = _core_.IMAGE_ALPHA_OPAQUE
2040 #---------------------------------------------------------------------------
2041
2042 class ImageHandler(Object):
2043 """Proxy of C++ ImageHandler class"""
2044 def __init__(self): raise RuntimeError, "No constructor defined"
2045 def __repr__(self):
2046 return "<%s.%s; proxy of C++ wxImageHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
2047 def GetName(*args, **kwargs):
2048 """GetName(self) -> String"""
2049 return _core_.ImageHandler_GetName(*args, **kwargs)
2050
2051 def GetExtension(*args, **kwargs):
2052 """GetExtension(self) -> String"""
2053 return _core_.ImageHandler_GetExtension(*args, **kwargs)
2054
2055 def GetType(*args, **kwargs):
2056 """GetType(self) -> long"""
2057 return _core_.ImageHandler_GetType(*args, **kwargs)
2058
2059 def GetMimeType(*args, **kwargs):
2060 """GetMimeType(self) -> String"""
2061 return _core_.ImageHandler_GetMimeType(*args, **kwargs)
2062
2063 def CanRead(*args, **kwargs):
2064 """CanRead(self, String name) -> bool"""
2065 return _core_.ImageHandler_CanRead(*args, **kwargs)
2066
2067 def SetName(*args, **kwargs):
2068 """SetName(self, String name)"""
2069 return _core_.ImageHandler_SetName(*args, **kwargs)
2070
2071 def SetExtension(*args, **kwargs):
2072 """SetExtension(self, String extension)"""
2073 return _core_.ImageHandler_SetExtension(*args, **kwargs)
2074
2075 def SetType(*args, **kwargs):
2076 """SetType(self, long type)"""
2077 return _core_.ImageHandler_SetType(*args, **kwargs)
2078
2079 def SetMimeType(*args, **kwargs):
2080 """SetMimeType(self, String mimetype)"""
2081 return _core_.ImageHandler_SetMimeType(*args, **kwargs)
2082
2083
2084 class ImageHandlerPtr(ImageHandler):
2085 def __init__(self, this):
2086 self.this = this
2087 if not hasattr(self,"thisown"): self.thisown = 0
2088 self.__class__ = ImageHandler
2089 _core_.ImageHandler_swigregister(ImageHandlerPtr)
2090
2091 class ImageHistogram(object):
2092 """Proxy of C++ ImageHistogram class"""
2093 def __repr__(self):
2094 return "<%s.%s; proxy of C++ wxImageHistogram instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
2095 def __init__(self, *args, **kwargs):
2096 """__init__(self) -> ImageHistogram"""
2097 newobj = _core_.new_ImageHistogram(*args, **kwargs)
2098 self.this = newobj.this
2099 self.thisown = 1
2100 del newobj.thisown
2101 def MakeKey(*args, **kwargs):
2102 """
2103 MakeKey(unsigned char r, unsigned char g, unsigned char b) -> unsigned long
2104
2105 Get the key in the histogram for the given RGB values
2106 """
2107 return _core_.ImageHistogram_MakeKey(*args, **kwargs)
2108
2109 MakeKey = staticmethod(MakeKey)
2110 def FindFirstUnusedColour(*args, **kwargs):
2111 """
2112 FindFirstUnusedColour(int startR=1, int startG=0, int startB=0) -> (success, r, g, b)
2113
2114 Find first colour that is not used in the image and has higher RGB
2115 values than startR, startG, startB. Returns a tuple consisting of a
2116 success flag and rgb values.
2117 """
2118 return _core_.ImageHistogram_FindFirstUnusedColour(*args, **kwargs)
2119
2120 def GetCount(*args, **kwargs):
2121 """
2122 GetCount(self, unsigned long key) -> unsigned long
2123
2124 Returns the pixel count for the given key. Use `MakeKey` to create a
2125 key value from a RGB tripple.
2126 """
2127 return _core_.ImageHistogram_GetCount(*args, **kwargs)
2128
2129 def GetCountRGB(*args, **kwargs):
2130 """
2131 GetCountRGB(self, unsigned char r, unsigned char g, unsigned char b) -> unsigned long
2132
2133 Returns the pixel count for the given RGB values.
2134 """
2135 return _core_.ImageHistogram_GetCountRGB(*args, **kwargs)
2136
2137 def GetCountColour(*args, **kwargs):
2138 """
2139 GetCountColour(self, Colour colour) -> unsigned long
2140
2141 Returns the pixel count for the given `wx.Colour` value.
2142 """
2143 return _core_.ImageHistogram_GetCountColour(*args, **kwargs)
2144
2145
2146 class ImageHistogramPtr(ImageHistogram):
2147 def __init__(self, this):
2148 self.this = this
2149 if not hasattr(self,"thisown"): self.thisown = 0
2150 self.__class__ = ImageHistogram
2151 _core_.ImageHistogram_swigregister(ImageHistogramPtr)
2152
2153 def ImageHistogram_MakeKey(*args, **kwargs):
2154 """
2155 ImageHistogram_MakeKey(unsigned char r, unsigned char g, unsigned char b) -> unsigned long
2156
2157 Get the key in the histogram for the given RGB values
2158 """
2159 return _core_.ImageHistogram_MakeKey(*args, **kwargs)
2160
2161 class Image(Object):
2162 """Proxy of C++ Image class"""
2163 def __repr__(self):
2164 return "<%s.%s; proxy of C++ wxImage instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
2165 def __init__(self, *args, **kwargs):
2166 """__init__(self, String name, long type=BITMAP_TYPE_ANY, int index=-1) -> Image"""
2167 newobj = _core_.new_Image(*args, **kwargs)
2168 self.this = newobj.this
2169 self.thisown = 1
2170 del newobj.thisown
2171 def __del__(self, destroy=_core_.delete_Image):
2172 """__del__(self)"""
2173 try:
2174 if self.thisown: destroy(self)
2175 except: pass
2176
2177 def Create(*args, **kwargs):
2178 """Create(self, int width, int height)"""
2179 return _core_.Image_Create(*args, **kwargs)
2180
2181 def Destroy(*args, **kwargs):
2182 """
2183 Destroy(self)
2184
2185 Deletes the C++ object this Python object is a proxy for.
2186 """
2187 return _core_.Image_Destroy(*args, **kwargs)
2188
2189 def Scale(*args, **kwargs):
2190 """Scale(self, int width, int height) -> Image"""
2191 return _core_.Image_Scale(*args, **kwargs)
2192
2193 def ShrinkBy(*args, **kwargs):
2194 """ShrinkBy(self, int xFactor, int yFactor) -> Image"""
2195 return _core_.Image_ShrinkBy(*args, **kwargs)
2196
2197 def Rescale(*args, **kwargs):
2198 """Rescale(self, int width, int height) -> Image"""
2199 return _core_.Image_Rescale(*args, **kwargs)
2200
2201 def Resize(*args, **kwargs):
2202 """Resize(self, Size size, Point pos, int r=-1, int g=-1, int b=-1) -> Image"""
2203 return _core_.Image_Resize(*args, **kwargs)
2204
2205 def SetRGB(*args, **kwargs):
2206 """SetRGB(self, int x, int y, unsigned char r, unsigned char g, unsigned char b)"""
2207 return _core_.Image_SetRGB(*args, **kwargs)
2208
2209 def SetRGBRect(*args, **kwargs):
2210 """SetRGBRect(self, Rect rect, unsigned char r, unsigned char g, unsigned char b)"""
2211 return _core_.Image_SetRGBRect(*args, **kwargs)
2212
2213 def GetRed(*args, **kwargs):
2214 """GetRed(self, int x, int y) -> unsigned char"""
2215 return _core_.Image_GetRed(*args, **kwargs)
2216
2217 def GetGreen(*args, **kwargs):
2218 """GetGreen(self, int x, int y) -> unsigned char"""
2219 return _core_.Image_GetGreen(*args, **kwargs)
2220
2221 def GetBlue(*args, **kwargs):
2222 """GetBlue(self, int x, int y) -> unsigned char"""
2223 return _core_.Image_GetBlue(*args, **kwargs)
2224
2225 def SetAlpha(*args, **kwargs):
2226 """SetAlpha(self, int x, int y, unsigned char alpha)"""
2227 return _core_.Image_SetAlpha(*args, **kwargs)
2228
2229 def GetAlpha(*args, **kwargs):
2230 """GetAlpha(self, int x, int y) -> unsigned char"""
2231 return _core_.Image_GetAlpha(*args, **kwargs)
2232
2233 def HasAlpha(*args, **kwargs):
2234 """HasAlpha(self) -> bool"""
2235 return _core_.Image_HasAlpha(*args, **kwargs)
2236
2237 def InitAlpha(*args, **kwargs):
2238 """
2239 InitAlpha(self)
2240
2241 Initializes the image alpha channel data. It is an error to call it if
2242 the image already has alpha data. If it doesn't, alpha data will be by
2243 default initialized to all pixels being fully opaque. But if the image
2244 has a a mask colour, all mask pixels will be completely transparent.
2245 """
2246 return _core_.Image_InitAlpha(*args, **kwargs)
2247
2248 def IsTransparent(*args, **kwargs):
2249 """
2250 IsTransparent(self, int x, int y, unsigned char threshold=IMAGE_ALPHA_THRESHOLD) -> bool
2251
2252 Returns True if this pixel is masked or has an alpha value less than
2253 the spcified threshold.
2254 """
2255 return _core_.Image_IsTransparent(*args, **kwargs)
2256
2257 def FindFirstUnusedColour(*args, **kwargs):
2258 """
2259 FindFirstUnusedColour(int startR=1, int startG=0, int startB=0) -> (success, r, g, b)
2260
2261 Find first colour that is not used in the image and has higher RGB
2262 values than startR, startG, startB. Returns a tuple consisting of a
2263 success flag and rgb values.
2264 """
2265 return _core_.Image_FindFirstUnusedColour(*args, **kwargs)
2266
2267 def ConvertAlphaToMask(*args, **kwargs):
2268 """
2269 ConvertAlphaToMask(self, byte threshold=IMAGE_ALPHA_THRESHOLD) -> bool
2270
2271 If the image has alpha channel, this method converts it to mask. All pixels
2272 with alpha value less than ``threshold`` are replaced with mask colour and the
2273 alpha channel is removed. Mask colour is chosen automatically using
2274 `FindFirstUnusedColour`.
2275
2276 If the image image doesn't have alpha channel, ConvertAlphaToMask does
2277 nothing.
2278 """
2279 return _core_.Image_ConvertAlphaToMask(*args, **kwargs)
2280
2281 def ConvertColourToAlpha(*args, **kwargs):
2282 """
2283 ConvertColourToAlpha(self, unsigned char r, unsigned char g, unsigned char b) -> bool
2284
2285 This method converts an image where the original alpha information is
2286 only available as a shades of a colour (actually shades of grey)
2287 typically when you draw anti-aliased text into a bitmap. The DC
2288 drawing routines draw grey values on the black background although
2289 they actually mean to draw white with differnt alpha values. This
2290 method reverses it, assuming a black (!) background and white text.
2291 The method will then fill up the whole image with the colour given.
2292 """
2293 return _core_.Image_ConvertColourToAlpha(*args, **kwargs)
2294
2295 def SetMaskFromImage(*args, **kwargs):
2296 """SetMaskFromImage(self, Image mask, byte mr, byte mg, byte mb) -> bool"""
2297 return _core_.Image_SetMaskFromImage(*args, **kwargs)
2298
2299 def CanRead(*args, **kwargs):
2300 """CanRead(String name) -> bool"""
2301 return _core_.Image_CanRead(*args, **kwargs)
2302
2303 CanRead = staticmethod(CanRead)
2304 def GetImageCount(*args, **kwargs):
2305 """GetImageCount(String name, long type=BITMAP_TYPE_ANY) -> int"""
2306 return _core_.Image_GetImageCount(*args, **kwargs)
2307
2308 GetImageCount = staticmethod(GetImageCount)
2309 def LoadFile(*args, **kwargs):
2310 """LoadFile(self, String name, long type=BITMAP_TYPE_ANY, int index=-1) -> bool"""
2311 return _core_.Image_LoadFile(*args, **kwargs)
2312
2313 def LoadMimeFile(*args, **kwargs):
2314 """LoadMimeFile(self, String name, String mimetype, int index=-1) -> bool"""
2315 return _core_.Image_LoadMimeFile(*args, **kwargs)
2316
2317 def SaveFile(*args, **kwargs):
2318 """SaveFile(self, String name, int type) -> bool"""
2319 return _core_.Image_SaveFile(*args, **kwargs)
2320
2321 def SaveMimeFile(*args, **kwargs):
2322 """SaveMimeFile(self, String name, String mimetype) -> bool"""
2323 return _core_.Image_SaveMimeFile(*args, **kwargs)
2324
2325 def CanReadStream(*args, **kwargs):
2326 """CanReadStream(InputStream stream) -> bool"""
2327 return _core_.Image_CanReadStream(*args, **kwargs)
2328
2329 CanReadStream = staticmethod(CanReadStream)
2330 def LoadStream(*args, **kwargs):
2331 """LoadStream(self, InputStream stream, long type=BITMAP_TYPE_ANY, int index=-1) -> bool"""
2332 return _core_.Image_LoadStream(*args, **kwargs)
2333
2334 def LoadMimeStream(*args, **kwargs):
2335 """LoadMimeStream(self, InputStream stream, String mimetype, int index=-1) -> bool"""
2336 return _core_.Image_LoadMimeStream(*args, **kwargs)
2337
2338 def Ok(*args, **kwargs):
2339 """Ok(self) -> bool"""
2340 return _core_.Image_Ok(*args, **kwargs)
2341
2342 def GetWidth(*args, **kwargs):
2343 """GetWidth(self) -> int"""
2344 return _core_.Image_GetWidth(*args, **kwargs)
2345
2346 def GetHeight(*args, **kwargs):
2347 """GetHeight(self) -> int"""
2348 return _core_.Image_GetHeight(*args, **kwargs)
2349
2350 def GetSize(*args, **kwargs):
2351 """GetSize(self) -> Size"""
2352 return _core_.Image_GetSize(*args, **kwargs)
2353
2354 def GetSubImage(*args, **kwargs):
2355 """GetSubImage(self, Rect rect) -> Image"""
2356 return _core_.Image_GetSubImage(*args, **kwargs)
2357
2358 def Size(*args, **kwargs):
2359 """Size(self, Size size, Point pos, int r=-1, int g=-1, int b=-1) -> Image"""
2360 return _core_.Image_Size(*args, **kwargs)
2361
2362 def Copy(*args, **kwargs):
2363 """Copy(self) -> Image"""
2364 return _core_.Image_Copy(*args, **kwargs)
2365
2366 def Paste(*args, **kwargs):
2367 """Paste(self, Image image, int x, int y)"""
2368 return _core_.Image_Paste(*args, **kwargs)
2369
2370 def GetData(*args, **kwargs):
2371 """
2372 GetData(self) -> PyObject
2373
2374 Returns a string containing a copy of the RGB bytes of the image.
2375 """
2376 return _core_.Image_GetData(*args, **kwargs)
2377
2378 def SetData(*args, **kwargs):
2379 """
2380 SetData(self, buffer data)
2381
2382 Resets the Image's RGB data from a buffer of RGB bytes. Accepts
2383 either a string or a buffer object holding the data and the length of
2384 the data must be width*height*3.
2385 """
2386 return _core_.Image_SetData(*args, **kwargs)
2387
2388 def GetDataBuffer(*args, **kwargs):
2389 """
2390 GetDataBuffer(self) -> PyObject
2391
2392 Returns a writable Python buffer object that is pointing at the RGB
2393 image data buffer inside the wx.Image.
2394 """
2395 return _core_.Image_GetDataBuffer(*args, **kwargs)
2396
2397 def SetDataBuffer(*args, **kwargs):
2398 """
2399 SetDataBuffer(self, buffer data)
2400
2401 Sets the internal image data pointer to point at a Python buffer
2402 object. This can save a copy of the data but you must ensure that the
2403 buffer object lives longer than the wx.Image does.
2404 """
2405 return _core_.Image_SetDataBuffer(*args, **kwargs)
2406
2407 def GetAlphaData(*args, **kwargs):
2408 """
2409 GetAlphaData(self) -> PyObject
2410
2411 Returns a string containing a copy of the alpha bytes of the image.
2412 """
2413 return _core_.Image_GetAlphaData(*args, **kwargs)
2414
2415 def SetAlphaData(*args, **kwargs):
2416 """
2417 SetAlphaData(self, buffer alpha)
2418
2419 Resets the Image's alpha data from a buffer of bytes. Accepts either
2420 a string or a buffer object holding the data and the length of the
2421 data must be width*height.
2422 """
2423 return _core_.Image_SetAlphaData(*args, **kwargs)
2424
2425 def GetAlphaBuffer(*args, **kwargs):
2426 """GetAlphaBuffer(self) -> PyObject"""
2427 return _core_.Image_GetAlphaBuffer(*args, **kwargs)
2428
2429 def SetAlphaBuffer(*args, **kwargs):
2430 """SetAlphaBuffer(self, buffer alpha)"""
2431 return _core_.Image_SetAlphaBuffer(*args, **kwargs)
2432
2433 def SetMaskColour(*args, **kwargs):
2434 """SetMaskColour(self, unsigned char r, unsigned char g, unsigned char b)"""
2435 return _core_.Image_SetMaskColour(*args, **kwargs)
2436
2437 def GetOrFindMaskColour(*args, **kwargs):
2438 """
2439 GetOrFindMaskColour() -> (r,g,b)
2440
2441 Get the current mask colour or find a suitable colour.
2442 """
2443 return _core_.Image_GetOrFindMaskColour(*args, **kwargs)
2444
2445 def GetMaskRed(*args, **kwargs):
2446 """GetMaskRed(self) -> unsigned char"""
2447 return _core_.Image_GetMaskRed(*args, **kwargs)
2448
2449 def GetMaskGreen(*args, **kwargs):
2450 """GetMaskGreen(self) -> unsigned char"""
2451 return _core_.Image_GetMaskGreen(*args, **kwargs)
2452
2453 def GetMaskBlue(*args, **kwargs):
2454 """GetMaskBlue(self) -> unsigned char"""
2455 return _core_.Image_GetMaskBlue(*args, **kwargs)
2456
2457 def SetMask(*args, **kwargs):
2458 """SetMask(self, bool mask=True)"""
2459 return _core_.Image_SetMask(*args, **kwargs)
2460
2461 def HasMask(*args, **kwargs):
2462 """HasMask(self) -> bool"""
2463 return _core_.Image_HasMask(*args, **kwargs)
2464
2465 def Rotate(*args, **kwargs):
2466 """
2467 Rotate(self, double angle, Point centre_of_rotation, bool interpolating=True,
2468 Point offset_after_rotation=None) -> Image
2469 """
2470 return _core_.Image_Rotate(*args, **kwargs)
2471
2472 def Rotate90(*args, **kwargs):
2473 """Rotate90(self, bool clockwise=True) -> Image"""
2474 return _core_.Image_Rotate90(*args, **kwargs)
2475
2476 def Mirror(*args, **kwargs):
2477 """Mirror(self, bool horizontally=True) -> Image"""
2478 return _core_.Image_Mirror(*args, **kwargs)
2479
2480 def Replace(*args, **kwargs):
2481 """
2482 Replace(self, unsigned char r1, unsigned char g1, unsigned char b1,
2483 unsigned char r2, unsigned char g2, unsigned char b2)
2484 """
2485 return _core_.Image_Replace(*args, **kwargs)
2486
2487 def ConvertToMono(*args, **kwargs):
2488 """ConvertToMono(self, unsigned char r, unsigned char g, unsigned char b) -> Image"""
2489 return _core_.Image_ConvertToMono(*args, **kwargs)
2490
2491 def SetOption(*args, **kwargs):
2492 """SetOption(self, String name, String value)"""
2493 return _core_.Image_SetOption(*args, **kwargs)
2494
2495 def SetOptionInt(*args, **kwargs):
2496 """SetOptionInt(self, String name, int value)"""
2497 return _core_.Image_SetOptionInt(*args, **kwargs)
2498
2499 def GetOption(*args, **kwargs):
2500 """GetOption(self, String name) -> String"""
2501 return _core_.Image_GetOption(*args, **kwargs)
2502
2503 def GetOptionInt(*args, **kwargs):
2504 """GetOptionInt(self, String name) -> int"""
2505 return _core_.Image_GetOptionInt(*args, **kwargs)
2506
2507 def HasOption(*args, **kwargs):
2508 """HasOption(self, String name) -> bool"""
2509 return _core_.Image_HasOption(*args, **kwargs)
2510
2511 def CountColours(*args, **kwargs):
2512 """CountColours(self, unsigned long stopafter=(unsigned long) -1) -> unsigned long"""
2513 return _core_.Image_CountColours(*args, **kwargs)
2514
2515 def ComputeHistogram(*args, **kwargs):
2516 """ComputeHistogram(self, ImageHistogram h) -> unsigned long"""
2517 return _core_.Image_ComputeHistogram(*args, **kwargs)
2518
2519 def AddHandler(*args, **kwargs):
2520 """AddHandler(ImageHandler handler)"""
2521 return _core_.Image_AddHandler(*args, **kwargs)
2522
2523 AddHandler = staticmethod(AddHandler)
2524 def InsertHandler(*args, **kwargs):
2525 """InsertHandler(ImageHandler handler)"""
2526 return _core_.Image_InsertHandler(*args, **kwargs)
2527
2528 InsertHandler = staticmethod(InsertHandler)
2529 def RemoveHandler(*args, **kwargs):
2530 """RemoveHandler(String name) -> bool"""
2531 return _core_.Image_RemoveHandler(*args, **kwargs)
2532
2533 RemoveHandler = staticmethod(RemoveHandler)
2534 def GetImageExtWildcard(*args, **kwargs):
2535 """GetImageExtWildcard() -> String"""
2536 return _core_.Image_GetImageExtWildcard(*args, **kwargs)
2537
2538 GetImageExtWildcard = staticmethod(GetImageExtWildcard)
2539 def ConvertToBitmap(*args, **kwargs):
2540 """ConvertToBitmap(self, int depth=-1) -> Bitmap"""
2541 return _core_.Image_ConvertToBitmap(*args, **kwargs)
2542
2543 def ConvertToMonoBitmap(*args, **kwargs):
2544 """ConvertToMonoBitmap(self, unsigned char red, unsigned char green, unsigned char blue) -> Bitmap"""
2545 return _core_.Image_ConvertToMonoBitmap(*args, **kwargs)
2546
2547 def __nonzero__(self): return self.Ok()
2548
2549 class ImagePtr(Image):
2550 def __init__(self, this):
2551 self.this = this
2552 if not hasattr(self,"thisown"): self.thisown = 0
2553 self.__class__ = Image
2554 _core_.Image_swigregister(ImagePtr)
2555
2556 def ImageFromMime(*args, **kwargs):
2557 """ImageFromMime(String name, String mimetype, int index=-1) -> Image"""
2558 val = _core_.new_ImageFromMime(*args, **kwargs)
2559 val.thisown = 1
2560 return val
2561
2562 def ImageFromStream(*args, **kwargs):
2563 """ImageFromStream(InputStream stream, long type=BITMAP_TYPE_ANY, int index=-1) -> Image"""
2564 val = _core_.new_ImageFromStream(*args, **kwargs)
2565 val.thisown = 1
2566 return val
2567
2568 def ImageFromStreamMime(*args, **kwargs):
2569 """ImageFromStreamMime(InputStream stream, String mimetype, int index=-1) -> Image"""
2570 val = _core_.new_ImageFromStreamMime(*args, **kwargs)
2571 val.thisown = 1
2572 return val
2573
2574 def EmptyImage(*args, **kwargs):
2575 """
2576 EmptyImage(int width=0, int height=0, bool clear=True) -> Image
2577
2578 Construct an empty image of a given size, optionally setting all
2579 pixels to black.
2580 """
2581 val = _core_.new_EmptyImage(*args, **kwargs)
2582 val.thisown = 1
2583 return val
2584
2585 def ImageFromBitmap(*args, **kwargs):
2586 """
2587 ImageFromBitmap(Bitmap bitmap) -> Image
2588
2589 Construct an Image from a `wx.Bitmap`.
2590 """
2591 val = _core_.new_ImageFromBitmap(*args, **kwargs)
2592 val.thisown = 1
2593 return val
2594
2595 def ImageFromData(*args, **kwargs):
2596 """
2597 ImageFromData(int width, int height, buffer data) -> Image
2598
2599 Construct an Image from a buffer of RGB bytes. Accepts either a
2600 string or a buffer object holding the data and the length of the data
2601 must be width*height*3.
2602 """
2603 val = _core_.new_ImageFromData(*args, **kwargs)
2604 val.thisown = 1
2605 return val
2606
2607 def ImageFromDataWithAlpha(*args, **kwargs):
2608 """
2609 ImageFromDataWithAlpha(int width, int height, buffer data, buffer alpha) -> Image
2610
2611 Construct an Image from a buffer of RGB bytes with an Alpha channel.
2612 Accepts either a string or a buffer object holding the data and the
2613 length of the data must be width*height*3.
2614 """
2615 val = _core_.new_ImageFromDataWithAlpha(*args, **kwargs)
2616 val.thisown = 1
2617 return val
2618
2619 def Image_CanRead(*args, **kwargs):
2620 """Image_CanRead(String name) -> bool"""
2621 return _core_.Image_CanRead(*args, **kwargs)
2622
2623 def Image_GetImageCount(*args, **kwargs):
2624 """Image_GetImageCount(String name, long type=BITMAP_TYPE_ANY) -> int"""
2625 return _core_.Image_GetImageCount(*args, **kwargs)
2626
2627 def Image_CanReadStream(*args, **kwargs):
2628 """Image_CanReadStream(InputStream stream) -> bool"""
2629 return _core_.Image_CanReadStream(*args, **kwargs)
2630
2631 def Image_AddHandler(*args, **kwargs):
2632 """Image_AddHandler(ImageHandler handler)"""
2633 return _core_.Image_AddHandler(*args, **kwargs)
2634
2635 def Image_InsertHandler(*args, **kwargs):
2636 """Image_InsertHandler(ImageHandler handler)"""
2637 return _core_.Image_InsertHandler(*args, **kwargs)
2638
2639 def Image_RemoveHandler(*args, **kwargs):
2640 """Image_RemoveHandler(String name) -> bool"""
2641 return _core_.Image_RemoveHandler(*args, **kwargs)
2642
2643 def Image_GetImageExtWildcard(*args, **kwargs):
2644 """Image_GetImageExtWildcard() -> String"""
2645 return _core_.Image_GetImageExtWildcard(*args, **kwargs)
2646
2647 def InitAllImageHandlers():
2648 """
2649 The former functionality of InitAllImageHanders is now done internal to
2650 the _core_ extension module and so this function has become a simple NOP.
2651 """
2652 pass
2653
2654 IMAGE_RESOLUTION_INCHES = _core_.IMAGE_RESOLUTION_INCHES
2655 IMAGE_RESOLUTION_CM = _core_.IMAGE_RESOLUTION_CM
2656 PNG_TYPE_COLOUR = _core_.PNG_TYPE_COLOUR
2657 PNG_TYPE_GREY = _core_.PNG_TYPE_GREY
2658 PNG_TYPE_GREY_RED = _core_.PNG_TYPE_GREY_RED
2659 BMP_24BPP = _core_.BMP_24BPP
2660 BMP_8BPP = _core_.BMP_8BPP
2661 BMP_8BPP_GREY = _core_.BMP_8BPP_GREY
2662 BMP_8BPP_GRAY = _core_.BMP_8BPP_GRAY
2663 BMP_8BPP_RED = _core_.BMP_8BPP_RED
2664 BMP_8BPP_PALETTE = _core_.BMP_8BPP_PALETTE
2665 BMP_4BPP = _core_.BMP_4BPP
2666 BMP_1BPP = _core_.BMP_1BPP
2667 BMP_1BPP_BW = _core_.BMP_1BPP_BW
2668 class BMPHandler(ImageHandler):
2669 """Proxy of C++ BMPHandler class"""
2670 def __repr__(self):
2671 return "<%s.%s; proxy of C++ wxBMPHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
2672 def __init__(self, *args, **kwargs):
2673 """__init__(self) -> BMPHandler"""
2674 newobj = _core_.new_BMPHandler(*args, **kwargs)
2675 self.this = newobj.this
2676 self.thisown = 1
2677 del newobj.thisown
2678
2679 class BMPHandlerPtr(BMPHandler):
2680 def __init__(self, this):
2681 self.this = this
2682 if not hasattr(self,"thisown"): self.thisown = 0
2683 self.__class__ = BMPHandler
2684 _core_.BMPHandler_swigregister(BMPHandlerPtr)
2685 NullImage = cvar.NullImage
2686 IMAGE_OPTION_FILENAME = cvar.IMAGE_OPTION_FILENAME
2687 IMAGE_OPTION_BMP_FORMAT = cvar.IMAGE_OPTION_BMP_FORMAT
2688 IMAGE_OPTION_CUR_HOTSPOT_X = cvar.IMAGE_OPTION_CUR_HOTSPOT_X
2689 IMAGE_OPTION_CUR_HOTSPOT_Y = cvar.IMAGE_OPTION_CUR_HOTSPOT_Y
2690 IMAGE_OPTION_RESOLUTION = cvar.IMAGE_OPTION_RESOLUTION
2691 IMAGE_OPTION_RESOLUTIONX = cvar.IMAGE_OPTION_RESOLUTIONX
2692 IMAGE_OPTION_RESOLUTIONY = cvar.IMAGE_OPTION_RESOLUTIONY
2693 IMAGE_OPTION_RESOLUTIONUNIT = cvar.IMAGE_OPTION_RESOLUTIONUNIT
2694 IMAGE_OPTION_QUALITY = cvar.IMAGE_OPTION_QUALITY
2695 IMAGE_OPTION_BITSPERSAMPLE = cvar.IMAGE_OPTION_BITSPERSAMPLE
2696 IMAGE_OPTION_SAMPLESPERPIXEL = cvar.IMAGE_OPTION_SAMPLESPERPIXEL
2697 IMAGE_OPTION_COMPRESSION = cvar.IMAGE_OPTION_COMPRESSION
2698 IMAGE_OPTION_IMAGEDESCRIPTOR = cvar.IMAGE_OPTION_IMAGEDESCRIPTOR
2699 IMAGE_OPTION_PNG_FORMAT = cvar.IMAGE_OPTION_PNG_FORMAT
2700 IMAGE_OPTION_PNG_BITDEPTH = cvar.IMAGE_OPTION_PNG_BITDEPTH
2701
2702 class ICOHandler(BMPHandler):
2703 """Proxy of C++ ICOHandler class"""
2704 def __repr__(self):
2705 return "<%s.%s; proxy of C++ wxICOHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
2706 def __init__(self, *args, **kwargs):
2707 """__init__(self) -> ICOHandler"""
2708 newobj = _core_.new_ICOHandler(*args, **kwargs)
2709 self.this = newobj.this
2710 self.thisown = 1
2711 del newobj.thisown
2712
2713 class ICOHandlerPtr(ICOHandler):
2714 def __init__(self, this):
2715 self.this = this
2716 if not hasattr(self,"thisown"): self.thisown = 0
2717 self.__class__ = ICOHandler
2718 _core_.ICOHandler_swigregister(ICOHandlerPtr)
2719
2720 class CURHandler(ICOHandler):
2721 """Proxy of C++ CURHandler class"""
2722 def __repr__(self):
2723 return "<%s.%s; proxy of C++ wxCURHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
2724 def __init__(self, *args, **kwargs):
2725 """__init__(self) -> CURHandler"""
2726 newobj = _core_.new_CURHandler(*args, **kwargs)
2727 self.this = newobj.this
2728 self.thisown = 1
2729 del newobj.thisown
2730
2731 class CURHandlerPtr(CURHandler):
2732 def __init__(self, this):
2733 self.this = this
2734 if not hasattr(self,"thisown"): self.thisown = 0
2735 self.__class__ = CURHandler
2736 _core_.CURHandler_swigregister(CURHandlerPtr)
2737
2738 class ANIHandler(CURHandler):
2739 """Proxy of C++ ANIHandler class"""
2740 def __repr__(self):
2741 return "<%s.%s; proxy of C++ wxANIHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
2742 def __init__(self, *args, **kwargs):
2743 """__init__(self) -> ANIHandler"""
2744 newobj = _core_.new_ANIHandler(*args, **kwargs)
2745 self.this = newobj.this
2746 self.thisown = 1
2747 del newobj.thisown
2748
2749 class ANIHandlerPtr(ANIHandler):
2750 def __init__(self, this):
2751 self.this = this
2752 if not hasattr(self,"thisown"): self.thisown = 0
2753 self.__class__ = ANIHandler
2754 _core_.ANIHandler_swigregister(ANIHandlerPtr)
2755
2756 class PNGHandler(ImageHandler):
2757 """Proxy of C++ PNGHandler class"""
2758 def __repr__(self):
2759 return "<%s.%s; proxy of C++ wxPNGHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
2760 def __init__(self, *args, **kwargs):
2761 """__init__(self) -> PNGHandler"""
2762 newobj = _core_.new_PNGHandler(*args, **kwargs)
2763 self.this = newobj.this
2764 self.thisown = 1
2765 del newobj.thisown
2766
2767 class PNGHandlerPtr(PNGHandler):
2768 def __init__(self, this):
2769 self.this = this
2770 if not hasattr(self,"thisown"): self.thisown = 0
2771 self.__class__ = PNGHandler
2772 _core_.PNGHandler_swigregister(PNGHandlerPtr)
2773
2774 class GIFHandler(ImageHandler):
2775 """Proxy of C++ GIFHandler class"""
2776 def __repr__(self):
2777 return "<%s.%s; proxy of C++ wxGIFHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
2778 def __init__(self, *args, **kwargs):
2779 """__init__(self) -> GIFHandler"""
2780 newobj = _core_.new_GIFHandler(*args, **kwargs)
2781 self.this = newobj.this
2782 self.thisown = 1
2783 del newobj.thisown
2784
2785 class GIFHandlerPtr(GIFHandler):
2786 def __init__(self, this):
2787 self.this = this
2788 if not hasattr(self,"thisown"): self.thisown = 0
2789 self.__class__ = GIFHandler
2790 _core_.GIFHandler_swigregister(GIFHandlerPtr)
2791
2792 class PCXHandler(ImageHandler):
2793 """Proxy of C++ PCXHandler class"""
2794 def __repr__(self):
2795 return "<%s.%s; proxy of C++ wxPCXHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
2796 def __init__(self, *args, **kwargs):
2797 """__init__(self) -> PCXHandler"""
2798 newobj = _core_.new_PCXHandler(*args, **kwargs)
2799 self.this = newobj.this
2800 self.thisown = 1
2801 del newobj.thisown
2802
2803 class PCXHandlerPtr(PCXHandler):
2804 def __init__(self, this):
2805 self.this = this
2806 if not hasattr(self,"thisown"): self.thisown = 0
2807 self.__class__ = PCXHandler
2808 _core_.PCXHandler_swigregister(PCXHandlerPtr)
2809
2810 class JPEGHandler(ImageHandler):
2811 """Proxy of C++ JPEGHandler class"""
2812 def __repr__(self):
2813 return "<%s.%s; proxy of C++ wxJPEGHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
2814 def __init__(self, *args, **kwargs):
2815 """__init__(self) -> JPEGHandler"""
2816 newobj = _core_.new_JPEGHandler(*args, **kwargs)
2817 self.this = newobj.this
2818 self.thisown = 1
2819 del newobj.thisown
2820
2821 class JPEGHandlerPtr(JPEGHandler):
2822 def __init__(self, this):
2823 self.this = this
2824 if not hasattr(self,"thisown"): self.thisown = 0
2825 self.__class__ = JPEGHandler
2826 _core_.JPEGHandler_swigregister(JPEGHandlerPtr)
2827
2828 class PNMHandler(ImageHandler):
2829 """Proxy of C++ PNMHandler class"""
2830 def __repr__(self):
2831 return "<%s.%s; proxy of C++ wxPNMHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
2832 def __init__(self, *args, **kwargs):
2833 """__init__(self) -> PNMHandler"""
2834 newobj = _core_.new_PNMHandler(*args, **kwargs)
2835 self.this = newobj.this
2836 self.thisown = 1
2837 del newobj.thisown
2838
2839 class PNMHandlerPtr(PNMHandler):
2840 def __init__(self, this):
2841 self.this = this
2842 if not hasattr(self,"thisown"): self.thisown = 0
2843 self.__class__ = PNMHandler
2844 _core_.PNMHandler_swigregister(PNMHandlerPtr)
2845
2846 class XPMHandler(ImageHandler):
2847 """Proxy of C++ XPMHandler class"""
2848 def __repr__(self):
2849 return "<%s.%s; proxy of C++ wxXPMHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
2850 def __init__(self, *args, **kwargs):
2851 """__init__(self) -> XPMHandler"""
2852 newobj = _core_.new_XPMHandler(*args, **kwargs)
2853 self.this = newobj.this
2854 self.thisown = 1
2855 del newobj.thisown
2856
2857 class XPMHandlerPtr(XPMHandler):
2858 def __init__(self, this):
2859 self.this = this
2860 if not hasattr(self,"thisown"): self.thisown = 0
2861 self.__class__ = XPMHandler
2862 _core_.XPMHandler_swigregister(XPMHandlerPtr)
2863
2864 class TIFFHandler(ImageHandler):
2865 """Proxy of C++ TIFFHandler class"""
2866 def __repr__(self):
2867 return "<%s.%s; proxy of C++ wxTIFFHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
2868 def __init__(self, *args, **kwargs):
2869 """__init__(self) -> TIFFHandler"""
2870 newobj = _core_.new_TIFFHandler(*args, **kwargs)
2871 self.this = newobj.this
2872 self.thisown = 1
2873 del newobj.thisown
2874
2875 class TIFFHandlerPtr(TIFFHandler):
2876 def __init__(self, this):
2877 self.this = this
2878 if not hasattr(self,"thisown"): self.thisown = 0
2879 self.__class__ = TIFFHandler
2880 _core_.TIFFHandler_swigregister(TIFFHandlerPtr)
2881
2882 QUANTIZE_INCLUDE_WINDOWS_COLOURS = _core_.QUANTIZE_INCLUDE_WINDOWS_COLOURS
2883 QUANTIZE_FILL_DESTINATION_IMAGE = _core_.QUANTIZE_FILL_DESTINATION_IMAGE
2884 class Quantize(object):
2885 """Performs quantization, or colour reduction, on a wxImage."""
2886 def __init__(self): raise RuntimeError, "No constructor defined"
2887 def __repr__(self):
2888 return "<%s.%s; proxy of C++ wxQuantize instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
2889 def Quantize(*args, **kwargs):
2890 """
2891 Quantize(Image src, Image dest, int desiredNoColours=236, int flags=wxQUANTIZE_INCLUDE_WINDOWS_COLOURS|wxQUANTIZE_FILL_DESTINATION_IMAGE) -> bool
2892
2893 Reduce the colours in the source image and put the result into the
2894 destination image, setting the palette in the destination if
2895 needed. Both images may be the same, to overwrite the source image.
2896 """
2897 return _core_.Quantize_Quantize(*args, **kwargs)
2898
2899 Quantize = staticmethod(Quantize)
2900
2901 class QuantizePtr(Quantize):
2902 def __init__(self, this):
2903 self.this = this
2904 if not hasattr(self,"thisown"): self.thisown = 0
2905 self.__class__ = Quantize
2906 _core_.Quantize_swigregister(QuantizePtr)
2907
2908 def Quantize_Quantize(*args, **kwargs):
2909 """
2910 Quantize_Quantize(Image src, Image dest, int desiredNoColours=236, int flags=wxQUANTIZE_INCLUDE_WINDOWS_COLOURS|wxQUANTIZE_FILL_DESTINATION_IMAGE) -> bool
2911
2912 Reduce the colours in the source image and put the result into the
2913 destination image, setting the palette in the destination if
2914 needed. Both images may be the same, to overwrite the source image.
2915 """
2916 return _core_.Quantize_Quantize(*args, **kwargs)
2917
2918 #---------------------------------------------------------------------------
2919
2920 class EvtHandler(Object):
2921 """Proxy of C++ EvtHandler class"""
2922 def __repr__(self):
2923 return "<%s.%s; proxy of C++ wxEvtHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
2924 def __init__(self, *args, **kwargs):
2925 """__init__(self) -> EvtHandler"""
2926 newobj = _core_.new_EvtHandler(*args, **kwargs)
2927 self.this = newobj.this
2928 self.thisown = 1
2929 del newobj.thisown
2930 def GetNextHandler(*args, **kwargs):
2931 """GetNextHandler(self) -> EvtHandler"""
2932 return _core_.EvtHandler_GetNextHandler(*args, **kwargs)
2933
2934 def GetPreviousHandler(*args, **kwargs):
2935 """GetPreviousHandler(self) -> EvtHandler"""
2936 return _core_.EvtHandler_GetPreviousHandler(*args, **kwargs)
2937
2938 def SetNextHandler(*args, **kwargs):
2939 """SetNextHandler(self, EvtHandler handler)"""
2940 return _core_.EvtHandler_SetNextHandler(*args, **kwargs)
2941
2942 def SetPreviousHandler(*args, **kwargs):
2943 """SetPreviousHandler(self, EvtHandler handler)"""
2944 return _core_.EvtHandler_SetPreviousHandler(*args, **kwargs)
2945
2946 def GetEvtHandlerEnabled(*args, **kwargs):
2947 """GetEvtHandlerEnabled(self) -> bool"""
2948 return _core_.EvtHandler_GetEvtHandlerEnabled(*args, **kwargs)
2949
2950 def SetEvtHandlerEnabled(*args, **kwargs):
2951 """SetEvtHandlerEnabled(self, bool enabled)"""
2952 return _core_.EvtHandler_SetEvtHandlerEnabled(*args, **kwargs)
2953
2954 def ProcessEvent(*args, **kwargs):
2955 """ProcessEvent(self, Event event) -> bool"""
2956 return _core_.EvtHandler_ProcessEvent(*args, **kwargs)
2957
2958 def AddPendingEvent(*args, **kwargs):
2959 """AddPendingEvent(self, Event event)"""
2960 return _core_.EvtHandler_AddPendingEvent(*args, **kwargs)
2961
2962 def ProcessPendingEvents(*args, **kwargs):
2963 """ProcessPendingEvents(self)"""
2964 return _core_.EvtHandler_ProcessPendingEvents(*args, **kwargs)
2965
2966 def Connect(*args, **kwargs):
2967 """Connect(self, int id, int lastId, int eventType, PyObject func)"""
2968 return _core_.EvtHandler_Connect(*args, **kwargs)
2969
2970 def Disconnect(*args, **kwargs):
2971 """Disconnect(self, int id, int lastId=-1, wxEventType eventType=wxEVT_NULL) -> bool"""
2972 return _core_.EvtHandler_Disconnect(*args, **kwargs)
2973
2974 def _setOORInfo(*args, **kwargs):
2975 """_setOORInfo(self, PyObject _self, bool incref=True)"""
2976 return _core_.EvtHandler__setOORInfo(*args, **kwargs)
2977
2978 def Bind(self, event, handler, source=None, id=wx.ID_ANY, id2=wx.ID_ANY):
2979 """
2980 Bind an event to an event handler.
2981
2982 :param event: One of the EVT_* objects that specifies the
2983 type of event to bind,
2984
2985 :param handler: A callable object to be invoked when the
2986 event is delivered to self. Pass None to
2987 disconnect an event handler.
2988
2989 :param source: Sometimes the event originates from a
2990 different window than self, but you still
2991 want to catch it in self. (For example, a
2992 button event delivered to a frame.) By
2993 passing the source of the event, the event
2994 handling system is able to differentiate
2995 between the same event type from different
2996 controls.
2997
2998 :param id: Used to spcify the event source by ID instead
2999 of instance.
3000
3001 :param id2: Used when it is desirable to bind a handler
3002 to a range of IDs, such as with EVT_MENU_RANGE.
3003 """
3004 if source is not None:
3005 id = source.GetId()
3006 event.Bind(self, id, id2, handler)
3007
3008 def Unbind(self, event, source=None, id=wx.ID_ANY, id2=wx.ID_ANY):
3009 """
3010 Disconencts the event handler binding for event from self.
3011 Returns True if successful.
3012 """
3013 if source is not None:
3014 id = source.GetId()
3015 return event.Unbind(self, id, id2)
3016
3017
3018 class EvtHandlerPtr(EvtHandler):
3019 def __init__(self, this):
3020 self.this = this
3021 if not hasattr(self,"thisown"): self.thisown = 0
3022 self.__class__ = EvtHandler
3023 _core_.EvtHandler_swigregister(EvtHandlerPtr)
3024
3025 #---------------------------------------------------------------------------
3026
3027 class PyEventBinder(object):
3028 """
3029 Instances of this class are used to bind specific events to event
3030 handlers.
3031 """
3032 def __init__(self, evtType, expectedIDs=0):
3033 if expectedIDs not in [0, 1, 2]:
3034 raise ValueError, "Invalid number of expectedIDs"
3035 self.expectedIDs = expectedIDs
3036
3037 if type(evtType) == list or type(evtType) == tuple:
3038 self.evtType = evtType
3039 else:
3040 self.evtType = [evtType]
3041
3042
3043 def Bind(self, target, id1, id2, function):
3044 """Bind this set of event types to target."""
3045 for et in self.evtType:
3046 target.Connect(id1, id2, et, function)
3047
3048
3049 def Unbind(self, target, id1, id2):
3050 """Remove an event binding."""
3051 success = 0
3052 for et in self.evtType:
3053 success += target.Disconnect(id1, id2, et)
3054 return success != 0
3055
3056
3057 def __call__(self, *args):
3058 """
3059 For backwards compatibility with the old EVT_* functions.
3060 Should be called with either (window, func), (window, ID,
3061 func) or (window, ID1, ID2, func) parameters depending on the
3062 type of the event.
3063 """
3064 assert len(args) == 2 + self.expectedIDs
3065 id1 = wx.ID_ANY
3066 id2 = wx.ID_ANY
3067 target = args[0]
3068 if self.expectedIDs == 0:
3069 func = args[1]
3070 elif self.expectedIDs == 1:
3071 id1 = args[1]
3072 func = args[2]
3073 elif self.expectedIDs == 2:
3074 id1 = args[1]
3075 id2 = args[2]
3076 func = args[3]
3077 else:
3078 raise ValueError, "Unexpected number of IDs"
3079
3080 self.Bind(target, id1, id2, func)
3081
3082
3083 # These two are square pegs that don't fit the PyEventBinder hole...
3084 def EVT_COMMAND(win, id, cmd, func):
3085 win.Connect(id, -1, cmd, func)
3086 def EVT_COMMAND_RANGE(win, id1, id2, cmd, func):
3087 win.Connect(id1, id2, cmd, func)
3088
3089
3090 #---------------------------------------------------------------------------
3091
3092 #---------------------------------------------------------------------------
3093
3094 EVENT_PROPAGATE_NONE = _core_.EVENT_PROPAGATE_NONE
3095 EVENT_PROPAGATE_MAX = _core_.EVENT_PROPAGATE_MAX
3096
3097 def NewEventType(*args, **kwargs):
3098 """NewEventType() -> wxEventType"""
3099 return _core_.NewEventType(*args, **kwargs)
3100 wxEVT_NULL = _core_.wxEVT_NULL
3101 wxEVT_FIRST = _core_.wxEVT_FIRST
3102 wxEVT_USER_FIRST = _core_.wxEVT_USER_FIRST
3103 wxEVT_COMMAND_BUTTON_CLICKED = _core_.wxEVT_COMMAND_BUTTON_CLICKED
3104 wxEVT_COMMAND_CHECKBOX_CLICKED = _core_.wxEVT_COMMAND_CHECKBOX_CLICKED
3105 wxEVT_COMMAND_CHOICE_SELECTED = _core_.wxEVT_COMMAND_CHOICE_SELECTED
3106 wxEVT_COMMAND_LISTBOX_SELECTED = _core_.wxEVT_COMMAND_LISTBOX_SELECTED
3107 wxEVT_COMMAND_LISTBOX_DOUBLECLICKED = _core_.wxEVT_COMMAND_LISTBOX_DOUBLECLICKED
3108 wxEVT_COMMAND_CHECKLISTBOX_TOGGLED = _core_.wxEVT_COMMAND_CHECKLISTBOX_TOGGLED
3109 wxEVT_COMMAND_MENU_SELECTED = _core_.wxEVT_COMMAND_MENU_SELECTED
3110 wxEVT_COMMAND_TOOL_CLICKED = _core_.wxEVT_COMMAND_TOOL_CLICKED
3111 wxEVT_COMMAND_SLIDER_UPDATED = _core_.wxEVT_COMMAND_SLIDER_UPDATED
3112 wxEVT_COMMAND_RADIOBOX_SELECTED = _core_.wxEVT_COMMAND_RADIOBOX_SELECTED
3113 wxEVT_COMMAND_RADIOBUTTON_SELECTED = _core_.wxEVT_COMMAND_RADIOBUTTON_SELECTED
3114 wxEVT_COMMAND_SCROLLBAR_UPDATED = _core_.wxEVT_COMMAND_SCROLLBAR_UPDATED
3115 wxEVT_COMMAND_VLBOX_SELECTED = _core_.wxEVT_COMMAND_VLBOX_SELECTED
3116 wxEVT_COMMAND_COMBOBOX_SELECTED = _core_.wxEVT_COMMAND_COMBOBOX_SELECTED
3117 wxEVT_COMMAND_TOOL_RCLICKED = _core_.wxEVT_COMMAND_TOOL_RCLICKED
3118 wxEVT_COMMAND_TOOL_ENTER = _core_.wxEVT_COMMAND_TOOL_ENTER
3119 wxEVT_LEFT_DOWN = _core_.wxEVT_LEFT_DOWN
3120 wxEVT_LEFT_UP = _core_.wxEVT_LEFT_UP
3121 wxEVT_MIDDLE_DOWN = _core_.wxEVT_MIDDLE_DOWN
3122 wxEVT_MIDDLE_UP = _core_.wxEVT_MIDDLE_UP
3123 wxEVT_RIGHT_DOWN = _core_.wxEVT_RIGHT_DOWN
3124 wxEVT_RIGHT_UP = _core_.wxEVT_RIGHT_UP
3125 wxEVT_MOTION = _core_.wxEVT_MOTION
3126 wxEVT_ENTER_WINDOW = _core_.wxEVT_ENTER_WINDOW
3127 wxEVT_LEAVE_WINDOW = _core_.wxEVT_LEAVE_WINDOW
3128 wxEVT_LEFT_DCLICK = _core_.wxEVT_LEFT_DCLICK
3129 wxEVT_MIDDLE_DCLICK = _core_.wxEVT_MIDDLE_DCLICK
3130 wxEVT_RIGHT_DCLICK = _core_.wxEVT_RIGHT_DCLICK
3131 wxEVT_SET_FOCUS = _core_.wxEVT_SET_FOCUS
3132 wxEVT_KILL_FOCUS = _core_.wxEVT_KILL_FOCUS
3133 wxEVT_CHILD_FOCUS = _core_.wxEVT_CHILD_FOCUS
3134 wxEVT_MOUSEWHEEL = _core_.wxEVT_MOUSEWHEEL
3135 wxEVT_NC_LEFT_DOWN = _core_.wxEVT_NC_LEFT_DOWN
3136 wxEVT_NC_LEFT_UP = _core_.wxEVT_NC_LEFT_UP
3137 wxEVT_NC_MIDDLE_DOWN = _core_.wxEVT_NC_MIDDLE_DOWN
3138 wxEVT_NC_MIDDLE_UP = _core_.wxEVT_NC_MIDDLE_UP
3139 wxEVT_NC_RIGHT_DOWN = _core_.wxEVT_NC_RIGHT_DOWN
3140 wxEVT_NC_RIGHT_UP = _core_.wxEVT_NC_RIGHT_UP
3141 wxEVT_NC_MOTION = _core_.wxEVT_NC_MOTION
3142 wxEVT_NC_ENTER_WINDOW = _core_.wxEVT_NC_ENTER_WINDOW
3143 wxEVT_NC_LEAVE_WINDOW = _core_.wxEVT_NC_LEAVE_WINDOW
3144 wxEVT_NC_LEFT_DCLICK = _core_.wxEVT_NC_LEFT_DCLICK
3145 wxEVT_NC_MIDDLE_DCLICK = _core_.wxEVT_NC_MIDDLE_DCLICK
3146 wxEVT_NC_RIGHT_DCLICK = _core_.wxEVT_NC_RIGHT_DCLICK
3147 wxEVT_CHAR = _core_.wxEVT_CHAR
3148 wxEVT_CHAR_HOOK = _core_.wxEVT_CHAR_HOOK
3149 wxEVT_NAVIGATION_KEY = _core_.wxEVT_NAVIGATION_KEY
3150 wxEVT_KEY_DOWN = _core_.wxEVT_KEY_DOWN
3151 wxEVT_KEY_UP = _core_.wxEVT_KEY_UP
3152 wxEVT_HOTKEY = _core_.wxEVT_HOTKEY
3153 wxEVT_SET_CURSOR = _core_.wxEVT_SET_CURSOR
3154 wxEVT_SCROLL_TOP = _core_.wxEVT_SCROLL_TOP
3155 wxEVT_SCROLL_BOTTOM = _core_.wxEVT_SCROLL_BOTTOM
3156 wxEVT_SCROLL_LINEUP = _core_.wxEVT_SCROLL_LINEUP
3157 wxEVT_SCROLL_LINEDOWN = _core_.wxEVT_SCROLL_LINEDOWN
3158 wxEVT_SCROLL_PAGEUP = _core_.wxEVT_SCROLL_PAGEUP
3159 wxEVT_SCROLL_PAGEDOWN = _core_.wxEVT_SCROLL_PAGEDOWN
3160 wxEVT_SCROLL_THUMBTRACK = _core_.wxEVT_SCROLL_THUMBTRACK
3161 wxEVT_SCROLL_THUMBRELEASE = _core_.wxEVT_SCROLL_THUMBRELEASE
3162 wxEVT_SCROLL_ENDSCROLL = _core_.wxEVT_SCROLL_ENDSCROLL
3163 wxEVT_SCROLLWIN_TOP = _core_.wxEVT_SCROLLWIN_TOP
3164 wxEVT_SCROLLWIN_BOTTOM = _core_.wxEVT_SCROLLWIN_BOTTOM
3165 wxEVT_SCROLLWIN_LINEUP = _core_.wxEVT_SCROLLWIN_LINEUP
3166 wxEVT_SCROLLWIN_LINEDOWN = _core_.wxEVT_SCROLLWIN_LINEDOWN
3167 wxEVT_SCROLLWIN_PAGEUP = _core_.wxEVT_SCROLLWIN_PAGEUP
3168 wxEVT_SCROLLWIN_PAGEDOWN = _core_.wxEVT_SCROLLWIN_PAGEDOWN
3169 wxEVT_SCROLLWIN_THUMBTRACK = _core_.wxEVT_SCROLLWIN_THUMBTRACK
3170 wxEVT_SCROLLWIN_THUMBRELEASE = _core_.wxEVT_SCROLLWIN_THUMBRELEASE
3171 wxEVT_SIZE = _core_.wxEVT_SIZE
3172 wxEVT_MOVE = _core_.wxEVT_MOVE
3173 wxEVT_CLOSE_WINDOW = _core_.wxEVT_CLOSE_WINDOW
3174 wxEVT_END_SESSION = _core_.wxEVT_END_SESSION
3175 wxEVT_QUERY_END_SESSION = _core_.wxEVT_QUERY_END_SESSION
3176 wxEVT_ACTIVATE_APP = _core_.wxEVT_ACTIVATE_APP
3177 wxEVT_POWER = _core_.wxEVT_POWER
3178 wxEVT_ACTIVATE = _core_.wxEVT_ACTIVATE
3179 wxEVT_CREATE = _core_.wxEVT_CREATE
3180 wxEVT_DESTROY = _core_.wxEVT_DESTROY
3181 wxEVT_SHOW = _core_.wxEVT_SHOW
3182 wxEVT_ICONIZE = _core_.wxEVT_ICONIZE
3183 wxEVT_MAXIMIZE = _core_.wxEVT_MAXIMIZE
3184 wxEVT_MOUSE_CAPTURE_CHANGED = _core_.wxEVT_MOUSE_CAPTURE_CHANGED
3185 wxEVT_PAINT = _core_.wxEVT_PAINT
3186 wxEVT_ERASE_BACKGROUND = _core_.wxEVT_ERASE_BACKGROUND
3187 wxEVT_NC_PAINT = _core_.wxEVT_NC_PAINT
3188 wxEVT_PAINT_ICON = _core_.wxEVT_PAINT_ICON
3189 wxEVT_MENU_OPEN = _core_.wxEVT_MENU_OPEN
3190 wxEVT_MENU_CLOSE = _core_.wxEVT_MENU_CLOSE
3191 wxEVT_MENU_HIGHLIGHT = _core_.wxEVT_MENU_HIGHLIGHT
3192 wxEVT_CONTEXT_MENU = _core_.wxEVT_CONTEXT_MENU
3193 wxEVT_SYS_COLOUR_CHANGED = _core_.wxEVT_SYS_COLOUR_CHANGED
3194 wxEVT_DISPLAY_CHANGED = _core_.wxEVT_DISPLAY_CHANGED
3195 wxEVT_SETTING_CHANGED = _core_.wxEVT_SETTING_CHANGED
3196 wxEVT_QUERY_NEW_PALETTE = _core_.wxEVT_QUERY_NEW_PALETTE
3197 wxEVT_PALETTE_CHANGED = _core_.wxEVT_PALETTE_CHANGED
3198 wxEVT_DROP_FILES = _core_.wxEVT_DROP_FILES
3199 wxEVT_DRAW_ITEM = _core_.wxEVT_DRAW_ITEM
3200 wxEVT_MEASURE_ITEM = _core_.wxEVT_MEASURE_ITEM
3201 wxEVT_COMPARE_ITEM = _core_.wxEVT_COMPARE_ITEM
3202 wxEVT_INIT_DIALOG = _core_.wxEVT_INIT_DIALOG
3203 wxEVT_IDLE = _core_.wxEVT_IDLE
3204 wxEVT_UPDATE_UI = _core_.wxEVT_UPDATE_UI
3205 wxEVT_SIZING = _core_.wxEVT_SIZING
3206 wxEVT_MOVING = _core_.wxEVT_MOVING
3207 wxEVT_HIBERNATE = _core_.wxEVT_HIBERNATE
3208 wxEVT_COMMAND_LEFT_CLICK = _core_.wxEVT_COMMAND_LEFT_CLICK
3209 wxEVT_COMMAND_LEFT_DCLICK = _core_.wxEVT_COMMAND_LEFT_DCLICK
3210 wxEVT_COMMAND_RIGHT_CLICK = _core_.wxEVT_COMMAND_RIGHT_CLICK
3211 wxEVT_COMMAND_RIGHT_DCLICK = _core_.wxEVT_COMMAND_RIGHT_DCLICK
3212 wxEVT_COMMAND_SET_FOCUS = _core_.wxEVT_COMMAND_SET_FOCUS
3213 wxEVT_COMMAND_KILL_FOCUS = _core_.wxEVT_COMMAND_KILL_FOCUS
3214 wxEVT_COMMAND_ENTER = _core_.wxEVT_COMMAND_ENTER
3215 #
3216 # Create some event binders
3217 EVT_SIZE = wx.PyEventBinder( wxEVT_SIZE )
3218 EVT_SIZING = wx.PyEventBinder( wxEVT_SIZING )
3219 EVT_MOVE = wx.PyEventBinder( wxEVT_MOVE )
3220 EVT_MOVING = wx.PyEventBinder( wxEVT_MOVING )
3221 EVT_CLOSE = wx.PyEventBinder( wxEVT_CLOSE_WINDOW )
3222 EVT_END_SESSION = wx.PyEventBinder( wxEVT_END_SESSION )
3223 EVT_QUERY_END_SESSION = wx.PyEventBinder( wxEVT_QUERY_END_SESSION )
3224 EVT_PAINT = wx.PyEventBinder( wxEVT_PAINT )
3225 EVT_NC_PAINT = wx.PyEventBinder( wxEVT_NC_PAINT )
3226 EVT_ERASE_BACKGROUND = wx.PyEventBinder( wxEVT_ERASE_BACKGROUND )
3227 EVT_CHAR = wx.PyEventBinder( wxEVT_CHAR )
3228 EVT_KEY_DOWN = wx.PyEventBinder( wxEVT_KEY_DOWN )
3229 EVT_KEY_UP = wx.PyEventBinder( wxEVT_KEY_UP )
3230 EVT_HOTKEY = wx.PyEventBinder( wxEVT_HOTKEY, 1)
3231 EVT_CHAR_HOOK = wx.PyEventBinder( wxEVT_CHAR_HOOK )
3232 EVT_MENU_OPEN = wx.PyEventBinder( wxEVT_MENU_OPEN )
3233 EVT_MENU_CLOSE = wx.PyEventBinder( wxEVT_MENU_CLOSE )
3234 EVT_MENU_HIGHLIGHT = wx.PyEventBinder( wxEVT_MENU_HIGHLIGHT, 1)
3235 EVT_MENU_HIGHLIGHT_ALL = wx.PyEventBinder( wxEVT_MENU_HIGHLIGHT )
3236 EVT_SET_FOCUS = wx.PyEventBinder( wxEVT_SET_FOCUS )
3237 EVT_KILL_FOCUS = wx.PyEventBinder( wxEVT_KILL_FOCUS )
3238 EVT_CHILD_FOCUS = wx.PyEventBinder( wxEVT_CHILD_FOCUS )
3239 EVT_ACTIVATE = wx.PyEventBinder( wxEVT_ACTIVATE )
3240 EVT_ACTIVATE_APP = wx.PyEventBinder( wxEVT_ACTIVATE_APP )
3241 EVT_HIBERNATE = wx.PyEventBinder( wxEVT_HIBERNATE )
3242 EVT_END_SESSION = wx.PyEventBinder( wxEVT_END_SESSION )
3243 EVT_QUERY_END_SESSION = wx.PyEventBinder( wxEVT_QUERY_END_SESSION )
3244 EVT_DROP_FILES = wx.PyEventBinder( wxEVT_DROP_FILES )
3245 EVT_INIT_DIALOG = wx.PyEventBinder( wxEVT_INIT_DIALOG )
3246 EVT_SYS_COLOUR_CHANGED = wx.PyEventBinder( wxEVT_SYS_COLOUR_CHANGED )
3247 EVT_DISPLAY_CHANGED = wx.PyEventBinder( wxEVT_DISPLAY_CHANGED )
3248 EVT_SHOW = wx.PyEventBinder( wxEVT_SHOW )
3249 EVT_MAXIMIZE = wx.PyEventBinder( wxEVT_MAXIMIZE )
3250 EVT_ICONIZE = wx.PyEventBinder( wxEVT_ICONIZE )
3251 EVT_NAVIGATION_KEY = wx.PyEventBinder( wxEVT_NAVIGATION_KEY )
3252 EVT_PALETTE_CHANGED = wx.PyEventBinder( wxEVT_PALETTE_CHANGED )
3253 EVT_QUERY_NEW_PALETTE = wx.PyEventBinder( wxEVT_QUERY_NEW_PALETTE )
3254 EVT_WINDOW_CREATE = wx.PyEventBinder( wxEVT_CREATE )
3255 EVT_WINDOW_DESTROY = wx.PyEventBinder( wxEVT_DESTROY )
3256 EVT_SET_CURSOR = wx.PyEventBinder( wxEVT_SET_CURSOR )
3257 EVT_MOUSE_CAPTURE_CHANGED = wx.PyEventBinder( wxEVT_MOUSE_CAPTURE_CHANGED )
3258
3259 EVT_LEFT_DOWN = wx.PyEventBinder( wxEVT_LEFT_DOWN )
3260 EVT_LEFT_UP = wx.PyEventBinder( wxEVT_LEFT_UP )
3261 EVT_MIDDLE_DOWN = wx.PyEventBinder( wxEVT_MIDDLE_DOWN )
3262 EVT_MIDDLE_UP = wx.PyEventBinder( wxEVT_MIDDLE_UP )
3263 EVT_RIGHT_DOWN = wx.PyEventBinder( wxEVT_RIGHT_DOWN )
3264 EVT_RIGHT_UP = wx.PyEventBinder( wxEVT_RIGHT_UP )
3265 EVT_MOTION = wx.PyEventBinder( wxEVT_MOTION )
3266 EVT_LEFT_DCLICK = wx.PyEventBinder( wxEVT_LEFT_DCLICK )
3267 EVT_MIDDLE_DCLICK = wx.PyEventBinder( wxEVT_MIDDLE_DCLICK )
3268 EVT_RIGHT_DCLICK = wx.PyEventBinder( wxEVT_RIGHT_DCLICK )
3269 EVT_LEAVE_WINDOW = wx.PyEventBinder( wxEVT_LEAVE_WINDOW )
3270 EVT_ENTER_WINDOW = wx.PyEventBinder( wxEVT_ENTER_WINDOW )
3271 EVT_MOUSEWHEEL = wx.PyEventBinder( wxEVT_MOUSEWHEEL )
3272
3273 EVT_MOUSE_EVENTS = wx.PyEventBinder([ wxEVT_LEFT_DOWN,
3274 wxEVT_LEFT_UP,
3275 wxEVT_MIDDLE_DOWN,
3276 wxEVT_MIDDLE_UP,
3277 wxEVT_RIGHT_DOWN,
3278 wxEVT_RIGHT_UP,
3279 wxEVT_MOTION,
3280 wxEVT_LEFT_DCLICK,
3281 wxEVT_MIDDLE_DCLICK,
3282 wxEVT_RIGHT_DCLICK,
3283 wxEVT_ENTER_WINDOW,
3284 wxEVT_LEAVE_WINDOW,
3285 wxEVT_MOUSEWHEEL
3286 ])
3287
3288
3289 # Scrolling from wxWindow (sent to wxScrolledWindow)
3290 EVT_SCROLLWIN = wx.PyEventBinder([ wxEVT_SCROLLWIN_TOP,
3291 wxEVT_SCROLLWIN_BOTTOM,
3292 wxEVT_SCROLLWIN_LINEUP,
3293 wxEVT_SCROLLWIN_LINEDOWN,
3294 wxEVT_SCROLLWIN_PAGEUP,
3295 wxEVT_SCROLLWIN_PAGEDOWN,
3296 wxEVT_SCROLLWIN_THUMBTRACK,
3297 wxEVT_SCROLLWIN_THUMBRELEASE,
3298 ])
3299
3300 EVT_SCROLLWIN_TOP = wx.PyEventBinder( wxEVT_SCROLLWIN_TOP )
3301 EVT_SCROLLWIN_BOTTOM = wx.PyEventBinder( wxEVT_SCROLLWIN_BOTTOM )
3302 EVT_SCROLLWIN_LINEUP = wx.PyEventBinder( wxEVT_SCROLLWIN_LINEUP )
3303 EVT_SCROLLWIN_LINEDOWN = wx.PyEventBinder( wxEVT_SCROLLWIN_LINEDOWN )
3304 EVT_SCROLLWIN_PAGEUP = wx.PyEventBinder( wxEVT_SCROLLWIN_PAGEUP )
3305 EVT_SCROLLWIN_PAGEDOWN = wx.PyEventBinder( wxEVT_SCROLLWIN_PAGEDOWN )
3306 EVT_SCROLLWIN_THUMBTRACK = wx.PyEventBinder( wxEVT_SCROLLWIN_THUMBTRACK )
3307 EVT_SCROLLWIN_THUMBRELEASE = wx.PyEventBinder( wxEVT_SCROLLWIN_THUMBRELEASE )
3308
3309 # Scrolling from wxSlider and wxScrollBar
3310 EVT_SCROLL = wx.PyEventBinder([ wxEVT_SCROLL_TOP,
3311 wxEVT_SCROLL_BOTTOM,
3312 wxEVT_SCROLL_LINEUP,
3313 wxEVT_SCROLL_LINEDOWN,
3314 wxEVT_SCROLL_PAGEUP,
3315 wxEVT_SCROLL_PAGEDOWN,
3316 wxEVT_SCROLL_THUMBTRACK,
3317 wxEVT_SCROLL_THUMBRELEASE,
3318 wxEVT_SCROLL_ENDSCROLL,
3319 ])
3320
3321 EVT_SCROLL_TOP = wx.PyEventBinder( wxEVT_SCROLL_TOP )
3322 EVT_SCROLL_BOTTOM = wx.PyEventBinder( wxEVT_SCROLL_BOTTOM )
3323 EVT_SCROLL_LINEUP = wx.PyEventBinder( wxEVT_SCROLL_LINEUP )
3324 EVT_SCROLL_LINEDOWN = wx.PyEventBinder( wxEVT_SCROLL_LINEDOWN )
3325 EVT_SCROLL_PAGEUP = wx.PyEventBinder( wxEVT_SCROLL_PAGEUP )
3326 EVT_SCROLL_PAGEDOWN = wx.PyEventBinder( wxEVT_SCROLL_PAGEDOWN )
3327 EVT_SCROLL_THUMBTRACK = wx.PyEventBinder( wxEVT_SCROLL_THUMBTRACK )
3328 EVT_SCROLL_THUMBRELEASE = wx.PyEventBinder( wxEVT_SCROLL_THUMBRELEASE )
3329 EVT_SCROLL_ENDSCROLL = wx.PyEventBinder( wxEVT_SCROLL_ENDSCROLL )
3330
3331 # Scrolling from wxSlider and wxScrollBar, with an id
3332 EVT_COMMAND_SCROLL = wx.PyEventBinder([ wxEVT_SCROLL_TOP,
3333 wxEVT_SCROLL_BOTTOM,
3334 wxEVT_SCROLL_LINEUP,
3335 wxEVT_SCROLL_LINEDOWN,
3336 wxEVT_SCROLL_PAGEUP,
3337 wxEVT_SCROLL_PAGEDOWN,
3338 wxEVT_SCROLL_THUMBTRACK,
3339 wxEVT_SCROLL_THUMBRELEASE,
3340 wxEVT_SCROLL_ENDSCROLL,
3341 ], 1)
3342
3343 EVT_COMMAND_SCROLL_TOP = wx.PyEventBinder( wxEVT_SCROLL_TOP, 1)
3344 EVT_COMMAND_SCROLL_BOTTOM = wx.PyEventBinder( wxEVT_SCROLL_BOTTOM, 1)
3345 EVT_COMMAND_SCROLL_LINEUP = wx.PyEventBinder( wxEVT_SCROLL_LINEUP, 1)
3346 EVT_COMMAND_SCROLL_LINEDOWN = wx.PyEventBinder( wxEVT_SCROLL_LINEDOWN, 1)
3347 EVT_COMMAND_SCROLL_PAGEUP = wx.PyEventBinder( wxEVT_SCROLL_PAGEUP, 1)
3348 EVT_COMMAND_SCROLL_PAGEDOWN = wx.PyEventBinder( wxEVT_SCROLL_PAGEDOWN, 1)
3349 EVT_COMMAND_SCROLL_THUMBTRACK = wx.PyEventBinder( wxEVT_SCROLL_THUMBTRACK, 1)
3350 EVT_COMMAND_SCROLL_THUMBRELEASE = wx.PyEventBinder( wxEVT_SCROLL_THUMBRELEASE, 1)
3351 EVT_COMMAND_SCROLL_ENDSCROLL = wx.PyEventBinder( wxEVT_SCROLL_ENDSCROLL, 1)
3352
3353 EVT_BUTTON = wx.PyEventBinder( wxEVT_COMMAND_BUTTON_CLICKED, 1)
3354 EVT_CHECKBOX = wx.PyEventBinder( wxEVT_COMMAND_CHECKBOX_CLICKED, 1)
3355 EVT_CHOICE = wx.PyEventBinder( wxEVT_COMMAND_CHOICE_SELECTED, 1)
3356 EVT_LISTBOX = wx.PyEventBinder( wxEVT_COMMAND_LISTBOX_SELECTED, 1)
3357 EVT_LISTBOX_DCLICK = wx.PyEventBinder( wxEVT_COMMAND_LISTBOX_DOUBLECLICKED, 1)
3358 EVT_MENU = wx.PyEventBinder( wxEVT_COMMAND_MENU_SELECTED, 1)
3359 EVT_MENU_RANGE = wx.PyEventBinder( wxEVT_COMMAND_MENU_SELECTED, 2)
3360 EVT_SLIDER = wx.PyEventBinder( wxEVT_COMMAND_SLIDER_UPDATED, 1)
3361 EVT_RADIOBOX = wx.PyEventBinder( wxEVT_COMMAND_RADIOBOX_SELECTED, 1)
3362 EVT_RADIOBUTTON = wx.PyEventBinder( wxEVT_COMMAND_RADIOBUTTON_SELECTED, 1)
3363
3364 EVT_SCROLLBAR = wx.PyEventBinder( wxEVT_COMMAND_SCROLLBAR_UPDATED, 1)
3365 EVT_VLBOX = wx.PyEventBinder( wxEVT_COMMAND_VLBOX_SELECTED, 1)
3366 EVT_COMBOBOX = wx.PyEventBinder( wxEVT_COMMAND_COMBOBOX_SELECTED, 1)
3367 EVT_TOOL = wx.PyEventBinder( wxEVT_COMMAND_TOOL_CLICKED, 1)
3368 EVT_TOOL_RANGE = wx.PyEventBinder( wxEVT_COMMAND_TOOL_CLICKED, 2)
3369 EVT_TOOL_RCLICKED = wx.PyEventBinder( wxEVT_COMMAND_TOOL_RCLICKED, 1)
3370 EVT_TOOL_RCLICKED_RANGE = wx.PyEventBinder( wxEVT_COMMAND_TOOL_RCLICKED, 2)
3371 EVT_TOOL_ENTER = wx.PyEventBinder( wxEVT_COMMAND_TOOL_ENTER, 1)
3372 EVT_CHECKLISTBOX = wx.PyEventBinder( wxEVT_COMMAND_CHECKLISTBOX_TOGGLED, 1)
3373
3374
3375 EVT_COMMAND_LEFT_CLICK = wx.PyEventBinder( wxEVT_COMMAND_LEFT_CLICK, 1)
3376 EVT_COMMAND_LEFT_DCLICK = wx.PyEventBinder( wxEVT_COMMAND_LEFT_DCLICK, 1)
3377 EVT_COMMAND_RIGHT_CLICK = wx.PyEventBinder( wxEVT_COMMAND_RIGHT_CLICK, 1)
3378 EVT_COMMAND_RIGHT_DCLICK = wx.PyEventBinder( wxEVT_COMMAND_RIGHT_DCLICK, 1)
3379 EVT_COMMAND_SET_FOCUS = wx.PyEventBinder( wxEVT_COMMAND_SET_FOCUS, 1)
3380 EVT_COMMAND_KILL_FOCUS = wx.PyEventBinder( wxEVT_COMMAND_KILL_FOCUS, 1)
3381 EVT_COMMAND_ENTER = wx.PyEventBinder( wxEVT_COMMAND_ENTER, 1)
3382
3383 EVT_IDLE = wx.PyEventBinder( wxEVT_IDLE )
3384
3385 EVT_UPDATE_UI = wx.PyEventBinder( wxEVT_UPDATE_UI, 1)
3386 EVT_UPDATE_UI_RANGE = wx.PyEventBinder( wxEVT_UPDATE_UI, 2)
3387
3388 EVT_CONTEXT_MENU = wx.PyEventBinder( wxEVT_CONTEXT_MENU )
3389
3390
3391
3392 #---------------------------------------------------------------------------
3393
3394 class Event(Object):
3395 """Proxy of C++ Event class"""
3396 def __init__(self): raise RuntimeError, "No constructor defined"
3397 def __repr__(self):
3398 return "<%s.%s; proxy of C++ wxEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
3399 def __del__(self, destroy=_core_.delete_Event):
3400 """__del__(self)"""
3401 try:
3402 if self.thisown: destroy(self)
3403 except: pass
3404
3405 def SetEventType(*args, **kwargs):
3406 """SetEventType(self, wxEventType typ)"""
3407 return _core_.Event_SetEventType(*args, **kwargs)
3408
3409 def GetEventType(*args, **kwargs):
3410 """GetEventType(self) -> wxEventType"""
3411 return _core_.Event_GetEventType(*args, **kwargs)
3412
3413 def GetEventObject(*args, **kwargs):
3414 """GetEventObject(self) -> Object"""
3415 return _core_.Event_GetEventObject(*args, **kwargs)
3416
3417 def SetEventObject(*args, **kwargs):
3418 """SetEventObject(self, Object obj)"""
3419 return _core_.Event_SetEventObject(*args, **kwargs)
3420
3421 def GetTimestamp(*args, **kwargs):
3422 """GetTimestamp(self) -> long"""
3423 return _core_.Event_GetTimestamp(*args, **kwargs)
3424
3425 def SetTimestamp(*args, **kwargs):
3426 """SetTimestamp(self, long ts=0)"""
3427 return _core_.Event_SetTimestamp(*args, **kwargs)
3428
3429 def GetId(*args, **kwargs):
3430 """GetId(self) -> int"""
3431 return _core_.Event_GetId(*args, **kwargs)
3432
3433 def SetId(*args, **kwargs):
3434 """SetId(self, int Id)"""
3435 return _core_.Event_SetId(*args, **kwargs)
3436
3437 def IsCommandEvent(*args, **kwargs):
3438 """IsCommandEvent(self) -> bool"""
3439 return _core_.Event_IsCommandEvent(*args, **kwargs)
3440
3441 def Skip(*args, **kwargs):
3442 """
3443 Skip(self, bool skip=True)
3444
3445 Called by an event handler, it controls whether additional event
3446 handlers bound to this event will be called after the current event
3447 handler returns. Skip(false) (the default setting) will prevent
3448 additional event handlers from being called and control will be
3449 returned to the sender of the event immediately after the current
3450 handler has finished. Skip(True) will cause the event processing
3451 system to continue searching for a handler function for this event.
3452
3453 """
3454 return _core_.Event_Skip(*args, **kwargs)
3455
3456 def GetSkipped(*args, **kwargs):
3457 """GetSkipped(self) -> bool"""
3458 return _core_.Event_GetSkipped(*args, **kwargs)
3459
3460 def ShouldPropagate(*args, **kwargs):
3461 """ShouldPropagate(self) -> bool"""
3462 return _core_.Event_ShouldPropagate(*args, **kwargs)
3463
3464 def StopPropagation(*args, **kwargs):
3465 """StopPropagation(self) -> int"""
3466 return _core_.Event_StopPropagation(*args, **kwargs)
3467
3468 def ResumePropagation(*args, **kwargs):
3469 """ResumePropagation(self, int propagationLevel)"""
3470 return _core_.Event_ResumePropagation(*args, **kwargs)
3471
3472 def Clone(*args, **kwargs):
3473 """Clone(self) -> Event"""
3474 return _core_.Event_Clone(*args, **kwargs)
3475
3476
3477 class EventPtr(Event):
3478 def __init__(self, this):
3479 self.this = this
3480 if not hasattr(self,"thisown"): self.thisown = 0
3481 self.__class__ = Event
3482 _core_.Event_swigregister(EventPtr)
3483
3484 #---------------------------------------------------------------------------
3485
3486 class PropagationDisabler(object):
3487 """Proxy of C++ PropagationDisabler class"""
3488 def __repr__(self):
3489 return "<%s.%s; proxy of C++ wxPropagationDisabler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
3490 def __init__(self, *args, **kwargs):
3491 """__init__(self, Event event) -> PropagationDisabler"""
3492 newobj = _core_.new_PropagationDisabler(*args, **kwargs)
3493 self.this = newobj.this
3494 self.thisown = 1
3495 del newobj.thisown
3496 def __del__(self, destroy=_core_.delete_PropagationDisabler):
3497 """__del__(self)"""
3498 try:
3499 if self.thisown: destroy(self)
3500 except: pass
3501
3502
3503 class PropagationDisablerPtr(PropagationDisabler):
3504 def __init__(self, this):
3505 self.this = this
3506 if not hasattr(self,"thisown"): self.thisown = 0
3507 self.__class__ = PropagationDisabler
3508 _core_.PropagationDisabler_swigregister(PropagationDisablerPtr)
3509
3510 class PropagateOnce(object):
3511 """Proxy of C++ PropagateOnce class"""
3512 def __repr__(self):
3513 return "<%s.%s; proxy of C++ wxPropagateOnce instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
3514 def __init__(self, *args, **kwargs):
3515 """__init__(self, Event event) -> PropagateOnce"""
3516 newobj = _core_.new_PropagateOnce(*args, **kwargs)
3517 self.this = newobj.this
3518 self.thisown = 1
3519 del newobj.thisown
3520 def __del__(self, destroy=_core_.delete_PropagateOnce):
3521 """__del__(self)"""
3522 try:
3523 if self.thisown: destroy(self)
3524 except: pass
3525
3526
3527 class PropagateOncePtr(PropagateOnce):
3528 def __init__(self, this):
3529 self.this = this
3530 if not hasattr(self,"thisown"): self.thisown = 0
3531 self.__class__ = PropagateOnce
3532 _core_.PropagateOnce_swigregister(PropagateOncePtr)
3533
3534 #---------------------------------------------------------------------------
3535
3536 class CommandEvent(Event):
3537 """Proxy of C++ CommandEvent class"""
3538 def __repr__(self):
3539 return "<%s.%s; proxy of C++ wxCommandEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
3540 def __init__(self, *args, **kwargs):
3541 """__init__(self, wxEventType commandType=wxEVT_NULL, int winid=0) -> CommandEvent"""
3542 newobj = _core_.new_CommandEvent(*args, **kwargs)
3543 self.this = newobj.this
3544 self.thisown = 1
3545 del newobj.thisown
3546 def GetSelection(*args, **kwargs):
3547 """GetSelection(self) -> int"""
3548 return _core_.CommandEvent_GetSelection(*args, **kwargs)
3549
3550 def SetString(*args, **kwargs):
3551 """SetString(self, String s)"""
3552 return _core_.CommandEvent_SetString(*args, **kwargs)
3553
3554 def GetString(*args, **kwargs):
3555 """GetString(self) -> String"""
3556 return _core_.CommandEvent_GetString(*args, **kwargs)
3557
3558 def IsChecked(*args, **kwargs):
3559 """IsChecked(self) -> bool"""
3560 return _core_.CommandEvent_IsChecked(*args, **kwargs)
3561
3562 Checked = IsChecked
3563 def IsSelection(*args, **kwargs):
3564 """IsSelection(self) -> bool"""
3565 return _core_.CommandEvent_IsSelection(*args, **kwargs)
3566
3567 def SetExtraLong(*args, **kwargs):
3568 """SetExtraLong(self, long extraLong)"""
3569 return _core_.CommandEvent_SetExtraLong(*args, **kwargs)
3570
3571 def GetExtraLong(*args, **kwargs):
3572 """GetExtraLong(self) -> long"""
3573 return _core_.CommandEvent_GetExtraLong(*args, **kwargs)
3574
3575 def SetInt(*args, **kwargs):
3576 """SetInt(self, int i)"""
3577 return _core_.CommandEvent_SetInt(*args, **kwargs)
3578
3579 def GetInt(*args, **kwargs):
3580 """GetInt(self) -> long"""
3581 return _core_.CommandEvent_GetInt(*args, **kwargs)
3582
3583 def Clone(*args, **kwargs):
3584 """Clone(self) -> Event"""
3585 return _core_.CommandEvent_Clone(*args, **kwargs)
3586
3587
3588 class CommandEventPtr(CommandEvent):
3589 def __init__(self, this):
3590 self.this = this
3591 if not hasattr(self,"thisown"): self.thisown = 0
3592 self.__class__ = CommandEvent
3593 _core_.CommandEvent_swigregister(CommandEventPtr)
3594
3595 #---------------------------------------------------------------------------
3596
3597 class NotifyEvent(CommandEvent):
3598 """Proxy of C++ NotifyEvent class"""
3599 def __repr__(self):
3600 return "<%s.%s; proxy of C++ wxNotifyEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
3601 def __init__(self, *args, **kwargs):
3602 """__init__(self, wxEventType commandType=wxEVT_NULL, int winid=0) -> NotifyEvent"""
3603 newobj = _core_.new_NotifyEvent(*args, **kwargs)
3604 self.this = newobj.this
3605 self.thisown = 1
3606 del newobj.thisown
3607 def Veto(*args, **kwargs):
3608 """Veto(self)"""
3609 return _core_.NotifyEvent_Veto(*args, **kwargs)
3610
3611 def Allow(*args, **kwargs):
3612 """Allow(self)"""
3613 return _core_.NotifyEvent_Allow(*args, **kwargs)
3614
3615 def IsAllowed(*args, **kwargs):
3616 """IsAllowed(self) -> bool"""
3617 return _core_.NotifyEvent_IsAllowed(*args, **kwargs)
3618
3619
3620 class NotifyEventPtr(NotifyEvent):
3621 def __init__(self, this):
3622 self.this = this
3623 if not hasattr(self,"thisown"): self.thisown = 0
3624 self.__class__ = NotifyEvent
3625 _core_.NotifyEvent_swigregister(NotifyEventPtr)
3626
3627 #---------------------------------------------------------------------------
3628
3629 class ScrollEvent(CommandEvent):
3630 """Proxy of C++ ScrollEvent class"""
3631 def __repr__(self):
3632 return "<%s.%s; proxy of C++ wxScrollEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
3633 def __init__(self, *args, **kwargs):
3634 """
3635 __init__(self, wxEventType commandType=wxEVT_NULL, int winid=0, int pos=0,
3636 int orient=0) -> ScrollEvent
3637 """
3638 newobj = _core_.new_ScrollEvent(*args, **kwargs)
3639 self.this = newobj.this
3640 self.thisown = 1
3641 del newobj.thisown
3642 def GetOrientation(*args, **kwargs):
3643 """GetOrientation(self) -> int"""
3644 return _core_.ScrollEvent_GetOrientation(*args, **kwargs)
3645
3646 def GetPosition(*args, **kwargs):
3647 """GetPosition(self) -> int"""
3648 return _core_.ScrollEvent_GetPosition(*args, **kwargs)
3649
3650 def SetOrientation(*args, **kwargs):
3651 """SetOrientation(self, int orient)"""
3652 return _core_.ScrollEvent_SetOrientation(*args, **kwargs)
3653
3654 def SetPosition(*args, **kwargs):
3655 """SetPosition(self, int pos)"""
3656 return _core_.ScrollEvent_SetPosition(*args, **kwargs)
3657
3658
3659 class ScrollEventPtr(ScrollEvent):
3660 def __init__(self, this):
3661 self.this = this
3662 if not hasattr(self,"thisown"): self.thisown = 0
3663 self.__class__ = ScrollEvent
3664 _core_.ScrollEvent_swigregister(ScrollEventPtr)
3665
3666 #---------------------------------------------------------------------------
3667
3668 class ScrollWinEvent(Event):
3669 """Proxy of C++ ScrollWinEvent class"""
3670 def __repr__(self):
3671 return "<%s.%s; proxy of C++ wxScrollWinEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
3672 def __init__(self, *args, **kwargs):
3673 """__init__(self, wxEventType commandType=wxEVT_NULL, int pos=0, int orient=0) -> ScrollWinEvent"""
3674 newobj = _core_.new_ScrollWinEvent(*args, **kwargs)
3675 self.this = newobj.this
3676 self.thisown = 1
3677 del newobj.thisown
3678 def GetOrientation(*args, **kwargs):
3679 """GetOrientation(self) -> int"""
3680 return _core_.ScrollWinEvent_GetOrientation(*args, **kwargs)
3681
3682 def GetPosition(*args, **kwargs):
3683 """GetPosition(self) -> int"""
3684 return _core_.ScrollWinEvent_GetPosition(*args, **kwargs)
3685
3686 def SetOrientation(*args, **kwargs):
3687 """SetOrientation(self, int orient)"""
3688 return _core_.ScrollWinEvent_SetOrientation(*args, **kwargs)
3689
3690 def SetPosition(*args, **kwargs):
3691 """SetPosition(self, int pos)"""
3692 return _core_.ScrollWinEvent_SetPosition(*args, **kwargs)
3693
3694
3695 class ScrollWinEventPtr(ScrollWinEvent):
3696 def __init__(self, this):
3697 self.this = this
3698 if not hasattr(self,"thisown"): self.thisown = 0
3699 self.__class__ = ScrollWinEvent
3700 _core_.ScrollWinEvent_swigregister(ScrollWinEventPtr)
3701
3702 #---------------------------------------------------------------------------
3703
3704 MOUSE_BTN_ANY = _core_.MOUSE_BTN_ANY
3705 MOUSE_BTN_NONE = _core_.MOUSE_BTN_NONE
3706 MOUSE_BTN_LEFT = _core_.MOUSE_BTN_LEFT
3707 MOUSE_BTN_MIDDLE = _core_.MOUSE_BTN_MIDDLE
3708 MOUSE_BTN_RIGHT = _core_.MOUSE_BTN_RIGHT
3709 class MouseEvent(Event):
3710 """Proxy of C++ MouseEvent class"""
3711 def __repr__(self):
3712 return "<%s.%s; proxy of C++ wxMouseEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
3713 def __init__(self, *args, **kwargs):
3714 """__init__(self, wxEventType mouseType=wxEVT_NULL) -> MouseEvent"""
3715 newobj = _core_.new_MouseEvent(*args, **kwargs)
3716 self.this = newobj.this
3717 self.thisown = 1
3718 del newobj.thisown
3719 def IsButton(*args, **kwargs):
3720 """IsButton(self) -> bool"""
3721 return _core_.MouseEvent_IsButton(*args, **kwargs)
3722
3723 def ButtonDown(*args, **kwargs):
3724 """ButtonDown(self, int but=MOUSE_BTN_ANY) -> bool"""
3725 return _core_.MouseEvent_ButtonDown(*args, **kwargs)
3726
3727 def ButtonDClick(*args, **kwargs):
3728 """ButtonDClick(self, int but=MOUSE_BTN_ANY) -> bool"""
3729 return _core_.MouseEvent_ButtonDClick(*args, **kwargs)
3730
3731 def ButtonUp(*args, **kwargs):
3732 """ButtonUp(self, int but=MOUSE_BTN_ANY) -> bool"""
3733 return _core_.MouseEvent_ButtonUp(*args, **kwargs)
3734
3735 def Button(*args, **kwargs):
3736 """Button(self, int but) -> bool"""
3737 return _core_.MouseEvent_Button(*args, **kwargs)
3738
3739 def ButtonIsDown(*args, **kwargs):
3740 """ButtonIsDown(self, int but) -> bool"""
3741 return _core_.MouseEvent_ButtonIsDown(*args, **kwargs)
3742
3743 def GetButton(*args, **kwargs):
3744 """GetButton(self) -> int"""
3745 return _core_.MouseEvent_GetButton(*args, **kwargs)
3746
3747 def ControlDown(*args, **kwargs):
3748 """ControlDown(self) -> bool"""
3749 return _core_.MouseEvent_ControlDown(*args, **kwargs)
3750
3751 def MetaDown(*args, **kwargs):
3752 """MetaDown(self) -> bool"""
3753 return _core_.MouseEvent_MetaDown(*args, **kwargs)
3754
3755 def AltDown(*args, **kwargs):
3756 """AltDown(self) -> bool"""
3757 return _core_.MouseEvent_AltDown(*args, **kwargs)
3758
3759 def ShiftDown(*args, **kwargs):
3760 """ShiftDown(self) -> bool"""
3761 return _core_.MouseEvent_ShiftDown(*args, **kwargs)
3762
3763 def CmdDown(*args, **kwargs):
3764 """
3765 CmdDown(self) -> bool
3766
3767 "Cmd" is a pseudo key which is the same as Control for PC and Unix
3768 platforms but the special "Apple" (a.k.a as "Command") key on
3769 Macs: it makes often sense to use it instead of, say, `ControlDown`
3770 because Cmd key is used for the same thing under Mac as Ctrl
3771 elsewhere. The Ctrl still exists, it's just not used for this
3772 purpose. So for non-Mac platforms this is the same as `ControlDown`
3773 and Macs this is the same as `MetaDown`.
3774 """
3775 return _core_.MouseEvent_CmdDown(*args, **kwargs)
3776
3777 def LeftDown(*args, **kwargs):
3778 """LeftDown(self) -> bool"""
3779 return _core_.MouseEvent_LeftDown(*args, **kwargs)
3780
3781 def MiddleDown(*args, **kwargs):
3782 """MiddleDown(self) -> bool"""
3783 return _core_.MouseEvent_MiddleDown(*args, **kwargs)
3784
3785 def RightDown(*args, **kwargs):
3786 """RightDown(self) -> bool"""
3787 return _core_.MouseEvent_RightDown(*args, **kwargs)
3788
3789 def LeftUp(*args, **kwargs):
3790 """LeftUp(self) -> bool"""
3791 return _core_.MouseEvent_LeftUp(*args, **kwargs)
3792
3793 def MiddleUp(*args, **kwargs):
3794 """MiddleUp(self) -> bool"""
3795 return _core_.MouseEvent_MiddleUp(*args, **kwargs)
3796
3797 def RightUp(*args, **kwargs):
3798 """RightUp(self) -> bool"""
3799 return _core_.MouseEvent_RightUp(*args, **kwargs)
3800
3801 def LeftDClick(*args, **kwargs):
3802 """LeftDClick(self) -> bool"""
3803 return _core_.MouseEvent_LeftDClick(*args, **kwargs)
3804
3805 def MiddleDClick(*args, **kwargs):
3806 """MiddleDClick(self) -> bool"""
3807 return _core_.MouseEvent_MiddleDClick(*args, **kwargs)
3808
3809 def RightDClick(*args, **kwargs):
3810 """RightDClick(self) -> bool"""
3811 return _core_.MouseEvent_RightDClick(*args, **kwargs)
3812
3813 def LeftIsDown(*args, **kwargs):
3814 """LeftIsDown(self) -> bool"""
3815 return _core_.MouseEvent_LeftIsDown(*args, **kwargs)
3816
3817 def MiddleIsDown(*args, **kwargs):
3818 """MiddleIsDown(self) -> bool"""
3819 return _core_.MouseEvent_MiddleIsDown(*args, **kwargs)
3820
3821 def RightIsDown(*args, **kwargs):
3822 """RightIsDown(self) -> bool"""
3823 return _core_.MouseEvent_RightIsDown(*args, **kwargs)
3824
3825 def Dragging(*args, **kwargs):
3826 """Dragging(self) -> bool"""
3827 return _core_.MouseEvent_Dragging(*args, **kwargs)
3828
3829 def Moving(*args, **kwargs):
3830 """Moving(self) -> bool"""
3831 return _core_.MouseEvent_Moving(*args, **kwargs)
3832
3833 def Entering(*args, **kwargs):
3834 """Entering(self) -> bool"""
3835 return _core_.MouseEvent_Entering(*args, **kwargs)
3836
3837 def Leaving(*args, **kwargs):
3838 """Leaving(self) -> bool"""
3839 return _core_.MouseEvent_Leaving(*args, **kwargs)
3840
3841 def GetPosition(*args, **kwargs):
3842 """
3843 GetPosition(self) -> Point
3844
3845 Returns the position of the mouse in window coordinates when the event
3846 happened.
3847 """
3848 return _core_.MouseEvent_GetPosition(*args, **kwargs)
3849
3850 def GetPositionTuple(*args, **kwargs):
3851 """
3852 GetPositionTuple() -> (x,y)
3853
3854 Returns the position of the mouse in window coordinates when the event
3855 happened.
3856 """
3857 return _core_.MouseEvent_GetPositionTuple(*args, **kwargs)
3858
3859 def GetLogicalPosition(*args, **kwargs):
3860 """GetLogicalPosition(self, DC dc) -> Point"""
3861 return _core_.MouseEvent_GetLogicalPosition(*args, **kwargs)
3862
3863 def GetX(*args, **kwargs):
3864 """GetX(self) -> int"""
3865 return _core_.MouseEvent_GetX(*args, **kwargs)
3866
3867 def GetY(*args, **kwargs):
3868 """GetY(self) -> int"""
3869 return _core_.MouseEvent_GetY(*args, **kwargs)
3870
3871 def GetWheelRotation(*args, **kwargs):
3872 """GetWheelRotation(self) -> int"""
3873 return _core_.MouseEvent_GetWheelRotation(*args, **kwargs)
3874
3875 def GetWheelDelta(*args, **kwargs):
3876 """GetWheelDelta(self) -> int"""
3877 return _core_.MouseEvent_GetWheelDelta(*args, **kwargs)
3878
3879 def GetLinesPerAction(*args, **kwargs):
3880 """GetLinesPerAction(self) -> int"""
3881 return _core_.MouseEvent_GetLinesPerAction(*args, **kwargs)
3882
3883 def IsPageScroll(*args, **kwargs):
3884 """IsPageScroll(self) -> bool"""
3885 return _core_.MouseEvent_IsPageScroll(*args, **kwargs)
3886
3887 m_x = property(_core_.MouseEvent_m_x_get, _core_.MouseEvent_m_x_set)
3888 m_y = property(_core_.MouseEvent_m_y_get, _core_.MouseEvent_m_y_set)
3889 m_leftDown = property(_core_.MouseEvent_m_leftDown_get, _core_.MouseEvent_m_leftDown_set)
3890 m_middleDown = property(_core_.MouseEvent_m_middleDown_get, _core_.MouseEvent_m_middleDown_set)
3891 m_rightDown = property(_core_.MouseEvent_m_rightDown_get, _core_.MouseEvent_m_rightDown_set)
3892 m_controlDown = property(_core_.MouseEvent_m_controlDown_get, _core_.MouseEvent_m_controlDown_set)
3893 m_shiftDown = property(_core_.MouseEvent_m_shiftDown_get, _core_.MouseEvent_m_shiftDown_set)
3894 m_altDown = property(_core_.MouseEvent_m_altDown_get, _core_.MouseEvent_m_altDown_set)
3895 m_metaDown = property(_core_.MouseEvent_m_metaDown_get, _core_.MouseEvent_m_metaDown_set)
3896 m_wheelRotation = property(_core_.MouseEvent_m_wheelRotation_get, _core_.MouseEvent_m_wheelRotation_set)
3897 m_wheelDelta = property(_core_.MouseEvent_m_wheelDelta_get, _core_.MouseEvent_m_wheelDelta_set)
3898 m_linesPerAction = property(_core_.MouseEvent_m_linesPerAction_get, _core_.MouseEvent_m_linesPerAction_set)
3899
3900 class MouseEventPtr(MouseEvent):
3901 def __init__(self, this):
3902 self.this = this
3903 if not hasattr(self,"thisown"): self.thisown = 0
3904 self.__class__ = MouseEvent
3905 _core_.MouseEvent_swigregister(MouseEventPtr)
3906
3907 #---------------------------------------------------------------------------
3908
3909 class SetCursorEvent(Event):
3910 """Proxy of C++ SetCursorEvent class"""
3911 def __repr__(self):
3912 return "<%s.%s; proxy of C++ wxSetCursorEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
3913 def __init__(self, *args, **kwargs):
3914 """__init__(self, int x=0, int y=0) -> SetCursorEvent"""
3915 newobj = _core_.new_SetCursorEvent(*args, **kwargs)
3916 self.this = newobj.this
3917 self.thisown = 1
3918 del newobj.thisown
3919 def GetX(*args, **kwargs):
3920 """GetX(self) -> int"""
3921 return _core_.SetCursorEvent_GetX(*args, **kwargs)
3922
3923 def GetY(*args, **kwargs):
3924 """GetY(self) -> int"""
3925 return _core_.SetCursorEvent_GetY(*args, **kwargs)
3926
3927 def SetCursor(*args, **kwargs):
3928 """SetCursor(self, Cursor cursor)"""
3929 return _core_.SetCursorEvent_SetCursor(*args, **kwargs)
3930
3931 def GetCursor(*args, **kwargs):
3932 """GetCursor(self) -> Cursor"""
3933 return _core_.SetCursorEvent_GetCursor(*args, **kwargs)
3934
3935 def HasCursor(*args, **kwargs):
3936 """HasCursor(self) -> bool"""
3937 return _core_.SetCursorEvent_HasCursor(*args, **kwargs)
3938
3939
3940 class SetCursorEventPtr(SetCursorEvent):
3941 def __init__(self, this):
3942 self.this = this
3943 if not hasattr(self,"thisown"): self.thisown = 0
3944 self.__class__ = SetCursorEvent
3945 _core_.SetCursorEvent_swigregister(SetCursorEventPtr)
3946
3947 #---------------------------------------------------------------------------
3948
3949 class KeyEvent(Event):
3950 """Proxy of C++ KeyEvent class"""
3951 def __repr__(self):
3952 return "<%s.%s; proxy of C++ wxKeyEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
3953 def __init__(self, *args, **kwargs):
3954 """__init__(self, wxEventType keyType=wxEVT_NULL) -> KeyEvent"""
3955 newobj = _core_.new_KeyEvent(*args, **kwargs)
3956 self.this = newobj.this
3957 self.thisown = 1
3958 del newobj.thisown
3959 def ControlDown(*args, **kwargs):
3960 """ControlDown(self) -> bool"""
3961 return _core_.KeyEvent_ControlDown(*args, **kwargs)
3962
3963 def MetaDown(*args, **kwargs):
3964 """MetaDown(self) -> bool"""
3965 return _core_.KeyEvent_MetaDown(*args, **kwargs)
3966
3967 def AltDown(*args, **kwargs):
3968 """AltDown(self) -> bool"""
3969 return _core_.KeyEvent_AltDown(*args, **kwargs)
3970
3971 def ShiftDown(*args, **kwargs):
3972 """ShiftDown(self) -> bool"""
3973 return _core_.KeyEvent_ShiftDown(*args, **kwargs)
3974
3975 def CmdDown(*args, **kwargs):
3976 """
3977 CmdDown(self) -> bool
3978
3979 "Cmd" is a pseudo key which is the same as Control for PC and Unix
3980 platforms but the special "Apple" (a.k.a as "Command") key on
3981 Macs: it makes often sense to use it instead of, say, `ControlDown`
3982 because Cmd key is used for the same thing under Mac as Ctrl
3983 elsewhere. The Ctrl still exists, it's just not used for this
3984 purpose. So for non-Mac platforms this is the same as `ControlDown`
3985 and Macs this is the same as `MetaDown`.
3986 """
3987 return _core_.KeyEvent_CmdDown(*args, **kwargs)
3988
3989 def HasModifiers(*args, **kwargs):
3990 """HasModifiers(self) -> bool"""
3991 return _core_.KeyEvent_HasModifiers(*args, **kwargs)
3992
3993 def GetKeyCode(*args, **kwargs):
3994 """GetKeyCode(self) -> int"""
3995 return _core_.KeyEvent_GetKeyCode(*args, **kwargs)
3996
3997 KeyCode = GetKeyCode
3998 def GetUnicodeKey(*args, **kwargs):
3999 """GetUnicodeKey(self) -> int"""
4000 return _core_.KeyEvent_GetUnicodeKey(*args, **kwargs)
4001
4002 GetUniChar = GetUnicodeKey
4003 def GetRawKeyCode(*args, **kwargs):
4004 """GetRawKeyCode(self) -> unsigned int"""
4005 return _core_.KeyEvent_GetRawKeyCode(*args, **kwargs)
4006
4007 def GetRawKeyFlags(*args, **kwargs):
4008 """GetRawKeyFlags(self) -> unsigned int"""
4009 return _core_.KeyEvent_GetRawKeyFlags(*args, **kwargs)
4010
4011 def GetPosition(*args, **kwargs):
4012 """
4013 GetPosition(self) -> Point
4014
4015 Find the position of the event.
4016 """
4017 return _core_.KeyEvent_GetPosition(*args, **kwargs)
4018
4019 def GetPositionTuple(*args, **kwargs):
4020 """
4021 GetPositionTuple() -> (x,y)
4022
4023 Find the position of the event.
4024 """
4025 return _core_.KeyEvent_GetPositionTuple(*args, **kwargs)
4026
4027 def GetX(*args, **kwargs):
4028 """GetX(self) -> int"""
4029 return _core_.KeyEvent_GetX(*args, **kwargs)
4030
4031 def GetY(*args, **kwargs):
4032 """GetY(self) -> int"""
4033 return _core_.KeyEvent_GetY(*args, **kwargs)
4034
4035 m_x = property(_core_.KeyEvent_m_x_get, _core_.KeyEvent_m_x_set)
4036 m_y = property(_core_.KeyEvent_m_y_get, _core_.KeyEvent_m_y_set)
4037 m_keyCode = property(_core_.KeyEvent_m_keyCode_get, _core_.KeyEvent_m_keyCode_set)
4038 m_controlDown = property(_core_.KeyEvent_m_controlDown_get, _core_.KeyEvent_m_controlDown_set)
4039 m_shiftDown = property(_core_.KeyEvent_m_shiftDown_get, _core_.KeyEvent_m_shiftDown_set)
4040 m_altDown = property(_core_.KeyEvent_m_altDown_get, _core_.KeyEvent_m_altDown_set)
4041 m_metaDown = property(_core_.KeyEvent_m_metaDown_get, _core_.KeyEvent_m_metaDown_set)
4042 m_scanCode = property(_core_.KeyEvent_m_scanCode_get, _core_.KeyEvent_m_scanCode_set)
4043 m_rawCode = property(_core_.KeyEvent_m_rawCode_get, _core_.KeyEvent_m_rawCode_set)
4044 m_rawFlags = property(_core_.KeyEvent_m_rawFlags_get, _core_.KeyEvent_m_rawFlags_set)
4045
4046 class KeyEventPtr(KeyEvent):
4047 def __init__(self, this):
4048 self.this = this
4049 if not hasattr(self,"thisown"): self.thisown = 0
4050 self.__class__ = KeyEvent
4051 _core_.KeyEvent_swigregister(KeyEventPtr)
4052
4053 #---------------------------------------------------------------------------
4054
4055 class SizeEvent(Event):
4056 """Proxy of C++ SizeEvent class"""
4057 def __repr__(self):
4058 return "<%s.%s; proxy of C++ wxSizeEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
4059 def __init__(self, *args, **kwargs):
4060 """__init__(self, Size sz=DefaultSize, int winid=0) -> SizeEvent"""
4061 newobj = _core_.new_SizeEvent(*args, **kwargs)
4062 self.this = newobj.this
4063 self.thisown = 1
4064 del newobj.thisown
4065 def GetSize(*args, **kwargs):
4066 """GetSize(self) -> Size"""
4067 return _core_.SizeEvent_GetSize(*args, **kwargs)
4068
4069 def GetRect(*args, **kwargs):
4070 """GetRect(self) -> Rect"""
4071 return _core_.SizeEvent_GetRect(*args, **kwargs)
4072
4073 def SetRect(*args, **kwargs):
4074 """SetRect(self, Rect rect)"""
4075 return _core_.SizeEvent_SetRect(*args, **kwargs)
4076
4077 def SetSize(*args, **kwargs):
4078 """SetSize(self, Size size)"""
4079 return _core_.SizeEvent_SetSize(*args, **kwargs)
4080
4081 m_size = property(_core_.SizeEvent_m_size_get, _core_.SizeEvent_m_size_set)
4082 m_rect = property(_core_.SizeEvent_m_rect_get, _core_.SizeEvent_m_rect_set)
4083
4084 class SizeEventPtr(SizeEvent):
4085 def __init__(self, this):
4086 self.this = this
4087 if not hasattr(self,"thisown"): self.thisown = 0
4088 self.__class__ = SizeEvent
4089 _core_.SizeEvent_swigregister(SizeEventPtr)
4090
4091 #---------------------------------------------------------------------------
4092
4093 class MoveEvent(Event):
4094 """Proxy of C++ MoveEvent class"""
4095 def __repr__(self):
4096 return "<%s.%s; proxy of C++ wxMoveEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
4097 def __init__(self, *args, **kwargs):
4098 """__init__(self, Point pos=DefaultPosition, int winid=0) -> MoveEvent"""
4099 newobj = _core_.new_MoveEvent(*args, **kwargs)
4100 self.this = newobj.this
4101 self.thisown = 1
4102 del newobj.thisown
4103 def GetPosition(*args, **kwargs):
4104 """GetPosition(self) -> Point"""
4105 return _core_.MoveEvent_GetPosition(*args, **kwargs)
4106
4107 def GetRect(*args, **kwargs):
4108 """GetRect(self) -> Rect"""
4109 return _core_.MoveEvent_GetRect(*args, **kwargs)
4110
4111 def SetRect(*args, **kwargs):
4112 """SetRect(self, Rect rect)"""
4113 return _core_.MoveEvent_SetRect(*args, **kwargs)
4114
4115 def SetPosition(*args, **kwargs):
4116 """SetPosition(self, Point pos)"""
4117 return _core_.MoveEvent_SetPosition(*args, **kwargs)
4118
4119 m_pos = property(GetPosition, SetPosition)
4120 m_rect = property(GetRect, SetRect)
4121
4122
4123 class MoveEventPtr(MoveEvent):
4124 def __init__(self, this):
4125 self.this = this
4126 if not hasattr(self,"thisown"): self.thisown = 0
4127 self.__class__ = MoveEvent
4128 _core_.MoveEvent_swigregister(MoveEventPtr)
4129
4130 #---------------------------------------------------------------------------
4131
4132 class PaintEvent(Event):
4133 """Proxy of C++ PaintEvent class"""
4134 def __repr__(self):
4135 return "<%s.%s; proxy of C++ wxPaintEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
4136 def __init__(self, *args, **kwargs):
4137 """__init__(self, int Id=0) -> PaintEvent"""
4138 newobj = _core_.new_PaintEvent(*args, **kwargs)
4139 self.this = newobj.this
4140 self.thisown = 1
4141 del newobj.thisown
4142
4143 class PaintEventPtr(PaintEvent):
4144 def __init__(self, this):
4145 self.this = this
4146 if not hasattr(self,"thisown"): self.thisown = 0
4147 self.__class__ = PaintEvent
4148 _core_.PaintEvent_swigregister(PaintEventPtr)
4149
4150 class NcPaintEvent(Event):
4151 """Proxy of C++ NcPaintEvent class"""
4152 def __repr__(self):
4153 return "<%s.%s; proxy of C++ wxNcPaintEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
4154 def __init__(self, *args, **kwargs):
4155 """__init__(self, int winid=0) -> NcPaintEvent"""
4156 newobj = _core_.new_NcPaintEvent(*args, **kwargs)
4157 self.this = newobj.this
4158 self.thisown = 1
4159 del newobj.thisown
4160
4161 class NcPaintEventPtr(NcPaintEvent):
4162 def __init__(self, this):
4163 self.this = this
4164 if not hasattr(self,"thisown"): self.thisown = 0
4165 self.__class__ = NcPaintEvent
4166 _core_.NcPaintEvent_swigregister(NcPaintEventPtr)
4167
4168 #---------------------------------------------------------------------------
4169
4170 class EraseEvent(Event):
4171 """Proxy of C++ EraseEvent class"""
4172 def __repr__(self):
4173 return "<%s.%s; proxy of C++ wxEraseEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
4174 def __init__(self, *args, **kwargs):
4175 """__init__(self, int Id=0, DC dc=(wxDC *) NULL) -> EraseEvent"""
4176 newobj = _core_.new_EraseEvent(*args, **kwargs)
4177 self.this = newobj.this
4178 self.thisown = 1
4179 del newobj.thisown
4180 def GetDC(*args, **kwargs):
4181 """GetDC(self) -> DC"""
4182 return _core_.EraseEvent_GetDC(*args, **kwargs)
4183
4184
4185 class EraseEventPtr(EraseEvent):
4186 def __init__(self, this):
4187 self.this = this
4188 if not hasattr(self,"thisown"): self.thisown = 0
4189 self.__class__ = EraseEvent
4190 _core_.EraseEvent_swigregister(EraseEventPtr)
4191
4192 #---------------------------------------------------------------------------
4193
4194 class FocusEvent(Event):
4195 """Proxy of C++ FocusEvent class"""
4196 def __repr__(self):
4197 return "<%s.%s; proxy of C++ wxFocusEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
4198 def __init__(self, *args, **kwargs):
4199 """__init__(self, wxEventType type=wxEVT_NULL, int winid=0) -> FocusEvent"""
4200 newobj = _core_.new_FocusEvent(*args, **kwargs)
4201 self.this = newobj.this
4202 self.thisown = 1
4203 del newobj.thisown
4204 def GetWindow(*args, **kwargs):
4205 """GetWindow(self) -> Window"""
4206 return _core_.FocusEvent_GetWindow(*args, **kwargs)
4207
4208 def SetWindow(*args, **kwargs):
4209 """SetWindow(self, Window win)"""
4210 return _core_.FocusEvent_SetWindow(*args, **kwargs)
4211
4212
4213 class FocusEventPtr(FocusEvent):
4214 def __init__(self, this):
4215 self.this = this
4216 if not hasattr(self,"thisown"): self.thisown = 0
4217 self.__class__ = FocusEvent
4218 _core_.FocusEvent_swigregister(FocusEventPtr)
4219
4220 #---------------------------------------------------------------------------
4221
4222 class ChildFocusEvent(CommandEvent):
4223 """Proxy of C++ ChildFocusEvent class"""
4224 def __repr__(self):
4225 return "<%s.%s; proxy of C++ wxChildFocusEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
4226 def __init__(self, *args, **kwargs):
4227 """__init__(self, Window win=None) -> ChildFocusEvent"""
4228 newobj = _core_.new_ChildFocusEvent(*args, **kwargs)
4229 self.this = newobj.this
4230 self.thisown = 1
4231 del newobj.thisown
4232 def GetWindow(*args, **kwargs):
4233 """GetWindow(self) -> Window"""
4234 return _core_.ChildFocusEvent_GetWindow(*args, **kwargs)
4235
4236
4237 class ChildFocusEventPtr(ChildFocusEvent):
4238 def __init__(self, this):
4239 self.this = this
4240 if not hasattr(self,"thisown"): self.thisown = 0
4241 self.__class__ = ChildFocusEvent
4242 _core_.ChildFocusEvent_swigregister(ChildFocusEventPtr)
4243
4244 #---------------------------------------------------------------------------
4245
4246 class ActivateEvent(Event):
4247 """Proxy of C++ ActivateEvent class"""
4248 def __repr__(self):
4249 return "<%s.%s; proxy of C++ wxActivateEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
4250 def __init__(self, *args, **kwargs):
4251 """__init__(self, wxEventType type=wxEVT_NULL, bool active=True, int Id=0) -> ActivateEvent"""
4252 newobj = _core_.new_ActivateEvent(*args, **kwargs)
4253 self.this = newobj.this
4254 self.thisown = 1
4255 del newobj.thisown
4256 def GetActive(*args, **kwargs):
4257 """GetActive(self) -> bool"""
4258 return _core_.ActivateEvent_GetActive(*args, **kwargs)
4259
4260
4261 class ActivateEventPtr(ActivateEvent):
4262 def __init__(self, this):
4263 self.this = this
4264 if not hasattr(self,"thisown"): self.thisown = 0
4265 self.__class__ = ActivateEvent
4266 _core_.ActivateEvent_swigregister(ActivateEventPtr)
4267
4268 #---------------------------------------------------------------------------
4269
4270 class InitDialogEvent(Event):
4271 """Proxy of C++ InitDialogEvent class"""
4272 def __repr__(self):
4273 return "<%s.%s; proxy of C++ wxInitDialogEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
4274 def __init__(self, *args, **kwargs):
4275 """__init__(self, int Id=0) -> InitDialogEvent"""
4276 newobj = _core_.new_InitDialogEvent(*args, **kwargs)
4277 self.this = newobj.this
4278 self.thisown = 1
4279 del newobj.thisown
4280
4281 class InitDialogEventPtr(InitDialogEvent):
4282 def __init__(self, this):
4283 self.this = this
4284 if not hasattr(self,"thisown"): self.thisown = 0
4285 self.__class__ = InitDialogEvent
4286 _core_.InitDialogEvent_swigregister(InitDialogEventPtr)
4287
4288 #---------------------------------------------------------------------------
4289
4290 class MenuEvent(Event):
4291 """Proxy of C++ MenuEvent class"""
4292 def __repr__(self):
4293 return "<%s.%s; proxy of C++ wxMenuEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
4294 def __init__(self, *args, **kwargs):
4295 """__init__(self, wxEventType type=wxEVT_NULL, int winid=0, Menu menu=None) -> MenuEvent"""
4296 newobj = _core_.new_MenuEvent(*args, **kwargs)
4297 self.this = newobj.this
4298 self.thisown = 1
4299 del newobj.thisown
4300 def GetMenuId(*args, **kwargs):
4301 """GetMenuId(self) -> int"""
4302 return _core_.MenuEvent_GetMenuId(*args, **kwargs)
4303
4304 def IsPopup(*args, **kwargs):
4305 """IsPopup(self) -> bool"""
4306 return _core_.MenuEvent_IsPopup(*args, **kwargs)
4307
4308 def GetMenu(*args, **kwargs):
4309 """GetMenu(self) -> Menu"""
4310 return _core_.MenuEvent_GetMenu(*args, **kwargs)
4311
4312
4313 class MenuEventPtr(MenuEvent):
4314 def __init__(self, this):
4315 self.this = this
4316 if not hasattr(self,"thisown"): self.thisown = 0
4317 self.__class__ = MenuEvent
4318 _core_.MenuEvent_swigregister(MenuEventPtr)
4319
4320 #---------------------------------------------------------------------------
4321
4322 class CloseEvent(Event):
4323 """Proxy of C++ CloseEvent class"""
4324 def __repr__(self):
4325 return "<%s.%s; proxy of C++ wxCloseEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
4326 def __init__(self, *args, **kwargs):
4327 """__init__(self, wxEventType type=wxEVT_NULL, int winid=0) -> CloseEvent"""
4328 newobj = _core_.new_CloseEvent(*args, **kwargs)
4329 self.this = newobj.this
4330 self.thisown = 1
4331 del newobj.thisown
4332 def SetLoggingOff(*args, **kwargs):
4333 """SetLoggingOff(self, bool logOff)"""
4334 return _core_.CloseEvent_SetLoggingOff(*args, **kwargs)
4335
4336 def GetLoggingOff(*args, **kwargs):
4337 """GetLoggingOff(self) -> bool"""
4338 return _core_.CloseEvent_GetLoggingOff(*args, **kwargs)
4339
4340 def Veto(*args, **kwargs):
4341 """Veto(self, bool veto=True)"""
4342 return _core_.CloseEvent_Veto(*args, **kwargs)
4343
4344 def SetCanVeto(*args, **kwargs):
4345 """SetCanVeto(self, bool canVeto)"""
4346 return _core_.CloseEvent_SetCanVeto(*args, **kwargs)
4347
4348 def CanVeto(*args, **kwargs):
4349 """CanVeto(self) -> bool"""
4350 return _core_.CloseEvent_CanVeto(*args, **kwargs)
4351
4352 def GetVeto(*args, **kwargs):
4353 """GetVeto(self) -> bool"""
4354 return _core_.CloseEvent_GetVeto(*args, **kwargs)
4355
4356
4357 class CloseEventPtr(CloseEvent):
4358 def __init__(self, this):
4359 self.this = this
4360 if not hasattr(self,"thisown"): self.thisown = 0
4361 self.__class__ = CloseEvent
4362 _core_.CloseEvent_swigregister(CloseEventPtr)
4363
4364 #---------------------------------------------------------------------------
4365
4366 class ShowEvent(Event):
4367 """Proxy of C++ ShowEvent class"""
4368 def __repr__(self):
4369 return "<%s.%s; proxy of C++ wxShowEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
4370 def __init__(self, *args, **kwargs):
4371 """__init__(self, int winid=0, bool show=False) -> ShowEvent"""
4372 newobj = _core_.new_ShowEvent(*args, **kwargs)
4373 self.this = newobj.this
4374 self.thisown = 1
4375 del newobj.thisown
4376 def SetShow(*args, **kwargs):
4377 """SetShow(self, bool show)"""
4378 return _core_.ShowEvent_SetShow(*args, **kwargs)
4379
4380 def GetShow(*args, **kwargs):
4381 """GetShow(self) -> bool"""
4382 return _core_.ShowEvent_GetShow(*args, **kwargs)
4383
4384
4385 class ShowEventPtr(ShowEvent):
4386 def __init__(self, this):
4387 self.this = this
4388 if not hasattr(self,"thisown"): self.thisown = 0
4389 self.__class__ = ShowEvent
4390 _core_.ShowEvent_swigregister(ShowEventPtr)
4391
4392 #---------------------------------------------------------------------------
4393
4394 class IconizeEvent(Event):
4395 """Proxy of C++ IconizeEvent class"""
4396 def __repr__(self):
4397 return "<%s.%s; proxy of C++ wxIconizeEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
4398 def __init__(self, *args, **kwargs):
4399 """__init__(self, int id=0, bool iconized=True) -> IconizeEvent"""
4400 newobj = _core_.new_IconizeEvent(*args, **kwargs)
4401 self.this = newobj.this
4402 self.thisown = 1
4403 del newobj.thisown
4404 def Iconized(*args, **kwargs):
4405 """Iconized(self) -> bool"""
4406 return _core_.IconizeEvent_Iconized(*args, **kwargs)
4407
4408
4409 class IconizeEventPtr(IconizeEvent):
4410 def __init__(self, this):
4411 self.this = this
4412 if not hasattr(self,"thisown"): self.thisown = 0
4413 self.__class__ = IconizeEvent
4414 _core_.IconizeEvent_swigregister(IconizeEventPtr)
4415
4416 #---------------------------------------------------------------------------
4417
4418 class MaximizeEvent(Event):
4419 """Proxy of C++ MaximizeEvent class"""
4420 def __repr__(self):
4421 return "<%s.%s; proxy of C++ wxMaximizeEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
4422 def __init__(self, *args, **kwargs):
4423 """__init__(self, int id=0) -> MaximizeEvent"""
4424 newobj = _core_.new_MaximizeEvent(*args, **kwargs)
4425 self.this = newobj.this
4426 self.thisown = 1
4427 del newobj.thisown
4428
4429 class MaximizeEventPtr(MaximizeEvent):
4430 def __init__(self, this):
4431 self.this = this
4432 if not hasattr(self,"thisown"): self.thisown = 0
4433 self.__class__ = MaximizeEvent
4434 _core_.MaximizeEvent_swigregister(MaximizeEventPtr)
4435
4436 #---------------------------------------------------------------------------
4437
4438 class DropFilesEvent(Event):
4439 """Proxy of C++ DropFilesEvent class"""
4440 def __init__(self): raise RuntimeError, "No constructor defined"
4441 def __repr__(self):
4442 return "<%s.%s; proxy of C++ wxDropFilesEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
4443 def GetPosition(*args, **kwargs):
4444 """GetPosition(self) -> Point"""
4445 return _core_.DropFilesEvent_GetPosition(*args, **kwargs)
4446
4447 def GetNumberOfFiles(*args, **kwargs):
4448 """GetNumberOfFiles(self) -> int"""
4449 return _core_.DropFilesEvent_GetNumberOfFiles(*args, **kwargs)
4450
4451 def GetFiles(*args, **kwargs):
4452 """GetFiles(self) -> PyObject"""
4453 return _core_.DropFilesEvent_GetFiles(*args, **kwargs)
4454
4455
4456 class DropFilesEventPtr(DropFilesEvent):
4457 def __init__(self, this):
4458 self.this = this
4459 if not hasattr(self,"thisown"): self.thisown = 0
4460 self.__class__ = DropFilesEvent
4461 _core_.DropFilesEvent_swigregister(DropFilesEventPtr)
4462
4463 #---------------------------------------------------------------------------
4464
4465 UPDATE_UI_PROCESS_ALL = _core_.UPDATE_UI_PROCESS_ALL
4466 UPDATE_UI_PROCESS_SPECIFIED = _core_.UPDATE_UI_PROCESS_SPECIFIED
4467 class UpdateUIEvent(CommandEvent):
4468 """Proxy of C++ UpdateUIEvent class"""
4469 def __repr__(self):
4470 return "<%s.%s; proxy of C++ wxUpdateUIEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
4471 def __init__(self, *args, **kwargs):
4472 """__init__(self, int commandId=0) -> UpdateUIEvent"""
4473 newobj = _core_.new_UpdateUIEvent(*args, **kwargs)
4474 self.this = newobj.this
4475 self.thisown = 1
4476 del newobj.thisown
4477 def GetChecked(*args, **kwargs):
4478 """GetChecked(self) -> bool"""
4479 return _core_.UpdateUIEvent_GetChecked(*args, **kwargs)
4480
4481 def GetEnabled(*args, **kwargs):
4482 """GetEnabled(self) -> bool"""
4483 return _core_.UpdateUIEvent_GetEnabled(*args, **kwargs)
4484
4485 def GetText(*args, **kwargs):
4486 """GetText(self) -> String"""
4487 return _core_.UpdateUIEvent_GetText(*args, **kwargs)
4488
4489 def GetSetText(*args, **kwargs):
4490 """GetSetText(self) -> bool"""
4491 return _core_.UpdateUIEvent_GetSetText(*args, **kwargs)
4492
4493 def GetSetChecked(*args, **kwargs):
4494 """GetSetChecked(self) -> bool"""
4495 return _core_.UpdateUIEvent_GetSetChecked(*args, **kwargs)
4496
4497 def GetSetEnabled(*args, **kwargs):
4498 """GetSetEnabled(self) -> bool"""
4499 return _core_.UpdateUIEvent_GetSetEnabled(*args, **kwargs)
4500
4501 def Check(*args, **kwargs):
4502 """Check(self, bool check)"""
4503 return _core_.UpdateUIEvent_Check(*args, **kwargs)
4504
4505 def Enable(*args, **kwargs):
4506 """Enable(self, bool enable)"""
4507 return _core_.UpdateUIEvent_Enable(*args, **kwargs)
4508
4509 def SetText(*args, **kwargs):
4510 """SetText(self, String text)"""
4511 return _core_.UpdateUIEvent_SetText(*args, **kwargs)
4512
4513 def SetUpdateInterval(*args, **kwargs):
4514 """SetUpdateInterval(long updateInterval)"""
4515 return _core_.UpdateUIEvent_SetUpdateInterval(*args, **kwargs)
4516
4517 SetUpdateInterval = staticmethod(SetUpdateInterval)
4518 def GetUpdateInterval(*args, **kwargs):
4519 """GetUpdateInterval() -> long"""
4520 return _core_.UpdateUIEvent_GetUpdateInterval(*args, **kwargs)
4521
4522 GetUpdateInterval = staticmethod(GetUpdateInterval)
4523 def CanUpdate(*args, **kwargs):
4524 """CanUpdate(Window win) -> bool"""
4525 return _core_.UpdateUIEvent_CanUpdate(*args, **kwargs)
4526
4527 CanUpdate = staticmethod(CanUpdate)
4528 def ResetUpdateTime(*args, **kwargs):
4529 """ResetUpdateTime()"""
4530 return _core_.UpdateUIEvent_ResetUpdateTime(*args, **kwargs)
4531
4532 ResetUpdateTime = staticmethod(ResetUpdateTime)
4533 def SetMode(*args, **kwargs):
4534 """SetMode(int mode)"""
4535 return _core_.UpdateUIEvent_SetMode(*args, **kwargs)
4536
4537 SetMode = staticmethod(SetMode)
4538 def GetMode(*args, **kwargs):
4539 """GetMode() -> int"""
4540 return _core_.UpdateUIEvent_GetMode(*args, **kwargs)
4541
4542 GetMode = staticmethod(GetMode)
4543
4544 class UpdateUIEventPtr(UpdateUIEvent):
4545 def __init__(self, this):
4546 self.this = this
4547 if not hasattr(self,"thisown"): self.thisown = 0
4548 self.__class__ = UpdateUIEvent
4549 _core_.UpdateUIEvent_swigregister(UpdateUIEventPtr)
4550
4551 def UpdateUIEvent_SetUpdateInterval(*args, **kwargs):
4552 """UpdateUIEvent_SetUpdateInterval(long updateInterval)"""
4553 return _core_.UpdateUIEvent_SetUpdateInterval(*args, **kwargs)
4554
4555 def UpdateUIEvent_GetUpdateInterval(*args, **kwargs):
4556 """UpdateUIEvent_GetUpdateInterval() -> long"""
4557 return _core_.UpdateUIEvent_GetUpdateInterval(*args, **kwargs)
4558
4559 def UpdateUIEvent_CanUpdate(*args, **kwargs):
4560 """UpdateUIEvent_CanUpdate(Window win) -> bool"""
4561 return _core_.UpdateUIEvent_CanUpdate(*args, **kwargs)
4562
4563 def UpdateUIEvent_ResetUpdateTime(*args, **kwargs):
4564 """UpdateUIEvent_ResetUpdateTime()"""
4565 return _core_.UpdateUIEvent_ResetUpdateTime(*args, **kwargs)
4566
4567 def UpdateUIEvent_SetMode(*args, **kwargs):
4568 """UpdateUIEvent_SetMode(int mode)"""
4569 return _core_.UpdateUIEvent_SetMode(*args, **kwargs)
4570
4571 def UpdateUIEvent_GetMode(*args, **kwargs):
4572 """UpdateUIEvent_GetMode() -> int"""
4573 return _core_.UpdateUIEvent_GetMode(*args, **kwargs)
4574
4575 #---------------------------------------------------------------------------
4576
4577 class SysColourChangedEvent(Event):
4578 """Proxy of C++ SysColourChangedEvent class"""
4579 def __repr__(self):
4580 return "<%s.%s; proxy of C++ wxSysColourChangedEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
4581 def __init__(self, *args, **kwargs):
4582 """__init__(self) -> SysColourChangedEvent"""
4583 newobj = _core_.new_SysColourChangedEvent(*args, **kwargs)
4584 self.this = newobj.this
4585 self.thisown = 1
4586 del newobj.thisown
4587
4588 class SysColourChangedEventPtr(SysColourChangedEvent):
4589 def __init__(self, this):
4590 self.this = this
4591 if not hasattr(self,"thisown"): self.thisown = 0
4592 self.__class__ = SysColourChangedEvent
4593 _core_.SysColourChangedEvent_swigregister(SysColourChangedEventPtr)
4594
4595 #---------------------------------------------------------------------------
4596
4597 class MouseCaptureChangedEvent(Event):
4598 """Proxy of C++ MouseCaptureChangedEvent class"""
4599 def __repr__(self):
4600 return "<%s.%s; proxy of C++ wxMouseCaptureChangedEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
4601 def __init__(self, *args, **kwargs):
4602 """__init__(self, int winid=0, Window gainedCapture=None) -> MouseCaptureChangedEvent"""
4603 newobj = _core_.new_MouseCaptureChangedEvent(*args, **kwargs)
4604 self.this = newobj.this
4605 self.thisown = 1
4606 del newobj.thisown
4607 def GetCapturedWindow(*args, **kwargs):
4608 """GetCapturedWindow(self) -> Window"""
4609 return _core_.MouseCaptureChangedEvent_GetCapturedWindow(*args, **kwargs)
4610
4611
4612 class MouseCaptureChangedEventPtr(MouseCaptureChangedEvent):
4613 def __init__(self, this):
4614 self.this = this
4615 if not hasattr(self,"thisown"): self.thisown = 0
4616 self.__class__ = MouseCaptureChangedEvent
4617 _core_.MouseCaptureChangedEvent_swigregister(MouseCaptureChangedEventPtr)
4618
4619 #---------------------------------------------------------------------------
4620
4621 class DisplayChangedEvent(Event):
4622 """Proxy of C++ DisplayChangedEvent class"""
4623 def __repr__(self):
4624 return "<%s.%s; proxy of C++ wxDisplayChangedEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
4625 def __init__(self, *args, **kwargs):
4626 """__init__(self) -> DisplayChangedEvent"""
4627 newobj = _core_.new_DisplayChangedEvent(*args, **kwargs)
4628 self.this = newobj.this
4629 self.thisown = 1
4630 del newobj.thisown
4631
4632 class DisplayChangedEventPtr(DisplayChangedEvent):
4633 def __init__(self, this):
4634 self.this = this
4635 if not hasattr(self,"thisown"): self.thisown = 0
4636 self.__class__ = DisplayChangedEvent
4637 _core_.DisplayChangedEvent_swigregister(DisplayChangedEventPtr)
4638
4639 #---------------------------------------------------------------------------
4640
4641 class PaletteChangedEvent(Event):
4642 """Proxy of C++ PaletteChangedEvent class"""
4643 def __repr__(self):
4644 return "<%s.%s; proxy of C++ wxPaletteChangedEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
4645 def __init__(self, *args, **kwargs):
4646 """__init__(self, int id=0) -> PaletteChangedEvent"""
4647 newobj = _core_.new_PaletteChangedEvent(*args, **kwargs)
4648 self.this = newobj.this
4649 self.thisown = 1
4650 del newobj.thisown
4651 def SetChangedWindow(*args, **kwargs):
4652 """SetChangedWindow(self, Window win)"""
4653 return _core_.PaletteChangedEvent_SetChangedWindow(*args, **kwargs)
4654
4655 def GetChangedWindow(*args, **kwargs):
4656 """GetChangedWindow(self) -> Window"""
4657 return _core_.PaletteChangedEvent_GetChangedWindow(*args, **kwargs)
4658
4659
4660 class PaletteChangedEventPtr(PaletteChangedEvent):
4661 def __init__(self, this):
4662 self.this = this
4663 if not hasattr(self,"thisown"): self.thisown = 0
4664 self.__class__ = PaletteChangedEvent
4665 _core_.PaletteChangedEvent_swigregister(PaletteChangedEventPtr)
4666
4667 #---------------------------------------------------------------------------
4668
4669 class QueryNewPaletteEvent(Event):
4670 """Proxy of C++ QueryNewPaletteEvent class"""
4671 def __repr__(self):
4672 return "<%s.%s; proxy of C++ wxQueryNewPaletteEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
4673 def __init__(self, *args, **kwargs):
4674 """__init__(self, int winid=0) -> QueryNewPaletteEvent"""
4675 newobj = _core_.new_QueryNewPaletteEvent(*args, **kwargs)
4676 self.this = newobj.this
4677 self.thisown = 1
4678 del newobj.thisown
4679 def SetPaletteRealized(*args, **kwargs):
4680 """SetPaletteRealized(self, bool realized)"""
4681 return _core_.QueryNewPaletteEvent_SetPaletteRealized(*args, **kwargs)
4682
4683 def GetPaletteRealized(*args, **kwargs):
4684 """GetPaletteRealized(self) -> bool"""
4685 return _core_.QueryNewPaletteEvent_GetPaletteRealized(*args, **kwargs)
4686
4687
4688 class QueryNewPaletteEventPtr(QueryNewPaletteEvent):
4689 def __init__(self, this):
4690 self.this = this
4691 if not hasattr(self,"thisown"): self.thisown = 0
4692 self.__class__ = QueryNewPaletteEvent
4693 _core_.QueryNewPaletteEvent_swigregister(QueryNewPaletteEventPtr)
4694
4695 #---------------------------------------------------------------------------
4696
4697 class NavigationKeyEvent(Event):
4698 """Proxy of C++ NavigationKeyEvent class"""
4699 def __repr__(self):
4700 return "<%s.%s; proxy of C++ wxNavigationKeyEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
4701 def __init__(self, *args, **kwargs):
4702 """__init__(self) -> NavigationKeyEvent"""
4703 newobj = _core_.new_NavigationKeyEvent(*args, **kwargs)
4704 self.this = newobj.this
4705 self.thisown = 1
4706 del newobj.thisown
4707 def GetDirection(*args, **kwargs):
4708 """GetDirection(self) -> bool"""
4709 return _core_.NavigationKeyEvent_GetDirection(*args, **kwargs)
4710
4711 def SetDirection(*args, **kwargs):
4712 """SetDirection(self, bool forward)"""
4713 return _core_.NavigationKeyEvent_SetDirection(*args, **kwargs)
4714
4715 def IsWindowChange(*args, **kwargs):
4716 """IsWindowChange(self) -> bool"""
4717 return _core_.NavigationKeyEvent_IsWindowChange(*args, **kwargs)
4718
4719 def SetWindowChange(*args, **kwargs):
4720 """SetWindowChange(self, bool ischange)"""
4721 return _core_.NavigationKeyEvent_SetWindowChange(*args, **kwargs)
4722
4723 def IsFromTab(*args, **kwargs):
4724 """IsFromTab(self) -> bool"""
4725 return _core_.NavigationKeyEvent_IsFromTab(*args, **kwargs)
4726
4727 def SetFromTab(*args, **kwargs):
4728 """SetFromTab(self, bool bIs)"""
4729 return _core_.NavigationKeyEvent_SetFromTab(*args, **kwargs)
4730
4731 def SetFlags(*args, **kwargs):
4732 """SetFlags(self, long flags)"""
4733 return _core_.NavigationKeyEvent_SetFlags(*args, **kwargs)
4734
4735 def GetCurrentFocus(*args, **kwargs):
4736 """GetCurrentFocus(self) -> Window"""
4737 return _core_.NavigationKeyEvent_GetCurrentFocus(*args, **kwargs)
4738
4739 def SetCurrentFocus(*args, **kwargs):
4740 """SetCurrentFocus(self, Window win)"""
4741 return _core_.NavigationKeyEvent_SetCurrentFocus(*args, **kwargs)
4742
4743 IsBackward = _core_.NavigationKeyEvent_IsBackward
4744 IsForward = _core_.NavigationKeyEvent_IsForward
4745 WinChange = _core_.NavigationKeyEvent_WinChange
4746 FromTab = _core_.NavigationKeyEvent_FromTab
4747
4748 class NavigationKeyEventPtr(NavigationKeyEvent):
4749 def __init__(self, this):
4750 self.this = this
4751 if not hasattr(self,"thisown"): self.thisown = 0
4752 self.__class__ = NavigationKeyEvent
4753 _core_.NavigationKeyEvent_swigregister(NavigationKeyEventPtr)
4754
4755 #---------------------------------------------------------------------------
4756
4757 class WindowCreateEvent(CommandEvent):
4758 """Proxy of C++ WindowCreateEvent class"""
4759 def __repr__(self):
4760 return "<%s.%s; proxy of C++ wxWindowCreateEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
4761 def __init__(self, *args, **kwargs):
4762 """__init__(self, Window win=None) -> WindowCreateEvent"""
4763 newobj = _core_.new_WindowCreateEvent(*args, **kwargs)
4764 self.this = newobj.this
4765 self.thisown = 1
4766 del newobj.thisown
4767 def GetWindow(*args, **kwargs):
4768 """GetWindow(self) -> Window"""
4769 return _core_.WindowCreateEvent_GetWindow(*args, **kwargs)
4770
4771
4772 class WindowCreateEventPtr(WindowCreateEvent):
4773 def __init__(self, this):
4774 self.this = this
4775 if not hasattr(self,"thisown"): self.thisown = 0
4776 self.__class__ = WindowCreateEvent
4777 _core_.WindowCreateEvent_swigregister(WindowCreateEventPtr)
4778
4779 class WindowDestroyEvent(CommandEvent):
4780 """Proxy of C++ WindowDestroyEvent class"""
4781 def __repr__(self):
4782 return "<%s.%s; proxy of C++ wxWindowDestroyEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
4783 def __init__(self, *args, **kwargs):
4784 """__init__(self, Window win=None) -> WindowDestroyEvent"""
4785 newobj = _core_.new_WindowDestroyEvent(*args, **kwargs)
4786 self.this = newobj.this
4787 self.thisown = 1
4788 del newobj.thisown
4789 def GetWindow(*args, **kwargs):
4790 """GetWindow(self) -> Window"""
4791 return _core_.WindowDestroyEvent_GetWindow(*args, **kwargs)
4792
4793
4794 class WindowDestroyEventPtr(WindowDestroyEvent):
4795 def __init__(self, this):
4796 self.this = this
4797 if not hasattr(self,"thisown"): self.thisown = 0
4798 self.__class__ = WindowDestroyEvent
4799 _core_.WindowDestroyEvent_swigregister(WindowDestroyEventPtr)
4800
4801 #---------------------------------------------------------------------------
4802
4803 class ContextMenuEvent(CommandEvent):
4804 """Proxy of C++ ContextMenuEvent class"""
4805 def __repr__(self):
4806 return "<%s.%s; proxy of C++ wxContextMenuEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
4807 def __init__(self, *args, **kwargs):
4808 """__init__(self, wxEventType type=wxEVT_NULL, int winid=0, Point pt=DefaultPosition) -> ContextMenuEvent"""
4809 newobj = _core_.new_ContextMenuEvent(*args, **kwargs)
4810 self.this = newobj.this
4811 self.thisown = 1
4812 del newobj.thisown
4813 def GetPosition(*args, **kwargs):
4814 """GetPosition(self) -> Point"""
4815 return _core_.ContextMenuEvent_GetPosition(*args, **kwargs)
4816
4817 def SetPosition(*args, **kwargs):
4818 """SetPosition(self, Point pos)"""
4819 return _core_.ContextMenuEvent_SetPosition(*args, **kwargs)
4820
4821
4822 class ContextMenuEventPtr(ContextMenuEvent):
4823 def __init__(self, this):
4824 self.this = this
4825 if not hasattr(self,"thisown"): self.thisown = 0
4826 self.__class__ = ContextMenuEvent
4827 _core_.ContextMenuEvent_swigregister(ContextMenuEventPtr)
4828
4829 #---------------------------------------------------------------------------
4830
4831 IDLE_PROCESS_ALL = _core_.IDLE_PROCESS_ALL
4832 IDLE_PROCESS_SPECIFIED = _core_.IDLE_PROCESS_SPECIFIED
4833 class IdleEvent(Event):
4834 """Proxy of C++ IdleEvent class"""
4835 def __repr__(self):
4836 return "<%s.%s; proxy of C++ wxIdleEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
4837 def __init__(self, *args, **kwargs):
4838 """__init__(self) -> IdleEvent"""
4839 newobj = _core_.new_IdleEvent(*args, **kwargs)
4840 self.this = newobj.this
4841 self.thisown = 1
4842 del newobj.thisown
4843 def RequestMore(*args, **kwargs):
4844 """RequestMore(self, bool needMore=True)"""
4845 return _core_.IdleEvent_RequestMore(*args, **kwargs)
4846
4847 def MoreRequested(*args, **kwargs):
4848 """MoreRequested(self) -> bool"""
4849 return _core_.IdleEvent_MoreRequested(*args, **kwargs)
4850
4851 def SetMode(*args, **kwargs):
4852 """SetMode(int mode)"""
4853 return _core_.IdleEvent_SetMode(*args, **kwargs)
4854
4855 SetMode = staticmethod(SetMode)
4856 def GetMode(*args, **kwargs):
4857 """GetMode() -> int"""
4858 return _core_.IdleEvent_GetMode(*args, **kwargs)
4859
4860 GetMode = staticmethod(GetMode)
4861 def CanSend(*args, **kwargs):
4862 """CanSend(Window win) -> bool"""
4863 return _core_.IdleEvent_CanSend(*args, **kwargs)
4864
4865 CanSend = staticmethod(CanSend)
4866
4867 class IdleEventPtr(IdleEvent):
4868 def __init__(self, this):
4869 self.this = this
4870 if not hasattr(self,"thisown"): self.thisown = 0
4871 self.__class__ = IdleEvent
4872 _core_.IdleEvent_swigregister(IdleEventPtr)
4873
4874 def IdleEvent_SetMode(*args, **kwargs):
4875 """IdleEvent_SetMode(int mode)"""
4876 return _core_.IdleEvent_SetMode(*args, **kwargs)
4877
4878 def IdleEvent_GetMode(*args, **kwargs):
4879 """IdleEvent_GetMode() -> int"""
4880 return _core_.IdleEvent_GetMode(*args, **kwargs)
4881
4882 def IdleEvent_CanSend(*args, **kwargs):
4883 """IdleEvent_CanSend(Window win) -> bool"""
4884 return _core_.IdleEvent_CanSend(*args, **kwargs)
4885
4886 #---------------------------------------------------------------------------
4887
4888 class PyEvent(Event):
4889 """Proxy of C++ PyEvent class"""
4890 def __repr__(self):
4891 return "<%s.%s; proxy of C++ wxPyEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
4892 def __init__(self, *args, **kwargs):
4893 """__init__(self, int winid=0, wxEventType commandType=wxEVT_NULL) -> PyEvent"""
4894 newobj = _core_.new_PyEvent(*args, **kwargs)
4895 self.this = newobj.this
4896 self.thisown = 1
4897 del newobj.thisown
4898 self.SetSelf(self)
4899
4900 def __del__(self, destroy=_core_.delete_PyEvent):
4901 """__del__(self)"""
4902 try:
4903 if self.thisown: destroy(self)
4904 except: pass
4905
4906 def SetSelf(*args, **kwargs):
4907 """SetSelf(self, PyObject self)"""
4908 return _core_.PyEvent_SetSelf(*args, **kwargs)
4909
4910 def GetSelf(*args, **kwargs):
4911 """GetSelf(self) -> PyObject"""
4912 return _core_.PyEvent_GetSelf(*args, **kwargs)
4913
4914
4915 class PyEventPtr(PyEvent):
4916 def __init__(self, this):
4917 self.this = this
4918 if not hasattr(self,"thisown"): self.thisown = 0
4919 self.__class__ = PyEvent
4920 _core_.PyEvent_swigregister(PyEventPtr)
4921
4922 class PyCommandEvent(CommandEvent):
4923 """Proxy of C++ PyCommandEvent class"""
4924 def __repr__(self):
4925 return "<%s.%s; proxy of C++ wxPyCommandEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
4926 def __init__(self, *args, **kwargs):
4927 """__init__(self, wxEventType commandType=wxEVT_NULL, int id=0) -> PyCommandEvent"""
4928 newobj = _core_.new_PyCommandEvent(*args, **kwargs)
4929 self.this = newobj.this
4930 self.thisown = 1
4931 del newobj.thisown
4932 self.SetSelf(self)
4933
4934 def __del__(self, destroy=_core_.delete_PyCommandEvent):
4935 """__del__(self)"""
4936 try:
4937 if self.thisown: destroy(self)
4938 except: pass
4939
4940 def SetSelf(*args, **kwargs):
4941 """SetSelf(self, PyObject self)"""
4942 return _core_.PyCommandEvent_SetSelf(*args, **kwargs)
4943
4944 def GetSelf(*args, **kwargs):
4945 """GetSelf(self) -> PyObject"""
4946 return _core_.PyCommandEvent_GetSelf(*args, **kwargs)
4947
4948
4949 class PyCommandEventPtr(PyCommandEvent):
4950 def __init__(self, this):
4951 self.this = this
4952 if not hasattr(self,"thisown"): self.thisown = 0
4953 self.__class__ = PyCommandEvent
4954 _core_.PyCommandEvent_swigregister(PyCommandEventPtr)
4955
4956 class DateEvent(CommandEvent):
4957 """Proxy of C++ DateEvent class"""
4958 def __repr__(self):
4959 return "<%s.%s; proxy of C++ wxDateEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
4960 def __init__(self, *args, **kwargs):
4961 """__init__(self, Window win, DateTime dt, wxEventType type) -> DateEvent"""
4962 newobj = _core_.new_DateEvent(*args, **kwargs)
4963 self.this = newobj.this
4964 self.thisown = 1
4965 del newobj.thisown
4966 def GetDate(*args, **kwargs):
4967 """GetDate(self) -> DateTime"""
4968 return _core_.DateEvent_GetDate(*args, **kwargs)
4969
4970 def SetDate(*args, **kwargs):
4971 """SetDate(self, DateTime date)"""
4972 return _core_.DateEvent_SetDate(*args, **kwargs)
4973
4974
4975 class DateEventPtr(DateEvent):
4976 def __init__(self, this):
4977 self.this = this
4978 if not hasattr(self,"thisown"): self.thisown = 0
4979 self.__class__ = DateEvent
4980 _core_.DateEvent_swigregister(DateEventPtr)
4981
4982 wxEVT_DATE_CHANGED = _core_.wxEVT_DATE_CHANGED
4983 EVT_DATE_CHANGED = wx.PyEventBinder( wxEVT_DATE_CHANGED, 1 )
4984
4985 #---------------------------------------------------------------------------
4986
4987 PYAPP_ASSERT_SUPPRESS = _core_.PYAPP_ASSERT_SUPPRESS
4988 PYAPP_ASSERT_EXCEPTION = _core_.PYAPP_ASSERT_EXCEPTION
4989 PYAPP_ASSERT_DIALOG = _core_.PYAPP_ASSERT_DIALOG
4990 PYAPP_ASSERT_LOG = _core_.PYAPP_ASSERT_LOG
4991 PRINT_WINDOWS = _core_.PRINT_WINDOWS
4992 PRINT_POSTSCRIPT = _core_.PRINT_POSTSCRIPT
4993 class PyApp(EvtHandler):
4994 """
4995 The ``wx.PyApp`` class is an *implementation detail*, please use the
4996 `wx.App` class (or some other derived class) instead.
4997 """
4998 def __repr__(self):
4999 return "<%s.%s; proxy of C++ wxPyApp instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
5000 def __init__(self, *args, **kwargs):
5001 """
5002 __init__(self) -> PyApp
5003
5004 Create a new application object, starting the bootstrap process.
5005 """
5006 newobj = _core_.new_PyApp(*args, **kwargs)
5007 self.this = newobj.this
5008 self.thisown = 1
5009 del newobj.thisown
5010 self._setCallbackInfo(self, PyApp)
5011 self._setOORInfo(self)
5012
5013 def __del__(self, destroy=_core_.delete_PyApp):
5014 """__del__(self)"""
5015 try:
5016 if self.thisown: destroy(self)
5017 except: pass
5018
5019 def _setCallbackInfo(*args, **kwargs):
5020 """_setCallbackInfo(self, PyObject self, PyObject _class)"""
5021 return _core_.PyApp__setCallbackInfo(*args, **kwargs)
5022
5023 def GetAppName(*args, **kwargs):
5024 """
5025 GetAppName(self) -> String
5026
5027 Get the application name.
5028 """
5029 return _core_.PyApp_GetAppName(*args, **kwargs)
5030
5031 def SetAppName(*args, **kwargs):
5032 """
5033 SetAppName(self, String name)
5034
5035 Set the application name. This value may be used automatically by
5036 `wx.Config` and such.
5037 """
5038 return _core_.PyApp_SetAppName(*args, **kwargs)
5039
5040 def GetClassName(*args, **kwargs):
5041 """
5042 GetClassName(self) -> String
5043
5044 Get the application's class name.
5045 """
5046 return _core_.PyApp_GetClassName(*args, **kwargs)
5047
5048 def SetClassName(*args, **kwargs):
5049 """
5050 SetClassName(self, String name)
5051
5052 Set the application's class name. This value may be used for
5053 X-resources if applicable for the platform
5054 """
5055 return _core_.PyApp_SetClassName(*args, **kwargs)
5056
5057 def GetVendorName(*args, **kwargs):
5058 """
5059 GetVendorName(self) -> String
5060
5061 Get the application's vendor name.
5062 """
5063 return _core_.PyApp_GetVendorName(*args, **kwargs)
5064
5065 def SetVendorName(*args, **kwargs):
5066 """
5067 SetVendorName(self, String name)
5068
5069 Set the application's vendor name. This value may be used
5070 automatically by `wx.Config` and such.
5071 """
5072 return _core_.PyApp_SetVendorName(*args, **kwargs)
5073
5074 def GetTraits(*args, **kwargs):
5075 """
5076 GetTraits(self) -> wxAppTraits
5077
5078 Return (and create if necessary) the app traits object to which we
5079 delegate for everything which either should be configurable by the
5080 user (then he can change the default behaviour simply by overriding
5081 CreateTraits() and returning his own traits object) or which is
5082 GUI/console dependent as then wx.AppTraits allows us to abstract the
5083 differences behind the common facade.
5084
5085 :todo: Add support for overriding CreateAppTraits in wxPython.
5086 """
5087 return _core_.PyApp_GetTraits(*args, **kwargs)
5088
5089 def ProcessPendingEvents(*args, **kwargs):
5090 """
5091 ProcessPendingEvents(self)
5092
5093 Process all events in the Pending Events list -- it is necessary to
5094 call this function to process posted events. This normally happens
5095 during each event loop iteration.
5096 """
5097 return _core_.PyApp_ProcessPendingEvents(*args, **kwargs)
5098
5099 def Yield(*args, **kwargs):
5100 """
5101 Yield(self, bool onlyIfNeeded=False) -> bool
5102
5103 Process all currently pending events right now, instead of waiting
5104 until return to the event loop. It is an error to call ``Yield``
5105 recursively unless the value of ``onlyIfNeeded`` is True.
5106
5107 :warning: This function is dangerous as it can lead to unexpected
5108 reentrancies (i.e. when called from an event handler it may
5109 result in calling the same event handler again), use with
5110 extreme care or, better, don't use at all!
5111
5112 :see: `wx.Yield`, `wx.YieldIfNeeded`, `wx.SafeYield`
5113
5114 """
5115 return _core_.PyApp_Yield(*args, **kwargs)
5116
5117 def WakeUpIdle(*args, **kwargs):
5118 """
5119 WakeUpIdle(self)
5120
5121 Make sure that idle events are sent again.
5122 :see: `wx.WakeUpIdle`
5123 """
5124 return _core_.PyApp_WakeUpIdle(*args, **kwargs)
5125
5126 def IsMainLoopRunning(*args, **kwargs):
5127 """
5128 IsMainLoopRunning() -> bool
5129
5130 Returns True if we're running the main loop, i.e. if the events can
5131 currently be dispatched.
5132 """
5133 return _core_.PyApp_IsMainLoopRunning(*args, **kwargs)
5134
5135 IsMainLoopRunning = staticmethod(IsMainLoopRunning)
5136 def MainLoop(*args, **kwargs):
5137 """
5138 MainLoop(self) -> int
5139
5140 Execute the main GUI loop, the function doesn't normally return until
5141 all top level windows have been closed and destroyed.
5142 """
5143 return _core_.PyApp_MainLoop(*args, **kwargs)
5144
5145 def Exit(*args, **kwargs):
5146 """
5147 Exit(self)
5148
5149 Exit the main loop thus terminating the application.
5150 :see: `wx.Exit`
5151 """
5152 return _core_.PyApp_Exit(*args, **kwargs)
5153
5154 def ExitMainLoop(*args, **kwargs):
5155 """
5156 ExitMainLoop(self)
5157
5158 Exit the main GUI loop during the next iteration of the main
5159 loop, (i.e. it does not stop the program immediately!)
5160 """
5161 return _core_.PyApp_ExitMainLoop(*args, **kwargs)
5162
5163 def Pending(*args, **kwargs):
5164 """
5165 Pending(self) -> bool
5166
5167 Returns True if there are unprocessed events in the event queue.
5168 """
5169 return _core_.PyApp_Pending(*args, **kwargs)
5170
5171 def Dispatch(*args, **kwargs):
5172 """
5173 Dispatch(self) -> bool
5174
5175 Process the first event in the event queue (blocks until an event
5176 appears if there are none currently)
5177 """
5178 return _core_.PyApp_Dispatch(*args, **kwargs)
5179
5180 def ProcessIdle(*args, **kwargs):
5181 """
5182 ProcessIdle(self) -> bool
5183
5184 Called from the MainLoop when the application becomes idle (there are
5185 no pending events) and sends a `wx.IdleEvent` to all interested
5186 parties. Returns True if more idle events are needed, False if not.
5187 """
5188 return _core_.PyApp_ProcessIdle(*args, **kwargs)
5189
5190 def SendIdleEvents(*args, **kwargs):
5191 """
5192 SendIdleEvents(self, Window win, IdleEvent event) -> bool
5193
5194 Send idle event to window and all subwindows. Returns True if more
5195 idle time is requested.
5196 """
5197 return _core_.PyApp_SendIdleEvents(*args, **kwargs)
5198
5199 def IsActive(*args, **kwargs):
5200 """
5201 IsActive(self) -> bool
5202
5203 Return True if our app has focus.
5204 """
5205 return _core_.PyApp_IsActive(*args, **kwargs)
5206
5207 def SetTopWindow(*args, **kwargs):
5208 """
5209 SetTopWindow(self, Window win)
5210
5211 Set the *main* top level window
5212 """
5213 return _core_.PyApp_SetTopWindow(*args, **kwargs)
5214
5215 def GetTopWindow(*args, **kwargs):
5216 """
5217 GetTopWindow(self) -> Window
5218
5219 Return the *main* top level window (if it hadn't been set previously
5220 with SetTopWindow(), will return just some top level window and, if
5221 there not any, will return None)
5222 """
5223 return _core_.PyApp_GetTopWindow(*args, **kwargs)
5224
5225 def SetExitOnFrameDelete(*args, **kwargs):
5226 """
5227 SetExitOnFrameDelete(self, bool flag)
5228
5229 Control the exit behaviour: by default, the program will exit the main
5230 loop (and so, usually, terminate) when the last top-level program
5231 window is deleted. Beware that if you disable this behaviour (with
5232 SetExitOnFrameDelete(False)), you'll have to call ExitMainLoop()
5233 explicitly from somewhere.
5234 """
5235 return _core_.PyApp_SetExitOnFrameDelete(*args, **kwargs)
5236
5237 def GetExitOnFrameDelete(*args, **kwargs):
5238 """
5239 GetExitOnFrameDelete(self) -> bool
5240
5241 Get the current exit behaviour setting.
5242 """
5243 return _core_.PyApp_GetExitOnFrameDelete(*args, **kwargs)
5244
5245 def SetUseBestVisual(*args, **kwargs):
5246 """
5247 SetUseBestVisual(self, bool flag)
5248
5249 Set whether the app should try to use the best available visual on
5250 systems where more than one is available, (Sun, SGI, XFree86 4, etc.)
5251 """
5252 return _core_.PyApp_SetUseBestVisual(*args, **kwargs)
5253
5254 def GetUseBestVisual(*args, **kwargs):
5255 """
5256 GetUseBestVisual(self) -> bool
5257
5258 Get current UseBestVisual setting.
5259 """
5260 return _core_.PyApp_GetUseBestVisual(*args, **kwargs)
5261
5262 def SetPrintMode(*args, **kwargs):
5263 """SetPrintMode(self, int mode)"""
5264 return _core_.PyApp_SetPrintMode(*args, **kwargs)
5265
5266 def GetPrintMode(*args, **kwargs):
5267 """GetPrintMode(self) -> int"""
5268 return _core_.PyApp_GetPrintMode(*args, **kwargs)
5269
5270 def SetAssertMode(*args, **kwargs):
5271 """
5272 SetAssertMode(self, int mode)
5273
5274 Set the OnAssert behaviour for debug and hybrid builds.
5275 """
5276 return _core_.PyApp_SetAssertMode(*args, **kwargs)
5277
5278 def GetAssertMode(*args, **kwargs):
5279 """
5280 GetAssertMode(self) -> int
5281
5282 Get the current OnAssert behaviour setting.
5283 """
5284 return _core_.PyApp_GetAssertMode(*args, **kwargs)
5285
5286 def GetMacSupportPCMenuShortcuts(*args, **kwargs):
5287 """GetMacSupportPCMenuShortcuts() -> bool"""
5288 return _core_.PyApp_GetMacSupportPCMenuShortcuts(*args, **kwargs)
5289
5290 GetMacSupportPCMenuShortcuts = staticmethod(GetMacSupportPCMenuShortcuts)
5291 def GetMacAboutMenuItemId(*args, **kwargs):
5292 """GetMacAboutMenuItemId() -> long"""
5293 return _core_.PyApp_GetMacAboutMenuItemId(*args, **kwargs)
5294
5295 GetMacAboutMenuItemId = staticmethod(GetMacAboutMenuItemId)
5296 def GetMacPreferencesMenuItemId(*args, **kwargs):
5297 """GetMacPreferencesMenuItemId() -> long"""
5298 return _core_.PyApp_GetMacPreferencesMenuItemId(*args, **kwargs)
5299
5300 GetMacPreferencesMenuItemId = staticmethod(GetMacPreferencesMenuItemId)
5301 def GetMacExitMenuItemId(*args, **kwargs):
5302 """GetMacExitMenuItemId() -> long"""
5303 return _core_.PyApp_GetMacExitMenuItemId(*args, **kwargs)
5304
5305 GetMacExitMenuItemId = staticmethod(GetMacExitMenuItemId)
5306 def GetMacHelpMenuTitleName(*args, **kwargs):
5307 """GetMacHelpMenuTitleName() -> String"""
5308 return _core_.PyApp_GetMacHelpMenuTitleName(*args, **kwargs)
5309
5310 GetMacHelpMenuTitleName = staticmethod(GetMacHelpMenuTitleName)
5311 def SetMacSupportPCMenuShortcuts(*args, **kwargs):
5312 """SetMacSupportPCMenuShortcuts(bool val)"""
5313 return _core_.PyApp_SetMacSupportPCMenuShortcuts(*args, **kwargs)
5314
5315 SetMacSupportPCMenuShortcuts = staticmethod(SetMacSupportPCMenuShortcuts)
5316 def SetMacAboutMenuItemId(*args, **kwargs):
5317 """SetMacAboutMenuItemId(long val)"""
5318 return _core_.PyApp_SetMacAboutMenuItemId(*args, **kwargs)
5319
5320 SetMacAboutMenuItemId = staticmethod(SetMacAboutMenuItemId)
5321 def SetMacPreferencesMenuItemId(*args, **kwargs):
5322 """SetMacPreferencesMenuItemId(long val)"""
5323 return _core_.PyApp_SetMacPreferencesMenuItemId(*args, **kwargs)
5324
5325 SetMacPreferencesMenuItemId = staticmethod(SetMacPreferencesMenuItemId)
5326 def SetMacExitMenuItemId(*args, **kwargs):
5327 """SetMacExitMenuItemId(long val)"""
5328 return _core_.PyApp_SetMacExitMenuItemId(*args, **kwargs)
5329
5330 SetMacExitMenuItemId = staticmethod(SetMacExitMenuItemId)
5331 def SetMacHelpMenuTitleName(*args, **kwargs):
5332 """SetMacHelpMenuTitleName(String val)"""
5333 return _core_.PyApp_SetMacHelpMenuTitleName(*args, **kwargs)
5334
5335 SetMacHelpMenuTitleName = staticmethod(SetMacHelpMenuTitleName)
5336 def _BootstrapApp(*args, **kwargs):
5337 """
5338 _BootstrapApp(self)
5339
5340 For internal use only
5341 """
5342 return _core_.PyApp__BootstrapApp(*args, **kwargs)
5343
5344 def GetComCtl32Version(*args, **kwargs):
5345 """
5346 GetComCtl32Version() -> int
5347
5348 Returns 400, 470, 471, etc. for comctl32.dll 4.00, 4.70, 4.71 or 0 if
5349 it wasn't found at all. Raises an exception on non-Windows platforms.
5350 """
5351 return _core_.PyApp_GetComCtl32Version(*args, **kwargs)
5352
5353 GetComCtl32Version = staticmethod(GetComCtl32Version)
5354
5355 class PyAppPtr(PyApp):
5356 def __init__(self, this):
5357 self.this = this
5358 if not hasattr(self,"thisown"): self.thisown = 0
5359 self.__class__ = PyApp
5360 _core_.PyApp_swigregister(PyAppPtr)
5361
5362 def PyApp_IsMainLoopRunning(*args, **kwargs):
5363 """
5364 PyApp_IsMainLoopRunning() -> bool
5365
5366 Returns True if we're running the main loop, i.e. if the events can
5367 currently be dispatched.
5368 """
5369 return _core_.PyApp_IsMainLoopRunning(*args, **kwargs)
5370
5371 def PyApp_GetMacSupportPCMenuShortcuts(*args, **kwargs):
5372 """PyApp_GetMacSupportPCMenuShortcuts() -> bool"""
5373 return _core_.PyApp_GetMacSupportPCMenuShortcuts(*args, **kwargs)
5374
5375 def PyApp_GetMacAboutMenuItemId(*args, **kwargs):
5376 """PyApp_GetMacAboutMenuItemId() -> long"""
5377 return _core_.PyApp_GetMacAboutMenuItemId(*args, **kwargs)
5378
5379 def PyApp_GetMacPreferencesMenuItemId(*args, **kwargs):
5380 """PyApp_GetMacPreferencesMenuItemId() -> long"""
5381 return _core_.PyApp_GetMacPreferencesMenuItemId(*args, **kwargs)
5382
5383 def PyApp_GetMacExitMenuItemId(*args, **kwargs):
5384 """PyApp_GetMacExitMenuItemId() -> long"""
5385 return _core_.PyApp_GetMacExitMenuItemId(*args, **kwargs)
5386
5387 def PyApp_GetMacHelpMenuTitleName(*args, **kwargs):
5388 """PyApp_GetMacHelpMenuTitleName() -> String"""
5389 return _core_.PyApp_GetMacHelpMenuTitleName(*args, **kwargs)
5390
5391 def PyApp_SetMacSupportPCMenuShortcuts(*args, **kwargs):
5392 """PyApp_SetMacSupportPCMenuShortcuts(bool val)"""
5393 return _core_.PyApp_SetMacSupportPCMenuShortcuts(*args, **kwargs)
5394
5395 def PyApp_SetMacAboutMenuItemId(*args, **kwargs):
5396 """PyApp_SetMacAboutMenuItemId(long val)"""
5397 return _core_.PyApp_SetMacAboutMenuItemId(*args, **kwargs)
5398
5399 def PyApp_SetMacPreferencesMenuItemId(*args, **kwargs):
5400 """PyApp_SetMacPreferencesMenuItemId(long val)"""
5401 return _core_.PyApp_SetMacPreferencesMenuItemId(*args, **kwargs)
5402
5403 def PyApp_SetMacExitMenuItemId(*args, **kwargs):
5404 """PyApp_SetMacExitMenuItemId(long val)"""
5405 return _core_.PyApp_SetMacExitMenuItemId(*args, **kwargs)
5406
5407 def PyApp_SetMacHelpMenuTitleName(*args, **kwargs):
5408 """PyApp_SetMacHelpMenuTitleName(String val)"""
5409 return _core_.PyApp_SetMacHelpMenuTitleName(*args, **kwargs)
5410
5411 def PyApp_GetComCtl32Version(*args, **kwargs):
5412 """
5413 PyApp_GetComCtl32Version() -> int
5414
5415 Returns 400, 470, 471, etc. for comctl32.dll 4.00, 4.70, 4.71 or 0 if
5416 it wasn't found at all. Raises an exception on non-Windows platforms.
5417 """
5418 return _core_.PyApp_GetComCtl32Version(*args, **kwargs)
5419
5420 #---------------------------------------------------------------------------
5421
5422
5423 def Exit(*args, **kwargs):
5424 """
5425 Exit()
5426
5427 Force an exit of the application. Convenience for wx.GetApp().Exit()
5428 """
5429 return _core_.Exit(*args, **kwargs)
5430
5431 def Yield(*args, **kwargs):
5432 """
5433 Yield() -> bool
5434
5435 Yield to other apps/messages. Convenience for wx.GetApp().Yield()
5436 """
5437 return _core_.Yield(*args, **kwargs)
5438
5439 def YieldIfNeeded(*args, **kwargs):
5440 """
5441 YieldIfNeeded() -> bool
5442
5443 Yield to other apps/messages. Convenience for wx.GetApp().Yield(True)
5444 """
5445 return _core_.YieldIfNeeded(*args, **kwargs)
5446
5447 def SafeYield(*args, **kwargs):
5448 """
5449 SafeYield(Window win=None, bool onlyIfNeeded=False) -> bool
5450
5451 This function is similar to `wx.Yield`, except that it disables the
5452 user input to all program windows before calling `wx.Yield` and
5453 re-enables it again afterwards. If ``win`` is not None, this window
5454 will remain enabled, allowing the implementation of some limited user
5455 interaction.
5456
5457 :Returns: the result of the call to `wx.Yield`.
5458 """
5459 return _core_.SafeYield(*args, **kwargs)
5460
5461 def WakeUpIdle(*args, **kwargs):
5462 """
5463 WakeUpIdle()
5464
5465 Cause the message queue to become empty again, so idle events will be
5466 sent.
5467 """
5468 return _core_.WakeUpIdle(*args, **kwargs)
5469
5470 def PostEvent(*args, **kwargs):
5471 """
5472 PostEvent(EvtHandler dest, Event event)
5473
5474 Send an event to a window or other wx.EvtHandler to be processed
5475 later.
5476 """
5477 return _core_.PostEvent(*args, **kwargs)
5478
5479 def App_CleanUp(*args, **kwargs):
5480 """
5481 App_CleanUp()
5482
5483 For internal use only, it is used to cleanup after wxWidgets when
5484 Python shuts down.
5485 """
5486 return _core_.App_CleanUp(*args, **kwargs)
5487
5488 def GetApp(*args, **kwargs):
5489 """
5490 GetApp() -> PyApp
5491
5492 Return a reference to the current wx.App object.
5493 """
5494 return _core_.GetApp(*args, **kwargs)
5495
5496 def SetDefaultPyEncoding(*args, **kwargs):
5497 """
5498 SetDefaultPyEncoding(string encoding)
5499
5500 Sets the encoding that wxPython will use when it needs to convert a
5501 Python string or unicode object to or from a wxString.
5502
5503 The default encoding is the value of ``locale.getdefaultlocale()[1]``
5504 but please be aware that the default encoding within the same locale
5505 may be slightly different on different platforms. For example, please
5506 see http://www.alanwood.net/demos/charsetdiffs.html for differences
5507 between the common latin/roman encodings.
5508 """
5509 return _core_.SetDefaultPyEncoding(*args, **kwargs)
5510
5511 def GetDefaultPyEncoding(*args, **kwargs):
5512 """
5513 GetDefaultPyEncoding() -> string
5514
5515 Gets the current encoding that wxPython will use when it needs to
5516 convert a Python string or unicode object to or from a wxString.
5517 """
5518 return _core_.GetDefaultPyEncoding(*args, **kwargs)
5519 #----------------------------------------------------------------------
5520
5521 class PyOnDemandOutputWindow:
5522 """
5523 A class that can be used for redirecting Python's stdout and
5524 stderr streams. It will do nothing until something is wrriten to
5525 the stream at which point it will create a Frame with a text area
5526 and write the text there.
5527 """
5528 def __init__(self, title = "wxPython: stdout/stderr"):
5529 self.frame = None
5530 self.title = title
5531 self.pos = wx.DefaultPosition
5532 self.size = (450, 300)
5533 self.parent = None
5534
5535 def SetParent(self, parent):
5536 """Set the window to be used as the popup Frame's parent."""
5537 self.parent = parent
5538
5539
5540 def CreateOutputWindow(self, st):
5541 self.frame = wx.Frame(self.parent, -1, self.title, self.pos, self.size,
5542 style=wx.DEFAULT_FRAME_STYLE)
5543 self.text = wx.TextCtrl(self.frame, -1, "",
5544 style=wx.TE_MULTILINE|wx.TE_READONLY)
5545 self.text.AppendText(st)
5546 self.frame.Show(True)
5547 EVT_CLOSE(self.frame, self.OnCloseWindow)
5548
5549
5550 def OnCloseWindow(self, event):
5551 if self.frame is not None:
5552 self.frame.Destroy()
5553 self.frame = None
5554 self.text = None
5555
5556
5557 # These methods provide the file-like output behaviour.
5558 def write(self, text):
5559 """
5560 Create the output window if needed and write the string to it.
5561 If not called in the context of the gui thread then uses
5562 CallAfter to do the work there.
5563 """
5564 if self.frame is None:
5565 if not wx.Thread_IsMain():
5566 wx.CallAfter(self.CreateOutputWindow, text)
5567 else:
5568 self.CreateOutputWindow(text)
5569 else:
5570 if not wx.Thread_IsMain():
5571 wx.CallAfter(self.text.AppendText, text)
5572 else:
5573 self.text.AppendText(text)
5574
5575
5576 def close(self):
5577 if self.frame is not None:
5578 wx.CallAfter(self.frame.Close)
5579
5580
5581 def flush(self):
5582 pass
5583
5584
5585
5586 #----------------------------------------------------------------------
5587
5588 _defRedirect = (wx.Platform == '__WXMSW__' or wx.Platform == '__WXMAC__')
5589
5590 class App(wx.PyApp):
5591 """
5592 The ``wx.App`` class represents the application and is used to:
5593
5594 * bootstrap the wxPython system and initialize the underlying
5595 gui toolkit
5596 * set and get application-wide properties
5597 * implement the windowing system main message or event loop,
5598 and to dispatch events to window instances
5599 * etc.
5600
5601 Every application must have a ``wx.App`` instance, and all
5602 creation of UI objects should be delayed until after the
5603 ``wx.App`` object has been created in order to ensure that the gui
5604 platform and wxWidgets have been fully initialized.
5605
5606 Normally you would derive from this class and implement an
5607 ``OnInit`` method that creates a frame and then calls
5608 ``self.SetTopWindow(frame)``.
5609
5610 :see: `wx.PySimpleApp` for a simpler app class that can be used
5611 directly.
5612 """
5613
5614 outputWindowClass = PyOnDemandOutputWindow
5615
5616 def __init__(self, redirect=_defRedirect, filename=None,
5617 useBestVisual=False, clearSigInt=True):
5618 """
5619 Construct a ``wx.App`` object.
5620
5621 :param redirect: Should ``sys.stdout`` and ``sys.stderr`` be
5622 redirected? Defaults to True on Windows and Mac, False
5623 otherwise. If `filename` is None then output will be
5624 redirected to a window that pops up as needed. (You can
5625 control what kind of window is created for the output by
5626 resetting the class variable ``outputWindowClass`` to a
5627 class of your choosing.)
5628
5629 :param filename: The name of a file to redirect output to, if
5630 redirect is True.
5631
5632 :param useBestVisual: Should the app try to use the best
5633 available visual provided by the system (only relevant on
5634 systems that have more than one visual.) This parameter
5635 must be used instead of calling `SetUseBestVisual` later
5636 on because it must be set before the underlying GUI
5637 toolkit is initialized.
5638
5639 :param clearSigInt: Should SIGINT be cleared? This allows the
5640 app to terminate upon a Ctrl-C in the console like other
5641 GUI apps will.
5642
5643 :note: You should override OnInit to do applicaition
5644 initialization to ensure that the system, toolkit and
5645 wxWidgets are fully initialized.
5646 """
5647 wx.PyApp.__init__(self)
5648
5649 if wx.Platform == "__WXMAC__":
5650 try:
5651 import MacOS
5652 if not MacOS.WMAvailable():
5653 print """\
5654 This program needs access to the screen. Please run with 'pythonw',
5655 not 'python', and only when you are logged in on the main display of
5656 your Mac."""
5657 _sys.exit(1)
5658 except SystemExit:
5659 raise
5660 except:
5661 pass
5662
5663 # This has to be done before OnInit
5664 self.SetUseBestVisual(useBestVisual)
5665
5666 # Set the default handler for SIGINT. This fixes a problem
5667 # where if Ctrl-C is pressed in the console that started this
5668 # app then it will not appear to do anything, (not even send
5669 # KeyboardInterrupt???) but will later segfault on exit. By
5670 # setting the default handler then the app will exit, as
5671 # expected (depending on platform.)
5672 if clearSigInt:
5673 try:
5674 import signal
5675 signal.signal(signal.SIGINT, signal.SIG_DFL)
5676 except:
5677 pass
5678
5679 # Save and redirect the stdio to a window?
5680 self.stdioWin = None
5681 self.saveStdio = (_sys.stdout, _sys.stderr)
5682 if redirect:
5683 self.RedirectStdio(filename)
5684
5685 # Use Python's install prefix as the default
5686 wx.StandardPaths.Get().SetInstallPrefix(_sys.prefix)
5687
5688 # This finishes the initialization of wxWindows and then calls
5689 # the OnInit that should be present in the derived class
5690 self._BootstrapApp()
5691
5692
5693 def __del__(self):
5694 try:
5695 self.RestoreStdio() # Just in case the MainLoop was overridden
5696 except:
5697 pass
5698
5699
5700 def SetTopWindow(self, frame):
5701 """Set the \"main\" top level window"""
5702 if self.stdioWin:
5703 self.stdioWin.SetParent(frame)
5704 wx.PyApp.SetTopWindow(self, frame)
5705
5706
5707 def MainLoop(self):
5708 """Execute the main GUI event loop"""
5709 wx.PyApp.MainLoop(self)
5710 self.RestoreStdio()
5711
5712
5713 def RedirectStdio(self, filename=None):
5714 """Redirect sys.stdout and sys.stderr to a file or a popup window."""
5715 if filename:
5716 _sys.stdout = _sys.stderr = open(filename, 'a')
5717 else:
5718 self.stdioWin = self.outputWindowClass()
5719 _sys.stdout = _sys.stderr = self.stdioWin
5720
5721
5722 def RestoreStdio(self):
5723 _sys.stdout, _sys.stderr = self.saveStdio
5724
5725
5726 def SetOutputWindowAttributes(self, title=None, pos=None, size=None):
5727 """
5728 Set the title, position and/or size of the output window if
5729 the stdio has been redirected. This should be called before
5730 any output would cause the output window to be created.
5731 """
5732 if self.stdioWin:
5733 if title is not None:
5734 self.stdioWin.title = title
5735 if pos is not None:
5736 self.stdioWin.pos = pos
5737 if size is not None:
5738 self.stdioWin.size = size
5739
5740
5741
5742
5743 # change from wx.PyApp_XX to wx.App_XX
5744 App_GetMacSupportPCMenuShortcuts = _core_.PyApp_GetMacSupportPCMenuShortcuts
5745 App_GetMacAboutMenuItemId = _core_.PyApp_GetMacAboutMenuItemId
5746 App_GetMacPreferencesMenuItemId = _core_.PyApp_GetMacPreferencesMenuItemId
5747 App_GetMacExitMenuItemId = _core_.PyApp_GetMacExitMenuItemId
5748 App_GetMacHelpMenuTitleName = _core_.PyApp_GetMacHelpMenuTitleName
5749 App_SetMacSupportPCMenuShortcuts = _core_.PyApp_SetMacSupportPCMenuShortcuts
5750 App_SetMacAboutMenuItemId = _core_.PyApp_SetMacAboutMenuItemId
5751 App_SetMacPreferencesMenuItemId = _core_.PyApp_SetMacPreferencesMenuItemId
5752 App_SetMacExitMenuItemId = _core_.PyApp_SetMacExitMenuItemId
5753 App_SetMacHelpMenuTitleName = _core_.PyApp_SetMacHelpMenuTitleName
5754 App_GetComCtl32Version = _core_.PyApp_GetComCtl32Version
5755
5756 #----------------------------------------------------------------------------
5757
5758 class PySimpleApp(wx.App):
5759 """
5760 A simple application class. You can just create one of these and
5761 then then make your top level windows later, and not have to worry
5762 about OnInit. For example::
5763
5764 app = wx.PySimpleApp()
5765 frame = wx.Frame(None, title='Hello World')
5766 frame.Show()
5767 app.MainLoop()
5768
5769 :see: `wx.App`
5770 """
5771
5772 def __init__(self, redirect=False, filename=None,
5773 useBestVisual=False, clearSigInt=True):
5774 """
5775 :see: `wx.App.__init__`
5776 """
5777 wx.App.__init__(self, redirect, filename, useBestVisual, clearSigInt)
5778
5779 def OnInit(self):
5780 return True
5781
5782
5783
5784 # Is anybody using this one?
5785 class PyWidgetTester(wx.App):
5786 def __init__(self, size = (250, 100)):
5787 self.size = size
5788 wx.App.__init__(self, 0)
5789
5790 def OnInit(self):
5791 self.frame = wx.Frame(None, -1, "Widget Tester", pos=(0,0), size=self.size)
5792 self.SetTopWindow(self.frame)
5793 return True
5794
5795 def SetWidget(self, widgetClass, *args, **kwargs):
5796 w = widgetClass(self.frame, *args, **kwargs)
5797 self.frame.Show(True)
5798
5799 #----------------------------------------------------------------------------
5800 # DO NOT hold any other references to this object. This is how we
5801 # know when to cleanup system resources that wxWidgets is holding. When
5802 # the sys module is unloaded, the refcount on sys.__wxPythonCleanup
5803 # goes to zero and it calls the wx.App_CleanUp function.
5804
5805 class __wxPyCleanup:
5806 def __init__(self):
5807 self.cleanup = _core_.App_CleanUp
5808 def __del__(self):
5809 self.cleanup()
5810
5811 _sys.__wxPythonCleanup = __wxPyCleanup()
5812
5813 ## # another possible solution, but it gets called too early...
5814 ## import atexit
5815 ## atexit.register(_core_.wxApp_CleanUp)
5816
5817
5818 #----------------------------------------------------------------------------
5819
5820 #---------------------------------------------------------------------------
5821
5822 class EventLoop(object):
5823 """Proxy of C++ EventLoop class"""
5824 def __repr__(self):
5825 return "<%s.%s; proxy of C++ wxEventLoop instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
5826 def __init__(self, *args, **kwargs):
5827 """__init__(self) -> EventLoop"""
5828 newobj = _core_.new_EventLoop(*args, **kwargs)
5829 self.this = newobj.this
5830 self.thisown = 1
5831 del newobj.thisown
5832 def __del__(self, destroy=_core_.delete_EventLoop):
5833 """__del__(self)"""
5834 try:
5835 if self.thisown: destroy(self)
5836 except: pass
5837
5838 def Run(*args, **kwargs):
5839 """Run(self) -> int"""
5840 return _core_.EventLoop_Run(*args, **kwargs)
5841
5842 def Exit(*args, **kwargs):
5843 """Exit(self, int rc=0)"""
5844 return _core_.EventLoop_Exit(*args, **kwargs)
5845
5846 def Pending(*args, **kwargs):
5847 """Pending(self) -> bool"""
5848 return _core_.EventLoop_Pending(*args, **kwargs)
5849
5850 def Dispatch(*args, **kwargs):
5851 """Dispatch(self) -> bool"""
5852 return _core_.EventLoop_Dispatch(*args, **kwargs)
5853
5854 def IsRunning(*args, **kwargs):
5855 """IsRunning(self) -> bool"""
5856 return _core_.EventLoop_IsRunning(*args, **kwargs)
5857
5858 def GetActive(*args, **kwargs):
5859 """GetActive() -> EventLoop"""
5860 return _core_.EventLoop_GetActive(*args, **kwargs)
5861
5862 GetActive = staticmethod(GetActive)
5863 def SetActive(*args, **kwargs):
5864 """SetActive(EventLoop loop)"""
5865 return _core_.EventLoop_SetActive(*args, **kwargs)
5866
5867 SetActive = staticmethod(SetActive)
5868
5869 class EventLoopPtr(EventLoop):
5870 def __init__(self, this):
5871 self.this = this
5872 if not hasattr(self,"thisown"): self.thisown = 0
5873 self.__class__ = EventLoop
5874 _core_.EventLoop_swigregister(EventLoopPtr)
5875
5876 def EventLoop_GetActive(*args, **kwargs):
5877 """EventLoop_GetActive() -> EventLoop"""
5878 return _core_.EventLoop_GetActive(*args, **kwargs)
5879
5880 def EventLoop_SetActive(*args, **kwargs):
5881 """EventLoop_SetActive(EventLoop loop)"""
5882 return _core_.EventLoop_SetActive(*args, **kwargs)
5883
5884 #---------------------------------------------------------------------------
5885
5886 class AcceleratorEntry(object):
5887 """
5888 A class used to define items in an `wx.AcceleratorTable`. wxPython
5889 programs can choose to use wx.AcceleratorEntry objects, but using a
5890 list of 3-tuple of integers (flags, keyCode, cmdID) usually works just
5891 as well. See `__init__` for of the tuple values.
5892
5893 :see: `wx.AcceleratorTable`
5894 """
5895 def __repr__(self):
5896 return "<%s.%s; proxy of C++ wxAcceleratorEntry instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
5897 def __init__(self, *args, **kwargs):
5898 """
5899 __init__(self, int flags=0, int keyCode=0, int cmdID=0) -> AcceleratorEntry
5900
5901 Construct a wx.AcceleratorEntry.
5902 """
5903 newobj = _core_.new_AcceleratorEntry(*args, **kwargs)
5904 self.this = newobj.this
5905 self.thisown = 1
5906 del newobj.thisown
5907 def __del__(self, destroy=_core_.delete_AcceleratorEntry):
5908 """__del__(self)"""
5909 try:
5910 if self.thisown: destroy(self)
5911 except: pass
5912
5913 def Set(*args, **kwargs):
5914 """
5915 Set(self, int flags, int keyCode, int cmd)
5916
5917 (Re)set the attributes of a wx.AcceleratorEntry.
5918 :see `__init__`
5919 """
5920 return _core_.AcceleratorEntry_Set(*args, **kwargs)
5921
5922 def GetFlags(*args, **kwargs):
5923 """
5924 GetFlags(self) -> int
5925
5926 Get the AcceleratorEntry's flags.
5927 """
5928 return _core_.AcceleratorEntry_GetFlags(*args, **kwargs)
5929
5930 def GetKeyCode(*args, **kwargs):
5931 """
5932 GetKeyCode(self) -> int
5933
5934 Get the AcceleratorEntry's keycode.
5935 """
5936 return _core_.AcceleratorEntry_GetKeyCode(*args, **kwargs)
5937
5938 def GetCommand(*args, **kwargs):
5939 """
5940 GetCommand(self) -> int
5941
5942 Get the AcceleratorEntry's command ID.
5943 """
5944 return _core_.AcceleratorEntry_GetCommand(*args, **kwargs)
5945
5946
5947 class AcceleratorEntryPtr(AcceleratorEntry):
5948 def __init__(self, this):
5949 self.this = this
5950 if not hasattr(self,"thisown"): self.thisown = 0
5951 self.__class__ = AcceleratorEntry
5952 _core_.AcceleratorEntry_swigregister(AcceleratorEntryPtr)
5953
5954 class AcceleratorTable(Object):
5955 """
5956 An accelerator table allows the application to specify a table of
5957 keyboard shortcuts for menus or other commands. On Windows, menu or
5958 button commands are supported; on GTK, only menu commands are
5959 supported.
5960 """
5961 def __repr__(self):
5962 return "<%s.%s; proxy of C++ wxAcceleratorTable instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
5963 def __init__(self, *args, **kwargs):
5964 """
5965 __init__(entries) -> AcceleratorTable
5966
5967 Construct an AcceleratorTable from a list of `wx.AcceleratorEntry`
5968 items or or of 3-tuples (flags, keyCode, cmdID)
5969
5970 :see: `wx.AcceleratorEntry`
5971 """
5972 newobj = _core_.new_AcceleratorTable(*args, **kwargs)
5973 self.this = newobj.this
5974 self.thisown = 1
5975 del newobj.thisown
5976 def __del__(self, destroy=_core_.delete_AcceleratorTable):
5977 """__del__(self)"""
5978 try:
5979 if self.thisown: destroy(self)
5980 except: pass
5981
5982 def Ok(*args, **kwargs):
5983 """Ok(self) -> bool"""
5984 return _core_.AcceleratorTable_Ok(*args, **kwargs)
5985
5986
5987 class AcceleratorTablePtr(AcceleratorTable):
5988 def __init__(self, this):
5989 self.this = this
5990 if not hasattr(self,"thisown"): self.thisown = 0
5991 self.__class__ = AcceleratorTable
5992 _core_.AcceleratorTable_swigregister(AcceleratorTablePtr)
5993
5994
5995 def GetAccelFromString(*args, **kwargs):
5996 """GetAccelFromString(String label) -> AcceleratorEntry"""
5997 return _core_.GetAccelFromString(*args, **kwargs)
5998 #---------------------------------------------------------------------------
5999
6000 class VisualAttributes(object):
6001 """struct containing all the visual attributes of a control"""
6002 def __repr__(self):
6003 return "<%s.%s; proxy of C++ wxVisualAttributes instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
6004 def __init__(self, *args, **kwargs):
6005 """
6006 __init__(self) -> VisualAttributes
6007
6008 struct containing all the visual attributes of a control
6009 """
6010 newobj = _core_.new_VisualAttributes(*args, **kwargs)
6011 self.this = newobj.this
6012 self.thisown = 1
6013 del newobj.thisown
6014 def __del__(self, destroy=_core_.delete_VisualAttributes):
6015 """__del__(self)"""
6016 try:
6017 if self.thisown: destroy(self)
6018 except: pass
6019
6020 font = property(_core_.VisualAttributes_font_get, _core_.VisualAttributes_font_set)
6021 colFg = property(_core_.VisualAttributes_colFg_get, _core_.VisualAttributes_colFg_set)
6022 colBg = property(_core_.VisualAttributes_colBg_get, _core_.VisualAttributes_colBg_set)
6023
6024 class VisualAttributesPtr(VisualAttributes):
6025 def __init__(self, this):
6026 self.this = this
6027 if not hasattr(self,"thisown"): self.thisown = 0
6028 self.__class__ = VisualAttributes
6029 _core_.VisualAttributes_swigregister(VisualAttributesPtr)
6030 NullAcceleratorTable = cvar.NullAcceleratorTable
6031 PanelNameStr = cvar.PanelNameStr
6032
6033 WINDOW_VARIANT_NORMAL = _core_.WINDOW_VARIANT_NORMAL
6034 WINDOW_VARIANT_SMALL = _core_.WINDOW_VARIANT_SMALL
6035 WINDOW_VARIANT_MINI = _core_.WINDOW_VARIANT_MINI
6036 WINDOW_VARIANT_LARGE = _core_.WINDOW_VARIANT_LARGE
6037 WINDOW_VARIANT_MAX = _core_.WINDOW_VARIANT_MAX
6038 class Window(EvtHandler):
6039 """
6040 wx.Window is the base class for all windows and represents any visible
6041 object on the screen. All controls, top level windows and so on are
6042 wx.Windows. Sizers and device contexts are not however, as they don't
6043 appear on screen themselves.
6044
6045 """
6046 def __repr__(self):
6047 return "<%s.%s; proxy of C++ wxWindow instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
6048 def __init__(self, *args, **kwargs):
6049 """
6050 __init__(self, Window parent, int id=-1, Point pos=DefaultPosition,
6051 Size size=DefaultSize, long style=0, String name=PanelNameStr) -> Window
6052
6053 Construct and show a generic Window.
6054 """
6055 newobj = _core_.new_Window(*args, **kwargs)
6056 self.this = newobj.this
6057 self.thisown = 1
6058 del newobj.thisown
6059 self._setOORInfo(self)
6060
6061 def Create(*args, **kwargs):
6062 """
6063 Create(self, Window parent, int id=-1, Point pos=DefaultPosition,
6064 Size size=DefaultSize, long style=0, String name=PanelNameStr) -> bool
6065
6066 Create the GUI part of the Window for 2-phase creation mode.
6067 """
6068 return _core_.Window_Create(*args, **kwargs)
6069
6070 def Close(*args, **kwargs):
6071 """
6072 Close(self, bool force=False) -> bool
6073
6074 This function simply generates a EVT_CLOSE event whose handler usually
6075 tries to close the window. It doesn't close the window itself,
6076 however. If force is False (the default) then the window's close
6077 handler will be allowed to veto the destruction of the window.
6078 """
6079 return _core_.Window_Close(*args, **kwargs)
6080
6081 def Destroy(*args, **kwargs):
6082 """
6083 Destroy(self) -> bool
6084
6085 Destroys the window safely. Frames and dialogs are not destroyed
6086 immediately when this function is called -- they are added to a list
6087 of windows to be deleted on idle time, when all the window's events
6088 have been processed. This prevents problems with events being sent to
6089 non-existent windows.
6090
6091 Returns True if the window has either been successfully deleted, or it
6092 has been added to the list of windows pending real deletion.
6093 """
6094 return _core_.Window_Destroy(*args, **kwargs)
6095
6096 def DestroyChildren(*args, **kwargs):
6097 """
6098 DestroyChildren(self) -> bool
6099
6100 Destroys all children of a window. Called automatically by the
6101 destructor.
6102 """
6103 return _core_.Window_DestroyChildren(*args, **kwargs)
6104
6105 def IsBeingDeleted(*args, **kwargs):
6106 """
6107 IsBeingDeleted(self) -> bool
6108
6109 Is the window in the process of being deleted?
6110 """
6111 return _core_.Window_IsBeingDeleted(*args, **kwargs)
6112
6113 def SetTitle(*args, **kwargs):
6114 """
6115 SetTitle(self, String title)
6116
6117 Sets the window's title. Applicable only to frames and dialogs.
6118 """
6119 return _core_.Window_SetTitle(*args, **kwargs)
6120
6121 def GetTitle(*args, **kwargs):
6122 """
6123 GetTitle(self) -> String
6124
6125 Gets the window's title. Applicable only to frames and dialogs.
6126 """
6127 return _core_.Window_GetTitle(*args, **kwargs)
6128
6129 def SetLabel(*args, **kwargs):
6130 """
6131 SetLabel(self, String label)
6132
6133 Set the text which the window shows in its label if applicable.
6134 """
6135 return _core_.Window_SetLabel(*args, **kwargs)
6136
6137 def GetLabel(*args, **kwargs):
6138 """
6139 GetLabel(self) -> String
6140
6141 Generic way of getting a label from any window, for identification
6142 purposes. The interpretation of this function differs from class to
6143 class. For frames and dialogs, the value returned is the title. For
6144 buttons or static text controls, it is the button text. This function
6145 can be useful for meta-programs such as testing tools or special-needs
6146 access programs)which need to identify windows by name.
6147 """
6148 return _core_.Window_GetLabel(*args, **kwargs)
6149
6150 def SetName(*args, **kwargs):
6151 """
6152 SetName(self, String name)
6153
6154 Sets the window's name. The window name is used for ressource setting
6155 in X, it is not the same as the window title/label
6156 """
6157 return _core_.Window_SetName(*args, **kwargs)
6158
6159 def GetName(*args, **kwargs):
6160 """
6161 GetName(self) -> String
6162
6163 Returns the windows name. This name is not guaranteed to be unique;
6164 it is up to the programmer to supply an appropriate name in the window
6165 constructor or via wx.Window.SetName.
6166 """
6167 return _core_.Window_GetName(*args, **kwargs)
6168
6169 def SetWindowVariant(*args, **kwargs):
6170 """
6171 SetWindowVariant(self, int variant)
6172
6173 Sets the variant of the window/font size to use for this window, if
6174 the platform supports variants, for example, wxMac.
6175 """
6176 return _core_.Window_SetWindowVariant(*args, **kwargs)
6177
6178 def GetWindowVariant(*args, **kwargs):
6179 """GetWindowVariant(self) -> int"""
6180 return _core_.Window_GetWindowVariant(*args, **kwargs)
6181
6182 def SetId(*args, **kwargs):
6183 """
6184 SetId(self, int winid)
6185
6186 Sets the identifier of the window. Each window has an integer
6187 identifier. If the application has not provided one, an identifier
6188 will be generated. Normally, the identifier should be provided on
6189 creation and should not be modified subsequently.
6190 """
6191 return _core_.Window_SetId(*args, **kwargs)
6192
6193 def GetId(*args, **kwargs):
6194 """
6195 GetId(self) -> int
6196
6197 Returns the identifier of the window. Each window has an integer
6198 identifier. If the application has not provided one (or the default Id
6199 -1 is used) then an unique identifier with a negative value will be
6200 generated.
6201 """
6202 return _core_.Window_GetId(*args, **kwargs)
6203
6204 def NewControlId(*args, **kwargs):
6205 """
6206 NewControlId() -> int
6207
6208 Generate a control id for the controls which were not given one.
6209 """
6210 return _core_.Window_NewControlId(*args, **kwargs)
6211
6212 NewControlId = staticmethod(NewControlId)
6213 def NextControlId(*args, **kwargs):
6214 """
6215 NextControlId(int winid) -> int
6216
6217 Get the id of the control following the one with the given
6218 autogenerated) id
6219 """
6220 return _core_.Window_NextControlId(*args, **kwargs)
6221
6222 NextControlId = staticmethod(NextControlId)
6223 def PrevControlId(*args, **kwargs):
6224 """
6225 PrevControlId(int winid) -> int
6226
6227 Get the id of the control preceding the one with the given
6228 autogenerated) id
6229 """
6230 return _core_.Window_PrevControlId(*args, **kwargs)
6231
6232 PrevControlId = staticmethod(PrevControlId)
6233 def SetSize(*args, **kwargs):
6234 """
6235 SetSize(self, Size size)
6236
6237 Sets the size of the window in pixels.
6238 """
6239 return _core_.Window_SetSize(*args, **kwargs)
6240
6241 def SetDimensions(*args, **kwargs):
6242 """
6243 SetDimensions(self, int x, int y, int width, int height, int sizeFlags=SIZE_AUTO)
6244
6245 Sets the position and size of the window in pixels. The sizeFlags
6246 parameter indicates the interpretation of the other params if they are
6247 equal to -1.
6248
6249 ======================== ======================================
6250 wx.SIZE_AUTO A -1 indicates that a class-specific
6251 default should be used.
6252 wx.SIZE_USE_EXISTING Axisting dimensions should be used if
6253 -1 values are supplied.
6254 wxSIZE_ALLOW_MINUS_ONE Allow dimensions of -1 and less to be
6255 interpreted as real dimensions, not
6256 default values.
6257 ======================== ======================================
6258
6259 """
6260 return _core_.Window_SetDimensions(*args, **kwargs)
6261
6262 def SetRect(*args, **kwargs):
6263 """
6264 SetRect(self, Rect rect, int sizeFlags=SIZE_AUTO)
6265
6266 Sets the position and size of the window in pixels using a wx.Rect.
6267 """
6268 return _core_.Window_SetRect(*args, **kwargs)
6269
6270 def SetSizeWH(*args, **kwargs):
6271 """
6272 SetSizeWH(self, int width, int height)
6273
6274 Sets the size of the window in pixels.
6275 """
6276 return _core_.Window_SetSizeWH(*args, **kwargs)
6277
6278 def Move(*args, **kwargs):
6279 """
6280 Move(self, Point pt, int flags=SIZE_USE_EXISTING)
6281
6282 Moves the window to the given position.
6283 """
6284 return _core_.Window_Move(*args, **kwargs)
6285
6286 SetPosition = Move
6287 def MoveXY(*args, **kwargs):
6288 """
6289 MoveXY(self, int x, int y, int flags=SIZE_USE_EXISTING)
6290
6291 Moves the window to the given position.
6292 """
6293 return _core_.Window_MoveXY(*args, **kwargs)
6294
6295 def SetBestFittingSize(*args, **kwargs):
6296 """
6297 SetBestFittingSize(self, Size size=DefaultSize)
6298
6299 A 'Smart' SetSize that will fill in default size components with the
6300 window's *best size* values. Also set's the minsize for use with sizers.
6301 """
6302 return _core_.Window_SetBestFittingSize(*args, **kwargs)
6303
6304 def Raise(*args, **kwargs):
6305 """
6306 Raise(self)
6307
6308 Raises the window to the top of the window hierarchy if it is a
6309 managed window (dialog or frame).
6310 """
6311 return _core_.Window_Raise(*args, **kwargs)
6312
6313 def Lower(*args, **kwargs):
6314 """
6315 Lower(self)
6316
6317 Lowers the window to the bottom of the window hierarchy if it is a
6318 managed window (dialog or frame).
6319 """
6320 return _core_.Window_Lower(*args, **kwargs)
6321
6322 def SetClientSize(*args, **kwargs):
6323 """
6324 SetClientSize(self, Size size)
6325
6326 This sets the size of the window client area in pixels. Using this
6327 function to size a window tends to be more device-independent than
6328 wx.Window.SetSize, since the application need not worry about what
6329 dimensions the border or title bar have when trying to fit the window
6330 around panel items, for example.
6331 """
6332 return _core_.Window_SetClientSize(*args, **kwargs)
6333
6334 def SetClientSizeWH(*args, **kwargs):
6335 """
6336 SetClientSizeWH(self, int width, int height)
6337
6338 This sets the size of the window client area in pixels. Using this
6339 function to size a window tends to be more device-independent than
6340 wx.Window.SetSize, since the application need not worry about what
6341 dimensions the border or title bar have when trying to fit the window
6342 around panel items, for example.
6343 """
6344 return _core_.Window_SetClientSizeWH(*args, **kwargs)
6345
6346 def SetClientRect(*args, **kwargs):
6347 """
6348 SetClientRect(self, Rect rect)
6349
6350 This sets the size of the window client area in pixels. Using this
6351 function to size a window tends to be more device-independent than
6352 wx.Window.SetSize, since the application need not worry about what
6353 dimensions the border or title bar have when trying to fit the window
6354 around panel items, for example.
6355 """
6356 return _core_.Window_SetClientRect(*args, **kwargs)
6357
6358 def GetPosition(*args, **kwargs):
6359 """
6360 GetPosition(self) -> Point
6361
6362 Get the window's position.
6363 """
6364 return _core_.Window_GetPosition(*args, **kwargs)
6365
6366 def GetPositionTuple(*args, **kwargs):
6367 """
6368 GetPositionTuple() -> (x,y)
6369
6370 Get the window's position.
6371 """
6372 return _core_.Window_GetPositionTuple(*args, **kwargs)
6373
6374 def GetSize(*args, **kwargs):
6375 """
6376 GetSize(self) -> Size
6377
6378 Get the window size.
6379 """
6380 return _core_.Window_GetSize(*args, **kwargs)
6381
6382 def GetSizeTuple(*args, **kwargs):
6383 """
6384 GetSizeTuple() -> (width, height)
6385
6386 Get the window size.
6387 """
6388 return _core_.Window_GetSizeTuple(*args, **kwargs)
6389
6390 def GetRect(*args, **kwargs):
6391 """
6392 GetRect(self) -> Rect
6393
6394 Returns the size and position of the window as a wx.Rect object.
6395 """
6396 return _core_.Window_GetRect(*args, **kwargs)
6397
6398 def GetClientSize(*args, **kwargs):
6399 """
6400 GetClientSize(self) -> Size
6401
6402 This gets the size of the window's 'client area' in pixels. The client
6403 area is the area which may be drawn on by the programmer, excluding
6404 title bar, border, scrollbars, etc.
6405 """
6406 return _core_.Window_GetClientSize(*args, **kwargs)
6407
6408 def GetClientSizeTuple(*args, **kwargs):
6409 """
6410 GetClientSizeTuple() -> (width, height)
6411
6412 This gets the size of the window's 'client area' in pixels. The client
6413 area is the area which may be drawn on by the programmer, excluding
6414 title bar, border, scrollbars, etc.
6415 """
6416 return _core_.Window_GetClientSizeTuple(*args, **kwargs)
6417
6418 def GetClientAreaOrigin(*args, **kwargs):
6419 """
6420 GetClientAreaOrigin(self) -> Point
6421
6422 Get the origin of the client area of the window relative to the
6423 window's top left corner (the client area may be shifted because of
6424 the borders, scrollbars, other decorations...)
6425 """
6426 return _core_.Window_GetClientAreaOrigin(*args, **kwargs)
6427
6428 def GetClientRect(*args, **kwargs):
6429 """
6430 GetClientRect(self) -> Rect
6431
6432 Get the client area position and size as a `wx.Rect` object.
6433 """
6434 return _core_.Window_GetClientRect(*args, **kwargs)
6435
6436 def GetBestSize(*args, **kwargs):
6437 """
6438 GetBestSize(self) -> Size
6439
6440 This function returns the best acceptable minimal size for the
6441 window, if applicable. For example, for a static text control, it will
6442 be the minimal size such that the control label is not truncated. For
6443 windows containing subwindows (suzh aswx.Panel), the size returned by
6444 this function will be the same as the size the window would have had
6445 after calling Fit.
6446 """
6447 return _core_.Window_GetBestSize(*args, **kwargs)
6448
6449 def GetBestSizeTuple(*args, **kwargs):
6450 """
6451 GetBestSizeTuple() -> (width, height)
6452
6453 This function returns the best acceptable minimal size for the
6454 window, if applicable. For example, for a static text control, it will
6455 be the minimal size such that the control label is not truncated. For
6456 windows containing subwindows (suzh aswx.Panel), the size returned by
6457 this function will be the same as the size the window would have had
6458 after calling Fit.
6459 """
6460 return _core_.Window_GetBestSizeTuple(*args, **kwargs)
6461
6462 def InvalidateBestSize(*args, **kwargs):
6463 """
6464 InvalidateBestSize(self)
6465
6466 Reset the cached best size value so it will be recalculated the next
6467 time it is needed.
6468 """
6469 return _core_.Window_InvalidateBestSize(*args, **kwargs)
6470
6471 def GetBestFittingSize(*args, **kwargs):
6472 """
6473 GetBestFittingSize(self) -> Size
6474
6475 This function will merge the window's best size into the window's
6476 minimum size, giving priority to the min size components, and returns
6477 the results.
6478
6479 """
6480 return _core_.Window_GetBestFittingSize(*args, **kwargs)
6481
6482 def GetAdjustedBestSize(*args, **kwargs):
6483 """
6484 GetAdjustedBestSize(self) -> Size
6485
6486 This method is similar to GetBestSize, except in one
6487 thing. GetBestSize should return the minimum untruncated size of the
6488 window, while this method will return the largest of BestSize and any
6489 user specified minimum size. ie. it is the minimum size the window
6490 should currently be drawn at, not the minimal size it can possibly
6491 tolerate.
6492 """
6493 return _core_.Window_GetAdjustedBestSize(*args, **kwargs)
6494
6495 def Center(*args, **kwargs):
6496 """
6497 Center(self, int direction=BOTH)
6498
6499 Centers the window. The parameter specifies the direction for
6500 cetering, and may be wx.HORIZONTAL, wx.VERTICAL or wx.BOTH. It may
6501 also include wx.CENTER_ON_SCREEN flag if you want to center the window
6502 on the entire screen and not on its parent window. If it is a
6503 top-level window and has no parent then it will always be centered
6504 relative to the screen.
6505 """
6506 return _core_.Window_Center(*args, **kwargs)
6507
6508 Centre = Center
6509 def CenterOnScreen(*args, **kwargs):
6510 """
6511 CenterOnScreen(self, int dir=BOTH)
6512
6513 Center on screen (only works for top level windows)
6514 """
6515 return _core_.Window_CenterOnScreen(*args, **kwargs)
6516
6517 CentreOnScreen = CenterOnScreen
6518 def CenterOnParent(*args, **kwargs):
6519 """
6520 CenterOnParent(self, int dir=BOTH)
6521
6522 Center with respect to the the parent window
6523 """
6524 return _core_.Window_CenterOnParent(*args, **kwargs)
6525
6526 CentreOnParent = CenterOnParent
6527 def Fit(*args, **kwargs):
6528 """
6529 Fit(self)
6530
6531 Sizes the window so that it fits around its subwindows. This function
6532 won't do anything if there are no subwindows and will only really work
6533 correctly if sizers are used for the subwindows layout. Also, if the
6534 window has exactly one subwindow it is better (faster and the result
6535 is more precise as Fit adds some margin to account for fuzziness of
6536 its calculations) to call window.SetClientSize(child.GetSize())
6537 instead of calling Fit.
6538 """
6539 return _core_.Window_Fit(*args, **kwargs)
6540
6541 def FitInside(*args, **kwargs):
6542 """
6543 FitInside(self)
6544
6545 Similar to Fit, but sizes the interior (virtual) size of a
6546 window. Mainly useful with scrolled windows to reset scrollbars after
6547 sizing changes that do not trigger a size event, and/or scrolled
6548 windows without an interior sizer. This function similarly won't do
6549 anything if there are no subwindows.
6550 """
6551 return _core_.Window_FitInside(*args, **kwargs)
6552
6553 def SetSizeHints(*args, **kwargs):
6554 """
6555 SetSizeHints(self, int minW, int minH, int maxW=-1, int maxH=-1, int incW=-1,
6556 int incH=-1)
6557
6558 Allows specification of minimum and maximum window sizes, and window
6559 size increments. If a pair of values is not set (or set to -1), the
6560 default values will be used. If this function is called, the user
6561 will not be able to size the window outside the given bounds (if it is
6562 a top-level window.) Sizers will also inspect the minimum window size
6563 and will use that value if set when calculating layout.
6564
6565 The resizing increments are only significant under Motif or Xt.
6566 """
6567 return _core_.Window_SetSizeHints(*args, **kwargs)
6568
6569 def SetSizeHintsSz(*args, **kwargs):
6570 """
6571 SetSizeHintsSz(self, Size minSize, Size maxSize=DefaultSize, Size incSize=DefaultSize)
6572
6573 Allows specification of minimum and maximum window sizes, and window
6574 size increments. If a pair of values is not set (or set to -1), the
6575 default values will be used. If this function is called, the user
6576 will not be able to size the window outside the given bounds (if it is
6577 a top-level window.) Sizers will also inspect the minimum window size
6578 and will use that value if set when calculating layout.
6579
6580 The resizing increments are only significant under Motif or Xt.
6581 """
6582 return _core_.Window_SetSizeHintsSz(*args, **kwargs)
6583
6584 def SetVirtualSizeHints(*args, **kwargs):
6585 """
6586 SetVirtualSizeHints(self, int minW, int minH, int maxW=-1, int maxH=-1)
6587
6588 Allows specification of minimum and maximum virtual window sizes. If a
6589 pair of values is not set (or set to -1), the default values will be
6590 used. If this function is called, the user will not be able to size
6591 the virtual area of the window outside the given bounds.
6592 """
6593 return _core_.Window_SetVirtualSizeHints(*args, **kwargs)
6594
6595 def SetVirtualSizeHintsSz(*args, **kwargs):
6596 """
6597 SetVirtualSizeHintsSz(self, Size minSize, Size maxSize=DefaultSize)
6598
6599 Allows specification of minimum and maximum virtual window sizes. If a
6600 pair of values is not set (or set to -1), the default values will be
6601 used. If this function is called, the user will not be able to size
6602 the virtual area of the window outside the given bounds.
6603 """
6604 return _core_.Window_SetVirtualSizeHintsSz(*args, **kwargs)
6605
6606 def GetMaxSize(*args, **kwargs):
6607 """GetMaxSize(self) -> Size"""
6608 return _core_.Window_GetMaxSize(*args, **kwargs)
6609
6610 def GetMinSize(*args, **kwargs):
6611 """GetMinSize(self) -> Size"""
6612 return _core_.Window_GetMinSize(*args, **kwargs)
6613
6614 def SetMinSize(*args, **kwargs):
6615 """
6616 SetMinSize(self, Size minSize)
6617
6618 A more convenient method than `SetSizeHints` for setting just the
6619 min size.
6620 """
6621 return _core_.Window_SetMinSize(*args, **kwargs)
6622
6623 def SetMaxSize(*args, **kwargs):
6624 """
6625 SetMaxSize(self, Size maxSize)
6626
6627 A more convenient method than `SetSizeHints` for setting just the
6628 max size.
6629 """
6630 return _core_.Window_SetMaxSize(*args, **kwargs)
6631
6632 def GetMinWidth(*args, **kwargs):
6633 """GetMinWidth(self) -> int"""
6634 return _core_.Window_GetMinWidth(*args, **kwargs)
6635
6636 def GetMinHeight(*args, **kwargs):
6637 """GetMinHeight(self) -> int"""
6638 return _core_.Window_GetMinHeight(*args, **kwargs)
6639
6640 def GetMaxWidth(*args, **kwargs):
6641 """GetMaxWidth(self) -> int"""
6642 return _core_.Window_GetMaxWidth(*args, **kwargs)
6643
6644 def GetMaxHeight(*args, **kwargs):
6645 """GetMaxHeight(self) -> int"""
6646 return _core_.Window_GetMaxHeight(*args, **kwargs)
6647
6648 def SetVirtualSize(*args, **kwargs):
6649 """
6650 SetVirtualSize(self, Size size)
6651
6652 Set the the virtual size of a window in pixels. For most windows this
6653 is just the client area of the window, but for some like scrolled
6654 windows it is more or less independent of the screen window size.
6655 """
6656 return _core_.Window_SetVirtualSize(*args, **kwargs)
6657
6658 def SetVirtualSizeWH(*args, **kwargs):
6659 """
6660 SetVirtualSizeWH(self, int w, int h)
6661
6662 Set the the virtual size of a window in pixels. For most windows this
6663 is just the client area of the window, but for some like scrolled
6664 windows it is more or less independent of the screen window size.
6665 """
6666 return _core_.Window_SetVirtualSizeWH(*args, **kwargs)
6667
6668 def GetVirtualSize(*args, **kwargs):
6669 """
6670 GetVirtualSize(self) -> Size
6671
6672 Get the the virtual size of the window in pixels. For most windows
6673 this is just the client area of the window, but for some like scrolled
6674 windows it is more or less independent of the screen window size.
6675 """
6676 return _core_.Window_GetVirtualSize(*args, **kwargs)
6677
6678 def GetVirtualSizeTuple(*args, **kwargs):
6679 """
6680 GetVirtualSizeTuple() -> (width, height)
6681
6682 Get the the virtual size of the window in pixels. For most windows
6683 this is just the client area of the window, but for some like scrolled
6684 windows it is more or less independent of the screen window size.
6685 """
6686 return _core_.Window_GetVirtualSizeTuple(*args, **kwargs)
6687
6688 def GetBestVirtualSize(*args, **kwargs):
6689 """
6690 GetBestVirtualSize(self) -> Size
6691
6692 Return the largest of ClientSize and BestSize (as determined by a
6693 sizer, interior children, or other means)
6694 """
6695 return _core_.Window_GetBestVirtualSize(*args, **kwargs)
6696
6697 def Show(*args, **kwargs):
6698 """
6699 Show(self, bool show=True) -> bool
6700
6701 Shows or hides the window. You may need to call Raise for a top level
6702 window if you want to bring it to top, although this is not needed if
6703 Show is called immediately after the frame creation. Returns True if
6704 the window has been shown or hidden or False if nothing was done
6705 because it already was in the requested state.
6706 """
6707 return _core_.Window_Show(*args, **kwargs)
6708
6709 def Hide(*args, **kwargs):
6710 """
6711 Hide(self) -> bool
6712
6713 Equivalent to calling Show(False).
6714 """
6715 return _core_.Window_Hide(*args, **kwargs)
6716
6717 def Enable(*args, **kwargs):
6718 """
6719 Enable(self, bool enable=True) -> bool
6720
6721 Enable or disable the window for user input. Note that when a parent
6722 window is disabled, all of its children are disabled as well and they
6723 are reenabled again when the parent is. Returns true if the window
6724 has been enabled or disabled, false if nothing was done, i.e. if the
6725 window had already been in the specified state.
6726 """
6727 return _core_.Window_Enable(*args, **kwargs)
6728
6729 def Disable(*args, **kwargs):
6730 """
6731 Disable(self) -> bool
6732
6733 Disables the window, same as Enable(false).
6734 """
6735 return _core_.Window_Disable(*args, **kwargs)
6736
6737 def IsShown(*args, **kwargs):
6738 """
6739 IsShown(self) -> bool
6740
6741 Returns true if the window is shown, false if it has been hidden.
6742 """
6743 return _core_.Window_IsShown(*args, **kwargs)
6744
6745 def IsEnabled(*args, **kwargs):
6746 """
6747 IsEnabled(self) -> bool
6748
6749 Returns true if the window is enabled for input, false otherwise.
6750 """
6751 return _core_.Window_IsEnabled(*args, **kwargs)
6752
6753 def SetWindowStyleFlag(*args, **kwargs):
6754 """
6755 SetWindowStyleFlag(self, long style)
6756
6757 Sets the style of the window. Please note that some styles cannot be
6758 changed after the window creation and that Refresh() might need to be
6759 called after changing the others for the change to take place
6760 immediately.
6761 """
6762 return _core_.Window_SetWindowStyleFlag(*args, **kwargs)
6763
6764 def GetWindowStyleFlag(*args, **kwargs):
6765 """
6766 GetWindowStyleFlag(self) -> long
6767
6768 Gets the window style that was passed to the constructor or Create
6769 method.
6770 """
6771 return _core_.Window_GetWindowStyleFlag(*args, **kwargs)
6772
6773 SetWindowStyle = SetWindowStyleFlag; GetWindowStyle = GetWindowStyleFlag
6774 def HasFlag(*args, **kwargs):
6775 """
6776 HasFlag(self, int flag) -> bool
6777
6778 Test if the given style is set for this window.
6779 """
6780 return _core_.Window_HasFlag(*args, **kwargs)
6781
6782 def IsRetained(*args, **kwargs):
6783 """
6784 IsRetained(self) -> bool
6785
6786 Returns true if the window is retained, false otherwise. Retained
6787 windows are only available on X platforms.
6788 """
6789 return _core_.Window_IsRetained(*args, **kwargs)
6790
6791 def SetExtraStyle(*args, **kwargs):
6792 """
6793 SetExtraStyle(self, long exStyle)
6794
6795 Sets the extra style bits for the window. Extra styles are the less
6796 often used style bits which can't be set with the constructor or with
6797 SetWindowStyleFlag()
6798 """
6799 return _core_.Window_SetExtraStyle(*args, **kwargs)
6800
6801 def GetExtraStyle(*args, **kwargs):
6802 """
6803 GetExtraStyle(self) -> long
6804
6805 Returns the extra style bits for the window.
6806 """
6807 return _core_.Window_GetExtraStyle(*args, **kwargs)
6808
6809 def MakeModal(*args, **kwargs):
6810 """
6811 MakeModal(self, bool modal=True)
6812
6813 Disables all other windows in the application so that the user can
6814 only interact with this window. Passing False will reverse this
6815 effect.
6816 """
6817 return _core_.Window_MakeModal(*args, **kwargs)
6818
6819 def SetThemeEnabled(*args, **kwargs):
6820 """
6821 SetThemeEnabled(self, bool enableTheme)
6822
6823 This function tells a window if it should use the system's "theme"
6824 code to draw the windows' background instead if its own background
6825 drawing code. This will only have an effect on platforms that support
6826 the notion of themes in user defined windows. One such platform is
6827 GTK+ where windows can have (very colourful) backgrounds defined by a
6828 user's selected theme.
6829
6830 Dialogs, notebook pages and the status bar have this flag set to true
6831 by default so that the default look and feel is simulated best.
6832 """
6833 return _core_.Window_SetThemeEnabled(*args, **kwargs)
6834
6835 def GetThemeEnabled(*args, **kwargs):
6836 """
6837 GetThemeEnabled(self) -> bool
6838
6839 Return the themeEnabled flag.
6840 """
6841 return _core_.Window_GetThemeEnabled(*args, **kwargs)
6842
6843 def SetFocus(*args, **kwargs):
6844 """
6845 SetFocus(self)
6846
6847 Set's the focus to this window, allowing it to receive keyboard input.
6848 """
6849 return _core_.Window_SetFocus(*args, **kwargs)
6850
6851 def SetFocusFromKbd(*args, **kwargs):
6852 """
6853 SetFocusFromKbd(self)
6854
6855 Set focus to this window as the result of a keyboard action. Normally
6856 only called internally.
6857 """
6858 return _core_.Window_SetFocusFromKbd(*args, **kwargs)
6859
6860 def FindFocus(*args, **kwargs):
6861 """
6862 FindFocus() -> Window
6863
6864 Returns the window or control that currently has the keyboard focus,
6865 or None.
6866 """
6867 return _core_.Window_FindFocus(*args, **kwargs)
6868
6869 FindFocus = staticmethod(FindFocus)
6870 def AcceptsFocus(*args, **kwargs):
6871 """
6872 AcceptsFocus(self) -> bool
6873
6874 Can this window have focus?
6875 """
6876 return _core_.Window_AcceptsFocus(*args, **kwargs)
6877
6878 def AcceptsFocusFromKeyboard(*args, **kwargs):
6879 """
6880 AcceptsFocusFromKeyboard(self) -> bool
6881
6882 Can this window be given focus by keyboard navigation? if not, the
6883 only way to give it focus (provided it accepts it at all) is to click
6884 it.
6885 """
6886 return _core_.Window_AcceptsFocusFromKeyboard(*args, **kwargs)
6887
6888 def GetDefaultItem(*args, **kwargs):
6889 """
6890 GetDefaultItem(self) -> Window
6891
6892 Get the default child of this parent, i.e. the one which is activated
6893 by pressing <Enter> such as the OK button on a wx.Dialog.
6894 """
6895 return _core_.Window_GetDefaultItem(*args, **kwargs)
6896
6897 def SetDefaultItem(*args, **kwargs):
6898 """
6899 SetDefaultItem(self, Window child) -> Window
6900
6901 Set this child as default, return the old default.
6902 """
6903 return _core_.Window_SetDefaultItem(*args, **kwargs)
6904
6905 def SetTmpDefaultItem(*args, **kwargs):
6906 """
6907 SetTmpDefaultItem(self, Window win)
6908
6909 Set this child as temporary default
6910 """
6911 return _core_.Window_SetTmpDefaultItem(*args, **kwargs)
6912
6913 def Navigate(*args, **kwargs):
6914 """
6915 Navigate(self, int flags=NavigationKeyEvent.IsForward) -> bool
6916
6917 Does keyboard navigation from this window to another, by sending a
6918 `wx.NavigationKeyEvent`.
6919 """
6920 return _core_.Window_Navigate(*args, **kwargs)
6921
6922 def MoveAfterInTabOrder(*args, **kwargs):
6923 """
6924 MoveAfterInTabOrder(self, Window win)
6925
6926 Moves this window in the tab navigation order after the specified
6927 sibling window. This means that when the user presses the TAB key on
6928 that other window, the focus switches to this window.
6929
6930 The default tab order is the same as creation order. This function
6931 and `MoveBeforeInTabOrder` allow to change it after creating all the
6932 windows.
6933
6934 """
6935 return _core_.Window_MoveAfterInTabOrder(*args, **kwargs)
6936
6937 def MoveBeforeInTabOrder(*args, **kwargs):
6938 """
6939 MoveBeforeInTabOrder(self, Window win)
6940
6941 Same as `MoveAfterInTabOrder` except that it inserts this window just
6942 before win instead of putting it right after it.
6943 """
6944 return _core_.Window_MoveBeforeInTabOrder(*args, **kwargs)
6945
6946 def GetChildren(*args, **kwargs):
6947 """
6948 GetChildren(self) -> PyObject
6949
6950 Returns a list of the window's children. NOTE: Currently this is a
6951 copy of the child window list maintained by the window, so the return
6952 value of this function is only valid as long as the window's children
6953 do not change.
6954 """
6955 return _core_.Window_GetChildren(*args, **kwargs)
6956
6957 def GetParent(*args, **kwargs):
6958 """
6959 GetParent(self) -> Window
6960
6961 Returns the parent window of this window, or None if there isn't one.
6962 """
6963 return _core_.Window_GetParent(*args, **kwargs)
6964
6965 def GetGrandParent(*args, **kwargs):
6966 """
6967 GetGrandParent(self) -> Window
6968
6969 Returns the parent of the parent of this window, or None if there
6970 isn't one.
6971 """
6972 return _core_.Window_GetGrandParent(*args, **kwargs)
6973
6974 def IsTopLevel(*args, **kwargs):
6975 """
6976 IsTopLevel(self) -> bool
6977
6978 Returns true if the given window is a top-level one. Currently all
6979 frames and dialogs are always considered to be top-level windows (even
6980 if they have a parent window).
6981 """
6982 return _core_.Window_IsTopLevel(*args, **kwargs)
6983
6984 def Reparent(*args, **kwargs):
6985 """
6986 Reparent(self, Window newParent) -> bool
6987
6988 Reparents the window, i.e the window will be removed from its current
6989 parent window (e.g. a non-standard toolbar in a wxFrame) and then
6990 re-inserted into another. Available on Windows and GTK. Returns True
6991 if the parent was changed, False otherwise (error or newParent ==
6992 oldParent)
6993 """
6994 return _core_.Window_Reparent(*args, **kwargs)
6995
6996 def AddChild(*args, **kwargs):
6997 """
6998 AddChild(self, Window child)
6999
7000 Adds a child window. This is called automatically by window creation
7001 functions so should not be required by the application programmer.
7002 """
7003 return _core_.Window_AddChild(*args, **kwargs)
7004
7005 def RemoveChild(*args, **kwargs):
7006 """
7007 RemoveChild(self, Window child)
7008
7009 Removes a child window. This is called automatically by window
7010 deletion functions so should not be required by the application
7011 programmer.
7012 """
7013 return _core_.Window_RemoveChild(*args, **kwargs)
7014
7015 def FindWindowById(*args, **kwargs):
7016 """
7017 FindWindowById(self, long winid) -> Window
7018
7019 Find a chld of this window by window ID
7020 """
7021 return _core_.Window_FindWindowById(*args, **kwargs)
7022
7023 def FindWindowByName(*args, **kwargs):
7024 """
7025 FindWindowByName(self, String name) -> Window
7026
7027 Find a child of this window by name
7028 """
7029 return _core_.Window_FindWindowByName(*args, **kwargs)
7030
7031 def GetEventHandler(*args, **kwargs):
7032 """
7033 GetEventHandler(self) -> EvtHandler
7034
7035 Returns the event handler for this window. By default, the window is
7036 its own event handler.
7037 """
7038 return _core_.Window_GetEventHandler(*args, **kwargs)
7039
7040 def SetEventHandler(*args, **kwargs):
7041 """
7042 SetEventHandler(self, EvtHandler handler)
7043
7044 Sets the event handler for this window. An event handler is an object
7045 that is capable of processing the events sent to a window. By default,
7046 the window is its own event handler, but an application may wish to
7047 substitute another, for example to allow central implementation of
7048 event-handling for a variety of different window classes.
7049
7050 It is usually better to use `wx.Window.PushEventHandler` since this sets
7051 up a chain of event handlers, where an event not handled by one event
7052 handler is handed to the next one in the chain.
7053 """
7054 return _core_.Window_SetEventHandler(*args, **kwargs)
7055
7056 def PushEventHandler(*args, **kwargs):
7057 """
7058 PushEventHandler(self, EvtHandler handler)
7059
7060 Pushes this event handler onto the event handler stack for the window.
7061 An event handler is an object that is capable of processing the events
7062 sent to a window. By default, the window is its own event handler, but
7063 an application may wish to substitute another, for example to allow
7064 central implementation of event-handling for a variety of different
7065 window classes.
7066
7067 wx.Window.PushEventHandler allows an application to set up a chain of
7068 event handlers, where an event not handled by one event handler is
7069 handed to the next one in the chain. Use `wx.Window.PopEventHandler` to
7070 remove the event handler.
7071 """
7072 return _core_.Window_PushEventHandler(*args, **kwargs)
7073
7074 def PopEventHandler(*args, **kwargs):
7075 """
7076 PopEventHandler(self, bool deleteHandler=False) -> EvtHandler
7077
7078 Removes and returns the top-most event handler on the event handler
7079 stack. If deleteHandler is True then the wx.EvtHandler object will be
7080 destroyed after it is popped.
7081 """
7082 return _core_.Window_PopEventHandler(*args, **kwargs)
7083
7084 def RemoveEventHandler(*args, **kwargs):
7085 """
7086 RemoveEventHandler(self, EvtHandler handler) -> bool
7087
7088 Find the given handler in the event handler chain and remove (but not
7089 delete) it from the event handler chain, return True if it was found
7090 and False otherwise (this also results in an assert failure so this
7091 function should only be called when the handler is supposed to be
7092 there.)
7093 """
7094 return _core_.Window_RemoveEventHandler(*args, **kwargs)
7095
7096 def SetValidator(*args, **kwargs):
7097 """
7098 SetValidator(self, Validator validator)
7099
7100 Deletes the current validator (if any) and sets the window validator,
7101 having called wx.Validator.Clone to create a new validator of this
7102 type.
7103 """
7104 return _core_.Window_SetValidator(*args, **kwargs)
7105
7106 def GetValidator(*args, **kwargs):
7107 """
7108 GetValidator(self) -> Validator
7109
7110 Returns a pointer to the current validator for the window, or None if
7111 there is none.
7112 """
7113 return _core_.Window_GetValidator(*args, **kwargs)
7114
7115 def Validate(*args, **kwargs):
7116 """
7117 Validate(self) -> bool
7118
7119 Validates the current values of the child controls using their
7120 validators. If the window has wx.WS_EX_VALIDATE_RECURSIVELY extra
7121 style flag set, the method will also call Validate() of all child
7122 windows. Returns false if any of the validations failed.
7123 """
7124 return _core_.Window_Validate(*args, **kwargs)
7125
7126 def TransferDataToWindow(*args, **kwargs):
7127 """
7128 TransferDataToWindow(self) -> bool
7129
7130 Transfers values to child controls from data areas specified by their
7131 validators. If the window has wx.WS_EX_VALIDATE_RECURSIVELY extra
7132 style flag set, the method will also call TransferDataToWindow() of
7133 all child windows.
7134 """
7135 return _core_.Window_TransferDataToWindow(*args, **kwargs)
7136
7137 def TransferDataFromWindow(*args, **kwargs):
7138 """
7139 TransferDataFromWindow(self) -> bool
7140
7141 Transfers values from child controls to data areas specified by their
7142 validators. Returns false if a transfer failed. If the window has
7143 wx.WS_EX_VALIDATE_RECURSIVELY extra style flag set, the method will
7144 also call TransferDataFromWindow() of all child windows.
7145 """
7146 return _core_.Window_TransferDataFromWindow(*args, **kwargs)
7147
7148 def InitDialog(*args, **kwargs):
7149 """
7150 InitDialog(self)
7151
7152 Sends an EVT_INIT_DIALOG event, whose handler usually transfers data
7153 to the dialog via validators.
7154 """
7155 return _core_.Window_InitDialog(*args, **kwargs)
7156
7157 def SetAcceleratorTable(*args, **kwargs):
7158 """
7159 SetAcceleratorTable(self, AcceleratorTable accel)
7160
7161 Sets the accelerator table for this window.
7162 """
7163 return _core_.Window_SetAcceleratorTable(*args, **kwargs)
7164
7165 def GetAcceleratorTable(*args, **kwargs):
7166 """
7167 GetAcceleratorTable(self) -> AcceleratorTable
7168
7169 Gets the accelerator table for this window.
7170 """
7171 return _core_.Window_GetAcceleratorTable(*args, **kwargs)
7172
7173 def RegisterHotKey(*args, **kwargs):
7174 """
7175 RegisterHotKey(self, int hotkeyId, int modifiers, int keycode) -> bool
7176
7177 Registers a system wide hotkey. Every time the user presses the hotkey
7178 registered here, this window will receive a hotkey event. It will
7179 receive the event even if the application is in the background and
7180 does not have the input focus because the user is working with some
7181 other application. To bind an event handler function to this hotkey
7182 use EVT_HOTKEY with an id equal to hotkeyId. Returns True if the
7183 hotkey was registered successfully.
7184 """
7185 return _core_.Window_RegisterHotKey(*args, **kwargs)
7186
7187 def UnregisterHotKey(*args, **kwargs):
7188 """
7189 UnregisterHotKey(self, int hotkeyId) -> bool
7190
7191 Unregisters a system wide hotkey.
7192 """
7193 return _core_.Window_UnregisterHotKey(*args, **kwargs)
7194
7195 def ConvertDialogPointToPixels(*args, **kwargs):
7196 """
7197 ConvertDialogPointToPixels(self, Point pt) -> Point
7198
7199 Converts a point or size from dialog units to pixels. Dialog units
7200 are used for maintaining a dialog's proportions even if the font
7201 changes. For the x dimension, the dialog units are multiplied by the
7202 average character width and then divided by 4. For the y dimension,
7203 the dialog units are multiplied by the average character height and
7204 then divided by 8.
7205 """
7206 return _core_.Window_ConvertDialogPointToPixels(*args, **kwargs)
7207
7208 def ConvertDialogSizeToPixels(*args, **kwargs):
7209 """
7210 ConvertDialogSizeToPixels(self, Size sz) -> Size
7211
7212 Converts a point or size from dialog units to pixels. Dialog units
7213 are used for maintaining a dialog's proportions even if the font
7214 changes. For the x dimension, the dialog units are multiplied by the
7215 average character width and then divided by 4. For the y dimension,
7216 the dialog units are multiplied by the average character height and
7217 then divided by 8.
7218 """
7219 return _core_.Window_ConvertDialogSizeToPixels(*args, **kwargs)
7220
7221 def DLG_PNT(*args, **kwargs):
7222 """
7223 DLG_PNT(self, Point pt) -> Point
7224
7225 Converts a point or size from dialog units to pixels. Dialog units
7226 are used for maintaining a dialog's proportions even if the font
7227 changes. For the x dimension, the dialog units are multiplied by the
7228 average character width and then divided by 4. For the y dimension,
7229 the dialog units are multiplied by the average character height and
7230 then divided by 8.
7231 """
7232 return _core_.Window_DLG_PNT(*args, **kwargs)
7233
7234 def DLG_SZE(*args, **kwargs):
7235 """
7236 DLG_SZE(self, Size sz) -> Size
7237
7238 Converts a point or size from dialog units to pixels. Dialog units
7239 are used for maintaining a dialog's proportions even if the font
7240 changes. For the x dimension, the dialog units are multiplied by the
7241 average character width and then divided by 4. For the y dimension,
7242 the dialog units are multiplied by the average character height and
7243 then divided by 8.
7244 """
7245 return _core_.Window_DLG_SZE(*args, **kwargs)
7246
7247 def ConvertPixelPointToDialog(*args, **kwargs):
7248 """ConvertPixelPointToDialog(self, Point pt) -> Point"""
7249 return _core_.Window_ConvertPixelPointToDialog(*args, **kwargs)
7250
7251 def ConvertPixelSizeToDialog(*args, **kwargs):
7252 """ConvertPixelSizeToDialog(self, Size sz) -> Size"""
7253 return _core_.Window_ConvertPixelSizeToDialog(*args, **kwargs)
7254
7255 def WarpPointer(*args, **kwargs):
7256 """
7257 WarpPointer(self, int x, int y)
7258
7259 Moves the pointer to the given position on the window.
7260
7261 NOTE: This function is not supported under Mac because Apple Human
7262 Interface Guidelines forbid moving the mouse cursor programmatically.
7263 """
7264 return _core_.Window_WarpPointer(*args, **kwargs)
7265
7266 def CaptureMouse(*args, **kwargs):
7267 """
7268 CaptureMouse(self)
7269
7270 Directs all mouse input to this window. Call wx.Window.ReleaseMouse to
7271 release the capture.
7272
7273 Note that wxWindows maintains the stack of windows having captured the
7274 mouse and when the mouse is released the capture returns to the window
7275 which had had captured it previously and it is only really released if
7276 there were no previous window. In particular, this means that you must
7277 release the mouse as many times as you capture it.
7278 """
7279 return _core_.Window_CaptureMouse(*args, **kwargs)
7280
7281 def ReleaseMouse(*args, **kwargs):
7282 """
7283 ReleaseMouse(self)
7284
7285 Releases mouse input captured with wx.Window.CaptureMouse.
7286 """
7287 return _core_.Window_ReleaseMouse(*args, **kwargs)
7288
7289 def GetCapture(*args, **kwargs):
7290 """
7291 GetCapture() -> Window
7292
7293 Returns the window which currently captures the mouse or None
7294 """
7295 return _core_.Window_GetCapture(*args, **kwargs)
7296
7297 GetCapture = staticmethod(GetCapture)
7298 def HasCapture(*args, **kwargs):
7299 """
7300 HasCapture(self) -> bool
7301
7302 Returns true if this window has the current mouse capture.
7303 """
7304 return _core_.Window_HasCapture(*args, **kwargs)
7305
7306 def Refresh(*args, **kwargs):
7307 """
7308 Refresh(self, bool eraseBackground=True, Rect rect=None)
7309
7310 Mark the specified rectangle (or the whole window) as "dirty" so it
7311 will be repainted. Causes an EVT_PAINT event to be generated and sent
7312 to the window.
7313 """
7314 return _core_.Window_Refresh(*args, **kwargs)
7315
7316 def RefreshRect(*args, **kwargs):
7317 """
7318 RefreshRect(self, Rect rect, bool eraseBackground=True)
7319
7320 Redraws the contents of the given rectangle: the area inside it will
7321 be repainted. This is the same as Refresh but has a nicer syntax.
7322 """
7323 return _core_.Window_RefreshRect(*args, **kwargs)
7324
7325 def Update(*args, **kwargs):
7326 """
7327 Update(self)
7328
7329 Calling this method immediately repaints the invalidated area of the
7330 window instead of waiting for the EVT_PAINT event to happen, (normally
7331 this would usually only happen when the flow of control returns to the
7332 event loop.) Notice that this function doesn't refresh the window and
7333 does nothing if the window has been already repainted. Use Refresh
7334 first if you want to immediately redraw the window (or some portion of
7335 it) unconditionally.
7336 """
7337 return _core_.Window_Update(*args, **kwargs)
7338
7339 def ClearBackground(*args, **kwargs):
7340 """
7341 ClearBackground(self)
7342
7343 Clears the window by filling it with the current background
7344 colour. Does not cause an erase background event to be generated.
7345 """
7346 return _core_.Window_ClearBackground(*args, **kwargs)
7347
7348 def Freeze(*args, **kwargs):
7349 """
7350 Freeze(self)
7351
7352 Freezes the window or, in other words, prevents any updates from
7353 taking place on screen, the window is not redrawn at all. Thaw must be
7354 called to reenable window redrawing. Calls to Freeze/Thaw may be
7355 nested, with the actual Thaw being delayed until all the nesting has
7356 been undone.
7357
7358 This method is useful for visual appearance optimization (for example,
7359 it is a good idea to use it before inserting large amount of text into
7360 a wxTextCtrl under wxGTK) but is not implemented on all platforms nor
7361 for all controls so it is mostly just a hint to wxWindows and not a
7362 mandatory directive.
7363 """
7364 return _core_.Window_Freeze(*args, **kwargs)
7365
7366 def Thaw(*args, **kwargs):
7367 """
7368 Thaw(self)
7369
7370 Reenables window updating after a previous call to Freeze. Calls to
7371 Freeze/Thaw may be nested, so Thaw must be called the same number of
7372 times that Freeze was before the window will be updated.
7373 """
7374 return _core_.Window_Thaw(*args, **kwargs)
7375
7376 def PrepareDC(*args, **kwargs):
7377 """
7378 PrepareDC(self, DC dc)
7379
7380 Call this function to prepare the device context for drawing a
7381 scrolled image. It sets the device origin according to the current
7382 scroll position.
7383 """
7384 return _core_.Window_PrepareDC(*args, **kwargs)
7385
7386 def GetUpdateRegion(*args, **kwargs):
7387 """
7388 GetUpdateRegion(self) -> Region
7389
7390 Returns the region specifying which parts of the window have been
7391 damaged. Should only be called within an EVT_PAINT handler.
7392 """
7393 return _core_.Window_GetUpdateRegion(*args, **kwargs)
7394
7395 def GetUpdateClientRect(*args, **kwargs):
7396 """
7397 GetUpdateClientRect(self) -> Rect
7398
7399 Get the update rectangle region bounding box in client coords.
7400 """
7401 return _core_.Window_GetUpdateClientRect(*args, **kwargs)
7402
7403 def IsExposed(*args, **kwargs):
7404 """
7405 IsExposed(self, int x, int y, int w=1, int h=1) -> bool
7406
7407 Returns true if the given point or rectangle area has been exposed
7408 since the last repaint. Call this in an paint event handler to
7409 optimize redrawing by only redrawing those areas, which have been
7410 exposed.
7411 """
7412 return _core_.Window_IsExposed(*args, **kwargs)
7413
7414 def IsExposedPoint(*args, **kwargs):
7415 """
7416 IsExposedPoint(self, Point pt) -> bool
7417
7418 Returns true if the given point or rectangle area has been exposed
7419 since the last repaint. Call this in an paint event handler to
7420 optimize redrawing by only redrawing those areas, which have been
7421 exposed.
7422 """
7423 return _core_.Window_IsExposedPoint(*args, **kwargs)
7424
7425 def IsExposedRect(*args, **kwargs):
7426 """
7427 IsExposedRect(self, Rect rect) -> bool
7428
7429 Returns true if the given point or rectangle area has been exposed
7430 since the last repaint. Call this in an paint event handler to
7431 optimize redrawing by only redrawing those areas, which have been
7432 exposed.
7433 """
7434 return _core_.Window_IsExposedRect(*args, **kwargs)
7435
7436 def GetDefaultAttributes(*args, **kwargs):
7437 """
7438 GetDefaultAttributes(self) -> VisualAttributes
7439
7440 Get the default attributes for an instance of this class. This is
7441 useful if you want to use the same font or colour in your own control
7442 as in a standard control -- which is a much better idea than hard
7443 coding specific colours or fonts which might look completely out of
7444 place on the user's system, especially if it uses themes.
7445 """
7446 return _core_.Window_GetDefaultAttributes(*args, **kwargs)
7447
7448 def GetClassDefaultAttributes(*args, **kwargs):
7449 """
7450 GetClassDefaultAttributes(int variant=WINDOW_VARIANT_NORMAL) -> VisualAttributes
7451
7452 Get the default attributes for this class. This is useful if you want
7453 to use the same font or colour in your own control as in a standard
7454 control -- which is a much better idea than hard coding specific
7455 colours or fonts which might look completely out of place on the
7456 user's system, especially if it uses themes.
7457
7458 The variant parameter is only relevant under Mac currently and is
7459 ignore under other platforms. Under Mac, it will change the size of
7460 the returned font. See `wx.Window.SetWindowVariant` for more about
7461 this.
7462 """
7463 return _core_.Window_GetClassDefaultAttributes(*args, **kwargs)
7464
7465 GetClassDefaultAttributes = staticmethod(GetClassDefaultAttributes)
7466 def SetBackgroundColour(*args, **kwargs):
7467 """
7468 SetBackgroundColour(self, Colour colour) -> bool
7469
7470 Sets the background colour of the window. Returns True if the colour
7471 was changed. The background colour is usually painted by the default
7472 EVT_ERASE_BACKGROUND event handler function under Windows and
7473 automatically under GTK. Using `wx.NullColour` will reset the window
7474 to the default background colour.
7475
7476 Note that setting the background colour may not cause an immediate
7477 refresh, so you may wish to call `ClearBackground` or `Refresh` after
7478 calling this function.
7479
7480 Using this function will disable attempts to use themes for this
7481 window, if the system supports them. Use with care since usually the
7482 themes represent the appearance chosen by the user to be used for all
7483 applications on the system.
7484 """
7485 return _core_.Window_SetBackgroundColour(*args, **kwargs)
7486
7487 def SetOwnBackgroundColour(*args, **kwargs):
7488 """SetOwnBackgroundColour(self, Colour colour)"""
7489 return _core_.Window_SetOwnBackgroundColour(*args, **kwargs)
7490
7491 def SetForegroundColour(*args, **kwargs):
7492 """
7493 SetForegroundColour(self, Colour colour) -> bool
7494
7495 Sets the foreground colour of the window. Returns True is the colour
7496 was changed. The interpretation of foreground colour is dependent on
7497 the window class; it may be the text colour or other colour, or it may
7498 not be used at all.
7499 """
7500 return _core_.Window_SetForegroundColour(*args, **kwargs)
7501
7502 def SetOwnForegroundColour(*args, **kwargs):
7503 """SetOwnForegroundColour(self, Colour colour)"""
7504 return _core_.Window_SetOwnForegroundColour(*args, **kwargs)
7505
7506 def GetBackgroundColour(*args, **kwargs):
7507 """
7508 GetBackgroundColour(self) -> Colour
7509
7510 Returns the background colour of the window.
7511 """
7512 return _core_.Window_GetBackgroundColour(*args, **kwargs)
7513
7514 def GetForegroundColour(*args, **kwargs):
7515 """
7516 GetForegroundColour(self) -> Colour
7517
7518 Returns the foreground colour of the window. The interpretation of
7519 foreground colour is dependent on the window class; it may be the text
7520 colour or other colour, or it may not be used at all.
7521 """
7522 return _core_.Window_GetForegroundColour(*args, **kwargs)
7523
7524 def InheritsBackgroundColour(*args, **kwargs):
7525 """InheritsBackgroundColour(self) -> bool"""
7526 return _core_.Window_InheritsBackgroundColour(*args, **kwargs)
7527
7528 def UseBgCol(*args, **kwargs):
7529 """UseBgCol(self) -> bool"""
7530 return _core_.Window_UseBgCol(*args, **kwargs)
7531
7532 def SetBackgroundStyle(*args, **kwargs):
7533 """
7534 SetBackgroundStyle(self, int style) -> bool
7535
7536 Returns the background style of the window. The background style
7537 indicates how the background of the window is drawn.
7538
7539 ====================== ========================================
7540 wx.BG_STYLE_SYSTEM The background colour or pattern should
7541 be determined by the system
7542 wx.BG_STYLE_COLOUR The background should be a solid colour
7543 wx.BG_STYLE_CUSTOM The background will be implemented by the
7544 application.
7545 ====================== ========================================
7546
7547 On GTK+, use of wx.BG_STYLE_CUSTOM allows the flicker-free drawing of
7548 a custom background, such as a tiled bitmap. Currently the style has
7549 no effect on other platforms.
7550
7551 :see: `GetBackgroundStyle`, `SetBackgroundColour`
7552 """
7553 return _core_.Window_SetBackgroundStyle(*args, **kwargs)
7554
7555 def GetBackgroundStyle(*args, **kwargs):
7556 """
7557 GetBackgroundStyle(self) -> int
7558
7559 Returns the background style of the window.
7560
7561 :see: `SetBackgroundStyle`
7562 """
7563 return _core_.Window_GetBackgroundStyle(*args, **kwargs)
7564
7565 def HasTransparentBackground(*args, **kwargs):
7566 """
7567 HasTransparentBackground(self) -> bool
7568
7569 Returns True if this window's background is transparent (as, for
7570 example, for `wx.StaticText`) and should show the parent window's
7571 background.
7572
7573 This method is mostly used internally by the library itself and you
7574 normally shouldn't have to call it. You may, however, have to override
7575 it in your custom control classes to ensure that background is painted
7576 correctly.
7577 """
7578 return _core_.Window_HasTransparentBackground(*args, **kwargs)
7579
7580 def SetCursor(*args, **kwargs):
7581 """
7582 SetCursor(self, Cursor cursor) -> bool
7583
7584 Sets the window's cursor. Notice that the window cursor also sets it
7585 for the children of the window implicitly.
7586
7587 The cursor may be wx.NullCursor in which case the window cursor will
7588 be reset back to default.
7589 """
7590 return _core_.Window_SetCursor(*args, **kwargs)
7591
7592 def GetCursor(*args, **kwargs):
7593 """
7594 GetCursor(self) -> Cursor
7595
7596 Return the cursor associated with this window.
7597 """
7598 return _core_.Window_GetCursor(*args, **kwargs)
7599
7600 def SetFont(*args, **kwargs):
7601 """
7602 SetFont(self, Font font) -> bool
7603
7604 Sets the font for this window.
7605 """
7606 return _core_.Window_SetFont(*args, **kwargs)
7607
7608 def SetOwnFont(*args, **kwargs):
7609 """SetOwnFont(self, Font font)"""
7610 return _core_.Window_SetOwnFont(*args, **kwargs)
7611
7612 def GetFont(*args, **kwargs):
7613 """
7614 GetFont(self) -> Font
7615
7616 Returns the default font used for this window.
7617 """
7618 return _core_.Window_GetFont(*args, **kwargs)
7619
7620 def SetCaret(*args, **kwargs):
7621 """
7622 SetCaret(self, Caret caret)
7623
7624 Sets the caret associated with the window.
7625 """
7626 return _core_.Window_SetCaret(*args, **kwargs)
7627
7628 def GetCaret(*args, **kwargs):
7629 """
7630 GetCaret(self) -> Caret
7631
7632 Returns the caret associated with the window.
7633 """
7634 return _core_.Window_GetCaret(*args, **kwargs)
7635
7636 def GetCharHeight(*args, **kwargs):
7637 """
7638 GetCharHeight(self) -> int
7639
7640 Get the (average) character size for the current font.
7641 """
7642 return _core_.Window_GetCharHeight(*args, **kwargs)
7643
7644 def GetCharWidth(*args, **kwargs):
7645 """
7646 GetCharWidth(self) -> int
7647
7648 Get the (average) character size for the current font.
7649 """
7650 return _core_.Window_GetCharWidth(*args, **kwargs)
7651
7652 def GetTextExtent(*args, **kwargs):
7653 """
7654 GetTextExtent(String string) -> (width, height)
7655
7656 Get the width and height of the text using the current font.
7657 """
7658 return _core_.Window_GetTextExtent(*args, **kwargs)
7659
7660 def GetFullTextExtent(*args, **kwargs):
7661 """
7662 GetFullTextExtent(String string, Font font=None) ->
7663 (width, height, descent, externalLeading)
7664
7665 Get the width, height, decent and leading of the text using the
7666 current or specified font.
7667 """
7668 return _core_.Window_GetFullTextExtent(*args, **kwargs)
7669
7670 def ClientToScreenXY(*args, **kwargs):
7671 """
7672 ClientToScreenXY(int x, int y) -> (x,y)
7673
7674 Converts to screen coordinates from coordinates relative to this window.
7675 """
7676 return _core_.Window_ClientToScreenXY(*args, **kwargs)
7677
7678 def ScreenToClientXY(*args, **kwargs):
7679 """
7680 ScreenToClientXY(int x, int y) -> (x,y)
7681
7682 Converts from screen to client window coordinates.
7683 """
7684 return _core_.Window_ScreenToClientXY(*args, **kwargs)
7685
7686 def ClientToScreen(*args, **kwargs):
7687 """
7688 ClientToScreen(self, Point pt) -> Point
7689
7690 Converts to screen coordinates from coordinates relative to this window.
7691 """
7692 return _core_.Window_ClientToScreen(*args, **kwargs)
7693
7694 def ScreenToClient(*args, **kwargs):
7695 """
7696 ScreenToClient(self, Point pt) -> Point
7697
7698 Converts from screen to client window coordinates.
7699 """
7700 return _core_.Window_ScreenToClient(*args, **kwargs)
7701
7702 def HitTestXY(*args, **kwargs):
7703 """
7704 HitTestXY(self, int x, int y) -> int
7705
7706 Test where the given (in client coords) point lies
7707 """
7708 return _core_.Window_HitTestXY(*args, **kwargs)
7709
7710 def HitTest(*args, **kwargs):
7711 """
7712 HitTest(self, Point pt) -> int
7713
7714 Test where the given (in client coords) point lies
7715 """
7716 return _core_.Window_HitTest(*args, **kwargs)
7717
7718 def GetBorder(*args):
7719 """
7720 GetBorder(self, long flags) -> int
7721 GetBorder(self) -> int
7722
7723 Get border for the flags of this window
7724 """
7725 return _core_.Window_GetBorder(*args)
7726
7727 def UpdateWindowUI(*args, **kwargs):
7728 """
7729 UpdateWindowUI(self, long flags=UPDATE_UI_NONE)
7730
7731 This function sends EVT_UPDATE_UI events to the window. The particular
7732 implementation depends on the window; for example a wx.ToolBar will
7733 send an update UI event for each toolbar button, and a wx.Frame will
7734 send an update UI event for each menubar menu item. You can call this
7735 function from your application to ensure that your UI is up-to-date at
7736 a particular point in time (as far as your EVT_UPDATE_UI handlers are
7737 concerned). This may be necessary if you have called
7738 wx.UpdateUIEvent.SetMode or wx.UpdateUIEvent.SetUpdateInterval to
7739 limit the overhead that wxWindows incurs by sending update UI events
7740 in idle time.
7741 """
7742 return _core_.Window_UpdateWindowUI(*args, **kwargs)
7743
7744 def PopupMenuXY(*args, **kwargs):
7745 """
7746 PopupMenuXY(self, Menu menu, int x=-1, int y=-1) -> bool
7747
7748 Pops up the given menu at the specified coordinates, relative to this window,
7749 and returns control when the user has dismissed the menu. If a menu item is
7750 selected, the corresponding menu event is generated and will be processed as
7751 usual. If the default position is given then the current position of the
7752 mouse cursor will be used.
7753 """
7754 return _core_.Window_PopupMenuXY(*args, **kwargs)
7755
7756 def PopupMenu(*args, **kwargs):
7757 """
7758 PopupMenu(self, Menu menu, Point pos=DefaultPosition) -> bool
7759
7760 Pops up the given menu at the specified coordinates, relative to this window,
7761 and returns control when the user has dismissed the menu. If a menu item is
7762 selected, the corresponding menu event is generated and will be processed as
7763 usual. If the default position is given then the current position of the
7764 mouse cursor will be used.
7765 """
7766 return _core_.Window_PopupMenu(*args, **kwargs)
7767
7768 def GetHandle(*args, **kwargs):
7769 """
7770 GetHandle(self) -> long
7771
7772 Returns the platform-specific handle (as a long integer) of the
7773 physical window. Currently on wxMac it returns the handle of the
7774 toplevel parent of the window.
7775 """
7776 return _core_.Window_GetHandle(*args, **kwargs)
7777
7778 def AssociateHandle(*args, **kwargs):
7779 """
7780 AssociateHandle(self, long handle)
7781
7782 Associate the window with a new native handle
7783 """
7784 return _core_.Window_AssociateHandle(*args, **kwargs)
7785
7786 def DissociateHandle(*args, **kwargs):
7787 """
7788 DissociateHandle(self)
7789
7790 Dissociate the current native handle from the window
7791 """
7792 return _core_.Window_DissociateHandle(*args, **kwargs)
7793
7794 def OnPaint(*args, **kwargs):
7795 """OnPaint(self, PaintEvent event)"""
7796 return _core_.Window_OnPaint(*args, **kwargs)
7797
7798 def HasScrollbar(*args, **kwargs):
7799 """
7800 HasScrollbar(self, int orient) -> bool
7801
7802 Does the window have the scrollbar for this orientation?
7803 """
7804 return _core_.Window_HasScrollbar(*args, **kwargs)
7805
7806 def SetScrollbar(*args, **kwargs):
7807 """
7808 SetScrollbar(self, int orientation, int position, int thumbSize, int range,
7809 bool refresh=True)
7810
7811 Sets the scrollbar properties of a built-in scrollbar.
7812 """
7813 return _core_.Window_SetScrollbar(*args, **kwargs)
7814
7815 def SetScrollPos(*args, **kwargs):
7816 """
7817 SetScrollPos(self, int orientation, int pos, bool refresh=True)
7818
7819 Sets the position of one of the built-in scrollbars.
7820 """
7821 return _core_.Window_SetScrollPos(*args, **kwargs)
7822
7823 def GetScrollPos(*args, **kwargs):
7824 """
7825 GetScrollPos(self, int orientation) -> int
7826
7827 Returns the built-in scrollbar position.
7828 """
7829 return _core_.Window_GetScrollPos(*args, **kwargs)
7830
7831 def GetScrollThumb(*args, **kwargs):
7832 """
7833 GetScrollThumb(self, int orientation) -> int
7834
7835 Returns the built-in scrollbar thumb size.
7836 """
7837 return _core_.Window_GetScrollThumb(*args, **kwargs)
7838
7839 def GetScrollRange(*args, **kwargs):
7840 """
7841 GetScrollRange(self, int orientation) -> int
7842
7843 Returns the built-in scrollbar range.
7844 """
7845 return _core_.Window_GetScrollRange(*args, **kwargs)
7846
7847 def ScrollWindow(*args, **kwargs):
7848 """
7849 ScrollWindow(self, int dx, int dy, Rect rect=None)
7850
7851 Physically scrolls the pixels in the window and move child windows
7852 accordingly. Use this function to optimise your scrolling
7853 implementations, to minimise the area that must be redrawn. Note that
7854 it is rarely required to call this function from a user program.
7855 """
7856 return _core_.Window_ScrollWindow(*args, **kwargs)
7857
7858 def ScrollLines(*args, **kwargs):
7859 """
7860 ScrollLines(self, int lines) -> bool
7861
7862 If the platform and window class supports it, scrolls the window by
7863 the given number of lines down, if lines is positive, or up if lines
7864 is negative. Returns True if the window was scrolled, False if it was
7865 already on top/bottom and nothing was done.
7866 """
7867 return _core_.Window_ScrollLines(*args, **kwargs)
7868
7869 def ScrollPages(*args, **kwargs):
7870 """
7871 ScrollPages(self, int pages) -> bool
7872
7873 If the platform and window class supports it, scrolls the window by
7874 the given number of pages down, if pages is positive, or up if pages
7875 is negative. Returns True if the window was scrolled, False if it was
7876 already on top/bottom and nothing was done.
7877 """
7878 return _core_.Window_ScrollPages(*args, **kwargs)
7879
7880 def LineUp(*args, **kwargs):
7881 """
7882 LineUp(self) -> bool
7883
7884 This is just a wrapper for ScrollLines(-1).
7885 """
7886 return _core_.Window_LineUp(*args, **kwargs)
7887
7888 def LineDown(*args, **kwargs):
7889 """
7890 LineDown(self) -> bool
7891
7892 This is just a wrapper for ScrollLines(1).
7893 """
7894 return _core_.Window_LineDown(*args, **kwargs)
7895
7896 def PageUp(*args, **kwargs):
7897 """
7898 PageUp(self) -> bool
7899
7900 This is just a wrapper for ScrollPages(-1).
7901 """
7902 return _core_.Window_PageUp(*args, **kwargs)
7903
7904 def PageDown(*args, **kwargs):
7905 """
7906 PageDown(self) -> bool
7907
7908 This is just a wrapper for ScrollPages(1).
7909 """
7910 return _core_.Window_PageDown(*args, **kwargs)
7911
7912 def SetHelpText(*args, **kwargs):
7913 """
7914 SetHelpText(self, String text)
7915
7916 Sets the help text to be used as context-sensitive help for this
7917 window. Note that the text is actually stored by the current
7918 wxHelpProvider implementation, and not in the window object itself.
7919 """
7920 return _core_.Window_SetHelpText(*args, **kwargs)
7921
7922 def SetHelpTextForId(*args, **kwargs):
7923 """
7924 SetHelpTextForId(self, String text)
7925
7926 Associate this help text with all windows with the same id as this
7927 one.
7928 """
7929 return _core_.Window_SetHelpTextForId(*args, **kwargs)
7930
7931 def GetHelpText(*args, **kwargs):
7932 """
7933 GetHelpText(self) -> String
7934
7935 Gets the help text to be used as context-sensitive help for this
7936 window. Note that the text is actually stored by the current
7937 wxHelpProvider implementation, and not in the window object itself.
7938 """
7939 return _core_.Window_GetHelpText(*args, **kwargs)
7940
7941 def SetToolTipString(*args, **kwargs):
7942 """
7943 SetToolTipString(self, String tip)
7944
7945 Attach a tooltip to the window.
7946 """
7947 return _core_.Window_SetToolTipString(*args, **kwargs)
7948
7949 def SetToolTip(*args, **kwargs):
7950 """
7951 SetToolTip(self, ToolTip tip)
7952
7953 Attach a tooltip to the window.
7954 """
7955 return _core_.Window_SetToolTip(*args, **kwargs)
7956
7957 def GetToolTip(*args, **kwargs):
7958 """
7959 GetToolTip(self) -> ToolTip
7960
7961 get the associated tooltip or None if none
7962 """
7963 return _core_.Window_GetToolTip(*args, **kwargs)
7964
7965 def SetDropTarget(*args, **kwargs):
7966 """
7967 SetDropTarget(self, DropTarget dropTarget)
7968
7969 Associates a drop target with this window. If the window already has
7970 a drop target, it is deleted.
7971 """
7972 return _core_.Window_SetDropTarget(*args, **kwargs)
7973
7974 def GetDropTarget(*args, **kwargs):
7975 """
7976 GetDropTarget(self) -> DropTarget
7977
7978 Returns the associated drop target, which may be None.
7979 """
7980 return _core_.Window_GetDropTarget(*args, **kwargs)
7981
7982 def DragAcceptFiles(*args, **kwargs):
7983 """
7984 DragAcceptFiles(self, bool accept)
7985
7986 Enables or disables eligibility for drop file events, EVT_DROP_FILES.
7987 Only available on Windows.
7988 """
7989 return _core_.Window_DragAcceptFiles(*args, **kwargs)
7990
7991 def SetConstraints(*args, **kwargs):
7992 """
7993 SetConstraints(self, LayoutConstraints constraints)
7994
7995 Sets the window to have the given layout constraints. If an existing
7996 layout constraints object is already owned by the window, it will be
7997 deleted. Pass None to disassociate and delete the window's current
7998 constraints.
7999
8000 You must call SetAutoLayout to tell a window to use the constraints
8001 automatically in its default EVT_SIZE handler; otherwise, you must
8002 handle EVT_SIZE yourself and call Layout() explicitly. When setting
8003 both a wx.LayoutConstraints and a wx.Sizer, only the sizer will have
8004 effect.
8005 """
8006 return _core_.Window_SetConstraints(*args, **kwargs)
8007
8008 def GetConstraints(*args, **kwargs):
8009 """
8010 GetConstraints(self) -> LayoutConstraints
8011
8012 Returns a pointer to the window's layout constraints, or None if there
8013 are none.
8014 """
8015 return _core_.Window_GetConstraints(*args, **kwargs)
8016
8017 def SetAutoLayout(*args, **kwargs):
8018 """
8019 SetAutoLayout(self, bool autoLayout)
8020
8021 Determines whether the Layout function will be called automatically
8022 when the window is resized. It is called implicitly by SetSizer but
8023 if you use SetConstraints you should call it manually or otherwise the
8024 window layout won't be correctly updated when its size changes.
8025 """
8026 return _core_.Window_SetAutoLayout(*args, **kwargs)
8027
8028 def GetAutoLayout(*args, **kwargs):
8029 """
8030 GetAutoLayout(self) -> bool
8031
8032 Returns the current autoLayout setting
8033 """
8034 return _core_.Window_GetAutoLayout(*args, **kwargs)
8035
8036 def Layout(*args, **kwargs):
8037 """
8038 Layout(self) -> bool
8039
8040 Invokes the constraint-based layout algorithm or the sizer-based
8041 algorithm for this window. See SetAutoLayout: when auto layout is on,
8042 this function gets called automatically by the default EVT_SIZE
8043 handler when the window is resized.
8044 """
8045 return _core_.Window_Layout(*args, **kwargs)
8046
8047 def SetSizer(*args, **kwargs):
8048 """
8049 SetSizer(self, Sizer sizer, bool deleteOld=True)
8050
8051 Sets the window to have the given layout sizer. The window will then
8052 own the object, and will take care of its deletion. If an existing
8053 layout sizer object is already owned by the window, it will be deleted
8054 if the deleteOld parameter is true. Note that this function will also
8055 call SetAutoLayout implicitly with a True parameter if the sizer is
8056 non-None, and False otherwise.
8057 """
8058 return _core_.Window_SetSizer(*args, **kwargs)
8059
8060 def SetSizerAndFit(*args, **kwargs):
8061 """
8062 SetSizerAndFit(self, Sizer sizer, bool deleteOld=True)
8063
8064 The same as SetSizer, except it also sets the size hints for the
8065 window based on the sizer's minimum size.
8066 """
8067 return _core_.Window_SetSizerAndFit(*args, **kwargs)
8068
8069 def GetSizer(*args, **kwargs):
8070 """
8071 GetSizer(self) -> Sizer
8072
8073 Return the sizer associated with the window by a previous call to
8074 SetSizer or None if there isn't one.
8075 """
8076 return _core_.Window_GetSizer(*args, **kwargs)
8077
8078 def SetContainingSizer(*args, **kwargs):
8079 """
8080 SetContainingSizer(self, Sizer sizer)
8081
8082 This normally does not need to be called by application code. It is
8083 called internally when a window is added to a sizer, and is used so
8084 the window can remove itself from the sizer when it is destroyed.
8085 """
8086 return _core_.Window_SetContainingSizer(*args, **kwargs)
8087
8088 def GetContainingSizer(*args, **kwargs):
8089 """
8090 GetContainingSizer(self) -> Sizer
8091
8092 Return the sizer that this window is a member of, if any, otherwise None.
8093 """
8094 return _core_.Window_GetContainingSizer(*args, **kwargs)
8095
8096 def InheritAttributes(*args, **kwargs):
8097 """
8098 InheritAttributes(self)
8099
8100 This function is (or should be, in case of custom controls) called
8101 during window creation to intelligently set up the window visual
8102 attributes, that is the font and the foreground and background
8103 colours.
8104
8105 By 'intelligently' the following is meant: by default, all windows use
8106 their own default attributes. However if some of the parent's
8107 attributes are explicitly changed (that is, using SetFont and not
8108 SetOwnFont) and if the corresponding attribute hadn't been
8109 explicitly set for this window itself, then this window takes the same
8110 value as used by the parent. In addition, if the window overrides
8111 ShouldInheritColours to return false, the colours will not be changed
8112 no matter what and only the font might.
8113
8114 This rather complicated logic is necessary in order to accommodate the
8115 different usage scenarios. The most common one is when all default
8116 attributes are used and in this case, nothing should be inherited as
8117 in modern GUIs different controls use different fonts (and colours)
8118 than their siblings so they can't inherit the same value from the
8119 parent. However it was also deemed desirable to allow to simply change
8120 the attributes of all children at once by just changing the font or
8121 colour of their common parent, hence in this case we do inherit the
8122 parents attributes.
8123
8124 """
8125 return _core_.Window_InheritAttributes(*args, **kwargs)
8126
8127 def ShouldInheritColours(*args, **kwargs):
8128 """
8129 ShouldInheritColours(self) -> bool
8130
8131 Return true from here to allow the colours of this window to be
8132 changed by InheritAttributes, returning false forbids inheriting them
8133 from the parent window.
8134
8135 The base class version returns false, but this method is overridden in
8136 wxControl where it returns true.
8137 """
8138 return _core_.Window_ShouldInheritColours(*args, **kwargs)
8139
8140 def PostCreate(self, pre):
8141 """
8142 Phase 3 of the 2-phase create <wink!>
8143 Call this method after precreating the window with the 2-phase create method.
8144 """
8145 self.this = pre.this
8146 self.thisown = pre.thisown
8147 pre.thisown = 0
8148 if hasattr(self, '_setOORInfo'):
8149 self._setOORInfo(self)
8150 if hasattr(self, '_setCallbackInfo'):
8151 self._setCallbackInfo(self, self.__class__)
8152
8153
8154 class WindowPtr(Window):
8155 def __init__(self, this):
8156 self.this = this
8157 if not hasattr(self,"thisown"): self.thisown = 0
8158 self.__class__ = Window
8159 _core_.Window_swigregister(WindowPtr)
8160
8161 def PreWindow(*args, **kwargs):
8162 """
8163 PreWindow() -> Window
8164
8165 Precreate a Window for 2-phase creation.
8166 """
8167 val = _core_.new_PreWindow(*args, **kwargs)
8168 val.thisown = 1
8169 return val
8170
8171 def Window_NewControlId(*args, **kwargs):
8172 """
8173 Window_NewControlId() -> int
8174
8175 Generate a control id for the controls which were not given one.
8176 """
8177 return _core_.Window_NewControlId(*args, **kwargs)
8178
8179 def Window_NextControlId(*args, **kwargs):
8180 """
8181 Window_NextControlId(int winid) -> int
8182
8183 Get the id of the control following the one with the given
8184 autogenerated) id
8185 """
8186 return _core_.Window_NextControlId(*args, **kwargs)
8187
8188 def Window_PrevControlId(*args, **kwargs):
8189 """
8190 Window_PrevControlId(int winid) -> int
8191
8192 Get the id of the control preceding the one with the given
8193 autogenerated) id
8194 """
8195 return _core_.Window_PrevControlId(*args, **kwargs)
8196
8197 def Window_FindFocus(*args, **kwargs):
8198 """
8199 Window_FindFocus() -> Window
8200
8201 Returns the window or control that currently has the keyboard focus,
8202 or None.
8203 """
8204 return _core_.Window_FindFocus(*args, **kwargs)
8205
8206 def Window_GetCapture(*args, **kwargs):
8207 """
8208 Window_GetCapture() -> Window
8209
8210 Returns the window which currently captures the mouse or None
8211 """
8212 return _core_.Window_GetCapture(*args, **kwargs)
8213
8214 def Window_GetClassDefaultAttributes(*args, **kwargs):
8215 """
8216 Window_GetClassDefaultAttributes(int variant=WINDOW_VARIANT_NORMAL) -> VisualAttributes
8217
8218 Get the default attributes for this class. This is useful if you want
8219 to use the same font or colour in your own control as in a standard
8220 control -- which is a much better idea than hard coding specific
8221 colours or fonts which might look completely out of place on the
8222 user's system, especially if it uses themes.
8223
8224 The variant parameter is only relevant under Mac currently and is
8225 ignore under other platforms. Under Mac, it will change the size of
8226 the returned font. See `wx.Window.SetWindowVariant` for more about
8227 this.
8228 """
8229 return _core_.Window_GetClassDefaultAttributes(*args, **kwargs)
8230
8231 def DLG_PNT(win, point_or_x, y=None):
8232 """
8233 Convenience function for converting a Point or (x,y) in
8234 dialog units to pixel units.
8235 """
8236 if y is None:
8237 return win.ConvertDialogPointToPixels(point_or_x)
8238 else:
8239 return win.ConvertDialogPointToPixels(wx.Point(point_or_x, y))
8240
8241 def DLG_SZE(win, size_width, height=None):
8242 """
8243 Convenience function for converting a Size or (w,h) in
8244 dialog units to pixel units.
8245 """
8246 if height is None:
8247 return win.ConvertDialogSizeToPixels(size_width)
8248 else:
8249 return win.ConvertDialogSizeToPixels(wx.Size(size_width, height))
8250
8251
8252 def FindWindowById(*args, **kwargs):
8253 """
8254 FindWindowById(long id, Window parent=None) -> Window
8255
8256 Find the first window in the application with the given id. If parent
8257 is None, the search will start from all top-level frames and dialog
8258 boxes; if non-None, the search will be limited to the given window
8259 hierarchy. The search is recursive in both cases.
8260 """
8261 return _core_.FindWindowById(*args, **kwargs)
8262
8263 def FindWindowByName(*args, **kwargs):
8264 """
8265 FindWindowByName(String name, Window parent=None) -> Window
8266
8267 Find a window by its name (as given in a window constructor or Create
8268 function call). If parent is None, the search will start from all
8269 top-level frames and dialog boxes; if non-None, the search will be
8270 limited to the given window hierarchy. The search is recursive in both
8271 cases.
8272
8273 If no window with such name is found, wx.FindWindowByLabel is called.
8274 """
8275 return _core_.FindWindowByName(*args, **kwargs)
8276
8277 def FindWindowByLabel(*args, **kwargs):
8278 """
8279 FindWindowByLabel(String label, Window parent=None) -> Window
8280
8281 Find a window by its label. Depending on the type of window, the label
8282 may be a window title or panel item label. If parent is None, the
8283 search will start from all top-level frames and dialog boxes; if
8284 non-None, the search will be limited to the given window
8285 hierarchy. The search is recursive in both cases.
8286 """
8287 return _core_.FindWindowByLabel(*args, **kwargs)
8288
8289 def Window_FromHWND(*args, **kwargs):
8290 """Window_FromHWND(Window parent, unsigned long _hWnd) -> Window"""
8291 return _core_.Window_FromHWND(*args, **kwargs)
8292 #---------------------------------------------------------------------------
8293
8294 class Validator(EvtHandler):
8295 """Proxy of C++ Validator class"""
8296 def __repr__(self):
8297 return "<%s.%s; proxy of C++ wxValidator instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
8298 def __init__(self, *args, **kwargs):
8299 """__init__(self) -> Validator"""
8300 newobj = _core_.new_Validator(*args, **kwargs)
8301 self.this = newobj.this
8302 self.thisown = 1
8303 del newobj.thisown
8304 self._setOORInfo(self)
8305
8306 def Clone(*args, **kwargs):
8307 """Clone(self) -> Validator"""
8308 return _core_.Validator_Clone(*args, **kwargs)
8309
8310 def Validate(*args, **kwargs):
8311 """Validate(self, Window parent) -> bool"""
8312 return _core_.Validator_Validate(*args, **kwargs)
8313
8314 def TransferToWindow(*args, **kwargs):
8315 """TransferToWindow(self) -> bool"""
8316 return _core_.Validator_TransferToWindow(*args, **kwargs)
8317
8318 def TransferFromWindow(*args, **kwargs):
8319 """TransferFromWindow(self) -> bool"""
8320 return _core_.Validator_TransferFromWindow(*args, **kwargs)
8321
8322 def GetWindow(*args, **kwargs):
8323 """GetWindow(self) -> Window"""
8324 return _core_.Validator_GetWindow(*args, **kwargs)
8325
8326 def SetWindow(*args, **kwargs):
8327 """SetWindow(self, Window window)"""
8328 return _core_.Validator_SetWindow(*args, **kwargs)
8329
8330 def IsSilent(*args, **kwargs):
8331 """IsSilent() -> bool"""
8332 return _core_.Validator_IsSilent(*args, **kwargs)
8333
8334 IsSilent = staticmethod(IsSilent)
8335 def SetBellOnError(*args, **kwargs):
8336 """SetBellOnError(int doIt=True)"""
8337 return _core_.Validator_SetBellOnError(*args, **kwargs)
8338
8339 SetBellOnError = staticmethod(SetBellOnError)
8340
8341 class ValidatorPtr(Validator):
8342 def __init__(self, this):
8343 self.this = this
8344 if not hasattr(self,"thisown"): self.thisown = 0
8345 self.__class__ = Validator
8346 _core_.Validator_swigregister(ValidatorPtr)
8347
8348 def Validator_IsSilent(*args, **kwargs):
8349 """Validator_IsSilent() -> bool"""
8350 return _core_.Validator_IsSilent(*args, **kwargs)
8351
8352 def Validator_SetBellOnError(*args, **kwargs):
8353 """Validator_SetBellOnError(int doIt=True)"""
8354 return _core_.Validator_SetBellOnError(*args, **kwargs)
8355
8356 class PyValidator(Validator):
8357 """Proxy of C++ PyValidator class"""
8358 def __repr__(self):
8359 return "<%s.%s; proxy of C++ wxPyValidator instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
8360 def __init__(self, *args, **kwargs):
8361 """__init__(self) -> PyValidator"""
8362 newobj = _core_.new_PyValidator(*args, **kwargs)
8363 self.this = newobj.this
8364 self.thisown = 1
8365 del newobj.thisown
8366
8367 self._setCallbackInfo(self, PyValidator, 1)
8368 self._setOORInfo(self)
8369
8370 def _setCallbackInfo(*args, **kwargs):
8371 """_setCallbackInfo(self, PyObject self, PyObject _class, int incref=True)"""
8372 return _core_.PyValidator__setCallbackInfo(*args, **kwargs)
8373
8374
8375 class PyValidatorPtr(PyValidator):
8376 def __init__(self, this):
8377 self.this = this
8378 if not hasattr(self,"thisown"): self.thisown = 0
8379 self.__class__ = PyValidator
8380 _core_.PyValidator_swigregister(PyValidatorPtr)
8381
8382 #---------------------------------------------------------------------------
8383
8384 class Menu(EvtHandler):
8385 """Proxy of C++ Menu class"""
8386 def __repr__(self):
8387 return "<%s.%s; proxy of C++ wxMenu instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
8388 def __init__(self, *args, **kwargs):
8389 """__init__(self, String title=EmptyString, long style=0) -> Menu"""
8390 newobj = _core_.new_Menu(*args, **kwargs)
8391 self.this = newobj.this
8392 self.thisown = 1
8393 del newobj.thisown
8394 self._setOORInfo(self)
8395
8396 def Append(*args, **kwargs):
8397 """Append(self, int id, String text, String help=EmptyString, int kind=ITEM_NORMAL) -> MenuItem"""
8398 return _core_.Menu_Append(*args, **kwargs)
8399
8400 def AppendSeparator(*args, **kwargs):
8401 """AppendSeparator(self) -> MenuItem"""
8402 return _core_.Menu_AppendSeparator(*args, **kwargs)
8403
8404 def AppendCheckItem(*args, **kwargs):
8405 """AppendCheckItem(self, int id, String text, String help=EmptyString) -> MenuItem"""
8406 return _core_.Menu_AppendCheckItem(*args, **kwargs)
8407
8408 def AppendRadioItem(*args, **kwargs):
8409 """AppendRadioItem(self, int id, String text, String help=EmptyString) -> MenuItem"""
8410 return _core_.Menu_AppendRadioItem(*args, **kwargs)
8411
8412 def AppendMenu(*args, **kwargs):
8413 """AppendMenu(self, int id, String text, Menu submenu, String help=EmptyString) -> MenuItem"""
8414 return _core_.Menu_AppendMenu(*args, **kwargs)
8415
8416 def AppendItem(*args, **kwargs):
8417 """AppendItem(self, MenuItem item) -> MenuItem"""
8418 return _core_.Menu_AppendItem(*args, **kwargs)
8419
8420 def Break(*args, **kwargs):
8421 """Break(self)"""
8422 return _core_.Menu_Break(*args, **kwargs)
8423
8424 def InsertItem(*args, **kwargs):
8425 """InsertItem(self, size_t pos, MenuItem item) -> MenuItem"""
8426 return _core_.Menu_InsertItem(*args, **kwargs)
8427
8428 def Insert(*args, **kwargs):
8429 """
8430 Insert(self, size_t pos, int id, String text, String help=EmptyString,
8431 int kind=ITEM_NORMAL) -> MenuItem
8432 """
8433 return _core_.Menu_Insert(*args, **kwargs)
8434
8435 def InsertSeparator(*args, **kwargs):
8436 """InsertSeparator(self, size_t pos) -> MenuItem"""
8437 return _core_.Menu_InsertSeparator(*args, **kwargs)
8438
8439 def InsertCheckItem(*args, **kwargs):
8440 """InsertCheckItem(self, size_t pos, int id, String text, String help=EmptyString) -> MenuItem"""
8441 return _core_.Menu_InsertCheckItem(*args, **kwargs)
8442
8443 def InsertRadioItem(*args, **kwargs):
8444 """InsertRadioItem(self, size_t pos, int id, String text, String help=EmptyString) -> MenuItem"""
8445 return _core_.Menu_InsertRadioItem(*args, **kwargs)
8446
8447 def InsertMenu(*args, **kwargs):
8448 """InsertMenu(self, size_t pos, int id, String text, Menu submenu, String help=EmptyString) -> MenuItem"""
8449 return _core_.Menu_InsertMenu(*args, **kwargs)
8450
8451 def PrependItem(*args, **kwargs):
8452 """PrependItem(self, MenuItem item) -> MenuItem"""
8453 return _core_.Menu_PrependItem(*args, **kwargs)
8454
8455 def Prepend(*args, **kwargs):
8456 """Prepend(self, int id, String text, String help=EmptyString, int kind=ITEM_NORMAL) -> MenuItem"""
8457 return _core_.Menu_Prepend(*args, **kwargs)
8458
8459 def PrependSeparator(*args, **kwargs):
8460 """PrependSeparator(self) -> MenuItem"""
8461 return _core_.Menu_PrependSeparator(*args, **kwargs)
8462
8463 def PrependCheckItem(*args, **kwargs):
8464 """PrependCheckItem(self, int id, String text, String help=EmptyString) -> MenuItem"""
8465 return _core_.Menu_PrependCheckItem(*args, **kwargs)
8466
8467 def PrependRadioItem(*args, **kwargs):
8468 """PrependRadioItem(self, int id, String text, String help=EmptyString) -> MenuItem"""
8469 return _core_.Menu_PrependRadioItem(*args, **kwargs)
8470
8471 def PrependMenu(*args, **kwargs):
8472 """PrependMenu(self, int id, String text, Menu submenu, String help=EmptyString) -> MenuItem"""
8473 return _core_.Menu_PrependMenu(*args, **kwargs)
8474
8475 def Remove(*args, **kwargs):
8476 """Remove(self, int id) -> MenuItem"""
8477 return _core_.Menu_Remove(*args, **kwargs)
8478
8479 def RemoveItem(*args, **kwargs):
8480 """RemoveItem(self, MenuItem item) -> MenuItem"""
8481 return _core_.Menu_RemoveItem(*args, **kwargs)
8482
8483 def Delete(*args, **kwargs):
8484 """Delete(self, int id) -> bool"""
8485 return _core_.Menu_Delete(*args, **kwargs)
8486
8487 def DeleteItem(*args, **kwargs):
8488 """DeleteItem(self, MenuItem item) -> bool"""
8489 return _core_.Menu_DeleteItem(*args, **kwargs)
8490
8491 def Destroy(*args, **kwargs):
8492 """
8493 Destroy(self)
8494
8495 Deletes the C++ object this Python object is a proxy for.
8496 """
8497 return _core_.Menu_Destroy(*args, **kwargs)
8498
8499 def DestroyId(*args, **kwargs):
8500 """
8501 DestroyId(self, int id) -> bool
8502
8503 Deletes the C++ object this Python object is a proxy for.
8504 """
8505 return _core_.Menu_DestroyId(*args, **kwargs)
8506
8507 def DestroyItem(*args, **kwargs):
8508 """
8509 DestroyItem(self, MenuItem item) -> bool
8510
8511 Deletes the C++ object this Python object is a proxy for.
8512 """
8513 return _core_.Menu_DestroyItem(*args, **kwargs)
8514
8515 def GetMenuItemCount(*args, **kwargs):
8516 """GetMenuItemCount(self) -> size_t"""
8517 return _core_.Menu_GetMenuItemCount(*args, **kwargs)
8518
8519 def GetMenuItems(*args, **kwargs):
8520 """GetMenuItems(self) -> PyObject"""
8521 return _core_.Menu_GetMenuItems(*args, **kwargs)
8522
8523 def FindItem(*args, **kwargs):
8524 """FindItem(self, String item) -> int"""
8525 return _core_.Menu_FindItem(*args, **kwargs)
8526
8527 def FindItemById(*args, **kwargs):
8528 """FindItemById(self, int id) -> MenuItem"""
8529 return _core_.Menu_FindItemById(*args, **kwargs)
8530
8531 def FindItemByPosition(*args, **kwargs):
8532 """FindItemByPosition(self, size_t position) -> MenuItem"""
8533 return _core_.Menu_FindItemByPosition(*args, **kwargs)
8534
8535 def Enable(*args, **kwargs):
8536 """Enable(self, int id, bool enable)"""
8537 return _core_.Menu_Enable(*args, **kwargs)
8538
8539 def IsEnabled(*args, **kwargs):
8540 """IsEnabled(self, int id) -> bool"""
8541 return _core_.Menu_IsEnabled(*args, **kwargs)
8542
8543 def Check(*args, **kwargs):
8544 """Check(self, int id, bool check)"""
8545 return _core_.Menu_Check(*args, **kwargs)
8546
8547 def IsChecked(*args, **kwargs):
8548 """IsChecked(self, int id) -> bool"""
8549 return _core_.Menu_IsChecked(*args, **kwargs)
8550
8551 def SetLabel(*args, **kwargs):
8552 """SetLabel(self, int id, String label)"""
8553 return _core_.Menu_SetLabel(*args, **kwargs)
8554
8555 def GetLabel(*args, **kwargs):
8556 """GetLabel(self, int id) -> String"""
8557 return _core_.Menu_GetLabel(*args, **kwargs)
8558
8559 def SetHelpString(*args, **kwargs):
8560 """SetHelpString(self, int id, String helpString)"""
8561 return _core_.Menu_SetHelpString(*args, **kwargs)
8562
8563 def GetHelpString(*args, **kwargs):
8564 """GetHelpString(self, int id) -> String"""
8565 return _core_.Menu_GetHelpString(*args, **kwargs)
8566
8567 def SetTitle(*args, **kwargs):
8568 """SetTitle(self, String title)"""
8569 return _core_.Menu_SetTitle(*args, **kwargs)
8570
8571 def GetTitle(*args, **kwargs):
8572 """GetTitle(self) -> String"""
8573 return _core_.Menu_GetTitle(*args, **kwargs)
8574
8575 def SetEventHandler(*args, **kwargs):
8576 """SetEventHandler(self, EvtHandler handler)"""
8577 return _core_.Menu_SetEventHandler(*args, **kwargs)
8578
8579 def GetEventHandler(*args, **kwargs):
8580 """GetEventHandler(self) -> EvtHandler"""
8581 return _core_.Menu_GetEventHandler(*args, **kwargs)
8582
8583 def SetInvokingWindow(*args, **kwargs):
8584 """SetInvokingWindow(self, Window win)"""
8585 return _core_.Menu_SetInvokingWindow(*args, **kwargs)
8586
8587 def GetInvokingWindow(*args, **kwargs):
8588 """GetInvokingWindow(self) -> Window"""
8589 return _core_.Menu_GetInvokingWindow(*args, **kwargs)
8590
8591 def GetStyle(*args, **kwargs):
8592 """GetStyle(self) -> long"""
8593 return _core_.Menu_GetStyle(*args, **kwargs)
8594
8595 def UpdateUI(*args, **kwargs):
8596 """UpdateUI(self, EvtHandler source=None)"""
8597 return _core_.Menu_UpdateUI(*args, **kwargs)
8598
8599 def GetMenuBar(*args, **kwargs):
8600 """GetMenuBar(self) -> MenuBar"""
8601 return _core_.Menu_GetMenuBar(*args, **kwargs)
8602
8603 def Attach(*args, **kwargs):
8604 """Attach(self, wxMenuBarBase menubar)"""
8605 return _core_.Menu_Attach(*args, **kwargs)
8606
8607 def Detach(*args, **kwargs):
8608 """Detach(self)"""
8609 return _core_.Menu_Detach(*args, **kwargs)
8610
8611 def IsAttached(*args, **kwargs):
8612 """IsAttached(self) -> bool"""
8613 return _core_.Menu_IsAttached(*args, **kwargs)
8614
8615 def SetParent(*args, **kwargs):
8616 """SetParent(self, Menu parent)"""
8617 return _core_.Menu_SetParent(*args, **kwargs)
8618
8619 def GetParent(*args, **kwargs):
8620 """GetParent(self) -> Menu"""
8621 return _core_.Menu_GetParent(*args, **kwargs)
8622
8623
8624 class MenuPtr(Menu):
8625 def __init__(self, this):
8626 self.this = this
8627 if not hasattr(self,"thisown"): self.thisown = 0
8628 self.__class__ = Menu
8629 _core_.Menu_swigregister(MenuPtr)
8630 DefaultValidator = cvar.DefaultValidator
8631
8632 #---------------------------------------------------------------------------
8633
8634 class MenuBar(Window):
8635 """Proxy of C++ MenuBar class"""
8636 def __repr__(self):
8637 return "<%s.%s; proxy of C++ wxMenuBar instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
8638 def __init__(self, *args, **kwargs):
8639 """__init__(self, long style=0) -> MenuBar"""
8640 newobj = _core_.new_MenuBar(*args, **kwargs)
8641 self.this = newobj.this
8642 self.thisown = 1
8643 del newobj.thisown
8644 self._setOORInfo(self)
8645
8646 def Append(*args, **kwargs):
8647 """Append(self, Menu menu, String title) -> bool"""
8648 return _core_.MenuBar_Append(*args, **kwargs)
8649
8650 def Insert(*args, **kwargs):
8651 """Insert(self, size_t pos, Menu menu, String title) -> bool"""
8652 return _core_.MenuBar_Insert(*args, **kwargs)
8653
8654 def GetMenuCount(*args, **kwargs):
8655 """GetMenuCount(self) -> size_t"""
8656 return _core_.MenuBar_GetMenuCount(*args, **kwargs)
8657
8658 def GetMenu(*args, **kwargs):
8659 """GetMenu(self, size_t pos) -> Menu"""
8660 return _core_.MenuBar_GetMenu(*args, **kwargs)
8661
8662 def Replace(*args, **kwargs):
8663 """Replace(self, size_t pos, Menu menu, String title) -> Menu"""
8664 return _core_.MenuBar_Replace(*args, **kwargs)
8665
8666 def Remove(*args, **kwargs):
8667 """Remove(self, size_t pos) -> Menu"""
8668 return _core_.MenuBar_Remove(*args, **kwargs)
8669
8670 def EnableTop(*args, **kwargs):
8671 """EnableTop(self, size_t pos, bool enable)"""
8672 return _core_.MenuBar_EnableTop(*args, **kwargs)
8673
8674 def IsEnabledTop(*args, **kwargs):
8675 """IsEnabledTop(self, size_t pos) -> bool"""
8676 return _core_.MenuBar_IsEnabledTop(*args, **kwargs)
8677
8678 def SetLabelTop(*args, **kwargs):
8679 """SetLabelTop(self, size_t pos, String label)"""
8680 return _core_.MenuBar_SetLabelTop(*args, **kwargs)
8681
8682 def GetLabelTop(*args, **kwargs):
8683 """GetLabelTop(self, size_t pos) -> String"""
8684 return _core_.MenuBar_GetLabelTop(*args, **kwargs)
8685
8686 def FindMenuItem(*args, **kwargs):
8687 """FindMenuItem(self, String menu, String item) -> int"""
8688 return _core_.MenuBar_FindMenuItem(*args, **kwargs)
8689
8690 def FindItemById(*args, **kwargs):
8691 """FindItemById(self, int id) -> MenuItem"""
8692 return _core_.MenuBar_FindItemById(*args, **kwargs)
8693
8694 def FindMenu(*args, **kwargs):
8695 """FindMenu(self, String title) -> int"""
8696 return _core_.MenuBar_FindMenu(*args, **kwargs)
8697
8698 def Enable(*args, **kwargs):
8699 """Enable(self, int id, bool enable)"""
8700 return _core_.MenuBar_Enable(*args, **kwargs)
8701
8702 def Check(*args, **kwargs):
8703 """Check(self, int id, bool check)"""
8704 return _core_.MenuBar_Check(*args, **kwargs)
8705
8706 def IsChecked(*args, **kwargs):
8707 """IsChecked(self, int id) -> bool"""
8708 return _core_.MenuBar_IsChecked(*args, **kwargs)
8709
8710 def IsEnabled(*args, **kwargs):
8711 """IsEnabled(self, int id) -> bool"""
8712 return _core_.MenuBar_IsEnabled(*args, **kwargs)
8713
8714 def SetLabel(*args, **kwargs):
8715 """SetLabel(self, int id, String label)"""
8716 return _core_.MenuBar_SetLabel(*args, **kwargs)
8717
8718 def GetLabel(*args, **kwargs):
8719 """GetLabel(self, int id) -> String"""
8720 return _core_.MenuBar_GetLabel(*args, **kwargs)
8721
8722 def SetHelpString(*args, **kwargs):
8723 """SetHelpString(self, int id, String helpString)"""
8724 return _core_.MenuBar_SetHelpString(*args, **kwargs)
8725
8726 def GetHelpString(*args, **kwargs):
8727 """GetHelpString(self, int id) -> String"""
8728 return _core_.MenuBar_GetHelpString(*args, **kwargs)
8729
8730 def GetFrame(*args, **kwargs):
8731 """GetFrame(self) -> wxFrame"""
8732 return _core_.MenuBar_GetFrame(*args, **kwargs)
8733
8734 def IsAttached(*args, **kwargs):
8735 """IsAttached(self) -> bool"""
8736 return _core_.MenuBar_IsAttached(*args, **kwargs)
8737
8738 def Attach(*args, **kwargs):
8739 """Attach(self, wxFrame frame)"""
8740 return _core_.MenuBar_Attach(*args, **kwargs)
8741
8742 def Detach(*args, **kwargs):
8743 """Detach(self)"""
8744 return _core_.MenuBar_Detach(*args, **kwargs)
8745
8746
8747 class MenuBarPtr(MenuBar):
8748 def __init__(self, this):
8749 self.this = this
8750 if not hasattr(self,"thisown"): self.thisown = 0
8751 self.__class__ = MenuBar
8752 _core_.MenuBar_swigregister(MenuBarPtr)
8753
8754 #---------------------------------------------------------------------------
8755
8756 class MenuItem(Object):
8757 """Proxy of C++ MenuItem class"""
8758 def __repr__(self):
8759 return "<%s.%s; proxy of C++ wxMenuItem instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
8760 def __init__(self, *args, **kwargs):
8761 """
8762 __init__(self, Menu parentMenu=None, int id=ID_ANY, String text=EmptyString,
8763 String help=EmptyString, int kind=ITEM_NORMAL,
8764 Menu subMenu=None) -> MenuItem
8765 """
8766 newobj = _core_.new_MenuItem(*args, **kwargs)
8767 self.this = newobj.this
8768 self.thisown = 1
8769 del newobj.thisown
8770 def GetMenu(*args, **kwargs):
8771 """GetMenu(self) -> Menu"""
8772 return _core_.MenuItem_GetMenu(*args, **kwargs)
8773
8774 def SetMenu(*args, **kwargs):
8775 """SetMenu(self, Menu menu)"""
8776 return _core_.MenuItem_SetMenu(*args, **kwargs)
8777
8778 def SetId(*args, **kwargs):
8779 """SetId(self, int id)"""
8780 return _core_.MenuItem_SetId(*args, **kwargs)
8781
8782 def GetId(*args, **kwargs):
8783 """GetId(self) -> int"""
8784 return _core_.MenuItem_GetId(*args, **kwargs)
8785
8786 def IsSeparator(*args, **kwargs):
8787 """IsSeparator(self) -> bool"""
8788 return _core_.MenuItem_IsSeparator(*args, **kwargs)
8789
8790 def SetText(*args, **kwargs):
8791 """SetText(self, String str)"""
8792 return _core_.MenuItem_SetText(*args, **kwargs)
8793
8794 def GetLabel(*args, **kwargs):
8795 """GetLabel(self) -> String"""
8796 return _core_.MenuItem_GetLabel(*args, **kwargs)
8797
8798 def GetText(*args, **kwargs):
8799 """GetText(self) -> String"""
8800 return _core_.MenuItem_GetText(*args, **kwargs)
8801
8802 def GetLabelFromText(*args, **kwargs):
8803 """GetLabelFromText(String text) -> String"""
8804 return _core_.MenuItem_GetLabelFromText(*args, **kwargs)
8805
8806 GetLabelFromText = staticmethod(GetLabelFromText)
8807 def GetKind(*args, **kwargs):
8808 """GetKind(self) -> int"""
8809 return _core_.MenuItem_GetKind(*args, **kwargs)
8810
8811 def SetKind(*args, **kwargs):
8812 """SetKind(self, int kind)"""
8813 return _core_.MenuItem_SetKind(*args, **kwargs)
8814
8815 def SetCheckable(*args, **kwargs):
8816 """SetCheckable(self, bool checkable)"""
8817 return _core_.MenuItem_SetCheckable(*args, **kwargs)
8818
8819 def IsCheckable(*args, **kwargs):
8820 """IsCheckable(self) -> bool"""
8821 return _core_.MenuItem_IsCheckable(*args, **kwargs)
8822
8823 def IsSubMenu(*args, **kwargs):
8824 """IsSubMenu(self) -> bool"""
8825 return _core_.MenuItem_IsSubMenu(*args, **kwargs)
8826
8827 def SetSubMenu(*args, **kwargs):
8828 """SetSubMenu(self, Menu menu)"""
8829 return _core_.MenuItem_SetSubMenu(*args, **kwargs)
8830
8831 def GetSubMenu(*args, **kwargs):
8832 """GetSubMenu(self) -> Menu"""
8833 return _core_.MenuItem_GetSubMenu(*args, **kwargs)
8834
8835 def Enable(*args, **kwargs):
8836 """Enable(self, bool enable=True)"""
8837 return _core_.MenuItem_Enable(*args, **kwargs)
8838
8839 def IsEnabled(*args, **kwargs):
8840 """IsEnabled(self) -> bool"""
8841 return _core_.MenuItem_IsEnabled(*args, **kwargs)
8842
8843 def Check(*args, **kwargs):
8844 """Check(self, bool check=True)"""
8845 return _core_.MenuItem_Check(*args, **kwargs)
8846
8847 def IsChecked(*args, **kwargs):
8848 """IsChecked(self) -> bool"""
8849 return _core_.MenuItem_IsChecked(*args, **kwargs)
8850
8851 def Toggle(*args, **kwargs):
8852 """Toggle(self)"""
8853 return _core_.MenuItem_Toggle(*args, **kwargs)
8854
8855 def SetHelp(*args, **kwargs):
8856 """SetHelp(self, String str)"""
8857 return _core_.MenuItem_SetHelp(*args, **kwargs)
8858
8859 def GetHelp(*args, **kwargs):
8860 """GetHelp(self) -> String"""
8861 return _core_.MenuItem_GetHelp(*args, **kwargs)
8862
8863 def GetAccel(*args, **kwargs):
8864 """GetAccel(self) -> AcceleratorEntry"""
8865 return _core_.MenuItem_GetAccel(*args, **kwargs)
8866
8867 def SetAccel(*args, **kwargs):
8868 """SetAccel(self, AcceleratorEntry accel)"""
8869 return _core_.MenuItem_SetAccel(*args, **kwargs)
8870
8871 def SetFont(*args, **kwargs):
8872 """SetFont(self, Font font)"""
8873 return _core_.MenuItem_SetFont(*args, **kwargs)
8874
8875 def GetFont(*args, **kwargs):
8876 """GetFont(self) -> Font"""
8877 return _core_.MenuItem_GetFont(*args, **kwargs)
8878
8879 def SetTextColour(*args, **kwargs):
8880 """SetTextColour(self, Colour colText)"""
8881 return _core_.MenuItem_SetTextColour(*args, **kwargs)
8882
8883 def GetTextColour(*args, **kwargs):
8884 """GetTextColour(self) -> Colour"""
8885 return _core_.MenuItem_GetTextColour(*args, **kwargs)
8886
8887 def SetBackgroundColour(*args, **kwargs):
8888 """SetBackgroundColour(self, Colour colBack)"""
8889 return _core_.MenuItem_SetBackgroundColour(*args, **kwargs)
8890
8891 def GetBackgroundColour(*args, **kwargs):
8892 """GetBackgroundColour(self) -> Colour"""
8893 return _core_.MenuItem_GetBackgroundColour(*args, **kwargs)
8894
8895 def SetBitmaps(*args, **kwargs):
8896 """SetBitmaps(self, Bitmap bmpChecked, Bitmap bmpUnchecked=wxNullBitmap)"""
8897 return _core_.MenuItem_SetBitmaps(*args, **kwargs)
8898
8899 def SetDisabledBitmap(*args, **kwargs):
8900 """SetDisabledBitmap(self, Bitmap bmpDisabled)"""
8901 return _core_.MenuItem_SetDisabledBitmap(*args, **kwargs)
8902
8903 def GetDisabledBitmap(*args, **kwargs):
8904 """GetDisabledBitmap(self) -> Bitmap"""
8905 return _core_.MenuItem_GetDisabledBitmap(*args, **kwargs)
8906
8907 def SetMarginWidth(*args, **kwargs):
8908 """SetMarginWidth(self, int nWidth)"""
8909 return _core_.MenuItem_SetMarginWidth(*args, **kwargs)
8910
8911 def GetMarginWidth(*args, **kwargs):
8912 """GetMarginWidth(self) -> int"""
8913 return _core_.MenuItem_GetMarginWidth(*args, **kwargs)
8914
8915 def GetDefaultMarginWidth(*args, **kwargs):
8916 """GetDefaultMarginWidth() -> int"""
8917 return _core_.MenuItem_GetDefaultMarginWidth(*args, **kwargs)
8918
8919 GetDefaultMarginWidth = staticmethod(GetDefaultMarginWidth)
8920 def IsOwnerDrawn(*args, **kwargs):
8921 """IsOwnerDrawn(self) -> bool"""
8922 return _core_.MenuItem_IsOwnerDrawn(*args, **kwargs)
8923
8924 def SetOwnerDrawn(*args, **kwargs):
8925 """SetOwnerDrawn(self, bool ownerDrawn=True)"""
8926 return _core_.MenuItem_SetOwnerDrawn(*args, **kwargs)
8927
8928 def ResetOwnerDrawn(*args, **kwargs):
8929 """ResetOwnerDrawn(self)"""
8930 return _core_.MenuItem_ResetOwnerDrawn(*args, **kwargs)
8931
8932 def SetBitmap(*args, **kwargs):
8933 """SetBitmap(self, Bitmap bitmap)"""
8934 return _core_.MenuItem_SetBitmap(*args, **kwargs)
8935
8936 def GetBitmap(*args, **kwargs):
8937 """GetBitmap(self) -> Bitmap"""
8938 return _core_.MenuItem_GetBitmap(*args, **kwargs)
8939
8940
8941 class MenuItemPtr(MenuItem):
8942 def __init__(self, this):
8943 self.this = this
8944 if not hasattr(self,"thisown"): self.thisown = 0
8945 self.__class__ = MenuItem
8946 _core_.MenuItem_swigregister(MenuItemPtr)
8947
8948 def MenuItem_GetLabelFromText(*args, **kwargs):
8949 """MenuItem_GetLabelFromText(String text) -> String"""
8950 return _core_.MenuItem_GetLabelFromText(*args, **kwargs)
8951
8952 def MenuItem_GetDefaultMarginWidth(*args, **kwargs):
8953 """MenuItem_GetDefaultMarginWidth() -> int"""
8954 return _core_.MenuItem_GetDefaultMarginWidth(*args, **kwargs)
8955
8956 #---------------------------------------------------------------------------
8957
8958 class Control(Window):
8959 """
8960 This is the base class for a control or 'widget'.
8961
8962 A control is generally a small window which processes user input
8963 and/or displays one or more item of data.
8964 """
8965 def __repr__(self):
8966 return "<%s.%s; proxy of C++ wxControl instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
8967 def __init__(self, *args, **kwargs):
8968 """
8969 __init__(self, Window parent, int id=-1, Point pos=DefaultPosition,
8970 Size size=DefaultSize, long style=0, Validator validator=DefaultValidator,
8971 String name=ControlNameStr) -> Control
8972
8973 Create a Control. Normally you should only call this from a subclass'
8974 __init__ as a plain old wx.Control is not very useful.
8975 """
8976 newobj = _core_.new_Control(*args, **kwargs)
8977 self.this = newobj.this
8978 self.thisown = 1
8979 del newobj.thisown
8980 self._setOORInfo(self)
8981
8982 def Create(*args, **kwargs):
8983 """
8984 Create(self, Window parent, int id=-1, Point pos=DefaultPosition,
8985 Size size=DefaultSize, long style=0, Validator validator=DefaultValidator,
8986 String name=ControlNameStr) -> bool
8987
8988 Do the 2nd phase and create the GUI control.
8989 """
8990 return _core_.Control_Create(*args, **kwargs)
8991
8992 def Command(*args, **kwargs):
8993 """
8994 Command(self, CommandEvent event)
8995
8996 Simulates the effect of the user issuing a command to the item.
8997
8998 :see: `wx.CommandEvent`
8999
9000 """
9001 return _core_.Control_Command(*args, **kwargs)
9002
9003 def GetLabel(*args, **kwargs):
9004 """
9005 GetLabel(self) -> String
9006
9007 Return a control's text.
9008 """
9009 return _core_.Control_GetLabel(*args, **kwargs)
9010
9011 def SetLabel(*args, **kwargs):
9012 """
9013 SetLabel(self, String label)
9014
9015 Sets the item's text.
9016 """
9017 return _core_.Control_SetLabel(*args, **kwargs)
9018
9019 def GetClassDefaultAttributes(*args, **kwargs):
9020 """
9021 GetClassDefaultAttributes(int variant=WINDOW_VARIANT_NORMAL) -> VisualAttributes
9022
9023 Get the default attributes for this class. This is useful if you want
9024 to use the same font or colour in your own control as in a standard
9025 control -- which is a much better idea than hard coding specific
9026 colours or fonts which might look completely out of place on the
9027 user's system, especially if it uses themes.
9028
9029 The variant parameter is only relevant under Mac currently and is
9030 ignore under other platforms. Under Mac, it will change the size of
9031 the returned font. See `wx.Window.SetWindowVariant` for more about
9032 this.
9033 """
9034 return _core_.Control_GetClassDefaultAttributes(*args, **kwargs)
9035
9036 GetClassDefaultAttributes = staticmethod(GetClassDefaultAttributes)
9037
9038 class ControlPtr(Control):
9039 def __init__(self, this):
9040 self.this = this
9041 if not hasattr(self,"thisown"): self.thisown = 0
9042 self.__class__ = Control
9043 _core_.Control_swigregister(ControlPtr)
9044 ControlNameStr = cvar.ControlNameStr
9045
9046 def PreControl(*args, **kwargs):
9047 """
9048 PreControl() -> Control
9049
9050 Precreate a Control control for 2-phase creation
9051 """
9052 val = _core_.new_PreControl(*args, **kwargs)
9053 val.thisown = 1
9054 return val
9055
9056 def Control_GetClassDefaultAttributes(*args, **kwargs):
9057 """
9058 Control_GetClassDefaultAttributes(int variant=WINDOW_VARIANT_NORMAL) -> VisualAttributes
9059
9060 Get the default attributes for this class. This is useful if you want
9061 to use the same font or colour in your own control as in a standard
9062 control -- which is a much better idea than hard coding specific
9063 colours or fonts which might look completely out of place on the
9064 user's system, especially if it uses themes.
9065
9066 The variant parameter is only relevant under Mac currently and is
9067 ignore under other platforms. Under Mac, it will change the size of
9068 the returned font. See `wx.Window.SetWindowVariant` for more about
9069 this.
9070 """
9071 return _core_.Control_GetClassDefaultAttributes(*args, **kwargs)
9072
9073 #---------------------------------------------------------------------------
9074
9075 class ItemContainer(object):
9076 """
9077 The wx.ItemContainer class defines an interface which is implemented
9078 by all controls which have string subitems, each of which may be
9079 selected, such as `wx.ListBox`, `wx.CheckListBox`, `wx.Choice` as well
9080 as `wx.ComboBox` which implements an extended interface deriving from
9081 this one.
9082
9083 It defines the methods for accessing the control's items and although
9084 each of the derived classes implements them differently, they still
9085 all conform to the same interface.
9086
9087 The items in a wx.ItemContainer have (non empty) string labels and,
9088 optionally, client data associated with them.
9089
9090 """
9091 def __init__(self): raise RuntimeError, "No constructor defined"
9092 def __repr__(self):
9093 return "<%s.%s; proxy of C++ wxItemContainer instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
9094 def Append(*args, **kwargs):
9095 """
9096 Append(self, String item, PyObject clientData=None) -> int
9097
9098 Adds the item to the control, associating the given data with the item
9099 if not None. The return value is the index of the newly added item
9100 which may be different from the last one if the control is sorted (e.g.
9101 has wx.LB_SORT or wx.CB_SORT style).
9102 """
9103 return _core_.ItemContainer_Append(*args, **kwargs)
9104
9105 def AppendItems(*args, **kwargs):
9106 """
9107 AppendItems(self, List strings)
9108
9109 Apend several items at once to the control. Notice that calling this
9110 method may be much faster than appending the items one by one if you
9111 need to add a lot of items.
9112 """
9113 return _core_.ItemContainer_AppendItems(*args, **kwargs)
9114
9115 def Insert(*args, **kwargs):
9116 """
9117 Insert(self, String item, int pos, PyObject clientData=None) -> int
9118
9119 Insert an item into the control before the item at the ``pos`` index,
9120 optionally associating some data object with the item.
9121 """
9122 return _core_.ItemContainer_Insert(*args, **kwargs)
9123
9124 def Clear(*args, **kwargs):
9125 """
9126 Clear(self)
9127
9128 Removes all items from the control.
9129 """
9130 return _core_.ItemContainer_Clear(*args, **kwargs)
9131
9132 def Delete(*args, **kwargs):
9133 """
9134 Delete(self, int n)
9135
9136 Deletes the item at the zero-based index 'n' from the control. Note
9137 that it is an error (signalled by a `wx.PyAssertionError` exception if
9138 enabled) to remove an item with the index negative or greater or equal
9139 than the number of items in the control.
9140 """
9141 return _core_.ItemContainer_Delete(*args, **kwargs)
9142
9143 def GetClientData(*args, **kwargs):
9144 """
9145 GetClientData(self, int n) -> PyObject
9146
9147 Returns the client data associated with the given item, (if any.)
9148 """
9149 return _core_.ItemContainer_GetClientData(*args, **kwargs)
9150
9151 def SetClientData(*args, **kwargs):
9152 """
9153 SetClientData(self, int n, PyObject clientData)
9154
9155 Associate the given client data with the item at position n.
9156 """
9157 return _core_.ItemContainer_SetClientData(*args, **kwargs)
9158
9159 def GetCount(*args, **kwargs):
9160 """
9161 GetCount(self) -> int
9162
9163 Returns the number of items in the control.
9164 """
9165 return _core_.ItemContainer_GetCount(*args, **kwargs)
9166
9167 def IsEmpty(*args, **kwargs):
9168 """
9169 IsEmpty(self) -> bool
9170
9171 Returns True if the control is empty or False if it has some items.
9172 """
9173 return _core_.ItemContainer_IsEmpty(*args, **kwargs)
9174
9175 def GetString(*args, **kwargs):
9176 """
9177 GetString(self, int n) -> String
9178
9179 Returns the label of the item with the given index.
9180 """
9181 return _core_.ItemContainer_GetString(*args, **kwargs)
9182
9183 def GetStrings(*args, **kwargs):
9184 """GetStrings(self) -> wxArrayString"""
9185 return _core_.ItemContainer_GetStrings(*args, **kwargs)
9186
9187 def SetString(*args, **kwargs):
9188 """
9189 SetString(self, int n, String s)
9190
9191 Sets the label for the given item.
9192 """
9193 return _core_.ItemContainer_SetString(*args, **kwargs)
9194
9195 def FindString(*args, **kwargs):
9196 """
9197 FindString(self, String s) -> int
9198
9199 Finds an item whose label matches the given string. Returns the
9200 zero-based position of the item, or ``wx.NOT_FOUND`` if the string was not
9201 found.
9202 """
9203 return _core_.ItemContainer_FindString(*args, **kwargs)
9204
9205 def SetSelection(*args, **kwargs):
9206 """
9207 SetSelection(self, int n)
9208
9209 Sets the item at index 'n' to be the selected item.
9210 """
9211 return _core_.ItemContainer_SetSelection(*args, **kwargs)
9212
9213 def GetSelection(*args, **kwargs):
9214 """
9215 GetSelection(self) -> int
9216
9217 Returns the index of the selected item or ``wx.NOT_FOUND`` if no item
9218 is selected.
9219 """
9220 return _core_.ItemContainer_GetSelection(*args, **kwargs)
9221
9222 def SetStringSelection(*args, **kwargs):
9223 """SetStringSelection(self, String s) -> bool"""
9224 return _core_.ItemContainer_SetStringSelection(*args, **kwargs)
9225
9226 def GetStringSelection(*args, **kwargs):
9227 """
9228 GetStringSelection(self) -> String
9229
9230 Returns the label of the selected item or an empty string if no item
9231 is selected.
9232 """
9233 return _core_.ItemContainer_GetStringSelection(*args, **kwargs)
9234
9235 def Select(*args, **kwargs):
9236 """
9237 Select(self, int n)
9238
9239 This is the same as `SetSelection` and exists only because it is
9240 slightly more natural for controls which support multiple selection.
9241 """
9242 return _core_.ItemContainer_Select(*args, **kwargs)
9243
9244
9245 class ItemContainerPtr(ItemContainer):
9246 def __init__(self, this):
9247 self.this = this
9248 if not hasattr(self,"thisown"): self.thisown = 0
9249 self.__class__ = ItemContainer
9250 _core_.ItemContainer_swigregister(ItemContainerPtr)
9251
9252 #---------------------------------------------------------------------------
9253
9254 class ControlWithItems(Control,ItemContainer):
9255 """
9256 wx.ControlWithItems combines the ``wx.ItemContainer`` class with the
9257 wx.Control class, and is used for the base class of various controls
9258 that have items.
9259 """
9260 def __init__(self): raise RuntimeError, "No constructor defined"
9261 def __repr__(self):
9262 return "<%s.%s; proxy of C++ wxControlWithItems instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
9263
9264 class ControlWithItemsPtr(ControlWithItems):
9265 def __init__(self, this):
9266 self.this = this
9267 if not hasattr(self,"thisown"): self.thisown = 0
9268 self.__class__ = ControlWithItems
9269 _core_.ControlWithItems_swigregister(ControlWithItemsPtr)
9270
9271 #---------------------------------------------------------------------------
9272
9273 class SizerItem(Object):
9274 """
9275 The wx.SizerItem class is used to track the position, size and other
9276 attributes of each item managed by a `wx.Sizer`. In normal usage user
9277 code should never need to deal directly with a wx.SizerItem, but
9278 custom classes derived from `wx.PySizer` will probably need to use the
9279 collection of wx.SizerItems held by wx.Sizer when calculating layout.
9280
9281 :see: `wx.Sizer`, `wx.GBSizerItem`
9282 """
9283 def __repr__(self):
9284 return "<%s.%s; proxy of C++ wxSizerItem instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
9285 def __init__(self, *args, **kwargs):
9286 """
9287 __init__(self) -> SizerItem
9288
9289 Constructs an empty wx.SizerItem. Either a window, sizer or spacer
9290 size will need to be set before this item can be used in a Sizer.
9291
9292 You will probably never need to create a wx.SizerItem directly as they
9293 are created automatically when the sizer's Add, Insert or Prepend
9294 methods are called.
9295
9296 :see: `wx.SizerItemSpacer`, `wx.SizerItemWindow`, `wx.SizerItemSizer`
9297 """
9298 newobj = _core_.new_SizerItem(*args, **kwargs)
9299 self.this = newobj.this
9300 self.thisown = 1
9301 del newobj.thisown
9302 def DeleteWindows(*args, **kwargs):
9303 """
9304 DeleteWindows(self)
9305
9306 Destroy the window or the windows in a subsizer, depending on the type
9307 of item.
9308 """
9309 return _core_.SizerItem_DeleteWindows(*args, **kwargs)
9310
9311 def DetachSizer(*args, **kwargs):
9312 """
9313 DetachSizer(self)
9314
9315 Enable deleting the SizerItem without destroying the contained sizer.
9316 """
9317 return _core_.SizerItem_DetachSizer(*args, **kwargs)
9318
9319 def GetSize(*args, **kwargs):
9320 """
9321 GetSize(self) -> Size
9322
9323 Get the current size of the item, as set in the last Layout.
9324 """
9325 return _core_.SizerItem_GetSize(*args, **kwargs)
9326
9327 def CalcMin(*args, **kwargs):
9328 """
9329 CalcMin(self) -> Size
9330
9331 Calculates the minimum desired size for the item, including any space
9332 needed by borders.
9333 """
9334 return _core_.SizerItem_CalcMin(*args, **kwargs)
9335
9336 def SetDimension(*args, **kwargs):
9337 """
9338 SetDimension(self, Point pos, Size size)
9339
9340 Set the position and size of the space allocated for this item by the
9341 sizer, and adjust the position and size of the item (window or
9342 subsizer) to be within that space taking alignment and borders into
9343 account.
9344 """
9345 return _core_.SizerItem_SetDimension(*args, **kwargs)
9346
9347 def GetMinSize(*args, **kwargs):
9348 """
9349 GetMinSize(self) -> Size
9350
9351 Get the minimum size needed for the item.
9352 """
9353 return _core_.SizerItem_GetMinSize(*args, **kwargs)
9354
9355 def GetMinSizeWithBorder(*args, **kwargs):
9356 """
9357 GetMinSizeWithBorder(self) -> Size
9358
9359 Get the minimum size needed for the item with space for the borders
9360 added, if needed.
9361 """
9362 return _core_.SizerItem_GetMinSizeWithBorder(*args, **kwargs)
9363
9364 def SetInitSize(*args, **kwargs):
9365 """SetInitSize(self, int x, int y)"""
9366 return _core_.SizerItem_SetInitSize(*args, **kwargs)
9367
9368 def SetRatioWH(*args, **kwargs):
9369 """
9370 SetRatioWH(self, int width, int height)
9371
9372 Set the ratio item attribute.
9373 """
9374 return _core_.SizerItem_SetRatioWH(*args, **kwargs)
9375
9376 def SetRatioSize(*args, **kwargs):
9377 """
9378 SetRatioSize(self, Size size)
9379
9380 Set the ratio item attribute.
9381 """
9382 return _core_.SizerItem_SetRatioSize(*args, **kwargs)
9383
9384 def SetRatio(*args, **kwargs):
9385 """
9386 SetRatio(self, float ratio)
9387
9388 Set the ratio item attribute.
9389 """
9390 return _core_.SizerItem_SetRatio(*args, **kwargs)
9391
9392 def GetRatio(*args, **kwargs):
9393 """
9394 GetRatio(self) -> float
9395
9396 Set the ratio item attribute.
9397 """
9398 return _core_.SizerItem_GetRatio(*args, **kwargs)
9399
9400 def GetRect(*args, **kwargs):
9401 """
9402 GetRect(self) -> Rect
9403
9404 Returns the rectangle that the sizer item should occupy
9405 """
9406 return _core_.SizerItem_GetRect(*args, **kwargs)
9407
9408 def IsWindow(*args, **kwargs):
9409 """
9410 IsWindow(self) -> bool
9411
9412 Is this sizer item a window?
9413 """
9414 return _core_.SizerItem_IsWindow(*args, **kwargs)
9415
9416 def IsSizer(*args, **kwargs):
9417 """
9418 IsSizer(self) -> bool
9419
9420 Is this sizer item a subsizer?
9421 """
9422 return _core_.SizerItem_IsSizer(*args, **kwargs)
9423
9424 def IsSpacer(*args, **kwargs):
9425 """
9426 IsSpacer(self) -> bool
9427
9428 Is this sizer item a spacer?
9429 """
9430 return _core_.SizerItem_IsSpacer(*args, **kwargs)
9431
9432 def SetProportion(*args, **kwargs):
9433 """
9434 SetProportion(self, int proportion)
9435
9436 Set the proportion value for this item.
9437 """
9438 return _core_.SizerItem_SetProportion(*args, **kwargs)
9439
9440 def GetProportion(*args, **kwargs):
9441 """
9442 GetProportion(self) -> int
9443
9444 Get the proportion value for this item.
9445 """
9446 return _core_.SizerItem_GetProportion(*args, **kwargs)
9447
9448 SetOption = wx._deprecated(SetProportion, "Please use `SetProportion` instead.")
9449 GetOption = wx._deprecated(GetProportion, "Please use `GetProportion` instead.")
9450 def SetFlag(*args, **kwargs):
9451 """
9452 SetFlag(self, int flag)
9453
9454 Set the flag value for this item.
9455 """
9456 return _core_.SizerItem_SetFlag(*args, **kwargs)
9457
9458 def GetFlag(*args, **kwargs):
9459 """
9460 GetFlag(self) -> int
9461
9462 Get the flag value for this item.
9463 """
9464 return _core_.SizerItem_GetFlag(*args, **kwargs)
9465
9466 def SetBorder(*args, **kwargs):
9467 """
9468 SetBorder(self, int border)
9469
9470 Set the border value for this item.
9471 """
9472 return _core_.SizerItem_SetBorder(*args, **kwargs)
9473
9474 def GetBorder(*args, **kwargs):
9475 """
9476 GetBorder(self) -> int
9477
9478 Get the border value for this item.
9479 """
9480 return _core_.SizerItem_GetBorder(*args, **kwargs)
9481
9482 def GetWindow(*args, **kwargs):
9483 """
9484 GetWindow(self) -> Window
9485
9486 Get the window (if any) that is managed by this sizer item.
9487 """
9488 return _core_.SizerItem_GetWindow(*args, **kwargs)
9489
9490 def SetWindow(*args, **kwargs):
9491 """
9492 SetWindow(self, Window window)
9493
9494 Set the window to be managed by this sizer item.
9495 """
9496 return _core_.SizerItem_SetWindow(*args, **kwargs)
9497
9498 def GetSizer(*args, **kwargs):
9499 """
9500 GetSizer(self) -> Sizer
9501
9502 Get the subsizer (if any) that is managed by this sizer item.
9503 """
9504 return _core_.SizerItem_GetSizer(*args, **kwargs)
9505
9506 def SetSizer(*args, **kwargs):
9507 """
9508 SetSizer(self, Sizer sizer)
9509
9510 Set the subsizer to be managed by this sizer item.
9511 """
9512 return _core_.SizerItem_SetSizer(*args, **kwargs)
9513
9514 def GetSpacer(*args, **kwargs):
9515 """
9516 GetSpacer(self) -> Size
9517
9518 Get the size of the spacer managed by this sizer item.
9519 """
9520 return _core_.SizerItem_GetSpacer(*args, **kwargs)
9521
9522 def SetSpacer(*args, **kwargs):
9523 """
9524 SetSpacer(self, Size size)
9525
9526 Set the size of the spacer to be managed by this sizer item.
9527 """
9528 return _core_.SizerItem_SetSpacer(*args, **kwargs)
9529
9530 def Show(*args, **kwargs):
9531 """
9532 Show(self, bool show)
9533
9534 Set the show item attribute, which sizers use to determine if the item
9535 is to be made part of the layout or not. If the item is tracking a
9536 window then it is shown or hidden as needed.
9537 """
9538 return _core_.SizerItem_Show(*args, **kwargs)
9539
9540 def IsShown(*args, **kwargs):
9541 """
9542 IsShown(self) -> bool
9543
9544 Is the item to be shown in the layout?
9545 """
9546 return _core_.SizerItem_IsShown(*args, **kwargs)
9547
9548 def GetPosition(*args, **kwargs):
9549 """
9550 GetPosition(self) -> Point
9551
9552 Returns the current position of the item, as set in the last Layout.
9553 """
9554 return _core_.SizerItem_GetPosition(*args, **kwargs)
9555
9556 def GetUserData(*args, **kwargs):
9557 """
9558 GetUserData(self) -> PyObject
9559
9560 Returns the userData associated with this sizer item, or None if there
9561 isn't any.
9562 """
9563 return _core_.SizerItem_GetUserData(*args, **kwargs)
9564
9565
9566 class SizerItemPtr(SizerItem):
9567 def __init__(self, this):
9568 self.this = this
9569 if not hasattr(self,"thisown"): self.thisown = 0
9570 self.__class__ = SizerItem
9571 _core_.SizerItem_swigregister(SizerItemPtr)
9572
9573 def SizerItemWindow(*args, **kwargs):
9574 """
9575 SizerItemWindow(Window window, int proportion, int flag, int border,
9576 PyObject userData=None) -> SizerItem
9577
9578 Constructs a `wx.SizerItem` for tracking a window.
9579 """
9580 val = _core_.new_SizerItemWindow(*args, **kwargs)
9581 val.thisown = 1
9582 return val
9583
9584 def SizerItemSpacer(*args, **kwargs):
9585 """
9586 SizerItemSpacer(int width, int height, int proportion, int flag, int border,
9587 PyObject userData=None) -> SizerItem
9588
9589 Constructs a `wx.SizerItem` for tracking a spacer.
9590 """
9591 val = _core_.new_SizerItemSpacer(*args, **kwargs)
9592 val.thisown = 1
9593 return val
9594
9595 def SizerItemSizer(*args, **kwargs):
9596 """
9597 SizerItemSizer(Sizer sizer, int proportion, int flag, int border,
9598 PyObject userData=None) -> SizerItem
9599
9600 Constructs a `wx.SizerItem` for tracking a subsizer
9601 """
9602 val = _core_.new_SizerItemSizer(*args, **kwargs)
9603 val.thisown = 1
9604 return val
9605
9606 class Sizer(Object):
9607 """
9608 wx.Sizer is the abstract base class used for laying out subwindows in
9609 a window. You cannot use wx.Sizer directly; instead, you will have to
9610 use one of the sizer classes derived from it such as `wx.BoxSizer`,
9611 `wx.StaticBoxSizer`, `wx.NotebookSizer`, `wx.GridSizer`, `wx.FlexGridSizer`
9612 and `wx.GridBagSizer`.
9613
9614 The concept implemented by sizers in wxWidgets is closely related to
9615 layout tools in other GUI toolkits, such as Java's AWT, the GTK
9616 toolkit or the Qt toolkit. It is based upon the idea of the individual
9617 subwindows reporting their minimal required size and their ability to
9618 get stretched if the size of the parent window has changed. This will
9619 most often mean that the programmer does not set the original size of
9620 a dialog in the beginning, rather the dialog will assigned a sizer and
9621 this sizer will be queried about the recommended size. The sizer in
9622 turn will query its children, which can be normal windows or contorls,
9623 empty space or other sizers, so that a hierarchy of sizers can be
9624 constructed. Note that wxSizer does not derive from wxWindow and thus
9625 do not interfere with tab ordering and requires very little resources
9626 compared to a real window on screen.
9627
9628 What makes sizers so well fitted for use in wxWidgets is the fact that
9629 every control reports its own minimal size and the algorithm can
9630 handle differences in font sizes or different window (dialog item)
9631 sizes on different platforms without problems. If for example the
9632 standard font as well as the overall design of Mac widgets requires
9633 more space than on Windows, then the initial size of a dialog using a
9634 sizer will automatically be bigger on Mac than on Windows.
9635 """
9636 def __init__(self): raise RuntimeError, "No constructor defined"
9637 def __repr__(self):
9638 return "<%s.%s; proxy of C++ wxSizer instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
9639 def _setOORInfo(*args, **kwargs):
9640 """_setOORInfo(self, PyObject _self)"""
9641 return _core_.Sizer__setOORInfo(*args, **kwargs)
9642
9643 def Add(*args, **kwargs):
9644 """
9645 Add(self, item, int proportion=0, int flag=0, int border=0,
9646 PyObject userData=None) -> wx.SizerItem
9647
9648 Appends a child item to the sizer.
9649 """
9650 return _core_.Sizer_Add(*args, **kwargs)
9651
9652 def Insert(*args, **kwargs):
9653 """
9654 Insert(self, int before, item, int proportion=0, int flag=0, int border=0,
9655 PyObject userData=None) -> wx.SizerItem
9656
9657 Inserts a new item into the list of items managed by this sizer before
9658 the item at index *before*. See `Add` for a description of the parameters.
9659 """
9660 return _core_.Sizer_Insert(*args, **kwargs)
9661
9662 def Prepend(*args, **kwargs):
9663 """
9664 Prepend(self, item, int proportion=0, int flag=0, int border=0,
9665 PyObject userData=None) -> wx.SizerItem
9666
9667 Adds a new item to the begining of the list of sizer items managed by
9668 this sizer. See `Add` for a description of the parameters.
9669 """
9670 return _core_.Sizer_Prepend(*args, **kwargs)
9671
9672 def Remove(*args, **kwargs):
9673 """
9674 Remove(self, item) -> bool
9675
9676 Removes an item from the sizer and destroys it. This method does not
9677 cause any layout or resizing to take place, call `Layout` to update
9678 the layout on screen after removing a child from the sizer. The
9679 *item* parameter can be either a window, a sizer, or the zero-based
9680 index of an item to remove. Returns True if the child item was found
9681 and removed.
9682 """
9683 return _core_.Sizer_Remove(*args, **kwargs)
9684
9685 def Detach(*args, **kwargs):
9686 """
9687 Detach(self, item) -> bool
9688
9689 Detaches an item from the sizer without destroying it. This method
9690 does not cause any layout or resizing to take place, call `Layout` to
9691 do so. The *item* parameter can be either a window, a sizer, or the
9692 zero-based index of the item to be detached. Returns True if the child item
9693 was found and detached.
9694 """
9695 return _core_.Sizer_Detach(*args, **kwargs)
9696
9697 def GetItem(*args, **kwargs):
9698 """
9699 GetItem(self, item) -> wx.SizerItem
9700
9701 Returns the `wx.SizerItem` which holds the *item* given. The *item*
9702 parameter can be either a window, a sizer, or the zero-based index of
9703 the item to be detached.
9704 """
9705 return _core_.Sizer_GetItem(*args, **kwargs)
9706
9707 def _SetItemMinSize(*args, **kwargs):
9708 """_SetItemMinSize(self, PyObject item, Size size)"""
9709 return _core_.Sizer__SetItemMinSize(*args, **kwargs)
9710
9711 def SetItemMinSize(self, item, *args):
9712 """
9713 SetItemMinSize(self, item, Size size)
9714
9715 Sets the minimum size that will be allocated for an item in the sizer.
9716 The *item* parameter can be either a window, a sizer, or the
9717 zero-based index of the item. If a window or sizer is given then it
9718 will be searched for recursivly in subsizers if neccessary.
9719 """
9720 if len(args) == 2:
9721 # for backward compatibility accept separate width,height args too
9722 return self._SetItemMinSize(item, args)
9723 else:
9724 return self._SetItemMinSize(item, args[0])
9725
9726 def AddItem(*args, **kwargs):
9727 """
9728 AddItem(self, SizerItem item)
9729
9730 Adds a `wx.SizerItem` to the sizer.
9731 """
9732 return _core_.Sizer_AddItem(*args, **kwargs)
9733
9734 def InsertItem(*args, **kwargs):
9735 """
9736 InsertItem(self, int index, SizerItem item)
9737
9738 Inserts a `wx.SizerItem` to the sizer at the position given by *index*.
9739 """
9740 return _core_.Sizer_InsertItem(*args, **kwargs)
9741
9742 def PrependItem(*args, **kwargs):
9743 """
9744 PrependItem(self, SizerItem item)
9745
9746 Prepends a `wx.SizerItem` to the sizer.
9747 """
9748 return _core_.Sizer_PrependItem(*args, **kwargs)
9749
9750 def AddMany(self, items):
9751 """
9752 AddMany is a convenience method for adding several items
9753 to a sizer at one time. Simply pass it a list of tuples,
9754 where each tuple consists of the parameters that you
9755 would normally pass to the `Add` method.
9756 """
9757 for item in items:
9758 if type(item) != type(()) or (len(item) == 2 and type(item[0]) == type(1)):
9759 item = (item, )
9760 self.Add(*item)
9761
9762 # for backwards compatibility only, please do not use in new code
9763 def AddWindow(self, *args, **kw):
9764 """Compatibility alias for `Add`."""
9765 return self.Add(*args, **kw)
9766 def AddSizer(self, *args, **kw):
9767 """Compatibility alias for `Add`."""
9768 return self.Add(*args, **kw)
9769 def AddSpacer(self, *args, **kw):
9770 """Compatibility alias for `Add`."""
9771 return self.Add(*args, **kw)
9772
9773 def PrependWindow(self, *args, **kw):
9774 """Compatibility alias for `Prepend`."""
9775 return self.Prepend(*args, **kw)
9776 def PrependSizer(self, *args, **kw):
9777 """Compatibility alias for `Prepend`."""
9778 return self.Prepend(*args, **kw)
9779 def PrependSpacer(self, *args, **kw):
9780 """Compatibility alias for `Prepend`."""
9781 return self.Prepend(*args, **kw)
9782
9783 def InsertWindow(self, *args, **kw):
9784 """Compatibility alias for `Insert`."""
9785 return self.Insert(*args, **kw)
9786 def InsertSizer(self, *args, **kw):
9787 """Compatibility alias for `Insert`."""
9788 return self.Insert(*args, **kw)
9789 def InsertSpacer(self, *args, **kw):
9790 """Compatibility alias for `Insert`."""
9791 return self.Insert(*args, **kw)
9792
9793 def RemoveWindow(self, *args, **kw):
9794 """Compatibility alias for `Remove`."""
9795 return self.Remove(*args, **kw)
9796 def RemoveSizer(self, *args, **kw):
9797 """Compatibility alias for `Remove`."""
9798 return self.Remove(*args, **kw)
9799 def RemovePos(self, *args, **kw):
9800 """Compatibility alias for `Remove`."""
9801 return self.Remove(*args, **kw)
9802
9803
9804 def SetDimension(*args, **kwargs):
9805 """
9806 SetDimension(self, int x, int y, int width, int height)
9807
9808 Call this to force the sizer to take the given dimension and thus
9809 force the items owned by the sizer to resize themselves according to
9810 the rules defined by the parameter in the `Add`, `Insert` or `Prepend`
9811 methods.
9812 """
9813 return _core_.Sizer_SetDimension(*args, **kwargs)
9814
9815 def SetMinSize(*args, **kwargs):
9816 """
9817 SetMinSize(self, Size size)
9818
9819 Call this to give the sizer a minimal size. Normally, the sizer will
9820 calculate its minimal size based purely on how much space its children
9821 need. After calling this method `GetMinSize` will return either the
9822 minimal size as requested by its children or the minimal size set
9823 here, depending on which is bigger.
9824 """
9825 return _core_.Sizer_SetMinSize(*args, **kwargs)
9826
9827 def GetSize(*args, **kwargs):
9828 """
9829 GetSize(self) -> Size
9830
9831 Returns the current size of the space managed by the sizer.
9832 """
9833 return _core_.Sizer_GetSize(*args, **kwargs)
9834
9835 def GetPosition(*args, **kwargs):
9836 """
9837 GetPosition(self) -> Point
9838
9839 Returns the current position of the sizer's managed space.
9840 """
9841 return _core_.Sizer_GetPosition(*args, **kwargs)
9842
9843 def GetMinSize(*args, **kwargs):
9844 """
9845 GetMinSize(self) -> Size
9846
9847 Returns the minimal size of the sizer. This is either the combined
9848 minimal size of all the children and their borders or the minimal size
9849 set by SetMinSize, depending on which is bigger.
9850 """
9851 return _core_.Sizer_GetMinSize(*args, **kwargs)
9852
9853 def GetSizeTuple(self):
9854 return self.GetSize().Get()
9855 def GetPositionTuple(self):
9856 return self.GetPosition().Get()
9857 def GetMinSizeTuple(self):
9858 return self.GetMinSize().Get()
9859
9860 def RecalcSizes(*args, **kwargs):
9861 """
9862 RecalcSizes(self)
9863
9864 Using the sizes calculated by `CalcMin` reposition and resize all the
9865 items managed by this sizer. You should not need to call this directly as
9866 it is called by `Layout`.
9867 """
9868 return _core_.Sizer_RecalcSizes(*args, **kwargs)
9869
9870 def CalcMin(*args, **kwargs):
9871 """
9872 CalcMin(self) -> Size
9873
9874 This method is where the sizer will do the actual calculation of its
9875 children's minimal sizes. You should not need to call this directly as
9876 it is called by `Layout`.
9877 """
9878 return _core_.Sizer_CalcMin(*args, **kwargs)
9879
9880 def Layout(*args, **kwargs):
9881 """
9882 Layout(self)
9883
9884 This method will force the recalculation and layout of the items
9885 controlled by the sizer using the current space allocated to the
9886 sizer. Normally this is called automatically from the owning window's
9887 EVT_SIZE handler, but it is also useful to call it from user code when
9888 one of the items in a sizer change size, or items are added or
9889 removed.
9890 """
9891 return _core_.Sizer_Layout(*args, **kwargs)
9892
9893 def Fit(*args, **kwargs):
9894 """
9895 Fit(self, Window window) -> Size
9896
9897 Tell the sizer to resize the *window* to match the sizer's minimal
9898 size. This is commonly done in the constructor of the window itself in
9899 order to set its initial size to match the needs of the children as
9900 determined by the sizer. Returns the new size.
9901
9902 For a top level window this is the total window size, not the client size.
9903 """
9904 return _core_.Sizer_Fit(*args, **kwargs)
9905
9906 def FitInside(*args, **kwargs):
9907 """
9908 FitInside(self, Window window)
9909
9910 Tell the sizer to resize the *virtual size* of the *window* to match the
9911 sizer's minimal size. This will not alter the on screen size of the
9912 window, but may cause the addition/removal/alteration of scrollbars
9913 required to view the virtual area in windows which manage it.
9914
9915 :see: `wx.ScrolledWindow.SetScrollbars`, `SetVirtualSizeHints`
9916
9917 """
9918 return _core_.Sizer_FitInside(*args, **kwargs)
9919
9920 def SetSizeHints(*args, **kwargs):
9921 """
9922 SetSizeHints(self, Window window)
9923
9924 Tell the sizer to set (and `Fit`) the minimal size of the *window* to
9925 match the sizer's minimal size. This is commonly done in the
9926 constructor of the window itself if the window is resizable (as are
9927 many dialogs under Unix and frames on probably all platforms) in order
9928 to prevent the window from being sized smaller than the minimal size
9929 required by the sizer.
9930 """
9931 return _core_.Sizer_SetSizeHints(*args, **kwargs)
9932
9933 def SetVirtualSizeHints(*args, **kwargs):
9934 """
9935 SetVirtualSizeHints(self, Window window)
9936
9937 Tell the sizer to set the minimal size of the window virtual area to
9938 match the sizer's minimal size. For windows with managed scrollbars
9939 this will set them appropriately.
9940
9941 :see: `wx.ScrolledWindow.SetScrollbars`
9942
9943 """
9944 return _core_.Sizer_SetVirtualSizeHints(*args, **kwargs)
9945
9946 def Clear(*args, **kwargs):
9947 """
9948 Clear(self, bool deleteWindows=False)
9949
9950 Clear all items from the sizer, optionally destroying the window items
9951 as well.
9952 """
9953 return _core_.Sizer_Clear(*args, **kwargs)
9954
9955 def DeleteWindows(*args, **kwargs):
9956 """
9957 DeleteWindows(self)
9958
9959 Destroy all windows managed by the sizer.
9960 """
9961 return _core_.Sizer_DeleteWindows(*args, **kwargs)
9962
9963 def GetChildren(*args, **kwargs):
9964 """
9965 GetChildren(self) -> list
9966
9967 Returns a list of all the `wx.SizerItem` objects managed by the sizer.
9968 """
9969 return _core_.Sizer_GetChildren(*args, **kwargs)
9970
9971 def Show(*args, **kwargs):
9972 """
9973 Show(self, item, bool show=True, bool recursive=false) -> bool
9974
9975 Shows or hides an item managed by the sizer. To make a sizer item
9976 disappear or reappear, use Show followed by `Layout`. The *item*
9977 parameter can be either a window, a sizer, or the zero-based index of
9978 the item. Use the recursive parameter to show or hide an item in a
9979 subsizer. Returns True if the item was found.
9980 """
9981 return _core_.Sizer_Show(*args, **kwargs)
9982
9983 def IsShown(*args, **kwargs):
9984 """
9985 IsShown(self, item)
9986
9987 Determines if the item is currently shown. sizer. To make a sizer
9988 item disappear or reappear, use Show followed by `Layout`. The *item*
9989 parameter can be either a window, a sizer, or the zero-based index of
9990 the item.
9991 """
9992 return _core_.Sizer_IsShown(*args, **kwargs)
9993
9994 def Hide(self, item, recursive=False):
9995 """
9996 A convenience method for `Show`(item, False, recursive).
9997 """
9998 return self.Show(item, False, recursive)
9999
10000 def ShowItems(*args, **kwargs):
10001 """
10002 ShowItems(self, bool show)
10003
10004 Recursively call `wx.SizerItem.Show` on all sizer items.
10005 """
10006 return _core_.Sizer_ShowItems(*args, **kwargs)
10007
10008
10009 class SizerPtr(Sizer):
10010 def __init__(self, this):
10011 self.this = this
10012 if not hasattr(self,"thisown"): self.thisown = 0
10013 self.__class__ = Sizer
10014 _core_.Sizer_swigregister(SizerPtr)
10015
10016 class PySizer(Sizer):
10017 """
10018 wx.PySizer is a special version of `wx.Sizer` that has been
10019 instrumented to allow the C++ virtual methods to be overloaded in
10020 Python derived classes. You would derive from this class if you are
10021 wanting to implement a custom sizer in Python code. Simply implement
10022 `CalcMin` and `RecalcSizes` in the derived class and you're all set.
10023 For example::
10024
10025 class MySizer(wx.PySizer):
10026 def __init__(self):
10027 wx.PySizer.__init__(self)
10028
10029 def CalcMin(self):
10030 for item in self.GetChildren():
10031 # calculate the total minimum width and height needed
10032 # by all items in the sizer according to this sizer's
10033 # layout algorithm.
10034 ...
10035 return wx.Size(width, height)
10036
10037 def RecalcSizes(self):
10038 # find the space allotted to this sizer
10039 pos = self.GetPosition()
10040 size = self.GetSize()
10041 for item in self.GetChildren():
10042 # Recalculate (if necessary) the position and size of
10043 # each item and then call item.SetDimension to do the
10044 # actual positioning and sizing of the items within the
10045 # space alloted to this sizer.
10046 ...
10047 item.SetDimension(itemPos, itemSize)
10048
10049
10050 When `Layout` is called it first calls `CalcMin` followed by
10051 `RecalcSizes` so you can optimize a bit by saving the results of
10052 `CalcMin` and reusing them in `RecalcSizes`.
10053
10054 :see: `wx.SizerItem`, `wx.Sizer.GetChildren`
10055
10056
10057 """
10058 def __repr__(self):
10059 return "<%s.%s; proxy of C++ wxPySizer instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
10060 def __init__(self, *args, **kwargs):
10061 """
10062 __init__(self) -> PySizer
10063
10064 Creates a wx.PySizer. Must be called from the __init__ in the derived
10065 class.
10066 """
10067 newobj = _core_.new_PySizer(*args, **kwargs)
10068 self.this = newobj.this
10069 self.thisown = 1
10070 del newobj.thisown
10071 self._setCallbackInfo(self, PySizer);self._setOORInfo(self)
10072
10073 def _setCallbackInfo(*args, **kwargs):
10074 """_setCallbackInfo(self, PyObject self, PyObject _class)"""
10075 return _core_.PySizer__setCallbackInfo(*args, **kwargs)
10076
10077
10078 class PySizerPtr(PySizer):
10079 def __init__(self, this):
10080 self.this = this
10081 if not hasattr(self,"thisown"): self.thisown = 0
10082 self.__class__ = PySizer
10083 _core_.PySizer_swigregister(PySizerPtr)
10084
10085 #---------------------------------------------------------------------------
10086
10087 class BoxSizer(Sizer):
10088 """
10089 The basic idea behind a box sizer is that windows will most often be
10090 laid out in rather simple basic geometry, typically in a row or a
10091 column or nested hierarchies of either. A wx.BoxSizer will lay out
10092 its items in a simple row or column, depending on the orientation
10093 parameter passed to the constructor.
10094 """
10095 def __repr__(self):
10096 return "<%s.%s; proxy of C++ wxBoxSizer instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
10097 def __init__(self, *args, **kwargs):
10098 """
10099 __init__(self, int orient=HORIZONTAL) -> BoxSizer
10100
10101 Constructor for a wx.BoxSizer. *orient* may be one of ``wx.VERTICAL``
10102 or ``wx.HORIZONTAL`` for creating either a column sizer or a row
10103 sizer.
10104 """
10105 newobj = _core_.new_BoxSizer(*args, **kwargs)
10106 self.this = newobj.this
10107 self.thisown = 1
10108 del newobj.thisown
10109 self._setOORInfo(self)
10110
10111 def GetOrientation(*args, **kwargs):
10112 """
10113 GetOrientation(self) -> int
10114
10115 Returns the current orientation of the sizer.
10116 """
10117 return _core_.BoxSizer_GetOrientation(*args, **kwargs)
10118
10119 def SetOrientation(*args, **kwargs):
10120 """
10121 SetOrientation(self, int orient)
10122
10123 Resets the orientation of the sizer.
10124 """
10125 return _core_.BoxSizer_SetOrientation(*args, **kwargs)
10126
10127
10128 class BoxSizerPtr(BoxSizer):
10129 def __init__(self, this):
10130 self.this = this
10131 if not hasattr(self,"thisown"): self.thisown = 0
10132 self.__class__ = BoxSizer
10133 _core_.BoxSizer_swigregister(BoxSizerPtr)
10134
10135 #---------------------------------------------------------------------------
10136
10137 class StaticBoxSizer(BoxSizer):
10138 """
10139 wx.StaticBoxSizer derives from and functions identically to the
10140 `wx.BoxSizer` and adds a `wx.StaticBox` around the items that the sizer
10141 manages. Note that this static box must be created separately and
10142 passed to the sizer constructor.
10143 """
10144 def __repr__(self):
10145 return "<%s.%s; proxy of C++ wxStaticBoxSizer instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
10146 def __init__(self, *args, **kwargs):
10147 """
10148 __init__(self, StaticBox box, int orient=HORIZONTAL) -> StaticBoxSizer
10149
10150 Constructor. It takes an associated static box and the orientation
10151 *orient* as parameters - orient can be either of ``wx.VERTICAL`` or
10152 ``wx.HORIZONTAL``.
10153 """
10154 newobj = _core_.new_StaticBoxSizer(*args, **kwargs)
10155 self.this = newobj.this
10156 self.thisown = 1
10157 del newobj.thisown
10158 self._setOORInfo(self)
10159
10160 def GetStaticBox(*args, **kwargs):
10161 """
10162 GetStaticBox(self) -> StaticBox
10163
10164 Returns the static box associated with this sizer.
10165 """
10166 return _core_.StaticBoxSizer_GetStaticBox(*args, **kwargs)
10167
10168
10169 class StaticBoxSizerPtr(StaticBoxSizer):
10170 def __init__(self, this):
10171 self.this = this
10172 if not hasattr(self,"thisown"): self.thisown = 0
10173 self.__class__ = StaticBoxSizer
10174 _core_.StaticBoxSizer_swigregister(StaticBoxSizerPtr)
10175
10176 #---------------------------------------------------------------------------
10177
10178 class GridSizer(Sizer):
10179 """
10180 A grid sizer is a sizer which lays out its children in a
10181 two-dimensional table with all cells having the same size. In other
10182 words, the width of each cell within the grid is the width of the
10183 widest item added to the sizer and the height of each grid cell is the
10184 height of the tallest item. An optional vertical and/or horizontal
10185 gap between items can also be specified (in pixels.)
10186
10187 Items are placed in the cells of the grid in the order they are added,
10188 in row-major order. In other words, the first row is filled first,
10189 then the second, and so on until all items have been added. (If
10190 neccessary, additional rows will be added as items are added.) If you
10191 need to have greater control over the cells that items are placed in
10192 then use the `wx.GridBagSizer`.
10193
10194 """
10195 def __repr__(self):
10196 return "<%s.%s; proxy of C++ wxGridSizer instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
10197 def __init__(self, *args, **kwargs):
10198 """
10199 __init__(self, int rows=1, int cols=0, int vgap=0, int hgap=0) -> GridSizer
10200
10201 Constructor for a wx.GridSizer. *rows* and *cols* determine the number
10202 of columns and rows in the sizer - if either of the parameters is
10203 zero, it will be calculated to from the total number of children in
10204 the sizer, thus making the sizer grow dynamically. *vgap* and *hgap*
10205 define extra space between all children.
10206 """
10207 newobj = _core_.new_GridSizer(*args, **kwargs)
10208 self.this = newobj.this
10209 self.thisown = 1
10210 del newobj.thisown
10211 self._setOORInfo(self)
10212
10213 def SetCols(*args, **kwargs):
10214 """
10215 SetCols(self, int cols)
10216
10217 Sets the number of columns in the sizer.
10218 """
10219 return _core_.GridSizer_SetCols(*args, **kwargs)
10220
10221 def SetRows(*args, **kwargs):
10222 """
10223 SetRows(self, int rows)
10224
10225 Sets the number of rows in the sizer.
10226 """
10227 return _core_.GridSizer_SetRows(*args, **kwargs)
10228
10229 def SetVGap(*args, **kwargs):
10230 """
10231 SetVGap(self, int gap)
10232
10233 Sets the vertical gap (in pixels) between the cells in the sizer.
10234 """
10235 return _core_.GridSizer_SetVGap(*args, **kwargs)
10236
10237 def SetHGap(*args, **kwargs):
10238 """
10239 SetHGap(self, int gap)
10240
10241 Sets the horizontal gap (in pixels) between cells in the sizer
10242 """
10243 return _core_.GridSizer_SetHGap(*args, **kwargs)
10244
10245 def GetCols(*args, **kwargs):
10246 """
10247 GetCols(self) -> int
10248
10249 Returns the number of columns in the sizer.
10250 """
10251 return _core_.GridSizer_GetCols(*args, **kwargs)
10252
10253 def GetRows(*args, **kwargs):
10254 """
10255 GetRows(self) -> int
10256
10257 Returns the number of rows in the sizer.
10258 """
10259 return _core_.GridSizer_GetRows(*args, **kwargs)
10260
10261 def GetVGap(*args, **kwargs):
10262 """
10263 GetVGap(self) -> int
10264
10265 Returns the vertical gap (in pixels) between the cells in the sizer.
10266 """
10267 return _core_.GridSizer_GetVGap(*args, **kwargs)
10268
10269 def GetHGap(*args, **kwargs):
10270 """
10271 GetHGap(self) -> int
10272
10273 Returns the horizontal gap (in pixels) between cells in the sizer.
10274 """
10275 return _core_.GridSizer_GetHGap(*args, **kwargs)
10276
10277
10278 class GridSizerPtr(GridSizer):
10279 def __init__(self, this):
10280 self.this = this
10281 if not hasattr(self,"thisown"): self.thisown = 0
10282 self.__class__ = GridSizer
10283 _core_.GridSizer_swigregister(GridSizerPtr)
10284
10285 #---------------------------------------------------------------------------
10286
10287 FLEX_GROWMODE_NONE = _core_.FLEX_GROWMODE_NONE
10288 FLEX_GROWMODE_SPECIFIED = _core_.FLEX_GROWMODE_SPECIFIED
10289 FLEX_GROWMODE_ALL = _core_.FLEX_GROWMODE_ALL
10290 class FlexGridSizer(GridSizer):
10291 """
10292 A flex grid sizer is a sizer which lays out its children in a
10293 two-dimensional table with all table cells in one row having the same
10294 height and all cells in one column having the same width, but all
10295 rows or all columns are not necessarily the same height or width as in
10296 the `wx.GridSizer`.
10297
10298 wx.FlexGridSizer can also size items equally in one direction but
10299 unequally ("flexibly") in the other. If the sizer is only flexible
10300 in one direction (this can be changed using `SetFlexibleDirection`), it
10301 needs to be decided how the sizer should grow in the other ("non
10302 flexible") direction in order to fill the available space. The
10303 `SetNonFlexibleGrowMode` method serves this purpose.
10304
10305
10306 """
10307 def __repr__(self):
10308 return "<%s.%s; proxy of C++ wxFlexGridSizer instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
10309 def __init__(self, *args, **kwargs):
10310 """
10311 __init__(self, int rows=1, int cols=0, int vgap=0, int hgap=0) -> FlexGridSizer
10312
10313 Constructor for a wx.FlexGridSizer. *rows* and *cols* determine the
10314 number of columns and rows in the sizer - if either of the parameters
10315 is zero, it will be calculated to from the total number of children in
10316 the sizer, thus making the sizer grow dynamically. *vgap* and *hgap*
10317 define extra space between all children.
10318 """
10319 newobj = _core_.new_FlexGridSizer(*args, **kwargs)
10320 self.this = newobj.this
10321 self.thisown = 1
10322 del newobj.thisown
10323 self._setOORInfo(self)
10324
10325 def AddGrowableRow(*args, **kwargs):
10326 """
10327 AddGrowableRow(self, size_t idx, int proportion=0)
10328
10329 Specifies that row *idx* (starting from zero) should be grown if there
10330 is extra space available to the sizer.
10331
10332 The *proportion* parameter has the same meaning as the stretch factor
10333 for the box sizers except that if all proportions are 0, then all
10334 columns are resized equally (instead of not being resized at all).
10335 """
10336 return _core_.FlexGridSizer_AddGrowableRow(*args, **kwargs)
10337
10338 def RemoveGrowableRow(*args, **kwargs):
10339 """
10340 RemoveGrowableRow(self, size_t idx)
10341
10342 Specifies that row *idx* is no longer growable.
10343 """
10344 return _core_.FlexGridSizer_RemoveGrowableRow(*args, **kwargs)
10345
10346 def AddGrowableCol(*args, **kwargs):
10347 """
10348 AddGrowableCol(self, size_t idx, int proportion=0)
10349
10350 Specifies that column *idx* (starting from zero) should be grown if
10351 there is extra space available to the sizer.
10352
10353 The *proportion* parameter has the same meaning as the stretch factor
10354 for the box sizers except that if all proportions are 0, then all
10355 columns are resized equally (instead of not being resized at all).
10356 """
10357 return _core_.FlexGridSizer_AddGrowableCol(*args, **kwargs)
10358
10359 def RemoveGrowableCol(*args, **kwargs):
10360 """
10361 RemoveGrowableCol(self, size_t idx)
10362
10363 Specifies that column *idx* is no longer growable.
10364 """
10365 return _core_.FlexGridSizer_RemoveGrowableCol(*args, **kwargs)
10366
10367 def SetFlexibleDirection(*args, **kwargs):
10368 """
10369 SetFlexibleDirection(self, int direction)
10370
10371 Specifies whether the sizer should flexibly resize its columns, rows,
10372 or both. Argument *direction* can be one of the following values. Any
10373 other value is ignored.
10374
10375 ============== =======================================
10376 wx.VERTICAL Rows are flexibly sized.
10377 wx.HORIZONTAL Columns are flexibly sized.
10378 wx.BOTH Both rows and columns are flexibly sized
10379 (this is the default value).
10380 ============== =======================================
10381
10382 Note that this method does not trigger relayout.
10383
10384 """
10385 return _core_.FlexGridSizer_SetFlexibleDirection(*args, **kwargs)
10386
10387 def GetFlexibleDirection(*args, **kwargs):
10388 """
10389 GetFlexibleDirection(self) -> int
10390
10391 Returns a value that specifies whether the sizer
10392 flexibly resizes its columns, rows, or both (default).
10393
10394 :see: `SetFlexibleDirection`
10395 """
10396 return _core_.FlexGridSizer_GetFlexibleDirection(*args, **kwargs)
10397
10398 def SetNonFlexibleGrowMode(*args, **kwargs):
10399 """
10400 SetNonFlexibleGrowMode(self, int mode)
10401
10402 Specifies how the sizer should grow in the non-flexible direction if
10403 there is one (so `SetFlexibleDirection` must have been called
10404 previously). Argument *mode* can be one of the following values:
10405
10406 ========================== =================================================
10407 wx.FLEX_GROWMODE_NONE Sizer doesn't grow in the non flexible direction.
10408 wx.FLEX_GROWMODE_SPECIFIED Sizer honors growable columns/rows set with
10409 `AddGrowableCol` and `AddGrowableRow`. In this
10410 case equal sizing applies to minimum sizes of
10411 columns or rows (this is the default value).
10412 wx.FLEX_GROWMODE_ALL Sizer equally stretches all columns or rows in
10413 the non flexible direction, whether they are
10414 growable or not in the flexbile direction.
10415 ========================== =================================================
10416
10417 Note that this method does not trigger relayout.
10418
10419
10420 """
10421 return _core_.FlexGridSizer_SetNonFlexibleGrowMode(*args, **kwargs)
10422
10423 def GetNonFlexibleGrowMode(*args, **kwargs):
10424 """
10425 GetNonFlexibleGrowMode(self) -> int
10426
10427 Returns the value that specifies how the sizer grows in the
10428 non-flexible direction if there is one.
10429
10430 :see: `SetNonFlexibleGrowMode`
10431 """
10432 return _core_.FlexGridSizer_GetNonFlexibleGrowMode(*args, **kwargs)
10433
10434 def GetRowHeights(*args, **kwargs):
10435 """
10436 GetRowHeights(self) -> list
10437
10438 Returns a list of integers representing the heights of each of the
10439 rows in the sizer.
10440 """
10441 return _core_.FlexGridSizer_GetRowHeights(*args, **kwargs)
10442
10443 def GetColWidths(*args, **kwargs):
10444 """
10445 GetColWidths(self) -> list
10446
10447 Returns a list of integers representing the widths of each of the
10448 columns in the sizer.
10449 """
10450 return _core_.FlexGridSizer_GetColWidths(*args, **kwargs)
10451
10452
10453 class FlexGridSizerPtr(FlexGridSizer):
10454 def __init__(self, this):
10455 self.this = this
10456 if not hasattr(self,"thisown"): self.thisown = 0
10457 self.__class__ = FlexGridSizer
10458 _core_.FlexGridSizer_swigregister(FlexGridSizerPtr)
10459
10460 class StdDialogButtonSizer(BoxSizer):
10461 """
10462 A special sizer that knows how to order and position standard buttons
10463 in order to conform to the current platform's standards. You simply
10464 need to add each `wx.Button` to the sizer, and be sure to create the
10465 buttons using the standard ID's. Then call `Realize` and the sizer
10466 will take care of the rest.
10467
10468 """
10469 def __repr__(self):
10470 return "<%s.%s; proxy of C++ wxStdDialogButtonSizer instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
10471 def __init__(self, *args, **kwargs):
10472 """__init__(self) -> StdDialogButtonSizer"""
10473 newobj = _core_.new_StdDialogButtonSizer(*args, **kwargs)
10474 self.this = newobj.this
10475 self.thisown = 1
10476 del newobj.thisown
10477 def AddButton(*args, **kwargs):
10478 """
10479 AddButton(self, wxButton button)
10480
10481 Use this to add the buttons to this sizer. Do not use the `Add`
10482 method in the base class.
10483 """
10484 return _core_.StdDialogButtonSizer_AddButton(*args, **kwargs)
10485
10486 def Realize(*args, **kwargs):
10487 """
10488 Realize(self)
10489
10490 This funciton needs to be called after all the buttons have been added
10491 to the sizer. It will reorder them and position them in a platform
10492 specifc manner.
10493 """
10494 return _core_.StdDialogButtonSizer_Realize(*args, **kwargs)
10495
10496 def SetAffirmativeButton(*args, **kwargs):
10497 """SetAffirmativeButton(self, wxButton button)"""
10498 return _core_.StdDialogButtonSizer_SetAffirmativeButton(*args, **kwargs)
10499
10500 def SetNegativeButton(*args, **kwargs):
10501 """SetNegativeButton(self, wxButton button)"""
10502 return _core_.StdDialogButtonSizer_SetNegativeButton(*args, **kwargs)
10503
10504 def SetCancelButton(*args, **kwargs):
10505 """SetCancelButton(self, wxButton button)"""
10506 return _core_.StdDialogButtonSizer_SetCancelButton(*args, **kwargs)
10507
10508 def GetAffirmativeButton(*args, **kwargs):
10509 """GetAffirmativeButton(self) -> wxButton"""
10510 return _core_.StdDialogButtonSizer_GetAffirmativeButton(*args, **kwargs)
10511
10512 def GetApplyButton(*args, **kwargs):
10513 """GetApplyButton(self) -> wxButton"""
10514 return _core_.StdDialogButtonSizer_GetApplyButton(*args, **kwargs)
10515
10516 def GetNegativeButton(*args, **kwargs):
10517 """GetNegativeButton(self) -> wxButton"""
10518 return _core_.StdDialogButtonSizer_GetNegativeButton(*args, **kwargs)
10519
10520 def GetCancelButton(*args, **kwargs):
10521 """GetCancelButton(self) -> wxButton"""
10522 return _core_.StdDialogButtonSizer_GetCancelButton(*args, **kwargs)
10523
10524 def GetHelpButton(*args, **kwargs):
10525 """GetHelpButton(self) -> wxButton"""
10526 return _core_.StdDialogButtonSizer_GetHelpButton(*args, **kwargs)
10527
10528
10529 class StdDialogButtonSizerPtr(StdDialogButtonSizer):
10530 def __init__(self, this):
10531 self.this = this
10532 if not hasattr(self,"thisown"): self.thisown = 0
10533 self.__class__ = StdDialogButtonSizer
10534 _core_.StdDialogButtonSizer_swigregister(StdDialogButtonSizerPtr)
10535
10536 #---------------------------------------------------------------------------
10537
10538 class GBPosition(object):
10539 """
10540 This class represents the position of an item in a virtual grid of
10541 rows and columns managed by a `wx.GridBagSizer`. wxPython has
10542 typemaps that will automatically convert from a 2-element sequence of
10543 integers to a wx.GBPosition, so you can use the more pythonic
10544 representation of the position nearly transparently in Python code.
10545 """
10546 def __repr__(self):
10547 return "<%s.%s; proxy of C++ wxGBPosition instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
10548 def __init__(self, *args, **kwargs):
10549 """
10550 __init__(self, int row=0, int col=0) -> GBPosition
10551
10552 This class represents the position of an item in a virtual grid of
10553 rows and columns managed by a `wx.GridBagSizer`. wxPython has
10554 typemaps that will automatically convert from a 2-element sequence of
10555 integers to a wx.GBPosition, so you can use the more pythonic
10556 representation of the position nearly transparently in Python code.
10557 """
10558 newobj = _core_.new_GBPosition(*args, **kwargs)
10559 self.this = newobj.this
10560 self.thisown = 1
10561 del newobj.thisown
10562 def GetRow(*args, **kwargs):
10563 """GetRow(self) -> int"""
10564 return _core_.GBPosition_GetRow(*args, **kwargs)
10565
10566 def GetCol(*args, **kwargs):
10567 """GetCol(self) -> int"""
10568 return _core_.GBPosition_GetCol(*args, **kwargs)
10569
10570 def SetRow(*args, **kwargs):
10571 """SetRow(self, int row)"""
10572 return _core_.GBPosition_SetRow(*args, **kwargs)
10573
10574 def SetCol(*args, **kwargs):
10575 """SetCol(self, int col)"""
10576 return _core_.GBPosition_SetCol(*args, **kwargs)
10577
10578 def __eq__(*args, **kwargs):
10579 """__eq__(self, GBPosition other) -> bool"""
10580 return _core_.GBPosition___eq__(*args, **kwargs)
10581
10582 def __ne__(*args, **kwargs):
10583 """__ne__(self, GBPosition other) -> bool"""
10584 return _core_.GBPosition___ne__(*args, **kwargs)
10585
10586 def Set(*args, **kwargs):
10587 """Set(self, int row=0, int col=0)"""
10588 return _core_.GBPosition_Set(*args, **kwargs)
10589
10590 def Get(*args, **kwargs):
10591 """Get(self) -> PyObject"""
10592 return _core_.GBPosition_Get(*args, **kwargs)
10593
10594 asTuple = wx._deprecated(Get, "asTuple is deprecated, use `Get` instead")
10595 def __str__(self): return str(self.Get())
10596 def __repr__(self): return 'wx.GBPosition'+str(self.Get())
10597 def __len__(self): return len(self.Get())
10598 def __getitem__(self, index): return self.Get()[index]
10599 def __setitem__(self, index, val):
10600 if index == 0: self.SetRow(val)
10601 elif index == 1: self.SetCol(val)
10602 else: raise IndexError
10603 def __nonzero__(self): return self.Get() != (0,0)
10604 __safe_for_unpickling__ = True
10605 def __reduce__(self): return (wx.GBPosition, self.Get())
10606
10607 row = property(GetRow, SetRow)
10608 col = property(GetCol, SetCol)
10609
10610
10611 class GBPositionPtr(GBPosition):
10612 def __init__(self, this):
10613 self.this = this
10614 if not hasattr(self,"thisown"): self.thisown = 0
10615 self.__class__ = GBPosition
10616 _core_.GBPosition_swigregister(GBPositionPtr)
10617
10618 class GBSpan(object):
10619 """
10620 This class is used to hold the row and column spanning attributes of
10621 items in a `wx.GridBagSizer`. wxPython has typemaps that will
10622 automatically convert from a 2-element sequence of integers to a
10623 wx.GBSpan, so you can use the more pythonic representation of the span
10624 nearly transparently in Python code.
10625
10626 """
10627 def __repr__(self):
10628 return "<%s.%s; proxy of C++ wxGBSpan instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
10629 def __init__(self, *args, **kwargs):
10630 """
10631 __init__(self, int rowspan=1, int colspan=1) -> GBSpan
10632
10633 Construct a new wxGBSpan, optionally setting the rowspan and
10634 colspan. The default is (1,1). (Meaning that the item occupies one
10635 cell in each direction.
10636 """
10637 newobj = _core_.new_GBSpan(*args, **kwargs)
10638 self.this = newobj.this
10639 self.thisown = 1
10640 del newobj.thisown
10641 def GetRowspan(*args, **kwargs):
10642 """GetRowspan(self) -> int"""
10643 return _core_.GBSpan_GetRowspan(*args, **kwargs)
10644
10645 def GetColspan(*args, **kwargs):
10646 """GetColspan(self) -> int"""
10647 return _core_.GBSpan_GetColspan(*args, **kwargs)
10648
10649 def SetRowspan(*args, **kwargs):
10650 """SetRowspan(self, int rowspan)"""
10651 return _core_.GBSpan_SetRowspan(*args, **kwargs)
10652
10653 def SetColspan(*args, **kwargs):
10654 """SetColspan(self, int colspan)"""
10655 return _core_.GBSpan_SetColspan(*args, **kwargs)
10656
10657 def __eq__(*args, **kwargs):
10658 """__eq__(self, GBSpan other) -> bool"""
10659 return _core_.GBSpan___eq__(*args, **kwargs)
10660
10661 def __ne__(*args, **kwargs):
10662 """__ne__(self, GBSpan other) -> bool"""
10663 return _core_.GBSpan___ne__(*args, **kwargs)
10664
10665 def Set(*args, **kwargs):
10666 """Set(self, int rowspan=1, int colspan=1)"""
10667 return _core_.GBSpan_Set(*args, **kwargs)
10668
10669 def Get(*args, **kwargs):
10670 """Get(self) -> PyObject"""
10671 return _core_.GBSpan_Get(*args, **kwargs)
10672
10673 asTuple = wx._deprecated(Get, "asTuple is deprecated, use `Get` instead")
10674 def __str__(self): return str(self.Get())
10675 def __repr__(self): return 'wx.GBSpan'+str(self.Get())
10676 def __len__(self): return len(self.Get())
10677 def __getitem__(self, index): return self.Get()[index]
10678 def __setitem__(self, index, val):
10679 if index == 0: self.SetRowspan(val)
10680 elif index == 1: self.SetColspan(val)
10681 else: raise IndexError
10682 def __nonzero__(self): return self.Get() != (0,0)
10683 __safe_for_unpickling__ = True
10684 def __reduce__(self): return (wx.GBSpan, self.Get())
10685
10686 rowspan = property(GetRowspan, SetRowspan)
10687 colspan = property(GetColspan, SetColspan)
10688
10689
10690 class GBSpanPtr(GBSpan):
10691 def __init__(self, this):
10692 self.this = this
10693 if not hasattr(self,"thisown"): self.thisown = 0
10694 self.__class__ = GBSpan
10695 _core_.GBSpan_swigregister(GBSpanPtr)
10696
10697 class GBSizerItem(SizerItem):
10698 """
10699 The wx.GBSizerItem class is used to track the additional data about
10700 items in a `wx.GridBagSizer` such as the item's position in the grid
10701 and how many rows or columns it spans.
10702
10703 """
10704 def __repr__(self):
10705 return "<%s.%s; proxy of C++ wxGBSizerItem instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
10706 def __init__(self, *args, **kwargs):
10707 """
10708 __init__(self) -> GBSizerItem
10709
10710 Constructs an empty wx.GBSizerItem. Either a window, sizer or spacer
10711 size will need to be set, as well as a position and span before this
10712 item can be used in a Sizer.
10713
10714 You will probably never need to create a wx.GBSizerItem directly as they
10715 are created automatically when the sizer's Add method is called.
10716 """
10717 newobj = _core_.new_GBSizerItem(*args, **kwargs)
10718 self.this = newobj.this
10719 self.thisown = 1
10720 del newobj.thisown
10721 def GetPos(*args, **kwargs):
10722 """
10723 GetPos(self) -> GBPosition
10724
10725 Get the grid position of the item
10726 """
10727 return _core_.GBSizerItem_GetPos(*args, **kwargs)
10728
10729 def GetPosTuple(self): return self.GetPos().Get()
10730 def GetSpan(*args, **kwargs):
10731 """
10732 GetSpan(self) -> GBSpan
10733
10734 Get the row and column spanning of the item
10735 """
10736 return _core_.GBSizerItem_GetSpan(*args, **kwargs)
10737
10738 def GetSpanTuple(self): return self.GetSpan().Get()
10739 def SetPos(*args, **kwargs):
10740 """
10741 SetPos(self, GBPosition pos) -> bool
10742
10743 If the item is already a member of a sizer then first ensure that
10744 there is no other item that would intersect with this one at the new
10745 position, then set the new position. Returns True if the change is
10746 successful and after the next Layout() the item will be moved.
10747 """
10748 return _core_.GBSizerItem_SetPos(*args, **kwargs)
10749
10750 def SetSpan(*args, **kwargs):
10751 """
10752 SetSpan(self, GBSpan span) -> bool
10753
10754 If the item is already a member of a sizer then first ensure that
10755 there is no other item that would intersect with this one with its new
10756 spanning size, then set the new spanning. Returns True if the change
10757 is successful and after the next Layout() the item will be resized.
10758
10759 """
10760 return _core_.GBSizerItem_SetSpan(*args, **kwargs)
10761
10762 def Intersects(*args, **kwargs):
10763 """
10764 Intersects(self, GBSizerItem other) -> bool
10765
10766 Returns True if this item and the other item instersect.
10767 """
10768 return _core_.GBSizerItem_Intersects(*args, **kwargs)
10769
10770 def IntersectsPos(*args, **kwargs):
10771 """
10772 IntersectsPos(self, GBPosition pos, GBSpan span) -> bool
10773
10774 Returns True if the given pos/span would intersect with this item.
10775 """
10776 return _core_.GBSizerItem_IntersectsPos(*args, **kwargs)
10777
10778 def GetEndPos(*args, **kwargs):
10779 """
10780 GetEndPos(self) -> GBPosition
10781
10782 Get the row and column of the endpoint of this item.
10783 """
10784 return _core_.GBSizerItem_GetEndPos(*args, **kwargs)
10785
10786 def GetGBSizer(*args, **kwargs):
10787 """
10788 GetGBSizer(self) -> GridBagSizer
10789
10790 Get the sizer this item is a member of.
10791 """
10792 return _core_.GBSizerItem_GetGBSizer(*args, **kwargs)
10793
10794 def SetGBSizer(*args, **kwargs):
10795 """
10796 SetGBSizer(self, GridBagSizer sizer)
10797
10798 Set the sizer this item is a member of.
10799 """
10800 return _core_.GBSizerItem_SetGBSizer(*args, **kwargs)
10801
10802
10803 class GBSizerItemPtr(GBSizerItem):
10804 def __init__(self, this):
10805 self.this = this
10806 if not hasattr(self,"thisown"): self.thisown = 0
10807 self.__class__ = GBSizerItem
10808 _core_.GBSizerItem_swigregister(GBSizerItemPtr)
10809 DefaultSpan = cvar.DefaultSpan
10810
10811 def GBSizerItemWindow(*args, **kwargs):
10812 """
10813 GBSizerItemWindow(Window window, GBPosition pos, GBSpan span, int flag,
10814 int border, PyObject userData=None) -> GBSizerItem
10815
10816 Construct a `wx.GBSizerItem` for a window.
10817 """
10818 val = _core_.new_GBSizerItemWindow(*args, **kwargs)
10819 val.thisown = 1
10820 return val
10821
10822 def GBSizerItemSizer(*args, **kwargs):
10823 """
10824 GBSizerItemSizer(Sizer sizer, GBPosition pos, GBSpan span, int flag,
10825 int border, PyObject userData=None) -> GBSizerItem
10826
10827 Construct a `wx.GBSizerItem` for a sizer
10828 """
10829 val = _core_.new_GBSizerItemSizer(*args, **kwargs)
10830 val.thisown = 1
10831 return val
10832
10833 def GBSizerItemSpacer(*args, **kwargs):
10834 """
10835 GBSizerItemSpacer(int width, int height, GBPosition pos, GBSpan span,
10836 int flag, int border, PyObject userData=None) -> GBSizerItem
10837
10838 Construct a `wx.GBSizerItem` for a spacer.
10839 """
10840 val = _core_.new_GBSizerItemSpacer(*args, **kwargs)
10841 val.thisown = 1
10842 return val
10843
10844 class GridBagSizer(FlexGridSizer):
10845 """
10846 A `wx.Sizer` that can lay out items in a virtual grid like a
10847 `wx.FlexGridSizer` but in this case explicit positioning of the items
10848 is allowed using `wx.GBPosition`, and items can optionally span more
10849 than one row and/or column using `wx.GBSpan`. The total size of the
10850 virtual grid is determined by the largest row and column that items are
10851 positioned at, adjusted for spanning.
10852
10853 """
10854 def __repr__(self):
10855 return "<%s.%s; proxy of C++ wxGridBagSizer instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
10856 def __init__(self, *args, **kwargs):
10857 """
10858 __init__(self, int vgap=0, int hgap=0) -> GridBagSizer
10859
10860 Constructor, with optional parameters to specify the gap between the
10861 rows and columns.
10862 """
10863 newobj = _core_.new_GridBagSizer(*args, **kwargs)
10864 self.this = newobj.this
10865 self.thisown = 1
10866 del newobj.thisown
10867 self._setOORInfo(self)
10868
10869 def Add(*args, **kwargs):
10870 """
10871 Add(self, item, GBPosition pos, GBSpan span=DefaultSpan, int flag=0,
10872 int border=0, userData=None) -> wx.GBSizerItem
10873
10874 Adds an item to the sizer at the grid cell *pos*, optionally spanning
10875 more than one row or column as specified with *span*. The remaining
10876 args behave similarly to `wx.Sizer.Add`.
10877
10878 Returns True if the item was successfully placed at the given cell
10879 position, False if something was already there.
10880
10881 """
10882 return _core_.GridBagSizer_Add(*args, **kwargs)
10883
10884 def AddItem(*args, **kwargs):
10885 """
10886 Add(self, GBSizerItem item) -> wx.GBSizerItem
10887
10888 Add an item to the sizer using a `wx.GBSizerItem`. Returns True if
10889 the item was successfully placed at its given cell position, False if
10890 something was already there.
10891 """
10892 return _core_.GridBagSizer_AddItem(*args, **kwargs)
10893
10894 def GetCellSize(*args, **kwargs):
10895 """
10896 GetCellSize(self, int row, int col) -> Size
10897
10898 Get the size of the specified cell, including hgap and
10899 vgap. Only valid after a Layout.
10900 """
10901 return _core_.GridBagSizer_GetCellSize(*args, **kwargs)
10902
10903 def GetEmptyCellSize(*args, **kwargs):
10904 """
10905 GetEmptyCellSize(self) -> Size
10906
10907 Get the size used for cells in the grid with no item.
10908 """
10909 return _core_.GridBagSizer_GetEmptyCellSize(*args, **kwargs)
10910
10911 def SetEmptyCellSize(*args, **kwargs):
10912 """
10913 SetEmptyCellSize(self, Size sz)
10914
10915 Set the size used for cells in the grid with no item.
10916 """
10917 return _core_.GridBagSizer_SetEmptyCellSize(*args, **kwargs)
10918
10919 def GetItemPosition(*args):
10920 """
10921 GetItemPosition(self, item) -> GBPosition
10922
10923 Get the grid position of the specified *item* where *item* is either a
10924 window or subsizer that is a member of this sizer, or a zero-based
10925 index of an item.
10926 """
10927 return _core_.GridBagSizer_GetItemPosition(*args)
10928
10929 def SetItemPosition(*args):
10930 """
10931 SetItemPosition(self, item, GBPosition pos) -> bool
10932
10933 Set the grid position of the specified *item* where *item* is either a
10934 window or subsizer that is a member of this sizer, or a zero-based
10935 index of an item. Returns True on success. If the move is not
10936 allowed (because an item is already there) then False is returned.
10937
10938 """
10939 return _core_.GridBagSizer_SetItemPosition(*args)
10940
10941 def GetItemSpan(*args):
10942 """
10943 GetItemSpan(self, item) -> GBSpan
10944
10945 Get the row/col spanning of the specified *item* where *item* is
10946 either a window or subsizer that is a member of this sizer, or a
10947 zero-based index of an item.
10948 """
10949 return _core_.GridBagSizer_GetItemSpan(*args)
10950
10951 def SetItemSpan(*args):
10952 """
10953 SetItemSpan(self, item, GBSpan span) -> bool
10954
10955 Set the row/col spanning of the specified *item* where *item* is
10956 either a window or subsizer that is a member of this sizer, or a
10957 zero-based index of an item. Returns True on success. If the move is
10958 not allowed (because an item is already there) then False is returned.
10959 """
10960 return _core_.GridBagSizer_SetItemSpan(*args)
10961
10962 def FindItem(*args):
10963 """
10964 FindItem(self, item) -> GBSizerItem
10965
10966 Find the sizer item for the given window or subsizer, returns None if
10967 not found. (non-recursive)
10968 """
10969 return _core_.GridBagSizer_FindItem(*args)
10970
10971 def FindItemAtPosition(*args, **kwargs):
10972 """
10973 FindItemAtPosition(self, GBPosition pos) -> GBSizerItem
10974
10975 Return the sizer item for the given grid cell, or None if there is no
10976 item at that position. (non-recursive)
10977 """
10978 return _core_.GridBagSizer_FindItemAtPosition(*args, **kwargs)
10979
10980 def FindItemAtPoint(*args, **kwargs):
10981 """
10982 FindItemAtPoint(self, Point pt) -> GBSizerItem
10983
10984 Return the sizer item located at the point given in *pt*, or None if
10985 there is no item at that point. The (x,y) coordinates in pt correspond
10986 to the client coordinates of the window using the sizer for
10987 layout. (non-recursive)
10988 """
10989 return _core_.GridBagSizer_FindItemAtPoint(*args, **kwargs)
10990
10991 def CheckForIntersection(*args, **kwargs):
10992 """
10993 CheckForIntersection(self, GBSizerItem item, GBSizerItem excludeItem=None) -> bool
10994
10995 Look at all items and see if any intersect (or would overlap) the
10996 given *item*. Returns True if so, False if there would be no overlap.
10997 If an *excludeItem* is given then it will not be checked for
10998 intersection, for example it may be the item we are checking the
10999 position of.
11000
11001 """
11002 return _core_.GridBagSizer_CheckForIntersection(*args, **kwargs)
11003
11004 def CheckForIntersectionPos(*args, **kwargs):
11005 """
11006 CheckForIntersectionPos(self, GBPosition pos, GBSpan span, GBSizerItem excludeItem=None) -> bool
11007
11008 Look at all items and see if any intersect (or would overlap) the
11009 given position and span. Returns True if so, False if there would be
11010 no overlap. If an *excludeItem* is given then it will not be checked
11011 for intersection, for example it may be the item we are checking the
11012 position of.
11013 """
11014 return _core_.GridBagSizer_CheckForIntersectionPos(*args, **kwargs)
11015
11016
11017 class GridBagSizerPtr(GridBagSizer):
11018 def __init__(self, this):
11019 self.this = this
11020 if not hasattr(self,"thisown"): self.thisown = 0
11021 self.__class__ = GridBagSizer
11022 _core_.GridBagSizer_swigregister(GridBagSizerPtr)
11023
11024 #---------------------------------------------------------------------------
11025
11026 Left = _core_.Left
11027 Top = _core_.Top
11028 Right = _core_.Right
11029 Bottom = _core_.Bottom
11030 Width = _core_.Width
11031 Height = _core_.Height
11032 Centre = _core_.Centre
11033 Center = _core_.Center
11034 CentreX = _core_.CentreX
11035 CentreY = _core_.CentreY
11036 Unconstrained = _core_.Unconstrained
11037 AsIs = _core_.AsIs
11038 PercentOf = _core_.PercentOf
11039 Above = _core_.Above
11040 Below = _core_.Below
11041 LeftOf = _core_.LeftOf
11042 RightOf = _core_.RightOf
11043 SameAs = _core_.SameAs
11044 Absolute = _core_.Absolute
11045 class IndividualLayoutConstraint(Object):
11046 """
11047 Objects of this class are stored in the `wx.LayoutConstraints` class as
11048 one of eight possible constraints that a window can be involved in.
11049 You will never need to create an instance of
11050 wx.IndividualLayoutConstraint, rather you should create a
11051 `wx.LayoutConstraints` instance and use the individual contstraints
11052 that it contains.
11053 """
11054 def __init__(self): raise RuntimeError, "No constructor defined"
11055 def __repr__(self):
11056 return "<%s.%s; proxy of C++ wxIndividualLayoutConstraint instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
11057 def Set(*args, **kwargs):
11058 """
11059 Set(self, int rel, Window otherW, int otherE, int val=0, int marg=wxLAYOUT_DEFAULT_MARGIN)
11060
11061 Sets the properties of the constraint. Normally called by one of the
11062 convenience functions such as Above, RightOf, SameAs.
11063 """
11064 return _core_.IndividualLayoutConstraint_Set(*args, **kwargs)
11065
11066 def LeftOf(*args, **kwargs):
11067 """
11068 LeftOf(self, Window sibling, int marg=0)
11069
11070 Constrains this edge to be to the left of the given window, with an
11071 optional margin. Implicitly, this is relative to the left edge of the
11072 other window.
11073 """
11074 return _core_.IndividualLayoutConstraint_LeftOf(*args, **kwargs)
11075
11076 def RightOf(*args, **kwargs):
11077 """
11078 RightOf(self, Window sibling, int marg=0)
11079
11080 Constrains this edge to be to the right of the given window, with an
11081 optional margin. Implicitly, this is relative to the right edge of the
11082 other window.
11083 """
11084 return _core_.IndividualLayoutConstraint_RightOf(*args, **kwargs)
11085
11086 def Above(*args, **kwargs):
11087 """
11088 Above(self, Window sibling, int marg=0)
11089
11090 Constrains this edge to be above the given window, with an optional
11091 margin. Implicitly, this is relative to the top edge of the other
11092 window.
11093 """
11094 return _core_.IndividualLayoutConstraint_Above(*args, **kwargs)
11095
11096 def Below(*args, **kwargs):
11097 """
11098 Below(self, Window sibling, int marg=0)
11099
11100 Constrains this edge to be below the given window, with an optional
11101 margin. Implicitly, this is relative to the bottom edge of the other
11102 window.
11103 """
11104 return _core_.IndividualLayoutConstraint_Below(*args, **kwargs)
11105
11106 def SameAs(*args, **kwargs):
11107 """
11108 SameAs(self, Window otherW, int edge, int marg=0)
11109
11110 Constrains this edge or dimension to be to the same as the edge of the
11111 given window, with an optional margin.
11112 """
11113 return _core_.IndividualLayoutConstraint_SameAs(*args, **kwargs)
11114
11115 def PercentOf(*args, **kwargs):
11116 """
11117 PercentOf(self, Window otherW, int wh, int per)
11118
11119 Constrains this edge or dimension to be to a percentage of the given
11120 window, with an optional margin.
11121 """
11122 return _core_.IndividualLayoutConstraint_PercentOf(*args, **kwargs)
11123
11124 def Absolute(*args, **kwargs):
11125 """
11126 Absolute(self, int val)
11127
11128 Constrains this edge or dimension to be the given absolute value.
11129 """
11130 return _core_.IndividualLayoutConstraint_Absolute(*args, **kwargs)
11131
11132 def Unconstrained(*args, **kwargs):
11133 """
11134 Unconstrained(self)
11135
11136 Sets this edge or dimension to be unconstrained, that is, dependent on
11137 other edges and dimensions from which this value can be deduced.
11138 """
11139 return _core_.IndividualLayoutConstraint_Unconstrained(*args, **kwargs)
11140
11141 def AsIs(*args, **kwargs):
11142 """
11143 AsIs(self)
11144
11145 Sets this edge or constraint to be whatever the window's value is at
11146 the moment. If either of the width and height constraints are *as is*,
11147 the window will not be resized, but moved instead. This is important
11148 when considering panel items which are intended to have a default
11149 size, such as a button, which may take its size from the size of the
11150 button label.
11151 """
11152 return _core_.IndividualLayoutConstraint_AsIs(*args, **kwargs)
11153
11154 def GetOtherWindow(*args, **kwargs):
11155 """GetOtherWindow(self) -> Window"""
11156 return _core_.IndividualLayoutConstraint_GetOtherWindow(*args, **kwargs)
11157
11158 def GetMyEdge(*args, **kwargs):
11159 """GetMyEdge(self) -> int"""
11160 return _core_.IndividualLayoutConstraint_GetMyEdge(*args, **kwargs)
11161
11162 def SetEdge(*args, **kwargs):
11163 """SetEdge(self, int which)"""
11164 return _core_.IndividualLayoutConstraint_SetEdge(*args, **kwargs)
11165
11166 def SetValue(*args, **kwargs):
11167 """SetValue(self, int v)"""
11168 return _core_.IndividualLayoutConstraint_SetValue(*args, **kwargs)
11169
11170 def GetMargin(*args, **kwargs):
11171 """GetMargin(self) -> int"""
11172 return _core_.IndividualLayoutConstraint_GetMargin(*args, **kwargs)
11173
11174 def SetMargin(*args, **kwargs):
11175 """SetMargin(self, int m)"""
11176 return _core_.IndividualLayoutConstraint_SetMargin(*args, **kwargs)
11177
11178 def GetValue(*args, **kwargs):
11179 """GetValue(self) -> int"""
11180 return _core_.IndividualLayoutConstraint_GetValue(*args, **kwargs)
11181
11182 def GetPercent(*args, **kwargs):
11183 """GetPercent(self) -> int"""
11184 return _core_.IndividualLayoutConstraint_GetPercent(*args, **kwargs)
11185
11186 def GetOtherEdge(*args, **kwargs):
11187 """GetOtherEdge(self) -> int"""
11188 return _core_.IndividualLayoutConstraint_GetOtherEdge(*args, **kwargs)
11189
11190 def GetDone(*args, **kwargs):
11191 """GetDone(self) -> bool"""
11192 return _core_.IndividualLayoutConstraint_GetDone(*args, **kwargs)
11193
11194 def SetDone(*args, **kwargs):
11195 """SetDone(self, bool d)"""
11196 return _core_.IndividualLayoutConstraint_SetDone(*args, **kwargs)
11197
11198 def GetRelationship(*args, **kwargs):
11199 """GetRelationship(self) -> int"""
11200 return _core_.IndividualLayoutConstraint_GetRelationship(*args, **kwargs)
11201
11202 def SetRelationship(*args, **kwargs):
11203 """SetRelationship(self, int r)"""
11204 return _core_.IndividualLayoutConstraint_SetRelationship(*args, **kwargs)
11205
11206 def ResetIfWin(*args, **kwargs):
11207 """
11208 ResetIfWin(self, Window otherW) -> bool
11209
11210 Reset constraint if it mentions otherWin
11211 """
11212 return _core_.IndividualLayoutConstraint_ResetIfWin(*args, **kwargs)
11213
11214 def SatisfyConstraint(*args, **kwargs):
11215 """
11216 SatisfyConstraint(self, LayoutConstraints constraints, Window win) -> bool
11217
11218 Try to satisfy constraint
11219 """
11220 return _core_.IndividualLayoutConstraint_SatisfyConstraint(*args, **kwargs)
11221
11222 def GetEdge(*args, **kwargs):
11223 """
11224 GetEdge(self, int which, Window thisWin, Window other) -> int
11225
11226 Get the value of this edge or dimension, or if this
11227 is not determinable, -1.
11228 """
11229 return _core_.IndividualLayoutConstraint_GetEdge(*args, **kwargs)
11230
11231
11232 class IndividualLayoutConstraintPtr(IndividualLayoutConstraint):
11233 def __init__(self, this):
11234 self.this = this
11235 if not hasattr(self,"thisown"): self.thisown = 0
11236 self.__class__ = IndividualLayoutConstraint
11237 _core_.IndividualLayoutConstraint_swigregister(IndividualLayoutConstraintPtr)
11238
11239 class LayoutConstraints(Object):
11240 """
11241 **Note:** constraints are now deprecated and you should use sizers
11242 instead.
11243
11244 Objects of this class can be associated with a window to define its
11245 layout constraints, with respect to siblings or its parent.
11246
11247 The class consists of the following eight constraints of class
11248 wx.IndividualLayoutConstraint, some or all of which should be accessed
11249 directly to set the appropriate constraints.
11250
11251 * left: represents the left hand edge of the window
11252 * right: represents the right hand edge of the window
11253 * top: represents the top edge of the window
11254 * bottom: represents the bottom edge of the window
11255 * width: represents the width of the window
11256 * height: represents the height of the window
11257 * centreX: represents the horizontal centre point of the window
11258 * centreY: represents the vertical centre point of the window
11259
11260 Most constraints are initially set to have the relationship
11261 wxUnconstrained, which means that their values should be calculated by
11262 looking at known constraints. The exceptions are width and height,
11263 which are set to wxAsIs to ensure that if the user does not specify a
11264 constraint, the existing width and height will be used, to be
11265 compatible with panel items which often have take a default size. If
11266 the constraint is ``wx.AsIs``, the dimension will not be changed.
11267
11268 :see: `wx.IndividualLayoutConstraint`, `wx.Window.SetConstraints`
11269
11270 """
11271 def __repr__(self):
11272 return "<%s.%s; proxy of C++ wxLayoutConstraints instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
11273 left = property(_core_.LayoutConstraints_left_get)
11274 top = property(_core_.LayoutConstraints_top_get)
11275 right = property(_core_.LayoutConstraints_right_get)
11276 bottom = property(_core_.LayoutConstraints_bottom_get)
11277 width = property(_core_.LayoutConstraints_width_get)
11278 height = property(_core_.LayoutConstraints_height_get)
11279 centreX = property(_core_.LayoutConstraints_centreX_get)
11280 centreY = property(_core_.LayoutConstraints_centreY_get)
11281 def __init__(self, *args, **kwargs):
11282 """__init__(self) -> LayoutConstraints"""
11283 newobj = _core_.new_LayoutConstraints(*args, **kwargs)
11284 self.this = newobj.this
11285 self.thisown = 1
11286 del newobj.thisown
11287 def SatisfyConstraints(*args, **kwargs):
11288 """SatisfyConstraints(Window win) -> (areSatisfied, noChanges)"""
11289 return _core_.LayoutConstraints_SatisfyConstraints(*args, **kwargs)
11290
11291 def AreSatisfied(*args, **kwargs):
11292 """AreSatisfied(self) -> bool"""
11293 return _core_.LayoutConstraints_AreSatisfied(*args, **kwargs)
11294
11295
11296 class LayoutConstraintsPtr(LayoutConstraints):
11297 def __init__(self, this):
11298 self.this = this
11299 if not hasattr(self,"thisown"): self.thisown = 0
11300 self.__class__ = LayoutConstraints
11301 _core_.LayoutConstraints_swigregister(LayoutConstraintsPtr)
11302
11303 #----------------------------------------------------------------------------
11304
11305 # Use Python's bool constants if available, make some if not
11306 try:
11307 True
11308 except NameError:
11309 __builtins__.True = 1==1
11310 __builtins__.False = 1==0
11311 def bool(value): return not not value
11312 __builtins__.bool = bool
11313
11314
11315
11316 # workarounds for bad wxRTTI names
11317 __wxPyPtrTypeMap['wxGauge95'] = 'wxGauge'
11318 __wxPyPtrTypeMap['wxSlider95'] = 'wxSlider'
11319 __wxPyPtrTypeMap['wxStatusBar95'] = 'wxStatusBar'
11320
11321
11322 #----------------------------------------------------------------------------
11323 # Load version numbers from __version__... Ensure that major and minor
11324 # versions are the same for both wxPython and wxWidgets.
11325
11326 from __version__ import *
11327 __version__ = VERSION_STRING
11328
11329 assert MAJOR_VERSION == _core_.MAJOR_VERSION, "wxPython/wxWidgets version mismatch"
11330 assert MINOR_VERSION == _core_.MINOR_VERSION, "wxPython/wxWidgets version mismatch"
11331 if RELEASE_VERSION != _core_.RELEASE_VERSION:
11332 import warnings
11333 warnings.warn("wxPython/wxWidgets release number mismatch")
11334
11335 #----------------------------------------------------------------------------
11336
11337 # Set the default string<-->unicode conversion encoding from the
11338 # locale. This encoding is used when string or unicode objects need
11339 # to be converted in order to pass them to wxWidgets. Please be aware
11340 # that the default encoding within the same locale may be slightly
11341 # different on different platforms. For example, please see
11342 # http://www.alanwood.net/demos/charsetdiffs.html for differences
11343 # between the common latin/roman encodings.
11344
11345 default = _sys.getdefaultencoding()
11346 if default == 'ascii':
11347 import locale
11348 import codecs
11349 try:
11350 default = locale.getdefaultlocale()[1]
11351 codecs.lookup(default)
11352 except (ValueError, LookupError):
11353 default = _sys.getdefaultencoding()
11354 del locale
11355 del codecs
11356 if default:
11357 wx.SetDefaultPyEncoding(default)
11358 del default
11359
11360 #----------------------------------------------------------------------------
11361
11362 class PyDeadObjectError(AttributeError):
11363 pass
11364
11365 class _wxPyDeadObject(object):
11366 """
11367 Instances of wx objects that are OOR capable will have their __class__
11368 changed to this class when the C++ object is deleted. This should help
11369 prevent crashes due to referencing a bogus C++ pointer.
11370 """
11371 reprStr = "wxPython wrapper for DELETED %s object! (The C++ object no longer exists.)"
11372 attrStr = "The C++ part of the %s object has been deleted, attribute access no longer allowed."
11373
11374 def __repr__(self):
11375 if not hasattr(self, "_name"):
11376 self._name = "[unknown]"
11377 return self.reprStr % self._name
11378
11379 def __getattr__(self, *args):
11380 if not hasattr(self, "_name"):
11381 self._name = "[unknown]"
11382 raise PyDeadObjectError(self.attrStr % self._name)
11383
11384 def __nonzero__(self):
11385 return 0
11386
11387
11388
11389 class PyUnbornObjectError(AttributeError):
11390 pass
11391
11392 class _wxPyUnbornObject(object):
11393 """
11394 Some stock objects are created when the wx._core module is
11395 imported, but their C++ instance is not created until the wx.App
11396 object is created and initialized. These object instances will
11397 temporarily have their __class__ changed to this class so an
11398 exception will be raised if they are used before the C++ instance
11399 is ready.
11400 """
11401
11402 reprStr = "wxPython wrapper for UNBORN object! (The C++ object is not initialized yet.)"
11403 attrStr = "The C++ part of this object has not been initialized, attribute access not allowed."
11404
11405 def __repr__(self):
11406 #if not hasattr(self, "_name"):
11407 # self._name = "[unknown]"
11408 return self.reprStr #% self._name
11409
11410 def __getattr__(self, *args):
11411 #if not hasattr(self, "_name"):
11412 # self._name = "[unknown]"
11413 raise PyUnbornObjectError(self.attrStr) # % self._name )
11414
11415 def __nonzero__(self):
11416 return 0
11417
11418
11419 #----------------------------------------------------------------------------
11420
11421 def CallAfter(callable, *args, **kw):
11422 """
11423 Call the specified function after the current and pending event
11424 handlers have been completed. This is also good for making GUI
11425 method calls from non-GUI threads. Any extra positional or
11426 keyword args are passed on to the callable when it is called.
11427
11428 :see: `wx.FutureCall`
11429 """
11430 app = wx.GetApp()
11431 assert app is not None, 'No wx.App created yet'
11432
11433 if not hasattr(app, "_CallAfterId"):
11434 app._CallAfterId = wx.NewEventType()
11435 app.Connect(-1, -1, app._CallAfterId,
11436 lambda event: event.callable(*event.args, **event.kw) )
11437 evt = wx.PyEvent()
11438 evt.SetEventType(app._CallAfterId)
11439 evt.callable = callable
11440 evt.args = args
11441 evt.kw = kw
11442 wx.PostEvent(app, evt)
11443
11444 #----------------------------------------------------------------------------
11445
11446
11447 class FutureCall:
11448 """
11449 A convenience class for `wx.Timer`, that calls the given callable
11450 object once after the given amount of milliseconds, passing any
11451 positional or keyword args. The return value of the callable is
11452 availbale after it has been run with the `GetResult` method.
11453
11454 If you don't need to get the return value or restart the timer
11455 then there is no need to hold a reference to this object. It will
11456 hold a reference to itself while the timer is running (the timer
11457 has a reference to self.Notify) but the cycle will be broken when
11458 the timer completes, automatically cleaning up the wx.FutureCall
11459 object.
11460
11461 :see: `wx.CallAfter`
11462 """
11463 def __init__(self, millis, callable, *args, **kwargs):
11464 self.millis = millis
11465 self.callable = callable
11466 self.SetArgs(*args, **kwargs)
11467 self.runCount = 0
11468 self.running = False
11469 self.hasRun = False
11470 self.result = None
11471 self.timer = None
11472 self.Start()
11473
11474 def __del__(self):
11475 self.Stop()
11476
11477
11478 def Start(self, millis=None, *args, **kwargs):
11479 """
11480 (Re)start the timer
11481 """
11482 self.hasRun = False
11483 if millis is not None:
11484 self.millis = millis
11485 if args or kwargs:
11486 self.SetArgs(*args, **kwargs)
11487 self.Stop()
11488 self.timer = wx.PyTimer(self.Notify)
11489 self.timer.Start(self.millis, wx.TIMER_ONE_SHOT)
11490 self.running = True
11491 Restart = Start
11492
11493
11494 def Stop(self):
11495 """
11496 Stop and destroy the timer.
11497 """
11498 if self.timer is not None:
11499 self.timer.Stop()
11500 self.timer = None
11501
11502
11503 def GetInterval(self):
11504 if self.timer is not None:
11505 return self.timer.GetInterval()
11506 else:
11507 return 0
11508
11509
11510 def IsRunning(self):
11511 return self.timer is not None and self.timer.IsRunning()
11512
11513
11514 def SetArgs(self, *args, **kwargs):
11515 """
11516 (Re)set the args passed to the callable object. This is
11517 useful in conjunction with Restart if you want to schedule a
11518 new call to the same callable object but with different
11519 parameters.
11520 """
11521 self.args = args
11522 self.kwargs = kwargs
11523
11524
11525 def HasRun(self):
11526 return self.hasRun
11527
11528 def GetResult(self):
11529 return self.result
11530
11531 def Notify(self):
11532 """
11533 The timer has expired so call the callable.
11534 """
11535 if self.callable and getattr(self.callable, 'im_self', True):
11536 self.runCount += 1
11537 self.running = False
11538 self.result = self.callable(*self.args, **self.kwargs)
11539 self.hasRun = True
11540 if not self.running:
11541 # if it wasn't restarted, then cleanup
11542 wx.CallAfter(self.Stop)
11543
11544
11545
11546 #----------------------------------------------------------------------------
11547 # Control which items in this module should be documented by epydoc.
11548 # We allow only classes and functions, which will help reduce the size
11549 # of the docs by filtering out the zillions of constants, EVT objects,
11550 # and etc that don't make much sense by themselves, but are instead
11551 # documented (or will be) as part of the classes/functions/methods
11552 # where they should be used.
11553
11554 class __DocFilter:
11555 """
11556 A filter for epydoc that only allows non-Ptr classes and
11557 fucntions, in order to reduce the clutter in the API docs.
11558 """
11559 def __init__(self, globals):
11560 self._globals = globals
11561
11562 def __call__(self, name):
11563 import types
11564 obj = self._globals.get(name, None)
11565 if type(obj) not in [type, types.ClassType, types.FunctionType, types.BuiltinFunctionType]:
11566 return False
11567 if name.startswith('_') or name.endswith('Ptr') or name.startswith('EVT'):
11568 return False
11569 return True
11570
11571 #----------------------------------------------------------------------------
11572 #----------------------------------------------------------------------------
11573
11574 # Import other modules in this package that should show up in the
11575 # "core" wx namespace
11576 from _gdi import *
11577 from _windows import *
11578 from _controls import *
11579 from _misc import *
11580
11581
11582 # Fixup the stock objects since they can't be used yet. (They will be
11583 # restored in wx.PyApp.OnInit.)
11584 _core_._wxPyFixStockObjects()
11585
11586 #----------------------------------------------------------------------------
11587 #----------------------------------------------------------------------------
11588
11589