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