]> git.saurik.com Git - wxWidgets.git/blob - wxPython/src/msw/_core.py
make it easier to do a gtk2 build
[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 NOT_FOUND = _core_.NOT_FOUND
16 VSCROLL = _core_.VSCROLL
17 HSCROLL = _core_.HSCROLL
18 CAPTION = _core_.CAPTION
19 DOUBLE_BORDER = _core_.DOUBLE_BORDER
20 SUNKEN_BORDER = _core_.SUNKEN_BORDER
21 RAISED_BORDER = _core_.RAISED_BORDER
22 BORDER = _core_.BORDER
23 SIMPLE_BORDER = _core_.SIMPLE_BORDER
24 STATIC_BORDER = _core_.STATIC_BORDER
25 TRANSPARENT_WINDOW = _core_.TRANSPARENT_WINDOW
26 NO_BORDER = _core_.NO_BORDER
27 TAB_TRAVERSAL = _core_.TAB_TRAVERSAL
28 WANTS_CHARS = _core_.WANTS_CHARS
29 POPUP_WINDOW = _core_.POPUP_WINDOW
30 CENTER_FRAME = _core_.CENTER_FRAME
31 CENTRE_ON_SCREEN = _core_.CENTRE_ON_SCREEN
32 CENTER_ON_SCREEN = _core_.CENTER_ON_SCREEN
33 ED_CLIENT_MARGIN = _core_.ED_CLIENT_MARGIN
34 ED_BUTTONS_BOTTOM = _core_.ED_BUTTONS_BOTTOM
35 ED_BUTTONS_RIGHT = _core_.ED_BUTTONS_RIGHT
36 ED_STATIC_LINE = _core_.ED_STATIC_LINE
37 EXT_DIALOG_STYLE = _core_.EXT_DIALOG_STYLE
38 CLIP_CHILDREN = _core_.CLIP_CHILDREN
39 CLIP_SIBLINGS = _core_.CLIP_SIBLINGS
40 ALWAYS_SHOW_SB = _core_.ALWAYS_SHOW_SB
41 RETAINED = _core_.RETAINED
42 BACKINGSTORE = _core_.BACKINGSTORE
43 COLOURED = _core_.COLOURED
44 FIXED_LENGTH = _core_.FIXED_LENGTH
45 LB_NEEDED_SB = _core_.LB_NEEDED_SB
46 LB_ALWAYS_SB = _core_.LB_ALWAYS_SB
47 LB_SORT = _core_.LB_SORT
48 LB_SINGLE = _core_.LB_SINGLE
49 LB_MULTIPLE = _core_.LB_MULTIPLE
50 LB_EXTENDED = _core_.LB_EXTENDED
51 LB_OWNERDRAW = _core_.LB_OWNERDRAW
52 LB_HSCROLL = _core_.LB_HSCROLL
53 PROCESS_ENTER = _core_.PROCESS_ENTER
54 PASSWORD = _core_.PASSWORD
55 CB_SIMPLE = _core_.CB_SIMPLE
56 CB_DROPDOWN = _core_.CB_DROPDOWN
57 CB_SORT = _core_.CB_SORT
58 CB_READONLY = _core_.CB_READONLY
59 RA_HORIZONTAL = _core_.RA_HORIZONTAL
60 RA_VERTICAL = _core_.RA_VERTICAL
61 RA_SPECIFY_ROWS = _core_.RA_SPECIFY_ROWS
62 RA_SPECIFY_COLS = _core_.RA_SPECIFY_COLS
63 RB_GROUP = _core_.RB_GROUP
64 RB_SINGLE = _core_.RB_SINGLE
65 SL_HORIZONTAL = _core_.SL_HORIZONTAL
66 SL_VERTICAL = _core_.SL_VERTICAL
67 SL_AUTOTICKS = _core_.SL_AUTOTICKS
68 SL_LABELS = _core_.SL_LABELS
69 SL_LEFT = _core_.SL_LEFT
70 SL_TOP = _core_.SL_TOP
71 SL_RIGHT = _core_.SL_RIGHT
72 SL_BOTTOM = _core_.SL_BOTTOM
73 SL_BOTH = _core_.SL_BOTH
74 SL_SELRANGE = _core_.SL_SELRANGE
75 SB_HORIZONTAL = _core_.SB_HORIZONTAL
76 SB_VERTICAL = _core_.SB_VERTICAL
77 ST_SIZEGRIP = _core_.ST_SIZEGRIP
78 ST_NO_AUTORESIZE = _core_.ST_NO_AUTORESIZE
79 FLOOD_SURFACE = _core_.FLOOD_SURFACE
80 FLOOD_BORDER = _core_.FLOOD_BORDER
81 ODDEVEN_RULE = _core_.ODDEVEN_RULE
82 WINDING_RULE = _core_.WINDING_RULE
83 TOOL_TOP = _core_.TOOL_TOP
84 TOOL_BOTTOM = _core_.TOOL_BOTTOM
85 TOOL_LEFT = _core_.TOOL_LEFT
86 TOOL_RIGHT = _core_.TOOL_RIGHT
87 OK = _core_.OK
88 YES_NO = _core_.YES_NO
89 CANCEL = _core_.CANCEL
90 YES = _core_.YES
91 NO = _core_.NO
92 NO_DEFAULT = _core_.NO_DEFAULT
93 YES_DEFAULT = _core_.YES_DEFAULT
94 ICON_EXCLAMATION = _core_.ICON_EXCLAMATION
95 ICON_HAND = _core_.ICON_HAND
96 ICON_QUESTION = _core_.ICON_QUESTION
97 ICON_INFORMATION = _core_.ICON_INFORMATION
98 ICON_STOP = _core_.ICON_STOP
99 ICON_ASTERISK = _core_.ICON_ASTERISK
100 ICON_MASK = _core_.ICON_MASK
101 ICON_WARNING = _core_.ICON_WARNING
102 ICON_ERROR = _core_.ICON_ERROR
103 FORWARD = _core_.FORWARD
104 BACKWARD = _core_.BACKWARD
105 RESET = _core_.RESET
106 HELP = _core_.HELP
107 MORE = _core_.MORE
108 SETUP = _core_.SETUP
109 SIZE_AUTO_WIDTH = _core_.SIZE_AUTO_WIDTH
110 SIZE_AUTO_HEIGHT = _core_.SIZE_AUTO_HEIGHT
111 SIZE_AUTO = _core_.SIZE_AUTO
112 SIZE_USE_EXISTING = _core_.SIZE_USE_EXISTING
113 SIZE_ALLOW_MINUS_ONE = _core_.SIZE_ALLOW_MINUS_ONE
114 PORTRAIT = _core_.PORTRAIT
115 LANDSCAPE = _core_.LANDSCAPE
116 PRINT_QUALITY_HIGH = _core_.PRINT_QUALITY_HIGH
117 PRINT_QUALITY_MEDIUM = _core_.PRINT_QUALITY_MEDIUM
118 PRINT_QUALITY_LOW = _core_.PRINT_QUALITY_LOW
119 PRINT_QUALITY_DRAFT = _core_.PRINT_QUALITY_DRAFT
120 ID_ANY = _core_.ID_ANY
121 ID_SEPARATOR = _core_.ID_SEPARATOR
122 ID_LOWEST = _core_.ID_LOWEST
123 ID_OPEN = _core_.ID_OPEN
124 ID_CLOSE = _core_.ID_CLOSE
125 ID_NEW = _core_.ID_NEW
126 ID_SAVE = _core_.ID_SAVE
127 ID_SAVEAS = _core_.ID_SAVEAS
128 ID_REVERT = _core_.ID_REVERT
129 ID_EXIT = _core_.ID_EXIT
130 ID_UNDO = _core_.ID_UNDO
131 ID_REDO = _core_.ID_REDO
132 ID_HELP = _core_.ID_HELP
133 ID_PRINT = _core_.ID_PRINT
134 ID_PRINT_SETUP = _core_.ID_PRINT_SETUP
135 ID_PREVIEW = _core_.ID_PREVIEW
136 ID_ABOUT = _core_.ID_ABOUT
137 ID_HELP_CONTENTS = _core_.ID_HELP_CONTENTS
138 ID_HELP_COMMANDS = _core_.ID_HELP_COMMANDS
139 ID_HELP_PROCEDURES = _core_.ID_HELP_PROCEDURES
140 ID_HELP_CONTEXT = _core_.ID_HELP_CONTEXT
141 ID_CLOSE_ALL = _core_.ID_CLOSE_ALL
142 ID_PREFERENCES = _core_.ID_PREFERENCES
143 ID_CUT = _core_.ID_CUT
144 ID_COPY = _core_.ID_COPY
145 ID_PASTE = _core_.ID_PASTE
146 ID_CLEAR = _core_.ID_CLEAR
147 ID_FIND = _core_.ID_FIND
148 ID_DUPLICATE = _core_.ID_DUPLICATE
149 ID_SELECTALL = _core_.ID_SELECTALL
150 ID_DELETE = _core_.ID_DELETE
151 ID_REPLACE = _core_.ID_REPLACE
152 ID_REPLACE_ALL = _core_.ID_REPLACE_ALL
153 ID_PROPERTIES = _core_.ID_PROPERTIES
154 ID_VIEW_DETAILS = _core_.ID_VIEW_DETAILS
155 ID_VIEW_LARGEICONS = _core_.ID_VIEW_LARGEICONS
156 ID_VIEW_SMALLICONS = _core_.ID_VIEW_SMALLICONS
157 ID_VIEW_LIST = _core_.ID_VIEW_LIST
158 ID_VIEW_SORTDATE = _core_.ID_VIEW_SORTDATE
159 ID_VIEW_SORTNAME = _core_.ID_VIEW_SORTNAME
160 ID_VIEW_SORTSIZE = _core_.ID_VIEW_SORTSIZE
161 ID_VIEW_SORTTYPE = _core_.ID_VIEW_SORTTYPE
162 ID_FILE1 = _core_.ID_FILE1
163 ID_FILE2 = _core_.ID_FILE2
164 ID_FILE3 = _core_.ID_FILE3
165 ID_FILE4 = _core_.ID_FILE4
166 ID_FILE5 = _core_.ID_FILE5
167 ID_FILE6 = _core_.ID_FILE6
168 ID_FILE7 = _core_.ID_FILE7
169 ID_FILE8 = _core_.ID_FILE8
170 ID_FILE9 = _core_.ID_FILE9
171 ID_OK = _core_.ID_OK
172 ID_CANCEL = _core_.ID_CANCEL
173 ID_APPLY = _core_.ID_APPLY
174 ID_YES = _core_.ID_YES
175 ID_NO = _core_.ID_NO
176 ID_STATIC = _core_.ID_STATIC
177 ID_FORWARD = _core_.ID_FORWARD
178 ID_BACKWARD = _core_.ID_BACKWARD
179 ID_DEFAULT = _core_.ID_DEFAULT
180 ID_MORE = _core_.ID_MORE
181 ID_SETUP = _core_.ID_SETUP
182 ID_RESET = _core_.ID_RESET
183 ID_CONTEXT_HELP = _core_.ID_CONTEXT_HELP
184 ID_YESTOALL = _core_.ID_YESTOALL
185 ID_NOTOALL = _core_.ID_NOTOALL
186 ID_ABORT = _core_.ID_ABORT
187 ID_RETRY = _core_.ID_RETRY
188 ID_IGNORE = _core_.ID_IGNORE
189 ID_HIGHEST = _core_.ID_HIGHEST
190 OPEN = _core_.OPEN
191 SAVE = _core_.SAVE
192 HIDE_READONLY = _core_.HIDE_READONLY
193 OVERWRITE_PROMPT = _core_.OVERWRITE_PROMPT
194 FILE_MUST_EXIST = _core_.FILE_MUST_EXIST
195 MULTIPLE = _core_.MULTIPLE
196 CHANGE_DIR = _core_.CHANGE_DIR
197 ACCEL_ALT = _core_.ACCEL_ALT
198 ACCEL_CTRL = _core_.ACCEL_CTRL
199 ACCEL_SHIFT = _core_.ACCEL_SHIFT
200 ACCEL_NORMAL = _core_.ACCEL_NORMAL
201 PD_AUTO_HIDE = _core_.PD_AUTO_HIDE
202 PD_APP_MODAL = _core_.PD_APP_MODAL
203 PD_CAN_ABORT = _core_.PD_CAN_ABORT
204 PD_ELAPSED_TIME = _core_.PD_ELAPSED_TIME
205 PD_ESTIMATED_TIME = _core_.PD_ESTIMATED_TIME
206 PD_REMAINING_TIME = _core_.PD_REMAINING_TIME
207 DD_NEW_DIR_BUTTON = _core_.DD_NEW_DIR_BUTTON
208 DD_DEFAULT_STYLE = _core_.DD_DEFAULT_STYLE
209 MENU_TEAROFF = _core_.MENU_TEAROFF
210 MB_DOCKABLE = _core_.MB_DOCKABLE
211 NO_FULL_REPAINT_ON_RESIZE = _core_.NO_FULL_REPAINT_ON_RESIZE
212 FULL_REPAINT_ON_RESIZE = _core_.FULL_REPAINT_ON_RESIZE
213 LI_HORIZONTAL = _core_.LI_HORIZONTAL
214 LI_VERTICAL = _core_.LI_VERTICAL
215 WS_EX_VALIDATE_RECURSIVELY = _core_.WS_EX_VALIDATE_RECURSIVELY
216 WS_EX_BLOCK_EVENTS = _core_.WS_EX_BLOCK_EVENTS
217 WS_EX_TRANSIENT = _core_.WS_EX_TRANSIENT
218 WS_EX_THEMED_BACKGROUND = _core_.WS_EX_THEMED_BACKGROUND
219 WS_EX_PROCESS_IDLE = _core_.WS_EX_PROCESS_IDLE
220 WS_EX_PROCESS_UI_UPDATES = _core_.WS_EX_PROCESS_UI_UPDATES
221 MM_TEXT = _core_.MM_TEXT
222 MM_LOMETRIC = _core_.MM_LOMETRIC
223 MM_HIMETRIC = _core_.MM_HIMETRIC
224 MM_LOENGLISH = _core_.MM_LOENGLISH
225 MM_HIENGLISH = _core_.MM_HIENGLISH
226 MM_TWIPS = _core_.MM_TWIPS
227 MM_ISOTROPIC = _core_.MM_ISOTROPIC
228 MM_ANISOTROPIC = _core_.MM_ANISOTROPIC
229 MM_POINTS = _core_.MM_POINTS
230 MM_METRIC = _core_.MM_METRIC
231 CENTRE = _core_.CENTRE
232 CENTER = _core_.CENTER
233 HORIZONTAL = _core_.HORIZONTAL
234 VERTICAL = _core_.VERTICAL
235 BOTH = _core_.BOTH
236 LEFT = _core_.LEFT
237 RIGHT = _core_.RIGHT
238 UP = _core_.UP
239 DOWN = _core_.DOWN
240 TOP = _core_.TOP
241 BOTTOM = _core_.BOTTOM
242 NORTH = _core_.NORTH
243 SOUTH = _core_.SOUTH
244 WEST = _core_.WEST
245 EAST = _core_.EAST
246 ALL = _core_.ALL
247 ALIGN_NOT = _core_.ALIGN_NOT
248 ALIGN_CENTER_HORIZONTAL = _core_.ALIGN_CENTER_HORIZONTAL
249 ALIGN_CENTRE_HORIZONTAL = _core_.ALIGN_CENTRE_HORIZONTAL
250 ALIGN_LEFT = _core_.ALIGN_LEFT
251 ALIGN_TOP = _core_.ALIGN_TOP
252 ALIGN_RIGHT = _core_.ALIGN_RIGHT
253 ALIGN_BOTTOM = _core_.ALIGN_BOTTOM
254 ALIGN_CENTER_VERTICAL = _core_.ALIGN_CENTER_VERTICAL
255 ALIGN_CENTRE_VERTICAL = _core_.ALIGN_CENTRE_VERTICAL
256 ALIGN_CENTER = _core_.ALIGN_CENTER
257 ALIGN_CENTRE = _core_.ALIGN_CENTRE
258 ALIGN_MASK = _core_.ALIGN_MASK
259 STRETCH_NOT = _core_.STRETCH_NOT
260 SHRINK = _core_.SHRINK
261 GROW = _core_.GROW
262 EXPAND = _core_.EXPAND
263 SHAPED = _core_.SHAPED
264 FIXED_MINSIZE = _core_.FIXED_MINSIZE
265 TILE = _core_.TILE
266 ADJUST_MINSIZE = _core_.ADJUST_MINSIZE
267 BORDER_DEFAULT = _core_.BORDER_DEFAULT
268 BORDER_NONE = _core_.BORDER_NONE
269 BORDER_STATIC = _core_.BORDER_STATIC
270 BORDER_SIMPLE = _core_.BORDER_SIMPLE
271 BORDER_RAISED = _core_.BORDER_RAISED
272 BORDER_SUNKEN = _core_.BORDER_SUNKEN
273 BORDER_DOUBLE = _core_.BORDER_DOUBLE
274 BORDER_MASK = _core_.BORDER_MASK
275 DEFAULT = _core_.DEFAULT
276 DECORATIVE = _core_.DECORATIVE
277 ROMAN = _core_.ROMAN
278 SCRIPT = _core_.SCRIPT
279 SWISS = _core_.SWISS
280 MODERN = _core_.MODERN
281 TELETYPE = _core_.TELETYPE
282 VARIABLE = _core_.VARIABLE
283 FIXED = _core_.FIXED
284 NORMAL = _core_.NORMAL
285 LIGHT = _core_.LIGHT
286 BOLD = _core_.BOLD
287 ITALIC = _core_.ITALIC
288 SLANT = _core_.SLANT
289 SOLID = _core_.SOLID
290 DOT = _core_.DOT
291 LONG_DASH = _core_.LONG_DASH
292 SHORT_DASH = _core_.SHORT_DASH
293 DOT_DASH = _core_.DOT_DASH
294 USER_DASH = _core_.USER_DASH
295 TRANSPARENT = _core_.TRANSPARENT
296 STIPPLE = _core_.STIPPLE
297 BDIAGONAL_HATCH = _core_.BDIAGONAL_HATCH
298 CROSSDIAG_HATCH = _core_.CROSSDIAG_HATCH
299 FDIAGONAL_HATCH = _core_.FDIAGONAL_HATCH
300 CROSS_HATCH = _core_.CROSS_HATCH
301 HORIZONTAL_HATCH = _core_.HORIZONTAL_HATCH
302 VERTICAL_HATCH = _core_.VERTICAL_HATCH
303 JOIN_BEVEL = _core_.JOIN_BEVEL
304 JOIN_MITER = _core_.JOIN_MITER
305 JOIN_ROUND = _core_.JOIN_ROUND
306 CAP_ROUND = _core_.CAP_ROUND
307 CAP_PROJECTING = _core_.CAP_PROJECTING
308 CAP_BUTT = _core_.CAP_BUTT
309 CLEAR = _core_.CLEAR
310 XOR = _core_.XOR
311 INVERT = _core_.INVERT
312 OR_REVERSE = _core_.OR_REVERSE
313 AND_REVERSE = _core_.AND_REVERSE
314 COPY = _core_.COPY
315 AND = _core_.AND
316 AND_INVERT = _core_.AND_INVERT
317 NO_OP = _core_.NO_OP
318 NOR = _core_.NOR
319 EQUIV = _core_.EQUIV
320 SRC_INVERT = _core_.SRC_INVERT
321 OR_INVERT = _core_.OR_INVERT
322 NAND = _core_.NAND
323 OR = _core_.OR
324 SET = _core_.SET
325 WXK_BACK = _core_.WXK_BACK
326 WXK_TAB = _core_.WXK_TAB
327 WXK_RETURN = _core_.WXK_RETURN
328 WXK_ESCAPE = _core_.WXK_ESCAPE
329 WXK_SPACE = _core_.WXK_SPACE
330 WXK_DELETE = _core_.WXK_DELETE
331 WXK_START = _core_.WXK_START
332 WXK_LBUTTON = _core_.WXK_LBUTTON
333 WXK_RBUTTON = _core_.WXK_RBUTTON
334 WXK_CANCEL = _core_.WXK_CANCEL
335 WXK_MBUTTON = _core_.WXK_MBUTTON
336 WXK_CLEAR = _core_.WXK_CLEAR
337 WXK_SHIFT = _core_.WXK_SHIFT
338 WXK_ALT = _core_.WXK_ALT
339 WXK_CONTROL = _core_.WXK_CONTROL
340 WXK_MENU = _core_.WXK_MENU
341 WXK_PAUSE = _core_.WXK_PAUSE
342 WXK_CAPITAL = _core_.WXK_CAPITAL
343 WXK_PRIOR = _core_.WXK_PRIOR
344 WXK_NEXT = _core_.WXK_NEXT
345 WXK_END = _core_.WXK_END
346 WXK_HOME = _core_.WXK_HOME
347 WXK_LEFT = _core_.WXK_LEFT
348 WXK_UP = _core_.WXK_UP
349 WXK_RIGHT = _core_.WXK_RIGHT
350 WXK_DOWN = _core_.WXK_DOWN
351 WXK_SELECT = _core_.WXK_SELECT
352 WXK_PRINT = _core_.WXK_PRINT
353 WXK_EXECUTE = _core_.WXK_EXECUTE
354 WXK_SNAPSHOT = _core_.WXK_SNAPSHOT
355 WXK_INSERT = _core_.WXK_INSERT
356 WXK_HELP = _core_.WXK_HELP
357 WXK_NUMPAD0 = _core_.WXK_NUMPAD0
358 WXK_NUMPAD1 = _core_.WXK_NUMPAD1
359 WXK_NUMPAD2 = _core_.WXK_NUMPAD2
360 WXK_NUMPAD3 = _core_.WXK_NUMPAD3
361 WXK_NUMPAD4 = _core_.WXK_NUMPAD4
362 WXK_NUMPAD5 = _core_.WXK_NUMPAD5
363 WXK_NUMPAD6 = _core_.WXK_NUMPAD6
364 WXK_NUMPAD7 = _core_.WXK_NUMPAD7
365 WXK_NUMPAD8 = _core_.WXK_NUMPAD8
366 WXK_NUMPAD9 = _core_.WXK_NUMPAD9
367 WXK_MULTIPLY = _core_.WXK_MULTIPLY
368 WXK_ADD = _core_.WXK_ADD
369 WXK_SEPARATOR = _core_.WXK_SEPARATOR
370 WXK_SUBTRACT = _core_.WXK_SUBTRACT
371 WXK_DECIMAL = _core_.WXK_DECIMAL
372 WXK_DIVIDE = _core_.WXK_DIVIDE
373 WXK_F1 = _core_.WXK_F1
374 WXK_F2 = _core_.WXK_F2
375 WXK_F3 = _core_.WXK_F3
376 WXK_F4 = _core_.WXK_F4
377 WXK_F5 = _core_.WXK_F5
378 WXK_F6 = _core_.WXK_F6
379 WXK_F7 = _core_.WXK_F7
380 WXK_F8 = _core_.WXK_F8
381 WXK_F9 = _core_.WXK_F9
382 WXK_F10 = _core_.WXK_F10
383 WXK_F11 = _core_.WXK_F11
384 WXK_F12 = _core_.WXK_F12
385 WXK_F13 = _core_.WXK_F13
386 WXK_F14 = _core_.WXK_F14
387 WXK_F15 = _core_.WXK_F15
388 WXK_F16 = _core_.WXK_F16
389 WXK_F17 = _core_.WXK_F17
390 WXK_F18 = _core_.WXK_F18
391 WXK_F19 = _core_.WXK_F19
392 WXK_F20 = _core_.WXK_F20
393 WXK_F21 = _core_.WXK_F21
394 WXK_F22 = _core_.WXK_F22
395 WXK_F23 = _core_.WXK_F23
396 WXK_F24 = _core_.WXK_F24
397 WXK_NUMLOCK = _core_.WXK_NUMLOCK
398 WXK_SCROLL = _core_.WXK_SCROLL
399 WXK_PAGEUP = _core_.WXK_PAGEUP
400 WXK_PAGEDOWN = _core_.WXK_PAGEDOWN
401 WXK_NUMPAD_SPACE = _core_.WXK_NUMPAD_SPACE
402 WXK_NUMPAD_TAB = _core_.WXK_NUMPAD_TAB
403 WXK_NUMPAD_ENTER = _core_.WXK_NUMPAD_ENTER
404 WXK_NUMPAD_F1 = _core_.WXK_NUMPAD_F1
405 WXK_NUMPAD_F2 = _core_.WXK_NUMPAD_F2
406 WXK_NUMPAD_F3 = _core_.WXK_NUMPAD_F3
407 WXK_NUMPAD_F4 = _core_.WXK_NUMPAD_F4
408 WXK_NUMPAD_HOME = _core_.WXK_NUMPAD_HOME
409 WXK_NUMPAD_LEFT = _core_.WXK_NUMPAD_LEFT
410 WXK_NUMPAD_UP = _core_.WXK_NUMPAD_UP
411 WXK_NUMPAD_RIGHT = _core_.WXK_NUMPAD_RIGHT
412 WXK_NUMPAD_DOWN = _core_.WXK_NUMPAD_DOWN
413 WXK_NUMPAD_PRIOR = _core_.WXK_NUMPAD_PRIOR
414 WXK_NUMPAD_PAGEUP = _core_.WXK_NUMPAD_PAGEUP
415 WXK_NUMPAD_NEXT = _core_.WXK_NUMPAD_NEXT
416 WXK_NUMPAD_PAGEDOWN = _core_.WXK_NUMPAD_PAGEDOWN
417 WXK_NUMPAD_END = _core_.WXK_NUMPAD_END
418 WXK_NUMPAD_BEGIN = _core_.WXK_NUMPAD_BEGIN
419 WXK_NUMPAD_INSERT = _core_.WXK_NUMPAD_INSERT
420 WXK_NUMPAD_DELETE = _core_.WXK_NUMPAD_DELETE
421 WXK_NUMPAD_EQUAL = _core_.WXK_NUMPAD_EQUAL
422 WXK_NUMPAD_MULTIPLY = _core_.WXK_NUMPAD_MULTIPLY
423 WXK_NUMPAD_ADD = _core_.WXK_NUMPAD_ADD
424 WXK_NUMPAD_SEPARATOR = _core_.WXK_NUMPAD_SEPARATOR
425 WXK_NUMPAD_SUBTRACT = _core_.WXK_NUMPAD_SUBTRACT
426 WXK_NUMPAD_DECIMAL = _core_.WXK_NUMPAD_DECIMAL
427 WXK_NUMPAD_DIVIDE = _core_.WXK_NUMPAD_DIVIDE
428 WXK_WINDOWS_LEFT = _core_.WXK_WINDOWS_LEFT
429 WXK_WINDOWS_RIGHT = _core_.WXK_WINDOWS_RIGHT
430 WXK_WINDOWS_MENU = _core_.WXK_WINDOWS_MENU
431 PAPER_NONE = _core_.PAPER_NONE
432 PAPER_LETTER = _core_.PAPER_LETTER
433 PAPER_LEGAL = _core_.PAPER_LEGAL
434 PAPER_A4 = _core_.PAPER_A4
435 PAPER_CSHEET = _core_.PAPER_CSHEET
436 PAPER_DSHEET = _core_.PAPER_DSHEET
437 PAPER_ESHEET = _core_.PAPER_ESHEET
438 PAPER_LETTERSMALL = _core_.PAPER_LETTERSMALL
439 PAPER_TABLOID = _core_.PAPER_TABLOID
440 PAPER_LEDGER = _core_.PAPER_LEDGER
441 PAPER_STATEMENT = _core_.PAPER_STATEMENT
442 PAPER_EXECUTIVE = _core_.PAPER_EXECUTIVE
443 PAPER_A3 = _core_.PAPER_A3
444 PAPER_A4SMALL = _core_.PAPER_A4SMALL
445 PAPER_A5 = _core_.PAPER_A5
446 PAPER_B4 = _core_.PAPER_B4
447 PAPER_B5 = _core_.PAPER_B5
448 PAPER_FOLIO = _core_.PAPER_FOLIO
449 PAPER_QUARTO = _core_.PAPER_QUARTO
450 PAPER_10X14 = _core_.PAPER_10X14
451 PAPER_11X17 = _core_.PAPER_11X17
452 PAPER_NOTE = _core_.PAPER_NOTE
453 PAPER_ENV_9 = _core_.PAPER_ENV_9
454 PAPER_ENV_10 = _core_.PAPER_ENV_10
455 PAPER_ENV_11 = _core_.PAPER_ENV_11
456 PAPER_ENV_12 = _core_.PAPER_ENV_12
457 PAPER_ENV_14 = _core_.PAPER_ENV_14
458 PAPER_ENV_DL = _core_.PAPER_ENV_DL
459 PAPER_ENV_C5 = _core_.PAPER_ENV_C5
460 PAPER_ENV_C3 = _core_.PAPER_ENV_C3
461 PAPER_ENV_C4 = _core_.PAPER_ENV_C4
462 PAPER_ENV_C6 = _core_.PAPER_ENV_C6
463 PAPER_ENV_C65 = _core_.PAPER_ENV_C65
464 PAPER_ENV_B4 = _core_.PAPER_ENV_B4
465 PAPER_ENV_B5 = _core_.PAPER_ENV_B5
466 PAPER_ENV_B6 = _core_.PAPER_ENV_B6
467 PAPER_ENV_ITALY = _core_.PAPER_ENV_ITALY
468 PAPER_ENV_MONARCH = _core_.PAPER_ENV_MONARCH
469 PAPER_ENV_PERSONAL = _core_.PAPER_ENV_PERSONAL
470 PAPER_FANFOLD_US = _core_.PAPER_FANFOLD_US
471 PAPER_FANFOLD_STD_GERMAN = _core_.PAPER_FANFOLD_STD_GERMAN
472 PAPER_FANFOLD_LGL_GERMAN = _core_.PAPER_FANFOLD_LGL_GERMAN
473 PAPER_ISO_B4 = _core_.PAPER_ISO_B4
474 PAPER_JAPANESE_POSTCARD = _core_.PAPER_JAPANESE_POSTCARD
475 PAPER_9X11 = _core_.PAPER_9X11
476 PAPER_10X11 = _core_.PAPER_10X11
477 PAPER_15X11 = _core_.PAPER_15X11
478 PAPER_ENV_INVITE = _core_.PAPER_ENV_INVITE
479 PAPER_LETTER_EXTRA = _core_.PAPER_LETTER_EXTRA
480 PAPER_LEGAL_EXTRA = _core_.PAPER_LEGAL_EXTRA
481 PAPER_TABLOID_EXTRA = _core_.PAPER_TABLOID_EXTRA
482 PAPER_A4_EXTRA = _core_.PAPER_A4_EXTRA
483 PAPER_LETTER_TRANSVERSE = _core_.PAPER_LETTER_TRANSVERSE
484 PAPER_A4_TRANSVERSE = _core_.PAPER_A4_TRANSVERSE
485 PAPER_LETTER_EXTRA_TRANSVERSE = _core_.PAPER_LETTER_EXTRA_TRANSVERSE
486 PAPER_A_PLUS = _core_.PAPER_A_PLUS
487 PAPER_B_PLUS = _core_.PAPER_B_PLUS
488 PAPER_LETTER_PLUS = _core_.PAPER_LETTER_PLUS
489 PAPER_A4_PLUS = _core_.PAPER_A4_PLUS
490 PAPER_A5_TRANSVERSE = _core_.PAPER_A5_TRANSVERSE
491 PAPER_B5_TRANSVERSE = _core_.PAPER_B5_TRANSVERSE
492 PAPER_A3_EXTRA = _core_.PAPER_A3_EXTRA
493 PAPER_A5_EXTRA = _core_.PAPER_A5_EXTRA
494 PAPER_B5_EXTRA = _core_.PAPER_B5_EXTRA
495 PAPER_A2 = _core_.PAPER_A2
496 PAPER_A3_TRANSVERSE = _core_.PAPER_A3_TRANSVERSE
497 PAPER_A3_EXTRA_TRANSVERSE = _core_.PAPER_A3_EXTRA_TRANSVERSE
498 DUPLEX_SIMPLEX = _core_.DUPLEX_SIMPLEX
499 DUPLEX_HORIZONTAL = _core_.DUPLEX_HORIZONTAL
500 DUPLEX_VERTICAL = _core_.DUPLEX_VERTICAL
501 ITEM_SEPARATOR = _core_.ITEM_SEPARATOR
502 ITEM_NORMAL = _core_.ITEM_NORMAL
503 ITEM_CHECK = _core_.ITEM_CHECK
504 ITEM_RADIO = _core_.ITEM_RADIO
505 ITEM_MAX = _core_.ITEM_MAX
506 HT_NOWHERE = _core_.HT_NOWHERE
507 HT_SCROLLBAR_FIRST = _core_.HT_SCROLLBAR_FIRST
508 HT_SCROLLBAR_ARROW_LINE_1 = _core_.HT_SCROLLBAR_ARROW_LINE_1
509 HT_SCROLLBAR_ARROW_LINE_2 = _core_.HT_SCROLLBAR_ARROW_LINE_2
510 HT_SCROLLBAR_ARROW_PAGE_1 = _core_.HT_SCROLLBAR_ARROW_PAGE_1
511 HT_SCROLLBAR_ARROW_PAGE_2 = _core_.HT_SCROLLBAR_ARROW_PAGE_2
512 HT_SCROLLBAR_THUMB = _core_.HT_SCROLLBAR_THUMB
513 HT_SCROLLBAR_BAR_1 = _core_.HT_SCROLLBAR_BAR_1
514 HT_SCROLLBAR_BAR_2 = _core_.HT_SCROLLBAR_BAR_2
515 HT_SCROLLBAR_LAST = _core_.HT_SCROLLBAR_LAST
516 HT_WINDOW_OUTSIDE = _core_.HT_WINDOW_OUTSIDE
517 HT_WINDOW_INSIDE = _core_.HT_WINDOW_INSIDE
518 HT_WINDOW_VERT_SCROLLBAR = _core_.HT_WINDOW_VERT_SCROLLBAR
519 HT_WINDOW_HORZ_SCROLLBAR = _core_.HT_WINDOW_HORZ_SCROLLBAR
520 HT_WINDOW_CORNER = _core_.HT_WINDOW_CORNER
521 HT_MAX = _core_.HT_MAX
522 MOD_NONE = _core_.MOD_NONE
523 MOD_ALT = _core_.MOD_ALT
524 MOD_CONTROL = _core_.MOD_CONTROL
525 MOD_SHIFT = _core_.MOD_SHIFT
526 MOD_WIN = _core_.MOD_WIN
527 UPDATE_UI_NONE = _core_.UPDATE_UI_NONE
528 UPDATE_UI_RECURSE = _core_.UPDATE_UI_RECURSE
529 UPDATE_UI_FROMIDLE = _core_.UPDATE_UI_FROMIDLE
530 #---------------------------------------------------------------------------
531
532 class Object(object):
533 """
534 The base class for most wx objects, although in wxPython not
535 much functionality is needed nor exposed.
536 """
537 def __init__(self): raise RuntimeError, "No constructor defined"
538 def __repr__(self):
539 return "<%s.%s; proxy of C++ wxObject instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
540 def GetClassName(*args, **kwargs):
541 """
542 GetClassName(self) -> String
543
544 Returns the class name of the C++ class using wxRTTI.
545 """
546 return _core_.Object_GetClassName(*args, **kwargs)
547
548 def Destroy(*args, **kwargs):
549 """
550 Destroy(self)
551
552 Deletes the C++ object this Python object is a proxy for.
553 """
554 return _core_.Object_Destroy(*args, **kwargs)
555
556
557 class ObjectPtr(Object):
558 def __init__(self, this):
559 self.this = this
560 if not hasattr(self,"thisown"): self.thisown = 0
561 self.__class__ = Object
562 _core_.Object_swigregister(ObjectPtr)
563 _wxPySetDictionary = _core_._wxPySetDictionary
564
565 _wxPyFixStockObjects = _core_._wxPyFixStockObjects
566
567 cvar = _core_.cvar
568 EmptyString = cvar.EmptyString
569
570 #---------------------------------------------------------------------------
571
572 BITMAP_TYPE_INVALID = _core_.BITMAP_TYPE_INVALID
573 BITMAP_TYPE_BMP = _core_.BITMAP_TYPE_BMP
574 BITMAP_TYPE_ICO = _core_.BITMAP_TYPE_ICO
575 BITMAP_TYPE_CUR = _core_.BITMAP_TYPE_CUR
576 BITMAP_TYPE_XBM = _core_.BITMAP_TYPE_XBM
577 BITMAP_TYPE_XBM_DATA = _core_.BITMAP_TYPE_XBM_DATA
578 BITMAP_TYPE_XPM = _core_.BITMAP_TYPE_XPM
579 BITMAP_TYPE_XPM_DATA = _core_.BITMAP_TYPE_XPM_DATA
580 BITMAP_TYPE_TIF = _core_.BITMAP_TYPE_TIF
581 BITMAP_TYPE_GIF = _core_.BITMAP_TYPE_GIF
582 BITMAP_TYPE_PNG = _core_.BITMAP_TYPE_PNG
583 BITMAP_TYPE_JPEG = _core_.BITMAP_TYPE_JPEG
584 BITMAP_TYPE_PNM = _core_.BITMAP_TYPE_PNM
585 BITMAP_TYPE_PCX = _core_.BITMAP_TYPE_PCX
586 BITMAP_TYPE_PICT = _core_.BITMAP_TYPE_PICT
587 BITMAP_TYPE_ICON = _core_.BITMAP_TYPE_ICON
588 BITMAP_TYPE_ANI = _core_.BITMAP_TYPE_ANI
589 BITMAP_TYPE_IFF = _core_.BITMAP_TYPE_IFF
590 BITMAP_TYPE_MACCURSOR = _core_.BITMAP_TYPE_MACCURSOR
591 BITMAP_TYPE_ANY = _core_.BITMAP_TYPE_ANY
592 CURSOR_NONE = _core_.CURSOR_NONE
593 CURSOR_ARROW = _core_.CURSOR_ARROW
594 CURSOR_RIGHT_ARROW = _core_.CURSOR_RIGHT_ARROW
595 CURSOR_BULLSEYE = _core_.CURSOR_BULLSEYE
596 CURSOR_CHAR = _core_.CURSOR_CHAR
597 CURSOR_CROSS = _core_.CURSOR_CROSS
598 CURSOR_HAND = _core_.CURSOR_HAND
599 CURSOR_IBEAM = _core_.CURSOR_IBEAM
600 CURSOR_LEFT_BUTTON = _core_.CURSOR_LEFT_BUTTON
601 CURSOR_MAGNIFIER = _core_.CURSOR_MAGNIFIER
602 CURSOR_MIDDLE_BUTTON = _core_.CURSOR_MIDDLE_BUTTON
603 CURSOR_NO_ENTRY = _core_.CURSOR_NO_ENTRY
604 CURSOR_PAINT_BRUSH = _core_.CURSOR_PAINT_BRUSH
605 CURSOR_PENCIL = _core_.CURSOR_PENCIL
606 CURSOR_POINT_LEFT = _core_.CURSOR_POINT_LEFT
607 CURSOR_POINT_RIGHT = _core_.CURSOR_POINT_RIGHT
608 CURSOR_QUESTION_ARROW = _core_.CURSOR_QUESTION_ARROW
609 CURSOR_RIGHT_BUTTON = _core_.CURSOR_RIGHT_BUTTON
610 CURSOR_SIZENESW = _core_.CURSOR_SIZENESW
611 CURSOR_SIZENS = _core_.CURSOR_SIZENS
612 CURSOR_SIZENWSE = _core_.CURSOR_SIZENWSE
613 CURSOR_SIZEWE = _core_.CURSOR_SIZEWE
614 CURSOR_SIZING = _core_.CURSOR_SIZING
615 CURSOR_SPRAYCAN = _core_.CURSOR_SPRAYCAN
616 CURSOR_WAIT = _core_.CURSOR_WAIT
617 CURSOR_WATCH = _core_.CURSOR_WATCH
618 CURSOR_BLANK = _core_.CURSOR_BLANK
619 CURSOR_DEFAULT = _core_.CURSOR_DEFAULT
620 CURSOR_COPY_ARROW = _core_.CURSOR_COPY_ARROW
621 CURSOR_ARROWWAIT = _core_.CURSOR_ARROWWAIT
622 CURSOR_MAX = _core_.CURSOR_MAX
623 #---------------------------------------------------------------------------
624
625 class Size(object):
626 """
627 wx.Size is a useful data structure used to represent the size of something.
628 It simply contians integer width and height proprtites. In most places in
629 wxPython where a wx.Size is expected a (width,height) tuple can be used
630 instead.
631 """
632 def __repr__(self):
633 return "<%s.%s; proxy of C++ wxSize instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
634 width = property(_core_.Size_width_get, _core_.Size_width_set)
635 height = property(_core_.Size_height_get, _core_.Size_height_set)
636 x = width; y = height
637 def __init__(self, *args, **kwargs):
638 """
639 __init__(self, int w=0, int h=0) -> Size
640
641 Creates a size object.
642 """
643 newobj = _core_.new_Size(*args, **kwargs)
644 self.this = newobj.this
645 self.thisown = 1
646 del newobj.thisown
647 def __del__(self, destroy=_core_.delete_Size):
648 """__del__(self)"""
649 try:
650 if self.thisown: destroy(self)
651 except: pass
652
653 def __eq__(*args, **kwargs):
654 """
655 __eq__(self, Size sz) -> bool
656
657 Test for equality of wx.Size objects.
658 """
659 return _core_.Size___eq__(*args, **kwargs)
660
661 def __ne__(*args, **kwargs):
662 """
663 __ne__(self, Size sz) -> bool
664
665 Test for inequality.
666 """
667 return _core_.Size___ne__(*args, **kwargs)
668
669 def __add__(*args, **kwargs):
670 """
671 __add__(self, Size sz) -> Size
672
673 Add sz's proprties to this and return the result.
674 """
675 return _core_.Size___add__(*args, **kwargs)
676
677 def __sub__(*args, **kwargs):
678 """
679 __sub__(self, Size sz) -> Size
680
681 Subtract sz's properties from this and return the result.
682 """
683 return _core_.Size___sub__(*args, **kwargs)
684
685 def IncTo(*args, **kwargs):
686 """
687 IncTo(self, Size sz)
688
689 Increments this object so that both of its dimensions are not less
690 than the corresponding dimensions of the size.
691 """
692 return _core_.Size_IncTo(*args, **kwargs)
693
694 def DecTo(*args, **kwargs):
695 """
696 DecTo(self, Size sz)
697
698 Decrements this object so that both of its dimensions are not greater
699 than the corresponding dimensions of the size.
700 """
701 return _core_.Size_DecTo(*args, **kwargs)
702
703 def Set(*args, **kwargs):
704 """
705 Set(self, int w, int h)
706
707 Set both width and height.
708 """
709 return _core_.Size_Set(*args, **kwargs)
710
711 def SetWidth(*args, **kwargs):
712 """SetWidth(self, int w)"""
713 return _core_.Size_SetWidth(*args, **kwargs)
714
715 def SetHeight(*args, **kwargs):
716 """SetHeight(self, int h)"""
717 return _core_.Size_SetHeight(*args, **kwargs)
718
719 def GetWidth(*args, **kwargs):
720 """GetWidth(self) -> int"""
721 return _core_.Size_GetWidth(*args, **kwargs)
722
723 def GetHeight(*args, **kwargs):
724 """GetHeight(self) -> int"""
725 return _core_.Size_GetHeight(*args, **kwargs)
726
727 def IsFullySpecified(*args, **kwargs):
728 """
729 IsFullySpecified(self) -> bool
730
731 Returns True if both components of the size are non-default values.
732 """
733 return _core_.Size_IsFullySpecified(*args, **kwargs)
734
735 def SetDefaults(*args, **kwargs):
736 """
737 SetDefaults(self, Size size)
738
739 Combine this size with the other one replacing the default
740 components of this object (i.e. equal to -1) with those of the
741 other.
742 """
743 return _core_.Size_SetDefaults(*args, **kwargs)
744
745 def Get(*args, **kwargs):
746 """
747 Get() -> (width,height)
748
749 Returns the width and height properties as a tuple.
750 """
751 return _core_.Size_Get(*args, **kwargs)
752
753 asTuple = Get
754 def __str__(self): return str(self.Get())
755 def __repr__(self): return 'wx.Size'+str(self.Get())
756 def __len__(self): return len(self.Get())
757 def __getitem__(self, index): return self.Get()[index]
758 def __setitem__(self, index, val):
759 if index == 0: self.width = val
760 elif index == 1: self.height = val
761 else: raise IndexError
762 def __nonzero__(self): return self.Get() != (0,0)
763 __safe_for_unpickling__ = True
764 def __reduce__(self): return (wx.Size, self.Get())
765
766
767 class SizePtr(Size):
768 def __init__(self, this):
769 self.this = this
770 if not hasattr(self,"thisown"): self.thisown = 0
771 self.__class__ = Size
772 _core_.Size_swigregister(SizePtr)
773
774 #---------------------------------------------------------------------------
775
776 class RealPoint(object):
777 """
778 A data structure for representing a point or position with floating point x
779 and y properties. In wxPython most places that expect a wx.RealPoint can also
780 accept a (x,y) tuple.
781 """
782 def __repr__(self):
783 return "<%s.%s; proxy of C++ wxRealPoint instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
784 x = property(_core_.RealPoint_x_get, _core_.RealPoint_x_set)
785 y = property(_core_.RealPoint_y_get, _core_.RealPoint_y_set)
786 def __init__(self, *args, **kwargs):
787 """
788 __init__(self, double x=0.0, double y=0.0) -> RealPoint
789
790 Create a wx.RealPoint object
791 """
792 newobj = _core_.new_RealPoint(*args, **kwargs)
793 self.this = newobj.this
794 self.thisown = 1
795 del newobj.thisown
796 def __del__(self, destroy=_core_.delete_RealPoint):
797 """__del__(self)"""
798 try:
799 if self.thisown: destroy(self)
800 except: pass
801
802 def __eq__(*args, **kwargs):
803 """
804 __eq__(self, RealPoint pt) -> bool
805
806 Test for equality of wx.RealPoint objects.
807 """
808 return _core_.RealPoint___eq__(*args, **kwargs)
809
810 def __ne__(*args, **kwargs):
811 """
812 __ne__(self, RealPoint pt) -> bool
813
814 Test for inequality of wx.RealPoint objects.
815 """
816 return _core_.RealPoint___ne__(*args, **kwargs)
817
818 def __add__(*args, **kwargs):
819 """
820 __add__(self, RealPoint pt) -> RealPoint
821
822 Add pt's proprties to this and return the result.
823 """
824 return _core_.RealPoint___add__(*args, **kwargs)
825
826 def __sub__(*args, **kwargs):
827 """
828 __sub__(self, RealPoint pt) -> RealPoint
829
830 Subtract pt's proprties from this and return the result
831 """
832 return _core_.RealPoint___sub__(*args, **kwargs)
833
834 def Set(*args, **kwargs):
835 """
836 Set(self, double x, double y)
837
838 Set both the x and y properties
839 """
840 return _core_.RealPoint_Set(*args, **kwargs)
841
842 def Get(*args, **kwargs):
843 """
844 Get() -> (x,y)
845
846 Return the x and y properties as a tuple.
847 """
848 return _core_.RealPoint_Get(*args, **kwargs)
849
850 asTuple = Get
851 def __str__(self): return str(self.Get())
852 def __repr__(self): return 'wx.RealPoint'+str(self.Get())
853 def __len__(self): return len(self.Get())
854 def __getitem__(self, index): return self.Get()[index]
855 def __setitem__(self, index, val):
856 if index == 0: self.x = val
857 elif index == 1: self.y = val
858 else: raise IndexError
859 def __nonzero__(self): return self.Get() != (0.0, 0.0)
860 __safe_for_unpickling__ = True
861 def __reduce__(self): return (wx.RealPoint, self.Get())
862
863
864 class RealPointPtr(RealPoint):
865 def __init__(self, this):
866 self.this = this
867 if not hasattr(self,"thisown"): self.thisown = 0
868 self.__class__ = RealPoint
869 _core_.RealPoint_swigregister(RealPointPtr)
870
871 #---------------------------------------------------------------------------
872
873 class Point(object):
874 """
875 A data structure for representing a point or position with integer x and y
876 properties. Most places in wxPython that expect a wx.Point can also accept a
877 (x,y) tuple.
878 """
879 def __repr__(self):
880 return "<%s.%s; proxy of C++ wxPoint instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
881 x = property(_core_.Point_x_get, _core_.Point_x_set)
882 y = property(_core_.Point_y_get, _core_.Point_y_set)
883 def __init__(self, *args, **kwargs):
884 """
885 __init__(self, int x=0, int y=0) -> Point
886
887 Create a wx.Point object
888 """
889 newobj = _core_.new_Point(*args, **kwargs)
890 self.this = newobj.this
891 self.thisown = 1
892 del newobj.thisown
893 def __del__(self, destroy=_core_.delete_Point):
894 """__del__(self)"""
895 try:
896 if self.thisown: destroy(self)
897 except: pass
898
899 def __eq__(*args, **kwargs):
900 """
901 __eq__(self, Point pt) -> bool
902
903 Test for equality of wx.Point objects.
904 """
905 return _core_.Point___eq__(*args, **kwargs)
906
907 def __ne__(*args, **kwargs):
908 """
909 __ne__(self, Point pt) -> bool
910
911 Test for inequality of wx.Point objects.
912 """
913 return _core_.Point___ne__(*args, **kwargs)
914
915 def __add__(*args, **kwargs):
916 """
917 __add__(self, Point pt) -> Point
918
919 Add pt's proprties to this and return the result.
920 """
921 return _core_.Point___add__(*args, **kwargs)
922
923 def __sub__(*args, **kwargs):
924 """
925 __sub__(self, Point pt) -> Point
926
927 Subtract pt's proprties from this and return the result
928 """
929 return _core_.Point___sub__(*args, **kwargs)
930
931 def __iadd__(*args, **kwargs):
932 """
933 __iadd__(self, Point pt) -> Point
934
935 Add pt to this object.
936 """
937 return _core_.Point___iadd__(*args, **kwargs)
938
939 def __isub__(*args, **kwargs):
940 """
941 __isub__(self, Point pt) -> Point
942
943 Subtract pt from this object.
944 """
945 return _core_.Point___isub__(*args, **kwargs)
946
947 def Set(*args, **kwargs):
948 """
949 Set(self, long x, long y)
950
951 Set both the x and y properties
952 """
953 return _core_.Point_Set(*args, **kwargs)
954
955 def Get(*args, **kwargs):
956 """
957 Get() -> (x,y)
958
959 Return the x and y properties as a tuple.
960 """
961 return _core_.Point_Get(*args, **kwargs)
962
963 asTuple = Get
964 def __str__(self): return str(self.Get())
965 def __repr__(self): return 'wx.Point'+str(self.Get())
966 def __len__(self): return len(self.Get())
967 def __getitem__(self, index): return self.Get()[index]
968 def __setitem__(self, index, val):
969 if index == 0: self.x = val
970 elif index == 1: self.y = val
971 else: raise IndexError
972 def __nonzero__(self): return self.Get() != (0,0)
973 __safe_for_unpickling__ = True
974 def __reduce__(self): return (wx.Point, self.Get())
975
976
977 class PointPtr(Point):
978 def __init__(self, this):
979 self.this = this
980 if not hasattr(self,"thisown"): self.thisown = 0
981 self.__class__ = Point
982 _core_.Point_swigregister(PointPtr)
983
984 #---------------------------------------------------------------------------
985
986 class Rect(object):
987 """
988 A class for representing and manipulating rectangles. It has x, y, width and
989 height properties. In wxPython most palces that expect a wx.Rect can also
990 accept a (x,y,width,height) tuple.
991 """
992 def __repr__(self):
993 return "<%s.%s; proxy of C++ wxRect instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
994 def __init__(self, *args, **kwargs):
995 """
996 __init__(self, int x=0, int y=0, int width=0, int height=0) -> Rect
997
998 Create a new Rect object.
999 """
1000 newobj = _core_.new_Rect(*args, **kwargs)
1001 self.this = newobj.this
1002 self.thisown = 1
1003 del newobj.thisown
1004 def __del__(self, destroy=_core_.delete_Rect):
1005 """__del__(self)"""
1006 try:
1007 if self.thisown: destroy(self)
1008 except: pass
1009
1010 def GetX(*args, **kwargs):
1011 """GetX(self) -> int"""
1012 return _core_.Rect_GetX(*args, **kwargs)
1013
1014 def SetX(*args, **kwargs):
1015 """SetX(self, int x)"""
1016 return _core_.Rect_SetX(*args, **kwargs)
1017
1018 def GetY(*args, **kwargs):
1019 """GetY(self) -> int"""
1020 return _core_.Rect_GetY(*args, **kwargs)
1021
1022 def SetY(*args, **kwargs):
1023 """SetY(self, int y)"""
1024 return _core_.Rect_SetY(*args, **kwargs)
1025
1026 def GetWidth(*args, **kwargs):
1027 """GetWidth(self) -> int"""
1028 return _core_.Rect_GetWidth(*args, **kwargs)
1029
1030 def SetWidth(*args, **kwargs):
1031 """SetWidth(self, int w)"""
1032 return _core_.Rect_SetWidth(*args, **kwargs)
1033
1034 def GetHeight(*args, **kwargs):
1035 """GetHeight(self) -> int"""
1036 return _core_.Rect_GetHeight(*args, **kwargs)
1037
1038 def SetHeight(*args, **kwargs):
1039 """SetHeight(self, int h)"""
1040 return _core_.Rect_SetHeight(*args, **kwargs)
1041
1042 def GetPosition(*args, **kwargs):
1043 """GetPosition(self) -> Point"""
1044 return _core_.Rect_GetPosition(*args, **kwargs)
1045
1046 def SetPosition(*args, **kwargs):
1047 """SetPosition(self, Point p)"""
1048 return _core_.Rect_SetPosition(*args, **kwargs)
1049
1050 def GetSize(*args, **kwargs):
1051 """GetSize(self) -> Size"""
1052 return _core_.Rect_GetSize(*args, **kwargs)
1053
1054 def SetSize(*args, **kwargs):
1055 """SetSize(self, Size s)"""
1056 return _core_.Rect_SetSize(*args, **kwargs)
1057
1058 def GetTopLeft(*args, **kwargs):
1059 """GetTopLeft(self) -> Point"""
1060 return _core_.Rect_GetTopLeft(*args, **kwargs)
1061
1062 def SetTopLeft(*args, **kwargs):
1063 """SetTopLeft(self, Point p)"""
1064 return _core_.Rect_SetTopLeft(*args, **kwargs)
1065
1066 def GetBottomRight(*args, **kwargs):
1067 """GetBottomRight(self) -> Point"""
1068 return _core_.Rect_GetBottomRight(*args, **kwargs)
1069
1070 def SetBottomRight(*args, **kwargs):
1071 """SetBottomRight(self, Point p)"""
1072 return _core_.Rect_SetBottomRight(*args, **kwargs)
1073
1074 def GetLeft(*args, **kwargs):
1075 """GetLeft(self) -> int"""
1076 return _core_.Rect_GetLeft(*args, **kwargs)
1077
1078 def GetTop(*args, **kwargs):
1079 """GetTop(self) -> int"""
1080 return _core_.Rect_GetTop(*args, **kwargs)
1081
1082 def GetBottom(*args, **kwargs):
1083 """GetBottom(self) -> int"""
1084 return _core_.Rect_GetBottom(*args, **kwargs)
1085
1086 def GetRight(*args, **kwargs):
1087 """GetRight(self) -> int"""
1088 return _core_.Rect_GetRight(*args, **kwargs)
1089
1090 def SetLeft(*args, **kwargs):
1091 """SetLeft(self, int left)"""
1092 return _core_.Rect_SetLeft(*args, **kwargs)
1093
1094 def SetRight(*args, **kwargs):
1095 """SetRight(self, int right)"""
1096 return _core_.Rect_SetRight(*args, **kwargs)
1097
1098 def SetTop(*args, **kwargs):
1099 """SetTop(self, int top)"""
1100 return _core_.Rect_SetTop(*args, **kwargs)
1101
1102 def SetBottom(*args, **kwargs):
1103 """SetBottom(self, int bottom)"""
1104 return _core_.Rect_SetBottom(*args, **kwargs)
1105
1106 position = property(GetPosition, SetPosition)
1107 size = property(GetSize, SetSize)
1108 left = property(GetLeft, SetLeft)
1109 right = property(GetRight, SetRight)
1110 top = property(GetTop, SetTop)
1111 bottom = property(GetBottom, SetBottom)
1112
1113 def Inflate(*args, **kwargs):
1114 """
1115 Inflate(self, int dx, int dy) -> Rect
1116
1117 Increase the rectangle size by dx in x direction and dy in y direction. Both
1118 (or one of) parameters may be negative to decrease the rectangle size.
1119 """
1120 return _core_.Rect_Inflate(*args, **kwargs)
1121
1122 def Deflate(*args, **kwargs):
1123 """
1124 Deflate(self, int dx, int dy) -> Rect
1125
1126 Decrease the rectangle size by dx in x direction and dy in y direction. Both
1127 (or one of) parameters may be negative to increase the rectngle size. This
1128 method is the opposite of Inflate.
1129 """
1130 return _core_.Rect_Deflate(*args, **kwargs)
1131
1132 def OffsetXY(*args, **kwargs):
1133 """
1134 OffsetXY(self, int dx, int dy)
1135
1136 Moves the rectangle by the specified offset. If dx is positive, the rectangle
1137 is moved to the right, if dy is positive, it is moved to the bottom, otherwise
1138 it is moved to the left or top respectively.
1139 """
1140 return _core_.Rect_OffsetXY(*args, **kwargs)
1141
1142 def Offset(*args, **kwargs):
1143 """
1144 Offset(self, Point pt)
1145
1146 Same as OffsetXY but uses dx,dy from Point
1147 """
1148 return _core_.Rect_Offset(*args, **kwargs)
1149
1150 def Intersect(*args, **kwargs):
1151 """
1152 Intersect(self, Rect rect) -> Rect
1153
1154 Return the intersectsion of this rectangle and rect.
1155 """
1156 return _core_.Rect_Intersect(*args, **kwargs)
1157
1158 def __add__(*args, **kwargs):
1159 """
1160 __add__(self, Rect rect) -> Rect
1161
1162 Add the properties of rect to this rectangle and return the result.
1163 """
1164 return _core_.Rect___add__(*args, **kwargs)
1165
1166 def __iadd__(*args, **kwargs):
1167 """
1168 __iadd__(self, Rect rect) -> Rect
1169
1170 Add the properties of rect to this rectangle, updating this rectangle.
1171 """
1172 return _core_.Rect___iadd__(*args, **kwargs)
1173
1174 def __eq__(*args, **kwargs):
1175 """
1176 __eq__(self, Rect rect) -> bool
1177
1178 Test for equality.
1179 """
1180 return _core_.Rect___eq__(*args, **kwargs)
1181
1182 def __ne__(*args, **kwargs):
1183 """
1184 __ne__(self, Rect rect) -> bool
1185
1186 Test for inequality.
1187 """
1188 return _core_.Rect___ne__(*args, **kwargs)
1189
1190 def InsideXY(*args, **kwargs):
1191 """
1192 InsideXY(self, int x, int y) -> bool
1193
1194 Return True if the point is (not strcitly) inside the rect.
1195 """
1196 return _core_.Rect_InsideXY(*args, **kwargs)
1197
1198 def Inside(*args, **kwargs):
1199 """
1200 Inside(self, Point pt) -> bool
1201
1202 Return True if the point is (not strcitly) inside the rect.
1203 """
1204 return _core_.Rect_Inside(*args, **kwargs)
1205
1206 def Intersects(*args, **kwargs):
1207 """
1208 Intersects(self, Rect rect) -> bool
1209
1210 Returns True if the rectangles have a non empty intersection.
1211 """
1212 return _core_.Rect_Intersects(*args, **kwargs)
1213
1214 x = property(_core_.Rect_x_get, _core_.Rect_x_set)
1215 y = property(_core_.Rect_y_get, _core_.Rect_y_set)
1216 width = property(_core_.Rect_width_get, _core_.Rect_width_set)
1217 height = property(_core_.Rect_height_get, _core_.Rect_height_set)
1218 def Set(*args, **kwargs):
1219 """
1220 Set(self, int x=0, int y=0, int width=0, int height=0)
1221
1222 Set all rectangle properties.
1223 """
1224 return _core_.Rect_Set(*args, **kwargs)
1225
1226 def Get(*args, **kwargs):
1227 """
1228 Get() -> (x,y,width,height)
1229
1230 Return the rectangle properties as a tuple.
1231 """
1232 return _core_.Rect_Get(*args, **kwargs)
1233
1234 asTuple = Get
1235 def __str__(self): return str(self.Get())
1236 def __repr__(self): return 'wx.Rect'+str(self.Get())
1237 def __len__(self): return len(self.Get())
1238 def __getitem__(self, index): return self.Get()[index]
1239 def __setitem__(self, index, val):
1240 if index == 0: self.x = val
1241 elif index == 1: self.y = val
1242 elif index == 2: self.width = val
1243 elif index == 3: self.height = val
1244 else: raise IndexError
1245 def __nonzero__(self): return self.Get() != (0,0,0,0)
1246 __safe_for_unpickling__ = True
1247 def __reduce__(self): return (wx.Rect, self.Get())
1248
1249
1250 class RectPtr(Rect):
1251 def __init__(self, this):
1252 self.this = this
1253 if not hasattr(self,"thisown"): self.thisown = 0
1254 self.__class__ = Rect
1255 _core_.Rect_swigregister(RectPtr)
1256
1257 def RectPP(*args, **kwargs):
1258 """
1259 RectPP(Point topLeft, Point bottomRight) -> Rect
1260
1261 Create a new Rect object from Points representing two corners.
1262 """
1263 val = _core_.new_RectPP(*args, **kwargs)
1264 val.thisown = 1
1265 return val
1266
1267 def RectPS(*args, **kwargs):
1268 """
1269 RectPS(Point pos, Size size) -> Rect
1270
1271 Create a new Rect from a position and size.
1272 """
1273 val = _core_.new_RectPS(*args, **kwargs)
1274 val.thisown = 1
1275 return val
1276
1277
1278 def IntersectRect(*args, **kwargs):
1279 """
1280 IntersectRect(Rect r1, Rect r2) -> Rect
1281
1282 Calculate and return the intersection of r1 and r2.
1283 """
1284 return _core_.IntersectRect(*args, **kwargs)
1285 #---------------------------------------------------------------------------
1286
1287 class Point2D(object):
1288 """wx.Point2Ds represent a point or a vector in a 2d coordinate system with floating point values."""
1289 def __repr__(self):
1290 return "<%s.%s; proxy of C++ wxPoint2D instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
1291 def __init__(self, *args, **kwargs):
1292 """
1293 __init__(self, double x=0.0, double y=0.0) -> Point2D
1294
1295 Create a w.Point2D object.
1296 """
1297 newobj = _core_.new_Point2D(*args, **kwargs)
1298 self.this = newobj.this
1299 self.thisown = 1
1300 del newobj.thisown
1301 def GetFloor(*args, **kwargs):
1302 """
1303 GetFloor() -> (x,y)
1304
1305 Convert to integer
1306 """
1307 return _core_.Point2D_GetFloor(*args, **kwargs)
1308
1309 def GetRounded(*args, **kwargs):
1310 """
1311 GetRounded() -> (x,y)
1312
1313 Convert to integer
1314 """
1315 return _core_.Point2D_GetRounded(*args, **kwargs)
1316
1317 def GetVectorLength(*args, **kwargs):
1318 """GetVectorLength(self) -> double"""
1319 return _core_.Point2D_GetVectorLength(*args, **kwargs)
1320
1321 def GetVectorAngle(*args, **kwargs):
1322 """GetVectorAngle(self) -> double"""
1323 return _core_.Point2D_GetVectorAngle(*args, **kwargs)
1324
1325 def SetVectorLength(*args, **kwargs):
1326 """SetVectorLength(self, double length)"""
1327 return _core_.Point2D_SetVectorLength(*args, **kwargs)
1328
1329 def SetVectorAngle(*args, **kwargs):
1330 """SetVectorAngle(self, double degrees)"""
1331 return _core_.Point2D_SetVectorAngle(*args, **kwargs)
1332
1333 def SetPolarCoordinates(self, angle, length):
1334 self.SetVectorLength(length)
1335 self.SetVectorAngle(angle)
1336 def Normalize(self):
1337 self.SetVectorLength(1.0)
1338
1339 def GetDistance(*args, **kwargs):
1340 """GetDistance(self, Point2D pt) -> double"""
1341 return _core_.Point2D_GetDistance(*args, **kwargs)
1342
1343 def GetDistanceSquare(*args, **kwargs):
1344 """GetDistanceSquare(self, Point2D pt) -> double"""
1345 return _core_.Point2D_GetDistanceSquare(*args, **kwargs)
1346
1347 def GetDotProduct(*args, **kwargs):
1348 """GetDotProduct(self, Point2D vec) -> double"""
1349 return _core_.Point2D_GetDotProduct(*args, **kwargs)
1350
1351 def GetCrossProduct(*args, **kwargs):
1352 """GetCrossProduct(self, Point2D vec) -> double"""
1353 return _core_.Point2D_GetCrossProduct(*args, **kwargs)
1354
1355 def __neg__(*args, **kwargs):
1356 """
1357 __neg__(self) -> Point2D
1358
1359 the reflection of this point
1360 """
1361 return _core_.Point2D___neg__(*args, **kwargs)
1362
1363 def __iadd__(*args, **kwargs):
1364 """__iadd__(self, Point2D pt) -> Point2D"""
1365 return _core_.Point2D___iadd__(*args, **kwargs)
1366
1367 def __isub__(*args, **kwargs):
1368 """__isub__(self, Point2D pt) -> Point2D"""
1369 return _core_.Point2D___isub__(*args, **kwargs)
1370
1371 def __imul__(*args, **kwargs):
1372 """__imul__(self, Point2D pt) -> Point2D"""
1373 return _core_.Point2D___imul__(*args, **kwargs)
1374
1375 def __idiv__(*args, **kwargs):
1376 """__idiv__(self, Point2D pt) -> Point2D"""
1377 return _core_.Point2D___idiv__(*args, **kwargs)
1378
1379 def __eq__(*args, **kwargs):
1380 """
1381 __eq__(self, Point2D pt) -> bool
1382
1383 Test for equality
1384 """
1385 return _core_.Point2D___eq__(*args, **kwargs)
1386
1387 def __ne__(*args, **kwargs):
1388 """
1389 __ne__(self, Point2D pt) -> bool
1390
1391 Test for inequality
1392 """
1393 return _core_.Point2D___ne__(*args, **kwargs)
1394
1395 x = property(_core_.Point2D_x_get, _core_.Point2D_x_set)
1396 y = property(_core_.Point2D_y_get, _core_.Point2D_y_set)
1397 def Set(*args, **kwargs):
1398 """Set(self, double x=0, double y=0)"""
1399 return _core_.Point2D_Set(*args, **kwargs)
1400
1401 def Get(*args, **kwargs):
1402 """
1403 Get() -> (x,y)
1404
1405 Return x and y properties as a tuple.
1406 """
1407 return _core_.Point2D_Get(*args, **kwargs)
1408
1409 asTuple = Get
1410 def __str__(self): return str(self.Get())
1411 def __repr__(self): return 'wx.Point2D'+str(self.Get())
1412 def __len__(self): return len(self.Get())
1413 def __getitem__(self, index): return self.Get()[index]
1414 def __setitem__(self, index, val):
1415 if index == 0: self.x = val
1416 elif index == 1: self.y = val
1417 else: raise IndexError
1418 def __nonzero__(self): return self.Get() != (0.0, 0.0)
1419 __safe_for_unpickling__ = True
1420 def __reduce__(self): return (wx.Point2D, self.Get())
1421
1422
1423 class Point2DPtr(Point2D):
1424 def __init__(self, this):
1425 self.this = this
1426 if not hasattr(self,"thisown"): self.thisown = 0
1427 self.__class__ = Point2D
1428 _core_.Point2D_swigregister(Point2DPtr)
1429
1430 def Point2DCopy(*args, **kwargs):
1431 """
1432 Point2DCopy(Point2D pt) -> Point2D
1433
1434 Create a w.Point2D object.
1435 """
1436 val = _core_.new_Point2DCopy(*args, **kwargs)
1437 val.thisown = 1
1438 return val
1439
1440 def Point2DFromPoint(*args, **kwargs):
1441 """
1442 Point2DFromPoint(Point pt) -> Point2D
1443
1444 Create a w.Point2D object.
1445 """
1446 val = _core_.new_Point2DFromPoint(*args, **kwargs)
1447 val.thisown = 1
1448 return val
1449
1450 #---------------------------------------------------------------------------
1451
1452 FromStart = _core_.FromStart
1453 FromCurrent = _core_.FromCurrent
1454 FromEnd = _core_.FromEnd
1455 class InputStream(object):
1456 def __repr__(self):
1457 return "<%s.%s; proxy of C++ wxPyInputStream instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
1458 def __init__(self, *args, **kwargs):
1459 """__init__(self, PyObject p) -> InputStream"""
1460 newobj = _core_.new_InputStream(*args, **kwargs)
1461 self.this = newobj.this
1462 self.thisown = 1
1463 del newobj.thisown
1464 def close(*args, **kwargs):
1465 """close(self)"""
1466 return _core_.InputStream_close(*args, **kwargs)
1467
1468 def flush(*args, **kwargs):
1469 """flush(self)"""
1470 return _core_.InputStream_flush(*args, **kwargs)
1471
1472 def eof(*args, **kwargs):
1473 """eof(self) -> bool"""
1474 return _core_.InputStream_eof(*args, **kwargs)
1475
1476 def read(*args, **kwargs):
1477 """read(self, int size=-1) -> PyObject"""
1478 return _core_.InputStream_read(*args, **kwargs)
1479
1480 def readline(*args, **kwargs):
1481 """readline(self, int size=-1) -> PyObject"""
1482 return _core_.InputStream_readline(*args, **kwargs)
1483
1484 def readlines(*args, **kwargs):
1485 """readlines(self, int sizehint=-1) -> PyObject"""
1486 return _core_.InputStream_readlines(*args, **kwargs)
1487
1488 def seek(*args, **kwargs):
1489 """seek(self, int offset, int whence=0)"""
1490 return _core_.InputStream_seek(*args, **kwargs)
1491
1492 def tell(*args, **kwargs):
1493 """tell(self) -> int"""
1494 return _core_.InputStream_tell(*args, **kwargs)
1495
1496 def Peek(*args, **kwargs):
1497 """Peek(self) -> char"""
1498 return _core_.InputStream_Peek(*args, **kwargs)
1499
1500 def GetC(*args, **kwargs):
1501 """GetC(self) -> char"""
1502 return _core_.InputStream_GetC(*args, **kwargs)
1503
1504 def LastRead(*args, **kwargs):
1505 """LastRead(self) -> size_t"""
1506 return _core_.InputStream_LastRead(*args, **kwargs)
1507
1508 def CanRead(*args, **kwargs):
1509 """CanRead(self) -> bool"""
1510 return _core_.InputStream_CanRead(*args, **kwargs)
1511
1512 def Eof(*args, **kwargs):
1513 """Eof(self) -> bool"""
1514 return _core_.InputStream_Eof(*args, **kwargs)
1515
1516 def Ungetch(*args, **kwargs):
1517 """Ungetch(self, char c) -> bool"""
1518 return _core_.InputStream_Ungetch(*args, **kwargs)
1519
1520 def SeekI(*args, **kwargs):
1521 """SeekI(self, long pos, int mode=FromStart) -> long"""
1522 return _core_.InputStream_SeekI(*args, **kwargs)
1523
1524 def TellI(*args, **kwargs):
1525 """TellI(self) -> long"""
1526 return _core_.InputStream_TellI(*args, **kwargs)
1527
1528
1529 class InputStreamPtr(InputStream):
1530 def __init__(self, this):
1531 self.this = this
1532 if not hasattr(self,"thisown"): self.thisown = 0
1533 self.__class__ = InputStream
1534 _core_.InputStream_swigregister(InputStreamPtr)
1535 DefaultPosition = cvar.DefaultPosition
1536 DefaultSize = cvar.DefaultSize
1537
1538 class OutputStream(object):
1539 def __init__(self): raise RuntimeError, "No constructor defined"
1540 def __repr__(self):
1541 return "<%s.%s; proxy of C++ wxOutputStream instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
1542 def write(*args, **kwargs):
1543 """write(self, PyObject obj)"""
1544 return _core_.OutputStream_write(*args, **kwargs)
1545
1546
1547 class OutputStreamPtr(OutputStream):
1548 def __init__(self, this):
1549 self.this = this
1550 if not hasattr(self,"thisown"): self.thisown = 0
1551 self.__class__ = OutputStream
1552 _core_.OutputStream_swigregister(OutputStreamPtr)
1553
1554 #---------------------------------------------------------------------------
1555
1556 class FSFile(Object):
1557 def __repr__(self):
1558 return "<%s.%s; proxy of C++ wxFSFile instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
1559 def __init__(self, *args, **kwargs):
1560 """
1561 __init__(self, InputStream stream, String loc, String mimetype, String anchor,
1562 DateTime modif) -> FSFile
1563 """
1564 newobj = _core_.new_FSFile(*args, **kwargs)
1565 self.this = newobj.this
1566 self.thisown = 1
1567 del newobj.thisown
1568 def __del__(self, destroy=_core_.delete_FSFile):
1569 """__del__(self)"""
1570 try:
1571 if self.thisown: destroy(self)
1572 except: pass
1573
1574 def GetStream(*args, **kwargs):
1575 """GetStream(self) -> InputStream"""
1576 return _core_.FSFile_GetStream(*args, **kwargs)
1577
1578 def GetMimeType(*args, **kwargs):
1579 """GetMimeType(self) -> String"""
1580 return _core_.FSFile_GetMimeType(*args, **kwargs)
1581
1582 def GetLocation(*args, **kwargs):
1583 """GetLocation(self) -> String"""
1584 return _core_.FSFile_GetLocation(*args, **kwargs)
1585
1586 def GetAnchor(*args, **kwargs):
1587 """GetAnchor(self) -> String"""
1588 return _core_.FSFile_GetAnchor(*args, **kwargs)
1589
1590 def GetModificationTime(*args, **kwargs):
1591 """GetModificationTime(self) -> DateTime"""
1592 return _core_.FSFile_GetModificationTime(*args, **kwargs)
1593
1594
1595 class FSFilePtr(FSFile):
1596 def __init__(self, this):
1597 self.this = this
1598 if not hasattr(self,"thisown"): self.thisown = 0
1599 self.__class__ = FSFile
1600 _core_.FSFile_swigregister(FSFilePtr)
1601
1602 class CPPFileSystemHandler(object):
1603 def __init__(self): raise RuntimeError, "No constructor defined"
1604 def __repr__(self):
1605 return "<%s.%s; proxy of C++ wxFileSystemHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
1606
1607 class CPPFileSystemHandlerPtr(CPPFileSystemHandler):
1608 def __init__(self, this):
1609 self.this = this
1610 if not hasattr(self,"thisown"): self.thisown = 0
1611 self.__class__ = CPPFileSystemHandler
1612 _core_.CPPFileSystemHandler_swigregister(CPPFileSystemHandlerPtr)
1613
1614 class FileSystemHandler(CPPFileSystemHandler):
1615 def __repr__(self):
1616 return "<%s.%s; proxy of C++ wxPyFileSystemHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
1617 def __init__(self, *args, **kwargs):
1618 """__init__(self) -> FileSystemHandler"""
1619 newobj = _core_.new_FileSystemHandler(*args, **kwargs)
1620 self.this = newobj.this
1621 self.thisown = 1
1622 del newobj.thisown
1623 self._setCallbackInfo(self, FileSystemHandler)
1624
1625 def _setCallbackInfo(*args, **kwargs):
1626 """_setCallbackInfo(self, PyObject self, PyObject _class)"""
1627 return _core_.FileSystemHandler__setCallbackInfo(*args, **kwargs)
1628
1629 def CanOpen(*args, **kwargs):
1630 """CanOpen(self, String location) -> bool"""
1631 return _core_.FileSystemHandler_CanOpen(*args, **kwargs)
1632
1633 def OpenFile(*args, **kwargs):
1634 """OpenFile(self, FileSystem fs, String location) -> FSFile"""
1635 return _core_.FileSystemHandler_OpenFile(*args, **kwargs)
1636
1637 def FindFirst(*args, **kwargs):
1638 """FindFirst(self, String spec, int flags=0) -> String"""
1639 return _core_.FileSystemHandler_FindFirst(*args, **kwargs)
1640
1641 def FindNext(*args, **kwargs):
1642 """FindNext(self) -> String"""
1643 return _core_.FileSystemHandler_FindNext(*args, **kwargs)
1644
1645 def GetProtocol(*args, **kwargs):
1646 """GetProtocol(self, String location) -> String"""
1647 return _core_.FileSystemHandler_GetProtocol(*args, **kwargs)
1648
1649 def GetLeftLocation(*args, **kwargs):
1650 """GetLeftLocation(self, String location) -> String"""
1651 return _core_.FileSystemHandler_GetLeftLocation(*args, **kwargs)
1652
1653 def GetAnchor(*args, **kwargs):
1654 """GetAnchor(self, String location) -> String"""
1655 return _core_.FileSystemHandler_GetAnchor(*args, **kwargs)
1656
1657 def GetRightLocation(*args, **kwargs):
1658 """GetRightLocation(self, String location) -> String"""
1659 return _core_.FileSystemHandler_GetRightLocation(*args, **kwargs)
1660
1661 def GetMimeTypeFromExt(*args, **kwargs):
1662 """GetMimeTypeFromExt(self, String location) -> String"""
1663 return _core_.FileSystemHandler_GetMimeTypeFromExt(*args, **kwargs)
1664
1665
1666 class FileSystemHandlerPtr(FileSystemHandler):
1667 def __init__(self, this):
1668 self.this = this
1669 if not hasattr(self,"thisown"): self.thisown = 0
1670 self.__class__ = FileSystemHandler
1671 _core_.FileSystemHandler_swigregister(FileSystemHandlerPtr)
1672
1673 class FileSystem(Object):
1674 def __repr__(self):
1675 return "<%s.%s; proxy of C++ wxFileSystem instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
1676 def __init__(self, *args, **kwargs):
1677 """__init__(self) -> FileSystem"""
1678 newobj = _core_.new_FileSystem(*args, **kwargs)
1679 self.this = newobj.this
1680 self.thisown = 1
1681 del newobj.thisown
1682 def __del__(self, destroy=_core_.delete_FileSystem):
1683 """__del__(self)"""
1684 try:
1685 if self.thisown: destroy(self)
1686 except: pass
1687
1688 def ChangePathTo(*args, **kwargs):
1689 """ChangePathTo(self, String location, bool is_dir=False)"""
1690 return _core_.FileSystem_ChangePathTo(*args, **kwargs)
1691
1692 def GetPath(*args, **kwargs):
1693 """GetPath(self) -> String"""
1694 return _core_.FileSystem_GetPath(*args, **kwargs)
1695
1696 def OpenFile(*args, **kwargs):
1697 """OpenFile(self, String location) -> FSFile"""
1698 return _core_.FileSystem_OpenFile(*args, **kwargs)
1699
1700 def FindFirst(*args, **kwargs):
1701 """FindFirst(self, String spec, int flags=0) -> String"""
1702 return _core_.FileSystem_FindFirst(*args, **kwargs)
1703
1704 def FindNext(*args, **kwargs):
1705 """FindNext(self) -> String"""
1706 return _core_.FileSystem_FindNext(*args, **kwargs)
1707
1708 def AddHandler(*args, **kwargs):
1709 """FileSystem.AddHandler(CPPFileSystemHandler handler)"""
1710 return _core_.FileSystem_AddHandler(*args, **kwargs)
1711
1712 AddHandler = staticmethod(AddHandler)
1713 def CleanUpHandlers(*args, **kwargs):
1714 """FileSystem.CleanUpHandlers()"""
1715 return _core_.FileSystem_CleanUpHandlers(*args, **kwargs)
1716
1717 CleanUpHandlers = staticmethod(CleanUpHandlers)
1718 def FileNameToURL(*args, **kwargs):
1719 """FileSystem.FileNameToURL(String filename) -> String"""
1720 return _core_.FileSystem_FileNameToURL(*args, **kwargs)
1721
1722 FileNameToURL = staticmethod(FileNameToURL)
1723
1724 class FileSystemPtr(FileSystem):
1725 def __init__(self, this):
1726 self.this = this
1727 if not hasattr(self,"thisown"): self.thisown = 0
1728 self.__class__ = FileSystem
1729 _core_.FileSystem_swigregister(FileSystemPtr)
1730
1731 def FileSystem_AddHandler(*args, **kwargs):
1732 """FileSystem_AddHandler(CPPFileSystemHandler handler)"""
1733 return _core_.FileSystem_AddHandler(*args, **kwargs)
1734
1735 def FileSystem_CleanUpHandlers(*args, **kwargs):
1736 """FileSystem_CleanUpHandlers()"""
1737 return _core_.FileSystem_CleanUpHandlers(*args, **kwargs)
1738
1739 def FileSystem_FileNameToURL(*args, **kwargs):
1740 """FileSystem_FileNameToURL(String filename) -> String"""
1741 return _core_.FileSystem_FileNameToURL(*args, **kwargs)
1742
1743
1744 def FileSystem_URLToFileName(*args, **kwargs):
1745 """FileSystem_URLToFileName(String url) -> String"""
1746 return _core_.FileSystem_URLToFileName(*args, **kwargs)
1747 class InternetFSHandler(CPPFileSystemHandler):
1748 def __repr__(self):
1749 return "<%s.%s; proxy of C++ wxInternetFSHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
1750 def __init__(self, *args, **kwargs):
1751 """__init__(self) -> InternetFSHandler"""
1752 newobj = _core_.new_InternetFSHandler(*args, **kwargs)
1753 self.this = newobj.this
1754 self.thisown = 1
1755 del newobj.thisown
1756 def CanOpen(*args, **kwargs):
1757 """CanOpen(self, String location) -> bool"""
1758 return _core_.InternetFSHandler_CanOpen(*args, **kwargs)
1759
1760 def OpenFile(*args, **kwargs):
1761 """OpenFile(self, FileSystem fs, String location) -> FSFile"""
1762 return _core_.InternetFSHandler_OpenFile(*args, **kwargs)
1763
1764
1765 class InternetFSHandlerPtr(InternetFSHandler):
1766 def __init__(self, this):
1767 self.this = this
1768 if not hasattr(self,"thisown"): self.thisown = 0
1769 self.__class__ = InternetFSHandler
1770 _core_.InternetFSHandler_swigregister(InternetFSHandlerPtr)
1771
1772 class ZipFSHandler(CPPFileSystemHandler):
1773 def __repr__(self):
1774 return "<%s.%s; proxy of C++ wxZipFSHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
1775 def __init__(self, *args, **kwargs):
1776 """__init__(self) -> ZipFSHandler"""
1777 newobj = _core_.new_ZipFSHandler(*args, **kwargs)
1778 self.this = newobj.this
1779 self.thisown = 1
1780 del newobj.thisown
1781 def CanOpen(*args, **kwargs):
1782 """CanOpen(self, String location) -> bool"""
1783 return _core_.ZipFSHandler_CanOpen(*args, **kwargs)
1784
1785 def OpenFile(*args, **kwargs):
1786 """OpenFile(self, FileSystem fs, String location) -> FSFile"""
1787 return _core_.ZipFSHandler_OpenFile(*args, **kwargs)
1788
1789 def FindFirst(*args, **kwargs):
1790 """FindFirst(self, String spec, int flags=0) -> String"""
1791 return _core_.ZipFSHandler_FindFirst(*args, **kwargs)
1792
1793 def FindNext(*args, **kwargs):
1794 """FindNext(self) -> String"""
1795 return _core_.ZipFSHandler_FindNext(*args, **kwargs)
1796
1797
1798 class ZipFSHandlerPtr(ZipFSHandler):
1799 def __init__(self, this):
1800 self.this = this
1801 if not hasattr(self,"thisown"): self.thisown = 0
1802 self.__class__ = ZipFSHandler
1803 _core_.ZipFSHandler_swigregister(ZipFSHandlerPtr)
1804
1805
1806 def __wxMemoryFSHandler_AddFile_wxImage(*args, **kwargs):
1807 """__wxMemoryFSHandler_AddFile_wxImage(String filename, Image image, long type)"""
1808 return _core_.__wxMemoryFSHandler_AddFile_wxImage(*args, **kwargs)
1809
1810 def __wxMemoryFSHandler_AddFile_wxBitmap(*args, **kwargs):
1811 """__wxMemoryFSHandler_AddFile_wxBitmap(String filename, Bitmap bitmap, long type)"""
1812 return _core_.__wxMemoryFSHandler_AddFile_wxBitmap(*args, **kwargs)
1813
1814 def __wxMemoryFSHandler_AddFile_Data(*args, **kwargs):
1815 """__wxMemoryFSHandler_AddFile_Data(String filename, PyObject data)"""
1816 return _core_.__wxMemoryFSHandler_AddFile_Data(*args, **kwargs)
1817 def MemoryFSHandler_AddFile(filename, a, b=''):
1818 if isinstance(a, wx.Image):
1819 __wxMemoryFSHandler_AddFile_wxImage(filename, a, b)
1820 elif isinstance(a, wx.Bitmap):
1821 __wxMemoryFSHandler_AddFile_wxBitmap(filename, a, b)
1822 elif type(a) == str:
1823 __wxMemoryFSHandler_AddFile_Data(filename, a)
1824 else: raise TypeError, 'wx.Image, wx.Bitmap or string expected'
1825
1826 class MemoryFSHandler(CPPFileSystemHandler):
1827 def __repr__(self):
1828 return "<%s.%s; proxy of C++ wxMemoryFSHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
1829 def __init__(self, *args, **kwargs):
1830 """__init__(self) -> MemoryFSHandler"""
1831 newobj = _core_.new_MemoryFSHandler(*args, **kwargs)
1832 self.this = newobj.this
1833 self.thisown = 1
1834 del newobj.thisown
1835 def RemoveFile(*args, **kwargs):
1836 """MemoryFSHandler.RemoveFile(String filename)"""
1837 return _core_.MemoryFSHandler_RemoveFile(*args, **kwargs)
1838
1839 RemoveFile = staticmethod(RemoveFile)
1840 AddFile = staticmethod(MemoryFSHandler_AddFile)
1841 def CanOpen(*args, **kwargs):
1842 """CanOpen(self, String location) -> bool"""
1843 return _core_.MemoryFSHandler_CanOpen(*args, **kwargs)
1844
1845 def OpenFile(*args, **kwargs):
1846 """OpenFile(self, FileSystem fs, String location) -> FSFile"""
1847 return _core_.MemoryFSHandler_OpenFile(*args, **kwargs)
1848
1849 def FindFirst(*args, **kwargs):
1850 """FindFirst(self, String spec, int flags=0) -> String"""
1851 return _core_.MemoryFSHandler_FindFirst(*args, **kwargs)
1852
1853 def FindNext(*args, **kwargs):
1854 """FindNext(self) -> String"""
1855 return _core_.MemoryFSHandler_FindNext(*args, **kwargs)
1856
1857
1858 class MemoryFSHandlerPtr(MemoryFSHandler):
1859 def __init__(self, this):
1860 self.this = this
1861 if not hasattr(self,"thisown"): self.thisown = 0
1862 self.__class__ = MemoryFSHandler
1863 _core_.MemoryFSHandler_swigregister(MemoryFSHandlerPtr)
1864
1865 def MemoryFSHandler_RemoveFile(*args, **kwargs):
1866 """MemoryFSHandler_RemoveFile(String filename)"""
1867 return _core_.MemoryFSHandler_RemoveFile(*args, **kwargs)
1868
1869 #---------------------------------------------------------------------------
1870
1871 class ImageHandler(Object):
1872 def __init__(self): raise RuntimeError, "No constructor defined"
1873 def __repr__(self):
1874 return "<%s.%s; proxy of C++ wxImageHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
1875 def GetName(*args, **kwargs):
1876 """GetName(self) -> String"""
1877 return _core_.ImageHandler_GetName(*args, **kwargs)
1878
1879 def GetExtension(*args, **kwargs):
1880 """GetExtension(self) -> String"""
1881 return _core_.ImageHandler_GetExtension(*args, **kwargs)
1882
1883 def GetType(*args, **kwargs):
1884 """GetType(self) -> long"""
1885 return _core_.ImageHandler_GetType(*args, **kwargs)
1886
1887 def GetMimeType(*args, **kwargs):
1888 """GetMimeType(self) -> String"""
1889 return _core_.ImageHandler_GetMimeType(*args, **kwargs)
1890
1891 def CanRead(*args, **kwargs):
1892 """CanRead(self, String name) -> bool"""
1893 return _core_.ImageHandler_CanRead(*args, **kwargs)
1894
1895 def SetName(*args, **kwargs):
1896 """SetName(self, String name)"""
1897 return _core_.ImageHandler_SetName(*args, **kwargs)
1898
1899 def SetExtension(*args, **kwargs):
1900 """SetExtension(self, String extension)"""
1901 return _core_.ImageHandler_SetExtension(*args, **kwargs)
1902
1903 def SetType(*args, **kwargs):
1904 """SetType(self, long type)"""
1905 return _core_.ImageHandler_SetType(*args, **kwargs)
1906
1907 def SetMimeType(*args, **kwargs):
1908 """SetMimeType(self, String mimetype)"""
1909 return _core_.ImageHandler_SetMimeType(*args, **kwargs)
1910
1911
1912 class ImageHandlerPtr(ImageHandler):
1913 def __init__(self, this):
1914 self.this = this
1915 if not hasattr(self,"thisown"): self.thisown = 0
1916 self.__class__ = ImageHandler
1917 _core_.ImageHandler_swigregister(ImageHandlerPtr)
1918
1919 class ImageHistogram(object):
1920 def __repr__(self):
1921 return "<%s.%s; proxy of C++ wxImageHistogram instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
1922 def __init__(self, *args, **kwargs):
1923 """__init__(self) -> ImageHistogram"""
1924 newobj = _core_.new_ImageHistogram(*args, **kwargs)
1925 self.this = newobj.this
1926 self.thisown = 1
1927 del newobj.thisown
1928 def MakeKey(*args, **kwargs):
1929 """
1930 ImageHistogram.MakeKey(unsigned char r, unsigned char g, unsigned char b) -> unsigned long
1931
1932 Get the key in the histogram for the given RGB values
1933 """
1934 return _core_.ImageHistogram_MakeKey(*args, **kwargs)
1935
1936 MakeKey = staticmethod(MakeKey)
1937 def FindFirstUnusedColour(*args, **kwargs):
1938 """
1939 FindFirstUnusedColour(int startR=1, int startG=0, int startB=0) -> (success, r, g, b)
1940
1941 Find first colour that is not used in the image and has higher RGB values than
1942 startR, startG, startB. Returns a tuple consisting of a success flag and rgb
1943 values.
1944 """
1945 return _core_.ImageHistogram_FindFirstUnusedColour(*args, **kwargs)
1946
1947
1948 class ImageHistogramPtr(ImageHistogram):
1949 def __init__(self, this):
1950 self.this = this
1951 if not hasattr(self,"thisown"): self.thisown = 0
1952 self.__class__ = ImageHistogram
1953 _core_.ImageHistogram_swigregister(ImageHistogramPtr)
1954
1955 def ImageHistogram_MakeKey(*args, **kwargs):
1956 """
1957 ImageHistogram_MakeKey(unsigned char r, unsigned char g, unsigned char b) -> unsigned long
1958
1959 Get the key in the histogram for the given RGB values
1960 """
1961 return _core_.ImageHistogram_MakeKey(*args, **kwargs)
1962
1963 class Image(Object):
1964 def __repr__(self):
1965 return "<%s.%s; proxy of C++ wxImage instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
1966 def __init__(self, *args, **kwargs):
1967 """__init__(self, String name, long type=BITMAP_TYPE_ANY, int index=-1) -> Image"""
1968 newobj = _core_.new_Image(*args, **kwargs)
1969 self.this = newobj.this
1970 self.thisown = 1
1971 del newobj.thisown
1972 def __del__(self, destroy=_core_.delete_Image):
1973 """__del__(self)"""
1974 try:
1975 if self.thisown: destroy(self)
1976 except: pass
1977
1978 def Create(*args, **kwargs):
1979 """Create(self, int width, int height)"""
1980 return _core_.Image_Create(*args, **kwargs)
1981
1982 def Destroy(*args, **kwargs):
1983 """
1984 Destroy(self)
1985
1986 Deletes the C++ object this Python object is a proxy for.
1987 """
1988 return _core_.Image_Destroy(*args, **kwargs)
1989
1990 def Scale(*args, **kwargs):
1991 """Scale(self, int width, int height) -> Image"""
1992 return _core_.Image_Scale(*args, **kwargs)
1993
1994 def ShrinkBy(*args, **kwargs):
1995 """ShrinkBy(self, int xFactor, int yFactor) -> Image"""
1996 return _core_.Image_ShrinkBy(*args, **kwargs)
1997
1998 def Rescale(*args, **kwargs):
1999 """Rescale(self, int width, int height) -> Image"""
2000 return _core_.Image_Rescale(*args, **kwargs)
2001
2002 def SetRGB(*args, **kwargs):
2003 """SetRGB(self, int x, int y, unsigned char r, unsigned char g, unsigned char b)"""
2004 return _core_.Image_SetRGB(*args, **kwargs)
2005
2006 def GetRed(*args, **kwargs):
2007 """GetRed(self, int x, int y) -> unsigned char"""
2008 return _core_.Image_GetRed(*args, **kwargs)
2009
2010 def GetGreen(*args, **kwargs):
2011 """GetGreen(self, int x, int y) -> unsigned char"""
2012 return _core_.Image_GetGreen(*args, **kwargs)
2013
2014 def GetBlue(*args, **kwargs):
2015 """GetBlue(self, int x, int y) -> unsigned char"""
2016 return _core_.Image_GetBlue(*args, **kwargs)
2017
2018 def SetAlpha(*args, **kwargs):
2019 """SetAlpha(self, int x, int y, unsigned char alpha)"""
2020 return _core_.Image_SetAlpha(*args, **kwargs)
2021
2022 def GetAlpha(*args, **kwargs):
2023 """GetAlpha(self, int x, int y) -> unsigned char"""
2024 return _core_.Image_GetAlpha(*args, **kwargs)
2025
2026 def HasAlpha(*args, **kwargs):
2027 """HasAlpha(self) -> bool"""
2028 return _core_.Image_HasAlpha(*args, **kwargs)
2029
2030 def FindFirstUnusedColour(*args, **kwargs):
2031 """
2032 FindFirstUnusedColour(int startR=1, int startG=0, int startB=0) -> (success, r, g, b)
2033
2034 Find first colour that is not used in the image and has higher RGB values than
2035 startR, startG, startB. Returns a tuple consisting of a success flag and rgb
2036 values.
2037 """
2038 return _core_.Image_FindFirstUnusedColour(*args, **kwargs)
2039
2040 def SetMaskFromImage(*args, **kwargs):
2041 """SetMaskFromImage(self, Image mask, byte mr, byte mg, byte mb) -> bool"""
2042 return _core_.Image_SetMaskFromImage(*args, **kwargs)
2043
2044 def CanRead(*args, **kwargs):
2045 """Image.CanRead(String name) -> bool"""
2046 return _core_.Image_CanRead(*args, **kwargs)
2047
2048 CanRead = staticmethod(CanRead)
2049 def GetImageCount(*args, **kwargs):
2050 """Image.GetImageCount(String name, long type=BITMAP_TYPE_ANY) -> int"""
2051 return _core_.Image_GetImageCount(*args, **kwargs)
2052
2053 GetImageCount = staticmethod(GetImageCount)
2054 def LoadFile(*args, **kwargs):
2055 """LoadFile(self, String name, long type=BITMAP_TYPE_ANY, int index=-1) -> bool"""
2056 return _core_.Image_LoadFile(*args, **kwargs)
2057
2058 def LoadMimeFile(*args, **kwargs):
2059 """LoadMimeFile(self, String name, String mimetype, int index=-1) -> bool"""
2060 return _core_.Image_LoadMimeFile(*args, **kwargs)
2061
2062 def SaveFile(*args, **kwargs):
2063 """SaveFile(self, String name, int type) -> bool"""
2064 return _core_.Image_SaveFile(*args, **kwargs)
2065
2066 def SaveMimeFile(*args, **kwargs):
2067 """SaveMimeFile(self, String name, String mimetype) -> bool"""
2068 return _core_.Image_SaveMimeFile(*args, **kwargs)
2069
2070 def CanReadStream(*args, **kwargs):
2071 """Image.CanReadStream(InputStream stream) -> bool"""
2072 return _core_.Image_CanReadStream(*args, **kwargs)
2073
2074 CanReadStream = staticmethod(CanReadStream)
2075 def LoadStream(*args, **kwargs):
2076 """LoadStream(self, InputStream stream, long type=BITMAP_TYPE_ANY, int index=-1) -> bool"""
2077 return _core_.Image_LoadStream(*args, **kwargs)
2078
2079 def LoadMimeStream(*args, **kwargs):
2080 """LoadMimeStream(self, InputStream stream, String mimetype, int index=-1) -> bool"""
2081 return _core_.Image_LoadMimeStream(*args, **kwargs)
2082
2083 def Ok(*args, **kwargs):
2084 """Ok(self) -> bool"""
2085 return _core_.Image_Ok(*args, **kwargs)
2086
2087 def GetWidth(*args, **kwargs):
2088 """GetWidth(self) -> int"""
2089 return _core_.Image_GetWidth(*args, **kwargs)
2090
2091 def GetHeight(*args, **kwargs):
2092 """GetHeight(self) -> int"""
2093 return _core_.Image_GetHeight(*args, **kwargs)
2094
2095 def GetSize(*args, **kwargs):
2096 """GetSize(self) -> Size"""
2097 return _core_.Image_GetSize(*args, **kwargs)
2098
2099 def GetSubImage(*args, **kwargs):
2100 """GetSubImage(self, Rect rect) -> Image"""
2101 return _core_.Image_GetSubImage(*args, **kwargs)
2102
2103 def Copy(*args, **kwargs):
2104 """Copy(self) -> Image"""
2105 return _core_.Image_Copy(*args, **kwargs)
2106
2107 def Paste(*args, **kwargs):
2108 """Paste(self, Image image, int x, int y)"""
2109 return _core_.Image_Paste(*args, **kwargs)
2110
2111 def GetData(*args, **kwargs):
2112 """GetData(self) -> PyObject"""
2113 return _core_.Image_GetData(*args, **kwargs)
2114
2115 def SetData(*args, **kwargs):
2116 """SetData(self, PyObject data)"""
2117 return _core_.Image_SetData(*args, **kwargs)
2118
2119 def GetDataBuffer(*args, **kwargs):
2120 """GetDataBuffer(self) -> PyObject"""
2121 return _core_.Image_GetDataBuffer(*args, **kwargs)
2122
2123 def SetDataBuffer(*args, **kwargs):
2124 """SetDataBuffer(self, PyObject data)"""
2125 return _core_.Image_SetDataBuffer(*args, **kwargs)
2126
2127 def GetAlphaData(*args, **kwargs):
2128 """GetAlphaData(self) -> PyObject"""
2129 return _core_.Image_GetAlphaData(*args, **kwargs)
2130
2131 def SetAlphaData(*args, **kwargs):
2132 """SetAlphaData(self, PyObject data)"""
2133 return _core_.Image_SetAlphaData(*args, **kwargs)
2134
2135 def GetAlphaBuffer(*args, **kwargs):
2136 """GetAlphaBuffer(self) -> PyObject"""
2137 return _core_.Image_GetAlphaBuffer(*args, **kwargs)
2138
2139 def SetAlphaBuffer(*args, **kwargs):
2140 """SetAlphaBuffer(self, PyObject data)"""
2141 return _core_.Image_SetAlphaBuffer(*args, **kwargs)
2142
2143 def SetMaskColour(*args, **kwargs):
2144 """SetMaskColour(self, unsigned char r, unsigned char g, unsigned char b)"""
2145 return _core_.Image_SetMaskColour(*args, **kwargs)
2146
2147 def GetMaskRed(*args, **kwargs):
2148 """GetMaskRed(self) -> unsigned char"""
2149 return _core_.Image_GetMaskRed(*args, **kwargs)
2150
2151 def GetMaskGreen(*args, **kwargs):
2152 """GetMaskGreen(self) -> unsigned char"""
2153 return _core_.Image_GetMaskGreen(*args, **kwargs)
2154
2155 def GetMaskBlue(*args, **kwargs):
2156 """GetMaskBlue(self) -> unsigned char"""
2157 return _core_.Image_GetMaskBlue(*args, **kwargs)
2158
2159 def SetMask(*args, **kwargs):
2160 """SetMask(self, bool mask=True)"""
2161 return _core_.Image_SetMask(*args, **kwargs)
2162
2163 def HasMask(*args, **kwargs):
2164 """HasMask(self) -> bool"""
2165 return _core_.Image_HasMask(*args, **kwargs)
2166
2167 def Rotate(*args, **kwargs):
2168 """
2169 Rotate(self, double angle, Point centre_of_rotation, bool interpolating=True,
2170 Point offset_after_rotation=None) -> Image
2171 """
2172 return _core_.Image_Rotate(*args, **kwargs)
2173
2174 def Rotate90(*args, **kwargs):
2175 """Rotate90(self, bool clockwise=True) -> Image"""
2176 return _core_.Image_Rotate90(*args, **kwargs)
2177
2178 def Mirror(*args, **kwargs):
2179 """Mirror(self, bool horizontally=True) -> Image"""
2180 return _core_.Image_Mirror(*args, **kwargs)
2181
2182 def Replace(*args, **kwargs):
2183 """
2184 Replace(self, unsigned char r1, unsigned char g1, unsigned char b1,
2185 unsigned char r2, unsigned char g2, unsigned char b2)
2186 """
2187 return _core_.Image_Replace(*args, **kwargs)
2188
2189 def ConvertToMono(*args, **kwargs):
2190 """ConvertToMono(self, unsigned char r, unsigned char g, unsigned char b) -> Image"""
2191 return _core_.Image_ConvertToMono(*args, **kwargs)
2192
2193 def SetOption(*args, **kwargs):
2194 """SetOption(self, String name, String value)"""
2195 return _core_.Image_SetOption(*args, **kwargs)
2196
2197 def SetOptionInt(*args, **kwargs):
2198 """SetOptionInt(self, String name, int value)"""
2199 return _core_.Image_SetOptionInt(*args, **kwargs)
2200
2201 def GetOption(*args, **kwargs):
2202 """GetOption(self, String name) -> String"""
2203 return _core_.Image_GetOption(*args, **kwargs)
2204
2205 def GetOptionInt(*args, **kwargs):
2206 """GetOptionInt(self, String name) -> int"""
2207 return _core_.Image_GetOptionInt(*args, **kwargs)
2208
2209 def HasOption(*args, **kwargs):
2210 """HasOption(self, String name) -> bool"""
2211 return _core_.Image_HasOption(*args, **kwargs)
2212
2213 def CountColours(*args, **kwargs):
2214 """CountColours(self, unsigned long stopafter=(unsigned long) -1) -> unsigned long"""
2215 return _core_.Image_CountColours(*args, **kwargs)
2216
2217 def ComputeHistogram(*args, **kwargs):
2218 """ComputeHistogram(self, ImageHistogram h) -> unsigned long"""
2219 return _core_.Image_ComputeHistogram(*args, **kwargs)
2220
2221 def AddHandler(*args, **kwargs):
2222 """Image.AddHandler(ImageHandler handler)"""
2223 return _core_.Image_AddHandler(*args, **kwargs)
2224
2225 AddHandler = staticmethod(AddHandler)
2226 def InsertHandler(*args, **kwargs):
2227 """Image.InsertHandler(ImageHandler handler)"""
2228 return _core_.Image_InsertHandler(*args, **kwargs)
2229
2230 InsertHandler = staticmethod(InsertHandler)
2231 def RemoveHandler(*args, **kwargs):
2232 """Image.RemoveHandler(String name) -> bool"""
2233 return _core_.Image_RemoveHandler(*args, **kwargs)
2234
2235 RemoveHandler = staticmethod(RemoveHandler)
2236 def GetImageExtWildcard(*args, **kwargs):
2237 """Image.GetImageExtWildcard() -> String"""
2238 return _core_.Image_GetImageExtWildcard(*args, **kwargs)
2239
2240 GetImageExtWildcard = staticmethod(GetImageExtWildcard)
2241 def ConvertToBitmap(*args, **kwargs):
2242 """ConvertToBitmap(self) -> Bitmap"""
2243 return _core_.Image_ConvertToBitmap(*args, **kwargs)
2244
2245 def ConvertToMonoBitmap(*args, **kwargs):
2246 """ConvertToMonoBitmap(self, unsigned char red, unsigned char green, unsigned char blue) -> Bitmap"""
2247 return _core_.Image_ConvertToMonoBitmap(*args, **kwargs)
2248
2249 def __nonzero__(self): return self.Ok()
2250
2251 class ImagePtr(Image):
2252 def __init__(self, this):
2253 self.this = this
2254 if not hasattr(self,"thisown"): self.thisown = 0
2255 self.__class__ = Image
2256 _core_.Image_swigregister(ImagePtr)
2257
2258 def ImageFromMime(*args, **kwargs):
2259 """ImageFromMime(String name, String mimetype, int index=-1) -> Image"""
2260 val = _core_.new_ImageFromMime(*args, **kwargs)
2261 val.thisown = 1
2262 return val
2263
2264 def ImageFromStream(*args, **kwargs):
2265 """ImageFromStream(InputStream stream, long type=BITMAP_TYPE_ANY, int index=-1) -> Image"""
2266 val = _core_.new_ImageFromStream(*args, **kwargs)
2267 val.thisown = 1
2268 return val
2269
2270 def ImageFromStreamMime(*args, **kwargs):
2271 """ImageFromStreamMime(InputStream stream, String mimetype, int index=-1) -> Image"""
2272 val = _core_.new_ImageFromStreamMime(*args, **kwargs)
2273 val.thisown = 1
2274 return val
2275
2276 def EmptyImage(*args):
2277 """
2278 EmptyImage(int width=0, int height=0, bool clear=True) -> Image
2279 EmptyImage(Size size, bool clear=True) -> Image
2280 """
2281 val = _core_.new_EmptyImage(*args)
2282 val.thisown = 1
2283 return val
2284
2285 def ImageFromBitmap(*args, **kwargs):
2286 """ImageFromBitmap(Bitmap bitmap) -> Image"""
2287 val = _core_.new_ImageFromBitmap(*args, **kwargs)
2288 val.thisown = 1
2289 return val
2290
2291 def ImageFromData(*args, **kwargs):
2292 """ImageFromData(int width, int height, unsigned char data) -> Image"""
2293 val = _core_.new_ImageFromData(*args, **kwargs)
2294 val.thisown = 1
2295 return val
2296
2297 def Image_CanRead(*args, **kwargs):
2298 """Image_CanRead(String name) -> bool"""
2299 return _core_.Image_CanRead(*args, **kwargs)
2300
2301 def Image_GetImageCount(*args, **kwargs):
2302 """Image_GetImageCount(String name, long type=BITMAP_TYPE_ANY) -> int"""
2303 return _core_.Image_GetImageCount(*args, **kwargs)
2304
2305 def Image_CanReadStream(*args, **kwargs):
2306 """Image_CanReadStream(InputStream stream) -> bool"""
2307 return _core_.Image_CanReadStream(*args, **kwargs)
2308
2309 def Image_AddHandler(*args, **kwargs):
2310 """Image_AddHandler(ImageHandler handler)"""
2311 return _core_.Image_AddHandler(*args, **kwargs)
2312
2313 def Image_InsertHandler(*args, **kwargs):
2314 """Image_InsertHandler(ImageHandler handler)"""
2315 return _core_.Image_InsertHandler(*args, **kwargs)
2316
2317 def Image_RemoveHandler(*args, **kwargs):
2318 """Image_RemoveHandler(String name) -> bool"""
2319 return _core_.Image_RemoveHandler(*args, **kwargs)
2320
2321 def Image_GetImageExtWildcard(*args, **kwargs):
2322 """Image_GetImageExtWildcard() -> String"""
2323 return _core_.Image_GetImageExtWildcard(*args, **kwargs)
2324
2325
2326 def InitAllImageHandlers(*args, **kwargs):
2327 """InitAllImageHandlers()"""
2328 return _core_.InitAllImageHandlers(*args, **kwargs)
2329 IMAGE_RESOLUTION_INCHES = _core_.IMAGE_RESOLUTION_INCHES
2330 IMAGE_RESOLUTION_CM = _core_.IMAGE_RESOLUTION_CM
2331 BMP_24BPP = _core_.BMP_24BPP
2332 BMP_8BPP = _core_.BMP_8BPP
2333 BMP_8BPP_GREY = _core_.BMP_8BPP_GREY
2334 BMP_8BPP_GRAY = _core_.BMP_8BPP_GRAY
2335 BMP_8BPP_RED = _core_.BMP_8BPP_RED
2336 BMP_8BPP_PALETTE = _core_.BMP_8BPP_PALETTE
2337 BMP_4BPP = _core_.BMP_4BPP
2338 BMP_1BPP = _core_.BMP_1BPP
2339 BMP_1BPP_BW = _core_.BMP_1BPP_BW
2340 class BMPHandler(ImageHandler):
2341 def __repr__(self):
2342 return "<%s.%s; proxy of C++ wxBMPHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
2343 def __init__(self, *args, **kwargs):
2344 """__init__(self) -> BMPHandler"""
2345 newobj = _core_.new_BMPHandler(*args, **kwargs)
2346 self.this = newobj.this
2347 self.thisown = 1
2348 del newobj.thisown
2349
2350 class BMPHandlerPtr(BMPHandler):
2351 def __init__(self, this):
2352 self.this = this
2353 if not hasattr(self,"thisown"): self.thisown = 0
2354 self.__class__ = BMPHandler
2355 _core_.BMPHandler_swigregister(BMPHandlerPtr)
2356 NullImage = cvar.NullImage
2357 IMAGE_OPTION_BMP_FORMAT = cvar.IMAGE_OPTION_BMP_FORMAT
2358 IMAGE_OPTION_CUR_HOTSPOT_X = cvar.IMAGE_OPTION_CUR_HOTSPOT_X
2359 IMAGE_OPTION_CUR_HOTSPOT_Y = cvar.IMAGE_OPTION_CUR_HOTSPOT_Y
2360 IMAGE_OPTION_RESOLUTION = cvar.IMAGE_OPTION_RESOLUTION
2361 IMAGE_OPTION_RESOLUTIONUNIT = cvar.IMAGE_OPTION_RESOLUTIONUNIT
2362
2363 class ICOHandler(BMPHandler):
2364 def __repr__(self):
2365 return "<%s.%s; proxy of C++ wxICOHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
2366 def __init__(self, *args, **kwargs):
2367 """__init__(self) -> ICOHandler"""
2368 newobj = _core_.new_ICOHandler(*args, **kwargs)
2369 self.this = newobj.this
2370 self.thisown = 1
2371 del newobj.thisown
2372
2373 class ICOHandlerPtr(ICOHandler):
2374 def __init__(self, this):
2375 self.this = this
2376 if not hasattr(self,"thisown"): self.thisown = 0
2377 self.__class__ = ICOHandler
2378 _core_.ICOHandler_swigregister(ICOHandlerPtr)
2379
2380 class CURHandler(ICOHandler):
2381 def __repr__(self):
2382 return "<%s.%s; proxy of C++ wxCURHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
2383 def __init__(self, *args, **kwargs):
2384 """__init__(self) -> CURHandler"""
2385 newobj = _core_.new_CURHandler(*args, **kwargs)
2386 self.this = newobj.this
2387 self.thisown = 1
2388 del newobj.thisown
2389
2390 class CURHandlerPtr(CURHandler):
2391 def __init__(self, this):
2392 self.this = this
2393 if not hasattr(self,"thisown"): self.thisown = 0
2394 self.__class__ = CURHandler
2395 _core_.CURHandler_swigregister(CURHandlerPtr)
2396
2397 class ANIHandler(CURHandler):
2398 def __repr__(self):
2399 return "<%s.%s; proxy of C++ wxANIHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
2400 def __init__(self, *args, **kwargs):
2401 """__init__(self) -> ANIHandler"""
2402 newobj = _core_.new_ANIHandler(*args, **kwargs)
2403 self.this = newobj.this
2404 self.thisown = 1
2405 del newobj.thisown
2406
2407 class ANIHandlerPtr(ANIHandler):
2408 def __init__(self, this):
2409 self.this = this
2410 if not hasattr(self,"thisown"): self.thisown = 0
2411 self.__class__ = ANIHandler
2412 _core_.ANIHandler_swigregister(ANIHandlerPtr)
2413
2414 class PNGHandler(ImageHandler):
2415 def __repr__(self):
2416 return "<%s.%s; proxy of C++ wxPNGHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
2417 def __init__(self, *args, **kwargs):
2418 """__init__(self) -> PNGHandler"""
2419 newobj = _core_.new_PNGHandler(*args, **kwargs)
2420 self.this = newobj.this
2421 self.thisown = 1
2422 del newobj.thisown
2423
2424 class PNGHandlerPtr(PNGHandler):
2425 def __init__(self, this):
2426 self.this = this
2427 if not hasattr(self,"thisown"): self.thisown = 0
2428 self.__class__ = PNGHandler
2429 _core_.PNGHandler_swigregister(PNGHandlerPtr)
2430
2431 class GIFHandler(ImageHandler):
2432 def __repr__(self):
2433 return "<%s.%s; proxy of C++ wxGIFHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
2434 def __init__(self, *args, **kwargs):
2435 """__init__(self) -> GIFHandler"""
2436 newobj = _core_.new_GIFHandler(*args, **kwargs)
2437 self.this = newobj.this
2438 self.thisown = 1
2439 del newobj.thisown
2440
2441 class GIFHandlerPtr(GIFHandler):
2442 def __init__(self, this):
2443 self.this = this
2444 if not hasattr(self,"thisown"): self.thisown = 0
2445 self.__class__ = GIFHandler
2446 _core_.GIFHandler_swigregister(GIFHandlerPtr)
2447
2448 class PCXHandler(ImageHandler):
2449 def __repr__(self):
2450 return "<%s.%s; proxy of C++ wxPCXHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
2451 def __init__(self, *args, **kwargs):
2452 """__init__(self) -> PCXHandler"""
2453 newobj = _core_.new_PCXHandler(*args, **kwargs)
2454 self.this = newobj.this
2455 self.thisown = 1
2456 del newobj.thisown
2457
2458 class PCXHandlerPtr(PCXHandler):
2459 def __init__(self, this):
2460 self.this = this
2461 if not hasattr(self,"thisown"): self.thisown = 0
2462 self.__class__ = PCXHandler
2463 _core_.PCXHandler_swigregister(PCXHandlerPtr)
2464
2465 class JPEGHandler(ImageHandler):
2466 def __repr__(self):
2467 return "<%s.%s; proxy of C++ wxJPEGHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
2468 def __init__(self, *args, **kwargs):
2469 """__init__(self) -> JPEGHandler"""
2470 newobj = _core_.new_JPEGHandler(*args, **kwargs)
2471 self.this = newobj.this
2472 self.thisown = 1
2473 del newobj.thisown
2474
2475 class JPEGHandlerPtr(JPEGHandler):
2476 def __init__(self, this):
2477 self.this = this
2478 if not hasattr(self,"thisown"): self.thisown = 0
2479 self.__class__ = JPEGHandler
2480 _core_.JPEGHandler_swigregister(JPEGHandlerPtr)
2481
2482 class PNMHandler(ImageHandler):
2483 def __repr__(self):
2484 return "<%s.%s; proxy of C++ wxPNMHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
2485 def __init__(self, *args, **kwargs):
2486 """__init__(self) -> PNMHandler"""
2487 newobj = _core_.new_PNMHandler(*args, **kwargs)
2488 self.this = newobj.this
2489 self.thisown = 1
2490 del newobj.thisown
2491
2492 class PNMHandlerPtr(PNMHandler):
2493 def __init__(self, this):
2494 self.this = this
2495 if not hasattr(self,"thisown"): self.thisown = 0
2496 self.__class__ = PNMHandler
2497 _core_.PNMHandler_swigregister(PNMHandlerPtr)
2498
2499 class XPMHandler(ImageHandler):
2500 def __repr__(self):
2501 return "<%s.%s; proxy of C++ wxXPMHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
2502 def __init__(self, *args, **kwargs):
2503 """__init__(self) -> XPMHandler"""
2504 newobj = _core_.new_XPMHandler(*args, **kwargs)
2505 self.this = newobj.this
2506 self.thisown = 1
2507 del newobj.thisown
2508
2509 class XPMHandlerPtr(XPMHandler):
2510 def __init__(self, this):
2511 self.this = this
2512 if not hasattr(self,"thisown"): self.thisown = 0
2513 self.__class__ = XPMHandler
2514 _core_.XPMHandler_swigregister(XPMHandlerPtr)
2515
2516 class TIFFHandler(ImageHandler):
2517 def __repr__(self):
2518 return "<%s.%s; proxy of C++ wxTIFFHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
2519 def __init__(self, *args, **kwargs):
2520 """__init__(self) -> TIFFHandler"""
2521 newobj = _core_.new_TIFFHandler(*args, **kwargs)
2522 self.this = newobj.this
2523 self.thisown = 1
2524 del newobj.thisown
2525
2526 class TIFFHandlerPtr(TIFFHandler):
2527 def __init__(self, this):
2528 self.this = this
2529 if not hasattr(self,"thisown"): self.thisown = 0
2530 self.__class__ = TIFFHandler
2531 _core_.TIFFHandler_swigregister(TIFFHandlerPtr)
2532
2533 #---------------------------------------------------------------------------
2534
2535 class EvtHandler(Object):
2536 def __repr__(self):
2537 return "<%s.%s; proxy of C++ wxEvtHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
2538 def __init__(self, *args, **kwargs):
2539 """__init__(self) -> EvtHandler"""
2540 newobj = _core_.new_EvtHandler(*args, **kwargs)
2541 self.this = newobj.this
2542 self.thisown = 1
2543 del newobj.thisown
2544 def GetNextHandler(*args, **kwargs):
2545 """GetNextHandler(self) -> EvtHandler"""
2546 return _core_.EvtHandler_GetNextHandler(*args, **kwargs)
2547
2548 def GetPreviousHandler(*args, **kwargs):
2549 """GetPreviousHandler(self) -> EvtHandler"""
2550 return _core_.EvtHandler_GetPreviousHandler(*args, **kwargs)
2551
2552 def SetNextHandler(*args, **kwargs):
2553 """SetNextHandler(self, EvtHandler handler)"""
2554 return _core_.EvtHandler_SetNextHandler(*args, **kwargs)
2555
2556 def SetPreviousHandler(*args, **kwargs):
2557 """SetPreviousHandler(self, EvtHandler handler)"""
2558 return _core_.EvtHandler_SetPreviousHandler(*args, **kwargs)
2559
2560 def GetEvtHandlerEnabled(*args, **kwargs):
2561 """GetEvtHandlerEnabled(self) -> bool"""
2562 return _core_.EvtHandler_GetEvtHandlerEnabled(*args, **kwargs)
2563
2564 def SetEvtHandlerEnabled(*args, **kwargs):
2565 """SetEvtHandlerEnabled(self, bool enabled)"""
2566 return _core_.EvtHandler_SetEvtHandlerEnabled(*args, **kwargs)
2567
2568 def ProcessEvent(*args, **kwargs):
2569 """ProcessEvent(self, Event event) -> bool"""
2570 return _core_.EvtHandler_ProcessEvent(*args, **kwargs)
2571
2572 def AddPendingEvent(*args, **kwargs):
2573 """AddPendingEvent(self, Event event)"""
2574 return _core_.EvtHandler_AddPendingEvent(*args, **kwargs)
2575
2576 def ProcessPendingEvents(*args, **kwargs):
2577 """ProcessPendingEvents(self)"""
2578 return _core_.EvtHandler_ProcessPendingEvents(*args, **kwargs)
2579
2580 def Connect(*args, **kwargs):
2581 """Connect(self, int id, int lastId, int eventType, PyObject func)"""
2582 return _core_.EvtHandler_Connect(*args, **kwargs)
2583
2584 def Disconnect(*args, **kwargs):
2585 """Disconnect(self, int id, int lastId=-1, wxEventType eventType=wxEVT_NULL) -> bool"""
2586 return _core_.EvtHandler_Disconnect(*args, **kwargs)
2587
2588 def _setOORInfo(*args, **kwargs):
2589 """_setOORInfo(self, PyObject _self)"""
2590 return _core_.EvtHandler__setOORInfo(*args, **kwargs)
2591
2592 def Bind(self, event, handler, source=None, id=wx.ID_ANY, id2=wx.ID_ANY):
2593 """
2594 Bind an event to an event handler.
2595
2596 event One of the EVT_* objects that specifies the
2597 type of event to bind,
2598
2599 handler A callable object to be invoked when the event
2600 is delivered to self. Pass None to disconnect an
2601 event handler.
2602
2603 source Sometimes the event originates from a different window
2604 than self, but you still want to catch it in self. (For
2605 example, a button event delivered to a frame.) By
2606 passing the source of the event, the event handling
2607 system is able to differentiate between the same event
2608 type from different controls.
2609
2610 id,id2 Used for menu IDs or for event types that require a
2611 range of IDs
2612 """
2613 if source is not None:
2614 id = source.GetId()
2615 event.Bind(self, id, id2, handler)
2616
2617
2618
2619 class EvtHandlerPtr(EvtHandler):
2620 def __init__(self, this):
2621 self.this = this
2622 if not hasattr(self,"thisown"): self.thisown = 0
2623 self.__class__ = EvtHandler
2624 _core_.EvtHandler_swigregister(EvtHandlerPtr)
2625
2626 #---------------------------------------------------------------------------
2627
2628 class PyEventBinder(object):
2629 """
2630 Instances of this class are used to bind specific events to event
2631 handlers.
2632 """
2633 def __init__(self, evtType, expectedIDs=0):
2634 if expectedIDs not in [0, 1, 2]:
2635 raise ValueError, "Invalid number of expectedIDs"
2636 self.expectedIDs = expectedIDs
2637
2638 if type(evtType) == list or type(evtType) == tuple:
2639 self.evtType = evtType
2640 else:
2641 self.evtType = [evtType]
2642
2643
2644 def Bind(self, target, id1, id2, function):
2645 """Bind this set of event types to target."""
2646 for et in self.evtType:
2647 target.Connect(id1, id2, et, function)
2648
2649
2650 def __call__(self, *args):
2651 """
2652 For backwards compatibility with the old EVT_* functions.
2653 Should be called with either (window, func), (window, ID,
2654 func) or (window, ID1, ID2, func) parameters depending on the
2655 type of the event.
2656 """
2657 assert len(args) == 2 + self.expectedIDs
2658 id1 = wx.ID_ANY
2659 id2 = wx.ID_ANY
2660 target = args[0]
2661 if self.expectedIDs == 0:
2662 func = args[1]
2663 elif self.expectedIDs == 1:
2664 id1 = args[1]
2665 func = args[2]
2666 elif self.expectedIDs == 2:
2667 id1 = args[1]
2668 id2 = args[2]
2669 func = args[3]
2670 else:
2671 raise ValueError, "Unexpected number of IDs"
2672
2673 self.Bind(target, id1, id2, func)
2674
2675
2676 # These two are square pegs that don't fit the PyEventBinder hole...
2677 def EVT_COMMAND(win, id, cmd, func):
2678 win.Connect(id, -1, cmd, func)
2679 def EVT_COMMAND_RANGE(win, id1, id2, cmd, func):
2680 win.Connect(id1, id2, cmd, func)
2681
2682
2683 #---------------------------------------------------------------------------
2684
2685 #---------------------------------------------------------------------------
2686
2687 EVENT_PROPAGATE_NONE = _core_.EVENT_PROPAGATE_NONE
2688 EVENT_PROPAGATE_MAX = _core_.EVENT_PROPAGATE_MAX
2689
2690 def NewEventType(*args, **kwargs):
2691 """NewEventType() -> wxEventType"""
2692 return _core_.NewEventType(*args, **kwargs)
2693 wxEVT_NULL = _core_.wxEVT_NULL
2694 wxEVT_FIRST = _core_.wxEVT_FIRST
2695 wxEVT_USER_FIRST = _core_.wxEVT_USER_FIRST
2696 wxEVT_COMMAND_BUTTON_CLICKED = _core_.wxEVT_COMMAND_BUTTON_CLICKED
2697 wxEVT_COMMAND_CHECKBOX_CLICKED = _core_.wxEVT_COMMAND_CHECKBOX_CLICKED
2698 wxEVT_COMMAND_CHOICE_SELECTED = _core_.wxEVT_COMMAND_CHOICE_SELECTED
2699 wxEVT_COMMAND_LISTBOX_SELECTED = _core_.wxEVT_COMMAND_LISTBOX_SELECTED
2700 wxEVT_COMMAND_LISTBOX_DOUBLECLICKED = _core_.wxEVT_COMMAND_LISTBOX_DOUBLECLICKED
2701 wxEVT_COMMAND_CHECKLISTBOX_TOGGLED = _core_.wxEVT_COMMAND_CHECKLISTBOX_TOGGLED
2702 wxEVT_COMMAND_MENU_SELECTED = _core_.wxEVT_COMMAND_MENU_SELECTED
2703 wxEVT_COMMAND_TOOL_CLICKED = _core_.wxEVT_COMMAND_TOOL_CLICKED
2704 wxEVT_COMMAND_SLIDER_UPDATED = _core_.wxEVT_COMMAND_SLIDER_UPDATED
2705 wxEVT_COMMAND_RADIOBOX_SELECTED = _core_.wxEVT_COMMAND_RADIOBOX_SELECTED
2706 wxEVT_COMMAND_RADIOBUTTON_SELECTED = _core_.wxEVT_COMMAND_RADIOBUTTON_SELECTED
2707 wxEVT_COMMAND_SCROLLBAR_UPDATED = _core_.wxEVT_COMMAND_SCROLLBAR_UPDATED
2708 wxEVT_COMMAND_VLBOX_SELECTED = _core_.wxEVT_COMMAND_VLBOX_SELECTED
2709 wxEVT_COMMAND_COMBOBOX_SELECTED = _core_.wxEVT_COMMAND_COMBOBOX_SELECTED
2710 wxEVT_COMMAND_TOOL_RCLICKED = _core_.wxEVT_COMMAND_TOOL_RCLICKED
2711 wxEVT_COMMAND_TOOL_ENTER = _core_.wxEVT_COMMAND_TOOL_ENTER
2712 wxEVT_LEFT_DOWN = _core_.wxEVT_LEFT_DOWN
2713 wxEVT_LEFT_UP = _core_.wxEVT_LEFT_UP
2714 wxEVT_MIDDLE_DOWN = _core_.wxEVT_MIDDLE_DOWN
2715 wxEVT_MIDDLE_UP = _core_.wxEVT_MIDDLE_UP
2716 wxEVT_RIGHT_DOWN = _core_.wxEVT_RIGHT_DOWN
2717 wxEVT_RIGHT_UP = _core_.wxEVT_RIGHT_UP
2718 wxEVT_MOTION = _core_.wxEVT_MOTION
2719 wxEVT_ENTER_WINDOW = _core_.wxEVT_ENTER_WINDOW
2720 wxEVT_LEAVE_WINDOW = _core_.wxEVT_LEAVE_WINDOW
2721 wxEVT_LEFT_DCLICK = _core_.wxEVT_LEFT_DCLICK
2722 wxEVT_MIDDLE_DCLICK = _core_.wxEVT_MIDDLE_DCLICK
2723 wxEVT_RIGHT_DCLICK = _core_.wxEVT_RIGHT_DCLICK
2724 wxEVT_SET_FOCUS = _core_.wxEVT_SET_FOCUS
2725 wxEVT_KILL_FOCUS = _core_.wxEVT_KILL_FOCUS
2726 wxEVT_CHILD_FOCUS = _core_.wxEVT_CHILD_FOCUS
2727 wxEVT_MOUSEWHEEL = _core_.wxEVT_MOUSEWHEEL
2728 wxEVT_NC_LEFT_DOWN = _core_.wxEVT_NC_LEFT_DOWN
2729 wxEVT_NC_LEFT_UP = _core_.wxEVT_NC_LEFT_UP
2730 wxEVT_NC_MIDDLE_DOWN = _core_.wxEVT_NC_MIDDLE_DOWN
2731 wxEVT_NC_MIDDLE_UP = _core_.wxEVT_NC_MIDDLE_UP
2732 wxEVT_NC_RIGHT_DOWN = _core_.wxEVT_NC_RIGHT_DOWN
2733 wxEVT_NC_RIGHT_UP = _core_.wxEVT_NC_RIGHT_UP
2734 wxEVT_NC_MOTION = _core_.wxEVT_NC_MOTION
2735 wxEVT_NC_ENTER_WINDOW = _core_.wxEVT_NC_ENTER_WINDOW
2736 wxEVT_NC_LEAVE_WINDOW = _core_.wxEVT_NC_LEAVE_WINDOW
2737 wxEVT_NC_LEFT_DCLICK = _core_.wxEVT_NC_LEFT_DCLICK
2738 wxEVT_NC_MIDDLE_DCLICK = _core_.wxEVT_NC_MIDDLE_DCLICK
2739 wxEVT_NC_RIGHT_DCLICK = _core_.wxEVT_NC_RIGHT_DCLICK
2740 wxEVT_CHAR = _core_.wxEVT_CHAR
2741 wxEVT_CHAR_HOOK = _core_.wxEVT_CHAR_HOOK
2742 wxEVT_NAVIGATION_KEY = _core_.wxEVT_NAVIGATION_KEY
2743 wxEVT_KEY_DOWN = _core_.wxEVT_KEY_DOWN
2744 wxEVT_KEY_UP = _core_.wxEVT_KEY_UP
2745 wxEVT_HOTKEY = _core_.wxEVT_HOTKEY
2746 wxEVT_SET_CURSOR = _core_.wxEVT_SET_CURSOR
2747 wxEVT_SCROLL_TOP = _core_.wxEVT_SCROLL_TOP
2748 wxEVT_SCROLL_BOTTOM = _core_.wxEVT_SCROLL_BOTTOM
2749 wxEVT_SCROLL_LINEUP = _core_.wxEVT_SCROLL_LINEUP
2750 wxEVT_SCROLL_LINEDOWN = _core_.wxEVT_SCROLL_LINEDOWN
2751 wxEVT_SCROLL_PAGEUP = _core_.wxEVT_SCROLL_PAGEUP
2752 wxEVT_SCROLL_PAGEDOWN = _core_.wxEVT_SCROLL_PAGEDOWN
2753 wxEVT_SCROLL_THUMBTRACK = _core_.wxEVT_SCROLL_THUMBTRACK
2754 wxEVT_SCROLL_THUMBRELEASE = _core_.wxEVT_SCROLL_THUMBRELEASE
2755 wxEVT_SCROLL_ENDSCROLL = _core_.wxEVT_SCROLL_ENDSCROLL
2756 wxEVT_SCROLLWIN_TOP = _core_.wxEVT_SCROLLWIN_TOP
2757 wxEVT_SCROLLWIN_BOTTOM = _core_.wxEVT_SCROLLWIN_BOTTOM
2758 wxEVT_SCROLLWIN_LINEUP = _core_.wxEVT_SCROLLWIN_LINEUP
2759 wxEVT_SCROLLWIN_LINEDOWN = _core_.wxEVT_SCROLLWIN_LINEDOWN
2760 wxEVT_SCROLLWIN_PAGEUP = _core_.wxEVT_SCROLLWIN_PAGEUP
2761 wxEVT_SCROLLWIN_PAGEDOWN = _core_.wxEVT_SCROLLWIN_PAGEDOWN
2762 wxEVT_SCROLLWIN_THUMBTRACK = _core_.wxEVT_SCROLLWIN_THUMBTRACK
2763 wxEVT_SCROLLWIN_THUMBRELEASE = _core_.wxEVT_SCROLLWIN_THUMBRELEASE
2764 wxEVT_SIZE = _core_.wxEVT_SIZE
2765 wxEVT_MOVE = _core_.wxEVT_MOVE
2766 wxEVT_CLOSE_WINDOW = _core_.wxEVT_CLOSE_WINDOW
2767 wxEVT_END_SESSION = _core_.wxEVT_END_SESSION
2768 wxEVT_QUERY_END_SESSION = _core_.wxEVT_QUERY_END_SESSION
2769 wxEVT_ACTIVATE_APP = _core_.wxEVT_ACTIVATE_APP
2770 wxEVT_POWER = _core_.wxEVT_POWER
2771 wxEVT_ACTIVATE = _core_.wxEVT_ACTIVATE
2772 wxEVT_CREATE = _core_.wxEVT_CREATE
2773 wxEVT_DESTROY = _core_.wxEVT_DESTROY
2774 wxEVT_SHOW = _core_.wxEVT_SHOW
2775 wxEVT_ICONIZE = _core_.wxEVT_ICONIZE
2776 wxEVT_MAXIMIZE = _core_.wxEVT_MAXIMIZE
2777 wxEVT_MOUSE_CAPTURE_CHANGED = _core_.wxEVT_MOUSE_CAPTURE_CHANGED
2778 wxEVT_PAINT = _core_.wxEVT_PAINT
2779 wxEVT_ERASE_BACKGROUND = _core_.wxEVT_ERASE_BACKGROUND
2780 wxEVT_NC_PAINT = _core_.wxEVT_NC_PAINT
2781 wxEVT_PAINT_ICON = _core_.wxEVT_PAINT_ICON
2782 wxEVT_MENU_OPEN = _core_.wxEVT_MENU_OPEN
2783 wxEVT_MENU_CLOSE = _core_.wxEVT_MENU_CLOSE
2784 wxEVT_MENU_HIGHLIGHT = _core_.wxEVT_MENU_HIGHLIGHT
2785 wxEVT_CONTEXT_MENU = _core_.wxEVT_CONTEXT_MENU
2786 wxEVT_SYS_COLOUR_CHANGED = _core_.wxEVT_SYS_COLOUR_CHANGED
2787 wxEVT_DISPLAY_CHANGED = _core_.wxEVT_DISPLAY_CHANGED
2788 wxEVT_SETTING_CHANGED = _core_.wxEVT_SETTING_CHANGED
2789 wxEVT_QUERY_NEW_PALETTE = _core_.wxEVT_QUERY_NEW_PALETTE
2790 wxEVT_PALETTE_CHANGED = _core_.wxEVT_PALETTE_CHANGED
2791 wxEVT_DROP_FILES = _core_.wxEVT_DROP_FILES
2792 wxEVT_DRAW_ITEM = _core_.wxEVT_DRAW_ITEM
2793 wxEVT_MEASURE_ITEM = _core_.wxEVT_MEASURE_ITEM
2794 wxEVT_COMPARE_ITEM = _core_.wxEVT_COMPARE_ITEM
2795 wxEVT_INIT_DIALOG = _core_.wxEVT_INIT_DIALOG
2796 wxEVT_IDLE = _core_.wxEVT_IDLE
2797 wxEVT_UPDATE_UI = _core_.wxEVT_UPDATE_UI
2798 wxEVT_SIZING = _core_.wxEVT_SIZING
2799 wxEVT_MOVING = _core_.wxEVT_MOVING
2800 wxEVT_COMMAND_LEFT_CLICK = _core_.wxEVT_COMMAND_LEFT_CLICK
2801 wxEVT_COMMAND_LEFT_DCLICK = _core_.wxEVT_COMMAND_LEFT_DCLICK
2802 wxEVT_COMMAND_RIGHT_CLICK = _core_.wxEVT_COMMAND_RIGHT_CLICK
2803 wxEVT_COMMAND_RIGHT_DCLICK = _core_.wxEVT_COMMAND_RIGHT_DCLICK
2804 wxEVT_COMMAND_SET_FOCUS = _core_.wxEVT_COMMAND_SET_FOCUS
2805 wxEVT_COMMAND_KILL_FOCUS = _core_.wxEVT_COMMAND_KILL_FOCUS
2806 wxEVT_COMMAND_ENTER = _core_.wxEVT_COMMAND_ENTER
2807 #
2808 # Create some event binders
2809 EVT_SIZE = wx.PyEventBinder( wxEVT_SIZE )
2810 EVT_SIZING = wx.PyEventBinder( wxEVT_SIZING )
2811 EVT_MOVE = wx.PyEventBinder( wxEVT_MOVE )
2812 EVT_MOVING = wx.PyEventBinder( wxEVT_MOVING )
2813 EVT_CLOSE = wx.PyEventBinder( wxEVT_CLOSE_WINDOW )
2814 EVT_END_SESSION = wx.PyEventBinder( wxEVT_END_SESSION )
2815 EVT_QUERY_END_SESSION = wx.PyEventBinder( wxEVT_QUERY_END_SESSION )
2816 EVT_PAINT = wx.PyEventBinder( wxEVT_PAINT )
2817 EVT_NC_PAINT = wx.PyEventBinder( wxEVT_NC_PAINT )
2818 EVT_ERASE_BACKGROUND = wx.PyEventBinder( wxEVT_ERASE_BACKGROUND )
2819 EVT_CHAR = wx.PyEventBinder( wxEVT_CHAR )
2820 EVT_KEY_DOWN = wx.PyEventBinder( wxEVT_KEY_DOWN )
2821 EVT_KEY_UP = wx.PyEventBinder( wxEVT_KEY_UP )
2822 EVT_HOTKEY = wx.PyEventBinder( wxEVT_HOTKEY, 1)
2823 EVT_CHAR_HOOK = wx.PyEventBinder( wxEVT_CHAR_HOOK )
2824 EVT_MENU_OPEN = wx.PyEventBinder( wxEVT_MENU_OPEN )
2825 EVT_MENU_CLOSE = wx.PyEventBinder( wxEVT_MENU_CLOSE )
2826 EVT_MENU_HIGHLIGHT = wx.PyEventBinder( wxEVT_MENU_HIGHLIGHT, 1)
2827 EVT_MENU_HIGHLIGHT_ALL = wx.PyEventBinder( wxEVT_MENU_HIGHLIGHT )
2828 EVT_SET_FOCUS = wx.PyEventBinder( wxEVT_SET_FOCUS )
2829 EVT_KILL_FOCUS = wx.PyEventBinder( wxEVT_KILL_FOCUS )
2830 EVT_CHILD_FOCUS = wx.PyEventBinder( wxEVT_CHILD_FOCUS )
2831 EVT_ACTIVATE = wx.PyEventBinder( wxEVT_ACTIVATE )
2832 EVT_ACTIVATE_APP = wx.PyEventBinder( wxEVT_ACTIVATE_APP )
2833 EVT_END_SESSION = wx.PyEventBinder( wxEVT_END_SESSION )
2834 EVT_QUERY_END_SESSION = wx.PyEventBinder( wxEVT_QUERY_END_SESSION )
2835 EVT_DROP_FILES = wx.PyEventBinder( wxEVT_DROP_FILES )
2836 EVT_INIT_DIALOG = wx.PyEventBinder( wxEVT_INIT_DIALOG )
2837 EVT_SYS_COLOUR_CHANGED = wx.PyEventBinder( wxEVT_SYS_COLOUR_CHANGED )
2838 EVT_DISPLAY_CHANGED = wx.PyEventBinder( wxEVT_DISPLAY_CHANGED )
2839 EVT_SHOW = wx.PyEventBinder( wxEVT_SHOW )
2840 EVT_MAXIMIZE = wx.PyEventBinder( wxEVT_MAXIMIZE )
2841 EVT_ICONIZE = wx.PyEventBinder( wxEVT_ICONIZE )
2842 EVT_NAVIGATION_KEY = wx.PyEventBinder( wxEVT_NAVIGATION_KEY )
2843 EVT_PALETTE_CHANGED = wx.PyEventBinder( wxEVT_PALETTE_CHANGED )
2844 EVT_QUERY_NEW_PALETTE = wx.PyEventBinder( wxEVT_QUERY_NEW_PALETTE )
2845 EVT_WINDOW_CREATE = wx.PyEventBinder( wxEVT_CREATE )
2846 EVT_WINDOW_DESTROY = wx.PyEventBinder( wxEVT_DESTROY )
2847 EVT_SET_CURSOR = wx.PyEventBinder( wxEVT_SET_CURSOR )
2848 EVT_MOUSE_CAPTURE_CHANGED = wx.PyEventBinder( wxEVT_MOUSE_CAPTURE_CHANGED )
2849
2850 EVT_LEFT_DOWN = wx.PyEventBinder( wxEVT_LEFT_DOWN )
2851 EVT_LEFT_UP = wx.PyEventBinder( wxEVT_LEFT_UP )
2852 EVT_MIDDLE_DOWN = wx.PyEventBinder( wxEVT_MIDDLE_DOWN )
2853 EVT_MIDDLE_UP = wx.PyEventBinder( wxEVT_MIDDLE_UP )
2854 EVT_RIGHT_DOWN = wx.PyEventBinder( wxEVT_RIGHT_DOWN )
2855 EVT_RIGHT_UP = wx.PyEventBinder( wxEVT_RIGHT_UP )
2856 EVT_MOTION = wx.PyEventBinder( wxEVT_MOTION )
2857 EVT_LEFT_DCLICK = wx.PyEventBinder( wxEVT_LEFT_DCLICK )
2858 EVT_MIDDLE_DCLICK = wx.PyEventBinder( wxEVT_MIDDLE_DCLICK )
2859 EVT_RIGHT_DCLICK = wx.PyEventBinder( wxEVT_RIGHT_DCLICK )
2860 EVT_LEAVE_WINDOW = wx.PyEventBinder( wxEVT_LEAVE_WINDOW )
2861 EVT_ENTER_WINDOW = wx.PyEventBinder( wxEVT_ENTER_WINDOW )
2862 EVT_MOUSEWHEEL = wx.PyEventBinder( wxEVT_MOUSEWHEEL )
2863
2864 EVT_MOUSE_EVENTS = wx.PyEventBinder([ wxEVT_LEFT_DOWN,
2865 wxEVT_LEFT_UP,
2866 wxEVT_MIDDLE_DOWN,
2867 wxEVT_MIDDLE_UP,
2868 wxEVT_RIGHT_DOWN,
2869 wxEVT_RIGHT_UP,
2870 wxEVT_MOTION,
2871 wxEVT_LEFT_DCLICK,
2872 wxEVT_MIDDLE_DCLICK,
2873 wxEVT_RIGHT_DCLICK,
2874 wxEVT_ENTER_WINDOW,
2875 wxEVT_LEAVE_WINDOW,
2876 wxEVT_MOUSEWHEEL
2877 ])
2878
2879
2880 # Scrolling from wxWindow (sent to wxScrolledWindow)
2881 EVT_SCROLLWIN = wx.PyEventBinder([ wxEVT_SCROLLWIN_TOP,
2882 wxEVT_SCROLLWIN_BOTTOM,
2883 wxEVT_SCROLLWIN_LINEUP,
2884 wxEVT_SCROLLWIN_LINEDOWN,
2885 wxEVT_SCROLLWIN_PAGEUP,
2886 wxEVT_SCROLLWIN_PAGEDOWN,
2887 wxEVT_SCROLLWIN_THUMBTRACK,
2888 wxEVT_SCROLLWIN_THUMBRELEASE,
2889 ])
2890
2891 EVT_SCROLLWIN_TOP = wx.PyEventBinder( wxEVT_SCROLLWIN_TOP )
2892 EVT_SCROLLWIN_BOTTOM = wx.PyEventBinder( wxEVT_SCROLLWIN_BOTTOM )
2893 EVT_SCROLLWIN_LINEUP = wx.PyEventBinder( wxEVT_SCROLLWIN_LINEUP )
2894 EVT_SCROLLWIN_LINEDOWN = wx.PyEventBinder( wxEVT_SCROLLWIN_LINEDOWN )
2895 EVT_SCROLLWIN_PAGEUP = wx.PyEventBinder( wxEVT_SCROLLWIN_PAGEUP )
2896 EVT_SCROLLWIN_PAGEDOWN = wx.PyEventBinder( wxEVT_SCROLLWIN_PAGEDOWN )
2897 EVT_SCROLLWIN_THUMBTRACK = wx.PyEventBinder( wxEVT_SCROLLWIN_THUMBTRACK )
2898 EVT_SCROLLWIN_THUMBRELEASE = wx.PyEventBinder( wxEVT_SCROLLWIN_THUMBRELEASE )
2899
2900 # Scrolling from wxSlider and wxScrollBar
2901 EVT_SCROLL = wx.PyEventBinder([ wxEVT_SCROLL_TOP,
2902 wxEVT_SCROLL_BOTTOM,
2903 wxEVT_SCROLL_LINEUP,
2904 wxEVT_SCROLL_LINEDOWN,
2905 wxEVT_SCROLL_PAGEUP,
2906 wxEVT_SCROLL_PAGEDOWN,
2907 wxEVT_SCROLL_THUMBTRACK,
2908 wxEVT_SCROLL_THUMBRELEASE,
2909 wxEVT_SCROLL_ENDSCROLL,
2910 ])
2911
2912 EVT_SCROLL_TOP = wx.PyEventBinder( wxEVT_SCROLL_TOP )
2913 EVT_SCROLL_BOTTOM = wx.PyEventBinder( wxEVT_SCROLL_BOTTOM )
2914 EVT_SCROLL_LINEUP = wx.PyEventBinder( wxEVT_SCROLL_LINEUP )
2915 EVT_SCROLL_LINEDOWN = wx.PyEventBinder( wxEVT_SCROLL_LINEDOWN )
2916 EVT_SCROLL_PAGEUP = wx.PyEventBinder( wxEVT_SCROLL_PAGEUP )
2917 EVT_SCROLL_PAGEDOWN = wx.PyEventBinder( wxEVT_SCROLL_PAGEDOWN )
2918 EVT_SCROLL_THUMBTRACK = wx.PyEventBinder( wxEVT_SCROLL_THUMBTRACK )
2919 EVT_SCROLL_THUMBRELEASE = wx.PyEventBinder( wxEVT_SCROLL_THUMBRELEASE )
2920 EVT_SCROLL_ENDSCROLL = wx.PyEventBinder( wxEVT_SCROLL_ENDSCROLL )
2921
2922 # Scrolling from wxSlider and wxScrollBar, with an id
2923 EVT_COMMAND_SCROLL = wx.PyEventBinder([ wxEVT_SCROLL_TOP,
2924 wxEVT_SCROLL_BOTTOM,
2925 wxEVT_SCROLL_LINEUP,
2926 wxEVT_SCROLL_LINEDOWN,
2927 wxEVT_SCROLL_PAGEUP,
2928 wxEVT_SCROLL_PAGEDOWN,
2929 wxEVT_SCROLL_THUMBTRACK,
2930 wxEVT_SCROLL_THUMBRELEASE,
2931 wxEVT_SCROLL_ENDSCROLL,
2932 ], 1)
2933
2934 EVT_COMMAND_SCROLL_TOP = wx.PyEventBinder( wxEVT_SCROLL_TOP, 1)
2935 EVT_COMMAND_SCROLL_BOTTOM = wx.PyEventBinder( wxEVT_SCROLL_BOTTOM, 1)
2936 EVT_COMMAND_SCROLL_LINEUP = wx.PyEventBinder( wxEVT_SCROLL_LINEUP, 1)
2937 EVT_COMMAND_SCROLL_LINEDOWN = wx.PyEventBinder( wxEVT_SCROLL_LINEDOWN, 1)
2938 EVT_COMMAND_SCROLL_PAGEUP = wx.PyEventBinder( wxEVT_SCROLL_PAGEUP, 1)
2939 EVT_COMMAND_SCROLL_PAGEDOWN = wx.PyEventBinder( wxEVT_SCROLL_PAGEDOWN, 1)
2940 EVT_COMMAND_SCROLL_THUMBTRACK = wx.PyEventBinder( wxEVT_SCROLL_THUMBTRACK, 1)
2941 EVT_COMMAND_SCROLL_THUMBRELEASE = wx.PyEventBinder( wxEVT_SCROLL_THUMBRELEASE, 1)
2942 EVT_COMMAND_SCROLL_ENDSCROLL = wx.PyEventBinder( wxEVT_SCROLL_ENDSCROLL, 1)
2943
2944 EVT_BUTTON = wx.PyEventBinder( wxEVT_COMMAND_BUTTON_CLICKED, 1)
2945 EVT_CHECKBOX = wx.PyEventBinder( wxEVT_COMMAND_CHECKBOX_CLICKED, 1)
2946 EVT_CHOICE = wx.PyEventBinder( wxEVT_COMMAND_CHOICE_SELECTED, 1)
2947 EVT_LISTBOX = wx.PyEventBinder( wxEVT_COMMAND_LISTBOX_SELECTED, 1)
2948 EVT_LISTBOX_DCLICK = wx.PyEventBinder( wxEVT_COMMAND_LISTBOX_DOUBLECLICKED, 1)
2949 EVT_MENU = wx.PyEventBinder( wxEVT_COMMAND_MENU_SELECTED, 1)
2950 EVT_MENU_RANGE = wx.PyEventBinder( wxEVT_COMMAND_MENU_SELECTED, 2)
2951 EVT_SLIDER = wx.PyEventBinder( wxEVT_COMMAND_SLIDER_UPDATED, 1)
2952 EVT_RADIOBOX = wx.PyEventBinder( wxEVT_COMMAND_RADIOBOX_SELECTED, 1)
2953 EVT_RADIOBUTTON = wx.PyEventBinder( wxEVT_COMMAND_RADIOBUTTON_SELECTED, 1)
2954
2955 EVT_SCROLLBAR = wx.PyEventBinder( wxEVT_COMMAND_SCROLLBAR_UPDATED, 1)
2956 EVT_VLBOX = wx.PyEventBinder( wxEVT_COMMAND_VLBOX_SELECTED, 1)
2957 EVT_COMBOBOX = wx.PyEventBinder( wxEVT_COMMAND_COMBOBOX_SELECTED, 1)
2958 EVT_TOOL = wx.PyEventBinder( wxEVT_COMMAND_TOOL_CLICKED, 1)
2959 EVT_TOOL_RANGE = wx.PyEventBinder( wxEVT_COMMAND_TOOL_CLICKED, 2)
2960 EVT_TOOL_RCLICKED = wx.PyEventBinder( wxEVT_COMMAND_TOOL_RCLICKED, 1)
2961 EVT_TOOL_RCLICKED_RANGE = wx.PyEventBinder( wxEVT_COMMAND_TOOL_RCLICKED, 2)
2962 EVT_TOOL_ENTER = wx.PyEventBinder( wxEVT_COMMAND_TOOL_ENTER, 1)
2963 EVT_CHECKLISTBOX = wx.PyEventBinder( wxEVT_COMMAND_CHECKLISTBOX_TOGGLED, 1)
2964
2965
2966 EVT_COMMAND_LEFT_CLICK = wx.PyEventBinder( wxEVT_COMMAND_LEFT_CLICK, 1)
2967 EVT_COMMAND_LEFT_DCLICK = wx.PyEventBinder( wxEVT_COMMAND_LEFT_DCLICK, 1)
2968 EVT_COMMAND_RIGHT_CLICK = wx.PyEventBinder( wxEVT_COMMAND_RIGHT_CLICK, 1)
2969 EVT_COMMAND_RIGHT_DCLICK = wx.PyEventBinder( wxEVT_COMMAND_RIGHT_DCLICK, 1)
2970 EVT_COMMAND_SET_FOCUS = wx.PyEventBinder( wxEVT_COMMAND_SET_FOCUS, 1)
2971 EVT_COMMAND_KILL_FOCUS = wx.PyEventBinder( wxEVT_COMMAND_KILL_FOCUS, 1)
2972 EVT_COMMAND_ENTER = wx.PyEventBinder( wxEVT_COMMAND_ENTER, 1)
2973
2974 EVT_IDLE = wx.PyEventBinder( wxEVT_IDLE )
2975
2976 EVT_UPDATE_UI = wx.PyEventBinder( wxEVT_UPDATE_UI, 1)
2977 EVT_UPDATE_UI_RANGE = wx.PyEventBinder( wxEVT_UPDATE_UI, 2)
2978
2979 EVT_CONTEXT_MENU = wx.PyEventBinder( wxEVT_CONTEXT_MENU )
2980
2981
2982
2983 #---------------------------------------------------------------------------
2984
2985 class Event(Object):
2986 def __init__(self): raise RuntimeError, "No constructor defined"
2987 def __repr__(self):
2988 return "<%s.%s; proxy of C++ wxEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
2989 def __del__(self, destroy=_core_.delete_Event):
2990 """__del__(self)"""
2991 try:
2992 if self.thisown: destroy(self)
2993 except: pass
2994
2995 def SetEventType(*args, **kwargs):
2996 """SetEventType(self, wxEventType typ)"""
2997 return _core_.Event_SetEventType(*args, **kwargs)
2998
2999 def GetEventType(*args, **kwargs):
3000 """GetEventType(self) -> wxEventType"""
3001 return _core_.Event_GetEventType(*args, **kwargs)
3002
3003 def GetEventObject(*args, **kwargs):
3004 """GetEventObject(self) -> Object"""
3005 return _core_.Event_GetEventObject(*args, **kwargs)
3006
3007 def SetEventObject(*args, **kwargs):
3008 """SetEventObject(self, Object obj)"""
3009 return _core_.Event_SetEventObject(*args, **kwargs)
3010
3011 def GetTimestamp(*args, **kwargs):
3012 """GetTimestamp(self) -> long"""
3013 return _core_.Event_GetTimestamp(*args, **kwargs)
3014
3015 def SetTimestamp(*args, **kwargs):
3016 """SetTimestamp(self, long ts=0)"""
3017 return _core_.Event_SetTimestamp(*args, **kwargs)
3018
3019 def GetId(*args, **kwargs):
3020 """GetId(self) -> int"""
3021 return _core_.Event_GetId(*args, **kwargs)
3022
3023 def SetId(*args, **kwargs):
3024 """SetId(self, int Id)"""
3025 return _core_.Event_SetId(*args, **kwargs)
3026
3027 def IsCommandEvent(*args, **kwargs):
3028 """IsCommandEvent(self) -> bool"""
3029 return _core_.Event_IsCommandEvent(*args, **kwargs)
3030
3031 def Skip(*args, **kwargs):
3032 """Skip(self, bool skip=True)"""
3033 return _core_.Event_Skip(*args, **kwargs)
3034
3035 def GetSkipped(*args, **kwargs):
3036 """GetSkipped(self) -> bool"""
3037 return _core_.Event_GetSkipped(*args, **kwargs)
3038
3039 def ShouldPropagate(*args, **kwargs):
3040 """ShouldPropagate(self) -> bool"""
3041 return _core_.Event_ShouldPropagate(*args, **kwargs)
3042
3043 def StopPropagation(*args, **kwargs):
3044 """StopPropagation(self) -> int"""
3045 return _core_.Event_StopPropagation(*args, **kwargs)
3046
3047 def ResumePropagation(*args, **kwargs):
3048 """ResumePropagation(self, int propagationLevel)"""
3049 return _core_.Event_ResumePropagation(*args, **kwargs)
3050
3051 def Clone(*args, **kwargs):
3052 """Clone(self) -> Event"""
3053 return _core_.Event_Clone(*args, **kwargs)
3054
3055
3056 class EventPtr(Event):
3057 def __init__(self, this):
3058 self.this = this
3059 if not hasattr(self,"thisown"): self.thisown = 0
3060 self.__class__ = Event
3061 _core_.Event_swigregister(EventPtr)
3062
3063 #---------------------------------------------------------------------------
3064
3065 class PropagationDisabler(object):
3066 def __repr__(self):
3067 return "<%s.%s; proxy of C++ wxPropagationDisabler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
3068 def __init__(self, *args, **kwargs):
3069 """__init__(self, Event event) -> PropagationDisabler"""
3070 newobj = _core_.new_PropagationDisabler(*args, **kwargs)
3071 self.this = newobj.this
3072 self.thisown = 1
3073 del newobj.thisown
3074 def __del__(self, destroy=_core_.delete_PropagationDisabler):
3075 """__del__(self)"""
3076 try:
3077 if self.thisown: destroy(self)
3078 except: pass
3079
3080
3081 class PropagationDisablerPtr(PropagationDisabler):
3082 def __init__(self, this):
3083 self.this = this
3084 if not hasattr(self,"thisown"): self.thisown = 0
3085 self.__class__ = PropagationDisabler
3086 _core_.PropagationDisabler_swigregister(PropagationDisablerPtr)
3087
3088 class PropagateOnce(object):
3089 def __repr__(self):
3090 return "<%s.%s; proxy of C++ wxPropagateOnce instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
3091 def __init__(self, *args, **kwargs):
3092 """__init__(self, Event event) -> PropagateOnce"""
3093 newobj = _core_.new_PropagateOnce(*args, **kwargs)
3094 self.this = newobj.this
3095 self.thisown = 1
3096 del newobj.thisown
3097 def __del__(self, destroy=_core_.delete_PropagateOnce):
3098 """__del__(self)"""
3099 try:
3100 if self.thisown: destroy(self)
3101 except: pass
3102
3103
3104 class PropagateOncePtr(PropagateOnce):
3105 def __init__(self, this):
3106 self.this = this
3107 if not hasattr(self,"thisown"): self.thisown = 0
3108 self.__class__ = PropagateOnce
3109 _core_.PropagateOnce_swigregister(PropagateOncePtr)
3110
3111 #---------------------------------------------------------------------------
3112
3113 class CommandEvent(Event):
3114 def __repr__(self):
3115 return "<%s.%s; proxy of C++ wxCommandEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
3116 def __init__(self, *args, **kwargs):
3117 """__init__(self, wxEventType commandType=wxEVT_NULL, int winid=0) -> CommandEvent"""
3118 newobj = _core_.new_CommandEvent(*args, **kwargs)
3119 self.this = newobj.this
3120 self.thisown = 1
3121 del newobj.thisown
3122 def GetSelection(*args, **kwargs):
3123 """GetSelection(self) -> int"""
3124 return _core_.CommandEvent_GetSelection(*args, **kwargs)
3125
3126 def SetString(*args, **kwargs):
3127 """SetString(self, String s)"""
3128 return _core_.CommandEvent_SetString(*args, **kwargs)
3129
3130 def GetString(*args, **kwargs):
3131 """GetString(self) -> String"""
3132 return _core_.CommandEvent_GetString(*args, **kwargs)
3133
3134 def IsChecked(*args, **kwargs):
3135 """IsChecked(self) -> bool"""
3136 return _core_.CommandEvent_IsChecked(*args, **kwargs)
3137
3138 Checked = IsChecked
3139 def IsSelection(*args, **kwargs):
3140 """IsSelection(self) -> bool"""
3141 return _core_.CommandEvent_IsSelection(*args, **kwargs)
3142
3143 def SetExtraLong(*args, **kwargs):
3144 """SetExtraLong(self, long extraLong)"""
3145 return _core_.CommandEvent_SetExtraLong(*args, **kwargs)
3146
3147 def GetExtraLong(*args, **kwargs):
3148 """GetExtraLong(self) -> long"""
3149 return _core_.CommandEvent_GetExtraLong(*args, **kwargs)
3150
3151 def SetInt(*args, **kwargs):
3152 """SetInt(self, int i)"""
3153 return _core_.CommandEvent_SetInt(*args, **kwargs)
3154
3155 def GetInt(*args, **kwargs):
3156 """GetInt(self) -> long"""
3157 return _core_.CommandEvent_GetInt(*args, **kwargs)
3158
3159 def Clone(*args, **kwargs):
3160 """Clone(self) -> Event"""
3161 return _core_.CommandEvent_Clone(*args, **kwargs)
3162
3163
3164 class CommandEventPtr(CommandEvent):
3165 def __init__(self, this):
3166 self.this = this
3167 if not hasattr(self,"thisown"): self.thisown = 0
3168 self.__class__ = CommandEvent
3169 _core_.CommandEvent_swigregister(CommandEventPtr)
3170
3171 #---------------------------------------------------------------------------
3172
3173 class NotifyEvent(CommandEvent):
3174 def __repr__(self):
3175 return "<%s.%s; proxy of C++ wxNotifyEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
3176 def __init__(self, *args, **kwargs):
3177 """__init__(self, wxEventType commandType=wxEVT_NULL, int winid=0) -> NotifyEvent"""
3178 newobj = _core_.new_NotifyEvent(*args, **kwargs)
3179 self.this = newobj.this
3180 self.thisown = 1
3181 del newobj.thisown
3182 def Veto(*args, **kwargs):
3183 """Veto(self)"""
3184 return _core_.NotifyEvent_Veto(*args, **kwargs)
3185
3186 def Allow(*args, **kwargs):
3187 """Allow(self)"""
3188 return _core_.NotifyEvent_Allow(*args, **kwargs)
3189
3190 def IsAllowed(*args, **kwargs):
3191 """IsAllowed(self) -> bool"""
3192 return _core_.NotifyEvent_IsAllowed(*args, **kwargs)
3193
3194
3195 class NotifyEventPtr(NotifyEvent):
3196 def __init__(self, this):
3197 self.this = this
3198 if not hasattr(self,"thisown"): self.thisown = 0
3199 self.__class__ = NotifyEvent
3200 _core_.NotifyEvent_swigregister(NotifyEventPtr)
3201
3202 #---------------------------------------------------------------------------
3203
3204 class ScrollEvent(CommandEvent):
3205 def __repr__(self):
3206 return "<%s.%s; proxy of C++ wxScrollEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
3207 def __init__(self, *args, **kwargs):
3208 """
3209 __init__(self, wxEventType commandType=wxEVT_NULL, int winid=0, int pos=0,
3210 int orient=0) -> ScrollEvent
3211 """
3212 newobj = _core_.new_ScrollEvent(*args, **kwargs)
3213 self.this = newobj.this
3214 self.thisown = 1
3215 del newobj.thisown
3216 def GetOrientation(*args, **kwargs):
3217 """GetOrientation(self) -> int"""
3218 return _core_.ScrollEvent_GetOrientation(*args, **kwargs)
3219
3220 def GetPosition(*args, **kwargs):
3221 """GetPosition(self) -> int"""
3222 return _core_.ScrollEvent_GetPosition(*args, **kwargs)
3223
3224 def SetOrientation(*args, **kwargs):
3225 """SetOrientation(self, int orient)"""
3226 return _core_.ScrollEvent_SetOrientation(*args, **kwargs)
3227
3228 def SetPosition(*args, **kwargs):
3229 """SetPosition(self, int pos)"""
3230 return _core_.ScrollEvent_SetPosition(*args, **kwargs)
3231
3232
3233 class ScrollEventPtr(ScrollEvent):
3234 def __init__(self, this):
3235 self.this = this
3236 if not hasattr(self,"thisown"): self.thisown = 0
3237 self.__class__ = ScrollEvent
3238 _core_.ScrollEvent_swigregister(ScrollEventPtr)
3239
3240 #---------------------------------------------------------------------------
3241
3242 class ScrollWinEvent(Event):
3243 def __repr__(self):
3244 return "<%s.%s; proxy of C++ wxScrollWinEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
3245 def __init__(self, *args, **kwargs):
3246 """__init__(self, wxEventType commandType=wxEVT_NULL, int pos=0, int orient=0) -> ScrollWinEvent"""
3247 newobj = _core_.new_ScrollWinEvent(*args, **kwargs)
3248 self.this = newobj.this
3249 self.thisown = 1
3250 del newobj.thisown
3251 def GetOrientation(*args, **kwargs):
3252 """GetOrientation(self) -> int"""
3253 return _core_.ScrollWinEvent_GetOrientation(*args, **kwargs)
3254
3255 def GetPosition(*args, **kwargs):
3256 """GetPosition(self) -> int"""
3257 return _core_.ScrollWinEvent_GetPosition(*args, **kwargs)
3258
3259 def SetOrientation(*args, **kwargs):
3260 """SetOrientation(self, int orient)"""
3261 return _core_.ScrollWinEvent_SetOrientation(*args, **kwargs)
3262
3263 def SetPosition(*args, **kwargs):
3264 """SetPosition(self, int pos)"""
3265 return _core_.ScrollWinEvent_SetPosition(*args, **kwargs)
3266
3267
3268 class ScrollWinEventPtr(ScrollWinEvent):
3269 def __init__(self, this):
3270 self.this = this
3271 if not hasattr(self,"thisown"): self.thisown = 0
3272 self.__class__ = ScrollWinEvent
3273 _core_.ScrollWinEvent_swigregister(ScrollWinEventPtr)
3274
3275 #---------------------------------------------------------------------------
3276
3277 MOUSE_BTN_ANY = _core_.MOUSE_BTN_ANY
3278 MOUSE_BTN_NONE = _core_.MOUSE_BTN_NONE
3279 MOUSE_BTN_LEFT = _core_.MOUSE_BTN_LEFT
3280 MOUSE_BTN_MIDDLE = _core_.MOUSE_BTN_MIDDLE
3281 MOUSE_BTN_RIGHT = _core_.MOUSE_BTN_RIGHT
3282 class MouseEvent(Event):
3283 def __repr__(self):
3284 return "<%s.%s; proxy of C++ wxMouseEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
3285 def __init__(self, *args, **kwargs):
3286 """__init__(self, wxEventType mouseType=wxEVT_NULL) -> MouseEvent"""
3287 newobj = _core_.new_MouseEvent(*args, **kwargs)
3288 self.this = newobj.this
3289 self.thisown = 1
3290 del newobj.thisown
3291 def IsButton(*args, **kwargs):
3292 """IsButton(self) -> bool"""
3293 return _core_.MouseEvent_IsButton(*args, **kwargs)
3294
3295 def ButtonDown(*args, **kwargs):
3296 """ButtonDown(self, int but=MOUSE_BTN_ANY) -> bool"""
3297 return _core_.MouseEvent_ButtonDown(*args, **kwargs)
3298
3299 def ButtonDClick(*args, **kwargs):
3300 """ButtonDClick(self, int but=MOUSE_BTN_ANY) -> bool"""
3301 return _core_.MouseEvent_ButtonDClick(*args, **kwargs)
3302
3303 def ButtonUp(*args, **kwargs):
3304 """ButtonUp(self, int but=MOUSE_BTN_ANY) -> bool"""
3305 return _core_.MouseEvent_ButtonUp(*args, **kwargs)
3306
3307 def Button(*args, **kwargs):
3308 """Button(self, int but) -> bool"""
3309 return _core_.MouseEvent_Button(*args, **kwargs)
3310
3311 def ButtonIsDown(*args, **kwargs):
3312 """ButtonIsDown(self, int but) -> bool"""
3313 return _core_.MouseEvent_ButtonIsDown(*args, **kwargs)
3314
3315 def GetButton(*args, **kwargs):
3316 """GetButton(self) -> int"""
3317 return _core_.MouseEvent_GetButton(*args, **kwargs)
3318
3319 def ControlDown(*args, **kwargs):
3320 """ControlDown(self) -> bool"""
3321 return _core_.MouseEvent_ControlDown(*args, **kwargs)
3322
3323 def MetaDown(*args, **kwargs):
3324 """MetaDown(self) -> bool"""
3325 return _core_.MouseEvent_MetaDown(*args, **kwargs)
3326
3327 def AltDown(*args, **kwargs):
3328 """AltDown(self) -> bool"""
3329 return _core_.MouseEvent_AltDown(*args, **kwargs)
3330
3331 def ShiftDown(*args, **kwargs):
3332 """ShiftDown(self) -> bool"""
3333 return _core_.MouseEvent_ShiftDown(*args, **kwargs)
3334
3335 def LeftDown(*args, **kwargs):
3336 """LeftDown(self) -> bool"""
3337 return _core_.MouseEvent_LeftDown(*args, **kwargs)
3338
3339 def MiddleDown(*args, **kwargs):
3340 """MiddleDown(self) -> bool"""
3341 return _core_.MouseEvent_MiddleDown(*args, **kwargs)
3342
3343 def RightDown(*args, **kwargs):
3344 """RightDown(self) -> bool"""
3345 return _core_.MouseEvent_RightDown(*args, **kwargs)
3346
3347 def LeftUp(*args, **kwargs):
3348 """LeftUp(self) -> bool"""
3349 return _core_.MouseEvent_LeftUp(*args, **kwargs)
3350
3351 def MiddleUp(*args, **kwargs):
3352 """MiddleUp(self) -> bool"""
3353 return _core_.MouseEvent_MiddleUp(*args, **kwargs)
3354
3355 def RightUp(*args, **kwargs):
3356 """RightUp(self) -> bool"""
3357 return _core_.MouseEvent_RightUp(*args, **kwargs)
3358
3359 def LeftDClick(*args, **kwargs):
3360 """LeftDClick(self) -> bool"""
3361 return _core_.MouseEvent_LeftDClick(*args, **kwargs)
3362
3363 def MiddleDClick(*args, **kwargs):
3364 """MiddleDClick(self) -> bool"""
3365 return _core_.MouseEvent_MiddleDClick(*args, **kwargs)
3366
3367 def RightDClick(*args, **kwargs):
3368 """RightDClick(self) -> bool"""
3369 return _core_.MouseEvent_RightDClick(*args, **kwargs)
3370
3371 def LeftIsDown(*args, **kwargs):
3372 """LeftIsDown(self) -> bool"""
3373 return _core_.MouseEvent_LeftIsDown(*args, **kwargs)
3374
3375 def MiddleIsDown(*args, **kwargs):
3376 """MiddleIsDown(self) -> bool"""
3377 return _core_.MouseEvent_MiddleIsDown(*args, **kwargs)
3378
3379 def RightIsDown(*args, **kwargs):
3380 """RightIsDown(self) -> bool"""
3381 return _core_.MouseEvent_RightIsDown(*args, **kwargs)
3382
3383 def Dragging(*args, **kwargs):
3384 """Dragging(self) -> bool"""
3385 return _core_.MouseEvent_Dragging(*args, **kwargs)
3386
3387 def Moving(*args, **kwargs):
3388 """Moving(self) -> bool"""
3389 return _core_.MouseEvent_Moving(*args, **kwargs)
3390
3391 def Entering(*args, **kwargs):
3392 """Entering(self) -> bool"""
3393 return _core_.MouseEvent_Entering(*args, **kwargs)
3394
3395 def Leaving(*args, **kwargs):
3396 """Leaving(self) -> bool"""
3397 return _core_.MouseEvent_Leaving(*args, **kwargs)
3398
3399 def GetPosition(*args, **kwargs):
3400 """
3401 GetPosition(self) -> Point
3402
3403 Returns the position of the mouse in window coordinates when the event happened.
3404 """
3405 return _core_.MouseEvent_GetPosition(*args, **kwargs)
3406
3407 def GetPositionTuple(*args, **kwargs):
3408 """
3409 GetPositionTuple() -> (x,y)
3410
3411 Returns the position of the mouse in window coordinates when the event happened.
3412 """
3413 return _core_.MouseEvent_GetPositionTuple(*args, **kwargs)
3414
3415 def GetLogicalPosition(*args, **kwargs):
3416 """GetLogicalPosition(self, DC dc) -> Point"""
3417 return _core_.MouseEvent_GetLogicalPosition(*args, **kwargs)
3418
3419 def GetX(*args, **kwargs):
3420 """GetX(self) -> int"""
3421 return _core_.MouseEvent_GetX(*args, **kwargs)
3422
3423 def GetY(*args, **kwargs):
3424 """GetY(self) -> int"""
3425 return _core_.MouseEvent_GetY(*args, **kwargs)
3426
3427 def GetWheelRotation(*args, **kwargs):
3428 """GetWheelRotation(self) -> int"""
3429 return _core_.MouseEvent_GetWheelRotation(*args, **kwargs)
3430
3431 def GetWheelDelta(*args, **kwargs):
3432 """GetWheelDelta(self) -> int"""
3433 return _core_.MouseEvent_GetWheelDelta(*args, **kwargs)
3434
3435 def GetLinesPerAction(*args, **kwargs):
3436 """GetLinesPerAction(self) -> int"""
3437 return _core_.MouseEvent_GetLinesPerAction(*args, **kwargs)
3438
3439 def IsPageScroll(*args, **kwargs):
3440 """IsPageScroll(self) -> bool"""
3441 return _core_.MouseEvent_IsPageScroll(*args, **kwargs)
3442
3443 m_x = property(_core_.MouseEvent_m_x_get, _core_.MouseEvent_m_x_set)
3444 m_y = property(_core_.MouseEvent_m_y_get, _core_.MouseEvent_m_y_set)
3445 m_leftDown = property(_core_.MouseEvent_m_leftDown_get, _core_.MouseEvent_m_leftDown_set)
3446 m_middleDown = property(_core_.MouseEvent_m_middleDown_get, _core_.MouseEvent_m_middleDown_set)
3447 m_rightDown = property(_core_.MouseEvent_m_rightDown_get, _core_.MouseEvent_m_rightDown_set)
3448 m_controlDown = property(_core_.MouseEvent_m_controlDown_get, _core_.MouseEvent_m_controlDown_set)
3449 m_shiftDown = property(_core_.MouseEvent_m_shiftDown_get, _core_.MouseEvent_m_shiftDown_set)
3450 m_altDown = property(_core_.MouseEvent_m_altDown_get, _core_.MouseEvent_m_altDown_set)
3451 m_metaDown = property(_core_.MouseEvent_m_metaDown_get, _core_.MouseEvent_m_metaDown_set)
3452 m_wheelRotation = property(_core_.MouseEvent_m_wheelRotation_get, _core_.MouseEvent_m_wheelRotation_set)
3453 m_wheelDelta = property(_core_.MouseEvent_m_wheelDelta_get, _core_.MouseEvent_m_wheelDelta_set)
3454 m_linesPerAction = property(_core_.MouseEvent_m_linesPerAction_get, _core_.MouseEvent_m_linesPerAction_set)
3455
3456 class MouseEventPtr(MouseEvent):
3457 def __init__(self, this):
3458 self.this = this
3459 if not hasattr(self,"thisown"): self.thisown = 0
3460 self.__class__ = MouseEvent
3461 _core_.MouseEvent_swigregister(MouseEventPtr)
3462
3463 #---------------------------------------------------------------------------
3464
3465 class SetCursorEvent(Event):
3466 def __repr__(self):
3467 return "<%s.%s; proxy of C++ wxSetCursorEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
3468 def __init__(self, *args, **kwargs):
3469 """__init__(self, int x=0, int y=0) -> SetCursorEvent"""
3470 newobj = _core_.new_SetCursorEvent(*args, **kwargs)
3471 self.this = newobj.this
3472 self.thisown = 1
3473 del newobj.thisown
3474 def GetX(*args, **kwargs):
3475 """GetX(self) -> int"""
3476 return _core_.SetCursorEvent_GetX(*args, **kwargs)
3477
3478 def GetY(*args, **kwargs):
3479 """GetY(self) -> int"""
3480 return _core_.SetCursorEvent_GetY(*args, **kwargs)
3481
3482 def SetCursor(*args, **kwargs):
3483 """SetCursor(self, Cursor cursor)"""
3484 return _core_.SetCursorEvent_SetCursor(*args, **kwargs)
3485
3486 def GetCursor(*args, **kwargs):
3487 """GetCursor(self) -> Cursor"""
3488 return _core_.SetCursorEvent_GetCursor(*args, **kwargs)
3489
3490 def HasCursor(*args, **kwargs):
3491 """HasCursor(self) -> bool"""
3492 return _core_.SetCursorEvent_HasCursor(*args, **kwargs)
3493
3494
3495 class SetCursorEventPtr(SetCursorEvent):
3496 def __init__(self, this):
3497 self.this = this
3498 if not hasattr(self,"thisown"): self.thisown = 0
3499 self.__class__ = SetCursorEvent
3500 _core_.SetCursorEvent_swigregister(SetCursorEventPtr)
3501
3502 #---------------------------------------------------------------------------
3503
3504 class KeyEvent(Event):
3505 def __repr__(self):
3506 return "<%s.%s; proxy of C++ wxKeyEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
3507 def __init__(self, *args, **kwargs):
3508 """__init__(self, wxEventType keyType=wxEVT_NULL) -> KeyEvent"""
3509 newobj = _core_.new_KeyEvent(*args, **kwargs)
3510 self.this = newobj.this
3511 self.thisown = 1
3512 del newobj.thisown
3513 def ControlDown(*args, **kwargs):
3514 """ControlDown(self) -> bool"""
3515 return _core_.KeyEvent_ControlDown(*args, **kwargs)
3516
3517 def MetaDown(*args, **kwargs):
3518 """MetaDown(self) -> bool"""
3519 return _core_.KeyEvent_MetaDown(*args, **kwargs)
3520
3521 def AltDown(*args, **kwargs):
3522 """AltDown(self) -> bool"""
3523 return _core_.KeyEvent_AltDown(*args, **kwargs)
3524
3525 def ShiftDown(*args, **kwargs):
3526 """ShiftDown(self) -> bool"""
3527 return _core_.KeyEvent_ShiftDown(*args, **kwargs)
3528
3529 def HasModifiers(*args, **kwargs):
3530 """HasModifiers(self) -> bool"""
3531 return _core_.KeyEvent_HasModifiers(*args, **kwargs)
3532
3533 def GetKeyCode(*args, **kwargs):
3534 """GetKeyCode(self) -> int"""
3535 return _core_.KeyEvent_GetKeyCode(*args, **kwargs)
3536
3537 KeyCode = GetKeyCode
3538 def GetUniChar(*args, **kwargs):
3539 """GetUniChar(self) -> int"""
3540 return _core_.KeyEvent_GetUniChar(*args, **kwargs)
3541
3542 def GetRawKeyCode(*args, **kwargs):
3543 """GetRawKeyCode(self) -> unsigned int"""
3544 return _core_.KeyEvent_GetRawKeyCode(*args, **kwargs)
3545
3546 def GetRawKeyFlags(*args, **kwargs):
3547 """GetRawKeyFlags(self) -> unsigned int"""
3548 return _core_.KeyEvent_GetRawKeyFlags(*args, **kwargs)
3549
3550 def GetPosition(*args, **kwargs):
3551 """
3552 GetPosition(self) -> Point
3553
3554 Find the position of the event.
3555 """
3556 return _core_.KeyEvent_GetPosition(*args, **kwargs)
3557
3558 def GetPositionTuple(*args, **kwargs):
3559 """
3560 GetPositionTuple() -> (x,y)
3561
3562 Find the position of the event.
3563 """
3564 return _core_.KeyEvent_GetPositionTuple(*args, **kwargs)
3565
3566 def GetX(*args, **kwargs):
3567 """GetX(self) -> int"""
3568 return _core_.KeyEvent_GetX(*args, **kwargs)
3569
3570 def GetY(*args, **kwargs):
3571 """GetY(self) -> int"""
3572 return _core_.KeyEvent_GetY(*args, **kwargs)
3573
3574 m_x = property(_core_.KeyEvent_m_x_get, _core_.KeyEvent_m_x_set)
3575 m_y = property(_core_.KeyEvent_m_y_get, _core_.KeyEvent_m_y_set)
3576 m_keyCode = property(_core_.KeyEvent_m_keyCode_get, _core_.KeyEvent_m_keyCode_set)
3577 m_controlDown = property(_core_.KeyEvent_m_controlDown_get, _core_.KeyEvent_m_controlDown_set)
3578 m_shiftDown = property(_core_.KeyEvent_m_shiftDown_get, _core_.KeyEvent_m_shiftDown_set)
3579 m_altDown = property(_core_.KeyEvent_m_altDown_get, _core_.KeyEvent_m_altDown_set)
3580 m_metaDown = property(_core_.KeyEvent_m_metaDown_get, _core_.KeyEvent_m_metaDown_set)
3581 m_scanCode = property(_core_.KeyEvent_m_scanCode_get, _core_.KeyEvent_m_scanCode_set)
3582 m_rawCode = property(_core_.KeyEvent_m_rawCode_get, _core_.KeyEvent_m_rawCode_set)
3583 m_rawFlags = property(_core_.KeyEvent_m_rawFlags_get, _core_.KeyEvent_m_rawFlags_set)
3584
3585 class KeyEventPtr(KeyEvent):
3586 def __init__(self, this):
3587 self.this = this
3588 if not hasattr(self,"thisown"): self.thisown = 0
3589 self.__class__ = KeyEvent
3590 _core_.KeyEvent_swigregister(KeyEventPtr)
3591
3592 #---------------------------------------------------------------------------
3593
3594 class SizeEvent(Event):
3595 def __repr__(self):
3596 return "<%s.%s; proxy of C++ wxSizeEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
3597 def __init__(self, *args, **kwargs):
3598 """__init__(self, Size sz=DefaultSize, int winid=0) -> SizeEvent"""
3599 newobj = _core_.new_SizeEvent(*args, **kwargs)
3600 self.this = newobj.this
3601 self.thisown = 1
3602 del newobj.thisown
3603 def GetSize(*args, **kwargs):
3604 """GetSize(self) -> Size"""
3605 return _core_.SizeEvent_GetSize(*args, **kwargs)
3606
3607 def GetRect(*args, **kwargs):
3608 """GetRect(self) -> Rect"""
3609 return _core_.SizeEvent_GetRect(*args, **kwargs)
3610
3611 def SetRect(*args, **kwargs):
3612 """SetRect(self, Rect rect)"""
3613 return _core_.SizeEvent_SetRect(*args, **kwargs)
3614
3615 def SetSize(*args, **kwargs):
3616 """SetSize(self, Size size)"""
3617 return _core_.SizeEvent_SetSize(*args, **kwargs)
3618
3619 m_size = property(_core_.SizeEvent_m_size_get, _core_.SizeEvent_m_size_set)
3620 m_rect = property(_core_.SizeEvent_m_rect_get, _core_.SizeEvent_m_rect_set)
3621
3622 class SizeEventPtr(SizeEvent):
3623 def __init__(self, this):
3624 self.this = this
3625 if not hasattr(self,"thisown"): self.thisown = 0
3626 self.__class__ = SizeEvent
3627 _core_.SizeEvent_swigregister(SizeEventPtr)
3628
3629 #---------------------------------------------------------------------------
3630
3631 class MoveEvent(Event):
3632 def __repr__(self):
3633 return "<%s.%s; proxy of C++ wxMoveEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
3634 def __init__(self, *args, **kwargs):
3635 """__init__(self, Point pos=DefaultPosition, int winid=0) -> MoveEvent"""
3636 newobj = _core_.new_MoveEvent(*args, **kwargs)
3637 self.this = newobj.this
3638 self.thisown = 1
3639 del newobj.thisown
3640 def GetPosition(*args, **kwargs):
3641 """GetPosition(self) -> Point"""
3642 return _core_.MoveEvent_GetPosition(*args, **kwargs)
3643
3644 def GetRect(*args, **kwargs):
3645 """GetRect(self) -> Rect"""
3646 return _core_.MoveEvent_GetRect(*args, **kwargs)
3647
3648 def SetRect(*args, **kwargs):
3649 """SetRect(self, Rect rect)"""
3650 return _core_.MoveEvent_SetRect(*args, **kwargs)
3651
3652 def SetPosition(*args, **kwargs):
3653 """SetPosition(self, Point pos)"""
3654 return _core_.MoveEvent_SetPosition(*args, **kwargs)
3655
3656 m_pos = property(_core_.MoveEvent_m_pos_get, _core_.MoveEvent_m_pos_set)
3657 m_rect = property(_core_.MoveEvent_m_rect_get, _core_.MoveEvent_m_rect_set)
3658
3659 class MoveEventPtr(MoveEvent):
3660 def __init__(self, this):
3661 self.this = this
3662 if not hasattr(self,"thisown"): self.thisown = 0
3663 self.__class__ = MoveEvent
3664 _core_.MoveEvent_swigregister(MoveEventPtr)
3665
3666 #---------------------------------------------------------------------------
3667
3668 class PaintEvent(Event):
3669 def __repr__(self):
3670 return "<%s.%s; proxy of C++ wxPaintEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
3671 def __init__(self, *args, **kwargs):
3672 """__init__(self, int Id=0) -> PaintEvent"""
3673 newobj = _core_.new_PaintEvent(*args, **kwargs)
3674 self.this = newobj.this
3675 self.thisown = 1
3676 del newobj.thisown
3677
3678 class PaintEventPtr(PaintEvent):
3679 def __init__(self, this):
3680 self.this = this
3681 if not hasattr(self,"thisown"): self.thisown = 0
3682 self.__class__ = PaintEvent
3683 _core_.PaintEvent_swigregister(PaintEventPtr)
3684
3685 class NcPaintEvent(Event):
3686 def __repr__(self):
3687 return "<%s.%s; proxy of C++ wxNcPaintEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
3688 def __init__(self, *args, **kwargs):
3689 """__init__(self, int winid=0) -> NcPaintEvent"""
3690 newobj = _core_.new_NcPaintEvent(*args, **kwargs)
3691 self.this = newobj.this
3692 self.thisown = 1
3693 del newobj.thisown
3694
3695 class NcPaintEventPtr(NcPaintEvent):
3696 def __init__(self, this):
3697 self.this = this
3698 if not hasattr(self,"thisown"): self.thisown = 0
3699 self.__class__ = NcPaintEvent
3700 _core_.NcPaintEvent_swigregister(NcPaintEventPtr)
3701
3702 #---------------------------------------------------------------------------
3703
3704 class EraseEvent(Event):
3705 def __repr__(self):
3706 return "<%s.%s; proxy of C++ wxEraseEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
3707 def __init__(self, *args, **kwargs):
3708 """__init__(self, int Id=0, DC dc=(wxDC *) NULL) -> EraseEvent"""
3709 newobj = _core_.new_EraseEvent(*args, **kwargs)
3710 self.this = newobj.this
3711 self.thisown = 1
3712 del newobj.thisown
3713 def GetDC(*args, **kwargs):
3714 """GetDC(self) -> DC"""
3715 return _core_.EraseEvent_GetDC(*args, **kwargs)
3716
3717
3718 class EraseEventPtr(EraseEvent):
3719 def __init__(self, this):
3720 self.this = this
3721 if not hasattr(self,"thisown"): self.thisown = 0
3722 self.__class__ = EraseEvent
3723 _core_.EraseEvent_swigregister(EraseEventPtr)
3724
3725 #---------------------------------------------------------------------------
3726
3727 class FocusEvent(Event):
3728 def __repr__(self):
3729 return "<%s.%s; proxy of C++ wxFocusEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
3730 def __init__(self, *args, **kwargs):
3731 """__init__(self, wxEventType type=wxEVT_NULL, int winid=0) -> FocusEvent"""
3732 newobj = _core_.new_FocusEvent(*args, **kwargs)
3733 self.this = newobj.this
3734 self.thisown = 1
3735 del newobj.thisown
3736 def GetWindow(*args, **kwargs):
3737 """GetWindow(self) -> Window"""
3738 return _core_.FocusEvent_GetWindow(*args, **kwargs)
3739
3740 def SetWindow(*args, **kwargs):
3741 """SetWindow(self, Window win)"""
3742 return _core_.FocusEvent_SetWindow(*args, **kwargs)
3743
3744
3745 class FocusEventPtr(FocusEvent):
3746 def __init__(self, this):
3747 self.this = this
3748 if not hasattr(self,"thisown"): self.thisown = 0
3749 self.__class__ = FocusEvent
3750 _core_.FocusEvent_swigregister(FocusEventPtr)
3751
3752 #---------------------------------------------------------------------------
3753
3754 class ChildFocusEvent(CommandEvent):
3755 def __repr__(self):
3756 return "<%s.%s; proxy of C++ wxChildFocusEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
3757 def __init__(self, *args, **kwargs):
3758 """__init__(self, Window win=None) -> ChildFocusEvent"""
3759 newobj = _core_.new_ChildFocusEvent(*args, **kwargs)
3760 self.this = newobj.this
3761 self.thisown = 1
3762 del newobj.thisown
3763 def GetWindow(*args, **kwargs):
3764 """GetWindow(self) -> Window"""
3765 return _core_.ChildFocusEvent_GetWindow(*args, **kwargs)
3766
3767
3768 class ChildFocusEventPtr(ChildFocusEvent):
3769 def __init__(self, this):
3770 self.this = this
3771 if not hasattr(self,"thisown"): self.thisown = 0
3772 self.__class__ = ChildFocusEvent
3773 _core_.ChildFocusEvent_swigregister(ChildFocusEventPtr)
3774
3775 #---------------------------------------------------------------------------
3776
3777 class ActivateEvent(Event):
3778 def __repr__(self):
3779 return "<%s.%s; proxy of C++ wxActivateEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
3780 def __init__(self, *args, **kwargs):
3781 """__init__(self, wxEventType type=wxEVT_NULL, bool active=True, int Id=0) -> ActivateEvent"""
3782 newobj = _core_.new_ActivateEvent(*args, **kwargs)
3783 self.this = newobj.this
3784 self.thisown = 1
3785 del newobj.thisown
3786 def GetActive(*args, **kwargs):
3787 """GetActive(self) -> bool"""
3788 return _core_.ActivateEvent_GetActive(*args, **kwargs)
3789
3790
3791 class ActivateEventPtr(ActivateEvent):
3792 def __init__(self, this):
3793 self.this = this
3794 if not hasattr(self,"thisown"): self.thisown = 0
3795 self.__class__ = ActivateEvent
3796 _core_.ActivateEvent_swigregister(ActivateEventPtr)
3797
3798 #---------------------------------------------------------------------------
3799
3800 class InitDialogEvent(Event):
3801 def __repr__(self):
3802 return "<%s.%s; proxy of C++ wxInitDialogEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
3803 def __init__(self, *args, **kwargs):
3804 """__init__(self, int Id=0) -> InitDialogEvent"""
3805 newobj = _core_.new_InitDialogEvent(*args, **kwargs)
3806 self.this = newobj.this
3807 self.thisown = 1
3808 del newobj.thisown
3809
3810 class InitDialogEventPtr(InitDialogEvent):
3811 def __init__(self, this):
3812 self.this = this
3813 if not hasattr(self,"thisown"): self.thisown = 0
3814 self.__class__ = InitDialogEvent
3815 _core_.InitDialogEvent_swigregister(InitDialogEventPtr)
3816
3817 #---------------------------------------------------------------------------
3818
3819 class MenuEvent(Event):
3820 def __repr__(self):
3821 return "<%s.%s; proxy of C++ wxMenuEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
3822 def __init__(self, *args, **kwargs):
3823 """__init__(self, wxEventType type=wxEVT_NULL, int winid=0, Menu menu=None) -> MenuEvent"""
3824 newobj = _core_.new_MenuEvent(*args, **kwargs)
3825 self.this = newobj.this
3826 self.thisown = 1
3827 del newobj.thisown
3828 def GetMenuId(*args, **kwargs):
3829 """GetMenuId(self) -> int"""
3830 return _core_.MenuEvent_GetMenuId(*args, **kwargs)
3831
3832 def IsPopup(*args, **kwargs):
3833 """IsPopup(self) -> bool"""
3834 return _core_.MenuEvent_IsPopup(*args, **kwargs)
3835
3836 def GetMenu(*args, **kwargs):
3837 """GetMenu(self) -> Menu"""
3838 return _core_.MenuEvent_GetMenu(*args, **kwargs)
3839
3840
3841 class MenuEventPtr(MenuEvent):
3842 def __init__(self, this):
3843 self.this = this
3844 if not hasattr(self,"thisown"): self.thisown = 0
3845 self.__class__ = MenuEvent
3846 _core_.MenuEvent_swigregister(MenuEventPtr)
3847
3848 #---------------------------------------------------------------------------
3849
3850 class CloseEvent(Event):
3851 def __repr__(self):
3852 return "<%s.%s; proxy of C++ wxCloseEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
3853 def __init__(self, *args, **kwargs):
3854 """__init__(self, wxEventType type=wxEVT_NULL, int winid=0) -> CloseEvent"""
3855 newobj = _core_.new_CloseEvent(*args, **kwargs)
3856 self.this = newobj.this
3857 self.thisown = 1
3858 del newobj.thisown
3859 def SetLoggingOff(*args, **kwargs):
3860 """SetLoggingOff(self, bool logOff)"""
3861 return _core_.CloseEvent_SetLoggingOff(*args, **kwargs)
3862
3863 def GetLoggingOff(*args, **kwargs):
3864 """GetLoggingOff(self) -> bool"""
3865 return _core_.CloseEvent_GetLoggingOff(*args, **kwargs)
3866
3867 def Veto(*args, **kwargs):
3868 """Veto(self, bool veto=True)"""
3869 return _core_.CloseEvent_Veto(*args, **kwargs)
3870
3871 def SetCanVeto(*args, **kwargs):
3872 """SetCanVeto(self, bool canVeto)"""
3873 return _core_.CloseEvent_SetCanVeto(*args, **kwargs)
3874
3875 def CanVeto(*args, **kwargs):
3876 """CanVeto(self) -> bool"""
3877 return _core_.CloseEvent_CanVeto(*args, **kwargs)
3878
3879 def GetVeto(*args, **kwargs):
3880 """GetVeto(self) -> bool"""
3881 return _core_.CloseEvent_GetVeto(*args, **kwargs)
3882
3883
3884 class CloseEventPtr(CloseEvent):
3885 def __init__(self, this):
3886 self.this = this
3887 if not hasattr(self,"thisown"): self.thisown = 0
3888 self.__class__ = CloseEvent
3889 _core_.CloseEvent_swigregister(CloseEventPtr)
3890
3891 #---------------------------------------------------------------------------
3892
3893 class ShowEvent(Event):
3894 def __repr__(self):
3895 return "<%s.%s; proxy of C++ wxShowEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
3896 def __init__(self, *args, **kwargs):
3897 """__init__(self, int winid=0, bool show=False) -> ShowEvent"""
3898 newobj = _core_.new_ShowEvent(*args, **kwargs)
3899 self.this = newobj.this
3900 self.thisown = 1
3901 del newobj.thisown
3902 def SetShow(*args, **kwargs):
3903 """SetShow(self, bool show)"""
3904 return _core_.ShowEvent_SetShow(*args, **kwargs)
3905
3906 def GetShow(*args, **kwargs):
3907 """GetShow(self) -> bool"""
3908 return _core_.ShowEvent_GetShow(*args, **kwargs)
3909
3910
3911 class ShowEventPtr(ShowEvent):
3912 def __init__(self, this):
3913 self.this = this
3914 if not hasattr(self,"thisown"): self.thisown = 0
3915 self.__class__ = ShowEvent
3916 _core_.ShowEvent_swigregister(ShowEventPtr)
3917
3918 #---------------------------------------------------------------------------
3919
3920 class IconizeEvent(Event):
3921 def __repr__(self):
3922 return "<%s.%s; proxy of C++ wxIconizeEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
3923 def __init__(self, *args, **kwargs):
3924 """__init__(self, int id=0, bool iconized=True) -> IconizeEvent"""
3925 newobj = _core_.new_IconizeEvent(*args, **kwargs)
3926 self.this = newobj.this
3927 self.thisown = 1
3928 del newobj.thisown
3929 def Iconized(*args, **kwargs):
3930 """Iconized(self) -> bool"""
3931 return _core_.IconizeEvent_Iconized(*args, **kwargs)
3932
3933
3934 class IconizeEventPtr(IconizeEvent):
3935 def __init__(self, this):
3936 self.this = this
3937 if not hasattr(self,"thisown"): self.thisown = 0
3938 self.__class__ = IconizeEvent
3939 _core_.IconizeEvent_swigregister(IconizeEventPtr)
3940
3941 #---------------------------------------------------------------------------
3942
3943 class MaximizeEvent(Event):
3944 def __repr__(self):
3945 return "<%s.%s; proxy of C++ wxMaximizeEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
3946 def __init__(self, *args, **kwargs):
3947 """__init__(self, int id=0) -> MaximizeEvent"""
3948 newobj = _core_.new_MaximizeEvent(*args, **kwargs)
3949 self.this = newobj.this
3950 self.thisown = 1
3951 del newobj.thisown
3952
3953 class MaximizeEventPtr(MaximizeEvent):
3954 def __init__(self, this):
3955 self.this = this
3956 if not hasattr(self,"thisown"): self.thisown = 0
3957 self.__class__ = MaximizeEvent
3958 _core_.MaximizeEvent_swigregister(MaximizeEventPtr)
3959
3960 #---------------------------------------------------------------------------
3961
3962 class DropFilesEvent(Event):
3963 def __init__(self): raise RuntimeError, "No constructor defined"
3964 def __repr__(self):
3965 return "<%s.%s; proxy of C++ wxDropFilesEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
3966 def GetPosition(*args, **kwargs):
3967 """GetPosition(self) -> Point"""
3968 return _core_.DropFilesEvent_GetPosition(*args, **kwargs)
3969
3970 def GetNumberOfFiles(*args, **kwargs):
3971 """GetNumberOfFiles(self) -> int"""
3972 return _core_.DropFilesEvent_GetNumberOfFiles(*args, **kwargs)
3973
3974 def GetFiles(*args, **kwargs):
3975 """GetFiles(self) -> PyObject"""
3976 return _core_.DropFilesEvent_GetFiles(*args, **kwargs)
3977
3978
3979 class DropFilesEventPtr(DropFilesEvent):
3980 def __init__(self, this):
3981 self.this = this
3982 if not hasattr(self,"thisown"): self.thisown = 0
3983 self.__class__ = DropFilesEvent
3984 _core_.DropFilesEvent_swigregister(DropFilesEventPtr)
3985
3986 #---------------------------------------------------------------------------
3987
3988 UPDATE_UI_PROCESS_ALL = _core_.UPDATE_UI_PROCESS_ALL
3989 UPDATE_UI_PROCESS_SPECIFIED = _core_.UPDATE_UI_PROCESS_SPECIFIED
3990 class UpdateUIEvent(CommandEvent):
3991 def __repr__(self):
3992 return "<%s.%s; proxy of C++ wxUpdateUIEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
3993 def __init__(self, *args, **kwargs):
3994 """__init__(self, int commandId=0) -> UpdateUIEvent"""
3995 newobj = _core_.new_UpdateUIEvent(*args, **kwargs)
3996 self.this = newobj.this
3997 self.thisown = 1
3998 del newobj.thisown
3999 def GetChecked(*args, **kwargs):
4000 """GetChecked(self) -> bool"""
4001 return _core_.UpdateUIEvent_GetChecked(*args, **kwargs)
4002
4003 def GetEnabled(*args, **kwargs):
4004 """GetEnabled(self) -> bool"""
4005 return _core_.UpdateUIEvent_GetEnabled(*args, **kwargs)
4006
4007 def GetText(*args, **kwargs):
4008 """GetText(self) -> String"""
4009 return _core_.UpdateUIEvent_GetText(*args, **kwargs)
4010
4011 def GetSetText(*args, **kwargs):
4012 """GetSetText(self) -> bool"""
4013 return _core_.UpdateUIEvent_GetSetText(*args, **kwargs)
4014
4015 def GetSetChecked(*args, **kwargs):
4016 """GetSetChecked(self) -> bool"""
4017 return _core_.UpdateUIEvent_GetSetChecked(*args, **kwargs)
4018
4019 def GetSetEnabled(*args, **kwargs):
4020 """GetSetEnabled(self) -> bool"""
4021 return _core_.UpdateUIEvent_GetSetEnabled(*args, **kwargs)
4022
4023 def Check(*args, **kwargs):
4024 """Check(self, bool check)"""
4025 return _core_.UpdateUIEvent_Check(*args, **kwargs)
4026
4027 def Enable(*args, **kwargs):
4028 """Enable(self, bool enable)"""
4029 return _core_.UpdateUIEvent_Enable(*args, **kwargs)
4030
4031 def SetText(*args, **kwargs):
4032 """SetText(self, String text)"""
4033 return _core_.UpdateUIEvent_SetText(*args, **kwargs)
4034
4035 def SetUpdateInterval(*args, **kwargs):
4036 """UpdateUIEvent.SetUpdateInterval(long updateInterval)"""
4037 return _core_.UpdateUIEvent_SetUpdateInterval(*args, **kwargs)
4038
4039 SetUpdateInterval = staticmethod(SetUpdateInterval)
4040 def GetUpdateInterval(*args, **kwargs):
4041 """UpdateUIEvent.GetUpdateInterval() -> long"""
4042 return _core_.UpdateUIEvent_GetUpdateInterval(*args, **kwargs)
4043
4044 GetUpdateInterval = staticmethod(GetUpdateInterval)
4045 def CanUpdate(*args, **kwargs):
4046 """UpdateUIEvent.CanUpdate(Window win) -> bool"""
4047 return _core_.UpdateUIEvent_CanUpdate(*args, **kwargs)
4048
4049 CanUpdate = staticmethod(CanUpdate)
4050 def ResetUpdateTime(*args, **kwargs):
4051 """UpdateUIEvent.ResetUpdateTime()"""
4052 return _core_.UpdateUIEvent_ResetUpdateTime(*args, **kwargs)
4053
4054 ResetUpdateTime = staticmethod(ResetUpdateTime)
4055 def SetMode(*args, **kwargs):
4056 """UpdateUIEvent.SetMode(int mode)"""
4057 return _core_.UpdateUIEvent_SetMode(*args, **kwargs)
4058
4059 SetMode = staticmethod(SetMode)
4060 def GetMode(*args, **kwargs):
4061 """UpdateUIEvent.GetMode() -> int"""
4062 return _core_.UpdateUIEvent_GetMode(*args, **kwargs)
4063
4064 GetMode = staticmethod(GetMode)
4065
4066 class UpdateUIEventPtr(UpdateUIEvent):
4067 def __init__(self, this):
4068 self.this = this
4069 if not hasattr(self,"thisown"): self.thisown = 0
4070 self.__class__ = UpdateUIEvent
4071 _core_.UpdateUIEvent_swigregister(UpdateUIEventPtr)
4072
4073 def UpdateUIEvent_SetUpdateInterval(*args, **kwargs):
4074 """UpdateUIEvent_SetUpdateInterval(long updateInterval)"""
4075 return _core_.UpdateUIEvent_SetUpdateInterval(*args, **kwargs)
4076
4077 def UpdateUIEvent_GetUpdateInterval(*args, **kwargs):
4078 """UpdateUIEvent_GetUpdateInterval() -> long"""
4079 return _core_.UpdateUIEvent_GetUpdateInterval(*args, **kwargs)
4080
4081 def UpdateUIEvent_CanUpdate(*args, **kwargs):
4082 """UpdateUIEvent_CanUpdate(Window win) -> bool"""
4083 return _core_.UpdateUIEvent_CanUpdate(*args, **kwargs)
4084
4085 def UpdateUIEvent_ResetUpdateTime(*args, **kwargs):
4086 """UpdateUIEvent_ResetUpdateTime()"""
4087 return _core_.UpdateUIEvent_ResetUpdateTime(*args, **kwargs)
4088
4089 def UpdateUIEvent_SetMode(*args, **kwargs):
4090 """UpdateUIEvent_SetMode(int mode)"""
4091 return _core_.UpdateUIEvent_SetMode(*args, **kwargs)
4092
4093 def UpdateUIEvent_GetMode(*args, **kwargs):
4094 """UpdateUIEvent_GetMode() -> int"""
4095 return _core_.UpdateUIEvent_GetMode(*args, **kwargs)
4096
4097 #---------------------------------------------------------------------------
4098
4099 class SysColourChangedEvent(Event):
4100 def __repr__(self):
4101 return "<%s.%s; proxy of C++ wxSysColourChangedEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
4102 def __init__(self, *args, **kwargs):
4103 """__init__(self) -> SysColourChangedEvent"""
4104 newobj = _core_.new_SysColourChangedEvent(*args, **kwargs)
4105 self.this = newobj.this
4106 self.thisown = 1
4107 del newobj.thisown
4108
4109 class SysColourChangedEventPtr(SysColourChangedEvent):
4110 def __init__(self, this):
4111 self.this = this
4112 if not hasattr(self,"thisown"): self.thisown = 0
4113 self.__class__ = SysColourChangedEvent
4114 _core_.SysColourChangedEvent_swigregister(SysColourChangedEventPtr)
4115
4116 #---------------------------------------------------------------------------
4117
4118 class MouseCaptureChangedEvent(Event):
4119 def __repr__(self):
4120 return "<%s.%s; proxy of C++ wxMouseCaptureChangedEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
4121 def __init__(self, *args, **kwargs):
4122 """__init__(self, int winid=0, Window gainedCapture=None) -> MouseCaptureChangedEvent"""
4123 newobj = _core_.new_MouseCaptureChangedEvent(*args, **kwargs)
4124 self.this = newobj.this
4125 self.thisown = 1
4126 del newobj.thisown
4127 def GetCapturedWindow(*args, **kwargs):
4128 """GetCapturedWindow(self) -> Window"""
4129 return _core_.MouseCaptureChangedEvent_GetCapturedWindow(*args, **kwargs)
4130
4131
4132 class MouseCaptureChangedEventPtr(MouseCaptureChangedEvent):
4133 def __init__(self, this):
4134 self.this = this
4135 if not hasattr(self,"thisown"): self.thisown = 0
4136 self.__class__ = MouseCaptureChangedEvent
4137 _core_.MouseCaptureChangedEvent_swigregister(MouseCaptureChangedEventPtr)
4138
4139 #---------------------------------------------------------------------------
4140
4141 class DisplayChangedEvent(Event):
4142 def __repr__(self):
4143 return "<%s.%s; proxy of C++ wxDisplayChangedEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
4144 def __init__(self, *args, **kwargs):
4145 """__init__(self) -> DisplayChangedEvent"""
4146 newobj = _core_.new_DisplayChangedEvent(*args, **kwargs)
4147 self.this = newobj.this
4148 self.thisown = 1
4149 del newobj.thisown
4150
4151 class DisplayChangedEventPtr(DisplayChangedEvent):
4152 def __init__(self, this):
4153 self.this = this
4154 if not hasattr(self,"thisown"): self.thisown = 0
4155 self.__class__ = DisplayChangedEvent
4156 _core_.DisplayChangedEvent_swigregister(DisplayChangedEventPtr)
4157
4158 #---------------------------------------------------------------------------
4159
4160 class PaletteChangedEvent(Event):
4161 def __repr__(self):
4162 return "<%s.%s; proxy of C++ wxPaletteChangedEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
4163 def __init__(self, *args, **kwargs):
4164 """__init__(self, int id=0) -> PaletteChangedEvent"""
4165 newobj = _core_.new_PaletteChangedEvent(*args, **kwargs)
4166 self.this = newobj.this
4167 self.thisown = 1
4168 del newobj.thisown
4169 def SetChangedWindow(*args, **kwargs):
4170 """SetChangedWindow(self, Window win)"""
4171 return _core_.PaletteChangedEvent_SetChangedWindow(*args, **kwargs)
4172
4173 def GetChangedWindow(*args, **kwargs):
4174 """GetChangedWindow(self) -> Window"""
4175 return _core_.PaletteChangedEvent_GetChangedWindow(*args, **kwargs)
4176
4177
4178 class PaletteChangedEventPtr(PaletteChangedEvent):
4179 def __init__(self, this):
4180 self.this = this
4181 if not hasattr(self,"thisown"): self.thisown = 0
4182 self.__class__ = PaletteChangedEvent
4183 _core_.PaletteChangedEvent_swigregister(PaletteChangedEventPtr)
4184
4185 #---------------------------------------------------------------------------
4186
4187 class QueryNewPaletteEvent(Event):
4188 def __repr__(self):
4189 return "<%s.%s; proxy of C++ wxQueryNewPaletteEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
4190 def __init__(self, *args, **kwargs):
4191 """__init__(self, int winid=0) -> QueryNewPaletteEvent"""
4192 newobj = _core_.new_QueryNewPaletteEvent(*args, **kwargs)
4193 self.this = newobj.this
4194 self.thisown = 1
4195 del newobj.thisown
4196 def SetPaletteRealized(*args, **kwargs):
4197 """SetPaletteRealized(self, bool realized)"""
4198 return _core_.QueryNewPaletteEvent_SetPaletteRealized(*args, **kwargs)
4199
4200 def GetPaletteRealized(*args, **kwargs):
4201 """GetPaletteRealized(self) -> bool"""
4202 return _core_.QueryNewPaletteEvent_GetPaletteRealized(*args, **kwargs)
4203
4204
4205 class QueryNewPaletteEventPtr(QueryNewPaletteEvent):
4206 def __init__(self, this):
4207 self.this = this
4208 if not hasattr(self,"thisown"): self.thisown = 0
4209 self.__class__ = QueryNewPaletteEvent
4210 _core_.QueryNewPaletteEvent_swigregister(QueryNewPaletteEventPtr)
4211
4212 #---------------------------------------------------------------------------
4213
4214 class NavigationKeyEvent(Event):
4215 def __repr__(self):
4216 return "<%s.%s; proxy of C++ wxNavigationKeyEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
4217 def __init__(self, *args, **kwargs):
4218 """__init__(self) -> NavigationKeyEvent"""
4219 newobj = _core_.new_NavigationKeyEvent(*args, **kwargs)
4220 self.this = newobj.this
4221 self.thisown = 1
4222 del newobj.thisown
4223 def GetDirection(*args, **kwargs):
4224 """GetDirection(self) -> bool"""
4225 return _core_.NavigationKeyEvent_GetDirection(*args, **kwargs)
4226
4227 def SetDirection(*args, **kwargs):
4228 """SetDirection(self, bool bForward)"""
4229 return _core_.NavigationKeyEvent_SetDirection(*args, **kwargs)
4230
4231 def IsWindowChange(*args, **kwargs):
4232 """IsWindowChange(self) -> bool"""
4233 return _core_.NavigationKeyEvent_IsWindowChange(*args, **kwargs)
4234
4235 def SetWindowChange(*args, **kwargs):
4236 """SetWindowChange(self, bool bIs)"""
4237 return _core_.NavigationKeyEvent_SetWindowChange(*args, **kwargs)
4238
4239 def GetCurrentFocus(*args, **kwargs):
4240 """GetCurrentFocus(self) -> Window"""
4241 return _core_.NavigationKeyEvent_GetCurrentFocus(*args, **kwargs)
4242
4243 def SetCurrentFocus(*args, **kwargs):
4244 """SetCurrentFocus(self, Window win)"""
4245 return _core_.NavigationKeyEvent_SetCurrentFocus(*args, **kwargs)
4246
4247
4248 class NavigationKeyEventPtr(NavigationKeyEvent):
4249 def __init__(self, this):
4250 self.this = this
4251 if not hasattr(self,"thisown"): self.thisown = 0
4252 self.__class__ = NavigationKeyEvent
4253 _core_.NavigationKeyEvent_swigregister(NavigationKeyEventPtr)
4254
4255 #---------------------------------------------------------------------------
4256
4257 class WindowCreateEvent(CommandEvent):
4258 def __repr__(self):
4259 return "<%s.%s; proxy of C++ wxWindowCreateEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
4260 def __init__(self, *args, **kwargs):
4261 """__init__(self, Window win=None) -> WindowCreateEvent"""
4262 newobj = _core_.new_WindowCreateEvent(*args, **kwargs)
4263 self.this = newobj.this
4264 self.thisown = 1
4265 del newobj.thisown
4266 def GetWindow(*args, **kwargs):
4267 """GetWindow(self) -> Window"""
4268 return _core_.WindowCreateEvent_GetWindow(*args, **kwargs)
4269
4270
4271 class WindowCreateEventPtr(WindowCreateEvent):
4272 def __init__(self, this):
4273 self.this = this
4274 if not hasattr(self,"thisown"): self.thisown = 0
4275 self.__class__ = WindowCreateEvent
4276 _core_.WindowCreateEvent_swigregister(WindowCreateEventPtr)
4277
4278 class WindowDestroyEvent(CommandEvent):
4279 def __repr__(self):
4280 return "<%s.%s; proxy of C++ wxWindowDestroyEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
4281 def __init__(self, *args, **kwargs):
4282 """__init__(self, Window win=None) -> WindowDestroyEvent"""
4283 newobj = _core_.new_WindowDestroyEvent(*args, **kwargs)
4284 self.this = newobj.this
4285 self.thisown = 1
4286 del newobj.thisown
4287 def GetWindow(*args, **kwargs):
4288 """GetWindow(self) -> Window"""
4289 return _core_.WindowDestroyEvent_GetWindow(*args, **kwargs)
4290
4291
4292 class WindowDestroyEventPtr(WindowDestroyEvent):
4293 def __init__(self, this):
4294 self.this = this
4295 if not hasattr(self,"thisown"): self.thisown = 0
4296 self.__class__ = WindowDestroyEvent
4297 _core_.WindowDestroyEvent_swigregister(WindowDestroyEventPtr)
4298
4299 #---------------------------------------------------------------------------
4300
4301 class ContextMenuEvent(CommandEvent):
4302 def __repr__(self):
4303 return "<%s.%s; proxy of C++ wxContextMenuEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
4304 def __init__(self, *args, **kwargs):
4305 """__init__(self, wxEventType type=wxEVT_NULL, int winid=0, Point pt=DefaultPosition) -> ContextMenuEvent"""
4306 newobj = _core_.new_ContextMenuEvent(*args, **kwargs)
4307 self.this = newobj.this
4308 self.thisown = 1
4309 del newobj.thisown
4310 def GetPosition(*args, **kwargs):
4311 """GetPosition(self) -> Point"""
4312 return _core_.ContextMenuEvent_GetPosition(*args, **kwargs)
4313
4314 def SetPosition(*args, **kwargs):
4315 """SetPosition(self, Point pos)"""
4316 return _core_.ContextMenuEvent_SetPosition(*args, **kwargs)
4317
4318
4319 class ContextMenuEventPtr(ContextMenuEvent):
4320 def __init__(self, this):
4321 self.this = this
4322 if not hasattr(self,"thisown"): self.thisown = 0
4323 self.__class__ = ContextMenuEvent
4324 _core_.ContextMenuEvent_swigregister(ContextMenuEventPtr)
4325
4326 #---------------------------------------------------------------------------
4327
4328 IDLE_PROCESS_ALL = _core_.IDLE_PROCESS_ALL
4329 IDLE_PROCESS_SPECIFIED = _core_.IDLE_PROCESS_SPECIFIED
4330 class IdleEvent(Event):
4331 def __repr__(self):
4332 return "<%s.%s; proxy of C++ wxIdleEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
4333 def __init__(self, *args, **kwargs):
4334 """__init__(self) -> IdleEvent"""
4335 newobj = _core_.new_IdleEvent(*args, **kwargs)
4336 self.this = newobj.this
4337 self.thisown = 1
4338 del newobj.thisown
4339 def RequestMore(*args, **kwargs):
4340 """RequestMore(self, bool needMore=True)"""
4341 return _core_.IdleEvent_RequestMore(*args, **kwargs)
4342
4343 def MoreRequested(*args, **kwargs):
4344 """MoreRequested(self) -> bool"""
4345 return _core_.IdleEvent_MoreRequested(*args, **kwargs)
4346
4347 def SetMode(*args, **kwargs):
4348 """IdleEvent.SetMode(int mode)"""
4349 return _core_.IdleEvent_SetMode(*args, **kwargs)
4350
4351 SetMode = staticmethod(SetMode)
4352 def GetMode(*args, **kwargs):
4353 """IdleEvent.GetMode() -> int"""
4354 return _core_.IdleEvent_GetMode(*args, **kwargs)
4355
4356 GetMode = staticmethod(GetMode)
4357 def CanSend(*args, **kwargs):
4358 """IdleEvent.CanSend(Window win) -> bool"""
4359 return _core_.IdleEvent_CanSend(*args, **kwargs)
4360
4361 CanSend = staticmethod(CanSend)
4362
4363 class IdleEventPtr(IdleEvent):
4364 def __init__(self, this):
4365 self.this = this
4366 if not hasattr(self,"thisown"): self.thisown = 0
4367 self.__class__ = IdleEvent
4368 _core_.IdleEvent_swigregister(IdleEventPtr)
4369
4370 def IdleEvent_SetMode(*args, **kwargs):
4371 """IdleEvent_SetMode(int mode)"""
4372 return _core_.IdleEvent_SetMode(*args, **kwargs)
4373
4374 def IdleEvent_GetMode(*args, **kwargs):
4375 """IdleEvent_GetMode() -> int"""
4376 return _core_.IdleEvent_GetMode(*args, **kwargs)
4377
4378 def IdleEvent_CanSend(*args, **kwargs):
4379 """IdleEvent_CanSend(Window win) -> bool"""
4380 return _core_.IdleEvent_CanSend(*args, **kwargs)
4381
4382 #---------------------------------------------------------------------------
4383
4384 class PyEvent(Event):
4385 def __repr__(self):
4386 return "<%s.%s; proxy of C++ wxPyEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
4387 def __init__(self, *args, **kwargs):
4388 """__init__(self, int winid=0, wxEventType commandType=wxEVT_NULL) -> PyEvent"""
4389 newobj = _core_.new_PyEvent(*args, **kwargs)
4390 self.this = newobj.this
4391 self.thisown = 1
4392 del newobj.thisown
4393 self.SetSelf(self)
4394
4395 def __del__(self, destroy=_core_.delete_PyEvent):
4396 """__del__(self)"""
4397 try:
4398 if self.thisown: destroy(self)
4399 except: pass
4400
4401 def SetSelf(*args, **kwargs):
4402 """SetSelf(self, PyObject self)"""
4403 return _core_.PyEvent_SetSelf(*args, **kwargs)
4404
4405 def GetSelf(*args, **kwargs):
4406 """GetSelf(self) -> PyObject"""
4407 return _core_.PyEvent_GetSelf(*args, **kwargs)
4408
4409
4410 class PyEventPtr(PyEvent):
4411 def __init__(self, this):
4412 self.this = this
4413 if not hasattr(self,"thisown"): self.thisown = 0
4414 self.__class__ = PyEvent
4415 _core_.PyEvent_swigregister(PyEventPtr)
4416
4417 class PyCommandEvent(CommandEvent):
4418 def __repr__(self):
4419 return "<%s.%s; proxy of C++ wxPyCommandEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
4420 def __init__(self, *args, **kwargs):
4421 """__init__(self, wxEventType commandType=wxEVT_NULL, int id=0) -> PyCommandEvent"""
4422 newobj = _core_.new_PyCommandEvent(*args, **kwargs)
4423 self.this = newobj.this
4424 self.thisown = 1
4425 del newobj.thisown
4426 self.SetSelf(self)
4427
4428 def __del__(self, destroy=_core_.delete_PyCommandEvent):
4429 """__del__(self)"""
4430 try:
4431 if self.thisown: destroy(self)
4432 except: pass
4433
4434 def SetSelf(*args, **kwargs):
4435 """SetSelf(self, PyObject self)"""
4436 return _core_.PyCommandEvent_SetSelf(*args, **kwargs)
4437
4438 def GetSelf(*args, **kwargs):
4439 """GetSelf(self) -> PyObject"""
4440 return _core_.PyCommandEvent_GetSelf(*args, **kwargs)
4441
4442
4443 class PyCommandEventPtr(PyCommandEvent):
4444 def __init__(self, this):
4445 self.this = this
4446 if not hasattr(self,"thisown"): self.thisown = 0
4447 self.__class__ = PyCommandEvent
4448 _core_.PyCommandEvent_swigregister(PyCommandEventPtr)
4449
4450 #---------------------------------------------------------------------------
4451
4452 PYAPP_ASSERT_SUPPRESS = _core_.PYAPP_ASSERT_SUPPRESS
4453 PYAPP_ASSERT_EXCEPTION = _core_.PYAPP_ASSERT_EXCEPTION
4454 PYAPP_ASSERT_DIALOG = _core_.PYAPP_ASSERT_DIALOG
4455 PYAPP_ASSERT_LOG = _core_.PYAPP_ASSERT_LOG
4456 PRINT_WINDOWS = _core_.PRINT_WINDOWS
4457 PRINT_POSTSCRIPT = _core_.PRINT_POSTSCRIPT
4458 class PyApp(EvtHandler):
4459 def __repr__(self):
4460 return "<%s.%s; proxy of C++ wxPyApp instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
4461 def __init__(self, *args, **kwargs):
4462 """
4463 __init__(self) -> PyApp
4464
4465 Create a new application object, starting the bootstrap process.
4466 """
4467 newobj = _core_.new_PyApp(*args, **kwargs)
4468 self.this = newobj.this
4469 self.thisown = 1
4470 del newobj.thisown
4471 self._setCallbackInfo(self, PyApp)
4472 self._setOORInfo(self)
4473
4474 def __del__(self, destroy=_core_.delete_PyApp):
4475 """__del__(self)"""
4476 try:
4477 if self.thisown: destroy(self)
4478 except: pass
4479
4480 def _setCallbackInfo(*args, **kwargs):
4481 """_setCallbackInfo(self, PyObject self, PyObject _class)"""
4482 return _core_.PyApp__setCallbackInfo(*args, **kwargs)
4483
4484 def GetAppName(*args, **kwargs):
4485 """
4486 GetAppName(self) -> String
4487
4488 Get the application name.
4489 """
4490 return _core_.PyApp_GetAppName(*args, **kwargs)
4491
4492 def SetAppName(*args, **kwargs):
4493 """
4494 SetAppName(self, String name)
4495
4496 Set the application name. This value may be used automatically
4497 by wx.Config and such.
4498 """
4499 return _core_.PyApp_SetAppName(*args, **kwargs)
4500
4501 def GetClassName(*args, **kwargs):
4502 """
4503 GetClassName(self) -> String
4504
4505 Get the application's class name.
4506 """
4507 return _core_.PyApp_GetClassName(*args, **kwargs)
4508
4509 def SetClassName(*args, **kwargs):
4510 """
4511 SetClassName(self, String name)
4512
4513 Set the application's class name. This value may be used for X-resources if
4514 applicable for the platform
4515 """
4516 return _core_.PyApp_SetClassName(*args, **kwargs)
4517
4518 def GetVendorName(*args, **kwargs):
4519 """
4520 GetVendorName(self) -> String
4521
4522 Get the application's vendor name.
4523 """
4524 return _core_.PyApp_GetVendorName(*args, **kwargs)
4525
4526 def SetVendorName(*args, **kwargs):
4527 """
4528 SetVendorName(self, String name)
4529
4530 Set the application's vendor name. This value may be used automatically
4531 by wx.Config and such.
4532 """
4533 return _core_.PyApp_SetVendorName(*args, **kwargs)
4534
4535 def GetTraits(*args, **kwargs):
4536 """
4537 GetTraits(self) -> wxAppTraits
4538
4539 Create the app traits object to which we delegate for everything which either
4540 should be configurable by the user (then he can change the default behaviour
4541 simply by overriding CreateTraits() and returning his own traits object) or
4542 which is GUI/console dependent as then wx.AppTraits allows us to abstract the
4543 differences behind the common facade
4544 """
4545 return _core_.PyApp_GetTraits(*args, **kwargs)
4546
4547 def ProcessPendingEvents(*args, **kwargs):
4548 """
4549 ProcessPendingEvents(self)
4550
4551 Process all events in the Pending Events list -- it is necessary to call this
4552 function to process posted events. This happens during each event loop
4553 iteration.
4554 """
4555 return _core_.PyApp_ProcessPendingEvents(*args, **kwargs)
4556
4557 def Yield(*args, **kwargs):
4558 """
4559 Yield(self, bool onlyIfNeeded=False) -> bool
4560
4561 Process all currently pending events right now, instead of waiting until
4562 return to the event loop. It is an error to call Yield() recursively unless
4563 the value of onlyIfNeeded is True.
4564
4565 WARNING: This function is dangerous as it can lead to unexpected
4566 reentrancies (i.e. when called from an event handler it
4567 may result in calling the same event handler again), use
4568 with _extreme_ care or, better, don't use at all!
4569
4570 """
4571 return _core_.PyApp_Yield(*args, **kwargs)
4572
4573 def WakeUpIdle(*args, **kwargs):
4574 """
4575 WakeUpIdle(self)
4576
4577 Make sure that idle events are sent again
4578 """
4579 return _core_.PyApp_WakeUpIdle(*args, **kwargs)
4580
4581 def MainLoop(*args, **kwargs):
4582 """
4583 MainLoop(self) -> int
4584
4585 Execute the main GUI loop, the function returns when the loop ends.
4586 """
4587 return _core_.PyApp_MainLoop(*args, **kwargs)
4588
4589 def Exit(*args, **kwargs):
4590 """
4591 Exit(self)
4592
4593 Exit the main loop thus terminating the application.
4594 """
4595 return _core_.PyApp_Exit(*args, **kwargs)
4596
4597 def ExitMainLoop(*args, **kwargs):
4598 """
4599 ExitMainLoop(self)
4600
4601 Exit the main GUI loop during the next iteration (i.e. it does not
4602 stop the program immediately!)
4603 """
4604 return _core_.PyApp_ExitMainLoop(*args, **kwargs)
4605
4606 def Pending(*args, **kwargs):
4607 """
4608 Pending(self) -> bool
4609
4610 Returns True if there are unprocessed events in the event queue.
4611 """
4612 return _core_.PyApp_Pending(*args, **kwargs)
4613
4614 def Dispatch(*args, **kwargs):
4615 """
4616 Dispatch(self) -> bool
4617
4618 Process the first event in the event queue (blocks until an event
4619 appears if there are none currently)
4620 """
4621 return _core_.PyApp_Dispatch(*args, **kwargs)
4622
4623 def ProcessIdle(*args, **kwargs):
4624 """
4625 ProcessIdle(self) -> bool
4626
4627 Called from the MainLoop when the application becomes idle and sends an
4628 IdleEvent to all interested parties. Returns True is more idle events are
4629 needed, False if not.
4630 """
4631 return _core_.PyApp_ProcessIdle(*args, **kwargs)
4632
4633 def SendIdleEvents(*args, **kwargs):
4634 """
4635 SendIdleEvents(self, Window win, IdleEvent event) -> bool
4636
4637 Send idle event to window and all subwindows. Returns True if more idle time
4638 is requested.
4639 """
4640 return _core_.PyApp_SendIdleEvents(*args, **kwargs)
4641
4642 def IsActive(*args, **kwargs):
4643 """
4644 IsActive(self) -> bool
4645
4646 Return True if our app has focus.
4647 """
4648 return _core_.PyApp_IsActive(*args, **kwargs)
4649
4650 def SetTopWindow(*args, **kwargs):
4651 """
4652 SetTopWindow(self, Window win)
4653
4654 Set the "main" top level window
4655 """
4656 return _core_.PyApp_SetTopWindow(*args, **kwargs)
4657
4658 def GetTopWindow(*args, **kwargs):
4659 """
4660 GetTopWindow(self) -> Window
4661
4662 Return the "main" top level window (if it hadn't been set previously with
4663 SetTopWindow(), will return just some top level window and, if there not any,
4664 will return None)
4665 """
4666 return _core_.PyApp_GetTopWindow(*args, **kwargs)
4667
4668 def SetExitOnFrameDelete(*args, **kwargs):
4669 """
4670 SetExitOnFrameDelete(self, bool flag)
4671
4672 Control the exit behaviour: by default, the program will exit the main loop
4673 (and so, usually, terminate) when the last top-level program window is
4674 deleted. Beware that if you disable this behaviour (with
4675 SetExitOnFrameDelete(False)), you'll have to call ExitMainLoop() explicitly
4676 from somewhere.
4677
4678 """
4679 return _core_.PyApp_SetExitOnFrameDelete(*args, **kwargs)
4680
4681 def GetExitOnFrameDelete(*args, **kwargs):
4682 """
4683 GetExitOnFrameDelete(self) -> bool
4684
4685 Get the current exit behaviour setting.
4686 """
4687 return _core_.PyApp_GetExitOnFrameDelete(*args, **kwargs)
4688
4689 def SetUseBestVisual(*args, **kwargs):
4690 """
4691 SetUseBestVisual(self, bool flag)
4692
4693 Set whether the app should try to use the best available visual on systems
4694 where more than one is available, (Sun, SGI, XFree86 4, etc.)
4695 """
4696 return _core_.PyApp_SetUseBestVisual(*args, **kwargs)
4697
4698 def GetUseBestVisual(*args, **kwargs):
4699 """
4700 GetUseBestVisual(self) -> bool
4701
4702 Get current UseBestVisual setting.
4703 """
4704 return _core_.PyApp_GetUseBestVisual(*args, **kwargs)
4705
4706 def SetPrintMode(*args, **kwargs):
4707 """SetPrintMode(self, int mode)"""
4708 return _core_.PyApp_SetPrintMode(*args, **kwargs)
4709
4710 def GetPrintMode(*args, **kwargs):
4711 """GetPrintMode(self) -> int"""
4712 return _core_.PyApp_GetPrintMode(*args, **kwargs)
4713
4714 def SetAssertMode(*args, **kwargs):
4715 """
4716 SetAssertMode(self, int mode)
4717
4718 Set the OnAssert behaviour for debug and hybrid builds. The following flags
4719 may be or'd together:
4720
4721 wx.PYAPP_ASSERT_SUPPRESS Don't do anything
4722 wx.PYAPP_ASSERT_EXCEPTION Turn it into a Python exception if possible (default)
4723 wx.PYAPP_ASSERT_DIALOG Display a message dialog
4724 wx.PYAPP_ASSERT_LOG Write the assertion info to the wx.Log
4725
4726 """
4727 return _core_.PyApp_SetAssertMode(*args, **kwargs)
4728
4729 def GetAssertMode(*args, **kwargs):
4730 """
4731 GetAssertMode(self) -> int
4732
4733 Get the current OnAssert behaviour setting.
4734 """
4735 return _core_.PyApp_GetAssertMode(*args, **kwargs)
4736
4737 def GetMacSupportPCMenuShortcuts(*args, **kwargs):
4738 """PyApp.GetMacSupportPCMenuShortcuts() -> bool"""
4739 return _core_.PyApp_GetMacSupportPCMenuShortcuts(*args, **kwargs)
4740
4741 GetMacSupportPCMenuShortcuts = staticmethod(GetMacSupportPCMenuShortcuts)
4742 def GetMacAboutMenuItemId(*args, **kwargs):
4743 """PyApp.GetMacAboutMenuItemId() -> long"""
4744 return _core_.PyApp_GetMacAboutMenuItemId(*args, **kwargs)
4745
4746 GetMacAboutMenuItemId = staticmethod(GetMacAboutMenuItemId)
4747 def GetMacPreferencesMenuItemId(*args, **kwargs):
4748 """PyApp.GetMacPreferencesMenuItemId() -> long"""
4749 return _core_.PyApp_GetMacPreferencesMenuItemId(*args, **kwargs)
4750
4751 GetMacPreferencesMenuItemId = staticmethod(GetMacPreferencesMenuItemId)
4752 def GetMacExitMenuItemId(*args, **kwargs):
4753 """PyApp.GetMacExitMenuItemId() -> long"""
4754 return _core_.PyApp_GetMacExitMenuItemId(*args, **kwargs)
4755
4756 GetMacExitMenuItemId = staticmethod(GetMacExitMenuItemId)
4757 def GetMacHelpMenuTitleName(*args, **kwargs):
4758 """PyApp.GetMacHelpMenuTitleName() -> String"""
4759 return _core_.PyApp_GetMacHelpMenuTitleName(*args, **kwargs)
4760
4761 GetMacHelpMenuTitleName = staticmethod(GetMacHelpMenuTitleName)
4762 def SetMacSupportPCMenuShortcuts(*args, **kwargs):
4763 """PyApp.SetMacSupportPCMenuShortcuts(bool val)"""
4764 return _core_.PyApp_SetMacSupportPCMenuShortcuts(*args, **kwargs)
4765
4766 SetMacSupportPCMenuShortcuts = staticmethod(SetMacSupportPCMenuShortcuts)
4767 def SetMacAboutMenuItemId(*args, **kwargs):
4768 """PyApp.SetMacAboutMenuItemId(long val)"""
4769 return _core_.PyApp_SetMacAboutMenuItemId(*args, **kwargs)
4770
4771 SetMacAboutMenuItemId = staticmethod(SetMacAboutMenuItemId)
4772 def SetMacPreferencesMenuItemId(*args, **kwargs):
4773 """PyApp.SetMacPreferencesMenuItemId(long val)"""
4774 return _core_.PyApp_SetMacPreferencesMenuItemId(*args, **kwargs)
4775
4776 SetMacPreferencesMenuItemId = staticmethod(SetMacPreferencesMenuItemId)
4777 def SetMacExitMenuItemId(*args, **kwargs):
4778 """PyApp.SetMacExitMenuItemId(long val)"""
4779 return _core_.PyApp_SetMacExitMenuItemId(*args, **kwargs)
4780
4781 SetMacExitMenuItemId = staticmethod(SetMacExitMenuItemId)
4782 def SetMacHelpMenuTitleName(*args, **kwargs):
4783 """PyApp.SetMacHelpMenuTitleName(String val)"""
4784 return _core_.PyApp_SetMacHelpMenuTitleName(*args, **kwargs)
4785
4786 SetMacHelpMenuTitleName = staticmethod(SetMacHelpMenuTitleName)
4787 def _BootstrapApp(*args, **kwargs):
4788 """
4789 _BootstrapApp(self)
4790
4791 For internal use only
4792 """
4793 return _core_.PyApp__BootstrapApp(*args, **kwargs)
4794
4795 def GetComCtl32Version(*args, **kwargs):
4796 """
4797 PyApp.GetComCtl32Version() -> int
4798
4799 Returns 400, 470, 471, etc. for comctl32.dll 4.00, 4.70, 4.71 or
4800 0 if it wasn't found at all. Raises an exception on non-Windows
4801 platforms.
4802 """
4803 return _core_.PyApp_GetComCtl32Version(*args, **kwargs)
4804
4805 GetComCtl32Version = staticmethod(GetComCtl32Version)
4806
4807 class PyAppPtr(PyApp):
4808 def __init__(self, this):
4809 self.this = this
4810 if not hasattr(self,"thisown"): self.thisown = 0
4811 self.__class__ = PyApp
4812 _core_.PyApp_swigregister(PyAppPtr)
4813
4814 def PyApp_GetMacSupportPCMenuShortcuts(*args, **kwargs):
4815 """PyApp_GetMacSupportPCMenuShortcuts() -> bool"""
4816 return _core_.PyApp_GetMacSupportPCMenuShortcuts(*args, **kwargs)
4817
4818 def PyApp_GetMacAboutMenuItemId(*args, **kwargs):
4819 """PyApp_GetMacAboutMenuItemId() -> long"""
4820 return _core_.PyApp_GetMacAboutMenuItemId(*args, **kwargs)
4821
4822 def PyApp_GetMacPreferencesMenuItemId(*args, **kwargs):
4823 """PyApp_GetMacPreferencesMenuItemId() -> long"""
4824 return _core_.PyApp_GetMacPreferencesMenuItemId(*args, **kwargs)
4825
4826 def PyApp_GetMacExitMenuItemId(*args, **kwargs):
4827 """PyApp_GetMacExitMenuItemId() -> long"""
4828 return _core_.PyApp_GetMacExitMenuItemId(*args, **kwargs)
4829
4830 def PyApp_GetMacHelpMenuTitleName(*args, **kwargs):
4831 """PyApp_GetMacHelpMenuTitleName() -> String"""
4832 return _core_.PyApp_GetMacHelpMenuTitleName(*args, **kwargs)
4833
4834 def PyApp_SetMacSupportPCMenuShortcuts(*args, **kwargs):
4835 """PyApp_SetMacSupportPCMenuShortcuts(bool val)"""
4836 return _core_.PyApp_SetMacSupportPCMenuShortcuts(*args, **kwargs)
4837
4838 def PyApp_SetMacAboutMenuItemId(*args, **kwargs):
4839 """PyApp_SetMacAboutMenuItemId(long val)"""
4840 return _core_.PyApp_SetMacAboutMenuItemId(*args, **kwargs)
4841
4842 def PyApp_SetMacPreferencesMenuItemId(*args, **kwargs):
4843 """PyApp_SetMacPreferencesMenuItemId(long val)"""
4844 return _core_.PyApp_SetMacPreferencesMenuItemId(*args, **kwargs)
4845
4846 def PyApp_SetMacExitMenuItemId(*args, **kwargs):
4847 """PyApp_SetMacExitMenuItemId(long val)"""
4848 return _core_.PyApp_SetMacExitMenuItemId(*args, **kwargs)
4849
4850 def PyApp_SetMacHelpMenuTitleName(*args, **kwargs):
4851 """PyApp_SetMacHelpMenuTitleName(String val)"""
4852 return _core_.PyApp_SetMacHelpMenuTitleName(*args, **kwargs)
4853
4854 def PyApp_GetComCtl32Version(*args, **kwargs):
4855 """
4856 PyApp_GetComCtl32Version() -> int
4857
4858 Returns 400, 470, 471, etc. for comctl32.dll 4.00, 4.70, 4.71 or
4859 0 if it wasn't found at all. Raises an exception on non-Windows
4860 platforms.
4861 """
4862 return _core_.PyApp_GetComCtl32Version(*args, **kwargs)
4863
4864 #---------------------------------------------------------------------------
4865
4866
4867 def Exit(*args, **kwargs):
4868 """
4869 Exit()
4870
4871 Force an exit of the application. Convenience for wx.GetApp().Exit()
4872 """
4873 return _core_.Exit(*args, **kwargs)
4874
4875 def Yield(*args, **kwargs):
4876 """
4877 Yield() -> bool
4878
4879 Yield to other apps/messages. Convenience for wx.GetApp().Yield()
4880 """
4881 return _core_.Yield(*args, **kwargs)
4882
4883 def YieldIfNeeded(*args, **kwargs):
4884 """
4885 YieldIfNeeded() -> bool
4886
4887 Yield to other apps/messages. Convenience for wx.GetApp().Yield(True)
4888 """
4889 return _core_.YieldIfNeeded(*args, **kwargs)
4890
4891 def SafeYield(*args, **kwargs):
4892 """
4893 SafeYield(Window win=None, bool onlyIfNeeded=False) -> bool
4894
4895 This function is similar to wx.Yield, except that it disables the user input
4896 to all program windows before calling wx.Yield and re-enables it again
4897 afterwards. If win is not None, this window will remain enabled, allowing the
4898 implementation of some limited user interaction.
4899
4900 Returns the result of the call to wx.Yield.
4901 """
4902 return _core_.SafeYield(*args, **kwargs)
4903
4904 def WakeUpIdle(*args, **kwargs):
4905 """
4906 WakeUpIdle()
4907
4908 Cause the message queue to become empty again, so idle events will be sent.
4909 """
4910 return _core_.WakeUpIdle(*args, **kwargs)
4911
4912 def PostEvent(*args, **kwargs):
4913 """
4914 PostEvent(EvtHandler dest, Event event)
4915
4916 Send an event to a window or other wx.EvtHandler to be processed later.
4917 """
4918 return _core_.PostEvent(*args, **kwargs)
4919
4920 def App_CleanUp(*args, **kwargs):
4921 """
4922 App_CleanUp()
4923
4924 For internal use only, it is used to cleanup after wxWindows when Python shuts down.
4925 """
4926 return _core_.App_CleanUp(*args, **kwargs)
4927
4928 def GetApp(*args, **kwargs):
4929 """
4930 GetApp() -> PyApp
4931
4932 Return a reference to the current wx.App object.
4933 """
4934 return _core_.GetApp(*args, **kwargs)
4935 #----------------------------------------------------------------------
4936
4937 class PyOnDemandOutputWindow:
4938 """
4939 A class that can be used for redirecting Python's stdout and
4940 stderr streams. It will do nothing until something is wrriten to
4941 the stream at which point it will create a Frame with a text area
4942 and write the text there.
4943 """
4944 def __init__(self, title = "wxPython: stdout/stderr"):
4945 self.frame = None
4946 self.title = title
4947 self.parent = None
4948
4949 def SetParent(self, parent):
4950 """Set the window to be used as the popup Frame's parent."""
4951 self.parent = parent
4952
4953
4954 def CreateOutputWindow(self, st):
4955 self.frame = wx.Frame(self.parent, -1, self.title,
4956 style=wx.DEFAULT_FRAME_STYLE | wx.NO_FULL_REPAINT_ON_RESIZE)
4957 self.text = wx.TextCtrl(self.frame, -1, "",
4958 style = wx.TE_MULTILINE | wx.TE_READONLY)
4959 self.text.AppendText(st)
4960 self.frame.SetSize((450, 300))
4961 self.frame.Show(True)
4962 EVT_CLOSE(self.frame, self.OnCloseWindow)
4963
4964
4965 def OnCloseWindow(self, event):
4966 if self.frame is not None:
4967 self.frame.Destroy()
4968 self.frame = None
4969 self.text = None
4970
4971
4972 # These methods provide the file-like output behaviour.
4973 def write(self, text):
4974 """
4975 Create the output window if needed and write the string to it.
4976 If not called in the context of the gui thread then uses
4977 CallAfter to do the work there.
4978 """
4979 if self.frame is None:
4980 if not wx.Thread_IsMain():
4981 wx.CallAfter(self.CreateOutputWindow, text)
4982 else:
4983 self.CreateOutputWindow(text)
4984 else:
4985 if not wx.Thread_IsMain():
4986 wx.CallAfter(self.text.AppendText, text)
4987 else:
4988 self.text.AppendText(text)
4989
4990
4991 def close(self):
4992 if self.frame is not None:
4993 wx.CallAfter(self.frame.Close)
4994
4995
4996
4997 #----------------------------------------------------------------------
4998
4999 _defRedirect = (wx.Platform == '__WXMSW__' or wx.Platform == '__WXMAC__')
5000
5001 class App(wx.PyApp):
5002 """
5003 The main application class. Derive from this and implement an OnInit
5004 method that creates a frame and then calls self.SetTopWindow(frame)
5005 """
5006 outputWindowClass = PyOnDemandOutputWindow
5007
5008 def __init__(self, redirect=_defRedirect, filename=None, useBestVisual=False):
5009 wx.PyApp.__init__(self)
5010
5011 if wx.Platform == "__WXMAC__":
5012 try:
5013 import MacOS
5014 if not MacOS.WMAvailable():
5015 print """\
5016 This program needs access to the screen. Please run with 'pythonw',
5017 not 'python', and only when you are logged in on the main display of
5018 your Mac."""
5019 _sys.exit(1)
5020 except:
5021 pass
5022
5023 # This has to be done before OnInit
5024 self.SetUseBestVisual(useBestVisual)
5025
5026 # Set the default handler for SIGINT. This fixes a problem
5027 # where if Ctrl-C is pressed in the console that started this
5028 # app then it will not appear to do anything, (not even send
5029 # KeyboardInterrupt???) but will later segfault on exit. By
5030 # setting the default handler then the app will exit, as
5031 # expected (depending on platform.)
5032 try:
5033 import signal
5034 signal.signal(signal.SIGINT, signal.SIG_DFL)
5035 except:
5036 pass
5037
5038 # Save and redirect the stdio to a window?
5039 self.stdioWin = None
5040 self.saveStdio = (_sys.stdout, _sys.stderr)
5041 if redirect:
5042 self.RedirectStdio(filename)
5043
5044 # This finishes the initialization of wxWindows and then calls
5045 # the OnInit that should be present in the derived class
5046 self._BootstrapApp()
5047
5048
5049 def __del__(self):
5050 try:
5051 self.RestoreStdio() # Just in case the MainLoop was overridden
5052 except:
5053 pass
5054
5055
5056 def SetTopWindow(self, frame):
5057 """Set the \"main\" top level window"""
5058 if self.stdioWin:
5059 self.stdioWin.SetParent(frame)
5060 wx.PyApp.SetTopWindow(self, frame)
5061
5062
5063 def MainLoop(self):
5064 """Execute the main GUI event loop"""
5065 wx.PyApp.MainLoop(self)
5066 self.RestoreStdio()
5067
5068
5069 def RedirectStdio(self, filename=None):
5070 """Redirect sys.stdout and sys.stderr to a file or a popup window."""
5071 if filename:
5072 _sys.stdout = _sys.stderr = open(filename, 'a')
5073 else:
5074 self.stdioWin = self.outputWindowClass()
5075 _sys.stdout = _sys.stderr = self.stdioWin
5076
5077
5078 def RestoreStdio(self):
5079 _sys.stdout, _sys.stderr = self.saveStdio
5080
5081
5082
5083 # change from wxPyApp_ to wxApp_
5084 App_GetMacSupportPCMenuShortcuts = _core_.PyApp_GetMacSupportPCMenuShortcuts
5085 App_GetMacAboutMenuItemId = _core_.PyApp_GetMacAboutMenuItemId
5086 App_GetMacPreferencesMenuItemId = _core_.PyApp_GetMacPreferencesMenuItemId
5087 App_GetMacExitMenuItemId = _core_.PyApp_GetMacExitMenuItemId
5088 App_GetMacHelpMenuTitleName = _core_.PyApp_GetMacHelpMenuTitleName
5089 App_SetMacSupportPCMenuShortcuts = _core_.PyApp_SetMacSupportPCMenuShortcuts
5090 App_SetMacAboutMenuItemId = _core_.PyApp_SetMacAboutMenuItemId
5091 App_SetMacPreferencesMenuItemId = _core_.PyApp_SetMacPreferencesMenuItemId
5092 App_SetMacExitMenuItemId = _core_.PyApp_SetMacExitMenuItemId
5093 App_SetMacHelpMenuTitleName = _core_.PyApp_SetMacHelpMenuTitleName
5094 App_GetComCtl32Version = _core_.PyApp_GetComCtl32Version
5095
5096 #----------------------------------------------------------------------------
5097
5098 class PySimpleApp(wx.App):
5099 """
5100 A simple application class. You can just create one of these and
5101 then then make your top level windows later, and not have to worry
5102 about OnInit."""
5103
5104 def __init__(self, redirect=False, filename=None, useBestVisual=False):
5105 wx.App.__init__(self, redirect, filename, useBestVisual)
5106
5107 def OnInit(self):
5108 wx.InitAllImageHandlers()
5109 return True
5110
5111
5112 # Is anybody using this one?
5113 class PyWidgetTester(wx.App):
5114 def __init__(self, size = (250, 100)):
5115 self.size = size
5116 wx.App.__init__(self, 0)
5117
5118 def OnInit(self):
5119 self.frame = wx.Frame(None, -1, "Widget Tester", pos=(0,0), size=self.size)
5120 self.SetTopWindow(self.frame)
5121 return True
5122
5123 def SetWidget(self, widgetClass, *args):
5124 w = widgetClass(self.frame, *args)
5125 self.frame.Show(True)
5126
5127 #----------------------------------------------------------------------------
5128 # DO NOT hold any other references to this object. This is how we
5129 # know when to cleanup system resources that wxWin is holding. When
5130 # the sys module is unloaded, the refcount on sys.__wxPythonCleanup
5131 # goes to zero and it calls the wxApp_CleanUp function.
5132
5133 class __wxPyCleanup:
5134 def __init__(self):
5135 self.cleanup = _core_.App_CleanUp
5136 def __del__(self):
5137 self.cleanup()
5138
5139 _sys.__wxPythonCleanup = __wxPyCleanup()
5140
5141 ## # another possible solution, but it gets called too early...
5142 ## if sys.version[0] == '2':
5143 ## import atexit
5144 ## atexit.register(_core_.wxApp_CleanUp)
5145 ## else:
5146 ## sys.exitfunc = _core_.wxApp_CleanUp
5147
5148
5149 #----------------------------------------------------------------------------
5150
5151 #---------------------------------------------------------------------------
5152
5153 class AcceleratorEntry(object):
5154 def __repr__(self):
5155 return "<%s.%s; proxy of C++ wxAcceleratorEntry instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
5156 def __init__(self, *args, **kwargs):
5157 """__init__(self, int flags=0, int keyCode=0, int cmd=0, MenuItem item=None) -> AcceleratorEntry"""
5158 newobj = _core_.new_AcceleratorEntry(*args, **kwargs)
5159 self.this = newobj.this
5160 self.thisown = 1
5161 del newobj.thisown
5162 def __del__(self, destroy=_core_.delete_AcceleratorEntry):
5163 """__del__(self)"""
5164 try:
5165 if self.thisown: destroy(self)
5166 except: pass
5167
5168 def Set(*args, **kwargs):
5169 """Set(self, int flags, int keyCode, int cmd, MenuItem item=None)"""
5170 return _core_.AcceleratorEntry_Set(*args, **kwargs)
5171
5172 def SetMenuItem(*args, **kwargs):
5173 """SetMenuItem(self, MenuItem item)"""
5174 return _core_.AcceleratorEntry_SetMenuItem(*args, **kwargs)
5175
5176 def GetMenuItem(*args, **kwargs):
5177 """GetMenuItem(self) -> MenuItem"""
5178 return _core_.AcceleratorEntry_GetMenuItem(*args, **kwargs)
5179
5180 def GetFlags(*args, **kwargs):
5181 """GetFlags(self) -> int"""
5182 return _core_.AcceleratorEntry_GetFlags(*args, **kwargs)
5183
5184 def GetKeyCode(*args, **kwargs):
5185 """GetKeyCode(self) -> int"""
5186 return _core_.AcceleratorEntry_GetKeyCode(*args, **kwargs)
5187
5188 def GetCommand(*args, **kwargs):
5189 """GetCommand(self) -> int"""
5190 return _core_.AcceleratorEntry_GetCommand(*args, **kwargs)
5191
5192
5193 class AcceleratorEntryPtr(AcceleratorEntry):
5194 def __init__(self, this):
5195 self.this = this
5196 if not hasattr(self,"thisown"): self.thisown = 0
5197 self.__class__ = AcceleratorEntry
5198 _core_.AcceleratorEntry_swigregister(AcceleratorEntryPtr)
5199
5200 class AcceleratorTable(Object):
5201 def __repr__(self):
5202 return "<%s.%s; proxy of C++ wxAcceleratorTable instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
5203 def __init__(self, *args, **kwargs):
5204 """
5205 __init__(entries) -> AcceleratorTable
5206
5207 Construct an AcceleratorTable from a list of AcceleratorEntry items or
5208 3-tuples (flags, keyCode, cmdID)
5209 """
5210 newobj = _core_.new_AcceleratorTable(*args, **kwargs)
5211 self.this = newobj.this
5212 self.thisown = 1
5213 del newobj.thisown
5214 def __del__(self, destroy=_core_.delete_AcceleratorTable):
5215 """__del__(self)"""
5216 try:
5217 if self.thisown: destroy(self)
5218 except: pass
5219
5220 def Ok(*args, **kwargs):
5221 """Ok(self) -> bool"""
5222 return _core_.AcceleratorTable_Ok(*args, **kwargs)
5223
5224
5225 class AcceleratorTablePtr(AcceleratorTable):
5226 def __init__(self, this):
5227 self.this = this
5228 if not hasattr(self,"thisown"): self.thisown = 0
5229 self.__class__ = AcceleratorTable
5230 _core_.AcceleratorTable_swigregister(AcceleratorTablePtr)
5231
5232
5233 def GetAccelFromString(*args, **kwargs):
5234 """GetAccelFromString(String label) -> AcceleratorEntry"""
5235 return _core_.GetAccelFromString(*args, **kwargs)
5236 #---------------------------------------------------------------------------
5237
5238 class VisualAttributes(object):
5239 """struct containing all the visual attributes of a control"""
5240 def __repr__(self):
5241 return "<%s.%s; proxy of C++ wxVisualAttributes instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
5242 def __init__(self, *args, **kwargs):
5243 """
5244 __init__(self) -> VisualAttributes
5245
5246 struct containing all the visual attributes of a control
5247 """
5248 newobj = _core_.new_VisualAttributes(*args, **kwargs)
5249 self.this = newobj.this
5250 self.thisown = 1
5251 del newobj.thisown
5252 def __del__(self, destroy=_core_.delete_VisualAttributes):
5253 """__del__(self)"""
5254 try:
5255 if self.thisown: destroy(self)
5256 except: pass
5257
5258 font = property(_core_.VisualAttributes_font_get, _core_.VisualAttributes_font_set)
5259 colFg = property(_core_.VisualAttributes_colFg_get, _core_.VisualAttributes_colFg_set)
5260 colBg = property(_core_.VisualAttributes_colBg_get, _core_.VisualAttributes_colBg_set)
5261
5262 class VisualAttributesPtr(VisualAttributes):
5263 def __init__(self, this):
5264 self.this = this
5265 if not hasattr(self,"thisown"): self.thisown = 0
5266 self.__class__ = VisualAttributes
5267 _core_.VisualAttributes_swigregister(VisualAttributesPtr)
5268 NullAcceleratorTable = cvar.NullAcceleratorTable
5269 PanelNameStr = cvar.PanelNameStr
5270
5271 WINDOW_VARIANT_NORMAL = _core_.WINDOW_VARIANT_NORMAL
5272 WINDOW_VARIANT_SMALL = _core_.WINDOW_VARIANT_SMALL
5273 WINDOW_VARIANT_MINI = _core_.WINDOW_VARIANT_MINI
5274 WINDOW_VARIANT_LARGE = _core_.WINDOW_VARIANT_LARGE
5275 WINDOW_VARIANT_MAX = _core_.WINDOW_VARIANT_MAX
5276 class Window(EvtHandler):
5277 """
5278 wx.Window is the base class for all windows and represents any visible
5279 object on the screen. All controls, top level windows and so on are
5280 wx.Windows. Sizers and device contexts are not however, as they don't
5281 appear on screen themselves.
5282
5283 """
5284 def __repr__(self):
5285 return "<%s.%s; proxy of C++ wxWindow instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
5286 def __init__(self, *args, **kwargs):
5287 """
5288 __init__(self, Window parent, int id=-1, Point pos=DefaultPosition,
5289 Size size=DefaultSize, long style=0, String name=PanelNameStr) -> Window
5290
5291 Construct and show a generic Window.
5292 """
5293 newobj = _core_.new_Window(*args, **kwargs)
5294 self.this = newobj.this
5295 self.thisown = 1
5296 del newobj.thisown
5297 self._setOORInfo(self)
5298
5299 def Create(*args, **kwargs):
5300 """
5301 Create(self, Window parent, int id=-1, Point pos=DefaultPosition,
5302 Size size=DefaultSize, long style=0, String name=PanelNameStr) -> bool
5303
5304 Create the GUI part of the Window for 2-phase creation mode.
5305 """
5306 return _core_.Window_Create(*args, **kwargs)
5307
5308 def Close(*args, **kwargs):
5309 """
5310 Close(self, bool force=False) -> bool
5311
5312 This function simply generates a EVT_CLOSE event whose handler usually
5313 tries to close the window. It doesn't close the window itself,
5314 however. If force is False (the default) then the window's close
5315 handler will be allowed to veto the destruction of the window.
5316
5317 Usually Close is only used with the top level windows (wx.Frame and
5318 wx.Dialog classes) as the others are not supposed to have any special
5319 EVT_CLOSE logic.
5320
5321 The close handler should check whether the window is being deleted
5322 forcibly, using wx.CloseEvent.GetForce, in which case it should
5323 destroy the window using wx.Window.Destroy.
5324
5325 Note that calling Close does not guarantee that the window will be
5326 destroyed; but it provides a way to simulate a manual close of a
5327 window, which may or may not be implemented by destroying the
5328 window. The default EVT_CLOSE handler for wx.Dialog does not
5329 necessarily delete the dialog, since it will simply simulate an
5330 wxID_CANCEL event which is handled by the appropriate button event
5331 handler and may do anything at all.
5332
5333 To guarantee that the window will be destroyed, call wx.Window.Destroy
5334 instead.
5335 """
5336 return _core_.Window_Close(*args, **kwargs)
5337
5338 def Destroy(*args, **kwargs):
5339 """
5340 Destroy(self) -> bool
5341
5342 Destroys the window safely. Frames and dialogs are not destroyed
5343 immediately when this function is called -- they are added to a list
5344 of windows to be deleted on idle time, when all the window's events
5345 have been processed. This prevents problems with events being sent to
5346 non-existent windows.
5347
5348 Returns True if the window has either been successfully deleted, or it
5349 has been added to the list of windows pending real deletion.
5350 """
5351 return _core_.Window_Destroy(*args, **kwargs)
5352
5353 def DestroyChildren(*args, **kwargs):
5354 """
5355 DestroyChildren(self) -> bool
5356
5357 Destroys all children of a window. Called automatically by the destructor.
5358 """
5359 return _core_.Window_DestroyChildren(*args, **kwargs)
5360
5361 def IsBeingDeleted(*args, **kwargs):
5362 """
5363 IsBeingDeleted(self) -> bool
5364
5365 Is the window in the process of being deleted?
5366 """
5367 return _core_.Window_IsBeingDeleted(*args, **kwargs)
5368
5369 def SetTitle(*args, **kwargs):
5370 """
5371 SetTitle(self, String title)
5372
5373 Sets the window's title. Applicable only to frames and dialogs.
5374 """
5375 return _core_.Window_SetTitle(*args, **kwargs)
5376
5377 def GetTitle(*args, **kwargs):
5378 """
5379 GetTitle(self) -> String
5380
5381 Gets the window's title. Applicable only to frames and dialogs.
5382 """
5383 return _core_.Window_GetTitle(*args, **kwargs)
5384
5385 def SetLabel(*args, **kwargs):
5386 """
5387 SetLabel(self, String label)
5388
5389 Set the text which the window shows in its label if applicable.
5390 """
5391 return _core_.Window_SetLabel(*args, **kwargs)
5392
5393 def GetLabel(*args, **kwargs):
5394 """
5395 GetLabel(self) -> String
5396
5397 Generic way of getting a label from any window, for
5398 identification purposes. The interpretation of this function
5399 differs from class to class. For frames and dialogs, the value
5400 returned is the title. For buttons or static text controls, it is
5401 the button text. This function can be useful for meta-programs
5402 such as testing tools or special-needs access programs)which
5403 need to identify windows by name.
5404 """
5405 return _core_.Window_GetLabel(*args, **kwargs)
5406
5407 def SetName(*args, **kwargs):
5408 """
5409 SetName(self, String name)
5410
5411 Sets the window's name. The window name is used for ressource
5412 setting in X, it is not the same as the window title/label
5413 """
5414 return _core_.Window_SetName(*args, **kwargs)
5415
5416 def GetName(*args, **kwargs):
5417 """
5418 GetName(self) -> String
5419
5420 Returns the windows name. This name is not guaranteed to be
5421 unique; it is up to the programmer to supply an appropriate name
5422 in the window constructor or via wx.Window.SetName.
5423 """
5424 return _core_.Window_GetName(*args, **kwargs)
5425
5426 def SetWindowVariant(*args, **kwargs):
5427 """
5428 SetWindowVariant(self, int variant)
5429
5430 Sets the variant of the window/font size to use for this window,
5431 if the platform supports variants, for example, wxMac. Variant values are:
5432
5433 wx.WINDOW_VARIANT_NORMAL Normal size
5434 wx.WINDOW_VARIANT_SMALL Smaller size (about 25 % smaller than normal)
5435 wx.WINDOW_VARIANT_MINI Mini size (about 33 % smaller than normal)
5436 wx.WINDOW_VARIANT_LARGE Large size (about 25 % larger than normal)
5437
5438 """
5439 return _core_.Window_SetWindowVariant(*args, **kwargs)
5440
5441 def GetWindowVariant(*args, **kwargs):
5442 """GetWindowVariant(self) -> int"""
5443 return _core_.Window_GetWindowVariant(*args, **kwargs)
5444
5445 def SetId(*args, **kwargs):
5446 """
5447 SetId(self, int winid)
5448
5449 Sets the identifier of the window. Each window has an integer
5450 identifier. If the application has not provided one, an identifier
5451 will be generated. Normally, the identifier should be provided on
5452 creation and should not be modified subsequently.
5453 """
5454 return _core_.Window_SetId(*args, **kwargs)
5455
5456 def GetId(*args, **kwargs):
5457 """
5458 GetId(self) -> int
5459
5460 Returns the identifier of the window. Each window has an integer
5461 identifier. If the application has not provided one (or the default Id
5462 -1 is used) then an unique identifier with a negative value will be
5463 generated.
5464 """
5465 return _core_.Window_GetId(*args, **kwargs)
5466
5467 def NewControlId(*args, **kwargs):
5468 """
5469 Window.NewControlId() -> int
5470
5471 Generate a control id for the controls which were not given one.
5472 """
5473 return _core_.Window_NewControlId(*args, **kwargs)
5474
5475 NewControlId = staticmethod(NewControlId)
5476 def NextControlId(*args, **kwargs):
5477 """
5478 Window.NextControlId(int winid) -> int
5479
5480 Get the id of the control following the one with the given
5481 (autogenerated) id
5482 """
5483 return _core_.Window_NextControlId(*args, **kwargs)
5484
5485 NextControlId = staticmethod(NextControlId)
5486 def PrevControlId(*args, **kwargs):
5487 """
5488 Window.PrevControlId(int winid) -> int
5489
5490 Get the id of the control preceding the one with the given
5491 (autogenerated) id
5492 """
5493 return _core_.Window_PrevControlId(*args, **kwargs)
5494
5495 PrevControlId = staticmethod(PrevControlId)
5496 def SetSize(*args, **kwargs):
5497 """
5498 SetSize(self, Size size)
5499
5500 Sets the size of the window in pixels.
5501 """
5502 return _core_.Window_SetSize(*args, **kwargs)
5503
5504 def SetDimensions(*args, **kwargs):
5505 """
5506 SetDimensions(self, int x, int y, int width, int height, int sizeFlags=SIZE_AUTO)
5507
5508 Sets the position and size of the window in pixels. The sizeFlags
5509 parameter indicates the interpretation of the other params if they are
5510 -1. wx.SIZE_AUTO*: a -1 indicates that a class-specific default
5511 shoudl be used. wx.SIZE_USE_EXISTING: existing dimensions should be
5512 used if -1 values are supplied. wxSIZE_ALLOW_MINUS_ONE: allow
5513 dimensions of -1 and less to be interpreted as real dimensions, not
5514 default values.
5515 """
5516 return _core_.Window_SetDimensions(*args, **kwargs)
5517
5518 def SetRect(*args, **kwargs):
5519 """
5520 SetRect(self, Rect rect, int sizeFlags=SIZE_AUTO)
5521
5522 Sets the position and size of the window in pixels using a wx.Rect.
5523 """
5524 return _core_.Window_SetRect(*args, **kwargs)
5525
5526 def SetSizeWH(*args, **kwargs):
5527 """
5528 SetSizeWH(self, int width, int height)
5529
5530 Sets the size of the window in pixels.
5531 """
5532 return _core_.Window_SetSizeWH(*args, **kwargs)
5533
5534 def Move(*args, **kwargs):
5535 """
5536 Move(self, Point pt, int flags=SIZE_USE_EXISTING)
5537
5538 Moves the window to the given position.
5539 """
5540 return _core_.Window_Move(*args, **kwargs)
5541
5542 SetPosition = Move
5543 def MoveXY(*args, **kwargs):
5544 """
5545 MoveXY(self, int x, int y, int flags=SIZE_USE_EXISTING)
5546
5547 Moves the window to the given position.
5548 """
5549 return _core_.Window_MoveXY(*args, **kwargs)
5550
5551 def Raise(*args, **kwargs):
5552 """
5553 Raise(self)
5554
5555 Raises the window to the top of the window hierarchy if it is a
5556 managed window (dialog or frame).
5557 """
5558 return _core_.Window_Raise(*args, **kwargs)
5559
5560 def Lower(*args, **kwargs):
5561 """
5562 Lower(self)
5563
5564 Lowers the window to the bottom of the window hierarchy if it is a
5565 managed window (dialog or frame).
5566 """
5567 return _core_.Window_Lower(*args, **kwargs)
5568
5569 def SetClientSize(*args, **kwargs):
5570 """
5571 SetClientSize(self, Size size)
5572
5573 This sets the size of the window client area in pixels. Using this
5574 function to size a window tends to be more device-independent than
5575 wx.Window.SetSize, since the application need not worry about what
5576 dimensions the border or title bar have when trying to fit the window
5577 around panel items, for example.
5578 """
5579 return _core_.Window_SetClientSize(*args, **kwargs)
5580
5581 def SetClientSizeWH(*args, **kwargs):
5582 """
5583 SetClientSizeWH(self, int width, int height)
5584
5585 This sets the size of the window client area in pixels. Using this
5586 function to size a window tends to be more device-independent than
5587 wx.Window.SetSize, since the application need not worry about what
5588 dimensions the border or title bar have when trying to fit the window
5589 around panel items, for example.
5590 """
5591 return _core_.Window_SetClientSizeWH(*args, **kwargs)
5592
5593 def SetClientRect(*args, **kwargs):
5594 """
5595 SetClientRect(self, Rect rect)
5596
5597 This sets the size of the window client area in pixels. Using this
5598 function to size a window tends to be more device-independent than
5599 wx.Window.SetSize, since the application need not worry about what
5600 dimensions the border or title bar have when trying to fit the window
5601 around panel items, for example.
5602 """
5603 return _core_.Window_SetClientRect(*args, **kwargs)
5604
5605 def GetPosition(*args, **kwargs):
5606 """
5607 GetPosition(self) -> Point
5608
5609 Get the window's position.
5610 """
5611 return _core_.Window_GetPosition(*args, **kwargs)
5612
5613 def GetPositionTuple(*args, **kwargs):
5614 """
5615 GetPositionTuple() -> (x,y)
5616
5617 Get the window's position.
5618 """
5619 return _core_.Window_GetPositionTuple(*args, **kwargs)
5620
5621 def GetSize(*args, **kwargs):
5622 """
5623 GetSize(self) -> Size
5624
5625 Get the window size.
5626 """
5627 return _core_.Window_GetSize(*args, **kwargs)
5628
5629 def GetSizeTuple(*args, **kwargs):
5630 """
5631 GetSizeTuple() -> (width, height)
5632
5633 Get the window size.
5634 """
5635 return _core_.Window_GetSizeTuple(*args, **kwargs)
5636
5637 def GetRect(*args, **kwargs):
5638 """
5639 GetRect(self) -> Rect
5640
5641 Returns the size and position of the window as a wx.Rect object.
5642 """
5643 return _core_.Window_GetRect(*args, **kwargs)
5644
5645 def GetClientSize(*args, **kwargs):
5646 """
5647 GetClientSize(self) -> Size
5648
5649 This gets the size of the window's 'client area' in pixels. The client
5650 area is the area which may be drawn on by the programmer, excluding
5651 title bar, border, scrollbars, etc.
5652 """
5653 return _core_.Window_GetClientSize(*args, **kwargs)
5654
5655 def GetClientSizeTuple(*args, **kwargs):
5656 """
5657 GetClientSizeTuple() -> (width, height)
5658
5659 This gets the size of the window's 'client area' in pixels. The client
5660 area is the area which may be drawn on by the programmer, excluding
5661 title bar, border, scrollbars, etc.
5662 """
5663 return _core_.Window_GetClientSizeTuple(*args, **kwargs)
5664
5665 def GetClientAreaOrigin(*args, **kwargs):
5666 """
5667 GetClientAreaOrigin(self) -> Point
5668
5669 Get the origin of the client area of the window relative to the
5670 window's top left corner (the client area may be shifted because of
5671 the borders, scrollbars, other decorations...)
5672 """
5673 return _core_.Window_GetClientAreaOrigin(*args, **kwargs)
5674
5675 def GetClientRect(*args, **kwargs):
5676 """
5677 GetClientRect(self) -> Rect
5678
5679 Get the client area position and size as a wx.Rect object.
5680 """
5681 return _core_.Window_GetClientRect(*args, **kwargs)
5682
5683 def GetBestSize(*args, **kwargs):
5684 """
5685 GetBestSize(self) -> Size
5686
5687 This functions returns the best acceptable minimal size for the
5688 window, if applicable. For example, for a static text control, it will be
5689 the minimal size such that the control label is not truncated. For
5690 windows containing subwindows (suzh aswx.Panel), the size returned
5691 by this function will be the same as the size the window would have
5692 had after calling Fit.
5693 """
5694 return _core_.Window_GetBestSize(*args, **kwargs)
5695
5696 def GetBestSizeTuple(*args, **kwargs):
5697 """
5698 GetBestSizeTuple() -> (width, height)
5699
5700 This functions returns the best acceptable minimal size for the
5701 window, if applicable. For example, for a static text control, it will be
5702 the minimal size such that the control label is not truncated. For
5703 windows containing subwindows (suzh aswx.Panel), the size returned
5704 by this function will be the same as the size the window would have
5705 had after calling Fit.
5706 """
5707 return _core_.Window_GetBestSizeTuple(*args, **kwargs)
5708
5709 def GetAdjustedBestSize(*args, **kwargs):
5710 """
5711 GetAdjustedBestSize(self) -> Size
5712
5713 This method is similar to GetBestSize, except in one
5714 thing. GetBestSize should return the minimum untruncated size of the
5715 window, while this method will return the largest of BestSize and any
5716 user specified minimum size. ie. it is the minimum size the window
5717 should currently be drawn at, not the minimal size it can possibly
5718 tolerate.
5719 """
5720 return _core_.Window_GetAdjustedBestSize(*args, **kwargs)
5721
5722 def Center(*args, **kwargs):
5723 """
5724 Center(self, int direction=BOTH)
5725
5726 Centers the window. The parameter specifies the direction for
5727 cetering, and may be wx.HORIZONTAL, wx.VERTICAL or wx.BOTH. It may
5728 also include wx.CENTER_ON_SCREEN flag if you want to center the window
5729 on the entire screen and not on its parent window. If it is a
5730 top-level window and has no parent then it will always be centered
5731 relative to the screen.
5732 """
5733 return _core_.Window_Center(*args, **kwargs)
5734
5735 Centre = Center
5736 def CenterOnScreen(*args, **kwargs):
5737 """
5738 CenterOnScreen(self, int dir=BOTH)
5739
5740 Center on screen (only works for top level windows)
5741 """
5742 return _core_.Window_CenterOnScreen(*args, **kwargs)
5743
5744 CentreOnScreen = CenterOnScreen
5745 def CenterOnParent(*args, **kwargs):
5746 """
5747 CenterOnParent(self, int dir=BOTH)
5748
5749 Center with respect to the the parent window
5750 """
5751 return _core_.Window_CenterOnParent(*args, **kwargs)
5752
5753 CentreOnParent = CenterOnParent
5754 def Fit(*args, **kwargs):
5755 """
5756 Fit(self)
5757
5758 Sizes the window so that it fits around its subwindows. This function
5759 won't do anything if there are no subwindows and will only really work
5760 correctly if sizers are used for the subwindows layout. Also, if the
5761 window has exactly one subwindow it is better (faster and the result
5762 is more precise as Fit adds some margin to account for fuzziness of
5763 its calculations) to call window.SetClientSize(child.GetSize())
5764 instead of calling Fit.
5765 """
5766 return _core_.Window_Fit(*args, **kwargs)
5767
5768 def FitInside(*args, **kwargs):
5769 """
5770 FitInside(self)
5771
5772 Similar to Fit, but sizes the interior (virtual) size of a
5773 window. Mainly useful with scrolled windows to reset scrollbars after
5774 sizing changes that do not trigger a size event, and/or scrolled
5775 windows without an interior sizer. This function similarly won't do
5776 anything if there are no subwindows.
5777 """
5778 return _core_.Window_FitInside(*args, **kwargs)
5779
5780 def SetSizeHints(*args):
5781 """
5782 SetSizeHints(self, int minW, int minH, int maxW=-1, int maxH=-1, int incW=-1,
5783 int incH=-1)
5784 SetSizeHints(self, Size minSize, Size maxSize=DefaultSize, Size incSize=DefaultSize)
5785
5786 Allows specification of minimum and maximum window sizes, and window
5787 size increments. If a pair of values is not set (or set to -1), the
5788 default values will be used. If this function is called, the user
5789 will not be able to size the window outside the given bounds. The
5790 resizing increments are only significant under Motif or Xt.
5791 """
5792 return _core_.Window_SetSizeHints(*args)
5793
5794 def SetVirtualSizeHints(*args):
5795 """
5796 SetVirtualSizeHints(self, int minW, int minH, int maxW=-1, int maxH=-1)
5797 SetVirtualSizeHints(self, Size minSize, Size maxSize=DefaultSize)
5798
5799 Allows specification of minimum and maximum virtual window sizes. If a
5800 pair of values is not set (or set to -1), the default values will be
5801 used. If this function is called, the user will not be able to size
5802 the virtual area of the window outside the given bounds.
5803 """
5804 return _core_.Window_SetVirtualSizeHints(*args)
5805
5806 def GetMinWidth(*args, **kwargs):
5807 """GetMinWidth(self) -> int"""
5808 return _core_.Window_GetMinWidth(*args, **kwargs)
5809
5810 def GetMinHeight(*args, **kwargs):
5811 """GetMinHeight(self) -> int"""
5812 return _core_.Window_GetMinHeight(*args, **kwargs)
5813
5814 def GetMaxWidth(*args, **kwargs):
5815 """GetMaxWidth(self) -> int"""
5816 return _core_.Window_GetMaxWidth(*args, **kwargs)
5817
5818 def GetMaxHeight(*args, **kwargs):
5819 """GetMaxHeight(self) -> int"""
5820 return _core_.Window_GetMaxHeight(*args, **kwargs)
5821
5822 def GetMaxSize(*args, **kwargs):
5823 """GetMaxSize(self) -> Size"""
5824 return _core_.Window_GetMaxSize(*args, **kwargs)
5825
5826 def GetMinSize(*args, **kwargs):
5827 """GetMinSize(self) -> Size"""
5828 return _core_.Window_GetMinSize(*args, **kwargs)
5829
5830 def SetVirtualSize(*args, **kwargs):
5831 """
5832 SetVirtualSize(self, Size size)
5833
5834 Set the the virtual size of a window in pixels. For most windows this
5835 is just the client area of the window, but for some like scrolled
5836 windows it is more or less independent of the screen window size.
5837 """
5838 return _core_.Window_SetVirtualSize(*args, **kwargs)
5839
5840 def SetVirtualSizeWH(*args, **kwargs):
5841 """
5842 SetVirtualSizeWH(self, int w, int h)
5843
5844 Set the the virtual size of a window in pixels. For most windows this
5845 is just the client area of the window, but for some like scrolled
5846 windows it is more or less independent of the screen window size.
5847 """
5848 return _core_.Window_SetVirtualSizeWH(*args, **kwargs)
5849
5850 def GetVirtualSize(*args, **kwargs):
5851 """
5852 GetVirtualSize(self) -> Size
5853
5854 Get the the virtual size of the window in pixels. For most windows
5855 this is just the client area of the window, but for some like scrolled
5856 windows it is more or less independent of the screen window size.
5857 """
5858 return _core_.Window_GetVirtualSize(*args, **kwargs)
5859
5860 def GetVirtualSizeTuple(*args, **kwargs):
5861 """
5862 GetVirtualSizeTuple() -> (width, height)
5863
5864 Get the the virtual size of the window in pixels. For most windows
5865 this is just the client area of the window, but for some like scrolled
5866 windows it is more or less independent of the screen window size.
5867 """
5868 return _core_.Window_GetVirtualSizeTuple(*args, **kwargs)
5869
5870 def GetBestVirtualSize(*args, **kwargs):
5871 """
5872 GetBestVirtualSize(self) -> Size
5873
5874 Return the largest of ClientSize and BestSize (as determined by a
5875 sizer, interior children, or other means)
5876 """
5877 return _core_.Window_GetBestVirtualSize(*args, **kwargs)
5878
5879 def Show(*args, **kwargs):
5880 """
5881 Show(self, bool show=True) -> bool
5882
5883 Shows or hides the window. You may need to call Raise for a top level
5884 window if you want to bring it to top, although this is not needed if
5885 Show is called immediately after the frame creation. Returns True if
5886 the window has been shown or hidden or False if nothing was done
5887 because it already was in the requested state.
5888 """
5889 return _core_.Window_Show(*args, **kwargs)
5890
5891 def Hide(*args, **kwargs):
5892 """
5893 Hide(self) -> bool
5894
5895 Equivalent to calling Show(False).
5896 """
5897 return _core_.Window_Hide(*args, **kwargs)
5898
5899 def Enable(*args, **kwargs):
5900 """
5901 Enable(self, bool enable=True) -> bool
5902
5903 Enable or disable the window for user input. Note that when a parent
5904 window is disabled, all of its children are disabled as well and they
5905 are reenabled again when the parent is. Returns true if the window
5906 has been enabled or disabled, false if nothing was done, i.e. if the
5907 window had already been in the specified state.
5908 """
5909 return _core_.Window_Enable(*args, **kwargs)
5910
5911 def Disable(*args, **kwargs):
5912 """
5913 Disable(self) -> bool
5914
5915 Disables the window, same as Enable(false).
5916 """
5917 return _core_.Window_Disable(*args, **kwargs)
5918
5919 def IsShown(*args, **kwargs):
5920 """
5921 IsShown(self) -> bool
5922
5923 Returns true if the window is shown, false if it has been hidden.
5924 """
5925 return _core_.Window_IsShown(*args, **kwargs)
5926
5927 def IsEnabled(*args, **kwargs):
5928 """
5929 IsEnabled(self) -> bool
5930
5931 Returns true if the window is enabled for input, false otherwise.
5932 """
5933 return _core_.Window_IsEnabled(*args, **kwargs)
5934
5935 def SetWindowStyleFlag(*args, **kwargs):
5936 """
5937 SetWindowStyleFlag(self, long style)
5938
5939 Sets the style of the window. Please note that some styles cannot
5940 be changed after the window creation and that Refresh() might
5941 need to be called after changing the others for the change to
5942 take place immediately.
5943 """
5944 return _core_.Window_SetWindowStyleFlag(*args, **kwargs)
5945
5946 def GetWindowStyleFlag(*args, **kwargs):
5947 """
5948 GetWindowStyleFlag(self) -> long
5949
5950 Gets the window style that was passed to the constructor or Create
5951 method.
5952 """
5953 return _core_.Window_GetWindowStyleFlag(*args, **kwargs)
5954
5955 SetWindowStyle = SetWindowStyleFlag; GetWindowStyle = GetWindowStyleFlag
5956 def HasFlag(*args, **kwargs):
5957 """
5958 HasFlag(self, int flag) -> bool
5959
5960 Test if the given style is set for this window.
5961 """
5962 return _core_.Window_HasFlag(*args, **kwargs)
5963
5964 def IsRetained(*args, **kwargs):
5965 """
5966 IsRetained(self) -> bool
5967
5968 Returns true if the window is retained, false otherwise. Retained
5969 windows are only available on X platforms.
5970 """
5971 return _core_.Window_IsRetained(*args, **kwargs)
5972
5973 def SetExtraStyle(*args, **kwargs):
5974 """
5975 SetExtraStyle(self, long exStyle)
5976
5977 Sets the extra style bits for the window. Extra styles are the less
5978 often used style bits which can't be set with the constructor or with
5979 SetWindowStyleFlag()
5980 """
5981 return _core_.Window_SetExtraStyle(*args, **kwargs)
5982
5983 def GetExtraStyle(*args, **kwargs):
5984 """
5985 GetExtraStyle(self) -> long
5986
5987 Returns the extra style bits for the window.
5988 """
5989 return _core_.Window_GetExtraStyle(*args, **kwargs)
5990
5991 def MakeModal(*args, **kwargs):
5992 """
5993 MakeModal(self, bool modal=True)
5994
5995 Disables all other windows in the application so that the user can
5996 only interact with this window. Passing False will reverse this
5997 effect.
5998 """
5999 return _core_.Window_MakeModal(*args, **kwargs)
6000
6001 def SetThemeEnabled(*args, **kwargs):
6002 """
6003 SetThemeEnabled(self, bool enableTheme)
6004
6005 This function tells a window if it should use the system's "theme"
6006 code to draw the windows' background instead if its own background
6007 drawing code. This will only have an effect on platforms that support
6008 the notion of themes in user defined windows. One such platform is
6009 GTK+ where windows can have (very colourful) backgrounds defined by a
6010 user's selected theme.
6011
6012 Dialogs, notebook pages and the status bar have this flag set to true
6013 by default so that the default look and feel is simulated best.
6014 """
6015 return _core_.Window_SetThemeEnabled(*args, **kwargs)
6016
6017 def GetThemeEnabled(*args, **kwargs):
6018 """
6019 GetThemeEnabled(self) -> bool
6020
6021 Return the themeEnabled flag.
6022 """
6023 return _core_.Window_GetThemeEnabled(*args, **kwargs)
6024
6025 def SetFocus(*args, **kwargs):
6026 """
6027 SetFocus(self)
6028
6029 Set's the focus to this window, allowing it to receive keyboard input.
6030 """
6031 return _core_.Window_SetFocus(*args, **kwargs)
6032
6033 def SetFocusFromKbd(*args, **kwargs):
6034 """
6035 SetFocusFromKbd(self)
6036
6037 Set focus to this window as the result of a keyboard action. Normally
6038 only called internally.
6039 """
6040 return _core_.Window_SetFocusFromKbd(*args, **kwargs)
6041
6042 def FindFocus(*args, **kwargs):
6043 """
6044 Window.FindFocus() -> Window
6045
6046 Returns the window or control that currently has the keyboard focus,
6047 or None.
6048 """
6049 return _core_.Window_FindFocus(*args, **kwargs)
6050
6051 FindFocus = staticmethod(FindFocus)
6052 def AcceptsFocus(*args, **kwargs):
6053 """
6054 AcceptsFocus(self) -> bool
6055
6056 Can this window have focus?
6057 """
6058 return _core_.Window_AcceptsFocus(*args, **kwargs)
6059
6060 def AcceptsFocusFromKeyboard(*args, **kwargs):
6061 """
6062 AcceptsFocusFromKeyboard(self) -> bool
6063
6064 Can this window be given focus by keyboard navigation? if not, the
6065 only way to give it focus (provided it accepts it at all) is to click
6066 it.
6067 """
6068 return _core_.Window_AcceptsFocusFromKeyboard(*args, **kwargs)
6069
6070 def GetDefaultItem(*args, **kwargs):
6071 """
6072 GetDefaultItem(self) -> Window
6073
6074 Get the default child of this parent, i.e. the one which is activated
6075 by pressing <Enter> such as the OK button on a wx.Dialog.
6076 """
6077 return _core_.Window_GetDefaultItem(*args, **kwargs)
6078
6079 def SetDefaultItem(*args, **kwargs):
6080 """
6081 SetDefaultItem(self, Window child) -> Window
6082
6083 Set this child as default, return the old default.
6084 """
6085 return _core_.Window_SetDefaultItem(*args, **kwargs)
6086
6087 def SetTmpDefaultItem(*args, **kwargs):
6088 """
6089 SetTmpDefaultItem(self, Window win)
6090
6091 Set this child as temporary default
6092 """
6093 return _core_.Window_SetTmpDefaultItem(*args, **kwargs)
6094
6095 def GetChildren(*args, **kwargs):
6096 """
6097 GetChildren(self) -> PyObject
6098
6099 Returns a list of the window's children. NOTE: Currently this is a
6100 copy of the child window list maintained by the window, so the return
6101 value of this function is only valid as long as the window's children
6102 do not change.
6103 """
6104 return _core_.Window_GetChildren(*args, **kwargs)
6105
6106 def GetParent(*args, **kwargs):
6107 """
6108 GetParent(self) -> Window
6109
6110 Returns the parent window of this window, or None if there isn't one.
6111 """
6112 return _core_.Window_GetParent(*args, **kwargs)
6113
6114 def GetGrandParent(*args, **kwargs):
6115 """
6116 GetGrandParent(self) -> Window
6117
6118 Returns the parent of the parent of this window, or None if there isn't one.
6119 """
6120 return _core_.Window_GetGrandParent(*args, **kwargs)
6121
6122 def IsTopLevel(*args, **kwargs):
6123 """
6124 IsTopLevel(self) -> bool
6125
6126 Returns true if the given window is a top-level one. Currently all
6127 frames and dialogs are always considered to be top-level windows (even
6128 if they have a parent window).
6129 """
6130 return _core_.Window_IsTopLevel(*args, **kwargs)
6131
6132 def Reparent(*args, **kwargs):
6133 """
6134 Reparent(self, Window newParent) -> bool
6135
6136 Reparents the window, i.e the window will be removed from its current
6137 parent window (e.g. a non-standard toolbar in a wxFrame) and then
6138 re-inserted into another. Available on Windows and GTK. Returns True
6139 if the parent was changed, False otherwise (error or newParent ==
6140 oldParent)
6141 """
6142 return _core_.Window_Reparent(*args, **kwargs)
6143
6144 def AddChild(*args, **kwargs):
6145 """
6146 AddChild(self, Window child)
6147
6148 Adds a child window. This is called automatically by window creation
6149 functions so should not be required by the application programmer.
6150 """
6151 return _core_.Window_AddChild(*args, **kwargs)
6152
6153 def RemoveChild(*args, **kwargs):
6154 """
6155 RemoveChild(self, Window child)
6156
6157 Removes a child window. This is called automatically by window
6158 deletion functions so should not be required by the application
6159 programmer.
6160 """
6161 return _core_.Window_RemoveChild(*args, **kwargs)
6162
6163 def FindWindowById(*args, **kwargs):
6164 """
6165 FindWindowById(self, long winid) -> Window
6166
6167 Find a chld of this window by window ID
6168 """
6169 return _core_.Window_FindWindowById(*args, **kwargs)
6170
6171 def FindWindowByName(*args, **kwargs):
6172 """
6173 FindWindowByName(self, String name) -> Window
6174
6175 Find a child of this window by name
6176 """
6177 return _core_.Window_FindWindowByName(*args, **kwargs)
6178
6179 def GetEventHandler(*args, **kwargs):
6180 """
6181 GetEventHandler(self) -> EvtHandler
6182
6183 Returns the event handler for this window. By default, the window is
6184 its own event handler.
6185 """
6186 return _core_.Window_GetEventHandler(*args, **kwargs)
6187
6188 def SetEventHandler(*args, **kwargs):
6189 """
6190 SetEventHandler(self, EvtHandler handler)
6191
6192 Sets the event handler for this window. An event handler is an object
6193 that is capable of processing the events sent to a window. By default,
6194 the window is its own event handler, but an application may wish to
6195 substitute another, for example to allow central implementation of
6196 event-handling for a variety of different window classes.
6197
6198 It is usually better to use wx.Window.PushEventHandler since this sets
6199 up a chain of event handlers, where an event not handled by one event
6200 handler is handed to the next one in the chain.
6201 """
6202 return _core_.Window_SetEventHandler(*args, **kwargs)
6203
6204 def PushEventHandler(*args, **kwargs):
6205 """
6206 PushEventHandler(self, EvtHandler handler)
6207
6208 Pushes this event handler onto the event handler stack for the window.
6209 An event handler is an object that is capable of processing the events
6210 sent to a window. By default, the window is its own event handler, but
6211 an application may wish to substitute another, for example to allow
6212 central implementation of event-handling for a variety of different
6213 window classes.
6214
6215 wx.Window.PushEventHandler allows an application to set up a chain of
6216 event handlers, where an event not handled by one event handler is
6217 handed to the next one in the chain. Use wx.Window.PopEventHandler to
6218 remove the event handler.
6219 """
6220 return _core_.Window_PushEventHandler(*args, **kwargs)
6221
6222 def PopEventHandler(*args, **kwargs):
6223 """
6224 PopEventHandler(self, bool deleteHandler=False) -> EvtHandler
6225
6226 Removes and returns the top-most event handler on the event handler
6227 stack. If deleteHandler is True then the wx.EvtHandler object will be
6228 destroyed after it is popped.
6229 """
6230 return _core_.Window_PopEventHandler(*args, **kwargs)
6231
6232 def RemoveEventHandler(*args, **kwargs):
6233 """
6234 RemoveEventHandler(self, EvtHandler handler) -> bool
6235
6236 Find the given handler in the event handler chain and remove (but
6237 not delete) it from the event handler chain, return True if it was
6238 found and False otherwise (this also results in an assert failure so
6239 this function should only be called when the handler is supposed to
6240 be there.)
6241 """
6242 return _core_.Window_RemoveEventHandler(*args, **kwargs)
6243
6244 def SetValidator(*args, **kwargs):
6245 """
6246 SetValidator(self, Validator validator)
6247
6248 Deletes the current validator (if any) and sets the window validator,
6249 having called wx.Validator.Clone to create a new validator of this
6250 type.
6251 """
6252 return _core_.Window_SetValidator(*args, **kwargs)
6253
6254 def GetValidator(*args, **kwargs):
6255 """
6256 GetValidator(self) -> Validator
6257
6258 Returns a pointer to the current validator for the window, or None if
6259 there is none.
6260 """
6261 return _core_.Window_GetValidator(*args, **kwargs)
6262
6263 def Validate(*args, **kwargs):
6264 """
6265 Validate(self) -> bool
6266
6267 Validates the current values of the child controls using their
6268 validators. If the window has wx.WS_EX_VALIDATE_RECURSIVELY
6269 extra style flag set, the method will also call Validate() of all
6270 child windows. Returns false if any of the validations failed.
6271 """
6272 return _core_.Window_Validate(*args, **kwargs)
6273
6274 def TransferDataToWindow(*args, **kwargs):
6275 """
6276 TransferDataToWindow(self) -> bool
6277
6278 Transfers values to child controls from data areas specified by
6279 their validators. If the window has wx.WS_EX_VALIDATE_RECURSIVELY
6280 extra style flag set, the method will also call
6281 TransferDataToWindow() of all child windows.
6282 """
6283 return _core_.Window_TransferDataToWindow(*args, **kwargs)
6284
6285 def TransferDataFromWindow(*args, **kwargs):
6286 """
6287 TransferDataFromWindow(self) -> bool
6288
6289 Transfers values from child controls to data areas specified by
6290 their validators. Returns false if a transfer failed. If the
6291 window has wx.WS_EX_VALIDATE_RECURSIVELY extra style flag set, the
6292 method will also call TransferDataFromWindow() of all child
6293 windows.
6294 """
6295 return _core_.Window_TransferDataFromWindow(*args, **kwargs)
6296
6297 def InitDialog(*args, **kwargs):
6298 """
6299 InitDialog(self)
6300
6301 Sends an EVT_INIT_DIALOG event, whose handler usually transfers
6302 data to the dialog via validators.
6303 """
6304 return _core_.Window_InitDialog(*args, **kwargs)
6305
6306 def SetAcceleratorTable(*args, **kwargs):
6307 """
6308 SetAcceleratorTable(self, AcceleratorTable accel)
6309
6310 Sets the accelerator table for this window.
6311 """
6312 return _core_.Window_SetAcceleratorTable(*args, **kwargs)
6313
6314 def GetAcceleratorTable(*args, **kwargs):
6315 """
6316 GetAcceleratorTable(self) -> AcceleratorTable
6317
6318 Gets the accelerator table for this window.
6319 """
6320 return _core_.Window_GetAcceleratorTable(*args, **kwargs)
6321
6322 def RegisterHotKey(*args, **kwargs):
6323 """
6324 RegisterHotKey(self, int hotkeyId, int modifiers, int keycode) -> bool
6325
6326 Registers a system wide hotkey. Every time the user presses the hotkey
6327 registered here, this window will receive a hotkey event. It will
6328 receive the event even if the application is in the background and
6329 does not have the input focus because the user is working with some
6330 other application. To bind an event handler function to this hotkey
6331 use EVT_HOTKEY with an id equal to hotkeyId. Returns True if the
6332 hotkey was registered successfully.
6333 """
6334 return _core_.Window_RegisterHotKey(*args, **kwargs)
6335
6336 def UnregisterHotKey(*args, **kwargs):
6337 """
6338 UnregisterHotKey(self, int hotkeyId) -> bool
6339
6340 Unregisters a system wide hotkey.
6341 """
6342 return _core_.Window_UnregisterHotKey(*args, **kwargs)
6343
6344 def ConvertDialogPointToPixels(*args, **kwargs):
6345 """
6346 ConvertDialogPointToPixels(self, Point pt) -> Point
6347
6348 Converts a point or size from dialog units to pixels. Dialog units
6349 are used for maintaining a dialog's proportions even if the font
6350 changes. For the x dimension, the dialog units are multiplied by the
6351 average character width and then divided by 4. For the y dimension,
6352 the dialog units are multiplied by the average character height and
6353 then divided by 8.
6354 """
6355 return _core_.Window_ConvertDialogPointToPixels(*args, **kwargs)
6356
6357 def ConvertDialogSizeToPixels(*args, **kwargs):
6358 """
6359 ConvertDialogSizeToPixels(self, Size sz) -> Size
6360
6361 Converts a point or size from dialog units to pixels. Dialog units
6362 are used for maintaining a dialog's proportions even if the font
6363 changes. For the x dimension, the dialog units are multiplied by the
6364 average character width and then divided by 4. For the y dimension,
6365 the dialog units are multiplied by the average character height and
6366 then divided by 8.
6367 """
6368 return _core_.Window_ConvertDialogSizeToPixels(*args, **kwargs)
6369
6370 def DLG_PNT(*args, **kwargs):
6371 """
6372 DLG_PNT(self, Point pt) -> Point
6373
6374 Converts a point or size from dialog units to pixels. Dialog units
6375 are used for maintaining a dialog's proportions even if the font
6376 changes. For the x dimension, the dialog units are multiplied by the
6377 average character width and then divided by 4. For the y dimension,
6378 the dialog units are multiplied by the average character height and
6379 then divided by 8.
6380 """
6381 return _core_.Window_DLG_PNT(*args, **kwargs)
6382
6383 def DLG_SZE(*args, **kwargs):
6384 """
6385 DLG_SZE(self, Size sz) -> Size
6386
6387 Converts a point or size from dialog units to pixels. Dialog units
6388 are used for maintaining a dialog's proportions even if the font
6389 changes. For the x dimension, the dialog units are multiplied by the
6390 average character width and then divided by 4. For the y dimension,
6391 the dialog units are multiplied by the average character height and
6392 then divided by 8.
6393 """
6394 return _core_.Window_DLG_SZE(*args, **kwargs)
6395
6396 def ConvertPixelPointToDialog(*args, **kwargs):
6397 """ConvertPixelPointToDialog(self, Point pt) -> Point"""
6398 return _core_.Window_ConvertPixelPointToDialog(*args, **kwargs)
6399
6400 def ConvertPixelSizeToDialog(*args, **kwargs):
6401 """ConvertPixelSizeToDialog(self, Size sz) -> Size"""
6402 return _core_.Window_ConvertPixelSizeToDialog(*args, **kwargs)
6403
6404 def WarpPointer(*args, **kwargs):
6405 """
6406 WarpPointer(self, int x, int y)
6407
6408 Moves the pointer to the given position on the window.
6409
6410 NOTE: This function is not supported under Mac because Apple Human
6411 Interface Guidelines forbid moving the mouse cursor programmatically.
6412 """
6413 return _core_.Window_WarpPointer(*args, **kwargs)
6414
6415 def CaptureMouse(*args, **kwargs):
6416 """
6417 CaptureMouse(self)
6418
6419 Directs all mouse input to this window. Call wx.Window.ReleaseMouse to
6420 release the capture.
6421
6422 Note that wxWindows maintains the stack of windows having captured the
6423 mouse and when the mouse is released the capture returns to the window
6424 which had had captured it previously and it is only really released if
6425 there were no previous window. In particular, this means that you must
6426 release the mouse as many times as you capture it.
6427 """
6428 return _core_.Window_CaptureMouse(*args, **kwargs)
6429
6430 def ReleaseMouse(*args, **kwargs):
6431 """
6432 ReleaseMouse(self)
6433
6434 Releases mouse input captured with wx.Window.CaptureMouse.
6435 """
6436 return _core_.Window_ReleaseMouse(*args, **kwargs)
6437
6438 def GetCapture(*args, **kwargs):
6439 """
6440 Window.GetCapture() -> Window
6441
6442 Returns the window which currently captures the mouse or None
6443 """
6444 return _core_.Window_GetCapture(*args, **kwargs)
6445
6446 GetCapture = staticmethod(GetCapture)
6447 def HasCapture(*args, **kwargs):
6448 """
6449 HasCapture(self) -> bool
6450
6451 Returns true if this window has the current mouse capture.
6452 """
6453 return _core_.Window_HasCapture(*args, **kwargs)
6454
6455 def Refresh(*args, **kwargs):
6456 """
6457 Refresh(self, bool eraseBackground=True, Rect rect=None)
6458
6459 Mark the specified rectangle (or the whole window) as "dirty" so it
6460 will be repainted. Causes an EVT_PAINT event to be generated and sent
6461 to the window.
6462 """
6463 return _core_.Window_Refresh(*args, **kwargs)
6464
6465 def RefreshRect(*args, **kwargs):
6466 """
6467 RefreshRect(self, Rect rect)
6468
6469 Redraws the contents of the given rectangle: the area inside it will
6470 be repainted. This is the same as Refresh but has a nicer syntax.
6471 """
6472 return _core_.Window_RefreshRect(*args, **kwargs)
6473
6474 def Update(*args, **kwargs):
6475 """
6476 Update(self)
6477
6478 Calling this method immediately repaints the invalidated area of the
6479 window instead of waiting for the EVT_PAINT event to happen, (normally
6480 this would usually only happen when the flow of control returns to the
6481 event loop.) Notice that this function doesn't refresh the window and
6482 does nothing if the window has been already repainted. Use Refresh
6483 first if you want to immediately redraw the window (or some portion of
6484 it) unconditionally.
6485 """
6486 return _core_.Window_Update(*args, **kwargs)
6487
6488 def ClearBackground(*args, **kwargs):
6489 """
6490 ClearBackground(self)
6491
6492 Clears the window by filling it with the current background
6493 colour. Does not cause an erase background event to be generated.
6494 """
6495 return _core_.Window_ClearBackground(*args, **kwargs)
6496
6497 def Freeze(*args, **kwargs):
6498 """
6499 Freeze(self)
6500
6501 Freezes the window or, in other words, prevents any updates from taking place
6502 on screen, the window is not redrawn at all. Thaw must be called to reenable
6503 window redrawing. Calls to Freeze/Thaw may be nested, with the actual Thaw
6504 being delayed until all the nesting has been undone.
6505
6506 This method is useful for visual appearance optimization (for example,
6507 it is a good idea to use it before inserting large amount of text into
6508 a wxTextCtrl under wxGTK) but is not implemented on all platforms nor
6509 for all controls so it is mostly just a hint to wxWindows and not a
6510 mandatory directive.
6511 """
6512 return _core_.Window_Freeze(*args, **kwargs)
6513
6514 def Thaw(*args, **kwargs):
6515 """
6516 Thaw(self)
6517
6518 Reenables window updating after a previous call to Freeze. Calls to
6519 Freeze/Thaw may be nested, so Thaw must be called the same number of times
6520 that Freeze was before the window will be updated.
6521 """
6522 return _core_.Window_Thaw(*args, **kwargs)
6523
6524 def PrepareDC(*args, **kwargs):
6525 """
6526 PrepareDC(self, DC dc)
6527
6528 Call this function to prepare the device context for drawing a
6529 scrolled image. It sets the device origin according to the current
6530 scroll position.
6531 """
6532 return _core_.Window_PrepareDC(*args, **kwargs)
6533
6534 def GetUpdateRegion(*args, **kwargs):
6535 """
6536 GetUpdateRegion(self) -> Region
6537
6538 Returns the region specifying which parts of the window have been
6539 damaged. Should only be called within an EVT_PAINT handler.
6540 """
6541 return _core_.Window_GetUpdateRegion(*args, **kwargs)
6542
6543 def GetUpdateClientRect(*args, **kwargs):
6544 """
6545 GetUpdateClientRect(self) -> Rect
6546
6547 Get the update rectangle region bounding box in client coords.
6548 """
6549 return _core_.Window_GetUpdateClientRect(*args, **kwargs)
6550
6551 def IsExposed(*args, **kwargs):
6552 """
6553 IsExposed(self, int x, int y, int w=1, int h=1) -> bool
6554
6555 Returns true if the given point or rectangle area has been exposed
6556 since the last repaint. Call this in an paint event handler to
6557 optimize redrawing by only redrawing those areas, which have been
6558 exposed.
6559 """
6560 return _core_.Window_IsExposed(*args, **kwargs)
6561
6562 def IsExposedPoint(*args, **kwargs):
6563 """
6564 IsExposedPoint(self, Point pt) -> bool
6565
6566 Returns true if the given point or rectangle area has been exposed
6567 since the last repaint. Call this in an paint event handler to
6568 optimize redrawing by only redrawing those areas, which have been
6569 exposed.
6570 """
6571 return _core_.Window_IsExposedPoint(*args, **kwargs)
6572
6573 def IsExposedRect(*args, **kwargs):
6574 """
6575 IsExposedRect(self, Rect rect) -> bool
6576
6577 Returns true if the given point or rectangle area has been exposed
6578 since the last repaint. Call this in an paint event handler to
6579 optimize redrawing by only redrawing those areas, which have been
6580 exposed.
6581 """
6582 return _core_.Window_IsExposedRect(*args, **kwargs)
6583
6584 def GetDefaultAttributes(*args, **kwargs):
6585 """
6586 GetDefaultAttributes(self) -> VisualAttributes
6587
6588 Get the default attributes for an instance of this class. This
6589 is useful if you want to use the same font or colour in your own
6590 control as in a standard control -- which is a much better idea
6591 than hard coding specific colours or fonts which might look
6592 completely out of place on the users system, especially if it
6593 uses themes.
6594 """
6595 return _core_.Window_GetDefaultAttributes(*args, **kwargs)
6596
6597 def GetClassDefaultAttributes(*args, **kwargs):
6598 """
6599 Window.GetClassDefaultAttributes(int variant=WINDOW_VARIANT_NORMAL) -> VisualAttributes
6600
6601 Get the default attributes for this class. This is useful if
6602 you want to use the same font or colour in your own control as
6603 in a standard control -- which is a much better idea than hard
6604 coding specific colours or fonts which might look completely out
6605 of place on the users system, especially if it uses themes.
6606
6607 The variant parameter is only relevant under Mac currently and is
6608 ignore under other platforms. Under Mac, it will change the size of the
6609 returned font. See SetWindowVariant for more about this.
6610 """
6611 return _core_.Window_GetClassDefaultAttributes(*args, **kwargs)
6612
6613 GetClassDefaultAttributes = staticmethod(GetClassDefaultAttributes)
6614 def SetBackgroundColour(*args, **kwargs):
6615 """
6616 SetBackgroundColour(self, Colour colour) -> bool
6617
6618 Sets the background colour of the window. Returns True if the colour
6619 was changed. The background colour is usually painted by the default
6620 EVT_ERASE_BACKGROUND event handler function under Windows and
6621 automatically under GTK.
6622
6623 Note that setting the background colour does not cause an immediate
6624 refresh, so you may wish to call ClearBackground or Refresh after
6625 calling this function.
6626
6627 Use this function with care under GTK+ as the new appearance of the
6628 window might not look equally well when used with themes, i.e GTK+'s
6629 ability to change its look as the user wishes with run-time loadable
6630 modules.
6631 """
6632 return _core_.Window_SetBackgroundColour(*args, **kwargs)
6633
6634 def SetDefaultBackgroundColour(*args, **kwargs):
6635 """SetDefaultBackgroundColour(self, Colour colour)"""
6636 return _core_.Window_SetDefaultBackgroundColour(*args, **kwargs)
6637
6638 def SetForegroundColour(*args, **kwargs):
6639 """
6640 SetForegroundColour(self, Colour colour) -> bool
6641
6642 Sets the foreground colour of the window. Returns True is the colour
6643 was changed. The interpretation of foreground colour is dependent on
6644 the window class; it may be the text colour or other colour, or it may
6645 not be used at all.
6646 """
6647 return _core_.Window_SetForegroundColour(*args, **kwargs)
6648
6649 def SetDefaultForegroundColour(*args, **kwargs):
6650 """SetDefaultForegroundColour(self, Colour colour)"""
6651 return _core_.Window_SetDefaultForegroundColour(*args, **kwargs)
6652
6653 def GetBackgroundColour(*args, **kwargs):
6654 """
6655 GetBackgroundColour(self) -> Colour
6656
6657 Returns the background colour of the window.
6658 """
6659 return _core_.Window_GetBackgroundColour(*args, **kwargs)
6660
6661 def GetForegroundColour(*args, **kwargs):
6662 """
6663 GetForegroundColour(self) -> Colour
6664
6665 Returns the foreground colour of the window. The interpretation of
6666 foreground colour is dependent on the window class; it may be the text
6667 colour or other colour, or it may not be used at all.
6668 """
6669 return _core_.Window_GetForegroundColour(*args, **kwargs)
6670
6671 def SetCursor(*args, **kwargs):
6672 """
6673 SetCursor(self, Cursor cursor) -> bool
6674
6675 Sets the window's cursor. Notice that the window cursor also sets it
6676 for the children of the window implicitly.
6677
6678 The cursor may be wx.NullCursor in which case the window cursor will
6679 be reset back to default.
6680 """
6681 return _core_.Window_SetCursor(*args, **kwargs)
6682
6683 def GetCursor(*args, **kwargs):
6684 """
6685 GetCursor(self) -> Cursor
6686
6687 Return the cursor associated with this window.
6688 """
6689 return _core_.Window_GetCursor(*args, **kwargs)
6690
6691 def SetFont(*args, **kwargs):
6692 """
6693 SetFont(self, Font font) -> bool
6694
6695 Sets the font for this window.
6696 """
6697 return _core_.Window_SetFont(*args, **kwargs)
6698
6699 def SetDefaultFont(*args, **kwargs):
6700 """SetDefaultFont(self, Font font)"""
6701 return _core_.Window_SetDefaultFont(*args, **kwargs)
6702
6703 def GetFont(*args, **kwargs):
6704 """
6705 GetFont(self) -> Font
6706
6707 Returns the default font used for this window.
6708 """
6709 return _core_.Window_GetFont(*args, **kwargs)
6710
6711 def SetCaret(*args, **kwargs):
6712 """
6713 SetCaret(self, Caret caret)
6714
6715 Sets the caret associated with the window.
6716 """
6717 return _core_.Window_SetCaret(*args, **kwargs)
6718
6719 def GetCaret(*args, **kwargs):
6720 """
6721 GetCaret(self) -> Caret
6722
6723 Returns the caret associated with the window.
6724 """
6725 return _core_.Window_GetCaret(*args, **kwargs)
6726
6727 def GetCharHeight(*args, **kwargs):
6728 """
6729 GetCharHeight(self) -> int
6730
6731 Get the (average) character size for the current font.
6732 """
6733 return _core_.Window_GetCharHeight(*args, **kwargs)
6734
6735 def GetCharWidth(*args, **kwargs):
6736 """
6737 GetCharWidth(self) -> int
6738
6739 Get the (average) character size for the current font.
6740 """
6741 return _core_.Window_GetCharWidth(*args, **kwargs)
6742
6743 def GetTextExtent(*args, **kwargs):
6744 """
6745 GetTextExtent(String string) -> (width, height)
6746
6747 Get the width and height of the text using the current font.
6748 """
6749 return _core_.Window_GetTextExtent(*args, **kwargs)
6750
6751 def GetFullTextExtent(*args, **kwargs):
6752 """
6753 GetFullTextExtent(String string, Font font=None) ->
6754 (width, height, descent, externalLeading)
6755
6756 Get the width, height, decent and leading of the text using the
6757 current or specified font.
6758 """
6759 return _core_.Window_GetFullTextExtent(*args, **kwargs)
6760
6761 def ClientToScreenXY(*args, **kwargs):
6762 """
6763 ClientToScreenXY(int x, int y) -> (x,y)
6764
6765 Converts to screen coordinates from coordinates relative to this window.
6766 """
6767 return _core_.Window_ClientToScreenXY(*args, **kwargs)
6768
6769 def ScreenToClientXY(*args, **kwargs):
6770 """
6771 ScreenToClientXY(int x, int y) -> (x,y)
6772
6773 Converts from screen to client window coordinates.
6774 """
6775 return _core_.Window_ScreenToClientXY(*args, **kwargs)
6776
6777 def ClientToScreen(*args, **kwargs):
6778 """
6779 ClientToScreen(self, Point pt) -> Point
6780
6781 Converts to screen coordinates from coordinates relative to this window.
6782 """
6783 return _core_.Window_ClientToScreen(*args, **kwargs)
6784
6785 def ScreenToClient(*args, **kwargs):
6786 """
6787 ScreenToClient(self, Point pt) -> Point
6788
6789 Converts from screen to client window coordinates.
6790 """
6791 return _core_.Window_ScreenToClient(*args, **kwargs)
6792
6793 def HitTestXY(*args, **kwargs):
6794 """
6795 HitTestXY(self, int x, int y) -> int
6796
6797 Test where the given (in client coords) point lies
6798 """
6799 return _core_.Window_HitTestXY(*args, **kwargs)
6800
6801 def HitTest(*args, **kwargs):
6802 """
6803 HitTest(self, Point pt) -> int
6804
6805 Test where the given (in client coords) point lies
6806 """
6807 return _core_.Window_HitTest(*args, **kwargs)
6808
6809 def GetBorder(*args):
6810 """
6811 GetBorder(self, long flags) -> int
6812 GetBorder(self) -> int
6813
6814 Get border for the flags of this window
6815 """
6816 return _core_.Window_GetBorder(*args)
6817
6818 def UpdateWindowUI(*args, **kwargs):
6819 """
6820 UpdateWindowUI(self, long flags=UPDATE_UI_NONE)
6821
6822 This function sends EVT_UPDATE_UI events to the window. The particular
6823 implementation depends on the window; for example a wx.ToolBar will
6824 send an update UI event for each toolbar button, and a wx.Frame will
6825 send an update UI event for each menubar menu item. You can call this
6826 function from your application to ensure that your UI is up-to-date at
6827 a particular point in time (as far as your EVT_UPDATE_UI handlers are
6828 concerned). This may be necessary if you have called
6829 wx.UpdateUIEvent.SetMode or wx.UpdateUIEvent.SetUpdateInterval to
6830 limit the overhead that wxWindows incurs by sending update UI events
6831 in idle time.
6832
6833 The flags should be a bitlist of one or more of the following values:
6834
6835 wx.UPDATE_UI_NONE No particular value
6836 wx.UPDATE_UI_RECURSE Call the function for descendants
6837 wx.UPDATE_UI_FROMIDLE Invoked from OnIdle
6838
6839 If you are calling this function from an OnIdle function, make sure
6840 you pass the wx.UPDATE_UI_FROMIDLE flag, since this tells the window to
6841 only update the UI elements that need to be updated in idle time. Some
6842 windows update their elements only when necessary, for example when a
6843 menu is about to be shown. The following is an example of how to call
6844 UpdateWindowUI from an idle function.
6845
6846 def OnIdle(self, evt):
6847 if wx.UpdateUIEvent.CanUpdate(self):
6848 self.UpdateWindowUI(wx.UPDATE_UI_FROMIDLE);
6849
6850 """
6851 return _core_.Window_UpdateWindowUI(*args, **kwargs)
6852
6853 def PopupMenuXY(*args, **kwargs):
6854 """
6855 PopupMenuXY(self, Menu menu, int x, int y) -> bool
6856
6857 Pops up the given menu at the specified coordinates, relative to this
6858 window, and returns control when the user has dismissed the menu. If a
6859 menu item is selected, the corresponding menu event is generated and
6860 will be processed as usual.
6861 """
6862 return _core_.Window_PopupMenuXY(*args, **kwargs)
6863
6864 def PopupMenu(*args, **kwargs):
6865 """
6866 PopupMenu(self, Menu menu, Point pos) -> bool
6867
6868 Pops up the given menu at the specified coordinates, relative to this
6869 window, and returns control when the user has dismissed the menu. If a
6870 menu item is selected, the corresponding menu event is generated and
6871 will be processed as usual.
6872 """
6873 return _core_.Window_PopupMenu(*args, **kwargs)
6874
6875 def GetHandle(*args, **kwargs):
6876 """
6877 GetHandle(self) -> long
6878
6879 Returns the platform-specific handle (as a long integer) of the
6880 physical window. Currently on wxMac it returns the handle of the
6881 toplevel parent of the window.
6882 """
6883 return _core_.Window_GetHandle(*args, **kwargs)
6884
6885 def OnPaint(*args, **kwargs):
6886 """OnPaint(self, PaintEvent event)"""
6887 return _core_.Window_OnPaint(*args, **kwargs)
6888
6889 def HasScrollbar(*args, **kwargs):
6890 """
6891 HasScrollbar(self, int orient) -> bool
6892
6893 Does the window have the scrollbar for this orientation?
6894 """
6895 return _core_.Window_HasScrollbar(*args, **kwargs)
6896
6897 def SetScrollbar(*args, **kwargs):
6898 """
6899 SetScrollbar(self, int orientation, int pos, int thumbvisible, int range,
6900 bool refresh=True)
6901
6902 Sets the scrollbar properties of a built-in scrollbar.
6903
6904 orientation: Determines the scrollbar whose page size is to be
6905 set. May be wx.HORIZONTAL or wx.VERTICAL.
6906
6907 position: The position of the scrollbar in scroll units.
6908
6909 thumbSize: The size of the thumb, or visible portion of the
6910 scrollbar, in scroll units.
6911
6912 range: The maximum position of the scrollbar.
6913
6914 refresh: True to redraw the scrollbar, false otherwise.
6915 """
6916 return _core_.Window_SetScrollbar(*args, **kwargs)
6917
6918 def SetScrollPos(*args, **kwargs):
6919 """
6920 SetScrollPos(self, int orientation, int pos, bool refresh=True)
6921
6922 Sets the position of one of the built-in scrollbars.
6923 """
6924 return _core_.Window_SetScrollPos(*args, **kwargs)
6925
6926 def GetScrollPos(*args, **kwargs):
6927 """
6928 GetScrollPos(self, int orientation) -> int
6929
6930 Returns the built-in scrollbar position.
6931 """
6932 return _core_.Window_GetScrollPos(*args, **kwargs)
6933
6934 def GetScrollThumb(*args, **kwargs):
6935 """
6936 GetScrollThumb(self, int orientation) -> int
6937
6938 Returns the built-in scrollbar thumb size.
6939 """
6940 return _core_.Window_GetScrollThumb(*args, **kwargs)
6941
6942 def GetScrollRange(*args, **kwargs):
6943 """
6944 GetScrollRange(self, int orientation) -> int
6945
6946 Returns the built-in scrollbar range.
6947 """
6948 return _core_.Window_GetScrollRange(*args, **kwargs)
6949
6950 def ScrollWindow(*args, **kwargs):
6951 """
6952 ScrollWindow(self, int dx, int dy, Rect rect=None)
6953
6954 Physically scrolls the pixels in the window and move child windows
6955 accordingly. Use this function to optimise your scrolling
6956 implementations, to minimise the area that must be redrawn. Note that
6957 it is rarely required to call this function from a user program.
6958
6959 dx: Amount to scroll horizontally.
6960
6961 dy: Amount to scroll vertically.
6962
6963 rect: Rectangle to invalidate. If this is None, the whole window
6964 is invalidated. If you pass a rectangle corresponding to the
6965 area of the window exposed by the scroll, your painting
6966 handler can optimize painting by checking for the
6967 invalidated region.
6968 """
6969 return _core_.Window_ScrollWindow(*args, **kwargs)
6970
6971 def ScrollLines(*args, **kwargs):
6972 """
6973 ScrollLines(self, int lines) -> bool
6974
6975 If the platform and window class supports it, scrolls the window by
6976 the given number of lines down, if lines is positive, or up if lines
6977 is negative. Returns True if the window was scrolled, False if it was
6978 already on top/bottom and nothing was done.
6979 """
6980 return _core_.Window_ScrollLines(*args, **kwargs)
6981
6982 def ScrollPages(*args, **kwargs):
6983 """
6984 ScrollPages(self, int pages) -> bool
6985
6986 If the platform and window class supports it, scrolls the window by
6987 the given number of pages down, if pages is positive, or up if pages
6988 is negative. Returns True if the window was scrolled, False if it was
6989 already on top/bottom and nothing was done.
6990 """
6991 return _core_.Window_ScrollPages(*args, **kwargs)
6992
6993 def LineUp(*args, **kwargs):
6994 """
6995 LineUp(self) -> bool
6996
6997 This is just a wrapper for ScrollLines(-1).
6998 """
6999 return _core_.Window_LineUp(*args, **kwargs)
7000
7001 def LineDown(*args, **kwargs):
7002 """
7003 LineDown(self) -> bool
7004
7005 This is just a wrapper for ScrollLines(1).
7006 """
7007 return _core_.Window_LineDown(*args, **kwargs)
7008
7009 def PageUp(*args, **kwargs):
7010 """
7011 PageUp(self) -> bool
7012
7013 This is just a wrapper for ScrollPages(-1).
7014 """
7015 return _core_.Window_PageUp(*args, **kwargs)
7016
7017 def PageDown(*args, **kwargs):
7018 """
7019 PageDown(self) -> bool
7020
7021 This is just a wrapper for ScrollPages(1).
7022 """
7023 return _core_.Window_PageDown(*args, **kwargs)
7024
7025 def SetHelpText(*args, **kwargs):
7026 """
7027 SetHelpText(self, String text)
7028
7029 Sets the help text to be used as context-sensitive help for this
7030 window. Note that the text is actually stored by the current
7031 wxHelpProvider implementation, and not in the window object itself.
7032 """
7033 return _core_.Window_SetHelpText(*args, **kwargs)
7034
7035 def SetHelpTextForId(*args, **kwargs):
7036 """
7037 SetHelpTextForId(self, String text)
7038
7039 Associate this help text with all windows with the same id as this
7040 one.
7041 """
7042 return _core_.Window_SetHelpTextForId(*args, **kwargs)
7043
7044 def GetHelpText(*args, **kwargs):
7045 """
7046 GetHelpText(self) -> String
7047
7048 Gets the help text to be used as context-sensitive help for this
7049 window. Note that the text is actually stored by the current
7050 wxHelpProvider implementation, and not in the window object itself.
7051 """
7052 return _core_.Window_GetHelpText(*args, **kwargs)
7053
7054 def SetToolTipString(*args, **kwargs):
7055 """
7056 SetToolTipString(self, String tip)
7057
7058 Attach a tooltip to the window.
7059 """
7060 return _core_.Window_SetToolTipString(*args, **kwargs)
7061
7062 def SetToolTip(*args, **kwargs):
7063 """
7064 SetToolTip(self, ToolTip tip)
7065
7066 Attach a tooltip to the window.
7067 """
7068 return _core_.Window_SetToolTip(*args, **kwargs)
7069
7070 def GetToolTip(*args, **kwargs):
7071 """
7072 GetToolTip(self) -> ToolTip
7073
7074 get the associated tooltip or None if none
7075 """
7076 return _core_.Window_GetToolTip(*args, **kwargs)
7077
7078 def SetDropTarget(*args, **kwargs):
7079 """
7080 SetDropTarget(self, DropTarget dropTarget)
7081
7082 Associates a drop target with this window. If the window already has
7083 a drop target, it is deleted.
7084 """
7085 return _core_.Window_SetDropTarget(*args, **kwargs)
7086
7087 def GetDropTarget(*args, **kwargs):
7088 """
7089 GetDropTarget(self) -> DropTarget
7090
7091 Returns the associated drop target, which may be None.
7092 """
7093 return _core_.Window_GetDropTarget(*args, **kwargs)
7094
7095 def DragAcceptFiles(*args, **kwargs):
7096 """
7097 DragAcceptFiles(self, bool accept)
7098
7099 Enables or disables eligibility for drop file events, EVT_DROP_FILES.
7100 Only available on Windows.
7101 """
7102 return _core_.Window_DragAcceptFiles(*args, **kwargs)
7103
7104 def SetConstraints(*args, **kwargs):
7105 """
7106 SetConstraints(self, LayoutConstraints constraints)
7107
7108 Sets the window to have the given layout constraints. If an existing
7109 layout constraints object is already owned by the window, it will be
7110 deleted. Pass None to disassociate and delete the window's current
7111 constraints.
7112
7113 You must call SetAutoLayout to tell a window to use the constraints
7114 automatically in its default EVT_SIZE handler; otherwise, you must
7115 handle EVT_SIZE yourself and call Layout() explicitly. When setting
7116 both a wx.LayoutConstraints and a wx.Sizer, only the sizer will have
7117 effect.
7118 """
7119 return _core_.Window_SetConstraints(*args, **kwargs)
7120
7121 def GetConstraints(*args, **kwargs):
7122 """
7123 GetConstraints(self) -> LayoutConstraints
7124
7125 Returns a pointer to the window's layout constraints, or None if there
7126 are none.
7127 """
7128 return _core_.Window_GetConstraints(*args, **kwargs)
7129
7130 def SetAutoLayout(*args, **kwargs):
7131 """
7132 SetAutoLayout(self, bool autoLayout)
7133
7134 Determines whether the Layout function will be called automatically
7135 when the window is resized. It is called implicitly by SetSizer but
7136 if you use SetConstraints you should call it manually or otherwise the
7137 window layout won't be correctly updated when its size changes.
7138 """
7139 return _core_.Window_SetAutoLayout(*args, **kwargs)
7140
7141 def GetAutoLayout(*args, **kwargs):
7142 """
7143 GetAutoLayout(self) -> bool
7144
7145 Returns the current autoLayout setting
7146 """
7147 return _core_.Window_GetAutoLayout(*args, **kwargs)
7148
7149 def Layout(*args, **kwargs):
7150 """
7151 Layout(self) -> bool
7152
7153 Invokes the constraint-based layout algorithm or the sizer-based
7154 algorithm for this window. See SetAutoLayout: when auto layout is on,
7155 this function gets called automatically by the default EVT_SIZE
7156 handler when the window is resized.
7157 """
7158 return _core_.Window_Layout(*args, **kwargs)
7159
7160 def SetSizer(*args, **kwargs):
7161 """
7162 SetSizer(self, Sizer sizer, bool deleteOld=True)
7163
7164 Sets the window to have the given layout sizer. The window will then
7165 own the object, and will take care of its deletion. If an existing
7166 layout sizer object is already owned by the window, it will be deleted
7167 if the deleteOld parameter is true. Note that this function will also
7168 call SetAutoLayout implicitly with a True parameter if the sizer is
7169 non-NoneL and False otherwise.
7170 """
7171 return _core_.Window_SetSizer(*args, **kwargs)
7172
7173 def SetSizerAndFit(*args, **kwargs):
7174 """
7175 SetSizerAndFit(self, Sizer sizer, bool deleteOld=True)
7176
7177 The same as SetSizer, except it also sets the size hints for the
7178 window based on the sizer's minimum size.
7179 """
7180 return _core_.Window_SetSizerAndFit(*args, **kwargs)
7181
7182 def GetSizer(*args, **kwargs):
7183 """
7184 GetSizer(self) -> Sizer
7185
7186 Return the sizer associated with the window by a previous call to
7187 SetSizer or None if there isn't one.
7188 """
7189 return _core_.Window_GetSizer(*args, **kwargs)
7190
7191 def SetContainingSizer(*args, **kwargs):
7192 """
7193 SetContainingSizer(self, Sizer sizer)
7194
7195 This normally does not need to be called by application code. It is
7196 called internally when a window is added to a sizer, and is used so
7197 the window can remove itself from the sizer when it is destroyed.
7198 """
7199 return _core_.Window_SetContainingSizer(*args, **kwargs)
7200
7201 def GetContainingSizer(*args, **kwargs):
7202 """
7203 GetContainingSizer(self) -> Sizer
7204
7205 Return the sizer that this window is a member of, if any, otherwise None.
7206 """
7207 return _core_.Window_GetContainingSizer(*args, **kwargs)
7208
7209 def InheritAttributes(*args, **kwargs):
7210 """
7211 InheritAttributes(self)
7212
7213 This function is (or should be, in case of custom controls)
7214 called during window creation to intelligently set up the window
7215 visual attributes, that is the font and the foreground and
7216 background colours.
7217
7218 By 'intelligently' the following is meant: by default, all
7219 windows use their own default attributes. However if some of the
7220 parent's attributes are explicitly changed (that is, using
7221 SetFont and not SetDefaultFont) and if the corresponding
7222 attribute hadn't been explicitly set for this window itself, then
7223 this window takes the same value as used by the parent. In
7224 addition, if the window overrides ShouldInheritColours to return
7225 false, the colours will not be changed no matter what and only
7226 the font might.
7227
7228 This rather complicated logic is necessary in order to accomodate
7229 the different usage scenarius. The most common one is when all
7230 default attributes are used and in this case, nothing should be
7231 inherited as in modern GUIs different controls use different
7232 fonts (and colours) than their siblings so they can't inherit the
7233 same value from the parent. However it was also deemed desirable
7234 to allow to simply change the attributes of all children at once
7235 by just changing the font or colour of their common parent, hence
7236 in this case we do inherit the parents attributes.
7237 """
7238 return _core_.Window_InheritAttributes(*args, **kwargs)
7239
7240 def ShouldInheritColours(*args, **kwargs):
7241 """
7242 ShouldInheritColours(self) -> bool
7243
7244 Return true from here to allow the colours of this window to be
7245 changed by InheritAttributes, returning false forbids inheriting
7246 them from the parent window.
7247
7248 The base class version returns false, but this method is
7249 overridden in wxControl where it returns true.
7250 """
7251 return _core_.Window_ShouldInheritColours(*args, **kwargs)
7252
7253 def PostCreate(self, pre):
7254 """
7255 Phase 3 of the 2-phase create <wink!>
7256 Call this method after precreating the window with the 2-phase create method.
7257 """
7258 self.this = pre.this
7259 self.thisown = pre.thisown
7260 pre.thisown = 0
7261 if hasattr(self, '_setOORInfo'):
7262 self._setOORInfo(self)
7263 if hasattr(self, '_setCallbackInfo'):
7264 self._setCallbackInfo(self, self.__class__)
7265
7266
7267 class WindowPtr(Window):
7268 def __init__(self, this):
7269 self.this = this
7270 if not hasattr(self,"thisown"): self.thisown = 0
7271 self.__class__ = Window
7272 _core_.Window_swigregister(WindowPtr)
7273
7274 def PreWindow(*args, **kwargs):
7275 """
7276 PreWindow() -> Window
7277
7278 Precreate a Window for 2-phase creation.
7279 """
7280 val = _core_.new_PreWindow(*args, **kwargs)
7281 val.thisown = 1
7282 return val
7283
7284 def Window_NewControlId(*args, **kwargs):
7285 """
7286 Window_NewControlId() -> int
7287
7288 Generate a control id for the controls which were not given one.
7289 """
7290 return _core_.Window_NewControlId(*args, **kwargs)
7291
7292 def Window_NextControlId(*args, **kwargs):
7293 """
7294 Window_NextControlId(int winid) -> int
7295
7296 Get the id of the control following the one with the given
7297 (autogenerated) id
7298 """
7299 return _core_.Window_NextControlId(*args, **kwargs)
7300
7301 def Window_PrevControlId(*args, **kwargs):
7302 """
7303 Window_PrevControlId(int winid) -> int
7304
7305 Get the id of the control preceding the one with the given
7306 (autogenerated) id
7307 """
7308 return _core_.Window_PrevControlId(*args, **kwargs)
7309
7310 def Window_FindFocus(*args, **kwargs):
7311 """
7312 Window_FindFocus() -> Window
7313
7314 Returns the window or control that currently has the keyboard focus,
7315 or None.
7316 """
7317 return _core_.Window_FindFocus(*args, **kwargs)
7318
7319 def Window_GetCapture(*args, **kwargs):
7320 """
7321 Window_GetCapture() -> Window
7322
7323 Returns the window which currently captures the mouse or None
7324 """
7325 return _core_.Window_GetCapture(*args, **kwargs)
7326
7327 def Window_GetClassDefaultAttributes(*args, **kwargs):
7328 """
7329 Window_GetClassDefaultAttributes(int variant=WINDOW_VARIANT_NORMAL) -> VisualAttributes
7330
7331 Get the default attributes for this class. This is useful if
7332 you want to use the same font or colour in your own control as
7333 in a standard control -- which is a much better idea than hard
7334 coding specific colours or fonts which might look completely out
7335 of place on the users system, especially if it uses themes.
7336
7337 The variant parameter is only relevant under Mac currently and is
7338 ignore under other platforms. Under Mac, it will change the size of the
7339 returned font. See SetWindowVariant for more about this.
7340 """
7341 return _core_.Window_GetClassDefaultAttributes(*args, **kwargs)
7342
7343 def DLG_PNT(win, point_or_x, y=None):
7344 """
7345 Convenience function for converting a Point or (x,y) in
7346 dialog units to pixel units.
7347 """
7348 if y is None:
7349 return win.ConvertDialogPointToPixels(point_or_x)
7350 else:
7351 return win.ConvertDialogPointToPixels(wx.Point(point_or_x, y))
7352
7353 def DLG_SZE(win, size_width, height=None):
7354 """
7355 Convenience function for converting a Size or (w,h) in
7356 dialog units to pixel units.
7357 """
7358 if height is None:
7359 return win.ConvertDialogSizeToPixels(size_width)
7360 else:
7361 return win.ConvertDialogSizeToPixels(wx.Size(size_width, height))
7362
7363
7364 def FindWindowById(*args, **kwargs):
7365 """
7366 FindWindowById(long id, Window parent=None) -> Window
7367
7368 Find the first window in the application with the given id. If parent
7369 is None, the search will start from all top-level frames and dialog
7370 boxes; if non-None, the search will be limited to the given window
7371 hierarchy. The search is recursive in both cases.
7372 """
7373 return _core_.FindWindowById(*args, **kwargs)
7374
7375 def FindWindowByName(*args, **kwargs):
7376 """
7377 FindWindowByName(String name, Window parent=None) -> Window
7378
7379 Find a window by its name (as given in a window constructor or Create
7380 function call). If parent is None, the search will start from all
7381 top-level frames and dialog boxes; if non-None, the search will be
7382 limited to the given window hierarchy. The search is recursive in both
7383 cases.
7384
7385 If no window with such name is found, wx.FindWindowByLabel is called.
7386 """
7387 return _core_.FindWindowByName(*args, **kwargs)
7388
7389 def FindWindowByLabel(*args, **kwargs):
7390 """
7391 FindWindowByLabel(String label, Window parent=None) -> Window
7392
7393 Find a window by its label. Depending on the type of window, the label
7394 may be a window title or panel item label. If parent is None, the
7395 search will start from all top-level frames and dialog boxes; if
7396 non-None, the search will be limited to the given window
7397 hierarchy. The search is recursive in both cases.
7398 """
7399 return _core_.FindWindowByLabel(*args, **kwargs)
7400
7401 def Window_FromHWND(*args, **kwargs):
7402 """Window_FromHWND(Window parent, unsigned long _hWnd) -> Window"""
7403 return _core_.Window_FromHWND(*args, **kwargs)
7404 #---------------------------------------------------------------------------
7405
7406 class Validator(EvtHandler):
7407 def __repr__(self):
7408 return "<%s.%s; proxy of C++ wxValidator instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
7409 def __init__(self, *args, **kwargs):
7410 """__init__(self) -> Validator"""
7411 newobj = _core_.new_Validator(*args, **kwargs)
7412 self.this = newobj.this
7413 self.thisown = 1
7414 del newobj.thisown
7415 self._setOORInfo(self)
7416
7417 def Clone(*args, **kwargs):
7418 """Clone(self) -> Validator"""
7419 return _core_.Validator_Clone(*args, **kwargs)
7420
7421 def Validate(*args, **kwargs):
7422 """Validate(self, Window parent) -> bool"""
7423 return _core_.Validator_Validate(*args, **kwargs)
7424
7425 def TransferToWindow(*args, **kwargs):
7426 """TransferToWindow(self) -> bool"""
7427 return _core_.Validator_TransferToWindow(*args, **kwargs)
7428
7429 def TransferFromWindow(*args, **kwargs):
7430 """TransferFromWindow(self) -> bool"""
7431 return _core_.Validator_TransferFromWindow(*args, **kwargs)
7432
7433 def GetWindow(*args, **kwargs):
7434 """GetWindow(self) -> Window"""
7435 return _core_.Validator_GetWindow(*args, **kwargs)
7436
7437 def SetWindow(*args, **kwargs):
7438 """SetWindow(self, Window window)"""
7439 return _core_.Validator_SetWindow(*args, **kwargs)
7440
7441 def IsSilent(*args, **kwargs):
7442 """Validator.IsSilent() -> bool"""
7443 return _core_.Validator_IsSilent(*args, **kwargs)
7444
7445 IsSilent = staticmethod(IsSilent)
7446 def SetBellOnError(*args, **kwargs):
7447 """Validator.SetBellOnError(int doIt=True)"""
7448 return _core_.Validator_SetBellOnError(*args, **kwargs)
7449
7450 SetBellOnError = staticmethod(SetBellOnError)
7451
7452 class ValidatorPtr(Validator):
7453 def __init__(self, this):
7454 self.this = this
7455 if not hasattr(self,"thisown"): self.thisown = 0
7456 self.__class__ = Validator
7457 _core_.Validator_swigregister(ValidatorPtr)
7458
7459 def Validator_IsSilent(*args, **kwargs):
7460 """Validator_IsSilent() -> bool"""
7461 return _core_.Validator_IsSilent(*args, **kwargs)
7462
7463 def Validator_SetBellOnError(*args, **kwargs):
7464 """Validator_SetBellOnError(int doIt=True)"""
7465 return _core_.Validator_SetBellOnError(*args, **kwargs)
7466
7467 class PyValidator(Validator):
7468 def __repr__(self):
7469 return "<%s.%s; proxy of C++ wxPyValidator instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
7470 def __init__(self, *args, **kwargs):
7471 """__init__(self) -> PyValidator"""
7472 newobj = _core_.new_PyValidator(*args, **kwargs)
7473 self.this = newobj.this
7474 self.thisown = 1
7475 del newobj.thisown
7476
7477 self._setCallbackInfo(self, PyValidator, 1)
7478 self._setOORInfo(self)
7479
7480 def _setCallbackInfo(*args, **kwargs):
7481 """_setCallbackInfo(self, PyObject self, PyObject _class, int incref=True)"""
7482 return _core_.PyValidator__setCallbackInfo(*args, **kwargs)
7483
7484
7485 class PyValidatorPtr(PyValidator):
7486 def __init__(self, this):
7487 self.this = this
7488 if not hasattr(self,"thisown"): self.thisown = 0
7489 self.__class__ = PyValidator
7490 _core_.PyValidator_swigregister(PyValidatorPtr)
7491
7492 #---------------------------------------------------------------------------
7493
7494 class Menu(EvtHandler):
7495 def __repr__(self):
7496 return "<%s.%s; proxy of C++ wxMenu instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
7497 def __init__(self, *args, **kwargs):
7498 """__init__(self, String title=EmptyString, long style=0) -> Menu"""
7499 newobj = _core_.new_Menu(*args, **kwargs)
7500 self.this = newobj.this
7501 self.thisown = 1
7502 del newobj.thisown
7503 self._setOORInfo(self)
7504
7505 def Append(*args, **kwargs):
7506 """Append(self, int id, String text, String help=EmptyString, int kind=ITEM_NORMAL) -> MenuItem"""
7507 return _core_.Menu_Append(*args, **kwargs)
7508
7509 def AppendSeparator(*args, **kwargs):
7510 """AppendSeparator(self) -> MenuItem"""
7511 return _core_.Menu_AppendSeparator(*args, **kwargs)
7512
7513 def AppendCheckItem(*args, **kwargs):
7514 """AppendCheckItem(self, int id, String text, String help=EmptyString) -> MenuItem"""
7515 return _core_.Menu_AppendCheckItem(*args, **kwargs)
7516
7517 def AppendRadioItem(*args, **kwargs):
7518 """AppendRadioItem(self, int id, String text, String help=EmptyString) -> MenuItem"""
7519 return _core_.Menu_AppendRadioItem(*args, **kwargs)
7520
7521 def AppendMenu(*args, **kwargs):
7522 """AppendMenu(self, int id, String text, Menu submenu, String help=EmptyString) -> MenuItem"""
7523 return _core_.Menu_AppendMenu(*args, **kwargs)
7524
7525 def AppendItem(*args, **kwargs):
7526 """AppendItem(self, MenuItem item) -> MenuItem"""
7527 return _core_.Menu_AppendItem(*args, **kwargs)
7528
7529 def Break(*args, **kwargs):
7530 """Break(self)"""
7531 return _core_.Menu_Break(*args, **kwargs)
7532
7533 def InsertItem(*args, **kwargs):
7534 """InsertItem(self, size_t pos, MenuItem item) -> MenuItem"""
7535 return _core_.Menu_InsertItem(*args, **kwargs)
7536
7537 def Insert(*args, **kwargs):
7538 """
7539 Insert(self, size_t pos, int id, String text, String help=EmptyString,
7540 int kind=ITEM_NORMAL) -> MenuItem
7541 """
7542 return _core_.Menu_Insert(*args, **kwargs)
7543
7544 def InsertSeparator(*args, **kwargs):
7545 """InsertSeparator(self, size_t pos) -> MenuItem"""
7546 return _core_.Menu_InsertSeparator(*args, **kwargs)
7547
7548 def InsertCheckItem(*args, **kwargs):
7549 """InsertCheckItem(self, size_t pos, int id, String text, String help=EmptyString) -> MenuItem"""
7550 return _core_.Menu_InsertCheckItem(*args, **kwargs)
7551
7552 def InsertRadioItem(*args, **kwargs):
7553 """InsertRadioItem(self, size_t pos, int id, String text, String help=EmptyString) -> MenuItem"""
7554 return _core_.Menu_InsertRadioItem(*args, **kwargs)
7555
7556 def InsertMenu(*args, **kwargs):
7557 """InsertMenu(self, size_t pos, int id, String text, Menu submenu, String help=EmptyString) -> MenuItem"""
7558 return _core_.Menu_InsertMenu(*args, **kwargs)
7559
7560 def PrependItem(*args, **kwargs):
7561 """PrependItem(self, MenuItem item) -> MenuItem"""
7562 return _core_.Menu_PrependItem(*args, **kwargs)
7563
7564 def Prepend(*args, **kwargs):
7565 """Prepend(self, int id, String text, String help=EmptyString, int kind=ITEM_NORMAL) -> MenuItem"""
7566 return _core_.Menu_Prepend(*args, **kwargs)
7567
7568 def PrependSeparator(*args, **kwargs):
7569 """PrependSeparator(self) -> MenuItem"""
7570 return _core_.Menu_PrependSeparator(*args, **kwargs)
7571
7572 def PrependCheckItem(*args, **kwargs):
7573 """PrependCheckItem(self, int id, String text, String help=EmptyString) -> MenuItem"""
7574 return _core_.Menu_PrependCheckItem(*args, **kwargs)
7575
7576 def PrependRadioItem(*args, **kwargs):
7577 """PrependRadioItem(self, int id, String text, String help=EmptyString) -> MenuItem"""
7578 return _core_.Menu_PrependRadioItem(*args, **kwargs)
7579
7580 def PrependMenu(*args, **kwargs):
7581 """PrependMenu(self, int id, String text, Menu submenu, String help=EmptyString) -> MenuItem"""
7582 return _core_.Menu_PrependMenu(*args, **kwargs)
7583
7584 def Remove(*args, **kwargs):
7585 """Remove(self, int id) -> MenuItem"""
7586 return _core_.Menu_Remove(*args, **kwargs)
7587
7588 def RemoveItem(*args, **kwargs):
7589 """RemoveItem(self, MenuItem item) -> MenuItem"""
7590 return _core_.Menu_RemoveItem(*args, **kwargs)
7591
7592 def Delete(*args, **kwargs):
7593 """Delete(self, int id) -> bool"""
7594 return _core_.Menu_Delete(*args, **kwargs)
7595
7596 def DeleteItem(*args, **kwargs):
7597 """DeleteItem(self, MenuItem item) -> bool"""
7598 return _core_.Menu_DeleteItem(*args, **kwargs)
7599
7600 def Destroy(*args, **kwargs):
7601 """
7602 Destroy(self)
7603
7604 Deletes the C++ object this Python object is a proxy for.
7605 """
7606 return _core_.Menu_Destroy(*args, **kwargs)
7607
7608 def DestroyId(*args, **kwargs):
7609 """
7610 DestroyId(self, int id) -> bool
7611
7612 Deletes the C++ object this Python object is a proxy for.
7613 """
7614 return _core_.Menu_DestroyId(*args, **kwargs)
7615
7616 def DestroyItem(*args, **kwargs):
7617 """
7618 DestroyItem(self, MenuItem item) -> bool
7619
7620 Deletes the C++ object this Python object is a proxy for.
7621 """
7622 return _core_.Menu_DestroyItem(*args, **kwargs)
7623
7624 def GetMenuItemCount(*args, **kwargs):
7625 """GetMenuItemCount(self) -> size_t"""
7626 return _core_.Menu_GetMenuItemCount(*args, **kwargs)
7627
7628 def GetMenuItems(*args, **kwargs):
7629 """GetMenuItems(self) -> PyObject"""
7630 return _core_.Menu_GetMenuItems(*args, **kwargs)
7631
7632 def FindItem(*args, **kwargs):
7633 """FindItem(self, String item) -> int"""
7634 return _core_.Menu_FindItem(*args, **kwargs)
7635
7636 def FindItemById(*args, **kwargs):
7637 """FindItemById(self, int id) -> MenuItem"""
7638 return _core_.Menu_FindItemById(*args, **kwargs)
7639
7640 def FindItemByPosition(*args, **kwargs):
7641 """FindItemByPosition(self, size_t position) -> MenuItem"""
7642 return _core_.Menu_FindItemByPosition(*args, **kwargs)
7643
7644 def Enable(*args, **kwargs):
7645 """Enable(self, int id, bool enable)"""
7646 return _core_.Menu_Enable(*args, **kwargs)
7647
7648 def IsEnabled(*args, **kwargs):
7649 """IsEnabled(self, int id) -> bool"""
7650 return _core_.Menu_IsEnabled(*args, **kwargs)
7651
7652 def Check(*args, **kwargs):
7653 """Check(self, int id, bool check)"""
7654 return _core_.Menu_Check(*args, **kwargs)
7655
7656 def IsChecked(*args, **kwargs):
7657 """IsChecked(self, int id) -> bool"""
7658 return _core_.Menu_IsChecked(*args, **kwargs)
7659
7660 def SetLabel(*args, **kwargs):
7661 """SetLabel(self, int id, String label)"""
7662 return _core_.Menu_SetLabel(*args, **kwargs)
7663
7664 def GetLabel(*args, **kwargs):
7665 """GetLabel(self, int id) -> String"""
7666 return _core_.Menu_GetLabel(*args, **kwargs)
7667
7668 def SetHelpString(*args, **kwargs):
7669 """SetHelpString(self, int id, String helpString)"""
7670 return _core_.Menu_SetHelpString(*args, **kwargs)
7671
7672 def GetHelpString(*args, **kwargs):
7673 """GetHelpString(self, int id) -> String"""
7674 return _core_.Menu_GetHelpString(*args, **kwargs)
7675
7676 def SetTitle(*args, **kwargs):
7677 """SetTitle(self, String title)"""
7678 return _core_.Menu_SetTitle(*args, **kwargs)
7679
7680 def GetTitle(*args, **kwargs):
7681 """GetTitle(self) -> String"""
7682 return _core_.Menu_GetTitle(*args, **kwargs)
7683
7684 def SetEventHandler(*args, **kwargs):
7685 """SetEventHandler(self, EvtHandler handler)"""
7686 return _core_.Menu_SetEventHandler(*args, **kwargs)
7687
7688 def GetEventHandler(*args, **kwargs):
7689 """GetEventHandler(self) -> EvtHandler"""
7690 return _core_.Menu_GetEventHandler(*args, **kwargs)
7691
7692 def SetInvokingWindow(*args, **kwargs):
7693 """SetInvokingWindow(self, Window win)"""
7694 return _core_.Menu_SetInvokingWindow(*args, **kwargs)
7695
7696 def GetInvokingWindow(*args, **kwargs):
7697 """GetInvokingWindow(self) -> Window"""
7698 return _core_.Menu_GetInvokingWindow(*args, **kwargs)
7699
7700 def GetStyle(*args, **kwargs):
7701 """GetStyle(self) -> long"""
7702 return _core_.Menu_GetStyle(*args, **kwargs)
7703
7704 def UpdateUI(*args, **kwargs):
7705 """UpdateUI(self, EvtHandler source=None)"""
7706 return _core_.Menu_UpdateUI(*args, **kwargs)
7707
7708 def GetMenuBar(*args, **kwargs):
7709 """GetMenuBar(self) -> MenuBar"""
7710 return _core_.Menu_GetMenuBar(*args, **kwargs)
7711
7712 def Attach(*args, **kwargs):
7713 """Attach(self, wxMenuBarBase menubar)"""
7714 return _core_.Menu_Attach(*args, **kwargs)
7715
7716 def Detach(*args, **kwargs):
7717 """Detach(self)"""
7718 return _core_.Menu_Detach(*args, **kwargs)
7719
7720 def IsAttached(*args, **kwargs):
7721 """IsAttached(self) -> bool"""
7722 return _core_.Menu_IsAttached(*args, **kwargs)
7723
7724 def SetParent(*args, **kwargs):
7725 """SetParent(self, Menu parent)"""
7726 return _core_.Menu_SetParent(*args, **kwargs)
7727
7728 def GetParent(*args, **kwargs):
7729 """GetParent(self) -> Menu"""
7730 return _core_.Menu_GetParent(*args, **kwargs)
7731
7732
7733 class MenuPtr(Menu):
7734 def __init__(self, this):
7735 self.this = this
7736 if not hasattr(self,"thisown"): self.thisown = 0
7737 self.__class__ = Menu
7738 _core_.Menu_swigregister(MenuPtr)
7739 DefaultValidator = cvar.DefaultValidator
7740
7741 #---------------------------------------------------------------------------
7742
7743 class MenuBar(Window):
7744 def __repr__(self):
7745 return "<%s.%s; proxy of C++ wxMenuBar instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
7746 def __init__(self, *args, **kwargs):
7747 """__init__(self, long style=0) -> MenuBar"""
7748 newobj = _core_.new_MenuBar(*args, **kwargs)
7749 self.this = newobj.this
7750 self.thisown = 1
7751 del newobj.thisown
7752 self._setOORInfo(self)
7753
7754 def Append(*args, **kwargs):
7755 """Append(self, Menu menu, String title) -> bool"""
7756 return _core_.MenuBar_Append(*args, **kwargs)
7757
7758 def Insert(*args, **kwargs):
7759 """Insert(self, size_t pos, Menu menu, String title) -> bool"""
7760 return _core_.MenuBar_Insert(*args, **kwargs)
7761
7762 def GetMenuCount(*args, **kwargs):
7763 """GetMenuCount(self) -> size_t"""
7764 return _core_.MenuBar_GetMenuCount(*args, **kwargs)
7765
7766 def GetMenu(*args, **kwargs):
7767 """GetMenu(self, size_t pos) -> Menu"""
7768 return _core_.MenuBar_GetMenu(*args, **kwargs)
7769
7770 def Replace(*args, **kwargs):
7771 """Replace(self, size_t pos, Menu menu, String title) -> Menu"""
7772 return _core_.MenuBar_Replace(*args, **kwargs)
7773
7774 def Remove(*args, **kwargs):
7775 """Remove(self, size_t pos) -> Menu"""
7776 return _core_.MenuBar_Remove(*args, **kwargs)
7777
7778 def EnableTop(*args, **kwargs):
7779 """EnableTop(self, size_t pos, bool enable)"""
7780 return _core_.MenuBar_EnableTop(*args, **kwargs)
7781
7782 def IsEnabledTop(*args, **kwargs):
7783 """IsEnabledTop(self, size_t pos) -> bool"""
7784 return _core_.MenuBar_IsEnabledTop(*args, **kwargs)
7785
7786 def SetLabelTop(*args, **kwargs):
7787 """SetLabelTop(self, size_t pos, String label)"""
7788 return _core_.MenuBar_SetLabelTop(*args, **kwargs)
7789
7790 def GetLabelTop(*args, **kwargs):
7791 """GetLabelTop(self, size_t pos) -> String"""
7792 return _core_.MenuBar_GetLabelTop(*args, **kwargs)
7793
7794 def FindMenuItem(*args, **kwargs):
7795 """FindMenuItem(self, String menu, String item) -> int"""
7796 return _core_.MenuBar_FindMenuItem(*args, **kwargs)
7797
7798 def FindItemById(*args, **kwargs):
7799 """FindItemById(self, int id) -> MenuItem"""
7800 return _core_.MenuBar_FindItemById(*args, **kwargs)
7801
7802 def FindMenu(*args, **kwargs):
7803 """FindMenu(self, String title) -> int"""
7804 return _core_.MenuBar_FindMenu(*args, **kwargs)
7805
7806 def Enable(*args, **kwargs):
7807 """Enable(self, int id, bool enable)"""
7808 return _core_.MenuBar_Enable(*args, **kwargs)
7809
7810 def Check(*args, **kwargs):
7811 """Check(self, int id, bool check)"""
7812 return _core_.MenuBar_Check(*args, **kwargs)
7813
7814 def IsChecked(*args, **kwargs):
7815 """IsChecked(self, int id) -> bool"""
7816 return _core_.MenuBar_IsChecked(*args, **kwargs)
7817
7818 def IsEnabled(*args, **kwargs):
7819 """IsEnabled(self, int id) -> bool"""
7820 return _core_.MenuBar_IsEnabled(*args, **kwargs)
7821
7822 def SetLabel(*args, **kwargs):
7823 """SetLabel(self, int id, String label)"""
7824 return _core_.MenuBar_SetLabel(*args, **kwargs)
7825
7826 def GetLabel(*args, **kwargs):
7827 """GetLabel(self, int id) -> String"""
7828 return _core_.MenuBar_GetLabel(*args, **kwargs)
7829
7830 def SetHelpString(*args, **kwargs):
7831 """SetHelpString(self, int id, String helpString)"""
7832 return _core_.MenuBar_SetHelpString(*args, **kwargs)
7833
7834 def GetHelpString(*args, **kwargs):
7835 """GetHelpString(self, int id) -> String"""
7836 return _core_.MenuBar_GetHelpString(*args, **kwargs)
7837
7838 def GetFrame(*args, **kwargs):
7839 """GetFrame(self) -> wxFrame"""
7840 return _core_.MenuBar_GetFrame(*args, **kwargs)
7841
7842 def IsAttached(*args, **kwargs):
7843 """IsAttached(self) -> bool"""
7844 return _core_.MenuBar_IsAttached(*args, **kwargs)
7845
7846 def Attach(*args, **kwargs):
7847 """Attach(self, wxFrame frame)"""
7848 return _core_.MenuBar_Attach(*args, **kwargs)
7849
7850 def Detach(*args, **kwargs):
7851 """Detach(self)"""
7852 return _core_.MenuBar_Detach(*args, **kwargs)
7853
7854
7855 class MenuBarPtr(MenuBar):
7856 def __init__(self, this):
7857 self.this = this
7858 if not hasattr(self,"thisown"): self.thisown = 0
7859 self.__class__ = MenuBar
7860 _core_.MenuBar_swigregister(MenuBarPtr)
7861
7862 #---------------------------------------------------------------------------
7863
7864 class MenuItem(Object):
7865 def __repr__(self):
7866 return "<%s.%s; proxy of C++ wxMenuItem instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
7867 def __init__(self, *args, **kwargs):
7868 """
7869 __init__(self, Menu parentMenu=None, int id=ID_ANY, String text=EmptyString,
7870 String help=EmptyString, int kind=ITEM_NORMAL,
7871 Menu subMenu=None) -> MenuItem
7872 """
7873 newobj = _core_.new_MenuItem(*args, **kwargs)
7874 self.this = newobj.this
7875 self.thisown = 1
7876 del newobj.thisown
7877 def GetMenu(*args, **kwargs):
7878 """GetMenu(self) -> Menu"""
7879 return _core_.MenuItem_GetMenu(*args, **kwargs)
7880
7881 def SetMenu(*args, **kwargs):
7882 """SetMenu(self, Menu menu)"""
7883 return _core_.MenuItem_SetMenu(*args, **kwargs)
7884
7885 def SetId(*args, **kwargs):
7886 """SetId(self, int id)"""
7887 return _core_.MenuItem_SetId(*args, **kwargs)
7888
7889 def GetId(*args, **kwargs):
7890 """GetId(self) -> int"""
7891 return _core_.MenuItem_GetId(*args, **kwargs)
7892
7893 def IsSeparator(*args, **kwargs):
7894 """IsSeparator(self) -> bool"""
7895 return _core_.MenuItem_IsSeparator(*args, **kwargs)
7896
7897 def SetText(*args, **kwargs):
7898 """SetText(self, String str)"""
7899 return _core_.MenuItem_SetText(*args, **kwargs)
7900
7901 def GetLabel(*args, **kwargs):
7902 """GetLabel(self) -> String"""
7903 return _core_.MenuItem_GetLabel(*args, **kwargs)
7904
7905 def GetText(*args, **kwargs):
7906 """GetText(self) -> String"""
7907 return _core_.MenuItem_GetText(*args, **kwargs)
7908
7909 def GetLabelFromText(*args, **kwargs):
7910 """MenuItem.GetLabelFromText(String text) -> String"""
7911 return _core_.MenuItem_GetLabelFromText(*args, **kwargs)
7912
7913 GetLabelFromText = staticmethod(GetLabelFromText)
7914 def GetKind(*args, **kwargs):
7915 """GetKind(self) -> int"""
7916 return _core_.MenuItem_GetKind(*args, **kwargs)
7917
7918 def SetKind(*args, **kwargs):
7919 """SetKind(self, int kind)"""
7920 return _core_.MenuItem_SetKind(*args, **kwargs)
7921
7922 def SetCheckable(*args, **kwargs):
7923 """SetCheckable(self, bool checkable)"""
7924 return _core_.MenuItem_SetCheckable(*args, **kwargs)
7925
7926 def IsCheckable(*args, **kwargs):
7927 """IsCheckable(self) -> bool"""
7928 return _core_.MenuItem_IsCheckable(*args, **kwargs)
7929
7930 def IsSubMenu(*args, **kwargs):
7931 """IsSubMenu(self) -> bool"""
7932 return _core_.MenuItem_IsSubMenu(*args, **kwargs)
7933
7934 def SetSubMenu(*args, **kwargs):
7935 """SetSubMenu(self, Menu menu)"""
7936 return _core_.MenuItem_SetSubMenu(*args, **kwargs)
7937
7938 def GetSubMenu(*args, **kwargs):
7939 """GetSubMenu(self) -> Menu"""
7940 return _core_.MenuItem_GetSubMenu(*args, **kwargs)
7941
7942 def Enable(*args, **kwargs):
7943 """Enable(self, bool enable=True)"""
7944 return _core_.MenuItem_Enable(*args, **kwargs)
7945
7946 def IsEnabled(*args, **kwargs):
7947 """IsEnabled(self) -> bool"""
7948 return _core_.MenuItem_IsEnabled(*args, **kwargs)
7949
7950 def Check(*args, **kwargs):
7951 """Check(self, bool check=True)"""
7952 return _core_.MenuItem_Check(*args, **kwargs)
7953
7954 def IsChecked(*args, **kwargs):
7955 """IsChecked(self) -> bool"""
7956 return _core_.MenuItem_IsChecked(*args, **kwargs)
7957
7958 def Toggle(*args, **kwargs):
7959 """Toggle(self)"""
7960 return _core_.MenuItem_Toggle(*args, **kwargs)
7961
7962 def SetHelp(*args, **kwargs):
7963 """SetHelp(self, String str)"""
7964 return _core_.MenuItem_SetHelp(*args, **kwargs)
7965
7966 def GetHelp(*args, **kwargs):
7967 """GetHelp(self) -> String"""
7968 return _core_.MenuItem_GetHelp(*args, **kwargs)
7969
7970 def GetAccel(*args, **kwargs):
7971 """GetAccel(self) -> AcceleratorEntry"""
7972 return _core_.MenuItem_GetAccel(*args, **kwargs)
7973
7974 def SetAccel(*args, **kwargs):
7975 """SetAccel(self, AcceleratorEntry accel)"""
7976 return _core_.MenuItem_SetAccel(*args, **kwargs)
7977
7978 def SetFont(*args, **kwargs):
7979 """SetFont(self, Font font)"""
7980 return _core_.MenuItem_SetFont(*args, **kwargs)
7981
7982 def GetFont(*args, **kwargs):
7983 """GetFont(self) -> Font"""
7984 return _core_.MenuItem_GetFont(*args, **kwargs)
7985
7986 def SetTextColour(*args, **kwargs):
7987 """SetTextColour(self, Colour colText)"""
7988 return _core_.MenuItem_SetTextColour(*args, **kwargs)
7989
7990 def GetTextColour(*args, **kwargs):
7991 """GetTextColour(self) -> Colour"""
7992 return _core_.MenuItem_GetTextColour(*args, **kwargs)
7993
7994 def SetBackgroundColour(*args, **kwargs):
7995 """SetBackgroundColour(self, Colour colBack)"""
7996 return _core_.MenuItem_SetBackgroundColour(*args, **kwargs)
7997
7998 def GetBackgroundColour(*args, **kwargs):
7999 """GetBackgroundColour(self) -> Colour"""
8000 return _core_.MenuItem_GetBackgroundColour(*args, **kwargs)
8001
8002 def SetBitmaps(*args, **kwargs):
8003 """SetBitmaps(self, Bitmap bmpChecked, Bitmap bmpUnchecked=wxNullBitmap)"""
8004 return _core_.MenuItem_SetBitmaps(*args, **kwargs)
8005
8006 def SetDisabledBitmap(*args, **kwargs):
8007 """SetDisabledBitmap(self, Bitmap bmpDisabled)"""
8008 return _core_.MenuItem_SetDisabledBitmap(*args, **kwargs)
8009
8010 def GetDisabledBitmap(*args, **kwargs):
8011 """GetDisabledBitmap(self) -> Bitmap"""
8012 return _core_.MenuItem_GetDisabledBitmap(*args, **kwargs)
8013
8014 def SetMarginWidth(*args, **kwargs):
8015 """SetMarginWidth(self, int nWidth)"""
8016 return _core_.MenuItem_SetMarginWidth(*args, **kwargs)
8017
8018 def GetMarginWidth(*args, **kwargs):
8019 """GetMarginWidth(self) -> int"""
8020 return _core_.MenuItem_GetMarginWidth(*args, **kwargs)
8021
8022 def GetDefaultMarginWidth(*args, **kwargs):
8023 """MenuItem.GetDefaultMarginWidth() -> int"""
8024 return _core_.MenuItem_GetDefaultMarginWidth(*args, **kwargs)
8025
8026 GetDefaultMarginWidth = staticmethod(GetDefaultMarginWidth)
8027 def IsOwnerDrawn(*args, **kwargs):
8028 """IsOwnerDrawn(self) -> bool"""
8029 return _core_.MenuItem_IsOwnerDrawn(*args, **kwargs)
8030
8031 def SetOwnerDrawn(*args, **kwargs):
8032 """SetOwnerDrawn(self, bool ownerDrawn=True)"""
8033 return _core_.MenuItem_SetOwnerDrawn(*args, **kwargs)
8034
8035 def ResetOwnerDrawn(*args, **kwargs):
8036 """ResetOwnerDrawn(self)"""
8037 return _core_.MenuItem_ResetOwnerDrawn(*args, **kwargs)
8038
8039 def SetBitmap(*args, **kwargs):
8040 """SetBitmap(self, Bitmap bitmap)"""
8041 return _core_.MenuItem_SetBitmap(*args, **kwargs)
8042
8043 def GetBitmap(*args, **kwargs):
8044 """GetBitmap(self) -> Bitmap"""
8045 return _core_.MenuItem_GetBitmap(*args, **kwargs)
8046
8047
8048 class MenuItemPtr(MenuItem):
8049 def __init__(self, this):
8050 self.this = this
8051 if not hasattr(self,"thisown"): self.thisown = 0
8052 self.__class__ = MenuItem
8053 _core_.MenuItem_swigregister(MenuItemPtr)
8054
8055 def MenuItem_GetLabelFromText(*args, **kwargs):
8056 """MenuItem_GetLabelFromText(String text) -> String"""
8057 return _core_.MenuItem_GetLabelFromText(*args, **kwargs)
8058
8059 def MenuItem_GetDefaultMarginWidth(*args, **kwargs):
8060 """MenuItem_GetDefaultMarginWidth() -> int"""
8061 return _core_.MenuItem_GetDefaultMarginWidth(*args, **kwargs)
8062
8063 #---------------------------------------------------------------------------
8064
8065 class Control(Window):
8066 """
8067 This is the base class for a control or 'widget'.
8068
8069 A control is generally a small window which processes user input and/or
8070 displays one or more item of data.
8071 """
8072 def __repr__(self):
8073 return "<%s.%s; proxy of C++ wxControl instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
8074 def __init__(self, *args, **kwargs):
8075 """
8076 __init__(self, Window parent, int id, Point pos=DefaultPosition, Size size=DefaultSize,
8077 long style=0, Validator validator=DefaultValidator,
8078 String name=ControlNameStr) -> Control
8079
8080 Create a Control. Normally you should only call this from a
8081 subclass' __init__ as a plain old wx.Control is not very useful.
8082 """
8083 newobj = _core_.new_Control(*args, **kwargs)
8084 self.this = newobj.this
8085 self.thisown = 1
8086 del newobj.thisown
8087 self._setOORInfo(self)
8088
8089 def Create(*args, **kwargs):
8090 """
8091 Create(self, Window parent, int id, Point pos=DefaultPosition, Size size=DefaultSize,
8092 long style=0, Validator validator=DefaultValidator,
8093 String name=ControlNameStr) -> bool
8094
8095 Do the 2nd phase and create the GUI control.
8096 """
8097 return _core_.Control_Create(*args, **kwargs)
8098
8099 def Command(*args, **kwargs):
8100 """
8101 Command(self, CommandEvent event)
8102
8103 Simulates the effect of the user issuing a command to the
8104 item. See wx.CommandEvent.
8105 """
8106 return _core_.Control_Command(*args, **kwargs)
8107
8108 def GetLabel(*args, **kwargs):
8109 """
8110 GetLabel(self) -> String
8111
8112 Return a control's text.
8113 """
8114 return _core_.Control_GetLabel(*args, **kwargs)
8115
8116 def SetLabel(*args, **kwargs):
8117 """
8118 SetLabel(self, String label)
8119
8120 Sets the item's text.
8121 """
8122 return _core_.Control_SetLabel(*args, **kwargs)
8123
8124 def GetClassDefaultAttributes(*args, **kwargs):
8125 """
8126 Control.GetClassDefaultAttributes(int variant=WINDOW_VARIANT_NORMAL) -> VisualAttributes
8127
8128 Get the default attributes for this class. This is useful if
8129 you want to use the same font or colour in your own control as
8130 in a standard control -- which is a much better idea than hard
8131 coding specific colours or fonts which might look completely out
8132 of place on the users system, especially if it uses themes.
8133
8134 The variant parameter is only relevant under Mac currently and is
8135 ignore under other platforms. Under Mac, it will change the size of the
8136 returned font. See SetWindowVariant for more about this.
8137 """
8138 return _core_.Control_GetClassDefaultAttributes(*args, **kwargs)
8139
8140 GetClassDefaultAttributes = staticmethod(GetClassDefaultAttributes)
8141
8142 class ControlPtr(Control):
8143 def __init__(self, this):
8144 self.this = this
8145 if not hasattr(self,"thisown"): self.thisown = 0
8146 self.__class__ = Control
8147 _core_.Control_swigregister(ControlPtr)
8148 ControlNameStr = cvar.ControlNameStr
8149
8150 def PreControl(*args, **kwargs):
8151 """
8152 PreControl() -> Control
8153
8154 Precreate a Control control for 2-phase creation
8155 """
8156 val = _core_.new_PreControl(*args, **kwargs)
8157 val.thisown = 1
8158 return val
8159
8160 def Control_GetClassDefaultAttributes(*args, **kwargs):
8161 """
8162 Control_GetClassDefaultAttributes(int variant=WINDOW_VARIANT_NORMAL) -> VisualAttributes
8163
8164 Get the default attributes for this class. This is useful if
8165 you want to use the same font or colour in your own control as
8166 in a standard control -- which is a much better idea than hard
8167 coding specific colours or fonts which might look completely out
8168 of place on the users system, especially if it uses themes.
8169
8170 The variant parameter is only relevant under Mac currently and is
8171 ignore under other platforms. Under Mac, it will change the size of the
8172 returned font. See SetWindowVariant for more about this.
8173 """
8174 return _core_.Control_GetClassDefaultAttributes(*args, **kwargs)
8175
8176 #---------------------------------------------------------------------------
8177
8178 class ItemContainer(object):
8179 """
8180 wx.ItemContainer defines an interface which is implemented by all
8181 controls which have string subitems, each of which may be
8182 selected, such as wx.ListBox, wx.CheckListBox, wx.Choice and
8183 wx.ComboBox (which implements an extended interface deriving from
8184 this one)
8185
8186 It defines the methods for accessing the control's items and
8187 although each of the derived classes implements them differently,
8188 they still all conform to the same interface.
8189
8190 The items in a wx.ItemContainer have (non empty) string labels
8191 and, optionally, client data associated with them.
8192
8193 """
8194 def __init__(self): raise RuntimeError, "No constructor defined"
8195 def __repr__(self):
8196 return "<%s.%s; proxy of C++ wxItemContainer instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
8197 def Append(*args, **kwargs):
8198 """
8199 Append(self, String item, PyObject clientData=None) -> int
8200
8201 Adds the item to the control, associating the given data with the
8202 item if not None. The return value is the index of the newly
8203 added item which may be different from the last one if the
8204 control is sorted (e.g. has wx.LB_SORT or wx.CB_SORT style).
8205 """
8206 return _core_.ItemContainer_Append(*args, **kwargs)
8207
8208 def AppendItems(*args, **kwargs):
8209 """
8210 AppendItems(self, wxArrayString strings)
8211
8212 Apend several items at once to the control. Notice that calling
8213 this method may be much faster than appending the items one by
8214 one if you need to add a lot of items.
8215 """
8216 return _core_.ItemContainer_AppendItems(*args, **kwargs)
8217
8218 def Insert(*args, **kwargs):
8219 """
8220 Insert(self, String item, int pos, PyObject clientData=None) -> int
8221
8222 Insert an item into the control before the item at the pos index,
8223 optionally associating some data object with the item.
8224 """
8225 return _core_.ItemContainer_Insert(*args, **kwargs)
8226
8227 def Clear(*args, **kwargs):
8228 """
8229 Clear(self)
8230
8231 Removes all items from the control.
8232 """
8233 return _core_.ItemContainer_Clear(*args, **kwargs)
8234
8235 def Delete(*args, **kwargs):
8236 """
8237 Delete(self, int n)
8238
8239 Deletes the item at the zero-based index 'n' from the control.
8240 Note that it is an error (signalled by a PyAssertionError
8241 exception if enabled) to remove an item with the index negative
8242 or greater or equal than the number of items in the control.
8243 """
8244 return _core_.ItemContainer_Delete(*args, **kwargs)
8245
8246 def GetCount(*args, **kwargs):
8247 """
8248 GetCount(self) -> int
8249
8250 Returns the number of items in the control.
8251 """
8252 return _core_.ItemContainer_GetCount(*args, **kwargs)
8253
8254 def IsEmpty(*args, **kwargs):
8255 """
8256 IsEmpty(self) -> bool
8257
8258 Returns True if the control is empty or False if it has some items.
8259 """
8260 return _core_.ItemContainer_IsEmpty(*args, **kwargs)
8261
8262 def GetString(*args, **kwargs):
8263 """
8264 GetString(self, int n) -> String
8265
8266 Returns the label of the item with the given index.
8267 """
8268 return _core_.ItemContainer_GetString(*args, **kwargs)
8269
8270 def GetStrings(*args, **kwargs):
8271 """GetStrings(self) -> wxArrayString"""
8272 return _core_.ItemContainer_GetStrings(*args, **kwargs)
8273
8274 def SetString(*args, **kwargs):
8275 """
8276 SetString(self, int n, String s)
8277
8278 Sets the label for the given item.
8279 """
8280 return _core_.ItemContainer_SetString(*args, **kwargs)
8281
8282 def FindString(*args, **kwargs):
8283 """
8284 FindString(self, String s) -> int
8285
8286 Finds an item whose label matches the given string. Returns the
8287 zero-based position of the item, or wx.NOT_FOUND if the string
8288 was not found.
8289 """
8290 return _core_.ItemContainer_FindString(*args, **kwargs)
8291
8292 def Select(*args, **kwargs):
8293 """
8294 Select(self, int n)
8295
8296 Sets the item at index 'n' to be the selected item.
8297 """
8298 return _core_.ItemContainer_Select(*args, **kwargs)
8299
8300 SetSelection = Select
8301 def GetSelection(*args, **kwargs):
8302 """
8303 GetSelection(self) -> int
8304
8305 Returns the index of the selected item or wx.NOT_FOUND if no item is selected.
8306 """
8307 return _core_.ItemContainer_GetSelection(*args, **kwargs)
8308
8309 def GetStringSelection(*args, **kwargs):
8310 """
8311 GetStringSelection(self) -> String
8312
8313 Returns the label of the selected item or an empty string if no item is selected.
8314 """
8315 return _core_.ItemContainer_GetStringSelection(*args, **kwargs)
8316
8317 def GetClientData(*args, **kwargs):
8318 """
8319 GetClientData(self, int n) -> PyObject
8320
8321 Returns the client data associated with the given item, (if any.)
8322 """
8323 return _core_.ItemContainer_GetClientData(*args, **kwargs)
8324
8325 def SetClientData(*args, **kwargs):
8326 """
8327 SetClientData(self, int n, PyObject clientData)
8328
8329 Associate the given client data with the item at position n.
8330 """
8331 return _core_.ItemContainer_SetClientData(*args, **kwargs)
8332
8333
8334 class ItemContainerPtr(ItemContainer):
8335 def __init__(self, this):
8336 self.this = this
8337 if not hasattr(self,"thisown"): self.thisown = 0
8338 self.__class__ = ItemContainer
8339 _core_.ItemContainer_swigregister(ItemContainerPtr)
8340
8341 #---------------------------------------------------------------------------
8342
8343 class ControlWithItems(Control,ItemContainer):
8344 """
8345 wx.ControlWithItems combines the wx.ItemContainer class with the
8346 wx.Control class, and is used for the base class of various
8347 controls that have items.
8348 """
8349 def __init__(self): raise RuntimeError, "No constructor defined"
8350 def __repr__(self):
8351 return "<%s.%s; proxy of C++ wxControlWithItems instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
8352
8353 class ControlWithItemsPtr(ControlWithItems):
8354 def __init__(self, this):
8355 self.this = this
8356 if not hasattr(self,"thisown"): self.thisown = 0
8357 self.__class__ = ControlWithItems
8358 _core_.ControlWithItems_swigregister(ControlWithItemsPtr)
8359
8360 #---------------------------------------------------------------------------
8361
8362 class SizerItem(Object):
8363 def __repr__(self):
8364 return "<%s.%s; proxy of C++ wxSizerItem instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
8365 def __init__(self, *args, **kwargs):
8366 """__init__(self) -> SizerItem"""
8367 newobj = _core_.new_SizerItem(*args, **kwargs)
8368 self.this = newobj.this
8369 self.thisown = 1
8370 del newobj.thisown
8371 def DeleteWindows(*args, **kwargs):
8372 """DeleteWindows(self)"""
8373 return _core_.SizerItem_DeleteWindows(*args, **kwargs)
8374
8375 def DetachSizer(*args, **kwargs):
8376 """DetachSizer(self)"""
8377 return _core_.SizerItem_DetachSizer(*args, **kwargs)
8378
8379 def GetSize(*args, **kwargs):
8380 """GetSize(self) -> Size"""
8381 return _core_.SizerItem_GetSize(*args, **kwargs)
8382
8383 def CalcMin(*args, **kwargs):
8384 """CalcMin(self) -> Size"""
8385 return _core_.SizerItem_CalcMin(*args, **kwargs)
8386
8387 def SetDimension(*args, **kwargs):
8388 """SetDimension(self, Point pos, Size size)"""
8389 return _core_.SizerItem_SetDimension(*args, **kwargs)
8390
8391 def GetMinSize(*args, **kwargs):
8392 """GetMinSize(self) -> Size"""
8393 return _core_.SizerItem_GetMinSize(*args, **kwargs)
8394
8395 def SetInitSize(*args, **kwargs):
8396 """SetInitSize(self, int x, int y)"""
8397 return _core_.SizerItem_SetInitSize(*args, **kwargs)
8398
8399 def SetRatioWH(*args, **kwargs):
8400 """SetRatioWH(self, int width, int height)"""
8401 return _core_.SizerItem_SetRatioWH(*args, **kwargs)
8402
8403 def SetRatioSize(*args, **kwargs):
8404 """SetRatioSize(self, Size size)"""
8405 return _core_.SizerItem_SetRatioSize(*args, **kwargs)
8406
8407 def SetRatio(*args, **kwargs):
8408 """SetRatio(self, float ratio)"""
8409 return _core_.SizerItem_SetRatio(*args, **kwargs)
8410
8411 def GetRatio(*args, **kwargs):
8412 """GetRatio(self) -> float"""
8413 return _core_.SizerItem_GetRatio(*args, **kwargs)
8414
8415 def IsWindow(*args, **kwargs):
8416 """IsWindow(self) -> bool"""
8417 return _core_.SizerItem_IsWindow(*args, **kwargs)
8418
8419 def IsSizer(*args, **kwargs):
8420 """IsSizer(self) -> bool"""
8421 return _core_.SizerItem_IsSizer(*args, **kwargs)
8422
8423 def IsSpacer(*args, **kwargs):
8424 """IsSpacer(self) -> bool"""
8425 return _core_.SizerItem_IsSpacer(*args, **kwargs)
8426
8427 def SetProportion(*args, **kwargs):
8428 """SetProportion(self, int proportion)"""
8429 return _core_.SizerItem_SetProportion(*args, **kwargs)
8430
8431 def GetProportion(*args, **kwargs):
8432 """GetProportion(self) -> int"""
8433 return _core_.SizerItem_GetProportion(*args, **kwargs)
8434
8435 SetOption = SetProportion
8436 GetOption = GetProportion
8437 def SetFlag(*args, **kwargs):
8438 """SetFlag(self, int flag)"""
8439 return _core_.SizerItem_SetFlag(*args, **kwargs)
8440
8441 def GetFlag(*args, **kwargs):
8442 """GetFlag(self) -> int"""
8443 return _core_.SizerItem_GetFlag(*args, **kwargs)
8444
8445 def SetBorder(*args, **kwargs):
8446 """SetBorder(self, int border)"""
8447 return _core_.SizerItem_SetBorder(*args, **kwargs)
8448
8449 def GetBorder(*args, **kwargs):
8450 """GetBorder(self) -> int"""
8451 return _core_.SizerItem_GetBorder(*args, **kwargs)
8452
8453 def GetWindow(*args, **kwargs):
8454 """GetWindow(self) -> Window"""
8455 return _core_.SizerItem_GetWindow(*args, **kwargs)
8456
8457 def SetWindow(*args, **kwargs):
8458 """SetWindow(self, Window window)"""
8459 return _core_.SizerItem_SetWindow(*args, **kwargs)
8460
8461 def GetSizer(*args, **kwargs):
8462 """GetSizer(self) -> Sizer"""
8463 return _core_.SizerItem_GetSizer(*args, **kwargs)
8464
8465 def SetSizer(*args, **kwargs):
8466 """SetSizer(self, Sizer sizer)"""
8467 return _core_.SizerItem_SetSizer(*args, **kwargs)
8468
8469 def GetSpacer(*args, **kwargs):
8470 """GetSpacer(self) -> Size"""
8471 return _core_.SizerItem_GetSpacer(*args, **kwargs)
8472
8473 def SetSpacer(*args, **kwargs):
8474 """SetSpacer(self, Size size)"""
8475 return _core_.SizerItem_SetSpacer(*args, **kwargs)
8476
8477 def Show(*args, **kwargs):
8478 """Show(self, bool show)"""
8479 return _core_.SizerItem_Show(*args, **kwargs)
8480
8481 def IsShown(*args, **kwargs):
8482 """IsShown(self) -> bool"""
8483 return _core_.SizerItem_IsShown(*args, **kwargs)
8484
8485 def GetPosition(*args, **kwargs):
8486 """GetPosition(self) -> Point"""
8487 return _core_.SizerItem_GetPosition(*args, **kwargs)
8488
8489 def GetUserData(*args, **kwargs):
8490 """GetUserData(self) -> PyObject"""
8491 return _core_.SizerItem_GetUserData(*args, **kwargs)
8492
8493
8494 class SizerItemPtr(SizerItem):
8495 def __init__(self, this):
8496 self.this = this
8497 if not hasattr(self,"thisown"): self.thisown = 0
8498 self.__class__ = SizerItem
8499 _core_.SizerItem_swigregister(SizerItemPtr)
8500
8501 def SizerItemSpacer(*args, **kwargs):
8502 """
8503 SizerItemSpacer(int width, int height, int proportion, int flag, int border,
8504 Object userData) -> SizerItem
8505 """
8506 val = _core_.new_SizerItemSpacer(*args, **kwargs)
8507 val.thisown = 1
8508 return val
8509
8510 def SizerItemWindow(*args, **kwargs):
8511 """
8512 SizerItemWindow(Window window, int proportion, int flag, int border,
8513 Object userData) -> SizerItem
8514 """
8515 val = _core_.new_SizerItemWindow(*args, **kwargs)
8516 val.thisown = 1
8517 return val
8518
8519 def SizerItemSizer(*args, **kwargs):
8520 """
8521 SizerItemSizer(Sizer sizer, int proportion, int flag, int border,
8522 Object userData) -> SizerItem
8523 """
8524 val = _core_.new_SizerItemSizer(*args, **kwargs)
8525 val.thisown = 1
8526 return val
8527
8528 class Sizer(Object):
8529 def __init__(self): raise RuntimeError, "No constructor defined"
8530 def __repr__(self):
8531 return "<%s.%s; proxy of C++ wxSizer instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
8532 def _setOORInfo(*args, **kwargs):
8533 """_setOORInfo(self, PyObject _self)"""
8534 return _core_.Sizer__setOORInfo(*args, **kwargs)
8535
8536 def Add(*args, **kwargs):
8537 """
8538 Add(self, PyObject item, int proportion=0, int flag=0, int border=0,
8539 PyObject userData=None)
8540 """
8541 return _core_.Sizer_Add(*args, **kwargs)
8542
8543 def Insert(*args, **kwargs):
8544 """
8545 Insert(self, int before, PyObject item, int proportion=0, int flag=0,
8546 int border=0, PyObject userData=None)
8547 """
8548 return _core_.Sizer_Insert(*args, **kwargs)
8549
8550 def Prepend(*args, **kwargs):
8551 """
8552 Prepend(self, PyObject item, int proportion=0, int flag=0, int border=0,
8553 PyObject userData=None)
8554 """
8555 return _core_.Sizer_Prepend(*args, **kwargs)
8556
8557 def Remove(*args, **kwargs):
8558 """Remove(self, PyObject item) -> bool"""
8559 return _core_.Sizer_Remove(*args, **kwargs)
8560
8561 def _SetItemMinSize(*args, **kwargs):
8562 """_SetItemMinSize(self, PyObject item, Size size)"""
8563 return _core_.Sizer__SetItemMinSize(*args, **kwargs)
8564
8565 def AddItem(*args, **kwargs):
8566 """AddItem(self, SizerItem item)"""
8567 return _core_.Sizer_AddItem(*args, **kwargs)
8568
8569 def InsertItem(*args, **kwargs):
8570 """InsertItem(self, size_t index, SizerItem item)"""
8571 return _core_.Sizer_InsertItem(*args, **kwargs)
8572
8573 def PrependItem(*args, **kwargs):
8574 """PrependItem(self, SizerItem item)"""
8575 return _core_.Sizer_PrependItem(*args, **kwargs)
8576
8577 def AddMany(self, widgets):
8578 for childinfo in widgets:
8579 if type(childinfo) != type(()) or (len(childinfo) == 2 and type(childinfo[0]) == type(1)):
8580 childinfo = (childinfo, )
8581 self.Add(*childinfo)
8582
8583 # for backwards compatibility only, please do not use in new code
8584 AddWindow = AddSizer = AddSpacer = Add
8585 PrependWindow = PrependSizer = PrependSpacer = Prepend
8586 InsertWindow = InsertSizer = InsertSpacer = Insert
8587 RemoveWindow = RemoveSizer = RemovePos = Remove
8588
8589
8590 def SetItemMinSize(self, item, *args):
8591 if len(args) == 2:
8592 return self._SetItemMinSize(item, args)
8593 else:
8594 return self._SetItemMinSize(item, args[0])
8595
8596 def SetDimension(*args, **kwargs):
8597 """SetDimension(self, int x, int y, int width, int height)"""
8598 return _core_.Sizer_SetDimension(*args, **kwargs)
8599
8600 def SetMinSize(*args, **kwargs):
8601 """SetMinSize(self, Size size)"""
8602 return _core_.Sizer_SetMinSize(*args, **kwargs)
8603
8604 def GetSize(*args, **kwargs):
8605 """GetSize(self) -> Size"""
8606 return _core_.Sizer_GetSize(*args, **kwargs)
8607
8608 def GetPosition(*args, **kwargs):
8609 """GetPosition(self) -> Point"""
8610 return _core_.Sizer_GetPosition(*args, **kwargs)
8611
8612 def GetMinSize(*args, **kwargs):
8613 """GetMinSize(self) -> Size"""
8614 return _core_.Sizer_GetMinSize(*args, **kwargs)
8615
8616 def GetSizeTuple(self):
8617 return self.GetSize().asTuple()
8618 def GetPositionTuple(self):
8619 return self.GetPosition().asTuple()
8620 def GetMinSizeTuple(self):
8621 return self.GetMinSize().asTuple()
8622
8623 def RecalcSizes(*args, **kwargs):
8624 """RecalcSizes(self)"""
8625 return _core_.Sizer_RecalcSizes(*args, **kwargs)
8626
8627 def CalcMin(*args, **kwargs):
8628 """CalcMin(self) -> Size"""
8629 return _core_.Sizer_CalcMin(*args, **kwargs)
8630
8631 def Layout(*args, **kwargs):
8632 """Layout(self)"""
8633 return _core_.Sizer_Layout(*args, **kwargs)
8634
8635 def Fit(*args, **kwargs):
8636 """Fit(self, Window window) -> Size"""
8637 return _core_.Sizer_Fit(*args, **kwargs)
8638
8639 def FitInside(*args, **kwargs):
8640 """FitInside(self, Window window)"""
8641 return _core_.Sizer_FitInside(*args, **kwargs)
8642
8643 def SetSizeHints(*args, **kwargs):
8644 """SetSizeHints(self, Window window)"""
8645 return _core_.Sizer_SetSizeHints(*args, **kwargs)
8646
8647 def SetVirtualSizeHints(*args, **kwargs):
8648 """SetVirtualSizeHints(self, Window window)"""
8649 return _core_.Sizer_SetVirtualSizeHints(*args, **kwargs)
8650
8651 def Clear(*args, **kwargs):
8652 """Clear(self, bool delete_windows=False)"""
8653 return _core_.Sizer_Clear(*args, **kwargs)
8654
8655 def DeleteWindows(*args, **kwargs):
8656 """DeleteWindows(self)"""
8657 return _core_.Sizer_DeleteWindows(*args, **kwargs)
8658
8659 def GetChildren(*args, **kwargs):
8660 """GetChildren(self) -> PyObject"""
8661 return _core_.Sizer_GetChildren(*args, **kwargs)
8662
8663 def Show(*args, **kwargs):
8664 """Show(self, PyObject item, bool show=True)"""
8665 return _core_.Sizer_Show(*args, **kwargs)
8666
8667 def Hide(*args, **kwargs):
8668 """Hide(self, PyObject item)"""
8669 return _core_.Sizer_Hide(*args, **kwargs)
8670
8671 def IsShown(*args, **kwargs):
8672 """IsShown(self, PyObject item) -> bool"""
8673 return _core_.Sizer_IsShown(*args, **kwargs)
8674
8675 def ShowItems(*args, **kwargs):
8676 """ShowItems(self, bool show)"""
8677 return _core_.Sizer_ShowItems(*args, **kwargs)
8678
8679
8680 class SizerPtr(Sizer):
8681 def __init__(self, this):
8682 self.this = this
8683 if not hasattr(self,"thisown"): self.thisown = 0
8684 self.__class__ = Sizer
8685 _core_.Sizer_swigregister(SizerPtr)
8686
8687 class PySizer(Sizer):
8688 def __repr__(self):
8689 return "<%s.%s; proxy of C++ wxPySizer instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
8690 def __init__(self, *args, **kwargs):
8691 """__init__(self) -> PySizer"""
8692 newobj = _core_.new_PySizer(*args, **kwargs)
8693 self.this = newobj.this
8694 self.thisown = 1
8695 del newobj.thisown
8696 self._setCallbackInfo(self, PySizer);self._setOORInfo(self)
8697
8698 def _setCallbackInfo(*args, **kwargs):
8699 """_setCallbackInfo(self, PyObject self, PyObject _class)"""
8700 return _core_.PySizer__setCallbackInfo(*args, **kwargs)
8701
8702
8703 class PySizerPtr(PySizer):
8704 def __init__(self, this):
8705 self.this = this
8706 if not hasattr(self,"thisown"): self.thisown = 0
8707 self.__class__ = PySizer
8708 _core_.PySizer_swigregister(PySizerPtr)
8709
8710 #---------------------------------------------------------------------------
8711
8712 class BoxSizer(Sizer):
8713 def __repr__(self):
8714 return "<%s.%s; proxy of C++ wxBoxSizer instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
8715 def __init__(self, *args, **kwargs):
8716 """__init__(self, int orient=HORIZONTAL) -> BoxSizer"""
8717 newobj = _core_.new_BoxSizer(*args, **kwargs)
8718 self.this = newobj.this
8719 self.thisown = 1
8720 del newobj.thisown
8721 self._setOORInfo(self)
8722
8723 def GetOrientation(*args, **kwargs):
8724 """GetOrientation(self) -> int"""
8725 return _core_.BoxSizer_GetOrientation(*args, **kwargs)
8726
8727 def SetOrientation(*args, **kwargs):
8728 """SetOrientation(self, int orient)"""
8729 return _core_.BoxSizer_SetOrientation(*args, **kwargs)
8730
8731 def RecalcSizes(*args, **kwargs):
8732 """RecalcSizes(self)"""
8733 return _core_.BoxSizer_RecalcSizes(*args, **kwargs)
8734
8735 def CalcMin(*args, **kwargs):
8736 """CalcMin(self) -> Size"""
8737 return _core_.BoxSizer_CalcMin(*args, **kwargs)
8738
8739
8740 class BoxSizerPtr(BoxSizer):
8741 def __init__(self, this):
8742 self.this = this
8743 if not hasattr(self,"thisown"): self.thisown = 0
8744 self.__class__ = BoxSizer
8745 _core_.BoxSizer_swigregister(BoxSizerPtr)
8746
8747 #---------------------------------------------------------------------------
8748
8749 class StaticBoxSizer(BoxSizer):
8750 def __repr__(self):
8751 return "<%s.%s; proxy of C++ wxStaticBoxSizer instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
8752 def __init__(self, *args, **kwargs):
8753 """__init__(self, wxStaticBox box, int orient=HORIZONTAL) -> StaticBoxSizer"""
8754 newobj = _core_.new_StaticBoxSizer(*args, **kwargs)
8755 self.this = newobj.this
8756 self.thisown = 1
8757 del newobj.thisown
8758 self._setOORInfo(self)
8759
8760 def GetStaticBox(*args, **kwargs):
8761 """GetStaticBox(self) -> wxStaticBox"""
8762 return _core_.StaticBoxSizer_GetStaticBox(*args, **kwargs)
8763
8764 def RecalcSizes(*args, **kwargs):
8765 """RecalcSizes(self)"""
8766 return _core_.StaticBoxSizer_RecalcSizes(*args, **kwargs)
8767
8768 def CalcMin(*args, **kwargs):
8769 """CalcMin(self) -> Size"""
8770 return _core_.StaticBoxSizer_CalcMin(*args, **kwargs)
8771
8772
8773 class StaticBoxSizerPtr(StaticBoxSizer):
8774 def __init__(self, this):
8775 self.this = this
8776 if not hasattr(self,"thisown"): self.thisown = 0
8777 self.__class__ = StaticBoxSizer
8778 _core_.StaticBoxSizer_swigregister(StaticBoxSizerPtr)
8779
8780 #---------------------------------------------------------------------------
8781
8782 class GridSizer(Sizer):
8783 def __repr__(self):
8784 return "<%s.%s; proxy of C++ wxGridSizer instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
8785 def __init__(self, *args, **kwargs):
8786 """__init__(self, int rows=1, int cols=0, int vgap=0, int hgap=0) -> GridSizer"""
8787 newobj = _core_.new_GridSizer(*args, **kwargs)
8788 self.this = newobj.this
8789 self.thisown = 1
8790 del newobj.thisown
8791 self._setOORInfo(self)
8792
8793 def RecalcSizes(*args, **kwargs):
8794 """RecalcSizes(self)"""
8795 return _core_.GridSizer_RecalcSizes(*args, **kwargs)
8796
8797 def CalcMin(*args, **kwargs):
8798 """CalcMin(self) -> Size"""
8799 return _core_.GridSizer_CalcMin(*args, **kwargs)
8800
8801 def SetCols(*args, **kwargs):
8802 """SetCols(self, int cols)"""
8803 return _core_.GridSizer_SetCols(*args, **kwargs)
8804
8805 def SetRows(*args, **kwargs):
8806 """SetRows(self, int rows)"""
8807 return _core_.GridSizer_SetRows(*args, **kwargs)
8808
8809 def SetVGap(*args, **kwargs):
8810 """SetVGap(self, int gap)"""
8811 return _core_.GridSizer_SetVGap(*args, **kwargs)
8812
8813 def SetHGap(*args, **kwargs):
8814 """SetHGap(self, int gap)"""
8815 return _core_.GridSizer_SetHGap(*args, **kwargs)
8816
8817 def GetCols(*args, **kwargs):
8818 """GetCols(self) -> int"""
8819 return _core_.GridSizer_GetCols(*args, **kwargs)
8820
8821 def GetRows(*args, **kwargs):
8822 """GetRows(self) -> int"""
8823 return _core_.GridSizer_GetRows(*args, **kwargs)
8824
8825 def GetVGap(*args, **kwargs):
8826 """GetVGap(self) -> int"""
8827 return _core_.GridSizer_GetVGap(*args, **kwargs)
8828
8829 def GetHGap(*args, **kwargs):
8830 """GetHGap(self) -> int"""
8831 return _core_.GridSizer_GetHGap(*args, **kwargs)
8832
8833
8834 class GridSizerPtr(GridSizer):
8835 def __init__(self, this):
8836 self.this = this
8837 if not hasattr(self,"thisown"): self.thisown = 0
8838 self.__class__ = GridSizer
8839 _core_.GridSizer_swigregister(GridSizerPtr)
8840
8841 #---------------------------------------------------------------------------
8842
8843 FLEX_GROWMODE_NONE = _core_.FLEX_GROWMODE_NONE
8844 FLEX_GROWMODE_SPECIFIED = _core_.FLEX_GROWMODE_SPECIFIED
8845 FLEX_GROWMODE_ALL = _core_.FLEX_GROWMODE_ALL
8846 class FlexGridSizer(GridSizer):
8847 def __repr__(self):
8848 return "<%s.%s; proxy of C++ wxFlexGridSizer instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
8849 def __init__(self, *args, **kwargs):
8850 """__init__(self, int rows=1, int cols=0, int vgap=0, int hgap=0) -> FlexGridSizer"""
8851 newobj = _core_.new_FlexGridSizer(*args, **kwargs)
8852 self.this = newobj.this
8853 self.thisown = 1
8854 del newobj.thisown
8855 self._setOORInfo(self)
8856
8857 def RecalcSizes(*args, **kwargs):
8858 """RecalcSizes(self)"""
8859 return _core_.FlexGridSizer_RecalcSizes(*args, **kwargs)
8860
8861 def CalcMin(*args, **kwargs):
8862 """CalcMin(self) -> Size"""
8863 return _core_.FlexGridSizer_CalcMin(*args, **kwargs)
8864
8865 def AddGrowableRow(*args, **kwargs):
8866 """AddGrowableRow(self, size_t idx, int proportion=0)"""
8867 return _core_.FlexGridSizer_AddGrowableRow(*args, **kwargs)
8868
8869 def RemoveGrowableRow(*args, **kwargs):
8870 """RemoveGrowableRow(self, size_t idx)"""
8871 return _core_.FlexGridSizer_RemoveGrowableRow(*args, **kwargs)
8872
8873 def AddGrowableCol(*args, **kwargs):
8874 """AddGrowableCol(self, size_t idx, int proportion=0)"""
8875 return _core_.FlexGridSizer_AddGrowableCol(*args, **kwargs)
8876
8877 def RemoveGrowableCol(*args, **kwargs):
8878 """RemoveGrowableCol(self, size_t idx)"""
8879 return _core_.FlexGridSizer_RemoveGrowableCol(*args, **kwargs)
8880
8881 def SetFlexibleDirection(*args, **kwargs):
8882 """SetFlexibleDirection(self, int direction)"""
8883 return _core_.FlexGridSizer_SetFlexibleDirection(*args, **kwargs)
8884
8885 def GetFlexibleDirection(*args, **kwargs):
8886 """GetFlexibleDirection(self) -> int"""
8887 return _core_.FlexGridSizer_GetFlexibleDirection(*args, **kwargs)
8888
8889 def SetNonFlexibleGrowMode(*args, **kwargs):
8890 """SetNonFlexibleGrowMode(self, int mode)"""
8891 return _core_.FlexGridSizer_SetNonFlexibleGrowMode(*args, **kwargs)
8892
8893 def GetNonFlexibleGrowMode(*args, **kwargs):
8894 """GetNonFlexibleGrowMode(self) -> int"""
8895 return _core_.FlexGridSizer_GetNonFlexibleGrowMode(*args, **kwargs)
8896
8897 def GetRowHeights(*args, **kwargs):
8898 """GetRowHeights(self) -> wxArrayInt"""
8899 return _core_.FlexGridSizer_GetRowHeights(*args, **kwargs)
8900
8901 def GetColWidths(*args, **kwargs):
8902 """GetColWidths(self) -> wxArrayInt"""
8903 return _core_.FlexGridSizer_GetColWidths(*args, **kwargs)
8904
8905
8906 class FlexGridSizerPtr(FlexGridSizer):
8907 def __init__(self, this):
8908 self.this = this
8909 if not hasattr(self,"thisown"): self.thisown = 0
8910 self.__class__ = FlexGridSizer
8911 _core_.FlexGridSizer_swigregister(FlexGridSizerPtr)
8912
8913 #---------------------------------------------------------------------------
8914
8915 class GBPosition(object):
8916 def __repr__(self):
8917 return "<%s.%s; proxy of C++ wxGBPosition instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
8918 def __init__(self, *args, **kwargs):
8919 """__init__(self, int row=0, int col=0) -> GBPosition"""
8920 newobj = _core_.new_GBPosition(*args, **kwargs)
8921 self.this = newobj.this
8922 self.thisown = 1
8923 del newobj.thisown
8924 def GetRow(*args, **kwargs):
8925 """GetRow(self) -> int"""
8926 return _core_.GBPosition_GetRow(*args, **kwargs)
8927
8928 def GetCol(*args, **kwargs):
8929 """GetCol(self) -> int"""
8930 return _core_.GBPosition_GetCol(*args, **kwargs)
8931
8932 def SetRow(*args, **kwargs):
8933 """SetRow(self, int row)"""
8934 return _core_.GBPosition_SetRow(*args, **kwargs)
8935
8936 def SetCol(*args, **kwargs):
8937 """SetCol(self, int col)"""
8938 return _core_.GBPosition_SetCol(*args, **kwargs)
8939
8940 def __eq__(*args, **kwargs):
8941 """__eq__(self, GBPosition other) -> bool"""
8942 return _core_.GBPosition___eq__(*args, **kwargs)
8943
8944 def __ne__(*args, **kwargs):
8945 """__ne__(self, GBPosition other) -> bool"""
8946 return _core_.GBPosition___ne__(*args, **kwargs)
8947
8948 def Set(*args, **kwargs):
8949 """Set(self, int row=0, int col=0)"""
8950 return _core_.GBPosition_Set(*args, **kwargs)
8951
8952 def Get(*args, **kwargs):
8953 """Get(self) -> PyObject"""
8954 return _core_.GBPosition_Get(*args, **kwargs)
8955
8956 asTuple = Get
8957 def __str__(self): return str(self.Get())
8958 def __repr__(self): return 'wx.GBPosition'+str(self.Get())
8959 def __len__(self): return len(self.Get())
8960 def __getitem__(self, index): return self.Get()[index]
8961 def __setitem__(self, index, val):
8962 if index == 0: self.SetRow(val)
8963 elif index == 1: self.SetCol(val)
8964 else: raise IndexError
8965 def __nonzero__(self): return self.Get() != (0,0)
8966 __safe_for_unpickling__ = True
8967 def __reduce__(self): return (wx.GBPosition, self.Get())
8968
8969 row = property(GetRow, SetRow)
8970 col = property(GetCol, SetCol)
8971
8972
8973 class GBPositionPtr(GBPosition):
8974 def __init__(self, this):
8975 self.this = this
8976 if not hasattr(self,"thisown"): self.thisown = 0
8977 self.__class__ = GBPosition
8978 _core_.GBPosition_swigregister(GBPositionPtr)
8979
8980 class GBSpan(object):
8981 def __repr__(self):
8982 return "<%s.%s; proxy of C++ wxGBSpan instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
8983 def __init__(self, *args, **kwargs):
8984 """__init__(self, int rowspan=1, int colspan=1) -> GBSpan"""
8985 newobj = _core_.new_GBSpan(*args, **kwargs)
8986 self.this = newobj.this
8987 self.thisown = 1
8988 del newobj.thisown
8989 def GetRowspan(*args, **kwargs):
8990 """GetRowspan(self) -> int"""
8991 return _core_.GBSpan_GetRowspan(*args, **kwargs)
8992
8993 def GetColspan(*args, **kwargs):
8994 """GetColspan(self) -> int"""
8995 return _core_.GBSpan_GetColspan(*args, **kwargs)
8996
8997 def SetRowspan(*args, **kwargs):
8998 """SetRowspan(self, int rowspan)"""
8999 return _core_.GBSpan_SetRowspan(*args, **kwargs)
9000
9001 def SetColspan(*args, **kwargs):
9002 """SetColspan(self, int colspan)"""
9003 return _core_.GBSpan_SetColspan(*args, **kwargs)
9004
9005 def __eq__(*args, **kwargs):
9006 """__eq__(self, GBSpan other) -> bool"""
9007 return _core_.GBSpan___eq__(*args, **kwargs)
9008
9009 def __ne__(*args, **kwargs):
9010 """__ne__(self, GBSpan other) -> bool"""
9011 return _core_.GBSpan___ne__(*args, **kwargs)
9012
9013 def Set(*args, **kwargs):
9014 """Set(self, int rowspan=1, int colspan=1)"""
9015 return _core_.GBSpan_Set(*args, **kwargs)
9016
9017 def Get(*args, **kwargs):
9018 """Get(self) -> PyObject"""
9019 return _core_.GBSpan_Get(*args, **kwargs)
9020
9021 asTuple = Get
9022 def __str__(self): return str(self.Get())
9023 def __repr__(self): return 'wx.GBSpan'+str(self.Get())
9024 def __len__(self): return len(self.Get())
9025 def __getitem__(self, index): return self.Get()[index]
9026 def __setitem__(self, index, val):
9027 if index == 0: self.SetRowspan(val)
9028 elif index == 1: self.SetColspan(val)
9029 else: raise IndexError
9030 def __nonzero__(self): return self.Get() != (0,0)
9031 __safe_for_unpickling__ = True
9032 def __reduce__(self): return (wx.GBSpan, self.Get())
9033
9034 rowspan = property(GetRowspan, SetRowspan)
9035 colspan = property(GetColspan, SetColspan)
9036
9037
9038 class GBSpanPtr(GBSpan):
9039 def __init__(self, this):
9040 self.this = this
9041 if not hasattr(self,"thisown"): self.thisown = 0
9042 self.__class__ = GBSpan
9043 _core_.GBSpan_swigregister(GBSpanPtr)
9044
9045 class GBSizerItem(SizerItem):
9046 def __repr__(self):
9047 return "<%s.%s; proxy of C++ wxGBSizerItem instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
9048 def __init__(self, *args, **kwargs):
9049 """__init__(self) -> GBSizerItem"""
9050 newobj = _core_.new_GBSizerItem(*args, **kwargs)
9051 self.this = newobj.this
9052 self.thisown = 1
9053 del newobj.thisown
9054 def GetPos(*args, **kwargs):
9055 """GetPos(self) -> GBPosition"""
9056 return _core_.GBSizerItem_GetPos(*args, **kwargs)
9057
9058 def GetPosTuple(self): return self.GetPos().Get()
9059 def GetSpan(*args, **kwargs):
9060 """GetSpan(self) -> GBSpan"""
9061 return _core_.GBSizerItem_GetSpan(*args, **kwargs)
9062
9063 def GetSpanTuple(self): return self.GetSpan().Get()
9064 def SetPos(*args, **kwargs):
9065 """SetPos(self, GBPosition pos) -> bool"""
9066 return _core_.GBSizerItem_SetPos(*args, **kwargs)
9067
9068 def SetSpan(*args, **kwargs):
9069 """SetSpan(self, GBSpan span) -> bool"""
9070 return _core_.GBSizerItem_SetSpan(*args, **kwargs)
9071
9072 def Intersects(*args):
9073 """
9074 Intersects(self, GBSizerItem other) -> bool
9075 Intersects(self, GBPosition pos, GBSpan span) -> bool
9076 """
9077 return _core_.GBSizerItem_Intersects(*args)
9078
9079 def GetEndPos(*args, **kwargs):
9080 """GetEndPos(self, int row, int col)"""
9081 return _core_.GBSizerItem_GetEndPos(*args, **kwargs)
9082
9083 def GetGBSizer(*args, **kwargs):
9084 """GetGBSizer(self) -> GridBagSizer"""
9085 return _core_.GBSizerItem_GetGBSizer(*args, **kwargs)
9086
9087 def SetGBSizer(*args, **kwargs):
9088 """SetGBSizer(self, GridBagSizer sizer)"""
9089 return _core_.GBSizerItem_SetGBSizer(*args, **kwargs)
9090
9091
9092 class GBSizerItemPtr(GBSizerItem):
9093 def __init__(self, this):
9094 self.this = this
9095 if not hasattr(self,"thisown"): self.thisown = 0
9096 self.__class__ = GBSizerItem
9097 _core_.GBSizerItem_swigregister(GBSizerItemPtr)
9098 DefaultSpan = cvar.DefaultSpan
9099
9100 def GBSizerItemWindow(*args, **kwargs):
9101 """
9102 GBSizerItemWindow(Window window, GBPosition pos, GBSpan span, int flag,
9103 int border, Object userData) -> GBSizerItem
9104 """
9105 val = _core_.new_GBSizerItemWindow(*args, **kwargs)
9106 val.thisown = 1
9107 return val
9108
9109 def GBSizerItemSizer(*args, **kwargs):
9110 """
9111 GBSizerItemSizer(Sizer sizer, GBPosition pos, GBSpan span, int flag,
9112 int border, Object userData) -> GBSizerItem
9113 """
9114 val = _core_.new_GBSizerItemSizer(*args, **kwargs)
9115 val.thisown = 1
9116 return val
9117
9118 def GBSizerItemSpacer(*args, **kwargs):
9119 """
9120 GBSizerItemSpacer(int width, int height, GBPosition pos, GBSpan span,
9121 int flag, int border, Object userData) -> GBSizerItem
9122 """
9123 val = _core_.new_GBSizerItemSpacer(*args, **kwargs)
9124 val.thisown = 1
9125 return val
9126
9127 class GridBagSizer(FlexGridSizer):
9128 def __repr__(self):
9129 return "<%s.%s; proxy of C++ wxGridBagSizer instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
9130 def __init__(self, *args, **kwargs):
9131 """__init__(self, int vgap=0, int hgap=0) -> GridBagSizer"""
9132 newobj = _core_.new_GridBagSizer(*args, **kwargs)
9133 self.this = newobj.this
9134 self.thisown = 1
9135 del newobj.thisown
9136 def Add(*args, **kwargs):
9137 """
9138 Add(self, PyObject item, GBPosition pos, GBSpan span=DefaultSpan,
9139 int flag=0, int border=0, PyObject userData=None) -> bool
9140 """
9141 return _core_.GridBagSizer_Add(*args, **kwargs)
9142
9143 def AddItem(*args, **kwargs):
9144 """AddItem(self, GBSizerItem item) -> bool"""
9145 return _core_.GridBagSizer_AddItem(*args, **kwargs)
9146
9147 def GetEmptyCellSize(*args, **kwargs):
9148 """GetEmptyCellSize(self) -> Size"""
9149 return _core_.GridBagSizer_GetEmptyCellSize(*args, **kwargs)
9150
9151 def SetEmptyCellSize(*args, **kwargs):
9152 """SetEmptyCellSize(self, Size sz)"""
9153 return _core_.GridBagSizer_SetEmptyCellSize(*args, **kwargs)
9154
9155 def GetItemPosition(*args):
9156 """
9157 GetItemPosition(self, Window window) -> GBPosition
9158 GetItemPosition(self, Sizer sizer) -> GBPosition
9159 GetItemPosition(self, size_t index) -> GBPosition
9160 """
9161 return _core_.GridBagSizer_GetItemPosition(*args)
9162
9163 def SetItemPosition(*args):
9164 """
9165 SetItemPosition(self, Window window, GBPosition pos) -> bool
9166 SetItemPosition(self, Sizer sizer, GBPosition pos) -> bool
9167 SetItemPosition(self, size_t index, GBPosition pos) -> bool
9168 """
9169 return _core_.GridBagSizer_SetItemPosition(*args)
9170
9171 def GetItemSpan(*args):
9172 """
9173 GetItemSpan(self, Window window) -> GBSpan
9174 GetItemSpan(self, Sizer sizer) -> GBSpan
9175 GetItemSpan(self, size_t index) -> GBSpan
9176 """
9177 return _core_.GridBagSizer_GetItemSpan(*args)
9178
9179 def SetItemSpan(*args):
9180 """
9181 SetItemSpan(self, Window window, GBSpan span) -> bool
9182 SetItemSpan(self, Sizer sizer, GBSpan span) -> bool
9183 SetItemSpan(self, size_t index, GBSpan span) -> bool
9184 """
9185 return _core_.GridBagSizer_SetItemSpan(*args)
9186
9187 def FindItem(*args):
9188 """
9189 FindItem(self, Window window) -> GBSizerItem
9190 FindItem(self, Sizer sizer) -> GBSizerItem
9191 """
9192 return _core_.GridBagSizer_FindItem(*args)
9193
9194 def FindItemAtPosition(*args, **kwargs):
9195 """FindItemAtPosition(self, GBPosition pos) -> GBSizerItem"""
9196 return _core_.GridBagSizer_FindItemAtPosition(*args, **kwargs)
9197
9198 def FindItemAtPoint(*args, **kwargs):
9199 """FindItemAtPoint(self, Point pt) -> GBSizerItem"""
9200 return _core_.GridBagSizer_FindItemAtPoint(*args, **kwargs)
9201
9202 def FindItemWithData(*args, **kwargs):
9203 """FindItemWithData(self, Object userData) -> GBSizerItem"""
9204 return _core_.GridBagSizer_FindItemWithData(*args, **kwargs)
9205
9206 def RecalcSizes(*args, **kwargs):
9207 """RecalcSizes(self)"""
9208 return _core_.GridBagSizer_RecalcSizes(*args, **kwargs)
9209
9210 def CalcMin(*args, **kwargs):
9211 """CalcMin(self) -> Size"""
9212 return _core_.GridBagSizer_CalcMin(*args, **kwargs)
9213
9214 def CheckForIntersection(*args):
9215 """
9216 CheckForIntersection(self, GBSizerItem item, GBSizerItem excludeItem=None) -> bool
9217 CheckForIntersection(self, GBPosition pos, GBSpan span, GBSizerItem excludeItem=None) -> bool
9218 """
9219 return _core_.GridBagSizer_CheckForIntersection(*args)
9220
9221
9222 class GridBagSizerPtr(GridBagSizer):
9223 def __init__(self, this):
9224 self.this = this
9225 if not hasattr(self,"thisown"): self.thisown = 0
9226 self.__class__ = GridBagSizer
9227 _core_.GridBagSizer_swigregister(GridBagSizerPtr)
9228
9229 #---------------------------------------------------------------------------
9230
9231 Left = _core_.Left
9232 Top = _core_.Top
9233 Right = _core_.Right
9234 Bottom = _core_.Bottom
9235 Width = _core_.Width
9236 Height = _core_.Height
9237 Centre = _core_.Centre
9238 Center = _core_.Center
9239 CentreX = _core_.CentreX
9240 CentreY = _core_.CentreY
9241 Unconstrained = _core_.Unconstrained
9242 AsIs = _core_.AsIs
9243 PercentOf = _core_.PercentOf
9244 Above = _core_.Above
9245 Below = _core_.Below
9246 LeftOf = _core_.LeftOf
9247 RightOf = _core_.RightOf
9248 SameAs = _core_.SameAs
9249 Absolute = _core_.Absolute
9250 class IndividualLayoutConstraint(Object):
9251 """
9252 Objects of this class are stored in the wx.LayoutConstraint class as one of
9253 eight possible constraints that a window can be involved in. You will never
9254 need to create an instance of wx.IndividualLayoutConstraint, rather you should
9255 use create a wx.LayoutContstraints instance and use the individual contstraints
9256 that it contains.
9257
9258 Constraints are initially set to have the relationship wx.Unconstrained, which
9259 means that their values should be calculated by looking at known constraints.
9260
9261 The Edge specifies the type of edge or dimension of a window.
9262
9263 Edges
9264
9265 wx.Left The left edge.
9266 wx.Top The top edge.
9267 wx.Right The right edge.
9268 wx.Bottom The bottom edge.
9269 wx.CentreX The x-coordinate of the centre of the window.
9270 wx.CentreY The y-coordinate of the centre of the window.
9271
9272
9273 The Relationship specifies the relationship that this edge or dimension has
9274 with another specified edge or dimension. Normally, the user doesn't use these
9275 directly because functions such as Below and RightOf are a convenience for
9276 using the more general Set function.
9277
9278 Relationships
9279
9280 wx.Unconstrained The edge or dimension is unconstrained
9281 (the default for edges.)
9282 wx.AsIs The edge or dimension is to be taken from the current
9283 window position or size (the default for dimensions.)
9284 wx.Above The edge should be above another edge.
9285 wx.Below The edge should be below another edge.
9286 wx.LeftOf The edge should be to the left of another edge.
9287 wx.RightOf The edge should be to the right of another edge.
9288 wx.SameAs The edge or dimension should be the same as another edge
9289 or dimension.
9290 wx.PercentOf The edge or dimension should be a percentage of another
9291 edge or dimension.
9292 wx.Absolute The edge or dimension should be a given absolute value.
9293
9294
9295 """
9296 def __init__(self): raise RuntimeError, "No constructor defined"
9297 def __repr__(self):
9298 return "<%s.%s; proxy of C++ wxIndividualLayoutConstraint instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
9299 def Set(*args, **kwargs):
9300 """Set(self, int rel, Window otherW, int otherE, int val=0, int marg=wxLAYOUT_DEFAULT_MARGIN)"""
9301 return _core_.IndividualLayoutConstraint_Set(*args, **kwargs)
9302
9303 def LeftOf(*args, **kwargs):
9304 """
9305 LeftOf(self, Window sibling, int marg=0)
9306
9307 Sibling relationship
9308 """
9309 return _core_.IndividualLayoutConstraint_LeftOf(*args, **kwargs)
9310
9311 def RightOf(*args, **kwargs):
9312 """
9313 RightOf(self, Window sibling, int marg=0)
9314
9315 Sibling relationship
9316 """
9317 return _core_.IndividualLayoutConstraint_RightOf(*args, **kwargs)
9318
9319 def Above(*args, **kwargs):
9320 """
9321 Above(self, Window sibling, int marg=0)
9322
9323 Sibling relationship
9324 """
9325 return _core_.IndividualLayoutConstraint_Above(*args, **kwargs)
9326
9327 def Below(*args, **kwargs):
9328 """
9329 Below(self, Window sibling, int marg=0)
9330
9331 Sibling relationship
9332 """
9333 return _core_.IndividualLayoutConstraint_Below(*args, **kwargs)
9334
9335 def SameAs(*args, **kwargs):
9336 """
9337 SameAs(self, Window otherW, int edge, int marg=0)
9338
9339 'Same edge' alignment
9340 """
9341 return _core_.IndividualLayoutConstraint_SameAs(*args, **kwargs)
9342
9343 def PercentOf(*args, **kwargs):
9344 """
9345 PercentOf(self, Window otherW, int wh, int per)
9346
9347 The edge is a percentage of the other window's edge
9348 """
9349 return _core_.IndividualLayoutConstraint_PercentOf(*args, **kwargs)
9350
9351 def Absolute(*args, **kwargs):
9352 """
9353 Absolute(self, int val)
9354
9355 Edge has absolute value
9356 """
9357 return _core_.IndividualLayoutConstraint_Absolute(*args, **kwargs)
9358
9359 def Unconstrained(*args, **kwargs):
9360 """
9361 Unconstrained(self)
9362
9363 Dimension is unconstrained
9364 """
9365 return _core_.IndividualLayoutConstraint_Unconstrained(*args, **kwargs)
9366
9367 def AsIs(*args, **kwargs):
9368 """
9369 AsIs(self)
9370
9371 Dimension is 'as is' (use current size settings)
9372 """
9373 return _core_.IndividualLayoutConstraint_AsIs(*args, **kwargs)
9374
9375 def GetOtherWindow(*args, **kwargs):
9376 """GetOtherWindow(self) -> Window"""
9377 return _core_.IndividualLayoutConstraint_GetOtherWindow(*args, **kwargs)
9378
9379 def GetMyEdge(*args, **kwargs):
9380 """GetMyEdge(self) -> int"""
9381 return _core_.IndividualLayoutConstraint_GetMyEdge(*args, **kwargs)
9382
9383 def SetEdge(*args, **kwargs):
9384 """SetEdge(self, int which)"""
9385 return _core_.IndividualLayoutConstraint_SetEdge(*args, **kwargs)
9386
9387 def SetValue(*args, **kwargs):
9388 """SetValue(self, int v)"""
9389 return _core_.IndividualLayoutConstraint_SetValue(*args, **kwargs)
9390
9391 def GetMargin(*args, **kwargs):
9392 """GetMargin(self) -> int"""
9393 return _core_.IndividualLayoutConstraint_GetMargin(*args, **kwargs)
9394
9395 def SetMargin(*args, **kwargs):
9396 """SetMargin(self, int m)"""
9397 return _core_.IndividualLayoutConstraint_SetMargin(*args, **kwargs)
9398
9399 def GetValue(*args, **kwargs):
9400 """GetValue(self) -> int"""
9401 return _core_.IndividualLayoutConstraint_GetValue(*args, **kwargs)
9402
9403 def GetPercent(*args, **kwargs):
9404 """GetPercent(self) -> int"""
9405 return _core_.IndividualLayoutConstraint_GetPercent(*args, **kwargs)
9406
9407 def GetOtherEdge(*args, **kwargs):
9408 """GetOtherEdge(self) -> int"""
9409 return _core_.IndividualLayoutConstraint_GetOtherEdge(*args, **kwargs)
9410
9411 def GetDone(*args, **kwargs):
9412 """GetDone(self) -> bool"""
9413 return _core_.IndividualLayoutConstraint_GetDone(*args, **kwargs)
9414
9415 def SetDone(*args, **kwargs):
9416 """SetDone(self, bool d)"""
9417 return _core_.IndividualLayoutConstraint_SetDone(*args, **kwargs)
9418
9419 def GetRelationship(*args, **kwargs):
9420 """GetRelationship(self) -> int"""
9421 return _core_.IndividualLayoutConstraint_GetRelationship(*args, **kwargs)
9422
9423 def SetRelationship(*args, **kwargs):
9424 """SetRelationship(self, int r)"""
9425 return _core_.IndividualLayoutConstraint_SetRelationship(*args, **kwargs)
9426
9427 def ResetIfWin(*args, **kwargs):
9428 """
9429 ResetIfWin(self, Window otherW) -> bool
9430
9431 Reset constraint if it mentions otherWin
9432 """
9433 return _core_.IndividualLayoutConstraint_ResetIfWin(*args, **kwargs)
9434
9435 def SatisfyConstraint(*args, **kwargs):
9436 """
9437 SatisfyConstraint(self, LayoutConstraints constraints, Window win) -> bool
9438
9439 Try to satisfy constraint
9440 """
9441 return _core_.IndividualLayoutConstraint_SatisfyConstraint(*args, **kwargs)
9442
9443 def GetEdge(*args, **kwargs):
9444 """
9445 GetEdge(self, int which, Window thisWin, Window other) -> int
9446
9447 Get the value of this edge or dimension, or if this
9448 is not determinable, -1.
9449 """
9450 return _core_.IndividualLayoutConstraint_GetEdge(*args, **kwargs)
9451
9452
9453 class IndividualLayoutConstraintPtr(IndividualLayoutConstraint):
9454 def __init__(self, this):
9455 self.this = this
9456 if not hasattr(self,"thisown"): self.thisown = 0
9457 self.__class__ = IndividualLayoutConstraint
9458 _core_.IndividualLayoutConstraint_swigregister(IndividualLayoutConstraintPtr)
9459
9460 class LayoutConstraints(Object):
9461 """
9462 Note: constraints are now deprecated and you should use sizers instead.
9463
9464 Objects of this class can be associated with a window to define its layout
9465 constraints, with respect to siblings or its parent.
9466
9467 The class consists of the following eight constraints of class
9468 wx.IndividualLayoutConstraint, some or all of which should be accessed
9469 directly to set the appropriate constraints.
9470
9471 * left: represents the left hand edge of the window
9472 * right: represents the right hand edge of the window
9473 * top: represents the top edge of the window
9474 * bottom: represents the bottom edge of the window
9475 * width: represents the width of the window
9476 * height: represents the height of the window
9477 * centreX: represents the horizontal centre point of the window
9478 * centreY: represents the vertical centre point of the window
9479
9480 Most constraints are initially set to have the relationship wxUnconstrained,
9481 which means that their values should be calculated by looking at known
9482 constraints. The exceptions are width and height, which are set to wxAsIs to
9483 ensure that if the user does not specify a constraint, the existing width and
9484 height will be used, to be compatible with panel items which often have take a
9485 default size. If the constraint is wxAsIs, the dimension will not be changed.
9486
9487 """
9488 def __repr__(self):
9489 return "<%s.%s; proxy of C++ wxLayoutConstraints instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
9490 left = property(_core_.LayoutConstraints_left_get)
9491 top = property(_core_.LayoutConstraints_top_get)
9492 right = property(_core_.LayoutConstraints_right_get)
9493 bottom = property(_core_.LayoutConstraints_bottom_get)
9494 width = property(_core_.LayoutConstraints_width_get)
9495 height = property(_core_.LayoutConstraints_height_get)
9496 centreX = property(_core_.LayoutConstraints_centreX_get)
9497 centreY = property(_core_.LayoutConstraints_centreY_get)
9498 def __init__(self, *args, **kwargs):
9499 """__init__(self) -> LayoutConstraints"""
9500 newobj = _core_.new_LayoutConstraints(*args, **kwargs)
9501 self.this = newobj.this
9502 self.thisown = 1
9503 del newobj.thisown
9504 def SatisfyConstraints(*args, **kwargs):
9505 """SatisfyConstraints(Window win) -> (areSatisfied, noChanges)"""
9506 return _core_.LayoutConstraints_SatisfyConstraints(*args, **kwargs)
9507
9508 def AreSatisfied(*args, **kwargs):
9509 """AreSatisfied(self) -> bool"""
9510 return _core_.LayoutConstraints_AreSatisfied(*args, **kwargs)
9511
9512
9513 class LayoutConstraintsPtr(LayoutConstraints):
9514 def __init__(self, this):
9515 self.this = this
9516 if not hasattr(self,"thisown"): self.thisown = 0
9517 self.__class__ = LayoutConstraints
9518 _core_.LayoutConstraints_swigregister(LayoutConstraintsPtr)
9519
9520 #----------------------------------------------------------------------------
9521
9522 # Use Python's bool constants if available, make some if not
9523 try:
9524 True
9525 except NameError:
9526 __builtins__.True = 1==1
9527 __builtins__.False = 1==0
9528 def bool(value): return not not value
9529 __builtins__.bool = bool
9530
9531
9532
9533 # workarounds for bad wxRTTI names
9534 __wxPyPtrTypeMap['wxGauge95'] = 'wxGauge'
9535 __wxPyPtrTypeMap['wxSlider95'] = 'wxSlider'
9536 __wxPyPtrTypeMap['wxStatusBar95'] = 'wxStatusBar'
9537
9538
9539 #----------------------------------------------------------------------------
9540 # Load version numbers from __version__... Ensure that major and minor
9541 # versions are the same for both wxPython and wxWindows.
9542
9543 from __version__ import *
9544 __version__ = VERSION_STRING
9545
9546 assert MAJOR_VERSION == _core_.MAJOR_VERSION, "wxPython/wxWindows version mismatch"
9547 assert MINOR_VERSION == _core_.MINOR_VERSION, "wxPython/wxWindows version mismatch"
9548 if RELEASE_VERSION != _core_.RELEASE_VERSION:
9549 import warnings
9550 warnings.warn("wxPython/wxWindows release number mismatch")
9551
9552 #----------------------------------------------------------------------------
9553
9554 class PyDeadObjectError(AttributeError):
9555 pass
9556
9557 class _wxPyDeadObject(object):
9558 """
9559 Instances of wx objects that are OOR capable will have their __class__
9560 changed to this class when the C++ object is deleted. This should help
9561 prevent crashes due to referencing a bogus C++ pointer.
9562 """
9563 reprStr = "wxPython wrapper for DELETED %s object! (The C++ object no longer exists.)"
9564 attrStr = "The C++ part of the %s object has been deleted, attribute access no longer allowed."
9565
9566 def __repr__(self):
9567 if not hasattr(self, "_name"):
9568 self._name = "[unknown]"
9569 return self.reprStr % self._name
9570
9571 def __getattr__(self, *args):
9572 if not hasattr(self, "_name"):
9573 self._name = "[unknown]"
9574 raise PyDeadObjectError(self.attrStr % self._name)
9575
9576 def __nonzero__(self):
9577 return 0
9578
9579
9580
9581 class PyUnbornObjectError(AttributeError):
9582 pass
9583
9584 class _wxPyUnbornObject(object):
9585 """
9586 Some stock objects are created when the wx._core module is
9587 imported, but their C++ instance is not created until the wx.App
9588 object is created and initialized. These object instances will
9589 temporarily have their __class__ changed to this class so an
9590 exception will be raised if they are used before the C++ instance
9591 is ready.
9592 """
9593
9594 reprStr = "wxPython wrapper for UNBORN object! (The C++ object is not initialized yet.)"
9595 attrStr = "The C++ part of this object has not been initialized, attribute access not allowed."
9596
9597 def __repr__(self):
9598 #if not hasattr(self, "_name"):
9599 # self._name = "[unknown]"
9600 return self.reprStr #% self._name
9601
9602 def __getattr__(self, *args):
9603 #if not hasattr(self, "_name"):
9604 # self._name = "[unknown]"
9605 raise PyUnbornObjectError(self.attrStr) # % self._name )
9606
9607 def __nonzero__(self):
9608 return 0
9609
9610
9611 #----------------------------------------------------------------------------
9612 _wxPyCallAfterId = None
9613
9614 def CallAfter(callable, *args, **kw):
9615 """
9616 Call the specified function after the current and pending event
9617 handlers have been completed. This is also good for making GUI
9618 method calls from non-GUI threads.
9619 """
9620 app = wx.GetApp()
9621 assert app, 'No wxApp created yet'
9622
9623 global _wxPyCallAfterId
9624 if _wxPyCallAfterId is None:
9625 _wxPyCallAfterId = wx.NewEventType()
9626 app.Connect(-1, -1, _wxPyCallAfterId,
9627 lambda event: event.callable(*event.args, **event.kw) )
9628 evt = wx.PyEvent()
9629 evt.SetEventType(_wxPyCallAfterId)
9630 evt.callable = callable
9631 evt.args = args
9632 evt.kw = kw
9633 wx.PostEvent(app, evt)
9634
9635
9636 #----------------------------------------------------------------------------
9637
9638
9639 class FutureCall:
9640 """
9641 A convenience class for wx.Timer, that calls the given callable
9642 object once after the given amount of milliseconds, passing any
9643 positional or keyword args. The return value of the callable is
9644 availbale after it has been run with the GetResult method.
9645
9646 If you don't need to get the return value or restart the timer
9647 then there is no need to hold a reference to this object. It will
9648 hold a reference to itself while the timer is running (the timer
9649 has a reference to self.Notify) but the cycle will be broken when
9650 the timer completes, automatically cleaning up the wx.FutureCall
9651 object.
9652 """
9653 def __init__(self, millis, callable, *args, **kwargs):
9654 self.millis = millis
9655 self.callable = callable
9656 self.SetArgs(*args, **kwargs)
9657 self.runCount = 0
9658 self.running = False
9659 self.hasRun = False
9660 self.result = None
9661 self.timer = None
9662 self.Start()
9663
9664 def __del__(self):
9665 self.Stop()
9666
9667
9668 def Start(self, millis=None, *args, **kwargs):
9669 """
9670 (Re)start the timer
9671 """
9672 self.hasRun = False
9673 if millis is not None:
9674 self.millis = millis
9675 if args or kwargs:
9676 self.SetArgs(*args, **kwargs)
9677 self.Stop()
9678 self.timer = wx.PyTimer(self.Notify)
9679 self.timer.Start(self.millis, wx.TIMER_ONE_SHOT)
9680 self.running = True
9681 Restart = Start
9682
9683
9684 def Stop(self):
9685 """
9686 Stop and destroy the timer.
9687 """
9688 if self.timer is not None:
9689 self.timer.Stop()
9690 self.timer = None
9691
9692
9693 def GetInterval(self):
9694 if self.timer is not None:
9695 return self.timer.GetInterval()
9696 else:
9697 return 0
9698
9699
9700 def IsRunning(self):
9701 return self.timer is not None and self.timer.IsRunning()
9702
9703
9704 def SetArgs(self, *args, **kwargs):
9705 """
9706 (Re)set the args passed to the callable object. This is
9707 useful in conjunction with Restart if you want to schedule a
9708 new call to the same callable object but with different
9709 parameters.
9710 """
9711 self.args = args
9712 self.kwargs = kwargs
9713
9714
9715 def HasRun(self):
9716 return self.hasRun
9717
9718 def GetResult(self):
9719 return self.result
9720
9721 def Notify(self):
9722 """
9723 The timer has expired so call the callable.
9724 """
9725 if self.callable and getattr(self.callable, 'im_self', True):
9726 self.runCount += 1
9727 self.running = False
9728 self.result = self.callable(*self.args, **self.kwargs)
9729 self.hasRun = True
9730 if not self.running:
9731 # if it wasn't restarted, then cleanup
9732 wx.CallAfter(self.Stop)
9733
9734
9735
9736 #----------------------------------------------------------------------------
9737 # Control which items in this module should be documented by epydoc.
9738 # We allow only classes and functions, which will help reduce the size
9739 # of the docs by filtering out the zillions of constants, EVT objects,
9740 # and etc that don't make much sense by themselves, but are instead
9741 # documented (or will be) as part of the classes/functions/methods
9742 # where they should be used.
9743
9744 def __docfilter__(name):
9745 import types
9746 obj = globals().get(name, None)
9747 if type(obj) not in [type, types.ClassType, types.FunctionType, types.BuiltinFunctionType]:
9748 return False
9749 if name.startswith('_') or name.endswith('Ptr') or name.startswith('EVT'):
9750 return False
9751 return True
9752
9753 #----------------------------------------------------------------------------
9754 #----------------------------------------------------------------------------
9755
9756 # Import other modules in this package that should show up in the
9757 # "core" wx namespace
9758 from _gdi import *
9759 from _windows import *
9760 from _controls import *
9761 from _misc import *
9762
9763
9764 # Fixup the stock objects since they can't be used yet. (They will be
9765 # restored in wx.PyApp.OnInit.)
9766 _core_._wxPyFixStockObjects()
9767
9768 #----------------------------------------------------------------------------
9769 #----------------------------------------------------------------------------
9770
9771