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