]> git.saurik.com Git - wxWidgets.git/blame - wxPython/src/gtk/_core.py
flicker reduction for gtk2
[wxWidgets.git] / wxPython / src / gtk / _core.py
CommitLineData
d14a1e28
RD
1# This file was created automatically by SWIG.
2# Don't modify this file, modify the SWIG interface instead.
3
54f9ee45 4import _core_
d14a1e28 5
093d3ff1
RD
6def _swig_setattr_nondynamic(self,class_type,name,value,static=1):
7 if (name == "this"):
8 if isinstance(value, class_type):
9 self.__dict__[name] = value.this
10 if hasattr(value,"thisown"): self.__dict__["thisown"] = value.thisown
11 del value.thisown
12 return
13 method = class_type.__swig_setmethods__.get(name,None)
14 if method: return method(self,value)
15 if (not static) or hasattr(self,name) or (name == "thisown"):
16 self.__dict__[name] = value
17 else:
18 raise AttributeError("You cannot add attributes to %s" % self)
19
20def _swig_setattr(self,class_type,name,value):
21 return _swig_setattr_nondynamic(self,class_type,name,value,0)
22
23def _swig_getattr(self,class_type,name):
24 method = class_type.__swig_getmethods__.get(name,None)
25 if method: return method(self)
26 raise AttributeError,name
27
28import types
29try:
30 _object = types.ObjectType
31 _newclass = 1
32except AttributeError:
33 class _object : pass
34 _newclass = 0
35del types
36
37
38def _swig_setattr_nondynamic_method(set):
39 def set_attr(self,name,value):
40 if hasattr(self,name) or (name in ("this", "thisown")):
41 set(self,name,value)
42 else:
43 raise AttributeError("You cannot add attributes to %s" % self)
44 return set_attr
45
46
d14a1e28
RD
47#// Give a reference to the dictionary of this module to the C++ extension
48#// code.
54f9ee45 49_core_._wxPySetDictionary(vars())
d14a1e28
RD
50
51#// A little trick to make 'wx' be a reference to this module so wx.Names can
52#// be used here.
53import sys as _sys
54wx = _sys.modules[__name__]
55
66c033b4
RD
56
57#----------------------------------------------------------------------------
58
59def _deprecated(callable, msg=None):
60 """
61 Create a wrapper function that will raise a DeprecationWarning
62 before calling the callable.
63 """
64 if msg is None:
65 msg = "%s is deprecated" % callable
66 def deprecatedWrapper(*args, **kwargs):
67 import warnings
68 warnings.warn(msg, DeprecationWarning, stacklevel=2)
69 return callable(*args, **kwargs)
70 deprecatedWrapper.__doc__ = msg
71 return deprecatedWrapper
72
73
74#----------------------------------------------------------------------------
75
54f9ee45
RD
76NOT_FOUND = _core_.NOT_FOUND
77VSCROLL = _core_.VSCROLL
78HSCROLL = _core_.HSCROLL
79CAPTION = _core_.CAPTION
80DOUBLE_BORDER = _core_.DOUBLE_BORDER
81SUNKEN_BORDER = _core_.SUNKEN_BORDER
82RAISED_BORDER = _core_.RAISED_BORDER
83BORDER = _core_.BORDER
84SIMPLE_BORDER = _core_.SIMPLE_BORDER
85STATIC_BORDER = _core_.STATIC_BORDER
86TRANSPARENT_WINDOW = _core_.TRANSPARENT_WINDOW
87NO_BORDER = _core_.NO_BORDER
bcd0d7b6 88DEFAULT_CONTROL_BORDER = _core_.DEFAULT_CONTROL_BORDER
6d88e192 89DEFAULT_STATUSBAR_STYLE = _core_.DEFAULT_STATUSBAR_STYLE
54f9ee45
RD
90TAB_TRAVERSAL = _core_.TAB_TRAVERSAL
91WANTS_CHARS = _core_.WANTS_CHARS
92POPUP_WINDOW = _core_.POPUP_WINDOW
93CENTER_FRAME = _core_.CENTER_FRAME
94CENTRE_ON_SCREEN = _core_.CENTRE_ON_SCREEN
95CENTER_ON_SCREEN = _core_.CENTER_ON_SCREEN
54f9ee45
RD
96CLIP_CHILDREN = _core_.CLIP_CHILDREN
97CLIP_SIBLINGS = _core_.CLIP_SIBLINGS
98ALWAYS_SHOW_SB = _core_.ALWAYS_SHOW_SB
99RETAINED = _core_.RETAINED
100BACKINGSTORE = _core_.BACKINGSTORE
101COLOURED = _core_.COLOURED
102FIXED_LENGTH = _core_.FIXED_LENGTH
103LB_NEEDED_SB = _core_.LB_NEEDED_SB
104LB_ALWAYS_SB = _core_.LB_ALWAYS_SB
105LB_SORT = _core_.LB_SORT
106LB_SINGLE = _core_.LB_SINGLE
107LB_MULTIPLE = _core_.LB_MULTIPLE
108LB_EXTENDED = _core_.LB_EXTENDED
109LB_OWNERDRAW = _core_.LB_OWNERDRAW
110LB_HSCROLL = _core_.LB_HSCROLL
111PROCESS_ENTER = _core_.PROCESS_ENTER
112PASSWORD = _core_.PASSWORD
113CB_SIMPLE = _core_.CB_SIMPLE
114CB_DROPDOWN = _core_.CB_DROPDOWN
115CB_SORT = _core_.CB_SORT
116CB_READONLY = _core_.CB_READONLY
117RA_HORIZONTAL = _core_.RA_HORIZONTAL
118RA_VERTICAL = _core_.RA_VERTICAL
119RA_SPECIFY_ROWS = _core_.RA_SPECIFY_ROWS
120RA_SPECIFY_COLS = _core_.RA_SPECIFY_COLS
fef4c27a 121RA_USE_CHECKBOX = _core_.RA_USE_CHECKBOX
54f9ee45
RD
122RB_GROUP = _core_.RB_GROUP
123RB_SINGLE = _core_.RB_SINGLE
54f9ee45
RD
124SB_HORIZONTAL = _core_.SB_HORIZONTAL
125SB_VERTICAL = _core_.SB_VERTICAL
fef4c27a 126RB_USE_CHECKBOX = _core_.RB_USE_CHECKBOX
54f9ee45
RD
127ST_SIZEGRIP = _core_.ST_SIZEGRIP
128ST_NO_AUTORESIZE = _core_.ST_NO_AUTORESIZE
129FLOOD_SURFACE = _core_.FLOOD_SURFACE
130FLOOD_BORDER = _core_.FLOOD_BORDER
131ODDEVEN_RULE = _core_.ODDEVEN_RULE
132WINDING_RULE = _core_.WINDING_RULE
133TOOL_TOP = _core_.TOOL_TOP
134TOOL_BOTTOM = _core_.TOOL_BOTTOM
135TOOL_LEFT = _core_.TOOL_LEFT
136TOOL_RIGHT = _core_.TOOL_RIGHT
137OK = _core_.OK
138YES_NO = _core_.YES_NO
139CANCEL = _core_.CANCEL
140YES = _core_.YES
141NO = _core_.NO
142NO_DEFAULT = _core_.NO_DEFAULT
143YES_DEFAULT = _core_.YES_DEFAULT
144ICON_EXCLAMATION = _core_.ICON_EXCLAMATION
145ICON_HAND = _core_.ICON_HAND
146ICON_QUESTION = _core_.ICON_QUESTION
147ICON_INFORMATION = _core_.ICON_INFORMATION
148ICON_STOP = _core_.ICON_STOP
149ICON_ASTERISK = _core_.ICON_ASTERISK
150ICON_MASK = _core_.ICON_MASK
151ICON_WARNING = _core_.ICON_WARNING
152ICON_ERROR = _core_.ICON_ERROR
153FORWARD = _core_.FORWARD
154BACKWARD = _core_.BACKWARD
155RESET = _core_.RESET
156HELP = _core_.HELP
157MORE = _core_.MORE
158SETUP = _core_.SETUP
159SIZE_AUTO_WIDTH = _core_.SIZE_AUTO_WIDTH
160SIZE_AUTO_HEIGHT = _core_.SIZE_AUTO_HEIGHT
161SIZE_AUTO = _core_.SIZE_AUTO
162SIZE_USE_EXISTING = _core_.SIZE_USE_EXISTING
163SIZE_ALLOW_MINUS_ONE = _core_.SIZE_ALLOW_MINUS_ONE
164PORTRAIT = _core_.PORTRAIT
165LANDSCAPE = _core_.LANDSCAPE
166PRINT_QUALITY_HIGH = _core_.PRINT_QUALITY_HIGH
167PRINT_QUALITY_MEDIUM = _core_.PRINT_QUALITY_MEDIUM
168PRINT_QUALITY_LOW = _core_.PRINT_QUALITY_LOW
169PRINT_QUALITY_DRAFT = _core_.PRINT_QUALITY_DRAFT
170ID_ANY = _core_.ID_ANY
171ID_SEPARATOR = _core_.ID_SEPARATOR
172ID_LOWEST = _core_.ID_LOWEST
173ID_OPEN = _core_.ID_OPEN
174ID_CLOSE = _core_.ID_CLOSE
175ID_NEW = _core_.ID_NEW
176ID_SAVE = _core_.ID_SAVE
177ID_SAVEAS = _core_.ID_SAVEAS
178ID_REVERT = _core_.ID_REVERT
179ID_EXIT = _core_.ID_EXIT
180ID_UNDO = _core_.ID_UNDO
181ID_REDO = _core_.ID_REDO
182ID_HELP = _core_.ID_HELP
183ID_PRINT = _core_.ID_PRINT
184ID_PRINT_SETUP = _core_.ID_PRINT_SETUP
185ID_PREVIEW = _core_.ID_PREVIEW
186ID_ABOUT = _core_.ID_ABOUT
187ID_HELP_CONTENTS = _core_.ID_HELP_CONTENTS
188ID_HELP_COMMANDS = _core_.ID_HELP_COMMANDS
189ID_HELP_PROCEDURES = _core_.ID_HELP_PROCEDURES
190ID_HELP_CONTEXT = _core_.ID_HELP_CONTEXT
191ID_CLOSE_ALL = _core_.ID_CLOSE_ALL
192ID_PREFERENCES = _core_.ID_PREFERENCES
193ID_CUT = _core_.ID_CUT
194ID_COPY = _core_.ID_COPY
195ID_PASTE = _core_.ID_PASTE
196ID_CLEAR = _core_.ID_CLEAR
197ID_FIND = _core_.ID_FIND
198ID_DUPLICATE = _core_.ID_DUPLICATE
199ID_SELECTALL = _core_.ID_SELECTALL
200ID_DELETE = _core_.ID_DELETE
201ID_REPLACE = _core_.ID_REPLACE
202ID_REPLACE_ALL = _core_.ID_REPLACE_ALL
203ID_PROPERTIES = _core_.ID_PROPERTIES
204ID_VIEW_DETAILS = _core_.ID_VIEW_DETAILS
205ID_VIEW_LARGEICONS = _core_.ID_VIEW_LARGEICONS
206ID_VIEW_SMALLICONS = _core_.ID_VIEW_SMALLICONS
207ID_VIEW_LIST = _core_.ID_VIEW_LIST
208ID_VIEW_SORTDATE = _core_.ID_VIEW_SORTDATE
209ID_VIEW_SORTNAME = _core_.ID_VIEW_SORTNAME
210ID_VIEW_SORTSIZE = _core_.ID_VIEW_SORTSIZE
211ID_VIEW_SORTTYPE = _core_.ID_VIEW_SORTTYPE
212ID_FILE1 = _core_.ID_FILE1
213ID_FILE2 = _core_.ID_FILE2
214ID_FILE3 = _core_.ID_FILE3
215ID_FILE4 = _core_.ID_FILE4
216ID_FILE5 = _core_.ID_FILE5
217ID_FILE6 = _core_.ID_FILE6
218ID_FILE7 = _core_.ID_FILE7
219ID_FILE8 = _core_.ID_FILE8
220ID_FILE9 = _core_.ID_FILE9
221ID_OK = _core_.ID_OK
222ID_CANCEL = _core_.ID_CANCEL
223ID_APPLY = _core_.ID_APPLY
224ID_YES = _core_.ID_YES
225ID_NO = _core_.ID_NO
226ID_STATIC = _core_.ID_STATIC
227ID_FORWARD = _core_.ID_FORWARD
228ID_BACKWARD = _core_.ID_BACKWARD
229ID_DEFAULT = _core_.ID_DEFAULT
230ID_MORE = _core_.ID_MORE
231ID_SETUP = _core_.ID_SETUP
232ID_RESET = _core_.ID_RESET
233ID_CONTEXT_HELP = _core_.ID_CONTEXT_HELP
234ID_YESTOALL = _core_.ID_YESTOALL
235ID_NOTOALL = _core_.ID_NOTOALL
236ID_ABORT = _core_.ID_ABORT
237ID_RETRY = _core_.ID_RETRY
238ID_IGNORE = _core_.ID_IGNORE
7bc1e663
RD
239ID_ADD = _core_.ID_ADD
240ID_REMOVE = _core_.ID_REMOVE
241ID_UP = _core_.ID_UP
242ID_DOWN = _core_.ID_DOWN
243ID_HOME = _core_.ID_HOME
244ID_REFRESH = _core_.ID_REFRESH
245ID_STOP = _core_.ID_STOP
246ID_INDEX = _core_.ID_INDEX
247ID_BOLD = _core_.ID_BOLD
248ID_ITALIC = _core_.ID_ITALIC
249ID_JUSTIFY_CENTER = _core_.ID_JUSTIFY_CENTER
250ID_JUSTIFY_FILL = _core_.ID_JUSTIFY_FILL
251ID_JUSTIFY_RIGHT = _core_.ID_JUSTIFY_RIGHT
252ID_JUSTIFY_LEFT = _core_.ID_JUSTIFY_LEFT
253ID_UNDERLINE = _core_.ID_UNDERLINE
254ID_INDENT = _core_.ID_INDENT
255ID_UNINDENT = _core_.ID_UNINDENT
256ID_ZOOM_100 = _core_.ID_ZOOM_100
257ID_ZOOM_FIT = _core_.ID_ZOOM_FIT
258ID_ZOOM_IN = _core_.ID_ZOOM_IN
259ID_ZOOM_OUT = _core_.ID_ZOOM_OUT
260ID_UNDELETE = _core_.ID_UNDELETE
261ID_REVERT_TO_SAVED = _core_.ID_REVERT_TO_SAVED
54f9ee45
RD
262ID_HIGHEST = _core_.ID_HIGHEST
263OPEN = _core_.OPEN
264SAVE = _core_.SAVE
265HIDE_READONLY = _core_.HIDE_READONLY
266OVERWRITE_PROMPT = _core_.OVERWRITE_PROMPT
267FILE_MUST_EXIST = _core_.FILE_MUST_EXIST
268MULTIPLE = _core_.MULTIPLE
269CHANGE_DIR = _core_.CHANGE_DIR
270ACCEL_ALT = _core_.ACCEL_ALT
271ACCEL_CTRL = _core_.ACCEL_CTRL
272ACCEL_SHIFT = _core_.ACCEL_SHIFT
273ACCEL_NORMAL = _core_.ACCEL_NORMAL
274PD_AUTO_HIDE = _core_.PD_AUTO_HIDE
275PD_APP_MODAL = _core_.PD_APP_MODAL
276PD_CAN_ABORT = _core_.PD_CAN_ABORT
277PD_ELAPSED_TIME = _core_.PD_ELAPSED_TIME
278PD_ESTIMATED_TIME = _core_.PD_ESTIMATED_TIME
279PD_REMAINING_TIME = _core_.PD_REMAINING_TIME
e505d15e
RD
280PD_SMOOTH = _core_.PD_SMOOTH
281PD_CAN_SKIP = _core_.PD_CAN_SKIP
54f9ee45
RD
282DD_NEW_DIR_BUTTON = _core_.DD_NEW_DIR_BUTTON
283DD_DEFAULT_STYLE = _core_.DD_DEFAULT_STYLE
284MENU_TEAROFF = _core_.MENU_TEAROFF
285MB_DOCKABLE = _core_.MB_DOCKABLE
286NO_FULL_REPAINT_ON_RESIZE = _core_.NO_FULL_REPAINT_ON_RESIZE
287FULL_REPAINT_ON_RESIZE = _core_.FULL_REPAINT_ON_RESIZE
288LI_HORIZONTAL = _core_.LI_HORIZONTAL
289LI_VERTICAL = _core_.LI_VERTICAL
290WS_EX_VALIDATE_RECURSIVELY = _core_.WS_EX_VALIDATE_RECURSIVELY
291WS_EX_BLOCK_EVENTS = _core_.WS_EX_BLOCK_EVENTS
292WS_EX_TRANSIENT = _core_.WS_EX_TRANSIENT
293WS_EX_THEMED_BACKGROUND = _core_.WS_EX_THEMED_BACKGROUND
294WS_EX_PROCESS_IDLE = _core_.WS_EX_PROCESS_IDLE
295WS_EX_PROCESS_UI_UPDATES = _core_.WS_EX_PROCESS_UI_UPDATES
296MM_TEXT = _core_.MM_TEXT
297MM_LOMETRIC = _core_.MM_LOMETRIC
298MM_HIMETRIC = _core_.MM_HIMETRIC
299MM_LOENGLISH = _core_.MM_LOENGLISH
300MM_HIENGLISH = _core_.MM_HIENGLISH
301MM_TWIPS = _core_.MM_TWIPS
302MM_ISOTROPIC = _core_.MM_ISOTROPIC
303MM_ANISOTROPIC = _core_.MM_ANISOTROPIC
304MM_POINTS = _core_.MM_POINTS
305MM_METRIC = _core_.MM_METRIC
306CENTRE = _core_.CENTRE
307CENTER = _core_.CENTER
308HORIZONTAL = _core_.HORIZONTAL
309VERTICAL = _core_.VERTICAL
310BOTH = _core_.BOTH
311LEFT = _core_.LEFT
312RIGHT = _core_.RIGHT
313UP = _core_.UP
314DOWN = _core_.DOWN
315TOP = _core_.TOP
316BOTTOM = _core_.BOTTOM
317NORTH = _core_.NORTH
318SOUTH = _core_.SOUTH
319WEST = _core_.WEST
320EAST = _core_.EAST
321ALL = _core_.ALL
322ALIGN_NOT = _core_.ALIGN_NOT
323ALIGN_CENTER_HORIZONTAL = _core_.ALIGN_CENTER_HORIZONTAL
324ALIGN_CENTRE_HORIZONTAL = _core_.ALIGN_CENTRE_HORIZONTAL
325ALIGN_LEFT = _core_.ALIGN_LEFT
326ALIGN_TOP = _core_.ALIGN_TOP
327ALIGN_RIGHT = _core_.ALIGN_RIGHT
328ALIGN_BOTTOM = _core_.ALIGN_BOTTOM
329ALIGN_CENTER_VERTICAL = _core_.ALIGN_CENTER_VERTICAL
330ALIGN_CENTRE_VERTICAL = _core_.ALIGN_CENTRE_VERTICAL
331ALIGN_CENTER = _core_.ALIGN_CENTER
332ALIGN_CENTRE = _core_.ALIGN_CENTRE
333ALIGN_MASK = _core_.ALIGN_MASK
334STRETCH_NOT = _core_.STRETCH_NOT
335SHRINK = _core_.SHRINK
336GROW = _core_.GROW
337EXPAND = _core_.EXPAND
338SHAPED = _core_.SHAPED
339FIXED_MINSIZE = _core_.FIXED_MINSIZE
340TILE = _core_.TILE
341ADJUST_MINSIZE = _core_.ADJUST_MINSIZE
342BORDER_DEFAULT = _core_.BORDER_DEFAULT
343BORDER_NONE = _core_.BORDER_NONE
344BORDER_STATIC = _core_.BORDER_STATIC
345BORDER_SIMPLE = _core_.BORDER_SIMPLE
346BORDER_RAISED = _core_.BORDER_RAISED
347BORDER_SUNKEN = _core_.BORDER_SUNKEN
348BORDER_DOUBLE = _core_.BORDER_DOUBLE
349BORDER_MASK = _core_.BORDER_MASK
7bc1e663
RD
350BG_STYLE_SYSTEM = _core_.BG_STYLE_SYSTEM
351BG_STYLE_COLOUR = _core_.BG_STYLE_COLOUR
352BG_STYLE_CUSTOM = _core_.BG_STYLE_CUSTOM
54f9ee45
RD
353DEFAULT = _core_.DEFAULT
354DECORATIVE = _core_.DECORATIVE
355ROMAN = _core_.ROMAN
356SCRIPT = _core_.SCRIPT
357SWISS = _core_.SWISS
358MODERN = _core_.MODERN
359TELETYPE = _core_.TELETYPE
360VARIABLE = _core_.VARIABLE
361FIXED = _core_.FIXED
362NORMAL = _core_.NORMAL
363LIGHT = _core_.LIGHT
364BOLD = _core_.BOLD
365ITALIC = _core_.ITALIC
366SLANT = _core_.SLANT
367SOLID = _core_.SOLID
368DOT = _core_.DOT
369LONG_DASH = _core_.LONG_DASH
370SHORT_DASH = _core_.SHORT_DASH
371DOT_DASH = _core_.DOT_DASH
372USER_DASH = _core_.USER_DASH
373TRANSPARENT = _core_.TRANSPARENT
374STIPPLE = _core_.STIPPLE
d04418a7
RD
375STIPPLE_MASK = _core_.STIPPLE_MASK
376STIPPLE_MASK_OPAQUE = _core_.STIPPLE_MASK_OPAQUE
54f9ee45
RD
377BDIAGONAL_HATCH = _core_.BDIAGONAL_HATCH
378CROSSDIAG_HATCH = _core_.CROSSDIAG_HATCH
379FDIAGONAL_HATCH = _core_.FDIAGONAL_HATCH
380CROSS_HATCH = _core_.CROSS_HATCH
381HORIZONTAL_HATCH = _core_.HORIZONTAL_HATCH
382VERTICAL_HATCH = _core_.VERTICAL_HATCH
383JOIN_BEVEL = _core_.JOIN_BEVEL
384JOIN_MITER = _core_.JOIN_MITER
385JOIN_ROUND = _core_.JOIN_ROUND
386CAP_ROUND = _core_.CAP_ROUND
387CAP_PROJECTING = _core_.CAP_PROJECTING
388CAP_BUTT = _core_.CAP_BUTT
389CLEAR = _core_.CLEAR
390XOR = _core_.XOR
391INVERT = _core_.INVERT
392OR_REVERSE = _core_.OR_REVERSE
393AND_REVERSE = _core_.AND_REVERSE
394COPY = _core_.COPY
395AND = _core_.AND
396AND_INVERT = _core_.AND_INVERT
397NO_OP = _core_.NO_OP
398NOR = _core_.NOR
399EQUIV = _core_.EQUIV
400SRC_INVERT = _core_.SRC_INVERT
401OR_INVERT = _core_.OR_INVERT
402NAND = _core_.NAND
403OR = _core_.OR
404SET = _core_.SET
405WXK_BACK = _core_.WXK_BACK
406WXK_TAB = _core_.WXK_TAB
407WXK_RETURN = _core_.WXK_RETURN
408WXK_ESCAPE = _core_.WXK_ESCAPE
409WXK_SPACE = _core_.WXK_SPACE
410WXK_DELETE = _core_.WXK_DELETE
411WXK_START = _core_.WXK_START
412WXK_LBUTTON = _core_.WXK_LBUTTON
413WXK_RBUTTON = _core_.WXK_RBUTTON
414WXK_CANCEL = _core_.WXK_CANCEL
415WXK_MBUTTON = _core_.WXK_MBUTTON
416WXK_CLEAR = _core_.WXK_CLEAR
417WXK_SHIFT = _core_.WXK_SHIFT
418WXK_ALT = _core_.WXK_ALT
419WXK_CONTROL = _core_.WXK_CONTROL
420WXK_MENU = _core_.WXK_MENU
421WXK_PAUSE = _core_.WXK_PAUSE
422WXK_CAPITAL = _core_.WXK_CAPITAL
423WXK_PRIOR = _core_.WXK_PRIOR
424WXK_NEXT = _core_.WXK_NEXT
425WXK_END = _core_.WXK_END
426WXK_HOME = _core_.WXK_HOME
427WXK_LEFT = _core_.WXK_LEFT
428WXK_UP = _core_.WXK_UP
429WXK_RIGHT = _core_.WXK_RIGHT
430WXK_DOWN = _core_.WXK_DOWN
431WXK_SELECT = _core_.WXK_SELECT
432WXK_PRINT = _core_.WXK_PRINT
433WXK_EXECUTE = _core_.WXK_EXECUTE
434WXK_SNAPSHOT = _core_.WXK_SNAPSHOT
435WXK_INSERT = _core_.WXK_INSERT
436WXK_HELP = _core_.WXK_HELP
437WXK_NUMPAD0 = _core_.WXK_NUMPAD0
438WXK_NUMPAD1 = _core_.WXK_NUMPAD1
439WXK_NUMPAD2 = _core_.WXK_NUMPAD2
440WXK_NUMPAD3 = _core_.WXK_NUMPAD3
441WXK_NUMPAD4 = _core_.WXK_NUMPAD4
442WXK_NUMPAD5 = _core_.WXK_NUMPAD5
443WXK_NUMPAD6 = _core_.WXK_NUMPAD6
444WXK_NUMPAD7 = _core_.WXK_NUMPAD7
445WXK_NUMPAD8 = _core_.WXK_NUMPAD8
446WXK_NUMPAD9 = _core_.WXK_NUMPAD9
447WXK_MULTIPLY = _core_.WXK_MULTIPLY
448WXK_ADD = _core_.WXK_ADD
449WXK_SEPARATOR = _core_.WXK_SEPARATOR
450WXK_SUBTRACT = _core_.WXK_SUBTRACT
451WXK_DECIMAL = _core_.WXK_DECIMAL
452WXK_DIVIDE = _core_.WXK_DIVIDE
453WXK_F1 = _core_.WXK_F1
454WXK_F2 = _core_.WXK_F2
455WXK_F3 = _core_.WXK_F3
456WXK_F4 = _core_.WXK_F4
457WXK_F5 = _core_.WXK_F5
458WXK_F6 = _core_.WXK_F6
459WXK_F7 = _core_.WXK_F7
460WXK_F8 = _core_.WXK_F8
461WXK_F9 = _core_.WXK_F9
462WXK_F10 = _core_.WXK_F10
463WXK_F11 = _core_.WXK_F11
464WXK_F12 = _core_.WXK_F12
465WXK_F13 = _core_.WXK_F13
466WXK_F14 = _core_.WXK_F14
467WXK_F15 = _core_.WXK_F15
468WXK_F16 = _core_.WXK_F16
469WXK_F17 = _core_.WXK_F17
470WXK_F18 = _core_.WXK_F18
471WXK_F19 = _core_.WXK_F19
472WXK_F20 = _core_.WXK_F20
473WXK_F21 = _core_.WXK_F21
474WXK_F22 = _core_.WXK_F22
475WXK_F23 = _core_.WXK_F23
476WXK_F24 = _core_.WXK_F24
477WXK_NUMLOCK = _core_.WXK_NUMLOCK
478WXK_SCROLL = _core_.WXK_SCROLL
479WXK_PAGEUP = _core_.WXK_PAGEUP
480WXK_PAGEDOWN = _core_.WXK_PAGEDOWN
481WXK_NUMPAD_SPACE = _core_.WXK_NUMPAD_SPACE
482WXK_NUMPAD_TAB = _core_.WXK_NUMPAD_TAB
483WXK_NUMPAD_ENTER = _core_.WXK_NUMPAD_ENTER
484WXK_NUMPAD_F1 = _core_.WXK_NUMPAD_F1
485WXK_NUMPAD_F2 = _core_.WXK_NUMPAD_F2
486WXK_NUMPAD_F3 = _core_.WXK_NUMPAD_F3
487WXK_NUMPAD_F4 = _core_.WXK_NUMPAD_F4
488WXK_NUMPAD_HOME = _core_.WXK_NUMPAD_HOME
489WXK_NUMPAD_LEFT = _core_.WXK_NUMPAD_LEFT
490WXK_NUMPAD_UP = _core_.WXK_NUMPAD_UP
491WXK_NUMPAD_RIGHT = _core_.WXK_NUMPAD_RIGHT
492WXK_NUMPAD_DOWN = _core_.WXK_NUMPAD_DOWN
493WXK_NUMPAD_PRIOR = _core_.WXK_NUMPAD_PRIOR
494WXK_NUMPAD_PAGEUP = _core_.WXK_NUMPAD_PAGEUP
495WXK_NUMPAD_NEXT = _core_.WXK_NUMPAD_NEXT
496WXK_NUMPAD_PAGEDOWN = _core_.WXK_NUMPAD_PAGEDOWN
497WXK_NUMPAD_END = _core_.WXK_NUMPAD_END
498WXK_NUMPAD_BEGIN = _core_.WXK_NUMPAD_BEGIN
499WXK_NUMPAD_INSERT = _core_.WXK_NUMPAD_INSERT
500WXK_NUMPAD_DELETE = _core_.WXK_NUMPAD_DELETE
501WXK_NUMPAD_EQUAL = _core_.WXK_NUMPAD_EQUAL
502WXK_NUMPAD_MULTIPLY = _core_.WXK_NUMPAD_MULTIPLY
503WXK_NUMPAD_ADD = _core_.WXK_NUMPAD_ADD
504WXK_NUMPAD_SEPARATOR = _core_.WXK_NUMPAD_SEPARATOR
505WXK_NUMPAD_SUBTRACT = _core_.WXK_NUMPAD_SUBTRACT
506WXK_NUMPAD_DECIMAL = _core_.WXK_NUMPAD_DECIMAL
507WXK_NUMPAD_DIVIDE = _core_.WXK_NUMPAD_DIVIDE
508WXK_WINDOWS_LEFT = _core_.WXK_WINDOWS_LEFT
509WXK_WINDOWS_RIGHT = _core_.WXK_WINDOWS_RIGHT
510WXK_WINDOWS_MENU = _core_.WXK_WINDOWS_MENU
88c6b281
RD
511WXK_COMMAND = _core_.WXK_COMMAND
512WXK_SPECIAL1 = _core_.WXK_SPECIAL1
513WXK_SPECIAL2 = _core_.WXK_SPECIAL2
514WXK_SPECIAL3 = _core_.WXK_SPECIAL3
515WXK_SPECIAL4 = _core_.WXK_SPECIAL4
516WXK_SPECIAL5 = _core_.WXK_SPECIAL5
517WXK_SPECIAL6 = _core_.WXK_SPECIAL6
518WXK_SPECIAL7 = _core_.WXK_SPECIAL7
519WXK_SPECIAL8 = _core_.WXK_SPECIAL8
520WXK_SPECIAL9 = _core_.WXK_SPECIAL9
521WXK_SPECIAL10 = _core_.WXK_SPECIAL10
522WXK_SPECIAL11 = _core_.WXK_SPECIAL11
523WXK_SPECIAL12 = _core_.WXK_SPECIAL12
524WXK_SPECIAL13 = _core_.WXK_SPECIAL13
525WXK_SPECIAL14 = _core_.WXK_SPECIAL14
526WXK_SPECIAL15 = _core_.WXK_SPECIAL15
527WXK_SPECIAL16 = _core_.WXK_SPECIAL16
528WXK_SPECIAL17 = _core_.WXK_SPECIAL17
529WXK_SPECIAL18 = _core_.WXK_SPECIAL18
530WXK_SPECIAL19 = _core_.WXK_SPECIAL19
531WXK_SPECIAL20 = _core_.WXK_SPECIAL20
54f9ee45
RD
532PAPER_NONE = _core_.PAPER_NONE
533PAPER_LETTER = _core_.PAPER_LETTER
534PAPER_LEGAL = _core_.PAPER_LEGAL
535PAPER_A4 = _core_.PAPER_A4
536PAPER_CSHEET = _core_.PAPER_CSHEET
537PAPER_DSHEET = _core_.PAPER_DSHEET
538PAPER_ESHEET = _core_.PAPER_ESHEET
539PAPER_LETTERSMALL = _core_.PAPER_LETTERSMALL
540PAPER_TABLOID = _core_.PAPER_TABLOID
541PAPER_LEDGER = _core_.PAPER_LEDGER
542PAPER_STATEMENT = _core_.PAPER_STATEMENT
543PAPER_EXECUTIVE = _core_.PAPER_EXECUTIVE
544PAPER_A3 = _core_.PAPER_A3
545PAPER_A4SMALL = _core_.PAPER_A4SMALL
546PAPER_A5 = _core_.PAPER_A5
547PAPER_B4 = _core_.PAPER_B4
548PAPER_B5 = _core_.PAPER_B5
549PAPER_FOLIO = _core_.PAPER_FOLIO
550PAPER_QUARTO = _core_.PAPER_QUARTO
551PAPER_10X14 = _core_.PAPER_10X14
552PAPER_11X17 = _core_.PAPER_11X17
553PAPER_NOTE = _core_.PAPER_NOTE
554PAPER_ENV_9 = _core_.PAPER_ENV_9
555PAPER_ENV_10 = _core_.PAPER_ENV_10
556PAPER_ENV_11 = _core_.PAPER_ENV_11
557PAPER_ENV_12 = _core_.PAPER_ENV_12
558PAPER_ENV_14 = _core_.PAPER_ENV_14
559PAPER_ENV_DL = _core_.PAPER_ENV_DL
560PAPER_ENV_C5 = _core_.PAPER_ENV_C5
561PAPER_ENV_C3 = _core_.PAPER_ENV_C3
562PAPER_ENV_C4 = _core_.PAPER_ENV_C4
563PAPER_ENV_C6 = _core_.PAPER_ENV_C6
564PAPER_ENV_C65 = _core_.PAPER_ENV_C65
565PAPER_ENV_B4 = _core_.PAPER_ENV_B4
566PAPER_ENV_B5 = _core_.PAPER_ENV_B5
567PAPER_ENV_B6 = _core_.PAPER_ENV_B6
568PAPER_ENV_ITALY = _core_.PAPER_ENV_ITALY
569PAPER_ENV_MONARCH = _core_.PAPER_ENV_MONARCH
570PAPER_ENV_PERSONAL = _core_.PAPER_ENV_PERSONAL
571PAPER_FANFOLD_US = _core_.PAPER_FANFOLD_US
572PAPER_FANFOLD_STD_GERMAN = _core_.PAPER_FANFOLD_STD_GERMAN
573PAPER_FANFOLD_LGL_GERMAN = _core_.PAPER_FANFOLD_LGL_GERMAN
574PAPER_ISO_B4 = _core_.PAPER_ISO_B4
575PAPER_JAPANESE_POSTCARD = _core_.PAPER_JAPANESE_POSTCARD
576PAPER_9X11 = _core_.PAPER_9X11
577PAPER_10X11 = _core_.PAPER_10X11
578PAPER_15X11 = _core_.PAPER_15X11
579PAPER_ENV_INVITE = _core_.PAPER_ENV_INVITE
580PAPER_LETTER_EXTRA = _core_.PAPER_LETTER_EXTRA
581PAPER_LEGAL_EXTRA = _core_.PAPER_LEGAL_EXTRA
582PAPER_TABLOID_EXTRA = _core_.PAPER_TABLOID_EXTRA
583PAPER_A4_EXTRA = _core_.PAPER_A4_EXTRA
584PAPER_LETTER_TRANSVERSE = _core_.PAPER_LETTER_TRANSVERSE
585PAPER_A4_TRANSVERSE = _core_.PAPER_A4_TRANSVERSE
586PAPER_LETTER_EXTRA_TRANSVERSE = _core_.PAPER_LETTER_EXTRA_TRANSVERSE
587PAPER_A_PLUS = _core_.PAPER_A_PLUS
588PAPER_B_PLUS = _core_.PAPER_B_PLUS
589PAPER_LETTER_PLUS = _core_.PAPER_LETTER_PLUS
590PAPER_A4_PLUS = _core_.PAPER_A4_PLUS
591PAPER_A5_TRANSVERSE = _core_.PAPER_A5_TRANSVERSE
592PAPER_B5_TRANSVERSE = _core_.PAPER_B5_TRANSVERSE
593PAPER_A3_EXTRA = _core_.PAPER_A3_EXTRA
594PAPER_A5_EXTRA = _core_.PAPER_A5_EXTRA
595PAPER_B5_EXTRA = _core_.PAPER_B5_EXTRA
596PAPER_A2 = _core_.PAPER_A2
597PAPER_A3_TRANSVERSE = _core_.PAPER_A3_TRANSVERSE
598PAPER_A3_EXTRA_TRANSVERSE = _core_.PAPER_A3_EXTRA_TRANSVERSE
599DUPLEX_SIMPLEX = _core_.DUPLEX_SIMPLEX
600DUPLEX_HORIZONTAL = _core_.DUPLEX_HORIZONTAL
601DUPLEX_VERTICAL = _core_.DUPLEX_VERTICAL
602ITEM_SEPARATOR = _core_.ITEM_SEPARATOR
603ITEM_NORMAL = _core_.ITEM_NORMAL
604ITEM_CHECK = _core_.ITEM_CHECK
605ITEM_RADIO = _core_.ITEM_RADIO
606ITEM_MAX = _core_.ITEM_MAX
607HT_NOWHERE = _core_.HT_NOWHERE
608HT_SCROLLBAR_FIRST = _core_.HT_SCROLLBAR_FIRST
609HT_SCROLLBAR_ARROW_LINE_1 = _core_.HT_SCROLLBAR_ARROW_LINE_1
610HT_SCROLLBAR_ARROW_LINE_2 = _core_.HT_SCROLLBAR_ARROW_LINE_2
611HT_SCROLLBAR_ARROW_PAGE_1 = _core_.HT_SCROLLBAR_ARROW_PAGE_1
612HT_SCROLLBAR_ARROW_PAGE_2 = _core_.HT_SCROLLBAR_ARROW_PAGE_2
613HT_SCROLLBAR_THUMB = _core_.HT_SCROLLBAR_THUMB
614HT_SCROLLBAR_BAR_1 = _core_.HT_SCROLLBAR_BAR_1
615HT_SCROLLBAR_BAR_2 = _core_.HT_SCROLLBAR_BAR_2
616HT_SCROLLBAR_LAST = _core_.HT_SCROLLBAR_LAST
617HT_WINDOW_OUTSIDE = _core_.HT_WINDOW_OUTSIDE
618HT_WINDOW_INSIDE = _core_.HT_WINDOW_INSIDE
619HT_WINDOW_VERT_SCROLLBAR = _core_.HT_WINDOW_VERT_SCROLLBAR
620HT_WINDOW_HORZ_SCROLLBAR = _core_.HT_WINDOW_HORZ_SCROLLBAR
621HT_WINDOW_CORNER = _core_.HT_WINDOW_CORNER
622HT_MAX = _core_.HT_MAX
623MOD_NONE = _core_.MOD_NONE
624MOD_ALT = _core_.MOD_ALT
625MOD_CONTROL = _core_.MOD_CONTROL
626MOD_SHIFT = _core_.MOD_SHIFT
627MOD_WIN = _core_.MOD_WIN
628UPDATE_UI_NONE = _core_.UPDATE_UI_NONE
629UPDATE_UI_RECURSE = _core_.UPDATE_UI_RECURSE
630UPDATE_UI_FROMIDLE = _core_.UPDATE_UI_FROMIDLE
d14a1e28
RD
631#---------------------------------------------------------------------------
632
633class Object(object):
0df68c9f
RD
634 """
635 The base class for most wx objects, although in wxPython not
636 much functionality is needed nor exposed.
637 """
d14a1e28
RD
638 def __init__(self): raise RuntimeError, "No constructor defined"
639 def __repr__(self):
640 return "<%s.%s; proxy of C++ wxObject instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
e811c8ce 641 def GetClassName(*args, **kwargs):
0df68c9f 642 """
a95a7133 643 GetClassName(self) -> String
e811c8ce 644
a95a7133 645 Returns the class name of the C++ class using wxRTTI.
0df68c9f 646 """
54f9ee45 647 return _core_.Object_GetClassName(*args, **kwargs)
e811c8ce
RD
648
649 def Destroy(*args, **kwargs):
0df68c9f 650 """
a95a7133 651 Destroy(self)
e811c8ce 652
0df68c9f
RD
653 Deletes the C++ object this Python object is a proxy for.
654 """
54f9ee45 655 return _core_.Object_Destroy(*args, **kwargs)
e811c8ce 656
d14a1e28
RD
657
658class ObjectPtr(Object):
659 def __init__(self, this):
660 self.this = this
661 if not hasattr(self,"thisown"): self.thisown = 0
662 self.__class__ = Object
54f9ee45
RD
663_core_.Object_swigregister(ObjectPtr)
664_wxPySetDictionary = _core_._wxPySetDictionary
d14a1e28 665
54f9ee45 666_wxPyFixStockObjects = _core_._wxPyFixStockObjects
3a04f143 667
54f9ee45 668cvar = _core_.cvar
196addbf 669EmptyString = cvar.EmptyString
d14a1e28
RD
670
671#---------------------------------------------------------------------------
672
54f9ee45
RD
673BITMAP_TYPE_INVALID = _core_.BITMAP_TYPE_INVALID
674BITMAP_TYPE_BMP = _core_.BITMAP_TYPE_BMP
675BITMAP_TYPE_ICO = _core_.BITMAP_TYPE_ICO
676BITMAP_TYPE_CUR = _core_.BITMAP_TYPE_CUR
677BITMAP_TYPE_XBM = _core_.BITMAP_TYPE_XBM
678BITMAP_TYPE_XBM_DATA = _core_.BITMAP_TYPE_XBM_DATA
679BITMAP_TYPE_XPM = _core_.BITMAP_TYPE_XPM
680BITMAP_TYPE_XPM_DATA = _core_.BITMAP_TYPE_XPM_DATA
681BITMAP_TYPE_TIF = _core_.BITMAP_TYPE_TIF
682BITMAP_TYPE_GIF = _core_.BITMAP_TYPE_GIF
683BITMAP_TYPE_PNG = _core_.BITMAP_TYPE_PNG
684BITMAP_TYPE_JPEG = _core_.BITMAP_TYPE_JPEG
685BITMAP_TYPE_PNM = _core_.BITMAP_TYPE_PNM
686BITMAP_TYPE_PCX = _core_.BITMAP_TYPE_PCX
687BITMAP_TYPE_PICT = _core_.BITMAP_TYPE_PICT
688BITMAP_TYPE_ICON = _core_.BITMAP_TYPE_ICON
689BITMAP_TYPE_ANI = _core_.BITMAP_TYPE_ANI
690BITMAP_TYPE_IFF = _core_.BITMAP_TYPE_IFF
691BITMAP_TYPE_MACCURSOR = _core_.BITMAP_TYPE_MACCURSOR
692BITMAP_TYPE_ANY = _core_.BITMAP_TYPE_ANY
693CURSOR_NONE = _core_.CURSOR_NONE
694CURSOR_ARROW = _core_.CURSOR_ARROW
695CURSOR_RIGHT_ARROW = _core_.CURSOR_RIGHT_ARROW
696CURSOR_BULLSEYE = _core_.CURSOR_BULLSEYE
697CURSOR_CHAR = _core_.CURSOR_CHAR
698CURSOR_CROSS = _core_.CURSOR_CROSS
699CURSOR_HAND = _core_.CURSOR_HAND
700CURSOR_IBEAM = _core_.CURSOR_IBEAM
701CURSOR_LEFT_BUTTON = _core_.CURSOR_LEFT_BUTTON
702CURSOR_MAGNIFIER = _core_.CURSOR_MAGNIFIER
703CURSOR_MIDDLE_BUTTON = _core_.CURSOR_MIDDLE_BUTTON
704CURSOR_NO_ENTRY = _core_.CURSOR_NO_ENTRY
705CURSOR_PAINT_BRUSH = _core_.CURSOR_PAINT_BRUSH
706CURSOR_PENCIL = _core_.CURSOR_PENCIL
707CURSOR_POINT_LEFT = _core_.CURSOR_POINT_LEFT
708CURSOR_POINT_RIGHT = _core_.CURSOR_POINT_RIGHT
709CURSOR_QUESTION_ARROW = _core_.CURSOR_QUESTION_ARROW
710CURSOR_RIGHT_BUTTON = _core_.CURSOR_RIGHT_BUTTON
711CURSOR_SIZENESW = _core_.CURSOR_SIZENESW
712CURSOR_SIZENS = _core_.CURSOR_SIZENS
713CURSOR_SIZENWSE = _core_.CURSOR_SIZENWSE
714CURSOR_SIZEWE = _core_.CURSOR_SIZEWE
715CURSOR_SIZING = _core_.CURSOR_SIZING
716CURSOR_SPRAYCAN = _core_.CURSOR_SPRAYCAN
717CURSOR_WAIT = _core_.CURSOR_WAIT
718CURSOR_WATCH = _core_.CURSOR_WATCH
719CURSOR_BLANK = _core_.CURSOR_BLANK
720CURSOR_DEFAULT = _core_.CURSOR_DEFAULT
721CURSOR_COPY_ARROW = _core_.CURSOR_COPY_ARROW
722CURSOR_ARROWWAIT = _core_.CURSOR_ARROWWAIT
723CURSOR_MAX = _core_.CURSOR_MAX
d14a1e28
RD
724#---------------------------------------------------------------------------
725
726class Size(object):
0df68c9f 727 """
41e2b43e 728 wx.Size is a useful data structure used to represent the size of
093d3ff1
RD
729 something. It simply contians integer width and height
730 proprtites. In most places in wxPython where a wx.Size is
731 expected a (width, height) tuple can be used instead.
0df68c9f 732 """
e811c8ce
RD
733 def __repr__(self):
734 return "<%s.%s; proxy of C++ wxSize instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
54f9ee45
RD
735 width = property(_core_.Size_width_get, _core_.Size_width_set)
736 height = property(_core_.Size_height_get, _core_.Size_height_set)
242b7b46 737 x = width; y = height
d14a1e28 738 def __init__(self, *args, **kwargs):
0df68c9f 739 """
a95a7133 740 __init__(self, int w=0, int h=0) -> Size
e811c8ce 741
0df68c9f
RD
742 Creates a size object.
743 """
54f9ee45 744 newobj = _core_.new_Size(*args, **kwargs)
d14a1e28
RD
745 self.this = newobj.this
746 self.thisown = 1
747 del newobj.thisown
54f9ee45 748 def __del__(self, destroy=_core_.delete_Size):
a95a7133 749 """__del__(self)"""
d14a1e28
RD
750 try:
751 if self.thisown: destroy(self)
752 except: pass
e811c8ce
RD
753
754 def __eq__(*args, **kwargs):
0df68c9f 755 """
a95a7133 756 __eq__(self, Size sz) -> bool
e811c8ce 757
0df68c9f
RD
758 Test for equality of wx.Size objects.
759 """
54f9ee45 760 return _core_.Size___eq__(*args, **kwargs)
e811c8ce
RD
761
762 def __ne__(*args, **kwargs):
0df68c9f 763 """
a95a7133 764 __ne__(self, Size sz) -> bool
e811c8ce 765
0df68c9f
RD
766 Test for inequality.
767 """
54f9ee45 768 return _core_.Size___ne__(*args, **kwargs)
e811c8ce
RD
769
770 def __add__(*args, **kwargs):
0df68c9f 771 """
a95a7133 772 __add__(self, Size sz) -> Size
e811c8ce 773
0df68c9f
RD
774 Add sz's proprties to this and return the result.
775 """
54f9ee45 776 return _core_.Size___add__(*args, **kwargs)
e811c8ce
RD
777
778 def __sub__(*args, **kwargs):
0df68c9f 779 """
a95a7133 780 __sub__(self, Size sz) -> Size
e811c8ce 781
0df68c9f
RD
782 Subtract sz's properties from this and return the result.
783 """
54f9ee45 784 return _core_.Size___sub__(*args, **kwargs)
e811c8ce
RD
785
786 def IncTo(*args, **kwargs):
0df68c9f 787 """
a95a7133 788 IncTo(self, Size sz)
e811c8ce 789
0df68c9f
RD
790 Increments this object so that both of its dimensions are not less
791 than the corresponding dimensions of the size.
792 """
54f9ee45 793 return _core_.Size_IncTo(*args, **kwargs)
e811c8ce
RD
794
795 def DecTo(*args, **kwargs):
0df68c9f 796 """
a95a7133 797 DecTo(self, Size sz)
e811c8ce 798
0df68c9f
RD
799 Decrements this object so that both of its dimensions are not greater
800 than the corresponding dimensions of the size.
801 """
54f9ee45 802 return _core_.Size_DecTo(*args, **kwargs)
e811c8ce
RD
803
804 def Set(*args, **kwargs):
0df68c9f 805 """
a95a7133 806 Set(self, int w, int h)
e811c8ce 807
0df68c9f
RD
808 Set both width and height.
809 """
54f9ee45 810 return _core_.Size_Set(*args, **kwargs)
e811c8ce
RD
811
812 def SetWidth(*args, **kwargs):
a95a7133 813 """SetWidth(self, int w)"""
54f9ee45 814 return _core_.Size_SetWidth(*args, **kwargs)
e811c8ce
RD
815
816 def SetHeight(*args, **kwargs):
a95a7133 817 """SetHeight(self, int h)"""
54f9ee45 818 return _core_.Size_SetHeight(*args, **kwargs)
e811c8ce
RD
819
820 def GetWidth(*args, **kwargs):
a95a7133 821 """GetWidth(self) -> int"""
54f9ee45 822 return _core_.Size_GetWidth(*args, **kwargs)
e811c8ce
RD
823
824 def GetHeight(*args, **kwargs):
a95a7133 825 """GetHeight(self) -> int"""
54f9ee45 826 return _core_.Size_GetHeight(*args, **kwargs)
e811c8ce 827
74a57fcd
RD
828 def IsFullySpecified(*args, **kwargs):
829 """
a95a7133 830 IsFullySpecified(self) -> bool
74a57fcd
RD
831
832 Returns True if both components of the size are non-default values.
833 """
54f9ee45 834 return _core_.Size_IsFullySpecified(*args, **kwargs)
74a57fcd
RD
835
836 def SetDefaults(*args, **kwargs):
837 """
a95a7133 838 SetDefaults(self, Size size)
74a57fcd 839
41e2b43e
RD
840 Combine this size with the other one replacing the default components
841 of this object (i.e. equal to -1) with those of the other.
74a57fcd 842 """
54f9ee45 843 return _core_.Size_SetDefaults(*args, **kwargs)
74a57fcd 844
e811c8ce 845 def Get(*args, **kwargs):
0df68c9f
RD
846 """
847 Get() -> (width,height)
e811c8ce 848
0df68c9f
RD
849 Returns the width and height properties as a tuple.
850 """
54f9ee45 851 return _core_.Size_Get(*args, **kwargs)
e811c8ce 852
41e2b43e 853 asTuple = wx._deprecated(Get, "asTuple is deprecated, use `Get` instead")
e811c8ce
RD
854 def __str__(self): return str(self.Get())
855 def __repr__(self): return 'wx.Size'+str(self.Get())
856 def __len__(self): return len(self.Get())
857 def __getitem__(self, index): return self.Get()[index]
d14a1e28
RD
858 def __setitem__(self, index, val):
859 if index == 0: self.width = val
860 elif index == 1: self.height = val
861 else: raise IndexError
e811c8ce 862 def __nonzero__(self): return self.Get() != (0,0)
74e96f3d
RD
863 __safe_for_unpickling__ = True
864 def __reduce__(self): return (wx.Size, self.Get())
d14a1e28
RD
865
866
867class SizePtr(Size):
868 def __init__(self, this):
869 self.this = this
870 if not hasattr(self,"thisown"): self.thisown = 0
871 self.__class__ = Size
54f9ee45 872_core_.Size_swigregister(SizePtr)
d14a1e28
RD
873
874#---------------------------------------------------------------------------
875
876class RealPoint(object):
0df68c9f 877 """
41e2b43e
RD
878 A data structure for representing a point or position with floating
879 point x and y properties. In wxPython most places that expect a
880 wx.RealPoint can also accept a (x,y) tuple.
0df68c9f 881 """
e811c8ce
RD
882 def __repr__(self):
883 return "<%s.%s; proxy of C++ wxRealPoint instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
54f9ee45
RD
884 x = property(_core_.RealPoint_x_get, _core_.RealPoint_x_set)
885 y = property(_core_.RealPoint_y_get, _core_.RealPoint_y_set)
d14a1e28 886 def __init__(self, *args, **kwargs):
0df68c9f 887 """
a95a7133 888 __init__(self, double x=0.0, double y=0.0) -> RealPoint
e811c8ce 889
0df68c9f
RD
890 Create a wx.RealPoint object
891 """
54f9ee45 892 newobj = _core_.new_RealPoint(*args, **kwargs)
d14a1e28
RD
893 self.this = newobj.this
894 self.thisown = 1
895 del newobj.thisown
54f9ee45 896 def __del__(self, destroy=_core_.delete_RealPoint):
a95a7133 897 """__del__(self)"""
d14a1e28
RD
898 try:
899 if self.thisown: destroy(self)
900 except: pass
e811c8ce
RD
901
902 def __eq__(*args, **kwargs):
0df68c9f 903 """
a95a7133 904 __eq__(self, RealPoint pt) -> bool
e811c8ce 905
0df68c9f
RD
906 Test for equality of wx.RealPoint objects.
907 """
54f9ee45 908 return _core_.RealPoint___eq__(*args, **kwargs)
e811c8ce
RD
909
910 def __ne__(*args, **kwargs):
0df68c9f 911 """
a95a7133 912 __ne__(self, RealPoint pt) -> bool
e811c8ce 913
0df68c9f
RD
914 Test for inequality of wx.RealPoint objects.
915 """
54f9ee45 916 return _core_.RealPoint___ne__(*args, **kwargs)
e811c8ce
RD
917
918 def __add__(*args, **kwargs):
0df68c9f 919 """
a95a7133 920 __add__(self, RealPoint pt) -> RealPoint
e811c8ce 921
0df68c9f
RD
922 Add pt's proprties to this and return the result.
923 """
54f9ee45 924 return _core_.RealPoint___add__(*args, **kwargs)
e811c8ce
RD
925
926 def __sub__(*args, **kwargs):
0df68c9f 927 """
a95a7133 928 __sub__(self, RealPoint pt) -> RealPoint
e811c8ce 929
0df68c9f
RD
930 Subtract pt's proprties from this and return the result
931 """
54f9ee45 932 return _core_.RealPoint___sub__(*args, **kwargs)
e811c8ce
RD
933
934 def Set(*args, **kwargs):
0df68c9f 935 """
a95a7133 936 Set(self, double x, double y)
e811c8ce 937
0df68c9f
RD
938 Set both the x and y properties
939 """
54f9ee45 940 return _core_.RealPoint_Set(*args, **kwargs)
e811c8ce
RD
941
942 def Get(*args, **kwargs):
0df68c9f
RD
943 """
944 Get() -> (x,y)
e811c8ce 945
0df68c9f
RD
946 Return the x and y properties as a tuple.
947 """
54f9ee45 948 return _core_.RealPoint_Get(*args, **kwargs)
e811c8ce 949
41e2b43e 950 asTuple = wx._deprecated(Get, "asTuple is deprecated, use `Get` instead")
e811c8ce
RD
951 def __str__(self): return str(self.Get())
952 def __repr__(self): return 'wx.RealPoint'+str(self.Get())
953 def __len__(self): return len(self.Get())
954 def __getitem__(self, index): return self.Get()[index]
d14a1e28 955 def __setitem__(self, index, val):
e811c8ce
RD
956 if index == 0: self.x = val
957 elif index == 1: self.y = val
d14a1e28 958 else: raise IndexError
e811c8ce 959 def __nonzero__(self): return self.Get() != (0.0, 0.0)
74e96f3d
RD
960 __safe_for_unpickling__ = True
961 def __reduce__(self): return (wx.RealPoint, self.Get())
d14a1e28
RD
962
963
964class RealPointPtr(RealPoint):
965 def __init__(self, this):
966 self.this = this
967 if not hasattr(self,"thisown"): self.thisown = 0
968 self.__class__ = RealPoint
54f9ee45 969_core_.RealPoint_swigregister(RealPointPtr)
d14a1e28
RD
970
971#---------------------------------------------------------------------------
972
973class Point(object):
0df68c9f 974 """
41e2b43e
RD
975 A data structure for representing a point or position with integer x
976 and y properties. Most places in wxPython that expect a wx.Point can
977 also accept a (x,y) tuple.
0df68c9f 978 """
e811c8ce
RD
979 def __repr__(self):
980 return "<%s.%s; proxy of C++ wxPoint instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
54f9ee45
RD
981 x = property(_core_.Point_x_get, _core_.Point_x_set)
982 y = property(_core_.Point_y_get, _core_.Point_y_set)
d14a1e28 983 def __init__(self, *args, **kwargs):
0df68c9f 984 """
a95a7133 985 __init__(self, int x=0, int y=0) -> Point
e811c8ce 986
0df68c9f
RD
987 Create a wx.Point object
988 """
54f9ee45 989 newobj = _core_.new_Point(*args, **kwargs)
d14a1e28
RD
990 self.this = newobj.this
991 self.thisown = 1
992 del newobj.thisown
54f9ee45 993 def __del__(self, destroy=_core_.delete_Point):
a95a7133 994 """__del__(self)"""
d14a1e28
RD
995 try:
996 if self.thisown: destroy(self)
997 except: pass
e811c8ce
RD
998
999 def __eq__(*args, **kwargs):
0df68c9f 1000 """
a95a7133 1001 __eq__(self, Point pt) -> bool
e811c8ce 1002
0df68c9f
RD
1003 Test for equality of wx.Point objects.
1004 """
54f9ee45 1005 return _core_.Point___eq__(*args, **kwargs)
e811c8ce
RD
1006
1007 def __ne__(*args, **kwargs):
0df68c9f 1008 """
a95a7133 1009 __ne__(self, Point pt) -> bool
e811c8ce 1010
0df68c9f
RD
1011 Test for inequality of wx.Point objects.
1012 """
54f9ee45 1013 return _core_.Point___ne__(*args, **kwargs)
e811c8ce
RD
1014
1015 def __add__(*args, **kwargs):
0df68c9f 1016 """
a95a7133 1017 __add__(self, Point pt) -> Point
e811c8ce 1018
0df68c9f
RD
1019 Add pt's proprties to this and return the result.
1020 """
54f9ee45 1021 return _core_.Point___add__(*args, **kwargs)
e811c8ce
RD
1022
1023 def __sub__(*args, **kwargs):
0df68c9f 1024 """
a95a7133 1025 __sub__(self, Point pt) -> Point
e811c8ce 1026
0df68c9f
RD
1027 Subtract pt's proprties from this and return the result
1028 """
54f9ee45 1029 return _core_.Point___sub__(*args, **kwargs)
e811c8ce
RD
1030
1031 def __iadd__(*args, **kwargs):
0df68c9f 1032 """
a95a7133 1033 __iadd__(self, Point pt) -> Point
e811c8ce 1034
0df68c9f
RD
1035 Add pt to this object.
1036 """
54f9ee45 1037 return _core_.Point___iadd__(*args, **kwargs)
e811c8ce
RD
1038
1039 def __isub__(*args, **kwargs):
0df68c9f 1040 """
a95a7133 1041 __isub__(self, Point pt) -> Point
e811c8ce 1042
0df68c9f
RD
1043 Subtract pt from this object.
1044 """
54f9ee45 1045 return _core_.Point___isub__(*args, **kwargs)
e811c8ce
RD
1046
1047 def Set(*args, **kwargs):
0df68c9f 1048 """
a95a7133 1049 Set(self, long x, long y)
e811c8ce 1050
0df68c9f
RD
1051 Set both the x and y properties
1052 """
54f9ee45 1053 return _core_.Point_Set(*args, **kwargs)
e811c8ce
RD
1054
1055 def Get(*args, **kwargs):
0df68c9f
RD
1056 """
1057 Get() -> (x,y)
e811c8ce 1058
0df68c9f
RD
1059 Return the x and y properties as a tuple.
1060 """
54f9ee45 1061 return _core_.Point_Get(*args, **kwargs)
e811c8ce 1062
41e2b43e 1063 asTuple = wx._deprecated(Get, "asTuple is deprecated, use `Get` instead")
e811c8ce
RD
1064 def __str__(self): return str(self.Get())
1065 def __repr__(self): return 'wx.Point'+str(self.Get())
1066 def __len__(self): return len(self.Get())
1067 def __getitem__(self, index): return self.Get()[index]
d14a1e28
RD
1068 def __setitem__(self, index, val):
1069 if index == 0: self.x = val
1070 elif index == 1: self.y = val
1071 else: raise IndexError
e811c8ce 1072 def __nonzero__(self): return self.Get() != (0,0)
74e96f3d
RD
1073 __safe_for_unpickling__ = True
1074 def __reduce__(self): return (wx.Point, self.Get())
d14a1e28
RD
1075
1076
1077class PointPtr(Point):
1078 def __init__(self, this):
1079 self.this = this
1080 if not hasattr(self,"thisown"): self.thisown = 0
1081 self.__class__ = Point
54f9ee45 1082_core_.Point_swigregister(PointPtr)
d14a1e28
RD
1083
1084#---------------------------------------------------------------------------
1085
1086class Rect(object):
0df68c9f 1087 """
41e2b43e
RD
1088 A class for representing and manipulating rectangles. It has x, y,
1089 width and height properties. In wxPython most palces that expect a
1090 wx.Rect can also accept a (x,y,width,height) tuple.
0df68c9f 1091 """
e811c8ce
RD
1092 def __repr__(self):
1093 return "<%s.%s; proxy of C++ wxRect instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 1094 def __init__(self, *args, **kwargs):
0df68c9f 1095 """
a95a7133 1096 __init__(self, int x=0, int y=0, int width=0, int height=0) -> Rect
e811c8ce 1097
0df68c9f
RD
1098 Create a new Rect object.
1099 """
54f9ee45 1100 newobj = _core_.new_Rect(*args, **kwargs)
d14a1e28
RD
1101 self.this = newobj.this
1102 self.thisown = 1
1103 del newobj.thisown
54f9ee45 1104 def __del__(self, destroy=_core_.delete_Rect):
a95a7133 1105 """__del__(self)"""
d14a1e28
RD
1106 try:
1107 if self.thisown: destroy(self)
1108 except: pass
e811c8ce
RD
1109
1110 def GetX(*args, **kwargs):
a95a7133 1111 """GetX(self) -> int"""
54f9ee45 1112 return _core_.Rect_GetX(*args, **kwargs)
e811c8ce
RD
1113
1114 def SetX(*args, **kwargs):
a95a7133 1115 """SetX(self, int x)"""
54f9ee45 1116 return _core_.Rect_SetX(*args, **kwargs)
e811c8ce
RD
1117
1118 def GetY(*args, **kwargs):
a95a7133 1119 """GetY(self) -> int"""
54f9ee45 1120 return _core_.Rect_GetY(*args, **kwargs)
e811c8ce
RD
1121
1122 def SetY(*args, **kwargs):
a95a7133 1123 """SetY(self, int y)"""
54f9ee45 1124 return _core_.Rect_SetY(*args, **kwargs)
e811c8ce
RD
1125
1126 def GetWidth(*args, **kwargs):
a95a7133 1127 """GetWidth(self) -> int"""
54f9ee45 1128 return _core_.Rect_GetWidth(*args, **kwargs)
e811c8ce
RD
1129
1130 def SetWidth(*args, **kwargs):
a95a7133 1131 """SetWidth(self, int w)"""
54f9ee45 1132 return _core_.Rect_SetWidth(*args, **kwargs)
e811c8ce
RD
1133
1134 def GetHeight(*args, **kwargs):
a95a7133 1135 """GetHeight(self) -> int"""
54f9ee45 1136 return _core_.Rect_GetHeight(*args, **kwargs)
e811c8ce
RD
1137
1138 def SetHeight(*args, **kwargs):
a95a7133 1139 """SetHeight(self, int h)"""
54f9ee45 1140 return _core_.Rect_SetHeight(*args, **kwargs)
e811c8ce
RD
1141
1142 def GetPosition(*args, **kwargs):
a95a7133 1143 """GetPosition(self) -> Point"""
54f9ee45 1144 return _core_.Rect_GetPosition(*args, **kwargs)
e811c8ce
RD
1145
1146 def SetPosition(*args, **kwargs):
a95a7133 1147 """SetPosition(self, Point p)"""
54f9ee45 1148 return _core_.Rect_SetPosition(*args, **kwargs)
e811c8ce
RD
1149
1150 def GetSize(*args, **kwargs):
a95a7133 1151 """GetSize(self) -> Size"""
54f9ee45 1152 return _core_.Rect_GetSize(*args, **kwargs)
e811c8ce
RD
1153
1154 def SetSize(*args, **kwargs):
a95a7133 1155 """SetSize(self, Size s)"""
54f9ee45 1156 return _core_.Rect_SetSize(*args, **kwargs)
e811c8ce 1157
aff4cc5c
RD
1158 def IsEmpty(*args, **kwargs):
1159 """IsEmpty(self) -> bool"""
1160 return _core_.Rect_IsEmpty(*args, **kwargs)
1161
c9c7117a 1162 def GetTopLeft(*args, **kwargs):
a95a7133 1163 """GetTopLeft(self) -> Point"""
54f9ee45 1164 return _core_.Rect_GetTopLeft(*args, **kwargs)
c9c7117a
RD
1165
1166 def SetTopLeft(*args, **kwargs):
a95a7133 1167 """SetTopLeft(self, Point p)"""
54f9ee45 1168 return _core_.Rect_SetTopLeft(*args, **kwargs)
c9c7117a
RD
1169
1170 def GetBottomRight(*args, **kwargs):
a95a7133 1171 """GetBottomRight(self) -> Point"""
54f9ee45 1172 return _core_.Rect_GetBottomRight(*args, **kwargs)
c9c7117a
RD
1173
1174 def SetBottomRight(*args, **kwargs):
a95a7133 1175 """SetBottomRight(self, Point p)"""
54f9ee45 1176 return _core_.Rect_SetBottomRight(*args, **kwargs)
c9c7117a 1177
e811c8ce 1178 def GetLeft(*args, **kwargs):
a95a7133 1179 """GetLeft(self) -> int"""
54f9ee45 1180 return _core_.Rect_GetLeft(*args, **kwargs)
e811c8ce
RD
1181
1182 def GetTop(*args, **kwargs):
a95a7133 1183 """GetTop(self) -> int"""
54f9ee45 1184 return _core_.Rect_GetTop(*args, **kwargs)
e811c8ce
RD
1185
1186 def GetBottom(*args, **kwargs):
a95a7133 1187 """GetBottom(self) -> int"""
54f9ee45 1188 return _core_.Rect_GetBottom(*args, **kwargs)
e811c8ce
RD
1189
1190 def GetRight(*args, **kwargs):
a95a7133 1191 """GetRight(self) -> int"""
54f9ee45 1192 return _core_.Rect_GetRight(*args, **kwargs)
e811c8ce
RD
1193
1194 def SetLeft(*args, **kwargs):
a95a7133 1195 """SetLeft(self, int left)"""
54f9ee45 1196 return _core_.Rect_SetLeft(*args, **kwargs)
e811c8ce
RD
1197
1198 def SetRight(*args, **kwargs):
a95a7133 1199 """SetRight(self, int right)"""
54f9ee45 1200 return _core_.Rect_SetRight(*args, **kwargs)
e811c8ce
RD
1201
1202 def SetTop(*args, **kwargs):
a95a7133 1203 """SetTop(self, int top)"""
54f9ee45 1204 return _core_.Rect_SetTop(*args, **kwargs)
e811c8ce
RD
1205
1206 def SetBottom(*args, **kwargs):
a95a7133 1207 """SetBottom(self, int bottom)"""
54f9ee45 1208 return _core_.Rect_SetBottom(*args, **kwargs)
e811c8ce
RD
1209
1210 position = property(GetPosition, SetPosition)
1211 size = property(GetSize, SetSize)
1212 left = property(GetLeft, SetLeft)
1213 right = property(GetRight, SetRight)
1214 top = property(GetTop, SetTop)
1215 bottom = property(GetBottom, SetBottom)
1216
1217 def Inflate(*args, **kwargs):
0df68c9f 1218 """
a95a7133 1219 Inflate(self, int dx, int dy) -> Rect
e811c8ce 1220
8e738329
RD
1221 Increases the size of the rectangle.
1222
1223 The left border is moved farther left and the right border is moved
1224 farther right by ``dx``. The upper border is moved farther up and the
1225 bottom border is moved farther down by ``dy``. (Note the the width and
1226 height of the rectangle thus change by ``2*dx`` and ``2*dy``,
1227 respectively.) If one or both of ``dx`` and ``dy`` are negative, the
1228 opposite happens: the rectangle size decreases in the respective
1229 direction.
1230
1231 The change is made to the rectangle inplace, if instead you need a
1232 copy that is inflated, preserving the original then make the copy
1233 first::
1234
1235 copy = wx.Rect(*original)
1236 copy.Inflate(10,15)
1237
1238
0df68c9f 1239 """
54f9ee45 1240 return _core_.Rect_Inflate(*args, **kwargs)
e811c8ce
RD
1241
1242 def Deflate(*args, **kwargs):
0df68c9f 1243 """
a95a7133 1244 Deflate(self, int dx, int dy) -> Rect
e811c8ce 1245
8e738329
RD
1246 Decrease the rectangle size. This method is the opposite of `Inflate`
1247 in that Deflate(a,b) is equivalent to Inflate(-a,-b). Please refer to
1248 `Inflate` for a full description.
0df68c9f 1249 """
54f9ee45 1250 return _core_.Rect_Deflate(*args, **kwargs)
e811c8ce
RD
1251
1252 def OffsetXY(*args, **kwargs):
0df68c9f 1253 """
a95a7133 1254 OffsetXY(self, int dx, int dy)
e811c8ce 1255
41e2b43e
RD
1256 Moves the rectangle by the specified offset. If dx is positive, the
1257 rectangle is moved to the right, if dy is positive, it is moved to the
1258 bottom, otherwise it is moved to the left or top respectively.
0df68c9f 1259 """
54f9ee45 1260 return _core_.Rect_OffsetXY(*args, **kwargs)
e811c8ce
RD
1261
1262 def Offset(*args, **kwargs):
0df68c9f 1263 """
a95a7133 1264 Offset(self, Point pt)
e811c8ce 1265
0df68c9f
RD
1266 Same as OffsetXY but uses dx,dy from Point
1267 """
54f9ee45 1268 return _core_.Rect_Offset(*args, **kwargs)
e811c8ce
RD
1269
1270 def Intersect(*args, **kwargs):
0df68c9f 1271 """
a95a7133 1272 Intersect(self, Rect rect) -> Rect
e811c8ce 1273
5cbf236d 1274 Returns the intersectsion of this rectangle and rect.
0df68c9f 1275 """
54f9ee45 1276 return _core_.Rect_Intersect(*args, **kwargs)
e811c8ce 1277
5cbf236d
RD
1278 def Union(*args, **kwargs):
1279 """
1280 Union(self, Rect rect) -> Rect
1281
1282 Returns the union of this rectangle and rect.
1283 """
1284 return _core_.Rect_Union(*args, **kwargs)
1285
e811c8ce 1286 def __add__(*args, **kwargs):
0df68c9f 1287 """
a95a7133 1288 __add__(self, Rect rect) -> Rect
e811c8ce 1289
0df68c9f
RD
1290 Add the properties of rect to this rectangle and return the result.
1291 """
54f9ee45 1292 return _core_.Rect___add__(*args, **kwargs)
e811c8ce
RD
1293
1294 def __iadd__(*args, **kwargs):
0df68c9f 1295 """
a95a7133 1296 __iadd__(self, Rect rect) -> Rect
e811c8ce 1297
0df68c9f
RD
1298 Add the properties of rect to this rectangle, updating this rectangle.
1299 """
54f9ee45 1300 return _core_.Rect___iadd__(*args, **kwargs)
e811c8ce
RD
1301
1302 def __eq__(*args, **kwargs):
0df68c9f 1303 """
a95a7133 1304 __eq__(self, Rect rect) -> bool
e811c8ce 1305
0df68c9f
RD
1306 Test for equality.
1307 """
54f9ee45 1308 return _core_.Rect___eq__(*args, **kwargs)
e811c8ce
RD
1309
1310 def __ne__(*args, **kwargs):
0df68c9f 1311 """
a95a7133 1312 __ne__(self, Rect rect) -> bool
e811c8ce 1313
0df68c9f
RD
1314 Test for inequality.
1315 """
54f9ee45 1316 return _core_.Rect___ne__(*args, **kwargs)
e811c8ce
RD
1317
1318 def InsideXY(*args, **kwargs):
0df68c9f 1319 """
a95a7133 1320 InsideXY(self, int x, int y) -> bool
e811c8ce 1321
0df68c9f
RD
1322 Return True if the point is (not strcitly) inside the rect.
1323 """
54f9ee45 1324 return _core_.Rect_InsideXY(*args, **kwargs)
e811c8ce
RD
1325
1326 def Inside(*args, **kwargs):
0df68c9f 1327 """
a95a7133 1328 Inside(self, Point pt) -> bool
e811c8ce 1329
0df68c9f
RD
1330 Return True if the point is (not strcitly) inside the rect.
1331 """
54f9ee45 1332 return _core_.Rect_Inside(*args, **kwargs)
e811c8ce
RD
1333
1334 def Intersects(*args, **kwargs):
0df68c9f 1335 """
a95a7133 1336 Intersects(self, Rect rect) -> bool
e811c8ce 1337
0df68c9f
RD
1338 Returns True if the rectangles have a non empty intersection.
1339 """
54f9ee45 1340 return _core_.Rect_Intersects(*args, **kwargs)
e811c8ce 1341
54f9ee45
RD
1342 x = property(_core_.Rect_x_get, _core_.Rect_x_set)
1343 y = property(_core_.Rect_y_get, _core_.Rect_y_set)
1344 width = property(_core_.Rect_width_get, _core_.Rect_width_set)
1345 height = property(_core_.Rect_height_get, _core_.Rect_height_set)
e811c8ce 1346 def Set(*args, **kwargs):
0df68c9f 1347 """
a95a7133 1348 Set(self, int x=0, int y=0, int width=0, int height=0)
e811c8ce 1349
0df68c9f
RD
1350 Set all rectangle properties.
1351 """
54f9ee45 1352 return _core_.Rect_Set(*args, **kwargs)
e811c8ce
RD
1353
1354 def Get(*args, **kwargs):
0df68c9f
RD
1355 """
1356 Get() -> (x,y,width,height)
e811c8ce 1357
0df68c9f
RD
1358 Return the rectangle properties as a tuple.
1359 """
54f9ee45 1360 return _core_.Rect_Get(*args, **kwargs)
e811c8ce 1361
41e2b43e 1362 asTuple = wx._deprecated(Get, "asTuple is deprecated, use `Get` instead")
e811c8ce
RD
1363 def __str__(self): return str(self.Get())
1364 def __repr__(self): return 'wx.Rect'+str(self.Get())
1365 def __len__(self): return len(self.Get())
1366 def __getitem__(self, index): return self.Get()[index]
d14a1e28
RD
1367 def __setitem__(self, index, val):
1368 if index == 0: self.x = val
1369 elif index == 1: self.y = val
1370 elif index == 2: self.width = val
1371 elif index == 3: self.height = val
1372 else: raise IndexError
e811c8ce 1373 def __nonzero__(self): return self.Get() != (0,0,0,0)
74e96f3d
RD
1374 __safe_for_unpickling__ = True
1375 def __reduce__(self): return (wx.Rect, self.Get())
d14a1e28
RD
1376
1377
1378class RectPtr(Rect):
1379 def __init__(self, this):
1380 self.this = this
1381 if not hasattr(self,"thisown"): self.thisown = 0
1382 self.__class__ = Rect
54f9ee45 1383_core_.Rect_swigregister(RectPtr)
d14a1e28
RD
1384
1385def RectPP(*args, **kwargs):
0df68c9f
RD
1386 """
1387 RectPP(Point topLeft, Point bottomRight) -> Rect
e811c8ce 1388
0df68c9f
RD
1389 Create a new Rect object from Points representing two corners.
1390 """
54f9ee45 1391 val = _core_.new_RectPP(*args, **kwargs)
d14a1e28
RD
1392 val.thisown = 1
1393 return val
1394
1395def RectPS(*args, **kwargs):
0df68c9f
RD
1396 """
1397 RectPS(Point pos, Size size) -> Rect
e811c8ce 1398
0df68c9f
RD
1399 Create a new Rect from a position and size.
1400 """
54f9ee45 1401 val = _core_.new_RectPS(*args, **kwargs)
d14a1e28
RD
1402 val.thisown = 1
1403 return val
1404
d3b6e4ff
RD
1405def RectS(*args, **kwargs):
1406 """
1407 RectS(Size size) -> Rect
1408
1409 Create a new Rect from a size only.
1410 """
1411 val = _core_.new_RectS(*args, **kwargs)
1412 val.thisown = 1
1413 return val
1414
d14a1e28 1415
e811c8ce 1416def IntersectRect(*args, **kwargs):
0df68c9f
RD
1417 """
1418 IntersectRect(Rect r1, Rect r2) -> Rect
e811c8ce 1419
0df68c9f
RD
1420 Calculate and return the intersection of r1 and r2.
1421 """
54f9ee45 1422 return _core_.IntersectRect(*args, **kwargs)
d14a1e28
RD
1423#---------------------------------------------------------------------------
1424
1425class Point2D(object):
41e2b43e
RD
1426 """
1427 wx.Point2Ds represent a point or a vector in a 2d coordinate system
1428 with floating point values.
1429 """
e811c8ce
RD
1430 def __repr__(self):
1431 return "<%s.%s; proxy of C++ wxPoint2D instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 1432 def __init__(self, *args, **kwargs):
0df68c9f 1433 """
a95a7133 1434 __init__(self, double x=0.0, double y=0.0) -> Point2D
e811c8ce 1435
0df68c9f
RD
1436 Create a w.Point2D object.
1437 """
54f9ee45 1438 newobj = _core_.new_Point2D(*args, **kwargs)
d14a1e28
RD
1439 self.this = newobj.this
1440 self.thisown = 1
1441 del newobj.thisown
e811c8ce 1442 def GetFloor(*args, **kwargs):
fd2dc343
RD
1443 """
1444 GetFloor() -> (x,y)
1445
1446 Convert to integer
1447 """
54f9ee45 1448 return _core_.Point2D_GetFloor(*args, **kwargs)
e811c8ce
RD
1449
1450 def GetRounded(*args, **kwargs):
fd2dc343
RD
1451 """
1452 GetRounded() -> (x,y)
1453
1454 Convert to integer
1455 """
54f9ee45 1456 return _core_.Point2D_GetRounded(*args, **kwargs)
e811c8ce
RD
1457
1458 def GetVectorLength(*args, **kwargs):
a95a7133 1459 """GetVectorLength(self) -> double"""
54f9ee45 1460 return _core_.Point2D_GetVectorLength(*args, **kwargs)
e811c8ce
RD
1461
1462 def GetVectorAngle(*args, **kwargs):
a95a7133 1463 """GetVectorAngle(self) -> double"""
54f9ee45 1464 return _core_.Point2D_GetVectorAngle(*args, **kwargs)
e811c8ce
RD
1465
1466 def SetVectorLength(*args, **kwargs):
a95a7133 1467 """SetVectorLength(self, double length)"""
54f9ee45 1468 return _core_.Point2D_SetVectorLength(*args, **kwargs)
e811c8ce
RD
1469
1470 def SetVectorAngle(*args, **kwargs):
a95a7133 1471 """SetVectorAngle(self, double degrees)"""
54f9ee45 1472 return _core_.Point2D_SetVectorAngle(*args, **kwargs)
e811c8ce 1473
d14a1e28
RD
1474 def SetPolarCoordinates(self, angle, length):
1475 self.SetVectorLength(length)
1476 self.SetVectorAngle(angle)
1477 def Normalize(self):
1478 self.SetVectorLength(1.0)
1479
e811c8ce 1480 def GetDistance(*args, **kwargs):
a95a7133 1481 """GetDistance(self, Point2D pt) -> double"""
54f9ee45 1482 return _core_.Point2D_GetDistance(*args, **kwargs)
e811c8ce
RD
1483
1484 def GetDistanceSquare(*args, **kwargs):
a95a7133 1485 """GetDistanceSquare(self, Point2D pt) -> double"""
54f9ee45 1486 return _core_.Point2D_GetDistanceSquare(*args, **kwargs)
e811c8ce
RD
1487
1488 def GetDotProduct(*args, **kwargs):
a95a7133 1489 """GetDotProduct(self, Point2D vec) -> double"""
54f9ee45 1490 return _core_.Point2D_GetDotProduct(*args, **kwargs)
e811c8ce
RD
1491
1492 def GetCrossProduct(*args, **kwargs):
a95a7133 1493 """GetCrossProduct(self, Point2D vec) -> double"""
54f9ee45 1494 return _core_.Point2D_GetCrossProduct(*args, **kwargs)
e811c8ce
RD
1495
1496 def __neg__(*args, **kwargs):
0df68c9f 1497 """
a95a7133 1498 __neg__(self) -> Point2D
e811c8ce 1499
0df68c9f
RD
1500 the reflection of this point
1501 """
54f9ee45 1502 return _core_.Point2D___neg__(*args, **kwargs)
e811c8ce
RD
1503
1504 def __iadd__(*args, **kwargs):
a95a7133 1505 """__iadd__(self, Point2D pt) -> Point2D"""
54f9ee45 1506 return _core_.Point2D___iadd__(*args, **kwargs)
e811c8ce
RD
1507
1508 def __isub__(*args, **kwargs):
a95a7133 1509 """__isub__(self, Point2D pt) -> Point2D"""
54f9ee45 1510 return _core_.Point2D___isub__(*args, **kwargs)
e811c8ce
RD
1511
1512 def __imul__(*args, **kwargs):
a95a7133 1513 """__imul__(self, Point2D pt) -> Point2D"""
54f9ee45 1514 return _core_.Point2D___imul__(*args, **kwargs)
e811c8ce
RD
1515
1516 def __idiv__(*args, **kwargs):
a95a7133 1517 """__idiv__(self, Point2D pt) -> Point2D"""
54f9ee45 1518 return _core_.Point2D___idiv__(*args, **kwargs)
e811c8ce
RD
1519
1520 def __eq__(*args, **kwargs):
0df68c9f 1521 """
a95a7133 1522 __eq__(self, Point2D pt) -> bool
e811c8ce 1523
0df68c9f
RD
1524 Test for equality
1525 """
54f9ee45 1526 return _core_.Point2D___eq__(*args, **kwargs)
e811c8ce
RD
1527
1528 def __ne__(*args, **kwargs):
0df68c9f 1529 """
a95a7133 1530 __ne__(self, Point2D pt) -> bool
e811c8ce 1531
0df68c9f
RD
1532 Test for inequality
1533 """
54f9ee45 1534 return _core_.Point2D___ne__(*args, **kwargs)
e811c8ce 1535
54f9ee45
RD
1536 x = property(_core_.Point2D_x_get, _core_.Point2D_x_set)
1537 y = property(_core_.Point2D_y_get, _core_.Point2D_y_set)
e811c8ce 1538 def Set(*args, **kwargs):
a95a7133 1539 """Set(self, double x=0, double y=0)"""
54f9ee45 1540 return _core_.Point2D_Set(*args, **kwargs)
e811c8ce
RD
1541
1542 def Get(*args, **kwargs):
0df68c9f
RD
1543 """
1544 Get() -> (x,y)
e811c8ce 1545
0df68c9f
RD
1546 Return x and y properties as a tuple.
1547 """
54f9ee45 1548 return _core_.Point2D_Get(*args, **kwargs)
e811c8ce 1549
41e2b43e 1550 asTuple = wx._deprecated(Get, "asTuple is deprecated, use `Get` instead")
e811c8ce
RD
1551 def __str__(self): return str(self.Get())
1552 def __repr__(self): return 'wx.Point2D'+str(self.Get())
1553 def __len__(self): return len(self.Get())
1554 def __getitem__(self, index): return self.Get()[index]
d14a1e28 1555 def __setitem__(self, index, val):
e811c8ce
RD
1556 if index == 0: self.x = val
1557 elif index == 1: self.y = val
d14a1e28 1558 else: raise IndexError
e811c8ce 1559 def __nonzero__(self): return self.Get() != (0.0, 0.0)
74e96f3d
RD
1560 __safe_for_unpickling__ = True
1561 def __reduce__(self): return (wx.Point2D, self.Get())
d14a1e28
RD
1562
1563
1564class Point2DPtr(Point2D):
1565 def __init__(self, this):
1566 self.this = this
1567 if not hasattr(self,"thisown"): self.thisown = 0
1568 self.__class__ = Point2D
54f9ee45 1569_core_.Point2D_swigregister(Point2DPtr)
d14a1e28
RD
1570
1571def Point2DCopy(*args, **kwargs):
0df68c9f
RD
1572 """
1573 Point2DCopy(Point2D pt) -> Point2D
e811c8ce 1574
0df68c9f
RD
1575 Create a w.Point2D object.
1576 """
54f9ee45 1577 val = _core_.new_Point2DCopy(*args, **kwargs)
d14a1e28
RD
1578 val.thisown = 1
1579 return val
1580
1581def Point2DFromPoint(*args, **kwargs):
0df68c9f
RD
1582 """
1583 Point2DFromPoint(Point pt) -> Point2D
e811c8ce 1584
0df68c9f
RD
1585 Create a w.Point2D object.
1586 """
54f9ee45 1587 val = _core_.new_Point2DFromPoint(*args, **kwargs)
d14a1e28
RD
1588 val.thisown = 1
1589 return val
1590
1591#---------------------------------------------------------------------------
1592
54f9ee45
RD
1593FromStart = _core_.FromStart
1594FromCurrent = _core_.FromCurrent
1595FromEnd = _core_.FromEnd
d14a1e28 1596class InputStream(object):
093d3ff1 1597 """Proxy of C++ InputStream class"""
e811c8ce
RD
1598 def __repr__(self):
1599 return "<%s.%s; proxy of C++ wxPyInputStream instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 1600 def __init__(self, *args, **kwargs):
a95a7133 1601 """__init__(self, PyObject p) -> InputStream"""
54f9ee45 1602 newobj = _core_.new_InputStream(*args, **kwargs)
d14a1e28
RD
1603 self.this = newobj.this
1604 self.thisown = 1
1605 del newobj.thisown
8fb0e70a
RD
1606 def __del__(self, destroy=_core_.delete_InputStream):
1607 """__del__(self)"""
1608 try:
1609 if self.thisown: destroy(self)
1610 except: pass
1611
e811c8ce 1612 def close(*args, **kwargs):
a95a7133 1613 """close(self)"""
54f9ee45 1614 return _core_.InputStream_close(*args, **kwargs)
e811c8ce
RD
1615
1616 def flush(*args, **kwargs):
a95a7133 1617 """flush(self)"""
54f9ee45 1618 return _core_.InputStream_flush(*args, **kwargs)
e811c8ce
RD
1619
1620 def eof(*args, **kwargs):
a95a7133 1621 """eof(self) -> bool"""
54f9ee45 1622 return _core_.InputStream_eof(*args, **kwargs)
e811c8ce
RD
1623
1624 def read(*args, **kwargs):
a95a7133 1625 """read(self, int size=-1) -> PyObject"""
54f9ee45 1626 return _core_.InputStream_read(*args, **kwargs)
e811c8ce
RD
1627
1628 def readline(*args, **kwargs):
a95a7133 1629 """readline(self, int size=-1) -> PyObject"""
54f9ee45 1630 return _core_.InputStream_readline(*args, **kwargs)
e811c8ce
RD
1631
1632 def readlines(*args, **kwargs):
a95a7133 1633 """readlines(self, int sizehint=-1) -> PyObject"""
54f9ee45 1634 return _core_.InputStream_readlines(*args, **kwargs)
e811c8ce
RD
1635
1636 def seek(*args, **kwargs):
a95a7133 1637 """seek(self, int offset, int whence=0)"""
54f9ee45 1638 return _core_.InputStream_seek(*args, **kwargs)
e811c8ce
RD
1639
1640 def tell(*args, **kwargs):
a95a7133 1641 """tell(self) -> int"""
54f9ee45 1642 return _core_.InputStream_tell(*args, **kwargs)
e811c8ce
RD
1643
1644 def Peek(*args, **kwargs):
a95a7133 1645 """Peek(self) -> char"""
54f9ee45 1646 return _core_.InputStream_Peek(*args, **kwargs)
e811c8ce
RD
1647
1648 def GetC(*args, **kwargs):
a95a7133 1649 """GetC(self) -> char"""
54f9ee45 1650 return _core_.InputStream_GetC(*args, **kwargs)
e811c8ce
RD
1651
1652 def LastRead(*args, **kwargs):
a95a7133 1653 """LastRead(self) -> size_t"""
54f9ee45 1654 return _core_.InputStream_LastRead(*args, **kwargs)
e811c8ce
RD
1655
1656 def CanRead(*args, **kwargs):
a95a7133 1657 """CanRead(self) -> bool"""
54f9ee45 1658 return _core_.InputStream_CanRead(*args, **kwargs)
e811c8ce
RD
1659
1660 def Eof(*args, **kwargs):
a95a7133 1661 """Eof(self) -> bool"""
54f9ee45 1662 return _core_.InputStream_Eof(*args, **kwargs)
e811c8ce
RD
1663
1664 def Ungetch(*args, **kwargs):
a95a7133 1665 """Ungetch(self, char c) -> bool"""
54f9ee45 1666 return _core_.InputStream_Ungetch(*args, **kwargs)
e811c8ce
RD
1667
1668 def SeekI(*args, **kwargs):
a95a7133 1669 """SeekI(self, long pos, int mode=FromStart) -> long"""
54f9ee45 1670 return _core_.InputStream_SeekI(*args, **kwargs)
e811c8ce
RD
1671
1672 def TellI(*args, **kwargs):
a95a7133 1673 """TellI(self) -> long"""
54f9ee45 1674 return _core_.InputStream_TellI(*args, **kwargs)
e811c8ce 1675
d14a1e28
RD
1676
1677class InputStreamPtr(InputStream):
1678 def __init__(self, this):
1679 self.this = this
1680 if not hasattr(self,"thisown"): self.thisown = 0
1681 self.__class__ = InputStream
54f9ee45 1682_core_.InputStream_swigregister(InputStreamPtr)
d14a1e28
RD
1683DefaultPosition = cvar.DefaultPosition
1684DefaultSize = cvar.DefaultSize
1685
1686class OutputStream(object):
093d3ff1 1687 """Proxy of C++ OutputStream class"""
d14a1e28
RD
1688 def __init__(self): raise RuntimeError, "No constructor defined"
1689 def __repr__(self):
1690 return "<%s.%s; proxy of C++ wxOutputStream instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
e811c8ce 1691 def write(*args, **kwargs):
a95a7133 1692 """write(self, PyObject obj)"""
54f9ee45 1693 return _core_.OutputStream_write(*args, **kwargs)
e811c8ce 1694
d14a1e28
RD
1695
1696class OutputStreamPtr(OutputStream):
1697 def __init__(self, this):
1698 self.this = this
1699 if not hasattr(self,"thisown"): self.thisown = 0
1700 self.__class__ = OutputStream
54f9ee45 1701_core_.OutputStream_swigregister(OutputStreamPtr)
d14a1e28
RD
1702
1703#---------------------------------------------------------------------------
1704
1705class FSFile(Object):
093d3ff1 1706 """Proxy of C++ FSFile class"""
e811c8ce
RD
1707 def __repr__(self):
1708 return "<%s.%s; proxy of C++ wxFSFile instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 1709 def __init__(self, *args, **kwargs):
0df68c9f 1710 """
a95a7133 1711 __init__(self, InputStream stream, String loc, String mimetype, String anchor,
196addbf 1712 DateTime modif) -> FSFile
0df68c9f 1713 """
54f9ee45 1714 newobj = _core_.new_FSFile(*args, **kwargs)
d14a1e28
RD
1715 self.this = newobj.this
1716 self.thisown = 1
1717 del newobj.thisown
e2950dbb 1718 self.thisown = 0 # It will normally be deleted by the user of the wx.FileSystem
4cf4100f 1719
54f9ee45 1720 def __del__(self, destroy=_core_.delete_FSFile):
a95a7133 1721 """__del__(self)"""
d14a1e28
RD
1722 try:
1723 if self.thisown: destroy(self)
1724 except: pass
e811c8ce
RD
1725
1726 def GetStream(*args, **kwargs):
a95a7133 1727 """GetStream(self) -> InputStream"""
54f9ee45 1728 return _core_.FSFile_GetStream(*args, **kwargs)
e811c8ce
RD
1729
1730 def GetMimeType(*args, **kwargs):
a95a7133 1731 """GetMimeType(self) -> String"""
54f9ee45 1732 return _core_.FSFile_GetMimeType(*args, **kwargs)
e811c8ce
RD
1733
1734 def GetLocation(*args, **kwargs):
a95a7133 1735 """GetLocation(self) -> String"""
54f9ee45 1736 return _core_.FSFile_GetLocation(*args, **kwargs)
e811c8ce
RD
1737
1738 def GetAnchor(*args, **kwargs):
a95a7133 1739 """GetAnchor(self) -> String"""
54f9ee45 1740 return _core_.FSFile_GetAnchor(*args, **kwargs)
e811c8ce
RD
1741
1742 def GetModificationTime(*args, **kwargs):
a95a7133 1743 """GetModificationTime(self) -> DateTime"""
54f9ee45 1744 return _core_.FSFile_GetModificationTime(*args, **kwargs)
e811c8ce 1745
d14a1e28
RD
1746
1747class FSFilePtr(FSFile):
1748 def __init__(self, this):
1749 self.this = this
1750 if not hasattr(self,"thisown"): self.thisown = 0
1751 self.__class__ = FSFile
54f9ee45 1752_core_.FSFile_swigregister(FSFilePtr)
d14a1e28
RD
1753
1754class CPPFileSystemHandler(object):
093d3ff1 1755 """Proxy of C++ CPPFileSystemHandler class"""
d14a1e28
RD
1756 def __init__(self): raise RuntimeError, "No constructor defined"
1757 def __repr__(self):
1758 return "<%s.%s; proxy of C++ wxFileSystemHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
1759
1760class CPPFileSystemHandlerPtr(CPPFileSystemHandler):
1761 def __init__(self, this):
1762 self.this = this
1763 if not hasattr(self,"thisown"): self.thisown = 0
1764 self.__class__ = CPPFileSystemHandler
54f9ee45 1765_core_.CPPFileSystemHandler_swigregister(CPPFileSystemHandlerPtr)
d14a1e28
RD
1766
1767class FileSystemHandler(CPPFileSystemHandler):
093d3ff1 1768 """Proxy of C++ FileSystemHandler class"""
e811c8ce
RD
1769 def __repr__(self):
1770 return "<%s.%s; proxy of C++ wxPyFileSystemHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 1771 def __init__(self, *args, **kwargs):
a95a7133 1772 """__init__(self) -> FileSystemHandler"""
54f9ee45 1773 newobj = _core_.new_FileSystemHandler(*args, **kwargs)
d14a1e28
RD
1774 self.this = newobj.this
1775 self.thisown = 1
1776 del newobj.thisown
1777 self._setCallbackInfo(self, FileSystemHandler)
e811c8ce
RD
1778
1779 def _setCallbackInfo(*args, **kwargs):
a95a7133 1780 """_setCallbackInfo(self, PyObject self, PyObject _class)"""
54f9ee45 1781 return _core_.FileSystemHandler__setCallbackInfo(*args, **kwargs)
e811c8ce
RD
1782
1783 def CanOpen(*args, **kwargs):
a95a7133 1784 """CanOpen(self, String location) -> bool"""
54f9ee45 1785 return _core_.FileSystemHandler_CanOpen(*args, **kwargs)
e811c8ce
RD
1786
1787 def OpenFile(*args, **kwargs):
a95a7133 1788 """OpenFile(self, FileSystem fs, String location) -> FSFile"""
54f9ee45 1789 return _core_.FileSystemHandler_OpenFile(*args, **kwargs)
e811c8ce
RD
1790
1791 def FindFirst(*args, **kwargs):
a95a7133 1792 """FindFirst(self, String spec, int flags=0) -> String"""
54f9ee45 1793 return _core_.FileSystemHandler_FindFirst(*args, **kwargs)
e811c8ce
RD
1794
1795 def FindNext(*args, **kwargs):
a95a7133 1796 """FindNext(self) -> String"""
54f9ee45 1797 return _core_.FileSystemHandler_FindNext(*args, **kwargs)
e811c8ce
RD
1798
1799 def GetProtocol(*args, **kwargs):
a95a7133 1800 """GetProtocol(self, String location) -> String"""
54f9ee45 1801 return _core_.FileSystemHandler_GetProtocol(*args, **kwargs)
e811c8ce
RD
1802
1803 def GetLeftLocation(*args, **kwargs):
a95a7133 1804 """GetLeftLocation(self, String location) -> String"""
54f9ee45 1805 return _core_.FileSystemHandler_GetLeftLocation(*args, **kwargs)
e811c8ce
RD
1806
1807 def GetAnchor(*args, **kwargs):
a95a7133 1808 """GetAnchor(self, String location) -> String"""
54f9ee45 1809 return _core_.FileSystemHandler_GetAnchor(*args, **kwargs)
e811c8ce
RD
1810
1811 def GetRightLocation(*args, **kwargs):
a95a7133 1812 """GetRightLocation(self, String location) -> String"""
54f9ee45 1813 return _core_.FileSystemHandler_GetRightLocation(*args, **kwargs)
e811c8ce
RD
1814
1815 def GetMimeTypeFromExt(*args, **kwargs):
a95a7133 1816 """GetMimeTypeFromExt(self, String location) -> String"""
54f9ee45 1817 return _core_.FileSystemHandler_GetMimeTypeFromExt(*args, **kwargs)
e811c8ce 1818
d14a1e28
RD
1819
1820class FileSystemHandlerPtr(FileSystemHandler):
1821 def __init__(self, this):
1822 self.this = this
1823 if not hasattr(self,"thisown"): self.thisown = 0
1824 self.__class__ = FileSystemHandler
54f9ee45 1825_core_.FileSystemHandler_swigregister(FileSystemHandlerPtr)
d14a1e28
RD
1826
1827class FileSystem(Object):
093d3ff1 1828 """Proxy of C++ FileSystem class"""
e811c8ce
RD
1829 def __repr__(self):
1830 return "<%s.%s; proxy of C++ wxFileSystem instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 1831 def __init__(self, *args, **kwargs):
a95a7133 1832 """__init__(self) -> FileSystem"""
54f9ee45 1833 newobj = _core_.new_FileSystem(*args, **kwargs)
d14a1e28
RD
1834 self.this = newobj.this
1835 self.thisown = 1
1836 del newobj.thisown
54f9ee45 1837 def __del__(self, destroy=_core_.delete_FileSystem):
a95a7133 1838 """__del__(self)"""
d14a1e28
RD
1839 try:
1840 if self.thisown: destroy(self)
1841 except: pass
e811c8ce
RD
1842
1843 def ChangePathTo(*args, **kwargs):
a95a7133 1844 """ChangePathTo(self, String location, bool is_dir=False)"""
54f9ee45 1845 return _core_.FileSystem_ChangePathTo(*args, **kwargs)
e811c8ce
RD
1846
1847 def GetPath(*args, **kwargs):
a95a7133 1848 """GetPath(self) -> String"""
54f9ee45 1849 return _core_.FileSystem_GetPath(*args, **kwargs)
e811c8ce
RD
1850
1851 def OpenFile(*args, **kwargs):
a95a7133 1852 """OpenFile(self, String location) -> FSFile"""
54f9ee45 1853 return _core_.FileSystem_OpenFile(*args, **kwargs)
e811c8ce
RD
1854
1855 def FindFirst(*args, **kwargs):
a95a7133 1856 """FindFirst(self, String spec, int flags=0) -> String"""
54f9ee45 1857 return _core_.FileSystem_FindFirst(*args, **kwargs)
e811c8ce
RD
1858
1859 def FindNext(*args, **kwargs):
a95a7133 1860 """FindNext(self) -> String"""
54f9ee45 1861 return _core_.FileSystem_FindNext(*args, **kwargs)
e811c8ce
RD
1862
1863 def AddHandler(*args, **kwargs):
66c033b4 1864 """AddHandler(CPPFileSystemHandler handler)"""
54f9ee45 1865 return _core_.FileSystem_AddHandler(*args, **kwargs)
e811c8ce
RD
1866
1867 AddHandler = staticmethod(AddHandler)
1868 def CleanUpHandlers(*args, **kwargs):
66c033b4 1869 """CleanUpHandlers()"""
54f9ee45 1870 return _core_.FileSystem_CleanUpHandlers(*args, **kwargs)
e811c8ce
RD
1871
1872 CleanUpHandlers = staticmethod(CleanUpHandlers)
1873 def FileNameToURL(*args, **kwargs):
66c033b4 1874 """FileNameToURL(String filename) -> String"""
54f9ee45 1875 return _core_.FileSystem_FileNameToURL(*args, **kwargs)
e811c8ce
RD
1876
1877 FileNameToURL = staticmethod(FileNameToURL)
2ef75293
RD
1878 def URLToFileName(*args, **kwargs):
1879 """URLToFileName(String url) -> String"""
1880 return _core_.FileSystem_URLToFileName(*args, **kwargs)
1881
1882 URLToFileName = staticmethod(URLToFileName)
d14a1e28
RD
1883
1884class FileSystemPtr(FileSystem):
1885 def __init__(self, this):
1886 self.this = this
1887 if not hasattr(self,"thisown"): self.thisown = 0
1888 self.__class__ = FileSystem
54f9ee45 1889_core_.FileSystem_swigregister(FileSystemPtr)
d14a1e28 1890
e811c8ce
RD
1891def FileSystem_AddHandler(*args, **kwargs):
1892 """FileSystem_AddHandler(CPPFileSystemHandler handler)"""
54f9ee45 1893 return _core_.FileSystem_AddHandler(*args, **kwargs)
d14a1e28 1894
e811c8ce
RD
1895def FileSystem_CleanUpHandlers(*args, **kwargs):
1896 """FileSystem_CleanUpHandlers()"""
54f9ee45 1897 return _core_.FileSystem_CleanUpHandlers(*args, **kwargs)
d14a1e28 1898
e811c8ce 1899def FileSystem_FileNameToURL(*args, **kwargs):
196addbf 1900 """FileSystem_FileNameToURL(String filename) -> String"""
54f9ee45 1901 return _core_.FileSystem_FileNameToURL(*args, **kwargs)
d14a1e28 1902
e811c8ce 1903def FileSystem_URLToFileName(*args, **kwargs):
196addbf 1904 """FileSystem_URLToFileName(String url) -> String"""
54f9ee45 1905 return _core_.FileSystem_URLToFileName(*args, **kwargs)
2ef75293 1906
d14a1e28 1907class InternetFSHandler(CPPFileSystemHandler):
093d3ff1 1908 """Proxy of C++ InternetFSHandler class"""
e811c8ce
RD
1909 def __repr__(self):
1910 return "<%s.%s; proxy of C++ wxInternetFSHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 1911 def __init__(self, *args, **kwargs):
a95a7133 1912 """__init__(self) -> InternetFSHandler"""
54f9ee45 1913 newobj = _core_.new_InternetFSHandler(*args, **kwargs)
d14a1e28
RD
1914 self.this = newobj.this
1915 self.thisown = 1
1916 del newobj.thisown
e811c8ce 1917 def CanOpen(*args, **kwargs):
a95a7133 1918 """CanOpen(self, String location) -> bool"""
54f9ee45 1919 return _core_.InternetFSHandler_CanOpen(*args, **kwargs)
e811c8ce
RD
1920
1921 def OpenFile(*args, **kwargs):
a95a7133 1922 """OpenFile(self, FileSystem fs, String location) -> FSFile"""
54f9ee45 1923 return _core_.InternetFSHandler_OpenFile(*args, **kwargs)
e811c8ce 1924
d14a1e28
RD
1925
1926class InternetFSHandlerPtr(InternetFSHandler):
1927 def __init__(self, this):
1928 self.this = this
1929 if not hasattr(self,"thisown"): self.thisown = 0
1930 self.__class__ = InternetFSHandler
54f9ee45 1931_core_.InternetFSHandler_swigregister(InternetFSHandlerPtr)
d14a1e28
RD
1932
1933class ZipFSHandler(CPPFileSystemHandler):
093d3ff1 1934 """Proxy of C++ ZipFSHandler class"""
e811c8ce
RD
1935 def __repr__(self):
1936 return "<%s.%s; proxy of C++ wxZipFSHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 1937 def __init__(self, *args, **kwargs):
a95a7133 1938 """__init__(self) -> ZipFSHandler"""
54f9ee45 1939 newobj = _core_.new_ZipFSHandler(*args, **kwargs)
d14a1e28
RD
1940 self.this = newobj.this
1941 self.thisown = 1
1942 del newobj.thisown
e811c8ce 1943 def CanOpen(*args, **kwargs):
a95a7133 1944 """CanOpen(self, String location) -> bool"""
54f9ee45 1945 return _core_.ZipFSHandler_CanOpen(*args, **kwargs)
e811c8ce
RD
1946
1947 def OpenFile(*args, **kwargs):
a95a7133 1948 """OpenFile(self, FileSystem fs, String location) -> FSFile"""
54f9ee45 1949 return _core_.ZipFSHandler_OpenFile(*args, **kwargs)
e811c8ce
RD
1950
1951 def FindFirst(*args, **kwargs):
a95a7133 1952 """FindFirst(self, String spec, int flags=0) -> String"""
54f9ee45 1953 return _core_.ZipFSHandler_FindFirst(*args, **kwargs)
e811c8ce
RD
1954
1955 def FindNext(*args, **kwargs):
a95a7133 1956 """FindNext(self) -> String"""
54f9ee45 1957 return _core_.ZipFSHandler_FindNext(*args, **kwargs)
e811c8ce 1958
d14a1e28
RD
1959
1960class ZipFSHandlerPtr(ZipFSHandler):
1961 def __init__(self, this):
1962 self.this = this
1963 if not hasattr(self,"thisown"): self.thisown = 0
1964 self.__class__ = ZipFSHandler
54f9ee45 1965_core_.ZipFSHandler_swigregister(ZipFSHandlerPtr)
d14a1e28
RD
1966
1967
e811c8ce 1968def __wxMemoryFSHandler_AddFile_wxImage(*args, **kwargs):
196addbf 1969 """__wxMemoryFSHandler_AddFile_wxImage(String filename, Image image, long type)"""
54f9ee45 1970 return _core_.__wxMemoryFSHandler_AddFile_wxImage(*args, **kwargs)
d14a1e28 1971
e811c8ce 1972def __wxMemoryFSHandler_AddFile_wxBitmap(*args, **kwargs):
196addbf 1973 """__wxMemoryFSHandler_AddFile_wxBitmap(String filename, Bitmap bitmap, long type)"""
54f9ee45 1974 return _core_.__wxMemoryFSHandler_AddFile_wxBitmap(*args, **kwargs)
d14a1e28 1975
e811c8ce 1976def __wxMemoryFSHandler_AddFile_Data(*args, **kwargs):
196addbf 1977 """__wxMemoryFSHandler_AddFile_Data(String filename, PyObject data)"""
54f9ee45 1978 return _core_.__wxMemoryFSHandler_AddFile_Data(*args, **kwargs)
2ef75293
RD
1979def MemoryFSHandler_AddFile(filename, dataItem, imgType=-1):
1980 """
1981 Add 'file' to the memory filesystem. The dataItem parameter can
1982 either be a `wx.Bitmap`, `wx.Image` or a string that can contain
1983 arbitrary data. If a bitmap or image is used then the imgType
1984 parameter should specify what kind of image file it should be
1985 written as, wx.BITMAP_TYPE_PNG, etc.
1986 """
1987 if isinstance(dataItem, wx.Image):
1988 __wxMemoryFSHandler_AddFile_wxImage(filename, dataItem, imgType)
1989 elif isinstance(dataItem, wx.Bitmap):
1990 __wxMemoryFSHandler_AddFile_wxBitmap(filename, dataItem, imgType)
1991 elif type(dataItem) == str:
1992 __wxMemoryFSHandler_AddFile_Data(filename, dataItem)
1993 else:
1994 raise TypeError, 'wx.Image, wx.Bitmap or string expected'
d14a1e28
RD
1995
1996class MemoryFSHandler(CPPFileSystemHandler):
093d3ff1 1997 """Proxy of C++ MemoryFSHandler class"""
e811c8ce
RD
1998 def __repr__(self):
1999 return "<%s.%s; proxy of C++ wxMemoryFSHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 2000 def __init__(self, *args, **kwargs):
a95a7133 2001 """__init__(self) -> MemoryFSHandler"""
54f9ee45 2002 newobj = _core_.new_MemoryFSHandler(*args, **kwargs)
d14a1e28
RD
2003 self.this = newobj.this
2004 self.thisown = 1
2005 del newobj.thisown
e811c8ce 2006 def RemoveFile(*args, **kwargs):
66c033b4 2007 """RemoveFile(String filename)"""
54f9ee45 2008 return _core_.MemoryFSHandler_RemoveFile(*args, **kwargs)
e811c8ce
RD
2009
2010 RemoveFile = staticmethod(RemoveFile)
d14a1e28 2011 AddFile = staticmethod(MemoryFSHandler_AddFile)
e811c8ce 2012 def CanOpen(*args, **kwargs):
a95a7133 2013 """CanOpen(self, String location) -> bool"""
54f9ee45 2014 return _core_.MemoryFSHandler_CanOpen(*args, **kwargs)
e811c8ce
RD
2015
2016 def OpenFile(*args, **kwargs):
a95a7133 2017 """OpenFile(self, FileSystem fs, String location) -> FSFile"""
54f9ee45 2018 return _core_.MemoryFSHandler_OpenFile(*args, **kwargs)
e811c8ce
RD
2019
2020 def FindFirst(*args, **kwargs):
a95a7133 2021 """FindFirst(self, String spec, int flags=0) -> String"""
54f9ee45 2022 return _core_.MemoryFSHandler_FindFirst(*args, **kwargs)
e811c8ce
RD
2023
2024 def FindNext(*args, **kwargs):
a95a7133 2025 """FindNext(self) -> String"""
54f9ee45 2026 return _core_.MemoryFSHandler_FindNext(*args, **kwargs)
e811c8ce 2027
d14a1e28
RD
2028
2029class MemoryFSHandlerPtr(MemoryFSHandler):
2030 def __init__(self, this):
2031 self.this = this
2032 if not hasattr(self,"thisown"): self.thisown = 0
2033 self.__class__ = MemoryFSHandler
54f9ee45 2034_core_.MemoryFSHandler_swigregister(MemoryFSHandlerPtr)
d14a1e28 2035
e811c8ce 2036def MemoryFSHandler_RemoveFile(*args, **kwargs):
196addbf 2037 """MemoryFSHandler_RemoveFile(String filename)"""
54f9ee45 2038 return _core_.MemoryFSHandler_RemoveFile(*args, **kwargs)
d14a1e28 2039
bcd0d7b6
RD
2040IMAGE_ALPHA_TRANSPARENT = _core_.IMAGE_ALPHA_TRANSPARENT
2041IMAGE_ALPHA_THRESHOLD = _core_.IMAGE_ALPHA_THRESHOLD
2042IMAGE_ALPHA_OPAQUE = _core_.IMAGE_ALPHA_OPAQUE
d14a1e28
RD
2043#---------------------------------------------------------------------------
2044
2045class ImageHandler(Object):
27fb7603
RD
2046 """
2047 This is the base class for implementing image file loading/saving, and
2048 image creation from data. It is used within `wx.Image` and is not
2049 normally seen by the application.
2050 """
d14a1e28
RD
2051 def __init__(self): raise RuntimeError, "No constructor defined"
2052 def __repr__(self):
2053 return "<%s.%s; proxy of C++ wxImageHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
e811c8ce 2054 def GetName(*args, **kwargs):
a95a7133 2055 """GetName(self) -> String"""
54f9ee45 2056 return _core_.ImageHandler_GetName(*args, **kwargs)
e811c8ce
RD
2057
2058 def GetExtension(*args, **kwargs):
a95a7133 2059 """GetExtension(self) -> String"""
54f9ee45 2060 return _core_.ImageHandler_GetExtension(*args, **kwargs)
e811c8ce
RD
2061
2062 def GetType(*args, **kwargs):
a95a7133 2063 """GetType(self) -> long"""
54f9ee45 2064 return _core_.ImageHandler_GetType(*args, **kwargs)
e811c8ce
RD
2065
2066 def GetMimeType(*args, **kwargs):
a95a7133 2067 """GetMimeType(self) -> String"""
54f9ee45 2068 return _core_.ImageHandler_GetMimeType(*args, **kwargs)
e811c8ce
RD
2069
2070 def CanRead(*args, **kwargs):
a95a7133 2071 """CanRead(self, String name) -> bool"""
54f9ee45 2072 return _core_.ImageHandler_CanRead(*args, **kwargs)
e811c8ce
RD
2073
2074 def SetName(*args, **kwargs):
a95a7133 2075 """SetName(self, String name)"""
54f9ee45 2076 return _core_.ImageHandler_SetName(*args, **kwargs)
e811c8ce
RD
2077
2078 def SetExtension(*args, **kwargs):
a95a7133 2079 """SetExtension(self, String extension)"""
54f9ee45 2080 return _core_.ImageHandler_SetExtension(*args, **kwargs)
e811c8ce
RD
2081
2082 def SetType(*args, **kwargs):
a95a7133 2083 """SetType(self, long type)"""
54f9ee45 2084 return _core_.ImageHandler_SetType(*args, **kwargs)
e811c8ce
RD
2085
2086 def SetMimeType(*args, **kwargs):
a95a7133 2087 """SetMimeType(self, String mimetype)"""
54f9ee45 2088 return _core_.ImageHandler_SetMimeType(*args, **kwargs)
e811c8ce 2089
d14a1e28
RD
2090
2091class ImageHandlerPtr(ImageHandler):
2092 def __init__(self, this):
2093 self.this = this
2094 if not hasattr(self,"thisown"): self.thisown = 0
2095 self.__class__ = ImageHandler
54f9ee45 2096_core_.ImageHandler_swigregister(ImageHandlerPtr)
d14a1e28
RD
2097
2098class ImageHistogram(object):
093d3ff1 2099 """Proxy of C++ ImageHistogram class"""
e811c8ce
RD
2100 def __repr__(self):
2101 return "<%s.%s; proxy of C++ wxImageHistogram instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 2102 def __init__(self, *args, **kwargs):
a95a7133 2103 """__init__(self) -> ImageHistogram"""
54f9ee45 2104 newobj = _core_.new_ImageHistogram(*args, **kwargs)
d14a1e28
RD
2105 self.this = newobj.this
2106 self.thisown = 1
2107 del newobj.thisown
e811c8ce 2108 def MakeKey(*args, **kwargs):
0df68c9f 2109 """
66c033b4 2110 MakeKey(unsigned char r, unsigned char g, unsigned char b) -> unsigned long
e811c8ce 2111
0df68c9f
RD
2112 Get the key in the histogram for the given RGB values
2113 """
54f9ee45 2114 return _core_.ImageHistogram_MakeKey(*args, **kwargs)
e811c8ce
RD
2115
2116 MakeKey = staticmethod(MakeKey)
2117 def FindFirstUnusedColour(*args, **kwargs):
fd2dc343
RD
2118 """
2119 FindFirstUnusedColour(int startR=1, int startG=0, int startB=0) -> (success, r, g, b)
2120
2121 Find first colour that is not used in the image and has higher RGB
2122 values than startR, startG, startB. Returns a tuple consisting of a
2123 success flag and rgb values.
2124 """
54f9ee45 2125 return _core_.ImageHistogram_FindFirstUnusedColour(*args, **kwargs)
e811c8ce 2126
f1cbd8fa
RD
2127 def GetCount(*args, **kwargs):
2128 """
2129 GetCount(self, unsigned long key) -> unsigned long
2130
2131 Returns the pixel count for the given key. Use `MakeKey` to create a
2132 key value from a RGB tripple.
2133 """
2134 return _core_.ImageHistogram_GetCount(*args, **kwargs)
2135
2136 def GetCountRGB(*args, **kwargs):
2137 """
2138 GetCountRGB(self, unsigned char r, unsigned char g, unsigned char b) -> unsigned long
2139
2140 Returns the pixel count for the given RGB values.
2141 """
2142 return _core_.ImageHistogram_GetCountRGB(*args, **kwargs)
2143
2144 def GetCountColour(*args, **kwargs):
2145 """
2146 GetCountColour(self, Colour colour) -> unsigned long
2147
2148 Returns the pixel count for the given `wx.Colour` value.
2149 """
2150 return _core_.ImageHistogram_GetCountColour(*args, **kwargs)
2151
d14a1e28
RD
2152
2153class ImageHistogramPtr(ImageHistogram):
2154 def __init__(self, this):
2155 self.this = this
2156 if not hasattr(self,"thisown"): self.thisown = 0
2157 self.__class__ = ImageHistogram
54f9ee45 2158_core_.ImageHistogram_swigregister(ImageHistogramPtr)
d14a1e28 2159
e811c8ce 2160def ImageHistogram_MakeKey(*args, **kwargs):
0df68c9f
RD
2161 """
2162 ImageHistogram_MakeKey(unsigned char r, unsigned char g, unsigned char b) -> unsigned long
e811c8ce 2163
0df68c9f
RD
2164 Get the key in the histogram for the given RGB values
2165 """
54f9ee45 2166 return _core_.ImageHistogram_MakeKey(*args, **kwargs)
d14a1e28
RD
2167
2168class Image(Object):
093d3ff1 2169 """Proxy of C++ Image class"""
e811c8ce
RD
2170 def __repr__(self):
2171 return "<%s.%s; proxy of C++ wxImage instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 2172 def __init__(self, *args, **kwargs):
a95a7133 2173 """__init__(self, String name, long type=BITMAP_TYPE_ANY, int index=-1) -> Image"""
54f9ee45 2174 newobj = _core_.new_Image(*args, **kwargs)
d14a1e28
RD
2175 self.this = newobj.this
2176 self.thisown = 1
2177 del newobj.thisown
54f9ee45 2178 def __del__(self, destroy=_core_.delete_Image):
a95a7133 2179 """__del__(self)"""
d14a1e28
RD
2180 try:
2181 if self.thisown: destroy(self)
2182 except: pass
e811c8ce
RD
2183
2184 def Create(*args, **kwargs):
a95a7133 2185 """Create(self, int width, int height)"""
54f9ee45 2186 return _core_.Image_Create(*args, **kwargs)
e811c8ce
RD
2187
2188 def Destroy(*args, **kwargs):
0df68c9f 2189 """
a95a7133 2190 Destroy(self)
e811c8ce 2191
0df68c9f
RD
2192 Deletes the C++ object this Python object is a proxy for.
2193 """
54f9ee45 2194 return _core_.Image_Destroy(*args, **kwargs)
e811c8ce
RD
2195
2196 def Scale(*args, **kwargs):
a95a7133 2197 """Scale(self, int width, int height) -> Image"""
54f9ee45 2198 return _core_.Image_Scale(*args, **kwargs)
e811c8ce
RD
2199
2200 def ShrinkBy(*args, **kwargs):
a95a7133 2201 """ShrinkBy(self, int xFactor, int yFactor) -> Image"""
54f9ee45 2202 return _core_.Image_ShrinkBy(*args, **kwargs)
e811c8ce
RD
2203
2204 def Rescale(*args, **kwargs):
a95a7133 2205 """Rescale(self, int width, int height) -> Image"""
54f9ee45 2206 return _core_.Image_Rescale(*args, **kwargs)
e811c8ce 2207
aff4cc5c
RD
2208 def Resize(*args, **kwargs):
2209 """Resize(self, Size size, Point pos, int r=-1, int g=-1, int b=-1) -> Image"""
2210 return _core_.Image_Resize(*args, **kwargs)
2211
e811c8ce 2212 def SetRGB(*args, **kwargs):
a95a7133 2213 """SetRGB(self, int x, int y, unsigned char r, unsigned char g, unsigned char b)"""
54f9ee45 2214 return _core_.Image_SetRGB(*args, **kwargs)
e811c8ce 2215
aff4cc5c
RD
2216 def SetRGBRect(*args, **kwargs):
2217 """SetRGBRect(self, Rect rect, unsigned char r, unsigned char g, unsigned char b)"""
2218 return _core_.Image_SetRGBRect(*args, **kwargs)
2219
e811c8ce 2220 def GetRed(*args, **kwargs):
a95a7133 2221 """GetRed(self, int x, int y) -> unsigned char"""
54f9ee45 2222 return _core_.Image_GetRed(*args, **kwargs)
e811c8ce
RD
2223
2224 def GetGreen(*args, **kwargs):
a95a7133 2225 """GetGreen(self, int x, int y) -> unsigned char"""
54f9ee45 2226 return _core_.Image_GetGreen(*args, **kwargs)
e811c8ce
RD
2227
2228 def GetBlue(*args, **kwargs):
a95a7133 2229 """GetBlue(self, int x, int y) -> unsigned char"""
54f9ee45 2230 return _core_.Image_GetBlue(*args, **kwargs)
e811c8ce
RD
2231
2232 def SetAlpha(*args, **kwargs):
a95a7133 2233 """SetAlpha(self, int x, int y, unsigned char alpha)"""
54f9ee45 2234 return _core_.Image_SetAlpha(*args, **kwargs)
e811c8ce
RD
2235
2236 def GetAlpha(*args, **kwargs):
a95a7133 2237 """GetAlpha(self, int x, int y) -> unsigned char"""
54f9ee45 2238 return _core_.Image_GetAlpha(*args, **kwargs)
e811c8ce
RD
2239
2240 def HasAlpha(*args, **kwargs):
a95a7133 2241 """HasAlpha(self) -> bool"""
54f9ee45 2242 return _core_.Image_HasAlpha(*args, **kwargs)
e811c8ce 2243
68350608
RD
2244 def InitAlpha(*args, **kwargs):
2245 """
2246 InitAlpha(self)
2247
2248 Initializes the image alpha channel data. It is an error to call it if
2249 the image already has alpha data. If it doesn't, alpha data will be by
2250 default initialized to all pixels being fully opaque. But if the image
2251 has a a mask colour, all mask pixels will be completely transparent.
2252 """
2253 return _core_.Image_InitAlpha(*args, **kwargs)
2254
bcd0d7b6
RD
2255 def IsTransparent(*args, **kwargs):
2256 """
2257 IsTransparent(self, int x, int y, unsigned char threshold=IMAGE_ALPHA_THRESHOLD) -> bool
2258
2259 Returns True if this pixel is masked or has an alpha value less than
2260 the spcified threshold.
2261 """
2262 return _core_.Image_IsTransparent(*args, **kwargs)
2263
e811c8ce 2264 def FindFirstUnusedColour(*args, **kwargs):
fd2dc343
RD
2265 """
2266 FindFirstUnusedColour(int startR=1, int startG=0, int startB=0) -> (success, r, g, b)
2267
2268 Find first colour that is not used in the image and has higher RGB
2269 values than startR, startG, startB. Returns a tuple consisting of a
2270 success flag and rgb values.
2271 """
54f9ee45 2272 return _core_.Image_FindFirstUnusedColour(*args, **kwargs)
e811c8ce 2273
4cf4100f
RD
2274 def ConvertAlphaToMask(*args, **kwargs):
2275 """
bcd0d7b6 2276 ConvertAlphaToMask(self, byte threshold=IMAGE_ALPHA_THRESHOLD) -> bool
4cf4100f
RD
2277
2278 If the image has alpha channel, this method converts it to mask. All pixels
2279 with alpha value less than ``threshold`` are replaced with mask colour and the
2280 alpha channel is removed. Mask colour is chosen automatically using
2281 `FindFirstUnusedColour`.
2282
2283 If the image image doesn't have alpha channel, ConvertAlphaToMask does
2284 nothing.
2285 """
2286 return _core_.Image_ConvertAlphaToMask(*args, **kwargs)
2287
8fb0e70a
RD
2288 def ConvertColourToAlpha(*args, **kwargs):
2289 """
2290 ConvertColourToAlpha(self, unsigned char r, unsigned char g, unsigned char b) -> bool
2291
2292 This method converts an image where the original alpha information is
2293 only available as a shades of a colour (actually shades of grey)
2294 typically when you draw anti-aliased text into a bitmap. The DC
2295 drawing routines draw grey values on the black background although
2296 they actually mean to draw white with differnt alpha values. This
2297 method reverses it, assuming a black (!) background and white text.
2298 The method will then fill up the whole image with the colour given.
2299 """
2300 return _core_.Image_ConvertColourToAlpha(*args, **kwargs)
2301
e811c8ce 2302 def SetMaskFromImage(*args, **kwargs):
a95a7133 2303 """SetMaskFromImage(self, Image mask, byte mr, byte mg, byte mb) -> bool"""
54f9ee45 2304 return _core_.Image_SetMaskFromImage(*args, **kwargs)
e811c8ce
RD
2305
2306 def CanRead(*args, **kwargs):
66c033b4 2307 """CanRead(String name) -> bool"""
54f9ee45 2308 return _core_.Image_CanRead(*args, **kwargs)
e811c8ce
RD
2309
2310 CanRead = staticmethod(CanRead)
2311 def GetImageCount(*args, **kwargs):
66c033b4 2312 """GetImageCount(String name, long type=BITMAP_TYPE_ANY) -> int"""
54f9ee45 2313 return _core_.Image_GetImageCount(*args, **kwargs)
e811c8ce
RD
2314
2315 GetImageCount = staticmethod(GetImageCount)
2316 def LoadFile(*args, **kwargs):
a95a7133 2317 """LoadFile(self, String name, long type=BITMAP_TYPE_ANY, int index=-1) -> bool"""
54f9ee45 2318 return _core_.Image_LoadFile(*args, **kwargs)
e811c8ce
RD
2319
2320 def LoadMimeFile(*args, **kwargs):
a95a7133 2321 """LoadMimeFile(self, String name, String mimetype, int index=-1) -> bool"""
54f9ee45 2322 return _core_.Image_LoadMimeFile(*args, **kwargs)
e811c8ce
RD
2323
2324 def SaveFile(*args, **kwargs):
a95a7133 2325 """SaveFile(self, String name, int type) -> bool"""
54f9ee45 2326 return _core_.Image_SaveFile(*args, **kwargs)
e811c8ce
RD
2327
2328 def SaveMimeFile(*args, **kwargs):
a95a7133 2329 """SaveMimeFile(self, String name, String mimetype) -> bool"""
54f9ee45 2330 return _core_.Image_SaveMimeFile(*args, **kwargs)
e811c8ce
RD
2331
2332 def CanReadStream(*args, **kwargs):
66c033b4 2333 """CanReadStream(InputStream stream) -> bool"""
54f9ee45 2334 return _core_.Image_CanReadStream(*args, **kwargs)
e811c8ce
RD
2335
2336 CanReadStream = staticmethod(CanReadStream)
2337 def LoadStream(*args, **kwargs):
a95a7133 2338 """LoadStream(self, InputStream stream, long type=BITMAP_TYPE_ANY, int index=-1) -> bool"""
54f9ee45 2339 return _core_.Image_LoadStream(*args, **kwargs)
e811c8ce
RD
2340
2341 def LoadMimeStream(*args, **kwargs):
a95a7133 2342 """LoadMimeStream(self, InputStream stream, String mimetype, int index=-1) -> bool"""
54f9ee45 2343 return _core_.Image_LoadMimeStream(*args, **kwargs)
e811c8ce
RD
2344
2345 def Ok(*args, **kwargs):
a95a7133 2346 """Ok(self) -> bool"""
54f9ee45 2347 return _core_.Image_Ok(*args, **kwargs)
e811c8ce
RD
2348
2349 def GetWidth(*args, **kwargs):
a95a7133 2350 """GetWidth(self) -> int"""
54f9ee45 2351 return _core_.Image_GetWidth(*args, **kwargs)
e811c8ce
RD
2352
2353 def GetHeight(*args, **kwargs):
a95a7133 2354 """GetHeight(self) -> int"""
54f9ee45 2355 return _core_.Image_GetHeight(*args, **kwargs)
e811c8ce 2356
b2df227b 2357 def GetSize(*args, **kwargs):
a95a7133 2358 """GetSize(self) -> Size"""
54f9ee45 2359 return _core_.Image_GetSize(*args, **kwargs)
b2df227b 2360
e811c8ce 2361 def GetSubImage(*args, **kwargs):
a95a7133 2362 """GetSubImage(self, Rect rect) -> Image"""
54f9ee45 2363 return _core_.Image_GetSubImage(*args, **kwargs)
e811c8ce 2364
aff4cc5c
RD
2365 def Size(*args, **kwargs):
2366 """Size(self, Size size, Point pos, int r=-1, int g=-1, int b=-1) -> Image"""
2367 return _core_.Image_Size(*args, **kwargs)
2368
e811c8ce 2369 def Copy(*args, **kwargs):
a95a7133 2370 """Copy(self) -> Image"""
54f9ee45 2371 return _core_.Image_Copy(*args, **kwargs)
e811c8ce
RD
2372
2373 def Paste(*args, **kwargs):
a95a7133 2374 """Paste(self, Image image, int x, int y)"""
54f9ee45 2375 return _core_.Image_Paste(*args, **kwargs)
e811c8ce
RD
2376
2377 def GetData(*args, **kwargs):
61d07ac7
RD
2378 """
2379 GetData(self) -> PyObject
2380
2381 Returns a string containing a copy of the RGB bytes of the image.
2382 """
54f9ee45 2383 return _core_.Image_GetData(*args, **kwargs)
e811c8ce
RD
2384
2385 def SetData(*args, **kwargs):
61d07ac7
RD
2386 """
2387 SetData(self, buffer data)
2388
2389 Resets the Image's RGB data from a buffer of RGB bytes. Accepts
2390 either a string or a buffer object holding the data and the length of
2391 the data must be width*height*3.
2392 """
54f9ee45 2393 return _core_.Image_SetData(*args, **kwargs)
e811c8ce
RD
2394
2395 def GetDataBuffer(*args, **kwargs):
61d07ac7
RD
2396 """
2397 GetDataBuffer(self) -> PyObject
2398
2399 Returns a writable Python buffer object that is pointing at the RGB
2400 image data buffer inside the wx.Image.
2401 """
54f9ee45 2402 return _core_.Image_GetDataBuffer(*args, **kwargs)
e811c8ce
RD
2403
2404 def SetDataBuffer(*args, **kwargs):
61d07ac7
RD
2405 """
2406 SetDataBuffer(self, buffer data)
2407
2408 Sets the internal image data pointer to point at a Python buffer
2409 object. This can save a copy of the data but you must ensure that the
2410 buffer object lives longer than the wx.Image does.
2411 """
54f9ee45 2412 return _core_.Image_SetDataBuffer(*args, **kwargs)
e811c8ce
RD
2413
2414 def GetAlphaData(*args, **kwargs):
61d07ac7
RD
2415 """
2416 GetAlphaData(self) -> PyObject
2417
2418 Returns a string containing a copy of the alpha bytes of the image.
2419 """
54f9ee45 2420 return _core_.Image_GetAlphaData(*args, **kwargs)
e811c8ce
RD
2421
2422 def SetAlphaData(*args, **kwargs):
61d07ac7
RD
2423 """
2424 SetAlphaData(self, buffer alpha)
2425
2426 Resets the Image's alpha data from a buffer of bytes. Accepts either
2427 a string or a buffer object holding the data and the length of the
2428 data must be width*height.
2429 """
54f9ee45 2430 return _core_.Image_SetAlphaData(*args, **kwargs)
e811c8ce
RD
2431
2432 def GetAlphaBuffer(*args, **kwargs):
a95a7133 2433 """GetAlphaBuffer(self) -> PyObject"""
54f9ee45 2434 return _core_.Image_GetAlphaBuffer(*args, **kwargs)
e811c8ce
RD
2435
2436 def SetAlphaBuffer(*args, **kwargs):
61d07ac7 2437 """SetAlphaBuffer(self, buffer alpha)"""
54f9ee45 2438 return _core_.Image_SetAlphaBuffer(*args, **kwargs)
e811c8ce
RD
2439
2440 def SetMaskColour(*args, **kwargs):
a95a7133 2441 """SetMaskColour(self, unsigned char r, unsigned char g, unsigned char b)"""
54f9ee45 2442 return _core_.Image_SetMaskColour(*args, **kwargs)
e811c8ce 2443
aff4cc5c
RD
2444 def GetOrFindMaskColour(*args, **kwargs):
2445 """
2446 GetOrFindMaskColour() -> (r,g,b)
2447
2448 Get the current mask colour or find a suitable colour.
2449 """
2450 return _core_.Image_GetOrFindMaskColour(*args, **kwargs)
2451
e811c8ce 2452 def GetMaskRed(*args, **kwargs):
a95a7133 2453 """GetMaskRed(self) -> unsigned char"""
54f9ee45 2454 return _core_.Image_GetMaskRed(*args, **kwargs)
e811c8ce
RD
2455
2456 def GetMaskGreen(*args, **kwargs):
a95a7133 2457 """GetMaskGreen(self) -> unsigned char"""
54f9ee45 2458 return _core_.Image_GetMaskGreen(*args, **kwargs)
e811c8ce
RD
2459
2460 def GetMaskBlue(*args, **kwargs):
a95a7133 2461 """GetMaskBlue(self) -> unsigned char"""
54f9ee45 2462 return _core_.Image_GetMaskBlue(*args, **kwargs)
e811c8ce
RD
2463
2464 def SetMask(*args, **kwargs):
a95a7133 2465 """SetMask(self, bool mask=True)"""
54f9ee45 2466 return _core_.Image_SetMask(*args, **kwargs)
e811c8ce
RD
2467
2468 def HasMask(*args, **kwargs):
a95a7133 2469 """HasMask(self) -> bool"""
54f9ee45 2470 return _core_.Image_HasMask(*args, **kwargs)
e811c8ce
RD
2471
2472 def Rotate(*args, **kwargs):
0df68c9f 2473 """
a95a7133 2474 Rotate(self, double angle, Point centre_of_rotation, bool interpolating=True,
0df68c9f
RD
2475 Point offset_after_rotation=None) -> Image
2476 """
54f9ee45 2477 return _core_.Image_Rotate(*args, **kwargs)
e811c8ce
RD
2478
2479 def Rotate90(*args, **kwargs):
a95a7133 2480 """Rotate90(self, bool clockwise=True) -> Image"""
54f9ee45 2481 return _core_.Image_Rotate90(*args, **kwargs)
e811c8ce
RD
2482
2483 def Mirror(*args, **kwargs):
a95a7133 2484 """Mirror(self, bool horizontally=True) -> Image"""
54f9ee45 2485 return _core_.Image_Mirror(*args, **kwargs)
e811c8ce
RD
2486
2487 def Replace(*args, **kwargs):
0df68c9f 2488 """
a95a7133 2489 Replace(self, unsigned char r1, unsigned char g1, unsigned char b1,
0df68c9f
RD
2490 unsigned char r2, unsigned char g2, unsigned char b2)
2491 """
54f9ee45 2492 return _core_.Image_Replace(*args, **kwargs)
e811c8ce
RD
2493
2494 def ConvertToMono(*args, **kwargs):
a95a7133 2495 """ConvertToMono(self, unsigned char r, unsigned char g, unsigned char b) -> Image"""
54f9ee45 2496 return _core_.Image_ConvertToMono(*args, **kwargs)
e811c8ce
RD
2497
2498 def SetOption(*args, **kwargs):
a95a7133 2499 """SetOption(self, String name, String value)"""
54f9ee45 2500 return _core_.Image_SetOption(*args, **kwargs)
e811c8ce
RD
2501
2502 def SetOptionInt(*args, **kwargs):
a95a7133 2503 """SetOptionInt(self, String name, int value)"""
54f9ee45 2504 return _core_.Image_SetOptionInt(*args, **kwargs)
e811c8ce
RD
2505
2506 def GetOption(*args, **kwargs):
a95a7133 2507 """GetOption(self, String name) -> String"""
54f9ee45 2508 return _core_.Image_GetOption(*args, **kwargs)
e811c8ce
RD
2509
2510 def GetOptionInt(*args, **kwargs):
a95a7133 2511 """GetOptionInt(self, String name) -> int"""
54f9ee45 2512 return _core_.Image_GetOptionInt(*args, **kwargs)
e811c8ce
RD
2513
2514 def HasOption(*args, **kwargs):
a95a7133 2515 """HasOption(self, String name) -> bool"""
54f9ee45 2516 return _core_.Image_HasOption(*args, **kwargs)
e811c8ce
RD
2517
2518 def CountColours(*args, **kwargs):
a95a7133 2519 """CountColours(self, unsigned long stopafter=(unsigned long) -1) -> unsigned long"""
54f9ee45 2520 return _core_.Image_CountColours(*args, **kwargs)
e811c8ce
RD
2521
2522 def ComputeHistogram(*args, **kwargs):
a95a7133 2523 """ComputeHistogram(self, ImageHistogram h) -> unsigned long"""
54f9ee45 2524 return _core_.Image_ComputeHistogram(*args, **kwargs)
e811c8ce
RD
2525
2526 def AddHandler(*args, **kwargs):
66c033b4 2527 """AddHandler(ImageHandler handler)"""
54f9ee45 2528 return _core_.Image_AddHandler(*args, **kwargs)
e811c8ce
RD
2529
2530 AddHandler = staticmethod(AddHandler)
2531 def InsertHandler(*args, **kwargs):
66c033b4 2532 """InsertHandler(ImageHandler handler)"""
54f9ee45 2533 return _core_.Image_InsertHandler(*args, **kwargs)
e811c8ce
RD
2534
2535 InsertHandler = staticmethod(InsertHandler)
2536 def RemoveHandler(*args, **kwargs):
66c033b4 2537 """RemoveHandler(String name) -> bool"""
54f9ee45 2538 return _core_.Image_RemoveHandler(*args, **kwargs)
e811c8ce
RD
2539
2540 RemoveHandler = staticmethod(RemoveHandler)
2541 def GetImageExtWildcard(*args, **kwargs):
66c033b4 2542 """GetImageExtWildcard() -> String"""
54f9ee45 2543 return _core_.Image_GetImageExtWildcard(*args, **kwargs)
e811c8ce
RD
2544
2545 GetImageExtWildcard = staticmethod(GetImageExtWildcard)
2546 def ConvertToBitmap(*args, **kwargs):
1fbf26be 2547 """ConvertToBitmap(self, int depth=-1) -> Bitmap"""
54f9ee45 2548 return _core_.Image_ConvertToBitmap(*args, **kwargs)
e811c8ce
RD
2549
2550 def ConvertToMonoBitmap(*args, **kwargs):
a95a7133 2551 """ConvertToMonoBitmap(self, unsigned char red, unsigned char green, unsigned char blue) -> Bitmap"""
54f9ee45 2552 return _core_.Image_ConvertToMonoBitmap(*args, **kwargs)
e811c8ce
RD
2553
2554 def __nonzero__(self): return self.Ok()
d14a1e28
RD
2555
2556class ImagePtr(Image):
2557 def __init__(self, this):
2558 self.this = this
2559 if not hasattr(self,"thisown"): self.thisown = 0
2560 self.__class__ = Image
54f9ee45 2561_core_.Image_swigregister(ImagePtr)
d14a1e28
RD
2562
2563def ImageFromMime(*args, **kwargs):
196addbf 2564 """ImageFromMime(String name, String mimetype, int index=-1) -> Image"""
54f9ee45 2565 val = _core_.new_ImageFromMime(*args, **kwargs)
d14a1e28
RD
2566 val.thisown = 1
2567 return val
2568
2569def ImageFromStream(*args, **kwargs):
196addbf 2570 """ImageFromStream(InputStream stream, long type=BITMAP_TYPE_ANY, int index=-1) -> Image"""
54f9ee45 2571 val = _core_.new_ImageFromStream(*args, **kwargs)
d14a1e28
RD
2572 val.thisown = 1
2573 return val
2574
2575def ImageFromStreamMime(*args, **kwargs):
196addbf 2576 """ImageFromStreamMime(InputStream stream, String mimetype, int index=-1) -> Image"""
54f9ee45 2577 val = _core_.new_ImageFromStreamMime(*args, **kwargs)
d14a1e28
RD
2578 val.thisown = 1
2579 return val
2580
66c033b4 2581def EmptyImage(*args, **kwargs):
61d07ac7
RD
2582 """
2583 EmptyImage(int width=0, int height=0, bool clear=True) -> Image
2584
2585 Construct an empty image of a given size, optionally setting all
2586 pixels to black.
2587 """
66c033b4 2588 val = _core_.new_EmptyImage(*args, **kwargs)
d14a1e28
RD
2589 val.thisown = 1
2590 return val
2591
2592def ImageFromBitmap(*args, **kwargs):
61d07ac7
RD
2593 """
2594 ImageFromBitmap(Bitmap bitmap) -> Image
2595
2596 Construct an Image from a `wx.Bitmap`.
2597 """
54f9ee45 2598 val = _core_.new_ImageFromBitmap(*args, **kwargs)
d14a1e28
RD
2599 val.thisown = 1
2600 return val
2601
2602def ImageFromData(*args, **kwargs):
61d07ac7
RD
2603 """
2604 ImageFromData(int width, int height, buffer data) -> Image
2605
2606 Construct an Image from a buffer of RGB bytes. Accepts either a
2607 string or a buffer object holding the data and the length of the data
2608 must be width*height*3.
2609 """
54f9ee45 2610 val = _core_.new_ImageFromData(*args, **kwargs)
d14a1e28
RD
2611 val.thisown = 1
2612 return val
2613
1823fbb4 2614def ImageFromDataWithAlpha(*args, **kwargs):
61d07ac7
RD
2615 """
2616 ImageFromDataWithAlpha(int width, int height, buffer data, buffer alpha) -> Image
2617
2618 Construct an Image from a buffer of RGB bytes with an Alpha channel.
2619 Accepts either a string or a buffer object holding the data and the
2620 length of the data must be width*height*3.
2621 """
1823fbb4
RD
2622 val = _core_.new_ImageFromDataWithAlpha(*args, **kwargs)
2623 val.thisown = 1
2624 return val
2625
e811c8ce 2626def Image_CanRead(*args, **kwargs):
196addbf 2627 """Image_CanRead(String name) -> bool"""
54f9ee45 2628 return _core_.Image_CanRead(*args, **kwargs)
d14a1e28 2629
e811c8ce 2630def Image_GetImageCount(*args, **kwargs):
196addbf 2631 """Image_GetImageCount(String name, long type=BITMAP_TYPE_ANY) -> int"""
54f9ee45 2632 return _core_.Image_GetImageCount(*args, **kwargs)
d14a1e28 2633
e811c8ce 2634def Image_CanReadStream(*args, **kwargs):
196addbf 2635 """Image_CanReadStream(InputStream stream) -> bool"""
54f9ee45 2636 return _core_.Image_CanReadStream(*args, **kwargs)
d14a1e28 2637
e811c8ce
RD
2638def Image_AddHandler(*args, **kwargs):
2639 """Image_AddHandler(ImageHandler handler)"""
54f9ee45 2640 return _core_.Image_AddHandler(*args, **kwargs)
d14a1e28 2641
e811c8ce
RD
2642def Image_InsertHandler(*args, **kwargs):
2643 """Image_InsertHandler(ImageHandler handler)"""
54f9ee45 2644 return _core_.Image_InsertHandler(*args, **kwargs)
d14a1e28 2645
e811c8ce 2646def Image_RemoveHandler(*args, **kwargs):
196addbf 2647 """Image_RemoveHandler(String name) -> bool"""
54f9ee45 2648 return _core_.Image_RemoveHandler(*args, **kwargs)
d14a1e28 2649
e811c8ce 2650def Image_GetImageExtWildcard(*args, **kwargs):
196addbf 2651 """Image_GetImageExtWildcard() -> String"""
54f9ee45 2652 return _core_.Image_GetImageExtWildcard(*args, **kwargs)
d14a1e28 2653
5e4ca4a8
RD
2654def InitAllImageHandlers():
2655 """
2656 The former functionality of InitAllImageHanders is now done internal to
2657 the _core_ extension module and so this function has become a simple NOP.
2658 """
2659 pass
d14a1e28 2660
54f9ee45
RD
2661IMAGE_RESOLUTION_INCHES = _core_.IMAGE_RESOLUTION_INCHES
2662IMAGE_RESOLUTION_CM = _core_.IMAGE_RESOLUTION_CM
b9d6a5f3
RD
2663PNG_TYPE_COLOUR = _core_.PNG_TYPE_COLOUR
2664PNG_TYPE_GREY = _core_.PNG_TYPE_GREY
2665PNG_TYPE_GREY_RED = _core_.PNG_TYPE_GREY_RED
54f9ee45
RD
2666BMP_24BPP = _core_.BMP_24BPP
2667BMP_8BPP = _core_.BMP_8BPP
2668BMP_8BPP_GREY = _core_.BMP_8BPP_GREY
2669BMP_8BPP_GRAY = _core_.BMP_8BPP_GRAY
2670BMP_8BPP_RED = _core_.BMP_8BPP_RED
2671BMP_8BPP_PALETTE = _core_.BMP_8BPP_PALETTE
2672BMP_4BPP = _core_.BMP_4BPP
2673BMP_1BPP = _core_.BMP_1BPP
2674BMP_1BPP_BW = _core_.BMP_1BPP_BW
d14a1e28 2675class BMPHandler(ImageHandler):
27fb7603 2676 """A `wx.ImageHandler` for \*.bmp bitmap files."""
e811c8ce
RD
2677 def __repr__(self):
2678 return "<%s.%s; proxy of C++ wxBMPHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 2679 def __init__(self, *args, **kwargs):
27fb7603
RD
2680 """
2681 __init__(self) -> BMPHandler
2682
2683 A `wx.ImageHandler` for \*.bmp bitmap files.
2684 """
54f9ee45 2685 newobj = _core_.new_BMPHandler(*args, **kwargs)
d14a1e28
RD
2686 self.this = newobj.this
2687 self.thisown = 1
2688 del newobj.thisown
d14a1e28
RD
2689
2690class BMPHandlerPtr(BMPHandler):
2691 def __init__(self, this):
2692 self.this = this
2693 if not hasattr(self,"thisown"): self.thisown = 0
2694 self.__class__ = BMPHandler
54f9ee45 2695_core_.BMPHandler_swigregister(BMPHandlerPtr)
d14a1e28 2696NullImage = cvar.NullImage
0c243d93 2697IMAGE_OPTION_FILENAME = cvar.IMAGE_OPTION_FILENAME
d14a1e28
RD
2698IMAGE_OPTION_BMP_FORMAT = cvar.IMAGE_OPTION_BMP_FORMAT
2699IMAGE_OPTION_CUR_HOTSPOT_X = cvar.IMAGE_OPTION_CUR_HOTSPOT_X
2700IMAGE_OPTION_CUR_HOTSPOT_Y = cvar.IMAGE_OPTION_CUR_HOTSPOT_Y
2701IMAGE_OPTION_RESOLUTION = cvar.IMAGE_OPTION_RESOLUTION
0c243d93
RD
2702IMAGE_OPTION_RESOLUTIONX = cvar.IMAGE_OPTION_RESOLUTIONX
2703IMAGE_OPTION_RESOLUTIONY = cvar.IMAGE_OPTION_RESOLUTIONY
d14a1e28 2704IMAGE_OPTION_RESOLUTIONUNIT = cvar.IMAGE_OPTION_RESOLUTIONUNIT
24d7cbea 2705IMAGE_OPTION_QUALITY = cvar.IMAGE_OPTION_QUALITY
0c243d93
RD
2706IMAGE_OPTION_BITSPERSAMPLE = cvar.IMAGE_OPTION_BITSPERSAMPLE
2707IMAGE_OPTION_SAMPLESPERPIXEL = cvar.IMAGE_OPTION_SAMPLESPERPIXEL
2708IMAGE_OPTION_COMPRESSION = cvar.IMAGE_OPTION_COMPRESSION
2709IMAGE_OPTION_IMAGEDESCRIPTOR = cvar.IMAGE_OPTION_IMAGEDESCRIPTOR
b9d6a5f3
RD
2710IMAGE_OPTION_PNG_FORMAT = cvar.IMAGE_OPTION_PNG_FORMAT
2711IMAGE_OPTION_PNG_BITDEPTH = cvar.IMAGE_OPTION_PNG_BITDEPTH
d14a1e28
RD
2712
2713class ICOHandler(BMPHandler):
27fb7603 2714 """A `wx.ImageHandler` for \*.ico icon files."""
e811c8ce
RD
2715 def __repr__(self):
2716 return "<%s.%s; proxy of C++ wxICOHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 2717 def __init__(self, *args, **kwargs):
27fb7603
RD
2718 """
2719 __init__(self) -> ICOHandler
2720
2721 A `wx.ImageHandler` for \*.ico icon files.
2722 """
54f9ee45 2723 newobj = _core_.new_ICOHandler(*args, **kwargs)
d14a1e28
RD
2724 self.this = newobj.this
2725 self.thisown = 1
2726 del newobj.thisown
d14a1e28
RD
2727
2728class ICOHandlerPtr(ICOHandler):
2729 def __init__(self, this):
2730 self.this = this
2731 if not hasattr(self,"thisown"): self.thisown = 0
2732 self.__class__ = ICOHandler
54f9ee45 2733_core_.ICOHandler_swigregister(ICOHandlerPtr)
d14a1e28
RD
2734
2735class CURHandler(ICOHandler):
27fb7603 2736 """A `wx.ImageHandler` for \*.cur cursor files."""
e811c8ce
RD
2737 def __repr__(self):
2738 return "<%s.%s; proxy of C++ wxCURHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 2739 def __init__(self, *args, **kwargs):
27fb7603
RD
2740 """
2741 __init__(self) -> CURHandler
2742
2743 A `wx.ImageHandler` for \*.cur cursor files.
2744 """
54f9ee45 2745 newobj = _core_.new_CURHandler(*args, **kwargs)
d14a1e28
RD
2746 self.this = newobj.this
2747 self.thisown = 1
2748 del newobj.thisown
d14a1e28
RD
2749
2750class CURHandlerPtr(CURHandler):
2751 def __init__(self, this):
2752 self.this = this
2753 if not hasattr(self,"thisown"): self.thisown = 0
2754 self.__class__ = CURHandler
54f9ee45 2755_core_.CURHandler_swigregister(CURHandlerPtr)
d14a1e28
RD
2756
2757class ANIHandler(CURHandler):
27fb7603 2758 """A `wx.ImageHandler` for \*.ani animated cursor files."""
e811c8ce
RD
2759 def __repr__(self):
2760 return "<%s.%s; proxy of C++ wxANIHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 2761 def __init__(self, *args, **kwargs):
27fb7603
RD
2762 """
2763 __init__(self) -> ANIHandler
2764
2765 A `wx.ImageHandler` for \*.ani animated cursor files.
2766 """
54f9ee45 2767 newobj = _core_.new_ANIHandler(*args, **kwargs)
d14a1e28
RD
2768 self.this = newobj.this
2769 self.thisown = 1
2770 del newobj.thisown
d14a1e28
RD
2771
2772class ANIHandlerPtr(ANIHandler):
2773 def __init__(self, this):
2774 self.this = this
2775 if not hasattr(self,"thisown"): self.thisown = 0
2776 self.__class__ = ANIHandler
54f9ee45 2777_core_.ANIHandler_swigregister(ANIHandlerPtr)
d14a1e28
RD
2778
2779class PNGHandler(ImageHandler):
27fb7603 2780 """A `wx.ImageHandler` for PNG image files."""
e811c8ce
RD
2781 def __repr__(self):
2782 return "<%s.%s; proxy of C++ wxPNGHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 2783 def __init__(self, *args, **kwargs):
27fb7603
RD
2784 """
2785 __init__(self) -> PNGHandler
2786
2787 A `wx.ImageHandler` for PNG image files.
2788 """
54f9ee45 2789 newobj = _core_.new_PNGHandler(*args, **kwargs)
d14a1e28
RD
2790 self.this = newobj.this
2791 self.thisown = 1
2792 del newobj.thisown
d14a1e28
RD
2793
2794class PNGHandlerPtr(PNGHandler):
2795 def __init__(self, this):
2796 self.this = this
2797 if not hasattr(self,"thisown"): self.thisown = 0
2798 self.__class__ = PNGHandler
54f9ee45 2799_core_.PNGHandler_swigregister(PNGHandlerPtr)
d14a1e28
RD
2800
2801class GIFHandler(ImageHandler):
27fb7603 2802 """A `wx.ImageHandler` for GIF image files."""
e811c8ce
RD
2803 def __repr__(self):
2804 return "<%s.%s; proxy of C++ wxGIFHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 2805 def __init__(self, *args, **kwargs):
27fb7603
RD
2806 """
2807 __init__(self) -> GIFHandler
2808
2809 A `wx.ImageHandler` for GIF image files.
2810 """
54f9ee45 2811 newobj = _core_.new_GIFHandler(*args, **kwargs)
d14a1e28
RD
2812 self.this = newobj.this
2813 self.thisown = 1
2814 del newobj.thisown
d14a1e28
RD
2815
2816class GIFHandlerPtr(GIFHandler):
2817 def __init__(self, this):
2818 self.this = this
2819 if not hasattr(self,"thisown"): self.thisown = 0
2820 self.__class__ = GIFHandler
54f9ee45 2821_core_.GIFHandler_swigregister(GIFHandlerPtr)
d14a1e28
RD
2822
2823class PCXHandler(ImageHandler):
27fb7603 2824 """A `wx.ImageHandler` for PCX imager files."""
e811c8ce
RD
2825 def __repr__(self):
2826 return "<%s.%s; proxy of C++ wxPCXHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 2827 def __init__(self, *args, **kwargs):
27fb7603
RD
2828 """
2829 __init__(self) -> PCXHandler
2830
2831 A `wx.ImageHandler` for PCX imager files.
2832 """
54f9ee45 2833 newobj = _core_.new_PCXHandler(*args, **kwargs)
d14a1e28
RD
2834 self.this = newobj.this
2835 self.thisown = 1
2836 del newobj.thisown
d14a1e28
RD
2837
2838class PCXHandlerPtr(PCXHandler):
2839 def __init__(self, this):
2840 self.this = this
2841 if not hasattr(self,"thisown"): self.thisown = 0
2842 self.__class__ = PCXHandler
54f9ee45 2843_core_.PCXHandler_swigregister(PCXHandlerPtr)
d14a1e28
RD
2844
2845class JPEGHandler(ImageHandler):
27fb7603 2846 """A `wx.ImageHandler` for JPEG/JPG image files."""
e811c8ce
RD
2847 def __repr__(self):
2848 return "<%s.%s; proxy of C++ wxJPEGHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 2849 def __init__(self, *args, **kwargs):
27fb7603
RD
2850 """
2851 __init__(self) -> JPEGHandler
2852
2853 A `wx.ImageHandler` for JPEG/JPG image files.
2854 """
54f9ee45 2855 newobj = _core_.new_JPEGHandler(*args, **kwargs)
d14a1e28
RD
2856 self.this = newobj.this
2857 self.thisown = 1
2858 del newobj.thisown
d14a1e28
RD
2859
2860class JPEGHandlerPtr(JPEGHandler):
2861 def __init__(self, this):
2862 self.this = this
2863 if not hasattr(self,"thisown"): self.thisown = 0
2864 self.__class__ = JPEGHandler
54f9ee45 2865_core_.JPEGHandler_swigregister(JPEGHandlerPtr)
d14a1e28
RD
2866
2867class PNMHandler(ImageHandler):
27fb7603 2868 """A `wx.ImageHandler` for PNM image files."""
e811c8ce
RD
2869 def __repr__(self):
2870 return "<%s.%s; proxy of C++ wxPNMHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 2871 def __init__(self, *args, **kwargs):
27fb7603
RD
2872 """
2873 __init__(self) -> PNMHandler
2874
2875 A `wx.ImageHandler` for PNM image files.
2876 """
54f9ee45 2877 newobj = _core_.new_PNMHandler(*args, **kwargs)
d14a1e28
RD
2878 self.this = newobj.this
2879 self.thisown = 1
2880 del newobj.thisown
d14a1e28
RD
2881
2882class PNMHandlerPtr(PNMHandler):
2883 def __init__(self, this):
2884 self.this = this
2885 if not hasattr(self,"thisown"): self.thisown = 0
2886 self.__class__ = PNMHandler
54f9ee45 2887_core_.PNMHandler_swigregister(PNMHandlerPtr)
d14a1e28
RD
2888
2889class XPMHandler(ImageHandler):
27fb7603 2890 """A `wx.ImageHandler` for XPM image."""
e811c8ce
RD
2891 def __repr__(self):
2892 return "<%s.%s; proxy of C++ wxXPMHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 2893 def __init__(self, *args, **kwargs):
27fb7603
RD
2894 """
2895 __init__(self) -> XPMHandler
2896
2897 A `wx.ImageHandler` for XPM image.
2898 """
54f9ee45 2899 newobj = _core_.new_XPMHandler(*args, **kwargs)
d14a1e28
RD
2900 self.this = newobj.this
2901 self.thisown = 1
2902 del newobj.thisown
d14a1e28
RD
2903
2904class XPMHandlerPtr(XPMHandler):
2905 def __init__(self, this):
2906 self.this = this
2907 if not hasattr(self,"thisown"): self.thisown = 0
2908 self.__class__ = XPMHandler
54f9ee45 2909_core_.XPMHandler_swigregister(XPMHandlerPtr)
d14a1e28
RD
2910
2911class TIFFHandler(ImageHandler):
27fb7603 2912 """A `wx.ImageHandler` for TIFF image files."""
e811c8ce
RD
2913 def __repr__(self):
2914 return "<%s.%s; proxy of C++ wxTIFFHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 2915 def __init__(self, *args, **kwargs):
27fb7603
RD
2916 """
2917 __init__(self) -> TIFFHandler
2918
2919 A `wx.ImageHandler` for TIFF image files.
2920 """
54f9ee45 2921 newobj = _core_.new_TIFFHandler(*args, **kwargs)
d14a1e28
RD
2922 self.this = newobj.this
2923 self.thisown = 1
2924 del newobj.thisown
d14a1e28
RD
2925
2926class TIFFHandlerPtr(TIFFHandler):
2927 def __init__(self, this):
2928 self.this = this
2929 if not hasattr(self,"thisown"): self.thisown = 0
2930 self.__class__ = TIFFHandler
54f9ee45 2931_core_.TIFFHandler_swigregister(TIFFHandlerPtr)
d14a1e28 2932
c0de73ae
RD
2933QUANTIZE_INCLUDE_WINDOWS_COLOURS = _core_.QUANTIZE_INCLUDE_WINDOWS_COLOURS
2934QUANTIZE_FILL_DESTINATION_IMAGE = _core_.QUANTIZE_FILL_DESTINATION_IMAGE
2935class Quantize(object):
2936 """Performs quantization, or colour reduction, on a wxImage."""
2937 def __init__(self): raise RuntimeError, "No constructor defined"
2938 def __repr__(self):
2939 return "<%s.%s; proxy of C++ wxQuantize instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
2940 def Quantize(*args, **kwargs):
2941 """
2942 Quantize(Image src, Image dest, int desiredNoColours=236, int flags=wxQUANTIZE_INCLUDE_WINDOWS_COLOURS|wxQUANTIZE_FILL_DESTINATION_IMAGE) -> bool
2943
2944 Reduce the colours in the source image and put the result into the
2945 destination image, setting the palette in the destination if
2946 needed. Both images may be the same, to overwrite the source image.
2947 """
2948 return _core_.Quantize_Quantize(*args, **kwargs)
2949
2950 Quantize = staticmethod(Quantize)
2951
2952class QuantizePtr(Quantize):
2953 def __init__(self, this):
2954 self.this = this
2955 if not hasattr(self,"thisown"): self.thisown = 0
2956 self.__class__ = Quantize
2957_core_.Quantize_swigregister(QuantizePtr)
2958
2959def Quantize_Quantize(*args, **kwargs):
2960 """
2961 Quantize_Quantize(Image src, Image dest, int desiredNoColours=236, int flags=wxQUANTIZE_INCLUDE_WINDOWS_COLOURS|wxQUANTIZE_FILL_DESTINATION_IMAGE) -> bool
2962
2963 Reduce the colours in the source image and put the result into the
2964 destination image, setting the palette in the destination if
2965 needed. Both images may be the same, to overwrite the source image.
2966 """
2967 return _core_.Quantize_Quantize(*args, **kwargs)
2968
d14a1e28
RD
2969#---------------------------------------------------------------------------
2970
2971class EvtHandler(Object):
093d3ff1 2972 """Proxy of C++ EvtHandler class"""
e811c8ce
RD
2973 def __repr__(self):
2974 return "<%s.%s; proxy of C++ wxEvtHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 2975 def __init__(self, *args, **kwargs):
a95a7133 2976 """__init__(self) -> EvtHandler"""
54f9ee45 2977 newobj = _core_.new_EvtHandler(*args, **kwargs)
d14a1e28
RD
2978 self.this = newobj.this
2979 self.thisown = 1
2980 del newobj.thisown
e811c8ce 2981 def GetNextHandler(*args, **kwargs):
a95a7133 2982 """GetNextHandler(self) -> EvtHandler"""
54f9ee45 2983 return _core_.EvtHandler_GetNextHandler(*args, **kwargs)
e811c8ce
RD
2984
2985 def GetPreviousHandler(*args, **kwargs):
a95a7133 2986 """GetPreviousHandler(self) -> EvtHandler"""
54f9ee45 2987 return _core_.EvtHandler_GetPreviousHandler(*args, **kwargs)
e811c8ce
RD
2988
2989 def SetNextHandler(*args, **kwargs):
a95a7133 2990 """SetNextHandler(self, EvtHandler handler)"""
54f9ee45 2991 return _core_.EvtHandler_SetNextHandler(*args, **kwargs)
e811c8ce
RD
2992
2993 def SetPreviousHandler(*args, **kwargs):
a95a7133 2994 """SetPreviousHandler(self, EvtHandler handler)"""
54f9ee45 2995 return _core_.EvtHandler_SetPreviousHandler(*args, **kwargs)
e811c8ce
RD
2996
2997 def GetEvtHandlerEnabled(*args, **kwargs):
a95a7133 2998 """GetEvtHandlerEnabled(self) -> bool"""
54f9ee45 2999 return _core_.EvtHandler_GetEvtHandlerEnabled(*args, **kwargs)
e811c8ce
RD
3000
3001 def SetEvtHandlerEnabled(*args, **kwargs):
a95a7133 3002 """SetEvtHandlerEnabled(self, bool enabled)"""
54f9ee45 3003 return _core_.EvtHandler_SetEvtHandlerEnabled(*args, **kwargs)
e811c8ce
RD
3004
3005 def ProcessEvent(*args, **kwargs):
a95a7133 3006 """ProcessEvent(self, Event event) -> bool"""
54f9ee45 3007 return _core_.EvtHandler_ProcessEvent(*args, **kwargs)
e811c8ce
RD
3008
3009 def AddPendingEvent(*args, **kwargs):
a95a7133 3010 """AddPendingEvent(self, Event event)"""
54f9ee45 3011 return _core_.EvtHandler_AddPendingEvent(*args, **kwargs)
e811c8ce
RD
3012
3013 def ProcessPendingEvents(*args, **kwargs):
a95a7133 3014 """ProcessPendingEvents(self)"""
54f9ee45 3015 return _core_.EvtHandler_ProcessPendingEvents(*args, **kwargs)
e811c8ce
RD
3016
3017 def Connect(*args, **kwargs):
a95a7133 3018 """Connect(self, int id, int lastId, int eventType, PyObject func)"""
54f9ee45 3019 return _core_.EvtHandler_Connect(*args, **kwargs)
e811c8ce
RD
3020
3021 def Disconnect(*args, **kwargs):
a95a7133 3022 """Disconnect(self, int id, int lastId=-1, wxEventType eventType=wxEVT_NULL) -> bool"""
54f9ee45 3023 return _core_.EvtHandler_Disconnect(*args, **kwargs)
e811c8ce
RD
3024
3025 def _setOORInfo(*args, **kwargs):
689b42ee 3026 """_setOORInfo(self, PyObject _self, bool incref=True)"""
54f9ee45 3027 return _core_.EvtHandler__setOORInfo(*args, **kwargs)
e811c8ce 3028
d14a1e28
RD
3029 def Bind(self, event, handler, source=None, id=wx.ID_ANY, id2=wx.ID_ANY):
3030 """
3031 Bind an event to an event handler.
3032
db3e571a
RD
3033 :param event: One of the EVT_* objects that specifies the
3034 type of event to bind,
d14a1e28 3035
db3e571a
RD
3036 :param handler: A callable object to be invoked when the
3037 event is delivered to self. Pass None to
3038 disconnect an event handler.
d14a1e28 3039
db3e571a
RD
3040 :param source: Sometimes the event originates from a
3041 different window than self, but you still
3042 want to catch it in self. (For example, a
3043 button event delivered to a frame.) By
3044 passing the source of the event, the event
3045 handling system is able to differentiate
3046 between the same event type from different
3047 controls.
d14a1e28 3048
db3e571a
RD
3049 :param id: Used to spcify the event source by ID instead
3050 of instance.
3051
3052 :param id2: Used when it is desirable to bind a handler
3053 to a range of IDs, such as with EVT_MENU_RANGE.
d14a1e28
RD
3054 """
3055 if source is not None:
3056 id = source.GetId()
3057 event.Bind(self, id, id2, handler)
3058
66c033b4
RD
3059 def Unbind(self, event, source=None, id=wx.ID_ANY, id2=wx.ID_ANY):
3060 """
3061 Disconencts the event handler binding for event from self.
3062 Returns True if successful.
3063 """
3064 if source is not None:
3065 id = source.GetId()
3066 return event.Unbind(self, id, id2)
d14a1e28 3067
d14a1e28
RD
3068
3069class EvtHandlerPtr(EvtHandler):
3070 def __init__(self, this):
3071 self.this = this
3072 if not hasattr(self,"thisown"): self.thisown = 0
3073 self.__class__ = EvtHandler
54f9ee45 3074_core_.EvtHandler_swigregister(EvtHandlerPtr)
d14a1e28
RD
3075
3076#---------------------------------------------------------------------------
3077
3078class PyEventBinder(object):
3079 """
3080 Instances of this class are used to bind specific events to event
3081 handlers.
3082 """
3083 def __init__(self, evtType, expectedIDs=0):
3084 if expectedIDs not in [0, 1, 2]:
3085 raise ValueError, "Invalid number of expectedIDs"
3086 self.expectedIDs = expectedIDs
3087
3088 if type(evtType) == list or type(evtType) == tuple:
3089 self.evtType = evtType
3090 else:
3091 self.evtType = [evtType]
3092
3093
3094 def Bind(self, target, id1, id2, function):
3095 """Bind this set of event types to target."""
3096 for et in self.evtType:
3097 target.Connect(id1, id2, et, function)
3098
66c033b4
RD
3099
3100 def Unbind(self, target, id1, id2):
3101 """Remove an event binding."""
3102 success = 0
3103 for et in self.evtType:
3104 success += target.Disconnect(id1, id2, et)
3105 return success != 0
3106
d14a1e28
RD
3107
3108 def __call__(self, *args):
3109 """
3110 For backwards compatibility with the old EVT_* functions.
3111 Should be called with either (window, func), (window, ID,
3112 func) or (window, ID1, ID2, func) parameters depending on the
3113 type of the event.
3114 """
3115 assert len(args) == 2 + self.expectedIDs
3116 id1 = wx.ID_ANY
3117 id2 = wx.ID_ANY
3118 target = args[0]
3119 if self.expectedIDs == 0:
3120 func = args[1]
3121 elif self.expectedIDs == 1:
3122 id1 = args[1]
3123 func = args[2]
3124 elif self.expectedIDs == 2:
3125 id1 = args[1]
3126 id2 = args[2]
3127 func = args[3]
3128 else:
3129 raise ValueError, "Unexpected number of IDs"
3130
3131 self.Bind(target, id1, id2, func)
3132
3133
3134# These two are square pegs that don't fit the PyEventBinder hole...
3135def EVT_COMMAND(win, id, cmd, func):
3136 win.Connect(id, -1, cmd, func)
3137def EVT_COMMAND_RANGE(win, id1, id2, cmd, func):
3138 win.Connect(id1, id2, cmd, func)
3139
3140
3141#---------------------------------------------------------------------------
3142
3143#---------------------------------------------------------------------------
3144
54f9ee45
RD
3145EVENT_PROPAGATE_NONE = _core_.EVENT_PROPAGATE_NONE
3146EVENT_PROPAGATE_MAX = _core_.EVENT_PROPAGATE_MAX
d14a1e28 3147
e811c8ce
RD
3148def NewEventType(*args, **kwargs):
3149 """NewEventType() -> wxEventType"""
54f9ee45
RD
3150 return _core_.NewEventType(*args, **kwargs)
3151wxEVT_NULL = _core_.wxEVT_NULL
3152wxEVT_FIRST = _core_.wxEVT_FIRST
3153wxEVT_USER_FIRST = _core_.wxEVT_USER_FIRST
3154wxEVT_COMMAND_BUTTON_CLICKED = _core_.wxEVT_COMMAND_BUTTON_CLICKED
3155wxEVT_COMMAND_CHECKBOX_CLICKED = _core_.wxEVT_COMMAND_CHECKBOX_CLICKED
3156wxEVT_COMMAND_CHOICE_SELECTED = _core_.wxEVT_COMMAND_CHOICE_SELECTED
3157wxEVT_COMMAND_LISTBOX_SELECTED = _core_.wxEVT_COMMAND_LISTBOX_SELECTED
3158wxEVT_COMMAND_LISTBOX_DOUBLECLICKED = _core_.wxEVT_COMMAND_LISTBOX_DOUBLECLICKED
3159wxEVT_COMMAND_CHECKLISTBOX_TOGGLED = _core_.wxEVT_COMMAND_CHECKLISTBOX_TOGGLED
3160wxEVT_COMMAND_MENU_SELECTED = _core_.wxEVT_COMMAND_MENU_SELECTED
3161wxEVT_COMMAND_TOOL_CLICKED = _core_.wxEVT_COMMAND_TOOL_CLICKED
3162wxEVT_COMMAND_SLIDER_UPDATED = _core_.wxEVT_COMMAND_SLIDER_UPDATED
3163wxEVT_COMMAND_RADIOBOX_SELECTED = _core_.wxEVT_COMMAND_RADIOBOX_SELECTED
3164wxEVT_COMMAND_RADIOBUTTON_SELECTED = _core_.wxEVT_COMMAND_RADIOBUTTON_SELECTED
3165wxEVT_COMMAND_SCROLLBAR_UPDATED = _core_.wxEVT_COMMAND_SCROLLBAR_UPDATED
3166wxEVT_COMMAND_VLBOX_SELECTED = _core_.wxEVT_COMMAND_VLBOX_SELECTED
3167wxEVT_COMMAND_COMBOBOX_SELECTED = _core_.wxEVT_COMMAND_COMBOBOX_SELECTED
3168wxEVT_COMMAND_TOOL_RCLICKED = _core_.wxEVT_COMMAND_TOOL_RCLICKED
3169wxEVT_COMMAND_TOOL_ENTER = _core_.wxEVT_COMMAND_TOOL_ENTER
3170wxEVT_LEFT_DOWN = _core_.wxEVT_LEFT_DOWN
3171wxEVT_LEFT_UP = _core_.wxEVT_LEFT_UP
3172wxEVT_MIDDLE_DOWN = _core_.wxEVT_MIDDLE_DOWN
3173wxEVT_MIDDLE_UP = _core_.wxEVT_MIDDLE_UP
3174wxEVT_RIGHT_DOWN = _core_.wxEVT_RIGHT_DOWN
3175wxEVT_RIGHT_UP = _core_.wxEVT_RIGHT_UP
3176wxEVT_MOTION = _core_.wxEVT_MOTION
3177wxEVT_ENTER_WINDOW = _core_.wxEVT_ENTER_WINDOW
3178wxEVT_LEAVE_WINDOW = _core_.wxEVT_LEAVE_WINDOW
3179wxEVT_LEFT_DCLICK = _core_.wxEVT_LEFT_DCLICK
3180wxEVT_MIDDLE_DCLICK = _core_.wxEVT_MIDDLE_DCLICK
3181wxEVT_RIGHT_DCLICK = _core_.wxEVT_RIGHT_DCLICK
3182wxEVT_SET_FOCUS = _core_.wxEVT_SET_FOCUS
3183wxEVT_KILL_FOCUS = _core_.wxEVT_KILL_FOCUS
3184wxEVT_CHILD_FOCUS = _core_.wxEVT_CHILD_FOCUS
3185wxEVT_MOUSEWHEEL = _core_.wxEVT_MOUSEWHEEL
3186wxEVT_NC_LEFT_DOWN = _core_.wxEVT_NC_LEFT_DOWN
3187wxEVT_NC_LEFT_UP = _core_.wxEVT_NC_LEFT_UP
3188wxEVT_NC_MIDDLE_DOWN = _core_.wxEVT_NC_MIDDLE_DOWN
3189wxEVT_NC_MIDDLE_UP = _core_.wxEVT_NC_MIDDLE_UP
3190wxEVT_NC_RIGHT_DOWN = _core_.wxEVT_NC_RIGHT_DOWN
3191wxEVT_NC_RIGHT_UP = _core_.wxEVT_NC_RIGHT_UP
3192wxEVT_NC_MOTION = _core_.wxEVT_NC_MOTION
3193wxEVT_NC_ENTER_WINDOW = _core_.wxEVT_NC_ENTER_WINDOW
3194wxEVT_NC_LEAVE_WINDOW = _core_.wxEVT_NC_LEAVE_WINDOW
3195wxEVT_NC_LEFT_DCLICK = _core_.wxEVT_NC_LEFT_DCLICK
3196wxEVT_NC_MIDDLE_DCLICK = _core_.wxEVT_NC_MIDDLE_DCLICK
3197wxEVT_NC_RIGHT_DCLICK = _core_.wxEVT_NC_RIGHT_DCLICK
3198wxEVT_CHAR = _core_.wxEVT_CHAR
3199wxEVT_CHAR_HOOK = _core_.wxEVT_CHAR_HOOK
3200wxEVT_NAVIGATION_KEY = _core_.wxEVT_NAVIGATION_KEY
3201wxEVT_KEY_DOWN = _core_.wxEVT_KEY_DOWN
3202wxEVT_KEY_UP = _core_.wxEVT_KEY_UP
3203wxEVT_HOTKEY = _core_.wxEVT_HOTKEY
3204wxEVT_SET_CURSOR = _core_.wxEVT_SET_CURSOR
3205wxEVT_SCROLL_TOP = _core_.wxEVT_SCROLL_TOP
3206wxEVT_SCROLL_BOTTOM = _core_.wxEVT_SCROLL_BOTTOM
3207wxEVT_SCROLL_LINEUP = _core_.wxEVT_SCROLL_LINEUP
3208wxEVT_SCROLL_LINEDOWN = _core_.wxEVT_SCROLL_LINEDOWN
3209wxEVT_SCROLL_PAGEUP = _core_.wxEVT_SCROLL_PAGEUP
3210wxEVT_SCROLL_PAGEDOWN = _core_.wxEVT_SCROLL_PAGEDOWN
3211wxEVT_SCROLL_THUMBTRACK = _core_.wxEVT_SCROLL_THUMBTRACK
3212wxEVT_SCROLL_THUMBRELEASE = _core_.wxEVT_SCROLL_THUMBRELEASE
3213wxEVT_SCROLL_ENDSCROLL = _core_.wxEVT_SCROLL_ENDSCROLL
3214wxEVT_SCROLLWIN_TOP = _core_.wxEVT_SCROLLWIN_TOP
3215wxEVT_SCROLLWIN_BOTTOM = _core_.wxEVT_SCROLLWIN_BOTTOM
3216wxEVT_SCROLLWIN_LINEUP = _core_.wxEVT_SCROLLWIN_LINEUP
3217wxEVT_SCROLLWIN_LINEDOWN = _core_.wxEVT_SCROLLWIN_LINEDOWN
3218wxEVT_SCROLLWIN_PAGEUP = _core_.wxEVT_SCROLLWIN_PAGEUP
3219wxEVT_SCROLLWIN_PAGEDOWN = _core_.wxEVT_SCROLLWIN_PAGEDOWN
3220wxEVT_SCROLLWIN_THUMBTRACK = _core_.wxEVT_SCROLLWIN_THUMBTRACK
3221wxEVT_SCROLLWIN_THUMBRELEASE = _core_.wxEVT_SCROLLWIN_THUMBRELEASE
3222wxEVT_SIZE = _core_.wxEVT_SIZE
3223wxEVT_MOVE = _core_.wxEVT_MOVE
3224wxEVT_CLOSE_WINDOW = _core_.wxEVT_CLOSE_WINDOW
3225wxEVT_END_SESSION = _core_.wxEVT_END_SESSION
3226wxEVT_QUERY_END_SESSION = _core_.wxEVT_QUERY_END_SESSION
3227wxEVT_ACTIVATE_APP = _core_.wxEVT_ACTIVATE_APP
3228wxEVT_POWER = _core_.wxEVT_POWER
3229wxEVT_ACTIVATE = _core_.wxEVT_ACTIVATE
3230wxEVT_CREATE = _core_.wxEVT_CREATE
3231wxEVT_DESTROY = _core_.wxEVT_DESTROY
3232wxEVT_SHOW = _core_.wxEVT_SHOW
3233wxEVT_ICONIZE = _core_.wxEVT_ICONIZE
3234wxEVT_MAXIMIZE = _core_.wxEVT_MAXIMIZE
3235wxEVT_MOUSE_CAPTURE_CHANGED = _core_.wxEVT_MOUSE_CAPTURE_CHANGED
3236wxEVT_PAINT = _core_.wxEVT_PAINT
3237wxEVT_ERASE_BACKGROUND = _core_.wxEVT_ERASE_BACKGROUND
3238wxEVT_NC_PAINT = _core_.wxEVT_NC_PAINT
3239wxEVT_PAINT_ICON = _core_.wxEVT_PAINT_ICON
3240wxEVT_MENU_OPEN = _core_.wxEVT_MENU_OPEN
3241wxEVT_MENU_CLOSE = _core_.wxEVT_MENU_CLOSE
3242wxEVT_MENU_HIGHLIGHT = _core_.wxEVT_MENU_HIGHLIGHT
3243wxEVT_CONTEXT_MENU = _core_.wxEVT_CONTEXT_MENU
3244wxEVT_SYS_COLOUR_CHANGED = _core_.wxEVT_SYS_COLOUR_CHANGED
3245wxEVT_DISPLAY_CHANGED = _core_.wxEVT_DISPLAY_CHANGED
3246wxEVT_SETTING_CHANGED = _core_.wxEVT_SETTING_CHANGED
3247wxEVT_QUERY_NEW_PALETTE = _core_.wxEVT_QUERY_NEW_PALETTE
3248wxEVT_PALETTE_CHANGED = _core_.wxEVT_PALETTE_CHANGED
3249wxEVT_DROP_FILES = _core_.wxEVT_DROP_FILES
3250wxEVT_DRAW_ITEM = _core_.wxEVT_DRAW_ITEM
3251wxEVT_MEASURE_ITEM = _core_.wxEVT_MEASURE_ITEM
3252wxEVT_COMPARE_ITEM = _core_.wxEVT_COMPARE_ITEM
3253wxEVT_INIT_DIALOG = _core_.wxEVT_INIT_DIALOG
3254wxEVT_IDLE = _core_.wxEVT_IDLE
3255wxEVT_UPDATE_UI = _core_.wxEVT_UPDATE_UI
3256wxEVT_SIZING = _core_.wxEVT_SIZING
3257wxEVT_MOVING = _core_.wxEVT_MOVING
88c6b281 3258wxEVT_HIBERNATE = _core_.wxEVT_HIBERNATE
54f9ee45
RD
3259wxEVT_COMMAND_LEFT_CLICK = _core_.wxEVT_COMMAND_LEFT_CLICK
3260wxEVT_COMMAND_LEFT_DCLICK = _core_.wxEVT_COMMAND_LEFT_DCLICK
3261wxEVT_COMMAND_RIGHT_CLICK = _core_.wxEVT_COMMAND_RIGHT_CLICK
3262wxEVT_COMMAND_RIGHT_DCLICK = _core_.wxEVT_COMMAND_RIGHT_DCLICK
3263wxEVT_COMMAND_SET_FOCUS = _core_.wxEVT_COMMAND_SET_FOCUS
3264wxEVT_COMMAND_KILL_FOCUS = _core_.wxEVT_COMMAND_KILL_FOCUS
3265wxEVT_COMMAND_ENTER = _core_.wxEVT_COMMAND_ENTER
d14a1e28
RD
3266#
3267# Create some event binders
3268EVT_SIZE = wx.PyEventBinder( wxEVT_SIZE )
3269EVT_SIZING = wx.PyEventBinder( wxEVT_SIZING )
3270EVT_MOVE = wx.PyEventBinder( wxEVT_MOVE )
3271EVT_MOVING = wx.PyEventBinder( wxEVT_MOVING )
3272EVT_CLOSE = wx.PyEventBinder( wxEVT_CLOSE_WINDOW )
3273EVT_END_SESSION = wx.PyEventBinder( wxEVT_END_SESSION )
3274EVT_QUERY_END_SESSION = wx.PyEventBinder( wxEVT_QUERY_END_SESSION )
3275EVT_PAINT = wx.PyEventBinder( wxEVT_PAINT )
3276EVT_NC_PAINT = wx.PyEventBinder( wxEVT_NC_PAINT )
3277EVT_ERASE_BACKGROUND = wx.PyEventBinder( wxEVT_ERASE_BACKGROUND )
3278EVT_CHAR = wx.PyEventBinder( wxEVT_CHAR )
3279EVT_KEY_DOWN = wx.PyEventBinder( wxEVT_KEY_DOWN )
3280EVT_KEY_UP = wx.PyEventBinder( wxEVT_KEY_UP )
3281EVT_HOTKEY = wx.PyEventBinder( wxEVT_HOTKEY, 1)
3282EVT_CHAR_HOOK = wx.PyEventBinder( wxEVT_CHAR_HOOK )
3283EVT_MENU_OPEN = wx.PyEventBinder( wxEVT_MENU_OPEN )
3284EVT_MENU_CLOSE = wx.PyEventBinder( wxEVT_MENU_CLOSE )
3285EVT_MENU_HIGHLIGHT = wx.PyEventBinder( wxEVT_MENU_HIGHLIGHT, 1)
3286EVT_MENU_HIGHLIGHT_ALL = wx.PyEventBinder( wxEVT_MENU_HIGHLIGHT )
3287EVT_SET_FOCUS = wx.PyEventBinder( wxEVT_SET_FOCUS )
3288EVT_KILL_FOCUS = wx.PyEventBinder( wxEVT_KILL_FOCUS )
3289EVT_CHILD_FOCUS = wx.PyEventBinder( wxEVT_CHILD_FOCUS )
3290EVT_ACTIVATE = wx.PyEventBinder( wxEVT_ACTIVATE )
3291EVT_ACTIVATE_APP = wx.PyEventBinder( wxEVT_ACTIVATE_APP )
88c6b281 3292EVT_HIBERNATE = wx.PyEventBinder( wxEVT_HIBERNATE )
d14a1e28
RD
3293EVT_END_SESSION = wx.PyEventBinder( wxEVT_END_SESSION )
3294EVT_QUERY_END_SESSION = wx.PyEventBinder( wxEVT_QUERY_END_SESSION )
3295EVT_DROP_FILES = wx.PyEventBinder( wxEVT_DROP_FILES )
3296EVT_INIT_DIALOG = wx.PyEventBinder( wxEVT_INIT_DIALOG )
3297EVT_SYS_COLOUR_CHANGED = wx.PyEventBinder( wxEVT_SYS_COLOUR_CHANGED )
3298EVT_DISPLAY_CHANGED = wx.PyEventBinder( wxEVT_DISPLAY_CHANGED )
3299EVT_SHOW = wx.PyEventBinder( wxEVT_SHOW )
3300EVT_MAXIMIZE = wx.PyEventBinder( wxEVT_MAXIMIZE )
3301EVT_ICONIZE = wx.PyEventBinder( wxEVT_ICONIZE )
3302EVT_NAVIGATION_KEY = wx.PyEventBinder( wxEVT_NAVIGATION_KEY )
3303EVT_PALETTE_CHANGED = wx.PyEventBinder( wxEVT_PALETTE_CHANGED )
3304EVT_QUERY_NEW_PALETTE = wx.PyEventBinder( wxEVT_QUERY_NEW_PALETTE )
3305EVT_WINDOW_CREATE = wx.PyEventBinder( wxEVT_CREATE )
3306EVT_WINDOW_DESTROY = wx.PyEventBinder( wxEVT_DESTROY )
3307EVT_SET_CURSOR = wx.PyEventBinder( wxEVT_SET_CURSOR )
3308EVT_MOUSE_CAPTURE_CHANGED = wx.PyEventBinder( wxEVT_MOUSE_CAPTURE_CHANGED )
3309
3310EVT_LEFT_DOWN = wx.PyEventBinder( wxEVT_LEFT_DOWN )
3311EVT_LEFT_UP = wx.PyEventBinder( wxEVT_LEFT_UP )
3312EVT_MIDDLE_DOWN = wx.PyEventBinder( wxEVT_MIDDLE_DOWN )
3313EVT_MIDDLE_UP = wx.PyEventBinder( wxEVT_MIDDLE_UP )
3314EVT_RIGHT_DOWN = wx.PyEventBinder( wxEVT_RIGHT_DOWN )
3315EVT_RIGHT_UP = wx.PyEventBinder( wxEVT_RIGHT_UP )
3316EVT_MOTION = wx.PyEventBinder( wxEVT_MOTION )
3317EVT_LEFT_DCLICK = wx.PyEventBinder( wxEVT_LEFT_DCLICK )
3318EVT_MIDDLE_DCLICK = wx.PyEventBinder( wxEVT_MIDDLE_DCLICK )
3319EVT_RIGHT_DCLICK = wx.PyEventBinder( wxEVT_RIGHT_DCLICK )
3320EVT_LEAVE_WINDOW = wx.PyEventBinder( wxEVT_LEAVE_WINDOW )
3321EVT_ENTER_WINDOW = wx.PyEventBinder( wxEVT_ENTER_WINDOW )
3322EVT_MOUSEWHEEL = wx.PyEventBinder( wxEVT_MOUSEWHEEL )
3323
3324EVT_MOUSE_EVENTS = wx.PyEventBinder([ wxEVT_LEFT_DOWN,
3325 wxEVT_LEFT_UP,
3326 wxEVT_MIDDLE_DOWN,
3327 wxEVT_MIDDLE_UP,
3328 wxEVT_RIGHT_DOWN,
3329 wxEVT_RIGHT_UP,
3330 wxEVT_MOTION,
3331 wxEVT_LEFT_DCLICK,
3332 wxEVT_MIDDLE_DCLICK,
3333 wxEVT_RIGHT_DCLICK,
3334 wxEVT_ENTER_WINDOW,
3335 wxEVT_LEAVE_WINDOW,
3336 wxEVT_MOUSEWHEEL
3337 ])
3338
3339
3340# Scrolling from wxWindow (sent to wxScrolledWindow)
3341EVT_SCROLLWIN = wx.PyEventBinder([ wxEVT_SCROLLWIN_TOP,
3342 wxEVT_SCROLLWIN_BOTTOM,
3343 wxEVT_SCROLLWIN_LINEUP,
3344 wxEVT_SCROLLWIN_LINEDOWN,
3345 wxEVT_SCROLLWIN_PAGEUP,
3346 wxEVT_SCROLLWIN_PAGEDOWN,
3347 wxEVT_SCROLLWIN_THUMBTRACK,
3348 wxEVT_SCROLLWIN_THUMBRELEASE,
3349 ])
3350
3351EVT_SCROLLWIN_TOP = wx.PyEventBinder( wxEVT_SCROLLWIN_TOP )
3352EVT_SCROLLWIN_BOTTOM = wx.PyEventBinder( wxEVT_SCROLLWIN_BOTTOM )
3353EVT_SCROLLWIN_LINEUP = wx.PyEventBinder( wxEVT_SCROLLWIN_LINEUP )
3354EVT_SCROLLWIN_LINEDOWN = wx.PyEventBinder( wxEVT_SCROLLWIN_LINEDOWN )
3355EVT_SCROLLWIN_PAGEUP = wx.PyEventBinder( wxEVT_SCROLLWIN_PAGEUP )
3356EVT_SCROLLWIN_PAGEDOWN = wx.PyEventBinder( wxEVT_SCROLLWIN_PAGEDOWN )
3357EVT_SCROLLWIN_THUMBTRACK = wx.PyEventBinder( wxEVT_SCROLLWIN_THUMBTRACK )
3358EVT_SCROLLWIN_THUMBRELEASE = wx.PyEventBinder( wxEVT_SCROLLWIN_THUMBRELEASE )
3359
27fb7603 3360# Scrolling from wx.Slider and wx.ScrollBar
d14a1e28
RD
3361EVT_SCROLL = wx.PyEventBinder([ wxEVT_SCROLL_TOP,
3362 wxEVT_SCROLL_BOTTOM,
3363 wxEVT_SCROLL_LINEUP,
3364 wxEVT_SCROLL_LINEDOWN,
3365 wxEVT_SCROLL_PAGEUP,
3366 wxEVT_SCROLL_PAGEDOWN,
3367 wxEVT_SCROLL_THUMBTRACK,
3368 wxEVT_SCROLL_THUMBRELEASE,
3369 wxEVT_SCROLL_ENDSCROLL,
3370 ])
3371
3372EVT_SCROLL_TOP = wx.PyEventBinder( wxEVT_SCROLL_TOP )
3373EVT_SCROLL_BOTTOM = wx.PyEventBinder( wxEVT_SCROLL_BOTTOM )
3374EVT_SCROLL_LINEUP = wx.PyEventBinder( wxEVT_SCROLL_LINEUP )
3375EVT_SCROLL_LINEDOWN = wx.PyEventBinder( wxEVT_SCROLL_LINEDOWN )
3376EVT_SCROLL_PAGEUP = wx.PyEventBinder( wxEVT_SCROLL_PAGEUP )
3377EVT_SCROLL_PAGEDOWN = wx.PyEventBinder( wxEVT_SCROLL_PAGEDOWN )
3378EVT_SCROLL_THUMBTRACK = wx.PyEventBinder( wxEVT_SCROLL_THUMBTRACK )
3379EVT_SCROLL_THUMBRELEASE = wx.PyEventBinder( wxEVT_SCROLL_THUMBRELEASE )
3380EVT_SCROLL_ENDSCROLL = wx.PyEventBinder( wxEVT_SCROLL_ENDSCROLL )
3381
27fb7603 3382# Scrolling from wx.Slider and wx.ScrollBar, with an id
d14a1e28
RD
3383EVT_COMMAND_SCROLL = wx.PyEventBinder([ wxEVT_SCROLL_TOP,
3384 wxEVT_SCROLL_BOTTOM,
3385 wxEVT_SCROLL_LINEUP,
3386 wxEVT_SCROLL_LINEDOWN,
3387 wxEVT_SCROLL_PAGEUP,
3388 wxEVT_SCROLL_PAGEDOWN,
3389 wxEVT_SCROLL_THUMBTRACK,
3390 wxEVT_SCROLL_THUMBRELEASE,
3391 wxEVT_SCROLL_ENDSCROLL,
3392 ], 1)
3393
3394EVT_COMMAND_SCROLL_TOP = wx.PyEventBinder( wxEVT_SCROLL_TOP, 1)
3395EVT_COMMAND_SCROLL_BOTTOM = wx.PyEventBinder( wxEVT_SCROLL_BOTTOM, 1)
3396EVT_COMMAND_SCROLL_LINEUP = wx.PyEventBinder( wxEVT_SCROLL_LINEUP, 1)
3397EVT_COMMAND_SCROLL_LINEDOWN = wx.PyEventBinder( wxEVT_SCROLL_LINEDOWN, 1)
3398EVT_COMMAND_SCROLL_PAGEUP = wx.PyEventBinder( wxEVT_SCROLL_PAGEUP, 1)
3399EVT_COMMAND_SCROLL_PAGEDOWN = wx.PyEventBinder( wxEVT_SCROLL_PAGEDOWN, 1)
3400EVT_COMMAND_SCROLL_THUMBTRACK = wx.PyEventBinder( wxEVT_SCROLL_THUMBTRACK, 1)
3401EVT_COMMAND_SCROLL_THUMBRELEASE = wx.PyEventBinder( wxEVT_SCROLL_THUMBRELEASE, 1)
3402EVT_COMMAND_SCROLL_ENDSCROLL = wx.PyEventBinder( wxEVT_SCROLL_ENDSCROLL, 1)
3403
d14a1e28
RD
3404EVT_BUTTON = wx.PyEventBinder( wxEVT_COMMAND_BUTTON_CLICKED, 1)
3405EVT_CHECKBOX = wx.PyEventBinder( wxEVT_COMMAND_CHECKBOX_CLICKED, 1)
3406EVT_CHOICE = wx.PyEventBinder( wxEVT_COMMAND_CHOICE_SELECTED, 1)
3407EVT_LISTBOX = wx.PyEventBinder( wxEVT_COMMAND_LISTBOX_SELECTED, 1)
3408EVT_LISTBOX_DCLICK = wx.PyEventBinder( wxEVT_COMMAND_LISTBOX_DOUBLECLICKED, 1)
3409EVT_MENU = wx.PyEventBinder( wxEVT_COMMAND_MENU_SELECTED, 1)
3410EVT_MENU_RANGE = wx.PyEventBinder( wxEVT_COMMAND_MENU_SELECTED, 2)
3411EVT_SLIDER = wx.PyEventBinder( wxEVT_COMMAND_SLIDER_UPDATED, 1)
3412EVT_RADIOBOX = wx.PyEventBinder( wxEVT_COMMAND_RADIOBOX_SELECTED, 1)
3413EVT_RADIOBUTTON = wx.PyEventBinder( wxEVT_COMMAND_RADIOBUTTON_SELECTED, 1)
3414
3415EVT_SCROLLBAR = wx.PyEventBinder( wxEVT_COMMAND_SCROLLBAR_UPDATED, 1)
3416EVT_VLBOX = wx.PyEventBinder( wxEVT_COMMAND_VLBOX_SELECTED, 1)
3417EVT_COMBOBOX = wx.PyEventBinder( wxEVT_COMMAND_COMBOBOX_SELECTED, 1)
3418EVT_TOOL = wx.PyEventBinder( wxEVT_COMMAND_TOOL_CLICKED, 1)
3419EVT_TOOL_RANGE = wx.PyEventBinder( wxEVT_COMMAND_TOOL_CLICKED, 2)
3420EVT_TOOL_RCLICKED = wx.PyEventBinder( wxEVT_COMMAND_TOOL_RCLICKED, 1)
3421EVT_TOOL_RCLICKED_RANGE = wx.PyEventBinder( wxEVT_COMMAND_TOOL_RCLICKED, 2)
3422EVT_TOOL_ENTER = wx.PyEventBinder( wxEVT_COMMAND_TOOL_ENTER, 1)
3423EVT_CHECKLISTBOX = wx.PyEventBinder( wxEVT_COMMAND_CHECKLISTBOX_TOGGLED, 1)
3424
3425
3426EVT_COMMAND_LEFT_CLICK = wx.PyEventBinder( wxEVT_COMMAND_LEFT_CLICK, 1)
3427EVT_COMMAND_LEFT_DCLICK = wx.PyEventBinder( wxEVT_COMMAND_LEFT_DCLICK, 1)
3428EVT_COMMAND_RIGHT_CLICK = wx.PyEventBinder( wxEVT_COMMAND_RIGHT_CLICK, 1)
3429EVT_COMMAND_RIGHT_DCLICK = wx.PyEventBinder( wxEVT_COMMAND_RIGHT_DCLICK, 1)
3430EVT_COMMAND_SET_FOCUS = wx.PyEventBinder( wxEVT_COMMAND_SET_FOCUS, 1)
3431EVT_COMMAND_KILL_FOCUS = wx.PyEventBinder( wxEVT_COMMAND_KILL_FOCUS, 1)
3432EVT_COMMAND_ENTER = wx.PyEventBinder( wxEVT_COMMAND_ENTER, 1)
3433
3434EVT_IDLE = wx.PyEventBinder( wxEVT_IDLE )
3435
3436EVT_UPDATE_UI = wx.PyEventBinder( wxEVT_UPDATE_UI, 1)
3437EVT_UPDATE_UI_RANGE = wx.PyEventBinder( wxEVT_UPDATE_UI, 2)
3438
3439EVT_CONTEXT_MENU = wx.PyEventBinder( wxEVT_CONTEXT_MENU )
3440
3441
3442
3443#---------------------------------------------------------------------------
3444
3445class Event(Object):
27fb7603
RD
3446 """
3447 An event is a structure holding information about an event passed to a
3448 callback or member function. wx.Event is an abstract base class for
3449 other event classes
3450 """
e811c8ce
RD
3451 def __init__(self): raise RuntimeError, "No constructor defined"
3452 def __repr__(self):
3453 return "<%s.%s; proxy of C++ wxEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
54f9ee45 3454 def __del__(self, destroy=_core_.delete_Event):
a95a7133 3455 """__del__(self)"""
d14a1e28
RD
3456 try:
3457 if self.thisown: destroy(self)
3458 except: pass
e811c8ce
RD
3459
3460 def SetEventType(*args, **kwargs):
27fb7603
RD
3461 """
3462 SetEventType(self, wxEventType typ)
3463
3464 Sets the specific type of the event.
3465 """
54f9ee45 3466 return _core_.Event_SetEventType(*args, **kwargs)
e811c8ce
RD
3467
3468 def GetEventType(*args, **kwargs):
27fb7603
RD
3469 """
3470 GetEventType(self) -> wxEventType
3471
3472 Returns the identifier of the given event type, such as
3473 ``wxEVT_COMMAND_BUTTON_CLICKED``.
3474 """
54f9ee45 3475 return _core_.Event_GetEventType(*args, **kwargs)
e811c8ce
RD
3476
3477 def GetEventObject(*args, **kwargs):
27fb7603
RD
3478 """
3479 GetEventObject(self) -> Object
3480
3481 Returns the object (usually a window) associated with the event, if
3482 any.
3483 """
54f9ee45 3484 return _core_.Event_GetEventObject(*args, **kwargs)
e811c8ce
RD
3485
3486 def SetEventObject(*args, **kwargs):
27fb7603
RD
3487 """
3488 SetEventObject(self, Object obj)
3489
3490 Sets the originating object, or in other words, obj is normally the
3491 object that is sending the event.
3492 """
54f9ee45 3493 return _core_.Event_SetEventObject(*args, **kwargs)
e811c8ce
RD
3494
3495 def GetTimestamp(*args, **kwargs):
a95a7133 3496 """GetTimestamp(self) -> long"""
54f9ee45 3497 return _core_.Event_GetTimestamp(*args, **kwargs)
e811c8ce
RD
3498
3499 def SetTimestamp(*args, **kwargs):
a95a7133 3500 """SetTimestamp(self, long ts=0)"""
54f9ee45 3501 return _core_.Event_SetTimestamp(*args, **kwargs)
e811c8ce
RD
3502
3503 def GetId(*args, **kwargs):
27fb7603
RD
3504 """
3505 GetId(self) -> int
3506
3507 Returns the identifier associated with this event, such as a button
3508 command id.
3509 """
54f9ee45 3510 return _core_.Event_GetId(*args, **kwargs)
e811c8ce
RD
3511
3512 def SetId(*args, **kwargs):
27fb7603
RD
3513 """
3514 SetId(self, int Id)
3515
3516 Set's the ID for the event. This is usually the ID of the window that
3517 is sending the event, but it can also be a command id from a menu
3518 item, etc.
3519 """
54f9ee45 3520 return _core_.Event_SetId(*args, **kwargs)
e811c8ce
RD
3521
3522 def IsCommandEvent(*args, **kwargs):
27fb7603
RD
3523 """
3524 IsCommandEvent(self) -> bool
3525
3526 Returns true if the event is or is derived from `wx.CommandEvent` else
3527 it returns false. Note: Exists only for optimization purposes.
3528 """
54f9ee45 3529 return _core_.Event_IsCommandEvent(*args, **kwargs)
e811c8ce
RD
3530
3531 def Skip(*args, **kwargs):
51b83b37
RD
3532 """
3533 Skip(self, bool skip=True)
3534
3535 Called by an event handler, it controls whether additional event
3536 handlers bound to this event will be called after the current event
3537 handler returns. Skip(false) (the default setting) will prevent
3538 additional event handlers from being called and control will be
3539 returned to the sender of the event immediately after the current
3540 handler has finished. Skip(True) will cause the event processing
3541 system to continue searching for a handler function for this event.
3542
3543 """
54f9ee45 3544 return _core_.Event_Skip(*args, **kwargs)
e811c8ce
RD
3545
3546 def GetSkipped(*args, **kwargs):
27fb7603
RD
3547 """
3548 GetSkipped(self) -> bool
3549
3550 Returns true if the event handler should be skipped, false otherwise.
3551 :see: `Skip`
3552 """
54f9ee45 3553 return _core_.Event_GetSkipped(*args, **kwargs)
e811c8ce
RD
3554
3555 def ShouldPropagate(*args, **kwargs):
27fb7603
RD
3556 """
3557 ShouldPropagate(self) -> bool
3558
3559 Test if this event should be propagated to the parent window or not,
3560 i.e. if the propagation level is currently greater than 0.
3561 """
54f9ee45 3562 return _core_.Event_ShouldPropagate(*args, **kwargs)
e811c8ce
RD
3563
3564 def StopPropagation(*args, **kwargs):
27fb7603
RD
3565 """
3566 StopPropagation(self) -> int
3567
3568 Stop the event from propagating to its parent window. Returns the old
3569 propagation level value which may be later passed to
3570 `ResumePropagation` to allow propagating the event again.
3571 """
54f9ee45 3572 return _core_.Event_StopPropagation(*args, **kwargs)
e811c8ce
RD
3573
3574 def ResumePropagation(*args, **kwargs):
27fb7603
RD
3575 """
3576 ResumePropagation(self, int propagationLevel)
3577
3578 Resume the event propagation by restoring the propagation level. (For
3579 example, you can use the value returned by an earlier call to
3580 `StopPropagation`.)
3581
3582 """
54f9ee45 3583 return _core_.Event_ResumePropagation(*args, **kwargs)
e811c8ce
RD
3584
3585 def Clone(*args, **kwargs):
a95a7133 3586 """Clone(self) -> Event"""
54f9ee45 3587 return _core_.Event_Clone(*args, **kwargs)
e811c8ce 3588
d14a1e28
RD
3589
3590class EventPtr(Event):
3591 def __init__(self, this):
3592 self.this = this
3593 if not hasattr(self,"thisown"): self.thisown = 0
3594 self.__class__ = Event
54f9ee45 3595_core_.Event_swigregister(EventPtr)
d14a1e28
RD
3596
3597#---------------------------------------------------------------------------
3598
3599class PropagationDisabler(object):
27fb7603
RD
3600 """
3601 Helper class to temporarily change an event not to propagate. Simply
3602 create an instance of this class and then whe it is destroyed the
3603 propogation of the event will be restored.
3604 """
e811c8ce
RD
3605 def __repr__(self):
3606 return "<%s.%s; proxy of C++ wxPropagationDisabler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 3607 def __init__(self, *args, **kwargs):
27fb7603
RD
3608 """
3609 __init__(self, Event event) -> PropagationDisabler
3610
3611 Helper class to temporarily change an event not to propagate. Simply
3612 create an instance of this class and then whe it is destroyed the
3613 propogation of the event will be restored.
3614 """
54f9ee45 3615 newobj = _core_.new_PropagationDisabler(*args, **kwargs)
d14a1e28
RD
3616 self.this = newobj.this
3617 self.thisown = 1
3618 del newobj.thisown
54f9ee45 3619 def __del__(self, destroy=_core_.delete_PropagationDisabler):
a95a7133 3620 """__del__(self)"""
d14a1e28
RD
3621 try:
3622 if self.thisown: destroy(self)
3623 except: pass
e811c8ce 3624
d14a1e28
RD
3625
3626class PropagationDisablerPtr(PropagationDisabler):
3627 def __init__(self, this):
3628 self.this = this
3629 if not hasattr(self,"thisown"): self.thisown = 0
3630 self.__class__ = PropagationDisabler
54f9ee45 3631_core_.PropagationDisabler_swigregister(PropagationDisablerPtr)
d14a1e28
RD
3632
3633class PropagateOnce(object):
27fb7603
RD
3634 """
3635 A helper class that will temporarily lower propagation level of an
3636 event. Simply create an instance of this class and then whe it is
3637 destroyed the propogation of the event will be restored.
3638 """
e811c8ce
RD
3639 def __repr__(self):
3640 return "<%s.%s; proxy of C++ wxPropagateOnce instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 3641 def __init__(self, *args, **kwargs):
27fb7603
RD
3642 """
3643 __init__(self, Event event) -> PropagateOnce
3644
3645 A helper class that will temporarily lower propagation level of an
3646 event. Simply create an instance of this class and then whe it is
3647 destroyed the propogation of the event will be restored.
3648 """
54f9ee45 3649 newobj = _core_.new_PropagateOnce(*args, **kwargs)
d14a1e28
RD
3650 self.this = newobj.this
3651 self.thisown = 1
3652 del newobj.thisown
54f9ee45 3653 def __del__(self, destroy=_core_.delete_PropagateOnce):
a95a7133 3654 """__del__(self)"""
d14a1e28
RD
3655 try:
3656 if self.thisown: destroy(self)
3657 except: pass
e811c8ce 3658
d14a1e28
RD
3659
3660class PropagateOncePtr(PropagateOnce):
3661 def __init__(self, this):
3662 self.this = this
3663 if not hasattr(self,"thisown"): self.thisown = 0
3664 self.__class__ = PropagateOnce
54f9ee45 3665_core_.PropagateOnce_swigregister(PropagateOncePtr)
d14a1e28
RD
3666
3667#---------------------------------------------------------------------------
3668
3669class CommandEvent(Event):
27fb7603
RD
3670 """
3671 This event class contains information about command events, which
3672 originate from a variety of simple controls, as well as menus and
3673 toolbars.
3674 """
e811c8ce
RD
3675 def __repr__(self):
3676 return "<%s.%s; proxy of C++ wxCommandEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 3677 def __init__(self, *args, **kwargs):
27fb7603
RD
3678 """
3679 __init__(self, wxEventType commandType=wxEVT_NULL, int winid=0) -> CommandEvent
3680
3681 This event class contains information about command events, which
3682 originate from a variety of simple controls, as well as menus and
3683 toolbars.
3684 """
54f9ee45 3685 newobj = _core_.new_CommandEvent(*args, **kwargs)
d14a1e28
RD
3686 self.this = newobj.this
3687 self.thisown = 1
3688 del newobj.thisown
e811c8ce 3689 def GetSelection(*args, **kwargs):
27fb7603
RD
3690 """
3691 GetSelection(self) -> int
3692
3693 Returns item index for a listbox or choice selection event (not valid
3694 for a deselection).
3695 """
54f9ee45 3696 return _core_.CommandEvent_GetSelection(*args, **kwargs)
e811c8ce
RD
3697
3698 def SetString(*args, **kwargs):
a95a7133 3699 """SetString(self, String s)"""
54f9ee45 3700 return _core_.CommandEvent_SetString(*args, **kwargs)
e811c8ce
RD
3701
3702 def GetString(*args, **kwargs):
27fb7603
RD
3703 """
3704 GetString(self) -> String
3705
3706 Returns item string for a listbox or choice selection event (not valid
3707 for a deselection).
3708 """
54f9ee45 3709 return _core_.CommandEvent_GetString(*args, **kwargs)
e811c8ce
RD
3710
3711 def IsChecked(*args, **kwargs):
27fb7603
RD
3712 """
3713 IsChecked(self) -> bool
3714
3715 This method can be used with checkbox and menu events: for the
3716 checkboxes, the method returns true for a selection event and false
3717 for a deselection one. For the menu events, this method indicates if
3718 the menu item just has become checked or unchecked (and thus only
3719 makes sense for checkable menu items).
3720 """
54f9ee45 3721 return _core_.CommandEvent_IsChecked(*args, **kwargs)
e811c8ce 3722
242b7b46 3723 Checked = IsChecked
e811c8ce 3724 def IsSelection(*args, **kwargs):
27fb7603
RD
3725 """
3726 IsSelection(self) -> bool
3727
3728 For a listbox or similar event, returns true if it is a selection,
3729 false if it is a deselection.
3730 """
54f9ee45 3731 return _core_.CommandEvent_IsSelection(*args, **kwargs)
e811c8ce
RD
3732
3733 def SetExtraLong(*args, **kwargs):
a95a7133 3734 """SetExtraLong(self, long extraLong)"""
54f9ee45 3735 return _core_.CommandEvent_SetExtraLong(*args, **kwargs)
e811c8ce
RD
3736
3737 def GetExtraLong(*args, **kwargs):
27fb7603
RD
3738 """
3739 GetExtraLong(self) -> long
3740
3741 Returns extra information dependant on the event objects type. If the event
3742 comes from a listbox selection, it is a boolean determining whether the event
3743 was a selection (true) or a deselection (false). A listbox deselection only
3744 occurs for multiple-selection boxes, and in this case the index and string
3745 values are indeterminate and the listbox must be examined by the application.
3746 """
54f9ee45 3747 return _core_.CommandEvent_GetExtraLong(*args, **kwargs)
e811c8ce
RD
3748
3749 def SetInt(*args, **kwargs):
a95a7133 3750 """SetInt(self, int i)"""
54f9ee45 3751 return _core_.CommandEvent_SetInt(*args, **kwargs)
e811c8ce
RD
3752
3753 def GetInt(*args, **kwargs):
27fb7603
RD
3754 """
3755 GetInt(self) -> long
3756
3757 Returns the integer identifier corresponding to a listbox, choice or radiobox
3758 selection (only if the event was a selection, not a deselection), or a boolean
3759 value representing the value of a checkbox.
3760 """
54f9ee45 3761 return _core_.CommandEvent_GetInt(*args, **kwargs)
e811c8ce
RD
3762
3763 def Clone(*args, **kwargs):
a95a7133 3764 """Clone(self) -> Event"""
54f9ee45 3765 return _core_.CommandEvent_Clone(*args, **kwargs)
e811c8ce 3766
d14a1e28
RD
3767
3768class CommandEventPtr(CommandEvent):
3769 def __init__(self, this):
3770 self.this = this
3771 if not hasattr(self,"thisown"): self.thisown = 0
3772 self.__class__ = CommandEvent
54f9ee45 3773_core_.CommandEvent_swigregister(CommandEventPtr)
d14a1e28
RD
3774
3775#---------------------------------------------------------------------------
3776
3777class NotifyEvent(CommandEvent):
27fb7603
RD
3778 """
3779 An instance of this class (or one of its derived classes) is sent from
3780 a control when the control's state is being changed and the control
3781 allows that change to be prevented from happening. The event handler
3782 can call `Veto` or `Allow` to tell the control what to do.
3783 """
e811c8ce
RD
3784 def __repr__(self):
3785 return "<%s.%s; proxy of C++ wxNotifyEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 3786 def __init__(self, *args, **kwargs):
27fb7603
RD
3787 """
3788 __init__(self, wxEventType commandType=wxEVT_NULL, int winid=0) -> NotifyEvent
3789
3790 An instance of this class (or one of its derived classes) is sent from
3791 a control when the control's state is being changed and the control
3792 allows that change to be prevented from happening. The event handler
3793 can call `Veto` or `Allow` to tell the control what to do.
3794 """
54f9ee45 3795 newobj = _core_.new_NotifyEvent(*args, **kwargs)
d14a1e28
RD
3796 self.this = newobj.this
3797 self.thisown = 1
3798 del newobj.thisown
e811c8ce 3799 def Veto(*args, **kwargs):
27fb7603
RD
3800 """
3801 Veto(self)
3802
3803 Prevents the change announced by this event from happening.
3804
3805 It is in general a good idea to notify the user about the reasons for
3806 vetoing the change because otherwise the applications behaviour (which
3807 just refuses to do what the user wants) might be quite surprising.
3808 """
54f9ee45 3809 return _core_.NotifyEvent_Veto(*args, **kwargs)
e811c8ce
RD
3810
3811 def Allow(*args, **kwargs):
27fb7603
RD
3812 """
3813 Allow(self)
3814
3815 This is the opposite of `Veto`: it explicitly allows the event to be
3816 processed. For most events it is not necessary to call this method as
3817 the events are allowed anyhow but some are forbidden by default (this
3818 will be mentioned in the corresponding event description).
3819 """
54f9ee45 3820 return _core_.NotifyEvent_Allow(*args, **kwargs)
e811c8ce
RD
3821
3822 def IsAllowed(*args, **kwargs):
27fb7603
RD
3823 """
3824 IsAllowed(self) -> bool
3825
3826 Returns true if the change is allowed (`Veto` hasn't been called) or
3827 false otherwise (if it was).
3828 """
54f9ee45 3829 return _core_.NotifyEvent_IsAllowed(*args, **kwargs)
e811c8ce 3830
d14a1e28
RD
3831
3832class NotifyEventPtr(NotifyEvent):
3833 def __init__(self, this):
3834 self.this = this
3835 if not hasattr(self,"thisown"): self.thisown = 0
3836 self.__class__ = NotifyEvent
54f9ee45 3837_core_.NotifyEvent_swigregister(NotifyEventPtr)
d14a1e28
RD
3838
3839#---------------------------------------------------------------------------
3840
3841class ScrollEvent(CommandEvent):
27fb7603
RD
3842 """
3843 A scroll event holds information about events sent from stand-alone
3844 scrollbars and sliders. Note that scrolled windows do not send
3845 instnaces of this event class, but send the `wx.ScrollWinEvent`
3846 instead.
3847 """
e811c8ce
RD
3848 def __repr__(self):
3849 return "<%s.%s; proxy of C++ wxScrollEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 3850 def __init__(self, *args, **kwargs):
0df68c9f 3851 """
a95a7133 3852 __init__(self, wxEventType commandType=wxEVT_NULL, int winid=0, int pos=0,
0df68c9f
RD
3853 int orient=0) -> ScrollEvent
3854 """
54f9ee45 3855 newobj = _core_.new_ScrollEvent(*args, **kwargs)
d14a1e28
RD
3856 self.this = newobj.this
3857 self.thisown = 1
3858 del newobj.thisown
e811c8ce 3859 def GetOrientation(*args, **kwargs):
27fb7603
RD
3860 """
3861 GetOrientation(self) -> int
3862
3863 Returns wx.HORIZONTAL or wx.VERTICAL, depending on the orientation of
3864 the scrollbar.
3865 """
54f9ee45 3866 return _core_.ScrollEvent_GetOrientation(*args, **kwargs)
e811c8ce
RD
3867
3868 def GetPosition(*args, **kwargs):
27fb7603
RD
3869 """
3870 GetPosition(self) -> int
3871
3872 Returns the position of the scrollbar.
3873 """
54f9ee45 3874 return _core_.ScrollEvent_GetPosition(*args, **kwargs)
e811c8ce
RD
3875
3876 def SetOrientation(*args, **kwargs):
a95a7133 3877 """SetOrientation(self, int orient)"""
54f9ee45 3878 return _core_.ScrollEvent_SetOrientation(*args, **kwargs)
e811c8ce
RD
3879
3880 def SetPosition(*args, **kwargs):
a95a7133 3881 """SetPosition(self, int pos)"""
54f9ee45 3882 return _core_.ScrollEvent_SetPosition(*args, **kwargs)
e811c8ce 3883
d14a1e28
RD
3884
3885class ScrollEventPtr(ScrollEvent):
3886 def __init__(self, this):
3887 self.this = this
3888 if not hasattr(self,"thisown"): self.thisown = 0
3889 self.__class__ = ScrollEvent
54f9ee45 3890_core_.ScrollEvent_swigregister(ScrollEventPtr)
d14a1e28
RD
3891
3892#---------------------------------------------------------------------------
3893
3894class ScrollWinEvent(Event):
27fb7603
RD
3895 """
3896 A wx.ScrollWinEvent holds information about scrolling and is sent from
3897 scrolling windows.
3898 """
e811c8ce
RD
3899 def __repr__(self):
3900 return "<%s.%s; proxy of C++ wxScrollWinEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 3901 def __init__(self, *args, **kwargs):
27fb7603
RD
3902 """
3903 __init__(self, wxEventType commandType=wxEVT_NULL, int pos=0, int orient=0) -> ScrollWinEvent
3904
3905 A wx.ScrollWinEvent holds information about scrolling and is sent from
3906 scrolling windows.
3907 """
54f9ee45 3908 newobj = _core_.new_ScrollWinEvent(*args, **kwargs)
d14a1e28
RD
3909 self.this = newobj.this
3910 self.thisown = 1
3911 del newobj.thisown
e811c8ce 3912 def GetOrientation(*args, **kwargs):
27fb7603
RD
3913 """
3914 GetOrientation(self) -> int
3915
3916 Returns wx.HORIZONTAL or wx.VERTICAL, depending on the orientation of
3917 the scrollbar.
3918 """
54f9ee45 3919 return _core_.ScrollWinEvent_GetOrientation(*args, **kwargs)
e811c8ce
RD
3920
3921 def GetPosition(*args, **kwargs):
27fb7603
RD
3922 """
3923 GetPosition(self) -> int
3924
3925 Returns the position of the scrollbar for the thumb track and release
3926 events. Note that this field can't be used for the other events, you
3927 need to query the window itself for the current position in that case.
3928 """
54f9ee45 3929 return _core_.ScrollWinEvent_GetPosition(*args, **kwargs)
e811c8ce
RD
3930
3931 def SetOrientation(*args, **kwargs):
a95a7133 3932 """SetOrientation(self, int orient)"""
54f9ee45 3933 return _core_.ScrollWinEvent_SetOrientation(*args, **kwargs)
e811c8ce
RD
3934
3935 def SetPosition(*args, **kwargs):
a95a7133 3936 """SetPosition(self, int pos)"""
54f9ee45 3937 return _core_.ScrollWinEvent_SetPosition(*args, **kwargs)
e811c8ce 3938
d14a1e28
RD
3939
3940class ScrollWinEventPtr(ScrollWinEvent):
3941 def __init__(self, this):
3942 self.this = this
3943 if not hasattr(self,"thisown"): self.thisown = 0
3944 self.__class__ = ScrollWinEvent
54f9ee45 3945_core_.ScrollWinEvent_swigregister(ScrollWinEventPtr)
d14a1e28
RD
3946
3947#---------------------------------------------------------------------------
3948
54f9ee45
RD
3949MOUSE_BTN_ANY = _core_.MOUSE_BTN_ANY
3950MOUSE_BTN_NONE = _core_.MOUSE_BTN_NONE
3951MOUSE_BTN_LEFT = _core_.MOUSE_BTN_LEFT
3952MOUSE_BTN_MIDDLE = _core_.MOUSE_BTN_MIDDLE
3953MOUSE_BTN_RIGHT = _core_.MOUSE_BTN_RIGHT
d14a1e28 3954class MouseEvent(Event):
27fb7603
RD
3955 """
3956 This event class contains information about the events generated by
3957 the mouse: they include mouse buttons press and release events and
3958 mouse move events.
3959
3960 All mouse events involving the buttons use ``wx.MOUSE_BTN_LEFT`` for
3961 the left mouse button, ``wx.MOUSE_BTN_MIDDLE`` for the middle one and
3962 ``wx.MOUSE_BTN_RIGHT`` for the right one. Note that not all mice have
3963 a middle button so a portable application should avoid relying on the
3964 events from it.
3965
3966 Note the difference between methods like `LeftDown` and `LeftIsDown`:
3967 the former returns true when the event corresponds to the left mouse
3968 button click while the latter returns true if the left mouse button is
3969 currently being pressed. For example, when the user is dragging the
3970 mouse you can use `LeftIsDown` to test whether the left mouse button
3971 is (still) depressed. Also, by convention, if `LeftDown` returns true,
3972 `LeftIsDown` will also return true in wxWidgets whatever the
3973 underlying GUI behaviour is (which is platform-dependent). The same
3974 applies, of course, to other mouse buttons as well.
3975 """
e811c8ce
RD
3976 def __repr__(self):
3977 return "<%s.%s; proxy of C++ wxMouseEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 3978 def __init__(self, *args, **kwargs):
27fb7603
RD
3979 """
3980 __init__(self, wxEventType mouseType=wxEVT_NULL) -> MouseEvent
3981
3982 Constructs a wx.MouseEvent. Valid event types are:
3983
3984 * wxEVT_ENTER_WINDOW
3985 * wxEVT_LEAVE_WINDOW
3986 * wxEVT_LEFT_DOWN
3987 * wxEVT_LEFT_UP
3988 * wxEVT_LEFT_DCLICK
3989 * wxEVT_MIDDLE_DOWN
3990 * wxEVT_MIDDLE_UP
3991 * wxEVT_MIDDLE_DCLICK
3992 * wxEVT_RIGHT_DOWN
3993 * wxEVT_RIGHT_UP
3994 * wxEVT_RIGHT_DCLICK
3995 * wxEVT_MOTION
3996 * wxEVT_MOUSEWHEEL
3997 """
54f9ee45 3998 newobj = _core_.new_MouseEvent(*args, **kwargs)
d14a1e28
RD
3999 self.this = newobj.this
4000 self.thisown = 1
4001 del newobj.thisown
e811c8ce 4002 def IsButton(*args, **kwargs):
27fb7603
RD
4003 """
4004 IsButton(self) -> bool
4005
4006 Returns true if the event was a mouse button event (not necessarily a
4007 button down event - that may be tested using `ButtonDown`).
4008 """
54f9ee45 4009 return _core_.MouseEvent_IsButton(*args, **kwargs)
e811c8ce
RD
4010
4011 def ButtonDown(*args, **kwargs):
27fb7603
RD
4012 """
4013 ButtonDown(self, int but=MOUSE_BTN_ANY) -> bool
4014
4015 If the argument is omitted, this returns true if the event was any mouse
4016 button down event. Otherwise the argument specifies which button-down
4017 event shold be checked for (see `Button` for the possible values).
4018 """
54f9ee45 4019 return _core_.MouseEvent_ButtonDown(*args, **kwargs)
e811c8ce
RD
4020
4021 def ButtonDClick(*args, **kwargs):
27fb7603
RD
4022 """
4023 ButtonDClick(self, int but=MOUSE_BTN_ANY) -> bool
4024
4025 If the argument is omitted, this returns true if the event was any
4026 mouse double click event. Otherwise the argument specifies which
4027 double click event to check for (see `Button` for the possible
4028 values).
4029 """
54f9ee45 4030 return _core_.MouseEvent_ButtonDClick(*args, **kwargs)
e811c8ce
RD
4031
4032 def ButtonUp(*args, **kwargs):
27fb7603
RD
4033 """
4034 ButtonUp(self, int but=MOUSE_BTN_ANY) -> bool
4035
4036 If the argument is omitted, this returns true if the event was any
4037 mouse button up event. Otherwise the argument specifies which
4038 button up event to check for (see `Button` for the possible values).
4039 """
54f9ee45 4040 return _core_.MouseEvent_ButtonUp(*args, **kwargs)
e811c8ce
RD
4041
4042 def Button(*args, **kwargs):
27fb7603
RD
4043 """
4044 Button(self, int button) -> bool
4045
4046 Returns true if the identified mouse button is changing state. Valid
4047 values of button are:
4048
4049 ==================== =====================================
4050 wx.MOUSE_BTN_LEFT check if left button was pressed
4051 wx.MOUSE_BTN_MIDDLE check if middle button was pressed
4052 wx.MOUSE_BTN_RIGHT check if right button was pressed
4053 wx.MOUSE_BTN_ANY check if any button was pressed
4054 ==================== =====================================
4055
4056 """
54f9ee45 4057 return _core_.MouseEvent_Button(*args, **kwargs)
e811c8ce
RD
4058
4059 def ButtonIsDown(*args, **kwargs):
a95a7133 4060 """ButtonIsDown(self, int but) -> bool"""
54f9ee45 4061 return _core_.MouseEvent_ButtonIsDown(*args, **kwargs)
e811c8ce
RD
4062
4063 def GetButton(*args, **kwargs):
27fb7603
RD
4064 """
4065 GetButton(self) -> int
4066
4067 Returns the mouse button which generated this event or
4068 wx.MOUSE_BTN_NONE if no button is involved (for mouse move, enter or
4069 leave event, for example). Otherwise wx.MOUSE_BTN_LEFT is returned for
4070 the left button down, up and double click events, wx.MOUSE_BTN_MIDDLE
4071 and wx.MOUSE_BTN_RIGHT for the same events for the middle and the
4072 right buttons respectively.
4073 """
54f9ee45 4074 return _core_.MouseEvent_GetButton(*args, **kwargs)
e811c8ce
RD
4075
4076 def ControlDown(*args, **kwargs):
27fb7603
RD
4077 """
4078 ControlDown(self) -> bool
4079
4080 Returns true if the control key was down at the time of the event.
4081 """
54f9ee45 4082 return _core_.MouseEvent_ControlDown(*args, **kwargs)
e811c8ce
RD
4083
4084 def MetaDown(*args, **kwargs):
27fb7603
RD
4085 """
4086 MetaDown(self) -> bool
4087
4088 Returns true if the Meta key was down at the time of the event.
4089 """
54f9ee45 4090 return _core_.MouseEvent_MetaDown(*args, **kwargs)
e811c8ce
RD
4091
4092 def AltDown(*args, **kwargs):
27fb7603
RD
4093 """
4094 AltDown(self) -> bool
4095
4096 Returns true if the Alt key was down at the time of the event.
4097 """
54f9ee45 4098 return _core_.MouseEvent_AltDown(*args, **kwargs)
e811c8ce
RD
4099
4100 def ShiftDown(*args, **kwargs):
27fb7603
RD
4101 """
4102 ShiftDown(self) -> bool
4103
4104 Returns true if the Shift key was down at the time of the event.
4105 """
54f9ee45 4106 return _core_.MouseEvent_ShiftDown(*args, **kwargs)
e811c8ce 4107
412d302d
RD
4108 def CmdDown(*args, **kwargs):
4109 """
4110 CmdDown(self) -> bool
4111
4112 "Cmd" is a pseudo key which is the same as Control for PC and Unix
4113 platforms but the special "Apple" (a.k.a as "Command") key on
27fb7603 4114 Macs: it often makes sense to use it instead of, say, `ControlDown`
412d302d 4115 because Cmd key is used for the same thing under Mac as Ctrl
27fb7603 4116 elsewhere. The Ctrl key still exists, it's just not used for this
412d302d
RD
4117 purpose. So for non-Mac platforms this is the same as `ControlDown`
4118 and Macs this is the same as `MetaDown`.
4119 """
4120 return _core_.MouseEvent_CmdDown(*args, **kwargs)
4121
e811c8ce 4122 def LeftDown(*args, **kwargs):
27fb7603
RD
4123 """
4124 LeftDown(self) -> bool
4125
4126 Returns true if the left mouse button state changed to down.
4127 """
54f9ee45 4128 return _core_.MouseEvent_LeftDown(*args, **kwargs)
e811c8ce
RD
4129
4130 def MiddleDown(*args, **kwargs):
27fb7603
RD
4131 """
4132 MiddleDown(self) -> bool
4133
4134 Returns true if the middle mouse button state changed to down.
4135 """
54f9ee45 4136 return _core_.MouseEvent_MiddleDown(*args, **kwargs)
e811c8ce
RD
4137
4138 def RightDown(*args, **kwargs):
27fb7603
RD
4139 """
4140 RightDown(self) -> bool
4141
4142 Returns true if the right mouse button state changed to down.
4143 """
54f9ee45 4144 return _core_.MouseEvent_RightDown(*args, **kwargs)
e811c8ce
RD
4145
4146 def LeftUp(*args, **kwargs):
27fb7603
RD
4147 """
4148 LeftUp(self) -> bool
4149
4150 Returns true if the left mouse button state changed to up.
4151 """
54f9ee45 4152 return _core_.MouseEvent_LeftUp(*args, **kwargs)
e811c8ce
RD
4153
4154 def MiddleUp(*args, **kwargs):
27fb7603
RD
4155 """
4156 MiddleUp(self) -> bool
4157
4158 Returns true if the middle mouse button state changed to up.
4159 """
54f9ee45 4160 return _core_.MouseEvent_MiddleUp(*args, **kwargs)
e811c8ce
RD
4161
4162 def RightUp(*args, **kwargs):
27fb7603
RD
4163 """
4164 RightUp(self) -> bool
4165
4166 Returns true if the right mouse button state changed to up.
4167 """
54f9ee45 4168 return _core_.MouseEvent_RightUp(*args, **kwargs)
e811c8ce
RD
4169
4170 def LeftDClick(*args, **kwargs):
27fb7603
RD
4171 """
4172 LeftDClick(self) -> bool
4173
4174 Returns true if the event was a left button double click.
4175 """
54f9ee45 4176 return _core_.MouseEvent_LeftDClick(*args, **kwargs)
e811c8ce
RD
4177
4178 def MiddleDClick(*args, **kwargs):
27fb7603
RD
4179 """
4180 MiddleDClick(self) -> bool
4181
4182 Returns true if the event was a middle button double click.
4183 """
54f9ee45 4184 return _core_.MouseEvent_MiddleDClick(*args, **kwargs)
e811c8ce
RD
4185
4186 def RightDClick(*args, **kwargs):
27fb7603
RD
4187 """
4188 RightDClick(self) -> bool
4189
4190 Returns true if the event was a right button double click.
4191 """
54f9ee45 4192 return _core_.MouseEvent_RightDClick(*args, **kwargs)
e811c8ce
RD
4193
4194 def LeftIsDown(*args, **kwargs):
27fb7603
RD
4195 """
4196 LeftIsDown(self) -> bool
4197
4198 Returns true if the left mouse button is currently down, independent
4199 of the current event type.
4200
4201 Please notice that it is not the same as LeftDown which returns true
4202 if the left mouse button was just pressed. Rather, it describes the
4203 state of the mouse button before the event happened.
4204
4205 This event is usually used in the mouse event handlers which process
4206 "move mouse" messages to determine whether the user is (still)
4207 dragging the mouse.
4208 """
54f9ee45 4209 return _core_.MouseEvent_LeftIsDown(*args, **kwargs)
e811c8ce
RD
4210
4211 def MiddleIsDown(*args, **kwargs):
27fb7603
RD
4212 """
4213 MiddleIsDown(self) -> bool
4214
4215 Returns true if the middle mouse button is currently down, independent
4216 of the current event type.
4217 """
54f9ee45 4218 return _core_.MouseEvent_MiddleIsDown(*args, **kwargs)
e811c8ce
RD
4219
4220 def RightIsDown(*args, **kwargs):
27fb7603
RD
4221 """
4222 RightIsDown(self) -> bool
4223
4224 Returns true if the right mouse button is currently down, independent
4225 of the current event type.
4226 """
54f9ee45 4227 return _core_.MouseEvent_RightIsDown(*args, **kwargs)
e811c8ce
RD
4228
4229 def Dragging(*args, **kwargs):
27fb7603
RD
4230 """
4231 Dragging(self) -> bool
4232
4233 Returns true if this was a dragging event (motion while a button is
4234 depressed).
4235 """
54f9ee45 4236 return _core_.MouseEvent_Dragging(*args, **kwargs)
e811c8ce
RD
4237
4238 def Moving(*args, **kwargs):
27fb7603
RD
4239 """
4240 Moving(self) -> bool
4241
4242 Returns true if this was a motion event and no mouse buttons were
4243 pressed. If any mouse button is held pressed, then this method returns
4244 false and Dragging returns true.
4245 """
54f9ee45 4246 return _core_.MouseEvent_Moving(*args, **kwargs)
e811c8ce
RD
4247
4248 def Entering(*args, **kwargs):
27fb7603
RD
4249 """
4250 Entering(self) -> bool
4251
4252 Returns true if the mouse was entering the window.
4253 """
54f9ee45 4254 return _core_.MouseEvent_Entering(*args, **kwargs)
e811c8ce
RD
4255
4256 def Leaving(*args, **kwargs):
27fb7603
RD
4257 """
4258 Leaving(self) -> bool
4259
4260 Returns true if the mouse was leaving the window.
4261 """
54f9ee45 4262 return _core_.MouseEvent_Leaving(*args, **kwargs)
e811c8ce
RD
4263
4264 def GetPosition(*args, **kwargs):
0df68c9f 4265 """
a95a7133 4266 GetPosition(self) -> Point
e811c8ce 4267
27fb7603
RD
4268 Returns the pixel position of the mouse in window coordinates when the
4269 event happened.
0df68c9f 4270 """
54f9ee45 4271 return _core_.MouseEvent_GetPosition(*args, **kwargs)
e811c8ce
RD
4272
4273 def GetPositionTuple(*args, **kwargs):
0df68c9f
RD
4274 """
4275 GetPositionTuple() -> (x,y)
e811c8ce 4276
27fb7603
RD
4277 Returns the pixel position of the mouse in window coordinates when the
4278 event happened.
0df68c9f 4279 """
54f9ee45 4280 return _core_.MouseEvent_GetPositionTuple(*args, **kwargs)
e811c8ce
RD
4281
4282 def GetLogicalPosition(*args, **kwargs):
27fb7603
RD
4283 """
4284 GetLogicalPosition(self, DC dc) -> Point
4285
4286 Returns the logical mouse position in pixels (i.e. translated
4287 according to the translation set for the DC, which usually indicates
4288 that the window has been scrolled).
4289 """
54f9ee45 4290 return _core_.MouseEvent_GetLogicalPosition(*args, **kwargs)
e811c8ce
RD
4291
4292 def GetX(*args, **kwargs):
27fb7603
RD
4293 """
4294 GetX(self) -> int
4295
4296 Returns X coordinate of the physical mouse event position.
4297 """
54f9ee45 4298 return _core_.MouseEvent_GetX(*args, **kwargs)
e811c8ce
RD
4299
4300 def GetY(*args, **kwargs):
27fb7603
RD
4301 """
4302 GetY(self) -> int
4303
4304 Returns Y coordinate of the physical mouse event position.
4305 """
54f9ee45 4306 return _core_.MouseEvent_GetY(*args, **kwargs)
e811c8ce
RD
4307
4308 def GetWheelRotation(*args, **kwargs):
27fb7603
RD
4309 """
4310 GetWheelRotation(self) -> int
4311
4312 Get wheel rotation, positive or negative indicates direction of
4313 rotation. Current devices all send an event when rotation is equal to
4314 +/-WheelDelta, but this allows for finer resolution devices to be
4315 created in the future. Because of this you shouldn't assume that one
4316 event is equal to 1 line or whatever, but you should be able to either
4317 do partial line scrolling or wait until +/-WheelDelta rotation values
4318 have been accumulated before scrolling.
4319 """
54f9ee45 4320 return _core_.MouseEvent_GetWheelRotation(*args, **kwargs)
e811c8ce
RD
4321
4322 def GetWheelDelta(*args, **kwargs):
27fb7603
RD
4323 """
4324 GetWheelDelta(self) -> int
4325
4326 Get wheel delta, normally 120. This is the threshold for action to be
4327 taken, and one such action (for example, scrolling one increment)
4328 should occur for each delta.
4329 """
54f9ee45 4330 return _core_.MouseEvent_GetWheelDelta(*args, **kwargs)
e811c8ce
RD
4331
4332 def GetLinesPerAction(*args, **kwargs):
27fb7603
RD
4333 """
4334 GetLinesPerAction(self) -> int
4335
4336 Returns the configured number of lines (or whatever) to be scrolled
4337 per wheel action. Defaults to three.
4338 """
54f9ee45 4339 return _core_.MouseEvent_GetLinesPerAction(*args, **kwargs)
e811c8ce
RD
4340
4341 def IsPageScroll(*args, **kwargs):
27fb7603
RD
4342 """
4343 IsPageScroll(self) -> bool
4344
4345 Returns true if the system has been setup to do page scrolling with
4346 the mouse wheel instead of line scrolling.
4347 """
54f9ee45
RD
4348 return _core_.MouseEvent_IsPageScroll(*args, **kwargs)
4349
4350 m_x = property(_core_.MouseEvent_m_x_get, _core_.MouseEvent_m_x_set)
4351 m_y = property(_core_.MouseEvent_m_y_get, _core_.MouseEvent_m_y_set)
4352 m_leftDown = property(_core_.MouseEvent_m_leftDown_get, _core_.MouseEvent_m_leftDown_set)
4353 m_middleDown = property(_core_.MouseEvent_m_middleDown_get, _core_.MouseEvent_m_middleDown_set)
4354 m_rightDown = property(_core_.MouseEvent_m_rightDown_get, _core_.MouseEvent_m_rightDown_set)
4355 m_controlDown = property(_core_.MouseEvent_m_controlDown_get, _core_.MouseEvent_m_controlDown_set)
4356 m_shiftDown = property(_core_.MouseEvent_m_shiftDown_get, _core_.MouseEvent_m_shiftDown_set)
4357 m_altDown = property(_core_.MouseEvent_m_altDown_get, _core_.MouseEvent_m_altDown_set)
4358 m_metaDown = property(_core_.MouseEvent_m_metaDown_get, _core_.MouseEvent_m_metaDown_set)
4359 m_wheelRotation = property(_core_.MouseEvent_m_wheelRotation_get, _core_.MouseEvent_m_wheelRotation_set)
4360 m_wheelDelta = property(_core_.MouseEvent_m_wheelDelta_get, _core_.MouseEvent_m_wheelDelta_set)
4361 m_linesPerAction = property(_core_.MouseEvent_m_linesPerAction_get, _core_.MouseEvent_m_linesPerAction_set)
d14a1e28
RD
4362
4363class MouseEventPtr(MouseEvent):
4364 def __init__(self, this):
4365 self.this = this
4366 if not hasattr(self,"thisown"): self.thisown = 0
4367 self.__class__ = MouseEvent
54f9ee45 4368_core_.MouseEvent_swigregister(MouseEventPtr)
d14a1e28
RD
4369
4370#---------------------------------------------------------------------------
4371
4372class SetCursorEvent(Event):
093d3ff1 4373 """Proxy of C++ SetCursorEvent class"""
e811c8ce
RD
4374 def __repr__(self):
4375 return "<%s.%s; proxy of C++ wxSetCursorEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 4376 def __init__(self, *args, **kwargs):
a95a7133 4377 """__init__(self, int x=0, int y=0) -> SetCursorEvent"""
54f9ee45 4378 newobj = _core_.new_SetCursorEvent(*args, **kwargs)
d14a1e28
RD
4379 self.this = newobj.this
4380 self.thisown = 1
4381 del newobj.thisown
e811c8ce 4382 def GetX(*args, **kwargs):
a95a7133 4383 """GetX(self) -> int"""
54f9ee45 4384 return _core_.SetCursorEvent_GetX(*args, **kwargs)
e811c8ce
RD
4385
4386 def GetY(*args, **kwargs):
a95a7133 4387 """GetY(self) -> int"""
54f9ee45 4388 return _core_.SetCursorEvent_GetY(*args, **kwargs)
e811c8ce
RD
4389
4390 def SetCursor(*args, **kwargs):
a95a7133 4391 """SetCursor(self, Cursor cursor)"""
54f9ee45 4392 return _core_.SetCursorEvent_SetCursor(*args, **kwargs)
e811c8ce
RD
4393
4394 def GetCursor(*args, **kwargs):
a95a7133 4395 """GetCursor(self) -> Cursor"""
54f9ee45 4396 return _core_.SetCursorEvent_GetCursor(*args, **kwargs)
e811c8ce
RD
4397
4398 def HasCursor(*args, **kwargs):
a95a7133 4399 """HasCursor(self) -> bool"""
54f9ee45 4400 return _core_.SetCursorEvent_HasCursor(*args, **kwargs)
e811c8ce 4401
d14a1e28
RD
4402
4403class SetCursorEventPtr(SetCursorEvent):
4404 def __init__(self, this):
4405 self.this = this
4406 if not hasattr(self,"thisown"): self.thisown = 0
4407 self.__class__ = SetCursorEvent
54f9ee45 4408_core_.SetCursorEvent_swigregister(SetCursorEventPtr)
d14a1e28
RD
4409
4410#---------------------------------------------------------------------------
4411
4412class KeyEvent(Event):
093d3ff1 4413 """Proxy of C++ KeyEvent class"""
e811c8ce
RD
4414 def __repr__(self):
4415 return "<%s.%s; proxy of C++ wxKeyEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 4416 def __init__(self, *args, **kwargs):
a95a7133 4417 """__init__(self, wxEventType keyType=wxEVT_NULL) -> KeyEvent"""
54f9ee45 4418 newobj = _core_.new_KeyEvent(*args, **kwargs)
d14a1e28
RD
4419 self.this = newobj.this
4420 self.thisown = 1
4421 del newobj.thisown
e811c8ce 4422 def ControlDown(*args, **kwargs):
a95a7133 4423 """ControlDown(self) -> bool"""
54f9ee45 4424 return _core_.KeyEvent_ControlDown(*args, **kwargs)
e811c8ce
RD
4425
4426 def MetaDown(*args, **kwargs):
a95a7133 4427 """MetaDown(self) -> bool"""
54f9ee45 4428 return _core_.KeyEvent_MetaDown(*args, **kwargs)
e811c8ce
RD
4429
4430 def AltDown(*args, **kwargs):
a95a7133 4431 """AltDown(self) -> bool"""
54f9ee45 4432 return _core_.KeyEvent_AltDown(*args, **kwargs)
e811c8ce
RD
4433
4434 def ShiftDown(*args, **kwargs):
a95a7133 4435 """ShiftDown(self) -> bool"""
54f9ee45 4436 return _core_.KeyEvent_ShiftDown(*args, **kwargs)
e811c8ce 4437
412d302d
RD
4438 def CmdDown(*args, **kwargs):
4439 """
4440 CmdDown(self) -> bool
4441
4442 "Cmd" is a pseudo key which is the same as Control for PC and Unix
4443 platforms but the special "Apple" (a.k.a as "Command") key on
4444 Macs: it makes often sense to use it instead of, say, `ControlDown`
4445 because Cmd key is used for the same thing under Mac as Ctrl
4446 elsewhere. The Ctrl still exists, it's just not used for this
4447 purpose. So for non-Mac platforms this is the same as `ControlDown`
4448 and Macs this is the same as `MetaDown`.
4449 """
4450 return _core_.KeyEvent_CmdDown(*args, **kwargs)
4451
e811c8ce 4452 def HasModifiers(*args, **kwargs):
a95a7133 4453 """HasModifiers(self) -> bool"""
54f9ee45 4454 return _core_.KeyEvent_HasModifiers(*args, **kwargs)
e811c8ce
RD
4455
4456 def GetKeyCode(*args, **kwargs):
a95a7133 4457 """GetKeyCode(self) -> int"""
54f9ee45 4458 return _core_.KeyEvent_GetKeyCode(*args, **kwargs)
e811c8ce 4459
d14a1e28 4460 KeyCode = GetKeyCode
19272049
RD
4461 def GetUnicodeKey(*args, **kwargs):
4462 """GetUnicodeKey(self) -> int"""
4463 return _core_.KeyEvent_GetUnicodeKey(*args, **kwargs)
e811c8ce 4464
19272049 4465 GetUniChar = GetUnicodeKey
e811c8ce 4466 def GetRawKeyCode(*args, **kwargs):
a95a7133 4467 """GetRawKeyCode(self) -> unsigned int"""
54f9ee45 4468 return _core_.KeyEvent_GetRawKeyCode(*args, **kwargs)
e811c8ce
RD
4469
4470 def GetRawKeyFlags(*args, **kwargs):
a95a7133 4471 """GetRawKeyFlags(self) -> unsigned int"""
54f9ee45 4472 return _core_.KeyEvent_GetRawKeyFlags(*args, **kwargs)
e811c8ce
RD
4473
4474 def GetPosition(*args, **kwargs):
0df68c9f 4475 """
a95a7133 4476 GetPosition(self) -> Point
e811c8ce 4477
0df68c9f
RD
4478 Find the position of the event.
4479 """
54f9ee45 4480 return _core_.KeyEvent_GetPosition(*args, **kwargs)
e811c8ce
RD
4481
4482 def GetPositionTuple(*args, **kwargs):
0df68c9f
RD
4483 """
4484 GetPositionTuple() -> (x,y)
e811c8ce 4485
0df68c9f
RD
4486 Find the position of the event.
4487 """
54f9ee45 4488 return _core_.KeyEvent_GetPositionTuple(*args, **kwargs)
e811c8ce
RD
4489
4490 def GetX(*args, **kwargs):
a95a7133 4491 """GetX(self) -> int"""
54f9ee45 4492 return _core_.KeyEvent_GetX(*args, **kwargs)
e811c8ce
RD
4493
4494 def GetY(*args, **kwargs):
a95a7133 4495 """GetY(self) -> int"""
54f9ee45
RD
4496 return _core_.KeyEvent_GetY(*args, **kwargs)
4497
4498 m_x = property(_core_.KeyEvent_m_x_get, _core_.KeyEvent_m_x_set)
4499 m_y = property(_core_.KeyEvent_m_y_get, _core_.KeyEvent_m_y_set)
4500 m_keyCode = property(_core_.KeyEvent_m_keyCode_get, _core_.KeyEvent_m_keyCode_set)
4501 m_controlDown = property(_core_.KeyEvent_m_controlDown_get, _core_.KeyEvent_m_controlDown_set)
4502 m_shiftDown = property(_core_.KeyEvent_m_shiftDown_get, _core_.KeyEvent_m_shiftDown_set)
4503 m_altDown = property(_core_.KeyEvent_m_altDown_get, _core_.KeyEvent_m_altDown_set)
4504 m_metaDown = property(_core_.KeyEvent_m_metaDown_get, _core_.KeyEvent_m_metaDown_set)
4505 m_scanCode = property(_core_.KeyEvent_m_scanCode_get, _core_.KeyEvent_m_scanCode_set)
4506 m_rawCode = property(_core_.KeyEvent_m_rawCode_get, _core_.KeyEvent_m_rawCode_set)
4507 m_rawFlags = property(_core_.KeyEvent_m_rawFlags_get, _core_.KeyEvent_m_rawFlags_set)
d14a1e28
RD
4508
4509class KeyEventPtr(KeyEvent):
4510 def __init__(self, this):
4511 self.this = this
4512 if not hasattr(self,"thisown"): self.thisown = 0
4513 self.__class__ = KeyEvent
54f9ee45 4514_core_.KeyEvent_swigregister(KeyEventPtr)
d14a1e28
RD
4515
4516#---------------------------------------------------------------------------
4517
4518class SizeEvent(Event):
093d3ff1 4519 """Proxy of C++ SizeEvent class"""
e811c8ce
RD
4520 def __repr__(self):
4521 return "<%s.%s; proxy of C++ wxSizeEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 4522 def __init__(self, *args, **kwargs):
a95a7133 4523 """__init__(self, Size sz=DefaultSize, int winid=0) -> SizeEvent"""
54f9ee45 4524 newobj = _core_.new_SizeEvent(*args, **kwargs)
d14a1e28
RD
4525 self.this = newobj.this
4526 self.thisown = 1
4527 del newobj.thisown
e811c8ce 4528 def GetSize(*args, **kwargs):
a95a7133 4529 """GetSize(self) -> Size"""
54f9ee45 4530 return _core_.SizeEvent_GetSize(*args, **kwargs)
e811c8ce
RD
4531
4532 def GetRect(*args, **kwargs):
a95a7133 4533 """GetRect(self) -> Rect"""
54f9ee45 4534 return _core_.SizeEvent_GetRect(*args, **kwargs)
e811c8ce
RD
4535
4536 def SetRect(*args, **kwargs):
a95a7133 4537 """SetRect(self, Rect rect)"""
54f9ee45 4538 return _core_.SizeEvent_SetRect(*args, **kwargs)
e811c8ce
RD
4539
4540 def SetSize(*args, **kwargs):
a95a7133 4541 """SetSize(self, Size size)"""
54f9ee45 4542 return _core_.SizeEvent_SetSize(*args, **kwargs)
e811c8ce 4543
54f9ee45
RD
4544 m_size = property(_core_.SizeEvent_m_size_get, _core_.SizeEvent_m_size_set)
4545 m_rect = property(_core_.SizeEvent_m_rect_get, _core_.SizeEvent_m_rect_set)
d14a1e28
RD
4546
4547class SizeEventPtr(SizeEvent):
4548 def __init__(self, this):
4549 self.this = this
4550 if not hasattr(self,"thisown"): self.thisown = 0
4551 self.__class__ = SizeEvent
54f9ee45 4552_core_.SizeEvent_swigregister(SizeEventPtr)
d14a1e28
RD
4553
4554#---------------------------------------------------------------------------
4555
4556class MoveEvent(Event):
093d3ff1 4557 """Proxy of C++ MoveEvent class"""
e811c8ce
RD
4558 def __repr__(self):
4559 return "<%s.%s; proxy of C++ wxMoveEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 4560 def __init__(self, *args, **kwargs):
a95a7133 4561 """__init__(self, Point pos=DefaultPosition, int winid=0) -> MoveEvent"""
54f9ee45 4562 newobj = _core_.new_MoveEvent(*args, **kwargs)
d14a1e28
RD
4563 self.this = newobj.this
4564 self.thisown = 1
4565 del newobj.thisown
e811c8ce 4566 def GetPosition(*args, **kwargs):
a95a7133 4567 """GetPosition(self) -> Point"""
54f9ee45 4568 return _core_.MoveEvent_GetPosition(*args, **kwargs)
e811c8ce
RD
4569
4570 def GetRect(*args, **kwargs):
a95a7133 4571 """GetRect(self) -> Rect"""
54f9ee45 4572 return _core_.MoveEvent_GetRect(*args, **kwargs)
e811c8ce
RD
4573
4574 def SetRect(*args, **kwargs):
a95a7133 4575 """SetRect(self, Rect rect)"""
54f9ee45 4576 return _core_.MoveEvent_SetRect(*args, **kwargs)
e811c8ce
RD
4577
4578 def SetPosition(*args, **kwargs):
a95a7133 4579 """SetPosition(self, Point pos)"""
54f9ee45 4580 return _core_.MoveEvent_SetPosition(*args, **kwargs)
e811c8ce 4581
7557b9b5
RD
4582 m_pos = property(GetPosition, SetPosition)
4583 m_rect = property(GetRect, SetRect)
4584
d14a1e28
RD
4585
4586class MoveEventPtr(MoveEvent):
4587 def __init__(self, this):
4588 self.this = this
4589 if not hasattr(self,"thisown"): self.thisown = 0
4590 self.__class__ = MoveEvent
54f9ee45 4591_core_.MoveEvent_swigregister(MoveEventPtr)
d14a1e28
RD
4592
4593#---------------------------------------------------------------------------
4594
4595class PaintEvent(Event):
093d3ff1 4596 """Proxy of C++ PaintEvent class"""
e811c8ce
RD
4597 def __repr__(self):
4598 return "<%s.%s; proxy of C++ wxPaintEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 4599 def __init__(self, *args, **kwargs):
a95a7133 4600 """__init__(self, int Id=0) -> PaintEvent"""
54f9ee45 4601 newobj = _core_.new_PaintEvent(*args, **kwargs)
d14a1e28
RD
4602 self.this = newobj.this
4603 self.thisown = 1
4604 del newobj.thisown
d14a1e28
RD
4605
4606class PaintEventPtr(PaintEvent):
4607 def __init__(self, this):
4608 self.this = this
4609 if not hasattr(self,"thisown"): self.thisown = 0
4610 self.__class__ = PaintEvent
54f9ee45 4611_core_.PaintEvent_swigregister(PaintEventPtr)
d14a1e28
RD
4612
4613class NcPaintEvent(Event):
093d3ff1 4614 """Proxy of C++ NcPaintEvent class"""
e811c8ce
RD
4615 def __repr__(self):
4616 return "<%s.%s; proxy of C++ wxNcPaintEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 4617 def __init__(self, *args, **kwargs):
a95a7133 4618 """__init__(self, int winid=0) -> NcPaintEvent"""
54f9ee45 4619 newobj = _core_.new_NcPaintEvent(*args, **kwargs)
d14a1e28
RD
4620 self.this = newobj.this
4621 self.thisown = 1
4622 del newobj.thisown
d14a1e28
RD
4623
4624class NcPaintEventPtr(NcPaintEvent):
4625 def __init__(self, this):
4626 self.this = this
4627 if not hasattr(self,"thisown"): self.thisown = 0
4628 self.__class__ = NcPaintEvent
54f9ee45 4629_core_.NcPaintEvent_swigregister(NcPaintEventPtr)
d14a1e28
RD
4630
4631#---------------------------------------------------------------------------
4632
4633class EraseEvent(Event):
093d3ff1 4634 """Proxy of C++ EraseEvent class"""
e811c8ce
RD
4635 def __repr__(self):
4636 return "<%s.%s; proxy of C++ wxEraseEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 4637 def __init__(self, *args, **kwargs):
a95a7133 4638 """__init__(self, int Id=0, DC dc=(wxDC *) NULL) -> EraseEvent"""
54f9ee45 4639 newobj = _core_.new_EraseEvent(*args, **kwargs)
d14a1e28
RD
4640 self.this = newobj.this
4641 self.thisown = 1
4642 del newobj.thisown
e811c8ce 4643 def GetDC(*args, **kwargs):
a95a7133 4644 """GetDC(self) -> DC"""
54f9ee45 4645 return _core_.EraseEvent_GetDC(*args, **kwargs)
e811c8ce 4646
d14a1e28
RD
4647
4648class EraseEventPtr(EraseEvent):
4649 def __init__(self, this):
4650 self.this = this
4651 if not hasattr(self,"thisown"): self.thisown = 0
4652 self.__class__ = EraseEvent
54f9ee45 4653_core_.EraseEvent_swigregister(EraseEventPtr)
d14a1e28
RD
4654
4655#---------------------------------------------------------------------------
4656
4657class FocusEvent(Event):
093d3ff1 4658 """Proxy of C++ FocusEvent class"""
e811c8ce
RD
4659 def __repr__(self):
4660 return "<%s.%s; proxy of C++ wxFocusEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 4661 def __init__(self, *args, **kwargs):
a95a7133 4662 """__init__(self, wxEventType type=wxEVT_NULL, int winid=0) -> FocusEvent"""
54f9ee45 4663 newobj = _core_.new_FocusEvent(*args, **kwargs)
d14a1e28
RD
4664 self.this = newobj.this
4665 self.thisown = 1
4666 del newobj.thisown
e811c8ce 4667 def GetWindow(*args, **kwargs):
a95a7133 4668 """GetWindow(self) -> Window"""
54f9ee45 4669 return _core_.FocusEvent_GetWindow(*args, **kwargs)
e811c8ce
RD
4670
4671 def SetWindow(*args, **kwargs):
a95a7133 4672 """SetWindow(self, Window win)"""
54f9ee45 4673 return _core_.FocusEvent_SetWindow(*args, **kwargs)
e811c8ce 4674
d14a1e28
RD
4675
4676class FocusEventPtr(FocusEvent):
4677 def __init__(self, this):
4678 self.this = this
4679 if not hasattr(self,"thisown"): self.thisown = 0
4680 self.__class__ = FocusEvent
54f9ee45 4681_core_.FocusEvent_swigregister(FocusEventPtr)
d14a1e28
RD
4682
4683#---------------------------------------------------------------------------
4684
4685class ChildFocusEvent(CommandEvent):
093d3ff1 4686 """Proxy of C++ ChildFocusEvent class"""
e811c8ce
RD
4687 def __repr__(self):
4688 return "<%s.%s; proxy of C++ wxChildFocusEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 4689 def __init__(self, *args, **kwargs):
a95a7133 4690 """__init__(self, Window win=None) -> ChildFocusEvent"""
54f9ee45 4691 newobj = _core_.new_ChildFocusEvent(*args, **kwargs)
d14a1e28
RD
4692 self.this = newobj.this
4693 self.thisown = 1
4694 del newobj.thisown
e811c8ce 4695 def GetWindow(*args, **kwargs):
a95a7133 4696 """GetWindow(self) -> Window"""
54f9ee45 4697 return _core_.ChildFocusEvent_GetWindow(*args, **kwargs)
e811c8ce 4698
d14a1e28
RD
4699
4700class ChildFocusEventPtr(ChildFocusEvent):
4701 def __init__(self, this):
4702 self.this = this
4703 if not hasattr(self,"thisown"): self.thisown = 0
4704 self.__class__ = ChildFocusEvent
54f9ee45 4705_core_.ChildFocusEvent_swigregister(ChildFocusEventPtr)
d14a1e28
RD
4706
4707#---------------------------------------------------------------------------
4708
4709class ActivateEvent(Event):
093d3ff1 4710 """Proxy of C++ ActivateEvent class"""
e811c8ce
RD
4711 def __repr__(self):
4712 return "<%s.%s; proxy of C++ wxActivateEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 4713 def __init__(self, *args, **kwargs):
a95a7133 4714 """__init__(self, wxEventType type=wxEVT_NULL, bool active=True, int Id=0) -> ActivateEvent"""
54f9ee45 4715 newobj = _core_.new_ActivateEvent(*args, **kwargs)
d14a1e28
RD
4716 self.this = newobj.this
4717 self.thisown = 1
4718 del newobj.thisown
e811c8ce 4719 def GetActive(*args, **kwargs):
a95a7133 4720 """GetActive(self) -> bool"""
54f9ee45 4721 return _core_.ActivateEvent_GetActive(*args, **kwargs)
e811c8ce 4722
d14a1e28
RD
4723
4724class ActivateEventPtr(ActivateEvent):
4725 def __init__(self, this):
4726 self.this = this
4727 if not hasattr(self,"thisown"): self.thisown = 0
4728 self.__class__ = ActivateEvent
54f9ee45 4729_core_.ActivateEvent_swigregister(ActivateEventPtr)
d14a1e28
RD
4730
4731#---------------------------------------------------------------------------
4732
4733class InitDialogEvent(Event):
093d3ff1 4734 """Proxy of C++ InitDialogEvent class"""
e811c8ce
RD
4735 def __repr__(self):
4736 return "<%s.%s; proxy of C++ wxInitDialogEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 4737 def __init__(self, *args, **kwargs):
a95a7133 4738 """__init__(self, int Id=0) -> InitDialogEvent"""
54f9ee45 4739 newobj = _core_.new_InitDialogEvent(*args, **kwargs)
d14a1e28
RD
4740 self.this = newobj.this
4741 self.thisown = 1
4742 del newobj.thisown
d14a1e28
RD
4743
4744class InitDialogEventPtr(InitDialogEvent):
4745 def __init__(self, this):
4746 self.this = this
4747 if not hasattr(self,"thisown"): self.thisown = 0
4748 self.__class__ = InitDialogEvent
54f9ee45 4749_core_.InitDialogEvent_swigregister(InitDialogEventPtr)
d14a1e28
RD
4750
4751#---------------------------------------------------------------------------
4752
4753class MenuEvent(Event):
093d3ff1 4754 """Proxy of C++ MenuEvent class"""
e811c8ce
RD
4755 def __repr__(self):
4756 return "<%s.%s; proxy of C++ wxMenuEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 4757 def __init__(self, *args, **kwargs):
a95a7133 4758 """__init__(self, wxEventType type=wxEVT_NULL, int winid=0, Menu menu=None) -> MenuEvent"""
54f9ee45 4759 newobj = _core_.new_MenuEvent(*args, **kwargs)
d14a1e28
RD
4760 self.this = newobj.this
4761 self.thisown = 1
4762 del newobj.thisown
e811c8ce 4763 def GetMenuId(*args, **kwargs):
a95a7133 4764 """GetMenuId(self) -> int"""
54f9ee45 4765 return _core_.MenuEvent_GetMenuId(*args, **kwargs)
e811c8ce
RD
4766
4767 def IsPopup(*args, **kwargs):
a95a7133 4768 """IsPopup(self) -> bool"""
54f9ee45 4769 return _core_.MenuEvent_IsPopup(*args, **kwargs)
e811c8ce
RD
4770
4771 def GetMenu(*args, **kwargs):
a95a7133 4772 """GetMenu(self) -> Menu"""
54f9ee45 4773 return _core_.MenuEvent_GetMenu(*args, **kwargs)
e811c8ce 4774
d14a1e28
RD
4775
4776class MenuEventPtr(MenuEvent):
4777 def __init__(self, this):
4778 self.this = this
4779 if not hasattr(self,"thisown"): self.thisown = 0
4780 self.__class__ = MenuEvent
54f9ee45 4781_core_.MenuEvent_swigregister(MenuEventPtr)
d14a1e28
RD
4782
4783#---------------------------------------------------------------------------
4784
4785class CloseEvent(Event):
093d3ff1 4786 """Proxy of C++ CloseEvent class"""
e811c8ce
RD
4787 def __repr__(self):
4788 return "<%s.%s; proxy of C++ wxCloseEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 4789 def __init__(self, *args, **kwargs):
a95a7133 4790 """__init__(self, wxEventType type=wxEVT_NULL, int winid=0) -> CloseEvent"""
54f9ee45 4791 newobj = _core_.new_CloseEvent(*args, **kwargs)
d14a1e28
RD
4792 self.this = newobj.this
4793 self.thisown = 1
4794 del newobj.thisown
e811c8ce 4795 def SetLoggingOff(*args, **kwargs):
a95a7133 4796 """SetLoggingOff(self, bool logOff)"""
54f9ee45 4797 return _core_.CloseEvent_SetLoggingOff(*args, **kwargs)
e811c8ce
RD
4798
4799 def GetLoggingOff(*args, **kwargs):
a95a7133 4800 """GetLoggingOff(self) -> bool"""
54f9ee45 4801 return _core_.CloseEvent_GetLoggingOff(*args, **kwargs)
e811c8ce
RD
4802
4803 def Veto(*args, **kwargs):
a95a7133 4804 """Veto(self, bool veto=True)"""
54f9ee45 4805 return _core_.CloseEvent_Veto(*args, **kwargs)
e811c8ce
RD
4806
4807 def SetCanVeto(*args, **kwargs):
a95a7133 4808 """SetCanVeto(self, bool canVeto)"""
54f9ee45 4809 return _core_.CloseEvent_SetCanVeto(*args, **kwargs)
e811c8ce
RD
4810
4811 def CanVeto(*args, **kwargs):
a95a7133 4812 """CanVeto(self) -> bool"""
54f9ee45 4813 return _core_.CloseEvent_CanVeto(*args, **kwargs)
e811c8ce
RD
4814
4815 def GetVeto(*args, **kwargs):
a95a7133 4816 """GetVeto(self) -> bool"""
54f9ee45 4817 return _core_.CloseEvent_GetVeto(*args, **kwargs)
e811c8ce 4818
d14a1e28
RD
4819
4820class CloseEventPtr(CloseEvent):
4821 def __init__(self, this):
4822 self.this = this
4823 if not hasattr(self,"thisown"): self.thisown = 0
4824 self.__class__ = CloseEvent
54f9ee45 4825_core_.CloseEvent_swigregister(CloseEventPtr)
d14a1e28
RD
4826
4827#---------------------------------------------------------------------------
4828
4829class ShowEvent(Event):
093d3ff1 4830 """Proxy of C++ ShowEvent class"""
e811c8ce
RD
4831 def __repr__(self):
4832 return "<%s.%s; proxy of C++ wxShowEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 4833 def __init__(self, *args, **kwargs):
a95a7133 4834 """__init__(self, int winid=0, bool show=False) -> ShowEvent"""
54f9ee45 4835 newobj = _core_.new_ShowEvent(*args, **kwargs)
d14a1e28
RD
4836 self.this = newobj.this
4837 self.thisown = 1
4838 del newobj.thisown
e811c8ce 4839 def SetShow(*args, **kwargs):
a95a7133 4840 """SetShow(self, bool show)"""
54f9ee45 4841 return _core_.ShowEvent_SetShow(*args, **kwargs)
e811c8ce
RD
4842
4843 def GetShow(*args, **kwargs):
a95a7133 4844 """GetShow(self) -> bool"""
54f9ee45 4845 return _core_.ShowEvent_GetShow(*args, **kwargs)
e811c8ce 4846
d14a1e28
RD
4847
4848class ShowEventPtr(ShowEvent):
4849 def __init__(self, this):
4850 self.this = this
4851 if not hasattr(self,"thisown"): self.thisown = 0
4852 self.__class__ = ShowEvent
54f9ee45 4853_core_.ShowEvent_swigregister(ShowEventPtr)
d14a1e28
RD
4854
4855#---------------------------------------------------------------------------
4856
4857class IconizeEvent(Event):
093d3ff1 4858 """Proxy of C++ IconizeEvent class"""
e811c8ce
RD
4859 def __repr__(self):
4860 return "<%s.%s; proxy of C++ wxIconizeEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 4861 def __init__(self, *args, **kwargs):
a95a7133 4862 """__init__(self, int id=0, bool iconized=True) -> IconizeEvent"""
54f9ee45 4863 newobj = _core_.new_IconizeEvent(*args, **kwargs)
d14a1e28
RD
4864 self.this = newobj.this
4865 self.thisown = 1
4866 del newobj.thisown
e811c8ce 4867 def Iconized(*args, **kwargs):
a95a7133 4868 """Iconized(self) -> bool"""
54f9ee45 4869 return _core_.IconizeEvent_Iconized(*args, **kwargs)
e811c8ce 4870
d14a1e28
RD
4871
4872class IconizeEventPtr(IconizeEvent):
4873 def __init__(self, this):
4874 self.this = this
4875 if not hasattr(self,"thisown"): self.thisown = 0
4876 self.__class__ = IconizeEvent
54f9ee45 4877_core_.IconizeEvent_swigregister(IconizeEventPtr)
d14a1e28
RD
4878
4879#---------------------------------------------------------------------------
4880
4881class MaximizeEvent(Event):
093d3ff1 4882 """Proxy of C++ MaximizeEvent class"""
e811c8ce
RD
4883 def __repr__(self):
4884 return "<%s.%s; proxy of C++ wxMaximizeEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 4885 def __init__(self, *args, **kwargs):
a95a7133 4886 """__init__(self, int id=0) -> MaximizeEvent"""
54f9ee45 4887 newobj = _core_.new_MaximizeEvent(*args, **kwargs)
d14a1e28
RD
4888 self.this = newobj.this
4889 self.thisown = 1
4890 del newobj.thisown
d14a1e28
RD
4891
4892class MaximizeEventPtr(MaximizeEvent):
4893 def __init__(self, this):
4894 self.this = this
4895 if not hasattr(self,"thisown"): self.thisown = 0
4896 self.__class__ = MaximizeEvent
54f9ee45 4897_core_.MaximizeEvent_swigregister(MaximizeEventPtr)
d14a1e28
RD
4898
4899#---------------------------------------------------------------------------
4900
4901class DropFilesEvent(Event):
093d3ff1 4902 """Proxy of C++ DropFilesEvent class"""
d14a1e28
RD
4903 def __init__(self): raise RuntimeError, "No constructor defined"
4904 def __repr__(self):
4905 return "<%s.%s; proxy of C++ wxDropFilesEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
e811c8ce 4906 def GetPosition(*args, **kwargs):
a95a7133 4907 """GetPosition(self) -> Point"""
54f9ee45 4908 return _core_.DropFilesEvent_GetPosition(*args, **kwargs)
e811c8ce
RD
4909
4910 def GetNumberOfFiles(*args, **kwargs):
a95a7133 4911 """GetNumberOfFiles(self) -> int"""
54f9ee45 4912 return _core_.DropFilesEvent_GetNumberOfFiles(*args, **kwargs)
e811c8ce
RD
4913
4914 def GetFiles(*args, **kwargs):
a95a7133 4915 """GetFiles(self) -> PyObject"""
54f9ee45 4916 return _core_.DropFilesEvent_GetFiles(*args, **kwargs)
e811c8ce 4917
d14a1e28
RD
4918
4919class DropFilesEventPtr(DropFilesEvent):
4920 def __init__(self, this):
4921 self.this = this
4922 if not hasattr(self,"thisown"): self.thisown = 0
4923 self.__class__ = DropFilesEvent
54f9ee45 4924_core_.DropFilesEvent_swigregister(DropFilesEventPtr)
d14a1e28
RD
4925
4926#---------------------------------------------------------------------------
4927
54f9ee45
RD
4928UPDATE_UI_PROCESS_ALL = _core_.UPDATE_UI_PROCESS_ALL
4929UPDATE_UI_PROCESS_SPECIFIED = _core_.UPDATE_UI_PROCESS_SPECIFIED
d14a1e28 4930class UpdateUIEvent(CommandEvent):
093d3ff1 4931 """Proxy of C++ UpdateUIEvent class"""
e811c8ce
RD
4932 def __repr__(self):
4933 return "<%s.%s; proxy of C++ wxUpdateUIEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 4934 def __init__(self, *args, **kwargs):
a95a7133 4935 """__init__(self, int commandId=0) -> UpdateUIEvent"""
54f9ee45 4936 newobj = _core_.new_UpdateUIEvent(*args, **kwargs)
d14a1e28
RD
4937 self.this = newobj.this
4938 self.thisown = 1
4939 del newobj.thisown
e811c8ce 4940 def GetChecked(*args, **kwargs):
a95a7133 4941 """GetChecked(self) -> bool"""
54f9ee45 4942 return _core_.UpdateUIEvent_GetChecked(*args, **kwargs)
e811c8ce
RD
4943
4944 def GetEnabled(*args, **kwargs):
a95a7133 4945 """GetEnabled(self) -> bool"""
54f9ee45 4946 return _core_.UpdateUIEvent_GetEnabled(*args, **kwargs)
e811c8ce
RD
4947
4948 def GetText(*args, **kwargs):
a95a7133 4949 """GetText(self) -> String"""
54f9ee45 4950 return _core_.UpdateUIEvent_GetText(*args, **kwargs)
e811c8ce
RD
4951
4952 def GetSetText(*args, **kwargs):
a95a7133 4953 """GetSetText(self) -> bool"""
54f9ee45 4954 return _core_.UpdateUIEvent_GetSetText(*args, **kwargs)
e811c8ce
RD
4955
4956 def GetSetChecked(*args, **kwargs):
a95a7133 4957 """GetSetChecked(self) -> bool"""
54f9ee45 4958 return _core_.UpdateUIEvent_GetSetChecked(*args, **kwargs)
e811c8ce
RD
4959
4960 def GetSetEnabled(*args, **kwargs):
a95a7133 4961 """GetSetEnabled(self) -> bool"""
54f9ee45 4962 return _core_.UpdateUIEvent_GetSetEnabled(*args, **kwargs)
e811c8ce
RD
4963
4964 def Check(*args, **kwargs):
a95a7133 4965 """Check(self, bool check)"""
54f9ee45 4966 return _core_.UpdateUIEvent_Check(*args, **kwargs)
e811c8ce
RD
4967
4968 def Enable(*args, **kwargs):
a95a7133 4969 """Enable(self, bool enable)"""
54f9ee45 4970 return _core_.UpdateUIEvent_Enable(*args, **kwargs)
e811c8ce
RD
4971
4972 def SetText(*args, **kwargs):
a95a7133 4973 """SetText(self, String text)"""
54f9ee45 4974 return _core_.UpdateUIEvent_SetText(*args, **kwargs)
e811c8ce
RD
4975
4976 def SetUpdateInterval(*args, **kwargs):
66c033b4 4977 """SetUpdateInterval(long updateInterval)"""
54f9ee45 4978 return _core_.UpdateUIEvent_SetUpdateInterval(*args, **kwargs)
e811c8ce
RD
4979
4980 SetUpdateInterval = staticmethod(SetUpdateInterval)
4981 def GetUpdateInterval(*args, **kwargs):
66c033b4 4982 """GetUpdateInterval() -> long"""
54f9ee45 4983 return _core_.UpdateUIEvent_GetUpdateInterval(*args, **kwargs)
e811c8ce
RD
4984
4985 GetUpdateInterval = staticmethod(GetUpdateInterval)
4986 def CanUpdate(*args, **kwargs):
66c033b4 4987 """CanUpdate(Window win) -> bool"""
54f9ee45 4988 return _core_.UpdateUIEvent_CanUpdate(*args, **kwargs)
e811c8ce
RD
4989
4990 CanUpdate = staticmethod(CanUpdate)
4991 def ResetUpdateTime(*args, **kwargs):
66c033b4 4992 """ResetUpdateTime()"""
54f9ee45 4993 return _core_.UpdateUIEvent_ResetUpdateTime(*args, **kwargs)
e811c8ce
RD
4994
4995 ResetUpdateTime = staticmethod(ResetUpdateTime)
4996 def SetMode(*args, **kwargs):
66c033b4 4997 """SetMode(int mode)"""
54f9ee45 4998 return _core_.UpdateUIEvent_SetMode(*args, **kwargs)
e811c8ce
RD
4999
5000 SetMode = staticmethod(SetMode)
5001 def GetMode(*args, **kwargs):
66c033b4 5002 """GetMode() -> int"""
54f9ee45 5003 return _core_.UpdateUIEvent_GetMode(*args, **kwargs)
e811c8ce
RD
5004
5005 GetMode = staticmethod(GetMode)
d14a1e28
RD
5006
5007class UpdateUIEventPtr(UpdateUIEvent):
5008 def __init__(self, this):
5009 self.this = this
5010 if not hasattr(self,"thisown"): self.thisown = 0
5011 self.__class__ = UpdateUIEvent
54f9ee45 5012_core_.UpdateUIEvent_swigregister(UpdateUIEventPtr)
d14a1e28 5013
e811c8ce
RD
5014def UpdateUIEvent_SetUpdateInterval(*args, **kwargs):
5015 """UpdateUIEvent_SetUpdateInterval(long updateInterval)"""
54f9ee45 5016 return _core_.UpdateUIEvent_SetUpdateInterval(*args, **kwargs)
d14a1e28 5017
e811c8ce
RD
5018def UpdateUIEvent_GetUpdateInterval(*args, **kwargs):
5019 """UpdateUIEvent_GetUpdateInterval() -> long"""
54f9ee45 5020 return _core_.UpdateUIEvent_GetUpdateInterval(*args, **kwargs)
d14a1e28 5021
e811c8ce
RD
5022def UpdateUIEvent_CanUpdate(*args, **kwargs):
5023 """UpdateUIEvent_CanUpdate(Window win) -> bool"""
54f9ee45 5024 return _core_.UpdateUIEvent_CanUpdate(*args, **kwargs)
d14a1e28 5025
e811c8ce
RD
5026def UpdateUIEvent_ResetUpdateTime(*args, **kwargs):
5027 """UpdateUIEvent_ResetUpdateTime()"""
54f9ee45 5028 return _core_.UpdateUIEvent_ResetUpdateTime(*args, **kwargs)
d14a1e28 5029
e811c8ce 5030def UpdateUIEvent_SetMode(*args, **kwargs):
196addbf 5031 """UpdateUIEvent_SetMode(int mode)"""
54f9ee45 5032 return _core_.UpdateUIEvent_SetMode(*args, **kwargs)
d14a1e28 5033
e811c8ce 5034def UpdateUIEvent_GetMode(*args, **kwargs):
196addbf 5035 """UpdateUIEvent_GetMode() -> int"""
54f9ee45 5036 return _core_.UpdateUIEvent_GetMode(*args, **kwargs)
d14a1e28
RD
5037
5038#---------------------------------------------------------------------------
5039
5040class SysColourChangedEvent(Event):
093d3ff1 5041 """Proxy of C++ SysColourChangedEvent class"""
e811c8ce
RD
5042 def __repr__(self):
5043 return "<%s.%s; proxy of C++ wxSysColourChangedEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 5044 def __init__(self, *args, **kwargs):
a95a7133 5045 """__init__(self) -> SysColourChangedEvent"""
54f9ee45 5046 newobj = _core_.new_SysColourChangedEvent(*args, **kwargs)
d14a1e28
RD
5047 self.this = newobj.this
5048 self.thisown = 1
5049 del newobj.thisown
d14a1e28
RD
5050
5051class SysColourChangedEventPtr(SysColourChangedEvent):
5052 def __init__(self, this):
5053 self.this = this
5054 if not hasattr(self,"thisown"): self.thisown = 0
5055 self.__class__ = SysColourChangedEvent
54f9ee45 5056_core_.SysColourChangedEvent_swigregister(SysColourChangedEventPtr)
d14a1e28
RD
5057
5058#---------------------------------------------------------------------------
5059
5060class MouseCaptureChangedEvent(Event):
093d3ff1 5061 """Proxy of C++ MouseCaptureChangedEvent class"""
e811c8ce
RD
5062 def __repr__(self):
5063 return "<%s.%s; proxy of C++ wxMouseCaptureChangedEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 5064 def __init__(self, *args, **kwargs):
a95a7133 5065 """__init__(self, int winid=0, Window gainedCapture=None) -> MouseCaptureChangedEvent"""
54f9ee45 5066 newobj = _core_.new_MouseCaptureChangedEvent(*args, **kwargs)
d14a1e28
RD
5067 self.this = newobj.this
5068 self.thisown = 1
5069 del newobj.thisown
e811c8ce 5070 def GetCapturedWindow(*args, **kwargs):
a95a7133 5071 """GetCapturedWindow(self) -> Window"""
54f9ee45 5072 return _core_.MouseCaptureChangedEvent_GetCapturedWindow(*args, **kwargs)
e811c8ce 5073
d14a1e28
RD
5074
5075class MouseCaptureChangedEventPtr(MouseCaptureChangedEvent):
5076 def __init__(self, this):
5077 self.this = this
5078 if not hasattr(self,"thisown"): self.thisown = 0
5079 self.__class__ = MouseCaptureChangedEvent
54f9ee45 5080_core_.MouseCaptureChangedEvent_swigregister(MouseCaptureChangedEventPtr)
d14a1e28
RD
5081
5082#---------------------------------------------------------------------------
5083
5084class DisplayChangedEvent(Event):
093d3ff1 5085 """Proxy of C++ DisplayChangedEvent class"""
e811c8ce
RD
5086 def __repr__(self):
5087 return "<%s.%s; proxy of C++ wxDisplayChangedEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 5088 def __init__(self, *args, **kwargs):
a95a7133 5089 """__init__(self) -> DisplayChangedEvent"""
54f9ee45 5090 newobj = _core_.new_DisplayChangedEvent(*args, **kwargs)
d14a1e28
RD
5091 self.this = newobj.this
5092 self.thisown = 1
5093 del newobj.thisown
d14a1e28
RD
5094
5095class DisplayChangedEventPtr(DisplayChangedEvent):
5096 def __init__(self, this):
5097 self.this = this
5098 if not hasattr(self,"thisown"): self.thisown = 0
5099 self.__class__ = DisplayChangedEvent
54f9ee45 5100_core_.DisplayChangedEvent_swigregister(DisplayChangedEventPtr)
d14a1e28
RD
5101
5102#---------------------------------------------------------------------------
5103
5104class PaletteChangedEvent(Event):
093d3ff1 5105 """Proxy of C++ PaletteChangedEvent class"""
e811c8ce
RD
5106 def __repr__(self):
5107 return "<%s.%s; proxy of C++ wxPaletteChangedEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 5108 def __init__(self, *args, **kwargs):
a95a7133 5109 """__init__(self, int id=0) -> PaletteChangedEvent"""
54f9ee45 5110 newobj = _core_.new_PaletteChangedEvent(*args, **kwargs)
d14a1e28
RD
5111 self.this = newobj.this
5112 self.thisown = 1
5113 del newobj.thisown
e811c8ce 5114 def SetChangedWindow(*args, **kwargs):
a95a7133 5115 """SetChangedWindow(self, Window win)"""
54f9ee45 5116 return _core_.PaletteChangedEvent_SetChangedWindow(*args, **kwargs)
e811c8ce
RD
5117
5118 def GetChangedWindow(*args, **kwargs):
a95a7133 5119 """GetChangedWindow(self) -> Window"""
54f9ee45 5120 return _core_.PaletteChangedEvent_GetChangedWindow(*args, **kwargs)
e811c8ce 5121
d14a1e28
RD
5122
5123class PaletteChangedEventPtr(PaletteChangedEvent):
5124 def __init__(self, this):
5125 self.this = this
5126 if not hasattr(self,"thisown"): self.thisown = 0
5127 self.__class__ = PaletteChangedEvent
54f9ee45 5128_core_.PaletteChangedEvent_swigregister(PaletteChangedEventPtr)
d14a1e28
RD
5129
5130#---------------------------------------------------------------------------
5131
5132class QueryNewPaletteEvent(Event):
093d3ff1 5133 """Proxy of C++ QueryNewPaletteEvent class"""
e811c8ce
RD
5134 def __repr__(self):
5135 return "<%s.%s; proxy of C++ wxQueryNewPaletteEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 5136 def __init__(self, *args, **kwargs):
a95a7133 5137 """__init__(self, int winid=0) -> QueryNewPaletteEvent"""
54f9ee45 5138 newobj = _core_.new_QueryNewPaletteEvent(*args, **kwargs)
d14a1e28
RD
5139 self.this = newobj.this
5140 self.thisown = 1
5141 del newobj.thisown
e811c8ce 5142 def SetPaletteRealized(*args, **kwargs):
a95a7133 5143 """SetPaletteRealized(self, bool realized)"""
54f9ee45 5144 return _core_.QueryNewPaletteEvent_SetPaletteRealized(*args, **kwargs)
e811c8ce
RD
5145
5146 def GetPaletteRealized(*args, **kwargs):
a95a7133 5147 """GetPaletteRealized(self) -> bool"""
54f9ee45 5148 return _core_.QueryNewPaletteEvent_GetPaletteRealized(*args, **kwargs)
e811c8ce 5149
d14a1e28
RD
5150
5151class QueryNewPaletteEventPtr(QueryNewPaletteEvent):
5152 def __init__(self, this):
5153 self.this = this
5154 if not hasattr(self,"thisown"): self.thisown = 0
5155 self.__class__ = QueryNewPaletteEvent
54f9ee45 5156_core_.QueryNewPaletteEvent_swigregister(QueryNewPaletteEventPtr)
d14a1e28
RD
5157
5158#---------------------------------------------------------------------------
5159
5160class NavigationKeyEvent(Event):
093d3ff1 5161 """Proxy of C++ NavigationKeyEvent class"""
e811c8ce
RD
5162 def __repr__(self):
5163 return "<%s.%s; proxy of C++ wxNavigationKeyEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 5164 def __init__(self, *args, **kwargs):
a95a7133 5165 """__init__(self) -> NavigationKeyEvent"""
54f9ee45 5166 newobj = _core_.new_NavigationKeyEvent(*args, **kwargs)
d14a1e28
RD
5167 self.this = newobj.this
5168 self.thisown = 1
5169 del newobj.thisown
e811c8ce 5170 def GetDirection(*args, **kwargs):
a95a7133 5171 """GetDirection(self) -> bool"""
54f9ee45 5172 return _core_.NavigationKeyEvent_GetDirection(*args, **kwargs)
e811c8ce
RD
5173
5174 def SetDirection(*args, **kwargs):
908b74cd 5175 """SetDirection(self, bool forward)"""
54f9ee45 5176 return _core_.NavigationKeyEvent_SetDirection(*args, **kwargs)
e811c8ce
RD
5177
5178 def IsWindowChange(*args, **kwargs):
a95a7133 5179 """IsWindowChange(self) -> bool"""
54f9ee45 5180 return _core_.NavigationKeyEvent_IsWindowChange(*args, **kwargs)
e811c8ce
RD
5181
5182 def SetWindowChange(*args, **kwargs):
908b74cd 5183 """SetWindowChange(self, bool ischange)"""
54f9ee45 5184 return _core_.NavigationKeyEvent_SetWindowChange(*args, **kwargs)
e811c8ce 5185
68350608
RD
5186 def IsFromTab(*args, **kwargs):
5187 """IsFromTab(self) -> bool"""
5188 return _core_.NavigationKeyEvent_IsFromTab(*args, **kwargs)
5189
5190 def SetFromTab(*args, **kwargs):
5191 """SetFromTab(self, bool bIs)"""
5192 return _core_.NavigationKeyEvent_SetFromTab(*args, **kwargs)
5193
908b74cd
RD
5194 def SetFlags(*args, **kwargs):
5195 """SetFlags(self, long flags)"""
5196 return _core_.NavigationKeyEvent_SetFlags(*args, **kwargs)
5197
e811c8ce 5198 def GetCurrentFocus(*args, **kwargs):
a95a7133 5199 """GetCurrentFocus(self) -> Window"""
54f9ee45 5200 return _core_.NavigationKeyEvent_GetCurrentFocus(*args, **kwargs)
e811c8ce
RD
5201
5202 def SetCurrentFocus(*args, **kwargs):
a95a7133 5203 """SetCurrentFocus(self, Window win)"""
54f9ee45 5204 return _core_.NavigationKeyEvent_SetCurrentFocus(*args, **kwargs)
e811c8ce 5205
b0f7404b 5206 IsBackward = _core_.NavigationKeyEvent_IsBackward
908b74cd
RD
5207 IsForward = _core_.NavigationKeyEvent_IsForward
5208 WinChange = _core_.NavigationKeyEvent_WinChange
68350608 5209 FromTab = _core_.NavigationKeyEvent_FromTab
d14a1e28
RD
5210
5211class NavigationKeyEventPtr(NavigationKeyEvent):
5212 def __init__(self, this):
5213 self.this = this
5214 if not hasattr(self,"thisown"): self.thisown = 0
5215 self.__class__ = NavigationKeyEvent
54f9ee45 5216_core_.NavigationKeyEvent_swigregister(NavigationKeyEventPtr)
d14a1e28
RD
5217
5218#---------------------------------------------------------------------------
5219
5220class WindowCreateEvent(CommandEvent):
093d3ff1 5221 """Proxy of C++ WindowCreateEvent class"""
e811c8ce
RD
5222 def __repr__(self):
5223 return "<%s.%s; proxy of C++ wxWindowCreateEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 5224 def __init__(self, *args, **kwargs):
a95a7133 5225 """__init__(self, Window win=None) -> WindowCreateEvent"""
54f9ee45 5226 newobj = _core_.new_WindowCreateEvent(*args, **kwargs)
d14a1e28
RD
5227 self.this = newobj.this
5228 self.thisown = 1
5229 del newobj.thisown
e811c8ce 5230 def GetWindow(*args, **kwargs):
a95a7133 5231 """GetWindow(self) -> Window"""
54f9ee45 5232 return _core_.WindowCreateEvent_GetWindow(*args, **kwargs)
e811c8ce 5233
d14a1e28
RD
5234
5235class WindowCreateEventPtr(WindowCreateEvent):
5236 def __init__(self, this):
5237 self.this = this
5238 if not hasattr(self,"thisown"): self.thisown = 0
5239 self.__class__ = WindowCreateEvent
54f9ee45 5240_core_.WindowCreateEvent_swigregister(WindowCreateEventPtr)
d14a1e28
RD
5241
5242class WindowDestroyEvent(CommandEvent):
093d3ff1 5243 """Proxy of C++ WindowDestroyEvent class"""
e811c8ce
RD
5244 def __repr__(self):
5245 return "<%s.%s; proxy of C++ wxWindowDestroyEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 5246 def __init__(self, *args, **kwargs):
a95a7133 5247 """__init__(self, Window win=None) -> WindowDestroyEvent"""
54f9ee45 5248 newobj = _core_.new_WindowDestroyEvent(*args, **kwargs)
d14a1e28
RD
5249 self.this = newobj.this
5250 self.thisown = 1
5251 del newobj.thisown
e811c8ce 5252 def GetWindow(*args, **kwargs):
a95a7133 5253 """GetWindow(self) -> Window"""
54f9ee45 5254 return _core_.WindowDestroyEvent_GetWindow(*args, **kwargs)
e811c8ce 5255
d14a1e28
RD
5256
5257class WindowDestroyEventPtr(WindowDestroyEvent):
5258 def __init__(self, this):
5259 self.this = this
5260 if not hasattr(self,"thisown"): self.thisown = 0
5261 self.__class__ = WindowDestroyEvent
54f9ee45 5262_core_.WindowDestroyEvent_swigregister(WindowDestroyEventPtr)
d14a1e28
RD
5263
5264#---------------------------------------------------------------------------
5265
5266class ContextMenuEvent(CommandEvent):
093d3ff1 5267 """Proxy of C++ ContextMenuEvent class"""
e811c8ce
RD
5268 def __repr__(self):
5269 return "<%s.%s; proxy of C++ wxContextMenuEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 5270 def __init__(self, *args, **kwargs):
a95a7133 5271 """__init__(self, wxEventType type=wxEVT_NULL, int winid=0, Point pt=DefaultPosition) -> ContextMenuEvent"""
54f9ee45 5272 newobj = _core_.new_ContextMenuEvent(*args, **kwargs)
d14a1e28
RD
5273 self.this = newobj.this
5274 self.thisown = 1
5275 del newobj.thisown
e811c8ce 5276 def GetPosition(*args, **kwargs):
a95a7133 5277 """GetPosition(self) -> Point"""
54f9ee45 5278 return _core_.ContextMenuEvent_GetPosition(*args, **kwargs)
e811c8ce
RD
5279
5280 def SetPosition(*args, **kwargs):
a95a7133 5281 """SetPosition(self, Point pos)"""
54f9ee45 5282 return _core_.ContextMenuEvent_SetPosition(*args, **kwargs)
e811c8ce 5283
d14a1e28
RD
5284
5285class ContextMenuEventPtr(ContextMenuEvent):
5286 def __init__(self, this):
5287 self.this = this
5288 if not hasattr(self,"thisown"): self.thisown = 0
5289 self.__class__ = ContextMenuEvent
54f9ee45 5290_core_.ContextMenuEvent_swigregister(ContextMenuEventPtr)
d14a1e28
RD
5291
5292#---------------------------------------------------------------------------
5293
54f9ee45
RD
5294IDLE_PROCESS_ALL = _core_.IDLE_PROCESS_ALL
5295IDLE_PROCESS_SPECIFIED = _core_.IDLE_PROCESS_SPECIFIED
d14a1e28 5296class IdleEvent(Event):
093d3ff1 5297 """Proxy of C++ IdleEvent class"""
e811c8ce
RD
5298 def __repr__(self):
5299 return "<%s.%s; proxy of C++ wxIdleEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 5300 def __init__(self, *args, **kwargs):
a95a7133 5301 """__init__(self) -> IdleEvent"""
54f9ee45 5302 newobj = _core_.new_IdleEvent(*args, **kwargs)
d14a1e28
RD
5303 self.this = newobj.this
5304 self.thisown = 1
5305 del newobj.thisown
e811c8ce 5306 def RequestMore(*args, **kwargs):
a95a7133 5307 """RequestMore(self, bool needMore=True)"""
54f9ee45 5308 return _core_.IdleEvent_RequestMore(*args, **kwargs)
e811c8ce
RD
5309
5310 def MoreRequested(*args, **kwargs):
a95a7133 5311 """MoreRequested(self) -> bool"""
54f9ee45 5312 return _core_.IdleEvent_MoreRequested(*args, **kwargs)
e811c8ce
RD
5313
5314 def SetMode(*args, **kwargs):
66c033b4 5315 """SetMode(int mode)"""
54f9ee45 5316 return _core_.IdleEvent_SetMode(*args, **kwargs)
e811c8ce
RD
5317
5318 SetMode = staticmethod(SetMode)
5319 def GetMode(*args, **kwargs):
66c033b4 5320 """GetMode() -> int"""
54f9ee45 5321 return _core_.IdleEvent_GetMode(*args, **kwargs)
e811c8ce
RD
5322
5323 GetMode = staticmethod(GetMode)
5324 def CanSend(*args, **kwargs):
66c033b4 5325 """CanSend(Window win) -> bool"""
54f9ee45 5326 return _core_.IdleEvent_CanSend(*args, **kwargs)
e811c8ce
RD
5327
5328 CanSend = staticmethod(CanSend)
d14a1e28
RD
5329
5330class IdleEventPtr(IdleEvent):
5331 def __init__(self, this):
5332 self.this = this
5333 if not hasattr(self,"thisown"): self.thisown = 0
5334 self.__class__ = IdleEvent
54f9ee45 5335_core_.IdleEvent_swigregister(IdleEventPtr)
d14a1e28 5336
e811c8ce 5337def IdleEvent_SetMode(*args, **kwargs):
196addbf 5338 """IdleEvent_SetMode(int mode)"""
54f9ee45 5339 return _core_.IdleEvent_SetMode(*args, **kwargs)
d14a1e28 5340
e811c8ce 5341def IdleEvent_GetMode(*args, **kwargs):
196addbf 5342 """IdleEvent_GetMode() -> int"""
54f9ee45 5343 return _core_.IdleEvent_GetMode(*args, **kwargs)
d14a1e28 5344
e811c8ce
RD
5345def IdleEvent_CanSend(*args, **kwargs):
5346 """IdleEvent_CanSend(Window win) -> bool"""
54f9ee45 5347 return _core_.IdleEvent_CanSend(*args, **kwargs)
d14a1e28
RD
5348
5349#---------------------------------------------------------------------------
5350
5351class PyEvent(Event):
093d3ff1 5352 """Proxy of C++ PyEvent class"""
e811c8ce
RD
5353 def __repr__(self):
5354 return "<%s.%s; proxy of C++ wxPyEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 5355 def __init__(self, *args, **kwargs):
a95a7133 5356 """__init__(self, int winid=0, wxEventType commandType=wxEVT_NULL) -> PyEvent"""
54f9ee45 5357 newobj = _core_.new_PyEvent(*args, **kwargs)
d14a1e28
RD
5358 self.this = newobj.this
5359 self.thisown = 1
5360 del newobj.thisown
5361 self.SetSelf(self)
e811c8ce 5362
54f9ee45 5363 def __del__(self, destroy=_core_.delete_PyEvent):
a95a7133 5364 """__del__(self)"""
d14a1e28
RD
5365 try:
5366 if self.thisown: destroy(self)
5367 except: pass
e811c8ce
RD
5368
5369 def SetSelf(*args, **kwargs):
a95a7133 5370 """SetSelf(self, PyObject self)"""
54f9ee45 5371 return _core_.PyEvent_SetSelf(*args, **kwargs)
e811c8ce
RD
5372
5373 def GetSelf(*args, **kwargs):
a95a7133 5374 """GetSelf(self) -> PyObject"""
54f9ee45 5375 return _core_.PyEvent_GetSelf(*args, **kwargs)
e811c8ce 5376
d14a1e28
RD
5377
5378class PyEventPtr(PyEvent):
5379 def __init__(self, this):
5380 self.this = this
5381 if not hasattr(self,"thisown"): self.thisown = 0
5382 self.__class__ = PyEvent
54f9ee45 5383_core_.PyEvent_swigregister(PyEventPtr)
d14a1e28
RD
5384
5385class PyCommandEvent(CommandEvent):
093d3ff1 5386 """Proxy of C++ PyCommandEvent class"""
e811c8ce
RD
5387 def __repr__(self):
5388 return "<%s.%s; proxy of C++ wxPyCommandEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 5389 def __init__(self, *args, **kwargs):
a95a7133 5390 """__init__(self, wxEventType commandType=wxEVT_NULL, int id=0) -> PyCommandEvent"""
54f9ee45 5391 newobj = _core_.new_PyCommandEvent(*args, **kwargs)
d14a1e28
RD
5392 self.this = newobj.this
5393 self.thisown = 1
5394 del newobj.thisown
5395 self.SetSelf(self)
e811c8ce 5396
54f9ee45 5397 def __del__(self, destroy=_core_.delete_PyCommandEvent):
a95a7133 5398 """__del__(self)"""
d14a1e28
RD
5399 try:
5400 if self.thisown: destroy(self)
5401 except: pass
e811c8ce
RD
5402
5403 def SetSelf(*args, **kwargs):
a95a7133 5404 """SetSelf(self, PyObject self)"""
54f9ee45 5405 return _core_.PyCommandEvent_SetSelf(*args, **kwargs)
e811c8ce
RD
5406
5407 def GetSelf(*args, **kwargs):
a95a7133 5408 """GetSelf(self) -> PyObject"""
54f9ee45 5409 return _core_.PyCommandEvent_GetSelf(*args, **kwargs)
e811c8ce 5410
d14a1e28
RD
5411
5412class PyCommandEventPtr(PyCommandEvent):
5413 def __init__(self, this):
5414 self.this = this
5415 if not hasattr(self,"thisown"): self.thisown = 0
5416 self.__class__ = PyCommandEvent
54f9ee45 5417_core_.PyCommandEvent_swigregister(PyCommandEventPtr)
d14a1e28 5418
53aa7709
RD
5419class DateEvent(CommandEvent):
5420 """Proxy of C++ DateEvent class"""
5421 def __repr__(self):
5422 return "<%s.%s; proxy of C++ wxDateEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
5423 def __init__(self, *args, **kwargs):
5424 """__init__(self, Window win, DateTime dt, wxEventType type) -> DateEvent"""
5425 newobj = _core_.new_DateEvent(*args, **kwargs)
5426 self.this = newobj.this
5427 self.thisown = 1
5428 del newobj.thisown
5429 def GetDate(*args, **kwargs):
5430 """GetDate(self) -> DateTime"""
5431 return _core_.DateEvent_GetDate(*args, **kwargs)
5432
5433 def SetDate(*args, **kwargs):
5434 """SetDate(self, DateTime date)"""
5435 return _core_.DateEvent_SetDate(*args, **kwargs)
5436
5437
5438class DateEventPtr(DateEvent):
5439 def __init__(self, this):
5440 self.this = this
5441 if not hasattr(self,"thisown"): self.thisown = 0
5442 self.__class__ = DateEvent
5443_core_.DateEvent_swigregister(DateEventPtr)
5444
5445wxEVT_DATE_CHANGED = _core_.wxEVT_DATE_CHANGED
5446EVT_DATE_CHANGED = wx.PyEventBinder( wxEVT_DATE_CHANGED, 1 )
5447
d14a1e28
RD
5448#---------------------------------------------------------------------------
5449
54f9ee45
RD
5450PYAPP_ASSERT_SUPPRESS = _core_.PYAPP_ASSERT_SUPPRESS
5451PYAPP_ASSERT_EXCEPTION = _core_.PYAPP_ASSERT_EXCEPTION
5452PYAPP_ASSERT_DIALOG = _core_.PYAPP_ASSERT_DIALOG
5453PYAPP_ASSERT_LOG = _core_.PYAPP_ASSERT_LOG
5454PRINT_WINDOWS = _core_.PRINT_WINDOWS
5455PRINT_POSTSCRIPT = _core_.PRINT_POSTSCRIPT
d14a1e28 5456class PyApp(EvtHandler):
66c033b4
RD
5457 """
5458 The ``wx.PyApp`` class is an *implementation detail*, please use the
5459 `wx.App` class (or some other derived class) instead.
5460 """
e811c8ce
RD
5461 def __repr__(self):
5462 return "<%s.%s; proxy of C++ wxPyApp instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 5463 def __init__(self, *args, **kwargs):
98e665d3 5464 """
a95a7133 5465 __init__(self) -> PyApp
98e665d3
RD
5466
5467 Create a new application object, starting the bootstrap process.
5468 """
54f9ee45 5469 newobj = _core_.new_PyApp(*args, **kwargs)
d14a1e28
RD
5470 self.this = newobj.this
5471 self.thisown = 1
5472 del newobj.thisown
70b7a5fe
RD
5473 self._setCallbackInfo(self, PyApp, False)
5474 self._setOORInfo(self, False)
e811c8ce 5475
54f9ee45 5476 def __del__(self, destroy=_core_.delete_PyApp):
a95a7133 5477 """__del__(self)"""
d14a1e28
RD
5478 try:
5479 if self.thisown: destroy(self)
5480 except: pass
e811c8ce
RD
5481
5482 def _setCallbackInfo(*args, **kwargs):
70b7a5fe 5483 """_setCallbackInfo(self, PyObject self, PyObject _class, bool incref)"""
54f9ee45 5484 return _core_.PyApp__setCallbackInfo(*args, **kwargs)
e811c8ce
RD
5485
5486 def GetAppName(*args, **kwargs):
0df68c9f 5487 """
a95a7133 5488 GetAppName(self) -> String
6c3b4aae 5489
0df68c9f
RD
5490 Get the application name.
5491 """
54f9ee45 5492 return _core_.PyApp_GetAppName(*args, **kwargs)
e811c8ce
RD
5493
5494 def SetAppName(*args, **kwargs):
0df68c9f 5495 """
a95a7133 5496 SetAppName(self, String name)
6c3b4aae 5497
66c033b4
RD
5498 Set the application name. This value may be used automatically by
5499 `wx.Config` and such.
0df68c9f 5500 """
54f9ee45 5501 return _core_.PyApp_SetAppName(*args, **kwargs)
e811c8ce
RD
5502
5503 def GetClassName(*args, **kwargs):
0df68c9f 5504 """
a95a7133 5505 GetClassName(self) -> String
e811c8ce 5506
0df68c9f
RD
5507 Get the application's class name.
5508 """
54f9ee45 5509 return _core_.PyApp_GetClassName(*args, **kwargs)
e811c8ce
RD
5510
5511 def SetClassName(*args, **kwargs):
0df68c9f 5512 """
a95a7133 5513 SetClassName(self, String name)
6c3b4aae 5514
66c033b4
RD
5515 Set the application's class name. This value may be used for
5516 X-resources if applicable for the platform
0df68c9f 5517 """
54f9ee45 5518 return _core_.PyApp_SetClassName(*args, **kwargs)
e811c8ce
RD
5519
5520 def GetVendorName(*args, **kwargs):
0df68c9f 5521 """
a95a7133 5522 GetVendorName(self) -> String
6c3b4aae 5523
0df68c9f
RD
5524 Get the application's vendor name.
5525 """
54f9ee45 5526 return _core_.PyApp_GetVendorName(*args, **kwargs)
e811c8ce
RD
5527
5528 def SetVendorName(*args, **kwargs):
0df68c9f 5529 """
a95a7133 5530 SetVendorName(self, String name)
6c3b4aae 5531
66c033b4
RD
5532 Set the application's vendor name. This value may be used
5533 automatically by `wx.Config` and such.
0df68c9f 5534 """
54f9ee45 5535 return _core_.PyApp_SetVendorName(*args, **kwargs)
e811c8ce
RD
5536
5537 def GetTraits(*args, **kwargs):
0df68c9f 5538 """
a95a7133 5539 GetTraits(self) -> wxAppTraits
6c3b4aae 5540
66c033b4
RD
5541 Return (and create if necessary) the app traits object to which we
5542 delegate for everything which either should be configurable by the
5543 user (then he can change the default behaviour simply by overriding
5544 CreateTraits() and returning his own traits object) or which is
5545 GUI/console dependent as then wx.AppTraits allows us to abstract the
5546 differences behind the common facade.
5547
5548 :todo: Add support for overriding CreateAppTraits in wxPython.
0df68c9f 5549 """
54f9ee45 5550 return _core_.PyApp_GetTraits(*args, **kwargs)
e811c8ce
RD
5551
5552 def ProcessPendingEvents(*args, **kwargs):
0df68c9f 5553 """
a95a7133 5554 ProcessPendingEvents(self)
6c3b4aae 5555
66c033b4
RD
5556 Process all events in the Pending Events list -- it is necessary to
5557 call this function to process posted events. This normally happens
5558 during each event loop iteration.
0df68c9f 5559 """
54f9ee45 5560 return _core_.PyApp_ProcessPendingEvents(*args, **kwargs)
e811c8ce
RD
5561
5562 def Yield(*args, **kwargs):
0df68c9f 5563 """
a95a7133 5564 Yield(self, bool onlyIfNeeded=False) -> bool
6c3b4aae 5565
66c033b4
RD
5566 Process all currently pending events right now, instead of waiting
5567 until return to the event loop. It is an error to call ``Yield``
5568 recursively unless the value of ``onlyIfNeeded`` is True.
6c3b4aae 5569
66c033b4 5570 :warning: This function is dangerous as it can lead to unexpected
41e2b43e
RD
5571 reentrancies (i.e. when called from an event handler it may
5572 result in calling the same event handler again), use with
5573 extreme care or, better, don't use at all!
0df68c9f 5574
66c033b4 5575 :see: `wx.Yield`, `wx.YieldIfNeeded`, `wx.SafeYield`
41e2b43e 5576
0df68c9f 5577 """
54f9ee45 5578 return _core_.PyApp_Yield(*args, **kwargs)
e811c8ce
RD
5579
5580 def WakeUpIdle(*args, **kwargs):
0df68c9f 5581 """
a95a7133 5582 WakeUpIdle(self)
6c3b4aae 5583
66c033b4
RD
5584 Make sure that idle events are sent again.
5585 :see: `wx.WakeUpIdle`
0df68c9f 5586 """
54f9ee45 5587 return _core_.PyApp_WakeUpIdle(*args, **kwargs)
e811c8ce 5588
1fc3b23a
RD
5589 def IsMainLoopRunning(*args, **kwargs):
5590 """
5591 IsMainLoopRunning() -> bool
5592
5593 Returns True if we're running the main loop, i.e. if the events can
5594 currently be dispatched.
5595 """
5596 return _core_.PyApp_IsMainLoopRunning(*args, **kwargs)
5597
5598 IsMainLoopRunning = staticmethod(IsMainLoopRunning)
e811c8ce 5599 def MainLoop(*args, **kwargs):
0df68c9f 5600 """
a95a7133 5601 MainLoop(self) -> int
6c3b4aae 5602
66c033b4
RD
5603 Execute the main GUI loop, the function doesn't normally return until
5604 all top level windows have been closed and destroyed.
0df68c9f 5605 """
54f9ee45 5606 return _core_.PyApp_MainLoop(*args, **kwargs)
e811c8ce
RD
5607
5608 def Exit(*args, **kwargs):
0df68c9f 5609 """
a95a7133 5610 Exit(self)
6c3b4aae 5611
0df68c9f 5612 Exit the main loop thus terminating the application.
66c033b4 5613 :see: `wx.Exit`
0df68c9f 5614 """
54f9ee45 5615 return _core_.PyApp_Exit(*args, **kwargs)
e811c8ce
RD
5616
5617 def ExitMainLoop(*args, **kwargs):
0df68c9f 5618 """
a95a7133 5619 ExitMainLoop(self)
6c3b4aae 5620
66c033b4
RD
5621 Exit the main GUI loop during the next iteration of the main
5622 loop, (i.e. it does not stop the program immediately!)
0df68c9f 5623 """
54f9ee45 5624 return _core_.PyApp_ExitMainLoop(*args, **kwargs)
e811c8ce
RD
5625
5626 def Pending(*args, **kwargs):
0df68c9f 5627 """
a95a7133 5628 Pending(self) -> bool
6c3b4aae 5629
0df68c9f
RD
5630 Returns True if there are unprocessed events in the event queue.
5631 """
54f9ee45 5632 return _core_.PyApp_Pending(*args, **kwargs)
e811c8ce
RD
5633
5634 def Dispatch(*args, **kwargs):
0df68c9f 5635 """
a95a7133 5636 Dispatch(self) -> bool
6c3b4aae 5637
0df68c9f
RD
5638 Process the first event in the event queue (blocks until an event
5639 appears if there are none currently)
5640 """
54f9ee45 5641 return _core_.PyApp_Dispatch(*args, **kwargs)
e811c8ce
RD
5642
5643 def ProcessIdle(*args, **kwargs):
0df68c9f 5644 """
a95a7133 5645 ProcessIdle(self) -> bool
6c3b4aae 5646
66c033b4
RD
5647 Called from the MainLoop when the application becomes idle (there are
5648 no pending events) and sends a `wx.IdleEvent` to all interested
5649 parties. Returns True if more idle events are needed, False if not.
0df68c9f 5650 """
54f9ee45 5651 return _core_.PyApp_ProcessIdle(*args, **kwargs)
e811c8ce
RD
5652
5653 def SendIdleEvents(*args, **kwargs):
0df68c9f 5654 """
a95a7133 5655 SendIdleEvents(self, Window win, IdleEvent event) -> bool
e811c8ce 5656
66c033b4
RD
5657 Send idle event to window and all subwindows. Returns True if more
5658 idle time is requested.
0df68c9f 5659 """
54f9ee45 5660 return _core_.PyApp_SendIdleEvents(*args, **kwargs)
e811c8ce
RD
5661
5662 def IsActive(*args, **kwargs):
0df68c9f 5663 """
a95a7133 5664 IsActive(self) -> bool
6c3b4aae 5665
0df68c9f
RD
5666 Return True if our app has focus.
5667 """
54f9ee45 5668 return _core_.PyApp_IsActive(*args, **kwargs)
e811c8ce
RD
5669
5670 def SetTopWindow(*args, **kwargs):
0df68c9f 5671 """
a95a7133 5672 SetTopWindow(self, Window win)
6c3b4aae 5673
66c033b4 5674 Set the *main* top level window
0df68c9f 5675 """
54f9ee45 5676 return _core_.PyApp_SetTopWindow(*args, **kwargs)
e811c8ce
RD
5677
5678 def GetTopWindow(*args, **kwargs):
0df68c9f 5679 """
a95a7133 5680 GetTopWindow(self) -> Window
6c3b4aae 5681
66c033b4
RD
5682 Return the *main* top level window (if it hadn't been set previously
5683 with SetTopWindow(), will return just some top level window and, if
5684 there not any, will return None)
0df68c9f 5685 """
54f9ee45 5686 return _core_.PyApp_GetTopWindow(*args, **kwargs)
e811c8ce
RD
5687
5688 def SetExitOnFrameDelete(*args, **kwargs):
0df68c9f 5689 """
a95a7133 5690 SetExitOnFrameDelete(self, bool flag)
0df68c9f 5691
66c033b4
RD
5692 Control the exit behaviour: by default, the program will exit the main
5693 loop (and so, usually, terminate) when the last top-level program
5694 window is deleted. Beware that if you disable this behaviour (with
5695 SetExitOnFrameDelete(False)), you'll have to call ExitMainLoop()
5696 explicitly from somewhere.
0df68c9f 5697 """
54f9ee45 5698 return _core_.PyApp_SetExitOnFrameDelete(*args, **kwargs)
e811c8ce
RD
5699
5700 def GetExitOnFrameDelete(*args, **kwargs):
0df68c9f 5701 """
a95a7133 5702 GetExitOnFrameDelete(self) -> bool
6c3b4aae 5703
0df68c9f
RD
5704 Get the current exit behaviour setting.
5705 """
54f9ee45 5706 return _core_.PyApp_GetExitOnFrameDelete(*args, **kwargs)
e811c8ce
RD
5707
5708 def SetUseBestVisual(*args, **kwargs):
0df68c9f 5709 """
a95a7133 5710 SetUseBestVisual(self, bool flag)
6c3b4aae 5711
66c033b4
RD
5712 Set whether the app should try to use the best available visual on
5713 systems where more than one is available, (Sun, SGI, XFree86 4, etc.)
0df68c9f 5714 """
54f9ee45 5715 return _core_.PyApp_SetUseBestVisual(*args, **kwargs)
e811c8ce
RD
5716
5717 def GetUseBestVisual(*args, **kwargs):
0df68c9f 5718 """
a95a7133 5719 GetUseBestVisual(self) -> bool
6c3b4aae 5720
0df68c9f
RD
5721 Get current UseBestVisual setting.
5722 """
54f9ee45 5723 return _core_.PyApp_GetUseBestVisual(*args, **kwargs)
e811c8ce
RD
5724
5725 def SetPrintMode(*args, **kwargs):
a95a7133 5726 """SetPrintMode(self, int mode)"""
54f9ee45 5727 return _core_.PyApp_SetPrintMode(*args, **kwargs)
e811c8ce
RD
5728
5729 def GetPrintMode(*args, **kwargs):
a95a7133 5730 """GetPrintMode(self) -> int"""
54f9ee45 5731 return _core_.PyApp_GetPrintMode(*args, **kwargs)
e811c8ce 5732
e811c8ce 5733 def SetAssertMode(*args, **kwargs):
0df68c9f 5734 """
a95a7133 5735 SetAssertMode(self, int mode)
6c3b4aae 5736
41e2b43e 5737 Set the OnAssert behaviour for debug and hybrid builds.
0df68c9f 5738 """
54f9ee45 5739 return _core_.PyApp_SetAssertMode(*args, **kwargs)
e811c8ce 5740
6c3b4aae 5741 def GetAssertMode(*args, **kwargs):
0df68c9f 5742 """
a95a7133 5743 GetAssertMode(self) -> int
6c3b4aae 5744
0df68c9f
RD
5745 Get the current OnAssert behaviour setting.
5746 """
54f9ee45 5747 return _core_.PyApp_GetAssertMode(*args, **kwargs)
6c3b4aae 5748
e811c8ce 5749 def GetMacSupportPCMenuShortcuts(*args, **kwargs):
66c033b4 5750 """GetMacSupportPCMenuShortcuts() -> bool"""
54f9ee45 5751 return _core_.PyApp_GetMacSupportPCMenuShortcuts(*args, **kwargs)
e811c8ce
RD
5752
5753 GetMacSupportPCMenuShortcuts = staticmethod(GetMacSupportPCMenuShortcuts)
5754 def GetMacAboutMenuItemId(*args, **kwargs):
66c033b4 5755 """GetMacAboutMenuItemId() -> long"""
54f9ee45 5756 return _core_.PyApp_GetMacAboutMenuItemId(*args, **kwargs)
e811c8ce
RD
5757
5758 GetMacAboutMenuItemId = staticmethod(GetMacAboutMenuItemId)
5759 def GetMacPreferencesMenuItemId(*args, **kwargs):
66c033b4 5760 """GetMacPreferencesMenuItemId() -> long"""
54f9ee45 5761 return _core_.PyApp_GetMacPreferencesMenuItemId(*args, **kwargs)
e811c8ce
RD
5762
5763 GetMacPreferencesMenuItemId = staticmethod(GetMacPreferencesMenuItemId)
5764 def GetMacExitMenuItemId(*args, **kwargs):
66c033b4 5765 """GetMacExitMenuItemId() -> long"""
54f9ee45 5766 return _core_.PyApp_GetMacExitMenuItemId(*args, **kwargs)
e811c8ce
RD
5767
5768 GetMacExitMenuItemId = staticmethod(GetMacExitMenuItemId)
5769 def GetMacHelpMenuTitleName(*args, **kwargs):
66c033b4 5770 """GetMacHelpMenuTitleName() -> String"""
54f9ee45 5771 return _core_.PyApp_GetMacHelpMenuTitleName(*args, **kwargs)
e811c8ce
RD
5772
5773 GetMacHelpMenuTitleName = staticmethod(GetMacHelpMenuTitleName)
5774 def SetMacSupportPCMenuShortcuts(*args, **kwargs):
66c033b4 5775 """SetMacSupportPCMenuShortcuts(bool val)"""
54f9ee45 5776 return _core_.PyApp_SetMacSupportPCMenuShortcuts(*args, **kwargs)
e811c8ce
RD
5777
5778 SetMacSupportPCMenuShortcuts = staticmethod(SetMacSupportPCMenuShortcuts)
5779 def SetMacAboutMenuItemId(*args, **kwargs):
66c033b4 5780 """SetMacAboutMenuItemId(long val)"""
54f9ee45 5781 return _core_.PyApp_SetMacAboutMenuItemId(*args, **kwargs)
e811c8ce
RD
5782
5783 SetMacAboutMenuItemId = staticmethod(SetMacAboutMenuItemId)
5784 def SetMacPreferencesMenuItemId(*args, **kwargs):
66c033b4 5785 """SetMacPreferencesMenuItemId(long val)"""
54f9ee45 5786 return _core_.PyApp_SetMacPreferencesMenuItemId(*args, **kwargs)
e811c8ce
RD
5787
5788 SetMacPreferencesMenuItemId = staticmethod(SetMacPreferencesMenuItemId)
5789 def SetMacExitMenuItemId(*args, **kwargs):
66c033b4 5790 """SetMacExitMenuItemId(long val)"""
54f9ee45 5791 return _core_.PyApp_SetMacExitMenuItemId(*args, **kwargs)
e811c8ce
RD
5792
5793 SetMacExitMenuItemId = staticmethod(SetMacExitMenuItemId)
5794 def SetMacHelpMenuTitleName(*args, **kwargs):
66c033b4 5795 """SetMacHelpMenuTitleName(String val)"""
54f9ee45 5796 return _core_.PyApp_SetMacHelpMenuTitleName(*args, **kwargs)
e811c8ce
RD
5797
5798 SetMacHelpMenuTitleName = staticmethod(SetMacHelpMenuTitleName)
5799 def _BootstrapApp(*args, **kwargs):
0df68c9f 5800 """
a95a7133 5801 _BootstrapApp(self)
6c3b4aae 5802
0df68c9f
RD
5803 For internal use only
5804 """
54f9ee45 5805 return _core_.PyApp__BootstrapApp(*args, **kwargs)
e811c8ce
RD
5806
5807 def GetComCtl32Version(*args, **kwargs):
0df68c9f 5808 """
66c033b4 5809 GetComCtl32Version() -> int
6c3b4aae 5810
66c033b4
RD
5811 Returns 400, 470, 471, etc. for comctl32.dll 4.00, 4.70, 4.71 or 0 if
5812 it wasn't found at all. Raises an exception on non-Windows platforms.
0df68c9f 5813 """
54f9ee45 5814 return _core_.PyApp_GetComCtl32Version(*args, **kwargs)
e811c8ce
RD
5815
5816 GetComCtl32Version = staticmethod(GetComCtl32Version)
d14a1e28
RD
5817
5818class PyAppPtr(PyApp):
5819 def __init__(self, this):
5820 self.this = this
5821 if not hasattr(self,"thisown"): self.thisown = 0
5822 self.__class__ = PyApp
54f9ee45 5823_core_.PyApp_swigregister(PyAppPtr)
d14a1e28 5824
1fc3b23a
RD
5825def PyApp_IsMainLoopRunning(*args, **kwargs):
5826 """
5827 PyApp_IsMainLoopRunning() -> bool
5828
5829 Returns True if we're running the main loop, i.e. if the events can
5830 currently be dispatched.
5831 """
5832 return _core_.PyApp_IsMainLoopRunning(*args, **kwargs)
5833
e811c8ce
RD
5834def PyApp_GetMacSupportPCMenuShortcuts(*args, **kwargs):
5835 """PyApp_GetMacSupportPCMenuShortcuts() -> bool"""
54f9ee45 5836 return _core_.PyApp_GetMacSupportPCMenuShortcuts(*args, **kwargs)
d14a1e28 5837
e811c8ce
RD
5838def PyApp_GetMacAboutMenuItemId(*args, **kwargs):
5839 """PyApp_GetMacAboutMenuItemId() -> long"""
54f9ee45 5840 return _core_.PyApp_GetMacAboutMenuItemId(*args, **kwargs)
d14a1e28 5841
e811c8ce
RD
5842def PyApp_GetMacPreferencesMenuItemId(*args, **kwargs):
5843 """PyApp_GetMacPreferencesMenuItemId() -> long"""
54f9ee45 5844 return _core_.PyApp_GetMacPreferencesMenuItemId(*args, **kwargs)
d14a1e28 5845
e811c8ce
RD
5846def PyApp_GetMacExitMenuItemId(*args, **kwargs):
5847 """PyApp_GetMacExitMenuItemId() -> long"""
54f9ee45 5848 return _core_.PyApp_GetMacExitMenuItemId(*args, **kwargs)
d14a1e28 5849
e811c8ce 5850def PyApp_GetMacHelpMenuTitleName(*args, **kwargs):
196addbf 5851 """PyApp_GetMacHelpMenuTitleName() -> String"""
54f9ee45 5852 return _core_.PyApp_GetMacHelpMenuTitleName(*args, **kwargs)
d14a1e28 5853
e811c8ce
RD
5854def PyApp_SetMacSupportPCMenuShortcuts(*args, **kwargs):
5855 """PyApp_SetMacSupportPCMenuShortcuts(bool val)"""
54f9ee45 5856 return _core_.PyApp_SetMacSupportPCMenuShortcuts(*args, **kwargs)
d14a1e28 5857
e811c8ce
RD
5858def PyApp_SetMacAboutMenuItemId(*args, **kwargs):
5859 """PyApp_SetMacAboutMenuItemId(long val)"""
54f9ee45 5860 return _core_.PyApp_SetMacAboutMenuItemId(*args, **kwargs)
d14a1e28 5861
e811c8ce
RD
5862def PyApp_SetMacPreferencesMenuItemId(*args, **kwargs):
5863 """PyApp_SetMacPreferencesMenuItemId(long val)"""
54f9ee45 5864 return _core_.PyApp_SetMacPreferencesMenuItemId(*args, **kwargs)
d14a1e28 5865
e811c8ce
RD
5866def PyApp_SetMacExitMenuItemId(*args, **kwargs):
5867 """PyApp_SetMacExitMenuItemId(long val)"""
54f9ee45 5868 return _core_.PyApp_SetMacExitMenuItemId(*args, **kwargs)
d14a1e28 5869
e811c8ce 5870def PyApp_SetMacHelpMenuTitleName(*args, **kwargs):
196addbf 5871 """PyApp_SetMacHelpMenuTitleName(String val)"""
54f9ee45 5872 return _core_.PyApp_SetMacHelpMenuTitleName(*args, **kwargs)
d14a1e28 5873
e811c8ce 5874def PyApp_GetComCtl32Version(*args, **kwargs):
0df68c9f
RD
5875 """
5876 PyApp_GetComCtl32Version() -> int
6c3b4aae 5877
66c033b4
RD
5878 Returns 400, 470, 471, etc. for comctl32.dll 4.00, 4.70, 4.71 or 0 if
5879 it wasn't found at all. Raises an exception on non-Windows platforms.
0df68c9f 5880 """
54f9ee45 5881 return _core_.PyApp_GetComCtl32Version(*args, **kwargs)
d14a1e28
RD
5882
5883#---------------------------------------------------------------------------
5884
5885
e811c8ce 5886def Exit(*args, **kwargs):
0df68c9f
RD
5887 """
5888 Exit()
6c3b4aae 5889
0df68c9f
RD
5890 Force an exit of the application. Convenience for wx.GetApp().Exit()
5891 """
54f9ee45 5892 return _core_.Exit(*args, **kwargs)
d14a1e28 5893
e811c8ce 5894def Yield(*args, **kwargs):
0df68c9f
RD
5895 """
5896 Yield() -> bool
6c3b4aae 5897
0df68c9f
RD
5898 Yield to other apps/messages. Convenience for wx.GetApp().Yield()
5899 """
54f9ee45 5900 return _core_.Yield(*args, **kwargs)
d14a1e28 5901
e811c8ce 5902def YieldIfNeeded(*args, **kwargs):
0df68c9f
RD
5903 """
5904 YieldIfNeeded() -> bool
6c3b4aae 5905
0df68c9f
RD
5906 Yield to other apps/messages. Convenience for wx.GetApp().Yield(True)
5907 """
54f9ee45 5908 return _core_.YieldIfNeeded(*args, **kwargs)
d14a1e28 5909
e811c8ce 5910def SafeYield(*args, **kwargs):
0df68c9f
RD
5911 """
5912 SafeYield(Window win=None, bool onlyIfNeeded=False) -> bool
6c3b4aae 5913
66c033b4
RD
5914 This function is similar to `wx.Yield`, except that it disables the
5915 user input to all program windows before calling `wx.Yield` and
5916 re-enables it again afterwards. If ``win`` is not None, this window
5917 will remain enabled, allowing the implementation of some limited user
5918 interaction.
6c3b4aae 5919
66c033b4 5920 :Returns: the result of the call to `wx.Yield`.
0df68c9f 5921 """
54f9ee45 5922 return _core_.SafeYield(*args, **kwargs)
d14a1e28 5923
e811c8ce 5924def WakeUpIdle(*args, **kwargs):
0df68c9f
RD
5925 """
5926 WakeUpIdle()
6c3b4aae 5927
66c033b4
RD
5928 Cause the message queue to become empty again, so idle events will be
5929 sent.
0df68c9f 5930 """
54f9ee45 5931 return _core_.WakeUpIdle(*args, **kwargs)
d14a1e28 5932
e811c8ce 5933def PostEvent(*args, **kwargs):
0df68c9f
RD
5934 """
5935 PostEvent(EvtHandler dest, Event event)
6c3b4aae 5936
66c033b4
RD
5937 Send an event to a window or other wx.EvtHandler to be processed
5938 later.
0df68c9f 5939 """
54f9ee45 5940 return _core_.PostEvent(*args, **kwargs)
d14a1e28 5941
e811c8ce 5942def App_CleanUp(*args, **kwargs):
0df68c9f
RD
5943 """
5944 App_CleanUp()
6c3b4aae 5945
41e2b43e 5946 For internal use only, it is used to cleanup after wxWidgets when
66c033b4 5947 Python shuts down.
0df68c9f 5948 """
54f9ee45 5949 return _core_.App_CleanUp(*args, **kwargs)
d14a1e28 5950
e811c8ce 5951def GetApp(*args, **kwargs):
0df68c9f
RD
5952 """
5953 GetApp() -> PyApp
6c3b4aae 5954
196addbf 5955 Return a reference to the current wx.App object.
0df68c9f 5956 """
54f9ee45 5957 return _core_.GetApp(*args, **kwargs)
5cbf236d
RD
5958
5959def SetDefaultPyEncoding(*args, **kwargs):
5960 """
5961 SetDefaultPyEncoding(string encoding)
5962
5963 Sets the encoding that wxPython will use when it needs to convert a
5964 Python string or unicode object to or from a wxString.
e505d15e
RD
5965
5966 The default encoding is the value of ``locale.getdefaultlocale()[1]``
5967 but please be aware that the default encoding within the same locale
5968 may be slightly different on different platforms. For example, please
5969 see http://www.alanwood.net/demos/charsetdiffs.html for differences
5970 between the common latin/roman encodings.
5cbf236d
RD
5971 """
5972 return _core_.SetDefaultPyEncoding(*args, **kwargs)
5973
5974def GetDefaultPyEncoding(*args, **kwargs):
5975 """
5976 GetDefaultPyEncoding() -> string
5977
5978 Gets the current encoding that wxPython will use when it needs to
5979 convert a Python string or unicode object to or from a wxString.
5980 """
5981 return _core_.GetDefaultPyEncoding(*args, **kwargs)
d14a1e28
RD
5982#----------------------------------------------------------------------
5983
5984class PyOnDemandOutputWindow:
6c3b4aae
RD
5985 """
5986 A class that can be used for redirecting Python's stdout and
5987 stderr streams. It will do nothing until something is wrriten to
5988 the stream at which point it will create a Frame with a text area
5989 and write the text there.
5990 """
d14a1e28
RD
5991 def __init__(self, title = "wxPython: stdout/stderr"):
5992 self.frame = None
5993 self.title = title
412d302d
RD
5994 self.pos = wx.DefaultPosition
5995 self.size = (450, 300)
d14a1e28
RD
5996 self.parent = None
5997
5998 def SetParent(self, parent):
6c3b4aae 5999 """Set the window to be used as the popup Frame's parent."""
d14a1e28
RD
6000 self.parent = parent
6001
6c3b4aae
RD
6002
6003 def CreateOutputWindow(self, st):
412d302d
RD
6004 self.frame = wx.Frame(self.parent, -1, self.title, self.pos, self.size,
6005 style=wx.DEFAULT_FRAME_STYLE)
196addbf 6006 self.text = wx.TextCtrl(self.frame, -1, "",
412d302d 6007 style=wx.TE_MULTILINE|wx.TE_READONLY)
d1e20054 6008 self.text.AppendText(st)
6c3b4aae
RD
6009 self.frame.Show(True)
6010 EVT_CLOSE(self.frame, self.OnCloseWindow)
6011
d14a1e28 6012
7409c0c6
RD
6013 def OnCloseWindow(self, event):
6014 if self.frame is not None:
6015 self.frame.Destroy()
6016 self.frame = None
6017 self.text = None
6018
6019
d14a1e28 6020 # These methods provide the file-like output behaviour.
6c3b4aae
RD
6021 def write(self, text):
6022 """
6023 Create the output window if needed and write the string to it.
6024 If not called in the context of the gui thread then uses
6025 CallAfter to do the work there.
6026 """
6027 if self.frame is None:
6028 if not wx.Thread_IsMain():
6029 wx.CallAfter(self.CreateOutputWindow, text)
6030 else:
6031 self.CreateOutputWindow(text)
6032 else:
6033 if not wx.Thread_IsMain():
6034 wx.CallAfter(self.text.AppendText, text)
6035 else:
6036 self.text.AppendText(text)
6037
d14a1e28
RD
6038
6039 def close(self):
6c3b4aae
RD
6040 if self.frame is not None:
6041 wx.CallAfter(self.frame.Close)
6042
d14a1e28 6043
19272049
RD
6044 def flush(self):
6045 pass
6046
6047
d14a1e28
RD
6048
6049#----------------------------------------------------------------------
d14a1e28
RD
6050
6051_defRedirect = (wx.Platform == '__WXMSW__' or wx.Platform == '__WXMAC__')
6052
6053class App(wx.PyApp):
6c3b4aae 6054 """
66c033b4
RD
6055 The ``wx.App`` class represents the application and is used to:
6056
6057 * bootstrap the wxPython system and initialize the underlying
6058 gui toolkit
6059 * set and get application-wide properties
6060 * implement the windowing system main message or event loop,
6061 and to dispatch events to window instances
6062 * etc.
6063
6064 Every application must have a ``wx.App`` instance, and all
6065 creation of UI objects should be delayed until after the
03e37cd5
RD
6066 ``wx.App`` object has been created in order to ensure that the gui
6067 platform and wxWidgets have been fully initialized.
66c033b4
RD
6068
6069 Normally you would derive from this class and implement an
6070 ``OnInit`` method that creates a frame and then calls
6071 ``self.SetTopWindow(frame)``.
6072
03e37cd5 6073 :see: `wx.PySimpleApp` for a simpler app class that can be used
1c0f361b 6074 directly.
6c3b4aae 6075 """
66c033b4 6076
d14a1e28
RD
6077 outputWindowClass = PyOnDemandOutputWindow
6078
03e37cd5
RD
6079 def __init__(self, redirect=_defRedirect, filename=None,
6080 useBestVisual=False, clearSigInt=True):
66c033b4
RD
6081 """
6082 Construct a ``wx.App`` object.
6083
03e37cd5
RD
6084 :param redirect: Should ``sys.stdout`` and ``sys.stderr`` be
6085 redirected? Defaults to True on Windows and Mac, False
6086 otherwise. If `filename` is None then output will be
6087 redirected to a window that pops up as needed. (You can
6088 control what kind of window is created for the output by
6089 resetting the class variable ``outputWindowClass`` to a
6090 class of your choosing.)
66c033b4 6091
03e37cd5
RD
6092 :param filename: The name of a file to redirect output to, if
6093 redirect is True.
66c033b4
RD
6094
6095 :param useBestVisual: Should the app try to use the best
03e37cd5
RD
6096 available visual provided by the system (only relevant on
6097 systems that have more than one visual.) This parameter
6098 must be used instead of calling `SetUseBestVisual` later
6099 on because it must be set before the underlying GUI
6100 toolkit is initialized.
6101
6102 :param clearSigInt: Should SIGINT be cleared? This allows the
6103 app to terminate upon a Ctrl-C in the console like other
6104 GUI apps will.
66c033b4
RD
6105
6106 :note: You should override OnInit to do applicaition
6107 initialization to ensure that the system, toolkit and
6108 wxWidgets are fully initialized.
6109 """
d14a1e28
RD
6110 wx.PyApp.__init__(self)
6111
6112 if wx.Platform == "__WXMAC__":
6113 try:
6114 import MacOS
6115 if not MacOS.WMAvailable():
6116 print """\
6117This program needs access to the screen. Please run with 'pythonw',
6118not 'python', and only when you are logged in on the main display of
6119your Mac."""
6120 _sys.exit(1)
36cadbf7
RD
6121 except SystemExit:
6122 raise
d14a1e28
RD
6123 except:
6124 pass
6125
6126 # This has to be done before OnInit
6127 self.SetUseBestVisual(useBestVisual)
6128
6129 # Set the default handler for SIGINT. This fixes a problem
6130 # where if Ctrl-C is pressed in the console that started this
6131 # app then it will not appear to do anything, (not even send
6132 # KeyboardInterrupt???) but will later segfault on exit. By
6133 # setting the default handler then the app will exit, as
6134 # expected (depending on platform.)
03e37cd5
RD
6135 if clearSigInt:
6136 try:
6137 import signal
6138 signal.signal(signal.SIGINT, signal.SIG_DFL)
6139 except:
6140 pass
d14a1e28
RD
6141
6142 # Save and redirect the stdio to a window?
6143 self.stdioWin = None
6144 self.saveStdio = (_sys.stdout, _sys.stderr)
6145 if redirect:
6146 self.RedirectStdio(filename)
6147
8fb0e70a
RD
6148 # Use Python's install prefix as the default
6149 wx.StandardPaths.Get().SetInstallPrefix(_sys.prefix)
6150
d14a1e28
RD
6151 # This finishes the initialization of wxWindows and then calls
6152 # the OnInit that should be present in the derived class
6153 self._BootstrapApp()
6154
6155
02b455f2
RD
6156 def __del__(self, destroy=wx.PyApp.__del__):
6157 self.RestoreStdio() # Just in case the MainLoop was overridden
6158 destroy(self)
d14a1e28 6159
70b7a5fe
RD
6160 def Destroy(self):
6161 wx.PyApp.Destroy(self)
6162 self.thisown = 0
d14a1e28
RD
6163
6164 def SetTopWindow(self, frame):
1e0c8722 6165 """Set the \"main\" top level window"""
d14a1e28
RD
6166 if self.stdioWin:
6167 self.stdioWin.SetParent(frame)
6168 wx.PyApp.SetTopWindow(self, frame)
6169
6170
6171 def MainLoop(self):
1e0c8722 6172 """Execute the main GUI event loop"""
d14a1e28
RD
6173 wx.PyApp.MainLoop(self)
6174 self.RestoreStdio()
6175
6176
7409c0c6 6177 def RedirectStdio(self, filename=None):
1e0c8722 6178 """Redirect sys.stdout and sys.stderr to a file or a popup window."""
d14a1e28
RD
6179 if filename:
6180 _sys.stdout = _sys.stderr = open(filename, 'a')
6181 else:
6182 self.stdioWin = self.outputWindowClass()
6183 _sys.stdout = _sys.stderr = self.stdioWin
6184
6185
6186 def RestoreStdio(self):
02b455f2
RD
6187 try:
6188 _sys.stdout, _sys.stderr = self.saveStdio
6189 except:
6190 pass
d14a1e28
RD
6191
6192
412d302d
RD
6193 def SetOutputWindowAttributes(self, title=None, pos=None, size=None):
6194 """
6195 Set the title, position and/or size of the output window if
f5b96ee1
RD
6196 the stdio has been redirected. This should be called before
6197 any output would cause the output window to be created.
412d302d
RD
6198 """
6199 if self.stdioWin:
6200 if title is not None:
6201 self.stdioWin.title = title
6202 if pos is not None:
6203 self.stdioWin.pos = pos
6204 if size is not None:
6205 self.stdioWin.size = size
6206
6207
6208
d14a1e28 6209
66c033b4 6210# change from wx.PyApp_XX to wx.App_XX
54f9ee45
RD
6211App_GetMacSupportPCMenuShortcuts = _core_.PyApp_GetMacSupportPCMenuShortcuts
6212App_GetMacAboutMenuItemId = _core_.PyApp_GetMacAboutMenuItemId
6213App_GetMacPreferencesMenuItemId = _core_.PyApp_GetMacPreferencesMenuItemId
6214App_GetMacExitMenuItemId = _core_.PyApp_GetMacExitMenuItemId
6215App_GetMacHelpMenuTitleName = _core_.PyApp_GetMacHelpMenuTitleName
6216App_SetMacSupportPCMenuShortcuts = _core_.PyApp_SetMacSupportPCMenuShortcuts
6217App_SetMacAboutMenuItemId = _core_.PyApp_SetMacAboutMenuItemId
6218App_SetMacPreferencesMenuItemId = _core_.PyApp_SetMacPreferencesMenuItemId
6219App_SetMacExitMenuItemId = _core_.PyApp_SetMacExitMenuItemId
6220App_SetMacHelpMenuTitleName = _core_.PyApp_SetMacHelpMenuTitleName
6221App_GetComCtl32Version = _core_.PyApp_GetComCtl32Version
d14a1e28
RD
6222
6223#----------------------------------------------------------------------------
6224
6225class PySimpleApp(wx.App):
6c3b4aae
RD
6226 """
6227 A simple application class. You can just create one of these and
6228 then then make your top level windows later, and not have to worry
66c033b4
RD
6229 about OnInit. For example::
6230
6231 app = wx.PySimpleApp()
6232 frame = wx.Frame(None, title='Hello World')
6233 frame.Show()
6234 app.MainLoop()
6235
6236 :see: `wx.App`
6237 """
6c3b4aae 6238
03e37cd5
RD
6239 def __init__(self, redirect=False, filename=None,
6240 useBestVisual=False, clearSigInt=True):
66c033b4
RD
6241 """
6242 :see: `wx.App.__init__`
6243 """
03e37cd5 6244 wx.App.__init__(self, redirect, filename, useBestVisual, clearSigInt)
6c3b4aae 6245
d14a1e28 6246 def OnInit(self):
d14a1e28
RD
6247 return True
6248
6249
66c033b4 6250
6c3b4aae 6251# Is anybody using this one?
d14a1e28
RD
6252class PyWidgetTester(wx.App):
6253 def __init__(self, size = (250, 100)):
6254 self.size = size
6255 wx.App.__init__(self, 0)
6256
6257 def OnInit(self):
196addbf 6258 self.frame = wx.Frame(None, -1, "Widget Tester", pos=(0,0), size=self.size)
d14a1e28
RD
6259 self.SetTopWindow(self.frame)
6260 return True
6261
66c033b4
RD
6262 def SetWidget(self, widgetClass, *args, **kwargs):
6263 w = widgetClass(self.frame, *args, **kwargs)
d14a1e28
RD
6264 self.frame.Show(True)
6265
6266#----------------------------------------------------------------------------
6267# DO NOT hold any other references to this object. This is how we
66c033b4 6268# know when to cleanup system resources that wxWidgets is holding. When
d14a1e28 6269# the sys module is unloaded, the refcount on sys.__wxPythonCleanup
66c033b4 6270# goes to zero and it calls the wx.App_CleanUp function.
d14a1e28
RD
6271
6272class __wxPyCleanup:
6273 def __init__(self):
54f9ee45 6274 self.cleanup = _core_.App_CleanUp
d14a1e28
RD
6275 def __del__(self):
6276 self.cleanup()
6277
6278_sys.__wxPythonCleanup = __wxPyCleanup()
6279
6280## # another possible solution, but it gets called too early...
66c033b4
RD
6281## import atexit
6282## atexit.register(_core_.wxApp_CleanUp)
d14a1e28
RD
6283
6284
6285#----------------------------------------------------------------------------
6286
6287#---------------------------------------------------------------------------
2ef75293
RD
6288
6289class EventLoop(object):
093d3ff1 6290 """Proxy of C++ EventLoop class"""
2ef75293
RD
6291 def __repr__(self):
6292 return "<%s.%s; proxy of C++ wxEventLoop instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
6293 def __init__(self, *args, **kwargs):
6294 """__init__(self) -> EventLoop"""
6295 newobj = _core_.new_EventLoop(*args, **kwargs)
6296 self.this = newobj.this
6297 self.thisown = 1
6298 del newobj.thisown
6299 def __del__(self, destroy=_core_.delete_EventLoop):
6300 """__del__(self)"""
6301 try:
6302 if self.thisown: destroy(self)
6303 except: pass
6304
6305 def Run(*args, **kwargs):
6306 """Run(self) -> int"""
6307 return _core_.EventLoop_Run(*args, **kwargs)
6308
6309 def Exit(*args, **kwargs):
6310 """Exit(self, int rc=0)"""
6311 return _core_.EventLoop_Exit(*args, **kwargs)
6312
6313 def Pending(*args, **kwargs):
6314 """Pending(self) -> bool"""
6315 return _core_.EventLoop_Pending(*args, **kwargs)
6316
6317 def Dispatch(*args, **kwargs):
6318 """Dispatch(self) -> bool"""
6319 return _core_.EventLoop_Dispatch(*args, **kwargs)
6320
6321 def IsRunning(*args, **kwargs):
6322 """IsRunning(self) -> bool"""
6323 return _core_.EventLoop_IsRunning(*args, **kwargs)
6324
6325 def GetActive(*args, **kwargs):
6326 """GetActive() -> EventLoop"""
6327 return _core_.EventLoop_GetActive(*args, **kwargs)
6328
6329 GetActive = staticmethod(GetActive)
6330 def SetActive(*args, **kwargs):
6331 """SetActive(EventLoop loop)"""
6332 return _core_.EventLoop_SetActive(*args, **kwargs)
6333
6334 SetActive = staticmethod(SetActive)
6335
6336class EventLoopPtr(EventLoop):
6337 def __init__(self, this):
6338 self.this = this
6339 if not hasattr(self,"thisown"): self.thisown = 0
6340 self.__class__ = EventLoop
6341_core_.EventLoop_swigregister(EventLoopPtr)
6342
6343def EventLoop_GetActive(*args, **kwargs):
6344 """EventLoop_GetActive() -> EventLoop"""
6345 return _core_.EventLoop_GetActive(*args, **kwargs)
6346
6347def EventLoop_SetActive(*args, **kwargs):
6348 """EventLoop_SetActive(EventLoop loop)"""
6349 return _core_.EventLoop_SetActive(*args, **kwargs)
6350
6351#---------------------------------------------------------------------------
d14a1e28 6352
1e0c8722 6353class AcceleratorEntry(object):
66c033b4
RD
6354 """
6355 A class used to define items in an `wx.AcceleratorTable`. wxPython
6356 programs can choose to use wx.AcceleratorEntry objects, but using a
6357 list of 3-tuple of integers (flags, keyCode, cmdID) usually works just
41e2b43e 6358 as well. See `__init__` for of the tuple values.
66c033b4
RD
6359
6360 :see: `wx.AcceleratorTable`
6361 """
1e0c8722
RD
6362 def __repr__(self):
6363 return "<%s.%s; proxy of C++ wxAcceleratorEntry instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
6364 def __init__(self, *args, **kwargs):
66c033b4
RD
6365 """
6366 __init__(self, int flags=0, int keyCode=0, int cmdID=0) -> AcceleratorEntry
6367
6368 Construct a wx.AcceleratorEntry.
66c033b4 6369 """
54f9ee45 6370 newobj = _core_.new_AcceleratorEntry(*args, **kwargs)
1e0c8722
RD
6371 self.this = newobj.this
6372 self.thisown = 1
6373 del newobj.thisown
54f9ee45 6374 def __del__(self, destroy=_core_.delete_AcceleratorEntry):
a95a7133 6375 """__del__(self)"""
1e0c8722
RD
6376 try:
6377 if self.thisown: destroy(self)
6378 except: pass
6379
6380 def Set(*args, **kwargs):
66c033b4
RD
6381 """
6382 Set(self, int flags, int keyCode, int cmd)
1e0c8722 6383
66c033b4
RD
6384 (Re)set the attributes of a wx.AcceleratorEntry.
6385 :see `__init__`
6386 """
6387 return _core_.AcceleratorEntry_Set(*args, **kwargs)
1e0c8722
RD
6388
6389 def GetFlags(*args, **kwargs):
66c033b4
RD
6390 """
6391 GetFlags(self) -> int
6392
6393 Get the AcceleratorEntry's flags.
6394 """
54f9ee45 6395 return _core_.AcceleratorEntry_GetFlags(*args, **kwargs)
1e0c8722
RD
6396
6397 def GetKeyCode(*args, **kwargs):
66c033b4
RD
6398 """
6399 GetKeyCode(self) -> int
6400
6401 Get the AcceleratorEntry's keycode.
6402 """
54f9ee45 6403 return _core_.AcceleratorEntry_GetKeyCode(*args, **kwargs)
1e0c8722
RD
6404
6405 def GetCommand(*args, **kwargs):
66c033b4
RD
6406 """
6407 GetCommand(self) -> int
6408
6409 Get the AcceleratorEntry's command ID.
6410 """
54f9ee45 6411 return _core_.AcceleratorEntry_GetCommand(*args, **kwargs)
1e0c8722
RD
6412
6413
6414class AcceleratorEntryPtr(AcceleratorEntry):
6415 def __init__(self, this):
6416 self.this = this
6417 if not hasattr(self,"thisown"): self.thisown = 0
6418 self.__class__ = AcceleratorEntry
54f9ee45 6419_core_.AcceleratorEntry_swigregister(AcceleratorEntryPtr)
1e0c8722
RD
6420
6421class AcceleratorTable(Object):
66c033b4
RD
6422 """
6423 An accelerator table allows the application to specify a table of
6424 keyboard shortcuts for menus or other commands. On Windows, menu or
6425 button commands are supported; on GTK, only menu commands are
6426 supported.
66c033b4 6427 """
1e0c8722
RD
6428 def __repr__(self):
6429 return "<%s.%s; proxy of C++ wxAcceleratorTable instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
6430 def __init__(self, *args, **kwargs):
0df68c9f
RD
6431 """
6432 __init__(entries) -> AcceleratorTable
1e0c8722 6433
66c033b4
RD
6434 Construct an AcceleratorTable from a list of `wx.AcceleratorEntry`
6435 items or or of 3-tuples (flags, keyCode, cmdID)
6436
6437 :see: `wx.AcceleratorEntry`
0df68c9f 6438 """
54f9ee45 6439 newobj = _core_.new_AcceleratorTable(*args, **kwargs)
1e0c8722
RD
6440 self.this = newobj.this
6441 self.thisown = 1
6442 del newobj.thisown
54f9ee45 6443 def __del__(self, destroy=_core_.delete_AcceleratorTable):
a95a7133 6444 """__del__(self)"""
1e0c8722
RD
6445 try:
6446 if self.thisown: destroy(self)
6447 except: pass
6448
6449 def Ok(*args, **kwargs):
a95a7133 6450 """Ok(self) -> bool"""
54f9ee45 6451 return _core_.AcceleratorTable_Ok(*args, **kwargs)
1e0c8722
RD
6452
6453
6454class AcceleratorTablePtr(AcceleratorTable):
6455 def __init__(self, this):
6456 self.this = this
6457 if not hasattr(self,"thisown"): self.thisown = 0
6458 self.__class__ = AcceleratorTable
54f9ee45 6459_core_.AcceleratorTable_swigregister(AcceleratorTablePtr)
1e0c8722
RD
6460
6461
6462def GetAccelFromString(*args, **kwargs):
196addbf 6463 """GetAccelFromString(String label) -> AcceleratorEntry"""
54f9ee45 6464 return _core_.GetAccelFromString(*args, **kwargs)
1e0c8722
RD
6465#---------------------------------------------------------------------------
6466
74a57fcd
RD
6467class VisualAttributes(object):
6468 """struct containing all the visual attributes of a control"""
6469 def __repr__(self):
6470 return "<%s.%s; proxy of C++ wxVisualAttributes instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
6471 def __init__(self, *args, **kwargs):
6472 """
a95a7133 6473 __init__(self) -> VisualAttributes
74a57fcd
RD
6474
6475 struct containing all the visual attributes of a control
6476 """
54f9ee45 6477 newobj = _core_.new_VisualAttributes(*args, **kwargs)
74a57fcd
RD
6478 self.this = newobj.this
6479 self.thisown = 1
6480 del newobj.thisown
54f9ee45 6481 def __del__(self, destroy=_core_.delete_VisualAttributes):
a95a7133 6482 """__del__(self)"""
74a57fcd
RD
6483 try:
6484 if self.thisown: destroy(self)
6485 except: pass
6486
54f9ee45
RD
6487 font = property(_core_.VisualAttributes_font_get, _core_.VisualAttributes_font_set)
6488 colFg = property(_core_.VisualAttributes_colFg_get, _core_.VisualAttributes_colFg_set)
6489 colBg = property(_core_.VisualAttributes_colBg_get, _core_.VisualAttributes_colBg_set)
74a57fcd
RD
6490
6491class VisualAttributesPtr(VisualAttributes):
6492 def __init__(self, this):
6493 self.this = this
6494 if not hasattr(self,"thisown"): self.thisown = 0
6495 self.__class__ = VisualAttributes
54f9ee45 6496_core_.VisualAttributes_swigregister(VisualAttributesPtr)
74a57fcd
RD
6497NullAcceleratorTable = cvar.NullAcceleratorTable
6498PanelNameStr = cvar.PanelNameStr
6499
54f9ee45
RD
6500WINDOW_VARIANT_NORMAL = _core_.WINDOW_VARIANT_NORMAL
6501WINDOW_VARIANT_SMALL = _core_.WINDOW_VARIANT_SMALL
6502WINDOW_VARIANT_MINI = _core_.WINDOW_VARIANT_MINI
6503WINDOW_VARIANT_LARGE = _core_.WINDOW_VARIANT_LARGE
6504WINDOW_VARIANT_MAX = _core_.WINDOW_VARIANT_MAX
d14a1e28 6505class Window(EvtHandler):
15afbcd0
RD
6506 """
6507 wx.Window is the base class for all windows and represents any visible
6508 object on the screen. All controls, top level windows and so on are
6509 wx.Windows. Sizers and device contexts are not however, as they don't
6510 appear on screen themselves.
6511
6512 """
e811c8ce
RD
6513 def __repr__(self):
6514 return "<%s.%s; proxy of C++ wxWindow instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 6515 def __init__(self, *args, **kwargs):
0df68c9f 6516 """
a95a7133 6517 __init__(self, Window parent, int id=-1, Point pos=DefaultPosition,
74a57fcd 6518 Size size=DefaultSize, long style=0, String name=PanelNameStr) -> Window
15afbcd0
RD
6519
6520 Construct and show a generic Window.
0df68c9f 6521 """
54f9ee45 6522 newobj = _core_.new_Window(*args, **kwargs)
d14a1e28
RD
6523 self.this = newobj.this
6524 self.thisown = 1
6525 del newobj.thisown
6526 self._setOORInfo(self)
d14a1e28 6527
e811c8ce 6528 def Create(*args, **kwargs):
0df68c9f 6529 """
a95a7133 6530 Create(self, Window parent, int id=-1, Point pos=DefaultPosition,
74a57fcd 6531 Size size=DefaultSize, long style=0, String name=PanelNameStr) -> bool
15afbcd0
RD
6532
6533 Create the GUI part of the Window for 2-phase creation mode.
0df68c9f 6534 """
54f9ee45 6535 return _core_.Window_Create(*args, **kwargs)
d14a1e28 6536
e811c8ce 6537 def Close(*args, **kwargs):
15afbcd0 6538 """
a95a7133 6539 Close(self, bool force=False) -> bool
15afbcd0
RD
6540
6541 This function simply generates a EVT_CLOSE event whose handler usually
6542 tries to close the window. It doesn't close the window itself,
6543 however. If force is False (the default) then the window's close
6544 handler will be allowed to veto the destruction of the window.
15afbcd0 6545 """
54f9ee45 6546 return _core_.Window_Close(*args, **kwargs)
d14a1e28 6547
e811c8ce 6548 def Destroy(*args, **kwargs):
0df68c9f 6549 """
a95a7133 6550 Destroy(self) -> bool
d14a1e28 6551
15afbcd0
RD
6552 Destroys the window safely. Frames and dialogs are not destroyed
6553 immediately when this function is called -- they are added to a list
6554 of windows to be deleted on idle time, when all the window's events
6555 have been processed. This prevents problems with events being sent to
6556 non-existent windows.
6557
6558 Returns True if the window has either been successfully deleted, or it
6559 has been added to the list of windows pending real deletion.
0df68c9f 6560 """
54f9ee45 6561 return _core_.Window_Destroy(*args, **kwargs)
d14a1e28 6562
e811c8ce 6563 def DestroyChildren(*args, **kwargs):
15afbcd0 6564 """
a95a7133 6565 DestroyChildren(self) -> bool
15afbcd0 6566
41e2b43e
RD
6567 Destroys all children of a window. Called automatically by the
6568 destructor.
15afbcd0 6569 """
54f9ee45 6570 return _core_.Window_DestroyChildren(*args, **kwargs)
d14a1e28 6571
e811c8ce 6572 def IsBeingDeleted(*args, **kwargs):
15afbcd0 6573 """
a95a7133 6574 IsBeingDeleted(self) -> bool
15afbcd0
RD
6575
6576 Is the window in the process of being deleted?
6577 """
54f9ee45 6578 return _core_.Window_IsBeingDeleted(*args, **kwargs)
d14a1e28 6579
e811c8ce 6580 def SetTitle(*args, **kwargs):
15afbcd0 6581 """
a95a7133 6582 SetTitle(self, String title)
15afbcd0
RD
6583
6584 Sets the window's title. Applicable only to frames and dialogs.
6585 """
54f9ee45 6586 return _core_.Window_SetTitle(*args, **kwargs)
d14a1e28 6587
e811c8ce 6588 def GetTitle(*args, **kwargs):
15afbcd0 6589 """
a95a7133 6590 GetTitle(self) -> String
15afbcd0
RD
6591
6592 Gets the window's title. Applicable only to frames and dialogs.
6593 """
54f9ee45 6594 return _core_.Window_GetTitle(*args, **kwargs)
d14a1e28 6595
e811c8ce 6596 def SetLabel(*args, **kwargs):
15afbcd0 6597 """
a95a7133 6598 SetLabel(self, String label)
15afbcd0
RD
6599
6600 Set the text which the window shows in its label if applicable.
6601 """
54f9ee45 6602 return _core_.Window_SetLabel(*args, **kwargs)
d14a1e28 6603
e811c8ce 6604 def GetLabel(*args, **kwargs):
15afbcd0 6605 """
a95a7133 6606 GetLabel(self) -> String
15afbcd0 6607
41e2b43e
RD
6608 Generic way of getting a label from any window, for identification
6609 purposes. The interpretation of this function differs from class to
6610 class. For frames and dialogs, the value returned is the title. For
6611 buttons or static text controls, it is the button text. This function
6612 can be useful for meta-programs such as testing tools or special-needs
6613 access programs)which need to identify windows by name.
15afbcd0 6614 """
54f9ee45 6615 return _core_.Window_GetLabel(*args, **kwargs)
d14a1e28 6616
e811c8ce 6617 def SetName(*args, **kwargs):
15afbcd0 6618 """
a95a7133 6619 SetName(self, String name)
15afbcd0 6620
41e2b43e
RD
6621 Sets the window's name. The window name is used for ressource setting
6622 in X, it is not the same as the window title/label
15afbcd0 6623 """
54f9ee45 6624 return _core_.Window_SetName(*args, **kwargs)
d14a1e28 6625
e811c8ce 6626 def GetName(*args, **kwargs):
15afbcd0 6627 """
a95a7133 6628 GetName(self) -> String
15afbcd0 6629
41e2b43e
RD
6630 Returns the windows name. This name is not guaranteed to be unique;
6631 it is up to the programmer to supply an appropriate name in the window
6632 constructor or via wx.Window.SetName.
15afbcd0 6633 """
54f9ee45 6634 return _core_.Window_GetName(*args, **kwargs)
d14a1e28 6635
4276dc52
RD
6636 def SetWindowVariant(*args, **kwargs):
6637 """
a95a7133 6638 SetWindowVariant(self, int variant)
4276dc52 6639
41e2b43e
RD
6640 Sets the variant of the window/font size to use for this window, if
6641 the platform supports variants, for example, wxMac.
4276dc52 6642 """
54f9ee45 6643 return _core_.Window_SetWindowVariant(*args, **kwargs)
4276dc52
RD
6644
6645 def GetWindowVariant(*args, **kwargs):
a95a7133 6646 """GetWindowVariant(self) -> int"""
54f9ee45 6647 return _core_.Window_GetWindowVariant(*args, **kwargs)
4276dc52 6648
e811c8ce 6649 def SetId(*args, **kwargs):
15afbcd0 6650 """
a95a7133 6651 SetId(self, int winid)
15afbcd0
RD
6652
6653 Sets the identifier of the window. Each window has an integer
6654 identifier. If the application has not provided one, an identifier
6655 will be generated. Normally, the identifier should be provided on
6656 creation and should not be modified subsequently.
6657 """
54f9ee45 6658 return _core_.Window_SetId(*args, **kwargs)
d14a1e28 6659
e811c8ce 6660 def GetId(*args, **kwargs):
15afbcd0 6661 """
a95a7133 6662 GetId(self) -> int
15afbcd0
RD
6663
6664 Returns the identifier of the window. Each window has an integer
6665 identifier. If the application has not provided one (or the default Id
6666 -1 is used) then an unique identifier with a negative value will be
6667 generated.
6668 """
54f9ee45 6669 return _core_.Window_GetId(*args, **kwargs)
d14a1e28 6670
e811c8ce 6671 def NewControlId(*args, **kwargs):
15afbcd0 6672 """
66c033b4 6673 NewControlId() -> int
15afbcd0
RD
6674
6675 Generate a control id for the controls which were not given one.
6676 """
54f9ee45 6677 return _core_.Window_NewControlId(*args, **kwargs)
d14a1e28 6678
e811c8ce
RD
6679 NewControlId = staticmethod(NewControlId)
6680 def NextControlId(*args, **kwargs):
15afbcd0 6681 """
66c033b4 6682 NextControlId(int winid) -> int
15afbcd0
RD
6683
6684 Get the id of the control following the one with the given
41e2b43e 6685 autogenerated) id
15afbcd0 6686 """
54f9ee45 6687 return _core_.Window_NextControlId(*args, **kwargs)
d14a1e28 6688
e811c8ce
RD
6689 NextControlId = staticmethod(NextControlId)
6690 def PrevControlId(*args, **kwargs):
15afbcd0 6691 """
66c033b4 6692 PrevControlId(int winid) -> int
15afbcd0
RD
6693
6694 Get the id of the control preceding the one with the given
41e2b43e 6695 autogenerated) id
15afbcd0 6696 """
54f9ee45 6697 return _core_.Window_PrevControlId(*args, **kwargs)
d14a1e28 6698
e811c8ce
RD
6699 PrevControlId = staticmethod(PrevControlId)
6700 def SetSize(*args, **kwargs):
15afbcd0 6701 """
a95a7133 6702 SetSize(self, Size size)
15afbcd0
RD
6703
6704 Sets the size of the window in pixels.
6705 """
54f9ee45 6706 return _core_.Window_SetSize(*args, **kwargs)
d14a1e28 6707
e811c8ce 6708 def SetDimensions(*args, **kwargs):
15afbcd0 6709 """
a95a7133 6710 SetDimensions(self, int x, int y, int width, int height, int sizeFlags=SIZE_AUTO)
15afbcd0
RD
6711
6712 Sets the position and size of the window in pixels. The sizeFlags
6713 parameter indicates the interpretation of the other params if they are
e505d15e
RD
6714 equal to -1.
6715
6716 ======================== ======================================
6717 wx.SIZE_AUTO A -1 indicates that a class-specific
6718 default should be used.
6719 wx.SIZE_USE_EXISTING Axisting dimensions should be used if
6720 -1 values are supplied.
6721 wxSIZE_ALLOW_MINUS_ONE Allow dimensions of -1 and less to be
6722 interpreted as real dimensions, not
6723 default values.
6724 ======================== ======================================
6725
15afbcd0 6726 """
54f9ee45 6727 return _core_.Window_SetDimensions(*args, **kwargs)
d14a1e28 6728
e811c8ce 6729 def SetRect(*args, **kwargs):
15afbcd0 6730 """
a95a7133 6731 SetRect(self, Rect rect, int sizeFlags=SIZE_AUTO)
15afbcd0
RD
6732
6733 Sets the position and size of the window in pixels using a wx.Rect.
6734 """
54f9ee45 6735 return _core_.Window_SetRect(*args, **kwargs)
d14a1e28 6736
e811c8ce 6737 def SetSizeWH(*args, **kwargs):
15afbcd0 6738 """
a95a7133 6739 SetSizeWH(self, int width, int height)
15afbcd0
RD
6740
6741 Sets the size of the window in pixels.
6742 """
54f9ee45 6743 return _core_.Window_SetSizeWH(*args, **kwargs)
d14a1e28 6744
e811c8ce 6745 def Move(*args, **kwargs):
15afbcd0 6746 """
a95a7133 6747 Move(self, Point pt, int flags=SIZE_USE_EXISTING)
15afbcd0
RD
6748
6749 Moves the window to the given position.
6750 """
54f9ee45 6751 return _core_.Window_Move(*args, **kwargs)
d14a1e28 6752
e811c8ce
RD
6753 SetPosition = Move
6754 def MoveXY(*args, **kwargs):
15afbcd0 6755 """
a95a7133 6756 MoveXY(self, int x, int y, int flags=SIZE_USE_EXISTING)
15afbcd0
RD
6757
6758 Moves the window to the given position.
6759 """
54f9ee45 6760 return _core_.Window_MoveXY(*args, **kwargs)
e811c8ce 6761
f8167d6e
RD
6762 def SetBestFittingSize(*args, **kwargs):
6763 """
6764 SetBestFittingSize(self, Size size=DefaultSize)
6765
6766 A 'Smart' SetSize that will fill in default size components with the
6767 window's *best size* values. Also set's the minsize for use with sizers.
6768 """
6769 return _core_.Window_SetBestFittingSize(*args, **kwargs)
6770
e811c8ce 6771 def Raise(*args, **kwargs):
15afbcd0 6772 """
a95a7133 6773 Raise(self)
15afbcd0
RD
6774
6775 Raises the window to the top of the window hierarchy if it is a
6776 managed window (dialog or frame).
6777 """
54f9ee45 6778 return _core_.Window_Raise(*args, **kwargs)
e811c8ce
RD
6779
6780 def Lower(*args, **kwargs):
15afbcd0 6781 """
a95a7133 6782 Lower(self)
15afbcd0
RD
6783
6784 Lowers the window to the bottom of the window hierarchy if it is a
6785 managed window (dialog or frame).
6786 """
54f9ee45 6787 return _core_.Window_Lower(*args, **kwargs)
e811c8ce
RD
6788
6789 def SetClientSize(*args, **kwargs):
15afbcd0 6790 """
a95a7133 6791 SetClientSize(self, Size size)
15afbcd0
RD
6792
6793 This sets the size of the window client area in pixels. Using this
6794 function to size a window tends to be more device-independent than
6795 wx.Window.SetSize, since the application need not worry about what
6796 dimensions the border or title bar have when trying to fit the window
6797 around panel items, for example.
6798 """
54f9ee45 6799 return _core_.Window_SetClientSize(*args, **kwargs)
e811c8ce
RD
6800
6801 def SetClientSizeWH(*args, **kwargs):
15afbcd0 6802 """
a95a7133 6803 SetClientSizeWH(self, int width, int height)
15afbcd0
RD
6804
6805 This sets the size of the window client area in pixels. Using this
6806 function to size a window tends to be more device-independent than
6807 wx.Window.SetSize, since the application need not worry about what
6808 dimensions the border or title bar have when trying to fit the window
6809 around panel items, for example.
6810 """
54f9ee45 6811 return _core_.Window_SetClientSizeWH(*args, **kwargs)
e811c8ce
RD
6812
6813 def SetClientRect(*args, **kwargs):
15afbcd0 6814 """
a95a7133 6815 SetClientRect(self, Rect rect)
15afbcd0
RD
6816
6817 This sets the size of the window client area in pixels. Using this
6818 function to size a window tends to be more device-independent than
6819 wx.Window.SetSize, since the application need not worry about what
6820 dimensions the border or title bar have when trying to fit the window
6821 around panel items, for example.
6822 """
54f9ee45 6823 return _core_.Window_SetClientRect(*args, **kwargs)
e811c8ce
RD
6824
6825 def GetPosition(*args, **kwargs):
0df68c9f 6826 """
a95a7133 6827 GetPosition(self) -> Point
e811c8ce 6828
0df68c9f
RD
6829 Get the window's position.
6830 """
54f9ee45 6831 return _core_.Window_GetPosition(*args, **kwargs)
e811c8ce
RD
6832
6833 def GetPositionTuple(*args, **kwargs):
0df68c9f
RD
6834 """
6835 GetPositionTuple() -> (x,y)
e811c8ce 6836
0df68c9f
RD
6837 Get the window's position.
6838 """
54f9ee45 6839 return _core_.Window_GetPositionTuple(*args, **kwargs)
e811c8ce
RD
6840
6841 def GetSize(*args, **kwargs):
0df68c9f 6842 """
a95a7133 6843 GetSize(self) -> Size
e811c8ce 6844
0df68c9f
RD
6845 Get the window size.
6846 """
54f9ee45 6847 return _core_.Window_GetSize(*args, **kwargs)
e811c8ce
RD
6848
6849 def GetSizeTuple(*args, **kwargs):
0df68c9f
RD
6850 """
6851 GetSizeTuple() -> (width, height)
e811c8ce 6852
0df68c9f
RD
6853 Get the window size.
6854 """
54f9ee45 6855 return _core_.Window_GetSizeTuple(*args, **kwargs)
e811c8ce
RD
6856
6857 def GetRect(*args, **kwargs):
15afbcd0 6858 """
a95a7133 6859 GetRect(self) -> Rect
15afbcd0
RD
6860
6861 Returns the size and position of the window as a wx.Rect object.
6862 """
54f9ee45 6863 return _core_.Window_GetRect(*args, **kwargs)
e811c8ce
RD
6864
6865 def GetClientSize(*args, **kwargs):
0df68c9f 6866 """
a95a7133 6867 GetClientSize(self) -> Size
e811c8ce 6868
15afbcd0
RD
6869 This gets the size of the window's 'client area' in pixels. The client
6870 area is the area which may be drawn on by the programmer, excluding
6871 title bar, border, scrollbars, etc.
0df68c9f 6872 """
54f9ee45 6873 return _core_.Window_GetClientSize(*args, **kwargs)
e811c8ce
RD
6874
6875 def GetClientSizeTuple(*args, **kwargs):
0df68c9f
RD
6876 """
6877 GetClientSizeTuple() -> (width, height)
e811c8ce 6878
15afbcd0
RD
6879 This gets the size of the window's 'client area' in pixels. The client
6880 area is the area which may be drawn on by the programmer, excluding
6881 title bar, border, scrollbars, etc.
0df68c9f 6882 """
54f9ee45 6883 return _core_.Window_GetClientSizeTuple(*args, **kwargs)
e811c8ce
RD
6884
6885 def GetClientAreaOrigin(*args, **kwargs):
15afbcd0 6886 """
a95a7133 6887 GetClientAreaOrigin(self) -> Point
15afbcd0
RD
6888
6889 Get the origin of the client area of the window relative to the
6890 window's top left corner (the client area may be shifted because of
6891 the borders, scrollbars, other decorations...)
6892 """
54f9ee45 6893 return _core_.Window_GetClientAreaOrigin(*args, **kwargs)
e811c8ce
RD
6894
6895 def GetClientRect(*args, **kwargs):
15afbcd0 6896 """
a95a7133 6897 GetClientRect(self) -> Rect
15afbcd0 6898
61863841 6899 Get the client area position and size as a `wx.Rect` object.
15afbcd0 6900 """
54f9ee45 6901 return _core_.Window_GetClientRect(*args, **kwargs)
e811c8ce
RD
6902
6903 def GetBestSize(*args, **kwargs):
0df68c9f 6904 """
a95a7133 6905 GetBestSize(self) -> Size
e811c8ce 6906
248ed943 6907 This function returns the best acceptable minimal size for the
41e2b43e
RD
6908 window, if applicable. For example, for a static text control, it will
6909 be the minimal size such that the control label is not truncated. For
6910 windows containing subwindows (suzh aswx.Panel), the size returned by
6911 this function will be the same as the size the window would have had
6912 after calling Fit.
0df68c9f 6913 """
54f9ee45 6914 return _core_.Window_GetBestSize(*args, **kwargs)
e811c8ce
RD
6915
6916 def GetBestSizeTuple(*args, **kwargs):
0df68c9f
RD
6917 """
6918 GetBestSizeTuple() -> (width, height)
e811c8ce 6919
248ed943 6920 This function returns the best acceptable minimal size for the
41e2b43e
RD
6921 window, if applicable. For example, for a static text control, it will
6922 be the minimal size such that the control label is not truncated. For
6923 windows containing subwindows (suzh aswx.Panel), the size returned by
6924 this function will be the same as the size the window would have had
6925 after calling Fit.
0df68c9f 6926 """
54f9ee45 6927 return _core_.Window_GetBestSizeTuple(*args, **kwargs)
e811c8ce 6928
dfbb5885
RD
6929 def InvalidateBestSize(*args, **kwargs):
6930 """
6931 InvalidateBestSize(self)
6932
6933 Reset the cached best size value so it will be recalculated the next
6934 time it is needed.
6935 """
6936 return _core_.Window_InvalidateBestSize(*args, **kwargs)
6937
6938 def GetBestFittingSize(*args, **kwargs):
6939 """
6940 GetBestFittingSize(self) -> Size
6941
6942 This function will merge the window's best size into the window's
6943 minimum size, giving priority to the min size components, and returns
6944 the results.
6945
6946 """
6947 return _core_.Window_GetBestFittingSize(*args, **kwargs)
6948
e811c8ce 6949 def GetAdjustedBestSize(*args, **kwargs):
15afbcd0 6950 """
a95a7133 6951 GetAdjustedBestSize(self) -> Size
15afbcd0
RD
6952
6953 This method is similar to GetBestSize, except in one
6954 thing. GetBestSize should return the minimum untruncated size of the
6955 window, while this method will return the largest of BestSize and any
6956 user specified minimum size. ie. it is the minimum size the window
6957 should currently be drawn at, not the minimal size it can possibly
6958 tolerate.
6959 """
54f9ee45 6960 return _core_.Window_GetAdjustedBestSize(*args, **kwargs)
e811c8ce
RD
6961
6962 def Center(*args, **kwargs):
15afbcd0 6963 """
a95a7133 6964 Center(self, int direction=BOTH)
15afbcd0
RD
6965
6966 Centers the window. The parameter specifies the direction for
6967 cetering, and may be wx.HORIZONTAL, wx.VERTICAL or wx.BOTH. It may
6968 also include wx.CENTER_ON_SCREEN flag if you want to center the window
6969 on the entire screen and not on its parent window. If it is a
6970 top-level window and has no parent then it will always be centered
6971 relative to the screen.
6972 """
54f9ee45 6973 return _core_.Window_Center(*args, **kwargs)
e811c8ce
RD
6974
6975 Centre = Center
6976 def CenterOnScreen(*args, **kwargs):
15afbcd0 6977 """
a95a7133 6978 CenterOnScreen(self, int dir=BOTH)
15afbcd0
RD
6979
6980 Center on screen (only works for top level windows)
6981 """
54f9ee45 6982 return _core_.Window_CenterOnScreen(*args, **kwargs)
e811c8ce
RD
6983
6984 CentreOnScreen = CenterOnScreen
6985 def CenterOnParent(*args, **kwargs):
15afbcd0 6986 """
a95a7133 6987 CenterOnParent(self, int dir=BOTH)
15afbcd0
RD
6988
6989 Center with respect to the the parent window
6990 """
54f9ee45 6991 return _core_.Window_CenterOnParent(*args, **kwargs)
e811c8ce
RD
6992
6993 CentreOnParent = CenterOnParent
6994 def Fit(*args, **kwargs):
15afbcd0 6995 """
a95a7133 6996 Fit(self)
15afbcd0
RD
6997
6998 Sizes the window so that it fits around its subwindows. This function
6999 won't do anything if there are no subwindows and will only really work
7000 correctly if sizers are used for the subwindows layout. Also, if the
7001 window has exactly one subwindow it is better (faster and the result
7002 is more precise as Fit adds some margin to account for fuzziness of
7003 its calculations) to call window.SetClientSize(child.GetSize())
7004 instead of calling Fit.
7005 """
54f9ee45 7006 return _core_.Window_Fit(*args, **kwargs)
e811c8ce
RD
7007
7008 def FitInside(*args, **kwargs):
15afbcd0 7009 """
a95a7133 7010 FitInside(self)
15afbcd0
RD
7011
7012 Similar to Fit, but sizes the interior (virtual) size of a
7013 window. Mainly useful with scrolled windows to reset scrollbars after
7014 sizing changes that do not trigger a size event, and/or scrolled
7015 windows without an interior sizer. This function similarly won't do
7016 anything if there are no subwindows.
7017 """
54f9ee45 7018 return _core_.Window_FitInside(*args, **kwargs)
e811c8ce 7019
f16ab95d 7020 def SetSizeHints(*args, **kwargs):
0df68c9f 7021 """
a95a7133 7022 SetSizeHints(self, int minW, int minH, int maxW=-1, int maxH=-1, int incW=-1,
0df68c9f 7023 int incH=-1)
15afbcd0
RD
7024
7025 Allows specification of minimum and maximum window sizes, and window
7026 size increments. If a pair of values is not set (or set to -1), the
7027 default values will be used. If this function is called, the user
908b74cd
RD
7028 will not be able to size the window outside the given bounds (if it is
7029 a top-level window.) Sizers will also inspect the minimum window size
7030 and will use that value if set when calculating layout.
7031
7032 The resizing increments are only significant under Motif or Xt.
0df68c9f 7033 """
f16ab95d 7034 return _core_.Window_SetSizeHints(*args, **kwargs)
e811c8ce 7035
f16ab95d
RD
7036 def SetSizeHintsSz(*args, **kwargs):
7037 """
7038 SetSizeHintsSz(self, Size minSize, Size maxSize=DefaultSize, Size incSize=DefaultSize)
7039
7040 Allows specification of minimum and maximum window sizes, and window
7041 size increments. If a pair of values is not set (or set to -1), the
7042 default values will be used. If this function is called, the user
7043 will not be able to size the window outside the given bounds (if it is
7044 a top-level window.) Sizers will also inspect the minimum window size
7045 and will use that value if set when calculating layout.
7046
7047 The resizing increments are only significant under Motif or Xt.
7048 """
7049 return _core_.Window_SetSizeHintsSz(*args, **kwargs)
7050
7051 def SetVirtualSizeHints(*args, **kwargs):
15afbcd0 7052 """
908b74cd 7053 SetVirtualSizeHints(self, int minW, int minH, int maxW=-1, int maxH=-1)
15afbcd0
RD
7054
7055 Allows specification of minimum and maximum virtual window sizes. If a
7056 pair of values is not set (or set to -1), the default values will be
7057 used. If this function is called, the user will not be able to size
7058 the virtual area of the window outside the given bounds.
7059 """
f16ab95d
RD
7060 return _core_.Window_SetVirtualSizeHints(*args, **kwargs)
7061
7062 def SetVirtualSizeHintsSz(*args, **kwargs):
7063 """
7064 SetVirtualSizeHintsSz(self, Size minSize, Size maxSize=DefaultSize)
7065
7066 Allows specification of minimum and maximum virtual window sizes. If a
7067 pair of values is not set (or set to -1), the default values will be
7068 used. If this function is called, the user will not be able to size
7069 the virtual area of the window outside the given bounds.
7070 """
7071 return _core_.Window_SetVirtualSizeHintsSz(*args, **kwargs)
e811c8ce 7072
908b74cd
RD
7073 def GetMaxSize(*args, **kwargs):
7074 """GetMaxSize(self) -> Size"""
7075 return _core_.Window_GetMaxSize(*args, **kwargs)
7076
7077 def GetMinSize(*args, **kwargs):
7078 """GetMinSize(self) -> Size"""
7079 return _core_.Window_GetMinSize(*args, **kwargs)
7080
7081 def SetMinSize(*args, **kwargs):
7082 """
7083 SetMinSize(self, Size minSize)
7084
7085 A more convenient method than `SetSizeHints` for setting just the
7086 min size.
7087 """
7088 return _core_.Window_SetMinSize(*args, **kwargs)
7089
7090 def SetMaxSize(*args, **kwargs):
7091 """
7092 SetMaxSize(self, Size maxSize)
7093
7094 A more convenient method than `SetSizeHints` for setting just the
7095 max size.
7096 """
7097 return _core_.Window_SetMaxSize(*args, **kwargs)
7098
e811c8ce 7099 def GetMinWidth(*args, **kwargs):
a95a7133 7100 """GetMinWidth(self) -> int"""
54f9ee45 7101 return _core_.Window_GetMinWidth(*args, **kwargs)
e811c8ce
RD
7102
7103 def GetMinHeight(*args, **kwargs):
a95a7133 7104 """GetMinHeight(self) -> int"""
54f9ee45 7105 return _core_.Window_GetMinHeight(*args, **kwargs)
e811c8ce
RD
7106
7107 def GetMaxWidth(*args, **kwargs):
a95a7133 7108 """GetMaxWidth(self) -> int"""
54f9ee45 7109 return _core_.Window_GetMaxWidth(*args, **kwargs)
e811c8ce
RD
7110
7111 def GetMaxHeight(*args, **kwargs):
a95a7133 7112 """GetMaxHeight(self) -> int"""
54f9ee45 7113 return _core_.Window_GetMaxHeight(*args, **kwargs)
e811c8ce 7114
e811c8ce 7115 def SetVirtualSize(*args, **kwargs):
0df68c9f 7116 """
a95a7133 7117 SetVirtualSize(self, Size size)
e811c8ce 7118
15afbcd0
RD
7119 Set the the virtual size of a window in pixels. For most windows this
7120 is just the client area of the window, but for some like scrolled
7121 windows it is more or less independent of the screen window size.
0df68c9f 7122 """
54f9ee45 7123 return _core_.Window_SetVirtualSize(*args, **kwargs)
e811c8ce
RD
7124
7125 def SetVirtualSizeWH(*args, **kwargs):
0df68c9f 7126 """
a95a7133 7127 SetVirtualSizeWH(self, int w, int h)
e811c8ce 7128
15afbcd0
RD
7129 Set the the virtual size of a window in pixels. For most windows this
7130 is just the client area of the window, but for some like scrolled
7131 windows it is more or less independent of the screen window size.
0df68c9f 7132 """
54f9ee45 7133 return _core_.Window_SetVirtualSizeWH(*args, **kwargs)
e811c8ce
RD
7134
7135 def GetVirtualSize(*args, **kwargs):
0df68c9f 7136 """
a95a7133 7137 GetVirtualSize(self) -> Size
e811c8ce 7138
15afbcd0
RD
7139 Get the the virtual size of the window in pixels. For most windows
7140 this is just the client area of the window, but for some like scrolled
7141 windows it is more or less independent of the screen window size.
0df68c9f 7142 """
54f9ee45 7143 return _core_.Window_GetVirtualSize(*args, **kwargs)
e811c8ce
RD
7144
7145 def GetVirtualSizeTuple(*args, **kwargs):
0df68c9f
RD
7146 """
7147 GetVirtualSizeTuple() -> (width, height)
e811c8ce 7148
15afbcd0
RD
7149 Get the the virtual size of the window in pixels. For most windows
7150 this is just the client area of the window, but for some like scrolled
7151 windows it is more or less independent of the screen window size.
0df68c9f 7152 """
54f9ee45 7153 return _core_.Window_GetVirtualSizeTuple(*args, **kwargs)
e811c8ce
RD
7154
7155 def GetBestVirtualSize(*args, **kwargs):
15afbcd0 7156 """
a95a7133 7157 GetBestVirtualSize(self) -> Size
15afbcd0
RD
7158
7159 Return the largest of ClientSize and BestSize (as determined by a
7160 sizer, interior children, or other means)
7161 """
54f9ee45 7162 return _core_.Window_GetBestVirtualSize(*args, **kwargs)
e811c8ce
RD
7163
7164 def Show(*args, **kwargs):
15afbcd0 7165 """
a95a7133 7166 Show(self, bool show=True) -> bool
15afbcd0
RD
7167
7168 Shows or hides the window. You may need to call Raise for a top level
7169 window if you want to bring it to top, although this is not needed if
7170 Show is called immediately after the frame creation. Returns True if
7171 the window has been shown or hidden or False if nothing was done
7172 because it already was in the requested state.
7173 """
54f9ee45 7174 return _core_.Window_Show(*args, **kwargs)
e811c8ce
RD
7175
7176 def Hide(*args, **kwargs):
15afbcd0 7177 """
a95a7133 7178 Hide(self) -> bool
15afbcd0
RD
7179
7180 Equivalent to calling Show(False).
7181 """
54f9ee45 7182 return _core_.Window_Hide(*args, **kwargs)
e811c8ce
RD
7183
7184 def Enable(*args, **kwargs):
15afbcd0 7185 """
a95a7133 7186 Enable(self, bool enable=True) -> bool
15afbcd0
RD
7187
7188 Enable or disable the window for user input. Note that when a parent
7189 window is disabled, all of its children are disabled as well and they
7190 are reenabled again when the parent is. Returns true if the window
7191 has been enabled or disabled, false if nothing was done, i.e. if the
7192 window had already been in the specified state.
7193 """
54f9ee45 7194 return _core_.Window_Enable(*args, **kwargs)
e811c8ce
RD
7195
7196 def Disable(*args, **kwargs):
15afbcd0 7197 """
a95a7133 7198 Disable(self) -> bool
15afbcd0
RD
7199
7200 Disables the window, same as Enable(false).
7201 """
54f9ee45 7202 return _core_.Window_Disable(*args, **kwargs)
e811c8ce
RD
7203
7204 def IsShown(*args, **kwargs):
15afbcd0 7205 """
a95a7133 7206 IsShown(self) -> bool
15afbcd0
RD
7207
7208 Returns true if the window is shown, false if it has been hidden.
7209 """
54f9ee45 7210 return _core_.Window_IsShown(*args, **kwargs)
e811c8ce
RD
7211
7212 def IsEnabled(*args, **kwargs):
15afbcd0 7213 """
a95a7133 7214 IsEnabled(self) -> bool
15afbcd0
RD
7215
7216 Returns true if the window is enabled for input, false otherwise.
7217 """
54f9ee45 7218 return _core_.Window_IsEnabled(*args, **kwargs)
e811c8ce
RD
7219
7220 def SetWindowStyleFlag(*args, **kwargs):
15afbcd0 7221 """
a95a7133 7222 SetWindowStyleFlag(self, long style)
15afbcd0 7223
41e2b43e
RD
7224 Sets the style of the window. Please note that some styles cannot be
7225 changed after the window creation and that Refresh() might need to be
7226 called after changing the others for the change to take place
7227 immediately.
15afbcd0 7228 """
54f9ee45 7229 return _core_.Window_SetWindowStyleFlag(*args, **kwargs)
e811c8ce
RD
7230
7231 def GetWindowStyleFlag(*args, **kwargs):
15afbcd0 7232 """
a95a7133 7233 GetWindowStyleFlag(self) -> long
e811c8ce 7234
15afbcd0
RD
7235 Gets the window style that was passed to the constructor or Create
7236 method.
7237 """
54f9ee45 7238 return _core_.Window_GetWindowStyleFlag(*args, **kwargs)
e811c8ce 7239
15afbcd0 7240 SetWindowStyle = SetWindowStyleFlag; GetWindowStyle = GetWindowStyleFlag
e811c8ce 7241 def HasFlag(*args, **kwargs):
15afbcd0 7242 """
a95a7133 7243 HasFlag(self, int flag) -> bool
15afbcd0
RD
7244
7245 Test if the given style is set for this window.
7246 """
54f9ee45 7247 return _core_.Window_HasFlag(*args, **kwargs)
e811c8ce
RD
7248
7249 def IsRetained(*args, **kwargs):
15afbcd0 7250 """
a95a7133 7251 IsRetained(self) -> bool
15afbcd0
RD
7252
7253 Returns true if the window is retained, false otherwise. Retained
7254 windows are only available on X platforms.
7255 """
54f9ee45 7256 return _core_.Window_IsRetained(*args, **kwargs)
e811c8ce
RD
7257
7258 def SetExtraStyle(*args, **kwargs):
15afbcd0 7259 """
a95a7133 7260 SetExtraStyle(self, long exStyle)
15afbcd0
RD
7261
7262 Sets the extra style bits for the window. Extra styles are the less
7263 often used style bits which can't be set with the constructor or with
7264 SetWindowStyleFlag()
7265 """
54f9ee45 7266 return _core_.Window_SetExtraStyle(*args, **kwargs)
e811c8ce
RD
7267
7268 def GetExtraStyle(*args, **kwargs):
15afbcd0 7269 """
a95a7133 7270 GetExtraStyle(self) -> long
15afbcd0
RD
7271
7272 Returns the extra style bits for the window.
7273 """
54f9ee45 7274 return _core_.Window_GetExtraStyle(*args, **kwargs)
e811c8ce
RD
7275
7276 def MakeModal(*args, **kwargs):
15afbcd0 7277 """
a95a7133 7278 MakeModal(self, bool modal=True)
15afbcd0
RD
7279
7280 Disables all other windows in the application so that the user can
7281 only interact with this window. Passing False will reverse this
7282 effect.
7283 """
54f9ee45 7284 return _core_.Window_MakeModal(*args, **kwargs)
e811c8ce
RD
7285
7286 def SetThemeEnabled(*args, **kwargs):
15afbcd0 7287 """
a95a7133 7288 SetThemeEnabled(self, bool enableTheme)
15afbcd0
RD
7289
7290 This function tells a window if it should use the system's "theme"
7291 code to draw the windows' background instead if its own background
7292 drawing code. This will only have an effect on platforms that support
7293 the notion of themes in user defined windows. One such platform is
7294 GTK+ where windows can have (very colourful) backgrounds defined by a
7295 user's selected theme.
7296
7297 Dialogs, notebook pages and the status bar have this flag set to true
7298 by default so that the default look and feel is simulated best.
7299 """
54f9ee45 7300 return _core_.Window_SetThemeEnabled(*args, **kwargs)
e811c8ce
RD
7301
7302 def GetThemeEnabled(*args, **kwargs):
15afbcd0 7303 """
a95a7133 7304 GetThemeEnabled(self) -> bool
e811c8ce 7305
15afbcd0
RD
7306 Return the themeEnabled flag.
7307 """
54f9ee45 7308 return _core_.Window_GetThemeEnabled(*args, **kwargs)
e811c8ce
RD
7309
7310 def SetFocus(*args, **kwargs):
15afbcd0 7311 """
a95a7133 7312 SetFocus(self)
15afbcd0
RD
7313
7314 Set's the focus to this window, allowing it to receive keyboard input.
7315 """
54f9ee45 7316 return _core_.Window_SetFocus(*args, **kwargs)
e811c8ce
RD
7317
7318 def SetFocusFromKbd(*args, **kwargs):
15afbcd0 7319 """
a95a7133 7320 SetFocusFromKbd(self)
15afbcd0
RD
7321
7322 Set focus to this window as the result of a keyboard action. Normally
7323 only called internally.
7324 """
54f9ee45 7325 return _core_.Window_SetFocusFromKbd(*args, **kwargs)
e811c8ce
RD
7326
7327 def FindFocus(*args, **kwargs):
15afbcd0 7328 """
66c033b4 7329 FindFocus() -> Window
15afbcd0
RD
7330
7331 Returns the window or control that currently has the keyboard focus,
7332 or None.
7333 """
54f9ee45 7334 return _core_.Window_FindFocus(*args, **kwargs)
e811c8ce
RD
7335
7336 FindFocus = staticmethod(FindFocus)
7337 def AcceptsFocus(*args, **kwargs):
15afbcd0 7338 """
a95a7133 7339 AcceptsFocus(self) -> bool
15afbcd0
RD
7340
7341 Can this window have focus?
7342 """
54f9ee45 7343 return _core_.Window_AcceptsFocus(*args, **kwargs)
e811c8ce
RD
7344
7345 def AcceptsFocusFromKeyboard(*args, **kwargs):
15afbcd0 7346 """
a95a7133 7347 AcceptsFocusFromKeyboard(self) -> bool
15afbcd0
RD
7348
7349 Can this window be given focus by keyboard navigation? if not, the
7350 only way to give it focus (provided it accepts it at all) is to click
7351 it.
7352 """
54f9ee45 7353 return _core_.Window_AcceptsFocusFromKeyboard(*args, **kwargs)
e811c8ce
RD
7354
7355 def GetDefaultItem(*args, **kwargs):
15afbcd0 7356 """
a95a7133 7357 GetDefaultItem(self) -> Window
15afbcd0
RD
7358
7359 Get the default child of this parent, i.e. the one which is activated
7360 by pressing <Enter> such as the OK button on a wx.Dialog.
7361 """
54f9ee45 7362 return _core_.Window_GetDefaultItem(*args, **kwargs)
e811c8ce
RD
7363
7364 def SetDefaultItem(*args, **kwargs):
15afbcd0 7365 """
a95a7133 7366 SetDefaultItem(self, Window child) -> Window
15afbcd0
RD
7367
7368 Set this child as default, return the old default.
7369 """
54f9ee45 7370 return _core_.Window_SetDefaultItem(*args, **kwargs)
e811c8ce
RD
7371
7372 def SetTmpDefaultItem(*args, **kwargs):
15afbcd0 7373 """
a95a7133 7374 SetTmpDefaultItem(self, Window win)
15afbcd0
RD
7375
7376 Set this child as temporary default
7377 """
54f9ee45 7378 return _core_.Window_SetTmpDefaultItem(*args, **kwargs)
e811c8ce 7379
908b74cd
RD
7380 def Navigate(*args, **kwargs):
7381 """
7382 Navigate(self, int flags=NavigationKeyEvent.IsForward) -> bool
7383
fd2dc343
RD
7384 Does keyboard navigation from this window to another, by sending a
7385 `wx.NavigationKeyEvent`.
908b74cd
RD
7386 """
7387 return _core_.Window_Navigate(*args, **kwargs)
7388
7f98d120
RD
7389 def MoveAfterInTabOrder(*args, **kwargs):
7390 """
7391 MoveAfterInTabOrder(self, Window win)
7392
7393 Moves this window in the tab navigation order after the specified
7394 sibling window. This means that when the user presses the TAB key on
7395 that other window, the focus switches to this window.
7396
7397 The default tab order is the same as creation order. This function
7398 and `MoveBeforeInTabOrder` allow to change it after creating all the
7399 windows.
7400
7401 """
7402 return _core_.Window_MoveAfterInTabOrder(*args, **kwargs)
7403
7404 def MoveBeforeInTabOrder(*args, **kwargs):
7405 """
7406 MoveBeforeInTabOrder(self, Window win)
7407
7408 Same as `MoveAfterInTabOrder` except that it inserts this window just
7409 before win instead of putting it right after it.
7410 """
7411 return _core_.Window_MoveBeforeInTabOrder(*args, **kwargs)
7412
e811c8ce 7413 def GetChildren(*args, **kwargs):
15afbcd0 7414 """
a95a7133 7415 GetChildren(self) -> PyObject
15afbcd0
RD
7416
7417 Returns a list of the window's children. NOTE: Currently this is a
7418 copy of the child window list maintained by the window, so the return
7419 value of this function is only valid as long as the window's children
7420 do not change.
7421 """
54f9ee45 7422 return _core_.Window_GetChildren(*args, **kwargs)
e811c8ce
RD
7423
7424 def GetParent(*args, **kwargs):
15afbcd0 7425 """
a95a7133 7426 GetParent(self) -> Window
15afbcd0
RD
7427
7428 Returns the parent window of this window, or None if there isn't one.
7429 """
54f9ee45 7430 return _core_.Window_GetParent(*args, **kwargs)
e811c8ce
RD
7431
7432 def GetGrandParent(*args, **kwargs):
15afbcd0 7433 """
a95a7133 7434 GetGrandParent(self) -> Window
15afbcd0 7435
41e2b43e
RD
7436 Returns the parent of the parent of this window, or None if there
7437 isn't one.
15afbcd0 7438 """
54f9ee45 7439 return _core_.Window_GetGrandParent(*args, **kwargs)
e811c8ce
RD
7440
7441 def IsTopLevel(*args, **kwargs):
15afbcd0 7442 """
a95a7133 7443 IsTopLevel(self) -> bool
15afbcd0
RD
7444
7445 Returns true if the given window is a top-level one. Currently all
7446 frames and dialogs are always considered to be top-level windows (even
7447 if they have a parent window).
7448 """
54f9ee45 7449 return _core_.Window_IsTopLevel(*args, **kwargs)
e811c8ce
RD
7450
7451 def Reparent(*args, **kwargs):
15afbcd0 7452 """
a95a7133 7453 Reparent(self, Window newParent) -> bool
15afbcd0
RD
7454
7455 Reparents the window, i.e the window will be removed from its current
7456 parent window (e.g. a non-standard toolbar in a wxFrame) and then
7457 re-inserted into another. Available on Windows and GTK. Returns True
7458 if the parent was changed, False otherwise (error or newParent ==
7459 oldParent)
7460 """
54f9ee45 7461 return _core_.Window_Reparent(*args, **kwargs)
e811c8ce
RD
7462
7463 def AddChild(*args, **kwargs):
15afbcd0 7464 """
a95a7133 7465 AddChild(self, Window child)
15afbcd0
RD
7466
7467 Adds a child window. This is called automatically by window creation
7468 functions so should not be required by the application programmer.
7469 """
54f9ee45 7470 return _core_.Window_AddChild(*args, **kwargs)
e811c8ce
RD
7471
7472 def RemoveChild(*args, **kwargs):
15afbcd0 7473 """
a95a7133 7474 RemoveChild(self, Window child)
15afbcd0
RD
7475
7476 Removes a child window. This is called automatically by window
7477 deletion functions so should not be required by the application
7478 programmer.
7479 """
54f9ee45 7480 return _core_.Window_RemoveChild(*args, **kwargs)
e811c8ce
RD
7481
7482 def FindWindowById(*args, **kwargs):
15afbcd0 7483 """
a95a7133 7484 FindWindowById(self, long winid) -> Window
15afbcd0
RD
7485
7486 Find a chld of this window by window ID
7487 """
54f9ee45 7488 return _core_.Window_FindWindowById(*args, **kwargs)
e811c8ce
RD
7489
7490 def FindWindowByName(*args, **kwargs):
15afbcd0 7491 """
a95a7133 7492 FindWindowByName(self, String name) -> Window
15afbcd0
RD
7493
7494 Find a child of this window by name
7495 """
54f9ee45 7496 return _core_.Window_FindWindowByName(*args, **kwargs)
e811c8ce
RD
7497
7498 def GetEventHandler(*args, **kwargs):
15afbcd0 7499 """
a95a7133 7500 GetEventHandler(self) -> EvtHandler
15afbcd0
RD
7501
7502 Returns the event handler for this window. By default, the window is
7503 its own event handler.
7504 """
54f9ee45 7505 return _core_.Window_GetEventHandler(*args, **kwargs)
e811c8ce
RD
7506
7507 def SetEventHandler(*args, **kwargs):
15afbcd0 7508 """
a95a7133 7509 SetEventHandler(self, EvtHandler handler)
15afbcd0
RD
7510
7511 Sets the event handler for this window. An event handler is an object
7512 that is capable of processing the events sent to a window. By default,
7513 the window is its own event handler, but an application may wish to
7514 substitute another, for example to allow central implementation of
7515 event-handling for a variety of different window classes.
7516
41e2b43e 7517 It is usually better to use `wx.Window.PushEventHandler` since this sets
15afbcd0
RD
7518 up a chain of event handlers, where an event not handled by one event
7519 handler is handed to the next one in the chain.
7520 """
54f9ee45 7521 return _core_.Window_SetEventHandler(*args, **kwargs)
e811c8ce
RD
7522
7523 def PushEventHandler(*args, **kwargs):
15afbcd0 7524 """
a95a7133 7525 PushEventHandler(self, EvtHandler handler)
15afbcd0
RD
7526
7527 Pushes this event handler onto the event handler stack for the window.
7528 An event handler is an object that is capable of processing the events
7529 sent to a window. By default, the window is its own event handler, but
7530 an application may wish to substitute another, for example to allow
7531 central implementation of event-handling for a variety of different
7532 window classes.
7533
7534 wx.Window.PushEventHandler allows an application to set up a chain of
7535 event handlers, where an event not handled by one event handler is
41e2b43e 7536 handed to the next one in the chain. Use `wx.Window.PopEventHandler` to
15afbcd0
RD
7537 remove the event handler.
7538 """
54f9ee45 7539 return _core_.Window_PushEventHandler(*args, **kwargs)
e811c8ce
RD
7540
7541 def PopEventHandler(*args, **kwargs):
15afbcd0 7542 """
a95a7133 7543 PopEventHandler(self, bool deleteHandler=False) -> EvtHandler
15afbcd0
RD
7544
7545 Removes and returns the top-most event handler on the event handler
7546 stack. If deleteHandler is True then the wx.EvtHandler object will be
7547 destroyed after it is popped.
7548 """
54f9ee45 7549 return _core_.Window_PopEventHandler(*args, **kwargs)
e811c8ce
RD
7550
7551 def RemoveEventHandler(*args, **kwargs):
15afbcd0 7552 """
a95a7133 7553 RemoveEventHandler(self, EvtHandler handler) -> bool
15afbcd0 7554
41e2b43e
RD
7555 Find the given handler in the event handler chain and remove (but not
7556 delete) it from the event handler chain, return True if it was found
7557 and False otherwise (this also results in an assert failure so this
7558 function should only be called when the handler is supposed to be
7559 there.)
15afbcd0 7560 """
54f9ee45 7561 return _core_.Window_RemoveEventHandler(*args, **kwargs)
e811c8ce
RD
7562
7563 def SetValidator(*args, **kwargs):
15afbcd0 7564 """
a95a7133 7565 SetValidator(self, Validator validator)
15afbcd0
RD
7566
7567 Deletes the current validator (if any) and sets the window validator,
7568 having called wx.Validator.Clone to create a new validator of this
7569 type.
7570 """
54f9ee45 7571 return _core_.Window_SetValidator(*args, **kwargs)
e811c8ce
RD
7572
7573 def GetValidator(*args, **kwargs):
15afbcd0 7574 """
a95a7133 7575 GetValidator(self) -> Validator
15afbcd0
RD
7576
7577 Returns a pointer to the current validator for the window, or None if
7578 there is none.
7579 """
54f9ee45 7580 return _core_.Window_GetValidator(*args, **kwargs)
e811c8ce 7581
74a57fcd
RD
7582 def Validate(*args, **kwargs):
7583 """
a95a7133 7584 Validate(self) -> bool
74a57fcd
RD
7585
7586 Validates the current values of the child controls using their
41e2b43e
RD
7587 validators. If the window has wx.WS_EX_VALIDATE_RECURSIVELY extra
7588 style flag set, the method will also call Validate() of all child
7589 windows. Returns false if any of the validations failed.
74a57fcd 7590 """
54f9ee45 7591 return _core_.Window_Validate(*args, **kwargs)
74a57fcd
RD
7592
7593 def TransferDataToWindow(*args, **kwargs):
7594 """
a95a7133 7595 TransferDataToWindow(self) -> bool
74a57fcd 7596
41e2b43e
RD
7597 Transfers values to child controls from data areas specified by their
7598 validators. If the window has wx.WS_EX_VALIDATE_RECURSIVELY extra
7599 style flag set, the method will also call TransferDataToWindow() of
7600 all child windows.
74a57fcd 7601 """
54f9ee45 7602 return _core_.Window_TransferDataToWindow(*args, **kwargs)
74a57fcd
RD
7603
7604 def TransferDataFromWindow(*args, **kwargs):
7605 """
a95a7133 7606 TransferDataFromWindow(self) -> bool
74a57fcd 7607
41e2b43e
RD
7608 Transfers values from child controls to data areas specified by their
7609 validators. Returns false if a transfer failed. If the window has
7610 wx.WS_EX_VALIDATE_RECURSIVELY extra style flag set, the method will
7611 also call TransferDataFromWindow() of all child windows.
74a57fcd 7612 """
54f9ee45 7613 return _core_.Window_TransferDataFromWindow(*args, **kwargs)
74a57fcd
RD
7614
7615 def InitDialog(*args, **kwargs):
7616 """
a95a7133 7617 InitDialog(self)
74a57fcd 7618
41e2b43e
RD
7619 Sends an EVT_INIT_DIALOG event, whose handler usually transfers data
7620 to the dialog via validators.
74a57fcd 7621 """
54f9ee45 7622 return _core_.Window_InitDialog(*args, **kwargs)
74a57fcd 7623
e811c8ce 7624 def SetAcceleratorTable(*args, **kwargs):
15afbcd0 7625 """
a95a7133 7626 SetAcceleratorTable(self, AcceleratorTable accel)
15afbcd0
RD
7627
7628 Sets the accelerator table for this window.
7629 """
54f9ee45 7630 return _core_.Window_SetAcceleratorTable(*args, **kwargs)
e811c8ce
RD
7631
7632 def GetAcceleratorTable(*args, **kwargs):
15afbcd0 7633 """
a95a7133 7634 GetAcceleratorTable(self) -> AcceleratorTable
15afbcd0
RD
7635
7636 Gets the accelerator table for this window.
7637 """
54f9ee45 7638 return _core_.Window_GetAcceleratorTable(*args, **kwargs)
e811c8ce
RD
7639
7640 def RegisterHotKey(*args, **kwargs):
15afbcd0 7641 """
a95a7133 7642 RegisterHotKey(self, int hotkeyId, int modifiers, int keycode) -> bool
15afbcd0
RD
7643
7644 Registers a system wide hotkey. Every time the user presses the hotkey
7645 registered here, this window will receive a hotkey event. It will
7646 receive the event even if the application is in the background and
7647 does not have the input focus because the user is working with some
7648 other application. To bind an event handler function to this hotkey
7649 use EVT_HOTKEY with an id equal to hotkeyId. Returns True if the
7650 hotkey was registered successfully.
7651 """
54f9ee45 7652 return _core_.Window_RegisterHotKey(*args, **kwargs)
e811c8ce
RD
7653
7654 def UnregisterHotKey(*args, **kwargs):
15afbcd0 7655 """
a95a7133 7656 UnregisterHotKey(self, int hotkeyId) -> bool
15afbcd0
RD
7657
7658 Unregisters a system wide hotkey.
7659 """
54f9ee45 7660 return _core_.Window_UnregisterHotKey(*args, **kwargs)
e811c8ce
RD
7661
7662 def ConvertDialogPointToPixels(*args, **kwargs):
15afbcd0 7663 """
a95a7133 7664 ConvertDialogPointToPixels(self, Point pt) -> Point
15afbcd0
RD
7665
7666 Converts a point or size from dialog units to pixels. Dialog units
7667 are used for maintaining a dialog's proportions even if the font
7668 changes. For the x dimension, the dialog units are multiplied by the
7669 average character width and then divided by 4. For the y dimension,
7670 the dialog units are multiplied by the average character height and
7671 then divided by 8.
7672 """
54f9ee45 7673 return _core_.Window_ConvertDialogPointToPixels(*args, **kwargs)
e811c8ce
RD
7674
7675 def ConvertDialogSizeToPixels(*args, **kwargs):
15afbcd0 7676 """
a95a7133 7677 ConvertDialogSizeToPixels(self, Size sz) -> Size
15afbcd0
RD
7678
7679 Converts a point or size from dialog units to pixels. Dialog units
7680 are used for maintaining a dialog's proportions even if the font
7681 changes. For the x dimension, the dialog units are multiplied by the
7682 average character width and then divided by 4. For the y dimension,
7683 the dialog units are multiplied by the average character height and
7684 then divided by 8.
7685 """
54f9ee45 7686 return _core_.Window_ConvertDialogSizeToPixels(*args, **kwargs)
e811c8ce
RD
7687
7688 def DLG_PNT(*args, **kwargs):
15afbcd0 7689 """
a95a7133 7690 DLG_PNT(self, Point pt) -> Point
15afbcd0
RD
7691
7692 Converts a point or size from dialog units to pixels. Dialog units
7693 are used for maintaining a dialog's proportions even if the font
7694 changes. For the x dimension, the dialog units are multiplied by the
7695 average character width and then divided by 4. For the y dimension,
7696 the dialog units are multiplied by the average character height and
7697 then divided by 8.
7698 """
54f9ee45 7699 return _core_.Window_DLG_PNT(*args, **kwargs)
e811c8ce
RD
7700
7701 def DLG_SZE(*args, **kwargs):
15afbcd0 7702 """
a95a7133 7703 DLG_SZE(self, Size sz) -> Size
15afbcd0
RD
7704
7705 Converts a point or size from dialog units to pixels. Dialog units
7706 are used for maintaining a dialog's proportions even if the font
7707 changes. For the x dimension, the dialog units are multiplied by the
7708 average character width and then divided by 4. For the y dimension,
7709 the dialog units are multiplied by the average character height and
7710 then divided by 8.
7711 """
54f9ee45 7712 return _core_.Window_DLG_SZE(*args, **kwargs)
e811c8ce
RD
7713
7714 def ConvertPixelPointToDialog(*args, **kwargs):
a95a7133 7715 """ConvertPixelPointToDialog(self, Point pt) -> Point"""
54f9ee45 7716 return _core_.Window_ConvertPixelPointToDialog(*args, **kwargs)
e811c8ce
RD
7717
7718 def ConvertPixelSizeToDialog(*args, **kwargs):
a95a7133 7719 """ConvertPixelSizeToDialog(self, Size sz) -> Size"""
54f9ee45 7720 return _core_.Window_ConvertPixelSizeToDialog(*args, **kwargs)
e811c8ce
RD
7721
7722 def WarpPointer(*args, **kwargs):
15afbcd0 7723 """
a95a7133 7724 WarpPointer(self, int x, int y)
15afbcd0
RD
7725
7726 Moves the pointer to the given position on the window.
7727
7728 NOTE: This function is not supported under Mac because Apple Human
7729 Interface Guidelines forbid moving the mouse cursor programmatically.
7730 """
54f9ee45 7731 return _core_.Window_WarpPointer(*args, **kwargs)
e811c8ce
RD
7732
7733 def CaptureMouse(*args, **kwargs):
15afbcd0 7734 """
a95a7133 7735 CaptureMouse(self)
15afbcd0
RD
7736
7737 Directs all mouse input to this window. Call wx.Window.ReleaseMouse to
7738 release the capture.
7739
7740 Note that wxWindows maintains the stack of windows having captured the
7741 mouse and when the mouse is released the capture returns to the window
7742 which had had captured it previously and it is only really released if
7743 there were no previous window. In particular, this means that you must
7744 release the mouse as many times as you capture it.
7745 """
54f9ee45 7746 return _core_.Window_CaptureMouse(*args, **kwargs)
e811c8ce
RD
7747
7748 def ReleaseMouse(*args, **kwargs):
15afbcd0 7749 """
a95a7133 7750 ReleaseMouse(self)
15afbcd0
RD
7751
7752 Releases mouse input captured with wx.Window.CaptureMouse.
7753 """
54f9ee45 7754 return _core_.Window_ReleaseMouse(*args, **kwargs)
e811c8ce
RD
7755
7756 def GetCapture(*args, **kwargs):
15afbcd0 7757 """
66c033b4 7758 GetCapture() -> Window
15afbcd0
RD
7759
7760 Returns the window which currently captures the mouse or None
7761 """
54f9ee45 7762 return _core_.Window_GetCapture(*args, **kwargs)
e811c8ce
RD
7763
7764 GetCapture = staticmethod(GetCapture)
7765 def HasCapture(*args, **kwargs):
15afbcd0 7766 """
a95a7133 7767 HasCapture(self) -> bool
15afbcd0
RD
7768
7769 Returns true if this window has the current mouse capture.
7770 """
54f9ee45 7771 return _core_.Window_HasCapture(*args, **kwargs)
e811c8ce
RD
7772
7773 def Refresh(*args, **kwargs):
15afbcd0 7774 """
a95a7133 7775 Refresh(self, bool eraseBackground=True, Rect rect=None)
15afbcd0
RD
7776
7777 Mark the specified rectangle (or the whole window) as "dirty" so it
7778 will be repainted. Causes an EVT_PAINT event to be generated and sent
7779 to the window.
7780 """
54f9ee45 7781 return _core_.Window_Refresh(*args, **kwargs)
e811c8ce
RD
7782
7783 def RefreshRect(*args, **kwargs):
15afbcd0 7784 """
fef4c27a 7785 RefreshRect(self, Rect rect, bool eraseBackground=True)
15afbcd0
RD
7786
7787 Redraws the contents of the given rectangle: the area inside it will
7788 be repainted. This is the same as Refresh but has a nicer syntax.
7789 """
54f9ee45 7790 return _core_.Window_RefreshRect(*args, **kwargs)
e811c8ce
RD
7791
7792 def Update(*args, **kwargs):
15afbcd0 7793 """
a95a7133 7794 Update(self)
15afbcd0
RD
7795
7796 Calling this method immediately repaints the invalidated area of the
7797 window instead of waiting for the EVT_PAINT event to happen, (normally
7798 this would usually only happen when the flow of control returns to the
7799 event loop.) Notice that this function doesn't refresh the window and
7800 does nothing if the window has been already repainted. Use Refresh
7801 first if you want to immediately redraw the window (or some portion of
7802 it) unconditionally.
7803 """
54f9ee45 7804 return _core_.Window_Update(*args, **kwargs)
e811c8ce
RD
7805
7806 def ClearBackground(*args, **kwargs):
15afbcd0 7807 """
a95a7133 7808 ClearBackground(self)
15afbcd0
RD
7809
7810 Clears the window by filling it with the current background
7811 colour. Does not cause an erase background event to be generated.
7812 """
54f9ee45 7813 return _core_.Window_ClearBackground(*args, **kwargs)
e811c8ce
RD
7814
7815 def Freeze(*args, **kwargs):
15afbcd0 7816 """
a95a7133 7817 Freeze(self)
15afbcd0 7818
41e2b43e
RD
7819 Freezes the window or, in other words, prevents any updates from
7820 taking place on screen, the window is not redrawn at all. Thaw must be
7821 called to reenable window redrawing. Calls to Freeze/Thaw may be
7822 nested, with the actual Thaw being delayed until all the nesting has
7823 been undone.
15afbcd0
RD
7824
7825 This method is useful for visual appearance optimization (for example,
7826 it is a good idea to use it before inserting large amount of text into
7827 a wxTextCtrl under wxGTK) but is not implemented on all platforms nor
7828 for all controls so it is mostly just a hint to wxWindows and not a
7829 mandatory directive.
7830 """
54f9ee45 7831 return _core_.Window_Freeze(*args, **kwargs)
e811c8ce
RD
7832
7833 def Thaw(*args, **kwargs):
15afbcd0 7834 """
a95a7133 7835 Thaw(self)
15afbcd0 7836
4276dc52 7837 Reenables window updating after a previous call to Freeze. Calls to
41e2b43e
RD
7838 Freeze/Thaw may be nested, so Thaw must be called the same number of
7839 times that Freeze was before the window will be updated.
15afbcd0 7840 """
54f9ee45 7841 return _core_.Window_Thaw(*args, **kwargs)
e811c8ce
RD
7842
7843 def PrepareDC(*args, **kwargs):
15afbcd0 7844 """
a95a7133 7845 PrepareDC(self, DC dc)
15afbcd0
RD
7846
7847 Call this function to prepare the device context for drawing a
7848 scrolled image. It sets the device origin according to the current
7849 scroll position.
7850 """
54f9ee45 7851 return _core_.Window_PrepareDC(*args, **kwargs)
e811c8ce
RD
7852
7853 def GetUpdateRegion(*args, **kwargs):
15afbcd0 7854 """
a95a7133 7855 GetUpdateRegion(self) -> Region
15afbcd0
RD
7856
7857 Returns the region specifying which parts of the window have been
7858 damaged. Should only be called within an EVT_PAINT handler.
7859 """
54f9ee45 7860 return _core_.Window_GetUpdateRegion(*args, **kwargs)
e811c8ce
RD
7861
7862 def GetUpdateClientRect(*args, **kwargs):
15afbcd0 7863 """
a95a7133 7864 GetUpdateClientRect(self) -> Rect
15afbcd0
RD
7865
7866 Get the update rectangle region bounding box in client coords.
7867 """
54f9ee45 7868 return _core_.Window_GetUpdateClientRect(*args, **kwargs)
e811c8ce
RD
7869
7870 def IsExposed(*args, **kwargs):
15afbcd0 7871 """
a95a7133 7872 IsExposed(self, int x, int y, int w=1, int h=1) -> bool
15afbcd0
RD
7873
7874 Returns true if the given point or rectangle area has been exposed
7875 since the last repaint. Call this in an paint event handler to
7876 optimize redrawing by only redrawing those areas, which have been
7877 exposed.
7878 """
54f9ee45 7879 return _core_.Window_IsExposed(*args, **kwargs)
e811c8ce
RD
7880
7881 def IsExposedPoint(*args, **kwargs):
15afbcd0 7882 """
a95a7133 7883 IsExposedPoint(self, Point pt) -> bool
15afbcd0
RD
7884
7885 Returns true if the given point or rectangle area has been exposed
7886 since the last repaint. Call this in an paint event handler to
7887 optimize redrawing by only redrawing those areas, which have been
7888 exposed.
7889 """
54f9ee45 7890 return _core_.Window_IsExposedPoint(*args, **kwargs)
e811c8ce 7891
4276dc52 7892 def IsExposedRect(*args, **kwargs):
15afbcd0 7893 """
a95a7133 7894 IsExposedRect(self, Rect rect) -> bool
15afbcd0
RD
7895
7896 Returns true if the given point or rectangle area has been exposed
7897 since the last repaint. Call this in an paint event handler to
7898 optimize redrawing by only redrawing those areas, which have been
7899 exposed.
7900 """
54f9ee45 7901 return _core_.Window_IsExposedRect(*args, **kwargs)
e811c8ce 7902
74a57fcd
RD
7903 def GetDefaultAttributes(*args, **kwargs):
7904 """
a95a7133 7905 GetDefaultAttributes(self) -> VisualAttributes
74a57fcd 7906
41e2b43e
RD
7907 Get the default attributes for an instance of this class. This is
7908 useful if you want to use the same font or colour in your own control
7909 as in a standard control -- which is a much better idea than hard
7910 coding specific colours or fonts which might look completely out of
db3e571a 7911 place on the user's system, especially if it uses themes.
74a57fcd 7912 """
54f9ee45 7913 return _core_.Window_GetDefaultAttributes(*args, **kwargs)
74a57fcd
RD
7914
7915 def GetClassDefaultAttributes(*args, **kwargs):
7916 """
66c033b4 7917 GetClassDefaultAttributes(int variant=WINDOW_VARIANT_NORMAL) -> VisualAttributes
74a57fcd 7918
41e2b43e
RD
7919 Get the default attributes for this class. This is useful if you want
7920 to use the same font or colour in your own control as in a standard
7921 control -- which is a much better idea than hard coding specific
db3e571a
RD
7922 colours or fonts which might look completely out of place on the
7923 user's system, especially if it uses themes.
74a57fcd
RD
7924
7925 The variant parameter is only relevant under Mac currently and is
41e2b43e 7926 ignore under other platforms. Under Mac, it will change the size of
db3e571a
RD
7927 the returned font. See `wx.Window.SetWindowVariant` for more about
7928 this.
74a57fcd 7929 """
54f9ee45 7930 return _core_.Window_GetClassDefaultAttributes(*args, **kwargs)
74a57fcd
RD
7931
7932 GetClassDefaultAttributes = staticmethod(GetClassDefaultAttributes)
e811c8ce 7933 def SetBackgroundColour(*args, **kwargs):
15afbcd0 7934 """
a95a7133 7935 SetBackgroundColour(self, Colour colour) -> bool
15afbcd0
RD
7936
7937 Sets the background colour of the window. Returns True if the colour
7938 was changed. The background colour is usually painted by the default
7939 EVT_ERASE_BACKGROUND event handler function under Windows and
f8167d6e
RD
7940 automatically under GTK. Using `wx.NullColour` will reset the window
7941 to the default background colour.
15afbcd0 7942
db3e571a 7943 Note that setting the background colour may not cause an immediate
f8167d6e 7944 refresh, so you may wish to call `ClearBackground` or `Refresh` after
15afbcd0
RD
7945 calling this function.
7946
f8167d6e
RD
7947 Using this function will disable attempts to use themes for this
7948 window, if the system supports them. Use with care since usually the
7949 themes represent the appearance chosen by the user to be used for all
7950 applications on the system.
15afbcd0 7951 """
54f9ee45 7952 return _core_.Window_SetBackgroundColour(*args, **kwargs)
e811c8ce 7953
412d302d
RD
7954 def SetOwnBackgroundColour(*args, **kwargs):
7955 """SetOwnBackgroundColour(self, Colour colour)"""
7956 return _core_.Window_SetOwnBackgroundColour(*args, **kwargs)
b2df227b 7957
e811c8ce 7958 def SetForegroundColour(*args, **kwargs):
15afbcd0 7959 """
a95a7133 7960 SetForegroundColour(self, Colour colour) -> bool
15afbcd0
RD
7961
7962 Sets the foreground colour of the window. Returns True is the colour
7963 was changed. The interpretation of foreground colour is dependent on
7964 the window class; it may be the text colour or other colour, or it may
7965 not be used at all.
7966 """
54f9ee45 7967 return _core_.Window_SetForegroundColour(*args, **kwargs)
e811c8ce 7968
fa47d7a7
VS
7969 def SetOwnForegroundColour(*args, **kwargs):
7970 """SetOwnForegroundColour(self, Colour colour)"""
7971 return _core_.Window_SetOwnForegroundColour(*args, **kwargs)
b2df227b 7972
e811c8ce 7973 def GetBackgroundColour(*args, **kwargs):
15afbcd0 7974 """
a95a7133 7975 GetBackgroundColour(self) -> Colour
15afbcd0
RD
7976
7977 Returns the background colour of the window.
7978 """
54f9ee45 7979 return _core_.Window_GetBackgroundColour(*args, **kwargs)
e811c8ce
RD
7980
7981 def GetForegroundColour(*args, **kwargs):
15afbcd0 7982 """
a95a7133 7983 GetForegroundColour(self) -> Colour
15afbcd0
RD
7984
7985 Returns the foreground colour of the window. The interpretation of
7986 foreground colour is dependent on the window class; it may be the text
7987 colour or other colour, or it may not be used at all.
7988 """
54f9ee45 7989 return _core_.Window_GetForegroundColour(*args, **kwargs)
e811c8ce 7990
562ecc31
RD
7991 def InheritsBackgroundColour(*args, **kwargs):
7992 """InheritsBackgroundColour(self) -> bool"""
7993 return _core_.Window_InheritsBackgroundColour(*args, **kwargs)
7994
7995 def UseBgCol(*args, **kwargs):
7996 """UseBgCol(self) -> bool"""
7997 return _core_.Window_UseBgCol(*args, **kwargs)
7998
7bc1e663
RD
7999 def SetBackgroundStyle(*args, **kwargs):
8000 """
8001 SetBackgroundStyle(self, int style) -> bool
8002
8003 Returns the background style of the window. The background style
8004 indicates how the background of the window is drawn.
8005
8006 ====================== ========================================
8007 wx.BG_STYLE_SYSTEM The background colour or pattern should
8008 be determined by the system
8009 wx.BG_STYLE_COLOUR The background should be a solid colour
8010 wx.BG_STYLE_CUSTOM The background will be implemented by the
8011 application.
8012 ====================== ========================================
8013
8014 On GTK+, use of wx.BG_STYLE_CUSTOM allows the flicker-free drawing of
8015 a custom background, such as a tiled bitmap. Currently the style has
8016 no effect on other platforms.
8017
8018 :see: `GetBackgroundStyle`, `SetBackgroundColour`
8019 """
8020 return _core_.Window_SetBackgroundStyle(*args, **kwargs)
8021
8022 def GetBackgroundStyle(*args, **kwargs):
8023 """
8024 GetBackgroundStyle(self) -> int
8025
8026 Returns the background style of the window.
8027
8028 :see: `SetBackgroundStyle`
8029 """
8030 return _core_.Window_GetBackgroundStyle(*args, **kwargs)
8031
51b83b37
RD
8032 def HasTransparentBackground(*args, **kwargs):
8033 """
8034 HasTransparentBackground(self) -> bool
8035
8036 Returns True if this window's background is transparent (as, for
8037 example, for `wx.StaticText`) and should show the parent window's
8038 background.
8039
8040 This method is mostly used internally by the library itself and you
8041 normally shouldn't have to call it. You may, however, have to override
8042 it in your custom control classes to ensure that background is painted
8043 correctly.
8044 """
8045 return _core_.Window_HasTransparentBackground(*args, **kwargs)
8046
e811c8ce 8047 def SetCursor(*args, **kwargs):
15afbcd0 8048 """
a95a7133 8049 SetCursor(self, Cursor cursor) -> bool
15afbcd0
RD
8050
8051 Sets the window's cursor. Notice that the window cursor also sets it
8052 for the children of the window implicitly.
8053
8054 The cursor may be wx.NullCursor in which case the window cursor will
8055 be reset back to default.
8056 """
54f9ee45 8057 return _core_.Window_SetCursor(*args, **kwargs)
e811c8ce
RD
8058
8059 def GetCursor(*args, **kwargs):
15afbcd0 8060 """
a95a7133 8061 GetCursor(self) -> Cursor
15afbcd0
RD
8062
8063 Return the cursor associated with this window.
8064 """
54f9ee45 8065 return _core_.Window_GetCursor(*args, **kwargs)
e811c8ce
RD
8066
8067 def SetFont(*args, **kwargs):
15afbcd0 8068 """
a95a7133 8069 SetFont(self, Font font) -> bool
15afbcd0
RD
8070
8071 Sets the font for this window.
8072 """
54f9ee45 8073 return _core_.Window_SetFont(*args, **kwargs)
e811c8ce 8074
fa47d7a7
VS
8075 def SetOwnFont(*args, **kwargs):
8076 """SetOwnFont(self, Font font)"""
8077 return _core_.Window_SetOwnFont(*args, **kwargs)
b2df227b 8078
e811c8ce 8079 def GetFont(*args, **kwargs):
15afbcd0 8080 """
a95a7133 8081 GetFont(self) -> Font
15afbcd0 8082
4276dc52 8083 Returns the default font used for this window.
15afbcd0 8084 """
54f9ee45 8085 return _core_.Window_GetFont(*args, **kwargs)
e811c8ce
RD
8086
8087 def SetCaret(*args, **kwargs):
15afbcd0 8088 """
a95a7133 8089 SetCaret(self, Caret caret)
15afbcd0
RD
8090
8091 Sets the caret associated with the window.
8092 """
54f9ee45 8093 return _core_.Window_SetCaret(*args, **kwargs)
e811c8ce
RD
8094
8095 def GetCaret(*args, **kwargs):
15afbcd0 8096 """
a95a7133 8097 GetCaret(self) -> Caret
15afbcd0
RD
8098
8099 Returns the caret associated with the window.
8100 """
54f9ee45 8101 return _core_.Window_GetCaret(*args, **kwargs)
e811c8ce
RD
8102
8103 def GetCharHeight(*args, **kwargs):
15afbcd0 8104 """
a95a7133 8105 GetCharHeight(self) -> int
15afbcd0
RD
8106
8107 Get the (average) character size for the current font.
8108 """
54f9ee45 8109 return _core_.Window_GetCharHeight(*args, **kwargs)
e811c8ce
RD
8110
8111 def GetCharWidth(*args, **kwargs):
15afbcd0 8112 """
a95a7133 8113 GetCharWidth(self) -> int
15afbcd0
RD
8114
8115 Get the (average) character size for the current font.
8116 """
54f9ee45 8117 return _core_.Window_GetCharWidth(*args, **kwargs)
e811c8ce
RD
8118
8119 def GetTextExtent(*args, **kwargs):
fd2dc343
RD
8120 """
8121 GetTextExtent(String string) -> (width, height)
8122
8123 Get the width and height of the text using the current font.
8124 """
54f9ee45 8125 return _core_.Window_GetTextExtent(*args, **kwargs)
e811c8ce
RD
8126
8127 def GetFullTextExtent(*args, **kwargs):
0df68c9f 8128 """
196addbf 8129 GetFullTextExtent(String string, Font font=None) ->
0df68c9f 8130 (width, height, descent, externalLeading)
e811c8ce 8131
15afbcd0
RD
8132 Get the width, height, decent and leading of the text using the
8133 current or specified font.
0df68c9f 8134 """
54f9ee45 8135 return _core_.Window_GetFullTextExtent(*args, **kwargs)
e811c8ce
RD
8136
8137 def ClientToScreenXY(*args, **kwargs):
15afbcd0
RD
8138 """
8139 ClientToScreenXY(int x, int y) -> (x,y)
8140
8141 Converts to screen coordinates from coordinates relative to this window.
8142 """
54f9ee45 8143 return _core_.Window_ClientToScreenXY(*args, **kwargs)
e811c8ce
RD
8144
8145 def ScreenToClientXY(*args, **kwargs):
15afbcd0
RD
8146 """
8147 ScreenToClientXY(int x, int y) -> (x,y)
8148
8149 Converts from screen to client window coordinates.
8150 """
54f9ee45 8151 return _core_.Window_ScreenToClientXY(*args, **kwargs)
e811c8ce
RD
8152
8153 def ClientToScreen(*args, **kwargs):
15afbcd0 8154 """
a95a7133 8155 ClientToScreen(self, Point pt) -> Point
15afbcd0
RD
8156
8157 Converts to screen coordinates from coordinates relative to this window.
8158 """
54f9ee45 8159 return _core_.Window_ClientToScreen(*args, **kwargs)
e811c8ce
RD
8160
8161 def ScreenToClient(*args, **kwargs):
15afbcd0 8162 """
a95a7133 8163 ScreenToClient(self, Point pt) -> Point
15afbcd0
RD
8164
8165 Converts from screen to client window coordinates.
8166 """
54f9ee45 8167 return _core_.Window_ScreenToClient(*args, **kwargs)
e811c8ce
RD
8168
8169 def HitTestXY(*args, **kwargs):
15afbcd0 8170 """
a95a7133 8171 HitTestXY(self, int x, int y) -> int
15afbcd0
RD
8172
8173 Test where the given (in client coords) point lies
8174 """
54f9ee45 8175 return _core_.Window_HitTestXY(*args, **kwargs)
e811c8ce
RD
8176
8177 def HitTest(*args, **kwargs):
15afbcd0 8178 """
a95a7133 8179 HitTest(self, Point pt) -> int
15afbcd0
RD
8180
8181 Test where the given (in client coords) point lies
8182 """
54f9ee45 8183 return _core_.Window_HitTest(*args, **kwargs)
e811c8ce 8184
15afbcd0
RD
8185 def GetBorder(*args):
8186 """
a95a7133
RD
8187 GetBorder(self, long flags) -> int
8188 GetBorder(self) -> int
e811c8ce 8189
15afbcd0
RD
8190 Get border for the flags of this window
8191 """
54f9ee45 8192 return _core_.Window_GetBorder(*args)
e811c8ce
RD
8193
8194 def UpdateWindowUI(*args, **kwargs):
15afbcd0 8195 """
a95a7133 8196 UpdateWindowUI(self, long flags=UPDATE_UI_NONE)
15afbcd0
RD
8197
8198 This function sends EVT_UPDATE_UI events to the window. The particular
8199 implementation depends on the window; for example a wx.ToolBar will
8200 send an update UI event for each toolbar button, and a wx.Frame will
8201 send an update UI event for each menubar menu item. You can call this
8202 function from your application to ensure that your UI is up-to-date at
8203 a particular point in time (as far as your EVT_UPDATE_UI handlers are
8204 concerned). This may be necessary if you have called
8205 wx.UpdateUIEvent.SetMode or wx.UpdateUIEvent.SetUpdateInterval to
8206 limit the overhead that wxWindows incurs by sending update UI events
8207 in idle time.
15afbcd0 8208 """
54f9ee45 8209 return _core_.Window_UpdateWindowUI(*args, **kwargs)
e811c8ce
RD
8210
8211 def PopupMenuXY(*args, **kwargs):
15afbcd0 8212 """
b0503257 8213 PopupMenuXY(self, Menu menu, int x=-1, int y=-1) -> bool
15afbcd0 8214
b0503257
RD
8215 Pops up the given menu at the specified coordinates, relative to this window,
8216 and returns control when the user has dismissed the menu. If a menu item is
8217 selected, the corresponding menu event is generated and will be processed as
8218 usual. If the default position is given then the current position of the
8219 mouse cursor will be used.
15afbcd0 8220 """
54f9ee45 8221 return _core_.Window_PopupMenuXY(*args, **kwargs)
e811c8ce 8222
15afbcd0
RD
8223 def PopupMenu(*args, **kwargs):
8224 """
b0503257 8225 PopupMenu(self, Menu menu, Point pos=DefaultPosition) -> bool
15afbcd0 8226
b0503257
RD
8227 Pops up the given menu at the specified coordinates, relative to this window,
8228 and returns control when the user has dismissed the menu. If a menu item is
8229 selected, the corresponding menu event is generated and will be processed as
8230 usual. If the default position is given then the current position of the
8231 mouse cursor will be used.
15afbcd0 8232 """
54f9ee45 8233 return _core_.Window_PopupMenu(*args, **kwargs)
15afbcd0
RD
8234
8235 def GetHandle(*args, **kwargs):
8236 """
a95a7133 8237 GetHandle(self) -> long
15afbcd0
RD
8238
8239 Returns the platform-specific handle (as a long integer) of the
8240 physical window. Currently on wxMac it returns the handle of the
8241 toplevel parent of the window.
8242 """
54f9ee45 8243 return _core_.Window_GetHandle(*args, **kwargs)
15afbcd0 8244
7e63a440
RD
8245 def AssociateHandle(*args, **kwargs):
8246 """
8247 AssociateHandle(self, long handle)
8248
8249 Associate the window with a new native handle
8250 """
8251 return _core_.Window_AssociateHandle(*args, **kwargs)
8252
8253 def DissociateHandle(*args, **kwargs):
8254 """
8255 DissociateHandle(self)
8256
8257 Dissociate the current native handle from the window
8258 """
8259 return _core_.Window_DissociateHandle(*args, **kwargs)
8260
15afbcd0
RD
8261 def HasScrollbar(*args, **kwargs):
8262 """
a95a7133 8263 HasScrollbar(self, int orient) -> bool
15afbcd0
RD
8264
8265 Does the window have the scrollbar for this orientation?
8266 """
54f9ee45 8267 return _core_.Window_HasScrollbar(*args, **kwargs)
15afbcd0
RD
8268
8269 def SetScrollbar(*args, **kwargs):
8270 """
41e2b43e 8271 SetScrollbar(self, int orientation, int position, int thumbSize, int range,
15afbcd0
RD
8272 bool refresh=True)
8273
8274 Sets the scrollbar properties of a built-in scrollbar.
15afbcd0 8275 """
54f9ee45 8276 return _core_.Window_SetScrollbar(*args, **kwargs)
e811c8ce
RD
8277
8278 def SetScrollPos(*args, **kwargs):
15afbcd0 8279 """
a95a7133 8280 SetScrollPos(self, int orientation, int pos, bool refresh=True)
15afbcd0
RD
8281
8282 Sets the position of one of the built-in scrollbars.
8283 """
54f9ee45 8284 return _core_.Window_SetScrollPos(*args, **kwargs)
e811c8ce
RD
8285
8286 def GetScrollPos(*args, **kwargs):
15afbcd0 8287 """
a95a7133 8288 GetScrollPos(self, int orientation) -> int
15afbcd0
RD
8289
8290 Returns the built-in scrollbar position.
8291 """
54f9ee45 8292 return _core_.Window_GetScrollPos(*args, **kwargs)
e811c8ce
RD
8293
8294 def GetScrollThumb(*args, **kwargs):
15afbcd0 8295 """
a95a7133 8296 GetScrollThumb(self, int orientation) -> int
15afbcd0
RD
8297
8298 Returns the built-in scrollbar thumb size.
8299 """
54f9ee45 8300 return _core_.Window_GetScrollThumb(*args, **kwargs)
e811c8ce
RD
8301
8302 def GetScrollRange(*args, **kwargs):
15afbcd0 8303 """
a95a7133 8304 GetScrollRange(self, int orientation) -> int
15afbcd0
RD
8305
8306 Returns the built-in scrollbar range.
8307 """
54f9ee45 8308 return _core_.Window_GetScrollRange(*args, **kwargs)
e811c8ce
RD
8309
8310 def ScrollWindow(*args, **kwargs):
15afbcd0 8311 """
a95a7133 8312 ScrollWindow(self, int dx, int dy, Rect rect=None)
15afbcd0
RD
8313
8314 Physically scrolls the pixels in the window and move child windows
8315 accordingly. Use this function to optimise your scrolling
8316 implementations, to minimise the area that must be redrawn. Note that
8317 it is rarely required to call this function from a user program.
15afbcd0 8318 """
54f9ee45 8319 return _core_.Window_ScrollWindow(*args, **kwargs)
e811c8ce
RD
8320
8321 def ScrollLines(*args, **kwargs):
15afbcd0 8322 """
a95a7133 8323 ScrollLines(self, int lines) -> bool
15afbcd0
RD
8324
8325 If the platform and window class supports it, scrolls the window by
8326 the given number of lines down, if lines is positive, or up if lines
8327 is negative. Returns True if the window was scrolled, False if it was
8328 already on top/bottom and nothing was done.
8329 """
54f9ee45 8330 return _core_.Window_ScrollLines(*args, **kwargs)
e811c8ce
RD
8331
8332 def ScrollPages(*args, **kwargs):
15afbcd0 8333 """
a95a7133 8334 ScrollPages(self, int pages) -> bool
15afbcd0 8335
41e2b43e 8336 If the platform and window class supports it, scrolls the window by
15afbcd0
RD
8337 the given number of pages down, if pages is positive, or up if pages
8338 is negative. Returns True if the window was scrolled, False if it was
8339 already on top/bottom and nothing was done.
8340 """
54f9ee45 8341 return _core_.Window_ScrollPages(*args, **kwargs)
e811c8ce
RD
8342
8343 def LineUp(*args, **kwargs):
15afbcd0 8344 """
a95a7133 8345 LineUp(self) -> bool
15afbcd0
RD
8346
8347 This is just a wrapper for ScrollLines(-1).
8348 """
54f9ee45 8349 return _core_.Window_LineUp(*args, **kwargs)
e811c8ce
RD
8350
8351 def LineDown(*args, **kwargs):
15afbcd0 8352 """
a95a7133 8353 LineDown(self) -> bool
15afbcd0
RD
8354
8355 This is just a wrapper for ScrollLines(1).
8356 """
54f9ee45 8357 return _core_.Window_LineDown(*args, **kwargs)
e811c8ce
RD
8358
8359 def PageUp(*args, **kwargs):
15afbcd0 8360 """
a95a7133 8361 PageUp(self) -> bool
15afbcd0
RD
8362
8363 This is just a wrapper for ScrollPages(-1).
8364 """
54f9ee45 8365 return _core_.Window_PageUp(*args, **kwargs)
e811c8ce
RD
8366
8367 def PageDown(*args, **kwargs):
15afbcd0 8368 """
a95a7133 8369 PageDown(self) -> bool
15afbcd0
RD
8370
8371 This is just a wrapper for ScrollPages(1).
8372 """
54f9ee45 8373 return _core_.Window_PageDown(*args, **kwargs)
e811c8ce
RD
8374
8375 def SetHelpText(*args, **kwargs):
15afbcd0 8376 """
a95a7133 8377 SetHelpText(self, String text)
15afbcd0
RD
8378
8379 Sets the help text to be used as context-sensitive help for this
8380 window. Note that the text is actually stored by the current
8381 wxHelpProvider implementation, and not in the window object itself.
8382 """
54f9ee45 8383 return _core_.Window_SetHelpText(*args, **kwargs)
e811c8ce
RD
8384
8385 def SetHelpTextForId(*args, **kwargs):
15afbcd0 8386 """
a95a7133 8387 SetHelpTextForId(self, String text)
15afbcd0
RD
8388
8389 Associate this help text with all windows with the same id as this
8390 one.
8391 """
54f9ee45 8392 return _core_.Window_SetHelpTextForId(*args, **kwargs)
e811c8ce
RD
8393
8394 def GetHelpText(*args, **kwargs):
15afbcd0 8395 """
a95a7133 8396 GetHelpText(self) -> String
15afbcd0
RD
8397
8398 Gets the help text to be used as context-sensitive help for this
8399 window. Note that the text is actually stored by the current
8400 wxHelpProvider implementation, and not in the window object itself.
8401 """
54f9ee45 8402 return _core_.Window_GetHelpText(*args, **kwargs)
e811c8ce
RD
8403
8404 def SetToolTipString(*args, **kwargs):
15afbcd0 8405 """
a95a7133 8406 SetToolTipString(self, String tip)
15afbcd0
RD
8407
8408 Attach a tooltip to the window.
8409 """
54f9ee45 8410 return _core_.Window_SetToolTipString(*args, **kwargs)
e811c8ce
RD
8411
8412 def SetToolTip(*args, **kwargs):
15afbcd0 8413 """
a95a7133 8414 SetToolTip(self, ToolTip tip)
15afbcd0
RD
8415
8416 Attach a tooltip to the window.
8417 """
54f9ee45 8418 return _core_.Window_SetToolTip(*args, **kwargs)
e811c8ce
RD
8419
8420 def GetToolTip(*args, **kwargs):
15afbcd0 8421 """
a95a7133 8422 GetToolTip(self) -> ToolTip
15afbcd0
RD
8423
8424 get the associated tooltip or None if none
8425 """
54f9ee45 8426 return _core_.Window_GetToolTip(*args, **kwargs)
e811c8ce
RD
8427
8428 def SetDropTarget(*args, **kwargs):
15afbcd0 8429 """
a95a7133 8430 SetDropTarget(self, DropTarget dropTarget)
15afbcd0
RD
8431
8432 Associates a drop target with this window. If the window already has
8433 a drop target, it is deleted.
8434 """
54f9ee45 8435 return _core_.Window_SetDropTarget(*args, **kwargs)
e811c8ce
RD
8436
8437 def GetDropTarget(*args, **kwargs):
15afbcd0 8438 """
a95a7133 8439 GetDropTarget(self) -> DropTarget
15afbcd0
RD
8440
8441 Returns the associated drop target, which may be None.
8442 """
54f9ee45 8443 return _core_.Window_GetDropTarget(*args, **kwargs)
e811c8ce
RD
8444
8445 def SetConstraints(*args, **kwargs):
15afbcd0 8446 """
a95a7133 8447 SetConstraints(self, LayoutConstraints constraints)
15afbcd0
RD
8448
8449 Sets the window to have the given layout constraints. If an existing
8450 layout constraints object is already owned by the window, it will be
8451 deleted. Pass None to disassociate and delete the window's current
8452 constraints.
8453
8454 You must call SetAutoLayout to tell a window to use the constraints
8455 automatically in its default EVT_SIZE handler; otherwise, you must
8456 handle EVT_SIZE yourself and call Layout() explicitly. When setting
8457 both a wx.LayoutConstraints and a wx.Sizer, only the sizer will have
8458 effect.
8459 """
54f9ee45 8460 return _core_.Window_SetConstraints(*args, **kwargs)
e811c8ce
RD
8461
8462 def GetConstraints(*args, **kwargs):
15afbcd0 8463 """
a95a7133 8464 GetConstraints(self) -> LayoutConstraints
15afbcd0
RD
8465
8466 Returns a pointer to the window's layout constraints, or None if there
8467 are none.
8468 """
54f9ee45 8469 return _core_.Window_GetConstraints(*args, **kwargs)
e811c8ce
RD
8470
8471 def SetAutoLayout(*args, **kwargs):
15afbcd0 8472 """
a95a7133 8473 SetAutoLayout(self, bool autoLayout)
15afbcd0
RD
8474
8475 Determines whether the Layout function will be called automatically
8476 when the window is resized. It is called implicitly by SetSizer but
8477 if you use SetConstraints you should call it manually or otherwise the
8478 window layout won't be correctly updated when its size changes.
8479 """
54f9ee45 8480 return _core_.Window_SetAutoLayout(*args, **kwargs)
e811c8ce
RD
8481
8482 def GetAutoLayout(*args, **kwargs):
15afbcd0 8483 """
a95a7133 8484 GetAutoLayout(self) -> bool
15afbcd0
RD
8485
8486 Returns the current autoLayout setting
8487 """
54f9ee45 8488 return _core_.Window_GetAutoLayout(*args, **kwargs)
e811c8ce
RD
8489
8490 def Layout(*args, **kwargs):
15afbcd0 8491 """
a95a7133 8492 Layout(self) -> bool
15afbcd0
RD
8493
8494 Invokes the constraint-based layout algorithm or the sizer-based
8495 algorithm for this window. See SetAutoLayout: when auto layout is on,
8496 this function gets called automatically by the default EVT_SIZE
8497 handler when the window is resized.
8498 """
54f9ee45 8499 return _core_.Window_Layout(*args, **kwargs)
e811c8ce
RD
8500
8501 def SetSizer(*args, **kwargs):
15afbcd0 8502 """
a95a7133 8503 SetSizer(self, Sizer sizer, bool deleteOld=True)
15afbcd0
RD
8504
8505 Sets the window to have the given layout sizer. The window will then
8506 own the object, and will take care of its deletion. If an existing
8507 layout sizer object is already owned by the window, it will be deleted
8508 if the deleteOld parameter is true. Note that this function will also
8509 call SetAutoLayout implicitly with a True parameter if the sizer is
ae8162c8 8510 non-None, and False otherwise.
15afbcd0 8511 """
54f9ee45 8512 return _core_.Window_SetSizer(*args, **kwargs)
e811c8ce
RD
8513
8514 def SetSizerAndFit(*args, **kwargs):
15afbcd0 8515 """
a95a7133 8516 SetSizerAndFit(self, Sizer sizer, bool deleteOld=True)
15afbcd0
RD
8517
8518 The same as SetSizer, except it also sets the size hints for the
8519 window based on the sizer's minimum size.
8520 """
54f9ee45 8521 return _core_.Window_SetSizerAndFit(*args, **kwargs)
e811c8ce
RD
8522
8523 def GetSizer(*args, **kwargs):
15afbcd0 8524 """
a95a7133 8525 GetSizer(self) -> Sizer
15afbcd0
RD
8526
8527 Return the sizer associated with the window by a previous call to
8528 SetSizer or None if there isn't one.
8529 """
54f9ee45 8530 return _core_.Window_GetSizer(*args, **kwargs)
e811c8ce
RD
8531
8532 def SetContainingSizer(*args, **kwargs):
15afbcd0 8533 """
a95a7133 8534 SetContainingSizer(self, Sizer sizer)
15afbcd0
RD
8535
8536 This normally does not need to be called by application code. It is
8537 called internally when a window is added to a sizer, and is used so
8538 the window can remove itself from the sizer when it is destroyed.
8539 """
54f9ee45 8540 return _core_.Window_SetContainingSizer(*args, **kwargs)
e811c8ce
RD
8541
8542 def GetContainingSizer(*args, **kwargs):
15afbcd0 8543 """
a95a7133 8544 GetContainingSizer(self) -> Sizer
15afbcd0
RD
8545
8546 Return the sizer that this window is a member of, if any, otherwise None.
8547 """
54f9ee45 8548 return _core_.Window_GetContainingSizer(*args, **kwargs)
e811c8ce 8549
a95a7133
RD
8550 def InheritAttributes(*args, **kwargs):
8551 """
8552 InheritAttributes(self)
8553
41e2b43e
RD
8554 This function is (or should be, in case of custom controls) called
8555 during window creation to intelligently set up the window visual
8556 attributes, that is the font and the foreground and background
8557 colours.
8558
8559 By 'intelligently' the following is meant: by default, all windows use
8560 their own default attributes. However if some of the parent's
8561 attributes are explicitly changed (that is, using SetFont and not
fa47d7a7 8562 SetOwnFont) and if the corresponding attribute hadn't been
41e2b43e
RD
8563 explicitly set for this window itself, then this window takes the same
8564 value as used by the parent. In addition, if the window overrides
8565 ShouldInheritColours to return false, the colours will not be changed
8566 no matter what and only the font might.
8567
34621cc5 8568 This rather complicated logic is necessary in order to accommodate the
ec9b55ca 8569 different usage scenarios. The most common one is when all default
41e2b43e
RD
8570 attributes are used and in this case, nothing should be inherited as
8571 in modern GUIs different controls use different fonts (and colours)
8572 than their siblings so they can't inherit the same value from the
8573 parent. However it was also deemed desirable to allow to simply change
8574 the attributes of all children at once by just changing the font or
8575 colour of their common parent, hence in this case we do inherit the
8576 parents attributes.
8577
a95a7133 8578 """
54f9ee45 8579 return _core_.Window_InheritAttributes(*args, **kwargs)
a95a7133
RD
8580
8581 def ShouldInheritColours(*args, **kwargs):
8582 """
8583 ShouldInheritColours(self) -> bool
8584
8585 Return true from here to allow the colours of this window to be
41e2b43e
RD
8586 changed by InheritAttributes, returning false forbids inheriting them
8587 from the parent window.
a95a7133 8588
41e2b43e
RD
8589 The base class version returns false, but this method is overridden in
8590 wxControl where it returns true.
a95a7133 8591 """
54f9ee45 8592 return _core_.Window_ShouldInheritColours(*args, **kwargs)
a95a7133 8593
e811c8ce 8594 def PostCreate(self, pre):
15afbcd0
RD
8595 """
8596 Phase 3 of the 2-phase create <wink!>
8597 Call this method after precreating the window with the 2-phase create method.
8598 """
e811c8ce
RD
8599 self.this = pre.this
8600 self.thisown = pre.thisown
8601 pre.thisown = 0
8602 if hasattr(self, '_setOORInfo'):
8603 self._setOORInfo(self)
8604 if hasattr(self, '_setCallbackInfo'):
8605 self._setCallbackInfo(self, self.__class__)
8606
8607
8608class WindowPtr(Window):
8609 def __init__(self, this):
8610 self.this = this
8611 if not hasattr(self,"thisown"): self.thisown = 0
8612 self.__class__ = Window
54f9ee45 8613_core_.Window_swigregister(WindowPtr)
e811c8ce
RD
8614
8615def PreWindow(*args, **kwargs):
15afbcd0
RD
8616 """
8617 PreWindow() -> Window
8618
8619 Precreate a Window for 2-phase creation.
8620 """
54f9ee45 8621 val = _core_.new_PreWindow(*args, **kwargs)
e811c8ce
RD
8622 val.thisown = 1
8623 return val
8624
8625def Window_NewControlId(*args, **kwargs):
15afbcd0
RD
8626 """
8627 Window_NewControlId() -> int
8628
8629 Generate a control id for the controls which were not given one.
8630 """
54f9ee45 8631 return _core_.Window_NewControlId(*args, **kwargs)
e811c8ce
RD
8632
8633def Window_NextControlId(*args, **kwargs):
15afbcd0
RD
8634 """
8635 Window_NextControlId(int winid) -> int
8636
8637 Get the id of the control following the one with the given
41e2b43e 8638 autogenerated) id
15afbcd0 8639 """
54f9ee45 8640 return _core_.Window_NextControlId(*args, **kwargs)
e811c8ce
RD
8641
8642def Window_PrevControlId(*args, **kwargs):
15afbcd0
RD
8643 """
8644 Window_PrevControlId(int winid) -> int
8645
8646 Get the id of the control preceding the one with the given
41e2b43e 8647 autogenerated) id
15afbcd0 8648 """
54f9ee45 8649 return _core_.Window_PrevControlId(*args, **kwargs)
e811c8ce
RD
8650
8651def Window_FindFocus(*args, **kwargs):
15afbcd0
RD
8652 """
8653 Window_FindFocus() -> Window
8654
8655 Returns the window or control that currently has the keyboard focus,
8656 or None.
8657 """
54f9ee45 8658 return _core_.Window_FindFocus(*args, **kwargs)
e811c8ce
RD
8659
8660def Window_GetCapture(*args, **kwargs):
15afbcd0
RD
8661 """
8662 Window_GetCapture() -> Window
8663
8664 Returns the window which currently captures the mouse or None
8665 """
54f9ee45 8666 return _core_.Window_GetCapture(*args, **kwargs)
e811c8ce 8667
74a57fcd
RD
8668def Window_GetClassDefaultAttributes(*args, **kwargs):
8669 """
8670 Window_GetClassDefaultAttributes(int variant=WINDOW_VARIANT_NORMAL) -> VisualAttributes
8671
41e2b43e
RD
8672 Get the default attributes for this class. This is useful if you want
8673 to use the same font or colour in your own control as in a standard
8674 control -- which is a much better idea than hard coding specific
db3e571a
RD
8675 colours or fonts which might look completely out of place on the
8676 user's system, especially if it uses themes.
74a57fcd
RD
8677
8678 The variant parameter is only relevant under Mac currently and is
41e2b43e 8679 ignore under other platforms. Under Mac, it will change the size of
db3e571a
RD
8680 the returned font. See `wx.Window.SetWindowVariant` for more about
8681 this.
74a57fcd 8682 """
54f9ee45 8683 return _core_.Window_GetClassDefaultAttributes(*args, **kwargs)
74a57fcd 8684
e811c8ce 8685def DLG_PNT(win, point_or_x, y=None):
15afbcd0
RD
8686 """
8687 Convenience function for converting a Point or (x,y) in
8688 dialog units to pixel units.
8689 """
e811c8ce
RD
8690 if y is None:
8691 return win.ConvertDialogPointToPixels(point_or_x)
8692 else:
fd3f2efe 8693 return win.ConvertDialogPointToPixels(wx.Point(point_or_x, y))
e811c8ce
RD
8694
8695def DLG_SZE(win, size_width, height=None):
15afbcd0
RD
8696 """
8697 Convenience function for converting a Size or (w,h) in
8698 dialog units to pixel units.
8699 """
e811c8ce
RD
8700 if height is None:
8701 return win.ConvertDialogSizeToPixels(size_width)
8702 else:
fd3f2efe 8703 return win.ConvertDialogSizeToPixels(wx.Size(size_width, height))
e811c8ce
RD
8704
8705
8706def FindWindowById(*args, **kwargs):
15afbcd0
RD
8707 """
8708 FindWindowById(long id, Window parent=None) -> Window
8709
8710 Find the first window in the application with the given id. If parent
8711 is None, the search will start from all top-level frames and dialog
8712 boxes; if non-None, the search will be limited to the given window
8713 hierarchy. The search is recursive in both cases.
8714 """
54f9ee45 8715 return _core_.FindWindowById(*args, **kwargs)
e811c8ce
RD
8716
8717def FindWindowByName(*args, **kwargs):
15afbcd0
RD
8718 """
8719 FindWindowByName(String name, Window parent=None) -> Window
8720
8721 Find a window by its name (as given in a window constructor or Create
8722 function call). If parent is None, the search will start from all
8723 top-level frames and dialog boxes; if non-None, the search will be
8724 limited to the given window hierarchy. The search is recursive in both
8725 cases.
8726
8727 If no window with such name is found, wx.FindWindowByLabel is called.
8728 """
54f9ee45 8729 return _core_.FindWindowByName(*args, **kwargs)
e811c8ce
RD
8730
8731def FindWindowByLabel(*args, **kwargs):
15afbcd0
RD
8732 """
8733 FindWindowByLabel(String label, Window parent=None) -> Window
8734
8735 Find a window by its label. Depending on the type of window, the label
8736 may be a window title or panel item label. If parent is None, the
8737 search will start from all top-level frames and dialog boxes; if
8738 non-None, the search will be limited to the given window
8739 hierarchy. The search is recursive in both cases.
8740 """
54f9ee45 8741 return _core_.FindWindowByLabel(*args, **kwargs)
e811c8ce
RD
8742
8743def Window_FromHWND(*args, **kwargs):
4276dc52 8744 """Window_FromHWND(Window parent, unsigned long _hWnd) -> Window"""
54f9ee45 8745 return _core_.Window_FromHWND(*args, **kwargs)
b6b0383e
RD
8746
8747def GetTopLevelWindows(*args, **kwargs):
8748 """
8749 GetTopLevelWindows() -> PyObject
8750
8751 Returns a list of the the application's top-level windows, (frames,
8752 dialogs, etc.) NOTE: Currently this is a copy of the list maintained
8753 by wxWidgets, and so it is only valid as long as no top-level windows
8754 are closed or new top-level windows are created.
8755
8756 """
8757 return _core_.GetTopLevelWindows(*args, **kwargs)
e811c8ce
RD
8758#---------------------------------------------------------------------------
8759
8760class Validator(EvtHandler):
093d3ff1 8761 """Proxy of C++ Validator class"""
e811c8ce
RD
8762 def __repr__(self):
8763 return "<%s.%s; proxy of C++ wxValidator instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
8764 def __init__(self, *args, **kwargs):
a95a7133 8765 """__init__(self) -> Validator"""
54f9ee45 8766 newobj = _core_.new_Validator(*args, **kwargs)
d14a1e28
RD
8767 self.this = newobj.this
8768 self.thisown = 1
8769 del newobj.thisown
8770 self._setOORInfo(self)
e811c8ce
RD
8771
8772 def Clone(*args, **kwargs):
a95a7133 8773 """Clone(self) -> Validator"""
54f9ee45 8774 return _core_.Validator_Clone(*args, **kwargs)
e811c8ce
RD
8775
8776 def Validate(*args, **kwargs):
a95a7133 8777 """Validate(self, Window parent) -> bool"""
54f9ee45 8778 return _core_.Validator_Validate(*args, **kwargs)
e811c8ce
RD
8779
8780 def TransferToWindow(*args, **kwargs):
a95a7133 8781 """TransferToWindow(self) -> bool"""
54f9ee45 8782 return _core_.Validator_TransferToWindow(*args, **kwargs)
e811c8ce
RD
8783
8784 def TransferFromWindow(*args, **kwargs):
a95a7133 8785 """TransferFromWindow(self) -> bool"""
54f9ee45 8786 return _core_.Validator_TransferFromWindow(*args, **kwargs)
e811c8ce
RD
8787
8788 def GetWindow(*args, **kwargs):
a95a7133 8789 """GetWindow(self) -> Window"""
54f9ee45 8790 return _core_.Validator_GetWindow(*args, **kwargs)
e811c8ce
RD
8791
8792 def SetWindow(*args, **kwargs):
a95a7133 8793 """SetWindow(self, Window window)"""
54f9ee45 8794 return _core_.Validator_SetWindow(*args, **kwargs)
e811c8ce
RD
8795
8796 def IsSilent(*args, **kwargs):
66c033b4 8797 """IsSilent() -> bool"""
54f9ee45 8798 return _core_.Validator_IsSilent(*args, **kwargs)
e811c8ce
RD
8799
8800 IsSilent = staticmethod(IsSilent)
8801 def SetBellOnError(*args, **kwargs):
66c033b4 8802 """SetBellOnError(int doIt=True)"""
54f9ee45 8803 return _core_.Validator_SetBellOnError(*args, **kwargs)
e811c8ce
RD
8804
8805 SetBellOnError = staticmethod(SetBellOnError)
8806
8807class ValidatorPtr(Validator):
8808 def __init__(self, this):
8809 self.this = this
8810 if not hasattr(self,"thisown"): self.thisown = 0
8811 self.__class__ = Validator
54f9ee45 8812_core_.Validator_swigregister(ValidatorPtr)
e811c8ce
RD
8813
8814def Validator_IsSilent(*args, **kwargs):
8815 """Validator_IsSilent() -> bool"""
54f9ee45 8816 return _core_.Validator_IsSilent(*args, **kwargs)
e811c8ce
RD
8817
8818def Validator_SetBellOnError(*args, **kwargs):
8819 """Validator_SetBellOnError(int doIt=True)"""
54f9ee45 8820 return _core_.Validator_SetBellOnError(*args, **kwargs)
e811c8ce
RD
8821
8822class PyValidator(Validator):
093d3ff1 8823 """Proxy of C++ PyValidator class"""
e811c8ce
RD
8824 def __repr__(self):
8825 return "<%s.%s; proxy of C++ wxPyValidator instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
8826 def __init__(self, *args, **kwargs):
a95a7133 8827 """__init__(self) -> PyValidator"""
54f9ee45 8828 newobj = _core_.new_PyValidator(*args, **kwargs)
e811c8ce
RD
8829 self.this = newobj.this
8830 self.thisown = 1
8831 del newobj.thisown
8832
8833 self._setCallbackInfo(self, PyValidator, 1)
8834 self._setOORInfo(self)
8835
8836 def _setCallbackInfo(*args, **kwargs):
a95a7133 8837 """_setCallbackInfo(self, PyObject self, PyObject _class, int incref=True)"""
54f9ee45 8838 return _core_.PyValidator__setCallbackInfo(*args, **kwargs)
e811c8ce
RD
8839
8840
8841class PyValidatorPtr(PyValidator):
8842 def __init__(self, this):
8843 self.this = this
8844 if not hasattr(self,"thisown"): self.thisown = 0
8845 self.__class__ = PyValidator
54f9ee45 8846_core_.PyValidator_swigregister(PyValidatorPtr)
e811c8ce
RD
8847
8848#---------------------------------------------------------------------------
8849
8850class Menu(EvtHandler):
093d3ff1 8851 """Proxy of C++ Menu class"""
d14a1e28
RD
8852 def __repr__(self):
8853 return "<%s.%s; proxy of C++ wxMenu instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
e811c8ce 8854 def __init__(self, *args, **kwargs):
a95a7133 8855 """__init__(self, String title=EmptyString, long style=0) -> Menu"""
54f9ee45 8856 newobj = _core_.new_Menu(*args, **kwargs)
e811c8ce
RD
8857 self.this = newobj.this
8858 self.thisown = 1
8859 del newobj.thisown
8860 self._setOORInfo(self)
8861
8862 def Append(*args, **kwargs):
a95a7133 8863 """Append(self, int id, String text, String help=EmptyString, int kind=ITEM_NORMAL) -> MenuItem"""
54f9ee45 8864 return _core_.Menu_Append(*args, **kwargs)
e811c8ce
RD
8865
8866 def AppendSeparator(*args, **kwargs):
a95a7133 8867 """AppendSeparator(self) -> MenuItem"""
54f9ee45 8868 return _core_.Menu_AppendSeparator(*args, **kwargs)
e811c8ce
RD
8869
8870 def AppendCheckItem(*args, **kwargs):
a95a7133 8871 """AppendCheckItem(self, int id, String text, String help=EmptyString) -> MenuItem"""
54f9ee45 8872 return _core_.Menu_AppendCheckItem(*args, **kwargs)
e811c8ce
RD
8873
8874 def AppendRadioItem(*args, **kwargs):
a95a7133 8875 """AppendRadioItem(self, int id, String text, String help=EmptyString) -> MenuItem"""
54f9ee45 8876 return _core_.Menu_AppendRadioItem(*args, **kwargs)
e811c8ce
RD
8877
8878 def AppendMenu(*args, **kwargs):
a95a7133 8879 """AppendMenu(self, int id, String text, Menu submenu, String help=EmptyString) -> MenuItem"""
54f9ee45 8880 return _core_.Menu_AppendMenu(*args, **kwargs)
e811c8ce
RD
8881
8882 def AppendItem(*args, **kwargs):
a95a7133 8883 """AppendItem(self, MenuItem item) -> MenuItem"""
54f9ee45 8884 return _core_.Menu_AppendItem(*args, **kwargs)
e811c8ce
RD
8885
8886 def Break(*args, **kwargs):
a95a7133 8887 """Break(self)"""
54f9ee45 8888 return _core_.Menu_Break(*args, **kwargs)
e811c8ce
RD
8889
8890 def InsertItem(*args, **kwargs):
a95a7133 8891 """InsertItem(self, size_t pos, MenuItem item) -> MenuItem"""
54f9ee45 8892 return _core_.Menu_InsertItem(*args, **kwargs)
e811c8ce
RD
8893
8894 def Insert(*args, **kwargs):
0df68c9f 8895 """
a95a7133 8896 Insert(self, size_t pos, int id, String text, String help=EmptyString,
a41e16b6 8897 int kind=ITEM_NORMAL) -> MenuItem
0df68c9f 8898 """
54f9ee45 8899 return _core_.Menu_Insert(*args, **kwargs)
e811c8ce
RD
8900
8901 def InsertSeparator(*args, **kwargs):
a95a7133 8902 """InsertSeparator(self, size_t pos) -> MenuItem"""
54f9ee45 8903 return _core_.Menu_InsertSeparator(*args, **kwargs)
e811c8ce
RD
8904
8905 def InsertCheckItem(*args, **kwargs):
a95a7133 8906 """InsertCheckItem(self, size_t pos, int id, String text, String help=EmptyString) -> MenuItem"""
54f9ee45 8907 return _core_.Menu_InsertCheckItem(*args, **kwargs)
e811c8ce
RD
8908
8909 def InsertRadioItem(*args, **kwargs):
a95a7133 8910 """InsertRadioItem(self, size_t pos, int id, String text, String help=EmptyString) -> MenuItem"""
54f9ee45 8911 return _core_.Menu_InsertRadioItem(*args, **kwargs)
e811c8ce
RD
8912
8913 def InsertMenu(*args, **kwargs):
a95a7133 8914 """InsertMenu(self, size_t pos, int id, String text, Menu submenu, String help=EmptyString) -> MenuItem"""
54f9ee45 8915 return _core_.Menu_InsertMenu(*args, **kwargs)
e811c8ce
RD
8916
8917 def PrependItem(*args, **kwargs):
a95a7133 8918 """PrependItem(self, MenuItem item) -> MenuItem"""
54f9ee45 8919 return _core_.Menu_PrependItem(*args, **kwargs)
e811c8ce
RD
8920
8921 def Prepend(*args, **kwargs):
a95a7133 8922 """Prepend(self, int id, String text, String help=EmptyString, int kind=ITEM_NORMAL) -> MenuItem"""
54f9ee45 8923 return _core_.Menu_Prepend(*args, **kwargs)
e811c8ce
RD
8924
8925 def PrependSeparator(*args, **kwargs):
a95a7133 8926 """PrependSeparator(self) -> MenuItem"""
54f9ee45 8927 return _core_.Menu_PrependSeparator(*args, **kwargs)
e811c8ce
RD
8928
8929 def PrependCheckItem(*args, **kwargs):
a95a7133 8930 """PrependCheckItem(self, int id, String text, String help=EmptyString) -> MenuItem"""
54f9ee45 8931 return _core_.Menu_PrependCheckItem(*args, **kwargs)
e811c8ce
RD
8932
8933 def PrependRadioItem(*args, **kwargs):
a95a7133 8934 """PrependRadioItem(self, int id, String text, String help=EmptyString) -> MenuItem"""
54f9ee45 8935 return _core_.Menu_PrependRadioItem(*args, **kwargs)
e811c8ce
RD
8936
8937 def PrependMenu(*args, **kwargs):
a95a7133 8938 """PrependMenu(self, int id, String text, Menu submenu, String help=EmptyString) -> MenuItem"""
54f9ee45 8939 return _core_.Menu_PrependMenu(*args, **kwargs)
e811c8ce
RD
8940
8941 def Remove(*args, **kwargs):
a95a7133 8942 """Remove(self, int id) -> MenuItem"""
54f9ee45 8943 return _core_.Menu_Remove(*args, **kwargs)
e811c8ce
RD
8944
8945 def RemoveItem(*args, **kwargs):
a95a7133 8946 """RemoveItem(self, MenuItem item) -> MenuItem"""
54f9ee45 8947 return _core_.Menu_RemoveItem(*args, **kwargs)
e811c8ce
RD
8948
8949 def Delete(*args, **kwargs):
a95a7133 8950 """Delete(self, int id) -> bool"""
54f9ee45 8951 return _core_.Menu_Delete(*args, **kwargs)
e811c8ce
RD
8952
8953 def DeleteItem(*args, **kwargs):
a95a7133 8954 """DeleteItem(self, MenuItem item) -> bool"""
54f9ee45 8955 return _core_.Menu_DeleteItem(*args, **kwargs)
e811c8ce
RD
8956
8957 def Destroy(*args, **kwargs):
0df68c9f 8958 """
a95a7133 8959 Destroy(self)
e811c8ce 8960
0df68c9f
RD
8961 Deletes the C++ object this Python object is a proxy for.
8962 """
54f9ee45 8963 return _core_.Menu_Destroy(*args, **kwargs)
e811c8ce
RD
8964
8965 def DestroyId(*args, **kwargs):
0df68c9f 8966 """
a95a7133 8967 DestroyId(self, int id) -> bool
e811c8ce 8968
0df68c9f
RD
8969 Deletes the C++ object this Python object is a proxy for.
8970 """
54f9ee45 8971 return _core_.Menu_DestroyId(*args, **kwargs)
e811c8ce
RD
8972
8973 def DestroyItem(*args, **kwargs):
0df68c9f 8974 """
a95a7133 8975 DestroyItem(self, MenuItem item) -> bool
e811c8ce 8976
0df68c9f
RD
8977 Deletes the C++ object this Python object is a proxy for.
8978 """
54f9ee45 8979 return _core_.Menu_DestroyItem(*args, **kwargs)
e811c8ce
RD
8980
8981 def GetMenuItemCount(*args, **kwargs):
a95a7133 8982 """GetMenuItemCount(self) -> size_t"""
54f9ee45 8983 return _core_.Menu_GetMenuItemCount(*args, **kwargs)
e811c8ce
RD
8984
8985 def GetMenuItems(*args, **kwargs):
a95a7133 8986 """GetMenuItems(self) -> PyObject"""
54f9ee45 8987 return _core_.Menu_GetMenuItems(*args, **kwargs)
e811c8ce
RD
8988
8989 def FindItem(*args, **kwargs):
a95a7133 8990 """FindItem(self, String item) -> int"""
54f9ee45 8991 return _core_.Menu_FindItem(*args, **kwargs)
e811c8ce
RD
8992
8993 def FindItemById(*args, **kwargs):
a95a7133 8994 """FindItemById(self, int id) -> MenuItem"""
54f9ee45 8995 return _core_.Menu_FindItemById(*args, **kwargs)
e811c8ce
RD
8996
8997 def FindItemByPosition(*args, **kwargs):
a95a7133 8998 """FindItemByPosition(self, size_t position) -> MenuItem"""
54f9ee45 8999 return _core_.Menu_FindItemByPosition(*args, **kwargs)
e811c8ce
RD
9000
9001 def Enable(*args, **kwargs):
a95a7133 9002 """Enable(self, int id, bool enable)"""
54f9ee45 9003 return _core_.Menu_Enable(*args, **kwargs)
e811c8ce
RD
9004
9005 def IsEnabled(*args, **kwargs):
a95a7133 9006 """IsEnabled(self, int id) -> bool"""
54f9ee45 9007 return _core_.Menu_IsEnabled(*args, **kwargs)
e811c8ce
RD
9008
9009 def Check(*args, **kwargs):
a95a7133 9010 """Check(self, int id, bool check)"""
54f9ee45 9011 return _core_.Menu_Check(*args, **kwargs)
e811c8ce
RD
9012
9013 def IsChecked(*args, **kwargs):
a95a7133 9014 """IsChecked(self, int id) -> bool"""
54f9ee45 9015 return _core_.Menu_IsChecked(*args, **kwargs)
e811c8ce
RD
9016
9017 def SetLabel(*args, **kwargs):
a95a7133 9018 """SetLabel(self, int id, String label)"""
54f9ee45 9019 return _core_.Menu_SetLabel(*args, **kwargs)
e811c8ce
RD
9020
9021 def GetLabel(*args, **kwargs):
a95a7133 9022 """GetLabel(self, int id) -> String"""
54f9ee45 9023 return _core_.Menu_GetLabel(*args, **kwargs)
e811c8ce
RD
9024
9025 def SetHelpString(*args, **kwargs):
a95a7133 9026 """SetHelpString(self, int id, String helpString)"""
54f9ee45 9027 return _core_.Menu_SetHelpString(*args, **kwargs)
e811c8ce
RD
9028
9029 def GetHelpString(*args, **kwargs):
a95a7133 9030 """GetHelpString(self, int id) -> String"""
54f9ee45 9031 return _core_.Menu_GetHelpString(*args, **kwargs)
e811c8ce
RD
9032
9033 def SetTitle(*args, **kwargs):
a95a7133 9034 """SetTitle(self, String title)"""
54f9ee45 9035 return _core_.Menu_SetTitle(*args, **kwargs)
e811c8ce
RD
9036
9037 def GetTitle(*args, **kwargs):
a95a7133 9038 """GetTitle(self) -> String"""
54f9ee45 9039 return _core_.Menu_GetTitle(*args, **kwargs)
e811c8ce
RD
9040
9041 def SetEventHandler(*args, **kwargs):
a95a7133 9042 """SetEventHandler(self, EvtHandler handler)"""
54f9ee45 9043 return _core_.Menu_SetEventHandler(*args, **kwargs)
e811c8ce
RD
9044
9045 def GetEventHandler(*args, **kwargs):
a95a7133 9046 """GetEventHandler(self) -> EvtHandler"""
54f9ee45 9047 return _core_.Menu_GetEventHandler(*args, **kwargs)
e811c8ce
RD
9048
9049 def SetInvokingWindow(*args, **kwargs):
a95a7133 9050 """SetInvokingWindow(self, Window win)"""
54f9ee45 9051 return _core_.Menu_SetInvokingWindow(*args, **kwargs)
e811c8ce
RD
9052
9053 def GetInvokingWindow(*args, **kwargs):
a95a7133 9054 """GetInvokingWindow(self) -> Window"""
54f9ee45 9055 return _core_.Menu_GetInvokingWindow(*args, **kwargs)
e811c8ce
RD
9056
9057 def GetStyle(*args, **kwargs):
a95a7133 9058 """GetStyle(self) -> long"""
54f9ee45 9059 return _core_.Menu_GetStyle(*args, **kwargs)
e811c8ce
RD
9060
9061 def UpdateUI(*args, **kwargs):
a95a7133 9062 """UpdateUI(self, EvtHandler source=None)"""
54f9ee45 9063 return _core_.Menu_UpdateUI(*args, **kwargs)
e811c8ce
RD
9064
9065 def GetMenuBar(*args, **kwargs):
a95a7133 9066 """GetMenuBar(self) -> MenuBar"""
54f9ee45 9067 return _core_.Menu_GetMenuBar(*args, **kwargs)
e811c8ce
RD
9068
9069 def Attach(*args, **kwargs):
a95a7133 9070 """Attach(self, wxMenuBarBase menubar)"""
54f9ee45 9071 return _core_.Menu_Attach(*args, **kwargs)
e811c8ce
RD
9072
9073 def Detach(*args, **kwargs):
a95a7133 9074 """Detach(self)"""
54f9ee45 9075 return _core_.Menu_Detach(*args, **kwargs)
e811c8ce
RD
9076
9077 def IsAttached(*args, **kwargs):
a95a7133 9078 """IsAttached(self) -> bool"""
54f9ee45 9079 return _core_.Menu_IsAttached(*args, **kwargs)
e811c8ce
RD
9080
9081 def SetParent(*args, **kwargs):
a95a7133 9082 """SetParent(self, Menu parent)"""
54f9ee45 9083 return _core_.Menu_SetParent(*args, **kwargs)
e811c8ce
RD
9084
9085 def GetParent(*args, **kwargs):
a95a7133 9086 """GetParent(self) -> Menu"""
54f9ee45 9087 return _core_.Menu_GetParent(*args, **kwargs)
e811c8ce 9088
d14a1e28
RD
9089
9090class MenuPtr(Menu):
9091 def __init__(self, this):
9092 self.this = this
9093 if not hasattr(self,"thisown"): self.thisown = 0
9094 self.__class__ = Menu
54f9ee45 9095_core_.Menu_swigregister(MenuPtr)
d14a1e28
RD
9096DefaultValidator = cvar.DefaultValidator
9097
9098#---------------------------------------------------------------------------
9099
9100class MenuBar(Window):
093d3ff1 9101 """Proxy of C++ MenuBar class"""
e811c8ce
RD
9102 def __repr__(self):
9103 return "<%s.%s; proxy of C++ wxMenuBar instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 9104 def __init__(self, *args, **kwargs):
a95a7133 9105 """__init__(self, long style=0) -> MenuBar"""
54f9ee45 9106 newobj = _core_.new_MenuBar(*args, **kwargs)
d14a1e28
RD
9107 self.this = newobj.this
9108 self.thisown = 1
9109 del newobj.thisown
9110 self._setOORInfo(self)
e811c8ce
RD
9111
9112 def Append(*args, **kwargs):
a95a7133 9113 """Append(self, Menu menu, String title) -> bool"""
54f9ee45 9114 return _core_.MenuBar_Append(*args, **kwargs)
e811c8ce
RD
9115
9116 def Insert(*args, **kwargs):
a95a7133 9117 """Insert(self, size_t pos, Menu menu, String title) -> bool"""
54f9ee45 9118 return _core_.MenuBar_Insert(*args, **kwargs)
e811c8ce
RD
9119
9120 def GetMenuCount(*args, **kwargs):
a95a7133 9121 """GetMenuCount(self) -> size_t"""
54f9ee45 9122 return _core_.MenuBar_GetMenuCount(*args, **kwargs)
e811c8ce
RD
9123
9124 def GetMenu(*args, **kwargs):
a95a7133 9125 """GetMenu(self, size_t pos) -> Menu"""
54f9ee45 9126 return _core_.MenuBar_GetMenu(*args, **kwargs)
e811c8ce
RD
9127
9128 def Replace(*args, **kwargs):
a95a7133 9129 """Replace(self, size_t pos, Menu menu, String title) -> Menu"""
54f9ee45 9130 return _core_.MenuBar_Replace(*args, **kwargs)
e811c8ce
RD
9131
9132 def Remove(*args, **kwargs):
a95a7133 9133 """Remove(self, size_t pos) -> Menu"""
54f9ee45 9134 return _core_.MenuBar_Remove(*args, **kwargs)
e811c8ce
RD
9135
9136 def EnableTop(*args, **kwargs):
a95a7133 9137 """EnableTop(self, size_t pos, bool enable)"""
54f9ee45 9138 return _core_.MenuBar_EnableTop(*args, **kwargs)
e811c8ce
RD
9139
9140 def IsEnabledTop(*args, **kwargs):
a95a7133 9141 """IsEnabledTop(self, size_t pos) -> bool"""
54f9ee45 9142 return _core_.MenuBar_IsEnabledTop(*args, **kwargs)
e811c8ce
RD
9143
9144 def SetLabelTop(*args, **kwargs):
a95a7133 9145 """SetLabelTop(self, size_t pos, String label)"""
54f9ee45 9146 return _core_.MenuBar_SetLabelTop(*args, **kwargs)
e811c8ce
RD
9147
9148 def GetLabelTop(*args, **kwargs):
a95a7133 9149 """GetLabelTop(self, size_t pos) -> String"""
54f9ee45 9150 return _core_.MenuBar_GetLabelTop(*args, **kwargs)
e811c8ce
RD
9151
9152 def FindMenuItem(*args, **kwargs):
a95a7133 9153 """FindMenuItem(self, String menu, String item) -> int"""
54f9ee45 9154 return _core_.MenuBar_FindMenuItem(*args, **kwargs)
e811c8ce
RD
9155
9156 def FindItemById(*args, **kwargs):
a95a7133 9157 """FindItemById(self, int id) -> MenuItem"""
54f9ee45 9158 return _core_.MenuBar_FindItemById(*args, **kwargs)
e811c8ce
RD
9159
9160 def FindMenu(*args, **kwargs):
a95a7133 9161 """FindMenu(self, String title) -> int"""
54f9ee45 9162 return _core_.MenuBar_FindMenu(*args, **kwargs)
e811c8ce
RD
9163
9164 def Enable(*args, **kwargs):
a95a7133 9165 """Enable(self, int id, bool enable)"""
54f9ee45 9166 return _core_.MenuBar_Enable(*args, **kwargs)
e811c8ce
RD
9167
9168 def Check(*args, **kwargs):
a95a7133 9169 """Check(self, int id, bool check)"""
54f9ee45 9170 return _core_.MenuBar_Check(*args, **kwargs)
e811c8ce
RD
9171
9172 def IsChecked(*args, **kwargs):
a95a7133 9173 """IsChecked(self, int id) -> bool"""
54f9ee45 9174 return _core_.MenuBar_IsChecked(*args, **kwargs)
e811c8ce
RD
9175
9176 def IsEnabled(*args, **kwargs):
a95a7133 9177 """IsEnabled(self, int id) -> bool"""
54f9ee45 9178 return _core_.MenuBar_IsEnabled(*args, **kwargs)
e811c8ce
RD
9179
9180 def SetLabel(*args, **kwargs):
a95a7133 9181 """SetLabel(self, int id, String label)"""
54f9ee45 9182 return _core_.MenuBar_SetLabel(*args, **kwargs)
e811c8ce
RD
9183
9184 def GetLabel(*args, **kwargs):
a95a7133 9185 """GetLabel(self, int id) -> String"""
54f9ee45 9186 return _core_.MenuBar_GetLabel(*args, **kwargs)
e811c8ce
RD
9187
9188 def SetHelpString(*args, **kwargs):
a95a7133 9189 """SetHelpString(self, int id, String helpString)"""
54f9ee45 9190 return _core_.MenuBar_SetHelpString(*args, **kwargs)
e811c8ce
RD
9191
9192 def GetHelpString(*args, **kwargs):
a95a7133 9193 """GetHelpString(self, int id) -> String"""
54f9ee45 9194 return _core_.MenuBar_GetHelpString(*args, **kwargs)
e811c8ce
RD
9195
9196 def GetFrame(*args, **kwargs):
a95a7133 9197 """GetFrame(self) -> wxFrame"""
54f9ee45 9198 return _core_.MenuBar_GetFrame(*args, **kwargs)
e811c8ce
RD
9199
9200 def IsAttached(*args, **kwargs):
a95a7133 9201 """IsAttached(self) -> bool"""
54f9ee45 9202 return _core_.MenuBar_IsAttached(*args, **kwargs)
e811c8ce
RD
9203
9204 def Attach(*args, **kwargs):
a95a7133 9205 """Attach(self, wxFrame frame)"""
54f9ee45 9206 return _core_.MenuBar_Attach(*args, **kwargs)
e811c8ce
RD
9207
9208 def Detach(*args, **kwargs):
a95a7133 9209 """Detach(self)"""
54f9ee45 9210 return _core_.MenuBar_Detach(*args, **kwargs)
e811c8ce 9211
d14a1e28
RD
9212
9213class MenuBarPtr(MenuBar):
9214 def __init__(self, this):
9215 self.this = this
9216 if not hasattr(self,"thisown"): self.thisown = 0
9217 self.__class__ = MenuBar
54f9ee45 9218_core_.MenuBar_swigregister(MenuBarPtr)
d14a1e28
RD
9219
9220#---------------------------------------------------------------------------
9221
9222class MenuItem(Object):
093d3ff1 9223 """Proxy of C++ MenuItem class"""
e811c8ce
RD
9224 def __repr__(self):
9225 return "<%s.%s; proxy of C++ wxMenuItem instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 9226 def __init__(self, *args, **kwargs):
0df68c9f 9227 """
a95a7133 9228 __init__(self, Menu parentMenu=None, int id=ID_ANY, String text=EmptyString,
196addbf
RD
9229 String help=EmptyString, int kind=ITEM_NORMAL,
9230 Menu subMenu=None) -> MenuItem
0df68c9f 9231 """
54f9ee45 9232 newobj = _core_.new_MenuItem(*args, **kwargs)
d14a1e28
RD
9233 self.this = newobj.this
9234 self.thisown = 1
9235 del newobj.thisown
e811c8ce 9236 def GetMenu(*args, **kwargs):
a95a7133 9237 """GetMenu(self) -> Menu"""
54f9ee45 9238 return _core_.MenuItem_GetMenu(*args, **kwargs)
e811c8ce
RD
9239
9240 def SetMenu(*args, **kwargs):
a95a7133 9241 """SetMenu(self, Menu menu)"""
54f9ee45 9242 return _core_.MenuItem_SetMenu(*args, **kwargs)
e811c8ce
RD
9243
9244 def SetId(*args, **kwargs):
a95a7133 9245 """SetId(self, int id)"""
54f9ee45 9246 return _core_.MenuItem_SetId(*args, **kwargs)
e811c8ce
RD
9247
9248 def GetId(*args, **kwargs):
a95a7133 9249 """GetId(self) -> int"""
54f9ee45 9250 return _core_.MenuItem_GetId(*args, **kwargs)
e811c8ce
RD
9251
9252 def IsSeparator(*args, **kwargs):
a95a7133 9253 """IsSeparator(self) -> bool"""
54f9ee45 9254 return _core_.MenuItem_IsSeparator(*args, **kwargs)
e811c8ce
RD
9255
9256 def SetText(*args, **kwargs):
a95a7133 9257 """SetText(self, String str)"""
54f9ee45 9258 return _core_.MenuItem_SetText(*args, **kwargs)
e811c8ce
RD
9259
9260 def GetLabel(*args, **kwargs):
a95a7133 9261 """GetLabel(self) -> String"""
54f9ee45 9262 return _core_.MenuItem_GetLabel(*args, **kwargs)
e811c8ce
RD
9263
9264 def GetText(*args, **kwargs):
a95a7133 9265 """GetText(self) -> String"""
54f9ee45 9266 return _core_.MenuItem_GetText(*args, **kwargs)
e811c8ce
RD
9267
9268 def GetLabelFromText(*args, **kwargs):
66c033b4 9269 """GetLabelFromText(String text) -> String"""
54f9ee45 9270 return _core_.MenuItem_GetLabelFromText(*args, **kwargs)
e811c8ce
RD
9271
9272 GetLabelFromText = staticmethod(GetLabelFromText)
9273 def GetKind(*args, **kwargs):
a95a7133 9274 """GetKind(self) -> int"""
54f9ee45 9275 return _core_.MenuItem_GetKind(*args, **kwargs)
e811c8ce 9276
a95a7133
RD
9277 def SetKind(*args, **kwargs):
9278 """SetKind(self, int kind)"""
54f9ee45 9279 return _core_.MenuItem_SetKind(*args, **kwargs)
a95a7133 9280
e811c8ce 9281 def SetCheckable(*args, **kwargs):
a95a7133 9282 """SetCheckable(self, bool checkable)"""
54f9ee45 9283 return _core_.MenuItem_SetCheckable(*args, **kwargs)
e811c8ce
RD
9284
9285 def IsCheckable(*args, **kwargs):
a95a7133 9286 """IsCheckable(self) -> bool"""
54f9ee45 9287 return _core_.MenuItem_IsCheckable(*args, **kwargs)
e811c8ce
RD
9288
9289 def IsSubMenu(*args, **kwargs):
a95a7133 9290 """IsSubMenu(self) -> bool"""
54f9ee45 9291 return _core_.MenuItem_IsSubMenu(*args, **kwargs)
e811c8ce
RD
9292
9293 def SetSubMenu(*args, **kwargs):
a95a7133 9294 """SetSubMenu(self, Menu menu)"""
54f9ee45 9295 return _core_.MenuItem_SetSubMenu(*args, **kwargs)
e811c8ce
RD
9296
9297 def GetSubMenu(*args, **kwargs):
a95a7133 9298 """GetSubMenu(self) -> Menu"""
54f9ee45 9299 return _core_.MenuItem_GetSubMenu(*args, **kwargs)
e811c8ce
RD
9300
9301 def Enable(*args, **kwargs):
a95a7133 9302 """Enable(self, bool enable=True)"""
54f9ee45 9303 return _core_.MenuItem_Enable(*args, **kwargs)
e811c8ce
RD
9304
9305 def IsEnabled(*args, **kwargs):
a95a7133 9306 """IsEnabled(self) -> bool"""
54f9ee45 9307 return _core_.MenuItem_IsEnabled(*args, **kwargs)
e811c8ce
RD
9308
9309 def Check(*args, **kwargs):
a95a7133 9310 """Check(self, bool check=True)"""
54f9ee45 9311 return _core_.MenuItem_Check(*args, **kwargs)
e811c8ce
RD
9312
9313 def IsChecked(*args, **kwargs):
a95a7133 9314 """IsChecked(self) -> bool"""
54f9ee45 9315 return _core_.MenuItem_IsChecked(*args, **kwargs)
e811c8ce
RD
9316
9317 def Toggle(*args, **kwargs):
a95a7133 9318 """Toggle(self)"""
54f9ee45 9319 return _core_.MenuItem_Toggle(*args, **kwargs)
e811c8ce
RD
9320
9321 def SetHelp(*args, **kwargs):
a95a7133 9322 """SetHelp(self, String str)"""
54f9ee45 9323 return _core_.MenuItem_SetHelp(*args, **kwargs)
e811c8ce
RD
9324
9325 def GetHelp(*args, **kwargs):
a95a7133 9326 """GetHelp(self) -> String"""
54f9ee45 9327 return _core_.MenuItem_GetHelp(*args, **kwargs)
e811c8ce
RD
9328
9329 def GetAccel(*args, **kwargs):
a95a7133 9330 """GetAccel(self) -> AcceleratorEntry"""
54f9ee45 9331 return _core_.MenuItem_GetAccel(*args, **kwargs)
e811c8ce
RD
9332
9333 def SetAccel(*args, **kwargs):
a95a7133 9334 """SetAccel(self, AcceleratorEntry accel)"""
54f9ee45 9335 return _core_.MenuItem_SetAccel(*args, **kwargs)
e811c8ce 9336
c1280d1e
RD
9337 def SetFont(*args, **kwargs):
9338 """SetFont(self, Font font)"""
9339 return _core_.MenuItem_SetFont(*args, **kwargs)
9340
9341 def GetFont(*args, **kwargs):
9342 """GetFont(self) -> Font"""
9343 return _core_.MenuItem_GetFont(*args, **kwargs)
9344
9345 def SetTextColour(*args, **kwargs):
9346 """SetTextColour(self, Colour colText)"""
9347 return _core_.MenuItem_SetTextColour(*args, **kwargs)
9348
9349 def GetTextColour(*args, **kwargs):
9350 """GetTextColour(self) -> Colour"""
9351 return _core_.MenuItem_GetTextColour(*args, **kwargs)
9352
9353 def SetBackgroundColour(*args, **kwargs):
9354 """SetBackgroundColour(self, Colour colBack)"""
9355 return _core_.MenuItem_SetBackgroundColour(*args, **kwargs)
9356
9357 def GetBackgroundColour(*args, **kwargs):
9358 """GetBackgroundColour(self) -> Colour"""
9359 return _core_.MenuItem_GetBackgroundColour(*args, **kwargs)
9360
9361 def SetBitmaps(*args, **kwargs):
9362 """SetBitmaps(self, Bitmap bmpChecked, Bitmap bmpUnchecked=wxNullBitmap)"""
9363 return _core_.MenuItem_SetBitmaps(*args, **kwargs)
9364
9365 def SetDisabledBitmap(*args, **kwargs):
9366 """SetDisabledBitmap(self, Bitmap bmpDisabled)"""
9367 return _core_.MenuItem_SetDisabledBitmap(*args, **kwargs)
9368
9369 def GetDisabledBitmap(*args, **kwargs):
9370 """GetDisabledBitmap(self) -> Bitmap"""
9371 return _core_.MenuItem_GetDisabledBitmap(*args, **kwargs)
9372
9373 def SetMarginWidth(*args, **kwargs):
9374 """SetMarginWidth(self, int nWidth)"""
9375 return _core_.MenuItem_SetMarginWidth(*args, **kwargs)
9376
9377 def GetMarginWidth(*args, **kwargs):
9378 """GetMarginWidth(self) -> int"""
9379 return _core_.MenuItem_GetMarginWidth(*args, **kwargs)
9380
e811c8ce 9381 def GetDefaultMarginWidth(*args, **kwargs):
66c033b4 9382 """GetDefaultMarginWidth() -> int"""
54f9ee45 9383 return _core_.MenuItem_GetDefaultMarginWidth(*args, **kwargs)
e811c8ce
RD
9384
9385 GetDefaultMarginWidth = staticmethod(GetDefaultMarginWidth)
c1280d1e
RD
9386 def IsOwnerDrawn(*args, **kwargs):
9387 """IsOwnerDrawn(self) -> bool"""
9388 return _core_.MenuItem_IsOwnerDrawn(*args, **kwargs)
9389
9390 def SetOwnerDrawn(*args, **kwargs):
9391 """SetOwnerDrawn(self, bool ownerDrawn=True)"""
9392 return _core_.MenuItem_SetOwnerDrawn(*args, **kwargs)
9393
9394 def ResetOwnerDrawn(*args, **kwargs):
9395 """ResetOwnerDrawn(self)"""
9396 return _core_.MenuItem_ResetOwnerDrawn(*args, **kwargs)
9397
e811c8ce 9398 def SetBitmap(*args, **kwargs):
a95a7133 9399 """SetBitmap(self, Bitmap bitmap)"""
54f9ee45 9400 return _core_.MenuItem_SetBitmap(*args, **kwargs)
e811c8ce
RD
9401
9402 def GetBitmap(*args, **kwargs):
a95a7133 9403 """GetBitmap(self) -> Bitmap"""
54f9ee45 9404 return _core_.MenuItem_GetBitmap(*args, **kwargs)
e811c8ce 9405
d14a1e28
RD
9406
9407class MenuItemPtr(MenuItem):
9408 def __init__(self, this):
9409 self.this = this
9410 if not hasattr(self,"thisown"): self.thisown = 0
9411 self.__class__ = MenuItem
54f9ee45 9412_core_.MenuItem_swigregister(MenuItemPtr)
d14a1e28 9413
e811c8ce 9414def MenuItem_GetLabelFromText(*args, **kwargs):
196addbf 9415 """MenuItem_GetLabelFromText(String text) -> String"""
54f9ee45 9416 return _core_.MenuItem_GetLabelFromText(*args, **kwargs)
d14a1e28 9417
e811c8ce
RD
9418def MenuItem_GetDefaultMarginWidth(*args, **kwargs):
9419 """MenuItem_GetDefaultMarginWidth() -> int"""
54f9ee45 9420 return _core_.MenuItem_GetDefaultMarginWidth(*args, **kwargs)
d14a1e28
RD
9421
9422#---------------------------------------------------------------------------
9423
9424class Control(Window):
15afbcd0
RD
9425 """
9426 This is the base class for a control or 'widget'.
9427
41e2b43e
RD
9428 A control is generally a small window which processes user input
9429 and/or displays one or more item of data.
15afbcd0 9430 """
e811c8ce
RD
9431 def __repr__(self):
9432 return "<%s.%s; proxy of C++ wxControl instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 9433 def __init__(self, *args, **kwargs):
0df68c9f 9434 """
248ed943
RD
9435 __init__(self, Window parent, int id=-1, Point pos=DefaultPosition,
9436 Size size=DefaultSize, long style=0, Validator validator=DefaultValidator,
b2dc1044 9437 String name=ControlNameStr) -> Control
15afbcd0 9438
41e2b43e
RD
9439 Create a Control. Normally you should only call this from a subclass'
9440 __init__ as a plain old wx.Control is not very useful.
0df68c9f 9441 """
54f9ee45 9442 newobj = _core_.new_Control(*args, **kwargs)
d14a1e28
RD
9443 self.this = newobj.this
9444 self.thisown = 1
9445 del newobj.thisown
9446 self._setOORInfo(self)
e811c8ce
RD
9447
9448 def Create(*args, **kwargs):
0df68c9f 9449 """
248ed943
RD
9450 Create(self, Window parent, int id=-1, Point pos=DefaultPosition,
9451 Size size=DefaultSize, long style=0, Validator validator=DefaultValidator,
b2dc1044 9452 String name=ControlNameStr) -> bool
15afbcd0
RD
9453
9454 Do the 2nd phase and create the GUI control.
0df68c9f 9455 """
54f9ee45 9456 return _core_.Control_Create(*args, **kwargs)
e811c8ce
RD
9457
9458 def Command(*args, **kwargs):
15afbcd0 9459 """
a95a7133 9460 Command(self, CommandEvent event)
15afbcd0 9461
41e2b43e
RD
9462 Simulates the effect of the user issuing a command to the item.
9463
9464 :see: `wx.CommandEvent`
9465
15afbcd0 9466 """
54f9ee45 9467 return _core_.Control_Command(*args, **kwargs)
e811c8ce
RD
9468
9469 def GetLabel(*args, **kwargs):
15afbcd0 9470 """
a95a7133 9471 GetLabel(self) -> String
15afbcd0
RD
9472
9473 Return a control's text.
9474 """
54f9ee45 9475 return _core_.Control_GetLabel(*args, **kwargs)
e811c8ce
RD
9476
9477 def SetLabel(*args, **kwargs):
15afbcd0 9478 """
a95a7133 9479 SetLabel(self, String label)
15afbcd0
RD
9480
9481 Sets the item's text.
9482 """
54f9ee45 9483 return _core_.Control_SetLabel(*args, **kwargs)
e811c8ce 9484
74a57fcd 9485 def GetClassDefaultAttributes(*args, **kwargs):
110da5b0
RD
9486 """
9487 GetClassDefaultAttributes(int variant=WINDOW_VARIANT_NORMAL) -> VisualAttributes
9488
9489 Get the default attributes for this class. This is useful if you want
9490 to use the same font or colour in your own control as in a standard
9491 control -- which is a much better idea than hard coding specific
9492 colours or fonts which might look completely out of place on the
9493 user's system, especially if it uses themes.
9494
9495 The variant parameter is only relevant under Mac currently and is
9496 ignore under other platforms. Under Mac, it will change the size of
9497 the returned font. See `wx.Window.SetWindowVariant` for more about
9498 this.
9499 """
54f9ee45 9500 return _core_.Control_GetClassDefaultAttributes(*args, **kwargs)
74a57fcd
RD
9501
9502 GetClassDefaultAttributes = staticmethod(GetClassDefaultAttributes)
d14a1e28
RD
9503
9504class ControlPtr(Control):
9505 def __init__(self, this):
9506 self.this = this
9507 if not hasattr(self,"thisown"): self.thisown = 0
9508 self.__class__ = Control
54f9ee45 9509_core_.Control_swigregister(ControlPtr)
b2dc1044 9510ControlNameStr = cvar.ControlNameStr
d14a1e28
RD
9511
9512def PreControl(*args, **kwargs):
15afbcd0
RD
9513 """
9514 PreControl() -> Control
9515
9516 Precreate a Control control for 2-phase creation
9517 """
54f9ee45 9518 val = _core_.new_PreControl(*args, **kwargs)
d14a1e28
RD
9519 val.thisown = 1
9520 return val
9521
74a57fcd 9522def Control_GetClassDefaultAttributes(*args, **kwargs):
110da5b0
RD
9523 """
9524 Control_GetClassDefaultAttributes(int variant=WINDOW_VARIANT_NORMAL) -> VisualAttributes
9525
9526 Get the default attributes for this class. This is useful if you want
9527 to use the same font or colour in your own control as in a standard
9528 control -- which is a much better idea than hard coding specific
9529 colours or fonts which might look completely out of place on the
9530 user's system, especially if it uses themes.
9531
9532 The variant parameter is only relevant under Mac currently and is
9533 ignore under other platforms. Under Mac, it will change the size of
9534 the returned font. See `wx.Window.SetWindowVariant` for more about
9535 this.
9536 """
54f9ee45 9537 return _core_.Control_GetClassDefaultAttributes(*args, **kwargs)
74a57fcd 9538
d14a1e28
RD
9539#---------------------------------------------------------------------------
9540
9541class ItemContainer(object):
15afbcd0 9542 """
53aa7709
RD
9543 The wx.ItemContainer class defines an interface which is implemented
9544 by all controls which have string subitems, each of which may be
9545 selected, such as `wx.ListBox`, `wx.CheckListBox`, `wx.Choice` as well
9546 as `wx.ComboBox` which implements an extended interface deriving from
41e2b43e 9547 this one.
15afbcd0 9548
41e2b43e
RD
9549 It defines the methods for accessing the control's items and although
9550 each of the derived classes implements them differently, they still
9551 all conform to the same interface.
15afbcd0 9552
41e2b43e
RD
9553 The items in a wx.ItemContainer have (non empty) string labels and,
9554 optionally, client data associated with them.
15afbcd0
RD
9555
9556 """
d14a1e28
RD
9557 def __init__(self): raise RuntimeError, "No constructor defined"
9558 def __repr__(self):
9559 return "<%s.%s; proxy of C++ wxItemContainer instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
e811c8ce 9560 def Append(*args, **kwargs):
15afbcd0 9561 """
a95a7133 9562 Append(self, String item, PyObject clientData=None) -> int
15afbcd0 9563
41e2b43e
RD
9564 Adds the item to the control, associating the given data with the item
9565 if not None. The return value is the index of the newly added item
9566 which may be different from the last one if the control is sorted (e.g.
9567 has wx.LB_SORT or wx.CB_SORT style).
15afbcd0 9568 """
54f9ee45 9569 return _core_.ItemContainer_Append(*args, **kwargs)
e811c8ce
RD
9570
9571 def AppendItems(*args, **kwargs):
15afbcd0 9572 """
f5b96ee1 9573 AppendItems(self, List strings)
15afbcd0 9574
41e2b43e
RD
9575 Apend several items at once to the control. Notice that calling this
9576 method may be much faster than appending the items one by one if you
9577 need to add a lot of items.
15afbcd0 9578 """
54f9ee45 9579 return _core_.ItemContainer_AppendItems(*args, **kwargs)
e811c8ce
RD
9580
9581 def Insert(*args, **kwargs):
15afbcd0 9582 """
a95a7133 9583 Insert(self, String item, int pos, PyObject clientData=None) -> int
15afbcd0 9584
41e2b43e 9585 Insert an item into the control before the item at the ``pos`` index,
15afbcd0
RD
9586 optionally associating some data object with the item.
9587 """
54f9ee45 9588 return _core_.ItemContainer_Insert(*args, **kwargs)
e811c8ce
RD
9589
9590 def Clear(*args, **kwargs):
15afbcd0 9591 """
a95a7133 9592 Clear(self)
15afbcd0
RD
9593
9594 Removes all items from the control.
9595 """
54f9ee45 9596 return _core_.ItemContainer_Clear(*args, **kwargs)
e811c8ce
RD
9597
9598 def Delete(*args, **kwargs):
15afbcd0 9599 """
a95a7133 9600 Delete(self, int n)
15afbcd0 9601
41e2b43e
RD
9602 Deletes the item at the zero-based index 'n' from the control. Note
9603 that it is an error (signalled by a `wx.PyAssertionError` exception if
9604 enabled) to remove an item with the index negative or greater or equal
9605 than the number of items in the control.
15afbcd0 9606 """
54f9ee45 9607 return _core_.ItemContainer_Delete(*args, **kwargs)
e811c8ce 9608
53aa7709
RD
9609 def GetClientData(*args, **kwargs):
9610 """
9611 GetClientData(self, int n) -> PyObject
9612
9613 Returns the client data associated with the given item, (if any.)
9614 """
9615 return _core_.ItemContainer_GetClientData(*args, **kwargs)
9616
9617 def SetClientData(*args, **kwargs):
9618 """
9619 SetClientData(self, int n, PyObject clientData)
9620
9621 Associate the given client data with the item at position n.
9622 """
9623 return _core_.ItemContainer_SetClientData(*args, **kwargs)
9624
e811c8ce 9625 def GetCount(*args, **kwargs):
15afbcd0 9626 """
a95a7133 9627 GetCount(self) -> int
15afbcd0
RD
9628
9629 Returns the number of items in the control.
9630 """
54f9ee45 9631 return _core_.ItemContainer_GetCount(*args, **kwargs)
e811c8ce
RD
9632
9633 def IsEmpty(*args, **kwargs):
15afbcd0 9634 """
a95a7133 9635 IsEmpty(self) -> bool
15afbcd0
RD
9636
9637 Returns True if the control is empty or False if it has some items.
9638 """
54f9ee45 9639 return _core_.ItemContainer_IsEmpty(*args, **kwargs)
e811c8ce
RD
9640
9641 def GetString(*args, **kwargs):
15afbcd0 9642 """
a95a7133 9643 GetString(self, int n) -> String
15afbcd0
RD
9644
9645 Returns the label of the item with the given index.
9646 """
54f9ee45 9647 return _core_.ItemContainer_GetString(*args, **kwargs)
e811c8ce
RD
9648
9649 def GetStrings(*args, **kwargs):
a95a7133 9650 """GetStrings(self) -> wxArrayString"""
54f9ee45 9651 return _core_.ItemContainer_GetStrings(*args, **kwargs)
e811c8ce
RD
9652
9653 def SetString(*args, **kwargs):
15afbcd0 9654 """
a95a7133 9655 SetString(self, int n, String s)
15afbcd0
RD
9656
9657 Sets the label for the given item.
9658 """
54f9ee45 9659 return _core_.ItemContainer_SetString(*args, **kwargs)
e811c8ce
RD
9660
9661 def FindString(*args, **kwargs):
15afbcd0 9662 """
a95a7133 9663 FindString(self, String s) -> int
15afbcd0
RD
9664
9665 Finds an item whose label matches the given string. Returns the
41e2b43e
RD
9666 zero-based position of the item, or ``wx.NOT_FOUND`` if the string was not
9667 found.
15afbcd0 9668 """
54f9ee45 9669 return _core_.ItemContainer_FindString(*args, **kwargs)
e811c8ce 9670
53aa7709 9671 def SetSelection(*args, **kwargs):
15afbcd0 9672 """
53aa7709 9673 SetSelection(self, int n)
15afbcd0
RD
9674
9675 Sets the item at index 'n' to be the selected item.
9676 """
53aa7709 9677 return _core_.ItemContainer_SetSelection(*args, **kwargs)
e811c8ce
RD
9678
9679 def GetSelection(*args, **kwargs):
15afbcd0 9680 """
a95a7133 9681 GetSelection(self) -> int
15afbcd0 9682
41e2b43e
RD
9683 Returns the index of the selected item or ``wx.NOT_FOUND`` if no item
9684 is selected.
15afbcd0 9685 """
54f9ee45 9686 return _core_.ItemContainer_GetSelection(*args, **kwargs)
e811c8ce 9687
53aa7709
RD
9688 def SetStringSelection(*args, **kwargs):
9689 """SetStringSelection(self, String s) -> bool"""
9690 return _core_.ItemContainer_SetStringSelection(*args, **kwargs)
9691
e811c8ce 9692 def GetStringSelection(*args, **kwargs):
15afbcd0 9693 """
a95a7133 9694 GetStringSelection(self) -> String
15afbcd0 9695
41e2b43e
RD
9696 Returns the label of the selected item or an empty string if no item
9697 is selected.
15afbcd0 9698 """
54f9ee45 9699 return _core_.ItemContainer_GetStringSelection(*args, **kwargs)
e811c8ce 9700
53aa7709 9701 def Select(*args, **kwargs):
15afbcd0 9702 """
53aa7709 9703 Select(self, int n)
15afbcd0 9704
53aa7709
RD
9705 This is the same as `SetSelection` and exists only because it is
9706 slightly more natural for controls which support multiple selection.
15afbcd0 9707 """
53aa7709 9708 return _core_.ItemContainer_Select(*args, **kwargs)
e811c8ce 9709
d14a1e28
RD
9710
9711class ItemContainerPtr(ItemContainer):
9712 def __init__(self, this):
9713 self.this = this
9714 if not hasattr(self,"thisown"): self.thisown = 0
9715 self.__class__ = ItemContainer
54f9ee45 9716_core_.ItemContainer_swigregister(ItemContainerPtr)
d14a1e28
RD
9717
9718#---------------------------------------------------------------------------
9719
9720class ControlWithItems(Control,ItemContainer):
15afbcd0 9721 """
41e2b43e
RD
9722 wx.ControlWithItems combines the ``wx.ItemContainer`` class with the
9723 wx.Control class, and is used for the base class of various controls
9724 that have items.
15afbcd0 9725 """
d14a1e28
RD
9726 def __init__(self): raise RuntimeError, "No constructor defined"
9727 def __repr__(self):
9728 return "<%s.%s; proxy of C++ wxControlWithItems instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
9729
9730class ControlWithItemsPtr(ControlWithItems):
9731 def __init__(self, this):
9732 self.this = this
9733 if not hasattr(self,"thisown"): self.thisown = 0
9734 self.__class__ = ControlWithItems
54f9ee45 9735_core_.ControlWithItems_swigregister(ControlWithItemsPtr)
d14a1e28
RD
9736
9737#---------------------------------------------------------------------------
9738
9739class SizerItem(Object):
248ed943
RD
9740 """
9741 The wx.SizerItem class is used to track the position, size and other
9742 attributes of each item managed by a `wx.Sizer`. In normal usage user
9743 code should never need to deal directly with a wx.SizerItem, but
9744 custom classes derived from `wx.PySizer` will probably need to use the
9745 collection of wx.SizerItems held by wx.Sizer when calculating layout.
9746
9747 :see: `wx.Sizer`, `wx.GBSizerItem`
9748 """
e811c8ce
RD
9749 def __repr__(self):
9750 return "<%s.%s; proxy of C++ wxSizerItem instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 9751 def __init__(self, *args, **kwargs):
248ed943
RD
9752 """
9753 __init__(self) -> SizerItem
9754
9755 Constructs an empty wx.SizerItem. Either a window, sizer or spacer
9756 size will need to be set before this item can be used in a Sizer.
9757
9758 You will probably never need to create a wx.SizerItem directly as they
9759 are created automatically when the sizer's Add, Insert or Prepend
9760 methods are called.
9761
9762 :see: `wx.SizerItemSpacer`, `wx.SizerItemWindow`, `wx.SizerItemSizer`
9763 """
54f9ee45 9764 newobj = _core_.new_SizerItem(*args, **kwargs)
d14a1e28
RD
9765 self.this = newobj.this
9766 self.thisown = 1
9767 del newobj.thisown
e811c8ce 9768 def DeleteWindows(*args, **kwargs):
248ed943
RD
9769 """
9770 DeleteWindows(self)
9771
9772 Destroy the window or the windows in a subsizer, depending on the type
9773 of item.
9774 """
54f9ee45 9775 return _core_.SizerItem_DeleteWindows(*args, **kwargs)
e811c8ce
RD
9776
9777 def DetachSizer(*args, **kwargs):
248ed943
RD
9778 """
9779 DetachSizer(self)
9780
9781 Enable deleting the SizerItem without destroying the contained sizer.
9782 """
54f9ee45 9783 return _core_.SizerItem_DetachSizer(*args, **kwargs)
e811c8ce
RD
9784
9785 def GetSize(*args, **kwargs):
248ed943
RD
9786 """
9787 GetSize(self) -> Size
9788
9789 Get the current size of the item, as set in the last Layout.
9790 """
54f9ee45 9791 return _core_.SizerItem_GetSize(*args, **kwargs)
e811c8ce
RD
9792
9793 def CalcMin(*args, **kwargs):
248ed943
RD
9794 """
9795 CalcMin(self) -> Size
9796
9797 Calculates the minimum desired size for the item, including any space
9798 needed by borders.
9799 """
54f9ee45 9800 return _core_.SizerItem_CalcMin(*args, **kwargs)
e811c8ce
RD
9801
9802 def SetDimension(*args, **kwargs):
248ed943
RD
9803 """
9804 SetDimension(self, Point pos, Size size)
9805
9806 Set the position and size of the space allocated for this item by the
9807 sizer, and adjust the position and size of the item (window or
9808 subsizer) to be within that space taking alignment and borders into
9809 account.
9810 """
54f9ee45 9811 return _core_.SizerItem_SetDimension(*args, **kwargs)
e811c8ce
RD
9812
9813 def GetMinSize(*args, **kwargs):
248ed943
RD
9814 """
9815 GetMinSize(self) -> Size
9816
9817 Get the minimum size needed for the item.
9818 """
54f9ee45 9819 return _core_.SizerItem_GetMinSize(*args, **kwargs)
e811c8ce 9820
dfbb5885
RD
9821 def GetMinSizeWithBorder(*args, **kwargs):
9822 """
9823 GetMinSizeWithBorder(self) -> Size
9824
9825 Get the minimum size needed for the item with space for the borders
9826 added, if needed.
9827 """
9828 return _core_.SizerItem_GetMinSizeWithBorder(*args, **kwargs)
9829
e811c8ce 9830 def SetInitSize(*args, **kwargs):
a95a7133 9831 """SetInitSize(self, int x, int y)"""
54f9ee45 9832 return _core_.SizerItem_SetInitSize(*args, **kwargs)
e811c8ce
RD
9833
9834 def SetRatioWH(*args, **kwargs):
248ed943
RD
9835 """
9836 SetRatioWH(self, int width, int height)
9837
9838 Set the ratio item attribute.
9839 """
54f9ee45 9840 return _core_.SizerItem_SetRatioWH(*args, **kwargs)
e811c8ce
RD
9841
9842 def SetRatioSize(*args, **kwargs):
248ed943
RD
9843 """
9844 SetRatioSize(self, Size size)
9845
9846 Set the ratio item attribute.
9847 """
54f9ee45 9848 return _core_.SizerItem_SetRatioSize(*args, **kwargs)
e811c8ce
RD
9849
9850 def SetRatio(*args, **kwargs):
248ed943
RD
9851 """
9852 SetRatio(self, float ratio)
9853
9854 Set the ratio item attribute.
9855 """
54f9ee45 9856 return _core_.SizerItem_SetRatio(*args, **kwargs)
e811c8ce
RD
9857
9858 def GetRatio(*args, **kwargs):
248ed943
RD
9859 """
9860 GetRatio(self) -> float
9861
9862 Set the ratio item attribute.
9863 """
54f9ee45 9864 return _core_.SizerItem_GetRatio(*args, **kwargs)
e811c8ce 9865
d3b6e4ff
RD
9866 def GetRect(*args, **kwargs):
9867 """
9868 GetRect(self) -> Rect
9869
9870 Returns the rectangle that the sizer item should occupy
9871 """
9872 return _core_.SizerItem_GetRect(*args, **kwargs)
9873
e811c8ce 9874 def IsWindow(*args, **kwargs):
248ed943
RD
9875 """
9876 IsWindow(self) -> bool
9877
9878 Is this sizer item a window?
9879 """
54f9ee45 9880 return _core_.SizerItem_IsWindow(*args, **kwargs)
e811c8ce
RD
9881
9882 def IsSizer(*args, **kwargs):
248ed943
RD
9883 """
9884 IsSizer(self) -> bool
9885
9886 Is this sizer item a subsizer?
9887 """
54f9ee45 9888 return _core_.SizerItem_IsSizer(*args, **kwargs)
e811c8ce
RD
9889
9890 def IsSpacer(*args, **kwargs):
248ed943
RD
9891 """
9892 IsSpacer(self) -> bool
9893
9894 Is this sizer item a spacer?
9895 """
54f9ee45 9896 return _core_.SizerItem_IsSpacer(*args, **kwargs)
e811c8ce
RD
9897
9898 def SetProportion(*args, **kwargs):
248ed943
RD
9899 """
9900 SetProportion(self, int proportion)
9901
9902 Set the proportion value for this item.
9903 """
54f9ee45 9904 return _core_.SizerItem_SetProportion(*args, **kwargs)
e811c8ce
RD
9905
9906 def GetProportion(*args, **kwargs):
248ed943
RD
9907 """
9908 GetProportion(self) -> int
9909
9910 Get the proportion value for this item.
9911 """
54f9ee45 9912 return _core_.SizerItem_GetProportion(*args, **kwargs)
e811c8ce 9913
248ed943
RD
9914 SetOption = wx._deprecated(SetProportion, "Please use `SetProportion` instead.")
9915 GetOption = wx._deprecated(GetProportion, "Please use `GetProportion` instead.")
e811c8ce 9916 def SetFlag(*args, **kwargs):
248ed943
RD
9917 """
9918 SetFlag(self, int flag)
9919
9920 Set the flag value for this item.
9921 """
54f9ee45 9922 return _core_.SizerItem_SetFlag(*args, **kwargs)
e811c8ce
RD
9923
9924 def GetFlag(*args, **kwargs):
248ed943
RD
9925 """
9926 GetFlag(self) -> int
9927
9928 Get the flag value for this item.
9929 """
54f9ee45 9930 return _core_.SizerItem_GetFlag(*args, **kwargs)
e811c8ce
RD
9931
9932 def SetBorder(*args, **kwargs):
248ed943
RD
9933 """
9934 SetBorder(self, int border)
9935
9936 Set the border value for this item.
9937 """
54f9ee45 9938 return _core_.SizerItem_SetBorder(*args, **kwargs)
e811c8ce
RD
9939
9940 def GetBorder(*args, **kwargs):
248ed943
RD
9941 """
9942 GetBorder(self) -> int
9943
9944 Get the border value for this item.
9945 """
54f9ee45 9946 return _core_.SizerItem_GetBorder(*args, **kwargs)
e811c8ce
RD
9947
9948 def GetWindow(*args, **kwargs):
248ed943
RD
9949 """
9950 GetWindow(self) -> Window
9951
9952 Get the window (if any) that is managed by this sizer item.
9953 """
54f9ee45 9954 return _core_.SizerItem_GetWindow(*args, **kwargs)
e811c8ce
RD
9955
9956 def SetWindow(*args, **kwargs):
248ed943
RD
9957 """
9958 SetWindow(self, Window window)
9959
9960 Set the window to be managed by this sizer item.
9961 """
54f9ee45 9962 return _core_.SizerItem_SetWindow(*args, **kwargs)
e811c8ce
RD
9963
9964 def GetSizer(*args, **kwargs):
248ed943
RD
9965 """
9966 GetSizer(self) -> Sizer
9967
9968 Get the subsizer (if any) that is managed by this sizer item.
9969 """
54f9ee45 9970 return _core_.SizerItem_GetSizer(*args, **kwargs)
e811c8ce
RD
9971
9972 def SetSizer(*args, **kwargs):
248ed943
RD
9973 """
9974 SetSizer(self, Sizer sizer)
9975
9976 Set the subsizer to be managed by this sizer item.
9977 """
54f9ee45 9978 return _core_.SizerItem_SetSizer(*args, **kwargs)
e811c8ce
RD
9979
9980 def GetSpacer(*args, **kwargs):
248ed943
RD
9981 """
9982 GetSpacer(self) -> Size
9983
9984 Get the size of the spacer managed by this sizer item.
9985 """
54f9ee45 9986 return _core_.SizerItem_GetSpacer(*args, **kwargs)
e811c8ce
RD
9987
9988 def SetSpacer(*args, **kwargs):
248ed943
RD
9989 """
9990 SetSpacer(self, Size size)
9991
9992 Set the size of the spacer to be managed by this sizer item.
9993 """
54f9ee45 9994 return _core_.SizerItem_SetSpacer(*args, **kwargs)
e811c8ce
RD
9995
9996 def Show(*args, **kwargs):
248ed943
RD
9997 """
9998 Show(self, bool show)
9999
10000 Set the show item attribute, which sizers use to determine if the item
10001 is to be made part of the layout or not. If the item is tracking a
10002 window then it is shown or hidden as needed.
10003 """
54f9ee45 10004 return _core_.SizerItem_Show(*args, **kwargs)
e811c8ce
RD
10005
10006 def IsShown(*args, **kwargs):
248ed943
RD
10007 """
10008 IsShown(self) -> bool
10009
10010 Is the item to be shown in the layout?
10011 """
54f9ee45 10012 return _core_.SizerItem_IsShown(*args, **kwargs)
e811c8ce
RD
10013
10014 def GetPosition(*args, **kwargs):
248ed943
RD
10015 """
10016 GetPosition(self) -> Point
10017
10018 Returns the current position of the item, as set in the last Layout.
10019 """
54f9ee45 10020 return _core_.SizerItem_GetPosition(*args, **kwargs)
e811c8ce
RD
10021
10022 def GetUserData(*args, **kwargs):
248ed943
RD
10023 """
10024 GetUserData(self) -> PyObject
10025
10026 Returns the userData associated with this sizer item, or None if there
10027 isn't any.
10028 """
54f9ee45 10029 return _core_.SizerItem_GetUserData(*args, **kwargs)
e811c8ce 10030
d14a1e28
RD
10031
10032class SizerItemPtr(SizerItem):
10033 def __init__(self, this):
10034 self.this = this
10035 if not hasattr(self,"thisown"): self.thisown = 0
10036 self.__class__ = SizerItem
54f9ee45 10037_core_.SizerItem_swigregister(SizerItemPtr)
d14a1e28 10038
248ed943 10039def SizerItemWindow(*args, **kwargs):
0df68c9f 10040 """
248ed943
RD
10041 SizerItemWindow(Window window, int proportion, int flag, int border,
10042 PyObject userData=None) -> SizerItem
10043
10044 Constructs a `wx.SizerItem` for tracking a window.
0df68c9f 10045 """
248ed943 10046 val = _core_.new_SizerItemWindow(*args, **kwargs)
d14a1e28
RD
10047 val.thisown = 1
10048 return val
10049
248ed943 10050def SizerItemSpacer(*args, **kwargs):
0df68c9f 10051 """
248ed943
RD
10052 SizerItemSpacer(int width, int height, int proportion, int flag, int border,
10053 PyObject userData=None) -> SizerItem
10054
10055 Constructs a `wx.SizerItem` for tracking a spacer.
0df68c9f 10056 """
248ed943 10057 val = _core_.new_SizerItemSpacer(*args, **kwargs)
d14a1e28
RD
10058 val.thisown = 1
10059 return val
10060
10061def SizerItemSizer(*args, **kwargs):
0df68c9f
RD
10062 """
10063 SizerItemSizer(Sizer sizer, int proportion, int flag, int border,
248ed943
RD
10064 PyObject userData=None) -> SizerItem
10065
10066 Constructs a `wx.SizerItem` for tracking a subsizer
0df68c9f 10067 """
54f9ee45 10068 val = _core_.new_SizerItemSizer(*args, **kwargs)
d14a1e28
RD
10069 val.thisown = 1
10070 return val
10071
10072class Sizer(Object):
248ed943
RD
10073 """
10074 wx.Sizer is the abstract base class used for laying out subwindows in
10075 a window. You cannot use wx.Sizer directly; instead, you will have to
10076 use one of the sizer classes derived from it such as `wx.BoxSizer`,
10077 `wx.StaticBoxSizer`, `wx.NotebookSizer`, `wx.GridSizer`, `wx.FlexGridSizer`
10078 and `wx.GridBagSizer`.
10079
10080 The concept implemented by sizers in wxWidgets is closely related to
10081 layout tools in other GUI toolkits, such as Java's AWT, the GTK
10082 toolkit or the Qt toolkit. It is based upon the idea of the individual
10083 subwindows reporting their minimal required size and their ability to
10084 get stretched if the size of the parent window has changed. This will
10085 most often mean that the programmer does not set the original size of
10086 a dialog in the beginning, rather the dialog will assigned a sizer and
10087 this sizer will be queried about the recommended size. The sizer in
10088 turn will query its children, which can be normal windows or contorls,
10089 empty space or other sizers, so that a hierarchy of sizers can be
10090 constructed. Note that wxSizer does not derive from wxWindow and thus
10091 do not interfere with tab ordering and requires very little resources
10092 compared to a real window on screen.
10093
10094 What makes sizers so well fitted for use in wxWidgets is the fact that
10095 every control reports its own minimal size and the algorithm can
10096 handle differences in font sizes or different window (dialog item)
10097 sizes on different platforms without problems. If for example the
10098 standard font as well as the overall design of Mac widgets requires
10099 more space than on Windows, then the initial size of a dialog using a
10100 sizer will automatically be bigger on Mac than on Windows.
10101 """
e811c8ce
RD
10102 def __init__(self): raise RuntimeError, "No constructor defined"
10103 def __repr__(self):
10104 return "<%s.%s; proxy of C++ wxSizer instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
10105 def _setOORInfo(*args, **kwargs):
a95a7133 10106 """_setOORInfo(self, PyObject _self)"""
54f9ee45 10107 return _core_.Sizer__setOORInfo(*args, **kwargs)
e811c8ce
RD
10108
10109 def Add(*args, **kwargs):
0df68c9f 10110 """
248ed943 10111 Add(self, item, int proportion=0, int flag=0, int border=0,
d3b6e4ff 10112 PyObject userData=None) -> wx.SizerItem
248ed943
RD
10113
10114 Appends a child item to the sizer.
0df68c9f 10115 """
54f9ee45 10116 return _core_.Sizer_Add(*args, **kwargs)
e811c8ce
RD
10117
10118 def Insert(*args, **kwargs):
0df68c9f 10119 """
248ed943 10120 Insert(self, int before, item, int proportion=0, int flag=0, int border=0,
d3b6e4ff 10121 PyObject userData=None) -> wx.SizerItem
248ed943
RD
10122
10123 Inserts a new item into the list of items managed by this sizer before
10124 the item at index *before*. See `Add` for a description of the parameters.
0df68c9f 10125 """
54f9ee45 10126 return _core_.Sizer_Insert(*args, **kwargs)
e811c8ce
RD
10127
10128 def Prepend(*args, **kwargs):
0df68c9f 10129 """
248ed943 10130 Prepend(self, item, int proportion=0, int flag=0, int border=0,
d3b6e4ff 10131 PyObject userData=None) -> wx.SizerItem
248ed943
RD
10132
10133 Adds a new item to the begining of the list of sizer items managed by
10134 this sizer. See `Add` for a description of the parameters.
0df68c9f 10135 """
54f9ee45 10136 return _core_.Sizer_Prepend(*args, **kwargs)
e811c8ce
RD
10137
10138 def Remove(*args, **kwargs):
248ed943
RD
10139 """
10140 Remove(self, item) -> bool
10141
10142 Removes an item from the sizer and destroys it. This method does not
10143 cause any layout or resizing to take place, call `Layout` to update
10144 the layout on screen after removing a child from the sizer. The
10145 *item* parameter can be either a window, a sizer, or the zero-based
10146 index of an item to remove. Returns True if the child item was found
10147 and removed.
10148 """
54f9ee45 10149 return _core_.Sizer_Remove(*args, **kwargs)
e811c8ce 10150
1c0f361b 10151 def Detach(*args, **kwargs):
248ed943
RD
10152 """
10153 Detach(self, item) -> bool
10154
10155 Detaches an item from the sizer without destroying it. This method
10156 does not cause any layout or resizing to take place, call `Layout` to
10157 do so. The *item* parameter can be either a window, a sizer, or the
10158 zero-based index of the item to be detached. Returns True if the child item
10159 was found and detached.
10160 """
1c0f361b
RD
10161 return _core_.Sizer_Detach(*args, **kwargs)
10162
d3b6e4ff
RD
10163 def GetItem(*args, **kwargs):
10164 """
10165 GetItem(self, item) -> wx.SizerItem
10166
10167 Returns the `wx.SizerItem` which holds the *item* given. The *item*
10168 parameter can be either a window, a sizer, or the zero-based index of
10169 the item to be detached.
10170 """
10171 return _core_.Sizer_GetItem(*args, **kwargs)
10172
e811c8ce 10173 def _SetItemMinSize(*args, **kwargs):
a95a7133 10174 """_SetItemMinSize(self, PyObject item, Size size)"""
54f9ee45 10175 return _core_.Sizer__SetItemMinSize(*args, **kwargs)
e811c8ce 10176
248ed943
RD
10177 def SetItemMinSize(self, item, *args):
10178 """
10179 SetItemMinSize(self, item, Size size)
10180
10181 Sets the minimum size that will be allocated for an item in the sizer.
10182 The *item* parameter can be either a window, a sizer, or the
10183 zero-based index of the item. If a window or sizer is given then it
10184 will be searched for recursivly in subsizers if neccessary.
10185 """
10186 if len(args) == 2:
10187 # for backward compatibility accept separate width,height args too
10188 return self._SetItemMinSize(item, args)
10189 else:
10190 return self._SetItemMinSize(item, args[0])
10191
e811c8ce 10192 def AddItem(*args, **kwargs):
248ed943
RD
10193 """
10194 AddItem(self, SizerItem item)
10195
10196 Adds a `wx.SizerItem` to the sizer.
10197 """
54f9ee45 10198 return _core_.Sizer_AddItem(*args, **kwargs)
e811c8ce
RD
10199
10200 def InsertItem(*args, **kwargs):
248ed943
RD
10201 """
10202 InsertItem(self, int index, SizerItem item)
10203
10204 Inserts a `wx.SizerItem` to the sizer at the position given by *index*.
10205 """
54f9ee45 10206 return _core_.Sizer_InsertItem(*args, **kwargs)
e811c8ce
RD
10207
10208 def PrependItem(*args, **kwargs):
248ed943
RD
10209 """
10210 PrependItem(self, SizerItem item)
10211
10212 Prepends a `wx.SizerItem` to the sizer.
10213 """
54f9ee45 10214 return _core_.Sizer_PrependItem(*args, **kwargs)
e811c8ce 10215
248ed943 10216 def AddMany(self, items):
66c033b4
RD
10217 """
10218 AddMany is a convenience method for adding several items
10219 to a sizer at one time. Simply pass it a list of tuples,
10220 where each tuple consists of the parameters that you
10221 would normally pass to the `Add` method.
10222 """
248ed943
RD
10223 for item in items:
10224 if type(item) != type(()) or (len(item) == 2 and type(item[0]) == type(1)):
10225 item = (item, )
10226 self.Add(*item)
d14a1e28 10227
74e96f3d 10228 # for backwards compatibility only, please do not use in new code
b9d6a5f3
RD
10229 def AddWindow(self, *args, **kw):
10230 """Compatibility alias for `Add`."""
10231 return self.Add(*args, **kw)
10232 def AddSizer(self, *args, **kw):
10233 """Compatibility alias for `Add`."""
10234 return self.Add(*args, **kw)
10235 def AddSpacer(self, *args, **kw):
10236 """Compatibility alias for `Add`."""
10237 return self.Add(*args, **kw)
10238
10239 def PrependWindow(self, *args, **kw):
10240 """Compatibility alias for `Prepend`."""
10241 return self.Prepend(*args, **kw)
10242 def PrependSizer(self, *args, **kw):
10243 """Compatibility alias for `Prepend`."""
10244 return self.Prepend(*args, **kw)
10245 def PrependSpacer(self, *args, **kw):
10246 """Compatibility alias for `Prepend`."""
10247 return self.Prepend(*args, **kw)
10248
10249 def InsertWindow(self, *args, **kw):
10250 """Compatibility alias for `Insert`."""
10251 return self.Insert(*args, **kw)
10252 def InsertSizer(self, *args, **kw):
10253 """Compatibility alias for `Insert`."""
10254 return self.Insert(*args, **kw)
10255 def InsertSpacer(self, *args, **kw):
10256 """Compatibility alias for `Insert`."""
10257 return self.Insert(*args, **kw)
10258
10259 def RemoveWindow(self, *args, **kw):
10260 """Compatibility alias for `Remove`."""
10261 return self.Remove(*args, **kw)
10262 def RemoveSizer(self, *args, **kw):
10263 """Compatibility alias for `Remove`."""
10264 return self.Remove(*args, **kw)
10265 def RemovePos(self, *args, **kw):
10266 """Compatibility alias for `Remove`."""
10267 return self.Remove(*args, **kw)
d14a1e28
RD
10268
10269
e811c8ce 10270 def SetDimension(*args, **kwargs):
248ed943
RD
10271 """
10272 SetDimension(self, int x, int y, int width, int height)
10273
10274 Call this to force the sizer to take the given dimension and thus
10275 force the items owned by the sizer to resize themselves according to
10276 the rules defined by the parameter in the `Add`, `Insert` or `Prepend`
10277 methods.
10278 """
54f9ee45 10279 return _core_.Sizer_SetDimension(*args, **kwargs)
e811c8ce
RD
10280
10281 def SetMinSize(*args, **kwargs):
248ed943
RD
10282 """
10283 SetMinSize(self, Size size)
10284
10285 Call this to give the sizer a minimal size. Normally, the sizer will
10286 calculate its minimal size based purely on how much space its children
10287 need. After calling this method `GetMinSize` will return either the
10288 minimal size as requested by its children or the minimal size set
10289 here, depending on which is bigger.
10290 """
54f9ee45 10291 return _core_.Sizer_SetMinSize(*args, **kwargs)
e811c8ce
RD
10292
10293 def GetSize(*args, **kwargs):
248ed943
RD
10294 """
10295 GetSize(self) -> Size
10296
10297 Returns the current size of the space managed by the sizer.
10298 """
54f9ee45 10299 return _core_.Sizer_GetSize(*args, **kwargs)
e811c8ce
RD
10300
10301 def GetPosition(*args, **kwargs):
248ed943
RD
10302 """
10303 GetPosition(self) -> Point
10304
10305 Returns the current position of the sizer's managed space.
10306 """
54f9ee45 10307 return _core_.Sizer_GetPosition(*args, **kwargs)
e811c8ce
RD
10308
10309 def GetMinSize(*args, **kwargs):
248ed943
RD
10310 """
10311 GetMinSize(self) -> Size
10312
10313 Returns the minimal size of the sizer. This is either the combined
10314 minimal size of all the children and their borders or the minimal size
10315 set by SetMinSize, depending on which is bigger.
10316 """
54f9ee45 10317 return _core_.Sizer_GetMinSize(*args, **kwargs)
e811c8ce 10318
d14a1e28 10319 def GetSizeTuple(self):
1c0f361b 10320 return self.GetSize().Get()
d14a1e28 10321 def GetPositionTuple(self):
1c0f361b 10322 return self.GetPosition().Get()
d14a1e28 10323 def GetMinSizeTuple(self):
1c0f361b 10324 return self.GetMinSize().Get()
d14a1e28 10325
e811c8ce 10326 def RecalcSizes(*args, **kwargs):
248ed943
RD
10327 """
10328 RecalcSizes(self)
10329
10330 Using the sizes calculated by `CalcMin` reposition and resize all the
10331 items managed by this sizer. You should not need to call this directly as
10332 it is called by `Layout`.
10333 """
54f9ee45 10334 return _core_.Sizer_RecalcSizes(*args, **kwargs)
e811c8ce
RD
10335
10336 def CalcMin(*args, **kwargs):
248ed943
RD
10337 """
10338 CalcMin(self) -> Size
10339
10340 This method is where the sizer will do the actual calculation of its
10341 children's minimal sizes. You should not need to call this directly as
10342 it is called by `Layout`.
10343 """
54f9ee45 10344 return _core_.Sizer_CalcMin(*args, **kwargs)
e811c8ce
RD
10345
10346 def Layout(*args, **kwargs):
248ed943
RD
10347 """
10348 Layout(self)
10349
10350 This method will force the recalculation and layout of the items
10351 controlled by the sizer using the current space allocated to the
10352 sizer. Normally this is called automatically from the owning window's
10353 EVT_SIZE handler, but it is also useful to call it from user code when
10354 one of the items in a sizer change size, or items are added or
10355 removed.
10356 """
54f9ee45 10357 return _core_.Sizer_Layout(*args, **kwargs)
e811c8ce
RD
10358
10359 def Fit(*args, **kwargs):
248ed943
RD
10360 """
10361 Fit(self, Window window) -> Size
10362
10363 Tell the sizer to resize the *window* to match the sizer's minimal
10364 size. This is commonly done in the constructor of the window itself in
10365 order to set its initial size to match the needs of the children as
10366 determined by the sizer. Returns the new size.
10367
10368 For a top level window this is the total window size, not the client size.
10369 """
54f9ee45 10370 return _core_.Sizer_Fit(*args, **kwargs)
e811c8ce
RD
10371
10372 def FitInside(*args, **kwargs):
248ed943
RD
10373 """
10374 FitInside(self, Window window)
10375
10376 Tell the sizer to resize the *virtual size* of the *window* to match the
10377 sizer's minimal size. This will not alter the on screen size of the
10378 window, but may cause the addition/removal/alteration of scrollbars
10379 required to view the virtual area in windows which manage it.
10380
10381 :see: `wx.ScrolledWindow.SetScrollbars`, `SetVirtualSizeHints`
10382
10383 """
54f9ee45 10384 return _core_.Sizer_FitInside(*args, **kwargs)
e811c8ce
RD
10385
10386 def SetSizeHints(*args, **kwargs):
248ed943
RD
10387 """
10388 SetSizeHints(self, Window window)
10389
10390 Tell the sizer to set (and `Fit`) the minimal size of the *window* to
10391 match the sizer's minimal size. This is commonly done in the
10392 constructor of the window itself if the window is resizable (as are
10393 many dialogs under Unix and frames on probably all platforms) in order
10394 to prevent the window from being sized smaller than the minimal size
10395 required by the sizer.
10396 """
54f9ee45 10397 return _core_.Sizer_SetSizeHints(*args, **kwargs)
e811c8ce
RD
10398
10399 def SetVirtualSizeHints(*args, **kwargs):
248ed943
RD
10400 """
10401 SetVirtualSizeHints(self, Window window)
10402
10403 Tell the sizer to set the minimal size of the window virtual area to
10404 match the sizer's minimal size. For windows with managed scrollbars
10405 this will set them appropriately.
10406
10407 :see: `wx.ScrolledWindow.SetScrollbars`
10408
10409 """
54f9ee45 10410 return _core_.Sizer_SetVirtualSizeHints(*args, **kwargs)
e811c8ce
RD
10411
10412 def Clear(*args, **kwargs):
248ed943
RD
10413 """
10414 Clear(self, bool deleteWindows=False)
10415
10416 Clear all items from the sizer, optionally destroying the window items
10417 as well.
10418 """
54f9ee45 10419 return _core_.Sizer_Clear(*args, **kwargs)
e811c8ce
RD
10420
10421 def DeleteWindows(*args, **kwargs):
248ed943
RD
10422 """
10423 DeleteWindows(self)
10424
10425 Destroy all windows managed by the sizer.
10426 """
54f9ee45 10427 return _core_.Sizer_DeleteWindows(*args, **kwargs)
e811c8ce
RD
10428
10429 def GetChildren(*args, **kwargs):
248ed943 10430 """
51b83b37 10431 GetChildren(self) -> list
248ed943
RD
10432
10433 Returns a list of all the `wx.SizerItem` objects managed by the sizer.
10434 """
54f9ee45 10435 return _core_.Sizer_GetChildren(*args, **kwargs)
e811c8ce
RD
10436
10437 def Show(*args, **kwargs):
248ed943 10438 """
ae8162c8 10439 Show(self, item, bool show=True, bool recursive=false) -> bool
e811c8ce 10440
248ed943
RD
10441 Shows or hides an item managed by the sizer. To make a sizer item
10442 disappear or reappear, use Show followed by `Layout`. The *item*
10443 parameter can be either a window, a sizer, or the zero-based index of
7e63a440
RD
10444 the item. Use the recursive parameter to show or hide an item in a
10445 subsizer. Returns True if the item was found.
248ed943
RD
10446 """
10447 return _core_.Sizer_Show(*args, **kwargs)
e811c8ce
RD
10448
10449 def IsShown(*args, **kwargs):
248ed943
RD
10450 """
10451 IsShown(self, item)
10452
10453 Determines if the item is currently shown. sizer. To make a sizer
10454 item disappear or reappear, use Show followed by `Layout`. The *item*
10455 parameter can be either a window, a sizer, or the zero-based index of
10456 the item.
10457 """
54f9ee45 10458 return _core_.Sizer_IsShown(*args, **kwargs)
e811c8ce 10459
7e63a440 10460 def Hide(self, item, recursive=False):
248ed943 10461 """
27fb7603 10462 A convenience method for `Show` (item, False, recursive).
248ed943 10463 """
06759a38 10464 return self.Show(item, False, recursive)
248ed943 10465
e811c8ce 10466 def ShowItems(*args, **kwargs):
248ed943
RD
10467 """
10468 ShowItems(self, bool show)
10469
84f85550 10470 Recursively call `wx.SizerItem.Show` on all sizer items.
248ed943 10471 """
54f9ee45 10472 return _core_.Sizer_ShowItems(*args, **kwargs)
e811c8ce 10473
d14a1e28
RD
10474
10475class SizerPtr(Sizer):
10476 def __init__(self, this):
10477 self.this = this
10478 if not hasattr(self,"thisown"): self.thisown = 0
10479 self.__class__ = Sizer
54f9ee45 10480_core_.Sizer_swigregister(SizerPtr)
d14a1e28
RD
10481
10482class PySizer(Sizer):
248ed943
RD
10483 """
10484 wx.PySizer is a special version of `wx.Sizer` that has been
10485 instrumented to allow the C++ virtual methods to be overloaded in
10486 Python derived classes. You would derive from this class if you are
10487 wanting to implement a custom sizer in Python code. Simply implement
10488 `CalcMin` and `RecalcSizes` in the derived class and you're all set.
10489 For example::
10490
10491 class MySizer(wx.PySizer):
10492 def __init__(self):
10493 wx.PySizer.__init__(self)
10494
10495 def CalcMin(self):
10496 for item in self.GetChildren():
10497 # calculate the total minimum width and height needed
10498 # by all items in the sizer according to this sizer's
10499 # layout algorithm.
10500 ...
10501 return wx.Size(width, height)
10502
10503 def RecalcSizes(self):
10504 # find the space allotted to this sizer
10505 pos = self.GetPosition()
10506 size = self.GetSize()
10507 for item in self.GetChildren():
10508 # Recalculate (if necessary) the position and size of
10509 # each item and then call item.SetDimension to do the
10510 # actual positioning and sizing of the items within the
10511 # space alloted to this sizer.
10512 ...
10513 item.SetDimension(itemPos, itemSize)
10514
10515
10516 When `Layout` is called it first calls `CalcMin` followed by
10517 `RecalcSizes` so you can optimize a bit by saving the results of
e505d15e 10518 `CalcMin` and reusing them in `RecalcSizes`.
248ed943
RD
10519
10520 :see: `wx.SizerItem`, `wx.Sizer.GetChildren`
10521
10522
10523 """
e811c8ce
RD
10524 def __repr__(self):
10525 return "<%s.%s; proxy of C++ wxPySizer instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 10526 def __init__(self, *args, **kwargs):
248ed943
RD
10527 """
10528 __init__(self) -> PySizer
10529
10530 Creates a wx.PySizer. Must be called from the __init__ in the derived
10531 class.
10532 """
54f9ee45 10533 newobj = _core_.new_PySizer(*args, **kwargs)
d14a1e28
RD
10534 self.this = newobj.this
10535 self.thisown = 1
10536 del newobj.thisown
10537 self._setCallbackInfo(self, PySizer);self._setOORInfo(self)
e811c8ce
RD
10538
10539 def _setCallbackInfo(*args, **kwargs):
a95a7133 10540 """_setCallbackInfo(self, PyObject self, PyObject _class)"""
54f9ee45 10541 return _core_.PySizer__setCallbackInfo(*args, **kwargs)
e811c8ce 10542
d14a1e28
RD
10543
10544class PySizerPtr(PySizer):
10545 def __init__(self, this):
10546 self.this = this
10547 if not hasattr(self,"thisown"): self.thisown = 0
10548 self.__class__ = PySizer
54f9ee45 10549_core_.PySizer_swigregister(PySizerPtr)
d14a1e28
RD
10550
10551#---------------------------------------------------------------------------
10552
10553class BoxSizer(Sizer):
248ed943
RD
10554 """
10555 The basic idea behind a box sizer is that windows will most often be
10556 laid out in rather simple basic geometry, typically in a row or a
10557 column or nested hierarchies of either. A wx.BoxSizer will lay out
10558 its items in a simple row or column, depending on the orientation
10559 parameter passed to the constructor.
10560 """
e811c8ce
RD
10561 def __repr__(self):
10562 return "<%s.%s; proxy of C++ wxBoxSizer instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 10563 def __init__(self, *args, **kwargs):
248ed943
RD
10564 """
10565 __init__(self, int orient=HORIZONTAL) -> BoxSizer
10566
10567 Constructor for a wx.BoxSizer. *orient* may be one of ``wx.VERTICAL``
10568 or ``wx.HORIZONTAL`` for creating either a column sizer or a row
10569 sizer.
10570 """
54f9ee45 10571 newobj = _core_.new_BoxSizer(*args, **kwargs)
d14a1e28
RD
10572 self.this = newobj.this
10573 self.thisown = 1
10574 del newobj.thisown
10575 self._setOORInfo(self)
e811c8ce
RD
10576
10577 def GetOrientation(*args, **kwargs):
248ed943
RD
10578 """
10579 GetOrientation(self) -> int
10580
10581 Returns the current orientation of the sizer.
10582 """
54f9ee45 10583 return _core_.BoxSizer_GetOrientation(*args, **kwargs)
e811c8ce
RD
10584
10585 def SetOrientation(*args, **kwargs):
248ed943
RD
10586 """
10587 SetOrientation(self, int orient)
e811c8ce 10588
248ed943
RD
10589 Resets the orientation of the sizer.
10590 """
10591 return _core_.BoxSizer_SetOrientation(*args, **kwargs)
e811c8ce 10592
d14a1e28
RD
10593
10594class BoxSizerPtr(BoxSizer):
10595 def __init__(self, this):
10596 self.this = this
10597 if not hasattr(self,"thisown"): self.thisown = 0
10598 self.__class__ = BoxSizer
54f9ee45 10599_core_.BoxSizer_swigregister(BoxSizerPtr)
d14a1e28
RD
10600
10601#---------------------------------------------------------------------------
10602
10603class StaticBoxSizer(BoxSizer):
248ed943
RD
10604 """
10605 wx.StaticBoxSizer derives from and functions identically to the
10606 `wx.BoxSizer` and adds a `wx.StaticBox` around the items that the sizer
10607 manages. Note that this static box must be created separately and
10608 passed to the sizer constructor.
10609 """
e811c8ce
RD
10610 def __repr__(self):
10611 return "<%s.%s; proxy of C++ wxStaticBoxSizer instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 10612 def __init__(self, *args, **kwargs):
248ed943
RD
10613 """
10614 __init__(self, StaticBox box, int orient=HORIZONTAL) -> StaticBoxSizer
10615
10616 Constructor. It takes an associated static box and the orientation
10617 *orient* as parameters - orient can be either of ``wx.VERTICAL`` or
10618 ``wx.HORIZONTAL``.
10619 """
54f9ee45 10620 newobj = _core_.new_StaticBoxSizer(*args, **kwargs)
d14a1e28
RD
10621 self.this = newobj.this
10622 self.thisown = 1
10623 del newobj.thisown
10624 self._setOORInfo(self)
e811c8ce
RD
10625
10626 def GetStaticBox(*args, **kwargs):
248ed943
RD
10627 """
10628 GetStaticBox(self) -> StaticBox
e811c8ce 10629
248ed943
RD
10630 Returns the static box associated with this sizer.
10631 """
10632 return _core_.StaticBoxSizer_GetStaticBox(*args, **kwargs)
e811c8ce 10633
d14a1e28
RD
10634
10635class StaticBoxSizerPtr(StaticBoxSizer):
10636 def __init__(self, this):
10637 self.this = this
10638 if not hasattr(self,"thisown"): self.thisown = 0
10639 self.__class__ = StaticBoxSizer
54f9ee45 10640_core_.StaticBoxSizer_swigregister(StaticBoxSizerPtr)
d14a1e28
RD
10641
10642#---------------------------------------------------------------------------
10643
10644class GridSizer(Sizer):
248ed943
RD
10645 """
10646 A grid sizer is a sizer which lays out its children in a
10647 two-dimensional table with all cells having the same size. In other
10648 words, the width of each cell within the grid is the width of the
10649 widest item added to the sizer and the height of each grid cell is the
10650 height of the tallest item. An optional vertical and/or horizontal
10651 gap between items can also be specified (in pixels.)
10652
10653 Items are placed in the cells of the grid in the order they are added,
10654 in row-major order. In other words, the first row is filled first,
10655 then the second, and so on until all items have been added. (If
10656 neccessary, additional rows will be added as items are added.) If you
10657 need to have greater control over the cells that items are placed in
10658 then use the `wx.GridBagSizer`.
10659
10660 """
e811c8ce
RD
10661 def __repr__(self):
10662 return "<%s.%s; proxy of C++ wxGridSizer instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 10663 def __init__(self, *args, **kwargs):
248ed943
RD
10664 """
10665 __init__(self, int rows=1, int cols=0, int vgap=0, int hgap=0) -> GridSizer
10666
10667 Constructor for a wx.GridSizer. *rows* and *cols* determine the number
10668 of columns and rows in the sizer - if either of the parameters is
10669 zero, it will be calculated to from the total number of children in
10670 the sizer, thus making the sizer grow dynamically. *vgap* and *hgap*
10671 define extra space between all children.
10672 """
54f9ee45 10673 newobj = _core_.new_GridSizer(*args, **kwargs)
d14a1e28
RD
10674 self.this = newobj.this
10675 self.thisown = 1
10676 del newobj.thisown
10677 self._setOORInfo(self)
e811c8ce 10678
e811c8ce 10679 def SetCols(*args, **kwargs):
248ed943
RD
10680 """
10681 SetCols(self, int cols)
10682
10683 Sets the number of columns in the sizer.
10684 """
54f9ee45 10685 return _core_.GridSizer_SetCols(*args, **kwargs)
e811c8ce
RD
10686
10687 def SetRows(*args, **kwargs):
248ed943
RD
10688 """
10689 SetRows(self, int rows)
10690
10691 Sets the number of rows in the sizer.
10692 """
54f9ee45 10693 return _core_.GridSizer_SetRows(*args, **kwargs)
e811c8ce
RD
10694
10695 def SetVGap(*args, **kwargs):
248ed943
RD
10696 """
10697 SetVGap(self, int gap)
10698
10699 Sets the vertical gap (in pixels) between the cells in the sizer.
10700 """
54f9ee45 10701 return _core_.GridSizer_SetVGap(*args, **kwargs)
e811c8ce
RD
10702
10703 def SetHGap(*args, **kwargs):
248ed943
RD
10704 """
10705 SetHGap(self, int gap)
10706
10707 Sets the horizontal gap (in pixels) between cells in the sizer
10708 """
54f9ee45 10709 return _core_.GridSizer_SetHGap(*args, **kwargs)
e811c8ce
RD
10710
10711 def GetCols(*args, **kwargs):
248ed943
RD
10712 """
10713 GetCols(self) -> int
10714
10715 Returns the number of columns in the sizer.
10716 """
54f9ee45 10717 return _core_.GridSizer_GetCols(*args, **kwargs)
e811c8ce
RD
10718
10719 def GetRows(*args, **kwargs):
248ed943
RD
10720 """
10721 GetRows(self) -> int
10722
10723 Returns the number of rows in the sizer.
10724 """
54f9ee45 10725 return _core_.GridSizer_GetRows(*args, **kwargs)
e811c8ce
RD
10726
10727 def GetVGap(*args, **kwargs):
248ed943
RD
10728 """
10729 GetVGap(self) -> int
10730
10731 Returns the vertical gap (in pixels) between the cells in the sizer.
10732 """
54f9ee45 10733 return _core_.GridSizer_GetVGap(*args, **kwargs)
e811c8ce
RD
10734
10735 def GetHGap(*args, **kwargs):
248ed943
RD
10736 """
10737 GetHGap(self) -> int
10738
10739 Returns the horizontal gap (in pixels) between cells in the sizer.
10740 """
54f9ee45 10741 return _core_.GridSizer_GetHGap(*args, **kwargs)
e811c8ce 10742
d14a1e28
RD
10743
10744class GridSizerPtr(GridSizer):
10745 def __init__(self, this):
10746 self.this = this
10747 if not hasattr(self,"thisown"): self.thisown = 0
10748 self.__class__ = GridSizer
54f9ee45 10749_core_.GridSizer_swigregister(GridSizerPtr)
d14a1e28
RD
10750
10751#---------------------------------------------------------------------------
10752
54f9ee45
RD
10753FLEX_GROWMODE_NONE = _core_.FLEX_GROWMODE_NONE
10754FLEX_GROWMODE_SPECIFIED = _core_.FLEX_GROWMODE_SPECIFIED
10755FLEX_GROWMODE_ALL = _core_.FLEX_GROWMODE_ALL
d14a1e28 10756class FlexGridSizer(GridSizer):
248ed943
RD
10757 """
10758 A flex grid sizer is a sizer which lays out its children in a
10759 two-dimensional table with all table cells in one row having the same
10760 height and all cells in one column having the same width, but all
10761 rows or all columns are not necessarily the same height or width as in
10762 the `wx.GridSizer`.
10763
10764 wx.FlexGridSizer can also size items equally in one direction but
10765 unequally ("flexibly") in the other. If the sizer is only flexible
10766 in one direction (this can be changed using `SetFlexibleDirection`), it
10767 needs to be decided how the sizer should grow in the other ("non
10768 flexible") direction in order to fill the available space. The
10769 `SetNonFlexibleGrowMode` method serves this purpose.
10770
10771
10772 """
e811c8ce
RD
10773 def __repr__(self):
10774 return "<%s.%s; proxy of C++ wxFlexGridSizer instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 10775 def __init__(self, *args, **kwargs):
248ed943
RD
10776 """
10777 __init__(self, int rows=1, int cols=0, int vgap=0, int hgap=0) -> FlexGridSizer
10778
10779 Constructor for a wx.FlexGridSizer. *rows* and *cols* determine the
10780 number of columns and rows in the sizer - if either of the parameters
10781 is zero, it will be calculated to from the total number of children in
10782 the sizer, thus making the sizer grow dynamically. *vgap* and *hgap*
10783 define extra space between all children.
10784 """
54f9ee45 10785 newobj = _core_.new_FlexGridSizer(*args, **kwargs)
d14a1e28
RD
10786 self.this = newobj.this
10787 self.thisown = 1
10788 del newobj.thisown
10789 self._setOORInfo(self)
e811c8ce 10790
248ed943
RD
10791 def AddGrowableRow(*args, **kwargs):
10792 """
10793 AddGrowableRow(self, size_t idx, int proportion=0)
e811c8ce 10794
248ed943
RD
10795 Specifies that row *idx* (starting from zero) should be grown if there
10796 is extra space available to the sizer.
e811c8ce 10797
248ed943
RD
10798 The *proportion* parameter has the same meaning as the stretch factor
10799 for the box sizers except that if all proportions are 0, then all
10800 columns are resized equally (instead of not being resized at all).
10801 """
54f9ee45 10802 return _core_.FlexGridSizer_AddGrowableRow(*args, **kwargs)
e811c8ce
RD
10803
10804 def RemoveGrowableRow(*args, **kwargs):
248ed943
RD
10805 """
10806 RemoveGrowableRow(self, size_t idx)
10807
10808 Specifies that row *idx* is no longer growable.
10809 """
54f9ee45 10810 return _core_.FlexGridSizer_RemoveGrowableRow(*args, **kwargs)
e811c8ce
RD
10811
10812 def AddGrowableCol(*args, **kwargs):
248ed943
RD
10813 """
10814 AddGrowableCol(self, size_t idx, int proportion=0)
10815
10816 Specifies that column *idx* (starting from zero) should be grown if
10817 there is extra space available to the sizer.
10818
10819 The *proportion* parameter has the same meaning as the stretch factor
10820 for the box sizers except that if all proportions are 0, then all
10821 columns are resized equally (instead of not being resized at all).
10822 """
54f9ee45 10823 return _core_.FlexGridSizer_AddGrowableCol(*args, **kwargs)
e811c8ce
RD
10824
10825 def RemoveGrowableCol(*args, **kwargs):
248ed943
RD
10826 """
10827 RemoveGrowableCol(self, size_t idx)
10828
10829 Specifies that column *idx* is no longer growable.
10830 """
54f9ee45 10831 return _core_.FlexGridSizer_RemoveGrowableCol(*args, **kwargs)
e811c8ce
RD
10832
10833 def SetFlexibleDirection(*args, **kwargs):
248ed943
RD
10834 """
10835 SetFlexibleDirection(self, int direction)
10836
10837 Specifies whether the sizer should flexibly resize its columns, rows,
10838 or both. Argument *direction* can be one of the following values. Any
10839 other value is ignored.
10840
10841 ============== =======================================
10842 wx.VERTICAL Rows are flexibly sized.
10843 wx.HORIZONTAL Columns are flexibly sized.
10844 wx.BOTH Both rows and columns are flexibly sized
10845 (this is the default value).
10846 ============== =======================================
10847
10848 Note that this method does not trigger relayout.
10849
10850 """
54f9ee45 10851 return _core_.FlexGridSizer_SetFlexibleDirection(*args, **kwargs)
e811c8ce
RD
10852
10853 def GetFlexibleDirection(*args, **kwargs):
248ed943
RD
10854 """
10855 GetFlexibleDirection(self) -> int
10856
10857 Returns a value that specifies whether the sizer
10858 flexibly resizes its columns, rows, or both (default).
10859
10860 :see: `SetFlexibleDirection`
10861 """
54f9ee45 10862 return _core_.FlexGridSizer_GetFlexibleDirection(*args, **kwargs)
e811c8ce
RD
10863
10864 def SetNonFlexibleGrowMode(*args, **kwargs):
248ed943
RD
10865 """
10866 SetNonFlexibleGrowMode(self, int mode)
10867
10868 Specifies how the sizer should grow in the non-flexible direction if
10869 there is one (so `SetFlexibleDirection` must have been called
10870 previously). Argument *mode* can be one of the following values:
10871
10872 ========================== =================================================
10873 wx.FLEX_GROWMODE_NONE Sizer doesn't grow in the non flexible direction.
10874 wx.FLEX_GROWMODE_SPECIFIED Sizer honors growable columns/rows set with
10875 `AddGrowableCol` and `AddGrowableRow`. In this
10876 case equal sizing applies to minimum sizes of
10877 columns or rows (this is the default value).
10878 wx.FLEX_GROWMODE_ALL Sizer equally stretches all columns or rows in
10879 the non flexible direction, whether they are
10880 growable or not in the flexbile direction.
10881 ========================== =================================================
10882
10883 Note that this method does not trigger relayout.
10884
10885
10886 """
54f9ee45 10887 return _core_.FlexGridSizer_SetNonFlexibleGrowMode(*args, **kwargs)
e811c8ce
RD
10888
10889 def GetNonFlexibleGrowMode(*args, **kwargs):
248ed943
RD
10890 """
10891 GetNonFlexibleGrowMode(self) -> int
10892
10893 Returns the value that specifies how the sizer grows in the
10894 non-flexible direction if there is one.
10895
10896 :see: `SetNonFlexibleGrowMode`
10897 """
54f9ee45 10898 return _core_.FlexGridSizer_GetNonFlexibleGrowMode(*args, **kwargs)
e811c8ce
RD
10899
10900 def GetRowHeights(*args, **kwargs):
fd2dc343
RD
10901 """
10902 GetRowHeights(self) -> list
10903
10904 Returns a list of integers representing the heights of each of the
10905 rows in the sizer.
10906 """
54f9ee45 10907 return _core_.FlexGridSizer_GetRowHeights(*args, **kwargs)
e811c8ce
RD
10908
10909 def GetColWidths(*args, **kwargs):
fd2dc343
RD
10910 """
10911 GetColWidths(self) -> list
10912
10913 Returns a list of integers representing the widths of each of the
10914 columns in the sizer.
10915 """
54f9ee45 10916 return _core_.FlexGridSizer_GetColWidths(*args, **kwargs)
e811c8ce 10917
d14a1e28
RD
10918
10919class FlexGridSizerPtr(FlexGridSizer):
10920 def __init__(self, this):
10921 self.this = this
10922 if not hasattr(self,"thisown"): self.thisown = 0
10923 self.__class__ = FlexGridSizer
54f9ee45 10924_core_.FlexGridSizer_swigregister(FlexGridSizerPtr)
d14a1e28 10925
e505d15e
RD
10926class StdDialogButtonSizer(BoxSizer):
10927 """
10928 A special sizer that knows how to order and position standard buttons
10929 in order to conform to the current platform's standards. You simply
10930 need to add each `wx.Button` to the sizer, and be sure to create the
53aa7709 10931 buttons using the standard ID's. Then call `Realize` and the sizer
e505d15e
RD
10932 will take care of the rest.
10933
10934 """
10935 def __repr__(self):
10936 return "<%s.%s; proxy of C++ wxStdDialogButtonSizer instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
10937 def __init__(self, *args, **kwargs):
10938 """__init__(self) -> StdDialogButtonSizer"""
10939 newobj = _core_.new_StdDialogButtonSizer(*args, **kwargs)
10940 self.this = newobj.this
10941 self.thisown = 1
10942 del newobj.thisown
10943 def AddButton(*args, **kwargs):
10944 """
10945 AddButton(self, wxButton button)
10946
10947 Use this to add the buttons to this sizer. Do not use the `Add`
10948 method in the base class.
10949 """
10950 return _core_.StdDialogButtonSizer_AddButton(*args, **kwargs)
10951
53aa7709 10952 def Realize(*args, **kwargs):
e505d15e 10953 """
53aa7709 10954 Realize(self)
e505d15e
RD
10955
10956 This funciton needs to be called after all the buttons have been added
10957 to the sizer. It will reorder them and position them in a platform
10958 specifc manner.
10959 """
53aa7709 10960 return _core_.StdDialogButtonSizer_Realize(*args, **kwargs)
51b83b37
RD
10961
10962 def SetAffirmativeButton(*args, **kwargs):
10963 """SetAffirmativeButton(self, wxButton button)"""
10964 return _core_.StdDialogButtonSizer_SetAffirmativeButton(*args, **kwargs)
10965
10966 def SetNegativeButton(*args, **kwargs):
10967 """SetNegativeButton(self, wxButton button)"""
10968 return _core_.StdDialogButtonSizer_SetNegativeButton(*args, **kwargs)
10969
10970 def SetCancelButton(*args, **kwargs):
10971 """SetCancelButton(self, wxButton button)"""
10972 return _core_.StdDialogButtonSizer_SetCancelButton(*args, **kwargs)
e505d15e
RD
10973
10974 def GetAffirmativeButton(*args, **kwargs):
10975 """GetAffirmativeButton(self) -> wxButton"""
10976 return _core_.StdDialogButtonSizer_GetAffirmativeButton(*args, **kwargs)
10977
10978 def GetApplyButton(*args, **kwargs):
10979 """GetApplyButton(self) -> wxButton"""
10980 return _core_.StdDialogButtonSizer_GetApplyButton(*args, **kwargs)
10981
10982 def GetNegativeButton(*args, **kwargs):
10983 """GetNegativeButton(self) -> wxButton"""
10984 return _core_.StdDialogButtonSizer_GetNegativeButton(*args, **kwargs)
10985
10986 def GetCancelButton(*args, **kwargs):
10987 """GetCancelButton(self) -> wxButton"""
10988 return _core_.StdDialogButtonSizer_GetCancelButton(*args, **kwargs)
10989
10990 def GetHelpButton(*args, **kwargs):
10991 """GetHelpButton(self) -> wxButton"""
10992 return _core_.StdDialogButtonSizer_GetHelpButton(*args, **kwargs)
10993
10994
10995class StdDialogButtonSizerPtr(StdDialogButtonSizer):
10996 def __init__(self, this):
10997 self.this = this
10998 if not hasattr(self,"thisown"): self.thisown = 0
10999 self.__class__ = StdDialogButtonSizer
11000_core_.StdDialogButtonSizer_swigregister(StdDialogButtonSizerPtr)
11001
d14a1e28
RD
11002#---------------------------------------------------------------------------
11003
11004class GBPosition(object):
248ed943
RD
11005 """
11006 This class represents the position of an item in a virtual grid of
11007 rows and columns managed by a `wx.GridBagSizer`. wxPython has
11008 typemaps that will automatically convert from a 2-element sequence of
11009 integers to a wx.GBPosition, so you can use the more pythonic
11010 representation of the position nearly transparently in Python code.
11011 """
e811c8ce
RD
11012 def __repr__(self):
11013 return "<%s.%s; proxy of C++ wxGBPosition instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 11014 def __init__(self, *args, **kwargs):
248ed943
RD
11015 """
11016 __init__(self, int row=0, int col=0) -> GBPosition
11017
11018 This class represents the position of an item in a virtual grid of
11019 rows and columns managed by a `wx.GridBagSizer`. wxPython has
11020 typemaps that will automatically convert from a 2-element sequence of
11021 integers to a wx.GBPosition, so you can use the more pythonic
11022 representation of the position nearly transparently in Python code.
11023 """
54f9ee45 11024 newobj = _core_.new_GBPosition(*args, **kwargs)
d14a1e28
RD
11025 self.this = newobj.this
11026 self.thisown = 1
11027 del newobj.thisown
e811c8ce 11028 def GetRow(*args, **kwargs):
a95a7133 11029 """GetRow(self) -> int"""
54f9ee45 11030 return _core_.GBPosition_GetRow(*args, **kwargs)
e811c8ce
RD
11031
11032 def GetCol(*args, **kwargs):
a95a7133 11033 """GetCol(self) -> int"""
54f9ee45 11034 return _core_.GBPosition_GetCol(*args, **kwargs)
e811c8ce
RD
11035
11036 def SetRow(*args, **kwargs):
a95a7133 11037 """SetRow(self, int row)"""
54f9ee45 11038 return _core_.GBPosition_SetRow(*args, **kwargs)
e811c8ce
RD
11039
11040 def SetCol(*args, **kwargs):
a95a7133 11041 """SetCol(self, int col)"""
54f9ee45 11042 return _core_.GBPosition_SetCol(*args, **kwargs)
e811c8ce
RD
11043
11044 def __eq__(*args, **kwargs):
a95a7133 11045 """__eq__(self, GBPosition other) -> bool"""
54f9ee45 11046 return _core_.GBPosition___eq__(*args, **kwargs)
e811c8ce
RD
11047
11048 def __ne__(*args, **kwargs):
a95a7133 11049 """__ne__(self, GBPosition other) -> bool"""
54f9ee45 11050 return _core_.GBPosition___ne__(*args, **kwargs)
e811c8ce
RD
11051
11052 def Set(*args, **kwargs):
a95a7133 11053 """Set(self, int row=0, int col=0)"""
54f9ee45 11054 return _core_.GBPosition_Set(*args, **kwargs)
e811c8ce
RD
11055
11056 def Get(*args, **kwargs):
a95a7133 11057 """Get(self) -> PyObject"""
54f9ee45 11058 return _core_.GBPosition_Get(*args, **kwargs)
e811c8ce 11059
41e2b43e 11060 asTuple = wx._deprecated(Get, "asTuple is deprecated, use `Get` instead")
e811c8ce
RD
11061 def __str__(self): return str(self.Get())
11062 def __repr__(self): return 'wx.GBPosition'+str(self.Get())
11063 def __len__(self): return len(self.Get())
11064 def __getitem__(self, index): return self.Get()[index]
d14a1e28
RD
11065 def __setitem__(self, index, val):
11066 if index == 0: self.SetRow(val)
11067 elif index == 1: self.SetCol(val)
11068 else: raise IndexError
e811c8ce 11069 def __nonzero__(self): return self.Get() != (0,0)
74e96f3d
RD
11070 __safe_for_unpickling__ = True
11071 def __reduce__(self): return (wx.GBPosition, self.Get())
d14a1e28
RD
11072
11073 row = property(GetRow, SetRow)
11074 col = property(GetCol, SetCol)
11075
11076
11077class GBPositionPtr(GBPosition):
11078 def __init__(self, this):
11079 self.this = this
11080 if not hasattr(self,"thisown"): self.thisown = 0
11081 self.__class__ = GBPosition
54f9ee45 11082_core_.GBPosition_swigregister(GBPositionPtr)
d14a1e28
RD
11083
11084class GBSpan(object):
248ed943
RD
11085 """
11086 This class is used to hold the row and column spanning attributes of
11087 items in a `wx.GridBagSizer`. wxPython has typemaps that will
11088 automatically convert from a 2-element sequence of integers to a
11089 wx.GBSpan, so you can use the more pythonic representation of the span
11090 nearly transparently in Python code.
11091
11092 """
e811c8ce
RD
11093 def __repr__(self):
11094 return "<%s.%s; proxy of C++ wxGBSpan instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 11095 def __init__(self, *args, **kwargs):
248ed943
RD
11096 """
11097 __init__(self, int rowspan=1, int colspan=1) -> GBSpan
11098
11099 Construct a new wxGBSpan, optionally setting the rowspan and
11100 colspan. The default is (1,1). (Meaning that the item occupies one
11101 cell in each direction.
11102 """
54f9ee45 11103 newobj = _core_.new_GBSpan(*args, **kwargs)
d14a1e28
RD
11104 self.this = newobj.this
11105 self.thisown = 1
11106 del newobj.thisown
e811c8ce 11107 def GetRowspan(*args, **kwargs):
a95a7133 11108 """GetRowspan(self) -> int"""
54f9ee45 11109 return _core_.GBSpan_GetRowspan(*args, **kwargs)
e811c8ce
RD
11110
11111 def GetColspan(*args, **kwargs):
a95a7133 11112 """GetColspan(self) -> int"""
54f9ee45 11113 return _core_.GBSpan_GetColspan(*args, **kwargs)
e811c8ce
RD
11114
11115 def SetRowspan(*args, **kwargs):
a95a7133 11116 """SetRowspan(self, int rowspan)"""
54f9ee45 11117 return _core_.GBSpan_SetRowspan(*args, **kwargs)
e811c8ce
RD
11118
11119 def SetColspan(*args, **kwargs):
a95a7133 11120 """SetColspan(self, int colspan)"""
54f9ee45 11121 return _core_.GBSpan_SetColspan(*args, **kwargs)
e811c8ce
RD
11122
11123 def __eq__(*args, **kwargs):
a95a7133 11124 """__eq__(self, GBSpan other) -> bool"""
54f9ee45 11125 return _core_.GBSpan___eq__(*args, **kwargs)
e811c8ce
RD
11126
11127 def __ne__(*args, **kwargs):
a95a7133 11128 """__ne__(self, GBSpan other) -> bool"""
54f9ee45 11129 return _core_.GBSpan___ne__(*args, **kwargs)
e811c8ce
RD
11130
11131 def Set(*args, **kwargs):
a95a7133 11132 """Set(self, int rowspan=1, int colspan=1)"""
54f9ee45 11133 return _core_.GBSpan_Set(*args, **kwargs)
e811c8ce
RD
11134
11135 def Get(*args, **kwargs):
a95a7133 11136 """Get(self) -> PyObject"""
54f9ee45 11137 return _core_.GBSpan_Get(*args, **kwargs)
e811c8ce 11138
41e2b43e 11139 asTuple = wx._deprecated(Get, "asTuple is deprecated, use `Get` instead")
e811c8ce
RD
11140 def __str__(self): return str(self.Get())
11141 def __repr__(self): return 'wx.GBSpan'+str(self.Get())
11142 def __len__(self): return len(self.Get())
11143 def __getitem__(self, index): return self.Get()[index]
d14a1e28
RD
11144 def __setitem__(self, index, val):
11145 if index == 0: self.SetRowspan(val)
11146 elif index == 1: self.SetColspan(val)
11147 else: raise IndexError
e811c8ce 11148 def __nonzero__(self): return self.Get() != (0,0)
74e96f3d
RD
11149 __safe_for_unpickling__ = True
11150 def __reduce__(self): return (wx.GBSpan, self.Get())
d14a1e28
RD
11151
11152 rowspan = property(GetRowspan, SetRowspan)
11153 colspan = property(GetColspan, SetColspan)
11154
11155
11156class GBSpanPtr(GBSpan):
11157 def __init__(self, this):
11158 self.this = this
11159 if not hasattr(self,"thisown"): self.thisown = 0
11160 self.__class__ = GBSpan
54f9ee45 11161_core_.GBSpan_swigregister(GBSpanPtr)
d14a1e28
RD
11162
11163class GBSizerItem(SizerItem):
248ed943
RD
11164 """
11165 The wx.GBSizerItem class is used to track the additional data about
11166 items in a `wx.GridBagSizer` such as the item's position in the grid
11167 and how many rows or columns it spans.
11168
11169 """
e811c8ce
RD
11170 def __repr__(self):
11171 return "<%s.%s; proxy of C++ wxGBSizerItem instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 11172 def __init__(self, *args, **kwargs):
248ed943
RD
11173 """
11174 __init__(self) -> GBSizerItem
11175
11176 Constructs an empty wx.GBSizerItem. Either a window, sizer or spacer
11177 size will need to be set, as well as a position and span before this
11178 item can be used in a Sizer.
11179
11180 You will probably never need to create a wx.GBSizerItem directly as they
11181 are created automatically when the sizer's Add method is called.
11182 """
54f9ee45 11183 newobj = _core_.new_GBSizerItem(*args, **kwargs)
d14a1e28
RD
11184 self.this = newobj.this
11185 self.thisown = 1
11186 del newobj.thisown
e811c8ce 11187 def GetPos(*args, **kwargs):
248ed943
RD
11188 """
11189 GetPos(self) -> GBPosition
11190
11191 Get the grid position of the item
11192 """
54f9ee45 11193 return _core_.GBSizerItem_GetPos(*args, **kwargs)
e811c8ce
RD
11194
11195 def GetPosTuple(self): return self.GetPos().Get()
11196 def GetSpan(*args, **kwargs):
248ed943
RD
11197 """
11198 GetSpan(self) -> GBSpan
11199
11200 Get the row and column spanning of the item
11201 """
54f9ee45 11202 return _core_.GBSizerItem_GetSpan(*args, **kwargs)
e811c8ce
RD
11203
11204 def GetSpanTuple(self): return self.GetSpan().Get()
11205 def SetPos(*args, **kwargs):
248ed943
RD
11206 """
11207 SetPos(self, GBPosition pos) -> bool
11208
11209 If the item is already a member of a sizer then first ensure that
11210 there is no other item that would intersect with this one at the new
11211 position, then set the new position. Returns True if the change is
11212 successful and after the next Layout() the item will be moved.
11213 """
54f9ee45 11214 return _core_.GBSizerItem_SetPos(*args, **kwargs)
e811c8ce
RD
11215
11216 def SetSpan(*args, **kwargs):
248ed943
RD
11217 """
11218 SetSpan(self, GBSpan span) -> bool
11219
11220 If the item is already a member of a sizer then first ensure that
11221 there is no other item that would intersect with this one with its new
11222 spanning size, then set the new spanning. Returns True if the change
11223 is successful and after the next Layout() the item will be resized.
11224
11225 """
54f9ee45 11226 return _core_.GBSizerItem_SetSpan(*args, **kwargs)
e811c8ce 11227
248ed943 11228 def Intersects(*args, **kwargs):
0df68c9f 11229 """
a95a7133 11230 Intersects(self, GBSizerItem other) -> bool
248ed943
RD
11231
11232 Returns True if this item and the other item instersect.
0df68c9f 11233 """
248ed943
RD
11234 return _core_.GBSizerItem_Intersects(*args, **kwargs)
11235
11236 def IntersectsPos(*args, **kwargs):
11237 """
11238 IntersectsPos(self, GBPosition pos, GBSpan span) -> bool
11239
11240 Returns True if the given pos/span would intersect with this item.
11241 """
11242 return _core_.GBSizerItem_IntersectsPos(*args, **kwargs)
e811c8ce
RD
11243
11244 def GetEndPos(*args, **kwargs):
248ed943
RD
11245 """
11246 GetEndPos(self) -> GBPosition
11247
11248 Get the row and column of the endpoint of this item.
11249 """
54f9ee45 11250 return _core_.GBSizerItem_GetEndPos(*args, **kwargs)
e811c8ce
RD
11251
11252 def GetGBSizer(*args, **kwargs):
248ed943
RD
11253 """
11254 GetGBSizer(self) -> GridBagSizer
11255
11256 Get the sizer this item is a member of.
11257 """
54f9ee45 11258 return _core_.GBSizerItem_GetGBSizer(*args, **kwargs)
e811c8ce
RD
11259
11260 def SetGBSizer(*args, **kwargs):
248ed943
RD
11261 """
11262 SetGBSizer(self, GridBagSizer sizer)
11263
11264 Set the sizer this item is a member of.
11265 """
54f9ee45 11266 return _core_.GBSizerItem_SetGBSizer(*args, **kwargs)
e811c8ce 11267
d14a1e28
RD
11268
11269class GBSizerItemPtr(GBSizerItem):
11270 def __init__(self, this):
11271 self.this = this
11272 if not hasattr(self,"thisown"): self.thisown = 0
11273 self.__class__ = GBSizerItem
54f9ee45 11274_core_.GBSizerItem_swigregister(GBSizerItemPtr)
d14a1e28
RD
11275DefaultSpan = cvar.DefaultSpan
11276
11277def GBSizerItemWindow(*args, **kwargs):
0df68c9f
RD
11278 """
11279 GBSizerItemWindow(Window window, GBPosition pos, GBSpan span, int flag,
248ed943
RD
11280 int border, PyObject userData=None) -> GBSizerItem
11281
11282 Construct a `wx.GBSizerItem` for a window.
0df68c9f 11283 """
54f9ee45 11284 val = _core_.new_GBSizerItemWindow(*args, **kwargs)
d14a1e28
RD
11285 val.thisown = 1
11286 return val
11287
11288def GBSizerItemSizer(*args, **kwargs):
0df68c9f
RD
11289 """
11290 GBSizerItemSizer(Sizer sizer, GBPosition pos, GBSpan span, int flag,
248ed943
RD
11291 int border, PyObject userData=None) -> GBSizerItem
11292
11293 Construct a `wx.GBSizerItem` for a sizer
0df68c9f 11294 """
54f9ee45 11295 val = _core_.new_GBSizerItemSizer(*args, **kwargs)
d14a1e28
RD
11296 val.thisown = 1
11297 return val
11298
11299def GBSizerItemSpacer(*args, **kwargs):
0df68c9f
RD
11300 """
11301 GBSizerItemSpacer(int width, int height, GBPosition pos, GBSpan span,
248ed943
RD
11302 int flag, int border, PyObject userData=None) -> GBSizerItem
11303
11304 Construct a `wx.GBSizerItem` for a spacer.
0df68c9f 11305 """
54f9ee45 11306 val = _core_.new_GBSizerItemSpacer(*args, **kwargs)
d14a1e28
RD
11307 val.thisown = 1
11308 return val
11309
11310class GridBagSizer(FlexGridSizer):
248ed943
RD
11311 """
11312 A `wx.Sizer` that can lay out items in a virtual grid like a
11313 `wx.FlexGridSizer` but in this case explicit positioning of the items
11314 is allowed using `wx.GBPosition`, and items can optionally span more
11315 than one row and/or column using `wx.GBSpan`. The total size of the
11316 virtual grid is determined by the largest row and column that items are
11317 positioned at, adjusted for spanning.
11318
11319 """
e811c8ce
RD
11320 def __repr__(self):
11321 return "<%s.%s; proxy of C++ wxGridBagSizer instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 11322 def __init__(self, *args, **kwargs):
248ed943
RD
11323 """
11324 __init__(self, int vgap=0, int hgap=0) -> GridBagSizer
11325
11326 Constructor, with optional parameters to specify the gap between the
11327 rows and columns.
11328 """
54f9ee45 11329 newobj = _core_.new_GridBagSizer(*args, **kwargs)
d14a1e28
RD
11330 self.this = newobj.this
11331 self.thisown = 1
11332 del newobj.thisown
1823fbb4
RD
11333 self._setOORInfo(self)
11334
e811c8ce 11335 def Add(*args, **kwargs):
0df68c9f 11336 """
248ed943 11337 Add(self, item, GBPosition pos, GBSpan span=DefaultSpan, int flag=0,
d3b6e4ff 11338 int border=0, userData=None) -> wx.GBSizerItem
248ed943
RD
11339
11340 Adds an item to the sizer at the grid cell *pos*, optionally spanning
11341 more than one row or column as specified with *span*. The remaining
11342 args behave similarly to `wx.Sizer.Add`.
11343
11344 Returns True if the item was successfully placed at the given cell
11345 position, False if something was already there.
11346
0df68c9f 11347 """
54f9ee45 11348 return _core_.GridBagSizer_Add(*args, **kwargs)
e811c8ce
RD
11349
11350 def AddItem(*args, **kwargs):
248ed943 11351 """
d3b6e4ff 11352 Add(self, GBSizerItem item) -> wx.GBSizerItem
248ed943
RD
11353
11354 Add an item to the sizer using a `wx.GBSizerItem`. Returns True if
11355 the item was successfully placed at its given cell position, False if
11356 something was already there.
11357 """
54f9ee45 11358 return _core_.GridBagSizer_AddItem(*args, **kwargs)
e811c8ce 11359
84f85550
RD
11360 def GetCellSize(*args, **kwargs):
11361 """
11362 GetCellSize(self, int row, int col) -> Size
11363
11364 Get the size of the specified cell, including hgap and
11365 vgap. Only valid after a Layout.
11366 """
11367 return _core_.GridBagSizer_GetCellSize(*args, **kwargs)
11368
e811c8ce 11369 def GetEmptyCellSize(*args, **kwargs):
248ed943
RD
11370 """
11371 GetEmptyCellSize(self) -> Size
11372
11373 Get the size used for cells in the grid with no item.
11374 """
54f9ee45 11375 return _core_.GridBagSizer_GetEmptyCellSize(*args, **kwargs)
e811c8ce
RD
11376
11377 def SetEmptyCellSize(*args, **kwargs):
248ed943
RD
11378 """
11379 SetEmptyCellSize(self, Size sz)
11380
11381 Set the size used for cells in the grid with no item.
11382 """
54f9ee45 11383 return _core_.GridBagSizer_SetEmptyCellSize(*args, **kwargs)
e811c8ce
RD
11384
11385 def GetItemPosition(*args):
0df68c9f 11386 """
248ed943
RD
11387 GetItemPosition(self, item) -> GBPosition
11388
11389 Get the grid position of the specified *item* where *item* is either a
11390 window or subsizer that is a member of this sizer, or a zero-based
11391 index of an item.
0df68c9f 11392 """
54f9ee45 11393 return _core_.GridBagSizer_GetItemPosition(*args)
e811c8ce
RD
11394
11395 def SetItemPosition(*args):
0df68c9f 11396 """
248ed943
RD
11397 SetItemPosition(self, item, GBPosition pos) -> bool
11398
11399 Set the grid position of the specified *item* where *item* is either a
11400 window or subsizer that is a member of this sizer, or a zero-based
11401 index of an item. Returns True on success. If the move is not
11402 allowed (because an item is already there) then False is returned.
11403
0df68c9f 11404 """
54f9ee45 11405 return _core_.GridBagSizer_SetItemPosition(*args)
e811c8ce
RD
11406
11407 def GetItemSpan(*args):
0df68c9f 11408 """
248ed943
RD
11409 GetItemSpan(self, item) -> GBSpan
11410
11411 Get the row/col spanning of the specified *item* where *item* is
11412 either a window or subsizer that is a member of this sizer, or a
11413 zero-based index of an item.
0df68c9f 11414 """
54f9ee45 11415 return _core_.GridBagSizer_GetItemSpan(*args)
e811c8ce
RD
11416
11417 def SetItemSpan(*args):
0df68c9f 11418 """
248ed943
RD
11419 SetItemSpan(self, item, GBSpan span) -> bool
11420
11421 Set the row/col spanning of the specified *item* where *item* is
11422 either a window or subsizer that is a member of this sizer, or a
11423 zero-based index of an item. Returns True on success. If the move is
11424 not allowed (because an item is already there) then False is returned.
0df68c9f 11425 """
54f9ee45 11426 return _core_.GridBagSizer_SetItemSpan(*args)
e811c8ce
RD
11427
11428 def FindItem(*args):
0df68c9f 11429 """
248ed943
RD
11430 FindItem(self, item) -> GBSizerItem
11431
11432 Find the sizer item for the given window or subsizer, returns None if
11433 not found. (non-recursive)
0df68c9f 11434 """
54f9ee45 11435 return _core_.GridBagSizer_FindItem(*args)
e811c8ce
RD
11436
11437 def FindItemAtPosition(*args, **kwargs):
248ed943
RD
11438 """
11439 FindItemAtPosition(self, GBPosition pos) -> GBSizerItem
11440
11441 Return the sizer item for the given grid cell, or None if there is no
11442 item at that position. (non-recursive)
11443 """
54f9ee45 11444 return _core_.GridBagSizer_FindItemAtPosition(*args, **kwargs)
e811c8ce
RD
11445
11446 def FindItemAtPoint(*args, **kwargs):
248ed943
RD
11447 """
11448 FindItemAtPoint(self, Point pt) -> GBSizerItem
11449
11450 Return the sizer item located at the point given in *pt*, or None if
11451 there is no item at that point. The (x,y) coordinates in pt correspond
11452 to the client coordinates of the window using the sizer for
11453 layout. (non-recursive)
11454 """
54f9ee45 11455 return _core_.GridBagSizer_FindItemAtPoint(*args, **kwargs)
e811c8ce 11456
248ed943
RD
11457 def CheckForIntersection(*args, **kwargs):
11458 """
11459 CheckForIntersection(self, GBSizerItem item, GBSizerItem excludeItem=None) -> bool
e811c8ce 11460
248ed943
RD
11461 Look at all items and see if any intersect (or would overlap) the
11462 given *item*. Returns True if so, False if there would be no overlap.
11463 If an *excludeItem* is given then it will not be checked for
11464 intersection, for example it may be the item we are checking the
11465 position of.
e811c8ce 11466
248ed943
RD
11467 """
11468 return _core_.GridBagSizer_CheckForIntersection(*args, **kwargs)
e811c8ce 11469
248ed943 11470 def CheckForIntersectionPos(*args, **kwargs):
0df68c9f 11471 """
248ed943
RD
11472 CheckForIntersectionPos(self, GBPosition pos, GBSpan span, GBSizerItem excludeItem=None) -> bool
11473
11474 Look at all items and see if any intersect (or would overlap) the
11475 given position and span. Returns True if so, False if there would be
11476 no overlap. If an *excludeItem* is given then it will not be checked
11477 for intersection, for example it may be the item we are checking the
11478 position of.
0df68c9f 11479 """
248ed943 11480 return _core_.GridBagSizer_CheckForIntersectionPos(*args, **kwargs)
e811c8ce 11481
d14a1e28
RD
11482
11483class GridBagSizerPtr(GridBagSizer):
11484 def __init__(self, this):
11485 self.this = this
11486 if not hasattr(self,"thisown"): self.thisown = 0
11487 self.__class__ = GridBagSizer
54f9ee45 11488_core_.GridBagSizer_swigregister(GridBagSizerPtr)
d14a1e28
RD
11489
11490#---------------------------------------------------------------------------
11491
54f9ee45
RD
11492Left = _core_.Left
11493Top = _core_.Top
11494Right = _core_.Right
11495Bottom = _core_.Bottom
11496Width = _core_.Width
11497Height = _core_.Height
11498Centre = _core_.Centre
11499Center = _core_.Center
11500CentreX = _core_.CentreX
11501CentreY = _core_.CentreY
11502Unconstrained = _core_.Unconstrained
11503AsIs = _core_.AsIs
11504PercentOf = _core_.PercentOf
11505Above = _core_.Above
11506Below = _core_.Below
11507LeftOf = _core_.LeftOf
11508RightOf = _core_.RightOf
11509SameAs = _core_.SameAs
11510Absolute = _core_.Absolute
d14a1e28 11511class IndividualLayoutConstraint(Object):
15afbcd0 11512 """
41e2b43e
RD
11513 Objects of this class are stored in the `wx.LayoutConstraints` class as
11514 one of eight possible constraints that a window can be involved in.
11515 You will never need to create an instance of
11516 wx.IndividualLayoutConstraint, rather you should create a
11517 `wx.LayoutConstraints` instance and use the individual contstraints
15afbcd0 11518 that it contains.
15afbcd0 11519 """
d14a1e28
RD
11520 def __init__(self): raise RuntimeError, "No constructor defined"
11521 def __repr__(self):
11522 return "<%s.%s; proxy of C++ wxIndividualLayoutConstraint instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
e811c8ce 11523 def Set(*args, **kwargs):
41e2b43e
RD
11524 """
11525 Set(self, int rel, Window otherW, int otherE, int val=0, int marg=wxLAYOUT_DEFAULT_MARGIN)
11526
11527 Sets the properties of the constraint. Normally called by one of the
11528 convenience functions such as Above, RightOf, SameAs.
11529 """
54f9ee45 11530 return _core_.IndividualLayoutConstraint_Set(*args, **kwargs)
e811c8ce
RD
11531
11532 def LeftOf(*args, **kwargs):
15afbcd0 11533 """
a95a7133 11534 LeftOf(self, Window sibling, int marg=0)
15afbcd0 11535
41e2b43e
RD
11536 Constrains this edge to be to the left of the given window, with an
11537 optional margin. Implicitly, this is relative to the left edge of the
11538 other window.
15afbcd0 11539 """
54f9ee45 11540 return _core_.IndividualLayoutConstraint_LeftOf(*args, **kwargs)
e811c8ce
RD
11541
11542 def RightOf(*args, **kwargs):
15afbcd0 11543 """
a95a7133 11544 RightOf(self, Window sibling, int marg=0)
15afbcd0 11545
41e2b43e
RD
11546 Constrains this edge to be to the right of the given window, with an
11547 optional margin. Implicitly, this is relative to the right edge of the
11548 other window.
15afbcd0 11549 """
54f9ee45 11550 return _core_.IndividualLayoutConstraint_RightOf(*args, **kwargs)
e811c8ce
RD
11551
11552 def Above(*args, **kwargs):
15afbcd0 11553 """
a95a7133 11554 Above(self, Window sibling, int marg=0)
15afbcd0 11555
41e2b43e
RD
11556 Constrains this edge to be above the given window, with an optional
11557 margin. Implicitly, this is relative to the top edge of the other
11558 window.
15afbcd0 11559 """
54f9ee45 11560 return _core_.IndividualLayoutConstraint_Above(*args, **kwargs)
e811c8ce
RD
11561
11562 def Below(*args, **kwargs):
15afbcd0 11563 """
a95a7133 11564 Below(self, Window sibling, int marg=0)
15afbcd0 11565
41e2b43e
RD
11566 Constrains this edge to be below the given window, with an optional
11567 margin. Implicitly, this is relative to the bottom edge of the other
11568 window.
15afbcd0 11569 """
54f9ee45 11570 return _core_.IndividualLayoutConstraint_Below(*args, **kwargs)
e811c8ce
RD
11571
11572 def SameAs(*args, **kwargs):
15afbcd0 11573 """
a95a7133 11574 SameAs(self, Window otherW, int edge, int marg=0)
15afbcd0 11575
41e2b43e
RD
11576 Constrains this edge or dimension to be to the same as the edge of the
11577 given window, with an optional margin.
15afbcd0 11578 """
54f9ee45 11579 return _core_.IndividualLayoutConstraint_SameAs(*args, **kwargs)
e811c8ce
RD
11580
11581 def PercentOf(*args, **kwargs):
15afbcd0 11582 """
a95a7133 11583 PercentOf(self, Window otherW, int wh, int per)
15afbcd0 11584
41e2b43e
RD
11585 Constrains this edge or dimension to be to a percentage of the given
11586 window, with an optional margin.
15afbcd0 11587 """
54f9ee45 11588 return _core_.IndividualLayoutConstraint_PercentOf(*args, **kwargs)
e811c8ce
RD
11589
11590 def Absolute(*args, **kwargs):
15afbcd0 11591 """
a95a7133 11592 Absolute(self, int val)
15afbcd0 11593
41e2b43e 11594 Constrains this edge or dimension to be the given absolute value.
15afbcd0 11595 """
54f9ee45 11596 return _core_.IndividualLayoutConstraint_Absolute(*args, **kwargs)
e811c8ce
RD
11597
11598 def Unconstrained(*args, **kwargs):
15afbcd0 11599 """
a95a7133 11600 Unconstrained(self)
15afbcd0 11601
41e2b43e
RD
11602 Sets this edge or dimension to be unconstrained, that is, dependent on
11603 other edges and dimensions from which this value can be deduced.
15afbcd0 11604 """
54f9ee45 11605 return _core_.IndividualLayoutConstraint_Unconstrained(*args, **kwargs)
e811c8ce
RD
11606
11607 def AsIs(*args, **kwargs):
15afbcd0 11608 """
a95a7133 11609 AsIs(self)
15afbcd0 11610
41e2b43e
RD
11611 Sets this edge or constraint to be whatever the window's value is at
11612 the moment. If either of the width and height constraints are *as is*,
11613 the window will not be resized, but moved instead. This is important
11614 when considering panel items which are intended to have a default
11615 size, such as a button, which may take its size from the size of the
11616 button label.
15afbcd0 11617 """
54f9ee45 11618 return _core_.IndividualLayoutConstraint_AsIs(*args, **kwargs)
e811c8ce
RD
11619
11620 def GetOtherWindow(*args, **kwargs):
a95a7133 11621 """GetOtherWindow(self) -> Window"""
54f9ee45 11622 return _core_.IndividualLayoutConstraint_GetOtherWindow(*args, **kwargs)
e811c8ce
RD
11623
11624 def GetMyEdge(*args, **kwargs):
a95a7133 11625 """GetMyEdge(self) -> int"""
54f9ee45 11626 return _core_.IndividualLayoutConstraint_GetMyEdge(*args, **kwargs)
e811c8ce
RD
11627
11628 def SetEdge(*args, **kwargs):
a95a7133 11629 """SetEdge(self, int which)"""
54f9ee45 11630 return _core_.IndividualLayoutConstraint_SetEdge(*args, **kwargs)
e811c8ce
RD
11631
11632 def SetValue(*args, **kwargs):
a95a7133 11633 """SetValue(self, int v)"""
54f9ee45 11634 return _core_.IndividualLayoutConstraint_SetValue(*args, **kwargs)
e811c8ce
RD
11635
11636 def GetMargin(*args, **kwargs):
a95a7133 11637 """GetMargin(self) -> int"""
54f9ee45 11638 return _core_.IndividualLayoutConstraint_GetMargin(*args, **kwargs)
e811c8ce
RD
11639
11640 def SetMargin(*args, **kwargs):
a95a7133 11641 """SetMargin(self, int m)"""
54f9ee45 11642 return _core_.IndividualLayoutConstraint_SetMargin(*args, **kwargs)
e811c8ce
RD
11643
11644 def GetValue(*args, **kwargs):
a95a7133 11645 """GetValue(self) -> int"""
54f9ee45 11646 return _core_.IndividualLayoutConstraint_GetValue(*args, **kwargs)
e811c8ce
RD
11647
11648 def GetPercent(*args, **kwargs):
a95a7133 11649 """GetPercent(self) -> int"""
54f9ee45 11650 return _core_.IndividualLayoutConstraint_GetPercent(*args, **kwargs)
e811c8ce
RD
11651
11652 def GetOtherEdge(*args, **kwargs):
a95a7133 11653 """GetOtherEdge(self) -> int"""
54f9ee45 11654 return _core_.IndividualLayoutConstraint_GetOtherEdge(*args, **kwargs)
e811c8ce
RD
11655
11656 def GetDone(*args, **kwargs):
a95a7133 11657 """GetDone(self) -> bool"""
54f9ee45 11658 return _core_.IndividualLayoutConstraint_GetDone(*args, **kwargs)
e811c8ce
RD
11659
11660 def SetDone(*args, **kwargs):
a95a7133 11661 """SetDone(self, bool d)"""
54f9ee45 11662 return _core_.IndividualLayoutConstraint_SetDone(*args, **kwargs)
e811c8ce
RD
11663
11664 def GetRelationship(*args, **kwargs):
a95a7133 11665 """GetRelationship(self) -> int"""
54f9ee45 11666 return _core_.IndividualLayoutConstraint_GetRelationship(*args, **kwargs)
e811c8ce
RD
11667
11668 def SetRelationship(*args, **kwargs):
a95a7133 11669 """SetRelationship(self, int r)"""
54f9ee45 11670 return _core_.IndividualLayoutConstraint_SetRelationship(*args, **kwargs)
e811c8ce
RD
11671
11672 def ResetIfWin(*args, **kwargs):
15afbcd0 11673 """
a95a7133 11674 ResetIfWin(self, Window otherW) -> bool
15afbcd0
RD
11675
11676 Reset constraint if it mentions otherWin
11677 """
54f9ee45 11678 return _core_.IndividualLayoutConstraint_ResetIfWin(*args, **kwargs)
e811c8ce
RD
11679
11680 def SatisfyConstraint(*args, **kwargs):
15afbcd0 11681 """
a95a7133 11682 SatisfyConstraint(self, LayoutConstraints constraints, Window win) -> bool
15afbcd0
RD
11683
11684 Try to satisfy constraint
11685 """
54f9ee45 11686 return _core_.IndividualLayoutConstraint_SatisfyConstraint(*args, **kwargs)
e811c8ce
RD
11687
11688 def GetEdge(*args, **kwargs):
15afbcd0 11689 """
a95a7133 11690 GetEdge(self, int which, Window thisWin, Window other) -> int
15afbcd0
RD
11691
11692 Get the value of this edge or dimension, or if this
11693 is not determinable, -1.
11694 """
54f9ee45 11695 return _core_.IndividualLayoutConstraint_GetEdge(*args, **kwargs)
e811c8ce 11696
d14a1e28
RD
11697
11698class IndividualLayoutConstraintPtr(IndividualLayoutConstraint):
11699 def __init__(self, this):
11700 self.this = this
11701 if not hasattr(self,"thisown"): self.thisown = 0
11702 self.__class__ = IndividualLayoutConstraint
54f9ee45 11703_core_.IndividualLayoutConstraint_swigregister(IndividualLayoutConstraintPtr)
d14a1e28
RD
11704
11705class LayoutConstraints(Object):
15afbcd0 11706 """
41e2b43e
RD
11707 **Note:** constraints are now deprecated and you should use sizers
11708 instead.
15afbcd0 11709
41e2b43e
RD
11710 Objects of this class can be associated with a window to define its
11711 layout constraints, with respect to siblings or its parent.
15afbcd0
RD
11712
11713 The class consists of the following eight constraints of class
11714 wx.IndividualLayoutConstraint, some or all of which should be accessed
11715 directly to set the appropriate constraints.
11716
11717 * left: represents the left hand edge of the window
11718 * right: represents the right hand edge of the window
11719 * top: represents the top edge of the window
11720 * bottom: represents the bottom edge of the window
11721 * width: represents the width of the window
11722 * height: represents the height of the window
11723 * centreX: represents the horizontal centre point of the window
11724 * centreY: represents the vertical centre point of the window
11725
41e2b43e
RD
11726 Most constraints are initially set to have the relationship
11727 wxUnconstrained, which means that their values should be calculated by
11728 looking at known constraints. The exceptions are width and height,
11729 which are set to wxAsIs to ensure that if the user does not specify a
11730 constraint, the existing width and height will be used, to be
11731 compatible with panel items which often have take a default size. If
11732 the constraint is ``wx.AsIs``, the dimension will not be changed.
11733
11734 :see: `wx.IndividualLayoutConstraint`, `wx.Window.SetConstraints`
15afbcd0
RD
11735
11736 """
e811c8ce
RD
11737 def __repr__(self):
11738 return "<%s.%s; proxy of C++ wxLayoutConstraints instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
54f9ee45
RD
11739 left = property(_core_.LayoutConstraints_left_get)
11740 top = property(_core_.LayoutConstraints_top_get)
11741 right = property(_core_.LayoutConstraints_right_get)
11742 bottom = property(_core_.LayoutConstraints_bottom_get)
11743 width = property(_core_.LayoutConstraints_width_get)
11744 height = property(_core_.LayoutConstraints_height_get)
11745 centreX = property(_core_.LayoutConstraints_centreX_get)
11746 centreY = property(_core_.LayoutConstraints_centreY_get)
d14a1e28 11747 def __init__(self, *args, **kwargs):
a95a7133 11748 """__init__(self) -> LayoutConstraints"""
54f9ee45 11749 newobj = _core_.new_LayoutConstraints(*args, **kwargs)
d14a1e28
RD
11750 self.this = newobj.this
11751 self.thisown = 1
11752 del newobj.thisown
e811c8ce 11753 def SatisfyConstraints(*args, **kwargs):
6c3b4aae 11754 """SatisfyConstraints(Window win) -> (areSatisfied, noChanges)"""
54f9ee45 11755 return _core_.LayoutConstraints_SatisfyConstraints(*args, **kwargs)
e811c8ce
RD
11756
11757 def AreSatisfied(*args, **kwargs):
a95a7133 11758 """AreSatisfied(self) -> bool"""
54f9ee45 11759 return _core_.LayoutConstraints_AreSatisfied(*args, **kwargs)
e811c8ce 11760
d14a1e28
RD
11761
11762class LayoutConstraintsPtr(LayoutConstraints):
11763 def __init__(self, this):
11764 self.this = this
11765 if not hasattr(self,"thisown"): self.thisown = 0
11766 self.__class__ = LayoutConstraints
54f9ee45 11767_core_.LayoutConstraints_swigregister(LayoutConstraintsPtr)
d14a1e28
RD
11768
11769#----------------------------------------------------------------------------
11770
322913ce 11771# Use Python's bool constants if available, make some if not
d14a1e28
RD
11772try:
11773 True
11774except NameError:
322913ce
RD
11775 __builtins__.True = 1==1
11776 __builtins__.False = 1==0
4f89f6a3
RD
11777 def bool(value): return not not value
11778 __builtins__.bool = bool
d14a1e28 11779
d14a1e28
RD
11780
11781
11782# workarounds for bad wxRTTI names
11783__wxPyPtrTypeMap['wxGauge95'] = 'wxGauge'
11784__wxPyPtrTypeMap['wxSlider95'] = 'wxSlider'
11785__wxPyPtrTypeMap['wxStatusBar95'] = 'wxStatusBar'
11786
11787
11788#----------------------------------------------------------------------------
11789# Load version numbers from __version__... Ensure that major and minor
7bc1e663 11790# versions are the same for both wxPython and wxWidgets.
d14a1e28
RD
11791
11792from __version__ import *
11793__version__ = VERSION_STRING
11794
7bc1e663
RD
11795assert MAJOR_VERSION == _core_.MAJOR_VERSION, "wxPython/wxWidgets version mismatch"
11796assert MINOR_VERSION == _core_.MINOR_VERSION, "wxPython/wxWidgets version mismatch"
54f9ee45 11797if RELEASE_VERSION != _core_.RELEASE_VERSION:
d14a1e28 11798 import warnings
7bc1e663 11799 warnings.warn("wxPython/wxWidgets release number mismatch")
d14a1e28
RD
11800
11801#----------------------------------------------------------------------------
11802
70b7a5fe
RD
11803# Set wxPython's default string<-->unicode conversion encoding from
11804# the locale, but only if Python's default hasn't been changed. (We
11805# assume that if the user has customized it already then that is the
11806# encoding we need to use as well.)
11807#
11808# The encoding selected here is used when string or unicode objects
11809# need to be converted in order to pass them to wxWidgets. Please be
11810# aware that the default encoding within the same locale may be
11811# slightly different on different platforms. For example, please see
e505d15e
RD
11812# http://www.alanwood.net/demos/charsetdiffs.html for differences
11813# between the common latin/roman encodings.
396fb509
RD
11814
11815default = _sys.getdefaultencoding()
11816if default == 'ascii':
11817 import locale
11818 import codecs
11819 try:
11820 default = locale.getdefaultlocale()[1]
11821 codecs.lookup(default)
70b7a5fe 11822 except (ValueError, LookupError, TypeError):
396fb509
RD
11823 default = _sys.getdefaultencoding()
11824 del locale
11825 del codecs
5cbf236d
RD
11826if default:
11827 wx.SetDefaultPyEncoding(default)
11828del default
5cbf236d
RD
11829
11830#----------------------------------------------------------------------------
11831
d14a1e28
RD
11832class PyDeadObjectError(AttributeError):
11833 pass
11834
d14a1e28
RD
11835class _wxPyDeadObject(object):
11836 """
11837 Instances of wx objects that are OOR capable will have their __class__
11838 changed to this class when the C++ object is deleted. This should help
11839 prevent crashes due to referencing a bogus C++ pointer.
11840 """
11841 reprStr = "wxPython wrapper for DELETED %s object! (The C++ object no longer exists.)"
11842 attrStr = "The C++ part of the %s object has been deleted, attribute access no longer allowed."
11843
3a04f143 11844 def __repr__(self):
d14a1e28
RD
11845 if not hasattr(self, "_name"):
11846 self._name = "[unknown]"
11847 return self.reprStr % self._name
11848
3a04f143 11849 def __getattr__(self, *args):
d14a1e28
RD
11850 if not hasattr(self, "_name"):
11851 self._name = "[unknown]"
3a04f143
RD
11852 raise PyDeadObjectError(self.attrStr % self._name)
11853
11854 def __nonzero__(self):
11855 return 0
11856
11857
11858
11859class PyUnbornObjectError(AttributeError):
11860 pass
11861
11862class _wxPyUnbornObject(object):
11863 """
54f9ee45 11864 Some stock objects are created when the wx._core module is
3a04f143
RD
11865 imported, but their C++ instance is not created until the wx.App
11866 object is created and initialized. These object instances will
11867 temporarily have their __class__ changed to this class so an
11868 exception will be raised if they are used before the C++ instance
11869 is ready.
11870 """
11871
11872 reprStr = "wxPython wrapper for UNBORN object! (The C++ object is not initialized yet.)"
11873 attrStr = "The C++ part of this object has not been initialized, attribute access not allowed."
11874
11875 def __repr__(self):
11876 #if not hasattr(self, "_name"):
11877 # self._name = "[unknown]"
11878 return self.reprStr #% self._name
11879
11880 def __getattr__(self, *args):
11881 #if not hasattr(self, "_name"):
11882 # self._name = "[unknown]"
11883 raise PyUnbornObjectError(self.attrStr) # % self._name )
d14a1e28
RD
11884
11885 def __nonzero__(self):
11886 return 0
11887
11888
11889#----------------------------------------------------------------------------
d14a1e28
RD
11890
11891def CallAfter(callable, *args, **kw):
11892 """
11893 Call the specified function after the current and pending event
11894 handlers have been completed. This is also good for making GUI
61863841
RD
11895 method calls from non-GUI threads. Any extra positional or
11896 keyword args are passed on to the callable when it is called.
11897
11898 :see: `wx.FutureCall`
d14a1e28
RD
11899 """
11900 app = wx.GetApp()
dfbb5885 11901 assert app is not None, 'No wx.App created yet'
d14a1e28 11902
148275d3
RD
11903 if not hasattr(app, "_CallAfterId"):
11904 app._CallAfterId = wx.NewEventType()
11905 app.Connect(-1, -1, app._CallAfterId,
11906 lambda event: event.callable(*event.args, **event.kw) )
d14a1e28 11907 evt = wx.PyEvent()
148275d3 11908 evt.SetEventType(app._CallAfterId)
d14a1e28
RD
11909 evt.callable = callable
11910 evt.args = args
11911 evt.kw = kw
11912 wx.PostEvent(app, evt)
11913
d14a1e28
RD
11914#----------------------------------------------------------------------------
11915
11916
11917class FutureCall:
11918 """
8ac8dba0 11919 A convenience class for `wx.Timer`, that calls the given callable
d14a1e28
RD
11920 object once after the given amount of milliseconds, passing any
11921 positional or keyword args. The return value of the callable is
61863841 11922 availbale after it has been run with the `GetResult` method.
d14a1e28
RD
11923
11924 If you don't need to get the return value or restart the timer
11925 then there is no need to hold a reference to this object. It will
11926 hold a reference to itself while the timer is running (the timer
11927 has a reference to self.Notify) but the cycle will be broken when
11928 the timer completes, automatically cleaning up the wx.FutureCall
11929 object.
61863841
RD
11930
11931 :see: `wx.CallAfter`
d14a1e28
RD
11932 """
11933 def __init__(self, millis, callable, *args, **kwargs):
11934 self.millis = millis
11935 self.callable = callable
11936 self.SetArgs(*args, **kwargs)
11937 self.runCount = 0
4276dc52 11938 self.running = False
d14a1e28
RD
11939 self.hasRun = False
11940 self.result = None
11941 self.timer = None
11942 self.Start()
11943
11944 def __del__(self):
11945 self.Stop()
11946
11947
11948 def Start(self, millis=None, *args, **kwargs):
11949 """
11950 (Re)start the timer
11951 """
11952 self.hasRun = False
11953 if millis is not None:
11954 self.millis = millis
11955 if args or kwargs:
11956 self.SetArgs(*args, **kwargs)
11957 self.Stop()
11958 self.timer = wx.PyTimer(self.Notify)
11959 self.timer.Start(self.millis, wx.TIMER_ONE_SHOT)
4276dc52 11960 self.running = True
d14a1e28
RD
11961 Restart = Start
11962
11963
11964 def Stop(self):
11965 """
11966 Stop and destroy the timer.
11967 """
11968 if self.timer is not None:
11969 self.timer.Stop()
11970 self.timer = None
11971
11972
11973 def GetInterval(self):
11974 if self.timer is not None:
11975 return self.timer.GetInterval()
11976 else:
11977 return 0
11978
11979
11980 def IsRunning(self):
11981 return self.timer is not None and self.timer.IsRunning()
11982
11983
11984 def SetArgs(self, *args, **kwargs):
11985 """
11986 (Re)set the args passed to the callable object. This is
11987 useful in conjunction with Restart if you want to schedule a
11988 new call to the same callable object but with different
11989 parameters.
11990 """
11991 self.args = args
11992 self.kwargs = kwargs
11993
11994
11995 def HasRun(self):
11996 return self.hasRun
11997
11998 def GetResult(self):
11999 return self.result
12000
12001 def Notify(self):
12002 """
12003 The timer has expired so call the callable.
12004 """
12005 if self.callable and getattr(self.callable, 'im_self', True):
12006 self.runCount += 1
4276dc52 12007 self.running = False
d14a1e28
RD
12008 self.result = self.callable(*self.args, **self.kwargs)
12009 self.hasRun = True
4276dc52
RD
12010 if not self.running:
12011 # if it wasn't restarted, then cleanup
12012 wx.CallAfter(self.Stop)
d14a1e28
RD
12013
12014
a95a7133
RD
12015
12016#----------------------------------------------------------------------------
12017# Control which items in this module should be documented by epydoc.
12018# We allow only classes and functions, which will help reduce the size
12019# of the docs by filtering out the zillions of constants, EVT objects,
12020# and etc that don't make much sense by themselves, but are instead
12021# documented (or will be) as part of the classes/functions/methods
12022# where they should be used.
12023
66c033b4
RD
12024class __DocFilter:
12025 """
12026 A filter for epydoc that only allows non-Ptr classes and
12027 fucntions, in order to reduce the clutter in the API docs.
12028 """
12029 def __init__(self, globals):
12030 self._globals = globals
12031
12032 def __call__(self, name):
12033 import types
12034 obj = self._globals.get(name, None)
12035 if type(obj) not in [type, types.ClassType, types.FunctionType, types.BuiltinFunctionType]:
12036 return False
12037 if name.startswith('_') or name.endswith('Ptr') or name.startswith('EVT'):
12038 return False
12039 return True
a95a7133 12040
d14a1e28
RD
12041#----------------------------------------------------------------------------
12042#----------------------------------------------------------------------------
12043
12044# Import other modules in this package that should show up in the
12045# "core" wx namespace
54f9ee45
RD
12046from _gdi import *
12047from _windows import *
12048from _controls import *
12049from _misc import *
d14a1e28 12050
3a04f143
RD
12051
12052# Fixup the stock objects since they can't be used yet. (They will be
12053# restored in wx.PyApp.OnInit.)
54f9ee45 12054_core_._wxPyFixStockObjects()
3a04f143 12055
d14a1e28
RD
12056#----------------------------------------------------------------------------
12057#----------------------------------------------------------------------------
12058
12059