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