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