]> git.saurik.com Git - wxWidgets.git/blame - wxPython/src/gtk/_core.py
Add support for launching APPL bundles with wxExecute
[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
375BDIAGONAL_HATCH = _core_.BDIAGONAL_HATCH
376CROSSDIAG_HATCH = _core_.CROSSDIAG_HATCH
377FDIAGONAL_HATCH = _core_.FDIAGONAL_HATCH
378CROSS_HATCH = _core_.CROSS_HATCH
379HORIZONTAL_HATCH = _core_.HORIZONTAL_HATCH
380VERTICAL_HATCH = _core_.VERTICAL_HATCH
381JOIN_BEVEL = _core_.JOIN_BEVEL
382JOIN_MITER = _core_.JOIN_MITER
383JOIN_ROUND = _core_.JOIN_ROUND
384CAP_ROUND = _core_.CAP_ROUND
385CAP_PROJECTING = _core_.CAP_PROJECTING
386CAP_BUTT = _core_.CAP_BUTT
387CLEAR = _core_.CLEAR
388XOR = _core_.XOR
389INVERT = _core_.INVERT
390OR_REVERSE = _core_.OR_REVERSE
391AND_REVERSE = _core_.AND_REVERSE
392COPY = _core_.COPY
393AND = _core_.AND
394AND_INVERT = _core_.AND_INVERT
395NO_OP = _core_.NO_OP
396NOR = _core_.NOR
397EQUIV = _core_.EQUIV
398SRC_INVERT = _core_.SRC_INVERT
399OR_INVERT = _core_.OR_INVERT
400NAND = _core_.NAND
401OR = _core_.OR
402SET = _core_.SET
403WXK_BACK = _core_.WXK_BACK
404WXK_TAB = _core_.WXK_TAB
405WXK_RETURN = _core_.WXK_RETURN
406WXK_ESCAPE = _core_.WXK_ESCAPE
407WXK_SPACE = _core_.WXK_SPACE
408WXK_DELETE = _core_.WXK_DELETE
409WXK_START = _core_.WXK_START
410WXK_LBUTTON = _core_.WXK_LBUTTON
411WXK_RBUTTON = _core_.WXK_RBUTTON
412WXK_CANCEL = _core_.WXK_CANCEL
413WXK_MBUTTON = _core_.WXK_MBUTTON
414WXK_CLEAR = _core_.WXK_CLEAR
415WXK_SHIFT = _core_.WXK_SHIFT
416WXK_ALT = _core_.WXK_ALT
417WXK_CONTROL = _core_.WXK_CONTROL
418WXK_MENU = _core_.WXK_MENU
419WXK_PAUSE = _core_.WXK_PAUSE
420WXK_CAPITAL = _core_.WXK_CAPITAL
421WXK_PRIOR = _core_.WXK_PRIOR
422WXK_NEXT = _core_.WXK_NEXT
423WXK_END = _core_.WXK_END
424WXK_HOME = _core_.WXK_HOME
425WXK_LEFT = _core_.WXK_LEFT
426WXK_UP = _core_.WXK_UP
427WXK_RIGHT = _core_.WXK_RIGHT
428WXK_DOWN = _core_.WXK_DOWN
429WXK_SELECT = _core_.WXK_SELECT
430WXK_PRINT = _core_.WXK_PRINT
431WXK_EXECUTE = _core_.WXK_EXECUTE
432WXK_SNAPSHOT = _core_.WXK_SNAPSHOT
433WXK_INSERT = _core_.WXK_INSERT
434WXK_HELP = _core_.WXK_HELP
435WXK_NUMPAD0 = _core_.WXK_NUMPAD0
436WXK_NUMPAD1 = _core_.WXK_NUMPAD1
437WXK_NUMPAD2 = _core_.WXK_NUMPAD2
438WXK_NUMPAD3 = _core_.WXK_NUMPAD3
439WXK_NUMPAD4 = _core_.WXK_NUMPAD4
440WXK_NUMPAD5 = _core_.WXK_NUMPAD5
441WXK_NUMPAD6 = _core_.WXK_NUMPAD6
442WXK_NUMPAD7 = _core_.WXK_NUMPAD7
443WXK_NUMPAD8 = _core_.WXK_NUMPAD8
444WXK_NUMPAD9 = _core_.WXK_NUMPAD9
445WXK_MULTIPLY = _core_.WXK_MULTIPLY
446WXK_ADD = _core_.WXK_ADD
447WXK_SEPARATOR = _core_.WXK_SEPARATOR
448WXK_SUBTRACT = _core_.WXK_SUBTRACT
449WXK_DECIMAL = _core_.WXK_DECIMAL
450WXK_DIVIDE = _core_.WXK_DIVIDE
451WXK_F1 = _core_.WXK_F1
452WXK_F2 = _core_.WXK_F2
453WXK_F3 = _core_.WXK_F3
454WXK_F4 = _core_.WXK_F4
455WXK_F5 = _core_.WXK_F5
456WXK_F6 = _core_.WXK_F6
457WXK_F7 = _core_.WXK_F7
458WXK_F8 = _core_.WXK_F8
459WXK_F9 = _core_.WXK_F9
460WXK_F10 = _core_.WXK_F10
461WXK_F11 = _core_.WXK_F11
462WXK_F12 = _core_.WXK_F12
463WXK_F13 = _core_.WXK_F13
464WXK_F14 = _core_.WXK_F14
465WXK_F15 = _core_.WXK_F15
466WXK_F16 = _core_.WXK_F16
467WXK_F17 = _core_.WXK_F17
468WXK_F18 = _core_.WXK_F18
469WXK_F19 = _core_.WXK_F19
470WXK_F20 = _core_.WXK_F20
471WXK_F21 = _core_.WXK_F21
472WXK_F22 = _core_.WXK_F22
473WXK_F23 = _core_.WXK_F23
474WXK_F24 = _core_.WXK_F24
475WXK_NUMLOCK = _core_.WXK_NUMLOCK
476WXK_SCROLL = _core_.WXK_SCROLL
477WXK_PAGEUP = _core_.WXK_PAGEUP
478WXK_PAGEDOWN = _core_.WXK_PAGEDOWN
479WXK_NUMPAD_SPACE = _core_.WXK_NUMPAD_SPACE
480WXK_NUMPAD_TAB = _core_.WXK_NUMPAD_TAB
481WXK_NUMPAD_ENTER = _core_.WXK_NUMPAD_ENTER
482WXK_NUMPAD_F1 = _core_.WXK_NUMPAD_F1
483WXK_NUMPAD_F2 = _core_.WXK_NUMPAD_F2
484WXK_NUMPAD_F3 = _core_.WXK_NUMPAD_F3
485WXK_NUMPAD_F4 = _core_.WXK_NUMPAD_F4
486WXK_NUMPAD_HOME = _core_.WXK_NUMPAD_HOME
487WXK_NUMPAD_LEFT = _core_.WXK_NUMPAD_LEFT
488WXK_NUMPAD_UP = _core_.WXK_NUMPAD_UP
489WXK_NUMPAD_RIGHT = _core_.WXK_NUMPAD_RIGHT
490WXK_NUMPAD_DOWN = _core_.WXK_NUMPAD_DOWN
491WXK_NUMPAD_PRIOR = _core_.WXK_NUMPAD_PRIOR
492WXK_NUMPAD_PAGEUP = _core_.WXK_NUMPAD_PAGEUP
493WXK_NUMPAD_NEXT = _core_.WXK_NUMPAD_NEXT
494WXK_NUMPAD_PAGEDOWN = _core_.WXK_NUMPAD_PAGEDOWN
495WXK_NUMPAD_END = _core_.WXK_NUMPAD_END
496WXK_NUMPAD_BEGIN = _core_.WXK_NUMPAD_BEGIN
497WXK_NUMPAD_INSERT = _core_.WXK_NUMPAD_INSERT
498WXK_NUMPAD_DELETE = _core_.WXK_NUMPAD_DELETE
499WXK_NUMPAD_EQUAL = _core_.WXK_NUMPAD_EQUAL
500WXK_NUMPAD_MULTIPLY = _core_.WXK_NUMPAD_MULTIPLY
501WXK_NUMPAD_ADD = _core_.WXK_NUMPAD_ADD
502WXK_NUMPAD_SEPARATOR = _core_.WXK_NUMPAD_SEPARATOR
503WXK_NUMPAD_SUBTRACT = _core_.WXK_NUMPAD_SUBTRACT
504WXK_NUMPAD_DECIMAL = _core_.WXK_NUMPAD_DECIMAL
505WXK_NUMPAD_DIVIDE = _core_.WXK_NUMPAD_DIVIDE
506WXK_WINDOWS_LEFT = _core_.WXK_WINDOWS_LEFT
507WXK_WINDOWS_RIGHT = _core_.WXK_WINDOWS_RIGHT
508WXK_WINDOWS_MENU = _core_.WXK_WINDOWS_MENU
88c6b281
RD
509WXK_COMMAND = _core_.WXK_COMMAND
510WXK_SPECIAL1 = _core_.WXK_SPECIAL1
511WXK_SPECIAL2 = _core_.WXK_SPECIAL2
512WXK_SPECIAL3 = _core_.WXK_SPECIAL3
513WXK_SPECIAL4 = _core_.WXK_SPECIAL4
514WXK_SPECIAL5 = _core_.WXK_SPECIAL5
515WXK_SPECIAL6 = _core_.WXK_SPECIAL6
516WXK_SPECIAL7 = _core_.WXK_SPECIAL7
517WXK_SPECIAL8 = _core_.WXK_SPECIAL8
518WXK_SPECIAL9 = _core_.WXK_SPECIAL9
519WXK_SPECIAL10 = _core_.WXK_SPECIAL10
520WXK_SPECIAL11 = _core_.WXK_SPECIAL11
521WXK_SPECIAL12 = _core_.WXK_SPECIAL12
522WXK_SPECIAL13 = _core_.WXK_SPECIAL13
523WXK_SPECIAL14 = _core_.WXK_SPECIAL14
524WXK_SPECIAL15 = _core_.WXK_SPECIAL15
525WXK_SPECIAL16 = _core_.WXK_SPECIAL16
526WXK_SPECIAL17 = _core_.WXK_SPECIAL17
527WXK_SPECIAL18 = _core_.WXK_SPECIAL18
528WXK_SPECIAL19 = _core_.WXK_SPECIAL19
529WXK_SPECIAL20 = _core_.WXK_SPECIAL20
54f9ee45
RD
530PAPER_NONE = _core_.PAPER_NONE
531PAPER_LETTER = _core_.PAPER_LETTER
532PAPER_LEGAL = _core_.PAPER_LEGAL
533PAPER_A4 = _core_.PAPER_A4
534PAPER_CSHEET = _core_.PAPER_CSHEET
535PAPER_DSHEET = _core_.PAPER_DSHEET
536PAPER_ESHEET = _core_.PAPER_ESHEET
537PAPER_LETTERSMALL = _core_.PAPER_LETTERSMALL
538PAPER_TABLOID = _core_.PAPER_TABLOID
539PAPER_LEDGER = _core_.PAPER_LEDGER
540PAPER_STATEMENT = _core_.PAPER_STATEMENT
541PAPER_EXECUTIVE = _core_.PAPER_EXECUTIVE
542PAPER_A3 = _core_.PAPER_A3
543PAPER_A4SMALL = _core_.PAPER_A4SMALL
544PAPER_A5 = _core_.PAPER_A5
545PAPER_B4 = _core_.PAPER_B4
546PAPER_B5 = _core_.PAPER_B5
547PAPER_FOLIO = _core_.PAPER_FOLIO
548PAPER_QUARTO = _core_.PAPER_QUARTO
549PAPER_10X14 = _core_.PAPER_10X14
550PAPER_11X17 = _core_.PAPER_11X17
551PAPER_NOTE = _core_.PAPER_NOTE
552PAPER_ENV_9 = _core_.PAPER_ENV_9
553PAPER_ENV_10 = _core_.PAPER_ENV_10
554PAPER_ENV_11 = _core_.PAPER_ENV_11
555PAPER_ENV_12 = _core_.PAPER_ENV_12
556PAPER_ENV_14 = _core_.PAPER_ENV_14
557PAPER_ENV_DL = _core_.PAPER_ENV_DL
558PAPER_ENV_C5 = _core_.PAPER_ENV_C5
559PAPER_ENV_C3 = _core_.PAPER_ENV_C3
560PAPER_ENV_C4 = _core_.PAPER_ENV_C4
561PAPER_ENV_C6 = _core_.PAPER_ENV_C6
562PAPER_ENV_C65 = _core_.PAPER_ENV_C65
563PAPER_ENV_B4 = _core_.PAPER_ENV_B4
564PAPER_ENV_B5 = _core_.PAPER_ENV_B5
565PAPER_ENV_B6 = _core_.PAPER_ENV_B6
566PAPER_ENV_ITALY = _core_.PAPER_ENV_ITALY
567PAPER_ENV_MONARCH = _core_.PAPER_ENV_MONARCH
568PAPER_ENV_PERSONAL = _core_.PAPER_ENV_PERSONAL
569PAPER_FANFOLD_US = _core_.PAPER_FANFOLD_US
570PAPER_FANFOLD_STD_GERMAN = _core_.PAPER_FANFOLD_STD_GERMAN
571PAPER_FANFOLD_LGL_GERMAN = _core_.PAPER_FANFOLD_LGL_GERMAN
572PAPER_ISO_B4 = _core_.PAPER_ISO_B4
573PAPER_JAPANESE_POSTCARD = _core_.PAPER_JAPANESE_POSTCARD
574PAPER_9X11 = _core_.PAPER_9X11
575PAPER_10X11 = _core_.PAPER_10X11
576PAPER_15X11 = _core_.PAPER_15X11
577PAPER_ENV_INVITE = _core_.PAPER_ENV_INVITE
578PAPER_LETTER_EXTRA = _core_.PAPER_LETTER_EXTRA
579PAPER_LEGAL_EXTRA = _core_.PAPER_LEGAL_EXTRA
580PAPER_TABLOID_EXTRA = _core_.PAPER_TABLOID_EXTRA
581PAPER_A4_EXTRA = _core_.PAPER_A4_EXTRA
582PAPER_LETTER_TRANSVERSE = _core_.PAPER_LETTER_TRANSVERSE
583PAPER_A4_TRANSVERSE = _core_.PAPER_A4_TRANSVERSE
584PAPER_LETTER_EXTRA_TRANSVERSE = _core_.PAPER_LETTER_EXTRA_TRANSVERSE
585PAPER_A_PLUS = _core_.PAPER_A_PLUS
586PAPER_B_PLUS = _core_.PAPER_B_PLUS
587PAPER_LETTER_PLUS = _core_.PAPER_LETTER_PLUS
588PAPER_A4_PLUS = _core_.PAPER_A4_PLUS
589PAPER_A5_TRANSVERSE = _core_.PAPER_A5_TRANSVERSE
590PAPER_B5_TRANSVERSE = _core_.PAPER_B5_TRANSVERSE
591PAPER_A3_EXTRA = _core_.PAPER_A3_EXTRA
592PAPER_A5_EXTRA = _core_.PAPER_A5_EXTRA
593PAPER_B5_EXTRA = _core_.PAPER_B5_EXTRA
594PAPER_A2 = _core_.PAPER_A2
595PAPER_A3_TRANSVERSE = _core_.PAPER_A3_TRANSVERSE
596PAPER_A3_EXTRA_TRANSVERSE = _core_.PAPER_A3_EXTRA_TRANSVERSE
597DUPLEX_SIMPLEX = _core_.DUPLEX_SIMPLEX
598DUPLEX_HORIZONTAL = _core_.DUPLEX_HORIZONTAL
599DUPLEX_VERTICAL = _core_.DUPLEX_VERTICAL
600ITEM_SEPARATOR = _core_.ITEM_SEPARATOR
601ITEM_NORMAL = _core_.ITEM_NORMAL
602ITEM_CHECK = _core_.ITEM_CHECK
603ITEM_RADIO = _core_.ITEM_RADIO
604ITEM_MAX = _core_.ITEM_MAX
605HT_NOWHERE = _core_.HT_NOWHERE
606HT_SCROLLBAR_FIRST = _core_.HT_SCROLLBAR_FIRST
607HT_SCROLLBAR_ARROW_LINE_1 = _core_.HT_SCROLLBAR_ARROW_LINE_1
608HT_SCROLLBAR_ARROW_LINE_2 = _core_.HT_SCROLLBAR_ARROW_LINE_2
609HT_SCROLLBAR_ARROW_PAGE_1 = _core_.HT_SCROLLBAR_ARROW_PAGE_1
610HT_SCROLLBAR_ARROW_PAGE_2 = _core_.HT_SCROLLBAR_ARROW_PAGE_2
611HT_SCROLLBAR_THUMB = _core_.HT_SCROLLBAR_THUMB
612HT_SCROLLBAR_BAR_1 = _core_.HT_SCROLLBAR_BAR_1
613HT_SCROLLBAR_BAR_2 = _core_.HT_SCROLLBAR_BAR_2
614HT_SCROLLBAR_LAST = _core_.HT_SCROLLBAR_LAST
615HT_WINDOW_OUTSIDE = _core_.HT_WINDOW_OUTSIDE
616HT_WINDOW_INSIDE = _core_.HT_WINDOW_INSIDE
617HT_WINDOW_VERT_SCROLLBAR = _core_.HT_WINDOW_VERT_SCROLLBAR
618HT_WINDOW_HORZ_SCROLLBAR = _core_.HT_WINDOW_HORZ_SCROLLBAR
619HT_WINDOW_CORNER = _core_.HT_WINDOW_CORNER
620HT_MAX = _core_.HT_MAX
621MOD_NONE = _core_.MOD_NONE
622MOD_ALT = _core_.MOD_ALT
623MOD_CONTROL = _core_.MOD_CONTROL
624MOD_SHIFT = _core_.MOD_SHIFT
625MOD_WIN = _core_.MOD_WIN
626UPDATE_UI_NONE = _core_.UPDATE_UI_NONE
627UPDATE_UI_RECURSE = _core_.UPDATE_UI_RECURSE
628UPDATE_UI_FROMIDLE = _core_.UPDATE_UI_FROMIDLE
d14a1e28
RD
629#---------------------------------------------------------------------------
630
631class Object(object):
0df68c9f
RD
632 """
633 The base class for most wx objects, although in wxPython not
634 much functionality is needed nor exposed.
635 """
d14a1e28
RD
636 def __init__(self): raise RuntimeError, "No constructor defined"
637 def __repr__(self):
638 return "<%s.%s; proxy of C++ wxObject instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
e811c8ce 639 def GetClassName(*args, **kwargs):
0df68c9f 640 """
a95a7133 641 GetClassName(self) -> String
e811c8ce 642
a95a7133 643 Returns the class name of the C++ class using wxRTTI.
0df68c9f 644 """
54f9ee45 645 return _core_.Object_GetClassName(*args, **kwargs)
e811c8ce
RD
646
647 def Destroy(*args, **kwargs):
0df68c9f 648 """
a95a7133 649 Destroy(self)
e811c8ce 650
0df68c9f
RD
651 Deletes the C++ object this Python object is a proxy for.
652 """
54f9ee45 653 return _core_.Object_Destroy(*args, **kwargs)
e811c8ce 654
d14a1e28
RD
655
656class ObjectPtr(Object):
657 def __init__(self, this):
658 self.this = this
659 if not hasattr(self,"thisown"): self.thisown = 0
660 self.__class__ = Object
54f9ee45
RD
661_core_.Object_swigregister(ObjectPtr)
662_wxPySetDictionary = _core_._wxPySetDictionary
d14a1e28 663
54f9ee45 664_wxPyFixStockObjects = _core_._wxPyFixStockObjects
3a04f143 665
54f9ee45 666cvar = _core_.cvar
196addbf 667EmptyString = cvar.EmptyString
d14a1e28
RD
668
669#---------------------------------------------------------------------------
670
54f9ee45
RD
671BITMAP_TYPE_INVALID = _core_.BITMAP_TYPE_INVALID
672BITMAP_TYPE_BMP = _core_.BITMAP_TYPE_BMP
673BITMAP_TYPE_ICO = _core_.BITMAP_TYPE_ICO
674BITMAP_TYPE_CUR = _core_.BITMAP_TYPE_CUR
675BITMAP_TYPE_XBM = _core_.BITMAP_TYPE_XBM
676BITMAP_TYPE_XBM_DATA = _core_.BITMAP_TYPE_XBM_DATA
677BITMAP_TYPE_XPM = _core_.BITMAP_TYPE_XPM
678BITMAP_TYPE_XPM_DATA = _core_.BITMAP_TYPE_XPM_DATA
679BITMAP_TYPE_TIF = _core_.BITMAP_TYPE_TIF
680BITMAP_TYPE_GIF = _core_.BITMAP_TYPE_GIF
681BITMAP_TYPE_PNG = _core_.BITMAP_TYPE_PNG
682BITMAP_TYPE_JPEG = _core_.BITMAP_TYPE_JPEG
683BITMAP_TYPE_PNM = _core_.BITMAP_TYPE_PNM
684BITMAP_TYPE_PCX = _core_.BITMAP_TYPE_PCX
685BITMAP_TYPE_PICT = _core_.BITMAP_TYPE_PICT
686BITMAP_TYPE_ICON = _core_.BITMAP_TYPE_ICON
687BITMAP_TYPE_ANI = _core_.BITMAP_TYPE_ANI
688BITMAP_TYPE_IFF = _core_.BITMAP_TYPE_IFF
689BITMAP_TYPE_MACCURSOR = _core_.BITMAP_TYPE_MACCURSOR
690BITMAP_TYPE_ANY = _core_.BITMAP_TYPE_ANY
691CURSOR_NONE = _core_.CURSOR_NONE
692CURSOR_ARROW = _core_.CURSOR_ARROW
693CURSOR_RIGHT_ARROW = _core_.CURSOR_RIGHT_ARROW
694CURSOR_BULLSEYE = _core_.CURSOR_BULLSEYE
695CURSOR_CHAR = _core_.CURSOR_CHAR
696CURSOR_CROSS = _core_.CURSOR_CROSS
697CURSOR_HAND = _core_.CURSOR_HAND
698CURSOR_IBEAM = _core_.CURSOR_IBEAM
699CURSOR_LEFT_BUTTON = _core_.CURSOR_LEFT_BUTTON
700CURSOR_MAGNIFIER = _core_.CURSOR_MAGNIFIER
701CURSOR_MIDDLE_BUTTON = _core_.CURSOR_MIDDLE_BUTTON
702CURSOR_NO_ENTRY = _core_.CURSOR_NO_ENTRY
703CURSOR_PAINT_BRUSH = _core_.CURSOR_PAINT_BRUSH
704CURSOR_PENCIL = _core_.CURSOR_PENCIL
705CURSOR_POINT_LEFT = _core_.CURSOR_POINT_LEFT
706CURSOR_POINT_RIGHT = _core_.CURSOR_POINT_RIGHT
707CURSOR_QUESTION_ARROW = _core_.CURSOR_QUESTION_ARROW
708CURSOR_RIGHT_BUTTON = _core_.CURSOR_RIGHT_BUTTON
709CURSOR_SIZENESW = _core_.CURSOR_SIZENESW
710CURSOR_SIZENS = _core_.CURSOR_SIZENS
711CURSOR_SIZENWSE = _core_.CURSOR_SIZENWSE
712CURSOR_SIZEWE = _core_.CURSOR_SIZEWE
713CURSOR_SIZING = _core_.CURSOR_SIZING
714CURSOR_SPRAYCAN = _core_.CURSOR_SPRAYCAN
715CURSOR_WAIT = _core_.CURSOR_WAIT
716CURSOR_WATCH = _core_.CURSOR_WATCH
717CURSOR_BLANK = _core_.CURSOR_BLANK
718CURSOR_DEFAULT = _core_.CURSOR_DEFAULT
719CURSOR_COPY_ARROW = _core_.CURSOR_COPY_ARROW
720CURSOR_ARROWWAIT = _core_.CURSOR_ARROWWAIT
721CURSOR_MAX = _core_.CURSOR_MAX
d14a1e28
RD
722#---------------------------------------------------------------------------
723
724class Size(object):
0df68c9f 725 """
41e2b43e 726 wx.Size is a useful data structure used to represent the size of
093d3ff1
RD
727 something. It simply contians integer width and height
728 proprtites. In most places in wxPython where a wx.Size is
729 expected a (width, height) tuple can be used instead.
0df68c9f 730 """
e811c8ce
RD
731 def __repr__(self):
732 return "<%s.%s; proxy of C++ wxSize instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
54f9ee45
RD
733 width = property(_core_.Size_width_get, _core_.Size_width_set)
734 height = property(_core_.Size_height_get, _core_.Size_height_set)
242b7b46 735 x = width; y = height
d14a1e28 736 def __init__(self, *args, **kwargs):
0df68c9f 737 """
a95a7133 738 __init__(self, int w=0, int h=0) -> Size
e811c8ce 739
0df68c9f
RD
740 Creates a size object.
741 """
54f9ee45 742 newobj = _core_.new_Size(*args, **kwargs)
d14a1e28
RD
743 self.this = newobj.this
744 self.thisown = 1
745 del newobj.thisown
54f9ee45 746 def __del__(self, destroy=_core_.delete_Size):
a95a7133 747 """__del__(self)"""
d14a1e28
RD
748 try:
749 if self.thisown: destroy(self)
750 except: pass
e811c8ce
RD
751
752 def __eq__(*args, **kwargs):
0df68c9f 753 """
a95a7133 754 __eq__(self, Size sz) -> bool
e811c8ce 755
0df68c9f
RD
756 Test for equality of wx.Size objects.
757 """
54f9ee45 758 return _core_.Size___eq__(*args, **kwargs)
e811c8ce
RD
759
760 def __ne__(*args, **kwargs):
0df68c9f 761 """
a95a7133 762 __ne__(self, Size sz) -> bool
e811c8ce 763
0df68c9f
RD
764 Test for inequality.
765 """
54f9ee45 766 return _core_.Size___ne__(*args, **kwargs)
e811c8ce
RD
767
768 def __add__(*args, **kwargs):
0df68c9f 769 """
a95a7133 770 __add__(self, Size sz) -> Size
e811c8ce 771
0df68c9f
RD
772 Add sz's proprties to this and return the result.
773 """
54f9ee45 774 return _core_.Size___add__(*args, **kwargs)
e811c8ce
RD
775
776 def __sub__(*args, **kwargs):
0df68c9f 777 """
a95a7133 778 __sub__(self, Size sz) -> Size
e811c8ce 779
0df68c9f
RD
780 Subtract sz's properties from this and return the result.
781 """
54f9ee45 782 return _core_.Size___sub__(*args, **kwargs)
e811c8ce
RD
783
784 def IncTo(*args, **kwargs):
0df68c9f 785 """
a95a7133 786 IncTo(self, Size sz)
e811c8ce 787
0df68c9f
RD
788 Increments this object so that both of its dimensions are not less
789 than the corresponding dimensions of the size.
790 """
54f9ee45 791 return _core_.Size_IncTo(*args, **kwargs)
e811c8ce
RD
792
793 def DecTo(*args, **kwargs):
0df68c9f 794 """
a95a7133 795 DecTo(self, Size sz)
e811c8ce 796
0df68c9f
RD
797 Decrements this object so that both of its dimensions are not greater
798 than the corresponding dimensions of the size.
799 """
54f9ee45 800 return _core_.Size_DecTo(*args, **kwargs)
e811c8ce
RD
801
802 def Set(*args, **kwargs):
0df68c9f 803 """
a95a7133 804 Set(self, int w, int h)
e811c8ce 805
0df68c9f
RD
806 Set both width and height.
807 """
54f9ee45 808 return _core_.Size_Set(*args, **kwargs)
e811c8ce
RD
809
810 def SetWidth(*args, **kwargs):
a95a7133 811 """SetWidth(self, int w)"""
54f9ee45 812 return _core_.Size_SetWidth(*args, **kwargs)
e811c8ce
RD
813
814 def SetHeight(*args, **kwargs):
a95a7133 815 """SetHeight(self, int h)"""
54f9ee45 816 return _core_.Size_SetHeight(*args, **kwargs)
e811c8ce
RD
817
818 def GetWidth(*args, **kwargs):
a95a7133 819 """GetWidth(self) -> int"""
54f9ee45 820 return _core_.Size_GetWidth(*args, **kwargs)
e811c8ce
RD
821
822 def GetHeight(*args, **kwargs):
a95a7133 823 """GetHeight(self) -> int"""
54f9ee45 824 return _core_.Size_GetHeight(*args, **kwargs)
e811c8ce 825
74a57fcd
RD
826 def IsFullySpecified(*args, **kwargs):
827 """
a95a7133 828 IsFullySpecified(self) -> bool
74a57fcd
RD
829
830 Returns True if both components of the size are non-default values.
831 """
54f9ee45 832 return _core_.Size_IsFullySpecified(*args, **kwargs)
74a57fcd
RD
833
834 def SetDefaults(*args, **kwargs):
835 """
a95a7133 836 SetDefaults(self, Size size)
74a57fcd 837
41e2b43e
RD
838 Combine this size with the other one replacing the default components
839 of this object (i.e. equal to -1) with those of the other.
74a57fcd 840 """
54f9ee45 841 return _core_.Size_SetDefaults(*args, **kwargs)
74a57fcd 842
e811c8ce 843 def Get(*args, **kwargs):
0df68c9f
RD
844 """
845 Get() -> (width,height)
e811c8ce 846
0df68c9f
RD
847 Returns the width and height properties as a tuple.
848 """
54f9ee45 849 return _core_.Size_Get(*args, **kwargs)
e811c8ce 850
41e2b43e 851 asTuple = wx._deprecated(Get, "asTuple is deprecated, use `Get` instead")
e811c8ce
RD
852 def __str__(self): return str(self.Get())
853 def __repr__(self): return 'wx.Size'+str(self.Get())
854 def __len__(self): return len(self.Get())
855 def __getitem__(self, index): return self.Get()[index]
d14a1e28
RD
856 def __setitem__(self, index, val):
857 if index == 0: self.width = val
858 elif index == 1: self.height = val
859 else: raise IndexError
e811c8ce 860 def __nonzero__(self): return self.Get() != (0,0)
74e96f3d
RD
861 __safe_for_unpickling__ = True
862 def __reduce__(self): return (wx.Size, self.Get())
d14a1e28
RD
863
864
865class SizePtr(Size):
866 def __init__(self, this):
867 self.this = this
868 if not hasattr(self,"thisown"): self.thisown = 0
869 self.__class__ = Size
54f9ee45 870_core_.Size_swigregister(SizePtr)
d14a1e28
RD
871
872#---------------------------------------------------------------------------
873
874class RealPoint(object):
0df68c9f 875 """
41e2b43e
RD
876 A data structure for representing a point or position with floating
877 point x and y properties. In wxPython most places that expect a
878 wx.RealPoint can also accept a (x,y) tuple.
0df68c9f 879 """
e811c8ce
RD
880 def __repr__(self):
881 return "<%s.%s; proxy of C++ wxRealPoint instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
54f9ee45
RD
882 x = property(_core_.RealPoint_x_get, _core_.RealPoint_x_set)
883 y = property(_core_.RealPoint_y_get, _core_.RealPoint_y_set)
d14a1e28 884 def __init__(self, *args, **kwargs):
0df68c9f 885 """
a95a7133 886 __init__(self, double x=0.0, double y=0.0) -> RealPoint
e811c8ce 887
0df68c9f
RD
888 Create a wx.RealPoint object
889 """
54f9ee45 890 newobj = _core_.new_RealPoint(*args, **kwargs)
d14a1e28
RD
891 self.this = newobj.this
892 self.thisown = 1
893 del newobj.thisown
54f9ee45 894 def __del__(self, destroy=_core_.delete_RealPoint):
a95a7133 895 """__del__(self)"""
d14a1e28
RD
896 try:
897 if self.thisown: destroy(self)
898 except: pass
e811c8ce
RD
899
900 def __eq__(*args, **kwargs):
0df68c9f 901 """
a95a7133 902 __eq__(self, RealPoint pt) -> bool
e811c8ce 903
0df68c9f
RD
904 Test for equality of wx.RealPoint objects.
905 """
54f9ee45 906 return _core_.RealPoint___eq__(*args, **kwargs)
e811c8ce
RD
907
908 def __ne__(*args, **kwargs):
0df68c9f 909 """
a95a7133 910 __ne__(self, RealPoint pt) -> bool
e811c8ce 911
0df68c9f
RD
912 Test for inequality of wx.RealPoint objects.
913 """
54f9ee45 914 return _core_.RealPoint___ne__(*args, **kwargs)
e811c8ce
RD
915
916 def __add__(*args, **kwargs):
0df68c9f 917 """
a95a7133 918 __add__(self, RealPoint pt) -> RealPoint
e811c8ce 919
0df68c9f
RD
920 Add pt's proprties to this and return the result.
921 """
54f9ee45 922 return _core_.RealPoint___add__(*args, **kwargs)
e811c8ce
RD
923
924 def __sub__(*args, **kwargs):
0df68c9f 925 """
a95a7133 926 __sub__(self, RealPoint pt) -> RealPoint
e811c8ce 927
0df68c9f
RD
928 Subtract pt's proprties from this and return the result
929 """
54f9ee45 930 return _core_.RealPoint___sub__(*args, **kwargs)
e811c8ce
RD
931
932 def Set(*args, **kwargs):
0df68c9f 933 """
a95a7133 934 Set(self, double x, double y)
e811c8ce 935
0df68c9f
RD
936 Set both the x and y properties
937 """
54f9ee45 938 return _core_.RealPoint_Set(*args, **kwargs)
e811c8ce
RD
939
940 def Get(*args, **kwargs):
0df68c9f
RD
941 """
942 Get() -> (x,y)
e811c8ce 943
0df68c9f
RD
944 Return the x and y properties as a tuple.
945 """
54f9ee45 946 return _core_.RealPoint_Get(*args, **kwargs)
e811c8ce 947
41e2b43e 948 asTuple = wx._deprecated(Get, "asTuple is deprecated, use `Get` instead")
e811c8ce
RD
949 def __str__(self): return str(self.Get())
950 def __repr__(self): return 'wx.RealPoint'+str(self.Get())
951 def __len__(self): return len(self.Get())
952 def __getitem__(self, index): return self.Get()[index]
d14a1e28 953 def __setitem__(self, index, val):
e811c8ce
RD
954 if index == 0: self.x = val
955 elif index == 1: self.y = val
d14a1e28 956 else: raise IndexError
e811c8ce 957 def __nonzero__(self): return self.Get() != (0.0, 0.0)
74e96f3d
RD
958 __safe_for_unpickling__ = True
959 def __reduce__(self): return (wx.RealPoint, self.Get())
d14a1e28
RD
960
961
962class RealPointPtr(RealPoint):
963 def __init__(self, this):
964 self.this = this
965 if not hasattr(self,"thisown"): self.thisown = 0
966 self.__class__ = RealPoint
54f9ee45 967_core_.RealPoint_swigregister(RealPointPtr)
d14a1e28
RD
968
969#---------------------------------------------------------------------------
970
971class Point(object):
0df68c9f 972 """
41e2b43e
RD
973 A data structure for representing a point or position with integer x
974 and y properties. Most places in wxPython that expect a wx.Point can
975 also accept a (x,y) tuple.
0df68c9f 976 """
e811c8ce
RD
977 def __repr__(self):
978 return "<%s.%s; proxy of C++ wxPoint instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
54f9ee45
RD
979 x = property(_core_.Point_x_get, _core_.Point_x_set)
980 y = property(_core_.Point_y_get, _core_.Point_y_set)
d14a1e28 981 def __init__(self, *args, **kwargs):
0df68c9f 982 """
a95a7133 983 __init__(self, int x=0, int y=0) -> Point
e811c8ce 984
0df68c9f
RD
985 Create a wx.Point object
986 """
54f9ee45 987 newobj = _core_.new_Point(*args, **kwargs)
d14a1e28
RD
988 self.this = newobj.this
989 self.thisown = 1
990 del newobj.thisown
54f9ee45 991 def __del__(self, destroy=_core_.delete_Point):
a95a7133 992 """__del__(self)"""
d14a1e28
RD
993 try:
994 if self.thisown: destroy(self)
995 except: pass
e811c8ce
RD
996
997 def __eq__(*args, **kwargs):
0df68c9f 998 """
a95a7133 999 __eq__(self, Point pt) -> bool
e811c8ce 1000
0df68c9f
RD
1001 Test for equality of wx.Point objects.
1002 """
54f9ee45 1003 return _core_.Point___eq__(*args, **kwargs)
e811c8ce
RD
1004
1005 def __ne__(*args, **kwargs):
0df68c9f 1006 """
a95a7133 1007 __ne__(self, Point pt) -> bool
e811c8ce 1008
0df68c9f
RD
1009 Test for inequality of wx.Point objects.
1010 """
54f9ee45 1011 return _core_.Point___ne__(*args, **kwargs)
e811c8ce
RD
1012
1013 def __add__(*args, **kwargs):
0df68c9f 1014 """
a95a7133 1015 __add__(self, Point pt) -> Point
e811c8ce 1016
0df68c9f
RD
1017 Add pt's proprties to this and return the result.
1018 """
54f9ee45 1019 return _core_.Point___add__(*args, **kwargs)
e811c8ce
RD
1020
1021 def __sub__(*args, **kwargs):
0df68c9f 1022 """
a95a7133 1023 __sub__(self, Point pt) -> Point
e811c8ce 1024
0df68c9f
RD
1025 Subtract pt's proprties from this and return the result
1026 """
54f9ee45 1027 return _core_.Point___sub__(*args, **kwargs)
e811c8ce
RD
1028
1029 def __iadd__(*args, **kwargs):
0df68c9f 1030 """
a95a7133 1031 __iadd__(self, Point pt) -> Point
e811c8ce 1032
0df68c9f
RD
1033 Add pt to this object.
1034 """
54f9ee45 1035 return _core_.Point___iadd__(*args, **kwargs)
e811c8ce
RD
1036
1037 def __isub__(*args, **kwargs):
0df68c9f 1038 """
a95a7133 1039 __isub__(self, Point pt) -> Point
e811c8ce 1040
0df68c9f
RD
1041 Subtract pt from this object.
1042 """
54f9ee45 1043 return _core_.Point___isub__(*args, **kwargs)
e811c8ce
RD
1044
1045 def Set(*args, **kwargs):
0df68c9f 1046 """
a95a7133 1047 Set(self, long x, long y)
e811c8ce 1048
0df68c9f
RD
1049 Set both the x and y properties
1050 """
54f9ee45 1051 return _core_.Point_Set(*args, **kwargs)
e811c8ce
RD
1052
1053 def Get(*args, **kwargs):
0df68c9f
RD
1054 """
1055 Get() -> (x,y)
e811c8ce 1056
0df68c9f
RD
1057 Return the x and y properties as a tuple.
1058 """
54f9ee45 1059 return _core_.Point_Get(*args, **kwargs)
e811c8ce 1060
41e2b43e 1061 asTuple = wx._deprecated(Get, "asTuple is deprecated, use `Get` instead")
e811c8ce
RD
1062 def __str__(self): return str(self.Get())
1063 def __repr__(self): return 'wx.Point'+str(self.Get())
1064 def __len__(self): return len(self.Get())
1065 def __getitem__(self, index): return self.Get()[index]
d14a1e28
RD
1066 def __setitem__(self, index, val):
1067 if index == 0: self.x = val
1068 elif index == 1: self.y = val
1069 else: raise IndexError
e811c8ce 1070 def __nonzero__(self): return self.Get() != (0,0)
74e96f3d
RD
1071 __safe_for_unpickling__ = True
1072 def __reduce__(self): return (wx.Point, self.Get())
d14a1e28
RD
1073
1074
1075class PointPtr(Point):
1076 def __init__(self, this):
1077 self.this = this
1078 if not hasattr(self,"thisown"): self.thisown = 0
1079 self.__class__ = Point
54f9ee45 1080_core_.Point_swigregister(PointPtr)
d14a1e28
RD
1081
1082#---------------------------------------------------------------------------
1083
1084class Rect(object):
0df68c9f 1085 """
41e2b43e
RD
1086 A class for representing and manipulating rectangles. It has x, y,
1087 width and height properties. In wxPython most palces that expect a
1088 wx.Rect can also accept a (x,y,width,height) tuple.
0df68c9f 1089 """
e811c8ce
RD
1090 def __repr__(self):
1091 return "<%s.%s; proxy of C++ wxRect instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 1092 def __init__(self, *args, **kwargs):
0df68c9f 1093 """
a95a7133 1094 __init__(self, int x=0, int y=0, int width=0, int height=0) -> Rect
e811c8ce 1095
0df68c9f
RD
1096 Create a new Rect object.
1097 """
54f9ee45 1098 newobj = _core_.new_Rect(*args, **kwargs)
d14a1e28
RD
1099 self.this = newobj.this
1100 self.thisown = 1
1101 del newobj.thisown
54f9ee45 1102 def __del__(self, destroy=_core_.delete_Rect):
a95a7133 1103 """__del__(self)"""
d14a1e28
RD
1104 try:
1105 if self.thisown: destroy(self)
1106 except: pass
e811c8ce
RD
1107
1108 def GetX(*args, **kwargs):
a95a7133 1109 """GetX(self) -> int"""
54f9ee45 1110 return _core_.Rect_GetX(*args, **kwargs)
e811c8ce
RD
1111
1112 def SetX(*args, **kwargs):
a95a7133 1113 """SetX(self, int x)"""
54f9ee45 1114 return _core_.Rect_SetX(*args, **kwargs)
e811c8ce
RD
1115
1116 def GetY(*args, **kwargs):
a95a7133 1117 """GetY(self) -> int"""
54f9ee45 1118 return _core_.Rect_GetY(*args, **kwargs)
e811c8ce
RD
1119
1120 def SetY(*args, **kwargs):
a95a7133 1121 """SetY(self, int y)"""
54f9ee45 1122 return _core_.Rect_SetY(*args, **kwargs)
e811c8ce
RD
1123
1124 def GetWidth(*args, **kwargs):
a95a7133 1125 """GetWidth(self) -> int"""
54f9ee45 1126 return _core_.Rect_GetWidth(*args, **kwargs)
e811c8ce
RD
1127
1128 def SetWidth(*args, **kwargs):
a95a7133 1129 """SetWidth(self, int w)"""
54f9ee45 1130 return _core_.Rect_SetWidth(*args, **kwargs)
e811c8ce
RD
1131
1132 def GetHeight(*args, **kwargs):
a95a7133 1133 """GetHeight(self) -> int"""
54f9ee45 1134 return _core_.Rect_GetHeight(*args, **kwargs)
e811c8ce
RD
1135
1136 def SetHeight(*args, **kwargs):
a95a7133 1137 """SetHeight(self, int h)"""
54f9ee45 1138 return _core_.Rect_SetHeight(*args, **kwargs)
e811c8ce
RD
1139
1140 def GetPosition(*args, **kwargs):
a95a7133 1141 """GetPosition(self) -> Point"""
54f9ee45 1142 return _core_.Rect_GetPosition(*args, **kwargs)
e811c8ce
RD
1143
1144 def SetPosition(*args, **kwargs):
a95a7133 1145 """SetPosition(self, Point p)"""
54f9ee45 1146 return _core_.Rect_SetPosition(*args, **kwargs)
e811c8ce
RD
1147
1148 def GetSize(*args, **kwargs):
a95a7133 1149 """GetSize(self) -> Size"""
54f9ee45 1150 return _core_.Rect_GetSize(*args, **kwargs)
e811c8ce
RD
1151
1152 def SetSize(*args, **kwargs):
a95a7133 1153 """SetSize(self, Size s)"""
54f9ee45 1154 return _core_.Rect_SetSize(*args, **kwargs)
e811c8ce 1155
aff4cc5c
RD
1156 def IsEmpty(*args, **kwargs):
1157 """IsEmpty(self) -> bool"""
1158 return _core_.Rect_IsEmpty(*args, **kwargs)
1159
c9c7117a 1160 def GetTopLeft(*args, **kwargs):
a95a7133 1161 """GetTopLeft(self) -> Point"""
54f9ee45 1162 return _core_.Rect_GetTopLeft(*args, **kwargs)
c9c7117a
RD
1163
1164 def SetTopLeft(*args, **kwargs):
a95a7133 1165 """SetTopLeft(self, Point p)"""
54f9ee45 1166 return _core_.Rect_SetTopLeft(*args, **kwargs)
c9c7117a
RD
1167
1168 def GetBottomRight(*args, **kwargs):
a95a7133 1169 """GetBottomRight(self) -> Point"""
54f9ee45 1170 return _core_.Rect_GetBottomRight(*args, **kwargs)
c9c7117a
RD
1171
1172 def SetBottomRight(*args, **kwargs):
a95a7133 1173 """SetBottomRight(self, Point p)"""
54f9ee45 1174 return _core_.Rect_SetBottomRight(*args, **kwargs)
c9c7117a 1175
e811c8ce 1176 def GetLeft(*args, **kwargs):
a95a7133 1177 """GetLeft(self) -> int"""
54f9ee45 1178 return _core_.Rect_GetLeft(*args, **kwargs)
e811c8ce
RD
1179
1180 def GetTop(*args, **kwargs):
a95a7133 1181 """GetTop(self) -> int"""
54f9ee45 1182 return _core_.Rect_GetTop(*args, **kwargs)
e811c8ce
RD
1183
1184 def GetBottom(*args, **kwargs):
a95a7133 1185 """GetBottom(self) -> int"""
54f9ee45 1186 return _core_.Rect_GetBottom(*args, **kwargs)
e811c8ce
RD
1187
1188 def GetRight(*args, **kwargs):
a95a7133 1189 """GetRight(self) -> int"""
54f9ee45 1190 return _core_.Rect_GetRight(*args, **kwargs)
e811c8ce
RD
1191
1192 def SetLeft(*args, **kwargs):
a95a7133 1193 """SetLeft(self, int left)"""
54f9ee45 1194 return _core_.Rect_SetLeft(*args, **kwargs)
e811c8ce
RD
1195
1196 def SetRight(*args, **kwargs):
a95a7133 1197 """SetRight(self, int right)"""
54f9ee45 1198 return _core_.Rect_SetRight(*args, **kwargs)
e811c8ce
RD
1199
1200 def SetTop(*args, **kwargs):
a95a7133 1201 """SetTop(self, int top)"""
54f9ee45 1202 return _core_.Rect_SetTop(*args, **kwargs)
e811c8ce
RD
1203
1204 def SetBottom(*args, **kwargs):
a95a7133 1205 """SetBottom(self, int bottom)"""
54f9ee45 1206 return _core_.Rect_SetBottom(*args, **kwargs)
e811c8ce
RD
1207
1208 position = property(GetPosition, SetPosition)
1209 size = property(GetSize, SetSize)
1210 left = property(GetLeft, SetLeft)
1211 right = property(GetRight, SetRight)
1212 top = property(GetTop, SetTop)
1213 bottom = property(GetBottom, SetBottom)
1214
1215 def Inflate(*args, **kwargs):
0df68c9f 1216 """
a95a7133 1217 Inflate(self, int dx, int dy) -> Rect
e811c8ce 1218
8e738329
RD
1219 Increases the size of the rectangle.
1220
1221 The left border is moved farther left and the right border is moved
1222 farther right by ``dx``. The upper border is moved farther up and the
1223 bottom border is moved farther down by ``dy``. (Note the the width and
1224 height of the rectangle thus change by ``2*dx`` and ``2*dy``,
1225 respectively.) If one or both of ``dx`` and ``dy`` are negative, the
1226 opposite happens: the rectangle size decreases in the respective
1227 direction.
1228
1229 The change is made to the rectangle inplace, if instead you need a
1230 copy that is inflated, preserving the original then make the copy
1231 first::
1232
1233 copy = wx.Rect(*original)
1234 copy.Inflate(10,15)
1235
1236
0df68c9f 1237 """
54f9ee45 1238 return _core_.Rect_Inflate(*args, **kwargs)
e811c8ce
RD
1239
1240 def Deflate(*args, **kwargs):
0df68c9f 1241 """
a95a7133 1242 Deflate(self, int dx, int dy) -> Rect
e811c8ce 1243
8e738329
RD
1244 Decrease the rectangle size. This method is the opposite of `Inflate`
1245 in that Deflate(a,b) is equivalent to Inflate(-a,-b). Please refer to
1246 `Inflate` for a full description.
0df68c9f 1247 """
54f9ee45 1248 return _core_.Rect_Deflate(*args, **kwargs)
e811c8ce
RD
1249
1250 def OffsetXY(*args, **kwargs):
0df68c9f 1251 """
a95a7133 1252 OffsetXY(self, int dx, int dy)
e811c8ce 1253
41e2b43e
RD
1254 Moves the rectangle by the specified offset. If dx is positive, the
1255 rectangle is moved to the right, if dy is positive, it is moved to the
1256 bottom, otherwise it is moved to the left or top respectively.
0df68c9f 1257 """
54f9ee45 1258 return _core_.Rect_OffsetXY(*args, **kwargs)
e811c8ce
RD
1259
1260 def Offset(*args, **kwargs):
0df68c9f 1261 """
a95a7133 1262 Offset(self, Point pt)
e811c8ce 1263
0df68c9f
RD
1264 Same as OffsetXY but uses dx,dy from Point
1265 """
54f9ee45 1266 return _core_.Rect_Offset(*args, **kwargs)
e811c8ce
RD
1267
1268 def Intersect(*args, **kwargs):
0df68c9f 1269 """
a95a7133 1270 Intersect(self, Rect rect) -> Rect
e811c8ce 1271
5cbf236d 1272 Returns the intersectsion of this rectangle and rect.
0df68c9f 1273 """
54f9ee45 1274 return _core_.Rect_Intersect(*args, **kwargs)
e811c8ce 1275
5cbf236d
RD
1276 def Union(*args, **kwargs):
1277 """
1278 Union(self, Rect rect) -> Rect
1279
1280 Returns the union of this rectangle and rect.
1281 """
1282 return _core_.Rect_Union(*args, **kwargs)
1283
e811c8ce 1284 def __add__(*args, **kwargs):
0df68c9f 1285 """
a95a7133 1286 __add__(self, Rect rect) -> Rect
e811c8ce 1287
0df68c9f
RD
1288 Add the properties of rect to this rectangle and return the result.
1289 """
54f9ee45 1290 return _core_.Rect___add__(*args, **kwargs)
e811c8ce
RD
1291
1292 def __iadd__(*args, **kwargs):
0df68c9f 1293 """
a95a7133 1294 __iadd__(self, Rect rect) -> Rect
e811c8ce 1295
0df68c9f
RD
1296 Add the properties of rect to this rectangle, updating this rectangle.
1297 """
54f9ee45 1298 return _core_.Rect___iadd__(*args, **kwargs)
e811c8ce
RD
1299
1300 def __eq__(*args, **kwargs):
0df68c9f 1301 """
a95a7133 1302 __eq__(self, Rect rect) -> bool
e811c8ce 1303
0df68c9f
RD
1304 Test for equality.
1305 """
54f9ee45 1306 return _core_.Rect___eq__(*args, **kwargs)
e811c8ce
RD
1307
1308 def __ne__(*args, **kwargs):
0df68c9f 1309 """
a95a7133 1310 __ne__(self, Rect rect) -> bool
e811c8ce 1311
0df68c9f
RD
1312 Test for inequality.
1313 """
54f9ee45 1314 return _core_.Rect___ne__(*args, **kwargs)
e811c8ce
RD
1315
1316 def InsideXY(*args, **kwargs):
0df68c9f 1317 """
a95a7133 1318 InsideXY(self, int x, int y) -> bool
e811c8ce 1319
0df68c9f
RD
1320 Return True if the point is (not strcitly) inside the rect.
1321 """
54f9ee45 1322 return _core_.Rect_InsideXY(*args, **kwargs)
e811c8ce
RD
1323
1324 def Inside(*args, **kwargs):
0df68c9f 1325 """
a95a7133 1326 Inside(self, Point pt) -> bool
e811c8ce 1327
0df68c9f
RD
1328 Return True if the point is (not strcitly) inside the rect.
1329 """
54f9ee45 1330 return _core_.Rect_Inside(*args, **kwargs)
e811c8ce
RD
1331
1332 def Intersects(*args, **kwargs):
0df68c9f 1333 """
a95a7133 1334 Intersects(self, Rect rect) -> bool
e811c8ce 1335
0df68c9f
RD
1336 Returns True if the rectangles have a non empty intersection.
1337 """
54f9ee45 1338 return _core_.Rect_Intersects(*args, **kwargs)
e811c8ce 1339
54f9ee45
RD
1340 x = property(_core_.Rect_x_get, _core_.Rect_x_set)
1341 y = property(_core_.Rect_y_get, _core_.Rect_y_set)
1342 width = property(_core_.Rect_width_get, _core_.Rect_width_set)
1343 height = property(_core_.Rect_height_get, _core_.Rect_height_set)
e811c8ce 1344 def Set(*args, **kwargs):
0df68c9f 1345 """
a95a7133 1346 Set(self, int x=0, int y=0, int width=0, int height=0)
e811c8ce 1347
0df68c9f
RD
1348 Set all rectangle properties.
1349 """
54f9ee45 1350 return _core_.Rect_Set(*args, **kwargs)
e811c8ce
RD
1351
1352 def Get(*args, **kwargs):
0df68c9f
RD
1353 """
1354 Get() -> (x,y,width,height)
e811c8ce 1355
0df68c9f
RD
1356 Return the rectangle properties as a tuple.
1357 """
54f9ee45 1358 return _core_.Rect_Get(*args, **kwargs)
e811c8ce 1359
41e2b43e 1360 asTuple = wx._deprecated(Get, "asTuple is deprecated, use `Get` instead")
e811c8ce
RD
1361 def __str__(self): return str(self.Get())
1362 def __repr__(self): return 'wx.Rect'+str(self.Get())
1363 def __len__(self): return len(self.Get())
1364 def __getitem__(self, index): return self.Get()[index]
d14a1e28
RD
1365 def __setitem__(self, index, val):
1366 if index == 0: self.x = val
1367 elif index == 1: self.y = val
1368 elif index == 2: self.width = val
1369 elif index == 3: self.height = val
1370 else: raise IndexError
e811c8ce 1371 def __nonzero__(self): return self.Get() != (0,0,0,0)
74e96f3d
RD
1372 __safe_for_unpickling__ = True
1373 def __reduce__(self): return (wx.Rect, self.Get())
d14a1e28
RD
1374
1375
1376class RectPtr(Rect):
1377 def __init__(self, this):
1378 self.this = this
1379 if not hasattr(self,"thisown"): self.thisown = 0
1380 self.__class__ = Rect
54f9ee45 1381_core_.Rect_swigregister(RectPtr)
d14a1e28
RD
1382
1383def RectPP(*args, **kwargs):
0df68c9f
RD
1384 """
1385 RectPP(Point topLeft, Point bottomRight) -> Rect
e811c8ce 1386
0df68c9f
RD
1387 Create a new Rect object from Points representing two corners.
1388 """
54f9ee45 1389 val = _core_.new_RectPP(*args, **kwargs)
d14a1e28
RD
1390 val.thisown = 1
1391 return val
1392
1393def RectPS(*args, **kwargs):
0df68c9f
RD
1394 """
1395 RectPS(Point pos, Size size) -> Rect
e811c8ce 1396
0df68c9f
RD
1397 Create a new Rect from a position and size.
1398 """
54f9ee45 1399 val = _core_.new_RectPS(*args, **kwargs)
d14a1e28
RD
1400 val.thisown = 1
1401 return val
1402
d3b6e4ff
RD
1403def RectS(*args, **kwargs):
1404 """
1405 RectS(Size size) -> Rect
1406
1407 Create a new Rect from a size only.
1408 """
1409 val = _core_.new_RectS(*args, **kwargs)
1410 val.thisown = 1
1411 return val
1412
d14a1e28 1413
e811c8ce 1414def IntersectRect(*args, **kwargs):
0df68c9f
RD
1415 """
1416 IntersectRect(Rect r1, Rect r2) -> Rect
e811c8ce 1417
0df68c9f
RD
1418 Calculate and return the intersection of r1 and r2.
1419 """
54f9ee45 1420 return _core_.IntersectRect(*args, **kwargs)
d14a1e28
RD
1421#---------------------------------------------------------------------------
1422
1423class Point2D(object):
41e2b43e
RD
1424 """
1425 wx.Point2Ds represent a point or a vector in a 2d coordinate system
1426 with floating point values.
1427 """
e811c8ce
RD
1428 def __repr__(self):
1429 return "<%s.%s; proxy of C++ wxPoint2D instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 1430 def __init__(self, *args, **kwargs):
0df68c9f 1431 """
a95a7133 1432 __init__(self, double x=0.0, double y=0.0) -> Point2D
e811c8ce 1433
0df68c9f
RD
1434 Create a w.Point2D object.
1435 """
54f9ee45 1436 newobj = _core_.new_Point2D(*args, **kwargs)
d14a1e28
RD
1437 self.this = newobj.this
1438 self.thisown = 1
1439 del newobj.thisown
e811c8ce 1440 def GetFloor(*args, **kwargs):
fd2dc343
RD
1441 """
1442 GetFloor() -> (x,y)
1443
1444 Convert to integer
1445 """
54f9ee45 1446 return _core_.Point2D_GetFloor(*args, **kwargs)
e811c8ce
RD
1447
1448 def GetRounded(*args, **kwargs):
fd2dc343
RD
1449 """
1450 GetRounded() -> (x,y)
1451
1452 Convert to integer
1453 """
54f9ee45 1454 return _core_.Point2D_GetRounded(*args, **kwargs)
e811c8ce
RD
1455
1456 def GetVectorLength(*args, **kwargs):
a95a7133 1457 """GetVectorLength(self) -> double"""
54f9ee45 1458 return _core_.Point2D_GetVectorLength(*args, **kwargs)
e811c8ce
RD
1459
1460 def GetVectorAngle(*args, **kwargs):
a95a7133 1461 """GetVectorAngle(self) -> double"""
54f9ee45 1462 return _core_.Point2D_GetVectorAngle(*args, **kwargs)
e811c8ce
RD
1463
1464 def SetVectorLength(*args, **kwargs):
a95a7133 1465 """SetVectorLength(self, double length)"""
54f9ee45 1466 return _core_.Point2D_SetVectorLength(*args, **kwargs)
e811c8ce
RD
1467
1468 def SetVectorAngle(*args, **kwargs):
a95a7133 1469 """SetVectorAngle(self, double degrees)"""
54f9ee45 1470 return _core_.Point2D_SetVectorAngle(*args, **kwargs)
e811c8ce 1471
d14a1e28
RD
1472 def SetPolarCoordinates(self, angle, length):
1473 self.SetVectorLength(length)
1474 self.SetVectorAngle(angle)
1475 def Normalize(self):
1476 self.SetVectorLength(1.0)
1477
e811c8ce 1478 def GetDistance(*args, **kwargs):
a95a7133 1479 """GetDistance(self, Point2D pt) -> double"""
54f9ee45 1480 return _core_.Point2D_GetDistance(*args, **kwargs)
e811c8ce
RD
1481
1482 def GetDistanceSquare(*args, **kwargs):
a95a7133 1483 """GetDistanceSquare(self, Point2D pt) -> double"""
54f9ee45 1484 return _core_.Point2D_GetDistanceSquare(*args, **kwargs)
e811c8ce
RD
1485
1486 def GetDotProduct(*args, **kwargs):
a95a7133 1487 """GetDotProduct(self, Point2D vec) -> double"""
54f9ee45 1488 return _core_.Point2D_GetDotProduct(*args, **kwargs)
e811c8ce
RD
1489
1490 def GetCrossProduct(*args, **kwargs):
a95a7133 1491 """GetCrossProduct(self, Point2D vec) -> double"""
54f9ee45 1492 return _core_.Point2D_GetCrossProduct(*args, **kwargs)
e811c8ce
RD
1493
1494 def __neg__(*args, **kwargs):
0df68c9f 1495 """
a95a7133 1496 __neg__(self) -> Point2D
e811c8ce 1497
0df68c9f
RD
1498 the reflection of this point
1499 """
54f9ee45 1500 return _core_.Point2D___neg__(*args, **kwargs)
e811c8ce
RD
1501
1502 def __iadd__(*args, **kwargs):
a95a7133 1503 """__iadd__(self, Point2D pt) -> Point2D"""
54f9ee45 1504 return _core_.Point2D___iadd__(*args, **kwargs)
e811c8ce
RD
1505
1506 def __isub__(*args, **kwargs):
a95a7133 1507 """__isub__(self, Point2D pt) -> Point2D"""
54f9ee45 1508 return _core_.Point2D___isub__(*args, **kwargs)
e811c8ce
RD
1509
1510 def __imul__(*args, **kwargs):
a95a7133 1511 """__imul__(self, Point2D pt) -> Point2D"""
54f9ee45 1512 return _core_.Point2D___imul__(*args, **kwargs)
e811c8ce
RD
1513
1514 def __idiv__(*args, **kwargs):
a95a7133 1515 """__idiv__(self, Point2D pt) -> Point2D"""
54f9ee45 1516 return _core_.Point2D___idiv__(*args, **kwargs)
e811c8ce
RD
1517
1518 def __eq__(*args, **kwargs):
0df68c9f 1519 """
a95a7133 1520 __eq__(self, Point2D pt) -> bool
e811c8ce 1521
0df68c9f
RD
1522 Test for equality
1523 """
54f9ee45 1524 return _core_.Point2D___eq__(*args, **kwargs)
e811c8ce
RD
1525
1526 def __ne__(*args, **kwargs):
0df68c9f 1527 """
a95a7133 1528 __ne__(self, Point2D pt) -> bool
e811c8ce 1529
0df68c9f
RD
1530 Test for inequality
1531 """
54f9ee45 1532 return _core_.Point2D___ne__(*args, **kwargs)
e811c8ce 1533
54f9ee45
RD
1534 x = property(_core_.Point2D_x_get, _core_.Point2D_x_set)
1535 y = property(_core_.Point2D_y_get, _core_.Point2D_y_set)
e811c8ce 1536 def Set(*args, **kwargs):
a95a7133 1537 """Set(self, double x=0, double y=0)"""
54f9ee45 1538 return _core_.Point2D_Set(*args, **kwargs)
e811c8ce
RD
1539
1540 def Get(*args, **kwargs):
0df68c9f
RD
1541 """
1542 Get() -> (x,y)
e811c8ce 1543
0df68c9f
RD
1544 Return x and y properties as a tuple.
1545 """
54f9ee45 1546 return _core_.Point2D_Get(*args, **kwargs)
e811c8ce 1547
41e2b43e 1548 asTuple = wx._deprecated(Get, "asTuple is deprecated, use `Get` instead")
e811c8ce
RD
1549 def __str__(self): return str(self.Get())
1550 def __repr__(self): return 'wx.Point2D'+str(self.Get())
1551 def __len__(self): return len(self.Get())
1552 def __getitem__(self, index): return self.Get()[index]
d14a1e28 1553 def __setitem__(self, index, val):
e811c8ce
RD
1554 if index == 0: self.x = val
1555 elif index == 1: self.y = val
d14a1e28 1556 else: raise IndexError
e811c8ce 1557 def __nonzero__(self): return self.Get() != (0.0, 0.0)
74e96f3d
RD
1558 __safe_for_unpickling__ = True
1559 def __reduce__(self): return (wx.Point2D, self.Get())
d14a1e28
RD
1560
1561
1562class Point2DPtr(Point2D):
1563 def __init__(self, this):
1564 self.this = this
1565 if not hasattr(self,"thisown"): self.thisown = 0
1566 self.__class__ = Point2D
54f9ee45 1567_core_.Point2D_swigregister(Point2DPtr)
d14a1e28
RD
1568
1569def Point2DCopy(*args, **kwargs):
0df68c9f
RD
1570 """
1571 Point2DCopy(Point2D pt) -> Point2D
e811c8ce 1572
0df68c9f
RD
1573 Create a w.Point2D object.
1574 """
54f9ee45 1575 val = _core_.new_Point2DCopy(*args, **kwargs)
d14a1e28
RD
1576 val.thisown = 1
1577 return val
1578
1579def Point2DFromPoint(*args, **kwargs):
0df68c9f
RD
1580 """
1581 Point2DFromPoint(Point pt) -> Point2D
e811c8ce 1582
0df68c9f
RD
1583 Create a w.Point2D object.
1584 """
54f9ee45 1585 val = _core_.new_Point2DFromPoint(*args, **kwargs)
d14a1e28
RD
1586 val.thisown = 1
1587 return val
1588
1589#---------------------------------------------------------------------------
1590
54f9ee45
RD
1591FromStart = _core_.FromStart
1592FromCurrent = _core_.FromCurrent
1593FromEnd = _core_.FromEnd
d14a1e28 1594class InputStream(object):
093d3ff1 1595 """Proxy of C++ InputStream class"""
e811c8ce
RD
1596 def __repr__(self):
1597 return "<%s.%s; proxy of C++ wxPyInputStream instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 1598 def __init__(self, *args, **kwargs):
a95a7133 1599 """__init__(self, PyObject p) -> InputStream"""
54f9ee45 1600 newobj = _core_.new_InputStream(*args, **kwargs)
d14a1e28
RD
1601 self.this = newobj.this
1602 self.thisown = 1
1603 del newobj.thisown
8fb0e70a
RD
1604 def __del__(self, destroy=_core_.delete_InputStream):
1605 """__del__(self)"""
1606 try:
1607 if self.thisown: destroy(self)
1608 except: pass
1609
e811c8ce 1610 def close(*args, **kwargs):
a95a7133 1611 """close(self)"""
54f9ee45 1612 return _core_.InputStream_close(*args, **kwargs)
e811c8ce
RD
1613
1614 def flush(*args, **kwargs):
a95a7133 1615 """flush(self)"""
54f9ee45 1616 return _core_.InputStream_flush(*args, **kwargs)
e811c8ce
RD
1617
1618 def eof(*args, **kwargs):
a95a7133 1619 """eof(self) -> bool"""
54f9ee45 1620 return _core_.InputStream_eof(*args, **kwargs)
e811c8ce
RD
1621
1622 def read(*args, **kwargs):
a95a7133 1623 """read(self, int size=-1) -> PyObject"""
54f9ee45 1624 return _core_.InputStream_read(*args, **kwargs)
e811c8ce
RD
1625
1626 def readline(*args, **kwargs):
a95a7133 1627 """readline(self, int size=-1) -> PyObject"""
54f9ee45 1628 return _core_.InputStream_readline(*args, **kwargs)
e811c8ce
RD
1629
1630 def readlines(*args, **kwargs):
a95a7133 1631 """readlines(self, int sizehint=-1) -> PyObject"""
54f9ee45 1632 return _core_.InputStream_readlines(*args, **kwargs)
e811c8ce
RD
1633
1634 def seek(*args, **kwargs):
a95a7133 1635 """seek(self, int offset, int whence=0)"""
54f9ee45 1636 return _core_.InputStream_seek(*args, **kwargs)
e811c8ce
RD
1637
1638 def tell(*args, **kwargs):
a95a7133 1639 """tell(self) -> int"""
54f9ee45 1640 return _core_.InputStream_tell(*args, **kwargs)
e811c8ce
RD
1641
1642 def Peek(*args, **kwargs):
a95a7133 1643 """Peek(self) -> char"""
54f9ee45 1644 return _core_.InputStream_Peek(*args, **kwargs)
e811c8ce
RD
1645
1646 def GetC(*args, **kwargs):
a95a7133 1647 """GetC(self) -> char"""
54f9ee45 1648 return _core_.InputStream_GetC(*args, **kwargs)
e811c8ce
RD
1649
1650 def LastRead(*args, **kwargs):
a95a7133 1651 """LastRead(self) -> size_t"""
54f9ee45 1652 return _core_.InputStream_LastRead(*args, **kwargs)
e811c8ce
RD
1653
1654 def CanRead(*args, **kwargs):
a95a7133 1655 """CanRead(self) -> bool"""
54f9ee45 1656 return _core_.InputStream_CanRead(*args, **kwargs)
e811c8ce
RD
1657
1658 def Eof(*args, **kwargs):
a95a7133 1659 """Eof(self) -> bool"""
54f9ee45 1660 return _core_.InputStream_Eof(*args, **kwargs)
e811c8ce
RD
1661
1662 def Ungetch(*args, **kwargs):
a95a7133 1663 """Ungetch(self, char c) -> bool"""
54f9ee45 1664 return _core_.InputStream_Ungetch(*args, **kwargs)
e811c8ce
RD
1665
1666 def SeekI(*args, **kwargs):
a95a7133 1667 """SeekI(self, long pos, int mode=FromStart) -> long"""
54f9ee45 1668 return _core_.InputStream_SeekI(*args, **kwargs)
e811c8ce
RD
1669
1670 def TellI(*args, **kwargs):
a95a7133 1671 """TellI(self) -> long"""
54f9ee45 1672 return _core_.InputStream_TellI(*args, **kwargs)
e811c8ce 1673
d14a1e28
RD
1674
1675class InputStreamPtr(InputStream):
1676 def __init__(self, this):
1677 self.this = this
1678 if not hasattr(self,"thisown"): self.thisown = 0
1679 self.__class__ = InputStream
54f9ee45 1680_core_.InputStream_swigregister(InputStreamPtr)
d14a1e28
RD
1681DefaultPosition = cvar.DefaultPosition
1682DefaultSize = cvar.DefaultSize
1683
1684class OutputStream(object):
093d3ff1 1685 """Proxy of C++ OutputStream class"""
d14a1e28
RD
1686 def __init__(self): raise RuntimeError, "No constructor defined"
1687 def __repr__(self):
1688 return "<%s.%s; proxy of C++ wxOutputStream instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
e811c8ce 1689 def write(*args, **kwargs):
a95a7133 1690 """write(self, PyObject obj)"""
54f9ee45 1691 return _core_.OutputStream_write(*args, **kwargs)
e811c8ce 1692
d14a1e28
RD
1693
1694class OutputStreamPtr(OutputStream):
1695 def __init__(self, this):
1696 self.this = this
1697 if not hasattr(self,"thisown"): self.thisown = 0
1698 self.__class__ = OutputStream
54f9ee45 1699_core_.OutputStream_swigregister(OutputStreamPtr)
d14a1e28
RD
1700
1701#---------------------------------------------------------------------------
1702
1703class FSFile(Object):
093d3ff1 1704 """Proxy of C++ FSFile class"""
e811c8ce
RD
1705 def __repr__(self):
1706 return "<%s.%s; proxy of C++ wxFSFile instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 1707 def __init__(self, *args, **kwargs):
0df68c9f 1708 """
a95a7133 1709 __init__(self, InputStream stream, String loc, String mimetype, String anchor,
196addbf 1710 DateTime modif) -> FSFile
0df68c9f 1711 """
54f9ee45 1712 newobj = _core_.new_FSFile(*args, **kwargs)
d14a1e28
RD
1713 self.this = newobj.this
1714 self.thisown = 1
1715 del newobj.thisown
e2950dbb 1716 self.thisown = 0 # It will normally be deleted by the user of the wx.FileSystem
4cf4100f 1717
54f9ee45 1718 def __del__(self, destroy=_core_.delete_FSFile):
a95a7133 1719 """__del__(self)"""
d14a1e28
RD
1720 try:
1721 if self.thisown: destroy(self)
1722 except: pass
e811c8ce
RD
1723
1724 def GetStream(*args, **kwargs):
a95a7133 1725 """GetStream(self) -> InputStream"""
54f9ee45 1726 return _core_.FSFile_GetStream(*args, **kwargs)
e811c8ce
RD
1727
1728 def GetMimeType(*args, **kwargs):
a95a7133 1729 """GetMimeType(self) -> String"""
54f9ee45 1730 return _core_.FSFile_GetMimeType(*args, **kwargs)
e811c8ce
RD
1731
1732 def GetLocation(*args, **kwargs):
a95a7133 1733 """GetLocation(self) -> String"""
54f9ee45 1734 return _core_.FSFile_GetLocation(*args, **kwargs)
e811c8ce
RD
1735
1736 def GetAnchor(*args, **kwargs):
a95a7133 1737 """GetAnchor(self) -> String"""
54f9ee45 1738 return _core_.FSFile_GetAnchor(*args, **kwargs)
e811c8ce
RD
1739
1740 def GetModificationTime(*args, **kwargs):
a95a7133 1741 """GetModificationTime(self) -> DateTime"""
54f9ee45 1742 return _core_.FSFile_GetModificationTime(*args, **kwargs)
e811c8ce 1743
d14a1e28
RD
1744
1745class FSFilePtr(FSFile):
1746 def __init__(self, this):
1747 self.this = this
1748 if not hasattr(self,"thisown"): self.thisown = 0
1749 self.__class__ = FSFile
54f9ee45 1750_core_.FSFile_swigregister(FSFilePtr)
d14a1e28
RD
1751
1752class CPPFileSystemHandler(object):
093d3ff1 1753 """Proxy of C++ CPPFileSystemHandler class"""
d14a1e28
RD
1754 def __init__(self): raise RuntimeError, "No constructor defined"
1755 def __repr__(self):
1756 return "<%s.%s; proxy of C++ wxFileSystemHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
1757
1758class CPPFileSystemHandlerPtr(CPPFileSystemHandler):
1759 def __init__(self, this):
1760 self.this = this
1761 if not hasattr(self,"thisown"): self.thisown = 0
1762 self.__class__ = CPPFileSystemHandler
54f9ee45 1763_core_.CPPFileSystemHandler_swigregister(CPPFileSystemHandlerPtr)
d14a1e28
RD
1764
1765class FileSystemHandler(CPPFileSystemHandler):
093d3ff1 1766 """Proxy of C++ FileSystemHandler class"""
e811c8ce
RD
1767 def __repr__(self):
1768 return "<%s.%s; proxy of C++ wxPyFileSystemHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 1769 def __init__(self, *args, **kwargs):
a95a7133 1770 """__init__(self) -> FileSystemHandler"""
54f9ee45 1771 newobj = _core_.new_FileSystemHandler(*args, **kwargs)
d14a1e28
RD
1772 self.this = newobj.this
1773 self.thisown = 1
1774 del newobj.thisown
1775 self._setCallbackInfo(self, FileSystemHandler)
e811c8ce
RD
1776
1777 def _setCallbackInfo(*args, **kwargs):
a95a7133 1778 """_setCallbackInfo(self, PyObject self, PyObject _class)"""
54f9ee45 1779 return _core_.FileSystemHandler__setCallbackInfo(*args, **kwargs)
e811c8ce
RD
1780
1781 def CanOpen(*args, **kwargs):
a95a7133 1782 """CanOpen(self, String location) -> bool"""
54f9ee45 1783 return _core_.FileSystemHandler_CanOpen(*args, **kwargs)
e811c8ce
RD
1784
1785 def OpenFile(*args, **kwargs):
a95a7133 1786 """OpenFile(self, FileSystem fs, String location) -> FSFile"""
54f9ee45 1787 return _core_.FileSystemHandler_OpenFile(*args, **kwargs)
e811c8ce
RD
1788
1789 def FindFirst(*args, **kwargs):
a95a7133 1790 """FindFirst(self, String spec, int flags=0) -> String"""
54f9ee45 1791 return _core_.FileSystemHandler_FindFirst(*args, **kwargs)
e811c8ce
RD
1792
1793 def FindNext(*args, **kwargs):
a95a7133 1794 """FindNext(self) -> String"""
54f9ee45 1795 return _core_.FileSystemHandler_FindNext(*args, **kwargs)
e811c8ce
RD
1796
1797 def GetProtocol(*args, **kwargs):
a95a7133 1798 """GetProtocol(self, String location) -> String"""
54f9ee45 1799 return _core_.FileSystemHandler_GetProtocol(*args, **kwargs)
e811c8ce
RD
1800
1801 def GetLeftLocation(*args, **kwargs):
a95a7133 1802 """GetLeftLocation(self, String location) -> String"""
54f9ee45 1803 return _core_.FileSystemHandler_GetLeftLocation(*args, **kwargs)
e811c8ce
RD
1804
1805 def GetAnchor(*args, **kwargs):
a95a7133 1806 """GetAnchor(self, String location) -> String"""
54f9ee45 1807 return _core_.FileSystemHandler_GetAnchor(*args, **kwargs)
e811c8ce
RD
1808
1809 def GetRightLocation(*args, **kwargs):
a95a7133 1810 """GetRightLocation(self, String location) -> String"""
54f9ee45 1811 return _core_.FileSystemHandler_GetRightLocation(*args, **kwargs)
e811c8ce
RD
1812
1813 def GetMimeTypeFromExt(*args, **kwargs):
a95a7133 1814 """GetMimeTypeFromExt(self, String location) -> String"""
54f9ee45 1815 return _core_.FileSystemHandler_GetMimeTypeFromExt(*args, **kwargs)
e811c8ce 1816
d14a1e28
RD
1817
1818class FileSystemHandlerPtr(FileSystemHandler):
1819 def __init__(self, this):
1820 self.this = this
1821 if not hasattr(self,"thisown"): self.thisown = 0
1822 self.__class__ = FileSystemHandler
54f9ee45 1823_core_.FileSystemHandler_swigregister(FileSystemHandlerPtr)
d14a1e28
RD
1824
1825class FileSystem(Object):
093d3ff1 1826 """Proxy of C++ FileSystem class"""
e811c8ce
RD
1827 def __repr__(self):
1828 return "<%s.%s; proxy of C++ wxFileSystem instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 1829 def __init__(self, *args, **kwargs):
a95a7133 1830 """__init__(self) -> FileSystem"""
54f9ee45 1831 newobj = _core_.new_FileSystem(*args, **kwargs)
d14a1e28
RD
1832 self.this = newobj.this
1833 self.thisown = 1
1834 del newobj.thisown
54f9ee45 1835 def __del__(self, destroy=_core_.delete_FileSystem):
a95a7133 1836 """__del__(self)"""
d14a1e28
RD
1837 try:
1838 if self.thisown: destroy(self)
1839 except: pass
e811c8ce
RD
1840
1841 def ChangePathTo(*args, **kwargs):
a95a7133 1842 """ChangePathTo(self, String location, bool is_dir=False)"""
54f9ee45 1843 return _core_.FileSystem_ChangePathTo(*args, **kwargs)
e811c8ce
RD
1844
1845 def GetPath(*args, **kwargs):
a95a7133 1846 """GetPath(self) -> String"""
54f9ee45 1847 return _core_.FileSystem_GetPath(*args, **kwargs)
e811c8ce
RD
1848
1849 def OpenFile(*args, **kwargs):
a95a7133 1850 """OpenFile(self, String location) -> FSFile"""
54f9ee45 1851 return _core_.FileSystem_OpenFile(*args, **kwargs)
e811c8ce
RD
1852
1853 def FindFirst(*args, **kwargs):
a95a7133 1854 """FindFirst(self, String spec, int flags=0) -> String"""
54f9ee45 1855 return _core_.FileSystem_FindFirst(*args, **kwargs)
e811c8ce
RD
1856
1857 def FindNext(*args, **kwargs):
a95a7133 1858 """FindNext(self) -> String"""
54f9ee45 1859 return _core_.FileSystem_FindNext(*args, **kwargs)
e811c8ce
RD
1860
1861 def AddHandler(*args, **kwargs):
66c033b4 1862 """AddHandler(CPPFileSystemHandler handler)"""
54f9ee45 1863 return _core_.FileSystem_AddHandler(*args, **kwargs)
e811c8ce
RD
1864
1865 AddHandler = staticmethod(AddHandler)
1866 def CleanUpHandlers(*args, **kwargs):
66c033b4 1867 """CleanUpHandlers()"""
54f9ee45 1868 return _core_.FileSystem_CleanUpHandlers(*args, **kwargs)
e811c8ce
RD
1869
1870 CleanUpHandlers = staticmethod(CleanUpHandlers)
1871 def FileNameToURL(*args, **kwargs):
66c033b4 1872 """FileNameToURL(String filename) -> String"""
54f9ee45 1873 return _core_.FileSystem_FileNameToURL(*args, **kwargs)
e811c8ce
RD
1874
1875 FileNameToURL = staticmethod(FileNameToURL)
2ef75293
RD
1876 def URLToFileName(*args, **kwargs):
1877 """URLToFileName(String url) -> String"""
1878 return _core_.FileSystem_URLToFileName(*args, **kwargs)
1879
1880 URLToFileName = staticmethod(URLToFileName)
d14a1e28
RD
1881
1882class FileSystemPtr(FileSystem):
1883 def __init__(self, this):
1884 self.this = this
1885 if not hasattr(self,"thisown"): self.thisown = 0
1886 self.__class__ = FileSystem
54f9ee45 1887_core_.FileSystem_swigregister(FileSystemPtr)
d14a1e28 1888
e811c8ce
RD
1889def FileSystem_AddHandler(*args, **kwargs):
1890 """FileSystem_AddHandler(CPPFileSystemHandler handler)"""
54f9ee45 1891 return _core_.FileSystem_AddHandler(*args, **kwargs)
d14a1e28 1892
e811c8ce
RD
1893def FileSystem_CleanUpHandlers(*args, **kwargs):
1894 """FileSystem_CleanUpHandlers()"""
54f9ee45 1895 return _core_.FileSystem_CleanUpHandlers(*args, **kwargs)
d14a1e28 1896
e811c8ce 1897def FileSystem_FileNameToURL(*args, **kwargs):
196addbf 1898 """FileSystem_FileNameToURL(String filename) -> String"""
54f9ee45 1899 return _core_.FileSystem_FileNameToURL(*args, **kwargs)
d14a1e28 1900
e811c8ce 1901def FileSystem_URLToFileName(*args, **kwargs):
196addbf 1902 """FileSystem_URLToFileName(String url) -> String"""
54f9ee45 1903 return _core_.FileSystem_URLToFileName(*args, **kwargs)
2ef75293 1904
d14a1e28 1905class InternetFSHandler(CPPFileSystemHandler):
093d3ff1 1906 """Proxy of C++ InternetFSHandler class"""
e811c8ce
RD
1907 def __repr__(self):
1908 return "<%s.%s; proxy of C++ wxInternetFSHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 1909 def __init__(self, *args, **kwargs):
a95a7133 1910 """__init__(self) -> InternetFSHandler"""
54f9ee45 1911 newobj = _core_.new_InternetFSHandler(*args, **kwargs)
d14a1e28
RD
1912 self.this = newobj.this
1913 self.thisown = 1
1914 del newobj.thisown
e811c8ce 1915 def CanOpen(*args, **kwargs):
a95a7133 1916 """CanOpen(self, String location) -> bool"""
54f9ee45 1917 return _core_.InternetFSHandler_CanOpen(*args, **kwargs)
e811c8ce
RD
1918
1919 def OpenFile(*args, **kwargs):
a95a7133 1920 """OpenFile(self, FileSystem fs, String location) -> FSFile"""
54f9ee45 1921 return _core_.InternetFSHandler_OpenFile(*args, **kwargs)
e811c8ce 1922
d14a1e28
RD
1923
1924class InternetFSHandlerPtr(InternetFSHandler):
1925 def __init__(self, this):
1926 self.this = this
1927 if not hasattr(self,"thisown"): self.thisown = 0
1928 self.__class__ = InternetFSHandler
54f9ee45 1929_core_.InternetFSHandler_swigregister(InternetFSHandlerPtr)
d14a1e28
RD
1930
1931class ZipFSHandler(CPPFileSystemHandler):
093d3ff1 1932 """Proxy of C++ ZipFSHandler class"""
e811c8ce
RD
1933 def __repr__(self):
1934 return "<%s.%s; proxy of C++ wxZipFSHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 1935 def __init__(self, *args, **kwargs):
a95a7133 1936 """__init__(self) -> ZipFSHandler"""
54f9ee45 1937 newobj = _core_.new_ZipFSHandler(*args, **kwargs)
d14a1e28
RD
1938 self.this = newobj.this
1939 self.thisown = 1
1940 del newobj.thisown
e811c8ce 1941 def CanOpen(*args, **kwargs):
a95a7133 1942 """CanOpen(self, String location) -> bool"""
54f9ee45 1943 return _core_.ZipFSHandler_CanOpen(*args, **kwargs)
e811c8ce
RD
1944
1945 def OpenFile(*args, **kwargs):
a95a7133 1946 """OpenFile(self, FileSystem fs, String location) -> FSFile"""
54f9ee45 1947 return _core_.ZipFSHandler_OpenFile(*args, **kwargs)
e811c8ce
RD
1948
1949 def FindFirst(*args, **kwargs):
a95a7133 1950 """FindFirst(self, String spec, int flags=0) -> String"""
54f9ee45 1951 return _core_.ZipFSHandler_FindFirst(*args, **kwargs)
e811c8ce
RD
1952
1953 def FindNext(*args, **kwargs):
a95a7133 1954 """FindNext(self) -> String"""
54f9ee45 1955 return _core_.ZipFSHandler_FindNext(*args, **kwargs)
e811c8ce 1956
d14a1e28
RD
1957
1958class ZipFSHandlerPtr(ZipFSHandler):
1959 def __init__(self, this):
1960 self.this = this
1961 if not hasattr(self,"thisown"): self.thisown = 0
1962 self.__class__ = ZipFSHandler
54f9ee45 1963_core_.ZipFSHandler_swigregister(ZipFSHandlerPtr)
d14a1e28
RD
1964
1965
e811c8ce 1966def __wxMemoryFSHandler_AddFile_wxImage(*args, **kwargs):
196addbf 1967 """__wxMemoryFSHandler_AddFile_wxImage(String filename, Image image, long type)"""
54f9ee45 1968 return _core_.__wxMemoryFSHandler_AddFile_wxImage(*args, **kwargs)
d14a1e28 1969
e811c8ce 1970def __wxMemoryFSHandler_AddFile_wxBitmap(*args, **kwargs):
196addbf 1971 """__wxMemoryFSHandler_AddFile_wxBitmap(String filename, Bitmap bitmap, long type)"""
54f9ee45 1972 return _core_.__wxMemoryFSHandler_AddFile_wxBitmap(*args, **kwargs)
d14a1e28 1973
e811c8ce 1974def __wxMemoryFSHandler_AddFile_Data(*args, **kwargs):
196addbf 1975 """__wxMemoryFSHandler_AddFile_Data(String filename, PyObject data)"""
54f9ee45 1976 return _core_.__wxMemoryFSHandler_AddFile_Data(*args, **kwargs)
2ef75293
RD
1977def MemoryFSHandler_AddFile(filename, dataItem, imgType=-1):
1978 """
1979 Add 'file' to the memory filesystem. The dataItem parameter can
1980 either be a `wx.Bitmap`, `wx.Image` or a string that can contain
1981 arbitrary data. If a bitmap or image is used then the imgType
1982 parameter should specify what kind of image file it should be
1983 written as, wx.BITMAP_TYPE_PNG, etc.
1984 """
1985 if isinstance(dataItem, wx.Image):
1986 __wxMemoryFSHandler_AddFile_wxImage(filename, dataItem, imgType)
1987 elif isinstance(dataItem, wx.Bitmap):
1988 __wxMemoryFSHandler_AddFile_wxBitmap(filename, dataItem, imgType)
1989 elif type(dataItem) == str:
1990 __wxMemoryFSHandler_AddFile_Data(filename, dataItem)
1991 else:
1992 raise TypeError, 'wx.Image, wx.Bitmap or string expected'
d14a1e28
RD
1993
1994class MemoryFSHandler(CPPFileSystemHandler):
093d3ff1 1995 """Proxy of C++ MemoryFSHandler class"""
e811c8ce
RD
1996 def __repr__(self):
1997 return "<%s.%s; proxy of C++ wxMemoryFSHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 1998 def __init__(self, *args, **kwargs):
a95a7133 1999 """__init__(self) -> MemoryFSHandler"""
54f9ee45 2000 newobj = _core_.new_MemoryFSHandler(*args, **kwargs)
d14a1e28
RD
2001 self.this = newobj.this
2002 self.thisown = 1
2003 del newobj.thisown
e811c8ce 2004 def RemoveFile(*args, **kwargs):
66c033b4 2005 """RemoveFile(String filename)"""
54f9ee45 2006 return _core_.MemoryFSHandler_RemoveFile(*args, **kwargs)
e811c8ce
RD
2007
2008 RemoveFile = staticmethod(RemoveFile)
d14a1e28 2009 AddFile = staticmethod(MemoryFSHandler_AddFile)
e811c8ce 2010 def CanOpen(*args, **kwargs):
a95a7133 2011 """CanOpen(self, String location) -> bool"""
54f9ee45 2012 return _core_.MemoryFSHandler_CanOpen(*args, **kwargs)
e811c8ce
RD
2013
2014 def OpenFile(*args, **kwargs):
a95a7133 2015 """OpenFile(self, FileSystem fs, String location) -> FSFile"""
54f9ee45 2016 return _core_.MemoryFSHandler_OpenFile(*args, **kwargs)
e811c8ce
RD
2017
2018 def FindFirst(*args, **kwargs):
a95a7133 2019 """FindFirst(self, String spec, int flags=0) -> String"""
54f9ee45 2020 return _core_.MemoryFSHandler_FindFirst(*args, **kwargs)
e811c8ce
RD
2021
2022 def FindNext(*args, **kwargs):
a95a7133 2023 """FindNext(self) -> String"""
54f9ee45 2024 return _core_.MemoryFSHandler_FindNext(*args, **kwargs)
e811c8ce 2025
d14a1e28
RD
2026
2027class MemoryFSHandlerPtr(MemoryFSHandler):
2028 def __init__(self, this):
2029 self.this = this
2030 if not hasattr(self,"thisown"): self.thisown = 0
2031 self.__class__ = MemoryFSHandler
54f9ee45 2032_core_.MemoryFSHandler_swigregister(MemoryFSHandlerPtr)
d14a1e28 2033
e811c8ce 2034def MemoryFSHandler_RemoveFile(*args, **kwargs):
196addbf 2035 """MemoryFSHandler_RemoveFile(String filename)"""
54f9ee45 2036 return _core_.MemoryFSHandler_RemoveFile(*args, **kwargs)
d14a1e28 2037
bcd0d7b6
RD
2038IMAGE_ALPHA_TRANSPARENT = _core_.IMAGE_ALPHA_TRANSPARENT
2039IMAGE_ALPHA_THRESHOLD = _core_.IMAGE_ALPHA_THRESHOLD
2040IMAGE_ALPHA_OPAQUE = _core_.IMAGE_ALPHA_OPAQUE
d14a1e28
RD
2041#---------------------------------------------------------------------------
2042
2043class ImageHandler(Object):
27fb7603
RD
2044 """
2045 This is the base class for implementing image file loading/saving, and
2046 image creation from data. It is used within `wx.Image` and is not
2047 normally seen by the application.
2048 """
d14a1e28
RD
2049 def __init__(self): raise RuntimeError, "No constructor defined"
2050 def __repr__(self):
2051 return "<%s.%s; proxy of C++ wxImageHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
e811c8ce 2052 def GetName(*args, **kwargs):
a95a7133 2053 """GetName(self) -> String"""
54f9ee45 2054 return _core_.ImageHandler_GetName(*args, **kwargs)
e811c8ce
RD
2055
2056 def GetExtension(*args, **kwargs):
a95a7133 2057 """GetExtension(self) -> String"""
54f9ee45 2058 return _core_.ImageHandler_GetExtension(*args, **kwargs)
e811c8ce
RD
2059
2060 def GetType(*args, **kwargs):
a95a7133 2061 """GetType(self) -> long"""
54f9ee45 2062 return _core_.ImageHandler_GetType(*args, **kwargs)
e811c8ce
RD
2063
2064 def GetMimeType(*args, **kwargs):
a95a7133 2065 """GetMimeType(self) -> String"""
54f9ee45 2066 return _core_.ImageHandler_GetMimeType(*args, **kwargs)
e811c8ce
RD
2067
2068 def CanRead(*args, **kwargs):
a95a7133 2069 """CanRead(self, String name) -> bool"""
54f9ee45 2070 return _core_.ImageHandler_CanRead(*args, **kwargs)
e811c8ce
RD
2071
2072 def SetName(*args, **kwargs):
a95a7133 2073 """SetName(self, String name)"""
54f9ee45 2074 return _core_.ImageHandler_SetName(*args, **kwargs)
e811c8ce
RD
2075
2076 def SetExtension(*args, **kwargs):
a95a7133 2077 """SetExtension(self, String extension)"""
54f9ee45 2078 return _core_.ImageHandler_SetExtension(*args, **kwargs)
e811c8ce
RD
2079
2080 def SetType(*args, **kwargs):
a95a7133 2081 """SetType(self, long type)"""
54f9ee45 2082 return _core_.ImageHandler_SetType(*args, **kwargs)
e811c8ce
RD
2083
2084 def SetMimeType(*args, **kwargs):
a95a7133 2085 """SetMimeType(self, String mimetype)"""
54f9ee45 2086 return _core_.ImageHandler_SetMimeType(*args, **kwargs)
e811c8ce 2087
d14a1e28
RD
2088
2089class ImageHandlerPtr(ImageHandler):
2090 def __init__(self, this):
2091 self.this = this
2092 if not hasattr(self,"thisown"): self.thisown = 0
2093 self.__class__ = ImageHandler
54f9ee45 2094_core_.ImageHandler_swigregister(ImageHandlerPtr)
d14a1e28
RD
2095
2096class ImageHistogram(object):
093d3ff1 2097 """Proxy of C++ ImageHistogram class"""
e811c8ce
RD
2098 def __repr__(self):
2099 return "<%s.%s; proxy of C++ wxImageHistogram instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 2100 def __init__(self, *args, **kwargs):
a95a7133 2101 """__init__(self) -> ImageHistogram"""
54f9ee45 2102 newobj = _core_.new_ImageHistogram(*args, **kwargs)
d14a1e28
RD
2103 self.this = newobj.this
2104 self.thisown = 1
2105 del newobj.thisown
e811c8ce 2106 def MakeKey(*args, **kwargs):
0df68c9f 2107 """
66c033b4 2108 MakeKey(unsigned char r, unsigned char g, unsigned char b) -> unsigned long
e811c8ce 2109
0df68c9f
RD
2110 Get the key in the histogram for the given RGB values
2111 """
54f9ee45 2112 return _core_.ImageHistogram_MakeKey(*args, **kwargs)
e811c8ce
RD
2113
2114 MakeKey = staticmethod(MakeKey)
2115 def FindFirstUnusedColour(*args, **kwargs):
fd2dc343
RD
2116 """
2117 FindFirstUnusedColour(int startR=1, int startG=0, int startB=0) -> (success, r, g, b)
2118
2119 Find first colour that is not used in the image and has higher RGB
2120 values than startR, startG, startB. Returns a tuple consisting of a
2121 success flag and rgb values.
2122 """
54f9ee45 2123 return _core_.ImageHistogram_FindFirstUnusedColour(*args, **kwargs)
e811c8ce 2124
f1cbd8fa
RD
2125 def GetCount(*args, **kwargs):
2126 """
2127 GetCount(self, unsigned long key) -> unsigned long
2128
2129 Returns the pixel count for the given key. Use `MakeKey` to create a
2130 key value from a RGB tripple.
2131 """
2132 return _core_.ImageHistogram_GetCount(*args, **kwargs)
2133
2134 def GetCountRGB(*args, **kwargs):
2135 """
2136 GetCountRGB(self, unsigned char r, unsigned char g, unsigned char b) -> unsigned long
2137
2138 Returns the pixel count for the given RGB values.
2139 """
2140 return _core_.ImageHistogram_GetCountRGB(*args, **kwargs)
2141
2142 def GetCountColour(*args, **kwargs):
2143 """
2144 GetCountColour(self, Colour colour) -> unsigned long
2145
2146 Returns the pixel count for the given `wx.Colour` value.
2147 """
2148 return _core_.ImageHistogram_GetCountColour(*args, **kwargs)
2149
d14a1e28
RD
2150
2151class ImageHistogramPtr(ImageHistogram):
2152 def __init__(self, this):
2153 self.this = this
2154 if not hasattr(self,"thisown"): self.thisown = 0
2155 self.__class__ = ImageHistogram
54f9ee45 2156_core_.ImageHistogram_swigregister(ImageHistogramPtr)
d14a1e28 2157
e811c8ce 2158def ImageHistogram_MakeKey(*args, **kwargs):
0df68c9f
RD
2159 """
2160 ImageHistogram_MakeKey(unsigned char r, unsigned char g, unsigned char b) -> unsigned long
e811c8ce 2161
0df68c9f
RD
2162 Get the key in the histogram for the given RGB values
2163 """
54f9ee45 2164 return _core_.ImageHistogram_MakeKey(*args, **kwargs)
d14a1e28
RD
2165
2166class Image(Object):
093d3ff1 2167 """Proxy of C++ Image class"""
e811c8ce
RD
2168 def __repr__(self):
2169 return "<%s.%s; proxy of C++ wxImage instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 2170 def __init__(self, *args, **kwargs):
a95a7133 2171 """__init__(self, String name, long type=BITMAP_TYPE_ANY, int index=-1) -> Image"""
54f9ee45 2172 newobj = _core_.new_Image(*args, **kwargs)
d14a1e28
RD
2173 self.this = newobj.this
2174 self.thisown = 1
2175 del newobj.thisown
54f9ee45 2176 def __del__(self, destroy=_core_.delete_Image):
a95a7133 2177 """__del__(self)"""
d14a1e28
RD
2178 try:
2179 if self.thisown: destroy(self)
2180 except: pass
e811c8ce
RD
2181
2182 def Create(*args, **kwargs):
a95a7133 2183 """Create(self, int width, int height)"""
54f9ee45 2184 return _core_.Image_Create(*args, **kwargs)
e811c8ce
RD
2185
2186 def Destroy(*args, **kwargs):
0df68c9f 2187 """
a95a7133 2188 Destroy(self)
e811c8ce 2189
0df68c9f
RD
2190 Deletes the C++ object this Python object is a proxy for.
2191 """
54f9ee45 2192 return _core_.Image_Destroy(*args, **kwargs)
e811c8ce
RD
2193
2194 def Scale(*args, **kwargs):
a95a7133 2195 """Scale(self, int width, int height) -> Image"""
54f9ee45 2196 return _core_.Image_Scale(*args, **kwargs)
e811c8ce
RD
2197
2198 def ShrinkBy(*args, **kwargs):
a95a7133 2199 """ShrinkBy(self, int xFactor, int yFactor) -> Image"""
54f9ee45 2200 return _core_.Image_ShrinkBy(*args, **kwargs)
e811c8ce
RD
2201
2202 def Rescale(*args, **kwargs):
a95a7133 2203 """Rescale(self, int width, int height) -> Image"""
54f9ee45 2204 return _core_.Image_Rescale(*args, **kwargs)
e811c8ce 2205
aff4cc5c
RD
2206 def Resize(*args, **kwargs):
2207 """Resize(self, Size size, Point pos, int r=-1, int g=-1, int b=-1) -> Image"""
2208 return _core_.Image_Resize(*args, **kwargs)
2209
e811c8ce 2210 def SetRGB(*args, **kwargs):
a95a7133 2211 """SetRGB(self, int x, int y, unsigned char r, unsigned char g, unsigned char b)"""
54f9ee45 2212 return _core_.Image_SetRGB(*args, **kwargs)
e811c8ce 2213
aff4cc5c
RD
2214 def SetRGBRect(*args, **kwargs):
2215 """SetRGBRect(self, Rect rect, unsigned char r, unsigned char g, unsigned char b)"""
2216 return _core_.Image_SetRGBRect(*args, **kwargs)
2217
e811c8ce 2218 def GetRed(*args, **kwargs):
a95a7133 2219 """GetRed(self, int x, int y) -> unsigned char"""
54f9ee45 2220 return _core_.Image_GetRed(*args, **kwargs)
e811c8ce
RD
2221
2222 def GetGreen(*args, **kwargs):
a95a7133 2223 """GetGreen(self, int x, int y) -> unsigned char"""
54f9ee45 2224 return _core_.Image_GetGreen(*args, **kwargs)
e811c8ce
RD
2225
2226 def GetBlue(*args, **kwargs):
a95a7133 2227 """GetBlue(self, int x, int y) -> unsigned char"""
54f9ee45 2228 return _core_.Image_GetBlue(*args, **kwargs)
e811c8ce
RD
2229
2230 def SetAlpha(*args, **kwargs):
a95a7133 2231 """SetAlpha(self, int x, int y, unsigned char alpha)"""
54f9ee45 2232 return _core_.Image_SetAlpha(*args, **kwargs)
e811c8ce
RD
2233
2234 def GetAlpha(*args, **kwargs):
a95a7133 2235 """GetAlpha(self, int x, int y) -> unsigned char"""
54f9ee45 2236 return _core_.Image_GetAlpha(*args, **kwargs)
e811c8ce
RD
2237
2238 def HasAlpha(*args, **kwargs):
a95a7133 2239 """HasAlpha(self) -> bool"""
54f9ee45 2240 return _core_.Image_HasAlpha(*args, **kwargs)
e811c8ce 2241
68350608
RD
2242 def InitAlpha(*args, **kwargs):
2243 """
2244 InitAlpha(self)
2245
2246 Initializes the image alpha channel data. It is an error to call it if
2247 the image already has alpha data. If it doesn't, alpha data will be by
2248 default initialized to all pixels being fully opaque. But if the image
2249 has a a mask colour, all mask pixels will be completely transparent.
2250 """
2251 return _core_.Image_InitAlpha(*args, **kwargs)
2252
bcd0d7b6
RD
2253 def IsTransparent(*args, **kwargs):
2254 """
2255 IsTransparent(self, int x, int y, unsigned char threshold=IMAGE_ALPHA_THRESHOLD) -> bool
2256
2257 Returns True if this pixel is masked or has an alpha value less than
2258 the spcified threshold.
2259 """
2260 return _core_.Image_IsTransparent(*args, **kwargs)
2261
e811c8ce 2262 def FindFirstUnusedColour(*args, **kwargs):
fd2dc343
RD
2263 """
2264 FindFirstUnusedColour(int startR=1, int startG=0, int startB=0) -> (success, r, g, b)
2265
2266 Find first colour that is not used in the image and has higher RGB
2267 values than startR, startG, startB. Returns a tuple consisting of a
2268 success flag and rgb values.
2269 """
54f9ee45 2270 return _core_.Image_FindFirstUnusedColour(*args, **kwargs)
e811c8ce 2271
4cf4100f
RD
2272 def ConvertAlphaToMask(*args, **kwargs):
2273 """
bcd0d7b6 2274 ConvertAlphaToMask(self, byte threshold=IMAGE_ALPHA_THRESHOLD) -> bool
4cf4100f
RD
2275
2276 If the image has alpha channel, this method converts it to mask. All pixels
2277 with alpha value less than ``threshold`` are replaced with mask colour and the
2278 alpha channel is removed. Mask colour is chosen automatically using
2279 `FindFirstUnusedColour`.
2280
2281 If the image image doesn't have alpha channel, ConvertAlphaToMask does
2282 nothing.
2283 """
2284 return _core_.Image_ConvertAlphaToMask(*args, **kwargs)
2285
8fb0e70a
RD
2286 def ConvertColourToAlpha(*args, **kwargs):
2287 """
2288 ConvertColourToAlpha(self, unsigned char r, unsigned char g, unsigned char b) -> bool
2289
2290 This method converts an image where the original alpha information is
2291 only available as a shades of a colour (actually shades of grey)
2292 typically when you draw anti-aliased text into a bitmap. The DC
2293 drawing routines draw grey values on the black background although
2294 they actually mean to draw white with differnt alpha values. This
2295 method reverses it, assuming a black (!) background and white text.
2296 The method will then fill up the whole image with the colour given.
2297 """
2298 return _core_.Image_ConvertColourToAlpha(*args, **kwargs)
2299
e811c8ce 2300 def SetMaskFromImage(*args, **kwargs):
a95a7133 2301 """SetMaskFromImage(self, Image mask, byte mr, byte mg, byte mb) -> bool"""
54f9ee45 2302 return _core_.Image_SetMaskFromImage(*args, **kwargs)
e811c8ce
RD
2303
2304 def CanRead(*args, **kwargs):
66c033b4 2305 """CanRead(String name) -> bool"""
54f9ee45 2306 return _core_.Image_CanRead(*args, **kwargs)
e811c8ce
RD
2307
2308 CanRead = staticmethod(CanRead)
2309 def GetImageCount(*args, **kwargs):
66c033b4 2310 """GetImageCount(String name, long type=BITMAP_TYPE_ANY) -> int"""
54f9ee45 2311 return _core_.Image_GetImageCount(*args, **kwargs)
e811c8ce
RD
2312
2313 GetImageCount = staticmethod(GetImageCount)
2314 def LoadFile(*args, **kwargs):
a95a7133 2315 """LoadFile(self, String name, long type=BITMAP_TYPE_ANY, int index=-1) -> bool"""
54f9ee45 2316 return _core_.Image_LoadFile(*args, **kwargs)
e811c8ce
RD
2317
2318 def LoadMimeFile(*args, **kwargs):
a95a7133 2319 """LoadMimeFile(self, String name, String mimetype, int index=-1) -> bool"""
54f9ee45 2320 return _core_.Image_LoadMimeFile(*args, **kwargs)
e811c8ce
RD
2321
2322 def SaveFile(*args, **kwargs):
a95a7133 2323 """SaveFile(self, String name, int type) -> bool"""
54f9ee45 2324 return _core_.Image_SaveFile(*args, **kwargs)
e811c8ce
RD
2325
2326 def SaveMimeFile(*args, **kwargs):
a95a7133 2327 """SaveMimeFile(self, String name, String mimetype) -> bool"""
54f9ee45 2328 return _core_.Image_SaveMimeFile(*args, **kwargs)
e811c8ce
RD
2329
2330 def CanReadStream(*args, **kwargs):
66c033b4 2331 """CanReadStream(InputStream stream) -> bool"""
54f9ee45 2332 return _core_.Image_CanReadStream(*args, **kwargs)
e811c8ce
RD
2333
2334 CanReadStream = staticmethod(CanReadStream)
2335 def LoadStream(*args, **kwargs):
a95a7133 2336 """LoadStream(self, InputStream stream, long type=BITMAP_TYPE_ANY, int index=-1) -> bool"""
54f9ee45 2337 return _core_.Image_LoadStream(*args, **kwargs)
e811c8ce
RD
2338
2339 def LoadMimeStream(*args, **kwargs):
a95a7133 2340 """LoadMimeStream(self, InputStream stream, String mimetype, int index=-1) -> bool"""
54f9ee45 2341 return _core_.Image_LoadMimeStream(*args, **kwargs)
e811c8ce
RD
2342
2343 def Ok(*args, **kwargs):
a95a7133 2344 """Ok(self) -> bool"""
54f9ee45 2345 return _core_.Image_Ok(*args, **kwargs)
e811c8ce
RD
2346
2347 def GetWidth(*args, **kwargs):
a95a7133 2348 """GetWidth(self) -> int"""
54f9ee45 2349 return _core_.Image_GetWidth(*args, **kwargs)
e811c8ce
RD
2350
2351 def GetHeight(*args, **kwargs):
a95a7133 2352 """GetHeight(self) -> int"""
54f9ee45 2353 return _core_.Image_GetHeight(*args, **kwargs)
e811c8ce 2354
b2df227b 2355 def GetSize(*args, **kwargs):
a95a7133 2356 """GetSize(self) -> Size"""
54f9ee45 2357 return _core_.Image_GetSize(*args, **kwargs)
b2df227b 2358
e811c8ce 2359 def GetSubImage(*args, **kwargs):
a95a7133 2360 """GetSubImage(self, Rect rect) -> Image"""
54f9ee45 2361 return _core_.Image_GetSubImage(*args, **kwargs)
e811c8ce 2362
aff4cc5c
RD
2363 def Size(*args, **kwargs):
2364 """Size(self, Size size, Point pos, int r=-1, int g=-1, int b=-1) -> Image"""
2365 return _core_.Image_Size(*args, **kwargs)
2366
e811c8ce 2367 def Copy(*args, **kwargs):
a95a7133 2368 """Copy(self) -> Image"""
54f9ee45 2369 return _core_.Image_Copy(*args, **kwargs)
e811c8ce
RD
2370
2371 def Paste(*args, **kwargs):
a95a7133 2372 """Paste(self, Image image, int x, int y)"""
54f9ee45 2373 return _core_.Image_Paste(*args, **kwargs)
e811c8ce
RD
2374
2375 def GetData(*args, **kwargs):
61d07ac7
RD
2376 """
2377 GetData(self) -> PyObject
2378
2379 Returns a string containing a copy of the RGB bytes of the image.
2380 """
54f9ee45 2381 return _core_.Image_GetData(*args, **kwargs)
e811c8ce
RD
2382
2383 def SetData(*args, **kwargs):
61d07ac7
RD
2384 """
2385 SetData(self, buffer data)
2386
2387 Resets the Image's RGB data from a buffer of RGB bytes. Accepts
2388 either a string or a buffer object holding the data and the length of
2389 the data must be width*height*3.
2390 """
54f9ee45 2391 return _core_.Image_SetData(*args, **kwargs)
e811c8ce
RD
2392
2393 def GetDataBuffer(*args, **kwargs):
61d07ac7
RD
2394 """
2395 GetDataBuffer(self) -> PyObject
2396
2397 Returns a writable Python buffer object that is pointing at the RGB
2398 image data buffer inside the wx.Image.
2399 """
54f9ee45 2400 return _core_.Image_GetDataBuffer(*args, **kwargs)
e811c8ce
RD
2401
2402 def SetDataBuffer(*args, **kwargs):
61d07ac7
RD
2403 """
2404 SetDataBuffer(self, buffer data)
2405
2406 Sets the internal image data pointer to point at a Python buffer
2407 object. This can save a copy of the data but you must ensure that the
2408 buffer object lives longer than the wx.Image does.
2409 """
54f9ee45 2410 return _core_.Image_SetDataBuffer(*args, **kwargs)
e811c8ce
RD
2411
2412 def GetAlphaData(*args, **kwargs):
61d07ac7
RD
2413 """
2414 GetAlphaData(self) -> PyObject
2415
2416 Returns a string containing a copy of the alpha bytes of the image.
2417 """
54f9ee45 2418 return _core_.Image_GetAlphaData(*args, **kwargs)
e811c8ce
RD
2419
2420 def SetAlphaData(*args, **kwargs):
61d07ac7
RD
2421 """
2422 SetAlphaData(self, buffer alpha)
2423
2424 Resets the Image's alpha data from a buffer of bytes. Accepts either
2425 a string or a buffer object holding the data and the length of the
2426 data must be width*height.
2427 """
54f9ee45 2428 return _core_.Image_SetAlphaData(*args, **kwargs)
e811c8ce
RD
2429
2430 def GetAlphaBuffer(*args, **kwargs):
a95a7133 2431 """GetAlphaBuffer(self) -> PyObject"""
54f9ee45 2432 return _core_.Image_GetAlphaBuffer(*args, **kwargs)
e811c8ce
RD
2433
2434 def SetAlphaBuffer(*args, **kwargs):
61d07ac7 2435 """SetAlphaBuffer(self, buffer alpha)"""
54f9ee45 2436 return _core_.Image_SetAlphaBuffer(*args, **kwargs)
e811c8ce
RD
2437
2438 def SetMaskColour(*args, **kwargs):
a95a7133 2439 """SetMaskColour(self, unsigned char r, unsigned char g, unsigned char b)"""
54f9ee45 2440 return _core_.Image_SetMaskColour(*args, **kwargs)
e811c8ce 2441
aff4cc5c
RD
2442 def GetOrFindMaskColour(*args, **kwargs):
2443 """
2444 GetOrFindMaskColour() -> (r,g,b)
2445
2446 Get the current mask colour or find a suitable colour.
2447 """
2448 return _core_.Image_GetOrFindMaskColour(*args, **kwargs)
2449
e811c8ce 2450 def GetMaskRed(*args, **kwargs):
a95a7133 2451 """GetMaskRed(self) -> unsigned char"""
54f9ee45 2452 return _core_.Image_GetMaskRed(*args, **kwargs)
e811c8ce
RD
2453
2454 def GetMaskGreen(*args, **kwargs):
a95a7133 2455 """GetMaskGreen(self) -> unsigned char"""
54f9ee45 2456 return _core_.Image_GetMaskGreen(*args, **kwargs)
e811c8ce
RD
2457
2458 def GetMaskBlue(*args, **kwargs):
a95a7133 2459 """GetMaskBlue(self) -> unsigned char"""
54f9ee45 2460 return _core_.Image_GetMaskBlue(*args, **kwargs)
e811c8ce
RD
2461
2462 def SetMask(*args, **kwargs):
a95a7133 2463 """SetMask(self, bool mask=True)"""
54f9ee45 2464 return _core_.Image_SetMask(*args, **kwargs)
e811c8ce
RD
2465
2466 def HasMask(*args, **kwargs):
a95a7133 2467 """HasMask(self) -> bool"""
54f9ee45 2468 return _core_.Image_HasMask(*args, **kwargs)
e811c8ce
RD
2469
2470 def Rotate(*args, **kwargs):
0df68c9f 2471 """
a95a7133 2472 Rotate(self, double angle, Point centre_of_rotation, bool interpolating=True,
0df68c9f
RD
2473 Point offset_after_rotation=None) -> Image
2474 """
54f9ee45 2475 return _core_.Image_Rotate(*args, **kwargs)
e811c8ce
RD
2476
2477 def Rotate90(*args, **kwargs):
a95a7133 2478 """Rotate90(self, bool clockwise=True) -> Image"""
54f9ee45 2479 return _core_.Image_Rotate90(*args, **kwargs)
e811c8ce
RD
2480
2481 def Mirror(*args, **kwargs):
a95a7133 2482 """Mirror(self, bool horizontally=True) -> Image"""
54f9ee45 2483 return _core_.Image_Mirror(*args, **kwargs)
e811c8ce
RD
2484
2485 def Replace(*args, **kwargs):
0df68c9f 2486 """
a95a7133 2487 Replace(self, unsigned char r1, unsigned char g1, unsigned char b1,
0df68c9f
RD
2488 unsigned char r2, unsigned char g2, unsigned char b2)
2489 """
54f9ee45 2490 return _core_.Image_Replace(*args, **kwargs)
e811c8ce
RD
2491
2492 def ConvertToMono(*args, **kwargs):
a95a7133 2493 """ConvertToMono(self, unsigned char r, unsigned char g, unsigned char b) -> Image"""
54f9ee45 2494 return _core_.Image_ConvertToMono(*args, **kwargs)
e811c8ce
RD
2495
2496 def SetOption(*args, **kwargs):
a95a7133 2497 """SetOption(self, String name, String value)"""
54f9ee45 2498 return _core_.Image_SetOption(*args, **kwargs)
e811c8ce
RD
2499
2500 def SetOptionInt(*args, **kwargs):
a95a7133 2501 """SetOptionInt(self, String name, int value)"""
54f9ee45 2502 return _core_.Image_SetOptionInt(*args, **kwargs)
e811c8ce
RD
2503
2504 def GetOption(*args, **kwargs):
a95a7133 2505 """GetOption(self, String name) -> String"""
54f9ee45 2506 return _core_.Image_GetOption(*args, **kwargs)
e811c8ce
RD
2507
2508 def GetOptionInt(*args, **kwargs):
a95a7133 2509 """GetOptionInt(self, String name) -> int"""
54f9ee45 2510 return _core_.Image_GetOptionInt(*args, **kwargs)
e811c8ce
RD
2511
2512 def HasOption(*args, **kwargs):
a95a7133 2513 """HasOption(self, String name) -> bool"""
54f9ee45 2514 return _core_.Image_HasOption(*args, **kwargs)
e811c8ce
RD
2515
2516 def CountColours(*args, **kwargs):
a95a7133 2517 """CountColours(self, unsigned long stopafter=(unsigned long) -1) -> unsigned long"""
54f9ee45 2518 return _core_.Image_CountColours(*args, **kwargs)
e811c8ce
RD
2519
2520 def ComputeHistogram(*args, **kwargs):
a95a7133 2521 """ComputeHistogram(self, ImageHistogram h) -> unsigned long"""
54f9ee45 2522 return _core_.Image_ComputeHistogram(*args, **kwargs)
e811c8ce
RD
2523
2524 def AddHandler(*args, **kwargs):
66c033b4 2525 """AddHandler(ImageHandler handler)"""
54f9ee45 2526 return _core_.Image_AddHandler(*args, **kwargs)
e811c8ce
RD
2527
2528 AddHandler = staticmethod(AddHandler)
2529 def InsertHandler(*args, **kwargs):
66c033b4 2530 """InsertHandler(ImageHandler handler)"""
54f9ee45 2531 return _core_.Image_InsertHandler(*args, **kwargs)
e811c8ce
RD
2532
2533 InsertHandler = staticmethod(InsertHandler)
2534 def RemoveHandler(*args, **kwargs):
66c033b4 2535 """RemoveHandler(String name) -> bool"""
54f9ee45 2536 return _core_.Image_RemoveHandler(*args, **kwargs)
e811c8ce
RD
2537
2538 RemoveHandler = staticmethod(RemoveHandler)
2539 def GetImageExtWildcard(*args, **kwargs):
66c033b4 2540 """GetImageExtWildcard() -> String"""
54f9ee45 2541 return _core_.Image_GetImageExtWildcard(*args, **kwargs)
e811c8ce
RD
2542
2543 GetImageExtWildcard = staticmethod(GetImageExtWildcard)
2544 def ConvertToBitmap(*args, **kwargs):
1fbf26be 2545 """ConvertToBitmap(self, int depth=-1) -> Bitmap"""
54f9ee45 2546 return _core_.Image_ConvertToBitmap(*args, **kwargs)
e811c8ce
RD
2547
2548 def ConvertToMonoBitmap(*args, **kwargs):
a95a7133 2549 """ConvertToMonoBitmap(self, unsigned char red, unsigned char green, unsigned char blue) -> Bitmap"""
54f9ee45 2550 return _core_.Image_ConvertToMonoBitmap(*args, **kwargs)
e811c8ce
RD
2551
2552 def __nonzero__(self): return self.Ok()
d14a1e28
RD
2553
2554class ImagePtr(Image):
2555 def __init__(self, this):
2556 self.this = this
2557 if not hasattr(self,"thisown"): self.thisown = 0
2558 self.__class__ = Image
54f9ee45 2559_core_.Image_swigregister(ImagePtr)
d14a1e28
RD
2560
2561def ImageFromMime(*args, **kwargs):
196addbf 2562 """ImageFromMime(String name, String mimetype, int index=-1) -> Image"""
54f9ee45 2563 val = _core_.new_ImageFromMime(*args, **kwargs)
d14a1e28
RD
2564 val.thisown = 1
2565 return val
2566
2567def ImageFromStream(*args, **kwargs):
196addbf 2568 """ImageFromStream(InputStream stream, long type=BITMAP_TYPE_ANY, int index=-1) -> Image"""
54f9ee45 2569 val = _core_.new_ImageFromStream(*args, **kwargs)
d14a1e28
RD
2570 val.thisown = 1
2571 return val
2572
2573def ImageFromStreamMime(*args, **kwargs):
196addbf 2574 """ImageFromStreamMime(InputStream stream, String mimetype, int index=-1) -> Image"""
54f9ee45 2575 val = _core_.new_ImageFromStreamMime(*args, **kwargs)
d14a1e28
RD
2576 val.thisown = 1
2577 return val
2578
66c033b4 2579def EmptyImage(*args, **kwargs):
61d07ac7
RD
2580 """
2581 EmptyImage(int width=0, int height=0, bool clear=True) -> Image
2582
2583 Construct an empty image of a given size, optionally setting all
2584 pixels to black.
2585 """
66c033b4 2586 val = _core_.new_EmptyImage(*args, **kwargs)
d14a1e28
RD
2587 val.thisown = 1
2588 return val
2589
2590def ImageFromBitmap(*args, **kwargs):
61d07ac7
RD
2591 """
2592 ImageFromBitmap(Bitmap bitmap) -> Image
2593
2594 Construct an Image from a `wx.Bitmap`.
2595 """
54f9ee45 2596 val = _core_.new_ImageFromBitmap(*args, **kwargs)
d14a1e28
RD
2597 val.thisown = 1
2598 return val
2599
2600def ImageFromData(*args, **kwargs):
61d07ac7
RD
2601 """
2602 ImageFromData(int width, int height, buffer data) -> Image
2603
2604 Construct an Image from a buffer of RGB bytes. Accepts either a
2605 string or a buffer object holding the data and the length of the data
2606 must be width*height*3.
2607 """
54f9ee45 2608 val = _core_.new_ImageFromData(*args, **kwargs)
d14a1e28
RD
2609 val.thisown = 1
2610 return val
2611
1823fbb4 2612def ImageFromDataWithAlpha(*args, **kwargs):
61d07ac7
RD
2613 """
2614 ImageFromDataWithAlpha(int width, int height, buffer data, buffer alpha) -> Image
2615
2616 Construct an Image from a buffer of RGB bytes with an Alpha channel.
2617 Accepts either a string or a buffer object holding the data and the
2618 length of the data must be width*height*3.
2619 """
1823fbb4
RD
2620 val = _core_.new_ImageFromDataWithAlpha(*args, **kwargs)
2621 val.thisown = 1
2622 return val
2623
e811c8ce 2624def Image_CanRead(*args, **kwargs):
196addbf 2625 """Image_CanRead(String name) -> bool"""
54f9ee45 2626 return _core_.Image_CanRead(*args, **kwargs)
d14a1e28 2627
e811c8ce 2628def Image_GetImageCount(*args, **kwargs):
196addbf 2629 """Image_GetImageCount(String name, long type=BITMAP_TYPE_ANY) -> int"""
54f9ee45 2630 return _core_.Image_GetImageCount(*args, **kwargs)
d14a1e28 2631
e811c8ce 2632def Image_CanReadStream(*args, **kwargs):
196addbf 2633 """Image_CanReadStream(InputStream stream) -> bool"""
54f9ee45 2634 return _core_.Image_CanReadStream(*args, **kwargs)
d14a1e28 2635
e811c8ce
RD
2636def Image_AddHandler(*args, **kwargs):
2637 """Image_AddHandler(ImageHandler handler)"""
54f9ee45 2638 return _core_.Image_AddHandler(*args, **kwargs)
d14a1e28 2639
e811c8ce
RD
2640def Image_InsertHandler(*args, **kwargs):
2641 """Image_InsertHandler(ImageHandler handler)"""
54f9ee45 2642 return _core_.Image_InsertHandler(*args, **kwargs)
d14a1e28 2643
e811c8ce 2644def Image_RemoveHandler(*args, **kwargs):
196addbf 2645 """Image_RemoveHandler(String name) -> bool"""
54f9ee45 2646 return _core_.Image_RemoveHandler(*args, **kwargs)
d14a1e28 2647
e811c8ce 2648def Image_GetImageExtWildcard(*args, **kwargs):
196addbf 2649 """Image_GetImageExtWildcard() -> String"""
54f9ee45 2650 return _core_.Image_GetImageExtWildcard(*args, **kwargs)
d14a1e28 2651
5e4ca4a8
RD
2652def InitAllImageHandlers():
2653 """
2654 The former functionality of InitAllImageHanders is now done internal to
2655 the _core_ extension module and so this function has become a simple NOP.
2656 """
2657 pass
d14a1e28 2658
54f9ee45
RD
2659IMAGE_RESOLUTION_INCHES = _core_.IMAGE_RESOLUTION_INCHES
2660IMAGE_RESOLUTION_CM = _core_.IMAGE_RESOLUTION_CM
b9d6a5f3
RD
2661PNG_TYPE_COLOUR = _core_.PNG_TYPE_COLOUR
2662PNG_TYPE_GREY = _core_.PNG_TYPE_GREY
2663PNG_TYPE_GREY_RED = _core_.PNG_TYPE_GREY_RED
54f9ee45
RD
2664BMP_24BPP = _core_.BMP_24BPP
2665BMP_8BPP = _core_.BMP_8BPP
2666BMP_8BPP_GREY = _core_.BMP_8BPP_GREY
2667BMP_8BPP_GRAY = _core_.BMP_8BPP_GRAY
2668BMP_8BPP_RED = _core_.BMP_8BPP_RED
2669BMP_8BPP_PALETTE = _core_.BMP_8BPP_PALETTE
2670BMP_4BPP = _core_.BMP_4BPP
2671BMP_1BPP = _core_.BMP_1BPP
2672BMP_1BPP_BW = _core_.BMP_1BPP_BW
d14a1e28 2673class BMPHandler(ImageHandler):
27fb7603 2674 """A `wx.ImageHandler` for \*.bmp bitmap files."""
e811c8ce
RD
2675 def __repr__(self):
2676 return "<%s.%s; proxy of C++ wxBMPHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 2677 def __init__(self, *args, **kwargs):
27fb7603
RD
2678 """
2679 __init__(self) -> BMPHandler
2680
2681 A `wx.ImageHandler` for \*.bmp bitmap files.
2682 """
54f9ee45 2683 newobj = _core_.new_BMPHandler(*args, **kwargs)
d14a1e28
RD
2684 self.this = newobj.this
2685 self.thisown = 1
2686 del newobj.thisown
d14a1e28
RD
2687
2688class BMPHandlerPtr(BMPHandler):
2689 def __init__(self, this):
2690 self.this = this
2691 if not hasattr(self,"thisown"): self.thisown = 0
2692 self.__class__ = BMPHandler
54f9ee45 2693_core_.BMPHandler_swigregister(BMPHandlerPtr)
d14a1e28 2694NullImage = cvar.NullImage
0c243d93 2695IMAGE_OPTION_FILENAME = cvar.IMAGE_OPTION_FILENAME
d14a1e28
RD
2696IMAGE_OPTION_BMP_FORMAT = cvar.IMAGE_OPTION_BMP_FORMAT
2697IMAGE_OPTION_CUR_HOTSPOT_X = cvar.IMAGE_OPTION_CUR_HOTSPOT_X
2698IMAGE_OPTION_CUR_HOTSPOT_Y = cvar.IMAGE_OPTION_CUR_HOTSPOT_Y
2699IMAGE_OPTION_RESOLUTION = cvar.IMAGE_OPTION_RESOLUTION
0c243d93
RD
2700IMAGE_OPTION_RESOLUTIONX = cvar.IMAGE_OPTION_RESOLUTIONX
2701IMAGE_OPTION_RESOLUTIONY = cvar.IMAGE_OPTION_RESOLUTIONY
d14a1e28 2702IMAGE_OPTION_RESOLUTIONUNIT = cvar.IMAGE_OPTION_RESOLUTIONUNIT
24d7cbea 2703IMAGE_OPTION_QUALITY = cvar.IMAGE_OPTION_QUALITY
0c243d93
RD
2704IMAGE_OPTION_BITSPERSAMPLE = cvar.IMAGE_OPTION_BITSPERSAMPLE
2705IMAGE_OPTION_SAMPLESPERPIXEL = cvar.IMAGE_OPTION_SAMPLESPERPIXEL
2706IMAGE_OPTION_COMPRESSION = cvar.IMAGE_OPTION_COMPRESSION
2707IMAGE_OPTION_IMAGEDESCRIPTOR = cvar.IMAGE_OPTION_IMAGEDESCRIPTOR
b9d6a5f3
RD
2708IMAGE_OPTION_PNG_FORMAT = cvar.IMAGE_OPTION_PNG_FORMAT
2709IMAGE_OPTION_PNG_BITDEPTH = cvar.IMAGE_OPTION_PNG_BITDEPTH
d14a1e28
RD
2710
2711class ICOHandler(BMPHandler):
27fb7603 2712 """A `wx.ImageHandler` for \*.ico icon files."""
e811c8ce
RD
2713 def __repr__(self):
2714 return "<%s.%s; proxy of C++ wxICOHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 2715 def __init__(self, *args, **kwargs):
27fb7603
RD
2716 """
2717 __init__(self) -> ICOHandler
2718
2719 A `wx.ImageHandler` for \*.ico icon files.
2720 """
54f9ee45 2721 newobj = _core_.new_ICOHandler(*args, **kwargs)
d14a1e28
RD
2722 self.this = newobj.this
2723 self.thisown = 1
2724 del newobj.thisown
d14a1e28
RD
2725
2726class ICOHandlerPtr(ICOHandler):
2727 def __init__(self, this):
2728 self.this = this
2729 if not hasattr(self,"thisown"): self.thisown = 0
2730 self.__class__ = ICOHandler
54f9ee45 2731_core_.ICOHandler_swigregister(ICOHandlerPtr)
d14a1e28
RD
2732
2733class CURHandler(ICOHandler):
27fb7603 2734 """A `wx.ImageHandler` for \*.cur cursor files."""
e811c8ce
RD
2735 def __repr__(self):
2736 return "<%s.%s; proxy of C++ wxCURHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 2737 def __init__(self, *args, **kwargs):
27fb7603
RD
2738 """
2739 __init__(self) -> CURHandler
2740
2741 A `wx.ImageHandler` for \*.cur cursor files.
2742 """
54f9ee45 2743 newobj = _core_.new_CURHandler(*args, **kwargs)
d14a1e28
RD
2744 self.this = newobj.this
2745 self.thisown = 1
2746 del newobj.thisown
d14a1e28
RD
2747
2748class CURHandlerPtr(CURHandler):
2749 def __init__(self, this):
2750 self.this = this
2751 if not hasattr(self,"thisown"): self.thisown = 0
2752 self.__class__ = CURHandler
54f9ee45 2753_core_.CURHandler_swigregister(CURHandlerPtr)
d14a1e28
RD
2754
2755class ANIHandler(CURHandler):
27fb7603 2756 """A `wx.ImageHandler` for \*.ani animated cursor files."""
e811c8ce
RD
2757 def __repr__(self):
2758 return "<%s.%s; proxy of C++ wxANIHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 2759 def __init__(self, *args, **kwargs):
27fb7603
RD
2760 """
2761 __init__(self) -> ANIHandler
2762
2763 A `wx.ImageHandler` for \*.ani animated cursor files.
2764 """
54f9ee45 2765 newobj = _core_.new_ANIHandler(*args, **kwargs)
d14a1e28
RD
2766 self.this = newobj.this
2767 self.thisown = 1
2768 del newobj.thisown
d14a1e28
RD
2769
2770class ANIHandlerPtr(ANIHandler):
2771 def __init__(self, this):
2772 self.this = this
2773 if not hasattr(self,"thisown"): self.thisown = 0
2774 self.__class__ = ANIHandler
54f9ee45 2775_core_.ANIHandler_swigregister(ANIHandlerPtr)
d14a1e28
RD
2776
2777class PNGHandler(ImageHandler):
27fb7603 2778 """A `wx.ImageHandler` for PNG image files."""
e811c8ce
RD
2779 def __repr__(self):
2780 return "<%s.%s; proxy of C++ wxPNGHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 2781 def __init__(self, *args, **kwargs):
27fb7603
RD
2782 """
2783 __init__(self) -> PNGHandler
2784
2785 A `wx.ImageHandler` for PNG image files.
2786 """
54f9ee45 2787 newobj = _core_.new_PNGHandler(*args, **kwargs)
d14a1e28
RD
2788 self.this = newobj.this
2789 self.thisown = 1
2790 del newobj.thisown
d14a1e28
RD
2791
2792class PNGHandlerPtr(PNGHandler):
2793 def __init__(self, this):
2794 self.this = this
2795 if not hasattr(self,"thisown"): self.thisown = 0
2796 self.__class__ = PNGHandler
54f9ee45 2797_core_.PNGHandler_swigregister(PNGHandlerPtr)
d14a1e28
RD
2798
2799class GIFHandler(ImageHandler):
27fb7603 2800 """A `wx.ImageHandler` for GIF image files."""
e811c8ce
RD
2801 def __repr__(self):
2802 return "<%s.%s; proxy of C++ wxGIFHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 2803 def __init__(self, *args, **kwargs):
27fb7603
RD
2804 """
2805 __init__(self) -> GIFHandler
2806
2807 A `wx.ImageHandler` for GIF image files.
2808 """
54f9ee45 2809 newobj = _core_.new_GIFHandler(*args, **kwargs)
d14a1e28
RD
2810 self.this = newobj.this
2811 self.thisown = 1
2812 del newobj.thisown
d14a1e28
RD
2813
2814class GIFHandlerPtr(GIFHandler):
2815 def __init__(self, this):
2816 self.this = this
2817 if not hasattr(self,"thisown"): self.thisown = 0
2818 self.__class__ = GIFHandler
54f9ee45 2819_core_.GIFHandler_swigregister(GIFHandlerPtr)
d14a1e28
RD
2820
2821class PCXHandler(ImageHandler):
27fb7603 2822 """A `wx.ImageHandler` for PCX imager files."""
e811c8ce
RD
2823 def __repr__(self):
2824 return "<%s.%s; proxy of C++ wxPCXHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 2825 def __init__(self, *args, **kwargs):
27fb7603
RD
2826 """
2827 __init__(self) -> PCXHandler
2828
2829 A `wx.ImageHandler` for PCX imager files.
2830 """
54f9ee45 2831 newobj = _core_.new_PCXHandler(*args, **kwargs)
d14a1e28
RD
2832 self.this = newobj.this
2833 self.thisown = 1
2834 del newobj.thisown
d14a1e28
RD
2835
2836class PCXHandlerPtr(PCXHandler):
2837 def __init__(self, this):
2838 self.this = this
2839 if not hasattr(self,"thisown"): self.thisown = 0
2840 self.__class__ = PCXHandler
54f9ee45 2841_core_.PCXHandler_swigregister(PCXHandlerPtr)
d14a1e28
RD
2842
2843class JPEGHandler(ImageHandler):
27fb7603 2844 """A `wx.ImageHandler` for JPEG/JPG image files."""
e811c8ce
RD
2845 def __repr__(self):
2846 return "<%s.%s; proxy of C++ wxJPEGHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 2847 def __init__(self, *args, **kwargs):
27fb7603
RD
2848 """
2849 __init__(self) -> JPEGHandler
2850
2851 A `wx.ImageHandler` for JPEG/JPG image files.
2852 """
54f9ee45 2853 newobj = _core_.new_JPEGHandler(*args, **kwargs)
d14a1e28
RD
2854 self.this = newobj.this
2855 self.thisown = 1
2856 del newobj.thisown
d14a1e28
RD
2857
2858class JPEGHandlerPtr(JPEGHandler):
2859 def __init__(self, this):
2860 self.this = this
2861 if not hasattr(self,"thisown"): self.thisown = 0
2862 self.__class__ = JPEGHandler
54f9ee45 2863_core_.JPEGHandler_swigregister(JPEGHandlerPtr)
d14a1e28
RD
2864
2865class PNMHandler(ImageHandler):
27fb7603 2866 """A `wx.ImageHandler` for PNM image files."""
e811c8ce
RD
2867 def __repr__(self):
2868 return "<%s.%s; proxy of C++ wxPNMHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 2869 def __init__(self, *args, **kwargs):
27fb7603
RD
2870 """
2871 __init__(self) -> PNMHandler
2872
2873 A `wx.ImageHandler` for PNM image files.
2874 """
54f9ee45 2875 newobj = _core_.new_PNMHandler(*args, **kwargs)
d14a1e28
RD
2876 self.this = newobj.this
2877 self.thisown = 1
2878 del newobj.thisown
d14a1e28
RD
2879
2880class PNMHandlerPtr(PNMHandler):
2881 def __init__(self, this):
2882 self.this = this
2883 if not hasattr(self,"thisown"): self.thisown = 0
2884 self.__class__ = PNMHandler
54f9ee45 2885_core_.PNMHandler_swigregister(PNMHandlerPtr)
d14a1e28
RD
2886
2887class XPMHandler(ImageHandler):
27fb7603 2888 """A `wx.ImageHandler` for XPM image."""
e811c8ce
RD
2889 def __repr__(self):
2890 return "<%s.%s; proxy of C++ wxXPMHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 2891 def __init__(self, *args, **kwargs):
27fb7603
RD
2892 """
2893 __init__(self) -> XPMHandler
2894
2895 A `wx.ImageHandler` for XPM image.
2896 """
54f9ee45 2897 newobj = _core_.new_XPMHandler(*args, **kwargs)
d14a1e28
RD
2898 self.this = newobj.this
2899 self.thisown = 1
2900 del newobj.thisown
d14a1e28
RD
2901
2902class XPMHandlerPtr(XPMHandler):
2903 def __init__(self, this):
2904 self.this = this
2905 if not hasattr(self,"thisown"): self.thisown = 0
2906 self.__class__ = XPMHandler
54f9ee45 2907_core_.XPMHandler_swigregister(XPMHandlerPtr)
d14a1e28
RD
2908
2909class TIFFHandler(ImageHandler):
27fb7603 2910 """A `wx.ImageHandler` for TIFF image files."""
e811c8ce
RD
2911 def __repr__(self):
2912 return "<%s.%s; proxy of C++ wxTIFFHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 2913 def __init__(self, *args, **kwargs):
27fb7603
RD
2914 """
2915 __init__(self) -> TIFFHandler
2916
2917 A `wx.ImageHandler` for TIFF image files.
2918 """
54f9ee45 2919 newobj = _core_.new_TIFFHandler(*args, **kwargs)
d14a1e28
RD
2920 self.this = newobj.this
2921 self.thisown = 1
2922 del newobj.thisown
d14a1e28
RD
2923
2924class TIFFHandlerPtr(TIFFHandler):
2925 def __init__(self, this):
2926 self.this = this
2927 if not hasattr(self,"thisown"): self.thisown = 0
2928 self.__class__ = TIFFHandler
54f9ee45 2929_core_.TIFFHandler_swigregister(TIFFHandlerPtr)
d14a1e28 2930
c0de73ae
RD
2931QUANTIZE_INCLUDE_WINDOWS_COLOURS = _core_.QUANTIZE_INCLUDE_WINDOWS_COLOURS
2932QUANTIZE_FILL_DESTINATION_IMAGE = _core_.QUANTIZE_FILL_DESTINATION_IMAGE
2933class Quantize(object):
2934 """Performs quantization, or colour reduction, on a wxImage."""
2935 def __init__(self): raise RuntimeError, "No constructor defined"
2936 def __repr__(self):
2937 return "<%s.%s; proxy of C++ wxQuantize instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
2938 def Quantize(*args, **kwargs):
2939 """
2940 Quantize(Image src, Image dest, int desiredNoColours=236, int flags=wxQUANTIZE_INCLUDE_WINDOWS_COLOURS|wxQUANTIZE_FILL_DESTINATION_IMAGE) -> bool
2941
2942 Reduce the colours in the source image and put the result into the
2943 destination image, setting the palette in the destination if
2944 needed. Both images may be the same, to overwrite the source image.
2945 """
2946 return _core_.Quantize_Quantize(*args, **kwargs)
2947
2948 Quantize = staticmethod(Quantize)
2949
2950class QuantizePtr(Quantize):
2951 def __init__(self, this):
2952 self.this = this
2953 if not hasattr(self,"thisown"): self.thisown = 0
2954 self.__class__ = Quantize
2955_core_.Quantize_swigregister(QuantizePtr)
2956
2957def Quantize_Quantize(*args, **kwargs):
2958 """
2959 Quantize_Quantize(Image src, Image dest, int desiredNoColours=236, int flags=wxQUANTIZE_INCLUDE_WINDOWS_COLOURS|wxQUANTIZE_FILL_DESTINATION_IMAGE) -> bool
2960
2961 Reduce the colours in the source image and put the result into the
2962 destination image, setting the palette in the destination if
2963 needed. Both images may be the same, to overwrite the source image.
2964 """
2965 return _core_.Quantize_Quantize(*args, **kwargs)
2966
d14a1e28
RD
2967#---------------------------------------------------------------------------
2968
2969class EvtHandler(Object):
093d3ff1 2970 """Proxy of C++ EvtHandler class"""
e811c8ce
RD
2971 def __repr__(self):
2972 return "<%s.%s; proxy of C++ wxEvtHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 2973 def __init__(self, *args, **kwargs):
a95a7133 2974 """__init__(self) -> EvtHandler"""
54f9ee45 2975 newobj = _core_.new_EvtHandler(*args, **kwargs)
d14a1e28
RD
2976 self.this = newobj.this
2977 self.thisown = 1
2978 del newobj.thisown
e811c8ce 2979 def GetNextHandler(*args, **kwargs):
a95a7133 2980 """GetNextHandler(self) -> EvtHandler"""
54f9ee45 2981 return _core_.EvtHandler_GetNextHandler(*args, **kwargs)
e811c8ce
RD
2982
2983 def GetPreviousHandler(*args, **kwargs):
a95a7133 2984 """GetPreviousHandler(self) -> EvtHandler"""
54f9ee45 2985 return _core_.EvtHandler_GetPreviousHandler(*args, **kwargs)
e811c8ce
RD
2986
2987 def SetNextHandler(*args, **kwargs):
a95a7133 2988 """SetNextHandler(self, EvtHandler handler)"""
54f9ee45 2989 return _core_.EvtHandler_SetNextHandler(*args, **kwargs)
e811c8ce
RD
2990
2991 def SetPreviousHandler(*args, **kwargs):
a95a7133 2992 """SetPreviousHandler(self, EvtHandler handler)"""
54f9ee45 2993 return _core_.EvtHandler_SetPreviousHandler(*args, **kwargs)
e811c8ce
RD
2994
2995 def GetEvtHandlerEnabled(*args, **kwargs):
a95a7133 2996 """GetEvtHandlerEnabled(self) -> bool"""
54f9ee45 2997 return _core_.EvtHandler_GetEvtHandlerEnabled(*args, **kwargs)
e811c8ce
RD
2998
2999 def SetEvtHandlerEnabled(*args, **kwargs):
a95a7133 3000 """SetEvtHandlerEnabled(self, bool enabled)"""
54f9ee45 3001 return _core_.EvtHandler_SetEvtHandlerEnabled(*args, **kwargs)
e811c8ce
RD
3002
3003 def ProcessEvent(*args, **kwargs):
a95a7133 3004 """ProcessEvent(self, Event event) -> bool"""
54f9ee45 3005 return _core_.EvtHandler_ProcessEvent(*args, **kwargs)
e811c8ce
RD
3006
3007 def AddPendingEvent(*args, **kwargs):
a95a7133 3008 """AddPendingEvent(self, Event event)"""
54f9ee45 3009 return _core_.EvtHandler_AddPendingEvent(*args, **kwargs)
e811c8ce
RD
3010
3011 def ProcessPendingEvents(*args, **kwargs):
a95a7133 3012 """ProcessPendingEvents(self)"""
54f9ee45 3013 return _core_.EvtHandler_ProcessPendingEvents(*args, **kwargs)
e811c8ce
RD
3014
3015 def Connect(*args, **kwargs):
a95a7133 3016 """Connect(self, int id, int lastId, int eventType, PyObject func)"""
54f9ee45 3017 return _core_.EvtHandler_Connect(*args, **kwargs)
e811c8ce
RD
3018
3019 def Disconnect(*args, **kwargs):
a95a7133 3020 """Disconnect(self, int id, int lastId=-1, wxEventType eventType=wxEVT_NULL) -> bool"""
54f9ee45 3021 return _core_.EvtHandler_Disconnect(*args, **kwargs)
e811c8ce
RD
3022
3023 def _setOORInfo(*args, **kwargs):
689b42ee 3024 """_setOORInfo(self, PyObject _self, bool incref=True)"""
54f9ee45 3025 return _core_.EvtHandler__setOORInfo(*args, **kwargs)
e811c8ce 3026
d14a1e28
RD
3027 def Bind(self, event, handler, source=None, id=wx.ID_ANY, id2=wx.ID_ANY):
3028 """
3029 Bind an event to an event handler.
3030
db3e571a
RD
3031 :param event: One of the EVT_* objects that specifies the
3032 type of event to bind,
d14a1e28 3033
db3e571a
RD
3034 :param handler: A callable object to be invoked when the
3035 event is delivered to self. Pass None to
3036 disconnect an event handler.
d14a1e28 3037
db3e571a
RD
3038 :param source: Sometimes the event originates from a
3039 different window than self, but you still
3040 want to catch it in self. (For example, a
3041 button event delivered to a frame.) By
3042 passing the source of the event, the event
3043 handling system is able to differentiate
3044 between the same event type from different
3045 controls.
d14a1e28 3046
db3e571a
RD
3047 :param id: Used to spcify the event source by ID instead
3048 of instance.
3049
3050 :param id2: Used when it is desirable to bind a handler
3051 to a range of IDs, such as with EVT_MENU_RANGE.
d14a1e28
RD
3052 """
3053 if source is not None:
3054 id = source.GetId()
3055 event.Bind(self, id, id2, handler)
3056
66c033b4
RD
3057 def Unbind(self, event, source=None, id=wx.ID_ANY, id2=wx.ID_ANY):
3058 """
3059 Disconencts the event handler binding for event from self.
3060 Returns True if successful.
3061 """
3062 if source is not None:
3063 id = source.GetId()
3064 return event.Unbind(self, id, id2)
d14a1e28 3065
d14a1e28
RD
3066
3067class EvtHandlerPtr(EvtHandler):
3068 def __init__(self, this):
3069 self.this = this
3070 if not hasattr(self,"thisown"): self.thisown = 0
3071 self.__class__ = EvtHandler
54f9ee45 3072_core_.EvtHandler_swigregister(EvtHandlerPtr)
d14a1e28
RD
3073
3074#---------------------------------------------------------------------------
3075
3076class PyEventBinder(object):
3077 """
3078 Instances of this class are used to bind specific events to event
3079 handlers.
3080 """
3081 def __init__(self, evtType, expectedIDs=0):
3082 if expectedIDs not in [0, 1, 2]:
3083 raise ValueError, "Invalid number of expectedIDs"
3084 self.expectedIDs = expectedIDs
3085
3086 if type(evtType) == list or type(evtType) == tuple:
3087 self.evtType = evtType
3088 else:
3089 self.evtType = [evtType]
3090
3091
3092 def Bind(self, target, id1, id2, function):
3093 """Bind this set of event types to target."""
3094 for et in self.evtType:
3095 target.Connect(id1, id2, et, function)
3096
66c033b4
RD
3097
3098 def Unbind(self, target, id1, id2):
3099 """Remove an event binding."""
3100 success = 0
3101 for et in self.evtType:
3102 success += target.Disconnect(id1, id2, et)
3103 return success != 0
3104
d14a1e28
RD
3105
3106 def __call__(self, *args):
3107 """
3108 For backwards compatibility with the old EVT_* functions.
3109 Should be called with either (window, func), (window, ID,
3110 func) or (window, ID1, ID2, func) parameters depending on the
3111 type of the event.
3112 """
3113 assert len(args) == 2 + self.expectedIDs
3114 id1 = wx.ID_ANY
3115 id2 = wx.ID_ANY
3116 target = args[0]
3117 if self.expectedIDs == 0:
3118 func = args[1]
3119 elif self.expectedIDs == 1:
3120 id1 = args[1]
3121 func = args[2]
3122 elif self.expectedIDs == 2:
3123 id1 = args[1]
3124 id2 = args[2]
3125 func = args[3]
3126 else:
3127 raise ValueError, "Unexpected number of IDs"
3128
3129 self.Bind(target, id1, id2, func)
3130
3131
3132# These two are square pegs that don't fit the PyEventBinder hole...
3133def EVT_COMMAND(win, id, cmd, func):
3134 win.Connect(id, -1, cmd, func)
3135def EVT_COMMAND_RANGE(win, id1, id2, cmd, func):
3136 win.Connect(id1, id2, cmd, func)
3137
3138
3139#---------------------------------------------------------------------------
3140
3141#---------------------------------------------------------------------------
3142
54f9ee45
RD
3143EVENT_PROPAGATE_NONE = _core_.EVENT_PROPAGATE_NONE
3144EVENT_PROPAGATE_MAX = _core_.EVENT_PROPAGATE_MAX
d14a1e28 3145
e811c8ce
RD
3146def NewEventType(*args, **kwargs):
3147 """NewEventType() -> wxEventType"""
54f9ee45
RD
3148 return _core_.NewEventType(*args, **kwargs)
3149wxEVT_NULL = _core_.wxEVT_NULL
3150wxEVT_FIRST = _core_.wxEVT_FIRST
3151wxEVT_USER_FIRST = _core_.wxEVT_USER_FIRST
3152wxEVT_COMMAND_BUTTON_CLICKED = _core_.wxEVT_COMMAND_BUTTON_CLICKED
3153wxEVT_COMMAND_CHECKBOX_CLICKED = _core_.wxEVT_COMMAND_CHECKBOX_CLICKED
3154wxEVT_COMMAND_CHOICE_SELECTED = _core_.wxEVT_COMMAND_CHOICE_SELECTED
3155wxEVT_COMMAND_LISTBOX_SELECTED = _core_.wxEVT_COMMAND_LISTBOX_SELECTED
3156wxEVT_COMMAND_LISTBOX_DOUBLECLICKED = _core_.wxEVT_COMMAND_LISTBOX_DOUBLECLICKED
3157wxEVT_COMMAND_CHECKLISTBOX_TOGGLED = _core_.wxEVT_COMMAND_CHECKLISTBOX_TOGGLED
3158wxEVT_COMMAND_MENU_SELECTED = _core_.wxEVT_COMMAND_MENU_SELECTED
3159wxEVT_COMMAND_TOOL_CLICKED = _core_.wxEVT_COMMAND_TOOL_CLICKED
3160wxEVT_COMMAND_SLIDER_UPDATED = _core_.wxEVT_COMMAND_SLIDER_UPDATED
3161wxEVT_COMMAND_RADIOBOX_SELECTED = _core_.wxEVT_COMMAND_RADIOBOX_SELECTED
3162wxEVT_COMMAND_RADIOBUTTON_SELECTED = _core_.wxEVT_COMMAND_RADIOBUTTON_SELECTED
3163wxEVT_COMMAND_SCROLLBAR_UPDATED = _core_.wxEVT_COMMAND_SCROLLBAR_UPDATED
3164wxEVT_COMMAND_VLBOX_SELECTED = _core_.wxEVT_COMMAND_VLBOX_SELECTED
3165wxEVT_COMMAND_COMBOBOX_SELECTED = _core_.wxEVT_COMMAND_COMBOBOX_SELECTED
3166wxEVT_COMMAND_TOOL_RCLICKED = _core_.wxEVT_COMMAND_TOOL_RCLICKED
3167wxEVT_COMMAND_TOOL_ENTER = _core_.wxEVT_COMMAND_TOOL_ENTER
3168wxEVT_LEFT_DOWN = _core_.wxEVT_LEFT_DOWN
3169wxEVT_LEFT_UP = _core_.wxEVT_LEFT_UP
3170wxEVT_MIDDLE_DOWN = _core_.wxEVT_MIDDLE_DOWN
3171wxEVT_MIDDLE_UP = _core_.wxEVT_MIDDLE_UP
3172wxEVT_RIGHT_DOWN = _core_.wxEVT_RIGHT_DOWN
3173wxEVT_RIGHT_UP = _core_.wxEVT_RIGHT_UP
3174wxEVT_MOTION = _core_.wxEVT_MOTION
3175wxEVT_ENTER_WINDOW = _core_.wxEVT_ENTER_WINDOW
3176wxEVT_LEAVE_WINDOW = _core_.wxEVT_LEAVE_WINDOW
3177wxEVT_LEFT_DCLICK = _core_.wxEVT_LEFT_DCLICK
3178wxEVT_MIDDLE_DCLICK = _core_.wxEVT_MIDDLE_DCLICK
3179wxEVT_RIGHT_DCLICK = _core_.wxEVT_RIGHT_DCLICK
3180wxEVT_SET_FOCUS = _core_.wxEVT_SET_FOCUS
3181wxEVT_KILL_FOCUS = _core_.wxEVT_KILL_FOCUS
3182wxEVT_CHILD_FOCUS = _core_.wxEVT_CHILD_FOCUS
3183wxEVT_MOUSEWHEEL = _core_.wxEVT_MOUSEWHEEL
3184wxEVT_NC_LEFT_DOWN = _core_.wxEVT_NC_LEFT_DOWN
3185wxEVT_NC_LEFT_UP = _core_.wxEVT_NC_LEFT_UP
3186wxEVT_NC_MIDDLE_DOWN = _core_.wxEVT_NC_MIDDLE_DOWN
3187wxEVT_NC_MIDDLE_UP = _core_.wxEVT_NC_MIDDLE_UP
3188wxEVT_NC_RIGHT_DOWN = _core_.wxEVT_NC_RIGHT_DOWN
3189wxEVT_NC_RIGHT_UP = _core_.wxEVT_NC_RIGHT_UP
3190wxEVT_NC_MOTION = _core_.wxEVT_NC_MOTION
3191wxEVT_NC_ENTER_WINDOW = _core_.wxEVT_NC_ENTER_WINDOW
3192wxEVT_NC_LEAVE_WINDOW = _core_.wxEVT_NC_LEAVE_WINDOW
3193wxEVT_NC_LEFT_DCLICK = _core_.wxEVT_NC_LEFT_DCLICK
3194wxEVT_NC_MIDDLE_DCLICK = _core_.wxEVT_NC_MIDDLE_DCLICK
3195wxEVT_NC_RIGHT_DCLICK = _core_.wxEVT_NC_RIGHT_DCLICK
3196wxEVT_CHAR = _core_.wxEVT_CHAR
3197wxEVT_CHAR_HOOK = _core_.wxEVT_CHAR_HOOK
3198wxEVT_NAVIGATION_KEY = _core_.wxEVT_NAVIGATION_KEY
3199wxEVT_KEY_DOWN = _core_.wxEVT_KEY_DOWN
3200wxEVT_KEY_UP = _core_.wxEVT_KEY_UP
3201wxEVT_HOTKEY = _core_.wxEVT_HOTKEY
3202wxEVT_SET_CURSOR = _core_.wxEVT_SET_CURSOR
3203wxEVT_SCROLL_TOP = _core_.wxEVT_SCROLL_TOP
3204wxEVT_SCROLL_BOTTOM = _core_.wxEVT_SCROLL_BOTTOM
3205wxEVT_SCROLL_LINEUP = _core_.wxEVT_SCROLL_LINEUP
3206wxEVT_SCROLL_LINEDOWN = _core_.wxEVT_SCROLL_LINEDOWN
3207wxEVT_SCROLL_PAGEUP = _core_.wxEVT_SCROLL_PAGEUP
3208wxEVT_SCROLL_PAGEDOWN = _core_.wxEVT_SCROLL_PAGEDOWN
3209wxEVT_SCROLL_THUMBTRACK = _core_.wxEVT_SCROLL_THUMBTRACK
3210wxEVT_SCROLL_THUMBRELEASE = _core_.wxEVT_SCROLL_THUMBRELEASE
3211wxEVT_SCROLL_ENDSCROLL = _core_.wxEVT_SCROLL_ENDSCROLL
3212wxEVT_SCROLLWIN_TOP = _core_.wxEVT_SCROLLWIN_TOP
3213wxEVT_SCROLLWIN_BOTTOM = _core_.wxEVT_SCROLLWIN_BOTTOM
3214wxEVT_SCROLLWIN_LINEUP = _core_.wxEVT_SCROLLWIN_LINEUP
3215wxEVT_SCROLLWIN_LINEDOWN = _core_.wxEVT_SCROLLWIN_LINEDOWN
3216wxEVT_SCROLLWIN_PAGEUP = _core_.wxEVT_SCROLLWIN_PAGEUP
3217wxEVT_SCROLLWIN_PAGEDOWN = _core_.wxEVT_SCROLLWIN_PAGEDOWN
3218wxEVT_SCROLLWIN_THUMBTRACK = _core_.wxEVT_SCROLLWIN_THUMBTRACK
3219wxEVT_SCROLLWIN_THUMBRELEASE = _core_.wxEVT_SCROLLWIN_THUMBRELEASE
3220wxEVT_SIZE = _core_.wxEVT_SIZE
3221wxEVT_MOVE = _core_.wxEVT_MOVE
3222wxEVT_CLOSE_WINDOW = _core_.wxEVT_CLOSE_WINDOW
3223wxEVT_END_SESSION = _core_.wxEVT_END_SESSION
3224wxEVT_QUERY_END_SESSION = _core_.wxEVT_QUERY_END_SESSION
3225wxEVT_ACTIVATE_APP = _core_.wxEVT_ACTIVATE_APP
3226wxEVT_POWER = _core_.wxEVT_POWER
3227wxEVT_ACTIVATE = _core_.wxEVT_ACTIVATE
3228wxEVT_CREATE = _core_.wxEVT_CREATE
3229wxEVT_DESTROY = _core_.wxEVT_DESTROY
3230wxEVT_SHOW = _core_.wxEVT_SHOW
3231wxEVT_ICONIZE = _core_.wxEVT_ICONIZE
3232wxEVT_MAXIMIZE = _core_.wxEVT_MAXIMIZE
3233wxEVT_MOUSE_CAPTURE_CHANGED = _core_.wxEVT_MOUSE_CAPTURE_CHANGED
3234wxEVT_PAINT = _core_.wxEVT_PAINT
3235wxEVT_ERASE_BACKGROUND = _core_.wxEVT_ERASE_BACKGROUND
3236wxEVT_NC_PAINT = _core_.wxEVT_NC_PAINT
3237wxEVT_PAINT_ICON = _core_.wxEVT_PAINT_ICON
3238wxEVT_MENU_OPEN = _core_.wxEVT_MENU_OPEN
3239wxEVT_MENU_CLOSE = _core_.wxEVT_MENU_CLOSE
3240wxEVT_MENU_HIGHLIGHT = _core_.wxEVT_MENU_HIGHLIGHT
3241wxEVT_CONTEXT_MENU = _core_.wxEVT_CONTEXT_MENU
3242wxEVT_SYS_COLOUR_CHANGED = _core_.wxEVT_SYS_COLOUR_CHANGED
3243wxEVT_DISPLAY_CHANGED = _core_.wxEVT_DISPLAY_CHANGED
3244wxEVT_SETTING_CHANGED = _core_.wxEVT_SETTING_CHANGED
3245wxEVT_QUERY_NEW_PALETTE = _core_.wxEVT_QUERY_NEW_PALETTE
3246wxEVT_PALETTE_CHANGED = _core_.wxEVT_PALETTE_CHANGED
3247wxEVT_DROP_FILES = _core_.wxEVT_DROP_FILES
3248wxEVT_DRAW_ITEM = _core_.wxEVT_DRAW_ITEM
3249wxEVT_MEASURE_ITEM = _core_.wxEVT_MEASURE_ITEM
3250wxEVT_COMPARE_ITEM = _core_.wxEVT_COMPARE_ITEM
3251wxEVT_INIT_DIALOG = _core_.wxEVT_INIT_DIALOG
3252wxEVT_IDLE = _core_.wxEVT_IDLE
3253wxEVT_UPDATE_UI = _core_.wxEVT_UPDATE_UI
3254wxEVT_SIZING = _core_.wxEVT_SIZING
3255wxEVT_MOVING = _core_.wxEVT_MOVING
88c6b281 3256wxEVT_HIBERNATE = _core_.wxEVT_HIBERNATE
54f9ee45
RD
3257wxEVT_COMMAND_LEFT_CLICK = _core_.wxEVT_COMMAND_LEFT_CLICK
3258wxEVT_COMMAND_LEFT_DCLICK = _core_.wxEVT_COMMAND_LEFT_DCLICK
3259wxEVT_COMMAND_RIGHT_CLICK = _core_.wxEVT_COMMAND_RIGHT_CLICK
3260wxEVT_COMMAND_RIGHT_DCLICK = _core_.wxEVT_COMMAND_RIGHT_DCLICK
3261wxEVT_COMMAND_SET_FOCUS = _core_.wxEVT_COMMAND_SET_FOCUS
3262wxEVT_COMMAND_KILL_FOCUS = _core_.wxEVT_COMMAND_KILL_FOCUS
3263wxEVT_COMMAND_ENTER = _core_.wxEVT_COMMAND_ENTER
d14a1e28
RD
3264#
3265# Create some event binders
3266EVT_SIZE = wx.PyEventBinder( wxEVT_SIZE )
3267EVT_SIZING = wx.PyEventBinder( wxEVT_SIZING )
3268EVT_MOVE = wx.PyEventBinder( wxEVT_MOVE )
3269EVT_MOVING = wx.PyEventBinder( wxEVT_MOVING )
3270EVT_CLOSE = wx.PyEventBinder( wxEVT_CLOSE_WINDOW )
3271EVT_END_SESSION = wx.PyEventBinder( wxEVT_END_SESSION )
3272EVT_QUERY_END_SESSION = wx.PyEventBinder( wxEVT_QUERY_END_SESSION )
3273EVT_PAINT = wx.PyEventBinder( wxEVT_PAINT )
3274EVT_NC_PAINT = wx.PyEventBinder( wxEVT_NC_PAINT )
3275EVT_ERASE_BACKGROUND = wx.PyEventBinder( wxEVT_ERASE_BACKGROUND )
3276EVT_CHAR = wx.PyEventBinder( wxEVT_CHAR )
3277EVT_KEY_DOWN = wx.PyEventBinder( wxEVT_KEY_DOWN )
3278EVT_KEY_UP = wx.PyEventBinder( wxEVT_KEY_UP )
3279EVT_HOTKEY = wx.PyEventBinder( wxEVT_HOTKEY, 1)
3280EVT_CHAR_HOOK = wx.PyEventBinder( wxEVT_CHAR_HOOK )
3281EVT_MENU_OPEN = wx.PyEventBinder( wxEVT_MENU_OPEN )
3282EVT_MENU_CLOSE = wx.PyEventBinder( wxEVT_MENU_CLOSE )
3283EVT_MENU_HIGHLIGHT = wx.PyEventBinder( wxEVT_MENU_HIGHLIGHT, 1)
3284EVT_MENU_HIGHLIGHT_ALL = wx.PyEventBinder( wxEVT_MENU_HIGHLIGHT )
3285EVT_SET_FOCUS = wx.PyEventBinder( wxEVT_SET_FOCUS )
3286EVT_KILL_FOCUS = wx.PyEventBinder( wxEVT_KILL_FOCUS )
3287EVT_CHILD_FOCUS = wx.PyEventBinder( wxEVT_CHILD_FOCUS )
3288EVT_ACTIVATE = wx.PyEventBinder( wxEVT_ACTIVATE )
3289EVT_ACTIVATE_APP = wx.PyEventBinder( wxEVT_ACTIVATE_APP )
88c6b281 3290EVT_HIBERNATE = wx.PyEventBinder( wxEVT_HIBERNATE )
d14a1e28
RD
3291EVT_END_SESSION = wx.PyEventBinder( wxEVT_END_SESSION )
3292EVT_QUERY_END_SESSION = wx.PyEventBinder( wxEVT_QUERY_END_SESSION )
3293EVT_DROP_FILES = wx.PyEventBinder( wxEVT_DROP_FILES )
3294EVT_INIT_DIALOG = wx.PyEventBinder( wxEVT_INIT_DIALOG )
3295EVT_SYS_COLOUR_CHANGED = wx.PyEventBinder( wxEVT_SYS_COLOUR_CHANGED )
3296EVT_DISPLAY_CHANGED = wx.PyEventBinder( wxEVT_DISPLAY_CHANGED )
3297EVT_SHOW = wx.PyEventBinder( wxEVT_SHOW )
3298EVT_MAXIMIZE = wx.PyEventBinder( wxEVT_MAXIMIZE )
3299EVT_ICONIZE = wx.PyEventBinder( wxEVT_ICONIZE )
3300EVT_NAVIGATION_KEY = wx.PyEventBinder( wxEVT_NAVIGATION_KEY )
3301EVT_PALETTE_CHANGED = wx.PyEventBinder( wxEVT_PALETTE_CHANGED )
3302EVT_QUERY_NEW_PALETTE = wx.PyEventBinder( wxEVT_QUERY_NEW_PALETTE )
3303EVT_WINDOW_CREATE = wx.PyEventBinder( wxEVT_CREATE )
3304EVT_WINDOW_DESTROY = wx.PyEventBinder( wxEVT_DESTROY )
3305EVT_SET_CURSOR = wx.PyEventBinder( wxEVT_SET_CURSOR )
3306EVT_MOUSE_CAPTURE_CHANGED = wx.PyEventBinder( wxEVT_MOUSE_CAPTURE_CHANGED )
3307
3308EVT_LEFT_DOWN = wx.PyEventBinder( wxEVT_LEFT_DOWN )
3309EVT_LEFT_UP = wx.PyEventBinder( wxEVT_LEFT_UP )
3310EVT_MIDDLE_DOWN = wx.PyEventBinder( wxEVT_MIDDLE_DOWN )
3311EVT_MIDDLE_UP = wx.PyEventBinder( wxEVT_MIDDLE_UP )
3312EVT_RIGHT_DOWN = wx.PyEventBinder( wxEVT_RIGHT_DOWN )
3313EVT_RIGHT_UP = wx.PyEventBinder( wxEVT_RIGHT_UP )
3314EVT_MOTION = wx.PyEventBinder( wxEVT_MOTION )
3315EVT_LEFT_DCLICK = wx.PyEventBinder( wxEVT_LEFT_DCLICK )
3316EVT_MIDDLE_DCLICK = wx.PyEventBinder( wxEVT_MIDDLE_DCLICK )
3317EVT_RIGHT_DCLICK = wx.PyEventBinder( wxEVT_RIGHT_DCLICK )
3318EVT_LEAVE_WINDOW = wx.PyEventBinder( wxEVT_LEAVE_WINDOW )
3319EVT_ENTER_WINDOW = wx.PyEventBinder( wxEVT_ENTER_WINDOW )
3320EVT_MOUSEWHEEL = wx.PyEventBinder( wxEVT_MOUSEWHEEL )
3321
3322EVT_MOUSE_EVENTS = wx.PyEventBinder([ wxEVT_LEFT_DOWN,
3323 wxEVT_LEFT_UP,
3324 wxEVT_MIDDLE_DOWN,
3325 wxEVT_MIDDLE_UP,
3326 wxEVT_RIGHT_DOWN,
3327 wxEVT_RIGHT_UP,
3328 wxEVT_MOTION,
3329 wxEVT_LEFT_DCLICK,
3330 wxEVT_MIDDLE_DCLICK,
3331 wxEVT_RIGHT_DCLICK,
3332 wxEVT_ENTER_WINDOW,
3333 wxEVT_LEAVE_WINDOW,
3334 wxEVT_MOUSEWHEEL
3335 ])
3336
3337
3338# Scrolling from wxWindow (sent to wxScrolledWindow)
3339EVT_SCROLLWIN = wx.PyEventBinder([ wxEVT_SCROLLWIN_TOP,
3340 wxEVT_SCROLLWIN_BOTTOM,
3341 wxEVT_SCROLLWIN_LINEUP,
3342 wxEVT_SCROLLWIN_LINEDOWN,
3343 wxEVT_SCROLLWIN_PAGEUP,
3344 wxEVT_SCROLLWIN_PAGEDOWN,
3345 wxEVT_SCROLLWIN_THUMBTRACK,
3346 wxEVT_SCROLLWIN_THUMBRELEASE,
3347 ])
3348
3349EVT_SCROLLWIN_TOP = wx.PyEventBinder( wxEVT_SCROLLWIN_TOP )
3350EVT_SCROLLWIN_BOTTOM = wx.PyEventBinder( wxEVT_SCROLLWIN_BOTTOM )
3351EVT_SCROLLWIN_LINEUP = wx.PyEventBinder( wxEVT_SCROLLWIN_LINEUP )
3352EVT_SCROLLWIN_LINEDOWN = wx.PyEventBinder( wxEVT_SCROLLWIN_LINEDOWN )
3353EVT_SCROLLWIN_PAGEUP = wx.PyEventBinder( wxEVT_SCROLLWIN_PAGEUP )
3354EVT_SCROLLWIN_PAGEDOWN = wx.PyEventBinder( wxEVT_SCROLLWIN_PAGEDOWN )
3355EVT_SCROLLWIN_THUMBTRACK = wx.PyEventBinder( wxEVT_SCROLLWIN_THUMBTRACK )
3356EVT_SCROLLWIN_THUMBRELEASE = wx.PyEventBinder( wxEVT_SCROLLWIN_THUMBRELEASE )
3357
27fb7603 3358# Scrolling from wx.Slider and wx.ScrollBar
d14a1e28
RD
3359EVT_SCROLL = wx.PyEventBinder([ wxEVT_SCROLL_TOP,
3360 wxEVT_SCROLL_BOTTOM,
3361 wxEVT_SCROLL_LINEUP,
3362 wxEVT_SCROLL_LINEDOWN,
3363 wxEVT_SCROLL_PAGEUP,
3364 wxEVT_SCROLL_PAGEDOWN,
3365 wxEVT_SCROLL_THUMBTRACK,
3366 wxEVT_SCROLL_THUMBRELEASE,
3367 wxEVT_SCROLL_ENDSCROLL,
3368 ])
3369
3370EVT_SCROLL_TOP = wx.PyEventBinder( wxEVT_SCROLL_TOP )
3371EVT_SCROLL_BOTTOM = wx.PyEventBinder( wxEVT_SCROLL_BOTTOM )
3372EVT_SCROLL_LINEUP = wx.PyEventBinder( wxEVT_SCROLL_LINEUP )
3373EVT_SCROLL_LINEDOWN = wx.PyEventBinder( wxEVT_SCROLL_LINEDOWN )
3374EVT_SCROLL_PAGEUP = wx.PyEventBinder( wxEVT_SCROLL_PAGEUP )
3375EVT_SCROLL_PAGEDOWN = wx.PyEventBinder( wxEVT_SCROLL_PAGEDOWN )
3376EVT_SCROLL_THUMBTRACK = wx.PyEventBinder( wxEVT_SCROLL_THUMBTRACK )
3377EVT_SCROLL_THUMBRELEASE = wx.PyEventBinder( wxEVT_SCROLL_THUMBRELEASE )
3378EVT_SCROLL_ENDSCROLL = wx.PyEventBinder( wxEVT_SCROLL_ENDSCROLL )
3379
27fb7603 3380# Scrolling from wx.Slider and wx.ScrollBar, with an id
d14a1e28
RD
3381EVT_COMMAND_SCROLL = wx.PyEventBinder([ wxEVT_SCROLL_TOP,
3382 wxEVT_SCROLL_BOTTOM,
3383 wxEVT_SCROLL_LINEUP,
3384 wxEVT_SCROLL_LINEDOWN,
3385 wxEVT_SCROLL_PAGEUP,
3386 wxEVT_SCROLL_PAGEDOWN,
3387 wxEVT_SCROLL_THUMBTRACK,
3388 wxEVT_SCROLL_THUMBRELEASE,
3389 wxEVT_SCROLL_ENDSCROLL,
3390 ], 1)
3391
3392EVT_COMMAND_SCROLL_TOP = wx.PyEventBinder( wxEVT_SCROLL_TOP, 1)
3393EVT_COMMAND_SCROLL_BOTTOM = wx.PyEventBinder( wxEVT_SCROLL_BOTTOM, 1)
3394EVT_COMMAND_SCROLL_LINEUP = wx.PyEventBinder( wxEVT_SCROLL_LINEUP, 1)
3395EVT_COMMAND_SCROLL_LINEDOWN = wx.PyEventBinder( wxEVT_SCROLL_LINEDOWN, 1)
3396EVT_COMMAND_SCROLL_PAGEUP = wx.PyEventBinder( wxEVT_SCROLL_PAGEUP, 1)
3397EVT_COMMAND_SCROLL_PAGEDOWN = wx.PyEventBinder( wxEVT_SCROLL_PAGEDOWN, 1)
3398EVT_COMMAND_SCROLL_THUMBTRACK = wx.PyEventBinder( wxEVT_SCROLL_THUMBTRACK, 1)
3399EVT_COMMAND_SCROLL_THUMBRELEASE = wx.PyEventBinder( wxEVT_SCROLL_THUMBRELEASE, 1)
3400EVT_COMMAND_SCROLL_ENDSCROLL = wx.PyEventBinder( wxEVT_SCROLL_ENDSCROLL, 1)
3401
d14a1e28
RD
3402EVT_BUTTON = wx.PyEventBinder( wxEVT_COMMAND_BUTTON_CLICKED, 1)
3403EVT_CHECKBOX = wx.PyEventBinder( wxEVT_COMMAND_CHECKBOX_CLICKED, 1)
3404EVT_CHOICE = wx.PyEventBinder( wxEVT_COMMAND_CHOICE_SELECTED, 1)
3405EVT_LISTBOX = wx.PyEventBinder( wxEVT_COMMAND_LISTBOX_SELECTED, 1)
3406EVT_LISTBOX_DCLICK = wx.PyEventBinder( wxEVT_COMMAND_LISTBOX_DOUBLECLICKED, 1)
3407EVT_MENU = wx.PyEventBinder( wxEVT_COMMAND_MENU_SELECTED, 1)
3408EVT_MENU_RANGE = wx.PyEventBinder( wxEVT_COMMAND_MENU_SELECTED, 2)
3409EVT_SLIDER = wx.PyEventBinder( wxEVT_COMMAND_SLIDER_UPDATED, 1)
3410EVT_RADIOBOX = wx.PyEventBinder( wxEVT_COMMAND_RADIOBOX_SELECTED, 1)
3411EVT_RADIOBUTTON = wx.PyEventBinder( wxEVT_COMMAND_RADIOBUTTON_SELECTED, 1)
3412
3413EVT_SCROLLBAR = wx.PyEventBinder( wxEVT_COMMAND_SCROLLBAR_UPDATED, 1)
3414EVT_VLBOX = wx.PyEventBinder( wxEVT_COMMAND_VLBOX_SELECTED, 1)
3415EVT_COMBOBOX = wx.PyEventBinder( wxEVT_COMMAND_COMBOBOX_SELECTED, 1)
3416EVT_TOOL = wx.PyEventBinder( wxEVT_COMMAND_TOOL_CLICKED, 1)
3417EVT_TOOL_RANGE = wx.PyEventBinder( wxEVT_COMMAND_TOOL_CLICKED, 2)
3418EVT_TOOL_RCLICKED = wx.PyEventBinder( wxEVT_COMMAND_TOOL_RCLICKED, 1)
3419EVT_TOOL_RCLICKED_RANGE = wx.PyEventBinder( wxEVT_COMMAND_TOOL_RCLICKED, 2)
3420EVT_TOOL_ENTER = wx.PyEventBinder( wxEVT_COMMAND_TOOL_ENTER, 1)
3421EVT_CHECKLISTBOX = wx.PyEventBinder( wxEVT_COMMAND_CHECKLISTBOX_TOGGLED, 1)
3422
3423
3424EVT_COMMAND_LEFT_CLICK = wx.PyEventBinder( wxEVT_COMMAND_LEFT_CLICK, 1)
3425EVT_COMMAND_LEFT_DCLICK = wx.PyEventBinder( wxEVT_COMMAND_LEFT_DCLICK, 1)
3426EVT_COMMAND_RIGHT_CLICK = wx.PyEventBinder( wxEVT_COMMAND_RIGHT_CLICK, 1)
3427EVT_COMMAND_RIGHT_DCLICK = wx.PyEventBinder( wxEVT_COMMAND_RIGHT_DCLICK, 1)
3428EVT_COMMAND_SET_FOCUS = wx.PyEventBinder( wxEVT_COMMAND_SET_FOCUS, 1)
3429EVT_COMMAND_KILL_FOCUS = wx.PyEventBinder( wxEVT_COMMAND_KILL_FOCUS, 1)
3430EVT_COMMAND_ENTER = wx.PyEventBinder( wxEVT_COMMAND_ENTER, 1)
3431
3432EVT_IDLE = wx.PyEventBinder( wxEVT_IDLE )
3433
3434EVT_UPDATE_UI = wx.PyEventBinder( wxEVT_UPDATE_UI, 1)
3435EVT_UPDATE_UI_RANGE = wx.PyEventBinder( wxEVT_UPDATE_UI, 2)
3436
3437EVT_CONTEXT_MENU = wx.PyEventBinder( wxEVT_CONTEXT_MENU )
3438
3439
3440
3441#---------------------------------------------------------------------------
3442
3443class Event(Object):
27fb7603
RD
3444 """
3445 An event is a structure holding information about an event passed to a
3446 callback or member function. wx.Event is an abstract base class for
3447 other event classes
3448 """
e811c8ce
RD
3449 def __init__(self): raise RuntimeError, "No constructor defined"
3450 def __repr__(self):
3451 return "<%s.%s; proxy of C++ wxEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
54f9ee45 3452 def __del__(self, destroy=_core_.delete_Event):
a95a7133 3453 """__del__(self)"""
d14a1e28
RD
3454 try:
3455 if self.thisown: destroy(self)
3456 except: pass
e811c8ce
RD
3457
3458 def SetEventType(*args, **kwargs):
27fb7603
RD
3459 """
3460 SetEventType(self, wxEventType typ)
3461
3462 Sets the specific type of the event.
3463 """
54f9ee45 3464 return _core_.Event_SetEventType(*args, **kwargs)
e811c8ce
RD
3465
3466 def GetEventType(*args, **kwargs):
27fb7603
RD
3467 """
3468 GetEventType(self) -> wxEventType
3469
3470 Returns the identifier of the given event type, such as
3471 ``wxEVT_COMMAND_BUTTON_CLICKED``.
3472 """
54f9ee45 3473 return _core_.Event_GetEventType(*args, **kwargs)
e811c8ce
RD
3474
3475 def GetEventObject(*args, **kwargs):
27fb7603
RD
3476 """
3477 GetEventObject(self) -> Object
3478
3479 Returns the object (usually a window) associated with the event, if
3480 any.
3481 """
54f9ee45 3482 return _core_.Event_GetEventObject(*args, **kwargs)
e811c8ce
RD
3483
3484 def SetEventObject(*args, **kwargs):
27fb7603
RD
3485 """
3486 SetEventObject(self, Object obj)
3487
3488 Sets the originating object, or in other words, obj is normally the
3489 object that is sending the event.
3490 """
54f9ee45 3491 return _core_.Event_SetEventObject(*args, **kwargs)
e811c8ce
RD
3492
3493 def GetTimestamp(*args, **kwargs):
a95a7133 3494 """GetTimestamp(self) -> long"""
54f9ee45 3495 return _core_.Event_GetTimestamp(*args, **kwargs)
e811c8ce
RD
3496
3497 def SetTimestamp(*args, **kwargs):
a95a7133 3498 """SetTimestamp(self, long ts=0)"""
54f9ee45 3499 return _core_.Event_SetTimestamp(*args, **kwargs)
e811c8ce
RD
3500
3501 def GetId(*args, **kwargs):
27fb7603
RD
3502 """
3503 GetId(self) -> int
3504
3505 Returns the identifier associated with this event, such as a button
3506 command id.
3507 """
54f9ee45 3508 return _core_.Event_GetId(*args, **kwargs)
e811c8ce
RD
3509
3510 def SetId(*args, **kwargs):
27fb7603
RD
3511 """
3512 SetId(self, int Id)
3513
3514 Set's the ID for the event. This is usually the ID of the window that
3515 is sending the event, but it can also be a command id from a menu
3516 item, etc.
3517 """
54f9ee45 3518 return _core_.Event_SetId(*args, **kwargs)
e811c8ce
RD
3519
3520 def IsCommandEvent(*args, **kwargs):
27fb7603
RD
3521 """
3522 IsCommandEvent(self) -> bool
3523
3524 Returns true if the event is or is derived from `wx.CommandEvent` else
3525 it returns false. Note: Exists only for optimization purposes.
3526 """
54f9ee45 3527 return _core_.Event_IsCommandEvent(*args, **kwargs)
e811c8ce
RD
3528
3529 def Skip(*args, **kwargs):
51b83b37
RD
3530 """
3531 Skip(self, bool skip=True)
3532
3533 Called by an event handler, it controls whether additional event
3534 handlers bound to this event will be called after the current event
3535 handler returns. Skip(false) (the default setting) will prevent
3536 additional event handlers from being called and control will be
3537 returned to the sender of the event immediately after the current
3538 handler has finished. Skip(True) will cause the event processing
3539 system to continue searching for a handler function for this event.
3540
3541 """
54f9ee45 3542 return _core_.Event_Skip(*args, **kwargs)
e811c8ce
RD
3543
3544 def GetSkipped(*args, **kwargs):
27fb7603
RD
3545 """
3546 GetSkipped(self) -> bool
3547
3548 Returns true if the event handler should be skipped, false otherwise.
3549 :see: `Skip`
3550 """
54f9ee45 3551 return _core_.Event_GetSkipped(*args, **kwargs)
e811c8ce
RD
3552
3553 def ShouldPropagate(*args, **kwargs):
27fb7603
RD
3554 """
3555 ShouldPropagate(self) -> bool
3556
3557 Test if this event should be propagated to the parent window or not,
3558 i.e. if the propagation level is currently greater than 0.
3559 """
54f9ee45 3560 return _core_.Event_ShouldPropagate(*args, **kwargs)
e811c8ce
RD
3561
3562 def StopPropagation(*args, **kwargs):
27fb7603
RD
3563 """
3564 StopPropagation(self) -> int
3565
3566 Stop the event from propagating to its parent window. Returns the old
3567 propagation level value which may be later passed to
3568 `ResumePropagation` to allow propagating the event again.
3569 """
54f9ee45 3570 return _core_.Event_StopPropagation(*args, **kwargs)
e811c8ce
RD
3571
3572 def ResumePropagation(*args, **kwargs):
27fb7603
RD
3573 """
3574 ResumePropagation(self, int propagationLevel)
3575
3576 Resume the event propagation by restoring the propagation level. (For
3577 example, you can use the value returned by an earlier call to
3578 `StopPropagation`.)
3579
3580 """
54f9ee45 3581 return _core_.Event_ResumePropagation(*args, **kwargs)
e811c8ce
RD
3582
3583 def Clone(*args, **kwargs):
a95a7133 3584 """Clone(self) -> Event"""
54f9ee45 3585 return _core_.Event_Clone(*args, **kwargs)
e811c8ce 3586
d14a1e28
RD
3587
3588class EventPtr(Event):
3589 def __init__(self, this):
3590 self.this = this
3591 if not hasattr(self,"thisown"): self.thisown = 0
3592 self.__class__ = Event
54f9ee45 3593_core_.Event_swigregister(EventPtr)
d14a1e28
RD
3594
3595#---------------------------------------------------------------------------
3596
3597class PropagationDisabler(object):
27fb7603
RD
3598 """
3599 Helper class to temporarily change an event not to propagate. Simply
3600 create an instance of this class and then whe it is destroyed the
3601 propogation of the event will be restored.
3602 """
e811c8ce
RD
3603 def __repr__(self):
3604 return "<%s.%s; proxy of C++ wxPropagationDisabler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 3605 def __init__(self, *args, **kwargs):
27fb7603
RD
3606 """
3607 __init__(self, Event event) -> PropagationDisabler
3608
3609 Helper class to temporarily change an event not to propagate. Simply
3610 create an instance of this class and then whe it is destroyed the
3611 propogation of the event will be restored.
3612 """
54f9ee45 3613 newobj = _core_.new_PropagationDisabler(*args, **kwargs)
d14a1e28
RD
3614 self.this = newobj.this
3615 self.thisown = 1
3616 del newobj.thisown
54f9ee45 3617 def __del__(self, destroy=_core_.delete_PropagationDisabler):
a95a7133 3618 """__del__(self)"""
d14a1e28
RD
3619 try:
3620 if self.thisown: destroy(self)
3621 except: pass
e811c8ce 3622
d14a1e28
RD
3623
3624class PropagationDisablerPtr(PropagationDisabler):
3625 def __init__(self, this):
3626 self.this = this
3627 if not hasattr(self,"thisown"): self.thisown = 0
3628 self.__class__ = PropagationDisabler
54f9ee45 3629_core_.PropagationDisabler_swigregister(PropagationDisablerPtr)
d14a1e28
RD
3630
3631class PropagateOnce(object):
27fb7603
RD
3632 """
3633 A helper class that will temporarily lower propagation level of an
3634 event. Simply create an instance of this class and then whe it is
3635 destroyed the propogation of the event will be restored.
3636 """
e811c8ce
RD
3637 def __repr__(self):
3638 return "<%s.%s; proxy of C++ wxPropagateOnce instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 3639 def __init__(self, *args, **kwargs):
27fb7603
RD
3640 """
3641 __init__(self, Event event) -> PropagateOnce
3642
3643 A helper class that will temporarily lower propagation level of an
3644 event. Simply create an instance of this class and then whe it is
3645 destroyed the propogation of the event will be restored.
3646 """
54f9ee45 3647 newobj = _core_.new_PropagateOnce(*args, **kwargs)
d14a1e28
RD
3648 self.this = newobj.this
3649 self.thisown = 1
3650 del newobj.thisown
54f9ee45 3651 def __del__(self, destroy=_core_.delete_PropagateOnce):
a95a7133 3652 """__del__(self)"""
d14a1e28
RD
3653 try:
3654 if self.thisown: destroy(self)
3655 except: pass
e811c8ce 3656
d14a1e28
RD
3657
3658class PropagateOncePtr(PropagateOnce):
3659 def __init__(self, this):
3660 self.this = this
3661 if not hasattr(self,"thisown"): self.thisown = 0
3662 self.__class__ = PropagateOnce
54f9ee45 3663_core_.PropagateOnce_swigregister(PropagateOncePtr)
d14a1e28
RD
3664
3665#---------------------------------------------------------------------------
3666
3667class CommandEvent(Event):
27fb7603
RD
3668 """
3669 This event class contains information about command events, which
3670 originate from a variety of simple controls, as well as menus and
3671 toolbars.
3672 """
e811c8ce
RD
3673 def __repr__(self):
3674 return "<%s.%s; proxy of C++ wxCommandEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 3675 def __init__(self, *args, **kwargs):
27fb7603
RD
3676 """
3677 __init__(self, wxEventType commandType=wxEVT_NULL, int winid=0) -> CommandEvent
3678
3679 This event class contains information about command events, which
3680 originate from a variety of simple controls, as well as menus and
3681 toolbars.
3682 """
54f9ee45 3683 newobj = _core_.new_CommandEvent(*args, **kwargs)
d14a1e28
RD
3684 self.this = newobj.this
3685 self.thisown = 1
3686 del newobj.thisown
e811c8ce 3687 def GetSelection(*args, **kwargs):
27fb7603
RD
3688 """
3689 GetSelection(self) -> int
3690
3691 Returns item index for a listbox or choice selection event (not valid
3692 for a deselection).
3693 """
54f9ee45 3694 return _core_.CommandEvent_GetSelection(*args, **kwargs)
e811c8ce
RD
3695
3696 def SetString(*args, **kwargs):
a95a7133 3697 """SetString(self, String s)"""
54f9ee45 3698 return _core_.CommandEvent_SetString(*args, **kwargs)
e811c8ce
RD
3699
3700 def GetString(*args, **kwargs):
27fb7603
RD
3701 """
3702 GetString(self) -> String
3703
3704 Returns item string for a listbox or choice selection event (not valid
3705 for a deselection).
3706 """
54f9ee45 3707 return _core_.CommandEvent_GetString(*args, **kwargs)
e811c8ce
RD
3708
3709 def IsChecked(*args, **kwargs):
27fb7603
RD
3710 """
3711 IsChecked(self) -> bool
3712
3713 This method can be used with checkbox and menu events: for the
3714 checkboxes, the method returns true for a selection event and false
3715 for a deselection one. For the menu events, this method indicates if
3716 the menu item just has become checked or unchecked (and thus only
3717 makes sense for checkable menu items).
3718 """
54f9ee45 3719 return _core_.CommandEvent_IsChecked(*args, **kwargs)
e811c8ce 3720
242b7b46 3721 Checked = IsChecked
e811c8ce 3722 def IsSelection(*args, **kwargs):
27fb7603
RD
3723 """
3724 IsSelection(self) -> bool
3725
3726 For a listbox or similar event, returns true if it is a selection,
3727 false if it is a deselection.
3728 """
54f9ee45 3729 return _core_.CommandEvent_IsSelection(*args, **kwargs)
e811c8ce
RD
3730
3731 def SetExtraLong(*args, **kwargs):
a95a7133 3732 """SetExtraLong(self, long extraLong)"""
54f9ee45 3733 return _core_.CommandEvent_SetExtraLong(*args, **kwargs)
e811c8ce
RD
3734
3735 def GetExtraLong(*args, **kwargs):
27fb7603
RD
3736 """
3737 GetExtraLong(self) -> long
3738
3739 Returns extra information dependant on the event objects type. If the event
3740 comes from a listbox selection, it is a boolean determining whether the event
3741 was a selection (true) or a deselection (false). A listbox deselection only
3742 occurs for multiple-selection boxes, and in this case the index and string
3743 values are indeterminate and the listbox must be examined by the application.
3744 """
54f9ee45 3745 return _core_.CommandEvent_GetExtraLong(*args, **kwargs)
e811c8ce
RD
3746
3747 def SetInt(*args, **kwargs):
a95a7133 3748 """SetInt(self, int i)"""
54f9ee45 3749 return _core_.CommandEvent_SetInt(*args, **kwargs)
e811c8ce
RD
3750
3751 def GetInt(*args, **kwargs):
27fb7603
RD
3752 """
3753 GetInt(self) -> long
3754
3755 Returns the integer identifier corresponding to a listbox, choice or radiobox
3756 selection (only if the event was a selection, not a deselection), or a boolean
3757 value representing the value of a checkbox.
3758 """
54f9ee45 3759 return _core_.CommandEvent_GetInt(*args, **kwargs)
e811c8ce
RD
3760
3761 def Clone(*args, **kwargs):
a95a7133 3762 """Clone(self) -> Event"""
54f9ee45 3763 return _core_.CommandEvent_Clone(*args, **kwargs)
e811c8ce 3764
d14a1e28
RD
3765
3766class CommandEventPtr(CommandEvent):
3767 def __init__(self, this):
3768 self.this = this
3769 if not hasattr(self,"thisown"): self.thisown = 0
3770 self.__class__ = CommandEvent
54f9ee45 3771_core_.CommandEvent_swigregister(CommandEventPtr)
d14a1e28
RD
3772
3773#---------------------------------------------------------------------------
3774
3775class NotifyEvent(CommandEvent):
27fb7603
RD
3776 """
3777 An instance of this class (or one of its derived classes) is sent from
3778 a control when the control's state is being changed and the control
3779 allows that change to be prevented from happening. The event handler
3780 can call `Veto` or `Allow` to tell the control what to do.
3781 """
e811c8ce
RD
3782 def __repr__(self):
3783 return "<%s.%s; proxy of C++ wxNotifyEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 3784 def __init__(self, *args, **kwargs):
27fb7603
RD
3785 """
3786 __init__(self, wxEventType commandType=wxEVT_NULL, int winid=0) -> NotifyEvent
3787
3788 An instance of this class (or one of its derived classes) is sent from
3789 a control when the control's state is being changed and the control
3790 allows that change to be prevented from happening. The event handler
3791 can call `Veto` or `Allow` to tell the control what to do.
3792 """
54f9ee45 3793 newobj = _core_.new_NotifyEvent(*args, **kwargs)
d14a1e28
RD
3794 self.this = newobj.this
3795 self.thisown = 1
3796 del newobj.thisown
e811c8ce 3797 def Veto(*args, **kwargs):
27fb7603
RD
3798 """
3799 Veto(self)
3800
3801 Prevents the change announced by this event from happening.
3802
3803 It is in general a good idea to notify the user about the reasons for
3804 vetoing the change because otherwise the applications behaviour (which
3805 just refuses to do what the user wants) might be quite surprising.
3806 """
54f9ee45 3807 return _core_.NotifyEvent_Veto(*args, **kwargs)
e811c8ce
RD
3808
3809 def Allow(*args, **kwargs):
27fb7603
RD
3810 """
3811 Allow(self)
3812
3813 This is the opposite of `Veto`: it explicitly allows the event to be
3814 processed. For most events it is not necessary to call this method as
3815 the events are allowed anyhow but some are forbidden by default (this
3816 will be mentioned in the corresponding event description).
3817 """
54f9ee45 3818 return _core_.NotifyEvent_Allow(*args, **kwargs)
e811c8ce
RD
3819
3820 def IsAllowed(*args, **kwargs):
27fb7603
RD
3821 """
3822 IsAllowed(self) -> bool
3823
3824 Returns true if the change is allowed (`Veto` hasn't been called) or
3825 false otherwise (if it was).
3826 """
54f9ee45 3827 return _core_.NotifyEvent_IsAllowed(*args, **kwargs)
e811c8ce 3828
d14a1e28
RD
3829
3830class NotifyEventPtr(NotifyEvent):
3831 def __init__(self, this):
3832 self.this = this
3833 if not hasattr(self,"thisown"): self.thisown = 0
3834 self.__class__ = NotifyEvent
54f9ee45 3835_core_.NotifyEvent_swigregister(NotifyEventPtr)
d14a1e28
RD
3836
3837#---------------------------------------------------------------------------
3838
3839class ScrollEvent(CommandEvent):
27fb7603
RD
3840 """
3841 A scroll event holds information about events sent from stand-alone
3842 scrollbars and sliders. Note that scrolled windows do not send
3843 instnaces of this event class, but send the `wx.ScrollWinEvent`
3844 instead.
3845 """
e811c8ce
RD
3846 def __repr__(self):
3847 return "<%s.%s; proxy of C++ wxScrollEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 3848 def __init__(self, *args, **kwargs):
0df68c9f 3849 """
a95a7133 3850 __init__(self, wxEventType commandType=wxEVT_NULL, int winid=0, int pos=0,
0df68c9f
RD
3851 int orient=0) -> ScrollEvent
3852 """
54f9ee45 3853 newobj = _core_.new_ScrollEvent(*args, **kwargs)
d14a1e28
RD
3854 self.this = newobj.this
3855 self.thisown = 1
3856 del newobj.thisown
e811c8ce 3857 def GetOrientation(*args, **kwargs):
27fb7603
RD
3858 """
3859 GetOrientation(self) -> int
3860
3861 Returns wx.HORIZONTAL or wx.VERTICAL, depending on the orientation of
3862 the scrollbar.
3863 """
54f9ee45 3864 return _core_.ScrollEvent_GetOrientation(*args, **kwargs)
e811c8ce
RD
3865
3866 def GetPosition(*args, **kwargs):
27fb7603
RD
3867 """
3868 GetPosition(self) -> int
3869
3870 Returns the position of the scrollbar.
3871 """
54f9ee45 3872 return _core_.ScrollEvent_GetPosition(*args, **kwargs)
e811c8ce
RD
3873
3874 def SetOrientation(*args, **kwargs):
a95a7133 3875 """SetOrientation(self, int orient)"""
54f9ee45 3876 return _core_.ScrollEvent_SetOrientation(*args, **kwargs)
e811c8ce
RD
3877
3878 def SetPosition(*args, **kwargs):
a95a7133 3879 """SetPosition(self, int pos)"""
54f9ee45 3880 return _core_.ScrollEvent_SetPosition(*args, **kwargs)
e811c8ce 3881
d14a1e28
RD
3882
3883class ScrollEventPtr(ScrollEvent):
3884 def __init__(self, this):
3885 self.this = this
3886 if not hasattr(self,"thisown"): self.thisown = 0
3887 self.__class__ = ScrollEvent
54f9ee45 3888_core_.ScrollEvent_swigregister(ScrollEventPtr)
d14a1e28
RD
3889
3890#---------------------------------------------------------------------------
3891
3892class ScrollWinEvent(Event):
27fb7603
RD
3893 """
3894 A wx.ScrollWinEvent holds information about scrolling and is sent from
3895 scrolling windows.
3896 """
e811c8ce
RD
3897 def __repr__(self):
3898 return "<%s.%s; proxy of C++ wxScrollWinEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 3899 def __init__(self, *args, **kwargs):
27fb7603
RD
3900 """
3901 __init__(self, wxEventType commandType=wxEVT_NULL, int pos=0, int orient=0) -> ScrollWinEvent
3902
3903 A wx.ScrollWinEvent holds information about scrolling and is sent from
3904 scrolling windows.
3905 """
54f9ee45 3906 newobj = _core_.new_ScrollWinEvent(*args, **kwargs)
d14a1e28
RD
3907 self.this = newobj.this
3908 self.thisown = 1
3909 del newobj.thisown
e811c8ce 3910 def GetOrientation(*args, **kwargs):
27fb7603
RD
3911 """
3912 GetOrientation(self) -> int
3913
3914 Returns wx.HORIZONTAL or wx.VERTICAL, depending on the orientation of
3915 the scrollbar.
3916 """
54f9ee45 3917 return _core_.ScrollWinEvent_GetOrientation(*args, **kwargs)
e811c8ce
RD
3918
3919 def GetPosition(*args, **kwargs):
27fb7603
RD
3920 """
3921 GetPosition(self) -> int
3922
3923 Returns the position of the scrollbar for the thumb track and release
3924 events. Note that this field can't be used for the other events, you
3925 need to query the window itself for the current position in that case.
3926 """
54f9ee45 3927 return _core_.ScrollWinEvent_GetPosition(*args, **kwargs)
e811c8ce
RD
3928
3929 def SetOrientation(*args, **kwargs):
a95a7133 3930 """SetOrientation(self, int orient)"""
54f9ee45 3931 return _core_.ScrollWinEvent_SetOrientation(*args, **kwargs)
e811c8ce
RD
3932
3933 def SetPosition(*args, **kwargs):
a95a7133 3934 """SetPosition(self, int pos)"""
54f9ee45 3935 return _core_.ScrollWinEvent_SetPosition(*args, **kwargs)
e811c8ce 3936
d14a1e28
RD
3937
3938class ScrollWinEventPtr(ScrollWinEvent):
3939 def __init__(self, this):
3940 self.this = this
3941 if not hasattr(self,"thisown"): self.thisown = 0
3942 self.__class__ = ScrollWinEvent
54f9ee45 3943_core_.ScrollWinEvent_swigregister(ScrollWinEventPtr)
d14a1e28
RD
3944
3945#---------------------------------------------------------------------------
3946
54f9ee45
RD
3947MOUSE_BTN_ANY = _core_.MOUSE_BTN_ANY
3948MOUSE_BTN_NONE = _core_.MOUSE_BTN_NONE
3949MOUSE_BTN_LEFT = _core_.MOUSE_BTN_LEFT
3950MOUSE_BTN_MIDDLE = _core_.MOUSE_BTN_MIDDLE
3951MOUSE_BTN_RIGHT = _core_.MOUSE_BTN_RIGHT
d14a1e28 3952class MouseEvent(Event):
27fb7603
RD
3953 """
3954 This event class contains information about the events generated by
3955 the mouse: they include mouse buttons press and release events and
3956 mouse move events.
3957
3958 All mouse events involving the buttons use ``wx.MOUSE_BTN_LEFT`` for
3959 the left mouse button, ``wx.MOUSE_BTN_MIDDLE`` for the middle one and
3960 ``wx.MOUSE_BTN_RIGHT`` for the right one. Note that not all mice have
3961 a middle button so a portable application should avoid relying on the
3962 events from it.
3963
3964 Note the difference between methods like `LeftDown` and `LeftIsDown`:
3965 the former returns true when the event corresponds to the left mouse
3966 button click while the latter returns true if the left mouse button is
3967 currently being pressed. For example, when the user is dragging the
3968 mouse you can use `LeftIsDown` to test whether the left mouse button
3969 is (still) depressed. Also, by convention, if `LeftDown` returns true,
3970 `LeftIsDown` will also return true in wxWidgets whatever the
3971 underlying GUI behaviour is (which is platform-dependent). The same
3972 applies, of course, to other mouse buttons as well.
3973 """
e811c8ce
RD
3974 def __repr__(self):
3975 return "<%s.%s; proxy of C++ wxMouseEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 3976 def __init__(self, *args, **kwargs):
27fb7603
RD
3977 """
3978 __init__(self, wxEventType mouseType=wxEVT_NULL) -> MouseEvent
3979
3980 Constructs a wx.MouseEvent. Valid event types are:
3981
3982 * wxEVT_ENTER_WINDOW
3983 * wxEVT_LEAVE_WINDOW
3984 * wxEVT_LEFT_DOWN
3985 * wxEVT_LEFT_UP
3986 * wxEVT_LEFT_DCLICK
3987 * wxEVT_MIDDLE_DOWN
3988 * wxEVT_MIDDLE_UP
3989 * wxEVT_MIDDLE_DCLICK
3990 * wxEVT_RIGHT_DOWN
3991 * wxEVT_RIGHT_UP
3992 * wxEVT_RIGHT_DCLICK
3993 * wxEVT_MOTION
3994 * wxEVT_MOUSEWHEEL
3995 """
54f9ee45 3996 newobj = _core_.new_MouseEvent(*args, **kwargs)
d14a1e28
RD
3997 self.this = newobj.this
3998 self.thisown = 1
3999 del newobj.thisown
e811c8ce 4000 def IsButton(*args, **kwargs):
27fb7603
RD
4001 """
4002 IsButton(self) -> bool
4003
4004 Returns true if the event was a mouse button event (not necessarily a
4005 button down event - that may be tested using `ButtonDown`).
4006 """
54f9ee45 4007 return _core_.MouseEvent_IsButton(*args, **kwargs)
e811c8ce
RD
4008
4009 def ButtonDown(*args, **kwargs):
27fb7603
RD
4010 """
4011 ButtonDown(self, int but=MOUSE_BTN_ANY) -> bool
4012
4013 If the argument is omitted, this returns true if the event was any mouse
4014 button down event. Otherwise the argument specifies which button-down
4015 event shold be checked for (see `Button` for the possible values).
4016 """
54f9ee45 4017 return _core_.MouseEvent_ButtonDown(*args, **kwargs)
e811c8ce
RD
4018
4019 def ButtonDClick(*args, **kwargs):
27fb7603
RD
4020 """
4021 ButtonDClick(self, int but=MOUSE_BTN_ANY) -> bool
4022
4023 If the argument is omitted, this returns true if the event was any
4024 mouse double click event. Otherwise the argument specifies which
4025 double click event to check for (see `Button` for the possible
4026 values).
4027 """
54f9ee45 4028 return _core_.MouseEvent_ButtonDClick(*args, **kwargs)
e811c8ce
RD
4029
4030 def ButtonUp(*args, **kwargs):
27fb7603
RD
4031 """
4032 ButtonUp(self, int but=MOUSE_BTN_ANY) -> bool
4033
4034 If the argument is omitted, this returns true if the event was any
4035 mouse button up event. Otherwise the argument specifies which
4036 button up event to check for (see `Button` for the possible values).
4037 """
54f9ee45 4038 return _core_.MouseEvent_ButtonUp(*args, **kwargs)
e811c8ce
RD
4039
4040 def Button(*args, **kwargs):
27fb7603
RD
4041 """
4042 Button(self, int button) -> bool
4043
4044 Returns true if the identified mouse button is changing state. Valid
4045 values of button are:
4046
4047 ==================== =====================================
4048 wx.MOUSE_BTN_LEFT check if left button was pressed
4049 wx.MOUSE_BTN_MIDDLE check if middle button was pressed
4050 wx.MOUSE_BTN_RIGHT check if right button was pressed
4051 wx.MOUSE_BTN_ANY check if any button was pressed
4052 ==================== =====================================
4053
4054 """
54f9ee45 4055 return _core_.MouseEvent_Button(*args, **kwargs)
e811c8ce
RD
4056
4057 def ButtonIsDown(*args, **kwargs):
a95a7133 4058 """ButtonIsDown(self, int but) -> bool"""
54f9ee45 4059 return _core_.MouseEvent_ButtonIsDown(*args, **kwargs)
e811c8ce
RD
4060
4061 def GetButton(*args, **kwargs):
27fb7603
RD
4062 """
4063 GetButton(self) -> int
4064
4065 Returns the mouse button which generated this event or
4066 wx.MOUSE_BTN_NONE if no button is involved (for mouse move, enter or
4067 leave event, for example). Otherwise wx.MOUSE_BTN_LEFT is returned for
4068 the left button down, up and double click events, wx.MOUSE_BTN_MIDDLE
4069 and wx.MOUSE_BTN_RIGHT for the same events for the middle and the
4070 right buttons respectively.
4071 """
54f9ee45 4072 return _core_.MouseEvent_GetButton(*args, **kwargs)
e811c8ce
RD
4073
4074 def ControlDown(*args, **kwargs):
27fb7603
RD
4075 """
4076 ControlDown(self) -> bool
4077
4078 Returns true if the control key was down at the time of the event.
4079 """
54f9ee45 4080 return _core_.MouseEvent_ControlDown(*args, **kwargs)
e811c8ce
RD
4081
4082 def MetaDown(*args, **kwargs):
27fb7603
RD
4083 """
4084 MetaDown(self) -> bool
4085
4086 Returns true if the Meta key was down at the time of the event.
4087 """
54f9ee45 4088 return _core_.MouseEvent_MetaDown(*args, **kwargs)
e811c8ce
RD
4089
4090 def AltDown(*args, **kwargs):
27fb7603
RD
4091 """
4092 AltDown(self) -> bool
4093
4094 Returns true if the Alt key was down at the time of the event.
4095 """
54f9ee45 4096 return _core_.MouseEvent_AltDown(*args, **kwargs)
e811c8ce
RD
4097
4098 def ShiftDown(*args, **kwargs):
27fb7603
RD
4099 """
4100 ShiftDown(self) -> bool
4101
4102 Returns true if the Shift key was down at the time of the event.
4103 """
54f9ee45 4104 return _core_.MouseEvent_ShiftDown(*args, **kwargs)
e811c8ce 4105
412d302d
RD
4106 def CmdDown(*args, **kwargs):
4107 """
4108 CmdDown(self) -> bool
4109
4110 "Cmd" is a pseudo key which is the same as Control for PC and Unix
4111 platforms but the special "Apple" (a.k.a as "Command") key on
27fb7603 4112 Macs: it often makes sense to use it instead of, say, `ControlDown`
412d302d 4113 because Cmd key is used for the same thing under Mac as Ctrl
27fb7603 4114 elsewhere. The Ctrl key still exists, it's just not used for this
412d302d
RD
4115 purpose. So for non-Mac platforms this is the same as `ControlDown`
4116 and Macs this is the same as `MetaDown`.
4117 """
4118 return _core_.MouseEvent_CmdDown(*args, **kwargs)
4119
e811c8ce 4120 def LeftDown(*args, **kwargs):
27fb7603
RD
4121 """
4122 LeftDown(self) -> bool
4123
4124 Returns true if the left mouse button state changed to down.
4125 """
54f9ee45 4126 return _core_.MouseEvent_LeftDown(*args, **kwargs)
e811c8ce
RD
4127
4128 def MiddleDown(*args, **kwargs):
27fb7603
RD
4129 """
4130 MiddleDown(self) -> bool
4131
4132 Returns true if the middle mouse button state changed to down.
4133 """
54f9ee45 4134 return _core_.MouseEvent_MiddleDown(*args, **kwargs)
e811c8ce
RD
4135
4136 def RightDown(*args, **kwargs):
27fb7603
RD
4137 """
4138 RightDown(self) -> bool
4139
4140 Returns true if the right mouse button state changed to down.
4141 """
54f9ee45 4142 return _core_.MouseEvent_RightDown(*args, **kwargs)
e811c8ce
RD
4143
4144 def LeftUp(*args, **kwargs):
27fb7603
RD
4145 """
4146 LeftUp(self) -> bool
4147
4148 Returns true if the left mouse button state changed to up.
4149 """
54f9ee45 4150 return _core_.MouseEvent_LeftUp(*args, **kwargs)
e811c8ce
RD
4151
4152 def MiddleUp(*args, **kwargs):
27fb7603
RD
4153 """
4154 MiddleUp(self) -> bool
4155
4156 Returns true if the middle mouse button state changed to up.
4157 """
54f9ee45 4158 return _core_.MouseEvent_MiddleUp(*args, **kwargs)
e811c8ce
RD
4159
4160 def RightUp(*args, **kwargs):
27fb7603
RD
4161 """
4162 RightUp(self) -> bool
4163
4164 Returns true if the right mouse button state changed to up.
4165 """
54f9ee45 4166 return _core_.MouseEvent_RightUp(*args, **kwargs)
e811c8ce
RD
4167
4168 def LeftDClick(*args, **kwargs):
27fb7603
RD
4169 """
4170 LeftDClick(self) -> bool
4171
4172 Returns true if the event was a left button double click.
4173 """
54f9ee45 4174 return _core_.MouseEvent_LeftDClick(*args, **kwargs)
e811c8ce
RD
4175
4176 def MiddleDClick(*args, **kwargs):
27fb7603
RD
4177 """
4178 MiddleDClick(self) -> bool
4179
4180 Returns true if the event was a middle button double click.
4181 """
54f9ee45 4182 return _core_.MouseEvent_MiddleDClick(*args, **kwargs)
e811c8ce
RD
4183
4184 def RightDClick(*args, **kwargs):
27fb7603
RD
4185 """
4186 RightDClick(self) -> bool
4187
4188 Returns true if the event was a right button double click.
4189 """
54f9ee45 4190 return _core_.MouseEvent_RightDClick(*args, **kwargs)
e811c8ce
RD
4191
4192 def LeftIsDown(*args, **kwargs):
27fb7603
RD
4193 """
4194 LeftIsDown(self) -> bool
4195
4196 Returns true if the left mouse button is currently down, independent
4197 of the current event type.
4198
4199 Please notice that it is not the same as LeftDown which returns true
4200 if the left mouse button was just pressed. Rather, it describes the
4201 state of the mouse button before the event happened.
4202
4203 This event is usually used in the mouse event handlers which process
4204 "move mouse" messages to determine whether the user is (still)
4205 dragging the mouse.
4206 """
54f9ee45 4207 return _core_.MouseEvent_LeftIsDown(*args, **kwargs)
e811c8ce
RD
4208
4209 def MiddleIsDown(*args, **kwargs):
27fb7603
RD
4210 """
4211 MiddleIsDown(self) -> bool
4212
4213 Returns true if the middle mouse button is currently down, independent
4214 of the current event type.
4215 """
54f9ee45 4216 return _core_.MouseEvent_MiddleIsDown(*args, **kwargs)
e811c8ce
RD
4217
4218 def RightIsDown(*args, **kwargs):
27fb7603
RD
4219 """
4220 RightIsDown(self) -> bool
4221
4222 Returns true if the right mouse button is currently down, independent
4223 of the current event type.
4224 """
54f9ee45 4225 return _core_.MouseEvent_RightIsDown(*args, **kwargs)
e811c8ce
RD
4226
4227 def Dragging(*args, **kwargs):
27fb7603
RD
4228 """
4229 Dragging(self) -> bool
4230
4231 Returns true if this was a dragging event (motion while a button is
4232 depressed).
4233 """
54f9ee45 4234 return _core_.MouseEvent_Dragging(*args, **kwargs)
e811c8ce
RD
4235
4236 def Moving(*args, **kwargs):
27fb7603
RD
4237 """
4238 Moving(self) -> bool
4239
4240 Returns true if this was a motion event and no mouse buttons were
4241 pressed. If any mouse button is held pressed, then this method returns
4242 false and Dragging returns true.
4243 """
54f9ee45 4244 return _core_.MouseEvent_Moving(*args, **kwargs)
e811c8ce
RD
4245
4246 def Entering(*args, **kwargs):
27fb7603
RD
4247 """
4248 Entering(self) -> bool
4249
4250 Returns true if the mouse was entering the window.
4251 """
54f9ee45 4252 return _core_.MouseEvent_Entering(*args, **kwargs)
e811c8ce
RD
4253
4254 def Leaving(*args, **kwargs):
27fb7603
RD
4255 """
4256 Leaving(self) -> bool
4257
4258 Returns true if the mouse was leaving the window.
4259 """
54f9ee45 4260 return _core_.MouseEvent_Leaving(*args, **kwargs)
e811c8ce
RD
4261
4262 def GetPosition(*args, **kwargs):
0df68c9f 4263 """
a95a7133 4264 GetPosition(self) -> Point
e811c8ce 4265
27fb7603
RD
4266 Returns the pixel position of the mouse in window coordinates when the
4267 event happened.
0df68c9f 4268 """
54f9ee45 4269 return _core_.MouseEvent_GetPosition(*args, **kwargs)
e811c8ce
RD
4270
4271 def GetPositionTuple(*args, **kwargs):
0df68c9f
RD
4272 """
4273 GetPositionTuple() -> (x,y)
e811c8ce 4274
27fb7603
RD
4275 Returns the pixel position of the mouse in window coordinates when the
4276 event happened.
0df68c9f 4277 """
54f9ee45 4278 return _core_.MouseEvent_GetPositionTuple(*args, **kwargs)
e811c8ce
RD
4279
4280 def GetLogicalPosition(*args, **kwargs):
27fb7603
RD
4281 """
4282 GetLogicalPosition(self, DC dc) -> Point
4283
4284 Returns the logical mouse position in pixels (i.e. translated
4285 according to the translation set for the DC, which usually indicates
4286 that the window has been scrolled).
4287 """
54f9ee45 4288 return _core_.MouseEvent_GetLogicalPosition(*args, **kwargs)
e811c8ce
RD
4289
4290 def GetX(*args, **kwargs):
27fb7603
RD
4291 """
4292 GetX(self) -> int
4293
4294 Returns X coordinate of the physical mouse event position.
4295 """
54f9ee45 4296 return _core_.MouseEvent_GetX(*args, **kwargs)
e811c8ce
RD
4297
4298 def GetY(*args, **kwargs):
27fb7603
RD
4299 """
4300 GetY(self) -> int
4301
4302 Returns Y coordinate of the physical mouse event position.
4303 """
54f9ee45 4304 return _core_.MouseEvent_GetY(*args, **kwargs)
e811c8ce
RD
4305
4306 def GetWheelRotation(*args, **kwargs):
27fb7603
RD
4307 """
4308 GetWheelRotation(self) -> int
4309
4310 Get wheel rotation, positive or negative indicates direction of
4311 rotation. Current devices all send an event when rotation is equal to
4312 +/-WheelDelta, but this allows for finer resolution devices to be
4313 created in the future. Because of this you shouldn't assume that one
4314 event is equal to 1 line or whatever, but you should be able to either
4315 do partial line scrolling or wait until +/-WheelDelta rotation values
4316 have been accumulated before scrolling.
4317 """
54f9ee45 4318 return _core_.MouseEvent_GetWheelRotation(*args, **kwargs)
e811c8ce
RD
4319
4320 def GetWheelDelta(*args, **kwargs):
27fb7603
RD
4321 """
4322 GetWheelDelta(self) -> int
4323
4324 Get wheel delta, normally 120. This is the threshold for action to be
4325 taken, and one such action (for example, scrolling one increment)
4326 should occur for each delta.
4327 """
54f9ee45 4328 return _core_.MouseEvent_GetWheelDelta(*args, **kwargs)
e811c8ce
RD
4329
4330 def GetLinesPerAction(*args, **kwargs):
27fb7603
RD
4331 """
4332 GetLinesPerAction(self) -> int
4333
4334 Returns the configured number of lines (or whatever) to be scrolled
4335 per wheel action. Defaults to three.
4336 """
54f9ee45 4337 return _core_.MouseEvent_GetLinesPerAction(*args, **kwargs)
e811c8ce
RD
4338
4339 def IsPageScroll(*args, **kwargs):
27fb7603
RD
4340 """
4341 IsPageScroll(self) -> bool
4342
4343 Returns true if the system has been setup to do page scrolling with
4344 the mouse wheel instead of line scrolling.
4345 """
54f9ee45
RD
4346 return _core_.MouseEvent_IsPageScroll(*args, **kwargs)
4347
4348 m_x = property(_core_.MouseEvent_m_x_get, _core_.MouseEvent_m_x_set)
4349 m_y = property(_core_.MouseEvent_m_y_get, _core_.MouseEvent_m_y_set)
4350 m_leftDown = property(_core_.MouseEvent_m_leftDown_get, _core_.MouseEvent_m_leftDown_set)
4351 m_middleDown = property(_core_.MouseEvent_m_middleDown_get, _core_.MouseEvent_m_middleDown_set)
4352 m_rightDown = property(_core_.MouseEvent_m_rightDown_get, _core_.MouseEvent_m_rightDown_set)
4353 m_controlDown = property(_core_.MouseEvent_m_controlDown_get, _core_.MouseEvent_m_controlDown_set)
4354 m_shiftDown = property(_core_.MouseEvent_m_shiftDown_get, _core_.MouseEvent_m_shiftDown_set)
4355 m_altDown = property(_core_.MouseEvent_m_altDown_get, _core_.MouseEvent_m_altDown_set)
4356 m_metaDown = property(_core_.MouseEvent_m_metaDown_get, _core_.MouseEvent_m_metaDown_set)
4357 m_wheelRotation = property(_core_.MouseEvent_m_wheelRotation_get, _core_.MouseEvent_m_wheelRotation_set)
4358 m_wheelDelta = property(_core_.MouseEvent_m_wheelDelta_get, _core_.MouseEvent_m_wheelDelta_set)
4359 m_linesPerAction = property(_core_.MouseEvent_m_linesPerAction_get, _core_.MouseEvent_m_linesPerAction_set)
d14a1e28
RD
4360
4361class MouseEventPtr(MouseEvent):
4362 def __init__(self, this):
4363 self.this = this
4364 if not hasattr(self,"thisown"): self.thisown = 0
4365 self.__class__ = MouseEvent
54f9ee45 4366_core_.MouseEvent_swigregister(MouseEventPtr)
d14a1e28
RD
4367
4368#---------------------------------------------------------------------------
4369
4370class SetCursorEvent(Event):
093d3ff1 4371 """Proxy of C++ SetCursorEvent class"""
e811c8ce
RD
4372 def __repr__(self):
4373 return "<%s.%s; proxy of C++ wxSetCursorEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 4374 def __init__(self, *args, **kwargs):
a95a7133 4375 """__init__(self, int x=0, int y=0) -> SetCursorEvent"""
54f9ee45 4376 newobj = _core_.new_SetCursorEvent(*args, **kwargs)
d14a1e28
RD
4377 self.this = newobj.this
4378 self.thisown = 1
4379 del newobj.thisown
e811c8ce 4380 def GetX(*args, **kwargs):
a95a7133 4381 """GetX(self) -> int"""
54f9ee45 4382 return _core_.SetCursorEvent_GetX(*args, **kwargs)
e811c8ce
RD
4383
4384 def GetY(*args, **kwargs):
a95a7133 4385 """GetY(self) -> int"""
54f9ee45 4386 return _core_.SetCursorEvent_GetY(*args, **kwargs)
e811c8ce
RD
4387
4388 def SetCursor(*args, **kwargs):
a95a7133 4389 """SetCursor(self, Cursor cursor)"""
54f9ee45 4390 return _core_.SetCursorEvent_SetCursor(*args, **kwargs)
e811c8ce
RD
4391
4392 def GetCursor(*args, **kwargs):
a95a7133 4393 """GetCursor(self) -> Cursor"""
54f9ee45 4394 return _core_.SetCursorEvent_GetCursor(*args, **kwargs)
e811c8ce
RD
4395
4396 def HasCursor(*args, **kwargs):
a95a7133 4397 """HasCursor(self) -> bool"""
54f9ee45 4398 return _core_.SetCursorEvent_HasCursor(*args, **kwargs)
e811c8ce 4399
d14a1e28
RD
4400
4401class SetCursorEventPtr(SetCursorEvent):
4402 def __init__(self, this):
4403 self.this = this
4404 if not hasattr(self,"thisown"): self.thisown = 0
4405 self.__class__ = SetCursorEvent
54f9ee45 4406_core_.SetCursorEvent_swigregister(SetCursorEventPtr)
d14a1e28
RD
4407
4408#---------------------------------------------------------------------------
4409
4410class KeyEvent(Event):
093d3ff1 4411 """Proxy of C++ KeyEvent class"""
e811c8ce
RD
4412 def __repr__(self):
4413 return "<%s.%s; proxy of C++ wxKeyEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 4414 def __init__(self, *args, **kwargs):
a95a7133 4415 """__init__(self, wxEventType keyType=wxEVT_NULL) -> KeyEvent"""
54f9ee45 4416 newobj = _core_.new_KeyEvent(*args, **kwargs)
d14a1e28
RD
4417 self.this = newobj.this
4418 self.thisown = 1
4419 del newobj.thisown
e811c8ce 4420 def ControlDown(*args, **kwargs):
a95a7133 4421 """ControlDown(self) -> bool"""
54f9ee45 4422 return _core_.KeyEvent_ControlDown(*args, **kwargs)
e811c8ce
RD
4423
4424 def MetaDown(*args, **kwargs):
a95a7133 4425 """MetaDown(self) -> bool"""
54f9ee45 4426 return _core_.KeyEvent_MetaDown(*args, **kwargs)
e811c8ce
RD
4427
4428 def AltDown(*args, **kwargs):
a95a7133 4429 """AltDown(self) -> bool"""
54f9ee45 4430 return _core_.KeyEvent_AltDown(*args, **kwargs)
e811c8ce
RD
4431
4432 def ShiftDown(*args, **kwargs):
a95a7133 4433 """ShiftDown(self) -> bool"""
54f9ee45 4434 return _core_.KeyEvent_ShiftDown(*args, **kwargs)
e811c8ce 4435
412d302d
RD
4436 def CmdDown(*args, **kwargs):
4437 """
4438 CmdDown(self) -> bool
4439
4440 "Cmd" is a pseudo key which is the same as Control for PC and Unix
4441 platforms but the special "Apple" (a.k.a as "Command") key on
4442 Macs: it makes often sense to use it instead of, say, `ControlDown`
4443 because Cmd key is used for the same thing under Mac as Ctrl
4444 elsewhere. The Ctrl still exists, it's just not used for this
4445 purpose. So for non-Mac platforms this is the same as `ControlDown`
4446 and Macs this is the same as `MetaDown`.
4447 """
4448 return _core_.KeyEvent_CmdDown(*args, **kwargs)
4449
e811c8ce 4450 def HasModifiers(*args, **kwargs):
a95a7133 4451 """HasModifiers(self) -> bool"""
54f9ee45 4452 return _core_.KeyEvent_HasModifiers(*args, **kwargs)
e811c8ce
RD
4453
4454 def GetKeyCode(*args, **kwargs):
a95a7133 4455 """GetKeyCode(self) -> int"""
54f9ee45 4456 return _core_.KeyEvent_GetKeyCode(*args, **kwargs)
e811c8ce 4457
d14a1e28 4458 KeyCode = GetKeyCode
19272049
RD
4459 def GetUnicodeKey(*args, **kwargs):
4460 """GetUnicodeKey(self) -> int"""
4461 return _core_.KeyEvent_GetUnicodeKey(*args, **kwargs)
e811c8ce 4462
19272049 4463 GetUniChar = GetUnicodeKey
e811c8ce 4464 def GetRawKeyCode(*args, **kwargs):
a95a7133 4465 """GetRawKeyCode(self) -> unsigned int"""
54f9ee45 4466 return _core_.KeyEvent_GetRawKeyCode(*args, **kwargs)
e811c8ce
RD
4467
4468 def GetRawKeyFlags(*args, **kwargs):
a95a7133 4469 """GetRawKeyFlags(self) -> unsigned int"""
54f9ee45 4470 return _core_.KeyEvent_GetRawKeyFlags(*args, **kwargs)
e811c8ce
RD
4471
4472 def GetPosition(*args, **kwargs):
0df68c9f 4473 """
a95a7133 4474 GetPosition(self) -> Point
e811c8ce 4475
0df68c9f
RD
4476 Find the position of the event.
4477 """
54f9ee45 4478 return _core_.KeyEvent_GetPosition(*args, **kwargs)
e811c8ce
RD
4479
4480 def GetPositionTuple(*args, **kwargs):
0df68c9f
RD
4481 """
4482 GetPositionTuple() -> (x,y)
e811c8ce 4483
0df68c9f
RD
4484 Find the position of the event.
4485 """
54f9ee45 4486 return _core_.KeyEvent_GetPositionTuple(*args, **kwargs)
e811c8ce
RD
4487
4488 def GetX(*args, **kwargs):
a95a7133 4489 """GetX(self) -> int"""
54f9ee45 4490 return _core_.KeyEvent_GetX(*args, **kwargs)
e811c8ce
RD
4491
4492 def GetY(*args, **kwargs):
a95a7133 4493 """GetY(self) -> int"""
54f9ee45
RD
4494 return _core_.KeyEvent_GetY(*args, **kwargs)
4495
4496 m_x = property(_core_.KeyEvent_m_x_get, _core_.KeyEvent_m_x_set)
4497 m_y = property(_core_.KeyEvent_m_y_get, _core_.KeyEvent_m_y_set)
4498 m_keyCode = property(_core_.KeyEvent_m_keyCode_get, _core_.KeyEvent_m_keyCode_set)
4499 m_controlDown = property(_core_.KeyEvent_m_controlDown_get, _core_.KeyEvent_m_controlDown_set)
4500 m_shiftDown = property(_core_.KeyEvent_m_shiftDown_get, _core_.KeyEvent_m_shiftDown_set)
4501 m_altDown = property(_core_.KeyEvent_m_altDown_get, _core_.KeyEvent_m_altDown_set)
4502 m_metaDown = property(_core_.KeyEvent_m_metaDown_get, _core_.KeyEvent_m_metaDown_set)
4503 m_scanCode = property(_core_.KeyEvent_m_scanCode_get, _core_.KeyEvent_m_scanCode_set)
4504 m_rawCode = property(_core_.KeyEvent_m_rawCode_get, _core_.KeyEvent_m_rawCode_set)
4505 m_rawFlags = property(_core_.KeyEvent_m_rawFlags_get, _core_.KeyEvent_m_rawFlags_set)
d14a1e28
RD
4506
4507class KeyEventPtr(KeyEvent):
4508 def __init__(self, this):
4509 self.this = this
4510 if not hasattr(self,"thisown"): self.thisown = 0
4511 self.__class__ = KeyEvent
54f9ee45 4512_core_.KeyEvent_swigregister(KeyEventPtr)
d14a1e28
RD
4513
4514#---------------------------------------------------------------------------
4515
4516class SizeEvent(Event):
093d3ff1 4517 """Proxy of C++ SizeEvent class"""
e811c8ce
RD
4518 def __repr__(self):
4519 return "<%s.%s; proxy of C++ wxSizeEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 4520 def __init__(self, *args, **kwargs):
a95a7133 4521 """__init__(self, Size sz=DefaultSize, int winid=0) -> SizeEvent"""
54f9ee45 4522 newobj = _core_.new_SizeEvent(*args, **kwargs)
d14a1e28
RD
4523 self.this = newobj.this
4524 self.thisown = 1
4525 del newobj.thisown
e811c8ce 4526 def GetSize(*args, **kwargs):
a95a7133 4527 """GetSize(self) -> Size"""
54f9ee45 4528 return _core_.SizeEvent_GetSize(*args, **kwargs)
e811c8ce
RD
4529
4530 def GetRect(*args, **kwargs):
a95a7133 4531 """GetRect(self) -> Rect"""
54f9ee45 4532 return _core_.SizeEvent_GetRect(*args, **kwargs)
e811c8ce
RD
4533
4534 def SetRect(*args, **kwargs):
a95a7133 4535 """SetRect(self, Rect rect)"""
54f9ee45 4536 return _core_.SizeEvent_SetRect(*args, **kwargs)
e811c8ce
RD
4537
4538 def SetSize(*args, **kwargs):
a95a7133 4539 """SetSize(self, Size size)"""
54f9ee45 4540 return _core_.SizeEvent_SetSize(*args, **kwargs)
e811c8ce 4541
54f9ee45
RD
4542 m_size = property(_core_.SizeEvent_m_size_get, _core_.SizeEvent_m_size_set)
4543 m_rect = property(_core_.SizeEvent_m_rect_get, _core_.SizeEvent_m_rect_set)
d14a1e28
RD
4544
4545class SizeEventPtr(SizeEvent):
4546 def __init__(self, this):
4547 self.this = this
4548 if not hasattr(self,"thisown"): self.thisown = 0
4549 self.__class__ = SizeEvent
54f9ee45 4550_core_.SizeEvent_swigregister(SizeEventPtr)
d14a1e28
RD
4551
4552#---------------------------------------------------------------------------
4553
4554class MoveEvent(Event):
093d3ff1 4555 """Proxy of C++ MoveEvent class"""
e811c8ce
RD
4556 def __repr__(self):
4557 return "<%s.%s; proxy of C++ wxMoveEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 4558 def __init__(self, *args, **kwargs):
a95a7133 4559 """__init__(self, Point pos=DefaultPosition, int winid=0) -> MoveEvent"""
54f9ee45 4560 newobj = _core_.new_MoveEvent(*args, **kwargs)
d14a1e28
RD
4561 self.this = newobj.this
4562 self.thisown = 1
4563 del newobj.thisown
e811c8ce 4564 def GetPosition(*args, **kwargs):
a95a7133 4565 """GetPosition(self) -> Point"""
54f9ee45 4566 return _core_.MoveEvent_GetPosition(*args, **kwargs)
e811c8ce
RD
4567
4568 def GetRect(*args, **kwargs):
a95a7133 4569 """GetRect(self) -> Rect"""
54f9ee45 4570 return _core_.MoveEvent_GetRect(*args, **kwargs)
e811c8ce
RD
4571
4572 def SetRect(*args, **kwargs):
a95a7133 4573 """SetRect(self, Rect rect)"""
54f9ee45 4574 return _core_.MoveEvent_SetRect(*args, **kwargs)
e811c8ce
RD
4575
4576 def SetPosition(*args, **kwargs):
a95a7133 4577 """SetPosition(self, Point pos)"""
54f9ee45 4578 return _core_.MoveEvent_SetPosition(*args, **kwargs)
e811c8ce 4579
7557b9b5
RD
4580 m_pos = property(GetPosition, SetPosition)
4581 m_rect = property(GetRect, SetRect)
4582
d14a1e28
RD
4583
4584class MoveEventPtr(MoveEvent):
4585 def __init__(self, this):
4586 self.this = this
4587 if not hasattr(self,"thisown"): self.thisown = 0
4588 self.__class__ = MoveEvent
54f9ee45 4589_core_.MoveEvent_swigregister(MoveEventPtr)
d14a1e28
RD
4590
4591#---------------------------------------------------------------------------
4592
4593class PaintEvent(Event):
093d3ff1 4594 """Proxy of C++ PaintEvent class"""
e811c8ce
RD
4595 def __repr__(self):
4596 return "<%s.%s; proxy of C++ wxPaintEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 4597 def __init__(self, *args, **kwargs):
a95a7133 4598 """__init__(self, int Id=0) -> PaintEvent"""
54f9ee45 4599 newobj = _core_.new_PaintEvent(*args, **kwargs)
d14a1e28
RD
4600 self.this = newobj.this
4601 self.thisown = 1
4602 del newobj.thisown
d14a1e28
RD
4603
4604class PaintEventPtr(PaintEvent):
4605 def __init__(self, this):
4606 self.this = this
4607 if not hasattr(self,"thisown"): self.thisown = 0
4608 self.__class__ = PaintEvent
54f9ee45 4609_core_.PaintEvent_swigregister(PaintEventPtr)
d14a1e28
RD
4610
4611class NcPaintEvent(Event):
093d3ff1 4612 """Proxy of C++ NcPaintEvent class"""
e811c8ce
RD
4613 def __repr__(self):
4614 return "<%s.%s; proxy of C++ wxNcPaintEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 4615 def __init__(self, *args, **kwargs):
a95a7133 4616 """__init__(self, int winid=0) -> NcPaintEvent"""
54f9ee45 4617 newobj = _core_.new_NcPaintEvent(*args, **kwargs)
d14a1e28
RD
4618 self.this = newobj.this
4619 self.thisown = 1
4620 del newobj.thisown
d14a1e28
RD
4621
4622class NcPaintEventPtr(NcPaintEvent):
4623 def __init__(self, this):
4624 self.this = this
4625 if not hasattr(self,"thisown"): self.thisown = 0
4626 self.__class__ = NcPaintEvent
54f9ee45 4627_core_.NcPaintEvent_swigregister(NcPaintEventPtr)
d14a1e28
RD
4628
4629#---------------------------------------------------------------------------
4630
4631class EraseEvent(Event):
093d3ff1 4632 """Proxy of C++ EraseEvent class"""
e811c8ce
RD
4633 def __repr__(self):
4634 return "<%s.%s; proxy of C++ wxEraseEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 4635 def __init__(self, *args, **kwargs):
a95a7133 4636 """__init__(self, int Id=0, DC dc=(wxDC *) NULL) -> EraseEvent"""
54f9ee45 4637 newobj = _core_.new_EraseEvent(*args, **kwargs)
d14a1e28
RD
4638 self.this = newobj.this
4639 self.thisown = 1
4640 del newobj.thisown
e811c8ce 4641 def GetDC(*args, **kwargs):
a95a7133 4642 """GetDC(self) -> DC"""
54f9ee45 4643 return _core_.EraseEvent_GetDC(*args, **kwargs)
e811c8ce 4644
d14a1e28
RD
4645
4646class EraseEventPtr(EraseEvent):
4647 def __init__(self, this):
4648 self.this = this
4649 if not hasattr(self,"thisown"): self.thisown = 0
4650 self.__class__ = EraseEvent
54f9ee45 4651_core_.EraseEvent_swigregister(EraseEventPtr)
d14a1e28
RD
4652
4653#---------------------------------------------------------------------------
4654
4655class FocusEvent(Event):
093d3ff1 4656 """Proxy of C++ FocusEvent class"""
e811c8ce
RD
4657 def __repr__(self):
4658 return "<%s.%s; proxy of C++ wxFocusEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 4659 def __init__(self, *args, **kwargs):
a95a7133 4660 """__init__(self, wxEventType type=wxEVT_NULL, int winid=0) -> FocusEvent"""
54f9ee45 4661 newobj = _core_.new_FocusEvent(*args, **kwargs)
d14a1e28
RD
4662 self.this = newobj.this
4663 self.thisown = 1
4664 del newobj.thisown
e811c8ce 4665 def GetWindow(*args, **kwargs):
a95a7133 4666 """GetWindow(self) -> Window"""
54f9ee45 4667 return _core_.FocusEvent_GetWindow(*args, **kwargs)
e811c8ce
RD
4668
4669 def SetWindow(*args, **kwargs):
a95a7133 4670 """SetWindow(self, Window win)"""
54f9ee45 4671 return _core_.FocusEvent_SetWindow(*args, **kwargs)
e811c8ce 4672
d14a1e28
RD
4673
4674class FocusEventPtr(FocusEvent):
4675 def __init__(self, this):
4676 self.this = this
4677 if not hasattr(self,"thisown"): self.thisown = 0
4678 self.__class__ = FocusEvent
54f9ee45 4679_core_.FocusEvent_swigregister(FocusEventPtr)
d14a1e28
RD
4680
4681#---------------------------------------------------------------------------
4682
4683class ChildFocusEvent(CommandEvent):
093d3ff1 4684 """Proxy of C++ ChildFocusEvent class"""
e811c8ce
RD
4685 def __repr__(self):
4686 return "<%s.%s; proxy of C++ wxChildFocusEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 4687 def __init__(self, *args, **kwargs):
a95a7133 4688 """__init__(self, Window win=None) -> ChildFocusEvent"""
54f9ee45 4689 newobj = _core_.new_ChildFocusEvent(*args, **kwargs)
d14a1e28
RD
4690 self.this = newobj.this
4691 self.thisown = 1
4692 del newobj.thisown
e811c8ce 4693 def GetWindow(*args, **kwargs):
a95a7133 4694 """GetWindow(self) -> Window"""
54f9ee45 4695 return _core_.ChildFocusEvent_GetWindow(*args, **kwargs)
e811c8ce 4696
d14a1e28
RD
4697
4698class ChildFocusEventPtr(ChildFocusEvent):
4699 def __init__(self, this):
4700 self.this = this
4701 if not hasattr(self,"thisown"): self.thisown = 0
4702 self.__class__ = ChildFocusEvent
54f9ee45 4703_core_.ChildFocusEvent_swigregister(ChildFocusEventPtr)
d14a1e28
RD
4704
4705#---------------------------------------------------------------------------
4706
4707class ActivateEvent(Event):
093d3ff1 4708 """Proxy of C++ ActivateEvent class"""
e811c8ce
RD
4709 def __repr__(self):
4710 return "<%s.%s; proxy of C++ wxActivateEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 4711 def __init__(self, *args, **kwargs):
a95a7133 4712 """__init__(self, wxEventType type=wxEVT_NULL, bool active=True, int Id=0) -> ActivateEvent"""
54f9ee45 4713 newobj = _core_.new_ActivateEvent(*args, **kwargs)
d14a1e28
RD
4714 self.this = newobj.this
4715 self.thisown = 1
4716 del newobj.thisown
e811c8ce 4717 def GetActive(*args, **kwargs):
a95a7133 4718 """GetActive(self) -> bool"""
54f9ee45 4719 return _core_.ActivateEvent_GetActive(*args, **kwargs)
e811c8ce 4720
d14a1e28
RD
4721
4722class ActivateEventPtr(ActivateEvent):
4723 def __init__(self, this):
4724 self.this = this
4725 if not hasattr(self,"thisown"): self.thisown = 0
4726 self.__class__ = ActivateEvent
54f9ee45 4727_core_.ActivateEvent_swigregister(ActivateEventPtr)
d14a1e28
RD
4728
4729#---------------------------------------------------------------------------
4730
4731class InitDialogEvent(Event):
093d3ff1 4732 """Proxy of C++ InitDialogEvent class"""
e811c8ce
RD
4733 def __repr__(self):
4734 return "<%s.%s; proxy of C++ wxInitDialogEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 4735 def __init__(self, *args, **kwargs):
a95a7133 4736 """__init__(self, int Id=0) -> InitDialogEvent"""
54f9ee45 4737 newobj = _core_.new_InitDialogEvent(*args, **kwargs)
d14a1e28
RD
4738 self.this = newobj.this
4739 self.thisown = 1
4740 del newobj.thisown
d14a1e28
RD
4741
4742class InitDialogEventPtr(InitDialogEvent):
4743 def __init__(self, this):
4744 self.this = this
4745 if not hasattr(self,"thisown"): self.thisown = 0
4746 self.__class__ = InitDialogEvent
54f9ee45 4747_core_.InitDialogEvent_swigregister(InitDialogEventPtr)
d14a1e28
RD
4748
4749#---------------------------------------------------------------------------
4750
4751class MenuEvent(Event):
093d3ff1 4752 """Proxy of C++ MenuEvent class"""
e811c8ce
RD
4753 def __repr__(self):
4754 return "<%s.%s; proxy of C++ wxMenuEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 4755 def __init__(self, *args, **kwargs):
a95a7133 4756 """__init__(self, wxEventType type=wxEVT_NULL, int winid=0, Menu menu=None) -> MenuEvent"""
54f9ee45 4757 newobj = _core_.new_MenuEvent(*args, **kwargs)
d14a1e28
RD
4758 self.this = newobj.this
4759 self.thisown = 1
4760 del newobj.thisown
e811c8ce 4761 def GetMenuId(*args, **kwargs):
a95a7133 4762 """GetMenuId(self) -> int"""
54f9ee45 4763 return _core_.MenuEvent_GetMenuId(*args, **kwargs)
e811c8ce
RD
4764
4765 def IsPopup(*args, **kwargs):
a95a7133 4766 """IsPopup(self) -> bool"""
54f9ee45 4767 return _core_.MenuEvent_IsPopup(*args, **kwargs)
e811c8ce
RD
4768
4769 def GetMenu(*args, **kwargs):
a95a7133 4770 """GetMenu(self) -> Menu"""
54f9ee45 4771 return _core_.MenuEvent_GetMenu(*args, **kwargs)
e811c8ce 4772
d14a1e28
RD
4773
4774class MenuEventPtr(MenuEvent):
4775 def __init__(self, this):
4776 self.this = this
4777 if not hasattr(self,"thisown"): self.thisown = 0
4778 self.__class__ = MenuEvent
54f9ee45 4779_core_.MenuEvent_swigregister(MenuEventPtr)
d14a1e28
RD
4780
4781#---------------------------------------------------------------------------
4782
4783class CloseEvent(Event):
093d3ff1 4784 """Proxy of C++ CloseEvent class"""
e811c8ce
RD
4785 def __repr__(self):
4786 return "<%s.%s; proxy of C++ wxCloseEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 4787 def __init__(self, *args, **kwargs):
a95a7133 4788 """__init__(self, wxEventType type=wxEVT_NULL, int winid=0) -> CloseEvent"""
54f9ee45 4789 newobj = _core_.new_CloseEvent(*args, **kwargs)
d14a1e28
RD
4790 self.this = newobj.this
4791 self.thisown = 1
4792 del newobj.thisown
e811c8ce 4793 def SetLoggingOff(*args, **kwargs):
a95a7133 4794 """SetLoggingOff(self, bool logOff)"""
54f9ee45 4795 return _core_.CloseEvent_SetLoggingOff(*args, **kwargs)
e811c8ce
RD
4796
4797 def GetLoggingOff(*args, **kwargs):
a95a7133 4798 """GetLoggingOff(self) -> bool"""
54f9ee45 4799 return _core_.CloseEvent_GetLoggingOff(*args, **kwargs)
e811c8ce
RD
4800
4801 def Veto(*args, **kwargs):
a95a7133 4802 """Veto(self, bool veto=True)"""
54f9ee45 4803 return _core_.CloseEvent_Veto(*args, **kwargs)
e811c8ce
RD
4804
4805 def SetCanVeto(*args, **kwargs):
a95a7133 4806 """SetCanVeto(self, bool canVeto)"""
54f9ee45 4807 return _core_.CloseEvent_SetCanVeto(*args, **kwargs)
e811c8ce
RD
4808
4809 def CanVeto(*args, **kwargs):
a95a7133 4810 """CanVeto(self) -> bool"""
54f9ee45 4811 return _core_.CloseEvent_CanVeto(*args, **kwargs)
e811c8ce
RD
4812
4813 def GetVeto(*args, **kwargs):
a95a7133 4814 """GetVeto(self) -> bool"""
54f9ee45 4815 return _core_.CloseEvent_GetVeto(*args, **kwargs)
e811c8ce 4816
d14a1e28
RD
4817
4818class CloseEventPtr(CloseEvent):
4819 def __init__(self, this):
4820 self.this = this
4821 if not hasattr(self,"thisown"): self.thisown = 0
4822 self.__class__ = CloseEvent
54f9ee45 4823_core_.CloseEvent_swigregister(CloseEventPtr)
d14a1e28
RD
4824
4825#---------------------------------------------------------------------------
4826
4827class ShowEvent(Event):
093d3ff1 4828 """Proxy of C++ ShowEvent class"""
e811c8ce
RD
4829 def __repr__(self):
4830 return "<%s.%s; proxy of C++ wxShowEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 4831 def __init__(self, *args, **kwargs):
a95a7133 4832 """__init__(self, int winid=0, bool show=False) -> ShowEvent"""
54f9ee45 4833 newobj = _core_.new_ShowEvent(*args, **kwargs)
d14a1e28
RD
4834 self.this = newobj.this
4835 self.thisown = 1
4836 del newobj.thisown
e811c8ce 4837 def SetShow(*args, **kwargs):
a95a7133 4838 """SetShow(self, bool show)"""
54f9ee45 4839 return _core_.ShowEvent_SetShow(*args, **kwargs)
e811c8ce
RD
4840
4841 def GetShow(*args, **kwargs):
a95a7133 4842 """GetShow(self) -> bool"""
54f9ee45 4843 return _core_.ShowEvent_GetShow(*args, **kwargs)
e811c8ce 4844
d14a1e28
RD
4845
4846class ShowEventPtr(ShowEvent):
4847 def __init__(self, this):
4848 self.this = this
4849 if not hasattr(self,"thisown"): self.thisown = 0
4850 self.__class__ = ShowEvent
54f9ee45 4851_core_.ShowEvent_swigregister(ShowEventPtr)
d14a1e28
RD
4852
4853#---------------------------------------------------------------------------
4854
4855class IconizeEvent(Event):
093d3ff1 4856 """Proxy of C++ IconizeEvent class"""
e811c8ce
RD
4857 def __repr__(self):
4858 return "<%s.%s; proxy of C++ wxIconizeEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 4859 def __init__(self, *args, **kwargs):
a95a7133 4860 """__init__(self, int id=0, bool iconized=True) -> IconizeEvent"""
54f9ee45 4861 newobj = _core_.new_IconizeEvent(*args, **kwargs)
d14a1e28
RD
4862 self.this = newobj.this
4863 self.thisown = 1
4864 del newobj.thisown
e811c8ce 4865 def Iconized(*args, **kwargs):
a95a7133 4866 """Iconized(self) -> bool"""
54f9ee45 4867 return _core_.IconizeEvent_Iconized(*args, **kwargs)
e811c8ce 4868
d14a1e28
RD
4869
4870class IconizeEventPtr(IconizeEvent):
4871 def __init__(self, this):
4872 self.this = this
4873 if not hasattr(self,"thisown"): self.thisown = 0
4874 self.__class__ = IconizeEvent
54f9ee45 4875_core_.IconizeEvent_swigregister(IconizeEventPtr)
d14a1e28
RD
4876
4877#---------------------------------------------------------------------------
4878
4879class MaximizeEvent(Event):
093d3ff1 4880 """Proxy of C++ MaximizeEvent class"""
e811c8ce
RD
4881 def __repr__(self):
4882 return "<%s.%s; proxy of C++ wxMaximizeEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 4883 def __init__(self, *args, **kwargs):
a95a7133 4884 """__init__(self, int id=0) -> MaximizeEvent"""
54f9ee45 4885 newobj = _core_.new_MaximizeEvent(*args, **kwargs)
d14a1e28
RD
4886 self.this = newobj.this
4887 self.thisown = 1
4888 del newobj.thisown
d14a1e28
RD
4889
4890class MaximizeEventPtr(MaximizeEvent):
4891 def __init__(self, this):
4892 self.this = this
4893 if not hasattr(self,"thisown"): self.thisown = 0
4894 self.__class__ = MaximizeEvent
54f9ee45 4895_core_.MaximizeEvent_swigregister(MaximizeEventPtr)
d14a1e28
RD
4896
4897#---------------------------------------------------------------------------
4898
4899class DropFilesEvent(Event):
093d3ff1 4900 """Proxy of C++ DropFilesEvent class"""
d14a1e28
RD
4901 def __init__(self): raise RuntimeError, "No constructor defined"
4902 def __repr__(self):
4903 return "<%s.%s; proxy of C++ wxDropFilesEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
e811c8ce 4904 def GetPosition(*args, **kwargs):
a95a7133 4905 """GetPosition(self) -> Point"""
54f9ee45 4906 return _core_.DropFilesEvent_GetPosition(*args, **kwargs)
e811c8ce
RD
4907
4908 def GetNumberOfFiles(*args, **kwargs):
a95a7133 4909 """GetNumberOfFiles(self) -> int"""
54f9ee45 4910 return _core_.DropFilesEvent_GetNumberOfFiles(*args, **kwargs)
e811c8ce
RD
4911
4912 def GetFiles(*args, **kwargs):
a95a7133 4913 """GetFiles(self) -> PyObject"""
54f9ee45 4914 return _core_.DropFilesEvent_GetFiles(*args, **kwargs)
e811c8ce 4915
d14a1e28
RD
4916
4917class DropFilesEventPtr(DropFilesEvent):
4918 def __init__(self, this):
4919 self.this = this
4920 if not hasattr(self,"thisown"): self.thisown = 0
4921 self.__class__ = DropFilesEvent
54f9ee45 4922_core_.DropFilesEvent_swigregister(DropFilesEventPtr)
d14a1e28
RD
4923
4924#---------------------------------------------------------------------------
4925
54f9ee45
RD
4926UPDATE_UI_PROCESS_ALL = _core_.UPDATE_UI_PROCESS_ALL
4927UPDATE_UI_PROCESS_SPECIFIED = _core_.UPDATE_UI_PROCESS_SPECIFIED
d14a1e28 4928class UpdateUIEvent(CommandEvent):
093d3ff1 4929 """Proxy of C++ UpdateUIEvent class"""
e811c8ce
RD
4930 def __repr__(self):
4931 return "<%s.%s; proxy of C++ wxUpdateUIEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 4932 def __init__(self, *args, **kwargs):
a95a7133 4933 """__init__(self, int commandId=0) -> UpdateUIEvent"""
54f9ee45 4934 newobj = _core_.new_UpdateUIEvent(*args, **kwargs)
d14a1e28
RD
4935 self.this = newobj.this
4936 self.thisown = 1
4937 del newobj.thisown
e811c8ce 4938 def GetChecked(*args, **kwargs):
a95a7133 4939 """GetChecked(self) -> bool"""
54f9ee45 4940 return _core_.UpdateUIEvent_GetChecked(*args, **kwargs)
e811c8ce
RD
4941
4942 def GetEnabled(*args, **kwargs):
a95a7133 4943 """GetEnabled(self) -> bool"""
54f9ee45 4944 return _core_.UpdateUIEvent_GetEnabled(*args, **kwargs)
e811c8ce
RD
4945
4946 def GetText(*args, **kwargs):
a95a7133 4947 """GetText(self) -> String"""
54f9ee45 4948 return _core_.UpdateUIEvent_GetText(*args, **kwargs)
e811c8ce
RD
4949
4950 def GetSetText(*args, **kwargs):
a95a7133 4951 """GetSetText(self) -> bool"""
54f9ee45 4952 return _core_.UpdateUIEvent_GetSetText(*args, **kwargs)
e811c8ce
RD
4953
4954 def GetSetChecked(*args, **kwargs):
a95a7133 4955 """GetSetChecked(self) -> bool"""
54f9ee45 4956 return _core_.UpdateUIEvent_GetSetChecked(*args, **kwargs)
e811c8ce
RD
4957
4958 def GetSetEnabled(*args, **kwargs):
a95a7133 4959 """GetSetEnabled(self) -> bool"""
54f9ee45 4960 return _core_.UpdateUIEvent_GetSetEnabled(*args, **kwargs)
e811c8ce
RD
4961
4962 def Check(*args, **kwargs):
a95a7133 4963 """Check(self, bool check)"""
54f9ee45 4964 return _core_.UpdateUIEvent_Check(*args, **kwargs)
e811c8ce
RD
4965
4966 def Enable(*args, **kwargs):
a95a7133 4967 """Enable(self, bool enable)"""
54f9ee45 4968 return _core_.UpdateUIEvent_Enable(*args, **kwargs)
e811c8ce
RD
4969
4970 def SetText(*args, **kwargs):
a95a7133 4971 """SetText(self, String text)"""
54f9ee45 4972 return _core_.UpdateUIEvent_SetText(*args, **kwargs)
e811c8ce
RD
4973
4974 def SetUpdateInterval(*args, **kwargs):
66c033b4 4975 """SetUpdateInterval(long updateInterval)"""
54f9ee45 4976 return _core_.UpdateUIEvent_SetUpdateInterval(*args, **kwargs)
e811c8ce
RD
4977
4978 SetUpdateInterval = staticmethod(SetUpdateInterval)
4979 def GetUpdateInterval(*args, **kwargs):
66c033b4 4980 """GetUpdateInterval() -> long"""
54f9ee45 4981 return _core_.UpdateUIEvent_GetUpdateInterval(*args, **kwargs)
e811c8ce
RD
4982
4983 GetUpdateInterval = staticmethod(GetUpdateInterval)
4984 def CanUpdate(*args, **kwargs):
66c033b4 4985 """CanUpdate(Window win) -> bool"""
54f9ee45 4986 return _core_.UpdateUIEvent_CanUpdate(*args, **kwargs)
e811c8ce
RD
4987
4988 CanUpdate = staticmethod(CanUpdate)
4989 def ResetUpdateTime(*args, **kwargs):
66c033b4 4990 """ResetUpdateTime()"""
54f9ee45 4991 return _core_.UpdateUIEvent_ResetUpdateTime(*args, **kwargs)
e811c8ce
RD
4992
4993 ResetUpdateTime = staticmethod(ResetUpdateTime)
4994 def SetMode(*args, **kwargs):
66c033b4 4995 """SetMode(int mode)"""
54f9ee45 4996 return _core_.UpdateUIEvent_SetMode(*args, **kwargs)
e811c8ce
RD
4997
4998 SetMode = staticmethod(SetMode)
4999 def GetMode(*args, **kwargs):
66c033b4 5000 """GetMode() -> int"""
54f9ee45 5001 return _core_.UpdateUIEvent_GetMode(*args, **kwargs)
e811c8ce
RD
5002
5003 GetMode = staticmethod(GetMode)
d14a1e28
RD
5004
5005class UpdateUIEventPtr(UpdateUIEvent):
5006 def __init__(self, this):
5007 self.this = this
5008 if not hasattr(self,"thisown"): self.thisown = 0
5009 self.__class__ = UpdateUIEvent
54f9ee45 5010_core_.UpdateUIEvent_swigregister(UpdateUIEventPtr)
d14a1e28 5011
e811c8ce
RD
5012def UpdateUIEvent_SetUpdateInterval(*args, **kwargs):
5013 """UpdateUIEvent_SetUpdateInterval(long updateInterval)"""
54f9ee45 5014 return _core_.UpdateUIEvent_SetUpdateInterval(*args, **kwargs)
d14a1e28 5015
e811c8ce
RD
5016def UpdateUIEvent_GetUpdateInterval(*args, **kwargs):
5017 """UpdateUIEvent_GetUpdateInterval() -> long"""
54f9ee45 5018 return _core_.UpdateUIEvent_GetUpdateInterval(*args, **kwargs)
d14a1e28 5019
e811c8ce
RD
5020def UpdateUIEvent_CanUpdate(*args, **kwargs):
5021 """UpdateUIEvent_CanUpdate(Window win) -> bool"""
54f9ee45 5022 return _core_.UpdateUIEvent_CanUpdate(*args, **kwargs)
d14a1e28 5023
e811c8ce
RD
5024def UpdateUIEvent_ResetUpdateTime(*args, **kwargs):
5025 """UpdateUIEvent_ResetUpdateTime()"""
54f9ee45 5026 return _core_.UpdateUIEvent_ResetUpdateTime(*args, **kwargs)
d14a1e28 5027
e811c8ce 5028def UpdateUIEvent_SetMode(*args, **kwargs):
196addbf 5029 """UpdateUIEvent_SetMode(int mode)"""
54f9ee45 5030 return _core_.UpdateUIEvent_SetMode(*args, **kwargs)
d14a1e28 5031
e811c8ce 5032def UpdateUIEvent_GetMode(*args, **kwargs):
196addbf 5033 """UpdateUIEvent_GetMode() -> int"""
54f9ee45 5034 return _core_.UpdateUIEvent_GetMode(*args, **kwargs)
d14a1e28
RD
5035
5036#---------------------------------------------------------------------------
5037
5038class SysColourChangedEvent(Event):
093d3ff1 5039 """Proxy of C++ SysColourChangedEvent class"""
e811c8ce
RD
5040 def __repr__(self):
5041 return "<%s.%s; proxy of C++ wxSysColourChangedEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 5042 def __init__(self, *args, **kwargs):
a95a7133 5043 """__init__(self) -> SysColourChangedEvent"""
54f9ee45 5044 newobj = _core_.new_SysColourChangedEvent(*args, **kwargs)
d14a1e28
RD
5045 self.this = newobj.this
5046 self.thisown = 1
5047 del newobj.thisown
d14a1e28
RD
5048
5049class SysColourChangedEventPtr(SysColourChangedEvent):
5050 def __init__(self, this):
5051 self.this = this
5052 if not hasattr(self,"thisown"): self.thisown = 0
5053 self.__class__ = SysColourChangedEvent
54f9ee45 5054_core_.SysColourChangedEvent_swigregister(SysColourChangedEventPtr)
d14a1e28
RD
5055
5056#---------------------------------------------------------------------------
5057
5058class MouseCaptureChangedEvent(Event):
093d3ff1 5059 """Proxy of C++ MouseCaptureChangedEvent class"""
e811c8ce
RD
5060 def __repr__(self):
5061 return "<%s.%s; proxy of C++ wxMouseCaptureChangedEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 5062 def __init__(self, *args, **kwargs):
a95a7133 5063 """__init__(self, int winid=0, Window gainedCapture=None) -> MouseCaptureChangedEvent"""
54f9ee45 5064 newobj = _core_.new_MouseCaptureChangedEvent(*args, **kwargs)
d14a1e28
RD
5065 self.this = newobj.this
5066 self.thisown = 1
5067 del newobj.thisown
e811c8ce 5068 def GetCapturedWindow(*args, **kwargs):
a95a7133 5069 """GetCapturedWindow(self) -> Window"""
54f9ee45 5070 return _core_.MouseCaptureChangedEvent_GetCapturedWindow(*args, **kwargs)
e811c8ce 5071
d14a1e28
RD
5072
5073class MouseCaptureChangedEventPtr(MouseCaptureChangedEvent):
5074 def __init__(self, this):
5075 self.this = this
5076 if not hasattr(self,"thisown"): self.thisown = 0
5077 self.__class__ = MouseCaptureChangedEvent
54f9ee45 5078_core_.MouseCaptureChangedEvent_swigregister(MouseCaptureChangedEventPtr)
d14a1e28
RD
5079
5080#---------------------------------------------------------------------------
5081
5082class DisplayChangedEvent(Event):
093d3ff1 5083 """Proxy of C++ DisplayChangedEvent class"""
e811c8ce
RD
5084 def __repr__(self):
5085 return "<%s.%s; proxy of C++ wxDisplayChangedEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 5086 def __init__(self, *args, **kwargs):
a95a7133 5087 """__init__(self) -> DisplayChangedEvent"""
54f9ee45 5088 newobj = _core_.new_DisplayChangedEvent(*args, **kwargs)
d14a1e28
RD
5089 self.this = newobj.this
5090 self.thisown = 1
5091 del newobj.thisown
d14a1e28
RD
5092
5093class DisplayChangedEventPtr(DisplayChangedEvent):
5094 def __init__(self, this):
5095 self.this = this
5096 if not hasattr(self,"thisown"): self.thisown = 0
5097 self.__class__ = DisplayChangedEvent
54f9ee45 5098_core_.DisplayChangedEvent_swigregister(DisplayChangedEventPtr)
d14a1e28
RD
5099
5100#---------------------------------------------------------------------------
5101
5102class PaletteChangedEvent(Event):
093d3ff1 5103 """Proxy of C++ PaletteChangedEvent class"""
e811c8ce
RD
5104 def __repr__(self):
5105 return "<%s.%s; proxy of C++ wxPaletteChangedEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 5106 def __init__(self, *args, **kwargs):
a95a7133 5107 """__init__(self, int id=0) -> PaletteChangedEvent"""
54f9ee45 5108 newobj = _core_.new_PaletteChangedEvent(*args, **kwargs)
d14a1e28
RD
5109 self.this = newobj.this
5110 self.thisown = 1
5111 del newobj.thisown
e811c8ce 5112 def SetChangedWindow(*args, **kwargs):
a95a7133 5113 """SetChangedWindow(self, Window win)"""
54f9ee45 5114 return _core_.PaletteChangedEvent_SetChangedWindow(*args, **kwargs)
e811c8ce
RD
5115
5116 def GetChangedWindow(*args, **kwargs):
a95a7133 5117 """GetChangedWindow(self) -> Window"""
54f9ee45 5118 return _core_.PaletteChangedEvent_GetChangedWindow(*args, **kwargs)
e811c8ce 5119
d14a1e28
RD
5120
5121class PaletteChangedEventPtr(PaletteChangedEvent):
5122 def __init__(self, this):
5123 self.this = this
5124 if not hasattr(self,"thisown"): self.thisown = 0
5125 self.__class__ = PaletteChangedEvent
54f9ee45 5126_core_.PaletteChangedEvent_swigregister(PaletteChangedEventPtr)
d14a1e28
RD
5127
5128#---------------------------------------------------------------------------
5129
5130class QueryNewPaletteEvent(Event):
093d3ff1 5131 """Proxy of C++ QueryNewPaletteEvent class"""
e811c8ce
RD
5132 def __repr__(self):
5133 return "<%s.%s; proxy of C++ wxQueryNewPaletteEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 5134 def __init__(self, *args, **kwargs):
a95a7133 5135 """__init__(self, int winid=0) -> QueryNewPaletteEvent"""
54f9ee45 5136 newobj = _core_.new_QueryNewPaletteEvent(*args, **kwargs)
d14a1e28
RD
5137 self.this = newobj.this
5138 self.thisown = 1
5139 del newobj.thisown
e811c8ce 5140 def SetPaletteRealized(*args, **kwargs):
a95a7133 5141 """SetPaletteRealized(self, bool realized)"""
54f9ee45 5142 return _core_.QueryNewPaletteEvent_SetPaletteRealized(*args, **kwargs)
e811c8ce
RD
5143
5144 def GetPaletteRealized(*args, **kwargs):
a95a7133 5145 """GetPaletteRealized(self) -> bool"""
54f9ee45 5146 return _core_.QueryNewPaletteEvent_GetPaletteRealized(*args, **kwargs)
e811c8ce 5147
d14a1e28
RD
5148
5149class QueryNewPaletteEventPtr(QueryNewPaletteEvent):
5150 def __init__(self, this):
5151 self.this = this
5152 if not hasattr(self,"thisown"): self.thisown = 0
5153 self.__class__ = QueryNewPaletteEvent
54f9ee45 5154_core_.QueryNewPaletteEvent_swigregister(QueryNewPaletteEventPtr)
d14a1e28
RD
5155
5156#---------------------------------------------------------------------------
5157
5158class NavigationKeyEvent(Event):
093d3ff1 5159 """Proxy of C++ NavigationKeyEvent class"""
e811c8ce
RD
5160 def __repr__(self):
5161 return "<%s.%s; proxy of C++ wxNavigationKeyEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 5162 def __init__(self, *args, **kwargs):
a95a7133 5163 """__init__(self) -> NavigationKeyEvent"""
54f9ee45 5164 newobj = _core_.new_NavigationKeyEvent(*args, **kwargs)
d14a1e28
RD
5165 self.this = newobj.this
5166 self.thisown = 1
5167 del newobj.thisown
e811c8ce 5168 def GetDirection(*args, **kwargs):
a95a7133 5169 """GetDirection(self) -> bool"""
54f9ee45 5170 return _core_.NavigationKeyEvent_GetDirection(*args, **kwargs)
e811c8ce
RD
5171
5172 def SetDirection(*args, **kwargs):
908b74cd 5173 """SetDirection(self, bool forward)"""
54f9ee45 5174 return _core_.NavigationKeyEvent_SetDirection(*args, **kwargs)
e811c8ce
RD
5175
5176 def IsWindowChange(*args, **kwargs):
a95a7133 5177 """IsWindowChange(self) -> bool"""
54f9ee45 5178 return _core_.NavigationKeyEvent_IsWindowChange(*args, **kwargs)
e811c8ce
RD
5179
5180 def SetWindowChange(*args, **kwargs):
908b74cd 5181 """SetWindowChange(self, bool ischange)"""
54f9ee45 5182 return _core_.NavigationKeyEvent_SetWindowChange(*args, **kwargs)
e811c8ce 5183
68350608
RD
5184 def IsFromTab(*args, **kwargs):
5185 """IsFromTab(self) -> bool"""
5186 return _core_.NavigationKeyEvent_IsFromTab(*args, **kwargs)
5187
5188 def SetFromTab(*args, **kwargs):
5189 """SetFromTab(self, bool bIs)"""
5190 return _core_.NavigationKeyEvent_SetFromTab(*args, **kwargs)
5191
908b74cd
RD
5192 def SetFlags(*args, **kwargs):
5193 """SetFlags(self, long flags)"""
5194 return _core_.NavigationKeyEvent_SetFlags(*args, **kwargs)
5195
e811c8ce 5196 def GetCurrentFocus(*args, **kwargs):
a95a7133 5197 """GetCurrentFocus(self) -> Window"""
54f9ee45 5198 return _core_.NavigationKeyEvent_GetCurrentFocus(*args, **kwargs)
e811c8ce
RD
5199
5200 def SetCurrentFocus(*args, **kwargs):
a95a7133 5201 """SetCurrentFocus(self, Window win)"""
54f9ee45 5202 return _core_.NavigationKeyEvent_SetCurrentFocus(*args, **kwargs)
e811c8ce 5203
b0f7404b 5204 IsBackward = _core_.NavigationKeyEvent_IsBackward
908b74cd
RD
5205 IsForward = _core_.NavigationKeyEvent_IsForward
5206 WinChange = _core_.NavigationKeyEvent_WinChange
68350608 5207 FromTab = _core_.NavigationKeyEvent_FromTab
d14a1e28
RD
5208
5209class NavigationKeyEventPtr(NavigationKeyEvent):
5210 def __init__(self, this):
5211 self.this = this
5212 if not hasattr(self,"thisown"): self.thisown = 0
5213 self.__class__ = NavigationKeyEvent
54f9ee45 5214_core_.NavigationKeyEvent_swigregister(NavigationKeyEventPtr)
d14a1e28
RD
5215
5216#---------------------------------------------------------------------------
5217
5218class WindowCreateEvent(CommandEvent):
093d3ff1 5219 """Proxy of C++ WindowCreateEvent class"""
e811c8ce
RD
5220 def __repr__(self):
5221 return "<%s.%s; proxy of C++ wxWindowCreateEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 5222 def __init__(self, *args, **kwargs):
a95a7133 5223 """__init__(self, Window win=None) -> WindowCreateEvent"""
54f9ee45 5224 newobj = _core_.new_WindowCreateEvent(*args, **kwargs)
d14a1e28
RD
5225 self.this = newobj.this
5226 self.thisown = 1
5227 del newobj.thisown
e811c8ce 5228 def GetWindow(*args, **kwargs):
a95a7133 5229 """GetWindow(self) -> Window"""
54f9ee45 5230 return _core_.WindowCreateEvent_GetWindow(*args, **kwargs)
e811c8ce 5231
d14a1e28
RD
5232
5233class WindowCreateEventPtr(WindowCreateEvent):
5234 def __init__(self, this):
5235 self.this = this
5236 if not hasattr(self,"thisown"): self.thisown = 0
5237 self.__class__ = WindowCreateEvent
54f9ee45 5238_core_.WindowCreateEvent_swigregister(WindowCreateEventPtr)
d14a1e28
RD
5239
5240class WindowDestroyEvent(CommandEvent):
093d3ff1 5241 """Proxy of C++ WindowDestroyEvent class"""
e811c8ce
RD
5242 def __repr__(self):
5243 return "<%s.%s; proxy of C++ wxWindowDestroyEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 5244 def __init__(self, *args, **kwargs):
a95a7133 5245 """__init__(self, Window win=None) -> WindowDestroyEvent"""
54f9ee45 5246 newobj = _core_.new_WindowDestroyEvent(*args, **kwargs)
d14a1e28
RD
5247 self.this = newobj.this
5248 self.thisown = 1
5249 del newobj.thisown
e811c8ce 5250 def GetWindow(*args, **kwargs):
a95a7133 5251 """GetWindow(self) -> Window"""
54f9ee45 5252 return _core_.WindowDestroyEvent_GetWindow(*args, **kwargs)
e811c8ce 5253
d14a1e28
RD
5254
5255class WindowDestroyEventPtr(WindowDestroyEvent):
5256 def __init__(self, this):
5257 self.this = this
5258 if not hasattr(self,"thisown"): self.thisown = 0
5259 self.__class__ = WindowDestroyEvent
54f9ee45 5260_core_.WindowDestroyEvent_swigregister(WindowDestroyEventPtr)
d14a1e28
RD
5261
5262#---------------------------------------------------------------------------
5263
5264class ContextMenuEvent(CommandEvent):
093d3ff1 5265 """Proxy of C++ ContextMenuEvent class"""
e811c8ce
RD
5266 def __repr__(self):
5267 return "<%s.%s; proxy of C++ wxContextMenuEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 5268 def __init__(self, *args, **kwargs):
a95a7133 5269 """__init__(self, wxEventType type=wxEVT_NULL, int winid=0, Point pt=DefaultPosition) -> ContextMenuEvent"""
54f9ee45 5270 newobj = _core_.new_ContextMenuEvent(*args, **kwargs)
d14a1e28
RD
5271 self.this = newobj.this
5272 self.thisown = 1
5273 del newobj.thisown
e811c8ce 5274 def GetPosition(*args, **kwargs):
a95a7133 5275 """GetPosition(self) -> Point"""
54f9ee45 5276 return _core_.ContextMenuEvent_GetPosition(*args, **kwargs)
e811c8ce
RD
5277
5278 def SetPosition(*args, **kwargs):
a95a7133 5279 """SetPosition(self, Point pos)"""
54f9ee45 5280 return _core_.ContextMenuEvent_SetPosition(*args, **kwargs)
e811c8ce 5281
d14a1e28
RD
5282
5283class ContextMenuEventPtr(ContextMenuEvent):
5284 def __init__(self, this):
5285 self.this = this
5286 if not hasattr(self,"thisown"): self.thisown = 0
5287 self.__class__ = ContextMenuEvent
54f9ee45 5288_core_.ContextMenuEvent_swigregister(ContextMenuEventPtr)
d14a1e28
RD
5289
5290#---------------------------------------------------------------------------
5291
54f9ee45
RD
5292IDLE_PROCESS_ALL = _core_.IDLE_PROCESS_ALL
5293IDLE_PROCESS_SPECIFIED = _core_.IDLE_PROCESS_SPECIFIED
d14a1e28 5294class IdleEvent(Event):
093d3ff1 5295 """Proxy of C++ IdleEvent class"""
e811c8ce
RD
5296 def __repr__(self):
5297 return "<%s.%s; proxy of C++ wxIdleEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 5298 def __init__(self, *args, **kwargs):
a95a7133 5299 """__init__(self) -> IdleEvent"""
54f9ee45 5300 newobj = _core_.new_IdleEvent(*args, **kwargs)
d14a1e28
RD
5301 self.this = newobj.this
5302 self.thisown = 1
5303 del newobj.thisown
e811c8ce 5304 def RequestMore(*args, **kwargs):
a95a7133 5305 """RequestMore(self, bool needMore=True)"""
54f9ee45 5306 return _core_.IdleEvent_RequestMore(*args, **kwargs)
e811c8ce
RD
5307
5308 def MoreRequested(*args, **kwargs):
a95a7133 5309 """MoreRequested(self) -> bool"""
54f9ee45 5310 return _core_.IdleEvent_MoreRequested(*args, **kwargs)
e811c8ce
RD
5311
5312 def SetMode(*args, **kwargs):
66c033b4 5313 """SetMode(int mode)"""
54f9ee45 5314 return _core_.IdleEvent_SetMode(*args, **kwargs)
e811c8ce
RD
5315
5316 SetMode = staticmethod(SetMode)
5317 def GetMode(*args, **kwargs):
66c033b4 5318 """GetMode() -> int"""
54f9ee45 5319 return _core_.IdleEvent_GetMode(*args, **kwargs)
e811c8ce
RD
5320
5321 GetMode = staticmethod(GetMode)
5322 def CanSend(*args, **kwargs):
66c033b4 5323 """CanSend(Window win) -> bool"""
54f9ee45 5324 return _core_.IdleEvent_CanSend(*args, **kwargs)
e811c8ce
RD
5325
5326 CanSend = staticmethod(CanSend)
d14a1e28
RD
5327
5328class IdleEventPtr(IdleEvent):
5329 def __init__(self, this):
5330 self.this = this
5331 if not hasattr(self,"thisown"): self.thisown = 0
5332 self.__class__ = IdleEvent
54f9ee45 5333_core_.IdleEvent_swigregister(IdleEventPtr)
d14a1e28 5334
e811c8ce 5335def IdleEvent_SetMode(*args, **kwargs):
196addbf 5336 """IdleEvent_SetMode(int mode)"""
54f9ee45 5337 return _core_.IdleEvent_SetMode(*args, **kwargs)
d14a1e28 5338
e811c8ce 5339def IdleEvent_GetMode(*args, **kwargs):
196addbf 5340 """IdleEvent_GetMode() -> int"""
54f9ee45 5341 return _core_.IdleEvent_GetMode(*args, **kwargs)
d14a1e28 5342
e811c8ce
RD
5343def IdleEvent_CanSend(*args, **kwargs):
5344 """IdleEvent_CanSend(Window win) -> bool"""
54f9ee45 5345 return _core_.IdleEvent_CanSend(*args, **kwargs)
d14a1e28
RD
5346
5347#---------------------------------------------------------------------------
5348
5349class PyEvent(Event):
093d3ff1 5350 """Proxy of C++ PyEvent class"""
e811c8ce
RD
5351 def __repr__(self):
5352 return "<%s.%s; proxy of C++ wxPyEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 5353 def __init__(self, *args, **kwargs):
a95a7133 5354 """__init__(self, int winid=0, wxEventType commandType=wxEVT_NULL) -> PyEvent"""
54f9ee45 5355 newobj = _core_.new_PyEvent(*args, **kwargs)
d14a1e28
RD
5356 self.this = newobj.this
5357 self.thisown = 1
5358 del newobj.thisown
5359 self.SetSelf(self)
e811c8ce 5360
54f9ee45 5361 def __del__(self, destroy=_core_.delete_PyEvent):
a95a7133 5362 """__del__(self)"""
d14a1e28
RD
5363 try:
5364 if self.thisown: destroy(self)
5365 except: pass
e811c8ce
RD
5366
5367 def SetSelf(*args, **kwargs):
a95a7133 5368 """SetSelf(self, PyObject self)"""
54f9ee45 5369 return _core_.PyEvent_SetSelf(*args, **kwargs)
e811c8ce
RD
5370
5371 def GetSelf(*args, **kwargs):
a95a7133 5372 """GetSelf(self) -> PyObject"""
54f9ee45 5373 return _core_.PyEvent_GetSelf(*args, **kwargs)
e811c8ce 5374
d14a1e28
RD
5375
5376class PyEventPtr(PyEvent):
5377 def __init__(self, this):
5378 self.this = this
5379 if not hasattr(self,"thisown"): self.thisown = 0
5380 self.__class__ = PyEvent
54f9ee45 5381_core_.PyEvent_swigregister(PyEventPtr)
d14a1e28
RD
5382
5383class PyCommandEvent(CommandEvent):
093d3ff1 5384 """Proxy of C++ PyCommandEvent class"""
e811c8ce
RD
5385 def __repr__(self):
5386 return "<%s.%s; proxy of C++ wxPyCommandEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 5387 def __init__(self, *args, **kwargs):
a95a7133 5388 """__init__(self, wxEventType commandType=wxEVT_NULL, int id=0) -> PyCommandEvent"""
54f9ee45 5389 newobj = _core_.new_PyCommandEvent(*args, **kwargs)
d14a1e28
RD
5390 self.this = newobj.this
5391 self.thisown = 1
5392 del newobj.thisown
5393 self.SetSelf(self)
e811c8ce 5394
54f9ee45 5395 def __del__(self, destroy=_core_.delete_PyCommandEvent):
a95a7133 5396 """__del__(self)"""
d14a1e28
RD
5397 try:
5398 if self.thisown: destroy(self)
5399 except: pass
e811c8ce
RD
5400
5401 def SetSelf(*args, **kwargs):
a95a7133 5402 """SetSelf(self, PyObject self)"""
54f9ee45 5403 return _core_.PyCommandEvent_SetSelf(*args, **kwargs)
e811c8ce
RD
5404
5405 def GetSelf(*args, **kwargs):
a95a7133 5406 """GetSelf(self) -> PyObject"""
54f9ee45 5407 return _core_.PyCommandEvent_GetSelf(*args, **kwargs)
e811c8ce 5408
d14a1e28
RD
5409
5410class PyCommandEventPtr(PyCommandEvent):
5411 def __init__(self, this):
5412 self.this = this
5413 if not hasattr(self,"thisown"): self.thisown = 0
5414 self.__class__ = PyCommandEvent
54f9ee45 5415_core_.PyCommandEvent_swigregister(PyCommandEventPtr)
d14a1e28 5416
53aa7709
RD
5417class DateEvent(CommandEvent):
5418 """Proxy of C++ DateEvent class"""
5419 def __repr__(self):
5420 return "<%s.%s; proxy of C++ wxDateEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
5421 def __init__(self, *args, **kwargs):
5422 """__init__(self, Window win, DateTime dt, wxEventType type) -> DateEvent"""
5423 newobj = _core_.new_DateEvent(*args, **kwargs)
5424 self.this = newobj.this
5425 self.thisown = 1
5426 del newobj.thisown
5427 def GetDate(*args, **kwargs):
5428 """GetDate(self) -> DateTime"""
5429 return _core_.DateEvent_GetDate(*args, **kwargs)
5430
5431 def SetDate(*args, **kwargs):
5432 """SetDate(self, DateTime date)"""
5433 return _core_.DateEvent_SetDate(*args, **kwargs)
5434
5435
5436class DateEventPtr(DateEvent):
5437 def __init__(self, this):
5438 self.this = this
5439 if not hasattr(self,"thisown"): self.thisown = 0
5440 self.__class__ = DateEvent
5441_core_.DateEvent_swigregister(DateEventPtr)
5442
5443wxEVT_DATE_CHANGED = _core_.wxEVT_DATE_CHANGED
5444EVT_DATE_CHANGED = wx.PyEventBinder( wxEVT_DATE_CHANGED, 1 )
5445
d14a1e28
RD
5446#---------------------------------------------------------------------------
5447
54f9ee45
RD
5448PYAPP_ASSERT_SUPPRESS = _core_.PYAPP_ASSERT_SUPPRESS
5449PYAPP_ASSERT_EXCEPTION = _core_.PYAPP_ASSERT_EXCEPTION
5450PYAPP_ASSERT_DIALOG = _core_.PYAPP_ASSERT_DIALOG
5451PYAPP_ASSERT_LOG = _core_.PYAPP_ASSERT_LOG
5452PRINT_WINDOWS = _core_.PRINT_WINDOWS
5453PRINT_POSTSCRIPT = _core_.PRINT_POSTSCRIPT
d14a1e28 5454class PyApp(EvtHandler):
66c033b4
RD
5455 """
5456 The ``wx.PyApp`` class is an *implementation detail*, please use the
5457 `wx.App` class (or some other derived class) instead.
5458 """
e811c8ce
RD
5459 def __repr__(self):
5460 return "<%s.%s; proxy of C++ wxPyApp instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 5461 def __init__(self, *args, **kwargs):
98e665d3 5462 """
a95a7133 5463 __init__(self) -> PyApp
98e665d3
RD
5464
5465 Create a new application object, starting the bootstrap process.
5466 """
54f9ee45 5467 newobj = _core_.new_PyApp(*args, **kwargs)
d14a1e28
RD
5468 self.this = newobj.this
5469 self.thisown = 1
5470 del newobj.thisown
70b7a5fe
RD
5471 self._setCallbackInfo(self, PyApp, False)
5472 self._setOORInfo(self, False)
e811c8ce 5473
54f9ee45 5474 def __del__(self, destroy=_core_.delete_PyApp):
a95a7133 5475 """__del__(self)"""
d14a1e28
RD
5476 try:
5477 if self.thisown: destroy(self)
5478 except: pass
e811c8ce
RD
5479
5480 def _setCallbackInfo(*args, **kwargs):
70b7a5fe 5481 """_setCallbackInfo(self, PyObject self, PyObject _class, bool incref)"""
54f9ee45 5482 return _core_.PyApp__setCallbackInfo(*args, **kwargs)
e811c8ce
RD
5483
5484 def GetAppName(*args, **kwargs):
0df68c9f 5485 """
a95a7133 5486 GetAppName(self) -> String
6c3b4aae 5487
0df68c9f
RD
5488 Get the application name.
5489 """
54f9ee45 5490 return _core_.PyApp_GetAppName(*args, **kwargs)
e811c8ce
RD
5491
5492 def SetAppName(*args, **kwargs):
0df68c9f 5493 """
a95a7133 5494 SetAppName(self, String name)
6c3b4aae 5495
66c033b4
RD
5496 Set the application name. This value may be used automatically by
5497 `wx.Config` and such.
0df68c9f 5498 """
54f9ee45 5499 return _core_.PyApp_SetAppName(*args, **kwargs)
e811c8ce
RD
5500
5501 def GetClassName(*args, **kwargs):
0df68c9f 5502 """
a95a7133 5503 GetClassName(self) -> String
e811c8ce 5504
0df68c9f
RD
5505 Get the application's class name.
5506 """
54f9ee45 5507 return _core_.PyApp_GetClassName(*args, **kwargs)
e811c8ce
RD
5508
5509 def SetClassName(*args, **kwargs):
0df68c9f 5510 """
a95a7133 5511 SetClassName(self, String name)
6c3b4aae 5512
66c033b4
RD
5513 Set the application's class name. This value may be used for
5514 X-resources if applicable for the platform
0df68c9f 5515 """
54f9ee45 5516 return _core_.PyApp_SetClassName(*args, **kwargs)
e811c8ce
RD
5517
5518 def GetVendorName(*args, **kwargs):
0df68c9f 5519 """
a95a7133 5520 GetVendorName(self) -> String
6c3b4aae 5521
0df68c9f
RD
5522 Get the application's vendor name.
5523 """
54f9ee45 5524 return _core_.PyApp_GetVendorName(*args, **kwargs)
e811c8ce
RD
5525
5526 def SetVendorName(*args, **kwargs):
0df68c9f 5527 """
a95a7133 5528 SetVendorName(self, String name)
6c3b4aae 5529
66c033b4
RD
5530 Set the application's vendor name. This value may be used
5531 automatically by `wx.Config` and such.
0df68c9f 5532 """
54f9ee45 5533 return _core_.PyApp_SetVendorName(*args, **kwargs)
e811c8ce
RD
5534
5535 def GetTraits(*args, **kwargs):
0df68c9f 5536 """
a95a7133 5537 GetTraits(self) -> wxAppTraits
6c3b4aae 5538
66c033b4
RD
5539 Return (and create if necessary) the app traits object to which we
5540 delegate for everything which either should be configurable by the
5541 user (then he can change the default behaviour simply by overriding
5542 CreateTraits() and returning his own traits object) or which is
5543 GUI/console dependent as then wx.AppTraits allows us to abstract the
5544 differences behind the common facade.
5545
5546 :todo: Add support for overriding CreateAppTraits in wxPython.
0df68c9f 5547 """
54f9ee45 5548 return _core_.PyApp_GetTraits(*args, **kwargs)
e811c8ce
RD
5549
5550 def ProcessPendingEvents(*args, **kwargs):
0df68c9f 5551 """
a95a7133 5552 ProcessPendingEvents(self)
6c3b4aae 5553
66c033b4
RD
5554 Process all events in the Pending Events list -- it is necessary to
5555 call this function to process posted events. This normally happens
5556 during each event loop iteration.
0df68c9f 5557 """
54f9ee45 5558 return _core_.PyApp_ProcessPendingEvents(*args, **kwargs)
e811c8ce
RD
5559
5560 def Yield(*args, **kwargs):
0df68c9f 5561 """
a95a7133 5562 Yield(self, bool onlyIfNeeded=False) -> bool
6c3b4aae 5563
66c033b4
RD
5564 Process all currently pending events right now, instead of waiting
5565 until return to the event loop. It is an error to call ``Yield``
5566 recursively unless the value of ``onlyIfNeeded`` is True.
6c3b4aae 5567
66c033b4 5568 :warning: This function is dangerous as it can lead to unexpected
41e2b43e
RD
5569 reentrancies (i.e. when called from an event handler it may
5570 result in calling the same event handler again), use with
5571 extreme care or, better, don't use at all!
0df68c9f 5572
66c033b4 5573 :see: `wx.Yield`, `wx.YieldIfNeeded`, `wx.SafeYield`
41e2b43e 5574
0df68c9f 5575 """
54f9ee45 5576 return _core_.PyApp_Yield(*args, **kwargs)
e811c8ce
RD
5577
5578 def WakeUpIdle(*args, **kwargs):
0df68c9f 5579 """
a95a7133 5580 WakeUpIdle(self)
6c3b4aae 5581
66c033b4
RD
5582 Make sure that idle events are sent again.
5583 :see: `wx.WakeUpIdle`
0df68c9f 5584 """
54f9ee45 5585 return _core_.PyApp_WakeUpIdle(*args, **kwargs)
e811c8ce 5586
1fc3b23a
RD
5587 def IsMainLoopRunning(*args, **kwargs):
5588 """
5589 IsMainLoopRunning() -> bool
5590
5591 Returns True if we're running the main loop, i.e. if the events can
5592 currently be dispatched.
5593 """
5594 return _core_.PyApp_IsMainLoopRunning(*args, **kwargs)
5595
5596 IsMainLoopRunning = staticmethod(IsMainLoopRunning)
e811c8ce 5597 def MainLoop(*args, **kwargs):
0df68c9f 5598 """
a95a7133 5599 MainLoop(self) -> int
6c3b4aae 5600
66c033b4
RD
5601 Execute the main GUI loop, the function doesn't normally return until
5602 all top level windows have been closed and destroyed.
0df68c9f 5603 """
54f9ee45 5604 return _core_.PyApp_MainLoop(*args, **kwargs)
e811c8ce
RD
5605
5606 def Exit(*args, **kwargs):
0df68c9f 5607 """
a95a7133 5608 Exit(self)
6c3b4aae 5609
0df68c9f 5610 Exit the main loop thus terminating the application.
66c033b4 5611 :see: `wx.Exit`
0df68c9f 5612 """
54f9ee45 5613 return _core_.PyApp_Exit(*args, **kwargs)
e811c8ce
RD
5614
5615 def ExitMainLoop(*args, **kwargs):
0df68c9f 5616 """
a95a7133 5617 ExitMainLoop(self)
6c3b4aae 5618
66c033b4
RD
5619 Exit the main GUI loop during the next iteration of the main
5620 loop, (i.e. it does not stop the program immediately!)
0df68c9f 5621 """
54f9ee45 5622 return _core_.PyApp_ExitMainLoop(*args, **kwargs)
e811c8ce
RD
5623
5624 def Pending(*args, **kwargs):
0df68c9f 5625 """
a95a7133 5626 Pending(self) -> bool
6c3b4aae 5627
0df68c9f
RD
5628 Returns True if there are unprocessed events in the event queue.
5629 """
54f9ee45 5630 return _core_.PyApp_Pending(*args, **kwargs)
e811c8ce
RD
5631
5632 def Dispatch(*args, **kwargs):
0df68c9f 5633 """
a95a7133 5634 Dispatch(self) -> bool
6c3b4aae 5635
0df68c9f
RD
5636 Process the first event in the event queue (blocks until an event
5637 appears if there are none currently)
5638 """
54f9ee45 5639 return _core_.PyApp_Dispatch(*args, **kwargs)
e811c8ce
RD
5640
5641 def ProcessIdle(*args, **kwargs):
0df68c9f 5642 """
a95a7133 5643 ProcessIdle(self) -> bool
6c3b4aae 5644
66c033b4
RD
5645 Called from the MainLoop when the application becomes idle (there are
5646 no pending events) and sends a `wx.IdleEvent` to all interested
5647 parties. Returns True if more idle events are needed, False if not.
0df68c9f 5648 """
54f9ee45 5649 return _core_.PyApp_ProcessIdle(*args, **kwargs)
e811c8ce
RD
5650
5651 def SendIdleEvents(*args, **kwargs):
0df68c9f 5652 """
a95a7133 5653 SendIdleEvents(self, Window win, IdleEvent event) -> bool
e811c8ce 5654
66c033b4
RD
5655 Send idle event to window and all subwindows. Returns True if more
5656 idle time is requested.
0df68c9f 5657 """
54f9ee45 5658 return _core_.PyApp_SendIdleEvents(*args, **kwargs)
e811c8ce
RD
5659
5660 def IsActive(*args, **kwargs):
0df68c9f 5661 """
a95a7133 5662 IsActive(self) -> bool
6c3b4aae 5663
0df68c9f
RD
5664 Return True if our app has focus.
5665 """
54f9ee45 5666 return _core_.PyApp_IsActive(*args, **kwargs)
e811c8ce
RD
5667
5668 def SetTopWindow(*args, **kwargs):
0df68c9f 5669 """
a95a7133 5670 SetTopWindow(self, Window win)
6c3b4aae 5671
66c033b4 5672 Set the *main* top level window
0df68c9f 5673 """
54f9ee45 5674 return _core_.PyApp_SetTopWindow(*args, **kwargs)
e811c8ce
RD
5675
5676 def GetTopWindow(*args, **kwargs):
0df68c9f 5677 """
a95a7133 5678 GetTopWindow(self) -> Window
6c3b4aae 5679
66c033b4
RD
5680 Return the *main* top level window (if it hadn't been set previously
5681 with SetTopWindow(), will return just some top level window and, if
5682 there not any, will return None)
0df68c9f 5683 """
54f9ee45 5684 return _core_.PyApp_GetTopWindow(*args, **kwargs)
e811c8ce
RD
5685
5686 def SetExitOnFrameDelete(*args, **kwargs):
0df68c9f 5687 """
a95a7133 5688 SetExitOnFrameDelete(self, bool flag)
0df68c9f 5689
66c033b4
RD
5690 Control the exit behaviour: by default, the program will exit the main
5691 loop (and so, usually, terminate) when the last top-level program
5692 window is deleted. Beware that if you disable this behaviour (with
5693 SetExitOnFrameDelete(False)), you'll have to call ExitMainLoop()
5694 explicitly from somewhere.
0df68c9f 5695 """
54f9ee45 5696 return _core_.PyApp_SetExitOnFrameDelete(*args, **kwargs)
e811c8ce
RD
5697
5698 def GetExitOnFrameDelete(*args, **kwargs):
0df68c9f 5699 """
a95a7133 5700 GetExitOnFrameDelete(self) -> bool
6c3b4aae 5701
0df68c9f
RD
5702 Get the current exit behaviour setting.
5703 """
54f9ee45 5704 return _core_.PyApp_GetExitOnFrameDelete(*args, **kwargs)
e811c8ce
RD
5705
5706 def SetUseBestVisual(*args, **kwargs):
0df68c9f 5707 """
a95a7133 5708 SetUseBestVisual(self, bool flag)
6c3b4aae 5709
66c033b4
RD
5710 Set whether the app should try to use the best available visual on
5711 systems where more than one is available, (Sun, SGI, XFree86 4, etc.)
0df68c9f 5712 """
54f9ee45 5713 return _core_.PyApp_SetUseBestVisual(*args, **kwargs)
e811c8ce
RD
5714
5715 def GetUseBestVisual(*args, **kwargs):
0df68c9f 5716 """
a95a7133 5717 GetUseBestVisual(self) -> bool
6c3b4aae 5718
0df68c9f
RD
5719 Get current UseBestVisual setting.
5720 """
54f9ee45 5721 return _core_.PyApp_GetUseBestVisual(*args, **kwargs)
e811c8ce
RD
5722
5723 def SetPrintMode(*args, **kwargs):
a95a7133 5724 """SetPrintMode(self, int mode)"""
54f9ee45 5725 return _core_.PyApp_SetPrintMode(*args, **kwargs)
e811c8ce
RD
5726
5727 def GetPrintMode(*args, **kwargs):
a95a7133 5728 """GetPrintMode(self) -> int"""
54f9ee45 5729 return _core_.PyApp_GetPrintMode(*args, **kwargs)
e811c8ce 5730
e811c8ce 5731 def SetAssertMode(*args, **kwargs):
0df68c9f 5732 """
a95a7133 5733 SetAssertMode(self, int mode)
6c3b4aae 5734
41e2b43e 5735 Set the OnAssert behaviour for debug and hybrid builds.
0df68c9f 5736 """
54f9ee45 5737 return _core_.PyApp_SetAssertMode(*args, **kwargs)
e811c8ce 5738
6c3b4aae 5739 def GetAssertMode(*args, **kwargs):
0df68c9f 5740 """
a95a7133 5741 GetAssertMode(self) -> int
6c3b4aae 5742
0df68c9f
RD
5743 Get the current OnAssert behaviour setting.
5744 """
54f9ee45 5745 return _core_.PyApp_GetAssertMode(*args, **kwargs)
6c3b4aae 5746
e811c8ce 5747 def GetMacSupportPCMenuShortcuts(*args, **kwargs):
66c033b4 5748 """GetMacSupportPCMenuShortcuts() -> bool"""
54f9ee45 5749 return _core_.PyApp_GetMacSupportPCMenuShortcuts(*args, **kwargs)
e811c8ce
RD
5750
5751 GetMacSupportPCMenuShortcuts = staticmethod(GetMacSupportPCMenuShortcuts)
5752 def GetMacAboutMenuItemId(*args, **kwargs):
66c033b4 5753 """GetMacAboutMenuItemId() -> long"""
54f9ee45 5754 return _core_.PyApp_GetMacAboutMenuItemId(*args, **kwargs)
e811c8ce
RD
5755
5756 GetMacAboutMenuItemId = staticmethod(GetMacAboutMenuItemId)
5757 def GetMacPreferencesMenuItemId(*args, **kwargs):
66c033b4 5758 """GetMacPreferencesMenuItemId() -> long"""
54f9ee45 5759 return _core_.PyApp_GetMacPreferencesMenuItemId(*args, **kwargs)
e811c8ce
RD
5760
5761 GetMacPreferencesMenuItemId = staticmethod(GetMacPreferencesMenuItemId)
5762 def GetMacExitMenuItemId(*args, **kwargs):
66c033b4 5763 """GetMacExitMenuItemId() -> long"""
54f9ee45 5764 return _core_.PyApp_GetMacExitMenuItemId(*args, **kwargs)
e811c8ce
RD
5765
5766 GetMacExitMenuItemId = staticmethod(GetMacExitMenuItemId)
5767 def GetMacHelpMenuTitleName(*args, **kwargs):
66c033b4 5768 """GetMacHelpMenuTitleName() -> String"""
54f9ee45 5769 return _core_.PyApp_GetMacHelpMenuTitleName(*args, **kwargs)
e811c8ce
RD
5770
5771 GetMacHelpMenuTitleName = staticmethod(GetMacHelpMenuTitleName)
5772 def SetMacSupportPCMenuShortcuts(*args, **kwargs):
66c033b4 5773 """SetMacSupportPCMenuShortcuts(bool val)"""
54f9ee45 5774 return _core_.PyApp_SetMacSupportPCMenuShortcuts(*args, **kwargs)
e811c8ce
RD
5775
5776 SetMacSupportPCMenuShortcuts = staticmethod(SetMacSupportPCMenuShortcuts)
5777 def SetMacAboutMenuItemId(*args, **kwargs):
66c033b4 5778 """SetMacAboutMenuItemId(long val)"""
54f9ee45 5779 return _core_.PyApp_SetMacAboutMenuItemId(*args, **kwargs)
e811c8ce
RD
5780
5781 SetMacAboutMenuItemId = staticmethod(SetMacAboutMenuItemId)
5782 def SetMacPreferencesMenuItemId(*args, **kwargs):
66c033b4 5783 """SetMacPreferencesMenuItemId(long val)"""
54f9ee45 5784 return _core_.PyApp_SetMacPreferencesMenuItemId(*args, **kwargs)
e811c8ce
RD
5785
5786 SetMacPreferencesMenuItemId = staticmethod(SetMacPreferencesMenuItemId)
5787 def SetMacExitMenuItemId(*args, **kwargs):
66c033b4 5788 """SetMacExitMenuItemId(long val)"""
54f9ee45 5789 return _core_.PyApp_SetMacExitMenuItemId(*args, **kwargs)
e811c8ce
RD
5790
5791 SetMacExitMenuItemId = staticmethod(SetMacExitMenuItemId)
5792 def SetMacHelpMenuTitleName(*args, **kwargs):
66c033b4 5793 """SetMacHelpMenuTitleName(String val)"""
54f9ee45 5794 return _core_.PyApp_SetMacHelpMenuTitleName(*args, **kwargs)
e811c8ce
RD
5795
5796 SetMacHelpMenuTitleName = staticmethod(SetMacHelpMenuTitleName)
5797 def _BootstrapApp(*args, **kwargs):
0df68c9f 5798 """
a95a7133 5799 _BootstrapApp(self)
6c3b4aae 5800
0df68c9f
RD
5801 For internal use only
5802 """
54f9ee45 5803 return _core_.PyApp__BootstrapApp(*args, **kwargs)
e811c8ce
RD
5804
5805 def GetComCtl32Version(*args, **kwargs):
0df68c9f 5806 """
66c033b4 5807 GetComCtl32Version() -> int
6c3b4aae 5808
66c033b4
RD
5809 Returns 400, 470, 471, etc. for comctl32.dll 4.00, 4.70, 4.71 or 0 if
5810 it wasn't found at all. Raises an exception on non-Windows platforms.
0df68c9f 5811 """
54f9ee45 5812 return _core_.PyApp_GetComCtl32Version(*args, **kwargs)
e811c8ce
RD
5813
5814 GetComCtl32Version = staticmethod(GetComCtl32Version)
d14a1e28
RD
5815
5816class PyAppPtr(PyApp):
5817 def __init__(self, this):
5818 self.this = this
5819 if not hasattr(self,"thisown"): self.thisown = 0
5820 self.__class__ = PyApp
54f9ee45 5821_core_.PyApp_swigregister(PyAppPtr)
d14a1e28 5822
1fc3b23a
RD
5823def PyApp_IsMainLoopRunning(*args, **kwargs):
5824 """
5825 PyApp_IsMainLoopRunning() -> bool
5826
5827 Returns True if we're running the main loop, i.e. if the events can
5828 currently be dispatched.
5829 """
5830 return _core_.PyApp_IsMainLoopRunning(*args, **kwargs)
5831
e811c8ce
RD
5832def PyApp_GetMacSupportPCMenuShortcuts(*args, **kwargs):
5833 """PyApp_GetMacSupportPCMenuShortcuts() -> bool"""
54f9ee45 5834 return _core_.PyApp_GetMacSupportPCMenuShortcuts(*args, **kwargs)
d14a1e28 5835
e811c8ce
RD
5836def PyApp_GetMacAboutMenuItemId(*args, **kwargs):
5837 """PyApp_GetMacAboutMenuItemId() -> long"""
54f9ee45 5838 return _core_.PyApp_GetMacAboutMenuItemId(*args, **kwargs)
d14a1e28 5839
e811c8ce
RD
5840def PyApp_GetMacPreferencesMenuItemId(*args, **kwargs):
5841 """PyApp_GetMacPreferencesMenuItemId() -> long"""
54f9ee45 5842 return _core_.PyApp_GetMacPreferencesMenuItemId(*args, **kwargs)
d14a1e28 5843
e811c8ce
RD
5844def PyApp_GetMacExitMenuItemId(*args, **kwargs):
5845 """PyApp_GetMacExitMenuItemId() -> long"""
54f9ee45 5846 return _core_.PyApp_GetMacExitMenuItemId(*args, **kwargs)
d14a1e28 5847
e811c8ce 5848def PyApp_GetMacHelpMenuTitleName(*args, **kwargs):
196addbf 5849 """PyApp_GetMacHelpMenuTitleName() -> String"""
54f9ee45 5850 return _core_.PyApp_GetMacHelpMenuTitleName(*args, **kwargs)
d14a1e28 5851
e811c8ce
RD
5852def PyApp_SetMacSupportPCMenuShortcuts(*args, **kwargs):
5853 """PyApp_SetMacSupportPCMenuShortcuts(bool val)"""
54f9ee45 5854 return _core_.PyApp_SetMacSupportPCMenuShortcuts(*args, **kwargs)
d14a1e28 5855
e811c8ce
RD
5856def PyApp_SetMacAboutMenuItemId(*args, **kwargs):
5857 """PyApp_SetMacAboutMenuItemId(long val)"""
54f9ee45 5858 return _core_.PyApp_SetMacAboutMenuItemId(*args, **kwargs)
d14a1e28 5859
e811c8ce
RD
5860def PyApp_SetMacPreferencesMenuItemId(*args, **kwargs):
5861 """PyApp_SetMacPreferencesMenuItemId(long val)"""
54f9ee45 5862 return _core_.PyApp_SetMacPreferencesMenuItemId(*args, **kwargs)
d14a1e28 5863
e811c8ce
RD
5864def PyApp_SetMacExitMenuItemId(*args, **kwargs):
5865 """PyApp_SetMacExitMenuItemId(long val)"""
54f9ee45 5866 return _core_.PyApp_SetMacExitMenuItemId(*args, **kwargs)
d14a1e28 5867
e811c8ce 5868def PyApp_SetMacHelpMenuTitleName(*args, **kwargs):
196addbf 5869 """PyApp_SetMacHelpMenuTitleName(String val)"""
54f9ee45 5870 return _core_.PyApp_SetMacHelpMenuTitleName(*args, **kwargs)
d14a1e28 5871
e811c8ce 5872def PyApp_GetComCtl32Version(*args, **kwargs):
0df68c9f
RD
5873 """
5874 PyApp_GetComCtl32Version() -> int
6c3b4aae 5875
66c033b4
RD
5876 Returns 400, 470, 471, etc. for comctl32.dll 4.00, 4.70, 4.71 or 0 if
5877 it wasn't found at all. Raises an exception on non-Windows platforms.
0df68c9f 5878 """
54f9ee45 5879 return _core_.PyApp_GetComCtl32Version(*args, **kwargs)
d14a1e28
RD
5880
5881#---------------------------------------------------------------------------
5882
5883
e811c8ce 5884def Exit(*args, **kwargs):
0df68c9f
RD
5885 """
5886 Exit()
6c3b4aae 5887
0df68c9f
RD
5888 Force an exit of the application. Convenience for wx.GetApp().Exit()
5889 """
54f9ee45 5890 return _core_.Exit(*args, **kwargs)
d14a1e28 5891
e811c8ce 5892def Yield(*args, **kwargs):
0df68c9f
RD
5893 """
5894 Yield() -> bool
6c3b4aae 5895
0df68c9f
RD
5896 Yield to other apps/messages. Convenience for wx.GetApp().Yield()
5897 """
54f9ee45 5898 return _core_.Yield(*args, **kwargs)
d14a1e28 5899
e811c8ce 5900def YieldIfNeeded(*args, **kwargs):
0df68c9f
RD
5901 """
5902 YieldIfNeeded() -> bool
6c3b4aae 5903
0df68c9f
RD
5904 Yield to other apps/messages. Convenience for wx.GetApp().Yield(True)
5905 """
54f9ee45 5906 return _core_.YieldIfNeeded(*args, **kwargs)
d14a1e28 5907
e811c8ce 5908def SafeYield(*args, **kwargs):
0df68c9f
RD
5909 """
5910 SafeYield(Window win=None, bool onlyIfNeeded=False) -> bool
6c3b4aae 5911
66c033b4
RD
5912 This function is similar to `wx.Yield`, except that it disables the
5913 user input to all program windows before calling `wx.Yield` and
5914 re-enables it again afterwards. If ``win`` is not None, this window
5915 will remain enabled, allowing the implementation of some limited user
5916 interaction.
6c3b4aae 5917
66c033b4 5918 :Returns: the result of the call to `wx.Yield`.
0df68c9f 5919 """
54f9ee45 5920 return _core_.SafeYield(*args, **kwargs)
d14a1e28 5921
e811c8ce 5922def WakeUpIdle(*args, **kwargs):
0df68c9f
RD
5923 """
5924 WakeUpIdle()
6c3b4aae 5925
66c033b4
RD
5926 Cause the message queue to become empty again, so idle events will be
5927 sent.
0df68c9f 5928 """
54f9ee45 5929 return _core_.WakeUpIdle(*args, **kwargs)
d14a1e28 5930
e811c8ce 5931def PostEvent(*args, **kwargs):
0df68c9f
RD
5932 """
5933 PostEvent(EvtHandler dest, Event event)
6c3b4aae 5934
66c033b4
RD
5935 Send an event to a window or other wx.EvtHandler to be processed
5936 later.
0df68c9f 5937 """
54f9ee45 5938 return _core_.PostEvent(*args, **kwargs)
d14a1e28 5939
e811c8ce 5940def App_CleanUp(*args, **kwargs):
0df68c9f
RD
5941 """
5942 App_CleanUp()
6c3b4aae 5943
41e2b43e 5944 For internal use only, it is used to cleanup after wxWidgets when
66c033b4 5945 Python shuts down.
0df68c9f 5946 """
54f9ee45 5947 return _core_.App_CleanUp(*args, **kwargs)
d14a1e28 5948
e811c8ce 5949def GetApp(*args, **kwargs):
0df68c9f
RD
5950 """
5951 GetApp() -> PyApp
6c3b4aae 5952
196addbf 5953 Return a reference to the current wx.App object.
0df68c9f 5954 """
54f9ee45 5955 return _core_.GetApp(*args, **kwargs)
5cbf236d
RD
5956
5957def SetDefaultPyEncoding(*args, **kwargs):
5958 """
5959 SetDefaultPyEncoding(string encoding)
5960
5961 Sets the encoding that wxPython will use when it needs to convert a
5962 Python string or unicode object to or from a wxString.
e505d15e
RD
5963
5964 The default encoding is the value of ``locale.getdefaultlocale()[1]``
5965 but please be aware that the default encoding within the same locale
5966 may be slightly different on different platforms. For example, please
5967 see http://www.alanwood.net/demos/charsetdiffs.html for differences
5968 between the common latin/roman encodings.
5cbf236d
RD
5969 """
5970 return _core_.SetDefaultPyEncoding(*args, **kwargs)
5971
5972def GetDefaultPyEncoding(*args, **kwargs):
5973 """
5974 GetDefaultPyEncoding() -> string
5975
5976 Gets the current encoding that wxPython will use when it needs to
5977 convert a Python string or unicode object to or from a wxString.
5978 """
5979 return _core_.GetDefaultPyEncoding(*args, **kwargs)
d14a1e28
RD
5980#----------------------------------------------------------------------
5981
5982class PyOnDemandOutputWindow:
6c3b4aae
RD
5983 """
5984 A class that can be used for redirecting Python's stdout and
5985 stderr streams. It will do nothing until something is wrriten to
5986 the stream at which point it will create a Frame with a text area
5987 and write the text there.
5988 """
d14a1e28
RD
5989 def __init__(self, title = "wxPython: stdout/stderr"):
5990 self.frame = None
5991 self.title = title
412d302d
RD
5992 self.pos = wx.DefaultPosition
5993 self.size = (450, 300)
d14a1e28
RD
5994 self.parent = None
5995
5996 def SetParent(self, parent):
6c3b4aae 5997 """Set the window to be used as the popup Frame's parent."""
d14a1e28
RD
5998 self.parent = parent
5999
6c3b4aae
RD
6000
6001 def CreateOutputWindow(self, st):
412d302d
RD
6002 self.frame = wx.Frame(self.parent, -1, self.title, self.pos, self.size,
6003 style=wx.DEFAULT_FRAME_STYLE)
196addbf 6004 self.text = wx.TextCtrl(self.frame, -1, "",
412d302d 6005 style=wx.TE_MULTILINE|wx.TE_READONLY)
d1e20054 6006 self.text.AppendText(st)
6c3b4aae
RD
6007 self.frame.Show(True)
6008 EVT_CLOSE(self.frame, self.OnCloseWindow)
6009
d14a1e28 6010
7409c0c6
RD
6011 def OnCloseWindow(self, event):
6012 if self.frame is not None:
6013 self.frame.Destroy()
6014 self.frame = None
6015 self.text = None
6016
6017
d14a1e28 6018 # These methods provide the file-like output behaviour.
6c3b4aae
RD
6019 def write(self, text):
6020 """
6021 Create the output window if needed and write the string to it.
6022 If not called in the context of the gui thread then uses
6023 CallAfter to do the work there.
6024 """
6025 if self.frame is None:
6026 if not wx.Thread_IsMain():
6027 wx.CallAfter(self.CreateOutputWindow, text)
6028 else:
6029 self.CreateOutputWindow(text)
6030 else:
6031 if not wx.Thread_IsMain():
6032 wx.CallAfter(self.text.AppendText, text)
6033 else:
6034 self.text.AppendText(text)
6035
d14a1e28
RD
6036
6037 def close(self):
6c3b4aae
RD
6038 if self.frame is not None:
6039 wx.CallAfter(self.frame.Close)
6040
d14a1e28 6041
19272049
RD
6042 def flush(self):
6043 pass
6044
6045
d14a1e28
RD
6046
6047#----------------------------------------------------------------------
d14a1e28
RD
6048
6049_defRedirect = (wx.Platform == '__WXMSW__' or wx.Platform == '__WXMAC__')
6050
6051class App(wx.PyApp):
6c3b4aae 6052 """
66c033b4
RD
6053 The ``wx.App`` class represents the application and is used to:
6054
6055 * bootstrap the wxPython system and initialize the underlying
6056 gui toolkit
6057 * set and get application-wide properties
6058 * implement the windowing system main message or event loop,
6059 and to dispatch events to window instances
6060 * etc.
6061
6062 Every application must have a ``wx.App`` instance, and all
6063 creation of UI objects should be delayed until after the
03e37cd5
RD
6064 ``wx.App`` object has been created in order to ensure that the gui
6065 platform and wxWidgets have been fully initialized.
66c033b4
RD
6066
6067 Normally you would derive from this class and implement an
6068 ``OnInit`` method that creates a frame and then calls
6069 ``self.SetTopWindow(frame)``.
6070
03e37cd5 6071 :see: `wx.PySimpleApp` for a simpler app class that can be used
1c0f361b 6072 directly.
6c3b4aae 6073 """
66c033b4 6074
d14a1e28
RD
6075 outputWindowClass = PyOnDemandOutputWindow
6076
03e37cd5
RD
6077 def __init__(self, redirect=_defRedirect, filename=None,
6078 useBestVisual=False, clearSigInt=True):
66c033b4
RD
6079 """
6080 Construct a ``wx.App`` object.
6081
03e37cd5
RD
6082 :param redirect: Should ``sys.stdout`` and ``sys.stderr`` be
6083 redirected? Defaults to True on Windows and Mac, False
6084 otherwise. If `filename` is None then output will be
6085 redirected to a window that pops up as needed. (You can
6086 control what kind of window is created for the output by
6087 resetting the class variable ``outputWindowClass`` to a
6088 class of your choosing.)
66c033b4 6089
03e37cd5
RD
6090 :param filename: The name of a file to redirect output to, if
6091 redirect is True.
66c033b4
RD
6092
6093 :param useBestVisual: Should the app try to use the best
03e37cd5
RD
6094 available visual provided by the system (only relevant on
6095 systems that have more than one visual.) This parameter
6096 must be used instead of calling `SetUseBestVisual` later
6097 on because it must be set before the underlying GUI
6098 toolkit is initialized.
6099
6100 :param clearSigInt: Should SIGINT be cleared? This allows the
6101 app to terminate upon a Ctrl-C in the console like other
6102 GUI apps will.
66c033b4
RD
6103
6104 :note: You should override OnInit to do applicaition
6105 initialization to ensure that the system, toolkit and
6106 wxWidgets are fully initialized.
6107 """
d14a1e28
RD
6108 wx.PyApp.__init__(self)
6109
6110 if wx.Platform == "__WXMAC__":
6111 try:
6112 import MacOS
6113 if not MacOS.WMAvailable():
6114 print """\
6115This program needs access to the screen. Please run with 'pythonw',
6116not 'python', and only when you are logged in on the main display of
6117your Mac."""
6118 _sys.exit(1)
36cadbf7
RD
6119 except SystemExit:
6120 raise
d14a1e28
RD
6121 except:
6122 pass
6123
6124 # This has to be done before OnInit
6125 self.SetUseBestVisual(useBestVisual)
6126
6127 # Set the default handler for SIGINT. This fixes a problem
6128 # where if Ctrl-C is pressed in the console that started this
6129 # app then it will not appear to do anything, (not even send
6130 # KeyboardInterrupt???) but will later segfault on exit. By
6131 # setting the default handler then the app will exit, as
6132 # expected (depending on platform.)
03e37cd5
RD
6133 if clearSigInt:
6134 try:
6135 import signal
6136 signal.signal(signal.SIGINT, signal.SIG_DFL)
6137 except:
6138 pass
d14a1e28
RD
6139
6140 # Save and redirect the stdio to a window?
6141 self.stdioWin = None
6142 self.saveStdio = (_sys.stdout, _sys.stderr)
6143 if redirect:
6144 self.RedirectStdio(filename)
6145
8fb0e70a
RD
6146 # Use Python's install prefix as the default
6147 wx.StandardPaths.Get().SetInstallPrefix(_sys.prefix)
6148
d14a1e28
RD
6149 # This finishes the initialization of wxWindows and then calls
6150 # the OnInit that should be present in the derived class
6151 self._BootstrapApp()
6152
6153
02b455f2
RD
6154 def __del__(self, destroy=wx.PyApp.__del__):
6155 self.RestoreStdio() # Just in case the MainLoop was overridden
6156 destroy(self)
d14a1e28 6157
70b7a5fe
RD
6158 def Destroy(self):
6159 wx.PyApp.Destroy(self)
6160 self.thisown = 0
d14a1e28
RD
6161
6162 def SetTopWindow(self, frame):
1e0c8722 6163 """Set the \"main\" top level window"""
d14a1e28
RD
6164 if self.stdioWin:
6165 self.stdioWin.SetParent(frame)
6166 wx.PyApp.SetTopWindow(self, frame)
6167
6168
6169 def MainLoop(self):
1e0c8722 6170 """Execute the main GUI event loop"""
d14a1e28
RD
6171 wx.PyApp.MainLoop(self)
6172 self.RestoreStdio()
6173
6174
7409c0c6 6175 def RedirectStdio(self, filename=None):
1e0c8722 6176 """Redirect sys.stdout and sys.stderr to a file or a popup window."""
d14a1e28
RD
6177 if filename:
6178 _sys.stdout = _sys.stderr = open(filename, 'a')
6179 else:
6180 self.stdioWin = self.outputWindowClass()
6181 _sys.stdout = _sys.stderr = self.stdioWin
6182
6183
6184 def RestoreStdio(self):
02b455f2
RD
6185 try:
6186 _sys.stdout, _sys.stderr = self.saveStdio
6187 except:
6188 pass
d14a1e28
RD
6189
6190
412d302d
RD
6191 def SetOutputWindowAttributes(self, title=None, pos=None, size=None):
6192 """
6193 Set the title, position and/or size of the output window if
f5b96ee1
RD
6194 the stdio has been redirected. This should be called before
6195 any output would cause the output window to be created.
412d302d
RD
6196 """
6197 if self.stdioWin:
6198 if title is not None:
6199 self.stdioWin.title = title
6200 if pos is not None:
6201 self.stdioWin.pos = pos
6202 if size is not None:
6203 self.stdioWin.size = size
6204
6205
6206
d14a1e28 6207
66c033b4 6208# change from wx.PyApp_XX to wx.App_XX
54f9ee45
RD
6209App_GetMacSupportPCMenuShortcuts = _core_.PyApp_GetMacSupportPCMenuShortcuts
6210App_GetMacAboutMenuItemId = _core_.PyApp_GetMacAboutMenuItemId
6211App_GetMacPreferencesMenuItemId = _core_.PyApp_GetMacPreferencesMenuItemId
6212App_GetMacExitMenuItemId = _core_.PyApp_GetMacExitMenuItemId
6213App_GetMacHelpMenuTitleName = _core_.PyApp_GetMacHelpMenuTitleName
6214App_SetMacSupportPCMenuShortcuts = _core_.PyApp_SetMacSupportPCMenuShortcuts
6215App_SetMacAboutMenuItemId = _core_.PyApp_SetMacAboutMenuItemId
6216App_SetMacPreferencesMenuItemId = _core_.PyApp_SetMacPreferencesMenuItemId
6217App_SetMacExitMenuItemId = _core_.PyApp_SetMacExitMenuItemId
6218App_SetMacHelpMenuTitleName = _core_.PyApp_SetMacHelpMenuTitleName
6219App_GetComCtl32Version = _core_.PyApp_GetComCtl32Version
d14a1e28
RD
6220
6221#----------------------------------------------------------------------------
6222
6223class PySimpleApp(wx.App):
6c3b4aae
RD
6224 """
6225 A simple application class. You can just create one of these and
6226 then then make your top level windows later, and not have to worry
66c033b4
RD
6227 about OnInit. For example::
6228
6229 app = wx.PySimpleApp()
6230 frame = wx.Frame(None, title='Hello World')
6231 frame.Show()
6232 app.MainLoop()
6233
6234 :see: `wx.App`
6235 """
6c3b4aae 6236
03e37cd5
RD
6237 def __init__(self, redirect=False, filename=None,
6238 useBestVisual=False, clearSigInt=True):
66c033b4
RD
6239 """
6240 :see: `wx.App.__init__`
6241 """
03e37cd5 6242 wx.App.__init__(self, redirect, filename, useBestVisual, clearSigInt)
6c3b4aae 6243
d14a1e28 6244 def OnInit(self):
d14a1e28
RD
6245 return True
6246
6247
66c033b4 6248
6c3b4aae 6249# Is anybody using this one?
d14a1e28
RD
6250class PyWidgetTester(wx.App):
6251 def __init__(self, size = (250, 100)):
6252 self.size = size
6253 wx.App.__init__(self, 0)
6254
6255 def OnInit(self):
196addbf 6256 self.frame = wx.Frame(None, -1, "Widget Tester", pos=(0,0), size=self.size)
d14a1e28
RD
6257 self.SetTopWindow(self.frame)
6258 return True
6259
66c033b4
RD
6260 def SetWidget(self, widgetClass, *args, **kwargs):
6261 w = widgetClass(self.frame, *args, **kwargs)
d14a1e28
RD
6262 self.frame.Show(True)
6263
6264#----------------------------------------------------------------------------
6265# DO NOT hold any other references to this object. This is how we
66c033b4 6266# know when to cleanup system resources that wxWidgets is holding. When
d14a1e28 6267# the sys module is unloaded, the refcount on sys.__wxPythonCleanup
66c033b4 6268# goes to zero and it calls the wx.App_CleanUp function.
d14a1e28
RD
6269
6270class __wxPyCleanup:
6271 def __init__(self):
54f9ee45 6272 self.cleanup = _core_.App_CleanUp
d14a1e28
RD
6273 def __del__(self):
6274 self.cleanup()
6275
6276_sys.__wxPythonCleanup = __wxPyCleanup()
6277
6278## # another possible solution, but it gets called too early...
66c033b4
RD
6279## import atexit
6280## atexit.register(_core_.wxApp_CleanUp)
d14a1e28
RD
6281
6282
6283#----------------------------------------------------------------------------
6284
6285#---------------------------------------------------------------------------
2ef75293
RD
6286
6287class EventLoop(object):
093d3ff1 6288 """Proxy of C++ EventLoop class"""
2ef75293
RD
6289 def __repr__(self):
6290 return "<%s.%s; proxy of C++ wxEventLoop instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
6291 def __init__(self, *args, **kwargs):
6292 """__init__(self) -> EventLoop"""
6293 newobj = _core_.new_EventLoop(*args, **kwargs)
6294 self.this = newobj.this
6295 self.thisown = 1
6296 del newobj.thisown
6297 def __del__(self, destroy=_core_.delete_EventLoop):
6298 """__del__(self)"""
6299 try:
6300 if self.thisown: destroy(self)
6301 except: pass
6302
6303 def Run(*args, **kwargs):
6304 """Run(self) -> int"""
6305 return _core_.EventLoop_Run(*args, **kwargs)
6306
6307 def Exit(*args, **kwargs):
6308 """Exit(self, int rc=0)"""
6309 return _core_.EventLoop_Exit(*args, **kwargs)
6310
6311 def Pending(*args, **kwargs):
6312 """Pending(self) -> bool"""
6313 return _core_.EventLoop_Pending(*args, **kwargs)
6314
6315 def Dispatch(*args, **kwargs):
6316 """Dispatch(self) -> bool"""
6317 return _core_.EventLoop_Dispatch(*args, **kwargs)
6318
6319 def IsRunning(*args, **kwargs):
6320 """IsRunning(self) -> bool"""
6321 return _core_.EventLoop_IsRunning(*args, **kwargs)
6322
6323 def GetActive(*args, **kwargs):
6324 """GetActive() -> EventLoop"""
6325 return _core_.EventLoop_GetActive(*args, **kwargs)
6326
6327 GetActive = staticmethod(GetActive)
6328 def SetActive(*args, **kwargs):
6329 """SetActive(EventLoop loop)"""
6330 return _core_.EventLoop_SetActive(*args, **kwargs)
6331
6332 SetActive = staticmethod(SetActive)
6333
6334class EventLoopPtr(EventLoop):
6335 def __init__(self, this):
6336 self.this = this
6337 if not hasattr(self,"thisown"): self.thisown = 0
6338 self.__class__ = EventLoop
6339_core_.EventLoop_swigregister(EventLoopPtr)
6340
6341def EventLoop_GetActive(*args, **kwargs):
6342 """EventLoop_GetActive() -> EventLoop"""
6343 return _core_.EventLoop_GetActive(*args, **kwargs)
6344
6345def EventLoop_SetActive(*args, **kwargs):
6346 """EventLoop_SetActive(EventLoop loop)"""
6347 return _core_.EventLoop_SetActive(*args, **kwargs)
6348
6349#---------------------------------------------------------------------------
d14a1e28 6350
1e0c8722 6351class AcceleratorEntry(object):
66c033b4
RD
6352 """
6353 A class used to define items in an `wx.AcceleratorTable`. wxPython
6354 programs can choose to use wx.AcceleratorEntry objects, but using a
6355 list of 3-tuple of integers (flags, keyCode, cmdID) usually works just
41e2b43e 6356 as well. See `__init__` for of the tuple values.
66c033b4
RD
6357
6358 :see: `wx.AcceleratorTable`
6359 """
1e0c8722
RD
6360 def __repr__(self):
6361 return "<%s.%s; proxy of C++ wxAcceleratorEntry instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
6362 def __init__(self, *args, **kwargs):
66c033b4
RD
6363 """
6364 __init__(self, int flags=0, int keyCode=0, int cmdID=0) -> AcceleratorEntry
6365
6366 Construct a wx.AcceleratorEntry.
66c033b4 6367 """
54f9ee45 6368 newobj = _core_.new_AcceleratorEntry(*args, **kwargs)
1e0c8722
RD
6369 self.this = newobj.this
6370 self.thisown = 1
6371 del newobj.thisown
54f9ee45 6372 def __del__(self, destroy=_core_.delete_AcceleratorEntry):
a95a7133 6373 """__del__(self)"""
1e0c8722
RD
6374 try:
6375 if self.thisown: destroy(self)
6376 except: pass
6377
6378 def Set(*args, **kwargs):
66c033b4
RD
6379 """
6380 Set(self, int flags, int keyCode, int cmd)
1e0c8722 6381
66c033b4
RD
6382 (Re)set the attributes of a wx.AcceleratorEntry.
6383 :see `__init__`
6384 """
6385 return _core_.AcceleratorEntry_Set(*args, **kwargs)
1e0c8722
RD
6386
6387 def GetFlags(*args, **kwargs):
66c033b4
RD
6388 """
6389 GetFlags(self) -> int
6390
6391 Get the AcceleratorEntry's flags.
6392 """
54f9ee45 6393 return _core_.AcceleratorEntry_GetFlags(*args, **kwargs)
1e0c8722
RD
6394
6395 def GetKeyCode(*args, **kwargs):
66c033b4
RD
6396 """
6397 GetKeyCode(self) -> int
6398
6399 Get the AcceleratorEntry's keycode.
6400 """
54f9ee45 6401 return _core_.AcceleratorEntry_GetKeyCode(*args, **kwargs)
1e0c8722
RD
6402
6403 def GetCommand(*args, **kwargs):
66c033b4
RD
6404 """
6405 GetCommand(self) -> int
6406
6407 Get the AcceleratorEntry's command ID.
6408 """
54f9ee45 6409 return _core_.AcceleratorEntry_GetCommand(*args, **kwargs)
1e0c8722
RD
6410
6411
6412class AcceleratorEntryPtr(AcceleratorEntry):
6413 def __init__(self, this):
6414 self.this = this
6415 if not hasattr(self,"thisown"): self.thisown = 0
6416 self.__class__ = AcceleratorEntry
54f9ee45 6417_core_.AcceleratorEntry_swigregister(AcceleratorEntryPtr)
1e0c8722
RD
6418
6419class AcceleratorTable(Object):
66c033b4
RD
6420 """
6421 An accelerator table allows the application to specify a table of
6422 keyboard shortcuts for menus or other commands. On Windows, menu or
6423 button commands are supported; on GTK, only menu commands are
6424 supported.
66c033b4 6425 """
1e0c8722
RD
6426 def __repr__(self):
6427 return "<%s.%s; proxy of C++ wxAcceleratorTable instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
6428 def __init__(self, *args, **kwargs):
0df68c9f
RD
6429 """
6430 __init__(entries) -> AcceleratorTable
1e0c8722 6431
66c033b4
RD
6432 Construct an AcceleratorTable from a list of `wx.AcceleratorEntry`
6433 items or or of 3-tuples (flags, keyCode, cmdID)
6434
6435 :see: `wx.AcceleratorEntry`
0df68c9f 6436 """
54f9ee45 6437 newobj = _core_.new_AcceleratorTable(*args, **kwargs)
1e0c8722
RD
6438 self.this = newobj.this
6439 self.thisown = 1
6440 del newobj.thisown
54f9ee45 6441 def __del__(self, destroy=_core_.delete_AcceleratorTable):
a95a7133 6442 """__del__(self)"""
1e0c8722
RD
6443 try:
6444 if self.thisown: destroy(self)
6445 except: pass
6446
6447 def Ok(*args, **kwargs):
a95a7133 6448 """Ok(self) -> bool"""
54f9ee45 6449 return _core_.AcceleratorTable_Ok(*args, **kwargs)
1e0c8722
RD
6450
6451
6452class AcceleratorTablePtr(AcceleratorTable):
6453 def __init__(self, this):
6454 self.this = this
6455 if not hasattr(self,"thisown"): self.thisown = 0
6456 self.__class__ = AcceleratorTable
54f9ee45 6457_core_.AcceleratorTable_swigregister(AcceleratorTablePtr)
1e0c8722
RD
6458
6459
6460def GetAccelFromString(*args, **kwargs):
196addbf 6461 """GetAccelFromString(String label) -> AcceleratorEntry"""
54f9ee45 6462 return _core_.GetAccelFromString(*args, **kwargs)
1e0c8722
RD
6463#---------------------------------------------------------------------------
6464
74a57fcd
RD
6465class VisualAttributes(object):
6466 """struct containing all the visual attributes of a control"""
6467 def __repr__(self):
6468 return "<%s.%s; proxy of C++ wxVisualAttributes instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
6469 def __init__(self, *args, **kwargs):
6470 """
a95a7133 6471 __init__(self) -> VisualAttributes
74a57fcd
RD
6472
6473 struct containing all the visual attributes of a control
6474 """
54f9ee45 6475 newobj = _core_.new_VisualAttributes(*args, **kwargs)
74a57fcd
RD
6476 self.this = newobj.this
6477 self.thisown = 1
6478 del newobj.thisown
54f9ee45 6479 def __del__(self, destroy=_core_.delete_VisualAttributes):
a95a7133 6480 """__del__(self)"""
74a57fcd
RD
6481 try:
6482 if self.thisown: destroy(self)
6483 except: pass
6484
54f9ee45
RD
6485 font = property(_core_.VisualAttributes_font_get, _core_.VisualAttributes_font_set)
6486 colFg = property(_core_.VisualAttributes_colFg_get, _core_.VisualAttributes_colFg_set)
6487 colBg = property(_core_.VisualAttributes_colBg_get, _core_.VisualAttributes_colBg_set)
74a57fcd
RD
6488
6489class VisualAttributesPtr(VisualAttributes):
6490 def __init__(self, this):
6491 self.this = this
6492 if not hasattr(self,"thisown"): self.thisown = 0
6493 self.__class__ = VisualAttributes
54f9ee45 6494_core_.VisualAttributes_swigregister(VisualAttributesPtr)
74a57fcd
RD
6495NullAcceleratorTable = cvar.NullAcceleratorTable
6496PanelNameStr = cvar.PanelNameStr
6497
54f9ee45
RD
6498WINDOW_VARIANT_NORMAL = _core_.WINDOW_VARIANT_NORMAL
6499WINDOW_VARIANT_SMALL = _core_.WINDOW_VARIANT_SMALL
6500WINDOW_VARIANT_MINI = _core_.WINDOW_VARIANT_MINI
6501WINDOW_VARIANT_LARGE = _core_.WINDOW_VARIANT_LARGE
6502WINDOW_VARIANT_MAX = _core_.WINDOW_VARIANT_MAX
d14a1e28 6503class Window(EvtHandler):
15afbcd0
RD
6504 """
6505 wx.Window is the base class for all windows and represents any visible
6506 object on the screen. All controls, top level windows and so on are
6507 wx.Windows. Sizers and device contexts are not however, as they don't
6508 appear on screen themselves.
6509
6510 """
e811c8ce
RD
6511 def __repr__(self):
6512 return "<%s.%s; proxy of C++ wxWindow instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 6513 def __init__(self, *args, **kwargs):
0df68c9f 6514 """
a95a7133 6515 __init__(self, Window parent, int id=-1, Point pos=DefaultPosition,
74a57fcd 6516 Size size=DefaultSize, long style=0, String name=PanelNameStr) -> Window
15afbcd0
RD
6517
6518 Construct and show a generic Window.
0df68c9f 6519 """
54f9ee45 6520 newobj = _core_.new_Window(*args, **kwargs)
d14a1e28
RD
6521 self.this = newobj.this
6522 self.thisown = 1
6523 del newobj.thisown
6524 self._setOORInfo(self)
d14a1e28 6525
e811c8ce 6526 def Create(*args, **kwargs):
0df68c9f 6527 """
a95a7133 6528 Create(self, Window parent, int id=-1, Point pos=DefaultPosition,
74a57fcd 6529 Size size=DefaultSize, long style=0, String name=PanelNameStr) -> bool
15afbcd0
RD
6530
6531 Create the GUI part of the Window for 2-phase creation mode.
0df68c9f 6532 """
54f9ee45 6533 return _core_.Window_Create(*args, **kwargs)
d14a1e28 6534
e811c8ce 6535 def Close(*args, **kwargs):
15afbcd0 6536 """
a95a7133 6537 Close(self, bool force=False) -> bool
15afbcd0
RD
6538
6539 This function simply generates a EVT_CLOSE event whose handler usually
6540 tries to close the window. It doesn't close the window itself,
6541 however. If force is False (the default) then the window's close
6542 handler will be allowed to veto the destruction of the window.
15afbcd0 6543 """
54f9ee45 6544 return _core_.Window_Close(*args, **kwargs)
d14a1e28 6545
e811c8ce 6546 def Destroy(*args, **kwargs):
0df68c9f 6547 """
a95a7133 6548 Destroy(self) -> bool
d14a1e28 6549
15afbcd0
RD
6550 Destroys the window safely. Frames and dialogs are not destroyed
6551 immediately when this function is called -- they are added to a list
6552 of windows to be deleted on idle time, when all the window's events
6553 have been processed. This prevents problems with events being sent to
6554 non-existent windows.
6555
6556 Returns True if the window has either been successfully deleted, or it
6557 has been added to the list of windows pending real deletion.
0df68c9f 6558 """
54f9ee45 6559 return _core_.Window_Destroy(*args, **kwargs)
d14a1e28 6560
e811c8ce 6561 def DestroyChildren(*args, **kwargs):
15afbcd0 6562 """
a95a7133 6563 DestroyChildren(self) -> bool
15afbcd0 6564
41e2b43e
RD
6565 Destroys all children of a window. Called automatically by the
6566 destructor.
15afbcd0 6567 """
54f9ee45 6568 return _core_.Window_DestroyChildren(*args, **kwargs)
d14a1e28 6569
e811c8ce 6570 def IsBeingDeleted(*args, **kwargs):
15afbcd0 6571 """
a95a7133 6572 IsBeingDeleted(self) -> bool
15afbcd0
RD
6573
6574 Is the window in the process of being deleted?
6575 """
54f9ee45 6576 return _core_.Window_IsBeingDeleted(*args, **kwargs)
d14a1e28 6577
e811c8ce 6578 def SetTitle(*args, **kwargs):
15afbcd0 6579 """
a95a7133 6580 SetTitle(self, String title)
15afbcd0
RD
6581
6582 Sets the window's title. Applicable only to frames and dialogs.
6583 """
54f9ee45 6584 return _core_.Window_SetTitle(*args, **kwargs)
d14a1e28 6585
e811c8ce 6586 def GetTitle(*args, **kwargs):
15afbcd0 6587 """
a95a7133 6588 GetTitle(self) -> String
15afbcd0
RD
6589
6590 Gets the window's title. Applicable only to frames and dialogs.
6591 """
54f9ee45 6592 return _core_.Window_GetTitle(*args, **kwargs)
d14a1e28 6593
e811c8ce 6594 def SetLabel(*args, **kwargs):
15afbcd0 6595 """
a95a7133 6596 SetLabel(self, String label)
15afbcd0
RD
6597
6598 Set the text which the window shows in its label if applicable.
6599 """
54f9ee45 6600 return _core_.Window_SetLabel(*args, **kwargs)
d14a1e28 6601
e811c8ce 6602 def GetLabel(*args, **kwargs):
15afbcd0 6603 """
a95a7133 6604 GetLabel(self) -> String
15afbcd0 6605
41e2b43e
RD
6606 Generic way of getting a label from any window, for identification
6607 purposes. The interpretation of this function differs from class to
6608 class. For frames and dialogs, the value returned is the title. For
6609 buttons or static text controls, it is the button text. This function
6610 can be useful for meta-programs such as testing tools or special-needs
6611 access programs)which need to identify windows by name.
15afbcd0 6612 """
54f9ee45 6613 return _core_.Window_GetLabel(*args, **kwargs)
d14a1e28 6614
e811c8ce 6615 def SetName(*args, **kwargs):
15afbcd0 6616 """
a95a7133 6617 SetName(self, String name)
15afbcd0 6618
41e2b43e
RD
6619 Sets the window's name. The window name is used for ressource setting
6620 in X, it is not the same as the window title/label
15afbcd0 6621 """
54f9ee45 6622 return _core_.Window_SetName(*args, **kwargs)
d14a1e28 6623
e811c8ce 6624 def GetName(*args, **kwargs):
15afbcd0 6625 """
a95a7133 6626 GetName(self) -> String
15afbcd0 6627
41e2b43e
RD
6628 Returns the windows name. This name is not guaranteed to be unique;
6629 it is up to the programmer to supply an appropriate name in the window
6630 constructor or via wx.Window.SetName.
15afbcd0 6631 """
54f9ee45 6632 return _core_.Window_GetName(*args, **kwargs)
d14a1e28 6633
4276dc52
RD
6634 def SetWindowVariant(*args, **kwargs):
6635 """
a95a7133 6636 SetWindowVariant(self, int variant)
4276dc52 6637
41e2b43e
RD
6638 Sets the variant of the window/font size to use for this window, if
6639 the platform supports variants, for example, wxMac.
4276dc52 6640 """
54f9ee45 6641 return _core_.Window_SetWindowVariant(*args, **kwargs)
4276dc52
RD
6642
6643 def GetWindowVariant(*args, **kwargs):
a95a7133 6644 """GetWindowVariant(self) -> int"""
54f9ee45 6645 return _core_.Window_GetWindowVariant(*args, **kwargs)
4276dc52 6646
e811c8ce 6647 def SetId(*args, **kwargs):
15afbcd0 6648 """
a95a7133 6649 SetId(self, int winid)
15afbcd0
RD
6650
6651 Sets the identifier of the window. Each window has an integer
6652 identifier. If the application has not provided one, an identifier
6653 will be generated. Normally, the identifier should be provided on
6654 creation and should not be modified subsequently.
6655 """
54f9ee45 6656 return _core_.Window_SetId(*args, **kwargs)
d14a1e28 6657
e811c8ce 6658 def GetId(*args, **kwargs):
15afbcd0 6659 """
a95a7133 6660 GetId(self) -> int
15afbcd0
RD
6661
6662 Returns the identifier of the window. Each window has an integer
6663 identifier. If the application has not provided one (or the default Id
6664 -1 is used) then an unique identifier with a negative value will be
6665 generated.
6666 """
54f9ee45 6667 return _core_.Window_GetId(*args, **kwargs)
d14a1e28 6668
e811c8ce 6669 def NewControlId(*args, **kwargs):
15afbcd0 6670 """
66c033b4 6671 NewControlId() -> int
15afbcd0
RD
6672
6673 Generate a control id for the controls which were not given one.
6674 """
54f9ee45 6675 return _core_.Window_NewControlId(*args, **kwargs)
d14a1e28 6676
e811c8ce
RD
6677 NewControlId = staticmethod(NewControlId)
6678 def NextControlId(*args, **kwargs):
15afbcd0 6679 """
66c033b4 6680 NextControlId(int winid) -> int
15afbcd0
RD
6681
6682 Get the id of the control following the one with the given
41e2b43e 6683 autogenerated) id
15afbcd0 6684 """
54f9ee45 6685 return _core_.Window_NextControlId(*args, **kwargs)
d14a1e28 6686
e811c8ce
RD
6687 NextControlId = staticmethod(NextControlId)
6688 def PrevControlId(*args, **kwargs):
15afbcd0 6689 """
66c033b4 6690 PrevControlId(int winid) -> int
15afbcd0
RD
6691
6692 Get the id of the control preceding the one with the given
41e2b43e 6693 autogenerated) id
15afbcd0 6694 """
54f9ee45 6695 return _core_.Window_PrevControlId(*args, **kwargs)
d14a1e28 6696
e811c8ce
RD
6697 PrevControlId = staticmethod(PrevControlId)
6698 def SetSize(*args, **kwargs):
15afbcd0 6699 """
a95a7133 6700 SetSize(self, Size size)
15afbcd0
RD
6701
6702 Sets the size of the window in pixels.
6703 """
54f9ee45 6704 return _core_.Window_SetSize(*args, **kwargs)
d14a1e28 6705
e811c8ce 6706 def SetDimensions(*args, **kwargs):
15afbcd0 6707 """
a95a7133 6708 SetDimensions(self, int x, int y, int width, int height, int sizeFlags=SIZE_AUTO)
15afbcd0
RD
6709
6710 Sets the position and size of the window in pixels. The sizeFlags
6711 parameter indicates the interpretation of the other params if they are
e505d15e
RD
6712 equal to -1.
6713
6714 ======================== ======================================
6715 wx.SIZE_AUTO A -1 indicates that a class-specific
6716 default should be used.
6717 wx.SIZE_USE_EXISTING Axisting dimensions should be used if
6718 -1 values are supplied.
6719 wxSIZE_ALLOW_MINUS_ONE Allow dimensions of -1 and less to be
6720 interpreted as real dimensions, not
6721 default values.
6722 ======================== ======================================
6723
15afbcd0 6724 """
54f9ee45 6725 return _core_.Window_SetDimensions(*args, **kwargs)
d14a1e28 6726
e811c8ce 6727 def SetRect(*args, **kwargs):
15afbcd0 6728 """
a95a7133 6729 SetRect(self, Rect rect, int sizeFlags=SIZE_AUTO)
15afbcd0
RD
6730
6731 Sets the position and size of the window in pixels using a wx.Rect.
6732 """
54f9ee45 6733 return _core_.Window_SetRect(*args, **kwargs)
d14a1e28 6734
e811c8ce 6735 def SetSizeWH(*args, **kwargs):
15afbcd0 6736 """
a95a7133 6737 SetSizeWH(self, int width, int height)
15afbcd0
RD
6738
6739 Sets the size of the window in pixels.
6740 """
54f9ee45 6741 return _core_.Window_SetSizeWH(*args, **kwargs)
d14a1e28 6742
e811c8ce 6743 def Move(*args, **kwargs):
15afbcd0 6744 """
a95a7133 6745 Move(self, Point pt, int flags=SIZE_USE_EXISTING)
15afbcd0
RD
6746
6747 Moves the window to the given position.
6748 """
54f9ee45 6749 return _core_.Window_Move(*args, **kwargs)
d14a1e28 6750
e811c8ce
RD
6751 SetPosition = Move
6752 def MoveXY(*args, **kwargs):
15afbcd0 6753 """
a95a7133 6754 MoveXY(self, int x, int y, int flags=SIZE_USE_EXISTING)
15afbcd0
RD
6755
6756 Moves the window to the given position.
6757 """
54f9ee45 6758 return _core_.Window_MoveXY(*args, **kwargs)
e811c8ce 6759
f8167d6e
RD
6760 def SetBestFittingSize(*args, **kwargs):
6761 """
6762 SetBestFittingSize(self, Size size=DefaultSize)
6763
6764 A 'Smart' SetSize that will fill in default size components with the
6765 window's *best size* values. Also set's the minsize for use with sizers.
6766 """
6767 return _core_.Window_SetBestFittingSize(*args, **kwargs)
6768
e811c8ce 6769 def Raise(*args, **kwargs):
15afbcd0 6770 """
a95a7133 6771 Raise(self)
15afbcd0
RD
6772
6773 Raises the window to the top of the window hierarchy if it is a
6774 managed window (dialog or frame).
6775 """
54f9ee45 6776 return _core_.Window_Raise(*args, **kwargs)
e811c8ce
RD
6777
6778 def Lower(*args, **kwargs):
15afbcd0 6779 """
a95a7133 6780 Lower(self)
15afbcd0
RD
6781
6782 Lowers the window to the bottom of the window hierarchy if it is a
6783 managed window (dialog or frame).
6784 """
54f9ee45 6785 return _core_.Window_Lower(*args, **kwargs)
e811c8ce
RD
6786
6787 def SetClientSize(*args, **kwargs):
15afbcd0 6788 """
a95a7133 6789 SetClientSize(self, Size size)
15afbcd0
RD
6790
6791 This sets the size of the window client area in pixels. Using this
6792 function to size a window tends to be more device-independent than
6793 wx.Window.SetSize, since the application need not worry about what
6794 dimensions the border or title bar have when trying to fit the window
6795 around panel items, for example.
6796 """
54f9ee45 6797 return _core_.Window_SetClientSize(*args, **kwargs)
e811c8ce
RD
6798
6799 def SetClientSizeWH(*args, **kwargs):
15afbcd0 6800 """
a95a7133 6801 SetClientSizeWH(self, int width, int height)
15afbcd0
RD
6802
6803 This sets the size of the window client area in pixels. Using this
6804 function to size a window tends to be more device-independent than
6805 wx.Window.SetSize, since the application need not worry about what
6806 dimensions the border or title bar have when trying to fit the window
6807 around panel items, for example.
6808 """
54f9ee45 6809 return _core_.Window_SetClientSizeWH(*args, **kwargs)
e811c8ce
RD
6810
6811 def SetClientRect(*args, **kwargs):
15afbcd0 6812 """
a95a7133 6813 SetClientRect(self, Rect rect)
15afbcd0
RD
6814
6815 This sets the size of the window client area in pixels. Using this
6816 function to size a window tends to be more device-independent than
6817 wx.Window.SetSize, since the application need not worry about what
6818 dimensions the border or title bar have when trying to fit the window
6819 around panel items, for example.
6820 """
54f9ee45 6821 return _core_.Window_SetClientRect(*args, **kwargs)
e811c8ce
RD
6822
6823 def GetPosition(*args, **kwargs):
0df68c9f 6824 """
a95a7133 6825 GetPosition(self) -> Point
e811c8ce 6826
0df68c9f
RD
6827 Get the window's position.
6828 """
54f9ee45 6829 return _core_.Window_GetPosition(*args, **kwargs)
e811c8ce
RD
6830
6831 def GetPositionTuple(*args, **kwargs):
0df68c9f
RD
6832 """
6833 GetPositionTuple() -> (x,y)
e811c8ce 6834
0df68c9f
RD
6835 Get the window's position.
6836 """
54f9ee45 6837 return _core_.Window_GetPositionTuple(*args, **kwargs)
e811c8ce
RD
6838
6839 def GetSize(*args, **kwargs):
0df68c9f 6840 """
a95a7133 6841 GetSize(self) -> Size
e811c8ce 6842
0df68c9f
RD
6843 Get the window size.
6844 """
54f9ee45 6845 return _core_.Window_GetSize(*args, **kwargs)
e811c8ce
RD
6846
6847 def GetSizeTuple(*args, **kwargs):
0df68c9f
RD
6848 """
6849 GetSizeTuple() -> (width, height)
e811c8ce 6850
0df68c9f
RD
6851 Get the window size.
6852 """
54f9ee45 6853 return _core_.Window_GetSizeTuple(*args, **kwargs)
e811c8ce
RD
6854
6855 def GetRect(*args, **kwargs):
15afbcd0 6856 """
a95a7133 6857 GetRect(self) -> Rect
15afbcd0
RD
6858
6859 Returns the size and position of the window as a wx.Rect object.
6860 """
54f9ee45 6861 return _core_.Window_GetRect(*args, **kwargs)
e811c8ce
RD
6862
6863 def GetClientSize(*args, **kwargs):
0df68c9f 6864 """
a95a7133 6865 GetClientSize(self) -> Size
e811c8ce 6866
15afbcd0
RD
6867 This gets the size of the window's 'client area' in pixels. The client
6868 area is the area which may be drawn on by the programmer, excluding
6869 title bar, border, scrollbars, etc.
0df68c9f 6870 """
54f9ee45 6871 return _core_.Window_GetClientSize(*args, **kwargs)
e811c8ce
RD
6872
6873 def GetClientSizeTuple(*args, **kwargs):
0df68c9f
RD
6874 """
6875 GetClientSizeTuple() -> (width, height)
e811c8ce 6876
15afbcd0
RD
6877 This gets the size of the window's 'client area' in pixels. The client
6878 area is the area which may be drawn on by the programmer, excluding
6879 title bar, border, scrollbars, etc.
0df68c9f 6880 """
54f9ee45 6881 return _core_.Window_GetClientSizeTuple(*args, **kwargs)
e811c8ce
RD
6882
6883 def GetClientAreaOrigin(*args, **kwargs):
15afbcd0 6884 """
a95a7133 6885 GetClientAreaOrigin(self) -> Point
15afbcd0
RD
6886
6887 Get the origin of the client area of the window relative to the
6888 window's top left corner (the client area may be shifted because of
6889 the borders, scrollbars, other decorations...)
6890 """
54f9ee45 6891 return _core_.Window_GetClientAreaOrigin(*args, **kwargs)
e811c8ce
RD
6892
6893 def GetClientRect(*args, **kwargs):
15afbcd0 6894 """
a95a7133 6895 GetClientRect(self) -> Rect
15afbcd0 6896
61863841 6897 Get the client area position and size as a `wx.Rect` object.
15afbcd0 6898 """
54f9ee45 6899 return _core_.Window_GetClientRect(*args, **kwargs)
e811c8ce
RD
6900
6901 def GetBestSize(*args, **kwargs):
0df68c9f 6902 """
a95a7133 6903 GetBestSize(self) -> Size
e811c8ce 6904
248ed943 6905 This function returns the best acceptable minimal size for the
41e2b43e
RD
6906 window, if applicable. For example, for a static text control, it will
6907 be the minimal size such that the control label is not truncated. For
6908 windows containing subwindows (suzh aswx.Panel), the size returned by
6909 this function will be the same as the size the window would have had
6910 after calling Fit.
0df68c9f 6911 """
54f9ee45 6912 return _core_.Window_GetBestSize(*args, **kwargs)
e811c8ce
RD
6913
6914 def GetBestSizeTuple(*args, **kwargs):
0df68c9f
RD
6915 """
6916 GetBestSizeTuple() -> (width, height)
e811c8ce 6917
248ed943 6918 This function returns the best acceptable minimal size for the
41e2b43e
RD
6919 window, if applicable. For example, for a static text control, it will
6920 be the minimal size such that the control label is not truncated. For
6921 windows containing subwindows (suzh aswx.Panel), the size returned by
6922 this function will be the same as the size the window would have had
6923 after calling Fit.
0df68c9f 6924 """
54f9ee45 6925 return _core_.Window_GetBestSizeTuple(*args, **kwargs)
e811c8ce 6926
dfbb5885
RD
6927 def InvalidateBestSize(*args, **kwargs):
6928 """
6929 InvalidateBestSize(self)
6930
6931 Reset the cached best size value so it will be recalculated the next
6932 time it is needed.
6933 """
6934 return _core_.Window_InvalidateBestSize(*args, **kwargs)
6935
6936 def GetBestFittingSize(*args, **kwargs):
6937 """
6938 GetBestFittingSize(self) -> Size
6939
6940 This function will merge the window's best size into the window's
6941 minimum size, giving priority to the min size components, and returns
6942 the results.
6943
6944 """
6945 return _core_.Window_GetBestFittingSize(*args, **kwargs)
6946
e811c8ce 6947 def GetAdjustedBestSize(*args, **kwargs):
15afbcd0 6948 """
a95a7133 6949 GetAdjustedBestSize(self) -> Size
15afbcd0
RD
6950
6951 This method is similar to GetBestSize, except in one
6952 thing. GetBestSize should return the minimum untruncated size of the
6953 window, while this method will return the largest of BestSize and any
6954 user specified minimum size. ie. it is the minimum size the window
6955 should currently be drawn at, not the minimal size it can possibly
6956 tolerate.
6957 """
54f9ee45 6958 return _core_.Window_GetAdjustedBestSize(*args, **kwargs)
e811c8ce
RD
6959
6960 def Center(*args, **kwargs):
15afbcd0 6961 """
a95a7133 6962 Center(self, int direction=BOTH)
15afbcd0
RD
6963
6964 Centers the window. The parameter specifies the direction for
6965 cetering, and may be wx.HORIZONTAL, wx.VERTICAL or wx.BOTH. It may
6966 also include wx.CENTER_ON_SCREEN flag if you want to center the window
6967 on the entire screen and not on its parent window. If it is a
6968 top-level window and has no parent then it will always be centered
6969 relative to the screen.
6970 """
54f9ee45 6971 return _core_.Window_Center(*args, **kwargs)
e811c8ce
RD
6972
6973 Centre = Center
6974 def CenterOnScreen(*args, **kwargs):
15afbcd0 6975 """
a95a7133 6976 CenterOnScreen(self, int dir=BOTH)
15afbcd0
RD
6977
6978 Center on screen (only works for top level windows)
6979 """
54f9ee45 6980 return _core_.Window_CenterOnScreen(*args, **kwargs)
e811c8ce
RD
6981
6982 CentreOnScreen = CenterOnScreen
6983 def CenterOnParent(*args, **kwargs):
15afbcd0 6984 """
a95a7133 6985 CenterOnParent(self, int dir=BOTH)
15afbcd0
RD
6986
6987 Center with respect to the the parent window
6988 """
54f9ee45 6989 return _core_.Window_CenterOnParent(*args, **kwargs)
e811c8ce
RD
6990
6991 CentreOnParent = CenterOnParent
6992 def Fit(*args, **kwargs):
15afbcd0 6993 """
a95a7133 6994 Fit(self)
15afbcd0
RD
6995
6996 Sizes the window so that it fits around its subwindows. This function
6997 won't do anything if there are no subwindows and will only really work
6998 correctly if sizers are used for the subwindows layout. Also, if the
6999 window has exactly one subwindow it is better (faster and the result
7000 is more precise as Fit adds some margin to account for fuzziness of
7001 its calculations) to call window.SetClientSize(child.GetSize())
7002 instead of calling Fit.
7003 """
54f9ee45 7004 return _core_.Window_Fit(*args, **kwargs)
e811c8ce
RD
7005
7006 def FitInside(*args, **kwargs):
15afbcd0 7007 """
a95a7133 7008 FitInside(self)
15afbcd0
RD
7009
7010 Similar to Fit, but sizes the interior (virtual) size of a
7011 window. Mainly useful with scrolled windows to reset scrollbars after
7012 sizing changes that do not trigger a size event, and/or scrolled
7013 windows without an interior sizer. This function similarly won't do
7014 anything if there are no subwindows.
7015 """
54f9ee45 7016 return _core_.Window_FitInside(*args, **kwargs)
e811c8ce 7017
f16ab95d 7018 def SetSizeHints(*args, **kwargs):
0df68c9f 7019 """
a95a7133 7020 SetSizeHints(self, int minW, int minH, int maxW=-1, int maxH=-1, int incW=-1,
0df68c9f 7021 int incH=-1)
15afbcd0
RD
7022
7023 Allows specification of minimum and maximum window sizes, and window
7024 size increments. If a pair of values is not set (or set to -1), the
7025 default values will be used. If this function is called, the user
908b74cd
RD
7026 will not be able to size the window outside the given bounds (if it is
7027 a top-level window.) Sizers will also inspect the minimum window size
7028 and will use that value if set when calculating layout.
7029
7030 The resizing increments are only significant under Motif or Xt.
0df68c9f 7031 """
f16ab95d 7032 return _core_.Window_SetSizeHints(*args, **kwargs)
e811c8ce 7033
f16ab95d
RD
7034 def SetSizeHintsSz(*args, **kwargs):
7035 """
7036 SetSizeHintsSz(self, Size minSize, Size maxSize=DefaultSize, Size incSize=DefaultSize)
7037
7038 Allows specification of minimum and maximum window sizes, and window
7039 size increments. If a pair of values is not set (or set to -1), the
7040 default values will be used. If this function is called, the user
7041 will not be able to size the window outside the given bounds (if it is
7042 a top-level window.) Sizers will also inspect the minimum window size
7043 and will use that value if set when calculating layout.
7044
7045 The resizing increments are only significant under Motif or Xt.
7046 """
7047 return _core_.Window_SetSizeHintsSz(*args, **kwargs)
7048
7049 def SetVirtualSizeHints(*args, **kwargs):
15afbcd0 7050 """
908b74cd 7051 SetVirtualSizeHints(self, int minW, int minH, int maxW=-1, int maxH=-1)
15afbcd0
RD
7052
7053 Allows specification of minimum and maximum virtual window sizes. If a
7054 pair of values is not set (or set to -1), the default values will be
7055 used. If this function is called, the user will not be able to size
7056 the virtual area of the window outside the given bounds.
7057 """
f16ab95d
RD
7058 return _core_.Window_SetVirtualSizeHints(*args, **kwargs)
7059
7060 def SetVirtualSizeHintsSz(*args, **kwargs):
7061 """
7062 SetVirtualSizeHintsSz(self, Size minSize, Size maxSize=DefaultSize)
7063
7064 Allows specification of minimum and maximum virtual window sizes. If a
7065 pair of values is not set (or set to -1), the default values will be
7066 used. If this function is called, the user will not be able to size
7067 the virtual area of the window outside the given bounds.
7068 """
7069 return _core_.Window_SetVirtualSizeHintsSz(*args, **kwargs)
e811c8ce 7070
908b74cd
RD
7071 def GetMaxSize(*args, **kwargs):
7072 """GetMaxSize(self) -> Size"""
7073 return _core_.Window_GetMaxSize(*args, **kwargs)
7074
7075 def GetMinSize(*args, **kwargs):
7076 """GetMinSize(self) -> Size"""
7077 return _core_.Window_GetMinSize(*args, **kwargs)
7078
7079 def SetMinSize(*args, **kwargs):
7080 """
7081 SetMinSize(self, Size minSize)
7082
7083 A more convenient method than `SetSizeHints` for setting just the
7084 min size.
7085 """
7086 return _core_.Window_SetMinSize(*args, **kwargs)
7087
7088 def SetMaxSize(*args, **kwargs):
7089 """
7090 SetMaxSize(self, Size maxSize)
7091
7092 A more convenient method than `SetSizeHints` for setting just the
7093 max size.
7094 """
7095 return _core_.Window_SetMaxSize(*args, **kwargs)
7096
e811c8ce 7097 def GetMinWidth(*args, **kwargs):
a95a7133 7098 """GetMinWidth(self) -> int"""
54f9ee45 7099 return _core_.Window_GetMinWidth(*args, **kwargs)
e811c8ce
RD
7100
7101 def GetMinHeight(*args, **kwargs):
a95a7133 7102 """GetMinHeight(self) -> int"""
54f9ee45 7103 return _core_.Window_GetMinHeight(*args, **kwargs)
e811c8ce
RD
7104
7105 def GetMaxWidth(*args, **kwargs):
a95a7133 7106 """GetMaxWidth(self) -> int"""
54f9ee45 7107 return _core_.Window_GetMaxWidth(*args, **kwargs)
e811c8ce
RD
7108
7109 def GetMaxHeight(*args, **kwargs):
a95a7133 7110 """GetMaxHeight(self) -> int"""
54f9ee45 7111 return _core_.Window_GetMaxHeight(*args, **kwargs)
e811c8ce 7112
e811c8ce 7113 def SetVirtualSize(*args, **kwargs):
0df68c9f 7114 """
a95a7133 7115 SetVirtualSize(self, Size size)
e811c8ce 7116
15afbcd0
RD
7117 Set the the virtual size of a window in pixels. For most windows this
7118 is just the client area of the window, but for some like scrolled
7119 windows it is more or less independent of the screen window size.
0df68c9f 7120 """
54f9ee45 7121 return _core_.Window_SetVirtualSize(*args, **kwargs)
e811c8ce
RD
7122
7123 def SetVirtualSizeWH(*args, **kwargs):
0df68c9f 7124 """
a95a7133 7125 SetVirtualSizeWH(self, int w, int h)
e811c8ce 7126
15afbcd0
RD
7127 Set the the virtual size of a window in pixels. For most windows this
7128 is just the client area of the window, but for some like scrolled
7129 windows it is more or less independent of the screen window size.
0df68c9f 7130 """
54f9ee45 7131 return _core_.Window_SetVirtualSizeWH(*args, **kwargs)
e811c8ce
RD
7132
7133 def GetVirtualSize(*args, **kwargs):
0df68c9f 7134 """
a95a7133 7135 GetVirtualSize(self) -> Size
e811c8ce 7136
15afbcd0
RD
7137 Get the the virtual size of the window in pixels. For most windows
7138 this is just the client area of the window, but for some like scrolled
7139 windows it is more or less independent of the screen window size.
0df68c9f 7140 """
54f9ee45 7141 return _core_.Window_GetVirtualSize(*args, **kwargs)
e811c8ce
RD
7142
7143 def GetVirtualSizeTuple(*args, **kwargs):
0df68c9f
RD
7144 """
7145 GetVirtualSizeTuple() -> (width, height)
e811c8ce 7146
15afbcd0
RD
7147 Get the the virtual size of the window in pixels. For most windows
7148 this is just the client area of the window, but for some like scrolled
7149 windows it is more or less independent of the screen window size.
0df68c9f 7150 """
54f9ee45 7151 return _core_.Window_GetVirtualSizeTuple(*args, **kwargs)
e811c8ce
RD
7152
7153 def GetBestVirtualSize(*args, **kwargs):
15afbcd0 7154 """
a95a7133 7155 GetBestVirtualSize(self) -> Size
15afbcd0
RD
7156
7157 Return the largest of ClientSize and BestSize (as determined by a
7158 sizer, interior children, or other means)
7159 """
54f9ee45 7160 return _core_.Window_GetBestVirtualSize(*args, **kwargs)
e811c8ce
RD
7161
7162 def Show(*args, **kwargs):
15afbcd0 7163 """
a95a7133 7164 Show(self, bool show=True) -> bool
15afbcd0
RD
7165
7166 Shows or hides the window. You may need to call Raise for a top level
7167 window if you want to bring it to top, although this is not needed if
7168 Show is called immediately after the frame creation. Returns True if
7169 the window has been shown or hidden or False if nothing was done
7170 because it already was in the requested state.
7171 """
54f9ee45 7172 return _core_.Window_Show(*args, **kwargs)
e811c8ce
RD
7173
7174 def Hide(*args, **kwargs):
15afbcd0 7175 """
a95a7133 7176 Hide(self) -> bool
15afbcd0
RD
7177
7178 Equivalent to calling Show(False).
7179 """
54f9ee45 7180 return _core_.Window_Hide(*args, **kwargs)
e811c8ce
RD
7181
7182 def Enable(*args, **kwargs):
15afbcd0 7183 """
a95a7133 7184 Enable(self, bool enable=True) -> bool
15afbcd0
RD
7185
7186 Enable or disable the window for user input. Note that when a parent
7187 window is disabled, all of its children are disabled as well and they
7188 are reenabled again when the parent is. Returns true if the window
7189 has been enabled or disabled, false if nothing was done, i.e. if the
7190 window had already been in the specified state.
7191 """
54f9ee45 7192 return _core_.Window_Enable(*args, **kwargs)
e811c8ce
RD
7193
7194 def Disable(*args, **kwargs):
15afbcd0 7195 """
a95a7133 7196 Disable(self) -> bool
15afbcd0
RD
7197
7198 Disables the window, same as Enable(false).
7199 """
54f9ee45 7200 return _core_.Window_Disable(*args, **kwargs)
e811c8ce
RD
7201
7202 def IsShown(*args, **kwargs):
15afbcd0 7203 """
a95a7133 7204 IsShown(self) -> bool
15afbcd0
RD
7205
7206 Returns true if the window is shown, false if it has been hidden.
7207 """
54f9ee45 7208 return _core_.Window_IsShown(*args, **kwargs)
e811c8ce
RD
7209
7210 def IsEnabled(*args, **kwargs):
15afbcd0 7211 """
a95a7133 7212 IsEnabled(self) -> bool
15afbcd0
RD
7213
7214 Returns true if the window is enabled for input, false otherwise.
7215 """
54f9ee45 7216 return _core_.Window_IsEnabled(*args, **kwargs)
e811c8ce
RD
7217
7218 def SetWindowStyleFlag(*args, **kwargs):
15afbcd0 7219 """
a95a7133 7220 SetWindowStyleFlag(self, long style)
15afbcd0 7221
41e2b43e
RD
7222 Sets the style of the window. Please note that some styles cannot be
7223 changed after the window creation and that Refresh() might need to be
7224 called after changing the others for the change to take place
7225 immediately.
15afbcd0 7226 """
54f9ee45 7227 return _core_.Window_SetWindowStyleFlag(*args, **kwargs)
e811c8ce
RD
7228
7229 def GetWindowStyleFlag(*args, **kwargs):
15afbcd0 7230 """
a95a7133 7231 GetWindowStyleFlag(self) -> long
e811c8ce 7232
15afbcd0
RD
7233 Gets the window style that was passed to the constructor or Create
7234 method.
7235 """
54f9ee45 7236 return _core_.Window_GetWindowStyleFlag(*args, **kwargs)
e811c8ce 7237
15afbcd0 7238 SetWindowStyle = SetWindowStyleFlag; GetWindowStyle = GetWindowStyleFlag
e811c8ce 7239 def HasFlag(*args, **kwargs):
15afbcd0 7240 """
a95a7133 7241 HasFlag(self, int flag) -> bool
15afbcd0
RD
7242
7243 Test if the given style is set for this window.
7244 """
54f9ee45 7245 return _core_.Window_HasFlag(*args, **kwargs)
e811c8ce
RD
7246
7247 def IsRetained(*args, **kwargs):
15afbcd0 7248 """
a95a7133 7249 IsRetained(self) -> bool
15afbcd0
RD
7250
7251 Returns true if the window is retained, false otherwise. Retained
7252 windows are only available on X platforms.
7253 """
54f9ee45 7254 return _core_.Window_IsRetained(*args, **kwargs)
e811c8ce
RD
7255
7256 def SetExtraStyle(*args, **kwargs):
15afbcd0 7257 """
a95a7133 7258 SetExtraStyle(self, long exStyle)
15afbcd0
RD
7259
7260 Sets the extra style bits for the window. Extra styles are the less
7261 often used style bits which can't be set with the constructor or with
7262 SetWindowStyleFlag()
7263 """
54f9ee45 7264 return _core_.Window_SetExtraStyle(*args, **kwargs)
e811c8ce
RD
7265
7266 def GetExtraStyle(*args, **kwargs):
15afbcd0 7267 """
a95a7133 7268 GetExtraStyle(self) -> long
15afbcd0
RD
7269
7270 Returns the extra style bits for the window.
7271 """
54f9ee45 7272 return _core_.Window_GetExtraStyle(*args, **kwargs)
e811c8ce
RD
7273
7274 def MakeModal(*args, **kwargs):
15afbcd0 7275 """
a95a7133 7276 MakeModal(self, bool modal=True)
15afbcd0
RD
7277
7278 Disables all other windows in the application so that the user can
7279 only interact with this window. Passing False will reverse this
7280 effect.
7281 """
54f9ee45 7282 return _core_.Window_MakeModal(*args, **kwargs)
e811c8ce
RD
7283
7284 def SetThemeEnabled(*args, **kwargs):
15afbcd0 7285 """
a95a7133 7286 SetThemeEnabled(self, bool enableTheme)
15afbcd0
RD
7287
7288 This function tells a window if it should use the system's "theme"
7289 code to draw the windows' background instead if its own background
7290 drawing code. This will only have an effect on platforms that support
7291 the notion of themes in user defined windows. One such platform is
7292 GTK+ where windows can have (very colourful) backgrounds defined by a
7293 user's selected theme.
7294
7295 Dialogs, notebook pages and the status bar have this flag set to true
7296 by default so that the default look and feel is simulated best.
7297 """
54f9ee45 7298 return _core_.Window_SetThemeEnabled(*args, **kwargs)
e811c8ce
RD
7299
7300 def GetThemeEnabled(*args, **kwargs):
15afbcd0 7301 """
a95a7133 7302 GetThemeEnabled(self) -> bool
e811c8ce 7303
15afbcd0
RD
7304 Return the themeEnabled flag.
7305 """
54f9ee45 7306 return _core_.Window_GetThemeEnabled(*args, **kwargs)
e811c8ce
RD
7307
7308 def SetFocus(*args, **kwargs):
15afbcd0 7309 """
a95a7133 7310 SetFocus(self)
15afbcd0
RD
7311
7312 Set's the focus to this window, allowing it to receive keyboard input.
7313 """
54f9ee45 7314 return _core_.Window_SetFocus(*args, **kwargs)
e811c8ce
RD
7315
7316 def SetFocusFromKbd(*args, **kwargs):
15afbcd0 7317 """
a95a7133 7318 SetFocusFromKbd(self)
15afbcd0
RD
7319
7320 Set focus to this window as the result of a keyboard action. Normally
7321 only called internally.
7322 """
54f9ee45 7323 return _core_.Window_SetFocusFromKbd(*args, **kwargs)
e811c8ce
RD
7324
7325 def FindFocus(*args, **kwargs):
15afbcd0 7326 """
66c033b4 7327 FindFocus() -> Window
15afbcd0
RD
7328
7329 Returns the window or control that currently has the keyboard focus,
7330 or None.
7331 """
54f9ee45 7332 return _core_.Window_FindFocus(*args, **kwargs)
e811c8ce
RD
7333
7334 FindFocus = staticmethod(FindFocus)
7335 def AcceptsFocus(*args, **kwargs):
15afbcd0 7336 """
a95a7133 7337 AcceptsFocus(self) -> bool
15afbcd0
RD
7338
7339 Can this window have focus?
7340 """
54f9ee45 7341 return _core_.Window_AcceptsFocus(*args, **kwargs)
e811c8ce
RD
7342
7343 def AcceptsFocusFromKeyboard(*args, **kwargs):
15afbcd0 7344 """
a95a7133 7345 AcceptsFocusFromKeyboard(self) -> bool
15afbcd0
RD
7346
7347 Can this window be given focus by keyboard navigation? if not, the
7348 only way to give it focus (provided it accepts it at all) is to click
7349 it.
7350 """
54f9ee45 7351 return _core_.Window_AcceptsFocusFromKeyboard(*args, **kwargs)
e811c8ce
RD
7352
7353 def GetDefaultItem(*args, **kwargs):
15afbcd0 7354 """
a95a7133 7355 GetDefaultItem(self) -> Window
15afbcd0
RD
7356
7357 Get the default child of this parent, i.e. the one which is activated
7358 by pressing <Enter> such as the OK button on a wx.Dialog.
7359 """
54f9ee45 7360 return _core_.Window_GetDefaultItem(*args, **kwargs)
e811c8ce
RD
7361
7362 def SetDefaultItem(*args, **kwargs):
15afbcd0 7363 """
a95a7133 7364 SetDefaultItem(self, Window child) -> Window
15afbcd0
RD
7365
7366 Set this child as default, return the old default.
7367 """
54f9ee45 7368 return _core_.Window_SetDefaultItem(*args, **kwargs)
e811c8ce
RD
7369
7370 def SetTmpDefaultItem(*args, **kwargs):
15afbcd0 7371 """
a95a7133 7372 SetTmpDefaultItem(self, Window win)
15afbcd0
RD
7373
7374 Set this child as temporary default
7375 """
54f9ee45 7376 return _core_.Window_SetTmpDefaultItem(*args, **kwargs)
e811c8ce 7377
908b74cd
RD
7378 def Navigate(*args, **kwargs):
7379 """
7380 Navigate(self, int flags=NavigationKeyEvent.IsForward) -> bool
7381
fd2dc343
RD
7382 Does keyboard navigation from this window to another, by sending a
7383 `wx.NavigationKeyEvent`.
908b74cd
RD
7384 """
7385 return _core_.Window_Navigate(*args, **kwargs)
7386
7f98d120
RD
7387 def MoveAfterInTabOrder(*args, **kwargs):
7388 """
7389 MoveAfterInTabOrder(self, Window win)
7390
7391 Moves this window in the tab navigation order after the specified
7392 sibling window. This means that when the user presses the TAB key on
7393 that other window, the focus switches to this window.
7394
7395 The default tab order is the same as creation order. This function
7396 and `MoveBeforeInTabOrder` allow to change it after creating all the
7397 windows.
7398
7399 """
7400 return _core_.Window_MoveAfterInTabOrder(*args, **kwargs)
7401
7402 def MoveBeforeInTabOrder(*args, **kwargs):
7403 """
7404 MoveBeforeInTabOrder(self, Window win)
7405
7406 Same as `MoveAfterInTabOrder` except that it inserts this window just
7407 before win instead of putting it right after it.
7408 """
7409 return _core_.Window_MoveBeforeInTabOrder(*args, **kwargs)
7410
e811c8ce 7411 def GetChildren(*args, **kwargs):
15afbcd0 7412 """
a95a7133 7413 GetChildren(self) -> PyObject
15afbcd0
RD
7414
7415 Returns a list of the window's children. NOTE: Currently this is a
7416 copy of the child window list maintained by the window, so the return
7417 value of this function is only valid as long as the window's children
7418 do not change.
7419 """
54f9ee45 7420 return _core_.Window_GetChildren(*args, **kwargs)
e811c8ce
RD
7421
7422 def GetParent(*args, **kwargs):
15afbcd0 7423 """
a95a7133 7424 GetParent(self) -> Window
15afbcd0
RD
7425
7426 Returns the parent window of this window, or None if there isn't one.
7427 """
54f9ee45 7428 return _core_.Window_GetParent(*args, **kwargs)
e811c8ce
RD
7429
7430 def GetGrandParent(*args, **kwargs):
15afbcd0 7431 """
a95a7133 7432 GetGrandParent(self) -> Window
15afbcd0 7433
41e2b43e
RD
7434 Returns the parent of the parent of this window, or None if there
7435 isn't one.
15afbcd0 7436 """
54f9ee45 7437 return _core_.Window_GetGrandParent(*args, **kwargs)
e811c8ce
RD
7438
7439 def IsTopLevel(*args, **kwargs):
15afbcd0 7440 """
a95a7133 7441 IsTopLevel(self) -> bool
15afbcd0
RD
7442
7443 Returns true if the given window is a top-level one. Currently all
7444 frames and dialogs are always considered to be top-level windows (even
7445 if they have a parent window).
7446 """
54f9ee45 7447 return _core_.Window_IsTopLevel(*args, **kwargs)
e811c8ce
RD
7448
7449 def Reparent(*args, **kwargs):
15afbcd0 7450 """
a95a7133 7451 Reparent(self, Window newParent) -> bool
15afbcd0
RD
7452
7453 Reparents the window, i.e the window will be removed from its current
7454 parent window (e.g. a non-standard toolbar in a wxFrame) and then
7455 re-inserted into another. Available on Windows and GTK. Returns True
7456 if the parent was changed, False otherwise (error or newParent ==
7457 oldParent)
7458 """
54f9ee45 7459 return _core_.Window_Reparent(*args, **kwargs)
e811c8ce
RD
7460
7461 def AddChild(*args, **kwargs):
15afbcd0 7462 """
a95a7133 7463 AddChild(self, Window child)
15afbcd0
RD
7464
7465 Adds a child window. This is called automatically by window creation
7466 functions so should not be required by the application programmer.
7467 """
54f9ee45 7468 return _core_.Window_AddChild(*args, **kwargs)
e811c8ce
RD
7469
7470 def RemoveChild(*args, **kwargs):
15afbcd0 7471 """
a95a7133 7472 RemoveChild(self, Window child)
15afbcd0
RD
7473
7474 Removes a child window. This is called automatically by window
7475 deletion functions so should not be required by the application
7476 programmer.
7477 """
54f9ee45 7478 return _core_.Window_RemoveChild(*args, **kwargs)
e811c8ce
RD
7479
7480 def FindWindowById(*args, **kwargs):
15afbcd0 7481 """
a95a7133 7482 FindWindowById(self, long winid) -> Window
15afbcd0
RD
7483
7484 Find a chld of this window by window ID
7485 """
54f9ee45 7486 return _core_.Window_FindWindowById(*args, **kwargs)
e811c8ce
RD
7487
7488 def FindWindowByName(*args, **kwargs):
15afbcd0 7489 """
a95a7133 7490 FindWindowByName(self, String name) -> Window
15afbcd0
RD
7491
7492 Find a child of this window by name
7493 """
54f9ee45 7494 return _core_.Window_FindWindowByName(*args, **kwargs)
e811c8ce
RD
7495
7496 def GetEventHandler(*args, **kwargs):
15afbcd0 7497 """
a95a7133 7498 GetEventHandler(self) -> EvtHandler
15afbcd0
RD
7499
7500 Returns the event handler for this window. By default, the window is
7501 its own event handler.
7502 """
54f9ee45 7503 return _core_.Window_GetEventHandler(*args, **kwargs)
e811c8ce
RD
7504
7505 def SetEventHandler(*args, **kwargs):
15afbcd0 7506 """
a95a7133 7507 SetEventHandler(self, EvtHandler handler)
15afbcd0
RD
7508
7509 Sets the event handler for this window. An event handler is an object
7510 that is capable of processing the events sent to a window. By default,
7511 the window is its own event handler, but an application may wish to
7512 substitute another, for example to allow central implementation of
7513 event-handling for a variety of different window classes.
7514
41e2b43e 7515 It is usually better to use `wx.Window.PushEventHandler` since this sets
15afbcd0
RD
7516 up a chain of event handlers, where an event not handled by one event
7517 handler is handed to the next one in the chain.
7518 """
54f9ee45 7519 return _core_.Window_SetEventHandler(*args, **kwargs)
e811c8ce
RD
7520
7521 def PushEventHandler(*args, **kwargs):
15afbcd0 7522 """
a95a7133 7523 PushEventHandler(self, EvtHandler handler)
15afbcd0
RD
7524
7525 Pushes this event handler onto the event handler stack for the window.
7526 An event handler is an object that is capable of processing the events
7527 sent to a window. By default, the window is its own event handler, but
7528 an application may wish to substitute another, for example to allow
7529 central implementation of event-handling for a variety of different
7530 window classes.
7531
7532 wx.Window.PushEventHandler allows an application to set up a chain of
7533 event handlers, where an event not handled by one event handler is
41e2b43e 7534 handed to the next one in the chain. Use `wx.Window.PopEventHandler` to
15afbcd0
RD
7535 remove the event handler.
7536 """
54f9ee45 7537 return _core_.Window_PushEventHandler(*args, **kwargs)
e811c8ce
RD
7538
7539 def PopEventHandler(*args, **kwargs):
15afbcd0 7540 """
a95a7133 7541 PopEventHandler(self, bool deleteHandler=False) -> EvtHandler
15afbcd0
RD
7542
7543 Removes and returns the top-most event handler on the event handler
7544 stack. If deleteHandler is True then the wx.EvtHandler object will be
7545 destroyed after it is popped.
7546 """
54f9ee45 7547 return _core_.Window_PopEventHandler(*args, **kwargs)
e811c8ce
RD
7548
7549 def RemoveEventHandler(*args, **kwargs):
15afbcd0 7550 """
a95a7133 7551 RemoveEventHandler(self, EvtHandler handler) -> bool
15afbcd0 7552
41e2b43e
RD
7553 Find the given handler in the event handler chain and remove (but not
7554 delete) it from the event handler chain, return True if it was found
7555 and False otherwise (this also results in an assert failure so this
7556 function should only be called when the handler is supposed to be
7557 there.)
15afbcd0 7558 """
54f9ee45 7559 return _core_.Window_RemoveEventHandler(*args, **kwargs)
e811c8ce
RD
7560
7561 def SetValidator(*args, **kwargs):
15afbcd0 7562 """
a95a7133 7563 SetValidator(self, Validator validator)
15afbcd0
RD
7564
7565 Deletes the current validator (if any) and sets the window validator,
7566 having called wx.Validator.Clone to create a new validator of this
7567 type.
7568 """
54f9ee45 7569 return _core_.Window_SetValidator(*args, **kwargs)
e811c8ce
RD
7570
7571 def GetValidator(*args, **kwargs):
15afbcd0 7572 """
a95a7133 7573 GetValidator(self) -> Validator
15afbcd0
RD
7574
7575 Returns a pointer to the current validator for the window, or None if
7576 there is none.
7577 """
54f9ee45 7578 return _core_.Window_GetValidator(*args, **kwargs)
e811c8ce 7579
74a57fcd
RD
7580 def Validate(*args, **kwargs):
7581 """
a95a7133 7582 Validate(self) -> bool
74a57fcd
RD
7583
7584 Validates the current values of the child controls using their
41e2b43e
RD
7585 validators. If the window has wx.WS_EX_VALIDATE_RECURSIVELY extra
7586 style flag set, the method will also call Validate() of all child
7587 windows. Returns false if any of the validations failed.
74a57fcd 7588 """
54f9ee45 7589 return _core_.Window_Validate(*args, **kwargs)
74a57fcd
RD
7590
7591 def TransferDataToWindow(*args, **kwargs):
7592 """
a95a7133 7593 TransferDataToWindow(self) -> bool
74a57fcd 7594
41e2b43e
RD
7595 Transfers values to child controls from data areas specified by their
7596 validators. If the window has wx.WS_EX_VALIDATE_RECURSIVELY extra
7597 style flag set, the method will also call TransferDataToWindow() of
7598 all child windows.
74a57fcd 7599 """
54f9ee45 7600 return _core_.Window_TransferDataToWindow(*args, **kwargs)
74a57fcd
RD
7601
7602 def TransferDataFromWindow(*args, **kwargs):
7603 """
a95a7133 7604 TransferDataFromWindow(self) -> bool
74a57fcd 7605
41e2b43e
RD
7606 Transfers values from child controls to data areas specified by their
7607 validators. Returns false if a transfer failed. If the window has
7608 wx.WS_EX_VALIDATE_RECURSIVELY extra style flag set, the method will
7609 also call TransferDataFromWindow() of all child windows.
74a57fcd 7610 """
54f9ee45 7611 return _core_.Window_TransferDataFromWindow(*args, **kwargs)
74a57fcd
RD
7612
7613 def InitDialog(*args, **kwargs):
7614 """
a95a7133 7615 InitDialog(self)
74a57fcd 7616
41e2b43e
RD
7617 Sends an EVT_INIT_DIALOG event, whose handler usually transfers data
7618 to the dialog via validators.
74a57fcd 7619 """
54f9ee45 7620 return _core_.Window_InitDialog(*args, **kwargs)
74a57fcd 7621
e811c8ce 7622 def SetAcceleratorTable(*args, **kwargs):
15afbcd0 7623 """
a95a7133 7624 SetAcceleratorTable(self, AcceleratorTable accel)
15afbcd0
RD
7625
7626 Sets the accelerator table for this window.
7627 """
54f9ee45 7628 return _core_.Window_SetAcceleratorTable(*args, **kwargs)
e811c8ce
RD
7629
7630 def GetAcceleratorTable(*args, **kwargs):
15afbcd0 7631 """
a95a7133 7632 GetAcceleratorTable(self) -> AcceleratorTable
15afbcd0
RD
7633
7634 Gets the accelerator table for this window.
7635 """
54f9ee45 7636 return _core_.Window_GetAcceleratorTable(*args, **kwargs)
e811c8ce
RD
7637
7638 def RegisterHotKey(*args, **kwargs):
15afbcd0 7639 """
a95a7133 7640 RegisterHotKey(self, int hotkeyId, int modifiers, int keycode) -> bool
15afbcd0
RD
7641
7642 Registers a system wide hotkey. Every time the user presses the hotkey
7643 registered here, this window will receive a hotkey event. It will
7644 receive the event even if the application is in the background and
7645 does not have the input focus because the user is working with some
7646 other application. To bind an event handler function to this hotkey
7647 use EVT_HOTKEY with an id equal to hotkeyId. Returns True if the
7648 hotkey was registered successfully.
7649 """
54f9ee45 7650 return _core_.Window_RegisterHotKey(*args, **kwargs)
e811c8ce
RD
7651
7652 def UnregisterHotKey(*args, **kwargs):
15afbcd0 7653 """
a95a7133 7654 UnregisterHotKey(self, int hotkeyId) -> bool
15afbcd0
RD
7655
7656 Unregisters a system wide hotkey.
7657 """
54f9ee45 7658 return _core_.Window_UnregisterHotKey(*args, **kwargs)
e811c8ce
RD
7659
7660 def ConvertDialogPointToPixels(*args, **kwargs):
15afbcd0 7661 """
a95a7133 7662 ConvertDialogPointToPixels(self, Point pt) -> Point
15afbcd0
RD
7663
7664 Converts a point or size from dialog units to pixels. Dialog units
7665 are used for maintaining a dialog's proportions even if the font
7666 changes. For the x dimension, the dialog units are multiplied by the
7667 average character width and then divided by 4. For the y dimension,
7668 the dialog units are multiplied by the average character height and
7669 then divided by 8.
7670 """
54f9ee45 7671 return _core_.Window_ConvertDialogPointToPixels(*args, **kwargs)
e811c8ce
RD
7672
7673 def ConvertDialogSizeToPixels(*args, **kwargs):
15afbcd0 7674 """
a95a7133 7675 ConvertDialogSizeToPixels(self, Size sz) -> Size
15afbcd0
RD
7676
7677 Converts a point or size from dialog units to pixels. Dialog units
7678 are used for maintaining a dialog's proportions even if the font
7679 changes. For the x dimension, the dialog units are multiplied by the
7680 average character width and then divided by 4. For the y dimension,
7681 the dialog units are multiplied by the average character height and
7682 then divided by 8.
7683 """
54f9ee45 7684 return _core_.Window_ConvertDialogSizeToPixels(*args, **kwargs)
e811c8ce
RD
7685
7686 def DLG_PNT(*args, **kwargs):
15afbcd0 7687 """
a95a7133 7688 DLG_PNT(self, Point pt) -> Point
15afbcd0
RD
7689
7690 Converts a point or size from dialog units to pixels. Dialog units
7691 are used for maintaining a dialog's proportions even if the font
7692 changes. For the x dimension, the dialog units are multiplied by the
7693 average character width and then divided by 4. For the y dimension,
7694 the dialog units are multiplied by the average character height and
7695 then divided by 8.
7696 """
54f9ee45 7697 return _core_.Window_DLG_PNT(*args, **kwargs)
e811c8ce
RD
7698
7699 def DLG_SZE(*args, **kwargs):
15afbcd0 7700 """
a95a7133 7701 DLG_SZE(self, Size sz) -> Size
15afbcd0
RD
7702
7703 Converts a point or size from dialog units to pixels. Dialog units
7704 are used for maintaining a dialog's proportions even if the font
7705 changes. For the x dimension, the dialog units are multiplied by the
7706 average character width and then divided by 4. For the y dimension,
7707 the dialog units are multiplied by the average character height and
7708 then divided by 8.
7709 """
54f9ee45 7710 return _core_.Window_DLG_SZE(*args, **kwargs)
e811c8ce
RD
7711
7712 def ConvertPixelPointToDialog(*args, **kwargs):
a95a7133 7713 """ConvertPixelPointToDialog(self, Point pt) -> Point"""
54f9ee45 7714 return _core_.Window_ConvertPixelPointToDialog(*args, **kwargs)
e811c8ce
RD
7715
7716 def ConvertPixelSizeToDialog(*args, **kwargs):
a95a7133 7717 """ConvertPixelSizeToDialog(self, Size sz) -> Size"""
54f9ee45 7718 return _core_.Window_ConvertPixelSizeToDialog(*args, **kwargs)
e811c8ce
RD
7719
7720 def WarpPointer(*args, **kwargs):
15afbcd0 7721 """
a95a7133 7722 WarpPointer(self, int x, int y)
15afbcd0
RD
7723
7724 Moves the pointer to the given position on the window.
7725
7726 NOTE: This function is not supported under Mac because Apple Human
7727 Interface Guidelines forbid moving the mouse cursor programmatically.
7728 """
54f9ee45 7729 return _core_.Window_WarpPointer(*args, **kwargs)
e811c8ce
RD
7730
7731 def CaptureMouse(*args, **kwargs):
15afbcd0 7732 """
a95a7133 7733 CaptureMouse(self)
15afbcd0
RD
7734
7735 Directs all mouse input to this window. Call wx.Window.ReleaseMouse to
7736 release the capture.
7737
7738 Note that wxWindows maintains the stack of windows having captured the
7739 mouse and when the mouse is released the capture returns to the window
7740 which had had captured it previously and it is only really released if
7741 there were no previous window. In particular, this means that you must
7742 release the mouse as many times as you capture it.
7743 """
54f9ee45 7744 return _core_.Window_CaptureMouse(*args, **kwargs)
e811c8ce
RD
7745
7746 def ReleaseMouse(*args, **kwargs):
15afbcd0 7747 """
a95a7133 7748 ReleaseMouse(self)
15afbcd0
RD
7749
7750 Releases mouse input captured with wx.Window.CaptureMouse.
7751 """
54f9ee45 7752 return _core_.Window_ReleaseMouse(*args, **kwargs)
e811c8ce
RD
7753
7754 def GetCapture(*args, **kwargs):
15afbcd0 7755 """
66c033b4 7756 GetCapture() -> Window
15afbcd0
RD
7757
7758 Returns the window which currently captures the mouse or None
7759 """
54f9ee45 7760 return _core_.Window_GetCapture(*args, **kwargs)
e811c8ce
RD
7761
7762 GetCapture = staticmethod(GetCapture)
7763 def HasCapture(*args, **kwargs):
15afbcd0 7764 """
a95a7133 7765 HasCapture(self) -> bool
15afbcd0
RD
7766
7767 Returns true if this window has the current mouse capture.
7768 """
54f9ee45 7769 return _core_.Window_HasCapture(*args, **kwargs)
e811c8ce
RD
7770
7771 def Refresh(*args, **kwargs):
15afbcd0 7772 """
a95a7133 7773 Refresh(self, bool eraseBackground=True, Rect rect=None)
15afbcd0
RD
7774
7775 Mark the specified rectangle (or the whole window) as "dirty" so it
7776 will be repainted. Causes an EVT_PAINT event to be generated and sent
7777 to the window.
7778 """
54f9ee45 7779 return _core_.Window_Refresh(*args, **kwargs)
e811c8ce
RD
7780
7781 def RefreshRect(*args, **kwargs):
15afbcd0 7782 """
fef4c27a 7783 RefreshRect(self, Rect rect, bool eraseBackground=True)
15afbcd0
RD
7784
7785 Redraws the contents of the given rectangle: the area inside it will
7786 be repainted. This is the same as Refresh but has a nicer syntax.
7787 """
54f9ee45 7788 return _core_.Window_RefreshRect(*args, **kwargs)
e811c8ce
RD
7789
7790 def Update(*args, **kwargs):
15afbcd0 7791 """
a95a7133 7792 Update(self)
15afbcd0
RD
7793
7794 Calling this method immediately repaints the invalidated area of the
7795 window instead of waiting for the EVT_PAINT event to happen, (normally
7796 this would usually only happen when the flow of control returns to the
7797 event loop.) Notice that this function doesn't refresh the window and
7798 does nothing if the window has been already repainted. Use Refresh
7799 first if you want to immediately redraw the window (or some portion of
7800 it) unconditionally.
7801 """
54f9ee45 7802 return _core_.Window_Update(*args, **kwargs)
e811c8ce
RD
7803
7804 def ClearBackground(*args, **kwargs):
15afbcd0 7805 """
a95a7133 7806 ClearBackground(self)
15afbcd0
RD
7807
7808 Clears the window by filling it with the current background
7809 colour. Does not cause an erase background event to be generated.
7810 """
54f9ee45 7811 return _core_.Window_ClearBackground(*args, **kwargs)
e811c8ce
RD
7812
7813 def Freeze(*args, **kwargs):
15afbcd0 7814 """
a95a7133 7815 Freeze(self)
15afbcd0 7816
41e2b43e
RD
7817 Freezes the window or, in other words, prevents any updates from
7818 taking place on screen, the window is not redrawn at all. Thaw must be
7819 called to reenable window redrawing. Calls to Freeze/Thaw may be
7820 nested, with the actual Thaw being delayed until all the nesting has
7821 been undone.
15afbcd0
RD
7822
7823 This method is useful for visual appearance optimization (for example,
7824 it is a good idea to use it before inserting large amount of text into
7825 a wxTextCtrl under wxGTK) but is not implemented on all platforms nor
7826 for all controls so it is mostly just a hint to wxWindows and not a
7827 mandatory directive.
7828 """
54f9ee45 7829 return _core_.Window_Freeze(*args, **kwargs)
e811c8ce
RD
7830
7831 def Thaw(*args, **kwargs):
15afbcd0 7832 """
a95a7133 7833 Thaw(self)
15afbcd0 7834
4276dc52 7835 Reenables window updating after a previous call to Freeze. Calls to
41e2b43e
RD
7836 Freeze/Thaw may be nested, so Thaw must be called the same number of
7837 times that Freeze was before the window will be updated.
15afbcd0 7838 """
54f9ee45 7839 return _core_.Window_Thaw(*args, **kwargs)
e811c8ce
RD
7840
7841 def PrepareDC(*args, **kwargs):
15afbcd0 7842 """
a95a7133 7843 PrepareDC(self, DC dc)
15afbcd0
RD
7844
7845 Call this function to prepare the device context for drawing a
7846 scrolled image. It sets the device origin according to the current
7847 scroll position.
7848 """
54f9ee45 7849 return _core_.Window_PrepareDC(*args, **kwargs)
e811c8ce
RD
7850
7851 def GetUpdateRegion(*args, **kwargs):
15afbcd0 7852 """
a95a7133 7853 GetUpdateRegion(self) -> Region
15afbcd0
RD
7854
7855 Returns the region specifying which parts of the window have been
7856 damaged. Should only be called within an EVT_PAINT handler.
7857 """
54f9ee45 7858 return _core_.Window_GetUpdateRegion(*args, **kwargs)
e811c8ce
RD
7859
7860 def GetUpdateClientRect(*args, **kwargs):
15afbcd0 7861 """
a95a7133 7862 GetUpdateClientRect(self) -> Rect
15afbcd0
RD
7863
7864 Get the update rectangle region bounding box in client coords.
7865 """
54f9ee45 7866 return _core_.Window_GetUpdateClientRect(*args, **kwargs)
e811c8ce
RD
7867
7868 def IsExposed(*args, **kwargs):
15afbcd0 7869 """
a95a7133 7870 IsExposed(self, int x, int y, int w=1, int h=1) -> bool
15afbcd0
RD
7871
7872 Returns true if the given point or rectangle area has been exposed
7873 since the last repaint. Call this in an paint event handler to
7874 optimize redrawing by only redrawing those areas, which have been
7875 exposed.
7876 """
54f9ee45 7877 return _core_.Window_IsExposed(*args, **kwargs)
e811c8ce
RD
7878
7879 def IsExposedPoint(*args, **kwargs):
15afbcd0 7880 """
a95a7133 7881 IsExposedPoint(self, Point pt) -> bool
15afbcd0
RD
7882
7883 Returns true if the given point or rectangle area has been exposed
7884 since the last repaint. Call this in an paint event handler to
7885 optimize redrawing by only redrawing those areas, which have been
7886 exposed.
7887 """
54f9ee45 7888 return _core_.Window_IsExposedPoint(*args, **kwargs)
e811c8ce 7889
4276dc52 7890 def IsExposedRect(*args, **kwargs):
15afbcd0 7891 """
a95a7133 7892 IsExposedRect(self, Rect rect) -> bool
15afbcd0
RD
7893
7894 Returns true if the given point or rectangle area has been exposed
7895 since the last repaint. Call this in an paint event handler to
7896 optimize redrawing by only redrawing those areas, which have been
7897 exposed.
7898 """
54f9ee45 7899 return _core_.Window_IsExposedRect(*args, **kwargs)
e811c8ce 7900
74a57fcd
RD
7901 def GetDefaultAttributes(*args, **kwargs):
7902 """
a95a7133 7903 GetDefaultAttributes(self) -> VisualAttributes
74a57fcd 7904
41e2b43e
RD
7905 Get the default attributes for an instance of this class. This is
7906 useful if you want to use the same font or colour in your own control
7907 as in a standard control -- which is a much better idea than hard
7908 coding specific colours or fonts which might look completely out of
db3e571a 7909 place on the user's system, especially if it uses themes.
74a57fcd 7910 """
54f9ee45 7911 return _core_.Window_GetDefaultAttributes(*args, **kwargs)
74a57fcd
RD
7912
7913 def GetClassDefaultAttributes(*args, **kwargs):
7914 """
66c033b4 7915 GetClassDefaultAttributes(int variant=WINDOW_VARIANT_NORMAL) -> VisualAttributes
74a57fcd 7916
41e2b43e
RD
7917 Get the default attributes for this class. This is useful if you want
7918 to use the same font or colour in your own control as in a standard
7919 control -- which is a much better idea than hard coding specific
db3e571a
RD
7920 colours or fonts which might look completely out of place on the
7921 user's system, especially if it uses themes.
74a57fcd
RD
7922
7923 The variant parameter is only relevant under Mac currently and is
41e2b43e 7924 ignore under other platforms. Under Mac, it will change the size of
db3e571a
RD
7925 the returned font. See `wx.Window.SetWindowVariant` for more about
7926 this.
74a57fcd 7927 """
54f9ee45 7928 return _core_.Window_GetClassDefaultAttributes(*args, **kwargs)
74a57fcd
RD
7929
7930 GetClassDefaultAttributes = staticmethod(GetClassDefaultAttributes)
e811c8ce 7931 def SetBackgroundColour(*args, **kwargs):
15afbcd0 7932 """
a95a7133 7933 SetBackgroundColour(self, Colour colour) -> bool
15afbcd0
RD
7934
7935 Sets the background colour of the window. Returns True if the colour
7936 was changed. The background colour is usually painted by the default
7937 EVT_ERASE_BACKGROUND event handler function under Windows and
f8167d6e
RD
7938 automatically under GTK. Using `wx.NullColour` will reset the window
7939 to the default background colour.
15afbcd0 7940
db3e571a 7941 Note that setting the background colour may not cause an immediate
f8167d6e 7942 refresh, so you may wish to call `ClearBackground` or `Refresh` after
15afbcd0
RD
7943 calling this function.
7944
f8167d6e
RD
7945 Using this function will disable attempts to use themes for this
7946 window, if the system supports them. Use with care since usually the
7947 themes represent the appearance chosen by the user to be used for all
7948 applications on the system.
15afbcd0 7949 """
54f9ee45 7950 return _core_.Window_SetBackgroundColour(*args, **kwargs)
e811c8ce 7951
412d302d
RD
7952 def SetOwnBackgroundColour(*args, **kwargs):
7953 """SetOwnBackgroundColour(self, Colour colour)"""
7954 return _core_.Window_SetOwnBackgroundColour(*args, **kwargs)
b2df227b 7955
e811c8ce 7956 def SetForegroundColour(*args, **kwargs):
15afbcd0 7957 """
a95a7133 7958 SetForegroundColour(self, Colour colour) -> bool
15afbcd0
RD
7959
7960 Sets the foreground colour of the window. Returns True is the colour
7961 was changed. The interpretation of foreground colour is dependent on
7962 the window class; it may be the text colour or other colour, or it may
7963 not be used at all.
7964 """
54f9ee45 7965 return _core_.Window_SetForegroundColour(*args, **kwargs)
e811c8ce 7966
fa47d7a7
VS
7967 def SetOwnForegroundColour(*args, **kwargs):
7968 """SetOwnForegroundColour(self, Colour colour)"""
7969 return _core_.Window_SetOwnForegroundColour(*args, **kwargs)
b2df227b 7970
e811c8ce 7971 def GetBackgroundColour(*args, **kwargs):
15afbcd0 7972 """
a95a7133 7973 GetBackgroundColour(self) -> Colour
15afbcd0
RD
7974
7975 Returns the background colour of the window.
7976 """
54f9ee45 7977 return _core_.Window_GetBackgroundColour(*args, **kwargs)
e811c8ce
RD
7978
7979 def GetForegroundColour(*args, **kwargs):
15afbcd0 7980 """
a95a7133 7981 GetForegroundColour(self) -> Colour
15afbcd0
RD
7982
7983 Returns the foreground colour of the window. The interpretation of
7984 foreground colour is dependent on the window class; it may be the text
7985 colour or other colour, or it may not be used at all.
7986 """
54f9ee45 7987 return _core_.Window_GetForegroundColour(*args, **kwargs)
e811c8ce 7988
562ecc31
RD
7989 def InheritsBackgroundColour(*args, **kwargs):
7990 """InheritsBackgroundColour(self) -> bool"""
7991 return _core_.Window_InheritsBackgroundColour(*args, **kwargs)
7992
7993 def UseBgCol(*args, **kwargs):
7994 """UseBgCol(self) -> bool"""
7995 return _core_.Window_UseBgCol(*args, **kwargs)
7996
7bc1e663
RD
7997 def SetBackgroundStyle(*args, **kwargs):
7998 """
7999 SetBackgroundStyle(self, int style) -> bool
8000
8001 Returns the background style of the window. The background style
8002 indicates how the background of the window is drawn.
8003
8004 ====================== ========================================
8005 wx.BG_STYLE_SYSTEM The background colour or pattern should
8006 be determined by the system
8007 wx.BG_STYLE_COLOUR The background should be a solid colour
8008 wx.BG_STYLE_CUSTOM The background will be implemented by the
8009 application.
8010 ====================== ========================================
8011
8012 On GTK+, use of wx.BG_STYLE_CUSTOM allows the flicker-free drawing of
8013 a custom background, such as a tiled bitmap. Currently the style has
8014 no effect on other platforms.
8015
8016 :see: `GetBackgroundStyle`, `SetBackgroundColour`
8017 """
8018 return _core_.Window_SetBackgroundStyle(*args, **kwargs)
8019
8020 def GetBackgroundStyle(*args, **kwargs):
8021 """
8022 GetBackgroundStyle(self) -> int
8023
8024 Returns the background style of the window.
8025
8026 :see: `SetBackgroundStyle`
8027 """
8028 return _core_.Window_GetBackgroundStyle(*args, **kwargs)
8029
51b83b37
RD
8030 def HasTransparentBackground(*args, **kwargs):
8031 """
8032 HasTransparentBackground(self) -> bool
8033
8034 Returns True if this window's background is transparent (as, for
8035 example, for `wx.StaticText`) and should show the parent window's
8036 background.
8037
8038 This method is mostly used internally by the library itself and you
8039 normally shouldn't have to call it. You may, however, have to override
8040 it in your custom control classes to ensure that background is painted
8041 correctly.
8042 """
8043 return _core_.Window_HasTransparentBackground(*args, **kwargs)
8044
e811c8ce 8045 def SetCursor(*args, **kwargs):
15afbcd0 8046 """
a95a7133 8047 SetCursor(self, Cursor cursor) -> bool
15afbcd0
RD
8048
8049 Sets the window's cursor. Notice that the window cursor also sets it
8050 for the children of the window implicitly.
8051
8052 The cursor may be wx.NullCursor in which case the window cursor will
8053 be reset back to default.
8054 """
54f9ee45 8055 return _core_.Window_SetCursor(*args, **kwargs)
e811c8ce
RD
8056
8057 def GetCursor(*args, **kwargs):
15afbcd0 8058 """
a95a7133 8059 GetCursor(self) -> Cursor
15afbcd0
RD
8060
8061 Return the cursor associated with this window.
8062 """
54f9ee45 8063 return _core_.Window_GetCursor(*args, **kwargs)
e811c8ce
RD
8064
8065 def SetFont(*args, **kwargs):
15afbcd0 8066 """
a95a7133 8067 SetFont(self, Font font) -> bool
15afbcd0
RD
8068
8069 Sets the font for this window.
8070 """
54f9ee45 8071 return _core_.Window_SetFont(*args, **kwargs)
e811c8ce 8072
fa47d7a7
VS
8073 def SetOwnFont(*args, **kwargs):
8074 """SetOwnFont(self, Font font)"""
8075 return _core_.Window_SetOwnFont(*args, **kwargs)
b2df227b 8076
e811c8ce 8077 def GetFont(*args, **kwargs):
15afbcd0 8078 """
a95a7133 8079 GetFont(self) -> Font
15afbcd0 8080
4276dc52 8081 Returns the default font used for this window.
15afbcd0 8082 """
54f9ee45 8083 return _core_.Window_GetFont(*args, **kwargs)
e811c8ce
RD
8084
8085 def SetCaret(*args, **kwargs):
15afbcd0 8086 """
a95a7133 8087 SetCaret(self, Caret caret)
15afbcd0
RD
8088
8089 Sets the caret associated with the window.
8090 """
54f9ee45 8091 return _core_.Window_SetCaret(*args, **kwargs)
e811c8ce
RD
8092
8093 def GetCaret(*args, **kwargs):
15afbcd0 8094 """
a95a7133 8095 GetCaret(self) -> Caret
15afbcd0
RD
8096
8097 Returns the caret associated with the window.
8098 """
54f9ee45 8099 return _core_.Window_GetCaret(*args, **kwargs)
e811c8ce
RD
8100
8101 def GetCharHeight(*args, **kwargs):
15afbcd0 8102 """
a95a7133 8103 GetCharHeight(self) -> int
15afbcd0
RD
8104
8105 Get the (average) character size for the current font.
8106 """
54f9ee45 8107 return _core_.Window_GetCharHeight(*args, **kwargs)
e811c8ce
RD
8108
8109 def GetCharWidth(*args, **kwargs):
15afbcd0 8110 """
a95a7133 8111 GetCharWidth(self) -> int
15afbcd0
RD
8112
8113 Get the (average) character size for the current font.
8114 """
54f9ee45 8115 return _core_.Window_GetCharWidth(*args, **kwargs)
e811c8ce
RD
8116
8117 def GetTextExtent(*args, **kwargs):
fd2dc343
RD
8118 """
8119 GetTextExtent(String string) -> (width, height)
8120
8121 Get the width and height of the text using the current font.
8122 """
54f9ee45 8123 return _core_.Window_GetTextExtent(*args, **kwargs)
e811c8ce
RD
8124
8125 def GetFullTextExtent(*args, **kwargs):
0df68c9f 8126 """
196addbf 8127 GetFullTextExtent(String string, Font font=None) ->
0df68c9f 8128 (width, height, descent, externalLeading)
e811c8ce 8129
15afbcd0
RD
8130 Get the width, height, decent and leading of the text using the
8131 current or specified font.
0df68c9f 8132 """
54f9ee45 8133 return _core_.Window_GetFullTextExtent(*args, **kwargs)
e811c8ce
RD
8134
8135 def ClientToScreenXY(*args, **kwargs):
15afbcd0
RD
8136 """
8137 ClientToScreenXY(int x, int y) -> (x,y)
8138
8139 Converts to screen coordinates from coordinates relative to this window.
8140 """
54f9ee45 8141 return _core_.Window_ClientToScreenXY(*args, **kwargs)
e811c8ce
RD
8142
8143 def ScreenToClientXY(*args, **kwargs):
15afbcd0
RD
8144 """
8145 ScreenToClientXY(int x, int y) -> (x,y)
8146
8147 Converts from screen to client window coordinates.
8148 """
54f9ee45 8149 return _core_.Window_ScreenToClientXY(*args, **kwargs)
e811c8ce
RD
8150
8151 def ClientToScreen(*args, **kwargs):
15afbcd0 8152 """
a95a7133 8153 ClientToScreen(self, Point pt) -> Point
15afbcd0
RD
8154
8155 Converts to screen coordinates from coordinates relative to this window.
8156 """
54f9ee45 8157 return _core_.Window_ClientToScreen(*args, **kwargs)
e811c8ce
RD
8158
8159 def ScreenToClient(*args, **kwargs):
15afbcd0 8160 """
a95a7133 8161 ScreenToClient(self, Point pt) -> Point
15afbcd0
RD
8162
8163 Converts from screen to client window coordinates.
8164 """
54f9ee45 8165 return _core_.Window_ScreenToClient(*args, **kwargs)
e811c8ce
RD
8166
8167 def HitTestXY(*args, **kwargs):
15afbcd0 8168 """
a95a7133 8169 HitTestXY(self, int x, int y) -> int
15afbcd0
RD
8170
8171 Test where the given (in client coords) point lies
8172 """
54f9ee45 8173 return _core_.Window_HitTestXY(*args, **kwargs)
e811c8ce
RD
8174
8175 def HitTest(*args, **kwargs):
15afbcd0 8176 """
a95a7133 8177 HitTest(self, Point pt) -> int
15afbcd0
RD
8178
8179 Test where the given (in client coords) point lies
8180 """
54f9ee45 8181 return _core_.Window_HitTest(*args, **kwargs)
e811c8ce 8182
15afbcd0
RD
8183 def GetBorder(*args):
8184 """
a95a7133
RD
8185 GetBorder(self, long flags) -> int
8186 GetBorder(self) -> int
e811c8ce 8187
15afbcd0
RD
8188 Get border for the flags of this window
8189 """
54f9ee45 8190 return _core_.Window_GetBorder(*args)
e811c8ce
RD
8191
8192 def UpdateWindowUI(*args, **kwargs):
15afbcd0 8193 """
a95a7133 8194 UpdateWindowUI(self, long flags=UPDATE_UI_NONE)
15afbcd0
RD
8195
8196 This function sends EVT_UPDATE_UI events to the window. The particular
8197 implementation depends on the window; for example a wx.ToolBar will
8198 send an update UI event for each toolbar button, and a wx.Frame will
8199 send an update UI event for each menubar menu item. You can call this
8200 function from your application to ensure that your UI is up-to-date at
8201 a particular point in time (as far as your EVT_UPDATE_UI handlers are
8202 concerned). This may be necessary if you have called
8203 wx.UpdateUIEvent.SetMode or wx.UpdateUIEvent.SetUpdateInterval to
8204 limit the overhead that wxWindows incurs by sending update UI events
8205 in idle time.
15afbcd0 8206 """
54f9ee45 8207 return _core_.Window_UpdateWindowUI(*args, **kwargs)
e811c8ce
RD
8208
8209 def PopupMenuXY(*args, **kwargs):
15afbcd0 8210 """
b0503257 8211 PopupMenuXY(self, Menu menu, int x=-1, int y=-1) -> bool
15afbcd0 8212
b0503257
RD
8213 Pops up the given menu at the specified coordinates, relative to this window,
8214 and returns control when the user has dismissed the menu. If a menu item is
8215 selected, the corresponding menu event is generated and will be processed as
8216 usual. If the default position is given then the current position of the
8217 mouse cursor will be used.
15afbcd0 8218 """
54f9ee45 8219 return _core_.Window_PopupMenuXY(*args, **kwargs)
e811c8ce 8220
15afbcd0
RD
8221 def PopupMenu(*args, **kwargs):
8222 """
b0503257 8223 PopupMenu(self, Menu menu, Point pos=DefaultPosition) -> bool
15afbcd0 8224
b0503257
RD
8225 Pops up the given menu at the specified coordinates, relative to this window,
8226 and returns control when the user has dismissed the menu. If a menu item is
8227 selected, the corresponding menu event is generated and will be processed as
8228 usual. If the default position is given then the current position of the
8229 mouse cursor will be used.
15afbcd0 8230 """
54f9ee45 8231 return _core_.Window_PopupMenu(*args, **kwargs)
15afbcd0
RD
8232
8233 def GetHandle(*args, **kwargs):
8234 """
a95a7133 8235 GetHandle(self) -> long
15afbcd0
RD
8236
8237 Returns the platform-specific handle (as a long integer) of the
8238 physical window. Currently on wxMac it returns the handle of the
8239 toplevel parent of the window.
8240 """
54f9ee45 8241 return _core_.Window_GetHandle(*args, **kwargs)
15afbcd0 8242
7e63a440
RD
8243 def AssociateHandle(*args, **kwargs):
8244 """
8245 AssociateHandle(self, long handle)
8246
8247 Associate the window with a new native handle
8248 """
8249 return _core_.Window_AssociateHandle(*args, **kwargs)
8250
8251 def DissociateHandle(*args, **kwargs):
8252 """
8253 DissociateHandle(self)
8254
8255 Dissociate the current native handle from the window
8256 """
8257 return _core_.Window_DissociateHandle(*args, **kwargs)
8258
15afbcd0
RD
8259 def HasScrollbar(*args, **kwargs):
8260 """
a95a7133 8261 HasScrollbar(self, int orient) -> bool
15afbcd0
RD
8262
8263 Does the window have the scrollbar for this orientation?
8264 """
54f9ee45 8265 return _core_.Window_HasScrollbar(*args, **kwargs)
15afbcd0
RD
8266
8267 def SetScrollbar(*args, **kwargs):
8268 """
41e2b43e 8269 SetScrollbar(self, int orientation, int position, int thumbSize, int range,
15afbcd0
RD
8270 bool refresh=True)
8271
8272 Sets the scrollbar properties of a built-in scrollbar.
15afbcd0 8273 """
54f9ee45 8274 return _core_.Window_SetScrollbar(*args, **kwargs)
e811c8ce
RD
8275
8276 def SetScrollPos(*args, **kwargs):
15afbcd0 8277 """
a95a7133 8278 SetScrollPos(self, int orientation, int pos, bool refresh=True)
15afbcd0
RD
8279
8280 Sets the position of one of the built-in scrollbars.
8281 """
54f9ee45 8282 return _core_.Window_SetScrollPos(*args, **kwargs)
e811c8ce
RD
8283
8284 def GetScrollPos(*args, **kwargs):
15afbcd0 8285 """
a95a7133 8286 GetScrollPos(self, int orientation) -> int
15afbcd0
RD
8287
8288 Returns the built-in scrollbar position.
8289 """
54f9ee45 8290 return _core_.Window_GetScrollPos(*args, **kwargs)
e811c8ce
RD
8291
8292 def GetScrollThumb(*args, **kwargs):
15afbcd0 8293 """
a95a7133 8294 GetScrollThumb(self, int orientation) -> int
15afbcd0
RD
8295
8296 Returns the built-in scrollbar thumb size.
8297 """
54f9ee45 8298 return _core_.Window_GetScrollThumb(*args, **kwargs)
e811c8ce
RD
8299
8300 def GetScrollRange(*args, **kwargs):
15afbcd0 8301 """
a95a7133 8302 GetScrollRange(self, int orientation) -> int
15afbcd0
RD
8303
8304 Returns the built-in scrollbar range.
8305 """
54f9ee45 8306 return _core_.Window_GetScrollRange(*args, **kwargs)
e811c8ce
RD
8307
8308 def ScrollWindow(*args, **kwargs):
15afbcd0 8309 """
a95a7133 8310 ScrollWindow(self, int dx, int dy, Rect rect=None)
15afbcd0
RD
8311
8312 Physically scrolls the pixels in the window and move child windows
8313 accordingly. Use this function to optimise your scrolling
8314 implementations, to minimise the area that must be redrawn. Note that
8315 it is rarely required to call this function from a user program.
15afbcd0 8316 """
54f9ee45 8317 return _core_.Window_ScrollWindow(*args, **kwargs)
e811c8ce
RD
8318
8319 def ScrollLines(*args, **kwargs):
15afbcd0 8320 """
a95a7133 8321 ScrollLines(self, int lines) -> bool
15afbcd0
RD
8322
8323 If the platform and window class supports it, scrolls the window by
8324 the given number of lines down, if lines is positive, or up if lines
8325 is negative. Returns True if the window was scrolled, False if it was
8326 already on top/bottom and nothing was done.
8327 """
54f9ee45 8328 return _core_.Window_ScrollLines(*args, **kwargs)
e811c8ce
RD
8329
8330 def ScrollPages(*args, **kwargs):
15afbcd0 8331 """
a95a7133 8332 ScrollPages(self, int pages) -> bool
15afbcd0 8333
41e2b43e 8334 If the platform and window class supports it, scrolls the window by
15afbcd0
RD
8335 the given number of pages down, if pages is positive, or up if pages
8336 is negative. Returns True if the window was scrolled, False if it was
8337 already on top/bottom and nothing was done.
8338 """
54f9ee45 8339 return _core_.Window_ScrollPages(*args, **kwargs)
e811c8ce
RD
8340
8341 def LineUp(*args, **kwargs):
15afbcd0 8342 """
a95a7133 8343 LineUp(self) -> bool
15afbcd0
RD
8344
8345 This is just a wrapper for ScrollLines(-1).
8346 """
54f9ee45 8347 return _core_.Window_LineUp(*args, **kwargs)
e811c8ce
RD
8348
8349 def LineDown(*args, **kwargs):
15afbcd0 8350 """
a95a7133 8351 LineDown(self) -> bool
15afbcd0
RD
8352
8353 This is just a wrapper for ScrollLines(1).
8354 """
54f9ee45 8355 return _core_.Window_LineDown(*args, **kwargs)
e811c8ce
RD
8356
8357 def PageUp(*args, **kwargs):
15afbcd0 8358 """
a95a7133 8359 PageUp(self) -> bool
15afbcd0
RD
8360
8361 This is just a wrapper for ScrollPages(-1).
8362 """
54f9ee45 8363 return _core_.Window_PageUp(*args, **kwargs)
e811c8ce
RD
8364
8365 def PageDown(*args, **kwargs):
15afbcd0 8366 """
a95a7133 8367 PageDown(self) -> bool
15afbcd0
RD
8368
8369 This is just a wrapper for ScrollPages(1).
8370 """
54f9ee45 8371 return _core_.Window_PageDown(*args, **kwargs)
e811c8ce
RD
8372
8373 def SetHelpText(*args, **kwargs):
15afbcd0 8374 """
a95a7133 8375 SetHelpText(self, String text)
15afbcd0
RD
8376
8377 Sets the help text to be used as context-sensitive help for this
8378 window. Note that the text is actually stored by the current
8379 wxHelpProvider implementation, and not in the window object itself.
8380 """
54f9ee45 8381 return _core_.Window_SetHelpText(*args, **kwargs)
e811c8ce
RD
8382
8383 def SetHelpTextForId(*args, **kwargs):
15afbcd0 8384 """
a95a7133 8385 SetHelpTextForId(self, String text)
15afbcd0
RD
8386
8387 Associate this help text with all windows with the same id as this
8388 one.
8389 """
54f9ee45 8390 return _core_.Window_SetHelpTextForId(*args, **kwargs)
e811c8ce
RD
8391
8392 def GetHelpText(*args, **kwargs):
15afbcd0 8393 """
a95a7133 8394 GetHelpText(self) -> String
15afbcd0
RD
8395
8396 Gets the help text to be used as context-sensitive help for this
8397 window. Note that the text is actually stored by the current
8398 wxHelpProvider implementation, and not in the window object itself.
8399 """
54f9ee45 8400 return _core_.Window_GetHelpText(*args, **kwargs)
e811c8ce
RD
8401
8402 def SetToolTipString(*args, **kwargs):
15afbcd0 8403 """
a95a7133 8404 SetToolTipString(self, String tip)
15afbcd0
RD
8405
8406 Attach a tooltip to the window.
8407 """
54f9ee45 8408 return _core_.Window_SetToolTipString(*args, **kwargs)
e811c8ce
RD
8409
8410 def SetToolTip(*args, **kwargs):
15afbcd0 8411 """
a95a7133 8412 SetToolTip(self, ToolTip tip)
15afbcd0
RD
8413
8414 Attach a tooltip to the window.
8415 """
54f9ee45 8416 return _core_.Window_SetToolTip(*args, **kwargs)
e811c8ce
RD
8417
8418 def GetToolTip(*args, **kwargs):
15afbcd0 8419 """
a95a7133 8420 GetToolTip(self) -> ToolTip
15afbcd0
RD
8421
8422 get the associated tooltip or None if none
8423 """
54f9ee45 8424 return _core_.Window_GetToolTip(*args, **kwargs)
e811c8ce
RD
8425
8426 def SetDropTarget(*args, **kwargs):
15afbcd0 8427 """
a95a7133 8428 SetDropTarget(self, DropTarget dropTarget)
15afbcd0
RD
8429
8430 Associates a drop target with this window. If the window already has
8431 a drop target, it is deleted.
8432 """
54f9ee45 8433 return _core_.Window_SetDropTarget(*args, **kwargs)
e811c8ce
RD
8434
8435 def GetDropTarget(*args, **kwargs):
15afbcd0 8436 """
a95a7133 8437 GetDropTarget(self) -> DropTarget
15afbcd0
RD
8438
8439 Returns the associated drop target, which may be None.
8440 """
54f9ee45 8441 return _core_.Window_GetDropTarget(*args, **kwargs)
e811c8ce
RD
8442
8443 def SetConstraints(*args, **kwargs):
15afbcd0 8444 """
a95a7133 8445 SetConstraints(self, LayoutConstraints constraints)
15afbcd0
RD
8446
8447 Sets the window to have the given layout constraints. If an existing
8448 layout constraints object is already owned by the window, it will be
8449 deleted. Pass None to disassociate and delete the window's current
8450 constraints.
8451
8452 You must call SetAutoLayout to tell a window to use the constraints
8453 automatically in its default EVT_SIZE handler; otherwise, you must
8454 handle EVT_SIZE yourself and call Layout() explicitly. When setting
8455 both a wx.LayoutConstraints and a wx.Sizer, only the sizer will have
8456 effect.
8457 """
54f9ee45 8458 return _core_.Window_SetConstraints(*args, **kwargs)
e811c8ce
RD
8459
8460 def GetConstraints(*args, **kwargs):
15afbcd0 8461 """
a95a7133 8462 GetConstraints(self) -> LayoutConstraints
15afbcd0
RD
8463
8464 Returns a pointer to the window's layout constraints, or None if there
8465 are none.
8466 """
54f9ee45 8467 return _core_.Window_GetConstraints(*args, **kwargs)
e811c8ce
RD
8468
8469 def SetAutoLayout(*args, **kwargs):
15afbcd0 8470 """
a95a7133 8471 SetAutoLayout(self, bool autoLayout)
15afbcd0
RD
8472
8473 Determines whether the Layout function will be called automatically
8474 when the window is resized. It is called implicitly by SetSizer but
8475 if you use SetConstraints you should call it manually or otherwise the
8476 window layout won't be correctly updated when its size changes.
8477 """
54f9ee45 8478 return _core_.Window_SetAutoLayout(*args, **kwargs)
e811c8ce
RD
8479
8480 def GetAutoLayout(*args, **kwargs):
15afbcd0 8481 """
a95a7133 8482 GetAutoLayout(self) -> bool
15afbcd0
RD
8483
8484 Returns the current autoLayout setting
8485 """
54f9ee45 8486 return _core_.Window_GetAutoLayout(*args, **kwargs)
e811c8ce
RD
8487
8488 def Layout(*args, **kwargs):
15afbcd0 8489 """
a95a7133 8490 Layout(self) -> bool
15afbcd0
RD
8491
8492 Invokes the constraint-based layout algorithm or the sizer-based
8493 algorithm for this window. See SetAutoLayout: when auto layout is on,
8494 this function gets called automatically by the default EVT_SIZE
8495 handler when the window is resized.
8496 """
54f9ee45 8497 return _core_.Window_Layout(*args, **kwargs)
e811c8ce
RD
8498
8499 def SetSizer(*args, **kwargs):
15afbcd0 8500 """
a95a7133 8501 SetSizer(self, Sizer sizer, bool deleteOld=True)
15afbcd0
RD
8502
8503 Sets the window to have the given layout sizer. The window will then
8504 own the object, and will take care of its deletion. If an existing
8505 layout sizer object is already owned by the window, it will be deleted
8506 if the deleteOld parameter is true. Note that this function will also
8507 call SetAutoLayout implicitly with a True parameter if the sizer is
ae8162c8 8508 non-None, and False otherwise.
15afbcd0 8509 """
54f9ee45 8510 return _core_.Window_SetSizer(*args, **kwargs)
e811c8ce
RD
8511
8512 def SetSizerAndFit(*args, **kwargs):
15afbcd0 8513 """
a95a7133 8514 SetSizerAndFit(self, Sizer sizer, bool deleteOld=True)
15afbcd0
RD
8515
8516 The same as SetSizer, except it also sets the size hints for the
8517 window based on the sizer's minimum size.
8518 """
54f9ee45 8519 return _core_.Window_SetSizerAndFit(*args, **kwargs)
e811c8ce
RD
8520
8521 def GetSizer(*args, **kwargs):
15afbcd0 8522 """
a95a7133 8523 GetSizer(self) -> Sizer
15afbcd0
RD
8524
8525 Return the sizer associated with the window by a previous call to
8526 SetSizer or None if there isn't one.
8527 """
54f9ee45 8528 return _core_.Window_GetSizer(*args, **kwargs)
e811c8ce
RD
8529
8530 def SetContainingSizer(*args, **kwargs):
15afbcd0 8531 """
a95a7133 8532 SetContainingSizer(self, Sizer sizer)
15afbcd0
RD
8533
8534 This normally does not need to be called by application code. It is
8535 called internally when a window is added to a sizer, and is used so
8536 the window can remove itself from the sizer when it is destroyed.
8537 """
54f9ee45 8538 return _core_.Window_SetContainingSizer(*args, **kwargs)
e811c8ce
RD
8539
8540 def GetContainingSizer(*args, **kwargs):
15afbcd0 8541 """
a95a7133 8542 GetContainingSizer(self) -> Sizer
15afbcd0
RD
8543
8544 Return the sizer that this window is a member of, if any, otherwise None.
8545 """
54f9ee45 8546 return _core_.Window_GetContainingSizer(*args, **kwargs)
e811c8ce 8547
a95a7133
RD
8548 def InheritAttributes(*args, **kwargs):
8549 """
8550 InheritAttributes(self)
8551
41e2b43e
RD
8552 This function is (or should be, in case of custom controls) called
8553 during window creation to intelligently set up the window visual
8554 attributes, that is the font and the foreground and background
8555 colours.
8556
8557 By 'intelligently' the following is meant: by default, all windows use
8558 their own default attributes. However if some of the parent's
8559 attributes are explicitly changed (that is, using SetFont and not
fa47d7a7 8560 SetOwnFont) and if the corresponding attribute hadn't been
41e2b43e
RD
8561 explicitly set for this window itself, then this window takes the same
8562 value as used by the parent. In addition, if the window overrides
8563 ShouldInheritColours to return false, the colours will not be changed
8564 no matter what and only the font might.
8565
34621cc5 8566 This rather complicated logic is necessary in order to accommodate the
ec9b55ca 8567 different usage scenarios. The most common one is when all default
41e2b43e
RD
8568 attributes are used and in this case, nothing should be inherited as
8569 in modern GUIs different controls use different fonts (and colours)
8570 than their siblings so they can't inherit the same value from the
8571 parent. However it was also deemed desirable to allow to simply change
8572 the attributes of all children at once by just changing the font or
8573 colour of their common parent, hence in this case we do inherit the
8574 parents attributes.
8575
a95a7133 8576 """
54f9ee45 8577 return _core_.Window_InheritAttributes(*args, **kwargs)
a95a7133
RD
8578
8579 def ShouldInheritColours(*args, **kwargs):
8580 """
8581 ShouldInheritColours(self) -> bool
8582
8583 Return true from here to allow the colours of this window to be
41e2b43e
RD
8584 changed by InheritAttributes, returning false forbids inheriting them
8585 from the parent window.
a95a7133 8586
41e2b43e
RD
8587 The base class version returns false, but this method is overridden in
8588 wxControl where it returns true.
a95a7133 8589 """
54f9ee45 8590 return _core_.Window_ShouldInheritColours(*args, **kwargs)
a95a7133 8591
e811c8ce 8592 def PostCreate(self, pre):
15afbcd0
RD
8593 """
8594 Phase 3 of the 2-phase create <wink!>
8595 Call this method after precreating the window with the 2-phase create method.
8596 """
e811c8ce
RD
8597 self.this = pre.this
8598 self.thisown = pre.thisown
8599 pre.thisown = 0
8600 if hasattr(self, '_setOORInfo'):
8601 self._setOORInfo(self)
8602 if hasattr(self, '_setCallbackInfo'):
8603 self._setCallbackInfo(self, self.__class__)
8604
8605
8606class WindowPtr(Window):
8607 def __init__(self, this):
8608 self.this = this
8609 if not hasattr(self,"thisown"): self.thisown = 0
8610 self.__class__ = Window
54f9ee45 8611_core_.Window_swigregister(WindowPtr)
e811c8ce
RD
8612
8613def PreWindow(*args, **kwargs):
15afbcd0
RD
8614 """
8615 PreWindow() -> Window
8616
8617 Precreate a Window for 2-phase creation.
8618 """
54f9ee45 8619 val = _core_.new_PreWindow(*args, **kwargs)
e811c8ce
RD
8620 val.thisown = 1
8621 return val
8622
8623def Window_NewControlId(*args, **kwargs):
15afbcd0
RD
8624 """
8625 Window_NewControlId() -> int
8626
8627 Generate a control id for the controls which were not given one.
8628 """
54f9ee45 8629 return _core_.Window_NewControlId(*args, **kwargs)
e811c8ce
RD
8630
8631def Window_NextControlId(*args, **kwargs):
15afbcd0
RD
8632 """
8633 Window_NextControlId(int winid) -> int
8634
8635 Get the id of the control following the one with the given
41e2b43e 8636 autogenerated) id
15afbcd0 8637 """
54f9ee45 8638 return _core_.Window_NextControlId(*args, **kwargs)
e811c8ce
RD
8639
8640def Window_PrevControlId(*args, **kwargs):
15afbcd0
RD
8641 """
8642 Window_PrevControlId(int winid) -> int
8643
8644 Get the id of the control preceding the one with the given
41e2b43e 8645 autogenerated) id
15afbcd0 8646 """
54f9ee45 8647 return _core_.Window_PrevControlId(*args, **kwargs)
e811c8ce
RD
8648
8649def Window_FindFocus(*args, **kwargs):
15afbcd0
RD
8650 """
8651 Window_FindFocus() -> Window
8652
8653 Returns the window or control that currently has the keyboard focus,
8654 or None.
8655 """
54f9ee45 8656 return _core_.Window_FindFocus(*args, **kwargs)
e811c8ce
RD
8657
8658def Window_GetCapture(*args, **kwargs):
15afbcd0
RD
8659 """
8660 Window_GetCapture() -> Window
8661
8662 Returns the window which currently captures the mouse or None
8663 """
54f9ee45 8664 return _core_.Window_GetCapture(*args, **kwargs)
e811c8ce 8665
74a57fcd
RD
8666def Window_GetClassDefaultAttributes(*args, **kwargs):
8667 """
8668 Window_GetClassDefaultAttributes(int variant=WINDOW_VARIANT_NORMAL) -> VisualAttributes
8669
41e2b43e
RD
8670 Get the default attributes for this class. This is useful if you want
8671 to use the same font or colour in your own control as in a standard
8672 control -- which is a much better idea than hard coding specific
db3e571a
RD
8673 colours or fonts which might look completely out of place on the
8674 user's system, especially if it uses themes.
74a57fcd
RD
8675
8676 The variant parameter is only relevant under Mac currently and is
41e2b43e 8677 ignore under other platforms. Under Mac, it will change the size of
db3e571a
RD
8678 the returned font. See `wx.Window.SetWindowVariant` for more about
8679 this.
74a57fcd 8680 """
54f9ee45 8681 return _core_.Window_GetClassDefaultAttributes(*args, **kwargs)
74a57fcd 8682
e811c8ce 8683def DLG_PNT(win, point_or_x, y=None):
15afbcd0
RD
8684 """
8685 Convenience function for converting a Point or (x,y) in
8686 dialog units to pixel units.
8687 """
e811c8ce
RD
8688 if y is None:
8689 return win.ConvertDialogPointToPixels(point_or_x)
8690 else:
fd3f2efe 8691 return win.ConvertDialogPointToPixels(wx.Point(point_or_x, y))
e811c8ce
RD
8692
8693def DLG_SZE(win, size_width, height=None):
15afbcd0
RD
8694 """
8695 Convenience function for converting a Size or (w,h) in
8696 dialog units to pixel units.
8697 """
e811c8ce
RD
8698 if height is None:
8699 return win.ConvertDialogSizeToPixels(size_width)
8700 else:
fd3f2efe 8701 return win.ConvertDialogSizeToPixels(wx.Size(size_width, height))
e811c8ce
RD
8702
8703
8704def FindWindowById(*args, **kwargs):
15afbcd0
RD
8705 """
8706 FindWindowById(long id, Window parent=None) -> Window
8707
8708 Find the first window in the application with the given id. If parent
8709 is None, the search will start from all top-level frames and dialog
8710 boxes; if non-None, the search will be limited to the given window
8711 hierarchy. The search is recursive in both cases.
8712 """
54f9ee45 8713 return _core_.FindWindowById(*args, **kwargs)
e811c8ce
RD
8714
8715def FindWindowByName(*args, **kwargs):
15afbcd0
RD
8716 """
8717 FindWindowByName(String name, Window parent=None) -> Window
8718
8719 Find a window by its name (as given in a window constructor or Create
8720 function call). If parent is None, the search will start from all
8721 top-level frames and dialog boxes; if non-None, the search will be
8722 limited to the given window hierarchy. The search is recursive in both
8723 cases.
8724
8725 If no window with such name is found, wx.FindWindowByLabel is called.
8726 """
54f9ee45 8727 return _core_.FindWindowByName(*args, **kwargs)
e811c8ce
RD
8728
8729def FindWindowByLabel(*args, **kwargs):
15afbcd0
RD
8730 """
8731 FindWindowByLabel(String label, Window parent=None) -> Window
8732
8733 Find a window by its label. Depending on the type of window, the label
8734 may be a window title or panel item label. If parent is None, the
8735 search will start from all top-level frames and dialog boxes; if
8736 non-None, the search will be limited to the given window
8737 hierarchy. The search is recursive in both cases.
8738 """
54f9ee45 8739 return _core_.FindWindowByLabel(*args, **kwargs)
e811c8ce
RD
8740
8741def Window_FromHWND(*args, **kwargs):
4276dc52 8742 """Window_FromHWND(Window parent, unsigned long _hWnd) -> Window"""
54f9ee45 8743 return _core_.Window_FromHWND(*args, **kwargs)
b6b0383e
RD
8744
8745def GetTopLevelWindows(*args, **kwargs):
8746 """
8747 GetTopLevelWindows() -> PyObject
8748
8749 Returns a list of the the application's top-level windows, (frames,
8750 dialogs, etc.) NOTE: Currently this is a copy of the list maintained
8751 by wxWidgets, and so it is only valid as long as no top-level windows
8752 are closed or new top-level windows are created.
8753
8754 """
8755 return _core_.GetTopLevelWindows(*args, **kwargs)
e811c8ce
RD
8756#---------------------------------------------------------------------------
8757
8758class Validator(EvtHandler):
093d3ff1 8759 """Proxy of C++ Validator class"""
e811c8ce
RD
8760 def __repr__(self):
8761 return "<%s.%s; proxy of C++ wxValidator instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
8762 def __init__(self, *args, **kwargs):
a95a7133 8763 """__init__(self) -> Validator"""
54f9ee45 8764 newobj = _core_.new_Validator(*args, **kwargs)
d14a1e28
RD
8765 self.this = newobj.this
8766 self.thisown = 1
8767 del newobj.thisown
8768 self._setOORInfo(self)
e811c8ce
RD
8769
8770 def Clone(*args, **kwargs):
a95a7133 8771 """Clone(self) -> Validator"""
54f9ee45 8772 return _core_.Validator_Clone(*args, **kwargs)
e811c8ce
RD
8773
8774 def Validate(*args, **kwargs):
a95a7133 8775 """Validate(self, Window parent) -> bool"""
54f9ee45 8776 return _core_.Validator_Validate(*args, **kwargs)
e811c8ce
RD
8777
8778 def TransferToWindow(*args, **kwargs):
a95a7133 8779 """TransferToWindow(self) -> bool"""
54f9ee45 8780 return _core_.Validator_TransferToWindow(*args, **kwargs)
e811c8ce
RD
8781
8782 def TransferFromWindow(*args, **kwargs):
a95a7133 8783 """TransferFromWindow(self) -> bool"""
54f9ee45 8784 return _core_.Validator_TransferFromWindow(*args, **kwargs)
e811c8ce
RD
8785
8786 def GetWindow(*args, **kwargs):
a95a7133 8787 """GetWindow(self) -> Window"""
54f9ee45 8788 return _core_.Validator_GetWindow(*args, **kwargs)
e811c8ce
RD
8789
8790 def SetWindow(*args, **kwargs):
a95a7133 8791 """SetWindow(self, Window window)"""
54f9ee45 8792 return _core_.Validator_SetWindow(*args, **kwargs)
e811c8ce
RD
8793
8794 def IsSilent(*args, **kwargs):
66c033b4 8795 """IsSilent() -> bool"""
54f9ee45 8796 return _core_.Validator_IsSilent(*args, **kwargs)
e811c8ce
RD
8797
8798 IsSilent = staticmethod(IsSilent)
8799 def SetBellOnError(*args, **kwargs):
66c033b4 8800 """SetBellOnError(int doIt=True)"""
54f9ee45 8801 return _core_.Validator_SetBellOnError(*args, **kwargs)
e811c8ce
RD
8802
8803 SetBellOnError = staticmethod(SetBellOnError)
8804
8805class ValidatorPtr(Validator):
8806 def __init__(self, this):
8807 self.this = this
8808 if not hasattr(self,"thisown"): self.thisown = 0
8809 self.__class__ = Validator
54f9ee45 8810_core_.Validator_swigregister(ValidatorPtr)
e811c8ce
RD
8811
8812def Validator_IsSilent(*args, **kwargs):
8813 """Validator_IsSilent() -> bool"""
54f9ee45 8814 return _core_.Validator_IsSilent(*args, **kwargs)
e811c8ce
RD
8815
8816def Validator_SetBellOnError(*args, **kwargs):
8817 """Validator_SetBellOnError(int doIt=True)"""
54f9ee45 8818 return _core_.Validator_SetBellOnError(*args, **kwargs)
e811c8ce
RD
8819
8820class PyValidator(Validator):
093d3ff1 8821 """Proxy of C++ PyValidator class"""
e811c8ce
RD
8822 def __repr__(self):
8823 return "<%s.%s; proxy of C++ wxPyValidator instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
8824 def __init__(self, *args, **kwargs):
a95a7133 8825 """__init__(self) -> PyValidator"""
54f9ee45 8826 newobj = _core_.new_PyValidator(*args, **kwargs)
e811c8ce
RD
8827 self.this = newobj.this
8828 self.thisown = 1
8829 del newobj.thisown
8830
8831 self._setCallbackInfo(self, PyValidator, 1)
8832 self._setOORInfo(self)
8833
8834 def _setCallbackInfo(*args, **kwargs):
a95a7133 8835 """_setCallbackInfo(self, PyObject self, PyObject _class, int incref=True)"""
54f9ee45 8836 return _core_.PyValidator__setCallbackInfo(*args, **kwargs)
e811c8ce
RD
8837
8838
8839class PyValidatorPtr(PyValidator):
8840 def __init__(self, this):
8841 self.this = this
8842 if not hasattr(self,"thisown"): self.thisown = 0
8843 self.__class__ = PyValidator
54f9ee45 8844_core_.PyValidator_swigregister(PyValidatorPtr)
e811c8ce
RD
8845
8846#---------------------------------------------------------------------------
8847
8848class Menu(EvtHandler):
093d3ff1 8849 """Proxy of C++ Menu class"""
d14a1e28
RD
8850 def __repr__(self):
8851 return "<%s.%s; proxy of C++ wxMenu instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
e811c8ce 8852 def __init__(self, *args, **kwargs):
a95a7133 8853 """__init__(self, String title=EmptyString, long style=0) -> Menu"""
54f9ee45 8854 newobj = _core_.new_Menu(*args, **kwargs)
e811c8ce
RD
8855 self.this = newobj.this
8856 self.thisown = 1
8857 del newobj.thisown
8858 self._setOORInfo(self)
8859
8860 def Append(*args, **kwargs):
a95a7133 8861 """Append(self, int id, String text, String help=EmptyString, int kind=ITEM_NORMAL) -> MenuItem"""
54f9ee45 8862 return _core_.Menu_Append(*args, **kwargs)
e811c8ce
RD
8863
8864 def AppendSeparator(*args, **kwargs):
a95a7133 8865 """AppendSeparator(self) -> MenuItem"""
54f9ee45 8866 return _core_.Menu_AppendSeparator(*args, **kwargs)
e811c8ce
RD
8867
8868 def AppendCheckItem(*args, **kwargs):
a95a7133 8869 """AppendCheckItem(self, int id, String text, String help=EmptyString) -> MenuItem"""
54f9ee45 8870 return _core_.Menu_AppendCheckItem(*args, **kwargs)
e811c8ce
RD
8871
8872 def AppendRadioItem(*args, **kwargs):
a95a7133 8873 """AppendRadioItem(self, int id, String text, String help=EmptyString) -> MenuItem"""
54f9ee45 8874 return _core_.Menu_AppendRadioItem(*args, **kwargs)
e811c8ce
RD
8875
8876 def AppendMenu(*args, **kwargs):
a95a7133 8877 """AppendMenu(self, int id, String text, Menu submenu, String help=EmptyString) -> MenuItem"""
54f9ee45 8878 return _core_.Menu_AppendMenu(*args, **kwargs)
e811c8ce
RD
8879
8880 def AppendItem(*args, **kwargs):
a95a7133 8881 """AppendItem(self, MenuItem item) -> MenuItem"""
54f9ee45 8882 return _core_.Menu_AppendItem(*args, **kwargs)
e811c8ce
RD
8883
8884 def Break(*args, **kwargs):
a95a7133 8885 """Break(self)"""
54f9ee45 8886 return _core_.Menu_Break(*args, **kwargs)
e811c8ce
RD
8887
8888 def InsertItem(*args, **kwargs):
a95a7133 8889 """InsertItem(self, size_t pos, MenuItem item) -> MenuItem"""
54f9ee45 8890 return _core_.Menu_InsertItem(*args, **kwargs)
e811c8ce
RD
8891
8892 def Insert(*args, **kwargs):
0df68c9f 8893 """
a95a7133 8894 Insert(self, size_t pos, int id, String text, String help=EmptyString,
a41e16b6 8895 int kind=ITEM_NORMAL) -> MenuItem
0df68c9f 8896 """
54f9ee45 8897 return _core_.Menu_Insert(*args, **kwargs)
e811c8ce
RD
8898
8899 def InsertSeparator(*args, **kwargs):
a95a7133 8900 """InsertSeparator(self, size_t pos) -> MenuItem"""
54f9ee45 8901 return _core_.Menu_InsertSeparator(*args, **kwargs)
e811c8ce
RD
8902
8903 def InsertCheckItem(*args, **kwargs):
a95a7133 8904 """InsertCheckItem(self, size_t pos, int id, String text, String help=EmptyString) -> MenuItem"""
54f9ee45 8905 return _core_.Menu_InsertCheckItem(*args, **kwargs)
e811c8ce
RD
8906
8907 def InsertRadioItem(*args, **kwargs):
a95a7133 8908 """InsertRadioItem(self, size_t pos, int id, String text, String help=EmptyString) -> MenuItem"""
54f9ee45 8909 return _core_.Menu_InsertRadioItem(*args, **kwargs)
e811c8ce
RD
8910
8911 def InsertMenu(*args, **kwargs):
a95a7133 8912 """InsertMenu(self, size_t pos, int id, String text, Menu submenu, String help=EmptyString) -> MenuItem"""
54f9ee45 8913 return _core_.Menu_InsertMenu(*args, **kwargs)
e811c8ce
RD
8914
8915 def PrependItem(*args, **kwargs):
a95a7133 8916 """PrependItem(self, MenuItem item) -> MenuItem"""
54f9ee45 8917 return _core_.Menu_PrependItem(*args, **kwargs)
e811c8ce
RD
8918
8919 def Prepend(*args, **kwargs):
a95a7133 8920 """Prepend(self, int id, String text, String help=EmptyString, int kind=ITEM_NORMAL) -> MenuItem"""
54f9ee45 8921 return _core_.Menu_Prepend(*args, **kwargs)
e811c8ce
RD
8922
8923 def PrependSeparator(*args, **kwargs):
a95a7133 8924 """PrependSeparator(self) -> MenuItem"""
54f9ee45 8925 return _core_.Menu_PrependSeparator(*args, **kwargs)
e811c8ce
RD
8926
8927 def PrependCheckItem(*args, **kwargs):
a95a7133 8928 """PrependCheckItem(self, int id, String text, String help=EmptyString) -> MenuItem"""
54f9ee45 8929 return _core_.Menu_PrependCheckItem(*args, **kwargs)
e811c8ce
RD
8930
8931 def PrependRadioItem(*args, **kwargs):
a95a7133 8932 """PrependRadioItem(self, int id, String text, String help=EmptyString) -> MenuItem"""
54f9ee45 8933 return _core_.Menu_PrependRadioItem(*args, **kwargs)
e811c8ce
RD
8934
8935 def PrependMenu(*args, **kwargs):
a95a7133 8936 """PrependMenu(self, int id, String text, Menu submenu, String help=EmptyString) -> MenuItem"""
54f9ee45 8937 return _core_.Menu_PrependMenu(*args, **kwargs)
e811c8ce
RD
8938
8939 def Remove(*args, **kwargs):
a95a7133 8940 """Remove(self, int id) -> MenuItem"""
54f9ee45 8941 return _core_.Menu_Remove(*args, **kwargs)
e811c8ce
RD
8942
8943 def RemoveItem(*args, **kwargs):
a95a7133 8944 """RemoveItem(self, MenuItem item) -> MenuItem"""
54f9ee45 8945 return _core_.Menu_RemoveItem(*args, **kwargs)
e811c8ce
RD
8946
8947 def Delete(*args, **kwargs):
a95a7133 8948 """Delete(self, int id) -> bool"""
54f9ee45 8949 return _core_.Menu_Delete(*args, **kwargs)
e811c8ce
RD
8950
8951 def DeleteItem(*args, **kwargs):
a95a7133 8952 """DeleteItem(self, MenuItem item) -> bool"""
54f9ee45 8953 return _core_.Menu_DeleteItem(*args, **kwargs)
e811c8ce
RD
8954
8955 def Destroy(*args, **kwargs):
0df68c9f 8956 """
a95a7133 8957 Destroy(self)
e811c8ce 8958
0df68c9f
RD
8959 Deletes the C++ object this Python object is a proxy for.
8960 """
54f9ee45 8961 return _core_.Menu_Destroy(*args, **kwargs)
e811c8ce
RD
8962
8963 def DestroyId(*args, **kwargs):
0df68c9f 8964 """
a95a7133 8965 DestroyId(self, int id) -> bool
e811c8ce 8966
0df68c9f
RD
8967 Deletes the C++ object this Python object is a proxy for.
8968 """
54f9ee45 8969 return _core_.Menu_DestroyId(*args, **kwargs)
e811c8ce
RD
8970
8971 def DestroyItem(*args, **kwargs):
0df68c9f 8972 """
a95a7133 8973 DestroyItem(self, MenuItem item) -> bool
e811c8ce 8974
0df68c9f
RD
8975 Deletes the C++ object this Python object is a proxy for.
8976 """
54f9ee45 8977 return _core_.Menu_DestroyItem(*args, **kwargs)
e811c8ce
RD
8978
8979 def GetMenuItemCount(*args, **kwargs):
a95a7133 8980 """GetMenuItemCount(self) -> size_t"""
54f9ee45 8981 return _core_.Menu_GetMenuItemCount(*args, **kwargs)
e811c8ce
RD
8982
8983 def GetMenuItems(*args, **kwargs):
a95a7133 8984 """GetMenuItems(self) -> PyObject"""
54f9ee45 8985 return _core_.Menu_GetMenuItems(*args, **kwargs)
e811c8ce
RD
8986
8987 def FindItem(*args, **kwargs):
a95a7133 8988 """FindItem(self, String item) -> int"""
54f9ee45 8989 return _core_.Menu_FindItem(*args, **kwargs)
e811c8ce
RD
8990
8991 def FindItemById(*args, **kwargs):
a95a7133 8992 """FindItemById(self, int id) -> MenuItem"""
54f9ee45 8993 return _core_.Menu_FindItemById(*args, **kwargs)
e811c8ce
RD
8994
8995 def FindItemByPosition(*args, **kwargs):
a95a7133 8996 """FindItemByPosition(self, size_t position) -> MenuItem"""
54f9ee45 8997 return _core_.Menu_FindItemByPosition(*args, **kwargs)
e811c8ce
RD
8998
8999 def Enable(*args, **kwargs):
a95a7133 9000 """Enable(self, int id, bool enable)"""
54f9ee45 9001 return _core_.Menu_Enable(*args, **kwargs)
e811c8ce
RD
9002
9003 def IsEnabled(*args, **kwargs):
a95a7133 9004 """IsEnabled(self, int id) -> bool"""
54f9ee45 9005 return _core_.Menu_IsEnabled(*args, **kwargs)
e811c8ce
RD
9006
9007 def Check(*args, **kwargs):
a95a7133 9008 """Check(self, int id, bool check)"""
54f9ee45 9009 return _core_.Menu_Check(*args, **kwargs)
e811c8ce
RD
9010
9011 def IsChecked(*args, **kwargs):
a95a7133 9012 """IsChecked(self, int id) -> bool"""
54f9ee45 9013 return _core_.Menu_IsChecked(*args, **kwargs)
e811c8ce
RD
9014
9015 def SetLabel(*args, **kwargs):
a95a7133 9016 """SetLabel(self, int id, String label)"""
54f9ee45 9017 return _core_.Menu_SetLabel(*args, **kwargs)
e811c8ce
RD
9018
9019 def GetLabel(*args, **kwargs):
a95a7133 9020 """GetLabel(self, int id) -> String"""
54f9ee45 9021 return _core_.Menu_GetLabel(*args, **kwargs)
e811c8ce
RD
9022
9023 def SetHelpString(*args, **kwargs):
a95a7133 9024 """SetHelpString(self, int id, String helpString)"""
54f9ee45 9025 return _core_.Menu_SetHelpString(*args, **kwargs)
e811c8ce
RD
9026
9027 def GetHelpString(*args, **kwargs):
a95a7133 9028 """GetHelpString(self, int id) -> String"""
54f9ee45 9029 return _core_.Menu_GetHelpString(*args, **kwargs)
e811c8ce
RD
9030
9031 def SetTitle(*args, **kwargs):
a95a7133 9032 """SetTitle(self, String title)"""
54f9ee45 9033 return _core_.Menu_SetTitle(*args, **kwargs)
e811c8ce
RD
9034
9035 def GetTitle(*args, **kwargs):
a95a7133 9036 """GetTitle(self) -> String"""
54f9ee45 9037 return _core_.Menu_GetTitle(*args, **kwargs)
e811c8ce
RD
9038
9039 def SetEventHandler(*args, **kwargs):
a95a7133 9040 """SetEventHandler(self, EvtHandler handler)"""
54f9ee45 9041 return _core_.Menu_SetEventHandler(*args, **kwargs)
e811c8ce
RD
9042
9043 def GetEventHandler(*args, **kwargs):
a95a7133 9044 """GetEventHandler(self) -> EvtHandler"""
54f9ee45 9045 return _core_.Menu_GetEventHandler(*args, **kwargs)
e811c8ce
RD
9046
9047 def SetInvokingWindow(*args, **kwargs):
a95a7133 9048 """SetInvokingWindow(self, Window win)"""
54f9ee45 9049 return _core_.Menu_SetInvokingWindow(*args, **kwargs)
e811c8ce
RD
9050
9051 def GetInvokingWindow(*args, **kwargs):
a95a7133 9052 """GetInvokingWindow(self) -> Window"""
54f9ee45 9053 return _core_.Menu_GetInvokingWindow(*args, **kwargs)
e811c8ce
RD
9054
9055 def GetStyle(*args, **kwargs):
a95a7133 9056 """GetStyle(self) -> long"""
54f9ee45 9057 return _core_.Menu_GetStyle(*args, **kwargs)
e811c8ce
RD
9058
9059 def UpdateUI(*args, **kwargs):
a95a7133 9060 """UpdateUI(self, EvtHandler source=None)"""
54f9ee45 9061 return _core_.Menu_UpdateUI(*args, **kwargs)
e811c8ce
RD
9062
9063 def GetMenuBar(*args, **kwargs):
a95a7133 9064 """GetMenuBar(self) -> MenuBar"""
54f9ee45 9065 return _core_.Menu_GetMenuBar(*args, **kwargs)
e811c8ce
RD
9066
9067 def Attach(*args, **kwargs):
a95a7133 9068 """Attach(self, wxMenuBarBase menubar)"""
54f9ee45 9069 return _core_.Menu_Attach(*args, **kwargs)
e811c8ce
RD
9070
9071 def Detach(*args, **kwargs):
a95a7133 9072 """Detach(self)"""
54f9ee45 9073 return _core_.Menu_Detach(*args, **kwargs)
e811c8ce
RD
9074
9075 def IsAttached(*args, **kwargs):
a95a7133 9076 """IsAttached(self) -> bool"""
54f9ee45 9077 return _core_.Menu_IsAttached(*args, **kwargs)
e811c8ce
RD
9078
9079 def SetParent(*args, **kwargs):
a95a7133 9080 """SetParent(self, Menu parent)"""
54f9ee45 9081 return _core_.Menu_SetParent(*args, **kwargs)
e811c8ce
RD
9082
9083 def GetParent(*args, **kwargs):
a95a7133 9084 """GetParent(self) -> Menu"""
54f9ee45 9085 return _core_.Menu_GetParent(*args, **kwargs)
e811c8ce 9086
d14a1e28
RD
9087
9088class MenuPtr(Menu):
9089 def __init__(self, this):
9090 self.this = this
9091 if not hasattr(self,"thisown"): self.thisown = 0
9092 self.__class__ = Menu
54f9ee45 9093_core_.Menu_swigregister(MenuPtr)
d14a1e28
RD
9094DefaultValidator = cvar.DefaultValidator
9095
9096#---------------------------------------------------------------------------
9097
9098class MenuBar(Window):
093d3ff1 9099 """Proxy of C++ MenuBar class"""
e811c8ce
RD
9100 def __repr__(self):
9101 return "<%s.%s; proxy of C++ wxMenuBar instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 9102 def __init__(self, *args, **kwargs):
a95a7133 9103 """__init__(self, long style=0) -> MenuBar"""
54f9ee45 9104 newobj = _core_.new_MenuBar(*args, **kwargs)
d14a1e28
RD
9105 self.this = newobj.this
9106 self.thisown = 1
9107 del newobj.thisown
9108 self._setOORInfo(self)
e811c8ce
RD
9109
9110 def Append(*args, **kwargs):
a95a7133 9111 """Append(self, Menu menu, String title) -> bool"""
54f9ee45 9112 return _core_.MenuBar_Append(*args, **kwargs)
e811c8ce
RD
9113
9114 def Insert(*args, **kwargs):
a95a7133 9115 """Insert(self, size_t pos, Menu menu, String title) -> bool"""
54f9ee45 9116 return _core_.MenuBar_Insert(*args, **kwargs)
e811c8ce
RD
9117
9118 def GetMenuCount(*args, **kwargs):
a95a7133 9119 """GetMenuCount(self) -> size_t"""
54f9ee45 9120 return _core_.MenuBar_GetMenuCount(*args, **kwargs)
e811c8ce
RD
9121
9122 def GetMenu(*args, **kwargs):
a95a7133 9123 """GetMenu(self, size_t pos) -> Menu"""
54f9ee45 9124 return _core_.MenuBar_GetMenu(*args, **kwargs)
e811c8ce
RD
9125
9126 def Replace(*args, **kwargs):
a95a7133 9127 """Replace(self, size_t pos, Menu menu, String title) -> Menu"""
54f9ee45 9128 return _core_.MenuBar_Replace(*args, **kwargs)
e811c8ce
RD
9129
9130 def Remove(*args, **kwargs):
a95a7133 9131 """Remove(self, size_t pos) -> Menu"""
54f9ee45 9132 return _core_.MenuBar_Remove(*args, **kwargs)
e811c8ce
RD
9133
9134 def EnableTop(*args, **kwargs):
a95a7133 9135 """EnableTop(self, size_t pos, bool enable)"""
54f9ee45 9136 return _core_.MenuBar_EnableTop(*args, **kwargs)
e811c8ce
RD
9137
9138 def IsEnabledTop(*args, **kwargs):
a95a7133 9139 """IsEnabledTop(self, size_t pos) -> bool"""
54f9ee45 9140 return _core_.MenuBar_IsEnabledTop(*args, **kwargs)
e811c8ce
RD
9141
9142 def SetLabelTop(*args, **kwargs):
a95a7133 9143 """SetLabelTop(self, size_t pos, String label)"""
54f9ee45 9144 return _core_.MenuBar_SetLabelTop(*args, **kwargs)
e811c8ce
RD
9145
9146 def GetLabelTop(*args, **kwargs):
a95a7133 9147 """GetLabelTop(self, size_t pos) -> String"""
54f9ee45 9148 return _core_.MenuBar_GetLabelTop(*args, **kwargs)
e811c8ce
RD
9149
9150 def FindMenuItem(*args, **kwargs):
a95a7133 9151 """FindMenuItem(self, String menu, String item) -> int"""
54f9ee45 9152 return _core_.MenuBar_FindMenuItem(*args, **kwargs)
e811c8ce
RD
9153
9154 def FindItemById(*args, **kwargs):
a95a7133 9155 """FindItemById(self, int id) -> MenuItem"""
54f9ee45 9156 return _core_.MenuBar_FindItemById(*args, **kwargs)
e811c8ce
RD
9157
9158 def FindMenu(*args, **kwargs):
a95a7133 9159 """FindMenu(self, String title) -> int"""
54f9ee45 9160 return _core_.MenuBar_FindMenu(*args, **kwargs)
e811c8ce
RD
9161
9162 def Enable(*args, **kwargs):
a95a7133 9163 """Enable(self, int id, bool enable)"""
54f9ee45 9164 return _core_.MenuBar_Enable(*args, **kwargs)
e811c8ce
RD
9165
9166 def Check(*args, **kwargs):
a95a7133 9167 """Check(self, int id, bool check)"""
54f9ee45 9168 return _core_.MenuBar_Check(*args, **kwargs)
e811c8ce
RD
9169
9170 def IsChecked(*args, **kwargs):
a95a7133 9171 """IsChecked(self, int id) -> bool"""
54f9ee45 9172 return _core_.MenuBar_IsChecked(*args, **kwargs)
e811c8ce
RD
9173
9174 def IsEnabled(*args, **kwargs):
a95a7133 9175 """IsEnabled(self, int id) -> bool"""
54f9ee45 9176 return _core_.MenuBar_IsEnabled(*args, **kwargs)
e811c8ce
RD
9177
9178 def SetLabel(*args, **kwargs):
a95a7133 9179 """SetLabel(self, int id, String label)"""
54f9ee45 9180 return _core_.MenuBar_SetLabel(*args, **kwargs)
e811c8ce
RD
9181
9182 def GetLabel(*args, **kwargs):
a95a7133 9183 """GetLabel(self, int id) -> String"""
54f9ee45 9184 return _core_.MenuBar_GetLabel(*args, **kwargs)
e811c8ce
RD
9185
9186 def SetHelpString(*args, **kwargs):
a95a7133 9187 """SetHelpString(self, int id, String helpString)"""
54f9ee45 9188 return _core_.MenuBar_SetHelpString(*args, **kwargs)
e811c8ce
RD
9189
9190 def GetHelpString(*args, **kwargs):
a95a7133 9191 """GetHelpString(self, int id) -> String"""
54f9ee45 9192 return _core_.MenuBar_GetHelpString(*args, **kwargs)
e811c8ce
RD
9193
9194 def GetFrame(*args, **kwargs):
a95a7133 9195 """GetFrame(self) -> wxFrame"""
54f9ee45 9196 return _core_.MenuBar_GetFrame(*args, **kwargs)
e811c8ce
RD
9197
9198 def IsAttached(*args, **kwargs):
a95a7133 9199 """IsAttached(self) -> bool"""
54f9ee45 9200 return _core_.MenuBar_IsAttached(*args, **kwargs)
e811c8ce
RD
9201
9202 def Attach(*args, **kwargs):
a95a7133 9203 """Attach(self, wxFrame frame)"""
54f9ee45 9204 return _core_.MenuBar_Attach(*args, **kwargs)
e811c8ce
RD
9205
9206 def Detach(*args, **kwargs):
a95a7133 9207 """Detach(self)"""
54f9ee45 9208 return _core_.MenuBar_Detach(*args, **kwargs)
e811c8ce 9209
d14a1e28
RD
9210
9211class MenuBarPtr(MenuBar):
9212 def __init__(self, this):
9213 self.this = this
9214 if not hasattr(self,"thisown"): self.thisown = 0
9215 self.__class__ = MenuBar
54f9ee45 9216_core_.MenuBar_swigregister(MenuBarPtr)
d14a1e28
RD
9217
9218#---------------------------------------------------------------------------
9219
9220class MenuItem(Object):
093d3ff1 9221 """Proxy of C++ MenuItem class"""
e811c8ce
RD
9222 def __repr__(self):
9223 return "<%s.%s; proxy of C++ wxMenuItem instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 9224 def __init__(self, *args, **kwargs):
0df68c9f 9225 """
a95a7133 9226 __init__(self, Menu parentMenu=None, int id=ID_ANY, String text=EmptyString,
196addbf
RD
9227 String help=EmptyString, int kind=ITEM_NORMAL,
9228 Menu subMenu=None) -> MenuItem
0df68c9f 9229 """
54f9ee45 9230 newobj = _core_.new_MenuItem(*args, **kwargs)
d14a1e28
RD
9231 self.this = newobj.this
9232 self.thisown = 1
9233 del newobj.thisown
e811c8ce 9234 def GetMenu(*args, **kwargs):
a95a7133 9235 """GetMenu(self) -> Menu"""
54f9ee45 9236 return _core_.MenuItem_GetMenu(*args, **kwargs)
e811c8ce
RD
9237
9238 def SetMenu(*args, **kwargs):
a95a7133 9239 """SetMenu(self, Menu menu)"""
54f9ee45 9240 return _core_.MenuItem_SetMenu(*args, **kwargs)
e811c8ce
RD
9241
9242 def SetId(*args, **kwargs):
a95a7133 9243 """SetId(self, int id)"""
54f9ee45 9244 return _core_.MenuItem_SetId(*args, **kwargs)
e811c8ce
RD
9245
9246 def GetId(*args, **kwargs):
a95a7133 9247 """GetId(self) -> int"""
54f9ee45 9248 return _core_.MenuItem_GetId(*args, **kwargs)
e811c8ce
RD
9249
9250 def IsSeparator(*args, **kwargs):
a95a7133 9251 """IsSeparator(self) -> bool"""
54f9ee45 9252 return _core_.MenuItem_IsSeparator(*args, **kwargs)
e811c8ce
RD
9253
9254 def SetText(*args, **kwargs):
a95a7133 9255 """SetText(self, String str)"""
54f9ee45 9256 return _core_.MenuItem_SetText(*args, **kwargs)
e811c8ce
RD
9257
9258 def GetLabel(*args, **kwargs):
a95a7133 9259 """GetLabel(self) -> String"""
54f9ee45 9260 return _core_.MenuItem_GetLabel(*args, **kwargs)
e811c8ce
RD
9261
9262 def GetText(*args, **kwargs):
a95a7133 9263 """GetText(self) -> String"""
54f9ee45 9264 return _core_.MenuItem_GetText(*args, **kwargs)
e811c8ce
RD
9265
9266 def GetLabelFromText(*args, **kwargs):
66c033b4 9267 """GetLabelFromText(String text) -> String"""
54f9ee45 9268 return _core_.MenuItem_GetLabelFromText(*args, **kwargs)
e811c8ce
RD
9269
9270 GetLabelFromText = staticmethod(GetLabelFromText)
9271 def GetKind(*args, **kwargs):
a95a7133 9272 """GetKind(self) -> int"""
54f9ee45 9273 return _core_.MenuItem_GetKind(*args, **kwargs)
e811c8ce 9274
a95a7133
RD
9275 def SetKind(*args, **kwargs):
9276 """SetKind(self, int kind)"""
54f9ee45 9277 return _core_.MenuItem_SetKind(*args, **kwargs)
a95a7133 9278
e811c8ce 9279 def SetCheckable(*args, **kwargs):
a95a7133 9280 """SetCheckable(self, bool checkable)"""
54f9ee45 9281 return _core_.MenuItem_SetCheckable(*args, **kwargs)
e811c8ce
RD
9282
9283 def IsCheckable(*args, **kwargs):
a95a7133 9284 """IsCheckable(self) -> bool"""
54f9ee45 9285 return _core_.MenuItem_IsCheckable(*args, **kwargs)
e811c8ce
RD
9286
9287 def IsSubMenu(*args, **kwargs):
a95a7133 9288 """IsSubMenu(self) -> bool"""
54f9ee45 9289 return _core_.MenuItem_IsSubMenu(*args, **kwargs)
e811c8ce
RD
9290
9291 def SetSubMenu(*args, **kwargs):
a95a7133 9292 """SetSubMenu(self, Menu menu)"""
54f9ee45 9293 return _core_.MenuItem_SetSubMenu(*args, **kwargs)
e811c8ce
RD
9294
9295 def GetSubMenu(*args, **kwargs):
a95a7133 9296 """GetSubMenu(self) -> Menu"""
54f9ee45 9297 return _core_.MenuItem_GetSubMenu(*args, **kwargs)
e811c8ce
RD
9298
9299 def Enable(*args, **kwargs):
a95a7133 9300 """Enable(self, bool enable=True)"""
54f9ee45 9301 return _core_.MenuItem_Enable(*args, **kwargs)
e811c8ce
RD
9302
9303 def IsEnabled(*args, **kwargs):
a95a7133 9304 """IsEnabled(self) -> bool"""
54f9ee45 9305 return _core_.MenuItem_IsEnabled(*args, **kwargs)
e811c8ce
RD
9306
9307 def Check(*args, **kwargs):
a95a7133 9308 """Check(self, bool check=True)"""
54f9ee45 9309 return _core_.MenuItem_Check(*args, **kwargs)
e811c8ce
RD
9310
9311 def IsChecked(*args, **kwargs):
a95a7133 9312 """IsChecked(self) -> bool"""
54f9ee45 9313 return _core_.MenuItem_IsChecked(*args, **kwargs)
e811c8ce
RD
9314
9315 def Toggle(*args, **kwargs):
a95a7133 9316 """Toggle(self)"""
54f9ee45 9317 return _core_.MenuItem_Toggle(*args, **kwargs)
e811c8ce
RD
9318
9319 def SetHelp(*args, **kwargs):
a95a7133 9320 """SetHelp(self, String str)"""
54f9ee45 9321 return _core_.MenuItem_SetHelp(*args, **kwargs)
e811c8ce
RD
9322
9323 def GetHelp(*args, **kwargs):
a95a7133 9324 """GetHelp(self) -> String"""
54f9ee45 9325 return _core_.MenuItem_GetHelp(*args, **kwargs)
e811c8ce
RD
9326
9327 def GetAccel(*args, **kwargs):
a95a7133 9328 """GetAccel(self) -> AcceleratorEntry"""
54f9ee45 9329 return _core_.MenuItem_GetAccel(*args, **kwargs)
e811c8ce
RD
9330
9331 def SetAccel(*args, **kwargs):
a95a7133 9332 """SetAccel(self, AcceleratorEntry accel)"""
54f9ee45 9333 return _core_.MenuItem_SetAccel(*args, **kwargs)
e811c8ce 9334
c1280d1e
RD
9335 def SetFont(*args, **kwargs):
9336 """SetFont(self, Font font)"""
9337 return _core_.MenuItem_SetFont(*args, **kwargs)
9338
9339 def GetFont(*args, **kwargs):
9340 """GetFont(self) -> Font"""
9341 return _core_.MenuItem_GetFont(*args, **kwargs)
9342
9343 def SetTextColour(*args, **kwargs):
9344 """SetTextColour(self, Colour colText)"""
9345 return _core_.MenuItem_SetTextColour(*args, **kwargs)
9346
9347 def GetTextColour(*args, **kwargs):
9348 """GetTextColour(self) -> Colour"""
9349 return _core_.MenuItem_GetTextColour(*args, **kwargs)
9350
9351 def SetBackgroundColour(*args, **kwargs):
9352 """SetBackgroundColour(self, Colour colBack)"""
9353 return _core_.MenuItem_SetBackgroundColour(*args, **kwargs)
9354
9355 def GetBackgroundColour(*args, **kwargs):
9356 """GetBackgroundColour(self) -> Colour"""
9357 return _core_.MenuItem_GetBackgroundColour(*args, **kwargs)
9358
9359 def SetBitmaps(*args, **kwargs):
9360 """SetBitmaps(self, Bitmap bmpChecked, Bitmap bmpUnchecked=wxNullBitmap)"""
9361 return _core_.MenuItem_SetBitmaps(*args, **kwargs)
9362
9363 def SetDisabledBitmap(*args, **kwargs):
9364 """SetDisabledBitmap(self, Bitmap bmpDisabled)"""
9365 return _core_.MenuItem_SetDisabledBitmap(*args, **kwargs)
9366
9367 def GetDisabledBitmap(*args, **kwargs):
9368 """GetDisabledBitmap(self) -> Bitmap"""
9369 return _core_.MenuItem_GetDisabledBitmap(*args, **kwargs)
9370
9371 def SetMarginWidth(*args, **kwargs):
9372 """SetMarginWidth(self, int nWidth)"""
9373 return _core_.MenuItem_SetMarginWidth(*args, **kwargs)
9374
9375 def GetMarginWidth(*args, **kwargs):
9376 """GetMarginWidth(self) -> int"""
9377 return _core_.MenuItem_GetMarginWidth(*args, **kwargs)
9378
e811c8ce 9379 def GetDefaultMarginWidth(*args, **kwargs):
66c033b4 9380 """GetDefaultMarginWidth() -> int"""
54f9ee45 9381 return _core_.MenuItem_GetDefaultMarginWidth(*args, **kwargs)
e811c8ce
RD
9382
9383 GetDefaultMarginWidth = staticmethod(GetDefaultMarginWidth)
c1280d1e
RD
9384 def IsOwnerDrawn(*args, **kwargs):
9385 """IsOwnerDrawn(self) -> bool"""
9386 return _core_.MenuItem_IsOwnerDrawn(*args, **kwargs)
9387
9388 def SetOwnerDrawn(*args, **kwargs):
9389 """SetOwnerDrawn(self, bool ownerDrawn=True)"""
9390 return _core_.MenuItem_SetOwnerDrawn(*args, **kwargs)
9391
9392 def ResetOwnerDrawn(*args, **kwargs):
9393 """ResetOwnerDrawn(self)"""
9394 return _core_.MenuItem_ResetOwnerDrawn(*args, **kwargs)
9395
e811c8ce 9396 def SetBitmap(*args, **kwargs):
a95a7133 9397 """SetBitmap(self, Bitmap bitmap)"""
54f9ee45 9398 return _core_.MenuItem_SetBitmap(*args, **kwargs)
e811c8ce
RD
9399
9400 def GetBitmap(*args, **kwargs):
a95a7133 9401 """GetBitmap(self) -> Bitmap"""
54f9ee45 9402 return _core_.MenuItem_GetBitmap(*args, **kwargs)
e811c8ce 9403
d14a1e28
RD
9404
9405class MenuItemPtr(MenuItem):
9406 def __init__(self, this):
9407 self.this = this
9408 if not hasattr(self,"thisown"): self.thisown = 0
9409 self.__class__ = MenuItem
54f9ee45 9410_core_.MenuItem_swigregister(MenuItemPtr)
d14a1e28 9411
e811c8ce 9412def MenuItem_GetLabelFromText(*args, **kwargs):
196addbf 9413 """MenuItem_GetLabelFromText(String text) -> String"""
54f9ee45 9414 return _core_.MenuItem_GetLabelFromText(*args, **kwargs)
d14a1e28 9415
e811c8ce
RD
9416def MenuItem_GetDefaultMarginWidth(*args, **kwargs):
9417 """MenuItem_GetDefaultMarginWidth() -> int"""
54f9ee45 9418 return _core_.MenuItem_GetDefaultMarginWidth(*args, **kwargs)
d14a1e28
RD
9419
9420#---------------------------------------------------------------------------
9421
9422class Control(Window):
15afbcd0
RD
9423 """
9424 This is the base class for a control or 'widget'.
9425
41e2b43e
RD
9426 A control is generally a small window which processes user input
9427 and/or displays one or more item of data.
15afbcd0 9428 """
e811c8ce
RD
9429 def __repr__(self):
9430 return "<%s.%s; proxy of C++ wxControl instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 9431 def __init__(self, *args, **kwargs):
0df68c9f 9432 """
248ed943
RD
9433 __init__(self, Window parent, int id=-1, Point pos=DefaultPosition,
9434 Size size=DefaultSize, long style=0, Validator validator=DefaultValidator,
b2dc1044 9435 String name=ControlNameStr) -> Control
15afbcd0 9436
41e2b43e
RD
9437 Create a Control. Normally you should only call this from a subclass'
9438 __init__ as a plain old wx.Control is not very useful.
0df68c9f 9439 """
54f9ee45 9440 newobj = _core_.new_Control(*args, **kwargs)
d14a1e28
RD
9441 self.this = newobj.this
9442 self.thisown = 1
9443 del newobj.thisown
9444 self._setOORInfo(self)
e811c8ce
RD
9445
9446 def Create(*args, **kwargs):
0df68c9f 9447 """
248ed943
RD
9448 Create(self, Window parent, int id=-1, Point pos=DefaultPosition,
9449 Size size=DefaultSize, long style=0, Validator validator=DefaultValidator,
b2dc1044 9450 String name=ControlNameStr) -> bool
15afbcd0
RD
9451
9452 Do the 2nd phase and create the GUI control.
0df68c9f 9453 """
54f9ee45 9454 return _core_.Control_Create(*args, **kwargs)
e811c8ce
RD
9455
9456 def Command(*args, **kwargs):
15afbcd0 9457 """
a95a7133 9458 Command(self, CommandEvent event)
15afbcd0 9459
41e2b43e
RD
9460 Simulates the effect of the user issuing a command to the item.
9461
9462 :see: `wx.CommandEvent`
9463
15afbcd0 9464 """
54f9ee45 9465 return _core_.Control_Command(*args, **kwargs)
e811c8ce
RD
9466
9467 def GetLabel(*args, **kwargs):
15afbcd0 9468 """
a95a7133 9469 GetLabel(self) -> String
15afbcd0
RD
9470
9471 Return a control's text.
9472 """
54f9ee45 9473 return _core_.Control_GetLabel(*args, **kwargs)
e811c8ce
RD
9474
9475 def SetLabel(*args, **kwargs):
15afbcd0 9476 """
a95a7133 9477 SetLabel(self, String label)
15afbcd0
RD
9478
9479 Sets the item's text.
9480 """
54f9ee45 9481 return _core_.Control_SetLabel(*args, **kwargs)
e811c8ce 9482
74a57fcd 9483 def GetClassDefaultAttributes(*args, **kwargs):
110da5b0
RD
9484 """
9485 GetClassDefaultAttributes(int variant=WINDOW_VARIANT_NORMAL) -> VisualAttributes
9486
9487 Get the default attributes for this class. This is useful if you want
9488 to use the same font or colour in your own control as in a standard
9489 control -- which is a much better idea than hard coding specific
9490 colours or fonts which might look completely out of place on the
9491 user's system, especially if it uses themes.
9492
9493 The variant parameter is only relevant under Mac currently and is
9494 ignore under other platforms. Under Mac, it will change the size of
9495 the returned font. See `wx.Window.SetWindowVariant` for more about
9496 this.
9497 """
54f9ee45 9498 return _core_.Control_GetClassDefaultAttributes(*args, **kwargs)
74a57fcd
RD
9499
9500 GetClassDefaultAttributes = staticmethod(GetClassDefaultAttributes)
d14a1e28
RD
9501
9502class ControlPtr(Control):
9503 def __init__(self, this):
9504 self.this = this
9505 if not hasattr(self,"thisown"): self.thisown = 0
9506 self.__class__ = Control
54f9ee45 9507_core_.Control_swigregister(ControlPtr)
b2dc1044 9508ControlNameStr = cvar.ControlNameStr
d14a1e28
RD
9509
9510def PreControl(*args, **kwargs):
15afbcd0
RD
9511 """
9512 PreControl() -> Control
9513
9514 Precreate a Control control for 2-phase creation
9515 """
54f9ee45 9516 val = _core_.new_PreControl(*args, **kwargs)
d14a1e28
RD
9517 val.thisown = 1
9518 return val
9519
74a57fcd 9520def Control_GetClassDefaultAttributes(*args, **kwargs):
110da5b0
RD
9521 """
9522 Control_GetClassDefaultAttributes(int variant=WINDOW_VARIANT_NORMAL) -> VisualAttributes
9523
9524 Get the default attributes for this class. This is useful if you want
9525 to use the same font or colour in your own control as in a standard
9526 control -- which is a much better idea than hard coding specific
9527 colours or fonts which might look completely out of place on the
9528 user's system, especially if it uses themes.
9529
9530 The variant parameter is only relevant under Mac currently and is
9531 ignore under other platforms. Under Mac, it will change the size of
9532 the returned font. See `wx.Window.SetWindowVariant` for more about
9533 this.
9534 """
54f9ee45 9535 return _core_.Control_GetClassDefaultAttributes(*args, **kwargs)
74a57fcd 9536
d14a1e28
RD
9537#---------------------------------------------------------------------------
9538
9539class ItemContainer(object):
15afbcd0 9540 """
53aa7709
RD
9541 The wx.ItemContainer class defines an interface which is implemented
9542 by all controls which have string subitems, each of which may be
9543 selected, such as `wx.ListBox`, `wx.CheckListBox`, `wx.Choice` as well
9544 as `wx.ComboBox` which implements an extended interface deriving from
41e2b43e 9545 this one.
15afbcd0 9546
41e2b43e
RD
9547 It defines the methods for accessing the control's items and although
9548 each of the derived classes implements them differently, they still
9549 all conform to the same interface.
15afbcd0 9550
41e2b43e
RD
9551 The items in a wx.ItemContainer have (non empty) string labels and,
9552 optionally, client data associated with them.
15afbcd0
RD
9553
9554 """
d14a1e28
RD
9555 def __init__(self): raise RuntimeError, "No constructor defined"
9556 def __repr__(self):
9557 return "<%s.%s; proxy of C++ wxItemContainer instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
e811c8ce 9558 def Append(*args, **kwargs):
15afbcd0 9559 """
a95a7133 9560 Append(self, String item, PyObject clientData=None) -> int
15afbcd0 9561
41e2b43e
RD
9562 Adds the item to the control, associating the given data with the item
9563 if not None. The return value is the index of the newly added item
9564 which may be different from the last one if the control is sorted (e.g.
9565 has wx.LB_SORT or wx.CB_SORT style).
15afbcd0 9566 """
54f9ee45 9567 return _core_.ItemContainer_Append(*args, **kwargs)
e811c8ce
RD
9568
9569 def AppendItems(*args, **kwargs):
15afbcd0 9570 """
f5b96ee1 9571 AppendItems(self, List strings)
15afbcd0 9572
41e2b43e
RD
9573 Apend several items at once to the control. Notice that calling this
9574 method may be much faster than appending the items one by one if you
9575 need to add a lot of items.
15afbcd0 9576 """
54f9ee45 9577 return _core_.ItemContainer_AppendItems(*args, **kwargs)
e811c8ce
RD
9578
9579 def Insert(*args, **kwargs):
15afbcd0 9580 """
a95a7133 9581 Insert(self, String item, int pos, PyObject clientData=None) -> int
15afbcd0 9582
41e2b43e 9583 Insert an item into the control before the item at the ``pos`` index,
15afbcd0
RD
9584 optionally associating some data object with the item.
9585 """
54f9ee45 9586 return _core_.ItemContainer_Insert(*args, **kwargs)
e811c8ce
RD
9587
9588 def Clear(*args, **kwargs):
15afbcd0 9589 """
a95a7133 9590 Clear(self)
15afbcd0
RD
9591
9592 Removes all items from the control.
9593 """
54f9ee45 9594 return _core_.ItemContainer_Clear(*args, **kwargs)
e811c8ce
RD
9595
9596 def Delete(*args, **kwargs):
15afbcd0 9597 """
a95a7133 9598 Delete(self, int n)
15afbcd0 9599
41e2b43e
RD
9600 Deletes the item at the zero-based index 'n' from the control. Note
9601 that it is an error (signalled by a `wx.PyAssertionError` exception if
9602 enabled) to remove an item with the index negative or greater or equal
9603 than the number of items in the control.
15afbcd0 9604 """
54f9ee45 9605 return _core_.ItemContainer_Delete(*args, **kwargs)
e811c8ce 9606
53aa7709
RD
9607 def GetClientData(*args, **kwargs):
9608 """
9609 GetClientData(self, int n) -> PyObject
9610
9611 Returns the client data associated with the given item, (if any.)
9612 """
9613 return _core_.ItemContainer_GetClientData(*args, **kwargs)
9614
9615 def SetClientData(*args, **kwargs):
9616 """
9617 SetClientData(self, int n, PyObject clientData)
9618
9619 Associate the given client data with the item at position n.
9620 """
9621 return _core_.ItemContainer_SetClientData(*args, **kwargs)
9622
e811c8ce 9623 def GetCount(*args, **kwargs):
15afbcd0 9624 """
a95a7133 9625 GetCount(self) -> int
15afbcd0
RD
9626
9627 Returns the number of items in the control.
9628 """
54f9ee45 9629 return _core_.ItemContainer_GetCount(*args, **kwargs)
e811c8ce
RD
9630
9631 def IsEmpty(*args, **kwargs):
15afbcd0 9632 """
a95a7133 9633 IsEmpty(self) -> bool
15afbcd0
RD
9634
9635 Returns True if the control is empty or False if it has some items.
9636 """
54f9ee45 9637 return _core_.ItemContainer_IsEmpty(*args, **kwargs)
e811c8ce
RD
9638
9639 def GetString(*args, **kwargs):
15afbcd0 9640 """
a95a7133 9641 GetString(self, int n) -> String
15afbcd0
RD
9642
9643 Returns the label of the item with the given index.
9644 """
54f9ee45 9645 return _core_.ItemContainer_GetString(*args, **kwargs)
e811c8ce
RD
9646
9647 def GetStrings(*args, **kwargs):
a95a7133 9648 """GetStrings(self) -> wxArrayString"""
54f9ee45 9649 return _core_.ItemContainer_GetStrings(*args, **kwargs)
e811c8ce
RD
9650
9651 def SetString(*args, **kwargs):
15afbcd0 9652 """
a95a7133 9653 SetString(self, int n, String s)
15afbcd0
RD
9654
9655 Sets the label for the given item.
9656 """
54f9ee45 9657 return _core_.ItemContainer_SetString(*args, **kwargs)
e811c8ce
RD
9658
9659 def FindString(*args, **kwargs):
15afbcd0 9660 """
a95a7133 9661 FindString(self, String s) -> int
15afbcd0
RD
9662
9663 Finds an item whose label matches the given string. Returns the
41e2b43e
RD
9664 zero-based position of the item, or ``wx.NOT_FOUND`` if the string was not
9665 found.
15afbcd0 9666 """
54f9ee45 9667 return _core_.ItemContainer_FindString(*args, **kwargs)
e811c8ce 9668
53aa7709 9669 def SetSelection(*args, **kwargs):
15afbcd0 9670 """
53aa7709 9671 SetSelection(self, int n)
15afbcd0
RD
9672
9673 Sets the item at index 'n' to be the selected item.
9674 """
53aa7709 9675 return _core_.ItemContainer_SetSelection(*args, **kwargs)
e811c8ce
RD
9676
9677 def GetSelection(*args, **kwargs):
15afbcd0 9678 """
a95a7133 9679 GetSelection(self) -> int
15afbcd0 9680
41e2b43e
RD
9681 Returns the index of the selected item or ``wx.NOT_FOUND`` if no item
9682 is selected.
15afbcd0 9683 """
54f9ee45 9684 return _core_.ItemContainer_GetSelection(*args, **kwargs)
e811c8ce 9685
53aa7709
RD
9686 def SetStringSelection(*args, **kwargs):
9687 """SetStringSelection(self, String s) -> bool"""
9688 return _core_.ItemContainer_SetStringSelection(*args, **kwargs)
9689
e811c8ce 9690 def GetStringSelection(*args, **kwargs):
15afbcd0 9691 """
a95a7133 9692 GetStringSelection(self) -> String
15afbcd0 9693
41e2b43e
RD
9694 Returns the label of the selected item or an empty string if no item
9695 is selected.
15afbcd0 9696 """
54f9ee45 9697 return _core_.ItemContainer_GetStringSelection(*args, **kwargs)
e811c8ce 9698
53aa7709 9699 def Select(*args, **kwargs):
15afbcd0 9700 """
53aa7709 9701 Select(self, int n)
15afbcd0 9702
53aa7709
RD
9703 This is the same as `SetSelection` and exists only because it is
9704 slightly more natural for controls which support multiple selection.
15afbcd0 9705 """
53aa7709 9706 return _core_.ItemContainer_Select(*args, **kwargs)
e811c8ce 9707
d14a1e28
RD
9708
9709class ItemContainerPtr(ItemContainer):
9710 def __init__(self, this):
9711 self.this = this
9712 if not hasattr(self,"thisown"): self.thisown = 0
9713 self.__class__ = ItemContainer
54f9ee45 9714_core_.ItemContainer_swigregister(ItemContainerPtr)
d14a1e28
RD
9715
9716#---------------------------------------------------------------------------
9717
9718class ControlWithItems(Control,ItemContainer):
15afbcd0 9719 """
41e2b43e
RD
9720 wx.ControlWithItems combines the ``wx.ItemContainer`` class with the
9721 wx.Control class, and is used for the base class of various controls
9722 that have items.
15afbcd0 9723 """
d14a1e28
RD
9724 def __init__(self): raise RuntimeError, "No constructor defined"
9725 def __repr__(self):
9726 return "<%s.%s; proxy of C++ wxControlWithItems instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
9727
9728class ControlWithItemsPtr(ControlWithItems):
9729 def __init__(self, this):
9730 self.this = this
9731 if not hasattr(self,"thisown"): self.thisown = 0
9732 self.__class__ = ControlWithItems
54f9ee45 9733_core_.ControlWithItems_swigregister(ControlWithItemsPtr)
d14a1e28
RD
9734
9735#---------------------------------------------------------------------------
9736
9737class SizerItem(Object):
248ed943
RD
9738 """
9739 The wx.SizerItem class is used to track the position, size and other
9740 attributes of each item managed by a `wx.Sizer`. In normal usage user
9741 code should never need to deal directly with a wx.SizerItem, but
9742 custom classes derived from `wx.PySizer` will probably need to use the
9743 collection of wx.SizerItems held by wx.Sizer when calculating layout.
9744
9745 :see: `wx.Sizer`, `wx.GBSizerItem`
9746 """
e811c8ce
RD
9747 def __repr__(self):
9748 return "<%s.%s; proxy of C++ wxSizerItem instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 9749 def __init__(self, *args, **kwargs):
248ed943
RD
9750 """
9751 __init__(self) -> SizerItem
9752
9753 Constructs an empty wx.SizerItem. Either a window, sizer or spacer
9754 size will need to be set before this item can be used in a Sizer.
9755
9756 You will probably never need to create a wx.SizerItem directly as they
9757 are created automatically when the sizer's Add, Insert or Prepend
9758 methods are called.
9759
9760 :see: `wx.SizerItemSpacer`, `wx.SizerItemWindow`, `wx.SizerItemSizer`
9761 """
54f9ee45 9762 newobj = _core_.new_SizerItem(*args, **kwargs)
d14a1e28
RD
9763 self.this = newobj.this
9764 self.thisown = 1
9765 del newobj.thisown
e811c8ce 9766 def DeleteWindows(*args, **kwargs):
248ed943
RD
9767 """
9768 DeleteWindows(self)
9769
9770 Destroy the window or the windows in a subsizer, depending on the type
9771 of item.
9772 """
54f9ee45 9773 return _core_.SizerItem_DeleteWindows(*args, **kwargs)
e811c8ce
RD
9774
9775 def DetachSizer(*args, **kwargs):
248ed943
RD
9776 """
9777 DetachSizer(self)
9778
9779 Enable deleting the SizerItem without destroying the contained sizer.
9780 """
54f9ee45 9781 return _core_.SizerItem_DetachSizer(*args, **kwargs)
e811c8ce
RD
9782
9783 def GetSize(*args, **kwargs):
248ed943
RD
9784 """
9785 GetSize(self) -> Size
9786
9787 Get the current size of the item, as set in the last Layout.
9788 """
54f9ee45 9789 return _core_.SizerItem_GetSize(*args, **kwargs)
e811c8ce
RD
9790
9791 def CalcMin(*args, **kwargs):
248ed943
RD
9792 """
9793 CalcMin(self) -> Size
9794
9795 Calculates the minimum desired size for the item, including any space
9796 needed by borders.
9797 """
54f9ee45 9798 return _core_.SizerItem_CalcMin(*args, **kwargs)
e811c8ce
RD
9799
9800 def SetDimension(*args, **kwargs):
248ed943
RD
9801 """
9802 SetDimension(self, Point pos, Size size)
9803
9804 Set the position and size of the space allocated for this item by the
9805 sizer, and adjust the position and size of the item (window or
9806 subsizer) to be within that space taking alignment and borders into
9807 account.
9808 """
54f9ee45 9809 return _core_.SizerItem_SetDimension(*args, **kwargs)
e811c8ce
RD
9810
9811 def GetMinSize(*args, **kwargs):
248ed943
RD
9812 """
9813 GetMinSize(self) -> Size
9814
9815 Get the minimum size needed for the item.
9816 """
54f9ee45 9817 return _core_.SizerItem_GetMinSize(*args, **kwargs)
e811c8ce 9818
dfbb5885
RD
9819 def GetMinSizeWithBorder(*args, **kwargs):
9820 """
9821 GetMinSizeWithBorder(self) -> Size
9822
9823 Get the minimum size needed for the item with space for the borders
9824 added, if needed.
9825 """
9826 return _core_.SizerItem_GetMinSizeWithBorder(*args, **kwargs)
9827
e811c8ce 9828 def SetInitSize(*args, **kwargs):
a95a7133 9829 """SetInitSize(self, int x, int y)"""
54f9ee45 9830 return _core_.SizerItem_SetInitSize(*args, **kwargs)
e811c8ce
RD
9831
9832 def SetRatioWH(*args, **kwargs):
248ed943
RD
9833 """
9834 SetRatioWH(self, int width, int height)
9835
9836 Set the ratio item attribute.
9837 """
54f9ee45 9838 return _core_.SizerItem_SetRatioWH(*args, **kwargs)
e811c8ce
RD
9839
9840 def SetRatioSize(*args, **kwargs):
248ed943
RD
9841 """
9842 SetRatioSize(self, Size size)
9843
9844 Set the ratio item attribute.
9845 """
54f9ee45 9846 return _core_.SizerItem_SetRatioSize(*args, **kwargs)
e811c8ce
RD
9847
9848 def SetRatio(*args, **kwargs):
248ed943
RD
9849 """
9850 SetRatio(self, float ratio)
9851
9852 Set the ratio item attribute.
9853 """
54f9ee45 9854 return _core_.SizerItem_SetRatio(*args, **kwargs)
e811c8ce
RD
9855
9856 def GetRatio(*args, **kwargs):
248ed943
RD
9857 """
9858 GetRatio(self) -> float
9859
9860 Set the ratio item attribute.
9861 """
54f9ee45 9862 return _core_.SizerItem_GetRatio(*args, **kwargs)
e811c8ce 9863
d3b6e4ff
RD
9864 def GetRect(*args, **kwargs):
9865 """
9866 GetRect(self) -> Rect
9867
9868 Returns the rectangle that the sizer item should occupy
9869 """
9870 return _core_.SizerItem_GetRect(*args, **kwargs)
9871
e811c8ce 9872 def IsWindow(*args, **kwargs):
248ed943
RD
9873 """
9874 IsWindow(self) -> bool
9875
9876 Is this sizer item a window?
9877 """
54f9ee45 9878 return _core_.SizerItem_IsWindow(*args, **kwargs)
e811c8ce
RD
9879
9880 def IsSizer(*args, **kwargs):
248ed943
RD
9881 """
9882 IsSizer(self) -> bool
9883
9884 Is this sizer item a subsizer?
9885 """
54f9ee45 9886 return _core_.SizerItem_IsSizer(*args, **kwargs)
e811c8ce
RD
9887
9888 def IsSpacer(*args, **kwargs):
248ed943
RD
9889 """
9890 IsSpacer(self) -> bool
9891
9892 Is this sizer item a spacer?
9893 """
54f9ee45 9894 return _core_.SizerItem_IsSpacer(*args, **kwargs)
e811c8ce
RD
9895
9896 def SetProportion(*args, **kwargs):
248ed943
RD
9897 """
9898 SetProportion(self, int proportion)
9899
9900 Set the proportion value for this item.
9901 """
54f9ee45 9902 return _core_.SizerItem_SetProportion(*args, **kwargs)
e811c8ce
RD
9903
9904 def GetProportion(*args, **kwargs):
248ed943
RD
9905 """
9906 GetProportion(self) -> int
9907
9908 Get the proportion value for this item.
9909 """
54f9ee45 9910 return _core_.SizerItem_GetProportion(*args, **kwargs)
e811c8ce 9911
248ed943
RD
9912 SetOption = wx._deprecated(SetProportion, "Please use `SetProportion` instead.")
9913 GetOption = wx._deprecated(GetProportion, "Please use `GetProportion` instead.")
e811c8ce 9914 def SetFlag(*args, **kwargs):
248ed943
RD
9915 """
9916 SetFlag(self, int flag)
9917
9918 Set the flag value for this item.
9919 """
54f9ee45 9920 return _core_.SizerItem_SetFlag(*args, **kwargs)
e811c8ce
RD
9921
9922 def GetFlag(*args, **kwargs):
248ed943
RD
9923 """
9924 GetFlag(self) -> int
9925
9926 Get the flag value for this item.
9927 """
54f9ee45 9928 return _core_.SizerItem_GetFlag(*args, **kwargs)
e811c8ce
RD
9929
9930 def SetBorder(*args, **kwargs):
248ed943
RD
9931 """
9932 SetBorder(self, int border)
9933
9934 Set the border value for this item.
9935 """
54f9ee45 9936 return _core_.SizerItem_SetBorder(*args, **kwargs)
e811c8ce
RD
9937
9938 def GetBorder(*args, **kwargs):
248ed943
RD
9939 """
9940 GetBorder(self) -> int
9941
9942 Get the border value for this item.
9943 """
54f9ee45 9944 return _core_.SizerItem_GetBorder(*args, **kwargs)
e811c8ce
RD
9945
9946 def GetWindow(*args, **kwargs):
248ed943
RD
9947 """
9948 GetWindow(self) -> Window
9949
9950 Get the window (if any) that is managed by this sizer item.
9951 """
54f9ee45 9952 return _core_.SizerItem_GetWindow(*args, **kwargs)
e811c8ce
RD
9953
9954 def SetWindow(*args, **kwargs):
248ed943
RD
9955 """
9956 SetWindow(self, Window window)
9957
9958 Set the window to be managed by this sizer item.
9959 """
54f9ee45 9960 return _core_.SizerItem_SetWindow(*args, **kwargs)
e811c8ce
RD
9961
9962 def GetSizer(*args, **kwargs):
248ed943
RD
9963 """
9964 GetSizer(self) -> Sizer
9965
9966 Get the subsizer (if any) that is managed by this sizer item.
9967 """
54f9ee45 9968 return _core_.SizerItem_GetSizer(*args, **kwargs)
e811c8ce
RD
9969
9970 def SetSizer(*args, **kwargs):
248ed943
RD
9971 """
9972 SetSizer(self, Sizer sizer)
9973
9974 Set the subsizer to be managed by this sizer item.
9975 """
54f9ee45 9976 return _core_.SizerItem_SetSizer(*args, **kwargs)
e811c8ce
RD
9977
9978 def GetSpacer(*args, **kwargs):
248ed943
RD
9979 """
9980 GetSpacer(self) -> Size
9981
9982 Get the size of the spacer managed by this sizer item.
9983 """
54f9ee45 9984 return _core_.SizerItem_GetSpacer(*args, **kwargs)
e811c8ce
RD
9985
9986 def SetSpacer(*args, **kwargs):
248ed943
RD
9987 """
9988 SetSpacer(self, Size size)
9989
9990 Set the size of the spacer to be managed by this sizer item.
9991 """
54f9ee45 9992 return _core_.SizerItem_SetSpacer(*args, **kwargs)
e811c8ce
RD
9993
9994 def Show(*args, **kwargs):
248ed943
RD
9995 """
9996 Show(self, bool show)
9997
9998 Set the show item attribute, which sizers use to determine if the item
9999 is to be made part of the layout or not. If the item is tracking a
10000 window then it is shown or hidden as needed.
10001 """
54f9ee45 10002 return _core_.SizerItem_Show(*args, **kwargs)
e811c8ce
RD
10003
10004 def IsShown(*args, **kwargs):
248ed943
RD
10005 """
10006 IsShown(self) -> bool
10007
10008 Is the item to be shown in the layout?
10009 """
54f9ee45 10010 return _core_.SizerItem_IsShown(*args, **kwargs)
e811c8ce
RD
10011
10012 def GetPosition(*args, **kwargs):
248ed943
RD
10013 """
10014 GetPosition(self) -> Point
10015
10016 Returns the current position of the item, as set in the last Layout.
10017 """
54f9ee45 10018 return _core_.SizerItem_GetPosition(*args, **kwargs)
e811c8ce
RD
10019
10020 def GetUserData(*args, **kwargs):
248ed943
RD
10021 """
10022 GetUserData(self) -> PyObject
10023
10024 Returns the userData associated with this sizer item, or None if there
10025 isn't any.
10026 """
54f9ee45 10027 return _core_.SizerItem_GetUserData(*args, **kwargs)
e811c8ce 10028
d14a1e28
RD
10029
10030class SizerItemPtr(SizerItem):
10031 def __init__(self, this):
10032 self.this = this
10033 if not hasattr(self,"thisown"): self.thisown = 0
10034 self.__class__ = SizerItem
54f9ee45 10035_core_.SizerItem_swigregister(SizerItemPtr)
d14a1e28 10036
248ed943 10037def SizerItemWindow(*args, **kwargs):
0df68c9f 10038 """
248ed943
RD
10039 SizerItemWindow(Window window, int proportion, int flag, int border,
10040 PyObject userData=None) -> SizerItem
10041
10042 Constructs a `wx.SizerItem` for tracking a window.
0df68c9f 10043 """
248ed943 10044 val = _core_.new_SizerItemWindow(*args, **kwargs)
d14a1e28
RD
10045 val.thisown = 1
10046 return val
10047
248ed943 10048def SizerItemSpacer(*args, **kwargs):
0df68c9f 10049 """
248ed943
RD
10050 SizerItemSpacer(int width, int height, int proportion, int flag, int border,
10051 PyObject userData=None) -> SizerItem
10052
10053 Constructs a `wx.SizerItem` for tracking a spacer.
0df68c9f 10054 """
248ed943 10055 val = _core_.new_SizerItemSpacer(*args, **kwargs)
d14a1e28
RD
10056 val.thisown = 1
10057 return val
10058
10059def SizerItemSizer(*args, **kwargs):
0df68c9f
RD
10060 """
10061 SizerItemSizer(Sizer sizer, int proportion, int flag, int border,
248ed943
RD
10062 PyObject userData=None) -> SizerItem
10063
10064 Constructs a `wx.SizerItem` for tracking a subsizer
0df68c9f 10065 """
54f9ee45 10066 val = _core_.new_SizerItemSizer(*args, **kwargs)
d14a1e28
RD
10067 val.thisown = 1
10068 return val
10069
10070class Sizer(Object):
248ed943
RD
10071 """
10072 wx.Sizer is the abstract base class used for laying out subwindows in
10073 a window. You cannot use wx.Sizer directly; instead, you will have to
10074 use one of the sizer classes derived from it such as `wx.BoxSizer`,
10075 `wx.StaticBoxSizer`, `wx.NotebookSizer`, `wx.GridSizer`, `wx.FlexGridSizer`
10076 and `wx.GridBagSizer`.
10077
10078 The concept implemented by sizers in wxWidgets is closely related to
10079 layout tools in other GUI toolkits, such as Java's AWT, the GTK
10080 toolkit or the Qt toolkit. It is based upon the idea of the individual
10081 subwindows reporting their minimal required size and their ability to
10082 get stretched if the size of the parent window has changed. This will
10083 most often mean that the programmer does not set the original size of
10084 a dialog in the beginning, rather the dialog will assigned a sizer and
10085 this sizer will be queried about the recommended size. The sizer in
10086 turn will query its children, which can be normal windows or contorls,
10087 empty space or other sizers, so that a hierarchy of sizers can be
10088 constructed. Note that wxSizer does not derive from wxWindow and thus
10089 do not interfere with tab ordering and requires very little resources
10090 compared to a real window on screen.
10091
10092 What makes sizers so well fitted for use in wxWidgets is the fact that
10093 every control reports its own minimal size and the algorithm can
10094 handle differences in font sizes or different window (dialog item)
10095 sizes on different platforms without problems. If for example the
10096 standard font as well as the overall design of Mac widgets requires
10097 more space than on Windows, then the initial size of a dialog using a
10098 sizer will automatically be bigger on Mac than on Windows.
10099 """
e811c8ce
RD
10100 def __init__(self): raise RuntimeError, "No constructor defined"
10101 def __repr__(self):
10102 return "<%s.%s; proxy of C++ wxSizer instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
10103 def _setOORInfo(*args, **kwargs):
a95a7133 10104 """_setOORInfo(self, PyObject _self)"""
54f9ee45 10105 return _core_.Sizer__setOORInfo(*args, **kwargs)
e811c8ce
RD
10106
10107 def Add(*args, **kwargs):
0df68c9f 10108 """
248ed943 10109 Add(self, item, int proportion=0, int flag=0, int border=0,
d3b6e4ff 10110 PyObject userData=None) -> wx.SizerItem
248ed943
RD
10111
10112 Appends a child item to the sizer.
0df68c9f 10113 """
54f9ee45 10114 return _core_.Sizer_Add(*args, **kwargs)
e811c8ce
RD
10115
10116 def Insert(*args, **kwargs):
0df68c9f 10117 """
248ed943 10118 Insert(self, int before, item, int proportion=0, int flag=0, int border=0,
d3b6e4ff 10119 PyObject userData=None) -> wx.SizerItem
248ed943
RD
10120
10121 Inserts a new item into the list of items managed by this sizer before
10122 the item at index *before*. See `Add` for a description of the parameters.
0df68c9f 10123 """
54f9ee45 10124 return _core_.Sizer_Insert(*args, **kwargs)
e811c8ce
RD
10125
10126 def Prepend(*args, **kwargs):
0df68c9f 10127 """
248ed943 10128 Prepend(self, item, int proportion=0, int flag=0, int border=0,
d3b6e4ff 10129 PyObject userData=None) -> wx.SizerItem
248ed943
RD
10130
10131 Adds a new item to the begining of the list of sizer items managed by
10132 this sizer. See `Add` for a description of the parameters.
0df68c9f 10133 """
54f9ee45 10134 return _core_.Sizer_Prepend(*args, **kwargs)
e811c8ce
RD
10135
10136 def Remove(*args, **kwargs):
248ed943
RD
10137 """
10138 Remove(self, item) -> bool
10139
10140 Removes an item from the sizer and destroys it. This method does not
10141 cause any layout or resizing to take place, call `Layout` to update
10142 the layout on screen after removing a child from the sizer. The
10143 *item* parameter can be either a window, a sizer, or the zero-based
10144 index of an item to remove. Returns True if the child item was found
10145 and removed.
10146 """
54f9ee45 10147 return _core_.Sizer_Remove(*args, **kwargs)
e811c8ce 10148
1c0f361b 10149 def Detach(*args, **kwargs):
248ed943
RD
10150 """
10151 Detach(self, item) -> bool
10152
10153 Detaches an item from the sizer without destroying it. This method
10154 does not cause any layout or resizing to take place, call `Layout` to
10155 do so. The *item* parameter can be either a window, a sizer, or the
10156 zero-based index of the item to be detached. Returns True if the child item
10157 was found and detached.
10158 """
1c0f361b
RD
10159 return _core_.Sizer_Detach(*args, **kwargs)
10160
d3b6e4ff
RD
10161 def GetItem(*args, **kwargs):
10162 """
10163 GetItem(self, item) -> wx.SizerItem
10164
10165 Returns the `wx.SizerItem` which holds the *item* given. The *item*
10166 parameter can be either a window, a sizer, or the zero-based index of
10167 the item to be detached.
10168 """
10169 return _core_.Sizer_GetItem(*args, **kwargs)
10170
e811c8ce 10171 def _SetItemMinSize(*args, **kwargs):
a95a7133 10172 """_SetItemMinSize(self, PyObject item, Size size)"""
54f9ee45 10173 return _core_.Sizer__SetItemMinSize(*args, **kwargs)
e811c8ce 10174
248ed943
RD
10175 def SetItemMinSize(self, item, *args):
10176 """
10177 SetItemMinSize(self, item, Size size)
10178
10179 Sets the minimum size that will be allocated for an item in the sizer.
10180 The *item* parameter can be either a window, a sizer, or the
10181 zero-based index of the item. If a window or sizer is given then it
10182 will be searched for recursivly in subsizers if neccessary.
10183 """
10184 if len(args) == 2:
10185 # for backward compatibility accept separate width,height args too
10186 return self._SetItemMinSize(item, args)
10187 else:
10188 return self._SetItemMinSize(item, args[0])
10189
e811c8ce 10190 def AddItem(*args, **kwargs):
248ed943
RD
10191 """
10192 AddItem(self, SizerItem item)
10193
10194 Adds a `wx.SizerItem` to the sizer.
10195 """
54f9ee45 10196 return _core_.Sizer_AddItem(*args, **kwargs)
e811c8ce
RD
10197
10198 def InsertItem(*args, **kwargs):
248ed943
RD
10199 """
10200 InsertItem(self, int index, SizerItem item)
10201
10202 Inserts a `wx.SizerItem` to the sizer at the position given by *index*.
10203 """
54f9ee45 10204 return _core_.Sizer_InsertItem(*args, **kwargs)
e811c8ce
RD
10205
10206 def PrependItem(*args, **kwargs):
248ed943
RD
10207 """
10208 PrependItem(self, SizerItem item)
10209
10210 Prepends a `wx.SizerItem` to the sizer.
10211 """
54f9ee45 10212 return _core_.Sizer_PrependItem(*args, **kwargs)
e811c8ce 10213
248ed943 10214 def AddMany(self, items):
66c033b4
RD
10215 """
10216 AddMany is a convenience method for adding several items
10217 to a sizer at one time. Simply pass it a list of tuples,
10218 where each tuple consists of the parameters that you
10219 would normally pass to the `Add` method.
10220 """
248ed943
RD
10221 for item in items:
10222 if type(item) != type(()) or (len(item) == 2 and type(item[0]) == type(1)):
10223 item = (item, )
10224 self.Add(*item)
d14a1e28 10225
74e96f3d 10226 # for backwards compatibility only, please do not use in new code
b9d6a5f3
RD
10227 def AddWindow(self, *args, **kw):
10228 """Compatibility alias for `Add`."""
10229 return self.Add(*args, **kw)
10230 def AddSizer(self, *args, **kw):
10231 """Compatibility alias for `Add`."""
10232 return self.Add(*args, **kw)
10233 def AddSpacer(self, *args, **kw):
10234 """Compatibility alias for `Add`."""
10235 return self.Add(*args, **kw)
10236
10237 def PrependWindow(self, *args, **kw):
10238 """Compatibility alias for `Prepend`."""
10239 return self.Prepend(*args, **kw)
10240 def PrependSizer(self, *args, **kw):
10241 """Compatibility alias for `Prepend`."""
10242 return self.Prepend(*args, **kw)
10243 def PrependSpacer(self, *args, **kw):
10244 """Compatibility alias for `Prepend`."""
10245 return self.Prepend(*args, **kw)
10246
10247 def InsertWindow(self, *args, **kw):
10248 """Compatibility alias for `Insert`."""
10249 return self.Insert(*args, **kw)
10250 def InsertSizer(self, *args, **kw):
10251 """Compatibility alias for `Insert`."""
10252 return self.Insert(*args, **kw)
10253 def InsertSpacer(self, *args, **kw):
10254 """Compatibility alias for `Insert`."""
10255 return self.Insert(*args, **kw)
10256
10257 def RemoveWindow(self, *args, **kw):
10258 """Compatibility alias for `Remove`."""
10259 return self.Remove(*args, **kw)
10260 def RemoveSizer(self, *args, **kw):
10261 """Compatibility alias for `Remove`."""
10262 return self.Remove(*args, **kw)
10263 def RemovePos(self, *args, **kw):
10264 """Compatibility alias for `Remove`."""
10265 return self.Remove(*args, **kw)
d14a1e28
RD
10266
10267
e811c8ce 10268 def SetDimension(*args, **kwargs):
248ed943
RD
10269 """
10270 SetDimension(self, int x, int y, int width, int height)
10271
10272 Call this to force the sizer to take the given dimension and thus
10273 force the items owned by the sizer to resize themselves according to
10274 the rules defined by the parameter in the `Add`, `Insert` or `Prepend`
10275 methods.
10276 """
54f9ee45 10277 return _core_.Sizer_SetDimension(*args, **kwargs)
e811c8ce
RD
10278
10279 def SetMinSize(*args, **kwargs):
248ed943
RD
10280 """
10281 SetMinSize(self, Size size)
10282
10283 Call this to give the sizer a minimal size. Normally, the sizer will
10284 calculate its minimal size based purely on how much space its children
10285 need. After calling this method `GetMinSize` will return either the
10286 minimal size as requested by its children or the minimal size set
10287 here, depending on which is bigger.
10288 """
54f9ee45 10289 return _core_.Sizer_SetMinSize(*args, **kwargs)
e811c8ce
RD
10290
10291 def GetSize(*args, **kwargs):
248ed943
RD
10292 """
10293 GetSize(self) -> Size
10294
10295 Returns the current size of the space managed by the sizer.
10296 """
54f9ee45 10297 return _core_.Sizer_GetSize(*args, **kwargs)
e811c8ce
RD
10298
10299 def GetPosition(*args, **kwargs):
248ed943
RD
10300 """
10301 GetPosition(self) -> Point
10302
10303 Returns the current position of the sizer's managed space.
10304 """
54f9ee45 10305 return _core_.Sizer_GetPosition(*args, **kwargs)
e811c8ce
RD
10306
10307 def GetMinSize(*args, **kwargs):
248ed943
RD
10308 """
10309 GetMinSize(self) -> Size
10310
10311 Returns the minimal size of the sizer. This is either the combined
10312 minimal size of all the children and their borders or the minimal size
10313 set by SetMinSize, depending on which is bigger.
10314 """
54f9ee45 10315 return _core_.Sizer_GetMinSize(*args, **kwargs)
e811c8ce 10316
d14a1e28 10317 def GetSizeTuple(self):
1c0f361b 10318 return self.GetSize().Get()
d14a1e28 10319 def GetPositionTuple(self):
1c0f361b 10320 return self.GetPosition().Get()
d14a1e28 10321 def GetMinSizeTuple(self):
1c0f361b 10322 return self.GetMinSize().Get()
d14a1e28 10323
e811c8ce 10324 def RecalcSizes(*args, **kwargs):
248ed943
RD
10325 """
10326 RecalcSizes(self)
10327
10328 Using the sizes calculated by `CalcMin` reposition and resize all the
10329 items managed by this sizer. You should not need to call this directly as
10330 it is called by `Layout`.
10331 """
54f9ee45 10332 return _core_.Sizer_RecalcSizes(*args, **kwargs)
e811c8ce
RD
10333
10334 def CalcMin(*args, **kwargs):
248ed943
RD
10335 """
10336 CalcMin(self) -> Size
10337
10338 This method is where the sizer will do the actual calculation of its
10339 children's minimal sizes. You should not need to call this directly as
10340 it is called by `Layout`.
10341 """
54f9ee45 10342 return _core_.Sizer_CalcMin(*args, **kwargs)
e811c8ce
RD
10343
10344 def Layout(*args, **kwargs):
248ed943
RD
10345 """
10346 Layout(self)
10347
10348 This method will force the recalculation and layout of the items
10349 controlled by the sizer using the current space allocated to the
10350 sizer. Normally this is called automatically from the owning window's
10351 EVT_SIZE handler, but it is also useful to call it from user code when
10352 one of the items in a sizer change size, or items are added or
10353 removed.
10354 """
54f9ee45 10355 return _core_.Sizer_Layout(*args, **kwargs)
e811c8ce
RD
10356
10357 def Fit(*args, **kwargs):
248ed943
RD
10358 """
10359 Fit(self, Window window) -> Size
10360
10361 Tell the sizer to resize the *window* to match the sizer's minimal
10362 size. This is commonly done in the constructor of the window itself in
10363 order to set its initial size to match the needs of the children as
10364 determined by the sizer. Returns the new size.
10365
10366 For a top level window this is the total window size, not the client size.
10367 """
54f9ee45 10368 return _core_.Sizer_Fit(*args, **kwargs)
e811c8ce
RD
10369
10370 def FitInside(*args, **kwargs):
248ed943
RD
10371 """
10372 FitInside(self, Window window)
10373
10374 Tell the sizer to resize the *virtual size* of the *window* to match the
10375 sizer's minimal size. This will not alter the on screen size of the
10376 window, but may cause the addition/removal/alteration of scrollbars
10377 required to view the virtual area in windows which manage it.
10378
10379 :see: `wx.ScrolledWindow.SetScrollbars`, `SetVirtualSizeHints`
10380
10381 """
54f9ee45 10382 return _core_.Sizer_FitInside(*args, **kwargs)
e811c8ce
RD
10383
10384 def SetSizeHints(*args, **kwargs):
248ed943
RD
10385 """
10386 SetSizeHints(self, Window window)
10387
10388 Tell the sizer to set (and `Fit`) the minimal size of the *window* to
10389 match the sizer's minimal size. This is commonly done in the
10390 constructor of the window itself if the window is resizable (as are
10391 many dialogs under Unix and frames on probably all platforms) in order
10392 to prevent the window from being sized smaller than the minimal size
10393 required by the sizer.
10394 """
54f9ee45 10395 return _core_.Sizer_SetSizeHints(*args, **kwargs)
e811c8ce
RD
10396
10397 def SetVirtualSizeHints(*args, **kwargs):
248ed943
RD
10398 """
10399 SetVirtualSizeHints(self, Window window)
10400
10401 Tell the sizer to set the minimal size of the window virtual area to
10402 match the sizer's minimal size. For windows with managed scrollbars
10403 this will set them appropriately.
10404
10405 :see: `wx.ScrolledWindow.SetScrollbars`
10406
10407 """
54f9ee45 10408 return _core_.Sizer_SetVirtualSizeHints(*args, **kwargs)
e811c8ce
RD
10409
10410 def Clear(*args, **kwargs):
248ed943
RD
10411 """
10412 Clear(self, bool deleteWindows=False)
10413
10414 Clear all items from the sizer, optionally destroying the window items
10415 as well.
10416 """
54f9ee45 10417 return _core_.Sizer_Clear(*args, **kwargs)
e811c8ce
RD
10418
10419 def DeleteWindows(*args, **kwargs):
248ed943
RD
10420 """
10421 DeleteWindows(self)
10422
10423 Destroy all windows managed by the sizer.
10424 """
54f9ee45 10425 return _core_.Sizer_DeleteWindows(*args, **kwargs)
e811c8ce
RD
10426
10427 def GetChildren(*args, **kwargs):
248ed943 10428 """
51b83b37 10429 GetChildren(self) -> list
248ed943
RD
10430
10431 Returns a list of all the `wx.SizerItem` objects managed by the sizer.
10432 """
54f9ee45 10433 return _core_.Sizer_GetChildren(*args, **kwargs)
e811c8ce
RD
10434
10435 def Show(*args, **kwargs):
248ed943 10436 """
ae8162c8 10437 Show(self, item, bool show=True, bool recursive=false) -> bool
e811c8ce 10438
248ed943
RD
10439 Shows or hides an item managed by the sizer. To make a sizer item
10440 disappear or reappear, use Show followed by `Layout`. The *item*
10441 parameter can be either a window, a sizer, or the zero-based index of
7e63a440
RD
10442 the item. Use the recursive parameter to show or hide an item in a
10443 subsizer. Returns True if the item was found.
248ed943
RD
10444 """
10445 return _core_.Sizer_Show(*args, **kwargs)
e811c8ce
RD
10446
10447 def IsShown(*args, **kwargs):
248ed943
RD
10448 """
10449 IsShown(self, item)
10450
10451 Determines if the item is currently shown. sizer. To make a sizer
10452 item disappear or reappear, use Show followed by `Layout`. The *item*
10453 parameter can be either a window, a sizer, or the zero-based index of
10454 the item.
10455 """
54f9ee45 10456 return _core_.Sizer_IsShown(*args, **kwargs)
e811c8ce 10457
7e63a440 10458 def Hide(self, item, recursive=False):
248ed943 10459 """
27fb7603 10460 A convenience method for `Show` (item, False, recursive).
248ed943 10461 """
06759a38 10462 return self.Show(item, False, recursive)
248ed943 10463
e811c8ce 10464 def ShowItems(*args, **kwargs):
248ed943
RD
10465 """
10466 ShowItems(self, bool show)
10467
84f85550 10468 Recursively call `wx.SizerItem.Show` on all sizer items.
248ed943 10469 """
54f9ee45 10470 return _core_.Sizer_ShowItems(*args, **kwargs)
e811c8ce 10471
d14a1e28
RD
10472
10473class SizerPtr(Sizer):
10474 def __init__(self, this):
10475 self.this = this
10476 if not hasattr(self,"thisown"): self.thisown = 0
10477 self.__class__ = Sizer
54f9ee45 10478_core_.Sizer_swigregister(SizerPtr)
d14a1e28
RD
10479
10480class PySizer(Sizer):
248ed943
RD
10481 """
10482 wx.PySizer is a special version of `wx.Sizer` that has been
10483 instrumented to allow the C++ virtual methods to be overloaded in
10484 Python derived classes. You would derive from this class if you are
10485 wanting to implement a custom sizer in Python code. Simply implement
10486 `CalcMin` and `RecalcSizes` in the derived class and you're all set.
10487 For example::
10488
10489 class MySizer(wx.PySizer):
10490 def __init__(self):
10491 wx.PySizer.__init__(self)
10492
10493 def CalcMin(self):
10494 for item in self.GetChildren():
10495 # calculate the total minimum width and height needed
10496 # by all items in the sizer according to this sizer's
10497 # layout algorithm.
10498 ...
10499 return wx.Size(width, height)
10500
10501 def RecalcSizes(self):
10502 # find the space allotted to this sizer
10503 pos = self.GetPosition()
10504 size = self.GetSize()
10505 for item in self.GetChildren():
10506 # Recalculate (if necessary) the position and size of
10507 # each item and then call item.SetDimension to do the
10508 # actual positioning and sizing of the items within the
10509 # space alloted to this sizer.
10510 ...
10511 item.SetDimension(itemPos, itemSize)
10512
10513
10514 When `Layout` is called it first calls `CalcMin` followed by
10515 `RecalcSizes` so you can optimize a bit by saving the results of
e505d15e 10516 `CalcMin` and reusing them in `RecalcSizes`.
248ed943
RD
10517
10518 :see: `wx.SizerItem`, `wx.Sizer.GetChildren`
10519
10520
10521 """
e811c8ce
RD
10522 def __repr__(self):
10523 return "<%s.%s; proxy of C++ wxPySizer instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 10524 def __init__(self, *args, **kwargs):
248ed943
RD
10525 """
10526 __init__(self) -> PySizer
10527
10528 Creates a wx.PySizer. Must be called from the __init__ in the derived
10529 class.
10530 """
54f9ee45 10531 newobj = _core_.new_PySizer(*args, **kwargs)
d14a1e28
RD
10532 self.this = newobj.this
10533 self.thisown = 1
10534 del newobj.thisown
10535 self._setCallbackInfo(self, PySizer);self._setOORInfo(self)
e811c8ce
RD
10536
10537 def _setCallbackInfo(*args, **kwargs):
a95a7133 10538 """_setCallbackInfo(self, PyObject self, PyObject _class)"""
54f9ee45 10539 return _core_.PySizer__setCallbackInfo(*args, **kwargs)
e811c8ce 10540
d14a1e28
RD
10541
10542class PySizerPtr(PySizer):
10543 def __init__(self, this):
10544 self.this = this
10545 if not hasattr(self,"thisown"): self.thisown = 0
10546 self.__class__ = PySizer
54f9ee45 10547_core_.PySizer_swigregister(PySizerPtr)
d14a1e28
RD
10548
10549#---------------------------------------------------------------------------
10550
10551class BoxSizer(Sizer):
248ed943
RD
10552 """
10553 The basic idea behind a box sizer is that windows will most often be
10554 laid out in rather simple basic geometry, typically in a row or a
10555 column or nested hierarchies of either. A wx.BoxSizer will lay out
10556 its items in a simple row or column, depending on the orientation
10557 parameter passed to the constructor.
10558 """
e811c8ce
RD
10559 def __repr__(self):
10560 return "<%s.%s; proxy of C++ wxBoxSizer instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 10561 def __init__(self, *args, **kwargs):
248ed943
RD
10562 """
10563 __init__(self, int orient=HORIZONTAL) -> BoxSizer
10564
10565 Constructor for a wx.BoxSizer. *orient* may be one of ``wx.VERTICAL``
10566 or ``wx.HORIZONTAL`` for creating either a column sizer or a row
10567 sizer.
10568 """
54f9ee45 10569 newobj = _core_.new_BoxSizer(*args, **kwargs)
d14a1e28
RD
10570 self.this = newobj.this
10571 self.thisown = 1
10572 del newobj.thisown
10573 self._setOORInfo(self)
e811c8ce
RD
10574
10575 def GetOrientation(*args, **kwargs):
248ed943
RD
10576 """
10577 GetOrientation(self) -> int
10578
10579 Returns the current orientation of the sizer.
10580 """
54f9ee45 10581 return _core_.BoxSizer_GetOrientation(*args, **kwargs)
e811c8ce
RD
10582
10583 def SetOrientation(*args, **kwargs):
248ed943
RD
10584 """
10585 SetOrientation(self, int orient)
e811c8ce 10586
248ed943
RD
10587 Resets the orientation of the sizer.
10588 """
10589 return _core_.BoxSizer_SetOrientation(*args, **kwargs)
e811c8ce 10590
d14a1e28
RD
10591
10592class BoxSizerPtr(BoxSizer):
10593 def __init__(self, this):
10594 self.this = this
10595 if not hasattr(self,"thisown"): self.thisown = 0
10596 self.__class__ = BoxSizer
54f9ee45 10597_core_.BoxSizer_swigregister(BoxSizerPtr)
d14a1e28
RD
10598
10599#---------------------------------------------------------------------------
10600
10601class StaticBoxSizer(BoxSizer):
248ed943
RD
10602 """
10603 wx.StaticBoxSizer derives from and functions identically to the
10604 `wx.BoxSizer` and adds a `wx.StaticBox` around the items that the sizer
10605 manages. Note that this static box must be created separately and
10606 passed to the sizer constructor.
10607 """
e811c8ce
RD
10608 def __repr__(self):
10609 return "<%s.%s; proxy of C++ wxStaticBoxSizer instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 10610 def __init__(self, *args, **kwargs):
248ed943
RD
10611 """
10612 __init__(self, StaticBox box, int orient=HORIZONTAL) -> StaticBoxSizer
10613
10614 Constructor. It takes an associated static box and the orientation
10615 *orient* as parameters - orient can be either of ``wx.VERTICAL`` or
10616 ``wx.HORIZONTAL``.
10617 """
54f9ee45 10618 newobj = _core_.new_StaticBoxSizer(*args, **kwargs)
d14a1e28
RD
10619 self.this = newobj.this
10620 self.thisown = 1
10621 del newobj.thisown
10622 self._setOORInfo(self)
e811c8ce
RD
10623
10624 def GetStaticBox(*args, **kwargs):
248ed943
RD
10625 """
10626 GetStaticBox(self) -> StaticBox
e811c8ce 10627
248ed943
RD
10628 Returns the static box associated with this sizer.
10629 """
10630 return _core_.StaticBoxSizer_GetStaticBox(*args, **kwargs)
e811c8ce 10631
d14a1e28
RD
10632
10633class StaticBoxSizerPtr(StaticBoxSizer):
10634 def __init__(self, this):
10635 self.this = this
10636 if not hasattr(self,"thisown"): self.thisown = 0
10637 self.__class__ = StaticBoxSizer
54f9ee45 10638_core_.StaticBoxSizer_swigregister(StaticBoxSizerPtr)
d14a1e28
RD
10639
10640#---------------------------------------------------------------------------
10641
10642class GridSizer(Sizer):
248ed943
RD
10643 """
10644 A grid sizer is a sizer which lays out its children in a
10645 two-dimensional table with all cells having the same size. In other
10646 words, the width of each cell within the grid is the width of the
10647 widest item added to the sizer and the height of each grid cell is the
10648 height of the tallest item. An optional vertical and/or horizontal
10649 gap between items can also be specified (in pixels.)
10650
10651 Items are placed in the cells of the grid in the order they are added,
10652 in row-major order. In other words, the first row is filled first,
10653 then the second, and so on until all items have been added. (If
10654 neccessary, additional rows will be added as items are added.) If you
10655 need to have greater control over the cells that items are placed in
10656 then use the `wx.GridBagSizer`.
10657
10658 """
e811c8ce
RD
10659 def __repr__(self):
10660 return "<%s.%s; proxy of C++ wxGridSizer instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 10661 def __init__(self, *args, **kwargs):
248ed943
RD
10662 """
10663 __init__(self, int rows=1, int cols=0, int vgap=0, int hgap=0) -> GridSizer
10664
10665 Constructor for a wx.GridSizer. *rows* and *cols* determine the number
10666 of columns and rows in the sizer - if either of the parameters is
10667 zero, it will be calculated to from the total number of children in
10668 the sizer, thus making the sizer grow dynamically. *vgap* and *hgap*
10669 define extra space between all children.
10670 """
54f9ee45 10671 newobj = _core_.new_GridSizer(*args, **kwargs)
d14a1e28
RD
10672 self.this = newobj.this
10673 self.thisown = 1
10674 del newobj.thisown
10675 self._setOORInfo(self)
e811c8ce 10676
e811c8ce 10677 def SetCols(*args, **kwargs):
248ed943
RD
10678 """
10679 SetCols(self, int cols)
10680
10681 Sets the number of columns in the sizer.
10682 """
54f9ee45 10683 return _core_.GridSizer_SetCols(*args, **kwargs)
e811c8ce
RD
10684
10685 def SetRows(*args, **kwargs):
248ed943
RD
10686 """
10687 SetRows(self, int rows)
10688
10689 Sets the number of rows in the sizer.
10690 """
54f9ee45 10691 return _core_.GridSizer_SetRows(*args, **kwargs)
e811c8ce
RD
10692
10693 def SetVGap(*args, **kwargs):
248ed943
RD
10694 """
10695 SetVGap(self, int gap)
10696
10697 Sets the vertical gap (in pixels) between the cells in the sizer.
10698 """
54f9ee45 10699 return _core_.GridSizer_SetVGap(*args, **kwargs)
e811c8ce
RD
10700
10701 def SetHGap(*args, **kwargs):
248ed943
RD
10702 """
10703 SetHGap(self, int gap)
10704
10705 Sets the horizontal gap (in pixels) between cells in the sizer
10706 """
54f9ee45 10707 return _core_.GridSizer_SetHGap(*args, **kwargs)
e811c8ce
RD
10708
10709 def GetCols(*args, **kwargs):
248ed943
RD
10710 """
10711 GetCols(self) -> int
10712
10713 Returns the number of columns in the sizer.
10714 """
54f9ee45 10715 return _core_.GridSizer_GetCols(*args, **kwargs)
e811c8ce
RD
10716
10717 def GetRows(*args, **kwargs):
248ed943
RD
10718 """
10719 GetRows(self) -> int
10720
10721 Returns the number of rows in the sizer.
10722 """
54f9ee45 10723 return _core_.GridSizer_GetRows(*args, **kwargs)
e811c8ce
RD
10724
10725 def GetVGap(*args, **kwargs):
248ed943
RD
10726 """
10727 GetVGap(self) -> int
10728
10729 Returns the vertical gap (in pixels) between the cells in the sizer.
10730 """
54f9ee45 10731 return _core_.GridSizer_GetVGap(*args, **kwargs)
e811c8ce
RD
10732
10733 def GetHGap(*args, **kwargs):
248ed943
RD
10734 """
10735 GetHGap(self) -> int
10736
10737 Returns the horizontal gap (in pixels) between cells in the sizer.
10738 """
54f9ee45 10739 return _core_.GridSizer_GetHGap(*args, **kwargs)
e811c8ce 10740
d14a1e28
RD
10741
10742class GridSizerPtr(GridSizer):
10743 def __init__(self, this):
10744 self.this = this
10745 if not hasattr(self,"thisown"): self.thisown = 0
10746 self.__class__ = GridSizer
54f9ee45 10747_core_.GridSizer_swigregister(GridSizerPtr)
d14a1e28
RD
10748
10749#---------------------------------------------------------------------------
10750
54f9ee45
RD
10751FLEX_GROWMODE_NONE = _core_.FLEX_GROWMODE_NONE
10752FLEX_GROWMODE_SPECIFIED = _core_.FLEX_GROWMODE_SPECIFIED
10753FLEX_GROWMODE_ALL = _core_.FLEX_GROWMODE_ALL
d14a1e28 10754class FlexGridSizer(GridSizer):
248ed943
RD
10755 """
10756 A flex grid sizer is a sizer which lays out its children in a
10757 two-dimensional table with all table cells in one row having the same
10758 height and all cells in one column having the same width, but all
10759 rows or all columns are not necessarily the same height or width as in
10760 the `wx.GridSizer`.
10761
10762 wx.FlexGridSizer can also size items equally in one direction but
10763 unequally ("flexibly") in the other. If the sizer is only flexible
10764 in one direction (this can be changed using `SetFlexibleDirection`), it
10765 needs to be decided how the sizer should grow in the other ("non
10766 flexible") direction in order to fill the available space. The
10767 `SetNonFlexibleGrowMode` method serves this purpose.
10768
10769
10770 """
e811c8ce
RD
10771 def __repr__(self):
10772 return "<%s.%s; proxy of C++ wxFlexGridSizer instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 10773 def __init__(self, *args, **kwargs):
248ed943
RD
10774 """
10775 __init__(self, int rows=1, int cols=0, int vgap=0, int hgap=0) -> FlexGridSizer
10776
10777 Constructor for a wx.FlexGridSizer. *rows* and *cols* determine the
10778 number of columns and rows in the sizer - if either of the parameters
10779 is zero, it will be calculated to from the total number of children in
10780 the sizer, thus making the sizer grow dynamically. *vgap* and *hgap*
10781 define extra space between all children.
10782 """
54f9ee45 10783 newobj = _core_.new_FlexGridSizer(*args, **kwargs)
d14a1e28
RD
10784 self.this = newobj.this
10785 self.thisown = 1
10786 del newobj.thisown
10787 self._setOORInfo(self)
e811c8ce 10788
248ed943
RD
10789 def AddGrowableRow(*args, **kwargs):
10790 """
10791 AddGrowableRow(self, size_t idx, int proportion=0)
e811c8ce 10792
248ed943
RD
10793 Specifies that row *idx* (starting from zero) should be grown if there
10794 is extra space available to the sizer.
e811c8ce 10795
248ed943
RD
10796 The *proportion* parameter has the same meaning as the stretch factor
10797 for the box sizers except that if all proportions are 0, then all
10798 columns are resized equally (instead of not being resized at all).
10799 """
54f9ee45 10800 return _core_.FlexGridSizer_AddGrowableRow(*args, **kwargs)
e811c8ce
RD
10801
10802 def RemoveGrowableRow(*args, **kwargs):
248ed943
RD
10803 """
10804 RemoveGrowableRow(self, size_t idx)
10805
10806 Specifies that row *idx* is no longer growable.
10807 """
54f9ee45 10808 return _core_.FlexGridSizer_RemoveGrowableRow(*args, **kwargs)
e811c8ce
RD
10809
10810 def AddGrowableCol(*args, **kwargs):
248ed943
RD
10811 """
10812 AddGrowableCol(self, size_t idx, int proportion=0)
10813
10814 Specifies that column *idx* (starting from zero) should be grown if
10815 there is extra space available to the sizer.
10816
10817 The *proportion* parameter has the same meaning as the stretch factor
10818 for the box sizers except that if all proportions are 0, then all
10819 columns are resized equally (instead of not being resized at all).
10820 """
54f9ee45 10821 return _core_.FlexGridSizer_AddGrowableCol(*args, **kwargs)
e811c8ce
RD
10822
10823 def RemoveGrowableCol(*args, **kwargs):
248ed943
RD
10824 """
10825 RemoveGrowableCol(self, size_t idx)
10826
10827 Specifies that column *idx* is no longer growable.
10828 """
54f9ee45 10829 return _core_.FlexGridSizer_RemoveGrowableCol(*args, **kwargs)
e811c8ce
RD
10830
10831 def SetFlexibleDirection(*args, **kwargs):
248ed943
RD
10832 """
10833 SetFlexibleDirection(self, int direction)
10834
10835 Specifies whether the sizer should flexibly resize its columns, rows,
10836 or both. Argument *direction* can be one of the following values. Any
10837 other value is ignored.
10838
10839 ============== =======================================
10840 wx.VERTICAL Rows are flexibly sized.
10841 wx.HORIZONTAL Columns are flexibly sized.
10842 wx.BOTH Both rows and columns are flexibly sized
10843 (this is the default value).
10844 ============== =======================================
10845
10846 Note that this method does not trigger relayout.
10847
10848 """
54f9ee45 10849 return _core_.FlexGridSizer_SetFlexibleDirection(*args, **kwargs)
e811c8ce
RD
10850
10851 def GetFlexibleDirection(*args, **kwargs):
248ed943
RD
10852 """
10853 GetFlexibleDirection(self) -> int
10854
10855 Returns a value that specifies whether the sizer
10856 flexibly resizes its columns, rows, or both (default).
10857
10858 :see: `SetFlexibleDirection`
10859 """
54f9ee45 10860 return _core_.FlexGridSizer_GetFlexibleDirection(*args, **kwargs)
e811c8ce
RD
10861
10862 def SetNonFlexibleGrowMode(*args, **kwargs):
248ed943
RD
10863 """
10864 SetNonFlexibleGrowMode(self, int mode)
10865
10866 Specifies how the sizer should grow in the non-flexible direction if
10867 there is one (so `SetFlexibleDirection` must have been called
10868 previously). Argument *mode* can be one of the following values:
10869
10870 ========================== =================================================
10871 wx.FLEX_GROWMODE_NONE Sizer doesn't grow in the non flexible direction.
10872 wx.FLEX_GROWMODE_SPECIFIED Sizer honors growable columns/rows set with
10873 `AddGrowableCol` and `AddGrowableRow`. In this
10874 case equal sizing applies to minimum sizes of
10875 columns or rows (this is the default value).
10876 wx.FLEX_GROWMODE_ALL Sizer equally stretches all columns or rows in
10877 the non flexible direction, whether they are
10878 growable or not in the flexbile direction.
10879 ========================== =================================================
10880
10881 Note that this method does not trigger relayout.
10882
10883
10884 """
54f9ee45 10885 return _core_.FlexGridSizer_SetNonFlexibleGrowMode(*args, **kwargs)
e811c8ce
RD
10886
10887 def GetNonFlexibleGrowMode(*args, **kwargs):
248ed943
RD
10888 """
10889 GetNonFlexibleGrowMode(self) -> int
10890
10891 Returns the value that specifies how the sizer grows in the
10892 non-flexible direction if there is one.
10893
10894 :see: `SetNonFlexibleGrowMode`
10895 """
54f9ee45 10896 return _core_.FlexGridSizer_GetNonFlexibleGrowMode(*args, **kwargs)
e811c8ce
RD
10897
10898 def GetRowHeights(*args, **kwargs):
fd2dc343
RD
10899 """
10900 GetRowHeights(self) -> list
10901
10902 Returns a list of integers representing the heights of each of the
10903 rows in the sizer.
10904 """
54f9ee45 10905 return _core_.FlexGridSizer_GetRowHeights(*args, **kwargs)
e811c8ce
RD
10906
10907 def GetColWidths(*args, **kwargs):
fd2dc343
RD
10908 """
10909 GetColWidths(self) -> list
10910
10911 Returns a list of integers representing the widths of each of the
10912 columns in the sizer.
10913 """
54f9ee45 10914 return _core_.FlexGridSizer_GetColWidths(*args, **kwargs)
e811c8ce 10915
d14a1e28
RD
10916
10917class FlexGridSizerPtr(FlexGridSizer):
10918 def __init__(self, this):
10919 self.this = this
10920 if not hasattr(self,"thisown"): self.thisown = 0
10921 self.__class__ = FlexGridSizer
54f9ee45 10922_core_.FlexGridSizer_swigregister(FlexGridSizerPtr)
d14a1e28 10923
e505d15e
RD
10924class StdDialogButtonSizer(BoxSizer):
10925 """
10926 A special sizer that knows how to order and position standard buttons
10927 in order to conform to the current platform's standards. You simply
10928 need to add each `wx.Button` to the sizer, and be sure to create the
53aa7709 10929 buttons using the standard ID's. Then call `Realize` and the sizer
e505d15e
RD
10930 will take care of the rest.
10931
10932 """
10933 def __repr__(self):
10934 return "<%s.%s; proxy of C++ wxStdDialogButtonSizer instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
10935 def __init__(self, *args, **kwargs):
10936 """__init__(self) -> StdDialogButtonSizer"""
10937 newobj = _core_.new_StdDialogButtonSizer(*args, **kwargs)
10938 self.this = newobj.this
10939 self.thisown = 1
10940 del newobj.thisown
10941 def AddButton(*args, **kwargs):
10942 """
10943 AddButton(self, wxButton button)
10944
10945 Use this to add the buttons to this sizer. Do not use the `Add`
10946 method in the base class.
10947 """
10948 return _core_.StdDialogButtonSizer_AddButton(*args, **kwargs)
10949
53aa7709 10950 def Realize(*args, **kwargs):
e505d15e 10951 """
53aa7709 10952 Realize(self)
e505d15e
RD
10953
10954 This funciton needs to be called after all the buttons have been added
10955 to the sizer. It will reorder them and position them in a platform
10956 specifc manner.
10957 """
53aa7709 10958 return _core_.StdDialogButtonSizer_Realize(*args, **kwargs)
51b83b37
RD
10959
10960 def SetAffirmativeButton(*args, **kwargs):
10961 """SetAffirmativeButton(self, wxButton button)"""
10962 return _core_.StdDialogButtonSizer_SetAffirmativeButton(*args, **kwargs)
10963
10964 def SetNegativeButton(*args, **kwargs):
10965 """SetNegativeButton(self, wxButton button)"""
10966 return _core_.StdDialogButtonSizer_SetNegativeButton(*args, **kwargs)
10967
10968 def SetCancelButton(*args, **kwargs):
10969 """SetCancelButton(self, wxButton button)"""
10970 return _core_.StdDialogButtonSizer_SetCancelButton(*args, **kwargs)
e505d15e
RD
10971
10972 def GetAffirmativeButton(*args, **kwargs):
10973 """GetAffirmativeButton(self) -> wxButton"""
10974 return _core_.StdDialogButtonSizer_GetAffirmativeButton(*args, **kwargs)
10975
10976 def GetApplyButton(*args, **kwargs):
10977 """GetApplyButton(self) -> wxButton"""
10978 return _core_.StdDialogButtonSizer_GetApplyButton(*args, **kwargs)
10979
10980 def GetNegativeButton(*args, **kwargs):
10981 """GetNegativeButton(self) -> wxButton"""
10982 return _core_.StdDialogButtonSizer_GetNegativeButton(*args, **kwargs)
10983
10984 def GetCancelButton(*args, **kwargs):
10985 """GetCancelButton(self) -> wxButton"""
10986 return _core_.StdDialogButtonSizer_GetCancelButton(*args, **kwargs)
10987
10988 def GetHelpButton(*args, **kwargs):
10989 """GetHelpButton(self) -> wxButton"""
10990 return _core_.StdDialogButtonSizer_GetHelpButton(*args, **kwargs)
10991
10992
10993class StdDialogButtonSizerPtr(StdDialogButtonSizer):
10994 def __init__(self, this):
10995 self.this = this
10996 if not hasattr(self,"thisown"): self.thisown = 0
10997 self.__class__ = StdDialogButtonSizer
10998_core_.StdDialogButtonSizer_swigregister(StdDialogButtonSizerPtr)
10999
d14a1e28
RD
11000#---------------------------------------------------------------------------
11001
11002class GBPosition(object):
248ed943
RD
11003 """
11004 This class represents the position of an item in a virtual grid of
11005 rows and columns managed by a `wx.GridBagSizer`. wxPython has
11006 typemaps that will automatically convert from a 2-element sequence of
11007 integers to a wx.GBPosition, so you can use the more pythonic
11008 representation of the position nearly transparently in Python code.
11009 """
e811c8ce
RD
11010 def __repr__(self):
11011 return "<%s.%s; proxy of C++ wxGBPosition instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 11012 def __init__(self, *args, **kwargs):
248ed943
RD
11013 """
11014 __init__(self, int row=0, int col=0) -> GBPosition
11015
11016 This class represents the position of an item in a virtual grid of
11017 rows and columns managed by a `wx.GridBagSizer`. wxPython has
11018 typemaps that will automatically convert from a 2-element sequence of
11019 integers to a wx.GBPosition, so you can use the more pythonic
11020 representation of the position nearly transparently in Python code.
11021 """
54f9ee45 11022 newobj = _core_.new_GBPosition(*args, **kwargs)
d14a1e28
RD
11023 self.this = newobj.this
11024 self.thisown = 1
11025 del newobj.thisown
e811c8ce 11026 def GetRow(*args, **kwargs):
a95a7133 11027 """GetRow(self) -> int"""
54f9ee45 11028 return _core_.GBPosition_GetRow(*args, **kwargs)
e811c8ce
RD
11029
11030 def GetCol(*args, **kwargs):
a95a7133 11031 """GetCol(self) -> int"""
54f9ee45 11032 return _core_.GBPosition_GetCol(*args, **kwargs)
e811c8ce
RD
11033
11034 def SetRow(*args, **kwargs):
a95a7133 11035 """SetRow(self, int row)"""
54f9ee45 11036 return _core_.GBPosition_SetRow(*args, **kwargs)
e811c8ce
RD
11037
11038 def SetCol(*args, **kwargs):
a95a7133 11039 """SetCol(self, int col)"""
54f9ee45 11040 return _core_.GBPosition_SetCol(*args, **kwargs)
e811c8ce
RD
11041
11042 def __eq__(*args, **kwargs):
a95a7133 11043 """__eq__(self, GBPosition other) -> bool"""
54f9ee45 11044 return _core_.GBPosition___eq__(*args, **kwargs)
e811c8ce
RD
11045
11046 def __ne__(*args, **kwargs):
a95a7133 11047 """__ne__(self, GBPosition other) -> bool"""
54f9ee45 11048 return _core_.GBPosition___ne__(*args, **kwargs)
e811c8ce
RD
11049
11050 def Set(*args, **kwargs):
a95a7133 11051 """Set(self, int row=0, int col=0)"""
54f9ee45 11052 return _core_.GBPosition_Set(*args, **kwargs)
e811c8ce
RD
11053
11054 def Get(*args, **kwargs):
a95a7133 11055 """Get(self) -> PyObject"""
54f9ee45 11056 return _core_.GBPosition_Get(*args, **kwargs)
e811c8ce 11057
41e2b43e 11058 asTuple = wx._deprecated(Get, "asTuple is deprecated, use `Get` instead")
e811c8ce
RD
11059 def __str__(self): return str(self.Get())
11060 def __repr__(self): return 'wx.GBPosition'+str(self.Get())
11061 def __len__(self): return len(self.Get())
11062 def __getitem__(self, index): return self.Get()[index]
d14a1e28
RD
11063 def __setitem__(self, index, val):
11064 if index == 0: self.SetRow(val)
11065 elif index == 1: self.SetCol(val)
11066 else: raise IndexError
e811c8ce 11067 def __nonzero__(self): return self.Get() != (0,0)
74e96f3d
RD
11068 __safe_for_unpickling__ = True
11069 def __reduce__(self): return (wx.GBPosition, self.Get())
d14a1e28
RD
11070
11071 row = property(GetRow, SetRow)
11072 col = property(GetCol, SetCol)
11073
11074
11075class GBPositionPtr(GBPosition):
11076 def __init__(self, this):
11077 self.this = this
11078 if not hasattr(self,"thisown"): self.thisown = 0
11079 self.__class__ = GBPosition
54f9ee45 11080_core_.GBPosition_swigregister(GBPositionPtr)
d14a1e28
RD
11081
11082class GBSpan(object):
248ed943
RD
11083 """
11084 This class is used to hold the row and column spanning attributes of
11085 items in a `wx.GridBagSizer`. wxPython has typemaps that will
11086 automatically convert from a 2-element sequence of integers to a
11087 wx.GBSpan, so you can use the more pythonic representation of the span
11088 nearly transparently in Python code.
11089
11090 """
e811c8ce
RD
11091 def __repr__(self):
11092 return "<%s.%s; proxy of C++ wxGBSpan instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 11093 def __init__(self, *args, **kwargs):
248ed943
RD
11094 """
11095 __init__(self, int rowspan=1, int colspan=1) -> GBSpan
11096
11097 Construct a new wxGBSpan, optionally setting the rowspan and
11098 colspan. The default is (1,1). (Meaning that the item occupies one
11099 cell in each direction.
11100 """
54f9ee45 11101 newobj = _core_.new_GBSpan(*args, **kwargs)
d14a1e28
RD
11102 self.this = newobj.this
11103 self.thisown = 1
11104 del newobj.thisown
e811c8ce 11105 def GetRowspan(*args, **kwargs):
a95a7133 11106 """GetRowspan(self) -> int"""
54f9ee45 11107 return _core_.GBSpan_GetRowspan(*args, **kwargs)
e811c8ce
RD
11108
11109 def GetColspan(*args, **kwargs):
a95a7133 11110 """GetColspan(self) -> int"""
54f9ee45 11111 return _core_.GBSpan_GetColspan(*args, **kwargs)
e811c8ce
RD
11112
11113 def SetRowspan(*args, **kwargs):
a95a7133 11114 """SetRowspan(self, int rowspan)"""
54f9ee45 11115 return _core_.GBSpan_SetRowspan(*args, **kwargs)
e811c8ce
RD
11116
11117 def SetColspan(*args, **kwargs):
a95a7133 11118 """SetColspan(self, int colspan)"""
54f9ee45 11119 return _core_.GBSpan_SetColspan(*args, **kwargs)
e811c8ce
RD
11120
11121 def __eq__(*args, **kwargs):
a95a7133 11122 """__eq__(self, GBSpan other) -> bool"""
54f9ee45 11123 return _core_.GBSpan___eq__(*args, **kwargs)
e811c8ce
RD
11124
11125 def __ne__(*args, **kwargs):
a95a7133 11126 """__ne__(self, GBSpan other) -> bool"""
54f9ee45 11127 return _core_.GBSpan___ne__(*args, **kwargs)
e811c8ce
RD
11128
11129 def Set(*args, **kwargs):
a95a7133 11130 """Set(self, int rowspan=1, int colspan=1)"""
54f9ee45 11131 return _core_.GBSpan_Set(*args, **kwargs)
e811c8ce
RD
11132
11133 def Get(*args, **kwargs):
a95a7133 11134 """Get(self) -> PyObject"""
54f9ee45 11135 return _core_.GBSpan_Get(*args, **kwargs)
e811c8ce 11136
41e2b43e 11137 asTuple = wx._deprecated(Get, "asTuple is deprecated, use `Get` instead")
e811c8ce
RD
11138 def __str__(self): return str(self.Get())
11139 def __repr__(self): return 'wx.GBSpan'+str(self.Get())
11140 def __len__(self): return len(self.Get())
11141 def __getitem__(self, index): return self.Get()[index]
d14a1e28
RD
11142 def __setitem__(self, index, val):
11143 if index == 0: self.SetRowspan(val)
11144 elif index == 1: self.SetColspan(val)
11145 else: raise IndexError
e811c8ce 11146 def __nonzero__(self): return self.Get() != (0,0)
74e96f3d
RD
11147 __safe_for_unpickling__ = True
11148 def __reduce__(self): return (wx.GBSpan, self.Get())
d14a1e28
RD
11149
11150 rowspan = property(GetRowspan, SetRowspan)
11151 colspan = property(GetColspan, SetColspan)
11152
11153
11154class GBSpanPtr(GBSpan):
11155 def __init__(self, this):
11156 self.this = this
11157 if not hasattr(self,"thisown"): self.thisown = 0
11158 self.__class__ = GBSpan
54f9ee45 11159_core_.GBSpan_swigregister(GBSpanPtr)
d14a1e28
RD
11160
11161class GBSizerItem(SizerItem):
248ed943
RD
11162 """
11163 The wx.GBSizerItem class is used to track the additional data about
11164 items in a `wx.GridBagSizer` such as the item's position in the grid
11165 and how many rows or columns it spans.
11166
11167 """
e811c8ce
RD
11168 def __repr__(self):
11169 return "<%s.%s; proxy of C++ wxGBSizerItem instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 11170 def __init__(self, *args, **kwargs):
248ed943
RD
11171 """
11172 __init__(self) -> GBSizerItem
11173
11174 Constructs an empty wx.GBSizerItem. Either a window, sizer or spacer
11175 size will need to be set, as well as a position and span before this
11176 item can be used in a Sizer.
11177
11178 You will probably never need to create a wx.GBSizerItem directly as they
11179 are created automatically when the sizer's Add method is called.
11180 """
54f9ee45 11181 newobj = _core_.new_GBSizerItem(*args, **kwargs)
d14a1e28
RD
11182 self.this = newobj.this
11183 self.thisown = 1
11184 del newobj.thisown
e811c8ce 11185 def GetPos(*args, **kwargs):
248ed943
RD
11186 """
11187 GetPos(self) -> GBPosition
11188
11189 Get the grid position of the item
11190 """
54f9ee45 11191 return _core_.GBSizerItem_GetPos(*args, **kwargs)
e811c8ce
RD
11192
11193 def GetPosTuple(self): return self.GetPos().Get()
11194 def GetSpan(*args, **kwargs):
248ed943
RD
11195 """
11196 GetSpan(self) -> GBSpan
11197
11198 Get the row and column spanning of the item
11199 """
54f9ee45 11200 return _core_.GBSizerItem_GetSpan(*args, **kwargs)
e811c8ce
RD
11201
11202 def GetSpanTuple(self): return self.GetSpan().Get()
11203 def SetPos(*args, **kwargs):
248ed943
RD
11204 """
11205 SetPos(self, GBPosition pos) -> bool
11206
11207 If the item is already a member of a sizer then first ensure that
11208 there is no other item that would intersect with this one at the new
11209 position, then set the new position. Returns True if the change is
11210 successful and after the next Layout() the item will be moved.
11211 """
54f9ee45 11212 return _core_.GBSizerItem_SetPos(*args, **kwargs)
e811c8ce
RD
11213
11214 def SetSpan(*args, **kwargs):
248ed943
RD
11215 """
11216 SetSpan(self, GBSpan span) -> bool
11217
11218 If the item is already a member of a sizer then first ensure that
11219 there is no other item that would intersect with this one with its new
11220 spanning size, then set the new spanning. Returns True if the change
11221 is successful and after the next Layout() the item will be resized.
11222
11223 """
54f9ee45 11224 return _core_.GBSizerItem_SetSpan(*args, **kwargs)
e811c8ce 11225
248ed943 11226 def Intersects(*args, **kwargs):
0df68c9f 11227 """
a95a7133 11228 Intersects(self, GBSizerItem other) -> bool
248ed943
RD
11229
11230 Returns True if this item and the other item instersect.
0df68c9f 11231 """
248ed943
RD
11232 return _core_.GBSizerItem_Intersects(*args, **kwargs)
11233
11234 def IntersectsPos(*args, **kwargs):
11235 """
11236 IntersectsPos(self, GBPosition pos, GBSpan span) -> bool
11237
11238 Returns True if the given pos/span would intersect with this item.
11239 """
11240 return _core_.GBSizerItem_IntersectsPos(*args, **kwargs)
e811c8ce
RD
11241
11242 def GetEndPos(*args, **kwargs):
248ed943
RD
11243 """
11244 GetEndPos(self) -> GBPosition
11245
11246 Get the row and column of the endpoint of this item.
11247 """
54f9ee45 11248 return _core_.GBSizerItem_GetEndPos(*args, **kwargs)
e811c8ce
RD
11249
11250 def GetGBSizer(*args, **kwargs):
248ed943
RD
11251 """
11252 GetGBSizer(self) -> GridBagSizer
11253
11254 Get the sizer this item is a member of.
11255 """
54f9ee45 11256 return _core_.GBSizerItem_GetGBSizer(*args, **kwargs)
e811c8ce
RD
11257
11258 def SetGBSizer(*args, **kwargs):
248ed943
RD
11259 """
11260 SetGBSizer(self, GridBagSizer sizer)
11261
11262 Set the sizer this item is a member of.
11263 """
54f9ee45 11264 return _core_.GBSizerItem_SetGBSizer(*args, **kwargs)
e811c8ce 11265
d14a1e28
RD
11266
11267class GBSizerItemPtr(GBSizerItem):
11268 def __init__(self, this):
11269 self.this = this
11270 if not hasattr(self,"thisown"): self.thisown = 0
11271 self.__class__ = GBSizerItem
54f9ee45 11272_core_.GBSizerItem_swigregister(GBSizerItemPtr)
d14a1e28
RD
11273DefaultSpan = cvar.DefaultSpan
11274
11275def GBSizerItemWindow(*args, **kwargs):
0df68c9f
RD
11276 """
11277 GBSizerItemWindow(Window window, GBPosition pos, GBSpan span, int flag,
248ed943
RD
11278 int border, PyObject userData=None) -> GBSizerItem
11279
11280 Construct a `wx.GBSizerItem` for a window.
0df68c9f 11281 """
54f9ee45 11282 val = _core_.new_GBSizerItemWindow(*args, **kwargs)
d14a1e28
RD
11283 val.thisown = 1
11284 return val
11285
11286def GBSizerItemSizer(*args, **kwargs):
0df68c9f
RD
11287 """
11288 GBSizerItemSizer(Sizer sizer, GBPosition pos, GBSpan span, int flag,
248ed943
RD
11289 int border, PyObject userData=None) -> GBSizerItem
11290
11291 Construct a `wx.GBSizerItem` for a sizer
0df68c9f 11292 """
54f9ee45 11293 val = _core_.new_GBSizerItemSizer(*args, **kwargs)
d14a1e28
RD
11294 val.thisown = 1
11295 return val
11296
11297def GBSizerItemSpacer(*args, **kwargs):
0df68c9f
RD
11298 """
11299 GBSizerItemSpacer(int width, int height, GBPosition pos, GBSpan span,
248ed943
RD
11300 int flag, int border, PyObject userData=None) -> GBSizerItem
11301
11302 Construct a `wx.GBSizerItem` for a spacer.
0df68c9f 11303 """
54f9ee45 11304 val = _core_.new_GBSizerItemSpacer(*args, **kwargs)
d14a1e28
RD
11305 val.thisown = 1
11306 return val
11307
11308class GridBagSizer(FlexGridSizer):
248ed943
RD
11309 """
11310 A `wx.Sizer` that can lay out items in a virtual grid like a
11311 `wx.FlexGridSizer` but in this case explicit positioning of the items
11312 is allowed using `wx.GBPosition`, and items can optionally span more
11313 than one row and/or column using `wx.GBSpan`. The total size of the
11314 virtual grid is determined by the largest row and column that items are
11315 positioned at, adjusted for spanning.
11316
11317 """
e811c8ce
RD
11318 def __repr__(self):
11319 return "<%s.%s; proxy of C++ wxGridBagSizer instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 11320 def __init__(self, *args, **kwargs):
248ed943
RD
11321 """
11322 __init__(self, int vgap=0, int hgap=0) -> GridBagSizer
11323
11324 Constructor, with optional parameters to specify the gap between the
11325 rows and columns.
11326 """
54f9ee45 11327 newobj = _core_.new_GridBagSizer(*args, **kwargs)
d14a1e28
RD
11328 self.this = newobj.this
11329 self.thisown = 1
11330 del newobj.thisown
1823fbb4
RD
11331 self._setOORInfo(self)
11332
e811c8ce 11333 def Add(*args, **kwargs):
0df68c9f 11334 """
248ed943 11335 Add(self, item, GBPosition pos, GBSpan span=DefaultSpan, int flag=0,
d3b6e4ff 11336 int border=0, userData=None) -> wx.GBSizerItem
248ed943
RD
11337
11338 Adds an item to the sizer at the grid cell *pos*, optionally spanning
11339 more than one row or column as specified with *span*. The remaining
11340 args behave similarly to `wx.Sizer.Add`.
11341
11342 Returns True if the item was successfully placed at the given cell
11343 position, False if something was already there.
11344
0df68c9f 11345 """
54f9ee45 11346 return _core_.GridBagSizer_Add(*args, **kwargs)
e811c8ce
RD
11347
11348 def AddItem(*args, **kwargs):
248ed943 11349 """
d3b6e4ff 11350 Add(self, GBSizerItem item) -> wx.GBSizerItem
248ed943
RD
11351
11352 Add an item to the sizer using a `wx.GBSizerItem`. Returns True if
11353 the item was successfully placed at its given cell position, False if
11354 something was already there.
11355 """
54f9ee45 11356 return _core_.GridBagSizer_AddItem(*args, **kwargs)
e811c8ce 11357
84f85550
RD
11358 def GetCellSize(*args, **kwargs):
11359 """
11360 GetCellSize(self, int row, int col) -> Size
11361
11362 Get the size of the specified cell, including hgap and
11363 vgap. Only valid after a Layout.
11364 """
11365 return _core_.GridBagSizer_GetCellSize(*args, **kwargs)
11366
e811c8ce 11367 def GetEmptyCellSize(*args, **kwargs):
248ed943
RD
11368 """
11369 GetEmptyCellSize(self) -> Size
11370
11371 Get the size used for cells in the grid with no item.
11372 """
54f9ee45 11373 return _core_.GridBagSizer_GetEmptyCellSize(*args, **kwargs)
e811c8ce
RD
11374
11375 def SetEmptyCellSize(*args, **kwargs):
248ed943
RD
11376 """
11377 SetEmptyCellSize(self, Size sz)
11378
11379 Set the size used for cells in the grid with no item.
11380 """
54f9ee45 11381 return _core_.GridBagSizer_SetEmptyCellSize(*args, **kwargs)
e811c8ce
RD
11382
11383 def GetItemPosition(*args):
0df68c9f 11384 """
248ed943
RD
11385 GetItemPosition(self, item) -> GBPosition
11386
11387 Get the grid position of the specified *item* where *item* is either a
11388 window or subsizer that is a member of this sizer, or a zero-based
11389 index of an item.
0df68c9f 11390 """
54f9ee45 11391 return _core_.GridBagSizer_GetItemPosition(*args)
e811c8ce
RD
11392
11393 def SetItemPosition(*args):
0df68c9f 11394 """
248ed943
RD
11395 SetItemPosition(self, item, GBPosition pos) -> bool
11396
11397 Set the grid position of the specified *item* where *item* is either a
11398 window or subsizer that is a member of this sizer, or a zero-based
11399 index of an item. Returns True on success. If the move is not
11400 allowed (because an item is already there) then False is returned.
11401
0df68c9f 11402 """
54f9ee45 11403 return _core_.GridBagSizer_SetItemPosition(*args)
e811c8ce
RD
11404
11405 def GetItemSpan(*args):
0df68c9f 11406 """
248ed943
RD
11407 GetItemSpan(self, item) -> GBSpan
11408
11409 Get the row/col spanning of the specified *item* where *item* is
11410 either a window or subsizer that is a member of this sizer, or a
11411 zero-based index of an item.
0df68c9f 11412 """
54f9ee45 11413 return _core_.GridBagSizer_GetItemSpan(*args)
e811c8ce
RD
11414
11415 def SetItemSpan(*args):
0df68c9f 11416 """
248ed943
RD
11417 SetItemSpan(self, item, GBSpan span) -> bool
11418
11419 Set the row/col spanning of the specified *item* where *item* is
11420 either a window or subsizer that is a member of this sizer, or a
11421 zero-based index of an item. Returns True on success. If the move is
11422 not allowed (because an item is already there) then False is returned.
0df68c9f 11423 """
54f9ee45 11424 return _core_.GridBagSizer_SetItemSpan(*args)
e811c8ce
RD
11425
11426 def FindItem(*args):
0df68c9f 11427 """
248ed943
RD
11428 FindItem(self, item) -> GBSizerItem
11429
11430 Find the sizer item for the given window or subsizer, returns None if
11431 not found. (non-recursive)
0df68c9f 11432 """
54f9ee45 11433 return _core_.GridBagSizer_FindItem(*args)
e811c8ce
RD
11434
11435 def FindItemAtPosition(*args, **kwargs):
248ed943
RD
11436 """
11437 FindItemAtPosition(self, GBPosition pos) -> GBSizerItem
11438
11439 Return the sizer item for the given grid cell, or None if there is no
11440 item at that position. (non-recursive)
11441 """
54f9ee45 11442 return _core_.GridBagSizer_FindItemAtPosition(*args, **kwargs)
e811c8ce
RD
11443
11444 def FindItemAtPoint(*args, **kwargs):
248ed943
RD
11445 """
11446 FindItemAtPoint(self, Point pt) -> GBSizerItem
11447
11448 Return the sizer item located at the point given in *pt*, or None if
11449 there is no item at that point. The (x,y) coordinates in pt correspond
11450 to the client coordinates of the window using the sizer for
11451 layout. (non-recursive)
11452 """
54f9ee45 11453 return _core_.GridBagSizer_FindItemAtPoint(*args, **kwargs)
e811c8ce 11454
248ed943
RD
11455 def CheckForIntersection(*args, **kwargs):
11456 """
11457 CheckForIntersection(self, GBSizerItem item, GBSizerItem excludeItem=None) -> bool
e811c8ce 11458
248ed943
RD
11459 Look at all items and see if any intersect (or would overlap) the
11460 given *item*. Returns True if so, False if there would be no overlap.
11461 If an *excludeItem* is given then it will not be checked for
11462 intersection, for example it may be the item we are checking the
11463 position of.
e811c8ce 11464
248ed943
RD
11465 """
11466 return _core_.GridBagSizer_CheckForIntersection(*args, **kwargs)
e811c8ce 11467
248ed943 11468 def CheckForIntersectionPos(*args, **kwargs):
0df68c9f 11469 """
248ed943
RD
11470 CheckForIntersectionPos(self, GBPosition pos, GBSpan span, GBSizerItem excludeItem=None) -> bool
11471
11472 Look at all items and see if any intersect (or would overlap) the
11473 given position and span. Returns True if so, False if there would be
11474 no overlap. If an *excludeItem* is given then it will not be checked
11475 for intersection, for example it may be the item we are checking the
11476 position of.
0df68c9f 11477 """
248ed943 11478 return _core_.GridBagSizer_CheckForIntersectionPos(*args, **kwargs)
e811c8ce 11479
d14a1e28
RD
11480
11481class GridBagSizerPtr(GridBagSizer):
11482 def __init__(self, this):
11483 self.this = this
11484 if not hasattr(self,"thisown"): self.thisown = 0
11485 self.__class__ = GridBagSizer
54f9ee45 11486_core_.GridBagSizer_swigregister(GridBagSizerPtr)
d14a1e28
RD
11487
11488#---------------------------------------------------------------------------
11489
54f9ee45
RD
11490Left = _core_.Left
11491Top = _core_.Top
11492Right = _core_.Right
11493Bottom = _core_.Bottom
11494Width = _core_.Width
11495Height = _core_.Height
11496Centre = _core_.Centre
11497Center = _core_.Center
11498CentreX = _core_.CentreX
11499CentreY = _core_.CentreY
11500Unconstrained = _core_.Unconstrained
11501AsIs = _core_.AsIs
11502PercentOf = _core_.PercentOf
11503Above = _core_.Above
11504Below = _core_.Below
11505LeftOf = _core_.LeftOf
11506RightOf = _core_.RightOf
11507SameAs = _core_.SameAs
11508Absolute = _core_.Absolute
d14a1e28 11509class IndividualLayoutConstraint(Object):
15afbcd0 11510 """
41e2b43e
RD
11511 Objects of this class are stored in the `wx.LayoutConstraints` class as
11512 one of eight possible constraints that a window can be involved in.
11513 You will never need to create an instance of
11514 wx.IndividualLayoutConstraint, rather you should create a
11515 `wx.LayoutConstraints` instance and use the individual contstraints
15afbcd0 11516 that it contains.
15afbcd0 11517 """
d14a1e28
RD
11518 def __init__(self): raise RuntimeError, "No constructor defined"
11519 def __repr__(self):
11520 return "<%s.%s; proxy of C++ wxIndividualLayoutConstraint instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
e811c8ce 11521 def Set(*args, **kwargs):
41e2b43e
RD
11522 """
11523 Set(self, int rel, Window otherW, int otherE, int val=0, int marg=wxLAYOUT_DEFAULT_MARGIN)
11524
11525 Sets the properties of the constraint. Normally called by one of the
11526 convenience functions such as Above, RightOf, SameAs.
11527 """
54f9ee45 11528 return _core_.IndividualLayoutConstraint_Set(*args, **kwargs)
e811c8ce
RD
11529
11530 def LeftOf(*args, **kwargs):
15afbcd0 11531 """
a95a7133 11532 LeftOf(self, Window sibling, int marg=0)
15afbcd0 11533
41e2b43e
RD
11534 Constrains this edge to be to the left of the given window, with an
11535 optional margin. Implicitly, this is relative to the left edge of the
11536 other window.
15afbcd0 11537 """
54f9ee45 11538 return _core_.IndividualLayoutConstraint_LeftOf(*args, **kwargs)
e811c8ce
RD
11539
11540 def RightOf(*args, **kwargs):
15afbcd0 11541 """
a95a7133 11542 RightOf(self, Window sibling, int marg=0)
15afbcd0 11543
41e2b43e
RD
11544 Constrains this edge to be to the right of the given window, with an
11545 optional margin. Implicitly, this is relative to the right edge of the
11546 other window.
15afbcd0 11547 """
54f9ee45 11548 return _core_.IndividualLayoutConstraint_RightOf(*args, **kwargs)
e811c8ce
RD
11549
11550 def Above(*args, **kwargs):
15afbcd0 11551 """
a95a7133 11552 Above(self, Window sibling, int marg=0)
15afbcd0 11553
41e2b43e
RD
11554 Constrains this edge to be above the given window, with an optional
11555 margin. Implicitly, this is relative to the top edge of the other
11556 window.
15afbcd0 11557 """
54f9ee45 11558 return _core_.IndividualLayoutConstraint_Above(*args, **kwargs)
e811c8ce
RD
11559
11560 def Below(*args, **kwargs):
15afbcd0 11561 """
a95a7133 11562 Below(self, Window sibling, int marg=0)
15afbcd0 11563
41e2b43e
RD
11564 Constrains this edge to be below the given window, with an optional
11565 margin. Implicitly, this is relative to the bottom edge of the other
11566 window.
15afbcd0 11567 """
54f9ee45 11568 return _core_.IndividualLayoutConstraint_Below(*args, **kwargs)
e811c8ce
RD
11569
11570 def SameAs(*args, **kwargs):
15afbcd0 11571 """
a95a7133 11572 SameAs(self, Window otherW, int edge, int marg=0)
15afbcd0 11573
41e2b43e
RD
11574 Constrains this edge or dimension to be to the same as the edge of the
11575 given window, with an optional margin.
15afbcd0 11576 """
54f9ee45 11577 return _core_.IndividualLayoutConstraint_SameAs(*args, **kwargs)
e811c8ce
RD
11578
11579 def PercentOf(*args, **kwargs):
15afbcd0 11580 """
a95a7133 11581 PercentOf(self, Window otherW, int wh, int per)
15afbcd0 11582
41e2b43e
RD
11583 Constrains this edge or dimension to be to a percentage of the given
11584 window, with an optional margin.
15afbcd0 11585 """
54f9ee45 11586 return _core_.IndividualLayoutConstraint_PercentOf(*args, **kwargs)
e811c8ce
RD
11587
11588 def Absolute(*args, **kwargs):
15afbcd0 11589 """
a95a7133 11590 Absolute(self, int val)
15afbcd0 11591
41e2b43e 11592 Constrains this edge or dimension to be the given absolute value.
15afbcd0 11593 """
54f9ee45 11594 return _core_.IndividualLayoutConstraint_Absolute(*args, **kwargs)
e811c8ce
RD
11595
11596 def Unconstrained(*args, **kwargs):
15afbcd0 11597 """
a95a7133 11598 Unconstrained(self)
15afbcd0 11599
41e2b43e
RD
11600 Sets this edge or dimension to be unconstrained, that is, dependent on
11601 other edges and dimensions from which this value can be deduced.
15afbcd0 11602 """
54f9ee45 11603 return _core_.IndividualLayoutConstraint_Unconstrained(*args, **kwargs)
e811c8ce
RD
11604
11605 def AsIs(*args, **kwargs):
15afbcd0 11606 """
a95a7133 11607 AsIs(self)
15afbcd0 11608
41e2b43e
RD
11609 Sets this edge or constraint to be whatever the window's value is at
11610 the moment. If either of the width and height constraints are *as is*,
11611 the window will not be resized, but moved instead. This is important
11612 when considering panel items which are intended to have a default
11613 size, such as a button, which may take its size from the size of the
11614 button label.
15afbcd0 11615 """
54f9ee45 11616 return _core_.IndividualLayoutConstraint_AsIs(*args, **kwargs)
e811c8ce
RD
11617
11618 def GetOtherWindow(*args, **kwargs):
a95a7133 11619 """GetOtherWindow(self) -> Window"""
54f9ee45 11620 return _core_.IndividualLayoutConstraint_GetOtherWindow(*args, **kwargs)
e811c8ce
RD
11621
11622 def GetMyEdge(*args, **kwargs):
a95a7133 11623 """GetMyEdge(self) -> int"""
54f9ee45 11624 return _core_.IndividualLayoutConstraint_GetMyEdge(*args, **kwargs)
e811c8ce
RD
11625
11626 def SetEdge(*args, **kwargs):
a95a7133 11627 """SetEdge(self, int which)"""
54f9ee45 11628 return _core_.IndividualLayoutConstraint_SetEdge(*args, **kwargs)
e811c8ce
RD
11629
11630 def SetValue(*args, **kwargs):
a95a7133 11631 """SetValue(self, int v)"""
54f9ee45 11632 return _core_.IndividualLayoutConstraint_SetValue(*args, **kwargs)
e811c8ce
RD
11633
11634 def GetMargin(*args, **kwargs):
a95a7133 11635 """GetMargin(self) -> int"""
54f9ee45 11636 return _core_.IndividualLayoutConstraint_GetMargin(*args, **kwargs)
e811c8ce
RD
11637
11638 def SetMargin(*args, **kwargs):
a95a7133 11639 """SetMargin(self, int m)"""
54f9ee45 11640 return _core_.IndividualLayoutConstraint_SetMargin(*args, **kwargs)
e811c8ce
RD
11641
11642 def GetValue(*args, **kwargs):
a95a7133 11643 """GetValue(self) -> int"""
54f9ee45 11644 return _core_.IndividualLayoutConstraint_GetValue(*args, **kwargs)
e811c8ce
RD
11645
11646 def GetPercent(*args, **kwargs):
a95a7133 11647 """GetPercent(self) -> int"""
54f9ee45 11648 return _core_.IndividualLayoutConstraint_GetPercent(*args, **kwargs)
e811c8ce
RD
11649
11650 def GetOtherEdge(*args, **kwargs):
a95a7133 11651 """GetOtherEdge(self) -> int"""
54f9ee45 11652 return _core_.IndividualLayoutConstraint_GetOtherEdge(*args, **kwargs)
e811c8ce
RD
11653
11654 def GetDone(*args, **kwargs):
a95a7133 11655 """GetDone(self) -> bool"""
54f9ee45 11656 return _core_.IndividualLayoutConstraint_GetDone(*args, **kwargs)
e811c8ce
RD
11657
11658 def SetDone(*args, **kwargs):
a95a7133 11659 """SetDone(self, bool d)"""
54f9ee45 11660 return _core_.IndividualLayoutConstraint_SetDone(*args, **kwargs)
e811c8ce
RD
11661
11662 def GetRelationship(*args, **kwargs):
a95a7133 11663 """GetRelationship(self) -> int"""
54f9ee45 11664 return _core_.IndividualLayoutConstraint_GetRelationship(*args, **kwargs)
e811c8ce
RD
11665
11666 def SetRelationship(*args, **kwargs):
a95a7133 11667 """SetRelationship(self, int r)"""
54f9ee45 11668 return _core_.IndividualLayoutConstraint_SetRelationship(*args, **kwargs)
e811c8ce
RD
11669
11670 def ResetIfWin(*args, **kwargs):
15afbcd0 11671 """
a95a7133 11672 ResetIfWin(self, Window otherW) -> bool
15afbcd0
RD
11673
11674 Reset constraint if it mentions otherWin
11675 """
54f9ee45 11676 return _core_.IndividualLayoutConstraint_ResetIfWin(*args, **kwargs)
e811c8ce
RD
11677
11678 def SatisfyConstraint(*args, **kwargs):
15afbcd0 11679 """
a95a7133 11680 SatisfyConstraint(self, LayoutConstraints constraints, Window win) -> bool
15afbcd0
RD
11681
11682 Try to satisfy constraint
11683 """
54f9ee45 11684 return _core_.IndividualLayoutConstraint_SatisfyConstraint(*args, **kwargs)
e811c8ce
RD
11685
11686 def GetEdge(*args, **kwargs):
15afbcd0 11687 """
a95a7133 11688 GetEdge(self, int which, Window thisWin, Window other) -> int
15afbcd0
RD
11689
11690 Get the value of this edge or dimension, or if this
11691 is not determinable, -1.
11692 """
54f9ee45 11693 return _core_.IndividualLayoutConstraint_GetEdge(*args, **kwargs)
e811c8ce 11694
d14a1e28
RD
11695
11696class IndividualLayoutConstraintPtr(IndividualLayoutConstraint):
11697 def __init__(self, this):
11698 self.this = this
11699 if not hasattr(self,"thisown"): self.thisown = 0
11700 self.__class__ = IndividualLayoutConstraint
54f9ee45 11701_core_.IndividualLayoutConstraint_swigregister(IndividualLayoutConstraintPtr)
d14a1e28
RD
11702
11703class LayoutConstraints(Object):
15afbcd0 11704 """
41e2b43e
RD
11705 **Note:** constraints are now deprecated and you should use sizers
11706 instead.
15afbcd0 11707
41e2b43e
RD
11708 Objects of this class can be associated with a window to define its
11709 layout constraints, with respect to siblings or its parent.
15afbcd0
RD
11710
11711 The class consists of the following eight constraints of class
11712 wx.IndividualLayoutConstraint, some or all of which should be accessed
11713 directly to set the appropriate constraints.
11714
11715 * left: represents the left hand edge of the window
11716 * right: represents the right hand edge of the window
11717 * top: represents the top edge of the window
11718 * bottom: represents the bottom edge of the window
11719 * width: represents the width of the window
11720 * height: represents the height of the window
11721 * centreX: represents the horizontal centre point of the window
11722 * centreY: represents the vertical centre point of the window
11723
41e2b43e
RD
11724 Most constraints are initially set to have the relationship
11725 wxUnconstrained, which means that their values should be calculated by
11726 looking at known constraints. The exceptions are width and height,
11727 which are set to wxAsIs to ensure that if the user does not specify a
11728 constraint, the existing width and height will be used, to be
11729 compatible with panel items which often have take a default size. If
11730 the constraint is ``wx.AsIs``, the dimension will not be changed.
11731
11732 :see: `wx.IndividualLayoutConstraint`, `wx.Window.SetConstraints`
15afbcd0
RD
11733
11734 """
e811c8ce
RD
11735 def __repr__(self):
11736 return "<%s.%s; proxy of C++ wxLayoutConstraints instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
54f9ee45
RD
11737 left = property(_core_.LayoutConstraints_left_get)
11738 top = property(_core_.LayoutConstraints_top_get)
11739 right = property(_core_.LayoutConstraints_right_get)
11740 bottom = property(_core_.LayoutConstraints_bottom_get)
11741 width = property(_core_.LayoutConstraints_width_get)
11742 height = property(_core_.LayoutConstraints_height_get)
11743 centreX = property(_core_.LayoutConstraints_centreX_get)
11744 centreY = property(_core_.LayoutConstraints_centreY_get)
d14a1e28 11745 def __init__(self, *args, **kwargs):
a95a7133 11746 """__init__(self) -> LayoutConstraints"""
54f9ee45 11747 newobj = _core_.new_LayoutConstraints(*args, **kwargs)
d14a1e28
RD
11748 self.this = newobj.this
11749 self.thisown = 1
11750 del newobj.thisown
e811c8ce 11751 def SatisfyConstraints(*args, **kwargs):
6c3b4aae 11752 """SatisfyConstraints(Window win) -> (areSatisfied, noChanges)"""
54f9ee45 11753 return _core_.LayoutConstraints_SatisfyConstraints(*args, **kwargs)
e811c8ce
RD
11754
11755 def AreSatisfied(*args, **kwargs):
a95a7133 11756 """AreSatisfied(self) -> bool"""
54f9ee45 11757 return _core_.LayoutConstraints_AreSatisfied(*args, **kwargs)
e811c8ce 11758
d14a1e28
RD
11759
11760class LayoutConstraintsPtr(LayoutConstraints):
11761 def __init__(self, this):
11762 self.this = this
11763 if not hasattr(self,"thisown"): self.thisown = 0
11764 self.__class__ = LayoutConstraints
54f9ee45 11765_core_.LayoutConstraints_swigregister(LayoutConstraintsPtr)
d14a1e28
RD
11766
11767#----------------------------------------------------------------------------
11768
322913ce 11769# Use Python's bool constants if available, make some if not
d14a1e28
RD
11770try:
11771 True
11772except NameError:
322913ce
RD
11773 __builtins__.True = 1==1
11774 __builtins__.False = 1==0
4f89f6a3
RD
11775 def bool(value): return not not value
11776 __builtins__.bool = bool
d14a1e28 11777
d14a1e28
RD
11778
11779
11780# workarounds for bad wxRTTI names
11781__wxPyPtrTypeMap['wxGauge95'] = 'wxGauge'
11782__wxPyPtrTypeMap['wxSlider95'] = 'wxSlider'
11783__wxPyPtrTypeMap['wxStatusBar95'] = 'wxStatusBar'
11784
11785
11786#----------------------------------------------------------------------------
11787# Load version numbers from __version__... Ensure that major and minor
7bc1e663 11788# versions are the same for both wxPython and wxWidgets.
d14a1e28
RD
11789
11790from __version__ import *
11791__version__ = VERSION_STRING
11792
7bc1e663
RD
11793assert MAJOR_VERSION == _core_.MAJOR_VERSION, "wxPython/wxWidgets version mismatch"
11794assert MINOR_VERSION == _core_.MINOR_VERSION, "wxPython/wxWidgets version mismatch"
54f9ee45 11795if RELEASE_VERSION != _core_.RELEASE_VERSION:
d14a1e28 11796 import warnings
7bc1e663 11797 warnings.warn("wxPython/wxWidgets release number mismatch")
d14a1e28
RD
11798
11799#----------------------------------------------------------------------------
11800
70b7a5fe
RD
11801# Set wxPython's default string<-->unicode conversion encoding from
11802# the locale, but only if Python's default hasn't been changed. (We
11803# assume that if the user has customized it already then that is the
11804# encoding we need to use as well.)
11805#
11806# The encoding selected here is used when string or unicode objects
11807# need to be converted in order to pass them to wxWidgets. Please be
11808# aware that the default encoding within the same locale may be
11809# slightly different on different platforms. For example, please see
e505d15e
RD
11810# http://www.alanwood.net/demos/charsetdiffs.html for differences
11811# between the common latin/roman encodings.
396fb509
RD
11812
11813default = _sys.getdefaultencoding()
11814if default == 'ascii':
11815 import locale
11816 import codecs
11817 try:
11818 default = locale.getdefaultlocale()[1]
11819 codecs.lookup(default)
70b7a5fe 11820 except (ValueError, LookupError, TypeError):
396fb509
RD
11821 default = _sys.getdefaultencoding()
11822 del locale
11823 del codecs
5cbf236d
RD
11824if default:
11825 wx.SetDefaultPyEncoding(default)
11826del default
5cbf236d
RD
11827
11828#----------------------------------------------------------------------------
11829
d14a1e28
RD
11830class PyDeadObjectError(AttributeError):
11831 pass
11832
d14a1e28
RD
11833class _wxPyDeadObject(object):
11834 """
11835 Instances of wx objects that are OOR capable will have their __class__
11836 changed to this class when the C++ object is deleted. This should help
11837 prevent crashes due to referencing a bogus C++ pointer.
11838 """
11839 reprStr = "wxPython wrapper for DELETED %s object! (The C++ object no longer exists.)"
11840 attrStr = "The C++ part of the %s object has been deleted, attribute access no longer allowed."
11841
3a04f143 11842 def __repr__(self):
d14a1e28
RD
11843 if not hasattr(self, "_name"):
11844 self._name = "[unknown]"
11845 return self.reprStr % self._name
11846
3a04f143 11847 def __getattr__(self, *args):
d14a1e28
RD
11848 if not hasattr(self, "_name"):
11849 self._name = "[unknown]"
3a04f143
RD
11850 raise PyDeadObjectError(self.attrStr % self._name)
11851
11852 def __nonzero__(self):
11853 return 0
11854
11855
11856
11857class PyUnbornObjectError(AttributeError):
11858 pass
11859
11860class _wxPyUnbornObject(object):
11861 """
54f9ee45 11862 Some stock objects are created when the wx._core module is
3a04f143
RD
11863 imported, but their C++ instance is not created until the wx.App
11864 object is created and initialized. These object instances will
11865 temporarily have their __class__ changed to this class so an
11866 exception will be raised if they are used before the C++ instance
11867 is ready.
11868 """
11869
11870 reprStr = "wxPython wrapper for UNBORN object! (The C++ object is not initialized yet.)"
11871 attrStr = "The C++ part of this object has not been initialized, attribute access not allowed."
11872
11873 def __repr__(self):
11874 #if not hasattr(self, "_name"):
11875 # self._name = "[unknown]"
11876 return self.reprStr #% self._name
11877
11878 def __getattr__(self, *args):
11879 #if not hasattr(self, "_name"):
11880 # self._name = "[unknown]"
11881 raise PyUnbornObjectError(self.attrStr) # % self._name )
d14a1e28
RD
11882
11883 def __nonzero__(self):
11884 return 0
11885
11886
11887#----------------------------------------------------------------------------
d14a1e28
RD
11888
11889def CallAfter(callable, *args, **kw):
11890 """
11891 Call the specified function after the current and pending event
11892 handlers have been completed. This is also good for making GUI
61863841
RD
11893 method calls from non-GUI threads. Any extra positional or
11894 keyword args are passed on to the callable when it is called.
11895
11896 :see: `wx.FutureCall`
d14a1e28
RD
11897 """
11898 app = wx.GetApp()
dfbb5885 11899 assert app is not None, 'No wx.App created yet'
d14a1e28 11900
148275d3
RD
11901 if not hasattr(app, "_CallAfterId"):
11902 app._CallAfterId = wx.NewEventType()
11903 app.Connect(-1, -1, app._CallAfterId,
11904 lambda event: event.callable(*event.args, **event.kw) )
d14a1e28 11905 evt = wx.PyEvent()
148275d3 11906 evt.SetEventType(app._CallAfterId)
d14a1e28
RD
11907 evt.callable = callable
11908 evt.args = args
11909 evt.kw = kw
11910 wx.PostEvent(app, evt)
11911
d14a1e28
RD
11912#----------------------------------------------------------------------------
11913
11914
11915class FutureCall:
11916 """
8ac8dba0 11917 A convenience class for `wx.Timer`, that calls the given callable
d14a1e28
RD
11918 object once after the given amount of milliseconds, passing any
11919 positional or keyword args. The return value of the callable is
61863841 11920 availbale after it has been run with the `GetResult` method.
d14a1e28
RD
11921
11922 If you don't need to get the return value or restart the timer
11923 then there is no need to hold a reference to this object. It will
11924 hold a reference to itself while the timer is running (the timer
11925 has a reference to self.Notify) but the cycle will be broken when
11926 the timer completes, automatically cleaning up the wx.FutureCall
11927 object.
61863841
RD
11928
11929 :see: `wx.CallAfter`
d14a1e28
RD
11930 """
11931 def __init__(self, millis, callable, *args, **kwargs):
11932 self.millis = millis
11933 self.callable = callable
11934 self.SetArgs(*args, **kwargs)
11935 self.runCount = 0
4276dc52 11936 self.running = False
d14a1e28
RD
11937 self.hasRun = False
11938 self.result = None
11939 self.timer = None
11940 self.Start()
11941
11942 def __del__(self):
11943 self.Stop()
11944
11945
11946 def Start(self, millis=None, *args, **kwargs):
11947 """
11948 (Re)start the timer
11949 """
11950 self.hasRun = False
11951 if millis is not None:
11952 self.millis = millis
11953 if args or kwargs:
11954 self.SetArgs(*args, **kwargs)
11955 self.Stop()
11956 self.timer = wx.PyTimer(self.Notify)
11957 self.timer.Start(self.millis, wx.TIMER_ONE_SHOT)
4276dc52 11958 self.running = True
d14a1e28
RD
11959 Restart = Start
11960
11961
11962 def Stop(self):
11963 """
11964 Stop and destroy the timer.
11965 """
11966 if self.timer is not None:
11967 self.timer.Stop()
11968 self.timer = None
11969
11970
11971 def GetInterval(self):
11972 if self.timer is not None:
11973 return self.timer.GetInterval()
11974 else:
11975 return 0
11976
11977
11978 def IsRunning(self):
11979 return self.timer is not None and self.timer.IsRunning()
11980
11981
11982 def SetArgs(self, *args, **kwargs):
11983 """
11984 (Re)set the args passed to the callable object. This is
11985 useful in conjunction with Restart if you want to schedule a
11986 new call to the same callable object but with different
11987 parameters.
11988 """
11989 self.args = args
11990 self.kwargs = kwargs
11991
11992
11993 def HasRun(self):
11994 return self.hasRun
11995
11996 def GetResult(self):
11997 return self.result
11998
11999 def Notify(self):
12000 """
12001 The timer has expired so call the callable.
12002 """
12003 if self.callable and getattr(self.callable, 'im_self', True):
12004 self.runCount += 1
4276dc52 12005 self.running = False
d14a1e28
RD
12006 self.result = self.callable(*self.args, **self.kwargs)
12007 self.hasRun = True
4276dc52
RD
12008 if not self.running:
12009 # if it wasn't restarted, then cleanup
12010 wx.CallAfter(self.Stop)
d14a1e28
RD
12011
12012
a95a7133
RD
12013
12014#----------------------------------------------------------------------------
12015# Control which items in this module should be documented by epydoc.
12016# We allow only classes and functions, which will help reduce the size
12017# of the docs by filtering out the zillions of constants, EVT objects,
12018# and etc that don't make much sense by themselves, but are instead
12019# documented (or will be) as part of the classes/functions/methods
12020# where they should be used.
12021
66c033b4
RD
12022class __DocFilter:
12023 """
12024 A filter for epydoc that only allows non-Ptr classes and
12025 fucntions, in order to reduce the clutter in the API docs.
12026 """
12027 def __init__(self, globals):
12028 self._globals = globals
12029
12030 def __call__(self, name):
12031 import types
12032 obj = self._globals.get(name, None)
12033 if type(obj) not in [type, types.ClassType, types.FunctionType, types.BuiltinFunctionType]:
12034 return False
12035 if name.startswith('_') or name.endswith('Ptr') or name.startswith('EVT'):
12036 return False
12037 return True
a95a7133 12038
d14a1e28
RD
12039#----------------------------------------------------------------------------
12040#----------------------------------------------------------------------------
12041
12042# Import other modules in this package that should show up in the
12043# "core" wx namespace
54f9ee45
RD
12044from _gdi import *
12045from _windows import *
12046from _controls import *
12047from _misc import *
d14a1e28 12048
3a04f143
RD
12049
12050# Fixup the stock objects since they can't be used yet. (They will be
12051# restored in wx.PyApp.OnInit.)
54f9ee45 12052_core_._wxPyFixStockObjects()
3a04f143 12053
d14a1e28
RD
12054#----------------------------------------------------------------------------
12055#----------------------------------------------------------------------------
12056
12057