]> git.saurik.com Git - wxWidgets.git/blob - wxPython/src/msw/_core.py
added GetIfActive() method returning non-NULL engine only if themes are not only...
[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 Return the intersectsion of this rectangle and rect.
1201 """
1202 return _core_.Rect_Intersect(*args, **kwargs)
1203
1204 def __add__(*args, **kwargs):
1205 """
1206 __add__(self, Rect rect) -> Rect
1207
1208 Add the properties of rect to this rectangle and return the result.
1209 """
1210 return _core_.Rect___add__(*args, **kwargs)
1211
1212 def __iadd__(*args, **kwargs):
1213 """
1214 __iadd__(self, Rect rect) -> Rect
1215
1216 Add the properties of rect to this rectangle, updating this rectangle.
1217 """
1218 return _core_.Rect___iadd__(*args, **kwargs)
1219
1220 def __eq__(*args, **kwargs):
1221 """
1222 __eq__(self, Rect rect) -> bool
1223
1224 Test for equality.
1225 """
1226 return _core_.Rect___eq__(*args, **kwargs)
1227
1228 def __ne__(*args, **kwargs):
1229 """
1230 __ne__(self, Rect rect) -> bool
1231
1232 Test for inequality.
1233 """
1234 return _core_.Rect___ne__(*args, **kwargs)
1235
1236 def InsideXY(*args, **kwargs):
1237 """
1238 InsideXY(self, int x, int y) -> bool
1239
1240 Return True if the point is (not strcitly) inside the rect.
1241 """
1242 return _core_.Rect_InsideXY(*args, **kwargs)
1243
1244 def Inside(*args, **kwargs):
1245 """
1246 Inside(self, Point pt) -> bool
1247
1248 Return True if the point is (not strcitly) inside the rect.
1249 """
1250 return _core_.Rect_Inside(*args, **kwargs)
1251
1252 def Intersects(*args, **kwargs):
1253 """
1254 Intersects(self, Rect rect) -> bool
1255
1256 Returns True if the rectangles have a non empty intersection.
1257 """
1258 return _core_.Rect_Intersects(*args, **kwargs)
1259
1260 x = property(_core_.Rect_x_get, _core_.Rect_x_set)
1261 y = property(_core_.Rect_y_get, _core_.Rect_y_set)
1262 width = property(_core_.Rect_width_get, _core_.Rect_width_set)
1263 height = property(_core_.Rect_height_get, _core_.Rect_height_set)
1264 def Set(*args, **kwargs):
1265 """
1266 Set(self, int x=0, int y=0, int width=0, int height=0)
1267
1268 Set all rectangle properties.
1269 """
1270 return _core_.Rect_Set(*args, **kwargs)
1271
1272 def Get(*args, **kwargs):
1273 """
1274 Get() -> (x,y,width,height)
1275
1276 Return the rectangle properties as a tuple.
1277 """
1278 return _core_.Rect_Get(*args, **kwargs)
1279
1280 asTuple = wx._deprecated(Get, "asTuple is deprecated, use `Get` instead")
1281 def __str__(self): return str(self.Get())
1282 def __repr__(self): return 'wx.Rect'+str(self.Get())
1283 def __len__(self): return len(self.Get())
1284 def __getitem__(self, index): return self.Get()[index]
1285 def __setitem__(self, index, val):
1286 if index == 0: self.x = val
1287 elif index == 1: self.y = val
1288 elif index == 2: self.width = val
1289 elif index == 3: self.height = val
1290 else: raise IndexError
1291 def __nonzero__(self): return self.Get() != (0,0,0,0)
1292 __safe_for_unpickling__ = True
1293 def __reduce__(self): return (wx.Rect, self.Get())
1294
1295
1296 class RectPtr(Rect):
1297 def __init__(self, this):
1298 self.this = this
1299 if not hasattr(self,"thisown"): self.thisown = 0
1300 self.__class__ = Rect
1301 _core_.Rect_swigregister(RectPtr)
1302
1303 def RectPP(*args, **kwargs):
1304 """
1305 RectPP(Point topLeft, Point bottomRight) -> Rect
1306
1307 Create a new Rect object from Points representing two corners.
1308 """
1309 val = _core_.new_RectPP(*args, **kwargs)
1310 val.thisown = 1
1311 return val
1312
1313 def RectPS(*args, **kwargs):
1314 """
1315 RectPS(Point pos, Size size) -> Rect
1316
1317 Create a new Rect from a position and size.
1318 """
1319 val = _core_.new_RectPS(*args, **kwargs)
1320 val.thisown = 1
1321 return val
1322
1323 def RectS(*args, **kwargs):
1324 """
1325 RectS(Size size) -> Rect
1326
1327 Create a new Rect from a size only.
1328 """
1329 val = _core_.new_RectS(*args, **kwargs)
1330 val.thisown = 1
1331 return val
1332
1333
1334 def IntersectRect(*args, **kwargs):
1335 """
1336 IntersectRect(Rect r1, Rect r2) -> Rect
1337
1338 Calculate and return the intersection of r1 and r2.
1339 """
1340 return _core_.IntersectRect(*args, **kwargs)
1341 #---------------------------------------------------------------------------
1342
1343 class Point2D(object):
1344 """
1345 wx.Point2Ds represent a point or a vector in a 2d coordinate system
1346 with floating point values.
1347 """
1348 def __repr__(self):
1349 return "<%s.%s; proxy of C++ wxPoint2D instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
1350 def __init__(self, *args, **kwargs):
1351 """
1352 __init__(self, double x=0.0, double y=0.0) -> Point2D
1353
1354 Create a w.Point2D object.
1355 """
1356 newobj = _core_.new_Point2D(*args, **kwargs)
1357 self.this = newobj.this
1358 self.thisown = 1
1359 del newobj.thisown
1360 def GetFloor(*args, **kwargs):
1361 """
1362 GetFloor() -> (x,y)
1363
1364 Convert to integer
1365 """
1366 return _core_.Point2D_GetFloor(*args, **kwargs)
1367
1368 def GetRounded(*args, **kwargs):
1369 """
1370 GetRounded() -> (x,y)
1371
1372 Convert to integer
1373 """
1374 return _core_.Point2D_GetRounded(*args, **kwargs)
1375
1376 def GetVectorLength(*args, **kwargs):
1377 """GetVectorLength(self) -> double"""
1378 return _core_.Point2D_GetVectorLength(*args, **kwargs)
1379
1380 def GetVectorAngle(*args, **kwargs):
1381 """GetVectorAngle(self) -> double"""
1382 return _core_.Point2D_GetVectorAngle(*args, **kwargs)
1383
1384 def SetVectorLength(*args, **kwargs):
1385 """SetVectorLength(self, double length)"""
1386 return _core_.Point2D_SetVectorLength(*args, **kwargs)
1387
1388 def SetVectorAngle(*args, **kwargs):
1389 """SetVectorAngle(self, double degrees)"""
1390 return _core_.Point2D_SetVectorAngle(*args, **kwargs)
1391
1392 def SetPolarCoordinates(self, angle, length):
1393 self.SetVectorLength(length)
1394 self.SetVectorAngle(angle)
1395 def Normalize(self):
1396 self.SetVectorLength(1.0)
1397
1398 def GetDistance(*args, **kwargs):
1399 """GetDistance(self, Point2D pt) -> double"""
1400 return _core_.Point2D_GetDistance(*args, **kwargs)
1401
1402 def GetDistanceSquare(*args, **kwargs):
1403 """GetDistanceSquare(self, Point2D pt) -> double"""
1404 return _core_.Point2D_GetDistanceSquare(*args, **kwargs)
1405
1406 def GetDotProduct(*args, **kwargs):
1407 """GetDotProduct(self, Point2D vec) -> double"""
1408 return _core_.Point2D_GetDotProduct(*args, **kwargs)
1409
1410 def GetCrossProduct(*args, **kwargs):
1411 """GetCrossProduct(self, Point2D vec) -> double"""
1412 return _core_.Point2D_GetCrossProduct(*args, **kwargs)
1413
1414 def __neg__(*args, **kwargs):
1415 """
1416 __neg__(self) -> Point2D
1417
1418 the reflection of this point
1419 """
1420 return _core_.Point2D___neg__(*args, **kwargs)
1421
1422 def __iadd__(*args, **kwargs):
1423 """__iadd__(self, Point2D pt) -> Point2D"""
1424 return _core_.Point2D___iadd__(*args, **kwargs)
1425
1426 def __isub__(*args, **kwargs):
1427 """__isub__(self, Point2D pt) -> Point2D"""
1428 return _core_.Point2D___isub__(*args, **kwargs)
1429
1430 def __imul__(*args, **kwargs):
1431 """__imul__(self, Point2D pt) -> Point2D"""
1432 return _core_.Point2D___imul__(*args, **kwargs)
1433
1434 def __idiv__(*args, **kwargs):
1435 """__idiv__(self, Point2D pt) -> Point2D"""
1436 return _core_.Point2D___idiv__(*args, **kwargs)
1437
1438 def __eq__(*args, **kwargs):
1439 """
1440 __eq__(self, Point2D pt) -> bool
1441
1442 Test for equality
1443 """
1444 return _core_.Point2D___eq__(*args, **kwargs)
1445
1446 def __ne__(*args, **kwargs):
1447 """
1448 __ne__(self, Point2D pt) -> bool
1449
1450 Test for inequality
1451 """
1452 return _core_.Point2D___ne__(*args, **kwargs)
1453
1454 x = property(_core_.Point2D_x_get, _core_.Point2D_x_set)
1455 y = property(_core_.Point2D_y_get, _core_.Point2D_y_set)
1456 def Set(*args, **kwargs):
1457 """Set(self, double x=0, double y=0)"""
1458 return _core_.Point2D_Set(*args, **kwargs)
1459
1460 def Get(*args, **kwargs):
1461 """
1462 Get() -> (x,y)
1463
1464 Return x and y properties as a tuple.
1465 """
1466 return _core_.Point2D_Get(*args, **kwargs)
1467
1468 asTuple = wx._deprecated(Get, "asTuple is deprecated, use `Get` instead")
1469 def __str__(self): return str(self.Get())
1470 def __repr__(self): return 'wx.Point2D'+str(self.Get())
1471 def __len__(self): return len(self.Get())
1472 def __getitem__(self, index): return self.Get()[index]
1473 def __setitem__(self, index, val):
1474 if index == 0: self.x = val
1475 elif index == 1: self.y = val
1476 else: raise IndexError
1477 def __nonzero__(self): return self.Get() != (0.0, 0.0)
1478 __safe_for_unpickling__ = True
1479 def __reduce__(self): return (wx.Point2D, self.Get())
1480
1481
1482 class Point2DPtr(Point2D):
1483 def __init__(self, this):
1484 self.this = this
1485 if not hasattr(self,"thisown"): self.thisown = 0
1486 self.__class__ = Point2D
1487 _core_.Point2D_swigregister(Point2DPtr)
1488
1489 def Point2DCopy(*args, **kwargs):
1490 """
1491 Point2DCopy(Point2D pt) -> Point2D
1492
1493 Create a w.Point2D object.
1494 """
1495 val = _core_.new_Point2DCopy(*args, **kwargs)
1496 val.thisown = 1
1497 return val
1498
1499 def Point2DFromPoint(*args, **kwargs):
1500 """
1501 Point2DFromPoint(Point pt) -> Point2D
1502
1503 Create a w.Point2D object.
1504 """
1505 val = _core_.new_Point2DFromPoint(*args, **kwargs)
1506 val.thisown = 1
1507 return val
1508
1509 #---------------------------------------------------------------------------
1510
1511 FromStart = _core_.FromStart
1512 FromCurrent = _core_.FromCurrent
1513 FromEnd = _core_.FromEnd
1514 class InputStream(object):
1515 def __repr__(self):
1516 return "<%s.%s; proxy of C++ wxPyInputStream instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
1517 def __init__(self, *args, **kwargs):
1518 """__init__(self, PyObject p) -> InputStream"""
1519 newobj = _core_.new_InputStream(*args, **kwargs)
1520 self.this = newobj.this
1521 self.thisown = 1
1522 del newobj.thisown
1523 def close(*args, **kwargs):
1524 """close(self)"""
1525 return _core_.InputStream_close(*args, **kwargs)
1526
1527 def flush(*args, **kwargs):
1528 """flush(self)"""
1529 return _core_.InputStream_flush(*args, **kwargs)
1530
1531 def eof(*args, **kwargs):
1532 """eof(self) -> bool"""
1533 return _core_.InputStream_eof(*args, **kwargs)
1534
1535 def read(*args, **kwargs):
1536 """read(self, int size=-1) -> PyObject"""
1537 return _core_.InputStream_read(*args, **kwargs)
1538
1539 def readline(*args, **kwargs):
1540 """readline(self, int size=-1) -> PyObject"""
1541 return _core_.InputStream_readline(*args, **kwargs)
1542
1543 def readlines(*args, **kwargs):
1544 """readlines(self, int sizehint=-1) -> PyObject"""
1545 return _core_.InputStream_readlines(*args, **kwargs)
1546
1547 def seek(*args, **kwargs):
1548 """seek(self, int offset, int whence=0)"""
1549 return _core_.InputStream_seek(*args, **kwargs)
1550
1551 def tell(*args, **kwargs):
1552 """tell(self) -> int"""
1553 return _core_.InputStream_tell(*args, **kwargs)
1554
1555 def Peek(*args, **kwargs):
1556 """Peek(self) -> char"""
1557 return _core_.InputStream_Peek(*args, **kwargs)
1558
1559 def GetC(*args, **kwargs):
1560 """GetC(self) -> char"""
1561 return _core_.InputStream_GetC(*args, **kwargs)
1562
1563 def LastRead(*args, **kwargs):
1564 """LastRead(self) -> size_t"""
1565 return _core_.InputStream_LastRead(*args, **kwargs)
1566
1567 def CanRead(*args, **kwargs):
1568 """CanRead(self) -> bool"""
1569 return _core_.InputStream_CanRead(*args, **kwargs)
1570
1571 def Eof(*args, **kwargs):
1572 """Eof(self) -> bool"""
1573 return _core_.InputStream_Eof(*args, **kwargs)
1574
1575 def Ungetch(*args, **kwargs):
1576 """Ungetch(self, char c) -> bool"""
1577 return _core_.InputStream_Ungetch(*args, **kwargs)
1578
1579 def SeekI(*args, **kwargs):
1580 """SeekI(self, long pos, int mode=FromStart) -> long"""
1581 return _core_.InputStream_SeekI(*args, **kwargs)
1582
1583 def TellI(*args, **kwargs):
1584 """TellI(self) -> long"""
1585 return _core_.InputStream_TellI(*args, **kwargs)
1586
1587
1588 class InputStreamPtr(InputStream):
1589 def __init__(self, this):
1590 self.this = this
1591 if not hasattr(self,"thisown"): self.thisown = 0
1592 self.__class__ = InputStream
1593 _core_.InputStream_swigregister(InputStreamPtr)
1594 DefaultPosition = cvar.DefaultPosition
1595 DefaultSize = cvar.DefaultSize
1596
1597 class OutputStream(object):
1598 def __init__(self): raise RuntimeError, "No constructor defined"
1599 def __repr__(self):
1600 return "<%s.%s; proxy of C++ wxOutputStream instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
1601 def write(*args, **kwargs):
1602 """write(self, PyObject obj)"""
1603 return _core_.OutputStream_write(*args, **kwargs)
1604
1605
1606 class OutputStreamPtr(OutputStream):
1607 def __init__(self, this):
1608 self.this = this
1609 if not hasattr(self,"thisown"): self.thisown = 0
1610 self.__class__ = OutputStream
1611 _core_.OutputStream_swigregister(OutputStreamPtr)
1612
1613 #---------------------------------------------------------------------------
1614
1615 class FSFile(Object):
1616 def __repr__(self):
1617 return "<%s.%s; proxy of C++ wxFSFile instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
1618 def __init__(self, *args, **kwargs):
1619 """
1620 __init__(self, InputStream stream, String loc, String mimetype, String anchor,
1621 DateTime modif) -> FSFile
1622 """
1623 newobj = _core_.new_FSFile(*args, **kwargs)
1624 self.this = newobj.this
1625 self.thisown = 1
1626 del newobj.thisown
1627 self.thisown = 0 # It will normally be deleted by the user of the wxFileSystem
1628
1629 def __del__(self, destroy=_core_.delete_FSFile):
1630 """__del__(self)"""
1631 try:
1632 if self.thisown: destroy(self)
1633 except: pass
1634
1635 def GetStream(*args, **kwargs):
1636 """GetStream(self) -> InputStream"""
1637 return _core_.FSFile_GetStream(*args, **kwargs)
1638
1639 def GetMimeType(*args, **kwargs):
1640 """GetMimeType(self) -> String"""
1641 return _core_.FSFile_GetMimeType(*args, **kwargs)
1642
1643 def GetLocation(*args, **kwargs):
1644 """GetLocation(self) -> String"""
1645 return _core_.FSFile_GetLocation(*args, **kwargs)
1646
1647 def GetAnchor(*args, **kwargs):
1648 """GetAnchor(self) -> String"""
1649 return _core_.FSFile_GetAnchor(*args, **kwargs)
1650
1651 def GetModificationTime(*args, **kwargs):
1652 """GetModificationTime(self) -> DateTime"""
1653 return _core_.FSFile_GetModificationTime(*args, **kwargs)
1654
1655
1656 class FSFilePtr(FSFile):
1657 def __init__(self, this):
1658 self.this = this
1659 if not hasattr(self,"thisown"): self.thisown = 0
1660 self.__class__ = FSFile
1661 _core_.FSFile_swigregister(FSFilePtr)
1662
1663 class CPPFileSystemHandler(object):
1664 def __init__(self): raise RuntimeError, "No constructor defined"
1665 def __repr__(self):
1666 return "<%s.%s; proxy of C++ wxFileSystemHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
1667
1668 class CPPFileSystemHandlerPtr(CPPFileSystemHandler):
1669 def __init__(self, this):
1670 self.this = this
1671 if not hasattr(self,"thisown"): self.thisown = 0
1672 self.__class__ = CPPFileSystemHandler
1673 _core_.CPPFileSystemHandler_swigregister(CPPFileSystemHandlerPtr)
1674
1675 class FileSystemHandler(CPPFileSystemHandler):
1676 def __repr__(self):
1677 return "<%s.%s; proxy of C++ wxPyFileSystemHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
1678 def __init__(self, *args, **kwargs):
1679 """__init__(self) -> FileSystemHandler"""
1680 newobj = _core_.new_FileSystemHandler(*args, **kwargs)
1681 self.this = newobj.this
1682 self.thisown = 1
1683 del newobj.thisown
1684 self._setCallbackInfo(self, FileSystemHandler)
1685
1686 def _setCallbackInfo(*args, **kwargs):
1687 """_setCallbackInfo(self, PyObject self, PyObject _class)"""
1688 return _core_.FileSystemHandler__setCallbackInfo(*args, **kwargs)
1689
1690 def CanOpen(*args, **kwargs):
1691 """CanOpen(self, String location) -> bool"""
1692 return _core_.FileSystemHandler_CanOpen(*args, **kwargs)
1693
1694 def OpenFile(*args, **kwargs):
1695 """OpenFile(self, FileSystem fs, String location) -> FSFile"""
1696 return _core_.FileSystemHandler_OpenFile(*args, **kwargs)
1697
1698 def FindFirst(*args, **kwargs):
1699 """FindFirst(self, String spec, int flags=0) -> String"""
1700 return _core_.FileSystemHandler_FindFirst(*args, **kwargs)
1701
1702 def FindNext(*args, **kwargs):
1703 """FindNext(self) -> String"""
1704 return _core_.FileSystemHandler_FindNext(*args, **kwargs)
1705
1706 def GetProtocol(*args, **kwargs):
1707 """GetProtocol(self, String location) -> String"""
1708 return _core_.FileSystemHandler_GetProtocol(*args, **kwargs)
1709
1710 def GetLeftLocation(*args, **kwargs):
1711 """GetLeftLocation(self, String location) -> String"""
1712 return _core_.FileSystemHandler_GetLeftLocation(*args, **kwargs)
1713
1714 def GetAnchor(*args, **kwargs):
1715 """GetAnchor(self, String location) -> String"""
1716 return _core_.FileSystemHandler_GetAnchor(*args, **kwargs)
1717
1718 def GetRightLocation(*args, **kwargs):
1719 """GetRightLocation(self, String location) -> String"""
1720 return _core_.FileSystemHandler_GetRightLocation(*args, **kwargs)
1721
1722 def GetMimeTypeFromExt(*args, **kwargs):
1723 """GetMimeTypeFromExt(self, String location) -> String"""
1724 return _core_.FileSystemHandler_GetMimeTypeFromExt(*args, **kwargs)
1725
1726
1727 class FileSystemHandlerPtr(FileSystemHandler):
1728 def __init__(self, this):
1729 self.this = this
1730 if not hasattr(self,"thisown"): self.thisown = 0
1731 self.__class__ = FileSystemHandler
1732 _core_.FileSystemHandler_swigregister(FileSystemHandlerPtr)
1733
1734 class FileSystem(Object):
1735 def __repr__(self):
1736 return "<%s.%s; proxy of C++ wxFileSystem instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
1737 def __init__(self, *args, **kwargs):
1738 """__init__(self) -> FileSystem"""
1739 newobj = _core_.new_FileSystem(*args, **kwargs)
1740 self.this = newobj.this
1741 self.thisown = 1
1742 del newobj.thisown
1743 def __del__(self, destroy=_core_.delete_FileSystem):
1744 """__del__(self)"""
1745 try:
1746 if self.thisown: destroy(self)
1747 except: pass
1748
1749 def ChangePathTo(*args, **kwargs):
1750 """ChangePathTo(self, String location, bool is_dir=False)"""
1751 return _core_.FileSystem_ChangePathTo(*args, **kwargs)
1752
1753 def GetPath(*args, **kwargs):
1754 """GetPath(self) -> String"""
1755 return _core_.FileSystem_GetPath(*args, **kwargs)
1756
1757 def OpenFile(*args, **kwargs):
1758 """OpenFile(self, String location) -> FSFile"""
1759 return _core_.FileSystem_OpenFile(*args, **kwargs)
1760
1761 def FindFirst(*args, **kwargs):
1762 """FindFirst(self, String spec, int flags=0) -> String"""
1763 return _core_.FileSystem_FindFirst(*args, **kwargs)
1764
1765 def FindNext(*args, **kwargs):
1766 """FindNext(self) -> String"""
1767 return _core_.FileSystem_FindNext(*args, **kwargs)
1768
1769 def AddHandler(*args, **kwargs):
1770 """AddHandler(CPPFileSystemHandler handler)"""
1771 return _core_.FileSystem_AddHandler(*args, **kwargs)
1772
1773 AddHandler = staticmethod(AddHandler)
1774 def CleanUpHandlers(*args, **kwargs):
1775 """CleanUpHandlers()"""
1776 return _core_.FileSystem_CleanUpHandlers(*args, **kwargs)
1777
1778 CleanUpHandlers = staticmethod(CleanUpHandlers)
1779 def FileNameToURL(*args, **kwargs):
1780 """FileNameToURL(String filename) -> String"""
1781 return _core_.FileSystem_FileNameToURL(*args, **kwargs)
1782
1783 FileNameToURL = staticmethod(FileNameToURL)
1784 def URLToFileName(*args, **kwargs):
1785 """URLToFileName(String url) -> String"""
1786 return _core_.FileSystem_URLToFileName(*args, **kwargs)
1787
1788 URLToFileName = staticmethod(URLToFileName)
1789
1790 class FileSystemPtr(FileSystem):
1791 def __init__(self, this):
1792 self.this = this
1793 if not hasattr(self,"thisown"): self.thisown = 0
1794 self.__class__ = FileSystem
1795 _core_.FileSystem_swigregister(FileSystemPtr)
1796
1797 def FileSystem_AddHandler(*args, **kwargs):
1798 """FileSystem_AddHandler(CPPFileSystemHandler handler)"""
1799 return _core_.FileSystem_AddHandler(*args, **kwargs)
1800
1801 def FileSystem_CleanUpHandlers(*args, **kwargs):
1802 """FileSystem_CleanUpHandlers()"""
1803 return _core_.FileSystem_CleanUpHandlers(*args, **kwargs)
1804
1805 def FileSystem_FileNameToURL(*args, **kwargs):
1806 """FileSystem_FileNameToURL(String filename) -> String"""
1807 return _core_.FileSystem_FileNameToURL(*args, **kwargs)
1808
1809 def FileSystem_URLToFileName(*args, **kwargs):
1810 """FileSystem_URLToFileName(String url) -> String"""
1811 return _core_.FileSystem_URLToFileName(*args, **kwargs)
1812
1813 class InternetFSHandler(CPPFileSystemHandler):
1814 def __repr__(self):
1815 return "<%s.%s; proxy of C++ wxInternetFSHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
1816 def __init__(self, *args, **kwargs):
1817 """__init__(self) -> InternetFSHandler"""
1818 newobj = _core_.new_InternetFSHandler(*args, **kwargs)
1819 self.this = newobj.this
1820 self.thisown = 1
1821 del newobj.thisown
1822 def CanOpen(*args, **kwargs):
1823 """CanOpen(self, String location) -> bool"""
1824 return _core_.InternetFSHandler_CanOpen(*args, **kwargs)
1825
1826 def OpenFile(*args, **kwargs):
1827 """OpenFile(self, FileSystem fs, String location) -> FSFile"""
1828 return _core_.InternetFSHandler_OpenFile(*args, **kwargs)
1829
1830
1831 class InternetFSHandlerPtr(InternetFSHandler):
1832 def __init__(self, this):
1833 self.this = this
1834 if not hasattr(self,"thisown"): self.thisown = 0
1835 self.__class__ = InternetFSHandler
1836 _core_.InternetFSHandler_swigregister(InternetFSHandlerPtr)
1837
1838 class ZipFSHandler(CPPFileSystemHandler):
1839 def __repr__(self):
1840 return "<%s.%s; proxy of C++ wxZipFSHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
1841 def __init__(self, *args, **kwargs):
1842 """__init__(self) -> ZipFSHandler"""
1843 newobj = _core_.new_ZipFSHandler(*args, **kwargs)
1844 self.this = newobj.this
1845 self.thisown = 1
1846 del newobj.thisown
1847 def CanOpen(*args, **kwargs):
1848 """CanOpen(self, String location) -> bool"""
1849 return _core_.ZipFSHandler_CanOpen(*args, **kwargs)
1850
1851 def OpenFile(*args, **kwargs):
1852 """OpenFile(self, FileSystem fs, String location) -> FSFile"""
1853 return _core_.ZipFSHandler_OpenFile(*args, **kwargs)
1854
1855 def FindFirst(*args, **kwargs):
1856 """FindFirst(self, String spec, int flags=0) -> String"""
1857 return _core_.ZipFSHandler_FindFirst(*args, **kwargs)
1858
1859 def FindNext(*args, **kwargs):
1860 """FindNext(self) -> String"""
1861 return _core_.ZipFSHandler_FindNext(*args, **kwargs)
1862
1863
1864 class ZipFSHandlerPtr(ZipFSHandler):
1865 def __init__(self, this):
1866 self.this = this
1867 if not hasattr(self,"thisown"): self.thisown = 0
1868 self.__class__ = ZipFSHandler
1869 _core_.ZipFSHandler_swigregister(ZipFSHandlerPtr)
1870
1871
1872 def __wxMemoryFSHandler_AddFile_wxImage(*args, **kwargs):
1873 """__wxMemoryFSHandler_AddFile_wxImage(String filename, Image image, long type)"""
1874 return _core_.__wxMemoryFSHandler_AddFile_wxImage(*args, **kwargs)
1875
1876 def __wxMemoryFSHandler_AddFile_wxBitmap(*args, **kwargs):
1877 """__wxMemoryFSHandler_AddFile_wxBitmap(String filename, Bitmap bitmap, long type)"""
1878 return _core_.__wxMemoryFSHandler_AddFile_wxBitmap(*args, **kwargs)
1879
1880 def __wxMemoryFSHandler_AddFile_Data(*args, **kwargs):
1881 """__wxMemoryFSHandler_AddFile_Data(String filename, PyObject data)"""
1882 return _core_.__wxMemoryFSHandler_AddFile_Data(*args, **kwargs)
1883 def MemoryFSHandler_AddFile(filename, dataItem, imgType=-1):
1884 """
1885 Add 'file' to the memory filesystem. The dataItem parameter can
1886 either be a `wx.Bitmap`, `wx.Image` or a string that can contain
1887 arbitrary data. If a bitmap or image is used then the imgType
1888 parameter should specify what kind of image file it should be
1889 written as, wx.BITMAP_TYPE_PNG, etc.
1890 """
1891 if isinstance(dataItem, wx.Image):
1892 __wxMemoryFSHandler_AddFile_wxImage(filename, dataItem, imgType)
1893 elif isinstance(dataItem, wx.Bitmap):
1894 __wxMemoryFSHandler_AddFile_wxBitmap(filename, dataItem, imgType)
1895 elif type(dataItem) == str:
1896 __wxMemoryFSHandler_AddFile_Data(filename, dataItem)
1897 else:
1898 raise TypeError, 'wx.Image, wx.Bitmap or string expected'
1899
1900 class MemoryFSHandler(CPPFileSystemHandler):
1901 def __repr__(self):
1902 return "<%s.%s; proxy of C++ wxMemoryFSHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
1903 def __init__(self, *args, **kwargs):
1904 """__init__(self) -> MemoryFSHandler"""
1905 newobj = _core_.new_MemoryFSHandler(*args, **kwargs)
1906 self.this = newobj.this
1907 self.thisown = 1
1908 del newobj.thisown
1909 def RemoveFile(*args, **kwargs):
1910 """RemoveFile(String filename)"""
1911 return _core_.MemoryFSHandler_RemoveFile(*args, **kwargs)
1912
1913 RemoveFile = staticmethod(RemoveFile)
1914 AddFile = staticmethod(MemoryFSHandler_AddFile)
1915 def CanOpen(*args, **kwargs):
1916 """CanOpen(self, String location) -> bool"""
1917 return _core_.MemoryFSHandler_CanOpen(*args, **kwargs)
1918
1919 def OpenFile(*args, **kwargs):
1920 """OpenFile(self, FileSystem fs, String location) -> FSFile"""
1921 return _core_.MemoryFSHandler_OpenFile(*args, **kwargs)
1922
1923 def FindFirst(*args, **kwargs):
1924 """FindFirst(self, String spec, int flags=0) -> String"""
1925 return _core_.MemoryFSHandler_FindFirst(*args, **kwargs)
1926
1927 def FindNext(*args, **kwargs):
1928 """FindNext(self) -> String"""
1929 return _core_.MemoryFSHandler_FindNext(*args, **kwargs)
1930
1931
1932 class MemoryFSHandlerPtr(MemoryFSHandler):
1933 def __init__(self, this):
1934 self.this = this
1935 if not hasattr(self,"thisown"): self.thisown = 0
1936 self.__class__ = MemoryFSHandler
1937 _core_.MemoryFSHandler_swigregister(MemoryFSHandlerPtr)
1938
1939 def MemoryFSHandler_RemoveFile(*args, **kwargs):
1940 """MemoryFSHandler_RemoveFile(String filename)"""
1941 return _core_.MemoryFSHandler_RemoveFile(*args, **kwargs)
1942
1943 #---------------------------------------------------------------------------
1944
1945 class ImageHandler(Object):
1946 def __init__(self): raise RuntimeError, "No constructor defined"
1947 def __repr__(self):
1948 return "<%s.%s; proxy of C++ wxImageHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
1949 def GetName(*args, **kwargs):
1950 """GetName(self) -> String"""
1951 return _core_.ImageHandler_GetName(*args, **kwargs)
1952
1953 def GetExtension(*args, **kwargs):
1954 """GetExtension(self) -> String"""
1955 return _core_.ImageHandler_GetExtension(*args, **kwargs)
1956
1957 def GetType(*args, **kwargs):
1958 """GetType(self) -> long"""
1959 return _core_.ImageHandler_GetType(*args, **kwargs)
1960
1961 def GetMimeType(*args, **kwargs):
1962 """GetMimeType(self) -> String"""
1963 return _core_.ImageHandler_GetMimeType(*args, **kwargs)
1964
1965 def CanRead(*args, **kwargs):
1966 """CanRead(self, String name) -> bool"""
1967 return _core_.ImageHandler_CanRead(*args, **kwargs)
1968
1969 def SetName(*args, **kwargs):
1970 """SetName(self, String name)"""
1971 return _core_.ImageHandler_SetName(*args, **kwargs)
1972
1973 def SetExtension(*args, **kwargs):
1974 """SetExtension(self, String extension)"""
1975 return _core_.ImageHandler_SetExtension(*args, **kwargs)
1976
1977 def SetType(*args, **kwargs):
1978 """SetType(self, long type)"""
1979 return _core_.ImageHandler_SetType(*args, **kwargs)
1980
1981 def SetMimeType(*args, **kwargs):
1982 """SetMimeType(self, String mimetype)"""
1983 return _core_.ImageHandler_SetMimeType(*args, **kwargs)
1984
1985
1986 class ImageHandlerPtr(ImageHandler):
1987 def __init__(self, this):
1988 self.this = this
1989 if not hasattr(self,"thisown"): self.thisown = 0
1990 self.__class__ = ImageHandler
1991 _core_.ImageHandler_swigregister(ImageHandlerPtr)
1992
1993 class ImageHistogram(object):
1994 def __repr__(self):
1995 return "<%s.%s; proxy of C++ wxImageHistogram instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
1996 def __init__(self, *args, **kwargs):
1997 """__init__(self) -> ImageHistogram"""
1998 newobj = _core_.new_ImageHistogram(*args, **kwargs)
1999 self.this = newobj.this
2000 self.thisown = 1
2001 del newobj.thisown
2002 def MakeKey(*args, **kwargs):
2003 """
2004 MakeKey(unsigned char r, unsigned char g, unsigned char b) -> unsigned long
2005
2006 Get the key in the histogram for the given RGB values
2007 """
2008 return _core_.ImageHistogram_MakeKey(*args, **kwargs)
2009
2010 MakeKey = staticmethod(MakeKey)
2011 def FindFirstUnusedColour(*args, **kwargs):
2012 """
2013 FindFirstUnusedColour(int startR=1, int startG=0, int startB=0) -> (success, r, g, b)
2014
2015 Find first colour that is not used in the image and has higher RGB
2016 values than startR, startG, startB. Returns a tuple consisting of a
2017 success flag and rgb values.
2018 """
2019 return _core_.ImageHistogram_FindFirstUnusedColour(*args, **kwargs)
2020
2021
2022 class ImageHistogramPtr(ImageHistogram):
2023 def __init__(self, this):
2024 self.this = this
2025 if not hasattr(self,"thisown"): self.thisown = 0
2026 self.__class__ = ImageHistogram
2027 _core_.ImageHistogram_swigregister(ImageHistogramPtr)
2028
2029 def ImageHistogram_MakeKey(*args, **kwargs):
2030 """
2031 ImageHistogram_MakeKey(unsigned char r, unsigned char g, unsigned char b) -> unsigned long
2032
2033 Get the key in the histogram for the given RGB values
2034 """
2035 return _core_.ImageHistogram_MakeKey(*args, **kwargs)
2036
2037 class Image(Object):
2038 def __repr__(self):
2039 return "<%s.%s; proxy of C++ wxImage instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
2040 def __init__(self, *args, **kwargs):
2041 """__init__(self, String name, long type=BITMAP_TYPE_ANY, int index=-1) -> Image"""
2042 newobj = _core_.new_Image(*args, **kwargs)
2043 self.this = newobj.this
2044 self.thisown = 1
2045 del newobj.thisown
2046 def __del__(self, destroy=_core_.delete_Image):
2047 """__del__(self)"""
2048 try:
2049 if self.thisown: destroy(self)
2050 except: pass
2051
2052 def Create(*args, **kwargs):
2053 """Create(self, int width, int height)"""
2054 return _core_.Image_Create(*args, **kwargs)
2055
2056 def Destroy(*args, **kwargs):
2057 """
2058 Destroy(self)
2059
2060 Deletes the C++ object this Python object is a proxy for.
2061 """
2062 return _core_.Image_Destroy(*args, **kwargs)
2063
2064 def Scale(*args, **kwargs):
2065 """Scale(self, int width, int height) -> Image"""
2066 return _core_.Image_Scale(*args, **kwargs)
2067
2068 def ShrinkBy(*args, **kwargs):
2069 """ShrinkBy(self, int xFactor, int yFactor) -> Image"""
2070 return _core_.Image_ShrinkBy(*args, **kwargs)
2071
2072 def Rescale(*args, **kwargs):
2073 """Rescale(self, int width, int height) -> Image"""
2074 return _core_.Image_Rescale(*args, **kwargs)
2075
2076 def SetRGB(*args, **kwargs):
2077 """SetRGB(self, int x, int y, unsigned char r, unsigned char g, unsigned char b)"""
2078 return _core_.Image_SetRGB(*args, **kwargs)
2079
2080 def GetRed(*args, **kwargs):
2081 """GetRed(self, int x, int y) -> unsigned char"""
2082 return _core_.Image_GetRed(*args, **kwargs)
2083
2084 def GetGreen(*args, **kwargs):
2085 """GetGreen(self, int x, int y) -> unsigned char"""
2086 return _core_.Image_GetGreen(*args, **kwargs)
2087
2088 def GetBlue(*args, **kwargs):
2089 """GetBlue(self, int x, int y) -> unsigned char"""
2090 return _core_.Image_GetBlue(*args, **kwargs)
2091
2092 def SetAlpha(*args, **kwargs):
2093 """SetAlpha(self, int x, int y, unsigned char alpha)"""
2094 return _core_.Image_SetAlpha(*args, **kwargs)
2095
2096 def GetAlpha(*args, **kwargs):
2097 """GetAlpha(self, int x, int y) -> unsigned char"""
2098 return _core_.Image_GetAlpha(*args, **kwargs)
2099
2100 def HasAlpha(*args, **kwargs):
2101 """HasAlpha(self) -> bool"""
2102 return _core_.Image_HasAlpha(*args, **kwargs)
2103
2104 def FindFirstUnusedColour(*args, **kwargs):
2105 """
2106 FindFirstUnusedColour(int startR=1, int startG=0, int startB=0) -> (success, r, g, b)
2107
2108 Find first colour that is not used in the image and has higher RGB
2109 values than startR, startG, startB. Returns a tuple consisting of a
2110 success flag and rgb values.
2111 """
2112 return _core_.Image_FindFirstUnusedColour(*args, **kwargs)
2113
2114 def ConvertAlphaToMask(*args, **kwargs):
2115 """
2116 ConvertAlphaToMask(self, byte threshold=128) -> bool
2117
2118 If the image has alpha channel, this method converts it to mask. All pixels
2119 with alpha value less than ``threshold`` are replaced with mask colour and the
2120 alpha channel is removed. Mask colour is chosen automatically using
2121 `FindFirstUnusedColour`.
2122
2123 If the image image doesn't have alpha channel, ConvertAlphaToMask does
2124 nothing.
2125 """
2126 return _core_.Image_ConvertAlphaToMask(*args, **kwargs)
2127
2128 def SetMaskFromImage(*args, **kwargs):
2129 """SetMaskFromImage(self, Image mask, byte mr, byte mg, byte mb) -> bool"""
2130 return _core_.Image_SetMaskFromImage(*args, **kwargs)
2131
2132 def CanRead(*args, **kwargs):
2133 """CanRead(String name) -> bool"""
2134 return _core_.Image_CanRead(*args, **kwargs)
2135
2136 CanRead = staticmethod(CanRead)
2137 def GetImageCount(*args, **kwargs):
2138 """GetImageCount(String name, long type=BITMAP_TYPE_ANY) -> int"""
2139 return _core_.Image_GetImageCount(*args, **kwargs)
2140
2141 GetImageCount = staticmethod(GetImageCount)
2142 def LoadFile(*args, **kwargs):
2143 """LoadFile(self, String name, long type=BITMAP_TYPE_ANY, int index=-1) -> bool"""
2144 return _core_.Image_LoadFile(*args, **kwargs)
2145
2146 def LoadMimeFile(*args, **kwargs):
2147 """LoadMimeFile(self, String name, String mimetype, int index=-1) -> bool"""
2148 return _core_.Image_LoadMimeFile(*args, **kwargs)
2149
2150 def SaveFile(*args, **kwargs):
2151 """SaveFile(self, String name, int type) -> bool"""
2152 return _core_.Image_SaveFile(*args, **kwargs)
2153
2154 def SaveMimeFile(*args, **kwargs):
2155 """SaveMimeFile(self, String name, String mimetype) -> bool"""
2156 return _core_.Image_SaveMimeFile(*args, **kwargs)
2157
2158 def CanReadStream(*args, **kwargs):
2159 """CanReadStream(InputStream stream) -> bool"""
2160 return _core_.Image_CanReadStream(*args, **kwargs)
2161
2162 CanReadStream = staticmethod(CanReadStream)
2163 def LoadStream(*args, **kwargs):
2164 """LoadStream(self, InputStream stream, long type=BITMAP_TYPE_ANY, int index=-1) -> bool"""
2165 return _core_.Image_LoadStream(*args, **kwargs)
2166
2167 def LoadMimeStream(*args, **kwargs):
2168 """LoadMimeStream(self, InputStream stream, String mimetype, int index=-1) -> bool"""
2169 return _core_.Image_LoadMimeStream(*args, **kwargs)
2170
2171 def Ok(*args, **kwargs):
2172 """Ok(self) -> bool"""
2173 return _core_.Image_Ok(*args, **kwargs)
2174
2175 def GetWidth(*args, **kwargs):
2176 """GetWidth(self) -> int"""
2177 return _core_.Image_GetWidth(*args, **kwargs)
2178
2179 def GetHeight(*args, **kwargs):
2180 """GetHeight(self) -> int"""
2181 return _core_.Image_GetHeight(*args, **kwargs)
2182
2183 def GetSize(*args, **kwargs):
2184 """GetSize(self) -> Size"""
2185 return _core_.Image_GetSize(*args, **kwargs)
2186
2187 def GetSubImage(*args, **kwargs):
2188 """GetSubImage(self, Rect rect) -> Image"""
2189 return _core_.Image_GetSubImage(*args, **kwargs)
2190
2191 def Copy(*args, **kwargs):
2192 """Copy(self) -> Image"""
2193 return _core_.Image_Copy(*args, **kwargs)
2194
2195 def Paste(*args, **kwargs):
2196 """Paste(self, Image image, int x, int y)"""
2197 return _core_.Image_Paste(*args, **kwargs)
2198
2199 def GetData(*args, **kwargs):
2200 """GetData(self) -> PyObject"""
2201 return _core_.Image_GetData(*args, **kwargs)
2202
2203 def SetData(*args, **kwargs):
2204 """SetData(self, PyObject data)"""
2205 return _core_.Image_SetData(*args, **kwargs)
2206
2207 def GetDataBuffer(*args, **kwargs):
2208 """GetDataBuffer(self) -> PyObject"""
2209 return _core_.Image_GetDataBuffer(*args, **kwargs)
2210
2211 def SetDataBuffer(*args, **kwargs):
2212 """SetDataBuffer(self, PyObject data)"""
2213 return _core_.Image_SetDataBuffer(*args, **kwargs)
2214
2215 def GetAlphaData(*args, **kwargs):
2216 """GetAlphaData(self) -> PyObject"""
2217 return _core_.Image_GetAlphaData(*args, **kwargs)
2218
2219 def SetAlphaData(*args, **kwargs):
2220 """SetAlphaData(self, PyObject data)"""
2221 return _core_.Image_SetAlphaData(*args, **kwargs)
2222
2223 def GetAlphaBuffer(*args, **kwargs):
2224 """GetAlphaBuffer(self) -> PyObject"""
2225 return _core_.Image_GetAlphaBuffer(*args, **kwargs)
2226
2227 def SetAlphaBuffer(*args, **kwargs):
2228 """SetAlphaBuffer(self, PyObject data)"""
2229 return _core_.Image_SetAlphaBuffer(*args, **kwargs)
2230
2231 def SetMaskColour(*args, **kwargs):
2232 """SetMaskColour(self, unsigned char r, unsigned char g, unsigned char b)"""
2233 return _core_.Image_SetMaskColour(*args, **kwargs)
2234
2235 def GetMaskRed(*args, **kwargs):
2236 """GetMaskRed(self) -> unsigned char"""
2237 return _core_.Image_GetMaskRed(*args, **kwargs)
2238
2239 def GetMaskGreen(*args, **kwargs):
2240 """GetMaskGreen(self) -> unsigned char"""
2241 return _core_.Image_GetMaskGreen(*args, **kwargs)
2242
2243 def GetMaskBlue(*args, **kwargs):
2244 """GetMaskBlue(self) -> unsigned char"""
2245 return _core_.Image_GetMaskBlue(*args, **kwargs)
2246
2247 def SetMask(*args, **kwargs):
2248 """SetMask(self, bool mask=True)"""
2249 return _core_.Image_SetMask(*args, **kwargs)
2250
2251 def HasMask(*args, **kwargs):
2252 """HasMask(self) -> bool"""
2253 return _core_.Image_HasMask(*args, **kwargs)
2254
2255 def Rotate(*args, **kwargs):
2256 """
2257 Rotate(self, double angle, Point centre_of_rotation, bool interpolating=True,
2258 Point offset_after_rotation=None) -> Image
2259 """
2260 return _core_.Image_Rotate(*args, **kwargs)
2261
2262 def Rotate90(*args, **kwargs):
2263 """Rotate90(self, bool clockwise=True) -> Image"""
2264 return _core_.Image_Rotate90(*args, **kwargs)
2265
2266 def Mirror(*args, **kwargs):
2267 """Mirror(self, bool horizontally=True) -> Image"""
2268 return _core_.Image_Mirror(*args, **kwargs)
2269
2270 def Replace(*args, **kwargs):
2271 """
2272 Replace(self, unsigned char r1, unsigned char g1, unsigned char b1,
2273 unsigned char r2, unsigned char g2, unsigned char b2)
2274 """
2275 return _core_.Image_Replace(*args, **kwargs)
2276
2277 def ConvertToMono(*args, **kwargs):
2278 """ConvertToMono(self, unsigned char r, unsigned char g, unsigned char b) -> Image"""
2279 return _core_.Image_ConvertToMono(*args, **kwargs)
2280
2281 def SetOption(*args, **kwargs):
2282 """SetOption(self, String name, String value)"""
2283 return _core_.Image_SetOption(*args, **kwargs)
2284
2285 def SetOptionInt(*args, **kwargs):
2286 """SetOptionInt(self, String name, int value)"""
2287 return _core_.Image_SetOptionInt(*args, **kwargs)
2288
2289 def GetOption(*args, **kwargs):
2290 """GetOption(self, String name) -> String"""
2291 return _core_.Image_GetOption(*args, **kwargs)
2292
2293 def GetOptionInt(*args, **kwargs):
2294 """GetOptionInt(self, String name) -> int"""
2295 return _core_.Image_GetOptionInt(*args, **kwargs)
2296
2297 def HasOption(*args, **kwargs):
2298 """HasOption(self, String name) -> bool"""
2299 return _core_.Image_HasOption(*args, **kwargs)
2300
2301 def CountColours(*args, **kwargs):
2302 """CountColours(self, unsigned long stopafter=(unsigned long) -1) -> unsigned long"""
2303 return _core_.Image_CountColours(*args, **kwargs)
2304
2305 def ComputeHistogram(*args, **kwargs):
2306 """ComputeHistogram(self, ImageHistogram h) -> unsigned long"""
2307 return _core_.Image_ComputeHistogram(*args, **kwargs)
2308
2309 def AddHandler(*args, **kwargs):
2310 """AddHandler(ImageHandler handler)"""
2311 return _core_.Image_AddHandler(*args, **kwargs)
2312
2313 AddHandler = staticmethod(AddHandler)
2314 def InsertHandler(*args, **kwargs):
2315 """InsertHandler(ImageHandler handler)"""
2316 return _core_.Image_InsertHandler(*args, **kwargs)
2317
2318 InsertHandler = staticmethod(InsertHandler)
2319 def RemoveHandler(*args, **kwargs):
2320 """RemoveHandler(String name) -> bool"""
2321 return _core_.Image_RemoveHandler(*args, **kwargs)
2322
2323 RemoveHandler = staticmethod(RemoveHandler)
2324 def GetImageExtWildcard(*args, **kwargs):
2325 """GetImageExtWildcard() -> String"""
2326 return _core_.Image_GetImageExtWildcard(*args, **kwargs)
2327
2328 GetImageExtWildcard = staticmethod(GetImageExtWildcard)
2329 def ConvertToBitmap(*args, **kwargs):
2330 """ConvertToBitmap(self, int depth=-1) -> Bitmap"""
2331 return _core_.Image_ConvertToBitmap(*args, **kwargs)
2332
2333 def ConvertToMonoBitmap(*args, **kwargs):
2334 """ConvertToMonoBitmap(self, unsigned char red, unsigned char green, unsigned char blue) -> Bitmap"""
2335 return _core_.Image_ConvertToMonoBitmap(*args, **kwargs)
2336
2337 def __nonzero__(self): return self.Ok()
2338
2339 class ImagePtr(Image):
2340 def __init__(self, this):
2341 self.this = this
2342 if not hasattr(self,"thisown"): self.thisown = 0
2343 self.__class__ = Image
2344 _core_.Image_swigregister(ImagePtr)
2345
2346 def ImageFromMime(*args, **kwargs):
2347 """ImageFromMime(String name, String mimetype, int index=-1) -> Image"""
2348 val = _core_.new_ImageFromMime(*args, **kwargs)
2349 val.thisown = 1
2350 return val
2351
2352 def ImageFromStream(*args, **kwargs):
2353 """ImageFromStream(InputStream stream, long type=BITMAP_TYPE_ANY, int index=-1) -> Image"""
2354 val = _core_.new_ImageFromStream(*args, **kwargs)
2355 val.thisown = 1
2356 return val
2357
2358 def ImageFromStreamMime(*args, **kwargs):
2359 """ImageFromStreamMime(InputStream stream, String mimetype, int index=-1) -> Image"""
2360 val = _core_.new_ImageFromStreamMime(*args, **kwargs)
2361 val.thisown = 1
2362 return val
2363
2364 def EmptyImage(*args, **kwargs):
2365 """EmptyImage(int width=0, int height=0, bool clear=True) -> Image"""
2366 val = _core_.new_EmptyImage(*args, **kwargs)
2367 val.thisown = 1
2368 return val
2369
2370 def ImageFromBitmap(*args, **kwargs):
2371 """ImageFromBitmap(Bitmap bitmap) -> Image"""
2372 val = _core_.new_ImageFromBitmap(*args, **kwargs)
2373 val.thisown = 1
2374 return val
2375
2376 def ImageFromData(*args, **kwargs):
2377 """ImageFromData(int width, int height, unsigned char data) -> Image"""
2378 val = _core_.new_ImageFromData(*args, **kwargs)
2379 val.thisown = 1
2380 return val
2381
2382 def Image_CanRead(*args, **kwargs):
2383 """Image_CanRead(String name) -> bool"""
2384 return _core_.Image_CanRead(*args, **kwargs)
2385
2386 def Image_GetImageCount(*args, **kwargs):
2387 """Image_GetImageCount(String name, long type=BITMAP_TYPE_ANY) -> int"""
2388 return _core_.Image_GetImageCount(*args, **kwargs)
2389
2390 def Image_CanReadStream(*args, **kwargs):
2391 """Image_CanReadStream(InputStream stream) -> bool"""
2392 return _core_.Image_CanReadStream(*args, **kwargs)
2393
2394 def Image_AddHandler(*args, **kwargs):
2395 """Image_AddHandler(ImageHandler handler)"""
2396 return _core_.Image_AddHandler(*args, **kwargs)
2397
2398 def Image_InsertHandler(*args, **kwargs):
2399 """Image_InsertHandler(ImageHandler handler)"""
2400 return _core_.Image_InsertHandler(*args, **kwargs)
2401
2402 def Image_RemoveHandler(*args, **kwargs):
2403 """Image_RemoveHandler(String name) -> bool"""
2404 return _core_.Image_RemoveHandler(*args, **kwargs)
2405
2406 def Image_GetImageExtWildcard(*args, **kwargs):
2407 """Image_GetImageExtWildcard() -> String"""
2408 return _core_.Image_GetImageExtWildcard(*args, **kwargs)
2409
2410 def InitAllImageHandlers():
2411 """
2412 The former functionality of InitAllImageHanders is now done internal to
2413 the _core_ extension module and so this function has become a simple NOP.
2414 """
2415 pass
2416
2417 IMAGE_RESOLUTION_INCHES = _core_.IMAGE_RESOLUTION_INCHES
2418 IMAGE_RESOLUTION_CM = _core_.IMAGE_RESOLUTION_CM
2419 BMP_24BPP = _core_.BMP_24BPP
2420 BMP_8BPP = _core_.BMP_8BPP
2421 BMP_8BPP_GREY = _core_.BMP_8BPP_GREY
2422 BMP_8BPP_GRAY = _core_.BMP_8BPP_GRAY
2423 BMP_8BPP_RED = _core_.BMP_8BPP_RED
2424 BMP_8BPP_PALETTE = _core_.BMP_8BPP_PALETTE
2425 BMP_4BPP = _core_.BMP_4BPP
2426 BMP_1BPP = _core_.BMP_1BPP
2427 BMP_1BPP_BW = _core_.BMP_1BPP_BW
2428 class BMPHandler(ImageHandler):
2429 def __repr__(self):
2430 return "<%s.%s; proxy of C++ wxBMPHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
2431 def __init__(self, *args, **kwargs):
2432 """__init__(self) -> BMPHandler"""
2433 newobj = _core_.new_BMPHandler(*args, **kwargs)
2434 self.this = newobj.this
2435 self.thisown = 1
2436 del newobj.thisown
2437
2438 class BMPHandlerPtr(BMPHandler):
2439 def __init__(self, this):
2440 self.this = this
2441 if not hasattr(self,"thisown"): self.thisown = 0
2442 self.__class__ = BMPHandler
2443 _core_.BMPHandler_swigregister(BMPHandlerPtr)
2444 NullImage = cvar.NullImage
2445 IMAGE_OPTION_BMP_FORMAT = cvar.IMAGE_OPTION_BMP_FORMAT
2446 IMAGE_OPTION_CUR_HOTSPOT_X = cvar.IMAGE_OPTION_CUR_HOTSPOT_X
2447 IMAGE_OPTION_CUR_HOTSPOT_Y = cvar.IMAGE_OPTION_CUR_HOTSPOT_Y
2448 IMAGE_OPTION_RESOLUTION = cvar.IMAGE_OPTION_RESOLUTION
2449 IMAGE_OPTION_RESOLUTIONUNIT = cvar.IMAGE_OPTION_RESOLUTIONUNIT
2450
2451 class ICOHandler(BMPHandler):
2452 def __repr__(self):
2453 return "<%s.%s; proxy of C++ wxICOHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
2454 def __init__(self, *args, **kwargs):
2455 """__init__(self) -> ICOHandler"""
2456 newobj = _core_.new_ICOHandler(*args, **kwargs)
2457 self.this = newobj.this
2458 self.thisown = 1
2459 del newobj.thisown
2460
2461 class ICOHandlerPtr(ICOHandler):
2462 def __init__(self, this):
2463 self.this = this
2464 if not hasattr(self,"thisown"): self.thisown = 0
2465 self.__class__ = ICOHandler
2466 _core_.ICOHandler_swigregister(ICOHandlerPtr)
2467
2468 class CURHandler(ICOHandler):
2469 def __repr__(self):
2470 return "<%s.%s; proxy of C++ wxCURHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
2471 def __init__(self, *args, **kwargs):
2472 """__init__(self) -> CURHandler"""
2473 newobj = _core_.new_CURHandler(*args, **kwargs)
2474 self.this = newobj.this
2475 self.thisown = 1
2476 del newobj.thisown
2477
2478 class CURHandlerPtr(CURHandler):
2479 def __init__(self, this):
2480 self.this = this
2481 if not hasattr(self,"thisown"): self.thisown = 0
2482 self.__class__ = CURHandler
2483 _core_.CURHandler_swigregister(CURHandlerPtr)
2484
2485 class ANIHandler(CURHandler):
2486 def __repr__(self):
2487 return "<%s.%s; proxy of C++ wxANIHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
2488 def __init__(self, *args, **kwargs):
2489 """__init__(self) -> ANIHandler"""
2490 newobj = _core_.new_ANIHandler(*args, **kwargs)
2491 self.this = newobj.this
2492 self.thisown = 1
2493 del newobj.thisown
2494
2495 class ANIHandlerPtr(ANIHandler):
2496 def __init__(self, this):
2497 self.this = this
2498 if not hasattr(self,"thisown"): self.thisown = 0
2499 self.__class__ = ANIHandler
2500 _core_.ANIHandler_swigregister(ANIHandlerPtr)
2501
2502 class PNGHandler(ImageHandler):
2503 def __repr__(self):
2504 return "<%s.%s; proxy of C++ wxPNGHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
2505 def __init__(self, *args, **kwargs):
2506 """__init__(self) -> PNGHandler"""
2507 newobj = _core_.new_PNGHandler(*args, **kwargs)
2508 self.this = newobj.this
2509 self.thisown = 1
2510 del newobj.thisown
2511
2512 class PNGHandlerPtr(PNGHandler):
2513 def __init__(self, this):
2514 self.this = this
2515 if not hasattr(self,"thisown"): self.thisown = 0
2516 self.__class__ = PNGHandler
2517 _core_.PNGHandler_swigregister(PNGHandlerPtr)
2518
2519 class GIFHandler(ImageHandler):
2520 def __repr__(self):
2521 return "<%s.%s; proxy of C++ wxGIFHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
2522 def __init__(self, *args, **kwargs):
2523 """__init__(self) -> GIFHandler"""
2524 newobj = _core_.new_GIFHandler(*args, **kwargs)
2525 self.this = newobj.this
2526 self.thisown = 1
2527 del newobj.thisown
2528
2529 class GIFHandlerPtr(GIFHandler):
2530 def __init__(self, this):
2531 self.this = this
2532 if not hasattr(self,"thisown"): self.thisown = 0
2533 self.__class__ = GIFHandler
2534 _core_.GIFHandler_swigregister(GIFHandlerPtr)
2535
2536 class PCXHandler(ImageHandler):
2537 def __repr__(self):
2538 return "<%s.%s; proxy of C++ wxPCXHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
2539 def __init__(self, *args, **kwargs):
2540 """__init__(self) -> PCXHandler"""
2541 newobj = _core_.new_PCXHandler(*args, **kwargs)
2542 self.this = newobj.this
2543 self.thisown = 1
2544 del newobj.thisown
2545
2546 class PCXHandlerPtr(PCXHandler):
2547 def __init__(self, this):
2548 self.this = this
2549 if not hasattr(self,"thisown"): self.thisown = 0
2550 self.__class__ = PCXHandler
2551 _core_.PCXHandler_swigregister(PCXHandlerPtr)
2552
2553 class JPEGHandler(ImageHandler):
2554 def __repr__(self):
2555 return "<%s.%s; proxy of C++ wxJPEGHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
2556 def __init__(self, *args, **kwargs):
2557 """__init__(self) -> JPEGHandler"""
2558 newobj = _core_.new_JPEGHandler(*args, **kwargs)
2559 self.this = newobj.this
2560 self.thisown = 1
2561 del newobj.thisown
2562
2563 class JPEGHandlerPtr(JPEGHandler):
2564 def __init__(self, this):
2565 self.this = this
2566 if not hasattr(self,"thisown"): self.thisown = 0
2567 self.__class__ = JPEGHandler
2568 _core_.JPEGHandler_swigregister(JPEGHandlerPtr)
2569
2570 class PNMHandler(ImageHandler):
2571 def __repr__(self):
2572 return "<%s.%s; proxy of C++ wxPNMHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
2573 def __init__(self, *args, **kwargs):
2574 """__init__(self) -> PNMHandler"""
2575 newobj = _core_.new_PNMHandler(*args, **kwargs)
2576 self.this = newobj.this
2577 self.thisown = 1
2578 del newobj.thisown
2579
2580 class PNMHandlerPtr(PNMHandler):
2581 def __init__(self, this):
2582 self.this = this
2583 if not hasattr(self,"thisown"): self.thisown = 0
2584 self.__class__ = PNMHandler
2585 _core_.PNMHandler_swigregister(PNMHandlerPtr)
2586
2587 class XPMHandler(ImageHandler):
2588 def __repr__(self):
2589 return "<%s.%s; proxy of C++ wxXPMHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
2590 def __init__(self, *args, **kwargs):
2591 """__init__(self) -> XPMHandler"""
2592 newobj = _core_.new_XPMHandler(*args, **kwargs)
2593 self.this = newobj.this
2594 self.thisown = 1
2595 del newobj.thisown
2596
2597 class XPMHandlerPtr(XPMHandler):
2598 def __init__(self, this):
2599 self.this = this
2600 if not hasattr(self,"thisown"): self.thisown = 0
2601 self.__class__ = XPMHandler
2602 _core_.XPMHandler_swigregister(XPMHandlerPtr)
2603
2604 class TIFFHandler(ImageHandler):
2605 def __repr__(self):
2606 return "<%s.%s; proxy of C++ wxTIFFHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
2607 def __init__(self, *args, **kwargs):
2608 """__init__(self) -> TIFFHandler"""
2609 newobj = _core_.new_TIFFHandler(*args, **kwargs)
2610 self.this = newobj.this
2611 self.thisown = 1
2612 del newobj.thisown
2613
2614 class TIFFHandlerPtr(TIFFHandler):
2615 def __init__(self, this):
2616 self.this = this
2617 if not hasattr(self,"thisown"): self.thisown = 0
2618 self.__class__ = TIFFHandler
2619 _core_.TIFFHandler_swigregister(TIFFHandlerPtr)
2620
2621 QUANTIZE_INCLUDE_WINDOWS_COLOURS = _core_.QUANTIZE_INCLUDE_WINDOWS_COLOURS
2622 QUANTIZE_FILL_DESTINATION_IMAGE = _core_.QUANTIZE_FILL_DESTINATION_IMAGE
2623 class Quantize(object):
2624 """Performs quantization, or colour reduction, on a wxImage."""
2625 def __init__(self): raise RuntimeError, "No constructor defined"
2626 def __repr__(self):
2627 return "<%s.%s; proxy of C++ wxQuantize instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
2628 def Quantize(*args, **kwargs):
2629 """
2630 Quantize(Image src, Image dest, int desiredNoColours=236, int flags=wxQUANTIZE_INCLUDE_WINDOWS_COLOURS|wxQUANTIZE_FILL_DESTINATION_IMAGE) -> bool
2631
2632 Reduce the colours in the source image and put the result into the
2633 destination image, setting the palette in the destination if
2634 needed. Both images may be the same, to overwrite the source image.
2635 """
2636 return _core_.Quantize_Quantize(*args, **kwargs)
2637
2638 Quantize = staticmethod(Quantize)
2639
2640 class QuantizePtr(Quantize):
2641 def __init__(self, this):
2642 self.this = this
2643 if not hasattr(self,"thisown"): self.thisown = 0
2644 self.__class__ = Quantize
2645 _core_.Quantize_swigregister(QuantizePtr)
2646
2647 def Quantize_Quantize(*args, **kwargs):
2648 """
2649 Quantize_Quantize(Image src, Image dest, int desiredNoColours=236, int flags=wxQUANTIZE_INCLUDE_WINDOWS_COLOURS|wxQUANTIZE_FILL_DESTINATION_IMAGE) -> bool
2650
2651 Reduce the colours in the source image and put the result into the
2652 destination image, setting the palette in the destination if
2653 needed. Both images may be the same, to overwrite the source image.
2654 """
2655 return _core_.Quantize_Quantize(*args, **kwargs)
2656
2657 #---------------------------------------------------------------------------
2658
2659 class EvtHandler(Object):
2660 def __repr__(self):
2661 return "<%s.%s; proxy of C++ wxEvtHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
2662 def __init__(self, *args, **kwargs):
2663 """__init__(self) -> EvtHandler"""
2664 newobj = _core_.new_EvtHandler(*args, **kwargs)
2665 self.this = newobj.this
2666 self.thisown = 1
2667 del newobj.thisown
2668 def GetNextHandler(*args, **kwargs):
2669 """GetNextHandler(self) -> EvtHandler"""
2670 return _core_.EvtHandler_GetNextHandler(*args, **kwargs)
2671
2672 def GetPreviousHandler(*args, **kwargs):
2673 """GetPreviousHandler(self) -> EvtHandler"""
2674 return _core_.EvtHandler_GetPreviousHandler(*args, **kwargs)
2675
2676 def SetNextHandler(*args, **kwargs):
2677 """SetNextHandler(self, EvtHandler handler)"""
2678 return _core_.EvtHandler_SetNextHandler(*args, **kwargs)
2679
2680 def SetPreviousHandler(*args, **kwargs):
2681 """SetPreviousHandler(self, EvtHandler handler)"""
2682 return _core_.EvtHandler_SetPreviousHandler(*args, **kwargs)
2683
2684 def GetEvtHandlerEnabled(*args, **kwargs):
2685 """GetEvtHandlerEnabled(self) -> bool"""
2686 return _core_.EvtHandler_GetEvtHandlerEnabled(*args, **kwargs)
2687
2688 def SetEvtHandlerEnabled(*args, **kwargs):
2689 """SetEvtHandlerEnabled(self, bool enabled)"""
2690 return _core_.EvtHandler_SetEvtHandlerEnabled(*args, **kwargs)
2691
2692 def ProcessEvent(*args, **kwargs):
2693 """ProcessEvent(self, Event event) -> bool"""
2694 return _core_.EvtHandler_ProcessEvent(*args, **kwargs)
2695
2696 def AddPendingEvent(*args, **kwargs):
2697 """AddPendingEvent(self, Event event)"""
2698 return _core_.EvtHandler_AddPendingEvent(*args, **kwargs)
2699
2700 def ProcessPendingEvents(*args, **kwargs):
2701 """ProcessPendingEvents(self)"""
2702 return _core_.EvtHandler_ProcessPendingEvents(*args, **kwargs)
2703
2704 def Connect(*args, **kwargs):
2705 """Connect(self, int id, int lastId, int eventType, PyObject func)"""
2706 return _core_.EvtHandler_Connect(*args, **kwargs)
2707
2708 def Disconnect(*args, **kwargs):
2709 """Disconnect(self, int id, int lastId=-1, wxEventType eventType=wxEVT_NULL) -> bool"""
2710 return _core_.EvtHandler_Disconnect(*args, **kwargs)
2711
2712 def _setOORInfo(*args, **kwargs):
2713 """_setOORInfo(self, PyObject _self)"""
2714 return _core_.EvtHandler__setOORInfo(*args, **kwargs)
2715
2716 def Bind(self, event, handler, source=None, id=wx.ID_ANY, id2=wx.ID_ANY):
2717 """
2718 Bind an event to an event handler.
2719
2720 :param event: One of the EVT_* objects that specifies the
2721 type of event to bind,
2722
2723 :param handler: A callable object to be invoked when the
2724 event is delivered to self. Pass None to
2725 disconnect an event handler.
2726
2727 :param source: Sometimes the event originates from a
2728 different window than self, but you still
2729 want to catch it in self. (For example, a
2730 button event delivered to a frame.) By
2731 passing the source of the event, the event
2732 handling system is able to differentiate
2733 between the same event type from different
2734 controls.
2735
2736 :param id: Used to spcify the event source by ID instead
2737 of instance.
2738
2739 :param id2: Used when it is desirable to bind a handler
2740 to a range of IDs, such as with EVT_MENU_RANGE.
2741 """
2742 if source is not None:
2743 id = source.GetId()
2744 event.Bind(self, id, id2, handler)
2745
2746 def Unbind(self, event, source=None, id=wx.ID_ANY, id2=wx.ID_ANY):
2747 """
2748 Disconencts the event handler binding for event from self.
2749 Returns True if successful.
2750 """
2751 if source is not None:
2752 id = source.GetId()
2753 return event.Unbind(self, id, id2)
2754
2755
2756 class EvtHandlerPtr(EvtHandler):
2757 def __init__(self, this):
2758 self.this = this
2759 if not hasattr(self,"thisown"): self.thisown = 0
2760 self.__class__ = EvtHandler
2761 _core_.EvtHandler_swigregister(EvtHandlerPtr)
2762
2763 #---------------------------------------------------------------------------
2764
2765 class PyEventBinder(object):
2766 """
2767 Instances of this class are used to bind specific events to event
2768 handlers.
2769 """
2770 def __init__(self, evtType, expectedIDs=0):
2771 if expectedIDs not in [0, 1, 2]:
2772 raise ValueError, "Invalid number of expectedIDs"
2773 self.expectedIDs = expectedIDs
2774
2775 if type(evtType) == list or type(evtType) == tuple:
2776 self.evtType = evtType
2777 else:
2778 self.evtType = [evtType]
2779
2780
2781 def Bind(self, target, id1, id2, function):
2782 """Bind this set of event types to target."""
2783 for et in self.evtType:
2784 target.Connect(id1, id2, et, function)
2785
2786
2787 def Unbind(self, target, id1, id2):
2788 """Remove an event binding."""
2789 success = 0
2790 for et in self.evtType:
2791 success += target.Disconnect(id1, id2, et)
2792 return success != 0
2793
2794
2795 def __call__(self, *args):
2796 """
2797 For backwards compatibility with the old EVT_* functions.
2798 Should be called with either (window, func), (window, ID,
2799 func) or (window, ID1, ID2, func) parameters depending on the
2800 type of the event.
2801 """
2802 assert len(args) == 2 + self.expectedIDs
2803 id1 = wx.ID_ANY
2804 id2 = wx.ID_ANY
2805 target = args[0]
2806 if self.expectedIDs == 0:
2807 func = args[1]
2808 elif self.expectedIDs == 1:
2809 id1 = args[1]
2810 func = args[2]
2811 elif self.expectedIDs == 2:
2812 id1 = args[1]
2813 id2 = args[2]
2814 func = args[3]
2815 else:
2816 raise ValueError, "Unexpected number of IDs"
2817
2818 self.Bind(target, id1, id2, func)
2819
2820
2821 # These two are square pegs that don't fit the PyEventBinder hole...
2822 def EVT_COMMAND(win, id, cmd, func):
2823 win.Connect(id, -1, cmd, func)
2824 def EVT_COMMAND_RANGE(win, id1, id2, cmd, func):
2825 win.Connect(id1, id2, cmd, func)
2826
2827
2828 #---------------------------------------------------------------------------
2829
2830 #---------------------------------------------------------------------------
2831
2832 EVENT_PROPAGATE_NONE = _core_.EVENT_PROPAGATE_NONE
2833 EVENT_PROPAGATE_MAX = _core_.EVENT_PROPAGATE_MAX
2834
2835 def NewEventType(*args, **kwargs):
2836 """NewEventType() -> wxEventType"""
2837 return _core_.NewEventType(*args, **kwargs)
2838 wxEVT_NULL = _core_.wxEVT_NULL
2839 wxEVT_FIRST = _core_.wxEVT_FIRST
2840 wxEVT_USER_FIRST = _core_.wxEVT_USER_FIRST
2841 wxEVT_COMMAND_BUTTON_CLICKED = _core_.wxEVT_COMMAND_BUTTON_CLICKED
2842 wxEVT_COMMAND_CHECKBOX_CLICKED = _core_.wxEVT_COMMAND_CHECKBOX_CLICKED
2843 wxEVT_COMMAND_CHOICE_SELECTED = _core_.wxEVT_COMMAND_CHOICE_SELECTED
2844 wxEVT_COMMAND_LISTBOX_SELECTED = _core_.wxEVT_COMMAND_LISTBOX_SELECTED
2845 wxEVT_COMMAND_LISTBOX_DOUBLECLICKED = _core_.wxEVT_COMMAND_LISTBOX_DOUBLECLICKED
2846 wxEVT_COMMAND_CHECKLISTBOX_TOGGLED = _core_.wxEVT_COMMAND_CHECKLISTBOX_TOGGLED
2847 wxEVT_COMMAND_MENU_SELECTED = _core_.wxEVT_COMMAND_MENU_SELECTED
2848 wxEVT_COMMAND_TOOL_CLICKED = _core_.wxEVT_COMMAND_TOOL_CLICKED
2849 wxEVT_COMMAND_SLIDER_UPDATED = _core_.wxEVT_COMMAND_SLIDER_UPDATED
2850 wxEVT_COMMAND_RADIOBOX_SELECTED = _core_.wxEVT_COMMAND_RADIOBOX_SELECTED
2851 wxEVT_COMMAND_RADIOBUTTON_SELECTED = _core_.wxEVT_COMMAND_RADIOBUTTON_SELECTED
2852 wxEVT_COMMAND_SCROLLBAR_UPDATED = _core_.wxEVT_COMMAND_SCROLLBAR_UPDATED
2853 wxEVT_COMMAND_VLBOX_SELECTED = _core_.wxEVT_COMMAND_VLBOX_SELECTED
2854 wxEVT_COMMAND_COMBOBOX_SELECTED = _core_.wxEVT_COMMAND_COMBOBOX_SELECTED
2855 wxEVT_COMMAND_TOOL_RCLICKED = _core_.wxEVT_COMMAND_TOOL_RCLICKED
2856 wxEVT_COMMAND_TOOL_ENTER = _core_.wxEVT_COMMAND_TOOL_ENTER
2857 wxEVT_LEFT_DOWN = _core_.wxEVT_LEFT_DOWN
2858 wxEVT_LEFT_UP = _core_.wxEVT_LEFT_UP
2859 wxEVT_MIDDLE_DOWN = _core_.wxEVT_MIDDLE_DOWN
2860 wxEVT_MIDDLE_UP = _core_.wxEVT_MIDDLE_UP
2861 wxEVT_RIGHT_DOWN = _core_.wxEVT_RIGHT_DOWN
2862 wxEVT_RIGHT_UP = _core_.wxEVT_RIGHT_UP
2863 wxEVT_MOTION = _core_.wxEVT_MOTION
2864 wxEVT_ENTER_WINDOW = _core_.wxEVT_ENTER_WINDOW
2865 wxEVT_LEAVE_WINDOW = _core_.wxEVT_LEAVE_WINDOW
2866 wxEVT_LEFT_DCLICK = _core_.wxEVT_LEFT_DCLICK
2867 wxEVT_MIDDLE_DCLICK = _core_.wxEVT_MIDDLE_DCLICK
2868 wxEVT_RIGHT_DCLICK = _core_.wxEVT_RIGHT_DCLICK
2869 wxEVT_SET_FOCUS = _core_.wxEVT_SET_FOCUS
2870 wxEVT_KILL_FOCUS = _core_.wxEVT_KILL_FOCUS
2871 wxEVT_CHILD_FOCUS = _core_.wxEVT_CHILD_FOCUS
2872 wxEVT_MOUSEWHEEL = _core_.wxEVT_MOUSEWHEEL
2873 wxEVT_NC_LEFT_DOWN = _core_.wxEVT_NC_LEFT_DOWN
2874 wxEVT_NC_LEFT_UP = _core_.wxEVT_NC_LEFT_UP
2875 wxEVT_NC_MIDDLE_DOWN = _core_.wxEVT_NC_MIDDLE_DOWN
2876 wxEVT_NC_MIDDLE_UP = _core_.wxEVT_NC_MIDDLE_UP
2877 wxEVT_NC_RIGHT_DOWN = _core_.wxEVT_NC_RIGHT_DOWN
2878 wxEVT_NC_RIGHT_UP = _core_.wxEVT_NC_RIGHT_UP
2879 wxEVT_NC_MOTION = _core_.wxEVT_NC_MOTION
2880 wxEVT_NC_ENTER_WINDOW = _core_.wxEVT_NC_ENTER_WINDOW
2881 wxEVT_NC_LEAVE_WINDOW = _core_.wxEVT_NC_LEAVE_WINDOW
2882 wxEVT_NC_LEFT_DCLICK = _core_.wxEVT_NC_LEFT_DCLICK
2883 wxEVT_NC_MIDDLE_DCLICK = _core_.wxEVT_NC_MIDDLE_DCLICK
2884 wxEVT_NC_RIGHT_DCLICK = _core_.wxEVT_NC_RIGHT_DCLICK
2885 wxEVT_CHAR = _core_.wxEVT_CHAR
2886 wxEVT_CHAR_HOOK = _core_.wxEVT_CHAR_HOOK
2887 wxEVT_NAVIGATION_KEY = _core_.wxEVT_NAVIGATION_KEY
2888 wxEVT_KEY_DOWN = _core_.wxEVT_KEY_DOWN
2889 wxEVT_KEY_UP = _core_.wxEVT_KEY_UP
2890 wxEVT_HOTKEY = _core_.wxEVT_HOTKEY
2891 wxEVT_SET_CURSOR = _core_.wxEVT_SET_CURSOR
2892 wxEVT_SCROLL_TOP = _core_.wxEVT_SCROLL_TOP
2893 wxEVT_SCROLL_BOTTOM = _core_.wxEVT_SCROLL_BOTTOM
2894 wxEVT_SCROLL_LINEUP = _core_.wxEVT_SCROLL_LINEUP
2895 wxEVT_SCROLL_LINEDOWN = _core_.wxEVT_SCROLL_LINEDOWN
2896 wxEVT_SCROLL_PAGEUP = _core_.wxEVT_SCROLL_PAGEUP
2897 wxEVT_SCROLL_PAGEDOWN = _core_.wxEVT_SCROLL_PAGEDOWN
2898 wxEVT_SCROLL_THUMBTRACK = _core_.wxEVT_SCROLL_THUMBTRACK
2899 wxEVT_SCROLL_THUMBRELEASE = _core_.wxEVT_SCROLL_THUMBRELEASE
2900 wxEVT_SCROLL_ENDSCROLL = _core_.wxEVT_SCROLL_ENDSCROLL
2901 wxEVT_SCROLLWIN_TOP = _core_.wxEVT_SCROLLWIN_TOP
2902 wxEVT_SCROLLWIN_BOTTOM = _core_.wxEVT_SCROLLWIN_BOTTOM
2903 wxEVT_SCROLLWIN_LINEUP = _core_.wxEVT_SCROLLWIN_LINEUP
2904 wxEVT_SCROLLWIN_LINEDOWN = _core_.wxEVT_SCROLLWIN_LINEDOWN
2905 wxEVT_SCROLLWIN_PAGEUP = _core_.wxEVT_SCROLLWIN_PAGEUP
2906 wxEVT_SCROLLWIN_PAGEDOWN = _core_.wxEVT_SCROLLWIN_PAGEDOWN
2907 wxEVT_SCROLLWIN_THUMBTRACK = _core_.wxEVT_SCROLLWIN_THUMBTRACK
2908 wxEVT_SCROLLWIN_THUMBRELEASE = _core_.wxEVT_SCROLLWIN_THUMBRELEASE
2909 wxEVT_SIZE = _core_.wxEVT_SIZE
2910 wxEVT_MOVE = _core_.wxEVT_MOVE
2911 wxEVT_CLOSE_WINDOW = _core_.wxEVT_CLOSE_WINDOW
2912 wxEVT_END_SESSION = _core_.wxEVT_END_SESSION
2913 wxEVT_QUERY_END_SESSION = _core_.wxEVT_QUERY_END_SESSION
2914 wxEVT_ACTIVATE_APP = _core_.wxEVT_ACTIVATE_APP
2915 wxEVT_POWER = _core_.wxEVT_POWER
2916 wxEVT_ACTIVATE = _core_.wxEVT_ACTIVATE
2917 wxEVT_CREATE = _core_.wxEVT_CREATE
2918 wxEVT_DESTROY = _core_.wxEVT_DESTROY
2919 wxEVT_SHOW = _core_.wxEVT_SHOW
2920 wxEVT_ICONIZE = _core_.wxEVT_ICONIZE
2921 wxEVT_MAXIMIZE = _core_.wxEVT_MAXIMIZE
2922 wxEVT_MOUSE_CAPTURE_CHANGED = _core_.wxEVT_MOUSE_CAPTURE_CHANGED
2923 wxEVT_PAINT = _core_.wxEVT_PAINT
2924 wxEVT_ERASE_BACKGROUND = _core_.wxEVT_ERASE_BACKGROUND
2925 wxEVT_NC_PAINT = _core_.wxEVT_NC_PAINT
2926 wxEVT_PAINT_ICON = _core_.wxEVT_PAINT_ICON
2927 wxEVT_MENU_OPEN = _core_.wxEVT_MENU_OPEN
2928 wxEVT_MENU_CLOSE = _core_.wxEVT_MENU_CLOSE
2929 wxEVT_MENU_HIGHLIGHT = _core_.wxEVT_MENU_HIGHLIGHT
2930 wxEVT_CONTEXT_MENU = _core_.wxEVT_CONTEXT_MENU
2931 wxEVT_SYS_COLOUR_CHANGED = _core_.wxEVT_SYS_COLOUR_CHANGED
2932 wxEVT_DISPLAY_CHANGED = _core_.wxEVT_DISPLAY_CHANGED
2933 wxEVT_SETTING_CHANGED = _core_.wxEVT_SETTING_CHANGED
2934 wxEVT_QUERY_NEW_PALETTE = _core_.wxEVT_QUERY_NEW_PALETTE
2935 wxEVT_PALETTE_CHANGED = _core_.wxEVT_PALETTE_CHANGED
2936 wxEVT_DROP_FILES = _core_.wxEVT_DROP_FILES
2937 wxEVT_DRAW_ITEM = _core_.wxEVT_DRAW_ITEM
2938 wxEVT_MEASURE_ITEM = _core_.wxEVT_MEASURE_ITEM
2939 wxEVT_COMPARE_ITEM = _core_.wxEVT_COMPARE_ITEM
2940 wxEVT_INIT_DIALOG = _core_.wxEVT_INIT_DIALOG
2941 wxEVT_IDLE = _core_.wxEVT_IDLE
2942 wxEVT_UPDATE_UI = _core_.wxEVT_UPDATE_UI
2943 wxEVT_SIZING = _core_.wxEVT_SIZING
2944 wxEVT_MOVING = _core_.wxEVT_MOVING
2945 wxEVT_COMMAND_LEFT_CLICK = _core_.wxEVT_COMMAND_LEFT_CLICK
2946 wxEVT_COMMAND_LEFT_DCLICK = _core_.wxEVT_COMMAND_LEFT_DCLICK
2947 wxEVT_COMMAND_RIGHT_CLICK = _core_.wxEVT_COMMAND_RIGHT_CLICK
2948 wxEVT_COMMAND_RIGHT_DCLICK = _core_.wxEVT_COMMAND_RIGHT_DCLICK
2949 wxEVT_COMMAND_SET_FOCUS = _core_.wxEVT_COMMAND_SET_FOCUS
2950 wxEVT_COMMAND_KILL_FOCUS = _core_.wxEVT_COMMAND_KILL_FOCUS
2951 wxEVT_COMMAND_ENTER = _core_.wxEVT_COMMAND_ENTER
2952 #
2953 # Create some event binders
2954 EVT_SIZE = wx.PyEventBinder( wxEVT_SIZE )
2955 EVT_SIZING = wx.PyEventBinder( wxEVT_SIZING )
2956 EVT_MOVE = wx.PyEventBinder( wxEVT_MOVE )
2957 EVT_MOVING = wx.PyEventBinder( wxEVT_MOVING )
2958 EVT_CLOSE = wx.PyEventBinder( wxEVT_CLOSE_WINDOW )
2959 EVT_END_SESSION = wx.PyEventBinder( wxEVT_END_SESSION )
2960 EVT_QUERY_END_SESSION = wx.PyEventBinder( wxEVT_QUERY_END_SESSION )
2961 EVT_PAINT = wx.PyEventBinder( wxEVT_PAINT )
2962 EVT_NC_PAINT = wx.PyEventBinder( wxEVT_NC_PAINT )
2963 EVT_ERASE_BACKGROUND = wx.PyEventBinder( wxEVT_ERASE_BACKGROUND )
2964 EVT_CHAR = wx.PyEventBinder( wxEVT_CHAR )
2965 EVT_KEY_DOWN = wx.PyEventBinder( wxEVT_KEY_DOWN )
2966 EVT_KEY_UP = wx.PyEventBinder( wxEVT_KEY_UP )
2967 EVT_HOTKEY = wx.PyEventBinder( wxEVT_HOTKEY, 1)
2968 EVT_CHAR_HOOK = wx.PyEventBinder( wxEVT_CHAR_HOOK )
2969 EVT_MENU_OPEN = wx.PyEventBinder( wxEVT_MENU_OPEN )
2970 EVT_MENU_CLOSE = wx.PyEventBinder( wxEVT_MENU_CLOSE )
2971 EVT_MENU_HIGHLIGHT = wx.PyEventBinder( wxEVT_MENU_HIGHLIGHT, 1)
2972 EVT_MENU_HIGHLIGHT_ALL = wx.PyEventBinder( wxEVT_MENU_HIGHLIGHT )
2973 EVT_SET_FOCUS = wx.PyEventBinder( wxEVT_SET_FOCUS )
2974 EVT_KILL_FOCUS = wx.PyEventBinder( wxEVT_KILL_FOCUS )
2975 EVT_CHILD_FOCUS = wx.PyEventBinder( wxEVT_CHILD_FOCUS )
2976 EVT_ACTIVATE = wx.PyEventBinder( wxEVT_ACTIVATE )
2977 EVT_ACTIVATE_APP = wx.PyEventBinder( wxEVT_ACTIVATE_APP )
2978 EVT_END_SESSION = wx.PyEventBinder( wxEVT_END_SESSION )
2979 EVT_QUERY_END_SESSION = wx.PyEventBinder( wxEVT_QUERY_END_SESSION )
2980 EVT_DROP_FILES = wx.PyEventBinder( wxEVT_DROP_FILES )
2981 EVT_INIT_DIALOG = wx.PyEventBinder( wxEVT_INIT_DIALOG )
2982 EVT_SYS_COLOUR_CHANGED = wx.PyEventBinder( wxEVT_SYS_COLOUR_CHANGED )
2983 EVT_DISPLAY_CHANGED = wx.PyEventBinder( wxEVT_DISPLAY_CHANGED )
2984 EVT_SHOW = wx.PyEventBinder( wxEVT_SHOW )
2985 EVT_MAXIMIZE = wx.PyEventBinder( wxEVT_MAXIMIZE )
2986 EVT_ICONIZE = wx.PyEventBinder( wxEVT_ICONIZE )
2987 EVT_NAVIGATION_KEY = wx.PyEventBinder( wxEVT_NAVIGATION_KEY )
2988 EVT_PALETTE_CHANGED = wx.PyEventBinder( wxEVT_PALETTE_CHANGED )
2989 EVT_QUERY_NEW_PALETTE = wx.PyEventBinder( wxEVT_QUERY_NEW_PALETTE )
2990 EVT_WINDOW_CREATE = wx.PyEventBinder( wxEVT_CREATE )
2991 EVT_WINDOW_DESTROY = wx.PyEventBinder( wxEVT_DESTROY )
2992 EVT_SET_CURSOR = wx.PyEventBinder( wxEVT_SET_CURSOR )
2993 EVT_MOUSE_CAPTURE_CHANGED = wx.PyEventBinder( wxEVT_MOUSE_CAPTURE_CHANGED )
2994
2995 EVT_LEFT_DOWN = wx.PyEventBinder( wxEVT_LEFT_DOWN )
2996 EVT_LEFT_UP = wx.PyEventBinder( wxEVT_LEFT_UP )
2997 EVT_MIDDLE_DOWN = wx.PyEventBinder( wxEVT_MIDDLE_DOWN )
2998 EVT_MIDDLE_UP = wx.PyEventBinder( wxEVT_MIDDLE_UP )
2999 EVT_RIGHT_DOWN = wx.PyEventBinder( wxEVT_RIGHT_DOWN )
3000 EVT_RIGHT_UP = wx.PyEventBinder( wxEVT_RIGHT_UP )
3001 EVT_MOTION = wx.PyEventBinder( wxEVT_MOTION )
3002 EVT_LEFT_DCLICK = wx.PyEventBinder( wxEVT_LEFT_DCLICK )
3003 EVT_MIDDLE_DCLICK = wx.PyEventBinder( wxEVT_MIDDLE_DCLICK )
3004 EVT_RIGHT_DCLICK = wx.PyEventBinder( wxEVT_RIGHT_DCLICK )
3005 EVT_LEAVE_WINDOW = wx.PyEventBinder( wxEVT_LEAVE_WINDOW )
3006 EVT_ENTER_WINDOW = wx.PyEventBinder( wxEVT_ENTER_WINDOW )
3007 EVT_MOUSEWHEEL = wx.PyEventBinder( wxEVT_MOUSEWHEEL )
3008
3009 EVT_MOUSE_EVENTS = wx.PyEventBinder([ wxEVT_LEFT_DOWN,
3010 wxEVT_LEFT_UP,
3011 wxEVT_MIDDLE_DOWN,
3012 wxEVT_MIDDLE_UP,
3013 wxEVT_RIGHT_DOWN,
3014 wxEVT_RIGHT_UP,
3015 wxEVT_MOTION,
3016 wxEVT_LEFT_DCLICK,
3017 wxEVT_MIDDLE_DCLICK,
3018 wxEVT_RIGHT_DCLICK,
3019 wxEVT_ENTER_WINDOW,
3020 wxEVT_LEAVE_WINDOW,
3021 wxEVT_MOUSEWHEEL
3022 ])
3023
3024
3025 # Scrolling from wxWindow (sent to wxScrolledWindow)
3026 EVT_SCROLLWIN = wx.PyEventBinder([ wxEVT_SCROLLWIN_TOP,
3027 wxEVT_SCROLLWIN_BOTTOM,
3028 wxEVT_SCROLLWIN_LINEUP,
3029 wxEVT_SCROLLWIN_LINEDOWN,
3030 wxEVT_SCROLLWIN_PAGEUP,
3031 wxEVT_SCROLLWIN_PAGEDOWN,
3032 wxEVT_SCROLLWIN_THUMBTRACK,
3033 wxEVT_SCROLLWIN_THUMBRELEASE,
3034 ])
3035
3036 EVT_SCROLLWIN_TOP = wx.PyEventBinder( wxEVT_SCROLLWIN_TOP )
3037 EVT_SCROLLWIN_BOTTOM = wx.PyEventBinder( wxEVT_SCROLLWIN_BOTTOM )
3038 EVT_SCROLLWIN_LINEUP = wx.PyEventBinder( wxEVT_SCROLLWIN_LINEUP )
3039 EVT_SCROLLWIN_LINEDOWN = wx.PyEventBinder( wxEVT_SCROLLWIN_LINEDOWN )
3040 EVT_SCROLLWIN_PAGEUP = wx.PyEventBinder( wxEVT_SCROLLWIN_PAGEUP )
3041 EVT_SCROLLWIN_PAGEDOWN = wx.PyEventBinder( wxEVT_SCROLLWIN_PAGEDOWN )
3042 EVT_SCROLLWIN_THUMBTRACK = wx.PyEventBinder( wxEVT_SCROLLWIN_THUMBTRACK )
3043 EVT_SCROLLWIN_THUMBRELEASE = wx.PyEventBinder( wxEVT_SCROLLWIN_THUMBRELEASE )
3044
3045 # Scrolling from wxSlider and wxScrollBar
3046 EVT_SCROLL = wx.PyEventBinder([ wxEVT_SCROLL_TOP,
3047 wxEVT_SCROLL_BOTTOM,
3048 wxEVT_SCROLL_LINEUP,
3049 wxEVT_SCROLL_LINEDOWN,
3050 wxEVT_SCROLL_PAGEUP,
3051 wxEVT_SCROLL_PAGEDOWN,
3052 wxEVT_SCROLL_THUMBTRACK,
3053 wxEVT_SCROLL_THUMBRELEASE,
3054 wxEVT_SCROLL_ENDSCROLL,
3055 ])
3056
3057 EVT_SCROLL_TOP = wx.PyEventBinder( wxEVT_SCROLL_TOP )
3058 EVT_SCROLL_BOTTOM = wx.PyEventBinder( wxEVT_SCROLL_BOTTOM )
3059 EVT_SCROLL_LINEUP = wx.PyEventBinder( wxEVT_SCROLL_LINEUP )
3060 EVT_SCROLL_LINEDOWN = wx.PyEventBinder( wxEVT_SCROLL_LINEDOWN )
3061 EVT_SCROLL_PAGEUP = wx.PyEventBinder( wxEVT_SCROLL_PAGEUP )
3062 EVT_SCROLL_PAGEDOWN = wx.PyEventBinder( wxEVT_SCROLL_PAGEDOWN )
3063 EVT_SCROLL_THUMBTRACK = wx.PyEventBinder( wxEVT_SCROLL_THUMBTRACK )
3064 EVT_SCROLL_THUMBRELEASE = wx.PyEventBinder( wxEVT_SCROLL_THUMBRELEASE )
3065 EVT_SCROLL_ENDSCROLL = wx.PyEventBinder( wxEVT_SCROLL_ENDSCROLL )
3066
3067 # Scrolling from wxSlider and wxScrollBar, with an id
3068 EVT_COMMAND_SCROLL = wx.PyEventBinder([ wxEVT_SCROLL_TOP,
3069 wxEVT_SCROLL_BOTTOM,
3070 wxEVT_SCROLL_LINEUP,
3071 wxEVT_SCROLL_LINEDOWN,
3072 wxEVT_SCROLL_PAGEUP,
3073 wxEVT_SCROLL_PAGEDOWN,
3074 wxEVT_SCROLL_THUMBTRACK,
3075 wxEVT_SCROLL_THUMBRELEASE,
3076 wxEVT_SCROLL_ENDSCROLL,
3077 ], 1)
3078
3079 EVT_COMMAND_SCROLL_TOP = wx.PyEventBinder( wxEVT_SCROLL_TOP, 1)
3080 EVT_COMMAND_SCROLL_BOTTOM = wx.PyEventBinder( wxEVT_SCROLL_BOTTOM, 1)
3081 EVT_COMMAND_SCROLL_LINEUP = wx.PyEventBinder( wxEVT_SCROLL_LINEUP, 1)
3082 EVT_COMMAND_SCROLL_LINEDOWN = wx.PyEventBinder( wxEVT_SCROLL_LINEDOWN, 1)
3083 EVT_COMMAND_SCROLL_PAGEUP = wx.PyEventBinder( wxEVT_SCROLL_PAGEUP, 1)
3084 EVT_COMMAND_SCROLL_PAGEDOWN = wx.PyEventBinder( wxEVT_SCROLL_PAGEDOWN, 1)
3085 EVT_COMMAND_SCROLL_THUMBTRACK = wx.PyEventBinder( wxEVT_SCROLL_THUMBTRACK, 1)
3086 EVT_COMMAND_SCROLL_THUMBRELEASE = wx.PyEventBinder( wxEVT_SCROLL_THUMBRELEASE, 1)
3087 EVT_COMMAND_SCROLL_ENDSCROLL = wx.PyEventBinder( wxEVT_SCROLL_ENDSCROLL, 1)
3088
3089 EVT_BUTTON = wx.PyEventBinder( wxEVT_COMMAND_BUTTON_CLICKED, 1)
3090 EVT_CHECKBOX = wx.PyEventBinder( wxEVT_COMMAND_CHECKBOX_CLICKED, 1)
3091 EVT_CHOICE = wx.PyEventBinder( wxEVT_COMMAND_CHOICE_SELECTED, 1)
3092 EVT_LISTBOX = wx.PyEventBinder( wxEVT_COMMAND_LISTBOX_SELECTED, 1)
3093 EVT_LISTBOX_DCLICK = wx.PyEventBinder( wxEVT_COMMAND_LISTBOX_DOUBLECLICKED, 1)
3094 EVT_MENU = wx.PyEventBinder( wxEVT_COMMAND_MENU_SELECTED, 1)
3095 EVT_MENU_RANGE = wx.PyEventBinder( wxEVT_COMMAND_MENU_SELECTED, 2)
3096 EVT_SLIDER = wx.PyEventBinder( wxEVT_COMMAND_SLIDER_UPDATED, 1)
3097 EVT_RADIOBOX = wx.PyEventBinder( wxEVT_COMMAND_RADIOBOX_SELECTED, 1)
3098 EVT_RADIOBUTTON = wx.PyEventBinder( wxEVT_COMMAND_RADIOBUTTON_SELECTED, 1)
3099
3100 EVT_SCROLLBAR = wx.PyEventBinder( wxEVT_COMMAND_SCROLLBAR_UPDATED, 1)
3101 EVT_VLBOX = wx.PyEventBinder( wxEVT_COMMAND_VLBOX_SELECTED, 1)
3102 EVT_COMBOBOX = wx.PyEventBinder( wxEVT_COMMAND_COMBOBOX_SELECTED, 1)
3103 EVT_TOOL = wx.PyEventBinder( wxEVT_COMMAND_TOOL_CLICKED, 1)
3104 EVT_TOOL_RANGE = wx.PyEventBinder( wxEVT_COMMAND_TOOL_CLICKED, 2)
3105 EVT_TOOL_RCLICKED = wx.PyEventBinder( wxEVT_COMMAND_TOOL_RCLICKED, 1)
3106 EVT_TOOL_RCLICKED_RANGE = wx.PyEventBinder( wxEVT_COMMAND_TOOL_RCLICKED, 2)
3107 EVT_TOOL_ENTER = wx.PyEventBinder( wxEVT_COMMAND_TOOL_ENTER, 1)
3108 EVT_CHECKLISTBOX = wx.PyEventBinder( wxEVT_COMMAND_CHECKLISTBOX_TOGGLED, 1)
3109
3110
3111 EVT_COMMAND_LEFT_CLICK = wx.PyEventBinder( wxEVT_COMMAND_LEFT_CLICK, 1)
3112 EVT_COMMAND_LEFT_DCLICK = wx.PyEventBinder( wxEVT_COMMAND_LEFT_DCLICK, 1)
3113 EVT_COMMAND_RIGHT_CLICK = wx.PyEventBinder( wxEVT_COMMAND_RIGHT_CLICK, 1)
3114 EVT_COMMAND_RIGHT_DCLICK = wx.PyEventBinder( wxEVT_COMMAND_RIGHT_DCLICK, 1)
3115 EVT_COMMAND_SET_FOCUS = wx.PyEventBinder( wxEVT_COMMAND_SET_FOCUS, 1)
3116 EVT_COMMAND_KILL_FOCUS = wx.PyEventBinder( wxEVT_COMMAND_KILL_FOCUS, 1)
3117 EVT_COMMAND_ENTER = wx.PyEventBinder( wxEVT_COMMAND_ENTER, 1)
3118
3119 EVT_IDLE = wx.PyEventBinder( wxEVT_IDLE )
3120
3121 EVT_UPDATE_UI = wx.PyEventBinder( wxEVT_UPDATE_UI, 1)
3122 EVT_UPDATE_UI_RANGE = wx.PyEventBinder( wxEVT_UPDATE_UI, 2)
3123
3124 EVT_CONTEXT_MENU = wx.PyEventBinder( wxEVT_CONTEXT_MENU )
3125
3126
3127
3128 #---------------------------------------------------------------------------
3129
3130 class Event(Object):
3131 def __init__(self): raise RuntimeError, "No constructor defined"
3132 def __repr__(self):
3133 return "<%s.%s; proxy of C++ wxEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
3134 def __del__(self, destroy=_core_.delete_Event):
3135 """__del__(self)"""
3136 try:
3137 if self.thisown: destroy(self)
3138 except: pass
3139
3140 def SetEventType(*args, **kwargs):
3141 """SetEventType(self, wxEventType typ)"""
3142 return _core_.Event_SetEventType(*args, **kwargs)
3143
3144 def GetEventType(*args, **kwargs):
3145 """GetEventType(self) -> wxEventType"""
3146 return _core_.Event_GetEventType(*args, **kwargs)
3147
3148 def GetEventObject(*args, **kwargs):
3149 """GetEventObject(self) -> Object"""
3150 return _core_.Event_GetEventObject(*args, **kwargs)
3151
3152 def SetEventObject(*args, **kwargs):
3153 """SetEventObject(self, Object obj)"""
3154 return _core_.Event_SetEventObject(*args, **kwargs)
3155
3156 def GetTimestamp(*args, **kwargs):
3157 """GetTimestamp(self) -> long"""
3158 return _core_.Event_GetTimestamp(*args, **kwargs)
3159
3160 def SetTimestamp(*args, **kwargs):
3161 """SetTimestamp(self, long ts=0)"""
3162 return _core_.Event_SetTimestamp(*args, **kwargs)
3163
3164 def GetId(*args, **kwargs):
3165 """GetId(self) -> int"""
3166 return _core_.Event_GetId(*args, **kwargs)
3167
3168 def SetId(*args, **kwargs):
3169 """SetId(self, int Id)"""
3170 return _core_.Event_SetId(*args, **kwargs)
3171
3172 def IsCommandEvent(*args, **kwargs):
3173 """IsCommandEvent(self) -> bool"""
3174 return _core_.Event_IsCommandEvent(*args, **kwargs)
3175
3176 def Skip(*args, **kwargs):
3177 """Skip(self, bool skip=True)"""
3178 return _core_.Event_Skip(*args, **kwargs)
3179
3180 def GetSkipped(*args, **kwargs):
3181 """GetSkipped(self) -> bool"""
3182 return _core_.Event_GetSkipped(*args, **kwargs)
3183
3184 def ShouldPropagate(*args, **kwargs):
3185 """ShouldPropagate(self) -> bool"""
3186 return _core_.Event_ShouldPropagate(*args, **kwargs)
3187
3188 def StopPropagation(*args, **kwargs):
3189 """StopPropagation(self) -> int"""
3190 return _core_.Event_StopPropagation(*args, **kwargs)
3191
3192 def ResumePropagation(*args, **kwargs):
3193 """ResumePropagation(self, int propagationLevel)"""
3194 return _core_.Event_ResumePropagation(*args, **kwargs)
3195
3196 def Clone(*args, **kwargs):
3197 """Clone(self) -> Event"""
3198 return _core_.Event_Clone(*args, **kwargs)
3199
3200
3201 class EventPtr(Event):
3202 def __init__(self, this):
3203 self.this = this
3204 if not hasattr(self,"thisown"): self.thisown = 0
3205 self.__class__ = Event
3206 _core_.Event_swigregister(EventPtr)
3207
3208 #---------------------------------------------------------------------------
3209
3210 class PropagationDisabler(object):
3211 def __repr__(self):
3212 return "<%s.%s; proxy of C++ wxPropagationDisabler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
3213 def __init__(self, *args, **kwargs):
3214 """__init__(self, Event event) -> PropagationDisabler"""
3215 newobj = _core_.new_PropagationDisabler(*args, **kwargs)
3216 self.this = newobj.this
3217 self.thisown = 1
3218 del newobj.thisown
3219 def __del__(self, destroy=_core_.delete_PropagationDisabler):
3220 """__del__(self)"""
3221 try:
3222 if self.thisown: destroy(self)
3223 except: pass
3224
3225
3226 class PropagationDisablerPtr(PropagationDisabler):
3227 def __init__(self, this):
3228 self.this = this
3229 if not hasattr(self,"thisown"): self.thisown = 0
3230 self.__class__ = PropagationDisabler
3231 _core_.PropagationDisabler_swigregister(PropagationDisablerPtr)
3232
3233 class PropagateOnce(object):
3234 def __repr__(self):
3235 return "<%s.%s; proxy of C++ wxPropagateOnce instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
3236 def __init__(self, *args, **kwargs):
3237 """__init__(self, Event event) -> PropagateOnce"""
3238 newobj = _core_.new_PropagateOnce(*args, **kwargs)
3239 self.this = newobj.this
3240 self.thisown = 1
3241 del newobj.thisown
3242 def __del__(self, destroy=_core_.delete_PropagateOnce):
3243 """__del__(self)"""
3244 try:
3245 if self.thisown: destroy(self)
3246 except: pass
3247
3248
3249 class PropagateOncePtr(PropagateOnce):
3250 def __init__(self, this):
3251 self.this = this
3252 if not hasattr(self,"thisown"): self.thisown = 0
3253 self.__class__ = PropagateOnce
3254 _core_.PropagateOnce_swigregister(PropagateOncePtr)
3255
3256 #---------------------------------------------------------------------------
3257
3258 class CommandEvent(Event):
3259 def __repr__(self):
3260 return "<%s.%s; proxy of C++ wxCommandEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
3261 def __init__(self, *args, **kwargs):
3262 """__init__(self, wxEventType commandType=wxEVT_NULL, int winid=0) -> CommandEvent"""
3263 newobj = _core_.new_CommandEvent(*args, **kwargs)
3264 self.this = newobj.this
3265 self.thisown = 1
3266 del newobj.thisown
3267 def GetSelection(*args, **kwargs):
3268 """GetSelection(self) -> int"""
3269 return _core_.CommandEvent_GetSelection(*args, **kwargs)
3270
3271 def SetString(*args, **kwargs):
3272 """SetString(self, String s)"""
3273 return _core_.CommandEvent_SetString(*args, **kwargs)
3274
3275 def GetString(*args, **kwargs):
3276 """GetString(self) -> String"""
3277 return _core_.CommandEvent_GetString(*args, **kwargs)
3278
3279 def IsChecked(*args, **kwargs):
3280 """IsChecked(self) -> bool"""
3281 return _core_.CommandEvent_IsChecked(*args, **kwargs)
3282
3283 Checked = IsChecked
3284 def IsSelection(*args, **kwargs):
3285 """IsSelection(self) -> bool"""
3286 return _core_.CommandEvent_IsSelection(*args, **kwargs)
3287
3288 def SetExtraLong(*args, **kwargs):
3289 """SetExtraLong(self, long extraLong)"""
3290 return _core_.CommandEvent_SetExtraLong(*args, **kwargs)
3291
3292 def GetExtraLong(*args, **kwargs):
3293 """GetExtraLong(self) -> long"""
3294 return _core_.CommandEvent_GetExtraLong(*args, **kwargs)
3295
3296 def SetInt(*args, **kwargs):
3297 """SetInt(self, int i)"""
3298 return _core_.CommandEvent_SetInt(*args, **kwargs)
3299
3300 def GetInt(*args, **kwargs):
3301 """GetInt(self) -> long"""
3302 return _core_.CommandEvent_GetInt(*args, **kwargs)
3303
3304 def Clone(*args, **kwargs):
3305 """Clone(self) -> Event"""
3306 return _core_.CommandEvent_Clone(*args, **kwargs)
3307
3308
3309 class CommandEventPtr(CommandEvent):
3310 def __init__(self, this):
3311 self.this = this
3312 if not hasattr(self,"thisown"): self.thisown = 0
3313 self.__class__ = CommandEvent
3314 _core_.CommandEvent_swigregister(CommandEventPtr)
3315
3316 #---------------------------------------------------------------------------
3317
3318 class NotifyEvent(CommandEvent):
3319 def __repr__(self):
3320 return "<%s.%s; proxy of C++ wxNotifyEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
3321 def __init__(self, *args, **kwargs):
3322 """__init__(self, wxEventType commandType=wxEVT_NULL, int winid=0) -> NotifyEvent"""
3323 newobj = _core_.new_NotifyEvent(*args, **kwargs)
3324 self.this = newobj.this
3325 self.thisown = 1
3326 del newobj.thisown
3327 def Veto(*args, **kwargs):
3328 """Veto(self)"""
3329 return _core_.NotifyEvent_Veto(*args, **kwargs)
3330
3331 def Allow(*args, **kwargs):
3332 """Allow(self)"""
3333 return _core_.NotifyEvent_Allow(*args, **kwargs)
3334
3335 def IsAllowed(*args, **kwargs):
3336 """IsAllowed(self) -> bool"""
3337 return _core_.NotifyEvent_IsAllowed(*args, **kwargs)
3338
3339
3340 class NotifyEventPtr(NotifyEvent):
3341 def __init__(self, this):
3342 self.this = this
3343 if not hasattr(self,"thisown"): self.thisown = 0
3344 self.__class__ = NotifyEvent
3345 _core_.NotifyEvent_swigregister(NotifyEventPtr)
3346
3347 #---------------------------------------------------------------------------
3348
3349 class ScrollEvent(CommandEvent):
3350 def __repr__(self):
3351 return "<%s.%s; proxy of C++ wxScrollEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
3352 def __init__(self, *args, **kwargs):
3353 """
3354 __init__(self, wxEventType commandType=wxEVT_NULL, int winid=0, int pos=0,
3355 int orient=0) -> ScrollEvent
3356 """
3357 newobj = _core_.new_ScrollEvent(*args, **kwargs)
3358 self.this = newobj.this
3359 self.thisown = 1
3360 del newobj.thisown
3361 def GetOrientation(*args, **kwargs):
3362 """GetOrientation(self) -> int"""
3363 return _core_.ScrollEvent_GetOrientation(*args, **kwargs)
3364
3365 def GetPosition(*args, **kwargs):
3366 """GetPosition(self) -> int"""
3367 return _core_.ScrollEvent_GetPosition(*args, **kwargs)
3368
3369 def SetOrientation(*args, **kwargs):
3370 """SetOrientation(self, int orient)"""
3371 return _core_.ScrollEvent_SetOrientation(*args, **kwargs)
3372
3373 def SetPosition(*args, **kwargs):
3374 """SetPosition(self, int pos)"""
3375 return _core_.ScrollEvent_SetPosition(*args, **kwargs)
3376
3377
3378 class ScrollEventPtr(ScrollEvent):
3379 def __init__(self, this):
3380 self.this = this
3381 if not hasattr(self,"thisown"): self.thisown = 0
3382 self.__class__ = ScrollEvent
3383 _core_.ScrollEvent_swigregister(ScrollEventPtr)
3384
3385 #---------------------------------------------------------------------------
3386
3387 class ScrollWinEvent(Event):
3388 def __repr__(self):
3389 return "<%s.%s; proxy of C++ wxScrollWinEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
3390 def __init__(self, *args, **kwargs):
3391 """__init__(self, wxEventType commandType=wxEVT_NULL, int pos=0, int orient=0) -> ScrollWinEvent"""
3392 newobj = _core_.new_ScrollWinEvent(*args, **kwargs)
3393 self.this = newobj.this
3394 self.thisown = 1
3395 del newobj.thisown
3396 def GetOrientation(*args, **kwargs):
3397 """GetOrientation(self) -> int"""
3398 return _core_.ScrollWinEvent_GetOrientation(*args, **kwargs)
3399
3400 def GetPosition(*args, **kwargs):
3401 """GetPosition(self) -> int"""
3402 return _core_.ScrollWinEvent_GetPosition(*args, **kwargs)
3403
3404 def SetOrientation(*args, **kwargs):
3405 """SetOrientation(self, int orient)"""
3406 return _core_.ScrollWinEvent_SetOrientation(*args, **kwargs)
3407
3408 def SetPosition(*args, **kwargs):
3409 """SetPosition(self, int pos)"""
3410 return _core_.ScrollWinEvent_SetPosition(*args, **kwargs)
3411
3412
3413 class ScrollWinEventPtr(ScrollWinEvent):
3414 def __init__(self, this):
3415 self.this = this
3416 if not hasattr(self,"thisown"): self.thisown = 0
3417 self.__class__ = ScrollWinEvent
3418 _core_.ScrollWinEvent_swigregister(ScrollWinEventPtr)
3419
3420 #---------------------------------------------------------------------------
3421
3422 MOUSE_BTN_ANY = _core_.MOUSE_BTN_ANY
3423 MOUSE_BTN_NONE = _core_.MOUSE_BTN_NONE
3424 MOUSE_BTN_LEFT = _core_.MOUSE_BTN_LEFT
3425 MOUSE_BTN_MIDDLE = _core_.MOUSE_BTN_MIDDLE
3426 MOUSE_BTN_RIGHT = _core_.MOUSE_BTN_RIGHT
3427 class MouseEvent(Event):
3428 def __repr__(self):
3429 return "<%s.%s; proxy of C++ wxMouseEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
3430 def __init__(self, *args, **kwargs):
3431 """__init__(self, wxEventType mouseType=wxEVT_NULL) -> MouseEvent"""
3432 newobj = _core_.new_MouseEvent(*args, **kwargs)
3433 self.this = newobj.this
3434 self.thisown = 1
3435 del newobj.thisown
3436 def IsButton(*args, **kwargs):
3437 """IsButton(self) -> bool"""
3438 return _core_.MouseEvent_IsButton(*args, **kwargs)
3439
3440 def ButtonDown(*args, **kwargs):
3441 """ButtonDown(self, int but=MOUSE_BTN_ANY) -> bool"""
3442 return _core_.MouseEvent_ButtonDown(*args, **kwargs)
3443
3444 def ButtonDClick(*args, **kwargs):
3445 """ButtonDClick(self, int but=MOUSE_BTN_ANY) -> bool"""
3446 return _core_.MouseEvent_ButtonDClick(*args, **kwargs)
3447
3448 def ButtonUp(*args, **kwargs):
3449 """ButtonUp(self, int but=MOUSE_BTN_ANY) -> bool"""
3450 return _core_.MouseEvent_ButtonUp(*args, **kwargs)
3451
3452 def Button(*args, **kwargs):
3453 """Button(self, int but) -> bool"""
3454 return _core_.MouseEvent_Button(*args, **kwargs)
3455
3456 def ButtonIsDown(*args, **kwargs):
3457 """ButtonIsDown(self, int but) -> bool"""
3458 return _core_.MouseEvent_ButtonIsDown(*args, **kwargs)
3459
3460 def GetButton(*args, **kwargs):
3461 """GetButton(self) -> int"""
3462 return _core_.MouseEvent_GetButton(*args, **kwargs)
3463
3464 def ControlDown(*args, **kwargs):
3465 """ControlDown(self) -> bool"""
3466 return _core_.MouseEvent_ControlDown(*args, **kwargs)
3467
3468 def MetaDown(*args, **kwargs):
3469 """MetaDown(self) -> bool"""
3470 return _core_.MouseEvent_MetaDown(*args, **kwargs)
3471
3472 def AltDown(*args, **kwargs):
3473 """AltDown(self) -> bool"""
3474 return _core_.MouseEvent_AltDown(*args, **kwargs)
3475
3476 def ShiftDown(*args, **kwargs):
3477 """ShiftDown(self) -> bool"""
3478 return _core_.MouseEvent_ShiftDown(*args, **kwargs)
3479
3480 def CmdDown(*args, **kwargs):
3481 """
3482 CmdDown(self) -> bool
3483
3484 "Cmd" is a pseudo key which is the same as Control for PC and Unix
3485 platforms but the special "Apple" (a.k.a as "Command") key on
3486 Macs: it makes often sense to use it instead of, say, `ControlDown`
3487 because Cmd key is used for the same thing under Mac as Ctrl
3488 elsewhere. The Ctrl still exists, it's just not used for this
3489 purpose. So for non-Mac platforms this is the same as `ControlDown`
3490 and Macs this is the same as `MetaDown`.
3491 """
3492 return _core_.MouseEvent_CmdDown(*args, **kwargs)
3493
3494 def LeftDown(*args, **kwargs):
3495 """LeftDown(self) -> bool"""
3496 return _core_.MouseEvent_LeftDown(*args, **kwargs)
3497
3498 def MiddleDown(*args, **kwargs):
3499 """MiddleDown(self) -> bool"""
3500 return _core_.MouseEvent_MiddleDown(*args, **kwargs)
3501
3502 def RightDown(*args, **kwargs):
3503 """RightDown(self) -> bool"""
3504 return _core_.MouseEvent_RightDown(*args, **kwargs)
3505
3506 def LeftUp(*args, **kwargs):
3507 """LeftUp(self) -> bool"""
3508 return _core_.MouseEvent_LeftUp(*args, **kwargs)
3509
3510 def MiddleUp(*args, **kwargs):
3511 """MiddleUp(self) -> bool"""
3512 return _core_.MouseEvent_MiddleUp(*args, **kwargs)
3513
3514 def RightUp(*args, **kwargs):
3515 """RightUp(self) -> bool"""
3516 return _core_.MouseEvent_RightUp(*args, **kwargs)
3517
3518 def LeftDClick(*args, **kwargs):
3519 """LeftDClick(self) -> bool"""
3520 return _core_.MouseEvent_LeftDClick(*args, **kwargs)
3521
3522 def MiddleDClick(*args, **kwargs):
3523 """MiddleDClick(self) -> bool"""
3524 return _core_.MouseEvent_MiddleDClick(*args, **kwargs)
3525
3526 def RightDClick(*args, **kwargs):
3527 """RightDClick(self) -> bool"""
3528 return _core_.MouseEvent_RightDClick(*args, **kwargs)
3529
3530 def LeftIsDown(*args, **kwargs):
3531 """LeftIsDown(self) -> bool"""
3532 return _core_.MouseEvent_LeftIsDown(*args, **kwargs)
3533
3534 def MiddleIsDown(*args, **kwargs):
3535 """MiddleIsDown(self) -> bool"""
3536 return _core_.MouseEvent_MiddleIsDown(*args, **kwargs)
3537
3538 def RightIsDown(*args, **kwargs):
3539 """RightIsDown(self) -> bool"""
3540 return _core_.MouseEvent_RightIsDown(*args, **kwargs)
3541
3542 def Dragging(*args, **kwargs):
3543 """Dragging(self) -> bool"""
3544 return _core_.MouseEvent_Dragging(*args, **kwargs)
3545
3546 def Moving(*args, **kwargs):
3547 """Moving(self) -> bool"""
3548 return _core_.MouseEvent_Moving(*args, **kwargs)
3549
3550 def Entering(*args, **kwargs):
3551 """Entering(self) -> bool"""
3552 return _core_.MouseEvent_Entering(*args, **kwargs)
3553
3554 def Leaving(*args, **kwargs):
3555 """Leaving(self) -> bool"""
3556 return _core_.MouseEvent_Leaving(*args, **kwargs)
3557
3558 def GetPosition(*args, **kwargs):
3559 """
3560 GetPosition(self) -> Point
3561
3562 Returns the position of the mouse in window coordinates when the event
3563 happened.
3564 """
3565 return _core_.MouseEvent_GetPosition(*args, **kwargs)
3566
3567 def GetPositionTuple(*args, **kwargs):
3568 """
3569 GetPositionTuple() -> (x,y)
3570
3571 Returns the position of the mouse in window coordinates when the event
3572 happened.
3573 """
3574 return _core_.MouseEvent_GetPositionTuple(*args, **kwargs)
3575
3576 def GetLogicalPosition(*args, **kwargs):
3577 """GetLogicalPosition(self, DC dc) -> Point"""
3578 return _core_.MouseEvent_GetLogicalPosition(*args, **kwargs)
3579
3580 def GetX(*args, **kwargs):
3581 """GetX(self) -> int"""
3582 return _core_.MouseEvent_GetX(*args, **kwargs)
3583
3584 def GetY(*args, **kwargs):
3585 """GetY(self) -> int"""
3586 return _core_.MouseEvent_GetY(*args, **kwargs)
3587
3588 def GetWheelRotation(*args, **kwargs):
3589 """GetWheelRotation(self) -> int"""
3590 return _core_.MouseEvent_GetWheelRotation(*args, **kwargs)
3591
3592 def GetWheelDelta(*args, **kwargs):
3593 """GetWheelDelta(self) -> int"""
3594 return _core_.MouseEvent_GetWheelDelta(*args, **kwargs)
3595
3596 def GetLinesPerAction(*args, **kwargs):
3597 """GetLinesPerAction(self) -> int"""
3598 return _core_.MouseEvent_GetLinesPerAction(*args, **kwargs)
3599
3600 def IsPageScroll(*args, **kwargs):
3601 """IsPageScroll(self) -> bool"""
3602 return _core_.MouseEvent_IsPageScroll(*args, **kwargs)
3603
3604 m_x = property(_core_.MouseEvent_m_x_get, _core_.MouseEvent_m_x_set)
3605 m_y = property(_core_.MouseEvent_m_y_get, _core_.MouseEvent_m_y_set)
3606 m_leftDown = property(_core_.MouseEvent_m_leftDown_get, _core_.MouseEvent_m_leftDown_set)
3607 m_middleDown = property(_core_.MouseEvent_m_middleDown_get, _core_.MouseEvent_m_middleDown_set)
3608 m_rightDown = property(_core_.MouseEvent_m_rightDown_get, _core_.MouseEvent_m_rightDown_set)
3609 m_controlDown = property(_core_.MouseEvent_m_controlDown_get, _core_.MouseEvent_m_controlDown_set)
3610 m_shiftDown = property(_core_.MouseEvent_m_shiftDown_get, _core_.MouseEvent_m_shiftDown_set)
3611 m_altDown = property(_core_.MouseEvent_m_altDown_get, _core_.MouseEvent_m_altDown_set)
3612 m_metaDown = property(_core_.MouseEvent_m_metaDown_get, _core_.MouseEvent_m_metaDown_set)
3613 m_wheelRotation = property(_core_.MouseEvent_m_wheelRotation_get, _core_.MouseEvent_m_wheelRotation_set)
3614 m_wheelDelta = property(_core_.MouseEvent_m_wheelDelta_get, _core_.MouseEvent_m_wheelDelta_set)
3615 m_linesPerAction = property(_core_.MouseEvent_m_linesPerAction_get, _core_.MouseEvent_m_linesPerAction_set)
3616
3617 class MouseEventPtr(MouseEvent):
3618 def __init__(self, this):
3619 self.this = this
3620 if not hasattr(self,"thisown"): self.thisown = 0
3621 self.__class__ = MouseEvent
3622 _core_.MouseEvent_swigregister(MouseEventPtr)
3623
3624 #---------------------------------------------------------------------------
3625
3626 class SetCursorEvent(Event):
3627 def __repr__(self):
3628 return "<%s.%s; proxy of C++ wxSetCursorEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
3629 def __init__(self, *args, **kwargs):
3630 """__init__(self, int x=0, int y=0) -> SetCursorEvent"""
3631 newobj = _core_.new_SetCursorEvent(*args, **kwargs)
3632 self.this = newobj.this
3633 self.thisown = 1
3634 del newobj.thisown
3635 def GetX(*args, **kwargs):
3636 """GetX(self) -> int"""
3637 return _core_.SetCursorEvent_GetX(*args, **kwargs)
3638
3639 def GetY(*args, **kwargs):
3640 """GetY(self) -> int"""
3641 return _core_.SetCursorEvent_GetY(*args, **kwargs)
3642
3643 def SetCursor(*args, **kwargs):
3644 """SetCursor(self, Cursor cursor)"""
3645 return _core_.SetCursorEvent_SetCursor(*args, **kwargs)
3646
3647 def GetCursor(*args, **kwargs):
3648 """GetCursor(self) -> Cursor"""
3649 return _core_.SetCursorEvent_GetCursor(*args, **kwargs)
3650
3651 def HasCursor(*args, **kwargs):
3652 """HasCursor(self) -> bool"""
3653 return _core_.SetCursorEvent_HasCursor(*args, **kwargs)
3654
3655
3656 class SetCursorEventPtr(SetCursorEvent):
3657 def __init__(self, this):
3658 self.this = this
3659 if not hasattr(self,"thisown"): self.thisown = 0
3660 self.__class__ = SetCursorEvent
3661 _core_.SetCursorEvent_swigregister(SetCursorEventPtr)
3662
3663 #---------------------------------------------------------------------------
3664
3665 class KeyEvent(Event):
3666 def __repr__(self):
3667 return "<%s.%s; proxy of C++ wxKeyEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
3668 def __init__(self, *args, **kwargs):
3669 """__init__(self, wxEventType keyType=wxEVT_NULL) -> KeyEvent"""
3670 newobj = _core_.new_KeyEvent(*args, **kwargs)
3671 self.this = newobj.this
3672 self.thisown = 1
3673 del newobj.thisown
3674 def ControlDown(*args, **kwargs):
3675 """ControlDown(self) -> bool"""
3676 return _core_.KeyEvent_ControlDown(*args, **kwargs)
3677
3678 def MetaDown(*args, **kwargs):
3679 """MetaDown(self) -> bool"""
3680 return _core_.KeyEvent_MetaDown(*args, **kwargs)
3681
3682 def AltDown(*args, **kwargs):
3683 """AltDown(self) -> bool"""
3684 return _core_.KeyEvent_AltDown(*args, **kwargs)
3685
3686 def ShiftDown(*args, **kwargs):
3687 """ShiftDown(self) -> bool"""
3688 return _core_.KeyEvent_ShiftDown(*args, **kwargs)
3689
3690 def CmdDown(*args, **kwargs):
3691 """
3692 CmdDown(self) -> bool
3693
3694 "Cmd" is a pseudo key which is the same as Control for PC and Unix
3695 platforms but the special "Apple" (a.k.a as "Command") key on
3696 Macs: it makes often sense to use it instead of, say, `ControlDown`
3697 because Cmd key is used for the same thing under Mac as Ctrl
3698 elsewhere. The Ctrl still exists, it's just not used for this
3699 purpose. So for non-Mac platforms this is the same as `ControlDown`
3700 and Macs this is the same as `MetaDown`.
3701 """
3702 return _core_.KeyEvent_CmdDown(*args, **kwargs)
3703
3704 def HasModifiers(*args, **kwargs):
3705 """HasModifiers(self) -> bool"""
3706 return _core_.KeyEvent_HasModifiers(*args, **kwargs)
3707
3708 def GetKeyCode(*args, **kwargs):
3709 """GetKeyCode(self) -> int"""
3710 return _core_.KeyEvent_GetKeyCode(*args, **kwargs)
3711
3712 KeyCode = GetKeyCode
3713 def GetUnicodeKey(*args, **kwargs):
3714 """GetUnicodeKey(self) -> int"""
3715 return _core_.KeyEvent_GetUnicodeKey(*args, **kwargs)
3716
3717 GetUniChar = GetUnicodeKey
3718 def GetRawKeyCode(*args, **kwargs):
3719 """GetRawKeyCode(self) -> unsigned int"""
3720 return _core_.KeyEvent_GetRawKeyCode(*args, **kwargs)
3721
3722 def GetRawKeyFlags(*args, **kwargs):
3723 """GetRawKeyFlags(self) -> unsigned int"""
3724 return _core_.KeyEvent_GetRawKeyFlags(*args, **kwargs)
3725
3726 def GetPosition(*args, **kwargs):
3727 """
3728 GetPosition(self) -> Point
3729
3730 Find the position of the event.
3731 """
3732 return _core_.KeyEvent_GetPosition(*args, **kwargs)
3733
3734 def GetPositionTuple(*args, **kwargs):
3735 """
3736 GetPositionTuple() -> (x,y)
3737
3738 Find the position of the event.
3739 """
3740 return _core_.KeyEvent_GetPositionTuple(*args, **kwargs)
3741
3742 def GetX(*args, **kwargs):
3743 """GetX(self) -> int"""
3744 return _core_.KeyEvent_GetX(*args, **kwargs)
3745
3746 def GetY(*args, **kwargs):
3747 """GetY(self) -> int"""
3748 return _core_.KeyEvent_GetY(*args, **kwargs)
3749
3750 m_x = property(_core_.KeyEvent_m_x_get, _core_.KeyEvent_m_x_set)
3751 m_y = property(_core_.KeyEvent_m_y_get, _core_.KeyEvent_m_y_set)
3752 m_keyCode = property(_core_.KeyEvent_m_keyCode_get, _core_.KeyEvent_m_keyCode_set)
3753 m_controlDown = property(_core_.KeyEvent_m_controlDown_get, _core_.KeyEvent_m_controlDown_set)
3754 m_shiftDown = property(_core_.KeyEvent_m_shiftDown_get, _core_.KeyEvent_m_shiftDown_set)
3755 m_altDown = property(_core_.KeyEvent_m_altDown_get, _core_.KeyEvent_m_altDown_set)
3756 m_metaDown = property(_core_.KeyEvent_m_metaDown_get, _core_.KeyEvent_m_metaDown_set)
3757 m_scanCode = property(_core_.KeyEvent_m_scanCode_get, _core_.KeyEvent_m_scanCode_set)
3758 m_rawCode = property(_core_.KeyEvent_m_rawCode_get, _core_.KeyEvent_m_rawCode_set)
3759 m_rawFlags = property(_core_.KeyEvent_m_rawFlags_get, _core_.KeyEvent_m_rawFlags_set)
3760
3761 class KeyEventPtr(KeyEvent):
3762 def __init__(self, this):
3763 self.this = this
3764 if not hasattr(self,"thisown"): self.thisown = 0
3765 self.__class__ = KeyEvent
3766 _core_.KeyEvent_swigregister(KeyEventPtr)
3767
3768 #---------------------------------------------------------------------------
3769
3770 class SizeEvent(Event):
3771 def __repr__(self):
3772 return "<%s.%s; proxy of C++ wxSizeEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
3773 def __init__(self, *args, **kwargs):
3774 """__init__(self, Size sz=DefaultSize, int winid=0) -> SizeEvent"""
3775 newobj = _core_.new_SizeEvent(*args, **kwargs)
3776 self.this = newobj.this
3777 self.thisown = 1
3778 del newobj.thisown
3779 def GetSize(*args, **kwargs):
3780 """GetSize(self) -> Size"""
3781 return _core_.SizeEvent_GetSize(*args, **kwargs)
3782
3783 def GetRect(*args, **kwargs):
3784 """GetRect(self) -> Rect"""
3785 return _core_.SizeEvent_GetRect(*args, **kwargs)
3786
3787 def SetRect(*args, **kwargs):
3788 """SetRect(self, Rect rect)"""
3789 return _core_.SizeEvent_SetRect(*args, **kwargs)
3790
3791 def SetSize(*args, **kwargs):
3792 """SetSize(self, Size size)"""
3793 return _core_.SizeEvent_SetSize(*args, **kwargs)
3794
3795 m_size = property(_core_.SizeEvent_m_size_get, _core_.SizeEvent_m_size_set)
3796 m_rect = property(_core_.SizeEvent_m_rect_get, _core_.SizeEvent_m_rect_set)
3797
3798 class SizeEventPtr(SizeEvent):
3799 def __init__(self, this):
3800 self.this = this
3801 if not hasattr(self,"thisown"): self.thisown = 0
3802 self.__class__ = SizeEvent
3803 _core_.SizeEvent_swigregister(SizeEventPtr)
3804
3805 #---------------------------------------------------------------------------
3806
3807 class MoveEvent(Event):
3808 def __repr__(self):
3809 return "<%s.%s; proxy of C++ wxMoveEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
3810 def __init__(self, *args, **kwargs):
3811 """__init__(self, Point pos=DefaultPosition, int winid=0) -> MoveEvent"""
3812 newobj = _core_.new_MoveEvent(*args, **kwargs)
3813 self.this = newobj.this
3814 self.thisown = 1
3815 del newobj.thisown
3816 def GetPosition(*args, **kwargs):
3817 """GetPosition(self) -> Point"""
3818 return _core_.MoveEvent_GetPosition(*args, **kwargs)
3819
3820 def GetRect(*args, **kwargs):
3821 """GetRect(self) -> Rect"""
3822 return _core_.MoveEvent_GetRect(*args, **kwargs)
3823
3824 def SetRect(*args, **kwargs):
3825 """SetRect(self, Rect rect)"""
3826 return _core_.MoveEvent_SetRect(*args, **kwargs)
3827
3828 def SetPosition(*args, **kwargs):
3829 """SetPosition(self, Point pos)"""
3830 return _core_.MoveEvent_SetPosition(*args, **kwargs)
3831
3832 m_pos = property(_core_.MoveEvent_m_pos_get, _core_.MoveEvent_m_pos_set)
3833 m_rect = property(_core_.MoveEvent_m_rect_get, _core_.MoveEvent_m_rect_set)
3834
3835 class MoveEventPtr(MoveEvent):
3836 def __init__(self, this):
3837 self.this = this
3838 if not hasattr(self,"thisown"): self.thisown = 0
3839 self.__class__ = MoveEvent
3840 _core_.MoveEvent_swigregister(MoveEventPtr)
3841
3842 #---------------------------------------------------------------------------
3843
3844 class PaintEvent(Event):
3845 def __repr__(self):
3846 return "<%s.%s; proxy of C++ wxPaintEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
3847 def __init__(self, *args, **kwargs):
3848 """__init__(self, int Id=0) -> PaintEvent"""
3849 newobj = _core_.new_PaintEvent(*args, **kwargs)
3850 self.this = newobj.this
3851 self.thisown = 1
3852 del newobj.thisown
3853
3854 class PaintEventPtr(PaintEvent):
3855 def __init__(self, this):
3856 self.this = this
3857 if not hasattr(self,"thisown"): self.thisown = 0
3858 self.__class__ = PaintEvent
3859 _core_.PaintEvent_swigregister(PaintEventPtr)
3860
3861 class NcPaintEvent(Event):
3862 def __repr__(self):
3863 return "<%s.%s; proxy of C++ wxNcPaintEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
3864 def __init__(self, *args, **kwargs):
3865 """__init__(self, int winid=0) -> NcPaintEvent"""
3866 newobj = _core_.new_NcPaintEvent(*args, **kwargs)
3867 self.this = newobj.this
3868 self.thisown = 1
3869 del newobj.thisown
3870
3871 class NcPaintEventPtr(NcPaintEvent):
3872 def __init__(self, this):
3873 self.this = this
3874 if not hasattr(self,"thisown"): self.thisown = 0
3875 self.__class__ = NcPaintEvent
3876 _core_.NcPaintEvent_swigregister(NcPaintEventPtr)
3877
3878 #---------------------------------------------------------------------------
3879
3880 class EraseEvent(Event):
3881 def __repr__(self):
3882 return "<%s.%s; proxy of C++ wxEraseEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
3883 def __init__(self, *args, **kwargs):
3884 """__init__(self, int Id=0, DC dc=(wxDC *) NULL) -> EraseEvent"""
3885 newobj = _core_.new_EraseEvent(*args, **kwargs)
3886 self.this = newobj.this
3887 self.thisown = 1
3888 del newobj.thisown
3889 def GetDC(*args, **kwargs):
3890 """GetDC(self) -> DC"""
3891 return _core_.EraseEvent_GetDC(*args, **kwargs)
3892
3893
3894 class EraseEventPtr(EraseEvent):
3895 def __init__(self, this):
3896 self.this = this
3897 if not hasattr(self,"thisown"): self.thisown = 0
3898 self.__class__ = EraseEvent
3899 _core_.EraseEvent_swigregister(EraseEventPtr)
3900
3901 #---------------------------------------------------------------------------
3902
3903 class FocusEvent(Event):
3904 def __repr__(self):
3905 return "<%s.%s; proxy of C++ wxFocusEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
3906 def __init__(self, *args, **kwargs):
3907 """__init__(self, wxEventType type=wxEVT_NULL, int winid=0) -> FocusEvent"""
3908 newobj = _core_.new_FocusEvent(*args, **kwargs)
3909 self.this = newobj.this
3910 self.thisown = 1
3911 del newobj.thisown
3912 def GetWindow(*args, **kwargs):
3913 """GetWindow(self) -> Window"""
3914 return _core_.FocusEvent_GetWindow(*args, **kwargs)
3915
3916 def SetWindow(*args, **kwargs):
3917 """SetWindow(self, Window win)"""
3918 return _core_.FocusEvent_SetWindow(*args, **kwargs)
3919
3920
3921 class FocusEventPtr(FocusEvent):
3922 def __init__(self, this):
3923 self.this = this
3924 if not hasattr(self,"thisown"): self.thisown = 0
3925 self.__class__ = FocusEvent
3926 _core_.FocusEvent_swigregister(FocusEventPtr)
3927
3928 #---------------------------------------------------------------------------
3929
3930 class ChildFocusEvent(CommandEvent):
3931 def __repr__(self):
3932 return "<%s.%s; proxy of C++ wxChildFocusEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
3933 def __init__(self, *args, **kwargs):
3934 """__init__(self, Window win=None) -> ChildFocusEvent"""
3935 newobj = _core_.new_ChildFocusEvent(*args, **kwargs)
3936 self.this = newobj.this
3937 self.thisown = 1
3938 del newobj.thisown
3939 def GetWindow(*args, **kwargs):
3940 """GetWindow(self) -> Window"""
3941 return _core_.ChildFocusEvent_GetWindow(*args, **kwargs)
3942
3943
3944 class ChildFocusEventPtr(ChildFocusEvent):
3945 def __init__(self, this):
3946 self.this = this
3947 if not hasattr(self,"thisown"): self.thisown = 0
3948 self.__class__ = ChildFocusEvent
3949 _core_.ChildFocusEvent_swigregister(ChildFocusEventPtr)
3950
3951 #---------------------------------------------------------------------------
3952
3953 class ActivateEvent(Event):
3954 def __repr__(self):
3955 return "<%s.%s; proxy of C++ wxActivateEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
3956 def __init__(self, *args, **kwargs):
3957 """__init__(self, wxEventType type=wxEVT_NULL, bool active=True, int Id=0) -> ActivateEvent"""
3958 newobj = _core_.new_ActivateEvent(*args, **kwargs)
3959 self.this = newobj.this
3960 self.thisown = 1
3961 del newobj.thisown
3962 def GetActive(*args, **kwargs):
3963 """GetActive(self) -> bool"""
3964 return _core_.ActivateEvent_GetActive(*args, **kwargs)
3965
3966
3967 class ActivateEventPtr(ActivateEvent):
3968 def __init__(self, this):
3969 self.this = this
3970 if not hasattr(self,"thisown"): self.thisown = 0
3971 self.__class__ = ActivateEvent
3972 _core_.ActivateEvent_swigregister(ActivateEventPtr)
3973
3974 #---------------------------------------------------------------------------
3975
3976 class InitDialogEvent(Event):
3977 def __repr__(self):
3978 return "<%s.%s; proxy of C++ wxInitDialogEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
3979 def __init__(self, *args, **kwargs):
3980 """__init__(self, int Id=0) -> InitDialogEvent"""
3981 newobj = _core_.new_InitDialogEvent(*args, **kwargs)
3982 self.this = newobj.this
3983 self.thisown = 1
3984 del newobj.thisown
3985
3986 class InitDialogEventPtr(InitDialogEvent):
3987 def __init__(self, this):
3988 self.this = this
3989 if not hasattr(self,"thisown"): self.thisown = 0
3990 self.__class__ = InitDialogEvent
3991 _core_.InitDialogEvent_swigregister(InitDialogEventPtr)
3992
3993 #---------------------------------------------------------------------------
3994
3995 class MenuEvent(Event):
3996 def __repr__(self):
3997 return "<%s.%s; proxy of C++ wxMenuEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
3998 def __init__(self, *args, **kwargs):
3999 """__init__(self, wxEventType type=wxEVT_NULL, int winid=0, Menu menu=None) -> MenuEvent"""
4000 newobj = _core_.new_MenuEvent(*args, **kwargs)
4001 self.this = newobj.this
4002 self.thisown = 1
4003 del newobj.thisown
4004 def GetMenuId(*args, **kwargs):
4005 """GetMenuId(self) -> int"""
4006 return _core_.MenuEvent_GetMenuId(*args, **kwargs)
4007
4008 def IsPopup(*args, **kwargs):
4009 """IsPopup(self) -> bool"""
4010 return _core_.MenuEvent_IsPopup(*args, **kwargs)
4011
4012 def GetMenu(*args, **kwargs):
4013 """GetMenu(self) -> Menu"""
4014 return _core_.MenuEvent_GetMenu(*args, **kwargs)
4015
4016
4017 class MenuEventPtr(MenuEvent):
4018 def __init__(self, this):
4019 self.this = this
4020 if not hasattr(self,"thisown"): self.thisown = 0
4021 self.__class__ = MenuEvent
4022 _core_.MenuEvent_swigregister(MenuEventPtr)
4023
4024 #---------------------------------------------------------------------------
4025
4026 class CloseEvent(Event):
4027 def __repr__(self):
4028 return "<%s.%s; proxy of C++ wxCloseEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
4029 def __init__(self, *args, **kwargs):
4030 """__init__(self, wxEventType type=wxEVT_NULL, int winid=0) -> CloseEvent"""
4031 newobj = _core_.new_CloseEvent(*args, **kwargs)
4032 self.this = newobj.this
4033 self.thisown = 1
4034 del newobj.thisown
4035 def SetLoggingOff(*args, **kwargs):
4036 """SetLoggingOff(self, bool logOff)"""
4037 return _core_.CloseEvent_SetLoggingOff(*args, **kwargs)
4038
4039 def GetLoggingOff(*args, **kwargs):
4040 """GetLoggingOff(self) -> bool"""
4041 return _core_.CloseEvent_GetLoggingOff(*args, **kwargs)
4042
4043 def Veto(*args, **kwargs):
4044 """Veto(self, bool veto=True)"""
4045 return _core_.CloseEvent_Veto(*args, **kwargs)
4046
4047 def SetCanVeto(*args, **kwargs):
4048 """SetCanVeto(self, bool canVeto)"""
4049 return _core_.CloseEvent_SetCanVeto(*args, **kwargs)
4050
4051 def CanVeto(*args, **kwargs):
4052 """CanVeto(self) -> bool"""
4053 return _core_.CloseEvent_CanVeto(*args, **kwargs)
4054
4055 def GetVeto(*args, **kwargs):
4056 """GetVeto(self) -> bool"""
4057 return _core_.CloseEvent_GetVeto(*args, **kwargs)
4058
4059
4060 class CloseEventPtr(CloseEvent):
4061 def __init__(self, this):
4062 self.this = this
4063 if not hasattr(self,"thisown"): self.thisown = 0
4064 self.__class__ = CloseEvent
4065 _core_.CloseEvent_swigregister(CloseEventPtr)
4066
4067 #---------------------------------------------------------------------------
4068
4069 class ShowEvent(Event):
4070 def __repr__(self):
4071 return "<%s.%s; proxy of C++ wxShowEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
4072 def __init__(self, *args, **kwargs):
4073 """__init__(self, int winid=0, bool show=False) -> ShowEvent"""
4074 newobj = _core_.new_ShowEvent(*args, **kwargs)
4075 self.this = newobj.this
4076 self.thisown = 1
4077 del newobj.thisown
4078 def SetShow(*args, **kwargs):
4079 """SetShow(self, bool show)"""
4080 return _core_.ShowEvent_SetShow(*args, **kwargs)
4081
4082 def GetShow(*args, **kwargs):
4083 """GetShow(self) -> bool"""
4084 return _core_.ShowEvent_GetShow(*args, **kwargs)
4085
4086
4087 class ShowEventPtr(ShowEvent):
4088 def __init__(self, this):
4089 self.this = this
4090 if not hasattr(self,"thisown"): self.thisown = 0
4091 self.__class__ = ShowEvent
4092 _core_.ShowEvent_swigregister(ShowEventPtr)
4093
4094 #---------------------------------------------------------------------------
4095
4096 class IconizeEvent(Event):
4097 def __repr__(self):
4098 return "<%s.%s; proxy of C++ wxIconizeEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
4099 def __init__(self, *args, **kwargs):
4100 """__init__(self, int id=0, bool iconized=True) -> IconizeEvent"""
4101 newobj = _core_.new_IconizeEvent(*args, **kwargs)
4102 self.this = newobj.this
4103 self.thisown = 1
4104 del newobj.thisown
4105 def Iconized(*args, **kwargs):
4106 """Iconized(self) -> bool"""
4107 return _core_.IconizeEvent_Iconized(*args, **kwargs)
4108
4109
4110 class IconizeEventPtr(IconizeEvent):
4111 def __init__(self, this):
4112 self.this = this
4113 if not hasattr(self,"thisown"): self.thisown = 0
4114 self.__class__ = IconizeEvent
4115 _core_.IconizeEvent_swigregister(IconizeEventPtr)
4116
4117 #---------------------------------------------------------------------------
4118
4119 class MaximizeEvent(Event):
4120 def __repr__(self):
4121 return "<%s.%s; proxy of C++ wxMaximizeEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
4122 def __init__(self, *args, **kwargs):
4123 """__init__(self, int id=0) -> MaximizeEvent"""
4124 newobj = _core_.new_MaximizeEvent(*args, **kwargs)
4125 self.this = newobj.this
4126 self.thisown = 1
4127 del newobj.thisown
4128
4129 class MaximizeEventPtr(MaximizeEvent):
4130 def __init__(self, this):
4131 self.this = this
4132 if not hasattr(self,"thisown"): self.thisown = 0
4133 self.__class__ = MaximizeEvent
4134 _core_.MaximizeEvent_swigregister(MaximizeEventPtr)
4135
4136 #---------------------------------------------------------------------------
4137
4138 class DropFilesEvent(Event):
4139 def __init__(self): raise RuntimeError, "No constructor defined"
4140 def __repr__(self):
4141 return "<%s.%s; proxy of C++ wxDropFilesEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
4142 def GetPosition(*args, **kwargs):
4143 """GetPosition(self) -> Point"""
4144 return _core_.DropFilesEvent_GetPosition(*args, **kwargs)
4145
4146 def GetNumberOfFiles(*args, **kwargs):
4147 """GetNumberOfFiles(self) -> int"""
4148 return _core_.DropFilesEvent_GetNumberOfFiles(*args, **kwargs)
4149
4150 def GetFiles(*args, **kwargs):
4151 """GetFiles(self) -> PyObject"""
4152 return _core_.DropFilesEvent_GetFiles(*args, **kwargs)
4153
4154
4155 class DropFilesEventPtr(DropFilesEvent):
4156 def __init__(self, this):
4157 self.this = this
4158 if not hasattr(self,"thisown"): self.thisown = 0
4159 self.__class__ = DropFilesEvent
4160 _core_.DropFilesEvent_swigregister(DropFilesEventPtr)
4161
4162 #---------------------------------------------------------------------------
4163
4164 UPDATE_UI_PROCESS_ALL = _core_.UPDATE_UI_PROCESS_ALL
4165 UPDATE_UI_PROCESS_SPECIFIED = _core_.UPDATE_UI_PROCESS_SPECIFIED
4166 class UpdateUIEvent(CommandEvent):
4167 def __repr__(self):
4168 return "<%s.%s; proxy of C++ wxUpdateUIEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
4169 def __init__(self, *args, **kwargs):
4170 """__init__(self, int commandId=0) -> UpdateUIEvent"""
4171 newobj = _core_.new_UpdateUIEvent(*args, **kwargs)
4172 self.this = newobj.this
4173 self.thisown = 1
4174 del newobj.thisown
4175 def GetChecked(*args, **kwargs):
4176 """GetChecked(self) -> bool"""
4177 return _core_.UpdateUIEvent_GetChecked(*args, **kwargs)
4178
4179 def GetEnabled(*args, **kwargs):
4180 """GetEnabled(self) -> bool"""
4181 return _core_.UpdateUIEvent_GetEnabled(*args, **kwargs)
4182
4183 def GetText(*args, **kwargs):
4184 """GetText(self) -> String"""
4185 return _core_.UpdateUIEvent_GetText(*args, **kwargs)
4186
4187 def GetSetText(*args, **kwargs):
4188 """GetSetText(self) -> bool"""
4189 return _core_.UpdateUIEvent_GetSetText(*args, **kwargs)
4190
4191 def GetSetChecked(*args, **kwargs):
4192 """GetSetChecked(self) -> bool"""
4193 return _core_.UpdateUIEvent_GetSetChecked(*args, **kwargs)
4194
4195 def GetSetEnabled(*args, **kwargs):
4196 """GetSetEnabled(self) -> bool"""
4197 return _core_.UpdateUIEvent_GetSetEnabled(*args, **kwargs)
4198
4199 def Check(*args, **kwargs):
4200 """Check(self, bool check)"""
4201 return _core_.UpdateUIEvent_Check(*args, **kwargs)
4202
4203 def Enable(*args, **kwargs):
4204 """Enable(self, bool enable)"""
4205 return _core_.UpdateUIEvent_Enable(*args, **kwargs)
4206
4207 def SetText(*args, **kwargs):
4208 """SetText(self, String text)"""
4209 return _core_.UpdateUIEvent_SetText(*args, **kwargs)
4210
4211 def SetUpdateInterval(*args, **kwargs):
4212 """SetUpdateInterval(long updateInterval)"""
4213 return _core_.UpdateUIEvent_SetUpdateInterval(*args, **kwargs)
4214
4215 SetUpdateInterval = staticmethod(SetUpdateInterval)
4216 def GetUpdateInterval(*args, **kwargs):
4217 """GetUpdateInterval() -> long"""
4218 return _core_.UpdateUIEvent_GetUpdateInterval(*args, **kwargs)
4219
4220 GetUpdateInterval = staticmethod(GetUpdateInterval)
4221 def CanUpdate(*args, **kwargs):
4222 """CanUpdate(Window win) -> bool"""
4223 return _core_.UpdateUIEvent_CanUpdate(*args, **kwargs)
4224
4225 CanUpdate = staticmethod(CanUpdate)
4226 def ResetUpdateTime(*args, **kwargs):
4227 """ResetUpdateTime()"""
4228 return _core_.UpdateUIEvent_ResetUpdateTime(*args, **kwargs)
4229
4230 ResetUpdateTime = staticmethod(ResetUpdateTime)
4231 def SetMode(*args, **kwargs):
4232 """SetMode(int mode)"""
4233 return _core_.UpdateUIEvent_SetMode(*args, **kwargs)
4234
4235 SetMode = staticmethod(SetMode)
4236 def GetMode(*args, **kwargs):
4237 """GetMode() -> int"""
4238 return _core_.UpdateUIEvent_GetMode(*args, **kwargs)
4239
4240 GetMode = staticmethod(GetMode)
4241
4242 class UpdateUIEventPtr(UpdateUIEvent):
4243 def __init__(self, this):
4244 self.this = this
4245 if not hasattr(self,"thisown"): self.thisown = 0
4246 self.__class__ = UpdateUIEvent
4247 _core_.UpdateUIEvent_swigregister(UpdateUIEventPtr)
4248
4249 def UpdateUIEvent_SetUpdateInterval(*args, **kwargs):
4250 """UpdateUIEvent_SetUpdateInterval(long updateInterval)"""
4251 return _core_.UpdateUIEvent_SetUpdateInterval(*args, **kwargs)
4252
4253 def UpdateUIEvent_GetUpdateInterval(*args, **kwargs):
4254 """UpdateUIEvent_GetUpdateInterval() -> long"""
4255 return _core_.UpdateUIEvent_GetUpdateInterval(*args, **kwargs)
4256
4257 def UpdateUIEvent_CanUpdate(*args, **kwargs):
4258 """UpdateUIEvent_CanUpdate(Window win) -> bool"""
4259 return _core_.UpdateUIEvent_CanUpdate(*args, **kwargs)
4260
4261 def UpdateUIEvent_ResetUpdateTime(*args, **kwargs):
4262 """UpdateUIEvent_ResetUpdateTime()"""
4263 return _core_.UpdateUIEvent_ResetUpdateTime(*args, **kwargs)
4264
4265 def UpdateUIEvent_SetMode(*args, **kwargs):
4266 """UpdateUIEvent_SetMode(int mode)"""
4267 return _core_.UpdateUIEvent_SetMode(*args, **kwargs)
4268
4269 def UpdateUIEvent_GetMode(*args, **kwargs):
4270 """UpdateUIEvent_GetMode() -> int"""
4271 return _core_.UpdateUIEvent_GetMode(*args, **kwargs)
4272
4273 #---------------------------------------------------------------------------
4274
4275 class SysColourChangedEvent(Event):
4276 def __repr__(self):
4277 return "<%s.%s; proxy of C++ wxSysColourChangedEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
4278 def __init__(self, *args, **kwargs):
4279 """__init__(self) -> SysColourChangedEvent"""
4280 newobj = _core_.new_SysColourChangedEvent(*args, **kwargs)
4281 self.this = newobj.this
4282 self.thisown = 1
4283 del newobj.thisown
4284
4285 class SysColourChangedEventPtr(SysColourChangedEvent):
4286 def __init__(self, this):
4287 self.this = this
4288 if not hasattr(self,"thisown"): self.thisown = 0
4289 self.__class__ = SysColourChangedEvent
4290 _core_.SysColourChangedEvent_swigregister(SysColourChangedEventPtr)
4291
4292 #---------------------------------------------------------------------------
4293
4294 class MouseCaptureChangedEvent(Event):
4295 def __repr__(self):
4296 return "<%s.%s; proxy of C++ wxMouseCaptureChangedEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
4297 def __init__(self, *args, **kwargs):
4298 """__init__(self, int winid=0, Window gainedCapture=None) -> MouseCaptureChangedEvent"""
4299 newobj = _core_.new_MouseCaptureChangedEvent(*args, **kwargs)
4300 self.this = newobj.this
4301 self.thisown = 1
4302 del newobj.thisown
4303 def GetCapturedWindow(*args, **kwargs):
4304 """GetCapturedWindow(self) -> Window"""
4305 return _core_.MouseCaptureChangedEvent_GetCapturedWindow(*args, **kwargs)
4306
4307
4308 class MouseCaptureChangedEventPtr(MouseCaptureChangedEvent):
4309 def __init__(self, this):
4310 self.this = this
4311 if not hasattr(self,"thisown"): self.thisown = 0
4312 self.__class__ = MouseCaptureChangedEvent
4313 _core_.MouseCaptureChangedEvent_swigregister(MouseCaptureChangedEventPtr)
4314
4315 #---------------------------------------------------------------------------
4316
4317 class DisplayChangedEvent(Event):
4318 def __repr__(self):
4319 return "<%s.%s; proxy of C++ wxDisplayChangedEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
4320 def __init__(self, *args, **kwargs):
4321 """__init__(self) -> DisplayChangedEvent"""
4322 newobj = _core_.new_DisplayChangedEvent(*args, **kwargs)
4323 self.this = newobj.this
4324 self.thisown = 1
4325 del newobj.thisown
4326
4327 class DisplayChangedEventPtr(DisplayChangedEvent):
4328 def __init__(self, this):
4329 self.this = this
4330 if not hasattr(self,"thisown"): self.thisown = 0
4331 self.__class__ = DisplayChangedEvent
4332 _core_.DisplayChangedEvent_swigregister(DisplayChangedEventPtr)
4333
4334 #---------------------------------------------------------------------------
4335
4336 class PaletteChangedEvent(Event):
4337 def __repr__(self):
4338 return "<%s.%s; proxy of C++ wxPaletteChangedEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
4339 def __init__(self, *args, **kwargs):
4340 """__init__(self, int id=0) -> PaletteChangedEvent"""
4341 newobj = _core_.new_PaletteChangedEvent(*args, **kwargs)
4342 self.this = newobj.this
4343 self.thisown = 1
4344 del newobj.thisown
4345 def SetChangedWindow(*args, **kwargs):
4346 """SetChangedWindow(self, Window win)"""
4347 return _core_.PaletteChangedEvent_SetChangedWindow(*args, **kwargs)
4348
4349 def GetChangedWindow(*args, **kwargs):
4350 """GetChangedWindow(self) -> Window"""
4351 return _core_.PaletteChangedEvent_GetChangedWindow(*args, **kwargs)
4352
4353
4354 class PaletteChangedEventPtr(PaletteChangedEvent):
4355 def __init__(self, this):
4356 self.this = this
4357 if not hasattr(self,"thisown"): self.thisown = 0
4358 self.__class__ = PaletteChangedEvent
4359 _core_.PaletteChangedEvent_swigregister(PaletteChangedEventPtr)
4360
4361 #---------------------------------------------------------------------------
4362
4363 class QueryNewPaletteEvent(Event):
4364 def __repr__(self):
4365 return "<%s.%s; proxy of C++ wxQueryNewPaletteEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
4366 def __init__(self, *args, **kwargs):
4367 """__init__(self, int winid=0) -> QueryNewPaletteEvent"""
4368 newobj = _core_.new_QueryNewPaletteEvent(*args, **kwargs)
4369 self.this = newobj.this
4370 self.thisown = 1
4371 del newobj.thisown
4372 def SetPaletteRealized(*args, **kwargs):
4373 """SetPaletteRealized(self, bool realized)"""
4374 return _core_.QueryNewPaletteEvent_SetPaletteRealized(*args, **kwargs)
4375
4376 def GetPaletteRealized(*args, **kwargs):
4377 """GetPaletteRealized(self) -> bool"""
4378 return _core_.QueryNewPaletteEvent_GetPaletteRealized(*args, **kwargs)
4379
4380
4381 class QueryNewPaletteEventPtr(QueryNewPaletteEvent):
4382 def __init__(self, this):
4383 self.this = this
4384 if not hasattr(self,"thisown"): self.thisown = 0
4385 self.__class__ = QueryNewPaletteEvent
4386 _core_.QueryNewPaletteEvent_swigregister(QueryNewPaletteEventPtr)
4387
4388 #---------------------------------------------------------------------------
4389
4390 class NavigationKeyEvent(Event):
4391 def __repr__(self):
4392 return "<%s.%s; proxy of C++ wxNavigationKeyEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
4393 def __init__(self, *args, **kwargs):
4394 """__init__(self) -> NavigationKeyEvent"""
4395 newobj = _core_.new_NavigationKeyEvent(*args, **kwargs)
4396 self.this = newobj.this
4397 self.thisown = 1
4398 del newobj.thisown
4399 def GetDirection(*args, **kwargs):
4400 """GetDirection(self) -> bool"""
4401 return _core_.NavigationKeyEvent_GetDirection(*args, **kwargs)
4402
4403 def SetDirection(*args, **kwargs):
4404 """SetDirection(self, bool forward)"""
4405 return _core_.NavigationKeyEvent_SetDirection(*args, **kwargs)
4406
4407 def IsWindowChange(*args, **kwargs):
4408 """IsWindowChange(self) -> bool"""
4409 return _core_.NavigationKeyEvent_IsWindowChange(*args, **kwargs)
4410
4411 def SetWindowChange(*args, **kwargs):
4412 """SetWindowChange(self, bool ischange)"""
4413 return _core_.NavigationKeyEvent_SetWindowChange(*args, **kwargs)
4414
4415 def SetFlags(*args, **kwargs):
4416 """SetFlags(self, long flags)"""
4417 return _core_.NavigationKeyEvent_SetFlags(*args, **kwargs)
4418
4419 def GetCurrentFocus(*args, **kwargs):
4420 """GetCurrentFocus(self) -> Window"""
4421 return _core_.NavigationKeyEvent_GetCurrentFocus(*args, **kwargs)
4422
4423 def SetCurrentFocus(*args, **kwargs):
4424 """SetCurrentFocus(self, Window win)"""
4425 return _core_.NavigationKeyEvent_SetCurrentFocus(*args, **kwargs)
4426
4427 IsBackward = _core_.NavigationKeyEvent_IsBackward
4428 IsForward = _core_.NavigationKeyEvent_IsForward
4429 WinChange = _core_.NavigationKeyEvent_WinChange
4430
4431 class NavigationKeyEventPtr(NavigationKeyEvent):
4432 def __init__(self, this):
4433 self.this = this
4434 if not hasattr(self,"thisown"): self.thisown = 0
4435 self.__class__ = NavigationKeyEvent
4436 _core_.NavigationKeyEvent_swigregister(NavigationKeyEventPtr)
4437
4438 #---------------------------------------------------------------------------
4439
4440 class WindowCreateEvent(CommandEvent):
4441 def __repr__(self):
4442 return "<%s.%s; proxy of C++ wxWindowCreateEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
4443 def __init__(self, *args, **kwargs):
4444 """__init__(self, Window win=None) -> WindowCreateEvent"""
4445 newobj = _core_.new_WindowCreateEvent(*args, **kwargs)
4446 self.this = newobj.this
4447 self.thisown = 1
4448 del newobj.thisown
4449 def GetWindow(*args, **kwargs):
4450 """GetWindow(self) -> Window"""
4451 return _core_.WindowCreateEvent_GetWindow(*args, **kwargs)
4452
4453
4454 class WindowCreateEventPtr(WindowCreateEvent):
4455 def __init__(self, this):
4456 self.this = this
4457 if not hasattr(self,"thisown"): self.thisown = 0
4458 self.__class__ = WindowCreateEvent
4459 _core_.WindowCreateEvent_swigregister(WindowCreateEventPtr)
4460
4461 class WindowDestroyEvent(CommandEvent):
4462 def __repr__(self):
4463 return "<%s.%s; proxy of C++ wxWindowDestroyEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
4464 def __init__(self, *args, **kwargs):
4465 """__init__(self, Window win=None) -> WindowDestroyEvent"""
4466 newobj = _core_.new_WindowDestroyEvent(*args, **kwargs)
4467 self.this = newobj.this
4468 self.thisown = 1
4469 del newobj.thisown
4470 def GetWindow(*args, **kwargs):
4471 """GetWindow(self) -> Window"""
4472 return _core_.WindowDestroyEvent_GetWindow(*args, **kwargs)
4473
4474
4475 class WindowDestroyEventPtr(WindowDestroyEvent):
4476 def __init__(self, this):
4477 self.this = this
4478 if not hasattr(self,"thisown"): self.thisown = 0
4479 self.__class__ = WindowDestroyEvent
4480 _core_.WindowDestroyEvent_swigregister(WindowDestroyEventPtr)
4481
4482 #---------------------------------------------------------------------------
4483
4484 class ContextMenuEvent(CommandEvent):
4485 def __repr__(self):
4486 return "<%s.%s; proxy of C++ wxContextMenuEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
4487 def __init__(self, *args, **kwargs):
4488 """__init__(self, wxEventType type=wxEVT_NULL, int winid=0, Point pt=DefaultPosition) -> ContextMenuEvent"""
4489 newobj = _core_.new_ContextMenuEvent(*args, **kwargs)
4490 self.this = newobj.this
4491 self.thisown = 1
4492 del newobj.thisown
4493 def GetPosition(*args, **kwargs):
4494 """GetPosition(self) -> Point"""
4495 return _core_.ContextMenuEvent_GetPosition(*args, **kwargs)
4496
4497 def SetPosition(*args, **kwargs):
4498 """SetPosition(self, Point pos)"""
4499 return _core_.ContextMenuEvent_SetPosition(*args, **kwargs)
4500
4501
4502 class ContextMenuEventPtr(ContextMenuEvent):
4503 def __init__(self, this):
4504 self.this = this
4505 if not hasattr(self,"thisown"): self.thisown = 0
4506 self.__class__ = ContextMenuEvent
4507 _core_.ContextMenuEvent_swigregister(ContextMenuEventPtr)
4508
4509 #---------------------------------------------------------------------------
4510
4511 IDLE_PROCESS_ALL = _core_.IDLE_PROCESS_ALL
4512 IDLE_PROCESS_SPECIFIED = _core_.IDLE_PROCESS_SPECIFIED
4513 class IdleEvent(Event):
4514 def __repr__(self):
4515 return "<%s.%s; proxy of C++ wxIdleEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
4516 def __init__(self, *args, **kwargs):
4517 """__init__(self) -> IdleEvent"""
4518 newobj = _core_.new_IdleEvent(*args, **kwargs)
4519 self.this = newobj.this
4520 self.thisown = 1
4521 del newobj.thisown
4522 def RequestMore(*args, **kwargs):
4523 """RequestMore(self, bool needMore=True)"""
4524 return _core_.IdleEvent_RequestMore(*args, **kwargs)
4525
4526 def MoreRequested(*args, **kwargs):
4527 """MoreRequested(self) -> bool"""
4528 return _core_.IdleEvent_MoreRequested(*args, **kwargs)
4529
4530 def SetMode(*args, **kwargs):
4531 """SetMode(int mode)"""
4532 return _core_.IdleEvent_SetMode(*args, **kwargs)
4533
4534 SetMode = staticmethod(SetMode)
4535 def GetMode(*args, **kwargs):
4536 """GetMode() -> int"""
4537 return _core_.IdleEvent_GetMode(*args, **kwargs)
4538
4539 GetMode = staticmethod(GetMode)
4540 def CanSend(*args, **kwargs):
4541 """CanSend(Window win) -> bool"""
4542 return _core_.IdleEvent_CanSend(*args, **kwargs)
4543
4544 CanSend = staticmethod(CanSend)
4545
4546 class IdleEventPtr(IdleEvent):
4547 def __init__(self, this):
4548 self.this = this
4549 if not hasattr(self,"thisown"): self.thisown = 0
4550 self.__class__ = IdleEvent
4551 _core_.IdleEvent_swigregister(IdleEventPtr)
4552
4553 def IdleEvent_SetMode(*args, **kwargs):
4554 """IdleEvent_SetMode(int mode)"""
4555 return _core_.IdleEvent_SetMode(*args, **kwargs)
4556
4557 def IdleEvent_GetMode(*args, **kwargs):
4558 """IdleEvent_GetMode() -> int"""
4559 return _core_.IdleEvent_GetMode(*args, **kwargs)
4560
4561 def IdleEvent_CanSend(*args, **kwargs):
4562 """IdleEvent_CanSend(Window win) -> bool"""
4563 return _core_.IdleEvent_CanSend(*args, **kwargs)
4564
4565 #---------------------------------------------------------------------------
4566
4567 class PyEvent(Event):
4568 def __repr__(self):
4569 return "<%s.%s; proxy of C++ wxPyEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
4570 def __init__(self, *args, **kwargs):
4571 """__init__(self, int winid=0, wxEventType commandType=wxEVT_NULL) -> PyEvent"""
4572 newobj = _core_.new_PyEvent(*args, **kwargs)
4573 self.this = newobj.this
4574 self.thisown = 1
4575 del newobj.thisown
4576 self.SetSelf(self)
4577
4578 def __del__(self, destroy=_core_.delete_PyEvent):
4579 """__del__(self)"""
4580 try:
4581 if self.thisown: destroy(self)
4582 except: pass
4583
4584 def SetSelf(*args, **kwargs):
4585 """SetSelf(self, PyObject self)"""
4586 return _core_.PyEvent_SetSelf(*args, **kwargs)
4587
4588 def GetSelf(*args, **kwargs):
4589 """GetSelf(self) -> PyObject"""
4590 return _core_.PyEvent_GetSelf(*args, **kwargs)
4591
4592
4593 class PyEventPtr(PyEvent):
4594 def __init__(self, this):
4595 self.this = this
4596 if not hasattr(self,"thisown"): self.thisown = 0
4597 self.__class__ = PyEvent
4598 _core_.PyEvent_swigregister(PyEventPtr)
4599
4600 class PyCommandEvent(CommandEvent):
4601 def __repr__(self):
4602 return "<%s.%s; proxy of C++ wxPyCommandEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
4603 def __init__(self, *args, **kwargs):
4604 """__init__(self, wxEventType commandType=wxEVT_NULL, int id=0) -> PyCommandEvent"""
4605 newobj = _core_.new_PyCommandEvent(*args, **kwargs)
4606 self.this = newobj.this
4607 self.thisown = 1
4608 del newobj.thisown
4609 self.SetSelf(self)
4610
4611 def __del__(self, destroy=_core_.delete_PyCommandEvent):
4612 """__del__(self)"""
4613 try:
4614 if self.thisown: destroy(self)
4615 except: pass
4616
4617 def SetSelf(*args, **kwargs):
4618 """SetSelf(self, PyObject self)"""
4619 return _core_.PyCommandEvent_SetSelf(*args, **kwargs)
4620
4621 def GetSelf(*args, **kwargs):
4622 """GetSelf(self) -> PyObject"""
4623 return _core_.PyCommandEvent_GetSelf(*args, **kwargs)
4624
4625
4626 class PyCommandEventPtr(PyCommandEvent):
4627 def __init__(self, this):
4628 self.this = this
4629 if not hasattr(self,"thisown"): self.thisown = 0
4630 self.__class__ = PyCommandEvent
4631 _core_.PyCommandEvent_swigregister(PyCommandEventPtr)
4632
4633 #---------------------------------------------------------------------------
4634
4635 PYAPP_ASSERT_SUPPRESS = _core_.PYAPP_ASSERT_SUPPRESS
4636 PYAPP_ASSERT_EXCEPTION = _core_.PYAPP_ASSERT_EXCEPTION
4637 PYAPP_ASSERT_DIALOG = _core_.PYAPP_ASSERT_DIALOG
4638 PYAPP_ASSERT_LOG = _core_.PYAPP_ASSERT_LOG
4639 PRINT_WINDOWS = _core_.PRINT_WINDOWS
4640 PRINT_POSTSCRIPT = _core_.PRINT_POSTSCRIPT
4641 class PyApp(EvtHandler):
4642 """
4643 The ``wx.PyApp`` class is an *implementation detail*, please use the
4644 `wx.App` class (or some other derived class) instead.
4645 """
4646 def __repr__(self):
4647 return "<%s.%s; proxy of C++ wxPyApp instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
4648 def __init__(self, *args, **kwargs):
4649 """
4650 __init__(self) -> PyApp
4651
4652 Create a new application object, starting the bootstrap process.
4653 """
4654 newobj = _core_.new_PyApp(*args, **kwargs)
4655 self.this = newobj.this
4656 self.thisown = 1
4657 del newobj.thisown
4658 self._setCallbackInfo(self, PyApp)
4659 self._setOORInfo(self)
4660
4661 def __del__(self, destroy=_core_.delete_PyApp):
4662 """__del__(self)"""
4663 try:
4664 if self.thisown: destroy(self)
4665 except: pass
4666
4667 def _setCallbackInfo(*args, **kwargs):
4668 """_setCallbackInfo(self, PyObject self, PyObject _class)"""
4669 return _core_.PyApp__setCallbackInfo(*args, **kwargs)
4670
4671 def GetAppName(*args, **kwargs):
4672 """
4673 GetAppName(self) -> String
4674
4675 Get the application name.
4676 """
4677 return _core_.PyApp_GetAppName(*args, **kwargs)
4678
4679 def SetAppName(*args, **kwargs):
4680 """
4681 SetAppName(self, String name)
4682
4683 Set the application name. This value may be used automatically by
4684 `wx.Config` and such.
4685 """
4686 return _core_.PyApp_SetAppName(*args, **kwargs)
4687
4688 def GetClassName(*args, **kwargs):
4689 """
4690 GetClassName(self) -> String
4691
4692 Get the application's class name.
4693 """
4694 return _core_.PyApp_GetClassName(*args, **kwargs)
4695
4696 def SetClassName(*args, **kwargs):
4697 """
4698 SetClassName(self, String name)
4699
4700 Set the application's class name. This value may be used for
4701 X-resources if applicable for the platform
4702 """
4703 return _core_.PyApp_SetClassName(*args, **kwargs)
4704
4705 def GetVendorName(*args, **kwargs):
4706 """
4707 GetVendorName(self) -> String
4708
4709 Get the application's vendor name.
4710 """
4711 return _core_.PyApp_GetVendorName(*args, **kwargs)
4712
4713 def SetVendorName(*args, **kwargs):
4714 """
4715 SetVendorName(self, String name)
4716
4717 Set the application's vendor name. This value may be used
4718 automatically by `wx.Config` and such.
4719 """
4720 return _core_.PyApp_SetVendorName(*args, **kwargs)
4721
4722 def GetTraits(*args, **kwargs):
4723 """
4724 GetTraits(self) -> wxAppTraits
4725
4726 Return (and create if necessary) the app traits object to which we
4727 delegate for everything which either should be configurable by the
4728 user (then he can change the default behaviour simply by overriding
4729 CreateTraits() and returning his own traits object) or which is
4730 GUI/console dependent as then wx.AppTraits allows us to abstract the
4731 differences behind the common facade.
4732
4733 :todo: Add support for overriding CreateAppTraits in wxPython.
4734 """
4735 return _core_.PyApp_GetTraits(*args, **kwargs)
4736
4737 def ProcessPendingEvents(*args, **kwargs):
4738 """
4739 ProcessPendingEvents(self)
4740
4741 Process all events in the Pending Events list -- it is necessary to
4742 call this function to process posted events. This normally happens
4743 during each event loop iteration.
4744 """
4745 return _core_.PyApp_ProcessPendingEvents(*args, **kwargs)
4746
4747 def Yield(*args, **kwargs):
4748 """
4749 Yield(self, bool onlyIfNeeded=False) -> bool
4750
4751 Process all currently pending events right now, instead of waiting
4752 until return to the event loop. It is an error to call ``Yield``
4753 recursively unless the value of ``onlyIfNeeded`` is True.
4754
4755 :warning: This function is dangerous as it can lead to unexpected
4756 reentrancies (i.e. when called from an event handler it may
4757 result in calling the same event handler again), use with
4758 extreme care or, better, don't use at all!
4759
4760 :see: `wx.Yield`, `wx.YieldIfNeeded`, `wx.SafeYield`
4761
4762 """
4763 return _core_.PyApp_Yield(*args, **kwargs)
4764
4765 def WakeUpIdle(*args, **kwargs):
4766 """
4767 WakeUpIdle(self)
4768
4769 Make sure that idle events are sent again.
4770 :see: `wx.WakeUpIdle`
4771 """
4772 return _core_.PyApp_WakeUpIdle(*args, **kwargs)
4773
4774 def IsMainLoopRunning(*args, **kwargs):
4775 """
4776 IsMainLoopRunning() -> bool
4777
4778 Returns True if we're running the main loop, i.e. if the events can
4779 currently be dispatched.
4780 """
4781 return _core_.PyApp_IsMainLoopRunning(*args, **kwargs)
4782
4783 IsMainLoopRunning = staticmethod(IsMainLoopRunning)
4784 def MainLoop(*args, **kwargs):
4785 """
4786 MainLoop(self) -> int
4787
4788 Execute the main GUI loop, the function doesn't normally return until
4789 all top level windows have been closed and destroyed.
4790 """
4791 return _core_.PyApp_MainLoop(*args, **kwargs)
4792
4793 def Exit(*args, **kwargs):
4794 """
4795 Exit(self)
4796
4797 Exit the main loop thus terminating the application.
4798 :see: `wx.Exit`
4799 """
4800 return _core_.PyApp_Exit(*args, **kwargs)
4801
4802 def ExitMainLoop(*args, **kwargs):
4803 """
4804 ExitMainLoop(self)
4805
4806 Exit the main GUI loop during the next iteration of the main
4807 loop, (i.e. it does not stop the program immediately!)
4808 """
4809 return _core_.PyApp_ExitMainLoop(*args, **kwargs)
4810
4811 def Pending(*args, **kwargs):
4812 """
4813 Pending(self) -> bool
4814
4815 Returns True if there are unprocessed events in the event queue.
4816 """
4817 return _core_.PyApp_Pending(*args, **kwargs)
4818
4819 def Dispatch(*args, **kwargs):
4820 """
4821 Dispatch(self) -> bool
4822
4823 Process the first event in the event queue (blocks until an event
4824 appears if there are none currently)
4825 """
4826 return _core_.PyApp_Dispatch(*args, **kwargs)
4827
4828 def ProcessIdle(*args, **kwargs):
4829 """
4830 ProcessIdle(self) -> bool
4831
4832 Called from the MainLoop when the application becomes idle (there are
4833 no pending events) and sends a `wx.IdleEvent` to all interested
4834 parties. Returns True if more idle events are needed, False if not.
4835 """
4836 return _core_.PyApp_ProcessIdle(*args, **kwargs)
4837
4838 def SendIdleEvents(*args, **kwargs):
4839 """
4840 SendIdleEvents(self, Window win, IdleEvent event) -> bool
4841
4842 Send idle event to window and all subwindows. Returns True if more
4843 idle time is requested.
4844 """
4845 return _core_.PyApp_SendIdleEvents(*args, **kwargs)
4846
4847 def IsActive(*args, **kwargs):
4848 """
4849 IsActive(self) -> bool
4850
4851 Return True if our app has focus.
4852 """
4853 return _core_.PyApp_IsActive(*args, **kwargs)
4854
4855 def SetTopWindow(*args, **kwargs):
4856 """
4857 SetTopWindow(self, Window win)
4858
4859 Set the *main* top level window
4860 """
4861 return _core_.PyApp_SetTopWindow(*args, **kwargs)
4862
4863 def GetTopWindow(*args, **kwargs):
4864 """
4865 GetTopWindow(self) -> Window
4866
4867 Return the *main* top level window (if it hadn't been set previously
4868 with SetTopWindow(), will return just some top level window and, if
4869 there not any, will return None)
4870 """
4871 return _core_.PyApp_GetTopWindow(*args, **kwargs)
4872
4873 def SetExitOnFrameDelete(*args, **kwargs):
4874 """
4875 SetExitOnFrameDelete(self, bool flag)
4876
4877 Control the exit behaviour: by default, the program will exit the main
4878 loop (and so, usually, terminate) when the last top-level program
4879 window is deleted. Beware that if you disable this behaviour (with
4880 SetExitOnFrameDelete(False)), you'll have to call ExitMainLoop()
4881 explicitly from somewhere.
4882 """
4883 return _core_.PyApp_SetExitOnFrameDelete(*args, **kwargs)
4884
4885 def GetExitOnFrameDelete(*args, **kwargs):
4886 """
4887 GetExitOnFrameDelete(self) -> bool
4888
4889 Get the current exit behaviour setting.
4890 """
4891 return _core_.PyApp_GetExitOnFrameDelete(*args, **kwargs)
4892
4893 def SetUseBestVisual(*args, **kwargs):
4894 """
4895 SetUseBestVisual(self, bool flag)
4896
4897 Set whether the app should try to use the best available visual on
4898 systems where more than one is available, (Sun, SGI, XFree86 4, etc.)
4899 """
4900 return _core_.PyApp_SetUseBestVisual(*args, **kwargs)
4901
4902 def GetUseBestVisual(*args, **kwargs):
4903 """
4904 GetUseBestVisual(self) -> bool
4905
4906 Get current UseBestVisual setting.
4907 """
4908 return _core_.PyApp_GetUseBestVisual(*args, **kwargs)
4909
4910 def SetPrintMode(*args, **kwargs):
4911 """SetPrintMode(self, int mode)"""
4912 return _core_.PyApp_SetPrintMode(*args, **kwargs)
4913
4914 def GetPrintMode(*args, **kwargs):
4915 """GetPrintMode(self) -> int"""
4916 return _core_.PyApp_GetPrintMode(*args, **kwargs)
4917
4918 def SetAssertMode(*args, **kwargs):
4919 """
4920 SetAssertMode(self, int mode)
4921
4922 Set the OnAssert behaviour for debug and hybrid builds.
4923 """
4924 return _core_.PyApp_SetAssertMode(*args, **kwargs)
4925
4926 def GetAssertMode(*args, **kwargs):
4927 """
4928 GetAssertMode(self) -> int
4929
4930 Get the current OnAssert behaviour setting.
4931 """
4932 return _core_.PyApp_GetAssertMode(*args, **kwargs)
4933
4934 def GetMacSupportPCMenuShortcuts(*args, **kwargs):
4935 """GetMacSupportPCMenuShortcuts() -> bool"""
4936 return _core_.PyApp_GetMacSupportPCMenuShortcuts(*args, **kwargs)
4937
4938 GetMacSupportPCMenuShortcuts = staticmethod(GetMacSupportPCMenuShortcuts)
4939 def GetMacAboutMenuItemId(*args, **kwargs):
4940 """GetMacAboutMenuItemId() -> long"""
4941 return _core_.PyApp_GetMacAboutMenuItemId(*args, **kwargs)
4942
4943 GetMacAboutMenuItemId = staticmethod(GetMacAboutMenuItemId)
4944 def GetMacPreferencesMenuItemId(*args, **kwargs):
4945 """GetMacPreferencesMenuItemId() -> long"""
4946 return _core_.PyApp_GetMacPreferencesMenuItemId(*args, **kwargs)
4947
4948 GetMacPreferencesMenuItemId = staticmethod(GetMacPreferencesMenuItemId)
4949 def GetMacExitMenuItemId(*args, **kwargs):
4950 """GetMacExitMenuItemId() -> long"""
4951 return _core_.PyApp_GetMacExitMenuItemId(*args, **kwargs)
4952
4953 GetMacExitMenuItemId = staticmethod(GetMacExitMenuItemId)
4954 def GetMacHelpMenuTitleName(*args, **kwargs):
4955 """GetMacHelpMenuTitleName() -> String"""
4956 return _core_.PyApp_GetMacHelpMenuTitleName(*args, **kwargs)
4957
4958 GetMacHelpMenuTitleName = staticmethod(GetMacHelpMenuTitleName)
4959 def SetMacSupportPCMenuShortcuts(*args, **kwargs):
4960 """SetMacSupportPCMenuShortcuts(bool val)"""
4961 return _core_.PyApp_SetMacSupportPCMenuShortcuts(*args, **kwargs)
4962
4963 SetMacSupportPCMenuShortcuts = staticmethod(SetMacSupportPCMenuShortcuts)
4964 def SetMacAboutMenuItemId(*args, **kwargs):
4965 """SetMacAboutMenuItemId(long val)"""
4966 return _core_.PyApp_SetMacAboutMenuItemId(*args, **kwargs)
4967
4968 SetMacAboutMenuItemId = staticmethod(SetMacAboutMenuItemId)
4969 def SetMacPreferencesMenuItemId(*args, **kwargs):
4970 """SetMacPreferencesMenuItemId(long val)"""
4971 return _core_.PyApp_SetMacPreferencesMenuItemId(*args, **kwargs)
4972
4973 SetMacPreferencesMenuItemId = staticmethod(SetMacPreferencesMenuItemId)
4974 def SetMacExitMenuItemId(*args, **kwargs):
4975 """SetMacExitMenuItemId(long val)"""
4976 return _core_.PyApp_SetMacExitMenuItemId(*args, **kwargs)
4977
4978 SetMacExitMenuItemId = staticmethod(SetMacExitMenuItemId)
4979 def SetMacHelpMenuTitleName(*args, **kwargs):
4980 """SetMacHelpMenuTitleName(String val)"""
4981 return _core_.PyApp_SetMacHelpMenuTitleName(*args, **kwargs)
4982
4983 SetMacHelpMenuTitleName = staticmethod(SetMacHelpMenuTitleName)
4984 def _BootstrapApp(*args, **kwargs):
4985 """
4986 _BootstrapApp(self)
4987
4988 For internal use only
4989 """
4990 return _core_.PyApp__BootstrapApp(*args, **kwargs)
4991
4992 def GetComCtl32Version(*args, **kwargs):
4993 """
4994 GetComCtl32Version() -> int
4995
4996 Returns 400, 470, 471, etc. for comctl32.dll 4.00, 4.70, 4.71 or 0 if
4997 it wasn't found at all. Raises an exception on non-Windows platforms.
4998 """
4999 return _core_.PyApp_GetComCtl32Version(*args, **kwargs)
5000
5001 GetComCtl32Version = staticmethod(GetComCtl32Version)
5002
5003 class PyAppPtr(PyApp):
5004 def __init__(self, this):
5005 self.this = this
5006 if not hasattr(self,"thisown"): self.thisown = 0
5007 self.__class__ = PyApp
5008 _core_.PyApp_swigregister(PyAppPtr)
5009
5010 def PyApp_IsMainLoopRunning(*args, **kwargs):
5011 """
5012 PyApp_IsMainLoopRunning() -> bool
5013
5014 Returns True if we're running the main loop, i.e. if the events can
5015 currently be dispatched.
5016 """
5017 return _core_.PyApp_IsMainLoopRunning(*args, **kwargs)
5018
5019 def PyApp_GetMacSupportPCMenuShortcuts(*args, **kwargs):
5020 """PyApp_GetMacSupportPCMenuShortcuts() -> bool"""
5021 return _core_.PyApp_GetMacSupportPCMenuShortcuts(*args, **kwargs)
5022
5023 def PyApp_GetMacAboutMenuItemId(*args, **kwargs):
5024 """PyApp_GetMacAboutMenuItemId() -> long"""
5025 return _core_.PyApp_GetMacAboutMenuItemId(*args, **kwargs)
5026
5027 def PyApp_GetMacPreferencesMenuItemId(*args, **kwargs):
5028 """PyApp_GetMacPreferencesMenuItemId() -> long"""
5029 return _core_.PyApp_GetMacPreferencesMenuItemId(*args, **kwargs)
5030
5031 def PyApp_GetMacExitMenuItemId(*args, **kwargs):
5032 """PyApp_GetMacExitMenuItemId() -> long"""
5033 return _core_.PyApp_GetMacExitMenuItemId(*args, **kwargs)
5034
5035 def PyApp_GetMacHelpMenuTitleName(*args, **kwargs):
5036 """PyApp_GetMacHelpMenuTitleName() -> String"""
5037 return _core_.PyApp_GetMacHelpMenuTitleName(*args, **kwargs)
5038
5039 def PyApp_SetMacSupportPCMenuShortcuts(*args, **kwargs):
5040 """PyApp_SetMacSupportPCMenuShortcuts(bool val)"""
5041 return _core_.PyApp_SetMacSupportPCMenuShortcuts(*args, **kwargs)
5042
5043 def PyApp_SetMacAboutMenuItemId(*args, **kwargs):
5044 """PyApp_SetMacAboutMenuItemId(long val)"""
5045 return _core_.PyApp_SetMacAboutMenuItemId(*args, **kwargs)
5046
5047 def PyApp_SetMacPreferencesMenuItemId(*args, **kwargs):
5048 """PyApp_SetMacPreferencesMenuItemId(long val)"""
5049 return _core_.PyApp_SetMacPreferencesMenuItemId(*args, **kwargs)
5050
5051 def PyApp_SetMacExitMenuItemId(*args, **kwargs):
5052 """PyApp_SetMacExitMenuItemId(long val)"""
5053 return _core_.PyApp_SetMacExitMenuItemId(*args, **kwargs)
5054
5055 def PyApp_SetMacHelpMenuTitleName(*args, **kwargs):
5056 """PyApp_SetMacHelpMenuTitleName(String val)"""
5057 return _core_.PyApp_SetMacHelpMenuTitleName(*args, **kwargs)
5058
5059 def PyApp_GetComCtl32Version(*args, **kwargs):
5060 """
5061 PyApp_GetComCtl32Version() -> int
5062
5063 Returns 400, 470, 471, etc. for comctl32.dll 4.00, 4.70, 4.71 or 0 if
5064 it wasn't found at all. Raises an exception on non-Windows platforms.
5065 """
5066 return _core_.PyApp_GetComCtl32Version(*args, **kwargs)
5067
5068 #---------------------------------------------------------------------------
5069
5070
5071 def Exit(*args, **kwargs):
5072 """
5073 Exit()
5074
5075 Force an exit of the application. Convenience for wx.GetApp().Exit()
5076 """
5077 return _core_.Exit(*args, **kwargs)
5078
5079 def Yield(*args, **kwargs):
5080 """
5081 Yield() -> bool
5082
5083 Yield to other apps/messages. Convenience for wx.GetApp().Yield()
5084 """
5085 return _core_.Yield(*args, **kwargs)
5086
5087 def YieldIfNeeded(*args, **kwargs):
5088 """
5089 YieldIfNeeded() -> bool
5090
5091 Yield to other apps/messages. Convenience for wx.GetApp().Yield(True)
5092 """
5093 return _core_.YieldIfNeeded(*args, **kwargs)
5094
5095 def SafeYield(*args, **kwargs):
5096 """
5097 SafeYield(Window win=None, bool onlyIfNeeded=False) -> bool
5098
5099 This function is similar to `wx.Yield`, except that it disables the
5100 user input to all program windows before calling `wx.Yield` and
5101 re-enables it again afterwards. If ``win`` is not None, this window
5102 will remain enabled, allowing the implementation of some limited user
5103 interaction.
5104
5105 :Returns: the result of the call to `wx.Yield`.
5106 """
5107 return _core_.SafeYield(*args, **kwargs)
5108
5109 def WakeUpIdle(*args, **kwargs):
5110 """
5111 WakeUpIdle()
5112
5113 Cause the message queue to become empty again, so idle events will be
5114 sent.
5115 """
5116 return _core_.WakeUpIdle(*args, **kwargs)
5117
5118 def PostEvent(*args, **kwargs):
5119 """
5120 PostEvent(EvtHandler dest, Event event)
5121
5122 Send an event to a window or other wx.EvtHandler to be processed
5123 later.
5124 """
5125 return _core_.PostEvent(*args, **kwargs)
5126
5127 def App_CleanUp(*args, **kwargs):
5128 """
5129 App_CleanUp()
5130
5131 For internal use only, it is used to cleanup after wxWidgets when
5132 Python shuts down.
5133 """
5134 return _core_.App_CleanUp(*args, **kwargs)
5135
5136 def GetApp(*args, **kwargs):
5137 """
5138 GetApp() -> PyApp
5139
5140 Return a reference to the current wx.App object.
5141 """
5142 return _core_.GetApp(*args, **kwargs)
5143 #----------------------------------------------------------------------
5144
5145 class PyOnDemandOutputWindow:
5146 """
5147 A class that can be used for redirecting Python's stdout and
5148 stderr streams. It will do nothing until something is wrriten to
5149 the stream at which point it will create a Frame with a text area
5150 and write the text there.
5151 """
5152 def __init__(self, title = "wxPython: stdout/stderr"):
5153 self.frame = None
5154 self.title = title
5155 self.pos = wx.DefaultPosition
5156 self.size = (450, 300)
5157 self.parent = None
5158
5159 def SetParent(self, parent):
5160 """Set the window to be used as the popup Frame's parent."""
5161 self.parent = parent
5162
5163
5164 def CreateOutputWindow(self, st):
5165 self.frame = wx.Frame(self.parent, -1, self.title, self.pos, self.size,
5166 style=wx.DEFAULT_FRAME_STYLE)
5167 self.text = wx.TextCtrl(self.frame, -1, "",
5168 style=wx.TE_MULTILINE|wx.TE_READONLY)
5169 self.text.AppendText(st)
5170 self.frame.Show(True)
5171 EVT_CLOSE(self.frame, self.OnCloseWindow)
5172
5173
5174 def OnCloseWindow(self, event):
5175 if self.frame is not None:
5176 self.frame.Destroy()
5177 self.frame = None
5178 self.text = None
5179
5180
5181 # These methods provide the file-like output behaviour.
5182 def write(self, text):
5183 """
5184 Create the output window if needed and write the string to it.
5185 If not called in the context of the gui thread then uses
5186 CallAfter to do the work there.
5187 """
5188 if self.frame is None:
5189 if not wx.Thread_IsMain():
5190 wx.CallAfter(self.CreateOutputWindow, text)
5191 else:
5192 self.CreateOutputWindow(text)
5193 else:
5194 if not wx.Thread_IsMain():
5195 wx.CallAfter(self.text.AppendText, text)
5196 else:
5197 self.text.AppendText(text)
5198
5199
5200 def close(self):
5201 if self.frame is not None:
5202 wx.CallAfter(self.frame.Close)
5203
5204
5205 def flush(self):
5206 pass
5207
5208
5209
5210 #----------------------------------------------------------------------
5211
5212 _defRedirect = (wx.Platform == '__WXMSW__' or wx.Platform == '__WXMAC__')
5213
5214 class App(wx.PyApp):
5215 """
5216 The ``wx.App`` class represents the application and is used to:
5217
5218 * bootstrap the wxPython system and initialize the underlying
5219 gui toolkit
5220 * set and get application-wide properties
5221 * implement the windowing system main message or event loop,
5222 and to dispatch events to window instances
5223 * etc.
5224
5225 Every application must have a ``wx.App`` instance, and all
5226 creation of UI objects should be delayed until after the
5227 ``wx.App`` object has been created in order to ensure that the gui
5228 platform and wxWidgets have been fully initialized.
5229
5230 Normally you would derive from this class and implement an
5231 ``OnInit`` method that creates a frame and then calls
5232 ``self.SetTopWindow(frame)``.
5233
5234 :see: `wx.PySimpleApp` for a simpler app class that can be used
5235 directly.
5236 """
5237
5238 outputWindowClass = PyOnDemandOutputWindow
5239
5240 def __init__(self, redirect=_defRedirect, filename=None,
5241 useBestVisual=False, clearSigInt=True):
5242 """
5243 Construct a ``wx.App`` object.
5244
5245 :param redirect: Should ``sys.stdout`` and ``sys.stderr`` be
5246 redirected? Defaults to True on Windows and Mac, False
5247 otherwise. If `filename` is None then output will be
5248 redirected to a window that pops up as needed. (You can
5249 control what kind of window is created for the output by
5250 resetting the class variable ``outputWindowClass`` to a
5251 class of your choosing.)
5252
5253 :param filename: The name of a file to redirect output to, if
5254 redirect is True.
5255
5256 :param useBestVisual: Should the app try to use the best
5257 available visual provided by the system (only relevant on
5258 systems that have more than one visual.) This parameter
5259 must be used instead of calling `SetUseBestVisual` later
5260 on because it must be set before the underlying GUI
5261 toolkit is initialized.
5262
5263 :param clearSigInt: Should SIGINT be cleared? This allows the
5264 app to terminate upon a Ctrl-C in the console like other
5265 GUI apps will.
5266
5267 :note: You should override OnInit to do applicaition
5268 initialization to ensure that the system, toolkit and
5269 wxWidgets are fully initialized.
5270 """
5271 wx.PyApp.__init__(self)
5272
5273 if wx.Platform == "__WXMAC__":
5274 try:
5275 import MacOS
5276 if not MacOS.WMAvailable():
5277 print """\
5278 This program needs access to the screen. Please run with 'pythonw',
5279 not 'python', and only when you are logged in on the main display of
5280 your Mac."""
5281 _sys.exit(1)
5282 except SystemExit:
5283 raise
5284 except:
5285 pass
5286
5287 # This has to be done before OnInit
5288 self.SetUseBestVisual(useBestVisual)
5289
5290 # Set the default handler for SIGINT. This fixes a problem
5291 # where if Ctrl-C is pressed in the console that started this
5292 # app then it will not appear to do anything, (not even send
5293 # KeyboardInterrupt???) but will later segfault on exit. By
5294 # setting the default handler then the app will exit, as
5295 # expected (depending on platform.)
5296 if clearSigInt:
5297 try:
5298 import signal
5299 signal.signal(signal.SIGINT, signal.SIG_DFL)
5300 except:
5301 pass
5302
5303 # Save and redirect the stdio to a window?
5304 self.stdioWin = None
5305 self.saveStdio = (_sys.stdout, _sys.stderr)
5306 if redirect:
5307 self.RedirectStdio(filename)
5308
5309 # This finishes the initialization of wxWindows and then calls
5310 # the OnInit that should be present in the derived class
5311 self._BootstrapApp()
5312
5313
5314 def __del__(self):
5315 try:
5316 self.RestoreStdio() # Just in case the MainLoop was overridden
5317 except:
5318 pass
5319
5320
5321 def SetTopWindow(self, frame):
5322 """Set the \"main\" top level window"""
5323 if self.stdioWin:
5324 self.stdioWin.SetParent(frame)
5325 wx.PyApp.SetTopWindow(self, frame)
5326
5327
5328 def MainLoop(self):
5329 """Execute the main GUI event loop"""
5330 wx.PyApp.MainLoop(self)
5331 self.RestoreStdio()
5332
5333
5334 def RedirectStdio(self, filename=None):
5335 """Redirect sys.stdout and sys.stderr to a file or a popup window."""
5336 if filename:
5337 _sys.stdout = _sys.stderr = open(filename, 'a')
5338 else:
5339 self.stdioWin = self.outputWindowClass()
5340 _sys.stdout = _sys.stderr = self.stdioWin
5341
5342
5343 def RestoreStdio(self):
5344 _sys.stdout, _sys.stderr = self.saveStdio
5345
5346
5347 def SetOutputWindowAttributes(self, title=None, pos=None, size=None):
5348 """
5349 Set the title, position and/or size of the output window if
5350 the stdio has been redirected. This should be called before
5351 any output would cause the output window to be created.
5352 """
5353 if self.stdioWin:
5354 if title is not None:
5355 self.stdioWin.title = title
5356 if pos is not None:
5357 self.stdioWin.pos = pos
5358 if size is not None:
5359 self.stdioWin.size = size
5360
5361
5362
5363
5364 # change from wx.PyApp_XX to wx.App_XX
5365 App_GetMacSupportPCMenuShortcuts = _core_.PyApp_GetMacSupportPCMenuShortcuts
5366 App_GetMacAboutMenuItemId = _core_.PyApp_GetMacAboutMenuItemId
5367 App_GetMacPreferencesMenuItemId = _core_.PyApp_GetMacPreferencesMenuItemId
5368 App_GetMacExitMenuItemId = _core_.PyApp_GetMacExitMenuItemId
5369 App_GetMacHelpMenuTitleName = _core_.PyApp_GetMacHelpMenuTitleName
5370 App_SetMacSupportPCMenuShortcuts = _core_.PyApp_SetMacSupportPCMenuShortcuts
5371 App_SetMacAboutMenuItemId = _core_.PyApp_SetMacAboutMenuItemId
5372 App_SetMacPreferencesMenuItemId = _core_.PyApp_SetMacPreferencesMenuItemId
5373 App_SetMacExitMenuItemId = _core_.PyApp_SetMacExitMenuItemId
5374 App_SetMacHelpMenuTitleName = _core_.PyApp_SetMacHelpMenuTitleName
5375 App_GetComCtl32Version = _core_.PyApp_GetComCtl32Version
5376
5377 #----------------------------------------------------------------------------
5378
5379 class PySimpleApp(wx.App):
5380 """
5381 A simple application class. You can just create one of these and
5382 then then make your top level windows later, and not have to worry
5383 about OnInit. For example::
5384
5385 app = wx.PySimpleApp()
5386 frame = wx.Frame(None, title='Hello World')
5387 frame.Show()
5388 app.MainLoop()
5389
5390 :see: `wx.App`
5391 """
5392
5393 def __init__(self, redirect=False, filename=None,
5394 useBestVisual=False, clearSigInt=True):
5395 """
5396 :see: `wx.App.__init__`
5397 """
5398 wx.App.__init__(self, redirect, filename, useBestVisual, clearSigInt)
5399
5400 def OnInit(self):
5401 return True
5402
5403
5404
5405 # Is anybody using this one?
5406 class PyWidgetTester(wx.App):
5407 def __init__(self, size = (250, 100)):
5408 self.size = size
5409 wx.App.__init__(self, 0)
5410
5411 def OnInit(self):
5412 self.frame = wx.Frame(None, -1, "Widget Tester", pos=(0,0), size=self.size)
5413 self.SetTopWindow(self.frame)
5414 return True
5415
5416 def SetWidget(self, widgetClass, *args, **kwargs):
5417 w = widgetClass(self.frame, *args, **kwargs)
5418 self.frame.Show(True)
5419
5420 #----------------------------------------------------------------------------
5421 # DO NOT hold any other references to this object. This is how we
5422 # know when to cleanup system resources that wxWidgets is holding. When
5423 # the sys module is unloaded, the refcount on sys.__wxPythonCleanup
5424 # goes to zero and it calls the wx.App_CleanUp function.
5425
5426 class __wxPyCleanup:
5427 def __init__(self):
5428 self.cleanup = _core_.App_CleanUp
5429 def __del__(self):
5430 self.cleanup()
5431
5432 _sys.__wxPythonCleanup = __wxPyCleanup()
5433
5434 ## # another possible solution, but it gets called too early...
5435 ## import atexit
5436 ## atexit.register(_core_.wxApp_CleanUp)
5437
5438
5439 #----------------------------------------------------------------------------
5440
5441 #---------------------------------------------------------------------------
5442
5443 class EventLoop(object):
5444 def __repr__(self):
5445 return "<%s.%s; proxy of C++ wxEventLoop instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
5446 def __init__(self, *args, **kwargs):
5447 """__init__(self) -> EventLoop"""
5448 newobj = _core_.new_EventLoop(*args, **kwargs)
5449 self.this = newobj.this
5450 self.thisown = 1
5451 del newobj.thisown
5452 def __del__(self, destroy=_core_.delete_EventLoop):
5453 """__del__(self)"""
5454 try:
5455 if self.thisown: destroy(self)
5456 except: pass
5457
5458 def Run(*args, **kwargs):
5459 """Run(self) -> int"""
5460 return _core_.EventLoop_Run(*args, **kwargs)
5461
5462 def Exit(*args, **kwargs):
5463 """Exit(self, int rc=0)"""
5464 return _core_.EventLoop_Exit(*args, **kwargs)
5465
5466 def Pending(*args, **kwargs):
5467 """Pending(self) -> bool"""
5468 return _core_.EventLoop_Pending(*args, **kwargs)
5469
5470 def Dispatch(*args, **kwargs):
5471 """Dispatch(self) -> bool"""
5472 return _core_.EventLoop_Dispatch(*args, **kwargs)
5473
5474 def IsRunning(*args, **kwargs):
5475 """IsRunning(self) -> bool"""
5476 return _core_.EventLoop_IsRunning(*args, **kwargs)
5477
5478 def GetActive(*args, **kwargs):
5479 """GetActive() -> EventLoop"""
5480 return _core_.EventLoop_GetActive(*args, **kwargs)
5481
5482 GetActive = staticmethod(GetActive)
5483 def SetActive(*args, **kwargs):
5484 """SetActive(EventLoop loop)"""
5485 return _core_.EventLoop_SetActive(*args, **kwargs)
5486
5487 SetActive = staticmethod(SetActive)
5488
5489 class EventLoopPtr(EventLoop):
5490 def __init__(self, this):
5491 self.this = this
5492 if not hasattr(self,"thisown"): self.thisown = 0
5493 self.__class__ = EventLoop
5494 _core_.EventLoop_swigregister(EventLoopPtr)
5495
5496 def EventLoop_GetActive(*args, **kwargs):
5497 """EventLoop_GetActive() -> EventLoop"""
5498 return _core_.EventLoop_GetActive(*args, **kwargs)
5499
5500 def EventLoop_SetActive(*args, **kwargs):
5501 """EventLoop_SetActive(EventLoop loop)"""
5502 return _core_.EventLoop_SetActive(*args, **kwargs)
5503
5504 #---------------------------------------------------------------------------
5505
5506 class AcceleratorEntry(object):
5507 """
5508 A class used to define items in an `wx.AcceleratorTable`. wxPython
5509 programs can choose to use wx.AcceleratorEntry objects, but using a
5510 list of 3-tuple of integers (flags, keyCode, cmdID) usually works just
5511 as well. See `__init__` for of the tuple values.
5512
5513 :see: `wx.AcceleratorTable`
5514 """
5515 def __repr__(self):
5516 return "<%s.%s; proxy of C++ wxAcceleratorEntry instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
5517 def __init__(self, *args, **kwargs):
5518 """
5519 __init__(self, int flags=0, int keyCode=0, int cmdID=0) -> AcceleratorEntry
5520
5521 Construct a wx.AcceleratorEntry.
5522 """
5523 newobj = _core_.new_AcceleratorEntry(*args, **kwargs)
5524 self.this = newobj.this
5525 self.thisown = 1
5526 del newobj.thisown
5527 def __del__(self, destroy=_core_.delete_AcceleratorEntry):
5528 """__del__(self)"""
5529 try:
5530 if self.thisown: destroy(self)
5531 except: pass
5532
5533 def Set(*args, **kwargs):
5534 """
5535 Set(self, int flags, int keyCode, int cmd)
5536
5537 (Re)set the attributes of a wx.AcceleratorEntry.
5538 :see `__init__`
5539 """
5540 return _core_.AcceleratorEntry_Set(*args, **kwargs)
5541
5542 def GetFlags(*args, **kwargs):
5543 """
5544 GetFlags(self) -> int
5545
5546 Get the AcceleratorEntry's flags.
5547 """
5548 return _core_.AcceleratorEntry_GetFlags(*args, **kwargs)
5549
5550 def GetKeyCode(*args, **kwargs):
5551 """
5552 GetKeyCode(self) -> int
5553
5554 Get the AcceleratorEntry's keycode.
5555 """
5556 return _core_.AcceleratorEntry_GetKeyCode(*args, **kwargs)
5557
5558 def GetCommand(*args, **kwargs):
5559 """
5560 GetCommand(self) -> int
5561
5562 Get the AcceleratorEntry's command ID.
5563 """
5564 return _core_.AcceleratorEntry_GetCommand(*args, **kwargs)
5565
5566
5567 class AcceleratorEntryPtr(AcceleratorEntry):
5568 def __init__(self, this):
5569 self.this = this
5570 if not hasattr(self,"thisown"): self.thisown = 0
5571 self.__class__ = AcceleratorEntry
5572 _core_.AcceleratorEntry_swigregister(AcceleratorEntryPtr)
5573
5574 class AcceleratorTable(Object):
5575 """
5576 An accelerator table allows the application to specify a table of
5577 keyboard shortcuts for menus or other commands. On Windows, menu or
5578 button commands are supported; on GTK, only menu commands are
5579 supported.
5580 """
5581 def __repr__(self):
5582 return "<%s.%s; proxy of C++ wxAcceleratorTable instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
5583 def __init__(self, *args, **kwargs):
5584 """
5585 __init__(entries) -> AcceleratorTable
5586
5587 Construct an AcceleratorTable from a list of `wx.AcceleratorEntry`
5588 items or or of 3-tuples (flags, keyCode, cmdID)
5589
5590 :see: `wx.AcceleratorEntry`
5591 """
5592 newobj = _core_.new_AcceleratorTable(*args, **kwargs)
5593 self.this = newobj.this
5594 self.thisown = 1
5595 del newobj.thisown
5596 def __del__(self, destroy=_core_.delete_AcceleratorTable):
5597 """__del__(self)"""
5598 try:
5599 if self.thisown: destroy(self)
5600 except: pass
5601
5602 def Ok(*args, **kwargs):
5603 """Ok(self) -> bool"""
5604 return _core_.AcceleratorTable_Ok(*args, **kwargs)
5605
5606
5607 class AcceleratorTablePtr(AcceleratorTable):
5608 def __init__(self, this):
5609 self.this = this
5610 if not hasattr(self,"thisown"): self.thisown = 0
5611 self.__class__ = AcceleratorTable
5612 _core_.AcceleratorTable_swigregister(AcceleratorTablePtr)
5613
5614
5615 def GetAccelFromString(*args, **kwargs):
5616 """GetAccelFromString(String label) -> AcceleratorEntry"""
5617 return _core_.GetAccelFromString(*args, **kwargs)
5618 #---------------------------------------------------------------------------
5619
5620 class VisualAttributes(object):
5621 """struct containing all the visual attributes of a control"""
5622 def __repr__(self):
5623 return "<%s.%s; proxy of C++ wxVisualAttributes instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
5624 def __init__(self, *args, **kwargs):
5625 """
5626 __init__(self) -> VisualAttributes
5627
5628 struct containing all the visual attributes of a control
5629 """
5630 newobj = _core_.new_VisualAttributes(*args, **kwargs)
5631 self.this = newobj.this
5632 self.thisown = 1
5633 del newobj.thisown
5634 def __del__(self, destroy=_core_.delete_VisualAttributes):
5635 """__del__(self)"""
5636 try:
5637 if self.thisown: destroy(self)
5638 except: pass
5639
5640 font = property(_core_.VisualAttributes_font_get, _core_.VisualAttributes_font_set)
5641 colFg = property(_core_.VisualAttributes_colFg_get, _core_.VisualAttributes_colFg_set)
5642 colBg = property(_core_.VisualAttributes_colBg_get, _core_.VisualAttributes_colBg_set)
5643
5644 class VisualAttributesPtr(VisualAttributes):
5645 def __init__(self, this):
5646 self.this = this
5647 if not hasattr(self,"thisown"): self.thisown = 0
5648 self.__class__ = VisualAttributes
5649 _core_.VisualAttributes_swigregister(VisualAttributesPtr)
5650 NullAcceleratorTable = cvar.NullAcceleratorTable
5651 PanelNameStr = cvar.PanelNameStr
5652
5653 WINDOW_VARIANT_NORMAL = _core_.WINDOW_VARIANT_NORMAL
5654 WINDOW_VARIANT_SMALL = _core_.WINDOW_VARIANT_SMALL
5655 WINDOW_VARIANT_MINI = _core_.WINDOW_VARIANT_MINI
5656 WINDOW_VARIANT_LARGE = _core_.WINDOW_VARIANT_LARGE
5657 WINDOW_VARIANT_MAX = _core_.WINDOW_VARIANT_MAX
5658 class Window(EvtHandler):
5659 """
5660 wx.Window is the base class for all windows and represents any visible
5661 object on the screen. All controls, top level windows and so on are
5662 wx.Windows. Sizers and device contexts are not however, as they don't
5663 appear on screen themselves.
5664
5665 """
5666 def __repr__(self):
5667 return "<%s.%s; proxy of C++ wxWindow instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
5668 def __init__(self, *args, **kwargs):
5669 """
5670 __init__(self, Window parent, int id=-1, Point pos=DefaultPosition,
5671 Size size=DefaultSize, long style=0, String name=PanelNameStr) -> Window
5672
5673 Construct and show a generic Window.
5674 """
5675 newobj = _core_.new_Window(*args, **kwargs)
5676 self.this = newobj.this
5677 self.thisown = 1
5678 del newobj.thisown
5679 self._setOORInfo(self)
5680
5681 def Create(*args, **kwargs):
5682 """
5683 Create(self, Window parent, int id=-1, Point pos=DefaultPosition,
5684 Size size=DefaultSize, long style=0, String name=PanelNameStr) -> bool
5685
5686 Create the GUI part of the Window for 2-phase creation mode.
5687 """
5688 return _core_.Window_Create(*args, **kwargs)
5689
5690 def Close(*args, **kwargs):
5691 """
5692 Close(self, bool force=False) -> bool
5693
5694 This function simply generates a EVT_CLOSE event whose handler usually
5695 tries to close the window. It doesn't close the window itself,
5696 however. If force is False (the default) then the window's close
5697 handler will be allowed to veto the destruction of the window.
5698 """
5699 return _core_.Window_Close(*args, **kwargs)
5700
5701 def Destroy(*args, **kwargs):
5702 """
5703 Destroy(self) -> bool
5704
5705 Destroys the window safely. Frames and dialogs are not destroyed
5706 immediately when this function is called -- they are added to a list
5707 of windows to be deleted on idle time, when all the window's events
5708 have been processed. This prevents problems with events being sent to
5709 non-existent windows.
5710
5711 Returns True if the window has either been successfully deleted, or it
5712 has been added to the list of windows pending real deletion.
5713 """
5714 return _core_.Window_Destroy(*args, **kwargs)
5715
5716 def DestroyChildren(*args, **kwargs):
5717 """
5718 DestroyChildren(self) -> bool
5719
5720 Destroys all children of a window. Called automatically by the
5721 destructor.
5722 """
5723 return _core_.Window_DestroyChildren(*args, **kwargs)
5724
5725 def IsBeingDeleted(*args, **kwargs):
5726 """
5727 IsBeingDeleted(self) -> bool
5728
5729 Is the window in the process of being deleted?
5730 """
5731 return _core_.Window_IsBeingDeleted(*args, **kwargs)
5732
5733 def SetTitle(*args, **kwargs):
5734 """
5735 SetTitle(self, String title)
5736
5737 Sets the window's title. Applicable only to frames and dialogs.
5738 """
5739 return _core_.Window_SetTitle(*args, **kwargs)
5740
5741 def GetTitle(*args, **kwargs):
5742 """
5743 GetTitle(self) -> String
5744
5745 Gets the window's title. Applicable only to frames and dialogs.
5746 """
5747 return _core_.Window_GetTitle(*args, **kwargs)
5748
5749 def SetLabel(*args, **kwargs):
5750 """
5751 SetLabel(self, String label)
5752
5753 Set the text which the window shows in its label if applicable.
5754 """
5755 return _core_.Window_SetLabel(*args, **kwargs)
5756
5757 def GetLabel(*args, **kwargs):
5758 """
5759 GetLabel(self) -> String
5760
5761 Generic way of getting a label from any window, for identification
5762 purposes. The interpretation of this function differs from class to
5763 class. For frames and dialogs, the value returned is the title. For
5764 buttons or static text controls, it is the button text. This function
5765 can be useful for meta-programs such as testing tools or special-needs
5766 access programs)which need to identify windows by name.
5767 """
5768 return _core_.Window_GetLabel(*args, **kwargs)
5769
5770 def SetName(*args, **kwargs):
5771 """
5772 SetName(self, String name)
5773
5774 Sets the window's name. The window name is used for ressource setting
5775 in X, it is not the same as the window title/label
5776 """
5777 return _core_.Window_SetName(*args, **kwargs)
5778
5779 def GetName(*args, **kwargs):
5780 """
5781 GetName(self) -> String
5782
5783 Returns the windows name. This name is not guaranteed to be unique;
5784 it is up to the programmer to supply an appropriate name in the window
5785 constructor or via wx.Window.SetName.
5786 """
5787 return _core_.Window_GetName(*args, **kwargs)
5788
5789 def SetWindowVariant(*args, **kwargs):
5790 """
5791 SetWindowVariant(self, int variant)
5792
5793 Sets the variant of the window/font size to use for this window, if
5794 the platform supports variants, for example, wxMac.
5795 """
5796 return _core_.Window_SetWindowVariant(*args, **kwargs)
5797
5798 def GetWindowVariant(*args, **kwargs):
5799 """GetWindowVariant(self) -> int"""
5800 return _core_.Window_GetWindowVariant(*args, **kwargs)
5801
5802 def SetId(*args, **kwargs):
5803 """
5804 SetId(self, int winid)
5805
5806 Sets the identifier of the window. Each window has an integer
5807 identifier. If the application has not provided one, an identifier
5808 will be generated. Normally, the identifier should be provided on
5809 creation and should not be modified subsequently.
5810 """
5811 return _core_.Window_SetId(*args, **kwargs)
5812
5813 def GetId(*args, **kwargs):
5814 """
5815 GetId(self) -> int
5816
5817 Returns the identifier of the window. Each window has an integer
5818 identifier. If the application has not provided one (or the default Id
5819 -1 is used) then an unique identifier with a negative value will be
5820 generated.
5821 """
5822 return _core_.Window_GetId(*args, **kwargs)
5823
5824 def NewControlId(*args, **kwargs):
5825 """
5826 NewControlId() -> int
5827
5828 Generate a control id for the controls which were not given one.
5829 """
5830 return _core_.Window_NewControlId(*args, **kwargs)
5831
5832 NewControlId = staticmethod(NewControlId)
5833 def NextControlId(*args, **kwargs):
5834 """
5835 NextControlId(int winid) -> int
5836
5837 Get the id of the control following the one with the given
5838 autogenerated) id
5839 """
5840 return _core_.Window_NextControlId(*args, **kwargs)
5841
5842 NextControlId = staticmethod(NextControlId)
5843 def PrevControlId(*args, **kwargs):
5844 """
5845 PrevControlId(int winid) -> int
5846
5847 Get the id of the control preceding the one with the given
5848 autogenerated) id
5849 """
5850 return _core_.Window_PrevControlId(*args, **kwargs)
5851
5852 PrevControlId = staticmethod(PrevControlId)
5853 def SetSize(*args, **kwargs):
5854 """
5855 SetSize(self, Size size)
5856
5857 Sets the size of the window in pixels.
5858 """
5859 return _core_.Window_SetSize(*args, **kwargs)
5860
5861 def SetDimensions(*args, **kwargs):
5862 """
5863 SetDimensions(self, int x, int y, int width, int height, int sizeFlags=SIZE_AUTO)
5864
5865 Sets the position and size of the window in pixels. The sizeFlags
5866 parameter indicates the interpretation of the other params if they are
5867 -1. wx.SIZE_AUTO*: a -1 indicates that a class-specific default
5868 shoudl be used. wx.SIZE_USE_EXISTING: existing dimensions should be
5869 used if -1 values are supplied. wxSIZE_ALLOW_MINUS_ONE: allow
5870 dimensions of -1 and less to be interpreted as real dimensions, not
5871 default values.
5872 """
5873 return _core_.Window_SetDimensions(*args, **kwargs)
5874
5875 def SetRect(*args, **kwargs):
5876 """
5877 SetRect(self, Rect rect, int sizeFlags=SIZE_AUTO)
5878
5879 Sets the position and size of the window in pixels using a wx.Rect.
5880 """
5881 return _core_.Window_SetRect(*args, **kwargs)
5882
5883 def SetSizeWH(*args, **kwargs):
5884 """
5885 SetSizeWH(self, int width, int height)
5886
5887 Sets the size of the window in pixels.
5888 """
5889 return _core_.Window_SetSizeWH(*args, **kwargs)
5890
5891 def Move(*args, **kwargs):
5892 """
5893 Move(self, Point pt, int flags=SIZE_USE_EXISTING)
5894
5895 Moves the window to the given position.
5896 """
5897 return _core_.Window_Move(*args, **kwargs)
5898
5899 SetPosition = Move
5900 def MoveXY(*args, **kwargs):
5901 """
5902 MoveXY(self, int x, int y, int flags=SIZE_USE_EXISTING)
5903
5904 Moves the window to the given position.
5905 """
5906 return _core_.Window_MoveXY(*args, **kwargs)
5907
5908 def SetBestFittingSize(*args, **kwargs):
5909 """
5910 SetBestFittingSize(self, Size size=DefaultSize)
5911
5912 A 'Smart' SetSize that will fill in default size components with the
5913 window's *best size* values. Also set's the minsize for use with sizers.
5914 """
5915 return _core_.Window_SetBestFittingSize(*args, **kwargs)
5916
5917 def Raise(*args, **kwargs):
5918 """
5919 Raise(self)
5920
5921 Raises the window to the top of the window hierarchy if it is a
5922 managed window (dialog or frame).
5923 """
5924 return _core_.Window_Raise(*args, **kwargs)
5925
5926 def Lower(*args, **kwargs):
5927 """
5928 Lower(self)
5929
5930 Lowers the window to the bottom of the window hierarchy if it is a
5931 managed window (dialog or frame).
5932 """
5933 return _core_.Window_Lower(*args, **kwargs)
5934
5935 def SetClientSize(*args, **kwargs):
5936 """
5937 SetClientSize(self, Size size)
5938
5939 This sets the size of the window client area in pixels. Using this
5940 function to size a window tends to be more device-independent than
5941 wx.Window.SetSize, since the application need not worry about what
5942 dimensions the border or title bar have when trying to fit the window
5943 around panel items, for example.
5944 """
5945 return _core_.Window_SetClientSize(*args, **kwargs)
5946
5947 def SetClientSizeWH(*args, **kwargs):
5948 """
5949 SetClientSizeWH(self, int width, int height)
5950
5951 This sets the size of the window client area in pixels. Using this
5952 function to size a window tends to be more device-independent than
5953 wx.Window.SetSize, since the application need not worry about what
5954 dimensions the border or title bar have when trying to fit the window
5955 around panel items, for example.
5956 """
5957 return _core_.Window_SetClientSizeWH(*args, **kwargs)
5958
5959 def SetClientRect(*args, **kwargs):
5960 """
5961 SetClientRect(self, Rect rect)
5962
5963 This sets the size of the window client area in pixels. Using this
5964 function to size a window tends to be more device-independent than
5965 wx.Window.SetSize, since the application need not worry about what
5966 dimensions the border or title bar have when trying to fit the window
5967 around panel items, for example.
5968 """
5969 return _core_.Window_SetClientRect(*args, **kwargs)
5970
5971 def GetPosition(*args, **kwargs):
5972 """
5973 GetPosition(self) -> Point
5974
5975 Get the window's position.
5976 """
5977 return _core_.Window_GetPosition(*args, **kwargs)
5978
5979 def GetPositionTuple(*args, **kwargs):
5980 """
5981 GetPositionTuple() -> (x,y)
5982
5983 Get the window's position.
5984 """
5985 return _core_.Window_GetPositionTuple(*args, **kwargs)
5986
5987 def GetSize(*args, **kwargs):
5988 """
5989 GetSize(self) -> Size
5990
5991 Get the window size.
5992 """
5993 return _core_.Window_GetSize(*args, **kwargs)
5994
5995 def GetSizeTuple(*args, **kwargs):
5996 """
5997 GetSizeTuple() -> (width, height)
5998
5999 Get the window size.
6000 """
6001 return _core_.Window_GetSizeTuple(*args, **kwargs)
6002
6003 def GetRect(*args, **kwargs):
6004 """
6005 GetRect(self) -> Rect
6006
6007 Returns the size and position of the window as a wx.Rect object.
6008 """
6009 return _core_.Window_GetRect(*args, **kwargs)
6010
6011 def GetClientSize(*args, **kwargs):
6012 """
6013 GetClientSize(self) -> Size
6014
6015 This gets the size of the window's 'client area' in pixels. The client
6016 area is the area which may be drawn on by the programmer, excluding
6017 title bar, border, scrollbars, etc.
6018 """
6019 return _core_.Window_GetClientSize(*args, **kwargs)
6020
6021 def GetClientSizeTuple(*args, **kwargs):
6022 """
6023 GetClientSizeTuple() -> (width, height)
6024
6025 This gets the size of the window's 'client area' in pixels. The client
6026 area is the area which may be drawn on by the programmer, excluding
6027 title bar, border, scrollbars, etc.
6028 """
6029 return _core_.Window_GetClientSizeTuple(*args, **kwargs)
6030
6031 def GetClientAreaOrigin(*args, **kwargs):
6032 """
6033 GetClientAreaOrigin(self) -> Point
6034
6035 Get the origin of the client area of the window relative to the
6036 window's top left corner (the client area may be shifted because of
6037 the borders, scrollbars, other decorations...)
6038 """
6039 return _core_.Window_GetClientAreaOrigin(*args, **kwargs)
6040
6041 def GetClientRect(*args, **kwargs):
6042 """
6043 GetClientRect(self) -> Rect
6044
6045 Get the client area position and size as a `wx.Rect` object.
6046 """
6047 return _core_.Window_GetClientRect(*args, **kwargs)
6048
6049 def GetBestSize(*args, **kwargs):
6050 """
6051 GetBestSize(self) -> Size
6052
6053 This function returns the best acceptable minimal size for the
6054 window, if applicable. For example, for a static text control, it will
6055 be the minimal size such that the control label is not truncated. For
6056 windows containing subwindows (suzh aswx.Panel), the size returned by
6057 this function will be the same as the size the window would have had
6058 after calling Fit.
6059 """
6060 return _core_.Window_GetBestSize(*args, **kwargs)
6061
6062 def GetBestSizeTuple(*args, **kwargs):
6063 """
6064 GetBestSizeTuple() -> (width, height)
6065
6066 This function returns the best acceptable minimal size for the
6067 window, if applicable. For example, for a static text control, it will
6068 be the minimal size such that the control label is not truncated. For
6069 windows containing subwindows (suzh aswx.Panel), the size returned by
6070 this function will be the same as the size the window would have had
6071 after calling Fit.
6072 """
6073 return _core_.Window_GetBestSizeTuple(*args, **kwargs)
6074
6075 def InvalidateBestSize(*args, **kwargs):
6076 """
6077 InvalidateBestSize(self)
6078
6079 Reset the cached best size value so it will be recalculated the next
6080 time it is needed.
6081 """
6082 return _core_.Window_InvalidateBestSize(*args, **kwargs)
6083
6084 def GetBestFittingSize(*args, **kwargs):
6085 """
6086 GetBestFittingSize(self) -> Size
6087
6088 This function will merge the window's best size into the window's
6089 minimum size, giving priority to the min size components, and returns
6090 the results.
6091
6092 """
6093 return _core_.Window_GetBestFittingSize(*args, **kwargs)
6094
6095 def GetAdjustedBestSize(*args, **kwargs):
6096 """
6097 GetAdjustedBestSize(self) -> Size
6098
6099 This method is similar to GetBestSize, except in one
6100 thing. GetBestSize should return the minimum untruncated size of the
6101 window, while this method will return the largest of BestSize and any
6102 user specified minimum size. ie. it is the minimum size the window
6103 should currently be drawn at, not the minimal size it can possibly
6104 tolerate.
6105 """
6106 return _core_.Window_GetAdjustedBestSize(*args, **kwargs)
6107
6108 def Center(*args, **kwargs):
6109 """
6110 Center(self, int direction=BOTH)
6111
6112 Centers the window. The parameter specifies the direction for
6113 cetering, and may be wx.HORIZONTAL, wx.VERTICAL or wx.BOTH. It may
6114 also include wx.CENTER_ON_SCREEN flag if you want to center the window
6115 on the entire screen and not on its parent window. If it is a
6116 top-level window and has no parent then it will always be centered
6117 relative to the screen.
6118 """
6119 return _core_.Window_Center(*args, **kwargs)
6120
6121 Centre = Center
6122 def CenterOnScreen(*args, **kwargs):
6123 """
6124 CenterOnScreen(self, int dir=BOTH)
6125
6126 Center on screen (only works for top level windows)
6127 """
6128 return _core_.Window_CenterOnScreen(*args, **kwargs)
6129
6130 CentreOnScreen = CenterOnScreen
6131 def CenterOnParent(*args, **kwargs):
6132 """
6133 CenterOnParent(self, int dir=BOTH)
6134
6135 Center with respect to the the parent window
6136 """
6137 return _core_.Window_CenterOnParent(*args, **kwargs)
6138
6139 CentreOnParent = CenterOnParent
6140 def Fit(*args, **kwargs):
6141 """
6142 Fit(self)
6143
6144 Sizes the window so that it fits around its subwindows. This function
6145 won't do anything if there are no subwindows and will only really work
6146 correctly if sizers are used for the subwindows layout. Also, if the
6147 window has exactly one subwindow it is better (faster and the result
6148 is more precise as Fit adds some margin to account for fuzziness of
6149 its calculations) to call window.SetClientSize(child.GetSize())
6150 instead of calling Fit.
6151 """
6152 return _core_.Window_Fit(*args, **kwargs)
6153
6154 def FitInside(*args, **kwargs):
6155 """
6156 FitInside(self)
6157
6158 Similar to Fit, but sizes the interior (virtual) size of a
6159 window. Mainly useful with scrolled windows to reset scrollbars after
6160 sizing changes that do not trigger a size event, and/or scrolled
6161 windows without an interior sizer. This function similarly won't do
6162 anything if there are no subwindows.
6163 """
6164 return _core_.Window_FitInside(*args, **kwargs)
6165
6166 def SetSizeHints(*args, **kwargs):
6167 """
6168 SetSizeHints(self, int minW, int minH, int maxW=-1, int maxH=-1, int incW=-1,
6169 int incH=-1)
6170
6171 Allows specification of minimum and maximum window sizes, and window
6172 size increments. If a pair of values is not set (or set to -1), the
6173 default values will be used. If this function is called, the user
6174 will not be able to size the window outside the given bounds (if it is
6175 a top-level window.) Sizers will also inspect the minimum window size
6176 and will use that value if set when calculating layout.
6177
6178 The resizing increments are only significant under Motif or Xt.
6179 """
6180 return _core_.Window_SetSizeHints(*args, **kwargs)
6181
6182 def SetSizeHintsSz(*args, **kwargs):
6183 """
6184 SetSizeHintsSz(self, Size minSize, Size maxSize=DefaultSize, Size incSize=DefaultSize)
6185
6186 Allows specification of minimum and maximum window sizes, and window
6187 size increments. If a pair of values is not set (or set to -1), the
6188 default values will be used. If this function is called, the user
6189 will not be able to size the window outside the given bounds (if it is
6190 a top-level window.) Sizers will also inspect the minimum window size
6191 and will use that value if set when calculating layout.
6192
6193 The resizing increments are only significant under Motif or Xt.
6194 """
6195 return _core_.Window_SetSizeHintsSz(*args, **kwargs)
6196
6197 def SetVirtualSizeHints(*args, **kwargs):
6198 """
6199 SetVirtualSizeHints(self, int minW, int minH, int maxW=-1, int maxH=-1)
6200
6201 Allows specification of minimum and maximum virtual window sizes. If a
6202 pair of values is not set (or set to -1), the default values will be
6203 used. If this function is called, the user will not be able to size
6204 the virtual area of the window outside the given bounds.
6205 """
6206 return _core_.Window_SetVirtualSizeHints(*args, **kwargs)
6207
6208 def SetVirtualSizeHintsSz(*args, **kwargs):
6209 """
6210 SetVirtualSizeHintsSz(self, Size minSize, Size maxSize=DefaultSize)
6211
6212 Allows specification of minimum and maximum virtual window sizes. If a
6213 pair of values is not set (or set to -1), the default values will be
6214 used. If this function is called, the user will not be able to size
6215 the virtual area of the window outside the given bounds.
6216 """
6217 return _core_.Window_SetVirtualSizeHintsSz(*args, **kwargs)
6218
6219 def GetMaxSize(*args, **kwargs):
6220 """GetMaxSize(self) -> Size"""
6221 return _core_.Window_GetMaxSize(*args, **kwargs)
6222
6223 def GetMinSize(*args, **kwargs):
6224 """GetMinSize(self) -> Size"""
6225 return _core_.Window_GetMinSize(*args, **kwargs)
6226
6227 def SetMinSize(*args, **kwargs):
6228 """
6229 SetMinSize(self, Size minSize)
6230
6231 A more convenient method than `SetSizeHints` for setting just the
6232 min size.
6233 """
6234 return _core_.Window_SetMinSize(*args, **kwargs)
6235
6236 def SetMaxSize(*args, **kwargs):
6237 """
6238 SetMaxSize(self, Size maxSize)
6239
6240 A more convenient method than `SetSizeHints` for setting just the
6241 max size.
6242 """
6243 return _core_.Window_SetMaxSize(*args, **kwargs)
6244
6245 def GetMinWidth(*args, **kwargs):
6246 """GetMinWidth(self) -> int"""
6247 return _core_.Window_GetMinWidth(*args, **kwargs)
6248
6249 def GetMinHeight(*args, **kwargs):
6250 """GetMinHeight(self) -> int"""
6251 return _core_.Window_GetMinHeight(*args, **kwargs)
6252
6253 def GetMaxWidth(*args, **kwargs):
6254 """GetMaxWidth(self) -> int"""
6255 return _core_.Window_GetMaxWidth(*args, **kwargs)
6256
6257 def GetMaxHeight(*args, **kwargs):
6258 """GetMaxHeight(self) -> int"""
6259 return _core_.Window_GetMaxHeight(*args, **kwargs)
6260
6261 def SetVirtualSize(*args, **kwargs):
6262 """
6263 SetVirtualSize(self, Size size)
6264
6265 Set the the virtual size of a window in pixels. For most windows this
6266 is just the client area of the window, but for some like scrolled
6267 windows it is more or less independent of the screen window size.
6268 """
6269 return _core_.Window_SetVirtualSize(*args, **kwargs)
6270
6271 def SetVirtualSizeWH(*args, **kwargs):
6272 """
6273 SetVirtualSizeWH(self, int w, int h)
6274
6275 Set the the virtual size of a window in pixels. For most windows this
6276 is just the client area of the window, but for some like scrolled
6277 windows it is more or less independent of the screen window size.
6278 """
6279 return _core_.Window_SetVirtualSizeWH(*args, **kwargs)
6280
6281 def GetVirtualSize(*args, **kwargs):
6282 """
6283 GetVirtualSize(self) -> Size
6284
6285 Get the the virtual size of the window in pixels. For most windows
6286 this is just the client area of the window, but for some like scrolled
6287 windows it is more or less independent of the screen window size.
6288 """
6289 return _core_.Window_GetVirtualSize(*args, **kwargs)
6290
6291 def GetVirtualSizeTuple(*args, **kwargs):
6292 """
6293 GetVirtualSizeTuple() -> (width, height)
6294
6295 Get the the virtual size of the window in pixels. For most windows
6296 this is just the client area of the window, but for some like scrolled
6297 windows it is more or less independent of the screen window size.
6298 """
6299 return _core_.Window_GetVirtualSizeTuple(*args, **kwargs)
6300
6301 def GetBestVirtualSize(*args, **kwargs):
6302 """
6303 GetBestVirtualSize(self) -> Size
6304
6305 Return the largest of ClientSize and BestSize (as determined by a
6306 sizer, interior children, or other means)
6307 """
6308 return _core_.Window_GetBestVirtualSize(*args, **kwargs)
6309
6310 def Show(*args, **kwargs):
6311 """
6312 Show(self, bool show=True) -> bool
6313
6314 Shows or hides the window. You may need to call Raise for a top level
6315 window if you want to bring it to top, although this is not needed if
6316 Show is called immediately after the frame creation. Returns True if
6317 the window has been shown or hidden or False if nothing was done
6318 because it already was in the requested state.
6319 """
6320 return _core_.Window_Show(*args, **kwargs)
6321
6322 def Hide(*args, **kwargs):
6323 """
6324 Hide(self) -> bool
6325
6326 Equivalent to calling Show(False).
6327 """
6328 return _core_.Window_Hide(*args, **kwargs)
6329
6330 def Enable(*args, **kwargs):
6331 """
6332 Enable(self, bool enable=True) -> bool
6333
6334 Enable or disable the window for user input. Note that when a parent
6335 window is disabled, all of its children are disabled as well and they
6336 are reenabled again when the parent is. Returns true if the window
6337 has been enabled or disabled, false if nothing was done, i.e. if the
6338 window had already been in the specified state.
6339 """
6340 return _core_.Window_Enable(*args, **kwargs)
6341
6342 def Disable(*args, **kwargs):
6343 """
6344 Disable(self) -> bool
6345
6346 Disables the window, same as Enable(false).
6347 """
6348 return _core_.Window_Disable(*args, **kwargs)
6349
6350 def IsShown(*args, **kwargs):
6351 """
6352 IsShown(self) -> bool
6353
6354 Returns true if the window is shown, false if it has been hidden.
6355 """
6356 return _core_.Window_IsShown(*args, **kwargs)
6357
6358 def IsEnabled(*args, **kwargs):
6359 """
6360 IsEnabled(self) -> bool
6361
6362 Returns true if the window is enabled for input, false otherwise.
6363 """
6364 return _core_.Window_IsEnabled(*args, **kwargs)
6365
6366 def SetWindowStyleFlag(*args, **kwargs):
6367 """
6368 SetWindowStyleFlag(self, long style)
6369
6370 Sets the style of the window. Please note that some styles cannot be
6371 changed after the window creation and that Refresh() might need to be
6372 called after changing the others for the change to take place
6373 immediately.
6374 """
6375 return _core_.Window_SetWindowStyleFlag(*args, **kwargs)
6376
6377 def GetWindowStyleFlag(*args, **kwargs):
6378 """
6379 GetWindowStyleFlag(self) -> long
6380
6381 Gets the window style that was passed to the constructor or Create
6382 method.
6383 """
6384 return _core_.Window_GetWindowStyleFlag(*args, **kwargs)
6385
6386 SetWindowStyle = SetWindowStyleFlag; GetWindowStyle = GetWindowStyleFlag
6387 def HasFlag(*args, **kwargs):
6388 """
6389 HasFlag(self, int flag) -> bool
6390
6391 Test if the given style is set for this window.
6392 """
6393 return _core_.Window_HasFlag(*args, **kwargs)
6394
6395 def IsRetained(*args, **kwargs):
6396 """
6397 IsRetained(self) -> bool
6398
6399 Returns true if the window is retained, false otherwise. Retained
6400 windows are only available on X platforms.
6401 """
6402 return _core_.Window_IsRetained(*args, **kwargs)
6403
6404 def SetExtraStyle(*args, **kwargs):
6405 """
6406 SetExtraStyle(self, long exStyle)
6407
6408 Sets the extra style bits for the window. Extra styles are the less
6409 often used style bits which can't be set with the constructor or with
6410 SetWindowStyleFlag()
6411 """
6412 return _core_.Window_SetExtraStyle(*args, **kwargs)
6413
6414 def GetExtraStyle(*args, **kwargs):
6415 """
6416 GetExtraStyle(self) -> long
6417
6418 Returns the extra style bits for the window.
6419 """
6420 return _core_.Window_GetExtraStyle(*args, **kwargs)
6421
6422 def MakeModal(*args, **kwargs):
6423 """
6424 MakeModal(self, bool modal=True)
6425
6426 Disables all other windows in the application so that the user can
6427 only interact with this window. Passing False will reverse this
6428 effect.
6429 """
6430 return _core_.Window_MakeModal(*args, **kwargs)
6431
6432 def SetThemeEnabled(*args, **kwargs):
6433 """
6434 SetThemeEnabled(self, bool enableTheme)
6435
6436 This function tells a window if it should use the system's "theme"
6437 code to draw the windows' background instead if its own background
6438 drawing code. This will only have an effect on platforms that support
6439 the notion of themes in user defined windows. One such platform is
6440 GTK+ where windows can have (very colourful) backgrounds defined by a
6441 user's selected theme.
6442
6443 Dialogs, notebook pages and the status bar have this flag set to true
6444 by default so that the default look and feel is simulated best.
6445 """
6446 return _core_.Window_SetThemeEnabled(*args, **kwargs)
6447
6448 def GetThemeEnabled(*args, **kwargs):
6449 """
6450 GetThemeEnabled(self) -> bool
6451
6452 Return the themeEnabled flag.
6453 """
6454 return _core_.Window_GetThemeEnabled(*args, **kwargs)
6455
6456 def SetFocus(*args, **kwargs):
6457 """
6458 SetFocus(self)
6459
6460 Set's the focus to this window, allowing it to receive keyboard input.
6461 """
6462 return _core_.Window_SetFocus(*args, **kwargs)
6463
6464 def SetFocusFromKbd(*args, **kwargs):
6465 """
6466 SetFocusFromKbd(self)
6467
6468 Set focus to this window as the result of a keyboard action. Normally
6469 only called internally.
6470 """
6471 return _core_.Window_SetFocusFromKbd(*args, **kwargs)
6472
6473 def FindFocus(*args, **kwargs):
6474 """
6475 FindFocus() -> Window
6476
6477 Returns the window or control that currently has the keyboard focus,
6478 or None.
6479 """
6480 return _core_.Window_FindFocus(*args, **kwargs)
6481
6482 FindFocus = staticmethod(FindFocus)
6483 def AcceptsFocus(*args, **kwargs):
6484 """
6485 AcceptsFocus(self) -> bool
6486
6487 Can this window have focus?
6488 """
6489 return _core_.Window_AcceptsFocus(*args, **kwargs)
6490
6491 def AcceptsFocusFromKeyboard(*args, **kwargs):
6492 """
6493 AcceptsFocusFromKeyboard(self) -> bool
6494
6495 Can this window be given focus by keyboard navigation? if not, the
6496 only way to give it focus (provided it accepts it at all) is to click
6497 it.
6498 """
6499 return _core_.Window_AcceptsFocusFromKeyboard(*args, **kwargs)
6500
6501 def GetDefaultItem(*args, **kwargs):
6502 """
6503 GetDefaultItem(self) -> Window
6504
6505 Get the default child of this parent, i.e. the one which is activated
6506 by pressing <Enter> such as the OK button on a wx.Dialog.
6507 """
6508 return _core_.Window_GetDefaultItem(*args, **kwargs)
6509
6510 def SetDefaultItem(*args, **kwargs):
6511 """
6512 SetDefaultItem(self, Window child) -> Window
6513
6514 Set this child as default, return the old default.
6515 """
6516 return _core_.Window_SetDefaultItem(*args, **kwargs)
6517
6518 def SetTmpDefaultItem(*args, **kwargs):
6519 """
6520 SetTmpDefaultItem(self, Window win)
6521
6522 Set this child as temporary default
6523 """
6524 return _core_.Window_SetTmpDefaultItem(*args, **kwargs)
6525
6526 def Navigate(*args, **kwargs):
6527 """
6528 Navigate(self, int flags=NavigationKeyEvent.IsForward) -> bool
6529
6530 Does keyboard navigation from this window to another, by sending a
6531 `wx.NavigationKeyEvent`.
6532 """
6533 return _core_.Window_Navigate(*args, **kwargs)
6534
6535 def MoveAfterInTabOrder(*args, **kwargs):
6536 """
6537 MoveAfterInTabOrder(self, Window win)
6538
6539 Moves this window in the tab navigation order after the specified
6540 sibling window. This means that when the user presses the TAB key on
6541 that other window, the focus switches to this window.
6542
6543 The default tab order is the same as creation order. This function
6544 and `MoveBeforeInTabOrder` allow to change it after creating all the
6545 windows.
6546
6547 """
6548 return _core_.Window_MoveAfterInTabOrder(*args, **kwargs)
6549
6550 def MoveBeforeInTabOrder(*args, **kwargs):
6551 """
6552 MoveBeforeInTabOrder(self, Window win)
6553
6554 Same as `MoveAfterInTabOrder` except that it inserts this window just
6555 before win instead of putting it right after it.
6556 """
6557 return _core_.Window_MoveBeforeInTabOrder(*args, **kwargs)
6558
6559 def GetChildren(*args, **kwargs):
6560 """
6561 GetChildren(self) -> PyObject
6562
6563 Returns a list of the window's children. NOTE: Currently this is a
6564 copy of the child window list maintained by the window, so the return
6565 value of this function is only valid as long as the window's children
6566 do not change.
6567 """
6568 return _core_.Window_GetChildren(*args, **kwargs)
6569
6570 def GetParent(*args, **kwargs):
6571 """
6572 GetParent(self) -> Window
6573
6574 Returns the parent window of this window, or None if there isn't one.
6575 """
6576 return _core_.Window_GetParent(*args, **kwargs)
6577
6578 def GetGrandParent(*args, **kwargs):
6579 """
6580 GetGrandParent(self) -> Window
6581
6582 Returns the parent of the parent of this window, or None if there
6583 isn't one.
6584 """
6585 return _core_.Window_GetGrandParent(*args, **kwargs)
6586
6587 def IsTopLevel(*args, **kwargs):
6588 """
6589 IsTopLevel(self) -> bool
6590
6591 Returns true if the given window is a top-level one. Currently all
6592 frames and dialogs are always considered to be top-level windows (even
6593 if they have a parent window).
6594 """
6595 return _core_.Window_IsTopLevel(*args, **kwargs)
6596
6597 def Reparent(*args, **kwargs):
6598 """
6599 Reparent(self, Window newParent) -> bool
6600
6601 Reparents the window, i.e the window will be removed from its current
6602 parent window (e.g. a non-standard toolbar in a wxFrame) and then
6603 re-inserted into another. Available on Windows and GTK. Returns True
6604 if the parent was changed, False otherwise (error or newParent ==
6605 oldParent)
6606 """
6607 return _core_.Window_Reparent(*args, **kwargs)
6608
6609 def AddChild(*args, **kwargs):
6610 """
6611 AddChild(self, Window child)
6612
6613 Adds a child window. This is called automatically by window creation
6614 functions so should not be required by the application programmer.
6615 """
6616 return _core_.Window_AddChild(*args, **kwargs)
6617
6618 def RemoveChild(*args, **kwargs):
6619 """
6620 RemoveChild(self, Window child)
6621
6622 Removes a child window. This is called automatically by window
6623 deletion functions so should not be required by the application
6624 programmer.
6625 """
6626 return _core_.Window_RemoveChild(*args, **kwargs)
6627
6628 def FindWindowById(*args, **kwargs):
6629 """
6630 FindWindowById(self, long winid) -> Window
6631
6632 Find a chld of this window by window ID
6633 """
6634 return _core_.Window_FindWindowById(*args, **kwargs)
6635
6636 def FindWindowByName(*args, **kwargs):
6637 """
6638 FindWindowByName(self, String name) -> Window
6639
6640 Find a child of this window by name
6641 """
6642 return _core_.Window_FindWindowByName(*args, **kwargs)
6643
6644 def GetEventHandler(*args, **kwargs):
6645 """
6646 GetEventHandler(self) -> EvtHandler
6647
6648 Returns the event handler for this window. By default, the window is
6649 its own event handler.
6650 """
6651 return _core_.Window_GetEventHandler(*args, **kwargs)
6652
6653 def SetEventHandler(*args, **kwargs):
6654 """
6655 SetEventHandler(self, EvtHandler handler)
6656
6657 Sets the event handler for this window. An event handler is an object
6658 that is capable of processing the events sent to a window. By default,
6659 the window is its own event handler, but an application may wish to
6660 substitute another, for example to allow central implementation of
6661 event-handling for a variety of different window classes.
6662
6663 It is usually better to use `wx.Window.PushEventHandler` since this sets
6664 up a chain of event handlers, where an event not handled by one event
6665 handler is handed to the next one in the chain.
6666 """
6667 return _core_.Window_SetEventHandler(*args, **kwargs)
6668
6669 def PushEventHandler(*args, **kwargs):
6670 """
6671 PushEventHandler(self, EvtHandler handler)
6672
6673 Pushes this event handler onto the event handler stack for the window.
6674 An event handler is an object that is capable of processing the events
6675 sent to a window. By default, the window is its own event handler, but
6676 an application may wish to substitute another, for example to allow
6677 central implementation of event-handling for a variety of different
6678 window classes.
6679
6680 wx.Window.PushEventHandler allows an application to set up a chain of
6681 event handlers, where an event not handled by one event handler is
6682 handed to the next one in the chain. Use `wx.Window.PopEventHandler` to
6683 remove the event handler.
6684 """
6685 return _core_.Window_PushEventHandler(*args, **kwargs)
6686
6687 def PopEventHandler(*args, **kwargs):
6688 """
6689 PopEventHandler(self, bool deleteHandler=False) -> EvtHandler
6690
6691 Removes and returns the top-most event handler on the event handler
6692 stack. If deleteHandler is True then the wx.EvtHandler object will be
6693 destroyed after it is popped.
6694 """
6695 return _core_.Window_PopEventHandler(*args, **kwargs)
6696
6697 def RemoveEventHandler(*args, **kwargs):
6698 """
6699 RemoveEventHandler(self, EvtHandler handler) -> bool
6700
6701 Find the given handler in the event handler chain and remove (but not
6702 delete) it from the event handler chain, return True if it was found
6703 and False otherwise (this also results in an assert failure so this
6704 function should only be called when the handler is supposed to be
6705 there.)
6706 """
6707 return _core_.Window_RemoveEventHandler(*args, **kwargs)
6708
6709 def SetValidator(*args, **kwargs):
6710 """
6711 SetValidator(self, Validator validator)
6712
6713 Deletes the current validator (if any) and sets the window validator,
6714 having called wx.Validator.Clone to create a new validator of this
6715 type.
6716 """
6717 return _core_.Window_SetValidator(*args, **kwargs)
6718
6719 def GetValidator(*args, **kwargs):
6720 """
6721 GetValidator(self) -> Validator
6722
6723 Returns a pointer to the current validator for the window, or None if
6724 there is none.
6725 """
6726 return _core_.Window_GetValidator(*args, **kwargs)
6727
6728 def Validate(*args, **kwargs):
6729 """
6730 Validate(self) -> bool
6731
6732 Validates the current values of the child controls using their
6733 validators. If the window has wx.WS_EX_VALIDATE_RECURSIVELY extra
6734 style flag set, the method will also call Validate() of all child
6735 windows. Returns false if any of the validations failed.
6736 """
6737 return _core_.Window_Validate(*args, **kwargs)
6738
6739 def TransferDataToWindow(*args, **kwargs):
6740 """
6741 TransferDataToWindow(self) -> bool
6742
6743 Transfers values to child controls from data areas specified by their
6744 validators. If the window has wx.WS_EX_VALIDATE_RECURSIVELY extra
6745 style flag set, the method will also call TransferDataToWindow() of
6746 all child windows.
6747 """
6748 return _core_.Window_TransferDataToWindow(*args, **kwargs)
6749
6750 def TransferDataFromWindow(*args, **kwargs):
6751 """
6752 TransferDataFromWindow(self) -> bool
6753
6754 Transfers values from child controls to data areas specified by their
6755 validators. Returns false if a transfer failed. If the window has
6756 wx.WS_EX_VALIDATE_RECURSIVELY extra style flag set, the method will
6757 also call TransferDataFromWindow() of all child windows.
6758 """
6759 return _core_.Window_TransferDataFromWindow(*args, **kwargs)
6760
6761 def InitDialog(*args, **kwargs):
6762 """
6763 InitDialog(self)
6764
6765 Sends an EVT_INIT_DIALOG event, whose handler usually transfers data
6766 to the dialog via validators.
6767 """
6768 return _core_.Window_InitDialog(*args, **kwargs)
6769
6770 def SetAcceleratorTable(*args, **kwargs):
6771 """
6772 SetAcceleratorTable(self, AcceleratorTable accel)
6773
6774 Sets the accelerator table for this window.
6775 """
6776 return _core_.Window_SetAcceleratorTable(*args, **kwargs)
6777
6778 def GetAcceleratorTable(*args, **kwargs):
6779 """
6780 GetAcceleratorTable(self) -> AcceleratorTable
6781
6782 Gets the accelerator table for this window.
6783 """
6784 return _core_.Window_GetAcceleratorTable(*args, **kwargs)
6785
6786 def RegisterHotKey(*args, **kwargs):
6787 """
6788 RegisterHotKey(self, int hotkeyId, int modifiers, int keycode) -> bool
6789
6790 Registers a system wide hotkey. Every time the user presses the hotkey
6791 registered here, this window will receive a hotkey event. It will
6792 receive the event even if the application is in the background and
6793 does not have the input focus because the user is working with some
6794 other application. To bind an event handler function to this hotkey
6795 use EVT_HOTKEY with an id equal to hotkeyId. Returns True if the
6796 hotkey was registered successfully.
6797 """
6798 return _core_.Window_RegisterHotKey(*args, **kwargs)
6799
6800 def UnregisterHotKey(*args, **kwargs):
6801 """
6802 UnregisterHotKey(self, int hotkeyId) -> bool
6803
6804 Unregisters a system wide hotkey.
6805 """
6806 return _core_.Window_UnregisterHotKey(*args, **kwargs)
6807
6808 def ConvertDialogPointToPixels(*args, **kwargs):
6809 """
6810 ConvertDialogPointToPixels(self, Point pt) -> Point
6811
6812 Converts a point or size from dialog units to pixels. Dialog units
6813 are used for maintaining a dialog's proportions even if the font
6814 changes. For the x dimension, the dialog units are multiplied by the
6815 average character width and then divided by 4. For the y dimension,
6816 the dialog units are multiplied by the average character height and
6817 then divided by 8.
6818 """
6819 return _core_.Window_ConvertDialogPointToPixels(*args, **kwargs)
6820
6821 def ConvertDialogSizeToPixels(*args, **kwargs):
6822 """
6823 ConvertDialogSizeToPixels(self, Size sz) -> Size
6824
6825 Converts a point or size from dialog units to pixels. Dialog units
6826 are used for maintaining a dialog's proportions even if the font
6827 changes. For the x dimension, the dialog units are multiplied by the
6828 average character width and then divided by 4. For the y dimension,
6829 the dialog units are multiplied by the average character height and
6830 then divided by 8.
6831 """
6832 return _core_.Window_ConvertDialogSizeToPixels(*args, **kwargs)
6833
6834 def DLG_PNT(*args, **kwargs):
6835 """
6836 DLG_PNT(self, Point pt) -> Point
6837
6838 Converts a point or size from dialog units to pixels. Dialog units
6839 are used for maintaining a dialog's proportions even if the font
6840 changes. For the x dimension, the dialog units are multiplied by the
6841 average character width and then divided by 4. For the y dimension,
6842 the dialog units are multiplied by the average character height and
6843 then divided by 8.
6844 """
6845 return _core_.Window_DLG_PNT(*args, **kwargs)
6846
6847 def DLG_SZE(*args, **kwargs):
6848 """
6849 DLG_SZE(self, Size sz) -> Size
6850
6851 Converts a point or size from dialog units to pixels. Dialog units
6852 are used for maintaining a dialog's proportions even if the font
6853 changes. For the x dimension, the dialog units are multiplied by the
6854 average character width and then divided by 4. For the y dimension,
6855 the dialog units are multiplied by the average character height and
6856 then divided by 8.
6857 """
6858 return _core_.Window_DLG_SZE(*args, **kwargs)
6859
6860 def ConvertPixelPointToDialog(*args, **kwargs):
6861 """ConvertPixelPointToDialog(self, Point pt) -> Point"""
6862 return _core_.Window_ConvertPixelPointToDialog(*args, **kwargs)
6863
6864 def ConvertPixelSizeToDialog(*args, **kwargs):
6865 """ConvertPixelSizeToDialog(self, Size sz) -> Size"""
6866 return _core_.Window_ConvertPixelSizeToDialog(*args, **kwargs)
6867
6868 def WarpPointer(*args, **kwargs):
6869 """
6870 WarpPointer(self, int x, int y)
6871
6872 Moves the pointer to the given position on the window.
6873
6874 NOTE: This function is not supported under Mac because Apple Human
6875 Interface Guidelines forbid moving the mouse cursor programmatically.
6876 """
6877 return _core_.Window_WarpPointer(*args, **kwargs)
6878
6879 def CaptureMouse(*args, **kwargs):
6880 """
6881 CaptureMouse(self)
6882
6883 Directs all mouse input to this window. Call wx.Window.ReleaseMouse to
6884 release the capture.
6885
6886 Note that wxWindows maintains the stack of windows having captured the
6887 mouse and when the mouse is released the capture returns to the window
6888 which had had captured it previously and it is only really released if
6889 there were no previous window. In particular, this means that you must
6890 release the mouse as many times as you capture it.
6891 """
6892 return _core_.Window_CaptureMouse(*args, **kwargs)
6893
6894 def ReleaseMouse(*args, **kwargs):
6895 """
6896 ReleaseMouse(self)
6897
6898 Releases mouse input captured with wx.Window.CaptureMouse.
6899 """
6900 return _core_.Window_ReleaseMouse(*args, **kwargs)
6901
6902 def GetCapture(*args, **kwargs):
6903 """
6904 GetCapture() -> Window
6905
6906 Returns the window which currently captures the mouse or None
6907 """
6908 return _core_.Window_GetCapture(*args, **kwargs)
6909
6910 GetCapture = staticmethod(GetCapture)
6911 def HasCapture(*args, **kwargs):
6912 """
6913 HasCapture(self) -> bool
6914
6915 Returns true if this window has the current mouse capture.
6916 """
6917 return _core_.Window_HasCapture(*args, **kwargs)
6918
6919 def Refresh(*args, **kwargs):
6920 """
6921 Refresh(self, bool eraseBackground=True, Rect rect=None)
6922
6923 Mark the specified rectangle (or the whole window) as "dirty" so it
6924 will be repainted. Causes an EVT_PAINT event to be generated and sent
6925 to the window.
6926 """
6927 return _core_.Window_Refresh(*args, **kwargs)
6928
6929 def RefreshRect(*args, **kwargs):
6930 """
6931 RefreshRect(self, Rect rect)
6932
6933 Redraws the contents of the given rectangle: the area inside it will
6934 be repainted. This is the same as Refresh but has a nicer syntax.
6935 """
6936 return _core_.Window_RefreshRect(*args, **kwargs)
6937
6938 def Update(*args, **kwargs):
6939 """
6940 Update(self)
6941
6942 Calling this method immediately repaints the invalidated area of the
6943 window instead of waiting for the EVT_PAINT event to happen, (normally
6944 this would usually only happen when the flow of control returns to the
6945 event loop.) Notice that this function doesn't refresh the window and
6946 does nothing if the window has been already repainted. Use Refresh
6947 first if you want to immediately redraw the window (or some portion of
6948 it) unconditionally.
6949 """
6950 return _core_.Window_Update(*args, **kwargs)
6951
6952 def ClearBackground(*args, **kwargs):
6953 """
6954 ClearBackground(self)
6955
6956 Clears the window by filling it with the current background
6957 colour. Does not cause an erase background event to be generated.
6958 """
6959 return _core_.Window_ClearBackground(*args, **kwargs)
6960
6961 def Freeze(*args, **kwargs):
6962 """
6963 Freeze(self)
6964
6965 Freezes the window or, in other words, prevents any updates from
6966 taking place on screen, the window is not redrawn at all. Thaw must be
6967 called to reenable window redrawing. Calls to Freeze/Thaw may be
6968 nested, with the actual Thaw being delayed until all the nesting has
6969 been undone.
6970
6971 This method is useful for visual appearance optimization (for example,
6972 it is a good idea to use it before inserting large amount of text into
6973 a wxTextCtrl under wxGTK) but is not implemented on all platforms nor
6974 for all controls so it is mostly just a hint to wxWindows and not a
6975 mandatory directive.
6976 """
6977 return _core_.Window_Freeze(*args, **kwargs)
6978
6979 def Thaw(*args, **kwargs):
6980 """
6981 Thaw(self)
6982
6983 Reenables window updating after a previous call to Freeze. Calls to
6984 Freeze/Thaw may be nested, so Thaw must be called the same number of
6985 times that Freeze was before the window will be updated.
6986 """
6987 return _core_.Window_Thaw(*args, **kwargs)
6988
6989 def PrepareDC(*args, **kwargs):
6990 """
6991 PrepareDC(self, DC dc)
6992
6993 Call this function to prepare the device context for drawing a
6994 scrolled image. It sets the device origin according to the current
6995 scroll position.
6996 """
6997 return _core_.Window_PrepareDC(*args, **kwargs)
6998
6999 def GetUpdateRegion(*args, **kwargs):
7000 """
7001 GetUpdateRegion(self) -> Region
7002
7003 Returns the region specifying which parts of the window have been
7004 damaged. Should only be called within an EVT_PAINT handler.
7005 """
7006 return _core_.Window_GetUpdateRegion(*args, **kwargs)
7007
7008 def GetUpdateClientRect(*args, **kwargs):
7009 """
7010 GetUpdateClientRect(self) -> Rect
7011
7012 Get the update rectangle region bounding box in client coords.
7013 """
7014 return _core_.Window_GetUpdateClientRect(*args, **kwargs)
7015
7016 def IsExposed(*args, **kwargs):
7017 """
7018 IsExposed(self, int x, int y, int w=1, int h=1) -> bool
7019
7020 Returns true if the given point or rectangle area has been exposed
7021 since the last repaint. Call this in an paint event handler to
7022 optimize redrawing by only redrawing those areas, which have been
7023 exposed.
7024 """
7025 return _core_.Window_IsExposed(*args, **kwargs)
7026
7027 def IsExposedPoint(*args, **kwargs):
7028 """
7029 IsExposedPoint(self, Point pt) -> bool
7030
7031 Returns true if the given point or rectangle area has been exposed
7032 since the last repaint. Call this in an paint event handler to
7033 optimize redrawing by only redrawing those areas, which have been
7034 exposed.
7035 """
7036 return _core_.Window_IsExposedPoint(*args, **kwargs)
7037
7038 def IsExposedRect(*args, **kwargs):
7039 """
7040 IsExposedRect(self, Rect rect) -> bool
7041
7042 Returns true if the given point or rectangle area has been exposed
7043 since the last repaint. Call this in an paint event handler to
7044 optimize redrawing by only redrawing those areas, which have been
7045 exposed.
7046 """
7047 return _core_.Window_IsExposedRect(*args, **kwargs)
7048
7049 def GetDefaultAttributes(*args, **kwargs):
7050 """
7051 GetDefaultAttributes(self) -> VisualAttributes
7052
7053 Get the default attributes for an instance of this class. This is
7054 useful if you want to use the same font or colour in your own control
7055 as in a standard control -- which is a much better idea than hard
7056 coding specific colours or fonts which might look completely out of
7057 place on the user's system, especially if it uses themes.
7058 """
7059 return _core_.Window_GetDefaultAttributes(*args, **kwargs)
7060
7061 def GetClassDefaultAttributes(*args, **kwargs):
7062 """
7063 GetClassDefaultAttributes(int variant=WINDOW_VARIANT_NORMAL) -> VisualAttributes
7064
7065 Get the default attributes for this class. This is useful if you want
7066 to use the same font or colour in your own control as in a standard
7067 control -- which is a much better idea than hard coding specific
7068 colours or fonts which might look completely out of place on the
7069 user's system, especially if it uses themes.
7070
7071 The variant parameter is only relevant under Mac currently and is
7072 ignore under other platforms. Under Mac, it will change the size of
7073 the returned font. See `wx.Window.SetWindowVariant` for more about
7074 this.
7075 """
7076 return _core_.Window_GetClassDefaultAttributes(*args, **kwargs)
7077
7078 GetClassDefaultAttributes = staticmethod(GetClassDefaultAttributes)
7079 def SetBackgroundColour(*args, **kwargs):
7080 """
7081 SetBackgroundColour(self, Colour colour) -> bool
7082
7083 Sets the background colour of the window. Returns True if the colour
7084 was changed. The background colour is usually painted by the default
7085 EVT_ERASE_BACKGROUND event handler function under Windows and
7086 automatically under GTK. Using `wx.NullColour` will reset the window
7087 to the default background colour.
7088
7089 Note that setting the background colour may not cause an immediate
7090 refresh, so you may wish to call `ClearBackground` or `Refresh` after
7091 calling this function.
7092
7093 Using this function will disable attempts to use themes for this
7094 window, if the system supports them. Use with care since usually the
7095 themes represent the appearance chosen by the user to be used for all
7096 applications on the system.
7097 """
7098 return _core_.Window_SetBackgroundColour(*args, **kwargs)
7099
7100 def SetOwnBackgroundColour(*args, **kwargs):
7101 """SetOwnBackgroundColour(self, Colour colour)"""
7102 return _core_.Window_SetOwnBackgroundColour(*args, **kwargs)
7103
7104 def SetForegroundColour(*args, **kwargs):
7105 """
7106 SetForegroundColour(self, Colour colour) -> bool
7107
7108 Sets the foreground colour of the window. Returns True is the colour
7109 was changed. The interpretation of foreground colour is dependent on
7110 the window class; it may be the text colour or other colour, or it may
7111 not be used at all.
7112 """
7113 return _core_.Window_SetForegroundColour(*args, **kwargs)
7114
7115 def SetOwnForegroundColour(*args, **kwargs):
7116 """SetOwnForegroundColour(self, Colour colour)"""
7117 return _core_.Window_SetOwnForegroundColour(*args, **kwargs)
7118
7119 def GetBackgroundColour(*args, **kwargs):
7120 """
7121 GetBackgroundColour(self) -> Colour
7122
7123 Returns the background colour of the window.
7124 """
7125 return _core_.Window_GetBackgroundColour(*args, **kwargs)
7126
7127 def GetForegroundColour(*args, **kwargs):
7128 """
7129 GetForegroundColour(self) -> Colour
7130
7131 Returns the foreground colour of the window. The interpretation of
7132 foreground colour is dependent on the window class; it may be the text
7133 colour or other colour, or it may not be used at all.
7134 """
7135 return _core_.Window_GetForegroundColour(*args, **kwargs)
7136
7137 def SetBackgroundStyle(*args, **kwargs):
7138 """
7139 SetBackgroundStyle(self, int style) -> bool
7140
7141 Returns the background style of the window. The background style
7142 indicates how the background of the window is drawn.
7143
7144 ====================== ========================================
7145 wx.BG_STYLE_SYSTEM The background colour or pattern should
7146 be determined by the system
7147 wx.BG_STYLE_COLOUR The background should be a solid colour
7148 wx.BG_STYLE_CUSTOM The background will be implemented by the
7149 application.
7150 ====================== ========================================
7151
7152 On GTK+, use of wx.BG_STYLE_CUSTOM allows the flicker-free drawing of
7153 a custom background, such as a tiled bitmap. Currently the style has
7154 no effect on other platforms.
7155
7156 :see: `GetBackgroundStyle`, `SetBackgroundColour`
7157 """
7158 return _core_.Window_SetBackgroundStyle(*args, **kwargs)
7159
7160 def GetBackgroundStyle(*args, **kwargs):
7161 """
7162 GetBackgroundStyle(self) -> int
7163
7164 Returns the background style of the window.
7165
7166 :see: `SetBackgroundStyle`
7167 """
7168 return _core_.Window_GetBackgroundStyle(*args, **kwargs)
7169
7170 def SetCursor(*args, **kwargs):
7171 """
7172 SetCursor(self, Cursor cursor) -> bool
7173
7174 Sets the window's cursor. Notice that the window cursor also sets it
7175 for the children of the window implicitly.
7176
7177 The cursor may be wx.NullCursor in which case the window cursor will
7178 be reset back to default.
7179 """
7180 return _core_.Window_SetCursor(*args, **kwargs)
7181
7182 def GetCursor(*args, **kwargs):
7183 """
7184 GetCursor(self) -> Cursor
7185
7186 Return the cursor associated with this window.
7187 """
7188 return _core_.Window_GetCursor(*args, **kwargs)
7189
7190 def SetFont(*args, **kwargs):
7191 """
7192 SetFont(self, Font font) -> bool
7193
7194 Sets the font for this window.
7195 """
7196 return _core_.Window_SetFont(*args, **kwargs)
7197
7198 def SetOwnFont(*args, **kwargs):
7199 """SetOwnFont(self, Font font)"""
7200 return _core_.Window_SetOwnFont(*args, **kwargs)
7201
7202 def GetFont(*args, **kwargs):
7203 """
7204 GetFont(self) -> Font
7205
7206 Returns the default font used for this window.
7207 """
7208 return _core_.Window_GetFont(*args, **kwargs)
7209
7210 def SetCaret(*args, **kwargs):
7211 """
7212 SetCaret(self, Caret caret)
7213
7214 Sets the caret associated with the window.
7215 """
7216 return _core_.Window_SetCaret(*args, **kwargs)
7217
7218 def GetCaret(*args, **kwargs):
7219 """
7220 GetCaret(self) -> Caret
7221
7222 Returns the caret associated with the window.
7223 """
7224 return _core_.Window_GetCaret(*args, **kwargs)
7225
7226 def GetCharHeight(*args, **kwargs):
7227 """
7228 GetCharHeight(self) -> int
7229
7230 Get the (average) character size for the current font.
7231 """
7232 return _core_.Window_GetCharHeight(*args, **kwargs)
7233
7234 def GetCharWidth(*args, **kwargs):
7235 """
7236 GetCharWidth(self) -> int
7237
7238 Get the (average) character size for the current font.
7239 """
7240 return _core_.Window_GetCharWidth(*args, **kwargs)
7241
7242 def GetTextExtent(*args, **kwargs):
7243 """
7244 GetTextExtent(String string) -> (width, height)
7245
7246 Get the width and height of the text using the current font.
7247 """
7248 return _core_.Window_GetTextExtent(*args, **kwargs)
7249
7250 def GetFullTextExtent(*args, **kwargs):
7251 """
7252 GetFullTextExtent(String string, Font font=None) ->
7253 (width, height, descent, externalLeading)
7254
7255 Get the width, height, decent and leading of the text using the
7256 current or specified font.
7257 """
7258 return _core_.Window_GetFullTextExtent(*args, **kwargs)
7259
7260 def ClientToScreenXY(*args, **kwargs):
7261 """
7262 ClientToScreenXY(int x, int y) -> (x,y)
7263
7264 Converts to screen coordinates from coordinates relative to this window.
7265 """
7266 return _core_.Window_ClientToScreenXY(*args, **kwargs)
7267
7268 def ScreenToClientXY(*args, **kwargs):
7269 """
7270 ScreenToClientXY(int x, int y) -> (x,y)
7271
7272 Converts from screen to client window coordinates.
7273 """
7274 return _core_.Window_ScreenToClientXY(*args, **kwargs)
7275
7276 def ClientToScreen(*args, **kwargs):
7277 """
7278 ClientToScreen(self, Point pt) -> Point
7279
7280 Converts to screen coordinates from coordinates relative to this window.
7281 """
7282 return _core_.Window_ClientToScreen(*args, **kwargs)
7283
7284 def ScreenToClient(*args, **kwargs):
7285 """
7286 ScreenToClient(self, Point pt) -> Point
7287
7288 Converts from screen to client window coordinates.
7289 """
7290 return _core_.Window_ScreenToClient(*args, **kwargs)
7291
7292 def HitTestXY(*args, **kwargs):
7293 """
7294 HitTestXY(self, int x, int y) -> int
7295
7296 Test where the given (in client coords) point lies
7297 """
7298 return _core_.Window_HitTestXY(*args, **kwargs)
7299
7300 def HitTest(*args, **kwargs):
7301 """
7302 HitTest(self, Point pt) -> int
7303
7304 Test where the given (in client coords) point lies
7305 """
7306 return _core_.Window_HitTest(*args, **kwargs)
7307
7308 def GetBorder(*args):
7309 """
7310 GetBorder(self, long flags) -> int
7311 GetBorder(self) -> int
7312
7313 Get border for the flags of this window
7314 """
7315 return _core_.Window_GetBorder(*args)
7316
7317 def UpdateWindowUI(*args, **kwargs):
7318 """
7319 UpdateWindowUI(self, long flags=UPDATE_UI_NONE)
7320
7321 This function sends EVT_UPDATE_UI events to the window. The particular
7322 implementation depends on the window; for example a wx.ToolBar will
7323 send an update UI event for each toolbar button, and a wx.Frame will
7324 send an update UI event for each menubar menu item. You can call this
7325 function from your application to ensure that your UI is up-to-date at
7326 a particular point in time (as far as your EVT_UPDATE_UI handlers are
7327 concerned). This may be necessary if you have called
7328 wx.UpdateUIEvent.SetMode or wx.UpdateUIEvent.SetUpdateInterval to
7329 limit the overhead that wxWindows incurs by sending update UI events
7330 in idle time.
7331 """
7332 return _core_.Window_UpdateWindowUI(*args, **kwargs)
7333
7334 def PopupMenuXY(*args, **kwargs):
7335 """
7336 PopupMenuXY(self, Menu menu, int x=-1, int y=-1) -> bool
7337
7338 Pops up the given menu at the specified coordinates, relative to this window,
7339 and returns control when the user has dismissed the menu. If a menu item is
7340 selected, the corresponding menu event is generated and will be processed as
7341 usual. If the default position is given then the current position of the
7342 mouse cursor will be used.
7343 """
7344 return _core_.Window_PopupMenuXY(*args, **kwargs)
7345
7346 def PopupMenu(*args, **kwargs):
7347 """
7348 PopupMenu(self, Menu menu, Point pos=DefaultPosition) -> bool
7349
7350 Pops up the given menu at the specified coordinates, relative to this window,
7351 and returns control when the user has dismissed the menu. If a menu item is
7352 selected, the corresponding menu event is generated and will be processed as
7353 usual. If the default position is given then the current position of the
7354 mouse cursor will be used.
7355 """
7356 return _core_.Window_PopupMenu(*args, **kwargs)
7357
7358 def GetHandle(*args, **kwargs):
7359 """
7360 GetHandle(self) -> long
7361
7362 Returns the platform-specific handle (as a long integer) of the
7363 physical window. Currently on wxMac it returns the handle of the
7364 toplevel parent of the window.
7365 """
7366 return _core_.Window_GetHandle(*args, **kwargs)
7367
7368 def AssociateHandle(*args, **kwargs):
7369 """
7370 AssociateHandle(self, long handle)
7371
7372 Associate the window with a new native handle
7373 """
7374 return _core_.Window_AssociateHandle(*args, **kwargs)
7375
7376 def DissociateHandle(*args, **kwargs):
7377 """
7378 DissociateHandle(self)
7379
7380 Dissociate the current native handle from the window
7381 """
7382 return _core_.Window_DissociateHandle(*args, **kwargs)
7383
7384 def OnPaint(*args, **kwargs):
7385 """OnPaint(self, PaintEvent event)"""
7386 return _core_.Window_OnPaint(*args, **kwargs)
7387
7388 def HasScrollbar(*args, **kwargs):
7389 """
7390 HasScrollbar(self, int orient) -> bool
7391
7392 Does the window have the scrollbar for this orientation?
7393 """
7394 return _core_.Window_HasScrollbar(*args, **kwargs)
7395
7396 def SetScrollbar(*args, **kwargs):
7397 """
7398 SetScrollbar(self, int orientation, int position, int thumbSize, int range,
7399 bool refresh=True)
7400
7401 Sets the scrollbar properties of a built-in scrollbar.
7402 """
7403 return _core_.Window_SetScrollbar(*args, **kwargs)
7404
7405 def SetScrollPos(*args, **kwargs):
7406 """
7407 SetScrollPos(self, int orientation, int pos, bool refresh=True)
7408
7409 Sets the position of one of the built-in scrollbars.
7410 """
7411 return _core_.Window_SetScrollPos(*args, **kwargs)
7412
7413 def GetScrollPos(*args, **kwargs):
7414 """
7415 GetScrollPos(self, int orientation) -> int
7416
7417 Returns the built-in scrollbar position.
7418 """
7419 return _core_.Window_GetScrollPos(*args, **kwargs)
7420
7421 def GetScrollThumb(*args, **kwargs):
7422 """
7423 GetScrollThumb(self, int orientation) -> int
7424
7425 Returns the built-in scrollbar thumb size.
7426 """
7427 return _core_.Window_GetScrollThumb(*args, **kwargs)
7428
7429 def GetScrollRange(*args, **kwargs):
7430 """
7431 GetScrollRange(self, int orientation) -> int
7432
7433 Returns the built-in scrollbar range.
7434 """
7435 return _core_.Window_GetScrollRange(*args, **kwargs)
7436
7437 def ScrollWindow(*args, **kwargs):
7438 """
7439 ScrollWindow(self, int dx, int dy, Rect rect=None)
7440
7441 Physically scrolls the pixels in the window and move child windows
7442 accordingly. Use this function to optimise your scrolling
7443 implementations, to minimise the area that must be redrawn. Note that
7444 it is rarely required to call this function from a user program.
7445 """
7446 return _core_.Window_ScrollWindow(*args, **kwargs)
7447
7448 def ScrollLines(*args, **kwargs):
7449 """
7450 ScrollLines(self, int lines) -> bool
7451
7452 If the platform and window class supports it, scrolls the window by
7453 the given number of lines down, if lines is positive, or up if lines
7454 is negative. Returns True if the window was scrolled, False if it was
7455 already on top/bottom and nothing was done.
7456 """
7457 return _core_.Window_ScrollLines(*args, **kwargs)
7458
7459 def ScrollPages(*args, **kwargs):
7460 """
7461 ScrollPages(self, int pages) -> bool
7462
7463 If the platform and window class supports it, scrolls the window by
7464 the given number of pages down, if pages is positive, or up if pages
7465 is negative. Returns True if the window was scrolled, False if it was
7466 already on top/bottom and nothing was done.
7467 """
7468 return _core_.Window_ScrollPages(*args, **kwargs)
7469
7470 def LineUp(*args, **kwargs):
7471 """
7472 LineUp(self) -> bool
7473
7474 This is just a wrapper for ScrollLines(-1).
7475 """
7476 return _core_.Window_LineUp(*args, **kwargs)
7477
7478 def LineDown(*args, **kwargs):
7479 """
7480 LineDown(self) -> bool
7481
7482 This is just a wrapper for ScrollLines(1).
7483 """
7484 return _core_.Window_LineDown(*args, **kwargs)
7485
7486 def PageUp(*args, **kwargs):
7487 """
7488 PageUp(self) -> bool
7489
7490 This is just a wrapper for ScrollPages(-1).
7491 """
7492 return _core_.Window_PageUp(*args, **kwargs)
7493
7494 def PageDown(*args, **kwargs):
7495 """
7496 PageDown(self) -> bool
7497
7498 This is just a wrapper for ScrollPages(1).
7499 """
7500 return _core_.Window_PageDown(*args, **kwargs)
7501
7502 def SetHelpText(*args, **kwargs):
7503 """
7504 SetHelpText(self, String text)
7505
7506 Sets the help text to be used as context-sensitive help for this
7507 window. Note that the text is actually stored by the current
7508 wxHelpProvider implementation, and not in the window object itself.
7509 """
7510 return _core_.Window_SetHelpText(*args, **kwargs)
7511
7512 def SetHelpTextForId(*args, **kwargs):
7513 """
7514 SetHelpTextForId(self, String text)
7515
7516 Associate this help text with all windows with the same id as this
7517 one.
7518 """
7519 return _core_.Window_SetHelpTextForId(*args, **kwargs)
7520
7521 def GetHelpText(*args, **kwargs):
7522 """
7523 GetHelpText(self) -> String
7524
7525 Gets the help text to be used as context-sensitive help for this
7526 window. Note that the text is actually stored by the current
7527 wxHelpProvider implementation, and not in the window object itself.
7528 """
7529 return _core_.Window_GetHelpText(*args, **kwargs)
7530
7531 def SetToolTipString(*args, **kwargs):
7532 """
7533 SetToolTipString(self, String tip)
7534
7535 Attach a tooltip to the window.
7536 """
7537 return _core_.Window_SetToolTipString(*args, **kwargs)
7538
7539 def SetToolTip(*args, **kwargs):
7540 """
7541 SetToolTip(self, ToolTip tip)
7542
7543 Attach a tooltip to the window.
7544 """
7545 return _core_.Window_SetToolTip(*args, **kwargs)
7546
7547 def GetToolTip(*args, **kwargs):
7548 """
7549 GetToolTip(self) -> ToolTip
7550
7551 get the associated tooltip or None if none
7552 """
7553 return _core_.Window_GetToolTip(*args, **kwargs)
7554
7555 def SetDropTarget(*args, **kwargs):
7556 """
7557 SetDropTarget(self, DropTarget dropTarget)
7558
7559 Associates a drop target with this window. If the window already has
7560 a drop target, it is deleted.
7561 """
7562 return _core_.Window_SetDropTarget(*args, **kwargs)
7563
7564 def GetDropTarget(*args, **kwargs):
7565 """
7566 GetDropTarget(self) -> DropTarget
7567
7568 Returns the associated drop target, which may be None.
7569 """
7570 return _core_.Window_GetDropTarget(*args, **kwargs)
7571
7572 def DragAcceptFiles(*args, **kwargs):
7573 """
7574 DragAcceptFiles(self, bool accept)
7575
7576 Enables or disables eligibility for drop file events, EVT_DROP_FILES.
7577 Only available on Windows.
7578 """
7579 return _core_.Window_DragAcceptFiles(*args, **kwargs)
7580
7581 def SetConstraints(*args, **kwargs):
7582 """
7583 SetConstraints(self, LayoutConstraints constraints)
7584
7585 Sets the window to have the given layout constraints. If an existing
7586 layout constraints object is already owned by the window, it will be
7587 deleted. Pass None to disassociate and delete the window's current
7588 constraints.
7589
7590 You must call SetAutoLayout to tell a window to use the constraints
7591 automatically in its default EVT_SIZE handler; otherwise, you must
7592 handle EVT_SIZE yourself and call Layout() explicitly. When setting
7593 both a wx.LayoutConstraints and a wx.Sizer, only the sizer will have
7594 effect.
7595 """
7596 return _core_.Window_SetConstraints(*args, **kwargs)
7597
7598 def GetConstraints(*args, **kwargs):
7599 """
7600 GetConstraints(self) -> LayoutConstraints
7601
7602 Returns a pointer to the window's layout constraints, or None if there
7603 are none.
7604 """
7605 return _core_.Window_GetConstraints(*args, **kwargs)
7606
7607 def SetAutoLayout(*args, **kwargs):
7608 """
7609 SetAutoLayout(self, bool autoLayout)
7610
7611 Determines whether the Layout function will be called automatically
7612 when the window is resized. It is called implicitly by SetSizer but
7613 if you use SetConstraints you should call it manually or otherwise the
7614 window layout won't be correctly updated when its size changes.
7615 """
7616 return _core_.Window_SetAutoLayout(*args, **kwargs)
7617
7618 def GetAutoLayout(*args, **kwargs):
7619 """
7620 GetAutoLayout(self) -> bool
7621
7622 Returns the current autoLayout setting
7623 """
7624 return _core_.Window_GetAutoLayout(*args, **kwargs)
7625
7626 def Layout(*args, **kwargs):
7627 """
7628 Layout(self) -> bool
7629
7630 Invokes the constraint-based layout algorithm or the sizer-based
7631 algorithm for this window. See SetAutoLayout: when auto layout is on,
7632 this function gets called automatically by the default EVT_SIZE
7633 handler when the window is resized.
7634 """
7635 return _core_.Window_Layout(*args, **kwargs)
7636
7637 def SetSizer(*args, **kwargs):
7638 """
7639 SetSizer(self, Sizer sizer, bool deleteOld=True)
7640
7641 Sets the window to have the given layout sizer. The window will then
7642 own the object, and will take care of its deletion. If an existing
7643 layout sizer object is already owned by the window, it will be deleted
7644 if the deleteOld parameter is true. Note that this function will also
7645 call SetAutoLayout implicitly with a True parameter if the sizer is
7646 non-None, and False otherwise.
7647 """
7648 return _core_.Window_SetSizer(*args, **kwargs)
7649
7650 def SetSizerAndFit(*args, **kwargs):
7651 """
7652 SetSizerAndFit(self, Sizer sizer, bool deleteOld=True)
7653
7654 The same as SetSizer, except it also sets the size hints for the
7655 window based on the sizer's minimum size.
7656 """
7657 return _core_.Window_SetSizerAndFit(*args, **kwargs)
7658
7659 def GetSizer(*args, **kwargs):
7660 """
7661 GetSizer(self) -> Sizer
7662
7663 Return the sizer associated with the window by a previous call to
7664 SetSizer or None if there isn't one.
7665 """
7666 return _core_.Window_GetSizer(*args, **kwargs)
7667
7668 def SetContainingSizer(*args, **kwargs):
7669 """
7670 SetContainingSizer(self, Sizer sizer)
7671
7672 This normally does not need to be called by application code. It is
7673 called internally when a window is added to a sizer, and is used so
7674 the window can remove itself from the sizer when it is destroyed.
7675 """
7676 return _core_.Window_SetContainingSizer(*args, **kwargs)
7677
7678 def GetContainingSizer(*args, **kwargs):
7679 """
7680 GetContainingSizer(self) -> Sizer
7681
7682 Return the sizer that this window is a member of, if any, otherwise None.
7683 """
7684 return _core_.Window_GetContainingSizer(*args, **kwargs)
7685
7686 def InheritAttributes(*args, **kwargs):
7687 """
7688 InheritAttributes(self)
7689
7690 This function is (or should be, in case of custom controls) called
7691 during window creation to intelligently set up the window visual
7692 attributes, that is the font and the foreground and background
7693 colours.
7694
7695 By 'intelligently' the following is meant: by default, all windows use
7696 their own default attributes. However if some of the parent's
7697 attributes are explicitly changed (that is, using SetFont and not
7698 SetOwnFont) and if the corresponding attribute hadn't been
7699 explicitly set for this window itself, then this window takes the same
7700 value as used by the parent. In addition, if the window overrides
7701 ShouldInheritColours to return false, the colours will not be changed
7702 no matter what and only the font might.
7703
7704 This rather complicated logic is necessary in order to accommodate the
7705 different usage scenarios. The most common one is when all default
7706 attributes are used and in this case, nothing should be inherited as
7707 in modern GUIs different controls use different fonts (and colours)
7708 than their siblings so they can't inherit the same value from the
7709 parent. However it was also deemed desirable to allow to simply change
7710 the attributes of all children at once by just changing the font or
7711 colour of their common parent, hence in this case we do inherit the
7712 parents attributes.
7713
7714 """
7715 return _core_.Window_InheritAttributes(*args, **kwargs)
7716
7717 def ShouldInheritColours(*args, **kwargs):
7718 """
7719 ShouldInheritColours(self) -> bool
7720
7721 Return true from here to allow the colours of this window to be
7722 changed by InheritAttributes, returning false forbids inheriting them
7723 from the parent window.
7724
7725 The base class version returns false, but this method is overridden in
7726 wxControl where it returns true.
7727 """
7728 return _core_.Window_ShouldInheritColours(*args, **kwargs)
7729
7730 def PostCreate(self, pre):
7731 """
7732 Phase 3 of the 2-phase create <wink!>
7733 Call this method after precreating the window with the 2-phase create method.
7734 """
7735 self.this = pre.this
7736 self.thisown = pre.thisown
7737 pre.thisown = 0
7738 if hasattr(self, '_setOORInfo'):
7739 self._setOORInfo(self)
7740 if hasattr(self, '_setCallbackInfo'):
7741 self._setCallbackInfo(self, self.__class__)
7742
7743
7744 class WindowPtr(Window):
7745 def __init__(self, this):
7746 self.this = this
7747 if not hasattr(self,"thisown"): self.thisown = 0
7748 self.__class__ = Window
7749 _core_.Window_swigregister(WindowPtr)
7750
7751 def PreWindow(*args, **kwargs):
7752 """
7753 PreWindow() -> Window
7754
7755 Precreate a Window for 2-phase creation.
7756 """
7757 val = _core_.new_PreWindow(*args, **kwargs)
7758 val.thisown = 1
7759 return val
7760
7761 def Window_NewControlId(*args, **kwargs):
7762 """
7763 Window_NewControlId() -> int
7764
7765 Generate a control id for the controls which were not given one.
7766 """
7767 return _core_.Window_NewControlId(*args, **kwargs)
7768
7769 def Window_NextControlId(*args, **kwargs):
7770 """
7771 Window_NextControlId(int winid) -> int
7772
7773 Get the id of the control following the one with the given
7774 autogenerated) id
7775 """
7776 return _core_.Window_NextControlId(*args, **kwargs)
7777
7778 def Window_PrevControlId(*args, **kwargs):
7779 """
7780 Window_PrevControlId(int winid) -> int
7781
7782 Get the id of the control preceding the one with the given
7783 autogenerated) id
7784 """
7785 return _core_.Window_PrevControlId(*args, **kwargs)
7786
7787 def Window_FindFocus(*args, **kwargs):
7788 """
7789 Window_FindFocus() -> Window
7790
7791 Returns the window or control that currently has the keyboard focus,
7792 or None.
7793 """
7794 return _core_.Window_FindFocus(*args, **kwargs)
7795
7796 def Window_GetCapture(*args, **kwargs):
7797 """
7798 Window_GetCapture() -> Window
7799
7800 Returns the window which currently captures the mouse or None
7801 """
7802 return _core_.Window_GetCapture(*args, **kwargs)
7803
7804 def Window_GetClassDefaultAttributes(*args, **kwargs):
7805 """
7806 Window_GetClassDefaultAttributes(int variant=WINDOW_VARIANT_NORMAL) -> VisualAttributes
7807
7808 Get the default attributes for this class. This is useful if you want
7809 to use the same font or colour in your own control as in a standard
7810 control -- which is a much better idea than hard coding specific
7811 colours or fonts which might look completely out of place on the
7812 user's system, especially if it uses themes.
7813
7814 The variant parameter is only relevant under Mac currently and is
7815 ignore under other platforms. Under Mac, it will change the size of
7816 the returned font. See `wx.Window.SetWindowVariant` for more about
7817 this.
7818 """
7819 return _core_.Window_GetClassDefaultAttributes(*args, **kwargs)
7820
7821 def DLG_PNT(win, point_or_x, y=None):
7822 """
7823 Convenience function for converting a Point or (x,y) in
7824 dialog units to pixel units.
7825 """
7826 if y is None:
7827 return win.ConvertDialogPointToPixels(point_or_x)
7828 else:
7829 return win.ConvertDialogPointToPixels(wx.Point(point_or_x, y))
7830
7831 def DLG_SZE(win, size_width, height=None):
7832 """
7833 Convenience function for converting a Size or (w,h) in
7834 dialog units to pixel units.
7835 """
7836 if height is None:
7837 return win.ConvertDialogSizeToPixels(size_width)
7838 else:
7839 return win.ConvertDialogSizeToPixels(wx.Size(size_width, height))
7840
7841
7842 def FindWindowById(*args, **kwargs):
7843 """
7844 FindWindowById(long id, Window parent=None) -> Window
7845
7846 Find the first window in the application with the given id. If parent
7847 is None, the search will start from all top-level frames and dialog
7848 boxes; if non-None, the search will be limited to the given window
7849 hierarchy. The search is recursive in both cases.
7850 """
7851 return _core_.FindWindowById(*args, **kwargs)
7852
7853 def FindWindowByName(*args, **kwargs):
7854 """
7855 FindWindowByName(String name, Window parent=None) -> Window
7856
7857 Find a window by its name (as given in a window constructor or Create
7858 function call). If parent is None, the search will start from all
7859 top-level frames and dialog boxes; if non-None, the search will be
7860 limited to the given window hierarchy. The search is recursive in both
7861 cases.
7862
7863 If no window with such name is found, wx.FindWindowByLabel is called.
7864 """
7865 return _core_.FindWindowByName(*args, **kwargs)
7866
7867 def FindWindowByLabel(*args, **kwargs):
7868 """
7869 FindWindowByLabel(String label, Window parent=None) -> Window
7870
7871 Find a window by its label. Depending on the type of window, the label
7872 may be a window title or panel item label. If parent is None, the
7873 search will start from all top-level frames and dialog boxes; if
7874 non-None, the search will be limited to the given window
7875 hierarchy. The search is recursive in both cases.
7876 """
7877 return _core_.FindWindowByLabel(*args, **kwargs)
7878
7879 def Window_FromHWND(*args, **kwargs):
7880 """Window_FromHWND(Window parent, unsigned long _hWnd) -> Window"""
7881 return _core_.Window_FromHWND(*args, **kwargs)
7882 #---------------------------------------------------------------------------
7883
7884 class Validator(EvtHandler):
7885 def __repr__(self):
7886 return "<%s.%s; proxy of C++ wxValidator instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
7887 def __init__(self, *args, **kwargs):
7888 """__init__(self) -> Validator"""
7889 newobj = _core_.new_Validator(*args, **kwargs)
7890 self.this = newobj.this
7891 self.thisown = 1
7892 del newobj.thisown
7893 self._setOORInfo(self)
7894
7895 def Clone(*args, **kwargs):
7896 """Clone(self) -> Validator"""
7897 return _core_.Validator_Clone(*args, **kwargs)
7898
7899 def Validate(*args, **kwargs):
7900 """Validate(self, Window parent) -> bool"""
7901 return _core_.Validator_Validate(*args, **kwargs)
7902
7903 def TransferToWindow(*args, **kwargs):
7904 """TransferToWindow(self) -> bool"""
7905 return _core_.Validator_TransferToWindow(*args, **kwargs)
7906
7907 def TransferFromWindow(*args, **kwargs):
7908 """TransferFromWindow(self) -> bool"""
7909 return _core_.Validator_TransferFromWindow(*args, **kwargs)
7910
7911 def GetWindow(*args, **kwargs):
7912 """GetWindow(self) -> Window"""
7913 return _core_.Validator_GetWindow(*args, **kwargs)
7914
7915 def SetWindow(*args, **kwargs):
7916 """SetWindow(self, Window window)"""
7917 return _core_.Validator_SetWindow(*args, **kwargs)
7918
7919 def IsSilent(*args, **kwargs):
7920 """IsSilent() -> bool"""
7921 return _core_.Validator_IsSilent(*args, **kwargs)
7922
7923 IsSilent = staticmethod(IsSilent)
7924 def SetBellOnError(*args, **kwargs):
7925 """SetBellOnError(int doIt=True)"""
7926 return _core_.Validator_SetBellOnError(*args, **kwargs)
7927
7928 SetBellOnError = staticmethod(SetBellOnError)
7929
7930 class ValidatorPtr(Validator):
7931 def __init__(self, this):
7932 self.this = this
7933 if not hasattr(self,"thisown"): self.thisown = 0
7934 self.__class__ = Validator
7935 _core_.Validator_swigregister(ValidatorPtr)
7936
7937 def Validator_IsSilent(*args, **kwargs):
7938 """Validator_IsSilent() -> bool"""
7939 return _core_.Validator_IsSilent(*args, **kwargs)
7940
7941 def Validator_SetBellOnError(*args, **kwargs):
7942 """Validator_SetBellOnError(int doIt=True)"""
7943 return _core_.Validator_SetBellOnError(*args, **kwargs)
7944
7945 class PyValidator(Validator):
7946 def __repr__(self):
7947 return "<%s.%s; proxy of C++ wxPyValidator instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
7948 def __init__(self, *args, **kwargs):
7949 """__init__(self) -> PyValidator"""
7950 newobj = _core_.new_PyValidator(*args, **kwargs)
7951 self.this = newobj.this
7952 self.thisown = 1
7953 del newobj.thisown
7954
7955 self._setCallbackInfo(self, PyValidator, 1)
7956 self._setOORInfo(self)
7957
7958 def _setCallbackInfo(*args, **kwargs):
7959 """_setCallbackInfo(self, PyObject self, PyObject _class, int incref=True)"""
7960 return _core_.PyValidator__setCallbackInfo(*args, **kwargs)
7961
7962
7963 class PyValidatorPtr(PyValidator):
7964 def __init__(self, this):
7965 self.this = this
7966 if not hasattr(self,"thisown"): self.thisown = 0
7967 self.__class__ = PyValidator
7968 _core_.PyValidator_swigregister(PyValidatorPtr)
7969
7970 #---------------------------------------------------------------------------
7971
7972 class Menu(EvtHandler):
7973 def __repr__(self):
7974 return "<%s.%s; proxy of C++ wxMenu instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
7975 def __init__(self, *args, **kwargs):
7976 """__init__(self, String title=EmptyString, long style=0) -> Menu"""
7977 newobj = _core_.new_Menu(*args, **kwargs)
7978 self.this = newobj.this
7979 self.thisown = 1
7980 del newobj.thisown
7981 self._setOORInfo(self)
7982
7983 def Append(*args, **kwargs):
7984 """Append(self, int id, String text, String help=EmptyString, int kind=ITEM_NORMAL) -> MenuItem"""
7985 return _core_.Menu_Append(*args, **kwargs)
7986
7987 def AppendSeparator(*args, **kwargs):
7988 """AppendSeparator(self) -> MenuItem"""
7989 return _core_.Menu_AppendSeparator(*args, **kwargs)
7990
7991 def AppendCheckItem(*args, **kwargs):
7992 """AppendCheckItem(self, int id, String text, String help=EmptyString) -> MenuItem"""
7993 return _core_.Menu_AppendCheckItem(*args, **kwargs)
7994
7995 def AppendRadioItem(*args, **kwargs):
7996 """AppendRadioItem(self, int id, String text, String help=EmptyString) -> MenuItem"""
7997 return _core_.Menu_AppendRadioItem(*args, **kwargs)
7998
7999 def AppendMenu(*args, **kwargs):
8000 """AppendMenu(self, int id, String text, Menu submenu, String help=EmptyString) -> MenuItem"""
8001 return _core_.Menu_AppendMenu(*args, **kwargs)
8002
8003 def AppendItem(*args, **kwargs):
8004 """AppendItem(self, MenuItem item) -> MenuItem"""
8005 return _core_.Menu_AppendItem(*args, **kwargs)
8006
8007 def Break(*args, **kwargs):
8008 """Break(self)"""
8009 return _core_.Menu_Break(*args, **kwargs)
8010
8011 def InsertItem(*args, **kwargs):
8012 """InsertItem(self, size_t pos, MenuItem item) -> MenuItem"""
8013 return _core_.Menu_InsertItem(*args, **kwargs)
8014
8015 def Insert(*args, **kwargs):
8016 """
8017 Insert(self, size_t pos, int id, String text, String help=EmptyString,
8018 int kind=ITEM_NORMAL) -> MenuItem
8019 """
8020 return _core_.Menu_Insert(*args, **kwargs)
8021
8022 def InsertSeparator(*args, **kwargs):
8023 """InsertSeparator(self, size_t pos) -> MenuItem"""
8024 return _core_.Menu_InsertSeparator(*args, **kwargs)
8025
8026 def InsertCheckItem(*args, **kwargs):
8027 """InsertCheckItem(self, size_t pos, int id, String text, String help=EmptyString) -> MenuItem"""
8028 return _core_.Menu_InsertCheckItem(*args, **kwargs)
8029
8030 def InsertRadioItem(*args, **kwargs):
8031 """InsertRadioItem(self, size_t pos, int id, String text, String help=EmptyString) -> MenuItem"""
8032 return _core_.Menu_InsertRadioItem(*args, **kwargs)
8033
8034 def InsertMenu(*args, **kwargs):
8035 """InsertMenu(self, size_t pos, int id, String text, Menu submenu, String help=EmptyString) -> MenuItem"""
8036 return _core_.Menu_InsertMenu(*args, **kwargs)
8037
8038 def PrependItem(*args, **kwargs):
8039 """PrependItem(self, MenuItem item) -> MenuItem"""
8040 return _core_.Menu_PrependItem(*args, **kwargs)
8041
8042 def Prepend(*args, **kwargs):
8043 """Prepend(self, int id, String text, String help=EmptyString, int kind=ITEM_NORMAL) -> MenuItem"""
8044 return _core_.Menu_Prepend(*args, **kwargs)
8045
8046 def PrependSeparator(*args, **kwargs):
8047 """PrependSeparator(self) -> MenuItem"""
8048 return _core_.Menu_PrependSeparator(*args, **kwargs)
8049
8050 def PrependCheckItem(*args, **kwargs):
8051 """PrependCheckItem(self, int id, String text, String help=EmptyString) -> MenuItem"""
8052 return _core_.Menu_PrependCheckItem(*args, **kwargs)
8053
8054 def PrependRadioItem(*args, **kwargs):
8055 """PrependRadioItem(self, int id, String text, String help=EmptyString) -> MenuItem"""
8056 return _core_.Menu_PrependRadioItem(*args, **kwargs)
8057
8058 def PrependMenu(*args, **kwargs):
8059 """PrependMenu(self, int id, String text, Menu submenu, String help=EmptyString) -> MenuItem"""
8060 return _core_.Menu_PrependMenu(*args, **kwargs)
8061
8062 def Remove(*args, **kwargs):
8063 """Remove(self, int id) -> MenuItem"""
8064 return _core_.Menu_Remove(*args, **kwargs)
8065
8066 def RemoveItem(*args, **kwargs):
8067 """RemoveItem(self, MenuItem item) -> MenuItem"""
8068 return _core_.Menu_RemoveItem(*args, **kwargs)
8069
8070 def Delete(*args, **kwargs):
8071 """Delete(self, int id) -> bool"""
8072 return _core_.Menu_Delete(*args, **kwargs)
8073
8074 def DeleteItem(*args, **kwargs):
8075 """DeleteItem(self, MenuItem item) -> bool"""
8076 return _core_.Menu_DeleteItem(*args, **kwargs)
8077
8078 def Destroy(*args, **kwargs):
8079 """
8080 Destroy(self)
8081
8082 Deletes the C++ object this Python object is a proxy for.
8083 """
8084 return _core_.Menu_Destroy(*args, **kwargs)
8085
8086 def DestroyId(*args, **kwargs):
8087 """
8088 DestroyId(self, int id) -> bool
8089
8090 Deletes the C++ object this Python object is a proxy for.
8091 """
8092 return _core_.Menu_DestroyId(*args, **kwargs)
8093
8094 def DestroyItem(*args, **kwargs):
8095 """
8096 DestroyItem(self, MenuItem item) -> bool
8097
8098 Deletes the C++ object this Python object is a proxy for.
8099 """
8100 return _core_.Menu_DestroyItem(*args, **kwargs)
8101
8102 def GetMenuItemCount(*args, **kwargs):
8103 """GetMenuItemCount(self) -> size_t"""
8104 return _core_.Menu_GetMenuItemCount(*args, **kwargs)
8105
8106 def GetMenuItems(*args, **kwargs):
8107 """GetMenuItems(self) -> PyObject"""
8108 return _core_.Menu_GetMenuItems(*args, **kwargs)
8109
8110 def FindItem(*args, **kwargs):
8111 """FindItem(self, String item) -> int"""
8112 return _core_.Menu_FindItem(*args, **kwargs)
8113
8114 def FindItemById(*args, **kwargs):
8115 """FindItemById(self, int id) -> MenuItem"""
8116 return _core_.Menu_FindItemById(*args, **kwargs)
8117
8118 def FindItemByPosition(*args, **kwargs):
8119 """FindItemByPosition(self, size_t position) -> MenuItem"""
8120 return _core_.Menu_FindItemByPosition(*args, **kwargs)
8121
8122 def Enable(*args, **kwargs):
8123 """Enable(self, int id, bool enable)"""
8124 return _core_.Menu_Enable(*args, **kwargs)
8125
8126 def IsEnabled(*args, **kwargs):
8127 """IsEnabled(self, int id) -> bool"""
8128 return _core_.Menu_IsEnabled(*args, **kwargs)
8129
8130 def Check(*args, **kwargs):
8131 """Check(self, int id, bool check)"""
8132 return _core_.Menu_Check(*args, **kwargs)
8133
8134 def IsChecked(*args, **kwargs):
8135 """IsChecked(self, int id) -> bool"""
8136 return _core_.Menu_IsChecked(*args, **kwargs)
8137
8138 def SetLabel(*args, **kwargs):
8139 """SetLabel(self, int id, String label)"""
8140 return _core_.Menu_SetLabel(*args, **kwargs)
8141
8142 def GetLabel(*args, **kwargs):
8143 """GetLabel(self, int id) -> String"""
8144 return _core_.Menu_GetLabel(*args, **kwargs)
8145
8146 def SetHelpString(*args, **kwargs):
8147 """SetHelpString(self, int id, String helpString)"""
8148 return _core_.Menu_SetHelpString(*args, **kwargs)
8149
8150 def GetHelpString(*args, **kwargs):
8151 """GetHelpString(self, int id) -> String"""
8152 return _core_.Menu_GetHelpString(*args, **kwargs)
8153
8154 def SetTitle(*args, **kwargs):
8155 """SetTitle(self, String title)"""
8156 return _core_.Menu_SetTitle(*args, **kwargs)
8157
8158 def GetTitle(*args, **kwargs):
8159 """GetTitle(self) -> String"""
8160 return _core_.Menu_GetTitle(*args, **kwargs)
8161
8162 def SetEventHandler(*args, **kwargs):
8163 """SetEventHandler(self, EvtHandler handler)"""
8164 return _core_.Menu_SetEventHandler(*args, **kwargs)
8165
8166 def GetEventHandler(*args, **kwargs):
8167 """GetEventHandler(self) -> EvtHandler"""
8168 return _core_.Menu_GetEventHandler(*args, **kwargs)
8169
8170 def SetInvokingWindow(*args, **kwargs):
8171 """SetInvokingWindow(self, Window win)"""
8172 return _core_.Menu_SetInvokingWindow(*args, **kwargs)
8173
8174 def GetInvokingWindow(*args, **kwargs):
8175 """GetInvokingWindow(self) -> Window"""
8176 return _core_.Menu_GetInvokingWindow(*args, **kwargs)
8177
8178 def GetStyle(*args, **kwargs):
8179 """GetStyle(self) -> long"""
8180 return _core_.Menu_GetStyle(*args, **kwargs)
8181
8182 def UpdateUI(*args, **kwargs):
8183 """UpdateUI(self, EvtHandler source=None)"""
8184 return _core_.Menu_UpdateUI(*args, **kwargs)
8185
8186 def GetMenuBar(*args, **kwargs):
8187 """GetMenuBar(self) -> MenuBar"""
8188 return _core_.Menu_GetMenuBar(*args, **kwargs)
8189
8190 def Attach(*args, **kwargs):
8191 """Attach(self, wxMenuBarBase menubar)"""
8192 return _core_.Menu_Attach(*args, **kwargs)
8193
8194 def Detach(*args, **kwargs):
8195 """Detach(self)"""
8196 return _core_.Menu_Detach(*args, **kwargs)
8197
8198 def IsAttached(*args, **kwargs):
8199 """IsAttached(self) -> bool"""
8200 return _core_.Menu_IsAttached(*args, **kwargs)
8201
8202 def SetParent(*args, **kwargs):
8203 """SetParent(self, Menu parent)"""
8204 return _core_.Menu_SetParent(*args, **kwargs)
8205
8206 def GetParent(*args, **kwargs):
8207 """GetParent(self) -> Menu"""
8208 return _core_.Menu_GetParent(*args, **kwargs)
8209
8210
8211 class MenuPtr(Menu):
8212 def __init__(self, this):
8213 self.this = this
8214 if not hasattr(self,"thisown"): self.thisown = 0
8215 self.__class__ = Menu
8216 _core_.Menu_swigregister(MenuPtr)
8217 DefaultValidator = cvar.DefaultValidator
8218
8219 #---------------------------------------------------------------------------
8220
8221 class MenuBar(Window):
8222 def __repr__(self):
8223 return "<%s.%s; proxy of C++ wxMenuBar instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
8224 def __init__(self, *args, **kwargs):
8225 """__init__(self, long style=0) -> MenuBar"""
8226 newobj = _core_.new_MenuBar(*args, **kwargs)
8227 self.this = newobj.this
8228 self.thisown = 1
8229 del newobj.thisown
8230 self._setOORInfo(self)
8231
8232 def Append(*args, **kwargs):
8233 """Append(self, Menu menu, String title) -> bool"""
8234 return _core_.MenuBar_Append(*args, **kwargs)
8235
8236 def Insert(*args, **kwargs):
8237 """Insert(self, size_t pos, Menu menu, String title) -> bool"""
8238 return _core_.MenuBar_Insert(*args, **kwargs)
8239
8240 def GetMenuCount(*args, **kwargs):
8241 """GetMenuCount(self) -> size_t"""
8242 return _core_.MenuBar_GetMenuCount(*args, **kwargs)
8243
8244 def GetMenu(*args, **kwargs):
8245 """GetMenu(self, size_t pos) -> Menu"""
8246 return _core_.MenuBar_GetMenu(*args, **kwargs)
8247
8248 def Replace(*args, **kwargs):
8249 """Replace(self, size_t pos, Menu menu, String title) -> Menu"""
8250 return _core_.MenuBar_Replace(*args, **kwargs)
8251
8252 def Remove(*args, **kwargs):
8253 """Remove(self, size_t pos) -> Menu"""
8254 return _core_.MenuBar_Remove(*args, **kwargs)
8255
8256 def EnableTop(*args, **kwargs):
8257 """EnableTop(self, size_t pos, bool enable)"""
8258 return _core_.MenuBar_EnableTop(*args, **kwargs)
8259
8260 def IsEnabledTop(*args, **kwargs):
8261 """IsEnabledTop(self, size_t pos) -> bool"""
8262 return _core_.MenuBar_IsEnabledTop(*args, **kwargs)
8263
8264 def SetLabelTop(*args, **kwargs):
8265 """SetLabelTop(self, size_t pos, String label)"""
8266 return _core_.MenuBar_SetLabelTop(*args, **kwargs)
8267
8268 def GetLabelTop(*args, **kwargs):
8269 """GetLabelTop(self, size_t pos) -> String"""
8270 return _core_.MenuBar_GetLabelTop(*args, **kwargs)
8271
8272 def FindMenuItem(*args, **kwargs):
8273 """FindMenuItem(self, String menu, String item) -> int"""
8274 return _core_.MenuBar_FindMenuItem(*args, **kwargs)
8275
8276 def FindItemById(*args, **kwargs):
8277 """FindItemById(self, int id) -> MenuItem"""
8278 return _core_.MenuBar_FindItemById(*args, **kwargs)
8279
8280 def FindMenu(*args, **kwargs):
8281 """FindMenu(self, String title) -> int"""
8282 return _core_.MenuBar_FindMenu(*args, **kwargs)
8283
8284 def Enable(*args, **kwargs):
8285 """Enable(self, int id, bool enable)"""
8286 return _core_.MenuBar_Enable(*args, **kwargs)
8287
8288 def Check(*args, **kwargs):
8289 """Check(self, int id, bool check)"""
8290 return _core_.MenuBar_Check(*args, **kwargs)
8291
8292 def IsChecked(*args, **kwargs):
8293 """IsChecked(self, int id) -> bool"""
8294 return _core_.MenuBar_IsChecked(*args, **kwargs)
8295
8296 def IsEnabled(*args, **kwargs):
8297 """IsEnabled(self, int id) -> bool"""
8298 return _core_.MenuBar_IsEnabled(*args, **kwargs)
8299
8300 def SetLabel(*args, **kwargs):
8301 """SetLabel(self, int id, String label)"""
8302 return _core_.MenuBar_SetLabel(*args, **kwargs)
8303
8304 def GetLabel(*args, **kwargs):
8305 """GetLabel(self, int id) -> String"""
8306 return _core_.MenuBar_GetLabel(*args, **kwargs)
8307
8308 def SetHelpString(*args, **kwargs):
8309 """SetHelpString(self, int id, String helpString)"""
8310 return _core_.MenuBar_SetHelpString(*args, **kwargs)
8311
8312 def GetHelpString(*args, **kwargs):
8313 """GetHelpString(self, int id) -> String"""
8314 return _core_.MenuBar_GetHelpString(*args, **kwargs)
8315
8316 def GetFrame(*args, **kwargs):
8317 """GetFrame(self) -> wxFrame"""
8318 return _core_.MenuBar_GetFrame(*args, **kwargs)
8319
8320 def IsAttached(*args, **kwargs):
8321 """IsAttached(self) -> bool"""
8322 return _core_.MenuBar_IsAttached(*args, **kwargs)
8323
8324 def Attach(*args, **kwargs):
8325 """Attach(self, wxFrame frame)"""
8326 return _core_.MenuBar_Attach(*args, **kwargs)
8327
8328 def Detach(*args, **kwargs):
8329 """Detach(self)"""
8330 return _core_.MenuBar_Detach(*args, **kwargs)
8331
8332
8333 class MenuBarPtr(MenuBar):
8334 def __init__(self, this):
8335 self.this = this
8336 if not hasattr(self,"thisown"): self.thisown = 0
8337 self.__class__ = MenuBar
8338 _core_.MenuBar_swigregister(MenuBarPtr)
8339
8340 #---------------------------------------------------------------------------
8341
8342 class MenuItem(Object):
8343 def __repr__(self):
8344 return "<%s.%s; proxy of C++ wxMenuItem instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
8345 def __init__(self, *args, **kwargs):
8346 """
8347 __init__(self, Menu parentMenu=None, int id=ID_ANY, String text=EmptyString,
8348 String help=EmptyString, int kind=ITEM_NORMAL,
8349 Menu subMenu=None) -> MenuItem
8350 """
8351 newobj = _core_.new_MenuItem(*args, **kwargs)
8352 self.this = newobj.this
8353 self.thisown = 1
8354 del newobj.thisown
8355 def GetMenu(*args, **kwargs):
8356 """GetMenu(self) -> Menu"""
8357 return _core_.MenuItem_GetMenu(*args, **kwargs)
8358
8359 def SetMenu(*args, **kwargs):
8360 """SetMenu(self, Menu menu)"""
8361 return _core_.MenuItem_SetMenu(*args, **kwargs)
8362
8363 def SetId(*args, **kwargs):
8364 """SetId(self, int id)"""
8365 return _core_.MenuItem_SetId(*args, **kwargs)
8366
8367 def GetId(*args, **kwargs):
8368 """GetId(self) -> int"""
8369 return _core_.MenuItem_GetId(*args, **kwargs)
8370
8371 def IsSeparator(*args, **kwargs):
8372 """IsSeparator(self) -> bool"""
8373 return _core_.MenuItem_IsSeparator(*args, **kwargs)
8374
8375 def SetText(*args, **kwargs):
8376 """SetText(self, String str)"""
8377 return _core_.MenuItem_SetText(*args, **kwargs)
8378
8379 def GetLabel(*args, **kwargs):
8380 """GetLabel(self) -> String"""
8381 return _core_.MenuItem_GetLabel(*args, **kwargs)
8382
8383 def GetText(*args, **kwargs):
8384 """GetText(self) -> String"""
8385 return _core_.MenuItem_GetText(*args, **kwargs)
8386
8387 def GetLabelFromText(*args, **kwargs):
8388 """GetLabelFromText(String text) -> String"""
8389 return _core_.MenuItem_GetLabelFromText(*args, **kwargs)
8390
8391 GetLabelFromText = staticmethod(GetLabelFromText)
8392 def GetKind(*args, **kwargs):
8393 """GetKind(self) -> int"""
8394 return _core_.MenuItem_GetKind(*args, **kwargs)
8395
8396 def SetKind(*args, **kwargs):
8397 """SetKind(self, int kind)"""
8398 return _core_.MenuItem_SetKind(*args, **kwargs)
8399
8400 def SetCheckable(*args, **kwargs):
8401 """SetCheckable(self, bool checkable)"""
8402 return _core_.MenuItem_SetCheckable(*args, **kwargs)
8403
8404 def IsCheckable(*args, **kwargs):
8405 """IsCheckable(self) -> bool"""
8406 return _core_.MenuItem_IsCheckable(*args, **kwargs)
8407
8408 def IsSubMenu(*args, **kwargs):
8409 """IsSubMenu(self) -> bool"""
8410 return _core_.MenuItem_IsSubMenu(*args, **kwargs)
8411
8412 def SetSubMenu(*args, **kwargs):
8413 """SetSubMenu(self, Menu menu)"""
8414 return _core_.MenuItem_SetSubMenu(*args, **kwargs)
8415
8416 def GetSubMenu(*args, **kwargs):
8417 """GetSubMenu(self) -> Menu"""
8418 return _core_.MenuItem_GetSubMenu(*args, **kwargs)
8419
8420 def Enable(*args, **kwargs):
8421 """Enable(self, bool enable=True)"""
8422 return _core_.MenuItem_Enable(*args, **kwargs)
8423
8424 def IsEnabled(*args, **kwargs):
8425 """IsEnabled(self) -> bool"""
8426 return _core_.MenuItem_IsEnabled(*args, **kwargs)
8427
8428 def Check(*args, **kwargs):
8429 """Check(self, bool check=True)"""
8430 return _core_.MenuItem_Check(*args, **kwargs)
8431
8432 def IsChecked(*args, **kwargs):
8433 """IsChecked(self) -> bool"""
8434 return _core_.MenuItem_IsChecked(*args, **kwargs)
8435
8436 def Toggle(*args, **kwargs):
8437 """Toggle(self)"""
8438 return _core_.MenuItem_Toggle(*args, **kwargs)
8439
8440 def SetHelp(*args, **kwargs):
8441 """SetHelp(self, String str)"""
8442 return _core_.MenuItem_SetHelp(*args, **kwargs)
8443
8444 def GetHelp(*args, **kwargs):
8445 """GetHelp(self) -> String"""
8446 return _core_.MenuItem_GetHelp(*args, **kwargs)
8447
8448 def GetAccel(*args, **kwargs):
8449 """GetAccel(self) -> AcceleratorEntry"""
8450 return _core_.MenuItem_GetAccel(*args, **kwargs)
8451
8452 def SetAccel(*args, **kwargs):
8453 """SetAccel(self, AcceleratorEntry accel)"""
8454 return _core_.MenuItem_SetAccel(*args, **kwargs)
8455
8456 def SetFont(*args, **kwargs):
8457 """SetFont(self, Font font)"""
8458 return _core_.MenuItem_SetFont(*args, **kwargs)
8459
8460 def GetFont(*args, **kwargs):
8461 """GetFont(self) -> Font"""
8462 return _core_.MenuItem_GetFont(*args, **kwargs)
8463
8464 def SetTextColour(*args, **kwargs):
8465 """SetTextColour(self, Colour colText)"""
8466 return _core_.MenuItem_SetTextColour(*args, **kwargs)
8467
8468 def GetTextColour(*args, **kwargs):
8469 """GetTextColour(self) -> Colour"""
8470 return _core_.MenuItem_GetTextColour(*args, **kwargs)
8471
8472 def SetBackgroundColour(*args, **kwargs):
8473 """SetBackgroundColour(self, Colour colBack)"""
8474 return _core_.MenuItem_SetBackgroundColour(*args, **kwargs)
8475
8476 def GetBackgroundColour(*args, **kwargs):
8477 """GetBackgroundColour(self) -> Colour"""
8478 return _core_.MenuItem_GetBackgroundColour(*args, **kwargs)
8479
8480 def SetBitmaps(*args, **kwargs):
8481 """SetBitmaps(self, Bitmap bmpChecked, Bitmap bmpUnchecked=wxNullBitmap)"""
8482 return _core_.MenuItem_SetBitmaps(*args, **kwargs)
8483
8484 def SetDisabledBitmap(*args, **kwargs):
8485 """SetDisabledBitmap(self, Bitmap bmpDisabled)"""
8486 return _core_.MenuItem_SetDisabledBitmap(*args, **kwargs)
8487
8488 def GetDisabledBitmap(*args, **kwargs):
8489 """GetDisabledBitmap(self) -> Bitmap"""
8490 return _core_.MenuItem_GetDisabledBitmap(*args, **kwargs)
8491
8492 def SetMarginWidth(*args, **kwargs):
8493 """SetMarginWidth(self, int nWidth)"""
8494 return _core_.MenuItem_SetMarginWidth(*args, **kwargs)
8495
8496 def GetMarginWidth(*args, **kwargs):
8497 """GetMarginWidth(self) -> int"""
8498 return _core_.MenuItem_GetMarginWidth(*args, **kwargs)
8499
8500 def GetDefaultMarginWidth(*args, **kwargs):
8501 """GetDefaultMarginWidth() -> int"""
8502 return _core_.MenuItem_GetDefaultMarginWidth(*args, **kwargs)
8503
8504 GetDefaultMarginWidth = staticmethod(GetDefaultMarginWidth)
8505 def IsOwnerDrawn(*args, **kwargs):
8506 """IsOwnerDrawn(self) -> bool"""
8507 return _core_.MenuItem_IsOwnerDrawn(*args, **kwargs)
8508
8509 def SetOwnerDrawn(*args, **kwargs):
8510 """SetOwnerDrawn(self, bool ownerDrawn=True)"""
8511 return _core_.MenuItem_SetOwnerDrawn(*args, **kwargs)
8512
8513 def ResetOwnerDrawn(*args, **kwargs):
8514 """ResetOwnerDrawn(self)"""
8515 return _core_.MenuItem_ResetOwnerDrawn(*args, **kwargs)
8516
8517 def SetBitmap(*args, **kwargs):
8518 """SetBitmap(self, Bitmap bitmap)"""
8519 return _core_.MenuItem_SetBitmap(*args, **kwargs)
8520
8521 def GetBitmap(*args, **kwargs):
8522 """GetBitmap(self) -> Bitmap"""
8523 return _core_.MenuItem_GetBitmap(*args, **kwargs)
8524
8525
8526 class MenuItemPtr(MenuItem):
8527 def __init__(self, this):
8528 self.this = this
8529 if not hasattr(self,"thisown"): self.thisown = 0
8530 self.__class__ = MenuItem
8531 _core_.MenuItem_swigregister(MenuItemPtr)
8532
8533 def MenuItem_GetLabelFromText(*args, **kwargs):
8534 """MenuItem_GetLabelFromText(String text) -> String"""
8535 return _core_.MenuItem_GetLabelFromText(*args, **kwargs)
8536
8537 def MenuItem_GetDefaultMarginWidth(*args, **kwargs):
8538 """MenuItem_GetDefaultMarginWidth() -> int"""
8539 return _core_.MenuItem_GetDefaultMarginWidth(*args, **kwargs)
8540
8541 #---------------------------------------------------------------------------
8542
8543 class Control(Window):
8544 """
8545 This is the base class for a control or 'widget'.
8546
8547 A control is generally a small window which processes user input
8548 and/or displays one or more item of data.
8549 """
8550 def __repr__(self):
8551 return "<%s.%s; proxy of C++ wxControl instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
8552 def __init__(self, *args, **kwargs):
8553 """
8554 __init__(self, Window parent, int id=-1, Point pos=DefaultPosition,
8555 Size size=DefaultSize, long style=0, Validator validator=DefaultValidator,
8556 String name=ControlNameStr) -> Control
8557
8558 Create a Control. Normally you should only call this from a subclass'
8559 __init__ as a plain old wx.Control is not very useful.
8560 """
8561 newobj = _core_.new_Control(*args, **kwargs)
8562 self.this = newobj.this
8563 self.thisown = 1
8564 del newobj.thisown
8565 self._setOORInfo(self)
8566
8567 def Create(*args, **kwargs):
8568 """
8569 Create(self, Window parent, int id=-1, Point pos=DefaultPosition,
8570 Size size=DefaultSize, long style=0, Validator validator=DefaultValidator,
8571 String name=ControlNameStr) -> bool
8572
8573 Do the 2nd phase and create the GUI control.
8574 """
8575 return _core_.Control_Create(*args, **kwargs)
8576
8577 def Command(*args, **kwargs):
8578 """
8579 Command(self, CommandEvent event)
8580
8581 Simulates the effect of the user issuing a command to the item.
8582
8583 :see: `wx.CommandEvent`
8584
8585 """
8586 return _core_.Control_Command(*args, **kwargs)
8587
8588 def GetLabel(*args, **kwargs):
8589 """
8590 GetLabel(self) -> String
8591
8592 Return a control's text.
8593 """
8594 return _core_.Control_GetLabel(*args, **kwargs)
8595
8596 def SetLabel(*args, **kwargs):
8597 """
8598 SetLabel(self, String label)
8599
8600 Sets the item's text.
8601 """
8602 return _core_.Control_SetLabel(*args, **kwargs)
8603
8604 def GetClassDefaultAttributes(*args, **kwargs):
8605 """
8606 GetClassDefaultAttributes(int variant=WINDOW_VARIANT_NORMAL) -> VisualAttributes
8607
8608 Get the default attributes for this class. This is useful if you want
8609 to use the same font or colour in your own control as in a standard
8610 control -- which is a much better idea than hard coding specific
8611 colours or fonts which might look completely out of place on the
8612 user's system, especially if it uses themes.
8613
8614 The variant parameter is only relevant under Mac currently and is
8615 ignore under other platforms. Under Mac, it will change the size of
8616 the returned font. See `wx.Window.SetWindowVariant` for more about
8617 this.
8618 """
8619 return _core_.Control_GetClassDefaultAttributes(*args, **kwargs)
8620
8621 GetClassDefaultAttributes = staticmethod(GetClassDefaultAttributes)
8622
8623 class ControlPtr(Control):
8624 def __init__(self, this):
8625 self.this = this
8626 if not hasattr(self,"thisown"): self.thisown = 0
8627 self.__class__ = Control
8628 _core_.Control_swigregister(ControlPtr)
8629 ControlNameStr = cvar.ControlNameStr
8630
8631 def PreControl(*args, **kwargs):
8632 """
8633 PreControl() -> Control
8634
8635 Precreate a Control control for 2-phase creation
8636 """
8637 val = _core_.new_PreControl(*args, **kwargs)
8638 val.thisown = 1
8639 return val
8640
8641 def Control_GetClassDefaultAttributes(*args, **kwargs):
8642 """
8643 Control_GetClassDefaultAttributes(int variant=WINDOW_VARIANT_NORMAL) -> VisualAttributes
8644
8645 Get the default attributes for this class. This is useful if you want
8646 to use the same font or colour in your own control as in a standard
8647 control -- which is a much better idea than hard coding specific
8648 colours or fonts which might look completely out of place on the
8649 user's system, especially if it uses themes.
8650
8651 The variant parameter is only relevant under Mac currently and is
8652 ignore under other platforms. Under Mac, it will change the size of
8653 the returned font. See `wx.Window.SetWindowVariant` for more about
8654 this.
8655 """
8656 return _core_.Control_GetClassDefaultAttributes(*args, **kwargs)
8657
8658 #---------------------------------------------------------------------------
8659
8660 class ItemContainer(object):
8661 """
8662 wx.ItemContainer defines an interface which is implemented by all
8663 controls which have string subitems, each of which may be selected,
8664 such as `wx.ListBox`, `wx.CheckListBox`, `wx.Choice` as well as
8665 `wx.ComboBox` which implements an extended interface deriving from
8666 this one.
8667
8668 It defines the methods for accessing the control's items and although
8669 each of the derived classes implements them differently, they still
8670 all conform to the same interface.
8671
8672 The items in a wx.ItemContainer have (non empty) string labels and,
8673 optionally, client data associated with them.
8674
8675 """
8676 def __init__(self): raise RuntimeError, "No constructor defined"
8677 def __repr__(self):
8678 return "<%s.%s; proxy of C++ wxItemContainer instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
8679 def Append(*args, **kwargs):
8680 """
8681 Append(self, String item, PyObject clientData=None) -> int
8682
8683 Adds the item to the control, associating the given data with the item
8684 if not None. The return value is the index of the newly added item
8685 which may be different from the last one if the control is sorted (e.g.
8686 has wx.LB_SORT or wx.CB_SORT style).
8687 """
8688 return _core_.ItemContainer_Append(*args, **kwargs)
8689
8690 def AppendItems(*args, **kwargs):
8691 """
8692 AppendItems(self, List strings)
8693
8694 Apend several items at once to the control. Notice that calling this
8695 method may be much faster than appending the items one by one if you
8696 need to add a lot of items.
8697 """
8698 return _core_.ItemContainer_AppendItems(*args, **kwargs)
8699
8700 def Insert(*args, **kwargs):
8701 """
8702 Insert(self, String item, int pos, PyObject clientData=None) -> int
8703
8704 Insert an item into the control before the item at the ``pos`` index,
8705 optionally associating some data object with the item.
8706 """
8707 return _core_.ItemContainer_Insert(*args, **kwargs)
8708
8709 def Clear(*args, **kwargs):
8710 """
8711 Clear(self)
8712
8713 Removes all items from the control.
8714 """
8715 return _core_.ItemContainer_Clear(*args, **kwargs)
8716
8717 def Delete(*args, **kwargs):
8718 """
8719 Delete(self, int n)
8720
8721 Deletes the item at the zero-based index 'n' from the control. Note
8722 that it is an error (signalled by a `wx.PyAssertionError` exception if
8723 enabled) to remove an item with the index negative or greater or equal
8724 than the number of items in the control.
8725 """
8726 return _core_.ItemContainer_Delete(*args, **kwargs)
8727
8728 def GetCount(*args, **kwargs):
8729 """
8730 GetCount(self) -> int
8731
8732 Returns the number of items in the control.
8733 """
8734 return _core_.ItemContainer_GetCount(*args, **kwargs)
8735
8736 def IsEmpty(*args, **kwargs):
8737 """
8738 IsEmpty(self) -> bool
8739
8740 Returns True if the control is empty or False if it has some items.
8741 """
8742 return _core_.ItemContainer_IsEmpty(*args, **kwargs)
8743
8744 def GetString(*args, **kwargs):
8745 """
8746 GetString(self, int n) -> String
8747
8748 Returns the label of the item with the given index.
8749 """
8750 return _core_.ItemContainer_GetString(*args, **kwargs)
8751
8752 def GetStrings(*args, **kwargs):
8753 """GetStrings(self) -> wxArrayString"""
8754 return _core_.ItemContainer_GetStrings(*args, **kwargs)
8755
8756 def SetString(*args, **kwargs):
8757 """
8758 SetString(self, int n, String s)
8759
8760 Sets the label for the given item.
8761 """
8762 return _core_.ItemContainer_SetString(*args, **kwargs)
8763
8764 def FindString(*args, **kwargs):
8765 """
8766 FindString(self, String s) -> int
8767
8768 Finds an item whose label matches the given string. Returns the
8769 zero-based position of the item, or ``wx.NOT_FOUND`` if the string was not
8770 found.
8771 """
8772 return _core_.ItemContainer_FindString(*args, **kwargs)
8773
8774 def Select(*args, **kwargs):
8775 """
8776 Select(self, int n)
8777
8778 Sets the item at index 'n' to be the selected item.
8779 """
8780 return _core_.ItemContainer_Select(*args, **kwargs)
8781
8782 SetSelection = Select
8783 def GetSelection(*args, **kwargs):
8784 """
8785 GetSelection(self) -> int
8786
8787 Returns the index of the selected item or ``wx.NOT_FOUND`` if no item
8788 is selected.
8789 """
8790 return _core_.ItemContainer_GetSelection(*args, **kwargs)
8791
8792 def GetStringSelection(*args, **kwargs):
8793 """
8794 GetStringSelection(self) -> String
8795
8796 Returns the label of the selected item or an empty string if no item
8797 is selected.
8798 """
8799 return _core_.ItemContainer_GetStringSelection(*args, **kwargs)
8800
8801 def GetClientData(*args, **kwargs):
8802 """
8803 GetClientData(self, int n) -> PyObject
8804
8805 Returns the client data associated with the given item, (if any.)
8806 """
8807 return _core_.ItemContainer_GetClientData(*args, **kwargs)
8808
8809 def SetClientData(*args, **kwargs):
8810 """
8811 SetClientData(self, int n, PyObject clientData)
8812
8813 Associate the given client data with the item at position n.
8814 """
8815 return _core_.ItemContainer_SetClientData(*args, **kwargs)
8816
8817
8818 class ItemContainerPtr(ItemContainer):
8819 def __init__(self, this):
8820 self.this = this
8821 if not hasattr(self,"thisown"): self.thisown = 0
8822 self.__class__ = ItemContainer
8823 _core_.ItemContainer_swigregister(ItemContainerPtr)
8824
8825 #---------------------------------------------------------------------------
8826
8827 class ControlWithItems(Control,ItemContainer):
8828 """
8829 wx.ControlWithItems combines the ``wx.ItemContainer`` class with the
8830 wx.Control class, and is used for the base class of various controls
8831 that have items.
8832 """
8833 def __init__(self): raise RuntimeError, "No constructor defined"
8834 def __repr__(self):
8835 return "<%s.%s; proxy of C++ wxControlWithItems instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
8836
8837 class ControlWithItemsPtr(ControlWithItems):
8838 def __init__(self, this):
8839 self.this = this
8840 if not hasattr(self,"thisown"): self.thisown = 0
8841 self.__class__ = ControlWithItems
8842 _core_.ControlWithItems_swigregister(ControlWithItemsPtr)
8843
8844 #---------------------------------------------------------------------------
8845
8846 class SizerItem(Object):
8847 """
8848 The wx.SizerItem class is used to track the position, size and other
8849 attributes of each item managed by a `wx.Sizer`. In normal usage user
8850 code should never need to deal directly with a wx.SizerItem, but
8851 custom classes derived from `wx.PySizer` will probably need to use the
8852 collection of wx.SizerItems held by wx.Sizer when calculating layout.
8853
8854 :see: `wx.Sizer`, `wx.GBSizerItem`
8855 """
8856 def __repr__(self):
8857 return "<%s.%s; proxy of C++ wxSizerItem instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
8858 def __init__(self, *args, **kwargs):
8859 """
8860 __init__(self) -> SizerItem
8861
8862 Constructs an empty wx.SizerItem. Either a window, sizer or spacer
8863 size will need to be set before this item can be used in a Sizer.
8864
8865 You will probably never need to create a wx.SizerItem directly as they
8866 are created automatically when the sizer's Add, Insert or Prepend
8867 methods are called.
8868
8869 :see: `wx.SizerItemSpacer`, `wx.SizerItemWindow`, `wx.SizerItemSizer`
8870 """
8871 newobj = _core_.new_SizerItem(*args, **kwargs)
8872 self.this = newobj.this
8873 self.thisown = 1
8874 del newobj.thisown
8875 def DeleteWindows(*args, **kwargs):
8876 """
8877 DeleteWindows(self)
8878
8879 Destroy the window or the windows in a subsizer, depending on the type
8880 of item.
8881 """
8882 return _core_.SizerItem_DeleteWindows(*args, **kwargs)
8883
8884 def DetachSizer(*args, **kwargs):
8885 """
8886 DetachSizer(self)
8887
8888 Enable deleting the SizerItem without destroying the contained sizer.
8889 """
8890 return _core_.SizerItem_DetachSizer(*args, **kwargs)
8891
8892 def GetSize(*args, **kwargs):
8893 """
8894 GetSize(self) -> Size
8895
8896 Get the current size of the item, as set in the last Layout.
8897 """
8898 return _core_.SizerItem_GetSize(*args, **kwargs)
8899
8900 def CalcMin(*args, **kwargs):
8901 """
8902 CalcMin(self) -> Size
8903
8904 Calculates the minimum desired size for the item, including any space
8905 needed by borders.
8906 """
8907 return _core_.SizerItem_CalcMin(*args, **kwargs)
8908
8909 def SetDimension(*args, **kwargs):
8910 """
8911 SetDimension(self, Point pos, Size size)
8912
8913 Set the position and size of the space allocated for this item by the
8914 sizer, and adjust the position and size of the item (window or
8915 subsizer) to be within that space taking alignment and borders into
8916 account.
8917 """
8918 return _core_.SizerItem_SetDimension(*args, **kwargs)
8919
8920 def GetMinSize(*args, **kwargs):
8921 """
8922 GetMinSize(self) -> Size
8923
8924 Get the minimum size needed for the item.
8925 """
8926 return _core_.SizerItem_GetMinSize(*args, **kwargs)
8927
8928 def GetMinSizeWithBorder(*args, **kwargs):
8929 """
8930 GetMinSizeWithBorder(self) -> Size
8931
8932 Get the minimum size needed for the item with space for the borders
8933 added, if needed.
8934 """
8935 return _core_.SizerItem_GetMinSizeWithBorder(*args, **kwargs)
8936
8937 def SetInitSize(*args, **kwargs):
8938 """SetInitSize(self, int x, int y)"""
8939 return _core_.SizerItem_SetInitSize(*args, **kwargs)
8940
8941 def SetRatioWH(*args, **kwargs):
8942 """
8943 SetRatioWH(self, int width, int height)
8944
8945 Set the ratio item attribute.
8946 """
8947 return _core_.SizerItem_SetRatioWH(*args, **kwargs)
8948
8949 def SetRatioSize(*args, **kwargs):
8950 """
8951 SetRatioSize(self, Size size)
8952
8953 Set the ratio item attribute.
8954 """
8955 return _core_.SizerItem_SetRatioSize(*args, **kwargs)
8956
8957 def SetRatio(*args, **kwargs):
8958 """
8959 SetRatio(self, float ratio)
8960
8961 Set the ratio item attribute.
8962 """
8963 return _core_.SizerItem_SetRatio(*args, **kwargs)
8964
8965 def GetRatio(*args, **kwargs):
8966 """
8967 GetRatio(self) -> float
8968
8969 Set the ratio item attribute.
8970 """
8971 return _core_.SizerItem_GetRatio(*args, **kwargs)
8972
8973 def GetRect(*args, **kwargs):
8974 """
8975 GetRect(self) -> Rect
8976
8977 Returns the rectangle that the sizer item should occupy
8978 """
8979 return _core_.SizerItem_GetRect(*args, **kwargs)
8980
8981 def IsWindow(*args, **kwargs):
8982 """
8983 IsWindow(self) -> bool
8984
8985 Is this sizer item a window?
8986 """
8987 return _core_.SizerItem_IsWindow(*args, **kwargs)
8988
8989 def IsSizer(*args, **kwargs):
8990 """
8991 IsSizer(self) -> bool
8992
8993 Is this sizer item a subsizer?
8994 """
8995 return _core_.SizerItem_IsSizer(*args, **kwargs)
8996
8997 def IsSpacer(*args, **kwargs):
8998 """
8999 IsSpacer(self) -> bool
9000
9001 Is this sizer item a spacer?
9002 """
9003 return _core_.SizerItem_IsSpacer(*args, **kwargs)
9004
9005 def SetProportion(*args, **kwargs):
9006 """
9007 SetProportion(self, int proportion)
9008
9009 Set the proportion value for this item.
9010 """
9011 return _core_.SizerItem_SetProportion(*args, **kwargs)
9012
9013 def GetProportion(*args, **kwargs):
9014 """
9015 GetProportion(self) -> int
9016
9017 Get the proportion value for this item.
9018 """
9019 return _core_.SizerItem_GetProportion(*args, **kwargs)
9020
9021 SetOption = wx._deprecated(SetProportion, "Please use `SetProportion` instead.")
9022 GetOption = wx._deprecated(GetProportion, "Please use `GetProportion` instead.")
9023 def SetFlag(*args, **kwargs):
9024 """
9025 SetFlag(self, int flag)
9026
9027 Set the flag value for this item.
9028 """
9029 return _core_.SizerItem_SetFlag(*args, **kwargs)
9030
9031 def GetFlag(*args, **kwargs):
9032 """
9033 GetFlag(self) -> int
9034
9035 Get the flag value for this item.
9036 """
9037 return _core_.SizerItem_GetFlag(*args, **kwargs)
9038
9039 def SetBorder(*args, **kwargs):
9040 """
9041 SetBorder(self, int border)
9042
9043 Set the border value for this item.
9044 """
9045 return _core_.SizerItem_SetBorder(*args, **kwargs)
9046
9047 def GetBorder(*args, **kwargs):
9048 """
9049 GetBorder(self) -> int
9050
9051 Get the border value for this item.
9052 """
9053 return _core_.SizerItem_GetBorder(*args, **kwargs)
9054
9055 def GetWindow(*args, **kwargs):
9056 """
9057 GetWindow(self) -> Window
9058
9059 Get the window (if any) that is managed by this sizer item.
9060 """
9061 return _core_.SizerItem_GetWindow(*args, **kwargs)
9062
9063 def SetWindow(*args, **kwargs):
9064 """
9065 SetWindow(self, Window window)
9066
9067 Set the window to be managed by this sizer item.
9068 """
9069 return _core_.SizerItem_SetWindow(*args, **kwargs)
9070
9071 def GetSizer(*args, **kwargs):
9072 """
9073 GetSizer(self) -> Sizer
9074
9075 Get the subsizer (if any) that is managed by this sizer item.
9076 """
9077 return _core_.SizerItem_GetSizer(*args, **kwargs)
9078
9079 def SetSizer(*args, **kwargs):
9080 """
9081 SetSizer(self, Sizer sizer)
9082
9083 Set the subsizer to be managed by this sizer item.
9084 """
9085 return _core_.SizerItem_SetSizer(*args, **kwargs)
9086
9087 def GetSpacer(*args, **kwargs):
9088 """
9089 GetSpacer(self) -> Size
9090
9091 Get the size of the spacer managed by this sizer item.
9092 """
9093 return _core_.SizerItem_GetSpacer(*args, **kwargs)
9094
9095 def SetSpacer(*args, **kwargs):
9096 """
9097 SetSpacer(self, Size size)
9098
9099 Set the size of the spacer to be managed by this sizer item.
9100 """
9101 return _core_.SizerItem_SetSpacer(*args, **kwargs)
9102
9103 def Show(*args, **kwargs):
9104 """
9105 Show(self, bool show)
9106
9107 Set the show item attribute, which sizers use to determine if the item
9108 is to be made part of the layout or not. If the item is tracking a
9109 window then it is shown or hidden as needed.
9110 """
9111 return _core_.SizerItem_Show(*args, **kwargs)
9112
9113 def IsShown(*args, **kwargs):
9114 """
9115 IsShown(self) -> bool
9116
9117 Is the item to be shown in the layout?
9118 """
9119 return _core_.SizerItem_IsShown(*args, **kwargs)
9120
9121 def GetPosition(*args, **kwargs):
9122 """
9123 GetPosition(self) -> Point
9124
9125 Returns the current position of the item, as set in the last Layout.
9126 """
9127 return _core_.SizerItem_GetPosition(*args, **kwargs)
9128
9129 def GetUserData(*args, **kwargs):
9130 """
9131 GetUserData(self) -> PyObject
9132
9133 Returns the userData associated with this sizer item, or None if there
9134 isn't any.
9135 """
9136 return _core_.SizerItem_GetUserData(*args, **kwargs)
9137
9138
9139 class SizerItemPtr(SizerItem):
9140 def __init__(self, this):
9141 self.this = this
9142 if not hasattr(self,"thisown"): self.thisown = 0
9143 self.__class__ = SizerItem
9144 _core_.SizerItem_swigregister(SizerItemPtr)
9145
9146 def SizerItemWindow(*args, **kwargs):
9147 """
9148 SizerItemWindow(Window window, int proportion, int flag, int border,
9149 PyObject userData=None) -> SizerItem
9150
9151 Constructs a `wx.SizerItem` for tracking a window.
9152 """
9153 val = _core_.new_SizerItemWindow(*args, **kwargs)
9154 val.thisown = 1
9155 return val
9156
9157 def SizerItemSpacer(*args, **kwargs):
9158 """
9159 SizerItemSpacer(int width, int height, int proportion, int flag, int border,
9160 PyObject userData=None) -> SizerItem
9161
9162 Constructs a `wx.SizerItem` for tracking a spacer.
9163 """
9164 val = _core_.new_SizerItemSpacer(*args, **kwargs)
9165 val.thisown = 1
9166 return val
9167
9168 def SizerItemSizer(*args, **kwargs):
9169 """
9170 SizerItemSizer(Sizer sizer, int proportion, int flag, int border,
9171 PyObject userData=None) -> SizerItem
9172
9173 Constructs a `wx.SizerItem` for tracking a subsizer
9174 """
9175 val = _core_.new_SizerItemSizer(*args, **kwargs)
9176 val.thisown = 1
9177 return val
9178
9179 class Sizer(Object):
9180 """
9181 wx.Sizer is the abstract base class used for laying out subwindows in
9182 a window. You cannot use wx.Sizer directly; instead, you will have to
9183 use one of the sizer classes derived from it such as `wx.BoxSizer`,
9184 `wx.StaticBoxSizer`, `wx.NotebookSizer`, `wx.GridSizer`, `wx.FlexGridSizer`
9185 and `wx.GridBagSizer`.
9186
9187 The concept implemented by sizers in wxWidgets is closely related to
9188 layout tools in other GUI toolkits, such as Java's AWT, the GTK
9189 toolkit or the Qt toolkit. It is based upon the idea of the individual
9190 subwindows reporting their minimal required size and their ability to
9191 get stretched if the size of the parent window has changed. This will
9192 most often mean that the programmer does not set the original size of
9193 a dialog in the beginning, rather the dialog will assigned a sizer and
9194 this sizer will be queried about the recommended size. The sizer in
9195 turn will query its children, which can be normal windows or contorls,
9196 empty space or other sizers, so that a hierarchy of sizers can be
9197 constructed. Note that wxSizer does not derive from wxWindow and thus
9198 do not interfere with tab ordering and requires very little resources
9199 compared to a real window on screen.
9200
9201 What makes sizers so well fitted for use in wxWidgets is the fact that
9202 every control reports its own minimal size and the algorithm can
9203 handle differences in font sizes or different window (dialog item)
9204 sizes on different platforms without problems. If for example the
9205 standard font as well as the overall design of Mac widgets requires
9206 more space than on Windows, then the initial size of a dialog using a
9207 sizer will automatically be bigger on Mac than on Windows.
9208 """
9209 def __init__(self): raise RuntimeError, "No constructor defined"
9210 def __repr__(self):
9211 return "<%s.%s; proxy of C++ wxSizer instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
9212 def _setOORInfo(*args, **kwargs):
9213 """_setOORInfo(self, PyObject _self)"""
9214 return _core_.Sizer__setOORInfo(*args, **kwargs)
9215
9216 def Add(*args, **kwargs):
9217 """
9218 Add(self, item, int proportion=0, int flag=0, int border=0,
9219 PyObject userData=None) -> wx.SizerItem
9220
9221 Appends a child item to the sizer.
9222 """
9223 return _core_.Sizer_Add(*args, **kwargs)
9224
9225 def Insert(*args, **kwargs):
9226 """
9227 Insert(self, int before, item, int proportion=0, int flag=0, int border=0,
9228 PyObject userData=None) -> wx.SizerItem
9229
9230 Inserts a new item into the list of items managed by this sizer before
9231 the item at index *before*. See `Add` for a description of the parameters.
9232 """
9233 return _core_.Sizer_Insert(*args, **kwargs)
9234
9235 def Prepend(*args, **kwargs):
9236 """
9237 Prepend(self, item, int proportion=0, int flag=0, int border=0,
9238 PyObject userData=None) -> wx.SizerItem
9239
9240 Adds a new item to the begining of the list of sizer items managed by
9241 this sizer. See `Add` for a description of the parameters.
9242 """
9243 return _core_.Sizer_Prepend(*args, **kwargs)
9244
9245 def Remove(*args, **kwargs):
9246 """
9247 Remove(self, item) -> bool
9248
9249 Removes an item from the sizer and destroys it. This method does not
9250 cause any layout or resizing to take place, call `Layout` to update
9251 the layout on screen after removing a child from the sizer. The
9252 *item* parameter can be either a window, a sizer, or the zero-based
9253 index of an item to remove. Returns True if the child item was found
9254 and removed.
9255 """
9256 return _core_.Sizer_Remove(*args, **kwargs)
9257
9258 def Detach(*args, **kwargs):
9259 """
9260 Detach(self, item) -> bool
9261
9262 Detaches an item from the sizer without destroying it. This method
9263 does not cause any layout or resizing to take place, call `Layout` to
9264 do so. The *item* parameter can be either a window, a sizer, or the
9265 zero-based index of the item to be detached. Returns True if the child item
9266 was found and detached.
9267 """
9268 return _core_.Sizer_Detach(*args, **kwargs)
9269
9270 def GetItem(*args, **kwargs):
9271 """
9272 GetItem(self, item) -> wx.SizerItem
9273
9274 Returns the `wx.SizerItem` which holds the *item* given. The *item*
9275 parameter can be either a window, a sizer, or the zero-based index of
9276 the item to be detached.
9277 """
9278 return _core_.Sizer_GetItem(*args, **kwargs)
9279
9280 def _SetItemMinSize(*args, **kwargs):
9281 """_SetItemMinSize(self, PyObject item, Size size)"""
9282 return _core_.Sizer__SetItemMinSize(*args, **kwargs)
9283
9284 def SetItemMinSize(self, item, *args):
9285 """
9286 SetItemMinSize(self, item, Size size)
9287
9288 Sets the minimum size that will be allocated for an item in the sizer.
9289 The *item* parameter can be either a window, a sizer, or the
9290 zero-based index of the item. If a window or sizer is given then it
9291 will be searched for recursivly in subsizers if neccessary.
9292 """
9293 if len(args) == 2:
9294 # for backward compatibility accept separate width,height args too
9295 return self._SetItemMinSize(item, args)
9296 else:
9297 return self._SetItemMinSize(item, args[0])
9298
9299 def AddItem(*args, **kwargs):
9300 """
9301 AddItem(self, SizerItem item)
9302
9303 Adds a `wx.SizerItem` to the sizer.
9304 """
9305 return _core_.Sizer_AddItem(*args, **kwargs)
9306
9307 def InsertItem(*args, **kwargs):
9308 """
9309 InsertItem(self, int index, SizerItem item)
9310
9311 Inserts a `wx.SizerItem` to the sizer at the position given by *index*.
9312 """
9313 return _core_.Sizer_InsertItem(*args, **kwargs)
9314
9315 def PrependItem(*args, **kwargs):
9316 """
9317 PrependItem(self, SizerItem item)
9318
9319 Prepends a `wx.SizerItem` to the sizer.
9320 """
9321 return _core_.Sizer_PrependItem(*args, **kwargs)
9322
9323 def AddMany(self, items):
9324 """
9325 AddMany is a convenience method for adding several items
9326 to a sizer at one time. Simply pass it a list of tuples,
9327 where each tuple consists of the parameters that you
9328 would normally pass to the `Add` method.
9329 """
9330 for item in items:
9331 if type(item) != type(()) or (len(item) == 2 and type(item[0]) == type(1)):
9332 item = (item, )
9333 self.Add(*item)
9334
9335 # for backwards compatibility only, please do not use in new code
9336 AddWindow = wx._deprecated(Add, "AddWindow is deprecated, use `Add` instead.")
9337 AddSizer = wx._deprecated(Add, "AddSizer is deprecated, use `Add` instead.")
9338 AddSpacer = wx._deprecated(Add, "AddSpacer is deprecated, use `Add` instead.")
9339 PrependWindow = wx._deprecated(Prepend, "PrependWindow is deprecated, use `Prepend` instead.")
9340 PrependSizer = wx._deprecated(Prepend, "PrependSizer is deprecated, use `Prepend` instead.")
9341 PrependSpacer = wx._deprecated(Prepend, "PrependSpacer is deprecated, use `Prepend` instead.")
9342 InsertWindow = wx._deprecated(Insert, "InsertWindow is deprecated, use `Insert` instead.")
9343 InsertSizer = wx._deprecated(Insert, "InsertSizer is deprecated, use `Insert` instead.")
9344 InsertSpacer = wx._deprecated(Insert, "InsertSpacer is deprecated, use `Insert` instead.")
9345 RemoveWindow = wx._deprecated(Remove, "RemoveWindow is deprecated, use `Remove` instead.")
9346 RemoveSizer = wx._deprecated(Remove, "RemoveSizer is deprecated, use `Remove` instead.")
9347 RemovePos = wx._deprecated(Remove, "RemovePos is deprecated, use `Remove` instead.")
9348
9349
9350 def SetDimension(*args, **kwargs):
9351 """
9352 SetDimension(self, int x, int y, int width, int height)
9353
9354 Call this to force the sizer to take the given dimension and thus
9355 force the items owned by the sizer to resize themselves according to
9356 the rules defined by the parameter in the `Add`, `Insert` or `Prepend`
9357 methods.
9358 """
9359 return _core_.Sizer_SetDimension(*args, **kwargs)
9360
9361 def SetMinSize(*args, **kwargs):
9362 """
9363 SetMinSize(self, Size size)
9364
9365 Call this to give the sizer a minimal size. Normally, the sizer will
9366 calculate its minimal size based purely on how much space its children
9367 need. After calling this method `GetMinSize` will return either the
9368 minimal size as requested by its children or the minimal size set
9369 here, depending on which is bigger.
9370 """
9371 return _core_.Sizer_SetMinSize(*args, **kwargs)
9372
9373 def GetSize(*args, **kwargs):
9374 """
9375 GetSize(self) -> Size
9376
9377 Returns the current size of the space managed by the sizer.
9378 """
9379 return _core_.Sizer_GetSize(*args, **kwargs)
9380
9381 def GetPosition(*args, **kwargs):
9382 """
9383 GetPosition(self) -> Point
9384
9385 Returns the current position of the sizer's managed space.
9386 """
9387 return _core_.Sizer_GetPosition(*args, **kwargs)
9388
9389 def GetMinSize(*args, **kwargs):
9390 """
9391 GetMinSize(self) -> Size
9392
9393 Returns the minimal size of the sizer. This is either the combined
9394 minimal size of all the children and their borders or the minimal size
9395 set by SetMinSize, depending on which is bigger.
9396 """
9397 return _core_.Sizer_GetMinSize(*args, **kwargs)
9398
9399 def GetSizeTuple(self):
9400 return self.GetSize().Get()
9401 def GetPositionTuple(self):
9402 return self.GetPosition().Get()
9403 def GetMinSizeTuple(self):
9404 return self.GetMinSize().Get()
9405
9406 def RecalcSizes(*args, **kwargs):
9407 """
9408 RecalcSizes(self)
9409
9410 Using the sizes calculated by `CalcMin` reposition and resize all the
9411 items managed by this sizer. You should not need to call this directly as
9412 it is called by `Layout`.
9413 """
9414 return _core_.Sizer_RecalcSizes(*args, **kwargs)
9415
9416 def CalcMin(*args, **kwargs):
9417 """
9418 CalcMin(self) -> Size
9419
9420 This method is where the sizer will do the actual calculation of its
9421 children's minimal sizes. You should not need to call this directly as
9422 it is called by `Layout`.
9423 """
9424 return _core_.Sizer_CalcMin(*args, **kwargs)
9425
9426 def Layout(*args, **kwargs):
9427 """
9428 Layout(self)
9429
9430 This method will force the recalculation and layout of the items
9431 controlled by the sizer using the current space allocated to the
9432 sizer. Normally this is called automatically from the owning window's
9433 EVT_SIZE handler, but it is also useful to call it from user code when
9434 one of the items in a sizer change size, or items are added or
9435 removed.
9436 """
9437 return _core_.Sizer_Layout(*args, **kwargs)
9438
9439 def Fit(*args, **kwargs):
9440 """
9441 Fit(self, Window window) -> Size
9442
9443 Tell the sizer to resize the *window* to match the sizer's minimal
9444 size. This is commonly done in the constructor of the window itself in
9445 order to set its initial size to match the needs of the children as
9446 determined by the sizer. Returns the new size.
9447
9448 For a top level window this is the total window size, not the client size.
9449 """
9450 return _core_.Sizer_Fit(*args, **kwargs)
9451
9452 def FitInside(*args, **kwargs):
9453 """
9454 FitInside(self, Window window)
9455
9456 Tell the sizer to resize the *virtual size* of the *window* to match the
9457 sizer's minimal size. This will not alter the on screen size of the
9458 window, but may cause the addition/removal/alteration of scrollbars
9459 required to view the virtual area in windows which manage it.
9460
9461 :see: `wx.ScrolledWindow.SetScrollbars`, `SetVirtualSizeHints`
9462
9463 """
9464 return _core_.Sizer_FitInside(*args, **kwargs)
9465
9466 def SetSizeHints(*args, **kwargs):
9467 """
9468 SetSizeHints(self, Window window)
9469
9470 Tell the sizer to set (and `Fit`) the minimal size of the *window* to
9471 match the sizer's minimal size. This is commonly done in the
9472 constructor of the window itself if the window is resizable (as are
9473 many dialogs under Unix and frames on probably all platforms) in order
9474 to prevent the window from being sized smaller than the minimal size
9475 required by the sizer.
9476 """
9477 return _core_.Sizer_SetSizeHints(*args, **kwargs)
9478
9479 def SetVirtualSizeHints(*args, **kwargs):
9480 """
9481 SetVirtualSizeHints(self, Window window)
9482
9483 Tell the sizer to set the minimal size of the window virtual area to
9484 match the sizer's minimal size. For windows with managed scrollbars
9485 this will set them appropriately.
9486
9487 :see: `wx.ScrolledWindow.SetScrollbars`
9488
9489 """
9490 return _core_.Sizer_SetVirtualSizeHints(*args, **kwargs)
9491
9492 def Clear(*args, **kwargs):
9493 """
9494 Clear(self, bool deleteWindows=False)
9495
9496 Clear all items from the sizer, optionally destroying the window items
9497 as well.
9498 """
9499 return _core_.Sizer_Clear(*args, **kwargs)
9500
9501 def DeleteWindows(*args, **kwargs):
9502 """
9503 DeleteWindows(self)
9504
9505 Destroy all windows managed by the sizer.
9506 """
9507 return _core_.Sizer_DeleteWindows(*args, **kwargs)
9508
9509 def GetChildren(*args, **kwargs):
9510 """
9511 GetChildren(sefl) -> list
9512
9513 Returns a list of all the `wx.SizerItem` objects managed by the sizer.
9514 """
9515 return _core_.Sizer_GetChildren(*args, **kwargs)
9516
9517 def Show(*args, **kwargs):
9518 """
9519 Show(self, item, bool show=True, bool recursive=false) -> bool
9520
9521 Shows or hides an item managed by the sizer. To make a sizer item
9522 disappear or reappear, use Show followed by `Layout`. The *item*
9523 parameter can be either a window, a sizer, or the zero-based index of
9524 the item. Use the recursive parameter to show or hide an item in a
9525 subsizer. Returns True if the item was found.
9526 """
9527 return _core_.Sizer_Show(*args, **kwargs)
9528
9529 def IsShown(*args, **kwargs):
9530 """
9531 IsShown(self, item)
9532
9533 Determines if the item is currently shown. sizer. To make a sizer
9534 item disappear or reappear, use Show followed by `Layout`. The *item*
9535 parameter can be either a window, a sizer, or the zero-based index of
9536 the item.
9537 """
9538 return _core_.Sizer_IsShown(*args, **kwargs)
9539
9540 def Hide(self, item, recursive=False):
9541 """
9542 A convenience method for Show(item, False, recursive).
9543 """
9544 return self.Show(item, False, recursive)
9545
9546 def ShowItems(*args, **kwargs):
9547 """
9548 ShowItems(self, bool show)
9549
9550 Recursively call `wx.SizerItem.Show` on all sizer items.
9551 """
9552 return _core_.Sizer_ShowItems(*args, **kwargs)
9553
9554
9555 class SizerPtr(Sizer):
9556 def __init__(self, this):
9557 self.this = this
9558 if not hasattr(self,"thisown"): self.thisown = 0
9559 self.__class__ = Sizer
9560 _core_.Sizer_swigregister(SizerPtr)
9561
9562 class PySizer(Sizer):
9563 """
9564 wx.PySizer is a special version of `wx.Sizer` that has been
9565 instrumented to allow the C++ virtual methods to be overloaded in
9566 Python derived classes. You would derive from this class if you are
9567 wanting to implement a custom sizer in Python code. Simply implement
9568 `CalcMin` and `RecalcSizes` in the derived class and you're all set.
9569 For example::
9570
9571 class MySizer(wx.PySizer):
9572 def __init__(self):
9573 wx.PySizer.__init__(self)
9574
9575 def CalcMin(self):
9576 for item in self.GetChildren():
9577 # calculate the total minimum width and height needed
9578 # by all items in the sizer according to this sizer's
9579 # layout algorithm.
9580 ...
9581 return wx.Size(width, height)
9582
9583 def RecalcSizes(self):
9584 # find the space allotted to this sizer
9585 pos = self.GetPosition()
9586 size = self.GetSize()
9587 for item in self.GetChildren():
9588 # Recalculate (if necessary) the position and size of
9589 # each item and then call item.SetDimension to do the
9590 # actual positioning and sizing of the items within the
9591 # space alloted to this sizer.
9592 ...
9593 item.SetDimension(itemPos, itemSize)
9594
9595
9596 When `Layout` is called it first calls `CalcMin` followed by
9597 `RecalcSizes` so you can optimize a bit by saving the results of
9598 `CalcMin` and resuing them in `RecalcSizes`.
9599
9600 :see: `wx.SizerItem`, `wx.Sizer.GetChildren`
9601
9602
9603 """
9604 def __repr__(self):
9605 return "<%s.%s; proxy of C++ wxPySizer instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
9606 def __init__(self, *args, **kwargs):
9607 """
9608 __init__(self) -> PySizer
9609
9610 Creates a wx.PySizer. Must be called from the __init__ in the derived
9611 class.
9612 """
9613 newobj = _core_.new_PySizer(*args, **kwargs)
9614 self.this = newobj.this
9615 self.thisown = 1
9616 del newobj.thisown
9617 self._setCallbackInfo(self, PySizer);self._setOORInfo(self)
9618
9619 def _setCallbackInfo(*args, **kwargs):
9620 """_setCallbackInfo(self, PyObject self, PyObject _class)"""
9621 return _core_.PySizer__setCallbackInfo(*args, **kwargs)
9622
9623
9624 class PySizerPtr(PySizer):
9625 def __init__(self, this):
9626 self.this = this
9627 if not hasattr(self,"thisown"): self.thisown = 0
9628 self.__class__ = PySizer
9629 _core_.PySizer_swigregister(PySizerPtr)
9630
9631 #---------------------------------------------------------------------------
9632
9633 class BoxSizer(Sizer):
9634 """
9635 The basic idea behind a box sizer is that windows will most often be
9636 laid out in rather simple basic geometry, typically in a row or a
9637 column or nested hierarchies of either. A wx.BoxSizer will lay out
9638 its items in a simple row or column, depending on the orientation
9639 parameter passed to the constructor.
9640 """
9641 def __repr__(self):
9642 return "<%s.%s; proxy of C++ wxBoxSizer instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
9643 def __init__(self, *args, **kwargs):
9644 """
9645 __init__(self, int orient=HORIZONTAL) -> BoxSizer
9646
9647 Constructor for a wx.BoxSizer. *orient* may be one of ``wx.VERTICAL``
9648 or ``wx.HORIZONTAL`` for creating either a column sizer or a row
9649 sizer.
9650 """
9651 newobj = _core_.new_BoxSizer(*args, **kwargs)
9652 self.this = newobj.this
9653 self.thisown = 1
9654 del newobj.thisown
9655 self._setOORInfo(self)
9656
9657 def GetOrientation(*args, **kwargs):
9658 """
9659 GetOrientation(self) -> int
9660
9661 Returns the current orientation of the sizer.
9662 """
9663 return _core_.BoxSizer_GetOrientation(*args, **kwargs)
9664
9665 def SetOrientation(*args, **kwargs):
9666 """
9667 SetOrientation(self, int orient)
9668
9669 Resets the orientation of the sizer.
9670 """
9671 return _core_.BoxSizer_SetOrientation(*args, **kwargs)
9672
9673
9674 class BoxSizerPtr(BoxSizer):
9675 def __init__(self, this):
9676 self.this = this
9677 if not hasattr(self,"thisown"): self.thisown = 0
9678 self.__class__ = BoxSizer
9679 _core_.BoxSizer_swigregister(BoxSizerPtr)
9680
9681 #---------------------------------------------------------------------------
9682
9683 class StaticBoxSizer(BoxSizer):
9684 """
9685 wx.StaticBoxSizer derives from and functions identically to the
9686 `wx.BoxSizer` and adds a `wx.StaticBox` around the items that the sizer
9687 manages. Note that this static box must be created separately and
9688 passed to the sizer constructor.
9689 """
9690 def __repr__(self):
9691 return "<%s.%s; proxy of C++ wxStaticBoxSizer instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
9692 def __init__(self, *args, **kwargs):
9693 """
9694 __init__(self, StaticBox box, int orient=HORIZONTAL) -> StaticBoxSizer
9695
9696 Constructor. It takes an associated static box and the orientation
9697 *orient* as parameters - orient can be either of ``wx.VERTICAL`` or
9698 ``wx.HORIZONTAL``.
9699 """
9700 newobj = _core_.new_StaticBoxSizer(*args, **kwargs)
9701 self.this = newobj.this
9702 self.thisown = 1
9703 del newobj.thisown
9704 self._setOORInfo(self)
9705
9706 def GetStaticBox(*args, **kwargs):
9707 """
9708 GetStaticBox(self) -> StaticBox
9709
9710 Returns the static box associated with this sizer.
9711 """
9712 return _core_.StaticBoxSizer_GetStaticBox(*args, **kwargs)
9713
9714
9715 class StaticBoxSizerPtr(StaticBoxSizer):
9716 def __init__(self, this):
9717 self.this = this
9718 if not hasattr(self,"thisown"): self.thisown = 0
9719 self.__class__ = StaticBoxSizer
9720 _core_.StaticBoxSizer_swigregister(StaticBoxSizerPtr)
9721
9722 #---------------------------------------------------------------------------
9723
9724 class GridSizer(Sizer):
9725 """
9726 A grid sizer is a sizer which lays out its children in a
9727 two-dimensional table with all cells having the same size. In other
9728 words, the width of each cell within the grid is the width of the
9729 widest item added to the sizer and the height of each grid cell is the
9730 height of the tallest item. An optional vertical and/or horizontal
9731 gap between items can also be specified (in pixels.)
9732
9733 Items are placed in the cells of the grid in the order they are added,
9734 in row-major order. In other words, the first row is filled first,
9735 then the second, and so on until all items have been added. (If
9736 neccessary, additional rows will be added as items are added.) If you
9737 need to have greater control over the cells that items are placed in
9738 then use the `wx.GridBagSizer`.
9739
9740 """
9741 def __repr__(self):
9742 return "<%s.%s; proxy of C++ wxGridSizer instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
9743 def __init__(self, *args, **kwargs):
9744 """
9745 __init__(self, int rows=1, int cols=0, int vgap=0, int hgap=0) -> GridSizer
9746
9747 Constructor for a wx.GridSizer. *rows* and *cols* determine the number
9748 of columns and rows in the sizer - if either of the parameters is
9749 zero, it will be calculated to from the total number of children in
9750 the sizer, thus making the sizer grow dynamically. *vgap* and *hgap*
9751 define extra space between all children.
9752 """
9753 newobj = _core_.new_GridSizer(*args, **kwargs)
9754 self.this = newobj.this
9755 self.thisown = 1
9756 del newobj.thisown
9757 self._setOORInfo(self)
9758
9759 def SetCols(*args, **kwargs):
9760 """
9761 SetCols(self, int cols)
9762
9763 Sets the number of columns in the sizer.
9764 """
9765 return _core_.GridSizer_SetCols(*args, **kwargs)
9766
9767 def SetRows(*args, **kwargs):
9768 """
9769 SetRows(self, int rows)
9770
9771 Sets the number of rows in the sizer.
9772 """
9773 return _core_.GridSizer_SetRows(*args, **kwargs)
9774
9775 def SetVGap(*args, **kwargs):
9776 """
9777 SetVGap(self, int gap)
9778
9779 Sets the vertical gap (in pixels) between the cells in the sizer.
9780 """
9781 return _core_.GridSizer_SetVGap(*args, **kwargs)
9782
9783 def SetHGap(*args, **kwargs):
9784 """
9785 SetHGap(self, int gap)
9786
9787 Sets the horizontal gap (in pixels) between cells in the sizer
9788 """
9789 return _core_.GridSizer_SetHGap(*args, **kwargs)
9790
9791 def GetCols(*args, **kwargs):
9792 """
9793 GetCols(self) -> int
9794
9795 Returns the number of columns in the sizer.
9796 """
9797 return _core_.GridSizer_GetCols(*args, **kwargs)
9798
9799 def GetRows(*args, **kwargs):
9800 """
9801 GetRows(self) -> int
9802
9803 Returns the number of rows in the sizer.
9804 """
9805 return _core_.GridSizer_GetRows(*args, **kwargs)
9806
9807 def GetVGap(*args, **kwargs):
9808 """
9809 GetVGap(self) -> int
9810
9811 Returns the vertical gap (in pixels) between the cells in the sizer.
9812 """
9813 return _core_.GridSizer_GetVGap(*args, **kwargs)
9814
9815 def GetHGap(*args, **kwargs):
9816 """
9817 GetHGap(self) -> int
9818
9819 Returns the horizontal gap (in pixels) between cells in the sizer.
9820 """
9821 return _core_.GridSizer_GetHGap(*args, **kwargs)
9822
9823
9824 class GridSizerPtr(GridSizer):
9825 def __init__(self, this):
9826 self.this = this
9827 if not hasattr(self,"thisown"): self.thisown = 0
9828 self.__class__ = GridSizer
9829 _core_.GridSizer_swigregister(GridSizerPtr)
9830
9831 #---------------------------------------------------------------------------
9832
9833 FLEX_GROWMODE_NONE = _core_.FLEX_GROWMODE_NONE
9834 FLEX_GROWMODE_SPECIFIED = _core_.FLEX_GROWMODE_SPECIFIED
9835 FLEX_GROWMODE_ALL = _core_.FLEX_GROWMODE_ALL
9836 class FlexGridSizer(GridSizer):
9837 """
9838 A flex grid sizer is a sizer which lays out its children in a
9839 two-dimensional table with all table cells in one row having the same
9840 height and all cells in one column having the same width, but all
9841 rows or all columns are not necessarily the same height or width as in
9842 the `wx.GridSizer`.
9843
9844 wx.FlexGridSizer can also size items equally in one direction but
9845 unequally ("flexibly") in the other. If the sizer is only flexible
9846 in one direction (this can be changed using `SetFlexibleDirection`), it
9847 needs to be decided how the sizer should grow in the other ("non
9848 flexible") direction in order to fill the available space. The
9849 `SetNonFlexibleGrowMode` method serves this purpose.
9850
9851
9852 """
9853 def __repr__(self):
9854 return "<%s.%s; proxy of C++ wxFlexGridSizer instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
9855 def __init__(self, *args, **kwargs):
9856 """
9857 __init__(self, int rows=1, int cols=0, int vgap=0, int hgap=0) -> FlexGridSizer
9858
9859 Constructor for a wx.FlexGridSizer. *rows* and *cols* determine the
9860 number of columns and rows in the sizer - if either of the parameters
9861 is zero, it will be calculated to from the total number of children in
9862 the sizer, thus making the sizer grow dynamically. *vgap* and *hgap*
9863 define extra space between all children.
9864 """
9865 newobj = _core_.new_FlexGridSizer(*args, **kwargs)
9866 self.this = newobj.this
9867 self.thisown = 1
9868 del newobj.thisown
9869 self._setOORInfo(self)
9870
9871 def AddGrowableRow(*args, **kwargs):
9872 """
9873 AddGrowableRow(self, size_t idx, int proportion=0)
9874
9875 Specifies that row *idx* (starting from zero) should be grown if there
9876 is extra space available to the sizer.
9877
9878 The *proportion* parameter has the same meaning as the stretch factor
9879 for the box sizers except that if all proportions are 0, then all
9880 columns are resized equally (instead of not being resized at all).
9881 """
9882 return _core_.FlexGridSizer_AddGrowableRow(*args, **kwargs)
9883
9884 def RemoveGrowableRow(*args, **kwargs):
9885 """
9886 RemoveGrowableRow(self, size_t idx)
9887
9888 Specifies that row *idx* is no longer growable.
9889 """
9890 return _core_.FlexGridSizer_RemoveGrowableRow(*args, **kwargs)
9891
9892 def AddGrowableCol(*args, **kwargs):
9893 """
9894 AddGrowableCol(self, size_t idx, int proportion=0)
9895
9896 Specifies that column *idx* (starting from zero) should be grown if
9897 there is extra space available to the sizer.
9898
9899 The *proportion* parameter has the same meaning as the stretch factor
9900 for the box sizers except that if all proportions are 0, then all
9901 columns are resized equally (instead of not being resized at all).
9902 """
9903 return _core_.FlexGridSizer_AddGrowableCol(*args, **kwargs)
9904
9905 def RemoveGrowableCol(*args, **kwargs):
9906 """
9907 RemoveGrowableCol(self, size_t idx)
9908
9909 Specifies that column *idx* is no longer growable.
9910 """
9911 return _core_.FlexGridSizer_RemoveGrowableCol(*args, **kwargs)
9912
9913 def SetFlexibleDirection(*args, **kwargs):
9914 """
9915 SetFlexibleDirection(self, int direction)
9916
9917 Specifies whether the sizer should flexibly resize its columns, rows,
9918 or both. Argument *direction* can be one of the following values. Any
9919 other value is ignored.
9920
9921 ============== =======================================
9922 wx.VERTICAL Rows are flexibly sized.
9923 wx.HORIZONTAL Columns are flexibly sized.
9924 wx.BOTH Both rows and columns are flexibly sized
9925 (this is the default value).
9926 ============== =======================================
9927
9928 Note that this method does not trigger relayout.
9929
9930 """
9931 return _core_.FlexGridSizer_SetFlexibleDirection(*args, **kwargs)
9932
9933 def GetFlexibleDirection(*args, **kwargs):
9934 """
9935 GetFlexibleDirection(self) -> int
9936
9937 Returns a value that specifies whether the sizer
9938 flexibly resizes its columns, rows, or both (default).
9939
9940 :see: `SetFlexibleDirection`
9941 """
9942 return _core_.FlexGridSizer_GetFlexibleDirection(*args, **kwargs)
9943
9944 def SetNonFlexibleGrowMode(*args, **kwargs):
9945 """
9946 SetNonFlexibleGrowMode(self, int mode)
9947
9948 Specifies how the sizer should grow in the non-flexible direction if
9949 there is one (so `SetFlexibleDirection` must have been called
9950 previously). Argument *mode* can be one of the following values:
9951
9952 ========================== =================================================
9953 wx.FLEX_GROWMODE_NONE Sizer doesn't grow in the non flexible direction.
9954 wx.FLEX_GROWMODE_SPECIFIED Sizer honors growable columns/rows set with
9955 `AddGrowableCol` and `AddGrowableRow`. In this
9956 case equal sizing applies to minimum sizes of
9957 columns or rows (this is the default value).
9958 wx.FLEX_GROWMODE_ALL Sizer equally stretches all columns or rows in
9959 the non flexible direction, whether they are
9960 growable or not in the flexbile direction.
9961 ========================== =================================================
9962
9963 Note that this method does not trigger relayout.
9964
9965
9966 """
9967 return _core_.FlexGridSizer_SetNonFlexibleGrowMode(*args, **kwargs)
9968
9969 def GetNonFlexibleGrowMode(*args, **kwargs):
9970 """
9971 GetNonFlexibleGrowMode(self) -> int
9972
9973 Returns the value that specifies how the sizer grows in the
9974 non-flexible direction if there is one.
9975
9976 :see: `SetNonFlexibleGrowMode`
9977 """
9978 return _core_.FlexGridSizer_GetNonFlexibleGrowMode(*args, **kwargs)
9979
9980 def GetRowHeights(*args, **kwargs):
9981 """
9982 GetRowHeights(self) -> list
9983
9984 Returns a list of integers representing the heights of each of the
9985 rows in the sizer.
9986 """
9987 return _core_.FlexGridSizer_GetRowHeights(*args, **kwargs)
9988
9989 def GetColWidths(*args, **kwargs):
9990 """
9991 GetColWidths(self) -> list
9992
9993 Returns a list of integers representing the widths of each of the
9994 columns in the sizer.
9995 """
9996 return _core_.FlexGridSizer_GetColWidths(*args, **kwargs)
9997
9998
9999 class FlexGridSizerPtr(FlexGridSizer):
10000 def __init__(self, this):
10001 self.this = this
10002 if not hasattr(self,"thisown"): self.thisown = 0
10003 self.__class__ = FlexGridSizer
10004 _core_.FlexGridSizer_swigregister(FlexGridSizerPtr)
10005
10006 #---------------------------------------------------------------------------
10007
10008 class GBPosition(object):
10009 """
10010 This class represents the position of an item in a virtual grid of
10011 rows and columns managed by a `wx.GridBagSizer`. wxPython has
10012 typemaps that will automatically convert from a 2-element sequence of
10013 integers to a wx.GBPosition, so you can use the more pythonic
10014 representation of the position nearly transparently in Python code.
10015 """
10016 def __repr__(self):
10017 return "<%s.%s; proxy of C++ wxGBPosition instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
10018 def __init__(self, *args, **kwargs):
10019 """
10020 __init__(self, int row=0, int col=0) -> GBPosition
10021
10022 This class represents the position of an item in a virtual grid of
10023 rows and columns managed by a `wx.GridBagSizer`. wxPython has
10024 typemaps that will automatically convert from a 2-element sequence of
10025 integers to a wx.GBPosition, so you can use the more pythonic
10026 representation of the position nearly transparently in Python code.
10027 """
10028 newobj = _core_.new_GBPosition(*args, **kwargs)
10029 self.this = newobj.this
10030 self.thisown = 1
10031 del newobj.thisown
10032 def GetRow(*args, **kwargs):
10033 """GetRow(self) -> int"""
10034 return _core_.GBPosition_GetRow(*args, **kwargs)
10035
10036 def GetCol(*args, **kwargs):
10037 """GetCol(self) -> int"""
10038 return _core_.GBPosition_GetCol(*args, **kwargs)
10039
10040 def SetRow(*args, **kwargs):
10041 """SetRow(self, int row)"""
10042 return _core_.GBPosition_SetRow(*args, **kwargs)
10043
10044 def SetCol(*args, **kwargs):
10045 """SetCol(self, int col)"""
10046 return _core_.GBPosition_SetCol(*args, **kwargs)
10047
10048 def __eq__(*args, **kwargs):
10049 """__eq__(self, GBPosition other) -> bool"""
10050 return _core_.GBPosition___eq__(*args, **kwargs)
10051
10052 def __ne__(*args, **kwargs):
10053 """__ne__(self, GBPosition other) -> bool"""
10054 return _core_.GBPosition___ne__(*args, **kwargs)
10055
10056 def Set(*args, **kwargs):
10057 """Set(self, int row=0, int col=0)"""
10058 return _core_.GBPosition_Set(*args, **kwargs)
10059
10060 def Get(*args, **kwargs):
10061 """Get(self) -> PyObject"""
10062 return _core_.GBPosition_Get(*args, **kwargs)
10063
10064 asTuple = wx._deprecated(Get, "asTuple is deprecated, use `Get` instead")
10065 def __str__(self): return str(self.Get())
10066 def __repr__(self): return 'wx.GBPosition'+str(self.Get())
10067 def __len__(self): return len(self.Get())
10068 def __getitem__(self, index): return self.Get()[index]
10069 def __setitem__(self, index, val):
10070 if index == 0: self.SetRow(val)
10071 elif index == 1: self.SetCol(val)
10072 else: raise IndexError
10073 def __nonzero__(self): return self.Get() != (0,0)
10074 __safe_for_unpickling__ = True
10075 def __reduce__(self): return (wx.GBPosition, self.Get())
10076
10077 row = property(GetRow, SetRow)
10078 col = property(GetCol, SetCol)
10079
10080
10081 class GBPositionPtr(GBPosition):
10082 def __init__(self, this):
10083 self.this = this
10084 if not hasattr(self,"thisown"): self.thisown = 0
10085 self.__class__ = GBPosition
10086 _core_.GBPosition_swigregister(GBPositionPtr)
10087
10088 class GBSpan(object):
10089 """
10090 This class is used to hold the row and column spanning attributes of
10091 items in a `wx.GridBagSizer`. wxPython has typemaps that will
10092 automatically convert from a 2-element sequence of integers to a
10093 wx.GBSpan, so you can use the more pythonic representation of the span
10094 nearly transparently in Python code.
10095
10096 """
10097 def __repr__(self):
10098 return "<%s.%s; proxy of C++ wxGBSpan instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
10099 def __init__(self, *args, **kwargs):
10100 """
10101 __init__(self, int rowspan=1, int colspan=1) -> GBSpan
10102
10103 Construct a new wxGBSpan, optionally setting the rowspan and
10104 colspan. The default is (1,1). (Meaning that the item occupies one
10105 cell in each direction.
10106 """
10107 newobj = _core_.new_GBSpan(*args, **kwargs)
10108 self.this = newobj.this
10109 self.thisown = 1
10110 del newobj.thisown
10111 def GetRowspan(*args, **kwargs):
10112 """GetRowspan(self) -> int"""
10113 return _core_.GBSpan_GetRowspan(*args, **kwargs)
10114
10115 def GetColspan(*args, **kwargs):
10116 """GetColspan(self) -> int"""
10117 return _core_.GBSpan_GetColspan(*args, **kwargs)
10118
10119 def SetRowspan(*args, **kwargs):
10120 """SetRowspan(self, int rowspan)"""
10121 return _core_.GBSpan_SetRowspan(*args, **kwargs)
10122
10123 def SetColspan(*args, **kwargs):
10124 """SetColspan(self, int colspan)"""
10125 return _core_.GBSpan_SetColspan(*args, **kwargs)
10126
10127 def __eq__(*args, **kwargs):
10128 """__eq__(self, GBSpan other) -> bool"""
10129 return _core_.GBSpan___eq__(*args, **kwargs)
10130
10131 def __ne__(*args, **kwargs):
10132 """__ne__(self, GBSpan other) -> bool"""
10133 return _core_.GBSpan___ne__(*args, **kwargs)
10134
10135 def Set(*args, **kwargs):
10136 """Set(self, int rowspan=1, int colspan=1)"""
10137 return _core_.GBSpan_Set(*args, **kwargs)
10138
10139 def Get(*args, **kwargs):
10140 """Get(self) -> PyObject"""
10141 return _core_.GBSpan_Get(*args, **kwargs)
10142
10143 asTuple = wx._deprecated(Get, "asTuple is deprecated, use `Get` instead")
10144 def __str__(self): return str(self.Get())
10145 def __repr__(self): return 'wx.GBSpan'+str(self.Get())
10146 def __len__(self): return len(self.Get())
10147 def __getitem__(self, index): return self.Get()[index]
10148 def __setitem__(self, index, val):
10149 if index == 0: self.SetRowspan(val)
10150 elif index == 1: self.SetColspan(val)
10151 else: raise IndexError
10152 def __nonzero__(self): return self.Get() != (0,0)
10153 __safe_for_unpickling__ = True
10154 def __reduce__(self): return (wx.GBSpan, self.Get())
10155
10156 rowspan = property(GetRowspan, SetRowspan)
10157 colspan = property(GetColspan, SetColspan)
10158
10159
10160 class GBSpanPtr(GBSpan):
10161 def __init__(self, this):
10162 self.this = this
10163 if not hasattr(self,"thisown"): self.thisown = 0
10164 self.__class__ = GBSpan
10165 _core_.GBSpan_swigregister(GBSpanPtr)
10166
10167 class GBSizerItem(SizerItem):
10168 """
10169 The wx.GBSizerItem class is used to track the additional data about
10170 items in a `wx.GridBagSizer` such as the item's position in the grid
10171 and how many rows or columns it spans.
10172
10173 """
10174 def __repr__(self):
10175 return "<%s.%s; proxy of C++ wxGBSizerItem instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
10176 def __init__(self, *args, **kwargs):
10177 """
10178 __init__(self) -> GBSizerItem
10179
10180 Constructs an empty wx.GBSizerItem. Either a window, sizer or spacer
10181 size will need to be set, as well as a position and span before this
10182 item can be used in a Sizer.
10183
10184 You will probably never need to create a wx.GBSizerItem directly as they
10185 are created automatically when the sizer's Add method is called.
10186 """
10187 newobj = _core_.new_GBSizerItem(*args, **kwargs)
10188 self.this = newobj.this
10189 self.thisown = 1
10190 del newobj.thisown
10191 def GetPos(*args, **kwargs):
10192 """
10193 GetPos(self) -> GBPosition
10194
10195 Get the grid position of the item
10196 """
10197 return _core_.GBSizerItem_GetPos(*args, **kwargs)
10198
10199 def GetPosTuple(self): return self.GetPos().Get()
10200 def GetSpan(*args, **kwargs):
10201 """
10202 GetSpan(self) -> GBSpan
10203
10204 Get the row and column spanning of the item
10205 """
10206 return _core_.GBSizerItem_GetSpan(*args, **kwargs)
10207
10208 def GetSpanTuple(self): return self.GetSpan().Get()
10209 def SetPos(*args, **kwargs):
10210 """
10211 SetPos(self, GBPosition pos) -> bool
10212
10213 If the item is already a member of a sizer then first ensure that
10214 there is no other item that would intersect with this one at the new
10215 position, then set the new position. Returns True if the change is
10216 successful and after the next Layout() the item will be moved.
10217 """
10218 return _core_.GBSizerItem_SetPos(*args, **kwargs)
10219
10220 def SetSpan(*args, **kwargs):
10221 """
10222 SetSpan(self, GBSpan span) -> bool
10223
10224 If the item is already a member of a sizer then first ensure that
10225 there is no other item that would intersect with this one with its new
10226 spanning size, then set the new spanning. Returns True if the change
10227 is successful and after the next Layout() the item will be resized.
10228
10229 """
10230 return _core_.GBSizerItem_SetSpan(*args, **kwargs)
10231
10232 def Intersects(*args, **kwargs):
10233 """
10234 Intersects(self, GBSizerItem other) -> bool
10235
10236 Returns True if this item and the other item instersect.
10237 """
10238 return _core_.GBSizerItem_Intersects(*args, **kwargs)
10239
10240 def IntersectsPos(*args, **kwargs):
10241 """
10242 IntersectsPos(self, GBPosition pos, GBSpan span) -> bool
10243
10244 Returns True if the given pos/span would intersect with this item.
10245 """
10246 return _core_.GBSizerItem_IntersectsPos(*args, **kwargs)
10247
10248 def GetEndPos(*args, **kwargs):
10249 """
10250 GetEndPos(self) -> GBPosition
10251
10252 Get the row and column of the endpoint of this item.
10253 """
10254 return _core_.GBSizerItem_GetEndPos(*args, **kwargs)
10255
10256 def GetGBSizer(*args, **kwargs):
10257 """
10258 GetGBSizer(self) -> GridBagSizer
10259
10260 Get the sizer this item is a member of.
10261 """
10262 return _core_.GBSizerItem_GetGBSizer(*args, **kwargs)
10263
10264 def SetGBSizer(*args, **kwargs):
10265 """
10266 SetGBSizer(self, GridBagSizer sizer)
10267
10268 Set the sizer this item is a member of.
10269 """
10270 return _core_.GBSizerItem_SetGBSizer(*args, **kwargs)
10271
10272
10273 class GBSizerItemPtr(GBSizerItem):
10274 def __init__(self, this):
10275 self.this = this
10276 if not hasattr(self,"thisown"): self.thisown = 0
10277 self.__class__ = GBSizerItem
10278 _core_.GBSizerItem_swigregister(GBSizerItemPtr)
10279 DefaultSpan = cvar.DefaultSpan
10280
10281 def GBSizerItemWindow(*args, **kwargs):
10282 """
10283 GBSizerItemWindow(Window window, GBPosition pos, GBSpan span, int flag,
10284 int border, PyObject userData=None) -> GBSizerItem
10285
10286 Construct a `wx.GBSizerItem` for a window.
10287 """
10288 val = _core_.new_GBSizerItemWindow(*args, **kwargs)
10289 val.thisown = 1
10290 return val
10291
10292 def GBSizerItemSizer(*args, **kwargs):
10293 """
10294 GBSizerItemSizer(Sizer sizer, GBPosition pos, GBSpan span, int flag,
10295 int border, PyObject userData=None) -> GBSizerItem
10296
10297 Construct a `wx.GBSizerItem` for a sizer
10298 """
10299 val = _core_.new_GBSizerItemSizer(*args, **kwargs)
10300 val.thisown = 1
10301 return val
10302
10303 def GBSizerItemSpacer(*args, **kwargs):
10304 """
10305 GBSizerItemSpacer(int width, int height, GBPosition pos, GBSpan span,
10306 int flag, int border, PyObject userData=None) -> GBSizerItem
10307
10308 Construct a `wx.GBSizerItem` for a spacer.
10309 """
10310 val = _core_.new_GBSizerItemSpacer(*args, **kwargs)
10311 val.thisown = 1
10312 return val
10313
10314 class GridBagSizer(FlexGridSizer):
10315 """
10316 A `wx.Sizer` that can lay out items in a virtual grid like a
10317 `wx.FlexGridSizer` but in this case explicit positioning of the items
10318 is allowed using `wx.GBPosition`, and items can optionally span more
10319 than one row and/or column using `wx.GBSpan`. The total size of the
10320 virtual grid is determined by the largest row and column that items are
10321 positioned at, adjusted for spanning.
10322
10323 """
10324 def __repr__(self):
10325 return "<%s.%s; proxy of C++ wxGridBagSizer instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
10326 def __init__(self, *args, **kwargs):
10327 """
10328 __init__(self, int vgap=0, int hgap=0) -> GridBagSizer
10329
10330 Constructor, with optional parameters to specify the gap between the
10331 rows and columns.
10332 """
10333 newobj = _core_.new_GridBagSizer(*args, **kwargs)
10334 self.this = newobj.this
10335 self.thisown = 1
10336 del newobj.thisown
10337 def Add(*args, **kwargs):
10338 """
10339 Add(self, item, GBPosition pos, GBSpan span=DefaultSpan, int flag=0,
10340 int border=0, userData=None) -> wx.GBSizerItem
10341
10342 Adds an item to the sizer at the grid cell *pos*, optionally spanning
10343 more than one row or column as specified with *span*. The remaining
10344 args behave similarly to `wx.Sizer.Add`.
10345
10346 Returns True if the item was successfully placed at the given cell
10347 position, False if something was already there.
10348
10349 """
10350 return _core_.GridBagSizer_Add(*args, **kwargs)
10351
10352 def AddItem(*args, **kwargs):
10353 """
10354 Add(self, GBSizerItem item) -> wx.GBSizerItem
10355
10356 Add an item to the sizer using a `wx.GBSizerItem`. Returns True if
10357 the item was successfully placed at its given cell position, False if
10358 something was already there.
10359 """
10360 return _core_.GridBagSizer_AddItem(*args, **kwargs)
10361
10362 def GetCellSize(*args, **kwargs):
10363 """
10364 GetCellSize(self, int row, int col) -> Size
10365
10366 Get the size of the specified cell, including hgap and
10367 vgap. Only valid after a Layout.
10368 """
10369 return _core_.GridBagSizer_GetCellSize(*args, **kwargs)
10370
10371 def GetEmptyCellSize(*args, **kwargs):
10372 """
10373 GetEmptyCellSize(self) -> Size
10374
10375 Get the size used for cells in the grid with no item.
10376 """
10377 return _core_.GridBagSizer_GetEmptyCellSize(*args, **kwargs)
10378
10379 def SetEmptyCellSize(*args, **kwargs):
10380 """
10381 SetEmptyCellSize(self, Size sz)
10382
10383 Set the size used for cells in the grid with no item.
10384 """
10385 return _core_.GridBagSizer_SetEmptyCellSize(*args, **kwargs)
10386
10387 def GetItemPosition(*args):
10388 """
10389 GetItemPosition(self, item) -> GBPosition
10390
10391 Get the grid position of the specified *item* where *item* is either a
10392 window or subsizer that is a member of this sizer, or a zero-based
10393 index of an item.
10394 """
10395 return _core_.GridBagSizer_GetItemPosition(*args)
10396
10397 def SetItemPosition(*args):
10398 """
10399 SetItemPosition(self, item, GBPosition pos) -> bool
10400
10401 Set the grid position of the specified *item* where *item* is either a
10402 window or subsizer that is a member of this sizer, or a zero-based
10403 index of an item. Returns True on success. If the move is not
10404 allowed (because an item is already there) then False is returned.
10405
10406 """
10407 return _core_.GridBagSizer_SetItemPosition(*args)
10408
10409 def GetItemSpan(*args):
10410 """
10411 GetItemSpan(self, item) -> GBSpan
10412
10413 Get the row/col spanning of the specified *item* where *item* is
10414 either a window or subsizer that is a member of this sizer, or a
10415 zero-based index of an item.
10416 """
10417 return _core_.GridBagSizer_GetItemSpan(*args)
10418
10419 def SetItemSpan(*args):
10420 """
10421 SetItemSpan(self, item, GBSpan span) -> bool
10422
10423 Set the row/col spanning of the specified *item* where *item* is
10424 either a window or subsizer that is a member of this sizer, or a
10425 zero-based index of an item. Returns True on success. If the move is
10426 not allowed (because an item is already there) then False is returned.
10427 """
10428 return _core_.GridBagSizer_SetItemSpan(*args)
10429
10430 def FindItem(*args):
10431 """
10432 FindItem(self, item) -> GBSizerItem
10433
10434 Find the sizer item for the given window or subsizer, returns None if
10435 not found. (non-recursive)
10436 """
10437 return _core_.GridBagSizer_FindItem(*args)
10438
10439 def FindItemAtPosition(*args, **kwargs):
10440 """
10441 FindItemAtPosition(self, GBPosition pos) -> GBSizerItem
10442
10443 Return the sizer item for the given grid cell, or None if there is no
10444 item at that position. (non-recursive)
10445 """
10446 return _core_.GridBagSizer_FindItemAtPosition(*args, **kwargs)
10447
10448 def FindItemAtPoint(*args, **kwargs):
10449 """
10450 FindItemAtPoint(self, Point pt) -> GBSizerItem
10451
10452 Return the sizer item located at the point given in *pt*, or None if
10453 there is no item at that point. The (x,y) coordinates in pt correspond
10454 to the client coordinates of the window using the sizer for
10455 layout. (non-recursive)
10456 """
10457 return _core_.GridBagSizer_FindItemAtPoint(*args, **kwargs)
10458
10459 def CheckForIntersection(*args, **kwargs):
10460 """
10461 CheckForIntersection(self, GBSizerItem item, GBSizerItem excludeItem=None) -> bool
10462
10463 Look at all items and see if any intersect (or would overlap) the
10464 given *item*. Returns True if so, False if there would be no overlap.
10465 If an *excludeItem* is given then it will not be checked for
10466 intersection, for example it may be the item we are checking the
10467 position of.
10468
10469 """
10470 return _core_.GridBagSizer_CheckForIntersection(*args, **kwargs)
10471
10472 def CheckForIntersectionPos(*args, **kwargs):
10473 """
10474 CheckForIntersectionPos(self, GBPosition pos, GBSpan span, GBSizerItem excludeItem=None) -> bool
10475
10476 Look at all items and see if any intersect (or would overlap) the
10477 given position and span. Returns True if so, False if there would be
10478 no overlap. If an *excludeItem* is given then it will not be checked
10479 for intersection, for example it may be the item we are checking the
10480 position of.
10481 """
10482 return _core_.GridBagSizer_CheckForIntersectionPos(*args, **kwargs)
10483
10484
10485 class GridBagSizerPtr(GridBagSizer):
10486 def __init__(self, this):
10487 self.this = this
10488 if not hasattr(self,"thisown"): self.thisown = 0
10489 self.__class__ = GridBagSizer
10490 _core_.GridBagSizer_swigregister(GridBagSizerPtr)
10491
10492 #---------------------------------------------------------------------------
10493
10494 Left = _core_.Left
10495 Top = _core_.Top
10496 Right = _core_.Right
10497 Bottom = _core_.Bottom
10498 Width = _core_.Width
10499 Height = _core_.Height
10500 Centre = _core_.Centre
10501 Center = _core_.Center
10502 CentreX = _core_.CentreX
10503 CentreY = _core_.CentreY
10504 Unconstrained = _core_.Unconstrained
10505 AsIs = _core_.AsIs
10506 PercentOf = _core_.PercentOf
10507 Above = _core_.Above
10508 Below = _core_.Below
10509 LeftOf = _core_.LeftOf
10510 RightOf = _core_.RightOf
10511 SameAs = _core_.SameAs
10512 Absolute = _core_.Absolute
10513 class IndividualLayoutConstraint(Object):
10514 """
10515 Objects of this class are stored in the `wx.LayoutConstraints` class as
10516 one of eight possible constraints that a window can be involved in.
10517 You will never need to create an instance of
10518 wx.IndividualLayoutConstraint, rather you should create a
10519 `wx.LayoutConstraints` instance and use the individual contstraints
10520 that it contains.
10521 """
10522 def __init__(self): raise RuntimeError, "No constructor defined"
10523 def __repr__(self):
10524 return "<%s.%s; proxy of C++ wxIndividualLayoutConstraint instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
10525 def Set(*args, **kwargs):
10526 """
10527 Set(self, int rel, Window otherW, int otherE, int val=0, int marg=wxLAYOUT_DEFAULT_MARGIN)
10528
10529 Sets the properties of the constraint. Normally called by one of the
10530 convenience functions such as Above, RightOf, SameAs.
10531 """
10532 return _core_.IndividualLayoutConstraint_Set(*args, **kwargs)
10533
10534 def LeftOf(*args, **kwargs):
10535 """
10536 LeftOf(self, Window sibling, int marg=0)
10537
10538 Constrains this edge to be to the left of the given window, with an
10539 optional margin. Implicitly, this is relative to the left edge of the
10540 other window.
10541 """
10542 return _core_.IndividualLayoutConstraint_LeftOf(*args, **kwargs)
10543
10544 def RightOf(*args, **kwargs):
10545 """
10546 RightOf(self, Window sibling, int marg=0)
10547
10548 Constrains this edge to be to the right of the given window, with an
10549 optional margin. Implicitly, this is relative to the right edge of the
10550 other window.
10551 """
10552 return _core_.IndividualLayoutConstraint_RightOf(*args, **kwargs)
10553
10554 def Above(*args, **kwargs):
10555 """
10556 Above(self, Window sibling, int marg=0)
10557
10558 Constrains this edge to be above the given window, with an optional
10559 margin. Implicitly, this is relative to the top edge of the other
10560 window.
10561 """
10562 return _core_.IndividualLayoutConstraint_Above(*args, **kwargs)
10563
10564 def Below(*args, **kwargs):
10565 """
10566 Below(self, Window sibling, int marg=0)
10567
10568 Constrains this edge to be below the given window, with an optional
10569 margin. Implicitly, this is relative to the bottom edge of the other
10570 window.
10571 """
10572 return _core_.IndividualLayoutConstraint_Below(*args, **kwargs)
10573
10574 def SameAs(*args, **kwargs):
10575 """
10576 SameAs(self, Window otherW, int edge, int marg=0)
10577
10578 Constrains this edge or dimension to be to the same as the edge of the
10579 given window, with an optional margin.
10580 """
10581 return _core_.IndividualLayoutConstraint_SameAs(*args, **kwargs)
10582
10583 def PercentOf(*args, **kwargs):
10584 """
10585 PercentOf(self, Window otherW, int wh, int per)
10586
10587 Constrains this edge or dimension to be to a percentage of the given
10588 window, with an optional margin.
10589 """
10590 return _core_.IndividualLayoutConstraint_PercentOf(*args, **kwargs)
10591
10592 def Absolute(*args, **kwargs):
10593 """
10594 Absolute(self, int val)
10595
10596 Constrains this edge or dimension to be the given absolute value.
10597 """
10598 return _core_.IndividualLayoutConstraint_Absolute(*args, **kwargs)
10599
10600 def Unconstrained(*args, **kwargs):
10601 """
10602 Unconstrained(self)
10603
10604 Sets this edge or dimension to be unconstrained, that is, dependent on
10605 other edges and dimensions from which this value can be deduced.
10606 """
10607 return _core_.IndividualLayoutConstraint_Unconstrained(*args, **kwargs)
10608
10609 def AsIs(*args, **kwargs):
10610 """
10611 AsIs(self)
10612
10613 Sets this edge or constraint to be whatever the window's value is at
10614 the moment. If either of the width and height constraints are *as is*,
10615 the window will not be resized, but moved instead. This is important
10616 when considering panel items which are intended to have a default
10617 size, such as a button, which may take its size from the size of the
10618 button label.
10619 """
10620 return _core_.IndividualLayoutConstraint_AsIs(*args, **kwargs)
10621
10622 def GetOtherWindow(*args, **kwargs):
10623 """GetOtherWindow(self) -> Window"""
10624 return _core_.IndividualLayoutConstraint_GetOtherWindow(*args, **kwargs)
10625
10626 def GetMyEdge(*args, **kwargs):
10627 """GetMyEdge(self) -> int"""
10628 return _core_.IndividualLayoutConstraint_GetMyEdge(*args, **kwargs)
10629
10630 def SetEdge(*args, **kwargs):
10631 """SetEdge(self, int which)"""
10632 return _core_.IndividualLayoutConstraint_SetEdge(*args, **kwargs)
10633
10634 def SetValue(*args, **kwargs):
10635 """SetValue(self, int v)"""
10636 return _core_.IndividualLayoutConstraint_SetValue(*args, **kwargs)
10637
10638 def GetMargin(*args, **kwargs):
10639 """GetMargin(self) -> int"""
10640 return _core_.IndividualLayoutConstraint_GetMargin(*args, **kwargs)
10641
10642 def SetMargin(*args, **kwargs):
10643 """SetMargin(self, int m)"""
10644 return _core_.IndividualLayoutConstraint_SetMargin(*args, **kwargs)
10645
10646 def GetValue(*args, **kwargs):
10647 """GetValue(self) -> int"""
10648 return _core_.IndividualLayoutConstraint_GetValue(*args, **kwargs)
10649
10650 def GetPercent(*args, **kwargs):
10651 """GetPercent(self) -> int"""
10652 return _core_.IndividualLayoutConstraint_GetPercent(*args, **kwargs)
10653
10654 def GetOtherEdge(*args, **kwargs):
10655 """GetOtherEdge(self) -> int"""
10656 return _core_.IndividualLayoutConstraint_GetOtherEdge(*args, **kwargs)
10657
10658 def GetDone(*args, **kwargs):
10659 """GetDone(self) -> bool"""
10660 return _core_.IndividualLayoutConstraint_GetDone(*args, **kwargs)
10661
10662 def SetDone(*args, **kwargs):
10663 """SetDone(self, bool d)"""
10664 return _core_.IndividualLayoutConstraint_SetDone(*args, **kwargs)
10665
10666 def GetRelationship(*args, **kwargs):
10667 """GetRelationship(self) -> int"""
10668 return _core_.IndividualLayoutConstraint_GetRelationship(*args, **kwargs)
10669
10670 def SetRelationship(*args, **kwargs):
10671 """SetRelationship(self, int r)"""
10672 return _core_.IndividualLayoutConstraint_SetRelationship(*args, **kwargs)
10673
10674 def ResetIfWin(*args, **kwargs):
10675 """
10676 ResetIfWin(self, Window otherW) -> bool
10677
10678 Reset constraint if it mentions otherWin
10679 """
10680 return _core_.IndividualLayoutConstraint_ResetIfWin(*args, **kwargs)
10681
10682 def SatisfyConstraint(*args, **kwargs):
10683 """
10684 SatisfyConstraint(self, LayoutConstraints constraints, Window win) -> bool
10685
10686 Try to satisfy constraint
10687 """
10688 return _core_.IndividualLayoutConstraint_SatisfyConstraint(*args, **kwargs)
10689
10690 def GetEdge(*args, **kwargs):
10691 """
10692 GetEdge(self, int which, Window thisWin, Window other) -> int
10693
10694 Get the value of this edge or dimension, or if this
10695 is not determinable, -1.
10696 """
10697 return _core_.IndividualLayoutConstraint_GetEdge(*args, **kwargs)
10698
10699
10700 class IndividualLayoutConstraintPtr(IndividualLayoutConstraint):
10701 def __init__(self, this):
10702 self.this = this
10703 if not hasattr(self,"thisown"): self.thisown = 0
10704 self.__class__ = IndividualLayoutConstraint
10705 _core_.IndividualLayoutConstraint_swigregister(IndividualLayoutConstraintPtr)
10706
10707 class LayoutConstraints(Object):
10708 """
10709 **Note:** constraints are now deprecated and you should use sizers
10710 instead.
10711
10712 Objects of this class can be associated with a window to define its
10713 layout constraints, with respect to siblings or its parent.
10714
10715 The class consists of the following eight constraints of class
10716 wx.IndividualLayoutConstraint, some or all of which should be accessed
10717 directly to set the appropriate constraints.
10718
10719 * left: represents the left hand edge of the window
10720 * right: represents the right hand edge of the window
10721 * top: represents the top edge of the window
10722 * bottom: represents the bottom edge of the window
10723 * width: represents the width of the window
10724 * height: represents the height of the window
10725 * centreX: represents the horizontal centre point of the window
10726 * centreY: represents the vertical centre point of the window
10727
10728 Most constraints are initially set to have the relationship
10729 wxUnconstrained, which means that their values should be calculated by
10730 looking at known constraints. The exceptions are width and height,
10731 which are set to wxAsIs to ensure that if the user does not specify a
10732 constraint, the existing width and height will be used, to be
10733 compatible with panel items which often have take a default size. If
10734 the constraint is ``wx.AsIs``, the dimension will not be changed.
10735
10736 :see: `wx.IndividualLayoutConstraint`, `wx.Window.SetConstraints`
10737
10738 """
10739 def __repr__(self):
10740 return "<%s.%s; proxy of C++ wxLayoutConstraints instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
10741 left = property(_core_.LayoutConstraints_left_get)
10742 top = property(_core_.LayoutConstraints_top_get)
10743 right = property(_core_.LayoutConstraints_right_get)
10744 bottom = property(_core_.LayoutConstraints_bottom_get)
10745 width = property(_core_.LayoutConstraints_width_get)
10746 height = property(_core_.LayoutConstraints_height_get)
10747 centreX = property(_core_.LayoutConstraints_centreX_get)
10748 centreY = property(_core_.LayoutConstraints_centreY_get)
10749 def __init__(self, *args, **kwargs):
10750 """__init__(self) -> LayoutConstraints"""
10751 newobj = _core_.new_LayoutConstraints(*args, **kwargs)
10752 self.this = newobj.this
10753 self.thisown = 1
10754 del newobj.thisown
10755 def SatisfyConstraints(*args, **kwargs):
10756 """SatisfyConstraints(Window win) -> (areSatisfied, noChanges)"""
10757 return _core_.LayoutConstraints_SatisfyConstraints(*args, **kwargs)
10758
10759 def AreSatisfied(*args, **kwargs):
10760 """AreSatisfied(self) -> bool"""
10761 return _core_.LayoutConstraints_AreSatisfied(*args, **kwargs)
10762
10763
10764 class LayoutConstraintsPtr(LayoutConstraints):
10765 def __init__(self, this):
10766 self.this = this
10767 if not hasattr(self,"thisown"): self.thisown = 0
10768 self.__class__ = LayoutConstraints
10769 _core_.LayoutConstraints_swigregister(LayoutConstraintsPtr)
10770
10771 #----------------------------------------------------------------------------
10772
10773 # Use Python's bool constants if available, make some if not
10774 try:
10775 True
10776 except NameError:
10777 __builtins__.True = 1==1
10778 __builtins__.False = 1==0
10779 def bool(value): return not not value
10780 __builtins__.bool = bool
10781
10782
10783
10784 # workarounds for bad wxRTTI names
10785 __wxPyPtrTypeMap['wxGauge95'] = 'wxGauge'
10786 __wxPyPtrTypeMap['wxSlider95'] = 'wxSlider'
10787 __wxPyPtrTypeMap['wxStatusBar95'] = 'wxStatusBar'
10788
10789
10790 #----------------------------------------------------------------------------
10791 # Load version numbers from __version__... Ensure that major and minor
10792 # versions are the same for both wxPython and wxWidgets.
10793
10794 from __version__ import *
10795 __version__ = VERSION_STRING
10796
10797 assert MAJOR_VERSION == _core_.MAJOR_VERSION, "wxPython/wxWidgets version mismatch"
10798 assert MINOR_VERSION == _core_.MINOR_VERSION, "wxPython/wxWidgets version mismatch"
10799 if RELEASE_VERSION != _core_.RELEASE_VERSION:
10800 import warnings
10801 warnings.warn("wxPython/wxWidgets release number mismatch")
10802
10803 #----------------------------------------------------------------------------
10804
10805 class PyDeadObjectError(AttributeError):
10806 pass
10807
10808 class _wxPyDeadObject(object):
10809 """
10810 Instances of wx objects that are OOR capable will have their __class__
10811 changed to this class when the C++ object is deleted. This should help
10812 prevent crashes due to referencing a bogus C++ pointer.
10813 """
10814 reprStr = "wxPython wrapper for DELETED %s object! (The C++ object no longer exists.)"
10815 attrStr = "The C++ part of the %s object has been deleted, attribute access no longer allowed."
10816
10817 def __repr__(self):
10818 if not hasattr(self, "_name"):
10819 self._name = "[unknown]"
10820 return self.reprStr % self._name
10821
10822 def __getattr__(self, *args):
10823 if not hasattr(self, "_name"):
10824 self._name = "[unknown]"
10825 raise PyDeadObjectError(self.attrStr % self._name)
10826
10827 def __nonzero__(self):
10828 return 0
10829
10830
10831
10832 class PyUnbornObjectError(AttributeError):
10833 pass
10834
10835 class _wxPyUnbornObject(object):
10836 """
10837 Some stock objects are created when the wx._core module is
10838 imported, but their C++ instance is not created until the wx.App
10839 object is created and initialized. These object instances will
10840 temporarily have their __class__ changed to this class so an
10841 exception will be raised if they are used before the C++ instance
10842 is ready.
10843 """
10844
10845 reprStr = "wxPython wrapper for UNBORN object! (The C++ object is not initialized yet.)"
10846 attrStr = "The C++ part of this object has not been initialized, attribute access not allowed."
10847
10848 def __repr__(self):
10849 #if not hasattr(self, "_name"):
10850 # self._name = "[unknown]"
10851 return self.reprStr #% self._name
10852
10853 def __getattr__(self, *args):
10854 #if not hasattr(self, "_name"):
10855 # self._name = "[unknown]"
10856 raise PyUnbornObjectError(self.attrStr) # % self._name )
10857
10858 def __nonzero__(self):
10859 return 0
10860
10861
10862 #----------------------------------------------------------------------------
10863 _wxPyCallAfterId = None
10864
10865 def CallAfter(callable, *args, **kw):
10866 """
10867 Call the specified function after the current and pending event
10868 handlers have been completed. This is also good for making GUI
10869 method calls from non-GUI threads. Any extra positional or
10870 keyword args are passed on to the callable when it is called.
10871
10872 :see: `wx.FutureCall`
10873 """
10874 app = wx.GetApp()
10875 assert app is not None, 'No wx.App created yet'
10876
10877 global _wxPyCallAfterId
10878 if _wxPyCallAfterId is None:
10879 _wxPyCallAfterId = wx.NewEventType()
10880 app.Connect(-1, -1, _wxPyCallAfterId,
10881 lambda event: event.callable(*event.args, **event.kw) )
10882 evt = wx.PyEvent()
10883 evt.SetEventType(_wxPyCallAfterId)
10884 evt.callable = callable
10885 evt.args = args
10886 evt.kw = kw
10887 wx.PostEvent(app, evt)
10888
10889
10890 #----------------------------------------------------------------------------
10891
10892
10893 class FutureCall:
10894 """
10895 A convenience class for wx.Timer, that calls the given callable
10896 object once after the given amount of milliseconds, passing any
10897 positional or keyword args. The return value of the callable is
10898 availbale after it has been run with the `GetResult` method.
10899
10900 If you don't need to get the return value or restart the timer
10901 then there is no need to hold a reference to this object. It will
10902 hold a reference to itself while the timer is running (the timer
10903 has a reference to self.Notify) but the cycle will be broken when
10904 the timer completes, automatically cleaning up the wx.FutureCall
10905 object.
10906
10907 :see: `wx.CallAfter`
10908 """
10909 def __init__(self, millis, callable, *args, **kwargs):
10910 self.millis = millis
10911 self.callable = callable
10912 self.SetArgs(*args, **kwargs)
10913 self.runCount = 0
10914 self.running = False
10915 self.hasRun = False
10916 self.result = None
10917 self.timer = None
10918 self.Start()
10919
10920 def __del__(self):
10921 self.Stop()
10922
10923
10924 def Start(self, millis=None, *args, **kwargs):
10925 """
10926 (Re)start the timer
10927 """
10928 self.hasRun = False
10929 if millis is not None:
10930 self.millis = millis
10931 if args or kwargs:
10932 self.SetArgs(*args, **kwargs)
10933 self.Stop()
10934 self.timer = wx.PyTimer(self.Notify)
10935 self.timer.Start(self.millis, wx.TIMER_ONE_SHOT)
10936 self.running = True
10937 Restart = Start
10938
10939
10940 def Stop(self):
10941 """
10942 Stop and destroy the timer.
10943 """
10944 if self.timer is not None:
10945 self.timer.Stop()
10946 self.timer = None
10947
10948
10949 def GetInterval(self):
10950 if self.timer is not None:
10951 return self.timer.GetInterval()
10952 else:
10953 return 0
10954
10955
10956 def IsRunning(self):
10957 return self.timer is not None and self.timer.IsRunning()
10958
10959
10960 def SetArgs(self, *args, **kwargs):
10961 """
10962 (Re)set the args passed to the callable object. This is
10963 useful in conjunction with Restart if you want to schedule a
10964 new call to the same callable object but with different
10965 parameters.
10966 """
10967 self.args = args
10968 self.kwargs = kwargs
10969
10970
10971 def HasRun(self):
10972 return self.hasRun
10973
10974 def GetResult(self):
10975 return self.result
10976
10977 def Notify(self):
10978 """
10979 The timer has expired so call the callable.
10980 """
10981 if self.callable and getattr(self.callable, 'im_self', True):
10982 self.runCount += 1
10983 self.running = False
10984 self.result = self.callable(*self.args, **self.kwargs)
10985 self.hasRun = True
10986 if not self.running:
10987 # if it wasn't restarted, then cleanup
10988 wx.CallAfter(self.Stop)
10989
10990
10991
10992 #----------------------------------------------------------------------------
10993 # Control which items in this module should be documented by epydoc.
10994 # We allow only classes and functions, which will help reduce the size
10995 # of the docs by filtering out the zillions of constants, EVT objects,
10996 # and etc that don't make much sense by themselves, but are instead
10997 # documented (or will be) as part of the classes/functions/methods
10998 # where they should be used.
10999
11000 class __DocFilter:
11001 """
11002 A filter for epydoc that only allows non-Ptr classes and
11003 fucntions, in order to reduce the clutter in the API docs.
11004 """
11005 def __init__(self, globals):
11006 self._globals = globals
11007
11008 def __call__(self, name):
11009 import types
11010 obj = self._globals.get(name, None)
11011 if type(obj) not in [type, types.ClassType, types.FunctionType, types.BuiltinFunctionType]:
11012 return False
11013 if name.startswith('_') or name.endswith('Ptr') or name.startswith('EVT'):
11014 return False
11015 return True
11016
11017 #----------------------------------------------------------------------------
11018 #----------------------------------------------------------------------------
11019
11020 # Import other modules in this package that should show up in the
11021 # "core" wx namespace
11022 from _gdi import *
11023 from _windows import *
11024 from _controls import *
11025 from _misc import *
11026
11027
11028 # Fixup the stock objects since they can't be used yet. (They will be
11029 # restored in wx.PyApp.OnInit.)
11030 _core_._wxPyFixStockObjects()
11031
11032 #----------------------------------------------------------------------------
11033 #----------------------------------------------------------------------------
11034
11035