]> git.saurik.com Git - wxWidgets.git/blob - wxPython/src/msw/_core.py
HasTransparentBackground
[wxWidgets.git] / wxPython / src / msw / _core.py
1 # This file was created automatically by SWIG.
2 # Don't modify this file, modify the SWIG interface instead.
3
4 import _core_
5
6 def _swig_setattr_nondynamic(self,class_type,name,value,static=1):
7 if (name == "this"):
8 if isinstance(value, class_type):
9 self.__dict__[name] = value.this
10 if hasattr(value,"thisown"): self.__dict__["thisown"] = value.thisown
11 del value.thisown
12 return
13 method = class_type.__swig_setmethods__.get(name,None)
14 if method: return method(self,value)
15 if (not static) or hasattr(self,name) or (name == "thisown"):
16 self.__dict__[name] = value
17 else:
18 raise AttributeError("You cannot add attributes to %s" % self)
19
20 def _swig_setattr(self,class_type,name,value):
21 return _swig_setattr_nondynamic(self,class_type,name,value,0)
22
23 def _swig_getattr(self,class_type,name):
24 method = class_type.__swig_getmethods__.get(name,None)
25 if method: return method(self)
26 raise AttributeError,name
27
28 import types
29 try:
30 _object = types.ObjectType
31 _newclass = 1
32 except AttributeError:
33 class _object : pass
34 _newclass = 0
35 del types
36
37
38 def _swig_setattr_nondynamic_method(set):
39 def set_attr(self,name,value):
40 if hasattr(self,name) or (name in ("this", "thisown")):
41 set(self,name,value)
42 else:
43 raise AttributeError("You cannot add attributes to %s" % self)
44 return set_attr
45
46
47 #// Give a reference to the dictionary of this module to the C++ extension
48 #// code.
49 _core_._wxPySetDictionary(vars())
50
51 #// A little trick to make 'wx' be a reference to this module so wx.Names can
52 #// be used here.
53 import sys as _sys
54 wx = _sys.modules[__name__]
55
56
57 #----------------------------------------------------------------------------
58
59 def _deprecated(callable, msg=None):
60 """
61 Create a wrapper function that will raise a DeprecationWarning
62 before calling the callable.
63 """
64 if msg is None:
65 msg = "%s is deprecated" % callable
66 def deprecatedWrapper(*args, **kwargs):
67 import warnings
68 warnings.warn(msg, DeprecationWarning, stacklevel=2)
69 return callable(*args, **kwargs)
70 deprecatedWrapper.__doc__ = msg
71 return deprecatedWrapper
72
73
74 #----------------------------------------------------------------------------
75
76 NOT_FOUND = _core_.NOT_FOUND
77 VSCROLL = _core_.VSCROLL
78 HSCROLL = _core_.HSCROLL
79 CAPTION = _core_.CAPTION
80 DOUBLE_BORDER = _core_.DOUBLE_BORDER
81 SUNKEN_BORDER = _core_.SUNKEN_BORDER
82 RAISED_BORDER = _core_.RAISED_BORDER
83 BORDER = _core_.BORDER
84 SIMPLE_BORDER = _core_.SIMPLE_BORDER
85 STATIC_BORDER = _core_.STATIC_BORDER
86 TRANSPARENT_WINDOW = _core_.TRANSPARENT_WINDOW
87 NO_BORDER = _core_.NO_BORDER
88 TAB_TRAVERSAL = _core_.TAB_TRAVERSAL
89 WANTS_CHARS = _core_.WANTS_CHARS
90 POPUP_WINDOW = _core_.POPUP_WINDOW
91 CENTER_FRAME = _core_.CENTER_FRAME
92 CENTRE_ON_SCREEN = _core_.CENTRE_ON_SCREEN
93 CENTER_ON_SCREEN = _core_.CENTER_ON_SCREEN
94 ED_CLIENT_MARGIN = _core_.ED_CLIENT_MARGIN
95 ED_BUTTONS_BOTTOM = _core_.ED_BUTTONS_BOTTOM
96 ED_BUTTONS_RIGHT = _core_.ED_BUTTONS_RIGHT
97 ED_STATIC_LINE = _core_.ED_STATIC_LINE
98 EXT_DIALOG_STYLE = _core_.EXT_DIALOG_STYLE
99 CLIP_CHILDREN = _core_.CLIP_CHILDREN
100 CLIP_SIBLINGS = _core_.CLIP_SIBLINGS
101 ALWAYS_SHOW_SB = _core_.ALWAYS_SHOW_SB
102 RETAINED = _core_.RETAINED
103 BACKINGSTORE = _core_.BACKINGSTORE
104 COLOURED = _core_.COLOURED
105 FIXED_LENGTH = _core_.FIXED_LENGTH
106 LB_NEEDED_SB = _core_.LB_NEEDED_SB
107 LB_ALWAYS_SB = _core_.LB_ALWAYS_SB
108 LB_SORT = _core_.LB_SORT
109 LB_SINGLE = _core_.LB_SINGLE
110 LB_MULTIPLE = _core_.LB_MULTIPLE
111 LB_EXTENDED = _core_.LB_EXTENDED
112 LB_OWNERDRAW = _core_.LB_OWNERDRAW
113 LB_HSCROLL = _core_.LB_HSCROLL
114 PROCESS_ENTER = _core_.PROCESS_ENTER
115 PASSWORD = _core_.PASSWORD
116 CB_SIMPLE = _core_.CB_SIMPLE
117 CB_DROPDOWN = _core_.CB_DROPDOWN
118 CB_SORT = _core_.CB_SORT
119 CB_READONLY = _core_.CB_READONLY
120 RA_HORIZONTAL = _core_.RA_HORIZONTAL
121 RA_VERTICAL = _core_.RA_VERTICAL
122 RA_SPECIFY_ROWS = _core_.RA_SPECIFY_ROWS
123 RA_SPECIFY_COLS = _core_.RA_SPECIFY_COLS
124 RB_GROUP = _core_.RB_GROUP
125 RB_SINGLE = _core_.RB_SINGLE
126 SL_HORIZONTAL = _core_.SL_HORIZONTAL
127 SL_VERTICAL = _core_.SL_VERTICAL
128 SL_AUTOTICKS = _core_.SL_AUTOTICKS
129 SL_LABELS = _core_.SL_LABELS
130 SL_LEFT = _core_.SL_LEFT
131 SL_TOP = _core_.SL_TOP
132 SL_RIGHT = _core_.SL_RIGHT
133 SL_BOTTOM = _core_.SL_BOTTOM
134 SL_BOTH = _core_.SL_BOTH
135 SL_SELRANGE = _core_.SL_SELRANGE
136 SB_HORIZONTAL = _core_.SB_HORIZONTAL
137 SB_VERTICAL = _core_.SB_VERTICAL
138 ST_SIZEGRIP = _core_.ST_SIZEGRIP
139 ST_NO_AUTORESIZE = _core_.ST_NO_AUTORESIZE
140 FLOOD_SURFACE = _core_.FLOOD_SURFACE
141 FLOOD_BORDER = _core_.FLOOD_BORDER
142 ODDEVEN_RULE = _core_.ODDEVEN_RULE
143 WINDING_RULE = _core_.WINDING_RULE
144 TOOL_TOP = _core_.TOOL_TOP
145 TOOL_BOTTOM = _core_.TOOL_BOTTOM
146 TOOL_LEFT = _core_.TOOL_LEFT
147 TOOL_RIGHT = _core_.TOOL_RIGHT
148 OK = _core_.OK
149 YES_NO = _core_.YES_NO
150 CANCEL = _core_.CANCEL
151 YES = _core_.YES
152 NO = _core_.NO
153 NO_DEFAULT = _core_.NO_DEFAULT
154 YES_DEFAULT = _core_.YES_DEFAULT
155 ICON_EXCLAMATION = _core_.ICON_EXCLAMATION
156 ICON_HAND = _core_.ICON_HAND
157 ICON_QUESTION = _core_.ICON_QUESTION
158 ICON_INFORMATION = _core_.ICON_INFORMATION
159 ICON_STOP = _core_.ICON_STOP
160 ICON_ASTERISK = _core_.ICON_ASTERISK
161 ICON_MASK = _core_.ICON_MASK
162 ICON_WARNING = _core_.ICON_WARNING
163 ICON_ERROR = _core_.ICON_ERROR
164 FORWARD = _core_.FORWARD
165 BACKWARD = _core_.BACKWARD
166 RESET = _core_.RESET
167 HELP = _core_.HELP
168 MORE = _core_.MORE
169 SETUP = _core_.SETUP
170 SIZE_AUTO_WIDTH = _core_.SIZE_AUTO_WIDTH
171 SIZE_AUTO_HEIGHT = _core_.SIZE_AUTO_HEIGHT
172 SIZE_AUTO = _core_.SIZE_AUTO
173 SIZE_USE_EXISTING = _core_.SIZE_USE_EXISTING
174 SIZE_ALLOW_MINUS_ONE = _core_.SIZE_ALLOW_MINUS_ONE
175 PORTRAIT = _core_.PORTRAIT
176 LANDSCAPE = _core_.LANDSCAPE
177 PRINT_QUALITY_HIGH = _core_.PRINT_QUALITY_HIGH
178 PRINT_QUALITY_MEDIUM = _core_.PRINT_QUALITY_MEDIUM
179 PRINT_QUALITY_LOW = _core_.PRINT_QUALITY_LOW
180 PRINT_QUALITY_DRAFT = _core_.PRINT_QUALITY_DRAFT
181 ID_ANY = _core_.ID_ANY
182 ID_SEPARATOR = _core_.ID_SEPARATOR
183 ID_LOWEST = _core_.ID_LOWEST
184 ID_OPEN = _core_.ID_OPEN
185 ID_CLOSE = _core_.ID_CLOSE
186 ID_NEW = _core_.ID_NEW
187 ID_SAVE = _core_.ID_SAVE
188 ID_SAVEAS = _core_.ID_SAVEAS
189 ID_REVERT = _core_.ID_REVERT
190 ID_EXIT = _core_.ID_EXIT
191 ID_UNDO = _core_.ID_UNDO
192 ID_REDO = _core_.ID_REDO
193 ID_HELP = _core_.ID_HELP
194 ID_PRINT = _core_.ID_PRINT
195 ID_PRINT_SETUP = _core_.ID_PRINT_SETUP
196 ID_PREVIEW = _core_.ID_PREVIEW
197 ID_ABOUT = _core_.ID_ABOUT
198 ID_HELP_CONTENTS = _core_.ID_HELP_CONTENTS
199 ID_HELP_COMMANDS = _core_.ID_HELP_COMMANDS
200 ID_HELP_PROCEDURES = _core_.ID_HELP_PROCEDURES
201 ID_HELP_CONTEXT = _core_.ID_HELP_CONTEXT
202 ID_CLOSE_ALL = _core_.ID_CLOSE_ALL
203 ID_PREFERENCES = _core_.ID_PREFERENCES
204 ID_CUT = _core_.ID_CUT
205 ID_COPY = _core_.ID_COPY
206 ID_PASTE = _core_.ID_PASTE
207 ID_CLEAR = _core_.ID_CLEAR
208 ID_FIND = _core_.ID_FIND
209 ID_DUPLICATE = _core_.ID_DUPLICATE
210 ID_SELECTALL = _core_.ID_SELECTALL
211 ID_DELETE = _core_.ID_DELETE
212 ID_REPLACE = _core_.ID_REPLACE
213 ID_REPLACE_ALL = _core_.ID_REPLACE_ALL
214 ID_PROPERTIES = _core_.ID_PROPERTIES
215 ID_VIEW_DETAILS = _core_.ID_VIEW_DETAILS
216 ID_VIEW_LARGEICONS = _core_.ID_VIEW_LARGEICONS
217 ID_VIEW_SMALLICONS = _core_.ID_VIEW_SMALLICONS
218 ID_VIEW_LIST = _core_.ID_VIEW_LIST
219 ID_VIEW_SORTDATE = _core_.ID_VIEW_SORTDATE
220 ID_VIEW_SORTNAME = _core_.ID_VIEW_SORTNAME
221 ID_VIEW_SORTSIZE = _core_.ID_VIEW_SORTSIZE
222 ID_VIEW_SORTTYPE = _core_.ID_VIEW_SORTTYPE
223 ID_FILE1 = _core_.ID_FILE1
224 ID_FILE2 = _core_.ID_FILE2
225 ID_FILE3 = _core_.ID_FILE3
226 ID_FILE4 = _core_.ID_FILE4
227 ID_FILE5 = _core_.ID_FILE5
228 ID_FILE6 = _core_.ID_FILE6
229 ID_FILE7 = _core_.ID_FILE7
230 ID_FILE8 = _core_.ID_FILE8
231 ID_FILE9 = _core_.ID_FILE9
232 ID_OK = _core_.ID_OK
233 ID_CANCEL = _core_.ID_CANCEL
234 ID_APPLY = _core_.ID_APPLY
235 ID_YES = _core_.ID_YES
236 ID_NO = _core_.ID_NO
237 ID_STATIC = _core_.ID_STATIC
238 ID_FORWARD = _core_.ID_FORWARD
239 ID_BACKWARD = _core_.ID_BACKWARD
240 ID_DEFAULT = _core_.ID_DEFAULT
241 ID_MORE = _core_.ID_MORE
242 ID_SETUP = _core_.ID_SETUP
243 ID_RESET = _core_.ID_RESET
244 ID_CONTEXT_HELP = _core_.ID_CONTEXT_HELP
245 ID_YESTOALL = _core_.ID_YESTOALL
246 ID_NOTOALL = _core_.ID_NOTOALL
247 ID_ABORT = _core_.ID_ABORT
248 ID_RETRY = _core_.ID_RETRY
249 ID_IGNORE = _core_.ID_IGNORE
250 ID_ADD = _core_.ID_ADD
251 ID_REMOVE = _core_.ID_REMOVE
252 ID_UP = _core_.ID_UP
253 ID_DOWN = _core_.ID_DOWN
254 ID_HOME = _core_.ID_HOME
255 ID_REFRESH = _core_.ID_REFRESH
256 ID_STOP = _core_.ID_STOP
257 ID_INDEX = _core_.ID_INDEX
258 ID_BOLD = _core_.ID_BOLD
259 ID_ITALIC = _core_.ID_ITALIC
260 ID_JUSTIFY_CENTER = _core_.ID_JUSTIFY_CENTER
261 ID_JUSTIFY_FILL = _core_.ID_JUSTIFY_FILL
262 ID_JUSTIFY_RIGHT = _core_.ID_JUSTIFY_RIGHT
263 ID_JUSTIFY_LEFT = _core_.ID_JUSTIFY_LEFT
264 ID_UNDERLINE = _core_.ID_UNDERLINE
265 ID_INDENT = _core_.ID_INDENT
266 ID_UNINDENT = _core_.ID_UNINDENT
267 ID_ZOOM_100 = _core_.ID_ZOOM_100
268 ID_ZOOM_FIT = _core_.ID_ZOOM_FIT
269 ID_ZOOM_IN = _core_.ID_ZOOM_IN
270 ID_ZOOM_OUT = _core_.ID_ZOOM_OUT
271 ID_UNDELETE = _core_.ID_UNDELETE
272 ID_REVERT_TO_SAVED = _core_.ID_REVERT_TO_SAVED
273 ID_HIGHEST = _core_.ID_HIGHEST
274 OPEN = _core_.OPEN
275 SAVE = _core_.SAVE
276 HIDE_READONLY = _core_.HIDE_READONLY
277 OVERWRITE_PROMPT = _core_.OVERWRITE_PROMPT
278 FILE_MUST_EXIST = _core_.FILE_MUST_EXIST
279 MULTIPLE = _core_.MULTIPLE
280 CHANGE_DIR = _core_.CHANGE_DIR
281 ACCEL_ALT = _core_.ACCEL_ALT
282 ACCEL_CTRL = _core_.ACCEL_CTRL
283 ACCEL_SHIFT = _core_.ACCEL_SHIFT
284 ACCEL_NORMAL = _core_.ACCEL_NORMAL
285 PD_AUTO_HIDE = _core_.PD_AUTO_HIDE
286 PD_APP_MODAL = _core_.PD_APP_MODAL
287 PD_CAN_ABORT = _core_.PD_CAN_ABORT
288 PD_ELAPSED_TIME = _core_.PD_ELAPSED_TIME
289 PD_ESTIMATED_TIME = _core_.PD_ESTIMATED_TIME
290 PD_REMAINING_TIME = _core_.PD_REMAINING_TIME
291 PD_SMOOTH = _core_.PD_SMOOTH
292 PD_CAN_SKIP = _core_.PD_CAN_SKIP
293 DD_NEW_DIR_BUTTON = _core_.DD_NEW_DIR_BUTTON
294 DD_DEFAULT_STYLE = _core_.DD_DEFAULT_STYLE
295 MENU_TEAROFF = _core_.MENU_TEAROFF
296 MB_DOCKABLE = _core_.MB_DOCKABLE
297 NO_FULL_REPAINT_ON_RESIZE = _core_.NO_FULL_REPAINT_ON_RESIZE
298 FULL_REPAINT_ON_RESIZE = _core_.FULL_REPAINT_ON_RESIZE
299 LI_HORIZONTAL = _core_.LI_HORIZONTAL
300 LI_VERTICAL = _core_.LI_VERTICAL
301 WS_EX_VALIDATE_RECURSIVELY = _core_.WS_EX_VALIDATE_RECURSIVELY
302 WS_EX_BLOCK_EVENTS = _core_.WS_EX_BLOCK_EVENTS
303 WS_EX_TRANSIENT = _core_.WS_EX_TRANSIENT
304 WS_EX_THEMED_BACKGROUND = _core_.WS_EX_THEMED_BACKGROUND
305 WS_EX_PROCESS_IDLE = _core_.WS_EX_PROCESS_IDLE
306 WS_EX_PROCESS_UI_UPDATES = _core_.WS_EX_PROCESS_UI_UPDATES
307 MM_TEXT = _core_.MM_TEXT
308 MM_LOMETRIC = _core_.MM_LOMETRIC
309 MM_HIMETRIC = _core_.MM_HIMETRIC
310 MM_LOENGLISH = _core_.MM_LOENGLISH
311 MM_HIENGLISH = _core_.MM_HIENGLISH
312 MM_TWIPS = _core_.MM_TWIPS
313 MM_ISOTROPIC = _core_.MM_ISOTROPIC
314 MM_ANISOTROPIC = _core_.MM_ANISOTROPIC
315 MM_POINTS = _core_.MM_POINTS
316 MM_METRIC = _core_.MM_METRIC
317 CENTRE = _core_.CENTRE
318 CENTER = _core_.CENTER
319 HORIZONTAL = _core_.HORIZONTAL
320 VERTICAL = _core_.VERTICAL
321 BOTH = _core_.BOTH
322 LEFT = _core_.LEFT
323 RIGHT = _core_.RIGHT
324 UP = _core_.UP
325 DOWN = _core_.DOWN
326 TOP = _core_.TOP
327 BOTTOM = _core_.BOTTOM
328 NORTH = _core_.NORTH
329 SOUTH = _core_.SOUTH
330 WEST = _core_.WEST
331 EAST = _core_.EAST
332 ALL = _core_.ALL
333 ALIGN_NOT = _core_.ALIGN_NOT
334 ALIGN_CENTER_HORIZONTAL = _core_.ALIGN_CENTER_HORIZONTAL
335 ALIGN_CENTRE_HORIZONTAL = _core_.ALIGN_CENTRE_HORIZONTAL
336 ALIGN_LEFT = _core_.ALIGN_LEFT
337 ALIGN_TOP = _core_.ALIGN_TOP
338 ALIGN_RIGHT = _core_.ALIGN_RIGHT
339 ALIGN_BOTTOM = _core_.ALIGN_BOTTOM
340 ALIGN_CENTER_VERTICAL = _core_.ALIGN_CENTER_VERTICAL
341 ALIGN_CENTRE_VERTICAL = _core_.ALIGN_CENTRE_VERTICAL
342 ALIGN_CENTER = _core_.ALIGN_CENTER
343 ALIGN_CENTRE = _core_.ALIGN_CENTRE
344 ALIGN_MASK = _core_.ALIGN_MASK
345 STRETCH_NOT = _core_.STRETCH_NOT
346 SHRINK = _core_.SHRINK
347 GROW = _core_.GROW
348 EXPAND = _core_.EXPAND
349 SHAPED = _core_.SHAPED
350 FIXED_MINSIZE = _core_.FIXED_MINSIZE
351 TILE = _core_.TILE
352 ADJUST_MINSIZE = _core_.ADJUST_MINSIZE
353 BORDER_DEFAULT = _core_.BORDER_DEFAULT
354 BORDER_NONE = _core_.BORDER_NONE
355 BORDER_STATIC = _core_.BORDER_STATIC
356 BORDER_SIMPLE = _core_.BORDER_SIMPLE
357 BORDER_RAISED = _core_.BORDER_RAISED
358 BORDER_SUNKEN = _core_.BORDER_SUNKEN
359 BORDER_DOUBLE = _core_.BORDER_DOUBLE
360 BORDER_MASK = _core_.BORDER_MASK
361 BG_STYLE_SYSTEM = _core_.BG_STYLE_SYSTEM
362 BG_STYLE_COLOUR = _core_.BG_STYLE_COLOUR
363 BG_STYLE_CUSTOM = _core_.BG_STYLE_CUSTOM
364 DEFAULT = _core_.DEFAULT
365 DECORATIVE = _core_.DECORATIVE
366 ROMAN = _core_.ROMAN
367 SCRIPT = _core_.SCRIPT
368 SWISS = _core_.SWISS
369 MODERN = _core_.MODERN
370 TELETYPE = _core_.TELETYPE
371 VARIABLE = _core_.VARIABLE
372 FIXED = _core_.FIXED
373 NORMAL = _core_.NORMAL
374 LIGHT = _core_.LIGHT
375 BOLD = _core_.BOLD
376 ITALIC = _core_.ITALIC
377 SLANT = _core_.SLANT
378 SOLID = _core_.SOLID
379 DOT = _core_.DOT
380 LONG_DASH = _core_.LONG_DASH
381 SHORT_DASH = _core_.SHORT_DASH
382 DOT_DASH = _core_.DOT_DASH
383 USER_DASH = _core_.USER_DASH
384 TRANSPARENT = _core_.TRANSPARENT
385 STIPPLE = _core_.STIPPLE
386 BDIAGONAL_HATCH = _core_.BDIAGONAL_HATCH
387 CROSSDIAG_HATCH = _core_.CROSSDIAG_HATCH
388 FDIAGONAL_HATCH = _core_.FDIAGONAL_HATCH
389 CROSS_HATCH = _core_.CROSS_HATCH
390 HORIZONTAL_HATCH = _core_.HORIZONTAL_HATCH
391 VERTICAL_HATCH = _core_.VERTICAL_HATCH
392 JOIN_BEVEL = _core_.JOIN_BEVEL
393 JOIN_MITER = _core_.JOIN_MITER
394 JOIN_ROUND = _core_.JOIN_ROUND
395 CAP_ROUND = _core_.CAP_ROUND
396 CAP_PROJECTING = _core_.CAP_PROJECTING
397 CAP_BUTT = _core_.CAP_BUTT
398 CLEAR = _core_.CLEAR
399 XOR = _core_.XOR
400 INVERT = _core_.INVERT
401 OR_REVERSE = _core_.OR_REVERSE
402 AND_REVERSE = _core_.AND_REVERSE
403 COPY = _core_.COPY
404 AND = _core_.AND
405 AND_INVERT = _core_.AND_INVERT
406 NO_OP = _core_.NO_OP
407 NOR = _core_.NOR
408 EQUIV = _core_.EQUIV
409 SRC_INVERT = _core_.SRC_INVERT
410 OR_INVERT = _core_.OR_INVERT
411 NAND = _core_.NAND
412 OR = _core_.OR
413 SET = _core_.SET
414 WXK_BACK = _core_.WXK_BACK
415 WXK_TAB = _core_.WXK_TAB
416 WXK_RETURN = _core_.WXK_RETURN
417 WXK_ESCAPE = _core_.WXK_ESCAPE
418 WXK_SPACE = _core_.WXK_SPACE
419 WXK_DELETE = _core_.WXK_DELETE
420 WXK_START = _core_.WXK_START
421 WXK_LBUTTON = _core_.WXK_LBUTTON
422 WXK_RBUTTON = _core_.WXK_RBUTTON
423 WXK_CANCEL = _core_.WXK_CANCEL
424 WXK_MBUTTON = _core_.WXK_MBUTTON
425 WXK_CLEAR = _core_.WXK_CLEAR
426 WXK_SHIFT = _core_.WXK_SHIFT
427 WXK_ALT = _core_.WXK_ALT
428 WXK_CONTROL = _core_.WXK_CONTROL
429 WXK_MENU = _core_.WXK_MENU
430 WXK_PAUSE = _core_.WXK_PAUSE
431 WXK_CAPITAL = _core_.WXK_CAPITAL
432 WXK_PRIOR = _core_.WXK_PRIOR
433 WXK_NEXT = _core_.WXK_NEXT
434 WXK_END = _core_.WXK_END
435 WXK_HOME = _core_.WXK_HOME
436 WXK_LEFT = _core_.WXK_LEFT
437 WXK_UP = _core_.WXK_UP
438 WXK_RIGHT = _core_.WXK_RIGHT
439 WXK_DOWN = _core_.WXK_DOWN
440 WXK_SELECT = _core_.WXK_SELECT
441 WXK_PRINT = _core_.WXK_PRINT
442 WXK_EXECUTE = _core_.WXK_EXECUTE
443 WXK_SNAPSHOT = _core_.WXK_SNAPSHOT
444 WXK_INSERT = _core_.WXK_INSERT
445 WXK_HELP = _core_.WXK_HELP
446 WXK_NUMPAD0 = _core_.WXK_NUMPAD0
447 WXK_NUMPAD1 = _core_.WXK_NUMPAD1
448 WXK_NUMPAD2 = _core_.WXK_NUMPAD2
449 WXK_NUMPAD3 = _core_.WXK_NUMPAD3
450 WXK_NUMPAD4 = _core_.WXK_NUMPAD4
451 WXK_NUMPAD5 = _core_.WXK_NUMPAD5
452 WXK_NUMPAD6 = _core_.WXK_NUMPAD6
453 WXK_NUMPAD7 = _core_.WXK_NUMPAD7
454 WXK_NUMPAD8 = _core_.WXK_NUMPAD8
455 WXK_NUMPAD9 = _core_.WXK_NUMPAD9
456 WXK_MULTIPLY = _core_.WXK_MULTIPLY
457 WXK_ADD = _core_.WXK_ADD
458 WXK_SEPARATOR = _core_.WXK_SEPARATOR
459 WXK_SUBTRACT = _core_.WXK_SUBTRACT
460 WXK_DECIMAL = _core_.WXK_DECIMAL
461 WXK_DIVIDE = _core_.WXK_DIVIDE
462 WXK_F1 = _core_.WXK_F1
463 WXK_F2 = _core_.WXK_F2
464 WXK_F3 = _core_.WXK_F3
465 WXK_F4 = _core_.WXK_F4
466 WXK_F5 = _core_.WXK_F5
467 WXK_F6 = _core_.WXK_F6
468 WXK_F7 = _core_.WXK_F7
469 WXK_F8 = _core_.WXK_F8
470 WXK_F9 = _core_.WXK_F9
471 WXK_F10 = _core_.WXK_F10
472 WXK_F11 = _core_.WXK_F11
473 WXK_F12 = _core_.WXK_F12
474 WXK_F13 = _core_.WXK_F13
475 WXK_F14 = _core_.WXK_F14
476 WXK_F15 = _core_.WXK_F15
477 WXK_F16 = _core_.WXK_F16
478 WXK_F17 = _core_.WXK_F17
479 WXK_F18 = _core_.WXK_F18
480 WXK_F19 = _core_.WXK_F19
481 WXK_F20 = _core_.WXK_F20
482 WXK_F21 = _core_.WXK_F21
483 WXK_F22 = _core_.WXK_F22
484 WXK_F23 = _core_.WXK_F23
485 WXK_F24 = _core_.WXK_F24
486 WXK_NUMLOCK = _core_.WXK_NUMLOCK
487 WXK_SCROLL = _core_.WXK_SCROLL
488 WXK_PAGEUP = _core_.WXK_PAGEUP
489 WXK_PAGEDOWN = _core_.WXK_PAGEDOWN
490 WXK_NUMPAD_SPACE = _core_.WXK_NUMPAD_SPACE
491 WXK_NUMPAD_TAB = _core_.WXK_NUMPAD_TAB
492 WXK_NUMPAD_ENTER = _core_.WXK_NUMPAD_ENTER
493 WXK_NUMPAD_F1 = _core_.WXK_NUMPAD_F1
494 WXK_NUMPAD_F2 = _core_.WXK_NUMPAD_F2
495 WXK_NUMPAD_F3 = _core_.WXK_NUMPAD_F3
496 WXK_NUMPAD_F4 = _core_.WXK_NUMPAD_F4
497 WXK_NUMPAD_HOME = _core_.WXK_NUMPAD_HOME
498 WXK_NUMPAD_LEFT = _core_.WXK_NUMPAD_LEFT
499 WXK_NUMPAD_UP = _core_.WXK_NUMPAD_UP
500 WXK_NUMPAD_RIGHT = _core_.WXK_NUMPAD_RIGHT
501 WXK_NUMPAD_DOWN = _core_.WXK_NUMPAD_DOWN
502 WXK_NUMPAD_PRIOR = _core_.WXK_NUMPAD_PRIOR
503 WXK_NUMPAD_PAGEUP = _core_.WXK_NUMPAD_PAGEUP
504 WXK_NUMPAD_NEXT = _core_.WXK_NUMPAD_NEXT
505 WXK_NUMPAD_PAGEDOWN = _core_.WXK_NUMPAD_PAGEDOWN
506 WXK_NUMPAD_END = _core_.WXK_NUMPAD_END
507 WXK_NUMPAD_BEGIN = _core_.WXK_NUMPAD_BEGIN
508 WXK_NUMPAD_INSERT = _core_.WXK_NUMPAD_INSERT
509 WXK_NUMPAD_DELETE = _core_.WXK_NUMPAD_DELETE
510 WXK_NUMPAD_EQUAL = _core_.WXK_NUMPAD_EQUAL
511 WXK_NUMPAD_MULTIPLY = _core_.WXK_NUMPAD_MULTIPLY
512 WXK_NUMPAD_ADD = _core_.WXK_NUMPAD_ADD
513 WXK_NUMPAD_SEPARATOR = _core_.WXK_NUMPAD_SEPARATOR
514 WXK_NUMPAD_SUBTRACT = _core_.WXK_NUMPAD_SUBTRACT
515 WXK_NUMPAD_DECIMAL = _core_.WXK_NUMPAD_DECIMAL
516 WXK_NUMPAD_DIVIDE = _core_.WXK_NUMPAD_DIVIDE
517 WXK_WINDOWS_LEFT = _core_.WXK_WINDOWS_LEFT
518 WXK_WINDOWS_RIGHT = _core_.WXK_WINDOWS_RIGHT
519 WXK_WINDOWS_MENU = _core_.WXK_WINDOWS_MENU
520 PAPER_NONE = _core_.PAPER_NONE
521 PAPER_LETTER = _core_.PAPER_LETTER
522 PAPER_LEGAL = _core_.PAPER_LEGAL
523 PAPER_A4 = _core_.PAPER_A4
524 PAPER_CSHEET = _core_.PAPER_CSHEET
525 PAPER_DSHEET = _core_.PAPER_DSHEET
526 PAPER_ESHEET = _core_.PAPER_ESHEET
527 PAPER_LETTERSMALL = _core_.PAPER_LETTERSMALL
528 PAPER_TABLOID = _core_.PAPER_TABLOID
529 PAPER_LEDGER = _core_.PAPER_LEDGER
530 PAPER_STATEMENT = _core_.PAPER_STATEMENT
531 PAPER_EXECUTIVE = _core_.PAPER_EXECUTIVE
532 PAPER_A3 = _core_.PAPER_A3
533 PAPER_A4SMALL = _core_.PAPER_A4SMALL
534 PAPER_A5 = _core_.PAPER_A5
535 PAPER_B4 = _core_.PAPER_B4
536 PAPER_B5 = _core_.PAPER_B5
537 PAPER_FOLIO = _core_.PAPER_FOLIO
538 PAPER_QUARTO = _core_.PAPER_QUARTO
539 PAPER_10X14 = _core_.PAPER_10X14
540 PAPER_11X17 = _core_.PAPER_11X17
541 PAPER_NOTE = _core_.PAPER_NOTE
542 PAPER_ENV_9 = _core_.PAPER_ENV_9
543 PAPER_ENV_10 = _core_.PAPER_ENV_10
544 PAPER_ENV_11 = _core_.PAPER_ENV_11
545 PAPER_ENV_12 = _core_.PAPER_ENV_12
546 PAPER_ENV_14 = _core_.PAPER_ENV_14
547 PAPER_ENV_DL = _core_.PAPER_ENV_DL
548 PAPER_ENV_C5 = _core_.PAPER_ENV_C5
549 PAPER_ENV_C3 = _core_.PAPER_ENV_C3
550 PAPER_ENV_C4 = _core_.PAPER_ENV_C4
551 PAPER_ENV_C6 = _core_.PAPER_ENV_C6
552 PAPER_ENV_C65 = _core_.PAPER_ENV_C65
553 PAPER_ENV_B4 = _core_.PAPER_ENV_B4
554 PAPER_ENV_B5 = _core_.PAPER_ENV_B5
555 PAPER_ENV_B6 = _core_.PAPER_ENV_B6
556 PAPER_ENV_ITALY = _core_.PAPER_ENV_ITALY
557 PAPER_ENV_MONARCH = _core_.PAPER_ENV_MONARCH
558 PAPER_ENV_PERSONAL = _core_.PAPER_ENV_PERSONAL
559 PAPER_FANFOLD_US = _core_.PAPER_FANFOLD_US
560 PAPER_FANFOLD_STD_GERMAN = _core_.PAPER_FANFOLD_STD_GERMAN
561 PAPER_FANFOLD_LGL_GERMAN = _core_.PAPER_FANFOLD_LGL_GERMAN
562 PAPER_ISO_B4 = _core_.PAPER_ISO_B4
563 PAPER_JAPANESE_POSTCARD = _core_.PAPER_JAPANESE_POSTCARD
564 PAPER_9X11 = _core_.PAPER_9X11
565 PAPER_10X11 = _core_.PAPER_10X11
566 PAPER_15X11 = _core_.PAPER_15X11
567 PAPER_ENV_INVITE = _core_.PAPER_ENV_INVITE
568 PAPER_LETTER_EXTRA = _core_.PAPER_LETTER_EXTRA
569 PAPER_LEGAL_EXTRA = _core_.PAPER_LEGAL_EXTRA
570 PAPER_TABLOID_EXTRA = _core_.PAPER_TABLOID_EXTRA
571 PAPER_A4_EXTRA = _core_.PAPER_A4_EXTRA
572 PAPER_LETTER_TRANSVERSE = _core_.PAPER_LETTER_TRANSVERSE
573 PAPER_A4_TRANSVERSE = _core_.PAPER_A4_TRANSVERSE
574 PAPER_LETTER_EXTRA_TRANSVERSE = _core_.PAPER_LETTER_EXTRA_TRANSVERSE
575 PAPER_A_PLUS = _core_.PAPER_A_PLUS
576 PAPER_B_PLUS = _core_.PAPER_B_PLUS
577 PAPER_LETTER_PLUS = _core_.PAPER_LETTER_PLUS
578 PAPER_A4_PLUS = _core_.PAPER_A4_PLUS
579 PAPER_A5_TRANSVERSE = _core_.PAPER_A5_TRANSVERSE
580 PAPER_B5_TRANSVERSE = _core_.PAPER_B5_TRANSVERSE
581 PAPER_A3_EXTRA = _core_.PAPER_A3_EXTRA
582 PAPER_A5_EXTRA = _core_.PAPER_A5_EXTRA
583 PAPER_B5_EXTRA = _core_.PAPER_B5_EXTRA
584 PAPER_A2 = _core_.PAPER_A2
585 PAPER_A3_TRANSVERSE = _core_.PAPER_A3_TRANSVERSE
586 PAPER_A3_EXTRA_TRANSVERSE = _core_.PAPER_A3_EXTRA_TRANSVERSE
587 DUPLEX_SIMPLEX = _core_.DUPLEX_SIMPLEX
588 DUPLEX_HORIZONTAL = _core_.DUPLEX_HORIZONTAL
589 DUPLEX_VERTICAL = _core_.DUPLEX_VERTICAL
590 ITEM_SEPARATOR = _core_.ITEM_SEPARATOR
591 ITEM_NORMAL = _core_.ITEM_NORMAL
592 ITEM_CHECK = _core_.ITEM_CHECK
593 ITEM_RADIO = _core_.ITEM_RADIO
594 ITEM_MAX = _core_.ITEM_MAX
595 HT_NOWHERE = _core_.HT_NOWHERE
596 HT_SCROLLBAR_FIRST = _core_.HT_SCROLLBAR_FIRST
597 HT_SCROLLBAR_ARROW_LINE_1 = _core_.HT_SCROLLBAR_ARROW_LINE_1
598 HT_SCROLLBAR_ARROW_LINE_2 = _core_.HT_SCROLLBAR_ARROW_LINE_2
599 HT_SCROLLBAR_ARROW_PAGE_1 = _core_.HT_SCROLLBAR_ARROW_PAGE_1
600 HT_SCROLLBAR_ARROW_PAGE_2 = _core_.HT_SCROLLBAR_ARROW_PAGE_2
601 HT_SCROLLBAR_THUMB = _core_.HT_SCROLLBAR_THUMB
602 HT_SCROLLBAR_BAR_1 = _core_.HT_SCROLLBAR_BAR_1
603 HT_SCROLLBAR_BAR_2 = _core_.HT_SCROLLBAR_BAR_2
604 HT_SCROLLBAR_LAST = _core_.HT_SCROLLBAR_LAST
605 HT_WINDOW_OUTSIDE = _core_.HT_WINDOW_OUTSIDE
606 HT_WINDOW_INSIDE = _core_.HT_WINDOW_INSIDE
607 HT_WINDOW_VERT_SCROLLBAR = _core_.HT_WINDOW_VERT_SCROLLBAR
608 HT_WINDOW_HORZ_SCROLLBAR = _core_.HT_WINDOW_HORZ_SCROLLBAR
609 HT_WINDOW_CORNER = _core_.HT_WINDOW_CORNER
610 HT_MAX = _core_.HT_MAX
611 MOD_NONE = _core_.MOD_NONE
612 MOD_ALT = _core_.MOD_ALT
613 MOD_CONTROL = _core_.MOD_CONTROL
614 MOD_SHIFT = _core_.MOD_SHIFT
615 MOD_WIN = _core_.MOD_WIN
616 UPDATE_UI_NONE = _core_.UPDATE_UI_NONE
617 UPDATE_UI_RECURSE = _core_.UPDATE_UI_RECURSE
618 UPDATE_UI_FROMIDLE = _core_.UPDATE_UI_FROMIDLE
619 #---------------------------------------------------------------------------
620
621 class Object(object):
622 """
623 The base class for most wx objects, although in wxPython not
624 much functionality is needed nor exposed.
625 """
626 def __init__(self): raise RuntimeError, "No constructor defined"
627 def __repr__(self):
628 return "<%s.%s; proxy of C++ wxObject instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
629 def GetClassName(*args, **kwargs):
630 """
631 GetClassName(self) -> String
632
633 Returns the class name of the C++ class using wxRTTI.
634 """
635 return _core_.Object_GetClassName(*args, **kwargs)
636
637 def Destroy(*args, **kwargs):
638 """
639 Destroy(self)
640
641 Deletes the C++ object this Python object is a proxy for.
642 """
643 return _core_.Object_Destroy(*args, **kwargs)
644
645
646 class ObjectPtr(Object):
647 def __init__(self, this):
648 self.this = this
649 if not hasattr(self,"thisown"): self.thisown = 0
650 self.__class__ = Object
651 _core_.Object_swigregister(ObjectPtr)
652 _wxPySetDictionary = _core_._wxPySetDictionary
653
654 _wxPyFixStockObjects = _core_._wxPyFixStockObjects
655
656 cvar = _core_.cvar
657 EmptyString = cvar.EmptyString
658
659 #---------------------------------------------------------------------------
660
661 BITMAP_TYPE_INVALID = _core_.BITMAP_TYPE_INVALID
662 BITMAP_TYPE_BMP = _core_.BITMAP_TYPE_BMP
663 BITMAP_TYPE_ICO = _core_.BITMAP_TYPE_ICO
664 BITMAP_TYPE_CUR = _core_.BITMAP_TYPE_CUR
665 BITMAP_TYPE_XBM = _core_.BITMAP_TYPE_XBM
666 BITMAP_TYPE_XBM_DATA = _core_.BITMAP_TYPE_XBM_DATA
667 BITMAP_TYPE_XPM = _core_.BITMAP_TYPE_XPM
668 BITMAP_TYPE_XPM_DATA = _core_.BITMAP_TYPE_XPM_DATA
669 BITMAP_TYPE_TIF = _core_.BITMAP_TYPE_TIF
670 BITMAP_TYPE_GIF = _core_.BITMAP_TYPE_GIF
671 BITMAP_TYPE_PNG = _core_.BITMAP_TYPE_PNG
672 BITMAP_TYPE_JPEG = _core_.BITMAP_TYPE_JPEG
673 BITMAP_TYPE_PNM = _core_.BITMAP_TYPE_PNM
674 BITMAP_TYPE_PCX = _core_.BITMAP_TYPE_PCX
675 BITMAP_TYPE_PICT = _core_.BITMAP_TYPE_PICT
676 BITMAP_TYPE_ICON = _core_.BITMAP_TYPE_ICON
677 BITMAP_TYPE_ANI = _core_.BITMAP_TYPE_ANI
678 BITMAP_TYPE_IFF = _core_.BITMAP_TYPE_IFF
679 BITMAP_TYPE_MACCURSOR = _core_.BITMAP_TYPE_MACCURSOR
680 BITMAP_TYPE_ANY = _core_.BITMAP_TYPE_ANY
681 CURSOR_NONE = _core_.CURSOR_NONE
682 CURSOR_ARROW = _core_.CURSOR_ARROW
683 CURSOR_RIGHT_ARROW = _core_.CURSOR_RIGHT_ARROW
684 CURSOR_BULLSEYE = _core_.CURSOR_BULLSEYE
685 CURSOR_CHAR = _core_.CURSOR_CHAR
686 CURSOR_CROSS = _core_.CURSOR_CROSS
687 CURSOR_HAND = _core_.CURSOR_HAND
688 CURSOR_IBEAM = _core_.CURSOR_IBEAM
689 CURSOR_LEFT_BUTTON = _core_.CURSOR_LEFT_BUTTON
690 CURSOR_MAGNIFIER = _core_.CURSOR_MAGNIFIER
691 CURSOR_MIDDLE_BUTTON = _core_.CURSOR_MIDDLE_BUTTON
692 CURSOR_NO_ENTRY = _core_.CURSOR_NO_ENTRY
693 CURSOR_PAINT_BRUSH = _core_.CURSOR_PAINT_BRUSH
694 CURSOR_PENCIL = _core_.CURSOR_PENCIL
695 CURSOR_POINT_LEFT = _core_.CURSOR_POINT_LEFT
696 CURSOR_POINT_RIGHT = _core_.CURSOR_POINT_RIGHT
697 CURSOR_QUESTION_ARROW = _core_.CURSOR_QUESTION_ARROW
698 CURSOR_RIGHT_BUTTON = _core_.CURSOR_RIGHT_BUTTON
699 CURSOR_SIZENESW = _core_.CURSOR_SIZENESW
700 CURSOR_SIZENS = _core_.CURSOR_SIZENS
701 CURSOR_SIZENWSE = _core_.CURSOR_SIZENWSE
702 CURSOR_SIZEWE = _core_.CURSOR_SIZEWE
703 CURSOR_SIZING = _core_.CURSOR_SIZING
704 CURSOR_SPRAYCAN = _core_.CURSOR_SPRAYCAN
705 CURSOR_WAIT = _core_.CURSOR_WAIT
706 CURSOR_WATCH = _core_.CURSOR_WATCH
707 CURSOR_BLANK = _core_.CURSOR_BLANK
708 CURSOR_DEFAULT = _core_.CURSOR_DEFAULT
709 CURSOR_COPY_ARROW = _core_.CURSOR_COPY_ARROW
710 CURSOR_ARROWWAIT = _core_.CURSOR_ARROWWAIT
711 CURSOR_MAX = _core_.CURSOR_MAX
712 #---------------------------------------------------------------------------
713
714 class Size(object):
715 """
716 wx.Size is a useful data structure used to represent the size of
717 something. It simply contians integer width and height
718 proprtites. In most places in wxPython where a wx.Size is
719 expected a (width, height) tuple can be used instead.
720 """
721 def __repr__(self):
722 return "<%s.%s; proxy of C++ wxSize instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
723 width = property(_core_.Size_width_get, _core_.Size_width_set)
724 height = property(_core_.Size_height_get, _core_.Size_height_set)
725 x = width; y = height
726 def __init__(self, *args, **kwargs):
727 """
728 __init__(self, int w=0, int h=0) -> Size
729
730 Creates a size object.
731 """
732 newobj = _core_.new_Size(*args, **kwargs)
733 self.this = newobj.this
734 self.thisown = 1
735 del newobj.thisown
736 def __del__(self, destroy=_core_.delete_Size):
737 """__del__(self)"""
738 try:
739 if self.thisown: destroy(self)
740 except: pass
741
742 def __eq__(*args, **kwargs):
743 """
744 __eq__(self, Size sz) -> bool
745
746 Test for equality of wx.Size objects.
747 """
748 return _core_.Size___eq__(*args, **kwargs)
749
750 def __ne__(*args, **kwargs):
751 """
752 __ne__(self, Size sz) -> bool
753
754 Test for inequality.
755 """
756 return _core_.Size___ne__(*args, **kwargs)
757
758 def __add__(*args, **kwargs):
759 """
760 __add__(self, Size sz) -> Size
761
762 Add sz's proprties to this and return the result.
763 """
764 return _core_.Size___add__(*args, **kwargs)
765
766 def __sub__(*args, **kwargs):
767 """
768 __sub__(self, Size sz) -> Size
769
770 Subtract sz's properties from this and return the result.
771 """
772 return _core_.Size___sub__(*args, **kwargs)
773
774 def IncTo(*args, **kwargs):
775 """
776 IncTo(self, Size sz)
777
778 Increments this object so that both of its dimensions are not less
779 than the corresponding dimensions of the size.
780 """
781 return _core_.Size_IncTo(*args, **kwargs)
782
783 def DecTo(*args, **kwargs):
784 """
785 DecTo(self, Size sz)
786
787 Decrements this object so that both of its dimensions are not greater
788 than the corresponding dimensions of the size.
789 """
790 return _core_.Size_DecTo(*args, **kwargs)
791
792 def Set(*args, **kwargs):
793 """
794 Set(self, int w, int h)
795
796 Set both width and height.
797 """
798 return _core_.Size_Set(*args, **kwargs)
799
800 def SetWidth(*args, **kwargs):
801 """SetWidth(self, int w)"""
802 return _core_.Size_SetWidth(*args, **kwargs)
803
804 def SetHeight(*args, **kwargs):
805 """SetHeight(self, int h)"""
806 return _core_.Size_SetHeight(*args, **kwargs)
807
808 def GetWidth(*args, **kwargs):
809 """GetWidth(self) -> int"""
810 return _core_.Size_GetWidth(*args, **kwargs)
811
812 def GetHeight(*args, **kwargs):
813 """GetHeight(self) -> int"""
814 return _core_.Size_GetHeight(*args, **kwargs)
815
816 def IsFullySpecified(*args, **kwargs):
817 """
818 IsFullySpecified(self) -> bool
819
820 Returns True if both components of the size are non-default values.
821 """
822 return _core_.Size_IsFullySpecified(*args, **kwargs)
823
824 def SetDefaults(*args, **kwargs):
825 """
826 SetDefaults(self, Size size)
827
828 Combine this size with the other one replacing the default components
829 of this object (i.e. equal to -1) with those of the other.
830 """
831 return _core_.Size_SetDefaults(*args, **kwargs)
832
833 def Get(*args, **kwargs):
834 """
835 Get() -> (width,height)
836
837 Returns the width and height properties as a tuple.
838 """
839 return _core_.Size_Get(*args, **kwargs)
840
841 asTuple = wx._deprecated(Get, "asTuple is deprecated, use `Get` instead")
842 def __str__(self): return str(self.Get())
843 def __repr__(self): return 'wx.Size'+str(self.Get())
844 def __len__(self): return len(self.Get())
845 def __getitem__(self, index): return self.Get()[index]
846 def __setitem__(self, index, val):
847 if index == 0: self.width = val
848 elif index == 1: self.height = val
849 else: raise IndexError
850 def __nonzero__(self): return self.Get() != (0,0)
851 __safe_for_unpickling__ = True
852 def __reduce__(self): return (wx.Size, self.Get())
853
854
855 class SizePtr(Size):
856 def __init__(self, this):
857 self.this = this
858 if not hasattr(self,"thisown"): self.thisown = 0
859 self.__class__ = Size
860 _core_.Size_swigregister(SizePtr)
861
862 #---------------------------------------------------------------------------
863
864 class RealPoint(object):
865 """
866 A data structure for representing a point or position with floating
867 point x and y properties. In wxPython most places that expect a
868 wx.RealPoint can also accept a (x,y) tuple.
869 """
870 def __repr__(self):
871 return "<%s.%s; proxy of C++ wxRealPoint instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
872 x = property(_core_.RealPoint_x_get, _core_.RealPoint_x_set)
873 y = property(_core_.RealPoint_y_get, _core_.RealPoint_y_set)
874 def __init__(self, *args, **kwargs):
875 """
876 __init__(self, double x=0.0, double y=0.0) -> RealPoint
877
878 Create a wx.RealPoint object
879 """
880 newobj = _core_.new_RealPoint(*args, **kwargs)
881 self.this = newobj.this
882 self.thisown = 1
883 del newobj.thisown
884 def __del__(self, destroy=_core_.delete_RealPoint):
885 """__del__(self)"""
886 try:
887 if self.thisown: destroy(self)
888 except: pass
889
890 def __eq__(*args, **kwargs):
891 """
892 __eq__(self, RealPoint pt) -> bool
893
894 Test for equality of wx.RealPoint objects.
895 """
896 return _core_.RealPoint___eq__(*args, **kwargs)
897
898 def __ne__(*args, **kwargs):
899 """
900 __ne__(self, RealPoint pt) -> bool
901
902 Test for inequality of wx.RealPoint objects.
903 """
904 return _core_.RealPoint___ne__(*args, **kwargs)
905
906 def __add__(*args, **kwargs):
907 """
908 __add__(self, RealPoint pt) -> RealPoint
909
910 Add pt's proprties to this and return the result.
911 """
912 return _core_.RealPoint___add__(*args, **kwargs)
913
914 def __sub__(*args, **kwargs):
915 """
916 __sub__(self, RealPoint pt) -> RealPoint
917
918 Subtract pt's proprties from this and return the result
919 """
920 return _core_.RealPoint___sub__(*args, **kwargs)
921
922 def Set(*args, **kwargs):
923 """
924 Set(self, double x, double y)
925
926 Set both the x and y properties
927 """
928 return _core_.RealPoint_Set(*args, **kwargs)
929
930 def Get(*args, **kwargs):
931 """
932 Get() -> (x,y)
933
934 Return the x and y properties as a tuple.
935 """
936 return _core_.RealPoint_Get(*args, **kwargs)
937
938 asTuple = wx._deprecated(Get, "asTuple is deprecated, use `Get` instead")
939 def __str__(self): return str(self.Get())
940 def __repr__(self): return 'wx.RealPoint'+str(self.Get())
941 def __len__(self): return len(self.Get())
942 def __getitem__(self, index): return self.Get()[index]
943 def __setitem__(self, index, val):
944 if index == 0: self.x = val
945 elif index == 1: self.y = val
946 else: raise IndexError
947 def __nonzero__(self): return self.Get() != (0.0, 0.0)
948 __safe_for_unpickling__ = True
949 def __reduce__(self): return (wx.RealPoint, self.Get())
950
951
952 class RealPointPtr(RealPoint):
953 def __init__(self, this):
954 self.this = this
955 if not hasattr(self,"thisown"): self.thisown = 0
956 self.__class__ = RealPoint
957 _core_.RealPoint_swigregister(RealPointPtr)
958
959 #---------------------------------------------------------------------------
960
961 class Point(object):
962 """
963 A data structure for representing a point or position with integer x
964 and y properties. Most places in wxPython that expect a wx.Point can
965 also accept a (x,y) tuple.
966 """
967 def __repr__(self):
968 return "<%s.%s; proxy of C++ wxPoint instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
969 x = property(_core_.Point_x_get, _core_.Point_x_set)
970 y = property(_core_.Point_y_get, _core_.Point_y_set)
971 def __init__(self, *args, **kwargs):
972 """
973 __init__(self, int x=0, int y=0) -> Point
974
975 Create a wx.Point object
976 """
977 newobj = _core_.new_Point(*args, **kwargs)
978 self.this = newobj.this
979 self.thisown = 1
980 del newobj.thisown
981 def __del__(self, destroy=_core_.delete_Point):
982 """__del__(self)"""
983 try:
984 if self.thisown: destroy(self)
985 except: pass
986
987 def __eq__(*args, **kwargs):
988 """
989 __eq__(self, Point pt) -> bool
990
991 Test for equality of wx.Point objects.
992 """
993 return _core_.Point___eq__(*args, **kwargs)
994
995 def __ne__(*args, **kwargs):
996 """
997 __ne__(self, Point pt) -> bool
998
999 Test for inequality of wx.Point objects.
1000 """
1001 return _core_.Point___ne__(*args, **kwargs)
1002
1003 def __add__(*args, **kwargs):
1004 """
1005 __add__(self, Point pt) -> Point
1006
1007 Add pt's proprties to this and return the result.
1008 """
1009 return _core_.Point___add__(*args, **kwargs)
1010
1011 def __sub__(*args, **kwargs):
1012 """
1013 __sub__(self, Point pt) -> Point
1014
1015 Subtract pt's proprties from this and return the result
1016 """
1017 return _core_.Point___sub__(*args, **kwargs)
1018
1019 def __iadd__(*args, **kwargs):
1020 """
1021 __iadd__(self, Point pt) -> Point
1022
1023 Add pt to this object.
1024 """
1025 return _core_.Point___iadd__(*args, **kwargs)
1026
1027 def __isub__(*args, **kwargs):
1028 """
1029 __isub__(self, Point pt) -> Point
1030
1031 Subtract pt from this object.
1032 """
1033 return _core_.Point___isub__(*args, **kwargs)
1034
1035 def Set(*args, **kwargs):
1036 """
1037 Set(self, long x, long y)
1038
1039 Set both the x and y properties
1040 """
1041 return _core_.Point_Set(*args, **kwargs)
1042
1043 def Get(*args, **kwargs):
1044 """
1045 Get() -> (x,y)
1046
1047 Return the x and y properties as a tuple.
1048 """
1049 return _core_.Point_Get(*args, **kwargs)
1050
1051 asTuple = wx._deprecated(Get, "asTuple is deprecated, use `Get` instead")
1052 def __str__(self): return str(self.Get())
1053 def __repr__(self): return 'wx.Point'+str(self.Get())
1054 def __len__(self): return len(self.Get())
1055 def __getitem__(self, index): return self.Get()[index]
1056 def __setitem__(self, index, val):
1057 if index == 0: self.x = val
1058 elif index == 1: self.y = val
1059 else: raise IndexError
1060 def __nonzero__(self): return self.Get() != (0,0)
1061 __safe_for_unpickling__ = True
1062 def __reduce__(self): return (wx.Point, self.Get())
1063
1064
1065 class PointPtr(Point):
1066 def __init__(self, this):
1067 self.this = this
1068 if not hasattr(self,"thisown"): self.thisown = 0
1069 self.__class__ = Point
1070 _core_.Point_swigregister(PointPtr)
1071
1072 #---------------------------------------------------------------------------
1073
1074 class Rect(object):
1075 """
1076 A class for representing and manipulating rectangles. It has x, y,
1077 width and height properties. In wxPython most palces that expect a
1078 wx.Rect can also accept a (x,y,width,height) tuple.
1079 """
1080 def __repr__(self):
1081 return "<%s.%s; proxy of C++ wxRect instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
1082 def __init__(self, *args, **kwargs):
1083 """
1084 __init__(self, int x=0, int y=0, int width=0, int height=0) -> Rect
1085
1086 Create a new Rect object.
1087 """
1088 newobj = _core_.new_Rect(*args, **kwargs)
1089 self.this = newobj.this
1090 self.thisown = 1
1091 del newobj.thisown
1092 def __del__(self, destroy=_core_.delete_Rect):
1093 """__del__(self)"""
1094 try:
1095 if self.thisown: destroy(self)
1096 except: pass
1097
1098 def GetX(*args, **kwargs):
1099 """GetX(self) -> int"""
1100 return _core_.Rect_GetX(*args, **kwargs)
1101
1102 def SetX(*args, **kwargs):
1103 """SetX(self, int x)"""
1104 return _core_.Rect_SetX(*args, **kwargs)
1105
1106 def GetY(*args, **kwargs):
1107 """GetY(self) -> int"""
1108 return _core_.Rect_GetY(*args, **kwargs)
1109
1110 def SetY(*args, **kwargs):
1111 """SetY(self, int y)"""
1112 return _core_.Rect_SetY(*args, **kwargs)
1113
1114 def GetWidth(*args, **kwargs):
1115 """GetWidth(self) -> int"""
1116 return _core_.Rect_GetWidth(*args, **kwargs)
1117
1118 def SetWidth(*args, **kwargs):
1119 """SetWidth(self, int w)"""
1120 return _core_.Rect_SetWidth(*args, **kwargs)
1121
1122 def GetHeight(*args, **kwargs):
1123 """GetHeight(self) -> int"""
1124 return _core_.Rect_GetHeight(*args, **kwargs)
1125
1126 def SetHeight(*args, **kwargs):
1127 """SetHeight(self, int h)"""
1128 return _core_.Rect_SetHeight(*args, **kwargs)
1129
1130 def GetPosition(*args, **kwargs):
1131 """GetPosition(self) -> Point"""
1132 return _core_.Rect_GetPosition(*args, **kwargs)
1133
1134 def SetPosition(*args, **kwargs):
1135 """SetPosition(self, Point p)"""
1136 return _core_.Rect_SetPosition(*args, **kwargs)
1137
1138 def GetSize(*args, **kwargs):
1139 """GetSize(self) -> Size"""
1140 return _core_.Rect_GetSize(*args, **kwargs)
1141
1142 def SetSize(*args, **kwargs):
1143 """SetSize(self, Size s)"""
1144 return _core_.Rect_SetSize(*args, **kwargs)
1145
1146 def GetTopLeft(*args, **kwargs):
1147 """GetTopLeft(self) -> Point"""
1148 return _core_.Rect_GetTopLeft(*args, **kwargs)
1149
1150 def SetTopLeft(*args, **kwargs):
1151 """SetTopLeft(self, Point p)"""
1152 return _core_.Rect_SetTopLeft(*args, **kwargs)
1153
1154 def GetBottomRight(*args, **kwargs):
1155 """GetBottomRight(self) -> Point"""
1156 return _core_.Rect_GetBottomRight(*args, **kwargs)
1157
1158 def SetBottomRight(*args, **kwargs):
1159 """SetBottomRight(self, Point p)"""
1160 return _core_.Rect_SetBottomRight(*args, **kwargs)
1161
1162 def GetLeft(*args, **kwargs):
1163 """GetLeft(self) -> int"""
1164 return _core_.Rect_GetLeft(*args, **kwargs)
1165
1166 def GetTop(*args, **kwargs):
1167 """GetTop(self) -> int"""
1168 return _core_.Rect_GetTop(*args, **kwargs)
1169
1170 def GetBottom(*args, **kwargs):
1171 """GetBottom(self) -> int"""
1172 return _core_.Rect_GetBottom(*args, **kwargs)
1173
1174 def GetRight(*args, **kwargs):
1175 """GetRight(self) -> int"""
1176 return _core_.Rect_GetRight(*args, **kwargs)
1177
1178 def SetLeft(*args, **kwargs):
1179 """SetLeft(self, int left)"""
1180 return _core_.Rect_SetLeft(*args, **kwargs)
1181
1182 def SetRight(*args, **kwargs):
1183 """SetRight(self, int right)"""
1184 return _core_.Rect_SetRight(*args, **kwargs)
1185
1186 def SetTop(*args, **kwargs):
1187 """SetTop(self, int top)"""
1188 return _core_.Rect_SetTop(*args, **kwargs)
1189
1190 def SetBottom(*args, **kwargs):
1191 """SetBottom(self, int bottom)"""
1192 return _core_.Rect_SetBottom(*args, **kwargs)
1193
1194 position = property(GetPosition, SetPosition)
1195 size = property(GetSize, SetSize)
1196 left = property(GetLeft, SetLeft)
1197 right = property(GetRight, SetRight)
1198 top = property(GetTop, SetTop)
1199 bottom = property(GetBottom, SetBottom)
1200
1201 def Inflate(*args, **kwargs):
1202 """
1203 Inflate(self, int dx, int dy) -> Rect
1204
1205 Increase the rectangle size by dx in x direction and dy in y
1206 direction. Both (or one of) parameters may be negative to decrease the
1207 rectangle size.
1208 """
1209 return _core_.Rect_Inflate(*args, **kwargs)
1210
1211 def Deflate(*args, **kwargs):
1212 """
1213 Deflate(self, int dx, int dy) -> Rect
1214
1215 Decrease the rectangle size by dx in x direction and dy in y
1216 direction. Both (or one of) parameters may be negative to increase the
1217 rectngle size. This method is the opposite of Inflate.
1218 """
1219 return _core_.Rect_Deflate(*args, **kwargs)
1220
1221 def OffsetXY(*args, **kwargs):
1222 """
1223 OffsetXY(self, int dx, int dy)
1224
1225 Moves the rectangle by the specified offset. If dx is positive, the
1226 rectangle is moved to the right, if dy is positive, it is moved to the
1227 bottom, otherwise it is moved to the left or top respectively.
1228 """
1229 return _core_.Rect_OffsetXY(*args, **kwargs)
1230
1231 def Offset(*args, **kwargs):
1232 """
1233 Offset(self, Point pt)
1234
1235 Same as OffsetXY but uses dx,dy from Point
1236 """
1237 return _core_.Rect_Offset(*args, **kwargs)
1238
1239 def Intersect(*args, **kwargs):
1240 """
1241 Intersect(self, Rect rect) -> Rect
1242
1243 Returns the intersectsion of this rectangle and rect.
1244 """
1245 return _core_.Rect_Intersect(*args, **kwargs)
1246
1247 def Union(*args, **kwargs):
1248 """
1249 Union(self, Rect rect) -> Rect
1250
1251 Returns the union of this rectangle and rect.
1252 """
1253 return _core_.Rect_Union(*args, **kwargs)
1254
1255 def __add__(*args, **kwargs):
1256 """
1257 __add__(self, Rect rect) -> Rect
1258
1259 Add the properties of rect to this rectangle and return the result.
1260 """
1261 return _core_.Rect___add__(*args, **kwargs)
1262
1263 def __iadd__(*args, **kwargs):
1264 """
1265 __iadd__(self, Rect rect) -> Rect
1266
1267 Add the properties of rect to this rectangle, updating this rectangle.
1268 """
1269 return _core_.Rect___iadd__(*args, **kwargs)
1270
1271 def __eq__(*args, **kwargs):
1272 """
1273 __eq__(self, Rect rect) -> bool
1274
1275 Test for equality.
1276 """
1277 return _core_.Rect___eq__(*args, **kwargs)
1278
1279 def __ne__(*args, **kwargs):
1280 """
1281 __ne__(self, Rect rect) -> bool
1282
1283 Test for inequality.
1284 """
1285 return _core_.Rect___ne__(*args, **kwargs)
1286
1287 def InsideXY(*args, **kwargs):
1288 """
1289 InsideXY(self, int x, int y) -> bool
1290
1291 Return True if the point is (not strcitly) inside the rect.
1292 """
1293 return _core_.Rect_InsideXY(*args, **kwargs)
1294
1295 def Inside(*args, **kwargs):
1296 """
1297 Inside(self, Point pt) -> bool
1298
1299 Return True if the point is (not strcitly) inside the rect.
1300 """
1301 return _core_.Rect_Inside(*args, **kwargs)
1302
1303 def Intersects(*args, **kwargs):
1304 """
1305 Intersects(self, Rect rect) -> bool
1306
1307 Returns True if the rectangles have a non empty intersection.
1308 """
1309 return _core_.Rect_Intersects(*args, **kwargs)
1310
1311 x = property(_core_.Rect_x_get, _core_.Rect_x_set)
1312 y = property(_core_.Rect_y_get, _core_.Rect_y_set)
1313 width = property(_core_.Rect_width_get, _core_.Rect_width_set)
1314 height = property(_core_.Rect_height_get, _core_.Rect_height_set)
1315 def Set(*args, **kwargs):
1316 """
1317 Set(self, int x=0, int y=0, int width=0, int height=0)
1318
1319 Set all rectangle properties.
1320 """
1321 return _core_.Rect_Set(*args, **kwargs)
1322
1323 def Get(*args, **kwargs):
1324 """
1325 Get() -> (x,y,width,height)
1326
1327 Return the rectangle properties as a tuple.
1328 """
1329 return _core_.Rect_Get(*args, **kwargs)
1330
1331 asTuple = wx._deprecated(Get, "asTuple is deprecated, use `Get` instead")
1332 def __str__(self): return str(self.Get())
1333 def __repr__(self): return 'wx.Rect'+str(self.Get())
1334 def __len__(self): return len(self.Get())
1335 def __getitem__(self, index): return self.Get()[index]
1336 def __setitem__(self, index, val):
1337 if index == 0: self.x = val
1338 elif index == 1: self.y = val
1339 elif index == 2: self.width = val
1340 elif index == 3: self.height = val
1341 else: raise IndexError
1342 def __nonzero__(self): return self.Get() != (0,0,0,0)
1343 __safe_for_unpickling__ = True
1344 def __reduce__(self): return (wx.Rect, self.Get())
1345
1346
1347 class RectPtr(Rect):
1348 def __init__(self, this):
1349 self.this = this
1350 if not hasattr(self,"thisown"): self.thisown = 0
1351 self.__class__ = Rect
1352 _core_.Rect_swigregister(RectPtr)
1353
1354 def RectPP(*args, **kwargs):
1355 """
1356 RectPP(Point topLeft, Point bottomRight) -> Rect
1357
1358 Create a new Rect object from Points representing two corners.
1359 """
1360 val = _core_.new_RectPP(*args, **kwargs)
1361 val.thisown = 1
1362 return val
1363
1364 def RectPS(*args, **kwargs):
1365 """
1366 RectPS(Point pos, Size size) -> Rect
1367
1368 Create a new Rect from a position and size.
1369 """
1370 val = _core_.new_RectPS(*args, **kwargs)
1371 val.thisown = 1
1372 return val
1373
1374 def RectS(*args, **kwargs):
1375 """
1376 RectS(Size size) -> Rect
1377
1378 Create a new Rect from a size only.
1379 """
1380 val = _core_.new_RectS(*args, **kwargs)
1381 val.thisown = 1
1382 return val
1383
1384
1385 def IntersectRect(*args, **kwargs):
1386 """
1387 IntersectRect(Rect r1, Rect r2) -> Rect
1388
1389 Calculate and return the intersection of r1 and r2.
1390 """
1391 return _core_.IntersectRect(*args, **kwargs)
1392 #---------------------------------------------------------------------------
1393
1394 class Point2D(object):
1395 """
1396 wx.Point2Ds represent a point or a vector in a 2d coordinate system
1397 with floating point values.
1398 """
1399 def __repr__(self):
1400 return "<%s.%s; proxy of C++ wxPoint2D instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
1401 def __init__(self, *args, **kwargs):
1402 """
1403 __init__(self, double x=0.0, double y=0.0) -> Point2D
1404
1405 Create a w.Point2D object.
1406 """
1407 newobj = _core_.new_Point2D(*args, **kwargs)
1408 self.this = newobj.this
1409 self.thisown = 1
1410 del newobj.thisown
1411 def GetFloor(*args, **kwargs):
1412 """
1413 GetFloor() -> (x,y)
1414
1415 Convert to integer
1416 """
1417 return _core_.Point2D_GetFloor(*args, **kwargs)
1418
1419 def GetRounded(*args, **kwargs):
1420 """
1421 GetRounded() -> (x,y)
1422
1423 Convert to integer
1424 """
1425 return _core_.Point2D_GetRounded(*args, **kwargs)
1426
1427 def GetVectorLength(*args, **kwargs):
1428 """GetVectorLength(self) -> double"""
1429 return _core_.Point2D_GetVectorLength(*args, **kwargs)
1430
1431 def GetVectorAngle(*args, **kwargs):
1432 """GetVectorAngle(self) -> double"""
1433 return _core_.Point2D_GetVectorAngle(*args, **kwargs)
1434
1435 def SetVectorLength(*args, **kwargs):
1436 """SetVectorLength(self, double length)"""
1437 return _core_.Point2D_SetVectorLength(*args, **kwargs)
1438
1439 def SetVectorAngle(*args, **kwargs):
1440 """SetVectorAngle(self, double degrees)"""
1441 return _core_.Point2D_SetVectorAngle(*args, **kwargs)
1442
1443 def SetPolarCoordinates(self, angle, length):
1444 self.SetVectorLength(length)
1445 self.SetVectorAngle(angle)
1446 def Normalize(self):
1447 self.SetVectorLength(1.0)
1448
1449 def GetDistance(*args, **kwargs):
1450 """GetDistance(self, Point2D pt) -> double"""
1451 return _core_.Point2D_GetDistance(*args, **kwargs)
1452
1453 def GetDistanceSquare(*args, **kwargs):
1454 """GetDistanceSquare(self, Point2D pt) -> double"""
1455 return _core_.Point2D_GetDistanceSquare(*args, **kwargs)
1456
1457 def GetDotProduct(*args, **kwargs):
1458 """GetDotProduct(self, Point2D vec) -> double"""
1459 return _core_.Point2D_GetDotProduct(*args, **kwargs)
1460
1461 def GetCrossProduct(*args, **kwargs):
1462 """GetCrossProduct(self, Point2D vec) -> double"""
1463 return _core_.Point2D_GetCrossProduct(*args, **kwargs)
1464
1465 def __neg__(*args, **kwargs):
1466 """
1467 __neg__(self) -> Point2D
1468
1469 the reflection of this point
1470 """
1471 return _core_.Point2D___neg__(*args, **kwargs)
1472
1473 def __iadd__(*args, **kwargs):
1474 """__iadd__(self, Point2D pt) -> Point2D"""
1475 return _core_.Point2D___iadd__(*args, **kwargs)
1476
1477 def __isub__(*args, **kwargs):
1478 """__isub__(self, Point2D pt) -> Point2D"""
1479 return _core_.Point2D___isub__(*args, **kwargs)
1480
1481 def __imul__(*args, **kwargs):
1482 """__imul__(self, Point2D pt) -> Point2D"""
1483 return _core_.Point2D___imul__(*args, **kwargs)
1484
1485 def __idiv__(*args, **kwargs):
1486 """__idiv__(self, Point2D pt) -> Point2D"""
1487 return _core_.Point2D___idiv__(*args, **kwargs)
1488
1489 def __eq__(*args, **kwargs):
1490 """
1491 __eq__(self, Point2D pt) -> bool
1492
1493 Test for equality
1494 """
1495 return _core_.Point2D___eq__(*args, **kwargs)
1496
1497 def __ne__(*args, **kwargs):
1498 """
1499 __ne__(self, Point2D pt) -> bool
1500
1501 Test for inequality
1502 """
1503 return _core_.Point2D___ne__(*args, **kwargs)
1504
1505 x = property(_core_.Point2D_x_get, _core_.Point2D_x_set)
1506 y = property(_core_.Point2D_y_get, _core_.Point2D_y_set)
1507 def Set(*args, **kwargs):
1508 """Set(self, double x=0, double y=0)"""
1509 return _core_.Point2D_Set(*args, **kwargs)
1510
1511 def Get(*args, **kwargs):
1512 """
1513 Get() -> (x,y)
1514
1515 Return x and y properties as a tuple.
1516 """
1517 return _core_.Point2D_Get(*args, **kwargs)
1518
1519 asTuple = wx._deprecated(Get, "asTuple is deprecated, use `Get` instead")
1520 def __str__(self): return str(self.Get())
1521 def __repr__(self): return 'wx.Point2D'+str(self.Get())
1522 def __len__(self): return len(self.Get())
1523 def __getitem__(self, index): return self.Get()[index]
1524 def __setitem__(self, index, val):
1525 if index == 0: self.x = val
1526 elif index == 1: self.y = val
1527 else: raise IndexError
1528 def __nonzero__(self): return self.Get() != (0.0, 0.0)
1529 __safe_for_unpickling__ = True
1530 def __reduce__(self): return (wx.Point2D, self.Get())
1531
1532
1533 class Point2DPtr(Point2D):
1534 def __init__(self, this):
1535 self.this = this
1536 if not hasattr(self,"thisown"): self.thisown = 0
1537 self.__class__ = Point2D
1538 _core_.Point2D_swigregister(Point2DPtr)
1539
1540 def Point2DCopy(*args, **kwargs):
1541 """
1542 Point2DCopy(Point2D pt) -> Point2D
1543
1544 Create a w.Point2D object.
1545 """
1546 val = _core_.new_Point2DCopy(*args, **kwargs)
1547 val.thisown = 1
1548 return val
1549
1550 def Point2DFromPoint(*args, **kwargs):
1551 """
1552 Point2DFromPoint(Point pt) -> Point2D
1553
1554 Create a w.Point2D object.
1555 """
1556 val = _core_.new_Point2DFromPoint(*args, **kwargs)
1557 val.thisown = 1
1558 return val
1559
1560 #---------------------------------------------------------------------------
1561
1562 FromStart = _core_.FromStart
1563 FromCurrent = _core_.FromCurrent
1564 FromEnd = _core_.FromEnd
1565 class InputStream(object):
1566 """Proxy of C++ InputStream class"""
1567 def __repr__(self):
1568 return "<%s.%s; proxy of C++ wxPyInputStream instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
1569 def __init__(self, *args, **kwargs):
1570 """__init__(self, PyObject p) -> InputStream"""
1571 newobj = _core_.new_InputStream(*args, **kwargs)
1572 self.this = newobj.this
1573 self.thisown = 1
1574 del newobj.thisown
1575 def __del__(self, destroy=_core_.delete_InputStream):
1576 """__del__(self)"""
1577 try:
1578 if self.thisown: destroy(self)
1579 except: pass
1580
1581 def close(*args, **kwargs):
1582 """close(self)"""
1583 return _core_.InputStream_close(*args, **kwargs)
1584
1585 def flush(*args, **kwargs):
1586 """flush(self)"""
1587 return _core_.InputStream_flush(*args, **kwargs)
1588
1589 def eof(*args, **kwargs):
1590 """eof(self) -> bool"""
1591 return _core_.InputStream_eof(*args, **kwargs)
1592
1593 def read(*args, **kwargs):
1594 """read(self, int size=-1) -> PyObject"""
1595 return _core_.InputStream_read(*args, **kwargs)
1596
1597 def readline(*args, **kwargs):
1598 """readline(self, int size=-1) -> PyObject"""
1599 return _core_.InputStream_readline(*args, **kwargs)
1600
1601 def readlines(*args, **kwargs):
1602 """readlines(self, int sizehint=-1) -> PyObject"""
1603 return _core_.InputStream_readlines(*args, **kwargs)
1604
1605 def seek(*args, **kwargs):
1606 """seek(self, int offset, int whence=0)"""
1607 return _core_.InputStream_seek(*args, **kwargs)
1608
1609 def tell(*args, **kwargs):
1610 """tell(self) -> int"""
1611 return _core_.InputStream_tell(*args, **kwargs)
1612
1613 def Peek(*args, **kwargs):
1614 """Peek(self) -> char"""
1615 return _core_.InputStream_Peek(*args, **kwargs)
1616
1617 def GetC(*args, **kwargs):
1618 """GetC(self) -> char"""
1619 return _core_.InputStream_GetC(*args, **kwargs)
1620
1621 def LastRead(*args, **kwargs):
1622 """LastRead(self) -> size_t"""
1623 return _core_.InputStream_LastRead(*args, **kwargs)
1624
1625 def CanRead(*args, **kwargs):
1626 """CanRead(self) -> bool"""
1627 return _core_.InputStream_CanRead(*args, **kwargs)
1628
1629 def Eof(*args, **kwargs):
1630 """Eof(self) -> bool"""
1631 return _core_.InputStream_Eof(*args, **kwargs)
1632
1633 def Ungetch(*args, **kwargs):
1634 """Ungetch(self, char c) -> bool"""
1635 return _core_.InputStream_Ungetch(*args, **kwargs)
1636
1637 def SeekI(*args, **kwargs):
1638 """SeekI(self, long pos, int mode=FromStart) -> long"""
1639 return _core_.InputStream_SeekI(*args, **kwargs)
1640
1641 def TellI(*args, **kwargs):
1642 """TellI(self) -> long"""
1643 return _core_.InputStream_TellI(*args, **kwargs)
1644
1645
1646 class InputStreamPtr(InputStream):
1647 def __init__(self, this):
1648 self.this = this
1649 if not hasattr(self,"thisown"): self.thisown = 0
1650 self.__class__ = InputStream
1651 _core_.InputStream_swigregister(InputStreamPtr)
1652 DefaultPosition = cvar.DefaultPosition
1653 DefaultSize = cvar.DefaultSize
1654
1655 class OutputStream(object):
1656 """Proxy of C++ OutputStream class"""
1657 def __init__(self): raise RuntimeError, "No constructor defined"
1658 def __repr__(self):
1659 return "<%s.%s; proxy of C++ wxOutputStream instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
1660 def write(*args, **kwargs):
1661 """write(self, PyObject obj)"""
1662 return _core_.OutputStream_write(*args, **kwargs)
1663
1664
1665 class OutputStreamPtr(OutputStream):
1666 def __init__(self, this):
1667 self.this = this
1668 if not hasattr(self,"thisown"): self.thisown = 0
1669 self.__class__ = OutputStream
1670 _core_.OutputStream_swigregister(OutputStreamPtr)
1671
1672 #---------------------------------------------------------------------------
1673
1674 class FSFile(Object):
1675 """Proxy of C++ FSFile class"""
1676 def __repr__(self):
1677 return "<%s.%s; proxy of C++ wxFSFile instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
1678 def __init__(self, *args, **kwargs):
1679 """
1680 __init__(self, InputStream stream, String loc, String mimetype, String anchor,
1681 DateTime modif) -> FSFile
1682 """
1683 newobj = _core_.new_FSFile(*args, **kwargs)
1684 self.this = newobj.this
1685 self.thisown = 1
1686 del newobj.thisown
1687 self.thisown = 0 # It will normally be deleted by the user of the wxFileSystem
1688
1689 def __del__(self, destroy=_core_.delete_FSFile):
1690 """__del__(self)"""
1691 try:
1692 if self.thisown: destroy(self)
1693 except: pass
1694
1695 def GetStream(*args, **kwargs):
1696 """GetStream(self) -> InputStream"""
1697 return _core_.FSFile_GetStream(*args, **kwargs)
1698
1699 def GetMimeType(*args, **kwargs):
1700 """GetMimeType(self) -> String"""
1701 return _core_.FSFile_GetMimeType(*args, **kwargs)
1702
1703 def GetLocation(*args, **kwargs):
1704 """GetLocation(self) -> String"""
1705 return _core_.FSFile_GetLocation(*args, **kwargs)
1706
1707 def GetAnchor(*args, **kwargs):
1708 """GetAnchor(self) -> String"""
1709 return _core_.FSFile_GetAnchor(*args, **kwargs)
1710
1711 def GetModificationTime(*args, **kwargs):
1712 """GetModificationTime(self) -> DateTime"""
1713 return _core_.FSFile_GetModificationTime(*args, **kwargs)
1714
1715
1716 class FSFilePtr(FSFile):
1717 def __init__(self, this):
1718 self.this = this
1719 if not hasattr(self,"thisown"): self.thisown = 0
1720 self.__class__ = FSFile
1721 _core_.FSFile_swigregister(FSFilePtr)
1722
1723 class CPPFileSystemHandler(object):
1724 """Proxy of C++ CPPFileSystemHandler class"""
1725 def __init__(self): raise RuntimeError, "No constructor defined"
1726 def __repr__(self):
1727 return "<%s.%s; proxy of C++ wxFileSystemHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
1728
1729 class CPPFileSystemHandlerPtr(CPPFileSystemHandler):
1730 def __init__(self, this):
1731 self.this = this
1732 if not hasattr(self,"thisown"): self.thisown = 0
1733 self.__class__ = CPPFileSystemHandler
1734 _core_.CPPFileSystemHandler_swigregister(CPPFileSystemHandlerPtr)
1735
1736 class FileSystemHandler(CPPFileSystemHandler):
1737 """Proxy of C++ FileSystemHandler class"""
1738 def __repr__(self):
1739 return "<%s.%s; proxy of C++ wxPyFileSystemHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
1740 def __init__(self, *args, **kwargs):
1741 """__init__(self) -> FileSystemHandler"""
1742 newobj = _core_.new_FileSystemHandler(*args, **kwargs)
1743 self.this = newobj.this
1744 self.thisown = 1
1745 del newobj.thisown
1746 self._setCallbackInfo(self, FileSystemHandler)
1747
1748 def _setCallbackInfo(*args, **kwargs):
1749 """_setCallbackInfo(self, PyObject self, PyObject _class)"""
1750 return _core_.FileSystemHandler__setCallbackInfo(*args, **kwargs)
1751
1752 def CanOpen(*args, **kwargs):
1753 """CanOpen(self, String location) -> bool"""
1754 return _core_.FileSystemHandler_CanOpen(*args, **kwargs)
1755
1756 def OpenFile(*args, **kwargs):
1757 """OpenFile(self, FileSystem fs, String location) -> FSFile"""
1758 return _core_.FileSystemHandler_OpenFile(*args, **kwargs)
1759
1760 def FindFirst(*args, **kwargs):
1761 """FindFirst(self, String spec, int flags=0) -> String"""
1762 return _core_.FileSystemHandler_FindFirst(*args, **kwargs)
1763
1764 def FindNext(*args, **kwargs):
1765 """FindNext(self) -> String"""
1766 return _core_.FileSystemHandler_FindNext(*args, **kwargs)
1767
1768 def GetProtocol(*args, **kwargs):
1769 """GetProtocol(self, String location) -> String"""
1770 return _core_.FileSystemHandler_GetProtocol(*args, **kwargs)
1771
1772 def GetLeftLocation(*args, **kwargs):
1773 """GetLeftLocation(self, String location) -> String"""
1774 return _core_.FileSystemHandler_GetLeftLocation(*args, **kwargs)
1775
1776 def GetAnchor(*args, **kwargs):
1777 """GetAnchor(self, String location) -> String"""
1778 return _core_.FileSystemHandler_GetAnchor(*args, **kwargs)
1779
1780 def GetRightLocation(*args, **kwargs):
1781 """GetRightLocation(self, String location) -> String"""
1782 return _core_.FileSystemHandler_GetRightLocation(*args, **kwargs)
1783
1784 def GetMimeTypeFromExt(*args, **kwargs):
1785 """GetMimeTypeFromExt(self, String location) -> String"""
1786 return _core_.FileSystemHandler_GetMimeTypeFromExt(*args, **kwargs)
1787
1788
1789 class FileSystemHandlerPtr(FileSystemHandler):
1790 def __init__(self, this):
1791 self.this = this
1792 if not hasattr(self,"thisown"): self.thisown = 0
1793 self.__class__ = FileSystemHandler
1794 _core_.FileSystemHandler_swigregister(FileSystemHandlerPtr)
1795
1796 class FileSystem(Object):
1797 """Proxy of C++ FileSystem class"""
1798 def __repr__(self):
1799 return "<%s.%s; proxy of C++ wxFileSystem instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
1800 def __init__(self, *args, **kwargs):
1801 """__init__(self) -> FileSystem"""
1802 newobj = _core_.new_FileSystem(*args, **kwargs)
1803 self.this = newobj.this
1804 self.thisown = 1
1805 del newobj.thisown
1806 def __del__(self, destroy=_core_.delete_FileSystem):
1807 """__del__(self)"""
1808 try:
1809 if self.thisown: destroy(self)
1810 except: pass
1811
1812 def ChangePathTo(*args, **kwargs):
1813 """ChangePathTo(self, String location, bool is_dir=False)"""
1814 return _core_.FileSystem_ChangePathTo(*args, **kwargs)
1815
1816 def GetPath(*args, **kwargs):
1817 """GetPath(self) -> String"""
1818 return _core_.FileSystem_GetPath(*args, **kwargs)
1819
1820 def OpenFile(*args, **kwargs):
1821 """OpenFile(self, String location) -> FSFile"""
1822 return _core_.FileSystem_OpenFile(*args, **kwargs)
1823
1824 def FindFirst(*args, **kwargs):
1825 """FindFirst(self, String spec, int flags=0) -> String"""
1826 return _core_.FileSystem_FindFirst(*args, **kwargs)
1827
1828 def FindNext(*args, **kwargs):
1829 """FindNext(self) -> String"""
1830 return _core_.FileSystem_FindNext(*args, **kwargs)
1831
1832 def AddHandler(*args, **kwargs):
1833 """AddHandler(CPPFileSystemHandler handler)"""
1834 return _core_.FileSystem_AddHandler(*args, **kwargs)
1835
1836 AddHandler = staticmethod(AddHandler)
1837 def CleanUpHandlers(*args, **kwargs):
1838 """CleanUpHandlers()"""
1839 return _core_.FileSystem_CleanUpHandlers(*args, **kwargs)
1840
1841 CleanUpHandlers = staticmethod(CleanUpHandlers)
1842 def FileNameToURL(*args, **kwargs):
1843 """FileNameToURL(String filename) -> String"""
1844 return _core_.FileSystem_FileNameToURL(*args, **kwargs)
1845
1846 FileNameToURL = staticmethod(FileNameToURL)
1847 def URLToFileName(*args, **kwargs):
1848 """URLToFileName(String url) -> String"""
1849 return _core_.FileSystem_URLToFileName(*args, **kwargs)
1850
1851 URLToFileName = staticmethod(URLToFileName)
1852
1853 class FileSystemPtr(FileSystem):
1854 def __init__(self, this):
1855 self.this = this
1856 if not hasattr(self,"thisown"): self.thisown = 0
1857 self.__class__ = FileSystem
1858 _core_.FileSystem_swigregister(FileSystemPtr)
1859
1860 def FileSystem_AddHandler(*args, **kwargs):
1861 """FileSystem_AddHandler(CPPFileSystemHandler handler)"""
1862 return _core_.FileSystem_AddHandler(*args, **kwargs)
1863
1864 def FileSystem_CleanUpHandlers(*args, **kwargs):
1865 """FileSystem_CleanUpHandlers()"""
1866 return _core_.FileSystem_CleanUpHandlers(*args, **kwargs)
1867
1868 def FileSystem_FileNameToURL(*args, **kwargs):
1869 """FileSystem_FileNameToURL(String filename) -> String"""
1870 return _core_.FileSystem_FileNameToURL(*args, **kwargs)
1871
1872 def FileSystem_URLToFileName(*args, **kwargs):
1873 """FileSystem_URLToFileName(String url) -> String"""
1874 return _core_.FileSystem_URLToFileName(*args, **kwargs)
1875
1876 class InternetFSHandler(CPPFileSystemHandler):
1877 """Proxy of C++ InternetFSHandler class"""
1878 def __repr__(self):
1879 return "<%s.%s; proxy of C++ wxInternetFSHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
1880 def __init__(self, *args, **kwargs):
1881 """__init__(self) -> InternetFSHandler"""
1882 newobj = _core_.new_InternetFSHandler(*args, **kwargs)
1883 self.this = newobj.this
1884 self.thisown = 1
1885 del newobj.thisown
1886 def CanOpen(*args, **kwargs):
1887 """CanOpen(self, String location) -> bool"""
1888 return _core_.InternetFSHandler_CanOpen(*args, **kwargs)
1889
1890 def OpenFile(*args, **kwargs):
1891 """OpenFile(self, FileSystem fs, String location) -> FSFile"""
1892 return _core_.InternetFSHandler_OpenFile(*args, **kwargs)
1893
1894
1895 class InternetFSHandlerPtr(InternetFSHandler):
1896 def __init__(self, this):
1897 self.this = this
1898 if not hasattr(self,"thisown"): self.thisown = 0
1899 self.__class__ = InternetFSHandler
1900 _core_.InternetFSHandler_swigregister(InternetFSHandlerPtr)
1901
1902 class ZipFSHandler(CPPFileSystemHandler):
1903 """Proxy of C++ ZipFSHandler class"""
1904 def __repr__(self):
1905 return "<%s.%s; proxy of C++ wxZipFSHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
1906 def __init__(self, *args, **kwargs):
1907 """__init__(self) -> ZipFSHandler"""
1908 newobj = _core_.new_ZipFSHandler(*args, **kwargs)
1909 self.this = newobj.this
1910 self.thisown = 1
1911 del newobj.thisown
1912 def CanOpen(*args, **kwargs):
1913 """CanOpen(self, String location) -> bool"""
1914 return _core_.ZipFSHandler_CanOpen(*args, **kwargs)
1915
1916 def OpenFile(*args, **kwargs):
1917 """OpenFile(self, FileSystem fs, String location) -> FSFile"""
1918 return _core_.ZipFSHandler_OpenFile(*args, **kwargs)
1919
1920 def FindFirst(*args, **kwargs):
1921 """FindFirst(self, String spec, int flags=0) -> String"""
1922 return _core_.ZipFSHandler_FindFirst(*args, **kwargs)
1923
1924 def FindNext(*args, **kwargs):
1925 """FindNext(self) -> String"""
1926 return _core_.ZipFSHandler_FindNext(*args, **kwargs)
1927
1928
1929 class ZipFSHandlerPtr(ZipFSHandler):
1930 def __init__(self, this):
1931 self.this = this
1932 if not hasattr(self,"thisown"): self.thisown = 0
1933 self.__class__ = ZipFSHandler
1934 _core_.ZipFSHandler_swigregister(ZipFSHandlerPtr)
1935
1936
1937 def __wxMemoryFSHandler_AddFile_wxImage(*args, **kwargs):
1938 """__wxMemoryFSHandler_AddFile_wxImage(String filename, Image image, long type)"""
1939 return _core_.__wxMemoryFSHandler_AddFile_wxImage(*args, **kwargs)
1940
1941 def __wxMemoryFSHandler_AddFile_wxBitmap(*args, **kwargs):
1942 """__wxMemoryFSHandler_AddFile_wxBitmap(String filename, Bitmap bitmap, long type)"""
1943 return _core_.__wxMemoryFSHandler_AddFile_wxBitmap(*args, **kwargs)
1944
1945 def __wxMemoryFSHandler_AddFile_Data(*args, **kwargs):
1946 """__wxMemoryFSHandler_AddFile_Data(String filename, PyObject data)"""
1947 return _core_.__wxMemoryFSHandler_AddFile_Data(*args, **kwargs)
1948 def MemoryFSHandler_AddFile(filename, dataItem, imgType=-1):
1949 """
1950 Add 'file' to the memory filesystem. The dataItem parameter can
1951 either be a `wx.Bitmap`, `wx.Image` or a string that can contain
1952 arbitrary data. If a bitmap or image is used then the imgType
1953 parameter should specify what kind of image file it should be
1954 written as, wx.BITMAP_TYPE_PNG, etc.
1955 """
1956 if isinstance(dataItem, wx.Image):
1957 __wxMemoryFSHandler_AddFile_wxImage(filename, dataItem, imgType)
1958 elif isinstance(dataItem, wx.Bitmap):
1959 __wxMemoryFSHandler_AddFile_wxBitmap(filename, dataItem, imgType)
1960 elif type(dataItem) == str:
1961 __wxMemoryFSHandler_AddFile_Data(filename, dataItem)
1962 else:
1963 raise TypeError, 'wx.Image, wx.Bitmap or string expected'
1964
1965 class MemoryFSHandler(CPPFileSystemHandler):
1966 """Proxy of C++ MemoryFSHandler class"""
1967 def __repr__(self):
1968 return "<%s.%s; proxy of C++ wxMemoryFSHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
1969 def __init__(self, *args, **kwargs):
1970 """__init__(self) -> MemoryFSHandler"""
1971 newobj = _core_.new_MemoryFSHandler(*args, **kwargs)
1972 self.this = newobj.this
1973 self.thisown = 1
1974 del newobj.thisown
1975 def RemoveFile(*args, **kwargs):
1976 """RemoveFile(String filename)"""
1977 return _core_.MemoryFSHandler_RemoveFile(*args, **kwargs)
1978
1979 RemoveFile = staticmethod(RemoveFile)
1980 AddFile = staticmethod(MemoryFSHandler_AddFile)
1981 def CanOpen(*args, **kwargs):
1982 """CanOpen(self, String location) -> bool"""
1983 return _core_.MemoryFSHandler_CanOpen(*args, **kwargs)
1984
1985 def OpenFile(*args, **kwargs):
1986 """OpenFile(self, FileSystem fs, String location) -> FSFile"""
1987 return _core_.MemoryFSHandler_OpenFile(*args, **kwargs)
1988
1989 def FindFirst(*args, **kwargs):
1990 """FindFirst(self, String spec, int flags=0) -> String"""
1991 return _core_.MemoryFSHandler_FindFirst(*args, **kwargs)
1992
1993 def FindNext(*args, **kwargs):
1994 """FindNext(self) -> String"""
1995 return _core_.MemoryFSHandler_FindNext(*args, **kwargs)
1996
1997
1998 class MemoryFSHandlerPtr(MemoryFSHandler):
1999 def __init__(self, this):
2000 self.this = this
2001 if not hasattr(self,"thisown"): self.thisown = 0
2002 self.__class__ = MemoryFSHandler
2003 _core_.MemoryFSHandler_swigregister(MemoryFSHandlerPtr)
2004
2005 def MemoryFSHandler_RemoveFile(*args, **kwargs):
2006 """MemoryFSHandler_RemoveFile(String filename)"""
2007 return _core_.MemoryFSHandler_RemoveFile(*args, **kwargs)
2008
2009 #---------------------------------------------------------------------------
2010
2011 class ImageHandler(Object):
2012 """Proxy of C++ ImageHandler class"""
2013 def __init__(self): raise RuntimeError, "No constructor defined"
2014 def __repr__(self):
2015 return "<%s.%s; proxy of C++ wxImageHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
2016 def GetName(*args, **kwargs):
2017 """GetName(self) -> String"""
2018 return _core_.ImageHandler_GetName(*args, **kwargs)
2019
2020 def GetExtension(*args, **kwargs):
2021 """GetExtension(self) -> String"""
2022 return _core_.ImageHandler_GetExtension(*args, **kwargs)
2023
2024 def GetType(*args, **kwargs):
2025 """GetType(self) -> long"""
2026 return _core_.ImageHandler_GetType(*args, **kwargs)
2027
2028 def GetMimeType(*args, **kwargs):
2029 """GetMimeType(self) -> String"""
2030 return _core_.ImageHandler_GetMimeType(*args, **kwargs)
2031
2032 def CanRead(*args, **kwargs):
2033 """CanRead(self, String name) -> bool"""
2034 return _core_.ImageHandler_CanRead(*args, **kwargs)
2035
2036 def SetName(*args, **kwargs):
2037 """SetName(self, String name)"""
2038 return _core_.ImageHandler_SetName(*args, **kwargs)
2039
2040 def SetExtension(*args, **kwargs):
2041 """SetExtension(self, String extension)"""
2042 return _core_.ImageHandler_SetExtension(*args, **kwargs)
2043
2044 def SetType(*args, **kwargs):
2045 """SetType(self, long type)"""
2046 return _core_.ImageHandler_SetType(*args, **kwargs)
2047
2048 def SetMimeType(*args, **kwargs):
2049 """SetMimeType(self, String mimetype)"""
2050 return _core_.ImageHandler_SetMimeType(*args, **kwargs)
2051
2052
2053 class ImageHandlerPtr(ImageHandler):
2054 def __init__(self, this):
2055 self.this = this
2056 if not hasattr(self,"thisown"): self.thisown = 0
2057 self.__class__ = ImageHandler
2058 _core_.ImageHandler_swigregister(ImageHandlerPtr)
2059
2060 class ImageHistogram(object):
2061 """Proxy of C++ ImageHistogram class"""
2062 def __repr__(self):
2063 return "<%s.%s; proxy of C++ wxImageHistogram instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
2064 def __init__(self, *args, **kwargs):
2065 """__init__(self) -> ImageHistogram"""
2066 newobj = _core_.new_ImageHistogram(*args, **kwargs)
2067 self.this = newobj.this
2068 self.thisown = 1
2069 del newobj.thisown
2070 def MakeKey(*args, **kwargs):
2071 """
2072 MakeKey(unsigned char r, unsigned char g, unsigned char b) -> unsigned long
2073
2074 Get the key in the histogram for the given RGB values
2075 """
2076 return _core_.ImageHistogram_MakeKey(*args, **kwargs)
2077
2078 MakeKey = staticmethod(MakeKey)
2079 def FindFirstUnusedColour(*args, **kwargs):
2080 """
2081 FindFirstUnusedColour(int startR=1, int startG=0, int startB=0) -> (success, r, g, b)
2082
2083 Find first colour that is not used in the image and has higher RGB
2084 values than startR, startG, startB. Returns a tuple consisting of a
2085 success flag and rgb values.
2086 """
2087 return _core_.ImageHistogram_FindFirstUnusedColour(*args, **kwargs)
2088
2089
2090 class ImageHistogramPtr(ImageHistogram):
2091 def __init__(self, this):
2092 self.this = this
2093 if not hasattr(self,"thisown"): self.thisown = 0
2094 self.__class__ = ImageHistogram
2095 _core_.ImageHistogram_swigregister(ImageHistogramPtr)
2096
2097 def ImageHistogram_MakeKey(*args, **kwargs):
2098 """
2099 ImageHistogram_MakeKey(unsigned char r, unsigned char g, unsigned char b) -> unsigned long
2100
2101 Get the key in the histogram for the given RGB values
2102 """
2103 return _core_.ImageHistogram_MakeKey(*args, **kwargs)
2104
2105 class Image(Object):
2106 """Proxy of C++ Image class"""
2107 def __repr__(self):
2108 return "<%s.%s; proxy of C++ wxImage instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
2109 def __init__(self, *args, **kwargs):
2110 """__init__(self, String name, long type=BITMAP_TYPE_ANY, int index=-1) -> Image"""
2111 newobj = _core_.new_Image(*args, **kwargs)
2112 self.this = newobj.this
2113 self.thisown = 1
2114 del newobj.thisown
2115 def __del__(self, destroy=_core_.delete_Image):
2116 """__del__(self)"""
2117 try:
2118 if self.thisown: destroy(self)
2119 except: pass
2120
2121 def Create(*args, **kwargs):
2122 """Create(self, int width, int height)"""
2123 return _core_.Image_Create(*args, **kwargs)
2124
2125 def Destroy(*args, **kwargs):
2126 """
2127 Destroy(self)
2128
2129 Deletes the C++ object this Python object is a proxy for.
2130 """
2131 return _core_.Image_Destroy(*args, **kwargs)
2132
2133 def Scale(*args, **kwargs):
2134 """Scale(self, int width, int height) -> Image"""
2135 return _core_.Image_Scale(*args, **kwargs)
2136
2137 def ShrinkBy(*args, **kwargs):
2138 """ShrinkBy(self, int xFactor, int yFactor) -> Image"""
2139 return _core_.Image_ShrinkBy(*args, **kwargs)
2140
2141 def Rescale(*args, **kwargs):
2142 """Rescale(self, int width, int height) -> Image"""
2143 return _core_.Image_Rescale(*args, **kwargs)
2144
2145 def SetRGB(*args, **kwargs):
2146 """SetRGB(self, int x, int y, unsigned char r, unsigned char g, unsigned char b)"""
2147 return _core_.Image_SetRGB(*args, **kwargs)
2148
2149 def GetRed(*args, **kwargs):
2150 """GetRed(self, int x, int y) -> unsigned char"""
2151 return _core_.Image_GetRed(*args, **kwargs)
2152
2153 def GetGreen(*args, **kwargs):
2154 """GetGreen(self, int x, int y) -> unsigned char"""
2155 return _core_.Image_GetGreen(*args, **kwargs)
2156
2157 def GetBlue(*args, **kwargs):
2158 """GetBlue(self, int x, int y) -> unsigned char"""
2159 return _core_.Image_GetBlue(*args, **kwargs)
2160
2161 def SetAlpha(*args, **kwargs):
2162 """SetAlpha(self, int x, int y, unsigned char alpha)"""
2163 return _core_.Image_SetAlpha(*args, **kwargs)
2164
2165 def GetAlpha(*args, **kwargs):
2166 """GetAlpha(self, int x, int y) -> unsigned char"""
2167 return _core_.Image_GetAlpha(*args, **kwargs)
2168
2169 def HasAlpha(*args, **kwargs):
2170 """HasAlpha(self) -> bool"""
2171 return _core_.Image_HasAlpha(*args, **kwargs)
2172
2173 def FindFirstUnusedColour(*args, **kwargs):
2174 """
2175 FindFirstUnusedColour(int startR=1, int startG=0, int startB=0) -> (success, r, g, b)
2176
2177 Find first colour that is not used in the image and has higher RGB
2178 values than startR, startG, startB. Returns a tuple consisting of a
2179 success flag and rgb values.
2180 """
2181 return _core_.Image_FindFirstUnusedColour(*args, **kwargs)
2182
2183 def ConvertAlphaToMask(*args, **kwargs):
2184 """
2185 ConvertAlphaToMask(self, byte threshold=128) -> bool
2186
2187 If the image has alpha channel, this method converts it to mask. All pixels
2188 with alpha value less than ``threshold`` are replaced with mask colour and the
2189 alpha channel is removed. Mask colour is chosen automatically using
2190 `FindFirstUnusedColour`.
2191
2192 If the image image doesn't have alpha channel, ConvertAlphaToMask does
2193 nothing.
2194 """
2195 return _core_.Image_ConvertAlphaToMask(*args, **kwargs)
2196
2197 def ConvertColourToAlpha(*args, **kwargs):
2198 """
2199 ConvertColourToAlpha(self, unsigned char r, unsigned char g, unsigned char b) -> bool
2200
2201 This method converts an image where the original alpha information is
2202 only available as a shades of a colour (actually shades of grey)
2203 typically when you draw anti-aliased text into a bitmap. The DC
2204 drawing routines draw grey values on the black background although
2205 they actually mean to draw white with differnt alpha values. This
2206 method reverses it, assuming a black (!) background and white text.
2207 The method will then fill up the whole image with the colour given.
2208 """
2209 return _core_.Image_ConvertColourToAlpha(*args, **kwargs)
2210
2211 def SetMaskFromImage(*args, **kwargs):
2212 """SetMaskFromImage(self, Image mask, byte mr, byte mg, byte mb) -> bool"""
2213 return _core_.Image_SetMaskFromImage(*args, **kwargs)
2214
2215 def CanRead(*args, **kwargs):
2216 """CanRead(String name) -> bool"""
2217 return _core_.Image_CanRead(*args, **kwargs)
2218
2219 CanRead = staticmethod(CanRead)
2220 def GetImageCount(*args, **kwargs):
2221 """GetImageCount(String name, long type=BITMAP_TYPE_ANY) -> int"""
2222 return _core_.Image_GetImageCount(*args, **kwargs)
2223
2224 GetImageCount = staticmethod(GetImageCount)
2225 def LoadFile(*args, **kwargs):
2226 """LoadFile(self, String name, long type=BITMAP_TYPE_ANY, int index=-1) -> bool"""
2227 return _core_.Image_LoadFile(*args, **kwargs)
2228
2229 def LoadMimeFile(*args, **kwargs):
2230 """LoadMimeFile(self, String name, String mimetype, int index=-1) -> bool"""
2231 return _core_.Image_LoadMimeFile(*args, **kwargs)
2232
2233 def SaveFile(*args, **kwargs):
2234 """SaveFile(self, String name, int type) -> bool"""
2235 return _core_.Image_SaveFile(*args, **kwargs)
2236
2237 def SaveMimeFile(*args, **kwargs):
2238 """SaveMimeFile(self, String name, String mimetype) -> bool"""
2239 return _core_.Image_SaveMimeFile(*args, **kwargs)
2240
2241 def CanReadStream(*args, **kwargs):
2242 """CanReadStream(InputStream stream) -> bool"""
2243 return _core_.Image_CanReadStream(*args, **kwargs)
2244
2245 CanReadStream = staticmethod(CanReadStream)
2246 def LoadStream(*args, **kwargs):
2247 """LoadStream(self, InputStream stream, long type=BITMAP_TYPE_ANY, int index=-1) -> bool"""
2248 return _core_.Image_LoadStream(*args, **kwargs)
2249
2250 def LoadMimeStream(*args, **kwargs):
2251 """LoadMimeStream(self, InputStream stream, String mimetype, int index=-1) -> bool"""
2252 return _core_.Image_LoadMimeStream(*args, **kwargs)
2253
2254 def Ok(*args, **kwargs):
2255 """Ok(self) -> bool"""
2256 return _core_.Image_Ok(*args, **kwargs)
2257
2258 def GetWidth(*args, **kwargs):
2259 """GetWidth(self) -> int"""
2260 return _core_.Image_GetWidth(*args, **kwargs)
2261
2262 def GetHeight(*args, **kwargs):
2263 """GetHeight(self) -> int"""
2264 return _core_.Image_GetHeight(*args, **kwargs)
2265
2266 def GetSize(*args, **kwargs):
2267 """GetSize(self) -> Size"""
2268 return _core_.Image_GetSize(*args, **kwargs)
2269
2270 def GetSubImage(*args, **kwargs):
2271 """GetSubImage(self, Rect rect) -> Image"""
2272 return _core_.Image_GetSubImage(*args, **kwargs)
2273
2274 def Copy(*args, **kwargs):
2275 """Copy(self) -> Image"""
2276 return _core_.Image_Copy(*args, **kwargs)
2277
2278 def Paste(*args, **kwargs):
2279 """Paste(self, Image image, int x, int y)"""
2280 return _core_.Image_Paste(*args, **kwargs)
2281
2282 def GetData(*args, **kwargs):
2283 """GetData(self) -> PyObject"""
2284 return _core_.Image_GetData(*args, **kwargs)
2285
2286 def SetData(*args, **kwargs):
2287 """SetData(self, PyObject data)"""
2288 return _core_.Image_SetData(*args, **kwargs)
2289
2290 def GetDataBuffer(*args, **kwargs):
2291 """GetDataBuffer(self) -> PyObject"""
2292 return _core_.Image_GetDataBuffer(*args, **kwargs)
2293
2294 def SetDataBuffer(*args, **kwargs):
2295 """SetDataBuffer(self, PyObject data)"""
2296 return _core_.Image_SetDataBuffer(*args, **kwargs)
2297
2298 def GetAlphaData(*args, **kwargs):
2299 """GetAlphaData(self) -> PyObject"""
2300 return _core_.Image_GetAlphaData(*args, **kwargs)
2301
2302 def SetAlphaData(*args, **kwargs):
2303 """SetAlphaData(self, PyObject data)"""
2304 return _core_.Image_SetAlphaData(*args, **kwargs)
2305
2306 def GetAlphaBuffer(*args, **kwargs):
2307 """GetAlphaBuffer(self) -> PyObject"""
2308 return _core_.Image_GetAlphaBuffer(*args, **kwargs)
2309
2310 def SetAlphaBuffer(*args, **kwargs):
2311 """SetAlphaBuffer(self, PyObject data)"""
2312 return _core_.Image_SetAlphaBuffer(*args, **kwargs)
2313
2314 def SetMaskColour(*args, **kwargs):
2315 """SetMaskColour(self, unsigned char r, unsigned char g, unsigned char b)"""
2316 return _core_.Image_SetMaskColour(*args, **kwargs)
2317
2318 def GetMaskRed(*args, **kwargs):
2319 """GetMaskRed(self) -> unsigned char"""
2320 return _core_.Image_GetMaskRed(*args, **kwargs)
2321
2322 def GetMaskGreen(*args, **kwargs):
2323 """GetMaskGreen(self) -> unsigned char"""
2324 return _core_.Image_GetMaskGreen(*args, **kwargs)
2325
2326 def GetMaskBlue(*args, **kwargs):
2327 """GetMaskBlue(self) -> unsigned char"""
2328 return _core_.Image_GetMaskBlue(*args, **kwargs)
2329
2330 def SetMask(*args, **kwargs):
2331 """SetMask(self, bool mask=True)"""
2332 return _core_.Image_SetMask(*args, **kwargs)
2333
2334 def HasMask(*args, **kwargs):
2335 """HasMask(self) -> bool"""
2336 return _core_.Image_HasMask(*args, **kwargs)
2337
2338 def Rotate(*args, **kwargs):
2339 """
2340 Rotate(self, double angle, Point centre_of_rotation, bool interpolating=True,
2341 Point offset_after_rotation=None) -> Image
2342 """
2343 return _core_.Image_Rotate(*args, **kwargs)
2344
2345 def Rotate90(*args, **kwargs):
2346 """Rotate90(self, bool clockwise=True) -> Image"""
2347 return _core_.Image_Rotate90(*args, **kwargs)
2348
2349 def Mirror(*args, **kwargs):
2350 """Mirror(self, bool horizontally=True) -> Image"""
2351 return _core_.Image_Mirror(*args, **kwargs)
2352
2353 def Replace(*args, **kwargs):
2354 """
2355 Replace(self, unsigned char r1, unsigned char g1, unsigned char b1,
2356 unsigned char r2, unsigned char g2, unsigned char b2)
2357 """
2358 return _core_.Image_Replace(*args, **kwargs)
2359
2360 def ConvertToMono(*args, **kwargs):
2361 """ConvertToMono(self, unsigned char r, unsigned char g, unsigned char b) -> Image"""
2362 return _core_.Image_ConvertToMono(*args, **kwargs)
2363
2364 def SetOption(*args, **kwargs):
2365 """SetOption(self, String name, String value)"""
2366 return _core_.Image_SetOption(*args, **kwargs)
2367
2368 def SetOptionInt(*args, **kwargs):
2369 """SetOptionInt(self, String name, int value)"""
2370 return _core_.Image_SetOptionInt(*args, **kwargs)
2371
2372 def GetOption(*args, **kwargs):
2373 """GetOption(self, String name) -> String"""
2374 return _core_.Image_GetOption(*args, **kwargs)
2375
2376 def GetOptionInt(*args, **kwargs):
2377 """GetOptionInt(self, String name) -> int"""
2378 return _core_.Image_GetOptionInt(*args, **kwargs)
2379
2380 def HasOption(*args, **kwargs):
2381 """HasOption(self, String name) -> bool"""
2382 return _core_.Image_HasOption(*args, **kwargs)
2383
2384 def CountColours(*args, **kwargs):
2385 """CountColours(self, unsigned long stopafter=(unsigned long) -1) -> unsigned long"""
2386 return _core_.Image_CountColours(*args, **kwargs)
2387
2388 def ComputeHistogram(*args, **kwargs):
2389 """ComputeHistogram(self, ImageHistogram h) -> unsigned long"""
2390 return _core_.Image_ComputeHistogram(*args, **kwargs)
2391
2392 def AddHandler(*args, **kwargs):
2393 """AddHandler(ImageHandler handler)"""
2394 return _core_.Image_AddHandler(*args, **kwargs)
2395
2396 AddHandler = staticmethod(AddHandler)
2397 def InsertHandler(*args, **kwargs):
2398 """InsertHandler(ImageHandler handler)"""
2399 return _core_.Image_InsertHandler(*args, **kwargs)
2400
2401 InsertHandler = staticmethod(InsertHandler)
2402 def RemoveHandler(*args, **kwargs):
2403 """RemoveHandler(String name) -> bool"""
2404 return _core_.Image_RemoveHandler(*args, **kwargs)
2405
2406 RemoveHandler = staticmethod(RemoveHandler)
2407 def GetImageExtWildcard(*args, **kwargs):
2408 """GetImageExtWildcard() -> String"""
2409 return _core_.Image_GetImageExtWildcard(*args, **kwargs)
2410
2411 GetImageExtWildcard = staticmethod(GetImageExtWildcard)
2412 def ConvertToBitmap(*args, **kwargs):
2413 """ConvertToBitmap(self, int depth=-1) -> Bitmap"""
2414 return _core_.Image_ConvertToBitmap(*args, **kwargs)
2415
2416 def ConvertToMonoBitmap(*args, **kwargs):
2417 """ConvertToMonoBitmap(self, unsigned char red, unsigned char green, unsigned char blue) -> Bitmap"""
2418 return _core_.Image_ConvertToMonoBitmap(*args, **kwargs)
2419
2420 def __nonzero__(self): return self.Ok()
2421
2422 class ImagePtr(Image):
2423 def __init__(self, this):
2424 self.this = this
2425 if not hasattr(self,"thisown"): self.thisown = 0
2426 self.__class__ = Image
2427 _core_.Image_swigregister(ImagePtr)
2428
2429 def ImageFromMime(*args, **kwargs):
2430 """ImageFromMime(String name, String mimetype, int index=-1) -> Image"""
2431 val = _core_.new_ImageFromMime(*args, **kwargs)
2432 val.thisown = 1
2433 return val
2434
2435 def ImageFromStream(*args, **kwargs):
2436 """ImageFromStream(InputStream stream, long type=BITMAP_TYPE_ANY, int index=-1) -> Image"""
2437 val = _core_.new_ImageFromStream(*args, **kwargs)
2438 val.thisown = 1
2439 return val
2440
2441 def ImageFromStreamMime(*args, **kwargs):
2442 """ImageFromStreamMime(InputStream stream, String mimetype, int index=-1) -> Image"""
2443 val = _core_.new_ImageFromStreamMime(*args, **kwargs)
2444 val.thisown = 1
2445 return val
2446
2447 def EmptyImage(*args, **kwargs):
2448 """EmptyImage(int width=0, int height=0, bool clear=True) -> Image"""
2449 val = _core_.new_EmptyImage(*args, **kwargs)
2450 val.thisown = 1
2451 return val
2452
2453 def ImageFromBitmap(*args, **kwargs):
2454 """ImageFromBitmap(Bitmap bitmap) -> Image"""
2455 val = _core_.new_ImageFromBitmap(*args, **kwargs)
2456 val.thisown = 1
2457 return val
2458
2459 def ImageFromData(*args, **kwargs):
2460 """ImageFromData(int width, int height, unsigned char data) -> Image"""
2461 val = _core_.new_ImageFromData(*args, **kwargs)
2462 val.thisown = 1
2463 return val
2464
2465 def ImageFromDataWithAlpha(*args, **kwargs):
2466 """ImageFromDataWithAlpha(int width, int height, unsigned char data, unsigned char alpha) -> Image"""
2467 val = _core_.new_ImageFromDataWithAlpha(*args, **kwargs)
2468 val.thisown = 1
2469 return val
2470
2471 def Image_CanRead(*args, **kwargs):
2472 """Image_CanRead(String name) -> bool"""
2473 return _core_.Image_CanRead(*args, **kwargs)
2474
2475 def Image_GetImageCount(*args, **kwargs):
2476 """Image_GetImageCount(String name, long type=BITMAP_TYPE_ANY) -> int"""
2477 return _core_.Image_GetImageCount(*args, **kwargs)
2478
2479 def Image_CanReadStream(*args, **kwargs):
2480 """Image_CanReadStream(InputStream stream) -> bool"""
2481 return _core_.Image_CanReadStream(*args, **kwargs)
2482
2483 def Image_AddHandler(*args, **kwargs):
2484 """Image_AddHandler(ImageHandler handler)"""
2485 return _core_.Image_AddHandler(*args, **kwargs)
2486
2487 def Image_InsertHandler(*args, **kwargs):
2488 """Image_InsertHandler(ImageHandler handler)"""
2489 return _core_.Image_InsertHandler(*args, **kwargs)
2490
2491 def Image_RemoveHandler(*args, **kwargs):
2492 """Image_RemoveHandler(String name) -> bool"""
2493 return _core_.Image_RemoveHandler(*args, **kwargs)
2494
2495 def Image_GetImageExtWildcard(*args, **kwargs):
2496 """Image_GetImageExtWildcard() -> String"""
2497 return _core_.Image_GetImageExtWildcard(*args, **kwargs)
2498
2499 def InitAllImageHandlers():
2500 """
2501 The former functionality of InitAllImageHanders is now done internal to
2502 the _core_ extension module and so this function has become a simple NOP.
2503 """
2504 pass
2505
2506 IMAGE_RESOLUTION_INCHES = _core_.IMAGE_RESOLUTION_INCHES
2507 IMAGE_RESOLUTION_CM = _core_.IMAGE_RESOLUTION_CM
2508 BMP_24BPP = _core_.BMP_24BPP
2509 BMP_8BPP = _core_.BMP_8BPP
2510 BMP_8BPP_GREY = _core_.BMP_8BPP_GREY
2511 BMP_8BPP_GRAY = _core_.BMP_8BPP_GRAY
2512 BMP_8BPP_RED = _core_.BMP_8BPP_RED
2513 BMP_8BPP_PALETTE = _core_.BMP_8BPP_PALETTE
2514 BMP_4BPP = _core_.BMP_4BPP
2515 BMP_1BPP = _core_.BMP_1BPP
2516 BMP_1BPP_BW = _core_.BMP_1BPP_BW
2517 class BMPHandler(ImageHandler):
2518 """Proxy of C++ BMPHandler class"""
2519 def __repr__(self):
2520 return "<%s.%s; proxy of C++ wxBMPHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
2521 def __init__(self, *args, **kwargs):
2522 """__init__(self) -> BMPHandler"""
2523 newobj = _core_.new_BMPHandler(*args, **kwargs)
2524 self.this = newobj.this
2525 self.thisown = 1
2526 del newobj.thisown
2527
2528 class BMPHandlerPtr(BMPHandler):
2529 def __init__(self, this):
2530 self.this = this
2531 if not hasattr(self,"thisown"): self.thisown = 0
2532 self.__class__ = BMPHandler
2533 _core_.BMPHandler_swigregister(BMPHandlerPtr)
2534 NullImage = cvar.NullImage
2535 IMAGE_OPTION_BMP_FORMAT = cvar.IMAGE_OPTION_BMP_FORMAT
2536 IMAGE_OPTION_CUR_HOTSPOT_X = cvar.IMAGE_OPTION_CUR_HOTSPOT_X
2537 IMAGE_OPTION_CUR_HOTSPOT_Y = cvar.IMAGE_OPTION_CUR_HOTSPOT_Y
2538 IMAGE_OPTION_RESOLUTION = cvar.IMAGE_OPTION_RESOLUTION
2539 IMAGE_OPTION_RESOLUTIONUNIT = cvar.IMAGE_OPTION_RESOLUTIONUNIT
2540
2541 class ICOHandler(BMPHandler):
2542 """Proxy of C++ ICOHandler class"""
2543 def __repr__(self):
2544 return "<%s.%s; proxy of C++ wxICOHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
2545 def __init__(self, *args, **kwargs):
2546 """__init__(self) -> ICOHandler"""
2547 newobj = _core_.new_ICOHandler(*args, **kwargs)
2548 self.this = newobj.this
2549 self.thisown = 1
2550 del newobj.thisown
2551
2552 class ICOHandlerPtr(ICOHandler):
2553 def __init__(self, this):
2554 self.this = this
2555 if not hasattr(self,"thisown"): self.thisown = 0
2556 self.__class__ = ICOHandler
2557 _core_.ICOHandler_swigregister(ICOHandlerPtr)
2558
2559 class CURHandler(ICOHandler):
2560 """Proxy of C++ CURHandler class"""
2561 def __repr__(self):
2562 return "<%s.%s; proxy of C++ wxCURHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
2563 def __init__(self, *args, **kwargs):
2564 """__init__(self) -> CURHandler"""
2565 newobj = _core_.new_CURHandler(*args, **kwargs)
2566 self.this = newobj.this
2567 self.thisown = 1
2568 del newobj.thisown
2569
2570 class CURHandlerPtr(CURHandler):
2571 def __init__(self, this):
2572 self.this = this
2573 if not hasattr(self,"thisown"): self.thisown = 0
2574 self.__class__ = CURHandler
2575 _core_.CURHandler_swigregister(CURHandlerPtr)
2576
2577 class ANIHandler(CURHandler):
2578 """Proxy of C++ ANIHandler class"""
2579 def __repr__(self):
2580 return "<%s.%s; proxy of C++ wxANIHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
2581 def __init__(self, *args, **kwargs):
2582 """__init__(self) -> ANIHandler"""
2583 newobj = _core_.new_ANIHandler(*args, **kwargs)
2584 self.this = newobj.this
2585 self.thisown = 1
2586 del newobj.thisown
2587
2588 class ANIHandlerPtr(ANIHandler):
2589 def __init__(self, this):
2590 self.this = this
2591 if not hasattr(self,"thisown"): self.thisown = 0
2592 self.__class__ = ANIHandler
2593 _core_.ANIHandler_swigregister(ANIHandlerPtr)
2594
2595 class PNGHandler(ImageHandler):
2596 """Proxy of C++ PNGHandler class"""
2597 def __repr__(self):
2598 return "<%s.%s; proxy of C++ wxPNGHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
2599 def __init__(self, *args, **kwargs):
2600 """__init__(self) -> PNGHandler"""
2601 newobj = _core_.new_PNGHandler(*args, **kwargs)
2602 self.this = newobj.this
2603 self.thisown = 1
2604 del newobj.thisown
2605
2606 class PNGHandlerPtr(PNGHandler):
2607 def __init__(self, this):
2608 self.this = this
2609 if not hasattr(self,"thisown"): self.thisown = 0
2610 self.__class__ = PNGHandler
2611 _core_.PNGHandler_swigregister(PNGHandlerPtr)
2612
2613 class GIFHandler(ImageHandler):
2614 """Proxy of C++ GIFHandler class"""
2615 def __repr__(self):
2616 return "<%s.%s; proxy of C++ wxGIFHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
2617 def __init__(self, *args, **kwargs):
2618 """__init__(self) -> GIFHandler"""
2619 newobj = _core_.new_GIFHandler(*args, **kwargs)
2620 self.this = newobj.this
2621 self.thisown = 1
2622 del newobj.thisown
2623
2624 class GIFHandlerPtr(GIFHandler):
2625 def __init__(self, this):
2626 self.this = this
2627 if not hasattr(self,"thisown"): self.thisown = 0
2628 self.__class__ = GIFHandler
2629 _core_.GIFHandler_swigregister(GIFHandlerPtr)
2630
2631 class PCXHandler(ImageHandler):
2632 """Proxy of C++ PCXHandler class"""
2633 def __repr__(self):
2634 return "<%s.%s; proxy of C++ wxPCXHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
2635 def __init__(self, *args, **kwargs):
2636 """__init__(self) -> PCXHandler"""
2637 newobj = _core_.new_PCXHandler(*args, **kwargs)
2638 self.this = newobj.this
2639 self.thisown = 1
2640 del newobj.thisown
2641
2642 class PCXHandlerPtr(PCXHandler):
2643 def __init__(self, this):
2644 self.this = this
2645 if not hasattr(self,"thisown"): self.thisown = 0
2646 self.__class__ = PCXHandler
2647 _core_.PCXHandler_swigregister(PCXHandlerPtr)
2648
2649 class JPEGHandler(ImageHandler):
2650 """Proxy of C++ JPEGHandler class"""
2651 def __repr__(self):
2652 return "<%s.%s; proxy of C++ wxJPEGHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
2653 def __init__(self, *args, **kwargs):
2654 """__init__(self) -> JPEGHandler"""
2655 newobj = _core_.new_JPEGHandler(*args, **kwargs)
2656 self.this = newobj.this
2657 self.thisown = 1
2658 del newobj.thisown
2659
2660 class JPEGHandlerPtr(JPEGHandler):
2661 def __init__(self, this):
2662 self.this = this
2663 if not hasattr(self,"thisown"): self.thisown = 0
2664 self.__class__ = JPEGHandler
2665 _core_.JPEGHandler_swigregister(JPEGHandlerPtr)
2666
2667 class PNMHandler(ImageHandler):
2668 """Proxy of C++ PNMHandler class"""
2669 def __repr__(self):
2670 return "<%s.%s; proxy of C++ wxPNMHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
2671 def __init__(self, *args, **kwargs):
2672 """__init__(self) -> PNMHandler"""
2673 newobj = _core_.new_PNMHandler(*args, **kwargs)
2674 self.this = newobj.this
2675 self.thisown = 1
2676 del newobj.thisown
2677
2678 class PNMHandlerPtr(PNMHandler):
2679 def __init__(self, this):
2680 self.this = this
2681 if not hasattr(self,"thisown"): self.thisown = 0
2682 self.__class__ = PNMHandler
2683 _core_.PNMHandler_swigregister(PNMHandlerPtr)
2684
2685 class XPMHandler(ImageHandler):
2686 """Proxy of C++ XPMHandler class"""
2687 def __repr__(self):
2688 return "<%s.%s; proxy of C++ wxXPMHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
2689 def __init__(self, *args, **kwargs):
2690 """__init__(self) -> XPMHandler"""
2691 newobj = _core_.new_XPMHandler(*args, **kwargs)
2692 self.this = newobj.this
2693 self.thisown = 1
2694 del newobj.thisown
2695
2696 class XPMHandlerPtr(XPMHandler):
2697 def __init__(self, this):
2698 self.this = this
2699 if not hasattr(self,"thisown"): self.thisown = 0
2700 self.__class__ = XPMHandler
2701 _core_.XPMHandler_swigregister(XPMHandlerPtr)
2702
2703 class TIFFHandler(ImageHandler):
2704 """Proxy of C++ TIFFHandler class"""
2705 def __repr__(self):
2706 return "<%s.%s; proxy of C++ wxTIFFHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
2707 def __init__(self, *args, **kwargs):
2708 """__init__(self) -> TIFFHandler"""
2709 newobj = _core_.new_TIFFHandler(*args, **kwargs)
2710 self.this = newobj.this
2711 self.thisown = 1
2712 del newobj.thisown
2713
2714 class TIFFHandlerPtr(TIFFHandler):
2715 def __init__(self, this):
2716 self.this = this
2717 if not hasattr(self,"thisown"): self.thisown = 0
2718 self.__class__ = TIFFHandler
2719 _core_.TIFFHandler_swigregister(TIFFHandlerPtr)
2720
2721 QUANTIZE_INCLUDE_WINDOWS_COLOURS = _core_.QUANTIZE_INCLUDE_WINDOWS_COLOURS
2722 QUANTIZE_FILL_DESTINATION_IMAGE = _core_.QUANTIZE_FILL_DESTINATION_IMAGE
2723 class Quantize(object):
2724 """Performs quantization, or colour reduction, on a wxImage."""
2725 def __init__(self): raise RuntimeError, "No constructor defined"
2726 def __repr__(self):
2727 return "<%s.%s; proxy of C++ wxQuantize instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
2728 def Quantize(*args, **kwargs):
2729 """
2730 Quantize(Image src, Image dest, int desiredNoColours=236, int flags=wxQUANTIZE_INCLUDE_WINDOWS_COLOURS|wxQUANTIZE_FILL_DESTINATION_IMAGE) -> bool
2731
2732 Reduce the colours in the source image and put the result into the
2733 destination image, setting the palette in the destination if
2734 needed. Both images may be the same, to overwrite the source image.
2735 """
2736 return _core_.Quantize_Quantize(*args, **kwargs)
2737
2738 Quantize = staticmethod(Quantize)
2739
2740 class QuantizePtr(Quantize):
2741 def __init__(self, this):
2742 self.this = this
2743 if not hasattr(self,"thisown"): self.thisown = 0
2744 self.__class__ = Quantize
2745 _core_.Quantize_swigregister(QuantizePtr)
2746
2747 def Quantize_Quantize(*args, **kwargs):
2748 """
2749 Quantize_Quantize(Image src, Image dest, int desiredNoColours=236, int flags=wxQUANTIZE_INCLUDE_WINDOWS_COLOURS|wxQUANTIZE_FILL_DESTINATION_IMAGE) -> bool
2750
2751 Reduce the colours in the source image and put the result into the
2752 destination image, setting the palette in the destination if
2753 needed. Both images may be the same, to overwrite the source image.
2754 """
2755 return _core_.Quantize_Quantize(*args, **kwargs)
2756
2757 #---------------------------------------------------------------------------
2758
2759 class EvtHandler(Object):
2760 """Proxy of C++ EvtHandler class"""
2761 def __repr__(self):
2762 return "<%s.%s; proxy of C++ wxEvtHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
2763 def __init__(self, *args, **kwargs):
2764 """__init__(self) -> EvtHandler"""
2765 newobj = _core_.new_EvtHandler(*args, **kwargs)
2766 self.this = newobj.this
2767 self.thisown = 1
2768 del newobj.thisown
2769 def GetNextHandler(*args, **kwargs):
2770 """GetNextHandler(self) -> EvtHandler"""
2771 return _core_.EvtHandler_GetNextHandler(*args, **kwargs)
2772
2773 def GetPreviousHandler(*args, **kwargs):
2774 """GetPreviousHandler(self) -> EvtHandler"""
2775 return _core_.EvtHandler_GetPreviousHandler(*args, **kwargs)
2776
2777 def SetNextHandler(*args, **kwargs):
2778 """SetNextHandler(self, EvtHandler handler)"""
2779 return _core_.EvtHandler_SetNextHandler(*args, **kwargs)
2780
2781 def SetPreviousHandler(*args, **kwargs):
2782 """SetPreviousHandler(self, EvtHandler handler)"""
2783 return _core_.EvtHandler_SetPreviousHandler(*args, **kwargs)
2784
2785 def GetEvtHandlerEnabled(*args, **kwargs):
2786 """GetEvtHandlerEnabled(self) -> bool"""
2787 return _core_.EvtHandler_GetEvtHandlerEnabled(*args, **kwargs)
2788
2789 def SetEvtHandlerEnabled(*args, **kwargs):
2790 """SetEvtHandlerEnabled(self, bool enabled)"""
2791 return _core_.EvtHandler_SetEvtHandlerEnabled(*args, **kwargs)
2792
2793 def ProcessEvent(*args, **kwargs):
2794 """ProcessEvent(self, Event event) -> bool"""
2795 return _core_.EvtHandler_ProcessEvent(*args, **kwargs)
2796
2797 def AddPendingEvent(*args, **kwargs):
2798 """AddPendingEvent(self, Event event)"""
2799 return _core_.EvtHandler_AddPendingEvent(*args, **kwargs)
2800
2801 def ProcessPendingEvents(*args, **kwargs):
2802 """ProcessPendingEvents(self)"""
2803 return _core_.EvtHandler_ProcessPendingEvents(*args, **kwargs)
2804
2805 def Connect(*args, **kwargs):
2806 """Connect(self, int id, int lastId, int eventType, PyObject func)"""
2807 return _core_.EvtHandler_Connect(*args, **kwargs)
2808
2809 def Disconnect(*args, **kwargs):
2810 """Disconnect(self, int id, int lastId=-1, wxEventType eventType=wxEVT_NULL) -> bool"""
2811 return _core_.EvtHandler_Disconnect(*args, **kwargs)
2812
2813 def _setOORInfo(*args, **kwargs):
2814 """_setOORInfo(self, PyObject _self, bool incref=True)"""
2815 return _core_.EvtHandler__setOORInfo(*args, **kwargs)
2816
2817 def Bind(self, event, handler, source=None, id=wx.ID_ANY, id2=wx.ID_ANY):
2818 """
2819 Bind an event to an event handler.
2820
2821 :param event: One of the EVT_* objects that specifies the
2822 type of event to bind,
2823
2824 :param handler: A callable object to be invoked when the
2825 event is delivered to self. Pass None to
2826 disconnect an event handler.
2827
2828 :param source: Sometimes the event originates from a
2829 different window than self, but you still
2830 want to catch it in self. (For example, a
2831 button event delivered to a frame.) By
2832 passing the source of the event, the event
2833 handling system is able to differentiate
2834 between the same event type from different
2835 controls.
2836
2837 :param id: Used to spcify the event source by ID instead
2838 of instance.
2839
2840 :param id2: Used when it is desirable to bind a handler
2841 to a range of IDs, such as with EVT_MENU_RANGE.
2842 """
2843 if source is not None:
2844 id = source.GetId()
2845 event.Bind(self, id, id2, handler)
2846
2847 def Unbind(self, event, source=None, id=wx.ID_ANY, id2=wx.ID_ANY):
2848 """
2849 Disconencts the event handler binding for event from self.
2850 Returns True if successful.
2851 """
2852 if source is not None:
2853 id = source.GetId()
2854 return event.Unbind(self, id, id2)
2855
2856
2857 class EvtHandlerPtr(EvtHandler):
2858 def __init__(self, this):
2859 self.this = this
2860 if not hasattr(self,"thisown"): self.thisown = 0
2861 self.__class__ = EvtHandler
2862 _core_.EvtHandler_swigregister(EvtHandlerPtr)
2863
2864 #---------------------------------------------------------------------------
2865
2866 class PyEventBinder(object):
2867 """
2868 Instances of this class are used to bind specific events to event
2869 handlers.
2870 """
2871 def __init__(self, evtType, expectedIDs=0):
2872 if expectedIDs not in [0, 1, 2]:
2873 raise ValueError, "Invalid number of expectedIDs"
2874 self.expectedIDs = expectedIDs
2875
2876 if type(evtType) == list or type(evtType) == tuple:
2877 self.evtType = evtType
2878 else:
2879 self.evtType = [evtType]
2880
2881
2882 def Bind(self, target, id1, id2, function):
2883 """Bind this set of event types to target."""
2884 for et in self.evtType:
2885 target.Connect(id1, id2, et, function)
2886
2887
2888 def Unbind(self, target, id1, id2):
2889 """Remove an event binding."""
2890 success = 0
2891 for et in self.evtType:
2892 success += target.Disconnect(id1, id2, et)
2893 return success != 0
2894
2895
2896 def __call__(self, *args):
2897 """
2898 For backwards compatibility with the old EVT_* functions.
2899 Should be called with either (window, func), (window, ID,
2900 func) or (window, ID1, ID2, func) parameters depending on the
2901 type of the event.
2902 """
2903 assert len(args) == 2 + self.expectedIDs
2904 id1 = wx.ID_ANY
2905 id2 = wx.ID_ANY
2906 target = args[0]
2907 if self.expectedIDs == 0:
2908 func = args[1]
2909 elif self.expectedIDs == 1:
2910 id1 = args[1]
2911 func = args[2]
2912 elif self.expectedIDs == 2:
2913 id1 = args[1]
2914 id2 = args[2]
2915 func = args[3]
2916 else:
2917 raise ValueError, "Unexpected number of IDs"
2918
2919 self.Bind(target, id1, id2, func)
2920
2921
2922 # These two are square pegs that don't fit the PyEventBinder hole...
2923 def EVT_COMMAND(win, id, cmd, func):
2924 win.Connect(id, -1, cmd, func)
2925 def EVT_COMMAND_RANGE(win, id1, id2, cmd, func):
2926 win.Connect(id1, id2, cmd, func)
2927
2928
2929 #---------------------------------------------------------------------------
2930
2931 #---------------------------------------------------------------------------
2932
2933 EVENT_PROPAGATE_NONE = _core_.EVENT_PROPAGATE_NONE
2934 EVENT_PROPAGATE_MAX = _core_.EVENT_PROPAGATE_MAX
2935
2936 def NewEventType(*args, **kwargs):
2937 """NewEventType() -> wxEventType"""
2938 return _core_.NewEventType(*args, **kwargs)
2939 wxEVT_NULL = _core_.wxEVT_NULL
2940 wxEVT_FIRST = _core_.wxEVT_FIRST
2941 wxEVT_USER_FIRST = _core_.wxEVT_USER_FIRST
2942 wxEVT_COMMAND_BUTTON_CLICKED = _core_.wxEVT_COMMAND_BUTTON_CLICKED
2943 wxEVT_COMMAND_CHECKBOX_CLICKED = _core_.wxEVT_COMMAND_CHECKBOX_CLICKED
2944 wxEVT_COMMAND_CHOICE_SELECTED = _core_.wxEVT_COMMAND_CHOICE_SELECTED
2945 wxEVT_COMMAND_LISTBOX_SELECTED = _core_.wxEVT_COMMAND_LISTBOX_SELECTED
2946 wxEVT_COMMAND_LISTBOX_DOUBLECLICKED = _core_.wxEVT_COMMAND_LISTBOX_DOUBLECLICKED
2947 wxEVT_COMMAND_CHECKLISTBOX_TOGGLED = _core_.wxEVT_COMMAND_CHECKLISTBOX_TOGGLED
2948 wxEVT_COMMAND_MENU_SELECTED = _core_.wxEVT_COMMAND_MENU_SELECTED
2949 wxEVT_COMMAND_TOOL_CLICKED = _core_.wxEVT_COMMAND_TOOL_CLICKED
2950 wxEVT_COMMAND_SLIDER_UPDATED = _core_.wxEVT_COMMAND_SLIDER_UPDATED
2951 wxEVT_COMMAND_RADIOBOX_SELECTED = _core_.wxEVT_COMMAND_RADIOBOX_SELECTED
2952 wxEVT_COMMAND_RADIOBUTTON_SELECTED = _core_.wxEVT_COMMAND_RADIOBUTTON_SELECTED
2953 wxEVT_COMMAND_SCROLLBAR_UPDATED = _core_.wxEVT_COMMAND_SCROLLBAR_UPDATED
2954 wxEVT_COMMAND_VLBOX_SELECTED = _core_.wxEVT_COMMAND_VLBOX_SELECTED
2955 wxEVT_COMMAND_COMBOBOX_SELECTED = _core_.wxEVT_COMMAND_COMBOBOX_SELECTED
2956 wxEVT_COMMAND_TOOL_RCLICKED = _core_.wxEVT_COMMAND_TOOL_RCLICKED
2957 wxEVT_COMMAND_TOOL_ENTER = _core_.wxEVT_COMMAND_TOOL_ENTER
2958 wxEVT_LEFT_DOWN = _core_.wxEVT_LEFT_DOWN
2959 wxEVT_LEFT_UP = _core_.wxEVT_LEFT_UP
2960 wxEVT_MIDDLE_DOWN = _core_.wxEVT_MIDDLE_DOWN
2961 wxEVT_MIDDLE_UP = _core_.wxEVT_MIDDLE_UP
2962 wxEVT_RIGHT_DOWN = _core_.wxEVT_RIGHT_DOWN
2963 wxEVT_RIGHT_UP = _core_.wxEVT_RIGHT_UP
2964 wxEVT_MOTION = _core_.wxEVT_MOTION
2965 wxEVT_ENTER_WINDOW = _core_.wxEVT_ENTER_WINDOW
2966 wxEVT_LEAVE_WINDOW = _core_.wxEVT_LEAVE_WINDOW
2967 wxEVT_LEFT_DCLICK = _core_.wxEVT_LEFT_DCLICK
2968 wxEVT_MIDDLE_DCLICK = _core_.wxEVT_MIDDLE_DCLICK
2969 wxEVT_RIGHT_DCLICK = _core_.wxEVT_RIGHT_DCLICK
2970 wxEVT_SET_FOCUS = _core_.wxEVT_SET_FOCUS
2971 wxEVT_KILL_FOCUS = _core_.wxEVT_KILL_FOCUS
2972 wxEVT_CHILD_FOCUS = _core_.wxEVT_CHILD_FOCUS
2973 wxEVT_MOUSEWHEEL = _core_.wxEVT_MOUSEWHEEL
2974 wxEVT_NC_LEFT_DOWN = _core_.wxEVT_NC_LEFT_DOWN
2975 wxEVT_NC_LEFT_UP = _core_.wxEVT_NC_LEFT_UP
2976 wxEVT_NC_MIDDLE_DOWN = _core_.wxEVT_NC_MIDDLE_DOWN
2977 wxEVT_NC_MIDDLE_UP = _core_.wxEVT_NC_MIDDLE_UP
2978 wxEVT_NC_RIGHT_DOWN = _core_.wxEVT_NC_RIGHT_DOWN
2979 wxEVT_NC_RIGHT_UP = _core_.wxEVT_NC_RIGHT_UP
2980 wxEVT_NC_MOTION = _core_.wxEVT_NC_MOTION
2981 wxEVT_NC_ENTER_WINDOW = _core_.wxEVT_NC_ENTER_WINDOW
2982 wxEVT_NC_LEAVE_WINDOW = _core_.wxEVT_NC_LEAVE_WINDOW
2983 wxEVT_NC_LEFT_DCLICK = _core_.wxEVT_NC_LEFT_DCLICK
2984 wxEVT_NC_MIDDLE_DCLICK = _core_.wxEVT_NC_MIDDLE_DCLICK
2985 wxEVT_NC_RIGHT_DCLICK = _core_.wxEVT_NC_RIGHT_DCLICK
2986 wxEVT_CHAR = _core_.wxEVT_CHAR
2987 wxEVT_CHAR_HOOK = _core_.wxEVT_CHAR_HOOK
2988 wxEVT_NAVIGATION_KEY = _core_.wxEVT_NAVIGATION_KEY
2989 wxEVT_KEY_DOWN = _core_.wxEVT_KEY_DOWN
2990 wxEVT_KEY_UP = _core_.wxEVT_KEY_UP
2991 wxEVT_HOTKEY = _core_.wxEVT_HOTKEY
2992 wxEVT_SET_CURSOR = _core_.wxEVT_SET_CURSOR
2993 wxEVT_SCROLL_TOP = _core_.wxEVT_SCROLL_TOP
2994 wxEVT_SCROLL_BOTTOM = _core_.wxEVT_SCROLL_BOTTOM
2995 wxEVT_SCROLL_LINEUP = _core_.wxEVT_SCROLL_LINEUP
2996 wxEVT_SCROLL_LINEDOWN = _core_.wxEVT_SCROLL_LINEDOWN
2997 wxEVT_SCROLL_PAGEUP = _core_.wxEVT_SCROLL_PAGEUP
2998 wxEVT_SCROLL_PAGEDOWN = _core_.wxEVT_SCROLL_PAGEDOWN
2999 wxEVT_SCROLL_THUMBTRACK = _core_.wxEVT_SCROLL_THUMBTRACK
3000 wxEVT_SCROLL_THUMBRELEASE = _core_.wxEVT_SCROLL_THUMBRELEASE
3001 wxEVT_SCROLL_ENDSCROLL = _core_.wxEVT_SCROLL_ENDSCROLL
3002 wxEVT_SCROLLWIN_TOP = _core_.wxEVT_SCROLLWIN_TOP
3003 wxEVT_SCROLLWIN_BOTTOM = _core_.wxEVT_SCROLLWIN_BOTTOM
3004 wxEVT_SCROLLWIN_LINEUP = _core_.wxEVT_SCROLLWIN_LINEUP
3005 wxEVT_SCROLLWIN_LINEDOWN = _core_.wxEVT_SCROLLWIN_LINEDOWN
3006 wxEVT_SCROLLWIN_PAGEUP = _core_.wxEVT_SCROLLWIN_PAGEUP
3007 wxEVT_SCROLLWIN_PAGEDOWN = _core_.wxEVT_SCROLLWIN_PAGEDOWN
3008 wxEVT_SCROLLWIN_THUMBTRACK = _core_.wxEVT_SCROLLWIN_THUMBTRACK
3009 wxEVT_SCROLLWIN_THUMBRELEASE = _core_.wxEVT_SCROLLWIN_THUMBRELEASE
3010 wxEVT_SIZE = _core_.wxEVT_SIZE
3011 wxEVT_MOVE = _core_.wxEVT_MOVE
3012 wxEVT_CLOSE_WINDOW = _core_.wxEVT_CLOSE_WINDOW
3013 wxEVT_END_SESSION = _core_.wxEVT_END_SESSION
3014 wxEVT_QUERY_END_SESSION = _core_.wxEVT_QUERY_END_SESSION
3015 wxEVT_ACTIVATE_APP = _core_.wxEVT_ACTIVATE_APP
3016 wxEVT_POWER = _core_.wxEVT_POWER
3017 wxEVT_ACTIVATE = _core_.wxEVT_ACTIVATE
3018 wxEVT_CREATE = _core_.wxEVT_CREATE
3019 wxEVT_DESTROY = _core_.wxEVT_DESTROY
3020 wxEVT_SHOW = _core_.wxEVT_SHOW
3021 wxEVT_ICONIZE = _core_.wxEVT_ICONIZE
3022 wxEVT_MAXIMIZE = _core_.wxEVT_MAXIMIZE
3023 wxEVT_MOUSE_CAPTURE_CHANGED = _core_.wxEVT_MOUSE_CAPTURE_CHANGED
3024 wxEVT_PAINT = _core_.wxEVT_PAINT
3025 wxEVT_ERASE_BACKGROUND = _core_.wxEVT_ERASE_BACKGROUND
3026 wxEVT_NC_PAINT = _core_.wxEVT_NC_PAINT
3027 wxEVT_PAINT_ICON = _core_.wxEVT_PAINT_ICON
3028 wxEVT_MENU_OPEN = _core_.wxEVT_MENU_OPEN
3029 wxEVT_MENU_CLOSE = _core_.wxEVT_MENU_CLOSE
3030 wxEVT_MENU_HIGHLIGHT = _core_.wxEVT_MENU_HIGHLIGHT
3031 wxEVT_CONTEXT_MENU = _core_.wxEVT_CONTEXT_MENU
3032 wxEVT_SYS_COLOUR_CHANGED = _core_.wxEVT_SYS_COLOUR_CHANGED
3033 wxEVT_DISPLAY_CHANGED = _core_.wxEVT_DISPLAY_CHANGED
3034 wxEVT_SETTING_CHANGED = _core_.wxEVT_SETTING_CHANGED
3035 wxEVT_QUERY_NEW_PALETTE = _core_.wxEVT_QUERY_NEW_PALETTE
3036 wxEVT_PALETTE_CHANGED = _core_.wxEVT_PALETTE_CHANGED
3037 wxEVT_DROP_FILES = _core_.wxEVT_DROP_FILES
3038 wxEVT_DRAW_ITEM = _core_.wxEVT_DRAW_ITEM
3039 wxEVT_MEASURE_ITEM = _core_.wxEVT_MEASURE_ITEM
3040 wxEVT_COMPARE_ITEM = _core_.wxEVT_COMPARE_ITEM
3041 wxEVT_INIT_DIALOG = _core_.wxEVT_INIT_DIALOG
3042 wxEVT_IDLE = _core_.wxEVT_IDLE
3043 wxEVT_UPDATE_UI = _core_.wxEVT_UPDATE_UI
3044 wxEVT_SIZING = _core_.wxEVT_SIZING
3045 wxEVT_MOVING = _core_.wxEVT_MOVING
3046 wxEVT_COMMAND_LEFT_CLICK = _core_.wxEVT_COMMAND_LEFT_CLICK
3047 wxEVT_COMMAND_LEFT_DCLICK = _core_.wxEVT_COMMAND_LEFT_DCLICK
3048 wxEVT_COMMAND_RIGHT_CLICK = _core_.wxEVT_COMMAND_RIGHT_CLICK
3049 wxEVT_COMMAND_RIGHT_DCLICK = _core_.wxEVT_COMMAND_RIGHT_DCLICK
3050 wxEVT_COMMAND_SET_FOCUS = _core_.wxEVT_COMMAND_SET_FOCUS
3051 wxEVT_COMMAND_KILL_FOCUS = _core_.wxEVT_COMMAND_KILL_FOCUS
3052 wxEVT_COMMAND_ENTER = _core_.wxEVT_COMMAND_ENTER
3053 #
3054 # Create some event binders
3055 EVT_SIZE = wx.PyEventBinder( wxEVT_SIZE )
3056 EVT_SIZING = wx.PyEventBinder( wxEVT_SIZING )
3057 EVT_MOVE = wx.PyEventBinder( wxEVT_MOVE )
3058 EVT_MOVING = wx.PyEventBinder( wxEVT_MOVING )
3059 EVT_CLOSE = wx.PyEventBinder( wxEVT_CLOSE_WINDOW )
3060 EVT_END_SESSION = wx.PyEventBinder( wxEVT_END_SESSION )
3061 EVT_QUERY_END_SESSION = wx.PyEventBinder( wxEVT_QUERY_END_SESSION )
3062 EVT_PAINT = wx.PyEventBinder( wxEVT_PAINT )
3063 EVT_NC_PAINT = wx.PyEventBinder( wxEVT_NC_PAINT )
3064 EVT_ERASE_BACKGROUND = wx.PyEventBinder( wxEVT_ERASE_BACKGROUND )
3065 EVT_CHAR = wx.PyEventBinder( wxEVT_CHAR )
3066 EVT_KEY_DOWN = wx.PyEventBinder( wxEVT_KEY_DOWN )
3067 EVT_KEY_UP = wx.PyEventBinder( wxEVT_KEY_UP )
3068 EVT_HOTKEY = wx.PyEventBinder( wxEVT_HOTKEY, 1)
3069 EVT_CHAR_HOOK = wx.PyEventBinder( wxEVT_CHAR_HOOK )
3070 EVT_MENU_OPEN = wx.PyEventBinder( wxEVT_MENU_OPEN )
3071 EVT_MENU_CLOSE = wx.PyEventBinder( wxEVT_MENU_CLOSE )
3072 EVT_MENU_HIGHLIGHT = wx.PyEventBinder( wxEVT_MENU_HIGHLIGHT, 1)
3073 EVT_MENU_HIGHLIGHT_ALL = wx.PyEventBinder( wxEVT_MENU_HIGHLIGHT )
3074 EVT_SET_FOCUS = wx.PyEventBinder( wxEVT_SET_FOCUS )
3075 EVT_KILL_FOCUS = wx.PyEventBinder( wxEVT_KILL_FOCUS )
3076 EVT_CHILD_FOCUS = wx.PyEventBinder( wxEVT_CHILD_FOCUS )
3077 EVT_ACTIVATE = wx.PyEventBinder( wxEVT_ACTIVATE )
3078 EVT_ACTIVATE_APP = wx.PyEventBinder( wxEVT_ACTIVATE_APP )
3079 EVT_END_SESSION = wx.PyEventBinder( wxEVT_END_SESSION )
3080 EVT_QUERY_END_SESSION = wx.PyEventBinder( wxEVT_QUERY_END_SESSION )
3081 EVT_DROP_FILES = wx.PyEventBinder( wxEVT_DROP_FILES )
3082 EVT_INIT_DIALOG = wx.PyEventBinder( wxEVT_INIT_DIALOG )
3083 EVT_SYS_COLOUR_CHANGED = wx.PyEventBinder( wxEVT_SYS_COLOUR_CHANGED )
3084 EVT_DISPLAY_CHANGED = wx.PyEventBinder( wxEVT_DISPLAY_CHANGED )
3085 EVT_SHOW = wx.PyEventBinder( wxEVT_SHOW )
3086 EVT_MAXIMIZE = wx.PyEventBinder( wxEVT_MAXIMIZE )
3087 EVT_ICONIZE = wx.PyEventBinder( wxEVT_ICONIZE )
3088 EVT_NAVIGATION_KEY = wx.PyEventBinder( wxEVT_NAVIGATION_KEY )
3089 EVT_PALETTE_CHANGED = wx.PyEventBinder( wxEVT_PALETTE_CHANGED )
3090 EVT_QUERY_NEW_PALETTE = wx.PyEventBinder( wxEVT_QUERY_NEW_PALETTE )
3091 EVT_WINDOW_CREATE = wx.PyEventBinder( wxEVT_CREATE )
3092 EVT_WINDOW_DESTROY = wx.PyEventBinder( wxEVT_DESTROY )
3093 EVT_SET_CURSOR = wx.PyEventBinder( wxEVT_SET_CURSOR )
3094 EVT_MOUSE_CAPTURE_CHANGED = wx.PyEventBinder( wxEVT_MOUSE_CAPTURE_CHANGED )
3095
3096 EVT_LEFT_DOWN = wx.PyEventBinder( wxEVT_LEFT_DOWN )
3097 EVT_LEFT_UP = wx.PyEventBinder( wxEVT_LEFT_UP )
3098 EVT_MIDDLE_DOWN = wx.PyEventBinder( wxEVT_MIDDLE_DOWN )
3099 EVT_MIDDLE_UP = wx.PyEventBinder( wxEVT_MIDDLE_UP )
3100 EVT_RIGHT_DOWN = wx.PyEventBinder( wxEVT_RIGHT_DOWN )
3101 EVT_RIGHT_UP = wx.PyEventBinder( wxEVT_RIGHT_UP )
3102 EVT_MOTION = wx.PyEventBinder( wxEVT_MOTION )
3103 EVT_LEFT_DCLICK = wx.PyEventBinder( wxEVT_LEFT_DCLICK )
3104 EVT_MIDDLE_DCLICK = wx.PyEventBinder( wxEVT_MIDDLE_DCLICK )
3105 EVT_RIGHT_DCLICK = wx.PyEventBinder( wxEVT_RIGHT_DCLICK )
3106 EVT_LEAVE_WINDOW = wx.PyEventBinder( wxEVT_LEAVE_WINDOW )
3107 EVT_ENTER_WINDOW = wx.PyEventBinder( wxEVT_ENTER_WINDOW )
3108 EVT_MOUSEWHEEL = wx.PyEventBinder( wxEVT_MOUSEWHEEL )
3109
3110 EVT_MOUSE_EVENTS = wx.PyEventBinder([ wxEVT_LEFT_DOWN,
3111 wxEVT_LEFT_UP,
3112 wxEVT_MIDDLE_DOWN,
3113 wxEVT_MIDDLE_UP,
3114 wxEVT_RIGHT_DOWN,
3115 wxEVT_RIGHT_UP,
3116 wxEVT_MOTION,
3117 wxEVT_LEFT_DCLICK,
3118 wxEVT_MIDDLE_DCLICK,
3119 wxEVT_RIGHT_DCLICK,
3120 wxEVT_ENTER_WINDOW,
3121 wxEVT_LEAVE_WINDOW,
3122 wxEVT_MOUSEWHEEL
3123 ])
3124
3125
3126 # Scrolling from wxWindow (sent to wxScrolledWindow)
3127 EVT_SCROLLWIN = wx.PyEventBinder([ wxEVT_SCROLLWIN_TOP,
3128 wxEVT_SCROLLWIN_BOTTOM,
3129 wxEVT_SCROLLWIN_LINEUP,
3130 wxEVT_SCROLLWIN_LINEDOWN,
3131 wxEVT_SCROLLWIN_PAGEUP,
3132 wxEVT_SCROLLWIN_PAGEDOWN,
3133 wxEVT_SCROLLWIN_THUMBTRACK,
3134 wxEVT_SCROLLWIN_THUMBRELEASE,
3135 ])
3136
3137 EVT_SCROLLWIN_TOP = wx.PyEventBinder( wxEVT_SCROLLWIN_TOP )
3138 EVT_SCROLLWIN_BOTTOM = wx.PyEventBinder( wxEVT_SCROLLWIN_BOTTOM )
3139 EVT_SCROLLWIN_LINEUP = wx.PyEventBinder( wxEVT_SCROLLWIN_LINEUP )
3140 EVT_SCROLLWIN_LINEDOWN = wx.PyEventBinder( wxEVT_SCROLLWIN_LINEDOWN )
3141 EVT_SCROLLWIN_PAGEUP = wx.PyEventBinder( wxEVT_SCROLLWIN_PAGEUP )
3142 EVT_SCROLLWIN_PAGEDOWN = wx.PyEventBinder( wxEVT_SCROLLWIN_PAGEDOWN )
3143 EVT_SCROLLWIN_THUMBTRACK = wx.PyEventBinder( wxEVT_SCROLLWIN_THUMBTRACK )
3144 EVT_SCROLLWIN_THUMBRELEASE = wx.PyEventBinder( wxEVT_SCROLLWIN_THUMBRELEASE )
3145
3146 # Scrolling from wxSlider and wxScrollBar
3147 EVT_SCROLL = wx.PyEventBinder([ wxEVT_SCROLL_TOP,
3148 wxEVT_SCROLL_BOTTOM,
3149 wxEVT_SCROLL_LINEUP,
3150 wxEVT_SCROLL_LINEDOWN,
3151 wxEVT_SCROLL_PAGEUP,
3152 wxEVT_SCROLL_PAGEDOWN,
3153 wxEVT_SCROLL_THUMBTRACK,
3154 wxEVT_SCROLL_THUMBRELEASE,
3155 wxEVT_SCROLL_ENDSCROLL,
3156 ])
3157
3158 EVT_SCROLL_TOP = wx.PyEventBinder( wxEVT_SCROLL_TOP )
3159 EVT_SCROLL_BOTTOM = wx.PyEventBinder( wxEVT_SCROLL_BOTTOM )
3160 EVT_SCROLL_LINEUP = wx.PyEventBinder( wxEVT_SCROLL_LINEUP )
3161 EVT_SCROLL_LINEDOWN = wx.PyEventBinder( wxEVT_SCROLL_LINEDOWN )
3162 EVT_SCROLL_PAGEUP = wx.PyEventBinder( wxEVT_SCROLL_PAGEUP )
3163 EVT_SCROLL_PAGEDOWN = wx.PyEventBinder( wxEVT_SCROLL_PAGEDOWN )
3164 EVT_SCROLL_THUMBTRACK = wx.PyEventBinder( wxEVT_SCROLL_THUMBTRACK )
3165 EVT_SCROLL_THUMBRELEASE = wx.PyEventBinder( wxEVT_SCROLL_THUMBRELEASE )
3166 EVT_SCROLL_ENDSCROLL = wx.PyEventBinder( wxEVT_SCROLL_ENDSCROLL )
3167
3168 # Scrolling from wxSlider and wxScrollBar, with an id
3169 EVT_COMMAND_SCROLL = wx.PyEventBinder([ wxEVT_SCROLL_TOP,
3170 wxEVT_SCROLL_BOTTOM,
3171 wxEVT_SCROLL_LINEUP,
3172 wxEVT_SCROLL_LINEDOWN,
3173 wxEVT_SCROLL_PAGEUP,
3174 wxEVT_SCROLL_PAGEDOWN,
3175 wxEVT_SCROLL_THUMBTRACK,
3176 wxEVT_SCROLL_THUMBRELEASE,
3177 wxEVT_SCROLL_ENDSCROLL,
3178 ], 1)
3179
3180 EVT_COMMAND_SCROLL_TOP = wx.PyEventBinder( wxEVT_SCROLL_TOP, 1)
3181 EVT_COMMAND_SCROLL_BOTTOM = wx.PyEventBinder( wxEVT_SCROLL_BOTTOM, 1)
3182 EVT_COMMAND_SCROLL_LINEUP = wx.PyEventBinder( wxEVT_SCROLL_LINEUP, 1)
3183 EVT_COMMAND_SCROLL_LINEDOWN = wx.PyEventBinder( wxEVT_SCROLL_LINEDOWN, 1)
3184 EVT_COMMAND_SCROLL_PAGEUP = wx.PyEventBinder( wxEVT_SCROLL_PAGEUP, 1)
3185 EVT_COMMAND_SCROLL_PAGEDOWN = wx.PyEventBinder( wxEVT_SCROLL_PAGEDOWN, 1)
3186 EVT_COMMAND_SCROLL_THUMBTRACK = wx.PyEventBinder( wxEVT_SCROLL_THUMBTRACK, 1)
3187 EVT_COMMAND_SCROLL_THUMBRELEASE = wx.PyEventBinder( wxEVT_SCROLL_THUMBRELEASE, 1)
3188 EVT_COMMAND_SCROLL_ENDSCROLL = wx.PyEventBinder( wxEVT_SCROLL_ENDSCROLL, 1)
3189
3190 EVT_BUTTON = wx.PyEventBinder( wxEVT_COMMAND_BUTTON_CLICKED, 1)
3191 EVT_CHECKBOX = wx.PyEventBinder( wxEVT_COMMAND_CHECKBOX_CLICKED, 1)
3192 EVT_CHOICE = wx.PyEventBinder( wxEVT_COMMAND_CHOICE_SELECTED, 1)
3193 EVT_LISTBOX = wx.PyEventBinder( wxEVT_COMMAND_LISTBOX_SELECTED, 1)
3194 EVT_LISTBOX_DCLICK = wx.PyEventBinder( wxEVT_COMMAND_LISTBOX_DOUBLECLICKED, 1)
3195 EVT_MENU = wx.PyEventBinder( wxEVT_COMMAND_MENU_SELECTED, 1)
3196 EVT_MENU_RANGE = wx.PyEventBinder( wxEVT_COMMAND_MENU_SELECTED, 2)
3197 EVT_SLIDER = wx.PyEventBinder( wxEVT_COMMAND_SLIDER_UPDATED, 1)
3198 EVT_RADIOBOX = wx.PyEventBinder( wxEVT_COMMAND_RADIOBOX_SELECTED, 1)
3199 EVT_RADIOBUTTON = wx.PyEventBinder( wxEVT_COMMAND_RADIOBUTTON_SELECTED, 1)
3200
3201 EVT_SCROLLBAR = wx.PyEventBinder( wxEVT_COMMAND_SCROLLBAR_UPDATED, 1)
3202 EVT_VLBOX = wx.PyEventBinder( wxEVT_COMMAND_VLBOX_SELECTED, 1)
3203 EVT_COMBOBOX = wx.PyEventBinder( wxEVT_COMMAND_COMBOBOX_SELECTED, 1)
3204 EVT_TOOL = wx.PyEventBinder( wxEVT_COMMAND_TOOL_CLICKED, 1)
3205 EVT_TOOL_RANGE = wx.PyEventBinder( wxEVT_COMMAND_TOOL_CLICKED, 2)
3206 EVT_TOOL_RCLICKED = wx.PyEventBinder( wxEVT_COMMAND_TOOL_RCLICKED, 1)
3207 EVT_TOOL_RCLICKED_RANGE = wx.PyEventBinder( wxEVT_COMMAND_TOOL_RCLICKED, 2)
3208 EVT_TOOL_ENTER = wx.PyEventBinder( wxEVT_COMMAND_TOOL_ENTER, 1)
3209 EVT_CHECKLISTBOX = wx.PyEventBinder( wxEVT_COMMAND_CHECKLISTBOX_TOGGLED, 1)
3210
3211
3212 EVT_COMMAND_LEFT_CLICK = wx.PyEventBinder( wxEVT_COMMAND_LEFT_CLICK, 1)
3213 EVT_COMMAND_LEFT_DCLICK = wx.PyEventBinder( wxEVT_COMMAND_LEFT_DCLICK, 1)
3214 EVT_COMMAND_RIGHT_CLICK = wx.PyEventBinder( wxEVT_COMMAND_RIGHT_CLICK, 1)
3215 EVT_COMMAND_RIGHT_DCLICK = wx.PyEventBinder( wxEVT_COMMAND_RIGHT_DCLICK, 1)
3216 EVT_COMMAND_SET_FOCUS = wx.PyEventBinder( wxEVT_COMMAND_SET_FOCUS, 1)
3217 EVT_COMMAND_KILL_FOCUS = wx.PyEventBinder( wxEVT_COMMAND_KILL_FOCUS, 1)
3218 EVT_COMMAND_ENTER = wx.PyEventBinder( wxEVT_COMMAND_ENTER, 1)
3219
3220 EVT_IDLE = wx.PyEventBinder( wxEVT_IDLE )
3221
3222 EVT_UPDATE_UI = wx.PyEventBinder( wxEVT_UPDATE_UI, 1)
3223 EVT_UPDATE_UI_RANGE = wx.PyEventBinder( wxEVT_UPDATE_UI, 2)
3224
3225 EVT_CONTEXT_MENU = wx.PyEventBinder( wxEVT_CONTEXT_MENU )
3226
3227
3228
3229 #---------------------------------------------------------------------------
3230
3231 class Event(Object):
3232 """Proxy of C++ Event class"""
3233 def __init__(self): raise RuntimeError, "No constructor defined"
3234 def __repr__(self):
3235 return "<%s.%s; proxy of C++ wxEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
3236 def __del__(self, destroy=_core_.delete_Event):
3237 """__del__(self)"""
3238 try:
3239 if self.thisown: destroy(self)
3240 except: pass
3241
3242 def SetEventType(*args, **kwargs):
3243 """SetEventType(self, wxEventType typ)"""
3244 return _core_.Event_SetEventType(*args, **kwargs)
3245
3246 def GetEventType(*args, **kwargs):
3247 """GetEventType(self) -> wxEventType"""
3248 return _core_.Event_GetEventType(*args, **kwargs)
3249
3250 def GetEventObject(*args, **kwargs):
3251 """GetEventObject(self) -> Object"""
3252 return _core_.Event_GetEventObject(*args, **kwargs)
3253
3254 def SetEventObject(*args, **kwargs):
3255 """SetEventObject(self, Object obj)"""
3256 return _core_.Event_SetEventObject(*args, **kwargs)
3257
3258 def GetTimestamp(*args, **kwargs):
3259 """GetTimestamp(self) -> long"""
3260 return _core_.Event_GetTimestamp(*args, **kwargs)
3261
3262 def SetTimestamp(*args, **kwargs):
3263 """SetTimestamp(self, long ts=0)"""
3264 return _core_.Event_SetTimestamp(*args, **kwargs)
3265
3266 def GetId(*args, **kwargs):
3267 """GetId(self) -> int"""
3268 return _core_.Event_GetId(*args, **kwargs)
3269
3270 def SetId(*args, **kwargs):
3271 """SetId(self, int Id)"""
3272 return _core_.Event_SetId(*args, **kwargs)
3273
3274 def IsCommandEvent(*args, **kwargs):
3275 """IsCommandEvent(self) -> bool"""
3276 return _core_.Event_IsCommandEvent(*args, **kwargs)
3277
3278 def Skip(*args, **kwargs):
3279 """Skip(self, bool skip=True)"""
3280 return _core_.Event_Skip(*args, **kwargs)
3281
3282 def GetSkipped(*args, **kwargs):
3283 """GetSkipped(self) -> bool"""
3284 return _core_.Event_GetSkipped(*args, **kwargs)
3285
3286 def ShouldPropagate(*args, **kwargs):
3287 """ShouldPropagate(self) -> bool"""
3288 return _core_.Event_ShouldPropagate(*args, **kwargs)
3289
3290 def StopPropagation(*args, **kwargs):
3291 """StopPropagation(self) -> int"""
3292 return _core_.Event_StopPropagation(*args, **kwargs)
3293
3294 def ResumePropagation(*args, **kwargs):
3295 """ResumePropagation(self, int propagationLevel)"""
3296 return _core_.Event_ResumePropagation(*args, **kwargs)
3297
3298 def Clone(*args, **kwargs):
3299 """Clone(self) -> Event"""
3300 return _core_.Event_Clone(*args, **kwargs)
3301
3302
3303 class EventPtr(Event):
3304 def __init__(self, this):
3305 self.this = this
3306 if not hasattr(self,"thisown"): self.thisown = 0
3307 self.__class__ = Event
3308 _core_.Event_swigregister(EventPtr)
3309
3310 #---------------------------------------------------------------------------
3311
3312 class PropagationDisabler(object):
3313 """Proxy of C++ PropagationDisabler class"""
3314 def __repr__(self):
3315 return "<%s.%s; proxy of C++ wxPropagationDisabler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
3316 def __init__(self, *args, **kwargs):
3317 """__init__(self, Event event) -> PropagationDisabler"""
3318 newobj = _core_.new_PropagationDisabler(*args, **kwargs)
3319 self.this = newobj.this
3320 self.thisown = 1
3321 del newobj.thisown
3322 def __del__(self, destroy=_core_.delete_PropagationDisabler):
3323 """__del__(self)"""
3324 try:
3325 if self.thisown: destroy(self)
3326 except: pass
3327
3328
3329 class PropagationDisablerPtr(PropagationDisabler):
3330 def __init__(self, this):
3331 self.this = this
3332 if not hasattr(self,"thisown"): self.thisown = 0
3333 self.__class__ = PropagationDisabler
3334 _core_.PropagationDisabler_swigregister(PropagationDisablerPtr)
3335
3336 class PropagateOnce(object):
3337 """Proxy of C++ PropagateOnce class"""
3338 def __repr__(self):
3339 return "<%s.%s; proxy of C++ wxPropagateOnce instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
3340 def __init__(self, *args, **kwargs):
3341 """__init__(self, Event event) -> PropagateOnce"""
3342 newobj = _core_.new_PropagateOnce(*args, **kwargs)
3343 self.this = newobj.this
3344 self.thisown = 1
3345 del newobj.thisown
3346 def __del__(self, destroy=_core_.delete_PropagateOnce):
3347 """__del__(self)"""
3348 try:
3349 if self.thisown: destroy(self)
3350 except: pass
3351
3352
3353 class PropagateOncePtr(PropagateOnce):
3354 def __init__(self, this):
3355 self.this = this
3356 if not hasattr(self,"thisown"): self.thisown = 0
3357 self.__class__ = PropagateOnce
3358 _core_.PropagateOnce_swigregister(PropagateOncePtr)
3359
3360 #---------------------------------------------------------------------------
3361
3362 class CommandEvent(Event):
3363 """Proxy of C++ CommandEvent class"""
3364 def __repr__(self):
3365 return "<%s.%s; proxy of C++ wxCommandEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
3366 def __init__(self, *args, **kwargs):
3367 """__init__(self, wxEventType commandType=wxEVT_NULL, int winid=0) -> CommandEvent"""
3368 newobj = _core_.new_CommandEvent(*args, **kwargs)
3369 self.this = newobj.this
3370 self.thisown = 1
3371 del newobj.thisown
3372 def GetSelection(*args, **kwargs):
3373 """GetSelection(self) -> int"""
3374 return _core_.CommandEvent_GetSelection(*args, **kwargs)
3375
3376 def SetString(*args, **kwargs):
3377 """SetString(self, String s)"""
3378 return _core_.CommandEvent_SetString(*args, **kwargs)
3379
3380 def GetString(*args, **kwargs):
3381 """GetString(self) -> String"""
3382 return _core_.CommandEvent_GetString(*args, **kwargs)
3383
3384 def IsChecked(*args, **kwargs):
3385 """IsChecked(self) -> bool"""
3386 return _core_.CommandEvent_IsChecked(*args, **kwargs)
3387
3388 Checked = IsChecked
3389 def IsSelection(*args, **kwargs):
3390 """IsSelection(self) -> bool"""
3391 return _core_.CommandEvent_IsSelection(*args, **kwargs)
3392
3393 def SetExtraLong(*args, **kwargs):
3394 """SetExtraLong(self, long extraLong)"""
3395 return _core_.CommandEvent_SetExtraLong(*args, **kwargs)
3396
3397 def GetExtraLong(*args, **kwargs):
3398 """GetExtraLong(self) -> long"""
3399 return _core_.CommandEvent_GetExtraLong(*args, **kwargs)
3400
3401 def SetInt(*args, **kwargs):
3402 """SetInt(self, int i)"""
3403 return _core_.CommandEvent_SetInt(*args, **kwargs)
3404
3405 def GetInt(*args, **kwargs):
3406 """GetInt(self) -> long"""
3407 return _core_.CommandEvent_GetInt(*args, **kwargs)
3408
3409 def Clone(*args, **kwargs):
3410 """Clone(self) -> Event"""
3411 return _core_.CommandEvent_Clone(*args, **kwargs)
3412
3413
3414 class CommandEventPtr(CommandEvent):
3415 def __init__(self, this):
3416 self.this = this
3417 if not hasattr(self,"thisown"): self.thisown = 0
3418 self.__class__ = CommandEvent
3419 _core_.CommandEvent_swigregister(CommandEventPtr)
3420
3421 #---------------------------------------------------------------------------
3422
3423 class NotifyEvent(CommandEvent):
3424 """Proxy of C++ NotifyEvent class"""
3425 def __repr__(self):
3426 return "<%s.%s; proxy of C++ wxNotifyEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
3427 def __init__(self, *args, **kwargs):
3428 """__init__(self, wxEventType commandType=wxEVT_NULL, int winid=0) -> NotifyEvent"""
3429 newobj = _core_.new_NotifyEvent(*args, **kwargs)
3430 self.this = newobj.this
3431 self.thisown = 1
3432 del newobj.thisown
3433 def Veto(*args, **kwargs):
3434 """Veto(self)"""
3435 return _core_.NotifyEvent_Veto(*args, **kwargs)
3436
3437 def Allow(*args, **kwargs):
3438 """Allow(self)"""
3439 return _core_.NotifyEvent_Allow(*args, **kwargs)
3440
3441 def IsAllowed(*args, **kwargs):
3442 """IsAllowed(self) -> bool"""
3443 return _core_.NotifyEvent_IsAllowed(*args, **kwargs)
3444
3445
3446 class NotifyEventPtr(NotifyEvent):
3447 def __init__(self, this):
3448 self.this = this
3449 if not hasattr(self,"thisown"): self.thisown = 0
3450 self.__class__ = NotifyEvent
3451 _core_.NotifyEvent_swigregister(NotifyEventPtr)
3452
3453 #---------------------------------------------------------------------------
3454
3455 class ScrollEvent(CommandEvent):
3456 """Proxy of C++ ScrollEvent class"""
3457 def __repr__(self):
3458 return "<%s.%s; proxy of C++ wxScrollEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
3459 def __init__(self, *args, **kwargs):
3460 """
3461 __init__(self, wxEventType commandType=wxEVT_NULL, int winid=0, int pos=0,
3462 int orient=0) -> ScrollEvent
3463 """
3464 newobj = _core_.new_ScrollEvent(*args, **kwargs)
3465 self.this = newobj.this
3466 self.thisown = 1
3467 del newobj.thisown
3468 def GetOrientation(*args, **kwargs):
3469 """GetOrientation(self) -> int"""
3470 return _core_.ScrollEvent_GetOrientation(*args, **kwargs)
3471
3472 def GetPosition(*args, **kwargs):
3473 """GetPosition(self) -> int"""
3474 return _core_.ScrollEvent_GetPosition(*args, **kwargs)
3475
3476 def SetOrientation(*args, **kwargs):
3477 """SetOrientation(self, int orient)"""
3478 return _core_.ScrollEvent_SetOrientation(*args, **kwargs)
3479
3480 def SetPosition(*args, **kwargs):
3481 """SetPosition(self, int pos)"""
3482 return _core_.ScrollEvent_SetPosition(*args, **kwargs)
3483
3484
3485 class ScrollEventPtr(ScrollEvent):
3486 def __init__(self, this):
3487 self.this = this
3488 if not hasattr(self,"thisown"): self.thisown = 0
3489 self.__class__ = ScrollEvent
3490 _core_.ScrollEvent_swigregister(ScrollEventPtr)
3491
3492 #---------------------------------------------------------------------------
3493
3494 class ScrollWinEvent(Event):
3495 """Proxy of C++ ScrollWinEvent class"""
3496 def __repr__(self):
3497 return "<%s.%s; proxy of C++ wxScrollWinEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
3498 def __init__(self, *args, **kwargs):
3499 """__init__(self, wxEventType commandType=wxEVT_NULL, int pos=0, int orient=0) -> ScrollWinEvent"""
3500 newobj = _core_.new_ScrollWinEvent(*args, **kwargs)
3501 self.this = newobj.this
3502 self.thisown = 1
3503 del newobj.thisown
3504 def GetOrientation(*args, **kwargs):
3505 """GetOrientation(self) -> int"""
3506 return _core_.ScrollWinEvent_GetOrientation(*args, **kwargs)
3507
3508 def GetPosition(*args, **kwargs):
3509 """GetPosition(self) -> int"""
3510 return _core_.ScrollWinEvent_GetPosition(*args, **kwargs)
3511
3512 def SetOrientation(*args, **kwargs):
3513 """SetOrientation(self, int orient)"""
3514 return _core_.ScrollWinEvent_SetOrientation(*args, **kwargs)
3515
3516 def SetPosition(*args, **kwargs):
3517 """SetPosition(self, int pos)"""
3518 return _core_.ScrollWinEvent_SetPosition(*args, **kwargs)
3519
3520
3521 class ScrollWinEventPtr(ScrollWinEvent):
3522 def __init__(self, this):
3523 self.this = this
3524 if not hasattr(self,"thisown"): self.thisown = 0
3525 self.__class__ = ScrollWinEvent
3526 _core_.ScrollWinEvent_swigregister(ScrollWinEventPtr)
3527
3528 #---------------------------------------------------------------------------
3529
3530 MOUSE_BTN_ANY = _core_.MOUSE_BTN_ANY
3531 MOUSE_BTN_NONE = _core_.MOUSE_BTN_NONE
3532 MOUSE_BTN_LEFT = _core_.MOUSE_BTN_LEFT
3533 MOUSE_BTN_MIDDLE = _core_.MOUSE_BTN_MIDDLE
3534 MOUSE_BTN_RIGHT = _core_.MOUSE_BTN_RIGHT
3535 class MouseEvent(Event):
3536 """Proxy of C++ MouseEvent class"""
3537 def __repr__(self):
3538 return "<%s.%s; proxy of C++ wxMouseEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
3539 def __init__(self, *args, **kwargs):
3540 """__init__(self, wxEventType mouseType=wxEVT_NULL) -> MouseEvent"""
3541 newobj = _core_.new_MouseEvent(*args, **kwargs)
3542 self.this = newobj.this
3543 self.thisown = 1
3544 del newobj.thisown
3545 def IsButton(*args, **kwargs):
3546 """IsButton(self) -> bool"""
3547 return _core_.MouseEvent_IsButton(*args, **kwargs)
3548
3549 def ButtonDown(*args, **kwargs):
3550 """ButtonDown(self, int but=MOUSE_BTN_ANY) -> bool"""
3551 return _core_.MouseEvent_ButtonDown(*args, **kwargs)
3552
3553 def ButtonDClick(*args, **kwargs):
3554 """ButtonDClick(self, int but=MOUSE_BTN_ANY) -> bool"""
3555 return _core_.MouseEvent_ButtonDClick(*args, **kwargs)
3556
3557 def ButtonUp(*args, **kwargs):
3558 """ButtonUp(self, int but=MOUSE_BTN_ANY) -> bool"""
3559 return _core_.MouseEvent_ButtonUp(*args, **kwargs)
3560
3561 def Button(*args, **kwargs):
3562 """Button(self, int but) -> bool"""
3563 return _core_.MouseEvent_Button(*args, **kwargs)
3564
3565 def ButtonIsDown(*args, **kwargs):
3566 """ButtonIsDown(self, int but) -> bool"""
3567 return _core_.MouseEvent_ButtonIsDown(*args, **kwargs)
3568
3569 def GetButton(*args, **kwargs):
3570 """GetButton(self) -> int"""
3571 return _core_.MouseEvent_GetButton(*args, **kwargs)
3572
3573 def ControlDown(*args, **kwargs):
3574 """ControlDown(self) -> bool"""
3575 return _core_.MouseEvent_ControlDown(*args, **kwargs)
3576
3577 def MetaDown(*args, **kwargs):
3578 """MetaDown(self) -> bool"""
3579 return _core_.MouseEvent_MetaDown(*args, **kwargs)
3580
3581 def AltDown(*args, **kwargs):
3582 """AltDown(self) -> bool"""
3583 return _core_.MouseEvent_AltDown(*args, **kwargs)
3584
3585 def ShiftDown(*args, **kwargs):
3586 """ShiftDown(self) -> bool"""
3587 return _core_.MouseEvent_ShiftDown(*args, **kwargs)
3588
3589 def CmdDown(*args, **kwargs):
3590 """
3591 CmdDown(self) -> bool
3592
3593 "Cmd" is a pseudo key which is the same as Control for PC and Unix
3594 platforms but the special "Apple" (a.k.a as "Command") key on
3595 Macs: it makes often sense to use it instead of, say, `ControlDown`
3596 because Cmd key is used for the same thing under Mac as Ctrl
3597 elsewhere. The Ctrl still exists, it's just not used for this
3598 purpose. So for non-Mac platforms this is the same as `ControlDown`
3599 and Macs this is the same as `MetaDown`.
3600 """
3601 return _core_.MouseEvent_CmdDown(*args, **kwargs)
3602
3603 def LeftDown(*args, **kwargs):
3604 """LeftDown(self) -> bool"""
3605 return _core_.MouseEvent_LeftDown(*args, **kwargs)
3606
3607 def MiddleDown(*args, **kwargs):
3608 """MiddleDown(self) -> bool"""
3609 return _core_.MouseEvent_MiddleDown(*args, **kwargs)
3610
3611 def RightDown(*args, **kwargs):
3612 """RightDown(self) -> bool"""
3613 return _core_.MouseEvent_RightDown(*args, **kwargs)
3614
3615 def LeftUp(*args, **kwargs):
3616 """LeftUp(self) -> bool"""
3617 return _core_.MouseEvent_LeftUp(*args, **kwargs)
3618
3619 def MiddleUp(*args, **kwargs):
3620 """MiddleUp(self) -> bool"""
3621 return _core_.MouseEvent_MiddleUp(*args, **kwargs)
3622
3623 def RightUp(*args, **kwargs):
3624 """RightUp(self) -> bool"""
3625 return _core_.MouseEvent_RightUp(*args, **kwargs)
3626
3627 def LeftDClick(*args, **kwargs):
3628 """LeftDClick(self) -> bool"""
3629 return _core_.MouseEvent_LeftDClick(*args, **kwargs)
3630
3631 def MiddleDClick(*args, **kwargs):
3632 """MiddleDClick(self) -> bool"""
3633 return _core_.MouseEvent_MiddleDClick(*args, **kwargs)
3634
3635 def RightDClick(*args, **kwargs):
3636 """RightDClick(self) -> bool"""
3637 return _core_.MouseEvent_RightDClick(*args, **kwargs)
3638
3639 def LeftIsDown(*args, **kwargs):
3640 """LeftIsDown(self) -> bool"""
3641 return _core_.MouseEvent_LeftIsDown(*args, **kwargs)
3642
3643 def MiddleIsDown(*args, **kwargs):
3644 """MiddleIsDown(self) -> bool"""
3645 return _core_.MouseEvent_MiddleIsDown(*args, **kwargs)
3646
3647 def RightIsDown(*args, **kwargs):
3648 """RightIsDown(self) -> bool"""
3649 return _core_.MouseEvent_RightIsDown(*args, **kwargs)
3650
3651 def Dragging(*args, **kwargs):
3652 """Dragging(self) -> bool"""
3653 return _core_.MouseEvent_Dragging(*args, **kwargs)
3654
3655 def Moving(*args, **kwargs):
3656 """Moving(self) -> bool"""
3657 return _core_.MouseEvent_Moving(*args, **kwargs)
3658
3659 def Entering(*args, **kwargs):
3660 """Entering(self) -> bool"""
3661 return _core_.MouseEvent_Entering(*args, **kwargs)
3662
3663 def Leaving(*args, **kwargs):
3664 """Leaving(self) -> bool"""
3665 return _core_.MouseEvent_Leaving(*args, **kwargs)
3666
3667 def GetPosition(*args, **kwargs):
3668 """
3669 GetPosition(self) -> Point
3670
3671 Returns the position of the mouse in window coordinates when the event
3672 happened.
3673 """
3674 return _core_.MouseEvent_GetPosition(*args, **kwargs)
3675
3676 def GetPositionTuple(*args, **kwargs):
3677 """
3678 GetPositionTuple() -> (x,y)
3679
3680 Returns the position of the mouse in window coordinates when the event
3681 happened.
3682 """
3683 return _core_.MouseEvent_GetPositionTuple(*args, **kwargs)
3684
3685 def GetLogicalPosition(*args, **kwargs):
3686 """GetLogicalPosition(self, DC dc) -> Point"""
3687 return _core_.MouseEvent_GetLogicalPosition(*args, **kwargs)
3688
3689 def GetX(*args, **kwargs):
3690 """GetX(self) -> int"""
3691 return _core_.MouseEvent_GetX(*args, **kwargs)
3692
3693 def GetY(*args, **kwargs):
3694 """GetY(self) -> int"""
3695 return _core_.MouseEvent_GetY(*args, **kwargs)
3696
3697 def GetWheelRotation(*args, **kwargs):
3698 """GetWheelRotation(self) -> int"""
3699 return _core_.MouseEvent_GetWheelRotation(*args, **kwargs)
3700
3701 def GetWheelDelta(*args, **kwargs):
3702 """GetWheelDelta(self) -> int"""
3703 return _core_.MouseEvent_GetWheelDelta(*args, **kwargs)
3704
3705 def GetLinesPerAction(*args, **kwargs):
3706 """GetLinesPerAction(self) -> int"""
3707 return _core_.MouseEvent_GetLinesPerAction(*args, **kwargs)
3708
3709 def IsPageScroll(*args, **kwargs):
3710 """IsPageScroll(self) -> bool"""
3711 return _core_.MouseEvent_IsPageScroll(*args, **kwargs)
3712
3713 m_x = property(_core_.MouseEvent_m_x_get, _core_.MouseEvent_m_x_set)
3714 m_y = property(_core_.MouseEvent_m_y_get, _core_.MouseEvent_m_y_set)
3715 m_leftDown = property(_core_.MouseEvent_m_leftDown_get, _core_.MouseEvent_m_leftDown_set)
3716 m_middleDown = property(_core_.MouseEvent_m_middleDown_get, _core_.MouseEvent_m_middleDown_set)
3717 m_rightDown = property(_core_.MouseEvent_m_rightDown_get, _core_.MouseEvent_m_rightDown_set)
3718 m_controlDown = property(_core_.MouseEvent_m_controlDown_get, _core_.MouseEvent_m_controlDown_set)
3719 m_shiftDown = property(_core_.MouseEvent_m_shiftDown_get, _core_.MouseEvent_m_shiftDown_set)
3720 m_altDown = property(_core_.MouseEvent_m_altDown_get, _core_.MouseEvent_m_altDown_set)
3721 m_metaDown = property(_core_.MouseEvent_m_metaDown_get, _core_.MouseEvent_m_metaDown_set)
3722 m_wheelRotation = property(_core_.MouseEvent_m_wheelRotation_get, _core_.MouseEvent_m_wheelRotation_set)
3723 m_wheelDelta = property(_core_.MouseEvent_m_wheelDelta_get, _core_.MouseEvent_m_wheelDelta_set)
3724 m_linesPerAction = property(_core_.MouseEvent_m_linesPerAction_get, _core_.MouseEvent_m_linesPerAction_set)
3725
3726 class MouseEventPtr(MouseEvent):
3727 def __init__(self, this):
3728 self.this = this
3729 if not hasattr(self,"thisown"): self.thisown = 0
3730 self.__class__ = MouseEvent
3731 _core_.MouseEvent_swigregister(MouseEventPtr)
3732
3733 #---------------------------------------------------------------------------
3734
3735 class SetCursorEvent(Event):
3736 """Proxy of C++ SetCursorEvent class"""
3737 def __repr__(self):
3738 return "<%s.%s; proxy of C++ wxSetCursorEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
3739 def __init__(self, *args, **kwargs):
3740 """__init__(self, int x=0, int y=0) -> SetCursorEvent"""
3741 newobj = _core_.new_SetCursorEvent(*args, **kwargs)
3742 self.this = newobj.this
3743 self.thisown = 1
3744 del newobj.thisown
3745 def GetX(*args, **kwargs):
3746 """GetX(self) -> int"""
3747 return _core_.SetCursorEvent_GetX(*args, **kwargs)
3748
3749 def GetY(*args, **kwargs):
3750 """GetY(self) -> int"""
3751 return _core_.SetCursorEvent_GetY(*args, **kwargs)
3752
3753 def SetCursor(*args, **kwargs):
3754 """SetCursor(self, Cursor cursor)"""
3755 return _core_.SetCursorEvent_SetCursor(*args, **kwargs)
3756
3757 def GetCursor(*args, **kwargs):
3758 """GetCursor(self) -> Cursor"""
3759 return _core_.SetCursorEvent_GetCursor(*args, **kwargs)
3760
3761 def HasCursor(*args, **kwargs):
3762 """HasCursor(self) -> bool"""
3763 return _core_.SetCursorEvent_HasCursor(*args, **kwargs)
3764
3765
3766 class SetCursorEventPtr(SetCursorEvent):
3767 def __init__(self, this):
3768 self.this = this
3769 if not hasattr(self,"thisown"): self.thisown = 0
3770 self.__class__ = SetCursorEvent
3771 _core_.SetCursorEvent_swigregister(SetCursorEventPtr)
3772
3773 #---------------------------------------------------------------------------
3774
3775 class KeyEvent(Event):
3776 """Proxy of C++ KeyEvent class"""
3777 def __repr__(self):
3778 return "<%s.%s; proxy of C++ wxKeyEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
3779 def __init__(self, *args, **kwargs):
3780 """__init__(self, wxEventType keyType=wxEVT_NULL) -> KeyEvent"""
3781 newobj = _core_.new_KeyEvent(*args, **kwargs)
3782 self.this = newobj.this
3783 self.thisown = 1
3784 del newobj.thisown
3785 def ControlDown(*args, **kwargs):
3786 """ControlDown(self) -> bool"""
3787 return _core_.KeyEvent_ControlDown(*args, **kwargs)
3788
3789 def MetaDown(*args, **kwargs):
3790 """MetaDown(self) -> bool"""
3791 return _core_.KeyEvent_MetaDown(*args, **kwargs)
3792
3793 def AltDown(*args, **kwargs):
3794 """AltDown(self) -> bool"""
3795 return _core_.KeyEvent_AltDown(*args, **kwargs)
3796
3797 def ShiftDown(*args, **kwargs):
3798 """ShiftDown(self) -> bool"""
3799 return _core_.KeyEvent_ShiftDown(*args, **kwargs)
3800
3801 def CmdDown(*args, **kwargs):
3802 """
3803 CmdDown(self) -> bool
3804
3805 "Cmd" is a pseudo key which is the same as Control for PC and Unix
3806 platforms but the special "Apple" (a.k.a as "Command") key on
3807 Macs: it makes often sense to use it instead of, say, `ControlDown`
3808 because Cmd key is used for the same thing under Mac as Ctrl
3809 elsewhere. The Ctrl still exists, it's just not used for this
3810 purpose. So for non-Mac platforms this is the same as `ControlDown`
3811 and Macs this is the same as `MetaDown`.
3812 """
3813 return _core_.KeyEvent_CmdDown(*args, **kwargs)
3814
3815 def HasModifiers(*args, **kwargs):
3816 """HasModifiers(self) -> bool"""
3817 return _core_.KeyEvent_HasModifiers(*args, **kwargs)
3818
3819 def GetKeyCode(*args, **kwargs):
3820 """GetKeyCode(self) -> int"""
3821 return _core_.KeyEvent_GetKeyCode(*args, **kwargs)
3822
3823 KeyCode = GetKeyCode
3824 def GetUnicodeKey(*args, **kwargs):
3825 """GetUnicodeKey(self) -> int"""
3826 return _core_.KeyEvent_GetUnicodeKey(*args, **kwargs)
3827
3828 GetUniChar = GetUnicodeKey
3829 def GetRawKeyCode(*args, **kwargs):
3830 """GetRawKeyCode(self) -> unsigned int"""
3831 return _core_.KeyEvent_GetRawKeyCode(*args, **kwargs)
3832
3833 def GetRawKeyFlags(*args, **kwargs):
3834 """GetRawKeyFlags(self) -> unsigned int"""
3835 return _core_.KeyEvent_GetRawKeyFlags(*args, **kwargs)
3836
3837 def GetPosition(*args, **kwargs):
3838 """
3839 GetPosition(self) -> Point
3840
3841 Find the position of the event.
3842 """
3843 return _core_.KeyEvent_GetPosition(*args, **kwargs)
3844
3845 def GetPositionTuple(*args, **kwargs):
3846 """
3847 GetPositionTuple() -> (x,y)
3848
3849 Find the position of the event.
3850 """
3851 return _core_.KeyEvent_GetPositionTuple(*args, **kwargs)
3852
3853 def GetX(*args, **kwargs):
3854 """GetX(self) -> int"""
3855 return _core_.KeyEvent_GetX(*args, **kwargs)
3856
3857 def GetY(*args, **kwargs):
3858 """GetY(self) -> int"""
3859 return _core_.KeyEvent_GetY(*args, **kwargs)
3860
3861 m_x = property(_core_.KeyEvent_m_x_get, _core_.KeyEvent_m_x_set)
3862 m_y = property(_core_.KeyEvent_m_y_get, _core_.KeyEvent_m_y_set)
3863 m_keyCode = property(_core_.KeyEvent_m_keyCode_get, _core_.KeyEvent_m_keyCode_set)
3864 m_controlDown = property(_core_.KeyEvent_m_controlDown_get, _core_.KeyEvent_m_controlDown_set)
3865 m_shiftDown = property(_core_.KeyEvent_m_shiftDown_get, _core_.KeyEvent_m_shiftDown_set)
3866 m_altDown = property(_core_.KeyEvent_m_altDown_get, _core_.KeyEvent_m_altDown_set)
3867 m_metaDown = property(_core_.KeyEvent_m_metaDown_get, _core_.KeyEvent_m_metaDown_set)
3868 m_scanCode = property(_core_.KeyEvent_m_scanCode_get, _core_.KeyEvent_m_scanCode_set)
3869 m_rawCode = property(_core_.KeyEvent_m_rawCode_get, _core_.KeyEvent_m_rawCode_set)
3870 m_rawFlags = property(_core_.KeyEvent_m_rawFlags_get, _core_.KeyEvent_m_rawFlags_set)
3871
3872 class KeyEventPtr(KeyEvent):
3873 def __init__(self, this):
3874 self.this = this
3875 if not hasattr(self,"thisown"): self.thisown = 0
3876 self.__class__ = KeyEvent
3877 _core_.KeyEvent_swigregister(KeyEventPtr)
3878
3879 #---------------------------------------------------------------------------
3880
3881 class SizeEvent(Event):
3882 """Proxy of C++ SizeEvent class"""
3883 def __repr__(self):
3884 return "<%s.%s; proxy of C++ wxSizeEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
3885 def __init__(self, *args, **kwargs):
3886 """__init__(self, Size sz=DefaultSize, int winid=0) -> SizeEvent"""
3887 newobj = _core_.new_SizeEvent(*args, **kwargs)
3888 self.this = newobj.this
3889 self.thisown = 1
3890 del newobj.thisown
3891 def GetSize(*args, **kwargs):
3892 """GetSize(self) -> Size"""
3893 return _core_.SizeEvent_GetSize(*args, **kwargs)
3894
3895 def GetRect(*args, **kwargs):
3896 """GetRect(self) -> Rect"""
3897 return _core_.SizeEvent_GetRect(*args, **kwargs)
3898
3899 def SetRect(*args, **kwargs):
3900 """SetRect(self, Rect rect)"""
3901 return _core_.SizeEvent_SetRect(*args, **kwargs)
3902
3903 def SetSize(*args, **kwargs):
3904 """SetSize(self, Size size)"""
3905 return _core_.SizeEvent_SetSize(*args, **kwargs)
3906
3907 m_size = property(_core_.SizeEvent_m_size_get, _core_.SizeEvent_m_size_set)
3908 m_rect = property(_core_.SizeEvent_m_rect_get, _core_.SizeEvent_m_rect_set)
3909
3910 class SizeEventPtr(SizeEvent):
3911 def __init__(self, this):
3912 self.this = this
3913 if not hasattr(self,"thisown"): self.thisown = 0
3914 self.__class__ = SizeEvent
3915 _core_.SizeEvent_swigregister(SizeEventPtr)
3916
3917 #---------------------------------------------------------------------------
3918
3919 class MoveEvent(Event):
3920 """Proxy of C++ MoveEvent class"""
3921 def __repr__(self):
3922 return "<%s.%s; proxy of C++ wxMoveEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
3923 def __init__(self, *args, **kwargs):
3924 """__init__(self, Point pos=DefaultPosition, int winid=0) -> MoveEvent"""
3925 newobj = _core_.new_MoveEvent(*args, **kwargs)
3926 self.this = newobj.this
3927 self.thisown = 1
3928 del newobj.thisown
3929 def GetPosition(*args, **kwargs):
3930 """GetPosition(self) -> Point"""
3931 return _core_.MoveEvent_GetPosition(*args, **kwargs)
3932
3933 def GetRect(*args, **kwargs):
3934 """GetRect(self) -> Rect"""
3935 return _core_.MoveEvent_GetRect(*args, **kwargs)
3936
3937 def SetRect(*args, **kwargs):
3938 """SetRect(self, Rect rect)"""
3939 return _core_.MoveEvent_SetRect(*args, **kwargs)
3940
3941 def SetPosition(*args, **kwargs):
3942 """SetPosition(self, Point pos)"""
3943 return _core_.MoveEvent_SetPosition(*args, **kwargs)
3944
3945 m_pos = property(_core_.MoveEvent_m_pos_get, _core_.MoveEvent_m_pos_set)
3946 m_rect = property(_core_.MoveEvent_m_rect_get, _core_.MoveEvent_m_rect_set)
3947
3948 class MoveEventPtr(MoveEvent):
3949 def __init__(self, this):
3950 self.this = this
3951 if not hasattr(self,"thisown"): self.thisown = 0
3952 self.__class__ = MoveEvent
3953 _core_.MoveEvent_swigregister(MoveEventPtr)
3954
3955 #---------------------------------------------------------------------------
3956
3957 class PaintEvent(Event):
3958 """Proxy of C++ PaintEvent class"""
3959 def __repr__(self):
3960 return "<%s.%s; proxy of C++ wxPaintEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
3961 def __init__(self, *args, **kwargs):
3962 """__init__(self, int Id=0) -> PaintEvent"""
3963 newobj = _core_.new_PaintEvent(*args, **kwargs)
3964 self.this = newobj.this
3965 self.thisown = 1
3966 del newobj.thisown
3967
3968 class PaintEventPtr(PaintEvent):
3969 def __init__(self, this):
3970 self.this = this
3971 if not hasattr(self,"thisown"): self.thisown = 0
3972 self.__class__ = PaintEvent
3973 _core_.PaintEvent_swigregister(PaintEventPtr)
3974
3975 class NcPaintEvent(Event):
3976 """Proxy of C++ NcPaintEvent class"""
3977 def __repr__(self):
3978 return "<%s.%s; proxy of C++ wxNcPaintEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
3979 def __init__(self, *args, **kwargs):
3980 """__init__(self, int winid=0) -> NcPaintEvent"""
3981 newobj = _core_.new_NcPaintEvent(*args, **kwargs)
3982 self.this = newobj.this
3983 self.thisown = 1
3984 del newobj.thisown
3985
3986 class NcPaintEventPtr(NcPaintEvent):
3987 def __init__(self, this):
3988 self.this = this
3989 if not hasattr(self,"thisown"): self.thisown = 0
3990 self.__class__ = NcPaintEvent
3991 _core_.NcPaintEvent_swigregister(NcPaintEventPtr)
3992
3993 #---------------------------------------------------------------------------
3994
3995 class EraseEvent(Event):
3996 """Proxy of C++ EraseEvent class"""
3997 def __repr__(self):
3998 return "<%s.%s; proxy of C++ wxEraseEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
3999 def __init__(self, *args, **kwargs):
4000 """__init__(self, int Id=0, DC dc=(wxDC *) NULL) -> EraseEvent"""
4001 newobj = _core_.new_EraseEvent(*args, **kwargs)
4002 self.this = newobj.this
4003 self.thisown = 1
4004 del newobj.thisown
4005 def GetDC(*args, **kwargs):
4006 """GetDC(self) -> DC"""
4007 return _core_.EraseEvent_GetDC(*args, **kwargs)
4008
4009
4010 class EraseEventPtr(EraseEvent):
4011 def __init__(self, this):
4012 self.this = this
4013 if not hasattr(self,"thisown"): self.thisown = 0
4014 self.__class__ = EraseEvent
4015 _core_.EraseEvent_swigregister(EraseEventPtr)
4016
4017 #---------------------------------------------------------------------------
4018
4019 class FocusEvent(Event):
4020 """Proxy of C++ FocusEvent class"""
4021 def __repr__(self):
4022 return "<%s.%s; proxy of C++ wxFocusEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
4023 def __init__(self, *args, **kwargs):
4024 """__init__(self, wxEventType type=wxEVT_NULL, int winid=0) -> FocusEvent"""
4025 newobj = _core_.new_FocusEvent(*args, **kwargs)
4026 self.this = newobj.this
4027 self.thisown = 1
4028 del newobj.thisown
4029 def GetWindow(*args, **kwargs):
4030 """GetWindow(self) -> Window"""
4031 return _core_.FocusEvent_GetWindow(*args, **kwargs)
4032
4033 def SetWindow(*args, **kwargs):
4034 """SetWindow(self, Window win)"""
4035 return _core_.FocusEvent_SetWindow(*args, **kwargs)
4036
4037
4038 class FocusEventPtr(FocusEvent):
4039 def __init__(self, this):
4040 self.this = this
4041 if not hasattr(self,"thisown"): self.thisown = 0
4042 self.__class__ = FocusEvent
4043 _core_.FocusEvent_swigregister(FocusEventPtr)
4044
4045 #---------------------------------------------------------------------------
4046
4047 class ChildFocusEvent(CommandEvent):
4048 """Proxy of C++ ChildFocusEvent class"""
4049 def __repr__(self):
4050 return "<%s.%s; proxy of C++ wxChildFocusEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
4051 def __init__(self, *args, **kwargs):
4052 """__init__(self, Window win=None) -> ChildFocusEvent"""
4053 newobj = _core_.new_ChildFocusEvent(*args, **kwargs)
4054 self.this = newobj.this
4055 self.thisown = 1
4056 del newobj.thisown
4057 def GetWindow(*args, **kwargs):
4058 """GetWindow(self) -> Window"""
4059 return _core_.ChildFocusEvent_GetWindow(*args, **kwargs)
4060
4061
4062 class ChildFocusEventPtr(ChildFocusEvent):
4063 def __init__(self, this):
4064 self.this = this
4065 if not hasattr(self,"thisown"): self.thisown = 0
4066 self.__class__ = ChildFocusEvent
4067 _core_.ChildFocusEvent_swigregister(ChildFocusEventPtr)
4068
4069 #---------------------------------------------------------------------------
4070
4071 class ActivateEvent(Event):
4072 """Proxy of C++ ActivateEvent class"""
4073 def __repr__(self):
4074 return "<%s.%s; proxy of C++ wxActivateEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
4075 def __init__(self, *args, **kwargs):
4076 """__init__(self, wxEventType type=wxEVT_NULL, bool active=True, int Id=0) -> ActivateEvent"""
4077 newobj = _core_.new_ActivateEvent(*args, **kwargs)
4078 self.this = newobj.this
4079 self.thisown = 1
4080 del newobj.thisown
4081 def GetActive(*args, **kwargs):
4082 """GetActive(self) -> bool"""
4083 return _core_.ActivateEvent_GetActive(*args, **kwargs)
4084
4085
4086 class ActivateEventPtr(ActivateEvent):
4087 def __init__(self, this):
4088 self.this = this
4089 if not hasattr(self,"thisown"): self.thisown = 0
4090 self.__class__ = ActivateEvent
4091 _core_.ActivateEvent_swigregister(ActivateEventPtr)
4092
4093 #---------------------------------------------------------------------------
4094
4095 class InitDialogEvent(Event):
4096 """Proxy of C++ InitDialogEvent class"""
4097 def __repr__(self):
4098 return "<%s.%s; proxy of C++ wxInitDialogEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
4099 def __init__(self, *args, **kwargs):
4100 """__init__(self, int Id=0) -> InitDialogEvent"""
4101 newobj = _core_.new_InitDialogEvent(*args, **kwargs)
4102 self.this = newobj.this
4103 self.thisown = 1
4104 del newobj.thisown
4105
4106 class InitDialogEventPtr(InitDialogEvent):
4107 def __init__(self, this):
4108 self.this = this
4109 if not hasattr(self,"thisown"): self.thisown = 0
4110 self.__class__ = InitDialogEvent
4111 _core_.InitDialogEvent_swigregister(InitDialogEventPtr)
4112
4113 #---------------------------------------------------------------------------
4114
4115 class MenuEvent(Event):
4116 """Proxy of C++ MenuEvent class"""
4117 def __repr__(self):
4118 return "<%s.%s; proxy of C++ wxMenuEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
4119 def __init__(self, *args, **kwargs):
4120 """__init__(self, wxEventType type=wxEVT_NULL, int winid=0, Menu menu=None) -> MenuEvent"""
4121 newobj = _core_.new_MenuEvent(*args, **kwargs)
4122 self.this = newobj.this
4123 self.thisown = 1
4124 del newobj.thisown
4125 def GetMenuId(*args, **kwargs):
4126 """GetMenuId(self) -> int"""
4127 return _core_.MenuEvent_GetMenuId(*args, **kwargs)
4128
4129 def IsPopup(*args, **kwargs):
4130 """IsPopup(self) -> bool"""
4131 return _core_.MenuEvent_IsPopup(*args, **kwargs)
4132
4133 def GetMenu(*args, **kwargs):
4134 """GetMenu(self) -> Menu"""
4135 return _core_.MenuEvent_GetMenu(*args, **kwargs)
4136
4137
4138 class MenuEventPtr(MenuEvent):
4139 def __init__(self, this):
4140 self.this = this
4141 if not hasattr(self,"thisown"): self.thisown = 0
4142 self.__class__ = MenuEvent
4143 _core_.MenuEvent_swigregister(MenuEventPtr)
4144
4145 #---------------------------------------------------------------------------
4146
4147 class CloseEvent(Event):
4148 """Proxy of C++ CloseEvent class"""
4149 def __repr__(self):
4150 return "<%s.%s; proxy of C++ wxCloseEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
4151 def __init__(self, *args, **kwargs):
4152 """__init__(self, wxEventType type=wxEVT_NULL, int winid=0) -> CloseEvent"""
4153 newobj = _core_.new_CloseEvent(*args, **kwargs)
4154 self.this = newobj.this
4155 self.thisown = 1
4156 del newobj.thisown
4157 def SetLoggingOff(*args, **kwargs):
4158 """SetLoggingOff(self, bool logOff)"""
4159 return _core_.CloseEvent_SetLoggingOff(*args, **kwargs)
4160
4161 def GetLoggingOff(*args, **kwargs):
4162 """GetLoggingOff(self) -> bool"""
4163 return _core_.CloseEvent_GetLoggingOff(*args, **kwargs)
4164
4165 def Veto(*args, **kwargs):
4166 """Veto(self, bool veto=True)"""
4167 return _core_.CloseEvent_Veto(*args, **kwargs)
4168
4169 def SetCanVeto(*args, **kwargs):
4170 """SetCanVeto(self, bool canVeto)"""
4171 return _core_.CloseEvent_SetCanVeto(*args, **kwargs)
4172
4173 def CanVeto(*args, **kwargs):
4174 """CanVeto(self) -> bool"""
4175 return _core_.CloseEvent_CanVeto(*args, **kwargs)
4176
4177 def GetVeto(*args, **kwargs):
4178 """GetVeto(self) -> bool"""
4179 return _core_.CloseEvent_GetVeto(*args, **kwargs)
4180
4181
4182 class CloseEventPtr(CloseEvent):
4183 def __init__(self, this):
4184 self.this = this
4185 if not hasattr(self,"thisown"): self.thisown = 0
4186 self.__class__ = CloseEvent
4187 _core_.CloseEvent_swigregister(CloseEventPtr)
4188
4189 #---------------------------------------------------------------------------
4190
4191 class ShowEvent(Event):
4192 """Proxy of C++ ShowEvent class"""
4193 def __repr__(self):
4194 return "<%s.%s; proxy of C++ wxShowEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
4195 def __init__(self, *args, **kwargs):
4196 """__init__(self, int winid=0, bool show=False) -> ShowEvent"""
4197 newobj = _core_.new_ShowEvent(*args, **kwargs)
4198 self.this = newobj.this
4199 self.thisown = 1
4200 del newobj.thisown
4201 def SetShow(*args, **kwargs):
4202 """SetShow(self, bool show)"""
4203 return _core_.ShowEvent_SetShow(*args, **kwargs)
4204
4205 def GetShow(*args, **kwargs):
4206 """GetShow(self) -> bool"""
4207 return _core_.ShowEvent_GetShow(*args, **kwargs)
4208
4209
4210 class ShowEventPtr(ShowEvent):
4211 def __init__(self, this):
4212 self.this = this
4213 if not hasattr(self,"thisown"): self.thisown = 0
4214 self.__class__ = ShowEvent
4215 _core_.ShowEvent_swigregister(ShowEventPtr)
4216
4217 #---------------------------------------------------------------------------
4218
4219 class IconizeEvent(Event):
4220 """Proxy of C++ IconizeEvent class"""
4221 def __repr__(self):
4222 return "<%s.%s; proxy of C++ wxIconizeEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
4223 def __init__(self, *args, **kwargs):
4224 """__init__(self, int id=0, bool iconized=True) -> IconizeEvent"""
4225 newobj = _core_.new_IconizeEvent(*args, **kwargs)
4226 self.this = newobj.this
4227 self.thisown = 1
4228 del newobj.thisown
4229 def Iconized(*args, **kwargs):
4230 """Iconized(self) -> bool"""
4231 return _core_.IconizeEvent_Iconized(*args, **kwargs)
4232
4233
4234 class IconizeEventPtr(IconizeEvent):
4235 def __init__(self, this):
4236 self.this = this
4237 if not hasattr(self,"thisown"): self.thisown = 0
4238 self.__class__ = IconizeEvent
4239 _core_.IconizeEvent_swigregister(IconizeEventPtr)
4240
4241 #---------------------------------------------------------------------------
4242
4243 class MaximizeEvent(Event):
4244 """Proxy of C++ MaximizeEvent class"""
4245 def __repr__(self):
4246 return "<%s.%s; proxy of C++ wxMaximizeEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
4247 def __init__(self, *args, **kwargs):
4248 """__init__(self, int id=0) -> MaximizeEvent"""
4249 newobj = _core_.new_MaximizeEvent(*args, **kwargs)
4250 self.this = newobj.this
4251 self.thisown = 1
4252 del newobj.thisown
4253
4254 class MaximizeEventPtr(MaximizeEvent):
4255 def __init__(self, this):
4256 self.this = this
4257 if not hasattr(self,"thisown"): self.thisown = 0
4258 self.__class__ = MaximizeEvent
4259 _core_.MaximizeEvent_swigregister(MaximizeEventPtr)
4260
4261 #---------------------------------------------------------------------------
4262
4263 class DropFilesEvent(Event):
4264 """Proxy of C++ DropFilesEvent class"""
4265 def __init__(self): raise RuntimeError, "No constructor defined"
4266 def __repr__(self):
4267 return "<%s.%s; proxy of C++ wxDropFilesEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
4268 def GetPosition(*args, **kwargs):
4269 """GetPosition(self) -> Point"""
4270 return _core_.DropFilesEvent_GetPosition(*args, **kwargs)
4271
4272 def GetNumberOfFiles(*args, **kwargs):
4273 """GetNumberOfFiles(self) -> int"""
4274 return _core_.DropFilesEvent_GetNumberOfFiles(*args, **kwargs)
4275
4276 def GetFiles(*args, **kwargs):
4277 """GetFiles(self) -> PyObject"""
4278 return _core_.DropFilesEvent_GetFiles(*args, **kwargs)
4279
4280
4281 class DropFilesEventPtr(DropFilesEvent):
4282 def __init__(self, this):
4283 self.this = this
4284 if not hasattr(self,"thisown"): self.thisown = 0
4285 self.__class__ = DropFilesEvent
4286 _core_.DropFilesEvent_swigregister(DropFilesEventPtr)
4287
4288 #---------------------------------------------------------------------------
4289
4290 UPDATE_UI_PROCESS_ALL = _core_.UPDATE_UI_PROCESS_ALL
4291 UPDATE_UI_PROCESS_SPECIFIED = _core_.UPDATE_UI_PROCESS_SPECIFIED
4292 class UpdateUIEvent(CommandEvent):
4293 """Proxy of C++ UpdateUIEvent class"""
4294 def __repr__(self):
4295 return "<%s.%s; proxy of C++ wxUpdateUIEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
4296 def __init__(self, *args, **kwargs):
4297 """__init__(self, int commandId=0) -> UpdateUIEvent"""
4298 newobj = _core_.new_UpdateUIEvent(*args, **kwargs)
4299 self.this = newobj.this
4300 self.thisown = 1
4301 del newobj.thisown
4302 def GetChecked(*args, **kwargs):
4303 """GetChecked(self) -> bool"""
4304 return _core_.UpdateUIEvent_GetChecked(*args, **kwargs)
4305
4306 def GetEnabled(*args, **kwargs):
4307 """GetEnabled(self) -> bool"""
4308 return _core_.UpdateUIEvent_GetEnabled(*args, **kwargs)
4309
4310 def GetText(*args, **kwargs):
4311 """GetText(self) -> String"""
4312 return _core_.UpdateUIEvent_GetText(*args, **kwargs)
4313
4314 def GetSetText(*args, **kwargs):
4315 """GetSetText(self) -> bool"""
4316 return _core_.UpdateUIEvent_GetSetText(*args, **kwargs)
4317
4318 def GetSetChecked(*args, **kwargs):
4319 """GetSetChecked(self) -> bool"""
4320 return _core_.UpdateUIEvent_GetSetChecked(*args, **kwargs)
4321
4322 def GetSetEnabled(*args, **kwargs):
4323 """GetSetEnabled(self) -> bool"""
4324 return _core_.UpdateUIEvent_GetSetEnabled(*args, **kwargs)
4325
4326 def Check(*args, **kwargs):
4327 """Check(self, bool check)"""
4328 return _core_.UpdateUIEvent_Check(*args, **kwargs)
4329
4330 def Enable(*args, **kwargs):
4331 """Enable(self, bool enable)"""
4332 return _core_.UpdateUIEvent_Enable(*args, **kwargs)
4333
4334 def SetText(*args, **kwargs):
4335 """SetText(self, String text)"""
4336 return _core_.UpdateUIEvent_SetText(*args, **kwargs)
4337
4338 def SetUpdateInterval(*args, **kwargs):
4339 """SetUpdateInterval(long updateInterval)"""
4340 return _core_.UpdateUIEvent_SetUpdateInterval(*args, **kwargs)
4341
4342 SetUpdateInterval = staticmethod(SetUpdateInterval)
4343 def GetUpdateInterval(*args, **kwargs):
4344 """GetUpdateInterval() -> long"""
4345 return _core_.UpdateUIEvent_GetUpdateInterval(*args, **kwargs)
4346
4347 GetUpdateInterval = staticmethod(GetUpdateInterval)
4348 def CanUpdate(*args, **kwargs):
4349 """CanUpdate(Window win) -> bool"""
4350 return _core_.UpdateUIEvent_CanUpdate(*args, **kwargs)
4351
4352 CanUpdate = staticmethod(CanUpdate)
4353 def ResetUpdateTime(*args, **kwargs):
4354 """ResetUpdateTime()"""
4355 return _core_.UpdateUIEvent_ResetUpdateTime(*args, **kwargs)
4356
4357 ResetUpdateTime = staticmethod(ResetUpdateTime)
4358 def SetMode(*args, **kwargs):
4359 """SetMode(int mode)"""
4360 return _core_.UpdateUIEvent_SetMode(*args, **kwargs)
4361
4362 SetMode = staticmethod(SetMode)
4363 def GetMode(*args, **kwargs):
4364 """GetMode() -> int"""
4365 return _core_.UpdateUIEvent_GetMode(*args, **kwargs)
4366
4367 GetMode = staticmethod(GetMode)
4368
4369 class UpdateUIEventPtr(UpdateUIEvent):
4370 def __init__(self, this):
4371 self.this = this
4372 if not hasattr(self,"thisown"): self.thisown = 0
4373 self.__class__ = UpdateUIEvent
4374 _core_.UpdateUIEvent_swigregister(UpdateUIEventPtr)
4375
4376 def UpdateUIEvent_SetUpdateInterval(*args, **kwargs):
4377 """UpdateUIEvent_SetUpdateInterval(long updateInterval)"""
4378 return _core_.UpdateUIEvent_SetUpdateInterval(*args, **kwargs)
4379
4380 def UpdateUIEvent_GetUpdateInterval(*args, **kwargs):
4381 """UpdateUIEvent_GetUpdateInterval() -> long"""
4382 return _core_.UpdateUIEvent_GetUpdateInterval(*args, **kwargs)
4383
4384 def UpdateUIEvent_CanUpdate(*args, **kwargs):
4385 """UpdateUIEvent_CanUpdate(Window win) -> bool"""
4386 return _core_.UpdateUIEvent_CanUpdate(*args, **kwargs)
4387
4388 def UpdateUIEvent_ResetUpdateTime(*args, **kwargs):
4389 """UpdateUIEvent_ResetUpdateTime()"""
4390 return _core_.UpdateUIEvent_ResetUpdateTime(*args, **kwargs)
4391
4392 def UpdateUIEvent_SetMode(*args, **kwargs):
4393 """UpdateUIEvent_SetMode(int mode)"""
4394 return _core_.UpdateUIEvent_SetMode(*args, **kwargs)
4395
4396 def UpdateUIEvent_GetMode(*args, **kwargs):
4397 """UpdateUIEvent_GetMode() -> int"""
4398 return _core_.UpdateUIEvent_GetMode(*args, **kwargs)
4399
4400 #---------------------------------------------------------------------------
4401
4402 class SysColourChangedEvent(Event):
4403 """Proxy of C++ SysColourChangedEvent class"""
4404 def __repr__(self):
4405 return "<%s.%s; proxy of C++ wxSysColourChangedEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
4406 def __init__(self, *args, **kwargs):
4407 """__init__(self) -> SysColourChangedEvent"""
4408 newobj = _core_.new_SysColourChangedEvent(*args, **kwargs)
4409 self.this = newobj.this
4410 self.thisown = 1
4411 del newobj.thisown
4412
4413 class SysColourChangedEventPtr(SysColourChangedEvent):
4414 def __init__(self, this):
4415 self.this = this
4416 if not hasattr(self,"thisown"): self.thisown = 0
4417 self.__class__ = SysColourChangedEvent
4418 _core_.SysColourChangedEvent_swigregister(SysColourChangedEventPtr)
4419
4420 #---------------------------------------------------------------------------
4421
4422 class MouseCaptureChangedEvent(Event):
4423 """Proxy of C++ MouseCaptureChangedEvent class"""
4424 def __repr__(self):
4425 return "<%s.%s; proxy of C++ wxMouseCaptureChangedEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
4426 def __init__(self, *args, **kwargs):
4427 """__init__(self, int winid=0, Window gainedCapture=None) -> MouseCaptureChangedEvent"""
4428 newobj = _core_.new_MouseCaptureChangedEvent(*args, **kwargs)
4429 self.this = newobj.this
4430 self.thisown = 1
4431 del newobj.thisown
4432 def GetCapturedWindow(*args, **kwargs):
4433 """GetCapturedWindow(self) -> Window"""
4434 return _core_.MouseCaptureChangedEvent_GetCapturedWindow(*args, **kwargs)
4435
4436
4437 class MouseCaptureChangedEventPtr(MouseCaptureChangedEvent):
4438 def __init__(self, this):
4439 self.this = this
4440 if not hasattr(self,"thisown"): self.thisown = 0
4441 self.__class__ = MouseCaptureChangedEvent
4442 _core_.MouseCaptureChangedEvent_swigregister(MouseCaptureChangedEventPtr)
4443
4444 #---------------------------------------------------------------------------
4445
4446 class DisplayChangedEvent(Event):
4447 """Proxy of C++ DisplayChangedEvent class"""
4448 def __repr__(self):
4449 return "<%s.%s; proxy of C++ wxDisplayChangedEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
4450 def __init__(self, *args, **kwargs):
4451 """__init__(self) -> DisplayChangedEvent"""
4452 newobj = _core_.new_DisplayChangedEvent(*args, **kwargs)
4453 self.this = newobj.this
4454 self.thisown = 1
4455 del newobj.thisown
4456
4457 class DisplayChangedEventPtr(DisplayChangedEvent):
4458 def __init__(self, this):
4459 self.this = this
4460 if not hasattr(self,"thisown"): self.thisown = 0
4461 self.__class__ = DisplayChangedEvent
4462 _core_.DisplayChangedEvent_swigregister(DisplayChangedEventPtr)
4463
4464 #---------------------------------------------------------------------------
4465
4466 class PaletteChangedEvent(Event):
4467 """Proxy of C++ PaletteChangedEvent class"""
4468 def __repr__(self):
4469 return "<%s.%s; proxy of C++ wxPaletteChangedEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
4470 def __init__(self, *args, **kwargs):
4471 """__init__(self, int id=0) -> PaletteChangedEvent"""
4472 newobj = _core_.new_PaletteChangedEvent(*args, **kwargs)
4473 self.this = newobj.this
4474 self.thisown = 1
4475 del newobj.thisown
4476 def SetChangedWindow(*args, **kwargs):
4477 """SetChangedWindow(self, Window win)"""
4478 return _core_.PaletteChangedEvent_SetChangedWindow(*args, **kwargs)
4479
4480 def GetChangedWindow(*args, **kwargs):
4481 """GetChangedWindow(self) -> Window"""
4482 return _core_.PaletteChangedEvent_GetChangedWindow(*args, **kwargs)
4483
4484
4485 class PaletteChangedEventPtr(PaletteChangedEvent):
4486 def __init__(self, this):
4487 self.this = this
4488 if not hasattr(self,"thisown"): self.thisown = 0
4489 self.__class__ = PaletteChangedEvent
4490 _core_.PaletteChangedEvent_swigregister(PaletteChangedEventPtr)
4491
4492 #---------------------------------------------------------------------------
4493
4494 class QueryNewPaletteEvent(Event):
4495 """Proxy of C++ QueryNewPaletteEvent class"""
4496 def __repr__(self):
4497 return "<%s.%s; proxy of C++ wxQueryNewPaletteEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
4498 def __init__(self, *args, **kwargs):
4499 """__init__(self, int winid=0) -> QueryNewPaletteEvent"""
4500 newobj = _core_.new_QueryNewPaletteEvent(*args, **kwargs)
4501 self.this = newobj.this
4502 self.thisown = 1
4503 del newobj.thisown
4504 def SetPaletteRealized(*args, **kwargs):
4505 """SetPaletteRealized(self, bool realized)"""
4506 return _core_.QueryNewPaletteEvent_SetPaletteRealized(*args, **kwargs)
4507
4508 def GetPaletteRealized(*args, **kwargs):
4509 """GetPaletteRealized(self) -> bool"""
4510 return _core_.QueryNewPaletteEvent_GetPaletteRealized(*args, **kwargs)
4511
4512
4513 class QueryNewPaletteEventPtr(QueryNewPaletteEvent):
4514 def __init__(self, this):
4515 self.this = this
4516 if not hasattr(self,"thisown"): self.thisown = 0
4517 self.__class__ = QueryNewPaletteEvent
4518 _core_.QueryNewPaletteEvent_swigregister(QueryNewPaletteEventPtr)
4519
4520 #---------------------------------------------------------------------------
4521
4522 class NavigationKeyEvent(Event):
4523 """Proxy of C++ NavigationKeyEvent class"""
4524 def __repr__(self):
4525 return "<%s.%s; proxy of C++ wxNavigationKeyEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
4526 def __init__(self, *args, **kwargs):
4527 """__init__(self) -> NavigationKeyEvent"""
4528 newobj = _core_.new_NavigationKeyEvent(*args, **kwargs)
4529 self.this = newobj.this
4530 self.thisown = 1
4531 del newobj.thisown
4532 def GetDirection(*args, **kwargs):
4533 """GetDirection(self) -> bool"""
4534 return _core_.NavigationKeyEvent_GetDirection(*args, **kwargs)
4535
4536 def SetDirection(*args, **kwargs):
4537 """SetDirection(self, bool forward)"""
4538 return _core_.NavigationKeyEvent_SetDirection(*args, **kwargs)
4539
4540 def IsWindowChange(*args, **kwargs):
4541 """IsWindowChange(self) -> bool"""
4542 return _core_.NavigationKeyEvent_IsWindowChange(*args, **kwargs)
4543
4544 def SetWindowChange(*args, **kwargs):
4545 """SetWindowChange(self, bool ischange)"""
4546 return _core_.NavigationKeyEvent_SetWindowChange(*args, **kwargs)
4547
4548 def SetFlags(*args, **kwargs):
4549 """SetFlags(self, long flags)"""
4550 return _core_.NavigationKeyEvent_SetFlags(*args, **kwargs)
4551
4552 def GetCurrentFocus(*args, **kwargs):
4553 """GetCurrentFocus(self) -> Window"""
4554 return _core_.NavigationKeyEvent_GetCurrentFocus(*args, **kwargs)
4555
4556 def SetCurrentFocus(*args, **kwargs):
4557 """SetCurrentFocus(self, Window win)"""
4558 return _core_.NavigationKeyEvent_SetCurrentFocus(*args, **kwargs)
4559
4560 IsBackward = _core_.NavigationKeyEvent_IsBackward
4561 IsForward = _core_.NavigationKeyEvent_IsForward
4562 WinChange = _core_.NavigationKeyEvent_WinChange
4563
4564 class NavigationKeyEventPtr(NavigationKeyEvent):
4565 def __init__(self, this):
4566 self.this = this
4567 if not hasattr(self,"thisown"): self.thisown = 0
4568 self.__class__ = NavigationKeyEvent
4569 _core_.NavigationKeyEvent_swigregister(NavigationKeyEventPtr)
4570
4571 #---------------------------------------------------------------------------
4572
4573 class WindowCreateEvent(CommandEvent):
4574 """Proxy of C++ WindowCreateEvent class"""
4575 def __repr__(self):
4576 return "<%s.%s; proxy of C++ wxWindowCreateEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
4577 def __init__(self, *args, **kwargs):
4578 """__init__(self, Window win=None) -> WindowCreateEvent"""
4579 newobj = _core_.new_WindowCreateEvent(*args, **kwargs)
4580 self.this = newobj.this
4581 self.thisown = 1
4582 del newobj.thisown
4583 def GetWindow(*args, **kwargs):
4584 """GetWindow(self) -> Window"""
4585 return _core_.WindowCreateEvent_GetWindow(*args, **kwargs)
4586
4587
4588 class WindowCreateEventPtr(WindowCreateEvent):
4589 def __init__(self, this):
4590 self.this = this
4591 if not hasattr(self,"thisown"): self.thisown = 0
4592 self.__class__ = WindowCreateEvent
4593 _core_.WindowCreateEvent_swigregister(WindowCreateEventPtr)
4594
4595 class WindowDestroyEvent(CommandEvent):
4596 """Proxy of C++ WindowDestroyEvent class"""
4597 def __repr__(self):
4598 return "<%s.%s; proxy of C++ wxWindowDestroyEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
4599 def __init__(self, *args, **kwargs):
4600 """__init__(self, Window win=None) -> WindowDestroyEvent"""
4601 newobj = _core_.new_WindowDestroyEvent(*args, **kwargs)
4602 self.this = newobj.this
4603 self.thisown = 1
4604 del newobj.thisown
4605 def GetWindow(*args, **kwargs):
4606 """GetWindow(self) -> Window"""
4607 return _core_.WindowDestroyEvent_GetWindow(*args, **kwargs)
4608
4609
4610 class WindowDestroyEventPtr(WindowDestroyEvent):
4611 def __init__(self, this):
4612 self.this = this
4613 if not hasattr(self,"thisown"): self.thisown = 0
4614 self.__class__ = WindowDestroyEvent
4615 _core_.WindowDestroyEvent_swigregister(WindowDestroyEventPtr)
4616
4617 #---------------------------------------------------------------------------
4618
4619 class ContextMenuEvent(CommandEvent):
4620 """Proxy of C++ ContextMenuEvent class"""
4621 def __repr__(self):
4622 return "<%s.%s; proxy of C++ wxContextMenuEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
4623 def __init__(self, *args, **kwargs):
4624 """__init__(self, wxEventType type=wxEVT_NULL, int winid=0, Point pt=DefaultPosition) -> ContextMenuEvent"""
4625 newobj = _core_.new_ContextMenuEvent(*args, **kwargs)
4626 self.this = newobj.this
4627 self.thisown = 1
4628 del newobj.thisown
4629 def GetPosition(*args, **kwargs):
4630 """GetPosition(self) -> Point"""
4631 return _core_.ContextMenuEvent_GetPosition(*args, **kwargs)
4632
4633 def SetPosition(*args, **kwargs):
4634 """SetPosition(self, Point pos)"""
4635 return _core_.ContextMenuEvent_SetPosition(*args, **kwargs)
4636
4637
4638 class ContextMenuEventPtr(ContextMenuEvent):
4639 def __init__(self, this):
4640 self.this = this
4641 if not hasattr(self,"thisown"): self.thisown = 0
4642 self.__class__ = ContextMenuEvent
4643 _core_.ContextMenuEvent_swigregister(ContextMenuEventPtr)
4644
4645 #---------------------------------------------------------------------------
4646
4647 IDLE_PROCESS_ALL = _core_.IDLE_PROCESS_ALL
4648 IDLE_PROCESS_SPECIFIED = _core_.IDLE_PROCESS_SPECIFIED
4649 class IdleEvent(Event):
4650 """Proxy of C++ IdleEvent class"""
4651 def __repr__(self):
4652 return "<%s.%s; proxy of C++ wxIdleEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
4653 def __init__(self, *args, **kwargs):
4654 """__init__(self) -> IdleEvent"""
4655 newobj = _core_.new_IdleEvent(*args, **kwargs)
4656 self.this = newobj.this
4657 self.thisown = 1
4658 del newobj.thisown
4659 def RequestMore(*args, **kwargs):
4660 """RequestMore(self, bool needMore=True)"""
4661 return _core_.IdleEvent_RequestMore(*args, **kwargs)
4662
4663 def MoreRequested(*args, **kwargs):
4664 """MoreRequested(self) -> bool"""
4665 return _core_.IdleEvent_MoreRequested(*args, **kwargs)
4666
4667 def SetMode(*args, **kwargs):
4668 """SetMode(int mode)"""
4669 return _core_.IdleEvent_SetMode(*args, **kwargs)
4670
4671 SetMode = staticmethod(SetMode)
4672 def GetMode(*args, **kwargs):
4673 """GetMode() -> int"""
4674 return _core_.IdleEvent_GetMode(*args, **kwargs)
4675
4676 GetMode = staticmethod(GetMode)
4677 def CanSend(*args, **kwargs):
4678 """CanSend(Window win) -> bool"""
4679 return _core_.IdleEvent_CanSend(*args, **kwargs)
4680
4681 CanSend = staticmethod(CanSend)
4682
4683 class IdleEventPtr(IdleEvent):
4684 def __init__(self, this):
4685 self.this = this
4686 if not hasattr(self,"thisown"): self.thisown = 0
4687 self.__class__ = IdleEvent
4688 _core_.IdleEvent_swigregister(IdleEventPtr)
4689
4690 def IdleEvent_SetMode(*args, **kwargs):
4691 """IdleEvent_SetMode(int mode)"""
4692 return _core_.IdleEvent_SetMode(*args, **kwargs)
4693
4694 def IdleEvent_GetMode(*args, **kwargs):
4695 """IdleEvent_GetMode() -> int"""
4696 return _core_.IdleEvent_GetMode(*args, **kwargs)
4697
4698 def IdleEvent_CanSend(*args, **kwargs):
4699 """IdleEvent_CanSend(Window win) -> bool"""
4700 return _core_.IdleEvent_CanSend(*args, **kwargs)
4701
4702 #---------------------------------------------------------------------------
4703
4704 class PyEvent(Event):
4705 """Proxy of C++ PyEvent class"""
4706 def __repr__(self):
4707 return "<%s.%s; proxy of C++ wxPyEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
4708 def __init__(self, *args, **kwargs):
4709 """__init__(self, int winid=0, wxEventType commandType=wxEVT_NULL) -> PyEvent"""
4710 newobj = _core_.new_PyEvent(*args, **kwargs)
4711 self.this = newobj.this
4712 self.thisown = 1
4713 del newobj.thisown
4714 self.SetSelf(self)
4715
4716 def __del__(self, destroy=_core_.delete_PyEvent):
4717 """__del__(self)"""
4718 try:
4719 if self.thisown: destroy(self)
4720 except: pass
4721
4722 def SetSelf(*args, **kwargs):
4723 """SetSelf(self, PyObject self)"""
4724 return _core_.PyEvent_SetSelf(*args, **kwargs)
4725
4726 def GetSelf(*args, **kwargs):
4727 """GetSelf(self) -> PyObject"""
4728 return _core_.PyEvent_GetSelf(*args, **kwargs)
4729
4730
4731 class PyEventPtr(PyEvent):
4732 def __init__(self, this):
4733 self.this = this
4734 if not hasattr(self,"thisown"): self.thisown = 0
4735 self.__class__ = PyEvent
4736 _core_.PyEvent_swigregister(PyEventPtr)
4737
4738 class PyCommandEvent(CommandEvent):
4739 """Proxy of C++ PyCommandEvent class"""
4740 def __repr__(self):
4741 return "<%s.%s; proxy of C++ wxPyCommandEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
4742 def __init__(self, *args, **kwargs):
4743 """__init__(self, wxEventType commandType=wxEVT_NULL, int id=0) -> PyCommandEvent"""
4744 newobj = _core_.new_PyCommandEvent(*args, **kwargs)
4745 self.this = newobj.this
4746 self.thisown = 1
4747 del newobj.thisown
4748 self.SetSelf(self)
4749
4750 def __del__(self, destroy=_core_.delete_PyCommandEvent):
4751 """__del__(self)"""
4752 try:
4753 if self.thisown: destroy(self)
4754 except: pass
4755
4756 def SetSelf(*args, **kwargs):
4757 """SetSelf(self, PyObject self)"""
4758 return _core_.PyCommandEvent_SetSelf(*args, **kwargs)
4759
4760 def GetSelf(*args, **kwargs):
4761 """GetSelf(self) -> PyObject"""
4762 return _core_.PyCommandEvent_GetSelf(*args, **kwargs)
4763
4764
4765 class PyCommandEventPtr(PyCommandEvent):
4766 def __init__(self, this):
4767 self.this = this
4768 if not hasattr(self,"thisown"): self.thisown = 0
4769 self.__class__ = PyCommandEvent
4770 _core_.PyCommandEvent_swigregister(PyCommandEventPtr)
4771
4772 #---------------------------------------------------------------------------
4773
4774 PYAPP_ASSERT_SUPPRESS = _core_.PYAPP_ASSERT_SUPPRESS
4775 PYAPP_ASSERT_EXCEPTION = _core_.PYAPP_ASSERT_EXCEPTION
4776 PYAPP_ASSERT_DIALOG = _core_.PYAPP_ASSERT_DIALOG
4777 PYAPP_ASSERT_LOG = _core_.PYAPP_ASSERT_LOG
4778 PRINT_WINDOWS = _core_.PRINT_WINDOWS
4779 PRINT_POSTSCRIPT = _core_.PRINT_POSTSCRIPT
4780 class PyApp(EvtHandler):
4781 """
4782 The ``wx.PyApp`` class is an *implementation detail*, please use the
4783 `wx.App` class (or some other derived class) instead.
4784 """
4785 def __repr__(self):
4786 return "<%s.%s; proxy of C++ wxPyApp instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
4787 def __init__(self, *args, **kwargs):
4788 """
4789 __init__(self) -> PyApp
4790
4791 Create a new application object, starting the bootstrap process.
4792 """
4793 newobj = _core_.new_PyApp(*args, **kwargs)
4794 self.this = newobj.this
4795 self.thisown = 1
4796 del newobj.thisown
4797 self._setCallbackInfo(self, PyApp)
4798 self._setOORInfo(self)
4799
4800 def __del__(self, destroy=_core_.delete_PyApp):
4801 """__del__(self)"""
4802 try:
4803 if self.thisown: destroy(self)
4804 except: pass
4805
4806 def _setCallbackInfo(*args, **kwargs):
4807 """_setCallbackInfo(self, PyObject self, PyObject _class)"""
4808 return _core_.PyApp__setCallbackInfo(*args, **kwargs)
4809
4810 def GetAppName(*args, **kwargs):
4811 """
4812 GetAppName(self) -> String
4813
4814 Get the application name.
4815 """
4816 return _core_.PyApp_GetAppName(*args, **kwargs)
4817
4818 def SetAppName(*args, **kwargs):
4819 """
4820 SetAppName(self, String name)
4821
4822 Set the application name. This value may be used automatically by
4823 `wx.Config` and such.
4824 """
4825 return _core_.PyApp_SetAppName(*args, **kwargs)
4826
4827 def GetClassName(*args, **kwargs):
4828 """
4829 GetClassName(self) -> String
4830
4831 Get the application's class name.
4832 """
4833 return _core_.PyApp_GetClassName(*args, **kwargs)
4834
4835 def SetClassName(*args, **kwargs):
4836 """
4837 SetClassName(self, String name)
4838
4839 Set the application's class name. This value may be used for
4840 X-resources if applicable for the platform
4841 """
4842 return _core_.PyApp_SetClassName(*args, **kwargs)
4843
4844 def GetVendorName(*args, **kwargs):
4845 """
4846 GetVendorName(self) -> String
4847
4848 Get the application's vendor name.
4849 """
4850 return _core_.PyApp_GetVendorName(*args, **kwargs)
4851
4852 def SetVendorName(*args, **kwargs):
4853 """
4854 SetVendorName(self, String name)
4855
4856 Set the application's vendor name. This value may be used
4857 automatically by `wx.Config` and such.
4858 """
4859 return _core_.PyApp_SetVendorName(*args, **kwargs)
4860
4861 def GetTraits(*args, **kwargs):
4862 """
4863 GetTraits(self) -> wxAppTraits
4864
4865 Return (and create if necessary) the app traits object to which we
4866 delegate for everything which either should be configurable by the
4867 user (then he can change the default behaviour simply by overriding
4868 CreateTraits() and returning his own traits object) or which is
4869 GUI/console dependent as then wx.AppTraits allows us to abstract the
4870 differences behind the common facade.
4871
4872 :todo: Add support for overriding CreateAppTraits in wxPython.
4873 """
4874 return _core_.PyApp_GetTraits(*args, **kwargs)
4875
4876 def ProcessPendingEvents(*args, **kwargs):
4877 """
4878 ProcessPendingEvents(self)
4879
4880 Process all events in the Pending Events list -- it is necessary to
4881 call this function to process posted events. This normally happens
4882 during each event loop iteration.
4883 """
4884 return _core_.PyApp_ProcessPendingEvents(*args, **kwargs)
4885
4886 def Yield(*args, **kwargs):
4887 """
4888 Yield(self, bool onlyIfNeeded=False) -> bool
4889
4890 Process all currently pending events right now, instead of waiting
4891 until return to the event loop. It is an error to call ``Yield``
4892 recursively unless the value of ``onlyIfNeeded`` is True.
4893
4894 :warning: This function is dangerous as it can lead to unexpected
4895 reentrancies (i.e. when called from an event handler it may
4896 result in calling the same event handler again), use with
4897 extreme care or, better, don't use at all!
4898
4899 :see: `wx.Yield`, `wx.YieldIfNeeded`, `wx.SafeYield`
4900
4901 """
4902 return _core_.PyApp_Yield(*args, **kwargs)
4903
4904 def WakeUpIdle(*args, **kwargs):
4905 """
4906 WakeUpIdle(self)
4907
4908 Make sure that idle events are sent again.
4909 :see: `wx.WakeUpIdle`
4910 """
4911 return _core_.PyApp_WakeUpIdle(*args, **kwargs)
4912
4913 def IsMainLoopRunning(*args, **kwargs):
4914 """
4915 IsMainLoopRunning() -> bool
4916
4917 Returns True if we're running the main loop, i.e. if the events can
4918 currently be dispatched.
4919 """
4920 return _core_.PyApp_IsMainLoopRunning(*args, **kwargs)
4921
4922 IsMainLoopRunning = staticmethod(IsMainLoopRunning)
4923 def MainLoop(*args, **kwargs):
4924 """
4925 MainLoop(self) -> int
4926
4927 Execute the main GUI loop, the function doesn't normally return until
4928 all top level windows have been closed and destroyed.
4929 """
4930 return _core_.PyApp_MainLoop(*args, **kwargs)
4931
4932 def Exit(*args, **kwargs):
4933 """
4934 Exit(self)
4935
4936 Exit the main loop thus terminating the application.
4937 :see: `wx.Exit`
4938 """
4939 return _core_.PyApp_Exit(*args, **kwargs)
4940
4941 def ExitMainLoop(*args, **kwargs):
4942 """
4943 ExitMainLoop(self)
4944
4945 Exit the main GUI loop during the next iteration of the main
4946 loop, (i.e. it does not stop the program immediately!)
4947 """
4948 return _core_.PyApp_ExitMainLoop(*args, **kwargs)
4949
4950 def Pending(*args, **kwargs):
4951 """
4952 Pending(self) -> bool
4953
4954 Returns True if there are unprocessed events in the event queue.
4955 """
4956 return _core_.PyApp_Pending(*args, **kwargs)
4957
4958 def Dispatch(*args, **kwargs):
4959 """
4960 Dispatch(self) -> bool
4961
4962 Process the first event in the event queue (blocks until an event
4963 appears if there are none currently)
4964 """
4965 return _core_.PyApp_Dispatch(*args, **kwargs)
4966
4967 def ProcessIdle(*args, **kwargs):
4968 """
4969 ProcessIdle(self) -> bool
4970
4971 Called from the MainLoop when the application becomes idle (there are
4972 no pending events) and sends a `wx.IdleEvent` to all interested
4973 parties. Returns True if more idle events are needed, False if not.
4974 """
4975 return _core_.PyApp_ProcessIdle(*args, **kwargs)
4976
4977 def SendIdleEvents(*args, **kwargs):
4978 """
4979 SendIdleEvents(self, Window win, IdleEvent event) -> bool
4980
4981 Send idle event to window and all subwindows. Returns True if more
4982 idle time is requested.
4983 """
4984 return _core_.PyApp_SendIdleEvents(*args, **kwargs)
4985
4986 def IsActive(*args, **kwargs):
4987 """
4988 IsActive(self) -> bool
4989
4990 Return True if our app has focus.
4991 """
4992 return _core_.PyApp_IsActive(*args, **kwargs)
4993
4994 def SetTopWindow(*args, **kwargs):
4995 """
4996 SetTopWindow(self, Window win)
4997
4998 Set the *main* top level window
4999 """
5000 return _core_.PyApp_SetTopWindow(*args, **kwargs)
5001
5002 def GetTopWindow(*args, **kwargs):
5003 """
5004 GetTopWindow(self) -> Window
5005
5006 Return the *main* top level window (if it hadn't been set previously
5007 with SetTopWindow(), will return just some top level window and, if
5008 there not any, will return None)
5009 """
5010 return _core_.PyApp_GetTopWindow(*args, **kwargs)
5011
5012 def SetExitOnFrameDelete(*args, **kwargs):
5013 """
5014 SetExitOnFrameDelete(self, bool flag)
5015
5016 Control the exit behaviour: by default, the program will exit the main
5017 loop (and so, usually, terminate) when the last top-level program
5018 window is deleted. Beware that if you disable this behaviour (with
5019 SetExitOnFrameDelete(False)), you'll have to call ExitMainLoop()
5020 explicitly from somewhere.
5021 """
5022 return _core_.PyApp_SetExitOnFrameDelete(*args, **kwargs)
5023
5024 def GetExitOnFrameDelete(*args, **kwargs):
5025 """
5026 GetExitOnFrameDelete(self) -> bool
5027
5028 Get the current exit behaviour setting.
5029 """
5030 return _core_.PyApp_GetExitOnFrameDelete(*args, **kwargs)
5031
5032 def SetUseBestVisual(*args, **kwargs):
5033 """
5034 SetUseBestVisual(self, bool flag)
5035
5036 Set whether the app should try to use the best available visual on
5037 systems where more than one is available, (Sun, SGI, XFree86 4, etc.)
5038 """
5039 return _core_.PyApp_SetUseBestVisual(*args, **kwargs)
5040
5041 def GetUseBestVisual(*args, **kwargs):
5042 """
5043 GetUseBestVisual(self) -> bool
5044
5045 Get current UseBestVisual setting.
5046 """
5047 return _core_.PyApp_GetUseBestVisual(*args, **kwargs)
5048
5049 def SetPrintMode(*args, **kwargs):
5050 """SetPrintMode(self, int mode)"""
5051 return _core_.PyApp_SetPrintMode(*args, **kwargs)
5052
5053 def GetPrintMode(*args, **kwargs):
5054 """GetPrintMode(self) -> int"""
5055 return _core_.PyApp_GetPrintMode(*args, **kwargs)
5056
5057 def SetAssertMode(*args, **kwargs):
5058 """
5059 SetAssertMode(self, int mode)
5060
5061 Set the OnAssert behaviour for debug and hybrid builds.
5062 """
5063 return _core_.PyApp_SetAssertMode(*args, **kwargs)
5064
5065 def GetAssertMode(*args, **kwargs):
5066 """
5067 GetAssertMode(self) -> int
5068
5069 Get the current OnAssert behaviour setting.
5070 """
5071 return _core_.PyApp_GetAssertMode(*args, **kwargs)
5072
5073 def GetMacSupportPCMenuShortcuts(*args, **kwargs):
5074 """GetMacSupportPCMenuShortcuts() -> bool"""
5075 return _core_.PyApp_GetMacSupportPCMenuShortcuts(*args, **kwargs)
5076
5077 GetMacSupportPCMenuShortcuts = staticmethod(GetMacSupportPCMenuShortcuts)
5078 def GetMacAboutMenuItemId(*args, **kwargs):
5079 """GetMacAboutMenuItemId() -> long"""
5080 return _core_.PyApp_GetMacAboutMenuItemId(*args, **kwargs)
5081
5082 GetMacAboutMenuItemId = staticmethod(GetMacAboutMenuItemId)
5083 def GetMacPreferencesMenuItemId(*args, **kwargs):
5084 """GetMacPreferencesMenuItemId() -> long"""
5085 return _core_.PyApp_GetMacPreferencesMenuItemId(*args, **kwargs)
5086
5087 GetMacPreferencesMenuItemId = staticmethod(GetMacPreferencesMenuItemId)
5088 def GetMacExitMenuItemId(*args, **kwargs):
5089 """GetMacExitMenuItemId() -> long"""
5090 return _core_.PyApp_GetMacExitMenuItemId(*args, **kwargs)
5091
5092 GetMacExitMenuItemId = staticmethod(GetMacExitMenuItemId)
5093 def GetMacHelpMenuTitleName(*args, **kwargs):
5094 """GetMacHelpMenuTitleName() -> String"""
5095 return _core_.PyApp_GetMacHelpMenuTitleName(*args, **kwargs)
5096
5097 GetMacHelpMenuTitleName = staticmethod(GetMacHelpMenuTitleName)
5098 def SetMacSupportPCMenuShortcuts(*args, **kwargs):
5099 """SetMacSupportPCMenuShortcuts(bool val)"""
5100 return _core_.PyApp_SetMacSupportPCMenuShortcuts(*args, **kwargs)
5101
5102 SetMacSupportPCMenuShortcuts = staticmethod(SetMacSupportPCMenuShortcuts)
5103 def SetMacAboutMenuItemId(*args, **kwargs):
5104 """SetMacAboutMenuItemId(long val)"""
5105 return _core_.PyApp_SetMacAboutMenuItemId(*args, **kwargs)
5106
5107 SetMacAboutMenuItemId = staticmethod(SetMacAboutMenuItemId)
5108 def SetMacPreferencesMenuItemId(*args, **kwargs):
5109 """SetMacPreferencesMenuItemId(long val)"""
5110 return _core_.PyApp_SetMacPreferencesMenuItemId(*args, **kwargs)
5111
5112 SetMacPreferencesMenuItemId = staticmethod(SetMacPreferencesMenuItemId)
5113 def SetMacExitMenuItemId(*args, **kwargs):
5114 """SetMacExitMenuItemId(long val)"""
5115 return _core_.PyApp_SetMacExitMenuItemId(*args, **kwargs)
5116
5117 SetMacExitMenuItemId = staticmethod(SetMacExitMenuItemId)
5118 def SetMacHelpMenuTitleName(*args, **kwargs):
5119 """SetMacHelpMenuTitleName(String val)"""
5120 return _core_.PyApp_SetMacHelpMenuTitleName(*args, **kwargs)
5121
5122 SetMacHelpMenuTitleName = staticmethod(SetMacHelpMenuTitleName)
5123 def _BootstrapApp(*args, **kwargs):
5124 """
5125 _BootstrapApp(self)
5126
5127 For internal use only
5128 """
5129 return _core_.PyApp__BootstrapApp(*args, **kwargs)
5130
5131 def GetComCtl32Version(*args, **kwargs):
5132 """
5133 GetComCtl32Version() -> int
5134
5135 Returns 400, 470, 471, etc. for comctl32.dll 4.00, 4.70, 4.71 or 0 if
5136 it wasn't found at all. Raises an exception on non-Windows platforms.
5137 """
5138 return _core_.PyApp_GetComCtl32Version(*args, **kwargs)
5139
5140 GetComCtl32Version = staticmethod(GetComCtl32Version)
5141
5142 class PyAppPtr(PyApp):
5143 def __init__(self, this):
5144 self.this = this
5145 if not hasattr(self,"thisown"): self.thisown = 0
5146 self.__class__ = PyApp
5147 _core_.PyApp_swigregister(PyAppPtr)
5148
5149 def PyApp_IsMainLoopRunning(*args, **kwargs):
5150 """
5151 PyApp_IsMainLoopRunning() -> bool
5152
5153 Returns True if we're running the main loop, i.e. if the events can
5154 currently be dispatched.
5155 """
5156 return _core_.PyApp_IsMainLoopRunning(*args, **kwargs)
5157
5158 def PyApp_GetMacSupportPCMenuShortcuts(*args, **kwargs):
5159 """PyApp_GetMacSupportPCMenuShortcuts() -> bool"""
5160 return _core_.PyApp_GetMacSupportPCMenuShortcuts(*args, **kwargs)
5161
5162 def PyApp_GetMacAboutMenuItemId(*args, **kwargs):
5163 """PyApp_GetMacAboutMenuItemId() -> long"""
5164 return _core_.PyApp_GetMacAboutMenuItemId(*args, **kwargs)
5165
5166 def PyApp_GetMacPreferencesMenuItemId(*args, **kwargs):
5167 """PyApp_GetMacPreferencesMenuItemId() -> long"""
5168 return _core_.PyApp_GetMacPreferencesMenuItemId(*args, **kwargs)
5169
5170 def PyApp_GetMacExitMenuItemId(*args, **kwargs):
5171 """PyApp_GetMacExitMenuItemId() -> long"""
5172 return _core_.PyApp_GetMacExitMenuItemId(*args, **kwargs)
5173
5174 def PyApp_GetMacHelpMenuTitleName(*args, **kwargs):
5175 """PyApp_GetMacHelpMenuTitleName() -> String"""
5176 return _core_.PyApp_GetMacHelpMenuTitleName(*args, **kwargs)
5177
5178 def PyApp_SetMacSupportPCMenuShortcuts(*args, **kwargs):
5179 """PyApp_SetMacSupportPCMenuShortcuts(bool val)"""
5180 return _core_.PyApp_SetMacSupportPCMenuShortcuts(*args, **kwargs)
5181
5182 def PyApp_SetMacAboutMenuItemId(*args, **kwargs):
5183 """PyApp_SetMacAboutMenuItemId(long val)"""
5184 return _core_.PyApp_SetMacAboutMenuItemId(*args, **kwargs)
5185
5186 def PyApp_SetMacPreferencesMenuItemId(*args, **kwargs):
5187 """PyApp_SetMacPreferencesMenuItemId(long val)"""
5188 return _core_.PyApp_SetMacPreferencesMenuItemId(*args, **kwargs)
5189
5190 def PyApp_SetMacExitMenuItemId(*args, **kwargs):
5191 """PyApp_SetMacExitMenuItemId(long val)"""
5192 return _core_.PyApp_SetMacExitMenuItemId(*args, **kwargs)
5193
5194 def PyApp_SetMacHelpMenuTitleName(*args, **kwargs):
5195 """PyApp_SetMacHelpMenuTitleName(String val)"""
5196 return _core_.PyApp_SetMacHelpMenuTitleName(*args, **kwargs)
5197
5198 def PyApp_GetComCtl32Version(*args, **kwargs):
5199 """
5200 PyApp_GetComCtl32Version() -> int
5201
5202 Returns 400, 470, 471, etc. for comctl32.dll 4.00, 4.70, 4.71 or 0 if
5203 it wasn't found at all. Raises an exception on non-Windows platforms.
5204 """
5205 return _core_.PyApp_GetComCtl32Version(*args, **kwargs)
5206
5207 #---------------------------------------------------------------------------
5208
5209
5210 def Exit(*args, **kwargs):
5211 """
5212 Exit()
5213
5214 Force an exit of the application. Convenience for wx.GetApp().Exit()
5215 """
5216 return _core_.Exit(*args, **kwargs)
5217
5218 def Yield(*args, **kwargs):
5219 """
5220 Yield() -> bool
5221
5222 Yield to other apps/messages. Convenience for wx.GetApp().Yield()
5223 """
5224 return _core_.Yield(*args, **kwargs)
5225
5226 def YieldIfNeeded(*args, **kwargs):
5227 """
5228 YieldIfNeeded() -> bool
5229
5230 Yield to other apps/messages. Convenience for wx.GetApp().Yield(True)
5231 """
5232 return _core_.YieldIfNeeded(*args, **kwargs)
5233
5234 def SafeYield(*args, **kwargs):
5235 """
5236 SafeYield(Window win=None, bool onlyIfNeeded=False) -> bool
5237
5238 This function is similar to `wx.Yield`, except that it disables the
5239 user input to all program windows before calling `wx.Yield` and
5240 re-enables it again afterwards. If ``win`` is not None, this window
5241 will remain enabled, allowing the implementation of some limited user
5242 interaction.
5243
5244 :Returns: the result of the call to `wx.Yield`.
5245 """
5246 return _core_.SafeYield(*args, **kwargs)
5247
5248 def WakeUpIdle(*args, **kwargs):
5249 """
5250 WakeUpIdle()
5251
5252 Cause the message queue to become empty again, so idle events will be
5253 sent.
5254 """
5255 return _core_.WakeUpIdle(*args, **kwargs)
5256
5257 def PostEvent(*args, **kwargs):
5258 """
5259 PostEvent(EvtHandler dest, Event event)
5260
5261 Send an event to a window or other wx.EvtHandler to be processed
5262 later.
5263 """
5264 return _core_.PostEvent(*args, **kwargs)
5265
5266 def App_CleanUp(*args, **kwargs):
5267 """
5268 App_CleanUp()
5269
5270 For internal use only, it is used to cleanup after wxWidgets when
5271 Python shuts down.
5272 """
5273 return _core_.App_CleanUp(*args, **kwargs)
5274
5275 def GetApp(*args, **kwargs):
5276 """
5277 GetApp() -> PyApp
5278
5279 Return a reference to the current wx.App object.
5280 """
5281 return _core_.GetApp(*args, **kwargs)
5282
5283 def SetDefaultPyEncoding(*args, **kwargs):
5284 """
5285 SetDefaultPyEncoding(string encoding)
5286
5287 Sets the encoding that wxPython will use when it needs to convert a
5288 Python string or unicode object to or from a wxString.
5289
5290 The default encoding is the value of ``locale.getdefaultlocale()[1]``
5291 but please be aware that the default encoding within the same locale
5292 may be slightly different on different platforms. For example, please
5293 see http://www.alanwood.net/demos/charsetdiffs.html for differences
5294 between the common latin/roman encodings.
5295 """
5296 return _core_.SetDefaultPyEncoding(*args, **kwargs)
5297
5298 def GetDefaultPyEncoding(*args, **kwargs):
5299 """
5300 GetDefaultPyEncoding() -> string
5301
5302 Gets the current encoding that wxPython will use when it needs to
5303 convert a Python string or unicode object to or from a wxString.
5304 """
5305 return _core_.GetDefaultPyEncoding(*args, **kwargs)
5306 #----------------------------------------------------------------------
5307
5308 class PyOnDemandOutputWindow:
5309 """
5310 A class that can be used for redirecting Python's stdout and
5311 stderr streams. It will do nothing until something is wrriten to
5312 the stream at which point it will create a Frame with a text area
5313 and write the text there.
5314 """
5315 def __init__(self, title = "wxPython: stdout/stderr"):
5316 self.frame = None
5317 self.title = title
5318 self.pos = wx.DefaultPosition
5319 self.size = (450, 300)
5320 self.parent = None
5321
5322 def SetParent(self, parent):
5323 """Set the window to be used as the popup Frame's parent."""
5324 self.parent = parent
5325
5326
5327 def CreateOutputWindow(self, st):
5328 self.frame = wx.Frame(self.parent, -1, self.title, self.pos, self.size,
5329 style=wx.DEFAULT_FRAME_STYLE)
5330 self.text = wx.TextCtrl(self.frame, -1, "",
5331 style=wx.TE_MULTILINE|wx.TE_READONLY)
5332 self.text.AppendText(st)
5333 self.frame.Show(True)
5334 EVT_CLOSE(self.frame, self.OnCloseWindow)
5335
5336
5337 def OnCloseWindow(self, event):
5338 if self.frame is not None:
5339 self.frame.Destroy()
5340 self.frame = None
5341 self.text = None
5342
5343
5344 # These methods provide the file-like output behaviour.
5345 def write(self, text):
5346 """
5347 Create the output window if needed and write the string to it.
5348 If not called in the context of the gui thread then uses
5349 CallAfter to do the work there.
5350 """
5351 if self.frame is None:
5352 if not wx.Thread_IsMain():
5353 wx.CallAfter(self.CreateOutputWindow, text)
5354 else:
5355 self.CreateOutputWindow(text)
5356 else:
5357 if not wx.Thread_IsMain():
5358 wx.CallAfter(self.text.AppendText, text)
5359 else:
5360 self.text.AppendText(text)
5361
5362
5363 def close(self):
5364 if self.frame is not None:
5365 wx.CallAfter(self.frame.Close)
5366
5367
5368 def flush(self):
5369 pass
5370
5371
5372
5373 #----------------------------------------------------------------------
5374
5375 _defRedirect = (wx.Platform == '__WXMSW__' or wx.Platform == '__WXMAC__')
5376
5377 class App(wx.PyApp):
5378 """
5379 The ``wx.App`` class represents the application and is used to:
5380
5381 * bootstrap the wxPython system and initialize the underlying
5382 gui toolkit
5383 * set and get application-wide properties
5384 * implement the windowing system main message or event loop,
5385 and to dispatch events to window instances
5386 * etc.
5387
5388 Every application must have a ``wx.App`` instance, and all
5389 creation of UI objects should be delayed until after the
5390 ``wx.App`` object has been created in order to ensure that the gui
5391 platform and wxWidgets have been fully initialized.
5392
5393 Normally you would derive from this class and implement an
5394 ``OnInit`` method that creates a frame and then calls
5395 ``self.SetTopWindow(frame)``.
5396
5397 :see: `wx.PySimpleApp` for a simpler app class that can be used
5398 directly.
5399 """
5400
5401 outputWindowClass = PyOnDemandOutputWindow
5402
5403 def __init__(self, redirect=_defRedirect, filename=None,
5404 useBestVisual=False, clearSigInt=True):
5405 """
5406 Construct a ``wx.App`` object.
5407
5408 :param redirect: Should ``sys.stdout`` and ``sys.stderr`` be
5409 redirected? Defaults to True on Windows and Mac, False
5410 otherwise. If `filename` is None then output will be
5411 redirected to a window that pops up as needed. (You can
5412 control what kind of window is created for the output by
5413 resetting the class variable ``outputWindowClass`` to a
5414 class of your choosing.)
5415
5416 :param filename: The name of a file to redirect output to, if
5417 redirect is True.
5418
5419 :param useBestVisual: Should the app try to use the best
5420 available visual provided by the system (only relevant on
5421 systems that have more than one visual.) This parameter
5422 must be used instead of calling `SetUseBestVisual` later
5423 on because it must be set before the underlying GUI
5424 toolkit is initialized.
5425
5426 :param clearSigInt: Should SIGINT be cleared? This allows the
5427 app to terminate upon a Ctrl-C in the console like other
5428 GUI apps will.
5429
5430 :note: You should override OnInit to do applicaition
5431 initialization to ensure that the system, toolkit and
5432 wxWidgets are fully initialized.
5433 """
5434 wx.PyApp.__init__(self)
5435
5436 if wx.Platform == "__WXMAC__":
5437 try:
5438 import MacOS
5439 if not MacOS.WMAvailable():
5440 print """\
5441 This program needs access to the screen. Please run with 'pythonw',
5442 not 'python', and only when you are logged in on the main display of
5443 your Mac."""
5444 _sys.exit(1)
5445 except SystemExit:
5446 raise
5447 except:
5448 pass
5449
5450 # This has to be done before OnInit
5451 self.SetUseBestVisual(useBestVisual)
5452
5453 # Set the default handler for SIGINT. This fixes a problem
5454 # where if Ctrl-C is pressed in the console that started this
5455 # app then it will not appear to do anything, (not even send
5456 # KeyboardInterrupt???) but will later segfault on exit. By
5457 # setting the default handler then the app will exit, as
5458 # expected (depending on platform.)
5459 if clearSigInt:
5460 try:
5461 import signal
5462 signal.signal(signal.SIGINT, signal.SIG_DFL)
5463 except:
5464 pass
5465
5466 # Save and redirect the stdio to a window?
5467 self.stdioWin = None
5468 self.saveStdio = (_sys.stdout, _sys.stderr)
5469 if redirect:
5470 self.RedirectStdio(filename)
5471
5472 # Use Python's install prefix as the default
5473 wx.StandardPaths.Get().SetInstallPrefix(_sys.prefix)
5474
5475 # This finishes the initialization of wxWindows and then calls
5476 # the OnInit that should be present in the derived class
5477 self._BootstrapApp()
5478
5479
5480 def __del__(self):
5481 try:
5482 self.RestoreStdio() # Just in case the MainLoop was overridden
5483 except:
5484 pass
5485
5486
5487 def SetTopWindow(self, frame):
5488 """Set the \"main\" top level window"""
5489 if self.stdioWin:
5490 self.stdioWin.SetParent(frame)
5491 wx.PyApp.SetTopWindow(self, frame)
5492
5493
5494 def MainLoop(self):
5495 """Execute the main GUI event loop"""
5496 wx.PyApp.MainLoop(self)
5497 self.RestoreStdio()
5498
5499
5500 def RedirectStdio(self, filename=None):
5501 """Redirect sys.stdout and sys.stderr to a file or a popup window."""
5502 if filename:
5503 _sys.stdout = _sys.stderr = open(filename, 'a')
5504 else:
5505 self.stdioWin = self.outputWindowClass()
5506 _sys.stdout = _sys.stderr = self.stdioWin
5507
5508
5509 def RestoreStdio(self):
5510 _sys.stdout, _sys.stderr = self.saveStdio
5511
5512
5513 def SetOutputWindowAttributes(self, title=None, pos=None, size=None):
5514 """
5515 Set the title, position and/or size of the output window if
5516 the stdio has been redirected. This should be called before
5517 any output would cause the output window to be created.
5518 """
5519 if self.stdioWin:
5520 if title is not None:
5521 self.stdioWin.title = title
5522 if pos is not None:
5523 self.stdioWin.pos = pos
5524 if size is not None:
5525 self.stdioWin.size = size
5526
5527
5528
5529
5530 # change from wx.PyApp_XX to wx.App_XX
5531 App_GetMacSupportPCMenuShortcuts = _core_.PyApp_GetMacSupportPCMenuShortcuts
5532 App_GetMacAboutMenuItemId = _core_.PyApp_GetMacAboutMenuItemId
5533 App_GetMacPreferencesMenuItemId = _core_.PyApp_GetMacPreferencesMenuItemId
5534 App_GetMacExitMenuItemId = _core_.PyApp_GetMacExitMenuItemId
5535 App_GetMacHelpMenuTitleName = _core_.PyApp_GetMacHelpMenuTitleName
5536 App_SetMacSupportPCMenuShortcuts = _core_.PyApp_SetMacSupportPCMenuShortcuts
5537 App_SetMacAboutMenuItemId = _core_.PyApp_SetMacAboutMenuItemId
5538 App_SetMacPreferencesMenuItemId = _core_.PyApp_SetMacPreferencesMenuItemId
5539 App_SetMacExitMenuItemId = _core_.PyApp_SetMacExitMenuItemId
5540 App_SetMacHelpMenuTitleName = _core_.PyApp_SetMacHelpMenuTitleName
5541 App_GetComCtl32Version = _core_.PyApp_GetComCtl32Version
5542
5543 #----------------------------------------------------------------------------
5544
5545 class PySimpleApp(wx.App):
5546 """
5547 A simple application class. You can just create one of these and
5548 then then make your top level windows later, and not have to worry
5549 about OnInit. For example::
5550
5551 app = wx.PySimpleApp()
5552 frame = wx.Frame(None, title='Hello World')
5553 frame.Show()
5554 app.MainLoop()
5555
5556 :see: `wx.App`
5557 """
5558
5559 def __init__(self, redirect=False, filename=None,
5560 useBestVisual=False, clearSigInt=True):
5561 """
5562 :see: `wx.App.__init__`
5563 """
5564 wx.App.__init__(self, redirect, filename, useBestVisual, clearSigInt)
5565
5566 def OnInit(self):
5567 return True
5568
5569
5570
5571 # Is anybody using this one?
5572 class PyWidgetTester(wx.App):
5573 def __init__(self, size = (250, 100)):
5574 self.size = size
5575 wx.App.__init__(self, 0)
5576
5577 def OnInit(self):
5578 self.frame = wx.Frame(None, -1, "Widget Tester", pos=(0,0), size=self.size)
5579 self.SetTopWindow(self.frame)
5580 return True
5581
5582 def SetWidget(self, widgetClass, *args, **kwargs):
5583 w = widgetClass(self.frame, *args, **kwargs)
5584 self.frame.Show(True)
5585
5586 #----------------------------------------------------------------------------
5587 # DO NOT hold any other references to this object. This is how we
5588 # know when to cleanup system resources that wxWidgets is holding. When
5589 # the sys module is unloaded, the refcount on sys.__wxPythonCleanup
5590 # goes to zero and it calls the wx.App_CleanUp function.
5591
5592 class __wxPyCleanup:
5593 def __init__(self):
5594 self.cleanup = _core_.App_CleanUp
5595 def __del__(self):
5596 self.cleanup()
5597
5598 _sys.__wxPythonCleanup = __wxPyCleanup()
5599
5600 ## # another possible solution, but it gets called too early...
5601 ## import atexit
5602 ## atexit.register(_core_.wxApp_CleanUp)
5603
5604
5605 #----------------------------------------------------------------------------
5606
5607 #---------------------------------------------------------------------------
5608
5609 class EventLoop(object):
5610 """Proxy of C++ EventLoop class"""
5611 def __repr__(self):
5612 return "<%s.%s; proxy of C++ wxEventLoop instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
5613 def __init__(self, *args, **kwargs):
5614 """__init__(self) -> EventLoop"""
5615 newobj = _core_.new_EventLoop(*args, **kwargs)
5616 self.this = newobj.this
5617 self.thisown = 1
5618 del newobj.thisown
5619 def __del__(self, destroy=_core_.delete_EventLoop):
5620 """__del__(self)"""
5621 try:
5622 if self.thisown: destroy(self)
5623 except: pass
5624
5625 def Run(*args, **kwargs):
5626 """Run(self) -> int"""
5627 return _core_.EventLoop_Run(*args, **kwargs)
5628
5629 def Exit(*args, **kwargs):
5630 """Exit(self, int rc=0)"""
5631 return _core_.EventLoop_Exit(*args, **kwargs)
5632
5633 def Pending(*args, **kwargs):
5634 """Pending(self) -> bool"""
5635 return _core_.EventLoop_Pending(*args, **kwargs)
5636
5637 def Dispatch(*args, **kwargs):
5638 """Dispatch(self) -> bool"""
5639 return _core_.EventLoop_Dispatch(*args, **kwargs)
5640
5641 def IsRunning(*args, **kwargs):
5642 """IsRunning(self) -> bool"""
5643 return _core_.EventLoop_IsRunning(*args, **kwargs)
5644
5645 def GetActive(*args, **kwargs):
5646 """GetActive() -> EventLoop"""
5647 return _core_.EventLoop_GetActive(*args, **kwargs)
5648
5649 GetActive = staticmethod(GetActive)
5650 def SetActive(*args, **kwargs):
5651 """SetActive(EventLoop loop)"""
5652 return _core_.EventLoop_SetActive(*args, **kwargs)
5653
5654 SetActive = staticmethod(SetActive)
5655
5656 class EventLoopPtr(EventLoop):
5657 def __init__(self, this):
5658 self.this = this
5659 if not hasattr(self,"thisown"): self.thisown = 0
5660 self.__class__ = EventLoop
5661 _core_.EventLoop_swigregister(EventLoopPtr)
5662
5663 def EventLoop_GetActive(*args, **kwargs):
5664 """EventLoop_GetActive() -> EventLoop"""
5665 return _core_.EventLoop_GetActive(*args, **kwargs)
5666
5667 def EventLoop_SetActive(*args, **kwargs):
5668 """EventLoop_SetActive(EventLoop loop)"""
5669 return _core_.EventLoop_SetActive(*args, **kwargs)
5670
5671 #---------------------------------------------------------------------------
5672
5673 class AcceleratorEntry(object):
5674 """
5675 A class used to define items in an `wx.AcceleratorTable`. wxPython
5676 programs can choose to use wx.AcceleratorEntry objects, but using a
5677 list of 3-tuple of integers (flags, keyCode, cmdID) usually works just
5678 as well. See `__init__` for of the tuple values.
5679
5680 :see: `wx.AcceleratorTable`
5681 """
5682 def __repr__(self):
5683 return "<%s.%s; proxy of C++ wxAcceleratorEntry instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
5684 def __init__(self, *args, **kwargs):
5685 """
5686 __init__(self, int flags=0, int keyCode=0, int cmdID=0) -> AcceleratorEntry
5687
5688 Construct a wx.AcceleratorEntry.
5689 """
5690 newobj = _core_.new_AcceleratorEntry(*args, **kwargs)
5691 self.this = newobj.this
5692 self.thisown = 1
5693 del newobj.thisown
5694 def __del__(self, destroy=_core_.delete_AcceleratorEntry):
5695 """__del__(self)"""
5696 try:
5697 if self.thisown: destroy(self)
5698 except: pass
5699
5700 def Set(*args, **kwargs):
5701 """
5702 Set(self, int flags, int keyCode, int cmd)
5703
5704 (Re)set the attributes of a wx.AcceleratorEntry.
5705 :see `__init__`
5706 """
5707 return _core_.AcceleratorEntry_Set(*args, **kwargs)
5708
5709 def GetFlags(*args, **kwargs):
5710 """
5711 GetFlags(self) -> int
5712
5713 Get the AcceleratorEntry's flags.
5714 """
5715 return _core_.AcceleratorEntry_GetFlags(*args, **kwargs)
5716
5717 def GetKeyCode(*args, **kwargs):
5718 """
5719 GetKeyCode(self) -> int
5720
5721 Get the AcceleratorEntry's keycode.
5722 """
5723 return _core_.AcceleratorEntry_GetKeyCode(*args, **kwargs)
5724
5725 def GetCommand(*args, **kwargs):
5726 """
5727 GetCommand(self) -> int
5728
5729 Get the AcceleratorEntry's command ID.
5730 """
5731 return _core_.AcceleratorEntry_GetCommand(*args, **kwargs)
5732
5733
5734 class AcceleratorEntryPtr(AcceleratorEntry):
5735 def __init__(self, this):
5736 self.this = this
5737 if not hasattr(self,"thisown"): self.thisown = 0
5738 self.__class__ = AcceleratorEntry
5739 _core_.AcceleratorEntry_swigregister(AcceleratorEntryPtr)
5740
5741 class AcceleratorTable(Object):
5742 """
5743 An accelerator table allows the application to specify a table of
5744 keyboard shortcuts for menus or other commands. On Windows, menu or
5745 button commands are supported; on GTK, only menu commands are
5746 supported.
5747 """
5748 def __repr__(self):
5749 return "<%s.%s; proxy of C++ wxAcceleratorTable instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
5750 def __init__(self, *args, **kwargs):
5751 """
5752 __init__(entries) -> AcceleratorTable
5753
5754 Construct an AcceleratorTable from a list of `wx.AcceleratorEntry`
5755 items or or of 3-tuples (flags, keyCode, cmdID)
5756
5757 :see: `wx.AcceleratorEntry`
5758 """
5759 newobj = _core_.new_AcceleratorTable(*args, **kwargs)
5760 self.this = newobj.this
5761 self.thisown = 1
5762 del newobj.thisown
5763 def __del__(self, destroy=_core_.delete_AcceleratorTable):
5764 """__del__(self)"""
5765 try:
5766 if self.thisown: destroy(self)
5767 except: pass
5768
5769 def Ok(*args, **kwargs):
5770 """Ok(self) -> bool"""
5771 return _core_.AcceleratorTable_Ok(*args, **kwargs)
5772
5773
5774 class AcceleratorTablePtr(AcceleratorTable):
5775 def __init__(self, this):
5776 self.this = this
5777 if not hasattr(self,"thisown"): self.thisown = 0
5778 self.__class__ = AcceleratorTable
5779 _core_.AcceleratorTable_swigregister(AcceleratorTablePtr)
5780
5781
5782 def GetAccelFromString(*args, **kwargs):
5783 """GetAccelFromString(String label) -> AcceleratorEntry"""
5784 return _core_.GetAccelFromString(*args, **kwargs)
5785 #---------------------------------------------------------------------------
5786
5787 class VisualAttributes(object):
5788 """struct containing all the visual attributes of a control"""
5789 def __repr__(self):
5790 return "<%s.%s; proxy of C++ wxVisualAttributes instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
5791 def __init__(self, *args, **kwargs):
5792 """
5793 __init__(self) -> VisualAttributes
5794
5795 struct containing all the visual attributes of a control
5796 """
5797 newobj = _core_.new_VisualAttributes(*args, **kwargs)
5798 self.this = newobj.this
5799 self.thisown = 1
5800 del newobj.thisown
5801 def __del__(self, destroy=_core_.delete_VisualAttributes):
5802 """__del__(self)"""
5803 try:
5804 if self.thisown: destroy(self)
5805 except: pass
5806
5807 font = property(_core_.VisualAttributes_font_get, _core_.VisualAttributes_font_set)
5808 colFg = property(_core_.VisualAttributes_colFg_get, _core_.VisualAttributes_colFg_set)
5809 colBg = property(_core_.VisualAttributes_colBg_get, _core_.VisualAttributes_colBg_set)
5810
5811 class VisualAttributesPtr(VisualAttributes):
5812 def __init__(self, this):
5813 self.this = this
5814 if not hasattr(self,"thisown"): self.thisown = 0
5815 self.__class__ = VisualAttributes
5816 _core_.VisualAttributes_swigregister(VisualAttributesPtr)
5817 NullAcceleratorTable = cvar.NullAcceleratorTable
5818 PanelNameStr = cvar.PanelNameStr
5819
5820 WINDOW_VARIANT_NORMAL = _core_.WINDOW_VARIANT_NORMAL
5821 WINDOW_VARIANT_SMALL = _core_.WINDOW_VARIANT_SMALL
5822 WINDOW_VARIANT_MINI = _core_.WINDOW_VARIANT_MINI
5823 WINDOW_VARIANT_LARGE = _core_.WINDOW_VARIANT_LARGE
5824 WINDOW_VARIANT_MAX = _core_.WINDOW_VARIANT_MAX
5825 class Window(EvtHandler):
5826 """
5827 wx.Window is the base class for all windows and represents any visible
5828 object on the screen. All controls, top level windows and so on are
5829 wx.Windows. Sizers and device contexts are not however, as they don't
5830 appear on screen themselves.
5831
5832 """
5833 def __repr__(self):
5834 return "<%s.%s; proxy of C++ wxWindow instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
5835 def __init__(self, *args, **kwargs):
5836 """
5837 __init__(self, Window parent, int id=-1, Point pos=DefaultPosition,
5838 Size size=DefaultSize, long style=0, String name=PanelNameStr) -> Window
5839
5840 Construct and show a generic Window.
5841 """
5842 newobj = _core_.new_Window(*args, **kwargs)
5843 self.this = newobj.this
5844 self.thisown = 1
5845 del newobj.thisown
5846 self._setOORInfo(self)
5847
5848 def Create(*args, **kwargs):
5849 """
5850 Create(self, Window parent, int id=-1, Point pos=DefaultPosition,
5851 Size size=DefaultSize, long style=0, String name=PanelNameStr) -> bool
5852
5853 Create the GUI part of the Window for 2-phase creation mode.
5854 """
5855 return _core_.Window_Create(*args, **kwargs)
5856
5857 def Close(*args, **kwargs):
5858 """
5859 Close(self, bool force=False) -> bool
5860
5861 This function simply generates a EVT_CLOSE event whose handler usually
5862 tries to close the window. It doesn't close the window itself,
5863 however. If force is False (the default) then the window's close
5864 handler will be allowed to veto the destruction of the window.
5865 """
5866 return _core_.Window_Close(*args, **kwargs)
5867
5868 def Destroy(*args, **kwargs):
5869 """
5870 Destroy(self) -> bool
5871
5872 Destroys the window safely. Frames and dialogs are not destroyed
5873 immediately when this function is called -- they are added to a list
5874 of windows to be deleted on idle time, when all the window's events
5875 have been processed. This prevents problems with events being sent to
5876 non-existent windows.
5877
5878 Returns True if the window has either been successfully deleted, or it
5879 has been added to the list of windows pending real deletion.
5880 """
5881 return _core_.Window_Destroy(*args, **kwargs)
5882
5883 def DestroyChildren(*args, **kwargs):
5884 """
5885 DestroyChildren(self) -> bool
5886
5887 Destroys all children of a window. Called automatically by the
5888 destructor.
5889 """
5890 return _core_.Window_DestroyChildren(*args, **kwargs)
5891
5892 def IsBeingDeleted(*args, **kwargs):
5893 """
5894 IsBeingDeleted(self) -> bool
5895
5896 Is the window in the process of being deleted?
5897 """
5898 return _core_.Window_IsBeingDeleted(*args, **kwargs)
5899
5900 def SetTitle(*args, **kwargs):
5901 """
5902 SetTitle(self, String title)
5903
5904 Sets the window's title. Applicable only to frames and dialogs.
5905 """
5906 return _core_.Window_SetTitle(*args, **kwargs)
5907
5908 def GetTitle(*args, **kwargs):
5909 """
5910 GetTitle(self) -> String
5911
5912 Gets the window's title. Applicable only to frames and dialogs.
5913 """
5914 return _core_.Window_GetTitle(*args, **kwargs)
5915
5916 def SetLabel(*args, **kwargs):
5917 """
5918 SetLabel(self, String label)
5919
5920 Set the text which the window shows in its label if applicable.
5921 """
5922 return _core_.Window_SetLabel(*args, **kwargs)
5923
5924 def GetLabel(*args, **kwargs):
5925 """
5926 GetLabel(self) -> String
5927
5928 Generic way of getting a label from any window, for identification
5929 purposes. The interpretation of this function differs from class to
5930 class. For frames and dialogs, the value returned is the title. For
5931 buttons or static text controls, it is the button text. This function
5932 can be useful for meta-programs such as testing tools or special-needs
5933 access programs)which need to identify windows by name.
5934 """
5935 return _core_.Window_GetLabel(*args, **kwargs)
5936
5937 def SetName(*args, **kwargs):
5938 """
5939 SetName(self, String name)
5940
5941 Sets the window's name. The window name is used for ressource setting
5942 in X, it is not the same as the window title/label
5943 """
5944 return _core_.Window_SetName(*args, **kwargs)
5945
5946 def GetName(*args, **kwargs):
5947 """
5948 GetName(self) -> String
5949
5950 Returns the windows name. This name is not guaranteed to be unique;
5951 it is up to the programmer to supply an appropriate name in the window
5952 constructor or via wx.Window.SetName.
5953 """
5954 return _core_.Window_GetName(*args, **kwargs)
5955
5956 def SetWindowVariant(*args, **kwargs):
5957 """
5958 SetWindowVariant(self, int variant)
5959
5960 Sets the variant of the window/font size to use for this window, if
5961 the platform supports variants, for example, wxMac.
5962 """
5963 return _core_.Window_SetWindowVariant(*args, **kwargs)
5964
5965 def GetWindowVariant(*args, **kwargs):
5966 """GetWindowVariant(self) -> int"""
5967 return _core_.Window_GetWindowVariant(*args, **kwargs)
5968
5969 def SetId(*args, **kwargs):
5970 """
5971 SetId(self, int winid)
5972
5973 Sets the identifier of the window. Each window has an integer
5974 identifier. If the application has not provided one, an identifier
5975 will be generated. Normally, the identifier should be provided on
5976 creation and should not be modified subsequently.
5977 """
5978 return _core_.Window_SetId(*args, **kwargs)
5979
5980 def GetId(*args, **kwargs):
5981 """
5982 GetId(self) -> int
5983
5984 Returns the identifier of the window. Each window has an integer
5985 identifier. If the application has not provided one (or the default Id
5986 -1 is used) then an unique identifier with a negative value will be
5987 generated.
5988 """
5989 return _core_.Window_GetId(*args, **kwargs)
5990
5991 def NewControlId(*args, **kwargs):
5992 """
5993 NewControlId() -> int
5994
5995 Generate a control id for the controls which were not given one.
5996 """
5997 return _core_.Window_NewControlId(*args, **kwargs)
5998
5999 NewControlId = staticmethod(NewControlId)
6000 def NextControlId(*args, **kwargs):
6001 """
6002 NextControlId(int winid) -> int
6003
6004 Get the id of the control following the one with the given
6005 autogenerated) id
6006 """
6007 return _core_.Window_NextControlId(*args, **kwargs)
6008
6009 NextControlId = staticmethod(NextControlId)
6010 def PrevControlId(*args, **kwargs):
6011 """
6012 PrevControlId(int winid) -> int
6013
6014 Get the id of the control preceding the one with the given
6015 autogenerated) id
6016 """
6017 return _core_.Window_PrevControlId(*args, **kwargs)
6018
6019 PrevControlId = staticmethod(PrevControlId)
6020 def SetSize(*args, **kwargs):
6021 """
6022 SetSize(self, Size size)
6023
6024 Sets the size of the window in pixels.
6025 """
6026 return _core_.Window_SetSize(*args, **kwargs)
6027
6028 def SetDimensions(*args, **kwargs):
6029 """
6030 SetDimensions(self, int x, int y, int width, int height, int sizeFlags=SIZE_AUTO)
6031
6032 Sets the position and size of the window in pixels. The sizeFlags
6033 parameter indicates the interpretation of the other params if they are
6034 equal to -1.
6035
6036 ======================== ======================================
6037 wx.SIZE_AUTO A -1 indicates that a class-specific
6038 default should be used.
6039 wx.SIZE_USE_EXISTING Axisting dimensions should be used if
6040 -1 values are supplied.
6041 wxSIZE_ALLOW_MINUS_ONE Allow dimensions of -1 and less to be
6042 interpreted as real dimensions, not
6043 default values.
6044 ======================== ======================================
6045
6046 """
6047 return _core_.Window_SetDimensions(*args, **kwargs)
6048
6049 def SetRect(*args, **kwargs):
6050 """
6051 SetRect(self, Rect rect, int sizeFlags=SIZE_AUTO)
6052
6053 Sets the position and size of the window in pixels using a wx.Rect.
6054 """
6055 return _core_.Window_SetRect(*args, **kwargs)
6056
6057 def SetSizeWH(*args, **kwargs):
6058 """
6059 SetSizeWH(self, int width, int height)
6060
6061 Sets the size of the window in pixels.
6062 """
6063 return _core_.Window_SetSizeWH(*args, **kwargs)
6064
6065 def Move(*args, **kwargs):
6066 """
6067 Move(self, Point pt, int flags=SIZE_USE_EXISTING)
6068
6069 Moves the window to the given position.
6070 """
6071 return _core_.Window_Move(*args, **kwargs)
6072
6073 SetPosition = Move
6074 def MoveXY(*args, **kwargs):
6075 """
6076 MoveXY(self, int x, int y, int flags=SIZE_USE_EXISTING)
6077
6078 Moves the window to the given position.
6079 """
6080 return _core_.Window_MoveXY(*args, **kwargs)
6081
6082 def SetBestFittingSize(*args, **kwargs):
6083 """
6084 SetBestFittingSize(self, Size size=DefaultSize)
6085
6086 A 'Smart' SetSize that will fill in default size components with the
6087 window's *best size* values. Also set's the minsize for use with sizers.
6088 """
6089 return _core_.Window_SetBestFittingSize(*args, **kwargs)
6090
6091 def Raise(*args, **kwargs):
6092 """
6093 Raise(self)
6094
6095 Raises the window to the top of the window hierarchy if it is a
6096 managed window (dialog or frame).
6097 """
6098 return _core_.Window_Raise(*args, **kwargs)
6099
6100 def Lower(*args, **kwargs):
6101 """
6102 Lower(self)
6103
6104 Lowers the window to the bottom of the window hierarchy if it is a
6105 managed window (dialog or frame).
6106 """
6107 return _core_.Window_Lower(*args, **kwargs)
6108
6109 def SetClientSize(*args, **kwargs):
6110 """
6111 SetClientSize(self, Size size)
6112
6113 This sets the size of the window client area in pixels. Using this
6114 function to size a window tends to be more device-independent than
6115 wx.Window.SetSize, since the application need not worry about what
6116 dimensions the border or title bar have when trying to fit the window
6117 around panel items, for example.
6118 """
6119 return _core_.Window_SetClientSize(*args, **kwargs)
6120
6121 def SetClientSizeWH(*args, **kwargs):
6122 """
6123 SetClientSizeWH(self, int width, int height)
6124
6125 This sets the size of the window client area in pixels. Using this
6126 function to size a window tends to be more device-independent than
6127 wx.Window.SetSize, since the application need not worry about what
6128 dimensions the border or title bar have when trying to fit the window
6129 around panel items, for example.
6130 """
6131 return _core_.Window_SetClientSizeWH(*args, **kwargs)
6132
6133 def SetClientRect(*args, **kwargs):
6134 """
6135 SetClientRect(self, Rect rect)
6136
6137 This sets the size of the window client area in pixels. Using this
6138 function to size a window tends to be more device-independent than
6139 wx.Window.SetSize, since the application need not worry about what
6140 dimensions the border or title bar have when trying to fit the window
6141 around panel items, for example.
6142 """
6143 return _core_.Window_SetClientRect(*args, **kwargs)
6144
6145 def GetPosition(*args, **kwargs):
6146 """
6147 GetPosition(self) -> Point
6148
6149 Get the window's position.
6150 """
6151 return _core_.Window_GetPosition(*args, **kwargs)
6152
6153 def GetPositionTuple(*args, **kwargs):
6154 """
6155 GetPositionTuple() -> (x,y)
6156
6157 Get the window's position.
6158 """
6159 return _core_.Window_GetPositionTuple(*args, **kwargs)
6160
6161 def GetSize(*args, **kwargs):
6162 """
6163 GetSize(self) -> Size
6164
6165 Get the window size.
6166 """
6167 return _core_.Window_GetSize(*args, **kwargs)
6168
6169 def GetSizeTuple(*args, **kwargs):
6170 """
6171 GetSizeTuple() -> (width, height)
6172
6173 Get the window size.
6174 """
6175 return _core_.Window_GetSizeTuple(*args, **kwargs)
6176
6177 def GetRect(*args, **kwargs):
6178 """
6179 GetRect(self) -> Rect
6180
6181 Returns the size and position of the window as a wx.Rect object.
6182 """
6183 return _core_.Window_GetRect(*args, **kwargs)
6184
6185 def GetClientSize(*args, **kwargs):
6186 """
6187 GetClientSize(self) -> Size
6188
6189 This gets the size of the window's 'client area' in pixels. The client
6190 area is the area which may be drawn on by the programmer, excluding
6191 title bar, border, scrollbars, etc.
6192 """
6193 return _core_.Window_GetClientSize(*args, **kwargs)
6194
6195 def GetClientSizeTuple(*args, **kwargs):
6196 """
6197 GetClientSizeTuple() -> (width, height)
6198
6199 This gets the size of the window's 'client area' in pixels. The client
6200 area is the area which may be drawn on by the programmer, excluding
6201 title bar, border, scrollbars, etc.
6202 """
6203 return _core_.Window_GetClientSizeTuple(*args, **kwargs)
6204
6205 def GetClientAreaOrigin(*args, **kwargs):
6206 """
6207 GetClientAreaOrigin(self) -> Point
6208
6209 Get the origin of the client area of the window relative to the
6210 window's top left corner (the client area may be shifted because of
6211 the borders, scrollbars, other decorations...)
6212 """
6213 return _core_.Window_GetClientAreaOrigin(*args, **kwargs)
6214
6215 def GetClientRect(*args, **kwargs):
6216 """
6217 GetClientRect(self) -> Rect
6218
6219 Get the client area position and size as a `wx.Rect` object.
6220 """
6221 return _core_.Window_GetClientRect(*args, **kwargs)
6222
6223 def GetBestSize(*args, **kwargs):
6224 """
6225 GetBestSize(self) -> Size
6226
6227 This function returns the best acceptable minimal size for the
6228 window, if applicable. For example, for a static text control, it will
6229 be the minimal size such that the control label is not truncated. For
6230 windows containing subwindows (suzh aswx.Panel), the size returned by
6231 this function will be the same as the size the window would have had
6232 after calling Fit.
6233 """
6234 return _core_.Window_GetBestSize(*args, **kwargs)
6235
6236 def GetBestSizeTuple(*args, **kwargs):
6237 """
6238 GetBestSizeTuple() -> (width, height)
6239
6240 This function returns the best acceptable minimal size for the
6241 window, if applicable. For example, for a static text control, it will
6242 be the minimal size such that the control label is not truncated. For
6243 windows containing subwindows (suzh aswx.Panel), the size returned by
6244 this function will be the same as the size the window would have had
6245 after calling Fit.
6246 """
6247 return _core_.Window_GetBestSizeTuple(*args, **kwargs)
6248
6249 def InvalidateBestSize(*args, **kwargs):
6250 """
6251 InvalidateBestSize(self)
6252
6253 Reset the cached best size value so it will be recalculated the next
6254 time it is needed.
6255 """
6256 return _core_.Window_InvalidateBestSize(*args, **kwargs)
6257
6258 def GetBestFittingSize(*args, **kwargs):
6259 """
6260 GetBestFittingSize(self) -> Size
6261
6262 This function will merge the window's best size into the window's
6263 minimum size, giving priority to the min size components, and returns
6264 the results.
6265
6266 """
6267 return _core_.Window_GetBestFittingSize(*args, **kwargs)
6268
6269 def GetAdjustedBestSize(*args, **kwargs):
6270 """
6271 GetAdjustedBestSize(self) -> Size
6272
6273 This method is similar to GetBestSize, except in one
6274 thing. GetBestSize should return the minimum untruncated size of the
6275 window, while this method will return the largest of BestSize and any
6276 user specified minimum size. ie. it is the minimum size the window
6277 should currently be drawn at, not the minimal size it can possibly
6278 tolerate.
6279 """
6280 return _core_.Window_GetAdjustedBestSize(*args, **kwargs)
6281
6282 def Center(*args, **kwargs):
6283 """
6284 Center(self, int direction=BOTH)
6285
6286 Centers the window. The parameter specifies the direction for
6287 cetering, and may be wx.HORIZONTAL, wx.VERTICAL or wx.BOTH. It may
6288 also include wx.CENTER_ON_SCREEN flag if you want to center the window
6289 on the entire screen and not on its parent window. If it is a
6290 top-level window and has no parent then it will always be centered
6291 relative to the screen.
6292 """
6293 return _core_.Window_Center(*args, **kwargs)
6294
6295 Centre = Center
6296 def CenterOnScreen(*args, **kwargs):
6297 """
6298 CenterOnScreen(self, int dir=BOTH)
6299
6300 Center on screen (only works for top level windows)
6301 """
6302 return _core_.Window_CenterOnScreen(*args, **kwargs)
6303
6304 CentreOnScreen = CenterOnScreen
6305 def CenterOnParent(*args, **kwargs):
6306 """
6307 CenterOnParent(self, int dir=BOTH)
6308
6309 Center with respect to the the parent window
6310 """
6311 return _core_.Window_CenterOnParent(*args, **kwargs)
6312
6313 CentreOnParent = CenterOnParent
6314 def Fit(*args, **kwargs):
6315 """
6316 Fit(self)
6317
6318 Sizes the window so that it fits around its subwindows. This function
6319 won't do anything if there are no subwindows and will only really work
6320 correctly if sizers are used for the subwindows layout. Also, if the
6321 window has exactly one subwindow it is better (faster and the result
6322 is more precise as Fit adds some margin to account for fuzziness of
6323 its calculations) to call window.SetClientSize(child.GetSize())
6324 instead of calling Fit.
6325 """
6326 return _core_.Window_Fit(*args, **kwargs)
6327
6328 def FitInside(*args, **kwargs):
6329 """
6330 FitInside(self)
6331
6332 Similar to Fit, but sizes the interior (virtual) size of a
6333 window. Mainly useful with scrolled windows to reset scrollbars after
6334 sizing changes that do not trigger a size event, and/or scrolled
6335 windows without an interior sizer. This function similarly won't do
6336 anything if there are no subwindows.
6337 """
6338 return _core_.Window_FitInside(*args, **kwargs)
6339
6340 def SetSizeHints(*args, **kwargs):
6341 """
6342 SetSizeHints(self, int minW, int minH, int maxW=-1, int maxH=-1, int incW=-1,
6343 int incH=-1)
6344
6345 Allows specification of minimum and maximum window sizes, and window
6346 size increments. If a pair of values is not set (or set to -1), the
6347 default values will be used. If this function is called, the user
6348 will not be able to size the window outside the given bounds (if it is
6349 a top-level window.) Sizers will also inspect the minimum window size
6350 and will use that value if set when calculating layout.
6351
6352 The resizing increments are only significant under Motif or Xt.
6353 """
6354 return _core_.Window_SetSizeHints(*args, **kwargs)
6355
6356 def SetSizeHintsSz(*args, **kwargs):
6357 """
6358 SetSizeHintsSz(self, Size minSize, Size maxSize=DefaultSize, Size incSize=DefaultSize)
6359
6360 Allows specification of minimum and maximum window sizes, and window
6361 size increments. If a pair of values is not set (or set to -1), the
6362 default values will be used. If this function is called, the user
6363 will not be able to size the window outside the given bounds (if it is
6364 a top-level window.) Sizers will also inspect the minimum window size
6365 and will use that value if set when calculating layout.
6366
6367 The resizing increments are only significant under Motif or Xt.
6368 """
6369 return _core_.Window_SetSizeHintsSz(*args, **kwargs)
6370
6371 def SetVirtualSizeHints(*args, **kwargs):
6372 """
6373 SetVirtualSizeHints(self, int minW, int minH, int maxW=-1, int maxH=-1)
6374
6375 Allows specification of minimum and maximum virtual window sizes. If a
6376 pair of values is not set (or set to -1), the default values will be
6377 used. If this function is called, the user will not be able to size
6378 the virtual area of the window outside the given bounds.
6379 """
6380 return _core_.Window_SetVirtualSizeHints(*args, **kwargs)
6381
6382 def SetVirtualSizeHintsSz(*args, **kwargs):
6383 """
6384 SetVirtualSizeHintsSz(self, Size minSize, Size maxSize=DefaultSize)
6385
6386 Allows specification of minimum and maximum virtual window sizes. If a
6387 pair of values is not set (or set to -1), the default values will be
6388 used. If this function is called, the user will not be able to size
6389 the virtual area of the window outside the given bounds.
6390 """
6391 return _core_.Window_SetVirtualSizeHintsSz(*args, **kwargs)
6392
6393 def GetMaxSize(*args, **kwargs):
6394 """GetMaxSize(self) -> Size"""
6395 return _core_.Window_GetMaxSize(*args, **kwargs)
6396
6397 def GetMinSize(*args, **kwargs):
6398 """GetMinSize(self) -> Size"""
6399 return _core_.Window_GetMinSize(*args, **kwargs)
6400
6401 def SetMinSize(*args, **kwargs):
6402 """
6403 SetMinSize(self, Size minSize)
6404
6405 A more convenient method than `SetSizeHints` for setting just the
6406 min size.
6407 """
6408 return _core_.Window_SetMinSize(*args, **kwargs)
6409
6410 def SetMaxSize(*args, **kwargs):
6411 """
6412 SetMaxSize(self, Size maxSize)
6413
6414 A more convenient method than `SetSizeHints` for setting just the
6415 max size.
6416 """
6417 return _core_.Window_SetMaxSize(*args, **kwargs)
6418
6419 def GetMinWidth(*args, **kwargs):
6420 """GetMinWidth(self) -> int"""
6421 return _core_.Window_GetMinWidth(*args, **kwargs)
6422
6423 def GetMinHeight(*args, **kwargs):
6424 """GetMinHeight(self) -> int"""
6425 return _core_.Window_GetMinHeight(*args, **kwargs)
6426
6427 def GetMaxWidth(*args, **kwargs):
6428 """GetMaxWidth(self) -> int"""
6429 return _core_.Window_GetMaxWidth(*args, **kwargs)
6430
6431 def GetMaxHeight(*args, **kwargs):
6432 """GetMaxHeight(self) -> int"""
6433 return _core_.Window_GetMaxHeight(*args, **kwargs)
6434
6435 def SetVirtualSize(*args, **kwargs):
6436 """
6437 SetVirtualSize(self, Size size)
6438
6439 Set the the virtual size of a window in pixels. For most windows this
6440 is just the client area of the window, but for some like scrolled
6441 windows it is more or less independent of the screen window size.
6442 """
6443 return _core_.Window_SetVirtualSize(*args, **kwargs)
6444
6445 def SetVirtualSizeWH(*args, **kwargs):
6446 """
6447 SetVirtualSizeWH(self, int w, int h)
6448
6449 Set the the virtual size of a window in pixels. For most windows this
6450 is just the client area of the window, but for some like scrolled
6451 windows it is more or less independent of the screen window size.
6452 """
6453 return _core_.Window_SetVirtualSizeWH(*args, **kwargs)
6454
6455 def GetVirtualSize(*args, **kwargs):
6456 """
6457 GetVirtualSize(self) -> Size
6458
6459 Get the the virtual size of the window in pixels. For most windows
6460 this is just the client area of the window, but for some like scrolled
6461 windows it is more or less independent of the screen window size.
6462 """
6463 return _core_.Window_GetVirtualSize(*args, **kwargs)
6464
6465 def GetVirtualSizeTuple(*args, **kwargs):
6466 """
6467 GetVirtualSizeTuple() -> (width, height)
6468
6469 Get the the virtual size of the window in pixels. For most windows
6470 this is just the client area of the window, but for some like scrolled
6471 windows it is more or less independent of the screen window size.
6472 """
6473 return _core_.Window_GetVirtualSizeTuple(*args, **kwargs)
6474
6475 def GetBestVirtualSize(*args, **kwargs):
6476 """
6477 GetBestVirtualSize(self) -> Size
6478
6479 Return the largest of ClientSize and BestSize (as determined by a
6480 sizer, interior children, or other means)
6481 """
6482 return _core_.Window_GetBestVirtualSize(*args, **kwargs)
6483
6484 def Show(*args, **kwargs):
6485 """
6486 Show(self, bool show=True) -> bool
6487
6488 Shows or hides the window. You may need to call Raise for a top level
6489 window if you want to bring it to top, although this is not needed if
6490 Show is called immediately after the frame creation. Returns True if
6491 the window has been shown or hidden or False if nothing was done
6492 because it already was in the requested state.
6493 """
6494 return _core_.Window_Show(*args, **kwargs)
6495
6496 def Hide(*args, **kwargs):
6497 """
6498 Hide(self) -> bool
6499
6500 Equivalent to calling Show(False).
6501 """
6502 return _core_.Window_Hide(*args, **kwargs)
6503
6504 def Enable(*args, **kwargs):
6505 """
6506 Enable(self, bool enable=True) -> bool
6507
6508 Enable or disable the window for user input. Note that when a parent
6509 window is disabled, all of its children are disabled as well and they
6510 are reenabled again when the parent is. Returns true if the window
6511 has been enabled or disabled, false if nothing was done, i.e. if the
6512 window had already been in the specified state.
6513 """
6514 return _core_.Window_Enable(*args, **kwargs)
6515
6516 def Disable(*args, **kwargs):
6517 """
6518 Disable(self) -> bool
6519
6520 Disables the window, same as Enable(false).
6521 """
6522 return _core_.Window_Disable(*args, **kwargs)
6523
6524 def IsShown(*args, **kwargs):
6525 """
6526 IsShown(self) -> bool
6527
6528 Returns true if the window is shown, false if it has been hidden.
6529 """
6530 return _core_.Window_IsShown(*args, **kwargs)
6531
6532 def IsEnabled(*args, **kwargs):
6533 """
6534 IsEnabled(self) -> bool
6535
6536 Returns true if the window is enabled for input, false otherwise.
6537 """
6538 return _core_.Window_IsEnabled(*args, **kwargs)
6539
6540 def SetWindowStyleFlag(*args, **kwargs):
6541 """
6542 SetWindowStyleFlag(self, long style)
6543
6544 Sets the style of the window. Please note that some styles cannot be
6545 changed after the window creation and that Refresh() might need to be
6546 called after changing the others for the change to take place
6547 immediately.
6548 """
6549 return _core_.Window_SetWindowStyleFlag(*args, **kwargs)
6550
6551 def GetWindowStyleFlag(*args, **kwargs):
6552 """
6553 GetWindowStyleFlag(self) -> long
6554
6555 Gets the window style that was passed to the constructor or Create
6556 method.
6557 """
6558 return _core_.Window_GetWindowStyleFlag(*args, **kwargs)
6559
6560 SetWindowStyle = SetWindowStyleFlag; GetWindowStyle = GetWindowStyleFlag
6561 def HasFlag(*args, **kwargs):
6562 """
6563 HasFlag(self, int flag) -> bool
6564
6565 Test if the given style is set for this window.
6566 """
6567 return _core_.Window_HasFlag(*args, **kwargs)
6568
6569 def IsRetained(*args, **kwargs):
6570 """
6571 IsRetained(self) -> bool
6572
6573 Returns true if the window is retained, false otherwise. Retained
6574 windows are only available on X platforms.
6575 """
6576 return _core_.Window_IsRetained(*args, **kwargs)
6577
6578 def SetExtraStyle(*args, **kwargs):
6579 """
6580 SetExtraStyle(self, long exStyle)
6581
6582 Sets the extra style bits for the window. Extra styles are the less
6583 often used style bits which can't be set with the constructor or with
6584 SetWindowStyleFlag()
6585 """
6586 return _core_.Window_SetExtraStyle(*args, **kwargs)
6587
6588 def GetExtraStyle(*args, **kwargs):
6589 """
6590 GetExtraStyle(self) -> long
6591
6592 Returns the extra style bits for the window.
6593 """
6594 return _core_.Window_GetExtraStyle(*args, **kwargs)
6595
6596 def MakeModal(*args, **kwargs):
6597 """
6598 MakeModal(self, bool modal=True)
6599
6600 Disables all other windows in the application so that the user can
6601 only interact with this window. Passing False will reverse this
6602 effect.
6603 """
6604 return _core_.Window_MakeModal(*args, **kwargs)
6605
6606 def SetThemeEnabled(*args, **kwargs):
6607 """
6608 SetThemeEnabled(self, bool enableTheme)
6609
6610 This function tells a window if it should use the system's "theme"
6611 code to draw the windows' background instead if its own background
6612 drawing code. This will only have an effect on platforms that support
6613 the notion of themes in user defined windows. One such platform is
6614 GTK+ where windows can have (very colourful) backgrounds defined by a
6615 user's selected theme.
6616
6617 Dialogs, notebook pages and the status bar have this flag set to true
6618 by default so that the default look and feel is simulated best.
6619 """
6620 return _core_.Window_SetThemeEnabled(*args, **kwargs)
6621
6622 def GetThemeEnabled(*args, **kwargs):
6623 """
6624 GetThemeEnabled(self) -> bool
6625
6626 Return the themeEnabled flag.
6627 """
6628 return _core_.Window_GetThemeEnabled(*args, **kwargs)
6629
6630 def SetFocus(*args, **kwargs):
6631 """
6632 SetFocus(self)
6633
6634 Set's the focus to this window, allowing it to receive keyboard input.
6635 """
6636 return _core_.Window_SetFocus(*args, **kwargs)
6637
6638 def SetFocusFromKbd(*args, **kwargs):
6639 """
6640 SetFocusFromKbd(self)
6641
6642 Set focus to this window as the result of a keyboard action. Normally
6643 only called internally.
6644 """
6645 return _core_.Window_SetFocusFromKbd(*args, **kwargs)
6646
6647 def FindFocus(*args, **kwargs):
6648 """
6649 FindFocus() -> Window
6650
6651 Returns the window or control that currently has the keyboard focus,
6652 or None.
6653 """
6654 return _core_.Window_FindFocus(*args, **kwargs)
6655
6656 FindFocus = staticmethod(FindFocus)
6657 def AcceptsFocus(*args, **kwargs):
6658 """
6659 AcceptsFocus(self) -> bool
6660
6661 Can this window have focus?
6662 """
6663 return _core_.Window_AcceptsFocus(*args, **kwargs)
6664
6665 def AcceptsFocusFromKeyboard(*args, **kwargs):
6666 """
6667 AcceptsFocusFromKeyboard(self) -> bool
6668
6669 Can this window be given focus by keyboard navigation? if not, the
6670 only way to give it focus (provided it accepts it at all) is to click
6671 it.
6672 """
6673 return _core_.Window_AcceptsFocusFromKeyboard(*args, **kwargs)
6674
6675 def GetDefaultItem(*args, **kwargs):
6676 """
6677 GetDefaultItem(self) -> Window
6678
6679 Get the default child of this parent, i.e. the one which is activated
6680 by pressing <Enter> such as the OK button on a wx.Dialog.
6681 """
6682 return _core_.Window_GetDefaultItem(*args, **kwargs)
6683
6684 def SetDefaultItem(*args, **kwargs):
6685 """
6686 SetDefaultItem(self, Window child) -> Window
6687
6688 Set this child as default, return the old default.
6689 """
6690 return _core_.Window_SetDefaultItem(*args, **kwargs)
6691
6692 def SetTmpDefaultItem(*args, **kwargs):
6693 """
6694 SetTmpDefaultItem(self, Window win)
6695
6696 Set this child as temporary default
6697 """
6698 return _core_.Window_SetTmpDefaultItem(*args, **kwargs)
6699
6700 def Navigate(*args, **kwargs):
6701 """
6702 Navigate(self, int flags=NavigationKeyEvent.IsForward) -> bool
6703
6704 Does keyboard navigation from this window to another, by sending a
6705 `wx.NavigationKeyEvent`.
6706 """
6707 return _core_.Window_Navigate(*args, **kwargs)
6708
6709 def MoveAfterInTabOrder(*args, **kwargs):
6710 """
6711 MoveAfterInTabOrder(self, Window win)
6712
6713 Moves this window in the tab navigation order after the specified
6714 sibling window. This means that when the user presses the TAB key on
6715 that other window, the focus switches to this window.
6716
6717 The default tab order is the same as creation order. This function
6718 and `MoveBeforeInTabOrder` allow to change it after creating all the
6719 windows.
6720
6721 """
6722 return _core_.Window_MoveAfterInTabOrder(*args, **kwargs)
6723
6724 def MoveBeforeInTabOrder(*args, **kwargs):
6725 """
6726 MoveBeforeInTabOrder(self, Window win)
6727
6728 Same as `MoveAfterInTabOrder` except that it inserts this window just
6729 before win instead of putting it right after it.
6730 """
6731 return _core_.Window_MoveBeforeInTabOrder(*args, **kwargs)
6732
6733 def GetChildren(*args, **kwargs):
6734 """
6735 GetChildren(self) -> PyObject
6736
6737 Returns a list of the window's children. NOTE: Currently this is a
6738 copy of the child window list maintained by the window, so the return
6739 value of this function is only valid as long as the window's children
6740 do not change.
6741 """
6742 return _core_.Window_GetChildren(*args, **kwargs)
6743
6744 def GetParent(*args, **kwargs):
6745 """
6746 GetParent(self) -> Window
6747
6748 Returns the parent window of this window, or None if there isn't one.
6749 """
6750 return _core_.Window_GetParent(*args, **kwargs)
6751
6752 def GetGrandParent(*args, **kwargs):
6753 """
6754 GetGrandParent(self) -> Window
6755
6756 Returns the parent of the parent of this window, or None if there
6757 isn't one.
6758 """
6759 return _core_.Window_GetGrandParent(*args, **kwargs)
6760
6761 def IsTopLevel(*args, **kwargs):
6762 """
6763 IsTopLevel(self) -> bool
6764
6765 Returns true if the given window is a top-level one. Currently all
6766 frames and dialogs are always considered to be top-level windows (even
6767 if they have a parent window).
6768 """
6769 return _core_.Window_IsTopLevel(*args, **kwargs)
6770
6771 def Reparent(*args, **kwargs):
6772 """
6773 Reparent(self, Window newParent) -> bool
6774
6775 Reparents the window, i.e the window will be removed from its current
6776 parent window (e.g. a non-standard toolbar in a wxFrame) and then
6777 re-inserted into another. Available on Windows and GTK. Returns True
6778 if the parent was changed, False otherwise (error or newParent ==
6779 oldParent)
6780 """
6781 return _core_.Window_Reparent(*args, **kwargs)
6782
6783 def AddChild(*args, **kwargs):
6784 """
6785 AddChild(self, Window child)
6786
6787 Adds a child window. This is called automatically by window creation
6788 functions so should not be required by the application programmer.
6789 """
6790 return _core_.Window_AddChild(*args, **kwargs)
6791
6792 def RemoveChild(*args, **kwargs):
6793 """
6794 RemoveChild(self, Window child)
6795
6796 Removes a child window. This is called automatically by window
6797 deletion functions so should not be required by the application
6798 programmer.
6799 """
6800 return _core_.Window_RemoveChild(*args, **kwargs)
6801
6802 def FindWindowById(*args, **kwargs):
6803 """
6804 FindWindowById(self, long winid) -> Window
6805
6806 Find a chld of this window by window ID
6807 """
6808 return _core_.Window_FindWindowById(*args, **kwargs)
6809
6810 def FindWindowByName(*args, **kwargs):
6811 """
6812 FindWindowByName(self, String name) -> Window
6813
6814 Find a child of this window by name
6815 """
6816 return _core_.Window_FindWindowByName(*args, **kwargs)
6817
6818 def GetEventHandler(*args, **kwargs):
6819 """
6820 GetEventHandler(self) -> EvtHandler
6821
6822 Returns the event handler for this window. By default, the window is
6823 its own event handler.
6824 """
6825 return _core_.Window_GetEventHandler(*args, **kwargs)
6826
6827 def SetEventHandler(*args, **kwargs):
6828 """
6829 SetEventHandler(self, EvtHandler handler)
6830
6831 Sets the event handler for this window. An event handler is an object
6832 that is capable of processing the events sent to a window. By default,
6833 the window is its own event handler, but an application may wish to
6834 substitute another, for example to allow central implementation of
6835 event-handling for a variety of different window classes.
6836
6837 It is usually better to use `wx.Window.PushEventHandler` since this sets
6838 up a chain of event handlers, where an event not handled by one event
6839 handler is handed to the next one in the chain.
6840 """
6841 return _core_.Window_SetEventHandler(*args, **kwargs)
6842
6843 def PushEventHandler(*args, **kwargs):
6844 """
6845 PushEventHandler(self, EvtHandler handler)
6846
6847 Pushes this event handler onto the event handler stack for the window.
6848 An event handler is an object that is capable of processing the events
6849 sent to a window. By default, the window is its own event handler, but
6850 an application may wish to substitute another, for example to allow
6851 central implementation of event-handling for a variety of different
6852 window classes.
6853
6854 wx.Window.PushEventHandler allows an application to set up a chain of
6855 event handlers, where an event not handled by one event handler is
6856 handed to the next one in the chain. Use `wx.Window.PopEventHandler` to
6857 remove the event handler.
6858 """
6859 return _core_.Window_PushEventHandler(*args, **kwargs)
6860
6861 def PopEventHandler(*args, **kwargs):
6862 """
6863 PopEventHandler(self, bool deleteHandler=False) -> EvtHandler
6864
6865 Removes and returns the top-most event handler on the event handler
6866 stack. If deleteHandler is True then the wx.EvtHandler object will be
6867 destroyed after it is popped.
6868 """
6869 return _core_.Window_PopEventHandler(*args, **kwargs)
6870
6871 def RemoveEventHandler(*args, **kwargs):
6872 """
6873 RemoveEventHandler(self, EvtHandler handler) -> bool
6874
6875 Find the given handler in the event handler chain and remove (but not
6876 delete) it from the event handler chain, return True if it was found
6877 and False otherwise (this also results in an assert failure so this
6878 function should only be called when the handler is supposed to be
6879 there.)
6880 """
6881 return _core_.Window_RemoveEventHandler(*args, **kwargs)
6882
6883 def SetValidator(*args, **kwargs):
6884 """
6885 SetValidator(self, Validator validator)
6886
6887 Deletes the current validator (if any) and sets the window validator,
6888 having called wx.Validator.Clone to create a new validator of this
6889 type.
6890 """
6891 return _core_.Window_SetValidator(*args, **kwargs)
6892
6893 def GetValidator(*args, **kwargs):
6894 """
6895 GetValidator(self) -> Validator
6896
6897 Returns a pointer to the current validator for the window, or None if
6898 there is none.
6899 """
6900 return _core_.Window_GetValidator(*args, **kwargs)
6901
6902 def Validate(*args, **kwargs):
6903 """
6904 Validate(self) -> bool
6905
6906 Validates the current values of the child controls using their
6907 validators. If the window has wx.WS_EX_VALIDATE_RECURSIVELY extra
6908 style flag set, the method will also call Validate() of all child
6909 windows. Returns false if any of the validations failed.
6910 """
6911 return _core_.Window_Validate(*args, **kwargs)
6912
6913 def TransferDataToWindow(*args, **kwargs):
6914 """
6915 TransferDataToWindow(self) -> bool
6916
6917 Transfers values to child controls from data areas specified by their
6918 validators. If the window has wx.WS_EX_VALIDATE_RECURSIVELY extra
6919 style flag set, the method will also call TransferDataToWindow() of
6920 all child windows.
6921 """
6922 return _core_.Window_TransferDataToWindow(*args, **kwargs)
6923
6924 def TransferDataFromWindow(*args, **kwargs):
6925 """
6926 TransferDataFromWindow(self) -> bool
6927
6928 Transfers values from child controls to data areas specified by their
6929 validators. Returns false if a transfer failed. If the window has
6930 wx.WS_EX_VALIDATE_RECURSIVELY extra style flag set, the method will
6931 also call TransferDataFromWindow() of all child windows.
6932 """
6933 return _core_.Window_TransferDataFromWindow(*args, **kwargs)
6934
6935 def InitDialog(*args, **kwargs):
6936 """
6937 InitDialog(self)
6938
6939 Sends an EVT_INIT_DIALOG event, whose handler usually transfers data
6940 to the dialog via validators.
6941 """
6942 return _core_.Window_InitDialog(*args, **kwargs)
6943
6944 def SetAcceleratorTable(*args, **kwargs):
6945 """
6946 SetAcceleratorTable(self, AcceleratorTable accel)
6947
6948 Sets the accelerator table for this window.
6949 """
6950 return _core_.Window_SetAcceleratorTable(*args, **kwargs)
6951
6952 def GetAcceleratorTable(*args, **kwargs):
6953 """
6954 GetAcceleratorTable(self) -> AcceleratorTable
6955
6956 Gets the accelerator table for this window.
6957 """
6958 return _core_.Window_GetAcceleratorTable(*args, **kwargs)
6959
6960 def RegisterHotKey(*args, **kwargs):
6961 """
6962 RegisterHotKey(self, int hotkeyId, int modifiers, int keycode) -> bool
6963
6964 Registers a system wide hotkey. Every time the user presses the hotkey
6965 registered here, this window will receive a hotkey event. It will
6966 receive the event even if the application is in the background and
6967 does not have the input focus because the user is working with some
6968 other application. To bind an event handler function to this hotkey
6969 use EVT_HOTKEY with an id equal to hotkeyId. Returns True if the
6970 hotkey was registered successfully.
6971 """
6972 return _core_.Window_RegisterHotKey(*args, **kwargs)
6973
6974 def UnregisterHotKey(*args, **kwargs):
6975 """
6976 UnregisterHotKey(self, int hotkeyId) -> bool
6977
6978 Unregisters a system wide hotkey.
6979 """
6980 return _core_.Window_UnregisterHotKey(*args, **kwargs)
6981
6982 def ConvertDialogPointToPixels(*args, **kwargs):
6983 """
6984 ConvertDialogPointToPixels(self, Point pt) -> Point
6985
6986 Converts a point or size from dialog units to pixels. Dialog units
6987 are used for maintaining a dialog's proportions even if the font
6988 changes. For the x dimension, the dialog units are multiplied by the
6989 average character width and then divided by 4. For the y dimension,
6990 the dialog units are multiplied by the average character height and
6991 then divided by 8.
6992 """
6993 return _core_.Window_ConvertDialogPointToPixels(*args, **kwargs)
6994
6995 def ConvertDialogSizeToPixels(*args, **kwargs):
6996 """
6997 ConvertDialogSizeToPixels(self, Size sz) -> Size
6998
6999 Converts a point or size from dialog units to pixels. Dialog units
7000 are used for maintaining a dialog's proportions even if the font
7001 changes. For the x dimension, the dialog units are multiplied by the
7002 average character width and then divided by 4. For the y dimension,
7003 the dialog units are multiplied by the average character height and
7004 then divided by 8.
7005 """
7006 return _core_.Window_ConvertDialogSizeToPixels(*args, **kwargs)
7007
7008 def DLG_PNT(*args, **kwargs):
7009 """
7010 DLG_PNT(self, Point pt) -> Point
7011
7012 Converts a point or size from dialog units to pixels. Dialog units
7013 are used for maintaining a dialog's proportions even if the font
7014 changes. For the x dimension, the dialog units are multiplied by the
7015 average character width and then divided by 4. For the y dimension,
7016 the dialog units are multiplied by the average character height and
7017 then divided by 8.
7018 """
7019 return _core_.Window_DLG_PNT(*args, **kwargs)
7020
7021 def DLG_SZE(*args, **kwargs):
7022 """
7023 DLG_SZE(self, Size sz) -> Size
7024
7025 Converts a point or size from dialog units to pixels. Dialog units
7026 are used for maintaining a dialog's proportions even if the font
7027 changes. For the x dimension, the dialog units are multiplied by the
7028 average character width and then divided by 4. For the y dimension,
7029 the dialog units are multiplied by the average character height and
7030 then divided by 8.
7031 """
7032 return _core_.Window_DLG_SZE(*args, **kwargs)
7033
7034 def ConvertPixelPointToDialog(*args, **kwargs):
7035 """ConvertPixelPointToDialog(self, Point pt) -> Point"""
7036 return _core_.Window_ConvertPixelPointToDialog(*args, **kwargs)
7037
7038 def ConvertPixelSizeToDialog(*args, **kwargs):
7039 """ConvertPixelSizeToDialog(self, Size sz) -> Size"""
7040 return _core_.Window_ConvertPixelSizeToDialog(*args, **kwargs)
7041
7042 def WarpPointer(*args, **kwargs):
7043 """
7044 WarpPointer(self, int x, int y)
7045
7046 Moves the pointer to the given position on the window.
7047
7048 NOTE: This function is not supported under Mac because Apple Human
7049 Interface Guidelines forbid moving the mouse cursor programmatically.
7050 """
7051 return _core_.Window_WarpPointer(*args, **kwargs)
7052
7053 def CaptureMouse(*args, **kwargs):
7054 """
7055 CaptureMouse(self)
7056
7057 Directs all mouse input to this window. Call wx.Window.ReleaseMouse to
7058 release the capture.
7059
7060 Note that wxWindows maintains the stack of windows having captured the
7061 mouse and when the mouse is released the capture returns to the window
7062 which had had captured it previously and it is only really released if
7063 there were no previous window. In particular, this means that you must
7064 release the mouse as many times as you capture it.
7065 """
7066 return _core_.Window_CaptureMouse(*args, **kwargs)
7067
7068 def ReleaseMouse(*args, **kwargs):
7069 """
7070 ReleaseMouse(self)
7071
7072 Releases mouse input captured with wx.Window.CaptureMouse.
7073 """
7074 return _core_.Window_ReleaseMouse(*args, **kwargs)
7075
7076 def GetCapture(*args, **kwargs):
7077 """
7078 GetCapture() -> Window
7079
7080 Returns the window which currently captures the mouse or None
7081 """
7082 return _core_.Window_GetCapture(*args, **kwargs)
7083
7084 GetCapture = staticmethod(GetCapture)
7085 def HasCapture(*args, **kwargs):
7086 """
7087 HasCapture(self) -> bool
7088
7089 Returns true if this window has the current mouse capture.
7090 """
7091 return _core_.Window_HasCapture(*args, **kwargs)
7092
7093 def Refresh(*args, **kwargs):
7094 """
7095 Refresh(self, bool eraseBackground=True, Rect rect=None)
7096
7097 Mark the specified rectangle (or the whole window) as "dirty" so it
7098 will be repainted. Causes an EVT_PAINT event to be generated and sent
7099 to the window.
7100 """
7101 return _core_.Window_Refresh(*args, **kwargs)
7102
7103 def RefreshRect(*args, **kwargs):
7104 """
7105 RefreshRect(self, Rect rect)
7106
7107 Redraws the contents of the given rectangle: the area inside it will
7108 be repainted. This is the same as Refresh but has a nicer syntax.
7109 """
7110 return _core_.Window_RefreshRect(*args, **kwargs)
7111
7112 def Update(*args, **kwargs):
7113 """
7114 Update(self)
7115
7116 Calling this method immediately repaints the invalidated area of the
7117 window instead of waiting for the EVT_PAINT event to happen, (normally
7118 this would usually only happen when the flow of control returns to the
7119 event loop.) Notice that this function doesn't refresh the window and
7120 does nothing if the window has been already repainted. Use Refresh
7121 first if you want to immediately redraw the window (or some portion of
7122 it) unconditionally.
7123 """
7124 return _core_.Window_Update(*args, **kwargs)
7125
7126 def ClearBackground(*args, **kwargs):
7127 """
7128 ClearBackground(self)
7129
7130 Clears the window by filling it with the current background
7131 colour. Does not cause an erase background event to be generated.
7132 """
7133 return _core_.Window_ClearBackground(*args, **kwargs)
7134
7135 def Freeze(*args, **kwargs):
7136 """
7137 Freeze(self)
7138
7139 Freezes the window or, in other words, prevents any updates from
7140 taking place on screen, the window is not redrawn at all. Thaw must be
7141 called to reenable window redrawing. Calls to Freeze/Thaw may be
7142 nested, with the actual Thaw being delayed until all the nesting has
7143 been undone.
7144
7145 This method is useful for visual appearance optimization (for example,
7146 it is a good idea to use it before inserting large amount of text into
7147 a wxTextCtrl under wxGTK) but is not implemented on all platforms nor
7148 for all controls so it is mostly just a hint to wxWindows and not a
7149 mandatory directive.
7150 """
7151 return _core_.Window_Freeze(*args, **kwargs)
7152
7153 def Thaw(*args, **kwargs):
7154 """
7155 Thaw(self)
7156
7157 Reenables window updating after a previous call to Freeze. Calls to
7158 Freeze/Thaw may be nested, so Thaw must be called the same number of
7159 times that Freeze was before the window will be updated.
7160 """
7161 return _core_.Window_Thaw(*args, **kwargs)
7162
7163 def PrepareDC(*args, **kwargs):
7164 """
7165 PrepareDC(self, DC dc)
7166
7167 Call this function to prepare the device context for drawing a
7168 scrolled image. It sets the device origin according to the current
7169 scroll position.
7170 """
7171 return _core_.Window_PrepareDC(*args, **kwargs)
7172
7173 def GetUpdateRegion(*args, **kwargs):
7174 """
7175 GetUpdateRegion(self) -> Region
7176
7177 Returns the region specifying which parts of the window have been
7178 damaged. Should only be called within an EVT_PAINT handler.
7179 """
7180 return _core_.Window_GetUpdateRegion(*args, **kwargs)
7181
7182 def GetUpdateClientRect(*args, **kwargs):
7183 """
7184 GetUpdateClientRect(self) -> Rect
7185
7186 Get the update rectangle region bounding box in client coords.
7187 """
7188 return _core_.Window_GetUpdateClientRect(*args, **kwargs)
7189
7190 def IsExposed(*args, **kwargs):
7191 """
7192 IsExposed(self, int x, int y, int w=1, int h=1) -> bool
7193
7194 Returns true if the given point or rectangle area has been exposed
7195 since the last repaint. Call this in an paint event handler to
7196 optimize redrawing by only redrawing those areas, which have been
7197 exposed.
7198 """
7199 return _core_.Window_IsExposed(*args, **kwargs)
7200
7201 def IsExposedPoint(*args, **kwargs):
7202 """
7203 IsExposedPoint(self, Point pt) -> bool
7204
7205 Returns true if the given point or rectangle area has been exposed
7206 since the last repaint. Call this in an paint event handler to
7207 optimize redrawing by only redrawing those areas, which have been
7208 exposed.
7209 """
7210 return _core_.Window_IsExposedPoint(*args, **kwargs)
7211
7212 def IsExposedRect(*args, **kwargs):
7213 """
7214 IsExposedRect(self, Rect rect) -> bool
7215
7216 Returns true if the given point or rectangle area has been exposed
7217 since the last repaint. Call this in an paint event handler to
7218 optimize redrawing by only redrawing those areas, which have been
7219 exposed.
7220 """
7221 return _core_.Window_IsExposedRect(*args, **kwargs)
7222
7223 def GetDefaultAttributes(*args, **kwargs):
7224 """
7225 GetDefaultAttributes(self) -> VisualAttributes
7226
7227 Get the default attributes for an instance of this class. This is
7228 useful if you want to use the same font or colour in your own control
7229 as in a standard control -- which is a much better idea than hard
7230 coding specific colours or fonts which might look completely out of
7231 place on the user's system, especially if it uses themes.
7232 """
7233 return _core_.Window_GetDefaultAttributes(*args, **kwargs)
7234
7235 def GetClassDefaultAttributes(*args, **kwargs):
7236 """
7237 GetClassDefaultAttributes(int variant=WINDOW_VARIANT_NORMAL) -> VisualAttributes
7238
7239 Get the default attributes for this class. This is useful if you want
7240 to use the same font or colour in your own control as in a standard
7241 control -- which is a much better idea than hard coding specific
7242 colours or fonts which might look completely out of place on the
7243 user's system, especially if it uses themes.
7244
7245 The variant parameter is only relevant under Mac currently and is
7246 ignore under other platforms. Under Mac, it will change the size of
7247 the returned font. See `wx.Window.SetWindowVariant` for more about
7248 this.
7249 """
7250 return _core_.Window_GetClassDefaultAttributes(*args, **kwargs)
7251
7252 GetClassDefaultAttributes = staticmethod(GetClassDefaultAttributes)
7253 def SetBackgroundColour(*args, **kwargs):
7254 """
7255 SetBackgroundColour(self, Colour colour) -> bool
7256
7257 Sets the background colour of the window. Returns True if the colour
7258 was changed. The background colour is usually painted by the default
7259 EVT_ERASE_BACKGROUND event handler function under Windows and
7260 automatically under GTK. Using `wx.NullColour` will reset the window
7261 to the default background colour.
7262
7263 Note that setting the background colour may not cause an immediate
7264 refresh, so you may wish to call `ClearBackground` or `Refresh` after
7265 calling this function.
7266
7267 Using this function will disable attempts to use themes for this
7268 window, if the system supports them. Use with care since usually the
7269 themes represent the appearance chosen by the user to be used for all
7270 applications on the system.
7271 """
7272 return _core_.Window_SetBackgroundColour(*args, **kwargs)
7273
7274 def SetOwnBackgroundColour(*args, **kwargs):
7275 """SetOwnBackgroundColour(self, Colour colour)"""
7276 return _core_.Window_SetOwnBackgroundColour(*args, **kwargs)
7277
7278 def SetForegroundColour(*args, **kwargs):
7279 """
7280 SetForegroundColour(self, Colour colour) -> bool
7281
7282 Sets the foreground colour of the window. Returns True is the colour
7283 was changed. The interpretation of foreground colour is dependent on
7284 the window class; it may be the text colour or other colour, or it may
7285 not be used at all.
7286 """
7287 return _core_.Window_SetForegroundColour(*args, **kwargs)
7288
7289 def SetOwnForegroundColour(*args, **kwargs):
7290 """SetOwnForegroundColour(self, Colour colour)"""
7291 return _core_.Window_SetOwnForegroundColour(*args, **kwargs)
7292
7293 def GetBackgroundColour(*args, **kwargs):
7294 """
7295 GetBackgroundColour(self) -> Colour
7296
7297 Returns the background colour of the window.
7298 """
7299 return _core_.Window_GetBackgroundColour(*args, **kwargs)
7300
7301 def GetForegroundColour(*args, **kwargs):
7302 """
7303 GetForegroundColour(self) -> Colour
7304
7305 Returns the foreground colour of the window. The interpretation of
7306 foreground colour is dependent on the window class; it may be the text
7307 colour or other colour, or it may not be used at all.
7308 """
7309 return _core_.Window_GetForegroundColour(*args, **kwargs)
7310
7311 def SetBackgroundStyle(*args, **kwargs):
7312 """
7313 SetBackgroundStyle(self, int style) -> bool
7314
7315 Returns the background style of the window. The background style
7316 indicates how the background of the window is drawn.
7317
7318 ====================== ========================================
7319 wx.BG_STYLE_SYSTEM The background colour or pattern should
7320 be determined by the system
7321 wx.BG_STYLE_COLOUR The background should be a solid colour
7322 wx.BG_STYLE_CUSTOM The background will be implemented by the
7323 application.
7324 ====================== ========================================
7325
7326 On GTK+, use of wx.BG_STYLE_CUSTOM allows the flicker-free drawing of
7327 a custom background, such as a tiled bitmap. Currently the style has
7328 no effect on other platforms.
7329
7330 :see: `GetBackgroundStyle`, `SetBackgroundColour`
7331 """
7332 return _core_.Window_SetBackgroundStyle(*args, **kwargs)
7333
7334 def GetBackgroundStyle(*args, **kwargs):
7335 """
7336 GetBackgroundStyle(self) -> int
7337
7338 Returns the background style of the window.
7339
7340 :see: `SetBackgroundStyle`
7341 """
7342 return _core_.Window_GetBackgroundStyle(*args, **kwargs)
7343
7344 def SetCursor(*args, **kwargs):
7345 """
7346 SetCursor(self, Cursor cursor) -> bool
7347
7348 Sets the window's cursor. Notice that the window cursor also sets it
7349 for the children of the window implicitly.
7350
7351 The cursor may be wx.NullCursor in which case the window cursor will
7352 be reset back to default.
7353 """
7354 return _core_.Window_SetCursor(*args, **kwargs)
7355
7356 def GetCursor(*args, **kwargs):
7357 """
7358 GetCursor(self) -> Cursor
7359
7360 Return the cursor associated with this window.
7361 """
7362 return _core_.Window_GetCursor(*args, **kwargs)
7363
7364 def SetFont(*args, **kwargs):
7365 """
7366 SetFont(self, Font font) -> bool
7367
7368 Sets the font for this window.
7369 """
7370 return _core_.Window_SetFont(*args, **kwargs)
7371
7372 def SetOwnFont(*args, **kwargs):
7373 """SetOwnFont(self, Font font)"""
7374 return _core_.Window_SetOwnFont(*args, **kwargs)
7375
7376 def GetFont(*args, **kwargs):
7377 """
7378 GetFont(self) -> Font
7379
7380 Returns the default font used for this window.
7381 """
7382 return _core_.Window_GetFont(*args, **kwargs)
7383
7384 def SetCaret(*args, **kwargs):
7385 """
7386 SetCaret(self, Caret caret)
7387
7388 Sets the caret associated with the window.
7389 """
7390 return _core_.Window_SetCaret(*args, **kwargs)
7391
7392 def GetCaret(*args, **kwargs):
7393 """
7394 GetCaret(self) -> Caret
7395
7396 Returns the caret associated with the window.
7397 """
7398 return _core_.Window_GetCaret(*args, **kwargs)
7399
7400 def GetCharHeight(*args, **kwargs):
7401 """
7402 GetCharHeight(self) -> int
7403
7404 Get the (average) character size for the current font.
7405 """
7406 return _core_.Window_GetCharHeight(*args, **kwargs)
7407
7408 def GetCharWidth(*args, **kwargs):
7409 """
7410 GetCharWidth(self) -> int
7411
7412 Get the (average) character size for the current font.
7413 """
7414 return _core_.Window_GetCharWidth(*args, **kwargs)
7415
7416 def GetTextExtent(*args, **kwargs):
7417 """
7418 GetTextExtent(String string) -> (width, height)
7419
7420 Get the width and height of the text using the current font.
7421 """
7422 return _core_.Window_GetTextExtent(*args, **kwargs)
7423
7424 def GetFullTextExtent(*args, **kwargs):
7425 """
7426 GetFullTextExtent(String string, Font font=None) ->
7427 (width, height, descent, externalLeading)
7428
7429 Get the width, height, decent and leading of the text using the
7430 current or specified font.
7431 """
7432 return _core_.Window_GetFullTextExtent(*args, **kwargs)
7433
7434 def ClientToScreenXY(*args, **kwargs):
7435 """
7436 ClientToScreenXY(int x, int y) -> (x,y)
7437
7438 Converts to screen coordinates from coordinates relative to this window.
7439 """
7440 return _core_.Window_ClientToScreenXY(*args, **kwargs)
7441
7442 def ScreenToClientXY(*args, **kwargs):
7443 """
7444 ScreenToClientXY(int x, int y) -> (x,y)
7445
7446 Converts from screen to client window coordinates.
7447 """
7448 return _core_.Window_ScreenToClientXY(*args, **kwargs)
7449
7450 def ClientToScreen(*args, **kwargs):
7451 """
7452 ClientToScreen(self, Point pt) -> Point
7453
7454 Converts to screen coordinates from coordinates relative to this window.
7455 """
7456 return _core_.Window_ClientToScreen(*args, **kwargs)
7457
7458 def ScreenToClient(*args, **kwargs):
7459 """
7460 ScreenToClient(self, Point pt) -> Point
7461
7462 Converts from screen to client window coordinates.
7463 """
7464 return _core_.Window_ScreenToClient(*args, **kwargs)
7465
7466 def HitTestXY(*args, **kwargs):
7467 """
7468 HitTestXY(self, int x, int y) -> int
7469
7470 Test where the given (in client coords) point lies
7471 """
7472 return _core_.Window_HitTestXY(*args, **kwargs)
7473
7474 def HitTest(*args, **kwargs):
7475 """
7476 HitTest(self, Point pt) -> int
7477
7478 Test where the given (in client coords) point lies
7479 """
7480 return _core_.Window_HitTest(*args, **kwargs)
7481
7482 def GetBorder(*args):
7483 """
7484 GetBorder(self, long flags) -> int
7485 GetBorder(self) -> int
7486
7487 Get border for the flags of this window
7488 """
7489 return _core_.Window_GetBorder(*args)
7490
7491 def UpdateWindowUI(*args, **kwargs):
7492 """
7493 UpdateWindowUI(self, long flags=UPDATE_UI_NONE)
7494
7495 This function sends EVT_UPDATE_UI events to the window. The particular
7496 implementation depends on the window; for example a wx.ToolBar will
7497 send an update UI event for each toolbar button, and a wx.Frame will
7498 send an update UI event for each menubar menu item. You can call this
7499 function from your application to ensure that your UI is up-to-date at
7500 a particular point in time (as far as your EVT_UPDATE_UI handlers are
7501 concerned). This may be necessary if you have called
7502 wx.UpdateUIEvent.SetMode or wx.UpdateUIEvent.SetUpdateInterval to
7503 limit the overhead that wxWindows incurs by sending update UI events
7504 in idle time.
7505 """
7506 return _core_.Window_UpdateWindowUI(*args, **kwargs)
7507
7508 def PopupMenuXY(*args, **kwargs):
7509 """
7510 PopupMenuXY(self, Menu menu, int x=-1, int y=-1) -> bool
7511
7512 Pops up the given menu at the specified coordinates, relative to this window,
7513 and returns control when the user has dismissed the menu. If a menu item is
7514 selected, the corresponding menu event is generated and will be processed as
7515 usual. If the default position is given then the current position of the
7516 mouse cursor will be used.
7517 """
7518 return _core_.Window_PopupMenuXY(*args, **kwargs)
7519
7520 def PopupMenu(*args, **kwargs):
7521 """
7522 PopupMenu(self, Menu menu, Point pos=DefaultPosition) -> bool
7523
7524 Pops up the given menu at the specified coordinates, relative to this window,
7525 and returns control when the user has dismissed the menu. If a menu item is
7526 selected, the corresponding menu event is generated and will be processed as
7527 usual. If the default position is given then the current position of the
7528 mouse cursor will be used.
7529 """
7530 return _core_.Window_PopupMenu(*args, **kwargs)
7531
7532 def GetHandle(*args, **kwargs):
7533 """
7534 GetHandle(self) -> long
7535
7536 Returns the platform-specific handle (as a long integer) of the
7537 physical window. Currently on wxMac it returns the handle of the
7538 toplevel parent of the window.
7539 """
7540 return _core_.Window_GetHandle(*args, **kwargs)
7541
7542 def AssociateHandle(*args, **kwargs):
7543 """
7544 AssociateHandle(self, long handle)
7545
7546 Associate the window with a new native handle
7547 """
7548 return _core_.Window_AssociateHandle(*args, **kwargs)
7549
7550 def DissociateHandle(*args, **kwargs):
7551 """
7552 DissociateHandle(self)
7553
7554 Dissociate the current native handle from the window
7555 """
7556 return _core_.Window_DissociateHandle(*args, **kwargs)
7557
7558 def OnPaint(*args, **kwargs):
7559 """OnPaint(self, PaintEvent event)"""
7560 return _core_.Window_OnPaint(*args, **kwargs)
7561
7562 def HasScrollbar(*args, **kwargs):
7563 """
7564 HasScrollbar(self, int orient) -> bool
7565
7566 Does the window have the scrollbar for this orientation?
7567 """
7568 return _core_.Window_HasScrollbar(*args, **kwargs)
7569
7570 def SetScrollbar(*args, **kwargs):
7571 """
7572 SetScrollbar(self, int orientation, int position, int thumbSize, int range,
7573 bool refresh=True)
7574
7575 Sets the scrollbar properties of a built-in scrollbar.
7576 """
7577 return _core_.Window_SetScrollbar(*args, **kwargs)
7578
7579 def SetScrollPos(*args, **kwargs):
7580 """
7581 SetScrollPos(self, int orientation, int pos, bool refresh=True)
7582
7583 Sets the position of one of the built-in scrollbars.
7584 """
7585 return _core_.Window_SetScrollPos(*args, **kwargs)
7586
7587 def GetScrollPos(*args, **kwargs):
7588 """
7589 GetScrollPos(self, int orientation) -> int
7590
7591 Returns the built-in scrollbar position.
7592 """
7593 return _core_.Window_GetScrollPos(*args, **kwargs)
7594
7595 def GetScrollThumb(*args, **kwargs):
7596 """
7597 GetScrollThumb(self, int orientation) -> int
7598
7599 Returns the built-in scrollbar thumb size.
7600 """
7601 return _core_.Window_GetScrollThumb(*args, **kwargs)
7602
7603 def GetScrollRange(*args, **kwargs):
7604 """
7605 GetScrollRange(self, int orientation) -> int
7606
7607 Returns the built-in scrollbar range.
7608 """
7609 return _core_.Window_GetScrollRange(*args, **kwargs)
7610
7611 def ScrollWindow(*args, **kwargs):
7612 """
7613 ScrollWindow(self, int dx, int dy, Rect rect=None)
7614
7615 Physically scrolls the pixels in the window and move child windows
7616 accordingly. Use this function to optimise your scrolling
7617 implementations, to minimise the area that must be redrawn. Note that
7618 it is rarely required to call this function from a user program.
7619 """
7620 return _core_.Window_ScrollWindow(*args, **kwargs)
7621
7622 def ScrollLines(*args, **kwargs):
7623 """
7624 ScrollLines(self, int lines) -> bool
7625
7626 If the platform and window class supports it, scrolls the window by
7627 the given number of lines down, if lines is positive, or up if lines
7628 is negative. Returns True if the window was scrolled, False if it was
7629 already on top/bottom and nothing was done.
7630 """
7631 return _core_.Window_ScrollLines(*args, **kwargs)
7632
7633 def ScrollPages(*args, **kwargs):
7634 """
7635 ScrollPages(self, int pages) -> bool
7636
7637 If the platform and window class supports it, scrolls the window by
7638 the given number of pages down, if pages is positive, or up if pages
7639 is negative. Returns True if the window was scrolled, False if it was
7640 already on top/bottom and nothing was done.
7641 """
7642 return _core_.Window_ScrollPages(*args, **kwargs)
7643
7644 def LineUp(*args, **kwargs):
7645 """
7646 LineUp(self) -> bool
7647
7648 This is just a wrapper for ScrollLines(-1).
7649 """
7650 return _core_.Window_LineUp(*args, **kwargs)
7651
7652 def LineDown(*args, **kwargs):
7653 """
7654 LineDown(self) -> bool
7655
7656 This is just a wrapper for ScrollLines(1).
7657 """
7658 return _core_.Window_LineDown(*args, **kwargs)
7659
7660 def PageUp(*args, **kwargs):
7661 """
7662 PageUp(self) -> bool
7663
7664 This is just a wrapper for ScrollPages(-1).
7665 """
7666 return _core_.Window_PageUp(*args, **kwargs)
7667
7668 def PageDown(*args, **kwargs):
7669 """
7670 PageDown(self) -> bool
7671
7672 This is just a wrapper for ScrollPages(1).
7673 """
7674 return _core_.Window_PageDown(*args, **kwargs)
7675
7676 def SetHelpText(*args, **kwargs):
7677 """
7678 SetHelpText(self, String text)
7679
7680 Sets the help text to be used as context-sensitive help for this
7681 window. Note that the text is actually stored by the current
7682 wxHelpProvider implementation, and not in the window object itself.
7683 """
7684 return _core_.Window_SetHelpText(*args, **kwargs)
7685
7686 def SetHelpTextForId(*args, **kwargs):
7687 """
7688 SetHelpTextForId(self, String text)
7689
7690 Associate this help text with all windows with the same id as this
7691 one.
7692 """
7693 return _core_.Window_SetHelpTextForId(*args, **kwargs)
7694
7695 def GetHelpText(*args, **kwargs):
7696 """
7697 GetHelpText(self) -> String
7698
7699 Gets the help text to be used as context-sensitive help for this
7700 window. Note that the text is actually stored by the current
7701 wxHelpProvider implementation, and not in the window object itself.
7702 """
7703 return _core_.Window_GetHelpText(*args, **kwargs)
7704
7705 def SetToolTipString(*args, **kwargs):
7706 """
7707 SetToolTipString(self, String tip)
7708
7709 Attach a tooltip to the window.
7710 """
7711 return _core_.Window_SetToolTipString(*args, **kwargs)
7712
7713 def SetToolTip(*args, **kwargs):
7714 """
7715 SetToolTip(self, ToolTip tip)
7716
7717 Attach a tooltip to the window.
7718 """
7719 return _core_.Window_SetToolTip(*args, **kwargs)
7720
7721 def GetToolTip(*args, **kwargs):
7722 """
7723 GetToolTip(self) -> ToolTip
7724
7725 get the associated tooltip or None if none
7726 """
7727 return _core_.Window_GetToolTip(*args, **kwargs)
7728
7729 def SetDropTarget(*args, **kwargs):
7730 """
7731 SetDropTarget(self, DropTarget dropTarget)
7732
7733 Associates a drop target with this window. If the window already has
7734 a drop target, it is deleted.
7735 """
7736 return _core_.Window_SetDropTarget(*args, **kwargs)
7737
7738 def GetDropTarget(*args, **kwargs):
7739 """
7740 GetDropTarget(self) -> DropTarget
7741
7742 Returns the associated drop target, which may be None.
7743 """
7744 return _core_.Window_GetDropTarget(*args, **kwargs)
7745
7746 def DragAcceptFiles(*args, **kwargs):
7747 """
7748 DragAcceptFiles(self, bool accept)
7749
7750 Enables or disables eligibility for drop file events, EVT_DROP_FILES.
7751 Only available on Windows.
7752 """
7753 return _core_.Window_DragAcceptFiles(*args, **kwargs)
7754
7755 def SetConstraints(*args, **kwargs):
7756 """
7757 SetConstraints(self, LayoutConstraints constraints)
7758
7759 Sets the window to have the given layout constraints. If an existing
7760 layout constraints object is already owned by the window, it will be
7761 deleted. Pass None to disassociate and delete the window's current
7762 constraints.
7763
7764 You must call SetAutoLayout to tell a window to use the constraints
7765 automatically in its default EVT_SIZE handler; otherwise, you must
7766 handle EVT_SIZE yourself and call Layout() explicitly. When setting
7767 both a wx.LayoutConstraints and a wx.Sizer, only the sizer will have
7768 effect.
7769 """
7770 return _core_.Window_SetConstraints(*args, **kwargs)
7771
7772 def GetConstraints(*args, **kwargs):
7773 """
7774 GetConstraints(self) -> LayoutConstraints
7775
7776 Returns a pointer to the window's layout constraints, or None if there
7777 are none.
7778 """
7779 return _core_.Window_GetConstraints(*args, **kwargs)
7780
7781 def SetAutoLayout(*args, **kwargs):
7782 """
7783 SetAutoLayout(self, bool autoLayout)
7784
7785 Determines whether the Layout function will be called automatically
7786 when the window is resized. It is called implicitly by SetSizer but
7787 if you use SetConstraints you should call it manually or otherwise the
7788 window layout won't be correctly updated when its size changes.
7789 """
7790 return _core_.Window_SetAutoLayout(*args, **kwargs)
7791
7792 def GetAutoLayout(*args, **kwargs):
7793 """
7794 GetAutoLayout(self) -> bool
7795
7796 Returns the current autoLayout setting
7797 """
7798 return _core_.Window_GetAutoLayout(*args, **kwargs)
7799
7800 def Layout(*args, **kwargs):
7801 """
7802 Layout(self) -> bool
7803
7804 Invokes the constraint-based layout algorithm or the sizer-based
7805 algorithm for this window. See SetAutoLayout: when auto layout is on,
7806 this function gets called automatically by the default EVT_SIZE
7807 handler when the window is resized.
7808 """
7809 return _core_.Window_Layout(*args, **kwargs)
7810
7811 def SetSizer(*args, **kwargs):
7812 """
7813 SetSizer(self, Sizer sizer, bool deleteOld=True)
7814
7815 Sets the window to have the given layout sizer. The window will then
7816 own the object, and will take care of its deletion. If an existing
7817 layout sizer object is already owned by the window, it will be deleted
7818 if the deleteOld parameter is true. Note that this function will also
7819 call SetAutoLayout implicitly with a True parameter if the sizer is
7820 non-None, and False otherwise.
7821 """
7822 return _core_.Window_SetSizer(*args, **kwargs)
7823
7824 def SetSizerAndFit(*args, **kwargs):
7825 """
7826 SetSizerAndFit(self, Sizer sizer, bool deleteOld=True)
7827
7828 The same as SetSizer, except it also sets the size hints for the
7829 window based on the sizer's minimum size.
7830 """
7831 return _core_.Window_SetSizerAndFit(*args, **kwargs)
7832
7833 def GetSizer(*args, **kwargs):
7834 """
7835 GetSizer(self) -> Sizer
7836
7837 Return the sizer associated with the window by a previous call to
7838 SetSizer or None if there isn't one.
7839 """
7840 return _core_.Window_GetSizer(*args, **kwargs)
7841
7842 def SetContainingSizer(*args, **kwargs):
7843 """
7844 SetContainingSizer(self, Sizer sizer)
7845
7846 This normally does not need to be called by application code. It is
7847 called internally when a window is added to a sizer, and is used so
7848 the window can remove itself from the sizer when it is destroyed.
7849 """
7850 return _core_.Window_SetContainingSizer(*args, **kwargs)
7851
7852 def GetContainingSizer(*args, **kwargs):
7853 """
7854 GetContainingSizer(self) -> Sizer
7855
7856 Return the sizer that this window is a member of, if any, otherwise None.
7857 """
7858 return _core_.Window_GetContainingSizer(*args, **kwargs)
7859
7860 def InheritAttributes(*args, **kwargs):
7861 """
7862 InheritAttributes(self)
7863
7864 This function is (or should be, in case of custom controls) called
7865 during window creation to intelligently set up the window visual
7866 attributes, that is the font and the foreground and background
7867 colours.
7868
7869 By 'intelligently' the following is meant: by default, all windows use
7870 their own default attributes. However if some of the parent's
7871 attributes are explicitly changed (that is, using SetFont and not
7872 SetOwnFont) and if the corresponding attribute hadn't been
7873 explicitly set for this window itself, then this window takes the same
7874 value as used by the parent. In addition, if the window overrides
7875 ShouldInheritColours to return false, the colours will not be changed
7876 no matter what and only the font might.
7877
7878 This rather complicated logic is necessary in order to accommodate the
7879 different usage scenarios. The most common one is when all default
7880 attributes are used and in this case, nothing should be inherited as
7881 in modern GUIs different controls use different fonts (and colours)
7882 than their siblings so they can't inherit the same value from the
7883 parent. However it was also deemed desirable to allow to simply change
7884 the attributes of all children at once by just changing the font or
7885 colour of their common parent, hence in this case we do inherit the
7886 parents attributes.
7887
7888 """
7889 return _core_.Window_InheritAttributes(*args, **kwargs)
7890
7891 def ShouldInheritColours(*args, **kwargs):
7892 """
7893 ShouldInheritColours(self) -> bool
7894
7895 Return true from here to allow the colours of this window to be
7896 changed by InheritAttributes, returning false forbids inheriting them
7897 from the parent window.
7898
7899 The base class version returns false, but this method is overridden in
7900 wxControl where it returns true.
7901 """
7902 return _core_.Window_ShouldInheritColours(*args, **kwargs)
7903
7904 def PostCreate(self, pre):
7905 """
7906 Phase 3 of the 2-phase create <wink!>
7907 Call this method after precreating the window with the 2-phase create method.
7908 """
7909 self.this = pre.this
7910 self.thisown = pre.thisown
7911 pre.thisown = 0
7912 if hasattr(self, '_setOORInfo'):
7913 self._setOORInfo(self)
7914 if hasattr(self, '_setCallbackInfo'):
7915 self._setCallbackInfo(self, self.__class__)
7916
7917
7918 class WindowPtr(Window):
7919 def __init__(self, this):
7920 self.this = this
7921 if not hasattr(self,"thisown"): self.thisown = 0
7922 self.__class__ = Window
7923 _core_.Window_swigregister(WindowPtr)
7924
7925 def PreWindow(*args, **kwargs):
7926 """
7927 PreWindow() -> Window
7928
7929 Precreate a Window for 2-phase creation.
7930 """
7931 val = _core_.new_PreWindow(*args, **kwargs)
7932 val.thisown = 1
7933 return val
7934
7935 def Window_NewControlId(*args, **kwargs):
7936 """
7937 Window_NewControlId() -> int
7938
7939 Generate a control id for the controls which were not given one.
7940 """
7941 return _core_.Window_NewControlId(*args, **kwargs)
7942
7943 def Window_NextControlId(*args, **kwargs):
7944 """
7945 Window_NextControlId(int winid) -> int
7946
7947 Get the id of the control following the one with the given
7948 autogenerated) id
7949 """
7950 return _core_.Window_NextControlId(*args, **kwargs)
7951
7952 def Window_PrevControlId(*args, **kwargs):
7953 """
7954 Window_PrevControlId(int winid) -> int
7955
7956 Get the id of the control preceding the one with the given
7957 autogenerated) id
7958 """
7959 return _core_.Window_PrevControlId(*args, **kwargs)
7960
7961 def Window_FindFocus(*args, **kwargs):
7962 """
7963 Window_FindFocus() -> Window
7964
7965 Returns the window or control that currently has the keyboard focus,
7966 or None.
7967 """
7968 return _core_.Window_FindFocus(*args, **kwargs)
7969
7970 def Window_GetCapture(*args, **kwargs):
7971 """
7972 Window_GetCapture() -> Window
7973
7974 Returns the window which currently captures the mouse or None
7975 """
7976 return _core_.Window_GetCapture(*args, **kwargs)
7977
7978 def Window_GetClassDefaultAttributes(*args, **kwargs):
7979 """
7980 Window_GetClassDefaultAttributes(int variant=WINDOW_VARIANT_NORMAL) -> VisualAttributes
7981
7982 Get the default attributes for this class. This is useful if you want
7983 to use the same font or colour in your own control as in a standard
7984 control -- which is a much better idea than hard coding specific
7985 colours or fonts which might look completely out of place on the
7986 user's system, especially if it uses themes.
7987
7988 The variant parameter is only relevant under Mac currently and is
7989 ignore under other platforms. Under Mac, it will change the size of
7990 the returned font. See `wx.Window.SetWindowVariant` for more about
7991 this.
7992 """
7993 return _core_.Window_GetClassDefaultAttributes(*args, **kwargs)
7994
7995 def DLG_PNT(win, point_or_x, y=None):
7996 """
7997 Convenience function for converting a Point or (x,y) in
7998 dialog units to pixel units.
7999 """
8000 if y is None:
8001 return win.ConvertDialogPointToPixels(point_or_x)
8002 else:
8003 return win.ConvertDialogPointToPixels(wx.Point(point_or_x, y))
8004
8005 def DLG_SZE(win, size_width, height=None):
8006 """
8007 Convenience function for converting a Size or (w,h) in
8008 dialog units to pixel units.
8009 """
8010 if height is None:
8011 return win.ConvertDialogSizeToPixels(size_width)
8012 else:
8013 return win.ConvertDialogSizeToPixels(wx.Size(size_width, height))
8014
8015
8016 def FindWindowById(*args, **kwargs):
8017 """
8018 FindWindowById(long id, Window parent=None) -> Window
8019
8020 Find the first window in the application with the given id. If parent
8021 is None, the search will start from all top-level frames and dialog
8022 boxes; if non-None, the search will be limited to the given window
8023 hierarchy. The search is recursive in both cases.
8024 """
8025 return _core_.FindWindowById(*args, **kwargs)
8026
8027 def FindWindowByName(*args, **kwargs):
8028 """
8029 FindWindowByName(String name, Window parent=None) -> Window
8030
8031 Find a window by its name (as given in a window constructor or Create
8032 function call). If parent is None, the search will start from all
8033 top-level frames and dialog boxes; if non-None, the search will be
8034 limited to the given window hierarchy. The search is recursive in both
8035 cases.
8036
8037 If no window with such name is found, wx.FindWindowByLabel is called.
8038 """
8039 return _core_.FindWindowByName(*args, **kwargs)
8040
8041 def FindWindowByLabel(*args, **kwargs):
8042 """
8043 FindWindowByLabel(String label, Window parent=None) -> Window
8044
8045 Find a window by its label. Depending on the type of window, the label
8046 may be a window title or panel item label. If parent is None, the
8047 search will start from all top-level frames and dialog boxes; if
8048 non-None, the search will be limited to the given window
8049 hierarchy. The search is recursive in both cases.
8050 """
8051 return _core_.FindWindowByLabel(*args, **kwargs)
8052
8053 def Window_FromHWND(*args, **kwargs):
8054 """Window_FromHWND(Window parent, unsigned long _hWnd) -> Window"""
8055 return _core_.Window_FromHWND(*args, **kwargs)
8056 #---------------------------------------------------------------------------
8057
8058 class Validator(EvtHandler):
8059 """Proxy of C++ Validator class"""
8060 def __repr__(self):
8061 return "<%s.%s; proxy of C++ wxValidator instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
8062 def __init__(self, *args, **kwargs):
8063 """__init__(self) -> Validator"""
8064 newobj = _core_.new_Validator(*args, **kwargs)
8065 self.this = newobj.this
8066 self.thisown = 1
8067 del newobj.thisown
8068 self._setOORInfo(self)
8069
8070 def Clone(*args, **kwargs):
8071 """Clone(self) -> Validator"""
8072 return _core_.Validator_Clone(*args, **kwargs)
8073
8074 def Validate(*args, **kwargs):
8075 """Validate(self, Window parent) -> bool"""
8076 return _core_.Validator_Validate(*args, **kwargs)
8077
8078 def TransferToWindow(*args, **kwargs):
8079 """TransferToWindow(self) -> bool"""
8080 return _core_.Validator_TransferToWindow(*args, **kwargs)
8081
8082 def TransferFromWindow(*args, **kwargs):
8083 """TransferFromWindow(self) -> bool"""
8084 return _core_.Validator_TransferFromWindow(*args, **kwargs)
8085
8086 def GetWindow(*args, **kwargs):
8087 """GetWindow(self) -> Window"""
8088 return _core_.Validator_GetWindow(*args, **kwargs)
8089
8090 def SetWindow(*args, **kwargs):
8091 """SetWindow(self, Window window)"""
8092 return _core_.Validator_SetWindow(*args, **kwargs)
8093
8094 def IsSilent(*args, **kwargs):
8095 """IsSilent() -> bool"""
8096 return _core_.Validator_IsSilent(*args, **kwargs)
8097
8098 IsSilent = staticmethod(IsSilent)
8099 def SetBellOnError(*args, **kwargs):
8100 """SetBellOnError(int doIt=True)"""
8101 return _core_.Validator_SetBellOnError(*args, **kwargs)
8102
8103 SetBellOnError = staticmethod(SetBellOnError)
8104
8105 class ValidatorPtr(Validator):
8106 def __init__(self, this):
8107 self.this = this
8108 if not hasattr(self,"thisown"): self.thisown = 0
8109 self.__class__ = Validator
8110 _core_.Validator_swigregister(ValidatorPtr)
8111
8112 def Validator_IsSilent(*args, **kwargs):
8113 """Validator_IsSilent() -> bool"""
8114 return _core_.Validator_IsSilent(*args, **kwargs)
8115
8116 def Validator_SetBellOnError(*args, **kwargs):
8117 """Validator_SetBellOnError(int doIt=True)"""
8118 return _core_.Validator_SetBellOnError(*args, **kwargs)
8119
8120 class PyValidator(Validator):
8121 """Proxy of C++ PyValidator class"""
8122 def __repr__(self):
8123 return "<%s.%s; proxy of C++ wxPyValidator instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
8124 def __init__(self, *args, **kwargs):
8125 """__init__(self) -> PyValidator"""
8126 newobj = _core_.new_PyValidator(*args, **kwargs)
8127 self.this = newobj.this
8128 self.thisown = 1
8129 del newobj.thisown
8130
8131 self._setCallbackInfo(self, PyValidator, 1)
8132 self._setOORInfo(self)
8133
8134 def _setCallbackInfo(*args, **kwargs):
8135 """_setCallbackInfo(self, PyObject self, PyObject _class, int incref=True)"""
8136 return _core_.PyValidator__setCallbackInfo(*args, **kwargs)
8137
8138
8139 class PyValidatorPtr(PyValidator):
8140 def __init__(self, this):
8141 self.this = this
8142 if not hasattr(self,"thisown"): self.thisown = 0
8143 self.__class__ = PyValidator
8144 _core_.PyValidator_swigregister(PyValidatorPtr)
8145
8146 #---------------------------------------------------------------------------
8147
8148 class Menu(EvtHandler):
8149 """Proxy of C++ Menu class"""
8150 def __repr__(self):
8151 return "<%s.%s; proxy of C++ wxMenu instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
8152 def __init__(self, *args, **kwargs):
8153 """__init__(self, String title=EmptyString, long style=0) -> Menu"""
8154 newobj = _core_.new_Menu(*args, **kwargs)
8155 self.this = newobj.this
8156 self.thisown = 1
8157 del newobj.thisown
8158 self._setOORInfo(self)
8159
8160 def Append(*args, **kwargs):
8161 """Append(self, int id, String text, String help=EmptyString, int kind=ITEM_NORMAL) -> MenuItem"""
8162 return _core_.Menu_Append(*args, **kwargs)
8163
8164 def AppendSeparator(*args, **kwargs):
8165 """AppendSeparator(self) -> MenuItem"""
8166 return _core_.Menu_AppendSeparator(*args, **kwargs)
8167
8168 def AppendCheckItem(*args, **kwargs):
8169 """AppendCheckItem(self, int id, String text, String help=EmptyString) -> MenuItem"""
8170 return _core_.Menu_AppendCheckItem(*args, **kwargs)
8171
8172 def AppendRadioItem(*args, **kwargs):
8173 """AppendRadioItem(self, int id, String text, String help=EmptyString) -> MenuItem"""
8174 return _core_.Menu_AppendRadioItem(*args, **kwargs)
8175
8176 def AppendMenu(*args, **kwargs):
8177 """AppendMenu(self, int id, String text, Menu submenu, String help=EmptyString) -> MenuItem"""
8178 return _core_.Menu_AppendMenu(*args, **kwargs)
8179
8180 def AppendItem(*args, **kwargs):
8181 """AppendItem(self, MenuItem item) -> MenuItem"""
8182 return _core_.Menu_AppendItem(*args, **kwargs)
8183
8184 def Break(*args, **kwargs):
8185 """Break(self)"""
8186 return _core_.Menu_Break(*args, **kwargs)
8187
8188 def InsertItem(*args, **kwargs):
8189 """InsertItem(self, size_t pos, MenuItem item) -> MenuItem"""
8190 return _core_.Menu_InsertItem(*args, **kwargs)
8191
8192 def Insert(*args, **kwargs):
8193 """
8194 Insert(self, size_t pos, int id, String text, String help=EmptyString,
8195 int kind=ITEM_NORMAL) -> MenuItem
8196 """
8197 return _core_.Menu_Insert(*args, **kwargs)
8198
8199 def InsertSeparator(*args, **kwargs):
8200 """InsertSeparator(self, size_t pos) -> MenuItem"""
8201 return _core_.Menu_InsertSeparator(*args, **kwargs)
8202
8203 def InsertCheckItem(*args, **kwargs):
8204 """InsertCheckItem(self, size_t pos, int id, String text, String help=EmptyString) -> MenuItem"""
8205 return _core_.Menu_InsertCheckItem(*args, **kwargs)
8206
8207 def InsertRadioItem(*args, **kwargs):
8208 """InsertRadioItem(self, size_t pos, int id, String text, String help=EmptyString) -> MenuItem"""
8209 return _core_.Menu_InsertRadioItem(*args, **kwargs)
8210
8211 def InsertMenu(*args, **kwargs):
8212 """InsertMenu(self, size_t pos, int id, String text, Menu submenu, String help=EmptyString) -> MenuItem"""
8213 return _core_.Menu_InsertMenu(*args, **kwargs)
8214
8215 def PrependItem(*args, **kwargs):
8216 """PrependItem(self, MenuItem item) -> MenuItem"""
8217 return _core_.Menu_PrependItem(*args, **kwargs)
8218
8219 def Prepend(*args, **kwargs):
8220 """Prepend(self, int id, String text, String help=EmptyString, int kind=ITEM_NORMAL) -> MenuItem"""
8221 return _core_.Menu_Prepend(*args, **kwargs)
8222
8223 def PrependSeparator(*args, **kwargs):
8224 """PrependSeparator(self) -> MenuItem"""
8225 return _core_.Menu_PrependSeparator(*args, **kwargs)
8226
8227 def PrependCheckItem(*args, **kwargs):
8228 """PrependCheckItem(self, int id, String text, String help=EmptyString) -> MenuItem"""
8229 return _core_.Menu_PrependCheckItem(*args, **kwargs)
8230
8231 def PrependRadioItem(*args, **kwargs):
8232 """PrependRadioItem(self, int id, String text, String help=EmptyString) -> MenuItem"""
8233 return _core_.Menu_PrependRadioItem(*args, **kwargs)
8234
8235 def PrependMenu(*args, **kwargs):
8236 """PrependMenu(self, int id, String text, Menu submenu, String help=EmptyString) -> MenuItem"""
8237 return _core_.Menu_PrependMenu(*args, **kwargs)
8238
8239 def Remove(*args, **kwargs):
8240 """Remove(self, int id) -> MenuItem"""
8241 return _core_.Menu_Remove(*args, **kwargs)
8242
8243 def RemoveItem(*args, **kwargs):
8244 """RemoveItem(self, MenuItem item) -> MenuItem"""
8245 return _core_.Menu_RemoveItem(*args, **kwargs)
8246
8247 def Delete(*args, **kwargs):
8248 """Delete(self, int id) -> bool"""
8249 return _core_.Menu_Delete(*args, **kwargs)
8250
8251 def DeleteItem(*args, **kwargs):
8252 """DeleteItem(self, MenuItem item) -> bool"""
8253 return _core_.Menu_DeleteItem(*args, **kwargs)
8254
8255 def Destroy(*args, **kwargs):
8256 """
8257 Destroy(self)
8258
8259 Deletes the C++ object this Python object is a proxy for.
8260 """
8261 return _core_.Menu_Destroy(*args, **kwargs)
8262
8263 def DestroyId(*args, **kwargs):
8264 """
8265 DestroyId(self, int id) -> bool
8266
8267 Deletes the C++ object this Python object is a proxy for.
8268 """
8269 return _core_.Menu_DestroyId(*args, **kwargs)
8270
8271 def DestroyItem(*args, **kwargs):
8272 """
8273 DestroyItem(self, MenuItem item) -> bool
8274
8275 Deletes the C++ object this Python object is a proxy for.
8276 """
8277 return _core_.Menu_DestroyItem(*args, **kwargs)
8278
8279 def GetMenuItemCount(*args, **kwargs):
8280 """GetMenuItemCount(self) -> size_t"""
8281 return _core_.Menu_GetMenuItemCount(*args, **kwargs)
8282
8283 def GetMenuItems(*args, **kwargs):
8284 """GetMenuItems(self) -> PyObject"""
8285 return _core_.Menu_GetMenuItems(*args, **kwargs)
8286
8287 def FindItem(*args, **kwargs):
8288 """FindItem(self, String item) -> int"""
8289 return _core_.Menu_FindItem(*args, **kwargs)
8290
8291 def FindItemById(*args, **kwargs):
8292 """FindItemById(self, int id) -> MenuItem"""
8293 return _core_.Menu_FindItemById(*args, **kwargs)
8294
8295 def FindItemByPosition(*args, **kwargs):
8296 """FindItemByPosition(self, size_t position) -> MenuItem"""
8297 return _core_.Menu_FindItemByPosition(*args, **kwargs)
8298
8299 def Enable(*args, **kwargs):
8300 """Enable(self, int id, bool enable)"""
8301 return _core_.Menu_Enable(*args, **kwargs)
8302
8303 def IsEnabled(*args, **kwargs):
8304 """IsEnabled(self, int id) -> bool"""
8305 return _core_.Menu_IsEnabled(*args, **kwargs)
8306
8307 def Check(*args, **kwargs):
8308 """Check(self, int id, bool check)"""
8309 return _core_.Menu_Check(*args, **kwargs)
8310
8311 def IsChecked(*args, **kwargs):
8312 """IsChecked(self, int id) -> bool"""
8313 return _core_.Menu_IsChecked(*args, **kwargs)
8314
8315 def SetLabel(*args, **kwargs):
8316 """SetLabel(self, int id, String label)"""
8317 return _core_.Menu_SetLabel(*args, **kwargs)
8318
8319 def GetLabel(*args, **kwargs):
8320 """GetLabel(self, int id) -> String"""
8321 return _core_.Menu_GetLabel(*args, **kwargs)
8322
8323 def SetHelpString(*args, **kwargs):
8324 """SetHelpString(self, int id, String helpString)"""
8325 return _core_.Menu_SetHelpString(*args, **kwargs)
8326
8327 def GetHelpString(*args, **kwargs):
8328 """GetHelpString(self, int id) -> String"""
8329 return _core_.Menu_GetHelpString(*args, **kwargs)
8330
8331 def SetTitle(*args, **kwargs):
8332 """SetTitle(self, String title)"""
8333 return _core_.Menu_SetTitle(*args, **kwargs)
8334
8335 def GetTitle(*args, **kwargs):
8336 """GetTitle(self) -> String"""
8337 return _core_.Menu_GetTitle(*args, **kwargs)
8338
8339 def SetEventHandler(*args, **kwargs):
8340 """SetEventHandler(self, EvtHandler handler)"""
8341 return _core_.Menu_SetEventHandler(*args, **kwargs)
8342
8343 def GetEventHandler(*args, **kwargs):
8344 """GetEventHandler(self) -> EvtHandler"""
8345 return _core_.Menu_GetEventHandler(*args, **kwargs)
8346
8347 def SetInvokingWindow(*args, **kwargs):
8348 """SetInvokingWindow(self, Window win)"""
8349 return _core_.Menu_SetInvokingWindow(*args, **kwargs)
8350
8351 def GetInvokingWindow(*args, **kwargs):
8352 """GetInvokingWindow(self) -> Window"""
8353 return _core_.Menu_GetInvokingWindow(*args, **kwargs)
8354
8355 def GetStyle(*args, **kwargs):
8356 """GetStyle(self) -> long"""
8357 return _core_.Menu_GetStyle(*args, **kwargs)
8358
8359 def UpdateUI(*args, **kwargs):
8360 """UpdateUI(self, EvtHandler source=None)"""
8361 return _core_.Menu_UpdateUI(*args, **kwargs)
8362
8363 def GetMenuBar(*args, **kwargs):
8364 """GetMenuBar(self) -> MenuBar"""
8365 return _core_.Menu_GetMenuBar(*args, **kwargs)
8366
8367 def Attach(*args, **kwargs):
8368 """Attach(self, wxMenuBarBase menubar)"""
8369 return _core_.Menu_Attach(*args, **kwargs)
8370
8371 def Detach(*args, **kwargs):
8372 """Detach(self)"""
8373 return _core_.Menu_Detach(*args, **kwargs)
8374
8375 def IsAttached(*args, **kwargs):
8376 """IsAttached(self) -> bool"""
8377 return _core_.Menu_IsAttached(*args, **kwargs)
8378
8379 def SetParent(*args, **kwargs):
8380 """SetParent(self, Menu parent)"""
8381 return _core_.Menu_SetParent(*args, **kwargs)
8382
8383 def GetParent(*args, **kwargs):
8384 """GetParent(self) -> Menu"""
8385 return _core_.Menu_GetParent(*args, **kwargs)
8386
8387
8388 class MenuPtr(Menu):
8389 def __init__(self, this):
8390 self.this = this
8391 if not hasattr(self,"thisown"): self.thisown = 0
8392 self.__class__ = Menu
8393 _core_.Menu_swigregister(MenuPtr)
8394 DefaultValidator = cvar.DefaultValidator
8395
8396 #---------------------------------------------------------------------------
8397
8398 class MenuBar(Window):
8399 """Proxy of C++ MenuBar class"""
8400 def __repr__(self):
8401 return "<%s.%s; proxy of C++ wxMenuBar instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
8402 def __init__(self, *args, **kwargs):
8403 """__init__(self, long style=0) -> MenuBar"""
8404 newobj = _core_.new_MenuBar(*args, **kwargs)
8405 self.this = newobj.this
8406 self.thisown = 1
8407 del newobj.thisown
8408 self._setOORInfo(self)
8409
8410 def Append(*args, **kwargs):
8411 """Append(self, Menu menu, String title) -> bool"""
8412 return _core_.MenuBar_Append(*args, **kwargs)
8413
8414 def Insert(*args, **kwargs):
8415 """Insert(self, size_t pos, Menu menu, String title) -> bool"""
8416 return _core_.MenuBar_Insert(*args, **kwargs)
8417
8418 def GetMenuCount(*args, **kwargs):
8419 """GetMenuCount(self) -> size_t"""
8420 return _core_.MenuBar_GetMenuCount(*args, **kwargs)
8421
8422 def GetMenu(*args, **kwargs):
8423 """GetMenu(self, size_t pos) -> Menu"""
8424 return _core_.MenuBar_GetMenu(*args, **kwargs)
8425
8426 def Replace(*args, **kwargs):
8427 """Replace(self, size_t pos, Menu menu, String title) -> Menu"""
8428 return _core_.MenuBar_Replace(*args, **kwargs)
8429
8430 def Remove(*args, **kwargs):
8431 """Remove(self, size_t pos) -> Menu"""
8432 return _core_.MenuBar_Remove(*args, **kwargs)
8433
8434 def EnableTop(*args, **kwargs):
8435 """EnableTop(self, size_t pos, bool enable)"""
8436 return _core_.MenuBar_EnableTop(*args, **kwargs)
8437
8438 def IsEnabledTop(*args, **kwargs):
8439 """IsEnabledTop(self, size_t pos) -> bool"""
8440 return _core_.MenuBar_IsEnabledTop(*args, **kwargs)
8441
8442 def SetLabelTop(*args, **kwargs):
8443 """SetLabelTop(self, size_t pos, String label)"""
8444 return _core_.MenuBar_SetLabelTop(*args, **kwargs)
8445
8446 def GetLabelTop(*args, **kwargs):
8447 """GetLabelTop(self, size_t pos) -> String"""
8448 return _core_.MenuBar_GetLabelTop(*args, **kwargs)
8449
8450 def FindMenuItem(*args, **kwargs):
8451 """FindMenuItem(self, String menu, String item) -> int"""
8452 return _core_.MenuBar_FindMenuItem(*args, **kwargs)
8453
8454 def FindItemById(*args, **kwargs):
8455 """FindItemById(self, int id) -> MenuItem"""
8456 return _core_.MenuBar_FindItemById(*args, **kwargs)
8457
8458 def FindMenu(*args, **kwargs):
8459 """FindMenu(self, String title) -> int"""
8460 return _core_.MenuBar_FindMenu(*args, **kwargs)
8461
8462 def Enable(*args, **kwargs):
8463 """Enable(self, int id, bool enable)"""
8464 return _core_.MenuBar_Enable(*args, **kwargs)
8465
8466 def Check(*args, **kwargs):
8467 """Check(self, int id, bool check)"""
8468 return _core_.MenuBar_Check(*args, **kwargs)
8469
8470 def IsChecked(*args, **kwargs):
8471 """IsChecked(self, int id) -> bool"""
8472 return _core_.MenuBar_IsChecked(*args, **kwargs)
8473
8474 def IsEnabled(*args, **kwargs):
8475 """IsEnabled(self, int id) -> bool"""
8476 return _core_.MenuBar_IsEnabled(*args, **kwargs)
8477
8478 def SetLabel(*args, **kwargs):
8479 """SetLabel(self, int id, String label)"""
8480 return _core_.MenuBar_SetLabel(*args, **kwargs)
8481
8482 def GetLabel(*args, **kwargs):
8483 """GetLabel(self, int id) -> String"""
8484 return _core_.MenuBar_GetLabel(*args, **kwargs)
8485
8486 def SetHelpString(*args, **kwargs):
8487 """SetHelpString(self, int id, String helpString)"""
8488 return _core_.MenuBar_SetHelpString(*args, **kwargs)
8489
8490 def GetHelpString(*args, **kwargs):
8491 """GetHelpString(self, int id) -> String"""
8492 return _core_.MenuBar_GetHelpString(*args, **kwargs)
8493
8494 def GetFrame(*args, **kwargs):
8495 """GetFrame(self) -> wxFrame"""
8496 return _core_.MenuBar_GetFrame(*args, **kwargs)
8497
8498 def IsAttached(*args, **kwargs):
8499 """IsAttached(self) -> bool"""
8500 return _core_.MenuBar_IsAttached(*args, **kwargs)
8501
8502 def Attach(*args, **kwargs):
8503 """Attach(self, wxFrame frame)"""
8504 return _core_.MenuBar_Attach(*args, **kwargs)
8505
8506 def Detach(*args, **kwargs):
8507 """Detach(self)"""
8508 return _core_.MenuBar_Detach(*args, **kwargs)
8509
8510
8511 class MenuBarPtr(MenuBar):
8512 def __init__(self, this):
8513 self.this = this
8514 if not hasattr(self,"thisown"): self.thisown = 0
8515 self.__class__ = MenuBar
8516 _core_.MenuBar_swigregister(MenuBarPtr)
8517
8518 #---------------------------------------------------------------------------
8519
8520 class MenuItem(Object):
8521 """Proxy of C++ MenuItem class"""
8522 def __repr__(self):
8523 return "<%s.%s; proxy of C++ wxMenuItem instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
8524 def __init__(self, *args, **kwargs):
8525 """
8526 __init__(self, Menu parentMenu=None, int id=ID_ANY, String text=EmptyString,
8527 String help=EmptyString, int kind=ITEM_NORMAL,
8528 Menu subMenu=None) -> MenuItem
8529 """
8530 newobj = _core_.new_MenuItem(*args, **kwargs)
8531 self.this = newobj.this
8532 self.thisown = 1
8533 del newobj.thisown
8534 def GetMenu(*args, **kwargs):
8535 """GetMenu(self) -> Menu"""
8536 return _core_.MenuItem_GetMenu(*args, **kwargs)
8537
8538 def SetMenu(*args, **kwargs):
8539 """SetMenu(self, Menu menu)"""
8540 return _core_.MenuItem_SetMenu(*args, **kwargs)
8541
8542 def SetId(*args, **kwargs):
8543 """SetId(self, int id)"""
8544 return _core_.MenuItem_SetId(*args, **kwargs)
8545
8546 def GetId(*args, **kwargs):
8547 """GetId(self) -> int"""
8548 return _core_.MenuItem_GetId(*args, **kwargs)
8549
8550 def IsSeparator(*args, **kwargs):
8551 """IsSeparator(self) -> bool"""
8552 return _core_.MenuItem_IsSeparator(*args, **kwargs)
8553
8554 def SetText(*args, **kwargs):
8555 """SetText(self, String str)"""
8556 return _core_.MenuItem_SetText(*args, **kwargs)
8557
8558 def GetLabel(*args, **kwargs):
8559 """GetLabel(self) -> String"""
8560 return _core_.MenuItem_GetLabel(*args, **kwargs)
8561
8562 def GetText(*args, **kwargs):
8563 """GetText(self) -> String"""
8564 return _core_.MenuItem_GetText(*args, **kwargs)
8565
8566 def GetLabelFromText(*args, **kwargs):
8567 """GetLabelFromText(String text) -> String"""
8568 return _core_.MenuItem_GetLabelFromText(*args, **kwargs)
8569
8570 GetLabelFromText = staticmethod(GetLabelFromText)
8571 def GetKind(*args, **kwargs):
8572 """GetKind(self) -> int"""
8573 return _core_.MenuItem_GetKind(*args, **kwargs)
8574
8575 def SetKind(*args, **kwargs):
8576 """SetKind(self, int kind)"""
8577 return _core_.MenuItem_SetKind(*args, **kwargs)
8578
8579 def SetCheckable(*args, **kwargs):
8580 """SetCheckable(self, bool checkable)"""
8581 return _core_.MenuItem_SetCheckable(*args, **kwargs)
8582
8583 def IsCheckable(*args, **kwargs):
8584 """IsCheckable(self) -> bool"""
8585 return _core_.MenuItem_IsCheckable(*args, **kwargs)
8586
8587 def IsSubMenu(*args, **kwargs):
8588 """IsSubMenu(self) -> bool"""
8589 return _core_.MenuItem_IsSubMenu(*args, **kwargs)
8590
8591 def SetSubMenu(*args, **kwargs):
8592 """SetSubMenu(self, Menu menu)"""
8593 return _core_.MenuItem_SetSubMenu(*args, **kwargs)
8594
8595 def GetSubMenu(*args, **kwargs):
8596 """GetSubMenu(self) -> Menu"""
8597 return _core_.MenuItem_GetSubMenu(*args, **kwargs)
8598
8599 def Enable(*args, **kwargs):
8600 """Enable(self, bool enable=True)"""
8601 return _core_.MenuItem_Enable(*args, **kwargs)
8602
8603 def IsEnabled(*args, **kwargs):
8604 """IsEnabled(self) -> bool"""
8605 return _core_.MenuItem_IsEnabled(*args, **kwargs)
8606
8607 def Check(*args, **kwargs):
8608 """Check(self, bool check=True)"""
8609 return _core_.MenuItem_Check(*args, **kwargs)
8610
8611 def IsChecked(*args, **kwargs):
8612 """IsChecked(self) -> bool"""
8613 return _core_.MenuItem_IsChecked(*args, **kwargs)
8614
8615 def Toggle(*args, **kwargs):
8616 """Toggle(self)"""
8617 return _core_.MenuItem_Toggle(*args, **kwargs)
8618
8619 def SetHelp(*args, **kwargs):
8620 """SetHelp(self, String str)"""
8621 return _core_.MenuItem_SetHelp(*args, **kwargs)
8622
8623 def GetHelp(*args, **kwargs):
8624 """GetHelp(self) -> String"""
8625 return _core_.MenuItem_GetHelp(*args, **kwargs)
8626
8627 def GetAccel(*args, **kwargs):
8628 """GetAccel(self) -> AcceleratorEntry"""
8629 return _core_.MenuItem_GetAccel(*args, **kwargs)
8630
8631 def SetAccel(*args, **kwargs):
8632 """SetAccel(self, AcceleratorEntry accel)"""
8633 return _core_.MenuItem_SetAccel(*args, **kwargs)
8634
8635 def SetFont(*args, **kwargs):
8636 """SetFont(self, Font font)"""
8637 return _core_.MenuItem_SetFont(*args, **kwargs)
8638
8639 def GetFont(*args, **kwargs):
8640 """GetFont(self) -> Font"""
8641 return _core_.MenuItem_GetFont(*args, **kwargs)
8642
8643 def SetTextColour(*args, **kwargs):
8644 """SetTextColour(self, Colour colText)"""
8645 return _core_.MenuItem_SetTextColour(*args, **kwargs)
8646
8647 def GetTextColour(*args, **kwargs):
8648 """GetTextColour(self) -> Colour"""
8649 return _core_.MenuItem_GetTextColour(*args, **kwargs)
8650
8651 def SetBackgroundColour(*args, **kwargs):
8652 """SetBackgroundColour(self, Colour colBack)"""
8653 return _core_.MenuItem_SetBackgroundColour(*args, **kwargs)
8654
8655 def GetBackgroundColour(*args, **kwargs):
8656 """GetBackgroundColour(self) -> Colour"""
8657 return _core_.MenuItem_GetBackgroundColour(*args, **kwargs)
8658
8659 def SetBitmaps(*args, **kwargs):
8660 """SetBitmaps(self, Bitmap bmpChecked, Bitmap bmpUnchecked=wxNullBitmap)"""
8661 return _core_.MenuItem_SetBitmaps(*args, **kwargs)
8662
8663 def SetDisabledBitmap(*args, **kwargs):
8664 """SetDisabledBitmap(self, Bitmap bmpDisabled)"""
8665 return _core_.MenuItem_SetDisabledBitmap(*args, **kwargs)
8666
8667 def GetDisabledBitmap(*args, **kwargs):
8668 """GetDisabledBitmap(self) -> Bitmap"""
8669 return _core_.MenuItem_GetDisabledBitmap(*args, **kwargs)
8670
8671 def SetMarginWidth(*args, **kwargs):
8672 """SetMarginWidth(self, int nWidth)"""
8673 return _core_.MenuItem_SetMarginWidth(*args, **kwargs)
8674
8675 def GetMarginWidth(*args, **kwargs):
8676 """GetMarginWidth(self) -> int"""
8677 return _core_.MenuItem_GetMarginWidth(*args, **kwargs)
8678
8679 def GetDefaultMarginWidth(*args, **kwargs):
8680 """GetDefaultMarginWidth() -> int"""
8681 return _core_.MenuItem_GetDefaultMarginWidth(*args, **kwargs)
8682
8683 GetDefaultMarginWidth = staticmethod(GetDefaultMarginWidth)
8684 def IsOwnerDrawn(*args, **kwargs):
8685 """IsOwnerDrawn(self) -> bool"""
8686 return _core_.MenuItem_IsOwnerDrawn(*args, **kwargs)
8687
8688 def SetOwnerDrawn(*args, **kwargs):
8689 """SetOwnerDrawn(self, bool ownerDrawn=True)"""
8690 return _core_.MenuItem_SetOwnerDrawn(*args, **kwargs)
8691
8692 def ResetOwnerDrawn(*args, **kwargs):
8693 """ResetOwnerDrawn(self)"""
8694 return _core_.MenuItem_ResetOwnerDrawn(*args, **kwargs)
8695
8696 def SetBitmap(*args, **kwargs):
8697 """SetBitmap(self, Bitmap bitmap)"""
8698 return _core_.MenuItem_SetBitmap(*args, **kwargs)
8699
8700 def GetBitmap(*args, **kwargs):
8701 """GetBitmap(self) -> Bitmap"""
8702 return _core_.MenuItem_GetBitmap(*args, **kwargs)
8703
8704
8705 class MenuItemPtr(MenuItem):
8706 def __init__(self, this):
8707 self.this = this
8708 if not hasattr(self,"thisown"): self.thisown = 0
8709 self.__class__ = MenuItem
8710 _core_.MenuItem_swigregister(MenuItemPtr)
8711
8712 def MenuItem_GetLabelFromText(*args, **kwargs):
8713 """MenuItem_GetLabelFromText(String text) -> String"""
8714 return _core_.MenuItem_GetLabelFromText(*args, **kwargs)
8715
8716 def MenuItem_GetDefaultMarginWidth(*args, **kwargs):
8717 """MenuItem_GetDefaultMarginWidth() -> int"""
8718 return _core_.MenuItem_GetDefaultMarginWidth(*args, **kwargs)
8719
8720 #---------------------------------------------------------------------------
8721
8722 class Control(Window):
8723 """
8724 This is the base class for a control or 'widget'.
8725
8726 A control is generally a small window which processes user input
8727 and/or displays one or more item of data.
8728 """
8729 def __repr__(self):
8730 return "<%s.%s; proxy of C++ wxControl instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
8731 def __init__(self, *args, **kwargs):
8732 """
8733 __init__(self, Window parent, int id=-1, Point pos=DefaultPosition,
8734 Size size=DefaultSize, long style=0, Validator validator=DefaultValidator,
8735 String name=ControlNameStr) -> Control
8736
8737 Create a Control. Normally you should only call this from a subclass'
8738 __init__ as a plain old wx.Control is not very useful.
8739 """
8740 newobj = _core_.new_Control(*args, **kwargs)
8741 self.this = newobj.this
8742 self.thisown = 1
8743 del newobj.thisown
8744 self._setOORInfo(self)
8745
8746 def Create(*args, **kwargs):
8747 """
8748 Create(self, Window parent, int id=-1, Point pos=DefaultPosition,
8749 Size size=DefaultSize, long style=0, Validator validator=DefaultValidator,
8750 String name=ControlNameStr) -> bool
8751
8752 Do the 2nd phase and create the GUI control.
8753 """
8754 return _core_.Control_Create(*args, **kwargs)
8755
8756 def Command(*args, **kwargs):
8757 """
8758 Command(self, CommandEvent event)
8759
8760 Simulates the effect of the user issuing a command to the item.
8761
8762 :see: `wx.CommandEvent`
8763
8764 """
8765 return _core_.Control_Command(*args, **kwargs)
8766
8767 def GetLabel(*args, **kwargs):
8768 """
8769 GetLabel(self) -> String
8770
8771 Return a control's text.
8772 """
8773 return _core_.Control_GetLabel(*args, **kwargs)
8774
8775 def SetLabel(*args, **kwargs):
8776 """
8777 SetLabel(self, String label)
8778
8779 Sets the item's text.
8780 """
8781 return _core_.Control_SetLabel(*args, **kwargs)
8782
8783 def GetClassDefaultAttributes(*args, **kwargs):
8784 """
8785 GetClassDefaultAttributes(int variant=WINDOW_VARIANT_NORMAL) -> VisualAttributes
8786
8787 Get the default attributes for this class. This is useful if you want
8788 to use the same font or colour in your own control as in a standard
8789 control -- which is a much better idea than hard coding specific
8790 colours or fonts which might look completely out of place on the
8791 user's system, especially if it uses themes.
8792
8793 The variant parameter is only relevant under Mac currently and is
8794 ignore under other platforms. Under Mac, it will change the size of
8795 the returned font. See `wx.Window.SetWindowVariant` for more about
8796 this.
8797 """
8798 return _core_.Control_GetClassDefaultAttributes(*args, **kwargs)
8799
8800 GetClassDefaultAttributes = staticmethod(GetClassDefaultAttributes)
8801
8802 class ControlPtr(Control):
8803 def __init__(self, this):
8804 self.this = this
8805 if not hasattr(self,"thisown"): self.thisown = 0
8806 self.__class__ = Control
8807 _core_.Control_swigregister(ControlPtr)
8808 ControlNameStr = cvar.ControlNameStr
8809
8810 def PreControl(*args, **kwargs):
8811 """
8812 PreControl() -> Control
8813
8814 Precreate a Control control for 2-phase creation
8815 """
8816 val = _core_.new_PreControl(*args, **kwargs)
8817 val.thisown = 1
8818 return val
8819
8820 def Control_GetClassDefaultAttributes(*args, **kwargs):
8821 """
8822 Control_GetClassDefaultAttributes(int variant=WINDOW_VARIANT_NORMAL) -> VisualAttributes
8823
8824 Get the default attributes for this class. This is useful if you want
8825 to use the same font or colour in your own control as in a standard
8826 control -- which is a much better idea than hard coding specific
8827 colours or fonts which might look completely out of place on the
8828 user's system, especially if it uses themes.
8829
8830 The variant parameter is only relevant under Mac currently and is
8831 ignore under other platforms. Under Mac, it will change the size of
8832 the returned font. See `wx.Window.SetWindowVariant` for more about
8833 this.
8834 """
8835 return _core_.Control_GetClassDefaultAttributes(*args, **kwargs)
8836
8837 #---------------------------------------------------------------------------
8838
8839 class ItemContainer(object):
8840 """
8841 wx.ItemContainer defines an interface which is implemented by all
8842 controls which have string subitems, each of which may be selected,
8843 such as `wx.ListBox`, `wx.CheckListBox`, `wx.Choice` as well as
8844 `wx.ComboBox` which implements an extended interface deriving from
8845 this one.
8846
8847 It defines the methods for accessing the control's items and although
8848 each of the derived classes implements them differently, they still
8849 all conform to the same interface.
8850
8851 The items in a wx.ItemContainer have (non empty) string labels and,
8852 optionally, client data associated with them.
8853
8854 """
8855 def __init__(self): raise RuntimeError, "No constructor defined"
8856 def __repr__(self):
8857 return "<%s.%s; proxy of C++ wxItemContainer instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
8858 def Append(*args, **kwargs):
8859 """
8860 Append(self, String item, PyObject clientData=None) -> int
8861
8862 Adds the item to the control, associating the given data with the item
8863 if not None. The return value is the index of the newly added item
8864 which may be different from the last one if the control is sorted (e.g.
8865 has wx.LB_SORT or wx.CB_SORT style).
8866 """
8867 return _core_.ItemContainer_Append(*args, **kwargs)
8868
8869 def AppendItems(*args, **kwargs):
8870 """
8871 AppendItems(self, List strings)
8872
8873 Apend several items at once to the control. Notice that calling this
8874 method may be much faster than appending the items one by one if you
8875 need to add a lot of items.
8876 """
8877 return _core_.ItemContainer_AppendItems(*args, **kwargs)
8878
8879 def Insert(*args, **kwargs):
8880 """
8881 Insert(self, String item, int pos, PyObject clientData=None) -> int
8882
8883 Insert an item into the control before the item at the ``pos`` index,
8884 optionally associating some data object with the item.
8885 """
8886 return _core_.ItemContainer_Insert(*args, **kwargs)
8887
8888 def Clear(*args, **kwargs):
8889 """
8890 Clear(self)
8891
8892 Removes all items from the control.
8893 """
8894 return _core_.ItemContainer_Clear(*args, **kwargs)
8895
8896 def Delete(*args, **kwargs):
8897 """
8898 Delete(self, int n)
8899
8900 Deletes the item at the zero-based index 'n' from the control. Note
8901 that it is an error (signalled by a `wx.PyAssertionError` exception if
8902 enabled) to remove an item with the index negative or greater or equal
8903 than the number of items in the control.
8904 """
8905 return _core_.ItemContainer_Delete(*args, **kwargs)
8906
8907 def GetCount(*args, **kwargs):
8908 """
8909 GetCount(self) -> int
8910
8911 Returns the number of items in the control.
8912 """
8913 return _core_.ItemContainer_GetCount(*args, **kwargs)
8914
8915 def IsEmpty(*args, **kwargs):
8916 """
8917 IsEmpty(self) -> bool
8918
8919 Returns True if the control is empty or False if it has some items.
8920 """
8921 return _core_.ItemContainer_IsEmpty(*args, **kwargs)
8922
8923 def GetString(*args, **kwargs):
8924 """
8925 GetString(self, int n) -> String
8926
8927 Returns the label of the item with the given index.
8928 """
8929 return _core_.ItemContainer_GetString(*args, **kwargs)
8930
8931 def GetStrings(*args, **kwargs):
8932 """GetStrings(self) -> wxArrayString"""
8933 return _core_.ItemContainer_GetStrings(*args, **kwargs)
8934
8935 def SetString(*args, **kwargs):
8936 """
8937 SetString(self, int n, String s)
8938
8939 Sets the label for the given item.
8940 """
8941 return _core_.ItemContainer_SetString(*args, **kwargs)
8942
8943 def FindString(*args, **kwargs):
8944 """
8945 FindString(self, String s) -> int
8946
8947 Finds an item whose label matches the given string. Returns the
8948 zero-based position of the item, or ``wx.NOT_FOUND`` if the string was not
8949 found.
8950 """
8951 return _core_.ItemContainer_FindString(*args, **kwargs)
8952
8953 def Select(*args, **kwargs):
8954 """
8955 Select(self, int n)
8956
8957 Sets the item at index 'n' to be the selected item.
8958 """
8959 return _core_.ItemContainer_Select(*args, **kwargs)
8960
8961 SetSelection = Select
8962 def GetSelection(*args, **kwargs):
8963 """
8964 GetSelection(self) -> int
8965
8966 Returns the index of the selected item or ``wx.NOT_FOUND`` if no item
8967 is selected.
8968 """
8969 return _core_.ItemContainer_GetSelection(*args, **kwargs)
8970
8971 def GetStringSelection(*args, **kwargs):
8972 """
8973 GetStringSelection(self) -> String
8974
8975 Returns the label of the selected item or an empty string if no item
8976 is selected.
8977 """
8978 return _core_.ItemContainer_GetStringSelection(*args, **kwargs)
8979
8980 def GetClientData(*args, **kwargs):
8981 """
8982 GetClientData(self, int n) -> PyObject
8983
8984 Returns the client data associated with the given item, (if any.)
8985 """
8986 return _core_.ItemContainer_GetClientData(*args, **kwargs)
8987
8988 def SetClientData(*args, **kwargs):
8989 """
8990 SetClientData(self, int n, PyObject clientData)
8991
8992 Associate the given client data with the item at position n.
8993 """
8994 return _core_.ItemContainer_SetClientData(*args, **kwargs)
8995
8996
8997 class ItemContainerPtr(ItemContainer):
8998 def __init__(self, this):
8999 self.this = this
9000 if not hasattr(self,"thisown"): self.thisown = 0
9001 self.__class__ = ItemContainer
9002 _core_.ItemContainer_swigregister(ItemContainerPtr)
9003
9004 #---------------------------------------------------------------------------
9005
9006 class ControlWithItems(Control,ItemContainer):
9007 """
9008 wx.ControlWithItems combines the ``wx.ItemContainer`` class with the
9009 wx.Control class, and is used for the base class of various controls
9010 that have items.
9011 """
9012 def __init__(self): raise RuntimeError, "No constructor defined"
9013 def __repr__(self):
9014 return "<%s.%s; proxy of C++ wxControlWithItems instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
9015
9016 class ControlWithItemsPtr(ControlWithItems):
9017 def __init__(self, this):
9018 self.this = this
9019 if not hasattr(self,"thisown"): self.thisown = 0
9020 self.__class__ = ControlWithItems
9021 _core_.ControlWithItems_swigregister(ControlWithItemsPtr)
9022
9023 #---------------------------------------------------------------------------
9024
9025 class SizerItem(Object):
9026 """
9027 The wx.SizerItem class is used to track the position, size and other
9028 attributes of each item managed by a `wx.Sizer`. In normal usage user
9029 code should never need to deal directly with a wx.SizerItem, but
9030 custom classes derived from `wx.PySizer` will probably need to use the
9031 collection of wx.SizerItems held by wx.Sizer when calculating layout.
9032
9033 :see: `wx.Sizer`, `wx.GBSizerItem`
9034 """
9035 def __repr__(self):
9036 return "<%s.%s; proxy of C++ wxSizerItem instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
9037 def __init__(self, *args, **kwargs):
9038 """
9039 __init__(self) -> SizerItem
9040
9041 Constructs an empty wx.SizerItem. Either a window, sizer or spacer
9042 size will need to be set before this item can be used in a Sizer.
9043
9044 You will probably never need to create a wx.SizerItem directly as they
9045 are created automatically when the sizer's Add, Insert or Prepend
9046 methods are called.
9047
9048 :see: `wx.SizerItemSpacer`, `wx.SizerItemWindow`, `wx.SizerItemSizer`
9049 """
9050 newobj = _core_.new_SizerItem(*args, **kwargs)
9051 self.this = newobj.this
9052 self.thisown = 1
9053 del newobj.thisown
9054 def DeleteWindows(*args, **kwargs):
9055 """
9056 DeleteWindows(self)
9057
9058 Destroy the window or the windows in a subsizer, depending on the type
9059 of item.
9060 """
9061 return _core_.SizerItem_DeleteWindows(*args, **kwargs)
9062
9063 def DetachSizer(*args, **kwargs):
9064 """
9065 DetachSizer(self)
9066
9067 Enable deleting the SizerItem without destroying the contained sizer.
9068 """
9069 return _core_.SizerItem_DetachSizer(*args, **kwargs)
9070
9071 def GetSize(*args, **kwargs):
9072 """
9073 GetSize(self) -> Size
9074
9075 Get the current size of the item, as set in the last Layout.
9076 """
9077 return _core_.SizerItem_GetSize(*args, **kwargs)
9078
9079 def CalcMin(*args, **kwargs):
9080 """
9081 CalcMin(self) -> Size
9082
9083 Calculates the minimum desired size for the item, including any space
9084 needed by borders.
9085 """
9086 return _core_.SizerItem_CalcMin(*args, **kwargs)
9087
9088 def SetDimension(*args, **kwargs):
9089 """
9090 SetDimension(self, Point pos, Size size)
9091
9092 Set the position and size of the space allocated for this item by the
9093 sizer, and adjust the position and size of the item (window or
9094 subsizer) to be within that space taking alignment and borders into
9095 account.
9096 """
9097 return _core_.SizerItem_SetDimension(*args, **kwargs)
9098
9099 def GetMinSize(*args, **kwargs):
9100 """
9101 GetMinSize(self) -> Size
9102
9103 Get the minimum size needed for the item.
9104 """
9105 return _core_.SizerItem_GetMinSize(*args, **kwargs)
9106
9107 def GetMinSizeWithBorder(*args, **kwargs):
9108 """
9109 GetMinSizeWithBorder(self) -> Size
9110
9111 Get the minimum size needed for the item with space for the borders
9112 added, if needed.
9113 """
9114 return _core_.SizerItem_GetMinSizeWithBorder(*args, **kwargs)
9115
9116 def SetInitSize(*args, **kwargs):
9117 """SetInitSize(self, int x, int y)"""
9118 return _core_.SizerItem_SetInitSize(*args, **kwargs)
9119
9120 def SetRatioWH(*args, **kwargs):
9121 """
9122 SetRatioWH(self, int width, int height)
9123
9124 Set the ratio item attribute.
9125 """
9126 return _core_.SizerItem_SetRatioWH(*args, **kwargs)
9127
9128 def SetRatioSize(*args, **kwargs):
9129 """
9130 SetRatioSize(self, Size size)
9131
9132 Set the ratio item attribute.
9133 """
9134 return _core_.SizerItem_SetRatioSize(*args, **kwargs)
9135
9136 def SetRatio(*args, **kwargs):
9137 """
9138 SetRatio(self, float ratio)
9139
9140 Set the ratio item attribute.
9141 """
9142 return _core_.SizerItem_SetRatio(*args, **kwargs)
9143
9144 def GetRatio(*args, **kwargs):
9145 """
9146 GetRatio(self) -> float
9147
9148 Set the ratio item attribute.
9149 """
9150 return _core_.SizerItem_GetRatio(*args, **kwargs)
9151
9152 def GetRect(*args, **kwargs):
9153 """
9154 GetRect(self) -> Rect
9155
9156 Returns the rectangle that the sizer item should occupy
9157 """
9158 return _core_.SizerItem_GetRect(*args, **kwargs)
9159
9160 def IsWindow(*args, **kwargs):
9161 """
9162 IsWindow(self) -> bool
9163
9164 Is this sizer item a window?
9165 """
9166 return _core_.SizerItem_IsWindow(*args, **kwargs)
9167
9168 def IsSizer(*args, **kwargs):
9169 """
9170 IsSizer(self) -> bool
9171
9172 Is this sizer item a subsizer?
9173 """
9174 return _core_.SizerItem_IsSizer(*args, **kwargs)
9175
9176 def IsSpacer(*args, **kwargs):
9177 """
9178 IsSpacer(self) -> bool
9179
9180 Is this sizer item a spacer?
9181 """
9182 return _core_.SizerItem_IsSpacer(*args, **kwargs)
9183
9184 def SetProportion(*args, **kwargs):
9185 """
9186 SetProportion(self, int proportion)
9187
9188 Set the proportion value for this item.
9189 """
9190 return _core_.SizerItem_SetProportion(*args, **kwargs)
9191
9192 def GetProportion(*args, **kwargs):
9193 """
9194 GetProportion(self) -> int
9195
9196 Get the proportion value for this item.
9197 """
9198 return _core_.SizerItem_GetProportion(*args, **kwargs)
9199
9200 SetOption = wx._deprecated(SetProportion, "Please use `SetProportion` instead.")
9201 GetOption = wx._deprecated(GetProportion, "Please use `GetProportion` instead.")
9202 def SetFlag(*args, **kwargs):
9203 """
9204 SetFlag(self, int flag)
9205
9206 Set the flag value for this item.
9207 """
9208 return _core_.SizerItem_SetFlag(*args, **kwargs)
9209
9210 def GetFlag(*args, **kwargs):
9211 """
9212 GetFlag(self) -> int
9213
9214 Get the flag value for this item.
9215 """
9216 return _core_.SizerItem_GetFlag(*args, **kwargs)
9217
9218 def SetBorder(*args, **kwargs):
9219 """
9220 SetBorder(self, int border)
9221
9222 Set the border value for this item.
9223 """
9224 return _core_.SizerItem_SetBorder(*args, **kwargs)
9225
9226 def GetBorder(*args, **kwargs):
9227 """
9228 GetBorder(self) -> int
9229
9230 Get the border value for this item.
9231 """
9232 return _core_.SizerItem_GetBorder(*args, **kwargs)
9233
9234 def GetWindow(*args, **kwargs):
9235 """
9236 GetWindow(self) -> Window
9237
9238 Get the window (if any) that is managed by this sizer item.
9239 """
9240 return _core_.SizerItem_GetWindow(*args, **kwargs)
9241
9242 def SetWindow(*args, **kwargs):
9243 """
9244 SetWindow(self, Window window)
9245
9246 Set the window to be managed by this sizer item.
9247 """
9248 return _core_.SizerItem_SetWindow(*args, **kwargs)
9249
9250 def GetSizer(*args, **kwargs):
9251 """
9252 GetSizer(self) -> Sizer
9253
9254 Get the subsizer (if any) that is managed by this sizer item.
9255 """
9256 return _core_.SizerItem_GetSizer(*args, **kwargs)
9257
9258 def SetSizer(*args, **kwargs):
9259 """
9260 SetSizer(self, Sizer sizer)
9261
9262 Set the subsizer to be managed by this sizer item.
9263 """
9264 return _core_.SizerItem_SetSizer(*args, **kwargs)
9265
9266 def GetSpacer(*args, **kwargs):
9267 """
9268 GetSpacer(self) -> Size
9269
9270 Get the size of the spacer managed by this sizer item.
9271 """
9272 return _core_.SizerItem_GetSpacer(*args, **kwargs)
9273
9274 def SetSpacer(*args, **kwargs):
9275 """
9276 SetSpacer(self, Size size)
9277
9278 Set the size of the spacer to be managed by this sizer item.
9279 """
9280 return _core_.SizerItem_SetSpacer(*args, **kwargs)
9281
9282 def Show(*args, **kwargs):
9283 """
9284 Show(self, bool show)
9285
9286 Set the show item attribute, which sizers use to determine if the item
9287 is to be made part of the layout or not. If the item is tracking a
9288 window then it is shown or hidden as needed.
9289 """
9290 return _core_.SizerItem_Show(*args, **kwargs)
9291
9292 def IsShown(*args, **kwargs):
9293 """
9294 IsShown(self) -> bool
9295
9296 Is the item to be shown in the layout?
9297 """
9298 return _core_.SizerItem_IsShown(*args, **kwargs)
9299
9300 def GetPosition(*args, **kwargs):
9301 """
9302 GetPosition(self) -> Point
9303
9304 Returns the current position of the item, as set in the last Layout.
9305 """
9306 return _core_.SizerItem_GetPosition(*args, **kwargs)
9307
9308 def GetUserData(*args, **kwargs):
9309 """
9310 GetUserData(self) -> PyObject
9311
9312 Returns the userData associated with this sizer item, or None if there
9313 isn't any.
9314 """
9315 return _core_.SizerItem_GetUserData(*args, **kwargs)
9316
9317
9318 class SizerItemPtr(SizerItem):
9319 def __init__(self, this):
9320 self.this = this
9321 if not hasattr(self,"thisown"): self.thisown = 0
9322 self.__class__ = SizerItem
9323 _core_.SizerItem_swigregister(SizerItemPtr)
9324
9325 def SizerItemWindow(*args, **kwargs):
9326 """
9327 SizerItemWindow(Window window, int proportion, int flag, int border,
9328 PyObject userData=None) -> SizerItem
9329
9330 Constructs a `wx.SizerItem` for tracking a window.
9331 """
9332 val = _core_.new_SizerItemWindow(*args, **kwargs)
9333 val.thisown = 1
9334 return val
9335
9336 def SizerItemSpacer(*args, **kwargs):
9337 """
9338 SizerItemSpacer(int width, int height, int proportion, int flag, int border,
9339 PyObject userData=None) -> SizerItem
9340
9341 Constructs a `wx.SizerItem` for tracking a spacer.
9342 """
9343 val = _core_.new_SizerItemSpacer(*args, **kwargs)
9344 val.thisown = 1
9345 return val
9346
9347 def SizerItemSizer(*args, **kwargs):
9348 """
9349 SizerItemSizer(Sizer sizer, int proportion, int flag, int border,
9350 PyObject userData=None) -> SizerItem
9351
9352 Constructs a `wx.SizerItem` for tracking a subsizer
9353 """
9354 val = _core_.new_SizerItemSizer(*args, **kwargs)
9355 val.thisown = 1
9356 return val
9357
9358 class Sizer(Object):
9359 """
9360 wx.Sizer is the abstract base class used for laying out subwindows in
9361 a window. You cannot use wx.Sizer directly; instead, you will have to
9362 use one of the sizer classes derived from it such as `wx.BoxSizer`,
9363 `wx.StaticBoxSizer`, `wx.NotebookSizer`, `wx.GridSizer`, `wx.FlexGridSizer`
9364 and `wx.GridBagSizer`.
9365
9366 The concept implemented by sizers in wxWidgets is closely related to
9367 layout tools in other GUI toolkits, such as Java's AWT, the GTK
9368 toolkit or the Qt toolkit. It is based upon the idea of the individual
9369 subwindows reporting their minimal required size and their ability to
9370 get stretched if the size of the parent window has changed. This will
9371 most often mean that the programmer does not set the original size of
9372 a dialog in the beginning, rather the dialog will assigned a sizer and
9373 this sizer will be queried about the recommended size. The sizer in
9374 turn will query its children, which can be normal windows or contorls,
9375 empty space or other sizers, so that a hierarchy of sizers can be
9376 constructed. Note that wxSizer does not derive from wxWindow and thus
9377 do not interfere with tab ordering and requires very little resources
9378 compared to a real window on screen.
9379
9380 What makes sizers so well fitted for use in wxWidgets is the fact that
9381 every control reports its own minimal size and the algorithm can
9382 handle differences in font sizes or different window (dialog item)
9383 sizes on different platforms without problems. If for example the
9384 standard font as well as the overall design of Mac widgets requires
9385 more space than on Windows, then the initial size of a dialog using a
9386 sizer will automatically be bigger on Mac than on Windows.
9387 """
9388 def __init__(self): raise RuntimeError, "No constructor defined"
9389 def __repr__(self):
9390 return "<%s.%s; proxy of C++ wxSizer instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
9391 def _setOORInfo(*args, **kwargs):
9392 """_setOORInfo(self, PyObject _self)"""
9393 return _core_.Sizer__setOORInfo(*args, **kwargs)
9394
9395 def Add(*args, **kwargs):
9396 """
9397 Add(self, item, int proportion=0, int flag=0, int border=0,
9398 PyObject userData=None) -> wx.SizerItem
9399
9400 Appends a child item to the sizer.
9401 """
9402 return _core_.Sizer_Add(*args, **kwargs)
9403
9404 def Insert(*args, **kwargs):
9405 """
9406 Insert(self, int before, item, int proportion=0, int flag=0, int border=0,
9407 PyObject userData=None) -> wx.SizerItem
9408
9409 Inserts a new item into the list of items managed by this sizer before
9410 the item at index *before*. See `Add` for a description of the parameters.
9411 """
9412 return _core_.Sizer_Insert(*args, **kwargs)
9413
9414 def Prepend(*args, **kwargs):
9415 """
9416 Prepend(self, item, int proportion=0, int flag=0, int border=0,
9417 PyObject userData=None) -> wx.SizerItem
9418
9419 Adds a new item to the begining of the list of sizer items managed by
9420 this sizer. See `Add` for a description of the parameters.
9421 """
9422 return _core_.Sizer_Prepend(*args, **kwargs)
9423
9424 def Remove(*args, **kwargs):
9425 """
9426 Remove(self, item) -> bool
9427
9428 Removes an item from the sizer and destroys it. This method does not
9429 cause any layout or resizing to take place, call `Layout` to update
9430 the layout on screen after removing a child from the sizer. The
9431 *item* parameter can be either a window, a sizer, or the zero-based
9432 index of an item to remove. Returns True if the child item was found
9433 and removed.
9434 """
9435 return _core_.Sizer_Remove(*args, **kwargs)
9436
9437 def Detach(*args, **kwargs):
9438 """
9439 Detach(self, item) -> bool
9440
9441 Detaches an item from the sizer without destroying it. This method
9442 does not cause any layout or resizing to take place, call `Layout` to
9443 do so. The *item* parameter can be either a window, a sizer, or the
9444 zero-based index of the item to be detached. Returns True if the child item
9445 was found and detached.
9446 """
9447 return _core_.Sizer_Detach(*args, **kwargs)
9448
9449 def GetItem(*args, **kwargs):
9450 """
9451 GetItem(self, item) -> wx.SizerItem
9452
9453 Returns the `wx.SizerItem` which holds the *item* given. The *item*
9454 parameter can be either a window, a sizer, or the zero-based index of
9455 the item to be detached.
9456 """
9457 return _core_.Sizer_GetItem(*args, **kwargs)
9458
9459 def _SetItemMinSize(*args, **kwargs):
9460 """_SetItemMinSize(self, PyObject item, Size size)"""
9461 return _core_.Sizer__SetItemMinSize(*args, **kwargs)
9462
9463 def SetItemMinSize(self, item, *args):
9464 """
9465 SetItemMinSize(self, item, Size size)
9466
9467 Sets the minimum size that will be allocated for an item in the sizer.
9468 The *item* parameter can be either a window, a sizer, or the
9469 zero-based index of the item. If a window or sizer is given then it
9470 will be searched for recursivly in subsizers if neccessary.
9471 """
9472 if len(args) == 2:
9473 # for backward compatibility accept separate width,height args too
9474 return self._SetItemMinSize(item, args)
9475 else:
9476 return self._SetItemMinSize(item, args[0])
9477
9478 def AddItem(*args, **kwargs):
9479 """
9480 AddItem(self, SizerItem item)
9481
9482 Adds a `wx.SizerItem` to the sizer.
9483 """
9484 return _core_.Sizer_AddItem(*args, **kwargs)
9485
9486 def InsertItem(*args, **kwargs):
9487 """
9488 InsertItem(self, int index, SizerItem item)
9489
9490 Inserts a `wx.SizerItem` to the sizer at the position given by *index*.
9491 """
9492 return _core_.Sizer_InsertItem(*args, **kwargs)
9493
9494 def PrependItem(*args, **kwargs):
9495 """
9496 PrependItem(self, SizerItem item)
9497
9498 Prepends a `wx.SizerItem` to the sizer.
9499 """
9500 return _core_.Sizer_PrependItem(*args, **kwargs)
9501
9502 def AddMany(self, items):
9503 """
9504 AddMany is a convenience method for adding several items
9505 to a sizer at one time. Simply pass it a list of tuples,
9506 where each tuple consists of the parameters that you
9507 would normally pass to the `Add` method.
9508 """
9509 for item in items:
9510 if type(item) != type(()) or (len(item) == 2 and type(item[0]) == type(1)):
9511 item = (item, )
9512 self.Add(*item)
9513
9514 # for backwards compatibility only, please do not use in new code
9515 AddWindow = wx._deprecated(Add, "AddWindow is deprecated, use `Add` instead.")
9516 AddSizer = wx._deprecated(Add, "AddSizer is deprecated, use `Add` instead.")
9517 AddSpacer = wx._deprecated(Add, "AddSpacer is deprecated, use `Add` instead.")
9518 PrependWindow = wx._deprecated(Prepend, "PrependWindow is deprecated, use `Prepend` instead.")
9519 PrependSizer = wx._deprecated(Prepend, "PrependSizer is deprecated, use `Prepend` instead.")
9520 PrependSpacer = wx._deprecated(Prepend, "PrependSpacer is deprecated, use `Prepend` instead.")
9521 InsertWindow = wx._deprecated(Insert, "InsertWindow is deprecated, use `Insert` instead.")
9522 InsertSizer = wx._deprecated(Insert, "InsertSizer is deprecated, use `Insert` instead.")
9523 InsertSpacer = wx._deprecated(Insert, "InsertSpacer is deprecated, use `Insert` instead.")
9524 RemoveWindow = wx._deprecated(Remove, "RemoveWindow is deprecated, use `Remove` instead.")
9525 RemoveSizer = wx._deprecated(Remove, "RemoveSizer is deprecated, use `Remove` instead.")
9526 RemovePos = wx._deprecated(Remove, "RemovePos is deprecated, use `Remove` instead.")
9527
9528
9529 def SetDimension(*args, **kwargs):
9530 """
9531 SetDimension(self, int x, int y, int width, int height)
9532
9533 Call this to force the sizer to take the given dimension and thus
9534 force the items owned by the sizer to resize themselves according to
9535 the rules defined by the parameter in the `Add`, `Insert` or `Prepend`
9536 methods.
9537 """
9538 return _core_.Sizer_SetDimension(*args, **kwargs)
9539
9540 def SetMinSize(*args, **kwargs):
9541 """
9542 SetMinSize(self, Size size)
9543
9544 Call this to give the sizer a minimal size. Normally, the sizer will
9545 calculate its minimal size based purely on how much space its children
9546 need. After calling this method `GetMinSize` will return either the
9547 minimal size as requested by its children or the minimal size set
9548 here, depending on which is bigger.
9549 """
9550 return _core_.Sizer_SetMinSize(*args, **kwargs)
9551
9552 def GetSize(*args, **kwargs):
9553 """
9554 GetSize(self) -> Size
9555
9556 Returns the current size of the space managed by the sizer.
9557 """
9558 return _core_.Sizer_GetSize(*args, **kwargs)
9559
9560 def GetPosition(*args, **kwargs):
9561 """
9562 GetPosition(self) -> Point
9563
9564 Returns the current position of the sizer's managed space.
9565 """
9566 return _core_.Sizer_GetPosition(*args, **kwargs)
9567
9568 def GetMinSize(*args, **kwargs):
9569 """
9570 GetMinSize(self) -> Size
9571
9572 Returns the minimal size of the sizer. This is either the combined
9573 minimal size of all the children and their borders or the minimal size
9574 set by SetMinSize, depending on which is bigger.
9575 """
9576 return _core_.Sizer_GetMinSize(*args, **kwargs)
9577
9578 def GetSizeTuple(self):
9579 return self.GetSize().Get()
9580 def GetPositionTuple(self):
9581 return self.GetPosition().Get()
9582 def GetMinSizeTuple(self):
9583 return self.GetMinSize().Get()
9584
9585 def RecalcSizes(*args, **kwargs):
9586 """
9587 RecalcSizes(self)
9588
9589 Using the sizes calculated by `CalcMin` reposition and resize all the
9590 items managed by this sizer. You should not need to call this directly as
9591 it is called by `Layout`.
9592 """
9593 return _core_.Sizer_RecalcSizes(*args, **kwargs)
9594
9595 def CalcMin(*args, **kwargs):
9596 """
9597 CalcMin(self) -> Size
9598
9599 This method is where the sizer will do the actual calculation of its
9600 children's minimal sizes. You should not need to call this directly as
9601 it is called by `Layout`.
9602 """
9603 return _core_.Sizer_CalcMin(*args, **kwargs)
9604
9605 def Layout(*args, **kwargs):
9606 """
9607 Layout(self)
9608
9609 This method will force the recalculation and layout of the items
9610 controlled by the sizer using the current space allocated to the
9611 sizer. Normally this is called automatically from the owning window's
9612 EVT_SIZE handler, but it is also useful to call it from user code when
9613 one of the items in a sizer change size, or items are added or
9614 removed.
9615 """
9616 return _core_.Sizer_Layout(*args, **kwargs)
9617
9618 def Fit(*args, **kwargs):
9619 """
9620 Fit(self, Window window) -> Size
9621
9622 Tell the sizer to resize the *window* to match the sizer's minimal
9623 size. This is commonly done in the constructor of the window itself in
9624 order to set its initial size to match the needs of the children as
9625 determined by the sizer. Returns the new size.
9626
9627 For a top level window this is the total window size, not the client size.
9628 """
9629 return _core_.Sizer_Fit(*args, **kwargs)
9630
9631 def FitInside(*args, **kwargs):
9632 """
9633 FitInside(self, Window window)
9634
9635 Tell the sizer to resize the *virtual size* of the *window* to match the
9636 sizer's minimal size. This will not alter the on screen size of the
9637 window, but may cause the addition/removal/alteration of scrollbars
9638 required to view the virtual area in windows which manage it.
9639
9640 :see: `wx.ScrolledWindow.SetScrollbars`, `SetVirtualSizeHints`
9641
9642 """
9643 return _core_.Sizer_FitInside(*args, **kwargs)
9644
9645 def SetSizeHints(*args, **kwargs):
9646 """
9647 SetSizeHints(self, Window window)
9648
9649 Tell the sizer to set (and `Fit`) the minimal size of the *window* to
9650 match the sizer's minimal size. This is commonly done in the
9651 constructor of the window itself if the window is resizable (as are
9652 many dialogs under Unix and frames on probably all platforms) in order
9653 to prevent the window from being sized smaller than the minimal size
9654 required by the sizer.
9655 """
9656 return _core_.Sizer_SetSizeHints(*args, **kwargs)
9657
9658 def SetVirtualSizeHints(*args, **kwargs):
9659 """
9660 SetVirtualSizeHints(self, Window window)
9661
9662 Tell the sizer to set the minimal size of the window virtual area to
9663 match the sizer's minimal size. For windows with managed scrollbars
9664 this will set them appropriately.
9665
9666 :see: `wx.ScrolledWindow.SetScrollbars`
9667
9668 """
9669 return _core_.Sizer_SetVirtualSizeHints(*args, **kwargs)
9670
9671 def Clear(*args, **kwargs):
9672 """
9673 Clear(self, bool deleteWindows=False)
9674
9675 Clear all items from the sizer, optionally destroying the window items
9676 as well.
9677 """
9678 return _core_.Sizer_Clear(*args, **kwargs)
9679
9680 def DeleteWindows(*args, **kwargs):
9681 """
9682 DeleteWindows(self)
9683
9684 Destroy all windows managed by the sizer.
9685 """
9686 return _core_.Sizer_DeleteWindows(*args, **kwargs)
9687
9688 def GetChildren(*args, **kwargs):
9689 """
9690 GetChildren(sefl) -> list
9691
9692 Returns a list of all the `wx.SizerItem` objects managed by the sizer.
9693 """
9694 return _core_.Sizer_GetChildren(*args, **kwargs)
9695
9696 def Show(*args, **kwargs):
9697 """
9698 Show(self, item, bool show=True, bool recursive=false) -> bool
9699
9700 Shows or hides an item managed by the sizer. To make a sizer item
9701 disappear or reappear, use Show followed by `Layout`. The *item*
9702 parameter can be either a window, a sizer, or the zero-based index of
9703 the item. Use the recursive parameter to show or hide an item in a
9704 subsizer. Returns True if the item was found.
9705 """
9706 return _core_.Sizer_Show(*args, **kwargs)
9707
9708 def IsShown(*args, **kwargs):
9709 """
9710 IsShown(self, item)
9711
9712 Determines if the item is currently shown. sizer. To make a sizer
9713 item disappear or reappear, use Show followed by `Layout`. The *item*
9714 parameter can be either a window, a sizer, or the zero-based index of
9715 the item.
9716 """
9717 return _core_.Sizer_IsShown(*args, **kwargs)
9718
9719 def Hide(self, item, recursive=False):
9720 """
9721 A convenience method for Show(item, False, recursive).
9722 """
9723 return self.Show(item, False, recursive)
9724
9725 def ShowItems(*args, **kwargs):
9726 """
9727 ShowItems(self, bool show)
9728
9729 Recursively call `wx.SizerItem.Show` on all sizer items.
9730 """
9731 return _core_.Sizer_ShowItems(*args, **kwargs)
9732
9733
9734 class SizerPtr(Sizer):
9735 def __init__(self, this):
9736 self.this = this
9737 if not hasattr(self,"thisown"): self.thisown = 0
9738 self.__class__ = Sizer
9739 _core_.Sizer_swigregister(SizerPtr)
9740
9741 class PySizer(Sizer):
9742 """
9743 wx.PySizer is a special version of `wx.Sizer` that has been
9744 instrumented to allow the C++ virtual methods to be overloaded in
9745 Python derived classes. You would derive from this class if you are
9746 wanting to implement a custom sizer in Python code. Simply implement
9747 `CalcMin` and `RecalcSizes` in the derived class and you're all set.
9748 For example::
9749
9750 class MySizer(wx.PySizer):
9751 def __init__(self):
9752 wx.PySizer.__init__(self)
9753
9754 def CalcMin(self):
9755 for item in self.GetChildren():
9756 # calculate the total minimum width and height needed
9757 # by all items in the sizer according to this sizer's
9758 # layout algorithm.
9759 ...
9760 return wx.Size(width, height)
9761
9762 def RecalcSizes(self):
9763 # find the space allotted to this sizer
9764 pos = self.GetPosition()
9765 size = self.GetSize()
9766 for item in self.GetChildren():
9767 # Recalculate (if necessary) the position and size of
9768 # each item and then call item.SetDimension to do the
9769 # actual positioning and sizing of the items within the
9770 # space alloted to this sizer.
9771 ...
9772 item.SetDimension(itemPos, itemSize)
9773
9774
9775 When `Layout` is called it first calls `CalcMin` followed by
9776 `RecalcSizes` so you can optimize a bit by saving the results of
9777 `CalcMin` and reusing them in `RecalcSizes`.
9778
9779 :see: `wx.SizerItem`, `wx.Sizer.GetChildren`
9780
9781
9782 """
9783 def __repr__(self):
9784 return "<%s.%s; proxy of C++ wxPySizer instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
9785 def __init__(self, *args, **kwargs):
9786 """
9787 __init__(self) -> PySizer
9788
9789 Creates a wx.PySizer. Must be called from the __init__ in the derived
9790 class.
9791 """
9792 newobj = _core_.new_PySizer(*args, **kwargs)
9793 self.this = newobj.this
9794 self.thisown = 1
9795 del newobj.thisown
9796 self._setCallbackInfo(self, PySizer);self._setOORInfo(self)
9797
9798 def _setCallbackInfo(*args, **kwargs):
9799 """_setCallbackInfo(self, PyObject self, PyObject _class)"""
9800 return _core_.PySizer__setCallbackInfo(*args, **kwargs)
9801
9802
9803 class PySizerPtr(PySizer):
9804 def __init__(self, this):
9805 self.this = this
9806 if not hasattr(self,"thisown"): self.thisown = 0
9807 self.__class__ = PySizer
9808 _core_.PySizer_swigregister(PySizerPtr)
9809
9810 #---------------------------------------------------------------------------
9811
9812 class BoxSizer(Sizer):
9813 """
9814 The basic idea behind a box sizer is that windows will most often be
9815 laid out in rather simple basic geometry, typically in a row or a
9816 column or nested hierarchies of either. A wx.BoxSizer will lay out
9817 its items in a simple row or column, depending on the orientation
9818 parameter passed to the constructor.
9819 """
9820 def __repr__(self):
9821 return "<%s.%s; proxy of C++ wxBoxSizer instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
9822 def __init__(self, *args, **kwargs):
9823 """
9824 __init__(self, int orient=HORIZONTAL) -> BoxSizer
9825
9826 Constructor for a wx.BoxSizer. *orient* may be one of ``wx.VERTICAL``
9827 or ``wx.HORIZONTAL`` for creating either a column sizer or a row
9828 sizer.
9829 """
9830 newobj = _core_.new_BoxSizer(*args, **kwargs)
9831 self.this = newobj.this
9832 self.thisown = 1
9833 del newobj.thisown
9834 self._setOORInfo(self)
9835
9836 def GetOrientation(*args, **kwargs):
9837 """
9838 GetOrientation(self) -> int
9839
9840 Returns the current orientation of the sizer.
9841 """
9842 return _core_.BoxSizer_GetOrientation(*args, **kwargs)
9843
9844 def SetOrientation(*args, **kwargs):
9845 """
9846 SetOrientation(self, int orient)
9847
9848 Resets the orientation of the sizer.
9849 """
9850 return _core_.BoxSizer_SetOrientation(*args, **kwargs)
9851
9852
9853 class BoxSizerPtr(BoxSizer):
9854 def __init__(self, this):
9855 self.this = this
9856 if not hasattr(self,"thisown"): self.thisown = 0
9857 self.__class__ = BoxSizer
9858 _core_.BoxSizer_swigregister(BoxSizerPtr)
9859
9860 #---------------------------------------------------------------------------
9861
9862 class StaticBoxSizer(BoxSizer):
9863 """
9864 wx.StaticBoxSizer derives from and functions identically to the
9865 `wx.BoxSizer` and adds a `wx.StaticBox` around the items that the sizer
9866 manages. Note that this static box must be created separately and
9867 passed to the sizer constructor.
9868 """
9869 def __repr__(self):
9870 return "<%s.%s; proxy of C++ wxStaticBoxSizer instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
9871 def __init__(self, *args, **kwargs):
9872 """
9873 __init__(self, StaticBox box, int orient=HORIZONTAL) -> StaticBoxSizer
9874
9875 Constructor. It takes an associated static box and the orientation
9876 *orient* as parameters - orient can be either of ``wx.VERTICAL`` or
9877 ``wx.HORIZONTAL``.
9878 """
9879 newobj = _core_.new_StaticBoxSizer(*args, **kwargs)
9880 self.this = newobj.this
9881 self.thisown = 1
9882 del newobj.thisown
9883 self._setOORInfo(self)
9884
9885 def GetStaticBox(*args, **kwargs):
9886 """
9887 GetStaticBox(self) -> StaticBox
9888
9889 Returns the static box associated with this sizer.
9890 """
9891 return _core_.StaticBoxSizer_GetStaticBox(*args, **kwargs)
9892
9893
9894 class StaticBoxSizerPtr(StaticBoxSizer):
9895 def __init__(self, this):
9896 self.this = this
9897 if not hasattr(self,"thisown"): self.thisown = 0
9898 self.__class__ = StaticBoxSizer
9899 _core_.StaticBoxSizer_swigregister(StaticBoxSizerPtr)
9900
9901 #---------------------------------------------------------------------------
9902
9903 class GridSizer(Sizer):
9904 """
9905 A grid sizer is a sizer which lays out its children in a
9906 two-dimensional table with all cells having the same size. In other
9907 words, the width of each cell within the grid is the width of the
9908 widest item added to the sizer and the height of each grid cell is the
9909 height of the tallest item. An optional vertical and/or horizontal
9910 gap between items can also be specified (in pixels.)
9911
9912 Items are placed in the cells of the grid in the order they are added,
9913 in row-major order. In other words, the first row is filled first,
9914 then the second, and so on until all items have been added. (If
9915 neccessary, additional rows will be added as items are added.) If you
9916 need to have greater control over the cells that items are placed in
9917 then use the `wx.GridBagSizer`.
9918
9919 """
9920 def __repr__(self):
9921 return "<%s.%s; proxy of C++ wxGridSizer instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
9922 def __init__(self, *args, **kwargs):
9923 """
9924 __init__(self, int rows=1, int cols=0, int vgap=0, int hgap=0) -> GridSizer
9925
9926 Constructor for a wx.GridSizer. *rows* and *cols* determine the number
9927 of columns and rows in the sizer - if either of the parameters is
9928 zero, it will be calculated to from the total number of children in
9929 the sizer, thus making the sizer grow dynamically. *vgap* and *hgap*
9930 define extra space between all children.
9931 """
9932 newobj = _core_.new_GridSizer(*args, **kwargs)
9933 self.this = newobj.this
9934 self.thisown = 1
9935 del newobj.thisown
9936 self._setOORInfo(self)
9937
9938 def SetCols(*args, **kwargs):
9939 """
9940 SetCols(self, int cols)
9941
9942 Sets the number of columns in the sizer.
9943 """
9944 return _core_.GridSizer_SetCols(*args, **kwargs)
9945
9946 def SetRows(*args, **kwargs):
9947 """
9948 SetRows(self, int rows)
9949
9950 Sets the number of rows in the sizer.
9951 """
9952 return _core_.GridSizer_SetRows(*args, **kwargs)
9953
9954 def SetVGap(*args, **kwargs):
9955 """
9956 SetVGap(self, int gap)
9957
9958 Sets the vertical gap (in pixels) between the cells in the sizer.
9959 """
9960 return _core_.GridSizer_SetVGap(*args, **kwargs)
9961
9962 def SetHGap(*args, **kwargs):
9963 """
9964 SetHGap(self, int gap)
9965
9966 Sets the horizontal gap (in pixels) between cells in the sizer
9967 """
9968 return _core_.GridSizer_SetHGap(*args, **kwargs)
9969
9970 def GetCols(*args, **kwargs):
9971 """
9972 GetCols(self) -> int
9973
9974 Returns the number of columns in the sizer.
9975 """
9976 return _core_.GridSizer_GetCols(*args, **kwargs)
9977
9978 def GetRows(*args, **kwargs):
9979 """
9980 GetRows(self) -> int
9981
9982 Returns the number of rows in the sizer.
9983 """
9984 return _core_.GridSizer_GetRows(*args, **kwargs)
9985
9986 def GetVGap(*args, **kwargs):
9987 """
9988 GetVGap(self) -> int
9989
9990 Returns the vertical gap (in pixels) between the cells in the sizer.
9991 """
9992 return _core_.GridSizer_GetVGap(*args, **kwargs)
9993
9994 def GetHGap(*args, **kwargs):
9995 """
9996 GetHGap(self) -> int
9997
9998 Returns the horizontal gap (in pixels) between cells in the sizer.
9999 """
10000 return _core_.GridSizer_GetHGap(*args, **kwargs)
10001
10002
10003 class GridSizerPtr(GridSizer):
10004 def __init__(self, this):
10005 self.this = this
10006 if not hasattr(self,"thisown"): self.thisown = 0
10007 self.__class__ = GridSizer
10008 _core_.GridSizer_swigregister(GridSizerPtr)
10009
10010 #---------------------------------------------------------------------------
10011
10012 FLEX_GROWMODE_NONE = _core_.FLEX_GROWMODE_NONE
10013 FLEX_GROWMODE_SPECIFIED = _core_.FLEX_GROWMODE_SPECIFIED
10014 FLEX_GROWMODE_ALL = _core_.FLEX_GROWMODE_ALL
10015 class FlexGridSizer(GridSizer):
10016 """
10017 A flex grid sizer is a sizer which lays out its children in a
10018 two-dimensional table with all table cells in one row having the same
10019 height and all cells in one column having the same width, but all
10020 rows or all columns are not necessarily the same height or width as in
10021 the `wx.GridSizer`.
10022
10023 wx.FlexGridSizer can also size items equally in one direction but
10024 unequally ("flexibly") in the other. If the sizer is only flexible
10025 in one direction (this can be changed using `SetFlexibleDirection`), it
10026 needs to be decided how the sizer should grow in the other ("non
10027 flexible") direction in order to fill the available space. The
10028 `SetNonFlexibleGrowMode` method serves this purpose.
10029
10030
10031 """
10032 def __repr__(self):
10033 return "<%s.%s; proxy of C++ wxFlexGridSizer instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
10034 def __init__(self, *args, **kwargs):
10035 """
10036 __init__(self, int rows=1, int cols=0, int vgap=0, int hgap=0) -> FlexGridSizer
10037
10038 Constructor for a wx.FlexGridSizer. *rows* and *cols* determine the
10039 number of columns and rows in the sizer - if either of the parameters
10040 is zero, it will be calculated to from the total number of children in
10041 the sizer, thus making the sizer grow dynamically. *vgap* and *hgap*
10042 define extra space between all children.
10043 """
10044 newobj = _core_.new_FlexGridSizer(*args, **kwargs)
10045 self.this = newobj.this
10046 self.thisown = 1
10047 del newobj.thisown
10048 self._setOORInfo(self)
10049
10050 def AddGrowableRow(*args, **kwargs):
10051 """
10052 AddGrowableRow(self, size_t idx, int proportion=0)
10053
10054 Specifies that row *idx* (starting from zero) should be grown if there
10055 is extra space available to the sizer.
10056
10057 The *proportion* parameter has the same meaning as the stretch factor
10058 for the box sizers except that if all proportions are 0, then all
10059 columns are resized equally (instead of not being resized at all).
10060 """
10061 return _core_.FlexGridSizer_AddGrowableRow(*args, **kwargs)
10062
10063 def RemoveGrowableRow(*args, **kwargs):
10064 """
10065 RemoveGrowableRow(self, size_t idx)
10066
10067 Specifies that row *idx* is no longer growable.
10068 """
10069 return _core_.FlexGridSizer_RemoveGrowableRow(*args, **kwargs)
10070
10071 def AddGrowableCol(*args, **kwargs):
10072 """
10073 AddGrowableCol(self, size_t idx, int proportion=0)
10074
10075 Specifies that column *idx* (starting from zero) should be grown if
10076 there is extra space available to the sizer.
10077
10078 The *proportion* parameter has the same meaning as the stretch factor
10079 for the box sizers except that if all proportions are 0, then all
10080 columns are resized equally (instead of not being resized at all).
10081 """
10082 return _core_.FlexGridSizer_AddGrowableCol(*args, **kwargs)
10083
10084 def RemoveGrowableCol(*args, **kwargs):
10085 """
10086 RemoveGrowableCol(self, size_t idx)
10087
10088 Specifies that column *idx* is no longer growable.
10089 """
10090 return _core_.FlexGridSizer_RemoveGrowableCol(*args, **kwargs)
10091
10092 def SetFlexibleDirection(*args, **kwargs):
10093 """
10094 SetFlexibleDirection(self, int direction)
10095
10096 Specifies whether the sizer should flexibly resize its columns, rows,
10097 or both. Argument *direction* can be one of the following values. Any
10098 other value is ignored.
10099
10100 ============== =======================================
10101 wx.VERTICAL Rows are flexibly sized.
10102 wx.HORIZONTAL Columns are flexibly sized.
10103 wx.BOTH Both rows and columns are flexibly sized
10104 (this is the default value).
10105 ============== =======================================
10106
10107 Note that this method does not trigger relayout.
10108
10109 """
10110 return _core_.FlexGridSizer_SetFlexibleDirection(*args, **kwargs)
10111
10112 def GetFlexibleDirection(*args, **kwargs):
10113 """
10114 GetFlexibleDirection(self) -> int
10115
10116 Returns a value that specifies whether the sizer
10117 flexibly resizes its columns, rows, or both (default).
10118
10119 :see: `SetFlexibleDirection`
10120 """
10121 return _core_.FlexGridSizer_GetFlexibleDirection(*args, **kwargs)
10122
10123 def SetNonFlexibleGrowMode(*args, **kwargs):
10124 """
10125 SetNonFlexibleGrowMode(self, int mode)
10126
10127 Specifies how the sizer should grow in the non-flexible direction if
10128 there is one (so `SetFlexibleDirection` must have been called
10129 previously). Argument *mode* can be one of the following values:
10130
10131 ========================== =================================================
10132 wx.FLEX_GROWMODE_NONE Sizer doesn't grow in the non flexible direction.
10133 wx.FLEX_GROWMODE_SPECIFIED Sizer honors growable columns/rows set with
10134 `AddGrowableCol` and `AddGrowableRow`. In this
10135 case equal sizing applies to minimum sizes of
10136 columns or rows (this is the default value).
10137 wx.FLEX_GROWMODE_ALL Sizer equally stretches all columns or rows in
10138 the non flexible direction, whether they are
10139 growable or not in the flexbile direction.
10140 ========================== =================================================
10141
10142 Note that this method does not trigger relayout.
10143
10144
10145 """
10146 return _core_.FlexGridSizer_SetNonFlexibleGrowMode(*args, **kwargs)
10147
10148 def GetNonFlexibleGrowMode(*args, **kwargs):
10149 """
10150 GetNonFlexibleGrowMode(self) -> int
10151
10152 Returns the value that specifies how the sizer grows in the
10153 non-flexible direction if there is one.
10154
10155 :see: `SetNonFlexibleGrowMode`
10156 """
10157 return _core_.FlexGridSizer_GetNonFlexibleGrowMode(*args, **kwargs)
10158
10159 def GetRowHeights(*args, **kwargs):
10160 """
10161 GetRowHeights(self) -> list
10162
10163 Returns a list of integers representing the heights of each of the
10164 rows in the sizer.
10165 """
10166 return _core_.FlexGridSizer_GetRowHeights(*args, **kwargs)
10167
10168 def GetColWidths(*args, **kwargs):
10169 """
10170 GetColWidths(self) -> list
10171
10172 Returns a list of integers representing the widths of each of the
10173 columns in the sizer.
10174 """
10175 return _core_.FlexGridSizer_GetColWidths(*args, **kwargs)
10176
10177
10178 class FlexGridSizerPtr(FlexGridSizer):
10179 def __init__(self, this):
10180 self.this = this
10181 if not hasattr(self,"thisown"): self.thisown = 0
10182 self.__class__ = FlexGridSizer
10183 _core_.FlexGridSizer_swigregister(FlexGridSizerPtr)
10184
10185 class StdDialogButtonSizer(BoxSizer):
10186 """
10187 A special sizer that knows how to order and position standard buttons
10188 in order to conform to the current platform's standards. You simply
10189 need to add each `wx.Button` to the sizer, and be sure to create the
10190 buttons using the standard ID's. Then call `Finalize` and the sizer
10191 will take care of the rest.
10192
10193 """
10194 def __repr__(self):
10195 return "<%s.%s; proxy of C++ wxStdDialogButtonSizer instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
10196 def __init__(self, *args, **kwargs):
10197 """__init__(self) -> StdDialogButtonSizer"""
10198 newobj = _core_.new_StdDialogButtonSizer(*args, **kwargs)
10199 self.this = newobj.this
10200 self.thisown = 1
10201 del newobj.thisown
10202 def AddButton(*args, **kwargs):
10203 """
10204 AddButton(self, wxButton button)
10205
10206 Use this to add the buttons to this sizer. Do not use the `Add`
10207 method in the base class.
10208 """
10209 return _core_.StdDialogButtonSizer_AddButton(*args, **kwargs)
10210
10211 def Finalise(*args, **kwargs):
10212 """
10213 Finalise(self)
10214
10215 This funciton needs to be called after all the buttons have been added
10216 to the sizer. It will reorder them and position them in a platform
10217 specifc manner.
10218 """
10219 return _core_.StdDialogButtonSizer_Finalise(*args, **kwargs)
10220
10221 def GetAffirmativeButton(*args, **kwargs):
10222 """GetAffirmativeButton(self) -> wxButton"""
10223 return _core_.StdDialogButtonSizer_GetAffirmativeButton(*args, **kwargs)
10224
10225 def GetApplyButton(*args, **kwargs):
10226 """GetApplyButton(self) -> wxButton"""
10227 return _core_.StdDialogButtonSizer_GetApplyButton(*args, **kwargs)
10228
10229 def GetNegativeButton(*args, **kwargs):
10230 """GetNegativeButton(self) -> wxButton"""
10231 return _core_.StdDialogButtonSizer_GetNegativeButton(*args, **kwargs)
10232
10233 def GetCancelButton(*args, **kwargs):
10234 """GetCancelButton(self) -> wxButton"""
10235 return _core_.StdDialogButtonSizer_GetCancelButton(*args, **kwargs)
10236
10237 def GetHelpButton(*args, **kwargs):
10238 """GetHelpButton(self) -> wxButton"""
10239 return _core_.StdDialogButtonSizer_GetHelpButton(*args, **kwargs)
10240
10241
10242 class StdDialogButtonSizerPtr(StdDialogButtonSizer):
10243 def __init__(self, this):
10244 self.this = this
10245 if not hasattr(self,"thisown"): self.thisown = 0
10246 self.__class__ = StdDialogButtonSizer
10247 _core_.StdDialogButtonSizer_swigregister(StdDialogButtonSizerPtr)
10248
10249 #---------------------------------------------------------------------------
10250
10251 class GBPosition(object):
10252 """
10253 This class represents the position of an item in a virtual grid of
10254 rows and columns managed by a `wx.GridBagSizer`. wxPython has
10255 typemaps that will automatically convert from a 2-element sequence of
10256 integers to a wx.GBPosition, so you can use the more pythonic
10257 representation of the position nearly transparently in Python code.
10258 """
10259 def __repr__(self):
10260 return "<%s.%s; proxy of C++ wxGBPosition instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
10261 def __init__(self, *args, **kwargs):
10262 """
10263 __init__(self, int row=0, int col=0) -> GBPosition
10264
10265 This class represents the position of an item in a virtual grid of
10266 rows and columns managed by a `wx.GridBagSizer`. wxPython has
10267 typemaps that will automatically convert from a 2-element sequence of
10268 integers to a wx.GBPosition, so you can use the more pythonic
10269 representation of the position nearly transparently in Python code.
10270 """
10271 newobj = _core_.new_GBPosition(*args, **kwargs)
10272 self.this = newobj.this
10273 self.thisown = 1
10274 del newobj.thisown
10275 def GetRow(*args, **kwargs):
10276 """GetRow(self) -> int"""
10277 return _core_.GBPosition_GetRow(*args, **kwargs)
10278
10279 def GetCol(*args, **kwargs):
10280 """GetCol(self) -> int"""
10281 return _core_.GBPosition_GetCol(*args, **kwargs)
10282
10283 def SetRow(*args, **kwargs):
10284 """SetRow(self, int row)"""
10285 return _core_.GBPosition_SetRow(*args, **kwargs)
10286
10287 def SetCol(*args, **kwargs):
10288 """SetCol(self, int col)"""
10289 return _core_.GBPosition_SetCol(*args, **kwargs)
10290
10291 def __eq__(*args, **kwargs):
10292 """__eq__(self, GBPosition other) -> bool"""
10293 return _core_.GBPosition___eq__(*args, **kwargs)
10294
10295 def __ne__(*args, **kwargs):
10296 """__ne__(self, GBPosition other) -> bool"""
10297 return _core_.GBPosition___ne__(*args, **kwargs)
10298
10299 def Set(*args, **kwargs):
10300 """Set(self, int row=0, int col=0)"""
10301 return _core_.GBPosition_Set(*args, **kwargs)
10302
10303 def Get(*args, **kwargs):
10304 """Get(self) -> PyObject"""
10305 return _core_.GBPosition_Get(*args, **kwargs)
10306
10307 asTuple = wx._deprecated(Get, "asTuple is deprecated, use `Get` instead")
10308 def __str__(self): return str(self.Get())
10309 def __repr__(self): return 'wx.GBPosition'+str(self.Get())
10310 def __len__(self): return len(self.Get())
10311 def __getitem__(self, index): return self.Get()[index]
10312 def __setitem__(self, index, val):
10313 if index == 0: self.SetRow(val)
10314 elif index == 1: self.SetCol(val)
10315 else: raise IndexError
10316 def __nonzero__(self): return self.Get() != (0,0)
10317 __safe_for_unpickling__ = True
10318 def __reduce__(self): return (wx.GBPosition, self.Get())
10319
10320 row = property(GetRow, SetRow)
10321 col = property(GetCol, SetCol)
10322
10323
10324 class GBPositionPtr(GBPosition):
10325 def __init__(self, this):
10326 self.this = this
10327 if not hasattr(self,"thisown"): self.thisown = 0
10328 self.__class__ = GBPosition
10329 _core_.GBPosition_swigregister(GBPositionPtr)
10330
10331 class GBSpan(object):
10332 """
10333 This class is used to hold the row and column spanning attributes of
10334 items in a `wx.GridBagSizer`. wxPython has typemaps that will
10335 automatically convert from a 2-element sequence of integers to a
10336 wx.GBSpan, so you can use the more pythonic representation of the span
10337 nearly transparently in Python code.
10338
10339 """
10340 def __repr__(self):
10341 return "<%s.%s; proxy of C++ wxGBSpan instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
10342 def __init__(self, *args, **kwargs):
10343 """
10344 __init__(self, int rowspan=1, int colspan=1) -> GBSpan
10345
10346 Construct a new wxGBSpan, optionally setting the rowspan and
10347 colspan. The default is (1,1). (Meaning that the item occupies one
10348 cell in each direction.
10349 """
10350 newobj = _core_.new_GBSpan(*args, **kwargs)
10351 self.this = newobj.this
10352 self.thisown = 1
10353 del newobj.thisown
10354 def GetRowspan(*args, **kwargs):
10355 """GetRowspan(self) -> int"""
10356 return _core_.GBSpan_GetRowspan(*args, **kwargs)
10357
10358 def GetColspan(*args, **kwargs):
10359 """GetColspan(self) -> int"""
10360 return _core_.GBSpan_GetColspan(*args, **kwargs)
10361
10362 def SetRowspan(*args, **kwargs):
10363 """SetRowspan(self, int rowspan)"""
10364 return _core_.GBSpan_SetRowspan(*args, **kwargs)
10365
10366 def SetColspan(*args, **kwargs):
10367 """SetColspan(self, int colspan)"""
10368 return _core_.GBSpan_SetColspan(*args, **kwargs)
10369
10370 def __eq__(*args, **kwargs):
10371 """__eq__(self, GBSpan other) -> bool"""
10372 return _core_.GBSpan___eq__(*args, **kwargs)
10373
10374 def __ne__(*args, **kwargs):
10375 """__ne__(self, GBSpan other) -> bool"""
10376 return _core_.GBSpan___ne__(*args, **kwargs)
10377
10378 def Set(*args, **kwargs):
10379 """Set(self, int rowspan=1, int colspan=1)"""
10380 return _core_.GBSpan_Set(*args, **kwargs)
10381
10382 def Get(*args, **kwargs):
10383 """Get(self) -> PyObject"""
10384 return _core_.GBSpan_Get(*args, **kwargs)
10385
10386 asTuple = wx._deprecated(Get, "asTuple is deprecated, use `Get` instead")
10387 def __str__(self): return str(self.Get())
10388 def __repr__(self): return 'wx.GBSpan'+str(self.Get())
10389 def __len__(self): return len(self.Get())
10390 def __getitem__(self, index): return self.Get()[index]
10391 def __setitem__(self, index, val):
10392 if index == 0: self.SetRowspan(val)
10393 elif index == 1: self.SetColspan(val)
10394 else: raise IndexError
10395 def __nonzero__(self): return self.Get() != (0,0)
10396 __safe_for_unpickling__ = True
10397 def __reduce__(self): return (wx.GBSpan, self.Get())
10398
10399 rowspan = property(GetRowspan, SetRowspan)
10400 colspan = property(GetColspan, SetColspan)
10401
10402
10403 class GBSpanPtr(GBSpan):
10404 def __init__(self, this):
10405 self.this = this
10406 if not hasattr(self,"thisown"): self.thisown = 0
10407 self.__class__ = GBSpan
10408 _core_.GBSpan_swigregister(GBSpanPtr)
10409
10410 class GBSizerItem(SizerItem):
10411 """
10412 The wx.GBSizerItem class is used to track the additional data about
10413 items in a `wx.GridBagSizer` such as the item's position in the grid
10414 and how many rows or columns it spans.
10415
10416 """
10417 def __repr__(self):
10418 return "<%s.%s; proxy of C++ wxGBSizerItem instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
10419 def __init__(self, *args, **kwargs):
10420 """
10421 __init__(self) -> GBSizerItem
10422
10423 Constructs an empty wx.GBSizerItem. Either a window, sizer or spacer
10424 size will need to be set, as well as a position and span before this
10425 item can be used in a Sizer.
10426
10427 You will probably never need to create a wx.GBSizerItem directly as they
10428 are created automatically when the sizer's Add method is called.
10429 """
10430 newobj = _core_.new_GBSizerItem(*args, **kwargs)
10431 self.this = newobj.this
10432 self.thisown = 1
10433 del newobj.thisown
10434 def GetPos(*args, **kwargs):
10435 """
10436 GetPos(self) -> GBPosition
10437
10438 Get the grid position of the item
10439 """
10440 return _core_.GBSizerItem_GetPos(*args, **kwargs)
10441
10442 def GetPosTuple(self): return self.GetPos().Get()
10443 def GetSpan(*args, **kwargs):
10444 """
10445 GetSpan(self) -> GBSpan
10446
10447 Get the row and column spanning of the item
10448 """
10449 return _core_.GBSizerItem_GetSpan(*args, **kwargs)
10450
10451 def GetSpanTuple(self): return self.GetSpan().Get()
10452 def SetPos(*args, **kwargs):
10453 """
10454 SetPos(self, GBPosition pos) -> bool
10455
10456 If the item is already a member of a sizer then first ensure that
10457 there is no other item that would intersect with this one at the new
10458 position, then set the new position. Returns True if the change is
10459 successful and after the next Layout() the item will be moved.
10460 """
10461 return _core_.GBSizerItem_SetPos(*args, **kwargs)
10462
10463 def SetSpan(*args, **kwargs):
10464 """
10465 SetSpan(self, GBSpan span) -> bool
10466
10467 If the item is already a member of a sizer then first ensure that
10468 there is no other item that would intersect with this one with its new
10469 spanning size, then set the new spanning. Returns True if the change
10470 is successful and after the next Layout() the item will be resized.
10471
10472 """
10473 return _core_.GBSizerItem_SetSpan(*args, **kwargs)
10474
10475 def Intersects(*args, **kwargs):
10476 """
10477 Intersects(self, GBSizerItem other) -> bool
10478
10479 Returns True if this item and the other item instersect.
10480 """
10481 return _core_.GBSizerItem_Intersects(*args, **kwargs)
10482
10483 def IntersectsPos(*args, **kwargs):
10484 """
10485 IntersectsPos(self, GBPosition pos, GBSpan span) -> bool
10486
10487 Returns True if the given pos/span would intersect with this item.
10488 """
10489 return _core_.GBSizerItem_IntersectsPos(*args, **kwargs)
10490
10491 def GetEndPos(*args, **kwargs):
10492 """
10493 GetEndPos(self) -> GBPosition
10494
10495 Get the row and column of the endpoint of this item.
10496 """
10497 return _core_.GBSizerItem_GetEndPos(*args, **kwargs)
10498
10499 def GetGBSizer(*args, **kwargs):
10500 """
10501 GetGBSizer(self) -> GridBagSizer
10502
10503 Get the sizer this item is a member of.
10504 """
10505 return _core_.GBSizerItem_GetGBSizer(*args, **kwargs)
10506
10507 def SetGBSizer(*args, **kwargs):
10508 """
10509 SetGBSizer(self, GridBagSizer sizer)
10510
10511 Set the sizer this item is a member of.
10512 """
10513 return _core_.GBSizerItem_SetGBSizer(*args, **kwargs)
10514
10515
10516 class GBSizerItemPtr(GBSizerItem):
10517 def __init__(self, this):
10518 self.this = this
10519 if not hasattr(self,"thisown"): self.thisown = 0
10520 self.__class__ = GBSizerItem
10521 _core_.GBSizerItem_swigregister(GBSizerItemPtr)
10522 DefaultSpan = cvar.DefaultSpan
10523
10524 def GBSizerItemWindow(*args, **kwargs):
10525 """
10526 GBSizerItemWindow(Window window, GBPosition pos, GBSpan span, int flag,
10527 int border, PyObject userData=None) -> GBSizerItem
10528
10529 Construct a `wx.GBSizerItem` for a window.
10530 """
10531 val = _core_.new_GBSizerItemWindow(*args, **kwargs)
10532 val.thisown = 1
10533 return val
10534
10535 def GBSizerItemSizer(*args, **kwargs):
10536 """
10537 GBSizerItemSizer(Sizer sizer, GBPosition pos, GBSpan span, int flag,
10538 int border, PyObject userData=None) -> GBSizerItem
10539
10540 Construct a `wx.GBSizerItem` for a sizer
10541 """
10542 val = _core_.new_GBSizerItemSizer(*args, **kwargs)
10543 val.thisown = 1
10544 return val
10545
10546 def GBSizerItemSpacer(*args, **kwargs):
10547 """
10548 GBSizerItemSpacer(int width, int height, GBPosition pos, GBSpan span,
10549 int flag, int border, PyObject userData=None) -> GBSizerItem
10550
10551 Construct a `wx.GBSizerItem` for a spacer.
10552 """
10553 val = _core_.new_GBSizerItemSpacer(*args, **kwargs)
10554 val.thisown = 1
10555 return val
10556
10557 class GridBagSizer(FlexGridSizer):
10558 """
10559 A `wx.Sizer` that can lay out items in a virtual grid like a
10560 `wx.FlexGridSizer` but in this case explicit positioning of the items
10561 is allowed using `wx.GBPosition`, and items can optionally span more
10562 than one row and/or column using `wx.GBSpan`. The total size of the
10563 virtual grid is determined by the largest row and column that items are
10564 positioned at, adjusted for spanning.
10565
10566 """
10567 def __repr__(self):
10568 return "<%s.%s; proxy of C++ wxGridBagSizer instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
10569 def __init__(self, *args, **kwargs):
10570 """
10571 __init__(self, int vgap=0, int hgap=0) -> GridBagSizer
10572
10573 Constructor, with optional parameters to specify the gap between the
10574 rows and columns.
10575 """
10576 newobj = _core_.new_GridBagSizer(*args, **kwargs)
10577 self.this = newobj.this
10578 self.thisown = 1
10579 del newobj.thisown
10580 self._setOORInfo(self)
10581
10582 def Add(*args, **kwargs):
10583 """
10584 Add(self, item, GBPosition pos, GBSpan span=DefaultSpan, int flag=0,
10585 int border=0, userData=None) -> wx.GBSizerItem
10586
10587 Adds an item to the sizer at the grid cell *pos*, optionally spanning
10588 more than one row or column as specified with *span*. The remaining
10589 args behave similarly to `wx.Sizer.Add`.
10590
10591 Returns True if the item was successfully placed at the given cell
10592 position, False if something was already there.
10593
10594 """
10595 return _core_.GridBagSizer_Add(*args, **kwargs)
10596
10597 def AddItem(*args, **kwargs):
10598 """
10599 Add(self, GBSizerItem item) -> wx.GBSizerItem
10600
10601 Add an item to the sizer using a `wx.GBSizerItem`. Returns True if
10602 the item was successfully placed at its given cell position, False if
10603 something was already there.
10604 """
10605 return _core_.GridBagSizer_AddItem(*args, **kwargs)
10606
10607 def GetCellSize(*args, **kwargs):
10608 """
10609 GetCellSize(self, int row, int col) -> Size
10610
10611 Get the size of the specified cell, including hgap and
10612 vgap. Only valid after a Layout.
10613 """
10614 return _core_.GridBagSizer_GetCellSize(*args, **kwargs)
10615
10616 def GetEmptyCellSize(*args, **kwargs):
10617 """
10618 GetEmptyCellSize(self) -> Size
10619
10620 Get the size used for cells in the grid with no item.
10621 """
10622 return _core_.GridBagSizer_GetEmptyCellSize(*args, **kwargs)
10623
10624 def SetEmptyCellSize(*args, **kwargs):
10625 """
10626 SetEmptyCellSize(self, Size sz)
10627
10628 Set the size used for cells in the grid with no item.
10629 """
10630 return _core_.GridBagSizer_SetEmptyCellSize(*args, **kwargs)
10631
10632 def GetItemPosition(*args):
10633 """
10634 GetItemPosition(self, item) -> GBPosition
10635
10636 Get the grid position of the specified *item* where *item* is either a
10637 window or subsizer that is a member of this sizer, or a zero-based
10638 index of an item.
10639 """
10640 return _core_.GridBagSizer_GetItemPosition(*args)
10641
10642 def SetItemPosition(*args):
10643 """
10644 SetItemPosition(self, item, GBPosition pos) -> bool
10645
10646 Set the grid position of the specified *item* where *item* is either a
10647 window or subsizer that is a member of this sizer, or a zero-based
10648 index of an item. Returns True on success. If the move is not
10649 allowed (because an item is already there) then False is returned.
10650
10651 """
10652 return _core_.GridBagSizer_SetItemPosition(*args)
10653
10654 def GetItemSpan(*args):
10655 """
10656 GetItemSpan(self, item) -> GBSpan
10657
10658 Get the row/col spanning of the specified *item* where *item* is
10659 either a window or subsizer that is a member of this sizer, or a
10660 zero-based index of an item.
10661 """
10662 return _core_.GridBagSizer_GetItemSpan(*args)
10663
10664 def SetItemSpan(*args):
10665 """
10666 SetItemSpan(self, item, GBSpan span) -> bool
10667
10668 Set the row/col spanning of the specified *item* where *item* is
10669 either a window or subsizer that is a member of this sizer, or a
10670 zero-based index of an item. Returns True on success. If the move is
10671 not allowed (because an item is already there) then False is returned.
10672 """
10673 return _core_.GridBagSizer_SetItemSpan(*args)
10674
10675 def FindItem(*args):
10676 """
10677 FindItem(self, item) -> GBSizerItem
10678
10679 Find the sizer item for the given window or subsizer, returns None if
10680 not found. (non-recursive)
10681 """
10682 return _core_.GridBagSizer_FindItem(*args)
10683
10684 def FindItemAtPosition(*args, **kwargs):
10685 """
10686 FindItemAtPosition(self, GBPosition pos) -> GBSizerItem
10687
10688 Return the sizer item for the given grid cell, or None if there is no
10689 item at that position. (non-recursive)
10690 """
10691 return _core_.GridBagSizer_FindItemAtPosition(*args, **kwargs)
10692
10693 def FindItemAtPoint(*args, **kwargs):
10694 """
10695 FindItemAtPoint(self, Point pt) -> GBSizerItem
10696
10697 Return the sizer item located at the point given in *pt*, or None if
10698 there is no item at that point. The (x,y) coordinates in pt correspond
10699 to the client coordinates of the window using the sizer for
10700 layout. (non-recursive)
10701 """
10702 return _core_.GridBagSizer_FindItemAtPoint(*args, **kwargs)
10703
10704 def CheckForIntersection(*args, **kwargs):
10705 """
10706 CheckForIntersection(self, GBSizerItem item, GBSizerItem excludeItem=None) -> bool
10707
10708 Look at all items and see if any intersect (or would overlap) the
10709 given *item*. Returns True if so, False if there would be no overlap.
10710 If an *excludeItem* is given then it will not be checked for
10711 intersection, for example it may be the item we are checking the
10712 position of.
10713
10714 """
10715 return _core_.GridBagSizer_CheckForIntersection(*args, **kwargs)
10716
10717 def CheckForIntersectionPos(*args, **kwargs):
10718 """
10719 CheckForIntersectionPos(self, GBPosition pos, GBSpan span, GBSizerItem excludeItem=None) -> bool
10720
10721 Look at all items and see if any intersect (or would overlap) the
10722 given position and span. Returns True if so, False if there would be
10723 no overlap. If an *excludeItem* is given then it will not be checked
10724 for intersection, for example it may be the item we are checking the
10725 position of.
10726 """
10727 return _core_.GridBagSizer_CheckForIntersectionPos(*args, **kwargs)
10728
10729
10730 class GridBagSizerPtr(GridBagSizer):
10731 def __init__(self, this):
10732 self.this = this
10733 if not hasattr(self,"thisown"): self.thisown = 0
10734 self.__class__ = GridBagSizer
10735 _core_.GridBagSizer_swigregister(GridBagSizerPtr)
10736
10737 #---------------------------------------------------------------------------
10738
10739 Left = _core_.Left
10740 Top = _core_.Top
10741 Right = _core_.Right
10742 Bottom = _core_.Bottom
10743 Width = _core_.Width
10744 Height = _core_.Height
10745 Centre = _core_.Centre
10746 Center = _core_.Center
10747 CentreX = _core_.CentreX
10748 CentreY = _core_.CentreY
10749 Unconstrained = _core_.Unconstrained
10750 AsIs = _core_.AsIs
10751 PercentOf = _core_.PercentOf
10752 Above = _core_.Above
10753 Below = _core_.Below
10754 LeftOf = _core_.LeftOf
10755 RightOf = _core_.RightOf
10756 SameAs = _core_.SameAs
10757 Absolute = _core_.Absolute
10758 class IndividualLayoutConstraint(Object):
10759 """
10760 Objects of this class are stored in the `wx.LayoutConstraints` class as
10761 one of eight possible constraints that a window can be involved in.
10762 You will never need to create an instance of
10763 wx.IndividualLayoutConstraint, rather you should create a
10764 `wx.LayoutConstraints` instance and use the individual contstraints
10765 that it contains.
10766 """
10767 def __init__(self): raise RuntimeError, "No constructor defined"
10768 def __repr__(self):
10769 return "<%s.%s; proxy of C++ wxIndividualLayoutConstraint instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
10770 def Set(*args, **kwargs):
10771 """
10772 Set(self, int rel, Window otherW, int otherE, int val=0, int marg=wxLAYOUT_DEFAULT_MARGIN)
10773
10774 Sets the properties of the constraint. Normally called by one of the
10775 convenience functions such as Above, RightOf, SameAs.
10776 """
10777 return _core_.IndividualLayoutConstraint_Set(*args, **kwargs)
10778
10779 def LeftOf(*args, **kwargs):
10780 """
10781 LeftOf(self, Window sibling, int marg=0)
10782
10783 Constrains this edge to be to the left of the given window, with an
10784 optional margin. Implicitly, this is relative to the left edge of the
10785 other window.
10786 """
10787 return _core_.IndividualLayoutConstraint_LeftOf(*args, **kwargs)
10788
10789 def RightOf(*args, **kwargs):
10790 """
10791 RightOf(self, Window sibling, int marg=0)
10792
10793 Constrains this edge to be to the right of the given window, with an
10794 optional margin. Implicitly, this is relative to the right edge of the
10795 other window.
10796 """
10797 return _core_.IndividualLayoutConstraint_RightOf(*args, **kwargs)
10798
10799 def Above(*args, **kwargs):
10800 """
10801 Above(self, Window sibling, int marg=0)
10802
10803 Constrains this edge to be above the given window, with an optional
10804 margin. Implicitly, this is relative to the top edge of the other
10805 window.
10806 """
10807 return _core_.IndividualLayoutConstraint_Above(*args, **kwargs)
10808
10809 def Below(*args, **kwargs):
10810 """
10811 Below(self, Window sibling, int marg=0)
10812
10813 Constrains this edge to be below the given window, with an optional
10814 margin. Implicitly, this is relative to the bottom edge of the other
10815 window.
10816 """
10817 return _core_.IndividualLayoutConstraint_Below(*args, **kwargs)
10818
10819 def SameAs(*args, **kwargs):
10820 """
10821 SameAs(self, Window otherW, int edge, int marg=0)
10822
10823 Constrains this edge or dimension to be to the same as the edge of the
10824 given window, with an optional margin.
10825 """
10826 return _core_.IndividualLayoutConstraint_SameAs(*args, **kwargs)
10827
10828 def PercentOf(*args, **kwargs):
10829 """
10830 PercentOf(self, Window otherW, int wh, int per)
10831
10832 Constrains this edge or dimension to be to a percentage of the given
10833 window, with an optional margin.
10834 """
10835 return _core_.IndividualLayoutConstraint_PercentOf(*args, **kwargs)
10836
10837 def Absolute(*args, **kwargs):
10838 """
10839 Absolute(self, int val)
10840
10841 Constrains this edge or dimension to be the given absolute value.
10842 """
10843 return _core_.IndividualLayoutConstraint_Absolute(*args, **kwargs)
10844
10845 def Unconstrained(*args, **kwargs):
10846 """
10847 Unconstrained(self)
10848
10849 Sets this edge or dimension to be unconstrained, that is, dependent on
10850 other edges and dimensions from which this value can be deduced.
10851 """
10852 return _core_.IndividualLayoutConstraint_Unconstrained(*args, **kwargs)
10853
10854 def AsIs(*args, **kwargs):
10855 """
10856 AsIs(self)
10857
10858 Sets this edge or constraint to be whatever the window's value is at
10859 the moment. If either of the width and height constraints are *as is*,
10860 the window will not be resized, but moved instead. This is important
10861 when considering panel items which are intended to have a default
10862 size, such as a button, which may take its size from the size of the
10863 button label.
10864 """
10865 return _core_.IndividualLayoutConstraint_AsIs(*args, **kwargs)
10866
10867 def GetOtherWindow(*args, **kwargs):
10868 """GetOtherWindow(self) -> Window"""
10869 return _core_.IndividualLayoutConstraint_GetOtherWindow(*args, **kwargs)
10870
10871 def GetMyEdge(*args, **kwargs):
10872 """GetMyEdge(self) -> int"""
10873 return _core_.IndividualLayoutConstraint_GetMyEdge(*args, **kwargs)
10874
10875 def SetEdge(*args, **kwargs):
10876 """SetEdge(self, int which)"""
10877 return _core_.IndividualLayoutConstraint_SetEdge(*args, **kwargs)
10878
10879 def SetValue(*args, **kwargs):
10880 """SetValue(self, int v)"""
10881 return _core_.IndividualLayoutConstraint_SetValue(*args, **kwargs)
10882
10883 def GetMargin(*args, **kwargs):
10884 """GetMargin(self) -> int"""
10885 return _core_.IndividualLayoutConstraint_GetMargin(*args, **kwargs)
10886
10887 def SetMargin(*args, **kwargs):
10888 """SetMargin(self, int m)"""
10889 return _core_.IndividualLayoutConstraint_SetMargin(*args, **kwargs)
10890
10891 def GetValue(*args, **kwargs):
10892 """GetValue(self) -> int"""
10893 return _core_.IndividualLayoutConstraint_GetValue(*args, **kwargs)
10894
10895 def GetPercent(*args, **kwargs):
10896 """GetPercent(self) -> int"""
10897 return _core_.IndividualLayoutConstraint_GetPercent(*args, **kwargs)
10898
10899 def GetOtherEdge(*args, **kwargs):
10900 """GetOtherEdge(self) -> int"""
10901 return _core_.IndividualLayoutConstraint_GetOtherEdge(*args, **kwargs)
10902
10903 def GetDone(*args, **kwargs):
10904 """GetDone(self) -> bool"""
10905 return _core_.IndividualLayoutConstraint_GetDone(*args, **kwargs)
10906
10907 def SetDone(*args, **kwargs):
10908 """SetDone(self, bool d)"""
10909 return _core_.IndividualLayoutConstraint_SetDone(*args, **kwargs)
10910
10911 def GetRelationship(*args, **kwargs):
10912 """GetRelationship(self) -> int"""
10913 return _core_.IndividualLayoutConstraint_GetRelationship(*args, **kwargs)
10914
10915 def SetRelationship(*args, **kwargs):
10916 """SetRelationship(self, int r)"""
10917 return _core_.IndividualLayoutConstraint_SetRelationship(*args, **kwargs)
10918
10919 def ResetIfWin(*args, **kwargs):
10920 """
10921 ResetIfWin(self, Window otherW) -> bool
10922
10923 Reset constraint if it mentions otherWin
10924 """
10925 return _core_.IndividualLayoutConstraint_ResetIfWin(*args, **kwargs)
10926
10927 def SatisfyConstraint(*args, **kwargs):
10928 """
10929 SatisfyConstraint(self, LayoutConstraints constraints, Window win) -> bool
10930
10931 Try to satisfy constraint
10932 """
10933 return _core_.IndividualLayoutConstraint_SatisfyConstraint(*args, **kwargs)
10934
10935 def GetEdge(*args, **kwargs):
10936 """
10937 GetEdge(self, int which, Window thisWin, Window other) -> int
10938
10939 Get the value of this edge or dimension, or if this
10940 is not determinable, -1.
10941 """
10942 return _core_.IndividualLayoutConstraint_GetEdge(*args, **kwargs)
10943
10944
10945 class IndividualLayoutConstraintPtr(IndividualLayoutConstraint):
10946 def __init__(self, this):
10947 self.this = this
10948 if not hasattr(self,"thisown"): self.thisown = 0
10949 self.__class__ = IndividualLayoutConstraint
10950 _core_.IndividualLayoutConstraint_swigregister(IndividualLayoutConstraintPtr)
10951
10952 class LayoutConstraints(Object):
10953 """
10954 **Note:** constraints are now deprecated and you should use sizers
10955 instead.
10956
10957 Objects of this class can be associated with a window to define its
10958 layout constraints, with respect to siblings or its parent.
10959
10960 The class consists of the following eight constraints of class
10961 wx.IndividualLayoutConstraint, some or all of which should be accessed
10962 directly to set the appropriate constraints.
10963
10964 * left: represents the left hand edge of the window
10965 * right: represents the right hand edge of the window
10966 * top: represents the top edge of the window
10967 * bottom: represents the bottom edge of the window
10968 * width: represents the width of the window
10969 * height: represents the height of the window
10970 * centreX: represents the horizontal centre point of the window
10971 * centreY: represents the vertical centre point of the window
10972
10973 Most constraints are initially set to have the relationship
10974 wxUnconstrained, which means that their values should be calculated by
10975 looking at known constraints. The exceptions are width and height,
10976 which are set to wxAsIs to ensure that if the user does not specify a
10977 constraint, the existing width and height will be used, to be
10978 compatible with panel items which often have take a default size. If
10979 the constraint is ``wx.AsIs``, the dimension will not be changed.
10980
10981 :see: `wx.IndividualLayoutConstraint`, `wx.Window.SetConstraints`
10982
10983 """
10984 def __repr__(self):
10985 return "<%s.%s; proxy of C++ wxLayoutConstraints instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
10986 left = property(_core_.LayoutConstraints_left_get)
10987 top = property(_core_.LayoutConstraints_top_get)
10988 right = property(_core_.LayoutConstraints_right_get)
10989 bottom = property(_core_.LayoutConstraints_bottom_get)
10990 width = property(_core_.LayoutConstraints_width_get)
10991 height = property(_core_.LayoutConstraints_height_get)
10992 centreX = property(_core_.LayoutConstraints_centreX_get)
10993 centreY = property(_core_.LayoutConstraints_centreY_get)
10994 def __init__(self, *args, **kwargs):
10995 """__init__(self) -> LayoutConstraints"""
10996 newobj = _core_.new_LayoutConstraints(*args, **kwargs)
10997 self.this = newobj.this
10998 self.thisown = 1
10999 del newobj.thisown
11000 def SatisfyConstraints(*args, **kwargs):
11001 """SatisfyConstraints(Window win) -> (areSatisfied, noChanges)"""
11002 return _core_.LayoutConstraints_SatisfyConstraints(*args, **kwargs)
11003
11004 def AreSatisfied(*args, **kwargs):
11005 """AreSatisfied(self) -> bool"""
11006 return _core_.LayoutConstraints_AreSatisfied(*args, **kwargs)
11007
11008
11009 class LayoutConstraintsPtr(LayoutConstraints):
11010 def __init__(self, this):
11011 self.this = this
11012 if not hasattr(self,"thisown"): self.thisown = 0
11013 self.__class__ = LayoutConstraints
11014 _core_.LayoutConstraints_swigregister(LayoutConstraintsPtr)
11015
11016 #----------------------------------------------------------------------------
11017
11018 # Use Python's bool constants if available, make some if not
11019 try:
11020 True
11021 except NameError:
11022 __builtins__.True = 1==1
11023 __builtins__.False = 1==0
11024 def bool(value): return not not value
11025 __builtins__.bool = bool
11026
11027
11028
11029 # workarounds for bad wxRTTI names
11030 __wxPyPtrTypeMap['wxGauge95'] = 'wxGauge'
11031 __wxPyPtrTypeMap['wxSlider95'] = 'wxSlider'
11032 __wxPyPtrTypeMap['wxStatusBar95'] = 'wxStatusBar'
11033
11034
11035 #----------------------------------------------------------------------------
11036 # Load version numbers from __version__... Ensure that major and minor
11037 # versions are the same for both wxPython and wxWidgets.
11038
11039 from __version__ import *
11040 __version__ = VERSION_STRING
11041
11042 assert MAJOR_VERSION == _core_.MAJOR_VERSION, "wxPython/wxWidgets version mismatch"
11043 assert MINOR_VERSION == _core_.MINOR_VERSION, "wxPython/wxWidgets version mismatch"
11044 if RELEASE_VERSION != _core_.RELEASE_VERSION:
11045 import warnings
11046 warnings.warn("wxPython/wxWidgets release number mismatch")
11047
11048 #----------------------------------------------------------------------------
11049
11050 # Set the default string<-->unicode conversion encoding from the
11051 # locale. This encoding is used when string or unicode objects need
11052 # to be converted in order to pass them to wxWidgets. Please be aware
11053 # that the default encoding within the same locale may be slightly
11054 # different on different platforms. For example, please see
11055 # http://www.alanwood.net/demos/charsetdiffs.html for differences
11056 # between the common latin/roman encodings.
11057 import locale
11058 default = locale.getdefaultlocale()[1]
11059 if default:
11060 wx.SetDefaultPyEncoding(default)
11061 del default
11062 del locale
11063
11064 #----------------------------------------------------------------------------
11065
11066 class PyDeadObjectError(AttributeError):
11067 pass
11068
11069 class _wxPyDeadObject(object):
11070 """
11071 Instances of wx objects that are OOR capable will have their __class__
11072 changed to this class when the C++ object is deleted. This should help
11073 prevent crashes due to referencing a bogus C++ pointer.
11074 """
11075 reprStr = "wxPython wrapper for DELETED %s object! (The C++ object no longer exists.)"
11076 attrStr = "The C++ part of the %s object has been deleted, attribute access no longer allowed."
11077
11078 def __repr__(self):
11079 if not hasattr(self, "_name"):
11080 self._name = "[unknown]"
11081 return self.reprStr % self._name
11082
11083 def __getattr__(self, *args):
11084 if not hasattr(self, "_name"):
11085 self._name = "[unknown]"
11086 raise PyDeadObjectError(self.attrStr % self._name)
11087
11088 def __nonzero__(self):
11089 return 0
11090
11091
11092
11093 class PyUnbornObjectError(AttributeError):
11094 pass
11095
11096 class _wxPyUnbornObject(object):
11097 """
11098 Some stock objects are created when the wx._core module is
11099 imported, but their C++ instance is not created until the wx.App
11100 object is created and initialized. These object instances will
11101 temporarily have their __class__ changed to this class so an
11102 exception will be raised if they are used before the C++ instance
11103 is ready.
11104 """
11105
11106 reprStr = "wxPython wrapper for UNBORN object! (The C++ object is not initialized yet.)"
11107 attrStr = "The C++ part of this object has not been initialized, attribute access not allowed."
11108
11109 def __repr__(self):
11110 #if not hasattr(self, "_name"):
11111 # self._name = "[unknown]"
11112 return self.reprStr #% self._name
11113
11114 def __getattr__(self, *args):
11115 #if not hasattr(self, "_name"):
11116 # self._name = "[unknown]"
11117 raise PyUnbornObjectError(self.attrStr) # % self._name )
11118
11119 def __nonzero__(self):
11120 return 0
11121
11122
11123 #----------------------------------------------------------------------------
11124
11125 def CallAfter(callable, *args, **kw):
11126 """
11127 Call the specified function after the current and pending event
11128 handlers have been completed. This is also good for making GUI
11129 method calls from non-GUI threads. Any extra positional or
11130 keyword args are passed on to the callable when it is called.
11131
11132 :see: `wx.FutureCall`
11133 """
11134 app = wx.GetApp()
11135 assert app is not None, 'No wx.App created yet'
11136
11137 if not hasattr(app, "_CallAfterId"):
11138 app._CallAfterId = wx.NewEventType()
11139 app.Connect(-1, -1, app._CallAfterId,
11140 lambda event: event.callable(*event.args, **event.kw) )
11141 evt = wx.PyEvent()
11142 evt.SetEventType(app._CallAfterId)
11143 evt.callable = callable
11144 evt.args = args
11145 evt.kw = kw
11146 wx.PostEvent(app, evt)
11147
11148 #----------------------------------------------------------------------------
11149
11150
11151 class FutureCall:
11152 """
11153 A convenience class for `wx.Timer`, that calls the given callable
11154 object once after the given amount of milliseconds, passing any
11155 positional or keyword args. The return value of the callable is
11156 availbale after it has been run with the `GetResult` method.
11157
11158 If you don't need to get the return value or restart the timer
11159 then there is no need to hold a reference to this object. It will
11160 hold a reference to itself while the timer is running (the timer
11161 has a reference to self.Notify) but the cycle will be broken when
11162 the timer completes, automatically cleaning up the wx.FutureCall
11163 object.
11164
11165 :see: `wx.CallAfter`
11166 """
11167 def __init__(self, millis, callable, *args, **kwargs):
11168 self.millis = millis
11169 self.callable = callable
11170 self.SetArgs(*args, **kwargs)
11171 self.runCount = 0
11172 self.running = False
11173 self.hasRun = False
11174 self.result = None
11175 self.timer = None
11176 self.Start()
11177
11178 def __del__(self):
11179 self.Stop()
11180
11181
11182 def Start(self, millis=None, *args, **kwargs):
11183 """
11184 (Re)start the timer
11185 """
11186 self.hasRun = False
11187 if millis is not None:
11188 self.millis = millis
11189 if args or kwargs:
11190 self.SetArgs(*args, **kwargs)
11191 self.Stop()
11192 self.timer = wx.PyTimer(self.Notify)
11193 self.timer.Start(self.millis, wx.TIMER_ONE_SHOT)
11194 self.running = True
11195 Restart = Start
11196
11197
11198 def Stop(self):
11199 """
11200 Stop and destroy the timer.
11201 """
11202 if self.timer is not None:
11203 self.timer.Stop()
11204 self.timer = None
11205
11206
11207 def GetInterval(self):
11208 if self.timer is not None:
11209 return self.timer.GetInterval()
11210 else:
11211 return 0
11212
11213
11214 def IsRunning(self):
11215 return self.timer is not None and self.timer.IsRunning()
11216
11217
11218 def SetArgs(self, *args, **kwargs):
11219 """
11220 (Re)set the args passed to the callable object. This is
11221 useful in conjunction with Restart if you want to schedule a
11222 new call to the same callable object but with different
11223 parameters.
11224 """
11225 self.args = args
11226 self.kwargs = kwargs
11227
11228
11229 def HasRun(self):
11230 return self.hasRun
11231
11232 def GetResult(self):
11233 return self.result
11234
11235 def Notify(self):
11236 """
11237 The timer has expired so call the callable.
11238 """
11239 if self.callable and getattr(self.callable, 'im_self', True):
11240 self.runCount += 1
11241 self.running = False
11242 self.result = self.callable(*self.args, **self.kwargs)
11243 self.hasRun = True
11244 if not self.running:
11245 # if it wasn't restarted, then cleanup
11246 wx.CallAfter(self.Stop)
11247
11248
11249
11250 #----------------------------------------------------------------------------
11251 # Control which items in this module should be documented by epydoc.
11252 # We allow only classes and functions, which will help reduce the size
11253 # of the docs by filtering out the zillions of constants, EVT objects,
11254 # and etc that don't make much sense by themselves, but are instead
11255 # documented (or will be) as part of the classes/functions/methods
11256 # where they should be used.
11257
11258 class __DocFilter:
11259 """
11260 A filter for epydoc that only allows non-Ptr classes and
11261 fucntions, in order to reduce the clutter in the API docs.
11262 """
11263 def __init__(self, globals):
11264 self._globals = globals
11265
11266 def __call__(self, name):
11267 import types
11268 obj = self._globals.get(name, None)
11269 if type(obj) not in [type, types.ClassType, types.FunctionType, types.BuiltinFunctionType]:
11270 return False
11271 if name.startswith('_') or name.endswith('Ptr') or name.startswith('EVT'):
11272 return False
11273 return True
11274
11275 #----------------------------------------------------------------------------
11276 #----------------------------------------------------------------------------
11277
11278 # Import other modules in this package that should show up in the
11279 # "core" wx namespace
11280 from _gdi import *
11281 from _windows import *
11282 from _controls import *
11283 from _misc import *
11284
11285
11286 # Fixup the stock objects since they can't be used yet. (They will be
11287 # restored in wx.PyApp.OnInit.)
11288 _core_._wxPyFixStockObjects()
11289
11290 #----------------------------------------------------------------------------
11291 #----------------------------------------------------------------------------
11292
11293