]> git.saurik.com Git - wxWidgets.git/blame - wxPython/src/gtk/_core.py
Corrected a potential NULL pointer dereference in the SWIG runtime
[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):
093d3ff1 2044 """Proxy of C++ ImageHandler class"""
d14a1e28
RD
2045 def __init__(self): raise RuntimeError, "No constructor defined"
2046 def __repr__(self):
2047 return "<%s.%s; proxy of C++ wxImageHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
e811c8ce 2048 def GetName(*args, **kwargs):
a95a7133 2049 """GetName(self) -> String"""
54f9ee45 2050 return _core_.ImageHandler_GetName(*args, **kwargs)
e811c8ce
RD
2051
2052 def GetExtension(*args, **kwargs):
a95a7133 2053 """GetExtension(self) -> String"""
54f9ee45 2054 return _core_.ImageHandler_GetExtension(*args, **kwargs)
e811c8ce
RD
2055
2056 def GetType(*args, **kwargs):
a95a7133 2057 """GetType(self) -> long"""
54f9ee45 2058 return _core_.ImageHandler_GetType(*args, **kwargs)
e811c8ce
RD
2059
2060 def GetMimeType(*args, **kwargs):
a95a7133 2061 """GetMimeType(self) -> String"""
54f9ee45 2062 return _core_.ImageHandler_GetMimeType(*args, **kwargs)
e811c8ce
RD
2063
2064 def CanRead(*args, **kwargs):
a95a7133 2065 """CanRead(self, String name) -> bool"""
54f9ee45 2066 return _core_.ImageHandler_CanRead(*args, **kwargs)
e811c8ce
RD
2067
2068 def SetName(*args, **kwargs):
a95a7133 2069 """SetName(self, String name)"""
54f9ee45 2070 return _core_.ImageHandler_SetName(*args, **kwargs)
e811c8ce
RD
2071
2072 def SetExtension(*args, **kwargs):
a95a7133 2073 """SetExtension(self, String extension)"""
54f9ee45 2074 return _core_.ImageHandler_SetExtension(*args, **kwargs)
e811c8ce
RD
2075
2076 def SetType(*args, **kwargs):
a95a7133 2077 """SetType(self, long type)"""
54f9ee45 2078 return _core_.ImageHandler_SetType(*args, **kwargs)
e811c8ce
RD
2079
2080 def SetMimeType(*args, **kwargs):
a95a7133 2081 """SetMimeType(self, String mimetype)"""
54f9ee45 2082 return _core_.ImageHandler_SetMimeType(*args, **kwargs)
e811c8ce 2083
d14a1e28
RD
2084
2085class ImageHandlerPtr(ImageHandler):
2086 def __init__(self, this):
2087 self.this = this
2088 if not hasattr(self,"thisown"): self.thisown = 0
2089 self.__class__ = ImageHandler
54f9ee45 2090_core_.ImageHandler_swigregister(ImageHandlerPtr)
d14a1e28
RD
2091
2092class ImageHistogram(object):
093d3ff1 2093 """Proxy of C++ ImageHistogram class"""
e811c8ce
RD
2094 def __repr__(self):
2095 return "<%s.%s; proxy of C++ wxImageHistogram instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 2096 def __init__(self, *args, **kwargs):
a95a7133 2097 """__init__(self) -> ImageHistogram"""
54f9ee45 2098 newobj = _core_.new_ImageHistogram(*args, **kwargs)
d14a1e28
RD
2099 self.this = newobj.this
2100 self.thisown = 1
2101 del newobj.thisown
e811c8ce 2102 def MakeKey(*args, **kwargs):
0df68c9f 2103 """
66c033b4 2104 MakeKey(unsigned char r, unsigned char g, unsigned char b) -> unsigned long
e811c8ce 2105
0df68c9f
RD
2106 Get the key in the histogram for the given RGB values
2107 """
54f9ee45 2108 return _core_.ImageHistogram_MakeKey(*args, **kwargs)
e811c8ce
RD
2109
2110 MakeKey = staticmethod(MakeKey)
2111 def FindFirstUnusedColour(*args, **kwargs):
fd2dc343
RD
2112 """
2113 FindFirstUnusedColour(int startR=1, int startG=0, int startB=0) -> (success, r, g, b)
2114
2115 Find first colour that is not used in the image and has higher RGB
2116 values than startR, startG, startB. Returns a tuple consisting of a
2117 success flag and rgb values.
2118 """
54f9ee45 2119 return _core_.ImageHistogram_FindFirstUnusedColour(*args, **kwargs)
e811c8ce 2120
f1cbd8fa
RD
2121 def GetCount(*args, **kwargs):
2122 """
2123 GetCount(self, unsigned long key) -> unsigned long
2124
2125 Returns the pixel count for the given key. Use `MakeKey` to create a
2126 key value from a RGB tripple.
2127 """
2128 return _core_.ImageHistogram_GetCount(*args, **kwargs)
2129
2130 def GetCountRGB(*args, **kwargs):
2131 """
2132 GetCountRGB(self, unsigned char r, unsigned char g, unsigned char b) -> unsigned long
2133
2134 Returns the pixel count for the given RGB values.
2135 """
2136 return _core_.ImageHistogram_GetCountRGB(*args, **kwargs)
2137
2138 def GetCountColour(*args, **kwargs):
2139 """
2140 GetCountColour(self, Colour colour) -> unsigned long
2141
2142 Returns the pixel count for the given `wx.Colour` value.
2143 """
2144 return _core_.ImageHistogram_GetCountColour(*args, **kwargs)
2145
d14a1e28
RD
2146
2147class ImageHistogramPtr(ImageHistogram):
2148 def __init__(self, this):
2149 self.this = this
2150 if not hasattr(self,"thisown"): self.thisown = 0
2151 self.__class__ = ImageHistogram
54f9ee45 2152_core_.ImageHistogram_swigregister(ImageHistogramPtr)
d14a1e28 2153
e811c8ce 2154def ImageHistogram_MakeKey(*args, **kwargs):
0df68c9f
RD
2155 """
2156 ImageHistogram_MakeKey(unsigned char r, unsigned char g, unsigned char b) -> unsigned long
e811c8ce 2157
0df68c9f
RD
2158 Get the key in the histogram for the given RGB values
2159 """
54f9ee45 2160 return _core_.ImageHistogram_MakeKey(*args, **kwargs)
d14a1e28
RD
2161
2162class Image(Object):
093d3ff1 2163 """Proxy of C++ Image class"""
e811c8ce
RD
2164 def __repr__(self):
2165 return "<%s.%s; proxy of C++ wxImage instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 2166 def __init__(self, *args, **kwargs):
a95a7133 2167 """__init__(self, String name, long type=BITMAP_TYPE_ANY, int index=-1) -> Image"""
54f9ee45 2168 newobj = _core_.new_Image(*args, **kwargs)
d14a1e28
RD
2169 self.this = newobj.this
2170 self.thisown = 1
2171 del newobj.thisown
54f9ee45 2172 def __del__(self, destroy=_core_.delete_Image):
a95a7133 2173 """__del__(self)"""
d14a1e28
RD
2174 try:
2175 if self.thisown: destroy(self)
2176 except: pass
e811c8ce
RD
2177
2178 def Create(*args, **kwargs):
a95a7133 2179 """Create(self, int width, int height)"""
54f9ee45 2180 return _core_.Image_Create(*args, **kwargs)
e811c8ce
RD
2181
2182 def Destroy(*args, **kwargs):
0df68c9f 2183 """
a95a7133 2184 Destroy(self)
e811c8ce 2185
0df68c9f
RD
2186 Deletes the C++ object this Python object is a proxy for.
2187 """
54f9ee45 2188 return _core_.Image_Destroy(*args, **kwargs)
e811c8ce
RD
2189
2190 def Scale(*args, **kwargs):
a95a7133 2191 """Scale(self, int width, int height) -> Image"""
54f9ee45 2192 return _core_.Image_Scale(*args, **kwargs)
e811c8ce
RD
2193
2194 def ShrinkBy(*args, **kwargs):
a95a7133 2195 """ShrinkBy(self, int xFactor, int yFactor) -> Image"""
54f9ee45 2196 return _core_.Image_ShrinkBy(*args, **kwargs)
e811c8ce
RD
2197
2198 def Rescale(*args, **kwargs):
a95a7133 2199 """Rescale(self, int width, int height) -> Image"""
54f9ee45 2200 return _core_.Image_Rescale(*args, **kwargs)
e811c8ce 2201
aff4cc5c
RD
2202 def Resize(*args, **kwargs):
2203 """Resize(self, Size size, Point pos, int r=-1, int g=-1, int b=-1) -> Image"""
2204 return _core_.Image_Resize(*args, **kwargs)
2205
e811c8ce 2206 def SetRGB(*args, **kwargs):
a95a7133 2207 """SetRGB(self, int x, int y, unsigned char r, unsigned char g, unsigned char b)"""
54f9ee45 2208 return _core_.Image_SetRGB(*args, **kwargs)
e811c8ce 2209
aff4cc5c
RD
2210 def SetRGBRect(*args, **kwargs):
2211 """SetRGBRect(self, Rect rect, unsigned char r, unsigned char g, unsigned char b)"""
2212 return _core_.Image_SetRGBRect(*args, **kwargs)
2213
e811c8ce 2214 def GetRed(*args, **kwargs):
a95a7133 2215 """GetRed(self, int x, int y) -> unsigned char"""
54f9ee45 2216 return _core_.Image_GetRed(*args, **kwargs)
e811c8ce
RD
2217
2218 def GetGreen(*args, **kwargs):
a95a7133 2219 """GetGreen(self, int x, int y) -> unsigned char"""
54f9ee45 2220 return _core_.Image_GetGreen(*args, **kwargs)
e811c8ce
RD
2221
2222 def GetBlue(*args, **kwargs):
a95a7133 2223 """GetBlue(self, int x, int y) -> unsigned char"""
54f9ee45 2224 return _core_.Image_GetBlue(*args, **kwargs)
e811c8ce
RD
2225
2226 def SetAlpha(*args, **kwargs):
a95a7133 2227 """SetAlpha(self, int x, int y, unsigned char alpha)"""
54f9ee45 2228 return _core_.Image_SetAlpha(*args, **kwargs)
e811c8ce
RD
2229
2230 def GetAlpha(*args, **kwargs):
a95a7133 2231 """GetAlpha(self, int x, int y) -> unsigned char"""
54f9ee45 2232 return _core_.Image_GetAlpha(*args, **kwargs)
e811c8ce
RD
2233
2234 def HasAlpha(*args, **kwargs):
a95a7133 2235 """HasAlpha(self) -> bool"""
54f9ee45 2236 return _core_.Image_HasAlpha(*args, **kwargs)
e811c8ce 2237
68350608
RD
2238 def InitAlpha(*args, **kwargs):
2239 """
2240 InitAlpha(self)
2241
2242 Initializes the image alpha channel data. It is an error to call it if
2243 the image already has alpha data. If it doesn't, alpha data will be by
2244 default initialized to all pixels being fully opaque. But if the image
2245 has a a mask colour, all mask pixels will be completely transparent.
2246 """
2247 return _core_.Image_InitAlpha(*args, **kwargs)
2248
bcd0d7b6
RD
2249 def IsTransparent(*args, **kwargs):
2250 """
2251 IsTransparent(self, int x, int y, unsigned char threshold=IMAGE_ALPHA_THRESHOLD) -> bool
2252
2253 Returns True if this pixel is masked or has an alpha value less than
2254 the spcified threshold.
2255 """
2256 return _core_.Image_IsTransparent(*args, **kwargs)
2257
e811c8ce 2258 def FindFirstUnusedColour(*args, **kwargs):
fd2dc343
RD
2259 """
2260 FindFirstUnusedColour(int startR=1, int startG=0, int startB=0) -> (success, r, g, b)
2261
2262 Find first colour that is not used in the image and has higher RGB
2263 values than startR, startG, startB. Returns a tuple consisting of a
2264 success flag and rgb values.
2265 """
54f9ee45 2266 return _core_.Image_FindFirstUnusedColour(*args, **kwargs)
e811c8ce 2267
4cf4100f
RD
2268 def ConvertAlphaToMask(*args, **kwargs):
2269 """
bcd0d7b6 2270 ConvertAlphaToMask(self, byte threshold=IMAGE_ALPHA_THRESHOLD) -> bool
4cf4100f
RD
2271
2272 If the image has alpha channel, this method converts it to mask. All pixels
2273 with alpha value less than ``threshold`` are replaced with mask colour and the
2274 alpha channel is removed. Mask colour is chosen automatically using
2275 `FindFirstUnusedColour`.
2276
2277 If the image image doesn't have alpha channel, ConvertAlphaToMask does
2278 nothing.
2279 """
2280 return _core_.Image_ConvertAlphaToMask(*args, **kwargs)
2281
8fb0e70a
RD
2282 def ConvertColourToAlpha(*args, **kwargs):
2283 """
2284 ConvertColourToAlpha(self, unsigned char r, unsigned char g, unsigned char b) -> bool
2285
2286 This method converts an image where the original alpha information is
2287 only available as a shades of a colour (actually shades of grey)
2288 typically when you draw anti-aliased text into a bitmap. The DC
2289 drawing routines draw grey values on the black background although
2290 they actually mean to draw white with differnt alpha values. This
2291 method reverses it, assuming a black (!) background and white text.
2292 The method will then fill up the whole image with the colour given.
2293 """
2294 return _core_.Image_ConvertColourToAlpha(*args, **kwargs)
2295
e811c8ce 2296 def SetMaskFromImage(*args, **kwargs):
a95a7133 2297 """SetMaskFromImage(self, Image mask, byte mr, byte mg, byte mb) -> bool"""
54f9ee45 2298 return _core_.Image_SetMaskFromImage(*args, **kwargs)
e811c8ce
RD
2299
2300 def CanRead(*args, **kwargs):
66c033b4 2301 """CanRead(String name) -> bool"""
54f9ee45 2302 return _core_.Image_CanRead(*args, **kwargs)
e811c8ce
RD
2303
2304 CanRead = staticmethod(CanRead)
2305 def GetImageCount(*args, **kwargs):
66c033b4 2306 """GetImageCount(String name, long type=BITMAP_TYPE_ANY) -> int"""
54f9ee45 2307 return _core_.Image_GetImageCount(*args, **kwargs)
e811c8ce
RD
2308
2309 GetImageCount = staticmethod(GetImageCount)
2310 def LoadFile(*args, **kwargs):
a95a7133 2311 """LoadFile(self, String name, long type=BITMAP_TYPE_ANY, int index=-1) -> bool"""
54f9ee45 2312 return _core_.Image_LoadFile(*args, **kwargs)
e811c8ce
RD
2313
2314 def LoadMimeFile(*args, **kwargs):
a95a7133 2315 """LoadMimeFile(self, String name, String mimetype, int index=-1) -> bool"""
54f9ee45 2316 return _core_.Image_LoadMimeFile(*args, **kwargs)
e811c8ce
RD
2317
2318 def SaveFile(*args, **kwargs):
a95a7133 2319 """SaveFile(self, String name, int type) -> bool"""
54f9ee45 2320 return _core_.Image_SaveFile(*args, **kwargs)
e811c8ce
RD
2321
2322 def SaveMimeFile(*args, **kwargs):
a95a7133 2323 """SaveMimeFile(self, String name, String mimetype) -> bool"""
54f9ee45 2324 return _core_.Image_SaveMimeFile(*args, **kwargs)
e811c8ce
RD
2325
2326 def CanReadStream(*args, **kwargs):
66c033b4 2327 """CanReadStream(InputStream stream) -> bool"""
54f9ee45 2328 return _core_.Image_CanReadStream(*args, **kwargs)
e811c8ce
RD
2329
2330 CanReadStream = staticmethod(CanReadStream)
2331 def LoadStream(*args, **kwargs):
a95a7133 2332 """LoadStream(self, InputStream stream, long type=BITMAP_TYPE_ANY, int index=-1) -> bool"""
54f9ee45 2333 return _core_.Image_LoadStream(*args, **kwargs)
e811c8ce
RD
2334
2335 def LoadMimeStream(*args, **kwargs):
a95a7133 2336 """LoadMimeStream(self, InputStream stream, String mimetype, int index=-1) -> bool"""
54f9ee45 2337 return _core_.Image_LoadMimeStream(*args, **kwargs)
e811c8ce
RD
2338
2339 def Ok(*args, **kwargs):
a95a7133 2340 """Ok(self) -> bool"""
54f9ee45 2341 return _core_.Image_Ok(*args, **kwargs)
e811c8ce
RD
2342
2343 def GetWidth(*args, **kwargs):
a95a7133 2344 """GetWidth(self) -> int"""
54f9ee45 2345 return _core_.Image_GetWidth(*args, **kwargs)
e811c8ce
RD
2346
2347 def GetHeight(*args, **kwargs):
a95a7133 2348 """GetHeight(self) -> int"""
54f9ee45 2349 return _core_.Image_GetHeight(*args, **kwargs)
e811c8ce 2350
b2df227b 2351 def GetSize(*args, **kwargs):
a95a7133 2352 """GetSize(self) -> Size"""
54f9ee45 2353 return _core_.Image_GetSize(*args, **kwargs)
b2df227b 2354
e811c8ce 2355 def GetSubImage(*args, **kwargs):
a95a7133 2356 """GetSubImage(self, Rect rect) -> Image"""
54f9ee45 2357 return _core_.Image_GetSubImage(*args, **kwargs)
e811c8ce 2358
aff4cc5c
RD
2359 def Size(*args, **kwargs):
2360 """Size(self, Size size, Point pos, int r=-1, int g=-1, int b=-1) -> Image"""
2361 return _core_.Image_Size(*args, **kwargs)
2362
e811c8ce 2363 def Copy(*args, **kwargs):
a95a7133 2364 """Copy(self) -> Image"""
54f9ee45 2365 return _core_.Image_Copy(*args, **kwargs)
e811c8ce
RD
2366
2367 def Paste(*args, **kwargs):
a95a7133 2368 """Paste(self, Image image, int x, int y)"""
54f9ee45 2369 return _core_.Image_Paste(*args, **kwargs)
e811c8ce
RD
2370
2371 def GetData(*args, **kwargs):
61d07ac7
RD
2372 """
2373 GetData(self) -> PyObject
2374
2375 Returns a string containing a copy of the RGB bytes of the image.
2376 """
54f9ee45 2377 return _core_.Image_GetData(*args, **kwargs)
e811c8ce
RD
2378
2379 def SetData(*args, **kwargs):
61d07ac7
RD
2380 """
2381 SetData(self, buffer data)
2382
2383 Resets the Image's RGB data from a buffer of RGB bytes. Accepts
2384 either a string or a buffer object holding the data and the length of
2385 the data must be width*height*3.
2386 """
54f9ee45 2387 return _core_.Image_SetData(*args, **kwargs)
e811c8ce
RD
2388
2389 def GetDataBuffer(*args, **kwargs):
61d07ac7
RD
2390 """
2391 GetDataBuffer(self) -> PyObject
2392
2393 Returns a writable Python buffer object that is pointing at the RGB
2394 image data buffer inside the wx.Image.
2395 """
54f9ee45 2396 return _core_.Image_GetDataBuffer(*args, **kwargs)
e811c8ce
RD
2397
2398 def SetDataBuffer(*args, **kwargs):
61d07ac7
RD
2399 """
2400 SetDataBuffer(self, buffer data)
2401
2402 Sets the internal image data pointer to point at a Python buffer
2403 object. This can save a copy of the data but you must ensure that the
2404 buffer object lives longer than the wx.Image does.
2405 """
54f9ee45 2406 return _core_.Image_SetDataBuffer(*args, **kwargs)
e811c8ce
RD
2407
2408 def GetAlphaData(*args, **kwargs):
61d07ac7
RD
2409 """
2410 GetAlphaData(self) -> PyObject
2411
2412 Returns a string containing a copy of the alpha bytes of the image.
2413 """
54f9ee45 2414 return _core_.Image_GetAlphaData(*args, **kwargs)
e811c8ce
RD
2415
2416 def SetAlphaData(*args, **kwargs):
61d07ac7
RD
2417 """
2418 SetAlphaData(self, buffer alpha)
2419
2420 Resets the Image's alpha data from a buffer of bytes. Accepts either
2421 a string or a buffer object holding the data and the length of the
2422 data must be width*height.
2423 """
54f9ee45 2424 return _core_.Image_SetAlphaData(*args, **kwargs)
e811c8ce
RD
2425
2426 def GetAlphaBuffer(*args, **kwargs):
a95a7133 2427 """GetAlphaBuffer(self) -> PyObject"""
54f9ee45 2428 return _core_.Image_GetAlphaBuffer(*args, **kwargs)
e811c8ce
RD
2429
2430 def SetAlphaBuffer(*args, **kwargs):
61d07ac7 2431 """SetAlphaBuffer(self, buffer alpha)"""
54f9ee45 2432 return _core_.Image_SetAlphaBuffer(*args, **kwargs)
e811c8ce
RD
2433
2434 def SetMaskColour(*args, **kwargs):
a95a7133 2435 """SetMaskColour(self, unsigned char r, unsigned char g, unsigned char b)"""
54f9ee45 2436 return _core_.Image_SetMaskColour(*args, **kwargs)
e811c8ce 2437
aff4cc5c
RD
2438 def GetOrFindMaskColour(*args, **kwargs):
2439 """
2440 GetOrFindMaskColour() -> (r,g,b)
2441
2442 Get the current mask colour or find a suitable colour.
2443 """
2444 return _core_.Image_GetOrFindMaskColour(*args, **kwargs)
2445
e811c8ce 2446 def GetMaskRed(*args, **kwargs):
a95a7133 2447 """GetMaskRed(self) -> unsigned char"""
54f9ee45 2448 return _core_.Image_GetMaskRed(*args, **kwargs)
e811c8ce
RD
2449
2450 def GetMaskGreen(*args, **kwargs):
a95a7133 2451 """GetMaskGreen(self) -> unsigned char"""
54f9ee45 2452 return _core_.Image_GetMaskGreen(*args, **kwargs)
e811c8ce
RD
2453
2454 def GetMaskBlue(*args, **kwargs):
a95a7133 2455 """GetMaskBlue(self) -> unsigned char"""
54f9ee45 2456 return _core_.Image_GetMaskBlue(*args, **kwargs)
e811c8ce
RD
2457
2458 def SetMask(*args, **kwargs):
a95a7133 2459 """SetMask(self, bool mask=True)"""
54f9ee45 2460 return _core_.Image_SetMask(*args, **kwargs)
e811c8ce
RD
2461
2462 def HasMask(*args, **kwargs):
a95a7133 2463 """HasMask(self) -> bool"""
54f9ee45 2464 return _core_.Image_HasMask(*args, **kwargs)
e811c8ce
RD
2465
2466 def Rotate(*args, **kwargs):
0df68c9f 2467 """
a95a7133 2468 Rotate(self, double angle, Point centre_of_rotation, bool interpolating=True,
0df68c9f
RD
2469 Point offset_after_rotation=None) -> Image
2470 """
54f9ee45 2471 return _core_.Image_Rotate(*args, **kwargs)
e811c8ce
RD
2472
2473 def Rotate90(*args, **kwargs):
a95a7133 2474 """Rotate90(self, bool clockwise=True) -> Image"""
54f9ee45 2475 return _core_.Image_Rotate90(*args, **kwargs)
e811c8ce
RD
2476
2477 def Mirror(*args, **kwargs):
a95a7133 2478 """Mirror(self, bool horizontally=True) -> Image"""
54f9ee45 2479 return _core_.Image_Mirror(*args, **kwargs)
e811c8ce
RD
2480
2481 def Replace(*args, **kwargs):
0df68c9f 2482 """
a95a7133 2483 Replace(self, unsigned char r1, unsigned char g1, unsigned char b1,
0df68c9f
RD
2484 unsigned char r2, unsigned char g2, unsigned char b2)
2485 """
54f9ee45 2486 return _core_.Image_Replace(*args, **kwargs)
e811c8ce
RD
2487
2488 def ConvertToMono(*args, **kwargs):
a95a7133 2489 """ConvertToMono(self, unsigned char r, unsigned char g, unsigned char b) -> Image"""
54f9ee45 2490 return _core_.Image_ConvertToMono(*args, **kwargs)
e811c8ce
RD
2491
2492 def SetOption(*args, **kwargs):
a95a7133 2493 """SetOption(self, String name, String value)"""
54f9ee45 2494 return _core_.Image_SetOption(*args, **kwargs)
e811c8ce
RD
2495
2496 def SetOptionInt(*args, **kwargs):
a95a7133 2497 """SetOptionInt(self, String name, int value)"""
54f9ee45 2498 return _core_.Image_SetOptionInt(*args, **kwargs)
e811c8ce
RD
2499
2500 def GetOption(*args, **kwargs):
a95a7133 2501 """GetOption(self, String name) -> String"""
54f9ee45 2502 return _core_.Image_GetOption(*args, **kwargs)
e811c8ce
RD
2503
2504 def GetOptionInt(*args, **kwargs):
a95a7133 2505 """GetOptionInt(self, String name) -> int"""
54f9ee45 2506 return _core_.Image_GetOptionInt(*args, **kwargs)
e811c8ce
RD
2507
2508 def HasOption(*args, **kwargs):
a95a7133 2509 """HasOption(self, String name) -> bool"""
54f9ee45 2510 return _core_.Image_HasOption(*args, **kwargs)
e811c8ce
RD
2511
2512 def CountColours(*args, **kwargs):
a95a7133 2513 """CountColours(self, unsigned long stopafter=(unsigned long) -1) -> unsigned long"""
54f9ee45 2514 return _core_.Image_CountColours(*args, **kwargs)
e811c8ce
RD
2515
2516 def ComputeHistogram(*args, **kwargs):
a95a7133 2517 """ComputeHistogram(self, ImageHistogram h) -> unsigned long"""
54f9ee45 2518 return _core_.Image_ComputeHistogram(*args, **kwargs)
e811c8ce
RD
2519
2520 def AddHandler(*args, **kwargs):
66c033b4 2521 """AddHandler(ImageHandler handler)"""
54f9ee45 2522 return _core_.Image_AddHandler(*args, **kwargs)
e811c8ce
RD
2523
2524 AddHandler = staticmethod(AddHandler)
2525 def InsertHandler(*args, **kwargs):
66c033b4 2526 """InsertHandler(ImageHandler handler)"""
54f9ee45 2527 return _core_.Image_InsertHandler(*args, **kwargs)
e811c8ce
RD
2528
2529 InsertHandler = staticmethod(InsertHandler)
2530 def RemoveHandler(*args, **kwargs):
66c033b4 2531 """RemoveHandler(String name) -> bool"""
54f9ee45 2532 return _core_.Image_RemoveHandler(*args, **kwargs)
e811c8ce
RD
2533
2534 RemoveHandler = staticmethod(RemoveHandler)
2535 def GetImageExtWildcard(*args, **kwargs):
66c033b4 2536 """GetImageExtWildcard() -> String"""
54f9ee45 2537 return _core_.Image_GetImageExtWildcard(*args, **kwargs)
e811c8ce
RD
2538
2539 GetImageExtWildcard = staticmethod(GetImageExtWildcard)
2540 def ConvertToBitmap(*args, **kwargs):
1fbf26be 2541 """ConvertToBitmap(self, int depth=-1) -> Bitmap"""
54f9ee45 2542 return _core_.Image_ConvertToBitmap(*args, **kwargs)
e811c8ce
RD
2543
2544 def ConvertToMonoBitmap(*args, **kwargs):
a95a7133 2545 """ConvertToMonoBitmap(self, unsigned char red, unsigned char green, unsigned char blue) -> Bitmap"""
54f9ee45 2546 return _core_.Image_ConvertToMonoBitmap(*args, **kwargs)
e811c8ce
RD
2547
2548 def __nonzero__(self): return self.Ok()
d14a1e28
RD
2549
2550class ImagePtr(Image):
2551 def __init__(self, this):
2552 self.this = this
2553 if not hasattr(self,"thisown"): self.thisown = 0
2554 self.__class__ = Image
54f9ee45 2555_core_.Image_swigregister(ImagePtr)
d14a1e28
RD
2556
2557def ImageFromMime(*args, **kwargs):
196addbf 2558 """ImageFromMime(String name, String mimetype, int index=-1) -> Image"""
54f9ee45 2559 val = _core_.new_ImageFromMime(*args, **kwargs)
d14a1e28
RD
2560 val.thisown = 1
2561 return val
2562
2563def ImageFromStream(*args, **kwargs):
196addbf 2564 """ImageFromStream(InputStream stream, long type=BITMAP_TYPE_ANY, int index=-1) -> Image"""
54f9ee45 2565 val = _core_.new_ImageFromStream(*args, **kwargs)
d14a1e28
RD
2566 val.thisown = 1
2567 return val
2568
2569def ImageFromStreamMime(*args, **kwargs):
196addbf 2570 """ImageFromStreamMime(InputStream stream, String mimetype, int index=-1) -> Image"""
54f9ee45 2571 val = _core_.new_ImageFromStreamMime(*args, **kwargs)
d14a1e28
RD
2572 val.thisown = 1
2573 return val
2574
66c033b4 2575def EmptyImage(*args, **kwargs):
61d07ac7
RD
2576 """
2577 EmptyImage(int width=0, int height=0, bool clear=True) -> Image
2578
2579 Construct an empty image of a given size, optionally setting all
2580 pixels to black.
2581 """
66c033b4 2582 val = _core_.new_EmptyImage(*args, **kwargs)
d14a1e28
RD
2583 val.thisown = 1
2584 return val
2585
2586def ImageFromBitmap(*args, **kwargs):
61d07ac7
RD
2587 """
2588 ImageFromBitmap(Bitmap bitmap) -> Image
2589
2590 Construct an Image from a `wx.Bitmap`.
2591 """
54f9ee45 2592 val = _core_.new_ImageFromBitmap(*args, **kwargs)
d14a1e28
RD
2593 val.thisown = 1
2594 return val
2595
2596def ImageFromData(*args, **kwargs):
61d07ac7
RD
2597 """
2598 ImageFromData(int width, int height, buffer data) -> Image
2599
2600 Construct an Image from a buffer of RGB bytes. Accepts either a
2601 string or a buffer object holding the data and the length of the data
2602 must be width*height*3.
2603 """
54f9ee45 2604 val = _core_.new_ImageFromData(*args, **kwargs)
d14a1e28
RD
2605 val.thisown = 1
2606 return val
2607
1823fbb4 2608def ImageFromDataWithAlpha(*args, **kwargs):
61d07ac7
RD
2609 """
2610 ImageFromDataWithAlpha(int width, int height, buffer data, buffer alpha) -> Image
2611
2612 Construct an Image from a buffer of RGB bytes with an Alpha channel.
2613 Accepts either a string or a buffer object holding the data and the
2614 length of the data must be width*height*3.
2615 """
1823fbb4
RD
2616 val = _core_.new_ImageFromDataWithAlpha(*args, **kwargs)
2617 val.thisown = 1
2618 return val
2619
e811c8ce 2620def Image_CanRead(*args, **kwargs):
196addbf 2621 """Image_CanRead(String name) -> bool"""
54f9ee45 2622 return _core_.Image_CanRead(*args, **kwargs)
d14a1e28 2623
e811c8ce 2624def Image_GetImageCount(*args, **kwargs):
196addbf 2625 """Image_GetImageCount(String name, long type=BITMAP_TYPE_ANY) -> int"""
54f9ee45 2626 return _core_.Image_GetImageCount(*args, **kwargs)
d14a1e28 2627
e811c8ce 2628def Image_CanReadStream(*args, **kwargs):
196addbf 2629 """Image_CanReadStream(InputStream stream) -> bool"""
54f9ee45 2630 return _core_.Image_CanReadStream(*args, **kwargs)
d14a1e28 2631
e811c8ce
RD
2632def Image_AddHandler(*args, **kwargs):
2633 """Image_AddHandler(ImageHandler handler)"""
54f9ee45 2634 return _core_.Image_AddHandler(*args, **kwargs)
d14a1e28 2635
e811c8ce
RD
2636def Image_InsertHandler(*args, **kwargs):
2637 """Image_InsertHandler(ImageHandler handler)"""
54f9ee45 2638 return _core_.Image_InsertHandler(*args, **kwargs)
d14a1e28 2639
e811c8ce 2640def Image_RemoveHandler(*args, **kwargs):
196addbf 2641 """Image_RemoveHandler(String name) -> bool"""
54f9ee45 2642 return _core_.Image_RemoveHandler(*args, **kwargs)
d14a1e28 2643
e811c8ce 2644def Image_GetImageExtWildcard(*args, **kwargs):
196addbf 2645 """Image_GetImageExtWildcard() -> String"""
54f9ee45 2646 return _core_.Image_GetImageExtWildcard(*args, **kwargs)
d14a1e28 2647
5e4ca4a8
RD
2648def InitAllImageHandlers():
2649 """
2650 The former functionality of InitAllImageHanders is now done internal to
2651 the _core_ extension module and so this function has become a simple NOP.
2652 """
2653 pass
d14a1e28 2654
54f9ee45
RD
2655IMAGE_RESOLUTION_INCHES = _core_.IMAGE_RESOLUTION_INCHES
2656IMAGE_RESOLUTION_CM = _core_.IMAGE_RESOLUTION_CM
b9d6a5f3
RD
2657PNG_TYPE_COLOUR = _core_.PNG_TYPE_COLOUR
2658PNG_TYPE_GREY = _core_.PNG_TYPE_GREY
2659PNG_TYPE_GREY_RED = _core_.PNG_TYPE_GREY_RED
54f9ee45
RD
2660BMP_24BPP = _core_.BMP_24BPP
2661BMP_8BPP = _core_.BMP_8BPP
2662BMP_8BPP_GREY = _core_.BMP_8BPP_GREY
2663BMP_8BPP_GRAY = _core_.BMP_8BPP_GRAY
2664BMP_8BPP_RED = _core_.BMP_8BPP_RED
2665BMP_8BPP_PALETTE = _core_.BMP_8BPP_PALETTE
2666BMP_4BPP = _core_.BMP_4BPP
2667BMP_1BPP = _core_.BMP_1BPP
2668BMP_1BPP_BW = _core_.BMP_1BPP_BW
d14a1e28 2669class BMPHandler(ImageHandler):
093d3ff1 2670 """Proxy of C++ BMPHandler class"""
e811c8ce
RD
2671 def __repr__(self):
2672 return "<%s.%s; proxy of C++ wxBMPHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 2673 def __init__(self, *args, **kwargs):
a95a7133 2674 """__init__(self) -> BMPHandler"""
54f9ee45 2675 newobj = _core_.new_BMPHandler(*args, **kwargs)
d14a1e28
RD
2676 self.this = newobj.this
2677 self.thisown = 1
2678 del newobj.thisown
d14a1e28
RD
2679
2680class BMPHandlerPtr(BMPHandler):
2681 def __init__(self, this):
2682 self.this = this
2683 if not hasattr(self,"thisown"): self.thisown = 0
2684 self.__class__ = BMPHandler
54f9ee45 2685_core_.BMPHandler_swigregister(BMPHandlerPtr)
d14a1e28 2686NullImage = cvar.NullImage
0c243d93 2687IMAGE_OPTION_FILENAME = cvar.IMAGE_OPTION_FILENAME
d14a1e28
RD
2688IMAGE_OPTION_BMP_FORMAT = cvar.IMAGE_OPTION_BMP_FORMAT
2689IMAGE_OPTION_CUR_HOTSPOT_X = cvar.IMAGE_OPTION_CUR_HOTSPOT_X
2690IMAGE_OPTION_CUR_HOTSPOT_Y = cvar.IMAGE_OPTION_CUR_HOTSPOT_Y
2691IMAGE_OPTION_RESOLUTION = cvar.IMAGE_OPTION_RESOLUTION
0c243d93
RD
2692IMAGE_OPTION_RESOLUTIONX = cvar.IMAGE_OPTION_RESOLUTIONX
2693IMAGE_OPTION_RESOLUTIONY = cvar.IMAGE_OPTION_RESOLUTIONY
d14a1e28 2694IMAGE_OPTION_RESOLUTIONUNIT = cvar.IMAGE_OPTION_RESOLUTIONUNIT
24d7cbea 2695IMAGE_OPTION_QUALITY = cvar.IMAGE_OPTION_QUALITY
0c243d93
RD
2696IMAGE_OPTION_BITSPERSAMPLE = cvar.IMAGE_OPTION_BITSPERSAMPLE
2697IMAGE_OPTION_SAMPLESPERPIXEL = cvar.IMAGE_OPTION_SAMPLESPERPIXEL
2698IMAGE_OPTION_COMPRESSION = cvar.IMAGE_OPTION_COMPRESSION
2699IMAGE_OPTION_IMAGEDESCRIPTOR = cvar.IMAGE_OPTION_IMAGEDESCRIPTOR
b9d6a5f3
RD
2700IMAGE_OPTION_PNG_FORMAT = cvar.IMAGE_OPTION_PNG_FORMAT
2701IMAGE_OPTION_PNG_BITDEPTH = cvar.IMAGE_OPTION_PNG_BITDEPTH
d14a1e28
RD
2702
2703class ICOHandler(BMPHandler):
093d3ff1 2704 """Proxy of C++ ICOHandler class"""
e811c8ce
RD
2705 def __repr__(self):
2706 return "<%s.%s; proxy of C++ wxICOHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 2707 def __init__(self, *args, **kwargs):
a95a7133 2708 """__init__(self) -> ICOHandler"""
54f9ee45 2709 newobj = _core_.new_ICOHandler(*args, **kwargs)
d14a1e28
RD
2710 self.this = newobj.this
2711 self.thisown = 1
2712 del newobj.thisown
d14a1e28
RD
2713
2714class ICOHandlerPtr(ICOHandler):
2715 def __init__(self, this):
2716 self.this = this
2717 if not hasattr(self,"thisown"): self.thisown = 0
2718 self.__class__ = ICOHandler
54f9ee45 2719_core_.ICOHandler_swigregister(ICOHandlerPtr)
d14a1e28
RD
2720
2721class CURHandler(ICOHandler):
093d3ff1 2722 """Proxy of C++ CURHandler class"""
e811c8ce
RD
2723 def __repr__(self):
2724 return "<%s.%s; proxy of C++ wxCURHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 2725 def __init__(self, *args, **kwargs):
a95a7133 2726 """__init__(self) -> CURHandler"""
54f9ee45 2727 newobj = _core_.new_CURHandler(*args, **kwargs)
d14a1e28
RD
2728 self.this = newobj.this
2729 self.thisown = 1
2730 del newobj.thisown
d14a1e28
RD
2731
2732class CURHandlerPtr(CURHandler):
2733 def __init__(self, this):
2734 self.this = this
2735 if not hasattr(self,"thisown"): self.thisown = 0
2736 self.__class__ = CURHandler
54f9ee45 2737_core_.CURHandler_swigregister(CURHandlerPtr)
d14a1e28
RD
2738
2739class ANIHandler(CURHandler):
093d3ff1 2740 """Proxy of C++ ANIHandler class"""
e811c8ce
RD
2741 def __repr__(self):
2742 return "<%s.%s; proxy of C++ wxANIHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 2743 def __init__(self, *args, **kwargs):
a95a7133 2744 """__init__(self) -> ANIHandler"""
54f9ee45 2745 newobj = _core_.new_ANIHandler(*args, **kwargs)
d14a1e28
RD
2746 self.this = newobj.this
2747 self.thisown = 1
2748 del newobj.thisown
d14a1e28
RD
2749
2750class ANIHandlerPtr(ANIHandler):
2751 def __init__(self, this):
2752 self.this = this
2753 if not hasattr(self,"thisown"): self.thisown = 0
2754 self.__class__ = ANIHandler
54f9ee45 2755_core_.ANIHandler_swigregister(ANIHandlerPtr)
d14a1e28
RD
2756
2757class PNGHandler(ImageHandler):
093d3ff1 2758 """Proxy of C++ PNGHandler class"""
e811c8ce
RD
2759 def __repr__(self):
2760 return "<%s.%s; proxy of C++ wxPNGHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 2761 def __init__(self, *args, **kwargs):
a95a7133 2762 """__init__(self) -> PNGHandler"""
54f9ee45 2763 newobj = _core_.new_PNGHandler(*args, **kwargs)
d14a1e28
RD
2764 self.this = newobj.this
2765 self.thisown = 1
2766 del newobj.thisown
d14a1e28
RD
2767
2768class PNGHandlerPtr(PNGHandler):
2769 def __init__(self, this):
2770 self.this = this
2771 if not hasattr(self,"thisown"): self.thisown = 0
2772 self.__class__ = PNGHandler
54f9ee45 2773_core_.PNGHandler_swigregister(PNGHandlerPtr)
d14a1e28
RD
2774
2775class GIFHandler(ImageHandler):
093d3ff1 2776 """Proxy of C++ GIFHandler class"""
e811c8ce
RD
2777 def __repr__(self):
2778 return "<%s.%s; proxy of C++ wxGIFHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 2779 def __init__(self, *args, **kwargs):
a95a7133 2780 """__init__(self) -> GIFHandler"""
54f9ee45 2781 newobj = _core_.new_GIFHandler(*args, **kwargs)
d14a1e28
RD
2782 self.this = newobj.this
2783 self.thisown = 1
2784 del newobj.thisown
d14a1e28
RD
2785
2786class GIFHandlerPtr(GIFHandler):
2787 def __init__(self, this):
2788 self.this = this
2789 if not hasattr(self,"thisown"): self.thisown = 0
2790 self.__class__ = GIFHandler
54f9ee45 2791_core_.GIFHandler_swigregister(GIFHandlerPtr)
d14a1e28
RD
2792
2793class PCXHandler(ImageHandler):
093d3ff1 2794 """Proxy of C++ PCXHandler class"""
e811c8ce
RD
2795 def __repr__(self):
2796 return "<%s.%s; proxy of C++ wxPCXHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 2797 def __init__(self, *args, **kwargs):
a95a7133 2798 """__init__(self) -> PCXHandler"""
54f9ee45 2799 newobj = _core_.new_PCXHandler(*args, **kwargs)
d14a1e28
RD
2800 self.this = newobj.this
2801 self.thisown = 1
2802 del newobj.thisown
d14a1e28
RD
2803
2804class PCXHandlerPtr(PCXHandler):
2805 def __init__(self, this):
2806 self.this = this
2807 if not hasattr(self,"thisown"): self.thisown = 0
2808 self.__class__ = PCXHandler
54f9ee45 2809_core_.PCXHandler_swigregister(PCXHandlerPtr)
d14a1e28
RD
2810
2811class JPEGHandler(ImageHandler):
093d3ff1 2812 """Proxy of C++ JPEGHandler class"""
e811c8ce
RD
2813 def __repr__(self):
2814 return "<%s.%s; proxy of C++ wxJPEGHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 2815 def __init__(self, *args, **kwargs):
a95a7133 2816 """__init__(self) -> JPEGHandler"""
54f9ee45 2817 newobj = _core_.new_JPEGHandler(*args, **kwargs)
d14a1e28
RD
2818 self.this = newobj.this
2819 self.thisown = 1
2820 del newobj.thisown
d14a1e28
RD
2821
2822class JPEGHandlerPtr(JPEGHandler):
2823 def __init__(self, this):
2824 self.this = this
2825 if not hasattr(self,"thisown"): self.thisown = 0
2826 self.__class__ = JPEGHandler
54f9ee45 2827_core_.JPEGHandler_swigregister(JPEGHandlerPtr)
d14a1e28
RD
2828
2829class PNMHandler(ImageHandler):
093d3ff1 2830 """Proxy of C++ PNMHandler class"""
e811c8ce
RD
2831 def __repr__(self):
2832 return "<%s.%s; proxy of C++ wxPNMHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 2833 def __init__(self, *args, **kwargs):
a95a7133 2834 """__init__(self) -> PNMHandler"""
54f9ee45 2835 newobj = _core_.new_PNMHandler(*args, **kwargs)
d14a1e28
RD
2836 self.this = newobj.this
2837 self.thisown = 1
2838 del newobj.thisown
d14a1e28
RD
2839
2840class PNMHandlerPtr(PNMHandler):
2841 def __init__(self, this):
2842 self.this = this
2843 if not hasattr(self,"thisown"): self.thisown = 0
2844 self.__class__ = PNMHandler
54f9ee45 2845_core_.PNMHandler_swigregister(PNMHandlerPtr)
d14a1e28
RD
2846
2847class XPMHandler(ImageHandler):
093d3ff1 2848 """Proxy of C++ XPMHandler class"""
e811c8ce
RD
2849 def __repr__(self):
2850 return "<%s.%s; proxy of C++ wxXPMHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 2851 def __init__(self, *args, **kwargs):
a95a7133 2852 """__init__(self) -> XPMHandler"""
54f9ee45 2853 newobj = _core_.new_XPMHandler(*args, **kwargs)
d14a1e28
RD
2854 self.this = newobj.this
2855 self.thisown = 1
2856 del newobj.thisown
d14a1e28
RD
2857
2858class XPMHandlerPtr(XPMHandler):
2859 def __init__(self, this):
2860 self.this = this
2861 if not hasattr(self,"thisown"): self.thisown = 0
2862 self.__class__ = XPMHandler
54f9ee45 2863_core_.XPMHandler_swigregister(XPMHandlerPtr)
d14a1e28
RD
2864
2865class TIFFHandler(ImageHandler):
093d3ff1 2866 """Proxy of C++ TIFFHandler class"""
e811c8ce
RD
2867 def __repr__(self):
2868 return "<%s.%s; proxy of C++ wxTIFFHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 2869 def __init__(self, *args, **kwargs):
a95a7133 2870 """__init__(self) -> TIFFHandler"""
54f9ee45 2871 newobj = _core_.new_TIFFHandler(*args, **kwargs)
d14a1e28
RD
2872 self.this = newobj.this
2873 self.thisown = 1
2874 del newobj.thisown
d14a1e28
RD
2875
2876class TIFFHandlerPtr(TIFFHandler):
2877 def __init__(self, this):
2878 self.this = this
2879 if not hasattr(self,"thisown"): self.thisown = 0
2880 self.__class__ = TIFFHandler
54f9ee45 2881_core_.TIFFHandler_swigregister(TIFFHandlerPtr)
d14a1e28 2882
c0de73ae
RD
2883QUANTIZE_INCLUDE_WINDOWS_COLOURS = _core_.QUANTIZE_INCLUDE_WINDOWS_COLOURS
2884QUANTIZE_FILL_DESTINATION_IMAGE = _core_.QUANTIZE_FILL_DESTINATION_IMAGE
2885class Quantize(object):
2886 """Performs quantization, or colour reduction, on a wxImage."""
2887 def __init__(self): raise RuntimeError, "No constructor defined"
2888 def __repr__(self):
2889 return "<%s.%s; proxy of C++ wxQuantize instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
2890 def Quantize(*args, **kwargs):
2891 """
2892 Quantize(Image src, Image dest, int desiredNoColours=236, int flags=wxQUANTIZE_INCLUDE_WINDOWS_COLOURS|wxQUANTIZE_FILL_DESTINATION_IMAGE) -> bool
2893
2894 Reduce the colours in the source image and put the result into the
2895 destination image, setting the palette in the destination if
2896 needed. Both images may be the same, to overwrite the source image.
2897 """
2898 return _core_.Quantize_Quantize(*args, **kwargs)
2899
2900 Quantize = staticmethod(Quantize)
2901
2902class QuantizePtr(Quantize):
2903 def __init__(self, this):
2904 self.this = this
2905 if not hasattr(self,"thisown"): self.thisown = 0
2906 self.__class__ = Quantize
2907_core_.Quantize_swigregister(QuantizePtr)
2908
2909def Quantize_Quantize(*args, **kwargs):
2910 """
2911 Quantize_Quantize(Image src, Image dest, int desiredNoColours=236, int flags=wxQUANTIZE_INCLUDE_WINDOWS_COLOURS|wxQUANTIZE_FILL_DESTINATION_IMAGE) -> bool
2912
2913 Reduce the colours in the source image and put the result into the
2914 destination image, setting the palette in the destination if
2915 needed. Both images may be the same, to overwrite the source image.
2916 """
2917 return _core_.Quantize_Quantize(*args, **kwargs)
2918
d14a1e28
RD
2919#---------------------------------------------------------------------------
2920
2921class EvtHandler(Object):
093d3ff1 2922 """Proxy of C++ EvtHandler class"""
e811c8ce
RD
2923 def __repr__(self):
2924 return "<%s.%s; proxy of C++ wxEvtHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 2925 def __init__(self, *args, **kwargs):
a95a7133 2926 """__init__(self) -> EvtHandler"""
54f9ee45 2927 newobj = _core_.new_EvtHandler(*args, **kwargs)
d14a1e28
RD
2928 self.this = newobj.this
2929 self.thisown = 1
2930 del newobj.thisown
e811c8ce 2931 def GetNextHandler(*args, **kwargs):
a95a7133 2932 """GetNextHandler(self) -> EvtHandler"""
54f9ee45 2933 return _core_.EvtHandler_GetNextHandler(*args, **kwargs)
e811c8ce
RD
2934
2935 def GetPreviousHandler(*args, **kwargs):
a95a7133 2936 """GetPreviousHandler(self) -> EvtHandler"""
54f9ee45 2937 return _core_.EvtHandler_GetPreviousHandler(*args, **kwargs)
e811c8ce
RD
2938
2939 def SetNextHandler(*args, **kwargs):
a95a7133 2940 """SetNextHandler(self, EvtHandler handler)"""
54f9ee45 2941 return _core_.EvtHandler_SetNextHandler(*args, **kwargs)
e811c8ce
RD
2942
2943 def SetPreviousHandler(*args, **kwargs):
a95a7133 2944 """SetPreviousHandler(self, EvtHandler handler)"""
54f9ee45 2945 return _core_.EvtHandler_SetPreviousHandler(*args, **kwargs)
e811c8ce
RD
2946
2947 def GetEvtHandlerEnabled(*args, **kwargs):
a95a7133 2948 """GetEvtHandlerEnabled(self) -> bool"""
54f9ee45 2949 return _core_.EvtHandler_GetEvtHandlerEnabled(*args, **kwargs)
e811c8ce
RD
2950
2951 def SetEvtHandlerEnabled(*args, **kwargs):
a95a7133 2952 """SetEvtHandlerEnabled(self, bool enabled)"""
54f9ee45 2953 return _core_.EvtHandler_SetEvtHandlerEnabled(*args, **kwargs)
e811c8ce
RD
2954
2955 def ProcessEvent(*args, **kwargs):
a95a7133 2956 """ProcessEvent(self, Event event) -> bool"""
54f9ee45 2957 return _core_.EvtHandler_ProcessEvent(*args, **kwargs)
e811c8ce
RD
2958
2959 def AddPendingEvent(*args, **kwargs):
a95a7133 2960 """AddPendingEvent(self, Event event)"""
54f9ee45 2961 return _core_.EvtHandler_AddPendingEvent(*args, **kwargs)
e811c8ce
RD
2962
2963 def ProcessPendingEvents(*args, **kwargs):
a95a7133 2964 """ProcessPendingEvents(self)"""
54f9ee45 2965 return _core_.EvtHandler_ProcessPendingEvents(*args, **kwargs)
e811c8ce
RD
2966
2967 def Connect(*args, **kwargs):
a95a7133 2968 """Connect(self, int id, int lastId, int eventType, PyObject func)"""
54f9ee45 2969 return _core_.EvtHandler_Connect(*args, **kwargs)
e811c8ce
RD
2970
2971 def Disconnect(*args, **kwargs):
a95a7133 2972 """Disconnect(self, int id, int lastId=-1, wxEventType eventType=wxEVT_NULL) -> bool"""
54f9ee45 2973 return _core_.EvtHandler_Disconnect(*args, **kwargs)
e811c8ce
RD
2974
2975 def _setOORInfo(*args, **kwargs):
689b42ee 2976 """_setOORInfo(self, PyObject _self, bool incref=True)"""
54f9ee45 2977 return _core_.EvtHandler__setOORInfo(*args, **kwargs)
e811c8ce 2978
d14a1e28
RD
2979 def Bind(self, event, handler, source=None, id=wx.ID_ANY, id2=wx.ID_ANY):
2980 """
2981 Bind an event to an event handler.
2982
db3e571a
RD
2983 :param event: One of the EVT_* objects that specifies the
2984 type of event to bind,
d14a1e28 2985
db3e571a
RD
2986 :param handler: A callable object to be invoked when the
2987 event is delivered to self. Pass None to
2988 disconnect an event handler.
d14a1e28 2989
db3e571a
RD
2990 :param source: Sometimes the event originates from a
2991 different window than self, but you still
2992 want to catch it in self. (For example, a
2993 button event delivered to a frame.) By
2994 passing the source of the event, the event
2995 handling system is able to differentiate
2996 between the same event type from different
2997 controls.
d14a1e28 2998
db3e571a
RD
2999 :param id: Used to spcify the event source by ID instead
3000 of instance.
3001
3002 :param id2: Used when it is desirable to bind a handler
3003 to a range of IDs, such as with EVT_MENU_RANGE.
d14a1e28
RD
3004 """
3005 if source is not None:
3006 id = source.GetId()
3007 event.Bind(self, id, id2, handler)
3008
66c033b4
RD
3009 def Unbind(self, event, source=None, id=wx.ID_ANY, id2=wx.ID_ANY):
3010 """
3011 Disconencts the event handler binding for event from self.
3012 Returns True if successful.
3013 """
3014 if source is not None:
3015 id = source.GetId()
3016 return event.Unbind(self, id, id2)
d14a1e28 3017
d14a1e28
RD
3018
3019class EvtHandlerPtr(EvtHandler):
3020 def __init__(self, this):
3021 self.this = this
3022 if not hasattr(self,"thisown"): self.thisown = 0
3023 self.__class__ = EvtHandler
54f9ee45 3024_core_.EvtHandler_swigregister(EvtHandlerPtr)
d14a1e28
RD
3025
3026#---------------------------------------------------------------------------
3027
3028class PyEventBinder(object):
3029 """
3030 Instances of this class are used to bind specific events to event
3031 handlers.
3032 """
3033 def __init__(self, evtType, expectedIDs=0):
3034 if expectedIDs not in [0, 1, 2]:
3035 raise ValueError, "Invalid number of expectedIDs"
3036 self.expectedIDs = expectedIDs
3037
3038 if type(evtType) == list or type(evtType) == tuple:
3039 self.evtType = evtType
3040 else:
3041 self.evtType = [evtType]
3042
3043
3044 def Bind(self, target, id1, id2, function):
3045 """Bind this set of event types to target."""
3046 for et in self.evtType:
3047 target.Connect(id1, id2, et, function)
3048
66c033b4
RD
3049
3050 def Unbind(self, target, id1, id2):
3051 """Remove an event binding."""
3052 success = 0
3053 for et in self.evtType:
3054 success += target.Disconnect(id1, id2, et)
3055 return success != 0
3056
d14a1e28
RD
3057
3058 def __call__(self, *args):
3059 """
3060 For backwards compatibility with the old EVT_* functions.
3061 Should be called with either (window, func), (window, ID,
3062 func) or (window, ID1, ID2, func) parameters depending on the
3063 type of the event.
3064 """
3065 assert len(args) == 2 + self.expectedIDs
3066 id1 = wx.ID_ANY
3067 id2 = wx.ID_ANY
3068 target = args[0]
3069 if self.expectedIDs == 0:
3070 func = args[1]
3071 elif self.expectedIDs == 1:
3072 id1 = args[1]
3073 func = args[2]
3074 elif self.expectedIDs == 2:
3075 id1 = args[1]
3076 id2 = args[2]
3077 func = args[3]
3078 else:
3079 raise ValueError, "Unexpected number of IDs"
3080
3081 self.Bind(target, id1, id2, func)
3082
3083
3084# These two are square pegs that don't fit the PyEventBinder hole...
3085def EVT_COMMAND(win, id, cmd, func):
3086 win.Connect(id, -1, cmd, func)
3087def EVT_COMMAND_RANGE(win, id1, id2, cmd, func):
3088 win.Connect(id1, id2, cmd, func)
3089
3090
3091#---------------------------------------------------------------------------
3092
3093#---------------------------------------------------------------------------
3094
54f9ee45
RD
3095EVENT_PROPAGATE_NONE = _core_.EVENT_PROPAGATE_NONE
3096EVENT_PROPAGATE_MAX = _core_.EVENT_PROPAGATE_MAX
d14a1e28 3097
e811c8ce
RD
3098def NewEventType(*args, **kwargs):
3099 """NewEventType() -> wxEventType"""
54f9ee45
RD
3100 return _core_.NewEventType(*args, **kwargs)
3101wxEVT_NULL = _core_.wxEVT_NULL
3102wxEVT_FIRST = _core_.wxEVT_FIRST
3103wxEVT_USER_FIRST = _core_.wxEVT_USER_FIRST
3104wxEVT_COMMAND_BUTTON_CLICKED = _core_.wxEVT_COMMAND_BUTTON_CLICKED
3105wxEVT_COMMAND_CHECKBOX_CLICKED = _core_.wxEVT_COMMAND_CHECKBOX_CLICKED
3106wxEVT_COMMAND_CHOICE_SELECTED = _core_.wxEVT_COMMAND_CHOICE_SELECTED
3107wxEVT_COMMAND_LISTBOX_SELECTED = _core_.wxEVT_COMMAND_LISTBOX_SELECTED
3108wxEVT_COMMAND_LISTBOX_DOUBLECLICKED = _core_.wxEVT_COMMAND_LISTBOX_DOUBLECLICKED
3109wxEVT_COMMAND_CHECKLISTBOX_TOGGLED = _core_.wxEVT_COMMAND_CHECKLISTBOX_TOGGLED
3110wxEVT_COMMAND_MENU_SELECTED = _core_.wxEVT_COMMAND_MENU_SELECTED
3111wxEVT_COMMAND_TOOL_CLICKED = _core_.wxEVT_COMMAND_TOOL_CLICKED
3112wxEVT_COMMAND_SLIDER_UPDATED = _core_.wxEVT_COMMAND_SLIDER_UPDATED
3113wxEVT_COMMAND_RADIOBOX_SELECTED = _core_.wxEVT_COMMAND_RADIOBOX_SELECTED
3114wxEVT_COMMAND_RADIOBUTTON_SELECTED = _core_.wxEVT_COMMAND_RADIOBUTTON_SELECTED
3115wxEVT_COMMAND_SCROLLBAR_UPDATED = _core_.wxEVT_COMMAND_SCROLLBAR_UPDATED
3116wxEVT_COMMAND_VLBOX_SELECTED = _core_.wxEVT_COMMAND_VLBOX_SELECTED
3117wxEVT_COMMAND_COMBOBOX_SELECTED = _core_.wxEVT_COMMAND_COMBOBOX_SELECTED
3118wxEVT_COMMAND_TOOL_RCLICKED = _core_.wxEVT_COMMAND_TOOL_RCLICKED
3119wxEVT_COMMAND_TOOL_ENTER = _core_.wxEVT_COMMAND_TOOL_ENTER
3120wxEVT_LEFT_DOWN = _core_.wxEVT_LEFT_DOWN
3121wxEVT_LEFT_UP = _core_.wxEVT_LEFT_UP
3122wxEVT_MIDDLE_DOWN = _core_.wxEVT_MIDDLE_DOWN
3123wxEVT_MIDDLE_UP = _core_.wxEVT_MIDDLE_UP
3124wxEVT_RIGHT_DOWN = _core_.wxEVT_RIGHT_DOWN
3125wxEVT_RIGHT_UP = _core_.wxEVT_RIGHT_UP
3126wxEVT_MOTION = _core_.wxEVT_MOTION
3127wxEVT_ENTER_WINDOW = _core_.wxEVT_ENTER_WINDOW
3128wxEVT_LEAVE_WINDOW = _core_.wxEVT_LEAVE_WINDOW
3129wxEVT_LEFT_DCLICK = _core_.wxEVT_LEFT_DCLICK
3130wxEVT_MIDDLE_DCLICK = _core_.wxEVT_MIDDLE_DCLICK
3131wxEVT_RIGHT_DCLICK = _core_.wxEVT_RIGHT_DCLICK
3132wxEVT_SET_FOCUS = _core_.wxEVT_SET_FOCUS
3133wxEVT_KILL_FOCUS = _core_.wxEVT_KILL_FOCUS
3134wxEVT_CHILD_FOCUS = _core_.wxEVT_CHILD_FOCUS
3135wxEVT_MOUSEWHEEL = _core_.wxEVT_MOUSEWHEEL
3136wxEVT_NC_LEFT_DOWN = _core_.wxEVT_NC_LEFT_DOWN
3137wxEVT_NC_LEFT_UP = _core_.wxEVT_NC_LEFT_UP
3138wxEVT_NC_MIDDLE_DOWN = _core_.wxEVT_NC_MIDDLE_DOWN
3139wxEVT_NC_MIDDLE_UP = _core_.wxEVT_NC_MIDDLE_UP
3140wxEVT_NC_RIGHT_DOWN = _core_.wxEVT_NC_RIGHT_DOWN
3141wxEVT_NC_RIGHT_UP = _core_.wxEVT_NC_RIGHT_UP
3142wxEVT_NC_MOTION = _core_.wxEVT_NC_MOTION
3143wxEVT_NC_ENTER_WINDOW = _core_.wxEVT_NC_ENTER_WINDOW
3144wxEVT_NC_LEAVE_WINDOW = _core_.wxEVT_NC_LEAVE_WINDOW
3145wxEVT_NC_LEFT_DCLICK = _core_.wxEVT_NC_LEFT_DCLICK
3146wxEVT_NC_MIDDLE_DCLICK = _core_.wxEVT_NC_MIDDLE_DCLICK
3147wxEVT_NC_RIGHT_DCLICK = _core_.wxEVT_NC_RIGHT_DCLICK
3148wxEVT_CHAR = _core_.wxEVT_CHAR
3149wxEVT_CHAR_HOOK = _core_.wxEVT_CHAR_HOOK
3150wxEVT_NAVIGATION_KEY = _core_.wxEVT_NAVIGATION_KEY
3151wxEVT_KEY_DOWN = _core_.wxEVT_KEY_DOWN
3152wxEVT_KEY_UP = _core_.wxEVT_KEY_UP
3153wxEVT_HOTKEY = _core_.wxEVT_HOTKEY
3154wxEVT_SET_CURSOR = _core_.wxEVT_SET_CURSOR
3155wxEVT_SCROLL_TOP = _core_.wxEVT_SCROLL_TOP
3156wxEVT_SCROLL_BOTTOM = _core_.wxEVT_SCROLL_BOTTOM
3157wxEVT_SCROLL_LINEUP = _core_.wxEVT_SCROLL_LINEUP
3158wxEVT_SCROLL_LINEDOWN = _core_.wxEVT_SCROLL_LINEDOWN
3159wxEVT_SCROLL_PAGEUP = _core_.wxEVT_SCROLL_PAGEUP
3160wxEVT_SCROLL_PAGEDOWN = _core_.wxEVT_SCROLL_PAGEDOWN
3161wxEVT_SCROLL_THUMBTRACK = _core_.wxEVT_SCROLL_THUMBTRACK
3162wxEVT_SCROLL_THUMBRELEASE = _core_.wxEVT_SCROLL_THUMBRELEASE
3163wxEVT_SCROLL_ENDSCROLL = _core_.wxEVT_SCROLL_ENDSCROLL
3164wxEVT_SCROLLWIN_TOP = _core_.wxEVT_SCROLLWIN_TOP
3165wxEVT_SCROLLWIN_BOTTOM = _core_.wxEVT_SCROLLWIN_BOTTOM
3166wxEVT_SCROLLWIN_LINEUP = _core_.wxEVT_SCROLLWIN_LINEUP
3167wxEVT_SCROLLWIN_LINEDOWN = _core_.wxEVT_SCROLLWIN_LINEDOWN
3168wxEVT_SCROLLWIN_PAGEUP = _core_.wxEVT_SCROLLWIN_PAGEUP
3169wxEVT_SCROLLWIN_PAGEDOWN = _core_.wxEVT_SCROLLWIN_PAGEDOWN
3170wxEVT_SCROLLWIN_THUMBTRACK = _core_.wxEVT_SCROLLWIN_THUMBTRACK
3171wxEVT_SCROLLWIN_THUMBRELEASE = _core_.wxEVT_SCROLLWIN_THUMBRELEASE
3172wxEVT_SIZE = _core_.wxEVT_SIZE
3173wxEVT_MOVE = _core_.wxEVT_MOVE
3174wxEVT_CLOSE_WINDOW = _core_.wxEVT_CLOSE_WINDOW
3175wxEVT_END_SESSION = _core_.wxEVT_END_SESSION
3176wxEVT_QUERY_END_SESSION = _core_.wxEVT_QUERY_END_SESSION
3177wxEVT_ACTIVATE_APP = _core_.wxEVT_ACTIVATE_APP
3178wxEVT_POWER = _core_.wxEVT_POWER
3179wxEVT_ACTIVATE = _core_.wxEVT_ACTIVATE
3180wxEVT_CREATE = _core_.wxEVT_CREATE
3181wxEVT_DESTROY = _core_.wxEVT_DESTROY
3182wxEVT_SHOW = _core_.wxEVT_SHOW
3183wxEVT_ICONIZE = _core_.wxEVT_ICONIZE
3184wxEVT_MAXIMIZE = _core_.wxEVT_MAXIMIZE
3185wxEVT_MOUSE_CAPTURE_CHANGED = _core_.wxEVT_MOUSE_CAPTURE_CHANGED
3186wxEVT_PAINT = _core_.wxEVT_PAINT
3187wxEVT_ERASE_BACKGROUND = _core_.wxEVT_ERASE_BACKGROUND
3188wxEVT_NC_PAINT = _core_.wxEVT_NC_PAINT
3189wxEVT_PAINT_ICON = _core_.wxEVT_PAINT_ICON
3190wxEVT_MENU_OPEN = _core_.wxEVT_MENU_OPEN
3191wxEVT_MENU_CLOSE = _core_.wxEVT_MENU_CLOSE
3192wxEVT_MENU_HIGHLIGHT = _core_.wxEVT_MENU_HIGHLIGHT
3193wxEVT_CONTEXT_MENU = _core_.wxEVT_CONTEXT_MENU
3194wxEVT_SYS_COLOUR_CHANGED = _core_.wxEVT_SYS_COLOUR_CHANGED
3195wxEVT_DISPLAY_CHANGED = _core_.wxEVT_DISPLAY_CHANGED
3196wxEVT_SETTING_CHANGED = _core_.wxEVT_SETTING_CHANGED
3197wxEVT_QUERY_NEW_PALETTE = _core_.wxEVT_QUERY_NEW_PALETTE
3198wxEVT_PALETTE_CHANGED = _core_.wxEVT_PALETTE_CHANGED
3199wxEVT_DROP_FILES = _core_.wxEVT_DROP_FILES
3200wxEVT_DRAW_ITEM = _core_.wxEVT_DRAW_ITEM
3201wxEVT_MEASURE_ITEM = _core_.wxEVT_MEASURE_ITEM
3202wxEVT_COMPARE_ITEM = _core_.wxEVT_COMPARE_ITEM
3203wxEVT_INIT_DIALOG = _core_.wxEVT_INIT_DIALOG
3204wxEVT_IDLE = _core_.wxEVT_IDLE
3205wxEVT_UPDATE_UI = _core_.wxEVT_UPDATE_UI
3206wxEVT_SIZING = _core_.wxEVT_SIZING
3207wxEVT_MOVING = _core_.wxEVT_MOVING
88c6b281 3208wxEVT_HIBERNATE = _core_.wxEVT_HIBERNATE
54f9ee45
RD
3209wxEVT_COMMAND_LEFT_CLICK = _core_.wxEVT_COMMAND_LEFT_CLICK
3210wxEVT_COMMAND_LEFT_DCLICK = _core_.wxEVT_COMMAND_LEFT_DCLICK
3211wxEVT_COMMAND_RIGHT_CLICK = _core_.wxEVT_COMMAND_RIGHT_CLICK
3212wxEVT_COMMAND_RIGHT_DCLICK = _core_.wxEVT_COMMAND_RIGHT_DCLICK
3213wxEVT_COMMAND_SET_FOCUS = _core_.wxEVT_COMMAND_SET_FOCUS
3214wxEVT_COMMAND_KILL_FOCUS = _core_.wxEVT_COMMAND_KILL_FOCUS
3215wxEVT_COMMAND_ENTER = _core_.wxEVT_COMMAND_ENTER
d14a1e28
RD
3216#
3217# Create some event binders
3218EVT_SIZE = wx.PyEventBinder( wxEVT_SIZE )
3219EVT_SIZING = wx.PyEventBinder( wxEVT_SIZING )
3220EVT_MOVE = wx.PyEventBinder( wxEVT_MOVE )
3221EVT_MOVING = wx.PyEventBinder( wxEVT_MOVING )
3222EVT_CLOSE = wx.PyEventBinder( wxEVT_CLOSE_WINDOW )
3223EVT_END_SESSION = wx.PyEventBinder( wxEVT_END_SESSION )
3224EVT_QUERY_END_SESSION = wx.PyEventBinder( wxEVT_QUERY_END_SESSION )
3225EVT_PAINT = wx.PyEventBinder( wxEVT_PAINT )
3226EVT_NC_PAINT = wx.PyEventBinder( wxEVT_NC_PAINT )
3227EVT_ERASE_BACKGROUND = wx.PyEventBinder( wxEVT_ERASE_BACKGROUND )
3228EVT_CHAR = wx.PyEventBinder( wxEVT_CHAR )
3229EVT_KEY_DOWN = wx.PyEventBinder( wxEVT_KEY_DOWN )
3230EVT_KEY_UP = wx.PyEventBinder( wxEVT_KEY_UP )
3231EVT_HOTKEY = wx.PyEventBinder( wxEVT_HOTKEY, 1)
3232EVT_CHAR_HOOK = wx.PyEventBinder( wxEVT_CHAR_HOOK )
3233EVT_MENU_OPEN = wx.PyEventBinder( wxEVT_MENU_OPEN )
3234EVT_MENU_CLOSE = wx.PyEventBinder( wxEVT_MENU_CLOSE )
3235EVT_MENU_HIGHLIGHT = wx.PyEventBinder( wxEVT_MENU_HIGHLIGHT, 1)
3236EVT_MENU_HIGHLIGHT_ALL = wx.PyEventBinder( wxEVT_MENU_HIGHLIGHT )
3237EVT_SET_FOCUS = wx.PyEventBinder( wxEVT_SET_FOCUS )
3238EVT_KILL_FOCUS = wx.PyEventBinder( wxEVT_KILL_FOCUS )
3239EVT_CHILD_FOCUS = wx.PyEventBinder( wxEVT_CHILD_FOCUS )
3240EVT_ACTIVATE = wx.PyEventBinder( wxEVT_ACTIVATE )
3241EVT_ACTIVATE_APP = wx.PyEventBinder( wxEVT_ACTIVATE_APP )
88c6b281 3242EVT_HIBERNATE = wx.PyEventBinder( wxEVT_HIBERNATE )
d14a1e28
RD
3243EVT_END_SESSION = wx.PyEventBinder( wxEVT_END_SESSION )
3244EVT_QUERY_END_SESSION = wx.PyEventBinder( wxEVT_QUERY_END_SESSION )
3245EVT_DROP_FILES = wx.PyEventBinder( wxEVT_DROP_FILES )
3246EVT_INIT_DIALOG = wx.PyEventBinder( wxEVT_INIT_DIALOG )
3247EVT_SYS_COLOUR_CHANGED = wx.PyEventBinder( wxEVT_SYS_COLOUR_CHANGED )
3248EVT_DISPLAY_CHANGED = wx.PyEventBinder( wxEVT_DISPLAY_CHANGED )
3249EVT_SHOW = wx.PyEventBinder( wxEVT_SHOW )
3250EVT_MAXIMIZE = wx.PyEventBinder( wxEVT_MAXIMIZE )
3251EVT_ICONIZE = wx.PyEventBinder( wxEVT_ICONIZE )
3252EVT_NAVIGATION_KEY = wx.PyEventBinder( wxEVT_NAVIGATION_KEY )
3253EVT_PALETTE_CHANGED = wx.PyEventBinder( wxEVT_PALETTE_CHANGED )
3254EVT_QUERY_NEW_PALETTE = wx.PyEventBinder( wxEVT_QUERY_NEW_PALETTE )
3255EVT_WINDOW_CREATE = wx.PyEventBinder( wxEVT_CREATE )
3256EVT_WINDOW_DESTROY = wx.PyEventBinder( wxEVT_DESTROY )
3257EVT_SET_CURSOR = wx.PyEventBinder( wxEVT_SET_CURSOR )
3258EVT_MOUSE_CAPTURE_CHANGED = wx.PyEventBinder( wxEVT_MOUSE_CAPTURE_CHANGED )
3259
3260EVT_LEFT_DOWN = wx.PyEventBinder( wxEVT_LEFT_DOWN )
3261EVT_LEFT_UP = wx.PyEventBinder( wxEVT_LEFT_UP )
3262EVT_MIDDLE_DOWN = wx.PyEventBinder( wxEVT_MIDDLE_DOWN )
3263EVT_MIDDLE_UP = wx.PyEventBinder( wxEVT_MIDDLE_UP )
3264EVT_RIGHT_DOWN = wx.PyEventBinder( wxEVT_RIGHT_DOWN )
3265EVT_RIGHT_UP = wx.PyEventBinder( wxEVT_RIGHT_UP )
3266EVT_MOTION = wx.PyEventBinder( wxEVT_MOTION )
3267EVT_LEFT_DCLICK = wx.PyEventBinder( wxEVT_LEFT_DCLICK )
3268EVT_MIDDLE_DCLICK = wx.PyEventBinder( wxEVT_MIDDLE_DCLICK )
3269EVT_RIGHT_DCLICK = wx.PyEventBinder( wxEVT_RIGHT_DCLICK )
3270EVT_LEAVE_WINDOW = wx.PyEventBinder( wxEVT_LEAVE_WINDOW )
3271EVT_ENTER_WINDOW = wx.PyEventBinder( wxEVT_ENTER_WINDOW )
3272EVT_MOUSEWHEEL = wx.PyEventBinder( wxEVT_MOUSEWHEEL )
3273
3274EVT_MOUSE_EVENTS = wx.PyEventBinder([ wxEVT_LEFT_DOWN,
3275 wxEVT_LEFT_UP,
3276 wxEVT_MIDDLE_DOWN,
3277 wxEVT_MIDDLE_UP,
3278 wxEVT_RIGHT_DOWN,
3279 wxEVT_RIGHT_UP,
3280 wxEVT_MOTION,
3281 wxEVT_LEFT_DCLICK,
3282 wxEVT_MIDDLE_DCLICK,
3283 wxEVT_RIGHT_DCLICK,
3284 wxEVT_ENTER_WINDOW,
3285 wxEVT_LEAVE_WINDOW,
3286 wxEVT_MOUSEWHEEL
3287 ])
3288
3289
3290# Scrolling from wxWindow (sent to wxScrolledWindow)
3291EVT_SCROLLWIN = wx.PyEventBinder([ wxEVT_SCROLLWIN_TOP,
3292 wxEVT_SCROLLWIN_BOTTOM,
3293 wxEVT_SCROLLWIN_LINEUP,
3294 wxEVT_SCROLLWIN_LINEDOWN,
3295 wxEVT_SCROLLWIN_PAGEUP,
3296 wxEVT_SCROLLWIN_PAGEDOWN,
3297 wxEVT_SCROLLWIN_THUMBTRACK,
3298 wxEVT_SCROLLWIN_THUMBRELEASE,
3299 ])
3300
3301EVT_SCROLLWIN_TOP = wx.PyEventBinder( wxEVT_SCROLLWIN_TOP )
3302EVT_SCROLLWIN_BOTTOM = wx.PyEventBinder( wxEVT_SCROLLWIN_BOTTOM )
3303EVT_SCROLLWIN_LINEUP = wx.PyEventBinder( wxEVT_SCROLLWIN_LINEUP )
3304EVT_SCROLLWIN_LINEDOWN = wx.PyEventBinder( wxEVT_SCROLLWIN_LINEDOWN )
3305EVT_SCROLLWIN_PAGEUP = wx.PyEventBinder( wxEVT_SCROLLWIN_PAGEUP )
3306EVT_SCROLLWIN_PAGEDOWN = wx.PyEventBinder( wxEVT_SCROLLWIN_PAGEDOWN )
3307EVT_SCROLLWIN_THUMBTRACK = wx.PyEventBinder( wxEVT_SCROLLWIN_THUMBTRACK )
3308EVT_SCROLLWIN_THUMBRELEASE = wx.PyEventBinder( wxEVT_SCROLLWIN_THUMBRELEASE )
3309
3310# Scrolling from wxSlider and wxScrollBar
3311EVT_SCROLL = wx.PyEventBinder([ wxEVT_SCROLL_TOP,
3312 wxEVT_SCROLL_BOTTOM,
3313 wxEVT_SCROLL_LINEUP,
3314 wxEVT_SCROLL_LINEDOWN,
3315 wxEVT_SCROLL_PAGEUP,
3316 wxEVT_SCROLL_PAGEDOWN,
3317 wxEVT_SCROLL_THUMBTRACK,
3318 wxEVT_SCROLL_THUMBRELEASE,
3319 wxEVT_SCROLL_ENDSCROLL,
3320 ])
3321
3322EVT_SCROLL_TOP = wx.PyEventBinder( wxEVT_SCROLL_TOP )
3323EVT_SCROLL_BOTTOM = wx.PyEventBinder( wxEVT_SCROLL_BOTTOM )
3324EVT_SCROLL_LINEUP = wx.PyEventBinder( wxEVT_SCROLL_LINEUP )
3325EVT_SCROLL_LINEDOWN = wx.PyEventBinder( wxEVT_SCROLL_LINEDOWN )
3326EVT_SCROLL_PAGEUP = wx.PyEventBinder( wxEVT_SCROLL_PAGEUP )
3327EVT_SCROLL_PAGEDOWN = wx.PyEventBinder( wxEVT_SCROLL_PAGEDOWN )
3328EVT_SCROLL_THUMBTRACK = wx.PyEventBinder( wxEVT_SCROLL_THUMBTRACK )
3329EVT_SCROLL_THUMBRELEASE = wx.PyEventBinder( wxEVT_SCROLL_THUMBRELEASE )
3330EVT_SCROLL_ENDSCROLL = wx.PyEventBinder( wxEVT_SCROLL_ENDSCROLL )
3331
3332# Scrolling from wxSlider and wxScrollBar, with an id
3333EVT_COMMAND_SCROLL = wx.PyEventBinder([ wxEVT_SCROLL_TOP,
3334 wxEVT_SCROLL_BOTTOM,
3335 wxEVT_SCROLL_LINEUP,
3336 wxEVT_SCROLL_LINEDOWN,
3337 wxEVT_SCROLL_PAGEUP,
3338 wxEVT_SCROLL_PAGEDOWN,
3339 wxEVT_SCROLL_THUMBTRACK,
3340 wxEVT_SCROLL_THUMBRELEASE,
3341 wxEVT_SCROLL_ENDSCROLL,
3342 ], 1)
3343
3344EVT_COMMAND_SCROLL_TOP = wx.PyEventBinder( wxEVT_SCROLL_TOP, 1)
3345EVT_COMMAND_SCROLL_BOTTOM = wx.PyEventBinder( wxEVT_SCROLL_BOTTOM, 1)
3346EVT_COMMAND_SCROLL_LINEUP = wx.PyEventBinder( wxEVT_SCROLL_LINEUP, 1)
3347EVT_COMMAND_SCROLL_LINEDOWN = wx.PyEventBinder( wxEVT_SCROLL_LINEDOWN, 1)
3348EVT_COMMAND_SCROLL_PAGEUP = wx.PyEventBinder( wxEVT_SCROLL_PAGEUP, 1)
3349EVT_COMMAND_SCROLL_PAGEDOWN = wx.PyEventBinder( wxEVT_SCROLL_PAGEDOWN, 1)
3350EVT_COMMAND_SCROLL_THUMBTRACK = wx.PyEventBinder( wxEVT_SCROLL_THUMBTRACK, 1)
3351EVT_COMMAND_SCROLL_THUMBRELEASE = wx.PyEventBinder( wxEVT_SCROLL_THUMBRELEASE, 1)
3352EVT_COMMAND_SCROLL_ENDSCROLL = wx.PyEventBinder( wxEVT_SCROLL_ENDSCROLL, 1)
3353
d14a1e28
RD
3354EVT_BUTTON = wx.PyEventBinder( wxEVT_COMMAND_BUTTON_CLICKED, 1)
3355EVT_CHECKBOX = wx.PyEventBinder( wxEVT_COMMAND_CHECKBOX_CLICKED, 1)
3356EVT_CHOICE = wx.PyEventBinder( wxEVT_COMMAND_CHOICE_SELECTED, 1)
3357EVT_LISTBOX = wx.PyEventBinder( wxEVT_COMMAND_LISTBOX_SELECTED, 1)
3358EVT_LISTBOX_DCLICK = wx.PyEventBinder( wxEVT_COMMAND_LISTBOX_DOUBLECLICKED, 1)
3359EVT_MENU = wx.PyEventBinder( wxEVT_COMMAND_MENU_SELECTED, 1)
3360EVT_MENU_RANGE = wx.PyEventBinder( wxEVT_COMMAND_MENU_SELECTED, 2)
3361EVT_SLIDER = wx.PyEventBinder( wxEVT_COMMAND_SLIDER_UPDATED, 1)
3362EVT_RADIOBOX = wx.PyEventBinder( wxEVT_COMMAND_RADIOBOX_SELECTED, 1)
3363EVT_RADIOBUTTON = wx.PyEventBinder( wxEVT_COMMAND_RADIOBUTTON_SELECTED, 1)
3364
3365EVT_SCROLLBAR = wx.PyEventBinder( wxEVT_COMMAND_SCROLLBAR_UPDATED, 1)
3366EVT_VLBOX = wx.PyEventBinder( wxEVT_COMMAND_VLBOX_SELECTED, 1)
3367EVT_COMBOBOX = wx.PyEventBinder( wxEVT_COMMAND_COMBOBOX_SELECTED, 1)
3368EVT_TOOL = wx.PyEventBinder( wxEVT_COMMAND_TOOL_CLICKED, 1)
3369EVT_TOOL_RANGE = wx.PyEventBinder( wxEVT_COMMAND_TOOL_CLICKED, 2)
3370EVT_TOOL_RCLICKED = wx.PyEventBinder( wxEVT_COMMAND_TOOL_RCLICKED, 1)
3371EVT_TOOL_RCLICKED_RANGE = wx.PyEventBinder( wxEVT_COMMAND_TOOL_RCLICKED, 2)
3372EVT_TOOL_ENTER = wx.PyEventBinder( wxEVT_COMMAND_TOOL_ENTER, 1)
3373EVT_CHECKLISTBOX = wx.PyEventBinder( wxEVT_COMMAND_CHECKLISTBOX_TOGGLED, 1)
3374
3375
3376EVT_COMMAND_LEFT_CLICK = wx.PyEventBinder( wxEVT_COMMAND_LEFT_CLICK, 1)
3377EVT_COMMAND_LEFT_DCLICK = wx.PyEventBinder( wxEVT_COMMAND_LEFT_DCLICK, 1)
3378EVT_COMMAND_RIGHT_CLICK = wx.PyEventBinder( wxEVT_COMMAND_RIGHT_CLICK, 1)
3379EVT_COMMAND_RIGHT_DCLICK = wx.PyEventBinder( wxEVT_COMMAND_RIGHT_DCLICK, 1)
3380EVT_COMMAND_SET_FOCUS = wx.PyEventBinder( wxEVT_COMMAND_SET_FOCUS, 1)
3381EVT_COMMAND_KILL_FOCUS = wx.PyEventBinder( wxEVT_COMMAND_KILL_FOCUS, 1)
3382EVT_COMMAND_ENTER = wx.PyEventBinder( wxEVT_COMMAND_ENTER, 1)
3383
3384EVT_IDLE = wx.PyEventBinder( wxEVT_IDLE )
3385
3386EVT_UPDATE_UI = wx.PyEventBinder( wxEVT_UPDATE_UI, 1)
3387EVT_UPDATE_UI_RANGE = wx.PyEventBinder( wxEVT_UPDATE_UI, 2)
3388
3389EVT_CONTEXT_MENU = wx.PyEventBinder( wxEVT_CONTEXT_MENU )
3390
3391
3392
3393#---------------------------------------------------------------------------
3394
3395class Event(Object):
093d3ff1 3396 """Proxy of C++ Event class"""
e811c8ce
RD
3397 def __init__(self): raise RuntimeError, "No constructor defined"
3398 def __repr__(self):
3399 return "<%s.%s; proxy of C++ wxEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
54f9ee45 3400 def __del__(self, destroy=_core_.delete_Event):
a95a7133 3401 """__del__(self)"""
d14a1e28
RD
3402 try:
3403 if self.thisown: destroy(self)
3404 except: pass
e811c8ce
RD
3405
3406 def SetEventType(*args, **kwargs):
a95a7133 3407 """SetEventType(self, wxEventType typ)"""
54f9ee45 3408 return _core_.Event_SetEventType(*args, **kwargs)
e811c8ce
RD
3409
3410 def GetEventType(*args, **kwargs):
a95a7133 3411 """GetEventType(self) -> wxEventType"""
54f9ee45 3412 return _core_.Event_GetEventType(*args, **kwargs)
e811c8ce
RD
3413
3414 def GetEventObject(*args, **kwargs):
a95a7133 3415 """GetEventObject(self) -> Object"""
54f9ee45 3416 return _core_.Event_GetEventObject(*args, **kwargs)
e811c8ce
RD
3417
3418 def SetEventObject(*args, **kwargs):
a95a7133 3419 """SetEventObject(self, Object obj)"""
54f9ee45 3420 return _core_.Event_SetEventObject(*args, **kwargs)
e811c8ce
RD
3421
3422 def GetTimestamp(*args, **kwargs):
a95a7133 3423 """GetTimestamp(self) -> long"""
54f9ee45 3424 return _core_.Event_GetTimestamp(*args, **kwargs)
e811c8ce
RD
3425
3426 def SetTimestamp(*args, **kwargs):
a95a7133 3427 """SetTimestamp(self, long ts=0)"""
54f9ee45 3428 return _core_.Event_SetTimestamp(*args, **kwargs)
e811c8ce
RD
3429
3430 def GetId(*args, **kwargs):
a95a7133 3431 """GetId(self) -> int"""
54f9ee45 3432 return _core_.Event_GetId(*args, **kwargs)
e811c8ce
RD
3433
3434 def SetId(*args, **kwargs):
a95a7133 3435 """SetId(self, int Id)"""
54f9ee45 3436 return _core_.Event_SetId(*args, **kwargs)
e811c8ce
RD
3437
3438 def IsCommandEvent(*args, **kwargs):
a95a7133 3439 """IsCommandEvent(self) -> bool"""
54f9ee45 3440 return _core_.Event_IsCommandEvent(*args, **kwargs)
e811c8ce
RD
3441
3442 def Skip(*args, **kwargs):
51b83b37
RD
3443 """
3444 Skip(self, bool skip=True)
3445
3446 Called by an event handler, it controls whether additional event
3447 handlers bound to this event will be called after the current event
3448 handler returns. Skip(false) (the default setting) will prevent
3449 additional event handlers from being called and control will be
3450 returned to the sender of the event immediately after the current
3451 handler has finished. Skip(True) will cause the event processing
3452 system to continue searching for a handler function for this event.
3453
3454 """
54f9ee45 3455 return _core_.Event_Skip(*args, **kwargs)
e811c8ce
RD
3456
3457 def GetSkipped(*args, **kwargs):
a95a7133 3458 """GetSkipped(self) -> bool"""
54f9ee45 3459 return _core_.Event_GetSkipped(*args, **kwargs)
e811c8ce
RD
3460
3461 def ShouldPropagate(*args, **kwargs):
a95a7133 3462 """ShouldPropagate(self) -> bool"""
54f9ee45 3463 return _core_.Event_ShouldPropagate(*args, **kwargs)
e811c8ce
RD
3464
3465 def StopPropagation(*args, **kwargs):
a95a7133 3466 """StopPropagation(self) -> int"""
54f9ee45 3467 return _core_.Event_StopPropagation(*args, **kwargs)
e811c8ce
RD
3468
3469 def ResumePropagation(*args, **kwargs):
a95a7133 3470 """ResumePropagation(self, int propagationLevel)"""
54f9ee45 3471 return _core_.Event_ResumePropagation(*args, **kwargs)
e811c8ce
RD
3472
3473 def Clone(*args, **kwargs):
a95a7133 3474 """Clone(self) -> Event"""
54f9ee45 3475 return _core_.Event_Clone(*args, **kwargs)
e811c8ce 3476
d14a1e28
RD
3477
3478class EventPtr(Event):
3479 def __init__(self, this):
3480 self.this = this
3481 if not hasattr(self,"thisown"): self.thisown = 0
3482 self.__class__ = Event
54f9ee45 3483_core_.Event_swigregister(EventPtr)
d14a1e28
RD
3484
3485#---------------------------------------------------------------------------
3486
3487class PropagationDisabler(object):
093d3ff1 3488 """Proxy of C++ PropagationDisabler class"""
e811c8ce
RD
3489 def __repr__(self):
3490 return "<%s.%s; proxy of C++ wxPropagationDisabler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 3491 def __init__(self, *args, **kwargs):
a95a7133 3492 """__init__(self, Event event) -> PropagationDisabler"""
54f9ee45 3493 newobj = _core_.new_PropagationDisabler(*args, **kwargs)
d14a1e28
RD
3494 self.this = newobj.this
3495 self.thisown = 1
3496 del newobj.thisown
54f9ee45 3497 def __del__(self, destroy=_core_.delete_PropagationDisabler):
a95a7133 3498 """__del__(self)"""
d14a1e28
RD
3499 try:
3500 if self.thisown: destroy(self)
3501 except: pass
e811c8ce 3502
d14a1e28
RD
3503
3504class PropagationDisablerPtr(PropagationDisabler):
3505 def __init__(self, this):
3506 self.this = this
3507 if not hasattr(self,"thisown"): self.thisown = 0
3508 self.__class__ = PropagationDisabler
54f9ee45 3509_core_.PropagationDisabler_swigregister(PropagationDisablerPtr)
d14a1e28
RD
3510
3511class PropagateOnce(object):
093d3ff1 3512 """Proxy of C++ PropagateOnce class"""
e811c8ce
RD
3513 def __repr__(self):
3514 return "<%s.%s; proxy of C++ wxPropagateOnce instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 3515 def __init__(self, *args, **kwargs):
a95a7133 3516 """__init__(self, Event event) -> PropagateOnce"""
54f9ee45 3517 newobj = _core_.new_PropagateOnce(*args, **kwargs)
d14a1e28
RD
3518 self.this = newobj.this
3519 self.thisown = 1
3520 del newobj.thisown
54f9ee45 3521 def __del__(self, destroy=_core_.delete_PropagateOnce):
a95a7133 3522 """__del__(self)"""
d14a1e28
RD
3523 try:
3524 if self.thisown: destroy(self)
3525 except: pass
e811c8ce 3526
d14a1e28
RD
3527
3528class PropagateOncePtr(PropagateOnce):
3529 def __init__(self, this):
3530 self.this = this
3531 if not hasattr(self,"thisown"): self.thisown = 0
3532 self.__class__ = PropagateOnce
54f9ee45 3533_core_.PropagateOnce_swigregister(PropagateOncePtr)
d14a1e28
RD
3534
3535#---------------------------------------------------------------------------
3536
3537class CommandEvent(Event):
093d3ff1 3538 """Proxy of C++ CommandEvent class"""
e811c8ce
RD
3539 def __repr__(self):
3540 return "<%s.%s; proxy of C++ wxCommandEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 3541 def __init__(self, *args, **kwargs):
a95a7133 3542 """__init__(self, wxEventType commandType=wxEVT_NULL, int winid=0) -> CommandEvent"""
54f9ee45 3543 newobj = _core_.new_CommandEvent(*args, **kwargs)
d14a1e28
RD
3544 self.this = newobj.this
3545 self.thisown = 1
3546 del newobj.thisown
e811c8ce 3547 def GetSelection(*args, **kwargs):
a95a7133 3548 """GetSelection(self) -> int"""
54f9ee45 3549 return _core_.CommandEvent_GetSelection(*args, **kwargs)
e811c8ce
RD
3550
3551 def SetString(*args, **kwargs):
a95a7133 3552 """SetString(self, String s)"""
54f9ee45 3553 return _core_.CommandEvent_SetString(*args, **kwargs)
e811c8ce
RD
3554
3555 def GetString(*args, **kwargs):
a95a7133 3556 """GetString(self) -> String"""
54f9ee45 3557 return _core_.CommandEvent_GetString(*args, **kwargs)
e811c8ce
RD
3558
3559 def IsChecked(*args, **kwargs):
a95a7133 3560 """IsChecked(self) -> bool"""
54f9ee45 3561 return _core_.CommandEvent_IsChecked(*args, **kwargs)
e811c8ce 3562
242b7b46 3563 Checked = IsChecked
e811c8ce 3564 def IsSelection(*args, **kwargs):
a95a7133 3565 """IsSelection(self) -> bool"""
54f9ee45 3566 return _core_.CommandEvent_IsSelection(*args, **kwargs)
e811c8ce
RD
3567
3568 def SetExtraLong(*args, **kwargs):
a95a7133 3569 """SetExtraLong(self, long extraLong)"""
54f9ee45 3570 return _core_.CommandEvent_SetExtraLong(*args, **kwargs)
e811c8ce
RD
3571
3572 def GetExtraLong(*args, **kwargs):
a95a7133 3573 """GetExtraLong(self) -> long"""
54f9ee45 3574 return _core_.CommandEvent_GetExtraLong(*args, **kwargs)
e811c8ce
RD
3575
3576 def SetInt(*args, **kwargs):
a95a7133 3577 """SetInt(self, int i)"""
54f9ee45 3578 return _core_.CommandEvent_SetInt(*args, **kwargs)
e811c8ce
RD
3579
3580 def GetInt(*args, **kwargs):
a95a7133 3581 """GetInt(self) -> long"""
54f9ee45 3582 return _core_.CommandEvent_GetInt(*args, **kwargs)
e811c8ce
RD
3583
3584 def Clone(*args, **kwargs):
a95a7133 3585 """Clone(self) -> Event"""
54f9ee45 3586 return _core_.CommandEvent_Clone(*args, **kwargs)
e811c8ce 3587
d14a1e28
RD
3588
3589class CommandEventPtr(CommandEvent):
3590 def __init__(self, this):
3591 self.this = this
3592 if not hasattr(self,"thisown"): self.thisown = 0
3593 self.__class__ = CommandEvent
54f9ee45 3594_core_.CommandEvent_swigregister(CommandEventPtr)
d14a1e28
RD
3595
3596#---------------------------------------------------------------------------
3597
3598class NotifyEvent(CommandEvent):
093d3ff1 3599 """Proxy of C++ NotifyEvent class"""
e811c8ce
RD
3600 def __repr__(self):
3601 return "<%s.%s; proxy of C++ wxNotifyEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 3602 def __init__(self, *args, **kwargs):
a95a7133 3603 """__init__(self, wxEventType commandType=wxEVT_NULL, int winid=0) -> NotifyEvent"""
54f9ee45 3604 newobj = _core_.new_NotifyEvent(*args, **kwargs)
d14a1e28
RD
3605 self.this = newobj.this
3606 self.thisown = 1
3607 del newobj.thisown
e811c8ce 3608 def Veto(*args, **kwargs):
a95a7133 3609 """Veto(self)"""
54f9ee45 3610 return _core_.NotifyEvent_Veto(*args, **kwargs)
e811c8ce
RD
3611
3612 def Allow(*args, **kwargs):
a95a7133 3613 """Allow(self)"""
54f9ee45 3614 return _core_.NotifyEvent_Allow(*args, **kwargs)
e811c8ce
RD
3615
3616 def IsAllowed(*args, **kwargs):
a95a7133 3617 """IsAllowed(self) -> bool"""
54f9ee45 3618 return _core_.NotifyEvent_IsAllowed(*args, **kwargs)
e811c8ce 3619
d14a1e28
RD
3620
3621class NotifyEventPtr(NotifyEvent):
3622 def __init__(self, this):
3623 self.this = this
3624 if not hasattr(self,"thisown"): self.thisown = 0
3625 self.__class__ = NotifyEvent
54f9ee45 3626_core_.NotifyEvent_swigregister(NotifyEventPtr)
d14a1e28
RD
3627
3628#---------------------------------------------------------------------------
3629
3630class ScrollEvent(CommandEvent):
093d3ff1 3631 """Proxy of C++ ScrollEvent class"""
e811c8ce
RD
3632 def __repr__(self):
3633 return "<%s.%s; proxy of C++ wxScrollEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 3634 def __init__(self, *args, **kwargs):
0df68c9f 3635 """
a95a7133 3636 __init__(self, wxEventType commandType=wxEVT_NULL, int winid=0, int pos=0,
0df68c9f
RD
3637 int orient=0) -> ScrollEvent
3638 """
54f9ee45 3639 newobj = _core_.new_ScrollEvent(*args, **kwargs)
d14a1e28
RD
3640 self.this = newobj.this
3641 self.thisown = 1
3642 del newobj.thisown
e811c8ce 3643 def GetOrientation(*args, **kwargs):
a95a7133 3644 """GetOrientation(self) -> int"""
54f9ee45 3645 return _core_.ScrollEvent_GetOrientation(*args, **kwargs)
e811c8ce
RD
3646
3647 def GetPosition(*args, **kwargs):
a95a7133 3648 """GetPosition(self) -> int"""
54f9ee45 3649 return _core_.ScrollEvent_GetPosition(*args, **kwargs)
e811c8ce
RD
3650
3651 def SetOrientation(*args, **kwargs):
a95a7133 3652 """SetOrientation(self, int orient)"""
54f9ee45 3653 return _core_.ScrollEvent_SetOrientation(*args, **kwargs)
e811c8ce
RD
3654
3655 def SetPosition(*args, **kwargs):
a95a7133 3656 """SetPosition(self, int pos)"""
54f9ee45 3657 return _core_.ScrollEvent_SetPosition(*args, **kwargs)
e811c8ce 3658
d14a1e28
RD
3659
3660class ScrollEventPtr(ScrollEvent):
3661 def __init__(self, this):
3662 self.this = this
3663 if not hasattr(self,"thisown"): self.thisown = 0
3664 self.__class__ = ScrollEvent
54f9ee45 3665_core_.ScrollEvent_swigregister(ScrollEventPtr)
d14a1e28
RD
3666
3667#---------------------------------------------------------------------------
3668
3669class ScrollWinEvent(Event):
093d3ff1 3670 """Proxy of C++ ScrollWinEvent class"""
e811c8ce
RD
3671 def __repr__(self):
3672 return "<%s.%s; proxy of C++ wxScrollWinEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 3673 def __init__(self, *args, **kwargs):
a95a7133 3674 """__init__(self, wxEventType commandType=wxEVT_NULL, int pos=0, int orient=0) -> ScrollWinEvent"""
54f9ee45 3675 newobj = _core_.new_ScrollWinEvent(*args, **kwargs)
d14a1e28
RD
3676 self.this = newobj.this
3677 self.thisown = 1
3678 del newobj.thisown
e811c8ce 3679 def GetOrientation(*args, **kwargs):
a95a7133 3680 """GetOrientation(self) -> int"""
54f9ee45 3681 return _core_.ScrollWinEvent_GetOrientation(*args, **kwargs)
e811c8ce
RD
3682
3683 def GetPosition(*args, **kwargs):
a95a7133 3684 """GetPosition(self) -> int"""
54f9ee45 3685 return _core_.ScrollWinEvent_GetPosition(*args, **kwargs)
e811c8ce
RD
3686
3687 def SetOrientation(*args, **kwargs):
a95a7133 3688 """SetOrientation(self, int orient)"""
54f9ee45 3689 return _core_.ScrollWinEvent_SetOrientation(*args, **kwargs)
e811c8ce
RD
3690
3691 def SetPosition(*args, **kwargs):
a95a7133 3692 """SetPosition(self, int pos)"""
54f9ee45 3693 return _core_.ScrollWinEvent_SetPosition(*args, **kwargs)
e811c8ce 3694
d14a1e28
RD
3695
3696class ScrollWinEventPtr(ScrollWinEvent):
3697 def __init__(self, this):
3698 self.this = this
3699 if not hasattr(self,"thisown"): self.thisown = 0
3700 self.__class__ = ScrollWinEvent
54f9ee45 3701_core_.ScrollWinEvent_swigregister(ScrollWinEventPtr)
d14a1e28
RD
3702
3703#---------------------------------------------------------------------------
3704
54f9ee45
RD
3705MOUSE_BTN_ANY = _core_.MOUSE_BTN_ANY
3706MOUSE_BTN_NONE = _core_.MOUSE_BTN_NONE
3707MOUSE_BTN_LEFT = _core_.MOUSE_BTN_LEFT
3708MOUSE_BTN_MIDDLE = _core_.MOUSE_BTN_MIDDLE
3709MOUSE_BTN_RIGHT = _core_.MOUSE_BTN_RIGHT
d14a1e28 3710class MouseEvent(Event):
093d3ff1 3711 """Proxy of C++ MouseEvent class"""
e811c8ce
RD
3712 def __repr__(self):
3713 return "<%s.%s; proxy of C++ wxMouseEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 3714 def __init__(self, *args, **kwargs):
a95a7133 3715 """__init__(self, wxEventType mouseType=wxEVT_NULL) -> MouseEvent"""
54f9ee45 3716 newobj = _core_.new_MouseEvent(*args, **kwargs)
d14a1e28
RD
3717 self.this = newobj.this
3718 self.thisown = 1
3719 del newobj.thisown
e811c8ce 3720 def IsButton(*args, **kwargs):
a95a7133 3721 """IsButton(self) -> bool"""
54f9ee45 3722 return _core_.MouseEvent_IsButton(*args, **kwargs)
e811c8ce
RD
3723
3724 def ButtonDown(*args, **kwargs):
a95a7133 3725 """ButtonDown(self, int but=MOUSE_BTN_ANY) -> bool"""
54f9ee45 3726 return _core_.MouseEvent_ButtonDown(*args, **kwargs)
e811c8ce
RD
3727
3728 def ButtonDClick(*args, **kwargs):
a95a7133 3729 """ButtonDClick(self, int but=MOUSE_BTN_ANY) -> bool"""
54f9ee45 3730 return _core_.MouseEvent_ButtonDClick(*args, **kwargs)
e811c8ce
RD
3731
3732 def ButtonUp(*args, **kwargs):
a95a7133 3733 """ButtonUp(self, int but=MOUSE_BTN_ANY) -> bool"""
54f9ee45 3734 return _core_.MouseEvent_ButtonUp(*args, **kwargs)
e811c8ce
RD
3735
3736 def Button(*args, **kwargs):
a95a7133 3737 """Button(self, int but) -> bool"""
54f9ee45 3738 return _core_.MouseEvent_Button(*args, **kwargs)
e811c8ce
RD
3739
3740 def ButtonIsDown(*args, **kwargs):
a95a7133 3741 """ButtonIsDown(self, int but) -> bool"""
54f9ee45 3742 return _core_.MouseEvent_ButtonIsDown(*args, **kwargs)
e811c8ce
RD
3743
3744 def GetButton(*args, **kwargs):
a95a7133 3745 """GetButton(self) -> int"""
54f9ee45 3746 return _core_.MouseEvent_GetButton(*args, **kwargs)
e811c8ce
RD
3747
3748 def ControlDown(*args, **kwargs):
a95a7133 3749 """ControlDown(self) -> bool"""
54f9ee45 3750 return _core_.MouseEvent_ControlDown(*args, **kwargs)
e811c8ce
RD
3751
3752 def MetaDown(*args, **kwargs):
a95a7133 3753 """MetaDown(self) -> bool"""
54f9ee45 3754 return _core_.MouseEvent_MetaDown(*args, **kwargs)
e811c8ce
RD
3755
3756 def AltDown(*args, **kwargs):
a95a7133 3757 """AltDown(self) -> bool"""
54f9ee45 3758 return _core_.MouseEvent_AltDown(*args, **kwargs)
e811c8ce
RD
3759
3760 def ShiftDown(*args, **kwargs):
a95a7133 3761 """ShiftDown(self) -> bool"""
54f9ee45 3762 return _core_.MouseEvent_ShiftDown(*args, **kwargs)
e811c8ce 3763
412d302d
RD
3764 def CmdDown(*args, **kwargs):
3765 """
3766 CmdDown(self) -> bool
3767
3768 "Cmd" is a pseudo key which is the same as Control for PC and Unix
3769 platforms but the special "Apple" (a.k.a as "Command") key on
3770 Macs: it makes often sense to use it instead of, say, `ControlDown`
3771 because Cmd key is used for the same thing under Mac as Ctrl
3772 elsewhere. The Ctrl still exists, it's just not used for this
3773 purpose. So for non-Mac platforms this is the same as `ControlDown`
3774 and Macs this is the same as `MetaDown`.
3775 """
3776 return _core_.MouseEvent_CmdDown(*args, **kwargs)
3777
e811c8ce 3778 def LeftDown(*args, **kwargs):
a95a7133 3779 """LeftDown(self) -> bool"""
54f9ee45 3780 return _core_.MouseEvent_LeftDown(*args, **kwargs)
e811c8ce
RD
3781
3782 def MiddleDown(*args, **kwargs):
a95a7133 3783 """MiddleDown(self) -> bool"""
54f9ee45 3784 return _core_.MouseEvent_MiddleDown(*args, **kwargs)
e811c8ce
RD
3785
3786 def RightDown(*args, **kwargs):
a95a7133 3787 """RightDown(self) -> bool"""
54f9ee45 3788 return _core_.MouseEvent_RightDown(*args, **kwargs)
e811c8ce
RD
3789
3790 def LeftUp(*args, **kwargs):
a95a7133 3791 """LeftUp(self) -> bool"""
54f9ee45 3792 return _core_.MouseEvent_LeftUp(*args, **kwargs)
e811c8ce
RD
3793
3794 def MiddleUp(*args, **kwargs):
a95a7133 3795 """MiddleUp(self) -> bool"""
54f9ee45 3796 return _core_.MouseEvent_MiddleUp(*args, **kwargs)
e811c8ce
RD
3797
3798 def RightUp(*args, **kwargs):
a95a7133 3799 """RightUp(self) -> bool"""
54f9ee45 3800 return _core_.MouseEvent_RightUp(*args, **kwargs)
e811c8ce
RD
3801
3802 def LeftDClick(*args, **kwargs):
a95a7133 3803 """LeftDClick(self) -> bool"""
54f9ee45 3804 return _core_.MouseEvent_LeftDClick(*args, **kwargs)
e811c8ce
RD
3805
3806 def MiddleDClick(*args, **kwargs):
a95a7133 3807 """MiddleDClick(self) -> bool"""
54f9ee45 3808 return _core_.MouseEvent_MiddleDClick(*args, **kwargs)
e811c8ce
RD
3809
3810 def RightDClick(*args, **kwargs):
a95a7133 3811 """RightDClick(self) -> bool"""
54f9ee45 3812 return _core_.MouseEvent_RightDClick(*args, **kwargs)
e811c8ce
RD
3813
3814 def LeftIsDown(*args, **kwargs):
a95a7133 3815 """LeftIsDown(self) -> bool"""
54f9ee45 3816 return _core_.MouseEvent_LeftIsDown(*args, **kwargs)
e811c8ce
RD
3817
3818 def MiddleIsDown(*args, **kwargs):
a95a7133 3819 """MiddleIsDown(self) -> bool"""
54f9ee45 3820 return _core_.MouseEvent_MiddleIsDown(*args, **kwargs)
e811c8ce
RD
3821
3822 def RightIsDown(*args, **kwargs):
a95a7133 3823 """RightIsDown(self) -> bool"""
54f9ee45 3824 return _core_.MouseEvent_RightIsDown(*args, **kwargs)
e811c8ce
RD
3825
3826 def Dragging(*args, **kwargs):
a95a7133 3827 """Dragging(self) -> bool"""
54f9ee45 3828 return _core_.MouseEvent_Dragging(*args, **kwargs)
e811c8ce
RD
3829
3830 def Moving(*args, **kwargs):
a95a7133 3831 """Moving(self) -> bool"""
54f9ee45 3832 return _core_.MouseEvent_Moving(*args, **kwargs)
e811c8ce
RD
3833
3834 def Entering(*args, **kwargs):
a95a7133 3835 """Entering(self) -> bool"""
54f9ee45 3836 return _core_.MouseEvent_Entering(*args, **kwargs)
e811c8ce
RD
3837
3838 def Leaving(*args, **kwargs):
a95a7133 3839 """Leaving(self) -> bool"""
54f9ee45 3840 return _core_.MouseEvent_Leaving(*args, **kwargs)
e811c8ce
RD
3841
3842 def GetPosition(*args, **kwargs):
0df68c9f 3843 """
a95a7133 3844 GetPosition(self) -> Point
e811c8ce 3845
41e2b43e
RD
3846 Returns the position of the mouse in window coordinates when the event
3847 happened.
0df68c9f 3848 """
54f9ee45 3849 return _core_.MouseEvent_GetPosition(*args, **kwargs)
e811c8ce
RD
3850
3851 def GetPositionTuple(*args, **kwargs):
0df68c9f
RD
3852 """
3853 GetPositionTuple() -> (x,y)
e811c8ce 3854
41e2b43e
RD
3855 Returns the position of the mouse in window coordinates when the event
3856 happened.
0df68c9f 3857 """
54f9ee45 3858 return _core_.MouseEvent_GetPositionTuple(*args, **kwargs)
e811c8ce
RD
3859
3860 def GetLogicalPosition(*args, **kwargs):
a95a7133 3861 """GetLogicalPosition(self, DC dc) -> Point"""
54f9ee45 3862 return _core_.MouseEvent_GetLogicalPosition(*args, **kwargs)
e811c8ce
RD
3863
3864 def GetX(*args, **kwargs):
a95a7133 3865 """GetX(self) -> int"""
54f9ee45 3866 return _core_.MouseEvent_GetX(*args, **kwargs)
e811c8ce
RD
3867
3868 def GetY(*args, **kwargs):
a95a7133 3869 """GetY(self) -> int"""
54f9ee45 3870 return _core_.MouseEvent_GetY(*args, **kwargs)
e811c8ce
RD
3871
3872 def GetWheelRotation(*args, **kwargs):
a95a7133 3873 """GetWheelRotation(self) -> int"""
54f9ee45 3874 return _core_.MouseEvent_GetWheelRotation(*args, **kwargs)
e811c8ce
RD
3875
3876 def GetWheelDelta(*args, **kwargs):
a95a7133 3877 """GetWheelDelta(self) -> int"""
54f9ee45 3878 return _core_.MouseEvent_GetWheelDelta(*args, **kwargs)
e811c8ce
RD
3879
3880 def GetLinesPerAction(*args, **kwargs):
a95a7133 3881 """GetLinesPerAction(self) -> int"""
54f9ee45 3882 return _core_.MouseEvent_GetLinesPerAction(*args, **kwargs)
e811c8ce
RD
3883
3884 def IsPageScroll(*args, **kwargs):
a95a7133 3885 """IsPageScroll(self) -> bool"""
54f9ee45
RD
3886 return _core_.MouseEvent_IsPageScroll(*args, **kwargs)
3887
3888 m_x = property(_core_.MouseEvent_m_x_get, _core_.MouseEvent_m_x_set)
3889 m_y = property(_core_.MouseEvent_m_y_get, _core_.MouseEvent_m_y_set)
3890 m_leftDown = property(_core_.MouseEvent_m_leftDown_get, _core_.MouseEvent_m_leftDown_set)
3891 m_middleDown = property(_core_.MouseEvent_m_middleDown_get, _core_.MouseEvent_m_middleDown_set)
3892 m_rightDown = property(_core_.MouseEvent_m_rightDown_get, _core_.MouseEvent_m_rightDown_set)
3893 m_controlDown = property(_core_.MouseEvent_m_controlDown_get, _core_.MouseEvent_m_controlDown_set)
3894 m_shiftDown = property(_core_.MouseEvent_m_shiftDown_get, _core_.MouseEvent_m_shiftDown_set)
3895 m_altDown = property(_core_.MouseEvent_m_altDown_get, _core_.MouseEvent_m_altDown_set)
3896 m_metaDown = property(_core_.MouseEvent_m_metaDown_get, _core_.MouseEvent_m_metaDown_set)
3897 m_wheelRotation = property(_core_.MouseEvent_m_wheelRotation_get, _core_.MouseEvent_m_wheelRotation_set)
3898 m_wheelDelta = property(_core_.MouseEvent_m_wheelDelta_get, _core_.MouseEvent_m_wheelDelta_set)
3899 m_linesPerAction = property(_core_.MouseEvent_m_linesPerAction_get, _core_.MouseEvent_m_linesPerAction_set)
d14a1e28
RD
3900
3901class MouseEventPtr(MouseEvent):
3902 def __init__(self, this):
3903 self.this = this
3904 if not hasattr(self,"thisown"): self.thisown = 0
3905 self.__class__ = MouseEvent
54f9ee45 3906_core_.MouseEvent_swigregister(MouseEventPtr)
d14a1e28
RD
3907
3908#---------------------------------------------------------------------------
3909
3910class SetCursorEvent(Event):
093d3ff1 3911 """Proxy of C++ SetCursorEvent class"""
e811c8ce
RD
3912 def __repr__(self):
3913 return "<%s.%s; proxy of C++ wxSetCursorEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 3914 def __init__(self, *args, **kwargs):
a95a7133 3915 """__init__(self, int x=0, int y=0) -> SetCursorEvent"""
54f9ee45 3916 newobj = _core_.new_SetCursorEvent(*args, **kwargs)
d14a1e28
RD
3917 self.this = newobj.this
3918 self.thisown = 1
3919 del newobj.thisown
e811c8ce 3920 def GetX(*args, **kwargs):
a95a7133 3921 """GetX(self) -> int"""
54f9ee45 3922 return _core_.SetCursorEvent_GetX(*args, **kwargs)
e811c8ce
RD
3923
3924 def GetY(*args, **kwargs):
a95a7133 3925 """GetY(self) -> int"""
54f9ee45 3926 return _core_.SetCursorEvent_GetY(*args, **kwargs)
e811c8ce
RD
3927
3928 def SetCursor(*args, **kwargs):
a95a7133 3929 """SetCursor(self, Cursor cursor)"""
54f9ee45 3930 return _core_.SetCursorEvent_SetCursor(*args, **kwargs)
e811c8ce
RD
3931
3932 def GetCursor(*args, **kwargs):
a95a7133 3933 """GetCursor(self) -> Cursor"""
54f9ee45 3934 return _core_.SetCursorEvent_GetCursor(*args, **kwargs)
e811c8ce
RD
3935
3936 def HasCursor(*args, **kwargs):
a95a7133 3937 """HasCursor(self) -> bool"""
54f9ee45 3938 return _core_.SetCursorEvent_HasCursor(*args, **kwargs)
e811c8ce 3939
d14a1e28
RD
3940
3941class SetCursorEventPtr(SetCursorEvent):
3942 def __init__(self, this):
3943 self.this = this
3944 if not hasattr(self,"thisown"): self.thisown = 0
3945 self.__class__ = SetCursorEvent
54f9ee45 3946_core_.SetCursorEvent_swigregister(SetCursorEventPtr)
d14a1e28
RD
3947
3948#---------------------------------------------------------------------------
3949
3950class KeyEvent(Event):
093d3ff1 3951 """Proxy of C++ KeyEvent class"""
e811c8ce
RD
3952 def __repr__(self):
3953 return "<%s.%s; proxy of C++ wxKeyEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 3954 def __init__(self, *args, **kwargs):
a95a7133 3955 """__init__(self, wxEventType keyType=wxEVT_NULL) -> KeyEvent"""
54f9ee45 3956 newobj = _core_.new_KeyEvent(*args, **kwargs)
d14a1e28
RD
3957 self.this = newobj.this
3958 self.thisown = 1
3959 del newobj.thisown
e811c8ce 3960 def ControlDown(*args, **kwargs):
a95a7133 3961 """ControlDown(self) -> bool"""
54f9ee45 3962 return _core_.KeyEvent_ControlDown(*args, **kwargs)
e811c8ce
RD
3963
3964 def MetaDown(*args, **kwargs):
a95a7133 3965 """MetaDown(self) -> bool"""
54f9ee45 3966 return _core_.KeyEvent_MetaDown(*args, **kwargs)
e811c8ce
RD
3967
3968 def AltDown(*args, **kwargs):
a95a7133 3969 """AltDown(self) -> bool"""
54f9ee45 3970 return _core_.KeyEvent_AltDown(*args, **kwargs)
e811c8ce
RD
3971
3972 def ShiftDown(*args, **kwargs):
a95a7133 3973 """ShiftDown(self) -> bool"""
54f9ee45 3974 return _core_.KeyEvent_ShiftDown(*args, **kwargs)
e811c8ce 3975
412d302d
RD
3976 def CmdDown(*args, **kwargs):
3977 """
3978 CmdDown(self) -> bool
3979
3980 "Cmd" is a pseudo key which is the same as Control for PC and Unix
3981 platforms but the special "Apple" (a.k.a as "Command") key on
3982 Macs: it makes often sense to use it instead of, say, `ControlDown`
3983 because Cmd key is used for the same thing under Mac as Ctrl
3984 elsewhere. The Ctrl still exists, it's just not used for this
3985 purpose. So for non-Mac platforms this is the same as `ControlDown`
3986 and Macs this is the same as `MetaDown`.
3987 """
3988 return _core_.KeyEvent_CmdDown(*args, **kwargs)
3989
e811c8ce 3990 def HasModifiers(*args, **kwargs):
a95a7133 3991 """HasModifiers(self) -> bool"""
54f9ee45 3992 return _core_.KeyEvent_HasModifiers(*args, **kwargs)
e811c8ce
RD
3993
3994 def GetKeyCode(*args, **kwargs):
a95a7133 3995 """GetKeyCode(self) -> int"""
54f9ee45 3996 return _core_.KeyEvent_GetKeyCode(*args, **kwargs)
e811c8ce 3997
d14a1e28 3998 KeyCode = GetKeyCode
19272049
RD
3999 def GetUnicodeKey(*args, **kwargs):
4000 """GetUnicodeKey(self) -> int"""
4001 return _core_.KeyEvent_GetUnicodeKey(*args, **kwargs)
e811c8ce 4002
19272049 4003 GetUniChar = GetUnicodeKey
e811c8ce 4004 def GetRawKeyCode(*args, **kwargs):
a95a7133 4005 """GetRawKeyCode(self) -> unsigned int"""
54f9ee45 4006 return _core_.KeyEvent_GetRawKeyCode(*args, **kwargs)
e811c8ce
RD
4007
4008 def GetRawKeyFlags(*args, **kwargs):
a95a7133 4009 """GetRawKeyFlags(self) -> unsigned int"""
54f9ee45 4010 return _core_.KeyEvent_GetRawKeyFlags(*args, **kwargs)
e811c8ce
RD
4011
4012 def GetPosition(*args, **kwargs):
0df68c9f 4013 """
a95a7133 4014 GetPosition(self) -> Point
e811c8ce 4015
0df68c9f
RD
4016 Find the position of the event.
4017 """
54f9ee45 4018 return _core_.KeyEvent_GetPosition(*args, **kwargs)
e811c8ce
RD
4019
4020 def GetPositionTuple(*args, **kwargs):
0df68c9f
RD
4021 """
4022 GetPositionTuple() -> (x,y)
e811c8ce 4023
0df68c9f
RD
4024 Find the position of the event.
4025 """
54f9ee45 4026 return _core_.KeyEvent_GetPositionTuple(*args, **kwargs)
e811c8ce
RD
4027
4028 def GetX(*args, **kwargs):
a95a7133 4029 """GetX(self) -> int"""
54f9ee45 4030 return _core_.KeyEvent_GetX(*args, **kwargs)
e811c8ce
RD
4031
4032 def GetY(*args, **kwargs):
a95a7133 4033 """GetY(self) -> int"""
54f9ee45
RD
4034 return _core_.KeyEvent_GetY(*args, **kwargs)
4035
4036 m_x = property(_core_.KeyEvent_m_x_get, _core_.KeyEvent_m_x_set)
4037 m_y = property(_core_.KeyEvent_m_y_get, _core_.KeyEvent_m_y_set)
4038 m_keyCode = property(_core_.KeyEvent_m_keyCode_get, _core_.KeyEvent_m_keyCode_set)
4039 m_controlDown = property(_core_.KeyEvent_m_controlDown_get, _core_.KeyEvent_m_controlDown_set)
4040 m_shiftDown = property(_core_.KeyEvent_m_shiftDown_get, _core_.KeyEvent_m_shiftDown_set)
4041 m_altDown = property(_core_.KeyEvent_m_altDown_get, _core_.KeyEvent_m_altDown_set)
4042 m_metaDown = property(_core_.KeyEvent_m_metaDown_get, _core_.KeyEvent_m_metaDown_set)
4043 m_scanCode = property(_core_.KeyEvent_m_scanCode_get, _core_.KeyEvent_m_scanCode_set)
4044 m_rawCode = property(_core_.KeyEvent_m_rawCode_get, _core_.KeyEvent_m_rawCode_set)
4045 m_rawFlags = property(_core_.KeyEvent_m_rawFlags_get, _core_.KeyEvent_m_rawFlags_set)
d14a1e28
RD
4046
4047class KeyEventPtr(KeyEvent):
4048 def __init__(self, this):
4049 self.this = this
4050 if not hasattr(self,"thisown"): self.thisown = 0
4051 self.__class__ = KeyEvent
54f9ee45 4052_core_.KeyEvent_swigregister(KeyEventPtr)
d14a1e28
RD
4053
4054#---------------------------------------------------------------------------
4055
4056class SizeEvent(Event):
093d3ff1 4057 """Proxy of C++ SizeEvent class"""
e811c8ce
RD
4058 def __repr__(self):
4059 return "<%s.%s; proxy of C++ wxSizeEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 4060 def __init__(self, *args, **kwargs):
a95a7133 4061 """__init__(self, Size sz=DefaultSize, int winid=0) -> SizeEvent"""
54f9ee45 4062 newobj = _core_.new_SizeEvent(*args, **kwargs)
d14a1e28
RD
4063 self.this = newobj.this
4064 self.thisown = 1
4065 del newobj.thisown
e811c8ce 4066 def GetSize(*args, **kwargs):
a95a7133 4067 """GetSize(self) -> Size"""
54f9ee45 4068 return _core_.SizeEvent_GetSize(*args, **kwargs)
e811c8ce
RD
4069
4070 def GetRect(*args, **kwargs):
a95a7133 4071 """GetRect(self) -> Rect"""
54f9ee45 4072 return _core_.SizeEvent_GetRect(*args, **kwargs)
e811c8ce
RD
4073
4074 def SetRect(*args, **kwargs):
a95a7133 4075 """SetRect(self, Rect rect)"""
54f9ee45 4076 return _core_.SizeEvent_SetRect(*args, **kwargs)
e811c8ce
RD
4077
4078 def SetSize(*args, **kwargs):
a95a7133 4079 """SetSize(self, Size size)"""
54f9ee45 4080 return _core_.SizeEvent_SetSize(*args, **kwargs)
e811c8ce 4081
54f9ee45
RD
4082 m_size = property(_core_.SizeEvent_m_size_get, _core_.SizeEvent_m_size_set)
4083 m_rect = property(_core_.SizeEvent_m_rect_get, _core_.SizeEvent_m_rect_set)
d14a1e28
RD
4084
4085class SizeEventPtr(SizeEvent):
4086 def __init__(self, this):
4087 self.this = this
4088 if not hasattr(self,"thisown"): self.thisown = 0
4089 self.__class__ = SizeEvent
54f9ee45 4090_core_.SizeEvent_swigregister(SizeEventPtr)
d14a1e28
RD
4091
4092#---------------------------------------------------------------------------
4093
4094class MoveEvent(Event):
093d3ff1 4095 """Proxy of C++ MoveEvent class"""
e811c8ce
RD
4096 def __repr__(self):
4097 return "<%s.%s; proxy of C++ wxMoveEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 4098 def __init__(self, *args, **kwargs):
a95a7133 4099 """__init__(self, Point pos=DefaultPosition, int winid=0) -> MoveEvent"""
54f9ee45 4100 newobj = _core_.new_MoveEvent(*args, **kwargs)
d14a1e28
RD
4101 self.this = newobj.this
4102 self.thisown = 1
4103 del newobj.thisown
e811c8ce 4104 def GetPosition(*args, **kwargs):
a95a7133 4105 """GetPosition(self) -> Point"""
54f9ee45 4106 return _core_.MoveEvent_GetPosition(*args, **kwargs)
e811c8ce
RD
4107
4108 def GetRect(*args, **kwargs):
a95a7133 4109 """GetRect(self) -> Rect"""
54f9ee45 4110 return _core_.MoveEvent_GetRect(*args, **kwargs)
e811c8ce
RD
4111
4112 def SetRect(*args, **kwargs):
a95a7133 4113 """SetRect(self, Rect rect)"""
54f9ee45 4114 return _core_.MoveEvent_SetRect(*args, **kwargs)
e811c8ce
RD
4115
4116 def SetPosition(*args, **kwargs):
a95a7133 4117 """SetPosition(self, Point pos)"""
54f9ee45 4118 return _core_.MoveEvent_SetPosition(*args, **kwargs)
e811c8ce 4119
7557b9b5
RD
4120 m_pos = property(GetPosition, SetPosition)
4121 m_rect = property(GetRect, SetRect)
4122
d14a1e28
RD
4123
4124class MoveEventPtr(MoveEvent):
4125 def __init__(self, this):
4126 self.this = this
4127 if not hasattr(self,"thisown"): self.thisown = 0
4128 self.__class__ = MoveEvent
54f9ee45 4129_core_.MoveEvent_swigregister(MoveEventPtr)
d14a1e28
RD
4130
4131#---------------------------------------------------------------------------
4132
4133class PaintEvent(Event):
093d3ff1 4134 """Proxy of C++ PaintEvent class"""
e811c8ce
RD
4135 def __repr__(self):
4136 return "<%s.%s; proxy of C++ wxPaintEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 4137 def __init__(self, *args, **kwargs):
a95a7133 4138 """__init__(self, int Id=0) -> PaintEvent"""
54f9ee45 4139 newobj = _core_.new_PaintEvent(*args, **kwargs)
d14a1e28
RD
4140 self.this = newobj.this
4141 self.thisown = 1
4142 del newobj.thisown
d14a1e28
RD
4143
4144class PaintEventPtr(PaintEvent):
4145 def __init__(self, this):
4146 self.this = this
4147 if not hasattr(self,"thisown"): self.thisown = 0
4148 self.__class__ = PaintEvent
54f9ee45 4149_core_.PaintEvent_swigregister(PaintEventPtr)
d14a1e28
RD
4150
4151class NcPaintEvent(Event):
093d3ff1 4152 """Proxy of C++ NcPaintEvent class"""
e811c8ce
RD
4153 def __repr__(self):
4154 return "<%s.%s; proxy of C++ wxNcPaintEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 4155 def __init__(self, *args, **kwargs):
a95a7133 4156 """__init__(self, int winid=0) -> NcPaintEvent"""
54f9ee45 4157 newobj = _core_.new_NcPaintEvent(*args, **kwargs)
d14a1e28
RD
4158 self.this = newobj.this
4159 self.thisown = 1
4160 del newobj.thisown
d14a1e28
RD
4161
4162class NcPaintEventPtr(NcPaintEvent):
4163 def __init__(self, this):
4164 self.this = this
4165 if not hasattr(self,"thisown"): self.thisown = 0
4166 self.__class__ = NcPaintEvent
54f9ee45 4167_core_.NcPaintEvent_swigregister(NcPaintEventPtr)
d14a1e28
RD
4168
4169#---------------------------------------------------------------------------
4170
4171class EraseEvent(Event):
093d3ff1 4172 """Proxy of C++ EraseEvent class"""
e811c8ce
RD
4173 def __repr__(self):
4174 return "<%s.%s; proxy of C++ wxEraseEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 4175 def __init__(self, *args, **kwargs):
a95a7133 4176 """__init__(self, int Id=0, DC dc=(wxDC *) NULL) -> EraseEvent"""
54f9ee45 4177 newobj = _core_.new_EraseEvent(*args, **kwargs)
d14a1e28
RD
4178 self.this = newobj.this
4179 self.thisown = 1
4180 del newobj.thisown
e811c8ce 4181 def GetDC(*args, **kwargs):
a95a7133 4182 """GetDC(self) -> DC"""
54f9ee45 4183 return _core_.EraseEvent_GetDC(*args, **kwargs)
e811c8ce 4184
d14a1e28
RD
4185
4186class EraseEventPtr(EraseEvent):
4187 def __init__(self, this):
4188 self.this = this
4189 if not hasattr(self,"thisown"): self.thisown = 0
4190 self.__class__ = EraseEvent
54f9ee45 4191_core_.EraseEvent_swigregister(EraseEventPtr)
d14a1e28
RD
4192
4193#---------------------------------------------------------------------------
4194
4195class FocusEvent(Event):
093d3ff1 4196 """Proxy of C++ FocusEvent class"""
e811c8ce
RD
4197 def __repr__(self):
4198 return "<%s.%s; proxy of C++ wxFocusEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 4199 def __init__(self, *args, **kwargs):
a95a7133 4200 """__init__(self, wxEventType type=wxEVT_NULL, int winid=0) -> FocusEvent"""
54f9ee45 4201 newobj = _core_.new_FocusEvent(*args, **kwargs)
d14a1e28
RD
4202 self.this = newobj.this
4203 self.thisown = 1
4204 del newobj.thisown
e811c8ce 4205 def GetWindow(*args, **kwargs):
a95a7133 4206 """GetWindow(self) -> Window"""
54f9ee45 4207 return _core_.FocusEvent_GetWindow(*args, **kwargs)
e811c8ce
RD
4208
4209 def SetWindow(*args, **kwargs):
a95a7133 4210 """SetWindow(self, Window win)"""
54f9ee45 4211 return _core_.FocusEvent_SetWindow(*args, **kwargs)
e811c8ce 4212
d14a1e28
RD
4213
4214class FocusEventPtr(FocusEvent):
4215 def __init__(self, this):
4216 self.this = this
4217 if not hasattr(self,"thisown"): self.thisown = 0
4218 self.__class__ = FocusEvent
54f9ee45 4219_core_.FocusEvent_swigregister(FocusEventPtr)
d14a1e28
RD
4220
4221#---------------------------------------------------------------------------
4222
4223class ChildFocusEvent(CommandEvent):
093d3ff1 4224 """Proxy of C++ ChildFocusEvent class"""
e811c8ce
RD
4225 def __repr__(self):
4226 return "<%s.%s; proxy of C++ wxChildFocusEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 4227 def __init__(self, *args, **kwargs):
a95a7133 4228 """__init__(self, Window win=None) -> ChildFocusEvent"""
54f9ee45 4229 newobj = _core_.new_ChildFocusEvent(*args, **kwargs)
d14a1e28
RD
4230 self.this = newobj.this
4231 self.thisown = 1
4232 del newobj.thisown
e811c8ce 4233 def GetWindow(*args, **kwargs):
a95a7133 4234 """GetWindow(self) -> Window"""
54f9ee45 4235 return _core_.ChildFocusEvent_GetWindow(*args, **kwargs)
e811c8ce 4236
d14a1e28
RD
4237
4238class ChildFocusEventPtr(ChildFocusEvent):
4239 def __init__(self, this):
4240 self.this = this
4241 if not hasattr(self,"thisown"): self.thisown = 0
4242 self.__class__ = ChildFocusEvent
54f9ee45 4243_core_.ChildFocusEvent_swigregister(ChildFocusEventPtr)
d14a1e28
RD
4244
4245#---------------------------------------------------------------------------
4246
4247class ActivateEvent(Event):
093d3ff1 4248 """Proxy of C++ ActivateEvent class"""
e811c8ce
RD
4249 def __repr__(self):
4250 return "<%s.%s; proxy of C++ wxActivateEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 4251 def __init__(self, *args, **kwargs):
a95a7133 4252 """__init__(self, wxEventType type=wxEVT_NULL, bool active=True, int Id=0) -> ActivateEvent"""
54f9ee45 4253 newobj = _core_.new_ActivateEvent(*args, **kwargs)
d14a1e28
RD
4254 self.this = newobj.this
4255 self.thisown = 1
4256 del newobj.thisown
e811c8ce 4257 def GetActive(*args, **kwargs):
a95a7133 4258 """GetActive(self) -> bool"""
54f9ee45 4259 return _core_.ActivateEvent_GetActive(*args, **kwargs)
e811c8ce 4260
d14a1e28
RD
4261
4262class ActivateEventPtr(ActivateEvent):
4263 def __init__(self, this):
4264 self.this = this
4265 if not hasattr(self,"thisown"): self.thisown = 0
4266 self.__class__ = ActivateEvent
54f9ee45 4267_core_.ActivateEvent_swigregister(ActivateEventPtr)
d14a1e28
RD
4268
4269#---------------------------------------------------------------------------
4270
4271class InitDialogEvent(Event):
093d3ff1 4272 """Proxy of C++ InitDialogEvent class"""
e811c8ce
RD
4273 def __repr__(self):
4274 return "<%s.%s; proxy of C++ wxInitDialogEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 4275 def __init__(self, *args, **kwargs):
a95a7133 4276 """__init__(self, int Id=0) -> InitDialogEvent"""
54f9ee45 4277 newobj = _core_.new_InitDialogEvent(*args, **kwargs)
d14a1e28
RD
4278 self.this = newobj.this
4279 self.thisown = 1
4280 del newobj.thisown
d14a1e28
RD
4281
4282class InitDialogEventPtr(InitDialogEvent):
4283 def __init__(self, this):
4284 self.this = this
4285 if not hasattr(self,"thisown"): self.thisown = 0
4286 self.__class__ = InitDialogEvent
54f9ee45 4287_core_.InitDialogEvent_swigregister(InitDialogEventPtr)
d14a1e28
RD
4288
4289#---------------------------------------------------------------------------
4290
4291class MenuEvent(Event):
093d3ff1 4292 """Proxy of C++ MenuEvent class"""
e811c8ce
RD
4293 def __repr__(self):
4294 return "<%s.%s; proxy of C++ wxMenuEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 4295 def __init__(self, *args, **kwargs):
a95a7133 4296 """__init__(self, wxEventType type=wxEVT_NULL, int winid=0, Menu menu=None) -> MenuEvent"""
54f9ee45 4297 newobj = _core_.new_MenuEvent(*args, **kwargs)
d14a1e28
RD
4298 self.this = newobj.this
4299 self.thisown = 1
4300 del newobj.thisown
e811c8ce 4301 def GetMenuId(*args, **kwargs):
a95a7133 4302 """GetMenuId(self) -> int"""
54f9ee45 4303 return _core_.MenuEvent_GetMenuId(*args, **kwargs)
e811c8ce
RD
4304
4305 def IsPopup(*args, **kwargs):
a95a7133 4306 """IsPopup(self) -> bool"""
54f9ee45 4307 return _core_.MenuEvent_IsPopup(*args, **kwargs)
e811c8ce
RD
4308
4309 def GetMenu(*args, **kwargs):
a95a7133 4310 """GetMenu(self) -> Menu"""
54f9ee45 4311 return _core_.MenuEvent_GetMenu(*args, **kwargs)
e811c8ce 4312
d14a1e28
RD
4313
4314class MenuEventPtr(MenuEvent):
4315 def __init__(self, this):
4316 self.this = this
4317 if not hasattr(self,"thisown"): self.thisown = 0
4318 self.__class__ = MenuEvent
54f9ee45 4319_core_.MenuEvent_swigregister(MenuEventPtr)
d14a1e28
RD
4320
4321#---------------------------------------------------------------------------
4322
4323class CloseEvent(Event):
093d3ff1 4324 """Proxy of C++ CloseEvent class"""
e811c8ce
RD
4325 def __repr__(self):
4326 return "<%s.%s; proxy of C++ wxCloseEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 4327 def __init__(self, *args, **kwargs):
a95a7133 4328 """__init__(self, wxEventType type=wxEVT_NULL, int winid=0) -> CloseEvent"""
54f9ee45 4329 newobj = _core_.new_CloseEvent(*args, **kwargs)
d14a1e28
RD
4330 self.this = newobj.this
4331 self.thisown = 1
4332 del newobj.thisown
e811c8ce 4333 def SetLoggingOff(*args, **kwargs):
a95a7133 4334 """SetLoggingOff(self, bool logOff)"""
54f9ee45 4335 return _core_.CloseEvent_SetLoggingOff(*args, **kwargs)
e811c8ce
RD
4336
4337 def GetLoggingOff(*args, **kwargs):
a95a7133 4338 """GetLoggingOff(self) -> bool"""
54f9ee45 4339 return _core_.CloseEvent_GetLoggingOff(*args, **kwargs)
e811c8ce
RD
4340
4341 def Veto(*args, **kwargs):
a95a7133 4342 """Veto(self, bool veto=True)"""
54f9ee45 4343 return _core_.CloseEvent_Veto(*args, **kwargs)
e811c8ce
RD
4344
4345 def SetCanVeto(*args, **kwargs):
a95a7133 4346 """SetCanVeto(self, bool canVeto)"""
54f9ee45 4347 return _core_.CloseEvent_SetCanVeto(*args, **kwargs)
e811c8ce
RD
4348
4349 def CanVeto(*args, **kwargs):
a95a7133 4350 """CanVeto(self) -> bool"""
54f9ee45 4351 return _core_.CloseEvent_CanVeto(*args, **kwargs)
e811c8ce
RD
4352
4353 def GetVeto(*args, **kwargs):
a95a7133 4354 """GetVeto(self) -> bool"""
54f9ee45 4355 return _core_.CloseEvent_GetVeto(*args, **kwargs)
e811c8ce 4356
d14a1e28
RD
4357
4358class CloseEventPtr(CloseEvent):
4359 def __init__(self, this):
4360 self.this = this
4361 if not hasattr(self,"thisown"): self.thisown = 0
4362 self.__class__ = CloseEvent
54f9ee45 4363_core_.CloseEvent_swigregister(CloseEventPtr)
d14a1e28
RD
4364
4365#---------------------------------------------------------------------------
4366
4367class ShowEvent(Event):
093d3ff1 4368 """Proxy of C++ ShowEvent class"""
e811c8ce
RD
4369 def __repr__(self):
4370 return "<%s.%s; proxy of C++ wxShowEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 4371 def __init__(self, *args, **kwargs):
a95a7133 4372 """__init__(self, int winid=0, bool show=False) -> ShowEvent"""
54f9ee45 4373 newobj = _core_.new_ShowEvent(*args, **kwargs)
d14a1e28
RD
4374 self.this = newobj.this
4375 self.thisown = 1
4376 del newobj.thisown
e811c8ce 4377 def SetShow(*args, **kwargs):
a95a7133 4378 """SetShow(self, bool show)"""
54f9ee45 4379 return _core_.ShowEvent_SetShow(*args, **kwargs)
e811c8ce
RD
4380
4381 def GetShow(*args, **kwargs):
a95a7133 4382 """GetShow(self) -> bool"""
54f9ee45 4383 return _core_.ShowEvent_GetShow(*args, **kwargs)
e811c8ce 4384
d14a1e28
RD
4385
4386class ShowEventPtr(ShowEvent):
4387 def __init__(self, this):
4388 self.this = this
4389 if not hasattr(self,"thisown"): self.thisown = 0
4390 self.__class__ = ShowEvent
54f9ee45 4391_core_.ShowEvent_swigregister(ShowEventPtr)
d14a1e28
RD
4392
4393#---------------------------------------------------------------------------
4394
4395class IconizeEvent(Event):
093d3ff1 4396 """Proxy of C++ IconizeEvent class"""
e811c8ce
RD
4397 def __repr__(self):
4398 return "<%s.%s; proxy of C++ wxIconizeEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 4399 def __init__(self, *args, **kwargs):
a95a7133 4400 """__init__(self, int id=0, bool iconized=True) -> IconizeEvent"""
54f9ee45 4401 newobj = _core_.new_IconizeEvent(*args, **kwargs)
d14a1e28
RD
4402 self.this = newobj.this
4403 self.thisown = 1
4404 del newobj.thisown
e811c8ce 4405 def Iconized(*args, **kwargs):
a95a7133 4406 """Iconized(self) -> bool"""
54f9ee45 4407 return _core_.IconizeEvent_Iconized(*args, **kwargs)
e811c8ce 4408
d14a1e28
RD
4409
4410class IconizeEventPtr(IconizeEvent):
4411 def __init__(self, this):
4412 self.this = this
4413 if not hasattr(self,"thisown"): self.thisown = 0
4414 self.__class__ = IconizeEvent
54f9ee45 4415_core_.IconizeEvent_swigregister(IconizeEventPtr)
d14a1e28
RD
4416
4417#---------------------------------------------------------------------------
4418
4419class MaximizeEvent(Event):
093d3ff1 4420 """Proxy of C++ MaximizeEvent class"""
e811c8ce
RD
4421 def __repr__(self):
4422 return "<%s.%s; proxy of C++ wxMaximizeEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 4423 def __init__(self, *args, **kwargs):
a95a7133 4424 """__init__(self, int id=0) -> MaximizeEvent"""
54f9ee45 4425 newobj = _core_.new_MaximizeEvent(*args, **kwargs)
d14a1e28
RD
4426 self.this = newobj.this
4427 self.thisown = 1
4428 del newobj.thisown
d14a1e28
RD
4429
4430class MaximizeEventPtr(MaximizeEvent):
4431 def __init__(self, this):
4432 self.this = this
4433 if not hasattr(self,"thisown"): self.thisown = 0
4434 self.__class__ = MaximizeEvent
54f9ee45 4435_core_.MaximizeEvent_swigregister(MaximizeEventPtr)
d14a1e28
RD
4436
4437#---------------------------------------------------------------------------
4438
4439class DropFilesEvent(Event):
093d3ff1 4440 """Proxy of C++ DropFilesEvent class"""
d14a1e28
RD
4441 def __init__(self): raise RuntimeError, "No constructor defined"
4442 def __repr__(self):
4443 return "<%s.%s; proxy of C++ wxDropFilesEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
e811c8ce 4444 def GetPosition(*args, **kwargs):
a95a7133 4445 """GetPosition(self) -> Point"""
54f9ee45 4446 return _core_.DropFilesEvent_GetPosition(*args, **kwargs)
e811c8ce
RD
4447
4448 def GetNumberOfFiles(*args, **kwargs):
a95a7133 4449 """GetNumberOfFiles(self) -> int"""
54f9ee45 4450 return _core_.DropFilesEvent_GetNumberOfFiles(*args, **kwargs)
e811c8ce
RD
4451
4452 def GetFiles(*args, **kwargs):
a95a7133 4453 """GetFiles(self) -> PyObject"""
54f9ee45 4454 return _core_.DropFilesEvent_GetFiles(*args, **kwargs)
e811c8ce 4455
d14a1e28
RD
4456
4457class DropFilesEventPtr(DropFilesEvent):
4458 def __init__(self, this):
4459 self.this = this
4460 if not hasattr(self,"thisown"): self.thisown = 0
4461 self.__class__ = DropFilesEvent
54f9ee45 4462_core_.DropFilesEvent_swigregister(DropFilesEventPtr)
d14a1e28
RD
4463
4464#---------------------------------------------------------------------------
4465
54f9ee45
RD
4466UPDATE_UI_PROCESS_ALL = _core_.UPDATE_UI_PROCESS_ALL
4467UPDATE_UI_PROCESS_SPECIFIED = _core_.UPDATE_UI_PROCESS_SPECIFIED
d14a1e28 4468class UpdateUIEvent(CommandEvent):
093d3ff1 4469 """Proxy of C++ UpdateUIEvent class"""
e811c8ce
RD
4470 def __repr__(self):
4471 return "<%s.%s; proxy of C++ wxUpdateUIEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 4472 def __init__(self, *args, **kwargs):
a95a7133 4473 """__init__(self, int commandId=0) -> UpdateUIEvent"""
54f9ee45 4474 newobj = _core_.new_UpdateUIEvent(*args, **kwargs)
d14a1e28
RD
4475 self.this = newobj.this
4476 self.thisown = 1
4477 del newobj.thisown
e811c8ce 4478 def GetChecked(*args, **kwargs):
a95a7133 4479 """GetChecked(self) -> bool"""
54f9ee45 4480 return _core_.UpdateUIEvent_GetChecked(*args, **kwargs)
e811c8ce
RD
4481
4482 def GetEnabled(*args, **kwargs):
a95a7133 4483 """GetEnabled(self) -> bool"""
54f9ee45 4484 return _core_.UpdateUIEvent_GetEnabled(*args, **kwargs)
e811c8ce
RD
4485
4486 def GetText(*args, **kwargs):
a95a7133 4487 """GetText(self) -> String"""
54f9ee45 4488 return _core_.UpdateUIEvent_GetText(*args, **kwargs)
e811c8ce
RD
4489
4490 def GetSetText(*args, **kwargs):
a95a7133 4491 """GetSetText(self) -> bool"""
54f9ee45 4492 return _core_.UpdateUIEvent_GetSetText(*args, **kwargs)
e811c8ce
RD
4493
4494 def GetSetChecked(*args, **kwargs):
a95a7133 4495 """GetSetChecked(self) -> bool"""
54f9ee45 4496 return _core_.UpdateUIEvent_GetSetChecked(*args, **kwargs)
e811c8ce
RD
4497
4498 def GetSetEnabled(*args, **kwargs):
a95a7133 4499 """GetSetEnabled(self) -> bool"""
54f9ee45 4500 return _core_.UpdateUIEvent_GetSetEnabled(*args, **kwargs)
e811c8ce
RD
4501
4502 def Check(*args, **kwargs):
a95a7133 4503 """Check(self, bool check)"""
54f9ee45 4504 return _core_.UpdateUIEvent_Check(*args, **kwargs)
e811c8ce
RD
4505
4506 def Enable(*args, **kwargs):
a95a7133 4507 """Enable(self, bool enable)"""
54f9ee45 4508 return _core_.UpdateUIEvent_Enable(*args, **kwargs)
e811c8ce
RD
4509
4510 def SetText(*args, **kwargs):
a95a7133 4511 """SetText(self, String text)"""
54f9ee45 4512 return _core_.UpdateUIEvent_SetText(*args, **kwargs)
e811c8ce
RD
4513
4514 def SetUpdateInterval(*args, **kwargs):
66c033b4 4515 """SetUpdateInterval(long updateInterval)"""
54f9ee45 4516 return _core_.UpdateUIEvent_SetUpdateInterval(*args, **kwargs)
e811c8ce
RD
4517
4518 SetUpdateInterval = staticmethod(SetUpdateInterval)
4519 def GetUpdateInterval(*args, **kwargs):
66c033b4 4520 """GetUpdateInterval() -> long"""
54f9ee45 4521 return _core_.UpdateUIEvent_GetUpdateInterval(*args, **kwargs)
e811c8ce
RD
4522
4523 GetUpdateInterval = staticmethod(GetUpdateInterval)
4524 def CanUpdate(*args, **kwargs):
66c033b4 4525 """CanUpdate(Window win) -> bool"""
54f9ee45 4526 return _core_.UpdateUIEvent_CanUpdate(*args, **kwargs)
e811c8ce
RD
4527
4528 CanUpdate = staticmethod(CanUpdate)
4529 def ResetUpdateTime(*args, **kwargs):
66c033b4 4530 """ResetUpdateTime()"""
54f9ee45 4531 return _core_.UpdateUIEvent_ResetUpdateTime(*args, **kwargs)
e811c8ce
RD
4532
4533 ResetUpdateTime = staticmethod(ResetUpdateTime)
4534 def SetMode(*args, **kwargs):
66c033b4 4535 """SetMode(int mode)"""
54f9ee45 4536 return _core_.UpdateUIEvent_SetMode(*args, **kwargs)
e811c8ce
RD
4537
4538 SetMode = staticmethod(SetMode)
4539 def GetMode(*args, **kwargs):
66c033b4 4540 """GetMode() -> int"""
54f9ee45 4541 return _core_.UpdateUIEvent_GetMode(*args, **kwargs)
e811c8ce
RD
4542
4543 GetMode = staticmethod(GetMode)
d14a1e28
RD
4544
4545class UpdateUIEventPtr(UpdateUIEvent):
4546 def __init__(self, this):
4547 self.this = this
4548 if not hasattr(self,"thisown"): self.thisown = 0
4549 self.__class__ = UpdateUIEvent
54f9ee45 4550_core_.UpdateUIEvent_swigregister(UpdateUIEventPtr)
d14a1e28 4551
e811c8ce
RD
4552def UpdateUIEvent_SetUpdateInterval(*args, **kwargs):
4553 """UpdateUIEvent_SetUpdateInterval(long updateInterval)"""
54f9ee45 4554 return _core_.UpdateUIEvent_SetUpdateInterval(*args, **kwargs)
d14a1e28 4555
e811c8ce
RD
4556def UpdateUIEvent_GetUpdateInterval(*args, **kwargs):
4557 """UpdateUIEvent_GetUpdateInterval() -> long"""
54f9ee45 4558 return _core_.UpdateUIEvent_GetUpdateInterval(*args, **kwargs)
d14a1e28 4559
e811c8ce
RD
4560def UpdateUIEvent_CanUpdate(*args, **kwargs):
4561 """UpdateUIEvent_CanUpdate(Window win) -> bool"""
54f9ee45 4562 return _core_.UpdateUIEvent_CanUpdate(*args, **kwargs)
d14a1e28 4563
e811c8ce
RD
4564def UpdateUIEvent_ResetUpdateTime(*args, **kwargs):
4565 """UpdateUIEvent_ResetUpdateTime()"""
54f9ee45 4566 return _core_.UpdateUIEvent_ResetUpdateTime(*args, **kwargs)
d14a1e28 4567
e811c8ce 4568def UpdateUIEvent_SetMode(*args, **kwargs):
196addbf 4569 """UpdateUIEvent_SetMode(int mode)"""
54f9ee45 4570 return _core_.UpdateUIEvent_SetMode(*args, **kwargs)
d14a1e28 4571
e811c8ce 4572def UpdateUIEvent_GetMode(*args, **kwargs):
196addbf 4573 """UpdateUIEvent_GetMode() -> int"""
54f9ee45 4574 return _core_.UpdateUIEvent_GetMode(*args, **kwargs)
d14a1e28
RD
4575
4576#---------------------------------------------------------------------------
4577
4578class SysColourChangedEvent(Event):
093d3ff1 4579 """Proxy of C++ SysColourChangedEvent class"""
e811c8ce
RD
4580 def __repr__(self):
4581 return "<%s.%s; proxy of C++ wxSysColourChangedEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 4582 def __init__(self, *args, **kwargs):
a95a7133 4583 """__init__(self) -> SysColourChangedEvent"""
54f9ee45 4584 newobj = _core_.new_SysColourChangedEvent(*args, **kwargs)
d14a1e28
RD
4585 self.this = newobj.this
4586 self.thisown = 1
4587 del newobj.thisown
d14a1e28
RD
4588
4589class SysColourChangedEventPtr(SysColourChangedEvent):
4590 def __init__(self, this):
4591 self.this = this
4592 if not hasattr(self,"thisown"): self.thisown = 0
4593 self.__class__ = SysColourChangedEvent
54f9ee45 4594_core_.SysColourChangedEvent_swigregister(SysColourChangedEventPtr)
d14a1e28
RD
4595
4596#---------------------------------------------------------------------------
4597
4598class MouseCaptureChangedEvent(Event):
093d3ff1 4599 """Proxy of C++ MouseCaptureChangedEvent class"""
e811c8ce
RD
4600 def __repr__(self):
4601 return "<%s.%s; proxy of C++ wxMouseCaptureChangedEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 4602 def __init__(self, *args, **kwargs):
a95a7133 4603 """__init__(self, int winid=0, Window gainedCapture=None) -> MouseCaptureChangedEvent"""
54f9ee45 4604 newobj = _core_.new_MouseCaptureChangedEvent(*args, **kwargs)
d14a1e28
RD
4605 self.this = newobj.this
4606 self.thisown = 1
4607 del newobj.thisown
e811c8ce 4608 def GetCapturedWindow(*args, **kwargs):
a95a7133 4609 """GetCapturedWindow(self) -> Window"""
54f9ee45 4610 return _core_.MouseCaptureChangedEvent_GetCapturedWindow(*args, **kwargs)
e811c8ce 4611
d14a1e28
RD
4612
4613class MouseCaptureChangedEventPtr(MouseCaptureChangedEvent):
4614 def __init__(self, this):
4615 self.this = this
4616 if not hasattr(self,"thisown"): self.thisown = 0
4617 self.__class__ = MouseCaptureChangedEvent
54f9ee45 4618_core_.MouseCaptureChangedEvent_swigregister(MouseCaptureChangedEventPtr)
d14a1e28
RD
4619
4620#---------------------------------------------------------------------------
4621
4622class DisplayChangedEvent(Event):
093d3ff1 4623 """Proxy of C++ DisplayChangedEvent class"""
e811c8ce
RD
4624 def __repr__(self):
4625 return "<%s.%s; proxy of C++ wxDisplayChangedEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 4626 def __init__(self, *args, **kwargs):
a95a7133 4627 """__init__(self) -> DisplayChangedEvent"""
54f9ee45 4628 newobj = _core_.new_DisplayChangedEvent(*args, **kwargs)
d14a1e28
RD
4629 self.this = newobj.this
4630 self.thisown = 1
4631 del newobj.thisown
d14a1e28
RD
4632
4633class DisplayChangedEventPtr(DisplayChangedEvent):
4634 def __init__(self, this):
4635 self.this = this
4636 if not hasattr(self,"thisown"): self.thisown = 0
4637 self.__class__ = DisplayChangedEvent
54f9ee45 4638_core_.DisplayChangedEvent_swigregister(DisplayChangedEventPtr)
d14a1e28
RD
4639
4640#---------------------------------------------------------------------------
4641
4642class PaletteChangedEvent(Event):
093d3ff1 4643 """Proxy of C++ PaletteChangedEvent class"""
e811c8ce
RD
4644 def __repr__(self):
4645 return "<%s.%s; proxy of C++ wxPaletteChangedEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 4646 def __init__(self, *args, **kwargs):
a95a7133 4647 """__init__(self, int id=0) -> PaletteChangedEvent"""
54f9ee45 4648 newobj = _core_.new_PaletteChangedEvent(*args, **kwargs)
d14a1e28
RD
4649 self.this = newobj.this
4650 self.thisown = 1
4651 del newobj.thisown
e811c8ce 4652 def SetChangedWindow(*args, **kwargs):
a95a7133 4653 """SetChangedWindow(self, Window win)"""
54f9ee45 4654 return _core_.PaletteChangedEvent_SetChangedWindow(*args, **kwargs)
e811c8ce
RD
4655
4656 def GetChangedWindow(*args, **kwargs):
a95a7133 4657 """GetChangedWindow(self) -> Window"""
54f9ee45 4658 return _core_.PaletteChangedEvent_GetChangedWindow(*args, **kwargs)
e811c8ce 4659
d14a1e28
RD
4660
4661class PaletteChangedEventPtr(PaletteChangedEvent):
4662 def __init__(self, this):
4663 self.this = this
4664 if not hasattr(self,"thisown"): self.thisown = 0
4665 self.__class__ = PaletteChangedEvent
54f9ee45 4666_core_.PaletteChangedEvent_swigregister(PaletteChangedEventPtr)
d14a1e28
RD
4667
4668#---------------------------------------------------------------------------
4669
4670class QueryNewPaletteEvent(Event):
093d3ff1 4671 """Proxy of C++ QueryNewPaletteEvent class"""
e811c8ce
RD
4672 def __repr__(self):
4673 return "<%s.%s; proxy of C++ wxQueryNewPaletteEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 4674 def __init__(self, *args, **kwargs):
a95a7133 4675 """__init__(self, int winid=0) -> QueryNewPaletteEvent"""
54f9ee45 4676 newobj = _core_.new_QueryNewPaletteEvent(*args, **kwargs)
d14a1e28
RD
4677 self.this = newobj.this
4678 self.thisown = 1
4679 del newobj.thisown
e811c8ce 4680 def SetPaletteRealized(*args, **kwargs):
a95a7133 4681 """SetPaletteRealized(self, bool realized)"""
54f9ee45 4682 return _core_.QueryNewPaletteEvent_SetPaletteRealized(*args, **kwargs)
e811c8ce
RD
4683
4684 def GetPaletteRealized(*args, **kwargs):
a95a7133 4685 """GetPaletteRealized(self) -> bool"""
54f9ee45 4686 return _core_.QueryNewPaletteEvent_GetPaletteRealized(*args, **kwargs)
e811c8ce 4687
d14a1e28
RD
4688
4689class QueryNewPaletteEventPtr(QueryNewPaletteEvent):
4690 def __init__(self, this):
4691 self.this = this
4692 if not hasattr(self,"thisown"): self.thisown = 0
4693 self.__class__ = QueryNewPaletteEvent
54f9ee45 4694_core_.QueryNewPaletteEvent_swigregister(QueryNewPaletteEventPtr)
d14a1e28
RD
4695
4696#---------------------------------------------------------------------------
4697
4698class NavigationKeyEvent(Event):
093d3ff1 4699 """Proxy of C++ NavigationKeyEvent class"""
e811c8ce
RD
4700 def __repr__(self):
4701 return "<%s.%s; proxy of C++ wxNavigationKeyEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 4702 def __init__(self, *args, **kwargs):
a95a7133 4703 """__init__(self) -> NavigationKeyEvent"""
54f9ee45 4704 newobj = _core_.new_NavigationKeyEvent(*args, **kwargs)
d14a1e28
RD
4705 self.this = newobj.this
4706 self.thisown = 1
4707 del newobj.thisown
e811c8ce 4708 def GetDirection(*args, **kwargs):
a95a7133 4709 """GetDirection(self) -> bool"""
54f9ee45 4710 return _core_.NavigationKeyEvent_GetDirection(*args, **kwargs)
e811c8ce
RD
4711
4712 def SetDirection(*args, **kwargs):
908b74cd 4713 """SetDirection(self, bool forward)"""
54f9ee45 4714 return _core_.NavigationKeyEvent_SetDirection(*args, **kwargs)
e811c8ce
RD
4715
4716 def IsWindowChange(*args, **kwargs):
a95a7133 4717 """IsWindowChange(self) -> bool"""
54f9ee45 4718 return _core_.NavigationKeyEvent_IsWindowChange(*args, **kwargs)
e811c8ce
RD
4719
4720 def SetWindowChange(*args, **kwargs):
908b74cd 4721 """SetWindowChange(self, bool ischange)"""
54f9ee45 4722 return _core_.NavigationKeyEvent_SetWindowChange(*args, **kwargs)
e811c8ce 4723
68350608
RD
4724 def IsFromTab(*args, **kwargs):
4725 """IsFromTab(self) -> bool"""
4726 return _core_.NavigationKeyEvent_IsFromTab(*args, **kwargs)
4727
4728 def SetFromTab(*args, **kwargs):
4729 """SetFromTab(self, bool bIs)"""
4730 return _core_.NavigationKeyEvent_SetFromTab(*args, **kwargs)
4731
908b74cd
RD
4732 def SetFlags(*args, **kwargs):
4733 """SetFlags(self, long flags)"""
4734 return _core_.NavigationKeyEvent_SetFlags(*args, **kwargs)
4735
e811c8ce 4736 def GetCurrentFocus(*args, **kwargs):
a95a7133 4737 """GetCurrentFocus(self) -> Window"""
54f9ee45 4738 return _core_.NavigationKeyEvent_GetCurrentFocus(*args, **kwargs)
e811c8ce
RD
4739
4740 def SetCurrentFocus(*args, **kwargs):
a95a7133 4741 """SetCurrentFocus(self, Window win)"""
54f9ee45 4742 return _core_.NavigationKeyEvent_SetCurrentFocus(*args, **kwargs)
e811c8ce 4743
b0f7404b 4744 IsBackward = _core_.NavigationKeyEvent_IsBackward
908b74cd
RD
4745 IsForward = _core_.NavigationKeyEvent_IsForward
4746 WinChange = _core_.NavigationKeyEvent_WinChange
68350608 4747 FromTab = _core_.NavigationKeyEvent_FromTab
d14a1e28
RD
4748
4749class NavigationKeyEventPtr(NavigationKeyEvent):
4750 def __init__(self, this):
4751 self.this = this
4752 if not hasattr(self,"thisown"): self.thisown = 0
4753 self.__class__ = NavigationKeyEvent
54f9ee45 4754_core_.NavigationKeyEvent_swigregister(NavigationKeyEventPtr)
d14a1e28
RD
4755
4756#---------------------------------------------------------------------------
4757
4758class WindowCreateEvent(CommandEvent):
093d3ff1 4759 """Proxy of C++ WindowCreateEvent class"""
e811c8ce
RD
4760 def __repr__(self):
4761 return "<%s.%s; proxy of C++ wxWindowCreateEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 4762 def __init__(self, *args, **kwargs):
a95a7133 4763 """__init__(self, Window win=None) -> WindowCreateEvent"""
54f9ee45 4764 newobj = _core_.new_WindowCreateEvent(*args, **kwargs)
d14a1e28
RD
4765 self.this = newobj.this
4766 self.thisown = 1
4767 del newobj.thisown
e811c8ce 4768 def GetWindow(*args, **kwargs):
a95a7133 4769 """GetWindow(self) -> Window"""
54f9ee45 4770 return _core_.WindowCreateEvent_GetWindow(*args, **kwargs)
e811c8ce 4771
d14a1e28
RD
4772
4773class WindowCreateEventPtr(WindowCreateEvent):
4774 def __init__(self, this):
4775 self.this = this
4776 if not hasattr(self,"thisown"): self.thisown = 0
4777 self.__class__ = WindowCreateEvent
54f9ee45 4778_core_.WindowCreateEvent_swigregister(WindowCreateEventPtr)
d14a1e28
RD
4779
4780class WindowDestroyEvent(CommandEvent):
093d3ff1 4781 """Proxy of C++ WindowDestroyEvent class"""
e811c8ce
RD
4782 def __repr__(self):
4783 return "<%s.%s; proxy of C++ wxWindowDestroyEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 4784 def __init__(self, *args, **kwargs):
a95a7133 4785 """__init__(self, Window win=None) -> WindowDestroyEvent"""
54f9ee45 4786 newobj = _core_.new_WindowDestroyEvent(*args, **kwargs)
d14a1e28
RD
4787 self.this = newobj.this
4788 self.thisown = 1
4789 del newobj.thisown
e811c8ce 4790 def GetWindow(*args, **kwargs):
a95a7133 4791 """GetWindow(self) -> Window"""
54f9ee45 4792 return _core_.WindowDestroyEvent_GetWindow(*args, **kwargs)
e811c8ce 4793
d14a1e28
RD
4794
4795class WindowDestroyEventPtr(WindowDestroyEvent):
4796 def __init__(self, this):
4797 self.this = this
4798 if not hasattr(self,"thisown"): self.thisown = 0
4799 self.__class__ = WindowDestroyEvent
54f9ee45 4800_core_.WindowDestroyEvent_swigregister(WindowDestroyEventPtr)
d14a1e28
RD
4801
4802#---------------------------------------------------------------------------
4803
4804class ContextMenuEvent(CommandEvent):
093d3ff1 4805 """Proxy of C++ ContextMenuEvent class"""
e811c8ce
RD
4806 def __repr__(self):
4807 return "<%s.%s; proxy of C++ wxContextMenuEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 4808 def __init__(self, *args, **kwargs):
a95a7133 4809 """__init__(self, wxEventType type=wxEVT_NULL, int winid=0, Point pt=DefaultPosition) -> ContextMenuEvent"""
54f9ee45 4810 newobj = _core_.new_ContextMenuEvent(*args, **kwargs)
d14a1e28
RD
4811 self.this = newobj.this
4812 self.thisown = 1
4813 del newobj.thisown
e811c8ce 4814 def GetPosition(*args, **kwargs):
a95a7133 4815 """GetPosition(self) -> Point"""
54f9ee45 4816 return _core_.ContextMenuEvent_GetPosition(*args, **kwargs)
e811c8ce
RD
4817
4818 def SetPosition(*args, **kwargs):
a95a7133 4819 """SetPosition(self, Point pos)"""
54f9ee45 4820 return _core_.ContextMenuEvent_SetPosition(*args, **kwargs)
e811c8ce 4821
d14a1e28
RD
4822
4823class ContextMenuEventPtr(ContextMenuEvent):
4824 def __init__(self, this):
4825 self.this = this
4826 if not hasattr(self,"thisown"): self.thisown = 0
4827 self.__class__ = ContextMenuEvent
54f9ee45 4828_core_.ContextMenuEvent_swigregister(ContextMenuEventPtr)
d14a1e28
RD
4829
4830#---------------------------------------------------------------------------
4831
54f9ee45
RD
4832IDLE_PROCESS_ALL = _core_.IDLE_PROCESS_ALL
4833IDLE_PROCESS_SPECIFIED = _core_.IDLE_PROCESS_SPECIFIED
d14a1e28 4834class IdleEvent(Event):
093d3ff1 4835 """Proxy of C++ IdleEvent class"""
e811c8ce
RD
4836 def __repr__(self):
4837 return "<%s.%s; proxy of C++ wxIdleEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 4838 def __init__(self, *args, **kwargs):
a95a7133 4839 """__init__(self) -> IdleEvent"""
54f9ee45 4840 newobj = _core_.new_IdleEvent(*args, **kwargs)
d14a1e28
RD
4841 self.this = newobj.this
4842 self.thisown = 1
4843 del newobj.thisown
e811c8ce 4844 def RequestMore(*args, **kwargs):
a95a7133 4845 """RequestMore(self, bool needMore=True)"""
54f9ee45 4846 return _core_.IdleEvent_RequestMore(*args, **kwargs)
e811c8ce
RD
4847
4848 def MoreRequested(*args, **kwargs):
a95a7133 4849 """MoreRequested(self) -> bool"""
54f9ee45 4850 return _core_.IdleEvent_MoreRequested(*args, **kwargs)
e811c8ce
RD
4851
4852 def SetMode(*args, **kwargs):
66c033b4 4853 """SetMode(int mode)"""
54f9ee45 4854 return _core_.IdleEvent_SetMode(*args, **kwargs)
e811c8ce
RD
4855
4856 SetMode = staticmethod(SetMode)
4857 def GetMode(*args, **kwargs):
66c033b4 4858 """GetMode() -> int"""
54f9ee45 4859 return _core_.IdleEvent_GetMode(*args, **kwargs)
e811c8ce
RD
4860
4861 GetMode = staticmethod(GetMode)
4862 def CanSend(*args, **kwargs):
66c033b4 4863 """CanSend(Window win) -> bool"""
54f9ee45 4864 return _core_.IdleEvent_CanSend(*args, **kwargs)
e811c8ce
RD
4865
4866 CanSend = staticmethod(CanSend)
d14a1e28
RD
4867
4868class IdleEventPtr(IdleEvent):
4869 def __init__(self, this):
4870 self.this = this
4871 if not hasattr(self,"thisown"): self.thisown = 0
4872 self.__class__ = IdleEvent
54f9ee45 4873_core_.IdleEvent_swigregister(IdleEventPtr)
d14a1e28 4874
e811c8ce 4875def IdleEvent_SetMode(*args, **kwargs):
196addbf 4876 """IdleEvent_SetMode(int mode)"""
54f9ee45 4877 return _core_.IdleEvent_SetMode(*args, **kwargs)
d14a1e28 4878
e811c8ce 4879def IdleEvent_GetMode(*args, **kwargs):
196addbf 4880 """IdleEvent_GetMode() -> int"""
54f9ee45 4881 return _core_.IdleEvent_GetMode(*args, **kwargs)
d14a1e28 4882
e811c8ce
RD
4883def IdleEvent_CanSend(*args, **kwargs):
4884 """IdleEvent_CanSend(Window win) -> bool"""
54f9ee45 4885 return _core_.IdleEvent_CanSend(*args, **kwargs)
d14a1e28
RD
4886
4887#---------------------------------------------------------------------------
4888
4889class PyEvent(Event):
093d3ff1 4890 """Proxy of C++ PyEvent class"""
e811c8ce
RD
4891 def __repr__(self):
4892 return "<%s.%s; proxy of C++ wxPyEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 4893 def __init__(self, *args, **kwargs):
a95a7133 4894 """__init__(self, int winid=0, wxEventType commandType=wxEVT_NULL) -> PyEvent"""
54f9ee45 4895 newobj = _core_.new_PyEvent(*args, **kwargs)
d14a1e28
RD
4896 self.this = newobj.this
4897 self.thisown = 1
4898 del newobj.thisown
4899 self.SetSelf(self)
e811c8ce 4900
54f9ee45 4901 def __del__(self, destroy=_core_.delete_PyEvent):
a95a7133 4902 """__del__(self)"""
d14a1e28
RD
4903 try:
4904 if self.thisown: destroy(self)
4905 except: pass
e811c8ce
RD
4906
4907 def SetSelf(*args, **kwargs):
a95a7133 4908 """SetSelf(self, PyObject self)"""
54f9ee45 4909 return _core_.PyEvent_SetSelf(*args, **kwargs)
e811c8ce
RD
4910
4911 def GetSelf(*args, **kwargs):
a95a7133 4912 """GetSelf(self) -> PyObject"""
54f9ee45 4913 return _core_.PyEvent_GetSelf(*args, **kwargs)
e811c8ce 4914
d14a1e28
RD
4915
4916class PyEventPtr(PyEvent):
4917 def __init__(self, this):
4918 self.this = this
4919 if not hasattr(self,"thisown"): self.thisown = 0
4920 self.__class__ = PyEvent
54f9ee45 4921_core_.PyEvent_swigregister(PyEventPtr)
d14a1e28
RD
4922
4923class PyCommandEvent(CommandEvent):
093d3ff1 4924 """Proxy of C++ PyCommandEvent class"""
e811c8ce
RD
4925 def __repr__(self):
4926 return "<%s.%s; proxy of C++ wxPyCommandEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 4927 def __init__(self, *args, **kwargs):
a95a7133 4928 """__init__(self, wxEventType commandType=wxEVT_NULL, int id=0) -> PyCommandEvent"""
54f9ee45 4929 newobj = _core_.new_PyCommandEvent(*args, **kwargs)
d14a1e28
RD
4930 self.this = newobj.this
4931 self.thisown = 1
4932 del newobj.thisown
4933 self.SetSelf(self)
e811c8ce 4934
54f9ee45 4935 def __del__(self, destroy=_core_.delete_PyCommandEvent):
a95a7133 4936 """__del__(self)"""
d14a1e28
RD
4937 try:
4938 if self.thisown: destroy(self)
4939 except: pass
e811c8ce
RD
4940
4941 def SetSelf(*args, **kwargs):
a95a7133 4942 """SetSelf(self, PyObject self)"""
54f9ee45 4943 return _core_.PyCommandEvent_SetSelf(*args, **kwargs)
e811c8ce
RD
4944
4945 def GetSelf(*args, **kwargs):
a95a7133 4946 """GetSelf(self) -> PyObject"""
54f9ee45 4947 return _core_.PyCommandEvent_GetSelf(*args, **kwargs)
e811c8ce 4948
d14a1e28
RD
4949
4950class PyCommandEventPtr(PyCommandEvent):
4951 def __init__(self, this):
4952 self.this = this
4953 if not hasattr(self,"thisown"): self.thisown = 0
4954 self.__class__ = PyCommandEvent
54f9ee45 4955_core_.PyCommandEvent_swigregister(PyCommandEventPtr)
d14a1e28 4956
53aa7709
RD
4957class DateEvent(CommandEvent):
4958 """Proxy of C++ DateEvent class"""
4959 def __repr__(self):
4960 return "<%s.%s; proxy of C++ wxDateEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
4961 def __init__(self, *args, **kwargs):
4962 """__init__(self, Window win, DateTime dt, wxEventType type) -> DateEvent"""
4963 newobj = _core_.new_DateEvent(*args, **kwargs)
4964 self.this = newobj.this
4965 self.thisown = 1
4966 del newobj.thisown
4967 def GetDate(*args, **kwargs):
4968 """GetDate(self) -> DateTime"""
4969 return _core_.DateEvent_GetDate(*args, **kwargs)
4970
4971 def SetDate(*args, **kwargs):
4972 """SetDate(self, DateTime date)"""
4973 return _core_.DateEvent_SetDate(*args, **kwargs)
4974
4975
4976class DateEventPtr(DateEvent):
4977 def __init__(self, this):
4978 self.this = this
4979 if not hasattr(self,"thisown"): self.thisown = 0
4980 self.__class__ = DateEvent
4981_core_.DateEvent_swigregister(DateEventPtr)
4982
4983wxEVT_DATE_CHANGED = _core_.wxEVT_DATE_CHANGED
4984EVT_DATE_CHANGED = wx.PyEventBinder( wxEVT_DATE_CHANGED, 1 )
4985
d14a1e28
RD
4986#---------------------------------------------------------------------------
4987
54f9ee45
RD
4988PYAPP_ASSERT_SUPPRESS = _core_.PYAPP_ASSERT_SUPPRESS
4989PYAPP_ASSERT_EXCEPTION = _core_.PYAPP_ASSERT_EXCEPTION
4990PYAPP_ASSERT_DIALOG = _core_.PYAPP_ASSERT_DIALOG
4991PYAPP_ASSERT_LOG = _core_.PYAPP_ASSERT_LOG
4992PRINT_WINDOWS = _core_.PRINT_WINDOWS
4993PRINT_POSTSCRIPT = _core_.PRINT_POSTSCRIPT
d14a1e28 4994class PyApp(EvtHandler):
66c033b4
RD
4995 """
4996 The ``wx.PyApp`` class is an *implementation detail*, please use the
4997 `wx.App` class (or some other derived class) instead.
4998 """
e811c8ce
RD
4999 def __repr__(self):
5000 return "<%s.%s; proxy of C++ wxPyApp instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 5001 def __init__(self, *args, **kwargs):
98e665d3 5002 """
a95a7133 5003 __init__(self) -> PyApp
98e665d3
RD
5004
5005 Create a new application object, starting the bootstrap process.
5006 """
54f9ee45 5007 newobj = _core_.new_PyApp(*args, **kwargs)
d14a1e28
RD
5008 self.this = newobj.this
5009 self.thisown = 1
5010 del newobj.thisown
70b7a5fe
RD
5011 self._setCallbackInfo(self, PyApp, False)
5012 self._setOORInfo(self, False)
e811c8ce 5013
54f9ee45 5014 def __del__(self, destroy=_core_.delete_PyApp):
a95a7133 5015 """__del__(self)"""
d14a1e28
RD
5016 try:
5017 if self.thisown: destroy(self)
5018 except: pass
e811c8ce
RD
5019
5020 def _setCallbackInfo(*args, **kwargs):
70b7a5fe 5021 """_setCallbackInfo(self, PyObject self, PyObject _class, bool incref)"""
54f9ee45 5022 return _core_.PyApp__setCallbackInfo(*args, **kwargs)
e811c8ce
RD
5023
5024 def GetAppName(*args, **kwargs):
0df68c9f 5025 """
a95a7133 5026 GetAppName(self) -> String
6c3b4aae 5027
0df68c9f
RD
5028 Get the application name.
5029 """
54f9ee45 5030 return _core_.PyApp_GetAppName(*args, **kwargs)
e811c8ce
RD
5031
5032 def SetAppName(*args, **kwargs):
0df68c9f 5033 """
a95a7133 5034 SetAppName(self, String name)
6c3b4aae 5035
66c033b4
RD
5036 Set the application name. This value may be used automatically by
5037 `wx.Config` and such.
0df68c9f 5038 """
54f9ee45 5039 return _core_.PyApp_SetAppName(*args, **kwargs)
e811c8ce
RD
5040
5041 def GetClassName(*args, **kwargs):
0df68c9f 5042 """
a95a7133 5043 GetClassName(self) -> String
e811c8ce 5044
0df68c9f
RD
5045 Get the application's class name.
5046 """
54f9ee45 5047 return _core_.PyApp_GetClassName(*args, **kwargs)
e811c8ce
RD
5048
5049 def SetClassName(*args, **kwargs):
0df68c9f 5050 """
a95a7133 5051 SetClassName(self, String name)
6c3b4aae 5052
66c033b4
RD
5053 Set the application's class name. This value may be used for
5054 X-resources if applicable for the platform
0df68c9f 5055 """
54f9ee45 5056 return _core_.PyApp_SetClassName(*args, **kwargs)
e811c8ce
RD
5057
5058 def GetVendorName(*args, **kwargs):
0df68c9f 5059 """
a95a7133 5060 GetVendorName(self) -> String
6c3b4aae 5061
0df68c9f
RD
5062 Get the application's vendor name.
5063 """
54f9ee45 5064 return _core_.PyApp_GetVendorName(*args, **kwargs)
e811c8ce
RD
5065
5066 def SetVendorName(*args, **kwargs):
0df68c9f 5067 """
a95a7133 5068 SetVendorName(self, String name)
6c3b4aae 5069
66c033b4
RD
5070 Set the application's vendor name. This value may be used
5071 automatically by `wx.Config` and such.
0df68c9f 5072 """
54f9ee45 5073 return _core_.PyApp_SetVendorName(*args, **kwargs)
e811c8ce
RD
5074
5075 def GetTraits(*args, **kwargs):
0df68c9f 5076 """
a95a7133 5077 GetTraits(self) -> wxAppTraits
6c3b4aae 5078
66c033b4
RD
5079 Return (and create if necessary) the app traits object to which we
5080 delegate for everything which either should be configurable by the
5081 user (then he can change the default behaviour simply by overriding
5082 CreateTraits() and returning his own traits object) or which is
5083 GUI/console dependent as then wx.AppTraits allows us to abstract the
5084 differences behind the common facade.
5085
5086 :todo: Add support for overriding CreateAppTraits in wxPython.
0df68c9f 5087 """
54f9ee45 5088 return _core_.PyApp_GetTraits(*args, **kwargs)
e811c8ce
RD
5089
5090 def ProcessPendingEvents(*args, **kwargs):
0df68c9f 5091 """
a95a7133 5092 ProcessPendingEvents(self)
6c3b4aae 5093
66c033b4
RD
5094 Process all events in the Pending Events list -- it is necessary to
5095 call this function to process posted events. This normally happens
5096 during each event loop iteration.
0df68c9f 5097 """
54f9ee45 5098 return _core_.PyApp_ProcessPendingEvents(*args, **kwargs)
e811c8ce
RD
5099
5100 def Yield(*args, **kwargs):
0df68c9f 5101 """
a95a7133 5102 Yield(self, bool onlyIfNeeded=False) -> bool
6c3b4aae 5103
66c033b4
RD
5104 Process all currently pending events right now, instead of waiting
5105 until return to the event loop. It is an error to call ``Yield``
5106 recursively unless the value of ``onlyIfNeeded`` is True.
6c3b4aae 5107
66c033b4 5108 :warning: This function is dangerous as it can lead to unexpected
41e2b43e
RD
5109 reentrancies (i.e. when called from an event handler it may
5110 result in calling the same event handler again), use with
5111 extreme care or, better, don't use at all!
0df68c9f 5112
66c033b4 5113 :see: `wx.Yield`, `wx.YieldIfNeeded`, `wx.SafeYield`
41e2b43e 5114
0df68c9f 5115 """
54f9ee45 5116 return _core_.PyApp_Yield(*args, **kwargs)
e811c8ce
RD
5117
5118 def WakeUpIdle(*args, **kwargs):
0df68c9f 5119 """
a95a7133 5120 WakeUpIdle(self)
6c3b4aae 5121
66c033b4
RD
5122 Make sure that idle events are sent again.
5123 :see: `wx.WakeUpIdle`
0df68c9f 5124 """
54f9ee45 5125 return _core_.PyApp_WakeUpIdle(*args, **kwargs)
e811c8ce 5126
1fc3b23a
RD
5127 def IsMainLoopRunning(*args, **kwargs):
5128 """
5129 IsMainLoopRunning() -> bool
5130
5131 Returns True if we're running the main loop, i.e. if the events can
5132 currently be dispatched.
5133 """
5134 return _core_.PyApp_IsMainLoopRunning(*args, **kwargs)
5135
5136 IsMainLoopRunning = staticmethod(IsMainLoopRunning)
e811c8ce 5137 def MainLoop(*args, **kwargs):
0df68c9f 5138 """
a95a7133 5139 MainLoop(self) -> int
6c3b4aae 5140
66c033b4
RD
5141 Execute the main GUI loop, the function doesn't normally return until
5142 all top level windows have been closed and destroyed.
0df68c9f 5143 """
54f9ee45 5144 return _core_.PyApp_MainLoop(*args, **kwargs)
e811c8ce
RD
5145
5146 def Exit(*args, **kwargs):
0df68c9f 5147 """
a95a7133 5148 Exit(self)
6c3b4aae 5149
0df68c9f 5150 Exit the main loop thus terminating the application.
66c033b4 5151 :see: `wx.Exit`
0df68c9f 5152 """
54f9ee45 5153 return _core_.PyApp_Exit(*args, **kwargs)
e811c8ce
RD
5154
5155 def ExitMainLoop(*args, **kwargs):
0df68c9f 5156 """
a95a7133 5157 ExitMainLoop(self)
6c3b4aae 5158
66c033b4
RD
5159 Exit the main GUI loop during the next iteration of the main
5160 loop, (i.e. it does not stop the program immediately!)
0df68c9f 5161 """
54f9ee45 5162 return _core_.PyApp_ExitMainLoop(*args, **kwargs)
e811c8ce
RD
5163
5164 def Pending(*args, **kwargs):
0df68c9f 5165 """
a95a7133 5166 Pending(self) -> bool
6c3b4aae 5167
0df68c9f
RD
5168 Returns True if there are unprocessed events in the event queue.
5169 """
54f9ee45 5170 return _core_.PyApp_Pending(*args, **kwargs)
e811c8ce
RD
5171
5172 def Dispatch(*args, **kwargs):
0df68c9f 5173 """
a95a7133 5174 Dispatch(self) -> bool
6c3b4aae 5175
0df68c9f
RD
5176 Process the first event in the event queue (blocks until an event
5177 appears if there are none currently)
5178 """
54f9ee45 5179 return _core_.PyApp_Dispatch(*args, **kwargs)
e811c8ce
RD
5180
5181 def ProcessIdle(*args, **kwargs):
0df68c9f 5182 """
a95a7133 5183 ProcessIdle(self) -> bool
6c3b4aae 5184
66c033b4
RD
5185 Called from the MainLoop when the application becomes idle (there are
5186 no pending events) and sends a `wx.IdleEvent` to all interested
5187 parties. Returns True if more idle events are needed, False if not.
0df68c9f 5188 """
54f9ee45 5189 return _core_.PyApp_ProcessIdle(*args, **kwargs)
e811c8ce
RD
5190
5191 def SendIdleEvents(*args, **kwargs):
0df68c9f 5192 """
a95a7133 5193 SendIdleEvents(self, Window win, IdleEvent event) -> bool
e811c8ce 5194
66c033b4
RD
5195 Send idle event to window and all subwindows. Returns True if more
5196 idle time is requested.
0df68c9f 5197 """
54f9ee45 5198 return _core_.PyApp_SendIdleEvents(*args, **kwargs)
e811c8ce
RD
5199
5200 def IsActive(*args, **kwargs):
0df68c9f 5201 """
a95a7133 5202 IsActive(self) -> bool
6c3b4aae 5203
0df68c9f
RD
5204 Return True if our app has focus.
5205 """
54f9ee45 5206 return _core_.PyApp_IsActive(*args, **kwargs)
e811c8ce
RD
5207
5208 def SetTopWindow(*args, **kwargs):
0df68c9f 5209 """
a95a7133 5210 SetTopWindow(self, Window win)
6c3b4aae 5211
66c033b4 5212 Set the *main* top level window
0df68c9f 5213 """
54f9ee45 5214 return _core_.PyApp_SetTopWindow(*args, **kwargs)
e811c8ce
RD
5215
5216 def GetTopWindow(*args, **kwargs):
0df68c9f 5217 """
a95a7133 5218 GetTopWindow(self) -> Window
6c3b4aae 5219
66c033b4
RD
5220 Return the *main* top level window (if it hadn't been set previously
5221 with SetTopWindow(), will return just some top level window and, if
5222 there not any, will return None)
0df68c9f 5223 """
54f9ee45 5224 return _core_.PyApp_GetTopWindow(*args, **kwargs)
e811c8ce
RD
5225
5226 def SetExitOnFrameDelete(*args, **kwargs):
0df68c9f 5227 """
a95a7133 5228 SetExitOnFrameDelete(self, bool flag)
0df68c9f 5229
66c033b4
RD
5230 Control the exit behaviour: by default, the program will exit the main
5231 loop (and so, usually, terminate) when the last top-level program
5232 window is deleted. Beware that if you disable this behaviour (with
5233 SetExitOnFrameDelete(False)), you'll have to call ExitMainLoop()
5234 explicitly from somewhere.
0df68c9f 5235 """
54f9ee45 5236 return _core_.PyApp_SetExitOnFrameDelete(*args, **kwargs)
e811c8ce
RD
5237
5238 def GetExitOnFrameDelete(*args, **kwargs):
0df68c9f 5239 """
a95a7133 5240 GetExitOnFrameDelete(self) -> bool
6c3b4aae 5241
0df68c9f
RD
5242 Get the current exit behaviour setting.
5243 """
54f9ee45 5244 return _core_.PyApp_GetExitOnFrameDelete(*args, **kwargs)
e811c8ce
RD
5245
5246 def SetUseBestVisual(*args, **kwargs):
0df68c9f 5247 """
a95a7133 5248 SetUseBestVisual(self, bool flag)
6c3b4aae 5249
66c033b4
RD
5250 Set whether the app should try to use the best available visual on
5251 systems where more than one is available, (Sun, SGI, XFree86 4, etc.)
0df68c9f 5252 """
54f9ee45 5253 return _core_.PyApp_SetUseBestVisual(*args, **kwargs)
e811c8ce
RD
5254
5255 def GetUseBestVisual(*args, **kwargs):
0df68c9f 5256 """
a95a7133 5257 GetUseBestVisual(self) -> bool
6c3b4aae 5258
0df68c9f
RD
5259 Get current UseBestVisual setting.
5260 """
54f9ee45 5261 return _core_.PyApp_GetUseBestVisual(*args, **kwargs)
e811c8ce
RD
5262
5263 def SetPrintMode(*args, **kwargs):
a95a7133 5264 """SetPrintMode(self, int mode)"""
54f9ee45 5265 return _core_.PyApp_SetPrintMode(*args, **kwargs)
e811c8ce
RD
5266
5267 def GetPrintMode(*args, **kwargs):
a95a7133 5268 """GetPrintMode(self) -> int"""
54f9ee45 5269 return _core_.PyApp_GetPrintMode(*args, **kwargs)
e811c8ce 5270
e811c8ce 5271 def SetAssertMode(*args, **kwargs):
0df68c9f 5272 """
a95a7133 5273 SetAssertMode(self, int mode)
6c3b4aae 5274
41e2b43e 5275 Set the OnAssert behaviour for debug and hybrid builds.
0df68c9f 5276 """
54f9ee45 5277 return _core_.PyApp_SetAssertMode(*args, **kwargs)
e811c8ce 5278
6c3b4aae 5279 def GetAssertMode(*args, **kwargs):
0df68c9f 5280 """
a95a7133 5281 GetAssertMode(self) -> int
6c3b4aae 5282
0df68c9f
RD
5283 Get the current OnAssert behaviour setting.
5284 """
54f9ee45 5285 return _core_.PyApp_GetAssertMode(*args, **kwargs)
6c3b4aae 5286
e811c8ce 5287 def GetMacSupportPCMenuShortcuts(*args, **kwargs):
66c033b4 5288 """GetMacSupportPCMenuShortcuts() -> bool"""
54f9ee45 5289 return _core_.PyApp_GetMacSupportPCMenuShortcuts(*args, **kwargs)
e811c8ce
RD
5290
5291 GetMacSupportPCMenuShortcuts = staticmethod(GetMacSupportPCMenuShortcuts)
5292 def GetMacAboutMenuItemId(*args, **kwargs):
66c033b4 5293 """GetMacAboutMenuItemId() -> long"""
54f9ee45 5294 return _core_.PyApp_GetMacAboutMenuItemId(*args, **kwargs)
e811c8ce
RD
5295
5296 GetMacAboutMenuItemId = staticmethod(GetMacAboutMenuItemId)
5297 def GetMacPreferencesMenuItemId(*args, **kwargs):
66c033b4 5298 """GetMacPreferencesMenuItemId() -> long"""
54f9ee45 5299 return _core_.PyApp_GetMacPreferencesMenuItemId(*args, **kwargs)
e811c8ce
RD
5300
5301 GetMacPreferencesMenuItemId = staticmethod(GetMacPreferencesMenuItemId)
5302 def GetMacExitMenuItemId(*args, **kwargs):
66c033b4 5303 """GetMacExitMenuItemId() -> long"""
54f9ee45 5304 return _core_.PyApp_GetMacExitMenuItemId(*args, **kwargs)
e811c8ce
RD
5305
5306 GetMacExitMenuItemId = staticmethod(GetMacExitMenuItemId)
5307 def GetMacHelpMenuTitleName(*args, **kwargs):
66c033b4 5308 """GetMacHelpMenuTitleName() -> String"""
54f9ee45 5309 return _core_.PyApp_GetMacHelpMenuTitleName(*args, **kwargs)
e811c8ce
RD
5310
5311 GetMacHelpMenuTitleName = staticmethod(GetMacHelpMenuTitleName)
5312 def SetMacSupportPCMenuShortcuts(*args, **kwargs):
66c033b4 5313 """SetMacSupportPCMenuShortcuts(bool val)"""
54f9ee45 5314 return _core_.PyApp_SetMacSupportPCMenuShortcuts(*args, **kwargs)
e811c8ce
RD
5315
5316 SetMacSupportPCMenuShortcuts = staticmethod(SetMacSupportPCMenuShortcuts)
5317 def SetMacAboutMenuItemId(*args, **kwargs):
66c033b4 5318 """SetMacAboutMenuItemId(long val)"""
54f9ee45 5319 return _core_.PyApp_SetMacAboutMenuItemId(*args, **kwargs)
e811c8ce
RD
5320
5321 SetMacAboutMenuItemId = staticmethod(SetMacAboutMenuItemId)
5322 def SetMacPreferencesMenuItemId(*args, **kwargs):
66c033b4 5323 """SetMacPreferencesMenuItemId(long val)"""
54f9ee45 5324 return _core_.PyApp_SetMacPreferencesMenuItemId(*args, **kwargs)
e811c8ce
RD
5325
5326 SetMacPreferencesMenuItemId = staticmethod(SetMacPreferencesMenuItemId)
5327 def SetMacExitMenuItemId(*args, **kwargs):
66c033b4 5328 """SetMacExitMenuItemId(long val)"""
54f9ee45 5329 return _core_.PyApp_SetMacExitMenuItemId(*args, **kwargs)
e811c8ce
RD
5330
5331 SetMacExitMenuItemId = staticmethod(SetMacExitMenuItemId)
5332 def SetMacHelpMenuTitleName(*args, **kwargs):
66c033b4 5333 """SetMacHelpMenuTitleName(String val)"""
54f9ee45 5334 return _core_.PyApp_SetMacHelpMenuTitleName(*args, **kwargs)
e811c8ce
RD
5335
5336 SetMacHelpMenuTitleName = staticmethod(SetMacHelpMenuTitleName)
5337 def _BootstrapApp(*args, **kwargs):
0df68c9f 5338 """
a95a7133 5339 _BootstrapApp(self)
6c3b4aae 5340
0df68c9f
RD
5341 For internal use only
5342 """
54f9ee45 5343 return _core_.PyApp__BootstrapApp(*args, **kwargs)
e811c8ce
RD
5344
5345 def GetComCtl32Version(*args, **kwargs):
0df68c9f 5346 """
66c033b4 5347 GetComCtl32Version() -> int
6c3b4aae 5348
66c033b4
RD
5349 Returns 400, 470, 471, etc. for comctl32.dll 4.00, 4.70, 4.71 or 0 if
5350 it wasn't found at all. Raises an exception on non-Windows platforms.
0df68c9f 5351 """
54f9ee45 5352 return _core_.PyApp_GetComCtl32Version(*args, **kwargs)
e811c8ce
RD
5353
5354 GetComCtl32Version = staticmethod(GetComCtl32Version)
d14a1e28
RD
5355
5356class PyAppPtr(PyApp):
5357 def __init__(self, this):
5358 self.this = this
5359 if not hasattr(self,"thisown"): self.thisown = 0
5360 self.__class__ = PyApp
54f9ee45 5361_core_.PyApp_swigregister(PyAppPtr)
d14a1e28 5362
1fc3b23a
RD
5363def PyApp_IsMainLoopRunning(*args, **kwargs):
5364 """
5365 PyApp_IsMainLoopRunning() -> bool
5366
5367 Returns True if we're running the main loop, i.e. if the events can
5368 currently be dispatched.
5369 """
5370 return _core_.PyApp_IsMainLoopRunning(*args, **kwargs)
5371
e811c8ce
RD
5372def PyApp_GetMacSupportPCMenuShortcuts(*args, **kwargs):
5373 """PyApp_GetMacSupportPCMenuShortcuts() -> bool"""
54f9ee45 5374 return _core_.PyApp_GetMacSupportPCMenuShortcuts(*args, **kwargs)
d14a1e28 5375
e811c8ce
RD
5376def PyApp_GetMacAboutMenuItemId(*args, **kwargs):
5377 """PyApp_GetMacAboutMenuItemId() -> long"""
54f9ee45 5378 return _core_.PyApp_GetMacAboutMenuItemId(*args, **kwargs)
d14a1e28 5379
e811c8ce
RD
5380def PyApp_GetMacPreferencesMenuItemId(*args, **kwargs):
5381 """PyApp_GetMacPreferencesMenuItemId() -> long"""
54f9ee45 5382 return _core_.PyApp_GetMacPreferencesMenuItemId(*args, **kwargs)
d14a1e28 5383
e811c8ce
RD
5384def PyApp_GetMacExitMenuItemId(*args, **kwargs):
5385 """PyApp_GetMacExitMenuItemId() -> long"""
54f9ee45 5386 return _core_.PyApp_GetMacExitMenuItemId(*args, **kwargs)
d14a1e28 5387
e811c8ce 5388def PyApp_GetMacHelpMenuTitleName(*args, **kwargs):
196addbf 5389 """PyApp_GetMacHelpMenuTitleName() -> String"""
54f9ee45 5390 return _core_.PyApp_GetMacHelpMenuTitleName(*args, **kwargs)
d14a1e28 5391
e811c8ce
RD
5392def PyApp_SetMacSupportPCMenuShortcuts(*args, **kwargs):
5393 """PyApp_SetMacSupportPCMenuShortcuts(bool val)"""
54f9ee45 5394 return _core_.PyApp_SetMacSupportPCMenuShortcuts(*args, **kwargs)
d14a1e28 5395
e811c8ce
RD
5396def PyApp_SetMacAboutMenuItemId(*args, **kwargs):
5397 """PyApp_SetMacAboutMenuItemId(long val)"""
54f9ee45 5398 return _core_.PyApp_SetMacAboutMenuItemId(*args, **kwargs)
d14a1e28 5399
e811c8ce
RD
5400def PyApp_SetMacPreferencesMenuItemId(*args, **kwargs):
5401 """PyApp_SetMacPreferencesMenuItemId(long val)"""
54f9ee45 5402 return _core_.PyApp_SetMacPreferencesMenuItemId(*args, **kwargs)
d14a1e28 5403
e811c8ce
RD
5404def PyApp_SetMacExitMenuItemId(*args, **kwargs):
5405 """PyApp_SetMacExitMenuItemId(long val)"""
54f9ee45 5406 return _core_.PyApp_SetMacExitMenuItemId(*args, **kwargs)
d14a1e28 5407
e811c8ce 5408def PyApp_SetMacHelpMenuTitleName(*args, **kwargs):
196addbf 5409 """PyApp_SetMacHelpMenuTitleName(String val)"""
54f9ee45 5410 return _core_.PyApp_SetMacHelpMenuTitleName(*args, **kwargs)
d14a1e28 5411
e811c8ce 5412def PyApp_GetComCtl32Version(*args, **kwargs):
0df68c9f
RD
5413 """
5414 PyApp_GetComCtl32Version() -> int
6c3b4aae 5415
66c033b4
RD
5416 Returns 400, 470, 471, etc. for comctl32.dll 4.00, 4.70, 4.71 or 0 if
5417 it wasn't found at all. Raises an exception on non-Windows platforms.
0df68c9f 5418 """
54f9ee45 5419 return _core_.PyApp_GetComCtl32Version(*args, **kwargs)
d14a1e28
RD
5420
5421#---------------------------------------------------------------------------
5422
5423
e811c8ce 5424def Exit(*args, **kwargs):
0df68c9f
RD
5425 """
5426 Exit()
6c3b4aae 5427
0df68c9f
RD
5428 Force an exit of the application. Convenience for wx.GetApp().Exit()
5429 """
54f9ee45 5430 return _core_.Exit(*args, **kwargs)
d14a1e28 5431
e811c8ce 5432def Yield(*args, **kwargs):
0df68c9f
RD
5433 """
5434 Yield() -> bool
6c3b4aae 5435
0df68c9f
RD
5436 Yield to other apps/messages. Convenience for wx.GetApp().Yield()
5437 """
54f9ee45 5438 return _core_.Yield(*args, **kwargs)
d14a1e28 5439
e811c8ce 5440def YieldIfNeeded(*args, **kwargs):
0df68c9f
RD
5441 """
5442 YieldIfNeeded() -> bool
6c3b4aae 5443
0df68c9f
RD
5444 Yield to other apps/messages. Convenience for wx.GetApp().Yield(True)
5445 """
54f9ee45 5446 return _core_.YieldIfNeeded(*args, **kwargs)
d14a1e28 5447
e811c8ce 5448def SafeYield(*args, **kwargs):
0df68c9f
RD
5449 """
5450 SafeYield(Window win=None, bool onlyIfNeeded=False) -> bool
6c3b4aae 5451
66c033b4
RD
5452 This function is similar to `wx.Yield`, except that it disables the
5453 user input to all program windows before calling `wx.Yield` and
5454 re-enables it again afterwards. If ``win`` is not None, this window
5455 will remain enabled, allowing the implementation of some limited user
5456 interaction.
6c3b4aae 5457
66c033b4 5458 :Returns: the result of the call to `wx.Yield`.
0df68c9f 5459 """
54f9ee45 5460 return _core_.SafeYield(*args, **kwargs)
d14a1e28 5461
e811c8ce 5462def WakeUpIdle(*args, **kwargs):
0df68c9f
RD
5463 """
5464 WakeUpIdle()
6c3b4aae 5465
66c033b4
RD
5466 Cause the message queue to become empty again, so idle events will be
5467 sent.
0df68c9f 5468 """
54f9ee45 5469 return _core_.WakeUpIdle(*args, **kwargs)
d14a1e28 5470
e811c8ce 5471def PostEvent(*args, **kwargs):
0df68c9f
RD
5472 """
5473 PostEvent(EvtHandler dest, Event event)
6c3b4aae 5474
66c033b4
RD
5475 Send an event to a window or other wx.EvtHandler to be processed
5476 later.
0df68c9f 5477 """
54f9ee45 5478 return _core_.PostEvent(*args, **kwargs)
d14a1e28 5479
e811c8ce 5480def App_CleanUp(*args, **kwargs):
0df68c9f
RD
5481 """
5482 App_CleanUp()
6c3b4aae 5483
41e2b43e 5484 For internal use only, it is used to cleanup after wxWidgets when
66c033b4 5485 Python shuts down.
0df68c9f 5486 """
54f9ee45 5487 return _core_.App_CleanUp(*args, **kwargs)
d14a1e28 5488
e811c8ce 5489def GetApp(*args, **kwargs):
0df68c9f
RD
5490 """
5491 GetApp() -> PyApp
6c3b4aae 5492
196addbf 5493 Return a reference to the current wx.App object.
0df68c9f 5494 """
54f9ee45 5495 return _core_.GetApp(*args, **kwargs)
5cbf236d
RD
5496
5497def SetDefaultPyEncoding(*args, **kwargs):
5498 """
5499 SetDefaultPyEncoding(string encoding)
5500
5501 Sets the encoding that wxPython will use when it needs to convert a
5502 Python string or unicode object to or from a wxString.
e505d15e
RD
5503
5504 The default encoding is the value of ``locale.getdefaultlocale()[1]``
5505 but please be aware that the default encoding within the same locale
5506 may be slightly different on different platforms. For example, please
5507 see http://www.alanwood.net/demos/charsetdiffs.html for differences
5508 between the common latin/roman encodings.
5cbf236d
RD
5509 """
5510 return _core_.SetDefaultPyEncoding(*args, **kwargs)
5511
5512def GetDefaultPyEncoding(*args, **kwargs):
5513 """
5514 GetDefaultPyEncoding() -> string
5515
5516 Gets the current encoding that wxPython will use when it needs to
5517 convert a Python string or unicode object to or from a wxString.
5518 """
5519 return _core_.GetDefaultPyEncoding(*args, **kwargs)
d14a1e28
RD
5520#----------------------------------------------------------------------
5521
5522class PyOnDemandOutputWindow:
6c3b4aae
RD
5523 """
5524 A class that can be used for redirecting Python's stdout and
5525 stderr streams. It will do nothing until something is wrriten to
5526 the stream at which point it will create a Frame with a text area
5527 and write the text there.
5528 """
d14a1e28
RD
5529 def __init__(self, title = "wxPython: stdout/stderr"):
5530 self.frame = None
5531 self.title = title
412d302d
RD
5532 self.pos = wx.DefaultPosition
5533 self.size = (450, 300)
d14a1e28
RD
5534 self.parent = None
5535
5536 def SetParent(self, parent):
6c3b4aae 5537 """Set the window to be used as the popup Frame's parent."""
d14a1e28
RD
5538 self.parent = parent
5539
6c3b4aae
RD
5540
5541 def CreateOutputWindow(self, st):
412d302d
RD
5542 self.frame = wx.Frame(self.parent, -1, self.title, self.pos, self.size,
5543 style=wx.DEFAULT_FRAME_STYLE)
196addbf 5544 self.text = wx.TextCtrl(self.frame, -1, "",
412d302d 5545 style=wx.TE_MULTILINE|wx.TE_READONLY)
d1e20054 5546 self.text.AppendText(st)
6c3b4aae
RD
5547 self.frame.Show(True)
5548 EVT_CLOSE(self.frame, self.OnCloseWindow)
5549
d14a1e28 5550
7409c0c6
RD
5551 def OnCloseWindow(self, event):
5552 if self.frame is not None:
5553 self.frame.Destroy()
5554 self.frame = None
5555 self.text = None
5556
5557
d14a1e28 5558 # These methods provide the file-like output behaviour.
6c3b4aae
RD
5559 def write(self, text):
5560 """
5561 Create the output window if needed and write the string to it.
5562 If not called in the context of the gui thread then uses
5563 CallAfter to do the work there.
5564 """
5565 if self.frame is None:
5566 if not wx.Thread_IsMain():
5567 wx.CallAfter(self.CreateOutputWindow, text)
5568 else:
5569 self.CreateOutputWindow(text)
5570 else:
5571 if not wx.Thread_IsMain():
5572 wx.CallAfter(self.text.AppendText, text)
5573 else:
5574 self.text.AppendText(text)
5575
d14a1e28
RD
5576
5577 def close(self):
6c3b4aae
RD
5578 if self.frame is not None:
5579 wx.CallAfter(self.frame.Close)
5580
d14a1e28 5581
19272049
RD
5582 def flush(self):
5583 pass
5584
5585
d14a1e28
RD
5586
5587#----------------------------------------------------------------------
d14a1e28
RD
5588
5589_defRedirect = (wx.Platform == '__WXMSW__' or wx.Platform == '__WXMAC__')
5590
5591class App(wx.PyApp):
6c3b4aae 5592 """
66c033b4
RD
5593 The ``wx.App`` class represents the application and is used to:
5594
5595 * bootstrap the wxPython system and initialize the underlying
5596 gui toolkit
5597 * set and get application-wide properties
5598 * implement the windowing system main message or event loop,
5599 and to dispatch events to window instances
5600 * etc.
5601
5602 Every application must have a ``wx.App`` instance, and all
5603 creation of UI objects should be delayed until after the
03e37cd5
RD
5604 ``wx.App`` object has been created in order to ensure that the gui
5605 platform and wxWidgets have been fully initialized.
66c033b4
RD
5606
5607 Normally you would derive from this class and implement an
5608 ``OnInit`` method that creates a frame and then calls
5609 ``self.SetTopWindow(frame)``.
5610
03e37cd5 5611 :see: `wx.PySimpleApp` for a simpler app class that can be used
1c0f361b 5612 directly.
6c3b4aae 5613 """
66c033b4 5614
d14a1e28
RD
5615 outputWindowClass = PyOnDemandOutputWindow
5616
03e37cd5
RD
5617 def __init__(self, redirect=_defRedirect, filename=None,
5618 useBestVisual=False, clearSigInt=True):
66c033b4
RD
5619 """
5620 Construct a ``wx.App`` object.
5621
03e37cd5
RD
5622 :param redirect: Should ``sys.stdout`` and ``sys.stderr`` be
5623 redirected? Defaults to True on Windows and Mac, False
5624 otherwise. If `filename` is None then output will be
5625 redirected to a window that pops up as needed. (You can
5626 control what kind of window is created for the output by
5627 resetting the class variable ``outputWindowClass`` to a
5628 class of your choosing.)
66c033b4 5629
03e37cd5
RD
5630 :param filename: The name of a file to redirect output to, if
5631 redirect is True.
66c033b4
RD
5632
5633 :param useBestVisual: Should the app try to use the best
03e37cd5
RD
5634 available visual provided by the system (only relevant on
5635 systems that have more than one visual.) This parameter
5636 must be used instead of calling `SetUseBestVisual` later
5637 on because it must be set before the underlying GUI
5638 toolkit is initialized.
5639
5640 :param clearSigInt: Should SIGINT be cleared? This allows the
5641 app to terminate upon a Ctrl-C in the console like other
5642 GUI apps will.
66c033b4
RD
5643
5644 :note: You should override OnInit to do applicaition
5645 initialization to ensure that the system, toolkit and
5646 wxWidgets are fully initialized.
5647 """
d14a1e28
RD
5648 wx.PyApp.__init__(self)
5649
5650 if wx.Platform == "__WXMAC__":
5651 try:
5652 import MacOS
5653 if not MacOS.WMAvailable():
5654 print """\
5655This program needs access to the screen. Please run with 'pythonw',
5656not 'python', and only when you are logged in on the main display of
5657your Mac."""
5658 _sys.exit(1)
36cadbf7
RD
5659 except SystemExit:
5660 raise
d14a1e28
RD
5661 except:
5662 pass
5663
5664 # This has to be done before OnInit
5665 self.SetUseBestVisual(useBestVisual)
5666
5667 # Set the default handler for SIGINT. This fixes a problem
5668 # where if Ctrl-C is pressed in the console that started this
5669 # app then it will not appear to do anything, (not even send
5670 # KeyboardInterrupt???) but will later segfault on exit. By
5671 # setting the default handler then the app will exit, as
5672 # expected (depending on platform.)
03e37cd5
RD
5673 if clearSigInt:
5674 try:
5675 import signal
5676 signal.signal(signal.SIGINT, signal.SIG_DFL)
5677 except:
5678 pass
d14a1e28
RD
5679
5680 # Save and redirect the stdio to a window?
5681 self.stdioWin = None
5682 self.saveStdio = (_sys.stdout, _sys.stderr)
5683 if redirect:
5684 self.RedirectStdio(filename)
5685
8fb0e70a
RD
5686 # Use Python's install prefix as the default
5687 wx.StandardPaths.Get().SetInstallPrefix(_sys.prefix)
5688
d14a1e28
RD
5689 # This finishes the initialization of wxWindows and then calls
5690 # the OnInit that should be present in the derived class
5691 self._BootstrapApp()
5692
5693
5694 def __del__(self):
5695 try:
5696 self.RestoreStdio() # Just in case the MainLoop was overridden
70b7a5fe
RD
5697 finally:
5698 wx.PyApp.__del__(self)
d14a1e28 5699
70b7a5fe
RD
5700 def Destroy(self):
5701 wx.PyApp.Destroy(self)
5702 self.thisown = 0
d14a1e28
RD
5703
5704 def SetTopWindow(self, frame):
1e0c8722 5705 """Set the \"main\" top level window"""
d14a1e28
RD
5706 if self.stdioWin:
5707 self.stdioWin.SetParent(frame)
5708 wx.PyApp.SetTopWindow(self, frame)
5709
5710
5711 def MainLoop(self):
1e0c8722 5712 """Execute the main GUI event loop"""
d14a1e28
RD
5713 wx.PyApp.MainLoop(self)
5714 self.RestoreStdio()
5715
5716
7409c0c6 5717 def RedirectStdio(self, filename=None):
1e0c8722 5718 """Redirect sys.stdout and sys.stderr to a file or a popup window."""
d14a1e28
RD
5719 if filename:
5720 _sys.stdout = _sys.stderr = open(filename, 'a')
5721 else:
5722 self.stdioWin = self.outputWindowClass()
5723 _sys.stdout = _sys.stderr = self.stdioWin
5724
5725
5726 def RestoreStdio(self):
5727 _sys.stdout, _sys.stderr = self.saveStdio
5728
5729
412d302d
RD
5730 def SetOutputWindowAttributes(self, title=None, pos=None, size=None):
5731 """
5732 Set the title, position and/or size of the output window if
f5b96ee1
RD
5733 the stdio has been redirected. This should be called before
5734 any output would cause the output window to be created.
412d302d
RD
5735 """
5736 if self.stdioWin:
5737 if title is not None:
5738 self.stdioWin.title = title
5739 if pos is not None:
5740 self.stdioWin.pos = pos
5741 if size is not None:
5742 self.stdioWin.size = size
5743
5744
5745
d14a1e28 5746
66c033b4 5747# change from wx.PyApp_XX to wx.App_XX
54f9ee45
RD
5748App_GetMacSupportPCMenuShortcuts = _core_.PyApp_GetMacSupportPCMenuShortcuts
5749App_GetMacAboutMenuItemId = _core_.PyApp_GetMacAboutMenuItemId
5750App_GetMacPreferencesMenuItemId = _core_.PyApp_GetMacPreferencesMenuItemId
5751App_GetMacExitMenuItemId = _core_.PyApp_GetMacExitMenuItemId
5752App_GetMacHelpMenuTitleName = _core_.PyApp_GetMacHelpMenuTitleName
5753App_SetMacSupportPCMenuShortcuts = _core_.PyApp_SetMacSupportPCMenuShortcuts
5754App_SetMacAboutMenuItemId = _core_.PyApp_SetMacAboutMenuItemId
5755App_SetMacPreferencesMenuItemId = _core_.PyApp_SetMacPreferencesMenuItemId
5756App_SetMacExitMenuItemId = _core_.PyApp_SetMacExitMenuItemId
5757App_SetMacHelpMenuTitleName = _core_.PyApp_SetMacHelpMenuTitleName
5758App_GetComCtl32Version = _core_.PyApp_GetComCtl32Version
d14a1e28
RD
5759
5760#----------------------------------------------------------------------------
5761
5762class PySimpleApp(wx.App):
6c3b4aae
RD
5763 """
5764 A simple application class. You can just create one of these and
5765 then then make your top level windows later, and not have to worry
66c033b4
RD
5766 about OnInit. For example::
5767
5768 app = wx.PySimpleApp()
5769 frame = wx.Frame(None, title='Hello World')
5770 frame.Show()
5771 app.MainLoop()
5772
5773 :see: `wx.App`
5774 """
6c3b4aae 5775
03e37cd5
RD
5776 def __init__(self, redirect=False, filename=None,
5777 useBestVisual=False, clearSigInt=True):
66c033b4
RD
5778 """
5779 :see: `wx.App.__init__`
5780 """
03e37cd5 5781 wx.App.__init__(self, redirect, filename, useBestVisual, clearSigInt)
6c3b4aae 5782
d14a1e28 5783 def OnInit(self):
d14a1e28
RD
5784 return True
5785
5786
66c033b4 5787
6c3b4aae 5788# Is anybody using this one?
d14a1e28
RD
5789class PyWidgetTester(wx.App):
5790 def __init__(self, size = (250, 100)):
5791 self.size = size
5792 wx.App.__init__(self, 0)
5793
5794 def OnInit(self):
196addbf 5795 self.frame = wx.Frame(None, -1, "Widget Tester", pos=(0,0), size=self.size)
d14a1e28
RD
5796 self.SetTopWindow(self.frame)
5797 return True
5798
66c033b4
RD
5799 def SetWidget(self, widgetClass, *args, **kwargs):
5800 w = widgetClass(self.frame, *args, **kwargs)
d14a1e28
RD
5801 self.frame.Show(True)
5802
5803#----------------------------------------------------------------------------
5804# DO NOT hold any other references to this object. This is how we
66c033b4 5805# know when to cleanup system resources that wxWidgets is holding. When
d14a1e28 5806# the sys module is unloaded, the refcount on sys.__wxPythonCleanup
66c033b4 5807# goes to zero and it calls the wx.App_CleanUp function.
d14a1e28
RD
5808
5809class __wxPyCleanup:
5810 def __init__(self):
54f9ee45 5811 self.cleanup = _core_.App_CleanUp
d14a1e28
RD
5812 def __del__(self):
5813 self.cleanup()
5814
5815_sys.__wxPythonCleanup = __wxPyCleanup()
5816
5817## # another possible solution, but it gets called too early...
66c033b4
RD
5818## import atexit
5819## atexit.register(_core_.wxApp_CleanUp)
d14a1e28
RD
5820
5821
5822#----------------------------------------------------------------------------
5823
5824#---------------------------------------------------------------------------
2ef75293
RD
5825
5826class EventLoop(object):
093d3ff1 5827 """Proxy of C++ EventLoop class"""
2ef75293
RD
5828 def __repr__(self):
5829 return "<%s.%s; proxy of C++ wxEventLoop instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
5830 def __init__(self, *args, **kwargs):
5831 """__init__(self) -> EventLoop"""
5832 newobj = _core_.new_EventLoop(*args, **kwargs)
5833 self.this = newobj.this
5834 self.thisown = 1
5835 del newobj.thisown
5836 def __del__(self, destroy=_core_.delete_EventLoop):
5837 """__del__(self)"""
5838 try:
5839 if self.thisown: destroy(self)
5840 except: pass
5841
5842 def Run(*args, **kwargs):
5843 """Run(self) -> int"""
5844 return _core_.EventLoop_Run(*args, **kwargs)
5845
5846 def Exit(*args, **kwargs):
5847 """Exit(self, int rc=0)"""
5848 return _core_.EventLoop_Exit(*args, **kwargs)
5849
5850 def Pending(*args, **kwargs):
5851 """Pending(self) -> bool"""
5852 return _core_.EventLoop_Pending(*args, **kwargs)
5853
5854 def Dispatch(*args, **kwargs):
5855 """Dispatch(self) -> bool"""
5856 return _core_.EventLoop_Dispatch(*args, **kwargs)
5857
5858 def IsRunning(*args, **kwargs):
5859 """IsRunning(self) -> bool"""
5860 return _core_.EventLoop_IsRunning(*args, **kwargs)
5861
5862 def GetActive(*args, **kwargs):
5863 """GetActive() -> EventLoop"""
5864 return _core_.EventLoop_GetActive(*args, **kwargs)
5865
5866 GetActive = staticmethod(GetActive)
5867 def SetActive(*args, **kwargs):
5868 """SetActive(EventLoop loop)"""
5869 return _core_.EventLoop_SetActive(*args, **kwargs)
5870
5871 SetActive = staticmethod(SetActive)
5872
5873class EventLoopPtr(EventLoop):
5874 def __init__(self, this):
5875 self.this = this
5876 if not hasattr(self,"thisown"): self.thisown = 0
5877 self.__class__ = EventLoop
5878_core_.EventLoop_swigregister(EventLoopPtr)
5879
5880def EventLoop_GetActive(*args, **kwargs):
5881 """EventLoop_GetActive() -> EventLoop"""
5882 return _core_.EventLoop_GetActive(*args, **kwargs)
5883
5884def EventLoop_SetActive(*args, **kwargs):
5885 """EventLoop_SetActive(EventLoop loop)"""
5886 return _core_.EventLoop_SetActive(*args, **kwargs)
5887
5888#---------------------------------------------------------------------------
d14a1e28 5889
1e0c8722 5890class AcceleratorEntry(object):
66c033b4
RD
5891 """
5892 A class used to define items in an `wx.AcceleratorTable`. wxPython
5893 programs can choose to use wx.AcceleratorEntry objects, but using a
5894 list of 3-tuple of integers (flags, keyCode, cmdID) usually works just
41e2b43e 5895 as well. See `__init__` for of the tuple values.
66c033b4
RD
5896
5897 :see: `wx.AcceleratorTable`
5898 """
1e0c8722
RD
5899 def __repr__(self):
5900 return "<%s.%s; proxy of C++ wxAcceleratorEntry instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
5901 def __init__(self, *args, **kwargs):
66c033b4
RD
5902 """
5903 __init__(self, int flags=0, int keyCode=0, int cmdID=0) -> AcceleratorEntry
5904
5905 Construct a wx.AcceleratorEntry.
66c033b4 5906 """
54f9ee45 5907 newobj = _core_.new_AcceleratorEntry(*args, **kwargs)
1e0c8722
RD
5908 self.this = newobj.this
5909 self.thisown = 1
5910 del newobj.thisown
54f9ee45 5911 def __del__(self, destroy=_core_.delete_AcceleratorEntry):
a95a7133 5912 """__del__(self)"""
1e0c8722
RD
5913 try:
5914 if self.thisown: destroy(self)
5915 except: pass
5916
5917 def Set(*args, **kwargs):
66c033b4
RD
5918 """
5919 Set(self, int flags, int keyCode, int cmd)
1e0c8722 5920
66c033b4
RD
5921 (Re)set the attributes of a wx.AcceleratorEntry.
5922 :see `__init__`
5923 """
5924 return _core_.AcceleratorEntry_Set(*args, **kwargs)
1e0c8722
RD
5925
5926 def GetFlags(*args, **kwargs):
66c033b4
RD
5927 """
5928 GetFlags(self) -> int
5929
5930 Get the AcceleratorEntry's flags.
5931 """
54f9ee45 5932 return _core_.AcceleratorEntry_GetFlags(*args, **kwargs)
1e0c8722
RD
5933
5934 def GetKeyCode(*args, **kwargs):
66c033b4
RD
5935 """
5936 GetKeyCode(self) -> int
5937
5938 Get the AcceleratorEntry's keycode.
5939 """
54f9ee45 5940 return _core_.AcceleratorEntry_GetKeyCode(*args, **kwargs)
1e0c8722
RD
5941
5942 def GetCommand(*args, **kwargs):
66c033b4
RD
5943 """
5944 GetCommand(self) -> int
5945
5946 Get the AcceleratorEntry's command ID.
5947 """
54f9ee45 5948 return _core_.AcceleratorEntry_GetCommand(*args, **kwargs)
1e0c8722
RD
5949
5950
5951class AcceleratorEntryPtr(AcceleratorEntry):
5952 def __init__(self, this):
5953 self.this = this
5954 if not hasattr(self,"thisown"): self.thisown = 0
5955 self.__class__ = AcceleratorEntry
54f9ee45 5956_core_.AcceleratorEntry_swigregister(AcceleratorEntryPtr)
1e0c8722
RD
5957
5958class AcceleratorTable(Object):
66c033b4
RD
5959 """
5960 An accelerator table allows the application to specify a table of
5961 keyboard shortcuts for menus or other commands. On Windows, menu or
5962 button commands are supported; on GTK, only menu commands are
5963 supported.
66c033b4 5964 """
1e0c8722
RD
5965 def __repr__(self):
5966 return "<%s.%s; proxy of C++ wxAcceleratorTable instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
5967 def __init__(self, *args, **kwargs):
0df68c9f
RD
5968 """
5969 __init__(entries) -> AcceleratorTable
1e0c8722 5970
66c033b4
RD
5971 Construct an AcceleratorTable from a list of `wx.AcceleratorEntry`
5972 items or or of 3-tuples (flags, keyCode, cmdID)
5973
5974 :see: `wx.AcceleratorEntry`
0df68c9f 5975 """
54f9ee45 5976 newobj = _core_.new_AcceleratorTable(*args, **kwargs)
1e0c8722
RD
5977 self.this = newobj.this
5978 self.thisown = 1
5979 del newobj.thisown
54f9ee45 5980 def __del__(self, destroy=_core_.delete_AcceleratorTable):
a95a7133 5981 """__del__(self)"""
1e0c8722
RD
5982 try:
5983 if self.thisown: destroy(self)
5984 except: pass
5985
5986 def Ok(*args, **kwargs):
a95a7133 5987 """Ok(self) -> bool"""
54f9ee45 5988 return _core_.AcceleratorTable_Ok(*args, **kwargs)
1e0c8722
RD
5989
5990
5991class AcceleratorTablePtr(AcceleratorTable):
5992 def __init__(self, this):
5993 self.this = this
5994 if not hasattr(self,"thisown"): self.thisown = 0
5995 self.__class__ = AcceleratorTable
54f9ee45 5996_core_.AcceleratorTable_swigregister(AcceleratorTablePtr)
1e0c8722
RD
5997
5998
5999def GetAccelFromString(*args, **kwargs):
196addbf 6000 """GetAccelFromString(String label) -> AcceleratorEntry"""
54f9ee45 6001 return _core_.GetAccelFromString(*args, **kwargs)
1e0c8722
RD
6002#---------------------------------------------------------------------------
6003
74a57fcd
RD
6004class VisualAttributes(object):
6005 """struct containing all the visual attributes of a control"""
6006 def __repr__(self):
6007 return "<%s.%s; proxy of C++ wxVisualAttributes instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
6008 def __init__(self, *args, **kwargs):
6009 """
a95a7133 6010 __init__(self) -> VisualAttributes
74a57fcd
RD
6011
6012 struct containing all the visual attributes of a control
6013 """
54f9ee45 6014 newobj = _core_.new_VisualAttributes(*args, **kwargs)
74a57fcd
RD
6015 self.this = newobj.this
6016 self.thisown = 1
6017 del newobj.thisown
54f9ee45 6018 def __del__(self, destroy=_core_.delete_VisualAttributes):
a95a7133 6019 """__del__(self)"""
74a57fcd
RD
6020 try:
6021 if self.thisown: destroy(self)
6022 except: pass
6023
54f9ee45
RD
6024 font = property(_core_.VisualAttributes_font_get, _core_.VisualAttributes_font_set)
6025 colFg = property(_core_.VisualAttributes_colFg_get, _core_.VisualAttributes_colFg_set)
6026 colBg = property(_core_.VisualAttributes_colBg_get, _core_.VisualAttributes_colBg_set)
74a57fcd
RD
6027
6028class VisualAttributesPtr(VisualAttributes):
6029 def __init__(self, this):
6030 self.this = this
6031 if not hasattr(self,"thisown"): self.thisown = 0
6032 self.__class__ = VisualAttributes
54f9ee45 6033_core_.VisualAttributes_swigregister(VisualAttributesPtr)
74a57fcd
RD
6034NullAcceleratorTable = cvar.NullAcceleratorTable
6035PanelNameStr = cvar.PanelNameStr
6036
54f9ee45
RD
6037WINDOW_VARIANT_NORMAL = _core_.WINDOW_VARIANT_NORMAL
6038WINDOW_VARIANT_SMALL = _core_.WINDOW_VARIANT_SMALL
6039WINDOW_VARIANT_MINI = _core_.WINDOW_VARIANT_MINI
6040WINDOW_VARIANT_LARGE = _core_.WINDOW_VARIANT_LARGE
6041WINDOW_VARIANT_MAX = _core_.WINDOW_VARIANT_MAX
d14a1e28 6042class Window(EvtHandler):
15afbcd0
RD
6043 """
6044 wx.Window is the base class for all windows and represents any visible
6045 object on the screen. All controls, top level windows and so on are
6046 wx.Windows. Sizers and device contexts are not however, as they don't
6047 appear on screen themselves.
6048
6049 """
e811c8ce
RD
6050 def __repr__(self):
6051 return "<%s.%s; proxy of C++ wxWindow instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 6052 def __init__(self, *args, **kwargs):
0df68c9f 6053 """
a95a7133 6054 __init__(self, Window parent, int id=-1, Point pos=DefaultPosition,
74a57fcd 6055 Size size=DefaultSize, long style=0, String name=PanelNameStr) -> Window
15afbcd0
RD
6056
6057 Construct and show a generic Window.
0df68c9f 6058 """
54f9ee45 6059 newobj = _core_.new_Window(*args, **kwargs)
d14a1e28
RD
6060 self.this = newobj.this
6061 self.thisown = 1
6062 del newobj.thisown
6063 self._setOORInfo(self)
d14a1e28 6064
e811c8ce 6065 def Create(*args, **kwargs):
0df68c9f 6066 """
a95a7133 6067 Create(self, Window parent, int id=-1, Point pos=DefaultPosition,
74a57fcd 6068 Size size=DefaultSize, long style=0, String name=PanelNameStr) -> bool
15afbcd0
RD
6069
6070 Create the GUI part of the Window for 2-phase creation mode.
0df68c9f 6071 """
54f9ee45 6072 return _core_.Window_Create(*args, **kwargs)
d14a1e28 6073
e811c8ce 6074 def Close(*args, **kwargs):
15afbcd0 6075 """
a95a7133 6076 Close(self, bool force=False) -> bool
15afbcd0
RD
6077
6078 This function simply generates a EVT_CLOSE event whose handler usually
6079 tries to close the window. It doesn't close the window itself,
6080 however. If force is False (the default) then the window's close
6081 handler will be allowed to veto the destruction of the window.
15afbcd0 6082 """
54f9ee45 6083 return _core_.Window_Close(*args, **kwargs)
d14a1e28 6084
e811c8ce 6085 def Destroy(*args, **kwargs):
0df68c9f 6086 """
a95a7133 6087 Destroy(self) -> bool
d14a1e28 6088
15afbcd0
RD
6089 Destroys the window safely. Frames and dialogs are not destroyed
6090 immediately when this function is called -- they are added to a list
6091 of windows to be deleted on idle time, when all the window's events
6092 have been processed. This prevents problems with events being sent to
6093 non-existent windows.
6094
6095 Returns True if the window has either been successfully deleted, or it
6096 has been added to the list of windows pending real deletion.
0df68c9f 6097 """
54f9ee45 6098 return _core_.Window_Destroy(*args, **kwargs)
d14a1e28 6099
e811c8ce 6100 def DestroyChildren(*args, **kwargs):
15afbcd0 6101 """
a95a7133 6102 DestroyChildren(self) -> bool
15afbcd0 6103
41e2b43e
RD
6104 Destroys all children of a window. Called automatically by the
6105 destructor.
15afbcd0 6106 """
54f9ee45 6107 return _core_.Window_DestroyChildren(*args, **kwargs)
d14a1e28 6108
e811c8ce 6109 def IsBeingDeleted(*args, **kwargs):
15afbcd0 6110 """
a95a7133 6111 IsBeingDeleted(self) -> bool
15afbcd0
RD
6112
6113 Is the window in the process of being deleted?
6114 """
54f9ee45 6115 return _core_.Window_IsBeingDeleted(*args, **kwargs)
d14a1e28 6116
e811c8ce 6117 def SetTitle(*args, **kwargs):
15afbcd0 6118 """
a95a7133 6119 SetTitle(self, String title)
15afbcd0
RD
6120
6121 Sets the window's title. Applicable only to frames and dialogs.
6122 """
54f9ee45 6123 return _core_.Window_SetTitle(*args, **kwargs)
d14a1e28 6124
e811c8ce 6125 def GetTitle(*args, **kwargs):
15afbcd0 6126 """
a95a7133 6127 GetTitle(self) -> String
15afbcd0
RD
6128
6129 Gets the window's title. Applicable only to frames and dialogs.
6130 """
54f9ee45 6131 return _core_.Window_GetTitle(*args, **kwargs)
d14a1e28 6132
e811c8ce 6133 def SetLabel(*args, **kwargs):
15afbcd0 6134 """
a95a7133 6135 SetLabel(self, String label)
15afbcd0
RD
6136
6137 Set the text which the window shows in its label if applicable.
6138 """
54f9ee45 6139 return _core_.Window_SetLabel(*args, **kwargs)
d14a1e28 6140
e811c8ce 6141 def GetLabel(*args, **kwargs):
15afbcd0 6142 """
a95a7133 6143 GetLabel(self) -> String
15afbcd0 6144
41e2b43e
RD
6145 Generic way of getting a label from any window, for identification
6146 purposes. The interpretation of this function differs from class to
6147 class. For frames and dialogs, the value returned is the title. For
6148 buttons or static text controls, it is the button text. This function
6149 can be useful for meta-programs such as testing tools or special-needs
6150 access programs)which need to identify windows by name.
15afbcd0 6151 """
54f9ee45 6152 return _core_.Window_GetLabel(*args, **kwargs)
d14a1e28 6153
e811c8ce 6154 def SetName(*args, **kwargs):
15afbcd0 6155 """
a95a7133 6156 SetName(self, String name)
15afbcd0 6157
41e2b43e
RD
6158 Sets the window's name. The window name is used for ressource setting
6159 in X, it is not the same as the window title/label
15afbcd0 6160 """
54f9ee45 6161 return _core_.Window_SetName(*args, **kwargs)
d14a1e28 6162
e811c8ce 6163 def GetName(*args, **kwargs):
15afbcd0 6164 """
a95a7133 6165 GetName(self) -> String
15afbcd0 6166
41e2b43e
RD
6167 Returns the windows name. This name is not guaranteed to be unique;
6168 it is up to the programmer to supply an appropriate name in the window
6169 constructor or via wx.Window.SetName.
15afbcd0 6170 """
54f9ee45 6171 return _core_.Window_GetName(*args, **kwargs)
d14a1e28 6172
4276dc52
RD
6173 def SetWindowVariant(*args, **kwargs):
6174 """
a95a7133 6175 SetWindowVariant(self, int variant)
4276dc52 6176
41e2b43e
RD
6177 Sets the variant of the window/font size to use for this window, if
6178 the platform supports variants, for example, wxMac.
4276dc52 6179 """
54f9ee45 6180 return _core_.Window_SetWindowVariant(*args, **kwargs)
4276dc52
RD
6181
6182 def GetWindowVariant(*args, **kwargs):
a95a7133 6183 """GetWindowVariant(self) -> int"""
54f9ee45 6184 return _core_.Window_GetWindowVariant(*args, **kwargs)
4276dc52 6185
e811c8ce 6186 def SetId(*args, **kwargs):
15afbcd0 6187 """
a95a7133 6188 SetId(self, int winid)
15afbcd0
RD
6189
6190 Sets the identifier of the window. Each window has an integer
6191 identifier. If the application has not provided one, an identifier
6192 will be generated. Normally, the identifier should be provided on
6193 creation and should not be modified subsequently.
6194 """
54f9ee45 6195 return _core_.Window_SetId(*args, **kwargs)
d14a1e28 6196
e811c8ce 6197 def GetId(*args, **kwargs):
15afbcd0 6198 """
a95a7133 6199 GetId(self) -> int
15afbcd0
RD
6200
6201 Returns the identifier of the window. Each window has an integer
6202 identifier. If the application has not provided one (or the default Id
6203 -1 is used) then an unique identifier with a negative value will be
6204 generated.
6205 """
54f9ee45 6206 return _core_.Window_GetId(*args, **kwargs)
d14a1e28 6207
e811c8ce 6208 def NewControlId(*args, **kwargs):
15afbcd0 6209 """
66c033b4 6210 NewControlId() -> int
15afbcd0
RD
6211
6212 Generate a control id for the controls which were not given one.
6213 """
54f9ee45 6214 return _core_.Window_NewControlId(*args, **kwargs)
d14a1e28 6215
e811c8ce
RD
6216 NewControlId = staticmethod(NewControlId)
6217 def NextControlId(*args, **kwargs):
15afbcd0 6218 """
66c033b4 6219 NextControlId(int winid) -> int
15afbcd0
RD
6220
6221 Get the id of the control following the one with the given
41e2b43e 6222 autogenerated) id
15afbcd0 6223 """
54f9ee45 6224 return _core_.Window_NextControlId(*args, **kwargs)
d14a1e28 6225
e811c8ce
RD
6226 NextControlId = staticmethod(NextControlId)
6227 def PrevControlId(*args, **kwargs):
15afbcd0 6228 """
66c033b4 6229 PrevControlId(int winid) -> int
15afbcd0
RD
6230
6231 Get the id of the control preceding the one with the given
41e2b43e 6232 autogenerated) id
15afbcd0 6233 """
54f9ee45 6234 return _core_.Window_PrevControlId(*args, **kwargs)
d14a1e28 6235
e811c8ce
RD
6236 PrevControlId = staticmethod(PrevControlId)
6237 def SetSize(*args, **kwargs):
15afbcd0 6238 """
a95a7133 6239 SetSize(self, Size size)
15afbcd0
RD
6240
6241 Sets the size of the window in pixels.
6242 """
54f9ee45 6243 return _core_.Window_SetSize(*args, **kwargs)
d14a1e28 6244
e811c8ce 6245 def SetDimensions(*args, **kwargs):
15afbcd0 6246 """
a95a7133 6247 SetDimensions(self, int x, int y, int width, int height, int sizeFlags=SIZE_AUTO)
15afbcd0
RD
6248
6249 Sets the position and size of the window in pixels. The sizeFlags
6250 parameter indicates the interpretation of the other params if they are
e505d15e
RD
6251 equal to -1.
6252
6253 ======================== ======================================
6254 wx.SIZE_AUTO A -1 indicates that a class-specific
6255 default should be used.
6256 wx.SIZE_USE_EXISTING Axisting dimensions should be used if
6257 -1 values are supplied.
6258 wxSIZE_ALLOW_MINUS_ONE Allow dimensions of -1 and less to be
6259 interpreted as real dimensions, not
6260 default values.
6261 ======================== ======================================
6262
15afbcd0 6263 """
54f9ee45 6264 return _core_.Window_SetDimensions(*args, **kwargs)
d14a1e28 6265
e811c8ce 6266 def SetRect(*args, **kwargs):
15afbcd0 6267 """
a95a7133 6268 SetRect(self, Rect rect, int sizeFlags=SIZE_AUTO)
15afbcd0
RD
6269
6270 Sets the position and size of the window in pixels using a wx.Rect.
6271 """
54f9ee45 6272 return _core_.Window_SetRect(*args, **kwargs)
d14a1e28 6273
e811c8ce 6274 def SetSizeWH(*args, **kwargs):
15afbcd0 6275 """
a95a7133 6276 SetSizeWH(self, int width, int height)
15afbcd0
RD
6277
6278 Sets the size of the window in pixels.
6279 """
54f9ee45 6280 return _core_.Window_SetSizeWH(*args, **kwargs)
d14a1e28 6281
e811c8ce 6282 def Move(*args, **kwargs):
15afbcd0 6283 """
a95a7133 6284 Move(self, Point pt, int flags=SIZE_USE_EXISTING)
15afbcd0
RD
6285
6286 Moves the window to the given position.
6287 """
54f9ee45 6288 return _core_.Window_Move(*args, **kwargs)
d14a1e28 6289
e811c8ce
RD
6290 SetPosition = Move
6291 def MoveXY(*args, **kwargs):
15afbcd0 6292 """
a95a7133 6293 MoveXY(self, int x, int y, int flags=SIZE_USE_EXISTING)
15afbcd0
RD
6294
6295 Moves the window to the given position.
6296 """
54f9ee45 6297 return _core_.Window_MoveXY(*args, **kwargs)
e811c8ce 6298
f8167d6e
RD
6299 def SetBestFittingSize(*args, **kwargs):
6300 """
6301 SetBestFittingSize(self, Size size=DefaultSize)
6302
6303 A 'Smart' SetSize that will fill in default size components with the
6304 window's *best size* values. Also set's the minsize for use with sizers.
6305 """
6306 return _core_.Window_SetBestFittingSize(*args, **kwargs)
6307
e811c8ce 6308 def Raise(*args, **kwargs):
15afbcd0 6309 """
a95a7133 6310 Raise(self)
15afbcd0
RD
6311
6312 Raises the window to the top of the window hierarchy if it is a
6313 managed window (dialog or frame).
6314 """
54f9ee45 6315 return _core_.Window_Raise(*args, **kwargs)
e811c8ce
RD
6316
6317 def Lower(*args, **kwargs):
15afbcd0 6318 """
a95a7133 6319 Lower(self)
15afbcd0
RD
6320
6321 Lowers the window to the bottom of the window hierarchy if it is a
6322 managed window (dialog or frame).
6323 """
54f9ee45 6324 return _core_.Window_Lower(*args, **kwargs)
e811c8ce
RD
6325
6326 def SetClientSize(*args, **kwargs):
15afbcd0 6327 """
a95a7133 6328 SetClientSize(self, Size size)
15afbcd0
RD
6329
6330 This sets the size of the window client area in pixels. Using this
6331 function to size a window tends to be more device-independent than
6332 wx.Window.SetSize, since the application need not worry about what
6333 dimensions the border or title bar have when trying to fit the window
6334 around panel items, for example.
6335 """
54f9ee45 6336 return _core_.Window_SetClientSize(*args, **kwargs)
e811c8ce
RD
6337
6338 def SetClientSizeWH(*args, **kwargs):
15afbcd0 6339 """
a95a7133 6340 SetClientSizeWH(self, int width, int height)
15afbcd0
RD
6341
6342 This sets the size of the window client area in pixels. Using this
6343 function to size a window tends to be more device-independent than
6344 wx.Window.SetSize, since the application need not worry about what
6345 dimensions the border or title bar have when trying to fit the window
6346 around panel items, for example.
6347 """
54f9ee45 6348 return _core_.Window_SetClientSizeWH(*args, **kwargs)
e811c8ce
RD
6349
6350 def SetClientRect(*args, **kwargs):
15afbcd0 6351 """
a95a7133 6352 SetClientRect(self, Rect rect)
15afbcd0
RD
6353
6354 This sets the size of the window client area in pixels. Using this
6355 function to size a window tends to be more device-independent than
6356 wx.Window.SetSize, since the application need not worry about what
6357 dimensions the border or title bar have when trying to fit the window
6358 around panel items, for example.
6359 """
54f9ee45 6360 return _core_.Window_SetClientRect(*args, **kwargs)
e811c8ce
RD
6361
6362 def GetPosition(*args, **kwargs):
0df68c9f 6363 """
a95a7133 6364 GetPosition(self) -> Point
e811c8ce 6365
0df68c9f
RD
6366 Get the window's position.
6367 """
54f9ee45 6368 return _core_.Window_GetPosition(*args, **kwargs)
e811c8ce
RD
6369
6370 def GetPositionTuple(*args, **kwargs):
0df68c9f
RD
6371 """
6372 GetPositionTuple() -> (x,y)
e811c8ce 6373
0df68c9f
RD
6374 Get the window's position.
6375 """
54f9ee45 6376 return _core_.Window_GetPositionTuple(*args, **kwargs)
e811c8ce
RD
6377
6378 def GetSize(*args, **kwargs):
0df68c9f 6379 """
a95a7133 6380 GetSize(self) -> Size
e811c8ce 6381
0df68c9f
RD
6382 Get the window size.
6383 """
54f9ee45 6384 return _core_.Window_GetSize(*args, **kwargs)
e811c8ce
RD
6385
6386 def GetSizeTuple(*args, **kwargs):
0df68c9f
RD
6387 """
6388 GetSizeTuple() -> (width, height)
e811c8ce 6389
0df68c9f
RD
6390 Get the window size.
6391 """
54f9ee45 6392 return _core_.Window_GetSizeTuple(*args, **kwargs)
e811c8ce
RD
6393
6394 def GetRect(*args, **kwargs):
15afbcd0 6395 """
a95a7133 6396 GetRect(self) -> Rect
15afbcd0
RD
6397
6398 Returns the size and position of the window as a wx.Rect object.
6399 """
54f9ee45 6400 return _core_.Window_GetRect(*args, **kwargs)
e811c8ce
RD
6401
6402 def GetClientSize(*args, **kwargs):
0df68c9f 6403 """
a95a7133 6404 GetClientSize(self) -> Size
e811c8ce 6405
15afbcd0
RD
6406 This gets the size of the window's 'client area' in pixels. The client
6407 area is the area which may be drawn on by the programmer, excluding
6408 title bar, border, scrollbars, etc.
0df68c9f 6409 """
54f9ee45 6410 return _core_.Window_GetClientSize(*args, **kwargs)
e811c8ce
RD
6411
6412 def GetClientSizeTuple(*args, **kwargs):
0df68c9f
RD
6413 """
6414 GetClientSizeTuple() -> (width, height)
e811c8ce 6415
15afbcd0
RD
6416 This gets the size of the window's 'client area' in pixels. The client
6417 area is the area which may be drawn on by the programmer, excluding
6418 title bar, border, scrollbars, etc.
0df68c9f 6419 """
54f9ee45 6420 return _core_.Window_GetClientSizeTuple(*args, **kwargs)
e811c8ce
RD
6421
6422 def GetClientAreaOrigin(*args, **kwargs):
15afbcd0 6423 """
a95a7133 6424 GetClientAreaOrigin(self) -> Point
15afbcd0
RD
6425
6426 Get the origin of the client area of the window relative to the
6427 window's top left corner (the client area may be shifted because of
6428 the borders, scrollbars, other decorations...)
6429 """
54f9ee45 6430 return _core_.Window_GetClientAreaOrigin(*args, **kwargs)
e811c8ce
RD
6431
6432 def GetClientRect(*args, **kwargs):
15afbcd0 6433 """
a95a7133 6434 GetClientRect(self) -> Rect
15afbcd0 6435
61863841 6436 Get the client area position and size as a `wx.Rect` object.
15afbcd0 6437 """
54f9ee45 6438 return _core_.Window_GetClientRect(*args, **kwargs)
e811c8ce
RD
6439
6440 def GetBestSize(*args, **kwargs):
0df68c9f 6441 """
a95a7133 6442 GetBestSize(self) -> Size
e811c8ce 6443
248ed943 6444 This function returns the best acceptable minimal size for the
41e2b43e
RD
6445 window, if applicable. For example, for a static text control, it will
6446 be the minimal size such that the control label is not truncated. For
6447 windows containing subwindows (suzh aswx.Panel), the size returned by
6448 this function will be the same as the size the window would have had
6449 after calling Fit.
0df68c9f 6450 """
54f9ee45 6451 return _core_.Window_GetBestSize(*args, **kwargs)
e811c8ce
RD
6452
6453 def GetBestSizeTuple(*args, **kwargs):
0df68c9f
RD
6454 """
6455 GetBestSizeTuple() -> (width, height)
e811c8ce 6456
248ed943 6457 This function returns the best acceptable minimal size for the
41e2b43e
RD
6458 window, if applicable. For example, for a static text control, it will
6459 be the minimal size such that the control label is not truncated. For
6460 windows containing subwindows (suzh aswx.Panel), the size returned by
6461 this function will be the same as the size the window would have had
6462 after calling Fit.
0df68c9f 6463 """
54f9ee45 6464 return _core_.Window_GetBestSizeTuple(*args, **kwargs)
e811c8ce 6465
dfbb5885
RD
6466 def InvalidateBestSize(*args, **kwargs):
6467 """
6468 InvalidateBestSize(self)
6469
6470 Reset the cached best size value so it will be recalculated the next
6471 time it is needed.
6472 """
6473 return _core_.Window_InvalidateBestSize(*args, **kwargs)
6474
6475 def GetBestFittingSize(*args, **kwargs):
6476 """
6477 GetBestFittingSize(self) -> Size
6478
6479 This function will merge the window's best size into the window's
6480 minimum size, giving priority to the min size components, and returns
6481 the results.
6482
6483 """
6484 return _core_.Window_GetBestFittingSize(*args, **kwargs)
6485
e811c8ce 6486 def GetAdjustedBestSize(*args, **kwargs):
15afbcd0 6487 """
a95a7133 6488 GetAdjustedBestSize(self) -> Size
15afbcd0
RD
6489
6490 This method is similar to GetBestSize, except in one
6491 thing. GetBestSize should return the minimum untruncated size of the
6492 window, while this method will return the largest of BestSize and any
6493 user specified minimum size. ie. it is the minimum size the window
6494 should currently be drawn at, not the minimal size it can possibly
6495 tolerate.
6496 """
54f9ee45 6497 return _core_.Window_GetAdjustedBestSize(*args, **kwargs)
e811c8ce
RD
6498
6499 def Center(*args, **kwargs):
15afbcd0 6500 """
a95a7133 6501 Center(self, int direction=BOTH)
15afbcd0
RD
6502
6503 Centers the window. The parameter specifies the direction for
6504 cetering, and may be wx.HORIZONTAL, wx.VERTICAL or wx.BOTH. It may
6505 also include wx.CENTER_ON_SCREEN flag if you want to center the window
6506 on the entire screen and not on its parent window. If it is a
6507 top-level window and has no parent then it will always be centered
6508 relative to the screen.
6509 """
54f9ee45 6510 return _core_.Window_Center(*args, **kwargs)
e811c8ce
RD
6511
6512 Centre = Center
6513 def CenterOnScreen(*args, **kwargs):
15afbcd0 6514 """
a95a7133 6515 CenterOnScreen(self, int dir=BOTH)
15afbcd0
RD
6516
6517 Center on screen (only works for top level windows)
6518 """
54f9ee45 6519 return _core_.Window_CenterOnScreen(*args, **kwargs)
e811c8ce
RD
6520
6521 CentreOnScreen = CenterOnScreen
6522 def CenterOnParent(*args, **kwargs):
15afbcd0 6523 """
a95a7133 6524 CenterOnParent(self, int dir=BOTH)
15afbcd0
RD
6525
6526 Center with respect to the the parent window
6527 """
54f9ee45 6528 return _core_.Window_CenterOnParent(*args, **kwargs)
e811c8ce
RD
6529
6530 CentreOnParent = CenterOnParent
6531 def Fit(*args, **kwargs):
15afbcd0 6532 """
a95a7133 6533 Fit(self)
15afbcd0
RD
6534
6535 Sizes the window so that it fits around its subwindows. This function
6536 won't do anything if there are no subwindows and will only really work
6537 correctly if sizers are used for the subwindows layout. Also, if the
6538 window has exactly one subwindow it is better (faster and the result
6539 is more precise as Fit adds some margin to account for fuzziness of
6540 its calculations) to call window.SetClientSize(child.GetSize())
6541 instead of calling Fit.
6542 """
54f9ee45 6543 return _core_.Window_Fit(*args, **kwargs)
e811c8ce
RD
6544
6545 def FitInside(*args, **kwargs):
15afbcd0 6546 """
a95a7133 6547 FitInside(self)
15afbcd0
RD
6548
6549 Similar to Fit, but sizes the interior (virtual) size of a
6550 window. Mainly useful with scrolled windows to reset scrollbars after
6551 sizing changes that do not trigger a size event, and/or scrolled
6552 windows without an interior sizer. This function similarly won't do
6553 anything if there are no subwindows.
6554 """
54f9ee45 6555 return _core_.Window_FitInside(*args, **kwargs)
e811c8ce 6556
f16ab95d 6557 def SetSizeHints(*args, **kwargs):
0df68c9f 6558 """
a95a7133 6559 SetSizeHints(self, int minW, int minH, int maxW=-1, int maxH=-1, int incW=-1,
0df68c9f 6560 int incH=-1)
15afbcd0
RD
6561
6562 Allows specification of minimum and maximum window sizes, and window
6563 size increments. If a pair of values is not set (or set to -1), the
6564 default values will be used. If this function is called, the user
908b74cd
RD
6565 will not be able to size the window outside the given bounds (if it is
6566 a top-level window.) Sizers will also inspect the minimum window size
6567 and will use that value if set when calculating layout.
6568
6569 The resizing increments are only significant under Motif or Xt.
0df68c9f 6570 """
f16ab95d 6571 return _core_.Window_SetSizeHints(*args, **kwargs)
e811c8ce 6572
f16ab95d
RD
6573 def SetSizeHintsSz(*args, **kwargs):
6574 """
6575 SetSizeHintsSz(self, Size minSize, Size maxSize=DefaultSize, Size incSize=DefaultSize)
6576
6577 Allows specification of minimum and maximum window sizes, and window
6578 size increments. If a pair of values is not set (or set to -1), the
6579 default values will be used. If this function is called, the user
6580 will not be able to size the window outside the given bounds (if it is
6581 a top-level window.) Sizers will also inspect the minimum window size
6582 and will use that value if set when calculating layout.
6583
6584 The resizing increments are only significant under Motif or Xt.
6585 """
6586 return _core_.Window_SetSizeHintsSz(*args, **kwargs)
6587
6588 def SetVirtualSizeHints(*args, **kwargs):
15afbcd0 6589 """
908b74cd 6590 SetVirtualSizeHints(self, int minW, int minH, int maxW=-1, int maxH=-1)
15afbcd0
RD
6591
6592 Allows specification of minimum and maximum virtual window sizes. If a
6593 pair of values is not set (or set to -1), the default values will be
6594 used. If this function is called, the user will not be able to size
6595 the virtual area of the window outside the given bounds.
6596 """
f16ab95d
RD
6597 return _core_.Window_SetVirtualSizeHints(*args, **kwargs)
6598
6599 def SetVirtualSizeHintsSz(*args, **kwargs):
6600 """
6601 SetVirtualSizeHintsSz(self, Size minSize, Size maxSize=DefaultSize)
6602
6603 Allows specification of minimum and maximum virtual window sizes. If a
6604 pair of values is not set (or set to -1), the default values will be
6605 used. If this function is called, the user will not be able to size
6606 the virtual area of the window outside the given bounds.
6607 """
6608 return _core_.Window_SetVirtualSizeHintsSz(*args, **kwargs)
e811c8ce 6609
908b74cd
RD
6610 def GetMaxSize(*args, **kwargs):
6611 """GetMaxSize(self) -> Size"""
6612 return _core_.Window_GetMaxSize(*args, **kwargs)
6613
6614 def GetMinSize(*args, **kwargs):
6615 """GetMinSize(self) -> Size"""
6616 return _core_.Window_GetMinSize(*args, **kwargs)
6617
6618 def SetMinSize(*args, **kwargs):
6619 """
6620 SetMinSize(self, Size minSize)
6621
6622 A more convenient method than `SetSizeHints` for setting just the
6623 min size.
6624 """
6625 return _core_.Window_SetMinSize(*args, **kwargs)
6626
6627 def SetMaxSize(*args, **kwargs):
6628 """
6629 SetMaxSize(self, Size maxSize)
6630
6631 A more convenient method than `SetSizeHints` for setting just the
6632 max size.
6633 """
6634 return _core_.Window_SetMaxSize(*args, **kwargs)
6635
e811c8ce 6636 def GetMinWidth(*args, **kwargs):
a95a7133 6637 """GetMinWidth(self) -> int"""
54f9ee45 6638 return _core_.Window_GetMinWidth(*args, **kwargs)
e811c8ce
RD
6639
6640 def GetMinHeight(*args, **kwargs):
a95a7133 6641 """GetMinHeight(self) -> int"""
54f9ee45 6642 return _core_.Window_GetMinHeight(*args, **kwargs)
e811c8ce
RD
6643
6644 def GetMaxWidth(*args, **kwargs):
a95a7133 6645 """GetMaxWidth(self) -> int"""
54f9ee45 6646 return _core_.Window_GetMaxWidth(*args, **kwargs)
e811c8ce
RD
6647
6648 def GetMaxHeight(*args, **kwargs):
a95a7133 6649 """GetMaxHeight(self) -> int"""
54f9ee45 6650 return _core_.Window_GetMaxHeight(*args, **kwargs)
e811c8ce 6651
e811c8ce 6652 def SetVirtualSize(*args, **kwargs):
0df68c9f 6653 """
a95a7133 6654 SetVirtualSize(self, Size size)
e811c8ce 6655
15afbcd0
RD
6656 Set the the virtual size of a window in pixels. For most windows this
6657 is just the client area of the window, but for some like scrolled
6658 windows it is more or less independent of the screen window size.
0df68c9f 6659 """
54f9ee45 6660 return _core_.Window_SetVirtualSize(*args, **kwargs)
e811c8ce
RD
6661
6662 def SetVirtualSizeWH(*args, **kwargs):
0df68c9f 6663 """
a95a7133 6664 SetVirtualSizeWH(self, int w, int h)
e811c8ce 6665
15afbcd0
RD
6666 Set the the virtual size of a window in pixels. For most windows this
6667 is just the client area of the window, but for some like scrolled
6668 windows it is more or less independent of the screen window size.
0df68c9f 6669 """
54f9ee45 6670 return _core_.Window_SetVirtualSizeWH(*args, **kwargs)
e811c8ce
RD
6671
6672 def GetVirtualSize(*args, **kwargs):
0df68c9f 6673 """
a95a7133 6674 GetVirtualSize(self) -> Size
e811c8ce 6675
15afbcd0
RD
6676 Get the the virtual size of the window in pixels. For most windows
6677 this is just the client area of the window, but for some like scrolled
6678 windows it is more or less independent of the screen window size.
0df68c9f 6679 """
54f9ee45 6680 return _core_.Window_GetVirtualSize(*args, **kwargs)
e811c8ce
RD
6681
6682 def GetVirtualSizeTuple(*args, **kwargs):
0df68c9f
RD
6683 """
6684 GetVirtualSizeTuple() -> (width, height)
e811c8ce 6685
15afbcd0
RD
6686 Get the the virtual size of the window in pixels. For most windows
6687 this is just the client area of the window, but for some like scrolled
6688 windows it is more or less independent of the screen window size.
0df68c9f 6689 """
54f9ee45 6690 return _core_.Window_GetVirtualSizeTuple(*args, **kwargs)
e811c8ce
RD
6691
6692 def GetBestVirtualSize(*args, **kwargs):
15afbcd0 6693 """
a95a7133 6694 GetBestVirtualSize(self) -> Size
15afbcd0
RD
6695
6696 Return the largest of ClientSize and BestSize (as determined by a
6697 sizer, interior children, or other means)
6698 """
54f9ee45 6699 return _core_.Window_GetBestVirtualSize(*args, **kwargs)
e811c8ce
RD
6700
6701 def Show(*args, **kwargs):
15afbcd0 6702 """
a95a7133 6703 Show(self, bool show=True) -> bool
15afbcd0
RD
6704
6705 Shows or hides the window. You may need to call Raise for a top level
6706 window if you want to bring it to top, although this is not needed if
6707 Show is called immediately after the frame creation. Returns True if
6708 the window has been shown or hidden or False if nothing was done
6709 because it already was in the requested state.
6710 """
54f9ee45 6711 return _core_.Window_Show(*args, **kwargs)
e811c8ce
RD
6712
6713 def Hide(*args, **kwargs):
15afbcd0 6714 """
a95a7133 6715 Hide(self) -> bool
15afbcd0
RD
6716
6717 Equivalent to calling Show(False).
6718 """
54f9ee45 6719 return _core_.Window_Hide(*args, **kwargs)
e811c8ce
RD
6720
6721 def Enable(*args, **kwargs):
15afbcd0 6722 """
a95a7133 6723 Enable(self, bool enable=True) -> bool
15afbcd0
RD
6724
6725 Enable or disable the window for user input. Note that when a parent
6726 window is disabled, all of its children are disabled as well and they
6727 are reenabled again when the parent is. Returns true if the window
6728 has been enabled or disabled, false if nothing was done, i.e. if the
6729 window had already been in the specified state.
6730 """
54f9ee45 6731 return _core_.Window_Enable(*args, **kwargs)
e811c8ce
RD
6732
6733 def Disable(*args, **kwargs):
15afbcd0 6734 """
a95a7133 6735 Disable(self) -> bool
15afbcd0
RD
6736
6737 Disables the window, same as Enable(false).
6738 """
54f9ee45 6739 return _core_.Window_Disable(*args, **kwargs)
e811c8ce
RD
6740
6741 def IsShown(*args, **kwargs):
15afbcd0 6742 """
a95a7133 6743 IsShown(self) -> bool
15afbcd0
RD
6744
6745 Returns true if the window is shown, false if it has been hidden.
6746 """
54f9ee45 6747 return _core_.Window_IsShown(*args, **kwargs)
e811c8ce
RD
6748
6749 def IsEnabled(*args, **kwargs):
15afbcd0 6750 """
a95a7133 6751 IsEnabled(self) -> bool
15afbcd0
RD
6752
6753 Returns true if the window is enabled for input, false otherwise.
6754 """
54f9ee45 6755 return _core_.Window_IsEnabled(*args, **kwargs)
e811c8ce
RD
6756
6757 def SetWindowStyleFlag(*args, **kwargs):
15afbcd0 6758 """
a95a7133 6759 SetWindowStyleFlag(self, long style)
15afbcd0 6760
41e2b43e
RD
6761 Sets the style of the window. Please note that some styles cannot be
6762 changed after the window creation and that Refresh() might need to be
6763 called after changing the others for the change to take place
6764 immediately.
15afbcd0 6765 """
54f9ee45 6766 return _core_.Window_SetWindowStyleFlag(*args, **kwargs)
e811c8ce
RD
6767
6768 def GetWindowStyleFlag(*args, **kwargs):
15afbcd0 6769 """
a95a7133 6770 GetWindowStyleFlag(self) -> long
e811c8ce 6771
15afbcd0
RD
6772 Gets the window style that was passed to the constructor or Create
6773 method.
6774 """
54f9ee45 6775 return _core_.Window_GetWindowStyleFlag(*args, **kwargs)
e811c8ce 6776
15afbcd0 6777 SetWindowStyle = SetWindowStyleFlag; GetWindowStyle = GetWindowStyleFlag
e811c8ce 6778 def HasFlag(*args, **kwargs):
15afbcd0 6779 """
a95a7133 6780 HasFlag(self, int flag) -> bool
15afbcd0
RD
6781
6782 Test if the given style is set for this window.
6783 """
54f9ee45 6784 return _core_.Window_HasFlag(*args, **kwargs)
e811c8ce
RD
6785
6786 def IsRetained(*args, **kwargs):
15afbcd0 6787 """
a95a7133 6788 IsRetained(self) -> bool
15afbcd0
RD
6789
6790 Returns true if the window is retained, false otherwise. Retained
6791 windows are only available on X platforms.
6792 """
54f9ee45 6793 return _core_.Window_IsRetained(*args, **kwargs)
e811c8ce
RD
6794
6795 def SetExtraStyle(*args, **kwargs):
15afbcd0 6796 """
a95a7133 6797 SetExtraStyle(self, long exStyle)
15afbcd0
RD
6798
6799 Sets the extra style bits for the window. Extra styles are the less
6800 often used style bits which can't be set with the constructor or with
6801 SetWindowStyleFlag()
6802 """
54f9ee45 6803 return _core_.Window_SetExtraStyle(*args, **kwargs)
e811c8ce
RD
6804
6805 def GetExtraStyle(*args, **kwargs):
15afbcd0 6806 """
a95a7133 6807 GetExtraStyle(self) -> long
15afbcd0
RD
6808
6809 Returns the extra style bits for the window.
6810 """
54f9ee45 6811 return _core_.Window_GetExtraStyle(*args, **kwargs)
e811c8ce
RD
6812
6813 def MakeModal(*args, **kwargs):
15afbcd0 6814 """
a95a7133 6815 MakeModal(self, bool modal=True)
15afbcd0
RD
6816
6817 Disables all other windows in the application so that the user can
6818 only interact with this window. Passing False will reverse this
6819 effect.
6820 """
54f9ee45 6821 return _core_.Window_MakeModal(*args, **kwargs)
e811c8ce
RD
6822
6823 def SetThemeEnabled(*args, **kwargs):
15afbcd0 6824 """
a95a7133 6825 SetThemeEnabled(self, bool enableTheme)
15afbcd0
RD
6826
6827 This function tells a window if it should use the system's "theme"
6828 code to draw the windows' background instead if its own background
6829 drawing code. This will only have an effect on platforms that support
6830 the notion of themes in user defined windows. One such platform is
6831 GTK+ where windows can have (very colourful) backgrounds defined by a
6832 user's selected theme.
6833
6834 Dialogs, notebook pages and the status bar have this flag set to true
6835 by default so that the default look and feel is simulated best.
6836 """
54f9ee45 6837 return _core_.Window_SetThemeEnabled(*args, **kwargs)
e811c8ce
RD
6838
6839 def GetThemeEnabled(*args, **kwargs):
15afbcd0 6840 """
a95a7133 6841 GetThemeEnabled(self) -> bool
e811c8ce 6842
15afbcd0
RD
6843 Return the themeEnabled flag.
6844 """
54f9ee45 6845 return _core_.Window_GetThemeEnabled(*args, **kwargs)
e811c8ce
RD
6846
6847 def SetFocus(*args, **kwargs):
15afbcd0 6848 """
a95a7133 6849 SetFocus(self)
15afbcd0
RD
6850
6851 Set's the focus to this window, allowing it to receive keyboard input.
6852 """
54f9ee45 6853 return _core_.Window_SetFocus(*args, **kwargs)
e811c8ce
RD
6854
6855 def SetFocusFromKbd(*args, **kwargs):
15afbcd0 6856 """
a95a7133 6857 SetFocusFromKbd(self)
15afbcd0
RD
6858
6859 Set focus to this window as the result of a keyboard action. Normally
6860 only called internally.
6861 """
54f9ee45 6862 return _core_.Window_SetFocusFromKbd(*args, **kwargs)
e811c8ce
RD
6863
6864 def FindFocus(*args, **kwargs):
15afbcd0 6865 """
66c033b4 6866 FindFocus() -> Window
15afbcd0
RD
6867
6868 Returns the window or control that currently has the keyboard focus,
6869 or None.
6870 """
54f9ee45 6871 return _core_.Window_FindFocus(*args, **kwargs)
e811c8ce
RD
6872
6873 FindFocus = staticmethod(FindFocus)
6874 def AcceptsFocus(*args, **kwargs):
15afbcd0 6875 """
a95a7133 6876 AcceptsFocus(self) -> bool
15afbcd0
RD
6877
6878 Can this window have focus?
6879 """
54f9ee45 6880 return _core_.Window_AcceptsFocus(*args, **kwargs)
e811c8ce
RD
6881
6882 def AcceptsFocusFromKeyboard(*args, **kwargs):
15afbcd0 6883 """
a95a7133 6884 AcceptsFocusFromKeyboard(self) -> bool
15afbcd0
RD
6885
6886 Can this window be given focus by keyboard navigation? if not, the
6887 only way to give it focus (provided it accepts it at all) is to click
6888 it.
6889 """
54f9ee45 6890 return _core_.Window_AcceptsFocusFromKeyboard(*args, **kwargs)
e811c8ce
RD
6891
6892 def GetDefaultItem(*args, **kwargs):
15afbcd0 6893 """
a95a7133 6894 GetDefaultItem(self) -> Window
15afbcd0
RD
6895
6896 Get the default child of this parent, i.e. the one which is activated
6897 by pressing <Enter> such as the OK button on a wx.Dialog.
6898 """
54f9ee45 6899 return _core_.Window_GetDefaultItem(*args, **kwargs)
e811c8ce
RD
6900
6901 def SetDefaultItem(*args, **kwargs):
15afbcd0 6902 """
a95a7133 6903 SetDefaultItem(self, Window child) -> Window
15afbcd0
RD
6904
6905 Set this child as default, return the old default.
6906 """
54f9ee45 6907 return _core_.Window_SetDefaultItem(*args, **kwargs)
e811c8ce
RD
6908
6909 def SetTmpDefaultItem(*args, **kwargs):
15afbcd0 6910 """
a95a7133 6911 SetTmpDefaultItem(self, Window win)
15afbcd0
RD
6912
6913 Set this child as temporary default
6914 """
54f9ee45 6915 return _core_.Window_SetTmpDefaultItem(*args, **kwargs)
e811c8ce 6916
908b74cd
RD
6917 def Navigate(*args, **kwargs):
6918 """
6919 Navigate(self, int flags=NavigationKeyEvent.IsForward) -> bool
6920
fd2dc343
RD
6921 Does keyboard navigation from this window to another, by sending a
6922 `wx.NavigationKeyEvent`.
908b74cd
RD
6923 """
6924 return _core_.Window_Navigate(*args, **kwargs)
6925
7f98d120
RD
6926 def MoveAfterInTabOrder(*args, **kwargs):
6927 """
6928 MoveAfterInTabOrder(self, Window win)
6929
6930 Moves this window in the tab navigation order after the specified
6931 sibling window. This means that when the user presses the TAB key on
6932 that other window, the focus switches to this window.
6933
6934 The default tab order is the same as creation order. This function
6935 and `MoveBeforeInTabOrder` allow to change it after creating all the
6936 windows.
6937
6938 """
6939 return _core_.Window_MoveAfterInTabOrder(*args, **kwargs)
6940
6941 def MoveBeforeInTabOrder(*args, **kwargs):
6942 """
6943 MoveBeforeInTabOrder(self, Window win)
6944
6945 Same as `MoveAfterInTabOrder` except that it inserts this window just
6946 before win instead of putting it right after it.
6947 """
6948 return _core_.Window_MoveBeforeInTabOrder(*args, **kwargs)
6949
e811c8ce 6950 def GetChildren(*args, **kwargs):
15afbcd0 6951 """
a95a7133 6952 GetChildren(self) -> PyObject
15afbcd0
RD
6953
6954 Returns a list of the window's children. NOTE: Currently this is a
6955 copy of the child window list maintained by the window, so the return
6956 value of this function is only valid as long as the window's children
6957 do not change.
6958 """
54f9ee45 6959 return _core_.Window_GetChildren(*args, **kwargs)
e811c8ce
RD
6960
6961 def GetParent(*args, **kwargs):
15afbcd0 6962 """
a95a7133 6963 GetParent(self) -> Window
15afbcd0
RD
6964
6965 Returns the parent window of this window, or None if there isn't one.
6966 """
54f9ee45 6967 return _core_.Window_GetParent(*args, **kwargs)
e811c8ce
RD
6968
6969 def GetGrandParent(*args, **kwargs):
15afbcd0 6970 """
a95a7133 6971 GetGrandParent(self) -> Window
15afbcd0 6972
41e2b43e
RD
6973 Returns the parent of the parent of this window, or None if there
6974 isn't one.
15afbcd0 6975 """
54f9ee45 6976 return _core_.Window_GetGrandParent(*args, **kwargs)
e811c8ce
RD
6977
6978 def IsTopLevel(*args, **kwargs):
15afbcd0 6979 """
a95a7133 6980 IsTopLevel(self) -> bool
15afbcd0
RD
6981
6982 Returns true if the given window is a top-level one. Currently all
6983 frames and dialogs are always considered to be top-level windows (even
6984 if they have a parent window).
6985 """
54f9ee45 6986 return _core_.Window_IsTopLevel(*args, **kwargs)
e811c8ce
RD
6987
6988 def Reparent(*args, **kwargs):
15afbcd0 6989 """
a95a7133 6990 Reparent(self, Window newParent) -> bool
15afbcd0
RD
6991
6992 Reparents the window, i.e the window will be removed from its current
6993 parent window (e.g. a non-standard toolbar in a wxFrame) and then
6994 re-inserted into another. Available on Windows and GTK. Returns True
6995 if the parent was changed, False otherwise (error or newParent ==
6996 oldParent)
6997 """
54f9ee45 6998 return _core_.Window_Reparent(*args, **kwargs)
e811c8ce
RD
6999
7000 def AddChild(*args, **kwargs):
15afbcd0 7001 """
a95a7133 7002 AddChild(self, Window child)
15afbcd0
RD
7003
7004 Adds a child window. This is called automatically by window creation
7005 functions so should not be required by the application programmer.
7006 """
54f9ee45 7007 return _core_.Window_AddChild(*args, **kwargs)
e811c8ce
RD
7008
7009 def RemoveChild(*args, **kwargs):
15afbcd0 7010 """
a95a7133 7011 RemoveChild(self, Window child)
15afbcd0
RD
7012
7013 Removes a child window. This is called automatically by window
7014 deletion functions so should not be required by the application
7015 programmer.
7016 """
54f9ee45 7017 return _core_.Window_RemoveChild(*args, **kwargs)
e811c8ce
RD
7018
7019 def FindWindowById(*args, **kwargs):
15afbcd0 7020 """
a95a7133 7021 FindWindowById(self, long winid) -> Window
15afbcd0
RD
7022
7023 Find a chld of this window by window ID
7024 """
54f9ee45 7025 return _core_.Window_FindWindowById(*args, **kwargs)
e811c8ce
RD
7026
7027 def FindWindowByName(*args, **kwargs):
15afbcd0 7028 """
a95a7133 7029 FindWindowByName(self, String name) -> Window
15afbcd0
RD
7030
7031 Find a child of this window by name
7032 """
54f9ee45 7033 return _core_.Window_FindWindowByName(*args, **kwargs)
e811c8ce
RD
7034
7035 def GetEventHandler(*args, **kwargs):
15afbcd0 7036 """
a95a7133 7037 GetEventHandler(self) -> EvtHandler
15afbcd0
RD
7038
7039 Returns the event handler for this window. By default, the window is
7040 its own event handler.
7041 """
54f9ee45 7042 return _core_.Window_GetEventHandler(*args, **kwargs)
e811c8ce
RD
7043
7044 def SetEventHandler(*args, **kwargs):
15afbcd0 7045 """
a95a7133 7046 SetEventHandler(self, EvtHandler handler)
15afbcd0
RD
7047
7048 Sets the event handler for this window. An event handler is an object
7049 that is capable of processing the events sent to a window. By default,
7050 the window is its own event handler, but an application may wish to
7051 substitute another, for example to allow central implementation of
7052 event-handling for a variety of different window classes.
7053
41e2b43e 7054 It is usually better to use `wx.Window.PushEventHandler` since this sets
15afbcd0
RD
7055 up a chain of event handlers, where an event not handled by one event
7056 handler is handed to the next one in the chain.
7057 """
54f9ee45 7058 return _core_.Window_SetEventHandler(*args, **kwargs)
e811c8ce
RD
7059
7060 def PushEventHandler(*args, **kwargs):
15afbcd0 7061 """
a95a7133 7062 PushEventHandler(self, EvtHandler handler)
15afbcd0
RD
7063
7064 Pushes this event handler onto the event handler stack for the window.
7065 An event handler is an object that is capable of processing the events
7066 sent to a window. By default, the window is its own event handler, but
7067 an application may wish to substitute another, for example to allow
7068 central implementation of event-handling for a variety of different
7069 window classes.
7070
7071 wx.Window.PushEventHandler allows an application to set up a chain of
7072 event handlers, where an event not handled by one event handler is
41e2b43e 7073 handed to the next one in the chain. Use `wx.Window.PopEventHandler` to
15afbcd0
RD
7074 remove the event handler.
7075 """
54f9ee45 7076 return _core_.Window_PushEventHandler(*args, **kwargs)
e811c8ce
RD
7077
7078 def PopEventHandler(*args, **kwargs):
15afbcd0 7079 """
a95a7133 7080 PopEventHandler(self, bool deleteHandler=False) -> EvtHandler
15afbcd0
RD
7081
7082 Removes and returns the top-most event handler on the event handler
7083 stack. If deleteHandler is True then the wx.EvtHandler object will be
7084 destroyed after it is popped.
7085 """
54f9ee45 7086 return _core_.Window_PopEventHandler(*args, **kwargs)
e811c8ce
RD
7087
7088 def RemoveEventHandler(*args, **kwargs):
15afbcd0 7089 """
a95a7133 7090 RemoveEventHandler(self, EvtHandler handler) -> bool
15afbcd0 7091
41e2b43e
RD
7092 Find the given handler in the event handler chain and remove (but not
7093 delete) it from the event handler chain, return True if it was found
7094 and False otherwise (this also results in an assert failure so this
7095 function should only be called when the handler is supposed to be
7096 there.)
15afbcd0 7097 """
54f9ee45 7098 return _core_.Window_RemoveEventHandler(*args, **kwargs)
e811c8ce
RD
7099
7100 def SetValidator(*args, **kwargs):
15afbcd0 7101 """
a95a7133 7102 SetValidator(self, Validator validator)
15afbcd0
RD
7103
7104 Deletes the current validator (if any) and sets the window validator,
7105 having called wx.Validator.Clone to create a new validator of this
7106 type.
7107 """
54f9ee45 7108 return _core_.Window_SetValidator(*args, **kwargs)
e811c8ce
RD
7109
7110 def GetValidator(*args, **kwargs):
15afbcd0 7111 """
a95a7133 7112 GetValidator(self) -> Validator
15afbcd0
RD
7113
7114 Returns a pointer to the current validator for the window, or None if
7115 there is none.
7116 """
54f9ee45 7117 return _core_.Window_GetValidator(*args, **kwargs)
e811c8ce 7118
74a57fcd
RD
7119 def Validate(*args, **kwargs):
7120 """
a95a7133 7121 Validate(self) -> bool
74a57fcd
RD
7122
7123 Validates the current values of the child controls using their
41e2b43e
RD
7124 validators. If the window has wx.WS_EX_VALIDATE_RECURSIVELY extra
7125 style flag set, the method will also call Validate() of all child
7126 windows. Returns false if any of the validations failed.
74a57fcd 7127 """
54f9ee45 7128 return _core_.Window_Validate(*args, **kwargs)
74a57fcd
RD
7129
7130 def TransferDataToWindow(*args, **kwargs):
7131 """
a95a7133 7132 TransferDataToWindow(self) -> bool
74a57fcd 7133
41e2b43e
RD
7134 Transfers values to child controls from data areas specified by their
7135 validators. If the window has wx.WS_EX_VALIDATE_RECURSIVELY extra
7136 style flag set, the method will also call TransferDataToWindow() of
7137 all child windows.
74a57fcd 7138 """
54f9ee45 7139 return _core_.Window_TransferDataToWindow(*args, **kwargs)
74a57fcd
RD
7140
7141 def TransferDataFromWindow(*args, **kwargs):
7142 """
a95a7133 7143 TransferDataFromWindow(self) -> bool
74a57fcd 7144
41e2b43e
RD
7145 Transfers values from child controls to data areas specified by their
7146 validators. Returns false if a transfer failed. If the window has
7147 wx.WS_EX_VALIDATE_RECURSIVELY extra style flag set, the method will
7148 also call TransferDataFromWindow() of all child windows.
74a57fcd 7149 """
54f9ee45 7150 return _core_.Window_TransferDataFromWindow(*args, **kwargs)
74a57fcd
RD
7151
7152 def InitDialog(*args, **kwargs):
7153 """
a95a7133 7154 InitDialog(self)
74a57fcd 7155
41e2b43e
RD
7156 Sends an EVT_INIT_DIALOG event, whose handler usually transfers data
7157 to the dialog via validators.
74a57fcd 7158 """
54f9ee45 7159 return _core_.Window_InitDialog(*args, **kwargs)
74a57fcd 7160
e811c8ce 7161 def SetAcceleratorTable(*args, **kwargs):
15afbcd0 7162 """
a95a7133 7163 SetAcceleratorTable(self, AcceleratorTable accel)
15afbcd0
RD
7164
7165 Sets the accelerator table for this window.
7166 """
54f9ee45 7167 return _core_.Window_SetAcceleratorTable(*args, **kwargs)
e811c8ce
RD
7168
7169 def GetAcceleratorTable(*args, **kwargs):
15afbcd0 7170 """
a95a7133 7171 GetAcceleratorTable(self) -> AcceleratorTable
15afbcd0
RD
7172
7173 Gets the accelerator table for this window.
7174 """
54f9ee45 7175 return _core_.Window_GetAcceleratorTable(*args, **kwargs)
e811c8ce
RD
7176
7177 def RegisterHotKey(*args, **kwargs):
15afbcd0 7178 """
a95a7133 7179 RegisterHotKey(self, int hotkeyId, int modifiers, int keycode) -> bool
15afbcd0
RD
7180
7181 Registers a system wide hotkey. Every time the user presses the hotkey
7182 registered here, this window will receive a hotkey event. It will
7183 receive the event even if the application is in the background and
7184 does not have the input focus because the user is working with some
7185 other application. To bind an event handler function to this hotkey
7186 use EVT_HOTKEY with an id equal to hotkeyId. Returns True if the
7187 hotkey was registered successfully.
7188 """
54f9ee45 7189 return _core_.Window_RegisterHotKey(*args, **kwargs)
e811c8ce
RD
7190
7191 def UnregisterHotKey(*args, **kwargs):
15afbcd0 7192 """
a95a7133 7193 UnregisterHotKey(self, int hotkeyId) -> bool
15afbcd0
RD
7194
7195 Unregisters a system wide hotkey.
7196 """
54f9ee45 7197 return _core_.Window_UnregisterHotKey(*args, **kwargs)
e811c8ce
RD
7198
7199 def ConvertDialogPointToPixels(*args, **kwargs):
15afbcd0 7200 """
a95a7133 7201 ConvertDialogPointToPixels(self, Point pt) -> Point
15afbcd0
RD
7202
7203 Converts a point or size from dialog units to pixels. Dialog units
7204 are used for maintaining a dialog's proportions even if the font
7205 changes. For the x dimension, the dialog units are multiplied by the
7206 average character width and then divided by 4. For the y dimension,
7207 the dialog units are multiplied by the average character height and
7208 then divided by 8.
7209 """
54f9ee45 7210 return _core_.Window_ConvertDialogPointToPixels(*args, **kwargs)
e811c8ce
RD
7211
7212 def ConvertDialogSizeToPixels(*args, **kwargs):
15afbcd0 7213 """
a95a7133 7214 ConvertDialogSizeToPixels(self, Size sz) -> Size
15afbcd0
RD
7215
7216 Converts a point or size from dialog units to pixels. Dialog units
7217 are used for maintaining a dialog's proportions even if the font
7218 changes. For the x dimension, the dialog units are multiplied by the
7219 average character width and then divided by 4. For the y dimension,
7220 the dialog units are multiplied by the average character height and
7221 then divided by 8.
7222 """
54f9ee45 7223 return _core_.Window_ConvertDialogSizeToPixels(*args, **kwargs)
e811c8ce
RD
7224
7225 def DLG_PNT(*args, **kwargs):
15afbcd0 7226 """
a95a7133 7227 DLG_PNT(self, Point pt) -> Point
15afbcd0
RD
7228
7229 Converts a point or size from dialog units to pixels. Dialog units
7230 are used for maintaining a dialog's proportions even if the font
7231 changes. For the x dimension, the dialog units are multiplied by the
7232 average character width and then divided by 4. For the y dimension,
7233 the dialog units are multiplied by the average character height and
7234 then divided by 8.
7235 """
54f9ee45 7236 return _core_.Window_DLG_PNT(*args, **kwargs)
e811c8ce
RD
7237
7238 def DLG_SZE(*args, **kwargs):
15afbcd0 7239 """
a95a7133 7240 DLG_SZE(self, Size sz) -> Size
15afbcd0
RD
7241
7242 Converts a point or size from dialog units to pixels. Dialog units
7243 are used for maintaining a dialog's proportions even if the font
7244 changes. For the x dimension, the dialog units are multiplied by the
7245 average character width and then divided by 4. For the y dimension,
7246 the dialog units are multiplied by the average character height and
7247 then divided by 8.
7248 """
54f9ee45 7249 return _core_.Window_DLG_SZE(*args, **kwargs)
e811c8ce
RD
7250
7251 def ConvertPixelPointToDialog(*args, **kwargs):
a95a7133 7252 """ConvertPixelPointToDialog(self, Point pt) -> Point"""
54f9ee45 7253 return _core_.Window_ConvertPixelPointToDialog(*args, **kwargs)
e811c8ce
RD
7254
7255 def ConvertPixelSizeToDialog(*args, **kwargs):
a95a7133 7256 """ConvertPixelSizeToDialog(self, Size sz) -> Size"""
54f9ee45 7257 return _core_.Window_ConvertPixelSizeToDialog(*args, **kwargs)
e811c8ce
RD
7258
7259 def WarpPointer(*args, **kwargs):
15afbcd0 7260 """
a95a7133 7261 WarpPointer(self, int x, int y)
15afbcd0
RD
7262
7263 Moves the pointer to the given position on the window.
7264
7265 NOTE: This function is not supported under Mac because Apple Human
7266 Interface Guidelines forbid moving the mouse cursor programmatically.
7267 """
54f9ee45 7268 return _core_.Window_WarpPointer(*args, **kwargs)
e811c8ce
RD
7269
7270 def CaptureMouse(*args, **kwargs):
15afbcd0 7271 """
a95a7133 7272 CaptureMouse(self)
15afbcd0
RD
7273
7274 Directs all mouse input to this window. Call wx.Window.ReleaseMouse to
7275 release the capture.
7276
7277 Note that wxWindows maintains the stack of windows having captured the
7278 mouse and when the mouse is released the capture returns to the window
7279 which had had captured it previously and it is only really released if
7280 there were no previous window. In particular, this means that you must
7281 release the mouse as many times as you capture it.
7282 """
54f9ee45 7283 return _core_.Window_CaptureMouse(*args, **kwargs)
e811c8ce
RD
7284
7285 def ReleaseMouse(*args, **kwargs):
15afbcd0 7286 """
a95a7133 7287 ReleaseMouse(self)
15afbcd0
RD
7288
7289 Releases mouse input captured with wx.Window.CaptureMouse.
7290 """
54f9ee45 7291 return _core_.Window_ReleaseMouse(*args, **kwargs)
e811c8ce
RD
7292
7293 def GetCapture(*args, **kwargs):
15afbcd0 7294 """
66c033b4 7295 GetCapture() -> Window
15afbcd0
RD
7296
7297 Returns the window which currently captures the mouse or None
7298 """
54f9ee45 7299 return _core_.Window_GetCapture(*args, **kwargs)
e811c8ce
RD
7300
7301 GetCapture = staticmethod(GetCapture)
7302 def HasCapture(*args, **kwargs):
15afbcd0 7303 """
a95a7133 7304 HasCapture(self) -> bool
15afbcd0
RD
7305
7306 Returns true if this window has the current mouse capture.
7307 """
54f9ee45 7308 return _core_.Window_HasCapture(*args, **kwargs)
e811c8ce
RD
7309
7310 def Refresh(*args, **kwargs):
15afbcd0 7311 """
a95a7133 7312 Refresh(self, bool eraseBackground=True, Rect rect=None)
15afbcd0
RD
7313
7314 Mark the specified rectangle (or the whole window) as "dirty" so it
7315 will be repainted. Causes an EVT_PAINT event to be generated and sent
7316 to the window.
7317 """
54f9ee45 7318 return _core_.Window_Refresh(*args, **kwargs)
e811c8ce
RD
7319
7320 def RefreshRect(*args, **kwargs):
15afbcd0 7321 """
fef4c27a 7322 RefreshRect(self, Rect rect, bool eraseBackground=True)
15afbcd0
RD
7323
7324 Redraws the contents of the given rectangle: the area inside it will
7325 be repainted. This is the same as Refresh but has a nicer syntax.
7326 """
54f9ee45 7327 return _core_.Window_RefreshRect(*args, **kwargs)
e811c8ce
RD
7328
7329 def Update(*args, **kwargs):
15afbcd0 7330 """
a95a7133 7331 Update(self)
15afbcd0
RD
7332
7333 Calling this method immediately repaints the invalidated area of the
7334 window instead of waiting for the EVT_PAINT event to happen, (normally
7335 this would usually only happen when the flow of control returns to the
7336 event loop.) Notice that this function doesn't refresh the window and
7337 does nothing if the window has been already repainted. Use Refresh
7338 first if you want to immediately redraw the window (or some portion of
7339 it) unconditionally.
7340 """
54f9ee45 7341 return _core_.Window_Update(*args, **kwargs)
e811c8ce
RD
7342
7343 def ClearBackground(*args, **kwargs):
15afbcd0 7344 """
a95a7133 7345 ClearBackground(self)
15afbcd0
RD
7346
7347 Clears the window by filling it with the current background
7348 colour. Does not cause an erase background event to be generated.
7349 """
54f9ee45 7350 return _core_.Window_ClearBackground(*args, **kwargs)
e811c8ce
RD
7351
7352 def Freeze(*args, **kwargs):
15afbcd0 7353 """
a95a7133 7354 Freeze(self)
15afbcd0 7355
41e2b43e
RD
7356 Freezes the window or, in other words, prevents any updates from
7357 taking place on screen, the window is not redrawn at all. Thaw must be
7358 called to reenable window redrawing. Calls to Freeze/Thaw may be
7359 nested, with the actual Thaw being delayed until all the nesting has
7360 been undone.
15afbcd0
RD
7361
7362 This method is useful for visual appearance optimization (for example,
7363 it is a good idea to use it before inserting large amount of text into
7364 a wxTextCtrl under wxGTK) but is not implemented on all platforms nor
7365 for all controls so it is mostly just a hint to wxWindows and not a
7366 mandatory directive.
7367 """
54f9ee45 7368 return _core_.Window_Freeze(*args, **kwargs)
e811c8ce
RD
7369
7370 def Thaw(*args, **kwargs):
15afbcd0 7371 """
a95a7133 7372 Thaw(self)
15afbcd0 7373
4276dc52 7374 Reenables window updating after a previous call to Freeze. Calls to
41e2b43e
RD
7375 Freeze/Thaw may be nested, so Thaw must be called the same number of
7376 times that Freeze was before the window will be updated.
15afbcd0 7377 """
54f9ee45 7378 return _core_.Window_Thaw(*args, **kwargs)
e811c8ce
RD
7379
7380 def PrepareDC(*args, **kwargs):
15afbcd0 7381 """
a95a7133 7382 PrepareDC(self, DC dc)
15afbcd0
RD
7383
7384 Call this function to prepare the device context for drawing a
7385 scrolled image. It sets the device origin according to the current
7386 scroll position.
7387 """
54f9ee45 7388 return _core_.Window_PrepareDC(*args, **kwargs)
e811c8ce
RD
7389
7390 def GetUpdateRegion(*args, **kwargs):
15afbcd0 7391 """
a95a7133 7392 GetUpdateRegion(self) -> Region
15afbcd0
RD
7393
7394 Returns the region specifying which parts of the window have been
7395 damaged. Should only be called within an EVT_PAINT handler.
7396 """
54f9ee45 7397 return _core_.Window_GetUpdateRegion(*args, **kwargs)
e811c8ce
RD
7398
7399 def GetUpdateClientRect(*args, **kwargs):
15afbcd0 7400 """
a95a7133 7401 GetUpdateClientRect(self) -> Rect
15afbcd0
RD
7402
7403 Get the update rectangle region bounding box in client coords.
7404 """
54f9ee45 7405 return _core_.Window_GetUpdateClientRect(*args, **kwargs)
e811c8ce
RD
7406
7407 def IsExposed(*args, **kwargs):
15afbcd0 7408 """
a95a7133 7409 IsExposed(self, int x, int y, int w=1, int h=1) -> bool
15afbcd0
RD
7410
7411 Returns true if the given point or rectangle area has been exposed
7412 since the last repaint. Call this in an paint event handler to
7413 optimize redrawing by only redrawing those areas, which have been
7414 exposed.
7415 """
54f9ee45 7416 return _core_.Window_IsExposed(*args, **kwargs)
e811c8ce
RD
7417
7418 def IsExposedPoint(*args, **kwargs):
15afbcd0 7419 """
a95a7133 7420 IsExposedPoint(self, Point pt) -> bool
15afbcd0
RD
7421
7422 Returns true if the given point or rectangle area has been exposed
7423 since the last repaint. Call this in an paint event handler to
7424 optimize redrawing by only redrawing those areas, which have been
7425 exposed.
7426 """
54f9ee45 7427 return _core_.Window_IsExposedPoint(*args, **kwargs)
e811c8ce 7428
4276dc52 7429 def IsExposedRect(*args, **kwargs):
15afbcd0 7430 """
a95a7133 7431 IsExposedRect(self, Rect rect) -> bool
15afbcd0
RD
7432
7433 Returns true if the given point or rectangle area has been exposed
7434 since the last repaint. Call this in an paint event handler to
7435 optimize redrawing by only redrawing those areas, which have been
7436 exposed.
7437 """
54f9ee45 7438 return _core_.Window_IsExposedRect(*args, **kwargs)
e811c8ce 7439
74a57fcd
RD
7440 def GetDefaultAttributes(*args, **kwargs):
7441 """
a95a7133 7442 GetDefaultAttributes(self) -> VisualAttributes
74a57fcd 7443
41e2b43e
RD
7444 Get the default attributes for an instance of this class. This is
7445 useful if you want to use the same font or colour in your own control
7446 as in a standard control -- which is a much better idea than hard
7447 coding specific colours or fonts which might look completely out of
db3e571a 7448 place on the user's system, especially if it uses themes.
74a57fcd 7449 """
54f9ee45 7450 return _core_.Window_GetDefaultAttributes(*args, **kwargs)
74a57fcd
RD
7451
7452 def GetClassDefaultAttributes(*args, **kwargs):
7453 """
66c033b4 7454 GetClassDefaultAttributes(int variant=WINDOW_VARIANT_NORMAL) -> VisualAttributes
74a57fcd 7455
41e2b43e
RD
7456 Get the default attributes for this class. This is useful if you want
7457 to use the same font or colour in your own control as in a standard
7458 control -- which is a much better idea than hard coding specific
db3e571a
RD
7459 colours or fonts which might look completely out of place on the
7460 user's system, especially if it uses themes.
74a57fcd
RD
7461
7462 The variant parameter is only relevant under Mac currently and is
41e2b43e 7463 ignore under other platforms. Under Mac, it will change the size of
db3e571a
RD
7464 the returned font. See `wx.Window.SetWindowVariant` for more about
7465 this.
74a57fcd 7466 """
54f9ee45 7467 return _core_.Window_GetClassDefaultAttributes(*args, **kwargs)
74a57fcd
RD
7468
7469 GetClassDefaultAttributes = staticmethod(GetClassDefaultAttributes)
e811c8ce 7470 def SetBackgroundColour(*args, **kwargs):
15afbcd0 7471 """
a95a7133 7472 SetBackgroundColour(self, Colour colour) -> bool
15afbcd0
RD
7473
7474 Sets the background colour of the window. Returns True if the colour
7475 was changed. The background colour is usually painted by the default
7476 EVT_ERASE_BACKGROUND event handler function under Windows and
f8167d6e
RD
7477 automatically under GTK. Using `wx.NullColour` will reset the window
7478 to the default background colour.
15afbcd0 7479
db3e571a 7480 Note that setting the background colour may not cause an immediate
f8167d6e 7481 refresh, so you may wish to call `ClearBackground` or `Refresh` after
15afbcd0
RD
7482 calling this function.
7483
f8167d6e
RD
7484 Using this function will disable attempts to use themes for this
7485 window, if the system supports them. Use with care since usually the
7486 themes represent the appearance chosen by the user to be used for all
7487 applications on the system.
15afbcd0 7488 """
54f9ee45 7489 return _core_.Window_SetBackgroundColour(*args, **kwargs)
e811c8ce 7490
412d302d
RD
7491 def SetOwnBackgroundColour(*args, **kwargs):
7492 """SetOwnBackgroundColour(self, Colour colour)"""
7493 return _core_.Window_SetOwnBackgroundColour(*args, **kwargs)
b2df227b 7494
e811c8ce 7495 def SetForegroundColour(*args, **kwargs):
15afbcd0 7496 """
a95a7133 7497 SetForegroundColour(self, Colour colour) -> bool
15afbcd0
RD
7498
7499 Sets the foreground colour of the window. Returns True is the colour
7500 was changed. The interpretation of foreground colour is dependent on
7501 the window class; it may be the text colour or other colour, or it may
7502 not be used at all.
7503 """
54f9ee45 7504 return _core_.Window_SetForegroundColour(*args, **kwargs)
e811c8ce 7505
fa47d7a7
VS
7506 def SetOwnForegroundColour(*args, **kwargs):
7507 """SetOwnForegroundColour(self, Colour colour)"""
7508 return _core_.Window_SetOwnForegroundColour(*args, **kwargs)
b2df227b 7509
e811c8ce 7510 def GetBackgroundColour(*args, **kwargs):
15afbcd0 7511 """
a95a7133 7512 GetBackgroundColour(self) -> Colour
15afbcd0
RD
7513
7514 Returns the background colour of the window.
7515 """
54f9ee45 7516 return _core_.Window_GetBackgroundColour(*args, **kwargs)
e811c8ce
RD
7517
7518 def GetForegroundColour(*args, **kwargs):
15afbcd0 7519 """
a95a7133 7520 GetForegroundColour(self) -> Colour
15afbcd0
RD
7521
7522 Returns the foreground colour of the window. The interpretation of
7523 foreground colour is dependent on the window class; it may be the text
7524 colour or other colour, or it may not be used at all.
7525 """
54f9ee45 7526 return _core_.Window_GetForegroundColour(*args, **kwargs)
e811c8ce 7527
562ecc31
RD
7528 def InheritsBackgroundColour(*args, **kwargs):
7529 """InheritsBackgroundColour(self) -> bool"""
7530 return _core_.Window_InheritsBackgroundColour(*args, **kwargs)
7531
7532 def UseBgCol(*args, **kwargs):
7533 """UseBgCol(self) -> bool"""
7534 return _core_.Window_UseBgCol(*args, **kwargs)
7535
7bc1e663
RD
7536 def SetBackgroundStyle(*args, **kwargs):
7537 """
7538 SetBackgroundStyle(self, int style) -> bool
7539
7540 Returns the background style of the window. The background style
7541 indicates how the background of the window is drawn.
7542
7543 ====================== ========================================
7544 wx.BG_STYLE_SYSTEM The background colour or pattern should
7545 be determined by the system
7546 wx.BG_STYLE_COLOUR The background should be a solid colour
7547 wx.BG_STYLE_CUSTOM The background will be implemented by the
7548 application.
7549 ====================== ========================================
7550
7551 On GTK+, use of wx.BG_STYLE_CUSTOM allows the flicker-free drawing of
7552 a custom background, such as a tiled bitmap. Currently the style has
7553 no effect on other platforms.
7554
7555 :see: `GetBackgroundStyle`, `SetBackgroundColour`
7556 """
7557 return _core_.Window_SetBackgroundStyle(*args, **kwargs)
7558
7559 def GetBackgroundStyle(*args, **kwargs):
7560 """
7561 GetBackgroundStyle(self) -> int
7562
7563 Returns the background style of the window.
7564
7565 :see: `SetBackgroundStyle`
7566 """
7567 return _core_.Window_GetBackgroundStyle(*args, **kwargs)
7568
51b83b37
RD
7569 def HasTransparentBackground(*args, **kwargs):
7570 """
7571 HasTransparentBackground(self) -> bool
7572
7573 Returns True if this window's background is transparent (as, for
7574 example, for `wx.StaticText`) and should show the parent window's
7575 background.
7576
7577 This method is mostly used internally by the library itself and you
7578 normally shouldn't have to call it. You may, however, have to override
7579 it in your custom control classes to ensure that background is painted
7580 correctly.
7581 """
7582 return _core_.Window_HasTransparentBackground(*args, **kwargs)
7583
e811c8ce 7584 def SetCursor(*args, **kwargs):
15afbcd0 7585 """
a95a7133 7586 SetCursor(self, Cursor cursor) -> bool
15afbcd0
RD
7587
7588 Sets the window's cursor. Notice that the window cursor also sets it
7589 for the children of the window implicitly.
7590
7591 The cursor may be wx.NullCursor in which case the window cursor will
7592 be reset back to default.
7593 """
54f9ee45 7594 return _core_.Window_SetCursor(*args, **kwargs)
e811c8ce
RD
7595
7596 def GetCursor(*args, **kwargs):
15afbcd0 7597 """
a95a7133 7598 GetCursor(self) -> Cursor
15afbcd0
RD
7599
7600 Return the cursor associated with this window.
7601 """
54f9ee45 7602 return _core_.Window_GetCursor(*args, **kwargs)
e811c8ce
RD
7603
7604 def SetFont(*args, **kwargs):
15afbcd0 7605 """
a95a7133 7606 SetFont(self, Font font) -> bool
15afbcd0
RD
7607
7608 Sets the font for this window.
7609 """
54f9ee45 7610 return _core_.Window_SetFont(*args, **kwargs)
e811c8ce 7611
fa47d7a7
VS
7612 def SetOwnFont(*args, **kwargs):
7613 """SetOwnFont(self, Font font)"""
7614 return _core_.Window_SetOwnFont(*args, **kwargs)
b2df227b 7615
e811c8ce 7616 def GetFont(*args, **kwargs):
15afbcd0 7617 """
a95a7133 7618 GetFont(self) -> Font
15afbcd0 7619
4276dc52 7620 Returns the default font used for this window.
15afbcd0 7621 """
54f9ee45 7622 return _core_.Window_GetFont(*args, **kwargs)
e811c8ce
RD
7623
7624 def SetCaret(*args, **kwargs):
15afbcd0 7625 """
a95a7133 7626 SetCaret(self, Caret caret)
15afbcd0
RD
7627
7628 Sets the caret associated with the window.
7629 """
54f9ee45 7630 return _core_.Window_SetCaret(*args, **kwargs)
e811c8ce
RD
7631
7632 def GetCaret(*args, **kwargs):
15afbcd0 7633 """
a95a7133 7634 GetCaret(self) -> Caret
15afbcd0
RD
7635
7636 Returns the caret associated with the window.
7637 """
54f9ee45 7638 return _core_.Window_GetCaret(*args, **kwargs)
e811c8ce
RD
7639
7640 def GetCharHeight(*args, **kwargs):
15afbcd0 7641 """
a95a7133 7642 GetCharHeight(self) -> int
15afbcd0
RD
7643
7644 Get the (average) character size for the current font.
7645 """
54f9ee45 7646 return _core_.Window_GetCharHeight(*args, **kwargs)
e811c8ce
RD
7647
7648 def GetCharWidth(*args, **kwargs):
15afbcd0 7649 """
a95a7133 7650 GetCharWidth(self) -> int
15afbcd0
RD
7651
7652 Get the (average) character size for the current font.
7653 """
54f9ee45 7654 return _core_.Window_GetCharWidth(*args, **kwargs)
e811c8ce
RD
7655
7656 def GetTextExtent(*args, **kwargs):
fd2dc343
RD
7657 """
7658 GetTextExtent(String string) -> (width, height)
7659
7660 Get the width and height of the text using the current font.
7661 """
54f9ee45 7662 return _core_.Window_GetTextExtent(*args, **kwargs)
e811c8ce
RD
7663
7664 def GetFullTextExtent(*args, **kwargs):
0df68c9f 7665 """
196addbf 7666 GetFullTextExtent(String string, Font font=None) ->
0df68c9f 7667 (width, height, descent, externalLeading)
e811c8ce 7668
15afbcd0
RD
7669 Get the width, height, decent and leading of the text using the
7670 current or specified font.
0df68c9f 7671 """
54f9ee45 7672 return _core_.Window_GetFullTextExtent(*args, **kwargs)
e811c8ce
RD
7673
7674 def ClientToScreenXY(*args, **kwargs):
15afbcd0
RD
7675 """
7676 ClientToScreenXY(int x, int y) -> (x,y)
7677
7678 Converts to screen coordinates from coordinates relative to this window.
7679 """
54f9ee45 7680 return _core_.Window_ClientToScreenXY(*args, **kwargs)
e811c8ce
RD
7681
7682 def ScreenToClientXY(*args, **kwargs):
15afbcd0
RD
7683 """
7684 ScreenToClientXY(int x, int y) -> (x,y)
7685
7686 Converts from screen to client window coordinates.
7687 """
54f9ee45 7688 return _core_.Window_ScreenToClientXY(*args, **kwargs)
e811c8ce
RD
7689
7690 def ClientToScreen(*args, **kwargs):
15afbcd0 7691 """
a95a7133 7692 ClientToScreen(self, Point pt) -> Point
15afbcd0
RD
7693
7694 Converts to screen coordinates from coordinates relative to this window.
7695 """
54f9ee45 7696 return _core_.Window_ClientToScreen(*args, **kwargs)
e811c8ce
RD
7697
7698 def ScreenToClient(*args, **kwargs):
15afbcd0 7699 """
a95a7133 7700 ScreenToClient(self, Point pt) -> Point
15afbcd0
RD
7701
7702 Converts from screen to client window coordinates.
7703 """
54f9ee45 7704 return _core_.Window_ScreenToClient(*args, **kwargs)
e811c8ce
RD
7705
7706 def HitTestXY(*args, **kwargs):
15afbcd0 7707 """
a95a7133 7708 HitTestXY(self, int x, int y) -> int
15afbcd0
RD
7709
7710 Test where the given (in client coords) point lies
7711 """
54f9ee45 7712 return _core_.Window_HitTestXY(*args, **kwargs)
e811c8ce
RD
7713
7714 def HitTest(*args, **kwargs):
15afbcd0 7715 """
a95a7133 7716 HitTest(self, Point pt) -> int
15afbcd0
RD
7717
7718 Test where the given (in client coords) point lies
7719 """
54f9ee45 7720 return _core_.Window_HitTest(*args, **kwargs)
e811c8ce 7721
15afbcd0
RD
7722 def GetBorder(*args):
7723 """
a95a7133
RD
7724 GetBorder(self, long flags) -> int
7725 GetBorder(self) -> int
e811c8ce 7726
15afbcd0
RD
7727 Get border for the flags of this window
7728 """
54f9ee45 7729 return _core_.Window_GetBorder(*args)
e811c8ce
RD
7730
7731 def UpdateWindowUI(*args, **kwargs):
15afbcd0 7732 """
a95a7133 7733 UpdateWindowUI(self, long flags=UPDATE_UI_NONE)
15afbcd0
RD
7734
7735 This function sends EVT_UPDATE_UI events to the window. The particular
7736 implementation depends on the window; for example a wx.ToolBar will
7737 send an update UI event for each toolbar button, and a wx.Frame will
7738 send an update UI event for each menubar menu item. You can call this
7739 function from your application to ensure that your UI is up-to-date at
7740 a particular point in time (as far as your EVT_UPDATE_UI handlers are
7741 concerned). This may be necessary if you have called
7742 wx.UpdateUIEvent.SetMode or wx.UpdateUIEvent.SetUpdateInterval to
7743 limit the overhead that wxWindows incurs by sending update UI events
7744 in idle time.
15afbcd0 7745 """
54f9ee45 7746 return _core_.Window_UpdateWindowUI(*args, **kwargs)
e811c8ce
RD
7747
7748 def PopupMenuXY(*args, **kwargs):
15afbcd0 7749 """
b0503257 7750 PopupMenuXY(self, Menu menu, int x=-1, int y=-1) -> bool
15afbcd0 7751
b0503257
RD
7752 Pops up the given menu at the specified coordinates, relative to this window,
7753 and returns control when the user has dismissed the menu. If a menu item is
7754 selected, the corresponding menu event is generated and will be processed as
7755 usual. If the default position is given then the current position of the
7756 mouse cursor will be used.
15afbcd0 7757 """
54f9ee45 7758 return _core_.Window_PopupMenuXY(*args, **kwargs)
e811c8ce 7759
15afbcd0
RD
7760 def PopupMenu(*args, **kwargs):
7761 """
b0503257 7762 PopupMenu(self, Menu menu, Point pos=DefaultPosition) -> bool
15afbcd0 7763
b0503257
RD
7764 Pops up the given menu at the specified coordinates, relative to this window,
7765 and returns control when the user has dismissed the menu. If a menu item is
7766 selected, the corresponding menu event is generated and will be processed as
7767 usual. If the default position is given then the current position of the
7768 mouse cursor will be used.
15afbcd0 7769 """
54f9ee45 7770 return _core_.Window_PopupMenu(*args, **kwargs)
15afbcd0
RD
7771
7772 def GetHandle(*args, **kwargs):
7773 """
a95a7133 7774 GetHandle(self) -> long
15afbcd0
RD
7775
7776 Returns the platform-specific handle (as a long integer) of the
7777 physical window. Currently on wxMac it returns the handle of the
7778 toplevel parent of the window.
7779 """
54f9ee45 7780 return _core_.Window_GetHandle(*args, **kwargs)
15afbcd0 7781
7e63a440
RD
7782 def AssociateHandle(*args, **kwargs):
7783 """
7784 AssociateHandle(self, long handle)
7785
7786 Associate the window with a new native handle
7787 """
7788 return _core_.Window_AssociateHandle(*args, **kwargs)
7789
7790 def DissociateHandle(*args, **kwargs):
7791 """
7792 DissociateHandle(self)
7793
7794 Dissociate the current native handle from the window
7795 """
7796 return _core_.Window_DissociateHandle(*args, **kwargs)
7797
15afbcd0
RD
7798 def HasScrollbar(*args, **kwargs):
7799 """
a95a7133 7800 HasScrollbar(self, int orient) -> bool
15afbcd0
RD
7801
7802 Does the window have the scrollbar for this orientation?
7803 """
54f9ee45 7804 return _core_.Window_HasScrollbar(*args, **kwargs)
15afbcd0
RD
7805
7806 def SetScrollbar(*args, **kwargs):
7807 """
41e2b43e 7808 SetScrollbar(self, int orientation, int position, int thumbSize, int range,
15afbcd0
RD
7809 bool refresh=True)
7810
7811 Sets the scrollbar properties of a built-in scrollbar.
15afbcd0 7812 """
54f9ee45 7813 return _core_.Window_SetScrollbar(*args, **kwargs)
e811c8ce
RD
7814
7815 def SetScrollPos(*args, **kwargs):
15afbcd0 7816 """
a95a7133 7817 SetScrollPos(self, int orientation, int pos, bool refresh=True)
15afbcd0
RD
7818
7819 Sets the position of one of the built-in scrollbars.
7820 """
54f9ee45 7821 return _core_.Window_SetScrollPos(*args, **kwargs)
e811c8ce
RD
7822
7823 def GetScrollPos(*args, **kwargs):
15afbcd0 7824 """
a95a7133 7825 GetScrollPos(self, int orientation) -> int
15afbcd0
RD
7826
7827 Returns the built-in scrollbar position.
7828 """
54f9ee45 7829 return _core_.Window_GetScrollPos(*args, **kwargs)
e811c8ce
RD
7830
7831 def GetScrollThumb(*args, **kwargs):
15afbcd0 7832 """
a95a7133 7833 GetScrollThumb(self, int orientation) -> int
15afbcd0
RD
7834
7835 Returns the built-in scrollbar thumb size.
7836 """
54f9ee45 7837 return _core_.Window_GetScrollThumb(*args, **kwargs)
e811c8ce
RD
7838
7839 def GetScrollRange(*args, **kwargs):
15afbcd0 7840 """
a95a7133 7841 GetScrollRange(self, int orientation) -> int
15afbcd0
RD
7842
7843 Returns the built-in scrollbar range.
7844 """
54f9ee45 7845 return _core_.Window_GetScrollRange(*args, **kwargs)
e811c8ce
RD
7846
7847 def ScrollWindow(*args, **kwargs):
15afbcd0 7848 """
a95a7133 7849 ScrollWindow(self, int dx, int dy, Rect rect=None)
15afbcd0
RD
7850
7851 Physically scrolls the pixels in the window and move child windows
7852 accordingly. Use this function to optimise your scrolling
7853 implementations, to minimise the area that must be redrawn. Note that
7854 it is rarely required to call this function from a user program.
15afbcd0 7855 """
54f9ee45 7856 return _core_.Window_ScrollWindow(*args, **kwargs)
e811c8ce
RD
7857
7858 def ScrollLines(*args, **kwargs):
15afbcd0 7859 """
a95a7133 7860 ScrollLines(self, int lines) -> bool
15afbcd0
RD
7861
7862 If the platform and window class supports it, scrolls the window by
7863 the given number of lines down, if lines is positive, or up if lines
7864 is negative. Returns True if the window was scrolled, False if it was
7865 already on top/bottom and nothing was done.
7866 """
54f9ee45 7867 return _core_.Window_ScrollLines(*args, **kwargs)
e811c8ce
RD
7868
7869 def ScrollPages(*args, **kwargs):
15afbcd0 7870 """
a95a7133 7871 ScrollPages(self, int pages) -> bool
15afbcd0 7872
41e2b43e 7873 If the platform and window class supports it, scrolls the window by
15afbcd0
RD
7874 the given number of pages down, if pages is positive, or up if pages
7875 is negative. Returns True if the window was scrolled, False if it was
7876 already on top/bottom and nothing was done.
7877 """
54f9ee45 7878 return _core_.Window_ScrollPages(*args, **kwargs)
e811c8ce
RD
7879
7880 def LineUp(*args, **kwargs):
15afbcd0 7881 """
a95a7133 7882 LineUp(self) -> bool
15afbcd0
RD
7883
7884 This is just a wrapper for ScrollLines(-1).
7885 """
54f9ee45 7886 return _core_.Window_LineUp(*args, **kwargs)
e811c8ce
RD
7887
7888 def LineDown(*args, **kwargs):
15afbcd0 7889 """
a95a7133 7890 LineDown(self) -> bool
15afbcd0
RD
7891
7892 This is just a wrapper for ScrollLines(1).
7893 """
54f9ee45 7894 return _core_.Window_LineDown(*args, **kwargs)
e811c8ce
RD
7895
7896 def PageUp(*args, **kwargs):
15afbcd0 7897 """
a95a7133 7898 PageUp(self) -> bool
15afbcd0
RD
7899
7900 This is just a wrapper for ScrollPages(-1).
7901 """
54f9ee45 7902 return _core_.Window_PageUp(*args, **kwargs)
e811c8ce
RD
7903
7904 def PageDown(*args, **kwargs):
15afbcd0 7905 """
a95a7133 7906 PageDown(self) -> bool
15afbcd0
RD
7907
7908 This is just a wrapper for ScrollPages(1).
7909 """
54f9ee45 7910 return _core_.Window_PageDown(*args, **kwargs)
e811c8ce
RD
7911
7912 def SetHelpText(*args, **kwargs):
15afbcd0 7913 """
a95a7133 7914 SetHelpText(self, String text)
15afbcd0
RD
7915
7916 Sets the help text to be used as context-sensitive help for this
7917 window. Note that the text is actually stored by the current
7918 wxHelpProvider implementation, and not in the window object itself.
7919 """
54f9ee45 7920 return _core_.Window_SetHelpText(*args, **kwargs)
e811c8ce
RD
7921
7922 def SetHelpTextForId(*args, **kwargs):
15afbcd0 7923 """
a95a7133 7924 SetHelpTextForId(self, String text)
15afbcd0
RD
7925
7926 Associate this help text with all windows with the same id as this
7927 one.
7928 """
54f9ee45 7929 return _core_.Window_SetHelpTextForId(*args, **kwargs)
e811c8ce
RD
7930
7931 def GetHelpText(*args, **kwargs):
15afbcd0 7932 """
a95a7133 7933 GetHelpText(self) -> String
15afbcd0
RD
7934
7935 Gets the help text to be used as context-sensitive help for this
7936 window. Note that the text is actually stored by the current
7937 wxHelpProvider implementation, and not in the window object itself.
7938 """
54f9ee45 7939 return _core_.Window_GetHelpText(*args, **kwargs)
e811c8ce
RD
7940
7941 def SetToolTipString(*args, **kwargs):
15afbcd0 7942 """
a95a7133 7943 SetToolTipString(self, String tip)
15afbcd0
RD
7944
7945 Attach a tooltip to the window.
7946 """
54f9ee45 7947 return _core_.Window_SetToolTipString(*args, **kwargs)
e811c8ce
RD
7948
7949 def SetToolTip(*args, **kwargs):
15afbcd0 7950 """
a95a7133 7951 SetToolTip(self, ToolTip tip)
15afbcd0
RD
7952
7953 Attach a tooltip to the window.
7954 """
54f9ee45 7955 return _core_.Window_SetToolTip(*args, **kwargs)
e811c8ce
RD
7956
7957 def GetToolTip(*args, **kwargs):
15afbcd0 7958 """
a95a7133 7959 GetToolTip(self) -> ToolTip
15afbcd0
RD
7960
7961 get the associated tooltip or None if none
7962 """
54f9ee45 7963 return _core_.Window_GetToolTip(*args, **kwargs)
e811c8ce
RD
7964
7965 def SetDropTarget(*args, **kwargs):
15afbcd0 7966 """
a95a7133 7967 SetDropTarget(self, DropTarget dropTarget)
15afbcd0
RD
7968
7969 Associates a drop target with this window. If the window already has
7970 a drop target, it is deleted.
7971 """
54f9ee45 7972 return _core_.Window_SetDropTarget(*args, **kwargs)
e811c8ce
RD
7973
7974 def GetDropTarget(*args, **kwargs):
15afbcd0 7975 """
a95a7133 7976 GetDropTarget(self) -> DropTarget
15afbcd0
RD
7977
7978 Returns the associated drop target, which may be None.
7979 """
54f9ee45 7980 return _core_.Window_GetDropTarget(*args, **kwargs)
e811c8ce
RD
7981
7982 def SetConstraints(*args, **kwargs):
15afbcd0 7983 """
a95a7133 7984 SetConstraints(self, LayoutConstraints constraints)
15afbcd0
RD
7985
7986 Sets the window to have the given layout constraints. If an existing
7987 layout constraints object is already owned by the window, it will be
7988 deleted. Pass None to disassociate and delete the window's current
7989 constraints.
7990
7991 You must call SetAutoLayout to tell a window to use the constraints
7992 automatically in its default EVT_SIZE handler; otherwise, you must
7993 handle EVT_SIZE yourself and call Layout() explicitly. When setting
7994 both a wx.LayoutConstraints and a wx.Sizer, only the sizer will have
7995 effect.
7996 """
54f9ee45 7997 return _core_.Window_SetConstraints(*args, **kwargs)
e811c8ce
RD
7998
7999 def GetConstraints(*args, **kwargs):
15afbcd0 8000 """
a95a7133 8001 GetConstraints(self) -> LayoutConstraints
15afbcd0
RD
8002
8003 Returns a pointer to the window's layout constraints, or None if there
8004 are none.
8005 """
54f9ee45 8006 return _core_.Window_GetConstraints(*args, **kwargs)
e811c8ce
RD
8007
8008 def SetAutoLayout(*args, **kwargs):
15afbcd0 8009 """
a95a7133 8010 SetAutoLayout(self, bool autoLayout)
15afbcd0
RD
8011
8012 Determines whether the Layout function will be called automatically
8013 when the window is resized. It is called implicitly by SetSizer but
8014 if you use SetConstraints you should call it manually or otherwise the
8015 window layout won't be correctly updated when its size changes.
8016 """
54f9ee45 8017 return _core_.Window_SetAutoLayout(*args, **kwargs)
e811c8ce
RD
8018
8019 def GetAutoLayout(*args, **kwargs):
15afbcd0 8020 """
a95a7133 8021 GetAutoLayout(self) -> bool
15afbcd0
RD
8022
8023 Returns the current autoLayout setting
8024 """
54f9ee45 8025 return _core_.Window_GetAutoLayout(*args, **kwargs)
e811c8ce
RD
8026
8027 def Layout(*args, **kwargs):
15afbcd0 8028 """
a95a7133 8029 Layout(self) -> bool
15afbcd0
RD
8030
8031 Invokes the constraint-based layout algorithm or the sizer-based
8032 algorithm for this window. See SetAutoLayout: when auto layout is on,
8033 this function gets called automatically by the default EVT_SIZE
8034 handler when the window is resized.
8035 """
54f9ee45 8036 return _core_.Window_Layout(*args, **kwargs)
e811c8ce
RD
8037
8038 def SetSizer(*args, **kwargs):
15afbcd0 8039 """
a95a7133 8040 SetSizer(self, Sizer sizer, bool deleteOld=True)
15afbcd0
RD
8041
8042 Sets the window to have the given layout sizer. The window will then
8043 own the object, and will take care of its deletion. If an existing
8044 layout sizer object is already owned by the window, it will be deleted
8045 if the deleteOld parameter is true. Note that this function will also
8046 call SetAutoLayout implicitly with a True parameter if the sizer is
ae8162c8 8047 non-None, and False otherwise.
15afbcd0 8048 """
54f9ee45 8049 return _core_.Window_SetSizer(*args, **kwargs)
e811c8ce
RD
8050
8051 def SetSizerAndFit(*args, **kwargs):
15afbcd0 8052 """
a95a7133 8053 SetSizerAndFit(self, Sizer sizer, bool deleteOld=True)
15afbcd0
RD
8054
8055 The same as SetSizer, except it also sets the size hints for the
8056 window based on the sizer's minimum size.
8057 """
54f9ee45 8058 return _core_.Window_SetSizerAndFit(*args, **kwargs)
e811c8ce
RD
8059
8060 def GetSizer(*args, **kwargs):
15afbcd0 8061 """
a95a7133 8062 GetSizer(self) -> Sizer
15afbcd0
RD
8063
8064 Return the sizer associated with the window by a previous call to
8065 SetSizer or None if there isn't one.
8066 """
54f9ee45 8067 return _core_.Window_GetSizer(*args, **kwargs)
e811c8ce
RD
8068
8069 def SetContainingSizer(*args, **kwargs):
15afbcd0 8070 """
a95a7133 8071 SetContainingSizer(self, Sizer sizer)
15afbcd0
RD
8072
8073 This normally does not need to be called by application code. It is
8074 called internally when a window is added to a sizer, and is used so
8075 the window can remove itself from the sizer when it is destroyed.
8076 """
54f9ee45 8077 return _core_.Window_SetContainingSizer(*args, **kwargs)
e811c8ce
RD
8078
8079 def GetContainingSizer(*args, **kwargs):
15afbcd0 8080 """
a95a7133 8081 GetContainingSizer(self) -> Sizer
15afbcd0
RD
8082
8083 Return the sizer that this window is a member of, if any, otherwise None.
8084 """
54f9ee45 8085 return _core_.Window_GetContainingSizer(*args, **kwargs)
e811c8ce 8086
a95a7133
RD
8087 def InheritAttributes(*args, **kwargs):
8088 """
8089 InheritAttributes(self)
8090
41e2b43e
RD
8091 This function is (or should be, in case of custom controls) called
8092 during window creation to intelligently set up the window visual
8093 attributes, that is the font and the foreground and background
8094 colours.
8095
8096 By 'intelligently' the following is meant: by default, all windows use
8097 their own default attributes. However if some of the parent's
8098 attributes are explicitly changed (that is, using SetFont and not
fa47d7a7 8099 SetOwnFont) and if the corresponding attribute hadn't been
41e2b43e
RD
8100 explicitly set for this window itself, then this window takes the same
8101 value as used by the parent. In addition, if the window overrides
8102 ShouldInheritColours to return false, the colours will not be changed
8103 no matter what and only the font might.
8104
34621cc5 8105 This rather complicated logic is necessary in order to accommodate the
ec9b55ca 8106 different usage scenarios. The most common one is when all default
41e2b43e
RD
8107 attributes are used and in this case, nothing should be inherited as
8108 in modern GUIs different controls use different fonts (and colours)
8109 than their siblings so they can't inherit the same value from the
8110 parent. However it was also deemed desirable to allow to simply change
8111 the attributes of all children at once by just changing the font or
8112 colour of their common parent, hence in this case we do inherit the
8113 parents attributes.
8114
a95a7133 8115 """
54f9ee45 8116 return _core_.Window_InheritAttributes(*args, **kwargs)
a95a7133
RD
8117
8118 def ShouldInheritColours(*args, **kwargs):
8119 """
8120 ShouldInheritColours(self) -> bool
8121
8122 Return true from here to allow the colours of this window to be
41e2b43e
RD
8123 changed by InheritAttributes, returning false forbids inheriting them
8124 from the parent window.
a95a7133 8125
41e2b43e
RD
8126 The base class version returns false, but this method is overridden in
8127 wxControl where it returns true.
a95a7133 8128 """
54f9ee45 8129 return _core_.Window_ShouldInheritColours(*args, **kwargs)
a95a7133 8130
e811c8ce 8131 def PostCreate(self, pre):
15afbcd0
RD
8132 """
8133 Phase 3 of the 2-phase create <wink!>
8134 Call this method after precreating the window with the 2-phase create method.
8135 """
e811c8ce
RD
8136 self.this = pre.this
8137 self.thisown = pre.thisown
8138 pre.thisown = 0
8139 if hasattr(self, '_setOORInfo'):
8140 self._setOORInfo(self)
8141 if hasattr(self, '_setCallbackInfo'):
8142 self._setCallbackInfo(self, self.__class__)
8143
8144
8145class WindowPtr(Window):
8146 def __init__(self, this):
8147 self.this = this
8148 if not hasattr(self,"thisown"): self.thisown = 0
8149 self.__class__ = Window
54f9ee45 8150_core_.Window_swigregister(WindowPtr)
e811c8ce
RD
8151
8152def PreWindow(*args, **kwargs):
15afbcd0
RD
8153 """
8154 PreWindow() -> Window
8155
8156 Precreate a Window for 2-phase creation.
8157 """
54f9ee45 8158 val = _core_.new_PreWindow(*args, **kwargs)
e811c8ce
RD
8159 val.thisown = 1
8160 return val
8161
8162def Window_NewControlId(*args, **kwargs):
15afbcd0
RD
8163 """
8164 Window_NewControlId() -> int
8165
8166 Generate a control id for the controls which were not given one.
8167 """
54f9ee45 8168 return _core_.Window_NewControlId(*args, **kwargs)
e811c8ce
RD
8169
8170def Window_NextControlId(*args, **kwargs):
15afbcd0
RD
8171 """
8172 Window_NextControlId(int winid) -> int
8173
8174 Get the id of the control following the one with the given
41e2b43e 8175 autogenerated) id
15afbcd0 8176 """
54f9ee45 8177 return _core_.Window_NextControlId(*args, **kwargs)
e811c8ce
RD
8178
8179def Window_PrevControlId(*args, **kwargs):
15afbcd0
RD
8180 """
8181 Window_PrevControlId(int winid) -> int
8182
8183 Get the id of the control preceding the one with the given
41e2b43e 8184 autogenerated) id
15afbcd0 8185 """
54f9ee45 8186 return _core_.Window_PrevControlId(*args, **kwargs)
e811c8ce
RD
8187
8188def Window_FindFocus(*args, **kwargs):
15afbcd0
RD
8189 """
8190 Window_FindFocus() -> Window
8191
8192 Returns the window or control that currently has the keyboard focus,
8193 or None.
8194 """
54f9ee45 8195 return _core_.Window_FindFocus(*args, **kwargs)
e811c8ce
RD
8196
8197def Window_GetCapture(*args, **kwargs):
15afbcd0
RD
8198 """
8199 Window_GetCapture() -> Window
8200
8201 Returns the window which currently captures the mouse or None
8202 """
54f9ee45 8203 return _core_.Window_GetCapture(*args, **kwargs)
e811c8ce 8204
74a57fcd
RD
8205def Window_GetClassDefaultAttributes(*args, **kwargs):
8206 """
8207 Window_GetClassDefaultAttributes(int variant=WINDOW_VARIANT_NORMAL) -> VisualAttributes
8208
41e2b43e
RD
8209 Get the default attributes for this class. This is useful if you want
8210 to use the same font or colour in your own control as in a standard
8211 control -- which is a much better idea than hard coding specific
db3e571a
RD
8212 colours or fonts which might look completely out of place on the
8213 user's system, especially if it uses themes.
74a57fcd
RD
8214
8215 The variant parameter is only relevant under Mac currently and is
41e2b43e 8216 ignore under other platforms. Under Mac, it will change the size of
db3e571a
RD
8217 the returned font. See `wx.Window.SetWindowVariant` for more about
8218 this.
74a57fcd 8219 """
54f9ee45 8220 return _core_.Window_GetClassDefaultAttributes(*args, **kwargs)
74a57fcd 8221
e811c8ce 8222def DLG_PNT(win, point_or_x, y=None):
15afbcd0
RD
8223 """
8224 Convenience function for converting a Point or (x,y) in
8225 dialog units to pixel units.
8226 """
e811c8ce
RD
8227 if y is None:
8228 return win.ConvertDialogPointToPixels(point_or_x)
8229 else:
fd3f2efe 8230 return win.ConvertDialogPointToPixels(wx.Point(point_or_x, y))
e811c8ce
RD
8231
8232def DLG_SZE(win, size_width, height=None):
15afbcd0
RD
8233 """
8234 Convenience function for converting a Size or (w,h) in
8235 dialog units to pixel units.
8236 """
e811c8ce
RD
8237 if height is None:
8238 return win.ConvertDialogSizeToPixels(size_width)
8239 else:
fd3f2efe 8240 return win.ConvertDialogSizeToPixels(wx.Size(size_width, height))
e811c8ce
RD
8241
8242
8243def FindWindowById(*args, **kwargs):
15afbcd0
RD
8244 """
8245 FindWindowById(long id, Window parent=None) -> Window
8246
8247 Find the first window in the application with the given id. If parent
8248 is None, the search will start from all top-level frames and dialog
8249 boxes; if non-None, the search will be limited to the given window
8250 hierarchy. The search is recursive in both cases.
8251 """
54f9ee45 8252 return _core_.FindWindowById(*args, **kwargs)
e811c8ce
RD
8253
8254def FindWindowByName(*args, **kwargs):
15afbcd0
RD
8255 """
8256 FindWindowByName(String name, Window parent=None) -> Window
8257
8258 Find a window by its name (as given in a window constructor or Create
8259 function call). If parent is None, the search will start from all
8260 top-level frames and dialog boxes; if non-None, the search will be
8261 limited to the given window hierarchy. The search is recursive in both
8262 cases.
8263
8264 If no window with such name is found, wx.FindWindowByLabel is called.
8265 """
54f9ee45 8266 return _core_.FindWindowByName(*args, **kwargs)
e811c8ce
RD
8267
8268def FindWindowByLabel(*args, **kwargs):
15afbcd0
RD
8269 """
8270 FindWindowByLabel(String label, Window parent=None) -> Window
8271
8272 Find a window by its label. Depending on the type of window, the label
8273 may be a window title or panel item label. If parent is None, the
8274 search will start from all top-level frames and dialog boxes; if
8275 non-None, the search will be limited to the given window
8276 hierarchy. The search is recursive in both cases.
8277 """
54f9ee45 8278 return _core_.FindWindowByLabel(*args, **kwargs)
e811c8ce
RD
8279
8280def Window_FromHWND(*args, **kwargs):
4276dc52 8281 """Window_FromHWND(Window parent, unsigned long _hWnd) -> Window"""
54f9ee45 8282 return _core_.Window_FromHWND(*args, **kwargs)
b6b0383e
RD
8283
8284def GetTopLevelWindows(*args, **kwargs):
8285 """
8286 GetTopLevelWindows() -> PyObject
8287
8288 Returns a list of the the application's top-level windows, (frames,
8289 dialogs, etc.) NOTE: Currently this is a copy of the list maintained
8290 by wxWidgets, and so it is only valid as long as no top-level windows
8291 are closed or new top-level windows are created.
8292
8293 """
8294 return _core_.GetTopLevelWindows(*args, **kwargs)
e811c8ce
RD
8295#---------------------------------------------------------------------------
8296
8297class Validator(EvtHandler):
093d3ff1 8298 """Proxy of C++ Validator class"""
e811c8ce
RD
8299 def __repr__(self):
8300 return "<%s.%s; proxy of C++ wxValidator instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
8301 def __init__(self, *args, **kwargs):
a95a7133 8302 """__init__(self) -> Validator"""
54f9ee45 8303 newobj = _core_.new_Validator(*args, **kwargs)
d14a1e28
RD
8304 self.this = newobj.this
8305 self.thisown = 1
8306 del newobj.thisown
8307 self._setOORInfo(self)
e811c8ce
RD
8308
8309 def Clone(*args, **kwargs):
a95a7133 8310 """Clone(self) -> Validator"""
54f9ee45 8311 return _core_.Validator_Clone(*args, **kwargs)
e811c8ce
RD
8312
8313 def Validate(*args, **kwargs):
a95a7133 8314 """Validate(self, Window parent) -> bool"""
54f9ee45 8315 return _core_.Validator_Validate(*args, **kwargs)
e811c8ce
RD
8316
8317 def TransferToWindow(*args, **kwargs):
a95a7133 8318 """TransferToWindow(self) -> bool"""
54f9ee45 8319 return _core_.Validator_TransferToWindow(*args, **kwargs)
e811c8ce
RD
8320
8321 def TransferFromWindow(*args, **kwargs):
a95a7133 8322 """TransferFromWindow(self) -> bool"""
54f9ee45 8323 return _core_.Validator_TransferFromWindow(*args, **kwargs)
e811c8ce
RD
8324
8325 def GetWindow(*args, **kwargs):
a95a7133 8326 """GetWindow(self) -> Window"""
54f9ee45 8327 return _core_.Validator_GetWindow(*args, **kwargs)
e811c8ce
RD
8328
8329 def SetWindow(*args, **kwargs):
a95a7133 8330 """SetWindow(self, Window window)"""
54f9ee45 8331 return _core_.Validator_SetWindow(*args, **kwargs)
e811c8ce
RD
8332
8333 def IsSilent(*args, **kwargs):
66c033b4 8334 """IsSilent() -> bool"""
54f9ee45 8335 return _core_.Validator_IsSilent(*args, **kwargs)
e811c8ce
RD
8336
8337 IsSilent = staticmethod(IsSilent)
8338 def SetBellOnError(*args, **kwargs):
66c033b4 8339 """SetBellOnError(int doIt=True)"""
54f9ee45 8340 return _core_.Validator_SetBellOnError(*args, **kwargs)
e811c8ce
RD
8341
8342 SetBellOnError = staticmethod(SetBellOnError)
8343
8344class ValidatorPtr(Validator):
8345 def __init__(self, this):
8346 self.this = this
8347 if not hasattr(self,"thisown"): self.thisown = 0
8348 self.__class__ = Validator
54f9ee45 8349_core_.Validator_swigregister(ValidatorPtr)
e811c8ce
RD
8350
8351def Validator_IsSilent(*args, **kwargs):
8352 """Validator_IsSilent() -> bool"""
54f9ee45 8353 return _core_.Validator_IsSilent(*args, **kwargs)
e811c8ce
RD
8354
8355def Validator_SetBellOnError(*args, **kwargs):
8356 """Validator_SetBellOnError(int doIt=True)"""
54f9ee45 8357 return _core_.Validator_SetBellOnError(*args, **kwargs)
e811c8ce
RD
8358
8359class PyValidator(Validator):
093d3ff1 8360 """Proxy of C++ PyValidator class"""
e811c8ce
RD
8361 def __repr__(self):
8362 return "<%s.%s; proxy of C++ wxPyValidator instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
8363 def __init__(self, *args, **kwargs):
a95a7133 8364 """__init__(self) -> PyValidator"""
54f9ee45 8365 newobj = _core_.new_PyValidator(*args, **kwargs)
e811c8ce
RD
8366 self.this = newobj.this
8367 self.thisown = 1
8368 del newobj.thisown
8369
8370 self._setCallbackInfo(self, PyValidator, 1)
8371 self._setOORInfo(self)
8372
8373 def _setCallbackInfo(*args, **kwargs):
a95a7133 8374 """_setCallbackInfo(self, PyObject self, PyObject _class, int incref=True)"""
54f9ee45 8375 return _core_.PyValidator__setCallbackInfo(*args, **kwargs)
e811c8ce
RD
8376
8377
8378class PyValidatorPtr(PyValidator):
8379 def __init__(self, this):
8380 self.this = this
8381 if not hasattr(self,"thisown"): self.thisown = 0
8382 self.__class__ = PyValidator
54f9ee45 8383_core_.PyValidator_swigregister(PyValidatorPtr)
e811c8ce
RD
8384
8385#---------------------------------------------------------------------------
8386
8387class Menu(EvtHandler):
093d3ff1 8388 """Proxy of C++ Menu class"""
d14a1e28
RD
8389 def __repr__(self):
8390 return "<%s.%s; proxy of C++ wxMenu instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
e811c8ce 8391 def __init__(self, *args, **kwargs):
a95a7133 8392 """__init__(self, String title=EmptyString, long style=0) -> Menu"""
54f9ee45 8393 newobj = _core_.new_Menu(*args, **kwargs)
e811c8ce
RD
8394 self.this = newobj.this
8395 self.thisown = 1
8396 del newobj.thisown
8397 self._setOORInfo(self)
8398
8399 def Append(*args, **kwargs):
a95a7133 8400 """Append(self, int id, String text, String help=EmptyString, int kind=ITEM_NORMAL) -> MenuItem"""
54f9ee45 8401 return _core_.Menu_Append(*args, **kwargs)
e811c8ce
RD
8402
8403 def AppendSeparator(*args, **kwargs):
a95a7133 8404 """AppendSeparator(self) -> MenuItem"""
54f9ee45 8405 return _core_.Menu_AppendSeparator(*args, **kwargs)
e811c8ce
RD
8406
8407 def AppendCheckItem(*args, **kwargs):
a95a7133 8408 """AppendCheckItem(self, int id, String text, String help=EmptyString) -> MenuItem"""
54f9ee45 8409 return _core_.Menu_AppendCheckItem(*args, **kwargs)
e811c8ce
RD
8410
8411 def AppendRadioItem(*args, **kwargs):
a95a7133 8412 """AppendRadioItem(self, int id, String text, String help=EmptyString) -> MenuItem"""
54f9ee45 8413 return _core_.Menu_AppendRadioItem(*args, **kwargs)
e811c8ce
RD
8414
8415 def AppendMenu(*args, **kwargs):
a95a7133 8416 """AppendMenu(self, int id, String text, Menu submenu, String help=EmptyString) -> MenuItem"""
54f9ee45 8417 return _core_.Menu_AppendMenu(*args, **kwargs)
e811c8ce
RD
8418
8419 def AppendItem(*args, **kwargs):
a95a7133 8420 """AppendItem(self, MenuItem item) -> MenuItem"""
54f9ee45 8421 return _core_.Menu_AppendItem(*args, **kwargs)
e811c8ce
RD
8422
8423 def Break(*args, **kwargs):
a95a7133 8424 """Break(self)"""
54f9ee45 8425 return _core_.Menu_Break(*args, **kwargs)
e811c8ce
RD
8426
8427 def InsertItem(*args, **kwargs):
a95a7133 8428 """InsertItem(self, size_t pos, MenuItem item) -> MenuItem"""
54f9ee45 8429 return _core_.Menu_InsertItem(*args, **kwargs)
e811c8ce
RD
8430
8431 def Insert(*args, **kwargs):
0df68c9f 8432 """
a95a7133 8433 Insert(self, size_t pos, int id, String text, String help=EmptyString,
a41e16b6 8434 int kind=ITEM_NORMAL) -> MenuItem
0df68c9f 8435 """
54f9ee45 8436 return _core_.Menu_Insert(*args, **kwargs)
e811c8ce
RD
8437
8438 def InsertSeparator(*args, **kwargs):
a95a7133 8439 """InsertSeparator(self, size_t pos) -> MenuItem"""
54f9ee45 8440 return _core_.Menu_InsertSeparator(*args, **kwargs)
e811c8ce
RD
8441
8442 def InsertCheckItem(*args, **kwargs):
a95a7133 8443 """InsertCheckItem(self, size_t pos, int id, String text, String help=EmptyString) -> MenuItem"""
54f9ee45 8444 return _core_.Menu_InsertCheckItem(*args, **kwargs)
e811c8ce
RD
8445
8446 def InsertRadioItem(*args, **kwargs):
a95a7133 8447 """InsertRadioItem(self, size_t pos, int id, String text, String help=EmptyString) -> MenuItem"""
54f9ee45 8448 return _core_.Menu_InsertRadioItem(*args, **kwargs)
e811c8ce
RD
8449
8450 def InsertMenu(*args, **kwargs):
a95a7133 8451 """InsertMenu(self, size_t pos, int id, String text, Menu submenu, String help=EmptyString) -> MenuItem"""
54f9ee45 8452 return _core_.Menu_InsertMenu(*args, **kwargs)
e811c8ce
RD
8453
8454 def PrependItem(*args, **kwargs):
a95a7133 8455 """PrependItem(self, MenuItem item) -> MenuItem"""
54f9ee45 8456 return _core_.Menu_PrependItem(*args, **kwargs)
e811c8ce
RD
8457
8458 def Prepend(*args, **kwargs):
a95a7133 8459 """Prepend(self, int id, String text, String help=EmptyString, int kind=ITEM_NORMAL) -> MenuItem"""
54f9ee45 8460 return _core_.Menu_Prepend(*args, **kwargs)
e811c8ce
RD
8461
8462 def PrependSeparator(*args, **kwargs):
a95a7133 8463 """PrependSeparator(self) -> MenuItem"""
54f9ee45 8464 return _core_.Menu_PrependSeparator(*args, **kwargs)
e811c8ce
RD
8465
8466 def PrependCheckItem(*args, **kwargs):
a95a7133 8467 """PrependCheckItem(self, int id, String text, String help=EmptyString) -> MenuItem"""
54f9ee45 8468 return _core_.Menu_PrependCheckItem(*args, **kwargs)
e811c8ce
RD
8469
8470 def PrependRadioItem(*args, **kwargs):
a95a7133 8471 """PrependRadioItem(self, int id, String text, String help=EmptyString) -> MenuItem"""
54f9ee45 8472 return _core_.Menu_PrependRadioItem(*args, **kwargs)
e811c8ce
RD
8473
8474 def PrependMenu(*args, **kwargs):
a95a7133 8475 """PrependMenu(self, int id, String text, Menu submenu, String help=EmptyString) -> MenuItem"""
54f9ee45 8476 return _core_.Menu_PrependMenu(*args, **kwargs)
e811c8ce
RD
8477
8478 def Remove(*args, **kwargs):
a95a7133 8479 """Remove(self, int id) -> MenuItem"""
54f9ee45 8480 return _core_.Menu_Remove(*args, **kwargs)
e811c8ce
RD
8481
8482 def RemoveItem(*args, **kwargs):
a95a7133 8483 """RemoveItem(self, MenuItem item) -> MenuItem"""
54f9ee45 8484 return _core_.Menu_RemoveItem(*args, **kwargs)
e811c8ce
RD
8485
8486 def Delete(*args, **kwargs):
a95a7133 8487 """Delete(self, int id) -> bool"""
54f9ee45 8488 return _core_.Menu_Delete(*args, **kwargs)
e811c8ce
RD
8489
8490 def DeleteItem(*args, **kwargs):
a95a7133 8491 """DeleteItem(self, MenuItem item) -> bool"""
54f9ee45 8492 return _core_.Menu_DeleteItem(*args, **kwargs)
e811c8ce
RD
8493
8494 def Destroy(*args, **kwargs):
0df68c9f 8495 """
a95a7133 8496 Destroy(self)
e811c8ce 8497
0df68c9f
RD
8498 Deletes the C++ object this Python object is a proxy for.
8499 """
54f9ee45 8500 return _core_.Menu_Destroy(*args, **kwargs)
e811c8ce
RD
8501
8502 def DestroyId(*args, **kwargs):
0df68c9f 8503 """
a95a7133 8504 DestroyId(self, int id) -> bool
e811c8ce 8505
0df68c9f
RD
8506 Deletes the C++ object this Python object is a proxy for.
8507 """
54f9ee45 8508 return _core_.Menu_DestroyId(*args, **kwargs)
e811c8ce
RD
8509
8510 def DestroyItem(*args, **kwargs):
0df68c9f 8511 """
a95a7133 8512 DestroyItem(self, MenuItem item) -> bool
e811c8ce 8513
0df68c9f
RD
8514 Deletes the C++ object this Python object is a proxy for.
8515 """
54f9ee45 8516 return _core_.Menu_DestroyItem(*args, **kwargs)
e811c8ce
RD
8517
8518 def GetMenuItemCount(*args, **kwargs):
a95a7133 8519 """GetMenuItemCount(self) -> size_t"""
54f9ee45 8520 return _core_.Menu_GetMenuItemCount(*args, **kwargs)
e811c8ce
RD
8521
8522 def GetMenuItems(*args, **kwargs):
a95a7133 8523 """GetMenuItems(self) -> PyObject"""
54f9ee45 8524 return _core_.Menu_GetMenuItems(*args, **kwargs)
e811c8ce
RD
8525
8526 def FindItem(*args, **kwargs):
a95a7133 8527 """FindItem(self, String item) -> int"""
54f9ee45 8528 return _core_.Menu_FindItem(*args, **kwargs)
e811c8ce
RD
8529
8530 def FindItemById(*args, **kwargs):
a95a7133 8531 """FindItemById(self, int id) -> MenuItem"""
54f9ee45 8532 return _core_.Menu_FindItemById(*args, **kwargs)
e811c8ce
RD
8533
8534 def FindItemByPosition(*args, **kwargs):
a95a7133 8535 """FindItemByPosition(self, size_t position) -> MenuItem"""
54f9ee45 8536 return _core_.Menu_FindItemByPosition(*args, **kwargs)
e811c8ce
RD
8537
8538 def Enable(*args, **kwargs):
a95a7133 8539 """Enable(self, int id, bool enable)"""
54f9ee45 8540 return _core_.Menu_Enable(*args, **kwargs)
e811c8ce
RD
8541
8542 def IsEnabled(*args, **kwargs):
a95a7133 8543 """IsEnabled(self, int id) -> bool"""
54f9ee45 8544 return _core_.Menu_IsEnabled(*args, **kwargs)
e811c8ce
RD
8545
8546 def Check(*args, **kwargs):
a95a7133 8547 """Check(self, int id, bool check)"""
54f9ee45 8548 return _core_.Menu_Check(*args, **kwargs)
e811c8ce
RD
8549
8550 def IsChecked(*args, **kwargs):
a95a7133 8551 """IsChecked(self, int id) -> bool"""
54f9ee45 8552 return _core_.Menu_IsChecked(*args, **kwargs)
e811c8ce
RD
8553
8554 def SetLabel(*args, **kwargs):
a95a7133 8555 """SetLabel(self, int id, String label)"""
54f9ee45 8556 return _core_.Menu_SetLabel(*args, **kwargs)
e811c8ce
RD
8557
8558 def GetLabel(*args, **kwargs):
a95a7133 8559 """GetLabel(self, int id) -> String"""
54f9ee45 8560 return _core_.Menu_GetLabel(*args, **kwargs)
e811c8ce
RD
8561
8562 def SetHelpString(*args, **kwargs):
a95a7133 8563 """SetHelpString(self, int id, String helpString)"""
54f9ee45 8564 return _core_.Menu_SetHelpString(*args, **kwargs)
e811c8ce
RD
8565
8566 def GetHelpString(*args, **kwargs):
a95a7133 8567 """GetHelpString(self, int id) -> String"""
54f9ee45 8568 return _core_.Menu_GetHelpString(*args, **kwargs)
e811c8ce
RD
8569
8570 def SetTitle(*args, **kwargs):
a95a7133 8571 """SetTitle(self, String title)"""
54f9ee45 8572 return _core_.Menu_SetTitle(*args, **kwargs)
e811c8ce
RD
8573
8574 def GetTitle(*args, **kwargs):
a95a7133 8575 """GetTitle(self) -> String"""
54f9ee45 8576 return _core_.Menu_GetTitle(*args, **kwargs)
e811c8ce
RD
8577
8578 def SetEventHandler(*args, **kwargs):
a95a7133 8579 """SetEventHandler(self, EvtHandler handler)"""
54f9ee45 8580 return _core_.Menu_SetEventHandler(*args, **kwargs)
e811c8ce
RD
8581
8582 def GetEventHandler(*args, **kwargs):
a95a7133 8583 """GetEventHandler(self) -> EvtHandler"""
54f9ee45 8584 return _core_.Menu_GetEventHandler(*args, **kwargs)
e811c8ce
RD
8585
8586 def SetInvokingWindow(*args, **kwargs):
a95a7133 8587 """SetInvokingWindow(self, Window win)"""
54f9ee45 8588 return _core_.Menu_SetInvokingWindow(*args, **kwargs)
e811c8ce
RD
8589
8590 def GetInvokingWindow(*args, **kwargs):
a95a7133 8591 """GetInvokingWindow(self) -> Window"""
54f9ee45 8592 return _core_.Menu_GetInvokingWindow(*args, **kwargs)
e811c8ce
RD
8593
8594 def GetStyle(*args, **kwargs):
a95a7133 8595 """GetStyle(self) -> long"""
54f9ee45 8596 return _core_.Menu_GetStyle(*args, **kwargs)
e811c8ce
RD
8597
8598 def UpdateUI(*args, **kwargs):
a95a7133 8599 """UpdateUI(self, EvtHandler source=None)"""
54f9ee45 8600 return _core_.Menu_UpdateUI(*args, **kwargs)
e811c8ce
RD
8601
8602 def GetMenuBar(*args, **kwargs):
a95a7133 8603 """GetMenuBar(self) -> MenuBar"""
54f9ee45 8604 return _core_.Menu_GetMenuBar(*args, **kwargs)
e811c8ce
RD
8605
8606 def Attach(*args, **kwargs):
a95a7133 8607 """Attach(self, wxMenuBarBase menubar)"""
54f9ee45 8608 return _core_.Menu_Attach(*args, **kwargs)
e811c8ce
RD
8609
8610 def Detach(*args, **kwargs):
a95a7133 8611 """Detach(self)"""
54f9ee45 8612 return _core_.Menu_Detach(*args, **kwargs)
e811c8ce
RD
8613
8614 def IsAttached(*args, **kwargs):
a95a7133 8615 """IsAttached(self) -> bool"""
54f9ee45 8616 return _core_.Menu_IsAttached(*args, **kwargs)
e811c8ce
RD
8617
8618 def SetParent(*args, **kwargs):
a95a7133 8619 """SetParent(self, Menu parent)"""
54f9ee45 8620 return _core_.Menu_SetParent(*args, **kwargs)
e811c8ce
RD
8621
8622 def GetParent(*args, **kwargs):
a95a7133 8623 """GetParent(self) -> Menu"""
54f9ee45 8624 return _core_.Menu_GetParent(*args, **kwargs)
e811c8ce 8625
d14a1e28
RD
8626
8627class MenuPtr(Menu):
8628 def __init__(self, this):
8629 self.this = this
8630 if not hasattr(self,"thisown"): self.thisown = 0
8631 self.__class__ = Menu
54f9ee45 8632_core_.Menu_swigregister(MenuPtr)
d14a1e28
RD
8633DefaultValidator = cvar.DefaultValidator
8634
8635#---------------------------------------------------------------------------
8636
8637class MenuBar(Window):
093d3ff1 8638 """Proxy of C++ MenuBar class"""
e811c8ce
RD
8639 def __repr__(self):
8640 return "<%s.%s; proxy of C++ wxMenuBar instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 8641 def __init__(self, *args, **kwargs):
a95a7133 8642 """__init__(self, long style=0) -> MenuBar"""
54f9ee45 8643 newobj = _core_.new_MenuBar(*args, **kwargs)
d14a1e28
RD
8644 self.this = newobj.this
8645 self.thisown = 1
8646 del newobj.thisown
8647 self._setOORInfo(self)
e811c8ce
RD
8648
8649 def Append(*args, **kwargs):
a95a7133 8650 """Append(self, Menu menu, String title) -> bool"""
54f9ee45 8651 return _core_.MenuBar_Append(*args, **kwargs)
e811c8ce
RD
8652
8653 def Insert(*args, **kwargs):
a95a7133 8654 """Insert(self, size_t pos, Menu menu, String title) -> bool"""
54f9ee45 8655 return _core_.MenuBar_Insert(*args, **kwargs)
e811c8ce
RD
8656
8657 def GetMenuCount(*args, **kwargs):
a95a7133 8658 """GetMenuCount(self) -> size_t"""
54f9ee45 8659 return _core_.MenuBar_GetMenuCount(*args, **kwargs)
e811c8ce
RD
8660
8661 def GetMenu(*args, **kwargs):
a95a7133 8662 """GetMenu(self, size_t pos) -> Menu"""
54f9ee45 8663 return _core_.MenuBar_GetMenu(*args, **kwargs)
e811c8ce
RD
8664
8665 def Replace(*args, **kwargs):
a95a7133 8666 """Replace(self, size_t pos, Menu menu, String title) -> Menu"""
54f9ee45 8667 return _core_.MenuBar_Replace(*args, **kwargs)
e811c8ce
RD
8668
8669 def Remove(*args, **kwargs):
a95a7133 8670 """Remove(self, size_t pos) -> Menu"""
54f9ee45 8671 return _core_.MenuBar_Remove(*args, **kwargs)
e811c8ce
RD
8672
8673 def EnableTop(*args, **kwargs):
a95a7133 8674 """EnableTop(self, size_t pos, bool enable)"""
54f9ee45 8675 return _core_.MenuBar_EnableTop(*args, **kwargs)
e811c8ce
RD
8676
8677 def IsEnabledTop(*args, **kwargs):
a95a7133 8678 """IsEnabledTop(self, size_t pos) -> bool"""
54f9ee45 8679 return _core_.MenuBar_IsEnabledTop(*args, **kwargs)
e811c8ce
RD
8680
8681 def SetLabelTop(*args, **kwargs):
a95a7133 8682 """SetLabelTop(self, size_t pos, String label)"""
54f9ee45 8683 return _core_.MenuBar_SetLabelTop(*args, **kwargs)
e811c8ce
RD
8684
8685 def GetLabelTop(*args, **kwargs):
a95a7133 8686 """GetLabelTop(self, size_t pos) -> String"""
54f9ee45 8687 return _core_.MenuBar_GetLabelTop(*args, **kwargs)
e811c8ce
RD
8688
8689 def FindMenuItem(*args, **kwargs):
a95a7133 8690 """FindMenuItem(self, String menu, String item) -> int"""
54f9ee45 8691 return _core_.MenuBar_FindMenuItem(*args, **kwargs)
e811c8ce
RD
8692
8693 def FindItemById(*args, **kwargs):
a95a7133 8694 """FindItemById(self, int id) -> MenuItem"""
54f9ee45 8695 return _core_.MenuBar_FindItemById(*args, **kwargs)
e811c8ce
RD
8696
8697 def FindMenu(*args, **kwargs):
a95a7133 8698 """FindMenu(self, String title) -> int"""
54f9ee45 8699 return _core_.MenuBar_FindMenu(*args, **kwargs)
e811c8ce
RD
8700
8701 def Enable(*args, **kwargs):
a95a7133 8702 """Enable(self, int id, bool enable)"""
54f9ee45 8703 return _core_.MenuBar_Enable(*args, **kwargs)
e811c8ce
RD
8704
8705 def Check(*args, **kwargs):
a95a7133 8706 """Check(self, int id, bool check)"""
54f9ee45 8707 return _core_.MenuBar_Check(*args, **kwargs)
e811c8ce
RD
8708
8709 def IsChecked(*args, **kwargs):
a95a7133 8710 """IsChecked(self, int id) -> bool"""
54f9ee45 8711 return _core_.MenuBar_IsChecked(*args, **kwargs)
e811c8ce
RD
8712
8713 def IsEnabled(*args, **kwargs):
a95a7133 8714 """IsEnabled(self, int id) -> bool"""
54f9ee45 8715 return _core_.MenuBar_IsEnabled(*args, **kwargs)
e811c8ce
RD
8716
8717 def SetLabel(*args, **kwargs):
a95a7133 8718 """SetLabel(self, int id, String label)"""
54f9ee45 8719 return _core_.MenuBar_SetLabel(*args, **kwargs)
e811c8ce
RD
8720
8721 def GetLabel(*args, **kwargs):
a95a7133 8722 """GetLabel(self, int id) -> String"""
54f9ee45 8723 return _core_.MenuBar_GetLabel(*args, **kwargs)
e811c8ce
RD
8724
8725 def SetHelpString(*args, **kwargs):
a95a7133 8726 """SetHelpString(self, int id, String helpString)"""
54f9ee45 8727 return _core_.MenuBar_SetHelpString(*args, **kwargs)
e811c8ce
RD
8728
8729 def GetHelpString(*args, **kwargs):
a95a7133 8730 """GetHelpString(self, int id) -> String"""
54f9ee45 8731 return _core_.MenuBar_GetHelpString(*args, **kwargs)
e811c8ce
RD
8732
8733 def GetFrame(*args, **kwargs):
a95a7133 8734 """GetFrame(self) -> wxFrame"""
54f9ee45 8735 return _core_.MenuBar_GetFrame(*args, **kwargs)
e811c8ce
RD
8736
8737 def IsAttached(*args, **kwargs):
a95a7133 8738 """IsAttached(self) -> bool"""
54f9ee45 8739 return _core_.MenuBar_IsAttached(*args, **kwargs)
e811c8ce
RD
8740
8741 def Attach(*args, **kwargs):
a95a7133 8742 """Attach(self, wxFrame frame)"""
54f9ee45 8743 return _core_.MenuBar_Attach(*args, **kwargs)
e811c8ce
RD
8744
8745 def Detach(*args, **kwargs):
a95a7133 8746 """Detach(self)"""
54f9ee45 8747 return _core_.MenuBar_Detach(*args, **kwargs)
e811c8ce 8748
d14a1e28
RD
8749
8750class MenuBarPtr(MenuBar):
8751 def __init__(self, this):
8752 self.this = this
8753 if not hasattr(self,"thisown"): self.thisown = 0
8754 self.__class__ = MenuBar
54f9ee45 8755_core_.MenuBar_swigregister(MenuBarPtr)
d14a1e28
RD
8756
8757#---------------------------------------------------------------------------
8758
8759class MenuItem(Object):
093d3ff1 8760 """Proxy of C++ MenuItem class"""
e811c8ce
RD
8761 def __repr__(self):
8762 return "<%s.%s; proxy of C++ wxMenuItem instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 8763 def __init__(self, *args, **kwargs):
0df68c9f 8764 """
a95a7133 8765 __init__(self, Menu parentMenu=None, int id=ID_ANY, String text=EmptyString,
196addbf
RD
8766 String help=EmptyString, int kind=ITEM_NORMAL,
8767 Menu subMenu=None) -> MenuItem
0df68c9f 8768 """
54f9ee45 8769 newobj = _core_.new_MenuItem(*args, **kwargs)
d14a1e28
RD
8770 self.this = newobj.this
8771 self.thisown = 1
8772 del newobj.thisown
e811c8ce 8773 def GetMenu(*args, **kwargs):
a95a7133 8774 """GetMenu(self) -> Menu"""
54f9ee45 8775 return _core_.MenuItem_GetMenu(*args, **kwargs)
e811c8ce
RD
8776
8777 def SetMenu(*args, **kwargs):
a95a7133 8778 """SetMenu(self, Menu menu)"""
54f9ee45 8779 return _core_.MenuItem_SetMenu(*args, **kwargs)
e811c8ce
RD
8780
8781 def SetId(*args, **kwargs):
a95a7133 8782 """SetId(self, int id)"""
54f9ee45 8783 return _core_.MenuItem_SetId(*args, **kwargs)
e811c8ce
RD
8784
8785 def GetId(*args, **kwargs):
a95a7133 8786 """GetId(self) -> int"""
54f9ee45 8787 return _core_.MenuItem_GetId(*args, **kwargs)
e811c8ce
RD
8788
8789 def IsSeparator(*args, **kwargs):
a95a7133 8790 """IsSeparator(self) -> bool"""
54f9ee45 8791 return _core_.MenuItem_IsSeparator(*args, **kwargs)
e811c8ce
RD
8792
8793 def SetText(*args, **kwargs):
a95a7133 8794 """SetText(self, String str)"""
54f9ee45 8795 return _core_.MenuItem_SetText(*args, **kwargs)
e811c8ce
RD
8796
8797 def GetLabel(*args, **kwargs):
a95a7133 8798 """GetLabel(self) -> String"""
54f9ee45 8799 return _core_.MenuItem_GetLabel(*args, **kwargs)
e811c8ce
RD
8800
8801 def GetText(*args, **kwargs):
a95a7133 8802 """GetText(self) -> String"""
54f9ee45 8803 return _core_.MenuItem_GetText(*args, **kwargs)
e811c8ce
RD
8804
8805 def GetLabelFromText(*args, **kwargs):
66c033b4 8806 """GetLabelFromText(String text) -> String"""
54f9ee45 8807 return _core_.MenuItem_GetLabelFromText(*args, **kwargs)
e811c8ce
RD
8808
8809 GetLabelFromText = staticmethod(GetLabelFromText)
8810 def GetKind(*args, **kwargs):
a95a7133 8811 """GetKind(self) -> int"""
54f9ee45 8812 return _core_.MenuItem_GetKind(*args, **kwargs)
e811c8ce 8813
a95a7133
RD
8814 def SetKind(*args, **kwargs):
8815 """SetKind(self, int kind)"""
54f9ee45 8816 return _core_.MenuItem_SetKind(*args, **kwargs)
a95a7133 8817
e811c8ce 8818 def SetCheckable(*args, **kwargs):
a95a7133 8819 """SetCheckable(self, bool checkable)"""
54f9ee45 8820 return _core_.MenuItem_SetCheckable(*args, **kwargs)
e811c8ce
RD
8821
8822 def IsCheckable(*args, **kwargs):
a95a7133 8823 """IsCheckable(self) -> bool"""
54f9ee45 8824 return _core_.MenuItem_IsCheckable(*args, **kwargs)
e811c8ce
RD
8825
8826 def IsSubMenu(*args, **kwargs):
a95a7133 8827 """IsSubMenu(self) -> bool"""
54f9ee45 8828 return _core_.MenuItem_IsSubMenu(*args, **kwargs)
e811c8ce
RD
8829
8830 def SetSubMenu(*args, **kwargs):
a95a7133 8831 """SetSubMenu(self, Menu menu)"""
54f9ee45 8832 return _core_.MenuItem_SetSubMenu(*args, **kwargs)
e811c8ce
RD
8833
8834 def GetSubMenu(*args, **kwargs):
a95a7133 8835 """GetSubMenu(self) -> Menu"""
54f9ee45 8836 return _core_.MenuItem_GetSubMenu(*args, **kwargs)
e811c8ce
RD
8837
8838 def Enable(*args, **kwargs):
a95a7133 8839 """Enable(self, bool enable=True)"""
54f9ee45 8840 return _core_.MenuItem_Enable(*args, **kwargs)
e811c8ce
RD
8841
8842 def IsEnabled(*args, **kwargs):
a95a7133 8843 """IsEnabled(self) -> bool"""
54f9ee45 8844 return _core_.MenuItem_IsEnabled(*args, **kwargs)
e811c8ce
RD
8845
8846 def Check(*args, **kwargs):
a95a7133 8847 """Check(self, bool check=True)"""
54f9ee45 8848 return _core_.MenuItem_Check(*args, **kwargs)
e811c8ce
RD
8849
8850 def IsChecked(*args, **kwargs):
a95a7133 8851 """IsChecked(self) -> bool"""
54f9ee45 8852 return _core_.MenuItem_IsChecked(*args, **kwargs)
e811c8ce
RD
8853
8854 def Toggle(*args, **kwargs):
a95a7133 8855 """Toggle(self)"""
54f9ee45 8856 return _core_.MenuItem_Toggle(*args, **kwargs)
e811c8ce
RD
8857
8858 def SetHelp(*args, **kwargs):
a95a7133 8859 """SetHelp(self, String str)"""
54f9ee45 8860 return _core_.MenuItem_SetHelp(*args, **kwargs)
e811c8ce
RD
8861
8862 def GetHelp(*args, **kwargs):
a95a7133 8863 """GetHelp(self) -> String"""
54f9ee45 8864 return _core_.MenuItem_GetHelp(*args, **kwargs)
e811c8ce
RD
8865
8866 def GetAccel(*args, **kwargs):
a95a7133 8867 """GetAccel(self) -> AcceleratorEntry"""
54f9ee45 8868 return _core_.MenuItem_GetAccel(*args, **kwargs)
e811c8ce
RD
8869
8870 def SetAccel(*args, **kwargs):
a95a7133 8871 """SetAccel(self, AcceleratorEntry accel)"""
54f9ee45 8872 return _core_.MenuItem_SetAccel(*args, **kwargs)
e811c8ce 8873
c1280d1e
RD
8874 def SetFont(*args, **kwargs):
8875 """SetFont(self, Font font)"""
8876 return _core_.MenuItem_SetFont(*args, **kwargs)
8877
8878 def GetFont(*args, **kwargs):
8879 """GetFont(self) -> Font"""
8880 return _core_.MenuItem_GetFont(*args, **kwargs)
8881
8882 def SetTextColour(*args, **kwargs):
8883 """SetTextColour(self, Colour colText)"""
8884 return _core_.MenuItem_SetTextColour(*args, **kwargs)
8885
8886 def GetTextColour(*args, **kwargs):
8887 """GetTextColour(self) -> Colour"""
8888 return _core_.MenuItem_GetTextColour(*args, **kwargs)
8889
8890 def SetBackgroundColour(*args, **kwargs):
8891 """SetBackgroundColour(self, Colour colBack)"""
8892 return _core_.MenuItem_SetBackgroundColour(*args, **kwargs)
8893
8894 def GetBackgroundColour(*args, **kwargs):
8895 """GetBackgroundColour(self) -> Colour"""
8896 return _core_.MenuItem_GetBackgroundColour(*args, **kwargs)
8897
8898 def SetBitmaps(*args, **kwargs):
8899 """SetBitmaps(self, Bitmap bmpChecked, Bitmap bmpUnchecked=wxNullBitmap)"""
8900 return _core_.MenuItem_SetBitmaps(*args, **kwargs)
8901
8902 def SetDisabledBitmap(*args, **kwargs):
8903 """SetDisabledBitmap(self, Bitmap bmpDisabled)"""
8904 return _core_.MenuItem_SetDisabledBitmap(*args, **kwargs)
8905
8906 def GetDisabledBitmap(*args, **kwargs):
8907 """GetDisabledBitmap(self) -> Bitmap"""
8908 return _core_.MenuItem_GetDisabledBitmap(*args, **kwargs)
8909
8910 def SetMarginWidth(*args, **kwargs):
8911 """SetMarginWidth(self, int nWidth)"""
8912 return _core_.MenuItem_SetMarginWidth(*args, **kwargs)
8913
8914 def GetMarginWidth(*args, **kwargs):
8915 """GetMarginWidth(self) -> int"""
8916 return _core_.MenuItem_GetMarginWidth(*args, **kwargs)
8917
e811c8ce 8918 def GetDefaultMarginWidth(*args, **kwargs):
66c033b4 8919 """GetDefaultMarginWidth() -> int"""
54f9ee45 8920 return _core_.MenuItem_GetDefaultMarginWidth(*args, **kwargs)
e811c8ce
RD
8921
8922 GetDefaultMarginWidth = staticmethod(GetDefaultMarginWidth)
c1280d1e
RD
8923 def IsOwnerDrawn(*args, **kwargs):
8924 """IsOwnerDrawn(self) -> bool"""
8925 return _core_.MenuItem_IsOwnerDrawn(*args, **kwargs)
8926
8927 def SetOwnerDrawn(*args, **kwargs):
8928 """SetOwnerDrawn(self, bool ownerDrawn=True)"""
8929 return _core_.MenuItem_SetOwnerDrawn(*args, **kwargs)
8930
8931 def ResetOwnerDrawn(*args, **kwargs):
8932 """ResetOwnerDrawn(self)"""
8933 return _core_.MenuItem_ResetOwnerDrawn(*args, **kwargs)
8934
e811c8ce 8935 def SetBitmap(*args, **kwargs):
a95a7133 8936 """SetBitmap(self, Bitmap bitmap)"""
54f9ee45 8937 return _core_.MenuItem_SetBitmap(*args, **kwargs)
e811c8ce
RD
8938
8939 def GetBitmap(*args, **kwargs):
a95a7133 8940 """GetBitmap(self) -> Bitmap"""
54f9ee45 8941 return _core_.MenuItem_GetBitmap(*args, **kwargs)
e811c8ce 8942
d14a1e28
RD
8943
8944class MenuItemPtr(MenuItem):
8945 def __init__(self, this):
8946 self.this = this
8947 if not hasattr(self,"thisown"): self.thisown = 0
8948 self.__class__ = MenuItem
54f9ee45 8949_core_.MenuItem_swigregister(MenuItemPtr)
d14a1e28 8950
e811c8ce 8951def MenuItem_GetLabelFromText(*args, **kwargs):
196addbf 8952 """MenuItem_GetLabelFromText(String text) -> String"""
54f9ee45 8953 return _core_.MenuItem_GetLabelFromText(*args, **kwargs)
d14a1e28 8954
e811c8ce
RD
8955def MenuItem_GetDefaultMarginWidth(*args, **kwargs):
8956 """MenuItem_GetDefaultMarginWidth() -> int"""
54f9ee45 8957 return _core_.MenuItem_GetDefaultMarginWidth(*args, **kwargs)
d14a1e28
RD
8958
8959#---------------------------------------------------------------------------
8960
8961class Control(Window):
15afbcd0
RD
8962 """
8963 This is the base class for a control or 'widget'.
8964
41e2b43e
RD
8965 A control is generally a small window which processes user input
8966 and/or displays one or more item of data.
15afbcd0 8967 """
e811c8ce
RD
8968 def __repr__(self):
8969 return "<%s.%s; proxy of C++ wxControl instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 8970 def __init__(self, *args, **kwargs):
0df68c9f 8971 """
248ed943
RD
8972 __init__(self, Window parent, int id=-1, Point pos=DefaultPosition,
8973 Size size=DefaultSize, long style=0, Validator validator=DefaultValidator,
b2dc1044 8974 String name=ControlNameStr) -> Control
15afbcd0 8975
41e2b43e
RD
8976 Create a Control. Normally you should only call this from a subclass'
8977 __init__ as a plain old wx.Control is not very useful.
0df68c9f 8978 """
54f9ee45 8979 newobj = _core_.new_Control(*args, **kwargs)
d14a1e28
RD
8980 self.this = newobj.this
8981 self.thisown = 1
8982 del newobj.thisown
8983 self._setOORInfo(self)
e811c8ce
RD
8984
8985 def Create(*args, **kwargs):
0df68c9f 8986 """
248ed943
RD
8987 Create(self, Window parent, int id=-1, Point pos=DefaultPosition,
8988 Size size=DefaultSize, long style=0, Validator validator=DefaultValidator,
b2dc1044 8989 String name=ControlNameStr) -> bool
15afbcd0
RD
8990
8991 Do the 2nd phase and create the GUI control.
0df68c9f 8992 """
54f9ee45 8993 return _core_.Control_Create(*args, **kwargs)
e811c8ce
RD
8994
8995 def Command(*args, **kwargs):
15afbcd0 8996 """
a95a7133 8997 Command(self, CommandEvent event)
15afbcd0 8998
41e2b43e
RD
8999 Simulates the effect of the user issuing a command to the item.
9000
9001 :see: `wx.CommandEvent`
9002
15afbcd0 9003 """
54f9ee45 9004 return _core_.Control_Command(*args, **kwargs)
e811c8ce
RD
9005
9006 def GetLabel(*args, **kwargs):
15afbcd0 9007 """
a95a7133 9008 GetLabel(self) -> String
15afbcd0
RD
9009
9010 Return a control's text.
9011 """
54f9ee45 9012 return _core_.Control_GetLabel(*args, **kwargs)
e811c8ce
RD
9013
9014 def SetLabel(*args, **kwargs):
15afbcd0 9015 """
a95a7133 9016 SetLabel(self, String label)
15afbcd0
RD
9017
9018 Sets the item's text.
9019 """
54f9ee45 9020 return _core_.Control_SetLabel(*args, **kwargs)
e811c8ce 9021
74a57fcd 9022 def GetClassDefaultAttributes(*args, **kwargs):
110da5b0
RD
9023 """
9024 GetClassDefaultAttributes(int variant=WINDOW_VARIANT_NORMAL) -> VisualAttributes
9025
9026 Get the default attributes for this class. This is useful if you want
9027 to use the same font or colour in your own control as in a standard
9028 control -- which is a much better idea than hard coding specific
9029 colours or fonts which might look completely out of place on the
9030 user's system, especially if it uses themes.
9031
9032 The variant parameter is only relevant under Mac currently and is
9033 ignore under other platforms. Under Mac, it will change the size of
9034 the returned font. See `wx.Window.SetWindowVariant` for more about
9035 this.
9036 """
54f9ee45 9037 return _core_.Control_GetClassDefaultAttributes(*args, **kwargs)
74a57fcd
RD
9038
9039 GetClassDefaultAttributes = staticmethod(GetClassDefaultAttributes)
d14a1e28
RD
9040
9041class ControlPtr(Control):
9042 def __init__(self, this):
9043 self.this = this
9044 if not hasattr(self,"thisown"): self.thisown = 0
9045 self.__class__ = Control
54f9ee45 9046_core_.Control_swigregister(ControlPtr)
b2dc1044 9047ControlNameStr = cvar.ControlNameStr
d14a1e28
RD
9048
9049def PreControl(*args, **kwargs):
15afbcd0
RD
9050 """
9051 PreControl() -> Control
9052
9053 Precreate a Control control for 2-phase creation
9054 """
54f9ee45 9055 val = _core_.new_PreControl(*args, **kwargs)
d14a1e28
RD
9056 val.thisown = 1
9057 return val
9058
74a57fcd 9059def Control_GetClassDefaultAttributes(*args, **kwargs):
110da5b0
RD
9060 """
9061 Control_GetClassDefaultAttributes(int variant=WINDOW_VARIANT_NORMAL) -> VisualAttributes
9062
9063 Get the default attributes for this class. This is useful if you want
9064 to use the same font or colour in your own control as in a standard
9065 control -- which is a much better idea than hard coding specific
9066 colours or fonts which might look completely out of place on the
9067 user's system, especially if it uses themes.
9068
9069 The variant parameter is only relevant under Mac currently and is
9070 ignore under other platforms. Under Mac, it will change the size of
9071 the returned font. See `wx.Window.SetWindowVariant` for more about
9072 this.
9073 """
54f9ee45 9074 return _core_.Control_GetClassDefaultAttributes(*args, **kwargs)
74a57fcd 9075
d14a1e28
RD
9076#---------------------------------------------------------------------------
9077
9078class ItemContainer(object):
15afbcd0 9079 """
53aa7709
RD
9080 The wx.ItemContainer class defines an interface which is implemented
9081 by all controls which have string subitems, each of which may be
9082 selected, such as `wx.ListBox`, `wx.CheckListBox`, `wx.Choice` as well
9083 as `wx.ComboBox` which implements an extended interface deriving from
41e2b43e 9084 this one.
15afbcd0 9085
41e2b43e
RD
9086 It defines the methods for accessing the control's items and although
9087 each of the derived classes implements them differently, they still
9088 all conform to the same interface.
15afbcd0 9089
41e2b43e
RD
9090 The items in a wx.ItemContainer have (non empty) string labels and,
9091 optionally, client data associated with them.
15afbcd0
RD
9092
9093 """
d14a1e28
RD
9094 def __init__(self): raise RuntimeError, "No constructor defined"
9095 def __repr__(self):
9096 return "<%s.%s; proxy of C++ wxItemContainer instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
e811c8ce 9097 def Append(*args, **kwargs):
15afbcd0 9098 """
a95a7133 9099 Append(self, String item, PyObject clientData=None) -> int
15afbcd0 9100
41e2b43e
RD
9101 Adds the item to the control, associating the given data with the item
9102 if not None. The return value is the index of the newly added item
9103 which may be different from the last one if the control is sorted (e.g.
9104 has wx.LB_SORT or wx.CB_SORT style).
15afbcd0 9105 """
54f9ee45 9106 return _core_.ItemContainer_Append(*args, **kwargs)
e811c8ce
RD
9107
9108 def AppendItems(*args, **kwargs):
15afbcd0 9109 """
f5b96ee1 9110 AppendItems(self, List strings)
15afbcd0 9111
41e2b43e
RD
9112 Apend several items at once to the control. Notice that calling this
9113 method may be much faster than appending the items one by one if you
9114 need to add a lot of items.
15afbcd0 9115 """
54f9ee45 9116 return _core_.ItemContainer_AppendItems(*args, **kwargs)
e811c8ce
RD
9117
9118 def Insert(*args, **kwargs):
15afbcd0 9119 """
a95a7133 9120 Insert(self, String item, int pos, PyObject clientData=None) -> int
15afbcd0 9121
41e2b43e 9122 Insert an item into the control before the item at the ``pos`` index,
15afbcd0
RD
9123 optionally associating some data object with the item.
9124 """
54f9ee45 9125 return _core_.ItemContainer_Insert(*args, **kwargs)
e811c8ce
RD
9126
9127 def Clear(*args, **kwargs):
15afbcd0 9128 """
a95a7133 9129 Clear(self)
15afbcd0
RD
9130
9131 Removes all items from the control.
9132 """
54f9ee45 9133 return _core_.ItemContainer_Clear(*args, **kwargs)
e811c8ce
RD
9134
9135 def Delete(*args, **kwargs):
15afbcd0 9136 """
a95a7133 9137 Delete(self, int n)
15afbcd0 9138
41e2b43e
RD
9139 Deletes the item at the zero-based index 'n' from the control. Note
9140 that it is an error (signalled by a `wx.PyAssertionError` exception if
9141 enabled) to remove an item with the index negative or greater or equal
9142 than the number of items in the control.
15afbcd0 9143 """
54f9ee45 9144 return _core_.ItemContainer_Delete(*args, **kwargs)
e811c8ce 9145
53aa7709
RD
9146 def GetClientData(*args, **kwargs):
9147 """
9148 GetClientData(self, int n) -> PyObject
9149
9150 Returns the client data associated with the given item, (if any.)
9151 """
9152 return _core_.ItemContainer_GetClientData(*args, **kwargs)
9153
9154 def SetClientData(*args, **kwargs):
9155 """
9156 SetClientData(self, int n, PyObject clientData)
9157
9158 Associate the given client data with the item at position n.
9159 """
9160 return _core_.ItemContainer_SetClientData(*args, **kwargs)
9161
e811c8ce 9162 def GetCount(*args, **kwargs):
15afbcd0 9163 """
a95a7133 9164 GetCount(self) -> int
15afbcd0
RD
9165
9166 Returns the number of items in the control.
9167 """
54f9ee45 9168 return _core_.ItemContainer_GetCount(*args, **kwargs)
e811c8ce
RD
9169
9170 def IsEmpty(*args, **kwargs):
15afbcd0 9171 """
a95a7133 9172 IsEmpty(self) -> bool
15afbcd0
RD
9173
9174 Returns True if the control is empty or False if it has some items.
9175 """
54f9ee45 9176 return _core_.ItemContainer_IsEmpty(*args, **kwargs)
e811c8ce
RD
9177
9178 def GetString(*args, **kwargs):
15afbcd0 9179 """
a95a7133 9180 GetString(self, int n) -> String
15afbcd0
RD
9181
9182 Returns the label of the item with the given index.
9183 """
54f9ee45 9184 return _core_.ItemContainer_GetString(*args, **kwargs)
e811c8ce
RD
9185
9186 def GetStrings(*args, **kwargs):
a95a7133 9187 """GetStrings(self) -> wxArrayString"""
54f9ee45 9188 return _core_.ItemContainer_GetStrings(*args, **kwargs)
e811c8ce
RD
9189
9190 def SetString(*args, **kwargs):
15afbcd0 9191 """
a95a7133 9192 SetString(self, int n, String s)
15afbcd0
RD
9193
9194 Sets the label for the given item.
9195 """
54f9ee45 9196 return _core_.ItemContainer_SetString(*args, **kwargs)
e811c8ce
RD
9197
9198 def FindString(*args, **kwargs):
15afbcd0 9199 """
a95a7133 9200 FindString(self, String s) -> int
15afbcd0
RD
9201
9202 Finds an item whose label matches the given string. Returns the
41e2b43e
RD
9203 zero-based position of the item, or ``wx.NOT_FOUND`` if the string was not
9204 found.
15afbcd0 9205 """
54f9ee45 9206 return _core_.ItemContainer_FindString(*args, **kwargs)
e811c8ce 9207
53aa7709 9208 def SetSelection(*args, **kwargs):
15afbcd0 9209 """
53aa7709 9210 SetSelection(self, int n)
15afbcd0
RD
9211
9212 Sets the item at index 'n' to be the selected item.
9213 """
53aa7709 9214 return _core_.ItemContainer_SetSelection(*args, **kwargs)
e811c8ce
RD
9215
9216 def GetSelection(*args, **kwargs):
15afbcd0 9217 """
a95a7133 9218 GetSelection(self) -> int
15afbcd0 9219
41e2b43e
RD
9220 Returns the index of the selected item or ``wx.NOT_FOUND`` if no item
9221 is selected.
15afbcd0 9222 """
54f9ee45 9223 return _core_.ItemContainer_GetSelection(*args, **kwargs)
e811c8ce 9224
53aa7709
RD
9225 def SetStringSelection(*args, **kwargs):
9226 """SetStringSelection(self, String s) -> bool"""
9227 return _core_.ItemContainer_SetStringSelection(*args, **kwargs)
9228
e811c8ce 9229 def GetStringSelection(*args, **kwargs):
15afbcd0 9230 """
a95a7133 9231 GetStringSelection(self) -> String
15afbcd0 9232
41e2b43e
RD
9233 Returns the label of the selected item or an empty string if no item
9234 is selected.
15afbcd0 9235 """
54f9ee45 9236 return _core_.ItemContainer_GetStringSelection(*args, **kwargs)
e811c8ce 9237
53aa7709 9238 def Select(*args, **kwargs):
15afbcd0 9239 """
53aa7709 9240 Select(self, int n)
15afbcd0 9241
53aa7709
RD
9242 This is the same as `SetSelection` and exists only because it is
9243 slightly more natural for controls which support multiple selection.
15afbcd0 9244 """
53aa7709 9245 return _core_.ItemContainer_Select(*args, **kwargs)
e811c8ce 9246
d14a1e28
RD
9247
9248class ItemContainerPtr(ItemContainer):
9249 def __init__(self, this):
9250 self.this = this
9251 if not hasattr(self,"thisown"): self.thisown = 0
9252 self.__class__ = ItemContainer
54f9ee45 9253_core_.ItemContainer_swigregister(ItemContainerPtr)
d14a1e28
RD
9254
9255#---------------------------------------------------------------------------
9256
9257class ControlWithItems(Control,ItemContainer):
15afbcd0 9258 """
41e2b43e
RD
9259 wx.ControlWithItems combines the ``wx.ItemContainer`` class with the
9260 wx.Control class, and is used for the base class of various controls
9261 that have items.
15afbcd0 9262 """
d14a1e28
RD
9263 def __init__(self): raise RuntimeError, "No constructor defined"
9264 def __repr__(self):
9265 return "<%s.%s; proxy of C++ wxControlWithItems instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
9266
9267class ControlWithItemsPtr(ControlWithItems):
9268 def __init__(self, this):
9269 self.this = this
9270 if not hasattr(self,"thisown"): self.thisown = 0
9271 self.__class__ = ControlWithItems
54f9ee45 9272_core_.ControlWithItems_swigregister(ControlWithItemsPtr)
d14a1e28
RD
9273
9274#---------------------------------------------------------------------------
9275
9276class SizerItem(Object):
248ed943
RD
9277 """
9278 The wx.SizerItem class is used to track the position, size and other
9279 attributes of each item managed by a `wx.Sizer`. In normal usage user
9280 code should never need to deal directly with a wx.SizerItem, but
9281 custom classes derived from `wx.PySizer` will probably need to use the
9282 collection of wx.SizerItems held by wx.Sizer when calculating layout.
9283
9284 :see: `wx.Sizer`, `wx.GBSizerItem`
9285 """
e811c8ce
RD
9286 def __repr__(self):
9287 return "<%s.%s; proxy of C++ wxSizerItem instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 9288 def __init__(self, *args, **kwargs):
248ed943
RD
9289 """
9290 __init__(self) -> SizerItem
9291
9292 Constructs an empty wx.SizerItem. Either a window, sizer or spacer
9293 size will need to be set before this item can be used in a Sizer.
9294
9295 You will probably never need to create a wx.SizerItem directly as they
9296 are created automatically when the sizer's Add, Insert or Prepend
9297 methods are called.
9298
9299 :see: `wx.SizerItemSpacer`, `wx.SizerItemWindow`, `wx.SizerItemSizer`
9300 """
54f9ee45 9301 newobj = _core_.new_SizerItem(*args, **kwargs)
d14a1e28
RD
9302 self.this = newobj.this
9303 self.thisown = 1
9304 del newobj.thisown
e811c8ce 9305 def DeleteWindows(*args, **kwargs):
248ed943
RD
9306 """
9307 DeleteWindows(self)
9308
9309 Destroy the window or the windows in a subsizer, depending on the type
9310 of item.
9311 """
54f9ee45 9312 return _core_.SizerItem_DeleteWindows(*args, **kwargs)
e811c8ce
RD
9313
9314 def DetachSizer(*args, **kwargs):
248ed943
RD
9315 """
9316 DetachSizer(self)
9317
9318 Enable deleting the SizerItem without destroying the contained sizer.
9319 """
54f9ee45 9320 return _core_.SizerItem_DetachSizer(*args, **kwargs)
e811c8ce
RD
9321
9322 def GetSize(*args, **kwargs):
248ed943
RD
9323 """
9324 GetSize(self) -> Size
9325
9326 Get the current size of the item, as set in the last Layout.
9327 """
54f9ee45 9328 return _core_.SizerItem_GetSize(*args, **kwargs)
e811c8ce
RD
9329
9330 def CalcMin(*args, **kwargs):
248ed943
RD
9331 """
9332 CalcMin(self) -> Size
9333
9334 Calculates the minimum desired size for the item, including any space
9335 needed by borders.
9336 """
54f9ee45 9337 return _core_.SizerItem_CalcMin(*args, **kwargs)
e811c8ce
RD
9338
9339 def SetDimension(*args, **kwargs):
248ed943
RD
9340 """
9341 SetDimension(self, Point pos, Size size)
9342
9343 Set the position and size of the space allocated for this item by the
9344 sizer, and adjust the position and size of the item (window or
9345 subsizer) to be within that space taking alignment and borders into
9346 account.
9347 """
54f9ee45 9348 return _core_.SizerItem_SetDimension(*args, **kwargs)
e811c8ce
RD
9349
9350 def GetMinSize(*args, **kwargs):
248ed943
RD
9351 """
9352 GetMinSize(self) -> Size
9353
9354 Get the minimum size needed for the item.
9355 """
54f9ee45 9356 return _core_.SizerItem_GetMinSize(*args, **kwargs)
e811c8ce 9357
dfbb5885
RD
9358 def GetMinSizeWithBorder(*args, **kwargs):
9359 """
9360 GetMinSizeWithBorder(self) -> Size
9361
9362 Get the minimum size needed for the item with space for the borders
9363 added, if needed.
9364 """
9365 return _core_.SizerItem_GetMinSizeWithBorder(*args, **kwargs)
9366
e811c8ce 9367 def SetInitSize(*args, **kwargs):
a95a7133 9368 """SetInitSize(self, int x, int y)"""
54f9ee45 9369 return _core_.SizerItem_SetInitSize(*args, **kwargs)
e811c8ce
RD
9370
9371 def SetRatioWH(*args, **kwargs):
248ed943
RD
9372 """
9373 SetRatioWH(self, int width, int height)
9374
9375 Set the ratio item attribute.
9376 """
54f9ee45 9377 return _core_.SizerItem_SetRatioWH(*args, **kwargs)
e811c8ce
RD
9378
9379 def SetRatioSize(*args, **kwargs):
248ed943
RD
9380 """
9381 SetRatioSize(self, Size size)
9382
9383 Set the ratio item attribute.
9384 """
54f9ee45 9385 return _core_.SizerItem_SetRatioSize(*args, **kwargs)
e811c8ce
RD
9386
9387 def SetRatio(*args, **kwargs):
248ed943
RD
9388 """
9389 SetRatio(self, float ratio)
9390
9391 Set the ratio item attribute.
9392 """
54f9ee45 9393 return _core_.SizerItem_SetRatio(*args, **kwargs)
e811c8ce
RD
9394
9395 def GetRatio(*args, **kwargs):
248ed943
RD
9396 """
9397 GetRatio(self) -> float
9398
9399 Set the ratio item attribute.
9400 """
54f9ee45 9401 return _core_.SizerItem_GetRatio(*args, **kwargs)
e811c8ce 9402
d3b6e4ff
RD
9403 def GetRect(*args, **kwargs):
9404 """
9405 GetRect(self) -> Rect
9406
9407 Returns the rectangle that the sizer item should occupy
9408 """
9409 return _core_.SizerItem_GetRect(*args, **kwargs)
9410
e811c8ce 9411 def IsWindow(*args, **kwargs):
248ed943
RD
9412 """
9413 IsWindow(self) -> bool
9414
9415 Is this sizer item a window?
9416 """
54f9ee45 9417 return _core_.SizerItem_IsWindow(*args, **kwargs)
e811c8ce
RD
9418
9419 def IsSizer(*args, **kwargs):
248ed943
RD
9420 """
9421 IsSizer(self) -> bool
9422
9423 Is this sizer item a subsizer?
9424 """
54f9ee45 9425 return _core_.SizerItem_IsSizer(*args, **kwargs)
e811c8ce
RD
9426
9427 def IsSpacer(*args, **kwargs):
248ed943
RD
9428 """
9429 IsSpacer(self) -> bool
9430
9431 Is this sizer item a spacer?
9432 """
54f9ee45 9433 return _core_.SizerItem_IsSpacer(*args, **kwargs)
e811c8ce
RD
9434
9435 def SetProportion(*args, **kwargs):
248ed943
RD
9436 """
9437 SetProportion(self, int proportion)
9438
9439 Set the proportion value for this item.
9440 """
54f9ee45 9441 return _core_.SizerItem_SetProportion(*args, **kwargs)
e811c8ce
RD
9442
9443 def GetProportion(*args, **kwargs):
248ed943
RD
9444 """
9445 GetProportion(self) -> int
9446
9447 Get the proportion value for this item.
9448 """
54f9ee45 9449 return _core_.SizerItem_GetProportion(*args, **kwargs)
e811c8ce 9450
248ed943
RD
9451 SetOption = wx._deprecated(SetProportion, "Please use `SetProportion` instead.")
9452 GetOption = wx._deprecated(GetProportion, "Please use `GetProportion` instead.")
e811c8ce 9453 def SetFlag(*args, **kwargs):
248ed943
RD
9454 """
9455 SetFlag(self, int flag)
9456
9457 Set the flag value for this item.
9458 """
54f9ee45 9459 return _core_.SizerItem_SetFlag(*args, **kwargs)
e811c8ce
RD
9460
9461 def GetFlag(*args, **kwargs):
248ed943
RD
9462 """
9463 GetFlag(self) -> int
9464
9465 Get the flag value for this item.
9466 """
54f9ee45 9467 return _core_.SizerItem_GetFlag(*args, **kwargs)
e811c8ce
RD
9468
9469 def SetBorder(*args, **kwargs):
248ed943
RD
9470 """
9471 SetBorder(self, int border)
9472
9473 Set the border value for this item.
9474 """
54f9ee45 9475 return _core_.SizerItem_SetBorder(*args, **kwargs)
e811c8ce
RD
9476
9477 def GetBorder(*args, **kwargs):
248ed943
RD
9478 """
9479 GetBorder(self) -> int
9480
9481 Get the border value for this item.
9482 """
54f9ee45 9483 return _core_.SizerItem_GetBorder(*args, **kwargs)
e811c8ce
RD
9484
9485 def GetWindow(*args, **kwargs):
248ed943
RD
9486 """
9487 GetWindow(self) -> Window
9488
9489 Get the window (if any) that is managed by this sizer item.
9490 """
54f9ee45 9491 return _core_.SizerItem_GetWindow(*args, **kwargs)
e811c8ce
RD
9492
9493 def SetWindow(*args, **kwargs):
248ed943
RD
9494 """
9495 SetWindow(self, Window window)
9496
9497 Set the window to be managed by this sizer item.
9498 """
54f9ee45 9499 return _core_.SizerItem_SetWindow(*args, **kwargs)
e811c8ce
RD
9500
9501 def GetSizer(*args, **kwargs):
248ed943
RD
9502 """
9503 GetSizer(self) -> Sizer
9504
9505 Get the subsizer (if any) that is managed by this sizer item.
9506 """
54f9ee45 9507 return _core_.SizerItem_GetSizer(*args, **kwargs)
e811c8ce
RD
9508
9509 def SetSizer(*args, **kwargs):
248ed943
RD
9510 """
9511 SetSizer(self, Sizer sizer)
9512
9513 Set the subsizer to be managed by this sizer item.
9514 """
54f9ee45 9515 return _core_.SizerItem_SetSizer(*args, **kwargs)
e811c8ce
RD
9516
9517 def GetSpacer(*args, **kwargs):
248ed943
RD
9518 """
9519 GetSpacer(self) -> Size
9520
9521 Get the size of the spacer managed by this sizer item.
9522 """
54f9ee45 9523 return _core_.SizerItem_GetSpacer(*args, **kwargs)
e811c8ce
RD
9524
9525 def SetSpacer(*args, **kwargs):
248ed943
RD
9526 """
9527 SetSpacer(self, Size size)
9528
9529 Set the size of the spacer to be managed by this sizer item.
9530 """
54f9ee45 9531 return _core_.SizerItem_SetSpacer(*args, **kwargs)
e811c8ce
RD
9532
9533 def Show(*args, **kwargs):
248ed943
RD
9534 """
9535 Show(self, bool show)
9536
9537 Set the show item attribute, which sizers use to determine if the item
9538 is to be made part of the layout or not. If the item is tracking a
9539 window then it is shown or hidden as needed.
9540 """
54f9ee45 9541 return _core_.SizerItem_Show(*args, **kwargs)
e811c8ce
RD
9542
9543 def IsShown(*args, **kwargs):
248ed943
RD
9544 """
9545 IsShown(self) -> bool
9546
9547 Is the item to be shown in the layout?
9548 """
54f9ee45 9549 return _core_.SizerItem_IsShown(*args, **kwargs)
e811c8ce
RD
9550
9551 def GetPosition(*args, **kwargs):
248ed943
RD
9552 """
9553 GetPosition(self) -> Point
9554
9555 Returns the current position of the item, as set in the last Layout.
9556 """
54f9ee45 9557 return _core_.SizerItem_GetPosition(*args, **kwargs)
e811c8ce
RD
9558
9559 def GetUserData(*args, **kwargs):
248ed943
RD
9560 """
9561 GetUserData(self) -> PyObject
9562
9563 Returns the userData associated with this sizer item, or None if there
9564 isn't any.
9565 """
54f9ee45 9566 return _core_.SizerItem_GetUserData(*args, **kwargs)
e811c8ce 9567
d14a1e28
RD
9568
9569class SizerItemPtr(SizerItem):
9570 def __init__(self, this):
9571 self.this = this
9572 if not hasattr(self,"thisown"): self.thisown = 0
9573 self.__class__ = SizerItem
54f9ee45 9574_core_.SizerItem_swigregister(SizerItemPtr)
d14a1e28 9575
248ed943 9576def SizerItemWindow(*args, **kwargs):
0df68c9f 9577 """
248ed943
RD
9578 SizerItemWindow(Window window, int proportion, int flag, int border,
9579 PyObject userData=None) -> SizerItem
9580
9581 Constructs a `wx.SizerItem` for tracking a window.
0df68c9f 9582 """
248ed943 9583 val = _core_.new_SizerItemWindow(*args, **kwargs)
d14a1e28
RD
9584 val.thisown = 1
9585 return val
9586
248ed943 9587def SizerItemSpacer(*args, **kwargs):
0df68c9f 9588 """
248ed943
RD
9589 SizerItemSpacer(int width, int height, int proportion, int flag, int border,
9590 PyObject userData=None) -> SizerItem
9591
9592 Constructs a `wx.SizerItem` for tracking a spacer.
0df68c9f 9593 """
248ed943 9594 val = _core_.new_SizerItemSpacer(*args, **kwargs)
d14a1e28
RD
9595 val.thisown = 1
9596 return val
9597
9598def SizerItemSizer(*args, **kwargs):
0df68c9f
RD
9599 """
9600 SizerItemSizer(Sizer sizer, int proportion, int flag, int border,
248ed943
RD
9601 PyObject userData=None) -> SizerItem
9602
9603 Constructs a `wx.SizerItem` for tracking a subsizer
0df68c9f 9604 """
54f9ee45 9605 val = _core_.new_SizerItemSizer(*args, **kwargs)
d14a1e28
RD
9606 val.thisown = 1
9607 return val
9608
9609class Sizer(Object):
248ed943
RD
9610 """
9611 wx.Sizer is the abstract base class used for laying out subwindows in
9612 a window. You cannot use wx.Sizer directly; instead, you will have to
9613 use one of the sizer classes derived from it such as `wx.BoxSizer`,
9614 `wx.StaticBoxSizer`, `wx.NotebookSizer`, `wx.GridSizer`, `wx.FlexGridSizer`
9615 and `wx.GridBagSizer`.
9616
9617 The concept implemented by sizers in wxWidgets is closely related to
9618 layout tools in other GUI toolkits, such as Java's AWT, the GTK
9619 toolkit or the Qt toolkit. It is based upon the idea of the individual
9620 subwindows reporting their minimal required size and their ability to
9621 get stretched if the size of the parent window has changed. This will
9622 most often mean that the programmer does not set the original size of
9623 a dialog in the beginning, rather the dialog will assigned a sizer and
9624 this sizer will be queried about the recommended size. The sizer in
9625 turn will query its children, which can be normal windows or contorls,
9626 empty space or other sizers, so that a hierarchy of sizers can be
9627 constructed. Note that wxSizer does not derive from wxWindow and thus
9628 do not interfere with tab ordering and requires very little resources
9629 compared to a real window on screen.
9630
9631 What makes sizers so well fitted for use in wxWidgets is the fact that
9632 every control reports its own minimal size and the algorithm can
9633 handle differences in font sizes or different window (dialog item)
9634 sizes on different platforms without problems. If for example the
9635 standard font as well as the overall design of Mac widgets requires
9636 more space than on Windows, then the initial size of a dialog using a
9637 sizer will automatically be bigger on Mac than on Windows.
9638 """
e811c8ce
RD
9639 def __init__(self): raise RuntimeError, "No constructor defined"
9640 def __repr__(self):
9641 return "<%s.%s; proxy of C++ wxSizer instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
9642 def _setOORInfo(*args, **kwargs):
a95a7133 9643 """_setOORInfo(self, PyObject _self)"""
54f9ee45 9644 return _core_.Sizer__setOORInfo(*args, **kwargs)
e811c8ce
RD
9645
9646 def Add(*args, **kwargs):
0df68c9f 9647 """
248ed943 9648 Add(self, item, int proportion=0, int flag=0, int border=0,
d3b6e4ff 9649 PyObject userData=None) -> wx.SizerItem
248ed943
RD
9650
9651 Appends a child item to the sizer.
0df68c9f 9652 """
54f9ee45 9653 return _core_.Sizer_Add(*args, **kwargs)
e811c8ce
RD
9654
9655 def Insert(*args, **kwargs):
0df68c9f 9656 """
248ed943 9657 Insert(self, int before, item, int proportion=0, int flag=0, int border=0,
d3b6e4ff 9658 PyObject userData=None) -> wx.SizerItem
248ed943
RD
9659
9660 Inserts a new item into the list of items managed by this sizer before
9661 the item at index *before*. See `Add` for a description of the parameters.
0df68c9f 9662 """
54f9ee45 9663 return _core_.Sizer_Insert(*args, **kwargs)
e811c8ce
RD
9664
9665 def Prepend(*args, **kwargs):
0df68c9f 9666 """
248ed943 9667 Prepend(self, item, int proportion=0, int flag=0, int border=0,
d3b6e4ff 9668 PyObject userData=None) -> wx.SizerItem
248ed943
RD
9669
9670 Adds a new item to the begining of the list of sizer items managed by
9671 this sizer. See `Add` for a description of the parameters.
0df68c9f 9672 """
54f9ee45 9673 return _core_.Sizer_Prepend(*args, **kwargs)
e811c8ce
RD
9674
9675 def Remove(*args, **kwargs):
248ed943
RD
9676 """
9677 Remove(self, item) -> bool
9678
9679 Removes an item from the sizer and destroys it. This method does not
9680 cause any layout or resizing to take place, call `Layout` to update
9681 the layout on screen after removing a child from the sizer. The
9682 *item* parameter can be either a window, a sizer, or the zero-based
9683 index of an item to remove. Returns True if the child item was found
9684 and removed.
9685 """
54f9ee45 9686 return _core_.Sizer_Remove(*args, **kwargs)
e811c8ce 9687
1c0f361b 9688 def Detach(*args, **kwargs):
248ed943
RD
9689 """
9690 Detach(self, item) -> bool
9691
9692 Detaches an item from the sizer without destroying it. This method
9693 does not cause any layout or resizing to take place, call `Layout` to
9694 do so. The *item* parameter can be either a window, a sizer, or the
9695 zero-based index of the item to be detached. Returns True if the child item
9696 was found and detached.
9697 """
1c0f361b
RD
9698 return _core_.Sizer_Detach(*args, **kwargs)
9699
d3b6e4ff
RD
9700 def GetItem(*args, **kwargs):
9701 """
9702 GetItem(self, item) -> wx.SizerItem
9703
9704 Returns the `wx.SizerItem` which holds the *item* given. The *item*
9705 parameter can be either a window, a sizer, or the zero-based index of
9706 the item to be detached.
9707 """
9708 return _core_.Sizer_GetItem(*args, **kwargs)
9709
e811c8ce 9710 def _SetItemMinSize(*args, **kwargs):
a95a7133 9711 """_SetItemMinSize(self, PyObject item, Size size)"""
54f9ee45 9712 return _core_.Sizer__SetItemMinSize(*args, **kwargs)
e811c8ce 9713
248ed943
RD
9714 def SetItemMinSize(self, item, *args):
9715 """
9716 SetItemMinSize(self, item, Size size)
9717
9718 Sets the minimum size that will be allocated for an item in the sizer.
9719 The *item* parameter can be either a window, a sizer, or the
9720 zero-based index of the item. If a window or sizer is given then it
9721 will be searched for recursivly in subsizers if neccessary.
9722 """
9723 if len(args) == 2:
9724 # for backward compatibility accept separate width,height args too
9725 return self._SetItemMinSize(item, args)
9726 else:
9727 return self._SetItemMinSize(item, args[0])
9728
e811c8ce 9729 def AddItem(*args, **kwargs):
248ed943
RD
9730 """
9731 AddItem(self, SizerItem item)
9732
9733 Adds a `wx.SizerItem` to the sizer.
9734 """
54f9ee45 9735 return _core_.Sizer_AddItem(*args, **kwargs)
e811c8ce
RD
9736
9737 def InsertItem(*args, **kwargs):
248ed943
RD
9738 """
9739 InsertItem(self, int index, SizerItem item)
9740
9741 Inserts a `wx.SizerItem` to the sizer at the position given by *index*.
9742 """
54f9ee45 9743 return _core_.Sizer_InsertItem(*args, **kwargs)
e811c8ce
RD
9744
9745 def PrependItem(*args, **kwargs):
248ed943
RD
9746 """
9747 PrependItem(self, SizerItem item)
9748
9749 Prepends a `wx.SizerItem` to the sizer.
9750 """
54f9ee45 9751 return _core_.Sizer_PrependItem(*args, **kwargs)
e811c8ce 9752
248ed943 9753 def AddMany(self, items):
66c033b4
RD
9754 """
9755 AddMany is a convenience method for adding several items
9756 to a sizer at one time. Simply pass it a list of tuples,
9757 where each tuple consists of the parameters that you
9758 would normally pass to the `Add` method.
9759 """
248ed943
RD
9760 for item in items:
9761 if type(item) != type(()) or (len(item) == 2 and type(item[0]) == type(1)):
9762 item = (item, )
9763 self.Add(*item)
d14a1e28 9764
74e96f3d 9765 # for backwards compatibility only, please do not use in new code
b9d6a5f3
RD
9766 def AddWindow(self, *args, **kw):
9767 """Compatibility alias for `Add`."""
9768 return self.Add(*args, **kw)
9769 def AddSizer(self, *args, **kw):
9770 """Compatibility alias for `Add`."""
9771 return self.Add(*args, **kw)
9772 def AddSpacer(self, *args, **kw):
9773 """Compatibility alias for `Add`."""
9774 return self.Add(*args, **kw)
9775
9776 def PrependWindow(self, *args, **kw):
9777 """Compatibility alias for `Prepend`."""
9778 return self.Prepend(*args, **kw)
9779 def PrependSizer(self, *args, **kw):
9780 """Compatibility alias for `Prepend`."""
9781 return self.Prepend(*args, **kw)
9782 def PrependSpacer(self, *args, **kw):
9783 """Compatibility alias for `Prepend`."""
9784 return self.Prepend(*args, **kw)
9785
9786 def InsertWindow(self, *args, **kw):
9787 """Compatibility alias for `Insert`."""
9788 return self.Insert(*args, **kw)
9789 def InsertSizer(self, *args, **kw):
9790 """Compatibility alias for `Insert`."""
9791 return self.Insert(*args, **kw)
9792 def InsertSpacer(self, *args, **kw):
9793 """Compatibility alias for `Insert`."""
9794 return self.Insert(*args, **kw)
9795
9796 def RemoveWindow(self, *args, **kw):
9797 """Compatibility alias for `Remove`."""
9798 return self.Remove(*args, **kw)
9799 def RemoveSizer(self, *args, **kw):
9800 """Compatibility alias for `Remove`."""
9801 return self.Remove(*args, **kw)
9802 def RemovePos(self, *args, **kw):
9803 """Compatibility alias for `Remove`."""
9804 return self.Remove(*args, **kw)
d14a1e28
RD
9805
9806
e811c8ce 9807 def SetDimension(*args, **kwargs):
248ed943
RD
9808 """
9809 SetDimension(self, int x, int y, int width, int height)
9810
9811 Call this to force the sizer to take the given dimension and thus
9812 force the items owned by the sizer to resize themselves according to
9813 the rules defined by the parameter in the `Add`, `Insert` or `Prepend`
9814 methods.
9815 """
54f9ee45 9816 return _core_.Sizer_SetDimension(*args, **kwargs)
e811c8ce
RD
9817
9818 def SetMinSize(*args, **kwargs):
248ed943
RD
9819 """
9820 SetMinSize(self, Size size)
9821
9822 Call this to give the sizer a minimal size. Normally, the sizer will
9823 calculate its minimal size based purely on how much space its children
9824 need. After calling this method `GetMinSize` will return either the
9825 minimal size as requested by its children or the minimal size set
9826 here, depending on which is bigger.
9827 """
54f9ee45 9828 return _core_.Sizer_SetMinSize(*args, **kwargs)
e811c8ce
RD
9829
9830 def GetSize(*args, **kwargs):
248ed943
RD
9831 """
9832 GetSize(self) -> Size
9833
9834 Returns the current size of the space managed by the sizer.
9835 """
54f9ee45 9836 return _core_.Sizer_GetSize(*args, **kwargs)
e811c8ce
RD
9837
9838 def GetPosition(*args, **kwargs):
248ed943
RD
9839 """
9840 GetPosition(self) -> Point
9841
9842 Returns the current position of the sizer's managed space.
9843 """
54f9ee45 9844 return _core_.Sizer_GetPosition(*args, **kwargs)
e811c8ce
RD
9845
9846 def GetMinSize(*args, **kwargs):
248ed943
RD
9847 """
9848 GetMinSize(self) -> Size
9849
9850 Returns the minimal size of the sizer. This is either the combined
9851 minimal size of all the children and their borders or the minimal size
9852 set by SetMinSize, depending on which is bigger.
9853 """
54f9ee45 9854 return _core_.Sizer_GetMinSize(*args, **kwargs)
e811c8ce 9855
d14a1e28 9856 def GetSizeTuple(self):
1c0f361b 9857 return self.GetSize().Get()
d14a1e28 9858 def GetPositionTuple(self):
1c0f361b 9859 return self.GetPosition().Get()
d14a1e28 9860 def GetMinSizeTuple(self):
1c0f361b 9861 return self.GetMinSize().Get()
d14a1e28 9862
e811c8ce 9863 def RecalcSizes(*args, **kwargs):
248ed943
RD
9864 """
9865 RecalcSizes(self)
9866
9867 Using the sizes calculated by `CalcMin` reposition and resize all the
9868 items managed by this sizer. You should not need to call this directly as
9869 it is called by `Layout`.
9870 """
54f9ee45 9871 return _core_.Sizer_RecalcSizes(*args, **kwargs)
e811c8ce
RD
9872
9873 def CalcMin(*args, **kwargs):
248ed943
RD
9874 """
9875 CalcMin(self) -> Size
9876
9877 This method is where the sizer will do the actual calculation of its
9878 children's minimal sizes. You should not need to call this directly as
9879 it is called by `Layout`.
9880 """
54f9ee45 9881 return _core_.Sizer_CalcMin(*args, **kwargs)
e811c8ce
RD
9882
9883 def Layout(*args, **kwargs):
248ed943
RD
9884 """
9885 Layout(self)
9886
9887 This method will force the recalculation and layout of the items
9888 controlled by the sizer using the current space allocated to the
9889 sizer. Normally this is called automatically from the owning window's
9890 EVT_SIZE handler, but it is also useful to call it from user code when
9891 one of the items in a sizer change size, or items are added or
9892 removed.
9893 """
54f9ee45 9894 return _core_.Sizer_Layout(*args, **kwargs)
e811c8ce
RD
9895
9896 def Fit(*args, **kwargs):
248ed943
RD
9897 """
9898 Fit(self, Window window) -> Size
9899
9900 Tell the sizer to resize the *window* to match the sizer's minimal
9901 size. This is commonly done in the constructor of the window itself in
9902 order to set its initial size to match the needs of the children as
9903 determined by the sizer. Returns the new size.
9904
9905 For a top level window this is the total window size, not the client size.
9906 """
54f9ee45 9907 return _core_.Sizer_Fit(*args, **kwargs)
e811c8ce
RD
9908
9909 def FitInside(*args, **kwargs):
248ed943
RD
9910 """
9911 FitInside(self, Window window)
9912
9913 Tell the sizer to resize the *virtual size* of the *window* to match the
9914 sizer's minimal size. This will not alter the on screen size of the
9915 window, but may cause the addition/removal/alteration of scrollbars
9916 required to view the virtual area in windows which manage it.
9917
9918 :see: `wx.ScrolledWindow.SetScrollbars`, `SetVirtualSizeHints`
9919
9920 """
54f9ee45 9921 return _core_.Sizer_FitInside(*args, **kwargs)
e811c8ce
RD
9922
9923 def SetSizeHints(*args, **kwargs):
248ed943
RD
9924 """
9925 SetSizeHints(self, Window window)
9926
9927 Tell the sizer to set (and `Fit`) the minimal size of the *window* to
9928 match the sizer's minimal size. This is commonly done in the
9929 constructor of the window itself if the window is resizable (as are
9930 many dialogs under Unix and frames on probably all platforms) in order
9931 to prevent the window from being sized smaller than the minimal size
9932 required by the sizer.
9933 """
54f9ee45 9934 return _core_.Sizer_SetSizeHints(*args, **kwargs)
e811c8ce
RD
9935
9936 def SetVirtualSizeHints(*args, **kwargs):
248ed943
RD
9937 """
9938 SetVirtualSizeHints(self, Window window)
9939
9940 Tell the sizer to set the minimal size of the window virtual area to
9941 match the sizer's minimal size. For windows with managed scrollbars
9942 this will set them appropriately.
9943
9944 :see: `wx.ScrolledWindow.SetScrollbars`
9945
9946 """
54f9ee45 9947 return _core_.Sizer_SetVirtualSizeHints(*args, **kwargs)
e811c8ce
RD
9948
9949 def Clear(*args, **kwargs):
248ed943
RD
9950 """
9951 Clear(self, bool deleteWindows=False)
9952
9953 Clear all items from the sizer, optionally destroying the window items
9954 as well.
9955 """
54f9ee45 9956 return _core_.Sizer_Clear(*args, **kwargs)
e811c8ce
RD
9957
9958 def DeleteWindows(*args, **kwargs):
248ed943
RD
9959 """
9960 DeleteWindows(self)
9961
9962 Destroy all windows managed by the sizer.
9963 """
54f9ee45 9964 return _core_.Sizer_DeleteWindows(*args, **kwargs)
e811c8ce
RD
9965
9966 def GetChildren(*args, **kwargs):
248ed943 9967 """
51b83b37 9968 GetChildren(self) -> list
248ed943
RD
9969
9970 Returns a list of all the `wx.SizerItem` objects managed by the sizer.
9971 """
54f9ee45 9972 return _core_.Sizer_GetChildren(*args, **kwargs)
e811c8ce
RD
9973
9974 def Show(*args, **kwargs):
248ed943 9975 """
ae8162c8 9976 Show(self, item, bool show=True, bool recursive=false) -> bool
e811c8ce 9977
248ed943
RD
9978 Shows or hides an item managed by the sizer. To make a sizer item
9979 disappear or reappear, use Show followed by `Layout`. The *item*
9980 parameter can be either a window, a sizer, or the zero-based index of
7e63a440
RD
9981 the item. Use the recursive parameter to show or hide an item in a
9982 subsizer. Returns True if the item was found.
248ed943
RD
9983 """
9984 return _core_.Sizer_Show(*args, **kwargs)
e811c8ce
RD
9985
9986 def IsShown(*args, **kwargs):
248ed943
RD
9987 """
9988 IsShown(self, item)
9989
9990 Determines if the item is currently shown. sizer. To make a sizer
9991 item disappear or reappear, use Show followed by `Layout`. The *item*
9992 parameter can be either a window, a sizer, or the zero-based index of
9993 the item.
9994 """
54f9ee45 9995 return _core_.Sizer_IsShown(*args, **kwargs)
e811c8ce 9996
7e63a440 9997 def Hide(self, item, recursive=False):
248ed943 9998 """
88c6b281 9999 A convenience method for `Show`(item, False, recursive).
248ed943 10000 """
06759a38 10001 return self.Show(item, False, recursive)
248ed943 10002
e811c8ce 10003 def ShowItems(*args, **kwargs):
248ed943
RD
10004 """
10005 ShowItems(self, bool show)
10006
84f85550 10007 Recursively call `wx.SizerItem.Show` on all sizer items.
248ed943 10008 """
54f9ee45 10009 return _core_.Sizer_ShowItems(*args, **kwargs)
e811c8ce 10010
d14a1e28
RD
10011
10012class SizerPtr(Sizer):
10013 def __init__(self, this):
10014 self.this = this
10015 if not hasattr(self,"thisown"): self.thisown = 0
10016 self.__class__ = Sizer
54f9ee45 10017_core_.Sizer_swigregister(SizerPtr)
d14a1e28
RD
10018
10019class PySizer(Sizer):
248ed943
RD
10020 """
10021 wx.PySizer is a special version of `wx.Sizer` that has been
10022 instrumented to allow the C++ virtual methods to be overloaded in
10023 Python derived classes. You would derive from this class if you are
10024 wanting to implement a custom sizer in Python code. Simply implement
10025 `CalcMin` and `RecalcSizes` in the derived class and you're all set.
10026 For example::
10027
10028 class MySizer(wx.PySizer):
10029 def __init__(self):
10030 wx.PySizer.__init__(self)
10031
10032 def CalcMin(self):
10033 for item in self.GetChildren():
10034 # calculate the total minimum width and height needed
10035 # by all items in the sizer according to this sizer's
10036 # layout algorithm.
10037 ...
10038 return wx.Size(width, height)
10039
10040 def RecalcSizes(self):
10041 # find the space allotted to this sizer
10042 pos = self.GetPosition()
10043 size = self.GetSize()
10044 for item in self.GetChildren():
10045 # Recalculate (if necessary) the position and size of
10046 # each item and then call item.SetDimension to do the
10047 # actual positioning and sizing of the items within the
10048 # space alloted to this sizer.
10049 ...
10050 item.SetDimension(itemPos, itemSize)
10051
10052
10053 When `Layout` is called it first calls `CalcMin` followed by
10054 `RecalcSizes` so you can optimize a bit by saving the results of
e505d15e 10055 `CalcMin` and reusing them in `RecalcSizes`.
248ed943
RD
10056
10057 :see: `wx.SizerItem`, `wx.Sizer.GetChildren`
10058
10059
10060 """
e811c8ce
RD
10061 def __repr__(self):
10062 return "<%s.%s; proxy of C++ wxPySizer instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 10063 def __init__(self, *args, **kwargs):
248ed943
RD
10064 """
10065 __init__(self) -> PySizer
10066
10067 Creates a wx.PySizer. Must be called from the __init__ in the derived
10068 class.
10069 """
54f9ee45 10070 newobj = _core_.new_PySizer(*args, **kwargs)
d14a1e28
RD
10071 self.this = newobj.this
10072 self.thisown = 1
10073 del newobj.thisown
10074 self._setCallbackInfo(self, PySizer);self._setOORInfo(self)
e811c8ce
RD
10075
10076 def _setCallbackInfo(*args, **kwargs):
a95a7133 10077 """_setCallbackInfo(self, PyObject self, PyObject _class)"""
54f9ee45 10078 return _core_.PySizer__setCallbackInfo(*args, **kwargs)
e811c8ce 10079
d14a1e28
RD
10080
10081class PySizerPtr(PySizer):
10082 def __init__(self, this):
10083 self.this = this
10084 if not hasattr(self,"thisown"): self.thisown = 0
10085 self.__class__ = PySizer
54f9ee45 10086_core_.PySizer_swigregister(PySizerPtr)
d14a1e28
RD
10087
10088#---------------------------------------------------------------------------
10089
10090class BoxSizer(Sizer):
248ed943
RD
10091 """
10092 The basic idea behind a box sizer is that windows will most often be
10093 laid out in rather simple basic geometry, typically in a row or a
10094 column or nested hierarchies of either. A wx.BoxSizer will lay out
10095 its items in a simple row or column, depending on the orientation
10096 parameter passed to the constructor.
10097 """
e811c8ce
RD
10098 def __repr__(self):
10099 return "<%s.%s; proxy of C++ wxBoxSizer instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 10100 def __init__(self, *args, **kwargs):
248ed943
RD
10101 """
10102 __init__(self, int orient=HORIZONTAL) -> BoxSizer
10103
10104 Constructor for a wx.BoxSizer. *orient* may be one of ``wx.VERTICAL``
10105 or ``wx.HORIZONTAL`` for creating either a column sizer or a row
10106 sizer.
10107 """
54f9ee45 10108 newobj = _core_.new_BoxSizer(*args, **kwargs)
d14a1e28
RD
10109 self.this = newobj.this
10110 self.thisown = 1
10111 del newobj.thisown
10112 self._setOORInfo(self)
e811c8ce
RD
10113
10114 def GetOrientation(*args, **kwargs):
248ed943
RD
10115 """
10116 GetOrientation(self) -> int
10117
10118 Returns the current orientation of the sizer.
10119 """
54f9ee45 10120 return _core_.BoxSizer_GetOrientation(*args, **kwargs)
e811c8ce
RD
10121
10122 def SetOrientation(*args, **kwargs):
248ed943
RD
10123 """
10124 SetOrientation(self, int orient)
e811c8ce 10125
248ed943
RD
10126 Resets the orientation of the sizer.
10127 """
10128 return _core_.BoxSizer_SetOrientation(*args, **kwargs)
e811c8ce 10129
d14a1e28
RD
10130
10131class BoxSizerPtr(BoxSizer):
10132 def __init__(self, this):
10133 self.this = this
10134 if not hasattr(self,"thisown"): self.thisown = 0
10135 self.__class__ = BoxSizer
54f9ee45 10136_core_.BoxSizer_swigregister(BoxSizerPtr)
d14a1e28
RD
10137
10138#---------------------------------------------------------------------------
10139
10140class StaticBoxSizer(BoxSizer):
248ed943
RD
10141 """
10142 wx.StaticBoxSizer derives from and functions identically to the
10143 `wx.BoxSizer` and adds a `wx.StaticBox` around the items that the sizer
10144 manages. Note that this static box must be created separately and
10145 passed to the sizer constructor.
10146 """
e811c8ce
RD
10147 def __repr__(self):
10148 return "<%s.%s; proxy of C++ wxStaticBoxSizer instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 10149 def __init__(self, *args, **kwargs):
248ed943
RD
10150 """
10151 __init__(self, StaticBox box, int orient=HORIZONTAL) -> StaticBoxSizer
10152
10153 Constructor. It takes an associated static box and the orientation
10154 *orient* as parameters - orient can be either of ``wx.VERTICAL`` or
10155 ``wx.HORIZONTAL``.
10156 """
54f9ee45 10157 newobj = _core_.new_StaticBoxSizer(*args, **kwargs)
d14a1e28
RD
10158 self.this = newobj.this
10159 self.thisown = 1
10160 del newobj.thisown
10161 self._setOORInfo(self)
e811c8ce
RD
10162
10163 def GetStaticBox(*args, **kwargs):
248ed943
RD
10164 """
10165 GetStaticBox(self) -> StaticBox
e811c8ce 10166
248ed943
RD
10167 Returns the static box associated with this sizer.
10168 """
10169 return _core_.StaticBoxSizer_GetStaticBox(*args, **kwargs)
e811c8ce 10170
d14a1e28
RD
10171
10172class StaticBoxSizerPtr(StaticBoxSizer):
10173 def __init__(self, this):
10174 self.this = this
10175 if not hasattr(self,"thisown"): self.thisown = 0
10176 self.__class__ = StaticBoxSizer
54f9ee45 10177_core_.StaticBoxSizer_swigregister(StaticBoxSizerPtr)
d14a1e28
RD
10178
10179#---------------------------------------------------------------------------
10180
10181class GridSizer(Sizer):
248ed943
RD
10182 """
10183 A grid sizer is a sizer which lays out its children in a
10184 two-dimensional table with all cells having the same size. In other
10185 words, the width of each cell within the grid is the width of the
10186 widest item added to the sizer and the height of each grid cell is the
10187 height of the tallest item. An optional vertical and/or horizontal
10188 gap between items can also be specified (in pixels.)
10189
10190 Items are placed in the cells of the grid in the order they are added,
10191 in row-major order. In other words, the first row is filled first,
10192 then the second, and so on until all items have been added. (If
10193 neccessary, additional rows will be added as items are added.) If you
10194 need to have greater control over the cells that items are placed in
10195 then use the `wx.GridBagSizer`.
10196
10197 """
e811c8ce
RD
10198 def __repr__(self):
10199 return "<%s.%s; proxy of C++ wxGridSizer instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 10200 def __init__(self, *args, **kwargs):
248ed943
RD
10201 """
10202 __init__(self, int rows=1, int cols=0, int vgap=0, int hgap=0) -> GridSizer
10203
10204 Constructor for a wx.GridSizer. *rows* and *cols* determine the number
10205 of columns and rows in the sizer - if either of the parameters is
10206 zero, it will be calculated to from the total number of children in
10207 the sizer, thus making the sizer grow dynamically. *vgap* and *hgap*
10208 define extra space between all children.
10209 """
54f9ee45 10210 newobj = _core_.new_GridSizer(*args, **kwargs)
d14a1e28
RD
10211 self.this = newobj.this
10212 self.thisown = 1
10213 del newobj.thisown
10214 self._setOORInfo(self)
e811c8ce 10215
e811c8ce 10216 def SetCols(*args, **kwargs):
248ed943
RD
10217 """
10218 SetCols(self, int cols)
10219
10220 Sets the number of columns in the sizer.
10221 """
54f9ee45 10222 return _core_.GridSizer_SetCols(*args, **kwargs)
e811c8ce
RD
10223
10224 def SetRows(*args, **kwargs):
248ed943
RD
10225 """
10226 SetRows(self, int rows)
10227
10228 Sets the number of rows in the sizer.
10229 """
54f9ee45 10230 return _core_.GridSizer_SetRows(*args, **kwargs)
e811c8ce
RD
10231
10232 def SetVGap(*args, **kwargs):
248ed943
RD
10233 """
10234 SetVGap(self, int gap)
10235
10236 Sets the vertical gap (in pixels) between the cells in the sizer.
10237 """
54f9ee45 10238 return _core_.GridSizer_SetVGap(*args, **kwargs)
e811c8ce
RD
10239
10240 def SetHGap(*args, **kwargs):
248ed943
RD
10241 """
10242 SetHGap(self, int gap)
10243
10244 Sets the horizontal gap (in pixels) between cells in the sizer
10245 """
54f9ee45 10246 return _core_.GridSizer_SetHGap(*args, **kwargs)
e811c8ce
RD
10247
10248 def GetCols(*args, **kwargs):
248ed943
RD
10249 """
10250 GetCols(self) -> int
10251
10252 Returns the number of columns in the sizer.
10253 """
54f9ee45 10254 return _core_.GridSizer_GetCols(*args, **kwargs)
e811c8ce
RD
10255
10256 def GetRows(*args, **kwargs):
248ed943
RD
10257 """
10258 GetRows(self) -> int
10259
10260 Returns the number of rows in the sizer.
10261 """
54f9ee45 10262 return _core_.GridSizer_GetRows(*args, **kwargs)
e811c8ce
RD
10263
10264 def GetVGap(*args, **kwargs):
248ed943
RD
10265 """
10266 GetVGap(self) -> int
10267
10268 Returns the vertical gap (in pixels) between the cells in the sizer.
10269 """
54f9ee45 10270 return _core_.GridSizer_GetVGap(*args, **kwargs)
e811c8ce
RD
10271
10272 def GetHGap(*args, **kwargs):
248ed943
RD
10273 """
10274 GetHGap(self) -> int
10275
10276 Returns the horizontal gap (in pixels) between cells in the sizer.
10277 """
54f9ee45 10278 return _core_.GridSizer_GetHGap(*args, **kwargs)
e811c8ce 10279
d14a1e28
RD
10280
10281class GridSizerPtr(GridSizer):
10282 def __init__(self, this):
10283 self.this = this
10284 if not hasattr(self,"thisown"): self.thisown = 0
10285 self.__class__ = GridSizer
54f9ee45 10286_core_.GridSizer_swigregister(GridSizerPtr)
d14a1e28
RD
10287
10288#---------------------------------------------------------------------------
10289
54f9ee45
RD
10290FLEX_GROWMODE_NONE = _core_.FLEX_GROWMODE_NONE
10291FLEX_GROWMODE_SPECIFIED = _core_.FLEX_GROWMODE_SPECIFIED
10292FLEX_GROWMODE_ALL = _core_.FLEX_GROWMODE_ALL
d14a1e28 10293class FlexGridSizer(GridSizer):
248ed943
RD
10294 """
10295 A flex grid sizer is a sizer which lays out its children in a
10296 two-dimensional table with all table cells in one row having the same
10297 height and all cells in one column having the same width, but all
10298 rows or all columns are not necessarily the same height or width as in
10299 the `wx.GridSizer`.
10300
10301 wx.FlexGridSizer can also size items equally in one direction but
10302 unequally ("flexibly") in the other. If the sizer is only flexible
10303 in one direction (this can be changed using `SetFlexibleDirection`), it
10304 needs to be decided how the sizer should grow in the other ("non
10305 flexible") direction in order to fill the available space. The
10306 `SetNonFlexibleGrowMode` method serves this purpose.
10307
10308
10309 """
e811c8ce
RD
10310 def __repr__(self):
10311 return "<%s.%s; proxy of C++ wxFlexGridSizer instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 10312 def __init__(self, *args, **kwargs):
248ed943
RD
10313 """
10314 __init__(self, int rows=1, int cols=0, int vgap=0, int hgap=0) -> FlexGridSizer
10315
10316 Constructor for a wx.FlexGridSizer. *rows* and *cols* determine the
10317 number of columns and rows in the sizer - if either of the parameters
10318 is zero, it will be calculated to from the total number of children in
10319 the sizer, thus making the sizer grow dynamically. *vgap* and *hgap*
10320 define extra space between all children.
10321 """
54f9ee45 10322 newobj = _core_.new_FlexGridSizer(*args, **kwargs)
d14a1e28
RD
10323 self.this = newobj.this
10324 self.thisown = 1
10325 del newobj.thisown
10326 self._setOORInfo(self)
e811c8ce 10327
248ed943
RD
10328 def AddGrowableRow(*args, **kwargs):
10329 """
10330 AddGrowableRow(self, size_t idx, int proportion=0)
e811c8ce 10331
248ed943
RD
10332 Specifies that row *idx* (starting from zero) should be grown if there
10333 is extra space available to the sizer.
e811c8ce 10334
248ed943
RD
10335 The *proportion* parameter has the same meaning as the stretch factor
10336 for the box sizers except that if all proportions are 0, then all
10337 columns are resized equally (instead of not being resized at all).
10338 """
54f9ee45 10339 return _core_.FlexGridSizer_AddGrowableRow(*args, **kwargs)
e811c8ce
RD
10340
10341 def RemoveGrowableRow(*args, **kwargs):
248ed943
RD
10342 """
10343 RemoveGrowableRow(self, size_t idx)
10344
10345 Specifies that row *idx* is no longer growable.
10346 """
54f9ee45 10347 return _core_.FlexGridSizer_RemoveGrowableRow(*args, **kwargs)
e811c8ce
RD
10348
10349 def AddGrowableCol(*args, **kwargs):
248ed943
RD
10350 """
10351 AddGrowableCol(self, size_t idx, int proportion=0)
10352
10353 Specifies that column *idx* (starting from zero) should be grown if
10354 there is extra space available to the sizer.
10355
10356 The *proportion* parameter has the same meaning as the stretch factor
10357 for the box sizers except that if all proportions are 0, then all
10358 columns are resized equally (instead of not being resized at all).
10359 """
54f9ee45 10360 return _core_.FlexGridSizer_AddGrowableCol(*args, **kwargs)
e811c8ce
RD
10361
10362 def RemoveGrowableCol(*args, **kwargs):
248ed943
RD
10363 """
10364 RemoveGrowableCol(self, size_t idx)
10365
10366 Specifies that column *idx* is no longer growable.
10367 """
54f9ee45 10368 return _core_.FlexGridSizer_RemoveGrowableCol(*args, **kwargs)
e811c8ce
RD
10369
10370 def SetFlexibleDirection(*args, **kwargs):
248ed943
RD
10371 """
10372 SetFlexibleDirection(self, int direction)
10373
10374 Specifies whether the sizer should flexibly resize its columns, rows,
10375 or both. Argument *direction* can be one of the following values. Any
10376 other value is ignored.
10377
10378 ============== =======================================
10379 wx.VERTICAL Rows are flexibly sized.
10380 wx.HORIZONTAL Columns are flexibly sized.
10381 wx.BOTH Both rows and columns are flexibly sized
10382 (this is the default value).
10383 ============== =======================================
10384
10385 Note that this method does not trigger relayout.
10386
10387 """
54f9ee45 10388 return _core_.FlexGridSizer_SetFlexibleDirection(*args, **kwargs)
e811c8ce
RD
10389
10390 def GetFlexibleDirection(*args, **kwargs):
248ed943
RD
10391 """
10392 GetFlexibleDirection(self) -> int
10393
10394 Returns a value that specifies whether the sizer
10395 flexibly resizes its columns, rows, or both (default).
10396
10397 :see: `SetFlexibleDirection`
10398 """
54f9ee45 10399 return _core_.FlexGridSizer_GetFlexibleDirection(*args, **kwargs)
e811c8ce
RD
10400
10401 def SetNonFlexibleGrowMode(*args, **kwargs):
248ed943
RD
10402 """
10403 SetNonFlexibleGrowMode(self, int mode)
10404
10405 Specifies how the sizer should grow in the non-flexible direction if
10406 there is one (so `SetFlexibleDirection` must have been called
10407 previously). Argument *mode* can be one of the following values:
10408
10409 ========================== =================================================
10410 wx.FLEX_GROWMODE_NONE Sizer doesn't grow in the non flexible direction.
10411 wx.FLEX_GROWMODE_SPECIFIED Sizer honors growable columns/rows set with
10412 `AddGrowableCol` and `AddGrowableRow`. In this
10413 case equal sizing applies to minimum sizes of
10414 columns or rows (this is the default value).
10415 wx.FLEX_GROWMODE_ALL Sizer equally stretches all columns or rows in
10416 the non flexible direction, whether they are
10417 growable or not in the flexbile direction.
10418 ========================== =================================================
10419
10420 Note that this method does not trigger relayout.
10421
10422
10423 """
54f9ee45 10424 return _core_.FlexGridSizer_SetNonFlexibleGrowMode(*args, **kwargs)
e811c8ce
RD
10425
10426 def GetNonFlexibleGrowMode(*args, **kwargs):
248ed943
RD
10427 """
10428 GetNonFlexibleGrowMode(self) -> int
10429
10430 Returns the value that specifies how the sizer grows in the
10431 non-flexible direction if there is one.
10432
10433 :see: `SetNonFlexibleGrowMode`
10434 """
54f9ee45 10435 return _core_.FlexGridSizer_GetNonFlexibleGrowMode(*args, **kwargs)
e811c8ce
RD
10436
10437 def GetRowHeights(*args, **kwargs):
fd2dc343
RD
10438 """
10439 GetRowHeights(self) -> list
10440
10441 Returns a list of integers representing the heights of each of the
10442 rows in the sizer.
10443 """
54f9ee45 10444 return _core_.FlexGridSizer_GetRowHeights(*args, **kwargs)
e811c8ce
RD
10445
10446 def GetColWidths(*args, **kwargs):
fd2dc343
RD
10447 """
10448 GetColWidths(self) -> list
10449
10450 Returns a list of integers representing the widths of each of the
10451 columns in the sizer.
10452 """
54f9ee45 10453 return _core_.FlexGridSizer_GetColWidths(*args, **kwargs)
e811c8ce 10454
d14a1e28
RD
10455
10456class FlexGridSizerPtr(FlexGridSizer):
10457 def __init__(self, this):
10458 self.this = this
10459 if not hasattr(self,"thisown"): self.thisown = 0
10460 self.__class__ = FlexGridSizer
54f9ee45 10461_core_.FlexGridSizer_swigregister(FlexGridSizerPtr)
d14a1e28 10462
e505d15e
RD
10463class StdDialogButtonSizer(BoxSizer):
10464 """
10465 A special sizer that knows how to order and position standard buttons
10466 in order to conform to the current platform's standards. You simply
10467 need to add each `wx.Button` to the sizer, and be sure to create the
53aa7709 10468 buttons using the standard ID's. Then call `Realize` and the sizer
e505d15e
RD
10469 will take care of the rest.
10470
10471 """
10472 def __repr__(self):
10473 return "<%s.%s; proxy of C++ wxStdDialogButtonSizer instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
10474 def __init__(self, *args, **kwargs):
10475 """__init__(self) -> StdDialogButtonSizer"""
10476 newobj = _core_.new_StdDialogButtonSizer(*args, **kwargs)
10477 self.this = newobj.this
10478 self.thisown = 1
10479 del newobj.thisown
10480 def AddButton(*args, **kwargs):
10481 """
10482 AddButton(self, wxButton button)
10483
10484 Use this to add the buttons to this sizer. Do not use the `Add`
10485 method in the base class.
10486 """
10487 return _core_.StdDialogButtonSizer_AddButton(*args, **kwargs)
10488
53aa7709 10489 def Realize(*args, **kwargs):
e505d15e 10490 """
53aa7709 10491 Realize(self)
e505d15e
RD
10492
10493 This funciton needs to be called after all the buttons have been added
10494 to the sizer. It will reorder them and position them in a platform
10495 specifc manner.
10496 """
53aa7709 10497 return _core_.StdDialogButtonSizer_Realize(*args, **kwargs)
51b83b37
RD
10498
10499 def SetAffirmativeButton(*args, **kwargs):
10500 """SetAffirmativeButton(self, wxButton button)"""
10501 return _core_.StdDialogButtonSizer_SetAffirmativeButton(*args, **kwargs)
10502
10503 def SetNegativeButton(*args, **kwargs):
10504 """SetNegativeButton(self, wxButton button)"""
10505 return _core_.StdDialogButtonSizer_SetNegativeButton(*args, **kwargs)
10506
10507 def SetCancelButton(*args, **kwargs):
10508 """SetCancelButton(self, wxButton button)"""
10509 return _core_.StdDialogButtonSizer_SetCancelButton(*args, **kwargs)
e505d15e
RD
10510
10511 def GetAffirmativeButton(*args, **kwargs):
10512 """GetAffirmativeButton(self) -> wxButton"""
10513 return _core_.StdDialogButtonSizer_GetAffirmativeButton(*args, **kwargs)
10514
10515 def GetApplyButton(*args, **kwargs):
10516 """GetApplyButton(self) -> wxButton"""
10517 return _core_.StdDialogButtonSizer_GetApplyButton(*args, **kwargs)
10518
10519 def GetNegativeButton(*args, **kwargs):
10520 """GetNegativeButton(self) -> wxButton"""
10521 return _core_.StdDialogButtonSizer_GetNegativeButton(*args, **kwargs)
10522
10523 def GetCancelButton(*args, **kwargs):
10524 """GetCancelButton(self) -> wxButton"""
10525 return _core_.StdDialogButtonSizer_GetCancelButton(*args, **kwargs)
10526
10527 def GetHelpButton(*args, **kwargs):
10528 """GetHelpButton(self) -> wxButton"""
10529 return _core_.StdDialogButtonSizer_GetHelpButton(*args, **kwargs)
10530
10531
10532class StdDialogButtonSizerPtr(StdDialogButtonSizer):
10533 def __init__(self, this):
10534 self.this = this
10535 if not hasattr(self,"thisown"): self.thisown = 0
10536 self.__class__ = StdDialogButtonSizer
10537_core_.StdDialogButtonSizer_swigregister(StdDialogButtonSizerPtr)
10538
d14a1e28
RD
10539#---------------------------------------------------------------------------
10540
10541class GBPosition(object):
248ed943
RD
10542 """
10543 This class represents the position of an item in a virtual grid of
10544 rows and columns managed by a `wx.GridBagSizer`. wxPython has
10545 typemaps that will automatically convert from a 2-element sequence of
10546 integers to a wx.GBPosition, so you can use the more pythonic
10547 representation of the position nearly transparently in Python code.
10548 """
e811c8ce
RD
10549 def __repr__(self):
10550 return "<%s.%s; proxy of C++ wxGBPosition instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 10551 def __init__(self, *args, **kwargs):
248ed943
RD
10552 """
10553 __init__(self, int row=0, int col=0) -> GBPosition
10554
10555 This class represents the position of an item in a virtual grid of
10556 rows and columns managed by a `wx.GridBagSizer`. wxPython has
10557 typemaps that will automatically convert from a 2-element sequence of
10558 integers to a wx.GBPosition, so you can use the more pythonic
10559 representation of the position nearly transparently in Python code.
10560 """
54f9ee45 10561 newobj = _core_.new_GBPosition(*args, **kwargs)
d14a1e28
RD
10562 self.this = newobj.this
10563 self.thisown = 1
10564 del newobj.thisown
e811c8ce 10565 def GetRow(*args, **kwargs):
a95a7133 10566 """GetRow(self) -> int"""
54f9ee45 10567 return _core_.GBPosition_GetRow(*args, **kwargs)
e811c8ce
RD
10568
10569 def GetCol(*args, **kwargs):
a95a7133 10570 """GetCol(self) -> int"""
54f9ee45 10571 return _core_.GBPosition_GetCol(*args, **kwargs)
e811c8ce
RD
10572
10573 def SetRow(*args, **kwargs):
a95a7133 10574 """SetRow(self, int row)"""
54f9ee45 10575 return _core_.GBPosition_SetRow(*args, **kwargs)
e811c8ce
RD
10576
10577 def SetCol(*args, **kwargs):
a95a7133 10578 """SetCol(self, int col)"""
54f9ee45 10579 return _core_.GBPosition_SetCol(*args, **kwargs)
e811c8ce
RD
10580
10581 def __eq__(*args, **kwargs):
a95a7133 10582 """__eq__(self, GBPosition other) -> bool"""
54f9ee45 10583 return _core_.GBPosition___eq__(*args, **kwargs)
e811c8ce
RD
10584
10585 def __ne__(*args, **kwargs):
a95a7133 10586 """__ne__(self, GBPosition other) -> bool"""
54f9ee45 10587 return _core_.GBPosition___ne__(*args, **kwargs)
e811c8ce
RD
10588
10589 def Set(*args, **kwargs):
a95a7133 10590 """Set(self, int row=0, int col=0)"""
54f9ee45 10591 return _core_.GBPosition_Set(*args, **kwargs)
e811c8ce
RD
10592
10593 def Get(*args, **kwargs):
a95a7133 10594 """Get(self) -> PyObject"""
54f9ee45 10595 return _core_.GBPosition_Get(*args, **kwargs)
e811c8ce 10596
41e2b43e 10597 asTuple = wx._deprecated(Get, "asTuple is deprecated, use `Get` instead")
e811c8ce
RD
10598 def __str__(self): return str(self.Get())
10599 def __repr__(self): return 'wx.GBPosition'+str(self.Get())
10600 def __len__(self): return len(self.Get())
10601 def __getitem__(self, index): return self.Get()[index]
d14a1e28
RD
10602 def __setitem__(self, index, val):
10603 if index == 0: self.SetRow(val)
10604 elif index == 1: self.SetCol(val)
10605 else: raise IndexError
e811c8ce 10606 def __nonzero__(self): return self.Get() != (0,0)
74e96f3d
RD
10607 __safe_for_unpickling__ = True
10608 def __reduce__(self): return (wx.GBPosition, self.Get())
d14a1e28
RD
10609
10610 row = property(GetRow, SetRow)
10611 col = property(GetCol, SetCol)
10612
10613
10614class GBPositionPtr(GBPosition):
10615 def __init__(self, this):
10616 self.this = this
10617 if not hasattr(self,"thisown"): self.thisown = 0
10618 self.__class__ = GBPosition
54f9ee45 10619_core_.GBPosition_swigregister(GBPositionPtr)
d14a1e28
RD
10620
10621class GBSpan(object):
248ed943
RD
10622 """
10623 This class is used to hold the row and column spanning attributes of
10624 items in a `wx.GridBagSizer`. wxPython has typemaps that will
10625 automatically convert from a 2-element sequence of integers to a
10626 wx.GBSpan, so you can use the more pythonic representation of the span
10627 nearly transparently in Python code.
10628
10629 """
e811c8ce
RD
10630 def __repr__(self):
10631 return "<%s.%s; proxy of C++ wxGBSpan instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 10632 def __init__(self, *args, **kwargs):
248ed943
RD
10633 """
10634 __init__(self, int rowspan=1, int colspan=1) -> GBSpan
10635
10636 Construct a new wxGBSpan, optionally setting the rowspan and
10637 colspan. The default is (1,1). (Meaning that the item occupies one
10638 cell in each direction.
10639 """
54f9ee45 10640 newobj = _core_.new_GBSpan(*args, **kwargs)
d14a1e28
RD
10641 self.this = newobj.this
10642 self.thisown = 1
10643 del newobj.thisown
e811c8ce 10644 def GetRowspan(*args, **kwargs):
a95a7133 10645 """GetRowspan(self) -> int"""
54f9ee45 10646 return _core_.GBSpan_GetRowspan(*args, **kwargs)
e811c8ce
RD
10647
10648 def GetColspan(*args, **kwargs):
a95a7133 10649 """GetColspan(self) -> int"""
54f9ee45 10650 return _core_.GBSpan_GetColspan(*args, **kwargs)
e811c8ce
RD
10651
10652 def SetRowspan(*args, **kwargs):
a95a7133 10653 """SetRowspan(self, int rowspan)"""
54f9ee45 10654 return _core_.GBSpan_SetRowspan(*args, **kwargs)
e811c8ce
RD
10655
10656 def SetColspan(*args, **kwargs):
a95a7133 10657 """SetColspan(self, int colspan)"""
54f9ee45 10658 return _core_.GBSpan_SetColspan(*args, **kwargs)
e811c8ce
RD
10659
10660 def __eq__(*args, **kwargs):
a95a7133 10661 """__eq__(self, GBSpan other) -> bool"""
54f9ee45 10662 return _core_.GBSpan___eq__(*args, **kwargs)
e811c8ce
RD
10663
10664 def __ne__(*args, **kwargs):
a95a7133 10665 """__ne__(self, GBSpan other) -> bool"""
54f9ee45 10666 return _core_.GBSpan___ne__(*args, **kwargs)
e811c8ce
RD
10667
10668 def Set(*args, **kwargs):
a95a7133 10669 """Set(self, int rowspan=1, int colspan=1)"""
54f9ee45 10670 return _core_.GBSpan_Set(*args, **kwargs)
e811c8ce
RD
10671
10672 def Get(*args, **kwargs):
a95a7133 10673 """Get(self) -> PyObject"""
54f9ee45 10674 return _core_.GBSpan_Get(*args, **kwargs)
e811c8ce 10675
41e2b43e 10676 asTuple = wx._deprecated(Get, "asTuple is deprecated, use `Get` instead")
e811c8ce
RD
10677 def __str__(self): return str(self.Get())
10678 def __repr__(self): return 'wx.GBSpan'+str(self.Get())
10679 def __len__(self): return len(self.Get())
10680 def __getitem__(self, index): return self.Get()[index]
d14a1e28
RD
10681 def __setitem__(self, index, val):
10682 if index == 0: self.SetRowspan(val)
10683 elif index == 1: self.SetColspan(val)
10684 else: raise IndexError
e811c8ce 10685 def __nonzero__(self): return self.Get() != (0,0)
74e96f3d
RD
10686 __safe_for_unpickling__ = True
10687 def __reduce__(self): return (wx.GBSpan, self.Get())
d14a1e28
RD
10688
10689 rowspan = property(GetRowspan, SetRowspan)
10690 colspan = property(GetColspan, SetColspan)
10691
10692
10693class GBSpanPtr(GBSpan):
10694 def __init__(self, this):
10695 self.this = this
10696 if not hasattr(self,"thisown"): self.thisown = 0
10697 self.__class__ = GBSpan
54f9ee45 10698_core_.GBSpan_swigregister(GBSpanPtr)
d14a1e28
RD
10699
10700class GBSizerItem(SizerItem):
248ed943
RD
10701 """
10702 The wx.GBSizerItem class is used to track the additional data about
10703 items in a `wx.GridBagSizer` such as the item's position in the grid
10704 and how many rows or columns it spans.
10705
10706 """
e811c8ce
RD
10707 def __repr__(self):
10708 return "<%s.%s; proxy of C++ wxGBSizerItem instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 10709 def __init__(self, *args, **kwargs):
248ed943
RD
10710 """
10711 __init__(self) -> GBSizerItem
10712
10713 Constructs an empty wx.GBSizerItem. Either a window, sizer or spacer
10714 size will need to be set, as well as a position and span before this
10715 item can be used in a Sizer.
10716
10717 You will probably never need to create a wx.GBSizerItem directly as they
10718 are created automatically when the sizer's Add method is called.
10719 """
54f9ee45 10720 newobj = _core_.new_GBSizerItem(*args, **kwargs)
d14a1e28
RD
10721 self.this = newobj.this
10722 self.thisown = 1
10723 del newobj.thisown
e811c8ce 10724 def GetPos(*args, **kwargs):
248ed943
RD
10725 """
10726 GetPos(self) -> GBPosition
10727
10728 Get the grid position of the item
10729 """
54f9ee45 10730 return _core_.GBSizerItem_GetPos(*args, **kwargs)
e811c8ce
RD
10731
10732 def GetPosTuple(self): return self.GetPos().Get()
10733 def GetSpan(*args, **kwargs):
248ed943
RD
10734 """
10735 GetSpan(self) -> GBSpan
10736
10737 Get the row and column spanning of the item
10738 """
54f9ee45 10739 return _core_.GBSizerItem_GetSpan(*args, **kwargs)
e811c8ce
RD
10740
10741 def GetSpanTuple(self): return self.GetSpan().Get()
10742 def SetPos(*args, **kwargs):
248ed943
RD
10743 """
10744 SetPos(self, GBPosition pos) -> bool
10745
10746 If the item is already a member of a sizer then first ensure that
10747 there is no other item that would intersect with this one at the new
10748 position, then set the new position. Returns True if the change is
10749 successful and after the next Layout() the item will be moved.
10750 """
54f9ee45 10751 return _core_.GBSizerItem_SetPos(*args, **kwargs)
e811c8ce
RD
10752
10753 def SetSpan(*args, **kwargs):
248ed943
RD
10754 """
10755 SetSpan(self, GBSpan span) -> bool
10756
10757 If the item is already a member of a sizer then first ensure that
10758 there is no other item that would intersect with this one with its new
10759 spanning size, then set the new spanning. Returns True if the change
10760 is successful and after the next Layout() the item will be resized.
10761
10762 """
54f9ee45 10763 return _core_.GBSizerItem_SetSpan(*args, **kwargs)
e811c8ce 10764
248ed943 10765 def Intersects(*args, **kwargs):
0df68c9f 10766 """
a95a7133 10767 Intersects(self, GBSizerItem other) -> bool
248ed943
RD
10768
10769 Returns True if this item and the other item instersect.
0df68c9f 10770 """
248ed943
RD
10771 return _core_.GBSizerItem_Intersects(*args, **kwargs)
10772
10773 def IntersectsPos(*args, **kwargs):
10774 """
10775 IntersectsPos(self, GBPosition pos, GBSpan span) -> bool
10776
10777 Returns True if the given pos/span would intersect with this item.
10778 """
10779 return _core_.GBSizerItem_IntersectsPos(*args, **kwargs)
e811c8ce
RD
10780
10781 def GetEndPos(*args, **kwargs):
248ed943
RD
10782 """
10783 GetEndPos(self) -> GBPosition
10784
10785 Get the row and column of the endpoint of this item.
10786 """
54f9ee45 10787 return _core_.GBSizerItem_GetEndPos(*args, **kwargs)
e811c8ce
RD
10788
10789 def GetGBSizer(*args, **kwargs):
248ed943
RD
10790 """
10791 GetGBSizer(self) -> GridBagSizer
10792
10793 Get the sizer this item is a member of.
10794 """
54f9ee45 10795 return _core_.GBSizerItem_GetGBSizer(*args, **kwargs)
e811c8ce
RD
10796
10797 def SetGBSizer(*args, **kwargs):
248ed943
RD
10798 """
10799 SetGBSizer(self, GridBagSizer sizer)
10800
10801 Set the sizer this item is a member of.
10802 """
54f9ee45 10803 return _core_.GBSizerItem_SetGBSizer(*args, **kwargs)
e811c8ce 10804
d14a1e28
RD
10805
10806class GBSizerItemPtr(GBSizerItem):
10807 def __init__(self, this):
10808 self.this = this
10809 if not hasattr(self,"thisown"): self.thisown = 0
10810 self.__class__ = GBSizerItem
54f9ee45 10811_core_.GBSizerItem_swigregister(GBSizerItemPtr)
d14a1e28
RD
10812DefaultSpan = cvar.DefaultSpan
10813
10814def GBSizerItemWindow(*args, **kwargs):
0df68c9f
RD
10815 """
10816 GBSizerItemWindow(Window window, GBPosition pos, GBSpan span, int flag,
248ed943
RD
10817 int border, PyObject userData=None) -> GBSizerItem
10818
10819 Construct a `wx.GBSizerItem` for a window.
0df68c9f 10820 """
54f9ee45 10821 val = _core_.new_GBSizerItemWindow(*args, **kwargs)
d14a1e28
RD
10822 val.thisown = 1
10823 return val
10824
10825def GBSizerItemSizer(*args, **kwargs):
0df68c9f
RD
10826 """
10827 GBSizerItemSizer(Sizer sizer, GBPosition pos, GBSpan span, int flag,
248ed943
RD
10828 int border, PyObject userData=None) -> GBSizerItem
10829
10830 Construct a `wx.GBSizerItem` for a sizer
0df68c9f 10831 """
54f9ee45 10832 val = _core_.new_GBSizerItemSizer(*args, **kwargs)
d14a1e28
RD
10833 val.thisown = 1
10834 return val
10835
10836def GBSizerItemSpacer(*args, **kwargs):
0df68c9f
RD
10837 """
10838 GBSizerItemSpacer(int width, int height, GBPosition pos, GBSpan span,
248ed943
RD
10839 int flag, int border, PyObject userData=None) -> GBSizerItem
10840
10841 Construct a `wx.GBSizerItem` for a spacer.
0df68c9f 10842 """
54f9ee45 10843 val = _core_.new_GBSizerItemSpacer(*args, **kwargs)
d14a1e28
RD
10844 val.thisown = 1
10845 return val
10846
10847class GridBagSizer(FlexGridSizer):
248ed943
RD
10848 """
10849 A `wx.Sizer` that can lay out items in a virtual grid like a
10850 `wx.FlexGridSizer` but in this case explicit positioning of the items
10851 is allowed using `wx.GBPosition`, and items can optionally span more
10852 than one row and/or column using `wx.GBSpan`. The total size of the
10853 virtual grid is determined by the largest row and column that items are
10854 positioned at, adjusted for spanning.
10855
10856 """
e811c8ce
RD
10857 def __repr__(self):
10858 return "<%s.%s; proxy of C++ wxGridBagSizer instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 10859 def __init__(self, *args, **kwargs):
248ed943
RD
10860 """
10861 __init__(self, int vgap=0, int hgap=0) -> GridBagSizer
10862
10863 Constructor, with optional parameters to specify the gap between the
10864 rows and columns.
10865 """
54f9ee45 10866 newobj = _core_.new_GridBagSizer(*args, **kwargs)
d14a1e28
RD
10867 self.this = newobj.this
10868 self.thisown = 1
10869 del newobj.thisown
1823fbb4
RD
10870 self._setOORInfo(self)
10871
e811c8ce 10872 def Add(*args, **kwargs):
0df68c9f 10873 """
248ed943 10874 Add(self, item, GBPosition pos, GBSpan span=DefaultSpan, int flag=0,
d3b6e4ff 10875 int border=0, userData=None) -> wx.GBSizerItem
248ed943
RD
10876
10877 Adds an item to the sizer at the grid cell *pos*, optionally spanning
10878 more than one row or column as specified with *span*. The remaining
10879 args behave similarly to `wx.Sizer.Add`.
10880
10881 Returns True if the item was successfully placed at the given cell
10882 position, False if something was already there.
10883
0df68c9f 10884 """
54f9ee45 10885 return _core_.GridBagSizer_Add(*args, **kwargs)
e811c8ce
RD
10886
10887 def AddItem(*args, **kwargs):
248ed943 10888 """
d3b6e4ff 10889 Add(self, GBSizerItem item) -> wx.GBSizerItem
248ed943
RD
10890
10891 Add an item to the sizer using a `wx.GBSizerItem`. Returns True if
10892 the item was successfully placed at its given cell position, False if
10893 something was already there.
10894 """
54f9ee45 10895 return _core_.GridBagSizer_AddItem(*args, **kwargs)
e811c8ce 10896
84f85550
RD
10897 def GetCellSize(*args, **kwargs):
10898 """
10899 GetCellSize(self, int row, int col) -> Size
10900
10901 Get the size of the specified cell, including hgap and
10902 vgap. Only valid after a Layout.
10903 """
10904 return _core_.GridBagSizer_GetCellSize(*args, **kwargs)
10905
e811c8ce 10906 def GetEmptyCellSize(*args, **kwargs):
248ed943
RD
10907 """
10908 GetEmptyCellSize(self) -> Size
10909
10910 Get the size used for cells in the grid with no item.
10911 """
54f9ee45 10912 return _core_.GridBagSizer_GetEmptyCellSize(*args, **kwargs)
e811c8ce
RD
10913
10914 def SetEmptyCellSize(*args, **kwargs):
248ed943
RD
10915 """
10916 SetEmptyCellSize(self, Size sz)
10917
10918 Set the size used for cells in the grid with no item.
10919 """
54f9ee45 10920 return _core_.GridBagSizer_SetEmptyCellSize(*args, **kwargs)
e811c8ce
RD
10921
10922 def GetItemPosition(*args):
0df68c9f 10923 """
248ed943
RD
10924 GetItemPosition(self, item) -> GBPosition
10925
10926 Get the grid position of the specified *item* where *item* is either a
10927 window or subsizer that is a member of this sizer, or a zero-based
10928 index of an item.
0df68c9f 10929 """
54f9ee45 10930 return _core_.GridBagSizer_GetItemPosition(*args)
e811c8ce
RD
10931
10932 def SetItemPosition(*args):
0df68c9f 10933 """
248ed943
RD
10934 SetItemPosition(self, item, GBPosition pos) -> bool
10935
10936 Set the grid position of the specified *item* where *item* is either a
10937 window or subsizer that is a member of this sizer, or a zero-based
10938 index of an item. Returns True on success. If the move is not
10939 allowed (because an item is already there) then False is returned.
10940
0df68c9f 10941 """
54f9ee45 10942 return _core_.GridBagSizer_SetItemPosition(*args)
e811c8ce
RD
10943
10944 def GetItemSpan(*args):
0df68c9f 10945 """
248ed943
RD
10946 GetItemSpan(self, item) -> GBSpan
10947
10948 Get the row/col spanning of the specified *item* where *item* is
10949 either a window or subsizer that is a member of this sizer, or a
10950 zero-based index of an item.
0df68c9f 10951 """
54f9ee45 10952 return _core_.GridBagSizer_GetItemSpan(*args)
e811c8ce
RD
10953
10954 def SetItemSpan(*args):
0df68c9f 10955 """
248ed943
RD
10956 SetItemSpan(self, item, GBSpan span) -> bool
10957
10958 Set the row/col spanning of the specified *item* where *item* is
10959 either a window or subsizer that is a member of this sizer, or a
10960 zero-based index of an item. Returns True on success. If the move is
10961 not allowed (because an item is already there) then False is returned.
0df68c9f 10962 """
54f9ee45 10963 return _core_.GridBagSizer_SetItemSpan(*args)
e811c8ce
RD
10964
10965 def FindItem(*args):
0df68c9f 10966 """
248ed943
RD
10967 FindItem(self, item) -> GBSizerItem
10968
10969 Find the sizer item for the given window or subsizer, returns None if
10970 not found. (non-recursive)
0df68c9f 10971 """
54f9ee45 10972 return _core_.GridBagSizer_FindItem(*args)
e811c8ce
RD
10973
10974 def FindItemAtPosition(*args, **kwargs):
248ed943
RD
10975 """
10976 FindItemAtPosition(self, GBPosition pos) -> GBSizerItem
10977
10978 Return the sizer item for the given grid cell, or None if there is no
10979 item at that position. (non-recursive)
10980 """
54f9ee45 10981 return _core_.GridBagSizer_FindItemAtPosition(*args, **kwargs)
e811c8ce
RD
10982
10983 def FindItemAtPoint(*args, **kwargs):
248ed943
RD
10984 """
10985 FindItemAtPoint(self, Point pt) -> GBSizerItem
10986
10987 Return the sizer item located at the point given in *pt*, or None if
10988 there is no item at that point. The (x,y) coordinates in pt correspond
10989 to the client coordinates of the window using the sizer for
10990 layout. (non-recursive)
10991 """
54f9ee45 10992 return _core_.GridBagSizer_FindItemAtPoint(*args, **kwargs)
e811c8ce 10993
248ed943
RD
10994 def CheckForIntersection(*args, **kwargs):
10995 """
10996 CheckForIntersection(self, GBSizerItem item, GBSizerItem excludeItem=None) -> bool
e811c8ce 10997
248ed943
RD
10998 Look at all items and see if any intersect (or would overlap) the
10999 given *item*. Returns True if so, False if there would be no overlap.
11000 If an *excludeItem* is given then it will not be checked for
11001 intersection, for example it may be the item we are checking the
11002 position of.
e811c8ce 11003
248ed943
RD
11004 """
11005 return _core_.GridBagSizer_CheckForIntersection(*args, **kwargs)
e811c8ce 11006
248ed943 11007 def CheckForIntersectionPos(*args, **kwargs):
0df68c9f 11008 """
248ed943
RD
11009 CheckForIntersectionPos(self, GBPosition pos, GBSpan span, GBSizerItem excludeItem=None) -> bool
11010
11011 Look at all items and see if any intersect (or would overlap) the
11012 given position and span. Returns True if so, False if there would be
11013 no overlap. If an *excludeItem* is given then it will not be checked
11014 for intersection, for example it may be the item we are checking the
11015 position of.
0df68c9f 11016 """
248ed943 11017 return _core_.GridBagSizer_CheckForIntersectionPos(*args, **kwargs)
e811c8ce 11018
d14a1e28
RD
11019
11020class GridBagSizerPtr(GridBagSizer):
11021 def __init__(self, this):
11022 self.this = this
11023 if not hasattr(self,"thisown"): self.thisown = 0
11024 self.__class__ = GridBagSizer
54f9ee45 11025_core_.GridBagSizer_swigregister(GridBagSizerPtr)
d14a1e28
RD
11026
11027#---------------------------------------------------------------------------
11028
54f9ee45
RD
11029Left = _core_.Left
11030Top = _core_.Top
11031Right = _core_.Right
11032Bottom = _core_.Bottom
11033Width = _core_.Width
11034Height = _core_.Height
11035Centre = _core_.Centre
11036Center = _core_.Center
11037CentreX = _core_.CentreX
11038CentreY = _core_.CentreY
11039Unconstrained = _core_.Unconstrained
11040AsIs = _core_.AsIs
11041PercentOf = _core_.PercentOf
11042Above = _core_.Above
11043Below = _core_.Below
11044LeftOf = _core_.LeftOf
11045RightOf = _core_.RightOf
11046SameAs = _core_.SameAs
11047Absolute = _core_.Absolute
d14a1e28 11048class IndividualLayoutConstraint(Object):
15afbcd0 11049 """
41e2b43e
RD
11050 Objects of this class are stored in the `wx.LayoutConstraints` class as
11051 one of eight possible constraints that a window can be involved in.
11052 You will never need to create an instance of
11053 wx.IndividualLayoutConstraint, rather you should create a
11054 `wx.LayoutConstraints` instance and use the individual contstraints
15afbcd0 11055 that it contains.
15afbcd0 11056 """
d14a1e28
RD
11057 def __init__(self): raise RuntimeError, "No constructor defined"
11058 def __repr__(self):
11059 return "<%s.%s; proxy of C++ wxIndividualLayoutConstraint instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
e811c8ce 11060 def Set(*args, **kwargs):
41e2b43e
RD
11061 """
11062 Set(self, int rel, Window otherW, int otherE, int val=0, int marg=wxLAYOUT_DEFAULT_MARGIN)
11063
11064 Sets the properties of the constraint. Normally called by one of the
11065 convenience functions such as Above, RightOf, SameAs.
11066 """
54f9ee45 11067 return _core_.IndividualLayoutConstraint_Set(*args, **kwargs)
e811c8ce
RD
11068
11069 def LeftOf(*args, **kwargs):
15afbcd0 11070 """
a95a7133 11071 LeftOf(self, Window sibling, int marg=0)
15afbcd0 11072
41e2b43e
RD
11073 Constrains this edge to be to the left of the given window, with an
11074 optional margin. Implicitly, this is relative to the left edge of the
11075 other window.
15afbcd0 11076 """
54f9ee45 11077 return _core_.IndividualLayoutConstraint_LeftOf(*args, **kwargs)
e811c8ce
RD
11078
11079 def RightOf(*args, **kwargs):
15afbcd0 11080 """
a95a7133 11081 RightOf(self, Window sibling, int marg=0)
15afbcd0 11082
41e2b43e
RD
11083 Constrains this edge to be to the right of the given window, with an
11084 optional margin. Implicitly, this is relative to the right edge of the
11085 other window.
15afbcd0 11086 """
54f9ee45 11087 return _core_.IndividualLayoutConstraint_RightOf(*args, **kwargs)
e811c8ce
RD
11088
11089 def Above(*args, **kwargs):
15afbcd0 11090 """
a95a7133 11091 Above(self, Window sibling, int marg=0)
15afbcd0 11092
41e2b43e
RD
11093 Constrains this edge to be above the given window, with an optional
11094 margin. Implicitly, this is relative to the top edge of the other
11095 window.
15afbcd0 11096 """
54f9ee45 11097 return _core_.IndividualLayoutConstraint_Above(*args, **kwargs)
e811c8ce
RD
11098
11099 def Below(*args, **kwargs):
15afbcd0 11100 """
a95a7133 11101 Below(self, Window sibling, int marg=0)
15afbcd0 11102
41e2b43e
RD
11103 Constrains this edge to be below the given window, with an optional
11104 margin. Implicitly, this is relative to the bottom edge of the other
11105 window.
15afbcd0 11106 """
54f9ee45 11107 return _core_.IndividualLayoutConstraint_Below(*args, **kwargs)
e811c8ce
RD
11108
11109 def SameAs(*args, **kwargs):
15afbcd0 11110 """
a95a7133 11111 SameAs(self, Window otherW, int edge, int marg=0)
15afbcd0 11112
41e2b43e
RD
11113 Constrains this edge or dimension to be to the same as the edge of the
11114 given window, with an optional margin.
15afbcd0 11115 """
54f9ee45 11116 return _core_.IndividualLayoutConstraint_SameAs(*args, **kwargs)
e811c8ce
RD
11117
11118 def PercentOf(*args, **kwargs):
15afbcd0 11119 """
a95a7133 11120 PercentOf(self, Window otherW, int wh, int per)
15afbcd0 11121
41e2b43e
RD
11122 Constrains this edge or dimension to be to a percentage of the given
11123 window, with an optional margin.
15afbcd0 11124 """
54f9ee45 11125 return _core_.IndividualLayoutConstraint_PercentOf(*args, **kwargs)
e811c8ce
RD
11126
11127 def Absolute(*args, **kwargs):
15afbcd0 11128 """
a95a7133 11129 Absolute(self, int val)
15afbcd0 11130
41e2b43e 11131 Constrains this edge or dimension to be the given absolute value.
15afbcd0 11132 """
54f9ee45 11133 return _core_.IndividualLayoutConstraint_Absolute(*args, **kwargs)
e811c8ce
RD
11134
11135 def Unconstrained(*args, **kwargs):
15afbcd0 11136 """
a95a7133 11137 Unconstrained(self)
15afbcd0 11138
41e2b43e
RD
11139 Sets this edge or dimension to be unconstrained, that is, dependent on
11140 other edges and dimensions from which this value can be deduced.
15afbcd0 11141 """
54f9ee45 11142 return _core_.IndividualLayoutConstraint_Unconstrained(*args, **kwargs)
e811c8ce
RD
11143
11144 def AsIs(*args, **kwargs):
15afbcd0 11145 """
a95a7133 11146 AsIs(self)
15afbcd0 11147
41e2b43e
RD
11148 Sets this edge or constraint to be whatever the window's value is at
11149 the moment. If either of the width and height constraints are *as is*,
11150 the window will not be resized, but moved instead. This is important
11151 when considering panel items which are intended to have a default
11152 size, such as a button, which may take its size from the size of the
11153 button label.
15afbcd0 11154 """
54f9ee45 11155 return _core_.IndividualLayoutConstraint_AsIs(*args, **kwargs)
e811c8ce
RD
11156
11157 def GetOtherWindow(*args, **kwargs):
a95a7133 11158 """GetOtherWindow(self) -> Window"""
54f9ee45 11159 return _core_.IndividualLayoutConstraint_GetOtherWindow(*args, **kwargs)
e811c8ce
RD
11160
11161 def GetMyEdge(*args, **kwargs):
a95a7133 11162 """GetMyEdge(self) -> int"""
54f9ee45 11163 return _core_.IndividualLayoutConstraint_GetMyEdge(*args, **kwargs)
e811c8ce
RD
11164
11165 def SetEdge(*args, **kwargs):
a95a7133 11166 """SetEdge(self, int which)"""
54f9ee45 11167 return _core_.IndividualLayoutConstraint_SetEdge(*args, **kwargs)
e811c8ce
RD
11168
11169 def SetValue(*args, **kwargs):
a95a7133 11170 """SetValue(self, int v)"""
54f9ee45 11171 return _core_.IndividualLayoutConstraint_SetValue(*args, **kwargs)
e811c8ce
RD
11172
11173 def GetMargin(*args, **kwargs):
a95a7133 11174 """GetMargin(self) -> int"""
54f9ee45 11175 return _core_.IndividualLayoutConstraint_GetMargin(*args, **kwargs)
e811c8ce
RD
11176
11177 def SetMargin(*args, **kwargs):
a95a7133 11178 """SetMargin(self, int m)"""
54f9ee45 11179 return _core_.IndividualLayoutConstraint_SetMargin(*args, **kwargs)
e811c8ce
RD
11180
11181 def GetValue(*args, **kwargs):
a95a7133 11182 """GetValue(self) -> int"""
54f9ee45 11183 return _core_.IndividualLayoutConstraint_GetValue(*args, **kwargs)
e811c8ce
RD
11184
11185 def GetPercent(*args, **kwargs):
a95a7133 11186 """GetPercent(self) -> int"""
54f9ee45 11187 return _core_.IndividualLayoutConstraint_GetPercent(*args, **kwargs)
e811c8ce
RD
11188
11189 def GetOtherEdge(*args, **kwargs):
a95a7133 11190 """GetOtherEdge(self) -> int"""
54f9ee45 11191 return _core_.IndividualLayoutConstraint_GetOtherEdge(*args, **kwargs)
e811c8ce
RD
11192
11193 def GetDone(*args, **kwargs):
a95a7133 11194 """GetDone(self) -> bool"""
54f9ee45 11195 return _core_.IndividualLayoutConstraint_GetDone(*args, **kwargs)
e811c8ce
RD
11196
11197 def SetDone(*args, **kwargs):
a95a7133 11198 """SetDone(self, bool d)"""
54f9ee45 11199 return _core_.IndividualLayoutConstraint_SetDone(*args, **kwargs)
e811c8ce
RD
11200
11201 def GetRelationship(*args, **kwargs):
a95a7133 11202 """GetRelationship(self) -> int"""
54f9ee45 11203 return _core_.IndividualLayoutConstraint_GetRelationship(*args, **kwargs)
e811c8ce
RD
11204
11205 def SetRelationship(*args, **kwargs):
a95a7133 11206 """SetRelationship(self, int r)"""
54f9ee45 11207 return _core_.IndividualLayoutConstraint_SetRelationship(*args, **kwargs)
e811c8ce
RD
11208
11209 def ResetIfWin(*args, **kwargs):
15afbcd0 11210 """
a95a7133 11211 ResetIfWin(self, Window otherW) -> bool
15afbcd0
RD
11212
11213 Reset constraint if it mentions otherWin
11214 """
54f9ee45 11215 return _core_.IndividualLayoutConstraint_ResetIfWin(*args, **kwargs)
e811c8ce
RD
11216
11217 def SatisfyConstraint(*args, **kwargs):
15afbcd0 11218 """
a95a7133 11219 SatisfyConstraint(self, LayoutConstraints constraints, Window win) -> bool
15afbcd0
RD
11220
11221 Try to satisfy constraint
11222 """
54f9ee45 11223 return _core_.IndividualLayoutConstraint_SatisfyConstraint(*args, **kwargs)
e811c8ce
RD
11224
11225 def GetEdge(*args, **kwargs):
15afbcd0 11226 """
a95a7133 11227 GetEdge(self, int which, Window thisWin, Window other) -> int
15afbcd0
RD
11228
11229 Get the value of this edge or dimension, or if this
11230 is not determinable, -1.
11231 """
54f9ee45 11232 return _core_.IndividualLayoutConstraint_GetEdge(*args, **kwargs)
e811c8ce 11233
d14a1e28
RD
11234
11235class IndividualLayoutConstraintPtr(IndividualLayoutConstraint):
11236 def __init__(self, this):
11237 self.this = this
11238 if not hasattr(self,"thisown"): self.thisown = 0
11239 self.__class__ = IndividualLayoutConstraint
54f9ee45 11240_core_.IndividualLayoutConstraint_swigregister(IndividualLayoutConstraintPtr)
d14a1e28
RD
11241
11242class LayoutConstraints(Object):
15afbcd0 11243 """
41e2b43e
RD
11244 **Note:** constraints are now deprecated and you should use sizers
11245 instead.
15afbcd0 11246
41e2b43e
RD
11247 Objects of this class can be associated with a window to define its
11248 layout constraints, with respect to siblings or its parent.
15afbcd0
RD
11249
11250 The class consists of the following eight constraints of class
11251 wx.IndividualLayoutConstraint, some or all of which should be accessed
11252 directly to set the appropriate constraints.
11253
11254 * left: represents the left hand edge of the window
11255 * right: represents the right hand edge of the window
11256 * top: represents the top edge of the window
11257 * bottom: represents the bottom edge of the window
11258 * width: represents the width of the window
11259 * height: represents the height of the window
11260 * centreX: represents the horizontal centre point of the window
11261 * centreY: represents the vertical centre point of the window
11262
41e2b43e
RD
11263 Most constraints are initially set to have the relationship
11264 wxUnconstrained, which means that their values should be calculated by
11265 looking at known constraints. The exceptions are width and height,
11266 which are set to wxAsIs to ensure that if the user does not specify a
11267 constraint, the existing width and height will be used, to be
11268 compatible with panel items which often have take a default size. If
11269 the constraint is ``wx.AsIs``, the dimension will not be changed.
11270
11271 :see: `wx.IndividualLayoutConstraint`, `wx.Window.SetConstraints`
15afbcd0
RD
11272
11273 """
e811c8ce
RD
11274 def __repr__(self):
11275 return "<%s.%s; proxy of C++ wxLayoutConstraints instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
54f9ee45
RD
11276 left = property(_core_.LayoutConstraints_left_get)
11277 top = property(_core_.LayoutConstraints_top_get)
11278 right = property(_core_.LayoutConstraints_right_get)
11279 bottom = property(_core_.LayoutConstraints_bottom_get)
11280 width = property(_core_.LayoutConstraints_width_get)
11281 height = property(_core_.LayoutConstraints_height_get)
11282 centreX = property(_core_.LayoutConstraints_centreX_get)
11283 centreY = property(_core_.LayoutConstraints_centreY_get)
d14a1e28 11284 def __init__(self, *args, **kwargs):
a95a7133 11285 """__init__(self) -> LayoutConstraints"""
54f9ee45 11286 newobj = _core_.new_LayoutConstraints(*args, **kwargs)
d14a1e28
RD
11287 self.this = newobj.this
11288 self.thisown = 1
11289 del newobj.thisown
e811c8ce 11290 def SatisfyConstraints(*args, **kwargs):
6c3b4aae 11291 """SatisfyConstraints(Window win) -> (areSatisfied, noChanges)"""
54f9ee45 11292 return _core_.LayoutConstraints_SatisfyConstraints(*args, **kwargs)
e811c8ce
RD
11293
11294 def AreSatisfied(*args, **kwargs):
a95a7133 11295 """AreSatisfied(self) -> bool"""
54f9ee45 11296 return _core_.LayoutConstraints_AreSatisfied(*args, **kwargs)
e811c8ce 11297
d14a1e28
RD
11298
11299class LayoutConstraintsPtr(LayoutConstraints):
11300 def __init__(self, this):
11301 self.this = this
11302 if not hasattr(self,"thisown"): self.thisown = 0
11303 self.__class__ = LayoutConstraints
54f9ee45 11304_core_.LayoutConstraints_swigregister(LayoutConstraintsPtr)
d14a1e28
RD
11305
11306#----------------------------------------------------------------------------
11307
322913ce 11308# Use Python's bool constants if available, make some if not
d14a1e28
RD
11309try:
11310 True
11311except NameError:
322913ce
RD
11312 __builtins__.True = 1==1
11313 __builtins__.False = 1==0
4f89f6a3
RD
11314 def bool(value): return not not value
11315 __builtins__.bool = bool
d14a1e28 11316
d14a1e28
RD
11317
11318
11319# workarounds for bad wxRTTI names
11320__wxPyPtrTypeMap['wxGauge95'] = 'wxGauge'
11321__wxPyPtrTypeMap['wxSlider95'] = 'wxSlider'
11322__wxPyPtrTypeMap['wxStatusBar95'] = 'wxStatusBar'
11323
11324
11325#----------------------------------------------------------------------------
11326# Load version numbers from __version__... Ensure that major and minor
7bc1e663 11327# versions are the same for both wxPython and wxWidgets.
d14a1e28
RD
11328
11329from __version__ import *
11330__version__ = VERSION_STRING
11331
7bc1e663
RD
11332assert MAJOR_VERSION == _core_.MAJOR_VERSION, "wxPython/wxWidgets version mismatch"
11333assert MINOR_VERSION == _core_.MINOR_VERSION, "wxPython/wxWidgets version mismatch"
54f9ee45 11334if RELEASE_VERSION != _core_.RELEASE_VERSION:
d14a1e28 11335 import warnings
7bc1e663 11336 warnings.warn("wxPython/wxWidgets release number mismatch")
d14a1e28
RD
11337
11338#----------------------------------------------------------------------------
11339
70b7a5fe
RD
11340# Set wxPython's default string<-->unicode conversion encoding from
11341# the locale, but only if Python's default hasn't been changed. (We
11342# assume that if the user has customized it already then that is the
11343# encoding we need to use as well.)
11344#
11345# The encoding selected here is used when string or unicode objects
11346# need to be converted in order to pass them to wxWidgets. Please be
11347# aware that the default encoding within the same locale may be
11348# slightly different on different platforms. For example, please see
e505d15e
RD
11349# http://www.alanwood.net/demos/charsetdiffs.html for differences
11350# between the common latin/roman encodings.
396fb509
RD
11351
11352default = _sys.getdefaultencoding()
11353if default == 'ascii':
11354 import locale
11355 import codecs
11356 try:
11357 default = locale.getdefaultlocale()[1]
11358 codecs.lookup(default)
70b7a5fe 11359 except (ValueError, LookupError, TypeError):
396fb509
RD
11360 default = _sys.getdefaultencoding()
11361 del locale
11362 del codecs
5cbf236d
RD
11363if default:
11364 wx.SetDefaultPyEncoding(default)
11365del default
5cbf236d
RD
11366
11367#----------------------------------------------------------------------------
11368
d14a1e28
RD
11369class PyDeadObjectError(AttributeError):
11370 pass
11371
d14a1e28
RD
11372class _wxPyDeadObject(object):
11373 """
11374 Instances of wx objects that are OOR capable will have their __class__
11375 changed to this class when the C++ object is deleted. This should help
11376 prevent crashes due to referencing a bogus C++ pointer.
11377 """
11378 reprStr = "wxPython wrapper for DELETED %s object! (The C++ object no longer exists.)"
11379 attrStr = "The C++ part of the %s object has been deleted, attribute access no longer allowed."
11380
3a04f143 11381 def __repr__(self):
d14a1e28
RD
11382 if not hasattr(self, "_name"):
11383 self._name = "[unknown]"
11384 return self.reprStr % self._name
11385
3a04f143 11386 def __getattr__(self, *args):
d14a1e28
RD
11387 if not hasattr(self, "_name"):
11388 self._name = "[unknown]"
3a04f143
RD
11389 raise PyDeadObjectError(self.attrStr % self._name)
11390
11391 def __nonzero__(self):
11392 return 0
11393
11394
11395
11396class PyUnbornObjectError(AttributeError):
11397 pass
11398
11399class _wxPyUnbornObject(object):
11400 """
54f9ee45 11401 Some stock objects are created when the wx._core module is
3a04f143
RD
11402 imported, but their C++ instance is not created until the wx.App
11403 object is created and initialized. These object instances will
11404 temporarily have their __class__ changed to this class so an
11405 exception will be raised if they are used before the C++ instance
11406 is ready.
11407 """
11408
11409 reprStr = "wxPython wrapper for UNBORN object! (The C++ object is not initialized yet.)"
11410 attrStr = "The C++ part of this object has not been initialized, attribute access not allowed."
11411
11412 def __repr__(self):
11413 #if not hasattr(self, "_name"):
11414 # self._name = "[unknown]"
11415 return self.reprStr #% self._name
11416
11417 def __getattr__(self, *args):
11418 #if not hasattr(self, "_name"):
11419 # self._name = "[unknown]"
11420 raise PyUnbornObjectError(self.attrStr) # % self._name )
d14a1e28
RD
11421
11422 def __nonzero__(self):
11423 return 0
11424
11425
11426#----------------------------------------------------------------------------
d14a1e28
RD
11427
11428def CallAfter(callable, *args, **kw):
11429 """
11430 Call the specified function after the current and pending event
11431 handlers have been completed. This is also good for making GUI
61863841
RD
11432 method calls from non-GUI threads. Any extra positional or
11433 keyword args are passed on to the callable when it is called.
11434
11435 :see: `wx.FutureCall`
d14a1e28
RD
11436 """
11437 app = wx.GetApp()
dfbb5885 11438 assert app is not None, 'No wx.App created yet'
d14a1e28 11439
148275d3
RD
11440 if not hasattr(app, "_CallAfterId"):
11441 app._CallAfterId = wx.NewEventType()
11442 app.Connect(-1, -1, app._CallAfterId,
11443 lambda event: event.callable(*event.args, **event.kw) )
d14a1e28 11444 evt = wx.PyEvent()
148275d3 11445 evt.SetEventType(app._CallAfterId)
d14a1e28
RD
11446 evt.callable = callable
11447 evt.args = args
11448 evt.kw = kw
11449 wx.PostEvent(app, evt)
11450
d14a1e28
RD
11451#----------------------------------------------------------------------------
11452
11453
11454class FutureCall:
11455 """
8ac8dba0 11456 A convenience class for `wx.Timer`, that calls the given callable
d14a1e28
RD
11457 object once after the given amount of milliseconds, passing any
11458 positional or keyword args. The return value of the callable is
61863841 11459 availbale after it has been run with the `GetResult` method.
d14a1e28
RD
11460
11461 If you don't need to get the return value or restart the timer
11462 then there is no need to hold a reference to this object. It will
11463 hold a reference to itself while the timer is running (the timer
11464 has a reference to self.Notify) but the cycle will be broken when
11465 the timer completes, automatically cleaning up the wx.FutureCall
11466 object.
61863841
RD
11467
11468 :see: `wx.CallAfter`
d14a1e28
RD
11469 """
11470 def __init__(self, millis, callable, *args, **kwargs):
11471 self.millis = millis
11472 self.callable = callable
11473 self.SetArgs(*args, **kwargs)
11474 self.runCount = 0
4276dc52 11475 self.running = False
d14a1e28
RD
11476 self.hasRun = False
11477 self.result = None
11478 self.timer = None
11479 self.Start()
11480
11481 def __del__(self):
11482 self.Stop()
11483
11484
11485 def Start(self, millis=None, *args, **kwargs):
11486 """
11487 (Re)start the timer
11488 """
11489 self.hasRun = False
11490 if millis is not None:
11491 self.millis = millis
11492 if args or kwargs:
11493 self.SetArgs(*args, **kwargs)
11494 self.Stop()
11495 self.timer = wx.PyTimer(self.Notify)
11496 self.timer.Start(self.millis, wx.TIMER_ONE_SHOT)
4276dc52 11497 self.running = True
d14a1e28
RD
11498 Restart = Start
11499
11500
11501 def Stop(self):
11502 """
11503 Stop and destroy the timer.
11504 """
11505 if self.timer is not None:
11506 self.timer.Stop()
11507 self.timer = None
11508
11509
11510 def GetInterval(self):
11511 if self.timer is not None:
11512 return self.timer.GetInterval()
11513 else:
11514 return 0
11515
11516
11517 def IsRunning(self):
11518 return self.timer is not None and self.timer.IsRunning()
11519
11520
11521 def SetArgs(self, *args, **kwargs):
11522 """
11523 (Re)set the args passed to the callable object. This is
11524 useful in conjunction with Restart if you want to schedule a
11525 new call to the same callable object but with different
11526 parameters.
11527 """
11528 self.args = args
11529 self.kwargs = kwargs
11530
11531
11532 def HasRun(self):
11533 return self.hasRun
11534
11535 def GetResult(self):
11536 return self.result
11537
11538 def Notify(self):
11539 """
11540 The timer has expired so call the callable.
11541 """
11542 if self.callable and getattr(self.callable, 'im_self', True):
11543 self.runCount += 1
4276dc52 11544 self.running = False
d14a1e28
RD
11545 self.result = self.callable(*self.args, **self.kwargs)
11546 self.hasRun = True
4276dc52
RD
11547 if not self.running:
11548 # if it wasn't restarted, then cleanup
11549 wx.CallAfter(self.Stop)
d14a1e28
RD
11550
11551
a95a7133
RD
11552
11553#----------------------------------------------------------------------------
11554# Control which items in this module should be documented by epydoc.
11555# We allow only classes and functions, which will help reduce the size
11556# of the docs by filtering out the zillions of constants, EVT objects,
11557# and etc that don't make much sense by themselves, but are instead
11558# documented (or will be) as part of the classes/functions/methods
11559# where they should be used.
11560
66c033b4
RD
11561class __DocFilter:
11562 """
11563 A filter for epydoc that only allows non-Ptr classes and
11564 fucntions, in order to reduce the clutter in the API docs.
11565 """
11566 def __init__(self, globals):
11567 self._globals = globals
11568
11569 def __call__(self, name):
11570 import types
11571 obj = self._globals.get(name, None)
11572 if type(obj) not in [type, types.ClassType, types.FunctionType, types.BuiltinFunctionType]:
11573 return False
11574 if name.startswith('_') or name.endswith('Ptr') or name.startswith('EVT'):
11575 return False
11576 return True
a95a7133 11577
d14a1e28
RD
11578#----------------------------------------------------------------------------
11579#----------------------------------------------------------------------------
11580
11581# Import other modules in this package that should show up in the
11582# "core" wx namespace
54f9ee45
RD
11583from _gdi import *
11584from _windows import *
11585from _controls import *
11586from _misc import *
d14a1e28 11587
3a04f143
RD
11588
11589# Fixup the stock objects since they can't be used yet. (They will be
11590# restored in wx.PyApp.OnInit.)
54f9ee45 11591_core_._wxPyFixStockObjects()
3a04f143 11592
d14a1e28
RD
11593#----------------------------------------------------------------------------
11594#----------------------------------------------------------------------------
11595
11596