]> git.saurik.com Git - wxWidgets.git/blame - wxPython/src/msw/core.py
reSWIGged
[wxWidgets.git] / wxPython / src / msw / core.py
CommitLineData
d14a1e28
RD
1# This file was created automatically by SWIG.
2# Don't modify this file, modify the SWIG interface instead.
3
4import _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.
12import sys as _sys
13wx = _sys.modules[__name__]
14
15NOT_FOUND = _core.NOT_FOUND
16VSCROLL = _core.VSCROLL
17HSCROLL = _core.HSCROLL
18CAPTION = _core.CAPTION
19DOUBLE_BORDER = _core.DOUBLE_BORDER
20SUNKEN_BORDER = _core.SUNKEN_BORDER
21RAISED_BORDER = _core.RAISED_BORDER
22BORDER = _core.BORDER
23SIMPLE_BORDER = _core.SIMPLE_BORDER
24STATIC_BORDER = _core.STATIC_BORDER
25TRANSPARENT_WINDOW = _core.TRANSPARENT_WINDOW
26NO_BORDER = _core.NO_BORDER
27USER_COLOURS = _core.USER_COLOURS
28NO_3D = _core.NO_3D
29TAB_TRAVERSAL = _core.TAB_TRAVERSAL
30WANTS_CHARS = _core.WANTS_CHARS
31POPUP_WINDOW = _core.POPUP_WINDOW
32CENTER_FRAME = _core.CENTER_FRAME
33CENTRE_ON_SCREEN = _core.CENTRE_ON_SCREEN
34CENTER_ON_SCREEN = _core.CENTER_ON_SCREEN
35STAY_ON_TOP = _core.STAY_ON_TOP
36ICONIZE = _core.ICONIZE
37MINIMIZE = _core.MINIMIZE
38MAXIMIZE = _core.MAXIMIZE
39CLOSE_BOX = _core.CLOSE_BOX
40THICK_FRAME = _core.THICK_FRAME
41SYSTEM_MENU = _core.SYSTEM_MENU
42MINIMIZE_BOX = _core.MINIMIZE_BOX
43MAXIMIZE_BOX = _core.MAXIMIZE_BOX
44TINY_CAPTION_HORIZ = _core.TINY_CAPTION_HORIZ
45TINY_CAPTION_VERT = _core.TINY_CAPTION_VERT
46RESIZE_BOX = _core.RESIZE_BOX
47RESIZE_BORDER = _core.RESIZE_BORDER
48DIALOG_MODAL = _core.DIALOG_MODAL
49DIALOG_MODELESS = _core.DIALOG_MODELESS
50DIALOG_NO_PARENT = _core.DIALOG_NO_PARENT
51DEFAULT_FRAME_STYLE = _core.DEFAULT_FRAME_STYLE
52DEFAULT_DIALOG_STYLE = _core.DEFAULT_DIALOG_STYLE
53FRAME_TOOL_WINDOW = _core.FRAME_TOOL_WINDOW
54FRAME_FLOAT_ON_PARENT = _core.FRAME_FLOAT_ON_PARENT
55FRAME_NO_WINDOW_MENU = _core.FRAME_NO_WINDOW_MENU
56FRAME_NO_TASKBAR = _core.FRAME_NO_TASKBAR
57FRAME_SHAPED = _core.FRAME_SHAPED
58ED_CLIENT_MARGIN = _core.ED_CLIENT_MARGIN
59ED_BUTTONS_BOTTOM = _core.ED_BUTTONS_BOTTOM
60ED_BUTTONS_RIGHT = _core.ED_BUTTONS_RIGHT
61ED_STATIC_LINE = _core.ED_STATIC_LINE
62EXT_DIALOG_STYLE = _core.EXT_DIALOG_STYLE
63CLIP_CHILDREN = _core.CLIP_CHILDREN
64CLIP_SIBLINGS = _core.CLIP_SIBLINGS
65RETAINED = _core.RETAINED
66BACKINGSTORE = _core.BACKINGSTORE
67COLOURED = _core.COLOURED
68FIXED_LENGTH = _core.FIXED_LENGTH
69LB_NEEDED_SB = _core.LB_NEEDED_SB
70LB_ALWAYS_SB = _core.LB_ALWAYS_SB
71LB_SORT = _core.LB_SORT
72LB_SINGLE = _core.LB_SINGLE
73LB_MULTIPLE = _core.LB_MULTIPLE
74LB_EXTENDED = _core.LB_EXTENDED
75LB_OWNERDRAW = _core.LB_OWNERDRAW
76LB_HSCROLL = _core.LB_HSCROLL
77PROCESS_ENTER = _core.PROCESS_ENTER
78PASSWORD = _core.PASSWORD
79CB_SIMPLE = _core.CB_SIMPLE
80CB_DROPDOWN = _core.CB_DROPDOWN
81CB_SORT = _core.CB_SORT
82CB_READONLY = _core.CB_READONLY
83RA_HORIZONTAL = _core.RA_HORIZONTAL
84RA_VERTICAL = _core.RA_VERTICAL
85RA_SPECIFY_ROWS = _core.RA_SPECIFY_ROWS
86RA_SPECIFY_COLS = _core.RA_SPECIFY_COLS
87RB_GROUP = _core.RB_GROUP
88RB_SINGLE = _core.RB_SINGLE
89SL_HORIZONTAL = _core.SL_HORIZONTAL
90SL_VERTICAL = _core.SL_VERTICAL
91SL_AUTOTICKS = _core.SL_AUTOTICKS
92SL_LABELS = _core.SL_LABELS
93SL_LEFT = _core.SL_LEFT
94SL_TOP = _core.SL_TOP
95SL_RIGHT = _core.SL_RIGHT
96SL_BOTTOM = _core.SL_BOTTOM
97SL_BOTH = _core.SL_BOTH
98SL_SELRANGE = _core.SL_SELRANGE
99SB_HORIZONTAL = _core.SB_HORIZONTAL
100SB_VERTICAL = _core.SB_VERTICAL
101ST_SIZEGRIP = _core.ST_SIZEGRIP
102ST_NO_AUTORESIZE = _core.ST_NO_AUTORESIZE
103FLOOD_SURFACE = _core.FLOOD_SURFACE
104FLOOD_BORDER = _core.FLOOD_BORDER
105ODDEVEN_RULE = _core.ODDEVEN_RULE
106WINDING_RULE = _core.WINDING_RULE
107TOOL_TOP = _core.TOOL_TOP
108TOOL_BOTTOM = _core.TOOL_BOTTOM
109TOOL_LEFT = _core.TOOL_LEFT
110TOOL_RIGHT = _core.TOOL_RIGHT
111OK = _core.OK
112YES_NO = _core.YES_NO
113CANCEL = _core.CANCEL
114YES = _core.YES
115NO = _core.NO
116NO_DEFAULT = _core.NO_DEFAULT
117YES_DEFAULT = _core.YES_DEFAULT
118ICON_EXCLAMATION = _core.ICON_EXCLAMATION
119ICON_HAND = _core.ICON_HAND
120ICON_QUESTION = _core.ICON_QUESTION
121ICON_INFORMATION = _core.ICON_INFORMATION
122ICON_STOP = _core.ICON_STOP
123ICON_ASTERISK = _core.ICON_ASTERISK
124ICON_MASK = _core.ICON_MASK
125ICON_WARNING = _core.ICON_WARNING
126ICON_ERROR = _core.ICON_ERROR
127FORWARD = _core.FORWARD
128BACKWARD = _core.BACKWARD
129RESET = _core.RESET
130HELP = _core.HELP
131MORE = _core.MORE
132SETUP = _core.SETUP
133SIZE_AUTO_WIDTH = _core.SIZE_AUTO_WIDTH
134SIZE_AUTO_HEIGHT = _core.SIZE_AUTO_HEIGHT
135SIZE_AUTO = _core.SIZE_AUTO
136SIZE_USE_EXISTING = _core.SIZE_USE_EXISTING
137SIZE_ALLOW_MINUS_ONE = _core.SIZE_ALLOW_MINUS_ONE
138PORTRAIT = _core.PORTRAIT
139LANDSCAPE = _core.LANDSCAPE
140PRINT_QUALITY_HIGH = _core.PRINT_QUALITY_HIGH
141PRINT_QUALITY_MEDIUM = _core.PRINT_QUALITY_MEDIUM
142PRINT_QUALITY_LOW = _core.PRINT_QUALITY_LOW
143PRINT_QUALITY_DRAFT = _core.PRINT_QUALITY_DRAFT
144ID_ANY = _core.ID_ANY
145ID_SEPARATOR = _core.ID_SEPARATOR
146ID_LOWEST = _core.ID_LOWEST
147ID_OPEN = _core.ID_OPEN
148ID_CLOSE = _core.ID_CLOSE
149ID_NEW = _core.ID_NEW
150ID_SAVE = _core.ID_SAVE
151ID_SAVEAS = _core.ID_SAVEAS
152ID_REVERT = _core.ID_REVERT
153ID_EXIT = _core.ID_EXIT
154ID_UNDO = _core.ID_UNDO
155ID_REDO = _core.ID_REDO
156ID_HELP = _core.ID_HELP
157ID_PRINT = _core.ID_PRINT
158ID_PRINT_SETUP = _core.ID_PRINT_SETUP
159ID_PREVIEW = _core.ID_PREVIEW
160ID_ABOUT = _core.ID_ABOUT
161ID_HELP_CONTENTS = _core.ID_HELP_CONTENTS
162ID_HELP_COMMANDS = _core.ID_HELP_COMMANDS
163ID_HELP_PROCEDURES = _core.ID_HELP_PROCEDURES
164ID_HELP_CONTEXT = _core.ID_HELP_CONTEXT
165ID_CLOSE_ALL = _core.ID_CLOSE_ALL
166ID_PREFERENCES = _core.ID_PREFERENCES
167ID_CUT = _core.ID_CUT
168ID_COPY = _core.ID_COPY
169ID_PASTE = _core.ID_PASTE
170ID_CLEAR = _core.ID_CLEAR
171ID_FIND = _core.ID_FIND
172ID_DUPLICATE = _core.ID_DUPLICATE
173ID_SELECTALL = _core.ID_SELECTALL
174ID_DELETE = _core.ID_DELETE
175ID_REPLACE = _core.ID_REPLACE
176ID_REPLACE_ALL = _core.ID_REPLACE_ALL
177ID_PROPERTIES = _core.ID_PROPERTIES
178ID_VIEW_DETAILS = _core.ID_VIEW_DETAILS
179ID_VIEW_LARGEICONS = _core.ID_VIEW_LARGEICONS
180ID_VIEW_SMALLICONS = _core.ID_VIEW_SMALLICONS
181ID_VIEW_LIST = _core.ID_VIEW_LIST
182ID_VIEW_SORTDATE = _core.ID_VIEW_SORTDATE
183ID_VIEW_SORTNAME = _core.ID_VIEW_SORTNAME
184ID_VIEW_SORTSIZE = _core.ID_VIEW_SORTSIZE
185ID_VIEW_SORTTYPE = _core.ID_VIEW_SORTTYPE
186ID_FILE1 = _core.ID_FILE1
187ID_FILE2 = _core.ID_FILE2
188ID_FILE3 = _core.ID_FILE3
189ID_FILE4 = _core.ID_FILE4
190ID_FILE5 = _core.ID_FILE5
191ID_FILE6 = _core.ID_FILE6
192ID_FILE7 = _core.ID_FILE7
193ID_FILE8 = _core.ID_FILE8
194ID_FILE9 = _core.ID_FILE9
195ID_OK = _core.ID_OK
196ID_CANCEL = _core.ID_CANCEL
197ID_APPLY = _core.ID_APPLY
198ID_YES = _core.ID_YES
199ID_NO = _core.ID_NO
200ID_STATIC = _core.ID_STATIC
201ID_FORWARD = _core.ID_FORWARD
202ID_BACKWARD = _core.ID_BACKWARD
203ID_DEFAULT = _core.ID_DEFAULT
204ID_MORE = _core.ID_MORE
205ID_SETUP = _core.ID_SETUP
206ID_RESET = _core.ID_RESET
207ID_CONTEXT_HELP = _core.ID_CONTEXT_HELP
208ID_YESTOALL = _core.ID_YESTOALL
209ID_NOTOALL = _core.ID_NOTOALL
210ID_ABORT = _core.ID_ABORT
211ID_RETRY = _core.ID_RETRY
212ID_IGNORE = _core.ID_IGNORE
213ID_HIGHEST = _core.ID_HIGHEST
214OPEN = _core.OPEN
215SAVE = _core.SAVE
216HIDE_READONLY = _core.HIDE_READONLY
217OVERWRITE_PROMPT = _core.OVERWRITE_PROMPT
218FILE_MUST_EXIST = _core.FILE_MUST_EXIST
219MULTIPLE = _core.MULTIPLE
220CHANGE_DIR = _core.CHANGE_DIR
221ACCEL_ALT = _core.ACCEL_ALT
222ACCEL_CTRL = _core.ACCEL_CTRL
223ACCEL_SHIFT = _core.ACCEL_SHIFT
224ACCEL_NORMAL = _core.ACCEL_NORMAL
225PD_AUTO_HIDE = _core.PD_AUTO_HIDE
226PD_APP_MODAL = _core.PD_APP_MODAL
227PD_CAN_ABORT = _core.PD_CAN_ABORT
228PD_ELAPSED_TIME = _core.PD_ELAPSED_TIME
229PD_ESTIMATED_TIME = _core.PD_ESTIMATED_TIME
230PD_REMAINING_TIME = _core.PD_REMAINING_TIME
231DD_NEW_DIR_BUTTON = _core.DD_NEW_DIR_BUTTON
232DD_DEFAULT_STYLE = _core.DD_DEFAULT_STYLE
233MENU_TEAROFF = _core.MENU_TEAROFF
234MB_DOCKABLE = _core.MB_DOCKABLE
235NO_FULL_REPAINT_ON_RESIZE = _core.NO_FULL_REPAINT_ON_RESIZE
236LI_HORIZONTAL = _core.LI_HORIZONTAL
237LI_VERTICAL = _core.LI_VERTICAL
238WS_EX_VALIDATE_RECURSIVELY = _core.WS_EX_VALIDATE_RECURSIVELY
239WS_EX_BLOCK_EVENTS = _core.WS_EX_BLOCK_EVENTS
240WS_EX_TRANSIENT = _core.WS_EX_TRANSIENT
241WS_EX_THEMED_BACKGROUND = _core.WS_EX_THEMED_BACKGROUND
242WS_EX_PROCESS_IDLE = _core.WS_EX_PROCESS_IDLE
243WS_EX_PROCESS_UI_UPDATES = _core.WS_EX_PROCESS_UI_UPDATES
244MM_TEXT = _core.MM_TEXT
245MM_LOMETRIC = _core.MM_LOMETRIC
246MM_HIMETRIC = _core.MM_HIMETRIC
247MM_LOENGLISH = _core.MM_LOENGLISH
248MM_HIENGLISH = _core.MM_HIENGLISH
249MM_TWIPS = _core.MM_TWIPS
250MM_ISOTROPIC = _core.MM_ISOTROPIC
251MM_ANISOTROPIC = _core.MM_ANISOTROPIC
252MM_POINTS = _core.MM_POINTS
253MM_METRIC = _core.MM_METRIC
254CENTRE = _core.CENTRE
255CENTER = _core.CENTER
256HORIZONTAL = _core.HORIZONTAL
257VERTICAL = _core.VERTICAL
258BOTH = _core.BOTH
259LEFT = _core.LEFT
260RIGHT = _core.RIGHT
261UP = _core.UP
262DOWN = _core.DOWN
263TOP = _core.TOP
264BOTTOM = _core.BOTTOM
265NORTH = _core.NORTH
266SOUTH = _core.SOUTH
267WEST = _core.WEST
268EAST = _core.EAST
269ALL = _core.ALL
270ALIGN_NOT = _core.ALIGN_NOT
271ALIGN_CENTER_HORIZONTAL = _core.ALIGN_CENTER_HORIZONTAL
272ALIGN_CENTRE_HORIZONTAL = _core.ALIGN_CENTRE_HORIZONTAL
273ALIGN_LEFT = _core.ALIGN_LEFT
274ALIGN_TOP = _core.ALIGN_TOP
275ALIGN_RIGHT = _core.ALIGN_RIGHT
276ALIGN_BOTTOM = _core.ALIGN_BOTTOM
277ALIGN_CENTER_VERTICAL = _core.ALIGN_CENTER_VERTICAL
278ALIGN_CENTRE_VERTICAL = _core.ALIGN_CENTRE_VERTICAL
279ALIGN_CENTER = _core.ALIGN_CENTER
280ALIGN_CENTRE = _core.ALIGN_CENTRE
281ALIGN_MASK = _core.ALIGN_MASK
282STRETCH_NOT = _core.STRETCH_NOT
283SHRINK = _core.SHRINK
284GROW = _core.GROW
285EXPAND = _core.EXPAND
286SHAPED = _core.SHAPED
287ADJUST_MINSIZE = _core.ADJUST_MINSIZE
288TILE = _core.TILE
289BORDER_DEFAULT = _core.BORDER_DEFAULT
290BORDER_NONE = _core.BORDER_NONE
291BORDER_STATIC = _core.BORDER_STATIC
292BORDER_SIMPLE = _core.BORDER_SIMPLE
293BORDER_RAISED = _core.BORDER_RAISED
294BORDER_SUNKEN = _core.BORDER_SUNKEN
295BORDER_DOUBLE = _core.BORDER_DOUBLE
296BORDER_MASK = _core.BORDER_MASK
297DEFAULT = _core.DEFAULT
298DECORATIVE = _core.DECORATIVE
299ROMAN = _core.ROMAN
300SCRIPT = _core.SCRIPT
301SWISS = _core.SWISS
302MODERN = _core.MODERN
303TELETYPE = _core.TELETYPE
304VARIABLE = _core.VARIABLE
305FIXED = _core.FIXED
306NORMAL = _core.NORMAL
307LIGHT = _core.LIGHT
308BOLD = _core.BOLD
309ITALIC = _core.ITALIC
310SLANT = _core.SLANT
311SOLID = _core.SOLID
312DOT = _core.DOT
313LONG_DASH = _core.LONG_DASH
314SHORT_DASH = _core.SHORT_DASH
315DOT_DASH = _core.DOT_DASH
316USER_DASH = _core.USER_DASH
317TRANSPARENT = _core.TRANSPARENT
318STIPPLE = _core.STIPPLE
319BDIAGONAL_HATCH = _core.BDIAGONAL_HATCH
320CROSSDIAG_HATCH = _core.CROSSDIAG_HATCH
321FDIAGONAL_HATCH = _core.FDIAGONAL_HATCH
322CROSS_HATCH = _core.CROSS_HATCH
323HORIZONTAL_HATCH = _core.HORIZONTAL_HATCH
324VERTICAL_HATCH = _core.VERTICAL_HATCH
325JOIN_BEVEL = _core.JOIN_BEVEL
326JOIN_MITER = _core.JOIN_MITER
327JOIN_ROUND = _core.JOIN_ROUND
328CAP_ROUND = _core.CAP_ROUND
329CAP_PROJECTING = _core.CAP_PROJECTING
330CAP_BUTT = _core.CAP_BUTT
331CLEAR = _core.CLEAR
332XOR = _core.XOR
333INVERT = _core.INVERT
334OR_REVERSE = _core.OR_REVERSE
335AND_REVERSE = _core.AND_REVERSE
336COPY = _core.COPY
337AND = _core.AND
338AND_INVERT = _core.AND_INVERT
339NO_OP = _core.NO_OP
340NOR = _core.NOR
341EQUIV = _core.EQUIV
342SRC_INVERT = _core.SRC_INVERT
343OR_INVERT = _core.OR_INVERT
344NAND = _core.NAND
345OR = _core.OR
346SET = _core.SET
347WXK_BACK = _core.WXK_BACK
348WXK_TAB = _core.WXK_TAB
349WXK_RETURN = _core.WXK_RETURN
350WXK_ESCAPE = _core.WXK_ESCAPE
351WXK_SPACE = _core.WXK_SPACE
352WXK_DELETE = _core.WXK_DELETE
353WXK_START = _core.WXK_START
354WXK_LBUTTON = _core.WXK_LBUTTON
355WXK_RBUTTON = _core.WXK_RBUTTON
356WXK_CANCEL = _core.WXK_CANCEL
357WXK_MBUTTON = _core.WXK_MBUTTON
358WXK_CLEAR = _core.WXK_CLEAR
359WXK_SHIFT = _core.WXK_SHIFT
360WXK_ALT = _core.WXK_ALT
361WXK_CONTROL = _core.WXK_CONTROL
362WXK_MENU = _core.WXK_MENU
363WXK_PAUSE = _core.WXK_PAUSE
364WXK_CAPITAL = _core.WXK_CAPITAL
365WXK_PRIOR = _core.WXK_PRIOR
366WXK_NEXT = _core.WXK_NEXT
367WXK_END = _core.WXK_END
368WXK_HOME = _core.WXK_HOME
369WXK_LEFT = _core.WXK_LEFT
370WXK_UP = _core.WXK_UP
371WXK_RIGHT = _core.WXK_RIGHT
372WXK_DOWN = _core.WXK_DOWN
373WXK_SELECT = _core.WXK_SELECT
374WXK_PRINT = _core.WXK_PRINT
375WXK_EXECUTE = _core.WXK_EXECUTE
376WXK_SNAPSHOT = _core.WXK_SNAPSHOT
377WXK_INSERT = _core.WXK_INSERT
378WXK_HELP = _core.WXK_HELP
379WXK_NUMPAD0 = _core.WXK_NUMPAD0
380WXK_NUMPAD1 = _core.WXK_NUMPAD1
381WXK_NUMPAD2 = _core.WXK_NUMPAD2
382WXK_NUMPAD3 = _core.WXK_NUMPAD3
383WXK_NUMPAD4 = _core.WXK_NUMPAD4
384WXK_NUMPAD5 = _core.WXK_NUMPAD5
385WXK_NUMPAD6 = _core.WXK_NUMPAD6
386WXK_NUMPAD7 = _core.WXK_NUMPAD7
387WXK_NUMPAD8 = _core.WXK_NUMPAD8
388WXK_NUMPAD9 = _core.WXK_NUMPAD9
389WXK_MULTIPLY = _core.WXK_MULTIPLY
390WXK_ADD = _core.WXK_ADD
391WXK_SEPARATOR = _core.WXK_SEPARATOR
392WXK_SUBTRACT = _core.WXK_SUBTRACT
393WXK_DECIMAL = _core.WXK_DECIMAL
394WXK_DIVIDE = _core.WXK_DIVIDE
395WXK_F1 = _core.WXK_F1
396WXK_F2 = _core.WXK_F2
397WXK_F3 = _core.WXK_F3
398WXK_F4 = _core.WXK_F4
399WXK_F5 = _core.WXK_F5
400WXK_F6 = _core.WXK_F6
401WXK_F7 = _core.WXK_F7
402WXK_F8 = _core.WXK_F8
403WXK_F9 = _core.WXK_F9
404WXK_F10 = _core.WXK_F10
405WXK_F11 = _core.WXK_F11
406WXK_F12 = _core.WXK_F12
407WXK_F13 = _core.WXK_F13
408WXK_F14 = _core.WXK_F14
409WXK_F15 = _core.WXK_F15
410WXK_F16 = _core.WXK_F16
411WXK_F17 = _core.WXK_F17
412WXK_F18 = _core.WXK_F18
413WXK_F19 = _core.WXK_F19
414WXK_F20 = _core.WXK_F20
415WXK_F21 = _core.WXK_F21
416WXK_F22 = _core.WXK_F22
417WXK_F23 = _core.WXK_F23
418WXK_F24 = _core.WXK_F24
419WXK_NUMLOCK = _core.WXK_NUMLOCK
420WXK_SCROLL = _core.WXK_SCROLL
421WXK_PAGEUP = _core.WXK_PAGEUP
422WXK_PAGEDOWN = _core.WXK_PAGEDOWN
423WXK_NUMPAD_SPACE = _core.WXK_NUMPAD_SPACE
424WXK_NUMPAD_TAB = _core.WXK_NUMPAD_TAB
425WXK_NUMPAD_ENTER = _core.WXK_NUMPAD_ENTER
426WXK_NUMPAD_F1 = _core.WXK_NUMPAD_F1
427WXK_NUMPAD_F2 = _core.WXK_NUMPAD_F2
428WXK_NUMPAD_F3 = _core.WXK_NUMPAD_F3
429WXK_NUMPAD_F4 = _core.WXK_NUMPAD_F4
430WXK_NUMPAD_HOME = _core.WXK_NUMPAD_HOME
431WXK_NUMPAD_LEFT = _core.WXK_NUMPAD_LEFT
432WXK_NUMPAD_UP = _core.WXK_NUMPAD_UP
433WXK_NUMPAD_RIGHT = _core.WXK_NUMPAD_RIGHT
434WXK_NUMPAD_DOWN = _core.WXK_NUMPAD_DOWN
435WXK_NUMPAD_PRIOR = _core.WXK_NUMPAD_PRIOR
436WXK_NUMPAD_PAGEUP = _core.WXK_NUMPAD_PAGEUP
437WXK_NUMPAD_NEXT = _core.WXK_NUMPAD_NEXT
438WXK_NUMPAD_PAGEDOWN = _core.WXK_NUMPAD_PAGEDOWN
439WXK_NUMPAD_END = _core.WXK_NUMPAD_END
440WXK_NUMPAD_BEGIN = _core.WXK_NUMPAD_BEGIN
441WXK_NUMPAD_INSERT = _core.WXK_NUMPAD_INSERT
442WXK_NUMPAD_DELETE = _core.WXK_NUMPAD_DELETE
443WXK_NUMPAD_EQUAL = _core.WXK_NUMPAD_EQUAL
444WXK_NUMPAD_MULTIPLY = _core.WXK_NUMPAD_MULTIPLY
445WXK_NUMPAD_ADD = _core.WXK_NUMPAD_ADD
446WXK_NUMPAD_SEPARATOR = _core.WXK_NUMPAD_SEPARATOR
447WXK_NUMPAD_SUBTRACT = _core.WXK_NUMPAD_SUBTRACT
448WXK_NUMPAD_DECIMAL = _core.WXK_NUMPAD_DECIMAL
449WXK_NUMPAD_DIVIDE = _core.WXK_NUMPAD_DIVIDE
450WXK_WINDOWS_LEFT = _core.WXK_WINDOWS_LEFT
451WXK_WINDOWS_RIGHT = _core.WXK_WINDOWS_RIGHT
452WXK_WINDOWS_MENU = _core.WXK_WINDOWS_MENU
453PAPER_NONE = _core.PAPER_NONE
454PAPER_LETTER = _core.PAPER_LETTER
455PAPER_LEGAL = _core.PAPER_LEGAL
456PAPER_A4 = _core.PAPER_A4
457PAPER_CSHEET = _core.PAPER_CSHEET
458PAPER_DSHEET = _core.PAPER_DSHEET
459PAPER_ESHEET = _core.PAPER_ESHEET
460PAPER_LETTERSMALL = _core.PAPER_LETTERSMALL
461PAPER_TABLOID = _core.PAPER_TABLOID
462PAPER_LEDGER = _core.PAPER_LEDGER
463PAPER_STATEMENT = _core.PAPER_STATEMENT
464PAPER_EXECUTIVE = _core.PAPER_EXECUTIVE
465PAPER_A3 = _core.PAPER_A3
466PAPER_A4SMALL = _core.PAPER_A4SMALL
467PAPER_A5 = _core.PAPER_A5
468PAPER_B4 = _core.PAPER_B4
469PAPER_B5 = _core.PAPER_B5
470PAPER_FOLIO = _core.PAPER_FOLIO
471PAPER_QUARTO = _core.PAPER_QUARTO
472PAPER_10X14 = _core.PAPER_10X14
473PAPER_11X17 = _core.PAPER_11X17
474PAPER_NOTE = _core.PAPER_NOTE
475PAPER_ENV_9 = _core.PAPER_ENV_9
476PAPER_ENV_10 = _core.PAPER_ENV_10
477PAPER_ENV_11 = _core.PAPER_ENV_11
478PAPER_ENV_12 = _core.PAPER_ENV_12
479PAPER_ENV_14 = _core.PAPER_ENV_14
480PAPER_ENV_DL = _core.PAPER_ENV_DL
481PAPER_ENV_C5 = _core.PAPER_ENV_C5
482PAPER_ENV_C3 = _core.PAPER_ENV_C3
483PAPER_ENV_C4 = _core.PAPER_ENV_C4
484PAPER_ENV_C6 = _core.PAPER_ENV_C6
485PAPER_ENV_C65 = _core.PAPER_ENV_C65
486PAPER_ENV_B4 = _core.PAPER_ENV_B4
487PAPER_ENV_B5 = _core.PAPER_ENV_B5
488PAPER_ENV_B6 = _core.PAPER_ENV_B6
489PAPER_ENV_ITALY = _core.PAPER_ENV_ITALY
490PAPER_ENV_MONARCH = _core.PAPER_ENV_MONARCH
491PAPER_ENV_PERSONAL = _core.PAPER_ENV_PERSONAL
492PAPER_FANFOLD_US = _core.PAPER_FANFOLD_US
493PAPER_FANFOLD_STD_GERMAN = _core.PAPER_FANFOLD_STD_GERMAN
494PAPER_FANFOLD_LGL_GERMAN = _core.PAPER_FANFOLD_LGL_GERMAN
495PAPER_ISO_B4 = _core.PAPER_ISO_B4
496PAPER_JAPANESE_POSTCARD = _core.PAPER_JAPANESE_POSTCARD
497PAPER_9X11 = _core.PAPER_9X11
498PAPER_10X11 = _core.PAPER_10X11
499PAPER_15X11 = _core.PAPER_15X11
500PAPER_ENV_INVITE = _core.PAPER_ENV_INVITE
501PAPER_LETTER_EXTRA = _core.PAPER_LETTER_EXTRA
502PAPER_LEGAL_EXTRA = _core.PAPER_LEGAL_EXTRA
503PAPER_TABLOID_EXTRA = _core.PAPER_TABLOID_EXTRA
504PAPER_A4_EXTRA = _core.PAPER_A4_EXTRA
505PAPER_LETTER_TRANSVERSE = _core.PAPER_LETTER_TRANSVERSE
506PAPER_A4_TRANSVERSE = _core.PAPER_A4_TRANSVERSE
507PAPER_LETTER_EXTRA_TRANSVERSE = _core.PAPER_LETTER_EXTRA_TRANSVERSE
508PAPER_A_PLUS = _core.PAPER_A_PLUS
509PAPER_B_PLUS = _core.PAPER_B_PLUS
510PAPER_LETTER_PLUS = _core.PAPER_LETTER_PLUS
511PAPER_A4_PLUS = _core.PAPER_A4_PLUS
512PAPER_A5_TRANSVERSE = _core.PAPER_A5_TRANSVERSE
513PAPER_B5_TRANSVERSE = _core.PAPER_B5_TRANSVERSE
514PAPER_A3_EXTRA = _core.PAPER_A3_EXTRA
515PAPER_A5_EXTRA = _core.PAPER_A5_EXTRA
516PAPER_B5_EXTRA = _core.PAPER_B5_EXTRA
517PAPER_A2 = _core.PAPER_A2
518PAPER_A3_TRANSVERSE = _core.PAPER_A3_TRANSVERSE
519PAPER_A3_EXTRA_TRANSVERSE = _core.PAPER_A3_EXTRA_TRANSVERSE
520DUPLEX_SIMPLEX = _core.DUPLEX_SIMPLEX
521DUPLEX_HORIZONTAL = _core.DUPLEX_HORIZONTAL
522DUPLEX_VERTICAL = _core.DUPLEX_VERTICAL
523ITEM_SEPARATOR = _core.ITEM_SEPARATOR
524ITEM_NORMAL = _core.ITEM_NORMAL
525ITEM_CHECK = _core.ITEM_CHECK
526ITEM_RADIO = _core.ITEM_RADIO
527ITEM_MAX = _core.ITEM_MAX
528HT_NOWHERE = _core.HT_NOWHERE
529HT_SCROLLBAR_FIRST = _core.HT_SCROLLBAR_FIRST
530HT_SCROLLBAR_ARROW_LINE_1 = _core.HT_SCROLLBAR_ARROW_LINE_1
531HT_SCROLLBAR_ARROW_LINE_2 = _core.HT_SCROLLBAR_ARROW_LINE_2
532HT_SCROLLBAR_ARROW_PAGE_1 = _core.HT_SCROLLBAR_ARROW_PAGE_1
533HT_SCROLLBAR_ARROW_PAGE_2 = _core.HT_SCROLLBAR_ARROW_PAGE_2
534HT_SCROLLBAR_THUMB = _core.HT_SCROLLBAR_THUMB
535HT_SCROLLBAR_BAR_1 = _core.HT_SCROLLBAR_BAR_1
536HT_SCROLLBAR_BAR_2 = _core.HT_SCROLLBAR_BAR_2
537HT_SCROLLBAR_LAST = _core.HT_SCROLLBAR_LAST
538HT_WINDOW_OUTSIDE = _core.HT_WINDOW_OUTSIDE
539HT_WINDOW_INSIDE = _core.HT_WINDOW_INSIDE
540HT_WINDOW_VERT_SCROLLBAR = _core.HT_WINDOW_VERT_SCROLLBAR
541HT_WINDOW_HORZ_SCROLLBAR = _core.HT_WINDOW_HORZ_SCROLLBAR
542HT_WINDOW_CORNER = _core.HT_WINDOW_CORNER
543HT_MAX = _core.HT_MAX
544MOD_NONE = _core.MOD_NONE
545MOD_ALT = _core.MOD_ALT
546MOD_CONTROL = _core.MOD_CONTROL
547MOD_SHIFT = _core.MOD_SHIFT
548MOD_WIN = _core.MOD_WIN
549UPDATE_UI_NONE = _core.UPDATE_UI_NONE
550UPDATE_UI_RECURSE = _core.UPDATE_UI_RECURSE
551UPDATE_UI_FROMIDLE = _core.UPDATE_UI_FROMIDLE
552#---------------------------------------------------------------------------
553
554class Object(object):
555 def GetClassName(*args, **kwargs): return _core.Object_GetClassName(*args, **kwargs)
556 def Destroy(*args, **kwargs): return _core.Object_Destroy(*args, **kwargs)
557 def __init__(self): raise RuntimeError, "No constructor defined"
558 def __repr__(self):
559 return "<%s.%s; proxy of C++ wxObject instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
560
561class ObjectPtr(Object):
562 def __init__(self, this):
563 self.this = this
564 if not hasattr(self,"thisown"): self.thisown = 0
565 self.__class__ = Object
566_core.Object_swigregister(ObjectPtr)
567_wxPySetDictionary = _core._wxPySetDictionary
568
569
570#---------------------------------------------------------------------------
571
572BITMAP_TYPE_INVALID = _core.BITMAP_TYPE_INVALID
573BITMAP_TYPE_BMP = _core.BITMAP_TYPE_BMP
574BITMAP_TYPE_BMP_RESOURCE = _core.BITMAP_TYPE_BMP_RESOURCE
575BITMAP_TYPE_RESOURCE = _core.BITMAP_TYPE_RESOURCE
576BITMAP_TYPE_ICO = _core.BITMAP_TYPE_ICO
577BITMAP_TYPE_ICO_RESOURCE = _core.BITMAP_TYPE_ICO_RESOURCE
578BITMAP_TYPE_CUR = _core.BITMAP_TYPE_CUR
579BITMAP_TYPE_CUR_RESOURCE = _core.BITMAP_TYPE_CUR_RESOURCE
580BITMAP_TYPE_XBM = _core.BITMAP_TYPE_XBM
581BITMAP_TYPE_XBM_DATA = _core.BITMAP_TYPE_XBM_DATA
582BITMAP_TYPE_XPM = _core.BITMAP_TYPE_XPM
583BITMAP_TYPE_XPM_DATA = _core.BITMAP_TYPE_XPM_DATA
584BITMAP_TYPE_TIF = _core.BITMAP_TYPE_TIF
585BITMAP_TYPE_TIF_RESOURCE = _core.BITMAP_TYPE_TIF_RESOURCE
586BITMAP_TYPE_GIF = _core.BITMAP_TYPE_GIF
587BITMAP_TYPE_GIF_RESOURCE = _core.BITMAP_TYPE_GIF_RESOURCE
588BITMAP_TYPE_PNG = _core.BITMAP_TYPE_PNG
589BITMAP_TYPE_PNG_RESOURCE = _core.BITMAP_TYPE_PNG_RESOURCE
590BITMAP_TYPE_JPEG = _core.BITMAP_TYPE_JPEG
591BITMAP_TYPE_JPEG_RESOURCE = _core.BITMAP_TYPE_JPEG_RESOURCE
592BITMAP_TYPE_PNM = _core.BITMAP_TYPE_PNM
593BITMAP_TYPE_PNM_RESOURCE = _core.BITMAP_TYPE_PNM_RESOURCE
594BITMAP_TYPE_PCX = _core.BITMAP_TYPE_PCX
595BITMAP_TYPE_PCX_RESOURCE = _core.BITMAP_TYPE_PCX_RESOURCE
596BITMAP_TYPE_PICT = _core.BITMAP_TYPE_PICT
597BITMAP_TYPE_PICT_RESOURCE = _core.BITMAP_TYPE_PICT_RESOURCE
598BITMAP_TYPE_ICON = _core.BITMAP_TYPE_ICON
599BITMAP_TYPE_ICON_RESOURCE = _core.BITMAP_TYPE_ICON_RESOURCE
600BITMAP_TYPE_ANI = _core.BITMAP_TYPE_ANI
601BITMAP_TYPE_IFF = _core.BITMAP_TYPE_IFF
602BITMAP_TYPE_MACCURSOR = _core.BITMAP_TYPE_MACCURSOR
603BITMAP_TYPE_MACCURSOR_RESOURCE = _core.BITMAP_TYPE_MACCURSOR_RESOURCE
604BITMAP_TYPE_ANY = _core.BITMAP_TYPE_ANY
605CURSOR_NONE = _core.CURSOR_NONE
606CURSOR_ARROW = _core.CURSOR_ARROW
607CURSOR_RIGHT_ARROW = _core.CURSOR_RIGHT_ARROW
608CURSOR_BULLSEYE = _core.CURSOR_BULLSEYE
609CURSOR_CHAR = _core.CURSOR_CHAR
610CURSOR_CROSS = _core.CURSOR_CROSS
611CURSOR_HAND = _core.CURSOR_HAND
612CURSOR_IBEAM = _core.CURSOR_IBEAM
613CURSOR_LEFT_BUTTON = _core.CURSOR_LEFT_BUTTON
614CURSOR_MAGNIFIER = _core.CURSOR_MAGNIFIER
615CURSOR_MIDDLE_BUTTON = _core.CURSOR_MIDDLE_BUTTON
616CURSOR_NO_ENTRY = _core.CURSOR_NO_ENTRY
617CURSOR_PAINT_BRUSH = _core.CURSOR_PAINT_BRUSH
618CURSOR_PENCIL = _core.CURSOR_PENCIL
619CURSOR_POINT_LEFT = _core.CURSOR_POINT_LEFT
620CURSOR_POINT_RIGHT = _core.CURSOR_POINT_RIGHT
621CURSOR_QUESTION_ARROW = _core.CURSOR_QUESTION_ARROW
622CURSOR_RIGHT_BUTTON = _core.CURSOR_RIGHT_BUTTON
623CURSOR_SIZENESW = _core.CURSOR_SIZENESW
624CURSOR_SIZENS = _core.CURSOR_SIZENS
625CURSOR_SIZENWSE = _core.CURSOR_SIZENWSE
626CURSOR_SIZEWE = _core.CURSOR_SIZEWE
627CURSOR_SIZING = _core.CURSOR_SIZING
628CURSOR_SPRAYCAN = _core.CURSOR_SPRAYCAN
629CURSOR_WAIT = _core.CURSOR_WAIT
630CURSOR_WATCH = _core.CURSOR_WATCH
631CURSOR_BLANK = _core.CURSOR_BLANK
632CURSOR_DEFAULT = _core.CURSOR_DEFAULT
633CURSOR_COPY_ARROW = _core.CURSOR_COPY_ARROW
634CURSOR_ARROWWAIT = _core.CURSOR_ARROWWAIT
635CURSOR_MAX = _core.CURSOR_MAX
636#---------------------------------------------------------------------------
637
638class Size(object):
639 width = property(_core.Size_width_get, _core.Size_width_set)
640 height = property(_core.Size_height_get, _core.Size_height_set)
641 def __init__(self, *args, **kwargs):
642 newobj = _core.new_Size(*args, **kwargs)
643 self.this = newobj.this
644 self.thisown = 1
645 del newobj.thisown
646 def __del__(self, destroy=_core.delete_Size):
647 try:
648 if self.thisown: destroy(self)
649 except: pass
650 def __eq__(*args, **kwargs): return _core.Size___eq__(*args, **kwargs)
651 def __ne__(*args, **kwargs): return _core.Size___ne__(*args, **kwargs)
652 def __add__(*args, **kwargs): return _core.Size___add__(*args, **kwargs)
653 def __sub__(*args, **kwargs): return _core.Size___sub__(*args, **kwargs)
654 def IncTo(*args, **kwargs): return _core.Size_IncTo(*args, **kwargs)
655 def DecTo(*args, **kwargs): return _core.Size_DecTo(*args, **kwargs)
656 def Set(*args, **kwargs): return _core.Size_Set(*args, **kwargs)
657 def SetWidth(*args, **kwargs): return _core.Size_SetWidth(*args, **kwargs)
658 def SetHeight(*args, **kwargs): return _core.Size_SetHeight(*args, **kwargs)
659 def GetWidth(*args, **kwargs): return _core.Size_GetWidth(*args, **kwargs)
660 def GetHeight(*args, **kwargs): return _core.Size_GetHeight(*args, **kwargs)
661 def GetX(*args, **kwargs): return _core.Size_GetX(*args, **kwargs)
662 def GetY(*args, **kwargs): return _core.Size_GetY(*args, **kwargs)
663 def asTuple(*args, **kwargs): return _core.Size_asTuple(*args, **kwargs)
664 def __str__(self): return str(self.asTuple())
665 def __repr__(self): return 'wxSize'+str(self.asTuple())
666 def __len__(self): return len(self.asTuple())
667 def __getitem__(self, index): return self.asTuple()[index]
668 def __setitem__(self, index, val):
669 if index == 0: self.width = val
670 elif index == 1: self.height = val
671 else: raise IndexError
672 def __nonzero__(self): return self.asTuple() != (0,0)
673 def __getinitargs__(self): return ()
674 def __getstate__(self): return self.asTuple()
675 def __setstate__(self, state): self.Set(*state)
676
677
678class SizePtr(Size):
679 def __init__(self, this):
680 self.this = this
681 if not hasattr(self,"thisown"): self.thisown = 0
682 self.__class__ = Size
683_core.Size_swigregister(SizePtr)
684
685#---------------------------------------------------------------------------
686
687class RealPoint(object):
688 x = property(_core.RealPoint_x_get, _core.RealPoint_x_set)
689 y = property(_core.RealPoint_y_get, _core.RealPoint_y_set)
690 def __init__(self, *args, **kwargs):
691 newobj = _core.new_RealPoint(*args, **kwargs)
692 self.this = newobj.this
693 self.thisown = 1
694 del newobj.thisown
695 def __del__(self, destroy=_core.delete_RealPoint):
696 try:
697 if self.thisown: destroy(self)
698 except: pass
699 def __add__(*args, **kwargs): return _core.RealPoint___add__(*args, **kwargs)
700 def __sub__(*args, **kwargs): return _core.RealPoint___sub__(*args, **kwargs)
701 def __eq__(*args, **kwargs): return _core.RealPoint___eq__(*args, **kwargs)
702 def __ne__(*args, **kwargs): return _core.RealPoint___ne__(*args, **kwargs)
703 def Set(*args, **kwargs): return _core.RealPoint_Set(*args, **kwargs)
704 def asTuple(*args, **kwargs): return _core.RealPoint_asTuple(*args, **kwargs)
705 def __str__(self): return str(self.asTuple())
706 def __repr__(self): return 'wxRealPoint'+str(self.asTuple())
707 def __len__(self): return len(self.asTuple())
708 def __getitem__(self, index): return self.asTuple()[index]
709 def __setitem__(self, index, val):
710 if index == 0: self.width = val
711 elif index == 1: self.height = val
712 else: raise IndexError
713 def __nonzero__(self): return self.asTuple() != (0.0, 0.0)
714 def __getinitargs__(self): return ()
715 def __getstate__(self): return self.asTuple()
716 def __setstate__(self, state): self.Set(*state)
717
718
719class RealPointPtr(RealPoint):
720 def __init__(self, this):
721 self.this = this
722 if not hasattr(self,"thisown"): self.thisown = 0
723 self.__class__ = RealPoint
724_core.RealPoint_swigregister(RealPointPtr)
725
726#---------------------------------------------------------------------------
727
728class Point(object):
729 x = property(_core.Point_x_get, _core.Point_x_set)
730 y = property(_core.Point_y_get, _core.Point_y_set)
731 def __init__(self, *args, **kwargs):
732 newobj = _core.new_Point(*args, **kwargs)
733 self.this = newobj.this
734 self.thisown = 1
735 del newobj.thisown
736 def __del__(self, destroy=_core.delete_Point):
737 try:
738 if self.thisown: destroy(self)
739 except: pass
740 def __eq__(*args, **kwargs): return _core.Point___eq__(*args, **kwargs)
741 def __ne__(*args, **kwargs): return _core.Point___ne__(*args, **kwargs)
742 def __add__(*args, **kwargs): return _core.Point___add__(*args, **kwargs)
743 def __sub__(*args, **kwargs): return _core.Point___sub__(*args, **kwargs)
744 def __iadd__(*args, **kwargs): return _core.Point___iadd__(*args, **kwargs)
745 def __isub__(*args, **kwargs): return _core.Point___isub__(*args, **kwargs)
746 def Set(*args, **kwargs): return _core.Point_Set(*args, **kwargs)
747 def asTuple(*args, **kwargs): return _core.Point_asTuple(*args, **kwargs)
748 def __str__(self): return str(self.asTuple())
749 def __repr__(self): return 'wxPoint'+str(self.asTuple())
750 def __len__(self): return len(self.asTuple())
751 def __getitem__(self, index): return self.asTuple()[index]
752 def __setitem__(self, index, val):
753 if index == 0: self.x = val
754 elif index == 1: self.y = val
755 else: raise IndexError
756 def __nonzero__(self): return self.asTuple() != (0,0)
757 def __getinitargs__(self): return ()
758 def __getstate__(self): return self.asTuple()
759 def __setstate__(self, state): self.Set(*state)
760
761
762class PointPtr(Point):
763 def __init__(self, this):
764 self.this = this
765 if not hasattr(self,"thisown"): self.thisown = 0
766 self.__class__ = Point
767_core.Point_swigregister(PointPtr)
768
769#---------------------------------------------------------------------------
770
771class Rect(object):
772 def __init__(self, *args, **kwargs):
773 newobj = _core.new_Rect(*args, **kwargs)
774 self.this = newobj.this
775 self.thisown = 1
776 del newobj.thisown
777 def __del__(self, destroy=_core.delete_Rect):
778 try:
779 if self.thisown: destroy(self)
780 except: pass
781 def GetX(*args, **kwargs): return _core.Rect_GetX(*args, **kwargs)
782 def SetX(*args, **kwargs): return _core.Rect_SetX(*args, **kwargs)
783 def GetY(*args, **kwargs): return _core.Rect_GetY(*args, **kwargs)
784 def SetY(*args, **kwargs): return _core.Rect_SetY(*args, **kwargs)
785 def GetWidth(*args, **kwargs): return _core.Rect_GetWidth(*args, **kwargs)
786 def SetWidth(*args, **kwargs): return _core.Rect_SetWidth(*args, **kwargs)
787 def GetHeight(*args, **kwargs): return _core.Rect_GetHeight(*args, **kwargs)
788 def SetHeight(*args, **kwargs): return _core.Rect_SetHeight(*args, **kwargs)
789 def GetPosition(*args, **kwargs): return _core.Rect_GetPosition(*args, **kwargs)
790 def SetPosition(*args, **kwargs): return _core.Rect_SetPosition(*args, **kwargs)
791 def GetSize(*args, **kwargs): return _core.Rect_GetSize(*args, **kwargs)
792 def SetSize(*args, **kwargs): return _core.Rect_SetSize(*args, **kwargs)
793 def GetLeft(*args, **kwargs): return _core.Rect_GetLeft(*args, **kwargs)
794 def GetTop(*args, **kwargs): return _core.Rect_GetTop(*args, **kwargs)
795 def GetBottom(*args, **kwargs): return _core.Rect_GetBottom(*args, **kwargs)
796 def GetRight(*args, **kwargs): return _core.Rect_GetRight(*args, **kwargs)
797 def SetLeft(*args, **kwargs): return _core.Rect_SetLeft(*args, **kwargs)
798 def SetRight(*args, **kwargs): return _core.Rect_SetRight(*args, **kwargs)
799 def SetTop(*args, **kwargs): return _core.Rect_SetTop(*args, **kwargs)
800 def SetBottom(*args, **kwargs): return _core.Rect_SetBottom(*args, **kwargs)
801 def Inflate(*args, **kwargs): return _core.Rect_Inflate(*args, **kwargs)
802 def Deflate(*args, **kwargs): return _core.Rect_Deflate(*args, **kwargs)
803 def OffsetXY(*args, **kwargs): return _core.Rect_OffsetXY(*args, **kwargs)
804 def Offset(*args, **kwargs): return _core.Rect_Offset(*args, **kwargs)
805 def Intersect(*args, **kwargs): return _core.Rect_Intersect(*args, **kwargs)
806 def __add__(*args, **kwargs): return _core.Rect___add__(*args, **kwargs)
807 def __iadd__(*args, **kwargs): return _core.Rect___iadd__(*args, **kwargs)
808 def __eq__(*args, **kwargs): return _core.Rect___eq__(*args, **kwargs)
809 def __ne__(*args, **kwargs): return _core.Rect___ne__(*args, **kwargs)
810 def InsideXY(*args, **kwargs): return _core.Rect_InsideXY(*args, **kwargs)
811 def Inside(*args, **kwargs): return _core.Rect_Inside(*args, **kwargs)
812 def Intersects(*args, **kwargs): return _core.Rect_Intersects(*args, **kwargs)
813 x = property(_core.Rect_x_get, _core.Rect_x_set)
814 y = property(_core.Rect_y_get, _core.Rect_y_set)
815 width = property(_core.Rect_width_get, _core.Rect_width_set)
816 height = property(_core.Rect_height_get, _core.Rect_height_set)
817 def Set(*args, **kwargs): return _core.Rect_Set(*args, **kwargs)
818 def asTuple(*args, **kwargs): return _core.Rect_asTuple(*args, **kwargs)
819 def __str__(self): return str(self.asTuple())
820 def __repr__(self): return 'wxRect'+str(self.asTuple())
821 def __len__(self): return len(self.asTuple())
822 def __getitem__(self, index): return self.asTuple()[index]
823 def __setitem__(self, index, val):
824 if index == 0: self.x = val
825 elif index == 1: self.y = val
826 elif index == 2: self.width = val
827 elif index == 3: self.height = val
828 else: raise IndexError
829 def __nonzero__(self): return self.asTuple() != (0,0,0,0)
830 def __getinitargs__(self): return ()
831 def __getstate__(self): return self.asTuple()
832 def __setstate__(self, state): self.Set(*state)
833
834
835class RectPtr(Rect):
836 def __init__(self, this):
837 self.this = this
838 if not hasattr(self,"thisown"): self.thisown = 0
839 self.__class__ = Rect
840_core.Rect_swigregister(RectPtr)
841
842def RectPP(*args, **kwargs):
843 val = _core.new_RectPP(*args, **kwargs)
844 val.thisown = 1
845 return val
846
847def RectPS(*args, **kwargs):
848 val = _core.new_RectPS(*args, **kwargs)
849 val.thisown = 1
850 return val
851
852
853IntersectRect = _core.IntersectRect
854#---------------------------------------------------------------------------
855
856class Point2D(object):
857 def __init__(self, *args, **kwargs):
858 newobj = _core.new_Point2D(*args, **kwargs)
859 self.this = newobj.this
860 self.thisown = 1
861 del newobj.thisown
862 def GetFloor(*args, **kwargs): return _core.Point2D_GetFloor(*args, **kwargs)
863 def GetRounded(*args, **kwargs): return _core.Point2D_GetRounded(*args, **kwargs)
864 def GetVectorLength(*args, **kwargs): return _core.Point2D_GetVectorLength(*args, **kwargs)
865 def GetVectorAngle(*args, **kwargs): return _core.Point2D_GetVectorAngle(*args, **kwargs)
866 def SetVectorLength(*args, **kwargs): return _core.Point2D_SetVectorLength(*args, **kwargs)
867 def SetVectorAngle(*args, **kwargs): return _core.Point2D_SetVectorAngle(*args, **kwargs)
868 def SetPolarCoordinates(self, angle, length):
869 self.SetVectorLength(length)
870 self.SetVectorAngle(angle)
871 def Normalize(self):
872 self.SetVectorLength(1.0)
873
874 def GetDistance(*args, **kwargs): return _core.Point2D_GetDistance(*args, **kwargs)
875 def GetDistanceSquare(*args, **kwargs): return _core.Point2D_GetDistanceSquare(*args, **kwargs)
876 def GetDotProduct(*args, **kwargs): return _core.Point2D_GetDotProduct(*args, **kwargs)
877 def GetCrossProduct(*args, **kwargs): return _core.Point2D_GetCrossProduct(*args, **kwargs)
878 def __neg__(*args, **kwargs): return _core.Point2D___neg__(*args, **kwargs)
879 def __iadd__(*args, **kwargs): return _core.Point2D___iadd__(*args, **kwargs)
880 def __isub__(*args, **kwargs): return _core.Point2D___isub__(*args, **kwargs)
881 def __imul__(*args, **kwargs): return _core.Point2D___imul__(*args, **kwargs)
882 def __idiv__(*args, **kwargs): return _core.Point2D___idiv__(*args, **kwargs)
883 def __eq__(*args, **kwargs): return _core.Point2D___eq__(*args, **kwargs)
884 def __ne__(*args, **kwargs): return _core.Point2D___ne__(*args, **kwargs)
885 m_x = property(_core.Point2D_m_x_get, _core.Point2D_m_x_set)
886 m_y = property(_core.Point2D_m_y_get, _core.Point2D_m_y_set)
887 x = property(_core.Point2D_x_get, _core.Point2D_x_set)
888 y = property(_core.Point2D_y_get, _core.Point2D_y_set)
889 def Set(*args, **kwargs): return _core.Point2D_Set(*args, **kwargs)
890 def asTuple(*args, **kwargs): return _core.Point2D_asTuple(*args, **kwargs)
891 def __str__(self): return str(self.asTuple())
892 def __repr__(self): return 'wxPoint2D'+str(self.asTuple())
893 def __len__(self): return len(self.asTuple())
894 def __getitem__(self, index): return self.asTuple()[index]
895 def __setitem__(self, index, val):
896 if index == 0: self.m_x = val
897 elif index == 1: self.m_yt = val
898 else: raise IndexError
899 def __nonzero__(self): return self.asTuple() != (0.0, 0.0)
900 def __getinitargs__(self): return ()
901 def __getstate__(self): return self.asTuple()
902 def __setstate__(self, state): self.Set(*state)
903
904
905
906class Point2DPtr(Point2D):
907 def __init__(self, this):
908 self.this = this
909 if not hasattr(self,"thisown"): self.thisown = 0
910 self.__class__ = Point2D
911_core.Point2D_swigregister(Point2DPtr)
912
913def Point2DCopy(*args, **kwargs):
914 val = _core.new_Point2DCopy(*args, **kwargs)
915 val.thisown = 1
916 return val
917
918def Point2DFromPoint(*args, **kwargs):
919 val = _core.new_Point2DFromPoint(*args, **kwargs)
920 val.thisown = 1
921 return val
922
923#---------------------------------------------------------------------------
924
925FromStart = _core.FromStart
926FromCurrent = _core.FromCurrent
927FromEnd = _core.FromEnd
928class InputStream(object):
929 def __init__(self, *args, **kwargs):
930 newobj = _core.new_InputStream(*args, **kwargs)
931 self.this = newobj.this
932 self.thisown = 1
933 del newobj.thisown
934 def close(*args, **kwargs): return _core.InputStream_close(*args, **kwargs)
935 def flush(*args, **kwargs): return _core.InputStream_flush(*args, **kwargs)
936 def eof(*args, **kwargs): return _core.InputStream_eof(*args, **kwargs)
937 def read(*args, **kwargs): return _core.InputStream_read(*args, **kwargs)
938 def readline(*args, **kwargs): return _core.InputStream_readline(*args, **kwargs)
939 def readlines(*args, **kwargs): return _core.InputStream_readlines(*args, **kwargs)
940 def seek(*args, **kwargs): return _core.InputStream_seek(*args, **kwargs)
941 def tell(*args, **kwargs): return _core.InputStream_tell(*args, **kwargs)
942 def Peek(*args, **kwargs): return _core.InputStream_Peek(*args, **kwargs)
943 def GetC(*args, **kwargs): return _core.InputStream_GetC(*args, **kwargs)
944 def LastRead(*args, **kwargs): return _core.InputStream_LastRead(*args, **kwargs)
945 def CanRead(*args, **kwargs): return _core.InputStream_CanRead(*args, **kwargs)
946 def Eof(*args, **kwargs): return _core.InputStream_Eof(*args, **kwargs)
947 def Ungetch(*args, **kwargs): return _core.InputStream_Ungetch(*args, **kwargs)
948 def SeekI(*args, **kwargs): return _core.InputStream_SeekI(*args, **kwargs)
949 def TellI(*args, **kwargs): return _core.InputStream_TellI(*args, **kwargs)
950 def __repr__(self):
951 return "<%s.%s; proxy of C++ wxPyInputStream instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
952
953class InputStreamPtr(InputStream):
954 def __init__(self, this):
955 self.this = this
956 if not hasattr(self,"thisown"): self.thisown = 0
957 self.__class__ = InputStream
958_core.InputStream_swigregister(InputStreamPtr)
959cvar = _core.cvar
960DefaultPosition = cvar.DefaultPosition
961DefaultSize = cvar.DefaultSize
962
963class OutputStream(object):
964 def write(*args, **kwargs): return _core.OutputStream_write(*args, **kwargs)
965 def __init__(self): raise RuntimeError, "No constructor defined"
966 def __repr__(self):
967 return "<%s.%s; proxy of C++ wxOutputStream instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
968
969class OutputStreamPtr(OutputStream):
970 def __init__(self, this):
971 self.this = this
972 if not hasattr(self,"thisown"): self.thisown = 0
973 self.__class__ = OutputStream
974_core.OutputStream_swigregister(OutputStreamPtr)
975
976#---------------------------------------------------------------------------
977
978class FSFile(Object):
979 def __init__(self, *args, **kwargs):
980 newobj = _core.new_FSFile(*args, **kwargs)
981 self.this = newobj.this
982 self.thisown = 1
983 del newobj.thisown
984 def __del__(self, destroy=_core.delete_FSFile):
985 try:
986 if self.thisown: destroy(self)
987 except: pass
988 def GetStream(*args, **kwargs): return _core.FSFile_GetStream(*args, **kwargs)
989 def GetMimeType(*args, **kwargs): return _core.FSFile_GetMimeType(*args, **kwargs)
990 def GetLocation(*args, **kwargs): return _core.FSFile_GetLocation(*args, **kwargs)
991 def GetAnchor(*args, **kwargs): return _core.FSFile_GetAnchor(*args, **kwargs)
992 def GetModificationTime(*args, **kwargs): return _core.FSFile_GetModificationTime(*args, **kwargs)
993 def __repr__(self):
994 return "<%s.%s; proxy of C++ wxFSFile instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
995
996class FSFilePtr(FSFile):
997 def __init__(self, this):
998 self.this = this
999 if not hasattr(self,"thisown"): self.thisown = 0
1000 self.__class__ = FSFile
1001_core.FSFile_swigregister(FSFilePtr)
1002
1003class CPPFileSystemHandler(object):
1004 def __init__(self): raise RuntimeError, "No constructor defined"
1005 def __repr__(self):
1006 return "<%s.%s; proxy of C++ wxFileSystemHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
1007
1008class CPPFileSystemHandlerPtr(CPPFileSystemHandler):
1009 def __init__(self, this):
1010 self.this = this
1011 if not hasattr(self,"thisown"): self.thisown = 0
1012 self.__class__ = CPPFileSystemHandler
1013_core.CPPFileSystemHandler_swigregister(CPPFileSystemHandlerPtr)
1014
1015class FileSystemHandler(CPPFileSystemHandler):
1016 def __init__(self, *args, **kwargs):
1017 newobj = _core.new_FileSystemHandler(*args, **kwargs)
1018 self.this = newobj.this
1019 self.thisown = 1
1020 del newobj.thisown
1021 self._setCallbackInfo(self, FileSystemHandler)
1022 def _setCallbackInfo(*args, **kwargs): return _core.FileSystemHandler__setCallbackInfo(*args, **kwargs)
1023 def CanOpen(*args, **kwargs): return _core.FileSystemHandler_CanOpen(*args, **kwargs)
1024 def OpenFile(*args, **kwargs): return _core.FileSystemHandler_OpenFile(*args, **kwargs)
1025 def FindFirst(*args, **kwargs): return _core.FileSystemHandler_FindFirst(*args, **kwargs)
1026 def FindNext(*args, **kwargs): return _core.FileSystemHandler_FindNext(*args, **kwargs)
1027 def GetProtocol(*args, **kwargs): return _core.FileSystemHandler_GetProtocol(*args, **kwargs)
1028 def GetLeftLocation(*args, **kwargs): return _core.FileSystemHandler_GetLeftLocation(*args, **kwargs)
1029 def GetAnchor(*args, **kwargs): return _core.FileSystemHandler_GetAnchor(*args, **kwargs)
1030 def GetRightLocation(*args, **kwargs): return _core.FileSystemHandler_GetRightLocation(*args, **kwargs)
1031 def GetMimeTypeFromExt(*args, **kwargs): return _core.FileSystemHandler_GetMimeTypeFromExt(*args, **kwargs)
1032 def __repr__(self):
1033 return "<%s.%s; proxy of C++ wxPyFileSystemHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
1034
1035class FileSystemHandlerPtr(FileSystemHandler):
1036 def __init__(self, this):
1037 self.this = this
1038 if not hasattr(self,"thisown"): self.thisown = 0
1039 self.__class__ = FileSystemHandler
1040_core.FileSystemHandler_swigregister(FileSystemHandlerPtr)
1041
1042class FileSystem(Object):
1043 def __init__(self, *args, **kwargs):
1044 newobj = _core.new_FileSystem(*args, **kwargs)
1045 self.this = newobj.this
1046 self.thisown = 1
1047 del newobj.thisown
1048 def __del__(self, destroy=_core.delete_FileSystem):
1049 try:
1050 if self.thisown: destroy(self)
1051 except: pass
1052 def ChangePathTo(*args, **kwargs): return _core.FileSystem_ChangePathTo(*args, **kwargs)
1053 def GetPath(*args, **kwargs): return _core.FileSystem_GetPath(*args, **kwargs)
1054 def OpenFile(*args, **kwargs): return _core.FileSystem_OpenFile(*args, **kwargs)
1055 def FindFirst(*args, **kwargs): return _core.FileSystem_FindFirst(*args, **kwargs)
1056 def FindNext(*args, **kwargs): return _core.FileSystem_FindNext(*args, **kwargs)
1057 AddHandler = staticmethod(_core.FileSystem_AddHandler)
1058 CleanUpHandlers = staticmethod(_core.FileSystem_CleanUpHandlers)
1059 FileNameToURL = staticmethod(_core.FileSystem_FileNameToURL)
1060 def __repr__(self):
1061 return "<%s.%s; proxy of C++ wxFileSystem instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
1062
1063class FileSystemPtr(FileSystem):
1064 def __init__(self, this):
1065 self.this = this
1066 if not hasattr(self,"thisown"): self.thisown = 0
1067 self.__class__ = FileSystem
1068_core.FileSystem_swigregister(FileSystemPtr)
1069
1070FileSystem_AddHandler = _core.FileSystem_AddHandler
1071
1072FileSystem_CleanUpHandlers = _core.FileSystem_CleanUpHandlers
1073
1074FileSystem_FileNameToURL = _core.FileSystem_FileNameToURL
1075
1076
1077FileSystem_URLToFileName = _core.FileSystem_URLToFileName
1078class InternetFSHandler(CPPFileSystemHandler):
1079 def __init__(self, *args, **kwargs):
1080 newobj = _core.new_InternetFSHandler(*args, **kwargs)
1081 self.this = newobj.this
1082 self.thisown = 1
1083 del newobj.thisown
1084 def CanOpen(*args, **kwargs): return _core.InternetFSHandler_CanOpen(*args, **kwargs)
1085 def OpenFile(*args, **kwargs): return _core.InternetFSHandler_OpenFile(*args, **kwargs)
1086 def __repr__(self):
1087 return "<%s.%s; proxy of C++ wxInternetFSHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
1088
1089class InternetFSHandlerPtr(InternetFSHandler):
1090 def __init__(self, this):
1091 self.this = this
1092 if not hasattr(self,"thisown"): self.thisown = 0
1093 self.__class__ = InternetFSHandler
1094_core.InternetFSHandler_swigregister(InternetFSHandlerPtr)
1095
1096class ZipFSHandler(CPPFileSystemHandler):
1097 def __init__(self, *args, **kwargs):
1098 newobj = _core.new_ZipFSHandler(*args, **kwargs)
1099 self.this = newobj.this
1100 self.thisown = 1
1101 del newobj.thisown
1102 def CanOpen(*args, **kwargs): return _core.ZipFSHandler_CanOpen(*args, **kwargs)
1103 def OpenFile(*args, **kwargs): return _core.ZipFSHandler_OpenFile(*args, **kwargs)
1104 def FindFirst(*args, **kwargs): return _core.ZipFSHandler_FindFirst(*args, **kwargs)
1105 def FindNext(*args, **kwargs): return _core.ZipFSHandler_FindNext(*args, **kwargs)
1106 def __repr__(self):
1107 return "<%s.%s; proxy of C++ wxZipFSHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
1108
1109class ZipFSHandlerPtr(ZipFSHandler):
1110 def __init__(self, this):
1111 self.this = this
1112 if not hasattr(self,"thisown"): self.thisown = 0
1113 self.__class__ = ZipFSHandler
1114_core.ZipFSHandler_swigregister(ZipFSHandlerPtr)
1115
1116
1117__wxMemoryFSHandler_AddFile_wxImage = _core.__wxMemoryFSHandler_AddFile_wxImage
1118
1119__wxMemoryFSHandler_AddFile_wxBitmap = _core.__wxMemoryFSHandler_AddFile_wxBitmap
1120
1121__wxMemoryFSHandler_AddFile_Data = _core.__wxMemoryFSHandler_AddFile_Data
1122def MemoryFSHandler_AddFile(filename, a, b=''):
1123 if isinstance(a, wx.Image):
1124 __wxMemoryFSHandler_AddFile_wxImage(filename, a, b)
1125 elif isinstance(a, wx.Bitmap):
1126 __wxMemoryFSHandler_AddFile_wxBitmap(filename, a, b)
1127 elif type(a) == str:
1128 __wxMemoryFSHandler_AddFile_Data(filename, a)
1129 else: raise TypeError, 'wx.Image, wx.Bitmap or string expected'
1130
1131class MemoryFSHandler(CPPFileSystemHandler):
1132 def __init__(self, *args, **kwargs):
1133 newobj = _core.new_MemoryFSHandler(*args, **kwargs)
1134 self.this = newobj.this
1135 self.thisown = 1
1136 del newobj.thisown
1137 RemoveFile = staticmethod(_core.MemoryFSHandler_RemoveFile)
1138 AddFile = staticmethod(MemoryFSHandler_AddFile)
1139 def CanOpen(*args, **kwargs): return _core.MemoryFSHandler_CanOpen(*args, **kwargs)
1140 def OpenFile(*args, **kwargs): return _core.MemoryFSHandler_OpenFile(*args, **kwargs)
1141 def FindFirst(*args, **kwargs): return _core.MemoryFSHandler_FindFirst(*args, **kwargs)
1142 def FindNext(*args, **kwargs): return _core.MemoryFSHandler_FindNext(*args, **kwargs)
1143 def __repr__(self):
1144 return "<%s.%s; proxy of C++ wxMemoryFSHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
1145
1146class MemoryFSHandlerPtr(MemoryFSHandler):
1147 def __init__(self, this):
1148 self.this = this
1149 if not hasattr(self,"thisown"): self.thisown = 0
1150 self.__class__ = MemoryFSHandler
1151_core.MemoryFSHandler_swigregister(MemoryFSHandlerPtr)
1152
1153MemoryFSHandler_RemoveFile = _core.MemoryFSHandler_RemoveFile
1154
1155#---------------------------------------------------------------------------
1156
1157class ImageHandler(Object):
1158 def GetName(*args, **kwargs): return _core.ImageHandler_GetName(*args, **kwargs)
1159 def GetExtension(*args, **kwargs): return _core.ImageHandler_GetExtension(*args, **kwargs)
1160 def GetType(*args, **kwargs): return _core.ImageHandler_GetType(*args, **kwargs)
1161 def GetMimeType(*args, **kwargs): return _core.ImageHandler_GetMimeType(*args, **kwargs)
1162 def CanRead(*args, **kwargs): return _core.ImageHandler_CanRead(*args, **kwargs)
1163 def SetName(*args, **kwargs): return _core.ImageHandler_SetName(*args, **kwargs)
1164 def SetExtension(*args, **kwargs): return _core.ImageHandler_SetExtension(*args, **kwargs)
1165 def SetType(*args, **kwargs): return _core.ImageHandler_SetType(*args, **kwargs)
1166 def SetMimeType(*args, **kwargs): return _core.ImageHandler_SetMimeType(*args, **kwargs)
1167 def __init__(self): raise RuntimeError, "No constructor defined"
1168 def __repr__(self):
1169 return "<%s.%s; proxy of C++ wxImageHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
1170
1171class ImageHandlerPtr(ImageHandler):
1172 def __init__(self, this):
1173 self.this = this
1174 if not hasattr(self,"thisown"): self.thisown = 0
1175 self.__class__ = ImageHandler
1176_core.ImageHandler_swigregister(ImageHandlerPtr)
1177
1178class ImageHistogram(object):
1179 def __init__(self, *args, **kwargs):
1180 newobj = _core.new_ImageHistogram(*args, **kwargs)
1181 self.this = newobj.this
1182 self.thisown = 1
1183 del newobj.thisown
1184 MakeKey = staticmethod(_core.ImageHistogram_MakeKey)
1185 def FindFirstUnusedColour(*args, **kwargs): return _core.ImageHistogram_FindFirstUnusedColour(*args, **kwargs)
1186 def __repr__(self):
1187 return "<%s.%s; proxy of C++ wxImageHistogram instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
1188
1189class ImageHistogramPtr(ImageHistogram):
1190 def __init__(self, this):
1191 self.this = this
1192 if not hasattr(self,"thisown"): self.thisown = 0
1193 self.__class__ = ImageHistogram
1194_core.ImageHistogram_swigregister(ImageHistogramPtr)
1195
1196ImageHistogram_MakeKey = _core.ImageHistogram_MakeKey
1197
1198class Image(Object):
1199 def __init__(self, *args, **kwargs):
1200 newobj = _core.new_Image(*args, **kwargs)
1201 self.this = newobj.this
1202 self.thisown = 1
1203 del newobj.thisown
1204 def __del__(self, destroy=_core.delete_Image):
1205 try:
1206 if self.thisown: destroy(self)
1207 except: pass
1208 def Create(*args, **kwargs): return _core.Image_Create(*args, **kwargs)
1209 def Destroy(*args, **kwargs): return _core.Image_Destroy(*args, **kwargs)
1210 def Scale(*args, **kwargs): return _core.Image_Scale(*args, **kwargs)
1211 def ShrinkBy(*args, **kwargs): return _core.Image_ShrinkBy(*args, **kwargs)
1212 def Rescale(*args, **kwargs): return _core.Image_Rescale(*args, **kwargs)
1213 def SetRGB(*args, **kwargs): return _core.Image_SetRGB(*args, **kwargs)
1214 def GetRed(*args, **kwargs): return _core.Image_GetRed(*args, **kwargs)
1215 def GetGreen(*args, **kwargs): return _core.Image_GetGreen(*args, **kwargs)
1216 def GetBlue(*args, **kwargs): return _core.Image_GetBlue(*args, **kwargs)
1217 def SetAlpha(*args, **kwargs): return _core.Image_SetAlpha(*args, **kwargs)
1218 def GetAlpha(*args, **kwargs): return _core.Image_GetAlpha(*args, **kwargs)
1219 def HasAlpha(*args, **kwargs): return _core.Image_HasAlpha(*args, **kwargs)
1220 def FindFirstUnusedColour(*args, **kwargs): return _core.Image_FindFirstUnusedColour(*args, **kwargs)
1221 def SetMaskFromImage(*args, **kwargs): return _core.Image_SetMaskFromImage(*args, **kwargs)
1222 CanRead = staticmethod(_core.Image_CanRead)
1223 GetImageCount = staticmethod(_core.Image_GetImageCount)
1224 def LoadFile(*args, **kwargs): return _core.Image_LoadFile(*args, **kwargs)
1225 def LoadMimeFile(*args, **kwargs): return _core.Image_LoadMimeFile(*args, **kwargs)
1226 def SaveFile(*args, **kwargs): return _core.Image_SaveFile(*args, **kwargs)
1227 def SaveMimeFile(*args, **kwargs): return _core.Image_SaveMimeFile(*args, **kwargs)
1228 CanReadStream = staticmethod(_core.Image_CanReadStream)
1229 def LoadStream(*args, **kwargs): return _core.Image_LoadStream(*args, **kwargs)
1230 def LoadMimeStream(*args, **kwargs): return _core.Image_LoadMimeStream(*args, **kwargs)
1231 def Ok(*args, **kwargs): return _core.Image_Ok(*args, **kwargs)
1232 def GetWidth(*args, **kwargs): return _core.Image_GetWidth(*args, **kwargs)
1233 def GetHeight(*args, **kwargs): return _core.Image_GetHeight(*args, **kwargs)
1234 def GetSubImage(*args, **kwargs): return _core.Image_GetSubImage(*args, **kwargs)
1235 def Copy(*args, **kwargs): return _core.Image_Copy(*args, **kwargs)
1236 def Paste(*args, **kwargs): return _core.Image_Paste(*args, **kwargs)
1237 def GetData(*args, **kwargs): return _core.Image_GetData(*args, **kwargs)
1238 def SetData(*args, **kwargs): return _core.Image_SetData(*args, **kwargs)
1239 def GetDataBuffer(*args, **kwargs): return _core.Image_GetDataBuffer(*args, **kwargs)
1240 def SetDataBuffer(*args, **kwargs): return _core.Image_SetDataBuffer(*args, **kwargs)
1241 def GetAlphaData(*args, **kwargs): return _core.Image_GetAlphaData(*args, **kwargs)
1242 def SetAlphaData(*args, **kwargs): return _core.Image_SetAlphaData(*args, **kwargs)
1243 def GetAlphaBuffer(*args, **kwargs): return _core.Image_GetAlphaBuffer(*args, **kwargs)
1244 def SetAlphaBuffer(*args, **kwargs): return _core.Image_SetAlphaBuffer(*args, **kwargs)
1245 def SetMaskColour(*args, **kwargs): return _core.Image_SetMaskColour(*args, **kwargs)
1246 def GetMaskRed(*args, **kwargs): return _core.Image_GetMaskRed(*args, **kwargs)
1247 def GetMaskGreen(*args, **kwargs): return _core.Image_GetMaskGreen(*args, **kwargs)
1248 def GetMaskBlue(*args, **kwargs): return _core.Image_GetMaskBlue(*args, **kwargs)
1249 def SetMask(*args, **kwargs): return _core.Image_SetMask(*args, **kwargs)
1250 def HasMask(*args, **kwargs): return _core.Image_HasMask(*args, **kwargs)
1251 def Rotate(*args, **kwargs): return _core.Image_Rotate(*args, **kwargs)
1252 def Rotate90(*args, **kwargs): return _core.Image_Rotate90(*args, **kwargs)
1253 def Mirror(*args, **kwargs): return _core.Image_Mirror(*args, **kwargs)
1254 def Replace(*args, **kwargs): return _core.Image_Replace(*args, **kwargs)
1255 def ConvertToMono(*args, **kwargs): return _core.Image_ConvertToMono(*args, **kwargs)
1256 def SetOption(*args, **kwargs): return _core.Image_SetOption(*args, **kwargs)
1257 def SetOptionInt(*args, **kwargs): return _core.Image_SetOptionInt(*args, **kwargs)
1258 def GetOption(*args, **kwargs): return _core.Image_GetOption(*args, **kwargs)
1259 def GetOptionInt(*args, **kwargs): return _core.Image_GetOptionInt(*args, **kwargs)
1260 def HasOption(*args, **kwargs): return _core.Image_HasOption(*args, **kwargs)
1261 def CountColours(*args, **kwargs): return _core.Image_CountColours(*args, **kwargs)
1262 def ComputeHistogram(*args, **kwargs): return _core.Image_ComputeHistogram(*args, **kwargs)
1263 AddHandler = staticmethod(_core.Image_AddHandler)
1264 InsertHandler = staticmethod(_core.Image_InsertHandler)
1265 RemoveHandler = staticmethod(_core.Image_RemoveHandler)
1266 GetImageExtWildcard = staticmethod(_core.Image_GetImageExtWildcard)
1267 def ConvertToBitmap(*args, **kwargs): return _core.Image_ConvertToBitmap(*args, **kwargs)
1268 def ConvertToMonoBitmap(*args, **kwargs): return _core.Image_ConvertToMonoBitmap(*args, **kwargs)
1269 def __nonzero__(self): return self.Ok()
1270 def __repr__(self):
1271 return "<%s.%s; proxy of C++ wxImage instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
1272
1273class ImagePtr(Image):
1274 def __init__(self, this):
1275 self.this = this
1276 if not hasattr(self,"thisown"): self.thisown = 0
1277 self.__class__ = Image
1278_core.Image_swigregister(ImagePtr)
1279
1280def ImageFromMime(*args, **kwargs):
1281 val = _core.new_ImageFromMime(*args, **kwargs)
1282 val.thisown = 1
1283 return val
1284
1285def ImageFromStream(*args, **kwargs):
1286 val = _core.new_ImageFromStream(*args, **kwargs)
1287 val.thisown = 1
1288 return val
1289
1290def ImageFromStreamMime(*args, **kwargs):
1291 val = _core.new_ImageFromStreamMime(*args, **kwargs)
1292 val.thisown = 1
1293 return val
1294
1295def EmptyImage(*args, **kwargs):
1296 val = _core.new_EmptyImage(*args, **kwargs)
1297 val.thisown = 1
1298 return val
1299
1300def ImageFromBitmap(*args, **kwargs):
1301 val = _core.new_ImageFromBitmap(*args, **kwargs)
1302 val.thisown = 1
1303 return val
1304
1305def ImageFromData(*args, **kwargs):
1306 val = _core.new_ImageFromData(*args, **kwargs)
1307 val.thisown = 1
1308 return val
1309
1310Image_CanRead = _core.Image_CanRead
1311
1312Image_GetImageCount = _core.Image_GetImageCount
1313
1314Image_CanReadStream = _core.Image_CanReadStream
1315
1316Image_AddHandler = _core.Image_AddHandler
1317
1318Image_InsertHandler = _core.Image_InsertHandler
1319
1320Image_RemoveHandler = _core.Image_RemoveHandler
1321
1322Image_GetImageExtWildcard = _core.Image_GetImageExtWildcard
1323
1324
1325InitAllImageHandlers = _core.InitAllImageHandlers
1326IMAGE_RESOLUTION_INCHES = _core.IMAGE_RESOLUTION_INCHES
1327IMAGE_RESOLUTION_CM = _core.IMAGE_RESOLUTION_CM
1328BMP_24BPP = _core.BMP_24BPP
1329BMP_8BPP = _core.BMP_8BPP
1330BMP_8BPP_GREY = _core.BMP_8BPP_GREY
1331BMP_8BPP_GRAY = _core.BMP_8BPP_GRAY
1332BMP_8BPP_RED = _core.BMP_8BPP_RED
1333BMP_8BPP_PALETTE = _core.BMP_8BPP_PALETTE
1334BMP_4BPP = _core.BMP_4BPP
1335BMP_1BPP = _core.BMP_1BPP
1336BMP_1BPP_BW = _core.BMP_1BPP_BW
1337class BMPHandler(ImageHandler):
1338 def __init__(self, *args, **kwargs):
1339 newobj = _core.new_BMPHandler(*args, **kwargs)
1340 self.this = newobj.this
1341 self.thisown = 1
1342 del newobj.thisown
1343 def __repr__(self):
1344 return "<%s.%s; proxy of C++ wxBMPHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
1345
1346class BMPHandlerPtr(BMPHandler):
1347 def __init__(self, this):
1348 self.this = this
1349 if not hasattr(self,"thisown"): self.thisown = 0
1350 self.__class__ = BMPHandler
1351_core.BMPHandler_swigregister(BMPHandlerPtr)
1352NullImage = cvar.NullImage
1353IMAGE_OPTION_BMP_FORMAT = cvar.IMAGE_OPTION_BMP_FORMAT
1354IMAGE_OPTION_CUR_HOTSPOT_X = cvar.IMAGE_OPTION_CUR_HOTSPOT_X
1355IMAGE_OPTION_CUR_HOTSPOT_Y = cvar.IMAGE_OPTION_CUR_HOTSPOT_Y
1356IMAGE_OPTION_RESOLUTION = cvar.IMAGE_OPTION_RESOLUTION
1357IMAGE_OPTION_RESOLUTIONUNIT = cvar.IMAGE_OPTION_RESOLUTIONUNIT
1358
1359class ICOHandler(BMPHandler):
1360 def __init__(self, *args, **kwargs):
1361 newobj = _core.new_ICOHandler(*args, **kwargs)
1362 self.this = newobj.this
1363 self.thisown = 1
1364 del newobj.thisown
1365 def __repr__(self):
1366 return "<%s.%s; proxy of C++ wxICOHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
1367
1368class ICOHandlerPtr(ICOHandler):
1369 def __init__(self, this):
1370 self.this = this
1371 if not hasattr(self,"thisown"): self.thisown = 0
1372 self.__class__ = ICOHandler
1373_core.ICOHandler_swigregister(ICOHandlerPtr)
1374
1375class CURHandler(ICOHandler):
1376 def __init__(self, *args, **kwargs):
1377 newobj = _core.new_CURHandler(*args, **kwargs)
1378 self.this = newobj.this
1379 self.thisown = 1
1380 del newobj.thisown
1381 def __repr__(self):
1382 return "<%s.%s; proxy of C++ wxCURHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
1383
1384class CURHandlerPtr(CURHandler):
1385 def __init__(self, this):
1386 self.this = this
1387 if not hasattr(self,"thisown"): self.thisown = 0
1388 self.__class__ = CURHandler
1389_core.CURHandler_swigregister(CURHandlerPtr)
1390
1391class ANIHandler(CURHandler):
1392 def __init__(self, *args, **kwargs):
1393 newobj = _core.new_ANIHandler(*args, **kwargs)
1394 self.this = newobj.this
1395 self.thisown = 1
1396 del newobj.thisown
1397 def __repr__(self):
1398 return "<%s.%s; proxy of C++ wxANIHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
1399
1400class ANIHandlerPtr(ANIHandler):
1401 def __init__(self, this):
1402 self.this = this
1403 if not hasattr(self,"thisown"): self.thisown = 0
1404 self.__class__ = ANIHandler
1405_core.ANIHandler_swigregister(ANIHandlerPtr)
1406
1407class PNGHandler(ImageHandler):
1408 def __init__(self, *args, **kwargs):
1409 newobj = _core.new_PNGHandler(*args, **kwargs)
1410 self.this = newobj.this
1411 self.thisown = 1
1412 del newobj.thisown
1413 def __repr__(self):
1414 return "<%s.%s; proxy of C++ wxPNGHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
1415
1416class PNGHandlerPtr(PNGHandler):
1417 def __init__(self, this):
1418 self.this = this
1419 if not hasattr(self,"thisown"): self.thisown = 0
1420 self.__class__ = PNGHandler
1421_core.PNGHandler_swigregister(PNGHandlerPtr)
1422
1423class GIFHandler(ImageHandler):
1424 def __init__(self, *args, **kwargs):
1425 newobj = _core.new_GIFHandler(*args, **kwargs)
1426 self.this = newobj.this
1427 self.thisown = 1
1428 del newobj.thisown
1429 def __repr__(self):
1430 return "<%s.%s; proxy of C++ wxGIFHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
1431
1432class GIFHandlerPtr(GIFHandler):
1433 def __init__(self, this):
1434 self.this = this
1435 if not hasattr(self,"thisown"): self.thisown = 0
1436 self.__class__ = GIFHandler
1437_core.GIFHandler_swigregister(GIFHandlerPtr)
1438
1439class PCXHandler(ImageHandler):
1440 def __init__(self, *args, **kwargs):
1441 newobj = _core.new_PCXHandler(*args, **kwargs)
1442 self.this = newobj.this
1443 self.thisown = 1
1444 del newobj.thisown
1445 def __repr__(self):
1446 return "<%s.%s; proxy of C++ wxPCXHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
1447
1448class PCXHandlerPtr(PCXHandler):
1449 def __init__(self, this):
1450 self.this = this
1451 if not hasattr(self,"thisown"): self.thisown = 0
1452 self.__class__ = PCXHandler
1453_core.PCXHandler_swigregister(PCXHandlerPtr)
1454
1455class JPEGHandler(ImageHandler):
1456 def __init__(self, *args, **kwargs):
1457 newobj = _core.new_JPEGHandler(*args, **kwargs)
1458 self.this = newobj.this
1459 self.thisown = 1
1460 del newobj.thisown
1461 def __repr__(self):
1462 return "<%s.%s; proxy of C++ wxJPEGHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
1463
1464class JPEGHandlerPtr(JPEGHandler):
1465 def __init__(self, this):
1466 self.this = this
1467 if not hasattr(self,"thisown"): self.thisown = 0
1468 self.__class__ = JPEGHandler
1469_core.JPEGHandler_swigregister(JPEGHandlerPtr)
1470
1471class PNMHandler(ImageHandler):
1472 def __init__(self, *args, **kwargs):
1473 newobj = _core.new_PNMHandler(*args, **kwargs)
1474 self.this = newobj.this
1475 self.thisown = 1
1476 del newobj.thisown
1477 def __repr__(self):
1478 return "<%s.%s; proxy of C++ wxPNMHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
1479
1480class PNMHandlerPtr(PNMHandler):
1481 def __init__(self, this):
1482 self.this = this
1483 if not hasattr(self,"thisown"): self.thisown = 0
1484 self.__class__ = PNMHandler
1485_core.PNMHandler_swigregister(PNMHandlerPtr)
1486
1487class XPMHandler(ImageHandler):
1488 def __init__(self, *args, **kwargs):
1489 newobj = _core.new_XPMHandler(*args, **kwargs)
1490 self.this = newobj.this
1491 self.thisown = 1
1492 del newobj.thisown
1493 def __repr__(self):
1494 return "<%s.%s; proxy of C++ wxXPMHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
1495
1496class XPMHandlerPtr(XPMHandler):
1497 def __init__(self, this):
1498 self.this = this
1499 if not hasattr(self,"thisown"): self.thisown = 0
1500 self.__class__ = XPMHandler
1501_core.XPMHandler_swigregister(XPMHandlerPtr)
1502
1503class TIFFHandler(ImageHandler):
1504 def __init__(self, *args, **kwargs):
1505 newobj = _core.new_TIFFHandler(*args, **kwargs)
1506 self.this = newobj.this
1507 self.thisown = 1
1508 del newobj.thisown
1509 def __repr__(self):
1510 return "<%s.%s; proxy of C++ wxTIFFHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
1511
1512class TIFFHandlerPtr(TIFFHandler):
1513 def __init__(self, this):
1514 self.this = this
1515 if not hasattr(self,"thisown"): self.thisown = 0
1516 self.__class__ = TIFFHandler
1517_core.TIFFHandler_swigregister(TIFFHandlerPtr)
1518
1519#---------------------------------------------------------------------------
1520
1521class EvtHandler(Object):
1522 def __init__(self, *args, **kwargs):
1523 newobj = _core.new_EvtHandler(*args, **kwargs)
1524 self.this = newobj.this
1525 self.thisown = 1
1526 del newobj.thisown
1527 def GetNextHandler(*args, **kwargs): return _core.EvtHandler_GetNextHandler(*args, **kwargs)
1528 def GetPreviousHandler(*args, **kwargs): return _core.EvtHandler_GetPreviousHandler(*args, **kwargs)
1529 def SetNextHandler(*args, **kwargs): return _core.EvtHandler_SetNextHandler(*args, **kwargs)
1530 def SetPreviousHandler(*args, **kwargs): return _core.EvtHandler_SetPreviousHandler(*args, **kwargs)
1531 def GetEvtHandlerEnabled(*args, **kwargs): return _core.EvtHandler_GetEvtHandlerEnabled(*args, **kwargs)
1532 def SetEvtHandlerEnabled(*args, **kwargs): return _core.EvtHandler_SetEvtHandlerEnabled(*args, **kwargs)
1533 def ProcessEvent(*args, **kwargs): return _core.EvtHandler_ProcessEvent(*args, **kwargs)
1534 def AddPendingEvent(*args, **kwargs): return _core.EvtHandler_AddPendingEvent(*args, **kwargs)
1535 def ProcessPendingEvents(*args, **kwargs): return _core.EvtHandler_ProcessPendingEvents(*args, **kwargs)
1536 def Connect(*args, **kwargs): return _core.EvtHandler_Connect(*args, **kwargs)
1537 def Disconnect(*args, **kwargs): return _core.EvtHandler_Disconnect(*args, **kwargs)
1538 def _setOORInfo(*args, **kwargs): return _core.EvtHandler__setOORInfo(*args, **kwargs)
1539 def Bind(self, event, handler, source=None, id=wx.ID_ANY, id2=wx.ID_ANY):
1540 """
1541 Bind an event to an event handler.
1542
1543 event One of the EVT_* objects that specifies the
1544 type of event to bind,
1545
1546 handler A callable object to be invoked when the event
1547 is delivered to self. Pass None to disconnect an
1548 event handler.
1549
1550 source Sometimes the event originates from a different window
1551 than self, but you still want to catch it in self. (For
1552 example, a button event delivered to a frame.) By
1553 passing the source of the event, the event handling
1554 system is able to differentiate between the same event
1555 type from different controls.
1556
1557 id,id2 Used for menu IDs or for event types that require a
1558 range of IDs
1559 """
1560 if source is not None:
1561 id = source.GetId()
1562 event.Bind(self, id, id2, handler)
1563
1564
1565 def __repr__(self):
1566 return "<%s.%s; proxy of C++ wxEvtHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
1567
1568class EvtHandlerPtr(EvtHandler):
1569 def __init__(self, this):
1570 self.this = this
1571 if not hasattr(self,"thisown"): self.thisown = 0
1572 self.__class__ = EvtHandler
1573_core.EvtHandler_swigregister(EvtHandlerPtr)
1574
1575#---------------------------------------------------------------------------
1576
1577class PyEventBinder(object):
1578 """
1579 Instances of this class are used to bind specific events to event
1580 handlers.
1581 """
1582 def __init__(self, evtType, expectedIDs=0):
1583 if expectedIDs not in [0, 1, 2]:
1584 raise ValueError, "Invalid number of expectedIDs"
1585 self.expectedIDs = expectedIDs
1586
1587 if type(evtType) == list or type(evtType) == tuple:
1588 self.evtType = evtType
1589 else:
1590 self.evtType = [evtType]
1591
1592
1593 def Bind(self, target, id1, id2, function):
1594 """Bind this set of event types to target."""
1595 for et in self.evtType:
1596 target.Connect(id1, id2, et, function)
1597
1598
1599 def __call__(self, *args):
1600 """
1601 For backwards compatibility with the old EVT_* functions.
1602 Should be called with either (window, func), (window, ID,
1603 func) or (window, ID1, ID2, func) parameters depending on the
1604 type of the event.
1605 """
1606 assert len(args) == 2 + self.expectedIDs
1607 id1 = wx.ID_ANY
1608 id2 = wx.ID_ANY
1609 target = args[0]
1610 if self.expectedIDs == 0:
1611 func = args[1]
1612 elif self.expectedIDs == 1:
1613 id1 = args[1]
1614 func = args[2]
1615 elif self.expectedIDs == 2:
1616 id1 = args[1]
1617 id2 = args[2]
1618 func = args[3]
1619 else:
1620 raise ValueError, "Unexpected number of IDs"
1621
1622 self.Bind(target, id1, id2, func)
1623
1624
1625# These two are square pegs that don't fit the PyEventBinder hole...
1626def EVT_COMMAND(win, id, cmd, func):
1627 win.Connect(id, -1, cmd, func)
1628def EVT_COMMAND_RANGE(win, id1, id2, cmd, func):
1629 win.Connect(id1, id2, cmd, func)
1630
1631
1632#---------------------------------------------------------------------------
1633
1634#---------------------------------------------------------------------------
1635
1636EVENT_PROPAGATE_NONE = _core.EVENT_PROPAGATE_NONE
1637EVENT_PROPAGATE_MAX = _core.EVENT_PROPAGATE_MAX
1638
1639NewEventType = _core.NewEventType
1640wxEVT_NULL = _core.wxEVT_NULL
1641wxEVT_FIRST = _core.wxEVT_FIRST
1642wxEVT_USER_FIRST = _core.wxEVT_USER_FIRST
1643wxEVT_COMMAND_BUTTON_CLICKED = _core.wxEVT_COMMAND_BUTTON_CLICKED
1644wxEVT_COMMAND_CHECKBOX_CLICKED = _core.wxEVT_COMMAND_CHECKBOX_CLICKED
1645wxEVT_COMMAND_CHOICE_SELECTED = _core.wxEVT_COMMAND_CHOICE_SELECTED
1646wxEVT_COMMAND_LISTBOX_SELECTED = _core.wxEVT_COMMAND_LISTBOX_SELECTED
1647wxEVT_COMMAND_LISTBOX_DOUBLECLICKED = _core.wxEVT_COMMAND_LISTBOX_DOUBLECLICKED
1648wxEVT_COMMAND_CHECKLISTBOX_TOGGLED = _core.wxEVT_COMMAND_CHECKLISTBOX_TOGGLED
1649wxEVT_COMMAND_MENU_SELECTED = _core.wxEVT_COMMAND_MENU_SELECTED
1650wxEVT_COMMAND_TOOL_CLICKED = _core.wxEVT_COMMAND_TOOL_CLICKED
1651wxEVT_COMMAND_SLIDER_UPDATED = _core.wxEVT_COMMAND_SLIDER_UPDATED
1652wxEVT_COMMAND_RADIOBOX_SELECTED = _core.wxEVT_COMMAND_RADIOBOX_SELECTED
1653wxEVT_COMMAND_RADIOBUTTON_SELECTED = _core.wxEVT_COMMAND_RADIOBUTTON_SELECTED
1654wxEVT_COMMAND_SCROLLBAR_UPDATED = _core.wxEVT_COMMAND_SCROLLBAR_UPDATED
1655wxEVT_COMMAND_VLBOX_SELECTED = _core.wxEVT_COMMAND_VLBOX_SELECTED
1656wxEVT_COMMAND_COMBOBOX_SELECTED = _core.wxEVT_COMMAND_COMBOBOX_SELECTED
1657wxEVT_COMMAND_TOOL_RCLICKED = _core.wxEVT_COMMAND_TOOL_RCLICKED
1658wxEVT_COMMAND_TOOL_ENTER = _core.wxEVT_COMMAND_TOOL_ENTER
1659wxEVT_LEFT_DOWN = _core.wxEVT_LEFT_DOWN
1660wxEVT_LEFT_UP = _core.wxEVT_LEFT_UP
1661wxEVT_MIDDLE_DOWN = _core.wxEVT_MIDDLE_DOWN
1662wxEVT_MIDDLE_UP = _core.wxEVT_MIDDLE_UP
1663wxEVT_RIGHT_DOWN = _core.wxEVT_RIGHT_DOWN
1664wxEVT_RIGHT_UP = _core.wxEVT_RIGHT_UP
1665wxEVT_MOTION = _core.wxEVT_MOTION
1666wxEVT_ENTER_WINDOW = _core.wxEVT_ENTER_WINDOW
1667wxEVT_LEAVE_WINDOW = _core.wxEVT_LEAVE_WINDOW
1668wxEVT_LEFT_DCLICK = _core.wxEVT_LEFT_DCLICK
1669wxEVT_MIDDLE_DCLICK = _core.wxEVT_MIDDLE_DCLICK
1670wxEVT_RIGHT_DCLICK = _core.wxEVT_RIGHT_DCLICK
1671wxEVT_SET_FOCUS = _core.wxEVT_SET_FOCUS
1672wxEVT_KILL_FOCUS = _core.wxEVT_KILL_FOCUS
1673wxEVT_CHILD_FOCUS = _core.wxEVT_CHILD_FOCUS
1674wxEVT_MOUSEWHEEL = _core.wxEVT_MOUSEWHEEL
1675wxEVT_NC_LEFT_DOWN = _core.wxEVT_NC_LEFT_DOWN
1676wxEVT_NC_LEFT_UP = _core.wxEVT_NC_LEFT_UP
1677wxEVT_NC_MIDDLE_DOWN = _core.wxEVT_NC_MIDDLE_DOWN
1678wxEVT_NC_MIDDLE_UP = _core.wxEVT_NC_MIDDLE_UP
1679wxEVT_NC_RIGHT_DOWN = _core.wxEVT_NC_RIGHT_DOWN
1680wxEVT_NC_RIGHT_UP = _core.wxEVT_NC_RIGHT_UP
1681wxEVT_NC_MOTION = _core.wxEVT_NC_MOTION
1682wxEVT_NC_ENTER_WINDOW = _core.wxEVT_NC_ENTER_WINDOW
1683wxEVT_NC_LEAVE_WINDOW = _core.wxEVT_NC_LEAVE_WINDOW
1684wxEVT_NC_LEFT_DCLICK = _core.wxEVT_NC_LEFT_DCLICK
1685wxEVT_NC_MIDDLE_DCLICK = _core.wxEVT_NC_MIDDLE_DCLICK
1686wxEVT_NC_RIGHT_DCLICK = _core.wxEVT_NC_RIGHT_DCLICK
1687wxEVT_CHAR = _core.wxEVT_CHAR
1688wxEVT_CHAR_HOOK = _core.wxEVT_CHAR_HOOK
1689wxEVT_NAVIGATION_KEY = _core.wxEVT_NAVIGATION_KEY
1690wxEVT_KEY_DOWN = _core.wxEVT_KEY_DOWN
1691wxEVT_KEY_UP = _core.wxEVT_KEY_UP
1692wxEVT_HOTKEY = _core.wxEVT_HOTKEY
1693wxEVT_SET_CURSOR = _core.wxEVT_SET_CURSOR
1694wxEVT_SCROLL_TOP = _core.wxEVT_SCROLL_TOP
1695wxEVT_SCROLL_BOTTOM = _core.wxEVT_SCROLL_BOTTOM
1696wxEVT_SCROLL_LINEUP = _core.wxEVT_SCROLL_LINEUP
1697wxEVT_SCROLL_LINEDOWN = _core.wxEVT_SCROLL_LINEDOWN
1698wxEVT_SCROLL_PAGEUP = _core.wxEVT_SCROLL_PAGEUP
1699wxEVT_SCROLL_PAGEDOWN = _core.wxEVT_SCROLL_PAGEDOWN
1700wxEVT_SCROLL_THUMBTRACK = _core.wxEVT_SCROLL_THUMBTRACK
1701wxEVT_SCROLL_THUMBRELEASE = _core.wxEVT_SCROLL_THUMBRELEASE
1702wxEVT_SCROLL_ENDSCROLL = _core.wxEVT_SCROLL_ENDSCROLL
1703wxEVT_SCROLLWIN_TOP = _core.wxEVT_SCROLLWIN_TOP
1704wxEVT_SCROLLWIN_BOTTOM = _core.wxEVT_SCROLLWIN_BOTTOM
1705wxEVT_SCROLLWIN_LINEUP = _core.wxEVT_SCROLLWIN_LINEUP
1706wxEVT_SCROLLWIN_LINEDOWN = _core.wxEVT_SCROLLWIN_LINEDOWN
1707wxEVT_SCROLLWIN_PAGEUP = _core.wxEVT_SCROLLWIN_PAGEUP
1708wxEVT_SCROLLWIN_PAGEDOWN = _core.wxEVT_SCROLLWIN_PAGEDOWN
1709wxEVT_SCROLLWIN_THUMBTRACK = _core.wxEVT_SCROLLWIN_THUMBTRACK
1710wxEVT_SCROLLWIN_THUMBRELEASE = _core.wxEVT_SCROLLWIN_THUMBRELEASE
1711wxEVT_SIZE = _core.wxEVT_SIZE
1712wxEVT_MOVE = _core.wxEVT_MOVE
1713wxEVT_CLOSE_WINDOW = _core.wxEVT_CLOSE_WINDOW
1714wxEVT_END_SESSION = _core.wxEVT_END_SESSION
1715wxEVT_QUERY_END_SESSION = _core.wxEVT_QUERY_END_SESSION
1716wxEVT_ACTIVATE_APP = _core.wxEVT_ACTIVATE_APP
1717wxEVT_POWER = _core.wxEVT_POWER
1718wxEVT_ACTIVATE = _core.wxEVT_ACTIVATE
1719wxEVT_CREATE = _core.wxEVT_CREATE
1720wxEVT_DESTROY = _core.wxEVT_DESTROY
1721wxEVT_SHOW = _core.wxEVT_SHOW
1722wxEVT_ICONIZE = _core.wxEVT_ICONIZE
1723wxEVT_MAXIMIZE = _core.wxEVT_MAXIMIZE
1724wxEVT_MOUSE_CAPTURE_CHANGED = _core.wxEVT_MOUSE_CAPTURE_CHANGED
1725wxEVT_PAINT = _core.wxEVT_PAINT
1726wxEVT_ERASE_BACKGROUND = _core.wxEVT_ERASE_BACKGROUND
1727wxEVT_NC_PAINT = _core.wxEVT_NC_PAINT
1728wxEVT_PAINT_ICON = _core.wxEVT_PAINT_ICON
1729wxEVT_MENU_OPEN = _core.wxEVT_MENU_OPEN
1730wxEVT_MENU_CLOSE = _core.wxEVT_MENU_CLOSE
1731wxEVT_MENU_HIGHLIGHT = _core.wxEVT_MENU_HIGHLIGHT
1732wxEVT_CONTEXT_MENU = _core.wxEVT_CONTEXT_MENU
1733wxEVT_SYS_COLOUR_CHANGED = _core.wxEVT_SYS_COLOUR_CHANGED
1734wxEVT_DISPLAY_CHANGED = _core.wxEVT_DISPLAY_CHANGED
1735wxEVT_SETTING_CHANGED = _core.wxEVT_SETTING_CHANGED
1736wxEVT_QUERY_NEW_PALETTE = _core.wxEVT_QUERY_NEW_PALETTE
1737wxEVT_PALETTE_CHANGED = _core.wxEVT_PALETTE_CHANGED
1738wxEVT_DROP_FILES = _core.wxEVT_DROP_FILES
1739wxEVT_DRAW_ITEM = _core.wxEVT_DRAW_ITEM
1740wxEVT_MEASURE_ITEM = _core.wxEVT_MEASURE_ITEM
1741wxEVT_COMPARE_ITEM = _core.wxEVT_COMPARE_ITEM
1742wxEVT_INIT_DIALOG = _core.wxEVT_INIT_DIALOG
1743wxEVT_IDLE = _core.wxEVT_IDLE
1744wxEVT_UPDATE_UI = _core.wxEVT_UPDATE_UI
1745wxEVT_SIZING = _core.wxEVT_SIZING
1746wxEVT_MOVING = _core.wxEVT_MOVING
1747wxEVT_COMMAND_LEFT_CLICK = _core.wxEVT_COMMAND_LEFT_CLICK
1748wxEVT_COMMAND_LEFT_DCLICK = _core.wxEVT_COMMAND_LEFT_DCLICK
1749wxEVT_COMMAND_RIGHT_CLICK = _core.wxEVT_COMMAND_RIGHT_CLICK
1750wxEVT_COMMAND_RIGHT_DCLICK = _core.wxEVT_COMMAND_RIGHT_DCLICK
1751wxEVT_COMMAND_SET_FOCUS = _core.wxEVT_COMMAND_SET_FOCUS
1752wxEVT_COMMAND_KILL_FOCUS = _core.wxEVT_COMMAND_KILL_FOCUS
1753wxEVT_COMMAND_ENTER = _core.wxEVT_COMMAND_ENTER
1754#
1755# Create some event binders
1756EVT_SIZE = wx.PyEventBinder( wxEVT_SIZE )
1757EVT_SIZING = wx.PyEventBinder( wxEVT_SIZING )
1758EVT_MOVE = wx.PyEventBinder( wxEVT_MOVE )
1759EVT_MOVING = wx.PyEventBinder( wxEVT_MOVING )
1760EVT_CLOSE = wx.PyEventBinder( wxEVT_CLOSE_WINDOW )
1761EVT_END_SESSION = wx.PyEventBinder( wxEVT_END_SESSION )
1762EVT_QUERY_END_SESSION = wx.PyEventBinder( wxEVT_QUERY_END_SESSION )
1763EVT_PAINT = wx.PyEventBinder( wxEVT_PAINT )
1764EVT_NC_PAINT = wx.PyEventBinder( wxEVT_NC_PAINT )
1765EVT_ERASE_BACKGROUND = wx.PyEventBinder( wxEVT_ERASE_BACKGROUND )
1766EVT_CHAR = wx.PyEventBinder( wxEVT_CHAR )
1767EVT_KEY_DOWN = wx.PyEventBinder( wxEVT_KEY_DOWN )
1768EVT_KEY_UP = wx.PyEventBinder( wxEVT_KEY_UP )
1769EVT_HOTKEY = wx.PyEventBinder( wxEVT_HOTKEY, 1)
1770EVT_CHAR_HOOK = wx.PyEventBinder( wxEVT_CHAR_HOOK )
1771EVT_MENU_OPEN = wx.PyEventBinder( wxEVT_MENU_OPEN )
1772EVT_MENU_CLOSE = wx.PyEventBinder( wxEVT_MENU_CLOSE )
1773EVT_MENU_HIGHLIGHT = wx.PyEventBinder( wxEVT_MENU_HIGHLIGHT, 1)
1774EVT_MENU_HIGHLIGHT_ALL = wx.PyEventBinder( wxEVT_MENU_HIGHLIGHT )
1775EVT_SET_FOCUS = wx.PyEventBinder( wxEVT_SET_FOCUS )
1776EVT_KILL_FOCUS = wx.PyEventBinder( wxEVT_KILL_FOCUS )
1777EVT_CHILD_FOCUS = wx.PyEventBinder( wxEVT_CHILD_FOCUS )
1778EVT_ACTIVATE = wx.PyEventBinder( wxEVT_ACTIVATE )
1779EVT_ACTIVATE_APP = wx.PyEventBinder( wxEVT_ACTIVATE_APP )
1780EVT_END_SESSION = wx.PyEventBinder( wxEVT_END_SESSION )
1781EVT_QUERY_END_SESSION = wx.PyEventBinder( wxEVT_QUERY_END_SESSION )
1782EVT_DROP_FILES = wx.PyEventBinder( wxEVT_DROP_FILES )
1783EVT_INIT_DIALOG = wx.PyEventBinder( wxEVT_INIT_DIALOG )
1784EVT_SYS_COLOUR_CHANGED = wx.PyEventBinder( wxEVT_SYS_COLOUR_CHANGED )
1785EVT_DISPLAY_CHANGED = wx.PyEventBinder( wxEVT_DISPLAY_CHANGED )
1786EVT_SHOW = wx.PyEventBinder( wxEVT_SHOW )
1787EVT_MAXIMIZE = wx.PyEventBinder( wxEVT_MAXIMIZE )
1788EVT_ICONIZE = wx.PyEventBinder( wxEVT_ICONIZE )
1789EVT_NAVIGATION_KEY = wx.PyEventBinder( wxEVT_NAVIGATION_KEY )
1790EVT_PALETTE_CHANGED = wx.PyEventBinder( wxEVT_PALETTE_CHANGED )
1791EVT_QUERY_NEW_PALETTE = wx.PyEventBinder( wxEVT_QUERY_NEW_PALETTE )
1792EVT_WINDOW_CREATE = wx.PyEventBinder( wxEVT_CREATE )
1793EVT_WINDOW_DESTROY = wx.PyEventBinder( wxEVT_DESTROY )
1794EVT_SET_CURSOR = wx.PyEventBinder( wxEVT_SET_CURSOR )
1795EVT_MOUSE_CAPTURE_CHANGED = wx.PyEventBinder( wxEVT_MOUSE_CAPTURE_CHANGED )
1796
1797EVT_LEFT_DOWN = wx.PyEventBinder( wxEVT_LEFT_DOWN )
1798EVT_LEFT_UP = wx.PyEventBinder( wxEVT_LEFT_UP )
1799EVT_MIDDLE_DOWN = wx.PyEventBinder( wxEVT_MIDDLE_DOWN )
1800EVT_MIDDLE_UP = wx.PyEventBinder( wxEVT_MIDDLE_UP )
1801EVT_RIGHT_DOWN = wx.PyEventBinder( wxEVT_RIGHT_DOWN )
1802EVT_RIGHT_UP = wx.PyEventBinder( wxEVT_RIGHT_UP )
1803EVT_MOTION = wx.PyEventBinder( wxEVT_MOTION )
1804EVT_LEFT_DCLICK = wx.PyEventBinder( wxEVT_LEFT_DCLICK )
1805EVT_MIDDLE_DCLICK = wx.PyEventBinder( wxEVT_MIDDLE_DCLICK )
1806EVT_RIGHT_DCLICK = wx.PyEventBinder( wxEVT_RIGHT_DCLICK )
1807EVT_LEAVE_WINDOW = wx.PyEventBinder( wxEVT_LEAVE_WINDOW )
1808EVT_ENTER_WINDOW = wx.PyEventBinder( wxEVT_ENTER_WINDOW )
1809EVT_MOUSEWHEEL = wx.PyEventBinder( wxEVT_MOUSEWHEEL )
1810
1811EVT_MOUSE_EVENTS = wx.PyEventBinder([ wxEVT_LEFT_DOWN,
1812 wxEVT_LEFT_UP,
1813 wxEVT_MIDDLE_DOWN,
1814 wxEVT_MIDDLE_UP,
1815 wxEVT_RIGHT_DOWN,
1816 wxEVT_RIGHT_UP,
1817 wxEVT_MOTION,
1818 wxEVT_LEFT_DCLICK,
1819 wxEVT_MIDDLE_DCLICK,
1820 wxEVT_RIGHT_DCLICK,
1821 wxEVT_ENTER_WINDOW,
1822 wxEVT_LEAVE_WINDOW,
1823 wxEVT_MOUSEWHEEL
1824 ])
1825
1826
1827# Scrolling from wxWindow (sent to wxScrolledWindow)
1828EVT_SCROLLWIN = wx.PyEventBinder([ wxEVT_SCROLLWIN_TOP,
1829 wxEVT_SCROLLWIN_BOTTOM,
1830 wxEVT_SCROLLWIN_LINEUP,
1831 wxEVT_SCROLLWIN_LINEDOWN,
1832 wxEVT_SCROLLWIN_PAGEUP,
1833 wxEVT_SCROLLWIN_PAGEDOWN,
1834 wxEVT_SCROLLWIN_THUMBTRACK,
1835 wxEVT_SCROLLWIN_THUMBRELEASE,
1836 ])
1837
1838EVT_SCROLLWIN_TOP = wx.PyEventBinder( wxEVT_SCROLLWIN_TOP )
1839EVT_SCROLLWIN_BOTTOM = wx.PyEventBinder( wxEVT_SCROLLWIN_BOTTOM )
1840EVT_SCROLLWIN_LINEUP = wx.PyEventBinder( wxEVT_SCROLLWIN_LINEUP )
1841EVT_SCROLLWIN_LINEDOWN = wx.PyEventBinder( wxEVT_SCROLLWIN_LINEDOWN )
1842EVT_SCROLLWIN_PAGEUP = wx.PyEventBinder( wxEVT_SCROLLWIN_PAGEUP )
1843EVT_SCROLLWIN_PAGEDOWN = wx.PyEventBinder( wxEVT_SCROLLWIN_PAGEDOWN )
1844EVT_SCROLLWIN_THUMBTRACK = wx.PyEventBinder( wxEVT_SCROLLWIN_THUMBTRACK )
1845EVT_SCROLLWIN_THUMBRELEASE = wx.PyEventBinder( wxEVT_SCROLLWIN_THUMBRELEASE )
1846
1847# Scrolling from wxSlider and wxScrollBar
1848EVT_SCROLL = wx.PyEventBinder([ wxEVT_SCROLL_TOP,
1849 wxEVT_SCROLL_BOTTOM,
1850 wxEVT_SCROLL_LINEUP,
1851 wxEVT_SCROLL_LINEDOWN,
1852 wxEVT_SCROLL_PAGEUP,
1853 wxEVT_SCROLL_PAGEDOWN,
1854 wxEVT_SCROLL_THUMBTRACK,
1855 wxEVT_SCROLL_THUMBRELEASE,
1856 wxEVT_SCROLL_ENDSCROLL,
1857 ])
1858
1859EVT_SCROLL_TOP = wx.PyEventBinder( wxEVT_SCROLL_TOP )
1860EVT_SCROLL_BOTTOM = wx.PyEventBinder( wxEVT_SCROLL_BOTTOM )
1861EVT_SCROLL_LINEUP = wx.PyEventBinder( wxEVT_SCROLL_LINEUP )
1862EVT_SCROLL_LINEDOWN = wx.PyEventBinder( wxEVT_SCROLL_LINEDOWN )
1863EVT_SCROLL_PAGEUP = wx.PyEventBinder( wxEVT_SCROLL_PAGEUP )
1864EVT_SCROLL_PAGEDOWN = wx.PyEventBinder( wxEVT_SCROLL_PAGEDOWN )
1865EVT_SCROLL_THUMBTRACK = wx.PyEventBinder( wxEVT_SCROLL_THUMBTRACK )
1866EVT_SCROLL_THUMBRELEASE = wx.PyEventBinder( wxEVT_SCROLL_THUMBRELEASE )
1867EVT_SCROLL_ENDSCROLL = wx.PyEventBinder( wxEVT_SCROLL_ENDSCROLL )
1868
1869# Scrolling from wxSlider and wxScrollBar, with an id
1870EVT_COMMAND_SCROLL = wx.PyEventBinder([ wxEVT_SCROLL_TOP,
1871 wxEVT_SCROLL_BOTTOM,
1872 wxEVT_SCROLL_LINEUP,
1873 wxEVT_SCROLL_LINEDOWN,
1874 wxEVT_SCROLL_PAGEUP,
1875 wxEVT_SCROLL_PAGEDOWN,
1876 wxEVT_SCROLL_THUMBTRACK,
1877 wxEVT_SCROLL_THUMBRELEASE,
1878 wxEVT_SCROLL_ENDSCROLL,
1879 ], 1)
1880
1881EVT_COMMAND_SCROLL_TOP = wx.PyEventBinder( wxEVT_SCROLL_TOP, 1)
1882EVT_COMMAND_SCROLL_BOTTOM = wx.PyEventBinder( wxEVT_SCROLL_BOTTOM, 1)
1883EVT_COMMAND_SCROLL_LINEUP = wx.PyEventBinder( wxEVT_SCROLL_LINEUP, 1)
1884EVT_COMMAND_SCROLL_LINEDOWN = wx.PyEventBinder( wxEVT_SCROLL_LINEDOWN, 1)
1885EVT_COMMAND_SCROLL_PAGEUP = wx.PyEventBinder( wxEVT_SCROLL_PAGEUP, 1)
1886EVT_COMMAND_SCROLL_PAGEDOWN = wx.PyEventBinder( wxEVT_SCROLL_PAGEDOWN, 1)
1887EVT_COMMAND_SCROLL_THUMBTRACK = wx.PyEventBinder( wxEVT_SCROLL_THUMBTRACK, 1)
1888EVT_COMMAND_SCROLL_THUMBRELEASE = wx.PyEventBinder( wxEVT_SCROLL_THUMBRELEASE, 1)
1889EVT_COMMAND_SCROLL_ENDSCROLL = wx.PyEventBinder( wxEVT_SCROLL_ENDSCROLL, 1)
1890
1891EVT_SPIN_UP = wx.PyEventBinder( wxEVT_SCROLL_LINEUP, 1)
1892EVT_SPIN_DOWN = wx.PyEventBinder( wxEVT_SCROLL_LINEDOWN, 1)
1893EVT_SPIN = wx.PyEventBinder( wxEVT_SCROLL_THUMBTRACK, 1)
1894
1895EVT_BUTTON = wx.PyEventBinder( wxEVT_COMMAND_BUTTON_CLICKED, 1)
1896EVT_CHECKBOX = wx.PyEventBinder( wxEVT_COMMAND_CHECKBOX_CLICKED, 1)
1897EVT_CHOICE = wx.PyEventBinder( wxEVT_COMMAND_CHOICE_SELECTED, 1)
1898EVT_LISTBOX = wx.PyEventBinder( wxEVT_COMMAND_LISTBOX_SELECTED, 1)
1899EVT_LISTBOX_DCLICK = wx.PyEventBinder( wxEVT_COMMAND_LISTBOX_DOUBLECLICKED, 1)
1900EVT_MENU = wx.PyEventBinder( wxEVT_COMMAND_MENU_SELECTED, 1)
1901EVT_MENU_RANGE = wx.PyEventBinder( wxEVT_COMMAND_MENU_SELECTED, 2)
1902EVT_SLIDER = wx.PyEventBinder( wxEVT_COMMAND_SLIDER_UPDATED, 1)
1903EVT_RADIOBOX = wx.PyEventBinder( wxEVT_COMMAND_RADIOBOX_SELECTED, 1)
1904EVT_RADIOBUTTON = wx.PyEventBinder( wxEVT_COMMAND_RADIOBUTTON_SELECTED, 1)
1905
1906EVT_SCROLLBAR = wx.PyEventBinder( wxEVT_COMMAND_SCROLLBAR_UPDATED, 1)
1907EVT_VLBOX = wx.PyEventBinder( wxEVT_COMMAND_VLBOX_SELECTED, 1)
1908EVT_COMBOBOX = wx.PyEventBinder( wxEVT_COMMAND_COMBOBOX_SELECTED, 1)
1909EVT_TOOL = wx.PyEventBinder( wxEVT_COMMAND_TOOL_CLICKED, 1)
1910EVT_TOOL_RANGE = wx.PyEventBinder( wxEVT_COMMAND_TOOL_CLICKED, 2)
1911EVT_TOOL_RCLICKED = wx.PyEventBinder( wxEVT_COMMAND_TOOL_RCLICKED, 1)
1912EVT_TOOL_RCLICKED_RANGE = wx.PyEventBinder( wxEVT_COMMAND_TOOL_RCLICKED, 2)
1913EVT_TOOL_ENTER = wx.PyEventBinder( wxEVT_COMMAND_TOOL_ENTER, 1)
1914EVT_CHECKLISTBOX = wx.PyEventBinder( wxEVT_COMMAND_CHECKLISTBOX_TOGGLED, 1)
1915
1916
1917EVT_COMMAND_LEFT_CLICK = wx.PyEventBinder( wxEVT_COMMAND_LEFT_CLICK, 1)
1918EVT_COMMAND_LEFT_DCLICK = wx.PyEventBinder( wxEVT_COMMAND_LEFT_DCLICK, 1)
1919EVT_COMMAND_RIGHT_CLICK = wx.PyEventBinder( wxEVT_COMMAND_RIGHT_CLICK, 1)
1920EVT_COMMAND_RIGHT_DCLICK = wx.PyEventBinder( wxEVT_COMMAND_RIGHT_DCLICK, 1)
1921EVT_COMMAND_SET_FOCUS = wx.PyEventBinder( wxEVT_COMMAND_SET_FOCUS, 1)
1922EVT_COMMAND_KILL_FOCUS = wx.PyEventBinder( wxEVT_COMMAND_KILL_FOCUS, 1)
1923EVT_COMMAND_ENTER = wx.PyEventBinder( wxEVT_COMMAND_ENTER, 1)
1924
1925EVT_IDLE = wx.PyEventBinder( wxEVT_IDLE )
1926
1927EVT_UPDATE_UI = wx.PyEventBinder( wxEVT_UPDATE_UI, 1)
1928EVT_UPDATE_UI_RANGE = wx.PyEventBinder( wxEVT_UPDATE_UI, 2)
1929
1930EVT_CONTEXT_MENU = wx.PyEventBinder( wxEVT_CONTEXT_MENU )
1931
1932
1933
1934#---------------------------------------------------------------------------
1935
1936class Event(Object):
1937 def __del__(self, destroy=_core.delete_Event):
1938 try:
1939 if self.thisown: destroy(self)
1940 except: pass
1941 def SetEventType(*args, **kwargs): return _core.Event_SetEventType(*args, **kwargs)
1942 def GetEventType(*args, **kwargs): return _core.Event_GetEventType(*args, **kwargs)
1943 def GetEventObject(*args, **kwargs): return _core.Event_GetEventObject(*args, **kwargs)
1944 def SetEventObject(*args, **kwargs): return _core.Event_SetEventObject(*args, **kwargs)
1945 def GetTimestamp(*args, **kwargs): return _core.Event_GetTimestamp(*args, **kwargs)
1946 def SetTimestamp(*args, **kwargs): return _core.Event_SetTimestamp(*args, **kwargs)
1947 def GetId(*args, **kwargs): return _core.Event_GetId(*args, **kwargs)
1948 def SetId(*args, **kwargs): return _core.Event_SetId(*args, **kwargs)
1949 def IsCommandEvent(*args, **kwargs): return _core.Event_IsCommandEvent(*args, **kwargs)
1950 def Skip(*args, **kwargs): return _core.Event_Skip(*args, **kwargs)
1951 def GetSkipped(*args, **kwargs): return _core.Event_GetSkipped(*args, **kwargs)
1952 def ShouldPropagate(*args, **kwargs): return _core.Event_ShouldPropagate(*args, **kwargs)
1953 def StopPropagation(*args, **kwargs): return _core.Event_StopPropagation(*args, **kwargs)
1954 def ResumePropagation(*args, **kwargs): return _core.Event_ResumePropagation(*args, **kwargs)
1955 def Clone(*args, **kwargs): return _core.Event_Clone(*args, **kwargs)
1956 def __init__(self): raise RuntimeError, "No constructor defined"
1957 def __repr__(self):
1958 return "<%s.%s; proxy of C++ wxEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
1959
1960class EventPtr(Event):
1961 def __init__(self, this):
1962 self.this = this
1963 if not hasattr(self,"thisown"): self.thisown = 0
1964 self.__class__ = Event
1965_core.Event_swigregister(EventPtr)
1966
1967#---------------------------------------------------------------------------
1968
1969class PropagationDisabler(object):
1970 def __init__(self, *args, **kwargs):
1971 newobj = _core.new_PropagationDisabler(*args, **kwargs)
1972 self.this = newobj.this
1973 self.thisown = 1
1974 del newobj.thisown
1975 def __del__(self, destroy=_core.delete_PropagationDisabler):
1976 try:
1977 if self.thisown: destroy(self)
1978 except: pass
1979 def __repr__(self):
1980 return "<%s.%s; proxy of C++ wxPropagationDisabler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
1981
1982class PropagationDisablerPtr(PropagationDisabler):
1983 def __init__(self, this):
1984 self.this = this
1985 if not hasattr(self,"thisown"): self.thisown = 0
1986 self.__class__ = PropagationDisabler
1987_core.PropagationDisabler_swigregister(PropagationDisablerPtr)
1988
1989class PropagateOnce(object):
1990 def __init__(self, *args, **kwargs):
1991 newobj = _core.new_PropagateOnce(*args, **kwargs)
1992 self.this = newobj.this
1993 self.thisown = 1
1994 del newobj.thisown
1995 def __del__(self, destroy=_core.delete_PropagateOnce):
1996 try:
1997 if self.thisown: destroy(self)
1998 except: pass
1999 def __repr__(self):
2000 return "<%s.%s; proxy of C++ wxPropagateOnce instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
2001
2002class PropagateOncePtr(PropagateOnce):
2003 def __init__(self, this):
2004 self.this = this
2005 if not hasattr(self,"thisown"): self.thisown = 0
2006 self.__class__ = PropagateOnce
2007_core.PropagateOnce_swigregister(PropagateOncePtr)
2008
2009#---------------------------------------------------------------------------
2010
2011class CommandEvent(Event):
2012 def __init__(self, *args, **kwargs):
2013 newobj = _core.new_CommandEvent(*args, **kwargs)
2014 self.this = newobj.this
2015 self.thisown = 1
2016 del newobj.thisown
2017 def GetSelection(*args, **kwargs): return _core.CommandEvent_GetSelection(*args, **kwargs)
2018 def SetString(*args, **kwargs): return _core.CommandEvent_SetString(*args, **kwargs)
2019 def GetString(*args, **kwargs): return _core.CommandEvent_GetString(*args, **kwargs)
2020 def IsChecked(*args, **kwargs): return _core.CommandEvent_IsChecked(*args, **kwargs)
2021 def IsSelection(*args, **kwargs): return _core.CommandEvent_IsSelection(*args, **kwargs)
2022 def SetExtraLong(*args, **kwargs): return _core.CommandEvent_SetExtraLong(*args, **kwargs)
2023 def GetExtraLong(*args, **kwargs): return _core.CommandEvent_GetExtraLong(*args, **kwargs)
2024 def SetInt(*args, **kwargs): return _core.CommandEvent_SetInt(*args, **kwargs)
2025 def GetInt(*args, **kwargs): return _core.CommandEvent_GetInt(*args, **kwargs)
2026 def Clone(*args, **kwargs): return _core.CommandEvent_Clone(*args, **kwargs)
2027 def __repr__(self):
2028 return "<%s.%s; proxy of C++ wxCommandEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
2029
2030class CommandEventPtr(CommandEvent):
2031 def __init__(self, this):
2032 self.this = this
2033 if not hasattr(self,"thisown"): self.thisown = 0
2034 self.__class__ = CommandEvent
2035_core.CommandEvent_swigregister(CommandEventPtr)
2036
2037#---------------------------------------------------------------------------
2038
2039class NotifyEvent(CommandEvent):
2040 def __init__(self, *args, **kwargs):
2041 newobj = _core.new_NotifyEvent(*args, **kwargs)
2042 self.this = newobj.this
2043 self.thisown = 1
2044 del newobj.thisown
2045 def Veto(*args, **kwargs): return _core.NotifyEvent_Veto(*args, **kwargs)
2046 def Allow(*args, **kwargs): return _core.NotifyEvent_Allow(*args, **kwargs)
2047 def IsAllowed(*args, **kwargs): return _core.NotifyEvent_IsAllowed(*args, **kwargs)
2048 def __repr__(self):
2049 return "<%s.%s; proxy of C++ wxNotifyEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
2050
2051class NotifyEventPtr(NotifyEvent):
2052 def __init__(self, this):
2053 self.this = this
2054 if not hasattr(self,"thisown"): self.thisown = 0
2055 self.__class__ = NotifyEvent
2056_core.NotifyEvent_swigregister(NotifyEventPtr)
2057
2058#---------------------------------------------------------------------------
2059
2060class ScrollEvent(CommandEvent):
2061 def __init__(self, *args, **kwargs):
2062 newobj = _core.new_ScrollEvent(*args, **kwargs)
2063 self.this = newobj.this
2064 self.thisown = 1
2065 del newobj.thisown
2066 def GetOrientation(*args, **kwargs): return _core.ScrollEvent_GetOrientation(*args, **kwargs)
2067 def GetPosition(*args, **kwargs): return _core.ScrollEvent_GetPosition(*args, **kwargs)
2068 def SetOrientation(*args, **kwargs): return _core.ScrollEvent_SetOrientation(*args, **kwargs)
2069 def SetPosition(*args, **kwargs): return _core.ScrollEvent_SetPosition(*args, **kwargs)
2070 def __repr__(self):
2071 return "<%s.%s; proxy of C++ wxScrollEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
2072
2073class ScrollEventPtr(ScrollEvent):
2074 def __init__(self, this):
2075 self.this = this
2076 if not hasattr(self,"thisown"): self.thisown = 0
2077 self.__class__ = ScrollEvent
2078_core.ScrollEvent_swigregister(ScrollEventPtr)
2079
2080#---------------------------------------------------------------------------
2081
2082class ScrollWinEvent(Event):
2083 def __init__(self, *args, **kwargs):
2084 newobj = _core.new_ScrollWinEvent(*args, **kwargs)
2085 self.this = newobj.this
2086 self.thisown = 1
2087 del newobj.thisown
2088 def GetOrientation(*args, **kwargs): return _core.ScrollWinEvent_GetOrientation(*args, **kwargs)
2089 def GetPosition(*args, **kwargs): return _core.ScrollWinEvent_GetPosition(*args, **kwargs)
2090 def SetOrientation(*args, **kwargs): return _core.ScrollWinEvent_SetOrientation(*args, **kwargs)
2091 def SetPosition(*args, **kwargs): return _core.ScrollWinEvent_SetPosition(*args, **kwargs)
2092 def __repr__(self):
2093 return "<%s.%s; proxy of C++ wxScrollWinEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
2094
2095class ScrollWinEventPtr(ScrollWinEvent):
2096 def __init__(self, this):
2097 self.this = this
2098 if not hasattr(self,"thisown"): self.thisown = 0
2099 self.__class__ = ScrollWinEvent
2100_core.ScrollWinEvent_swigregister(ScrollWinEventPtr)
2101
2102#---------------------------------------------------------------------------
2103
2104MOUSE_BTN_ANY = _core.MOUSE_BTN_ANY
2105MOUSE_BTN_NONE = _core.MOUSE_BTN_NONE
2106MOUSE_BTN_LEFT = _core.MOUSE_BTN_LEFT
2107MOUSE_BTN_MIDDLE = _core.MOUSE_BTN_MIDDLE
2108MOUSE_BTN_RIGHT = _core.MOUSE_BTN_RIGHT
2109class MouseEvent(Event):
2110 def __init__(self, *args, **kwargs):
2111 newobj = _core.new_MouseEvent(*args, **kwargs)
2112 self.this = newobj.this
2113 self.thisown = 1
2114 del newobj.thisown
2115 def IsButton(*args, **kwargs): return _core.MouseEvent_IsButton(*args, **kwargs)
2116 def ButtonDown(*args, **kwargs): return _core.MouseEvent_ButtonDown(*args, **kwargs)
2117 def ButtonDClick(*args, **kwargs): return _core.MouseEvent_ButtonDClick(*args, **kwargs)
2118 def ButtonUp(*args, **kwargs): return _core.MouseEvent_ButtonUp(*args, **kwargs)
2119 def Button(*args, **kwargs): return _core.MouseEvent_Button(*args, **kwargs)
2120 def ButtonIsDown(*args, **kwargs): return _core.MouseEvent_ButtonIsDown(*args, **kwargs)
2121 def GetButton(*args, **kwargs): return _core.MouseEvent_GetButton(*args, **kwargs)
2122 def ControlDown(*args, **kwargs): return _core.MouseEvent_ControlDown(*args, **kwargs)
2123 def MetaDown(*args, **kwargs): return _core.MouseEvent_MetaDown(*args, **kwargs)
2124 def AltDown(*args, **kwargs): return _core.MouseEvent_AltDown(*args, **kwargs)
2125 def ShiftDown(*args, **kwargs): return _core.MouseEvent_ShiftDown(*args, **kwargs)
2126 def LeftDown(*args, **kwargs): return _core.MouseEvent_LeftDown(*args, **kwargs)
2127 def MiddleDown(*args, **kwargs): return _core.MouseEvent_MiddleDown(*args, **kwargs)
2128 def RightDown(*args, **kwargs): return _core.MouseEvent_RightDown(*args, **kwargs)
2129 def LeftUp(*args, **kwargs): return _core.MouseEvent_LeftUp(*args, **kwargs)
2130 def MiddleUp(*args, **kwargs): return _core.MouseEvent_MiddleUp(*args, **kwargs)
2131 def RightUp(*args, **kwargs): return _core.MouseEvent_RightUp(*args, **kwargs)
2132 def LeftDClick(*args, **kwargs): return _core.MouseEvent_LeftDClick(*args, **kwargs)
2133 def MiddleDClick(*args, **kwargs): return _core.MouseEvent_MiddleDClick(*args, **kwargs)
2134 def RightDClick(*args, **kwargs): return _core.MouseEvent_RightDClick(*args, **kwargs)
2135 def LeftIsDown(*args, **kwargs): return _core.MouseEvent_LeftIsDown(*args, **kwargs)
2136 def MiddleIsDown(*args, **kwargs): return _core.MouseEvent_MiddleIsDown(*args, **kwargs)
2137 def RightIsDown(*args, **kwargs): return _core.MouseEvent_RightIsDown(*args, **kwargs)
2138 def Dragging(*args, **kwargs): return _core.MouseEvent_Dragging(*args, **kwargs)
2139 def Moving(*args, **kwargs): return _core.MouseEvent_Moving(*args, **kwargs)
2140 def Entering(*args, **kwargs): return _core.MouseEvent_Entering(*args, **kwargs)
2141 def Leaving(*args, **kwargs): return _core.MouseEvent_Leaving(*args, **kwargs)
2142 def GetPosition(*args, **kwargs): return _core.MouseEvent_GetPosition(*args, **kwargs)
2143 def GetPositionTuple(*args, **kwargs): return _core.MouseEvent_GetPositionTuple(*args, **kwargs)
2144 def GetLogicalPosition(*args, **kwargs): return _core.MouseEvent_GetLogicalPosition(*args, **kwargs)
2145 def GetX(*args, **kwargs): return _core.MouseEvent_GetX(*args, **kwargs)
2146 def GetY(*args, **kwargs): return _core.MouseEvent_GetY(*args, **kwargs)
2147 def GetWheelRotation(*args, **kwargs): return _core.MouseEvent_GetWheelRotation(*args, **kwargs)
2148 def GetWheelDelta(*args, **kwargs): return _core.MouseEvent_GetWheelDelta(*args, **kwargs)
2149 def GetLinesPerAction(*args, **kwargs): return _core.MouseEvent_GetLinesPerAction(*args, **kwargs)
2150 def IsPageScroll(*args, **kwargs): return _core.MouseEvent_IsPageScroll(*args, **kwargs)
2151 m_x = property(_core.MouseEvent_m_x_get, _core.MouseEvent_m_x_set)
2152 m_y = property(_core.MouseEvent_m_y_get, _core.MouseEvent_m_y_set)
2153 m_leftDown = property(_core.MouseEvent_m_leftDown_get, _core.MouseEvent_m_leftDown_set)
2154 m_middleDown = property(_core.MouseEvent_m_middleDown_get, _core.MouseEvent_m_middleDown_set)
2155 m_rightDown = property(_core.MouseEvent_m_rightDown_get, _core.MouseEvent_m_rightDown_set)
2156 m_controlDown = property(_core.MouseEvent_m_controlDown_get, _core.MouseEvent_m_controlDown_set)
2157 m_shiftDown = property(_core.MouseEvent_m_shiftDown_get, _core.MouseEvent_m_shiftDown_set)
2158 m_altDown = property(_core.MouseEvent_m_altDown_get, _core.MouseEvent_m_altDown_set)
2159 m_metaDown = property(_core.MouseEvent_m_metaDown_get, _core.MouseEvent_m_metaDown_set)
2160 m_wheelRotation = property(_core.MouseEvent_m_wheelRotation_get, _core.MouseEvent_m_wheelRotation_set)
2161 m_wheelDelta = property(_core.MouseEvent_m_wheelDelta_get, _core.MouseEvent_m_wheelDelta_set)
2162 m_linesPerAction = property(_core.MouseEvent_m_linesPerAction_get, _core.MouseEvent_m_linesPerAction_set)
2163 def __repr__(self):
2164 return "<%s.%s; proxy of C++ wxMouseEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
2165
2166class MouseEventPtr(MouseEvent):
2167 def __init__(self, this):
2168 self.this = this
2169 if not hasattr(self,"thisown"): self.thisown = 0
2170 self.__class__ = MouseEvent
2171_core.MouseEvent_swigregister(MouseEventPtr)
2172
2173#---------------------------------------------------------------------------
2174
2175class SetCursorEvent(Event):
2176 def __init__(self, *args, **kwargs):
2177 newobj = _core.new_SetCursorEvent(*args, **kwargs)
2178 self.this = newobj.this
2179 self.thisown = 1
2180 del newobj.thisown
2181 def GetX(*args, **kwargs): return _core.SetCursorEvent_GetX(*args, **kwargs)
2182 def GetY(*args, **kwargs): return _core.SetCursorEvent_GetY(*args, **kwargs)
2183 def SetCursor(*args, **kwargs): return _core.SetCursorEvent_SetCursor(*args, **kwargs)
2184 def GetCursor(*args, **kwargs): return _core.SetCursorEvent_GetCursor(*args, **kwargs)
2185 def HasCursor(*args, **kwargs): return _core.SetCursorEvent_HasCursor(*args, **kwargs)
2186 def __repr__(self):
2187 return "<%s.%s; proxy of C++ wxSetCursorEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
2188
2189class SetCursorEventPtr(SetCursorEvent):
2190 def __init__(self, this):
2191 self.this = this
2192 if not hasattr(self,"thisown"): self.thisown = 0
2193 self.__class__ = SetCursorEvent
2194_core.SetCursorEvent_swigregister(SetCursorEventPtr)
2195
2196#---------------------------------------------------------------------------
2197
2198class KeyEvent(Event):
2199 def __init__(self, *args, **kwargs):
2200 newobj = _core.new_KeyEvent(*args, **kwargs)
2201 self.this = newobj.this
2202 self.thisown = 1
2203 del newobj.thisown
2204 def ControlDown(*args, **kwargs): return _core.KeyEvent_ControlDown(*args, **kwargs)
2205 def MetaDown(*args, **kwargs): return _core.KeyEvent_MetaDown(*args, **kwargs)
2206 def AltDown(*args, **kwargs): return _core.KeyEvent_AltDown(*args, **kwargs)
2207 def ShiftDown(*args, **kwargs): return _core.KeyEvent_ShiftDown(*args, **kwargs)
2208 def HasModifiers(*args, **kwargs): return _core.KeyEvent_HasModifiers(*args, **kwargs)
2209 def GetKeyCode(*args, **kwargs): return _core.KeyEvent_GetKeyCode(*args, **kwargs)
2210 KeyCode = GetKeyCode
2211 def GetUniChar(*args, **kwargs): return _core.KeyEvent_GetUniChar(*args, **kwargs)
2212 def GetRawKeyCode(*args, **kwargs): return _core.KeyEvent_GetRawKeyCode(*args, **kwargs)
2213 def GetRawKeyFlags(*args, **kwargs): return _core.KeyEvent_GetRawKeyFlags(*args, **kwargs)
2214 def GetPosition(*args, **kwargs): return _core.KeyEvent_GetPosition(*args, **kwargs)
2215 def GetPositionTuple(*args, **kwargs): return _core.KeyEvent_GetPositionTuple(*args, **kwargs)
2216 def GetX(*args, **kwargs): return _core.KeyEvent_GetX(*args, **kwargs)
2217 def GetY(*args, **kwargs): return _core.KeyEvent_GetY(*args, **kwargs)
2218 m_x = property(_core.KeyEvent_m_x_get, _core.KeyEvent_m_x_set)
2219 m_y = property(_core.KeyEvent_m_y_get, _core.KeyEvent_m_y_set)
2220 m_keyCode = property(_core.KeyEvent_m_keyCode_get, _core.KeyEvent_m_keyCode_set)
2221 m_controlDown = property(_core.KeyEvent_m_controlDown_get, _core.KeyEvent_m_controlDown_set)
2222 m_shiftDown = property(_core.KeyEvent_m_shiftDown_get, _core.KeyEvent_m_shiftDown_set)
2223 m_altDown = property(_core.KeyEvent_m_altDown_get, _core.KeyEvent_m_altDown_set)
2224 m_metaDown = property(_core.KeyEvent_m_metaDown_get, _core.KeyEvent_m_metaDown_set)
2225 m_scanCode = property(_core.KeyEvent_m_scanCode_get, _core.KeyEvent_m_scanCode_set)
2226 m_rawCode = property(_core.KeyEvent_m_rawCode_get, _core.KeyEvent_m_rawCode_set)
2227 m_rawFlags = property(_core.KeyEvent_m_rawFlags_get, _core.KeyEvent_m_rawFlags_set)
2228 def __repr__(self):
2229 return "<%s.%s; proxy of C++ wxKeyEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
2230
2231class KeyEventPtr(KeyEvent):
2232 def __init__(self, this):
2233 self.this = this
2234 if not hasattr(self,"thisown"): self.thisown = 0
2235 self.__class__ = KeyEvent
2236_core.KeyEvent_swigregister(KeyEventPtr)
2237
2238#---------------------------------------------------------------------------
2239
2240class SizeEvent(Event):
2241 def __init__(self, *args, **kwargs):
2242 newobj = _core.new_SizeEvent(*args, **kwargs)
2243 self.this = newobj.this
2244 self.thisown = 1
2245 del newobj.thisown
2246 def GetSize(*args, **kwargs): return _core.SizeEvent_GetSize(*args, **kwargs)
2247 def GetRect(*args, **kwargs): return _core.SizeEvent_GetRect(*args, **kwargs)
2248 def SetRect(*args, **kwargs): return _core.SizeEvent_SetRect(*args, **kwargs)
2249 def SetSize(*args, **kwargs): return _core.SizeEvent_SetSize(*args, **kwargs)
2250 m_size = property(_core.SizeEvent_m_size_get, _core.SizeEvent_m_size_set)
2251 m_rect = property(_core.SizeEvent_m_rect_get, _core.SizeEvent_m_rect_set)
2252 def __repr__(self):
2253 return "<%s.%s; proxy of C++ wxSizeEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
2254
2255class SizeEventPtr(SizeEvent):
2256 def __init__(self, this):
2257 self.this = this
2258 if not hasattr(self,"thisown"): self.thisown = 0
2259 self.__class__ = SizeEvent
2260_core.SizeEvent_swigregister(SizeEventPtr)
2261
2262#---------------------------------------------------------------------------
2263
2264class MoveEvent(Event):
2265 def __init__(self, *args, **kwargs):
2266 newobj = _core.new_MoveEvent(*args, **kwargs)
2267 self.this = newobj.this
2268 self.thisown = 1
2269 del newobj.thisown
2270 def GetPosition(*args, **kwargs): return _core.MoveEvent_GetPosition(*args, **kwargs)
2271 def GetRect(*args, **kwargs): return _core.MoveEvent_GetRect(*args, **kwargs)
2272 def SetRect(*args, **kwargs): return _core.MoveEvent_SetRect(*args, **kwargs)
2273 def SetPosition(*args, **kwargs): return _core.MoveEvent_SetPosition(*args, **kwargs)
2274 m_pos = property(_core.MoveEvent_m_pos_get, _core.MoveEvent_m_pos_set)
2275 m_rect = property(_core.MoveEvent_m_rect_get, _core.MoveEvent_m_rect_set)
2276 def __repr__(self):
2277 return "<%s.%s; proxy of C++ wxMoveEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
2278
2279class MoveEventPtr(MoveEvent):
2280 def __init__(self, this):
2281 self.this = this
2282 if not hasattr(self,"thisown"): self.thisown = 0
2283 self.__class__ = MoveEvent
2284_core.MoveEvent_swigregister(MoveEventPtr)
2285
2286#---------------------------------------------------------------------------
2287
2288class PaintEvent(Event):
2289 def __init__(self, *args, **kwargs):
2290 newobj = _core.new_PaintEvent(*args, **kwargs)
2291 self.this = newobj.this
2292 self.thisown = 1
2293 del newobj.thisown
2294 def __repr__(self):
2295 return "<%s.%s; proxy of C++ wxPaintEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
2296
2297class PaintEventPtr(PaintEvent):
2298 def __init__(self, this):
2299 self.this = this
2300 if not hasattr(self,"thisown"): self.thisown = 0
2301 self.__class__ = PaintEvent
2302_core.PaintEvent_swigregister(PaintEventPtr)
2303
2304class NcPaintEvent(Event):
2305 def __init__(self, *args, **kwargs):
2306 newobj = _core.new_NcPaintEvent(*args, **kwargs)
2307 self.this = newobj.this
2308 self.thisown = 1
2309 del newobj.thisown
2310 def __repr__(self):
2311 return "<%s.%s; proxy of C++ wxNcPaintEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
2312
2313class NcPaintEventPtr(NcPaintEvent):
2314 def __init__(self, this):
2315 self.this = this
2316 if not hasattr(self,"thisown"): self.thisown = 0
2317 self.__class__ = NcPaintEvent
2318_core.NcPaintEvent_swigregister(NcPaintEventPtr)
2319
2320#---------------------------------------------------------------------------
2321
2322class EraseEvent(Event):
2323 def __init__(self, *args, **kwargs):
2324 newobj = _core.new_EraseEvent(*args, **kwargs)
2325 self.this = newobj.this
2326 self.thisown = 1
2327 del newobj.thisown
2328 def GetDC(*args, **kwargs): return _core.EraseEvent_GetDC(*args, **kwargs)
2329 def __repr__(self):
2330 return "<%s.%s; proxy of C++ wxEraseEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
2331
2332class EraseEventPtr(EraseEvent):
2333 def __init__(self, this):
2334 self.this = this
2335 if not hasattr(self,"thisown"): self.thisown = 0
2336 self.__class__ = EraseEvent
2337_core.EraseEvent_swigregister(EraseEventPtr)
2338
2339#---------------------------------------------------------------------------
2340
2341class FocusEvent(Event):
2342 def __init__(self, *args, **kwargs):
2343 newobj = _core.new_FocusEvent(*args, **kwargs)
2344 self.this = newobj.this
2345 self.thisown = 1
2346 del newobj.thisown
2347 def GetWindow(*args, **kwargs): return _core.FocusEvent_GetWindow(*args, **kwargs)
2348 def SetWindow(*args, **kwargs): return _core.FocusEvent_SetWindow(*args, **kwargs)
2349 def __repr__(self):
2350 return "<%s.%s; proxy of C++ wxFocusEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
2351
2352class FocusEventPtr(FocusEvent):
2353 def __init__(self, this):
2354 self.this = this
2355 if not hasattr(self,"thisown"): self.thisown = 0
2356 self.__class__ = FocusEvent
2357_core.FocusEvent_swigregister(FocusEventPtr)
2358
2359#---------------------------------------------------------------------------
2360
2361class ChildFocusEvent(CommandEvent):
2362 def __init__(self, *args, **kwargs):
2363 newobj = _core.new_ChildFocusEvent(*args, **kwargs)
2364 self.this = newobj.this
2365 self.thisown = 1
2366 del newobj.thisown
2367 def GetWindow(*args, **kwargs): return _core.ChildFocusEvent_GetWindow(*args, **kwargs)
2368 def __repr__(self):
2369 return "<%s.%s; proxy of C++ wxChildFocusEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
2370
2371class ChildFocusEventPtr(ChildFocusEvent):
2372 def __init__(self, this):
2373 self.this = this
2374 if not hasattr(self,"thisown"): self.thisown = 0
2375 self.__class__ = ChildFocusEvent
2376_core.ChildFocusEvent_swigregister(ChildFocusEventPtr)
2377
2378#---------------------------------------------------------------------------
2379
2380class ActivateEvent(Event):
2381 def __init__(self, *args, **kwargs):
2382 newobj = _core.new_ActivateEvent(*args, **kwargs)
2383 self.this = newobj.this
2384 self.thisown = 1
2385 del newobj.thisown
2386 def GetActive(*args, **kwargs): return _core.ActivateEvent_GetActive(*args, **kwargs)
2387 def __repr__(self):
2388 return "<%s.%s; proxy of C++ wxActivateEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
2389
2390class ActivateEventPtr(ActivateEvent):
2391 def __init__(self, this):
2392 self.this = this
2393 if not hasattr(self,"thisown"): self.thisown = 0
2394 self.__class__ = ActivateEvent
2395_core.ActivateEvent_swigregister(ActivateEventPtr)
2396
2397#---------------------------------------------------------------------------
2398
2399class InitDialogEvent(Event):
2400 def __init__(self, *args, **kwargs):
2401 newobj = _core.new_InitDialogEvent(*args, **kwargs)
2402 self.this = newobj.this
2403 self.thisown = 1
2404 del newobj.thisown
2405 def __repr__(self):
2406 return "<%s.%s; proxy of C++ wxInitDialogEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
2407
2408class InitDialogEventPtr(InitDialogEvent):
2409 def __init__(self, this):
2410 self.this = this
2411 if not hasattr(self,"thisown"): self.thisown = 0
2412 self.__class__ = InitDialogEvent
2413_core.InitDialogEvent_swigregister(InitDialogEventPtr)
2414
2415#---------------------------------------------------------------------------
2416
2417class MenuEvent(Event):
2418 def __init__(self, *args, **kwargs):
2419 newobj = _core.new_MenuEvent(*args, **kwargs)
2420 self.this = newobj.this
2421 self.thisown = 1
2422 del newobj.thisown
2423 def GetMenuId(*args, **kwargs): return _core.MenuEvent_GetMenuId(*args, **kwargs)
2424 def IsPopup(*args, **kwargs): return _core.MenuEvent_IsPopup(*args, **kwargs)
2425 def GetMenu(*args, **kwargs): return _core.MenuEvent_GetMenu(*args, **kwargs)
2426 def __repr__(self):
2427 return "<%s.%s; proxy of C++ wxMenuEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
2428
2429class MenuEventPtr(MenuEvent):
2430 def __init__(self, this):
2431 self.this = this
2432 if not hasattr(self,"thisown"): self.thisown = 0
2433 self.__class__ = MenuEvent
2434_core.MenuEvent_swigregister(MenuEventPtr)
2435
2436#---------------------------------------------------------------------------
2437
2438class CloseEvent(Event):
2439 def __init__(self, *args, **kwargs):
2440 newobj = _core.new_CloseEvent(*args, **kwargs)
2441 self.this = newobj.this
2442 self.thisown = 1
2443 del newobj.thisown
2444 def SetLoggingOff(*args, **kwargs): return _core.CloseEvent_SetLoggingOff(*args, **kwargs)
2445 def GetLoggingOff(*args, **kwargs): return _core.CloseEvent_GetLoggingOff(*args, **kwargs)
2446 def Veto(*args, **kwargs): return _core.CloseEvent_Veto(*args, **kwargs)
2447 def SetCanVeto(*args, **kwargs): return _core.CloseEvent_SetCanVeto(*args, **kwargs)
2448 def CanVeto(*args, **kwargs): return _core.CloseEvent_CanVeto(*args, **kwargs)
2449 def GetVeto(*args, **kwargs): return _core.CloseEvent_GetVeto(*args, **kwargs)
2450 def __repr__(self):
2451 return "<%s.%s; proxy of C++ wxCloseEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
2452
2453class CloseEventPtr(CloseEvent):
2454 def __init__(self, this):
2455 self.this = this
2456 if not hasattr(self,"thisown"): self.thisown = 0
2457 self.__class__ = CloseEvent
2458_core.CloseEvent_swigregister(CloseEventPtr)
2459
2460#---------------------------------------------------------------------------
2461
2462class ShowEvent(Event):
2463 def __init__(self, *args, **kwargs):
2464 newobj = _core.new_ShowEvent(*args, **kwargs)
2465 self.this = newobj.this
2466 self.thisown = 1
2467 del newobj.thisown
2468 def SetShow(*args, **kwargs): return _core.ShowEvent_SetShow(*args, **kwargs)
2469 def GetShow(*args, **kwargs): return _core.ShowEvent_GetShow(*args, **kwargs)
2470 def __repr__(self):
2471 return "<%s.%s; proxy of C++ wxShowEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
2472
2473class ShowEventPtr(ShowEvent):
2474 def __init__(self, this):
2475 self.this = this
2476 if not hasattr(self,"thisown"): self.thisown = 0
2477 self.__class__ = ShowEvent
2478_core.ShowEvent_swigregister(ShowEventPtr)
2479
2480#---------------------------------------------------------------------------
2481
2482class IconizeEvent(Event):
2483 def __init__(self, *args, **kwargs):
2484 newobj = _core.new_IconizeEvent(*args, **kwargs)
2485 self.this = newobj.this
2486 self.thisown = 1
2487 del newobj.thisown
2488 def Iconized(*args, **kwargs): return _core.IconizeEvent_Iconized(*args, **kwargs)
2489 def __repr__(self):
2490 return "<%s.%s; proxy of C++ wxIconizeEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
2491
2492class IconizeEventPtr(IconizeEvent):
2493 def __init__(self, this):
2494 self.this = this
2495 if not hasattr(self,"thisown"): self.thisown = 0
2496 self.__class__ = IconizeEvent
2497_core.IconizeEvent_swigregister(IconizeEventPtr)
2498
2499#---------------------------------------------------------------------------
2500
2501class MaximizeEvent(Event):
2502 def __init__(self, *args, **kwargs):
2503 newobj = _core.new_MaximizeEvent(*args, **kwargs)
2504 self.this = newobj.this
2505 self.thisown = 1
2506 del newobj.thisown
2507 def __repr__(self):
2508 return "<%s.%s; proxy of C++ wxMaximizeEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
2509
2510class MaximizeEventPtr(MaximizeEvent):
2511 def __init__(self, this):
2512 self.this = this
2513 if not hasattr(self,"thisown"): self.thisown = 0
2514 self.__class__ = MaximizeEvent
2515_core.MaximizeEvent_swigregister(MaximizeEventPtr)
2516
2517#---------------------------------------------------------------------------
2518
2519class DropFilesEvent(Event):
2520 def GetPosition(*args, **kwargs): return _core.DropFilesEvent_GetPosition(*args, **kwargs)
2521 def GetNumberOfFiles(*args, **kwargs): return _core.DropFilesEvent_GetNumberOfFiles(*args, **kwargs)
2522 def GetFiles(*args, **kwargs): return _core.DropFilesEvent_GetFiles(*args, **kwargs)
2523 def __init__(self): raise RuntimeError, "No constructor defined"
2524 def __repr__(self):
2525 return "<%s.%s; proxy of C++ wxDropFilesEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
2526
2527class DropFilesEventPtr(DropFilesEvent):
2528 def __init__(self, this):
2529 self.this = this
2530 if not hasattr(self,"thisown"): self.thisown = 0
2531 self.__class__ = DropFilesEvent
2532_core.DropFilesEvent_swigregister(DropFilesEventPtr)
2533
2534#---------------------------------------------------------------------------
2535
2536UPDATE_UI_PROCESS_ALL = _core.UPDATE_UI_PROCESS_ALL
2537UPDATE_UI_PROCESS_SPECIFIED = _core.UPDATE_UI_PROCESS_SPECIFIED
2538class UpdateUIEvent(CommandEvent):
2539 def __init__(self, *args, **kwargs):
2540 newobj = _core.new_UpdateUIEvent(*args, **kwargs)
2541 self.this = newobj.this
2542 self.thisown = 1
2543 del newobj.thisown
2544 def GetChecked(*args, **kwargs): return _core.UpdateUIEvent_GetChecked(*args, **kwargs)
2545 def GetEnabled(*args, **kwargs): return _core.UpdateUIEvent_GetEnabled(*args, **kwargs)
2546 def GetText(*args, **kwargs): return _core.UpdateUIEvent_GetText(*args, **kwargs)
2547 def GetSetText(*args, **kwargs): return _core.UpdateUIEvent_GetSetText(*args, **kwargs)
2548 def GetSetChecked(*args, **kwargs): return _core.UpdateUIEvent_GetSetChecked(*args, **kwargs)
2549 def GetSetEnabled(*args, **kwargs): return _core.UpdateUIEvent_GetSetEnabled(*args, **kwargs)
2550 def Check(*args, **kwargs): return _core.UpdateUIEvent_Check(*args, **kwargs)
2551 def Enable(*args, **kwargs): return _core.UpdateUIEvent_Enable(*args, **kwargs)
2552 def SetText(*args, **kwargs): return _core.UpdateUIEvent_SetText(*args, **kwargs)
2553 SetUpdateInterval = staticmethod(_core.UpdateUIEvent_SetUpdateInterval)
2554 GetUpdateInterval = staticmethod(_core.UpdateUIEvent_GetUpdateInterval)
2555 CanUpdate = staticmethod(_core.UpdateUIEvent_CanUpdate)
2556 ResetUpdateTime = staticmethod(_core.UpdateUIEvent_ResetUpdateTime)
2557 SetMode = staticmethod(_core.UpdateUIEvent_SetMode)
2558 GetMode = staticmethod(_core.UpdateUIEvent_GetMode)
2559 def __repr__(self):
2560 return "<%s.%s; proxy of C++ wxUpdateUIEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
2561
2562class UpdateUIEventPtr(UpdateUIEvent):
2563 def __init__(self, this):
2564 self.this = this
2565 if not hasattr(self,"thisown"): self.thisown = 0
2566 self.__class__ = UpdateUIEvent
2567_core.UpdateUIEvent_swigregister(UpdateUIEventPtr)
2568
2569UpdateUIEvent_SetUpdateInterval = _core.UpdateUIEvent_SetUpdateInterval
2570
2571UpdateUIEvent_GetUpdateInterval = _core.UpdateUIEvent_GetUpdateInterval
2572
2573UpdateUIEvent_CanUpdate = _core.UpdateUIEvent_CanUpdate
2574
2575UpdateUIEvent_ResetUpdateTime = _core.UpdateUIEvent_ResetUpdateTime
2576
2577UpdateUIEvent_SetMode = _core.UpdateUIEvent_SetMode
2578
2579UpdateUIEvent_GetMode = _core.UpdateUIEvent_GetMode
2580
2581#---------------------------------------------------------------------------
2582
2583class SysColourChangedEvent(Event):
2584 def __init__(self, *args, **kwargs):
2585 newobj = _core.new_SysColourChangedEvent(*args, **kwargs)
2586 self.this = newobj.this
2587 self.thisown = 1
2588 del newobj.thisown
2589 def __repr__(self):
2590 return "<%s.%s; proxy of C++ wxSysColourChangedEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
2591
2592class SysColourChangedEventPtr(SysColourChangedEvent):
2593 def __init__(self, this):
2594 self.this = this
2595 if not hasattr(self,"thisown"): self.thisown = 0
2596 self.__class__ = SysColourChangedEvent
2597_core.SysColourChangedEvent_swigregister(SysColourChangedEventPtr)
2598
2599#---------------------------------------------------------------------------
2600
2601class MouseCaptureChangedEvent(Event):
2602 def __init__(self, *args, **kwargs):
2603 newobj = _core.new_MouseCaptureChangedEvent(*args, **kwargs)
2604 self.this = newobj.this
2605 self.thisown = 1
2606 del newobj.thisown
2607 def GetCapturedWindow(*args, **kwargs): return _core.MouseCaptureChangedEvent_GetCapturedWindow(*args, **kwargs)
2608 def __repr__(self):
2609 return "<%s.%s; proxy of C++ wxMouseCaptureChangedEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
2610
2611class MouseCaptureChangedEventPtr(MouseCaptureChangedEvent):
2612 def __init__(self, this):
2613 self.this = this
2614 if not hasattr(self,"thisown"): self.thisown = 0
2615 self.__class__ = MouseCaptureChangedEvent
2616_core.MouseCaptureChangedEvent_swigregister(MouseCaptureChangedEventPtr)
2617
2618#---------------------------------------------------------------------------
2619
2620class DisplayChangedEvent(Event):
2621 def __init__(self, *args, **kwargs):
2622 newobj = _core.new_DisplayChangedEvent(*args, **kwargs)
2623 self.this = newobj.this
2624 self.thisown = 1
2625 del newobj.thisown
2626 def __repr__(self):
2627 return "<%s.%s; proxy of C++ wxDisplayChangedEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
2628
2629class DisplayChangedEventPtr(DisplayChangedEvent):
2630 def __init__(self, this):
2631 self.this = this
2632 if not hasattr(self,"thisown"): self.thisown = 0
2633 self.__class__ = DisplayChangedEvent
2634_core.DisplayChangedEvent_swigregister(DisplayChangedEventPtr)
2635
2636#---------------------------------------------------------------------------
2637
2638class PaletteChangedEvent(Event):
2639 def __init__(self, *args, **kwargs):
2640 newobj = _core.new_PaletteChangedEvent(*args, **kwargs)
2641 self.this = newobj.this
2642 self.thisown = 1
2643 del newobj.thisown
2644 def SetChangedWindow(*args, **kwargs): return _core.PaletteChangedEvent_SetChangedWindow(*args, **kwargs)
2645 def GetChangedWindow(*args, **kwargs): return _core.PaletteChangedEvent_GetChangedWindow(*args, **kwargs)
2646 def __repr__(self):
2647 return "<%s.%s; proxy of C++ wxPaletteChangedEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
2648
2649class PaletteChangedEventPtr(PaletteChangedEvent):
2650 def __init__(self, this):
2651 self.this = this
2652 if not hasattr(self,"thisown"): self.thisown = 0
2653 self.__class__ = PaletteChangedEvent
2654_core.PaletteChangedEvent_swigregister(PaletteChangedEventPtr)
2655
2656#---------------------------------------------------------------------------
2657
2658class QueryNewPaletteEvent(Event):
2659 def __init__(self, *args, **kwargs):
2660 newobj = _core.new_QueryNewPaletteEvent(*args, **kwargs)
2661 self.this = newobj.this
2662 self.thisown = 1
2663 del newobj.thisown
2664 def SetPaletteRealized(*args, **kwargs): return _core.QueryNewPaletteEvent_SetPaletteRealized(*args, **kwargs)
2665 def GetPaletteRealized(*args, **kwargs): return _core.QueryNewPaletteEvent_GetPaletteRealized(*args, **kwargs)
2666 def __repr__(self):
2667 return "<%s.%s; proxy of C++ wxQueryNewPaletteEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
2668
2669class QueryNewPaletteEventPtr(QueryNewPaletteEvent):
2670 def __init__(self, this):
2671 self.this = this
2672 if not hasattr(self,"thisown"): self.thisown = 0
2673 self.__class__ = QueryNewPaletteEvent
2674_core.QueryNewPaletteEvent_swigregister(QueryNewPaletteEventPtr)
2675
2676#---------------------------------------------------------------------------
2677
2678class NavigationKeyEvent(Event):
2679 def __init__(self, *args, **kwargs):
2680 newobj = _core.new_NavigationKeyEvent(*args, **kwargs)
2681 self.this = newobj.this
2682 self.thisown = 1
2683 del newobj.thisown
2684 def GetDirection(*args, **kwargs): return _core.NavigationKeyEvent_GetDirection(*args, **kwargs)
2685 def SetDirection(*args, **kwargs): return _core.NavigationKeyEvent_SetDirection(*args, **kwargs)
2686 def IsWindowChange(*args, **kwargs): return _core.NavigationKeyEvent_IsWindowChange(*args, **kwargs)
2687 def SetWindowChange(*args, **kwargs): return _core.NavigationKeyEvent_SetWindowChange(*args, **kwargs)
2688 def GetCurrentFocus(*args, **kwargs): return _core.NavigationKeyEvent_GetCurrentFocus(*args, **kwargs)
2689 def SetCurrentFocus(*args, **kwargs): return _core.NavigationKeyEvent_SetCurrentFocus(*args, **kwargs)
2690 def __repr__(self):
2691 return "<%s.%s; proxy of C++ wxNavigationKeyEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
2692
2693class NavigationKeyEventPtr(NavigationKeyEvent):
2694 def __init__(self, this):
2695 self.this = this
2696 if not hasattr(self,"thisown"): self.thisown = 0
2697 self.__class__ = NavigationKeyEvent
2698_core.NavigationKeyEvent_swigregister(NavigationKeyEventPtr)
2699
2700#---------------------------------------------------------------------------
2701
2702class WindowCreateEvent(CommandEvent):
2703 def __init__(self, *args, **kwargs):
2704 newobj = _core.new_WindowCreateEvent(*args, **kwargs)
2705 self.this = newobj.this
2706 self.thisown = 1
2707 del newobj.thisown
2708 def GetWindow(*args, **kwargs): return _core.WindowCreateEvent_GetWindow(*args, **kwargs)
2709 def __repr__(self):
2710 return "<%s.%s; proxy of C++ wxWindowCreateEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
2711
2712class WindowCreateEventPtr(WindowCreateEvent):
2713 def __init__(self, this):
2714 self.this = this
2715 if not hasattr(self,"thisown"): self.thisown = 0
2716 self.__class__ = WindowCreateEvent
2717_core.WindowCreateEvent_swigregister(WindowCreateEventPtr)
2718
2719class WindowDestroyEvent(CommandEvent):
2720 def __init__(self, *args, **kwargs):
2721 newobj = _core.new_WindowDestroyEvent(*args, **kwargs)
2722 self.this = newobj.this
2723 self.thisown = 1
2724 del newobj.thisown
2725 def GetWindow(*args, **kwargs): return _core.WindowDestroyEvent_GetWindow(*args, **kwargs)
2726 def __repr__(self):
2727 return "<%s.%s; proxy of C++ wxWindowDestroyEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
2728
2729class WindowDestroyEventPtr(WindowDestroyEvent):
2730 def __init__(self, this):
2731 self.this = this
2732 if not hasattr(self,"thisown"): self.thisown = 0
2733 self.__class__ = WindowDestroyEvent
2734_core.WindowDestroyEvent_swigregister(WindowDestroyEventPtr)
2735
2736#---------------------------------------------------------------------------
2737
2738class ContextMenuEvent(CommandEvent):
2739 def __init__(self, *args, **kwargs):
2740 newobj = _core.new_ContextMenuEvent(*args, **kwargs)
2741 self.this = newobj.this
2742 self.thisown = 1
2743 del newobj.thisown
2744 def GetPosition(*args, **kwargs): return _core.ContextMenuEvent_GetPosition(*args, **kwargs)
2745 def SetPosition(*args, **kwargs): return _core.ContextMenuEvent_SetPosition(*args, **kwargs)
2746 def __repr__(self):
2747 return "<%s.%s; proxy of C++ wxContextMenuEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
2748
2749class ContextMenuEventPtr(ContextMenuEvent):
2750 def __init__(self, this):
2751 self.this = this
2752 if not hasattr(self,"thisown"): self.thisown = 0
2753 self.__class__ = ContextMenuEvent
2754_core.ContextMenuEvent_swigregister(ContextMenuEventPtr)
2755
2756#---------------------------------------------------------------------------
2757
2758IDLE_PROCESS_ALL = _core.IDLE_PROCESS_ALL
2759IDLE_PROCESS_SPECIFIED = _core.IDLE_PROCESS_SPECIFIED
2760class IdleEvent(Event):
2761 def __init__(self, *args, **kwargs):
2762 newobj = _core.new_IdleEvent(*args, **kwargs)
2763 self.this = newobj.this
2764 self.thisown = 1
2765 del newobj.thisown
2766 def RequestMore(*args, **kwargs): return _core.IdleEvent_RequestMore(*args, **kwargs)
2767 def MoreRequested(*args, **kwargs): return _core.IdleEvent_MoreRequested(*args, **kwargs)
2768 SetMode = staticmethod(_core.IdleEvent_SetMode)
2769 GetMode = staticmethod(_core.IdleEvent_GetMode)
2770 CanSend = staticmethod(_core.IdleEvent_CanSend)
2771 def __repr__(self):
2772 return "<%s.%s; proxy of C++ wxIdleEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
2773
2774class IdleEventPtr(IdleEvent):
2775 def __init__(self, this):
2776 self.this = this
2777 if not hasattr(self,"thisown"): self.thisown = 0
2778 self.__class__ = IdleEvent
2779_core.IdleEvent_swigregister(IdleEventPtr)
2780
2781IdleEvent_SetMode = _core.IdleEvent_SetMode
2782
2783IdleEvent_GetMode = _core.IdleEvent_GetMode
2784
2785IdleEvent_CanSend = _core.IdleEvent_CanSend
2786
2787#---------------------------------------------------------------------------
2788
2789class PyEvent(Event):
2790 def __init__(self, *args, **kwargs):
2791 newobj = _core.new_PyEvent(*args, **kwargs)
2792 self.this = newobj.this
2793 self.thisown = 1
2794 del newobj.thisown
2795 self.SetSelf(self)
2796 def __del__(self, destroy=_core.delete_PyEvent):
2797 try:
2798 if self.thisown: destroy(self)
2799 except: pass
2800 def SetSelf(*args, **kwargs): return _core.PyEvent_SetSelf(*args, **kwargs)
2801 def GetSelf(*args, **kwargs): return _core.PyEvent_GetSelf(*args, **kwargs)
2802 def __repr__(self):
2803 return "<%s.%s; proxy of C++ wxPyEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
2804
2805class PyEventPtr(PyEvent):
2806 def __init__(self, this):
2807 self.this = this
2808 if not hasattr(self,"thisown"): self.thisown = 0
2809 self.__class__ = PyEvent
2810_core.PyEvent_swigregister(PyEventPtr)
2811
2812class PyCommandEvent(CommandEvent):
2813 def __init__(self, *args, **kwargs):
2814 newobj = _core.new_PyCommandEvent(*args, **kwargs)
2815 self.this = newobj.this
2816 self.thisown = 1
2817 del newobj.thisown
2818 self.SetSelf(self)
2819 def __del__(self, destroy=_core.delete_PyCommandEvent):
2820 try:
2821 if self.thisown: destroy(self)
2822 except: pass
2823 def SetSelf(*args, **kwargs): return _core.PyCommandEvent_SetSelf(*args, **kwargs)
2824 def GetSelf(*args, **kwargs): return _core.PyCommandEvent_GetSelf(*args, **kwargs)
2825 def __repr__(self):
2826 return "<%s.%s; proxy of C++ wxPyCommandEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
2827
2828class PyCommandEventPtr(PyCommandEvent):
2829 def __init__(self, this):
2830 self.this = this
2831 if not hasattr(self,"thisown"): self.thisown = 0
2832 self.__class__ = PyCommandEvent
2833_core.PyCommandEvent_swigregister(PyCommandEventPtr)
2834
2835#---------------------------------------------------------------------------
2836
2837PYAPP_ASSERT_SUPPRESS = _core.PYAPP_ASSERT_SUPPRESS
2838PYAPP_ASSERT_EXCEPTION = _core.PYAPP_ASSERT_EXCEPTION
2839PYAPP_ASSERT_DIALOG = _core.PYAPP_ASSERT_DIALOG
2840PYAPP_ASSERT_LOG = _core.PYAPP_ASSERT_LOG
2841PRINT_WINDOWS = _core.PRINT_WINDOWS
2842PRINT_POSTSCRIPT = _core.PRINT_POSTSCRIPT
2843class PyApp(EvtHandler):
2844 def __init__(self, *args, **kwargs):
2845 newobj = _core.new_PyApp(*args, **kwargs)
2846 self.this = newobj.this
2847 self.thisown = 1
2848 del newobj.thisown
2849 self._setCallbackInfo(self, PyApp)
2850 self._setOORInfo(self)
2851 def __del__(self, destroy=_core.delete_PyApp):
2852 try:
2853 if self.thisown: destroy(self)
2854 except: pass
2855 def _setCallbackInfo(*args, **kwargs): return _core.PyApp__setCallbackInfo(*args, **kwargs)
2856 def GetAppName(*args, **kwargs): return _core.PyApp_GetAppName(*args, **kwargs)
2857 def SetAppName(*args, **kwargs): return _core.PyApp_SetAppName(*args, **kwargs)
2858 def GetClassName(*args, **kwargs): return _core.PyApp_GetClassName(*args, **kwargs)
2859 def SetClassName(*args, **kwargs): return _core.PyApp_SetClassName(*args, **kwargs)
2860 def GetVendorName(*args, **kwargs): return _core.PyApp_GetVendorName(*args, **kwargs)
2861 def SetVendorName(*args, **kwargs): return _core.PyApp_SetVendorName(*args, **kwargs)
2862 def GetTraits(*args, **kwargs): return _core.PyApp_GetTraits(*args, **kwargs)
2863 def ProcessPendingEvents(*args, **kwargs): return _core.PyApp_ProcessPendingEvents(*args, **kwargs)
2864 def Yield(*args, **kwargs): return _core.PyApp_Yield(*args, **kwargs)
2865 def WakeUpIdle(*args, **kwargs): return _core.PyApp_WakeUpIdle(*args, **kwargs)
2866 def MainLoop(*args, **kwargs): return _core.PyApp_MainLoop(*args, **kwargs)
2867 def Exit(*args, **kwargs): return _core.PyApp_Exit(*args, **kwargs)
2868 def ExitMainLoop(*args, **kwargs): return _core.PyApp_ExitMainLoop(*args, **kwargs)
2869 def Pending(*args, **kwargs): return _core.PyApp_Pending(*args, **kwargs)
2870 def Dispatch(*args, **kwargs): return _core.PyApp_Dispatch(*args, **kwargs)
2871 def ProcessIdle(*args, **kwargs): return _core.PyApp_ProcessIdle(*args, **kwargs)
2872 def SendIdleEvents(*args, **kwargs): return _core.PyApp_SendIdleEvents(*args, **kwargs)
2873 def OnIdle(*args, **kwargs): return _core.PyApp_OnIdle(*args, **kwargs)
2874 def IsActive(*args, **kwargs): return _core.PyApp_IsActive(*args, **kwargs)
2875 def SetTopWindow(*args, **kwargs): return _core.PyApp_SetTopWindow(*args, **kwargs)
2876 def GetTopWindow(*args, **kwargs): return _core.PyApp_GetTopWindow(*args, **kwargs)
2877 def SetExitOnFrameDelete(*args, **kwargs): return _core.PyApp_SetExitOnFrameDelete(*args, **kwargs)
2878 def GetExitOnFrameDelete(*args, **kwargs): return _core.PyApp_GetExitOnFrameDelete(*args, **kwargs)
2879 def SetUseBestVisual(*args, **kwargs): return _core.PyApp_SetUseBestVisual(*args, **kwargs)
2880 def GetUseBestVisual(*args, **kwargs): return _core.PyApp_GetUseBestVisual(*args, **kwargs)
2881 def SetPrintMode(*args, **kwargs): return _core.PyApp_SetPrintMode(*args, **kwargs)
2882 def GetPrintMode(*args, **kwargs): return _core.PyApp_GetPrintMode(*args, **kwargs)
2883 def GetAssertMode(*args, **kwargs): return _core.PyApp_GetAssertMode(*args, **kwargs)
2884 def SetAssertMode(*args, **kwargs): return _core.PyApp_SetAssertMode(*args, **kwargs)
2885 GetMacSupportPCMenuShortcuts = staticmethod(_core.PyApp_GetMacSupportPCMenuShortcuts)
2886 GetMacAboutMenuItemId = staticmethod(_core.PyApp_GetMacAboutMenuItemId)
2887 GetMacPreferencesMenuItemId = staticmethod(_core.PyApp_GetMacPreferencesMenuItemId)
2888 GetMacExitMenuItemId = staticmethod(_core.PyApp_GetMacExitMenuItemId)
2889 GetMacHelpMenuTitleName = staticmethod(_core.PyApp_GetMacHelpMenuTitleName)
2890 SetMacSupportPCMenuShortcuts = staticmethod(_core.PyApp_SetMacSupportPCMenuShortcuts)
2891 SetMacAboutMenuItemId = staticmethod(_core.PyApp_SetMacAboutMenuItemId)
2892 SetMacPreferencesMenuItemId = staticmethod(_core.PyApp_SetMacPreferencesMenuItemId)
2893 SetMacExitMenuItemId = staticmethod(_core.PyApp_SetMacExitMenuItemId)
2894 SetMacHelpMenuTitleName = staticmethod(_core.PyApp_SetMacHelpMenuTitleName)
2895 def _BootstrapApp(*args, **kwargs): return _core.PyApp__BootstrapApp(*args, **kwargs)
2896 GetComCtl32Version = staticmethod(_core.PyApp_GetComCtl32Version)
2897 def __repr__(self):
2898 return "<%s.%s; proxy of C++ wxPyApp instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
2899
2900class PyAppPtr(PyApp):
2901 def __init__(self, this):
2902 self.this = this
2903 if not hasattr(self,"thisown"): self.thisown = 0
2904 self.__class__ = PyApp
2905_core.PyApp_swigregister(PyAppPtr)
2906
2907PyApp_GetMacSupportPCMenuShortcuts = _core.PyApp_GetMacSupportPCMenuShortcuts
2908
2909PyApp_GetMacAboutMenuItemId = _core.PyApp_GetMacAboutMenuItemId
2910
2911PyApp_GetMacPreferencesMenuItemId = _core.PyApp_GetMacPreferencesMenuItemId
2912
2913PyApp_GetMacExitMenuItemId = _core.PyApp_GetMacExitMenuItemId
2914
2915PyApp_GetMacHelpMenuTitleName = _core.PyApp_GetMacHelpMenuTitleName
2916
2917PyApp_SetMacSupportPCMenuShortcuts = _core.PyApp_SetMacSupportPCMenuShortcuts
2918
2919PyApp_SetMacAboutMenuItemId = _core.PyApp_SetMacAboutMenuItemId
2920
2921PyApp_SetMacPreferencesMenuItemId = _core.PyApp_SetMacPreferencesMenuItemId
2922
2923PyApp_SetMacExitMenuItemId = _core.PyApp_SetMacExitMenuItemId
2924
2925PyApp_SetMacHelpMenuTitleName = _core.PyApp_SetMacHelpMenuTitleName
2926
2927PyApp_GetComCtl32Version = _core.PyApp_GetComCtl32Version
2928
2929#---------------------------------------------------------------------------
2930
2931
2932Exit = _core.Exit
2933
2934Yield = _core.Yield
2935
2936YieldIfNeeded = _core.YieldIfNeeded
2937
2938SafeYield = _core.SafeYield
2939
2940WakeUpIdle = _core.WakeUpIdle
2941
2942PostEvent = _core.PostEvent
2943
2944App_CleanUp = _core.App_CleanUp
2945
2946GetApp = _core.GetApp
2947#----------------------------------------------------------------------
2948
2949class PyOnDemandOutputWindow:
2950 def __init__(self, title = "wxPython: stdout/stderr"):
2951 self.frame = None
2952 self.title = title
2953 self.parent = None
2954
2955 def SetParent(self, parent):
2956 self.parent = parent
2957
2958 def OnCloseWindow(self, event):
2959 if self.frame != None:
2960 self.frame.Destroy()
2961 self.frame = None
2962 self.text = None
2963
2964 # These methods provide the file-like output behaviour.
2965 def write(self, str):
2966 if not wx.Thread_IsMain():
2967 # Aquire the GUI mutex before making GUI calls. Mutex is released
2968 # when locker is deleted at the end of this function.
2969 locker = wx.MutexGuiLocker()
2970
2971 if not self.frame:
2972 self.frame = wx.Frame(self.parent, -1, self.title,
2973 style=wx.DEFAULT_FRAME_STYLE | wx.NO_FULL_REPAINT_ON_RESIZE)
2974 self.text = wxTextCtrl(self.frame, -1, "",
2975 style = wx.TE_MULTILINE | wx.TE_READONLY)
2976 self.frame.SetSize((450, 300))
2977 self.frame.Show(True)
2978 EVT_CLOSE(self.frame, self.OnCloseWindow)
2979 self.text.AppendText(str)
2980
2981 def close(self):
2982 if self.frame != None:
2983 if not wx.Thread_IsMain():
2984 locker = wx.MutexGuiLocker()
2985 self.frame.Close()
2986
2987
2988#----------------------------------------------------------------------
2989# The main application class. Derive from this and implement an OnInit
2990# method that creates a frame and then calls self.SetTopWindow(frame)
2991
2992_defRedirect = (wx.Platform == '__WXMSW__' or wx.Platform == '__WXMAC__')
2993
2994class App(wx.PyApp):
2995 outputWindowClass = PyOnDemandOutputWindow
2996
2997 def __init__(self, redirect=_defRedirect, filename=None, useBestVisual=False):
2998 wx.PyApp.__init__(self)
2999
3000 if wx.Platform == "__WXMAC__":
3001 try:
3002 import MacOS
3003 if not MacOS.WMAvailable():
3004 print """\
3005This program needs access to the screen. Please run with 'pythonw',
3006not 'python', and only when you are logged in on the main display of
3007your Mac."""
3008 _sys.exit(1)
3009 except:
3010 pass
3011
3012 # This has to be done before OnInit
3013 self.SetUseBestVisual(useBestVisual)
3014
3015 # Set the default handler for SIGINT. This fixes a problem
3016 # where if Ctrl-C is pressed in the console that started this
3017 # app then it will not appear to do anything, (not even send
3018 # KeyboardInterrupt???) but will later segfault on exit. By
3019 # setting the default handler then the app will exit, as
3020 # expected (depending on platform.)
3021 try:
3022 import signal
3023 signal.signal(signal.SIGINT, signal.SIG_DFL)
3024 except:
3025 pass
3026
3027 # Save and redirect the stdio to a window?
3028 self.stdioWin = None
3029 self.saveStdio = (_sys.stdout, _sys.stderr)
3030 if redirect:
3031 self.RedirectStdio(filename)
3032
3033 # This finishes the initialization of wxWindows and then calls
3034 # the OnInit that should be present in the derived class
3035 self._BootstrapApp()
3036
3037
3038 def __del__(self):
3039 try:
3040 self.RestoreStdio() # Just in case the MainLoop was overridden
3041 except:
3042 pass
3043
3044
3045 def SetTopWindow(self, frame):
3046 if self.stdioWin:
3047 self.stdioWin.SetParent(frame)
3048 wx.PyApp.SetTopWindow(self, frame)
3049
3050
3051 def MainLoop(self):
3052 wx.PyApp.MainLoop(self)
3053 self.RestoreStdio()
3054
3055
3056 def RedirectStdio(self, filename):
3057 if filename:
3058 _sys.stdout = _sys.stderr = open(filename, 'a')
3059 else:
3060 self.stdioWin = self.outputWindowClass()
3061 _sys.stdout = _sys.stderr = self.stdioWin
3062
3063
3064 def RestoreStdio(self):
3065 _sys.stdout, _sys.stderr = self.saveStdio
3066
3067
3068
3069# change from wxPyApp_ to wxApp_
3070App_GetMacSupportPCMenuShortcuts = _core.PyApp_GetMacSupportPCMenuShortcuts
3071App_GetMacAboutMenuItemId = _core.PyApp_GetMacAboutMenuItemId
3072App_GetMacPreferencesMenuItemId = _core.PyApp_GetMacPreferencesMenuItemId
3073App_GetMacExitMenuItemId = _core.PyApp_GetMacExitMenuItemId
3074App_GetMacHelpMenuTitleName = _core.PyApp_GetMacHelpMenuTitleName
3075App_SetMacSupportPCMenuShortcuts = _core.PyApp_SetMacSupportPCMenuShortcuts
3076App_SetMacAboutMenuItemId = _core.PyApp_SetMacAboutMenuItemId
3077App_SetMacPreferencesMenuItemId = _core.PyApp_SetMacPreferencesMenuItemId
3078App_SetMacExitMenuItemId = _core.PyApp_SetMacExitMenuItemId
3079App_SetMacHelpMenuTitleName = _core.PyApp_SetMacHelpMenuTitleName
3080App_GetComCtl32Version = _core.PyApp_GetComCtl32Version
3081
3082#----------------------------------------------------------------------------
3083
3084class PySimpleApp(wx.App):
3085 def __init__(self, redirect=False, filename=None):
3086 wx.App.__init__(self, redirect, filename)
3087 def OnInit(self):
3088 wx.InitAllImageHandlers()
3089 return True
3090
3091
3092class PyWidgetTester(wx.App):
3093 def __init__(self, size = (250, 100)):
3094 self.size = size
3095 wx.App.__init__(self, 0)
3096
3097 def OnInit(self):
3098 self.frame = wxFrame(None, -1, "Widget Tester", pos=(0,0), size=self.size)
3099 self.SetTopWindow(self.frame)
3100 return True
3101
3102 def SetWidget(self, widgetClass, *args):
3103 w = widgetClass(self.frame, *args)
3104 self.frame.Show(True)
3105
3106#----------------------------------------------------------------------------
3107# DO NOT hold any other references to this object. This is how we
3108# know when to cleanup system resources that wxWin is holding. When
3109# the sys module is unloaded, the refcount on sys.__wxPythonCleanup
3110# goes to zero and it calls the wxApp_CleanUp function.
3111
3112class __wxPyCleanup:
3113 def __init__(self):
3114 self.cleanup = _core.App_CleanUp
3115 def __del__(self):
3116 self.cleanup()
3117
3118_sys.__wxPythonCleanup = __wxPyCleanup()
3119
3120## # another possible solution, but it gets called too early...
3121## if sys.version[0] == '2':
3122## import atexit
3123## atexit.register(_core.wxApp_CleanUp)
3124## else:
3125## sys.exitfunc = _core.wxApp_CleanUp
3126
3127
3128#----------------------------------------------------------------------------
3129
3130#---------------------------------------------------------------------------
3131
3132class Window(EvtHandler):
3133 def __init__(self, *args, **kwargs):
3134 newobj = _core.new_Window(*args, **kwargs)
3135 self.this = newobj.this
3136 self.thisown = 1
3137 del newobj.thisown
3138 self._setOORInfo(self)
3139 def Create(*args, **kwargs): return _core.Window_Create(*args, **kwargs)
3140 def Close(*args, **kwargs): return _core.Window_Close(*args, **kwargs)
3141 def Destroy(*args, **kwargs): return _core.Window_Destroy(*args, **kwargs)
3142 def DestroyChildren(*args, **kwargs): return _core.Window_DestroyChildren(*args, **kwargs)
3143 def IsBeingDeleted(*args, **kwargs): return _core.Window_IsBeingDeleted(*args, **kwargs)
3144 def SetTitle(*args, **kwargs): return _core.Window_SetTitle(*args, **kwargs)
3145 def GetTitle(*args, **kwargs): return _core.Window_GetTitle(*args, **kwargs)
3146 def SetLabel(*args, **kwargs): return _core.Window_SetLabel(*args, **kwargs)
3147 def GetLabel(*args, **kwargs): return _core.Window_GetLabel(*args, **kwargs)
3148 def SetName(*args, **kwargs): return _core.Window_SetName(*args, **kwargs)
3149 def GetName(*args, **kwargs): return _core.Window_GetName(*args, **kwargs)
3150 def SetId(*args, **kwargs): return _core.Window_SetId(*args, **kwargs)
3151 def GetId(*args, **kwargs): return _core.Window_GetId(*args, **kwargs)
3152 NewControlId = staticmethod(_core.Window_NewControlId)
3153 NextControlId = staticmethod(_core.Window_NextControlId)
3154 PrevControlId = staticmethod(_core.Window_PrevControlId)
3155 def SetSize(*args, **kwargs): return _core.Window_SetSize(*args, **kwargs)
3156 def SetDimensions(*args, **kwargs): return _core.Window_SetDimensions(*args, **kwargs)
3157 def SetRect(*args, **kwargs): return _core.Window_SetRect(*args, **kwargs)
3158 def SetSizeWH(*args, **kwargs): return _core.Window_SetSizeWH(*args, **kwargs)
3159 def Move(*args, **kwargs): return _core.Window_Move(*args, **kwargs)
3160 SetPosition = Move
3161 def MoveXY(*args, **kwargs): return _core.Window_MoveXY(*args, **kwargs)
3162 def Raise(*args, **kwargs): return _core.Window_Raise(*args, **kwargs)
3163 def Lower(*args, **kwargs): return _core.Window_Lower(*args, **kwargs)
3164 def SetClientSize(*args, **kwargs): return _core.Window_SetClientSize(*args, **kwargs)
3165 def SetClientSizeWH(*args, **kwargs): return _core.Window_SetClientSizeWH(*args, **kwargs)
3166 def SetClientRect(*args, **kwargs): return _core.Window_SetClientRect(*args, **kwargs)
3167 def GetPosition(*args, **kwargs): return _core.Window_GetPosition(*args, **kwargs)
3168 def GetPositionTuple(*args, **kwargs): return _core.Window_GetPositionTuple(*args, **kwargs)
3169 def GetSize(*args, **kwargs): return _core.Window_GetSize(*args, **kwargs)
3170 def GetSizeTuple(*args, **kwargs): return _core.Window_GetSizeTuple(*args, **kwargs)
3171 def GetRect(*args, **kwargs): return _core.Window_GetRect(*args, **kwargs)
3172 def GetClientSize(*args, **kwargs): return _core.Window_GetClientSize(*args, **kwargs)
3173 def GetClientSizeTuple(*args, **kwargs): return _core.Window_GetClientSizeTuple(*args, **kwargs)
3174 def GetClientAreaOrigin(*args, **kwargs): return _core.Window_GetClientAreaOrigin(*args, **kwargs)
3175 def GetClientRect(*args, **kwargs): return _core.Window_GetClientRect(*args, **kwargs)
3176 def GetBestSize(*args, **kwargs): return _core.Window_GetBestSize(*args, **kwargs)
3177 def GetBestSizeTuple(*args, **kwargs): return _core.Window_GetBestSizeTuple(*args, **kwargs)
3178 def GetAdjustedBestSize(*args, **kwargs): return _core.Window_GetAdjustedBestSize(*args, **kwargs)
3179 def Center(*args, **kwargs): return _core.Window_Center(*args, **kwargs)
3180 Centre = Center
3181 def CenterOnScreen(*args, **kwargs): return _core.Window_CenterOnScreen(*args, **kwargs)
3182 CentreOnScreen = CenterOnScreen
3183 def CenterOnParent(*args, **kwargs): return _core.Window_CenterOnParent(*args, **kwargs)
3184 CentreOnParent = CenterOnParent
3185 def Fit(*args, **kwargs): return _core.Window_Fit(*args, **kwargs)
3186 def FitInside(*args, **kwargs): return _core.Window_FitInside(*args, **kwargs)
3187 def SetSizeHints(*args, **kwargs): return _core.Window_SetSizeHints(*args, **kwargs)
3188 def SetVirtualSizeHints(*args, **kwargs): return _core.Window_SetVirtualSizeHints(*args, **kwargs)
3189 def GetMinWidth(*args, **kwargs): return _core.Window_GetMinWidth(*args, **kwargs)
3190 def GetMinHeight(*args, **kwargs): return _core.Window_GetMinHeight(*args, **kwargs)
3191 def GetMaxWidth(*args, **kwargs): return _core.Window_GetMaxWidth(*args, **kwargs)
3192 def GetMaxHeight(*args, **kwargs): return _core.Window_GetMaxHeight(*args, **kwargs)
3193 def GetMaxSize(*args, **kwargs): return _core.Window_GetMaxSize(*args, **kwargs)
3194 def SetVirtualSize(*args, **kwargs): return _core.Window_SetVirtualSize(*args, **kwargs)
3195 def SetVirtualSizeWH(*args, **kwargs): return _core.Window_SetVirtualSizeWH(*args, **kwargs)
3196 def GetVirtualSize(*args, **kwargs): return _core.Window_GetVirtualSize(*args, **kwargs)
3197 def GetVirtualSizeTuple(*args, **kwargs): return _core.Window_GetVirtualSizeTuple(*args, **kwargs)
3198 def GetBestVirtualSize(*args, **kwargs): return _core.Window_GetBestVirtualSize(*args, **kwargs)
3199 def Show(*args, **kwargs): return _core.Window_Show(*args, **kwargs)
3200 def Hide(*args, **kwargs): return _core.Window_Hide(*args, **kwargs)
3201 def Enable(*args, **kwargs): return _core.Window_Enable(*args, **kwargs)
3202 def Disable(*args, **kwargs): return _core.Window_Disable(*args, **kwargs)
3203 def IsShown(*args, **kwargs): return _core.Window_IsShown(*args, **kwargs)
3204 def IsEnabled(*args, **kwargs): return _core.Window_IsEnabled(*args, **kwargs)
3205 def SetWindowStyleFlag(*args, **kwargs): return _core.Window_SetWindowStyleFlag(*args, **kwargs)
3206 def GetWindowStyleFlag(*args, **kwargs): return _core.Window_GetWindowStyleFlag(*args, **kwargs)
3207 def SetWindowStyle(*args, **kwargs): return _core.Window_SetWindowStyle(*args, **kwargs)
3208 def GetWindowStyle(*args, **kwargs): return _core.Window_GetWindowStyle(*args, **kwargs)
3209 def HasFlag(*args, **kwargs): return _core.Window_HasFlag(*args, **kwargs)
3210 def IsRetained(*args, **kwargs): return _core.Window_IsRetained(*args, **kwargs)
3211 def SetExtraStyle(*args, **kwargs): return _core.Window_SetExtraStyle(*args, **kwargs)
3212 def GetExtraStyle(*args, **kwargs): return _core.Window_GetExtraStyle(*args, **kwargs)
3213 def MakeModal(*args, **kwargs): return _core.Window_MakeModal(*args, **kwargs)
3214 def SetThemeEnabled(*args, **kwargs): return _core.Window_SetThemeEnabled(*args, **kwargs)
3215 def GetThemeEnabled(*args, **kwargs): return _core.Window_GetThemeEnabled(*args, **kwargs)
3216 def ShouldInheritColours(*args, **kwargs): return _core.Window_ShouldInheritColours(*args, **kwargs)
3217 def SetFocus(*args, **kwargs): return _core.Window_SetFocus(*args, **kwargs)
3218 def SetFocusFromKbd(*args, **kwargs): return _core.Window_SetFocusFromKbd(*args, **kwargs)
3219 FindFocus = staticmethod(_core.Window_FindFocus)
3220 def AcceptsFocus(*args, **kwargs): return _core.Window_AcceptsFocus(*args, **kwargs)
3221 def AcceptsFocusFromKeyboard(*args, **kwargs): return _core.Window_AcceptsFocusFromKeyboard(*args, **kwargs)
3222 def GetDefaultItem(*args, **kwargs): return _core.Window_GetDefaultItem(*args, **kwargs)
3223 def SetDefaultItem(*args, **kwargs): return _core.Window_SetDefaultItem(*args, **kwargs)
3224 def SetTmpDefaultItem(*args, **kwargs): return _core.Window_SetTmpDefaultItem(*args, **kwargs)
3225 def GetChildren(*args, **kwargs): return _core.Window_GetChildren(*args, **kwargs)
3226 def GetParent(*args, **kwargs): return _core.Window_GetParent(*args, **kwargs)
3227 def GetGrandParent(*args, **kwargs): return _core.Window_GetGrandParent(*args, **kwargs)
3228 def IsTopLevel(*args, **kwargs): return _core.Window_IsTopLevel(*args, **kwargs)
3229 def Reparent(*args, **kwargs): return _core.Window_Reparent(*args, **kwargs)
3230 def AddChild(*args, **kwargs): return _core.Window_AddChild(*args, **kwargs)
3231 def RemoveChild(*args, **kwargs): return _core.Window_RemoveChild(*args, **kwargs)
3232 def FindWindowById(*args, **kwargs): return _core.Window_FindWindowById(*args, **kwargs)
3233 def FindWindowByName(*args, **kwargs): return _core.Window_FindWindowByName(*args, **kwargs)
3234 def GetEventHandler(*args, **kwargs): return _core.Window_GetEventHandler(*args, **kwargs)
3235 def SetEventHandler(*args, **kwargs): return _core.Window_SetEventHandler(*args, **kwargs)
3236 def PushEventHandler(*args, **kwargs): return _core.Window_PushEventHandler(*args, **kwargs)
3237 def PopEventHandler(*args, **kwargs): return _core.Window_PopEventHandler(*args, **kwargs)
3238 def RemoveEventHandler(*args, **kwargs): return _core.Window_RemoveEventHandler(*args, **kwargs)
3239 def SetValidator(*args, **kwargs): return _core.Window_SetValidator(*args, **kwargs)
3240 def GetValidator(*args, **kwargs): return _core.Window_GetValidator(*args, **kwargs)
3241 def SetAcceleratorTable(*args, **kwargs): return _core.Window_SetAcceleratorTable(*args, **kwargs)
3242 def GetAcceleratorTable(*args, **kwargs): return _core.Window_GetAcceleratorTable(*args, **kwargs)
3243 def RegisterHotKey(*args, **kwargs): return _core.Window_RegisterHotKey(*args, **kwargs)
3244 def UnregisterHotKey(*args, **kwargs): return _core.Window_UnregisterHotKey(*args, **kwargs)
3245 def ConvertDialogPointToPixels(*args, **kwargs): return _core.Window_ConvertDialogPointToPixels(*args, **kwargs)
3246 def ConvertDialogSizeToPixels(*args, **kwargs): return _core.Window_ConvertDialogSizeToPixels(*args, **kwargs)
3247 def DLG_PNT(*args, **kwargs): return _core.Window_DLG_PNT(*args, **kwargs)
3248 def DLG_SZE(*args, **kwargs): return _core.Window_DLG_SZE(*args, **kwargs)
3249 def ConvertPixelPointToDialog(*args, **kwargs): return _core.Window_ConvertPixelPointToDialog(*args, **kwargs)
3250 def ConvertPixelSizeToDialog(*args, **kwargs): return _core.Window_ConvertPixelSizeToDialog(*args, **kwargs)
3251 def WarpPointer(*args, **kwargs): return _core.Window_WarpPointer(*args, **kwargs)
3252 def CaptureMouse(*args, **kwargs): return _core.Window_CaptureMouse(*args, **kwargs)
3253 def ReleaseMouse(*args, **kwargs): return _core.Window_ReleaseMouse(*args, **kwargs)
3254 GetCapture = staticmethod(_core.Window_GetCapture)
3255 def HasCapture(*args, **kwargs): return _core.Window_HasCapture(*args, **kwargs)
3256 def Refresh(*args, **kwargs): return _core.Window_Refresh(*args, **kwargs)
3257 def RefreshRect(*args, **kwargs): return _core.Window_RefreshRect(*args, **kwargs)
3258 def Update(*args, **kwargs): return _core.Window_Update(*args, **kwargs)
3259 def ClearBackground(*args, **kwargs): return _core.Window_ClearBackground(*args, **kwargs)
3260 def Freeze(*args, **kwargs): return _core.Window_Freeze(*args, **kwargs)
3261 def Thaw(*args, **kwargs): return _core.Window_Thaw(*args, **kwargs)
3262 def PrepareDC(*args, **kwargs): return _core.Window_PrepareDC(*args, **kwargs)
3263 def GetUpdateRegion(*args, **kwargs): return _core.Window_GetUpdateRegion(*args, **kwargs)
3264 def GetUpdateClientRect(*args, **kwargs): return _core.Window_GetUpdateClientRect(*args, **kwargs)
3265 def IsExposed(*args, **kwargs): return _core.Window_IsExposed(*args, **kwargs)
3266 def IsExposedPoint(*args, **kwargs): return _core.Window_IsExposedPoint(*args, **kwargs)
3267 def isExposedRect(*args, **kwargs): return _core.Window_isExposedRect(*args, **kwargs)
3268 def SetBackgroundColour(*args, **kwargs): return _core.Window_SetBackgroundColour(*args, **kwargs)
3269 def SetForegroundColour(*args, **kwargs): return _core.Window_SetForegroundColour(*args, **kwargs)
3270 def GetBackgroundColour(*args, **kwargs): return _core.Window_GetBackgroundColour(*args, **kwargs)
3271 def GetForegroundColour(*args, **kwargs): return _core.Window_GetForegroundColour(*args, **kwargs)
3272 def SetCursor(*args, **kwargs): return _core.Window_SetCursor(*args, **kwargs)
3273 def GetCursor(*args, **kwargs): return _core.Window_GetCursor(*args, **kwargs)
3274 def SetFont(*args, **kwargs): return _core.Window_SetFont(*args, **kwargs)
3275 def GetFont(*args, **kwargs): return _core.Window_GetFont(*args, **kwargs)
3276 def SetCaret(*args, **kwargs): return _core.Window_SetCaret(*args, **kwargs)
3277 def GetCaret(*args, **kwargs): return _core.Window_GetCaret(*args, **kwargs)
3278 def GetCharHeight(*args, **kwargs): return _core.Window_GetCharHeight(*args, **kwargs)
3279 def GetCharWidth(*args, **kwargs): return _core.Window_GetCharWidth(*args, **kwargs)
3280 def GetTextExtent(*args, **kwargs): return _core.Window_GetTextExtent(*args, **kwargs)
3281 def GetFullTextExtent(*args, **kwargs): return _core.Window_GetFullTextExtent(*args, **kwargs)
3282 def ClientToScreenXY(*args, **kwargs): return _core.Window_ClientToScreenXY(*args, **kwargs)
3283 def ScreenToClientXY(*args, **kwargs): return _core.Window_ScreenToClientXY(*args, **kwargs)
3284 def ClientToScreen(*args, **kwargs): return _core.Window_ClientToScreen(*args, **kwargs)
3285 def ScreenToClient(*args, **kwargs): return _core.Window_ScreenToClient(*args, **kwargs)
3286 def HitTestXY(*args, **kwargs): return _core.Window_HitTestXY(*args, **kwargs)
3287 def HitTest(*args, **kwargs): return _core.Window_HitTest(*args, **kwargs)
3288 def GetBorderFlags(*args, **kwargs): return _core.Window_GetBorderFlags(*args, **kwargs)
3289 def GetBorder(*args, **kwargs): return _core.Window_GetBorder(*args, **kwargs)
3290 def UpdateWindowUI(*args, **kwargs): return _core.Window_UpdateWindowUI(*args, **kwargs)
3291 def PopupMenuXY(*args, **kwargs): return _core.Window_PopupMenuXY(*args, **kwargs)
3292 def PopupMenu(*args, **kwargs): return _core.Window_PopupMenu(*args, **kwargs)
3293 def GetHandle(*args, **kwargs): return _core.Window_GetHandle(*args, **kwargs)
3294 def OnPaint(*args, **kwargs): return _core.Window_OnPaint(*args, **kwargs)
3295 def HasScrollbar(*args, **kwargs): return _core.Window_HasScrollbar(*args, **kwargs)
3296 def SetScrollbar(*args, **kwargs): return _core.Window_SetScrollbar(*args, **kwargs)
3297 def SetScrollPos(*args, **kwargs): return _core.Window_SetScrollPos(*args, **kwargs)
3298 def GetScrollPos(*args, **kwargs): return _core.Window_GetScrollPos(*args, **kwargs)
3299 def GetScrollThumb(*args, **kwargs): return _core.Window_GetScrollThumb(*args, **kwargs)
3300 def GetScrollRange(*args, **kwargs): return _core.Window_GetScrollRange(*args, **kwargs)
3301 def ScrollWindow(*args, **kwargs): return _core.Window_ScrollWindow(*args, **kwargs)
3302 def ScrollLines(*args, **kwargs): return _core.Window_ScrollLines(*args, **kwargs)
3303 def ScrollPages(*args, **kwargs): return _core.Window_ScrollPages(*args, **kwargs)
3304 def LineUp(*args, **kwargs): return _core.Window_LineUp(*args, **kwargs)
3305 def LineDown(*args, **kwargs): return _core.Window_LineDown(*args, **kwargs)
3306 def PageUp(*args, **kwargs): return _core.Window_PageUp(*args, **kwargs)
3307 def PageDown(*args, **kwargs): return _core.Window_PageDown(*args, **kwargs)
3308 def SetHelpText(*args, **kwargs): return _core.Window_SetHelpText(*args, **kwargs)
3309 def SetHelpTextForId(*args, **kwargs): return _core.Window_SetHelpTextForId(*args, **kwargs)
3310 def GetHelpText(*args, **kwargs): return _core.Window_GetHelpText(*args, **kwargs)
3311 def SetToolTipString(*args, **kwargs): return _core.Window_SetToolTipString(*args, **kwargs)
3312 def SetToolTip(*args, **kwargs): return _core.Window_SetToolTip(*args, **kwargs)
3313 def GetToolTip(*args, **kwargs): return _core.Window_GetToolTip(*args, **kwargs)
3314 def SetDropTarget(*args, **kwargs):
3315 val = _core.Window_SetDropTarget(*args, **kwargs)
3316 args[1].thisown = 0
3317 return val
3318 def GetDropTarget(*args, **kwargs): return _core.Window_GetDropTarget(*args, **kwargs)
3319 def DragAcceptFiles(*args, **kwargs): return _core.Window_DragAcceptFiles(*args, **kwargs)
3320 def SetConstraints(*args, **kwargs): return _core.Window_SetConstraints(*args, **kwargs)
3321 def GetConstraints(*args, **kwargs): return _core.Window_GetConstraints(*args, **kwargs)
3322 def SetAutoLayout(*args, **kwargs): return _core.Window_SetAutoLayout(*args, **kwargs)
3323 def GetAutoLayout(*args, **kwargs): return _core.Window_GetAutoLayout(*args, **kwargs)
3324 def Layout(*args, **kwargs): return _core.Window_Layout(*args, **kwargs)
3325 def SetSizer(*args, **kwargs): return _core.Window_SetSizer(*args, **kwargs)
3326 def SetSizerAndFit(*args, **kwargs): return _core.Window_SetSizerAndFit(*args, **kwargs)
3327 def GetSizer(*args, **kwargs): return _core.Window_GetSizer(*args, **kwargs)
3328 def SetContainingSizer(*args, **kwargs): return _core.Window_SetContainingSizer(*args, **kwargs)
3329 def GetContainingSizer(*args, **kwargs): return _core.Window_GetContainingSizer(*args, **kwargs)
3330 def PostCreate(self, pre):
3331 """Phase 3 of the 2-phase create <wink!>
3332 Call this method after precreating the window with the 2-phase create method."""
3333 self.this = pre.this
3334 self.thisown = pre.thisown
3335 pre.thisown = 0
3336 if hasattr(self, '_setOORInfo'):
3337 self._setOORInfo(self)
3338 if hasattr(self, '_setCallbackInfo'):
3339 self._setCallbackInfo(self, self.__class__)
3340
3341 def __repr__(self):
3342 return "<%s.%s; proxy of C++ wxWindow instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
3343
3344class WindowPtr(Window):
3345 def __init__(self, this):
3346 self.this = this
3347 if not hasattr(self,"thisown"): self.thisown = 0
3348 self.__class__ = Window
3349_core.Window_swigregister(WindowPtr)
3350
3351def PreWindow(*args, **kwargs):
3352 val = _core.new_PreWindow(*args, **kwargs)
3353 val.thisown = 1
3354 return val
3355
3356Window_NewControlId = _core.Window_NewControlId
3357
3358Window_NextControlId = _core.Window_NextControlId
3359
3360Window_PrevControlId = _core.Window_PrevControlId
3361
3362Window_FindFocus = _core.Window_FindFocus
3363
3364Window_GetCapture = _core.Window_GetCapture
3365
3366def DLG_PNT(win, point_or_x, y=None):
3367 if y is None:
3368 return win.ConvertDialogPointToPixels(point_or_x)
3369 else:
3370 return win.ConvertDialogPointToPixels(wxPoint(point_or_x, y))
3371
3372def DLG_SZE(win, size_width, height=None):
3373 if height is None:
3374 return win.ConvertDialogSizeToPixels(size_width)
3375 else:
3376 return win.ConvertDialogSizeToPixels(wxSize(size_width, height))
3377
3378
3379FindWindowById = _core.FindWindowById
3380
3381FindWindowByName = _core.FindWindowByName
3382
3383FindWindowByLabel = _core.FindWindowByLabel
3384
3385Window_FromHWND = _core.Window_FromHWND
3386#---------------------------------------------------------------------------
3387
3388class Validator(EvtHandler):
3389 def __init__(self, *args, **kwargs):
3390 newobj = _core.new_Validator(*args, **kwargs)
3391 self.this = newobj.this
3392 self.thisown = 1
3393 del newobj.thisown
3394 self._setOORInfo(self)
3395 def Clone(*args, **kwargs): return _core.Validator_Clone(*args, **kwargs)
3396 def Validate(*args, **kwargs): return _core.Validator_Validate(*args, **kwargs)
3397 def TransferToWindow(*args, **kwargs): return _core.Validator_TransferToWindow(*args, **kwargs)
3398 def TransferFromWindow(*args, **kwargs): return _core.Validator_TransferFromWindow(*args, **kwargs)
3399 def GetWindow(*args, **kwargs): return _core.Validator_GetWindow(*args, **kwargs)
3400 def SetWindow(*args, **kwargs): return _core.Validator_SetWindow(*args, **kwargs)
3401 IsSilent = staticmethod(_core.Validator_IsSilent)
3402 SetBellOnError = staticmethod(_core.Validator_SetBellOnError)
3403 def __repr__(self):
3404 return "<%s.%s; proxy of C++ wxValidator instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
3405
3406class ValidatorPtr(Validator):
3407 def __init__(self, this):
3408 self.this = this
3409 if not hasattr(self,"thisown"): self.thisown = 0
3410 self.__class__ = Validator
3411_core.Validator_swigregister(ValidatorPtr)
3412
3413Validator_IsSilent = _core.Validator_IsSilent
3414
3415Validator_SetBellOnError = _core.Validator_SetBellOnError
3416
3417class PyValidator(Validator):
3418 def __init__(self, *args, **kwargs):
3419 newobj = _core.new_PyValidator(*args, **kwargs)
3420 self.this = newobj.this
3421 self.thisown = 1
3422 del newobj.thisown
3423
3424 self._setCallbackInfo(self, PyValidator, 1)
3425 self._setOORInfo(self)
3426 def _setCallbackInfo(*args, **kwargs): return _core.PyValidator__setCallbackInfo(*args, **kwargs)
3427 def __repr__(self):
3428 return "<%s.%s; proxy of C++ wxPyValidator instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
3429
3430class PyValidatorPtr(PyValidator):
3431 def __init__(self, this):
3432 self.this = this
3433 if not hasattr(self,"thisown"): self.thisown = 0
3434 self.__class__ = PyValidator
3435_core.PyValidator_swigregister(PyValidatorPtr)
3436
3437#---------------------------------------------------------------------------
3438
3439class Menu(EvtHandler):
3440 def __init__(self, *args, **kwargs):
3441 newobj = _core.new_Menu(*args, **kwargs)
3442 self.this = newobj.this
3443 self.thisown = 1
3444 del newobj.thisown
3445 self._setOORInfo(self)
3446 def Append(*args, **kwargs): return _core.Menu_Append(*args, **kwargs)
3447 def AppendSeparator(*args, **kwargs): return _core.Menu_AppendSeparator(*args, **kwargs)
3448 def AppendCheckItem(*args, **kwargs): return _core.Menu_AppendCheckItem(*args, **kwargs)
3449 def AppendRadioItem(*args, **kwargs): return _core.Menu_AppendRadioItem(*args, **kwargs)
3450 def AppendMenu(*args, **kwargs): return _core.Menu_AppendMenu(*args, **kwargs)
3451 def AppendItem(*args, **kwargs): return _core.Menu_AppendItem(*args, **kwargs)
3452 def Break(*args, **kwargs): return _core.Menu_Break(*args, **kwargs)
3453 def InsertItem(*args, **kwargs): return _core.Menu_InsertItem(*args, **kwargs)
3454 def Insert(*args, **kwargs): return _core.Menu_Insert(*args, **kwargs)
3455 def InsertSeparator(*args, **kwargs): return _core.Menu_InsertSeparator(*args, **kwargs)
3456 def InsertCheckItem(*args, **kwargs): return _core.Menu_InsertCheckItem(*args, **kwargs)
3457 def InsertRadioItem(*args, **kwargs): return _core.Menu_InsertRadioItem(*args, **kwargs)
3458 def InsertMenu(*args, **kwargs): return _core.Menu_InsertMenu(*args, **kwargs)
3459 def PrependItem(*args, **kwargs): return _core.Menu_PrependItem(*args, **kwargs)
3460 def Prepend(*args, **kwargs): return _core.Menu_Prepend(*args, **kwargs)
3461 def PrependSeparator(*args, **kwargs): return _core.Menu_PrependSeparator(*args, **kwargs)
3462 def PrependCheckItem(*args, **kwargs): return _core.Menu_PrependCheckItem(*args, **kwargs)
3463 def PrependRadioItem(*args, **kwargs): return _core.Menu_PrependRadioItem(*args, **kwargs)
3464 def PrependMenu(*args, **kwargs): return _core.Menu_PrependMenu(*args, **kwargs)
3465 def Remove(*args, **kwargs): return _core.Menu_Remove(*args, **kwargs)
3466 def RemoveItem(*args, **kwargs): return _core.Menu_RemoveItem(*args, **kwargs)
3467 def Delete(*args, **kwargs): return _core.Menu_Delete(*args, **kwargs)
3468 def DeleteItem(*args, **kwargs): return _core.Menu_DeleteItem(*args, **kwargs)
3469 def Destroy(*args, **kwargs): return _core.Menu_Destroy(*args, **kwargs)
3470 def DestroyId(*args, **kwargs): return _core.Menu_DestroyId(*args, **kwargs)
3471 def DestroyItem(*args, **kwargs): return _core.Menu_DestroyItem(*args, **kwargs)
3472 def GetMenuItemCount(*args, **kwargs): return _core.Menu_GetMenuItemCount(*args, **kwargs)
3473 def GetMenuItems(*args, **kwargs): return _core.Menu_GetMenuItems(*args, **kwargs)
3474 def FindItem(*args, **kwargs): return _core.Menu_FindItem(*args, **kwargs)
3475 def FindItemById(*args, **kwargs): return _core.Menu_FindItemById(*args, **kwargs)
3476 def FindItemByPosition(*args, **kwargs): return _core.Menu_FindItemByPosition(*args, **kwargs)
3477 def Enable(*args, **kwargs): return _core.Menu_Enable(*args, **kwargs)
3478 def IsEnabled(*args, **kwargs): return _core.Menu_IsEnabled(*args, **kwargs)
3479 def Check(*args, **kwargs): return _core.Menu_Check(*args, **kwargs)
3480 def IsChecked(*args, **kwargs): return _core.Menu_IsChecked(*args, **kwargs)
3481 def SetLabel(*args, **kwargs): return _core.Menu_SetLabel(*args, **kwargs)
3482 def GetLabel(*args, **kwargs): return _core.Menu_GetLabel(*args, **kwargs)
3483 def SetHelpString(*args, **kwargs): return _core.Menu_SetHelpString(*args, **kwargs)
3484 def GetHelpString(*args, **kwargs): return _core.Menu_GetHelpString(*args, **kwargs)
3485 def SetTitle(*args, **kwargs): return _core.Menu_SetTitle(*args, **kwargs)
3486 def GetTitle(*args, **kwargs): return _core.Menu_GetTitle(*args, **kwargs)
3487 def SetEventHandler(*args, **kwargs): return _core.Menu_SetEventHandler(*args, **kwargs)
3488 def GetEventHandler(*args, **kwargs): return _core.Menu_GetEventHandler(*args, **kwargs)
3489 def SetInvokingWindow(*args, **kwargs): return _core.Menu_SetInvokingWindow(*args, **kwargs)
3490 def GetInvokingWindow(*args, **kwargs): return _core.Menu_GetInvokingWindow(*args, **kwargs)
3491 def GetStyle(*args, **kwargs): return _core.Menu_GetStyle(*args, **kwargs)
3492 def UpdateUI(*args, **kwargs): return _core.Menu_UpdateUI(*args, **kwargs)
3493 def GetMenuBar(*args, **kwargs): return _core.Menu_GetMenuBar(*args, **kwargs)
3494 def Attach(*args, **kwargs): return _core.Menu_Attach(*args, **kwargs)
3495 def Detach(*args, **kwargs): return _core.Menu_Detach(*args, **kwargs)
3496 def IsAttached(*args, **kwargs): return _core.Menu_IsAttached(*args, **kwargs)
3497 def SetParent(*args, **kwargs): return _core.Menu_SetParent(*args, **kwargs)
3498 def GetParent(*args, **kwargs): return _core.Menu_GetParent(*args, **kwargs)
3499 def __repr__(self):
3500 return "<%s.%s; proxy of C++ wxMenu instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
3501
3502class MenuPtr(Menu):
3503 def __init__(self, this):
3504 self.this = this
3505 if not hasattr(self,"thisown"): self.thisown = 0
3506 self.__class__ = Menu
3507_core.Menu_swigregister(MenuPtr)
3508DefaultValidator = cvar.DefaultValidator
3509
3510#---------------------------------------------------------------------------
3511
3512class MenuBar(Window):
3513 def __init__(self, *args, **kwargs):
3514 newobj = _core.new_MenuBar(*args, **kwargs)
3515 self.this = newobj.this
3516 self.thisown = 1
3517 del newobj.thisown
3518 self._setOORInfo(self)
3519 def Append(*args, **kwargs): return _core.MenuBar_Append(*args, **kwargs)
3520 def Insert(*args, **kwargs): return _core.MenuBar_Insert(*args, **kwargs)
3521 def GetMenuCount(*args, **kwargs): return _core.MenuBar_GetMenuCount(*args, **kwargs)
3522 def GetMenu(*args, **kwargs): return _core.MenuBar_GetMenu(*args, **kwargs)
3523 def Replace(*args, **kwargs): return _core.MenuBar_Replace(*args, **kwargs)
3524 def Remove(*args, **kwargs): return _core.MenuBar_Remove(*args, **kwargs)
3525 def EnableTop(*args, **kwargs): return _core.MenuBar_EnableTop(*args, **kwargs)
3526 def IsEnabledTop(*args, **kwargs): return _core.MenuBar_IsEnabledTop(*args, **kwargs)
3527 def SetLabelTop(*args, **kwargs): return _core.MenuBar_SetLabelTop(*args, **kwargs)
3528 def GetLabelTop(*args, **kwargs): return _core.MenuBar_GetLabelTop(*args, **kwargs)
3529 def FindMenuItem(*args, **kwargs): return _core.MenuBar_FindMenuItem(*args, **kwargs)
3530 def FindItemById(*args, **kwargs): return _core.MenuBar_FindItemById(*args, **kwargs)
3531 def FindMenu(*args, **kwargs): return _core.MenuBar_FindMenu(*args, **kwargs)
3532 def Enable(*args, **kwargs): return _core.MenuBar_Enable(*args, **kwargs)
3533 def Check(*args, **kwargs): return _core.MenuBar_Check(*args, **kwargs)
3534 def IsChecked(*args, **kwargs): return _core.MenuBar_IsChecked(*args, **kwargs)
3535 def IsEnabled(*args, **kwargs): return _core.MenuBar_IsEnabled(*args, **kwargs)
3536 def SetLabel(*args, **kwargs): return _core.MenuBar_SetLabel(*args, **kwargs)
3537 def GetLabel(*args, **kwargs): return _core.MenuBar_GetLabel(*args, **kwargs)
3538 def SetHelpString(*args, **kwargs): return _core.MenuBar_SetHelpString(*args, **kwargs)
3539 def GetHelpString(*args, **kwargs): return _core.MenuBar_GetHelpString(*args, **kwargs)
3540 def GetFrame(*args, **kwargs): return _core.MenuBar_GetFrame(*args, **kwargs)
3541 def IsAttached(*args, **kwargs): return _core.MenuBar_IsAttached(*args, **kwargs)
3542 def Attach(*args, **kwargs): return _core.MenuBar_Attach(*args, **kwargs)
3543 def Detach(*args, **kwargs): return _core.MenuBar_Detach(*args, **kwargs)
3544 def __repr__(self):
3545 return "<%s.%s; proxy of C++ wxMenuBar instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
3546
3547class MenuBarPtr(MenuBar):
3548 def __init__(self, this):
3549 self.this = this
3550 if not hasattr(self,"thisown"): self.thisown = 0
3551 self.__class__ = MenuBar
3552_core.MenuBar_swigregister(MenuBarPtr)
3553
3554#---------------------------------------------------------------------------
3555
3556class MenuItem(Object):
3557 def __init__(self, *args, **kwargs):
3558 newobj = _core.new_MenuItem(*args, **kwargs)
3559 self.this = newobj.this
3560 self.thisown = 1
3561 del newobj.thisown
3562 def GetMenu(*args, **kwargs): return _core.MenuItem_GetMenu(*args, **kwargs)
3563 def SetMenu(*args, **kwargs): return _core.MenuItem_SetMenu(*args, **kwargs)
3564 def SetId(*args, **kwargs): return _core.MenuItem_SetId(*args, **kwargs)
3565 def GetId(*args, **kwargs): return _core.MenuItem_GetId(*args, **kwargs)
3566 def IsSeparator(*args, **kwargs): return _core.MenuItem_IsSeparator(*args, **kwargs)
3567 def SetText(*args, **kwargs): return _core.MenuItem_SetText(*args, **kwargs)
3568 def GetLabel(*args, **kwargs): return _core.MenuItem_GetLabel(*args, **kwargs)
3569 def GetText(*args, **kwargs): return _core.MenuItem_GetText(*args, **kwargs)
3570 GetLabelFromText = staticmethod(_core.MenuItem_GetLabelFromText)
3571 def GetKind(*args, **kwargs): return _core.MenuItem_GetKind(*args, **kwargs)
3572 def SetCheckable(*args, **kwargs): return _core.MenuItem_SetCheckable(*args, **kwargs)
3573 def IsCheckable(*args, **kwargs): return _core.MenuItem_IsCheckable(*args, **kwargs)
3574 def IsSubMenu(*args, **kwargs): return _core.MenuItem_IsSubMenu(*args, **kwargs)
3575 def SetSubMenu(*args, **kwargs): return _core.MenuItem_SetSubMenu(*args, **kwargs)
3576 def GetSubMenu(*args, **kwargs): return _core.MenuItem_GetSubMenu(*args, **kwargs)
3577 def Enable(*args, **kwargs): return _core.MenuItem_Enable(*args, **kwargs)
3578 def IsEnabled(*args, **kwargs): return _core.MenuItem_IsEnabled(*args, **kwargs)
3579 def Check(*args, **kwargs): return _core.MenuItem_Check(*args, **kwargs)
3580 def IsChecked(*args, **kwargs): return _core.MenuItem_IsChecked(*args, **kwargs)
3581 def Toggle(*args, **kwargs): return _core.MenuItem_Toggle(*args, **kwargs)
3582 def SetHelp(*args, **kwargs): return _core.MenuItem_SetHelp(*args, **kwargs)
3583 def GetHelp(*args, **kwargs): return _core.MenuItem_GetHelp(*args, **kwargs)
3584 def GetAccel(*args, **kwargs): return _core.MenuItem_GetAccel(*args, **kwargs)
3585 def SetAccel(*args, **kwargs): return _core.MenuItem_SetAccel(*args, **kwargs)
3586 def SetFont(*args, **kwargs): return _core.MenuItem_SetFont(*args, **kwargs)
3587 def GetFont(*args, **kwargs): return _core.MenuItem_GetFont(*args, **kwargs)
3588 def SetTextColour(*args, **kwargs): return _core.MenuItem_SetTextColour(*args, **kwargs)
3589 def GetTextColour(*args, **kwargs): return _core.MenuItem_GetTextColour(*args, **kwargs)
3590 def SetBackgroundColour(*args, **kwargs): return _core.MenuItem_SetBackgroundColour(*args, **kwargs)
3591 def GetBackgroundColour(*args, **kwargs): return _core.MenuItem_GetBackgroundColour(*args, **kwargs)
3592 def SetBitmaps(*args, **kwargs): return _core.MenuItem_SetBitmaps(*args, **kwargs)
3593 def SetDisabledBitmap(*args, **kwargs): return _core.MenuItem_SetDisabledBitmap(*args, **kwargs)
3594 def GetDisabledBitmap(*args, **kwargs): return _core.MenuItem_GetDisabledBitmap(*args, **kwargs)
3595 def SetMarginWidth(*args, **kwargs): return _core.MenuItem_SetMarginWidth(*args, **kwargs)
3596 def GetMarginWidth(*args, **kwargs): return _core.MenuItem_GetMarginWidth(*args, **kwargs)
3597 GetDefaultMarginWidth = staticmethod(_core.MenuItem_GetDefaultMarginWidth)
3598 def IsOwnerDrawn(*args, **kwargs): return _core.MenuItem_IsOwnerDrawn(*args, **kwargs)
3599 def SetOwnerDrawn(*args, **kwargs): return _core.MenuItem_SetOwnerDrawn(*args, **kwargs)
3600 def ResetOwnerDrawn(*args, **kwargs): return _core.MenuItem_ResetOwnerDrawn(*args, **kwargs)
3601 def SetBitmap(*args, **kwargs): return _core.MenuItem_SetBitmap(*args, **kwargs)
3602 def GetBitmap(*args, **kwargs): return _core.MenuItem_GetBitmap(*args, **kwargs)
3603 def __repr__(self):
3604 return "<%s.%s; proxy of C++ wxMenuItem instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
3605
3606class MenuItemPtr(MenuItem):
3607 def __init__(self, this):
3608 self.this = this
3609 if not hasattr(self,"thisown"): self.thisown = 0
3610 self.__class__ = MenuItem
3611_core.MenuItem_swigregister(MenuItemPtr)
3612
3613MenuItem_GetLabelFromText = _core.MenuItem_GetLabelFromText
3614
3615MenuItem_GetDefaultMarginWidth = _core.MenuItem_GetDefaultMarginWidth
3616
3617#---------------------------------------------------------------------------
3618
3619class Control(Window):
3620 def __init__(self, *args, **kwargs):
3621 newobj = _core.new_Control(*args, **kwargs)
3622 self.this = newobj.this
3623 self.thisown = 1
3624 del newobj.thisown
3625 self._setOORInfo(self)
3626 def Create(*args, **kwargs): return _core.Control_Create(*args, **kwargs)
3627 def Command(*args, **kwargs): return _core.Control_Command(*args, **kwargs)
3628 def GetLabel(*args, **kwargs): return _core.Control_GetLabel(*args, **kwargs)
3629 def SetLabel(*args, **kwargs): return _core.Control_SetLabel(*args, **kwargs)
3630 def __repr__(self):
3631 return "<%s.%s; proxy of C++ wxControl instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
3632
3633class ControlPtr(Control):
3634 def __init__(self, this):
3635 self.this = this
3636 if not hasattr(self,"thisown"): self.thisown = 0
3637 self.__class__ = Control
3638_core.Control_swigregister(ControlPtr)
3639
3640def PreControl(*args, **kwargs):
3641 val = _core.new_PreControl(*args, **kwargs)
3642 val.thisown = 1
3643 return val
3644
3645#---------------------------------------------------------------------------
3646
3647class ItemContainer(object):
3648 def Append(*args, **kwargs): return _core.ItemContainer_Append(*args, **kwargs)
3649 def AppendItems(*args, **kwargs): return _core.ItemContainer_AppendItems(*args, **kwargs)
3650 def Insert(*args, **kwargs): return _core.ItemContainer_Insert(*args, **kwargs)
3651 def Clear(*args, **kwargs): return _core.ItemContainer_Clear(*args, **kwargs)
3652 def Delete(*args, **kwargs): return _core.ItemContainer_Delete(*args, **kwargs)
3653 def GetCount(*args, **kwargs): return _core.ItemContainer_GetCount(*args, **kwargs)
3654 def IsEmpty(*args, **kwargs): return _core.ItemContainer_IsEmpty(*args, **kwargs)
3655 def GetString(*args, **kwargs): return _core.ItemContainer_GetString(*args, **kwargs)
3656 def GetStrings(*args, **kwargs): return _core.ItemContainer_GetStrings(*args, **kwargs)
3657 def SetString(*args, **kwargs): return _core.ItemContainer_SetString(*args, **kwargs)
3658 def FindString(*args, **kwargs): return _core.ItemContainer_FindString(*args, **kwargs)
3659 def Select(*args, **kwargs): return _core.ItemContainer_Select(*args, **kwargs)
3660 def GetSelection(*args, **kwargs): return _core.ItemContainer_GetSelection(*args, **kwargs)
3661 def GetStringSelection(*args, **kwargs): return _core.ItemContainer_GetStringSelection(*args, **kwargs)
3662 def GetClientData(*args, **kwargs): return _core.ItemContainer_GetClientData(*args, **kwargs)
3663 def SetClientData(*args, **kwargs): return _core.ItemContainer_SetClientData(*args, **kwargs)
3664 def __init__(self): raise RuntimeError, "No constructor defined"
3665 def __repr__(self):
3666 return "<%s.%s; proxy of C++ wxItemContainer instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
3667
3668class ItemContainerPtr(ItemContainer):
3669 def __init__(self, this):
3670 self.this = this
3671 if not hasattr(self,"thisown"): self.thisown = 0
3672 self.__class__ = ItemContainer
3673_core.ItemContainer_swigregister(ItemContainerPtr)
3674
3675#---------------------------------------------------------------------------
3676
3677class ControlWithItems(Control,ItemContainer):
3678 def __init__(self): raise RuntimeError, "No constructor defined"
3679 def __repr__(self):
3680 return "<%s.%s; proxy of C++ wxControlWithItems instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
3681
3682class ControlWithItemsPtr(ControlWithItems):
3683 def __init__(self, this):
3684 self.this = this
3685 if not hasattr(self,"thisown"): self.thisown = 0
3686 self.__class__ = ControlWithItems
3687_core.ControlWithItems_swigregister(ControlWithItemsPtr)
3688
3689#---------------------------------------------------------------------------
3690
3691class SizerItem(Object):
3692 def __init__(self, *args, **kwargs):
3693 newobj = _core.new_SizerItem(*args, **kwargs)
3694 self.this = newobj.this
3695 self.thisown = 1
3696 del newobj.thisown
3697 def DeleteWindows(*args, **kwargs): return _core.SizerItem_DeleteWindows(*args, **kwargs)
3698 def DetachSizer(*args, **kwargs): return _core.SizerItem_DetachSizer(*args, **kwargs)
3699 def GetSize(*args, **kwargs): return _core.SizerItem_GetSize(*args, **kwargs)
3700 def CalcMin(*args, **kwargs): return _core.SizerItem_CalcMin(*args, **kwargs)
3701 def SetDimension(*args, **kwargs): return _core.SizerItem_SetDimension(*args, **kwargs)
3702 def GetMinSize(*args, **kwargs): return _core.SizerItem_GetMinSize(*args, **kwargs)
3703 def SetInitSize(*args, **kwargs): return _core.SizerItem_SetInitSize(*args, **kwargs)
3704 def SetRatioWH(*args, **kwargs): return _core.SizerItem_SetRatioWH(*args, **kwargs)
3705 def SetRatioSize(*args, **kwargs): return _core.SizerItem_SetRatioSize(*args, **kwargs)
3706 def SetRatio(*args, **kwargs): return _core.SizerItem_SetRatio(*args, **kwargs)
3707 def GetRatio(*args, **kwargs): return _core.SizerItem_GetRatio(*args, **kwargs)
3708 def IsWindow(*args, **kwargs): return _core.SizerItem_IsWindow(*args, **kwargs)
3709 def IsSizer(*args, **kwargs): return _core.SizerItem_IsSizer(*args, **kwargs)
3710 def IsSpacer(*args, **kwargs): return _core.SizerItem_IsSpacer(*args, **kwargs)
3711 def SetProportion(*args, **kwargs): return _core.SizerItem_SetProportion(*args, **kwargs)
3712 def GetProportion(*args, **kwargs): return _core.SizerItem_GetProportion(*args, **kwargs)
3713 def SetFlag(*args, **kwargs): return _core.SizerItem_SetFlag(*args, **kwargs)
3714 def GetFlag(*args, **kwargs): return _core.SizerItem_GetFlag(*args, **kwargs)
3715 def SetBorder(*args, **kwargs): return _core.SizerItem_SetBorder(*args, **kwargs)
3716 def GetBorder(*args, **kwargs): return _core.SizerItem_GetBorder(*args, **kwargs)
3717 def GetWindow(*args, **kwargs): return _core.SizerItem_GetWindow(*args, **kwargs)
3718 def SetWindow(*args, **kwargs): return _core.SizerItem_SetWindow(*args, **kwargs)
3719 def GetSizer(*args, **kwargs): return _core.SizerItem_GetSizer(*args, **kwargs)
3720 def SetSizer(*args, **kwargs): return _core.SizerItem_SetSizer(*args, **kwargs)
3721 def GetSpacer(*args, **kwargs): return _core.SizerItem_GetSpacer(*args, **kwargs)
3722 def SetSpacer(*args, **kwargs): return _core.SizerItem_SetSpacer(*args, **kwargs)
3723 def Show(*args, **kwargs): return _core.SizerItem_Show(*args, **kwargs)
3724 def IsShown(*args, **kwargs): return _core.SizerItem_IsShown(*args, **kwargs)
3725 def GetPosition(*args, **kwargs): return _core.SizerItem_GetPosition(*args, **kwargs)
3726 def GetUserData(*args, **kwargs): return _core.SizerItem_GetUserData(*args, **kwargs)
3727 def __repr__(self):
3728 return "<%s.%s; proxy of C++ wxSizerItem instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
3729
3730class SizerItemPtr(SizerItem):
3731 def __init__(self, this):
3732 self.this = this
3733 if not hasattr(self,"thisown"): self.thisown = 0
3734 self.__class__ = SizerItem
3735_core.SizerItem_swigregister(SizerItemPtr)
3736
3737def SizerItemSpacer(*args, **kwargs):
3738 val = _core.new_SizerItemSpacer(*args, **kwargs)
3739 val.thisown = 1
3740 return val
3741
3742def SizerItemWindow(*args, **kwargs):
3743 val = _core.new_SizerItemWindow(*args, **kwargs)
3744 val.thisown = 1
3745 return val
3746
3747def SizerItemSizer(*args, **kwargs):
3748 val = _core.new_SizerItemSizer(*args, **kwargs)
3749 val.thisown = 1
3750 return val
3751
3752class Sizer(Object):
3753 def _setOORInfo(*args, **kwargs): return _core.Sizer__setOORInfo(*args, **kwargs)
3754 def Add(*args, **kwargs): return _core.Sizer_Add(*args, **kwargs)
3755 def Insert(*args, **kwargs): return _core.Sizer_Insert(*args, **kwargs)
3756 def Prepend(*args, **kwargs): return _core.Sizer_Prepend(*args, **kwargs)
3757 def Remove(*args, **kwargs): return _core.Sizer_Remove(*args, **kwargs)
3758 def _SetItemMinSize(*args, **kwargs): return _core.Sizer__SetItemMinSize(*args, **kwargs)
3759 def AddItem(*args, **kwargs): return _core.Sizer_AddItem(*args, **kwargs)
3760 def InsertItem(*args, **kwargs): return _core.Sizer_InsertItem(*args, **kwargs)
3761 def PrependItem(*args, **kwargs): return _core.Sizer_PrependItem(*args, **kwargs)
3762 def AddMany(self, widgets):
3763 for childinfo in widgets:
3764 if type(childinfo) != type(()):
3765 childinfo = (childinfo, )
3766 self.Add(*childinfo)
3767
3768
3769 AddWindow = AddSizer = AddSpacer = Add
3770 PrependWindow = PrependSizer = PrependSpacer = Prepend
3771 InsertWindow = InsertSizer = InsertSpacer = Insert
3772 RemoveWindow = RemoveSizer = RemovePos = Remove
3773
3774
3775 def SetItemMinSize(self, item, *args):
3776 if len(args) == 2:
3777 return self._SetItemMinSize(item, args)
3778 else:
3779 return self._SetItemMinSize(item, args[0])
3780
3781 def SetDimension(*args, **kwargs): return _core.Sizer_SetDimension(*args, **kwargs)
3782 def SetMinSize(*args, **kwargs): return _core.Sizer_SetMinSize(*args, **kwargs)
3783 def GetSize(*args, **kwargs): return _core.Sizer_GetSize(*args, **kwargs)
3784 def GetPosition(*args, **kwargs): return _core.Sizer_GetPosition(*args, **kwargs)
3785 def GetMinSize(*args, **kwargs): return _core.Sizer_GetMinSize(*args, **kwargs)
3786 def GetSizeTuple(self):
3787 return self.GetSize().asTuple()
3788 def GetPositionTuple(self):
3789 return self.GetPosition().asTuple()
3790 def GetMinSizeTuple(self):
3791 return self.GetMinSize().asTuple()
3792
3793 def RecalcSizes(*args, **kwargs): return _core.Sizer_RecalcSizes(*args, **kwargs)
3794 def CalcMin(*args, **kwargs): return _core.Sizer_CalcMin(*args, **kwargs)
3795 def Layout(*args, **kwargs): return _core.Sizer_Layout(*args, **kwargs)
3796 def Fit(*args, **kwargs): return _core.Sizer_Fit(*args, **kwargs)
3797 def FitInside(*args, **kwargs): return _core.Sizer_FitInside(*args, **kwargs)
3798 def SetSizeHints(*args, **kwargs): return _core.Sizer_SetSizeHints(*args, **kwargs)
3799 def SetVirtualSizeHints(*args, **kwargs): return _core.Sizer_SetVirtualSizeHints(*args, **kwargs)
3800 def Clear(*args, **kwargs): return _core.Sizer_Clear(*args, **kwargs)
3801 def DeleteWindows(*args, **kwargs): return _core.Sizer_DeleteWindows(*args, **kwargs)
3802 def GetChildren(*args, **kwargs): return _core.Sizer_GetChildren(*args, **kwargs)
3803 def Show(*args, **kwargs): return _core.Sizer_Show(*args, **kwargs)
3804 def Hide(*args, **kwargs): return _core.Sizer_Hide(*args, **kwargs)
3805 def IsShown(*args, **kwargs): return _core.Sizer_IsShown(*args, **kwargs)
3806 def ShowItems(*args, **kwargs): return _core.Sizer_ShowItems(*args, **kwargs)
3807 def __init__(self): raise RuntimeError, "No constructor defined"
3808 def __repr__(self):
3809 return "<%s.%s; proxy of C++ wxSizer instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
3810
3811class SizerPtr(Sizer):
3812 def __init__(self, this):
3813 self.this = this
3814 if not hasattr(self,"thisown"): self.thisown = 0
3815 self.__class__ = Sizer
3816_core.Sizer_swigregister(SizerPtr)
3817
3818class PySizer(Sizer):
3819 def __init__(self, *args, **kwargs):
3820 newobj = _core.new_PySizer(*args, **kwargs)
3821 self.this = newobj.this
3822 self.thisown = 1
3823 del newobj.thisown
3824 self._setCallbackInfo(self, PySizer);self._setOORInfo(self)
3825 def _setCallbackInfo(*args, **kwargs): return _core.PySizer__setCallbackInfo(*args, **kwargs)
3826 def __repr__(self):
3827 return "<%s.%s; proxy of C++ wxPySizer instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
3828
3829class PySizerPtr(PySizer):
3830 def __init__(self, this):
3831 self.this = this
3832 if not hasattr(self,"thisown"): self.thisown = 0
3833 self.__class__ = PySizer
3834_core.PySizer_swigregister(PySizerPtr)
3835
3836#---------------------------------------------------------------------------
3837
3838class BoxSizer(Sizer):
3839 def __init__(self, *args, **kwargs):
3840 newobj = _core.new_BoxSizer(*args, **kwargs)
3841 self.this = newobj.this
3842 self.thisown = 1
3843 del newobj.thisown
3844 self._setOORInfo(self)
3845 def GetOrientation(*args, **kwargs): return _core.BoxSizer_GetOrientation(*args, **kwargs)
3846 def SetOrientation(*args, **kwargs): return _core.BoxSizer_SetOrientation(*args, **kwargs)
3847 def RecalcSizes(*args, **kwargs): return _core.BoxSizer_RecalcSizes(*args, **kwargs)
3848 def CalcMin(*args, **kwargs): return _core.BoxSizer_CalcMin(*args, **kwargs)
3849 def __repr__(self):
3850 return "<%s.%s; proxy of C++ wxBoxSizer instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
3851
3852class BoxSizerPtr(BoxSizer):
3853 def __init__(self, this):
3854 self.this = this
3855 if not hasattr(self,"thisown"): self.thisown = 0
3856 self.__class__ = BoxSizer
3857_core.BoxSizer_swigregister(BoxSizerPtr)
3858
3859#---------------------------------------------------------------------------
3860
3861class StaticBoxSizer(BoxSizer):
3862 def __init__(self, *args, **kwargs):
3863 newobj = _core.new_StaticBoxSizer(*args, **kwargs)
3864 self.this = newobj.this
3865 self.thisown = 1
3866 del newobj.thisown
3867 self._setOORInfo(self)
3868 def GetStaticBox(*args, **kwargs): return _core.StaticBoxSizer_GetStaticBox(*args, **kwargs)
3869 def RecalcSizes(*args, **kwargs): return _core.StaticBoxSizer_RecalcSizes(*args, **kwargs)
3870 def CalcMin(*args, **kwargs): return _core.StaticBoxSizer_CalcMin(*args, **kwargs)
3871 def __repr__(self):
3872 return "<%s.%s; proxy of C++ wxStaticBoxSizer instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
3873
3874class StaticBoxSizerPtr(StaticBoxSizer):
3875 def __init__(self, this):
3876 self.this = this
3877 if not hasattr(self,"thisown"): self.thisown = 0
3878 self.__class__ = StaticBoxSizer
3879_core.StaticBoxSizer_swigregister(StaticBoxSizerPtr)
3880
3881#---------------------------------------------------------------------------
3882
3883class GridSizer(Sizer):
3884 def __init__(self, *args, **kwargs):
3885 newobj = _core.new_GridSizer(*args, **kwargs)
3886 self.this = newobj.this
3887 self.thisown = 1
3888 del newobj.thisown
3889 self._setOORInfo(self)
3890 def RecalcSizes(*args, **kwargs): return _core.GridSizer_RecalcSizes(*args, **kwargs)
3891 def CalcMin(*args, **kwargs): return _core.GridSizer_CalcMin(*args, **kwargs)
3892 def SetCols(*args, **kwargs): return _core.GridSizer_SetCols(*args, **kwargs)
3893 def SetRows(*args, **kwargs): return _core.GridSizer_SetRows(*args, **kwargs)
3894 def SetVGap(*args, **kwargs): return _core.GridSizer_SetVGap(*args, **kwargs)
3895 def SetHGap(*args, **kwargs): return _core.GridSizer_SetHGap(*args, **kwargs)
3896 def GetCols(*args, **kwargs): return _core.GridSizer_GetCols(*args, **kwargs)
3897 def GetRows(*args, **kwargs): return _core.GridSizer_GetRows(*args, **kwargs)
3898 def GetVGap(*args, **kwargs): return _core.GridSizer_GetVGap(*args, **kwargs)
3899 def GetHGap(*args, **kwargs): return _core.GridSizer_GetHGap(*args, **kwargs)
3900 def __repr__(self):
3901 return "<%s.%s; proxy of C++ wxGridSizer instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
3902
3903class GridSizerPtr(GridSizer):
3904 def __init__(self, this):
3905 self.this = this
3906 if not hasattr(self,"thisown"): self.thisown = 0
3907 self.__class__ = GridSizer
3908_core.GridSizer_swigregister(GridSizerPtr)
3909
3910#---------------------------------------------------------------------------
3911
3912FLEX_GROWMODE_NONE = _core.FLEX_GROWMODE_NONE
3913FLEX_GROWMODE_SPECIFIED = _core.FLEX_GROWMODE_SPECIFIED
3914FLEX_GROWMODE_ALL = _core.FLEX_GROWMODE_ALL
3915class FlexGridSizer(GridSizer):
3916 def __init__(self, *args, **kwargs):
3917 newobj = _core.new_FlexGridSizer(*args, **kwargs)
3918 self.this = newobj.this
3919 self.thisown = 1
3920 del newobj.thisown
3921 self._setOORInfo(self)
3922 def RecalcSizes(*args, **kwargs): return _core.FlexGridSizer_RecalcSizes(*args, **kwargs)
3923 def CalcMin(*args, **kwargs): return _core.FlexGridSizer_CalcMin(*args, **kwargs)
3924 def AddGrowableRow(*args, **kwargs): return _core.FlexGridSizer_AddGrowableRow(*args, **kwargs)
3925 def RemoveGrowableRow(*args, **kwargs): return _core.FlexGridSizer_RemoveGrowableRow(*args, **kwargs)
3926 def AddGrowableCol(*args, **kwargs): return _core.FlexGridSizer_AddGrowableCol(*args, **kwargs)
3927 def RemoveGrowableCol(*args, **kwargs): return _core.FlexGridSizer_RemoveGrowableCol(*args, **kwargs)
3928 def SetFlexibleDirection(*args, **kwargs): return _core.FlexGridSizer_SetFlexibleDirection(*args, **kwargs)
3929 def GetFlexibleDirection(*args, **kwargs): return _core.FlexGridSizer_GetFlexibleDirection(*args, **kwargs)
3930 def SetNonFlexibleGrowMode(*args, **kwargs): return _core.FlexGridSizer_SetNonFlexibleGrowMode(*args, **kwargs)
3931 def GetNonFlexibleGrowMode(*args, **kwargs): return _core.FlexGridSizer_GetNonFlexibleGrowMode(*args, **kwargs)
3932 def __repr__(self):
3933 return "<%s.%s; proxy of C++ wxFlexGridSizer instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
3934
3935class FlexGridSizerPtr(FlexGridSizer):
3936 def __init__(self, this):
3937 self.this = this
3938 if not hasattr(self,"thisown"): self.thisown = 0
3939 self.__class__ = FlexGridSizer
3940_core.FlexGridSizer_swigregister(FlexGridSizerPtr)
3941
3942#---------------------------------------------------------------------------
3943
3944class GBPosition(object):
3945 def __init__(self, *args, **kwargs):
3946 newobj = _core.new_GBPosition(*args, **kwargs)
3947 self.this = newobj.this
3948 self.thisown = 1
3949 del newobj.thisown
3950 def GetRow(*args, **kwargs): return _core.GBPosition_GetRow(*args, **kwargs)
3951 def GetCol(*args, **kwargs): return _core.GBPosition_GetCol(*args, **kwargs)
3952 def SetRow(*args, **kwargs): return _core.GBPosition_SetRow(*args, **kwargs)
3953 def SetCol(*args, **kwargs): return _core.GBPosition_SetCol(*args, **kwargs)
3954 def __eq__(*args, **kwargs): return _core.GBPosition___eq__(*args, **kwargs)
3955 def __ne__(*args, **kwargs): return _core.GBPosition___ne__(*args, **kwargs)
3956 def asTuple(*args, **kwargs): return _core.GBPosition_asTuple(*args, **kwargs)
3957 def __str__(self): return str(self.asTuple())
3958 def __repr__(self): return 'wxGBPosition'+str(self.asTuple())
3959 def __len__(self): return len(self.asTuple())
3960 def __getitem__(self, index): return self.asTuple()[index]
3961 def __setitem__(self, index, val):
3962 if index == 0: self.SetRow(val)
3963 elif index == 1: self.SetCol(val)
3964 else: raise IndexError
3965 def __nonzero__(self): return self.asTuple() != (0,0)
3966 def __getinitargs__(self): return ()
3967 def __getstate__(self): return self.asTuple()
3968 def __setstate__(self, state): self.Set(*state)
3969
3970 row = property(GetRow, SetRow)
3971 col = property(GetCol, SetCol)
3972
3973
3974class GBPositionPtr(GBPosition):
3975 def __init__(self, this):
3976 self.this = this
3977 if not hasattr(self,"thisown"): self.thisown = 0
3978 self.__class__ = GBPosition
3979_core.GBPosition_swigregister(GBPositionPtr)
3980
3981class GBSpan(object):
3982 def __init__(self, *args, **kwargs):
3983 newobj = _core.new_GBSpan(*args, **kwargs)
3984 self.this = newobj.this
3985 self.thisown = 1
3986 del newobj.thisown
3987 def GetRowspan(*args, **kwargs): return _core.GBSpan_GetRowspan(*args, **kwargs)
3988 def GetColspan(*args, **kwargs): return _core.GBSpan_GetColspan(*args, **kwargs)
3989 def SetRowspan(*args, **kwargs): return _core.GBSpan_SetRowspan(*args, **kwargs)
3990 def SetColspan(*args, **kwargs): return _core.GBSpan_SetColspan(*args, **kwargs)
3991 def __eq__(*args, **kwargs): return _core.GBSpan___eq__(*args, **kwargs)
3992 def __ne__(*args, **kwargs): return _core.GBSpan___ne__(*args, **kwargs)
3993 def asTuple(*args, **kwargs): return _core.GBSpan_asTuple(*args, **kwargs)
3994 def __str__(self): return str(self.asTuple())
3995 def __repr__(self): return 'wxGBSpan'+str(self.asTuple())
3996 def __len__(self): return len(self.asTuple())
3997 def __getitem__(self, index): return self.asTuple()[index]
3998 def __setitem__(self, index, val):
3999 if index == 0: self.SetRowspan(val)
4000 elif index == 1: self.SetColspan(val)
4001 else: raise IndexError
4002 def __nonzero__(self): return self.asTuple() != (0,0)
4003 def __getinitargs__(self): return ()
4004 def __getstate__(self): return self.asTuple()
4005 def __setstate__(self, state): self.Set(*state)
4006
4007 rowspan = property(GetRowspan, SetRowspan)
4008 colspan = property(GetColspan, SetColspan)
4009
4010
4011class GBSpanPtr(GBSpan):
4012 def __init__(self, this):
4013 self.this = this
4014 if not hasattr(self,"thisown"): self.thisown = 0
4015 self.__class__ = GBSpan
4016_core.GBSpan_swigregister(GBSpanPtr)
4017
4018class GBSizerItem(SizerItem):
4019 def __init__(self, *args, **kwargs):
4020 newobj = _core.new_GBSizerItem(*args, **kwargs)
4021 self.this = newobj.this
4022 self.thisown = 1
4023 del newobj.thisown
4024 def GetPos(*args, **kwargs): return _core.GBSizerItem_GetPos(*args, **kwargs)
4025 def GetPosTuple(self): return self.GetPos().asTuple()
4026 def GetSpan(*args, **kwargs): return _core.GBSizerItem_GetSpan(*args, **kwargs)
4027 def GetSpanTuple(self): return self.GetSpan().asTuple()
4028 def SetPos(*args, **kwargs): return _core.GBSizerItem_SetPos(*args, **kwargs)
4029 def SetSpan(*args, **kwargs): return _core.GBSizerItem_SetSpan(*args, **kwargs)
4030 def Intersects(*args): return _core.GBSizerItem_Intersects(*args)
4031 def GetEndPos(*args, **kwargs): return _core.GBSizerItem_GetEndPos(*args, **kwargs)
4032 def GetGBSizer(*args, **kwargs): return _core.GBSizerItem_GetGBSizer(*args, **kwargs)
4033 def SetGBSizer(*args, **kwargs): return _core.GBSizerItem_SetGBSizer(*args, **kwargs)
4034 def __repr__(self):
4035 return "<%s.%s; proxy of C++ wxGBSizerItem instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
4036
4037class GBSizerItemPtr(GBSizerItem):
4038 def __init__(self, this):
4039 self.this = this
4040 if not hasattr(self,"thisown"): self.thisown = 0
4041 self.__class__ = GBSizerItem
4042_core.GBSizerItem_swigregister(GBSizerItemPtr)
4043DefaultSpan = cvar.DefaultSpan
4044
4045def GBSizerItemWindow(*args, **kwargs):
4046 val = _core.new_GBSizerItemWindow(*args, **kwargs)
4047 val.thisown = 1
4048 return val
4049
4050def GBSizerItemSizer(*args, **kwargs):
4051 val = _core.new_GBSizerItemSizer(*args, **kwargs)
4052 val.thisown = 1
4053 return val
4054
4055def GBSizerItemSpacer(*args, **kwargs):
4056 val = _core.new_GBSizerItemSpacer(*args, **kwargs)
4057 val.thisown = 1
4058 return val
4059
4060class GridBagSizer(FlexGridSizer):
4061 def __init__(self, *args, **kwargs):
4062 newobj = _core.new_GridBagSizer(*args, **kwargs)
4063 self.this = newobj.this
4064 self.thisown = 1
4065 del newobj.thisown
4066 def Add(*args, **kwargs): return _core.GridBagSizer_Add(*args, **kwargs)
4067 def AddItem(*args, **kwargs): return _core.GridBagSizer_AddItem(*args, **kwargs)
4068 def GetEmptyCellSize(*args, **kwargs): return _core.GridBagSizer_GetEmptyCellSize(*args, **kwargs)
4069 def SetEmptyCellSize(*args, **kwargs): return _core.GridBagSizer_SetEmptyCellSize(*args, **kwargs)
4070 def GetItemPosition(*args): return _core.GridBagSizer_GetItemPosition(*args)
4071 def SetItemPosition(*args): return _core.GridBagSizer_SetItemPosition(*args)
4072 def GetItemSpan(*args): return _core.GridBagSizer_GetItemSpan(*args)
4073 def SetItemSpan(*args): return _core.GridBagSizer_SetItemSpan(*args)
4074 def FindItem(*args): return _core.GridBagSizer_FindItem(*args)
4075 def FindItemAtPosition(*args, **kwargs): return _core.GridBagSizer_FindItemAtPosition(*args, **kwargs)
4076 def FindItemWithData(*args, **kwargs): return _core.GridBagSizer_FindItemWithData(*args, **kwargs)
4077 def RecalcSizes(*args, **kwargs): return _core.GridBagSizer_RecalcSizes(*args, **kwargs)
4078 def CalcMin(*args, **kwargs): return _core.GridBagSizer_CalcMin(*args, **kwargs)
4079 def CheckForIntersection(*args): return _core.GridBagSizer_CheckForIntersection(*args)
4080 def __repr__(self):
4081 return "<%s.%s; proxy of C++ wxGridBagSizer instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
4082
4083class GridBagSizerPtr(GridBagSizer):
4084 def __init__(self, this):
4085 self.this = this
4086 if not hasattr(self,"thisown"): self.thisown = 0
4087 self.__class__ = GridBagSizer
4088_core.GridBagSizer_swigregister(GridBagSizerPtr)
4089
4090#---------------------------------------------------------------------------
4091
4092Left = _core.Left
4093Top = _core.Top
4094Right = _core.Right
4095Bottom = _core.Bottom
4096Width = _core.Width
4097Height = _core.Height
4098Centre = _core.Centre
4099Center = _core.Center
4100CentreX = _core.CentreX
4101CentreY = _core.CentreY
4102Unconstrained = _core.Unconstrained
4103AsIs = _core.AsIs
4104PercentOf = _core.PercentOf
4105Above = _core.Above
4106Below = _core.Below
4107LeftOf = _core.LeftOf
4108RightOf = _core.RightOf
4109SameAs = _core.SameAs
4110Absolute = _core.Absolute
4111class IndividualLayoutConstraint(Object):
4112 def Set(*args, **kwargs): return _core.IndividualLayoutConstraint_Set(*args, **kwargs)
4113 def LeftOf(*args, **kwargs): return _core.IndividualLayoutConstraint_LeftOf(*args, **kwargs)
4114 def RightOf(*args, **kwargs): return _core.IndividualLayoutConstraint_RightOf(*args, **kwargs)
4115 def Above(*args, **kwargs): return _core.IndividualLayoutConstraint_Above(*args, **kwargs)
4116 def Below(*args, **kwargs): return _core.IndividualLayoutConstraint_Below(*args, **kwargs)
4117 def SameAs(*args, **kwargs): return _core.IndividualLayoutConstraint_SameAs(*args, **kwargs)
4118 def PercentOf(*args, **kwargs): return _core.IndividualLayoutConstraint_PercentOf(*args, **kwargs)
4119 def Absolute(*args, **kwargs): return _core.IndividualLayoutConstraint_Absolute(*args, **kwargs)
4120 def Unconstrained(*args, **kwargs): return _core.IndividualLayoutConstraint_Unconstrained(*args, **kwargs)
4121 def AsIs(*args, **kwargs): return _core.IndividualLayoutConstraint_AsIs(*args, **kwargs)
4122 def GetOtherWindow(*args, **kwargs): return _core.IndividualLayoutConstraint_GetOtherWindow(*args, **kwargs)
4123 def GetMyEdge(*args, **kwargs): return _core.IndividualLayoutConstraint_GetMyEdge(*args, **kwargs)
4124 def SetEdge(*args, **kwargs): return _core.IndividualLayoutConstraint_SetEdge(*args, **kwargs)
4125 def SetValue(*args, **kwargs): return _core.IndividualLayoutConstraint_SetValue(*args, **kwargs)
4126 def GetMargin(*args, **kwargs): return _core.IndividualLayoutConstraint_GetMargin(*args, **kwargs)
4127 def SetMargin(*args, **kwargs): return _core.IndividualLayoutConstraint_SetMargin(*args, **kwargs)
4128 def GetValue(*args, **kwargs): return _core.IndividualLayoutConstraint_GetValue(*args, **kwargs)
4129 def GetPercent(*args, **kwargs): return _core.IndividualLayoutConstraint_GetPercent(*args, **kwargs)
4130 def GetOtherEdge(*args, **kwargs): return _core.IndividualLayoutConstraint_GetOtherEdge(*args, **kwargs)
4131 def GetDone(*args, **kwargs): return _core.IndividualLayoutConstraint_GetDone(*args, **kwargs)
4132 def SetDone(*args, **kwargs): return _core.IndividualLayoutConstraint_SetDone(*args, **kwargs)
4133 def GetRelationship(*args, **kwargs): return _core.IndividualLayoutConstraint_GetRelationship(*args, **kwargs)
4134 def SetRelationship(*args, **kwargs): return _core.IndividualLayoutConstraint_SetRelationship(*args, **kwargs)
4135 def ResetIfWin(*args, **kwargs): return _core.IndividualLayoutConstraint_ResetIfWin(*args, **kwargs)
4136 def SatisfyConstraint(*args, **kwargs): return _core.IndividualLayoutConstraint_SatisfyConstraint(*args, **kwargs)
4137 def GetEdge(*args, **kwargs): return _core.IndividualLayoutConstraint_GetEdge(*args, **kwargs)
4138 def __init__(self): raise RuntimeError, "No constructor defined"
4139 def __repr__(self):
4140 return "<%s.%s; proxy of C++ wxIndividualLayoutConstraint instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
4141
4142class IndividualLayoutConstraintPtr(IndividualLayoutConstraint):
4143 def __init__(self, this):
4144 self.this = this
4145 if not hasattr(self,"thisown"): self.thisown = 0
4146 self.__class__ = IndividualLayoutConstraint
4147_core.IndividualLayoutConstraint_swigregister(IndividualLayoutConstraintPtr)
4148
4149class LayoutConstraints(Object):
4150 left = property(_core.LayoutConstraints_left_get)
4151 top = property(_core.LayoutConstraints_top_get)
4152 right = property(_core.LayoutConstraints_right_get)
4153 bottom = property(_core.LayoutConstraints_bottom_get)
4154 width = property(_core.LayoutConstraints_width_get)
4155 height = property(_core.LayoutConstraints_height_get)
4156 centreX = property(_core.LayoutConstraints_centreX_get)
4157 centreY = property(_core.LayoutConstraints_centreY_get)
4158 def __init__(self, *args, **kwargs):
4159 newobj = _core.new_LayoutConstraints(*args, **kwargs)
4160 self.this = newobj.this
4161 self.thisown = 1
4162 del newobj.thisown
4163 def SatisfyConstraints(*args, **kwargs): return _core.LayoutConstraints_SatisfyConstraints(*args, **kwargs)
4164 def AreSatisfied(*args, **kwargs): return _core.LayoutConstraints_AreSatisfied(*args, **kwargs)
4165 def __repr__(self):
4166 return "<%s.%s; proxy of C++ wxLayoutConstraints instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
4167
4168class LayoutConstraintsPtr(LayoutConstraints):
4169 def __init__(self, this):
4170 self.this = this
4171 if not hasattr(self,"thisown"): self.thisown = 0
4172 self.__class__ = LayoutConstraints
4173_core.LayoutConstraints_swigregister(LayoutConstraintsPtr)
4174
4175#----------------------------------------------------------------------------
4176
4177# Use Python's bool constants if available, make aliases if not
4178try:
4179 True
4180except NameError:
4181 True = 1==1
4182 False = 1==0
4183
4184# Backwards compaatibility
4185TRUE = true = True
4186FALSE = false = False
4187
4188
4189# workarounds for bad wxRTTI names
4190__wxPyPtrTypeMap['wxGauge95'] = 'wxGauge'
4191__wxPyPtrTypeMap['wxSlider95'] = 'wxSlider'
4192__wxPyPtrTypeMap['wxStatusBar95'] = 'wxStatusBar'
4193
4194
4195#----------------------------------------------------------------------------
4196# Load version numbers from __version__... Ensure that major and minor
4197# versions are the same for both wxPython and wxWindows.
4198
4199from __version__ import *
4200__version__ = VERSION_STRING
4201
4202assert MAJOR_VERSION == _core.MAJOR_VERSION, "wxPython/wxWindows version mismatch"
4203assert MINOR_VERSION == _core.MINOR_VERSION, "wxPython/wxWindows version mismatch"
4204if RELEASE_VERSION != _core.RELEASE_VERSION:
4205 import warnings
4206 warnings.warn("wxPython/wxWindows release number mismatch")
4207
4208#----------------------------------------------------------------------------
4209
4210class PyDeadObjectError(AttributeError):
4211 pass
4212
4213
4214class _wxPyDeadObject(object):
4215 """
4216 Instances of wx objects that are OOR capable will have their __class__
4217 changed to this class when the C++ object is deleted. This should help
4218 prevent crashes due to referencing a bogus C++ pointer.
4219 """
4220 reprStr = "wxPython wrapper for DELETED %s object! (The C++ object no longer exists.)"
4221 attrStr = "The C++ part of the %s object has been deleted, attribute access no longer allowed."
4222
4223 def __repr__( self ):
4224 if not hasattr(self, "_name"):
4225 self._name = "[unknown]"
4226 return self.reprStr % self._name
4227
4228 def __getattr__( self, *args ):
4229 if not hasattr(self, "_name"):
4230 self._name = "[unknown]"
4231 raise PyDeadObjectError( self.attrStr % self._name )
4232
4233 def __nonzero__(self):
4234 return 0
4235
4236
4237#----------------------------------------------------------------------------
4238_wxPyCallAfterId = None
4239
4240def CallAfter(callable, *args, **kw):
4241 """
4242 Call the specified function after the current and pending event
4243 handlers have been completed. This is also good for making GUI
4244 method calls from non-GUI threads.
4245 """
4246 app = wx.GetApp()
4247 assert app, 'No wxApp created yet'
4248
4249 global _wxPyCallAfterId
4250 if _wxPyCallAfterId is None:
4251 _wxPyCallAfterId = wx.NewEventType()
4252 app.Connect(-1, -1, _wxPyCallAfterId,
4253 lambda event: event.callable(*event.args, **event.kw) )
4254 evt = wx.PyEvent()
4255 evt.SetEventType(_wxPyCallAfterId)
4256 evt.callable = callable
4257 evt.args = args
4258 evt.kw = kw
4259 wx.PostEvent(app, evt)
4260
4261
4262#----------------------------------------------------------------------------
4263
4264
4265class FutureCall:
4266 """
4267 A convenience class for wxTimer, that calls the given callable
4268 object once after the given amount of milliseconds, passing any
4269 positional or keyword args. The return value of the callable is
4270 availbale after it has been run with the GetResult method.
4271
4272 If you don't need to get the return value or restart the timer
4273 then there is no need to hold a reference to this object. It will
4274 hold a reference to itself while the timer is running (the timer
4275 has a reference to self.Notify) but the cycle will be broken when
4276 the timer completes, automatically cleaning up the wx.FutureCall
4277 object.
4278 """
4279 def __init__(self, millis, callable, *args, **kwargs):
4280 self.millis = millis
4281 self.callable = callable
4282 self.SetArgs(*args, **kwargs)
4283 self.runCount = 0
4284 self.hasRun = False
4285 self.result = None
4286 self.timer = None
4287 self.Start()
4288
4289 def __del__(self):
4290 self.Stop()
4291
4292
4293 def Start(self, millis=None, *args, **kwargs):
4294 """
4295 (Re)start the timer
4296 """
4297 self.hasRun = False
4298 if millis is not None:
4299 self.millis = millis
4300 if args or kwargs:
4301 self.SetArgs(*args, **kwargs)
4302 self.Stop()
4303 self.timer = wx.PyTimer(self.Notify)
4304 self.timer.Start(self.millis, wx.TIMER_ONE_SHOT)
4305 Restart = Start
4306
4307
4308 def Stop(self):
4309 """
4310 Stop and destroy the timer.
4311 """
4312 if self.timer is not None:
4313 self.timer.Stop()
4314 self.timer = None
4315
4316
4317 def GetInterval(self):
4318 if self.timer is not None:
4319 return self.timer.GetInterval()
4320 else:
4321 return 0
4322
4323
4324 def IsRunning(self):
4325 return self.timer is not None and self.timer.IsRunning()
4326
4327
4328 def SetArgs(self, *args, **kwargs):
4329 """
4330 (Re)set the args passed to the callable object. This is
4331 useful in conjunction with Restart if you want to schedule a
4332 new call to the same callable object but with different
4333 parameters.
4334 """
4335 self.args = args
4336 self.kwargs = kwargs
4337
4338
4339 def HasRun(self):
4340 return self.hasRun
4341
4342 def GetResult(self):
4343 return self.result
4344
4345 def Notify(self):
4346 """
4347 The timer has expired so call the callable.
4348 """
4349 if self.callable and getattr(self.callable, 'im_self', True):
4350 self.runCount += 1
4351 self.result = self.callable(*self.args, **self.kwargs)
4352 self.hasRun = True
4353 wx.CallAfter(self.Stop)
4354
4355
4356#----------------------------------------------------------------------------
4357#----------------------------------------------------------------------------
4358
4359# Import other modules in this package that should show up in the
4360# "core" wx namespace
4361from gdi import *
4362from windows import *
4363from controls import *
4364from misc import *
4365
4366#----------------------------------------------------------------------------
4367#----------------------------------------------------------------------------
4368
4369