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