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