]> git.saurik.com Git - wxWidgets.git/blob - wxPython/src/msw/_core.py
Allow the OOR reference to be saved without doing an INCREF. This
[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 #// Give a reference to the dictionary of this module to the C++ extension
7 #// code.
8 _core_._wxPySetDictionary(vars())
9
10 #// A little trick to make 'wx' be a reference to this module so wx.Names can
11 #// be used here.
12 import sys as _sys
13 wx = _sys.modules[__name__]
14
15
16 #----------------------------------------------------------------------------
17
18 def _deprecated(callable, msg=None):
19 """
20 Create a wrapper function that will raise a DeprecationWarning
21 before calling the callable.
22 """
23 if msg is None:
24 msg = "%s is deprecated" % callable
25 def deprecatedWrapper(*args, **kwargs):
26 import warnings
27 warnings.warn(msg, DeprecationWarning, stacklevel=2)
28 return callable(*args, **kwargs)
29 deprecatedWrapper.__doc__ = msg
30 return deprecatedWrapper
31
32
33 #----------------------------------------------------------------------------
34
35 NOT_FOUND = _core_.NOT_FOUND
36 VSCROLL = _core_.VSCROLL
37 HSCROLL = _core_.HSCROLL
38 CAPTION = _core_.CAPTION
39 DOUBLE_BORDER = _core_.DOUBLE_BORDER
40 SUNKEN_BORDER = _core_.SUNKEN_BORDER
41 RAISED_BORDER = _core_.RAISED_BORDER
42 BORDER = _core_.BORDER
43 SIMPLE_BORDER = _core_.SIMPLE_BORDER
44 STATIC_BORDER = _core_.STATIC_BORDER
45 TRANSPARENT_WINDOW = _core_.TRANSPARENT_WINDOW
46 NO_BORDER = _core_.NO_BORDER
47 TAB_TRAVERSAL = _core_.TAB_TRAVERSAL
48 WANTS_CHARS = _core_.WANTS_CHARS
49 POPUP_WINDOW = _core_.POPUP_WINDOW
50 CENTER_FRAME = _core_.CENTER_FRAME
51 CENTRE_ON_SCREEN = _core_.CENTRE_ON_SCREEN
52 CENTER_ON_SCREEN = _core_.CENTER_ON_SCREEN
53 ED_CLIENT_MARGIN = _core_.ED_CLIENT_MARGIN
54 ED_BUTTONS_BOTTOM = _core_.ED_BUTTONS_BOTTOM
55 ED_BUTTONS_RIGHT = _core_.ED_BUTTONS_RIGHT
56 ED_STATIC_LINE = _core_.ED_STATIC_LINE
57 EXT_DIALOG_STYLE = _core_.EXT_DIALOG_STYLE
58 CLIP_CHILDREN = _core_.CLIP_CHILDREN
59 CLIP_SIBLINGS = _core_.CLIP_SIBLINGS
60 ALWAYS_SHOW_SB = _core_.ALWAYS_SHOW_SB
61 RETAINED = _core_.RETAINED
62 BACKINGSTORE = _core_.BACKINGSTORE
63 COLOURED = _core_.COLOURED
64 FIXED_LENGTH = _core_.FIXED_LENGTH
65 LB_NEEDED_SB = _core_.LB_NEEDED_SB
66 LB_ALWAYS_SB = _core_.LB_ALWAYS_SB
67 LB_SORT = _core_.LB_SORT
68 LB_SINGLE = _core_.LB_SINGLE
69 LB_MULTIPLE = _core_.LB_MULTIPLE
70 LB_EXTENDED = _core_.LB_EXTENDED
71 LB_OWNERDRAW = _core_.LB_OWNERDRAW
72 LB_HSCROLL = _core_.LB_HSCROLL
73 PROCESS_ENTER = _core_.PROCESS_ENTER
74 PASSWORD = _core_.PASSWORD
75 CB_SIMPLE = _core_.CB_SIMPLE
76 CB_DROPDOWN = _core_.CB_DROPDOWN
77 CB_SORT = _core_.CB_SORT
78 CB_READONLY = _core_.CB_READONLY
79 RA_HORIZONTAL = _core_.RA_HORIZONTAL
80 RA_VERTICAL = _core_.RA_VERTICAL
81 RA_SPECIFY_ROWS = _core_.RA_SPECIFY_ROWS
82 RA_SPECIFY_COLS = _core_.RA_SPECIFY_COLS
83 RB_GROUP = _core_.RB_GROUP
84 RB_SINGLE = _core_.RB_SINGLE
85 SL_HORIZONTAL = _core_.SL_HORIZONTAL
86 SL_VERTICAL = _core_.SL_VERTICAL
87 SL_AUTOTICKS = _core_.SL_AUTOTICKS
88 SL_LABELS = _core_.SL_LABELS
89 SL_LEFT = _core_.SL_LEFT
90 SL_TOP = _core_.SL_TOP
91 SL_RIGHT = _core_.SL_RIGHT
92 SL_BOTTOM = _core_.SL_BOTTOM
93 SL_BOTH = _core_.SL_BOTH
94 SL_SELRANGE = _core_.SL_SELRANGE
95 SB_HORIZONTAL = _core_.SB_HORIZONTAL
96 SB_VERTICAL = _core_.SB_VERTICAL
97 ST_SIZEGRIP = _core_.ST_SIZEGRIP
98 ST_NO_AUTORESIZE = _core_.ST_NO_AUTORESIZE
99 FLOOD_SURFACE = _core_.FLOOD_SURFACE
100 FLOOD_BORDER = _core_.FLOOD_BORDER
101 ODDEVEN_RULE = _core_.ODDEVEN_RULE
102 WINDING_RULE = _core_.WINDING_RULE
103 TOOL_TOP = _core_.TOOL_TOP
104 TOOL_BOTTOM = _core_.TOOL_BOTTOM
105 TOOL_LEFT = _core_.TOOL_LEFT
106 TOOL_RIGHT = _core_.TOOL_RIGHT
107 OK = _core_.OK
108 YES_NO = _core_.YES_NO
109 CANCEL = _core_.CANCEL
110 YES = _core_.YES
111 NO = _core_.NO
112 NO_DEFAULT = _core_.NO_DEFAULT
113 YES_DEFAULT = _core_.YES_DEFAULT
114 ICON_EXCLAMATION = _core_.ICON_EXCLAMATION
115 ICON_HAND = _core_.ICON_HAND
116 ICON_QUESTION = _core_.ICON_QUESTION
117 ICON_INFORMATION = _core_.ICON_INFORMATION
118 ICON_STOP = _core_.ICON_STOP
119 ICON_ASTERISK = _core_.ICON_ASTERISK
120 ICON_MASK = _core_.ICON_MASK
121 ICON_WARNING = _core_.ICON_WARNING
122 ICON_ERROR = _core_.ICON_ERROR
123 FORWARD = _core_.FORWARD
124 BACKWARD = _core_.BACKWARD
125 RESET = _core_.RESET
126 HELP = _core_.HELP
127 MORE = _core_.MORE
128 SETUP = _core_.SETUP
129 SIZE_AUTO_WIDTH = _core_.SIZE_AUTO_WIDTH
130 SIZE_AUTO_HEIGHT = _core_.SIZE_AUTO_HEIGHT
131 SIZE_AUTO = _core_.SIZE_AUTO
132 SIZE_USE_EXISTING = _core_.SIZE_USE_EXISTING
133 SIZE_ALLOW_MINUS_ONE = _core_.SIZE_ALLOW_MINUS_ONE
134 PORTRAIT = _core_.PORTRAIT
135 LANDSCAPE = _core_.LANDSCAPE
136 PRINT_QUALITY_HIGH = _core_.PRINT_QUALITY_HIGH
137 PRINT_QUALITY_MEDIUM = _core_.PRINT_QUALITY_MEDIUM
138 PRINT_QUALITY_LOW = _core_.PRINT_QUALITY_LOW
139 PRINT_QUALITY_DRAFT = _core_.PRINT_QUALITY_DRAFT
140 ID_ANY = _core_.ID_ANY
141 ID_SEPARATOR = _core_.ID_SEPARATOR
142 ID_LOWEST = _core_.ID_LOWEST
143 ID_OPEN = _core_.ID_OPEN
144 ID_CLOSE = _core_.ID_CLOSE
145 ID_NEW = _core_.ID_NEW
146 ID_SAVE = _core_.ID_SAVE
147 ID_SAVEAS = _core_.ID_SAVEAS
148 ID_REVERT = _core_.ID_REVERT
149 ID_EXIT = _core_.ID_EXIT
150 ID_UNDO = _core_.ID_UNDO
151 ID_REDO = _core_.ID_REDO
152 ID_HELP = _core_.ID_HELP
153 ID_PRINT = _core_.ID_PRINT
154 ID_PRINT_SETUP = _core_.ID_PRINT_SETUP
155 ID_PREVIEW = _core_.ID_PREVIEW
156 ID_ABOUT = _core_.ID_ABOUT
157 ID_HELP_CONTENTS = _core_.ID_HELP_CONTENTS
158 ID_HELP_COMMANDS = _core_.ID_HELP_COMMANDS
159 ID_HELP_PROCEDURES = _core_.ID_HELP_PROCEDURES
160 ID_HELP_CONTEXT = _core_.ID_HELP_CONTEXT
161 ID_CLOSE_ALL = _core_.ID_CLOSE_ALL
162 ID_PREFERENCES = _core_.ID_PREFERENCES
163 ID_CUT = _core_.ID_CUT
164 ID_COPY = _core_.ID_COPY
165 ID_PASTE = _core_.ID_PASTE
166 ID_CLEAR = _core_.ID_CLEAR
167 ID_FIND = _core_.ID_FIND
168 ID_DUPLICATE = _core_.ID_DUPLICATE
169 ID_SELECTALL = _core_.ID_SELECTALL
170 ID_DELETE = _core_.ID_DELETE
171 ID_REPLACE = _core_.ID_REPLACE
172 ID_REPLACE_ALL = _core_.ID_REPLACE_ALL
173 ID_PROPERTIES = _core_.ID_PROPERTIES
174 ID_VIEW_DETAILS = _core_.ID_VIEW_DETAILS
175 ID_VIEW_LARGEICONS = _core_.ID_VIEW_LARGEICONS
176 ID_VIEW_SMALLICONS = _core_.ID_VIEW_SMALLICONS
177 ID_VIEW_LIST = _core_.ID_VIEW_LIST
178 ID_VIEW_SORTDATE = _core_.ID_VIEW_SORTDATE
179 ID_VIEW_SORTNAME = _core_.ID_VIEW_SORTNAME
180 ID_VIEW_SORTSIZE = _core_.ID_VIEW_SORTSIZE
181 ID_VIEW_SORTTYPE = _core_.ID_VIEW_SORTTYPE
182 ID_FILE1 = _core_.ID_FILE1
183 ID_FILE2 = _core_.ID_FILE2
184 ID_FILE3 = _core_.ID_FILE3
185 ID_FILE4 = _core_.ID_FILE4
186 ID_FILE5 = _core_.ID_FILE5
187 ID_FILE6 = _core_.ID_FILE6
188 ID_FILE7 = _core_.ID_FILE7
189 ID_FILE8 = _core_.ID_FILE8
190 ID_FILE9 = _core_.ID_FILE9
191 ID_OK = _core_.ID_OK
192 ID_CANCEL = _core_.ID_CANCEL
193 ID_APPLY = _core_.ID_APPLY
194 ID_YES = _core_.ID_YES
195 ID_NO = _core_.ID_NO
196 ID_STATIC = _core_.ID_STATIC
197 ID_FORWARD = _core_.ID_FORWARD
198 ID_BACKWARD = _core_.ID_BACKWARD
199 ID_DEFAULT = _core_.ID_DEFAULT
200 ID_MORE = _core_.ID_MORE
201 ID_SETUP = _core_.ID_SETUP
202 ID_RESET = _core_.ID_RESET
203 ID_CONTEXT_HELP = _core_.ID_CONTEXT_HELP
204 ID_YESTOALL = _core_.ID_YESTOALL
205 ID_NOTOALL = _core_.ID_NOTOALL
206 ID_ABORT = _core_.ID_ABORT
207 ID_RETRY = _core_.ID_RETRY
208 ID_IGNORE = _core_.ID_IGNORE
209 ID_ADD = _core_.ID_ADD
210 ID_REMOVE = _core_.ID_REMOVE
211 ID_UP = _core_.ID_UP
212 ID_DOWN = _core_.ID_DOWN
213 ID_HOME = _core_.ID_HOME
214 ID_REFRESH = _core_.ID_REFRESH
215 ID_STOP = _core_.ID_STOP
216 ID_INDEX = _core_.ID_INDEX
217 ID_BOLD = _core_.ID_BOLD
218 ID_ITALIC = _core_.ID_ITALIC
219 ID_JUSTIFY_CENTER = _core_.ID_JUSTIFY_CENTER
220 ID_JUSTIFY_FILL = _core_.ID_JUSTIFY_FILL
221 ID_JUSTIFY_RIGHT = _core_.ID_JUSTIFY_RIGHT
222 ID_JUSTIFY_LEFT = _core_.ID_JUSTIFY_LEFT
223 ID_UNDERLINE = _core_.ID_UNDERLINE
224 ID_INDENT = _core_.ID_INDENT
225 ID_UNINDENT = _core_.ID_UNINDENT
226 ID_ZOOM_100 = _core_.ID_ZOOM_100
227 ID_ZOOM_FIT = _core_.ID_ZOOM_FIT
228 ID_ZOOM_IN = _core_.ID_ZOOM_IN
229 ID_ZOOM_OUT = _core_.ID_ZOOM_OUT
230 ID_UNDELETE = _core_.ID_UNDELETE
231 ID_REVERT_TO_SAVED = _core_.ID_REVERT_TO_SAVED
232 ID_HIGHEST = _core_.ID_HIGHEST
233 OPEN = _core_.OPEN
234 SAVE = _core_.SAVE
235 HIDE_READONLY = _core_.HIDE_READONLY
236 OVERWRITE_PROMPT = _core_.OVERWRITE_PROMPT
237 FILE_MUST_EXIST = _core_.FILE_MUST_EXIST
238 MULTIPLE = _core_.MULTIPLE
239 CHANGE_DIR = _core_.CHANGE_DIR
240 ACCEL_ALT = _core_.ACCEL_ALT
241 ACCEL_CTRL = _core_.ACCEL_CTRL
242 ACCEL_SHIFT = _core_.ACCEL_SHIFT
243 ACCEL_NORMAL = _core_.ACCEL_NORMAL
244 PD_AUTO_HIDE = _core_.PD_AUTO_HIDE
245 PD_APP_MODAL = _core_.PD_APP_MODAL
246 PD_CAN_ABORT = _core_.PD_CAN_ABORT
247 PD_ELAPSED_TIME = _core_.PD_ELAPSED_TIME
248 PD_ESTIMATED_TIME = _core_.PD_ESTIMATED_TIME
249 PD_REMAINING_TIME = _core_.PD_REMAINING_TIME
250 DD_NEW_DIR_BUTTON = _core_.DD_NEW_DIR_BUTTON
251 DD_DEFAULT_STYLE = _core_.DD_DEFAULT_STYLE
252 MENU_TEAROFF = _core_.MENU_TEAROFF
253 MB_DOCKABLE = _core_.MB_DOCKABLE
254 NO_FULL_REPAINT_ON_RESIZE = _core_.NO_FULL_REPAINT_ON_RESIZE
255 FULL_REPAINT_ON_RESIZE = _core_.FULL_REPAINT_ON_RESIZE
256 LI_HORIZONTAL = _core_.LI_HORIZONTAL
257 LI_VERTICAL = _core_.LI_VERTICAL
258 WS_EX_VALIDATE_RECURSIVELY = _core_.WS_EX_VALIDATE_RECURSIVELY
259 WS_EX_BLOCK_EVENTS = _core_.WS_EX_BLOCK_EVENTS
260 WS_EX_TRANSIENT = _core_.WS_EX_TRANSIENT
261 WS_EX_THEMED_BACKGROUND = _core_.WS_EX_THEMED_BACKGROUND
262 WS_EX_PROCESS_IDLE = _core_.WS_EX_PROCESS_IDLE
263 WS_EX_PROCESS_UI_UPDATES = _core_.WS_EX_PROCESS_UI_UPDATES
264 MM_TEXT = _core_.MM_TEXT
265 MM_LOMETRIC = _core_.MM_LOMETRIC
266 MM_HIMETRIC = _core_.MM_HIMETRIC
267 MM_LOENGLISH = _core_.MM_LOENGLISH
268 MM_HIENGLISH = _core_.MM_HIENGLISH
269 MM_TWIPS = _core_.MM_TWIPS
270 MM_ISOTROPIC = _core_.MM_ISOTROPIC
271 MM_ANISOTROPIC = _core_.MM_ANISOTROPIC
272 MM_POINTS = _core_.MM_POINTS
273 MM_METRIC = _core_.MM_METRIC
274 CENTRE = _core_.CENTRE
275 CENTER = _core_.CENTER
276 HORIZONTAL = _core_.HORIZONTAL
277 VERTICAL = _core_.VERTICAL
278 BOTH = _core_.BOTH
279 LEFT = _core_.LEFT
280 RIGHT = _core_.RIGHT
281 UP = _core_.UP
282 DOWN = _core_.DOWN
283 TOP = _core_.TOP
284 BOTTOM = _core_.BOTTOM
285 NORTH = _core_.NORTH
286 SOUTH = _core_.SOUTH
287 WEST = _core_.WEST
288 EAST = _core_.EAST
289 ALL = _core_.ALL
290 ALIGN_NOT = _core_.ALIGN_NOT
291 ALIGN_CENTER_HORIZONTAL = _core_.ALIGN_CENTER_HORIZONTAL
292 ALIGN_CENTRE_HORIZONTAL = _core_.ALIGN_CENTRE_HORIZONTAL
293 ALIGN_LEFT = _core_.ALIGN_LEFT
294 ALIGN_TOP = _core_.ALIGN_TOP
295 ALIGN_RIGHT = _core_.ALIGN_RIGHT
296 ALIGN_BOTTOM = _core_.ALIGN_BOTTOM
297 ALIGN_CENTER_VERTICAL = _core_.ALIGN_CENTER_VERTICAL
298 ALIGN_CENTRE_VERTICAL = _core_.ALIGN_CENTRE_VERTICAL
299 ALIGN_CENTER = _core_.ALIGN_CENTER
300 ALIGN_CENTRE = _core_.ALIGN_CENTRE
301 ALIGN_MASK = _core_.ALIGN_MASK
302 STRETCH_NOT = _core_.STRETCH_NOT
303 SHRINK = _core_.SHRINK
304 GROW = _core_.GROW
305 EXPAND = _core_.EXPAND
306 SHAPED = _core_.SHAPED
307 FIXED_MINSIZE = _core_.FIXED_MINSIZE
308 TILE = _core_.TILE
309 ADJUST_MINSIZE = _core_.ADJUST_MINSIZE
310 BORDER_DEFAULT = _core_.BORDER_DEFAULT
311 BORDER_NONE = _core_.BORDER_NONE
312 BORDER_STATIC = _core_.BORDER_STATIC
313 BORDER_SIMPLE = _core_.BORDER_SIMPLE
314 BORDER_RAISED = _core_.BORDER_RAISED
315 BORDER_SUNKEN = _core_.BORDER_SUNKEN
316 BORDER_DOUBLE = _core_.BORDER_DOUBLE
317 BORDER_MASK = _core_.BORDER_MASK
318 BG_STYLE_SYSTEM = _core_.BG_STYLE_SYSTEM
319 BG_STYLE_COLOUR = _core_.BG_STYLE_COLOUR
320 BG_STYLE_CUSTOM = _core_.BG_STYLE_CUSTOM
321 DEFAULT = _core_.DEFAULT
322 DECORATIVE = _core_.DECORATIVE
323 ROMAN = _core_.ROMAN
324 SCRIPT = _core_.SCRIPT
325 SWISS = _core_.SWISS
326 MODERN = _core_.MODERN
327 TELETYPE = _core_.TELETYPE
328 VARIABLE = _core_.VARIABLE
329 FIXED = _core_.FIXED
330 NORMAL = _core_.NORMAL
331 LIGHT = _core_.LIGHT
332 BOLD = _core_.BOLD
333 ITALIC = _core_.ITALIC
334 SLANT = _core_.SLANT
335 SOLID = _core_.SOLID
336 DOT = _core_.DOT
337 LONG_DASH = _core_.LONG_DASH
338 SHORT_DASH = _core_.SHORT_DASH
339 DOT_DASH = _core_.DOT_DASH
340 USER_DASH = _core_.USER_DASH
341 TRANSPARENT = _core_.TRANSPARENT
342 STIPPLE = _core_.STIPPLE
343 BDIAGONAL_HATCH = _core_.BDIAGONAL_HATCH
344 CROSSDIAG_HATCH = _core_.CROSSDIAG_HATCH
345 FDIAGONAL_HATCH = _core_.FDIAGONAL_HATCH
346 CROSS_HATCH = _core_.CROSS_HATCH
347 HORIZONTAL_HATCH = _core_.HORIZONTAL_HATCH
348 VERTICAL_HATCH = _core_.VERTICAL_HATCH
349 JOIN_BEVEL = _core_.JOIN_BEVEL
350 JOIN_MITER = _core_.JOIN_MITER
351 JOIN_ROUND = _core_.JOIN_ROUND
352 CAP_ROUND = _core_.CAP_ROUND
353 CAP_PROJECTING = _core_.CAP_PROJECTING
354 CAP_BUTT = _core_.CAP_BUTT
355 CLEAR = _core_.CLEAR
356 XOR = _core_.XOR
357 INVERT = _core_.INVERT
358 OR_REVERSE = _core_.OR_REVERSE
359 AND_REVERSE = _core_.AND_REVERSE
360 COPY = _core_.COPY
361 AND = _core_.AND
362 AND_INVERT = _core_.AND_INVERT
363 NO_OP = _core_.NO_OP
364 NOR = _core_.NOR
365 EQUIV = _core_.EQUIV
366 SRC_INVERT = _core_.SRC_INVERT
367 OR_INVERT = _core_.OR_INVERT
368 NAND = _core_.NAND
369 OR = _core_.OR
370 SET = _core_.SET
371 WXK_BACK = _core_.WXK_BACK
372 WXK_TAB = _core_.WXK_TAB
373 WXK_RETURN = _core_.WXK_RETURN
374 WXK_ESCAPE = _core_.WXK_ESCAPE
375 WXK_SPACE = _core_.WXK_SPACE
376 WXK_DELETE = _core_.WXK_DELETE
377 WXK_START = _core_.WXK_START
378 WXK_LBUTTON = _core_.WXK_LBUTTON
379 WXK_RBUTTON = _core_.WXK_RBUTTON
380 WXK_CANCEL = _core_.WXK_CANCEL
381 WXK_MBUTTON = _core_.WXK_MBUTTON
382 WXK_CLEAR = _core_.WXK_CLEAR
383 WXK_SHIFT = _core_.WXK_SHIFT
384 WXK_ALT = _core_.WXK_ALT
385 WXK_CONTROL = _core_.WXK_CONTROL
386 WXK_MENU = _core_.WXK_MENU
387 WXK_PAUSE = _core_.WXK_PAUSE
388 WXK_CAPITAL = _core_.WXK_CAPITAL
389 WXK_PRIOR = _core_.WXK_PRIOR
390 WXK_NEXT = _core_.WXK_NEXT
391 WXK_END = _core_.WXK_END
392 WXK_HOME = _core_.WXK_HOME
393 WXK_LEFT = _core_.WXK_LEFT
394 WXK_UP = _core_.WXK_UP
395 WXK_RIGHT = _core_.WXK_RIGHT
396 WXK_DOWN = _core_.WXK_DOWN
397 WXK_SELECT = _core_.WXK_SELECT
398 WXK_PRINT = _core_.WXK_PRINT
399 WXK_EXECUTE = _core_.WXK_EXECUTE
400 WXK_SNAPSHOT = _core_.WXK_SNAPSHOT
401 WXK_INSERT = _core_.WXK_INSERT
402 WXK_HELP = _core_.WXK_HELP
403 WXK_NUMPAD0 = _core_.WXK_NUMPAD0
404 WXK_NUMPAD1 = _core_.WXK_NUMPAD1
405 WXK_NUMPAD2 = _core_.WXK_NUMPAD2
406 WXK_NUMPAD3 = _core_.WXK_NUMPAD3
407 WXK_NUMPAD4 = _core_.WXK_NUMPAD4
408 WXK_NUMPAD5 = _core_.WXK_NUMPAD5
409 WXK_NUMPAD6 = _core_.WXK_NUMPAD6
410 WXK_NUMPAD7 = _core_.WXK_NUMPAD7
411 WXK_NUMPAD8 = _core_.WXK_NUMPAD8
412 WXK_NUMPAD9 = _core_.WXK_NUMPAD9
413 WXK_MULTIPLY = _core_.WXK_MULTIPLY
414 WXK_ADD = _core_.WXK_ADD
415 WXK_SEPARATOR = _core_.WXK_SEPARATOR
416 WXK_SUBTRACT = _core_.WXK_SUBTRACT
417 WXK_DECIMAL = _core_.WXK_DECIMAL
418 WXK_DIVIDE = _core_.WXK_DIVIDE
419 WXK_F1 = _core_.WXK_F1
420 WXK_F2 = _core_.WXK_F2
421 WXK_F3 = _core_.WXK_F3
422 WXK_F4 = _core_.WXK_F4
423 WXK_F5 = _core_.WXK_F5
424 WXK_F6 = _core_.WXK_F6
425 WXK_F7 = _core_.WXK_F7
426 WXK_F8 = _core_.WXK_F8
427 WXK_F9 = _core_.WXK_F9
428 WXK_F10 = _core_.WXK_F10
429 WXK_F11 = _core_.WXK_F11
430 WXK_F12 = _core_.WXK_F12
431 WXK_F13 = _core_.WXK_F13
432 WXK_F14 = _core_.WXK_F14
433 WXK_F15 = _core_.WXK_F15
434 WXK_F16 = _core_.WXK_F16
435 WXK_F17 = _core_.WXK_F17
436 WXK_F18 = _core_.WXK_F18
437 WXK_F19 = _core_.WXK_F19
438 WXK_F20 = _core_.WXK_F20
439 WXK_F21 = _core_.WXK_F21
440 WXK_F22 = _core_.WXK_F22
441 WXK_F23 = _core_.WXK_F23
442 WXK_F24 = _core_.WXK_F24
443 WXK_NUMLOCK = _core_.WXK_NUMLOCK
444 WXK_SCROLL = _core_.WXK_SCROLL
445 WXK_PAGEUP = _core_.WXK_PAGEUP
446 WXK_PAGEDOWN = _core_.WXK_PAGEDOWN
447 WXK_NUMPAD_SPACE = _core_.WXK_NUMPAD_SPACE
448 WXK_NUMPAD_TAB = _core_.WXK_NUMPAD_TAB
449 WXK_NUMPAD_ENTER = _core_.WXK_NUMPAD_ENTER
450 WXK_NUMPAD_F1 = _core_.WXK_NUMPAD_F1
451 WXK_NUMPAD_F2 = _core_.WXK_NUMPAD_F2
452 WXK_NUMPAD_F3 = _core_.WXK_NUMPAD_F3
453 WXK_NUMPAD_F4 = _core_.WXK_NUMPAD_F4
454 WXK_NUMPAD_HOME = _core_.WXK_NUMPAD_HOME
455 WXK_NUMPAD_LEFT = _core_.WXK_NUMPAD_LEFT
456 WXK_NUMPAD_UP = _core_.WXK_NUMPAD_UP
457 WXK_NUMPAD_RIGHT = _core_.WXK_NUMPAD_RIGHT
458 WXK_NUMPAD_DOWN = _core_.WXK_NUMPAD_DOWN
459 WXK_NUMPAD_PRIOR = _core_.WXK_NUMPAD_PRIOR
460 WXK_NUMPAD_PAGEUP = _core_.WXK_NUMPAD_PAGEUP
461 WXK_NUMPAD_NEXT = _core_.WXK_NUMPAD_NEXT
462 WXK_NUMPAD_PAGEDOWN = _core_.WXK_NUMPAD_PAGEDOWN
463 WXK_NUMPAD_END = _core_.WXK_NUMPAD_END
464 WXK_NUMPAD_BEGIN = _core_.WXK_NUMPAD_BEGIN
465 WXK_NUMPAD_INSERT = _core_.WXK_NUMPAD_INSERT
466 WXK_NUMPAD_DELETE = _core_.WXK_NUMPAD_DELETE
467 WXK_NUMPAD_EQUAL = _core_.WXK_NUMPAD_EQUAL
468 WXK_NUMPAD_MULTIPLY = _core_.WXK_NUMPAD_MULTIPLY
469 WXK_NUMPAD_ADD = _core_.WXK_NUMPAD_ADD
470 WXK_NUMPAD_SEPARATOR = _core_.WXK_NUMPAD_SEPARATOR
471 WXK_NUMPAD_SUBTRACT = _core_.WXK_NUMPAD_SUBTRACT
472 WXK_NUMPAD_DECIMAL = _core_.WXK_NUMPAD_DECIMAL
473 WXK_NUMPAD_DIVIDE = _core_.WXK_NUMPAD_DIVIDE
474 WXK_WINDOWS_LEFT = _core_.WXK_WINDOWS_LEFT
475 WXK_WINDOWS_RIGHT = _core_.WXK_WINDOWS_RIGHT
476 WXK_WINDOWS_MENU = _core_.WXK_WINDOWS_MENU
477 PAPER_NONE = _core_.PAPER_NONE
478 PAPER_LETTER = _core_.PAPER_LETTER
479 PAPER_LEGAL = _core_.PAPER_LEGAL
480 PAPER_A4 = _core_.PAPER_A4
481 PAPER_CSHEET = _core_.PAPER_CSHEET
482 PAPER_DSHEET = _core_.PAPER_DSHEET
483 PAPER_ESHEET = _core_.PAPER_ESHEET
484 PAPER_LETTERSMALL = _core_.PAPER_LETTERSMALL
485 PAPER_TABLOID = _core_.PAPER_TABLOID
486 PAPER_LEDGER = _core_.PAPER_LEDGER
487 PAPER_STATEMENT = _core_.PAPER_STATEMENT
488 PAPER_EXECUTIVE = _core_.PAPER_EXECUTIVE
489 PAPER_A3 = _core_.PAPER_A3
490 PAPER_A4SMALL = _core_.PAPER_A4SMALL
491 PAPER_A5 = _core_.PAPER_A5
492 PAPER_B4 = _core_.PAPER_B4
493 PAPER_B5 = _core_.PAPER_B5
494 PAPER_FOLIO = _core_.PAPER_FOLIO
495 PAPER_QUARTO = _core_.PAPER_QUARTO
496 PAPER_10X14 = _core_.PAPER_10X14
497 PAPER_11X17 = _core_.PAPER_11X17
498 PAPER_NOTE = _core_.PAPER_NOTE
499 PAPER_ENV_9 = _core_.PAPER_ENV_9
500 PAPER_ENV_10 = _core_.PAPER_ENV_10
501 PAPER_ENV_11 = _core_.PAPER_ENV_11
502 PAPER_ENV_12 = _core_.PAPER_ENV_12
503 PAPER_ENV_14 = _core_.PAPER_ENV_14
504 PAPER_ENV_DL = _core_.PAPER_ENV_DL
505 PAPER_ENV_C5 = _core_.PAPER_ENV_C5
506 PAPER_ENV_C3 = _core_.PAPER_ENV_C3
507 PAPER_ENV_C4 = _core_.PAPER_ENV_C4
508 PAPER_ENV_C6 = _core_.PAPER_ENV_C6
509 PAPER_ENV_C65 = _core_.PAPER_ENV_C65
510 PAPER_ENV_B4 = _core_.PAPER_ENV_B4
511 PAPER_ENV_B5 = _core_.PAPER_ENV_B5
512 PAPER_ENV_B6 = _core_.PAPER_ENV_B6
513 PAPER_ENV_ITALY = _core_.PAPER_ENV_ITALY
514 PAPER_ENV_MONARCH = _core_.PAPER_ENV_MONARCH
515 PAPER_ENV_PERSONAL = _core_.PAPER_ENV_PERSONAL
516 PAPER_FANFOLD_US = _core_.PAPER_FANFOLD_US
517 PAPER_FANFOLD_STD_GERMAN = _core_.PAPER_FANFOLD_STD_GERMAN
518 PAPER_FANFOLD_LGL_GERMAN = _core_.PAPER_FANFOLD_LGL_GERMAN
519 PAPER_ISO_B4 = _core_.PAPER_ISO_B4
520 PAPER_JAPANESE_POSTCARD = _core_.PAPER_JAPANESE_POSTCARD
521 PAPER_9X11 = _core_.PAPER_9X11
522 PAPER_10X11 = _core_.PAPER_10X11
523 PAPER_15X11 = _core_.PAPER_15X11
524 PAPER_ENV_INVITE = _core_.PAPER_ENV_INVITE
525 PAPER_LETTER_EXTRA = _core_.PAPER_LETTER_EXTRA
526 PAPER_LEGAL_EXTRA = _core_.PAPER_LEGAL_EXTRA
527 PAPER_TABLOID_EXTRA = _core_.PAPER_TABLOID_EXTRA
528 PAPER_A4_EXTRA = _core_.PAPER_A4_EXTRA
529 PAPER_LETTER_TRANSVERSE = _core_.PAPER_LETTER_TRANSVERSE
530 PAPER_A4_TRANSVERSE = _core_.PAPER_A4_TRANSVERSE
531 PAPER_LETTER_EXTRA_TRANSVERSE = _core_.PAPER_LETTER_EXTRA_TRANSVERSE
532 PAPER_A_PLUS = _core_.PAPER_A_PLUS
533 PAPER_B_PLUS = _core_.PAPER_B_PLUS
534 PAPER_LETTER_PLUS = _core_.PAPER_LETTER_PLUS
535 PAPER_A4_PLUS = _core_.PAPER_A4_PLUS
536 PAPER_A5_TRANSVERSE = _core_.PAPER_A5_TRANSVERSE
537 PAPER_B5_TRANSVERSE = _core_.PAPER_B5_TRANSVERSE
538 PAPER_A3_EXTRA = _core_.PAPER_A3_EXTRA
539 PAPER_A5_EXTRA = _core_.PAPER_A5_EXTRA
540 PAPER_B5_EXTRA = _core_.PAPER_B5_EXTRA
541 PAPER_A2 = _core_.PAPER_A2
542 PAPER_A3_TRANSVERSE = _core_.PAPER_A3_TRANSVERSE
543 PAPER_A3_EXTRA_TRANSVERSE = _core_.PAPER_A3_EXTRA_TRANSVERSE
544 DUPLEX_SIMPLEX = _core_.DUPLEX_SIMPLEX
545 DUPLEX_HORIZONTAL = _core_.DUPLEX_HORIZONTAL
546 DUPLEX_VERTICAL = _core_.DUPLEX_VERTICAL
547 ITEM_SEPARATOR = _core_.ITEM_SEPARATOR
548 ITEM_NORMAL = _core_.ITEM_NORMAL
549 ITEM_CHECK = _core_.ITEM_CHECK
550 ITEM_RADIO = _core_.ITEM_RADIO
551 ITEM_MAX = _core_.ITEM_MAX
552 HT_NOWHERE = _core_.HT_NOWHERE
553 HT_SCROLLBAR_FIRST = _core_.HT_SCROLLBAR_FIRST
554 HT_SCROLLBAR_ARROW_LINE_1 = _core_.HT_SCROLLBAR_ARROW_LINE_1
555 HT_SCROLLBAR_ARROW_LINE_2 = _core_.HT_SCROLLBAR_ARROW_LINE_2
556 HT_SCROLLBAR_ARROW_PAGE_1 = _core_.HT_SCROLLBAR_ARROW_PAGE_1
557 HT_SCROLLBAR_ARROW_PAGE_2 = _core_.HT_SCROLLBAR_ARROW_PAGE_2
558 HT_SCROLLBAR_THUMB = _core_.HT_SCROLLBAR_THUMB
559 HT_SCROLLBAR_BAR_1 = _core_.HT_SCROLLBAR_BAR_1
560 HT_SCROLLBAR_BAR_2 = _core_.HT_SCROLLBAR_BAR_2
561 HT_SCROLLBAR_LAST = _core_.HT_SCROLLBAR_LAST
562 HT_WINDOW_OUTSIDE = _core_.HT_WINDOW_OUTSIDE
563 HT_WINDOW_INSIDE = _core_.HT_WINDOW_INSIDE
564 HT_WINDOW_VERT_SCROLLBAR = _core_.HT_WINDOW_VERT_SCROLLBAR
565 HT_WINDOW_HORZ_SCROLLBAR = _core_.HT_WINDOW_HORZ_SCROLLBAR
566 HT_WINDOW_CORNER = _core_.HT_WINDOW_CORNER
567 HT_MAX = _core_.HT_MAX
568 MOD_NONE = _core_.MOD_NONE
569 MOD_ALT = _core_.MOD_ALT
570 MOD_CONTROL = _core_.MOD_CONTROL
571 MOD_SHIFT = _core_.MOD_SHIFT
572 MOD_WIN = _core_.MOD_WIN
573 UPDATE_UI_NONE = _core_.UPDATE_UI_NONE
574 UPDATE_UI_RECURSE = _core_.UPDATE_UI_RECURSE
575 UPDATE_UI_FROMIDLE = _core_.UPDATE_UI_FROMIDLE
576 #---------------------------------------------------------------------------
577
578 class Object(object):
579 """
580 The base class for most wx objects, although in wxPython not
581 much functionality is needed nor exposed.
582 """
583 def __init__(self): raise RuntimeError, "No constructor defined"
584 def __repr__(self):
585 return "<%s.%s; proxy of C++ wxObject instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
586 def GetClassName(*args, **kwargs):
587 """
588 GetClassName(self) -> String
589
590 Returns the class name of the C++ class using wxRTTI.
591 """
592 return _core_.Object_GetClassName(*args, **kwargs)
593
594 def Destroy(*args, **kwargs):
595 """
596 Destroy(self)
597
598 Deletes the C++ object this Python object is a proxy for.
599 """
600 return _core_.Object_Destroy(*args, **kwargs)
601
602
603 class ObjectPtr(Object):
604 def __init__(self, this):
605 self.this = this
606 if not hasattr(self,"thisown"): self.thisown = 0
607 self.__class__ = Object
608 _core_.Object_swigregister(ObjectPtr)
609 _wxPySetDictionary = _core_._wxPySetDictionary
610
611 _wxPyFixStockObjects = _core_._wxPyFixStockObjects
612
613 cvar = _core_.cvar
614 EmptyString = cvar.EmptyString
615
616 #---------------------------------------------------------------------------
617
618 BITMAP_TYPE_INVALID = _core_.BITMAP_TYPE_INVALID
619 BITMAP_TYPE_BMP = _core_.BITMAP_TYPE_BMP
620 BITMAP_TYPE_ICO = _core_.BITMAP_TYPE_ICO
621 BITMAP_TYPE_CUR = _core_.BITMAP_TYPE_CUR
622 BITMAP_TYPE_XBM = _core_.BITMAP_TYPE_XBM
623 BITMAP_TYPE_XBM_DATA = _core_.BITMAP_TYPE_XBM_DATA
624 BITMAP_TYPE_XPM = _core_.BITMAP_TYPE_XPM
625 BITMAP_TYPE_XPM_DATA = _core_.BITMAP_TYPE_XPM_DATA
626 BITMAP_TYPE_TIF = _core_.BITMAP_TYPE_TIF
627 BITMAP_TYPE_GIF = _core_.BITMAP_TYPE_GIF
628 BITMAP_TYPE_PNG = _core_.BITMAP_TYPE_PNG
629 BITMAP_TYPE_JPEG = _core_.BITMAP_TYPE_JPEG
630 BITMAP_TYPE_PNM = _core_.BITMAP_TYPE_PNM
631 BITMAP_TYPE_PCX = _core_.BITMAP_TYPE_PCX
632 BITMAP_TYPE_PICT = _core_.BITMAP_TYPE_PICT
633 BITMAP_TYPE_ICON = _core_.BITMAP_TYPE_ICON
634 BITMAP_TYPE_ANI = _core_.BITMAP_TYPE_ANI
635 BITMAP_TYPE_IFF = _core_.BITMAP_TYPE_IFF
636 BITMAP_TYPE_MACCURSOR = _core_.BITMAP_TYPE_MACCURSOR
637 BITMAP_TYPE_ANY = _core_.BITMAP_TYPE_ANY
638 CURSOR_NONE = _core_.CURSOR_NONE
639 CURSOR_ARROW = _core_.CURSOR_ARROW
640 CURSOR_RIGHT_ARROW = _core_.CURSOR_RIGHT_ARROW
641 CURSOR_BULLSEYE = _core_.CURSOR_BULLSEYE
642 CURSOR_CHAR = _core_.CURSOR_CHAR
643 CURSOR_CROSS = _core_.CURSOR_CROSS
644 CURSOR_HAND = _core_.CURSOR_HAND
645 CURSOR_IBEAM = _core_.CURSOR_IBEAM
646 CURSOR_LEFT_BUTTON = _core_.CURSOR_LEFT_BUTTON
647 CURSOR_MAGNIFIER = _core_.CURSOR_MAGNIFIER
648 CURSOR_MIDDLE_BUTTON = _core_.CURSOR_MIDDLE_BUTTON
649 CURSOR_NO_ENTRY = _core_.CURSOR_NO_ENTRY
650 CURSOR_PAINT_BRUSH = _core_.CURSOR_PAINT_BRUSH
651 CURSOR_PENCIL = _core_.CURSOR_PENCIL
652 CURSOR_POINT_LEFT = _core_.CURSOR_POINT_LEFT
653 CURSOR_POINT_RIGHT = _core_.CURSOR_POINT_RIGHT
654 CURSOR_QUESTION_ARROW = _core_.CURSOR_QUESTION_ARROW
655 CURSOR_RIGHT_BUTTON = _core_.CURSOR_RIGHT_BUTTON
656 CURSOR_SIZENESW = _core_.CURSOR_SIZENESW
657 CURSOR_SIZENS = _core_.CURSOR_SIZENS
658 CURSOR_SIZENWSE = _core_.CURSOR_SIZENWSE
659 CURSOR_SIZEWE = _core_.CURSOR_SIZEWE
660 CURSOR_SIZING = _core_.CURSOR_SIZING
661 CURSOR_SPRAYCAN = _core_.CURSOR_SPRAYCAN
662 CURSOR_WAIT = _core_.CURSOR_WAIT
663 CURSOR_WATCH = _core_.CURSOR_WATCH
664 CURSOR_BLANK = _core_.CURSOR_BLANK
665 CURSOR_DEFAULT = _core_.CURSOR_DEFAULT
666 CURSOR_COPY_ARROW = _core_.CURSOR_COPY_ARROW
667 CURSOR_ARROWWAIT = _core_.CURSOR_ARROWWAIT
668 CURSOR_MAX = _core_.CURSOR_MAX
669 #---------------------------------------------------------------------------
670
671 class Size(object):
672 """
673 wx.Size is a useful data structure used to represent the size of
674 something. It simply contians integer width and height proprtites.
675 In most places in wxPython where a wx.Size is expected a
676 (width,height) tuple can be used instead.
677 """
678 def __repr__(self):
679 return "<%s.%s; proxy of C++ wxSize instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
680 width = property(_core_.Size_width_get, _core_.Size_width_set)
681 height = property(_core_.Size_height_get, _core_.Size_height_set)
682 x = width; y = height
683 def __init__(self, *args, **kwargs):
684 """
685 __init__(self, int w=0, int h=0) -> Size
686
687 Creates a size object.
688 """
689 newobj = _core_.new_Size(*args, **kwargs)
690 self.this = newobj.this
691 self.thisown = 1
692 del newobj.thisown
693 def __del__(self, destroy=_core_.delete_Size):
694 """__del__(self)"""
695 try:
696 if self.thisown: destroy(self)
697 except: pass
698
699 def __eq__(*args, **kwargs):
700 """
701 __eq__(self, Size sz) -> bool
702
703 Test for equality of wx.Size objects.
704 """
705 return _core_.Size___eq__(*args, **kwargs)
706
707 def __ne__(*args, **kwargs):
708 """
709 __ne__(self, Size sz) -> bool
710
711 Test for inequality.
712 """
713 return _core_.Size___ne__(*args, **kwargs)
714
715 def __add__(*args, **kwargs):
716 """
717 __add__(self, Size sz) -> Size
718
719 Add sz's proprties to this and return the result.
720 """
721 return _core_.Size___add__(*args, **kwargs)
722
723 def __sub__(*args, **kwargs):
724 """
725 __sub__(self, Size sz) -> Size
726
727 Subtract sz's properties from this and return the result.
728 """
729 return _core_.Size___sub__(*args, **kwargs)
730
731 def IncTo(*args, **kwargs):
732 """
733 IncTo(self, Size sz)
734
735 Increments this object so that both of its dimensions are not less
736 than the corresponding dimensions of the size.
737 """
738 return _core_.Size_IncTo(*args, **kwargs)
739
740 def DecTo(*args, **kwargs):
741 """
742 DecTo(self, Size sz)
743
744 Decrements this object so that both of its dimensions are not greater
745 than the corresponding dimensions of the size.
746 """
747 return _core_.Size_DecTo(*args, **kwargs)
748
749 def Set(*args, **kwargs):
750 """
751 Set(self, int w, int h)
752
753 Set both width and height.
754 """
755 return _core_.Size_Set(*args, **kwargs)
756
757 def SetWidth(*args, **kwargs):
758 """SetWidth(self, int w)"""
759 return _core_.Size_SetWidth(*args, **kwargs)
760
761 def SetHeight(*args, **kwargs):
762 """SetHeight(self, int h)"""
763 return _core_.Size_SetHeight(*args, **kwargs)
764
765 def GetWidth(*args, **kwargs):
766 """GetWidth(self) -> int"""
767 return _core_.Size_GetWidth(*args, **kwargs)
768
769 def GetHeight(*args, **kwargs):
770 """GetHeight(self) -> int"""
771 return _core_.Size_GetHeight(*args, **kwargs)
772
773 def IsFullySpecified(*args, **kwargs):
774 """
775 IsFullySpecified(self) -> bool
776
777 Returns True if both components of the size are non-default values.
778 """
779 return _core_.Size_IsFullySpecified(*args, **kwargs)
780
781 def SetDefaults(*args, **kwargs):
782 """
783 SetDefaults(self, Size size)
784
785 Combine this size with the other one replacing the default components
786 of this object (i.e. equal to -1) with those of the other.
787 """
788 return _core_.Size_SetDefaults(*args, **kwargs)
789
790 def Get(*args, **kwargs):
791 """
792 Get() -> (width,height)
793
794 Returns the width and height properties as a tuple.
795 """
796 return _core_.Size_Get(*args, **kwargs)
797
798 asTuple = wx._deprecated(Get, "asTuple is deprecated, use `Get` instead")
799 def __str__(self): return str(self.Get())
800 def __repr__(self): return 'wx.Size'+str(self.Get())
801 def __len__(self): return len(self.Get())
802 def __getitem__(self, index): return self.Get()[index]
803 def __setitem__(self, index, val):
804 if index == 0: self.width = val
805 elif index == 1: self.height = val
806 else: raise IndexError
807 def __nonzero__(self): return self.Get() != (0,0)
808 __safe_for_unpickling__ = True
809 def __reduce__(self): return (wx.Size, self.Get())
810
811
812 class SizePtr(Size):
813 def __init__(self, this):
814 self.this = this
815 if not hasattr(self,"thisown"): self.thisown = 0
816 self.__class__ = Size
817 _core_.Size_swigregister(SizePtr)
818
819 #---------------------------------------------------------------------------
820
821 class RealPoint(object):
822 """
823 A data structure for representing a point or position with floating
824 point x and y properties. In wxPython most places that expect a
825 wx.RealPoint can also accept a (x,y) tuple.
826 """
827 def __repr__(self):
828 return "<%s.%s; proxy of C++ wxRealPoint instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
829 x = property(_core_.RealPoint_x_get, _core_.RealPoint_x_set)
830 y = property(_core_.RealPoint_y_get, _core_.RealPoint_y_set)
831 def __init__(self, *args, **kwargs):
832 """
833 __init__(self, double x=0.0, double y=0.0) -> RealPoint
834
835 Create a wx.RealPoint object
836 """
837 newobj = _core_.new_RealPoint(*args, **kwargs)
838 self.this = newobj.this
839 self.thisown = 1
840 del newobj.thisown
841 def __del__(self, destroy=_core_.delete_RealPoint):
842 """__del__(self)"""
843 try:
844 if self.thisown: destroy(self)
845 except: pass
846
847 def __eq__(*args, **kwargs):
848 """
849 __eq__(self, RealPoint pt) -> bool
850
851 Test for equality of wx.RealPoint objects.
852 """
853 return _core_.RealPoint___eq__(*args, **kwargs)
854
855 def __ne__(*args, **kwargs):
856 """
857 __ne__(self, RealPoint pt) -> bool
858
859 Test for inequality of wx.RealPoint objects.
860 """
861 return _core_.RealPoint___ne__(*args, **kwargs)
862
863 def __add__(*args, **kwargs):
864 """
865 __add__(self, RealPoint pt) -> RealPoint
866
867 Add pt's proprties to this and return the result.
868 """
869 return _core_.RealPoint___add__(*args, **kwargs)
870
871 def __sub__(*args, **kwargs):
872 """
873 __sub__(self, RealPoint pt) -> RealPoint
874
875 Subtract pt's proprties from this and return the result
876 """
877 return _core_.RealPoint___sub__(*args, **kwargs)
878
879 def Set(*args, **kwargs):
880 """
881 Set(self, double x, double y)
882
883 Set both the x and y properties
884 """
885 return _core_.RealPoint_Set(*args, **kwargs)
886
887 def Get(*args, **kwargs):
888 """
889 Get() -> (x,y)
890
891 Return the x and y properties as a tuple.
892 """
893 return _core_.RealPoint_Get(*args, **kwargs)
894
895 asTuple = wx._deprecated(Get, "asTuple is deprecated, use `Get` instead")
896 def __str__(self): return str(self.Get())
897 def __repr__(self): return 'wx.RealPoint'+str(self.Get())
898 def __len__(self): return len(self.Get())
899 def __getitem__(self, index): return self.Get()[index]
900 def __setitem__(self, index, val):
901 if index == 0: self.x = val
902 elif index == 1: self.y = val
903 else: raise IndexError
904 def __nonzero__(self): return self.Get() != (0.0, 0.0)
905 __safe_for_unpickling__ = True
906 def __reduce__(self): return (wx.RealPoint, self.Get())
907
908
909 class RealPointPtr(RealPoint):
910 def __init__(self, this):
911 self.this = this
912 if not hasattr(self,"thisown"): self.thisown = 0
913 self.__class__ = RealPoint
914 _core_.RealPoint_swigregister(RealPointPtr)
915
916 #---------------------------------------------------------------------------
917
918 class Point(object):
919 """
920 A data structure for representing a point or position with integer x
921 and y properties. Most places in wxPython that expect a wx.Point can
922 also accept a (x,y) tuple.
923 """
924 def __repr__(self):
925 return "<%s.%s; proxy of C++ wxPoint instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
926 x = property(_core_.Point_x_get, _core_.Point_x_set)
927 y = property(_core_.Point_y_get, _core_.Point_y_set)
928 def __init__(self, *args, **kwargs):
929 """
930 __init__(self, int x=0, int y=0) -> Point
931
932 Create a wx.Point object
933 """
934 newobj = _core_.new_Point(*args, **kwargs)
935 self.this = newobj.this
936 self.thisown = 1
937 del newobj.thisown
938 def __del__(self, destroy=_core_.delete_Point):
939 """__del__(self)"""
940 try:
941 if self.thisown: destroy(self)
942 except: pass
943
944 def __eq__(*args, **kwargs):
945 """
946 __eq__(self, Point pt) -> bool
947
948 Test for equality of wx.Point objects.
949 """
950 return _core_.Point___eq__(*args, **kwargs)
951
952 def __ne__(*args, **kwargs):
953 """
954 __ne__(self, Point pt) -> bool
955
956 Test for inequality of wx.Point objects.
957 """
958 return _core_.Point___ne__(*args, **kwargs)
959
960 def __add__(*args, **kwargs):
961 """
962 __add__(self, Point pt) -> Point
963
964 Add pt's proprties to this and return the result.
965 """
966 return _core_.Point___add__(*args, **kwargs)
967
968 def __sub__(*args, **kwargs):
969 """
970 __sub__(self, Point pt) -> Point
971
972 Subtract pt's proprties from this and return the result
973 """
974 return _core_.Point___sub__(*args, **kwargs)
975
976 def __iadd__(*args, **kwargs):
977 """
978 __iadd__(self, Point pt) -> Point
979
980 Add pt to this object.
981 """
982 return _core_.Point___iadd__(*args, **kwargs)
983
984 def __isub__(*args, **kwargs):
985 """
986 __isub__(self, Point pt) -> Point
987
988 Subtract pt from this object.
989 """
990 return _core_.Point___isub__(*args, **kwargs)
991
992 def Set(*args, **kwargs):
993 """
994 Set(self, long x, long y)
995
996 Set both the x and y properties
997 """
998 return _core_.Point_Set(*args, **kwargs)
999
1000 def Get(*args, **kwargs):
1001 """
1002 Get() -> (x,y)
1003
1004 Return the x and y properties as a tuple.
1005 """
1006 return _core_.Point_Get(*args, **kwargs)
1007
1008 asTuple = wx._deprecated(Get, "asTuple is deprecated, use `Get` instead")
1009 def __str__(self): return str(self.Get())
1010 def __repr__(self): return 'wx.Point'+str(self.Get())
1011 def __len__(self): return len(self.Get())
1012 def __getitem__(self, index): return self.Get()[index]
1013 def __setitem__(self, index, val):
1014 if index == 0: self.x = val
1015 elif index == 1: self.y = val
1016 else: raise IndexError
1017 def __nonzero__(self): return self.Get() != (0,0)
1018 __safe_for_unpickling__ = True
1019 def __reduce__(self): return (wx.Point, self.Get())
1020
1021
1022 class PointPtr(Point):
1023 def __init__(self, this):
1024 self.this = this
1025 if not hasattr(self,"thisown"): self.thisown = 0
1026 self.__class__ = Point
1027 _core_.Point_swigregister(PointPtr)
1028
1029 #---------------------------------------------------------------------------
1030
1031 class Rect(object):
1032 """
1033 A class for representing and manipulating rectangles. It has x, y,
1034 width and height properties. In wxPython most palces that expect a
1035 wx.Rect can also accept a (x,y,width,height) tuple.
1036 """
1037 def __repr__(self):
1038 return "<%s.%s; proxy of C++ wxRect instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
1039 def __init__(self, *args, **kwargs):
1040 """
1041 __init__(self, int x=0, int y=0, int width=0, int height=0) -> Rect
1042
1043 Create a new Rect object.
1044 """
1045 newobj = _core_.new_Rect(*args, **kwargs)
1046 self.this = newobj.this
1047 self.thisown = 1
1048 del newobj.thisown
1049 def __del__(self, destroy=_core_.delete_Rect):
1050 """__del__(self)"""
1051 try:
1052 if self.thisown: destroy(self)
1053 except: pass
1054
1055 def GetX(*args, **kwargs):
1056 """GetX(self) -> int"""
1057 return _core_.Rect_GetX(*args, **kwargs)
1058
1059 def SetX(*args, **kwargs):
1060 """SetX(self, int x)"""
1061 return _core_.Rect_SetX(*args, **kwargs)
1062
1063 def GetY(*args, **kwargs):
1064 """GetY(self) -> int"""
1065 return _core_.Rect_GetY(*args, **kwargs)
1066
1067 def SetY(*args, **kwargs):
1068 """SetY(self, int y)"""
1069 return _core_.Rect_SetY(*args, **kwargs)
1070
1071 def GetWidth(*args, **kwargs):
1072 """GetWidth(self) -> int"""
1073 return _core_.Rect_GetWidth(*args, **kwargs)
1074
1075 def SetWidth(*args, **kwargs):
1076 """SetWidth(self, int w)"""
1077 return _core_.Rect_SetWidth(*args, **kwargs)
1078
1079 def GetHeight(*args, **kwargs):
1080 """GetHeight(self) -> int"""
1081 return _core_.Rect_GetHeight(*args, **kwargs)
1082
1083 def SetHeight(*args, **kwargs):
1084 """SetHeight(self, int h)"""
1085 return _core_.Rect_SetHeight(*args, **kwargs)
1086
1087 def GetPosition(*args, **kwargs):
1088 """GetPosition(self) -> Point"""
1089 return _core_.Rect_GetPosition(*args, **kwargs)
1090
1091 def SetPosition(*args, **kwargs):
1092 """SetPosition(self, Point p)"""
1093 return _core_.Rect_SetPosition(*args, **kwargs)
1094
1095 def GetSize(*args, **kwargs):
1096 """GetSize(self) -> Size"""
1097 return _core_.Rect_GetSize(*args, **kwargs)
1098
1099 def SetSize(*args, **kwargs):
1100 """SetSize(self, Size s)"""
1101 return _core_.Rect_SetSize(*args, **kwargs)
1102
1103 def GetTopLeft(*args, **kwargs):
1104 """GetTopLeft(self) -> Point"""
1105 return _core_.Rect_GetTopLeft(*args, **kwargs)
1106
1107 def SetTopLeft(*args, **kwargs):
1108 """SetTopLeft(self, Point p)"""
1109 return _core_.Rect_SetTopLeft(*args, **kwargs)
1110
1111 def GetBottomRight(*args, **kwargs):
1112 """GetBottomRight(self) -> Point"""
1113 return _core_.Rect_GetBottomRight(*args, **kwargs)
1114
1115 def SetBottomRight(*args, **kwargs):
1116 """SetBottomRight(self, Point p)"""
1117 return _core_.Rect_SetBottomRight(*args, **kwargs)
1118
1119 def GetLeft(*args, **kwargs):
1120 """GetLeft(self) -> int"""
1121 return _core_.Rect_GetLeft(*args, **kwargs)
1122
1123 def GetTop(*args, **kwargs):
1124 """GetTop(self) -> int"""
1125 return _core_.Rect_GetTop(*args, **kwargs)
1126
1127 def GetBottom(*args, **kwargs):
1128 """GetBottom(self) -> int"""
1129 return _core_.Rect_GetBottom(*args, **kwargs)
1130
1131 def GetRight(*args, **kwargs):
1132 """GetRight(self) -> int"""
1133 return _core_.Rect_GetRight(*args, **kwargs)
1134
1135 def SetLeft(*args, **kwargs):
1136 """SetLeft(self, int left)"""
1137 return _core_.Rect_SetLeft(*args, **kwargs)
1138
1139 def SetRight(*args, **kwargs):
1140 """SetRight(self, int right)"""
1141 return _core_.Rect_SetRight(*args, **kwargs)
1142
1143 def SetTop(*args, **kwargs):
1144 """SetTop(self, int top)"""
1145 return _core_.Rect_SetTop(*args, **kwargs)
1146
1147 def SetBottom(*args, **kwargs):
1148 """SetBottom(self, int bottom)"""
1149 return _core_.Rect_SetBottom(*args, **kwargs)
1150
1151 position = property(GetPosition, SetPosition)
1152 size = property(GetSize, SetSize)
1153 left = property(GetLeft, SetLeft)
1154 right = property(GetRight, SetRight)
1155 top = property(GetTop, SetTop)
1156 bottom = property(GetBottom, SetBottom)
1157
1158 def Inflate(*args, **kwargs):
1159 """
1160 Inflate(self, int dx, int dy) -> Rect
1161
1162 Increase the rectangle size by dx in x direction and dy in y
1163 direction. Both (or one of) parameters may be negative to decrease the
1164 rectangle size.
1165 """
1166 return _core_.Rect_Inflate(*args, **kwargs)
1167
1168 def Deflate(*args, **kwargs):
1169 """
1170 Deflate(self, int dx, int dy) -> Rect
1171
1172 Decrease the rectangle size by dx in x direction and dy in y
1173 direction. Both (or one of) parameters may be negative to increase the
1174 rectngle size. This method is the opposite of Inflate.
1175 """
1176 return _core_.Rect_Deflate(*args, **kwargs)
1177
1178 def OffsetXY(*args, **kwargs):
1179 """
1180 OffsetXY(self, int dx, int dy)
1181
1182 Moves the rectangle by the specified offset. If dx is positive, the
1183 rectangle is moved to the right, if dy is positive, it is moved to the
1184 bottom, otherwise it is moved to the left or top respectively.
1185 """
1186 return _core_.Rect_OffsetXY(*args, **kwargs)
1187
1188 def Offset(*args, **kwargs):
1189 """
1190 Offset(self, Point pt)
1191
1192 Same as OffsetXY but uses dx,dy from Point
1193 """
1194 return _core_.Rect_Offset(*args, **kwargs)
1195
1196 def Intersect(*args, **kwargs):
1197 """
1198 Intersect(self, Rect rect) -> Rect
1199
1200 Returns the intersectsion of this rectangle and rect.
1201 """
1202 return _core_.Rect_Intersect(*args, **kwargs)
1203
1204 def Union(*args, **kwargs):
1205 """
1206 Union(self, Rect rect) -> Rect
1207
1208 Returns the union of this rectangle and rect.
1209 """
1210 return _core_.Rect_Union(*args, **kwargs)
1211
1212 def __add__(*args, **kwargs):
1213 """
1214 __add__(self, Rect rect) -> Rect
1215
1216 Add the properties of rect to this rectangle and return the result.
1217 """
1218 return _core_.Rect___add__(*args, **kwargs)
1219
1220 def __iadd__(*args, **kwargs):
1221 """
1222 __iadd__(self, Rect rect) -> Rect
1223
1224 Add the properties of rect to this rectangle, updating this rectangle.
1225 """
1226 return _core_.Rect___iadd__(*args, **kwargs)
1227
1228 def __eq__(*args, **kwargs):
1229 """
1230 __eq__(self, Rect rect) -> bool
1231
1232 Test for equality.
1233 """
1234 return _core_.Rect___eq__(*args, **kwargs)
1235
1236 def __ne__(*args, **kwargs):
1237 """
1238 __ne__(self, Rect rect) -> bool
1239
1240 Test for inequality.
1241 """
1242 return _core_.Rect___ne__(*args, **kwargs)
1243
1244 def InsideXY(*args, **kwargs):
1245 """
1246 InsideXY(self, int x, int y) -> bool
1247
1248 Return True if the point is (not strcitly) inside the rect.
1249 """
1250 return _core_.Rect_InsideXY(*args, **kwargs)
1251
1252 def Inside(*args, **kwargs):
1253 """
1254 Inside(self, Point pt) -> bool
1255
1256 Return True if the point is (not strcitly) inside the rect.
1257 """
1258 return _core_.Rect_Inside(*args, **kwargs)
1259
1260 def Intersects(*args, **kwargs):
1261 """
1262 Intersects(self, Rect rect) -> bool
1263
1264 Returns True if the rectangles have a non empty intersection.
1265 """
1266 return _core_.Rect_Intersects(*args, **kwargs)
1267
1268 x = property(_core_.Rect_x_get, _core_.Rect_x_set)
1269 y = property(_core_.Rect_y_get, _core_.Rect_y_set)
1270 width = property(_core_.Rect_width_get, _core_.Rect_width_set)
1271 height = property(_core_.Rect_height_get, _core_.Rect_height_set)
1272 def Set(*args, **kwargs):
1273 """
1274 Set(self, int x=0, int y=0, int width=0, int height=0)
1275
1276 Set all rectangle properties.
1277 """
1278 return _core_.Rect_Set(*args, **kwargs)
1279
1280 def Get(*args, **kwargs):
1281 """
1282 Get() -> (x,y,width,height)
1283
1284 Return the rectangle properties as a tuple.
1285 """
1286 return _core_.Rect_Get(*args, **kwargs)
1287
1288 asTuple = wx._deprecated(Get, "asTuple is deprecated, use `Get` instead")
1289 def __str__(self): return str(self.Get())
1290 def __repr__(self): return 'wx.Rect'+str(self.Get())
1291 def __len__(self): return len(self.Get())
1292 def __getitem__(self, index): return self.Get()[index]
1293 def __setitem__(self, index, val):
1294 if index == 0: self.x = val
1295 elif index == 1: self.y = val
1296 elif index == 2: self.width = val
1297 elif index == 3: self.height = val
1298 else: raise IndexError
1299 def __nonzero__(self): return self.Get() != (0,0,0,0)
1300 __safe_for_unpickling__ = True
1301 def __reduce__(self): return (wx.Rect, self.Get())
1302
1303
1304 class RectPtr(Rect):
1305 def __init__(self, this):
1306 self.this = this
1307 if not hasattr(self,"thisown"): self.thisown = 0
1308 self.__class__ = Rect
1309 _core_.Rect_swigregister(RectPtr)
1310
1311 def RectPP(*args, **kwargs):
1312 """
1313 RectPP(Point topLeft, Point bottomRight) -> Rect
1314
1315 Create a new Rect object from Points representing two corners.
1316 """
1317 val = _core_.new_RectPP(*args, **kwargs)
1318 val.thisown = 1
1319 return val
1320
1321 def RectPS(*args, **kwargs):
1322 """
1323 RectPS(Point pos, Size size) -> Rect
1324
1325 Create a new Rect from a position and size.
1326 """
1327 val = _core_.new_RectPS(*args, **kwargs)
1328 val.thisown = 1
1329 return val
1330
1331 def RectS(*args, **kwargs):
1332 """
1333 RectS(Size size) -> Rect
1334
1335 Create a new Rect from a size only.
1336 """
1337 val = _core_.new_RectS(*args, **kwargs)
1338 val.thisown = 1
1339 return val
1340
1341
1342 def IntersectRect(*args, **kwargs):
1343 """
1344 IntersectRect(Rect r1, Rect r2) -> Rect
1345
1346 Calculate and return the intersection of r1 and r2.
1347 """
1348 return _core_.IntersectRect(*args, **kwargs)
1349 #---------------------------------------------------------------------------
1350
1351 class Point2D(object):
1352 """
1353 wx.Point2Ds represent a point or a vector in a 2d coordinate system
1354 with floating point values.
1355 """
1356 def __repr__(self):
1357 return "<%s.%s; proxy of C++ wxPoint2D instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
1358 def __init__(self, *args, **kwargs):
1359 """
1360 __init__(self, double x=0.0, double y=0.0) -> Point2D
1361
1362 Create a w.Point2D object.
1363 """
1364 newobj = _core_.new_Point2D(*args, **kwargs)
1365 self.this = newobj.this
1366 self.thisown = 1
1367 del newobj.thisown
1368 def GetFloor(*args, **kwargs):
1369 """
1370 GetFloor() -> (x,y)
1371
1372 Convert to integer
1373 """
1374 return _core_.Point2D_GetFloor(*args, **kwargs)
1375
1376 def GetRounded(*args, **kwargs):
1377 """
1378 GetRounded() -> (x,y)
1379
1380 Convert to integer
1381 """
1382 return _core_.Point2D_GetRounded(*args, **kwargs)
1383
1384 def GetVectorLength(*args, **kwargs):
1385 """GetVectorLength(self) -> double"""
1386 return _core_.Point2D_GetVectorLength(*args, **kwargs)
1387
1388 def GetVectorAngle(*args, **kwargs):
1389 """GetVectorAngle(self) -> double"""
1390 return _core_.Point2D_GetVectorAngle(*args, **kwargs)
1391
1392 def SetVectorLength(*args, **kwargs):
1393 """SetVectorLength(self, double length)"""
1394 return _core_.Point2D_SetVectorLength(*args, **kwargs)
1395
1396 def SetVectorAngle(*args, **kwargs):
1397 """SetVectorAngle(self, double degrees)"""
1398 return _core_.Point2D_SetVectorAngle(*args, **kwargs)
1399
1400 def SetPolarCoordinates(self, angle, length):
1401 self.SetVectorLength(length)
1402 self.SetVectorAngle(angle)
1403 def Normalize(self):
1404 self.SetVectorLength(1.0)
1405
1406 def GetDistance(*args, **kwargs):
1407 """GetDistance(self, Point2D pt) -> double"""
1408 return _core_.Point2D_GetDistance(*args, **kwargs)
1409
1410 def GetDistanceSquare(*args, **kwargs):
1411 """GetDistanceSquare(self, Point2D pt) -> double"""
1412 return _core_.Point2D_GetDistanceSquare(*args, **kwargs)
1413
1414 def GetDotProduct(*args, **kwargs):
1415 """GetDotProduct(self, Point2D vec) -> double"""
1416 return _core_.Point2D_GetDotProduct(*args, **kwargs)
1417
1418 def GetCrossProduct(*args, **kwargs):
1419 """GetCrossProduct(self, Point2D vec) -> double"""
1420 return _core_.Point2D_GetCrossProduct(*args, **kwargs)
1421
1422 def __neg__(*args, **kwargs):
1423 """
1424 __neg__(self) -> Point2D
1425
1426 the reflection of this point
1427 """
1428 return _core_.Point2D___neg__(*args, **kwargs)
1429
1430 def __iadd__(*args, **kwargs):
1431 """__iadd__(self, Point2D pt) -> Point2D"""
1432 return _core_.Point2D___iadd__(*args, **kwargs)
1433
1434 def __isub__(*args, **kwargs):
1435 """__isub__(self, Point2D pt) -> Point2D"""
1436 return _core_.Point2D___isub__(*args, **kwargs)
1437
1438 def __imul__(*args, **kwargs):
1439 """__imul__(self, Point2D pt) -> Point2D"""
1440 return _core_.Point2D___imul__(*args, **kwargs)
1441
1442 def __idiv__(*args, **kwargs):
1443 """__idiv__(self, Point2D pt) -> Point2D"""
1444 return _core_.Point2D___idiv__(*args, **kwargs)
1445
1446 def __eq__(*args, **kwargs):
1447 """
1448 __eq__(self, Point2D pt) -> bool
1449
1450 Test for equality
1451 """
1452 return _core_.Point2D___eq__(*args, **kwargs)
1453
1454 def __ne__(*args, **kwargs):
1455 """
1456 __ne__(self, Point2D pt) -> bool
1457
1458 Test for inequality
1459 """
1460 return _core_.Point2D___ne__(*args, **kwargs)
1461
1462 x = property(_core_.Point2D_x_get, _core_.Point2D_x_set)
1463 y = property(_core_.Point2D_y_get, _core_.Point2D_y_set)
1464 def Set(*args, **kwargs):
1465 """Set(self, double x=0, double y=0)"""
1466 return _core_.Point2D_Set(*args, **kwargs)
1467
1468 def Get(*args, **kwargs):
1469 """
1470 Get() -> (x,y)
1471
1472 Return x and y properties as a tuple.
1473 """
1474 return _core_.Point2D_Get(*args, **kwargs)
1475
1476 asTuple = wx._deprecated(Get, "asTuple is deprecated, use `Get` instead")
1477 def __str__(self): return str(self.Get())
1478 def __repr__(self): return 'wx.Point2D'+str(self.Get())
1479 def __len__(self): return len(self.Get())
1480 def __getitem__(self, index): return self.Get()[index]
1481 def __setitem__(self, index, val):
1482 if index == 0: self.x = val
1483 elif index == 1: self.y = val
1484 else: raise IndexError
1485 def __nonzero__(self): return self.Get() != (0.0, 0.0)
1486 __safe_for_unpickling__ = True
1487 def __reduce__(self): return (wx.Point2D, self.Get())
1488
1489
1490 class Point2DPtr(Point2D):
1491 def __init__(self, this):
1492 self.this = this
1493 if not hasattr(self,"thisown"): self.thisown = 0
1494 self.__class__ = Point2D
1495 _core_.Point2D_swigregister(Point2DPtr)
1496
1497 def Point2DCopy(*args, **kwargs):
1498 """
1499 Point2DCopy(Point2D pt) -> Point2D
1500
1501 Create a w.Point2D object.
1502 """
1503 val = _core_.new_Point2DCopy(*args, **kwargs)
1504 val.thisown = 1
1505 return val
1506
1507 def Point2DFromPoint(*args, **kwargs):
1508 """
1509 Point2DFromPoint(Point pt) -> Point2D
1510
1511 Create a w.Point2D object.
1512 """
1513 val = _core_.new_Point2DFromPoint(*args, **kwargs)
1514 val.thisown = 1
1515 return val
1516
1517 #---------------------------------------------------------------------------
1518
1519 FromStart = _core_.FromStart
1520 FromCurrent = _core_.FromCurrent
1521 FromEnd = _core_.FromEnd
1522 class InputStream(object):
1523 def __repr__(self):
1524 return "<%s.%s; proxy of C++ wxPyInputStream instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
1525 def __init__(self, *args, **kwargs):
1526 """__init__(self, PyObject p) -> InputStream"""
1527 newobj = _core_.new_InputStream(*args, **kwargs)
1528 self.this = newobj.this
1529 self.thisown = 1
1530 del newobj.thisown
1531 def __del__(self, destroy=_core_.delete_InputStream):
1532 """__del__(self)"""
1533 try:
1534 if self.thisown: destroy(self)
1535 except: pass
1536
1537 def close(*args, **kwargs):
1538 """close(self)"""
1539 return _core_.InputStream_close(*args, **kwargs)
1540
1541 def flush(*args, **kwargs):
1542 """flush(self)"""
1543 return _core_.InputStream_flush(*args, **kwargs)
1544
1545 def eof(*args, **kwargs):
1546 """eof(self) -> bool"""
1547 return _core_.InputStream_eof(*args, **kwargs)
1548
1549 def read(*args, **kwargs):
1550 """read(self, int size=-1) -> PyObject"""
1551 return _core_.InputStream_read(*args, **kwargs)
1552
1553 def readline(*args, **kwargs):
1554 """readline(self, int size=-1) -> PyObject"""
1555 return _core_.InputStream_readline(*args, **kwargs)
1556
1557 def readlines(*args, **kwargs):
1558 """readlines(self, int sizehint=-1) -> PyObject"""
1559 return _core_.InputStream_readlines(*args, **kwargs)
1560
1561 def seek(*args, **kwargs):
1562 """seek(self, int offset, int whence=0)"""
1563 return _core_.InputStream_seek(*args, **kwargs)
1564
1565 def tell(*args, **kwargs):
1566 """tell(self) -> int"""
1567 return _core_.InputStream_tell(*args, **kwargs)
1568
1569 def Peek(*args, **kwargs):
1570 """Peek(self) -> char"""
1571 return _core_.InputStream_Peek(*args, **kwargs)
1572
1573 def GetC(*args, **kwargs):
1574 """GetC(self) -> char"""
1575 return _core_.InputStream_GetC(*args, **kwargs)
1576
1577 def LastRead(*args, **kwargs):
1578 """LastRead(self) -> size_t"""
1579 return _core_.InputStream_LastRead(*args, **kwargs)
1580
1581 def CanRead(*args, **kwargs):
1582 """CanRead(self) -> bool"""
1583 return _core_.InputStream_CanRead(*args, **kwargs)
1584
1585 def Eof(*args, **kwargs):
1586 """Eof(self) -> bool"""
1587 return _core_.InputStream_Eof(*args, **kwargs)
1588
1589 def Ungetch(*args, **kwargs):
1590 """Ungetch(self, char c) -> bool"""
1591 return _core_.InputStream_Ungetch(*args, **kwargs)
1592
1593 def SeekI(*args, **kwargs):
1594 """SeekI(self, long pos, int mode=FromStart) -> long"""
1595 return _core_.InputStream_SeekI(*args, **kwargs)
1596
1597 def TellI(*args, **kwargs):
1598 """TellI(self) -> long"""
1599 return _core_.InputStream_TellI(*args, **kwargs)
1600
1601
1602 class InputStreamPtr(InputStream):
1603 def __init__(self, this):
1604 self.this = this
1605 if not hasattr(self,"thisown"): self.thisown = 0
1606 self.__class__ = InputStream
1607 _core_.InputStream_swigregister(InputStreamPtr)
1608 DefaultPosition = cvar.DefaultPosition
1609 DefaultSize = cvar.DefaultSize
1610
1611 class OutputStream(object):
1612 def __init__(self): raise RuntimeError, "No constructor defined"
1613 def __repr__(self):
1614 return "<%s.%s; proxy of C++ wxOutputStream instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
1615 def write(*args, **kwargs):
1616 """write(self, PyObject obj)"""
1617 return _core_.OutputStream_write(*args, **kwargs)
1618
1619
1620 class OutputStreamPtr(OutputStream):
1621 def __init__(self, this):
1622 self.this = this
1623 if not hasattr(self,"thisown"): self.thisown = 0
1624 self.__class__ = OutputStream
1625 _core_.OutputStream_swigregister(OutputStreamPtr)
1626
1627 #---------------------------------------------------------------------------
1628
1629 class FSFile(Object):
1630 def __repr__(self):
1631 return "<%s.%s; proxy of C++ wxFSFile instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
1632 def __init__(self, *args, **kwargs):
1633 """
1634 __init__(self, InputStream stream, String loc, String mimetype, String anchor,
1635 DateTime modif) -> FSFile
1636 """
1637 newobj = _core_.new_FSFile(*args, **kwargs)
1638 self.this = newobj.this
1639 self.thisown = 1
1640 del newobj.thisown
1641 self.thisown = 0 # It will normally be deleted by the user of the wxFileSystem
1642
1643 def __del__(self, destroy=_core_.delete_FSFile):
1644 """__del__(self)"""
1645 try:
1646 if self.thisown: destroy(self)
1647 except: pass
1648
1649 def GetStream(*args, **kwargs):
1650 """GetStream(self) -> InputStream"""
1651 return _core_.FSFile_GetStream(*args, **kwargs)
1652
1653 def GetMimeType(*args, **kwargs):
1654 """GetMimeType(self) -> String"""
1655 return _core_.FSFile_GetMimeType(*args, **kwargs)
1656
1657 def GetLocation(*args, **kwargs):
1658 """GetLocation(self) -> String"""
1659 return _core_.FSFile_GetLocation(*args, **kwargs)
1660
1661 def GetAnchor(*args, **kwargs):
1662 """GetAnchor(self) -> String"""
1663 return _core_.FSFile_GetAnchor(*args, **kwargs)
1664
1665 def GetModificationTime(*args, **kwargs):
1666 """GetModificationTime(self) -> DateTime"""
1667 return _core_.FSFile_GetModificationTime(*args, **kwargs)
1668
1669
1670 class FSFilePtr(FSFile):
1671 def __init__(self, this):
1672 self.this = this
1673 if not hasattr(self,"thisown"): self.thisown = 0
1674 self.__class__ = FSFile
1675 _core_.FSFile_swigregister(FSFilePtr)
1676
1677 class CPPFileSystemHandler(object):
1678 def __init__(self): raise RuntimeError, "No constructor defined"
1679 def __repr__(self):
1680 return "<%s.%s; proxy of C++ wxFileSystemHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
1681
1682 class CPPFileSystemHandlerPtr(CPPFileSystemHandler):
1683 def __init__(self, this):
1684 self.this = this
1685 if not hasattr(self,"thisown"): self.thisown = 0
1686 self.__class__ = CPPFileSystemHandler
1687 _core_.CPPFileSystemHandler_swigregister(CPPFileSystemHandlerPtr)
1688
1689 class FileSystemHandler(CPPFileSystemHandler):
1690 def __repr__(self):
1691 return "<%s.%s; proxy of C++ wxPyFileSystemHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
1692 def __init__(self, *args, **kwargs):
1693 """__init__(self) -> FileSystemHandler"""
1694 newobj = _core_.new_FileSystemHandler(*args, **kwargs)
1695 self.this = newobj.this
1696 self.thisown = 1
1697 del newobj.thisown
1698 self._setCallbackInfo(self, FileSystemHandler)
1699
1700 def _setCallbackInfo(*args, **kwargs):
1701 """_setCallbackInfo(self, PyObject self, PyObject _class)"""
1702 return _core_.FileSystemHandler__setCallbackInfo(*args, **kwargs)
1703
1704 def CanOpen(*args, **kwargs):
1705 """CanOpen(self, String location) -> bool"""
1706 return _core_.FileSystemHandler_CanOpen(*args, **kwargs)
1707
1708 def OpenFile(*args, **kwargs):
1709 """OpenFile(self, FileSystem fs, String location) -> FSFile"""
1710 return _core_.FileSystemHandler_OpenFile(*args, **kwargs)
1711
1712 def FindFirst(*args, **kwargs):
1713 """FindFirst(self, String spec, int flags=0) -> String"""
1714 return _core_.FileSystemHandler_FindFirst(*args, **kwargs)
1715
1716 def FindNext(*args, **kwargs):
1717 """FindNext(self) -> String"""
1718 return _core_.FileSystemHandler_FindNext(*args, **kwargs)
1719
1720 def GetProtocol(*args, **kwargs):
1721 """GetProtocol(self, String location) -> String"""
1722 return _core_.FileSystemHandler_GetProtocol(*args, **kwargs)
1723
1724 def GetLeftLocation(*args, **kwargs):
1725 """GetLeftLocation(self, String location) -> String"""
1726 return _core_.FileSystemHandler_GetLeftLocation(*args, **kwargs)
1727
1728 def GetAnchor(*args, **kwargs):
1729 """GetAnchor(self, String location) -> String"""
1730 return _core_.FileSystemHandler_GetAnchor(*args, **kwargs)
1731
1732 def GetRightLocation(*args, **kwargs):
1733 """GetRightLocation(self, String location) -> String"""
1734 return _core_.FileSystemHandler_GetRightLocation(*args, **kwargs)
1735
1736 def GetMimeTypeFromExt(*args, **kwargs):
1737 """GetMimeTypeFromExt(self, String location) -> String"""
1738 return _core_.FileSystemHandler_GetMimeTypeFromExt(*args, **kwargs)
1739
1740
1741 class FileSystemHandlerPtr(FileSystemHandler):
1742 def __init__(self, this):
1743 self.this = this
1744 if not hasattr(self,"thisown"): self.thisown = 0
1745 self.__class__ = FileSystemHandler
1746 _core_.FileSystemHandler_swigregister(FileSystemHandlerPtr)
1747
1748 class FileSystem(Object):
1749 def __repr__(self):
1750 return "<%s.%s; proxy of C++ wxFileSystem instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
1751 def __init__(self, *args, **kwargs):
1752 """__init__(self) -> FileSystem"""
1753 newobj = _core_.new_FileSystem(*args, **kwargs)
1754 self.this = newobj.this
1755 self.thisown = 1
1756 del newobj.thisown
1757 def __del__(self, destroy=_core_.delete_FileSystem):
1758 """__del__(self)"""
1759 try:
1760 if self.thisown: destroy(self)
1761 except: pass
1762
1763 def ChangePathTo(*args, **kwargs):
1764 """ChangePathTo(self, String location, bool is_dir=False)"""
1765 return _core_.FileSystem_ChangePathTo(*args, **kwargs)
1766
1767 def GetPath(*args, **kwargs):
1768 """GetPath(self) -> String"""
1769 return _core_.FileSystem_GetPath(*args, **kwargs)
1770
1771 def OpenFile(*args, **kwargs):
1772 """OpenFile(self, String location) -> FSFile"""
1773 return _core_.FileSystem_OpenFile(*args, **kwargs)
1774
1775 def FindFirst(*args, **kwargs):
1776 """FindFirst(self, String spec, int flags=0) -> String"""
1777 return _core_.FileSystem_FindFirst(*args, **kwargs)
1778
1779 def FindNext(*args, **kwargs):
1780 """FindNext(self) -> String"""
1781 return _core_.FileSystem_FindNext(*args, **kwargs)
1782
1783 def AddHandler(*args, **kwargs):
1784 """AddHandler(CPPFileSystemHandler handler)"""
1785 return _core_.FileSystem_AddHandler(*args, **kwargs)
1786
1787 AddHandler = staticmethod(AddHandler)
1788 def CleanUpHandlers(*args, **kwargs):
1789 """CleanUpHandlers()"""
1790 return _core_.FileSystem_CleanUpHandlers(*args, **kwargs)
1791
1792 CleanUpHandlers = staticmethod(CleanUpHandlers)
1793 def FileNameToURL(*args, **kwargs):
1794 """FileNameToURL(String filename) -> String"""
1795 return _core_.FileSystem_FileNameToURL(*args, **kwargs)
1796
1797 FileNameToURL = staticmethod(FileNameToURL)
1798 def URLToFileName(*args, **kwargs):
1799 """URLToFileName(String url) -> String"""
1800 return _core_.FileSystem_URLToFileName(*args, **kwargs)
1801
1802 URLToFileName = staticmethod(URLToFileName)
1803
1804 class FileSystemPtr(FileSystem):
1805 def __init__(self, this):
1806 self.this = this
1807 if not hasattr(self,"thisown"): self.thisown = 0
1808 self.__class__ = FileSystem
1809 _core_.FileSystem_swigregister(FileSystemPtr)
1810
1811 def FileSystem_AddHandler(*args, **kwargs):
1812 """FileSystem_AddHandler(CPPFileSystemHandler handler)"""
1813 return _core_.FileSystem_AddHandler(*args, **kwargs)
1814
1815 def FileSystem_CleanUpHandlers(*args, **kwargs):
1816 """FileSystem_CleanUpHandlers()"""
1817 return _core_.FileSystem_CleanUpHandlers(*args, **kwargs)
1818
1819 def FileSystem_FileNameToURL(*args, **kwargs):
1820 """FileSystem_FileNameToURL(String filename) -> String"""
1821 return _core_.FileSystem_FileNameToURL(*args, **kwargs)
1822
1823 def FileSystem_URLToFileName(*args, **kwargs):
1824 """FileSystem_URLToFileName(String url) -> String"""
1825 return _core_.FileSystem_URLToFileName(*args, **kwargs)
1826
1827 class InternetFSHandler(CPPFileSystemHandler):
1828 def __repr__(self):
1829 return "<%s.%s; proxy of C++ wxInternetFSHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
1830 def __init__(self, *args, **kwargs):
1831 """__init__(self) -> InternetFSHandler"""
1832 newobj = _core_.new_InternetFSHandler(*args, **kwargs)
1833 self.this = newobj.this
1834 self.thisown = 1
1835 del newobj.thisown
1836 def CanOpen(*args, **kwargs):
1837 """CanOpen(self, String location) -> bool"""
1838 return _core_.InternetFSHandler_CanOpen(*args, **kwargs)
1839
1840 def OpenFile(*args, **kwargs):
1841 """OpenFile(self, FileSystem fs, String location) -> FSFile"""
1842 return _core_.InternetFSHandler_OpenFile(*args, **kwargs)
1843
1844
1845 class InternetFSHandlerPtr(InternetFSHandler):
1846 def __init__(self, this):
1847 self.this = this
1848 if not hasattr(self,"thisown"): self.thisown = 0
1849 self.__class__ = InternetFSHandler
1850 _core_.InternetFSHandler_swigregister(InternetFSHandlerPtr)
1851
1852 class ZipFSHandler(CPPFileSystemHandler):
1853 def __repr__(self):
1854 return "<%s.%s; proxy of C++ wxZipFSHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
1855 def __init__(self, *args, **kwargs):
1856 """__init__(self) -> ZipFSHandler"""
1857 newobj = _core_.new_ZipFSHandler(*args, **kwargs)
1858 self.this = newobj.this
1859 self.thisown = 1
1860 del newobj.thisown
1861 def CanOpen(*args, **kwargs):
1862 """CanOpen(self, String location) -> bool"""
1863 return _core_.ZipFSHandler_CanOpen(*args, **kwargs)
1864
1865 def OpenFile(*args, **kwargs):
1866 """OpenFile(self, FileSystem fs, String location) -> FSFile"""
1867 return _core_.ZipFSHandler_OpenFile(*args, **kwargs)
1868
1869 def FindFirst(*args, **kwargs):
1870 """FindFirst(self, String spec, int flags=0) -> String"""
1871 return _core_.ZipFSHandler_FindFirst(*args, **kwargs)
1872
1873 def FindNext(*args, **kwargs):
1874 """FindNext(self) -> String"""
1875 return _core_.ZipFSHandler_FindNext(*args, **kwargs)
1876
1877
1878 class ZipFSHandlerPtr(ZipFSHandler):
1879 def __init__(self, this):
1880 self.this = this
1881 if not hasattr(self,"thisown"): self.thisown = 0
1882 self.__class__ = ZipFSHandler
1883 _core_.ZipFSHandler_swigregister(ZipFSHandlerPtr)
1884
1885
1886 def __wxMemoryFSHandler_AddFile_wxImage(*args, **kwargs):
1887 """__wxMemoryFSHandler_AddFile_wxImage(String filename, Image image, long type)"""
1888 return _core_.__wxMemoryFSHandler_AddFile_wxImage(*args, **kwargs)
1889
1890 def __wxMemoryFSHandler_AddFile_wxBitmap(*args, **kwargs):
1891 """__wxMemoryFSHandler_AddFile_wxBitmap(String filename, Bitmap bitmap, long type)"""
1892 return _core_.__wxMemoryFSHandler_AddFile_wxBitmap(*args, **kwargs)
1893
1894 def __wxMemoryFSHandler_AddFile_Data(*args, **kwargs):
1895 """__wxMemoryFSHandler_AddFile_Data(String filename, PyObject data)"""
1896 return _core_.__wxMemoryFSHandler_AddFile_Data(*args, **kwargs)
1897 def MemoryFSHandler_AddFile(filename, dataItem, imgType=-1):
1898 """
1899 Add 'file' to the memory filesystem. The dataItem parameter can
1900 either be a `wx.Bitmap`, `wx.Image` or a string that can contain
1901 arbitrary data. If a bitmap or image is used then the imgType
1902 parameter should specify what kind of image file it should be
1903 written as, wx.BITMAP_TYPE_PNG, etc.
1904 """
1905 if isinstance(dataItem, wx.Image):
1906 __wxMemoryFSHandler_AddFile_wxImage(filename, dataItem, imgType)
1907 elif isinstance(dataItem, wx.Bitmap):
1908 __wxMemoryFSHandler_AddFile_wxBitmap(filename, dataItem, imgType)
1909 elif type(dataItem) == str:
1910 __wxMemoryFSHandler_AddFile_Data(filename, dataItem)
1911 else:
1912 raise TypeError, 'wx.Image, wx.Bitmap or string expected'
1913
1914 class MemoryFSHandler(CPPFileSystemHandler):
1915 def __repr__(self):
1916 return "<%s.%s; proxy of C++ wxMemoryFSHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
1917 def __init__(self, *args, **kwargs):
1918 """__init__(self) -> MemoryFSHandler"""
1919 newobj = _core_.new_MemoryFSHandler(*args, **kwargs)
1920 self.this = newobj.this
1921 self.thisown = 1
1922 del newobj.thisown
1923 def RemoveFile(*args, **kwargs):
1924 """RemoveFile(String filename)"""
1925 return _core_.MemoryFSHandler_RemoveFile(*args, **kwargs)
1926
1927 RemoveFile = staticmethod(RemoveFile)
1928 AddFile = staticmethod(MemoryFSHandler_AddFile)
1929 def CanOpen(*args, **kwargs):
1930 """CanOpen(self, String location) -> bool"""
1931 return _core_.MemoryFSHandler_CanOpen(*args, **kwargs)
1932
1933 def OpenFile(*args, **kwargs):
1934 """OpenFile(self, FileSystem fs, String location) -> FSFile"""
1935 return _core_.MemoryFSHandler_OpenFile(*args, **kwargs)
1936
1937 def FindFirst(*args, **kwargs):
1938 """FindFirst(self, String spec, int flags=0) -> String"""
1939 return _core_.MemoryFSHandler_FindFirst(*args, **kwargs)
1940
1941 def FindNext(*args, **kwargs):
1942 """FindNext(self) -> String"""
1943 return _core_.MemoryFSHandler_FindNext(*args, **kwargs)
1944
1945
1946 class MemoryFSHandlerPtr(MemoryFSHandler):
1947 def __init__(self, this):
1948 self.this = this
1949 if not hasattr(self,"thisown"): self.thisown = 0
1950 self.__class__ = MemoryFSHandler
1951 _core_.MemoryFSHandler_swigregister(MemoryFSHandlerPtr)
1952
1953 def MemoryFSHandler_RemoveFile(*args, **kwargs):
1954 """MemoryFSHandler_RemoveFile(String filename)"""
1955 return _core_.MemoryFSHandler_RemoveFile(*args, **kwargs)
1956
1957 #---------------------------------------------------------------------------
1958
1959 class ImageHandler(Object):
1960 def __init__(self): raise RuntimeError, "No constructor defined"
1961 def __repr__(self):
1962 return "<%s.%s; proxy of C++ wxImageHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
1963 def GetName(*args, **kwargs):
1964 """GetName(self) -> String"""
1965 return _core_.ImageHandler_GetName(*args, **kwargs)
1966
1967 def GetExtension(*args, **kwargs):
1968 """GetExtension(self) -> String"""
1969 return _core_.ImageHandler_GetExtension(*args, **kwargs)
1970
1971 def GetType(*args, **kwargs):
1972 """GetType(self) -> long"""
1973 return _core_.ImageHandler_GetType(*args, **kwargs)
1974
1975 def GetMimeType(*args, **kwargs):
1976 """GetMimeType(self) -> String"""
1977 return _core_.ImageHandler_GetMimeType(*args, **kwargs)
1978
1979 def CanRead(*args, **kwargs):
1980 """CanRead(self, String name) -> bool"""
1981 return _core_.ImageHandler_CanRead(*args, **kwargs)
1982
1983 def SetName(*args, **kwargs):
1984 """SetName(self, String name)"""
1985 return _core_.ImageHandler_SetName(*args, **kwargs)
1986
1987 def SetExtension(*args, **kwargs):
1988 """SetExtension(self, String extension)"""
1989 return _core_.ImageHandler_SetExtension(*args, **kwargs)
1990
1991 def SetType(*args, **kwargs):
1992 """SetType(self, long type)"""
1993 return _core_.ImageHandler_SetType(*args, **kwargs)
1994
1995 def SetMimeType(*args, **kwargs):
1996 """SetMimeType(self, String mimetype)"""
1997 return _core_.ImageHandler_SetMimeType(*args, **kwargs)
1998
1999
2000 class ImageHandlerPtr(ImageHandler):
2001 def __init__(self, this):
2002 self.this = this
2003 if not hasattr(self,"thisown"): self.thisown = 0
2004 self.__class__ = ImageHandler
2005 _core_.ImageHandler_swigregister(ImageHandlerPtr)
2006
2007 class ImageHistogram(object):
2008 def __repr__(self):
2009 return "<%s.%s; proxy of C++ wxImageHistogram instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
2010 def __init__(self, *args, **kwargs):
2011 """__init__(self) -> ImageHistogram"""
2012 newobj = _core_.new_ImageHistogram(*args, **kwargs)
2013 self.this = newobj.this
2014 self.thisown = 1
2015 del newobj.thisown
2016 def MakeKey(*args, **kwargs):
2017 """
2018 MakeKey(unsigned char r, unsigned char g, unsigned char b) -> unsigned long
2019
2020 Get the key in the histogram for the given RGB values
2021 """
2022 return _core_.ImageHistogram_MakeKey(*args, **kwargs)
2023
2024 MakeKey = staticmethod(MakeKey)
2025 def FindFirstUnusedColour(*args, **kwargs):
2026 """
2027 FindFirstUnusedColour(int startR=1, int startG=0, int startB=0) -> (success, r, g, b)
2028
2029 Find first colour that is not used in the image and has higher RGB
2030 values than startR, startG, startB. Returns a tuple consisting of a
2031 success flag and rgb values.
2032 """
2033 return _core_.ImageHistogram_FindFirstUnusedColour(*args, **kwargs)
2034
2035
2036 class ImageHistogramPtr(ImageHistogram):
2037 def __init__(self, this):
2038 self.this = this
2039 if not hasattr(self,"thisown"): self.thisown = 0
2040 self.__class__ = ImageHistogram
2041 _core_.ImageHistogram_swigregister(ImageHistogramPtr)
2042
2043 def ImageHistogram_MakeKey(*args, **kwargs):
2044 """
2045 ImageHistogram_MakeKey(unsigned char r, unsigned char g, unsigned char b) -> unsigned long
2046
2047 Get the key in the histogram for the given RGB values
2048 """
2049 return _core_.ImageHistogram_MakeKey(*args, **kwargs)
2050
2051 class Image(Object):
2052 def __repr__(self):
2053 return "<%s.%s; proxy of C++ wxImage instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
2054 def __init__(self, *args, **kwargs):
2055 """__init__(self, String name, long type=BITMAP_TYPE_ANY, int index=-1) -> Image"""
2056 newobj = _core_.new_Image(*args, **kwargs)
2057 self.this = newobj.this
2058 self.thisown = 1
2059 del newobj.thisown
2060 def __del__(self, destroy=_core_.delete_Image):
2061 """__del__(self)"""
2062 try:
2063 if self.thisown: destroy(self)
2064 except: pass
2065
2066 def Create(*args, **kwargs):
2067 """Create(self, int width, int height)"""
2068 return _core_.Image_Create(*args, **kwargs)
2069
2070 def Destroy(*args, **kwargs):
2071 """
2072 Destroy(self)
2073
2074 Deletes the C++ object this Python object is a proxy for.
2075 """
2076 return _core_.Image_Destroy(*args, **kwargs)
2077
2078 def Scale(*args, **kwargs):
2079 """Scale(self, int width, int height) -> Image"""
2080 return _core_.Image_Scale(*args, **kwargs)
2081
2082 def ShrinkBy(*args, **kwargs):
2083 """ShrinkBy(self, int xFactor, int yFactor) -> Image"""
2084 return _core_.Image_ShrinkBy(*args, **kwargs)
2085
2086 def Rescale(*args, **kwargs):
2087 """Rescale(self, int width, int height) -> Image"""
2088 return _core_.Image_Rescale(*args, **kwargs)
2089
2090 def SetRGB(*args, **kwargs):
2091 """SetRGB(self, int x, int y, unsigned char r, unsigned char g, unsigned char b)"""
2092 return _core_.Image_SetRGB(*args, **kwargs)
2093
2094 def GetRed(*args, **kwargs):
2095 """GetRed(self, int x, int y) -> unsigned char"""
2096 return _core_.Image_GetRed(*args, **kwargs)
2097
2098 def GetGreen(*args, **kwargs):
2099 """GetGreen(self, int x, int y) -> unsigned char"""
2100 return _core_.Image_GetGreen(*args, **kwargs)
2101
2102 def GetBlue(*args, **kwargs):
2103 """GetBlue(self, int x, int y) -> unsigned char"""
2104 return _core_.Image_GetBlue(*args, **kwargs)
2105
2106 def SetAlpha(*args, **kwargs):
2107 """SetAlpha(self, int x, int y, unsigned char alpha)"""
2108 return _core_.Image_SetAlpha(*args, **kwargs)
2109
2110 def GetAlpha(*args, **kwargs):
2111 """GetAlpha(self, int x, int y) -> unsigned char"""
2112 return _core_.Image_GetAlpha(*args, **kwargs)
2113
2114 def HasAlpha(*args, **kwargs):
2115 """HasAlpha(self) -> bool"""
2116 return _core_.Image_HasAlpha(*args, **kwargs)
2117
2118 def FindFirstUnusedColour(*args, **kwargs):
2119 """
2120 FindFirstUnusedColour(int startR=1, int startG=0, int startB=0) -> (success, r, g, b)
2121
2122 Find first colour that is not used in the image and has higher RGB
2123 values than startR, startG, startB. Returns a tuple consisting of a
2124 success flag and rgb values.
2125 """
2126 return _core_.Image_FindFirstUnusedColour(*args, **kwargs)
2127
2128 def ConvertAlphaToMask(*args, **kwargs):
2129 """
2130 ConvertAlphaToMask(self, byte threshold=128) -> bool
2131
2132 If the image has alpha channel, this method converts it to mask. All pixels
2133 with alpha value less than ``threshold`` are replaced with mask colour and the
2134 alpha channel is removed. Mask colour is chosen automatically using
2135 `FindFirstUnusedColour`.
2136
2137 If the image image doesn't have alpha channel, ConvertAlphaToMask does
2138 nothing.
2139 """
2140 return _core_.Image_ConvertAlphaToMask(*args, **kwargs)
2141
2142 def ConvertColourToAlpha(*args, **kwargs):
2143 """
2144 ConvertColourToAlpha(self, unsigned char r, unsigned char g, unsigned char b) -> bool
2145
2146 This method converts an image where the original alpha information is
2147 only available as a shades of a colour (actually shades of grey)
2148 typically when you draw anti-aliased text into a bitmap. The DC
2149 drawing routines draw grey values on the black background although
2150 they actually mean to draw white with differnt alpha values. This
2151 method reverses it, assuming a black (!) background and white text.
2152 The method will then fill up the whole image with the colour given.
2153 """
2154 return _core_.Image_ConvertColourToAlpha(*args, **kwargs)
2155
2156 def SetMaskFromImage(*args, **kwargs):
2157 """SetMaskFromImage(self, Image mask, byte mr, byte mg, byte mb) -> bool"""
2158 return _core_.Image_SetMaskFromImage(*args, **kwargs)
2159
2160 def CanRead(*args, **kwargs):
2161 """CanRead(String name) -> bool"""
2162 return _core_.Image_CanRead(*args, **kwargs)
2163
2164 CanRead = staticmethod(CanRead)
2165 def GetImageCount(*args, **kwargs):
2166 """GetImageCount(String name, long type=BITMAP_TYPE_ANY) -> int"""
2167 return _core_.Image_GetImageCount(*args, **kwargs)
2168
2169 GetImageCount = staticmethod(GetImageCount)
2170 def LoadFile(*args, **kwargs):
2171 """LoadFile(self, String name, long type=BITMAP_TYPE_ANY, int index=-1) -> bool"""
2172 return _core_.Image_LoadFile(*args, **kwargs)
2173
2174 def LoadMimeFile(*args, **kwargs):
2175 """LoadMimeFile(self, String name, String mimetype, int index=-1) -> bool"""
2176 return _core_.Image_LoadMimeFile(*args, **kwargs)
2177
2178 def SaveFile(*args, **kwargs):
2179 """SaveFile(self, String name, int type) -> bool"""
2180 return _core_.Image_SaveFile(*args, **kwargs)
2181
2182 def SaveMimeFile(*args, **kwargs):
2183 """SaveMimeFile(self, String name, String mimetype) -> bool"""
2184 return _core_.Image_SaveMimeFile(*args, **kwargs)
2185
2186 def CanReadStream(*args, **kwargs):
2187 """CanReadStream(InputStream stream) -> bool"""
2188 return _core_.Image_CanReadStream(*args, **kwargs)
2189
2190 CanReadStream = staticmethod(CanReadStream)
2191 def LoadStream(*args, **kwargs):
2192 """LoadStream(self, InputStream stream, long type=BITMAP_TYPE_ANY, int index=-1) -> bool"""
2193 return _core_.Image_LoadStream(*args, **kwargs)
2194
2195 def LoadMimeStream(*args, **kwargs):
2196 """LoadMimeStream(self, InputStream stream, String mimetype, int index=-1) -> bool"""
2197 return _core_.Image_LoadMimeStream(*args, **kwargs)
2198
2199 def Ok(*args, **kwargs):
2200 """Ok(self) -> bool"""
2201 return _core_.Image_Ok(*args, **kwargs)
2202
2203 def GetWidth(*args, **kwargs):
2204 """GetWidth(self) -> int"""
2205 return _core_.Image_GetWidth(*args, **kwargs)
2206
2207 def GetHeight(*args, **kwargs):
2208 """GetHeight(self) -> int"""
2209 return _core_.Image_GetHeight(*args, **kwargs)
2210
2211 def GetSize(*args, **kwargs):
2212 """GetSize(self) -> Size"""
2213 return _core_.Image_GetSize(*args, **kwargs)
2214
2215 def GetSubImage(*args, **kwargs):
2216 """GetSubImage(self, Rect rect) -> Image"""
2217 return _core_.Image_GetSubImage(*args, **kwargs)
2218
2219 def Copy(*args, **kwargs):
2220 """Copy(self) -> Image"""
2221 return _core_.Image_Copy(*args, **kwargs)
2222
2223 def Paste(*args, **kwargs):
2224 """Paste(self, Image image, int x, int y)"""
2225 return _core_.Image_Paste(*args, **kwargs)
2226
2227 def GetData(*args, **kwargs):
2228 """GetData(self) -> PyObject"""
2229 return _core_.Image_GetData(*args, **kwargs)
2230
2231 def SetData(*args, **kwargs):
2232 """SetData(self, PyObject data)"""
2233 return _core_.Image_SetData(*args, **kwargs)
2234
2235 def GetDataBuffer(*args, **kwargs):
2236 """GetDataBuffer(self) -> PyObject"""
2237 return _core_.Image_GetDataBuffer(*args, **kwargs)
2238
2239 def SetDataBuffer(*args, **kwargs):
2240 """SetDataBuffer(self, PyObject data)"""
2241 return _core_.Image_SetDataBuffer(*args, **kwargs)
2242
2243 def GetAlphaData(*args, **kwargs):
2244 """GetAlphaData(self) -> PyObject"""
2245 return _core_.Image_GetAlphaData(*args, **kwargs)
2246
2247 def SetAlphaData(*args, **kwargs):
2248 """SetAlphaData(self, PyObject data)"""
2249 return _core_.Image_SetAlphaData(*args, **kwargs)
2250
2251 def GetAlphaBuffer(*args, **kwargs):
2252 """GetAlphaBuffer(self) -> PyObject"""
2253 return _core_.Image_GetAlphaBuffer(*args, **kwargs)
2254
2255 def SetAlphaBuffer(*args, **kwargs):
2256 """SetAlphaBuffer(self, PyObject data)"""
2257 return _core_.Image_SetAlphaBuffer(*args, **kwargs)
2258
2259 def SetMaskColour(*args, **kwargs):
2260 """SetMaskColour(self, unsigned char r, unsigned char g, unsigned char b)"""
2261 return _core_.Image_SetMaskColour(*args, **kwargs)
2262
2263 def GetMaskRed(*args, **kwargs):
2264 """GetMaskRed(self) -> unsigned char"""
2265 return _core_.Image_GetMaskRed(*args, **kwargs)
2266
2267 def GetMaskGreen(*args, **kwargs):
2268 """GetMaskGreen(self) -> unsigned char"""
2269 return _core_.Image_GetMaskGreen(*args, **kwargs)
2270
2271 def GetMaskBlue(*args, **kwargs):
2272 """GetMaskBlue(self) -> unsigned char"""
2273 return _core_.Image_GetMaskBlue(*args, **kwargs)
2274
2275 def SetMask(*args, **kwargs):
2276 """SetMask(self, bool mask=True)"""
2277 return _core_.Image_SetMask(*args, **kwargs)
2278
2279 def HasMask(*args, **kwargs):
2280 """HasMask(self) -> bool"""
2281 return _core_.Image_HasMask(*args, **kwargs)
2282
2283 def Rotate(*args, **kwargs):
2284 """
2285 Rotate(self, double angle, Point centre_of_rotation, bool interpolating=True,
2286 Point offset_after_rotation=None) -> Image
2287 """
2288 return _core_.Image_Rotate(*args, **kwargs)
2289
2290 def Rotate90(*args, **kwargs):
2291 """Rotate90(self, bool clockwise=True) -> Image"""
2292 return _core_.Image_Rotate90(*args, **kwargs)
2293
2294 def Mirror(*args, **kwargs):
2295 """Mirror(self, bool horizontally=True) -> Image"""
2296 return _core_.Image_Mirror(*args, **kwargs)
2297
2298 def Replace(*args, **kwargs):
2299 """
2300 Replace(self, unsigned char r1, unsigned char g1, unsigned char b1,
2301 unsigned char r2, unsigned char g2, unsigned char b2)
2302 """
2303 return _core_.Image_Replace(*args, **kwargs)
2304
2305 def ConvertToMono(*args, **kwargs):
2306 """ConvertToMono(self, unsigned char r, unsigned char g, unsigned char b) -> Image"""
2307 return _core_.Image_ConvertToMono(*args, **kwargs)
2308
2309 def SetOption(*args, **kwargs):
2310 """SetOption(self, String name, String value)"""
2311 return _core_.Image_SetOption(*args, **kwargs)
2312
2313 def SetOptionInt(*args, **kwargs):
2314 """SetOptionInt(self, String name, int value)"""
2315 return _core_.Image_SetOptionInt(*args, **kwargs)
2316
2317 def GetOption(*args, **kwargs):
2318 """GetOption(self, String name) -> String"""
2319 return _core_.Image_GetOption(*args, **kwargs)
2320
2321 def GetOptionInt(*args, **kwargs):
2322 """GetOptionInt(self, String name) -> int"""
2323 return _core_.Image_GetOptionInt(*args, **kwargs)
2324
2325 def HasOption(*args, **kwargs):
2326 """HasOption(self, String name) -> bool"""
2327 return _core_.Image_HasOption(*args, **kwargs)
2328
2329 def CountColours(*args, **kwargs):
2330 """CountColours(self, unsigned long stopafter=(unsigned long) -1) -> unsigned long"""
2331 return _core_.Image_CountColours(*args, **kwargs)
2332
2333 def ComputeHistogram(*args, **kwargs):
2334 """ComputeHistogram(self, ImageHistogram h) -> unsigned long"""
2335 return _core_.Image_ComputeHistogram(*args, **kwargs)
2336
2337 def AddHandler(*args, **kwargs):
2338 """AddHandler(ImageHandler handler)"""
2339 return _core_.Image_AddHandler(*args, **kwargs)
2340
2341 AddHandler = staticmethod(AddHandler)
2342 def InsertHandler(*args, **kwargs):
2343 """InsertHandler(ImageHandler handler)"""
2344 return _core_.Image_InsertHandler(*args, **kwargs)
2345
2346 InsertHandler = staticmethod(InsertHandler)
2347 def RemoveHandler(*args, **kwargs):
2348 """RemoveHandler(String name) -> bool"""
2349 return _core_.Image_RemoveHandler(*args, **kwargs)
2350
2351 RemoveHandler = staticmethod(RemoveHandler)
2352 def GetImageExtWildcard(*args, **kwargs):
2353 """GetImageExtWildcard() -> String"""
2354 return _core_.Image_GetImageExtWildcard(*args, **kwargs)
2355
2356 GetImageExtWildcard = staticmethod(GetImageExtWildcard)
2357 def ConvertToBitmap(*args, **kwargs):
2358 """ConvertToBitmap(self, int depth=-1) -> Bitmap"""
2359 return _core_.Image_ConvertToBitmap(*args, **kwargs)
2360
2361 def ConvertToMonoBitmap(*args, **kwargs):
2362 """ConvertToMonoBitmap(self, unsigned char red, unsigned char green, unsigned char blue) -> Bitmap"""
2363 return _core_.Image_ConvertToMonoBitmap(*args, **kwargs)
2364
2365 def __nonzero__(self): return self.Ok()
2366
2367 class ImagePtr(Image):
2368 def __init__(self, this):
2369 self.this = this
2370 if not hasattr(self,"thisown"): self.thisown = 0
2371 self.__class__ = Image
2372 _core_.Image_swigregister(ImagePtr)
2373
2374 def ImageFromMime(*args, **kwargs):
2375 """ImageFromMime(String name, String mimetype, int index=-1) -> Image"""
2376 val = _core_.new_ImageFromMime(*args, **kwargs)
2377 val.thisown = 1
2378 return val
2379
2380 def ImageFromStream(*args, **kwargs):
2381 """ImageFromStream(InputStream stream, long type=BITMAP_TYPE_ANY, int index=-1) -> Image"""
2382 val = _core_.new_ImageFromStream(*args, **kwargs)
2383 val.thisown = 1
2384 return val
2385
2386 def ImageFromStreamMime(*args, **kwargs):
2387 """ImageFromStreamMime(InputStream stream, String mimetype, int index=-1) -> Image"""
2388 val = _core_.new_ImageFromStreamMime(*args, **kwargs)
2389 val.thisown = 1
2390 return val
2391
2392 def EmptyImage(*args, **kwargs):
2393 """EmptyImage(int width=0, int height=0, bool clear=True) -> Image"""
2394 val = _core_.new_EmptyImage(*args, **kwargs)
2395 val.thisown = 1
2396 return val
2397
2398 def ImageFromBitmap(*args, **kwargs):
2399 """ImageFromBitmap(Bitmap bitmap) -> Image"""
2400 val = _core_.new_ImageFromBitmap(*args, **kwargs)
2401 val.thisown = 1
2402 return val
2403
2404 def ImageFromData(*args, **kwargs):
2405 """ImageFromData(int width, int height, unsigned char data) -> Image"""
2406 val = _core_.new_ImageFromData(*args, **kwargs)
2407 val.thisown = 1
2408 return val
2409
2410 def ImageFromDataWithAlpha(*args, **kwargs):
2411 """ImageFromDataWithAlpha(int width, int height, unsigned char data, unsigned char alpha) -> Image"""
2412 val = _core_.new_ImageFromDataWithAlpha(*args, **kwargs)
2413 val.thisown = 1
2414 return val
2415
2416 def Image_CanRead(*args, **kwargs):
2417 """Image_CanRead(String name) -> bool"""
2418 return _core_.Image_CanRead(*args, **kwargs)
2419
2420 def Image_GetImageCount(*args, **kwargs):
2421 """Image_GetImageCount(String name, long type=BITMAP_TYPE_ANY) -> int"""
2422 return _core_.Image_GetImageCount(*args, **kwargs)
2423
2424 def Image_CanReadStream(*args, **kwargs):
2425 """Image_CanReadStream(InputStream stream) -> bool"""
2426 return _core_.Image_CanReadStream(*args, **kwargs)
2427
2428 def Image_AddHandler(*args, **kwargs):
2429 """Image_AddHandler(ImageHandler handler)"""
2430 return _core_.Image_AddHandler(*args, **kwargs)
2431
2432 def Image_InsertHandler(*args, **kwargs):
2433 """Image_InsertHandler(ImageHandler handler)"""
2434 return _core_.Image_InsertHandler(*args, **kwargs)
2435
2436 def Image_RemoveHandler(*args, **kwargs):
2437 """Image_RemoveHandler(String name) -> bool"""
2438 return _core_.Image_RemoveHandler(*args, **kwargs)
2439
2440 def Image_GetImageExtWildcard(*args, **kwargs):
2441 """Image_GetImageExtWildcard() -> String"""
2442 return _core_.Image_GetImageExtWildcard(*args, **kwargs)
2443
2444 def InitAllImageHandlers():
2445 """
2446 The former functionality of InitAllImageHanders is now done internal to
2447 the _core_ extension module and so this function has become a simple NOP.
2448 """
2449 pass
2450
2451 IMAGE_RESOLUTION_INCHES = _core_.IMAGE_RESOLUTION_INCHES
2452 IMAGE_RESOLUTION_CM = _core_.IMAGE_RESOLUTION_CM
2453 BMP_24BPP = _core_.BMP_24BPP
2454 BMP_8BPP = _core_.BMP_8BPP
2455 BMP_8BPP_GREY = _core_.BMP_8BPP_GREY
2456 BMP_8BPP_GRAY = _core_.BMP_8BPP_GRAY
2457 BMP_8BPP_RED = _core_.BMP_8BPP_RED
2458 BMP_8BPP_PALETTE = _core_.BMP_8BPP_PALETTE
2459 BMP_4BPP = _core_.BMP_4BPP
2460 BMP_1BPP = _core_.BMP_1BPP
2461 BMP_1BPP_BW = _core_.BMP_1BPP_BW
2462 class BMPHandler(ImageHandler):
2463 def __repr__(self):
2464 return "<%s.%s; proxy of C++ wxBMPHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
2465 def __init__(self, *args, **kwargs):
2466 """__init__(self) -> BMPHandler"""
2467 newobj = _core_.new_BMPHandler(*args, **kwargs)
2468 self.this = newobj.this
2469 self.thisown = 1
2470 del newobj.thisown
2471
2472 class BMPHandlerPtr(BMPHandler):
2473 def __init__(self, this):
2474 self.this = this
2475 if not hasattr(self,"thisown"): self.thisown = 0
2476 self.__class__ = BMPHandler
2477 _core_.BMPHandler_swigregister(BMPHandlerPtr)
2478 NullImage = cvar.NullImage
2479 IMAGE_OPTION_BMP_FORMAT = cvar.IMAGE_OPTION_BMP_FORMAT
2480 IMAGE_OPTION_CUR_HOTSPOT_X = cvar.IMAGE_OPTION_CUR_HOTSPOT_X
2481 IMAGE_OPTION_CUR_HOTSPOT_Y = cvar.IMAGE_OPTION_CUR_HOTSPOT_Y
2482 IMAGE_OPTION_RESOLUTION = cvar.IMAGE_OPTION_RESOLUTION
2483 IMAGE_OPTION_RESOLUTIONUNIT = cvar.IMAGE_OPTION_RESOLUTIONUNIT
2484
2485 class ICOHandler(BMPHandler):
2486 def __repr__(self):
2487 return "<%s.%s; proxy of C++ wxICOHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
2488 def __init__(self, *args, **kwargs):
2489 """__init__(self) -> ICOHandler"""
2490 newobj = _core_.new_ICOHandler(*args, **kwargs)
2491 self.this = newobj.this
2492 self.thisown = 1
2493 del newobj.thisown
2494
2495 class ICOHandlerPtr(ICOHandler):
2496 def __init__(self, this):
2497 self.this = this
2498 if not hasattr(self,"thisown"): self.thisown = 0
2499 self.__class__ = ICOHandler
2500 _core_.ICOHandler_swigregister(ICOHandlerPtr)
2501
2502 class CURHandler(ICOHandler):
2503 def __repr__(self):
2504 return "<%s.%s; proxy of C++ wxCURHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
2505 def __init__(self, *args, **kwargs):
2506 """__init__(self) -> CURHandler"""
2507 newobj = _core_.new_CURHandler(*args, **kwargs)
2508 self.this = newobj.this
2509 self.thisown = 1
2510 del newobj.thisown
2511
2512 class CURHandlerPtr(CURHandler):
2513 def __init__(self, this):
2514 self.this = this
2515 if not hasattr(self,"thisown"): self.thisown = 0
2516 self.__class__ = CURHandler
2517 _core_.CURHandler_swigregister(CURHandlerPtr)
2518
2519 class ANIHandler(CURHandler):
2520 def __repr__(self):
2521 return "<%s.%s; proxy of C++ wxANIHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
2522 def __init__(self, *args, **kwargs):
2523 """__init__(self) -> ANIHandler"""
2524 newobj = _core_.new_ANIHandler(*args, **kwargs)
2525 self.this = newobj.this
2526 self.thisown = 1
2527 del newobj.thisown
2528
2529 class ANIHandlerPtr(ANIHandler):
2530 def __init__(self, this):
2531 self.this = this
2532 if not hasattr(self,"thisown"): self.thisown = 0
2533 self.__class__ = ANIHandler
2534 _core_.ANIHandler_swigregister(ANIHandlerPtr)
2535
2536 class PNGHandler(ImageHandler):
2537 def __repr__(self):
2538 return "<%s.%s; proxy of C++ wxPNGHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
2539 def __init__(self, *args, **kwargs):
2540 """__init__(self) -> PNGHandler"""
2541 newobj = _core_.new_PNGHandler(*args, **kwargs)
2542 self.this = newobj.this
2543 self.thisown = 1
2544 del newobj.thisown
2545
2546 class PNGHandlerPtr(PNGHandler):
2547 def __init__(self, this):
2548 self.this = this
2549 if not hasattr(self,"thisown"): self.thisown = 0
2550 self.__class__ = PNGHandler
2551 _core_.PNGHandler_swigregister(PNGHandlerPtr)
2552
2553 class GIFHandler(ImageHandler):
2554 def __repr__(self):
2555 return "<%s.%s; proxy of C++ wxGIFHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
2556 def __init__(self, *args, **kwargs):
2557 """__init__(self) -> GIFHandler"""
2558 newobj = _core_.new_GIFHandler(*args, **kwargs)
2559 self.this = newobj.this
2560 self.thisown = 1
2561 del newobj.thisown
2562
2563 class GIFHandlerPtr(GIFHandler):
2564 def __init__(self, this):
2565 self.this = this
2566 if not hasattr(self,"thisown"): self.thisown = 0
2567 self.__class__ = GIFHandler
2568 _core_.GIFHandler_swigregister(GIFHandlerPtr)
2569
2570 class PCXHandler(ImageHandler):
2571 def __repr__(self):
2572 return "<%s.%s; proxy of C++ wxPCXHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
2573 def __init__(self, *args, **kwargs):
2574 """__init__(self) -> PCXHandler"""
2575 newobj = _core_.new_PCXHandler(*args, **kwargs)
2576 self.this = newobj.this
2577 self.thisown = 1
2578 del newobj.thisown
2579
2580 class PCXHandlerPtr(PCXHandler):
2581 def __init__(self, this):
2582 self.this = this
2583 if not hasattr(self,"thisown"): self.thisown = 0
2584 self.__class__ = PCXHandler
2585 _core_.PCXHandler_swigregister(PCXHandlerPtr)
2586
2587 class JPEGHandler(ImageHandler):
2588 def __repr__(self):
2589 return "<%s.%s; proxy of C++ wxJPEGHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
2590 def __init__(self, *args, **kwargs):
2591 """__init__(self) -> JPEGHandler"""
2592 newobj = _core_.new_JPEGHandler(*args, **kwargs)
2593 self.this = newobj.this
2594 self.thisown = 1
2595 del newobj.thisown
2596
2597 class JPEGHandlerPtr(JPEGHandler):
2598 def __init__(self, this):
2599 self.this = this
2600 if not hasattr(self,"thisown"): self.thisown = 0
2601 self.__class__ = JPEGHandler
2602 _core_.JPEGHandler_swigregister(JPEGHandlerPtr)
2603
2604 class PNMHandler(ImageHandler):
2605 def __repr__(self):
2606 return "<%s.%s; proxy of C++ wxPNMHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
2607 def __init__(self, *args, **kwargs):
2608 """__init__(self) -> PNMHandler"""
2609 newobj = _core_.new_PNMHandler(*args, **kwargs)
2610 self.this = newobj.this
2611 self.thisown = 1
2612 del newobj.thisown
2613
2614 class PNMHandlerPtr(PNMHandler):
2615 def __init__(self, this):
2616 self.this = this
2617 if not hasattr(self,"thisown"): self.thisown = 0
2618 self.__class__ = PNMHandler
2619 _core_.PNMHandler_swigregister(PNMHandlerPtr)
2620
2621 class XPMHandler(ImageHandler):
2622 def __repr__(self):
2623 return "<%s.%s; proxy of C++ wxXPMHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
2624 def __init__(self, *args, **kwargs):
2625 """__init__(self) -> XPMHandler"""
2626 newobj = _core_.new_XPMHandler(*args, **kwargs)
2627 self.this = newobj.this
2628 self.thisown = 1
2629 del newobj.thisown
2630
2631 class XPMHandlerPtr(XPMHandler):
2632 def __init__(self, this):
2633 self.this = this
2634 if not hasattr(self,"thisown"): self.thisown = 0
2635 self.__class__ = XPMHandler
2636 _core_.XPMHandler_swigregister(XPMHandlerPtr)
2637
2638 class TIFFHandler(ImageHandler):
2639 def __repr__(self):
2640 return "<%s.%s; proxy of C++ wxTIFFHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
2641 def __init__(self, *args, **kwargs):
2642 """__init__(self) -> TIFFHandler"""
2643 newobj = _core_.new_TIFFHandler(*args, **kwargs)
2644 self.this = newobj.this
2645 self.thisown = 1
2646 del newobj.thisown
2647
2648 class TIFFHandlerPtr(TIFFHandler):
2649 def __init__(self, this):
2650 self.this = this
2651 if not hasattr(self,"thisown"): self.thisown = 0
2652 self.__class__ = TIFFHandler
2653 _core_.TIFFHandler_swigregister(TIFFHandlerPtr)
2654
2655 QUANTIZE_INCLUDE_WINDOWS_COLOURS = _core_.QUANTIZE_INCLUDE_WINDOWS_COLOURS
2656 QUANTIZE_FILL_DESTINATION_IMAGE = _core_.QUANTIZE_FILL_DESTINATION_IMAGE
2657 class Quantize(object):
2658 """Performs quantization, or colour reduction, on a wxImage."""
2659 def __init__(self): raise RuntimeError, "No constructor defined"
2660 def __repr__(self):
2661 return "<%s.%s; proxy of C++ wxQuantize instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
2662 def Quantize(*args, **kwargs):
2663 """
2664 Quantize(Image src, Image dest, int desiredNoColours=236, int flags=wxQUANTIZE_INCLUDE_WINDOWS_COLOURS|wxQUANTIZE_FILL_DESTINATION_IMAGE) -> bool
2665
2666 Reduce the colours in the source image and put the result into the
2667 destination image, setting the palette in the destination if
2668 needed. Both images may be the same, to overwrite the source image.
2669 """
2670 return _core_.Quantize_Quantize(*args, **kwargs)
2671
2672 Quantize = staticmethod(Quantize)
2673
2674 class QuantizePtr(Quantize):
2675 def __init__(self, this):
2676 self.this = this
2677 if not hasattr(self,"thisown"): self.thisown = 0
2678 self.__class__ = Quantize
2679 _core_.Quantize_swigregister(QuantizePtr)
2680
2681 def Quantize_Quantize(*args, **kwargs):
2682 """
2683 Quantize_Quantize(Image src, Image dest, int desiredNoColours=236, int flags=wxQUANTIZE_INCLUDE_WINDOWS_COLOURS|wxQUANTIZE_FILL_DESTINATION_IMAGE) -> bool
2684
2685 Reduce the colours in the source image and put the result into the
2686 destination image, setting the palette in the destination if
2687 needed. Both images may be the same, to overwrite the source image.
2688 """
2689 return _core_.Quantize_Quantize(*args, **kwargs)
2690
2691 #---------------------------------------------------------------------------
2692
2693 class EvtHandler(Object):
2694 def __repr__(self):
2695 return "<%s.%s; proxy of C++ wxEvtHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
2696 def __init__(self, *args, **kwargs):
2697 """__init__(self) -> EvtHandler"""
2698 newobj = _core_.new_EvtHandler(*args, **kwargs)
2699 self.this = newobj.this
2700 self.thisown = 1
2701 del newobj.thisown
2702 def GetNextHandler(*args, **kwargs):
2703 """GetNextHandler(self) -> EvtHandler"""
2704 return _core_.EvtHandler_GetNextHandler(*args, **kwargs)
2705
2706 def GetPreviousHandler(*args, **kwargs):
2707 """GetPreviousHandler(self) -> EvtHandler"""
2708 return _core_.EvtHandler_GetPreviousHandler(*args, **kwargs)
2709
2710 def SetNextHandler(*args, **kwargs):
2711 """SetNextHandler(self, EvtHandler handler)"""
2712 return _core_.EvtHandler_SetNextHandler(*args, **kwargs)
2713
2714 def SetPreviousHandler(*args, **kwargs):
2715 """SetPreviousHandler(self, EvtHandler handler)"""
2716 return _core_.EvtHandler_SetPreviousHandler(*args, **kwargs)
2717
2718 def GetEvtHandlerEnabled(*args, **kwargs):
2719 """GetEvtHandlerEnabled(self) -> bool"""
2720 return _core_.EvtHandler_GetEvtHandlerEnabled(*args, **kwargs)
2721
2722 def SetEvtHandlerEnabled(*args, **kwargs):
2723 """SetEvtHandlerEnabled(self, bool enabled)"""
2724 return _core_.EvtHandler_SetEvtHandlerEnabled(*args, **kwargs)
2725
2726 def ProcessEvent(*args, **kwargs):
2727 """ProcessEvent(self, Event event) -> bool"""
2728 return _core_.EvtHandler_ProcessEvent(*args, **kwargs)
2729
2730 def AddPendingEvent(*args, **kwargs):
2731 """AddPendingEvent(self, Event event)"""
2732 return _core_.EvtHandler_AddPendingEvent(*args, **kwargs)
2733
2734 def ProcessPendingEvents(*args, **kwargs):
2735 """ProcessPendingEvents(self)"""
2736 return _core_.EvtHandler_ProcessPendingEvents(*args, **kwargs)
2737
2738 def Connect(*args, **kwargs):
2739 """Connect(self, int id, int lastId, int eventType, PyObject func)"""
2740 return _core_.EvtHandler_Connect(*args, **kwargs)
2741
2742 def Disconnect(*args, **kwargs):
2743 """Disconnect(self, int id, int lastId=-1, wxEventType eventType=wxEVT_NULL) -> bool"""
2744 return _core_.EvtHandler_Disconnect(*args, **kwargs)
2745
2746 def _setOORInfo(*args, **kwargs):
2747 """_setOORInfo(self, PyObject _self)"""
2748 return _core_.EvtHandler__setOORInfo(*args, **kwargs)
2749
2750 def Bind(self, event, handler, source=None, id=wx.ID_ANY, id2=wx.ID_ANY):
2751 """
2752 Bind an event to an event handler.
2753
2754 :param event: One of the EVT_* objects that specifies the
2755 type of event to bind,
2756
2757 :param handler: A callable object to be invoked when the
2758 event is delivered to self. Pass None to
2759 disconnect an event handler.
2760
2761 :param source: Sometimes the event originates from a
2762 different window than self, but you still
2763 want to catch it in self. (For example, a
2764 button event delivered to a frame.) By
2765 passing the source of the event, the event
2766 handling system is able to differentiate
2767 between the same event type from different
2768 controls.
2769
2770 :param id: Used to spcify the event source by ID instead
2771 of instance.
2772
2773 :param id2: Used when it is desirable to bind a handler
2774 to a range of IDs, such as with EVT_MENU_RANGE.
2775 """
2776 if source is not None:
2777 id = source.GetId()
2778 event.Bind(self, id, id2, handler)
2779
2780 def Unbind(self, event, source=None, id=wx.ID_ANY, id2=wx.ID_ANY):
2781 """
2782 Disconencts the event handler binding for event from self.
2783 Returns True if successful.
2784 """
2785 if source is not None:
2786 id = source.GetId()
2787 return event.Unbind(self, id, id2)
2788
2789
2790 class EvtHandlerPtr(EvtHandler):
2791 def __init__(self, this):
2792 self.this = this
2793 if not hasattr(self,"thisown"): self.thisown = 0
2794 self.__class__ = EvtHandler
2795 _core_.EvtHandler_swigregister(EvtHandlerPtr)
2796
2797 #---------------------------------------------------------------------------
2798
2799 class PyEventBinder(object):
2800 """
2801 Instances of this class are used to bind specific events to event
2802 handlers.
2803 """
2804 def __init__(self, evtType, expectedIDs=0):
2805 if expectedIDs not in [0, 1, 2]:
2806 raise ValueError, "Invalid number of expectedIDs"
2807 self.expectedIDs = expectedIDs
2808
2809 if type(evtType) == list or type(evtType) == tuple:
2810 self.evtType = evtType
2811 else:
2812 self.evtType = [evtType]
2813
2814
2815 def Bind(self, target, id1, id2, function):
2816 """Bind this set of event types to target."""
2817 for et in self.evtType:
2818 target.Connect(id1, id2, et, function)
2819
2820
2821 def Unbind(self, target, id1, id2):
2822 """Remove an event binding."""
2823 success = 0
2824 for et in self.evtType:
2825 success += target.Disconnect(id1, id2, et)
2826 return success != 0
2827
2828
2829 def __call__(self, *args):
2830 """
2831 For backwards compatibility with the old EVT_* functions.
2832 Should be called with either (window, func), (window, ID,
2833 func) or (window, ID1, ID2, func) parameters depending on the
2834 type of the event.
2835 """
2836 assert len(args) == 2 + self.expectedIDs
2837 id1 = wx.ID_ANY
2838 id2 = wx.ID_ANY
2839 target = args[0]
2840 if self.expectedIDs == 0:
2841 func = args[1]
2842 elif self.expectedIDs == 1:
2843 id1 = args[1]
2844 func = args[2]
2845 elif self.expectedIDs == 2:
2846 id1 = args[1]
2847 id2 = args[2]
2848 func = args[3]
2849 else:
2850 raise ValueError, "Unexpected number of IDs"
2851
2852 self.Bind(target, id1, id2, func)
2853
2854
2855 # These two are square pegs that don't fit the PyEventBinder hole...
2856 def EVT_COMMAND(win, id, cmd, func):
2857 win.Connect(id, -1, cmd, func)
2858 def EVT_COMMAND_RANGE(win, id1, id2, cmd, func):
2859 win.Connect(id1, id2, cmd, func)
2860
2861
2862 #---------------------------------------------------------------------------
2863
2864 #---------------------------------------------------------------------------
2865
2866 EVENT_PROPAGATE_NONE = _core_.EVENT_PROPAGATE_NONE
2867 EVENT_PROPAGATE_MAX = _core_.EVENT_PROPAGATE_MAX
2868
2869 def NewEventType(*args, **kwargs):
2870 """NewEventType() -> wxEventType"""
2871 return _core_.NewEventType(*args, **kwargs)
2872 wxEVT_NULL = _core_.wxEVT_NULL
2873 wxEVT_FIRST = _core_.wxEVT_FIRST
2874 wxEVT_USER_FIRST = _core_.wxEVT_USER_FIRST
2875 wxEVT_COMMAND_BUTTON_CLICKED = _core_.wxEVT_COMMAND_BUTTON_CLICKED
2876 wxEVT_COMMAND_CHECKBOX_CLICKED = _core_.wxEVT_COMMAND_CHECKBOX_CLICKED
2877 wxEVT_COMMAND_CHOICE_SELECTED = _core_.wxEVT_COMMAND_CHOICE_SELECTED
2878 wxEVT_COMMAND_LISTBOX_SELECTED = _core_.wxEVT_COMMAND_LISTBOX_SELECTED
2879 wxEVT_COMMAND_LISTBOX_DOUBLECLICKED = _core_.wxEVT_COMMAND_LISTBOX_DOUBLECLICKED
2880 wxEVT_COMMAND_CHECKLISTBOX_TOGGLED = _core_.wxEVT_COMMAND_CHECKLISTBOX_TOGGLED
2881 wxEVT_COMMAND_MENU_SELECTED = _core_.wxEVT_COMMAND_MENU_SELECTED
2882 wxEVT_COMMAND_TOOL_CLICKED = _core_.wxEVT_COMMAND_TOOL_CLICKED
2883 wxEVT_COMMAND_SLIDER_UPDATED = _core_.wxEVT_COMMAND_SLIDER_UPDATED
2884 wxEVT_COMMAND_RADIOBOX_SELECTED = _core_.wxEVT_COMMAND_RADIOBOX_SELECTED
2885 wxEVT_COMMAND_RADIOBUTTON_SELECTED = _core_.wxEVT_COMMAND_RADIOBUTTON_SELECTED
2886 wxEVT_COMMAND_SCROLLBAR_UPDATED = _core_.wxEVT_COMMAND_SCROLLBAR_UPDATED
2887 wxEVT_COMMAND_VLBOX_SELECTED = _core_.wxEVT_COMMAND_VLBOX_SELECTED
2888 wxEVT_COMMAND_COMBOBOX_SELECTED = _core_.wxEVT_COMMAND_COMBOBOX_SELECTED
2889 wxEVT_COMMAND_TOOL_RCLICKED = _core_.wxEVT_COMMAND_TOOL_RCLICKED
2890 wxEVT_COMMAND_TOOL_ENTER = _core_.wxEVT_COMMAND_TOOL_ENTER
2891 wxEVT_LEFT_DOWN = _core_.wxEVT_LEFT_DOWN
2892 wxEVT_LEFT_UP = _core_.wxEVT_LEFT_UP
2893 wxEVT_MIDDLE_DOWN = _core_.wxEVT_MIDDLE_DOWN
2894 wxEVT_MIDDLE_UP = _core_.wxEVT_MIDDLE_UP
2895 wxEVT_RIGHT_DOWN = _core_.wxEVT_RIGHT_DOWN
2896 wxEVT_RIGHT_UP = _core_.wxEVT_RIGHT_UP
2897 wxEVT_MOTION = _core_.wxEVT_MOTION
2898 wxEVT_ENTER_WINDOW = _core_.wxEVT_ENTER_WINDOW
2899 wxEVT_LEAVE_WINDOW = _core_.wxEVT_LEAVE_WINDOW
2900 wxEVT_LEFT_DCLICK = _core_.wxEVT_LEFT_DCLICK
2901 wxEVT_MIDDLE_DCLICK = _core_.wxEVT_MIDDLE_DCLICK
2902 wxEVT_RIGHT_DCLICK = _core_.wxEVT_RIGHT_DCLICK
2903 wxEVT_SET_FOCUS = _core_.wxEVT_SET_FOCUS
2904 wxEVT_KILL_FOCUS = _core_.wxEVT_KILL_FOCUS
2905 wxEVT_CHILD_FOCUS = _core_.wxEVT_CHILD_FOCUS
2906 wxEVT_MOUSEWHEEL = _core_.wxEVT_MOUSEWHEEL
2907 wxEVT_NC_LEFT_DOWN = _core_.wxEVT_NC_LEFT_DOWN
2908 wxEVT_NC_LEFT_UP = _core_.wxEVT_NC_LEFT_UP
2909 wxEVT_NC_MIDDLE_DOWN = _core_.wxEVT_NC_MIDDLE_DOWN
2910 wxEVT_NC_MIDDLE_UP = _core_.wxEVT_NC_MIDDLE_UP
2911 wxEVT_NC_RIGHT_DOWN = _core_.wxEVT_NC_RIGHT_DOWN
2912 wxEVT_NC_RIGHT_UP = _core_.wxEVT_NC_RIGHT_UP
2913 wxEVT_NC_MOTION = _core_.wxEVT_NC_MOTION
2914 wxEVT_NC_ENTER_WINDOW = _core_.wxEVT_NC_ENTER_WINDOW
2915 wxEVT_NC_LEAVE_WINDOW = _core_.wxEVT_NC_LEAVE_WINDOW
2916 wxEVT_NC_LEFT_DCLICK = _core_.wxEVT_NC_LEFT_DCLICK
2917 wxEVT_NC_MIDDLE_DCLICK = _core_.wxEVT_NC_MIDDLE_DCLICK
2918 wxEVT_NC_RIGHT_DCLICK = _core_.wxEVT_NC_RIGHT_DCLICK
2919 wxEVT_CHAR = _core_.wxEVT_CHAR
2920 wxEVT_CHAR_HOOK = _core_.wxEVT_CHAR_HOOK
2921 wxEVT_NAVIGATION_KEY = _core_.wxEVT_NAVIGATION_KEY
2922 wxEVT_KEY_DOWN = _core_.wxEVT_KEY_DOWN
2923 wxEVT_KEY_UP = _core_.wxEVT_KEY_UP
2924 wxEVT_HOTKEY = _core_.wxEVT_HOTKEY
2925 wxEVT_SET_CURSOR = _core_.wxEVT_SET_CURSOR
2926 wxEVT_SCROLL_TOP = _core_.wxEVT_SCROLL_TOP
2927 wxEVT_SCROLL_BOTTOM = _core_.wxEVT_SCROLL_BOTTOM
2928 wxEVT_SCROLL_LINEUP = _core_.wxEVT_SCROLL_LINEUP
2929 wxEVT_SCROLL_LINEDOWN = _core_.wxEVT_SCROLL_LINEDOWN
2930 wxEVT_SCROLL_PAGEUP = _core_.wxEVT_SCROLL_PAGEUP
2931 wxEVT_SCROLL_PAGEDOWN = _core_.wxEVT_SCROLL_PAGEDOWN
2932 wxEVT_SCROLL_THUMBTRACK = _core_.wxEVT_SCROLL_THUMBTRACK
2933 wxEVT_SCROLL_THUMBRELEASE = _core_.wxEVT_SCROLL_THUMBRELEASE
2934 wxEVT_SCROLL_ENDSCROLL = _core_.wxEVT_SCROLL_ENDSCROLL
2935 wxEVT_SCROLLWIN_TOP = _core_.wxEVT_SCROLLWIN_TOP
2936 wxEVT_SCROLLWIN_BOTTOM = _core_.wxEVT_SCROLLWIN_BOTTOM
2937 wxEVT_SCROLLWIN_LINEUP = _core_.wxEVT_SCROLLWIN_LINEUP
2938 wxEVT_SCROLLWIN_LINEDOWN = _core_.wxEVT_SCROLLWIN_LINEDOWN
2939 wxEVT_SCROLLWIN_PAGEUP = _core_.wxEVT_SCROLLWIN_PAGEUP
2940 wxEVT_SCROLLWIN_PAGEDOWN = _core_.wxEVT_SCROLLWIN_PAGEDOWN
2941 wxEVT_SCROLLWIN_THUMBTRACK = _core_.wxEVT_SCROLLWIN_THUMBTRACK
2942 wxEVT_SCROLLWIN_THUMBRELEASE = _core_.wxEVT_SCROLLWIN_THUMBRELEASE
2943 wxEVT_SIZE = _core_.wxEVT_SIZE
2944 wxEVT_MOVE = _core_.wxEVT_MOVE
2945 wxEVT_CLOSE_WINDOW = _core_.wxEVT_CLOSE_WINDOW
2946 wxEVT_END_SESSION = _core_.wxEVT_END_SESSION
2947 wxEVT_QUERY_END_SESSION = _core_.wxEVT_QUERY_END_SESSION
2948 wxEVT_ACTIVATE_APP = _core_.wxEVT_ACTIVATE_APP
2949 wxEVT_POWER = _core_.wxEVT_POWER
2950 wxEVT_ACTIVATE = _core_.wxEVT_ACTIVATE
2951 wxEVT_CREATE = _core_.wxEVT_CREATE
2952 wxEVT_DESTROY = _core_.wxEVT_DESTROY
2953 wxEVT_SHOW = _core_.wxEVT_SHOW
2954 wxEVT_ICONIZE = _core_.wxEVT_ICONIZE
2955 wxEVT_MAXIMIZE = _core_.wxEVT_MAXIMIZE
2956 wxEVT_MOUSE_CAPTURE_CHANGED = _core_.wxEVT_MOUSE_CAPTURE_CHANGED
2957 wxEVT_PAINT = _core_.wxEVT_PAINT
2958 wxEVT_ERASE_BACKGROUND = _core_.wxEVT_ERASE_BACKGROUND
2959 wxEVT_NC_PAINT = _core_.wxEVT_NC_PAINT
2960 wxEVT_PAINT_ICON = _core_.wxEVT_PAINT_ICON
2961 wxEVT_MENU_OPEN = _core_.wxEVT_MENU_OPEN
2962 wxEVT_MENU_CLOSE = _core_.wxEVT_MENU_CLOSE
2963 wxEVT_MENU_HIGHLIGHT = _core_.wxEVT_MENU_HIGHLIGHT
2964 wxEVT_CONTEXT_MENU = _core_.wxEVT_CONTEXT_MENU
2965 wxEVT_SYS_COLOUR_CHANGED = _core_.wxEVT_SYS_COLOUR_CHANGED
2966 wxEVT_DISPLAY_CHANGED = _core_.wxEVT_DISPLAY_CHANGED
2967 wxEVT_SETTING_CHANGED = _core_.wxEVT_SETTING_CHANGED
2968 wxEVT_QUERY_NEW_PALETTE = _core_.wxEVT_QUERY_NEW_PALETTE
2969 wxEVT_PALETTE_CHANGED = _core_.wxEVT_PALETTE_CHANGED
2970 wxEVT_DROP_FILES = _core_.wxEVT_DROP_FILES
2971 wxEVT_DRAW_ITEM = _core_.wxEVT_DRAW_ITEM
2972 wxEVT_MEASURE_ITEM = _core_.wxEVT_MEASURE_ITEM
2973 wxEVT_COMPARE_ITEM = _core_.wxEVT_COMPARE_ITEM
2974 wxEVT_INIT_DIALOG = _core_.wxEVT_INIT_DIALOG
2975 wxEVT_IDLE = _core_.wxEVT_IDLE
2976 wxEVT_UPDATE_UI = _core_.wxEVT_UPDATE_UI
2977 wxEVT_SIZING = _core_.wxEVT_SIZING
2978 wxEVT_MOVING = _core_.wxEVT_MOVING
2979 wxEVT_COMMAND_LEFT_CLICK = _core_.wxEVT_COMMAND_LEFT_CLICK
2980 wxEVT_COMMAND_LEFT_DCLICK = _core_.wxEVT_COMMAND_LEFT_DCLICK
2981 wxEVT_COMMAND_RIGHT_CLICK = _core_.wxEVT_COMMAND_RIGHT_CLICK
2982 wxEVT_COMMAND_RIGHT_DCLICK = _core_.wxEVT_COMMAND_RIGHT_DCLICK
2983 wxEVT_COMMAND_SET_FOCUS = _core_.wxEVT_COMMAND_SET_FOCUS
2984 wxEVT_COMMAND_KILL_FOCUS = _core_.wxEVT_COMMAND_KILL_FOCUS
2985 wxEVT_COMMAND_ENTER = _core_.wxEVT_COMMAND_ENTER
2986 #
2987 # Create some event binders
2988 EVT_SIZE = wx.PyEventBinder( wxEVT_SIZE )
2989 EVT_SIZING = wx.PyEventBinder( wxEVT_SIZING )
2990 EVT_MOVE = wx.PyEventBinder( wxEVT_MOVE )
2991 EVT_MOVING = wx.PyEventBinder( wxEVT_MOVING )
2992 EVT_CLOSE = wx.PyEventBinder( wxEVT_CLOSE_WINDOW )
2993 EVT_END_SESSION = wx.PyEventBinder( wxEVT_END_SESSION )
2994 EVT_QUERY_END_SESSION = wx.PyEventBinder( wxEVT_QUERY_END_SESSION )
2995 EVT_PAINT = wx.PyEventBinder( wxEVT_PAINT )
2996 EVT_NC_PAINT = wx.PyEventBinder( wxEVT_NC_PAINT )
2997 EVT_ERASE_BACKGROUND = wx.PyEventBinder( wxEVT_ERASE_BACKGROUND )
2998 EVT_CHAR = wx.PyEventBinder( wxEVT_CHAR )
2999 EVT_KEY_DOWN = wx.PyEventBinder( wxEVT_KEY_DOWN )
3000 EVT_KEY_UP = wx.PyEventBinder( wxEVT_KEY_UP )
3001 EVT_HOTKEY = wx.PyEventBinder( wxEVT_HOTKEY, 1)
3002 EVT_CHAR_HOOK = wx.PyEventBinder( wxEVT_CHAR_HOOK )
3003 EVT_MENU_OPEN = wx.PyEventBinder( wxEVT_MENU_OPEN )
3004 EVT_MENU_CLOSE = wx.PyEventBinder( wxEVT_MENU_CLOSE )
3005 EVT_MENU_HIGHLIGHT = wx.PyEventBinder( wxEVT_MENU_HIGHLIGHT, 1)
3006 EVT_MENU_HIGHLIGHT_ALL = wx.PyEventBinder( wxEVT_MENU_HIGHLIGHT )
3007 EVT_SET_FOCUS = wx.PyEventBinder( wxEVT_SET_FOCUS )
3008 EVT_KILL_FOCUS = wx.PyEventBinder( wxEVT_KILL_FOCUS )
3009 EVT_CHILD_FOCUS = wx.PyEventBinder( wxEVT_CHILD_FOCUS )
3010 EVT_ACTIVATE = wx.PyEventBinder( wxEVT_ACTIVATE )
3011 EVT_ACTIVATE_APP = wx.PyEventBinder( wxEVT_ACTIVATE_APP )
3012 EVT_END_SESSION = wx.PyEventBinder( wxEVT_END_SESSION )
3013 EVT_QUERY_END_SESSION = wx.PyEventBinder( wxEVT_QUERY_END_SESSION )
3014 EVT_DROP_FILES = wx.PyEventBinder( wxEVT_DROP_FILES )
3015 EVT_INIT_DIALOG = wx.PyEventBinder( wxEVT_INIT_DIALOG )
3016 EVT_SYS_COLOUR_CHANGED = wx.PyEventBinder( wxEVT_SYS_COLOUR_CHANGED )
3017 EVT_DISPLAY_CHANGED = wx.PyEventBinder( wxEVT_DISPLAY_CHANGED )
3018 EVT_SHOW = wx.PyEventBinder( wxEVT_SHOW )
3019 EVT_MAXIMIZE = wx.PyEventBinder( wxEVT_MAXIMIZE )
3020 EVT_ICONIZE = wx.PyEventBinder( wxEVT_ICONIZE )
3021 EVT_NAVIGATION_KEY = wx.PyEventBinder( wxEVT_NAVIGATION_KEY )
3022 EVT_PALETTE_CHANGED = wx.PyEventBinder( wxEVT_PALETTE_CHANGED )
3023 EVT_QUERY_NEW_PALETTE = wx.PyEventBinder( wxEVT_QUERY_NEW_PALETTE )
3024 EVT_WINDOW_CREATE = wx.PyEventBinder( wxEVT_CREATE )
3025 EVT_WINDOW_DESTROY = wx.PyEventBinder( wxEVT_DESTROY )
3026 EVT_SET_CURSOR = wx.PyEventBinder( wxEVT_SET_CURSOR )
3027 EVT_MOUSE_CAPTURE_CHANGED = wx.PyEventBinder( wxEVT_MOUSE_CAPTURE_CHANGED )
3028
3029 EVT_LEFT_DOWN = wx.PyEventBinder( wxEVT_LEFT_DOWN )
3030 EVT_LEFT_UP = wx.PyEventBinder( wxEVT_LEFT_UP )
3031 EVT_MIDDLE_DOWN = wx.PyEventBinder( wxEVT_MIDDLE_DOWN )
3032 EVT_MIDDLE_UP = wx.PyEventBinder( wxEVT_MIDDLE_UP )
3033 EVT_RIGHT_DOWN = wx.PyEventBinder( wxEVT_RIGHT_DOWN )
3034 EVT_RIGHT_UP = wx.PyEventBinder( wxEVT_RIGHT_UP )
3035 EVT_MOTION = wx.PyEventBinder( wxEVT_MOTION )
3036 EVT_LEFT_DCLICK = wx.PyEventBinder( wxEVT_LEFT_DCLICK )
3037 EVT_MIDDLE_DCLICK = wx.PyEventBinder( wxEVT_MIDDLE_DCLICK )
3038 EVT_RIGHT_DCLICK = wx.PyEventBinder( wxEVT_RIGHT_DCLICK )
3039 EVT_LEAVE_WINDOW = wx.PyEventBinder( wxEVT_LEAVE_WINDOW )
3040 EVT_ENTER_WINDOW = wx.PyEventBinder( wxEVT_ENTER_WINDOW )
3041 EVT_MOUSEWHEEL = wx.PyEventBinder( wxEVT_MOUSEWHEEL )
3042
3043 EVT_MOUSE_EVENTS = wx.PyEventBinder([ wxEVT_LEFT_DOWN,
3044 wxEVT_LEFT_UP,
3045 wxEVT_MIDDLE_DOWN,
3046 wxEVT_MIDDLE_UP,
3047 wxEVT_RIGHT_DOWN,
3048 wxEVT_RIGHT_UP,
3049 wxEVT_MOTION,
3050 wxEVT_LEFT_DCLICK,
3051 wxEVT_MIDDLE_DCLICK,
3052 wxEVT_RIGHT_DCLICK,
3053 wxEVT_ENTER_WINDOW,
3054 wxEVT_LEAVE_WINDOW,
3055 wxEVT_MOUSEWHEEL
3056 ])
3057
3058
3059 # Scrolling from wxWindow (sent to wxScrolledWindow)
3060 EVT_SCROLLWIN = wx.PyEventBinder([ wxEVT_SCROLLWIN_TOP,
3061 wxEVT_SCROLLWIN_BOTTOM,
3062 wxEVT_SCROLLWIN_LINEUP,
3063 wxEVT_SCROLLWIN_LINEDOWN,
3064 wxEVT_SCROLLWIN_PAGEUP,
3065 wxEVT_SCROLLWIN_PAGEDOWN,
3066 wxEVT_SCROLLWIN_THUMBTRACK,
3067 wxEVT_SCROLLWIN_THUMBRELEASE,
3068 ])
3069
3070 EVT_SCROLLWIN_TOP = wx.PyEventBinder( wxEVT_SCROLLWIN_TOP )
3071 EVT_SCROLLWIN_BOTTOM = wx.PyEventBinder( wxEVT_SCROLLWIN_BOTTOM )
3072 EVT_SCROLLWIN_LINEUP = wx.PyEventBinder( wxEVT_SCROLLWIN_LINEUP )
3073 EVT_SCROLLWIN_LINEDOWN = wx.PyEventBinder( wxEVT_SCROLLWIN_LINEDOWN )
3074 EVT_SCROLLWIN_PAGEUP = wx.PyEventBinder( wxEVT_SCROLLWIN_PAGEUP )
3075 EVT_SCROLLWIN_PAGEDOWN = wx.PyEventBinder( wxEVT_SCROLLWIN_PAGEDOWN )
3076 EVT_SCROLLWIN_THUMBTRACK = wx.PyEventBinder( wxEVT_SCROLLWIN_THUMBTRACK )
3077 EVT_SCROLLWIN_THUMBRELEASE = wx.PyEventBinder( wxEVT_SCROLLWIN_THUMBRELEASE )
3078
3079 # Scrolling from wxSlider and wxScrollBar
3080 EVT_SCROLL = wx.PyEventBinder([ wxEVT_SCROLL_TOP,
3081 wxEVT_SCROLL_BOTTOM,
3082 wxEVT_SCROLL_LINEUP,
3083 wxEVT_SCROLL_LINEDOWN,
3084 wxEVT_SCROLL_PAGEUP,
3085 wxEVT_SCROLL_PAGEDOWN,
3086 wxEVT_SCROLL_THUMBTRACK,
3087 wxEVT_SCROLL_THUMBRELEASE,
3088 wxEVT_SCROLL_ENDSCROLL,
3089 ])
3090
3091 EVT_SCROLL_TOP = wx.PyEventBinder( wxEVT_SCROLL_TOP )
3092 EVT_SCROLL_BOTTOM = wx.PyEventBinder( wxEVT_SCROLL_BOTTOM )
3093 EVT_SCROLL_LINEUP = wx.PyEventBinder( wxEVT_SCROLL_LINEUP )
3094 EVT_SCROLL_LINEDOWN = wx.PyEventBinder( wxEVT_SCROLL_LINEDOWN )
3095 EVT_SCROLL_PAGEUP = wx.PyEventBinder( wxEVT_SCROLL_PAGEUP )
3096 EVT_SCROLL_PAGEDOWN = wx.PyEventBinder( wxEVT_SCROLL_PAGEDOWN )
3097 EVT_SCROLL_THUMBTRACK = wx.PyEventBinder( wxEVT_SCROLL_THUMBTRACK )
3098 EVT_SCROLL_THUMBRELEASE = wx.PyEventBinder( wxEVT_SCROLL_THUMBRELEASE )
3099 EVT_SCROLL_ENDSCROLL = wx.PyEventBinder( wxEVT_SCROLL_ENDSCROLL )
3100
3101 # Scrolling from wxSlider and wxScrollBar, with an id
3102 EVT_COMMAND_SCROLL = wx.PyEventBinder([ wxEVT_SCROLL_TOP,
3103 wxEVT_SCROLL_BOTTOM,
3104 wxEVT_SCROLL_LINEUP,
3105 wxEVT_SCROLL_LINEDOWN,
3106 wxEVT_SCROLL_PAGEUP,
3107 wxEVT_SCROLL_PAGEDOWN,
3108 wxEVT_SCROLL_THUMBTRACK,
3109 wxEVT_SCROLL_THUMBRELEASE,
3110 wxEVT_SCROLL_ENDSCROLL,
3111 ], 1)
3112
3113 EVT_COMMAND_SCROLL_TOP = wx.PyEventBinder( wxEVT_SCROLL_TOP, 1)
3114 EVT_COMMAND_SCROLL_BOTTOM = wx.PyEventBinder( wxEVT_SCROLL_BOTTOM, 1)
3115 EVT_COMMAND_SCROLL_LINEUP = wx.PyEventBinder( wxEVT_SCROLL_LINEUP, 1)
3116 EVT_COMMAND_SCROLL_LINEDOWN = wx.PyEventBinder( wxEVT_SCROLL_LINEDOWN, 1)
3117 EVT_COMMAND_SCROLL_PAGEUP = wx.PyEventBinder( wxEVT_SCROLL_PAGEUP, 1)
3118 EVT_COMMAND_SCROLL_PAGEDOWN = wx.PyEventBinder( wxEVT_SCROLL_PAGEDOWN, 1)
3119 EVT_COMMAND_SCROLL_THUMBTRACK = wx.PyEventBinder( wxEVT_SCROLL_THUMBTRACK, 1)
3120 EVT_COMMAND_SCROLL_THUMBRELEASE = wx.PyEventBinder( wxEVT_SCROLL_THUMBRELEASE, 1)
3121 EVT_COMMAND_SCROLL_ENDSCROLL = wx.PyEventBinder( wxEVT_SCROLL_ENDSCROLL, 1)
3122
3123 EVT_BUTTON = wx.PyEventBinder( wxEVT_COMMAND_BUTTON_CLICKED, 1)
3124 EVT_CHECKBOX = wx.PyEventBinder( wxEVT_COMMAND_CHECKBOX_CLICKED, 1)
3125 EVT_CHOICE = wx.PyEventBinder( wxEVT_COMMAND_CHOICE_SELECTED, 1)
3126 EVT_LISTBOX = wx.PyEventBinder( wxEVT_COMMAND_LISTBOX_SELECTED, 1)
3127 EVT_LISTBOX_DCLICK = wx.PyEventBinder( wxEVT_COMMAND_LISTBOX_DOUBLECLICKED, 1)
3128 EVT_MENU = wx.PyEventBinder( wxEVT_COMMAND_MENU_SELECTED, 1)
3129 EVT_MENU_RANGE = wx.PyEventBinder( wxEVT_COMMAND_MENU_SELECTED, 2)
3130 EVT_SLIDER = wx.PyEventBinder( wxEVT_COMMAND_SLIDER_UPDATED, 1)
3131 EVT_RADIOBOX = wx.PyEventBinder( wxEVT_COMMAND_RADIOBOX_SELECTED, 1)
3132 EVT_RADIOBUTTON = wx.PyEventBinder( wxEVT_COMMAND_RADIOBUTTON_SELECTED, 1)
3133
3134 EVT_SCROLLBAR = wx.PyEventBinder( wxEVT_COMMAND_SCROLLBAR_UPDATED, 1)
3135 EVT_VLBOX = wx.PyEventBinder( wxEVT_COMMAND_VLBOX_SELECTED, 1)
3136 EVT_COMBOBOX = wx.PyEventBinder( wxEVT_COMMAND_COMBOBOX_SELECTED, 1)
3137 EVT_TOOL = wx.PyEventBinder( wxEVT_COMMAND_TOOL_CLICKED, 1)
3138 EVT_TOOL_RANGE = wx.PyEventBinder( wxEVT_COMMAND_TOOL_CLICKED, 2)
3139 EVT_TOOL_RCLICKED = wx.PyEventBinder( wxEVT_COMMAND_TOOL_RCLICKED, 1)
3140 EVT_TOOL_RCLICKED_RANGE = wx.PyEventBinder( wxEVT_COMMAND_TOOL_RCLICKED, 2)
3141 EVT_TOOL_ENTER = wx.PyEventBinder( wxEVT_COMMAND_TOOL_ENTER, 1)
3142 EVT_CHECKLISTBOX = wx.PyEventBinder( wxEVT_COMMAND_CHECKLISTBOX_TOGGLED, 1)
3143
3144
3145 EVT_COMMAND_LEFT_CLICK = wx.PyEventBinder( wxEVT_COMMAND_LEFT_CLICK, 1)
3146 EVT_COMMAND_LEFT_DCLICK = wx.PyEventBinder( wxEVT_COMMAND_LEFT_DCLICK, 1)
3147 EVT_COMMAND_RIGHT_CLICK = wx.PyEventBinder( wxEVT_COMMAND_RIGHT_CLICK, 1)
3148 EVT_COMMAND_RIGHT_DCLICK = wx.PyEventBinder( wxEVT_COMMAND_RIGHT_DCLICK, 1)
3149 EVT_COMMAND_SET_FOCUS = wx.PyEventBinder( wxEVT_COMMAND_SET_FOCUS, 1)
3150 EVT_COMMAND_KILL_FOCUS = wx.PyEventBinder( wxEVT_COMMAND_KILL_FOCUS, 1)
3151 EVT_COMMAND_ENTER = wx.PyEventBinder( wxEVT_COMMAND_ENTER, 1)
3152
3153 EVT_IDLE = wx.PyEventBinder( wxEVT_IDLE )
3154
3155 EVT_UPDATE_UI = wx.PyEventBinder( wxEVT_UPDATE_UI, 1)
3156 EVT_UPDATE_UI_RANGE = wx.PyEventBinder( wxEVT_UPDATE_UI, 2)
3157
3158 EVT_CONTEXT_MENU = wx.PyEventBinder( wxEVT_CONTEXT_MENU )
3159
3160
3161
3162 #---------------------------------------------------------------------------
3163
3164 class Event(Object):
3165 def __init__(self): raise RuntimeError, "No constructor defined"
3166 def __repr__(self):
3167 return "<%s.%s; proxy of C++ wxEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
3168 def __del__(self, destroy=_core_.delete_Event):
3169 """__del__(self)"""
3170 try:
3171 if self.thisown: destroy(self)
3172 except: pass
3173
3174 def SetEventType(*args, **kwargs):
3175 """SetEventType(self, wxEventType typ)"""
3176 return _core_.Event_SetEventType(*args, **kwargs)
3177
3178 def GetEventType(*args, **kwargs):
3179 """GetEventType(self) -> wxEventType"""
3180 return _core_.Event_GetEventType(*args, **kwargs)
3181
3182 def GetEventObject(*args, **kwargs):
3183 """GetEventObject(self) -> Object"""
3184 return _core_.Event_GetEventObject(*args, **kwargs)
3185
3186 def SetEventObject(*args, **kwargs):
3187 """SetEventObject(self, Object obj)"""
3188 return _core_.Event_SetEventObject(*args, **kwargs)
3189
3190 def GetTimestamp(*args, **kwargs):
3191 """GetTimestamp(self) -> long"""
3192 return _core_.Event_GetTimestamp(*args, **kwargs)
3193
3194 def SetTimestamp(*args, **kwargs):
3195 """SetTimestamp(self, long ts=0)"""
3196 return _core_.Event_SetTimestamp(*args, **kwargs)
3197
3198 def GetId(*args, **kwargs):
3199 """GetId(self) -> int"""
3200 return _core_.Event_GetId(*args, **kwargs)
3201
3202 def SetId(*args, **kwargs):
3203 """SetId(self, int Id)"""
3204 return _core_.Event_SetId(*args, **kwargs)
3205
3206 def IsCommandEvent(*args, **kwargs):
3207 """IsCommandEvent(self) -> bool"""
3208 return _core_.Event_IsCommandEvent(*args, **kwargs)
3209
3210 def Skip(*args, **kwargs):
3211 """Skip(self, bool skip=True)"""
3212 return _core_.Event_Skip(*args, **kwargs)
3213
3214 def GetSkipped(*args, **kwargs):
3215 """GetSkipped(self) -> bool"""
3216 return _core_.Event_GetSkipped(*args, **kwargs)
3217
3218 def ShouldPropagate(*args, **kwargs):
3219 """ShouldPropagate(self) -> bool"""
3220 return _core_.Event_ShouldPropagate(*args, **kwargs)
3221
3222 def StopPropagation(*args, **kwargs):
3223 """StopPropagation(self) -> int"""
3224 return _core_.Event_StopPropagation(*args, **kwargs)
3225
3226 def ResumePropagation(*args, **kwargs):
3227 """ResumePropagation(self, int propagationLevel)"""
3228 return _core_.Event_ResumePropagation(*args, **kwargs)
3229
3230 def Clone(*args, **kwargs):
3231 """Clone(self) -> Event"""
3232 return _core_.Event_Clone(*args, **kwargs)
3233
3234
3235 class EventPtr(Event):
3236 def __init__(self, this):
3237 self.this = this
3238 if not hasattr(self,"thisown"): self.thisown = 0
3239 self.__class__ = Event
3240 _core_.Event_swigregister(EventPtr)
3241
3242 #---------------------------------------------------------------------------
3243
3244 class PropagationDisabler(object):
3245 def __repr__(self):
3246 return "<%s.%s; proxy of C++ wxPropagationDisabler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
3247 def __init__(self, *args, **kwargs):
3248 """__init__(self, Event event) -> PropagationDisabler"""
3249 newobj = _core_.new_PropagationDisabler(*args, **kwargs)
3250 self.this = newobj.this
3251 self.thisown = 1
3252 del newobj.thisown
3253 def __del__(self, destroy=_core_.delete_PropagationDisabler):
3254 """__del__(self)"""
3255 try:
3256 if self.thisown: destroy(self)
3257 except: pass
3258
3259
3260 class PropagationDisablerPtr(PropagationDisabler):
3261 def __init__(self, this):
3262 self.this = this
3263 if not hasattr(self,"thisown"): self.thisown = 0
3264 self.__class__ = PropagationDisabler
3265 _core_.PropagationDisabler_swigregister(PropagationDisablerPtr)
3266
3267 class PropagateOnce(object):
3268 def __repr__(self):
3269 return "<%s.%s; proxy of C++ wxPropagateOnce instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
3270 def __init__(self, *args, **kwargs):
3271 """__init__(self, Event event) -> PropagateOnce"""
3272 newobj = _core_.new_PropagateOnce(*args, **kwargs)
3273 self.this = newobj.this
3274 self.thisown = 1
3275 del newobj.thisown
3276 def __del__(self, destroy=_core_.delete_PropagateOnce):
3277 """__del__(self)"""
3278 try:
3279 if self.thisown: destroy(self)
3280 except: pass
3281
3282
3283 class PropagateOncePtr(PropagateOnce):
3284 def __init__(self, this):
3285 self.this = this
3286 if not hasattr(self,"thisown"): self.thisown = 0
3287 self.__class__ = PropagateOnce
3288 _core_.PropagateOnce_swigregister(PropagateOncePtr)
3289
3290 #---------------------------------------------------------------------------
3291
3292 class CommandEvent(Event):
3293 def __repr__(self):
3294 return "<%s.%s; proxy of C++ wxCommandEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
3295 def __init__(self, *args, **kwargs):
3296 """__init__(self, wxEventType commandType=wxEVT_NULL, int winid=0) -> CommandEvent"""
3297 newobj = _core_.new_CommandEvent(*args, **kwargs)
3298 self.this = newobj.this
3299 self.thisown = 1
3300 del newobj.thisown
3301 def GetSelection(*args, **kwargs):
3302 """GetSelection(self) -> int"""
3303 return _core_.CommandEvent_GetSelection(*args, **kwargs)
3304
3305 def SetString(*args, **kwargs):
3306 """SetString(self, String s)"""
3307 return _core_.CommandEvent_SetString(*args, **kwargs)
3308
3309 def GetString(*args, **kwargs):
3310 """GetString(self) -> String"""
3311 return _core_.CommandEvent_GetString(*args, **kwargs)
3312
3313 def IsChecked(*args, **kwargs):
3314 """IsChecked(self) -> bool"""
3315 return _core_.CommandEvent_IsChecked(*args, **kwargs)
3316
3317 Checked = IsChecked
3318 def IsSelection(*args, **kwargs):
3319 """IsSelection(self) -> bool"""
3320 return _core_.CommandEvent_IsSelection(*args, **kwargs)
3321
3322 def SetExtraLong(*args, **kwargs):
3323 """SetExtraLong(self, long extraLong)"""
3324 return _core_.CommandEvent_SetExtraLong(*args, **kwargs)
3325
3326 def GetExtraLong(*args, **kwargs):
3327 """GetExtraLong(self) -> long"""
3328 return _core_.CommandEvent_GetExtraLong(*args, **kwargs)
3329
3330 def SetInt(*args, **kwargs):
3331 """SetInt(self, int i)"""
3332 return _core_.CommandEvent_SetInt(*args, **kwargs)
3333
3334 def GetInt(*args, **kwargs):
3335 """GetInt(self) -> long"""
3336 return _core_.CommandEvent_GetInt(*args, **kwargs)
3337
3338 def Clone(*args, **kwargs):
3339 """Clone(self) -> Event"""
3340 return _core_.CommandEvent_Clone(*args, **kwargs)
3341
3342
3343 class CommandEventPtr(CommandEvent):
3344 def __init__(self, this):
3345 self.this = this
3346 if not hasattr(self,"thisown"): self.thisown = 0
3347 self.__class__ = CommandEvent
3348 _core_.CommandEvent_swigregister(CommandEventPtr)
3349
3350 #---------------------------------------------------------------------------
3351
3352 class NotifyEvent(CommandEvent):
3353 def __repr__(self):
3354 return "<%s.%s; proxy of C++ wxNotifyEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
3355 def __init__(self, *args, **kwargs):
3356 """__init__(self, wxEventType commandType=wxEVT_NULL, int winid=0) -> NotifyEvent"""
3357 newobj = _core_.new_NotifyEvent(*args, **kwargs)
3358 self.this = newobj.this
3359 self.thisown = 1
3360 del newobj.thisown
3361 def Veto(*args, **kwargs):
3362 """Veto(self)"""
3363 return _core_.NotifyEvent_Veto(*args, **kwargs)
3364
3365 def Allow(*args, **kwargs):
3366 """Allow(self)"""
3367 return _core_.NotifyEvent_Allow(*args, **kwargs)
3368
3369 def IsAllowed(*args, **kwargs):
3370 """IsAllowed(self) -> bool"""
3371 return _core_.NotifyEvent_IsAllowed(*args, **kwargs)
3372
3373
3374 class NotifyEventPtr(NotifyEvent):
3375 def __init__(self, this):
3376 self.this = this
3377 if not hasattr(self,"thisown"): self.thisown = 0
3378 self.__class__ = NotifyEvent
3379 _core_.NotifyEvent_swigregister(NotifyEventPtr)
3380
3381 #---------------------------------------------------------------------------
3382
3383 class ScrollEvent(CommandEvent):
3384 def __repr__(self):
3385 return "<%s.%s; proxy of C++ wxScrollEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
3386 def __init__(self, *args, **kwargs):
3387 """
3388 __init__(self, wxEventType commandType=wxEVT_NULL, int winid=0, int pos=0,
3389 int orient=0) -> ScrollEvent
3390 """
3391 newobj = _core_.new_ScrollEvent(*args, **kwargs)
3392 self.this = newobj.this
3393 self.thisown = 1
3394 del newobj.thisown
3395 def GetOrientation(*args, **kwargs):
3396 """GetOrientation(self) -> int"""
3397 return _core_.ScrollEvent_GetOrientation(*args, **kwargs)
3398
3399 def GetPosition(*args, **kwargs):
3400 """GetPosition(self) -> int"""
3401 return _core_.ScrollEvent_GetPosition(*args, **kwargs)
3402
3403 def SetOrientation(*args, **kwargs):
3404 """SetOrientation(self, int orient)"""
3405 return _core_.ScrollEvent_SetOrientation(*args, **kwargs)
3406
3407 def SetPosition(*args, **kwargs):
3408 """SetPosition(self, int pos)"""
3409 return _core_.ScrollEvent_SetPosition(*args, **kwargs)
3410
3411
3412 class ScrollEventPtr(ScrollEvent):
3413 def __init__(self, this):
3414 self.this = this
3415 if not hasattr(self,"thisown"): self.thisown = 0
3416 self.__class__ = ScrollEvent
3417 _core_.ScrollEvent_swigregister(ScrollEventPtr)
3418
3419 #---------------------------------------------------------------------------
3420
3421 class ScrollWinEvent(Event):
3422 def __repr__(self):
3423 return "<%s.%s; proxy of C++ wxScrollWinEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
3424 def __init__(self, *args, **kwargs):
3425 """__init__(self, wxEventType commandType=wxEVT_NULL, int pos=0, int orient=0) -> ScrollWinEvent"""
3426 newobj = _core_.new_ScrollWinEvent(*args, **kwargs)
3427 self.this = newobj.this
3428 self.thisown = 1
3429 del newobj.thisown
3430 def GetOrientation(*args, **kwargs):
3431 """GetOrientation(self) -> int"""
3432 return _core_.ScrollWinEvent_GetOrientation(*args, **kwargs)
3433
3434 def GetPosition(*args, **kwargs):
3435 """GetPosition(self) -> int"""
3436 return _core_.ScrollWinEvent_GetPosition(*args, **kwargs)
3437
3438 def SetOrientation(*args, **kwargs):
3439 """SetOrientation(self, int orient)"""
3440 return _core_.ScrollWinEvent_SetOrientation(*args, **kwargs)
3441
3442 def SetPosition(*args, **kwargs):
3443 """SetPosition(self, int pos)"""
3444 return _core_.ScrollWinEvent_SetPosition(*args, **kwargs)
3445
3446
3447 class ScrollWinEventPtr(ScrollWinEvent):
3448 def __init__(self, this):
3449 self.this = this
3450 if not hasattr(self,"thisown"): self.thisown = 0
3451 self.__class__ = ScrollWinEvent
3452 _core_.ScrollWinEvent_swigregister(ScrollWinEventPtr)
3453
3454 #---------------------------------------------------------------------------
3455
3456 MOUSE_BTN_ANY = _core_.MOUSE_BTN_ANY
3457 MOUSE_BTN_NONE = _core_.MOUSE_BTN_NONE
3458 MOUSE_BTN_LEFT = _core_.MOUSE_BTN_LEFT
3459 MOUSE_BTN_MIDDLE = _core_.MOUSE_BTN_MIDDLE
3460 MOUSE_BTN_RIGHT = _core_.MOUSE_BTN_RIGHT
3461 class MouseEvent(Event):
3462 def __repr__(self):
3463 return "<%s.%s; proxy of C++ wxMouseEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
3464 def __init__(self, *args, **kwargs):
3465 """__init__(self, wxEventType mouseType=wxEVT_NULL) -> MouseEvent"""
3466 newobj = _core_.new_MouseEvent(*args, **kwargs)
3467 self.this = newobj.this
3468 self.thisown = 1
3469 del newobj.thisown
3470 def IsButton(*args, **kwargs):
3471 """IsButton(self) -> bool"""
3472 return _core_.MouseEvent_IsButton(*args, **kwargs)
3473
3474 def ButtonDown(*args, **kwargs):
3475 """ButtonDown(self, int but=MOUSE_BTN_ANY) -> bool"""
3476 return _core_.MouseEvent_ButtonDown(*args, **kwargs)
3477
3478 def ButtonDClick(*args, **kwargs):
3479 """ButtonDClick(self, int but=MOUSE_BTN_ANY) -> bool"""
3480 return _core_.MouseEvent_ButtonDClick(*args, **kwargs)
3481
3482 def ButtonUp(*args, **kwargs):
3483 """ButtonUp(self, int but=MOUSE_BTN_ANY) -> bool"""
3484 return _core_.MouseEvent_ButtonUp(*args, **kwargs)
3485
3486 def Button(*args, **kwargs):
3487 """Button(self, int but) -> bool"""
3488 return _core_.MouseEvent_Button(*args, **kwargs)
3489
3490 def ButtonIsDown(*args, **kwargs):
3491 """ButtonIsDown(self, int but) -> bool"""
3492 return _core_.MouseEvent_ButtonIsDown(*args, **kwargs)
3493
3494 def GetButton(*args, **kwargs):
3495 """GetButton(self) -> int"""
3496 return _core_.MouseEvent_GetButton(*args, **kwargs)
3497
3498 def ControlDown(*args, **kwargs):
3499 """ControlDown(self) -> bool"""
3500 return _core_.MouseEvent_ControlDown(*args, **kwargs)
3501
3502 def MetaDown(*args, **kwargs):
3503 """MetaDown(self) -> bool"""
3504 return _core_.MouseEvent_MetaDown(*args, **kwargs)
3505
3506 def AltDown(*args, **kwargs):
3507 """AltDown(self) -> bool"""
3508 return _core_.MouseEvent_AltDown(*args, **kwargs)
3509
3510 def ShiftDown(*args, **kwargs):
3511 """ShiftDown(self) -> bool"""
3512 return _core_.MouseEvent_ShiftDown(*args, **kwargs)
3513
3514 def CmdDown(*args, **kwargs):
3515 """
3516 CmdDown(self) -> bool
3517
3518 "Cmd" is a pseudo key which is the same as Control for PC and Unix
3519 platforms but the special "Apple" (a.k.a as "Command") key on
3520 Macs: it makes often sense to use it instead of, say, `ControlDown`
3521 because Cmd key is used for the same thing under Mac as Ctrl
3522 elsewhere. The Ctrl still exists, it's just not used for this
3523 purpose. So for non-Mac platforms this is the same as `ControlDown`
3524 and Macs this is the same as `MetaDown`.
3525 """
3526 return _core_.MouseEvent_CmdDown(*args, **kwargs)
3527
3528 def LeftDown(*args, **kwargs):
3529 """LeftDown(self) -> bool"""
3530 return _core_.MouseEvent_LeftDown(*args, **kwargs)
3531
3532 def MiddleDown(*args, **kwargs):
3533 """MiddleDown(self) -> bool"""
3534 return _core_.MouseEvent_MiddleDown(*args, **kwargs)
3535
3536 def RightDown(*args, **kwargs):
3537 """RightDown(self) -> bool"""
3538 return _core_.MouseEvent_RightDown(*args, **kwargs)
3539
3540 def LeftUp(*args, **kwargs):
3541 """LeftUp(self) -> bool"""
3542 return _core_.MouseEvent_LeftUp(*args, **kwargs)
3543
3544 def MiddleUp(*args, **kwargs):
3545 """MiddleUp(self) -> bool"""
3546 return _core_.MouseEvent_MiddleUp(*args, **kwargs)
3547
3548 def RightUp(*args, **kwargs):
3549 """RightUp(self) -> bool"""
3550 return _core_.MouseEvent_RightUp(*args, **kwargs)
3551
3552 def LeftDClick(*args, **kwargs):
3553 """LeftDClick(self) -> bool"""
3554 return _core_.MouseEvent_LeftDClick(*args, **kwargs)
3555
3556 def MiddleDClick(*args, **kwargs):
3557 """MiddleDClick(self) -> bool"""
3558 return _core_.MouseEvent_MiddleDClick(*args, **kwargs)
3559
3560 def RightDClick(*args, **kwargs):
3561 """RightDClick(self) -> bool"""
3562 return _core_.MouseEvent_RightDClick(*args, **kwargs)
3563
3564 def LeftIsDown(*args, **kwargs):
3565 """LeftIsDown(self) -> bool"""
3566 return _core_.MouseEvent_LeftIsDown(*args, **kwargs)
3567
3568 def MiddleIsDown(*args, **kwargs):
3569 """MiddleIsDown(self) -> bool"""
3570 return _core_.MouseEvent_MiddleIsDown(*args, **kwargs)
3571
3572 def RightIsDown(*args, **kwargs):
3573 """RightIsDown(self) -> bool"""
3574 return _core_.MouseEvent_RightIsDown(*args, **kwargs)
3575
3576 def Dragging(*args, **kwargs):
3577 """Dragging(self) -> bool"""
3578 return _core_.MouseEvent_Dragging(*args, **kwargs)
3579
3580 def Moving(*args, **kwargs):
3581 """Moving(self) -> bool"""
3582 return _core_.MouseEvent_Moving(*args, **kwargs)
3583
3584 def Entering(*args, **kwargs):
3585 """Entering(self) -> bool"""
3586 return _core_.MouseEvent_Entering(*args, **kwargs)
3587
3588 def Leaving(*args, **kwargs):
3589 """Leaving(self) -> bool"""
3590 return _core_.MouseEvent_Leaving(*args, **kwargs)
3591
3592 def GetPosition(*args, **kwargs):
3593 """
3594 GetPosition(self) -> Point
3595
3596 Returns the position of the mouse in window coordinates when the event
3597 happened.
3598 """
3599 return _core_.MouseEvent_GetPosition(*args, **kwargs)
3600
3601 def GetPositionTuple(*args, **kwargs):
3602 """
3603 GetPositionTuple() -> (x,y)
3604
3605 Returns the position of the mouse in window coordinates when the event
3606 happened.
3607 """
3608 return _core_.MouseEvent_GetPositionTuple(*args, **kwargs)
3609
3610 def GetLogicalPosition(*args, **kwargs):
3611 """GetLogicalPosition(self, DC dc) -> Point"""
3612 return _core_.MouseEvent_GetLogicalPosition(*args, **kwargs)
3613
3614 def GetX(*args, **kwargs):
3615 """GetX(self) -> int"""
3616 return _core_.MouseEvent_GetX(*args, **kwargs)
3617
3618 def GetY(*args, **kwargs):
3619 """GetY(self) -> int"""
3620 return _core_.MouseEvent_GetY(*args, **kwargs)
3621
3622 def GetWheelRotation(*args, **kwargs):
3623 """GetWheelRotation(self) -> int"""
3624 return _core_.MouseEvent_GetWheelRotation(*args, **kwargs)
3625
3626 def GetWheelDelta(*args, **kwargs):
3627 """GetWheelDelta(self) -> int"""
3628 return _core_.MouseEvent_GetWheelDelta(*args, **kwargs)
3629
3630 def GetLinesPerAction(*args, **kwargs):
3631 """GetLinesPerAction(self) -> int"""
3632 return _core_.MouseEvent_GetLinesPerAction(*args, **kwargs)
3633
3634 def IsPageScroll(*args, **kwargs):
3635 """IsPageScroll(self) -> bool"""
3636 return _core_.MouseEvent_IsPageScroll(*args, **kwargs)
3637
3638 m_x = property(_core_.MouseEvent_m_x_get, _core_.MouseEvent_m_x_set)
3639 m_y = property(_core_.MouseEvent_m_y_get, _core_.MouseEvent_m_y_set)
3640 m_leftDown = property(_core_.MouseEvent_m_leftDown_get, _core_.MouseEvent_m_leftDown_set)
3641 m_middleDown = property(_core_.MouseEvent_m_middleDown_get, _core_.MouseEvent_m_middleDown_set)
3642 m_rightDown = property(_core_.MouseEvent_m_rightDown_get, _core_.MouseEvent_m_rightDown_set)
3643 m_controlDown = property(_core_.MouseEvent_m_controlDown_get, _core_.MouseEvent_m_controlDown_set)
3644 m_shiftDown = property(_core_.MouseEvent_m_shiftDown_get, _core_.MouseEvent_m_shiftDown_set)
3645 m_altDown = property(_core_.MouseEvent_m_altDown_get, _core_.MouseEvent_m_altDown_set)
3646 m_metaDown = property(_core_.MouseEvent_m_metaDown_get, _core_.MouseEvent_m_metaDown_set)
3647 m_wheelRotation = property(_core_.MouseEvent_m_wheelRotation_get, _core_.MouseEvent_m_wheelRotation_set)
3648 m_wheelDelta = property(_core_.MouseEvent_m_wheelDelta_get, _core_.MouseEvent_m_wheelDelta_set)
3649 m_linesPerAction = property(_core_.MouseEvent_m_linesPerAction_get, _core_.MouseEvent_m_linesPerAction_set)
3650
3651 class MouseEventPtr(MouseEvent):
3652 def __init__(self, this):
3653 self.this = this
3654 if not hasattr(self,"thisown"): self.thisown = 0
3655 self.__class__ = MouseEvent
3656 _core_.MouseEvent_swigregister(MouseEventPtr)
3657
3658 #---------------------------------------------------------------------------
3659
3660 class SetCursorEvent(Event):
3661 def __repr__(self):
3662 return "<%s.%s; proxy of C++ wxSetCursorEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
3663 def __init__(self, *args, **kwargs):
3664 """__init__(self, int x=0, int y=0) -> SetCursorEvent"""
3665 newobj = _core_.new_SetCursorEvent(*args, **kwargs)
3666 self.this = newobj.this
3667 self.thisown = 1
3668 del newobj.thisown
3669 def GetX(*args, **kwargs):
3670 """GetX(self) -> int"""
3671 return _core_.SetCursorEvent_GetX(*args, **kwargs)
3672
3673 def GetY(*args, **kwargs):
3674 """GetY(self) -> int"""
3675 return _core_.SetCursorEvent_GetY(*args, **kwargs)
3676
3677 def SetCursor(*args, **kwargs):
3678 """SetCursor(self, Cursor cursor)"""
3679 return _core_.SetCursorEvent_SetCursor(*args, **kwargs)
3680
3681 def GetCursor(*args, **kwargs):
3682 """GetCursor(self) -> Cursor"""
3683 return _core_.SetCursorEvent_GetCursor(*args, **kwargs)
3684
3685 def HasCursor(*args, **kwargs):
3686 """HasCursor(self) -> bool"""
3687 return _core_.SetCursorEvent_HasCursor(*args, **kwargs)
3688
3689
3690 class SetCursorEventPtr(SetCursorEvent):
3691 def __init__(self, this):
3692 self.this = this
3693 if not hasattr(self,"thisown"): self.thisown = 0
3694 self.__class__ = SetCursorEvent
3695 _core_.SetCursorEvent_swigregister(SetCursorEventPtr)
3696
3697 #---------------------------------------------------------------------------
3698
3699 class KeyEvent(Event):
3700 def __repr__(self):
3701 return "<%s.%s; proxy of C++ wxKeyEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
3702 def __init__(self, *args, **kwargs):
3703 """__init__(self, wxEventType keyType=wxEVT_NULL) -> KeyEvent"""
3704 newobj = _core_.new_KeyEvent(*args, **kwargs)
3705 self.this = newobj.this
3706 self.thisown = 1
3707 del newobj.thisown
3708 def ControlDown(*args, **kwargs):
3709 """ControlDown(self) -> bool"""
3710 return _core_.KeyEvent_ControlDown(*args, **kwargs)
3711
3712 def MetaDown(*args, **kwargs):
3713 """MetaDown(self) -> bool"""
3714 return _core_.KeyEvent_MetaDown(*args, **kwargs)
3715
3716 def AltDown(*args, **kwargs):
3717 """AltDown(self) -> bool"""
3718 return _core_.KeyEvent_AltDown(*args, **kwargs)
3719
3720 def ShiftDown(*args, **kwargs):
3721 """ShiftDown(self) -> bool"""
3722 return _core_.KeyEvent_ShiftDown(*args, **kwargs)
3723
3724 def CmdDown(*args, **kwargs):
3725 """
3726 CmdDown(self) -> bool
3727
3728 "Cmd" is a pseudo key which is the same as Control for PC and Unix
3729 platforms but the special "Apple" (a.k.a as "Command") key on
3730 Macs: it makes often sense to use it instead of, say, `ControlDown`
3731 because Cmd key is used for the same thing under Mac as Ctrl
3732 elsewhere. The Ctrl still exists, it's just not used for this
3733 purpose. So for non-Mac platforms this is the same as `ControlDown`
3734 and Macs this is the same as `MetaDown`.
3735 """
3736 return _core_.KeyEvent_CmdDown(*args, **kwargs)
3737
3738 def HasModifiers(*args, **kwargs):
3739 """HasModifiers(self) -> bool"""
3740 return _core_.KeyEvent_HasModifiers(*args, **kwargs)
3741
3742 def GetKeyCode(*args, **kwargs):
3743 """GetKeyCode(self) -> int"""
3744 return _core_.KeyEvent_GetKeyCode(*args, **kwargs)
3745
3746 KeyCode = GetKeyCode
3747 def GetUnicodeKey(*args, **kwargs):
3748 """GetUnicodeKey(self) -> int"""
3749 return _core_.KeyEvent_GetUnicodeKey(*args, **kwargs)
3750
3751 GetUniChar = GetUnicodeKey
3752 def GetRawKeyCode(*args, **kwargs):
3753 """GetRawKeyCode(self) -> unsigned int"""
3754 return _core_.KeyEvent_GetRawKeyCode(*args, **kwargs)
3755
3756 def GetRawKeyFlags(*args, **kwargs):
3757 """GetRawKeyFlags(self) -> unsigned int"""
3758 return _core_.KeyEvent_GetRawKeyFlags(*args, **kwargs)
3759
3760 def GetPosition(*args, **kwargs):
3761 """
3762 GetPosition(self) -> Point
3763
3764 Find the position of the event.
3765 """
3766 return _core_.KeyEvent_GetPosition(*args, **kwargs)
3767
3768 def GetPositionTuple(*args, **kwargs):
3769 """
3770 GetPositionTuple() -> (x,y)
3771
3772 Find the position of the event.
3773 """
3774 return _core_.KeyEvent_GetPositionTuple(*args, **kwargs)
3775
3776 def GetX(*args, **kwargs):
3777 """GetX(self) -> int"""
3778 return _core_.KeyEvent_GetX(*args, **kwargs)
3779
3780 def GetY(*args, **kwargs):
3781 """GetY(self) -> int"""
3782 return _core_.KeyEvent_GetY(*args, **kwargs)
3783
3784 m_x = property(_core_.KeyEvent_m_x_get, _core_.KeyEvent_m_x_set)
3785 m_y = property(_core_.KeyEvent_m_y_get, _core_.KeyEvent_m_y_set)
3786 m_keyCode = property(_core_.KeyEvent_m_keyCode_get, _core_.KeyEvent_m_keyCode_set)
3787 m_controlDown = property(_core_.KeyEvent_m_controlDown_get, _core_.KeyEvent_m_controlDown_set)
3788 m_shiftDown = property(_core_.KeyEvent_m_shiftDown_get, _core_.KeyEvent_m_shiftDown_set)
3789 m_altDown = property(_core_.KeyEvent_m_altDown_get, _core_.KeyEvent_m_altDown_set)
3790 m_metaDown = property(_core_.KeyEvent_m_metaDown_get, _core_.KeyEvent_m_metaDown_set)
3791 m_scanCode = property(_core_.KeyEvent_m_scanCode_get, _core_.KeyEvent_m_scanCode_set)
3792 m_rawCode = property(_core_.KeyEvent_m_rawCode_get, _core_.KeyEvent_m_rawCode_set)
3793 m_rawFlags = property(_core_.KeyEvent_m_rawFlags_get, _core_.KeyEvent_m_rawFlags_set)
3794
3795 class KeyEventPtr(KeyEvent):
3796 def __init__(self, this):
3797 self.this = this
3798 if not hasattr(self,"thisown"): self.thisown = 0
3799 self.__class__ = KeyEvent
3800 _core_.KeyEvent_swigregister(KeyEventPtr)
3801
3802 #---------------------------------------------------------------------------
3803
3804 class SizeEvent(Event):
3805 def __repr__(self):
3806 return "<%s.%s; proxy of C++ wxSizeEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
3807 def __init__(self, *args, **kwargs):
3808 """__init__(self, Size sz=DefaultSize, int winid=0) -> SizeEvent"""
3809 newobj = _core_.new_SizeEvent(*args, **kwargs)
3810 self.this = newobj.this
3811 self.thisown = 1
3812 del newobj.thisown
3813 def GetSize(*args, **kwargs):
3814 """GetSize(self) -> Size"""
3815 return _core_.SizeEvent_GetSize(*args, **kwargs)
3816
3817 def GetRect(*args, **kwargs):
3818 """GetRect(self) -> Rect"""
3819 return _core_.SizeEvent_GetRect(*args, **kwargs)
3820
3821 def SetRect(*args, **kwargs):
3822 """SetRect(self, Rect rect)"""
3823 return _core_.SizeEvent_SetRect(*args, **kwargs)
3824
3825 def SetSize(*args, **kwargs):
3826 """SetSize(self, Size size)"""
3827 return _core_.SizeEvent_SetSize(*args, **kwargs)
3828
3829 m_size = property(_core_.SizeEvent_m_size_get, _core_.SizeEvent_m_size_set)
3830 m_rect = property(_core_.SizeEvent_m_rect_get, _core_.SizeEvent_m_rect_set)
3831
3832 class SizeEventPtr(SizeEvent):
3833 def __init__(self, this):
3834 self.this = this
3835 if not hasattr(self,"thisown"): self.thisown = 0
3836 self.__class__ = SizeEvent
3837 _core_.SizeEvent_swigregister(SizeEventPtr)
3838
3839 #---------------------------------------------------------------------------
3840
3841 class MoveEvent(Event):
3842 def __repr__(self):
3843 return "<%s.%s; proxy of C++ wxMoveEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
3844 def __init__(self, *args, **kwargs):
3845 """__init__(self, Point pos=DefaultPosition, int winid=0) -> MoveEvent"""
3846 newobj = _core_.new_MoveEvent(*args, **kwargs)
3847 self.this = newobj.this
3848 self.thisown = 1
3849 del newobj.thisown
3850 def GetPosition(*args, **kwargs):
3851 """GetPosition(self) -> Point"""
3852 return _core_.MoveEvent_GetPosition(*args, **kwargs)
3853
3854 def GetRect(*args, **kwargs):
3855 """GetRect(self) -> Rect"""
3856 return _core_.MoveEvent_GetRect(*args, **kwargs)
3857
3858 def SetRect(*args, **kwargs):
3859 """SetRect(self, Rect rect)"""
3860 return _core_.MoveEvent_SetRect(*args, **kwargs)
3861
3862 def SetPosition(*args, **kwargs):
3863 """SetPosition(self, Point pos)"""
3864 return _core_.MoveEvent_SetPosition(*args, **kwargs)
3865
3866 m_pos = property(_core_.MoveEvent_m_pos_get, _core_.MoveEvent_m_pos_set)
3867 m_rect = property(_core_.MoveEvent_m_rect_get, _core_.MoveEvent_m_rect_set)
3868
3869 class MoveEventPtr(MoveEvent):
3870 def __init__(self, this):
3871 self.this = this
3872 if not hasattr(self,"thisown"): self.thisown = 0
3873 self.__class__ = MoveEvent
3874 _core_.MoveEvent_swigregister(MoveEventPtr)
3875
3876 #---------------------------------------------------------------------------
3877
3878 class PaintEvent(Event):
3879 def __repr__(self):
3880 return "<%s.%s; proxy of C++ wxPaintEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
3881 def __init__(self, *args, **kwargs):
3882 """__init__(self, int Id=0) -> PaintEvent"""
3883 newobj = _core_.new_PaintEvent(*args, **kwargs)
3884 self.this = newobj.this
3885 self.thisown = 1
3886 del newobj.thisown
3887
3888 class PaintEventPtr(PaintEvent):
3889 def __init__(self, this):
3890 self.this = this
3891 if not hasattr(self,"thisown"): self.thisown = 0
3892 self.__class__ = PaintEvent
3893 _core_.PaintEvent_swigregister(PaintEventPtr)
3894
3895 class NcPaintEvent(Event):
3896 def __repr__(self):
3897 return "<%s.%s; proxy of C++ wxNcPaintEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
3898 def __init__(self, *args, **kwargs):
3899 """__init__(self, int winid=0) -> NcPaintEvent"""
3900 newobj = _core_.new_NcPaintEvent(*args, **kwargs)
3901 self.this = newobj.this
3902 self.thisown = 1
3903 del newobj.thisown
3904
3905 class NcPaintEventPtr(NcPaintEvent):
3906 def __init__(self, this):
3907 self.this = this
3908 if not hasattr(self,"thisown"): self.thisown = 0
3909 self.__class__ = NcPaintEvent
3910 _core_.NcPaintEvent_swigregister(NcPaintEventPtr)
3911
3912 #---------------------------------------------------------------------------
3913
3914 class EraseEvent(Event):
3915 def __repr__(self):
3916 return "<%s.%s; proxy of C++ wxEraseEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
3917 def __init__(self, *args, **kwargs):
3918 """__init__(self, int Id=0, DC dc=(wxDC *) NULL) -> EraseEvent"""
3919 newobj = _core_.new_EraseEvent(*args, **kwargs)
3920 self.this = newobj.this
3921 self.thisown = 1
3922 del newobj.thisown
3923 def GetDC(*args, **kwargs):
3924 """GetDC(self) -> DC"""
3925 return _core_.EraseEvent_GetDC(*args, **kwargs)
3926
3927
3928 class EraseEventPtr(EraseEvent):
3929 def __init__(self, this):
3930 self.this = this
3931 if not hasattr(self,"thisown"): self.thisown = 0
3932 self.__class__ = EraseEvent
3933 _core_.EraseEvent_swigregister(EraseEventPtr)
3934
3935 #---------------------------------------------------------------------------
3936
3937 class FocusEvent(Event):
3938 def __repr__(self):
3939 return "<%s.%s; proxy of C++ wxFocusEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
3940 def __init__(self, *args, **kwargs):
3941 """__init__(self, wxEventType type=wxEVT_NULL, int winid=0) -> FocusEvent"""
3942 newobj = _core_.new_FocusEvent(*args, **kwargs)
3943 self.this = newobj.this
3944 self.thisown = 1
3945 del newobj.thisown
3946 def GetWindow(*args, **kwargs):
3947 """GetWindow(self) -> Window"""
3948 return _core_.FocusEvent_GetWindow(*args, **kwargs)
3949
3950 def SetWindow(*args, **kwargs):
3951 """SetWindow(self, Window win)"""
3952 return _core_.FocusEvent_SetWindow(*args, **kwargs)
3953
3954
3955 class FocusEventPtr(FocusEvent):
3956 def __init__(self, this):
3957 self.this = this
3958 if not hasattr(self,"thisown"): self.thisown = 0
3959 self.__class__ = FocusEvent
3960 _core_.FocusEvent_swigregister(FocusEventPtr)
3961
3962 #---------------------------------------------------------------------------
3963
3964 class ChildFocusEvent(CommandEvent):
3965 def __repr__(self):
3966 return "<%s.%s; proxy of C++ wxChildFocusEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
3967 def __init__(self, *args, **kwargs):
3968 """__init__(self, Window win=None) -> ChildFocusEvent"""
3969 newobj = _core_.new_ChildFocusEvent(*args, **kwargs)
3970 self.this = newobj.this
3971 self.thisown = 1
3972 del newobj.thisown
3973 def GetWindow(*args, **kwargs):
3974 """GetWindow(self) -> Window"""
3975 return _core_.ChildFocusEvent_GetWindow(*args, **kwargs)
3976
3977
3978 class ChildFocusEventPtr(ChildFocusEvent):
3979 def __init__(self, this):
3980 self.this = this
3981 if not hasattr(self,"thisown"): self.thisown = 0
3982 self.__class__ = ChildFocusEvent
3983 _core_.ChildFocusEvent_swigregister(ChildFocusEventPtr)
3984
3985 #---------------------------------------------------------------------------
3986
3987 class ActivateEvent(Event):
3988 def __repr__(self):
3989 return "<%s.%s; proxy of C++ wxActivateEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
3990 def __init__(self, *args, **kwargs):
3991 """__init__(self, wxEventType type=wxEVT_NULL, bool active=True, int Id=0) -> ActivateEvent"""
3992 newobj = _core_.new_ActivateEvent(*args, **kwargs)
3993 self.this = newobj.this
3994 self.thisown = 1
3995 del newobj.thisown
3996 def GetActive(*args, **kwargs):
3997 """GetActive(self) -> bool"""
3998 return _core_.ActivateEvent_GetActive(*args, **kwargs)
3999
4000
4001 class ActivateEventPtr(ActivateEvent):
4002 def __init__(self, this):
4003 self.this = this
4004 if not hasattr(self,"thisown"): self.thisown = 0
4005 self.__class__ = ActivateEvent
4006 _core_.ActivateEvent_swigregister(ActivateEventPtr)
4007
4008 #---------------------------------------------------------------------------
4009
4010 class InitDialogEvent(Event):
4011 def __repr__(self):
4012 return "<%s.%s; proxy of C++ wxInitDialogEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
4013 def __init__(self, *args, **kwargs):
4014 """__init__(self, int Id=0) -> InitDialogEvent"""
4015 newobj = _core_.new_InitDialogEvent(*args, **kwargs)
4016 self.this = newobj.this
4017 self.thisown = 1
4018 del newobj.thisown
4019
4020 class InitDialogEventPtr(InitDialogEvent):
4021 def __init__(self, this):
4022 self.this = this
4023 if not hasattr(self,"thisown"): self.thisown = 0
4024 self.__class__ = InitDialogEvent
4025 _core_.InitDialogEvent_swigregister(InitDialogEventPtr)
4026
4027 #---------------------------------------------------------------------------
4028
4029 class MenuEvent(Event):
4030 def __repr__(self):
4031 return "<%s.%s; proxy of C++ wxMenuEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
4032 def __init__(self, *args, **kwargs):
4033 """__init__(self, wxEventType type=wxEVT_NULL, int winid=0, Menu menu=None) -> MenuEvent"""
4034 newobj = _core_.new_MenuEvent(*args, **kwargs)
4035 self.this = newobj.this
4036 self.thisown = 1
4037 del newobj.thisown
4038 def GetMenuId(*args, **kwargs):
4039 """GetMenuId(self) -> int"""
4040 return _core_.MenuEvent_GetMenuId(*args, **kwargs)
4041
4042 def IsPopup(*args, **kwargs):
4043 """IsPopup(self) -> bool"""
4044 return _core_.MenuEvent_IsPopup(*args, **kwargs)
4045
4046 def GetMenu(*args, **kwargs):
4047 """GetMenu(self) -> Menu"""
4048 return _core_.MenuEvent_GetMenu(*args, **kwargs)
4049
4050
4051 class MenuEventPtr(MenuEvent):
4052 def __init__(self, this):
4053 self.this = this
4054 if not hasattr(self,"thisown"): self.thisown = 0
4055 self.__class__ = MenuEvent
4056 _core_.MenuEvent_swigregister(MenuEventPtr)
4057
4058 #---------------------------------------------------------------------------
4059
4060 class CloseEvent(Event):
4061 def __repr__(self):
4062 return "<%s.%s; proxy of C++ wxCloseEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
4063 def __init__(self, *args, **kwargs):
4064 """__init__(self, wxEventType type=wxEVT_NULL, int winid=0) -> CloseEvent"""
4065 newobj = _core_.new_CloseEvent(*args, **kwargs)
4066 self.this = newobj.this
4067 self.thisown = 1
4068 del newobj.thisown
4069 def SetLoggingOff(*args, **kwargs):
4070 """SetLoggingOff(self, bool logOff)"""
4071 return _core_.CloseEvent_SetLoggingOff(*args, **kwargs)
4072
4073 def GetLoggingOff(*args, **kwargs):
4074 """GetLoggingOff(self) -> bool"""
4075 return _core_.CloseEvent_GetLoggingOff(*args, **kwargs)
4076
4077 def Veto(*args, **kwargs):
4078 """Veto(self, bool veto=True)"""
4079 return _core_.CloseEvent_Veto(*args, **kwargs)
4080
4081 def SetCanVeto(*args, **kwargs):
4082 """SetCanVeto(self, bool canVeto)"""
4083 return _core_.CloseEvent_SetCanVeto(*args, **kwargs)
4084
4085 def CanVeto(*args, **kwargs):
4086 """CanVeto(self) -> bool"""
4087 return _core_.CloseEvent_CanVeto(*args, **kwargs)
4088
4089 def GetVeto(*args, **kwargs):
4090 """GetVeto(self) -> bool"""
4091 return _core_.CloseEvent_GetVeto(*args, **kwargs)
4092
4093
4094 class CloseEventPtr(CloseEvent):
4095 def __init__(self, this):
4096 self.this = this
4097 if not hasattr(self,"thisown"): self.thisown = 0
4098 self.__class__ = CloseEvent
4099 _core_.CloseEvent_swigregister(CloseEventPtr)
4100
4101 #---------------------------------------------------------------------------
4102
4103 class ShowEvent(Event):
4104 def __repr__(self):
4105 return "<%s.%s; proxy of C++ wxShowEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
4106 def __init__(self, *args, **kwargs):
4107 """__init__(self, int winid=0, bool show=False) -> ShowEvent"""
4108 newobj = _core_.new_ShowEvent(*args, **kwargs)
4109 self.this = newobj.this
4110 self.thisown = 1
4111 del newobj.thisown
4112 def SetShow(*args, **kwargs):
4113 """SetShow(self, bool show)"""
4114 return _core_.ShowEvent_SetShow(*args, **kwargs)
4115
4116 def GetShow(*args, **kwargs):
4117 """GetShow(self) -> bool"""
4118 return _core_.ShowEvent_GetShow(*args, **kwargs)
4119
4120
4121 class ShowEventPtr(ShowEvent):
4122 def __init__(self, this):
4123 self.this = this
4124 if not hasattr(self,"thisown"): self.thisown = 0
4125 self.__class__ = ShowEvent
4126 _core_.ShowEvent_swigregister(ShowEventPtr)
4127
4128 #---------------------------------------------------------------------------
4129
4130 class IconizeEvent(Event):
4131 def __repr__(self):
4132 return "<%s.%s; proxy of C++ wxIconizeEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
4133 def __init__(self, *args, **kwargs):
4134 """__init__(self, int id=0, bool iconized=True) -> IconizeEvent"""
4135 newobj = _core_.new_IconizeEvent(*args, **kwargs)
4136 self.this = newobj.this
4137 self.thisown = 1
4138 del newobj.thisown
4139 def Iconized(*args, **kwargs):
4140 """Iconized(self) -> bool"""
4141 return _core_.IconizeEvent_Iconized(*args, **kwargs)
4142
4143
4144 class IconizeEventPtr(IconizeEvent):
4145 def __init__(self, this):
4146 self.this = this
4147 if not hasattr(self,"thisown"): self.thisown = 0
4148 self.__class__ = IconizeEvent
4149 _core_.IconizeEvent_swigregister(IconizeEventPtr)
4150
4151 #---------------------------------------------------------------------------
4152
4153 class MaximizeEvent(Event):
4154 def __repr__(self):
4155 return "<%s.%s; proxy of C++ wxMaximizeEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
4156 def __init__(self, *args, **kwargs):
4157 """__init__(self, int id=0) -> MaximizeEvent"""
4158 newobj = _core_.new_MaximizeEvent(*args, **kwargs)
4159 self.this = newobj.this
4160 self.thisown = 1
4161 del newobj.thisown
4162
4163 class MaximizeEventPtr(MaximizeEvent):
4164 def __init__(self, this):
4165 self.this = this
4166 if not hasattr(self,"thisown"): self.thisown = 0
4167 self.__class__ = MaximizeEvent
4168 _core_.MaximizeEvent_swigregister(MaximizeEventPtr)
4169
4170 #---------------------------------------------------------------------------
4171
4172 class DropFilesEvent(Event):
4173 def __init__(self): raise RuntimeError, "No constructor defined"
4174 def __repr__(self):
4175 return "<%s.%s; proxy of C++ wxDropFilesEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
4176 def GetPosition(*args, **kwargs):
4177 """GetPosition(self) -> Point"""
4178 return _core_.DropFilesEvent_GetPosition(*args, **kwargs)
4179
4180 def GetNumberOfFiles(*args, **kwargs):
4181 """GetNumberOfFiles(self) -> int"""
4182 return _core_.DropFilesEvent_GetNumberOfFiles(*args, **kwargs)
4183
4184 def GetFiles(*args, **kwargs):
4185 """GetFiles(self) -> PyObject"""
4186 return _core_.DropFilesEvent_GetFiles(*args, **kwargs)
4187
4188
4189 class DropFilesEventPtr(DropFilesEvent):
4190 def __init__(self, this):
4191 self.this = this
4192 if not hasattr(self,"thisown"): self.thisown = 0
4193 self.__class__ = DropFilesEvent
4194 _core_.DropFilesEvent_swigregister(DropFilesEventPtr)
4195
4196 #---------------------------------------------------------------------------
4197
4198 UPDATE_UI_PROCESS_ALL = _core_.UPDATE_UI_PROCESS_ALL
4199 UPDATE_UI_PROCESS_SPECIFIED = _core_.UPDATE_UI_PROCESS_SPECIFIED
4200 class UpdateUIEvent(CommandEvent):
4201 def __repr__(self):
4202 return "<%s.%s; proxy of C++ wxUpdateUIEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
4203 def __init__(self, *args, **kwargs):
4204 """__init__(self, int commandId=0) -> UpdateUIEvent"""
4205 newobj = _core_.new_UpdateUIEvent(*args, **kwargs)
4206 self.this = newobj.this
4207 self.thisown = 1
4208 del newobj.thisown
4209 def GetChecked(*args, **kwargs):
4210 """GetChecked(self) -> bool"""
4211 return _core_.UpdateUIEvent_GetChecked(*args, **kwargs)
4212
4213 def GetEnabled(*args, **kwargs):
4214 """GetEnabled(self) -> bool"""
4215 return _core_.UpdateUIEvent_GetEnabled(*args, **kwargs)
4216
4217 def GetText(*args, **kwargs):
4218 """GetText(self) -> String"""
4219 return _core_.UpdateUIEvent_GetText(*args, **kwargs)
4220
4221 def GetSetText(*args, **kwargs):
4222 """GetSetText(self) -> bool"""
4223 return _core_.UpdateUIEvent_GetSetText(*args, **kwargs)
4224
4225 def GetSetChecked(*args, **kwargs):
4226 """GetSetChecked(self) -> bool"""
4227 return _core_.UpdateUIEvent_GetSetChecked(*args, **kwargs)
4228
4229 def GetSetEnabled(*args, **kwargs):
4230 """GetSetEnabled(self) -> bool"""
4231 return _core_.UpdateUIEvent_GetSetEnabled(*args, **kwargs)
4232
4233 def Check(*args, **kwargs):
4234 """Check(self, bool check)"""
4235 return _core_.UpdateUIEvent_Check(*args, **kwargs)
4236
4237 def Enable(*args, **kwargs):
4238 """Enable(self, bool enable)"""
4239 return _core_.UpdateUIEvent_Enable(*args, **kwargs)
4240
4241 def SetText(*args, **kwargs):
4242 """SetText(self, String text)"""
4243 return _core_.UpdateUIEvent_SetText(*args, **kwargs)
4244
4245 def SetUpdateInterval(*args, **kwargs):
4246 """SetUpdateInterval(long updateInterval)"""
4247 return _core_.UpdateUIEvent_SetUpdateInterval(*args, **kwargs)
4248
4249 SetUpdateInterval = staticmethod(SetUpdateInterval)
4250 def GetUpdateInterval(*args, **kwargs):
4251 """GetUpdateInterval() -> long"""
4252 return _core_.UpdateUIEvent_GetUpdateInterval(*args, **kwargs)
4253
4254 GetUpdateInterval = staticmethod(GetUpdateInterval)
4255 def CanUpdate(*args, **kwargs):
4256 """CanUpdate(Window win) -> bool"""
4257 return _core_.UpdateUIEvent_CanUpdate(*args, **kwargs)
4258
4259 CanUpdate = staticmethod(CanUpdate)
4260 def ResetUpdateTime(*args, **kwargs):
4261 """ResetUpdateTime()"""
4262 return _core_.UpdateUIEvent_ResetUpdateTime(*args, **kwargs)
4263
4264 ResetUpdateTime = staticmethod(ResetUpdateTime)
4265 def SetMode(*args, **kwargs):
4266 """SetMode(int mode)"""
4267 return _core_.UpdateUIEvent_SetMode(*args, **kwargs)
4268
4269 SetMode = staticmethod(SetMode)
4270 def GetMode(*args, **kwargs):
4271 """GetMode() -> int"""
4272 return _core_.UpdateUIEvent_GetMode(*args, **kwargs)
4273
4274 GetMode = staticmethod(GetMode)
4275
4276 class UpdateUIEventPtr(UpdateUIEvent):
4277 def __init__(self, this):
4278 self.this = this
4279 if not hasattr(self,"thisown"): self.thisown = 0
4280 self.__class__ = UpdateUIEvent
4281 _core_.UpdateUIEvent_swigregister(UpdateUIEventPtr)
4282
4283 def UpdateUIEvent_SetUpdateInterval(*args, **kwargs):
4284 """UpdateUIEvent_SetUpdateInterval(long updateInterval)"""
4285 return _core_.UpdateUIEvent_SetUpdateInterval(*args, **kwargs)
4286
4287 def UpdateUIEvent_GetUpdateInterval(*args, **kwargs):
4288 """UpdateUIEvent_GetUpdateInterval() -> long"""
4289 return _core_.UpdateUIEvent_GetUpdateInterval(*args, **kwargs)
4290
4291 def UpdateUIEvent_CanUpdate(*args, **kwargs):
4292 """UpdateUIEvent_CanUpdate(Window win) -> bool"""
4293 return _core_.UpdateUIEvent_CanUpdate(*args, **kwargs)
4294
4295 def UpdateUIEvent_ResetUpdateTime(*args, **kwargs):
4296 """UpdateUIEvent_ResetUpdateTime()"""
4297 return _core_.UpdateUIEvent_ResetUpdateTime(*args, **kwargs)
4298
4299 def UpdateUIEvent_SetMode(*args, **kwargs):
4300 """UpdateUIEvent_SetMode(int mode)"""
4301 return _core_.UpdateUIEvent_SetMode(*args, **kwargs)
4302
4303 def UpdateUIEvent_GetMode(*args, **kwargs):
4304 """UpdateUIEvent_GetMode() -> int"""
4305 return _core_.UpdateUIEvent_GetMode(*args, **kwargs)
4306
4307 #---------------------------------------------------------------------------
4308
4309 class SysColourChangedEvent(Event):
4310 def __repr__(self):
4311 return "<%s.%s; proxy of C++ wxSysColourChangedEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
4312 def __init__(self, *args, **kwargs):
4313 """__init__(self) -> SysColourChangedEvent"""
4314 newobj = _core_.new_SysColourChangedEvent(*args, **kwargs)
4315 self.this = newobj.this
4316 self.thisown = 1
4317 del newobj.thisown
4318
4319 class SysColourChangedEventPtr(SysColourChangedEvent):
4320 def __init__(self, this):
4321 self.this = this
4322 if not hasattr(self,"thisown"): self.thisown = 0
4323 self.__class__ = SysColourChangedEvent
4324 _core_.SysColourChangedEvent_swigregister(SysColourChangedEventPtr)
4325
4326 #---------------------------------------------------------------------------
4327
4328 class MouseCaptureChangedEvent(Event):
4329 def __repr__(self):
4330 return "<%s.%s; proxy of C++ wxMouseCaptureChangedEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
4331 def __init__(self, *args, **kwargs):
4332 """__init__(self, int winid=0, Window gainedCapture=None) -> MouseCaptureChangedEvent"""
4333 newobj = _core_.new_MouseCaptureChangedEvent(*args, **kwargs)
4334 self.this = newobj.this
4335 self.thisown = 1
4336 del newobj.thisown
4337 def GetCapturedWindow(*args, **kwargs):
4338 """GetCapturedWindow(self) -> Window"""
4339 return _core_.MouseCaptureChangedEvent_GetCapturedWindow(*args, **kwargs)
4340
4341
4342 class MouseCaptureChangedEventPtr(MouseCaptureChangedEvent):
4343 def __init__(self, this):
4344 self.this = this
4345 if not hasattr(self,"thisown"): self.thisown = 0
4346 self.__class__ = MouseCaptureChangedEvent
4347 _core_.MouseCaptureChangedEvent_swigregister(MouseCaptureChangedEventPtr)
4348
4349 #---------------------------------------------------------------------------
4350
4351 class DisplayChangedEvent(Event):
4352 def __repr__(self):
4353 return "<%s.%s; proxy of C++ wxDisplayChangedEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
4354 def __init__(self, *args, **kwargs):
4355 """__init__(self) -> DisplayChangedEvent"""
4356 newobj = _core_.new_DisplayChangedEvent(*args, **kwargs)
4357 self.this = newobj.this
4358 self.thisown = 1
4359 del newobj.thisown
4360
4361 class DisplayChangedEventPtr(DisplayChangedEvent):
4362 def __init__(self, this):
4363 self.this = this
4364 if not hasattr(self,"thisown"): self.thisown = 0
4365 self.__class__ = DisplayChangedEvent
4366 _core_.DisplayChangedEvent_swigregister(DisplayChangedEventPtr)
4367
4368 #---------------------------------------------------------------------------
4369
4370 class PaletteChangedEvent(Event):
4371 def __repr__(self):
4372 return "<%s.%s; proxy of C++ wxPaletteChangedEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
4373 def __init__(self, *args, **kwargs):
4374 """__init__(self, int id=0) -> PaletteChangedEvent"""
4375 newobj = _core_.new_PaletteChangedEvent(*args, **kwargs)
4376 self.this = newobj.this
4377 self.thisown = 1
4378 del newobj.thisown
4379 def SetChangedWindow(*args, **kwargs):
4380 """SetChangedWindow(self, Window win)"""
4381 return _core_.PaletteChangedEvent_SetChangedWindow(*args, **kwargs)
4382
4383 def GetChangedWindow(*args, **kwargs):
4384 """GetChangedWindow(self) -> Window"""
4385 return _core_.PaletteChangedEvent_GetChangedWindow(*args, **kwargs)
4386
4387
4388 class PaletteChangedEventPtr(PaletteChangedEvent):
4389 def __init__(self, this):
4390 self.this = this
4391 if not hasattr(self,"thisown"): self.thisown = 0
4392 self.__class__ = PaletteChangedEvent
4393 _core_.PaletteChangedEvent_swigregister(PaletteChangedEventPtr)
4394
4395 #---------------------------------------------------------------------------
4396
4397 class QueryNewPaletteEvent(Event):
4398 def __repr__(self):
4399 return "<%s.%s; proxy of C++ wxQueryNewPaletteEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
4400 def __init__(self, *args, **kwargs):
4401 """__init__(self, int winid=0) -> QueryNewPaletteEvent"""
4402 newobj = _core_.new_QueryNewPaletteEvent(*args, **kwargs)
4403 self.this = newobj.this
4404 self.thisown = 1
4405 del newobj.thisown
4406 def SetPaletteRealized(*args, **kwargs):
4407 """SetPaletteRealized(self, bool realized)"""
4408 return _core_.QueryNewPaletteEvent_SetPaletteRealized(*args, **kwargs)
4409
4410 def GetPaletteRealized(*args, **kwargs):
4411 """GetPaletteRealized(self) -> bool"""
4412 return _core_.QueryNewPaletteEvent_GetPaletteRealized(*args, **kwargs)
4413
4414
4415 class QueryNewPaletteEventPtr(QueryNewPaletteEvent):
4416 def __init__(self, this):
4417 self.this = this
4418 if not hasattr(self,"thisown"): self.thisown = 0
4419 self.__class__ = QueryNewPaletteEvent
4420 _core_.QueryNewPaletteEvent_swigregister(QueryNewPaletteEventPtr)
4421
4422 #---------------------------------------------------------------------------
4423
4424 class NavigationKeyEvent(Event):
4425 def __repr__(self):
4426 return "<%s.%s; proxy of C++ wxNavigationKeyEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
4427 def __init__(self, *args, **kwargs):
4428 """__init__(self) -> NavigationKeyEvent"""
4429 newobj = _core_.new_NavigationKeyEvent(*args, **kwargs)
4430 self.this = newobj.this
4431 self.thisown = 1
4432 del newobj.thisown
4433 def GetDirection(*args, **kwargs):
4434 """GetDirection(self) -> bool"""
4435 return _core_.NavigationKeyEvent_GetDirection(*args, **kwargs)
4436
4437 def SetDirection(*args, **kwargs):
4438 """SetDirection(self, bool forward)"""
4439 return _core_.NavigationKeyEvent_SetDirection(*args, **kwargs)
4440
4441 def IsWindowChange(*args, **kwargs):
4442 """IsWindowChange(self) -> bool"""
4443 return _core_.NavigationKeyEvent_IsWindowChange(*args, **kwargs)
4444
4445 def SetWindowChange(*args, **kwargs):
4446 """SetWindowChange(self, bool ischange)"""
4447 return _core_.NavigationKeyEvent_SetWindowChange(*args, **kwargs)
4448
4449 def SetFlags(*args, **kwargs):
4450 """SetFlags(self, long flags)"""
4451 return _core_.NavigationKeyEvent_SetFlags(*args, **kwargs)
4452
4453 def GetCurrentFocus(*args, **kwargs):
4454 """GetCurrentFocus(self) -> Window"""
4455 return _core_.NavigationKeyEvent_GetCurrentFocus(*args, **kwargs)
4456
4457 def SetCurrentFocus(*args, **kwargs):
4458 """SetCurrentFocus(self, Window win)"""
4459 return _core_.NavigationKeyEvent_SetCurrentFocus(*args, **kwargs)
4460
4461 IsBackward = _core_.NavigationKeyEvent_IsBackward
4462 IsForward = _core_.NavigationKeyEvent_IsForward
4463 WinChange = _core_.NavigationKeyEvent_WinChange
4464
4465 class NavigationKeyEventPtr(NavigationKeyEvent):
4466 def __init__(self, this):
4467 self.this = this
4468 if not hasattr(self,"thisown"): self.thisown = 0
4469 self.__class__ = NavigationKeyEvent
4470 _core_.NavigationKeyEvent_swigregister(NavigationKeyEventPtr)
4471
4472 #---------------------------------------------------------------------------
4473
4474 class WindowCreateEvent(CommandEvent):
4475 def __repr__(self):
4476 return "<%s.%s; proxy of C++ wxWindowCreateEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
4477 def __init__(self, *args, **kwargs):
4478 """__init__(self, Window win=None) -> WindowCreateEvent"""
4479 newobj = _core_.new_WindowCreateEvent(*args, **kwargs)
4480 self.this = newobj.this
4481 self.thisown = 1
4482 del newobj.thisown
4483 def GetWindow(*args, **kwargs):
4484 """GetWindow(self) -> Window"""
4485 return _core_.WindowCreateEvent_GetWindow(*args, **kwargs)
4486
4487
4488 class WindowCreateEventPtr(WindowCreateEvent):
4489 def __init__(self, this):
4490 self.this = this
4491 if not hasattr(self,"thisown"): self.thisown = 0
4492 self.__class__ = WindowCreateEvent
4493 _core_.WindowCreateEvent_swigregister(WindowCreateEventPtr)
4494
4495 class WindowDestroyEvent(CommandEvent):
4496 def __repr__(self):
4497 return "<%s.%s; proxy of C++ wxWindowDestroyEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
4498 def __init__(self, *args, **kwargs):
4499 """__init__(self, Window win=None) -> WindowDestroyEvent"""
4500 newobj = _core_.new_WindowDestroyEvent(*args, **kwargs)
4501 self.this = newobj.this
4502 self.thisown = 1
4503 del newobj.thisown
4504 def GetWindow(*args, **kwargs):
4505 """GetWindow(self) -> Window"""
4506 return _core_.WindowDestroyEvent_GetWindow(*args, **kwargs)
4507
4508
4509 class WindowDestroyEventPtr(WindowDestroyEvent):
4510 def __init__(self, this):
4511 self.this = this
4512 if not hasattr(self,"thisown"): self.thisown = 0
4513 self.__class__ = WindowDestroyEvent
4514 _core_.WindowDestroyEvent_swigregister(WindowDestroyEventPtr)
4515
4516 #---------------------------------------------------------------------------
4517
4518 class ContextMenuEvent(CommandEvent):
4519 def __repr__(self):
4520 return "<%s.%s; proxy of C++ wxContextMenuEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
4521 def __init__(self, *args, **kwargs):
4522 """__init__(self, wxEventType type=wxEVT_NULL, int winid=0, Point pt=DefaultPosition) -> ContextMenuEvent"""
4523 newobj = _core_.new_ContextMenuEvent(*args, **kwargs)
4524 self.this = newobj.this
4525 self.thisown = 1
4526 del newobj.thisown
4527 def GetPosition(*args, **kwargs):
4528 """GetPosition(self) -> Point"""
4529 return _core_.ContextMenuEvent_GetPosition(*args, **kwargs)
4530
4531 def SetPosition(*args, **kwargs):
4532 """SetPosition(self, Point pos)"""
4533 return _core_.ContextMenuEvent_SetPosition(*args, **kwargs)
4534
4535
4536 class ContextMenuEventPtr(ContextMenuEvent):
4537 def __init__(self, this):
4538 self.this = this
4539 if not hasattr(self,"thisown"): self.thisown = 0
4540 self.__class__ = ContextMenuEvent
4541 _core_.ContextMenuEvent_swigregister(ContextMenuEventPtr)
4542
4543 #---------------------------------------------------------------------------
4544
4545 IDLE_PROCESS_ALL = _core_.IDLE_PROCESS_ALL
4546 IDLE_PROCESS_SPECIFIED = _core_.IDLE_PROCESS_SPECIFIED
4547 class IdleEvent(Event):
4548 def __repr__(self):
4549 return "<%s.%s; proxy of C++ wxIdleEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
4550 def __init__(self, *args, **kwargs):
4551 """__init__(self) -> IdleEvent"""
4552 newobj = _core_.new_IdleEvent(*args, **kwargs)
4553 self.this = newobj.this
4554 self.thisown = 1
4555 del newobj.thisown
4556 def RequestMore(*args, **kwargs):
4557 """RequestMore(self, bool needMore=True)"""
4558 return _core_.IdleEvent_RequestMore(*args, **kwargs)
4559
4560 def MoreRequested(*args, **kwargs):
4561 """MoreRequested(self) -> bool"""
4562 return _core_.IdleEvent_MoreRequested(*args, **kwargs)
4563
4564 def SetMode(*args, **kwargs):
4565 """SetMode(int mode)"""
4566 return _core_.IdleEvent_SetMode(*args, **kwargs)
4567
4568 SetMode = staticmethod(SetMode)
4569 def GetMode(*args, **kwargs):
4570 """GetMode() -> int"""
4571 return _core_.IdleEvent_GetMode(*args, **kwargs)
4572
4573 GetMode = staticmethod(GetMode)
4574 def CanSend(*args, **kwargs):
4575 """CanSend(Window win) -> bool"""
4576 return _core_.IdleEvent_CanSend(*args, **kwargs)
4577
4578 CanSend = staticmethod(CanSend)
4579
4580 class IdleEventPtr(IdleEvent):
4581 def __init__(self, this):
4582 self.this = this
4583 if not hasattr(self,"thisown"): self.thisown = 0
4584 self.__class__ = IdleEvent
4585 _core_.IdleEvent_swigregister(IdleEventPtr)
4586
4587 def IdleEvent_SetMode(*args, **kwargs):
4588 """IdleEvent_SetMode(int mode)"""
4589 return _core_.IdleEvent_SetMode(*args, **kwargs)
4590
4591 def IdleEvent_GetMode(*args, **kwargs):
4592 """IdleEvent_GetMode() -> int"""
4593 return _core_.IdleEvent_GetMode(*args, **kwargs)
4594
4595 def IdleEvent_CanSend(*args, **kwargs):
4596 """IdleEvent_CanSend(Window win) -> bool"""
4597 return _core_.IdleEvent_CanSend(*args, **kwargs)
4598
4599 #---------------------------------------------------------------------------
4600
4601 class PyEvent(Event):
4602 def __repr__(self):
4603 return "<%s.%s; proxy of C++ wxPyEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
4604 def __init__(self, *args, **kwargs):
4605 """__init__(self, int winid=0, wxEventType commandType=wxEVT_NULL) -> PyEvent"""
4606 newobj = _core_.new_PyEvent(*args, **kwargs)
4607 self.this = newobj.this
4608 self.thisown = 1
4609 del newobj.thisown
4610 self.SetSelf(self)
4611
4612 def __del__(self, destroy=_core_.delete_PyEvent):
4613 """__del__(self)"""
4614 try:
4615 if self.thisown: destroy(self)
4616 except: pass
4617
4618 def SetSelf(*args, **kwargs):
4619 """SetSelf(self, PyObject self)"""
4620 return _core_.PyEvent_SetSelf(*args, **kwargs)
4621
4622 def GetSelf(*args, **kwargs):
4623 """GetSelf(self) -> PyObject"""
4624 return _core_.PyEvent_GetSelf(*args, **kwargs)
4625
4626
4627 class PyEventPtr(PyEvent):
4628 def __init__(self, this):
4629 self.this = this
4630 if not hasattr(self,"thisown"): self.thisown = 0
4631 self.__class__ = PyEvent
4632 _core_.PyEvent_swigregister(PyEventPtr)
4633
4634 class PyCommandEvent(CommandEvent):
4635 def __repr__(self):
4636 return "<%s.%s; proxy of C++ wxPyCommandEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
4637 def __init__(self, *args, **kwargs):
4638 """__init__(self, wxEventType commandType=wxEVT_NULL, int id=0) -> PyCommandEvent"""
4639 newobj = _core_.new_PyCommandEvent(*args, **kwargs)
4640 self.this = newobj.this
4641 self.thisown = 1
4642 del newobj.thisown
4643 self.SetSelf(self)
4644
4645 def __del__(self, destroy=_core_.delete_PyCommandEvent):
4646 """__del__(self)"""
4647 try:
4648 if self.thisown: destroy(self)
4649 except: pass
4650
4651 def SetSelf(*args, **kwargs):
4652 """SetSelf(self, PyObject self)"""
4653 return _core_.PyCommandEvent_SetSelf(*args, **kwargs)
4654
4655 def GetSelf(*args, **kwargs):
4656 """GetSelf(self) -> PyObject"""
4657 return _core_.PyCommandEvent_GetSelf(*args, **kwargs)
4658
4659
4660 class PyCommandEventPtr(PyCommandEvent):
4661 def __init__(self, this):
4662 self.this = this
4663 if not hasattr(self,"thisown"): self.thisown = 0
4664 self.__class__ = PyCommandEvent
4665 _core_.PyCommandEvent_swigregister(PyCommandEventPtr)
4666
4667 #---------------------------------------------------------------------------
4668
4669 PYAPP_ASSERT_SUPPRESS = _core_.PYAPP_ASSERT_SUPPRESS
4670 PYAPP_ASSERT_EXCEPTION = _core_.PYAPP_ASSERT_EXCEPTION
4671 PYAPP_ASSERT_DIALOG = _core_.PYAPP_ASSERT_DIALOG
4672 PYAPP_ASSERT_LOG = _core_.PYAPP_ASSERT_LOG
4673 PRINT_WINDOWS = _core_.PRINT_WINDOWS
4674 PRINT_POSTSCRIPT = _core_.PRINT_POSTSCRIPT
4675 class PyApp(EvtHandler):
4676 """
4677 The ``wx.PyApp`` class is an *implementation detail*, please use the
4678 `wx.App` class (or some other derived class) instead.
4679 """
4680 def __repr__(self):
4681 return "<%s.%s; proxy of C++ wxPyApp instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
4682 def __init__(self, *args, **kwargs):
4683 """
4684 __init__(self) -> PyApp
4685
4686 Create a new application object, starting the bootstrap process.
4687 """
4688 newobj = _core_.new_PyApp(*args, **kwargs)
4689 self.this = newobj.this
4690 self.thisown = 1
4691 del newobj.thisown
4692 self._setCallbackInfo(self, PyApp)
4693 self._setOORInfo(self)
4694
4695 def __del__(self, destroy=_core_.delete_PyApp):
4696 """__del__(self)"""
4697 try:
4698 if self.thisown: destroy(self)
4699 except: pass
4700
4701 def _setCallbackInfo(*args, **kwargs):
4702 """_setCallbackInfo(self, PyObject self, PyObject _class)"""
4703 return _core_.PyApp__setCallbackInfo(*args, **kwargs)
4704
4705 def GetAppName(*args, **kwargs):
4706 """
4707 GetAppName(self) -> String
4708
4709 Get the application name.
4710 """
4711 return _core_.PyApp_GetAppName(*args, **kwargs)
4712
4713 def SetAppName(*args, **kwargs):
4714 """
4715 SetAppName(self, String name)
4716
4717 Set the application name. This value may be used automatically by
4718 `wx.Config` and such.
4719 """
4720 return _core_.PyApp_SetAppName(*args, **kwargs)
4721
4722 def GetClassName(*args, **kwargs):
4723 """
4724 GetClassName(self) -> String
4725
4726 Get the application's class name.
4727 """
4728 return _core_.PyApp_GetClassName(*args, **kwargs)
4729
4730 def SetClassName(*args, **kwargs):
4731 """
4732 SetClassName(self, String name)
4733
4734 Set the application's class name. This value may be used for
4735 X-resources if applicable for the platform
4736 """
4737 return _core_.PyApp_SetClassName(*args, **kwargs)
4738
4739 def GetVendorName(*args, **kwargs):
4740 """
4741 GetVendorName(self) -> String
4742
4743 Get the application's vendor name.
4744 """
4745 return _core_.PyApp_GetVendorName(*args, **kwargs)
4746
4747 def SetVendorName(*args, **kwargs):
4748 """
4749 SetVendorName(self, String name)
4750
4751 Set the application's vendor name. This value may be used
4752 automatically by `wx.Config` and such.
4753 """
4754 return _core_.PyApp_SetVendorName(*args, **kwargs)
4755
4756 def GetTraits(*args, **kwargs):
4757 """
4758 GetTraits(self) -> wxAppTraits
4759
4760 Return (and create if necessary) the app traits object to which we
4761 delegate for everything which either should be configurable by the
4762 user (then he can change the default behaviour simply by overriding
4763 CreateTraits() and returning his own traits object) or which is
4764 GUI/console dependent as then wx.AppTraits allows us to abstract the
4765 differences behind the common facade.
4766
4767 :todo: Add support for overriding CreateAppTraits in wxPython.
4768 """
4769 return _core_.PyApp_GetTraits(*args, **kwargs)
4770
4771 def ProcessPendingEvents(*args, **kwargs):
4772 """
4773 ProcessPendingEvents(self)
4774
4775 Process all events in the Pending Events list -- it is necessary to
4776 call this function to process posted events. This normally happens
4777 during each event loop iteration.
4778 """
4779 return _core_.PyApp_ProcessPendingEvents(*args, **kwargs)
4780
4781 def Yield(*args, **kwargs):
4782 """
4783 Yield(self, bool onlyIfNeeded=False) -> bool
4784
4785 Process all currently pending events right now, instead of waiting
4786 until return to the event loop. It is an error to call ``Yield``
4787 recursively unless the value of ``onlyIfNeeded`` is True.
4788
4789 :warning: This function is dangerous as it can lead to unexpected
4790 reentrancies (i.e. when called from an event handler it may
4791 result in calling the same event handler again), use with
4792 extreme care or, better, don't use at all!
4793
4794 :see: `wx.Yield`, `wx.YieldIfNeeded`, `wx.SafeYield`
4795
4796 """
4797 return _core_.PyApp_Yield(*args, **kwargs)
4798
4799 def WakeUpIdle(*args, **kwargs):
4800 """
4801 WakeUpIdle(self)
4802
4803 Make sure that idle events are sent again.
4804 :see: `wx.WakeUpIdle`
4805 """
4806 return _core_.PyApp_WakeUpIdle(*args, **kwargs)
4807
4808 def IsMainLoopRunning(*args, **kwargs):
4809 """
4810 IsMainLoopRunning() -> bool
4811
4812 Returns True if we're running the main loop, i.e. if the events can
4813 currently be dispatched.
4814 """
4815 return _core_.PyApp_IsMainLoopRunning(*args, **kwargs)
4816
4817 IsMainLoopRunning = staticmethod(IsMainLoopRunning)
4818 def MainLoop(*args, **kwargs):
4819 """
4820 MainLoop(self) -> int
4821
4822 Execute the main GUI loop, the function doesn't normally return until
4823 all top level windows have been closed and destroyed.
4824 """
4825 return _core_.PyApp_MainLoop(*args, **kwargs)
4826
4827 def Exit(*args, **kwargs):
4828 """
4829 Exit(self)
4830
4831 Exit the main loop thus terminating the application.
4832 :see: `wx.Exit`
4833 """
4834 return _core_.PyApp_Exit(*args, **kwargs)
4835
4836 def ExitMainLoop(*args, **kwargs):
4837 """
4838 ExitMainLoop(self)
4839
4840 Exit the main GUI loop during the next iteration of the main
4841 loop, (i.e. it does not stop the program immediately!)
4842 """
4843 return _core_.PyApp_ExitMainLoop(*args, **kwargs)
4844
4845 def Pending(*args, **kwargs):
4846 """
4847 Pending(self) -> bool
4848
4849 Returns True if there are unprocessed events in the event queue.
4850 """
4851 return _core_.PyApp_Pending(*args, **kwargs)
4852
4853 def Dispatch(*args, **kwargs):
4854 """
4855 Dispatch(self) -> bool
4856
4857 Process the first event in the event queue (blocks until an event
4858 appears if there are none currently)
4859 """
4860 return _core_.PyApp_Dispatch(*args, **kwargs)
4861
4862 def ProcessIdle(*args, **kwargs):
4863 """
4864 ProcessIdle(self) -> bool
4865
4866 Called from the MainLoop when the application becomes idle (there are
4867 no pending events) and sends a `wx.IdleEvent` to all interested
4868 parties. Returns True if more idle events are needed, False if not.
4869 """
4870 return _core_.PyApp_ProcessIdle(*args, **kwargs)
4871
4872 def SendIdleEvents(*args, **kwargs):
4873 """
4874 SendIdleEvents(self, Window win, IdleEvent event) -> bool
4875
4876 Send idle event to window and all subwindows. Returns True if more
4877 idle time is requested.
4878 """
4879 return _core_.PyApp_SendIdleEvents(*args, **kwargs)
4880
4881 def IsActive(*args, **kwargs):
4882 """
4883 IsActive(self) -> bool
4884
4885 Return True if our app has focus.
4886 """
4887 return _core_.PyApp_IsActive(*args, **kwargs)
4888
4889 def SetTopWindow(*args, **kwargs):
4890 """
4891 SetTopWindow(self, Window win)
4892
4893 Set the *main* top level window
4894 """
4895 return _core_.PyApp_SetTopWindow(*args, **kwargs)
4896
4897 def GetTopWindow(*args, **kwargs):
4898 """
4899 GetTopWindow(self) -> Window
4900
4901 Return the *main* top level window (if it hadn't been set previously
4902 with SetTopWindow(), will return just some top level window and, if
4903 there not any, will return None)
4904 """
4905 return _core_.PyApp_GetTopWindow(*args, **kwargs)
4906
4907 def SetExitOnFrameDelete(*args, **kwargs):
4908 """
4909 SetExitOnFrameDelete(self, bool flag)
4910
4911 Control the exit behaviour: by default, the program will exit the main
4912 loop (and so, usually, terminate) when the last top-level program
4913 window is deleted. Beware that if you disable this behaviour (with
4914 SetExitOnFrameDelete(False)), you'll have to call ExitMainLoop()
4915 explicitly from somewhere.
4916 """
4917 return _core_.PyApp_SetExitOnFrameDelete(*args, **kwargs)
4918
4919 def GetExitOnFrameDelete(*args, **kwargs):
4920 """
4921 GetExitOnFrameDelete(self) -> bool
4922
4923 Get the current exit behaviour setting.
4924 """
4925 return _core_.PyApp_GetExitOnFrameDelete(*args, **kwargs)
4926
4927 def SetUseBestVisual(*args, **kwargs):
4928 """
4929 SetUseBestVisual(self, bool flag)
4930
4931 Set whether the app should try to use the best available visual on
4932 systems where more than one is available, (Sun, SGI, XFree86 4, etc.)
4933 """
4934 return _core_.PyApp_SetUseBestVisual(*args, **kwargs)
4935
4936 def GetUseBestVisual(*args, **kwargs):
4937 """
4938 GetUseBestVisual(self) -> bool
4939
4940 Get current UseBestVisual setting.
4941 """
4942 return _core_.PyApp_GetUseBestVisual(*args, **kwargs)
4943
4944 def SetPrintMode(*args, **kwargs):
4945 """SetPrintMode(self, int mode)"""
4946 return _core_.PyApp_SetPrintMode(*args, **kwargs)
4947
4948 def GetPrintMode(*args, **kwargs):
4949 """GetPrintMode(self) -> int"""
4950 return _core_.PyApp_GetPrintMode(*args, **kwargs)
4951
4952 def SetAssertMode(*args, **kwargs):
4953 """
4954 SetAssertMode(self, int mode)
4955
4956 Set the OnAssert behaviour for debug and hybrid builds.
4957 """
4958 return _core_.PyApp_SetAssertMode(*args, **kwargs)
4959
4960 def GetAssertMode(*args, **kwargs):
4961 """
4962 GetAssertMode(self) -> int
4963
4964 Get the current OnAssert behaviour setting.
4965 """
4966 return _core_.PyApp_GetAssertMode(*args, **kwargs)
4967
4968 def GetMacSupportPCMenuShortcuts(*args, **kwargs):
4969 """GetMacSupportPCMenuShortcuts() -> bool"""
4970 return _core_.PyApp_GetMacSupportPCMenuShortcuts(*args, **kwargs)
4971
4972 GetMacSupportPCMenuShortcuts = staticmethod(GetMacSupportPCMenuShortcuts)
4973 def GetMacAboutMenuItemId(*args, **kwargs):
4974 """GetMacAboutMenuItemId() -> long"""
4975 return _core_.PyApp_GetMacAboutMenuItemId(*args, **kwargs)
4976
4977 GetMacAboutMenuItemId = staticmethod(GetMacAboutMenuItemId)
4978 def GetMacPreferencesMenuItemId(*args, **kwargs):
4979 """GetMacPreferencesMenuItemId() -> long"""
4980 return _core_.PyApp_GetMacPreferencesMenuItemId(*args, **kwargs)
4981
4982 GetMacPreferencesMenuItemId = staticmethod(GetMacPreferencesMenuItemId)
4983 def GetMacExitMenuItemId(*args, **kwargs):
4984 """GetMacExitMenuItemId() -> long"""
4985 return _core_.PyApp_GetMacExitMenuItemId(*args, **kwargs)
4986
4987 GetMacExitMenuItemId = staticmethod(GetMacExitMenuItemId)
4988 def GetMacHelpMenuTitleName(*args, **kwargs):
4989 """GetMacHelpMenuTitleName() -> String"""
4990 return _core_.PyApp_GetMacHelpMenuTitleName(*args, **kwargs)
4991
4992 GetMacHelpMenuTitleName = staticmethod(GetMacHelpMenuTitleName)
4993 def SetMacSupportPCMenuShortcuts(*args, **kwargs):
4994 """SetMacSupportPCMenuShortcuts(bool val)"""
4995 return _core_.PyApp_SetMacSupportPCMenuShortcuts(*args, **kwargs)
4996
4997 SetMacSupportPCMenuShortcuts = staticmethod(SetMacSupportPCMenuShortcuts)
4998 def SetMacAboutMenuItemId(*args, **kwargs):
4999 """SetMacAboutMenuItemId(long val)"""
5000 return _core_.PyApp_SetMacAboutMenuItemId(*args, **kwargs)
5001
5002 SetMacAboutMenuItemId = staticmethod(SetMacAboutMenuItemId)
5003 def SetMacPreferencesMenuItemId(*args, **kwargs):
5004 """SetMacPreferencesMenuItemId(long val)"""
5005 return _core_.PyApp_SetMacPreferencesMenuItemId(*args, **kwargs)
5006
5007 SetMacPreferencesMenuItemId = staticmethod(SetMacPreferencesMenuItemId)
5008 def SetMacExitMenuItemId(*args, **kwargs):
5009 """SetMacExitMenuItemId(long val)"""
5010 return _core_.PyApp_SetMacExitMenuItemId(*args, **kwargs)
5011
5012 SetMacExitMenuItemId = staticmethod(SetMacExitMenuItemId)
5013 def SetMacHelpMenuTitleName(*args, **kwargs):
5014 """SetMacHelpMenuTitleName(String val)"""
5015 return _core_.PyApp_SetMacHelpMenuTitleName(*args, **kwargs)
5016
5017 SetMacHelpMenuTitleName = staticmethod(SetMacHelpMenuTitleName)
5018 def _BootstrapApp(*args, **kwargs):
5019 """
5020 _BootstrapApp(self)
5021
5022 For internal use only
5023 """
5024 return _core_.PyApp__BootstrapApp(*args, **kwargs)
5025
5026 def GetComCtl32Version(*args, **kwargs):
5027 """
5028 GetComCtl32Version() -> int
5029
5030 Returns 400, 470, 471, etc. for comctl32.dll 4.00, 4.70, 4.71 or 0 if
5031 it wasn't found at all. Raises an exception on non-Windows platforms.
5032 """
5033 return _core_.PyApp_GetComCtl32Version(*args, **kwargs)
5034
5035 GetComCtl32Version = staticmethod(GetComCtl32Version)
5036
5037 class PyAppPtr(PyApp):
5038 def __init__(self, this):
5039 self.this = this
5040 if not hasattr(self,"thisown"): self.thisown = 0
5041 self.__class__ = PyApp
5042 _core_.PyApp_swigregister(PyAppPtr)
5043
5044 def PyApp_IsMainLoopRunning(*args, **kwargs):
5045 """
5046 PyApp_IsMainLoopRunning() -> bool
5047
5048 Returns True if we're running the main loop, i.e. if the events can
5049 currently be dispatched.
5050 """
5051 return _core_.PyApp_IsMainLoopRunning(*args, **kwargs)
5052
5053 def PyApp_GetMacSupportPCMenuShortcuts(*args, **kwargs):
5054 """PyApp_GetMacSupportPCMenuShortcuts() -> bool"""
5055 return _core_.PyApp_GetMacSupportPCMenuShortcuts(*args, **kwargs)
5056
5057 def PyApp_GetMacAboutMenuItemId(*args, **kwargs):
5058 """PyApp_GetMacAboutMenuItemId() -> long"""
5059 return _core_.PyApp_GetMacAboutMenuItemId(*args, **kwargs)
5060
5061 def PyApp_GetMacPreferencesMenuItemId(*args, **kwargs):
5062 """PyApp_GetMacPreferencesMenuItemId() -> long"""
5063 return _core_.PyApp_GetMacPreferencesMenuItemId(*args, **kwargs)
5064
5065 def PyApp_GetMacExitMenuItemId(*args, **kwargs):
5066 """PyApp_GetMacExitMenuItemId() -> long"""
5067 return _core_.PyApp_GetMacExitMenuItemId(*args, **kwargs)
5068
5069 def PyApp_GetMacHelpMenuTitleName(*args, **kwargs):
5070 """PyApp_GetMacHelpMenuTitleName() -> String"""
5071 return _core_.PyApp_GetMacHelpMenuTitleName(*args, **kwargs)
5072
5073 def PyApp_SetMacSupportPCMenuShortcuts(*args, **kwargs):
5074 """PyApp_SetMacSupportPCMenuShortcuts(bool val)"""
5075 return _core_.PyApp_SetMacSupportPCMenuShortcuts(*args, **kwargs)
5076
5077 def PyApp_SetMacAboutMenuItemId(*args, **kwargs):
5078 """PyApp_SetMacAboutMenuItemId(long val)"""
5079 return _core_.PyApp_SetMacAboutMenuItemId(*args, **kwargs)
5080
5081 def PyApp_SetMacPreferencesMenuItemId(*args, **kwargs):
5082 """PyApp_SetMacPreferencesMenuItemId(long val)"""
5083 return _core_.PyApp_SetMacPreferencesMenuItemId(*args, **kwargs)
5084
5085 def PyApp_SetMacExitMenuItemId(*args, **kwargs):
5086 """PyApp_SetMacExitMenuItemId(long val)"""
5087 return _core_.PyApp_SetMacExitMenuItemId(*args, **kwargs)
5088
5089 def PyApp_SetMacHelpMenuTitleName(*args, **kwargs):
5090 """PyApp_SetMacHelpMenuTitleName(String val)"""
5091 return _core_.PyApp_SetMacHelpMenuTitleName(*args, **kwargs)
5092
5093 def PyApp_GetComCtl32Version(*args, **kwargs):
5094 """
5095 PyApp_GetComCtl32Version() -> int
5096
5097 Returns 400, 470, 471, etc. for comctl32.dll 4.00, 4.70, 4.71 or 0 if
5098 it wasn't found at all. Raises an exception on non-Windows platforms.
5099 """
5100 return _core_.PyApp_GetComCtl32Version(*args, **kwargs)
5101
5102 #---------------------------------------------------------------------------
5103
5104
5105 def Exit(*args, **kwargs):
5106 """
5107 Exit()
5108
5109 Force an exit of the application. Convenience for wx.GetApp().Exit()
5110 """
5111 return _core_.Exit(*args, **kwargs)
5112
5113 def Yield(*args, **kwargs):
5114 """
5115 Yield() -> bool
5116
5117 Yield to other apps/messages. Convenience for wx.GetApp().Yield()
5118 """
5119 return _core_.Yield(*args, **kwargs)
5120
5121 def YieldIfNeeded(*args, **kwargs):
5122 """
5123 YieldIfNeeded() -> bool
5124
5125 Yield to other apps/messages. Convenience for wx.GetApp().Yield(True)
5126 """
5127 return _core_.YieldIfNeeded(*args, **kwargs)
5128
5129 def SafeYield(*args, **kwargs):
5130 """
5131 SafeYield(Window win=None, bool onlyIfNeeded=False) -> bool
5132
5133 This function is similar to `wx.Yield`, except that it disables the
5134 user input to all program windows before calling `wx.Yield` and
5135 re-enables it again afterwards. If ``win`` is not None, this window
5136 will remain enabled, allowing the implementation of some limited user
5137 interaction.
5138
5139 :Returns: the result of the call to `wx.Yield`.
5140 """
5141 return _core_.SafeYield(*args, **kwargs)
5142
5143 def WakeUpIdle(*args, **kwargs):
5144 """
5145 WakeUpIdle()
5146
5147 Cause the message queue to become empty again, so idle events will be
5148 sent.
5149 """
5150 return _core_.WakeUpIdle(*args, **kwargs)
5151
5152 def PostEvent(*args, **kwargs):
5153 """
5154 PostEvent(EvtHandler dest, Event event)
5155
5156 Send an event to a window or other wx.EvtHandler to be processed
5157 later.
5158 """
5159 return _core_.PostEvent(*args, **kwargs)
5160
5161 def App_CleanUp(*args, **kwargs):
5162 """
5163 App_CleanUp()
5164
5165 For internal use only, it is used to cleanup after wxWidgets when
5166 Python shuts down.
5167 """
5168 return _core_.App_CleanUp(*args, **kwargs)
5169
5170 def GetApp(*args, **kwargs):
5171 """
5172 GetApp() -> PyApp
5173
5174 Return a reference to the current wx.App object.
5175 """
5176 return _core_.GetApp(*args, **kwargs)
5177
5178 def SetDefaultPyEncoding(*args, **kwargs):
5179 """
5180 SetDefaultPyEncoding(string encoding)
5181
5182 Sets the encoding that wxPython will use when it needs to convert a
5183 Python string or unicode object to or from a wxString.
5184 """
5185 return _core_.SetDefaultPyEncoding(*args, **kwargs)
5186
5187 def GetDefaultPyEncoding(*args, **kwargs):
5188 """
5189 GetDefaultPyEncoding() -> string
5190
5191 Gets the current encoding that wxPython will use when it needs to
5192 convert a Python string or unicode object to or from a wxString.
5193 """
5194 return _core_.GetDefaultPyEncoding(*args, **kwargs)
5195 #----------------------------------------------------------------------
5196
5197 class PyOnDemandOutputWindow:
5198 """
5199 A class that can be used for redirecting Python's stdout and
5200 stderr streams. It will do nothing until something is wrriten to
5201 the stream at which point it will create a Frame with a text area
5202 and write the text there.
5203 """
5204 def __init__(self, title = "wxPython: stdout/stderr"):
5205 self.frame = None
5206 self.title = title
5207 self.pos = wx.DefaultPosition
5208 self.size = (450, 300)
5209 self.parent = None
5210
5211 def SetParent(self, parent):
5212 """Set the window to be used as the popup Frame's parent."""
5213 self.parent = parent
5214
5215
5216 def CreateOutputWindow(self, st):
5217 self.frame = wx.Frame(self.parent, -1, self.title, self.pos, self.size,
5218 style=wx.DEFAULT_FRAME_STYLE)
5219 self.text = wx.TextCtrl(self.frame, -1, "",
5220 style=wx.TE_MULTILINE|wx.TE_READONLY)
5221 self.text.AppendText(st)
5222 self.frame.Show(True)
5223 EVT_CLOSE(self.frame, self.OnCloseWindow)
5224
5225
5226 def OnCloseWindow(self, event):
5227 if self.frame is not None:
5228 self.frame.Destroy()
5229 self.frame = None
5230 self.text = None
5231
5232
5233 # These methods provide the file-like output behaviour.
5234 def write(self, text):
5235 """
5236 Create the output window if needed and write the string to it.
5237 If not called in the context of the gui thread then uses
5238 CallAfter to do the work there.
5239 """
5240 if self.frame is None:
5241 if not wx.Thread_IsMain():
5242 wx.CallAfter(self.CreateOutputWindow, text)
5243 else:
5244 self.CreateOutputWindow(text)
5245 else:
5246 if not wx.Thread_IsMain():
5247 wx.CallAfter(self.text.AppendText, text)
5248 else:
5249 self.text.AppendText(text)
5250
5251
5252 def close(self):
5253 if self.frame is not None:
5254 wx.CallAfter(self.frame.Close)
5255
5256
5257 def flush(self):
5258 pass
5259
5260
5261
5262 #----------------------------------------------------------------------
5263
5264 _defRedirect = (wx.Platform == '__WXMSW__' or wx.Platform == '__WXMAC__')
5265
5266 class App(wx.PyApp):
5267 """
5268 The ``wx.App`` class represents the application and is used to:
5269
5270 * bootstrap the wxPython system and initialize the underlying
5271 gui toolkit
5272 * set and get application-wide properties
5273 * implement the windowing system main message or event loop,
5274 and to dispatch events to window instances
5275 * etc.
5276
5277 Every application must have a ``wx.App`` instance, and all
5278 creation of UI objects should be delayed until after the
5279 ``wx.App`` object has been created in order to ensure that the gui
5280 platform and wxWidgets have been fully initialized.
5281
5282 Normally you would derive from this class and implement an
5283 ``OnInit`` method that creates a frame and then calls
5284 ``self.SetTopWindow(frame)``.
5285
5286 :see: `wx.PySimpleApp` for a simpler app class that can be used
5287 directly.
5288 """
5289
5290 outputWindowClass = PyOnDemandOutputWindow
5291
5292 def __init__(self, redirect=_defRedirect, filename=None,
5293 useBestVisual=False, clearSigInt=True):
5294 """
5295 Construct a ``wx.App`` object.
5296
5297 :param redirect: Should ``sys.stdout`` and ``sys.stderr`` be
5298 redirected? Defaults to True on Windows and Mac, False
5299 otherwise. If `filename` is None then output will be
5300 redirected to a window that pops up as needed. (You can
5301 control what kind of window is created for the output by
5302 resetting the class variable ``outputWindowClass`` to a
5303 class of your choosing.)
5304
5305 :param filename: The name of a file to redirect output to, if
5306 redirect is True.
5307
5308 :param useBestVisual: Should the app try to use the best
5309 available visual provided by the system (only relevant on
5310 systems that have more than one visual.) This parameter
5311 must be used instead of calling `SetUseBestVisual` later
5312 on because it must be set before the underlying GUI
5313 toolkit is initialized.
5314
5315 :param clearSigInt: Should SIGINT be cleared? This allows the
5316 app to terminate upon a Ctrl-C in the console like other
5317 GUI apps will.
5318
5319 :note: You should override OnInit to do applicaition
5320 initialization to ensure that the system, toolkit and
5321 wxWidgets are fully initialized.
5322 """
5323 wx.PyApp.__init__(self)
5324
5325 if wx.Platform == "__WXMAC__":
5326 try:
5327 import MacOS
5328 if not MacOS.WMAvailable():
5329 print """\
5330 This program needs access to the screen. Please run with 'pythonw',
5331 not 'python', and only when you are logged in on the main display of
5332 your Mac."""
5333 _sys.exit(1)
5334 except SystemExit:
5335 raise
5336 except:
5337 pass
5338
5339 # This has to be done before OnInit
5340 self.SetUseBestVisual(useBestVisual)
5341
5342 # Set the default handler for SIGINT. This fixes a problem
5343 # where if Ctrl-C is pressed in the console that started this
5344 # app then it will not appear to do anything, (not even send
5345 # KeyboardInterrupt???) but will later segfault on exit. By
5346 # setting the default handler then the app will exit, as
5347 # expected (depending on platform.)
5348 if clearSigInt:
5349 try:
5350 import signal
5351 signal.signal(signal.SIGINT, signal.SIG_DFL)
5352 except:
5353 pass
5354
5355 # Save and redirect the stdio to a window?
5356 self.stdioWin = None
5357 self.saveStdio = (_sys.stdout, _sys.stderr)
5358 if redirect:
5359 self.RedirectStdio(filename)
5360
5361 # Use Python's install prefix as the default
5362 wx.StandardPaths.Get().SetInstallPrefix(_sys.prefix)
5363
5364 # This finishes the initialization of wxWindows and then calls
5365 # the OnInit that should be present in the derived class
5366 self._BootstrapApp()
5367
5368
5369 def __del__(self):
5370 try:
5371 self.RestoreStdio() # Just in case the MainLoop was overridden
5372 except:
5373 pass
5374
5375
5376 def SetTopWindow(self, frame):
5377 """Set the \"main\" top level window"""
5378 if self.stdioWin:
5379 self.stdioWin.SetParent(frame)
5380 wx.PyApp.SetTopWindow(self, frame)
5381
5382
5383 def MainLoop(self):
5384 """Execute the main GUI event loop"""
5385 wx.PyApp.MainLoop(self)
5386 self.RestoreStdio()
5387
5388
5389 def RedirectStdio(self, filename=None):
5390 """Redirect sys.stdout and sys.stderr to a file or a popup window."""
5391 if filename:
5392 _sys.stdout = _sys.stderr = open(filename, 'a')
5393 else:
5394 self.stdioWin = self.outputWindowClass()
5395 _sys.stdout = _sys.stderr = self.stdioWin
5396
5397
5398 def RestoreStdio(self):
5399 _sys.stdout, _sys.stderr = self.saveStdio
5400
5401
5402 def SetOutputWindowAttributes(self, title=None, pos=None, size=None):
5403 """
5404 Set the title, position and/or size of the output window if
5405 the stdio has been redirected. This should be called before
5406 any output would cause the output window to be created.
5407 """
5408 if self.stdioWin:
5409 if title is not None:
5410 self.stdioWin.title = title
5411 if pos is not None:
5412 self.stdioWin.pos = pos
5413 if size is not None:
5414 self.stdioWin.size = size
5415
5416
5417
5418
5419 # change from wx.PyApp_XX to wx.App_XX
5420 App_GetMacSupportPCMenuShortcuts = _core_.PyApp_GetMacSupportPCMenuShortcuts
5421 App_GetMacAboutMenuItemId = _core_.PyApp_GetMacAboutMenuItemId
5422 App_GetMacPreferencesMenuItemId = _core_.PyApp_GetMacPreferencesMenuItemId
5423 App_GetMacExitMenuItemId = _core_.PyApp_GetMacExitMenuItemId
5424 App_GetMacHelpMenuTitleName = _core_.PyApp_GetMacHelpMenuTitleName
5425 App_SetMacSupportPCMenuShortcuts = _core_.PyApp_SetMacSupportPCMenuShortcuts
5426 App_SetMacAboutMenuItemId = _core_.PyApp_SetMacAboutMenuItemId
5427 App_SetMacPreferencesMenuItemId = _core_.PyApp_SetMacPreferencesMenuItemId
5428 App_SetMacExitMenuItemId = _core_.PyApp_SetMacExitMenuItemId
5429 App_SetMacHelpMenuTitleName = _core_.PyApp_SetMacHelpMenuTitleName
5430 App_GetComCtl32Version = _core_.PyApp_GetComCtl32Version
5431
5432 #----------------------------------------------------------------------------
5433
5434 class PySimpleApp(wx.App):
5435 """
5436 A simple application class. You can just create one of these and
5437 then then make your top level windows later, and not have to worry
5438 about OnInit. For example::
5439
5440 app = wx.PySimpleApp()
5441 frame = wx.Frame(None, title='Hello World')
5442 frame.Show()
5443 app.MainLoop()
5444
5445 :see: `wx.App`
5446 """
5447
5448 def __init__(self, redirect=False, filename=None,
5449 useBestVisual=False, clearSigInt=True):
5450 """
5451 :see: `wx.App.__init__`
5452 """
5453 wx.App.__init__(self, redirect, filename, useBestVisual, clearSigInt)
5454
5455 def OnInit(self):
5456 return True
5457
5458
5459
5460 # Is anybody using this one?
5461 class PyWidgetTester(wx.App):
5462 def __init__(self, size = (250, 100)):
5463 self.size = size
5464 wx.App.__init__(self, 0)
5465
5466 def OnInit(self):
5467 self.frame = wx.Frame(None, -1, "Widget Tester", pos=(0,0), size=self.size)
5468 self.SetTopWindow(self.frame)
5469 return True
5470
5471 def SetWidget(self, widgetClass, *args, **kwargs):
5472 w = widgetClass(self.frame, *args, **kwargs)
5473 self.frame.Show(True)
5474
5475 #----------------------------------------------------------------------------
5476 # DO NOT hold any other references to this object. This is how we
5477 # know when to cleanup system resources that wxWidgets is holding. When
5478 # the sys module is unloaded, the refcount on sys.__wxPythonCleanup
5479 # goes to zero and it calls the wx.App_CleanUp function.
5480
5481 class __wxPyCleanup:
5482 def __init__(self):
5483 self.cleanup = _core_.App_CleanUp
5484 def __del__(self):
5485 self.cleanup()
5486
5487 _sys.__wxPythonCleanup = __wxPyCleanup()
5488
5489 ## # another possible solution, but it gets called too early...
5490 ## import atexit
5491 ## atexit.register(_core_.wxApp_CleanUp)
5492
5493
5494 #----------------------------------------------------------------------------
5495
5496 #---------------------------------------------------------------------------
5497
5498 class EventLoop(object):
5499 def __repr__(self):
5500 return "<%s.%s; proxy of C++ wxEventLoop instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
5501 def __init__(self, *args, **kwargs):
5502 """__init__(self) -> EventLoop"""
5503 newobj = _core_.new_EventLoop(*args, **kwargs)
5504 self.this = newobj.this
5505 self.thisown = 1
5506 del newobj.thisown
5507 def __del__(self, destroy=_core_.delete_EventLoop):
5508 """__del__(self)"""
5509 try:
5510 if self.thisown: destroy(self)
5511 except: pass
5512
5513 def Run(*args, **kwargs):
5514 """Run(self) -> int"""
5515 return _core_.EventLoop_Run(*args, **kwargs)
5516
5517 def Exit(*args, **kwargs):
5518 """Exit(self, int rc=0)"""
5519 return _core_.EventLoop_Exit(*args, **kwargs)
5520
5521 def Pending(*args, **kwargs):
5522 """Pending(self) -> bool"""
5523 return _core_.EventLoop_Pending(*args, **kwargs)
5524
5525 def Dispatch(*args, **kwargs):
5526 """Dispatch(self) -> bool"""
5527 return _core_.EventLoop_Dispatch(*args, **kwargs)
5528
5529 def IsRunning(*args, **kwargs):
5530 """IsRunning(self) -> bool"""
5531 return _core_.EventLoop_IsRunning(*args, **kwargs)
5532
5533 def GetActive(*args, **kwargs):
5534 """GetActive() -> EventLoop"""
5535 return _core_.EventLoop_GetActive(*args, **kwargs)
5536
5537 GetActive = staticmethod(GetActive)
5538 def SetActive(*args, **kwargs):
5539 """SetActive(EventLoop loop)"""
5540 return _core_.EventLoop_SetActive(*args, **kwargs)
5541
5542 SetActive = staticmethod(SetActive)
5543
5544 class EventLoopPtr(EventLoop):
5545 def __init__(self, this):
5546 self.this = this
5547 if not hasattr(self,"thisown"): self.thisown = 0
5548 self.__class__ = EventLoop
5549 _core_.EventLoop_swigregister(EventLoopPtr)
5550
5551 def EventLoop_GetActive(*args, **kwargs):
5552 """EventLoop_GetActive() -> EventLoop"""
5553 return _core_.EventLoop_GetActive(*args, **kwargs)
5554
5555 def EventLoop_SetActive(*args, **kwargs):
5556 """EventLoop_SetActive(EventLoop loop)"""
5557 return _core_.EventLoop_SetActive(*args, **kwargs)
5558
5559 #---------------------------------------------------------------------------
5560
5561 class AcceleratorEntry(object):
5562 """
5563 A class used to define items in an `wx.AcceleratorTable`. wxPython
5564 programs can choose to use wx.AcceleratorEntry objects, but using a
5565 list of 3-tuple of integers (flags, keyCode, cmdID) usually works just
5566 as well. See `__init__` for of the tuple values.
5567
5568 :see: `wx.AcceleratorTable`
5569 """
5570 def __repr__(self):
5571 return "<%s.%s; proxy of C++ wxAcceleratorEntry instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
5572 def __init__(self, *args, **kwargs):
5573 """
5574 __init__(self, int flags=0, int keyCode=0, int cmdID=0) -> AcceleratorEntry
5575
5576 Construct a wx.AcceleratorEntry.
5577 """
5578 newobj = _core_.new_AcceleratorEntry(*args, **kwargs)
5579 self.this = newobj.this
5580 self.thisown = 1
5581 del newobj.thisown
5582 def __del__(self, destroy=_core_.delete_AcceleratorEntry):
5583 """__del__(self)"""
5584 try:
5585 if self.thisown: destroy(self)
5586 except: pass
5587
5588 def Set(*args, **kwargs):
5589 """
5590 Set(self, int flags, int keyCode, int cmd)
5591
5592 (Re)set the attributes of a wx.AcceleratorEntry.
5593 :see `__init__`
5594 """
5595 return _core_.AcceleratorEntry_Set(*args, **kwargs)
5596
5597 def GetFlags(*args, **kwargs):
5598 """
5599 GetFlags(self) -> int
5600
5601 Get the AcceleratorEntry's flags.
5602 """
5603 return _core_.AcceleratorEntry_GetFlags(*args, **kwargs)
5604
5605 def GetKeyCode(*args, **kwargs):
5606 """
5607 GetKeyCode(self) -> int
5608
5609 Get the AcceleratorEntry's keycode.
5610 """
5611 return _core_.AcceleratorEntry_GetKeyCode(*args, **kwargs)
5612
5613 def GetCommand(*args, **kwargs):
5614 """
5615 GetCommand(self) -> int
5616
5617 Get the AcceleratorEntry's command ID.
5618 """
5619 return _core_.AcceleratorEntry_GetCommand(*args, **kwargs)
5620
5621
5622 class AcceleratorEntryPtr(AcceleratorEntry):
5623 def __init__(self, this):
5624 self.this = this
5625 if not hasattr(self,"thisown"): self.thisown = 0
5626 self.__class__ = AcceleratorEntry
5627 _core_.AcceleratorEntry_swigregister(AcceleratorEntryPtr)
5628
5629 class AcceleratorTable(Object):
5630 """
5631 An accelerator table allows the application to specify a table of
5632 keyboard shortcuts for menus or other commands. On Windows, menu or
5633 button commands are supported; on GTK, only menu commands are
5634 supported.
5635 """
5636 def __repr__(self):
5637 return "<%s.%s; proxy of C++ wxAcceleratorTable instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
5638 def __init__(self, *args, **kwargs):
5639 """
5640 __init__(entries) -> AcceleratorTable
5641
5642 Construct an AcceleratorTable from a list of `wx.AcceleratorEntry`
5643 items or or of 3-tuples (flags, keyCode, cmdID)
5644
5645 :see: `wx.AcceleratorEntry`
5646 """
5647 newobj = _core_.new_AcceleratorTable(*args, **kwargs)
5648 self.this = newobj.this
5649 self.thisown = 1
5650 del newobj.thisown
5651 def __del__(self, destroy=_core_.delete_AcceleratorTable):
5652 """__del__(self)"""
5653 try:
5654 if self.thisown: destroy(self)
5655 except: pass
5656
5657 def Ok(*args, **kwargs):
5658 """Ok(self) -> bool"""
5659 return _core_.AcceleratorTable_Ok(*args, **kwargs)
5660
5661
5662 class AcceleratorTablePtr(AcceleratorTable):
5663 def __init__(self, this):
5664 self.this = this
5665 if not hasattr(self,"thisown"): self.thisown = 0
5666 self.__class__ = AcceleratorTable
5667 _core_.AcceleratorTable_swigregister(AcceleratorTablePtr)
5668
5669
5670 def GetAccelFromString(*args, **kwargs):
5671 """GetAccelFromString(String label) -> AcceleratorEntry"""
5672 return _core_.GetAccelFromString(*args, **kwargs)
5673 #---------------------------------------------------------------------------
5674
5675 class VisualAttributes(object):
5676 """struct containing all the visual attributes of a control"""
5677 def __repr__(self):
5678 return "<%s.%s; proxy of C++ wxVisualAttributes instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
5679 def __init__(self, *args, **kwargs):
5680 """
5681 __init__(self) -> VisualAttributes
5682
5683 struct containing all the visual attributes of a control
5684 """
5685 newobj = _core_.new_VisualAttributes(*args, **kwargs)
5686 self.this = newobj.this
5687 self.thisown = 1
5688 del newobj.thisown
5689 def __del__(self, destroy=_core_.delete_VisualAttributes):
5690 """__del__(self)"""
5691 try:
5692 if self.thisown: destroy(self)
5693 except: pass
5694
5695 font = property(_core_.VisualAttributes_font_get, _core_.VisualAttributes_font_set)
5696 colFg = property(_core_.VisualAttributes_colFg_get, _core_.VisualAttributes_colFg_set)
5697 colBg = property(_core_.VisualAttributes_colBg_get, _core_.VisualAttributes_colBg_set)
5698
5699 class VisualAttributesPtr(VisualAttributes):
5700 def __init__(self, this):
5701 self.this = this
5702 if not hasattr(self,"thisown"): self.thisown = 0
5703 self.__class__ = VisualAttributes
5704 _core_.VisualAttributes_swigregister(VisualAttributesPtr)
5705 NullAcceleratorTable = cvar.NullAcceleratorTable
5706 PanelNameStr = cvar.PanelNameStr
5707
5708 WINDOW_VARIANT_NORMAL = _core_.WINDOW_VARIANT_NORMAL
5709 WINDOW_VARIANT_SMALL = _core_.WINDOW_VARIANT_SMALL
5710 WINDOW_VARIANT_MINI = _core_.WINDOW_VARIANT_MINI
5711 WINDOW_VARIANT_LARGE = _core_.WINDOW_VARIANT_LARGE
5712 WINDOW_VARIANT_MAX = _core_.WINDOW_VARIANT_MAX
5713 class Window(EvtHandler):
5714 """
5715 wx.Window is the base class for all windows and represents any visible
5716 object on the screen. All controls, top level windows and so on are
5717 wx.Windows. Sizers and device contexts are not however, as they don't
5718 appear on screen themselves.
5719
5720 """
5721 def __repr__(self):
5722 return "<%s.%s; proxy of C++ wxWindow instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
5723 def __init__(self, *args, **kwargs):
5724 """
5725 __init__(self, Window parent, int id=-1, Point pos=DefaultPosition,
5726 Size size=DefaultSize, long style=0, String name=PanelNameStr) -> Window
5727
5728 Construct and show a generic Window.
5729 """
5730 newobj = _core_.new_Window(*args, **kwargs)
5731 self.this = newobj.this
5732 self.thisown = 1
5733 del newobj.thisown
5734 self._setOORInfo(self)
5735
5736 def Create(*args, **kwargs):
5737 """
5738 Create(self, Window parent, int id=-1, Point pos=DefaultPosition,
5739 Size size=DefaultSize, long style=0, String name=PanelNameStr) -> bool
5740
5741 Create the GUI part of the Window for 2-phase creation mode.
5742 """
5743 return _core_.Window_Create(*args, **kwargs)
5744
5745 def Close(*args, **kwargs):
5746 """
5747 Close(self, bool force=False) -> bool
5748
5749 This function simply generates a EVT_CLOSE event whose handler usually
5750 tries to close the window. It doesn't close the window itself,
5751 however. If force is False (the default) then the window's close
5752 handler will be allowed to veto the destruction of the window.
5753 """
5754 return _core_.Window_Close(*args, **kwargs)
5755
5756 def Destroy(*args, **kwargs):
5757 """
5758 Destroy(self) -> bool
5759
5760 Destroys the window safely. Frames and dialogs are not destroyed
5761 immediately when this function is called -- they are added to a list
5762 of windows to be deleted on idle time, when all the window's events
5763 have been processed. This prevents problems with events being sent to
5764 non-existent windows.
5765
5766 Returns True if the window has either been successfully deleted, or it
5767 has been added to the list of windows pending real deletion.
5768 """
5769 return _core_.Window_Destroy(*args, **kwargs)
5770
5771 def DestroyChildren(*args, **kwargs):
5772 """
5773 DestroyChildren(self) -> bool
5774
5775 Destroys all children of a window. Called automatically by the
5776 destructor.
5777 """
5778 return _core_.Window_DestroyChildren(*args, **kwargs)
5779
5780 def IsBeingDeleted(*args, **kwargs):
5781 """
5782 IsBeingDeleted(self) -> bool
5783
5784 Is the window in the process of being deleted?
5785 """
5786 return _core_.Window_IsBeingDeleted(*args, **kwargs)
5787
5788 def SetTitle(*args, **kwargs):
5789 """
5790 SetTitle(self, String title)
5791
5792 Sets the window's title. Applicable only to frames and dialogs.
5793 """
5794 return _core_.Window_SetTitle(*args, **kwargs)
5795
5796 def GetTitle(*args, **kwargs):
5797 """
5798 GetTitle(self) -> String
5799
5800 Gets the window's title. Applicable only to frames and dialogs.
5801 """
5802 return _core_.Window_GetTitle(*args, **kwargs)
5803
5804 def SetLabel(*args, **kwargs):
5805 """
5806 SetLabel(self, String label)
5807
5808 Set the text which the window shows in its label if applicable.
5809 """
5810 return _core_.Window_SetLabel(*args, **kwargs)
5811
5812 def GetLabel(*args, **kwargs):
5813 """
5814 GetLabel(self) -> String
5815
5816 Generic way of getting a label from any window, for identification
5817 purposes. The interpretation of this function differs from class to
5818 class. For frames and dialogs, the value returned is the title. For
5819 buttons or static text controls, it is the button text. This function
5820 can be useful for meta-programs such as testing tools or special-needs
5821 access programs)which need to identify windows by name.
5822 """
5823 return _core_.Window_GetLabel(*args, **kwargs)
5824
5825 def SetName(*args, **kwargs):
5826 """
5827 SetName(self, String name)
5828
5829 Sets the window's name. The window name is used for ressource setting
5830 in X, it is not the same as the window title/label
5831 """
5832 return _core_.Window_SetName(*args, **kwargs)
5833
5834 def GetName(*args, **kwargs):
5835 """
5836 GetName(self) -> String
5837
5838 Returns the windows name. This name is not guaranteed to be unique;
5839 it is up to the programmer to supply an appropriate name in the window
5840 constructor or via wx.Window.SetName.
5841 """
5842 return _core_.Window_GetName(*args, **kwargs)
5843
5844 def SetWindowVariant(*args, **kwargs):
5845 """
5846 SetWindowVariant(self, int variant)
5847
5848 Sets the variant of the window/font size to use for this window, if
5849 the platform supports variants, for example, wxMac.
5850 """
5851 return _core_.Window_SetWindowVariant(*args, **kwargs)
5852
5853 def GetWindowVariant(*args, **kwargs):
5854 """GetWindowVariant(self) -> int"""
5855 return _core_.Window_GetWindowVariant(*args, **kwargs)
5856
5857 def SetId(*args, **kwargs):
5858 """
5859 SetId(self, int winid)
5860
5861 Sets the identifier of the window. Each window has an integer
5862 identifier. If the application has not provided one, an identifier
5863 will be generated. Normally, the identifier should be provided on
5864 creation and should not be modified subsequently.
5865 """
5866 return _core_.Window_SetId(*args, **kwargs)
5867
5868 def GetId(*args, **kwargs):
5869 """
5870 GetId(self) -> int
5871
5872 Returns the identifier of the window. Each window has an integer
5873 identifier. If the application has not provided one (or the default Id
5874 -1 is used) then an unique identifier with a negative value will be
5875 generated.
5876 """
5877 return _core_.Window_GetId(*args, **kwargs)
5878
5879 def NewControlId(*args, **kwargs):
5880 """
5881 NewControlId() -> int
5882
5883 Generate a control id for the controls which were not given one.
5884 """
5885 return _core_.Window_NewControlId(*args, **kwargs)
5886
5887 NewControlId = staticmethod(NewControlId)
5888 def NextControlId(*args, **kwargs):
5889 """
5890 NextControlId(int winid) -> int
5891
5892 Get the id of the control following the one with the given
5893 autogenerated) id
5894 """
5895 return _core_.Window_NextControlId(*args, **kwargs)
5896
5897 NextControlId = staticmethod(NextControlId)
5898 def PrevControlId(*args, **kwargs):
5899 """
5900 PrevControlId(int winid) -> int
5901
5902 Get the id of the control preceding the one with the given
5903 autogenerated) id
5904 """
5905 return _core_.Window_PrevControlId(*args, **kwargs)
5906
5907 PrevControlId = staticmethod(PrevControlId)
5908 def SetSize(*args, **kwargs):
5909 """
5910 SetSize(self, Size size)
5911
5912 Sets the size of the window in pixels.
5913 """
5914 return _core_.Window_SetSize(*args, **kwargs)
5915
5916 def SetDimensions(*args, **kwargs):
5917 """
5918 SetDimensions(self, int x, int y, int width, int height, int sizeFlags=SIZE_AUTO)
5919
5920 Sets the position and size of the window in pixels. The sizeFlags
5921 parameter indicates the interpretation of the other params if they are
5922 -1. wx.SIZE_AUTO*: a -1 indicates that a class-specific default
5923 shoudl be used. wx.SIZE_USE_EXISTING: existing dimensions should be
5924 used if -1 values are supplied. wxSIZE_ALLOW_MINUS_ONE: allow
5925 dimensions of -1 and less to be interpreted as real dimensions, not
5926 default values.
5927 """
5928 return _core_.Window_SetDimensions(*args, **kwargs)
5929
5930 def SetRect(*args, **kwargs):
5931 """
5932 SetRect(self, Rect rect, int sizeFlags=SIZE_AUTO)
5933
5934 Sets the position and size of the window in pixels using a wx.Rect.
5935 """
5936 return _core_.Window_SetRect(*args, **kwargs)
5937
5938 def SetSizeWH(*args, **kwargs):
5939 """
5940 SetSizeWH(self, int width, int height)
5941
5942 Sets the size of the window in pixels.
5943 """
5944 return _core_.Window_SetSizeWH(*args, **kwargs)
5945
5946 def Move(*args, **kwargs):
5947 """
5948 Move(self, Point pt, int flags=SIZE_USE_EXISTING)
5949
5950 Moves the window to the given position.
5951 """
5952 return _core_.Window_Move(*args, **kwargs)
5953
5954 SetPosition = Move
5955 def MoveXY(*args, **kwargs):
5956 """
5957 MoveXY(self, int x, int y, int flags=SIZE_USE_EXISTING)
5958
5959 Moves the window to the given position.
5960 """
5961 return _core_.Window_MoveXY(*args, **kwargs)
5962
5963 def SetBestFittingSize(*args, **kwargs):
5964 """
5965 SetBestFittingSize(self, Size size=DefaultSize)
5966
5967 A 'Smart' SetSize that will fill in default size components with the
5968 window's *best size* values. Also set's the minsize for use with sizers.
5969 """
5970 return _core_.Window_SetBestFittingSize(*args, **kwargs)
5971
5972 def Raise(*args, **kwargs):
5973 """
5974 Raise(self)
5975
5976 Raises the window to the top of the window hierarchy if it is a
5977 managed window (dialog or frame).
5978 """
5979 return _core_.Window_Raise(*args, **kwargs)
5980
5981 def Lower(*args, **kwargs):
5982 """
5983 Lower(self)
5984
5985 Lowers the window to the bottom of the window hierarchy if it is a
5986 managed window (dialog or frame).
5987 """
5988 return _core_.Window_Lower(*args, **kwargs)
5989
5990 def SetClientSize(*args, **kwargs):
5991 """
5992 SetClientSize(self, Size size)
5993
5994 This sets the size of the window client area in pixels. Using this
5995 function to size a window tends to be more device-independent than
5996 wx.Window.SetSize, since the application need not worry about what
5997 dimensions the border or title bar have when trying to fit the window
5998 around panel items, for example.
5999 """
6000 return _core_.Window_SetClientSize(*args, **kwargs)
6001
6002 def SetClientSizeWH(*args, **kwargs):
6003 """
6004 SetClientSizeWH(self, int width, int height)
6005
6006 This sets the size of the window client area in pixels. Using this
6007 function to size a window tends to be more device-independent than
6008 wx.Window.SetSize, since the application need not worry about what
6009 dimensions the border or title bar have when trying to fit the window
6010 around panel items, for example.
6011 """
6012 return _core_.Window_SetClientSizeWH(*args, **kwargs)
6013
6014 def SetClientRect(*args, **kwargs):
6015 """
6016 SetClientRect(self, Rect rect)
6017
6018 This sets the size of the window client area in pixels. Using this
6019 function to size a window tends to be more device-independent than
6020 wx.Window.SetSize, since the application need not worry about what
6021 dimensions the border or title bar have when trying to fit the window
6022 around panel items, for example.
6023 """
6024 return _core_.Window_SetClientRect(*args, **kwargs)
6025
6026 def GetPosition(*args, **kwargs):
6027 """
6028 GetPosition(self) -> Point
6029
6030 Get the window's position.
6031 """
6032 return _core_.Window_GetPosition(*args, **kwargs)
6033
6034 def GetPositionTuple(*args, **kwargs):
6035 """
6036 GetPositionTuple() -> (x,y)
6037
6038 Get the window's position.
6039 """
6040 return _core_.Window_GetPositionTuple(*args, **kwargs)
6041
6042 def GetSize(*args, **kwargs):
6043 """
6044 GetSize(self) -> Size
6045
6046 Get the window size.
6047 """
6048 return _core_.Window_GetSize(*args, **kwargs)
6049
6050 def GetSizeTuple(*args, **kwargs):
6051 """
6052 GetSizeTuple() -> (width, height)
6053
6054 Get the window size.
6055 """
6056 return _core_.Window_GetSizeTuple(*args, **kwargs)
6057
6058 def GetRect(*args, **kwargs):
6059 """
6060 GetRect(self) -> Rect
6061
6062 Returns the size and position of the window as a wx.Rect object.
6063 """
6064 return _core_.Window_GetRect(*args, **kwargs)
6065
6066 def GetClientSize(*args, **kwargs):
6067 """
6068 GetClientSize(self) -> Size
6069
6070 This gets the size of the window's 'client area' in pixels. The client
6071 area is the area which may be drawn on by the programmer, excluding
6072 title bar, border, scrollbars, etc.
6073 """
6074 return _core_.Window_GetClientSize(*args, **kwargs)
6075
6076 def GetClientSizeTuple(*args, **kwargs):
6077 """
6078 GetClientSizeTuple() -> (width, height)
6079
6080 This gets the size of the window's 'client area' in pixels. The client
6081 area is the area which may be drawn on by the programmer, excluding
6082 title bar, border, scrollbars, etc.
6083 """
6084 return _core_.Window_GetClientSizeTuple(*args, **kwargs)
6085
6086 def GetClientAreaOrigin(*args, **kwargs):
6087 """
6088 GetClientAreaOrigin(self) -> Point
6089
6090 Get the origin of the client area of the window relative to the
6091 window's top left corner (the client area may be shifted because of
6092 the borders, scrollbars, other decorations...)
6093 """
6094 return _core_.Window_GetClientAreaOrigin(*args, **kwargs)
6095
6096 def GetClientRect(*args, **kwargs):
6097 """
6098 GetClientRect(self) -> Rect
6099
6100 Get the client area position and size as a `wx.Rect` object.
6101 """
6102 return _core_.Window_GetClientRect(*args, **kwargs)
6103
6104 def GetBestSize(*args, **kwargs):
6105 """
6106 GetBestSize(self) -> Size
6107
6108 This function returns the best acceptable minimal size for the
6109 window, if applicable. For example, for a static text control, it will
6110 be the minimal size such that the control label is not truncated. For
6111 windows containing subwindows (suzh aswx.Panel), the size returned by
6112 this function will be the same as the size the window would have had
6113 after calling Fit.
6114 """
6115 return _core_.Window_GetBestSize(*args, **kwargs)
6116
6117 def GetBestSizeTuple(*args, **kwargs):
6118 """
6119 GetBestSizeTuple() -> (width, height)
6120
6121 This function returns the best acceptable minimal size for the
6122 window, if applicable. For example, for a static text control, it will
6123 be the minimal size such that the control label is not truncated. For
6124 windows containing subwindows (suzh aswx.Panel), the size returned by
6125 this function will be the same as the size the window would have had
6126 after calling Fit.
6127 """
6128 return _core_.Window_GetBestSizeTuple(*args, **kwargs)
6129
6130 def InvalidateBestSize(*args, **kwargs):
6131 """
6132 InvalidateBestSize(self)
6133
6134 Reset the cached best size value so it will be recalculated the next
6135 time it is needed.
6136 """
6137 return _core_.Window_InvalidateBestSize(*args, **kwargs)
6138
6139 def GetBestFittingSize(*args, **kwargs):
6140 """
6141 GetBestFittingSize(self) -> Size
6142
6143 This function will merge the window's best size into the window's
6144 minimum size, giving priority to the min size components, and returns
6145 the results.
6146
6147 """
6148 return _core_.Window_GetBestFittingSize(*args, **kwargs)
6149
6150 def GetAdjustedBestSize(*args, **kwargs):
6151 """
6152 GetAdjustedBestSize(self) -> Size
6153
6154 This method is similar to GetBestSize, except in one
6155 thing. GetBestSize should return the minimum untruncated size of the
6156 window, while this method will return the largest of BestSize and any
6157 user specified minimum size. ie. it is the minimum size the window
6158 should currently be drawn at, not the minimal size it can possibly
6159 tolerate.
6160 """
6161 return _core_.Window_GetAdjustedBestSize(*args, **kwargs)
6162
6163 def Center(*args, **kwargs):
6164 """
6165 Center(self, int direction=BOTH)
6166
6167 Centers the window. The parameter specifies the direction for
6168 cetering, and may be wx.HORIZONTAL, wx.VERTICAL or wx.BOTH. It may
6169 also include wx.CENTER_ON_SCREEN flag if you want to center the window
6170 on the entire screen and not on its parent window. If it is a
6171 top-level window and has no parent then it will always be centered
6172 relative to the screen.
6173 """
6174 return _core_.Window_Center(*args, **kwargs)
6175
6176 Centre = Center
6177 def CenterOnScreen(*args, **kwargs):
6178 """
6179 CenterOnScreen(self, int dir=BOTH)
6180
6181 Center on screen (only works for top level windows)
6182 """
6183 return _core_.Window_CenterOnScreen(*args, **kwargs)
6184
6185 CentreOnScreen = CenterOnScreen
6186 def CenterOnParent(*args, **kwargs):
6187 """
6188 CenterOnParent(self, int dir=BOTH)
6189
6190 Center with respect to the the parent window
6191 """
6192 return _core_.Window_CenterOnParent(*args, **kwargs)
6193
6194 CentreOnParent = CenterOnParent
6195 def Fit(*args, **kwargs):
6196 """
6197 Fit(self)
6198
6199 Sizes the window so that it fits around its subwindows. This function
6200 won't do anything if there are no subwindows and will only really work
6201 correctly if sizers are used for the subwindows layout. Also, if the
6202 window has exactly one subwindow it is better (faster and the result
6203 is more precise as Fit adds some margin to account for fuzziness of
6204 its calculations) to call window.SetClientSize(child.GetSize())
6205 instead of calling Fit.
6206 """
6207 return _core_.Window_Fit(*args, **kwargs)
6208
6209 def FitInside(*args, **kwargs):
6210 """
6211 FitInside(self)
6212
6213 Similar to Fit, but sizes the interior (virtual) size of a
6214 window. Mainly useful with scrolled windows to reset scrollbars after
6215 sizing changes that do not trigger a size event, and/or scrolled
6216 windows without an interior sizer. This function similarly won't do
6217 anything if there are no subwindows.
6218 """
6219 return _core_.Window_FitInside(*args, **kwargs)
6220
6221 def SetSizeHints(*args, **kwargs):
6222 """
6223 SetSizeHints(self, int minW, int minH, int maxW=-1, int maxH=-1, int incW=-1,
6224 int incH=-1)
6225
6226 Allows specification of minimum and maximum window sizes, and window
6227 size increments. If a pair of values is not set (or set to -1), the
6228 default values will be used. If this function is called, the user
6229 will not be able to size the window outside the given bounds (if it is
6230 a top-level window.) Sizers will also inspect the minimum window size
6231 and will use that value if set when calculating layout.
6232
6233 The resizing increments are only significant under Motif or Xt.
6234 """
6235 return _core_.Window_SetSizeHints(*args, **kwargs)
6236
6237 def SetSizeHintsSz(*args, **kwargs):
6238 """
6239 SetSizeHintsSz(self, Size minSize, Size maxSize=DefaultSize, Size incSize=DefaultSize)
6240
6241 Allows specification of minimum and maximum window sizes, and window
6242 size increments. If a pair of values is not set (or set to -1), the
6243 default values will be used. If this function is called, the user
6244 will not be able to size the window outside the given bounds (if it is
6245 a top-level window.) Sizers will also inspect the minimum window size
6246 and will use that value if set when calculating layout.
6247
6248 The resizing increments are only significant under Motif or Xt.
6249 """
6250 return _core_.Window_SetSizeHintsSz(*args, **kwargs)
6251
6252 def SetVirtualSizeHints(*args, **kwargs):
6253 """
6254 SetVirtualSizeHints(self, int minW, int minH, int maxW=-1, int maxH=-1)
6255
6256 Allows specification of minimum and maximum virtual window sizes. If a
6257 pair of values is not set (or set to -1), the default values will be
6258 used. If this function is called, the user will not be able to size
6259 the virtual area of the window outside the given bounds.
6260 """
6261 return _core_.Window_SetVirtualSizeHints(*args, **kwargs)
6262
6263 def SetVirtualSizeHintsSz(*args, **kwargs):
6264 """
6265 SetVirtualSizeHintsSz(self, Size minSize, Size maxSize=DefaultSize)
6266
6267 Allows specification of minimum and maximum virtual window sizes. If a
6268 pair of values is not set (or set to -1), the default values will be
6269 used. If this function is called, the user will not be able to size
6270 the virtual area of the window outside the given bounds.
6271 """
6272 return _core_.Window_SetVirtualSizeHintsSz(*args, **kwargs)
6273
6274 def GetMaxSize(*args, **kwargs):
6275 """GetMaxSize(self) -> Size"""
6276 return _core_.Window_GetMaxSize(*args, **kwargs)
6277
6278 def GetMinSize(*args, **kwargs):
6279 """GetMinSize(self) -> Size"""
6280 return _core_.Window_GetMinSize(*args, **kwargs)
6281
6282 def SetMinSize(*args, **kwargs):
6283 """
6284 SetMinSize(self, Size minSize)
6285
6286 A more convenient method than `SetSizeHints` for setting just the
6287 min size.
6288 """
6289 return _core_.Window_SetMinSize(*args, **kwargs)
6290
6291 def SetMaxSize(*args, **kwargs):
6292 """
6293 SetMaxSize(self, Size maxSize)
6294
6295 A more convenient method than `SetSizeHints` for setting just the
6296 max size.
6297 """
6298 return _core_.Window_SetMaxSize(*args, **kwargs)
6299
6300 def GetMinWidth(*args, **kwargs):
6301 """GetMinWidth(self) -> int"""
6302 return _core_.Window_GetMinWidth(*args, **kwargs)
6303
6304 def GetMinHeight(*args, **kwargs):
6305 """GetMinHeight(self) -> int"""
6306 return _core_.Window_GetMinHeight(*args, **kwargs)
6307
6308 def GetMaxWidth(*args, **kwargs):
6309 """GetMaxWidth(self) -> int"""
6310 return _core_.Window_GetMaxWidth(*args, **kwargs)
6311
6312 def GetMaxHeight(*args, **kwargs):
6313 """GetMaxHeight(self) -> int"""
6314 return _core_.Window_GetMaxHeight(*args, **kwargs)
6315
6316 def SetVirtualSize(*args, **kwargs):
6317 """
6318 SetVirtualSize(self, Size size)
6319
6320 Set the the virtual size of a window in pixels. For most windows this
6321 is just the client area of the window, but for some like scrolled
6322 windows it is more or less independent of the screen window size.
6323 """
6324 return _core_.Window_SetVirtualSize(*args, **kwargs)
6325
6326 def SetVirtualSizeWH(*args, **kwargs):
6327 """
6328 SetVirtualSizeWH(self, int w, int h)
6329
6330 Set the the virtual size of a window in pixels. For most windows this
6331 is just the client area of the window, but for some like scrolled
6332 windows it is more or less independent of the screen window size.
6333 """
6334 return _core_.Window_SetVirtualSizeWH(*args, **kwargs)
6335
6336 def GetVirtualSize(*args, **kwargs):
6337 """
6338 GetVirtualSize(self) -> Size
6339
6340 Get the the virtual size of the window in pixels. For most windows
6341 this is just the client area of the window, but for some like scrolled
6342 windows it is more or less independent of the screen window size.
6343 """
6344 return _core_.Window_GetVirtualSize(*args, **kwargs)
6345
6346 def GetVirtualSizeTuple(*args, **kwargs):
6347 """
6348 GetVirtualSizeTuple() -> (width, height)
6349
6350 Get the the virtual size of the window in pixels. For most windows
6351 this is just the client area of the window, but for some like scrolled
6352 windows it is more or less independent of the screen window size.
6353 """
6354 return _core_.Window_GetVirtualSizeTuple(*args, **kwargs)
6355
6356 def GetBestVirtualSize(*args, **kwargs):
6357 """
6358 GetBestVirtualSize(self) -> Size
6359
6360 Return the largest of ClientSize and BestSize (as determined by a
6361 sizer, interior children, or other means)
6362 """
6363 return _core_.Window_GetBestVirtualSize(*args, **kwargs)
6364
6365 def Show(*args, **kwargs):
6366 """
6367 Show(self, bool show=True) -> bool
6368
6369 Shows or hides the window. You may need to call Raise for a top level
6370 window if you want to bring it to top, although this is not needed if
6371 Show is called immediately after the frame creation. Returns True if
6372 the window has been shown or hidden or False if nothing was done
6373 because it already was in the requested state.
6374 """
6375 return _core_.Window_Show(*args, **kwargs)
6376
6377 def Hide(*args, **kwargs):
6378 """
6379 Hide(self) -> bool
6380
6381 Equivalent to calling Show(False).
6382 """
6383 return _core_.Window_Hide(*args, **kwargs)
6384
6385 def Enable(*args, **kwargs):
6386 """
6387 Enable(self, bool enable=True) -> bool
6388
6389 Enable or disable the window for user input. Note that when a parent
6390 window is disabled, all of its children are disabled as well and they
6391 are reenabled again when the parent is. Returns true if the window
6392 has been enabled or disabled, false if nothing was done, i.e. if the
6393 window had already been in the specified state.
6394 """
6395 return _core_.Window_Enable(*args, **kwargs)
6396
6397 def Disable(*args, **kwargs):
6398 """
6399 Disable(self) -> bool
6400
6401 Disables the window, same as Enable(false).
6402 """
6403 return _core_.Window_Disable(*args, **kwargs)
6404
6405 def IsShown(*args, **kwargs):
6406 """
6407 IsShown(self) -> bool
6408
6409 Returns true if the window is shown, false if it has been hidden.
6410 """
6411 return _core_.Window_IsShown(*args, **kwargs)
6412
6413 def IsEnabled(*args, **kwargs):
6414 """
6415 IsEnabled(self) -> bool
6416
6417 Returns true if the window is enabled for input, false otherwise.
6418 """
6419 return _core_.Window_IsEnabled(*args, **kwargs)
6420
6421 def SetWindowStyleFlag(*args, **kwargs):
6422 """
6423 SetWindowStyleFlag(self, long style)
6424
6425 Sets the style of the window. Please note that some styles cannot be
6426 changed after the window creation and that Refresh() might need to be
6427 called after changing the others for the change to take place
6428 immediately.
6429 """
6430 return _core_.Window_SetWindowStyleFlag(*args, **kwargs)
6431
6432 def GetWindowStyleFlag(*args, **kwargs):
6433 """
6434 GetWindowStyleFlag(self) -> long
6435
6436 Gets the window style that was passed to the constructor or Create
6437 method.
6438 """
6439 return _core_.Window_GetWindowStyleFlag(*args, **kwargs)
6440
6441 SetWindowStyle = SetWindowStyleFlag; GetWindowStyle = GetWindowStyleFlag
6442 def HasFlag(*args, **kwargs):
6443 """
6444 HasFlag(self, int flag) -> bool
6445
6446 Test if the given style is set for this window.
6447 """
6448 return _core_.Window_HasFlag(*args, **kwargs)
6449
6450 def IsRetained(*args, **kwargs):
6451 """
6452 IsRetained(self) -> bool
6453
6454 Returns true if the window is retained, false otherwise. Retained
6455 windows are only available on X platforms.
6456 """
6457 return _core_.Window_IsRetained(*args, **kwargs)
6458
6459 def SetExtraStyle(*args, **kwargs):
6460 """
6461 SetExtraStyle(self, long exStyle)
6462
6463 Sets the extra style bits for the window. Extra styles are the less
6464 often used style bits which can't be set with the constructor or with
6465 SetWindowStyleFlag()
6466 """
6467 return _core_.Window_SetExtraStyle(*args, **kwargs)
6468
6469 def GetExtraStyle(*args, **kwargs):
6470 """
6471 GetExtraStyle(self) -> long
6472
6473 Returns the extra style bits for the window.
6474 """
6475 return _core_.Window_GetExtraStyle(*args, **kwargs)
6476
6477 def MakeModal(*args, **kwargs):
6478 """
6479 MakeModal(self, bool modal=True)
6480
6481 Disables all other windows in the application so that the user can
6482 only interact with this window. Passing False will reverse this
6483 effect.
6484 """
6485 return _core_.Window_MakeModal(*args, **kwargs)
6486
6487 def SetThemeEnabled(*args, **kwargs):
6488 """
6489 SetThemeEnabled(self, bool enableTheme)
6490
6491 This function tells a window if it should use the system's "theme"
6492 code to draw the windows' background instead if its own background
6493 drawing code. This will only have an effect on platforms that support
6494 the notion of themes in user defined windows. One such platform is
6495 GTK+ where windows can have (very colourful) backgrounds defined by a
6496 user's selected theme.
6497
6498 Dialogs, notebook pages and the status bar have this flag set to true
6499 by default so that the default look and feel is simulated best.
6500 """
6501 return _core_.Window_SetThemeEnabled(*args, **kwargs)
6502
6503 def GetThemeEnabled(*args, **kwargs):
6504 """
6505 GetThemeEnabled(self) -> bool
6506
6507 Return the themeEnabled flag.
6508 """
6509 return _core_.Window_GetThemeEnabled(*args, **kwargs)
6510
6511 def SetFocus(*args, **kwargs):
6512 """
6513 SetFocus(self)
6514
6515 Set's the focus to this window, allowing it to receive keyboard input.
6516 """
6517 return _core_.Window_SetFocus(*args, **kwargs)
6518
6519 def SetFocusFromKbd(*args, **kwargs):
6520 """
6521 SetFocusFromKbd(self)
6522
6523 Set focus to this window as the result of a keyboard action. Normally
6524 only called internally.
6525 """
6526 return _core_.Window_SetFocusFromKbd(*args, **kwargs)
6527
6528 def FindFocus(*args, **kwargs):
6529 """
6530 FindFocus() -> Window
6531
6532 Returns the window or control that currently has the keyboard focus,
6533 or None.
6534 """
6535 return _core_.Window_FindFocus(*args, **kwargs)
6536
6537 FindFocus = staticmethod(FindFocus)
6538 def AcceptsFocus(*args, **kwargs):
6539 """
6540 AcceptsFocus(self) -> bool
6541
6542 Can this window have focus?
6543 """
6544 return _core_.Window_AcceptsFocus(*args, **kwargs)
6545
6546 def AcceptsFocusFromKeyboard(*args, **kwargs):
6547 """
6548 AcceptsFocusFromKeyboard(self) -> bool
6549
6550 Can this window be given focus by keyboard navigation? if not, the
6551 only way to give it focus (provided it accepts it at all) is to click
6552 it.
6553 """
6554 return _core_.Window_AcceptsFocusFromKeyboard(*args, **kwargs)
6555
6556 def GetDefaultItem(*args, **kwargs):
6557 """
6558 GetDefaultItem(self) -> Window
6559
6560 Get the default child of this parent, i.e. the one which is activated
6561 by pressing <Enter> such as the OK button on a wx.Dialog.
6562 """
6563 return _core_.Window_GetDefaultItem(*args, **kwargs)
6564
6565 def SetDefaultItem(*args, **kwargs):
6566 """
6567 SetDefaultItem(self, Window child) -> Window
6568
6569 Set this child as default, return the old default.
6570 """
6571 return _core_.Window_SetDefaultItem(*args, **kwargs)
6572
6573 def SetTmpDefaultItem(*args, **kwargs):
6574 """
6575 SetTmpDefaultItem(self, Window win)
6576
6577 Set this child as temporary default
6578 """
6579 return _core_.Window_SetTmpDefaultItem(*args, **kwargs)
6580
6581 def Navigate(*args, **kwargs):
6582 """
6583 Navigate(self, int flags=NavigationKeyEvent.IsForward) -> bool
6584
6585 Does keyboard navigation from this window to another, by sending a
6586 `wx.NavigationKeyEvent`.
6587 """
6588 return _core_.Window_Navigate(*args, **kwargs)
6589
6590 def MoveAfterInTabOrder(*args, **kwargs):
6591 """
6592 MoveAfterInTabOrder(self, Window win)
6593
6594 Moves this window in the tab navigation order after the specified
6595 sibling window. This means that when the user presses the TAB key on
6596 that other window, the focus switches to this window.
6597
6598 The default tab order is the same as creation order. This function
6599 and `MoveBeforeInTabOrder` allow to change it after creating all the
6600 windows.
6601
6602 """
6603 return _core_.Window_MoveAfterInTabOrder(*args, **kwargs)
6604
6605 def MoveBeforeInTabOrder(*args, **kwargs):
6606 """
6607 MoveBeforeInTabOrder(self, Window win)
6608
6609 Same as `MoveAfterInTabOrder` except that it inserts this window just
6610 before win instead of putting it right after it.
6611 """
6612 return _core_.Window_MoveBeforeInTabOrder(*args, **kwargs)
6613
6614 def GetChildren(*args, **kwargs):
6615 """
6616 GetChildren(self) -> PyObject
6617
6618 Returns a list of the window's children. NOTE: Currently this is a
6619 copy of the child window list maintained by the window, so the return
6620 value of this function is only valid as long as the window's children
6621 do not change.
6622 """
6623 return _core_.Window_GetChildren(*args, **kwargs)
6624
6625 def GetParent(*args, **kwargs):
6626 """
6627 GetParent(self) -> Window
6628
6629 Returns the parent window of this window, or None if there isn't one.
6630 """
6631 return _core_.Window_GetParent(*args, **kwargs)
6632
6633 def GetGrandParent(*args, **kwargs):
6634 """
6635 GetGrandParent(self) -> Window
6636
6637 Returns the parent of the parent of this window, or None if there
6638 isn't one.
6639 """
6640 return _core_.Window_GetGrandParent(*args, **kwargs)
6641
6642 def IsTopLevel(*args, **kwargs):
6643 """
6644 IsTopLevel(self) -> bool
6645
6646 Returns true if the given window is a top-level one. Currently all
6647 frames and dialogs are always considered to be top-level windows (even
6648 if they have a parent window).
6649 """
6650 return _core_.Window_IsTopLevel(*args, **kwargs)
6651
6652 def Reparent(*args, **kwargs):
6653 """
6654 Reparent(self, Window newParent) -> bool
6655
6656 Reparents the window, i.e the window will be removed from its current
6657 parent window (e.g. a non-standard toolbar in a wxFrame) and then
6658 re-inserted into another. Available on Windows and GTK. Returns True
6659 if the parent was changed, False otherwise (error or newParent ==
6660 oldParent)
6661 """
6662 return _core_.Window_Reparent(*args, **kwargs)
6663
6664 def AddChild(*args, **kwargs):
6665 """
6666 AddChild(self, Window child)
6667
6668 Adds a child window. This is called automatically by window creation
6669 functions so should not be required by the application programmer.
6670 """
6671 return _core_.Window_AddChild(*args, **kwargs)
6672
6673 def RemoveChild(*args, **kwargs):
6674 """
6675 RemoveChild(self, Window child)
6676
6677 Removes a child window. This is called automatically by window
6678 deletion functions so should not be required by the application
6679 programmer.
6680 """
6681 return _core_.Window_RemoveChild(*args, **kwargs)
6682
6683 def FindWindowById(*args, **kwargs):
6684 """
6685 FindWindowById(self, long winid) -> Window
6686
6687 Find a chld of this window by window ID
6688 """
6689 return _core_.Window_FindWindowById(*args, **kwargs)
6690
6691 def FindWindowByName(*args, **kwargs):
6692 """
6693 FindWindowByName(self, String name) -> Window
6694
6695 Find a child of this window by name
6696 """
6697 return _core_.Window_FindWindowByName(*args, **kwargs)
6698
6699 def GetEventHandler(*args, **kwargs):
6700 """
6701 GetEventHandler(self) -> EvtHandler
6702
6703 Returns the event handler for this window. By default, the window is
6704 its own event handler.
6705 """
6706 return _core_.Window_GetEventHandler(*args, **kwargs)
6707
6708 def SetEventHandler(*args, **kwargs):
6709 """
6710 SetEventHandler(self, EvtHandler handler)
6711
6712 Sets the event handler for this window. An event handler is an object
6713 that is capable of processing the events sent to a window. By default,
6714 the window is its own event handler, but an application may wish to
6715 substitute another, for example to allow central implementation of
6716 event-handling for a variety of different window classes.
6717
6718 It is usually better to use `wx.Window.PushEventHandler` since this sets
6719 up a chain of event handlers, where an event not handled by one event
6720 handler is handed to the next one in the chain.
6721 """
6722 return _core_.Window_SetEventHandler(*args, **kwargs)
6723
6724 def PushEventHandler(*args, **kwargs):
6725 """
6726 PushEventHandler(self, EvtHandler handler)
6727
6728 Pushes this event handler onto the event handler stack for the window.
6729 An event handler is an object that is capable of processing the events
6730 sent to a window. By default, the window is its own event handler, but
6731 an application may wish to substitute another, for example to allow
6732 central implementation of event-handling for a variety of different
6733 window classes.
6734
6735 wx.Window.PushEventHandler allows an application to set up a chain of
6736 event handlers, where an event not handled by one event handler is
6737 handed to the next one in the chain. Use `wx.Window.PopEventHandler` to
6738 remove the event handler.
6739 """
6740 return _core_.Window_PushEventHandler(*args, **kwargs)
6741
6742 def PopEventHandler(*args, **kwargs):
6743 """
6744 PopEventHandler(self, bool deleteHandler=False) -> EvtHandler
6745
6746 Removes and returns the top-most event handler on the event handler
6747 stack. If deleteHandler is True then the wx.EvtHandler object will be
6748 destroyed after it is popped.
6749 """
6750 return _core_.Window_PopEventHandler(*args, **kwargs)
6751
6752 def RemoveEventHandler(*args, **kwargs):
6753 """
6754 RemoveEventHandler(self, EvtHandler handler) -> bool
6755
6756 Find the given handler in the event handler chain and remove (but not
6757 delete) it from the event handler chain, return True if it was found
6758 and False otherwise (this also results in an assert failure so this
6759 function should only be called when the handler is supposed to be
6760 there.)
6761 """
6762 return _core_.Window_RemoveEventHandler(*args, **kwargs)
6763
6764 def SetValidator(*args, **kwargs):
6765 """
6766 SetValidator(self, Validator validator)
6767
6768 Deletes the current validator (if any) and sets the window validator,
6769 having called wx.Validator.Clone to create a new validator of this
6770 type.
6771 """
6772 return _core_.Window_SetValidator(*args, **kwargs)
6773
6774 def GetValidator(*args, **kwargs):
6775 """
6776 GetValidator(self) -> Validator
6777
6778 Returns a pointer to the current validator for the window, or None if
6779 there is none.
6780 """
6781 return _core_.Window_GetValidator(*args, **kwargs)
6782
6783 def Validate(*args, **kwargs):
6784 """
6785 Validate(self) -> bool
6786
6787 Validates the current values of the child controls using their
6788 validators. If the window has wx.WS_EX_VALIDATE_RECURSIVELY extra
6789 style flag set, the method will also call Validate() of all child
6790 windows. Returns false if any of the validations failed.
6791 """
6792 return _core_.Window_Validate(*args, **kwargs)
6793
6794 def TransferDataToWindow(*args, **kwargs):
6795 """
6796 TransferDataToWindow(self) -> bool
6797
6798 Transfers values to child controls from data areas specified by their
6799 validators. If the window has wx.WS_EX_VALIDATE_RECURSIVELY extra
6800 style flag set, the method will also call TransferDataToWindow() of
6801 all child windows.
6802 """
6803 return _core_.Window_TransferDataToWindow(*args, **kwargs)
6804
6805 def TransferDataFromWindow(*args, **kwargs):
6806 """
6807 TransferDataFromWindow(self) -> bool
6808
6809 Transfers values from child controls to data areas specified by their
6810 validators. Returns false if a transfer failed. If the window has
6811 wx.WS_EX_VALIDATE_RECURSIVELY extra style flag set, the method will
6812 also call TransferDataFromWindow() of all child windows.
6813 """
6814 return _core_.Window_TransferDataFromWindow(*args, **kwargs)
6815
6816 def InitDialog(*args, **kwargs):
6817 """
6818 InitDialog(self)
6819
6820 Sends an EVT_INIT_DIALOG event, whose handler usually transfers data
6821 to the dialog via validators.
6822 """
6823 return _core_.Window_InitDialog(*args, **kwargs)
6824
6825 def SetAcceleratorTable(*args, **kwargs):
6826 """
6827 SetAcceleratorTable(self, AcceleratorTable accel)
6828
6829 Sets the accelerator table for this window.
6830 """
6831 return _core_.Window_SetAcceleratorTable(*args, **kwargs)
6832
6833 def GetAcceleratorTable(*args, **kwargs):
6834 """
6835 GetAcceleratorTable(self) -> AcceleratorTable
6836
6837 Gets the accelerator table for this window.
6838 """
6839 return _core_.Window_GetAcceleratorTable(*args, **kwargs)
6840
6841 def RegisterHotKey(*args, **kwargs):
6842 """
6843 RegisterHotKey(self, int hotkeyId, int modifiers, int keycode) -> bool
6844
6845 Registers a system wide hotkey. Every time the user presses the hotkey
6846 registered here, this window will receive a hotkey event. It will
6847 receive the event even if the application is in the background and
6848 does not have the input focus because the user is working with some
6849 other application. To bind an event handler function to this hotkey
6850 use EVT_HOTKEY with an id equal to hotkeyId. Returns True if the
6851 hotkey was registered successfully.
6852 """
6853 return _core_.Window_RegisterHotKey(*args, **kwargs)
6854
6855 def UnregisterHotKey(*args, **kwargs):
6856 """
6857 UnregisterHotKey(self, int hotkeyId) -> bool
6858
6859 Unregisters a system wide hotkey.
6860 """
6861 return _core_.Window_UnregisterHotKey(*args, **kwargs)
6862
6863 def ConvertDialogPointToPixels(*args, **kwargs):
6864 """
6865 ConvertDialogPointToPixels(self, Point pt) -> Point
6866
6867 Converts a point or size from dialog units to pixels. Dialog units
6868 are used for maintaining a dialog's proportions even if the font
6869 changes. For the x dimension, the dialog units are multiplied by the
6870 average character width and then divided by 4. For the y dimension,
6871 the dialog units are multiplied by the average character height and
6872 then divided by 8.
6873 """
6874 return _core_.Window_ConvertDialogPointToPixels(*args, **kwargs)
6875
6876 def ConvertDialogSizeToPixels(*args, **kwargs):
6877 """
6878 ConvertDialogSizeToPixels(self, Size sz) -> Size
6879
6880 Converts a point or size from dialog units to pixels. Dialog units
6881 are used for maintaining a dialog's proportions even if the font
6882 changes. For the x dimension, the dialog units are multiplied by the
6883 average character width and then divided by 4. For the y dimension,
6884 the dialog units are multiplied by the average character height and
6885 then divided by 8.
6886 """
6887 return _core_.Window_ConvertDialogSizeToPixels(*args, **kwargs)
6888
6889 def DLG_PNT(*args, **kwargs):
6890 """
6891 DLG_PNT(self, Point pt) -> Point
6892
6893 Converts a point or size from dialog units to pixels. Dialog units
6894 are used for maintaining a dialog's proportions even if the font
6895 changes. For the x dimension, the dialog units are multiplied by the
6896 average character width and then divided by 4. For the y dimension,
6897 the dialog units are multiplied by the average character height and
6898 then divided by 8.
6899 """
6900 return _core_.Window_DLG_PNT(*args, **kwargs)
6901
6902 def DLG_SZE(*args, **kwargs):
6903 """
6904 DLG_SZE(self, Size sz) -> Size
6905
6906 Converts a point or size from dialog units to pixels. Dialog units
6907 are used for maintaining a dialog's proportions even if the font
6908 changes. For the x dimension, the dialog units are multiplied by the
6909 average character width and then divided by 4. For the y dimension,
6910 the dialog units are multiplied by the average character height and
6911 then divided by 8.
6912 """
6913 return _core_.Window_DLG_SZE(*args, **kwargs)
6914
6915 def ConvertPixelPointToDialog(*args, **kwargs):
6916 """ConvertPixelPointToDialog(self, Point pt) -> Point"""
6917 return _core_.Window_ConvertPixelPointToDialog(*args, **kwargs)
6918
6919 def ConvertPixelSizeToDialog(*args, **kwargs):
6920 """ConvertPixelSizeToDialog(self, Size sz) -> Size"""
6921 return _core_.Window_ConvertPixelSizeToDialog(*args, **kwargs)
6922
6923 def WarpPointer(*args, **kwargs):
6924 """
6925 WarpPointer(self, int x, int y)
6926
6927 Moves the pointer to the given position on the window.
6928
6929 NOTE: This function is not supported under Mac because Apple Human
6930 Interface Guidelines forbid moving the mouse cursor programmatically.
6931 """
6932 return _core_.Window_WarpPointer(*args, **kwargs)
6933
6934 def CaptureMouse(*args, **kwargs):
6935 """
6936 CaptureMouse(self)
6937
6938 Directs all mouse input to this window. Call wx.Window.ReleaseMouse to
6939 release the capture.
6940
6941 Note that wxWindows maintains the stack of windows having captured the
6942 mouse and when the mouse is released the capture returns to the window
6943 which had had captured it previously and it is only really released if
6944 there were no previous window. In particular, this means that you must
6945 release the mouse as many times as you capture it.
6946 """
6947 return _core_.Window_CaptureMouse(*args, **kwargs)
6948
6949 def ReleaseMouse(*args, **kwargs):
6950 """
6951 ReleaseMouse(self)
6952
6953 Releases mouse input captured with wx.Window.CaptureMouse.
6954 """
6955 return _core_.Window_ReleaseMouse(*args, **kwargs)
6956
6957 def GetCapture(*args, **kwargs):
6958 """
6959 GetCapture() -> Window
6960
6961 Returns the window which currently captures the mouse or None
6962 """
6963 return _core_.Window_GetCapture(*args, **kwargs)
6964
6965 GetCapture = staticmethod(GetCapture)
6966 def HasCapture(*args, **kwargs):
6967 """
6968 HasCapture(self) -> bool
6969
6970 Returns true if this window has the current mouse capture.
6971 """
6972 return _core_.Window_HasCapture(*args, **kwargs)
6973
6974 def Refresh(*args, **kwargs):
6975 """
6976 Refresh(self, bool eraseBackground=True, Rect rect=None)
6977
6978 Mark the specified rectangle (or the whole window) as "dirty" so it
6979 will be repainted. Causes an EVT_PAINT event to be generated and sent
6980 to the window.
6981 """
6982 return _core_.Window_Refresh(*args, **kwargs)
6983
6984 def RefreshRect(*args, **kwargs):
6985 """
6986 RefreshRect(self, Rect rect)
6987
6988 Redraws the contents of the given rectangle: the area inside it will
6989 be repainted. This is the same as Refresh but has a nicer syntax.
6990 """
6991 return _core_.Window_RefreshRect(*args, **kwargs)
6992
6993 def Update(*args, **kwargs):
6994 """
6995 Update(self)
6996
6997 Calling this method immediately repaints the invalidated area of the
6998 window instead of waiting for the EVT_PAINT event to happen, (normally
6999 this would usually only happen when the flow of control returns to the
7000 event loop.) Notice that this function doesn't refresh the window and
7001 does nothing if the window has been already repainted. Use Refresh
7002 first if you want to immediately redraw the window (or some portion of
7003 it) unconditionally.
7004 """
7005 return _core_.Window_Update(*args, **kwargs)
7006
7007 def ClearBackground(*args, **kwargs):
7008 """
7009 ClearBackground(self)
7010
7011 Clears the window by filling it with the current background
7012 colour. Does not cause an erase background event to be generated.
7013 """
7014 return _core_.Window_ClearBackground(*args, **kwargs)
7015
7016 def Freeze(*args, **kwargs):
7017 """
7018 Freeze(self)
7019
7020 Freezes the window or, in other words, prevents any updates from
7021 taking place on screen, the window is not redrawn at all. Thaw must be
7022 called to reenable window redrawing. Calls to Freeze/Thaw may be
7023 nested, with the actual Thaw being delayed until all the nesting has
7024 been undone.
7025
7026 This method is useful for visual appearance optimization (for example,
7027 it is a good idea to use it before inserting large amount of text into
7028 a wxTextCtrl under wxGTK) but is not implemented on all platforms nor
7029 for all controls so it is mostly just a hint to wxWindows and not a
7030 mandatory directive.
7031 """
7032 return _core_.Window_Freeze(*args, **kwargs)
7033
7034 def Thaw(*args, **kwargs):
7035 """
7036 Thaw(self)
7037
7038 Reenables window updating after a previous call to Freeze. Calls to
7039 Freeze/Thaw may be nested, so Thaw must be called the same number of
7040 times that Freeze was before the window will be updated.
7041 """
7042 return _core_.Window_Thaw(*args, **kwargs)
7043
7044 def PrepareDC(*args, **kwargs):
7045 """
7046 PrepareDC(self, DC dc)
7047
7048 Call this function to prepare the device context for drawing a
7049 scrolled image. It sets the device origin according to the current
7050 scroll position.
7051 """
7052 return _core_.Window_PrepareDC(*args, **kwargs)
7053
7054 def GetUpdateRegion(*args, **kwargs):
7055 """
7056 GetUpdateRegion(self) -> Region
7057
7058 Returns the region specifying which parts of the window have been
7059 damaged. Should only be called within an EVT_PAINT handler.
7060 """
7061 return _core_.Window_GetUpdateRegion(*args, **kwargs)
7062
7063 def GetUpdateClientRect(*args, **kwargs):
7064 """
7065 GetUpdateClientRect(self) -> Rect
7066
7067 Get the update rectangle region bounding box in client coords.
7068 """
7069 return _core_.Window_GetUpdateClientRect(*args, **kwargs)
7070
7071 def IsExposed(*args, **kwargs):
7072 """
7073 IsExposed(self, int x, int y, int w=1, int h=1) -> bool
7074
7075 Returns true if the given point or rectangle area has been exposed
7076 since the last repaint. Call this in an paint event handler to
7077 optimize redrawing by only redrawing those areas, which have been
7078 exposed.
7079 """
7080 return _core_.Window_IsExposed(*args, **kwargs)
7081
7082 def IsExposedPoint(*args, **kwargs):
7083 """
7084 IsExposedPoint(self, Point pt) -> bool
7085
7086 Returns true if the given point or rectangle area has been exposed
7087 since the last repaint. Call this in an paint event handler to
7088 optimize redrawing by only redrawing those areas, which have been
7089 exposed.
7090 """
7091 return _core_.Window_IsExposedPoint(*args, **kwargs)
7092
7093 def IsExposedRect(*args, **kwargs):
7094 """
7095 IsExposedRect(self, Rect rect) -> bool
7096
7097 Returns true if the given point or rectangle area has been exposed
7098 since the last repaint. Call this in an paint event handler to
7099 optimize redrawing by only redrawing those areas, which have been
7100 exposed.
7101 """
7102 return _core_.Window_IsExposedRect(*args, **kwargs)
7103
7104 def GetDefaultAttributes(*args, **kwargs):
7105 """
7106 GetDefaultAttributes(self) -> VisualAttributes
7107
7108 Get the default attributes for an instance of this class. This is
7109 useful if you want to use the same font or colour in your own control
7110 as in a standard control -- which is a much better idea than hard
7111 coding specific colours or fonts which might look completely out of
7112 place on the user's system, especially if it uses themes.
7113 """
7114 return _core_.Window_GetDefaultAttributes(*args, **kwargs)
7115
7116 def GetClassDefaultAttributes(*args, **kwargs):
7117 """
7118 GetClassDefaultAttributes(int variant=WINDOW_VARIANT_NORMAL) -> VisualAttributes
7119
7120 Get the default attributes for this class. This is useful if you want
7121 to use the same font or colour in your own control as in a standard
7122 control -- which is a much better idea than hard coding specific
7123 colours or fonts which might look completely out of place on the
7124 user's system, especially if it uses themes.
7125
7126 The variant parameter is only relevant under Mac currently and is
7127 ignore under other platforms. Under Mac, it will change the size of
7128 the returned font. See `wx.Window.SetWindowVariant` for more about
7129 this.
7130 """
7131 return _core_.Window_GetClassDefaultAttributes(*args, **kwargs)
7132
7133 GetClassDefaultAttributes = staticmethod(GetClassDefaultAttributes)
7134 def SetBackgroundColour(*args, **kwargs):
7135 """
7136 SetBackgroundColour(self, Colour colour) -> bool
7137
7138 Sets the background colour of the window. Returns True if the colour
7139 was changed. The background colour is usually painted by the default
7140 EVT_ERASE_BACKGROUND event handler function under Windows and
7141 automatically under GTK. Using `wx.NullColour` will reset the window
7142 to the default background colour.
7143
7144 Note that setting the background colour may not cause an immediate
7145 refresh, so you may wish to call `ClearBackground` or `Refresh` after
7146 calling this function.
7147
7148 Using this function will disable attempts to use themes for this
7149 window, if the system supports them. Use with care since usually the
7150 themes represent the appearance chosen by the user to be used for all
7151 applications on the system.
7152 """
7153 return _core_.Window_SetBackgroundColour(*args, **kwargs)
7154
7155 def SetOwnBackgroundColour(*args, **kwargs):
7156 """SetOwnBackgroundColour(self, Colour colour)"""
7157 return _core_.Window_SetOwnBackgroundColour(*args, **kwargs)
7158
7159 def SetForegroundColour(*args, **kwargs):
7160 """
7161 SetForegroundColour(self, Colour colour) -> bool
7162
7163 Sets the foreground colour of the window. Returns True is the colour
7164 was changed. The interpretation of foreground colour is dependent on
7165 the window class; it may be the text colour or other colour, or it may
7166 not be used at all.
7167 """
7168 return _core_.Window_SetForegroundColour(*args, **kwargs)
7169
7170 def SetOwnForegroundColour(*args, **kwargs):
7171 """SetOwnForegroundColour(self, Colour colour)"""
7172 return _core_.Window_SetOwnForegroundColour(*args, **kwargs)
7173
7174 def GetBackgroundColour(*args, **kwargs):
7175 """
7176 GetBackgroundColour(self) -> Colour
7177
7178 Returns the background colour of the window.
7179 """
7180 return _core_.Window_GetBackgroundColour(*args, **kwargs)
7181
7182 def GetForegroundColour(*args, **kwargs):
7183 """
7184 GetForegroundColour(self) -> Colour
7185
7186 Returns the foreground colour of the window. The interpretation of
7187 foreground colour is dependent on the window class; it may be the text
7188 colour or other colour, or it may not be used at all.
7189 """
7190 return _core_.Window_GetForegroundColour(*args, **kwargs)
7191
7192 def SetBackgroundStyle(*args, **kwargs):
7193 """
7194 SetBackgroundStyle(self, int style) -> bool
7195
7196 Returns the background style of the window. The background style
7197 indicates how the background of the window is drawn.
7198
7199 ====================== ========================================
7200 wx.BG_STYLE_SYSTEM The background colour or pattern should
7201 be determined by the system
7202 wx.BG_STYLE_COLOUR The background should be a solid colour
7203 wx.BG_STYLE_CUSTOM The background will be implemented by the
7204 application.
7205 ====================== ========================================
7206
7207 On GTK+, use of wx.BG_STYLE_CUSTOM allows the flicker-free drawing of
7208 a custom background, such as a tiled bitmap. Currently the style has
7209 no effect on other platforms.
7210
7211 :see: `GetBackgroundStyle`, `SetBackgroundColour`
7212 """
7213 return _core_.Window_SetBackgroundStyle(*args, **kwargs)
7214
7215 def GetBackgroundStyle(*args, **kwargs):
7216 """
7217 GetBackgroundStyle(self) -> int
7218
7219 Returns the background style of the window.
7220
7221 :see: `SetBackgroundStyle`
7222 """
7223 return _core_.Window_GetBackgroundStyle(*args, **kwargs)
7224
7225 def SetCursor(*args, **kwargs):
7226 """
7227 SetCursor(self, Cursor cursor) -> bool
7228
7229 Sets the window's cursor. Notice that the window cursor also sets it
7230 for the children of the window implicitly.
7231
7232 The cursor may be wx.NullCursor in which case the window cursor will
7233 be reset back to default.
7234 """
7235 return _core_.Window_SetCursor(*args, **kwargs)
7236
7237 def GetCursor(*args, **kwargs):
7238 """
7239 GetCursor(self) -> Cursor
7240
7241 Return the cursor associated with this window.
7242 """
7243 return _core_.Window_GetCursor(*args, **kwargs)
7244
7245 def SetFont(*args, **kwargs):
7246 """
7247 SetFont(self, Font font) -> bool
7248
7249 Sets the font for this window.
7250 """
7251 return _core_.Window_SetFont(*args, **kwargs)
7252
7253 def SetOwnFont(*args, **kwargs):
7254 """SetOwnFont(self, Font font)"""
7255 return _core_.Window_SetOwnFont(*args, **kwargs)
7256
7257 def GetFont(*args, **kwargs):
7258 """
7259 GetFont(self) -> Font
7260
7261 Returns the default font used for this window.
7262 """
7263 return _core_.Window_GetFont(*args, **kwargs)
7264
7265 def SetCaret(*args, **kwargs):
7266 """
7267 SetCaret(self, Caret caret)
7268
7269 Sets the caret associated with the window.
7270 """
7271 return _core_.Window_SetCaret(*args, **kwargs)
7272
7273 def GetCaret(*args, **kwargs):
7274 """
7275 GetCaret(self) -> Caret
7276
7277 Returns the caret associated with the window.
7278 """
7279 return _core_.Window_GetCaret(*args, **kwargs)
7280
7281 def GetCharHeight(*args, **kwargs):
7282 """
7283 GetCharHeight(self) -> int
7284
7285 Get the (average) character size for the current font.
7286 """
7287 return _core_.Window_GetCharHeight(*args, **kwargs)
7288
7289 def GetCharWidth(*args, **kwargs):
7290 """
7291 GetCharWidth(self) -> int
7292
7293 Get the (average) character size for the current font.
7294 """
7295 return _core_.Window_GetCharWidth(*args, **kwargs)
7296
7297 def GetTextExtent(*args, **kwargs):
7298 """
7299 GetTextExtent(String string) -> (width, height)
7300
7301 Get the width and height of the text using the current font.
7302 """
7303 return _core_.Window_GetTextExtent(*args, **kwargs)
7304
7305 def GetFullTextExtent(*args, **kwargs):
7306 """
7307 GetFullTextExtent(String string, Font font=None) ->
7308 (width, height, descent, externalLeading)
7309
7310 Get the width, height, decent and leading of the text using the
7311 current or specified font.
7312 """
7313 return _core_.Window_GetFullTextExtent(*args, **kwargs)
7314
7315 def ClientToScreenXY(*args, **kwargs):
7316 """
7317 ClientToScreenXY(int x, int y) -> (x,y)
7318
7319 Converts to screen coordinates from coordinates relative to this window.
7320 """
7321 return _core_.Window_ClientToScreenXY(*args, **kwargs)
7322
7323 def ScreenToClientXY(*args, **kwargs):
7324 """
7325 ScreenToClientXY(int x, int y) -> (x,y)
7326
7327 Converts from screen to client window coordinates.
7328 """
7329 return _core_.Window_ScreenToClientXY(*args, **kwargs)
7330
7331 def ClientToScreen(*args, **kwargs):
7332 """
7333 ClientToScreen(self, Point pt) -> Point
7334
7335 Converts to screen coordinates from coordinates relative to this window.
7336 """
7337 return _core_.Window_ClientToScreen(*args, **kwargs)
7338
7339 def ScreenToClient(*args, **kwargs):
7340 """
7341 ScreenToClient(self, Point pt) -> Point
7342
7343 Converts from screen to client window coordinates.
7344 """
7345 return _core_.Window_ScreenToClient(*args, **kwargs)
7346
7347 def HitTestXY(*args, **kwargs):
7348 """
7349 HitTestXY(self, int x, int y) -> int
7350
7351 Test where the given (in client coords) point lies
7352 """
7353 return _core_.Window_HitTestXY(*args, **kwargs)
7354
7355 def HitTest(*args, **kwargs):
7356 """
7357 HitTest(self, Point pt) -> int
7358
7359 Test where the given (in client coords) point lies
7360 """
7361 return _core_.Window_HitTest(*args, **kwargs)
7362
7363 def GetBorder(*args):
7364 """
7365 GetBorder(self, long flags) -> int
7366 GetBorder(self) -> int
7367
7368 Get border for the flags of this window
7369 """
7370 return _core_.Window_GetBorder(*args)
7371
7372 def UpdateWindowUI(*args, **kwargs):
7373 """
7374 UpdateWindowUI(self, long flags=UPDATE_UI_NONE)
7375
7376 This function sends EVT_UPDATE_UI events to the window. The particular
7377 implementation depends on the window; for example a wx.ToolBar will
7378 send an update UI event for each toolbar button, and a wx.Frame will
7379 send an update UI event for each menubar menu item. You can call this
7380 function from your application to ensure that your UI is up-to-date at
7381 a particular point in time (as far as your EVT_UPDATE_UI handlers are
7382 concerned). This may be necessary if you have called
7383 wx.UpdateUIEvent.SetMode or wx.UpdateUIEvent.SetUpdateInterval to
7384 limit the overhead that wxWindows incurs by sending update UI events
7385 in idle time.
7386 """
7387 return _core_.Window_UpdateWindowUI(*args, **kwargs)
7388
7389 def PopupMenuXY(*args, **kwargs):
7390 """
7391 PopupMenuXY(self, Menu menu, int x=-1, int y=-1) -> bool
7392
7393 Pops up the given menu at the specified coordinates, relative to this window,
7394 and returns control when the user has dismissed the menu. If a menu item is
7395 selected, the corresponding menu event is generated and will be processed as
7396 usual. If the default position is given then the current position of the
7397 mouse cursor will be used.
7398 """
7399 return _core_.Window_PopupMenuXY(*args, **kwargs)
7400
7401 def PopupMenu(*args, **kwargs):
7402 """
7403 PopupMenu(self, Menu menu, Point pos=DefaultPosition) -> bool
7404
7405 Pops up the given menu at the specified coordinates, relative to this window,
7406 and returns control when the user has dismissed the menu. If a menu item is
7407 selected, the corresponding menu event is generated and will be processed as
7408 usual. If the default position is given then the current position of the
7409 mouse cursor will be used.
7410 """
7411 return _core_.Window_PopupMenu(*args, **kwargs)
7412
7413 def GetHandle(*args, **kwargs):
7414 """
7415 GetHandle(self) -> long
7416
7417 Returns the platform-specific handle (as a long integer) of the
7418 physical window. Currently on wxMac it returns the handle of the
7419 toplevel parent of the window.
7420 """
7421 return _core_.Window_GetHandle(*args, **kwargs)
7422
7423 def AssociateHandle(*args, **kwargs):
7424 """
7425 AssociateHandle(self, long handle)
7426
7427 Associate the window with a new native handle
7428 """
7429 return _core_.Window_AssociateHandle(*args, **kwargs)
7430
7431 def DissociateHandle(*args, **kwargs):
7432 """
7433 DissociateHandle(self)
7434
7435 Dissociate the current native handle from the window
7436 """
7437 return _core_.Window_DissociateHandle(*args, **kwargs)
7438
7439 def OnPaint(*args, **kwargs):
7440 """OnPaint(self, PaintEvent event)"""
7441 return _core_.Window_OnPaint(*args, **kwargs)
7442
7443 def HasScrollbar(*args, **kwargs):
7444 """
7445 HasScrollbar(self, int orient) -> bool
7446
7447 Does the window have the scrollbar for this orientation?
7448 """
7449 return _core_.Window_HasScrollbar(*args, **kwargs)
7450
7451 def SetScrollbar(*args, **kwargs):
7452 """
7453 SetScrollbar(self, int orientation, int position, int thumbSize, int range,
7454 bool refresh=True)
7455
7456 Sets the scrollbar properties of a built-in scrollbar.
7457 """
7458 return _core_.Window_SetScrollbar(*args, **kwargs)
7459
7460 def SetScrollPos(*args, **kwargs):
7461 """
7462 SetScrollPos(self, int orientation, int pos, bool refresh=True)
7463
7464 Sets the position of one of the built-in scrollbars.
7465 """
7466 return _core_.Window_SetScrollPos(*args, **kwargs)
7467
7468 def GetScrollPos(*args, **kwargs):
7469 """
7470 GetScrollPos(self, int orientation) -> int
7471
7472 Returns the built-in scrollbar position.
7473 """
7474 return _core_.Window_GetScrollPos(*args, **kwargs)
7475
7476 def GetScrollThumb(*args, **kwargs):
7477 """
7478 GetScrollThumb(self, int orientation) -> int
7479
7480 Returns the built-in scrollbar thumb size.
7481 """
7482 return _core_.Window_GetScrollThumb(*args, **kwargs)
7483
7484 def GetScrollRange(*args, **kwargs):
7485 """
7486 GetScrollRange(self, int orientation) -> int
7487
7488 Returns the built-in scrollbar range.
7489 """
7490 return _core_.Window_GetScrollRange(*args, **kwargs)
7491
7492 def ScrollWindow(*args, **kwargs):
7493 """
7494 ScrollWindow(self, int dx, int dy, Rect rect=None)
7495
7496 Physically scrolls the pixels in the window and move child windows
7497 accordingly. Use this function to optimise your scrolling
7498 implementations, to minimise the area that must be redrawn. Note that
7499 it is rarely required to call this function from a user program.
7500 """
7501 return _core_.Window_ScrollWindow(*args, **kwargs)
7502
7503 def ScrollLines(*args, **kwargs):
7504 """
7505 ScrollLines(self, int lines) -> bool
7506
7507 If the platform and window class supports it, scrolls the window by
7508 the given number of lines down, if lines is positive, or up if lines
7509 is negative. Returns True if the window was scrolled, False if it was
7510 already on top/bottom and nothing was done.
7511 """
7512 return _core_.Window_ScrollLines(*args, **kwargs)
7513
7514 def ScrollPages(*args, **kwargs):
7515 """
7516 ScrollPages(self, int pages) -> bool
7517
7518 If the platform and window class supports it, scrolls the window by
7519 the given number of pages down, if pages is positive, or up if pages
7520 is negative. Returns True if the window was scrolled, False if it was
7521 already on top/bottom and nothing was done.
7522 """
7523 return _core_.Window_ScrollPages(*args, **kwargs)
7524
7525 def LineUp(*args, **kwargs):
7526 """
7527 LineUp(self) -> bool
7528
7529 This is just a wrapper for ScrollLines(-1).
7530 """
7531 return _core_.Window_LineUp(*args, **kwargs)
7532
7533 def LineDown(*args, **kwargs):
7534 """
7535 LineDown(self) -> bool
7536
7537 This is just a wrapper for ScrollLines(1).
7538 """
7539 return _core_.Window_LineDown(*args, **kwargs)
7540
7541 def PageUp(*args, **kwargs):
7542 """
7543 PageUp(self) -> bool
7544
7545 This is just a wrapper for ScrollPages(-1).
7546 """
7547 return _core_.Window_PageUp(*args, **kwargs)
7548
7549 def PageDown(*args, **kwargs):
7550 """
7551 PageDown(self) -> bool
7552
7553 This is just a wrapper for ScrollPages(1).
7554 """
7555 return _core_.Window_PageDown(*args, **kwargs)
7556
7557 def SetHelpText(*args, **kwargs):
7558 """
7559 SetHelpText(self, String text)
7560
7561 Sets the help text to be used as context-sensitive help for this
7562 window. Note that the text is actually stored by the current
7563 wxHelpProvider implementation, and not in the window object itself.
7564 """
7565 return _core_.Window_SetHelpText(*args, **kwargs)
7566
7567 def SetHelpTextForId(*args, **kwargs):
7568 """
7569 SetHelpTextForId(self, String text)
7570
7571 Associate this help text with all windows with the same id as this
7572 one.
7573 """
7574 return _core_.Window_SetHelpTextForId(*args, **kwargs)
7575
7576 def GetHelpText(*args, **kwargs):
7577 """
7578 GetHelpText(self) -> String
7579
7580 Gets the help text to be used as context-sensitive help for this
7581 window. Note that the text is actually stored by the current
7582 wxHelpProvider implementation, and not in the window object itself.
7583 """
7584 return _core_.Window_GetHelpText(*args, **kwargs)
7585
7586 def SetToolTipString(*args, **kwargs):
7587 """
7588 SetToolTipString(self, String tip)
7589
7590 Attach a tooltip to the window.
7591 """
7592 return _core_.Window_SetToolTipString(*args, **kwargs)
7593
7594 def SetToolTip(*args, **kwargs):
7595 """
7596 SetToolTip(self, ToolTip tip)
7597
7598 Attach a tooltip to the window.
7599 """
7600 return _core_.Window_SetToolTip(*args, **kwargs)
7601
7602 def GetToolTip(*args, **kwargs):
7603 """
7604 GetToolTip(self) -> ToolTip
7605
7606 get the associated tooltip or None if none
7607 """
7608 return _core_.Window_GetToolTip(*args, **kwargs)
7609
7610 def SetDropTarget(*args, **kwargs):
7611 """
7612 SetDropTarget(self, DropTarget dropTarget)
7613
7614 Associates a drop target with this window. If the window already has
7615 a drop target, it is deleted.
7616 """
7617 return _core_.Window_SetDropTarget(*args, **kwargs)
7618
7619 def GetDropTarget(*args, **kwargs):
7620 """
7621 GetDropTarget(self) -> DropTarget
7622
7623 Returns the associated drop target, which may be None.
7624 """
7625 return _core_.Window_GetDropTarget(*args, **kwargs)
7626
7627 def DragAcceptFiles(*args, **kwargs):
7628 """
7629 DragAcceptFiles(self, bool accept)
7630
7631 Enables or disables eligibility for drop file events, EVT_DROP_FILES.
7632 Only available on Windows.
7633 """
7634 return _core_.Window_DragAcceptFiles(*args, **kwargs)
7635
7636 def SetConstraints(*args, **kwargs):
7637 """
7638 SetConstraints(self, LayoutConstraints constraints)
7639
7640 Sets the window to have the given layout constraints. If an existing
7641 layout constraints object is already owned by the window, it will be
7642 deleted. Pass None to disassociate and delete the window's current
7643 constraints.
7644
7645 You must call SetAutoLayout to tell a window to use the constraints
7646 automatically in its default EVT_SIZE handler; otherwise, you must
7647 handle EVT_SIZE yourself and call Layout() explicitly. When setting
7648 both a wx.LayoutConstraints and a wx.Sizer, only the sizer will have
7649 effect.
7650 """
7651 return _core_.Window_SetConstraints(*args, **kwargs)
7652
7653 def GetConstraints(*args, **kwargs):
7654 """
7655 GetConstraints(self) -> LayoutConstraints
7656
7657 Returns a pointer to the window's layout constraints, or None if there
7658 are none.
7659 """
7660 return _core_.Window_GetConstraints(*args, **kwargs)
7661
7662 def SetAutoLayout(*args, **kwargs):
7663 """
7664 SetAutoLayout(self, bool autoLayout)
7665
7666 Determines whether the Layout function will be called automatically
7667 when the window is resized. It is called implicitly by SetSizer but
7668 if you use SetConstraints you should call it manually or otherwise the
7669 window layout won't be correctly updated when its size changes.
7670 """
7671 return _core_.Window_SetAutoLayout(*args, **kwargs)
7672
7673 def GetAutoLayout(*args, **kwargs):
7674 """
7675 GetAutoLayout(self) -> bool
7676
7677 Returns the current autoLayout setting
7678 """
7679 return _core_.Window_GetAutoLayout(*args, **kwargs)
7680
7681 def Layout(*args, **kwargs):
7682 """
7683 Layout(self) -> bool
7684
7685 Invokes the constraint-based layout algorithm or the sizer-based
7686 algorithm for this window. See SetAutoLayout: when auto layout is on,
7687 this function gets called automatically by the default EVT_SIZE
7688 handler when the window is resized.
7689 """
7690 return _core_.Window_Layout(*args, **kwargs)
7691
7692 def SetSizer(*args, **kwargs):
7693 """
7694 SetSizer(self, Sizer sizer, bool deleteOld=True)
7695
7696 Sets the window to have the given layout sizer. The window will then
7697 own the object, and will take care of its deletion. If an existing
7698 layout sizer object is already owned by the window, it will be deleted
7699 if the deleteOld parameter is true. Note that this function will also
7700 call SetAutoLayout implicitly with a True parameter if the sizer is
7701 non-None, and False otherwise.
7702 """
7703 return _core_.Window_SetSizer(*args, **kwargs)
7704
7705 def SetSizerAndFit(*args, **kwargs):
7706 """
7707 SetSizerAndFit(self, Sizer sizer, bool deleteOld=True)
7708
7709 The same as SetSizer, except it also sets the size hints for the
7710 window based on the sizer's minimum size.
7711 """
7712 return _core_.Window_SetSizerAndFit(*args, **kwargs)
7713
7714 def GetSizer(*args, **kwargs):
7715 """
7716 GetSizer(self) -> Sizer
7717
7718 Return the sizer associated with the window by a previous call to
7719 SetSizer or None if there isn't one.
7720 """
7721 return _core_.Window_GetSizer(*args, **kwargs)
7722
7723 def SetContainingSizer(*args, **kwargs):
7724 """
7725 SetContainingSizer(self, Sizer sizer)
7726
7727 This normally does not need to be called by application code. It is
7728 called internally when a window is added to a sizer, and is used so
7729 the window can remove itself from the sizer when it is destroyed.
7730 """
7731 return _core_.Window_SetContainingSizer(*args, **kwargs)
7732
7733 def GetContainingSizer(*args, **kwargs):
7734 """
7735 GetContainingSizer(self) -> Sizer
7736
7737 Return the sizer that this window is a member of, if any, otherwise None.
7738 """
7739 return _core_.Window_GetContainingSizer(*args, **kwargs)
7740
7741 def InheritAttributes(*args, **kwargs):
7742 """
7743 InheritAttributes(self)
7744
7745 This function is (or should be, in case of custom controls) called
7746 during window creation to intelligently set up the window visual
7747 attributes, that is the font and the foreground and background
7748 colours.
7749
7750 By 'intelligently' the following is meant: by default, all windows use
7751 their own default attributes. However if some of the parent's
7752 attributes are explicitly changed (that is, using SetFont and not
7753 SetOwnFont) and if the corresponding attribute hadn't been
7754 explicitly set for this window itself, then this window takes the same
7755 value as used by the parent. In addition, if the window overrides
7756 ShouldInheritColours to return false, the colours will not be changed
7757 no matter what and only the font might.
7758
7759 This rather complicated logic is necessary in order to accommodate the
7760 different usage scenarios. The most common one is when all default
7761 attributes are used and in this case, nothing should be inherited as
7762 in modern GUIs different controls use different fonts (and colours)
7763 than their siblings so they can't inherit the same value from the
7764 parent. However it was also deemed desirable to allow to simply change
7765 the attributes of all children at once by just changing the font or
7766 colour of their common parent, hence in this case we do inherit the
7767 parents attributes.
7768
7769 """
7770 return _core_.Window_InheritAttributes(*args, **kwargs)
7771
7772 def ShouldInheritColours(*args, **kwargs):
7773 """
7774 ShouldInheritColours(self) -> bool
7775
7776 Return true from here to allow the colours of this window to be
7777 changed by InheritAttributes, returning false forbids inheriting them
7778 from the parent window.
7779
7780 The base class version returns false, but this method is overridden in
7781 wxControl where it returns true.
7782 """
7783 return _core_.Window_ShouldInheritColours(*args, **kwargs)
7784
7785 def PostCreate(self, pre):
7786 """
7787 Phase 3 of the 2-phase create <wink!>
7788 Call this method after precreating the window with the 2-phase create method.
7789 """
7790 self.this = pre.this
7791 self.thisown = pre.thisown
7792 pre.thisown = 0
7793 if hasattr(self, '_setOORInfo'):
7794 self._setOORInfo(self)
7795 if hasattr(self, '_setCallbackInfo'):
7796 self._setCallbackInfo(self, self.__class__)
7797
7798
7799 class WindowPtr(Window):
7800 def __init__(self, this):
7801 self.this = this
7802 if not hasattr(self,"thisown"): self.thisown = 0
7803 self.__class__ = Window
7804 _core_.Window_swigregister(WindowPtr)
7805
7806 def PreWindow(*args, **kwargs):
7807 """
7808 PreWindow() -> Window
7809
7810 Precreate a Window for 2-phase creation.
7811 """
7812 val = _core_.new_PreWindow(*args, **kwargs)
7813 val.thisown = 1
7814 return val
7815
7816 def Window_NewControlId(*args, **kwargs):
7817 """
7818 Window_NewControlId() -> int
7819
7820 Generate a control id for the controls which were not given one.
7821 """
7822 return _core_.Window_NewControlId(*args, **kwargs)
7823
7824 def Window_NextControlId(*args, **kwargs):
7825 """
7826 Window_NextControlId(int winid) -> int
7827
7828 Get the id of the control following the one with the given
7829 autogenerated) id
7830 """
7831 return _core_.Window_NextControlId(*args, **kwargs)
7832
7833 def Window_PrevControlId(*args, **kwargs):
7834 """
7835 Window_PrevControlId(int winid) -> int
7836
7837 Get the id of the control preceding the one with the given
7838 autogenerated) id
7839 """
7840 return _core_.Window_PrevControlId(*args, **kwargs)
7841
7842 def Window_FindFocus(*args, **kwargs):
7843 """
7844 Window_FindFocus() -> Window
7845
7846 Returns the window or control that currently has the keyboard focus,
7847 or None.
7848 """
7849 return _core_.Window_FindFocus(*args, **kwargs)
7850
7851 def Window_GetCapture(*args, **kwargs):
7852 """
7853 Window_GetCapture() -> Window
7854
7855 Returns the window which currently captures the mouse or None
7856 """
7857 return _core_.Window_GetCapture(*args, **kwargs)
7858
7859 def Window_GetClassDefaultAttributes(*args, **kwargs):
7860 """
7861 Window_GetClassDefaultAttributes(int variant=WINDOW_VARIANT_NORMAL) -> VisualAttributes
7862
7863 Get the default attributes for this class. This is useful if you want
7864 to use the same font or colour in your own control as in a standard
7865 control -- which is a much better idea than hard coding specific
7866 colours or fonts which might look completely out of place on the
7867 user's system, especially if it uses themes.
7868
7869 The variant parameter is only relevant under Mac currently and is
7870 ignore under other platforms. Under Mac, it will change the size of
7871 the returned font. See `wx.Window.SetWindowVariant` for more about
7872 this.
7873 """
7874 return _core_.Window_GetClassDefaultAttributes(*args, **kwargs)
7875
7876 def DLG_PNT(win, point_or_x, y=None):
7877 """
7878 Convenience function for converting a Point or (x,y) in
7879 dialog units to pixel units.
7880 """
7881 if y is None:
7882 return win.ConvertDialogPointToPixels(point_or_x)
7883 else:
7884 return win.ConvertDialogPointToPixels(wx.Point(point_or_x, y))
7885
7886 def DLG_SZE(win, size_width, height=None):
7887 """
7888 Convenience function for converting a Size or (w,h) in
7889 dialog units to pixel units.
7890 """
7891 if height is None:
7892 return win.ConvertDialogSizeToPixels(size_width)
7893 else:
7894 return win.ConvertDialogSizeToPixels(wx.Size(size_width, height))
7895
7896
7897 def FindWindowById(*args, **kwargs):
7898 """
7899 FindWindowById(long id, Window parent=None) -> Window
7900
7901 Find the first window in the application with the given id. If parent
7902 is None, the search will start from all top-level frames and dialog
7903 boxes; if non-None, the search will be limited to the given window
7904 hierarchy. The search is recursive in both cases.
7905 """
7906 return _core_.FindWindowById(*args, **kwargs)
7907
7908 def FindWindowByName(*args, **kwargs):
7909 """
7910 FindWindowByName(String name, Window parent=None) -> Window
7911
7912 Find a window by its name (as given in a window constructor or Create
7913 function call). If parent is None, the search will start from all
7914 top-level frames and dialog boxes; if non-None, the search will be
7915 limited to the given window hierarchy. The search is recursive in both
7916 cases.
7917
7918 If no window with such name is found, wx.FindWindowByLabel is called.
7919 """
7920 return _core_.FindWindowByName(*args, **kwargs)
7921
7922 def FindWindowByLabel(*args, **kwargs):
7923 """
7924 FindWindowByLabel(String label, Window parent=None) -> Window
7925
7926 Find a window by its label. Depending on the type of window, the label
7927 may be a window title or panel item label. If parent is None, the
7928 search will start from all top-level frames and dialog boxes; if
7929 non-None, the search will be limited to the given window
7930 hierarchy. The search is recursive in both cases.
7931 """
7932 return _core_.FindWindowByLabel(*args, **kwargs)
7933
7934 def Window_FromHWND(*args, **kwargs):
7935 """Window_FromHWND(Window parent, unsigned long _hWnd) -> Window"""
7936 return _core_.Window_FromHWND(*args, **kwargs)
7937 #---------------------------------------------------------------------------
7938
7939 class Validator(EvtHandler):
7940 def __repr__(self):
7941 return "<%s.%s; proxy of C++ wxValidator instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
7942 def __init__(self, *args, **kwargs):
7943 """__init__(self) -> Validator"""
7944 newobj = _core_.new_Validator(*args, **kwargs)
7945 self.this = newobj.this
7946 self.thisown = 1
7947 del newobj.thisown
7948 self._setOORInfo(self)
7949
7950 def Clone(*args, **kwargs):
7951 """Clone(self) -> Validator"""
7952 return _core_.Validator_Clone(*args, **kwargs)
7953
7954 def Validate(*args, **kwargs):
7955 """Validate(self, Window parent) -> bool"""
7956 return _core_.Validator_Validate(*args, **kwargs)
7957
7958 def TransferToWindow(*args, **kwargs):
7959 """TransferToWindow(self) -> bool"""
7960 return _core_.Validator_TransferToWindow(*args, **kwargs)
7961
7962 def TransferFromWindow(*args, **kwargs):
7963 """TransferFromWindow(self) -> bool"""
7964 return _core_.Validator_TransferFromWindow(*args, **kwargs)
7965
7966 def GetWindow(*args, **kwargs):
7967 """GetWindow(self) -> Window"""
7968 return _core_.Validator_GetWindow(*args, **kwargs)
7969
7970 def SetWindow(*args, **kwargs):
7971 """SetWindow(self, Window window)"""
7972 return _core_.Validator_SetWindow(*args, **kwargs)
7973
7974 def IsSilent(*args, **kwargs):
7975 """IsSilent() -> bool"""
7976 return _core_.Validator_IsSilent(*args, **kwargs)
7977
7978 IsSilent = staticmethod(IsSilent)
7979 def SetBellOnError(*args, **kwargs):
7980 """SetBellOnError(int doIt=True)"""
7981 return _core_.Validator_SetBellOnError(*args, **kwargs)
7982
7983 SetBellOnError = staticmethod(SetBellOnError)
7984
7985 class ValidatorPtr(Validator):
7986 def __init__(self, this):
7987 self.this = this
7988 if not hasattr(self,"thisown"): self.thisown = 0
7989 self.__class__ = Validator
7990 _core_.Validator_swigregister(ValidatorPtr)
7991
7992 def Validator_IsSilent(*args, **kwargs):
7993 """Validator_IsSilent() -> bool"""
7994 return _core_.Validator_IsSilent(*args, **kwargs)
7995
7996 def Validator_SetBellOnError(*args, **kwargs):
7997 """Validator_SetBellOnError(int doIt=True)"""
7998 return _core_.Validator_SetBellOnError(*args, **kwargs)
7999
8000 class PyValidator(Validator):
8001 def __repr__(self):
8002 return "<%s.%s; proxy of C++ wxPyValidator instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
8003 def __init__(self, *args, **kwargs):
8004 """__init__(self) -> PyValidator"""
8005 newobj = _core_.new_PyValidator(*args, **kwargs)
8006 self.this = newobj.this
8007 self.thisown = 1
8008 del newobj.thisown
8009
8010 self._setCallbackInfo(self, PyValidator, 1)
8011 self._setOORInfo(self)
8012
8013 def _setCallbackInfo(*args, **kwargs):
8014 """_setCallbackInfo(self, PyObject self, PyObject _class, int incref=True)"""
8015 return _core_.PyValidator__setCallbackInfo(*args, **kwargs)
8016
8017
8018 class PyValidatorPtr(PyValidator):
8019 def __init__(self, this):
8020 self.this = this
8021 if not hasattr(self,"thisown"): self.thisown = 0
8022 self.__class__ = PyValidator
8023 _core_.PyValidator_swigregister(PyValidatorPtr)
8024
8025 #---------------------------------------------------------------------------
8026
8027 class Menu(EvtHandler):
8028 def __repr__(self):
8029 return "<%s.%s; proxy of C++ wxMenu instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
8030 def __init__(self, *args, **kwargs):
8031 """__init__(self, String title=EmptyString, long style=0) -> Menu"""
8032 newobj = _core_.new_Menu(*args, **kwargs)
8033 self.this = newobj.this
8034 self.thisown = 1
8035 del newobj.thisown
8036 self._setOORInfo(self)
8037
8038 def Append(*args, **kwargs):
8039 """Append(self, int id, String text, String help=EmptyString, int kind=ITEM_NORMAL) -> MenuItem"""
8040 return _core_.Menu_Append(*args, **kwargs)
8041
8042 def AppendSeparator(*args, **kwargs):
8043 """AppendSeparator(self) -> MenuItem"""
8044 return _core_.Menu_AppendSeparator(*args, **kwargs)
8045
8046 def AppendCheckItem(*args, **kwargs):
8047 """AppendCheckItem(self, int id, String text, String help=EmptyString) -> MenuItem"""
8048 return _core_.Menu_AppendCheckItem(*args, **kwargs)
8049
8050 def AppendRadioItem(*args, **kwargs):
8051 """AppendRadioItem(self, int id, String text, String help=EmptyString) -> MenuItem"""
8052 return _core_.Menu_AppendRadioItem(*args, **kwargs)
8053
8054 def AppendMenu(*args, **kwargs):
8055 """AppendMenu(self, int id, String text, Menu submenu, String help=EmptyString) -> MenuItem"""
8056 return _core_.Menu_AppendMenu(*args, **kwargs)
8057
8058 def AppendItem(*args, **kwargs):
8059 """AppendItem(self, MenuItem item) -> MenuItem"""
8060 return _core_.Menu_AppendItem(*args, **kwargs)
8061
8062 def Break(*args, **kwargs):
8063 """Break(self)"""
8064 return _core_.Menu_Break(*args, **kwargs)
8065
8066 def InsertItem(*args, **kwargs):
8067 """InsertItem(self, size_t pos, MenuItem item) -> MenuItem"""
8068 return _core_.Menu_InsertItem(*args, **kwargs)
8069
8070 def Insert(*args, **kwargs):
8071 """
8072 Insert(self, size_t pos, int id, String text, String help=EmptyString,
8073 int kind=ITEM_NORMAL) -> MenuItem
8074 """
8075 return _core_.Menu_Insert(*args, **kwargs)
8076
8077 def InsertSeparator(*args, **kwargs):
8078 """InsertSeparator(self, size_t pos) -> MenuItem"""
8079 return _core_.Menu_InsertSeparator(*args, **kwargs)
8080
8081 def InsertCheckItem(*args, **kwargs):
8082 """InsertCheckItem(self, size_t pos, int id, String text, String help=EmptyString) -> MenuItem"""
8083 return _core_.Menu_InsertCheckItem(*args, **kwargs)
8084
8085 def InsertRadioItem(*args, **kwargs):
8086 """InsertRadioItem(self, size_t pos, int id, String text, String help=EmptyString) -> MenuItem"""
8087 return _core_.Menu_InsertRadioItem(*args, **kwargs)
8088
8089 def InsertMenu(*args, **kwargs):
8090 """InsertMenu(self, size_t pos, int id, String text, Menu submenu, String help=EmptyString) -> MenuItem"""
8091 return _core_.Menu_InsertMenu(*args, **kwargs)
8092
8093 def PrependItem(*args, **kwargs):
8094 """PrependItem(self, MenuItem item) -> MenuItem"""
8095 return _core_.Menu_PrependItem(*args, **kwargs)
8096
8097 def Prepend(*args, **kwargs):
8098 """Prepend(self, int id, String text, String help=EmptyString, int kind=ITEM_NORMAL) -> MenuItem"""
8099 return _core_.Menu_Prepend(*args, **kwargs)
8100
8101 def PrependSeparator(*args, **kwargs):
8102 """PrependSeparator(self) -> MenuItem"""
8103 return _core_.Menu_PrependSeparator(*args, **kwargs)
8104
8105 def PrependCheckItem(*args, **kwargs):
8106 """PrependCheckItem(self, int id, String text, String help=EmptyString) -> MenuItem"""
8107 return _core_.Menu_PrependCheckItem(*args, **kwargs)
8108
8109 def PrependRadioItem(*args, **kwargs):
8110 """PrependRadioItem(self, int id, String text, String help=EmptyString) -> MenuItem"""
8111 return _core_.Menu_PrependRadioItem(*args, **kwargs)
8112
8113 def PrependMenu(*args, **kwargs):
8114 """PrependMenu(self, int id, String text, Menu submenu, String help=EmptyString) -> MenuItem"""
8115 return _core_.Menu_PrependMenu(*args, **kwargs)
8116
8117 def Remove(*args, **kwargs):
8118 """Remove(self, int id) -> MenuItem"""
8119 return _core_.Menu_Remove(*args, **kwargs)
8120
8121 def RemoveItem(*args, **kwargs):
8122 """RemoveItem(self, MenuItem item) -> MenuItem"""
8123 return _core_.Menu_RemoveItem(*args, **kwargs)
8124
8125 def Delete(*args, **kwargs):
8126 """Delete(self, int id) -> bool"""
8127 return _core_.Menu_Delete(*args, **kwargs)
8128
8129 def DeleteItem(*args, **kwargs):
8130 """DeleteItem(self, MenuItem item) -> bool"""
8131 return _core_.Menu_DeleteItem(*args, **kwargs)
8132
8133 def Destroy(*args, **kwargs):
8134 """
8135 Destroy(self)
8136
8137 Deletes the C++ object this Python object is a proxy for.
8138 """
8139 return _core_.Menu_Destroy(*args, **kwargs)
8140
8141 def DestroyId(*args, **kwargs):
8142 """
8143 DestroyId(self, int id) -> bool
8144
8145 Deletes the C++ object this Python object is a proxy for.
8146 """
8147 return _core_.Menu_DestroyId(*args, **kwargs)
8148
8149 def DestroyItem(*args, **kwargs):
8150 """
8151 DestroyItem(self, MenuItem item) -> bool
8152
8153 Deletes the C++ object this Python object is a proxy for.
8154 """
8155 return _core_.Menu_DestroyItem(*args, **kwargs)
8156
8157 def GetMenuItemCount(*args, **kwargs):
8158 """GetMenuItemCount(self) -> size_t"""
8159 return _core_.Menu_GetMenuItemCount(*args, **kwargs)
8160
8161 def GetMenuItems(*args, **kwargs):
8162 """GetMenuItems(self) -> PyObject"""
8163 return _core_.Menu_GetMenuItems(*args, **kwargs)
8164
8165 def FindItem(*args, **kwargs):
8166 """FindItem(self, String item) -> int"""
8167 return _core_.Menu_FindItem(*args, **kwargs)
8168
8169 def FindItemById(*args, **kwargs):
8170 """FindItemById(self, int id) -> MenuItem"""
8171 return _core_.Menu_FindItemById(*args, **kwargs)
8172
8173 def FindItemByPosition(*args, **kwargs):
8174 """FindItemByPosition(self, size_t position) -> MenuItem"""
8175 return _core_.Menu_FindItemByPosition(*args, **kwargs)
8176
8177 def Enable(*args, **kwargs):
8178 """Enable(self, int id, bool enable)"""
8179 return _core_.Menu_Enable(*args, **kwargs)
8180
8181 def IsEnabled(*args, **kwargs):
8182 """IsEnabled(self, int id) -> bool"""
8183 return _core_.Menu_IsEnabled(*args, **kwargs)
8184
8185 def Check(*args, **kwargs):
8186 """Check(self, int id, bool check)"""
8187 return _core_.Menu_Check(*args, **kwargs)
8188
8189 def IsChecked(*args, **kwargs):
8190 """IsChecked(self, int id) -> bool"""
8191 return _core_.Menu_IsChecked(*args, **kwargs)
8192
8193 def SetLabel(*args, **kwargs):
8194 """SetLabel(self, int id, String label)"""
8195 return _core_.Menu_SetLabel(*args, **kwargs)
8196
8197 def GetLabel(*args, **kwargs):
8198 """GetLabel(self, int id) -> String"""
8199 return _core_.Menu_GetLabel(*args, **kwargs)
8200
8201 def SetHelpString(*args, **kwargs):
8202 """SetHelpString(self, int id, String helpString)"""
8203 return _core_.Menu_SetHelpString(*args, **kwargs)
8204
8205 def GetHelpString(*args, **kwargs):
8206 """GetHelpString(self, int id) -> String"""
8207 return _core_.Menu_GetHelpString(*args, **kwargs)
8208
8209 def SetTitle(*args, **kwargs):
8210 """SetTitle(self, String title)"""
8211 return _core_.Menu_SetTitle(*args, **kwargs)
8212
8213 def GetTitle(*args, **kwargs):
8214 """GetTitle(self) -> String"""
8215 return _core_.Menu_GetTitle(*args, **kwargs)
8216
8217 def SetEventHandler(*args, **kwargs):
8218 """SetEventHandler(self, EvtHandler handler)"""
8219 return _core_.Menu_SetEventHandler(*args, **kwargs)
8220
8221 def GetEventHandler(*args, **kwargs):
8222 """GetEventHandler(self) -> EvtHandler"""
8223 return _core_.Menu_GetEventHandler(*args, **kwargs)
8224
8225 def SetInvokingWindow(*args, **kwargs):
8226 """SetInvokingWindow(self, Window win)"""
8227 return _core_.Menu_SetInvokingWindow(*args, **kwargs)
8228
8229 def GetInvokingWindow(*args, **kwargs):
8230 """GetInvokingWindow(self) -> Window"""
8231 return _core_.Menu_GetInvokingWindow(*args, **kwargs)
8232
8233 def GetStyle(*args, **kwargs):
8234 """GetStyle(self) -> long"""
8235 return _core_.Menu_GetStyle(*args, **kwargs)
8236
8237 def UpdateUI(*args, **kwargs):
8238 """UpdateUI(self, EvtHandler source=None)"""
8239 return _core_.Menu_UpdateUI(*args, **kwargs)
8240
8241 def GetMenuBar(*args, **kwargs):
8242 """GetMenuBar(self) -> MenuBar"""
8243 return _core_.Menu_GetMenuBar(*args, **kwargs)
8244
8245 def Attach(*args, **kwargs):
8246 """Attach(self, wxMenuBarBase menubar)"""
8247 return _core_.Menu_Attach(*args, **kwargs)
8248
8249 def Detach(*args, **kwargs):
8250 """Detach(self)"""
8251 return _core_.Menu_Detach(*args, **kwargs)
8252
8253 def IsAttached(*args, **kwargs):
8254 """IsAttached(self) -> bool"""
8255 return _core_.Menu_IsAttached(*args, **kwargs)
8256
8257 def SetParent(*args, **kwargs):
8258 """SetParent(self, Menu parent)"""
8259 return _core_.Menu_SetParent(*args, **kwargs)
8260
8261 def GetParent(*args, **kwargs):
8262 """GetParent(self) -> Menu"""
8263 return _core_.Menu_GetParent(*args, **kwargs)
8264
8265
8266 class MenuPtr(Menu):
8267 def __init__(self, this):
8268 self.this = this
8269 if not hasattr(self,"thisown"): self.thisown = 0
8270 self.__class__ = Menu
8271 _core_.Menu_swigregister(MenuPtr)
8272 DefaultValidator = cvar.DefaultValidator
8273
8274 #---------------------------------------------------------------------------
8275
8276 class MenuBar(Window):
8277 def __repr__(self):
8278 return "<%s.%s; proxy of C++ wxMenuBar instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
8279 def __init__(self, *args, **kwargs):
8280 """__init__(self, long style=0) -> MenuBar"""
8281 newobj = _core_.new_MenuBar(*args, **kwargs)
8282 self.this = newobj.this
8283 self.thisown = 1
8284 del newobj.thisown
8285 self._setOORInfo(self)
8286
8287 def Append(*args, **kwargs):
8288 """Append(self, Menu menu, String title) -> bool"""
8289 return _core_.MenuBar_Append(*args, **kwargs)
8290
8291 def Insert(*args, **kwargs):
8292 """Insert(self, size_t pos, Menu menu, String title) -> bool"""
8293 return _core_.MenuBar_Insert(*args, **kwargs)
8294
8295 def GetMenuCount(*args, **kwargs):
8296 """GetMenuCount(self) -> size_t"""
8297 return _core_.MenuBar_GetMenuCount(*args, **kwargs)
8298
8299 def GetMenu(*args, **kwargs):
8300 """GetMenu(self, size_t pos) -> Menu"""
8301 return _core_.MenuBar_GetMenu(*args, **kwargs)
8302
8303 def Replace(*args, **kwargs):
8304 """Replace(self, size_t pos, Menu menu, String title) -> Menu"""
8305 return _core_.MenuBar_Replace(*args, **kwargs)
8306
8307 def Remove(*args, **kwargs):
8308 """Remove(self, size_t pos) -> Menu"""
8309 return _core_.MenuBar_Remove(*args, **kwargs)
8310
8311 def EnableTop(*args, **kwargs):
8312 """EnableTop(self, size_t pos, bool enable)"""
8313 return _core_.MenuBar_EnableTop(*args, **kwargs)
8314
8315 def IsEnabledTop(*args, **kwargs):
8316 """IsEnabledTop(self, size_t pos) -> bool"""
8317 return _core_.MenuBar_IsEnabledTop(*args, **kwargs)
8318
8319 def SetLabelTop(*args, **kwargs):
8320 """SetLabelTop(self, size_t pos, String label)"""
8321 return _core_.MenuBar_SetLabelTop(*args, **kwargs)
8322
8323 def GetLabelTop(*args, **kwargs):
8324 """GetLabelTop(self, size_t pos) -> String"""
8325 return _core_.MenuBar_GetLabelTop(*args, **kwargs)
8326
8327 def FindMenuItem(*args, **kwargs):
8328 """FindMenuItem(self, String menu, String item) -> int"""
8329 return _core_.MenuBar_FindMenuItem(*args, **kwargs)
8330
8331 def FindItemById(*args, **kwargs):
8332 """FindItemById(self, int id) -> MenuItem"""
8333 return _core_.MenuBar_FindItemById(*args, **kwargs)
8334
8335 def FindMenu(*args, **kwargs):
8336 """FindMenu(self, String title) -> int"""
8337 return _core_.MenuBar_FindMenu(*args, **kwargs)
8338
8339 def Enable(*args, **kwargs):
8340 """Enable(self, int id, bool enable)"""
8341 return _core_.MenuBar_Enable(*args, **kwargs)
8342
8343 def Check(*args, **kwargs):
8344 """Check(self, int id, bool check)"""
8345 return _core_.MenuBar_Check(*args, **kwargs)
8346
8347 def IsChecked(*args, **kwargs):
8348 """IsChecked(self, int id) -> bool"""
8349 return _core_.MenuBar_IsChecked(*args, **kwargs)
8350
8351 def IsEnabled(*args, **kwargs):
8352 """IsEnabled(self, int id) -> bool"""
8353 return _core_.MenuBar_IsEnabled(*args, **kwargs)
8354
8355 def SetLabel(*args, **kwargs):
8356 """SetLabel(self, int id, String label)"""
8357 return _core_.MenuBar_SetLabel(*args, **kwargs)
8358
8359 def GetLabel(*args, **kwargs):
8360 """GetLabel(self, int id) -> String"""
8361 return _core_.MenuBar_GetLabel(*args, **kwargs)
8362
8363 def SetHelpString(*args, **kwargs):
8364 """SetHelpString(self, int id, String helpString)"""
8365 return _core_.MenuBar_SetHelpString(*args, **kwargs)
8366
8367 def GetHelpString(*args, **kwargs):
8368 """GetHelpString(self, int id) -> String"""
8369 return _core_.MenuBar_GetHelpString(*args, **kwargs)
8370
8371 def GetFrame(*args, **kwargs):
8372 """GetFrame(self) -> wxFrame"""
8373 return _core_.MenuBar_GetFrame(*args, **kwargs)
8374
8375 def IsAttached(*args, **kwargs):
8376 """IsAttached(self) -> bool"""
8377 return _core_.MenuBar_IsAttached(*args, **kwargs)
8378
8379 def Attach(*args, **kwargs):
8380 """Attach(self, wxFrame frame)"""
8381 return _core_.MenuBar_Attach(*args, **kwargs)
8382
8383 def Detach(*args, **kwargs):
8384 """Detach(self)"""
8385 return _core_.MenuBar_Detach(*args, **kwargs)
8386
8387
8388 class MenuBarPtr(MenuBar):
8389 def __init__(self, this):
8390 self.this = this
8391 if not hasattr(self,"thisown"): self.thisown = 0
8392 self.__class__ = MenuBar
8393 _core_.MenuBar_swigregister(MenuBarPtr)
8394
8395 #---------------------------------------------------------------------------
8396
8397 class MenuItem(Object):
8398 def __repr__(self):
8399 return "<%s.%s; proxy of C++ wxMenuItem instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
8400 def __init__(self, *args, **kwargs):
8401 """
8402 __init__(self, Menu parentMenu=None, int id=ID_ANY, String text=EmptyString,
8403 String help=EmptyString, int kind=ITEM_NORMAL,
8404 Menu subMenu=None) -> MenuItem
8405 """
8406 newobj = _core_.new_MenuItem(*args, **kwargs)
8407 self.this = newobj.this
8408 self.thisown = 1
8409 del newobj.thisown
8410 def GetMenu(*args, **kwargs):
8411 """GetMenu(self) -> Menu"""
8412 return _core_.MenuItem_GetMenu(*args, **kwargs)
8413
8414 def SetMenu(*args, **kwargs):
8415 """SetMenu(self, Menu menu)"""
8416 return _core_.MenuItem_SetMenu(*args, **kwargs)
8417
8418 def SetId(*args, **kwargs):
8419 """SetId(self, int id)"""
8420 return _core_.MenuItem_SetId(*args, **kwargs)
8421
8422 def GetId(*args, **kwargs):
8423 """GetId(self) -> int"""
8424 return _core_.MenuItem_GetId(*args, **kwargs)
8425
8426 def IsSeparator(*args, **kwargs):
8427 """IsSeparator(self) -> bool"""
8428 return _core_.MenuItem_IsSeparator(*args, **kwargs)
8429
8430 def SetText(*args, **kwargs):
8431 """SetText(self, String str)"""
8432 return _core_.MenuItem_SetText(*args, **kwargs)
8433
8434 def GetLabel(*args, **kwargs):
8435 """GetLabel(self) -> String"""
8436 return _core_.MenuItem_GetLabel(*args, **kwargs)
8437
8438 def GetText(*args, **kwargs):
8439 """GetText(self) -> String"""
8440 return _core_.MenuItem_GetText(*args, **kwargs)
8441
8442 def GetLabelFromText(*args, **kwargs):
8443 """GetLabelFromText(String text) -> String"""
8444 return _core_.MenuItem_GetLabelFromText(*args, **kwargs)
8445
8446 GetLabelFromText = staticmethod(GetLabelFromText)
8447 def GetKind(*args, **kwargs):
8448 """GetKind(self) -> int"""
8449 return _core_.MenuItem_GetKind(*args, **kwargs)
8450
8451 def SetKind(*args, **kwargs):
8452 """SetKind(self, int kind)"""
8453 return _core_.MenuItem_SetKind(*args, **kwargs)
8454
8455 def SetCheckable(*args, **kwargs):
8456 """SetCheckable(self, bool checkable)"""
8457 return _core_.MenuItem_SetCheckable(*args, **kwargs)
8458
8459 def IsCheckable(*args, **kwargs):
8460 """IsCheckable(self) -> bool"""
8461 return _core_.MenuItem_IsCheckable(*args, **kwargs)
8462
8463 def IsSubMenu(*args, **kwargs):
8464 """IsSubMenu(self) -> bool"""
8465 return _core_.MenuItem_IsSubMenu(*args, **kwargs)
8466
8467 def SetSubMenu(*args, **kwargs):
8468 """SetSubMenu(self, Menu menu)"""
8469 return _core_.MenuItem_SetSubMenu(*args, **kwargs)
8470
8471 def GetSubMenu(*args, **kwargs):
8472 """GetSubMenu(self) -> Menu"""
8473 return _core_.MenuItem_GetSubMenu(*args, **kwargs)
8474
8475 def Enable(*args, **kwargs):
8476 """Enable(self, bool enable=True)"""
8477 return _core_.MenuItem_Enable(*args, **kwargs)
8478
8479 def IsEnabled(*args, **kwargs):
8480 """IsEnabled(self) -> bool"""
8481 return _core_.MenuItem_IsEnabled(*args, **kwargs)
8482
8483 def Check(*args, **kwargs):
8484 """Check(self, bool check=True)"""
8485 return _core_.MenuItem_Check(*args, **kwargs)
8486
8487 def IsChecked(*args, **kwargs):
8488 """IsChecked(self) -> bool"""
8489 return _core_.MenuItem_IsChecked(*args, **kwargs)
8490
8491 def Toggle(*args, **kwargs):
8492 """Toggle(self)"""
8493 return _core_.MenuItem_Toggle(*args, **kwargs)
8494
8495 def SetHelp(*args, **kwargs):
8496 """SetHelp(self, String str)"""
8497 return _core_.MenuItem_SetHelp(*args, **kwargs)
8498
8499 def GetHelp(*args, **kwargs):
8500 """GetHelp(self) -> String"""
8501 return _core_.MenuItem_GetHelp(*args, **kwargs)
8502
8503 def GetAccel(*args, **kwargs):
8504 """GetAccel(self) -> AcceleratorEntry"""
8505 return _core_.MenuItem_GetAccel(*args, **kwargs)
8506
8507 def SetAccel(*args, **kwargs):
8508 """SetAccel(self, AcceleratorEntry accel)"""
8509 return _core_.MenuItem_SetAccel(*args, **kwargs)
8510
8511 def SetFont(*args, **kwargs):
8512 """SetFont(self, Font font)"""
8513 return _core_.MenuItem_SetFont(*args, **kwargs)
8514
8515 def GetFont(*args, **kwargs):
8516 """GetFont(self) -> Font"""
8517 return _core_.MenuItem_GetFont(*args, **kwargs)
8518
8519 def SetTextColour(*args, **kwargs):
8520 """SetTextColour(self, Colour colText)"""
8521 return _core_.MenuItem_SetTextColour(*args, **kwargs)
8522
8523 def GetTextColour(*args, **kwargs):
8524 """GetTextColour(self) -> Colour"""
8525 return _core_.MenuItem_GetTextColour(*args, **kwargs)
8526
8527 def SetBackgroundColour(*args, **kwargs):
8528 """SetBackgroundColour(self, Colour colBack)"""
8529 return _core_.MenuItem_SetBackgroundColour(*args, **kwargs)
8530
8531 def GetBackgroundColour(*args, **kwargs):
8532 """GetBackgroundColour(self) -> Colour"""
8533 return _core_.MenuItem_GetBackgroundColour(*args, **kwargs)
8534
8535 def SetBitmaps(*args, **kwargs):
8536 """SetBitmaps(self, Bitmap bmpChecked, Bitmap bmpUnchecked=wxNullBitmap)"""
8537 return _core_.MenuItem_SetBitmaps(*args, **kwargs)
8538
8539 def SetDisabledBitmap(*args, **kwargs):
8540 """SetDisabledBitmap(self, Bitmap bmpDisabled)"""
8541 return _core_.MenuItem_SetDisabledBitmap(*args, **kwargs)
8542
8543 def GetDisabledBitmap(*args, **kwargs):
8544 """GetDisabledBitmap(self) -> Bitmap"""
8545 return _core_.MenuItem_GetDisabledBitmap(*args, **kwargs)
8546
8547 def SetMarginWidth(*args, **kwargs):
8548 """SetMarginWidth(self, int nWidth)"""
8549 return _core_.MenuItem_SetMarginWidth(*args, **kwargs)
8550
8551 def GetMarginWidth(*args, **kwargs):
8552 """GetMarginWidth(self) -> int"""
8553 return _core_.MenuItem_GetMarginWidth(*args, **kwargs)
8554
8555 def GetDefaultMarginWidth(*args, **kwargs):
8556 """GetDefaultMarginWidth() -> int"""
8557 return _core_.MenuItem_GetDefaultMarginWidth(*args, **kwargs)
8558
8559 GetDefaultMarginWidth = staticmethod(GetDefaultMarginWidth)
8560 def IsOwnerDrawn(*args, **kwargs):
8561 """IsOwnerDrawn(self) -> bool"""
8562 return _core_.MenuItem_IsOwnerDrawn(*args, **kwargs)
8563
8564 def SetOwnerDrawn(*args, **kwargs):
8565 """SetOwnerDrawn(self, bool ownerDrawn=True)"""
8566 return _core_.MenuItem_SetOwnerDrawn(*args, **kwargs)
8567
8568 def ResetOwnerDrawn(*args, **kwargs):
8569 """ResetOwnerDrawn(self)"""
8570 return _core_.MenuItem_ResetOwnerDrawn(*args, **kwargs)
8571
8572 def SetBitmap(*args, **kwargs):
8573 """SetBitmap(self, Bitmap bitmap)"""
8574 return _core_.MenuItem_SetBitmap(*args, **kwargs)
8575
8576 def GetBitmap(*args, **kwargs):
8577 """GetBitmap(self) -> Bitmap"""
8578 return _core_.MenuItem_GetBitmap(*args, **kwargs)
8579
8580
8581 class MenuItemPtr(MenuItem):
8582 def __init__(self, this):
8583 self.this = this
8584 if not hasattr(self,"thisown"): self.thisown = 0
8585 self.__class__ = MenuItem
8586 _core_.MenuItem_swigregister(MenuItemPtr)
8587
8588 def MenuItem_GetLabelFromText(*args, **kwargs):
8589 """MenuItem_GetLabelFromText(String text) -> String"""
8590 return _core_.MenuItem_GetLabelFromText(*args, **kwargs)
8591
8592 def MenuItem_GetDefaultMarginWidth(*args, **kwargs):
8593 """MenuItem_GetDefaultMarginWidth() -> int"""
8594 return _core_.MenuItem_GetDefaultMarginWidth(*args, **kwargs)
8595
8596 #---------------------------------------------------------------------------
8597
8598 class Control(Window):
8599 """
8600 This is the base class for a control or 'widget'.
8601
8602 A control is generally a small window which processes user input
8603 and/or displays one or more item of data.
8604 """
8605 def __repr__(self):
8606 return "<%s.%s; proxy of C++ wxControl instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
8607 def __init__(self, *args, **kwargs):
8608 """
8609 __init__(self, Window parent, int id=-1, Point pos=DefaultPosition,
8610 Size size=DefaultSize, long style=0, Validator validator=DefaultValidator,
8611 String name=ControlNameStr) -> Control
8612
8613 Create a Control. Normally you should only call this from a subclass'
8614 __init__ as a plain old wx.Control is not very useful.
8615 """
8616 newobj = _core_.new_Control(*args, **kwargs)
8617 self.this = newobj.this
8618 self.thisown = 1
8619 del newobj.thisown
8620 self._setOORInfo(self)
8621
8622 def Create(*args, **kwargs):
8623 """
8624 Create(self, Window parent, int id=-1, Point pos=DefaultPosition,
8625 Size size=DefaultSize, long style=0, Validator validator=DefaultValidator,
8626 String name=ControlNameStr) -> bool
8627
8628 Do the 2nd phase and create the GUI control.
8629 """
8630 return _core_.Control_Create(*args, **kwargs)
8631
8632 def Command(*args, **kwargs):
8633 """
8634 Command(self, CommandEvent event)
8635
8636 Simulates the effect of the user issuing a command to the item.
8637
8638 :see: `wx.CommandEvent`
8639
8640 """
8641 return _core_.Control_Command(*args, **kwargs)
8642
8643 def GetLabel(*args, **kwargs):
8644 """
8645 GetLabel(self) -> String
8646
8647 Return a control's text.
8648 """
8649 return _core_.Control_GetLabel(*args, **kwargs)
8650
8651 def SetLabel(*args, **kwargs):
8652 """
8653 SetLabel(self, String label)
8654
8655 Sets the item's text.
8656 """
8657 return _core_.Control_SetLabel(*args, **kwargs)
8658
8659 def GetClassDefaultAttributes(*args, **kwargs):
8660 """
8661 GetClassDefaultAttributes(int variant=WINDOW_VARIANT_NORMAL) -> VisualAttributes
8662
8663 Get the default attributes for this class. This is useful if you want
8664 to use the same font or colour in your own control as in a standard
8665 control -- which is a much better idea than hard coding specific
8666 colours or fonts which might look completely out of place on the
8667 user's system, especially if it uses themes.
8668
8669 The variant parameter is only relevant under Mac currently and is
8670 ignore under other platforms. Under Mac, it will change the size of
8671 the returned font. See `wx.Window.SetWindowVariant` for more about
8672 this.
8673 """
8674 return _core_.Control_GetClassDefaultAttributes(*args, **kwargs)
8675
8676 GetClassDefaultAttributes = staticmethod(GetClassDefaultAttributes)
8677
8678 class ControlPtr(Control):
8679 def __init__(self, this):
8680 self.this = this
8681 if not hasattr(self,"thisown"): self.thisown = 0
8682 self.__class__ = Control
8683 _core_.Control_swigregister(ControlPtr)
8684 ControlNameStr = cvar.ControlNameStr
8685
8686 def PreControl(*args, **kwargs):
8687 """
8688 PreControl() -> Control
8689
8690 Precreate a Control control for 2-phase creation
8691 """
8692 val = _core_.new_PreControl(*args, **kwargs)
8693 val.thisown = 1
8694 return val
8695
8696 def Control_GetClassDefaultAttributes(*args, **kwargs):
8697 """
8698 Control_GetClassDefaultAttributes(int variant=WINDOW_VARIANT_NORMAL) -> VisualAttributes
8699
8700 Get the default attributes for this class. This is useful if you want
8701 to use the same font or colour in your own control as in a standard
8702 control -- which is a much better idea than hard coding specific
8703 colours or fonts which might look completely out of place on the
8704 user's system, especially if it uses themes.
8705
8706 The variant parameter is only relevant under Mac currently and is
8707 ignore under other platforms. Under Mac, it will change the size of
8708 the returned font. See `wx.Window.SetWindowVariant` for more about
8709 this.
8710 """
8711 return _core_.Control_GetClassDefaultAttributes(*args, **kwargs)
8712
8713 #---------------------------------------------------------------------------
8714
8715 class ItemContainer(object):
8716 """
8717 wx.ItemContainer defines an interface which is implemented by all
8718 controls which have string subitems, each of which may be selected,
8719 such as `wx.ListBox`, `wx.CheckListBox`, `wx.Choice` as well as
8720 `wx.ComboBox` which implements an extended interface deriving from
8721 this one.
8722
8723 It defines the methods for accessing the control's items and although
8724 each of the derived classes implements them differently, they still
8725 all conform to the same interface.
8726
8727 The items in a wx.ItemContainer have (non empty) string labels and,
8728 optionally, client data associated with them.
8729
8730 """
8731 def __init__(self): raise RuntimeError, "No constructor defined"
8732 def __repr__(self):
8733 return "<%s.%s; proxy of C++ wxItemContainer instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
8734 def Append(*args, **kwargs):
8735 """
8736 Append(self, String item, PyObject clientData=None) -> int
8737
8738 Adds the item to the control, associating the given data with the item
8739 if not None. The return value is the index of the newly added item
8740 which may be different from the last one if the control is sorted (e.g.
8741 has wx.LB_SORT or wx.CB_SORT style).
8742 """
8743 return _core_.ItemContainer_Append(*args, **kwargs)
8744
8745 def AppendItems(*args, **kwargs):
8746 """
8747 AppendItems(self, List strings)
8748
8749 Apend several items at once to the control. Notice that calling this
8750 method may be much faster than appending the items one by one if you
8751 need to add a lot of items.
8752 """
8753 return _core_.ItemContainer_AppendItems(*args, **kwargs)
8754
8755 def Insert(*args, **kwargs):
8756 """
8757 Insert(self, String item, int pos, PyObject clientData=None) -> int
8758
8759 Insert an item into the control before the item at the ``pos`` index,
8760 optionally associating some data object with the item.
8761 """
8762 return _core_.ItemContainer_Insert(*args, **kwargs)
8763
8764 def Clear(*args, **kwargs):
8765 """
8766 Clear(self)
8767
8768 Removes all items from the control.
8769 """
8770 return _core_.ItemContainer_Clear(*args, **kwargs)
8771
8772 def Delete(*args, **kwargs):
8773 """
8774 Delete(self, int n)
8775
8776 Deletes the item at the zero-based index 'n' from the control. Note
8777 that it is an error (signalled by a `wx.PyAssertionError` exception if
8778 enabled) to remove an item with the index negative or greater or equal
8779 than the number of items in the control.
8780 """
8781 return _core_.ItemContainer_Delete(*args, **kwargs)
8782
8783 def GetCount(*args, **kwargs):
8784 """
8785 GetCount(self) -> int
8786
8787 Returns the number of items in the control.
8788 """
8789 return _core_.ItemContainer_GetCount(*args, **kwargs)
8790
8791 def IsEmpty(*args, **kwargs):
8792 """
8793 IsEmpty(self) -> bool
8794
8795 Returns True if the control is empty or False if it has some items.
8796 """
8797 return _core_.ItemContainer_IsEmpty(*args, **kwargs)
8798
8799 def GetString(*args, **kwargs):
8800 """
8801 GetString(self, int n) -> String
8802
8803 Returns the label of the item with the given index.
8804 """
8805 return _core_.ItemContainer_GetString(*args, **kwargs)
8806
8807 def GetStrings(*args, **kwargs):
8808 """GetStrings(self) -> wxArrayString"""
8809 return _core_.ItemContainer_GetStrings(*args, **kwargs)
8810
8811 def SetString(*args, **kwargs):
8812 """
8813 SetString(self, int n, String s)
8814
8815 Sets the label for the given item.
8816 """
8817 return _core_.ItemContainer_SetString(*args, **kwargs)
8818
8819 def FindString(*args, **kwargs):
8820 """
8821 FindString(self, String s) -> int
8822
8823 Finds an item whose label matches the given string. Returns the
8824 zero-based position of the item, or ``wx.NOT_FOUND`` if the string was not
8825 found.
8826 """
8827 return _core_.ItemContainer_FindString(*args, **kwargs)
8828
8829 def Select(*args, **kwargs):
8830 """
8831 Select(self, int n)
8832
8833 Sets the item at index 'n' to be the selected item.
8834 """
8835 return _core_.ItemContainer_Select(*args, **kwargs)
8836
8837 SetSelection = Select
8838 def GetSelection(*args, **kwargs):
8839 """
8840 GetSelection(self) -> int
8841
8842 Returns the index of the selected item or ``wx.NOT_FOUND`` if no item
8843 is selected.
8844 """
8845 return _core_.ItemContainer_GetSelection(*args, **kwargs)
8846
8847 def GetStringSelection(*args, **kwargs):
8848 """
8849 GetStringSelection(self) -> String
8850
8851 Returns the label of the selected item or an empty string if no item
8852 is selected.
8853 """
8854 return _core_.ItemContainer_GetStringSelection(*args, **kwargs)
8855
8856 def GetClientData(*args, **kwargs):
8857 """
8858 GetClientData(self, int n) -> PyObject
8859
8860 Returns the client data associated with the given item, (if any.)
8861 """
8862 return _core_.ItemContainer_GetClientData(*args, **kwargs)
8863
8864 def SetClientData(*args, **kwargs):
8865 """
8866 SetClientData(self, int n, PyObject clientData)
8867
8868 Associate the given client data with the item at position n.
8869 """
8870 return _core_.ItemContainer_SetClientData(*args, **kwargs)
8871
8872
8873 class ItemContainerPtr(ItemContainer):
8874 def __init__(self, this):
8875 self.this = this
8876 if not hasattr(self,"thisown"): self.thisown = 0
8877 self.__class__ = ItemContainer
8878 _core_.ItemContainer_swigregister(ItemContainerPtr)
8879
8880 #---------------------------------------------------------------------------
8881
8882 class ControlWithItems(Control,ItemContainer):
8883 """
8884 wx.ControlWithItems combines the ``wx.ItemContainer`` class with the
8885 wx.Control class, and is used for the base class of various controls
8886 that have items.
8887 """
8888 def __init__(self): raise RuntimeError, "No constructor defined"
8889 def __repr__(self):
8890 return "<%s.%s; proxy of C++ wxControlWithItems instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
8891
8892 class ControlWithItemsPtr(ControlWithItems):
8893 def __init__(self, this):
8894 self.this = this
8895 if not hasattr(self,"thisown"): self.thisown = 0
8896 self.__class__ = ControlWithItems
8897 _core_.ControlWithItems_swigregister(ControlWithItemsPtr)
8898
8899 #---------------------------------------------------------------------------
8900
8901 class SizerItem(Object):
8902 """
8903 The wx.SizerItem class is used to track the position, size and other
8904 attributes of each item managed by a `wx.Sizer`. In normal usage user
8905 code should never need to deal directly with a wx.SizerItem, but
8906 custom classes derived from `wx.PySizer` will probably need to use the
8907 collection of wx.SizerItems held by wx.Sizer when calculating layout.
8908
8909 :see: `wx.Sizer`, `wx.GBSizerItem`
8910 """
8911 def __repr__(self):
8912 return "<%s.%s; proxy of C++ wxSizerItem instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
8913 def __init__(self, *args, **kwargs):
8914 """
8915 __init__(self) -> SizerItem
8916
8917 Constructs an empty wx.SizerItem. Either a window, sizer or spacer
8918 size will need to be set before this item can be used in a Sizer.
8919
8920 You will probably never need to create a wx.SizerItem directly as they
8921 are created automatically when the sizer's Add, Insert or Prepend
8922 methods are called.
8923
8924 :see: `wx.SizerItemSpacer`, `wx.SizerItemWindow`, `wx.SizerItemSizer`
8925 """
8926 newobj = _core_.new_SizerItem(*args, **kwargs)
8927 self.this = newobj.this
8928 self.thisown = 1
8929 del newobj.thisown
8930 def DeleteWindows(*args, **kwargs):
8931 """
8932 DeleteWindows(self)
8933
8934 Destroy the window or the windows in a subsizer, depending on the type
8935 of item.
8936 """
8937 return _core_.SizerItem_DeleteWindows(*args, **kwargs)
8938
8939 def DetachSizer(*args, **kwargs):
8940 """
8941 DetachSizer(self)
8942
8943 Enable deleting the SizerItem without destroying the contained sizer.
8944 """
8945 return _core_.SizerItem_DetachSizer(*args, **kwargs)
8946
8947 def GetSize(*args, **kwargs):
8948 """
8949 GetSize(self) -> Size
8950
8951 Get the current size of the item, as set in the last Layout.
8952 """
8953 return _core_.SizerItem_GetSize(*args, **kwargs)
8954
8955 def CalcMin(*args, **kwargs):
8956 """
8957 CalcMin(self) -> Size
8958
8959 Calculates the minimum desired size for the item, including any space
8960 needed by borders.
8961 """
8962 return _core_.SizerItem_CalcMin(*args, **kwargs)
8963
8964 def SetDimension(*args, **kwargs):
8965 """
8966 SetDimension(self, Point pos, Size size)
8967
8968 Set the position and size of the space allocated for this item by the
8969 sizer, and adjust the position and size of the item (window or
8970 subsizer) to be within that space taking alignment and borders into
8971 account.
8972 """
8973 return _core_.SizerItem_SetDimension(*args, **kwargs)
8974
8975 def GetMinSize(*args, **kwargs):
8976 """
8977 GetMinSize(self) -> Size
8978
8979 Get the minimum size needed for the item.
8980 """
8981 return _core_.SizerItem_GetMinSize(*args, **kwargs)
8982
8983 def GetMinSizeWithBorder(*args, **kwargs):
8984 """
8985 GetMinSizeWithBorder(self) -> Size
8986
8987 Get the minimum size needed for the item with space for the borders
8988 added, if needed.
8989 """
8990 return _core_.SizerItem_GetMinSizeWithBorder(*args, **kwargs)
8991
8992 def SetInitSize(*args, **kwargs):
8993 """SetInitSize(self, int x, int y)"""
8994 return _core_.SizerItem_SetInitSize(*args, **kwargs)
8995
8996 def SetRatioWH(*args, **kwargs):
8997 """
8998 SetRatioWH(self, int width, int height)
8999
9000 Set the ratio item attribute.
9001 """
9002 return _core_.SizerItem_SetRatioWH(*args, **kwargs)
9003
9004 def SetRatioSize(*args, **kwargs):
9005 """
9006 SetRatioSize(self, Size size)
9007
9008 Set the ratio item attribute.
9009 """
9010 return _core_.SizerItem_SetRatioSize(*args, **kwargs)
9011
9012 def SetRatio(*args, **kwargs):
9013 """
9014 SetRatio(self, float ratio)
9015
9016 Set the ratio item attribute.
9017 """
9018 return _core_.SizerItem_SetRatio(*args, **kwargs)
9019
9020 def GetRatio(*args, **kwargs):
9021 """
9022 GetRatio(self) -> float
9023
9024 Set the ratio item attribute.
9025 """
9026 return _core_.SizerItem_GetRatio(*args, **kwargs)
9027
9028 def GetRect(*args, **kwargs):
9029 """
9030 GetRect(self) -> Rect
9031
9032 Returns the rectangle that the sizer item should occupy
9033 """
9034 return _core_.SizerItem_GetRect(*args, **kwargs)
9035
9036 def IsWindow(*args, **kwargs):
9037 """
9038 IsWindow(self) -> bool
9039
9040 Is this sizer item a window?
9041 """
9042 return _core_.SizerItem_IsWindow(*args, **kwargs)
9043
9044 def IsSizer(*args, **kwargs):
9045 """
9046 IsSizer(self) -> bool
9047
9048 Is this sizer item a subsizer?
9049 """
9050 return _core_.SizerItem_IsSizer(*args, **kwargs)
9051
9052 def IsSpacer(*args, **kwargs):
9053 """
9054 IsSpacer(self) -> bool
9055
9056 Is this sizer item a spacer?
9057 """
9058 return _core_.SizerItem_IsSpacer(*args, **kwargs)
9059
9060 def SetProportion(*args, **kwargs):
9061 """
9062 SetProportion(self, int proportion)
9063
9064 Set the proportion value for this item.
9065 """
9066 return _core_.SizerItem_SetProportion(*args, **kwargs)
9067
9068 def GetProportion(*args, **kwargs):
9069 """
9070 GetProportion(self) -> int
9071
9072 Get the proportion value for this item.
9073 """
9074 return _core_.SizerItem_GetProportion(*args, **kwargs)
9075
9076 SetOption = wx._deprecated(SetProportion, "Please use `SetProportion` instead.")
9077 GetOption = wx._deprecated(GetProportion, "Please use `GetProportion` instead.")
9078 def SetFlag(*args, **kwargs):
9079 """
9080 SetFlag(self, int flag)
9081
9082 Set the flag value for this item.
9083 """
9084 return _core_.SizerItem_SetFlag(*args, **kwargs)
9085
9086 def GetFlag(*args, **kwargs):
9087 """
9088 GetFlag(self) -> int
9089
9090 Get the flag value for this item.
9091 """
9092 return _core_.SizerItem_GetFlag(*args, **kwargs)
9093
9094 def SetBorder(*args, **kwargs):
9095 """
9096 SetBorder(self, int border)
9097
9098 Set the border value for this item.
9099 """
9100 return _core_.SizerItem_SetBorder(*args, **kwargs)
9101
9102 def GetBorder(*args, **kwargs):
9103 """
9104 GetBorder(self) -> int
9105
9106 Get the border value for this item.
9107 """
9108 return _core_.SizerItem_GetBorder(*args, **kwargs)
9109
9110 def GetWindow(*args, **kwargs):
9111 """
9112 GetWindow(self) -> Window
9113
9114 Get the window (if any) that is managed by this sizer item.
9115 """
9116 return _core_.SizerItem_GetWindow(*args, **kwargs)
9117
9118 def SetWindow(*args, **kwargs):
9119 """
9120 SetWindow(self, Window window)
9121
9122 Set the window to be managed by this sizer item.
9123 """
9124 return _core_.SizerItem_SetWindow(*args, **kwargs)
9125
9126 def GetSizer(*args, **kwargs):
9127 """
9128 GetSizer(self) -> Sizer
9129
9130 Get the subsizer (if any) that is managed by this sizer item.
9131 """
9132 return _core_.SizerItem_GetSizer(*args, **kwargs)
9133
9134 def SetSizer(*args, **kwargs):
9135 """
9136 SetSizer(self, Sizer sizer)
9137
9138 Set the subsizer to be managed by this sizer item.
9139 """
9140 return _core_.SizerItem_SetSizer(*args, **kwargs)
9141
9142 def GetSpacer(*args, **kwargs):
9143 """
9144 GetSpacer(self) -> Size
9145
9146 Get the size of the spacer managed by this sizer item.
9147 """
9148 return _core_.SizerItem_GetSpacer(*args, **kwargs)
9149
9150 def SetSpacer(*args, **kwargs):
9151 """
9152 SetSpacer(self, Size size)
9153
9154 Set the size of the spacer to be managed by this sizer item.
9155 """
9156 return _core_.SizerItem_SetSpacer(*args, **kwargs)
9157
9158 def Show(*args, **kwargs):
9159 """
9160 Show(self, bool show)
9161
9162 Set the show item attribute, which sizers use to determine if the item
9163 is to be made part of the layout or not. If the item is tracking a
9164 window then it is shown or hidden as needed.
9165 """
9166 return _core_.SizerItem_Show(*args, **kwargs)
9167
9168 def IsShown(*args, **kwargs):
9169 """
9170 IsShown(self) -> bool
9171
9172 Is the item to be shown in the layout?
9173 """
9174 return _core_.SizerItem_IsShown(*args, **kwargs)
9175
9176 def GetPosition(*args, **kwargs):
9177 """
9178 GetPosition(self) -> Point
9179
9180 Returns the current position of the item, as set in the last Layout.
9181 """
9182 return _core_.SizerItem_GetPosition(*args, **kwargs)
9183
9184 def GetUserData(*args, **kwargs):
9185 """
9186 GetUserData(self) -> PyObject
9187
9188 Returns the userData associated with this sizer item, or None if there
9189 isn't any.
9190 """
9191 return _core_.SizerItem_GetUserData(*args, **kwargs)
9192
9193
9194 class SizerItemPtr(SizerItem):
9195 def __init__(self, this):
9196 self.this = this
9197 if not hasattr(self,"thisown"): self.thisown = 0
9198 self.__class__ = SizerItem
9199 _core_.SizerItem_swigregister(SizerItemPtr)
9200
9201 def SizerItemWindow(*args, **kwargs):
9202 """
9203 SizerItemWindow(Window window, int proportion, int flag, int border,
9204 PyObject userData=None) -> SizerItem
9205
9206 Constructs a `wx.SizerItem` for tracking a window.
9207 """
9208 val = _core_.new_SizerItemWindow(*args, **kwargs)
9209 val.thisown = 1
9210 return val
9211
9212 def SizerItemSpacer(*args, **kwargs):
9213 """
9214 SizerItemSpacer(int width, int height, int proportion, int flag, int border,
9215 PyObject userData=None) -> SizerItem
9216
9217 Constructs a `wx.SizerItem` for tracking a spacer.
9218 """
9219 val = _core_.new_SizerItemSpacer(*args, **kwargs)
9220 val.thisown = 1
9221 return val
9222
9223 def SizerItemSizer(*args, **kwargs):
9224 """
9225 SizerItemSizer(Sizer sizer, int proportion, int flag, int border,
9226 PyObject userData=None) -> SizerItem
9227
9228 Constructs a `wx.SizerItem` for tracking a subsizer
9229 """
9230 val = _core_.new_SizerItemSizer(*args, **kwargs)
9231 val.thisown = 1
9232 return val
9233
9234 class Sizer(Object):
9235 """
9236 wx.Sizer is the abstract base class used for laying out subwindows in
9237 a window. You cannot use wx.Sizer directly; instead, you will have to
9238 use one of the sizer classes derived from it such as `wx.BoxSizer`,
9239 `wx.StaticBoxSizer`, `wx.NotebookSizer`, `wx.GridSizer`, `wx.FlexGridSizer`
9240 and `wx.GridBagSizer`.
9241
9242 The concept implemented by sizers in wxWidgets is closely related to
9243 layout tools in other GUI toolkits, such as Java's AWT, the GTK
9244 toolkit or the Qt toolkit. It is based upon the idea of the individual
9245 subwindows reporting their minimal required size and their ability to
9246 get stretched if the size of the parent window has changed. This will
9247 most often mean that the programmer does not set the original size of
9248 a dialog in the beginning, rather the dialog will assigned a sizer and
9249 this sizer will be queried about the recommended size. The sizer in
9250 turn will query its children, which can be normal windows or contorls,
9251 empty space or other sizers, so that a hierarchy of sizers can be
9252 constructed. Note that wxSizer does not derive from wxWindow and thus
9253 do not interfere with tab ordering and requires very little resources
9254 compared to a real window on screen.
9255
9256 What makes sizers so well fitted for use in wxWidgets is the fact that
9257 every control reports its own minimal size and the algorithm can
9258 handle differences in font sizes or different window (dialog item)
9259 sizes on different platforms without problems. If for example the
9260 standard font as well as the overall design of Mac widgets requires
9261 more space than on Windows, then the initial size of a dialog using a
9262 sizer will automatically be bigger on Mac than on Windows.
9263 """
9264 def __init__(self): raise RuntimeError, "No constructor defined"
9265 def __repr__(self):
9266 return "<%s.%s; proxy of C++ wxSizer instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
9267 def _setOORInfo(*args, **kwargs):
9268 """_setOORInfo(self, PyObject _self)"""
9269 return _core_.Sizer__setOORInfo(*args, **kwargs)
9270
9271 def Add(*args, **kwargs):
9272 """
9273 Add(self, item, int proportion=0, int flag=0, int border=0,
9274 PyObject userData=None) -> wx.SizerItem
9275
9276 Appends a child item to the sizer.
9277 """
9278 return _core_.Sizer_Add(*args, **kwargs)
9279
9280 def Insert(*args, **kwargs):
9281 """
9282 Insert(self, int before, item, int proportion=0, int flag=0, int border=0,
9283 PyObject userData=None) -> wx.SizerItem
9284
9285 Inserts a new item into the list of items managed by this sizer before
9286 the item at index *before*. See `Add` for a description of the parameters.
9287 """
9288 return _core_.Sizer_Insert(*args, **kwargs)
9289
9290 def Prepend(*args, **kwargs):
9291 """
9292 Prepend(self, item, int proportion=0, int flag=0, int border=0,
9293 PyObject userData=None) -> wx.SizerItem
9294
9295 Adds a new item to the begining of the list of sizer items managed by
9296 this sizer. See `Add` for a description of the parameters.
9297 """
9298 return _core_.Sizer_Prepend(*args, **kwargs)
9299
9300 def Remove(*args, **kwargs):
9301 """
9302 Remove(self, item) -> bool
9303
9304 Removes an item from the sizer and destroys it. This method does not
9305 cause any layout or resizing to take place, call `Layout` to update
9306 the layout on screen after removing a child from the sizer. The
9307 *item* parameter can be either a window, a sizer, or the zero-based
9308 index of an item to remove. Returns True if the child item was found
9309 and removed.
9310 """
9311 return _core_.Sizer_Remove(*args, **kwargs)
9312
9313 def Detach(*args, **kwargs):
9314 """
9315 Detach(self, item) -> bool
9316
9317 Detaches an item from the sizer without destroying it. This method
9318 does not cause any layout or resizing to take place, call `Layout` to
9319 do so. The *item* parameter can be either a window, a sizer, or the
9320 zero-based index of the item to be detached. Returns True if the child item
9321 was found and detached.
9322 """
9323 return _core_.Sizer_Detach(*args, **kwargs)
9324
9325 def GetItem(*args, **kwargs):
9326 """
9327 GetItem(self, item) -> wx.SizerItem
9328
9329 Returns the `wx.SizerItem` which holds the *item* given. The *item*
9330 parameter can be either a window, a sizer, or the zero-based index of
9331 the item to be detached.
9332 """
9333 return _core_.Sizer_GetItem(*args, **kwargs)
9334
9335 def _SetItemMinSize(*args, **kwargs):
9336 """_SetItemMinSize(self, PyObject item, Size size)"""
9337 return _core_.Sizer__SetItemMinSize(*args, **kwargs)
9338
9339 def SetItemMinSize(self, item, *args):
9340 """
9341 SetItemMinSize(self, item, Size size)
9342
9343 Sets the minimum size that will be allocated for an item in the sizer.
9344 The *item* parameter can be either a window, a sizer, or the
9345 zero-based index of the item. If a window or sizer is given then it
9346 will be searched for recursivly in subsizers if neccessary.
9347 """
9348 if len(args) == 2:
9349 # for backward compatibility accept separate width,height args too
9350 return self._SetItemMinSize(item, args)
9351 else:
9352 return self._SetItemMinSize(item, args[0])
9353
9354 def AddItem(*args, **kwargs):
9355 """
9356 AddItem(self, SizerItem item)
9357
9358 Adds a `wx.SizerItem` to the sizer.
9359 """
9360 return _core_.Sizer_AddItem(*args, **kwargs)
9361
9362 def InsertItem(*args, **kwargs):
9363 """
9364 InsertItem(self, int index, SizerItem item)
9365
9366 Inserts a `wx.SizerItem` to the sizer at the position given by *index*.
9367 """
9368 return _core_.Sizer_InsertItem(*args, **kwargs)
9369
9370 def PrependItem(*args, **kwargs):
9371 """
9372 PrependItem(self, SizerItem item)
9373
9374 Prepends a `wx.SizerItem` to the sizer.
9375 """
9376 return _core_.Sizer_PrependItem(*args, **kwargs)
9377
9378 def AddMany(self, items):
9379 """
9380 AddMany is a convenience method for adding several items
9381 to a sizer at one time. Simply pass it a list of tuples,
9382 where each tuple consists of the parameters that you
9383 would normally pass to the `Add` method.
9384 """
9385 for item in items:
9386 if type(item) != type(()) or (len(item) == 2 and type(item[0]) == type(1)):
9387 item = (item, )
9388 self.Add(*item)
9389
9390 # for backwards compatibility only, please do not use in new code
9391 AddWindow = wx._deprecated(Add, "AddWindow is deprecated, use `Add` instead.")
9392 AddSizer = wx._deprecated(Add, "AddSizer is deprecated, use `Add` instead.")
9393 AddSpacer = wx._deprecated(Add, "AddSpacer is deprecated, use `Add` instead.")
9394 PrependWindow = wx._deprecated(Prepend, "PrependWindow is deprecated, use `Prepend` instead.")
9395 PrependSizer = wx._deprecated(Prepend, "PrependSizer is deprecated, use `Prepend` instead.")
9396 PrependSpacer = wx._deprecated(Prepend, "PrependSpacer is deprecated, use `Prepend` instead.")
9397 InsertWindow = wx._deprecated(Insert, "InsertWindow is deprecated, use `Insert` instead.")
9398 InsertSizer = wx._deprecated(Insert, "InsertSizer is deprecated, use `Insert` instead.")
9399 InsertSpacer = wx._deprecated(Insert, "InsertSpacer is deprecated, use `Insert` instead.")
9400 RemoveWindow = wx._deprecated(Remove, "RemoveWindow is deprecated, use `Remove` instead.")
9401 RemoveSizer = wx._deprecated(Remove, "RemoveSizer is deprecated, use `Remove` instead.")
9402 RemovePos = wx._deprecated(Remove, "RemovePos is deprecated, use `Remove` instead.")
9403
9404
9405 def SetDimension(*args, **kwargs):
9406 """
9407 SetDimension(self, int x, int y, int width, int height)
9408
9409 Call this to force the sizer to take the given dimension and thus
9410 force the items owned by the sizer to resize themselves according to
9411 the rules defined by the parameter in the `Add`, `Insert` or `Prepend`
9412 methods.
9413 """
9414 return _core_.Sizer_SetDimension(*args, **kwargs)
9415
9416 def SetMinSize(*args, **kwargs):
9417 """
9418 SetMinSize(self, Size size)
9419
9420 Call this to give the sizer a minimal size. Normally, the sizer will
9421 calculate its minimal size based purely on how much space its children
9422 need. After calling this method `GetMinSize` will return either the
9423 minimal size as requested by its children or the minimal size set
9424 here, depending on which is bigger.
9425 """
9426 return _core_.Sizer_SetMinSize(*args, **kwargs)
9427
9428 def GetSize(*args, **kwargs):
9429 """
9430 GetSize(self) -> Size
9431
9432 Returns the current size of the space managed by the sizer.
9433 """
9434 return _core_.Sizer_GetSize(*args, **kwargs)
9435
9436 def GetPosition(*args, **kwargs):
9437 """
9438 GetPosition(self) -> Point
9439
9440 Returns the current position of the sizer's managed space.
9441 """
9442 return _core_.Sizer_GetPosition(*args, **kwargs)
9443
9444 def GetMinSize(*args, **kwargs):
9445 """
9446 GetMinSize(self) -> Size
9447
9448 Returns the minimal size of the sizer. This is either the combined
9449 minimal size of all the children and their borders or the minimal size
9450 set by SetMinSize, depending on which is bigger.
9451 """
9452 return _core_.Sizer_GetMinSize(*args, **kwargs)
9453
9454 def GetSizeTuple(self):
9455 return self.GetSize().Get()
9456 def GetPositionTuple(self):
9457 return self.GetPosition().Get()
9458 def GetMinSizeTuple(self):
9459 return self.GetMinSize().Get()
9460
9461 def RecalcSizes(*args, **kwargs):
9462 """
9463 RecalcSizes(self)
9464
9465 Using the sizes calculated by `CalcMin` reposition and resize all the
9466 items managed by this sizer. You should not need to call this directly as
9467 it is called by `Layout`.
9468 """
9469 return _core_.Sizer_RecalcSizes(*args, **kwargs)
9470
9471 def CalcMin(*args, **kwargs):
9472 """
9473 CalcMin(self) -> Size
9474
9475 This method is where the sizer will do the actual calculation of its
9476 children's minimal sizes. You should not need to call this directly as
9477 it is called by `Layout`.
9478 """
9479 return _core_.Sizer_CalcMin(*args, **kwargs)
9480
9481 def Layout(*args, **kwargs):
9482 """
9483 Layout(self)
9484
9485 This method will force the recalculation and layout of the items
9486 controlled by the sizer using the current space allocated to the
9487 sizer. Normally this is called automatically from the owning window's
9488 EVT_SIZE handler, but it is also useful to call it from user code when
9489 one of the items in a sizer change size, or items are added or
9490 removed.
9491 """
9492 return _core_.Sizer_Layout(*args, **kwargs)
9493
9494 def Fit(*args, **kwargs):
9495 """
9496 Fit(self, Window window) -> Size
9497
9498 Tell the sizer to resize the *window* to match the sizer's minimal
9499 size. This is commonly done in the constructor of the window itself in
9500 order to set its initial size to match the needs of the children as
9501 determined by the sizer. Returns the new size.
9502
9503 For a top level window this is the total window size, not the client size.
9504 """
9505 return _core_.Sizer_Fit(*args, **kwargs)
9506
9507 def FitInside(*args, **kwargs):
9508 """
9509 FitInside(self, Window window)
9510
9511 Tell the sizer to resize the *virtual size* of the *window* to match the
9512 sizer's minimal size. This will not alter the on screen size of the
9513 window, but may cause the addition/removal/alteration of scrollbars
9514 required to view the virtual area in windows which manage it.
9515
9516 :see: `wx.ScrolledWindow.SetScrollbars`, `SetVirtualSizeHints`
9517
9518 """
9519 return _core_.Sizer_FitInside(*args, **kwargs)
9520
9521 def SetSizeHints(*args, **kwargs):
9522 """
9523 SetSizeHints(self, Window window)
9524
9525 Tell the sizer to set (and `Fit`) the minimal size of the *window* to
9526 match the sizer's minimal size. This is commonly done in the
9527 constructor of the window itself if the window is resizable (as are
9528 many dialogs under Unix and frames on probably all platforms) in order
9529 to prevent the window from being sized smaller than the minimal size
9530 required by the sizer.
9531 """
9532 return _core_.Sizer_SetSizeHints(*args, **kwargs)
9533
9534 def SetVirtualSizeHints(*args, **kwargs):
9535 """
9536 SetVirtualSizeHints(self, Window window)
9537
9538 Tell the sizer to set the minimal size of the window virtual area to
9539 match the sizer's minimal size. For windows with managed scrollbars
9540 this will set them appropriately.
9541
9542 :see: `wx.ScrolledWindow.SetScrollbars`
9543
9544 """
9545 return _core_.Sizer_SetVirtualSizeHints(*args, **kwargs)
9546
9547 def Clear(*args, **kwargs):
9548 """
9549 Clear(self, bool deleteWindows=False)
9550
9551 Clear all items from the sizer, optionally destroying the window items
9552 as well.
9553 """
9554 return _core_.Sizer_Clear(*args, **kwargs)
9555
9556 def DeleteWindows(*args, **kwargs):
9557 """
9558 DeleteWindows(self)
9559
9560 Destroy all windows managed by the sizer.
9561 """
9562 return _core_.Sizer_DeleteWindows(*args, **kwargs)
9563
9564 def GetChildren(*args, **kwargs):
9565 """
9566 GetChildren(sefl) -> list
9567
9568 Returns a list of all the `wx.SizerItem` objects managed by the sizer.
9569 """
9570 return _core_.Sizer_GetChildren(*args, **kwargs)
9571
9572 def Show(*args, **kwargs):
9573 """
9574 Show(self, item, bool show=True, bool recursive=false) -> bool
9575
9576 Shows or hides an item managed by the sizer. To make a sizer item
9577 disappear or reappear, use Show followed by `Layout`. The *item*
9578 parameter can be either a window, a sizer, or the zero-based index of
9579 the item. Use the recursive parameter to show or hide an item in a
9580 subsizer. Returns True if the item was found.
9581 """
9582 return _core_.Sizer_Show(*args, **kwargs)
9583
9584 def IsShown(*args, **kwargs):
9585 """
9586 IsShown(self, item)
9587
9588 Determines if the item is currently shown. sizer. To make a sizer
9589 item disappear or reappear, use Show followed by `Layout`. The *item*
9590 parameter can be either a window, a sizer, or the zero-based index of
9591 the item.
9592 """
9593 return _core_.Sizer_IsShown(*args, **kwargs)
9594
9595 def Hide(self, item, recursive=False):
9596 """
9597 A convenience method for Show(item, False, recursive).
9598 """
9599 return self.Show(item, False, recursive)
9600
9601 def ShowItems(*args, **kwargs):
9602 """
9603 ShowItems(self, bool show)
9604
9605 Recursively call `wx.SizerItem.Show` on all sizer items.
9606 """
9607 return _core_.Sizer_ShowItems(*args, **kwargs)
9608
9609
9610 class SizerPtr(Sizer):
9611 def __init__(self, this):
9612 self.this = this
9613 if not hasattr(self,"thisown"): self.thisown = 0
9614 self.__class__ = Sizer
9615 _core_.Sizer_swigregister(SizerPtr)
9616
9617 class PySizer(Sizer):
9618 """
9619 wx.PySizer is a special version of `wx.Sizer` that has been
9620 instrumented to allow the C++ virtual methods to be overloaded in
9621 Python derived classes. You would derive from this class if you are
9622 wanting to implement a custom sizer in Python code. Simply implement
9623 `CalcMin` and `RecalcSizes` in the derived class and you're all set.
9624 For example::
9625
9626 class MySizer(wx.PySizer):
9627 def __init__(self):
9628 wx.PySizer.__init__(self)
9629
9630 def CalcMin(self):
9631 for item in self.GetChildren():
9632 # calculate the total minimum width and height needed
9633 # by all items in the sizer according to this sizer's
9634 # layout algorithm.
9635 ...
9636 return wx.Size(width, height)
9637
9638 def RecalcSizes(self):
9639 # find the space allotted to this sizer
9640 pos = self.GetPosition()
9641 size = self.GetSize()
9642 for item in self.GetChildren():
9643 # Recalculate (if necessary) the position and size of
9644 # each item and then call item.SetDimension to do the
9645 # actual positioning and sizing of the items within the
9646 # space alloted to this sizer.
9647 ...
9648 item.SetDimension(itemPos, itemSize)
9649
9650
9651 When `Layout` is called it first calls `CalcMin` followed by
9652 `RecalcSizes` so you can optimize a bit by saving the results of
9653 `CalcMin` and resuing them in `RecalcSizes`.
9654
9655 :see: `wx.SizerItem`, `wx.Sizer.GetChildren`
9656
9657
9658 """
9659 def __repr__(self):
9660 return "<%s.%s; proxy of C++ wxPySizer instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
9661 def __init__(self, *args, **kwargs):
9662 """
9663 __init__(self) -> PySizer
9664
9665 Creates a wx.PySizer. Must be called from the __init__ in the derived
9666 class.
9667 """
9668 newobj = _core_.new_PySizer(*args, **kwargs)
9669 self.this = newobj.this
9670 self.thisown = 1
9671 del newobj.thisown
9672 self._setCallbackInfo(self, PySizer);self._setOORInfo(self)
9673
9674 def _setCallbackInfo(*args, **kwargs):
9675 """_setCallbackInfo(self, PyObject self, PyObject _class)"""
9676 return _core_.PySizer__setCallbackInfo(*args, **kwargs)
9677
9678
9679 class PySizerPtr(PySizer):
9680 def __init__(self, this):
9681 self.this = this
9682 if not hasattr(self,"thisown"): self.thisown = 0
9683 self.__class__ = PySizer
9684 _core_.PySizer_swigregister(PySizerPtr)
9685
9686 #---------------------------------------------------------------------------
9687
9688 class BoxSizer(Sizer):
9689 """
9690 The basic idea behind a box sizer is that windows will most often be
9691 laid out in rather simple basic geometry, typically in a row or a
9692 column or nested hierarchies of either. A wx.BoxSizer will lay out
9693 its items in a simple row or column, depending on the orientation
9694 parameter passed to the constructor.
9695 """
9696 def __repr__(self):
9697 return "<%s.%s; proxy of C++ wxBoxSizer instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
9698 def __init__(self, *args, **kwargs):
9699 """
9700 __init__(self, int orient=HORIZONTAL) -> BoxSizer
9701
9702 Constructor for a wx.BoxSizer. *orient* may be one of ``wx.VERTICAL``
9703 or ``wx.HORIZONTAL`` for creating either a column sizer or a row
9704 sizer.
9705 """
9706 newobj = _core_.new_BoxSizer(*args, **kwargs)
9707 self.this = newobj.this
9708 self.thisown = 1
9709 del newobj.thisown
9710 self._setOORInfo(self)
9711
9712 def GetOrientation(*args, **kwargs):
9713 """
9714 GetOrientation(self) -> int
9715
9716 Returns the current orientation of the sizer.
9717 """
9718 return _core_.BoxSizer_GetOrientation(*args, **kwargs)
9719
9720 def SetOrientation(*args, **kwargs):
9721 """
9722 SetOrientation(self, int orient)
9723
9724 Resets the orientation of the sizer.
9725 """
9726 return _core_.BoxSizer_SetOrientation(*args, **kwargs)
9727
9728
9729 class BoxSizerPtr(BoxSizer):
9730 def __init__(self, this):
9731 self.this = this
9732 if not hasattr(self,"thisown"): self.thisown = 0
9733 self.__class__ = BoxSizer
9734 _core_.BoxSizer_swigregister(BoxSizerPtr)
9735
9736 #---------------------------------------------------------------------------
9737
9738 class StaticBoxSizer(BoxSizer):
9739 """
9740 wx.StaticBoxSizer derives from and functions identically to the
9741 `wx.BoxSizer` and adds a `wx.StaticBox` around the items that the sizer
9742 manages. Note that this static box must be created separately and
9743 passed to the sizer constructor.
9744 """
9745 def __repr__(self):
9746 return "<%s.%s; proxy of C++ wxStaticBoxSizer instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
9747 def __init__(self, *args, **kwargs):
9748 """
9749 __init__(self, StaticBox box, int orient=HORIZONTAL) -> StaticBoxSizer
9750
9751 Constructor. It takes an associated static box and the orientation
9752 *orient* as parameters - orient can be either of ``wx.VERTICAL`` or
9753 ``wx.HORIZONTAL``.
9754 """
9755 newobj = _core_.new_StaticBoxSizer(*args, **kwargs)
9756 self.this = newobj.this
9757 self.thisown = 1
9758 del newobj.thisown
9759 self._setOORInfo(self)
9760
9761 def GetStaticBox(*args, **kwargs):
9762 """
9763 GetStaticBox(self) -> StaticBox
9764
9765 Returns the static box associated with this sizer.
9766 """
9767 return _core_.StaticBoxSizer_GetStaticBox(*args, **kwargs)
9768
9769
9770 class StaticBoxSizerPtr(StaticBoxSizer):
9771 def __init__(self, this):
9772 self.this = this
9773 if not hasattr(self,"thisown"): self.thisown = 0
9774 self.__class__ = StaticBoxSizer
9775 _core_.StaticBoxSizer_swigregister(StaticBoxSizerPtr)
9776
9777 #---------------------------------------------------------------------------
9778
9779 class GridSizer(Sizer):
9780 """
9781 A grid sizer is a sizer which lays out its children in a
9782 two-dimensional table with all cells having the same size. In other
9783 words, the width of each cell within the grid is the width of the
9784 widest item added to the sizer and the height of each grid cell is the
9785 height of the tallest item. An optional vertical and/or horizontal
9786 gap between items can also be specified (in pixels.)
9787
9788 Items are placed in the cells of the grid in the order they are added,
9789 in row-major order. In other words, the first row is filled first,
9790 then the second, and so on until all items have been added. (If
9791 neccessary, additional rows will be added as items are added.) If you
9792 need to have greater control over the cells that items are placed in
9793 then use the `wx.GridBagSizer`.
9794
9795 """
9796 def __repr__(self):
9797 return "<%s.%s; proxy of C++ wxGridSizer instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
9798 def __init__(self, *args, **kwargs):
9799 """
9800 __init__(self, int rows=1, int cols=0, int vgap=0, int hgap=0) -> GridSizer
9801
9802 Constructor for a wx.GridSizer. *rows* and *cols* determine the number
9803 of columns and rows in the sizer - if either of the parameters is
9804 zero, it will be calculated to from the total number of children in
9805 the sizer, thus making the sizer grow dynamically. *vgap* and *hgap*
9806 define extra space between all children.
9807 """
9808 newobj = _core_.new_GridSizer(*args, **kwargs)
9809 self.this = newobj.this
9810 self.thisown = 1
9811 del newobj.thisown
9812 self._setOORInfo(self)
9813
9814 def SetCols(*args, **kwargs):
9815 """
9816 SetCols(self, int cols)
9817
9818 Sets the number of columns in the sizer.
9819 """
9820 return _core_.GridSizer_SetCols(*args, **kwargs)
9821
9822 def SetRows(*args, **kwargs):
9823 """
9824 SetRows(self, int rows)
9825
9826 Sets the number of rows in the sizer.
9827 """
9828 return _core_.GridSizer_SetRows(*args, **kwargs)
9829
9830 def SetVGap(*args, **kwargs):
9831 """
9832 SetVGap(self, int gap)
9833
9834 Sets the vertical gap (in pixels) between the cells in the sizer.
9835 """
9836 return _core_.GridSizer_SetVGap(*args, **kwargs)
9837
9838 def SetHGap(*args, **kwargs):
9839 """
9840 SetHGap(self, int gap)
9841
9842 Sets the horizontal gap (in pixels) between cells in the sizer
9843 """
9844 return _core_.GridSizer_SetHGap(*args, **kwargs)
9845
9846 def GetCols(*args, **kwargs):
9847 """
9848 GetCols(self) -> int
9849
9850 Returns the number of columns in the sizer.
9851 """
9852 return _core_.GridSizer_GetCols(*args, **kwargs)
9853
9854 def GetRows(*args, **kwargs):
9855 """
9856 GetRows(self) -> int
9857
9858 Returns the number of rows in the sizer.
9859 """
9860 return _core_.GridSizer_GetRows(*args, **kwargs)
9861
9862 def GetVGap(*args, **kwargs):
9863 """
9864 GetVGap(self) -> int
9865
9866 Returns the vertical gap (in pixels) between the cells in the sizer.
9867 """
9868 return _core_.GridSizer_GetVGap(*args, **kwargs)
9869
9870 def GetHGap(*args, **kwargs):
9871 """
9872 GetHGap(self) -> int
9873
9874 Returns the horizontal gap (in pixels) between cells in the sizer.
9875 """
9876 return _core_.GridSizer_GetHGap(*args, **kwargs)
9877
9878
9879 class GridSizerPtr(GridSizer):
9880 def __init__(self, this):
9881 self.this = this
9882 if not hasattr(self,"thisown"): self.thisown = 0
9883 self.__class__ = GridSizer
9884 _core_.GridSizer_swigregister(GridSizerPtr)
9885
9886 #---------------------------------------------------------------------------
9887
9888 FLEX_GROWMODE_NONE = _core_.FLEX_GROWMODE_NONE
9889 FLEX_GROWMODE_SPECIFIED = _core_.FLEX_GROWMODE_SPECIFIED
9890 FLEX_GROWMODE_ALL = _core_.FLEX_GROWMODE_ALL
9891 class FlexGridSizer(GridSizer):
9892 """
9893 A flex grid sizer is a sizer which lays out its children in a
9894 two-dimensional table with all table cells in one row having the same
9895 height and all cells in one column having the same width, but all
9896 rows or all columns are not necessarily the same height or width as in
9897 the `wx.GridSizer`.
9898
9899 wx.FlexGridSizer can also size items equally in one direction but
9900 unequally ("flexibly") in the other. If the sizer is only flexible
9901 in one direction (this can be changed using `SetFlexibleDirection`), it
9902 needs to be decided how the sizer should grow in the other ("non
9903 flexible") direction in order to fill the available space. The
9904 `SetNonFlexibleGrowMode` method serves this purpose.
9905
9906
9907 """
9908 def __repr__(self):
9909 return "<%s.%s; proxy of C++ wxFlexGridSizer instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
9910 def __init__(self, *args, **kwargs):
9911 """
9912 __init__(self, int rows=1, int cols=0, int vgap=0, int hgap=0) -> FlexGridSizer
9913
9914 Constructor for a wx.FlexGridSizer. *rows* and *cols* determine the
9915 number of columns and rows in the sizer - if either of the parameters
9916 is zero, it will be calculated to from the total number of children in
9917 the sizer, thus making the sizer grow dynamically. *vgap* and *hgap*
9918 define extra space between all children.
9919 """
9920 newobj = _core_.new_FlexGridSizer(*args, **kwargs)
9921 self.this = newobj.this
9922 self.thisown = 1
9923 del newobj.thisown
9924 self._setOORInfo(self)
9925
9926 def AddGrowableRow(*args, **kwargs):
9927 """
9928 AddGrowableRow(self, size_t idx, int proportion=0)
9929
9930 Specifies that row *idx* (starting from zero) should be grown if there
9931 is extra space available to the sizer.
9932
9933 The *proportion* parameter has the same meaning as the stretch factor
9934 for the box sizers except that if all proportions are 0, then all
9935 columns are resized equally (instead of not being resized at all).
9936 """
9937 return _core_.FlexGridSizer_AddGrowableRow(*args, **kwargs)
9938
9939 def RemoveGrowableRow(*args, **kwargs):
9940 """
9941 RemoveGrowableRow(self, size_t idx)
9942
9943 Specifies that row *idx* is no longer growable.
9944 """
9945 return _core_.FlexGridSizer_RemoveGrowableRow(*args, **kwargs)
9946
9947 def AddGrowableCol(*args, **kwargs):
9948 """
9949 AddGrowableCol(self, size_t idx, int proportion=0)
9950
9951 Specifies that column *idx* (starting from zero) should be grown if
9952 there is extra space available to the sizer.
9953
9954 The *proportion* parameter has the same meaning as the stretch factor
9955 for the box sizers except that if all proportions are 0, then all
9956 columns are resized equally (instead of not being resized at all).
9957 """
9958 return _core_.FlexGridSizer_AddGrowableCol(*args, **kwargs)
9959
9960 def RemoveGrowableCol(*args, **kwargs):
9961 """
9962 RemoveGrowableCol(self, size_t idx)
9963
9964 Specifies that column *idx* is no longer growable.
9965 """
9966 return _core_.FlexGridSizer_RemoveGrowableCol(*args, **kwargs)
9967
9968 def SetFlexibleDirection(*args, **kwargs):
9969 """
9970 SetFlexibleDirection(self, int direction)
9971
9972 Specifies whether the sizer should flexibly resize its columns, rows,
9973 or both. Argument *direction* can be one of the following values. Any
9974 other value is ignored.
9975
9976 ============== =======================================
9977 wx.VERTICAL Rows are flexibly sized.
9978 wx.HORIZONTAL Columns are flexibly sized.
9979 wx.BOTH Both rows and columns are flexibly sized
9980 (this is the default value).
9981 ============== =======================================
9982
9983 Note that this method does not trigger relayout.
9984
9985 """
9986 return _core_.FlexGridSizer_SetFlexibleDirection(*args, **kwargs)
9987
9988 def GetFlexibleDirection(*args, **kwargs):
9989 """
9990 GetFlexibleDirection(self) -> int
9991
9992 Returns a value that specifies whether the sizer
9993 flexibly resizes its columns, rows, or both (default).
9994
9995 :see: `SetFlexibleDirection`
9996 """
9997 return _core_.FlexGridSizer_GetFlexibleDirection(*args, **kwargs)
9998
9999 def SetNonFlexibleGrowMode(*args, **kwargs):
10000 """
10001 SetNonFlexibleGrowMode(self, int mode)
10002
10003 Specifies how the sizer should grow in the non-flexible direction if
10004 there is one (so `SetFlexibleDirection` must have been called
10005 previously). Argument *mode* can be one of the following values:
10006
10007 ========================== =================================================
10008 wx.FLEX_GROWMODE_NONE Sizer doesn't grow in the non flexible direction.
10009 wx.FLEX_GROWMODE_SPECIFIED Sizer honors growable columns/rows set with
10010 `AddGrowableCol` and `AddGrowableRow`. In this
10011 case equal sizing applies to minimum sizes of
10012 columns or rows (this is the default value).
10013 wx.FLEX_GROWMODE_ALL Sizer equally stretches all columns or rows in
10014 the non flexible direction, whether they are
10015 growable or not in the flexbile direction.
10016 ========================== =================================================
10017
10018 Note that this method does not trigger relayout.
10019
10020
10021 """
10022 return _core_.FlexGridSizer_SetNonFlexibleGrowMode(*args, **kwargs)
10023
10024 def GetNonFlexibleGrowMode(*args, **kwargs):
10025 """
10026 GetNonFlexibleGrowMode(self) -> int
10027
10028 Returns the value that specifies how the sizer grows in the
10029 non-flexible direction if there is one.
10030
10031 :see: `SetNonFlexibleGrowMode`
10032 """
10033 return _core_.FlexGridSizer_GetNonFlexibleGrowMode(*args, **kwargs)
10034
10035 def GetRowHeights(*args, **kwargs):
10036 """
10037 GetRowHeights(self) -> list
10038
10039 Returns a list of integers representing the heights of each of the
10040 rows in the sizer.
10041 """
10042 return _core_.FlexGridSizer_GetRowHeights(*args, **kwargs)
10043
10044 def GetColWidths(*args, **kwargs):
10045 """
10046 GetColWidths(self) -> list
10047
10048 Returns a list of integers representing the widths of each of the
10049 columns in the sizer.
10050 """
10051 return _core_.FlexGridSizer_GetColWidths(*args, **kwargs)
10052
10053
10054 class FlexGridSizerPtr(FlexGridSizer):
10055 def __init__(self, this):
10056 self.this = this
10057 if not hasattr(self,"thisown"): self.thisown = 0
10058 self.__class__ = FlexGridSizer
10059 _core_.FlexGridSizer_swigregister(FlexGridSizerPtr)
10060
10061 #---------------------------------------------------------------------------
10062
10063 class GBPosition(object):
10064 """
10065 This class represents the position of an item in a virtual grid of
10066 rows and columns managed by a `wx.GridBagSizer`. wxPython has
10067 typemaps that will automatically convert from a 2-element sequence of
10068 integers to a wx.GBPosition, so you can use the more pythonic
10069 representation of the position nearly transparently in Python code.
10070 """
10071 def __repr__(self):
10072 return "<%s.%s; proxy of C++ wxGBPosition instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
10073 def __init__(self, *args, **kwargs):
10074 """
10075 __init__(self, int row=0, int col=0) -> GBPosition
10076
10077 This class represents the position of an item in a virtual grid of
10078 rows and columns managed by a `wx.GridBagSizer`. wxPython has
10079 typemaps that will automatically convert from a 2-element sequence of
10080 integers to a wx.GBPosition, so you can use the more pythonic
10081 representation of the position nearly transparently in Python code.
10082 """
10083 newobj = _core_.new_GBPosition(*args, **kwargs)
10084 self.this = newobj.this
10085 self.thisown = 1
10086 del newobj.thisown
10087 def GetRow(*args, **kwargs):
10088 """GetRow(self) -> int"""
10089 return _core_.GBPosition_GetRow(*args, **kwargs)
10090
10091 def GetCol(*args, **kwargs):
10092 """GetCol(self) -> int"""
10093 return _core_.GBPosition_GetCol(*args, **kwargs)
10094
10095 def SetRow(*args, **kwargs):
10096 """SetRow(self, int row)"""
10097 return _core_.GBPosition_SetRow(*args, **kwargs)
10098
10099 def SetCol(*args, **kwargs):
10100 """SetCol(self, int col)"""
10101 return _core_.GBPosition_SetCol(*args, **kwargs)
10102
10103 def __eq__(*args, **kwargs):
10104 """__eq__(self, GBPosition other) -> bool"""
10105 return _core_.GBPosition___eq__(*args, **kwargs)
10106
10107 def __ne__(*args, **kwargs):
10108 """__ne__(self, GBPosition other) -> bool"""
10109 return _core_.GBPosition___ne__(*args, **kwargs)
10110
10111 def Set(*args, **kwargs):
10112 """Set(self, int row=0, int col=0)"""
10113 return _core_.GBPosition_Set(*args, **kwargs)
10114
10115 def Get(*args, **kwargs):
10116 """Get(self) -> PyObject"""
10117 return _core_.GBPosition_Get(*args, **kwargs)
10118
10119 asTuple = wx._deprecated(Get, "asTuple is deprecated, use `Get` instead")
10120 def __str__(self): return str(self.Get())
10121 def __repr__(self): return 'wx.GBPosition'+str(self.Get())
10122 def __len__(self): return len(self.Get())
10123 def __getitem__(self, index): return self.Get()[index]
10124 def __setitem__(self, index, val):
10125 if index == 0: self.SetRow(val)
10126 elif index == 1: self.SetCol(val)
10127 else: raise IndexError
10128 def __nonzero__(self): return self.Get() != (0,0)
10129 __safe_for_unpickling__ = True
10130 def __reduce__(self): return (wx.GBPosition, self.Get())
10131
10132 row = property(GetRow, SetRow)
10133 col = property(GetCol, SetCol)
10134
10135
10136 class GBPositionPtr(GBPosition):
10137 def __init__(self, this):
10138 self.this = this
10139 if not hasattr(self,"thisown"): self.thisown = 0
10140 self.__class__ = GBPosition
10141 _core_.GBPosition_swigregister(GBPositionPtr)
10142
10143 class GBSpan(object):
10144 """
10145 This class is used to hold the row and column spanning attributes of
10146 items in a `wx.GridBagSizer`. wxPython has typemaps that will
10147 automatically convert from a 2-element sequence of integers to a
10148 wx.GBSpan, so you can use the more pythonic representation of the span
10149 nearly transparently in Python code.
10150
10151 """
10152 def __repr__(self):
10153 return "<%s.%s; proxy of C++ wxGBSpan instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
10154 def __init__(self, *args, **kwargs):
10155 """
10156 __init__(self, int rowspan=1, int colspan=1) -> GBSpan
10157
10158 Construct a new wxGBSpan, optionally setting the rowspan and
10159 colspan. The default is (1,1). (Meaning that the item occupies one
10160 cell in each direction.
10161 """
10162 newobj = _core_.new_GBSpan(*args, **kwargs)
10163 self.this = newobj.this
10164 self.thisown = 1
10165 del newobj.thisown
10166 def GetRowspan(*args, **kwargs):
10167 """GetRowspan(self) -> int"""
10168 return _core_.GBSpan_GetRowspan(*args, **kwargs)
10169
10170 def GetColspan(*args, **kwargs):
10171 """GetColspan(self) -> int"""
10172 return _core_.GBSpan_GetColspan(*args, **kwargs)
10173
10174 def SetRowspan(*args, **kwargs):
10175 """SetRowspan(self, int rowspan)"""
10176 return _core_.GBSpan_SetRowspan(*args, **kwargs)
10177
10178 def SetColspan(*args, **kwargs):
10179 """SetColspan(self, int colspan)"""
10180 return _core_.GBSpan_SetColspan(*args, **kwargs)
10181
10182 def __eq__(*args, **kwargs):
10183 """__eq__(self, GBSpan other) -> bool"""
10184 return _core_.GBSpan___eq__(*args, **kwargs)
10185
10186 def __ne__(*args, **kwargs):
10187 """__ne__(self, GBSpan other) -> bool"""
10188 return _core_.GBSpan___ne__(*args, **kwargs)
10189
10190 def Set(*args, **kwargs):
10191 """Set(self, int rowspan=1, int colspan=1)"""
10192 return _core_.GBSpan_Set(*args, **kwargs)
10193
10194 def Get(*args, **kwargs):
10195 """Get(self) -> PyObject"""
10196 return _core_.GBSpan_Get(*args, **kwargs)
10197
10198 asTuple = wx._deprecated(Get, "asTuple is deprecated, use `Get` instead")
10199 def __str__(self): return str(self.Get())
10200 def __repr__(self): return 'wx.GBSpan'+str(self.Get())
10201 def __len__(self): return len(self.Get())
10202 def __getitem__(self, index): return self.Get()[index]
10203 def __setitem__(self, index, val):
10204 if index == 0: self.SetRowspan(val)
10205 elif index == 1: self.SetColspan(val)
10206 else: raise IndexError
10207 def __nonzero__(self): return self.Get() != (0,0)
10208 __safe_for_unpickling__ = True
10209 def __reduce__(self): return (wx.GBSpan, self.Get())
10210
10211 rowspan = property(GetRowspan, SetRowspan)
10212 colspan = property(GetColspan, SetColspan)
10213
10214
10215 class GBSpanPtr(GBSpan):
10216 def __init__(self, this):
10217 self.this = this
10218 if not hasattr(self,"thisown"): self.thisown = 0
10219 self.__class__ = GBSpan
10220 _core_.GBSpan_swigregister(GBSpanPtr)
10221
10222 class GBSizerItem(SizerItem):
10223 """
10224 The wx.GBSizerItem class is used to track the additional data about
10225 items in a `wx.GridBagSizer` such as the item's position in the grid
10226 and how many rows or columns it spans.
10227
10228 """
10229 def __repr__(self):
10230 return "<%s.%s; proxy of C++ wxGBSizerItem instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
10231 def __init__(self, *args, **kwargs):
10232 """
10233 __init__(self) -> GBSizerItem
10234
10235 Constructs an empty wx.GBSizerItem. Either a window, sizer or spacer
10236 size will need to be set, as well as a position and span before this
10237 item can be used in a Sizer.
10238
10239 You will probably never need to create a wx.GBSizerItem directly as they
10240 are created automatically when the sizer's Add method is called.
10241 """
10242 newobj = _core_.new_GBSizerItem(*args, **kwargs)
10243 self.this = newobj.this
10244 self.thisown = 1
10245 del newobj.thisown
10246 def GetPos(*args, **kwargs):
10247 """
10248 GetPos(self) -> GBPosition
10249
10250 Get the grid position of the item
10251 """
10252 return _core_.GBSizerItem_GetPos(*args, **kwargs)
10253
10254 def GetPosTuple(self): return self.GetPos().Get()
10255 def GetSpan(*args, **kwargs):
10256 """
10257 GetSpan(self) -> GBSpan
10258
10259 Get the row and column spanning of the item
10260 """
10261 return _core_.GBSizerItem_GetSpan(*args, **kwargs)
10262
10263 def GetSpanTuple(self): return self.GetSpan().Get()
10264 def SetPos(*args, **kwargs):
10265 """
10266 SetPos(self, GBPosition pos) -> bool
10267
10268 If the item is already a member of a sizer then first ensure that
10269 there is no other item that would intersect with this one at the new
10270 position, then set the new position. Returns True if the change is
10271 successful and after the next Layout() the item will be moved.
10272 """
10273 return _core_.GBSizerItem_SetPos(*args, **kwargs)
10274
10275 def SetSpan(*args, **kwargs):
10276 """
10277 SetSpan(self, GBSpan span) -> bool
10278
10279 If the item is already a member of a sizer then first ensure that
10280 there is no other item that would intersect with this one with its new
10281 spanning size, then set the new spanning. Returns True if the change
10282 is successful and after the next Layout() the item will be resized.
10283
10284 """
10285 return _core_.GBSizerItem_SetSpan(*args, **kwargs)
10286
10287 def Intersects(*args, **kwargs):
10288 """
10289 Intersects(self, GBSizerItem other) -> bool
10290
10291 Returns True if this item and the other item instersect.
10292 """
10293 return _core_.GBSizerItem_Intersects(*args, **kwargs)
10294
10295 def IntersectsPos(*args, **kwargs):
10296 """
10297 IntersectsPos(self, GBPosition pos, GBSpan span) -> bool
10298
10299 Returns True if the given pos/span would intersect with this item.
10300 """
10301 return _core_.GBSizerItem_IntersectsPos(*args, **kwargs)
10302
10303 def GetEndPos(*args, **kwargs):
10304 """
10305 GetEndPos(self) -> GBPosition
10306
10307 Get the row and column of the endpoint of this item.
10308 """
10309 return _core_.GBSizerItem_GetEndPos(*args, **kwargs)
10310
10311 def GetGBSizer(*args, **kwargs):
10312 """
10313 GetGBSizer(self) -> GridBagSizer
10314
10315 Get the sizer this item is a member of.
10316 """
10317 return _core_.GBSizerItem_GetGBSizer(*args, **kwargs)
10318
10319 def SetGBSizer(*args, **kwargs):
10320 """
10321 SetGBSizer(self, GridBagSizer sizer)
10322
10323 Set the sizer this item is a member of.
10324 """
10325 return _core_.GBSizerItem_SetGBSizer(*args, **kwargs)
10326
10327
10328 class GBSizerItemPtr(GBSizerItem):
10329 def __init__(self, this):
10330 self.this = this
10331 if not hasattr(self,"thisown"): self.thisown = 0
10332 self.__class__ = GBSizerItem
10333 _core_.GBSizerItem_swigregister(GBSizerItemPtr)
10334 DefaultSpan = cvar.DefaultSpan
10335
10336 def GBSizerItemWindow(*args, **kwargs):
10337 """
10338 GBSizerItemWindow(Window window, GBPosition pos, GBSpan span, int flag,
10339 int border, PyObject userData=None) -> GBSizerItem
10340
10341 Construct a `wx.GBSizerItem` for a window.
10342 """
10343 val = _core_.new_GBSizerItemWindow(*args, **kwargs)
10344 val.thisown = 1
10345 return val
10346
10347 def GBSizerItemSizer(*args, **kwargs):
10348 """
10349 GBSizerItemSizer(Sizer sizer, GBPosition pos, GBSpan span, int flag,
10350 int border, PyObject userData=None) -> GBSizerItem
10351
10352 Construct a `wx.GBSizerItem` for a sizer
10353 """
10354 val = _core_.new_GBSizerItemSizer(*args, **kwargs)
10355 val.thisown = 1
10356 return val
10357
10358 def GBSizerItemSpacer(*args, **kwargs):
10359 """
10360 GBSizerItemSpacer(int width, int height, GBPosition pos, GBSpan span,
10361 int flag, int border, PyObject userData=None) -> GBSizerItem
10362
10363 Construct a `wx.GBSizerItem` for a spacer.
10364 """
10365 val = _core_.new_GBSizerItemSpacer(*args, **kwargs)
10366 val.thisown = 1
10367 return val
10368
10369 class GridBagSizer(FlexGridSizer):
10370 """
10371 A `wx.Sizer` that can lay out items in a virtual grid like a
10372 `wx.FlexGridSizer` but in this case explicit positioning of the items
10373 is allowed using `wx.GBPosition`, and items can optionally span more
10374 than one row and/or column using `wx.GBSpan`. The total size of the
10375 virtual grid is determined by the largest row and column that items are
10376 positioned at, adjusted for spanning.
10377
10378 """
10379 def __repr__(self):
10380 return "<%s.%s; proxy of C++ wxGridBagSizer instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
10381 def __init__(self, *args, **kwargs):
10382 """
10383 __init__(self, int vgap=0, int hgap=0) -> GridBagSizer
10384
10385 Constructor, with optional parameters to specify the gap between the
10386 rows and columns.
10387 """
10388 newobj = _core_.new_GridBagSizer(*args, **kwargs)
10389 self.this = newobj.this
10390 self.thisown = 1
10391 del newobj.thisown
10392 self._setOORInfo(self)
10393
10394 def Add(*args, **kwargs):
10395 """
10396 Add(self, item, GBPosition pos, GBSpan span=DefaultSpan, int flag=0,
10397 int border=0, userData=None) -> wx.GBSizerItem
10398
10399 Adds an item to the sizer at the grid cell *pos*, optionally spanning
10400 more than one row or column as specified with *span*. The remaining
10401 args behave similarly to `wx.Sizer.Add`.
10402
10403 Returns True if the item was successfully placed at the given cell
10404 position, False if something was already there.
10405
10406 """
10407 return _core_.GridBagSizer_Add(*args, **kwargs)
10408
10409 def AddItem(*args, **kwargs):
10410 """
10411 Add(self, GBSizerItem item) -> wx.GBSizerItem
10412
10413 Add an item to the sizer using a `wx.GBSizerItem`. Returns True if
10414 the item was successfully placed at its given cell position, False if
10415 something was already there.
10416 """
10417 return _core_.GridBagSizer_AddItem(*args, **kwargs)
10418
10419 def GetCellSize(*args, **kwargs):
10420 """
10421 GetCellSize(self, int row, int col) -> Size
10422
10423 Get the size of the specified cell, including hgap and
10424 vgap. Only valid after a Layout.
10425 """
10426 return _core_.GridBagSizer_GetCellSize(*args, **kwargs)
10427
10428 def GetEmptyCellSize(*args, **kwargs):
10429 """
10430 GetEmptyCellSize(self) -> Size
10431
10432 Get the size used for cells in the grid with no item.
10433 """
10434 return _core_.GridBagSizer_GetEmptyCellSize(*args, **kwargs)
10435
10436 def SetEmptyCellSize(*args, **kwargs):
10437 """
10438 SetEmptyCellSize(self, Size sz)
10439
10440 Set the size used for cells in the grid with no item.
10441 """
10442 return _core_.GridBagSizer_SetEmptyCellSize(*args, **kwargs)
10443
10444 def GetItemPosition(*args):
10445 """
10446 GetItemPosition(self, item) -> GBPosition
10447
10448 Get the grid position of the specified *item* where *item* is either a
10449 window or subsizer that is a member of this sizer, or a zero-based
10450 index of an item.
10451 """
10452 return _core_.GridBagSizer_GetItemPosition(*args)
10453
10454 def SetItemPosition(*args):
10455 """
10456 SetItemPosition(self, item, GBPosition pos) -> bool
10457
10458 Set the grid position of the specified *item* where *item* is either a
10459 window or subsizer that is a member of this sizer, or a zero-based
10460 index of an item. Returns True on success. If the move is not
10461 allowed (because an item is already there) then False is returned.
10462
10463 """
10464 return _core_.GridBagSizer_SetItemPosition(*args)
10465
10466 def GetItemSpan(*args):
10467 """
10468 GetItemSpan(self, item) -> GBSpan
10469
10470 Get the row/col spanning of the specified *item* where *item* is
10471 either a window or subsizer that is a member of this sizer, or a
10472 zero-based index of an item.
10473 """
10474 return _core_.GridBagSizer_GetItemSpan(*args)
10475
10476 def SetItemSpan(*args):
10477 """
10478 SetItemSpan(self, item, GBSpan span) -> bool
10479
10480 Set the row/col spanning of the specified *item* where *item* is
10481 either a window or subsizer that is a member of this sizer, or a
10482 zero-based index of an item. Returns True on success. If the move is
10483 not allowed (because an item is already there) then False is returned.
10484 """
10485 return _core_.GridBagSizer_SetItemSpan(*args)
10486
10487 def FindItem(*args):
10488 """
10489 FindItem(self, item) -> GBSizerItem
10490
10491 Find the sizer item for the given window or subsizer, returns None if
10492 not found. (non-recursive)
10493 """
10494 return _core_.GridBagSizer_FindItem(*args)
10495
10496 def FindItemAtPosition(*args, **kwargs):
10497 """
10498 FindItemAtPosition(self, GBPosition pos) -> GBSizerItem
10499
10500 Return the sizer item for the given grid cell, or None if there is no
10501 item at that position. (non-recursive)
10502 """
10503 return _core_.GridBagSizer_FindItemAtPosition(*args, **kwargs)
10504
10505 def FindItemAtPoint(*args, **kwargs):
10506 """
10507 FindItemAtPoint(self, Point pt) -> GBSizerItem
10508
10509 Return the sizer item located at the point given in *pt*, or None if
10510 there is no item at that point. The (x,y) coordinates in pt correspond
10511 to the client coordinates of the window using the sizer for
10512 layout. (non-recursive)
10513 """
10514 return _core_.GridBagSizer_FindItemAtPoint(*args, **kwargs)
10515
10516 def CheckForIntersection(*args, **kwargs):
10517 """
10518 CheckForIntersection(self, GBSizerItem item, GBSizerItem excludeItem=None) -> bool
10519
10520 Look at all items and see if any intersect (or would overlap) the
10521 given *item*. Returns True if so, False if there would be no overlap.
10522 If an *excludeItem* is given then it will not be checked for
10523 intersection, for example it may be the item we are checking the
10524 position of.
10525
10526 """
10527 return _core_.GridBagSizer_CheckForIntersection(*args, **kwargs)
10528
10529 def CheckForIntersectionPos(*args, **kwargs):
10530 """
10531 CheckForIntersectionPos(self, GBPosition pos, GBSpan span, GBSizerItem excludeItem=None) -> bool
10532
10533 Look at all items and see if any intersect (or would overlap) the
10534 given position and span. Returns True if so, False if there would be
10535 no overlap. If an *excludeItem* is given then it will not be checked
10536 for intersection, for example it may be the item we are checking the
10537 position of.
10538 """
10539 return _core_.GridBagSizer_CheckForIntersectionPos(*args, **kwargs)
10540
10541
10542 class GridBagSizerPtr(GridBagSizer):
10543 def __init__(self, this):
10544 self.this = this
10545 if not hasattr(self,"thisown"): self.thisown = 0
10546 self.__class__ = GridBagSizer
10547 _core_.GridBagSizer_swigregister(GridBagSizerPtr)
10548
10549 #---------------------------------------------------------------------------
10550
10551 Left = _core_.Left
10552 Top = _core_.Top
10553 Right = _core_.Right
10554 Bottom = _core_.Bottom
10555 Width = _core_.Width
10556 Height = _core_.Height
10557 Centre = _core_.Centre
10558 Center = _core_.Center
10559 CentreX = _core_.CentreX
10560 CentreY = _core_.CentreY
10561 Unconstrained = _core_.Unconstrained
10562 AsIs = _core_.AsIs
10563 PercentOf = _core_.PercentOf
10564 Above = _core_.Above
10565 Below = _core_.Below
10566 LeftOf = _core_.LeftOf
10567 RightOf = _core_.RightOf
10568 SameAs = _core_.SameAs
10569 Absolute = _core_.Absolute
10570 class IndividualLayoutConstraint(Object):
10571 """
10572 Objects of this class are stored in the `wx.LayoutConstraints` class as
10573 one of eight possible constraints that a window can be involved in.
10574 You will never need to create an instance of
10575 wx.IndividualLayoutConstraint, rather you should create a
10576 `wx.LayoutConstraints` instance and use the individual contstraints
10577 that it contains.
10578 """
10579 def __init__(self): raise RuntimeError, "No constructor defined"
10580 def __repr__(self):
10581 return "<%s.%s; proxy of C++ wxIndividualLayoutConstraint instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
10582 def Set(*args, **kwargs):
10583 """
10584 Set(self, int rel, Window otherW, int otherE, int val=0, int marg=wxLAYOUT_DEFAULT_MARGIN)
10585
10586 Sets the properties of the constraint. Normally called by one of the
10587 convenience functions such as Above, RightOf, SameAs.
10588 """
10589 return _core_.IndividualLayoutConstraint_Set(*args, **kwargs)
10590
10591 def LeftOf(*args, **kwargs):
10592 """
10593 LeftOf(self, Window sibling, int marg=0)
10594
10595 Constrains this edge to be to the left of the given window, with an
10596 optional margin. Implicitly, this is relative to the left edge of the
10597 other window.
10598 """
10599 return _core_.IndividualLayoutConstraint_LeftOf(*args, **kwargs)
10600
10601 def RightOf(*args, **kwargs):
10602 """
10603 RightOf(self, Window sibling, int marg=0)
10604
10605 Constrains this edge to be to the right of the given window, with an
10606 optional margin. Implicitly, this is relative to the right edge of the
10607 other window.
10608 """
10609 return _core_.IndividualLayoutConstraint_RightOf(*args, **kwargs)
10610
10611 def Above(*args, **kwargs):
10612 """
10613 Above(self, Window sibling, int marg=0)
10614
10615 Constrains this edge to be above the given window, with an optional
10616 margin. Implicitly, this is relative to the top edge of the other
10617 window.
10618 """
10619 return _core_.IndividualLayoutConstraint_Above(*args, **kwargs)
10620
10621 def Below(*args, **kwargs):
10622 """
10623 Below(self, Window sibling, int marg=0)
10624
10625 Constrains this edge to be below the given window, with an optional
10626 margin. Implicitly, this is relative to the bottom edge of the other
10627 window.
10628 """
10629 return _core_.IndividualLayoutConstraint_Below(*args, **kwargs)
10630
10631 def SameAs(*args, **kwargs):
10632 """
10633 SameAs(self, Window otherW, int edge, int marg=0)
10634
10635 Constrains this edge or dimension to be to the same as the edge of the
10636 given window, with an optional margin.
10637 """
10638 return _core_.IndividualLayoutConstraint_SameAs(*args, **kwargs)
10639
10640 def PercentOf(*args, **kwargs):
10641 """
10642 PercentOf(self, Window otherW, int wh, int per)
10643
10644 Constrains this edge or dimension to be to a percentage of the given
10645 window, with an optional margin.
10646 """
10647 return _core_.IndividualLayoutConstraint_PercentOf(*args, **kwargs)
10648
10649 def Absolute(*args, **kwargs):
10650 """
10651 Absolute(self, int val)
10652
10653 Constrains this edge or dimension to be the given absolute value.
10654 """
10655 return _core_.IndividualLayoutConstraint_Absolute(*args, **kwargs)
10656
10657 def Unconstrained(*args, **kwargs):
10658 """
10659 Unconstrained(self)
10660
10661 Sets this edge or dimension to be unconstrained, that is, dependent on
10662 other edges and dimensions from which this value can be deduced.
10663 """
10664 return _core_.IndividualLayoutConstraint_Unconstrained(*args, **kwargs)
10665
10666 def AsIs(*args, **kwargs):
10667 """
10668 AsIs(self)
10669
10670 Sets this edge or constraint to be whatever the window's value is at
10671 the moment. If either of the width and height constraints are *as is*,
10672 the window will not be resized, but moved instead. This is important
10673 when considering panel items which are intended to have a default
10674 size, such as a button, which may take its size from the size of the
10675 button label.
10676 """
10677 return _core_.IndividualLayoutConstraint_AsIs(*args, **kwargs)
10678
10679 def GetOtherWindow(*args, **kwargs):
10680 """GetOtherWindow(self) -> Window"""
10681 return _core_.IndividualLayoutConstraint_GetOtherWindow(*args, **kwargs)
10682
10683 def GetMyEdge(*args, **kwargs):
10684 """GetMyEdge(self) -> int"""
10685 return _core_.IndividualLayoutConstraint_GetMyEdge(*args, **kwargs)
10686
10687 def SetEdge(*args, **kwargs):
10688 """SetEdge(self, int which)"""
10689 return _core_.IndividualLayoutConstraint_SetEdge(*args, **kwargs)
10690
10691 def SetValue(*args, **kwargs):
10692 """SetValue(self, int v)"""
10693 return _core_.IndividualLayoutConstraint_SetValue(*args, **kwargs)
10694
10695 def GetMargin(*args, **kwargs):
10696 """GetMargin(self) -> int"""
10697 return _core_.IndividualLayoutConstraint_GetMargin(*args, **kwargs)
10698
10699 def SetMargin(*args, **kwargs):
10700 """SetMargin(self, int m)"""
10701 return _core_.IndividualLayoutConstraint_SetMargin(*args, **kwargs)
10702
10703 def GetValue(*args, **kwargs):
10704 """GetValue(self) -> int"""
10705 return _core_.IndividualLayoutConstraint_GetValue(*args, **kwargs)
10706
10707 def GetPercent(*args, **kwargs):
10708 """GetPercent(self) -> int"""
10709 return _core_.IndividualLayoutConstraint_GetPercent(*args, **kwargs)
10710
10711 def GetOtherEdge(*args, **kwargs):
10712 """GetOtherEdge(self) -> int"""
10713 return _core_.IndividualLayoutConstraint_GetOtherEdge(*args, **kwargs)
10714
10715 def GetDone(*args, **kwargs):
10716 """GetDone(self) -> bool"""
10717 return _core_.IndividualLayoutConstraint_GetDone(*args, **kwargs)
10718
10719 def SetDone(*args, **kwargs):
10720 """SetDone(self, bool d)"""
10721 return _core_.IndividualLayoutConstraint_SetDone(*args, **kwargs)
10722
10723 def GetRelationship(*args, **kwargs):
10724 """GetRelationship(self) -> int"""
10725 return _core_.IndividualLayoutConstraint_GetRelationship(*args, **kwargs)
10726
10727 def SetRelationship(*args, **kwargs):
10728 """SetRelationship(self, int r)"""
10729 return _core_.IndividualLayoutConstraint_SetRelationship(*args, **kwargs)
10730
10731 def ResetIfWin(*args, **kwargs):
10732 """
10733 ResetIfWin(self, Window otherW) -> bool
10734
10735 Reset constraint if it mentions otherWin
10736 """
10737 return _core_.IndividualLayoutConstraint_ResetIfWin(*args, **kwargs)
10738
10739 def SatisfyConstraint(*args, **kwargs):
10740 """
10741 SatisfyConstraint(self, LayoutConstraints constraints, Window win) -> bool
10742
10743 Try to satisfy constraint
10744 """
10745 return _core_.IndividualLayoutConstraint_SatisfyConstraint(*args, **kwargs)
10746
10747 def GetEdge(*args, **kwargs):
10748 """
10749 GetEdge(self, int which, Window thisWin, Window other) -> int
10750
10751 Get the value of this edge or dimension, or if this
10752 is not determinable, -1.
10753 """
10754 return _core_.IndividualLayoutConstraint_GetEdge(*args, **kwargs)
10755
10756
10757 class IndividualLayoutConstraintPtr(IndividualLayoutConstraint):
10758 def __init__(self, this):
10759 self.this = this
10760 if not hasattr(self,"thisown"): self.thisown = 0
10761 self.__class__ = IndividualLayoutConstraint
10762 _core_.IndividualLayoutConstraint_swigregister(IndividualLayoutConstraintPtr)
10763
10764 class LayoutConstraints(Object):
10765 """
10766 **Note:** constraints are now deprecated and you should use sizers
10767 instead.
10768
10769 Objects of this class can be associated with a window to define its
10770 layout constraints, with respect to siblings or its parent.
10771
10772 The class consists of the following eight constraints of class
10773 wx.IndividualLayoutConstraint, some or all of which should be accessed
10774 directly to set the appropriate constraints.
10775
10776 * left: represents the left hand edge of the window
10777 * right: represents the right hand edge of the window
10778 * top: represents the top edge of the window
10779 * bottom: represents the bottom edge of the window
10780 * width: represents the width of the window
10781 * height: represents the height of the window
10782 * centreX: represents the horizontal centre point of the window
10783 * centreY: represents the vertical centre point of the window
10784
10785 Most constraints are initially set to have the relationship
10786 wxUnconstrained, which means that their values should be calculated by
10787 looking at known constraints. The exceptions are width and height,
10788 which are set to wxAsIs to ensure that if the user does not specify a
10789 constraint, the existing width and height will be used, to be
10790 compatible with panel items which often have take a default size. If
10791 the constraint is ``wx.AsIs``, the dimension will not be changed.
10792
10793 :see: `wx.IndividualLayoutConstraint`, `wx.Window.SetConstraints`
10794
10795 """
10796 def __repr__(self):
10797 return "<%s.%s; proxy of C++ wxLayoutConstraints instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
10798 left = property(_core_.LayoutConstraints_left_get)
10799 top = property(_core_.LayoutConstraints_top_get)
10800 right = property(_core_.LayoutConstraints_right_get)
10801 bottom = property(_core_.LayoutConstraints_bottom_get)
10802 width = property(_core_.LayoutConstraints_width_get)
10803 height = property(_core_.LayoutConstraints_height_get)
10804 centreX = property(_core_.LayoutConstraints_centreX_get)
10805 centreY = property(_core_.LayoutConstraints_centreY_get)
10806 def __init__(self, *args, **kwargs):
10807 """__init__(self) -> LayoutConstraints"""
10808 newobj = _core_.new_LayoutConstraints(*args, **kwargs)
10809 self.this = newobj.this
10810 self.thisown = 1
10811 del newobj.thisown
10812 def SatisfyConstraints(*args, **kwargs):
10813 """SatisfyConstraints(Window win) -> (areSatisfied, noChanges)"""
10814 return _core_.LayoutConstraints_SatisfyConstraints(*args, **kwargs)
10815
10816 def AreSatisfied(*args, **kwargs):
10817 """AreSatisfied(self) -> bool"""
10818 return _core_.LayoutConstraints_AreSatisfied(*args, **kwargs)
10819
10820
10821 class LayoutConstraintsPtr(LayoutConstraints):
10822 def __init__(self, this):
10823 self.this = this
10824 if not hasattr(self,"thisown"): self.thisown = 0
10825 self.__class__ = LayoutConstraints
10826 _core_.LayoutConstraints_swigregister(LayoutConstraintsPtr)
10827
10828 #----------------------------------------------------------------------------
10829
10830 # Use Python's bool constants if available, make some if not
10831 try:
10832 True
10833 except NameError:
10834 __builtins__.True = 1==1
10835 __builtins__.False = 1==0
10836 def bool(value): return not not value
10837 __builtins__.bool = bool
10838
10839
10840
10841 # workarounds for bad wxRTTI names
10842 __wxPyPtrTypeMap['wxGauge95'] = 'wxGauge'
10843 __wxPyPtrTypeMap['wxSlider95'] = 'wxSlider'
10844 __wxPyPtrTypeMap['wxStatusBar95'] = 'wxStatusBar'
10845
10846
10847 #----------------------------------------------------------------------------
10848 # Load version numbers from __version__... Ensure that major and minor
10849 # versions are the same for both wxPython and wxWidgets.
10850
10851 from __version__ import *
10852 __version__ = VERSION_STRING
10853
10854 assert MAJOR_VERSION == _core_.MAJOR_VERSION, "wxPython/wxWidgets version mismatch"
10855 assert MINOR_VERSION == _core_.MINOR_VERSION, "wxPython/wxWidgets version mismatch"
10856 if RELEASE_VERSION != _core_.RELEASE_VERSION:
10857 import warnings
10858 warnings.warn("wxPython/wxWidgets release number mismatch")
10859
10860 #----------------------------------------------------------------------------
10861
10862 # Set the default string conversion encoding from the locale
10863 import locale
10864 default = locale.getdefaultlocale()[1]
10865 if default:
10866 wx.SetDefaultPyEncoding(default)
10867 del default
10868 del locale
10869
10870 #----------------------------------------------------------------------------
10871
10872 class PyDeadObjectError(AttributeError):
10873 pass
10874
10875 class _wxPyDeadObject(object):
10876 """
10877 Instances of wx objects that are OOR capable will have their __class__
10878 changed to this class when the C++ object is deleted. This should help
10879 prevent crashes due to referencing a bogus C++ pointer.
10880 """
10881 reprStr = "wxPython wrapper for DELETED %s object! (The C++ object no longer exists.)"
10882 attrStr = "The C++ part of the %s object has been deleted, attribute access no longer allowed."
10883
10884 def __repr__(self):
10885 if not hasattr(self, "_name"):
10886 self._name = "[unknown]"
10887 return self.reprStr % self._name
10888
10889 def __getattr__(self, *args):
10890 if not hasattr(self, "_name"):
10891 self._name = "[unknown]"
10892 raise PyDeadObjectError(self.attrStr % self._name)
10893
10894 def __nonzero__(self):
10895 return 0
10896
10897
10898
10899 class PyUnbornObjectError(AttributeError):
10900 pass
10901
10902 class _wxPyUnbornObject(object):
10903 """
10904 Some stock objects are created when the wx._core module is
10905 imported, but their C++ instance is not created until the wx.App
10906 object is created and initialized. These object instances will
10907 temporarily have their __class__ changed to this class so an
10908 exception will be raised if they are used before the C++ instance
10909 is ready.
10910 """
10911
10912 reprStr = "wxPython wrapper for UNBORN object! (The C++ object is not initialized yet.)"
10913 attrStr = "The C++ part of this object has not been initialized, attribute access not allowed."
10914
10915 def __repr__(self):
10916 #if not hasattr(self, "_name"):
10917 # self._name = "[unknown]"
10918 return self.reprStr #% self._name
10919
10920 def __getattr__(self, *args):
10921 #if not hasattr(self, "_name"):
10922 # self._name = "[unknown]"
10923 raise PyUnbornObjectError(self.attrStr) # % self._name )
10924
10925 def __nonzero__(self):
10926 return 0
10927
10928
10929 #----------------------------------------------------------------------------
10930
10931 def CallAfter(callable, *args, **kw):
10932 """
10933 Call the specified function after the current and pending event
10934 handlers have been completed. This is also good for making GUI
10935 method calls from non-GUI threads. Any extra positional or
10936 keyword args are passed on to the callable when it is called.
10937
10938 :see: `wx.FutureCall`
10939 """
10940 app = wx.GetApp()
10941 assert app is not None, 'No wx.App created yet'
10942
10943 if not hasattr(app, "_CallAfterId"):
10944 app._CallAfterId = wx.NewEventType()
10945 app.Connect(-1, -1, app._CallAfterId,
10946 lambda event: event.callable(*event.args, **event.kw) )
10947 evt = wx.PyEvent()
10948 evt.SetEventType(app._CallAfterId)
10949 evt.callable = callable
10950 evt.args = args
10951 evt.kw = kw
10952 wx.PostEvent(app, evt)
10953
10954 #----------------------------------------------------------------------------
10955
10956
10957 class FutureCall:
10958 """
10959 A convenience class for `wx.Timer`, that calls the given callable
10960 object once after the given amount of milliseconds, passing any
10961 positional or keyword args. The return value of the callable is
10962 availbale after it has been run with the `GetResult` method.
10963
10964 If you don't need to get the return value or restart the timer
10965 then there is no need to hold a reference to this object. It will
10966 hold a reference to itself while the timer is running (the timer
10967 has a reference to self.Notify) but the cycle will be broken when
10968 the timer completes, automatically cleaning up the wx.FutureCall
10969 object.
10970
10971 :see: `wx.CallAfter`
10972 """
10973 def __init__(self, millis, callable, *args, **kwargs):
10974 self.millis = millis
10975 self.callable = callable
10976 self.SetArgs(*args, **kwargs)
10977 self.runCount = 0
10978 self.running = False
10979 self.hasRun = False
10980 self.result = None
10981 self.timer = None
10982 self.Start()
10983
10984 def __del__(self):
10985 self.Stop()
10986
10987
10988 def Start(self, millis=None, *args, **kwargs):
10989 """
10990 (Re)start the timer
10991 """
10992 self.hasRun = False
10993 if millis is not None:
10994 self.millis = millis
10995 if args or kwargs:
10996 self.SetArgs(*args, **kwargs)
10997 self.Stop()
10998 self.timer = wx.PyTimer(self.Notify)
10999 self.timer.Start(self.millis, wx.TIMER_ONE_SHOT)
11000 self.running = True
11001 Restart = Start
11002
11003
11004 def Stop(self):
11005 """
11006 Stop and destroy the timer.
11007 """
11008 if self.timer is not None:
11009 self.timer.Stop()
11010 self.timer = None
11011
11012
11013 def GetInterval(self):
11014 if self.timer is not None:
11015 return self.timer.GetInterval()
11016 else:
11017 return 0
11018
11019
11020 def IsRunning(self):
11021 return self.timer is not None and self.timer.IsRunning()
11022
11023
11024 def SetArgs(self, *args, **kwargs):
11025 """
11026 (Re)set the args passed to the callable object. This is
11027 useful in conjunction with Restart if you want to schedule a
11028 new call to the same callable object but with different
11029 parameters.
11030 """
11031 self.args = args
11032 self.kwargs = kwargs
11033
11034
11035 def HasRun(self):
11036 return self.hasRun
11037
11038 def GetResult(self):
11039 return self.result
11040
11041 def Notify(self):
11042 """
11043 The timer has expired so call the callable.
11044 """
11045 if self.callable and getattr(self.callable, 'im_self', True):
11046 self.runCount += 1
11047 self.running = False
11048 self.result = self.callable(*self.args, **self.kwargs)
11049 self.hasRun = True
11050 if not self.running:
11051 # if it wasn't restarted, then cleanup
11052 wx.CallAfter(self.Stop)
11053
11054
11055
11056 #----------------------------------------------------------------------------
11057 # Control which items in this module should be documented by epydoc.
11058 # We allow only classes and functions, which will help reduce the size
11059 # of the docs by filtering out the zillions of constants, EVT objects,
11060 # and etc that don't make much sense by themselves, but are instead
11061 # documented (or will be) as part of the classes/functions/methods
11062 # where they should be used.
11063
11064 class __DocFilter:
11065 """
11066 A filter for epydoc that only allows non-Ptr classes and
11067 fucntions, in order to reduce the clutter in the API docs.
11068 """
11069 def __init__(self, globals):
11070 self._globals = globals
11071
11072 def __call__(self, name):
11073 import types
11074 obj = self._globals.get(name, None)
11075 if type(obj) not in [type, types.ClassType, types.FunctionType, types.BuiltinFunctionType]:
11076 return False
11077 if name.startswith('_') or name.endswith('Ptr') or name.startswith('EVT'):
11078 return False
11079 return True
11080
11081 #----------------------------------------------------------------------------
11082 #----------------------------------------------------------------------------
11083
11084 # Import other modules in this package that should show up in the
11085 # "core" wx namespace
11086 from _gdi import *
11087 from _windows import *
11088 from _controls import *
11089 from _misc import *
11090
11091
11092 # Fixup the stock objects since they can't be used yet. (They will be
11093 # restored in wx.PyApp.OnInit.)
11094 _core_._wxPyFixStockObjects()
11095
11096 #----------------------------------------------------------------------------
11097 #----------------------------------------------------------------------------
11098
11099