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