]> git.saurik.com Git - wxWidgets.git/blame - wxPython/src/gtk/_core.py
misc
[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
88TAB_TRAVERSAL = _core_.TAB_TRAVERSAL
89WANTS_CHARS = _core_.WANTS_CHARS
90POPUP_WINDOW = _core_.POPUP_WINDOW
91CENTER_FRAME = _core_.CENTER_FRAME
92CENTRE_ON_SCREEN = _core_.CENTRE_ON_SCREEN
93CENTER_ON_SCREEN = _core_.CENTER_ON_SCREEN
94ED_CLIENT_MARGIN = _core_.ED_CLIENT_MARGIN
95ED_BUTTONS_BOTTOM = _core_.ED_BUTTONS_BOTTOM
96ED_BUTTONS_RIGHT = _core_.ED_BUTTONS_RIGHT
97ED_STATIC_LINE = _core_.ED_STATIC_LINE
98EXT_DIALOG_STYLE = _core_.EXT_DIALOG_STYLE
99CLIP_CHILDREN = _core_.CLIP_CHILDREN
100CLIP_SIBLINGS = _core_.CLIP_SIBLINGS
101ALWAYS_SHOW_SB = _core_.ALWAYS_SHOW_SB
102RETAINED = _core_.RETAINED
103BACKINGSTORE = _core_.BACKINGSTORE
104COLOURED = _core_.COLOURED
105FIXED_LENGTH = _core_.FIXED_LENGTH
106LB_NEEDED_SB = _core_.LB_NEEDED_SB
107LB_ALWAYS_SB = _core_.LB_ALWAYS_SB
108LB_SORT = _core_.LB_SORT
109LB_SINGLE = _core_.LB_SINGLE
110LB_MULTIPLE = _core_.LB_MULTIPLE
111LB_EXTENDED = _core_.LB_EXTENDED
112LB_OWNERDRAW = _core_.LB_OWNERDRAW
113LB_HSCROLL = _core_.LB_HSCROLL
114PROCESS_ENTER = _core_.PROCESS_ENTER
115PASSWORD = _core_.PASSWORD
116CB_SIMPLE = _core_.CB_SIMPLE
117CB_DROPDOWN = _core_.CB_DROPDOWN
118CB_SORT = _core_.CB_SORT
119CB_READONLY = _core_.CB_READONLY
120RA_HORIZONTAL = _core_.RA_HORIZONTAL
121RA_VERTICAL = _core_.RA_VERTICAL
122RA_SPECIFY_ROWS = _core_.RA_SPECIFY_ROWS
123RA_SPECIFY_COLS = _core_.RA_SPECIFY_COLS
124RB_GROUP = _core_.RB_GROUP
125RB_SINGLE = _core_.RB_SINGLE
54f9ee45
RD
126SB_HORIZONTAL = _core_.SB_HORIZONTAL
127SB_VERTICAL = _core_.SB_VERTICAL
128ST_SIZEGRIP = _core_.ST_SIZEGRIP
129ST_NO_AUTORESIZE = _core_.ST_NO_AUTORESIZE
130FLOOD_SURFACE = _core_.FLOOD_SURFACE
131FLOOD_BORDER = _core_.FLOOD_BORDER
132ODDEVEN_RULE = _core_.ODDEVEN_RULE
133WINDING_RULE = _core_.WINDING_RULE
134TOOL_TOP = _core_.TOOL_TOP
135TOOL_BOTTOM = _core_.TOOL_BOTTOM
136TOOL_LEFT = _core_.TOOL_LEFT
137TOOL_RIGHT = _core_.TOOL_RIGHT
138OK = _core_.OK
139YES_NO = _core_.YES_NO
140CANCEL = _core_.CANCEL
141YES = _core_.YES
142NO = _core_.NO
143NO_DEFAULT = _core_.NO_DEFAULT
144YES_DEFAULT = _core_.YES_DEFAULT
145ICON_EXCLAMATION = _core_.ICON_EXCLAMATION
146ICON_HAND = _core_.ICON_HAND
147ICON_QUESTION = _core_.ICON_QUESTION
148ICON_INFORMATION = _core_.ICON_INFORMATION
149ICON_STOP = _core_.ICON_STOP
150ICON_ASTERISK = _core_.ICON_ASTERISK
151ICON_MASK = _core_.ICON_MASK
152ICON_WARNING = _core_.ICON_WARNING
153ICON_ERROR = _core_.ICON_ERROR
154FORWARD = _core_.FORWARD
155BACKWARD = _core_.BACKWARD
156RESET = _core_.RESET
157HELP = _core_.HELP
158MORE = _core_.MORE
159SETUP = _core_.SETUP
160SIZE_AUTO_WIDTH = _core_.SIZE_AUTO_WIDTH
161SIZE_AUTO_HEIGHT = _core_.SIZE_AUTO_HEIGHT
162SIZE_AUTO = _core_.SIZE_AUTO
163SIZE_USE_EXISTING = _core_.SIZE_USE_EXISTING
164SIZE_ALLOW_MINUS_ONE = _core_.SIZE_ALLOW_MINUS_ONE
165PORTRAIT = _core_.PORTRAIT
166LANDSCAPE = _core_.LANDSCAPE
167PRINT_QUALITY_HIGH = _core_.PRINT_QUALITY_HIGH
168PRINT_QUALITY_MEDIUM = _core_.PRINT_QUALITY_MEDIUM
169PRINT_QUALITY_LOW = _core_.PRINT_QUALITY_LOW
170PRINT_QUALITY_DRAFT = _core_.PRINT_QUALITY_DRAFT
171ID_ANY = _core_.ID_ANY
172ID_SEPARATOR = _core_.ID_SEPARATOR
173ID_LOWEST = _core_.ID_LOWEST
174ID_OPEN = _core_.ID_OPEN
175ID_CLOSE = _core_.ID_CLOSE
176ID_NEW = _core_.ID_NEW
177ID_SAVE = _core_.ID_SAVE
178ID_SAVEAS = _core_.ID_SAVEAS
179ID_REVERT = _core_.ID_REVERT
180ID_EXIT = _core_.ID_EXIT
181ID_UNDO = _core_.ID_UNDO
182ID_REDO = _core_.ID_REDO
183ID_HELP = _core_.ID_HELP
184ID_PRINT = _core_.ID_PRINT
185ID_PRINT_SETUP = _core_.ID_PRINT_SETUP
186ID_PREVIEW = _core_.ID_PREVIEW
187ID_ABOUT = _core_.ID_ABOUT
188ID_HELP_CONTENTS = _core_.ID_HELP_CONTENTS
189ID_HELP_COMMANDS = _core_.ID_HELP_COMMANDS
190ID_HELP_PROCEDURES = _core_.ID_HELP_PROCEDURES
191ID_HELP_CONTEXT = _core_.ID_HELP_CONTEXT
192ID_CLOSE_ALL = _core_.ID_CLOSE_ALL
193ID_PREFERENCES = _core_.ID_PREFERENCES
194ID_CUT = _core_.ID_CUT
195ID_COPY = _core_.ID_COPY
196ID_PASTE = _core_.ID_PASTE
197ID_CLEAR = _core_.ID_CLEAR
198ID_FIND = _core_.ID_FIND
199ID_DUPLICATE = _core_.ID_DUPLICATE
200ID_SELECTALL = _core_.ID_SELECTALL
201ID_DELETE = _core_.ID_DELETE
202ID_REPLACE = _core_.ID_REPLACE
203ID_REPLACE_ALL = _core_.ID_REPLACE_ALL
204ID_PROPERTIES = _core_.ID_PROPERTIES
205ID_VIEW_DETAILS = _core_.ID_VIEW_DETAILS
206ID_VIEW_LARGEICONS = _core_.ID_VIEW_LARGEICONS
207ID_VIEW_SMALLICONS = _core_.ID_VIEW_SMALLICONS
208ID_VIEW_LIST = _core_.ID_VIEW_LIST
209ID_VIEW_SORTDATE = _core_.ID_VIEW_SORTDATE
210ID_VIEW_SORTNAME = _core_.ID_VIEW_SORTNAME
211ID_VIEW_SORTSIZE = _core_.ID_VIEW_SORTSIZE
212ID_VIEW_SORTTYPE = _core_.ID_VIEW_SORTTYPE
213ID_FILE1 = _core_.ID_FILE1
214ID_FILE2 = _core_.ID_FILE2
215ID_FILE3 = _core_.ID_FILE3
216ID_FILE4 = _core_.ID_FILE4
217ID_FILE5 = _core_.ID_FILE5
218ID_FILE6 = _core_.ID_FILE6
219ID_FILE7 = _core_.ID_FILE7
220ID_FILE8 = _core_.ID_FILE8
221ID_FILE9 = _core_.ID_FILE9
222ID_OK = _core_.ID_OK
223ID_CANCEL = _core_.ID_CANCEL
224ID_APPLY = _core_.ID_APPLY
225ID_YES = _core_.ID_YES
226ID_NO = _core_.ID_NO
227ID_STATIC = _core_.ID_STATIC
228ID_FORWARD = _core_.ID_FORWARD
229ID_BACKWARD = _core_.ID_BACKWARD
230ID_DEFAULT = _core_.ID_DEFAULT
231ID_MORE = _core_.ID_MORE
232ID_SETUP = _core_.ID_SETUP
233ID_RESET = _core_.ID_RESET
234ID_CONTEXT_HELP = _core_.ID_CONTEXT_HELP
235ID_YESTOALL = _core_.ID_YESTOALL
236ID_NOTOALL = _core_.ID_NOTOALL
237ID_ABORT = _core_.ID_ABORT
238ID_RETRY = _core_.ID_RETRY
239ID_IGNORE = _core_.ID_IGNORE
7bc1e663
RD
240ID_ADD = _core_.ID_ADD
241ID_REMOVE = _core_.ID_REMOVE
242ID_UP = _core_.ID_UP
243ID_DOWN = _core_.ID_DOWN
244ID_HOME = _core_.ID_HOME
245ID_REFRESH = _core_.ID_REFRESH
246ID_STOP = _core_.ID_STOP
247ID_INDEX = _core_.ID_INDEX
248ID_BOLD = _core_.ID_BOLD
249ID_ITALIC = _core_.ID_ITALIC
250ID_JUSTIFY_CENTER = _core_.ID_JUSTIFY_CENTER
251ID_JUSTIFY_FILL = _core_.ID_JUSTIFY_FILL
252ID_JUSTIFY_RIGHT = _core_.ID_JUSTIFY_RIGHT
253ID_JUSTIFY_LEFT = _core_.ID_JUSTIFY_LEFT
254ID_UNDERLINE = _core_.ID_UNDERLINE
255ID_INDENT = _core_.ID_INDENT
256ID_UNINDENT = _core_.ID_UNINDENT
257ID_ZOOM_100 = _core_.ID_ZOOM_100
258ID_ZOOM_FIT = _core_.ID_ZOOM_FIT
259ID_ZOOM_IN = _core_.ID_ZOOM_IN
260ID_ZOOM_OUT = _core_.ID_ZOOM_OUT
261ID_UNDELETE = _core_.ID_UNDELETE
262ID_REVERT_TO_SAVED = _core_.ID_REVERT_TO_SAVED
54f9ee45
RD
263ID_HIGHEST = _core_.ID_HIGHEST
264OPEN = _core_.OPEN
265SAVE = _core_.SAVE
266HIDE_READONLY = _core_.HIDE_READONLY
267OVERWRITE_PROMPT = _core_.OVERWRITE_PROMPT
268FILE_MUST_EXIST = _core_.FILE_MUST_EXIST
269MULTIPLE = _core_.MULTIPLE
270CHANGE_DIR = _core_.CHANGE_DIR
271ACCEL_ALT = _core_.ACCEL_ALT
272ACCEL_CTRL = _core_.ACCEL_CTRL
273ACCEL_SHIFT = _core_.ACCEL_SHIFT
274ACCEL_NORMAL = _core_.ACCEL_NORMAL
275PD_AUTO_HIDE = _core_.PD_AUTO_HIDE
276PD_APP_MODAL = _core_.PD_APP_MODAL
277PD_CAN_ABORT = _core_.PD_CAN_ABORT
278PD_ELAPSED_TIME = _core_.PD_ELAPSED_TIME
279PD_ESTIMATED_TIME = _core_.PD_ESTIMATED_TIME
280PD_REMAINING_TIME = _core_.PD_REMAINING_TIME
e505d15e
RD
281PD_SMOOTH = _core_.PD_SMOOTH
282PD_CAN_SKIP = _core_.PD_CAN_SKIP
54f9ee45
RD
283DD_NEW_DIR_BUTTON = _core_.DD_NEW_DIR_BUTTON
284DD_DEFAULT_STYLE = _core_.DD_DEFAULT_STYLE
285MENU_TEAROFF = _core_.MENU_TEAROFF
286MB_DOCKABLE = _core_.MB_DOCKABLE
287NO_FULL_REPAINT_ON_RESIZE = _core_.NO_FULL_REPAINT_ON_RESIZE
288FULL_REPAINT_ON_RESIZE = _core_.FULL_REPAINT_ON_RESIZE
289LI_HORIZONTAL = _core_.LI_HORIZONTAL
290LI_VERTICAL = _core_.LI_VERTICAL
291WS_EX_VALIDATE_RECURSIVELY = _core_.WS_EX_VALIDATE_RECURSIVELY
292WS_EX_BLOCK_EVENTS = _core_.WS_EX_BLOCK_EVENTS
293WS_EX_TRANSIENT = _core_.WS_EX_TRANSIENT
294WS_EX_THEMED_BACKGROUND = _core_.WS_EX_THEMED_BACKGROUND
295WS_EX_PROCESS_IDLE = _core_.WS_EX_PROCESS_IDLE
296WS_EX_PROCESS_UI_UPDATES = _core_.WS_EX_PROCESS_UI_UPDATES
297MM_TEXT = _core_.MM_TEXT
298MM_LOMETRIC = _core_.MM_LOMETRIC
299MM_HIMETRIC = _core_.MM_HIMETRIC
300MM_LOENGLISH = _core_.MM_LOENGLISH
301MM_HIENGLISH = _core_.MM_HIENGLISH
302MM_TWIPS = _core_.MM_TWIPS
303MM_ISOTROPIC = _core_.MM_ISOTROPIC
304MM_ANISOTROPIC = _core_.MM_ANISOTROPIC
305MM_POINTS = _core_.MM_POINTS
306MM_METRIC = _core_.MM_METRIC
307CENTRE = _core_.CENTRE
308CENTER = _core_.CENTER
309HORIZONTAL = _core_.HORIZONTAL
310VERTICAL = _core_.VERTICAL
311BOTH = _core_.BOTH
312LEFT = _core_.LEFT
313RIGHT = _core_.RIGHT
314UP = _core_.UP
315DOWN = _core_.DOWN
316TOP = _core_.TOP
317BOTTOM = _core_.BOTTOM
318NORTH = _core_.NORTH
319SOUTH = _core_.SOUTH
320WEST = _core_.WEST
321EAST = _core_.EAST
322ALL = _core_.ALL
323ALIGN_NOT = _core_.ALIGN_NOT
324ALIGN_CENTER_HORIZONTAL = _core_.ALIGN_CENTER_HORIZONTAL
325ALIGN_CENTRE_HORIZONTAL = _core_.ALIGN_CENTRE_HORIZONTAL
326ALIGN_LEFT = _core_.ALIGN_LEFT
327ALIGN_TOP = _core_.ALIGN_TOP
328ALIGN_RIGHT = _core_.ALIGN_RIGHT
329ALIGN_BOTTOM = _core_.ALIGN_BOTTOM
330ALIGN_CENTER_VERTICAL = _core_.ALIGN_CENTER_VERTICAL
331ALIGN_CENTRE_VERTICAL = _core_.ALIGN_CENTRE_VERTICAL
332ALIGN_CENTER = _core_.ALIGN_CENTER
333ALIGN_CENTRE = _core_.ALIGN_CENTRE
334ALIGN_MASK = _core_.ALIGN_MASK
335STRETCH_NOT = _core_.STRETCH_NOT
336SHRINK = _core_.SHRINK
337GROW = _core_.GROW
338EXPAND = _core_.EXPAND
339SHAPED = _core_.SHAPED
340FIXED_MINSIZE = _core_.FIXED_MINSIZE
341TILE = _core_.TILE
342ADJUST_MINSIZE = _core_.ADJUST_MINSIZE
343BORDER_DEFAULT = _core_.BORDER_DEFAULT
344BORDER_NONE = _core_.BORDER_NONE
345BORDER_STATIC = _core_.BORDER_STATIC
346BORDER_SIMPLE = _core_.BORDER_SIMPLE
347BORDER_RAISED = _core_.BORDER_RAISED
348BORDER_SUNKEN = _core_.BORDER_SUNKEN
349BORDER_DOUBLE = _core_.BORDER_DOUBLE
350BORDER_MASK = _core_.BORDER_MASK
7bc1e663
RD
351BG_STYLE_SYSTEM = _core_.BG_STYLE_SYSTEM
352BG_STYLE_COLOUR = _core_.BG_STYLE_COLOUR
353BG_STYLE_CUSTOM = _core_.BG_STYLE_CUSTOM
54f9ee45
RD
354DEFAULT = _core_.DEFAULT
355DECORATIVE = _core_.DECORATIVE
356ROMAN = _core_.ROMAN
357SCRIPT = _core_.SCRIPT
358SWISS = _core_.SWISS
359MODERN = _core_.MODERN
360TELETYPE = _core_.TELETYPE
361VARIABLE = _core_.VARIABLE
362FIXED = _core_.FIXED
363NORMAL = _core_.NORMAL
364LIGHT = _core_.LIGHT
365BOLD = _core_.BOLD
366ITALIC = _core_.ITALIC
367SLANT = _core_.SLANT
368SOLID = _core_.SOLID
369DOT = _core_.DOT
370LONG_DASH = _core_.LONG_DASH
371SHORT_DASH = _core_.SHORT_DASH
372DOT_DASH = _core_.DOT_DASH
373USER_DASH = _core_.USER_DASH
374TRANSPARENT = _core_.TRANSPARENT
375STIPPLE = _core_.STIPPLE
376BDIAGONAL_HATCH = _core_.BDIAGONAL_HATCH
377CROSSDIAG_HATCH = _core_.CROSSDIAG_HATCH
378FDIAGONAL_HATCH = _core_.FDIAGONAL_HATCH
379CROSS_HATCH = _core_.CROSS_HATCH
380HORIZONTAL_HATCH = _core_.HORIZONTAL_HATCH
381VERTICAL_HATCH = _core_.VERTICAL_HATCH
382JOIN_BEVEL = _core_.JOIN_BEVEL
383JOIN_MITER = _core_.JOIN_MITER
384JOIN_ROUND = _core_.JOIN_ROUND
385CAP_ROUND = _core_.CAP_ROUND
386CAP_PROJECTING = _core_.CAP_PROJECTING
387CAP_BUTT = _core_.CAP_BUTT
388CLEAR = _core_.CLEAR
389XOR = _core_.XOR
390INVERT = _core_.INVERT
391OR_REVERSE = _core_.OR_REVERSE
392AND_REVERSE = _core_.AND_REVERSE
393COPY = _core_.COPY
394AND = _core_.AND
395AND_INVERT = _core_.AND_INVERT
396NO_OP = _core_.NO_OP
397NOR = _core_.NOR
398EQUIV = _core_.EQUIV
399SRC_INVERT = _core_.SRC_INVERT
400OR_INVERT = _core_.OR_INVERT
401NAND = _core_.NAND
402OR = _core_.OR
403SET = _core_.SET
404WXK_BACK = _core_.WXK_BACK
405WXK_TAB = _core_.WXK_TAB
406WXK_RETURN = _core_.WXK_RETURN
407WXK_ESCAPE = _core_.WXK_ESCAPE
408WXK_SPACE = _core_.WXK_SPACE
409WXK_DELETE = _core_.WXK_DELETE
410WXK_START = _core_.WXK_START
411WXK_LBUTTON = _core_.WXK_LBUTTON
412WXK_RBUTTON = _core_.WXK_RBUTTON
413WXK_CANCEL = _core_.WXK_CANCEL
414WXK_MBUTTON = _core_.WXK_MBUTTON
415WXK_CLEAR = _core_.WXK_CLEAR
416WXK_SHIFT = _core_.WXK_SHIFT
417WXK_ALT = _core_.WXK_ALT
418WXK_CONTROL = _core_.WXK_CONTROL
419WXK_MENU = _core_.WXK_MENU
420WXK_PAUSE = _core_.WXK_PAUSE
421WXK_CAPITAL = _core_.WXK_CAPITAL
422WXK_PRIOR = _core_.WXK_PRIOR
423WXK_NEXT = _core_.WXK_NEXT
424WXK_END = _core_.WXK_END
425WXK_HOME = _core_.WXK_HOME
426WXK_LEFT = _core_.WXK_LEFT
427WXK_UP = _core_.WXK_UP
428WXK_RIGHT = _core_.WXK_RIGHT
429WXK_DOWN = _core_.WXK_DOWN
430WXK_SELECT = _core_.WXK_SELECT
431WXK_PRINT = _core_.WXK_PRINT
432WXK_EXECUTE = _core_.WXK_EXECUTE
433WXK_SNAPSHOT = _core_.WXK_SNAPSHOT
434WXK_INSERT = _core_.WXK_INSERT
435WXK_HELP = _core_.WXK_HELP
436WXK_NUMPAD0 = _core_.WXK_NUMPAD0
437WXK_NUMPAD1 = _core_.WXK_NUMPAD1
438WXK_NUMPAD2 = _core_.WXK_NUMPAD2
439WXK_NUMPAD3 = _core_.WXK_NUMPAD3
440WXK_NUMPAD4 = _core_.WXK_NUMPAD4
441WXK_NUMPAD5 = _core_.WXK_NUMPAD5
442WXK_NUMPAD6 = _core_.WXK_NUMPAD6
443WXK_NUMPAD7 = _core_.WXK_NUMPAD7
444WXK_NUMPAD8 = _core_.WXK_NUMPAD8
445WXK_NUMPAD9 = _core_.WXK_NUMPAD9
446WXK_MULTIPLY = _core_.WXK_MULTIPLY
447WXK_ADD = _core_.WXK_ADD
448WXK_SEPARATOR = _core_.WXK_SEPARATOR
449WXK_SUBTRACT = _core_.WXK_SUBTRACT
450WXK_DECIMAL = _core_.WXK_DECIMAL
451WXK_DIVIDE = _core_.WXK_DIVIDE
452WXK_F1 = _core_.WXK_F1
453WXK_F2 = _core_.WXK_F2
454WXK_F3 = _core_.WXK_F3
455WXK_F4 = _core_.WXK_F4
456WXK_F5 = _core_.WXK_F5
457WXK_F6 = _core_.WXK_F6
458WXK_F7 = _core_.WXK_F7
459WXK_F8 = _core_.WXK_F8
460WXK_F9 = _core_.WXK_F9
461WXK_F10 = _core_.WXK_F10
462WXK_F11 = _core_.WXK_F11
463WXK_F12 = _core_.WXK_F12
464WXK_F13 = _core_.WXK_F13
465WXK_F14 = _core_.WXK_F14
466WXK_F15 = _core_.WXK_F15
467WXK_F16 = _core_.WXK_F16
468WXK_F17 = _core_.WXK_F17
469WXK_F18 = _core_.WXK_F18
470WXK_F19 = _core_.WXK_F19
471WXK_F20 = _core_.WXK_F20
472WXK_F21 = _core_.WXK_F21
473WXK_F22 = _core_.WXK_F22
474WXK_F23 = _core_.WXK_F23
475WXK_F24 = _core_.WXK_F24
476WXK_NUMLOCK = _core_.WXK_NUMLOCK
477WXK_SCROLL = _core_.WXK_SCROLL
478WXK_PAGEUP = _core_.WXK_PAGEUP
479WXK_PAGEDOWN = _core_.WXK_PAGEDOWN
480WXK_NUMPAD_SPACE = _core_.WXK_NUMPAD_SPACE
481WXK_NUMPAD_TAB = _core_.WXK_NUMPAD_TAB
482WXK_NUMPAD_ENTER = _core_.WXK_NUMPAD_ENTER
483WXK_NUMPAD_F1 = _core_.WXK_NUMPAD_F1
484WXK_NUMPAD_F2 = _core_.WXK_NUMPAD_F2
485WXK_NUMPAD_F3 = _core_.WXK_NUMPAD_F3
486WXK_NUMPAD_F4 = _core_.WXK_NUMPAD_F4
487WXK_NUMPAD_HOME = _core_.WXK_NUMPAD_HOME
488WXK_NUMPAD_LEFT = _core_.WXK_NUMPAD_LEFT
489WXK_NUMPAD_UP = _core_.WXK_NUMPAD_UP
490WXK_NUMPAD_RIGHT = _core_.WXK_NUMPAD_RIGHT
491WXK_NUMPAD_DOWN = _core_.WXK_NUMPAD_DOWN
492WXK_NUMPAD_PRIOR = _core_.WXK_NUMPAD_PRIOR
493WXK_NUMPAD_PAGEUP = _core_.WXK_NUMPAD_PAGEUP
494WXK_NUMPAD_NEXT = _core_.WXK_NUMPAD_NEXT
495WXK_NUMPAD_PAGEDOWN = _core_.WXK_NUMPAD_PAGEDOWN
496WXK_NUMPAD_END = _core_.WXK_NUMPAD_END
497WXK_NUMPAD_BEGIN = _core_.WXK_NUMPAD_BEGIN
498WXK_NUMPAD_INSERT = _core_.WXK_NUMPAD_INSERT
499WXK_NUMPAD_DELETE = _core_.WXK_NUMPAD_DELETE
500WXK_NUMPAD_EQUAL = _core_.WXK_NUMPAD_EQUAL
501WXK_NUMPAD_MULTIPLY = _core_.WXK_NUMPAD_MULTIPLY
502WXK_NUMPAD_ADD = _core_.WXK_NUMPAD_ADD
503WXK_NUMPAD_SEPARATOR = _core_.WXK_NUMPAD_SEPARATOR
504WXK_NUMPAD_SUBTRACT = _core_.WXK_NUMPAD_SUBTRACT
505WXK_NUMPAD_DECIMAL = _core_.WXK_NUMPAD_DECIMAL
506WXK_NUMPAD_DIVIDE = _core_.WXK_NUMPAD_DIVIDE
507WXK_WINDOWS_LEFT = _core_.WXK_WINDOWS_LEFT
508WXK_WINDOWS_RIGHT = _core_.WXK_WINDOWS_RIGHT
509WXK_WINDOWS_MENU = _core_.WXK_WINDOWS_MENU
510PAPER_NONE = _core_.PAPER_NONE
511PAPER_LETTER = _core_.PAPER_LETTER
512PAPER_LEGAL = _core_.PAPER_LEGAL
513PAPER_A4 = _core_.PAPER_A4
514PAPER_CSHEET = _core_.PAPER_CSHEET
515PAPER_DSHEET = _core_.PAPER_DSHEET
516PAPER_ESHEET = _core_.PAPER_ESHEET
517PAPER_LETTERSMALL = _core_.PAPER_LETTERSMALL
518PAPER_TABLOID = _core_.PAPER_TABLOID
519PAPER_LEDGER = _core_.PAPER_LEDGER
520PAPER_STATEMENT = _core_.PAPER_STATEMENT
521PAPER_EXECUTIVE = _core_.PAPER_EXECUTIVE
522PAPER_A3 = _core_.PAPER_A3
523PAPER_A4SMALL = _core_.PAPER_A4SMALL
524PAPER_A5 = _core_.PAPER_A5
525PAPER_B4 = _core_.PAPER_B4
526PAPER_B5 = _core_.PAPER_B5
527PAPER_FOLIO = _core_.PAPER_FOLIO
528PAPER_QUARTO = _core_.PAPER_QUARTO
529PAPER_10X14 = _core_.PAPER_10X14
530PAPER_11X17 = _core_.PAPER_11X17
531PAPER_NOTE = _core_.PAPER_NOTE
532PAPER_ENV_9 = _core_.PAPER_ENV_9
533PAPER_ENV_10 = _core_.PAPER_ENV_10
534PAPER_ENV_11 = _core_.PAPER_ENV_11
535PAPER_ENV_12 = _core_.PAPER_ENV_12
536PAPER_ENV_14 = _core_.PAPER_ENV_14
537PAPER_ENV_DL = _core_.PAPER_ENV_DL
538PAPER_ENV_C5 = _core_.PAPER_ENV_C5
539PAPER_ENV_C3 = _core_.PAPER_ENV_C3
540PAPER_ENV_C4 = _core_.PAPER_ENV_C4
541PAPER_ENV_C6 = _core_.PAPER_ENV_C6
542PAPER_ENV_C65 = _core_.PAPER_ENV_C65
543PAPER_ENV_B4 = _core_.PAPER_ENV_B4
544PAPER_ENV_B5 = _core_.PAPER_ENV_B5
545PAPER_ENV_B6 = _core_.PAPER_ENV_B6
546PAPER_ENV_ITALY = _core_.PAPER_ENV_ITALY
547PAPER_ENV_MONARCH = _core_.PAPER_ENV_MONARCH
548PAPER_ENV_PERSONAL = _core_.PAPER_ENV_PERSONAL
549PAPER_FANFOLD_US = _core_.PAPER_FANFOLD_US
550PAPER_FANFOLD_STD_GERMAN = _core_.PAPER_FANFOLD_STD_GERMAN
551PAPER_FANFOLD_LGL_GERMAN = _core_.PAPER_FANFOLD_LGL_GERMAN
552PAPER_ISO_B4 = _core_.PAPER_ISO_B4
553PAPER_JAPANESE_POSTCARD = _core_.PAPER_JAPANESE_POSTCARD
554PAPER_9X11 = _core_.PAPER_9X11
555PAPER_10X11 = _core_.PAPER_10X11
556PAPER_15X11 = _core_.PAPER_15X11
557PAPER_ENV_INVITE = _core_.PAPER_ENV_INVITE
558PAPER_LETTER_EXTRA = _core_.PAPER_LETTER_EXTRA
559PAPER_LEGAL_EXTRA = _core_.PAPER_LEGAL_EXTRA
560PAPER_TABLOID_EXTRA = _core_.PAPER_TABLOID_EXTRA
561PAPER_A4_EXTRA = _core_.PAPER_A4_EXTRA
562PAPER_LETTER_TRANSVERSE = _core_.PAPER_LETTER_TRANSVERSE
563PAPER_A4_TRANSVERSE = _core_.PAPER_A4_TRANSVERSE
564PAPER_LETTER_EXTRA_TRANSVERSE = _core_.PAPER_LETTER_EXTRA_TRANSVERSE
565PAPER_A_PLUS = _core_.PAPER_A_PLUS
566PAPER_B_PLUS = _core_.PAPER_B_PLUS
567PAPER_LETTER_PLUS = _core_.PAPER_LETTER_PLUS
568PAPER_A4_PLUS = _core_.PAPER_A4_PLUS
569PAPER_A5_TRANSVERSE = _core_.PAPER_A5_TRANSVERSE
570PAPER_B5_TRANSVERSE = _core_.PAPER_B5_TRANSVERSE
571PAPER_A3_EXTRA = _core_.PAPER_A3_EXTRA
572PAPER_A5_EXTRA = _core_.PAPER_A5_EXTRA
573PAPER_B5_EXTRA = _core_.PAPER_B5_EXTRA
574PAPER_A2 = _core_.PAPER_A2
575PAPER_A3_TRANSVERSE = _core_.PAPER_A3_TRANSVERSE
576PAPER_A3_EXTRA_TRANSVERSE = _core_.PAPER_A3_EXTRA_TRANSVERSE
577DUPLEX_SIMPLEX = _core_.DUPLEX_SIMPLEX
578DUPLEX_HORIZONTAL = _core_.DUPLEX_HORIZONTAL
579DUPLEX_VERTICAL = _core_.DUPLEX_VERTICAL
580ITEM_SEPARATOR = _core_.ITEM_SEPARATOR
581ITEM_NORMAL = _core_.ITEM_NORMAL
582ITEM_CHECK = _core_.ITEM_CHECK
583ITEM_RADIO = _core_.ITEM_RADIO
584ITEM_MAX = _core_.ITEM_MAX
585HT_NOWHERE = _core_.HT_NOWHERE
586HT_SCROLLBAR_FIRST = _core_.HT_SCROLLBAR_FIRST
587HT_SCROLLBAR_ARROW_LINE_1 = _core_.HT_SCROLLBAR_ARROW_LINE_1
588HT_SCROLLBAR_ARROW_LINE_2 = _core_.HT_SCROLLBAR_ARROW_LINE_2
589HT_SCROLLBAR_ARROW_PAGE_1 = _core_.HT_SCROLLBAR_ARROW_PAGE_1
590HT_SCROLLBAR_ARROW_PAGE_2 = _core_.HT_SCROLLBAR_ARROW_PAGE_2
591HT_SCROLLBAR_THUMB = _core_.HT_SCROLLBAR_THUMB
592HT_SCROLLBAR_BAR_1 = _core_.HT_SCROLLBAR_BAR_1
593HT_SCROLLBAR_BAR_2 = _core_.HT_SCROLLBAR_BAR_2
594HT_SCROLLBAR_LAST = _core_.HT_SCROLLBAR_LAST
595HT_WINDOW_OUTSIDE = _core_.HT_WINDOW_OUTSIDE
596HT_WINDOW_INSIDE = _core_.HT_WINDOW_INSIDE
597HT_WINDOW_VERT_SCROLLBAR = _core_.HT_WINDOW_VERT_SCROLLBAR
598HT_WINDOW_HORZ_SCROLLBAR = _core_.HT_WINDOW_HORZ_SCROLLBAR
599HT_WINDOW_CORNER = _core_.HT_WINDOW_CORNER
600HT_MAX = _core_.HT_MAX
601MOD_NONE = _core_.MOD_NONE
602MOD_ALT = _core_.MOD_ALT
603MOD_CONTROL = _core_.MOD_CONTROL
604MOD_SHIFT = _core_.MOD_SHIFT
605MOD_WIN = _core_.MOD_WIN
606UPDATE_UI_NONE = _core_.UPDATE_UI_NONE
607UPDATE_UI_RECURSE = _core_.UPDATE_UI_RECURSE
608UPDATE_UI_FROMIDLE = _core_.UPDATE_UI_FROMIDLE
d14a1e28
RD
609#---------------------------------------------------------------------------
610
611class Object(object):
0df68c9f
RD
612 """
613 The base class for most wx objects, although in wxPython not
614 much functionality is needed nor exposed.
615 """
d14a1e28
RD
616 def __init__(self): raise RuntimeError, "No constructor defined"
617 def __repr__(self):
618 return "<%s.%s; proxy of C++ wxObject instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
e811c8ce 619 def GetClassName(*args, **kwargs):
0df68c9f 620 """
a95a7133 621 GetClassName(self) -> String
e811c8ce 622
a95a7133 623 Returns the class name of the C++ class using wxRTTI.
0df68c9f 624 """
54f9ee45 625 return _core_.Object_GetClassName(*args, **kwargs)
e811c8ce
RD
626
627 def Destroy(*args, **kwargs):
0df68c9f 628 """
a95a7133 629 Destroy(self)
e811c8ce 630
0df68c9f
RD
631 Deletes the C++ object this Python object is a proxy for.
632 """
54f9ee45 633 return _core_.Object_Destroy(*args, **kwargs)
e811c8ce 634
d14a1e28
RD
635
636class ObjectPtr(Object):
637 def __init__(self, this):
638 self.this = this
639 if not hasattr(self,"thisown"): self.thisown = 0
640 self.__class__ = Object
54f9ee45
RD
641_core_.Object_swigregister(ObjectPtr)
642_wxPySetDictionary = _core_._wxPySetDictionary
d14a1e28 643
54f9ee45 644_wxPyFixStockObjects = _core_._wxPyFixStockObjects
3a04f143 645
54f9ee45 646cvar = _core_.cvar
196addbf 647EmptyString = cvar.EmptyString
d14a1e28
RD
648
649#---------------------------------------------------------------------------
650
54f9ee45
RD
651BITMAP_TYPE_INVALID = _core_.BITMAP_TYPE_INVALID
652BITMAP_TYPE_BMP = _core_.BITMAP_TYPE_BMP
653BITMAP_TYPE_ICO = _core_.BITMAP_TYPE_ICO
654BITMAP_TYPE_CUR = _core_.BITMAP_TYPE_CUR
655BITMAP_TYPE_XBM = _core_.BITMAP_TYPE_XBM
656BITMAP_TYPE_XBM_DATA = _core_.BITMAP_TYPE_XBM_DATA
657BITMAP_TYPE_XPM = _core_.BITMAP_TYPE_XPM
658BITMAP_TYPE_XPM_DATA = _core_.BITMAP_TYPE_XPM_DATA
659BITMAP_TYPE_TIF = _core_.BITMAP_TYPE_TIF
660BITMAP_TYPE_GIF = _core_.BITMAP_TYPE_GIF
661BITMAP_TYPE_PNG = _core_.BITMAP_TYPE_PNG
662BITMAP_TYPE_JPEG = _core_.BITMAP_TYPE_JPEG
663BITMAP_TYPE_PNM = _core_.BITMAP_TYPE_PNM
664BITMAP_TYPE_PCX = _core_.BITMAP_TYPE_PCX
665BITMAP_TYPE_PICT = _core_.BITMAP_TYPE_PICT
666BITMAP_TYPE_ICON = _core_.BITMAP_TYPE_ICON
667BITMAP_TYPE_ANI = _core_.BITMAP_TYPE_ANI
668BITMAP_TYPE_IFF = _core_.BITMAP_TYPE_IFF
669BITMAP_TYPE_MACCURSOR = _core_.BITMAP_TYPE_MACCURSOR
670BITMAP_TYPE_ANY = _core_.BITMAP_TYPE_ANY
671CURSOR_NONE = _core_.CURSOR_NONE
672CURSOR_ARROW = _core_.CURSOR_ARROW
673CURSOR_RIGHT_ARROW = _core_.CURSOR_RIGHT_ARROW
674CURSOR_BULLSEYE = _core_.CURSOR_BULLSEYE
675CURSOR_CHAR = _core_.CURSOR_CHAR
676CURSOR_CROSS = _core_.CURSOR_CROSS
677CURSOR_HAND = _core_.CURSOR_HAND
678CURSOR_IBEAM = _core_.CURSOR_IBEAM
679CURSOR_LEFT_BUTTON = _core_.CURSOR_LEFT_BUTTON
680CURSOR_MAGNIFIER = _core_.CURSOR_MAGNIFIER
681CURSOR_MIDDLE_BUTTON = _core_.CURSOR_MIDDLE_BUTTON
682CURSOR_NO_ENTRY = _core_.CURSOR_NO_ENTRY
683CURSOR_PAINT_BRUSH = _core_.CURSOR_PAINT_BRUSH
684CURSOR_PENCIL = _core_.CURSOR_PENCIL
685CURSOR_POINT_LEFT = _core_.CURSOR_POINT_LEFT
686CURSOR_POINT_RIGHT = _core_.CURSOR_POINT_RIGHT
687CURSOR_QUESTION_ARROW = _core_.CURSOR_QUESTION_ARROW
688CURSOR_RIGHT_BUTTON = _core_.CURSOR_RIGHT_BUTTON
689CURSOR_SIZENESW = _core_.CURSOR_SIZENESW
690CURSOR_SIZENS = _core_.CURSOR_SIZENS
691CURSOR_SIZENWSE = _core_.CURSOR_SIZENWSE
692CURSOR_SIZEWE = _core_.CURSOR_SIZEWE
693CURSOR_SIZING = _core_.CURSOR_SIZING
694CURSOR_SPRAYCAN = _core_.CURSOR_SPRAYCAN
695CURSOR_WAIT = _core_.CURSOR_WAIT
696CURSOR_WATCH = _core_.CURSOR_WATCH
697CURSOR_BLANK = _core_.CURSOR_BLANK
698CURSOR_DEFAULT = _core_.CURSOR_DEFAULT
699CURSOR_COPY_ARROW = _core_.CURSOR_COPY_ARROW
700CURSOR_ARROWWAIT = _core_.CURSOR_ARROWWAIT
701CURSOR_MAX = _core_.CURSOR_MAX
d14a1e28
RD
702#---------------------------------------------------------------------------
703
704class Size(object):
0df68c9f 705 """
41e2b43e 706 wx.Size is a useful data structure used to represent the size of
093d3ff1
RD
707 something. It simply contians integer width and height
708 proprtites. In most places in wxPython where a wx.Size is
709 expected a (width, height) tuple can be used instead.
0df68c9f 710 """
e811c8ce
RD
711 def __repr__(self):
712 return "<%s.%s; proxy of C++ wxSize instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
54f9ee45
RD
713 width = property(_core_.Size_width_get, _core_.Size_width_set)
714 height = property(_core_.Size_height_get, _core_.Size_height_set)
242b7b46 715 x = width; y = height
d14a1e28 716 def __init__(self, *args, **kwargs):
0df68c9f 717 """
a95a7133 718 __init__(self, int w=0, int h=0) -> Size
e811c8ce 719
0df68c9f
RD
720 Creates a size object.
721 """
54f9ee45 722 newobj = _core_.new_Size(*args, **kwargs)
d14a1e28
RD
723 self.this = newobj.this
724 self.thisown = 1
725 del newobj.thisown
54f9ee45 726 def __del__(self, destroy=_core_.delete_Size):
a95a7133 727 """__del__(self)"""
d14a1e28
RD
728 try:
729 if self.thisown: destroy(self)
730 except: pass
e811c8ce
RD
731
732 def __eq__(*args, **kwargs):
0df68c9f 733 """
a95a7133 734 __eq__(self, Size sz) -> bool
e811c8ce 735
0df68c9f
RD
736 Test for equality of wx.Size objects.
737 """
54f9ee45 738 return _core_.Size___eq__(*args, **kwargs)
e811c8ce
RD
739
740 def __ne__(*args, **kwargs):
0df68c9f 741 """
a95a7133 742 __ne__(self, Size sz) -> bool
e811c8ce 743
0df68c9f
RD
744 Test for inequality.
745 """
54f9ee45 746 return _core_.Size___ne__(*args, **kwargs)
e811c8ce
RD
747
748 def __add__(*args, **kwargs):
0df68c9f 749 """
a95a7133 750 __add__(self, Size sz) -> Size
e811c8ce 751
0df68c9f
RD
752 Add sz's proprties to this and return the result.
753 """
54f9ee45 754 return _core_.Size___add__(*args, **kwargs)
e811c8ce
RD
755
756 def __sub__(*args, **kwargs):
0df68c9f 757 """
a95a7133 758 __sub__(self, Size sz) -> Size
e811c8ce 759
0df68c9f
RD
760 Subtract sz's properties from this and return the result.
761 """
54f9ee45 762 return _core_.Size___sub__(*args, **kwargs)
e811c8ce
RD
763
764 def IncTo(*args, **kwargs):
0df68c9f 765 """
a95a7133 766 IncTo(self, Size sz)
e811c8ce 767
0df68c9f
RD
768 Increments this object so that both of its dimensions are not less
769 than the corresponding dimensions of the size.
770 """
54f9ee45 771 return _core_.Size_IncTo(*args, **kwargs)
e811c8ce
RD
772
773 def DecTo(*args, **kwargs):
0df68c9f 774 """
a95a7133 775 DecTo(self, Size sz)
e811c8ce 776
0df68c9f
RD
777 Decrements this object so that both of its dimensions are not greater
778 than the corresponding dimensions of the size.
779 """
54f9ee45 780 return _core_.Size_DecTo(*args, **kwargs)
e811c8ce
RD
781
782 def Set(*args, **kwargs):
0df68c9f 783 """
a95a7133 784 Set(self, int w, int h)
e811c8ce 785
0df68c9f
RD
786 Set both width and height.
787 """
54f9ee45 788 return _core_.Size_Set(*args, **kwargs)
e811c8ce
RD
789
790 def SetWidth(*args, **kwargs):
a95a7133 791 """SetWidth(self, int w)"""
54f9ee45 792 return _core_.Size_SetWidth(*args, **kwargs)
e811c8ce
RD
793
794 def SetHeight(*args, **kwargs):
a95a7133 795 """SetHeight(self, int h)"""
54f9ee45 796 return _core_.Size_SetHeight(*args, **kwargs)
e811c8ce
RD
797
798 def GetWidth(*args, **kwargs):
a95a7133 799 """GetWidth(self) -> int"""
54f9ee45 800 return _core_.Size_GetWidth(*args, **kwargs)
e811c8ce
RD
801
802 def GetHeight(*args, **kwargs):
a95a7133 803 """GetHeight(self) -> int"""
54f9ee45 804 return _core_.Size_GetHeight(*args, **kwargs)
e811c8ce 805
74a57fcd
RD
806 def IsFullySpecified(*args, **kwargs):
807 """
a95a7133 808 IsFullySpecified(self) -> bool
74a57fcd
RD
809
810 Returns True if both components of the size are non-default values.
811 """
54f9ee45 812 return _core_.Size_IsFullySpecified(*args, **kwargs)
74a57fcd
RD
813
814 def SetDefaults(*args, **kwargs):
815 """
a95a7133 816 SetDefaults(self, Size size)
74a57fcd 817
41e2b43e
RD
818 Combine this size with the other one replacing the default components
819 of this object (i.e. equal to -1) with those of the other.
74a57fcd 820 """
54f9ee45 821 return _core_.Size_SetDefaults(*args, **kwargs)
74a57fcd 822
e811c8ce 823 def Get(*args, **kwargs):
0df68c9f
RD
824 """
825 Get() -> (width,height)
e811c8ce 826
0df68c9f
RD
827 Returns the width and height properties as a tuple.
828 """
54f9ee45 829 return _core_.Size_Get(*args, **kwargs)
e811c8ce 830
41e2b43e 831 asTuple = wx._deprecated(Get, "asTuple is deprecated, use `Get` instead")
e811c8ce
RD
832 def __str__(self): return str(self.Get())
833 def __repr__(self): return 'wx.Size'+str(self.Get())
834 def __len__(self): return len(self.Get())
835 def __getitem__(self, index): return self.Get()[index]
d14a1e28
RD
836 def __setitem__(self, index, val):
837 if index == 0: self.width = val
838 elif index == 1: self.height = val
839 else: raise IndexError
e811c8ce 840 def __nonzero__(self): return self.Get() != (0,0)
74e96f3d
RD
841 __safe_for_unpickling__ = True
842 def __reduce__(self): return (wx.Size, self.Get())
d14a1e28
RD
843
844
845class SizePtr(Size):
846 def __init__(self, this):
847 self.this = this
848 if not hasattr(self,"thisown"): self.thisown = 0
849 self.__class__ = Size
54f9ee45 850_core_.Size_swigregister(SizePtr)
d14a1e28
RD
851
852#---------------------------------------------------------------------------
853
854class RealPoint(object):
0df68c9f 855 """
41e2b43e
RD
856 A data structure for representing a point or position with floating
857 point x and y properties. In wxPython most places that expect a
858 wx.RealPoint can also accept a (x,y) tuple.
0df68c9f 859 """
e811c8ce
RD
860 def __repr__(self):
861 return "<%s.%s; proxy of C++ wxRealPoint instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
54f9ee45
RD
862 x = property(_core_.RealPoint_x_get, _core_.RealPoint_x_set)
863 y = property(_core_.RealPoint_y_get, _core_.RealPoint_y_set)
d14a1e28 864 def __init__(self, *args, **kwargs):
0df68c9f 865 """
a95a7133 866 __init__(self, double x=0.0, double y=0.0) -> RealPoint
e811c8ce 867
0df68c9f
RD
868 Create a wx.RealPoint object
869 """
54f9ee45 870 newobj = _core_.new_RealPoint(*args, **kwargs)
d14a1e28
RD
871 self.this = newobj.this
872 self.thisown = 1
873 del newobj.thisown
54f9ee45 874 def __del__(self, destroy=_core_.delete_RealPoint):
a95a7133 875 """__del__(self)"""
d14a1e28
RD
876 try:
877 if self.thisown: destroy(self)
878 except: pass
e811c8ce
RD
879
880 def __eq__(*args, **kwargs):
0df68c9f 881 """
a95a7133 882 __eq__(self, RealPoint pt) -> bool
e811c8ce 883
0df68c9f
RD
884 Test for equality of wx.RealPoint objects.
885 """
54f9ee45 886 return _core_.RealPoint___eq__(*args, **kwargs)
e811c8ce
RD
887
888 def __ne__(*args, **kwargs):
0df68c9f 889 """
a95a7133 890 __ne__(self, RealPoint pt) -> bool
e811c8ce 891
0df68c9f
RD
892 Test for inequality of wx.RealPoint objects.
893 """
54f9ee45 894 return _core_.RealPoint___ne__(*args, **kwargs)
e811c8ce
RD
895
896 def __add__(*args, **kwargs):
0df68c9f 897 """
a95a7133 898 __add__(self, RealPoint pt) -> RealPoint
e811c8ce 899
0df68c9f
RD
900 Add pt's proprties to this and return the result.
901 """
54f9ee45 902 return _core_.RealPoint___add__(*args, **kwargs)
e811c8ce
RD
903
904 def __sub__(*args, **kwargs):
0df68c9f 905 """
a95a7133 906 __sub__(self, RealPoint pt) -> RealPoint
e811c8ce 907
0df68c9f
RD
908 Subtract pt's proprties from this and return the result
909 """
54f9ee45 910 return _core_.RealPoint___sub__(*args, **kwargs)
e811c8ce
RD
911
912 def Set(*args, **kwargs):
0df68c9f 913 """
a95a7133 914 Set(self, double x, double y)
e811c8ce 915
0df68c9f
RD
916 Set both the x and y properties
917 """
54f9ee45 918 return _core_.RealPoint_Set(*args, **kwargs)
e811c8ce
RD
919
920 def Get(*args, **kwargs):
0df68c9f
RD
921 """
922 Get() -> (x,y)
e811c8ce 923
0df68c9f
RD
924 Return the x and y properties as a tuple.
925 """
54f9ee45 926 return _core_.RealPoint_Get(*args, **kwargs)
e811c8ce 927
41e2b43e 928 asTuple = wx._deprecated(Get, "asTuple is deprecated, use `Get` instead")
e811c8ce
RD
929 def __str__(self): return str(self.Get())
930 def __repr__(self): return 'wx.RealPoint'+str(self.Get())
931 def __len__(self): return len(self.Get())
932 def __getitem__(self, index): return self.Get()[index]
d14a1e28 933 def __setitem__(self, index, val):
e811c8ce
RD
934 if index == 0: self.x = val
935 elif index == 1: self.y = val
d14a1e28 936 else: raise IndexError
e811c8ce 937 def __nonzero__(self): return self.Get() != (0.0, 0.0)
74e96f3d
RD
938 __safe_for_unpickling__ = True
939 def __reduce__(self): return (wx.RealPoint, self.Get())
d14a1e28
RD
940
941
942class RealPointPtr(RealPoint):
943 def __init__(self, this):
944 self.this = this
945 if not hasattr(self,"thisown"): self.thisown = 0
946 self.__class__ = RealPoint
54f9ee45 947_core_.RealPoint_swigregister(RealPointPtr)
d14a1e28
RD
948
949#---------------------------------------------------------------------------
950
951class Point(object):
0df68c9f 952 """
41e2b43e
RD
953 A data structure for representing a point or position with integer x
954 and y properties. Most places in wxPython that expect a wx.Point can
955 also accept a (x,y) tuple.
0df68c9f 956 """
e811c8ce
RD
957 def __repr__(self):
958 return "<%s.%s; proxy of C++ wxPoint instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
54f9ee45
RD
959 x = property(_core_.Point_x_get, _core_.Point_x_set)
960 y = property(_core_.Point_y_get, _core_.Point_y_set)
d14a1e28 961 def __init__(self, *args, **kwargs):
0df68c9f 962 """
a95a7133 963 __init__(self, int x=0, int y=0) -> Point
e811c8ce 964
0df68c9f
RD
965 Create a wx.Point object
966 """
54f9ee45 967 newobj = _core_.new_Point(*args, **kwargs)
d14a1e28
RD
968 self.this = newobj.this
969 self.thisown = 1
970 del newobj.thisown
54f9ee45 971 def __del__(self, destroy=_core_.delete_Point):
a95a7133 972 """__del__(self)"""
d14a1e28
RD
973 try:
974 if self.thisown: destroy(self)
975 except: pass
e811c8ce
RD
976
977 def __eq__(*args, **kwargs):
0df68c9f 978 """
a95a7133 979 __eq__(self, Point pt) -> bool
e811c8ce 980
0df68c9f
RD
981 Test for equality of wx.Point objects.
982 """
54f9ee45 983 return _core_.Point___eq__(*args, **kwargs)
e811c8ce
RD
984
985 def __ne__(*args, **kwargs):
0df68c9f 986 """
a95a7133 987 __ne__(self, Point pt) -> bool
e811c8ce 988
0df68c9f
RD
989 Test for inequality of wx.Point objects.
990 """
54f9ee45 991 return _core_.Point___ne__(*args, **kwargs)
e811c8ce
RD
992
993 def __add__(*args, **kwargs):
0df68c9f 994 """
a95a7133 995 __add__(self, Point pt) -> Point
e811c8ce 996
0df68c9f
RD
997 Add pt's proprties to this and return the result.
998 """
54f9ee45 999 return _core_.Point___add__(*args, **kwargs)
e811c8ce
RD
1000
1001 def __sub__(*args, **kwargs):
0df68c9f 1002 """
a95a7133 1003 __sub__(self, Point pt) -> Point
e811c8ce 1004
0df68c9f
RD
1005 Subtract pt's proprties from this and return the result
1006 """
54f9ee45 1007 return _core_.Point___sub__(*args, **kwargs)
e811c8ce
RD
1008
1009 def __iadd__(*args, **kwargs):
0df68c9f 1010 """
a95a7133 1011 __iadd__(self, Point pt) -> Point
e811c8ce 1012
0df68c9f
RD
1013 Add pt to this object.
1014 """
54f9ee45 1015 return _core_.Point___iadd__(*args, **kwargs)
e811c8ce
RD
1016
1017 def __isub__(*args, **kwargs):
0df68c9f 1018 """
a95a7133 1019 __isub__(self, Point pt) -> Point
e811c8ce 1020
0df68c9f
RD
1021 Subtract pt from this object.
1022 """
54f9ee45 1023 return _core_.Point___isub__(*args, **kwargs)
e811c8ce
RD
1024
1025 def Set(*args, **kwargs):
0df68c9f 1026 """
a95a7133 1027 Set(self, long x, long y)
e811c8ce 1028
0df68c9f
RD
1029 Set both the x and y properties
1030 """
54f9ee45 1031 return _core_.Point_Set(*args, **kwargs)
e811c8ce
RD
1032
1033 def Get(*args, **kwargs):
0df68c9f
RD
1034 """
1035 Get() -> (x,y)
e811c8ce 1036
0df68c9f
RD
1037 Return the x and y properties as a tuple.
1038 """
54f9ee45 1039 return _core_.Point_Get(*args, **kwargs)
e811c8ce 1040
41e2b43e 1041 asTuple = wx._deprecated(Get, "asTuple is deprecated, use `Get` instead")
e811c8ce
RD
1042 def __str__(self): return str(self.Get())
1043 def __repr__(self): return 'wx.Point'+str(self.Get())
1044 def __len__(self): return len(self.Get())
1045 def __getitem__(self, index): return self.Get()[index]
d14a1e28
RD
1046 def __setitem__(self, index, val):
1047 if index == 0: self.x = val
1048 elif index == 1: self.y = val
1049 else: raise IndexError
e811c8ce 1050 def __nonzero__(self): return self.Get() != (0,0)
74e96f3d
RD
1051 __safe_for_unpickling__ = True
1052 def __reduce__(self): return (wx.Point, self.Get())
d14a1e28
RD
1053
1054
1055class PointPtr(Point):
1056 def __init__(self, this):
1057 self.this = this
1058 if not hasattr(self,"thisown"): self.thisown = 0
1059 self.__class__ = Point
54f9ee45 1060_core_.Point_swigregister(PointPtr)
d14a1e28
RD
1061
1062#---------------------------------------------------------------------------
1063
1064class Rect(object):
0df68c9f 1065 """
41e2b43e
RD
1066 A class for representing and manipulating rectangles. It has x, y,
1067 width and height properties. In wxPython most palces that expect a
1068 wx.Rect can also accept a (x,y,width,height) tuple.
0df68c9f 1069 """
e811c8ce
RD
1070 def __repr__(self):
1071 return "<%s.%s; proxy of C++ wxRect instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 1072 def __init__(self, *args, **kwargs):
0df68c9f 1073 """
a95a7133 1074 __init__(self, int x=0, int y=0, int width=0, int height=0) -> Rect
e811c8ce 1075
0df68c9f
RD
1076 Create a new Rect object.
1077 """
54f9ee45 1078 newobj = _core_.new_Rect(*args, **kwargs)
d14a1e28
RD
1079 self.this = newobj.this
1080 self.thisown = 1
1081 del newobj.thisown
54f9ee45 1082 def __del__(self, destroy=_core_.delete_Rect):
a95a7133 1083 """__del__(self)"""
d14a1e28
RD
1084 try:
1085 if self.thisown: destroy(self)
1086 except: pass
e811c8ce
RD
1087
1088 def GetX(*args, **kwargs):
a95a7133 1089 """GetX(self) -> int"""
54f9ee45 1090 return _core_.Rect_GetX(*args, **kwargs)
e811c8ce
RD
1091
1092 def SetX(*args, **kwargs):
a95a7133 1093 """SetX(self, int x)"""
54f9ee45 1094 return _core_.Rect_SetX(*args, **kwargs)
e811c8ce
RD
1095
1096 def GetY(*args, **kwargs):
a95a7133 1097 """GetY(self) -> int"""
54f9ee45 1098 return _core_.Rect_GetY(*args, **kwargs)
e811c8ce
RD
1099
1100 def SetY(*args, **kwargs):
a95a7133 1101 """SetY(self, int y)"""
54f9ee45 1102 return _core_.Rect_SetY(*args, **kwargs)
e811c8ce
RD
1103
1104 def GetWidth(*args, **kwargs):
a95a7133 1105 """GetWidth(self) -> int"""
54f9ee45 1106 return _core_.Rect_GetWidth(*args, **kwargs)
e811c8ce
RD
1107
1108 def SetWidth(*args, **kwargs):
a95a7133 1109 """SetWidth(self, int w)"""
54f9ee45 1110 return _core_.Rect_SetWidth(*args, **kwargs)
e811c8ce
RD
1111
1112 def GetHeight(*args, **kwargs):
a95a7133 1113 """GetHeight(self) -> int"""
54f9ee45 1114 return _core_.Rect_GetHeight(*args, **kwargs)
e811c8ce
RD
1115
1116 def SetHeight(*args, **kwargs):
a95a7133 1117 """SetHeight(self, int h)"""
54f9ee45 1118 return _core_.Rect_SetHeight(*args, **kwargs)
e811c8ce
RD
1119
1120 def GetPosition(*args, **kwargs):
a95a7133 1121 """GetPosition(self) -> Point"""
54f9ee45 1122 return _core_.Rect_GetPosition(*args, **kwargs)
e811c8ce
RD
1123
1124 def SetPosition(*args, **kwargs):
a95a7133 1125 """SetPosition(self, Point p)"""
54f9ee45 1126 return _core_.Rect_SetPosition(*args, **kwargs)
e811c8ce
RD
1127
1128 def GetSize(*args, **kwargs):
a95a7133 1129 """GetSize(self) -> Size"""
54f9ee45 1130 return _core_.Rect_GetSize(*args, **kwargs)
e811c8ce
RD
1131
1132 def SetSize(*args, **kwargs):
a95a7133 1133 """SetSize(self, Size s)"""
54f9ee45 1134 return _core_.Rect_SetSize(*args, **kwargs)
e811c8ce 1135
c9c7117a 1136 def GetTopLeft(*args, **kwargs):
a95a7133 1137 """GetTopLeft(self) -> Point"""
54f9ee45 1138 return _core_.Rect_GetTopLeft(*args, **kwargs)
c9c7117a
RD
1139
1140 def SetTopLeft(*args, **kwargs):
a95a7133 1141 """SetTopLeft(self, Point p)"""
54f9ee45 1142 return _core_.Rect_SetTopLeft(*args, **kwargs)
c9c7117a
RD
1143
1144 def GetBottomRight(*args, **kwargs):
a95a7133 1145 """GetBottomRight(self) -> Point"""
54f9ee45 1146 return _core_.Rect_GetBottomRight(*args, **kwargs)
c9c7117a
RD
1147
1148 def SetBottomRight(*args, **kwargs):
a95a7133 1149 """SetBottomRight(self, Point p)"""
54f9ee45 1150 return _core_.Rect_SetBottomRight(*args, **kwargs)
c9c7117a 1151
e811c8ce 1152 def GetLeft(*args, **kwargs):
a95a7133 1153 """GetLeft(self) -> int"""
54f9ee45 1154 return _core_.Rect_GetLeft(*args, **kwargs)
e811c8ce
RD
1155
1156 def GetTop(*args, **kwargs):
a95a7133 1157 """GetTop(self) -> int"""
54f9ee45 1158 return _core_.Rect_GetTop(*args, **kwargs)
e811c8ce
RD
1159
1160 def GetBottom(*args, **kwargs):
a95a7133 1161 """GetBottom(self) -> int"""
54f9ee45 1162 return _core_.Rect_GetBottom(*args, **kwargs)
e811c8ce
RD
1163
1164 def GetRight(*args, **kwargs):
a95a7133 1165 """GetRight(self) -> int"""
54f9ee45 1166 return _core_.Rect_GetRight(*args, **kwargs)
e811c8ce
RD
1167
1168 def SetLeft(*args, **kwargs):
a95a7133 1169 """SetLeft(self, int left)"""
54f9ee45 1170 return _core_.Rect_SetLeft(*args, **kwargs)
e811c8ce
RD
1171
1172 def SetRight(*args, **kwargs):
a95a7133 1173 """SetRight(self, int right)"""
54f9ee45 1174 return _core_.Rect_SetRight(*args, **kwargs)
e811c8ce
RD
1175
1176 def SetTop(*args, **kwargs):
a95a7133 1177 """SetTop(self, int top)"""
54f9ee45 1178 return _core_.Rect_SetTop(*args, **kwargs)
e811c8ce
RD
1179
1180 def SetBottom(*args, **kwargs):
a95a7133 1181 """SetBottom(self, int bottom)"""
54f9ee45 1182 return _core_.Rect_SetBottom(*args, **kwargs)
e811c8ce
RD
1183
1184 position = property(GetPosition, SetPosition)
1185 size = property(GetSize, SetSize)
1186 left = property(GetLeft, SetLeft)
1187 right = property(GetRight, SetRight)
1188 top = property(GetTop, SetTop)
1189 bottom = property(GetBottom, SetBottom)
1190
1191 def Inflate(*args, **kwargs):
0df68c9f 1192 """
a95a7133 1193 Inflate(self, int dx, int dy) -> Rect
e811c8ce 1194
41e2b43e 1195 Increase the rectangle size by dx in x direction and dy in y
5cbf236d 1196 direction. Both (or one of) parameters may be negative to decrease the
41e2b43e 1197 rectangle size.
0df68c9f 1198 """
54f9ee45 1199 return _core_.Rect_Inflate(*args, **kwargs)
e811c8ce
RD
1200
1201 def Deflate(*args, **kwargs):
0df68c9f 1202 """
a95a7133 1203 Deflate(self, int dx, int dy) -> Rect
e811c8ce 1204
41e2b43e 1205 Decrease the rectangle size by dx in x direction and dy in y
5cbf236d 1206 direction. Both (or one of) parameters may be negative to increase the
41e2b43e 1207 rectngle size. This method is the opposite of Inflate.
0df68c9f 1208 """
54f9ee45 1209 return _core_.Rect_Deflate(*args, **kwargs)
e811c8ce
RD
1210
1211 def OffsetXY(*args, **kwargs):
0df68c9f 1212 """
a95a7133 1213 OffsetXY(self, int dx, int dy)
e811c8ce 1214
41e2b43e
RD
1215 Moves the rectangle by the specified offset. If dx is positive, the
1216 rectangle is moved to the right, if dy is positive, it is moved to the
1217 bottom, otherwise it is moved to the left or top respectively.
0df68c9f 1218 """
54f9ee45 1219 return _core_.Rect_OffsetXY(*args, **kwargs)
e811c8ce
RD
1220
1221 def Offset(*args, **kwargs):
0df68c9f 1222 """
a95a7133 1223 Offset(self, Point pt)
e811c8ce 1224
0df68c9f
RD
1225 Same as OffsetXY but uses dx,dy from Point
1226 """
54f9ee45 1227 return _core_.Rect_Offset(*args, **kwargs)
e811c8ce
RD
1228
1229 def Intersect(*args, **kwargs):
0df68c9f 1230 """
a95a7133 1231 Intersect(self, Rect rect) -> Rect
e811c8ce 1232
5cbf236d 1233 Returns the intersectsion of this rectangle and rect.
0df68c9f 1234 """
54f9ee45 1235 return _core_.Rect_Intersect(*args, **kwargs)
e811c8ce 1236
5cbf236d
RD
1237 def Union(*args, **kwargs):
1238 """
1239 Union(self, Rect rect) -> Rect
1240
1241 Returns the union of this rectangle and rect.
1242 """
1243 return _core_.Rect_Union(*args, **kwargs)
1244
e811c8ce 1245 def __add__(*args, **kwargs):
0df68c9f 1246 """
a95a7133 1247 __add__(self, Rect rect) -> Rect
e811c8ce 1248
0df68c9f
RD
1249 Add the properties of rect to this rectangle and return the result.
1250 """
54f9ee45 1251 return _core_.Rect___add__(*args, **kwargs)
e811c8ce
RD
1252
1253 def __iadd__(*args, **kwargs):
0df68c9f 1254 """
a95a7133 1255 __iadd__(self, Rect rect) -> Rect
e811c8ce 1256
0df68c9f
RD
1257 Add the properties of rect to this rectangle, updating this rectangle.
1258 """
54f9ee45 1259 return _core_.Rect___iadd__(*args, **kwargs)
e811c8ce
RD
1260
1261 def __eq__(*args, **kwargs):
0df68c9f 1262 """
a95a7133 1263 __eq__(self, Rect rect) -> bool
e811c8ce 1264
0df68c9f
RD
1265 Test for equality.
1266 """
54f9ee45 1267 return _core_.Rect___eq__(*args, **kwargs)
e811c8ce
RD
1268
1269 def __ne__(*args, **kwargs):
0df68c9f 1270 """
a95a7133 1271 __ne__(self, Rect rect) -> bool
e811c8ce 1272
0df68c9f
RD
1273 Test for inequality.
1274 """
54f9ee45 1275 return _core_.Rect___ne__(*args, **kwargs)
e811c8ce
RD
1276
1277 def InsideXY(*args, **kwargs):
0df68c9f 1278 """
a95a7133 1279 InsideXY(self, int x, int y) -> bool
e811c8ce 1280
0df68c9f
RD
1281 Return True if the point is (not strcitly) inside the rect.
1282 """
54f9ee45 1283 return _core_.Rect_InsideXY(*args, **kwargs)
e811c8ce
RD
1284
1285 def Inside(*args, **kwargs):
0df68c9f 1286 """
a95a7133 1287 Inside(self, Point pt) -> bool
e811c8ce 1288
0df68c9f
RD
1289 Return True if the point is (not strcitly) inside the rect.
1290 """
54f9ee45 1291 return _core_.Rect_Inside(*args, **kwargs)
e811c8ce
RD
1292
1293 def Intersects(*args, **kwargs):
0df68c9f 1294 """
a95a7133 1295 Intersects(self, Rect rect) -> bool
e811c8ce 1296
0df68c9f
RD
1297 Returns True if the rectangles have a non empty intersection.
1298 """
54f9ee45 1299 return _core_.Rect_Intersects(*args, **kwargs)
e811c8ce 1300
54f9ee45
RD
1301 x = property(_core_.Rect_x_get, _core_.Rect_x_set)
1302 y = property(_core_.Rect_y_get, _core_.Rect_y_set)
1303 width = property(_core_.Rect_width_get, _core_.Rect_width_set)
1304 height = property(_core_.Rect_height_get, _core_.Rect_height_set)
e811c8ce 1305 def Set(*args, **kwargs):
0df68c9f 1306 """
a95a7133 1307 Set(self, int x=0, int y=0, int width=0, int height=0)
e811c8ce 1308
0df68c9f
RD
1309 Set all rectangle properties.
1310 """
54f9ee45 1311 return _core_.Rect_Set(*args, **kwargs)
e811c8ce
RD
1312
1313 def Get(*args, **kwargs):
0df68c9f
RD
1314 """
1315 Get() -> (x,y,width,height)
e811c8ce 1316
0df68c9f
RD
1317 Return the rectangle properties as a tuple.
1318 """
54f9ee45 1319 return _core_.Rect_Get(*args, **kwargs)
e811c8ce 1320
41e2b43e 1321 asTuple = wx._deprecated(Get, "asTuple is deprecated, use `Get` instead")
e811c8ce
RD
1322 def __str__(self): return str(self.Get())
1323 def __repr__(self): return 'wx.Rect'+str(self.Get())
1324 def __len__(self): return len(self.Get())
1325 def __getitem__(self, index): return self.Get()[index]
d14a1e28
RD
1326 def __setitem__(self, index, val):
1327 if index == 0: self.x = val
1328 elif index == 1: self.y = val
1329 elif index == 2: self.width = val
1330 elif index == 3: self.height = val
1331 else: raise IndexError
e811c8ce 1332 def __nonzero__(self): return self.Get() != (0,0,0,0)
74e96f3d
RD
1333 __safe_for_unpickling__ = True
1334 def __reduce__(self): return (wx.Rect, self.Get())
d14a1e28
RD
1335
1336
1337class RectPtr(Rect):
1338 def __init__(self, this):
1339 self.this = this
1340 if not hasattr(self,"thisown"): self.thisown = 0
1341 self.__class__ = Rect
54f9ee45 1342_core_.Rect_swigregister(RectPtr)
d14a1e28
RD
1343
1344def RectPP(*args, **kwargs):
0df68c9f
RD
1345 """
1346 RectPP(Point topLeft, Point bottomRight) -> Rect
e811c8ce 1347
0df68c9f
RD
1348 Create a new Rect object from Points representing two corners.
1349 """
54f9ee45 1350 val = _core_.new_RectPP(*args, **kwargs)
d14a1e28
RD
1351 val.thisown = 1
1352 return val
1353
1354def RectPS(*args, **kwargs):
0df68c9f
RD
1355 """
1356 RectPS(Point pos, Size size) -> Rect
e811c8ce 1357
0df68c9f
RD
1358 Create a new Rect from a position and size.
1359 """
54f9ee45 1360 val = _core_.new_RectPS(*args, **kwargs)
d14a1e28
RD
1361 val.thisown = 1
1362 return val
1363
d3b6e4ff
RD
1364def RectS(*args, **kwargs):
1365 """
1366 RectS(Size size) -> Rect
1367
1368 Create a new Rect from a size only.
1369 """
1370 val = _core_.new_RectS(*args, **kwargs)
1371 val.thisown = 1
1372 return val
1373
d14a1e28 1374
e811c8ce 1375def IntersectRect(*args, **kwargs):
0df68c9f
RD
1376 """
1377 IntersectRect(Rect r1, Rect r2) -> Rect
e811c8ce 1378
0df68c9f
RD
1379 Calculate and return the intersection of r1 and r2.
1380 """
54f9ee45 1381 return _core_.IntersectRect(*args, **kwargs)
d14a1e28
RD
1382#---------------------------------------------------------------------------
1383
1384class Point2D(object):
41e2b43e
RD
1385 """
1386 wx.Point2Ds represent a point or a vector in a 2d coordinate system
1387 with floating point values.
1388 """
e811c8ce
RD
1389 def __repr__(self):
1390 return "<%s.%s; proxy of C++ wxPoint2D instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 1391 def __init__(self, *args, **kwargs):
0df68c9f 1392 """
a95a7133 1393 __init__(self, double x=0.0, double y=0.0) -> Point2D
e811c8ce 1394
0df68c9f
RD
1395 Create a w.Point2D object.
1396 """
54f9ee45 1397 newobj = _core_.new_Point2D(*args, **kwargs)
d14a1e28
RD
1398 self.this = newobj.this
1399 self.thisown = 1
1400 del newobj.thisown
e811c8ce 1401 def GetFloor(*args, **kwargs):
fd2dc343
RD
1402 """
1403 GetFloor() -> (x,y)
1404
1405 Convert to integer
1406 """
54f9ee45 1407 return _core_.Point2D_GetFloor(*args, **kwargs)
e811c8ce
RD
1408
1409 def GetRounded(*args, **kwargs):
fd2dc343
RD
1410 """
1411 GetRounded() -> (x,y)
1412
1413 Convert to integer
1414 """
54f9ee45 1415 return _core_.Point2D_GetRounded(*args, **kwargs)
e811c8ce
RD
1416
1417 def GetVectorLength(*args, **kwargs):
a95a7133 1418 """GetVectorLength(self) -> double"""
54f9ee45 1419 return _core_.Point2D_GetVectorLength(*args, **kwargs)
e811c8ce
RD
1420
1421 def GetVectorAngle(*args, **kwargs):
a95a7133 1422 """GetVectorAngle(self) -> double"""
54f9ee45 1423 return _core_.Point2D_GetVectorAngle(*args, **kwargs)
e811c8ce
RD
1424
1425 def SetVectorLength(*args, **kwargs):
a95a7133 1426 """SetVectorLength(self, double length)"""
54f9ee45 1427 return _core_.Point2D_SetVectorLength(*args, **kwargs)
e811c8ce
RD
1428
1429 def SetVectorAngle(*args, **kwargs):
a95a7133 1430 """SetVectorAngle(self, double degrees)"""
54f9ee45 1431 return _core_.Point2D_SetVectorAngle(*args, **kwargs)
e811c8ce 1432
d14a1e28
RD
1433 def SetPolarCoordinates(self, angle, length):
1434 self.SetVectorLength(length)
1435 self.SetVectorAngle(angle)
1436 def Normalize(self):
1437 self.SetVectorLength(1.0)
1438
e811c8ce 1439 def GetDistance(*args, **kwargs):
a95a7133 1440 """GetDistance(self, Point2D pt) -> double"""
54f9ee45 1441 return _core_.Point2D_GetDistance(*args, **kwargs)
e811c8ce
RD
1442
1443 def GetDistanceSquare(*args, **kwargs):
a95a7133 1444 """GetDistanceSquare(self, Point2D pt) -> double"""
54f9ee45 1445 return _core_.Point2D_GetDistanceSquare(*args, **kwargs)
e811c8ce
RD
1446
1447 def GetDotProduct(*args, **kwargs):
a95a7133 1448 """GetDotProduct(self, Point2D vec) -> double"""
54f9ee45 1449 return _core_.Point2D_GetDotProduct(*args, **kwargs)
e811c8ce
RD
1450
1451 def GetCrossProduct(*args, **kwargs):
a95a7133 1452 """GetCrossProduct(self, Point2D vec) -> double"""
54f9ee45 1453 return _core_.Point2D_GetCrossProduct(*args, **kwargs)
e811c8ce
RD
1454
1455 def __neg__(*args, **kwargs):
0df68c9f 1456 """
a95a7133 1457 __neg__(self) -> Point2D
e811c8ce 1458
0df68c9f
RD
1459 the reflection of this point
1460 """
54f9ee45 1461 return _core_.Point2D___neg__(*args, **kwargs)
e811c8ce
RD
1462
1463 def __iadd__(*args, **kwargs):
a95a7133 1464 """__iadd__(self, Point2D pt) -> Point2D"""
54f9ee45 1465 return _core_.Point2D___iadd__(*args, **kwargs)
e811c8ce
RD
1466
1467 def __isub__(*args, **kwargs):
a95a7133 1468 """__isub__(self, Point2D pt) -> Point2D"""
54f9ee45 1469 return _core_.Point2D___isub__(*args, **kwargs)
e811c8ce
RD
1470
1471 def __imul__(*args, **kwargs):
a95a7133 1472 """__imul__(self, Point2D pt) -> Point2D"""
54f9ee45 1473 return _core_.Point2D___imul__(*args, **kwargs)
e811c8ce
RD
1474
1475 def __idiv__(*args, **kwargs):
a95a7133 1476 """__idiv__(self, Point2D pt) -> Point2D"""
54f9ee45 1477 return _core_.Point2D___idiv__(*args, **kwargs)
e811c8ce
RD
1478
1479 def __eq__(*args, **kwargs):
0df68c9f 1480 """
a95a7133 1481 __eq__(self, Point2D pt) -> bool
e811c8ce 1482
0df68c9f
RD
1483 Test for equality
1484 """
54f9ee45 1485 return _core_.Point2D___eq__(*args, **kwargs)
e811c8ce
RD
1486
1487 def __ne__(*args, **kwargs):
0df68c9f 1488 """
a95a7133 1489 __ne__(self, Point2D pt) -> bool
e811c8ce 1490
0df68c9f
RD
1491 Test for inequality
1492 """
54f9ee45 1493 return _core_.Point2D___ne__(*args, **kwargs)
e811c8ce 1494
54f9ee45
RD
1495 x = property(_core_.Point2D_x_get, _core_.Point2D_x_set)
1496 y = property(_core_.Point2D_y_get, _core_.Point2D_y_set)
e811c8ce 1497 def Set(*args, **kwargs):
a95a7133 1498 """Set(self, double x=0, double y=0)"""
54f9ee45 1499 return _core_.Point2D_Set(*args, **kwargs)
e811c8ce
RD
1500
1501 def Get(*args, **kwargs):
0df68c9f
RD
1502 """
1503 Get() -> (x,y)
e811c8ce 1504
0df68c9f
RD
1505 Return x and y properties as a tuple.
1506 """
54f9ee45 1507 return _core_.Point2D_Get(*args, **kwargs)
e811c8ce 1508
41e2b43e 1509 asTuple = wx._deprecated(Get, "asTuple is deprecated, use `Get` instead")
e811c8ce
RD
1510 def __str__(self): return str(self.Get())
1511 def __repr__(self): return 'wx.Point2D'+str(self.Get())
1512 def __len__(self): return len(self.Get())
1513 def __getitem__(self, index): return self.Get()[index]
d14a1e28 1514 def __setitem__(self, index, val):
e811c8ce
RD
1515 if index == 0: self.x = val
1516 elif index == 1: self.y = val
d14a1e28 1517 else: raise IndexError
e811c8ce 1518 def __nonzero__(self): return self.Get() != (0.0, 0.0)
74e96f3d
RD
1519 __safe_for_unpickling__ = True
1520 def __reduce__(self): return (wx.Point2D, self.Get())
d14a1e28
RD
1521
1522
1523class Point2DPtr(Point2D):
1524 def __init__(self, this):
1525 self.this = this
1526 if not hasattr(self,"thisown"): self.thisown = 0
1527 self.__class__ = Point2D
54f9ee45 1528_core_.Point2D_swigregister(Point2DPtr)
d14a1e28
RD
1529
1530def Point2DCopy(*args, **kwargs):
0df68c9f
RD
1531 """
1532 Point2DCopy(Point2D pt) -> Point2D
e811c8ce 1533
0df68c9f
RD
1534 Create a w.Point2D object.
1535 """
54f9ee45 1536 val = _core_.new_Point2DCopy(*args, **kwargs)
d14a1e28
RD
1537 val.thisown = 1
1538 return val
1539
1540def Point2DFromPoint(*args, **kwargs):
0df68c9f
RD
1541 """
1542 Point2DFromPoint(Point pt) -> Point2D
e811c8ce 1543
0df68c9f
RD
1544 Create a w.Point2D object.
1545 """
54f9ee45 1546 val = _core_.new_Point2DFromPoint(*args, **kwargs)
d14a1e28
RD
1547 val.thisown = 1
1548 return val
1549
1550#---------------------------------------------------------------------------
1551
54f9ee45
RD
1552FromStart = _core_.FromStart
1553FromCurrent = _core_.FromCurrent
1554FromEnd = _core_.FromEnd
d14a1e28 1555class InputStream(object):
093d3ff1 1556 """Proxy of C++ InputStream class"""
e811c8ce
RD
1557 def __repr__(self):
1558 return "<%s.%s; proxy of C++ wxPyInputStream instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 1559 def __init__(self, *args, **kwargs):
a95a7133 1560 """__init__(self, PyObject p) -> InputStream"""
54f9ee45 1561 newobj = _core_.new_InputStream(*args, **kwargs)
d14a1e28
RD
1562 self.this = newobj.this
1563 self.thisown = 1
1564 del newobj.thisown
8fb0e70a
RD
1565 def __del__(self, destroy=_core_.delete_InputStream):
1566 """__del__(self)"""
1567 try:
1568 if self.thisown: destroy(self)
1569 except: pass
1570
e811c8ce 1571 def close(*args, **kwargs):
a95a7133 1572 """close(self)"""
54f9ee45 1573 return _core_.InputStream_close(*args, **kwargs)
e811c8ce
RD
1574
1575 def flush(*args, **kwargs):
a95a7133 1576 """flush(self)"""
54f9ee45 1577 return _core_.InputStream_flush(*args, **kwargs)
e811c8ce
RD
1578
1579 def eof(*args, **kwargs):
a95a7133 1580 """eof(self) -> bool"""
54f9ee45 1581 return _core_.InputStream_eof(*args, **kwargs)
e811c8ce
RD
1582
1583 def read(*args, **kwargs):
a95a7133 1584 """read(self, int size=-1) -> PyObject"""
54f9ee45 1585 return _core_.InputStream_read(*args, **kwargs)
e811c8ce
RD
1586
1587 def readline(*args, **kwargs):
a95a7133 1588 """readline(self, int size=-1) -> PyObject"""
54f9ee45 1589 return _core_.InputStream_readline(*args, **kwargs)
e811c8ce
RD
1590
1591 def readlines(*args, **kwargs):
a95a7133 1592 """readlines(self, int sizehint=-1) -> PyObject"""
54f9ee45 1593 return _core_.InputStream_readlines(*args, **kwargs)
e811c8ce
RD
1594
1595 def seek(*args, **kwargs):
a95a7133 1596 """seek(self, int offset, int whence=0)"""
54f9ee45 1597 return _core_.InputStream_seek(*args, **kwargs)
e811c8ce
RD
1598
1599 def tell(*args, **kwargs):
a95a7133 1600 """tell(self) -> int"""
54f9ee45 1601 return _core_.InputStream_tell(*args, **kwargs)
e811c8ce
RD
1602
1603 def Peek(*args, **kwargs):
a95a7133 1604 """Peek(self) -> char"""
54f9ee45 1605 return _core_.InputStream_Peek(*args, **kwargs)
e811c8ce
RD
1606
1607 def GetC(*args, **kwargs):
a95a7133 1608 """GetC(self) -> char"""
54f9ee45 1609 return _core_.InputStream_GetC(*args, **kwargs)
e811c8ce
RD
1610
1611 def LastRead(*args, **kwargs):
a95a7133 1612 """LastRead(self) -> size_t"""
54f9ee45 1613 return _core_.InputStream_LastRead(*args, **kwargs)
e811c8ce
RD
1614
1615 def CanRead(*args, **kwargs):
a95a7133 1616 """CanRead(self) -> bool"""
54f9ee45 1617 return _core_.InputStream_CanRead(*args, **kwargs)
e811c8ce
RD
1618
1619 def Eof(*args, **kwargs):
a95a7133 1620 """Eof(self) -> bool"""
54f9ee45 1621 return _core_.InputStream_Eof(*args, **kwargs)
e811c8ce
RD
1622
1623 def Ungetch(*args, **kwargs):
a95a7133 1624 """Ungetch(self, char c) -> bool"""
54f9ee45 1625 return _core_.InputStream_Ungetch(*args, **kwargs)
e811c8ce
RD
1626
1627 def SeekI(*args, **kwargs):
a95a7133 1628 """SeekI(self, long pos, int mode=FromStart) -> long"""
54f9ee45 1629 return _core_.InputStream_SeekI(*args, **kwargs)
e811c8ce
RD
1630
1631 def TellI(*args, **kwargs):
a95a7133 1632 """TellI(self) -> long"""
54f9ee45 1633 return _core_.InputStream_TellI(*args, **kwargs)
e811c8ce 1634
d14a1e28
RD
1635
1636class InputStreamPtr(InputStream):
1637 def __init__(self, this):
1638 self.this = this
1639 if not hasattr(self,"thisown"): self.thisown = 0
1640 self.__class__ = InputStream
54f9ee45 1641_core_.InputStream_swigregister(InputStreamPtr)
d14a1e28
RD
1642DefaultPosition = cvar.DefaultPosition
1643DefaultSize = cvar.DefaultSize
1644
1645class OutputStream(object):
093d3ff1 1646 """Proxy of C++ OutputStream class"""
d14a1e28
RD
1647 def __init__(self): raise RuntimeError, "No constructor defined"
1648 def __repr__(self):
1649 return "<%s.%s; proxy of C++ wxOutputStream instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
e811c8ce 1650 def write(*args, **kwargs):
a95a7133 1651 """write(self, PyObject obj)"""
54f9ee45 1652 return _core_.OutputStream_write(*args, **kwargs)
e811c8ce 1653
d14a1e28
RD
1654
1655class OutputStreamPtr(OutputStream):
1656 def __init__(self, this):
1657 self.this = this
1658 if not hasattr(self,"thisown"): self.thisown = 0
1659 self.__class__ = OutputStream
54f9ee45 1660_core_.OutputStream_swigregister(OutputStreamPtr)
d14a1e28
RD
1661
1662#---------------------------------------------------------------------------
1663
1664class FSFile(Object):
093d3ff1 1665 """Proxy of C++ FSFile class"""
e811c8ce
RD
1666 def __repr__(self):
1667 return "<%s.%s; proxy of C++ wxFSFile instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 1668 def __init__(self, *args, **kwargs):
0df68c9f 1669 """
a95a7133 1670 __init__(self, InputStream stream, String loc, String mimetype, String anchor,
196addbf 1671 DateTime modif) -> FSFile
0df68c9f 1672 """
54f9ee45 1673 newobj = _core_.new_FSFile(*args, **kwargs)
d14a1e28
RD
1674 self.this = newobj.this
1675 self.thisown = 1
1676 del newobj.thisown
4cf4100f
RD
1677 self.thisown = 0 # It will normally be deleted by the user of the wxFileSystem
1678
54f9ee45 1679 def __del__(self, destroy=_core_.delete_FSFile):
a95a7133 1680 """__del__(self)"""
d14a1e28
RD
1681 try:
1682 if self.thisown: destroy(self)
1683 except: pass
e811c8ce
RD
1684
1685 def GetStream(*args, **kwargs):
a95a7133 1686 """GetStream(self) -> InputStream"""
54f9ee45 1687 return _core_.FSFile_GetStream(*args, **kwargs)
e811c8ce
RD
1688
1689 def GetMimeType(*args, **kwargs):
a95a7133 1690 """GetMimeType(self) -> String"""
54f9ee45 1691 return _core_.FSFile_GetMimeType(*args, **kwargs)
e811c8ce
RD
1692
1693 def GetLocation(*args, **kwargs):
a95a7133 1694 """GetLocation(self) -> String"""
54f9ee45 1695 return _core_.FSFile_GetLocation(*args, **kwargs)
e811c8ce
RD
1696
1697 def GetAnchor(*args, **kwargs):
a95a7133 1698 """GetAnchor(self) -> String"""
54f9ee45 1699 return _core_.FSFile_GetAnchor(*args, **kwargs)
e811c8ce
RD
1700
1701 def GetModificationTime(*args, **kwargs):
a95a7133 1702 """GetModificationTime(self) -> DateTime"""
54f9ee45 1703 return _core_.FSFile_GetModificationTime(*args, **kwargs)
e811c8ce 1704
d14a1e28
RD
1705
1706class FSFilePtr(FSFile):
1707 def __init__(self, this):
1708 self.this = this
1709 if not hasattr(self,"thisown"): self.thisown = 0
1710 self.__class__ = FSFile
54f9ee45 1711_core_.FSFile_swigregister(FSFilePtr)
d14a1e28
RD
1712
1713class CPPFileSystemHandler(object):
093d3ff1 1714 """Proxy of C++ CPPFileSystemHandler class"""
d14a1e28
RD
1715 def __init__(self): raise RuntimeError, "No constructor defined"
1716 def __repr__(self):
1717 return "<%s.%s; proxy of C++ wxFileSystemHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
1718
1719class CPPFileSystemHandlerPtr(CPPFileSystemHandler):
1720 def __init__(self, this):
1721 self.this = this
1722 if not hasattr(self,"thisown"): self.thisown = 0
1723 self.__class__ = CPPFileSystemHandler
54f9ee45 1724_core_.CPPFileSystemHandler_swigregister(CPPFileSystemHandlerPtr)
d14a1e28
RD
1725
1726class FileSystemHandler(CPPFileSystemHandler):
093d3ff1 1727 """Proxy of C++ FileSystemHandler class"""
e811c8ce
RD
1728 def __repr__(self):
1729 return "<%s.%s; proxy of C++ wxPyFileSystemHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 1730 def __init__(self, *args, **kwargs):
a95a7133 1731 """__init__(self) -> FileSystemHandler"""
54f9ee45 1732 newobj = _core_.new_FileSystemHandler(*args, **kwargs)
d14a1e28
RD
1733 self.this = newobj.this
1734 self.thisown = 1
1735 del newobj.thisown
1736 self._setCallbackInfo(self, FileSystemHandler)
e811c8ce
RD
1737
1738 def _setCallbackInfo(*args, **kwargs):
a95a7133 1739 """_setCallbackInfo(self, PyObject self, PyObject _class)"""
54f9ee45 1740 return _core_.FileSystemHandler__setCallbackInfo(*args, **kwargs)
e811c8ce
RD
1741
1742 def CanOpen(*args, **kwargs):
a95a7133 1743 """CanOpen(self, String location) -> bool"""
54f9ee45 1744 return _core_.FileSystemHandler_CanOpen(*args, **kwargs)
e811c8ce
RD
1745
1746 def OpenFile(*args, **kwargs):
a95a7133 1747 """OpenFile(self, FileSystem fs, String location) -> FSFile"""
54f9ee45 1748 return _core_.FileSystemHandler_OpenFile(*args, **kwargs)
e811c8ce
RD
1749
1750 def FindFirst(*args, **kwargs):
a95a7133 1751 """FindFirst(self, String spec, int flags=0) -> String"""
54f9ee45 1752 return _core_.FileSystemHandler_FindFirst(*args, **kwargs)
e811c8ce
RD
1753
1754 def FindNext(*args, **kwargs):
a95a7133 1755 """FindNext(self) -> String"""
54f9ee45 1756 return _core_.FileSystemHandler_FindNext(*args, **kwargs)
e811c8ce
RD
1757
1758 def GetProtocol(*args, **kwargs):
a95a7133 1759 """GetProtocol(self, String location) -> String"""
54f9ee45 1760 return _core_.FileSystemHandler_GetProtocol(*args, **kwargs)
e811c8ce
RD
1761
1762 def GetLeftLocation(*args, **kwargs):
a95a7133 1763 """GetLeftLocation(self, String location) -> String"""
54f9ee45 1764 return _core_.FileSystemHandler_GetLeftLocation(*args, **kwargs)
e811c8ce
RD
1765
1766 def GetAnchor(*args, **kwargs):
a95a7133 1767 """GetAnchor(self, String location) -> String"""
54f9ee45 1768 return _core_.FileSystemHandler_GetAnchor(*args, **kwargs)
e811c8ce
RD
1769
1770 def GetRightLocation(*args, **kwargs):
a95a7133 1771 """GetRightLocation(self, String location) -> String"""
54f9ee45 1772 return _core_.FileSystemHandler_GetRightLocation(*args, **kwargs)
e811c8ce
RD
1773
1774 def GetMimeTypeFromExt(*args, **kwargs):
a95a7133 1775 """GetMimeTypeFromExt(self, String location) -> String"""
54f9ee45 1776 return _core_.FileSystemHandler_GetMimeTypeFromExt(*args, **kwargs)
e811c8ce 1777
d14a1e28
RD
1778
1779class FileSystemHandlerPtr(FileSystemHandler):
1780 def __init__(self, this):
1781 self.this = this
1782 if not hasattr(self,"thisown"): self.thisown = 0
1783 self.__class__ = FileSystemHandler
54f9ee45 1784_core_.FileSystemHandler_swigregister(FileSystemHandlerPtr)
d14a1e28
RD
1785
1786class FileSystem(Object):
093d3ff1 1787 """Proxy of C++ FileSystem class"""
e811c8ce
RD
1788 def __repr__(self):
1789 return "<%s.%s; proxy of C++ wxFileSystem instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 1790 def __init__(self, *args, **kwargs):
a95a7133 1791 """__init__(self) -> FileSystem"""
54f9ee45 1792 newobj = _core_.new_FileSystem(*args, **kwargs)
d14a1e28
RD
1793 self.this = newobj.this
1794 self.thisown = 1
1795 del newobj.thisown
54f9ee45 1796 def __del__(self, destroy=_core_.delete_FileSystem):
a95a7133 1797 """__del__(self)"""
d14a1e28
RD
1798 try:
1799 if self.thisown: destroy(self)
1800 except: pass
e811c8ce
RD
1801
1802 def ChangePathTo(*args, **kwargs):
a95a7133 1803 """ChangePathTo(self, String location, bool is_dir=False)"""
54f9ee45 1804 return _core_.FileSystem_ChangePathTo(*args, **kwargs)
e811c8ce
RD
1805
1806 def GetPath(*args, **kwargs):
a95a7133 1807 """GetPath(self) -> String"""
54f9ee45 1808 return _core_.FileSystem_GetPath(*args, **kwargs)
e811c8ce
RD
1809
1810 def OpenFile(*args, **kwargs):
a95a7133 1811 """OpenFile(self, String location) -> FSFile"""
54f9ee45 1812 return _core_.FileSystem_OpenFile(*args, **kwargs)
e811c8ce
RD
1813
1814 def FindFirst(*args, **kwargs):
a95a7133 1815 """FindFirst(self, String spec, int flags=0) -> String"""
54f9ee45 1816 return _core_.FileSystem_FindFirst(*args, **kwargs)
e811c8ce
RD
1817
1818 def FindNext(*args, **kwargs):
a95a7133 1819 """FindNext(self) -> String"""
54f9ee45 1820 return _core_.FileSystem_FindNext(*args, **kwargs)
e811c8ce
RD
1821
1822 def AddHandler(*args, **kwargs):
66c033b4 1823 """AddHandler(CPPFileSystemHandler handler)"""
54f9ee45 1824 return _core_.FileSystem_AddHandler(*args, **kwargs)
e811c8ce
RD
1825
1826 AddHandler = staticmethod(AddHandler)
1827 def CleanUpHandlers(*args, **kwargs):
66c033b4 1828 """CleanUpHandlers()"""
54f9ee45 1829 return _core_.FileSystem_CleanUpHandlers(*args, **kwargs)
e811c8ce
RD
1830
1831 CleanUpHandlers = staticmethod(CleanUpHandlers)
1832 def FileNameToURL(*args, **kwargs):
66c033b4 1833 """FileNameToURL(String filename) -> String"""
54f9ee45 1834 return _core_.FileSystem_FileNameToURL(*args, **kwargs)
e811c8ce
RD
1835
1836 FileNameToURL = staticmethod(FileNameToURL)
2ef75293
RD
1837 def URLToFileName(*args, **kwargs):
1838 """URLToFileName(String url) -> String"""
1839 return _core_.FileSystem_URLToFileName(*args, **kwargs)
1840
1841 URLToFileName = staticmethod(URLToFileName)
d14a1e28
RD
1842
1843class FileSystemPtr(FileSystem):
1844 def __init__(self, this):
1845 self.this = this
1846 if not hasattr(self,"thisown"): self.thisown = 0
1847 self.__class__ = FileSystem
54f9ee45 1848_core_.FileSystem_swigregister(FileSystemPtr)
d14a1e28 1849
e811c8ce
RD
1850def FileSystem_AddHandler(*args, **kwargs):
1851 """FileSystem_AddHandler(CPPFileSystemHandler handler)"""
54f9ee45 1852 return _core_.FileSystem_AddHandler(*args, **kwargs)
d14a1e28 1853
e811c8ce
RD
1854def FileSystem_CleanUpHandlers(*args, **kwargs):
1855 """FileSystem_CleanUpHandlers()"""
54f9ee45 1856 return _core_.FileSystem_CleanUpHandlers(*args, **kwargs)
d14a1e28 1857
e811c8ce 1858def FileSystem_FileNameToURL(*args, **kwargs):
196addbf 1859 """FileSystem_FileNameToURL(String filename) -> String"""
54f9ee45 1860 return _core_.FileSystem_FileNameToURL(*args, **kwargs)
d14a1e28 1861
e811c8ce 1862def FileSystem_URLToFileName(*args, **kwargs):
196addbf 1863 """FileSystem_URLToFileName(String url) -> String"""
54f9ee45 1864 return _core_.FileSystem_URLToFileName(*args, **kwargs)
2ef75293 1865
d14a1e28 1866class InternetFSHandler(CPPFileSystemHandler):
093d3ff1 1867 """Proxy of C++ InternetFSHandler class"""
e811c8ce
RD
1868 def __repr__(self):
1869 return "<%s.%s; proxy of C++ wxInternetFSHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 1870 def __init__(self, *args, **kwargs):
a95a7133 1871 """__init__(self) -> InternetFSHandler"""
54f9ee45 1872 newobj = _core_.new_InternetFSHandler(*args, **kwargs)
d14a1e28
RD
1873 self.this = newobj.this
1874 self.thisown = 1
1875 del newobj.thisown
e811c8ce 1876 def CanOpen(*args, **kwargs):
a95a7133 1877 """CanOpen(self, String location) -> bool"""
54f9ee45 1878 return _core_.InternetFSHandler_CanOpen(*args, **kwargs)
e811c8ce
RD
1879
1880 def OpenFile(*args, **kwargs):
a95a7133 1881 """OpenFile(self, FileSystem fs, String location) -> FSFile"""
54f9ee45 1882 return _core_.InternetFSHandler_OpenFile(*args, **kwargs)
e811c8ce 1883
d14a1e28
RD
1884
1885class InternetFSHandlerPtr(InternetFSHandler):
1886 def __init__(self, this):
1887 self.this = this
1888 if not hasattr(self,"thisown"): self.thisown = 0
1889 self.__class__ = InternetFSHandler
54f9ee45 1890_core_.InternetFSHandler_swigregister(InternetFSHandlerPtr)
d14a1e28
RD
1891
1892class ZipFSHandler(CPPFileSystemHandler):
093d3ff1 1893 """Proxy of C++ ZipFSHandler class"""
e811c8ce
RD
1894 def __repr__(self):
1895 return "<%s.%s; proxy of C++ wxZipFSHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 1896 def __init__(self, *args, **kwargs):
a95a7133 1897 """__init__(self) -> ZipFSHandler"""
54f9ee45 1898 newobj = _core_.new_ZipFSHandler(*args, **kwargs)
d14a1e28
RD
1899 self.this = newobj.this
1900 self.thisown = 1
1901 del newobj.thisown
e811c8ce 1902 def CanOpen(*args, **kwargs):
a95a7133 1903 """CanOpen(self, String location) -> bool"""
54f9ee45 1904 return _core_.ZipFSHandler_CanOpen(*args, **kwargs)
e811c8ce
RD
1905
1906 def OpenFile(*args, **kwargs):
a95a7133 1907 """OpenFile(self, FileSystem fs, String location) -> FSFile"""
54f9ee45 1908 return _core_.ZipFSHandler_OpenFile(*args, **kwargs)
e811c8ce
RD
1909
1910 def FindFirst(*args, **kwargs):
a95a7133 1911 """FindFirst(self, String spec, int flags=0) -> String"""
54f9ee45 1912 return _core_.ZipFSHandler_FindFirst(*args, **kwargs)
e811c8ce
RD
1913
1914 def FindNext(*args, **kwargs):
a95a7133 1915 """FindNext(self) -> String"""
54f9ee45 1916 return _core_.ZipFSHandler_FindNext(*args, **kwargs)
e811c8ce 1917
d14a1e28
RD
1918
1919class ZipFSHandlerPtr(ZipFSHandler):
1920 def __init__(self, this):
1921 self.this = this
1922 if not hasattr(self,"thisown"): self.thisown = 0
1923 self.__class__ = ZipFSHandler
54f9ee45 1924_core_.ZipFSHandler_swigregister(ZipFSHandlerPtr)
d14a1e28
RD
1925
1926
e811c8ce 1927def __wxMemoryFSHandler_AddFile_wxImage(*args, **kwargs):
196addbf 1928 """__wxMemoryFSHandler_AddFile_wxImage(String filename, Image image, long type)"""
54f9ee45 1929 return _core_.__wxMemoryFSHandler_AddFile_wxImage(*args, **kwargs)
d14a1e28 1930
e811c8ce 1931def __wxMemoryFSHandler_AddFile_wxBitmap(*args, **kwargs):
196addbf 1932 """__wxMemoryFSHandler_AddFile_wxBitmap(String filename, Bitmap bitmap, long type)"""
54f9ee45 1933 return _core_.__wxMemoryFSHandler_AddFile_wxBitmap(*args, **kwargs)
d14a1e28 1934
e811c8ce 1935def __wxMemoryFSHandler_AddFile_Data(*args, **kwargs):
196addbf 1936 """__wxMemoryFSHandler_AddFile_Data(String filename, PyObject data)"""
54f9ee45 1937 return _core_.__wxMemoryFSHandler_AddFile_Data(*args, **kwargs)
2ef75293
RD
1938def MemoryFSHandler_AddFile(filename, dataItem, imgType=-1):
1939 """
1940 Add 'file' to the memory filesystem. The dataItem parameter can
1941 either be a `wx.Bitmap`, `wx.Image` or a string that can contain
1942 arbitrary data. If a bitmap or image is used then the imgType
1943 parameter should specify what kind of image file it should be
1944 written as, wx.BITMAP_TYPE_PNG, etc.
1945 """
1946 if isinstance(dataItem, wx.Image):
1947 __wxMemoryFSHandler_AddFile_wxImage(filename, dataItem, imgType)
1948 elif isinstance(dataItem, wx.Bitmap):
1949 __wxMemoryFSHandler_AddFile_wxBitmap(filename, dataItem, imgType)
1950 elif type(dataItem) == str:
1951 __wxMemoryFSHandler_AddFile_Data(filename, dataItem)
1952 else:
1953 raise TypeError, 'wx.Image, wx.Bitmap or string expected'
d14a1e28
RD
1954
1955class MemoryFSHandler(CPPFileSystemHandler):
093d3ff1 1956 """Proxy of C++ MemoryFSHandler class"""
e811c8ce
RD
1957 def __repr__(self):
1958 return "<%s.%s; proxy of C++ wxMemoryFSHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 1959 def __init__(self, *args, **kwargs):
a95a7133 1960 """__init__(self) -> MemoryFSHandler"""
54f9ee45 1961 newobj = _core_.new_MemoryFSHandler(*args, **kwargs)
d14a1e28
RD
1962 self.this = newobj.this
1963 self.thisown = 1
1964 del newobj.thisown
e811c8ce 1965 def RemoveFile(*args, **kwargs):
66c033b4 1966 """RemoveFile(String filename)"""
54f9ee45 1967 return _core_.MemoryFSHandler_RemoveFile(*args, **kwargs)
e811c8ce
RD
1968
1969 RemoveFile = staticmethod(RemoveFile)
d14a1e28 1970 AddFile = staticmethod(MemoryFSHandler_AddFile)
e811c8ce 1971 def CanOpen(*args, **kwargs):
a95a7133 1972 """CanOpen(self, String location) -> bool"""
54f9ee45 1973 return _core_.MemoryFSHandler_CanOpen(*args, **kwargs)
e811c8ce
RD
1974
1975 def OpenFile(*args, **kwargs):
a95a7133 1976 """OpenFile(self, FileSystem fs, String location) -> FSFile"""
54f9ee45 1977 return _core_.MemoryFSHandler_OpenFile(*args, **kwargs)
e811c8ce
RD
1978
1979 def FindFirst(*args, **kwargs):
a95a7133 1980 """FindFirst(self, String spec, int flags=0) -> String"""
54f9ee45 1981 return _core_.MemoryFSHandler_FindFirst(*args, **kwargs)
e811c8ce
RD
1982
1983 def FindNext(*args, **kwargs):
a95a7133 1984 """FindNext(self) -> String"""
54f9ee45 1985 return _core_.MemoryFSHandler_FindNext(*args, **kwargs)
e811c8ce 1986
d14a1e28
RD
1987
1988class MemoryFSHandlerPtr(MemoryFSHandler):
1989 def __init__(self, this):
1990 self.this = this
1991 if not hasattr(self,"thisown"): self.thisown = 0
1992 self.__class__ = MemoryFSHandler
54f9ee45 1993_core_.MemoryFSHandler_swigregister(MemoryFSHandlerPtr)
d14a1e28 1994
e811c8ce 1995def MemoryFSHandler_RemoveFile(*args, **kwargs):
196addbf 1996 """MemoryFSHandler_RemoveFile(String filename)"""
54f9ee45 1997 return _core_.MemoryFSHandler_RemoveFile(*args, **kwargs)
d14a1e28
RD
1998
1999#---------------------------------------------------------------------------
2000
2001class ImageHandler(Object):
093d3ff1 2002 """Proxy of C++ ImageHandler class"""
d14a1e28
RD
2003 def __init__(self): raise RuntimeError, "No constructor defined"
2004 def __repr__(self):
2005 return "<%s.%s; proxy of C++ wxImageHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
e811c8ce 2006 def GetName(*args, **kwargs):
a95a7133 2007 """GetName(self) -> String"""
54f9ee45 2008 return _core_.ImageHandler_GetName(*args, **kwargs)
e811c8ce
RD
2009
2010 def GetExtension(*args, **kwargs):
a95a7133 2011 """GetExtension(self) -> String"""
54f9ee45 2012 return _core_.ImageHandler_GetExtension(*args, **kwargs)
e811c8ce
RD
2013
2014 def GetType(*args, **kwargs):
a95a7133 2015 """GetType(self) -> long"""
54f9ee45 2016 return _core_.ImageHandler_GetType(*args, **kwargs)
e811c8ce
RD
2017
2018 def GetMimeType(*args, **kwargs):
a95a7133 2019 """GetMimeType(self) -> String"""
54f9ee45 2020 return _core_.ImageHandler_GetMimeType(*args, **kwargs)
e811c8ce
RD
2021
2022 def CanRead(*args, **kwargs):
a95a7133 2023 """CanRead(self, String name) -> bool"""
54f9ee45 2024 return _core_.ImageHandler_CanRead(*args, **kwargs)
e811c8ce
RD
2025
2026 def SetName(*args, **kwargs):
a95a7133 2027 """SetName(self, String name)"""
54f9ee45 2028 return _core_.ImageHandler_SetName(*args, **kwargs)
e811c8ce
RD
2029
2030 def SetExtension(*args, **kwargs):
a95a7133 2031 """SetExtension(self, String extension)"""
54f9ee45 2032 return _core_.ImageHandler_SetExtension(*args, **kwargs)
e811c8ce
RD
2033
2034 def SetType(*args, **kwargs):
a95a7133 2035 """SetType(self, long type)"""
54f9ee45 2036 return _core_.ImageHandler_SetType(*args, **kwargs)
e811c8ce
RD
2037
2038 def SetMimeType(*args, **kwargs):
a95a7133 2039 """SetMimeType(self, String mimetype)"""
54f9ee45 2040 return _core_.ImageHandler_SetMimeType(*args, **kwargs)
e811c8ce 2041
d14a1e28
RD
2042
2043class ImageHandlerPtr(ImageHandler):
2044 def __init__(self, this):
2045 self.this = this
2046 if not hasattr(self,"thisown"): self.thisown = 0
2047 self.__class__ = ImageHandler
54f9ee45 2048_core_.ImageHandler_swigregister(ImageHandlerPtr)
d14a1e28
RD
2049
2050class ImageHistogram(object):
093d3ff1 2051 """Proxy of C++ ImageHistogram class"""
e811c8ce
RD
2052 def __repr__(self):
2053 return "<%s.%s; proxy of C++ wxImageHistogram instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 2054 def __init__(self, *args, **kwargs):
a95a7133 2055 """__init__(self) -> ImageHistogram"""
54f9ee45 2056 newobj = _core_.new_ImageHistogram(*args, **kwargs)
d14a1e28
RD
2057 self.this = newobj.this
2058 self.thisown = 1
2059 del newobj.thisown
e811c8ce 2060 def MakeKey(*args, **kwargs):
0df68c9f 2061 """
66c033b4 2062 MakeKey(unsigned char r, unsigned char g, unsigned char b) -> unsigned long
e811c8ce 2063
0df68c9f
RD
2064 Get the key in the histogram for the given RGB values
2065 """
54f9ee45 2066 return _core_.ImageHistogram_MakeKey(*args, **kwargs)
e811c8ce
RD
2067
2068 MakeKey = staticmethod(MakeKey)
2069 def FindFirstUnusedColour(*args, **kwargs):
fd2dc343
RD
2070 """
2071 FindFirstUnusedColour(int startR=1, int startG=0, int startB=0) -> (success, r, g, b)
2072
2073 Find first colour that is not used in the image and has higher RGB
2074 values than startR, startG, startB. Returns a tuple consisting of a
2075 success flag and rgb values.
2076 """
54f9ee45 2077 return _core_.ImageHistogram_FindFirstUnusedColour(*args, **kwargs)
e811c8ce 2078
d14a1e28
RD
2079
2080class ImageHistogramPtr(ImageHistogram):
2081 def __init__(self, this):
2082 self.this = this
2083 if not hasattr(self,"thisown"): self.thisown = 0
2084 self.__class__ = ImageHistogram
54f9ee45 2085_core_.ImageHistogram_swigregister(ImageHistogramPtr)
d14a1e28 2086
e811c8ce 2087def ImageHistogram_MakeKey(*args, **kwargs):
0df68c9f
RD
2088 """
2089 ImageHistogram_MakeKey(unsigned char r, unsigned char g, unsigned char b) -> unsigned long
e811c8ce 2090
0df68c9f
RD
2091 Get the key in the histogram for the given RGB values
2092 """
54f9ee45 2093 return _core_.ImageHistogram_MakeKey(*args, **kwargs)
d14a1e28
RD
2094
2095class Image(Object):
093d3ff1 2096 """Proxy of C++ Image class"""
e811c8ce
RD
2097 def __repr__(self):
2098 return "<%s.%s; proxy of C++ wxImage instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 2099 def __init__(self, *args, **kwargs):
a95a7133 2100 """__init__(self, String name, long type=BITMAP_TYPE_ANY, int index=-1) -> Image"""
54f9ee45 2101 newobj = _core_.new_Image(*args, **kwargs)
d14a1e28
RD
2102 self.this = newobj.this
2103 self.thisown = 1
2104 del newobj.thisown
54f9ee45 2105 def __del__(self, destroy=_core_.delete_Image):
a95a7133 2106 """__del__(self)"""
d14a1e28
RD
2107 try:
2108 if self.thisown: destroy(self)
2109 except: pass
e811c8ce
RD
2110
2111 def Create(*args, **kwargs):
a95a7133 2112 """Create(self, int width, int height)"""
54f9ee45 2113 return _core_.Image_Create(*args, **kwargs)
e811c8ce
RD
2114
2115 def Destroy(*args, **kwargs):
0df68c9f 2116 """
a95a7133 2117 Destroy(self)
e811c8ce 2118
0df68c9f
RD
2119 Deletes the C++ object this Python object is a proxy for.
2120 """
54f9ee45 2121 return _core_.Image_Destroy(*args, **kwargs)
e811c8ce
RD
2122
2123 def Scale(*args, **kwargs):
a95a7133 2124 """Scale(self, int width, int height) -> Image"""
54f9ee45 2125 return _core_.Image_Scale(*args, **kwargs)
e811c8ce
RD
2126
2127 def ShrinkBy(*args, **kwargs):
a95a7133 2128 """ShrinkBy(self, int xFactor, int yFactor) -> Image"""
54f9ee45 2129 return _core_.Image_ShrinkBy(*args, **kwargs)
e811c8ce
RD
2130
2131 def Rescale(*args, **kwargs):
a95a7133 2132 """Rescale(self, int width, int height) -> Image"""
54f9ee45 2133 return _core_.Image_Rescale(*args, **kwargs)
e811c8ce
RD
2134
2135 def SetRGB(*args, **kwargs):
a95a7133 2136 """SetRGB(self, int x, int y, unsigned char r, unsigned char g, unsigned char b)"""
54f9ee45 2137 return _core_.Image_SetRGB(*args, **kwargs)
e811c8ce
RD
2138
2139 def GetRed(*args, **kwargs):
a95a7133 2140 """GetRed(self, int x, int y) -> unsigned char"""
54f9ee45 2141 return _core_.Image_GetRed(*args, **kwargs)
e811c8ce
RD
2142
2143 def GetGreen(*args, **kwargs):
a95a7133 2144 """GetGreen(self, int x, int y) -> unsigned char"""
54f9ee45 2145 return _core_.Image_GetGreen(*args, **kwargs)
e811c8ce
RD
2146
2147 def GetBlue(*args, **kwargs):
a95a7133 2148 """GetBlue(self, int x, int y) -> unsigned char"""
54f9ee45 2149 return _core_.Image_GetBlue(*args, **kwargs)
e811c8ce
RD
2150
2151 def SetAlpha(*args, **kwargs):
a95a7133 2152 """SetAlpha(self, int x, int y, unsigned char alpha)"""
54f9ee45 2153 return _core_.Image_SetAlpha(*args, **kwargs)
e811c8ce
RD
2154
2155 def GetAlpha(*args, **kwargs):
a95a7133 2156 """GetAlpha(self, int x, int y) -> unsigned char"""
54f9ee45 2157 return _core_.Image_GetAlpha(*args, **kwargs)
e811c8ce
RD
2158
2159 def HasAlpha(*args, **kwargs):
a95a7133 2160 """HasAlpha(self) -> bool"""
54f9ee45 2161 return _core_.Image_HasAlpha(*args, **kwargs)
e811c8ce
RD
2162
2163 def FindFirstUnusedColour(*args, **kwargs):
fd2dc343
RD
2164 """
2165 FindFirstUnusedColour(int startR=1, int startG=0, int startB=0) -> (success, r, g, b)
2166
2167 Find first colour that is not used in the image and has higher RGB
2168 values than startR, startG, startB. Returns a tuple consisting of a
2169 success flag and rgb values.
2170 """
54f9ee45 2171 return _core_.Image_FindFirstUnusedColour(*args, **kwargs)
e811c8ce 2172
4cf4100f
RD
2173 def ConvertAlphaToMask(*args, **kwargs):
2174 """
2175 ConvertAlphaToMask(self, byte threshold=128) -> bool
2176
2177 If the image has alpha channel, this method converts it to mask. All pixels
2178 with alpha value less than ``threshold`` are replaced with mask colour and the
2179 alpha channel is removed. Mask colour is chosen automatically using
2180 `FindFirstUnusedColour`.
2181
2182 If the image image doesn't have alpha channel, ConvertAlphaToMask does
2183 nothing.
2184 """
2185 return _core_.Image_ConvertAlphaToMask(*args, **kwargs)
2186
8fb0e70a
RD
2187 def ConvertColourToAlpha(*args, **kwargs):
2188 """
2189 ConvertColourToAlpha(self, unsigned char r, unsigned char g, unsigned char b) -> bool
2190
2191 This method converts an image where the original alpha information is
2192 only available as a shades of a colour (actually shades of grey)
2193 typically when you draw anti-aliased text into a bitmap. The DC
2194 drawing routines draw grey values on the black background although
2195 they actually mean to draw white with differnt alpha values. This
2196 method reverses it, assuming a black (!) background and white text.
2197 The method will then fill up the whole image with the colour given.
2198 """
2199 return _core_.Image_ConvertColourToAlpha(*args, **kwargs)
2200
e811c8ce 2201 def SetMaskFromImage(*args, **kwargs):
a95a7133 2202 """SetMaskFromImage(self, Image mask, byte mr, byte mg, byte mb) -> bool"""
54f9ee45 2203 return _core_.Image_SetMaskFromImage(*args, **kwargs)
e811c8ce
RD
2204
2205 def CanRead(*args, **kwargs):
66c033b4 2206 """CanRead(String name) -> bool"""
54f9ee45 2207 return _core_.Image_CanRead(*args, **kwargs)
e811c8ce
RD
2208
2209 CanRead = staticmethod(CanRead)
2210 def GetImageCount(*args, **kwargs):
66c033b4 2211 """GetImageCount(String name, long type=BITMAP_TYPE_ANY) -> int"""
54f9ee45 2212 return _core_.Image_GetImageCount(*args, **kwargs)
e811c8ce
RD
2213
2214 GetImageCount = staticmethod(GetImageCount)
2215 def LoadFile(*args, **kwargs):
a95a7133 2216 """LoadFile(self, String name, long type=BITMAP_TYPE_ANY, int index=-1) -> bool"""
54f9ee45 2217 return _core_.Image_LoadFile(*args, **kwargs)
e811c8ce
RD
2218
2219 def LoadMimeFile(*args, **kwargs):
a95a7133 2220 """LoadMimeFile(self, String name, String mimetype, int index=-1) -> bool"""
54f9ee45 2221 return _core_.Image_LoadMimeFile(*args, **kwargs)
e811c8ce
RD
2222
2223 def SaveFile(*args, **kwargs):
a95a7133 2224 """SaveFile(self, String name, int type) -> bool"""
54f9ee45 2225 return _core_.Image_SaveFile(*args, **kwargs)
e811c8ce
RD
2226
2227 def SaveMimeFile(*args, **kwargs):
a95a7133 2228 """SaveMimeFile(self, String name, String mimetype) -> bool"""
54f9ee45 2229 return _core_.Image_SaveMimeFile(*args, **kwargs)
e811c8ce
RD
2230
2231 def CanReadStream(*args, **kwargs):
66c033b4 2232 """CanReadStream(InputStream stream) -> bool"""
54f9ee45 2233 return _core_.Image_CanReadStream(*args, **kwargs)
e811c8ce
RD
2234
2235 CanReadStream = staticmethod(CanReadStream)
2236 def LoadStream(*args, **kwargs):
a95a7133 2237 """LoadStream(self, InputStream stream, long type=BITMAP_TYPE_ANY, int index=-1) -> bool"""
54f9ee45 2238 return _core_.Image_LoadStream(*args, **kwargs)
e811c8ce
RD
2239
2240 def LoadMimeStream(*args, **kwargs):
a95a7133 2241 """LoadMimeStream(self, InputStream stream, String mimetype, int index=-1) -> bool"""
54f9ee45 2242 return _core_.Image_LoadMimeStream(*args, **kwargs)
e811c8ce
RD
2243
2244 def Ok(*args, **kwargs):
a95a7133 2245 """Ok(self) -> bool"""
54f9ee45 2246 return _core_.Image_Ok(*args, **kwargs)
e811c8ce
RD
2247
2248 def GetWidth(*args, **kwargs):
a95a7133 2249 """GetWidth(self) -> int"""
54f9ee45 2250 return _core_.Image_GetWidth(*args, **kwargs)
e811c8ce
RD
2251
2252 def GetHeight(*args, **kwargs):
a95a7133 2253 """GetHeight(self) -> int"""
54f9ee45 2254 return _core_.Image_GetHeight(*args, **kwargs)
e811c8ce 2255
b2df227b 2256 def GetSize(*args, **kwargs):
a95a7133 2257 """GetSize(self) -> Size"""
54f9ee45 2258 return _core_.Image_GetSize(*args, **kwargs)
b2df227b 2259
e811c8ce 2260 def GetSubImage(*args, **kwargs):
a95a7133 2261 """GetSubImage(self, Rect rect) -> Image"""
54f9ee45 2262 return _core_.Image_GetSubImage(*args, **kwargs)
e811c8ce
RD
2263
2264 def Copy(*args, **kwargs):
a95a7133 2265 """Copy(self) -> Image"""
54f9ee45 2266 return _core_.Image_Copy(*args, **kwargs)
e811c8ce
RD
2267
2268 def Paste(*args, **kwargs):
a95a7133 2269 """Paste(self, Image image, int x, int y)"""
54f9ee45 2270 return _core_.Image_Paste(*args, **kwargs)
e811c8ce
RD
2271
2272 def GetData(*args, **kwargs):
a95a7133 2273 """GetData(self) -> PyObject"""
54f9ee45 2274 return _core_.Image_GetData(*args, **kwargs)
e811c8ce
RD
2275
2276 def SetData(*args, **kwargs):
a95a7133 2277 """SetData(self, PyObject data)"""
54f9ee45 2278 return _core_.Image_SetData(*args, **kwargs)
e811c8ce
RD
2279
2280 def GetDataBuffer(*args, **kwargs):
a95a7133 2281 """GetDataBuffer(self) -> PyObject"""
54f9ee45 2282 return _core_.Image_GetDataBuffer(*args, **kwargs)
e811c8ce
RD
2283
2284 def SetDataBuffer(*args, **kwargs):
a95a7133 2285 """SetDataBuffer(self, PyObject data)"""
54f9ee45 2286 return _core_.Image_SetDataBuffer(*args, **kwargs)
e811c8ce
RD
2287
2288 def GetAlphaData(*args, **kwargs):
a95a7133 2289 """GetAlphaData(self) -> PyObject"""
54f9ee45 2290 return _core_.Image_GetAlphaData(*args, **kwargs)
e811c8ce
RD
2291
2292 def SetAlphaData(*args, **kwargs):
a95a7133 2293 """SetAlphaData(self, PyObject data)"""
54f9ee45 2294 return _core_.Image_SetAlphaData(*args, **kwargs)
e811c8ce
RD
2295
2296 def GetAlphaBuffer(*args, **kwargs):
a95a7133 2297 """GetAlphaBuffer(self) -> PyObject"""
54f9ee45 2298 return _core_.Image_GetAlphaBuffer(*args, **kwargs)
e811c8ce
RD
2299
2300 def SetAlphaBuffer(*args, **kwargs):
a95a7133 2301 """SetAlphaBuffer(self, PyObject data)"""
54f9ee45 2302 return _core_.Image_SetAlphaBuffer(*args, **kwargs)
e811c8ce
RD
2303
2304 def SetMaskColour(*args, **kwargs):
a95a7133 2305 """SetMaskColour(self, unsigned char r, unsigned char g, unsigned char b)"""
54f9ee45 2306 return _core_.Image_SetMaskColour(*args, **kwargs)
e811c8ce
RD
2307
2308 def GetMaskRed(*args, **kwargs):
a95a7133 2309 """GetMaskRed(self) -> unsigned char"""
54f9ee45 2310 return _core_.Image_GetMaskRed(*args, **kwargs)
e811c8ce
RD
2311
2312 def GetMaskGreen(*args, **kwargs):
a95a7133 2313 """GetMaskGreen(self) -> unsigned char"""
54f9ee45 2314 return _core_.Image_GetMaskGreen(*args, **kwargs)
e811c8ce
RD
2315
2316 def GetMaskBlue(*args, **kwargs):
a95a7133 2317 """GetMaskBlue(self) -> unsigned char"""
54f9ee45 2318 return _core_.Image_GetMaskBlue(*args, **kwargs)
e811c8ce
RD
2319
2320 def SetMask(*args, **kwargs):
a95a7133 2321 """SetMask(self, bool mask=True)"""
54f9ee45 2322 return _core_.Image_SetMask(*args, **kwargs)
e811c8ce
RD
2323
2324 def HasMask(*args, **kwargs):
a95a7133 2325 """HasMask(self) -> bool"""
54f9ee45 2326 return _core_.Image_HasMask(*args, **kwargs)
e811c8ce
RD
2327
2328 def Rotate(*args, **kwargs):
0df68c9f 2329 """
a95a7133 2330 Rotate(self, double angle, Point centre_of_rotation, bool interpolating=True,
0df68c9f
RD
2331 Point offset_after_rotation=None) -> Image
2332 """
54f9ee45 2333 return _core_.Image_Rotate(*args, **kwargs)
e811c8ce
RD
2334
2335 def Rotate90(*args, **kwargs):
a95a7133 2336 """Rotate90(self, bool clockwise=True) -> Image"""
54f9ee45 2337 return _core_.Image_Rotate90(*args, **kwargs)
e811c8ce
RD
2338
2339 def Mirror(*args, **kwargs):
a95a7133 2340 """Mirror(self, bool horizontally=True) -> Image"""
54f9ee45 2341 return _core_.Image_Mirror(*args, **kwargs)
e811c8ce
RD
2342
2343 def Replace(*args, **kwargs):
0df68c9f 2344 """
a95a7133 2345 Replace(self, unsigned char r1, unsigned char g1, unsigned char b1,
0df68c9f
RD
2346 unsigned char r2, unsigned char g2, unsigned char b2)
2347 """
54f9ee45 2348 return _core_.Image_Replace(*args, **kwargs)
e811c8ce
RD
2349
2350 def ConvertToMono(*args, **kwargs):
a95a7133 2351 """ConvertToMono(self, unsigned char r, unsigned char g, unsigned char b) -> Image"""
54f9ee45 2352 return _core_.Image_ConvertToMono(*args, **kwargs)
e811c8ce
RD
2353
2354 def SetOption(*args, **kwargs):
a95a7133 2355 """SetOption(self, String name, String value)"""
54f9ee45 2356 return _core_.Image_SetOption(*args, **kwargs)
e811c8ce
RD
2357
2358 def SetOptionInt(*args, **kwargs):
a95a7133 2359 """SetOptionInt(self, String name, int value)"""
54f9ee45 2360 return _core_.Image_SetOptionInt(*args, **kwargs)
e811c8ce
RD
2361
2362 def GetOption(*args, **kwargs):
a95a7133 2363 """GetOption(self, String name) -> String"""
54f9ee45 2364 return _core_.Image_GetOption(*args, **kwargs)
e811c8ce
RD
2365
2366 def GetOptionInt(*args, **kwargs):
a95a7133 2367 """GetOptionInt(self, String name) -> int"""
54f9ee45 2368 return _core_.Image_GetOptionInt(*args, **kwargs)
e811c8ce
RD
2369
2370 def HasOption(*args, **kwargs):
a95a7133 2371 """HasOption(self, String name) -> bool"""
54f9ee45 2372 return _core_.Image_HasOption(*args, **kwargs)
e811c8ce
RD
2373
2374 def CountColours(*args, **kwargs):
a95a7133 2375 """CountColours(self, unsigned long stopafter=(unsigned long) -1) -> unsigned long"""
54f9ee45 2376 return _core_.Image_CountColours(*args, **kwargs)
e811c8ce
RD
2377
2378 def ComputeHistogram(*args, **kwargs):
a95a7133 2379 """ComputeHistogram(self, ImageHistogram h) -> unsigned long"""
54f9ee45 2380 return _core_.Image_ComputeHistogram(*args, **kwargs)
e811c8ce
RD
2381
2382 def AddHandler(*args, **kwargs):
66c033b4 2383 """AddHandler(ImageHandler handler)"""
54f9ee45 2384 return _core_.Image_AddHandler(*args, **kwargs)
e811c8ce
RD
2385
2386 AddHandler = staticmethod(AddHandler)
2387 def InsertHandler(*args, **kwargs):
66c033b4 2388 """InsertHandler(ImageHandler handler)"""
54f9ee45 2389 return _core_.Image_InsertHandler(*args, **kwargs)
e811c8ce
RD
2390
2391 InsertHandler = staticmethod(InsertHandler)
2392 def RemoveHandler(*args, **kwargs):
66c033b4 2393 """RemoveHandler(String name) -> bool"""
54f9ee45 2394 return _core_.Image_RemoveHandler(*args, **kwargs)
e811c8ce
RD
2395
2396 RemoveHandler = staticmethod(RemoveHandler)
2397 def GetImageExtWildcard(*args, **kwargs):
66c033b4 2398 """GetImageExtWildcard() -> String"""
54f9ee45 2399 return _core_.Image_GetImageExtWildcard(*args, **kwargs)
e811c8ce
RD
2400
2401 GetImageExtWildcard = staticmethod(GetImageExtWildcard)
2402 def ConvertToBitmap(*args, **kwargs):
1fbf26be 2403 """ConvertToBitmap(self, int depth=-1) -> Bitmap"""
54f9ee45 2404 return _core_.Image_ConvertToBitmap(*args, **kwargs)
e811c8ce
RD
2405
2406 def ConvertToMonoBitmap(*args, **kwargs):
a95a7133 2407 """ConvertToMonoBitmap(self, unsigned char red, unsigned char green, unsigned char blue) -> Bitmap"""
54f9ee45 2408 return _core_.Image_ConvertToMonoBitmap(*args, **kwargs)
e811c8ce
RD
2409
2410 def __nonzero__(self): return self.Ok()
d14a1e28
RD
2411
2412class ImagePtr(Image):
2413 def __init__(self, this):
2414 self.this = this
2415 if not hasattr(self,"thisown"): self.thisown = 0
2416 self.__class__ = Image
54f9ee45 2417_core_.Image_swigregister(ImagePtr)
d14a1e28
RD
2418
2419def ImageFromMime(*args, **kwargs):
196addbf 2420 """ImageFromMime(String name, String mimetype, int index=-1) -> Image"""
54f9ee45 2421 val = _core_.new_ImageFromMime(*args, **kwargs)
d14a1e28
RD
2422 val.thisown = 1
2423 return val
2424
2425def ImageFromStream(*args, **kwargs):
196addbf 2426 """ImageFromStream(InputStream stream, long type=BITMAP_TYPE_ANY, int index=-1) -> Image"""
54f9ee45 2427 val = _core_.new_ImageFromStream(*args, **kwargs)
d14a1e28
RD
2428 val.thisown = 1
2429 return val
2430
2431def ImageFromStreamMime(*args, **kwargs):
196addbf 2432 """ImageFromStreamMime(InputStream stream, String mimetype, int index=-1) -> Image"""
54f9ee45 2433 val = _core_.new_ImageFromStreamMime(*args, **kwargs)
d14a1e28
RD
2434 val.thisown = 1
2435 return val
2436
66c033b4
RD
2437def EmptyImage(*args, **kwargs):
2438 """EmptyImage(int width=0, int height=0, bool clear=True) -> Image"""
2439 val = _core_.new_EmptyImage(*args, **kwargs)
d14a1e28
RD
2440 val.thisown = 1
2441 return val
2442
2443def ImageFromBitmap(*args, **kwargs):
196addbf 2444 """ImageFromBitmap(Bitmap bitmap) -> Image"""
54f9ee45 2445 val = _core_.new_ImageFromBitmap(*args, **kwargs)
d14a1e28
RD
2446 val.thisown = 1
2447 return val
2448
2449def ImageFromData(*args, **kwargs):
e811c8ce 2450 """ImageFromData(int width, int height, unsigned char data) -> Image"""
54f9ee45 2451 val = _core_.new_ImageFromData(*args, **kwargs)
d14a1e28
RD
2452 val.thisown = 1
2453 return val
2454
1823fbb4
RD
2455def ImageFromDataWithAlpha(*args, **kwargs):
2456 """ImageFromDataWithAlpha(int width, int height, unsigned char data, unsigned char alpha) -> Image"""
2457 val = _core_.new_ImageFromDataWithAlpha(*args, **kwargs)
2458 val.thisown = 1
2459 return val
2460
e811c8ce 2461def Image_CanRead(*args, **kwargs):
196addbf 2462 """Image_CanRead(String name) -> bool"""
54f9ee45 2463 return _core_.Image_CanRead(*args, **kwargs)
d14a1e28 2464
e811c8ce 2465def Image_GetImageCount(*args, **kwargs):
196addbf 2466 """Image_GetImageCount(String name, long type=BITMAP_TYPE_ANY) -> int"""
54f9ee45 2467 return _core_.Image_GetImageCount(*args, **kwargs)
d14a1e28 2468
e811c8ce 2469def Image_CanReadStream(*args, **kwargs):
196addbf 2470 """Image_CanReadStream(InputStream stream) -> bool"""
54f9ee45 2471 return _core_.Image_CanReadStream(*args, **kwargs)
d14a1e28 2472
e811c8ce
RD
2473def Image_AddHandler(*args, **kwargs):
2474 """Image_AddHandler(ImageHandler handler)"""
54f9ee45 2475 return _core_.Image_AddHandler(*args, **kwargs)
d14a1e28 2476
e811c8ce
RD
2477def Image_InsertHandler(*args, **kwargs):
2478 """Image_InsertHandler(ImageHandler handler)"""
54f9ee45 2479 return _core_.Image_InsertHandler(*args, **kwargs)
d14a1e28 2480
e811c8ce 2481def Image_RemoveHandler(*args, **kwargs):
196addbf 2482 """Image_RemoveHandler(String name) -> bool"""
54f9ee45 2483 return _core_.Image_RemoveHandler(*args, **kwargs)
d14a1e28 2484
e811c8ce 2485def Image_GetImageExtWildcard(*args, **kwargs):
196addbf 2486 """Image_GetImageExtWildcard() -> String"""
54f9ee45 2487 return _core_.Image_GetImageExtWildcard(*args, **kwargs)
d14a1e28 2488
5e4ca4a8
RD
2489def InitAllImageHandlers():
2490 """
2491 The former functionality of InitAllImageHanders is now done internal to
2492 the _core_ extension module and so this function has become a simple NOP.
2493 """
2494 pass
d14a1e28 2495
54f9ee45
RD
2496IMAGE_RESOLUTION_INCHES = _core_.IMAGE_RESOLUTION_INCHES
2497IMAGE_RESOLUTION_CM = _core_.IMAGE_RESOLUTION_CM
2498BMP_24BPP = _core_.BMP_24BPP
2499BMP_8BPP = _core_.BMP_8BPP
2500BMP_8BPP_GREY = _core_.BMP_8BPP_GREY
2501BMP_8BPP_GRAY = _core_.BMP_8BPP_GRAY
2502BMP_8BPP_RED = _core_.BMP_8BPP_RED
2503BMP_8BPP_PALETTE = _core_.BMP_8BPP_PALETTE
2504BMP_4BPP = _core_.BMP_4BPP
2505BMP_1BPP = _core_.BMP_1BPP
2506BMP_1BPP_BW = _core_.BMP_1BPP_BW
d14a1e28 2507class BMPHandler(ImageHandler):
093d3ff1 2508 """Proxy of C++ BMPHandler class"""
e811c8ce
RD
2509 def __repr__(self):
2510 return "<%s.%s; proxy of C++ wxBMPHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 2511 def __init__(self, *args, **kwargs):
a95a7133 2512 """__init__(self) -> BMPHandler"""
54f9ee45 2513 newobj = _core_.new_BMPHandler(*args, **kwargs)
d14a1e28
RD
2514 self.this = newobj.this
2515 self.thisown = 1
2516 del newobj.thisown
d14a1e28
RD
2517
2518class BMPHandlerPtr(BMPHandler):
2519 def __init__(self, this):
2520 self.this = this
2521 if not hasattr(self,"thisown"): self.thisown = 0
2522 self.__class__ = BMPHandler
54f9ee45 2523_core_.BMPHandler_swigregister(BMPHandlerPtr)
d14a1e28
RD
2524NullImage = cvar.NullImage
2525IMAGE_OPTION_BMP_FORMAT = cvar.IMAGE_OPTION_BMP_FORMAT
2526IMAGE_OPTION_CUR_HOTSPOT_X = cvar.IMAGE_OPTION_CUR_HOTSPOT_X
2527IMAGE_OPTION_CUR_HOTSPOT_Y = cvar.IMAGE_OPTION_CUR_HOTSPOT_Y
2528IMAGE_OPTION_RESOLUTION = cvar.IMAGE_OPTION_RESOLUTION
2529IMAGE_OPTION_RESOLUTIONUNIT = cvar.IMAGE_OPTION_RESOLUTIONUNIT
2530
2531class ICOHandler(BMPHandler):
093d3ff1 2532 """Proxy of C++ ICOHandler class"""
e811c8ce
RD
2533 def __repr__(self):
2534 return "<%s.%s; proxy of C++ wxICOHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 2535 def __init__(self, *args, **kwargs):
a95a7133 2536 """__init__(self) -> ICOHandler"""
54f9ee45 2537 newobj = _core_.new_ICOHandler(*args, **kwargs)
d14a1e28
RD
2538 self.this = newobj.this
2539 self.thisown = 1
2540 del newobj.thisown
d14a1e28
RD
2541
2542class ICOHandlerPtr(ICOHandler):
2543 def __init__(self, this):
2544 self.this = this
2545 if not hasattr(self,"thisown"): self.thisown = 0
2546 self.__class__ = ICOHandler
54f9ee45 2547_core_.ICOHandler_swigregister(ICOHandlerPtr)
d14a1e28
RD
2548
2549class CURHandler(ICOHandler):
093d3ff1 2550 """Proxy of C++ CURHandler class"""
e811c8ce
RD
2551 def __repr__(self):
2552 return "<%s.%s; proxy of C++ wxCURHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 2553 def __init__(self, *args, **kwargs):
a95a7133 2554 """__init__(self) -> CURHandler"""
54f9ee45 2555 newobj = _core_.new_CURHandler(*args, **kwargs)
d14a1e28
RD
2556 self.this = newobj.this
2557 self.thisown = 1
2558 del newobj.thisown
d14a1e28
RD
2559
2560class CURHandlerPtr(CURHandler):
2561 def __init__(self, this):
2562 self.this = this
2563 if not hasattr(self,"thisown"): self.thisown = 0
2564 self.__class__ = CURHandler
54f9ee45 2565_core_.CURHandler_swigregister(CURHandlerPtr)
d14a1e28
RD
2566
2567class ANIHandler(CURHandler):
093d3ff1 2568 """Proxy of C++ ANIHandler class"""
e811c8ce
RD
2569 def __repr__(self):
2570 return "<%s.%s; proxy of C++ wxANIHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 2571 def __init__(self, *args, **kwargs):
a95a7133 2572 """__init__(self) -> ANIHandler"""
54f9ee45 2573 newobj = _core_.new_ANIHandler(*args, **kwargs)
d14a1e28
RD
2574 self.this = newobj.this
2575 self.thisown = 1
2576 del newobj.thisown
d14a1e28
RD
2577
2578class ANIHandlerPtr(ANIHandler):
2579 def __init__(self, this):
2580 self.this = this
2581 if not hasattr(self,"thisown"): self.thisown = 0
2582 self.__class__ = ANIHandler
54f9ee45 2583_core_.ANIHandler_swigregister(ANIHandlerPtr)
d14a1e28
RD
2584
2585class PNGHandler(ImageHandler):
093d3ff1 2586 """Proxy of C++ PNGHandler class"""
e811c8ce
RD
2587 def __repr__(self):
2588 return "<%s.%s; proxy of C++ wxPNGHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 2589 def __init__(self, *args, **kwargs):
a95a7133 2590 """__init__(self) -> PNGHandler"""
54f9ee45 2591 newobj = _core_.new_PNGHandler(*args, **kwargs)
d14a1e28
RD
2592 self.this = newobj.this
2593 self.thisown = 1
2594 del newobj.thisown
d14a1e28
RD
2595
2596class PNGHandlerPtr(PNGHandler):
2597 def __init__(self, this):
2598 self.this = this
2599 if not hasattr(self,"thisown"): self.thisown = 0
2600 self.__class__ = PNGHandler
54f9ee45 2601_core_.PNGHandler_swigregister(PNGHandlerPtr)
d14a1e28
RD
2602
2603class GIFHandler(ImageHandler):
093d3ff1 2604 """Proxy of C++ GIFHandler class"""
e811c8ce
RD
2605 def __repr__(self):
2606 return "<%s.%s; proxy of C++ wxGIFHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 2607 def __init__(self, *args, **kwargs):
a95a7133 2608 """__init__(self) -> GIFHandler"""
54f9ee45 2609 newobj = _core_.new_GIFHandler(*args, **kwargs)
d14a1e28
RD
2610 self.this = newobj.this
2611 self.thisown = 1
2612 del newobj.thisown
d14a1e28
RD
2613
2614class GIFHandlerPtr(GIFHandler):
2615 def __init__(self, this):
2616 self.this = this
2617 if not hasattr(self,"thisown"): self.thisown = 0
2618 self.__class__ = GIFHandler
54f9ee45 2619_core_.GIFHandler_swigregister(GIFHandlerPtr)
d14a1e28
RD
2620
2621class PCXHandler(ImageHandler):
093d3ff1 2622 """Proxy of C++ PCXHandler class"""
e811c8ce
RD
2623 def __repr__(self):
2624 return "<%s.%s; proxy of C++ wxPCXHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 2625 def __init__(self, *args, **kwargs):
a95a7133 2626 """__init__(self) -> PCXHandler"""
54f9ee45 2627 newobj = _core_.new_PCXHandler(*args, **kwargs)
d14a1e28
RD
2628 self.this = newobj.this
2629 self.thisown = 1
2630 del newobj.thisown
d14a1e28
RD
2631
2632class PCXHandlerPtr(PCXHandler):
2633 def __init__(self, this):
2634 self.this = this
2635 if not hasattr(self,"thisown"): self.thisown = 0
2636 self.__class__ = PCXHandler
54f9ee45 2637_core_.PCXHandler_swigregister(PCXHandlerPtr)
d14a1e28
RD
2638
2639class JPEGHandler(ImageHandler):
093d3ff1 2640 """Proxy of C++ JPEGHandler class"""
e811c8ce
RD
2641 def __repr__(self):
2642 return "<%s.%s; proxy of C++ wxJPEGHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 2643 def __init__(self, *args, **kwargs):
a95a7133 2644 """__init__(self) -> JPEGHandler"""
54f9ee45 2645 newobj = _core_.new_JPEGHandler(*args, **kwargs)
d14a1e28
RD
2646 self.this = newobj.this
2647 self.thisown = 1
2648 del newobj.thisown
d14a1e28
RD
2649
2650class JPEGHandlerPtr(JPEGHandler):
2651 def __init__(self, this):
2652 self.this = this
2653 if not hasattr(self,"thisown"): self.thisown = 0
2654 self.__class__ = JPEGHandler
54f9ee45 2655_core_.JPEGHandler_swigregister(JPEGHandlerPtr)
d14a1e28
RD
2656
2657class PNMHandler(ImageHandler):
093d3ff1 2658 """Proxy of C++ PNMHandler class"""
e811c8ce
RD
2659 def __repr__(self):
2660 return "<%s.%s; proxy of C++ wxPNMHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 2661 def __init__(self, *args, **kwargs):
a95a7133 2662 """__init__(self) -> PNMHandler"""
54f9ee45 2663 newobj = _core_.new_PNMHandler(*args, **kwargs)
d14a1e28
RD
2664 self.this = newobj.this
2665 self.thisown = 1
2666 del newobj.thisown
d14a1e28
RD
2667
2668class PNMHandlerPtr(PNMHandler):
2669 def __init__(self, this):
2670 self.this = this
2671 if not hasattr(self,"thisown"): self.thisown = 0
2672 self.__class__ = PNMHandler
54f9ee45 2673_core_.PNMHandler_swigregister(PNMHandlerPtr)
d14a1e28
RD
2674
2675class XPMHandler(ImageHandler):
093d3ff1 2676 """Proxy of C++ XPMHandler class"""
e811c8ce
RD
2677 def __repr__(self):
2678 return "<%s.%s; proxy of C++ wxXPMHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 2679 def __init__(self, *args, **kwargs):
a95a7133 2680 """__init__(self) -> XPMHandler"""
54f9ee45 2681 newobj = _core_.new_XPMHandler(*args, **kwargs)
d14a1e28
RD
2682 self.this = newobj.this
2683 self.thisown = 1
2684 del newobj.thisown
d14a1e28
RD
2685
2686class XPMHandlerPtr(XPMHandler):
2687 def __init__(self, this):
2688 self.this = this
2689 if not hasattr(self,"thisown"): self.thisown = 0
2690 self.__class__ = XPMHandler
54f9ee45 2691_core_.XPMHandler_swigregister(XPMHandlerPtr)
d14a1e28
RD
2692
2693class TIFFHandler(ImageHandler):
093d3ff1 2694 """Proxy of C++ TIFFHandler class"""
e811c8ce
RD
2695 def __repr__(self):
2696 return "<%s.%s; proxy of C++ wxTIFFHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 2697 def __init__(self, *args, **kwargs):
a95a7133 2698 """__init__(self) -> TIFFHandler"""
54f9ee45 2699 newobj = _core_.new_TIFFHandler(*args, **kwargs)
d14a1e28
RD
2700 self.this = newobj.this
2701 self.thisown = 1
2702 del newobj.thisown
d14a1e28
RD
2703
2704class TIFFHandlerPtr(TIFFHandler):
2705 def __init__(self, this):
2706 self.this = this
2707 if not hasattr(self,"thisown"): self.thisown = 0
2708 self.__class__ = TIFFHandler
54f9ee45 2709_core_.TIFFHandler_swigregister(TIFFHandlerPtr)
d14a1e28 2710
c0de73ae
RD
2711QUANTIZE_INCLUDE_WINDOWS_COLOURS = _core_.QUANTIZE_INCLUDE_WINDOWS_COLOURS
2712QUANTIZE_FILL_DESTINATION_IMAGE = _core_.QUANTIZE_FILL_DESTINATION_IMAGE
2713class Quantize(object):
2714 """Performs quantization, or colour reduction, on a wxImage."""
2715 def __init__(self): raise RuntimeError, "No constructor defined"
2716 def __repr__(self):
2717 return "<%s.%s; proxy of C++ wxQuantize instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
2718 def Quantize(*args, **kwargs):
2719 """
2720 Quantize(Image src, Image dest, int desiredNoColours=236, int flags=wxQUANTIZE_INCLUDE_WINDOWS_COLOURS|wxQUANTIZE_FILL_DESTINATION_IMAGE) -> bool
2721
2722 Reduce the colours in the source image and put the result into the
2723 destination image, setting the palette in the destination if
2724 needed. Both images may be the same, to overwrite the source image.
2725 """
2726 return _core_.Quantize_Quantize(*args, **kwargs)
2727
2728 Quantize = staticmethod(Quantize)
2729
2730class QuantizePtr(Quantize):
2731 def __init__(self, this):
2732 self.this = this
2733 if not hasattr(self,"thisown"): self.thisown = 0
2734 self.__class__ = Quantize
2735_core_.Quantize_swigregister(QuantizePtr)
2736
2737def Quantize_Quantize(*args, **kwargs):
2738 """
2739 Quantize_Quantize(Image src, Image dest, int desiredNoColours=236, int flags=wxQUANTIZE_INCLUDE_WINDOWS_COLOURS|wxQUANTIZE_FILL_DESTINATION_IMAGE) -> bool
2740
2741 Reduce the colours in the source image and put the result into the
2742 destination image, setting the palette in the destination if
2743 needed. Both images may be the same, to overwrite the source image.
2744 """
2745 return _core_.Quantize_Quantize(*args, **kwargs)
2746
d14a1e28
RD
2747#---------------------------------------------------------------------------
2748
2749class EvtHandler(Object):
093d3ff1 2750 """Proxy of C++ EvtHandler class"""
e811c8ce
RD
2751 def __repr__(self):
2752 return "<%s.%s; proxy of C++ wxEvtHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 2753 def __init__(self, *args, **kwargs):
a95a7133 2754 """__init__(self) -> EvtHandler"""
54f9ee45 2755 newobj = _core_.new_EvtHandler(*args, **kwargs)
d14a1e28
RD
2756 self.this = newobj.this
2757 self.thisown = 1
2758 del newobj.thisown
e811c8ce 2759 def GetNextHandler(*args, **kwargs):
a95a7133 2760 """GetNextHandler(self) -> EvtHandler"""
54f9ee45 2761 return _core_.EvtHandler_GetNextHandler(*args, **kwargs)
e811c8ce
RD
2762
2763 def GetPreviousHandler(*args, **kwargs):
a95a7133 2764 """GetPreviousHandler(self) -> EvtHandler"""
54f9ee45 2765 return _core_.EvtHandler_GetPreviousHandler(*args, **kwargs)
e811c8ce
RD
2766
2767 def SetNextHandler(*args, **kwargs):
a95a7133 2768 """SetNextHandler(self, EvtHandler handler)"""
54f9ee45 2769 return _core_.EvtHandler_SetNextHandler(*args, **kwargs)
e811c8ce
RD
2770
2771 def SetPreviousHandler(*args, **kwargs):
a95a7133 2772 """SetPreviousHandler(self, EvtHandler handler)"""
54f9ee45 2773 return _core_.EvtHandler_SetPreviousHandler(*args, **kwargs)
e811c8ce
RD
2774
2775 def GetEvtHandlerEnabled(*args, **kwargs):
a95a7133 2776 """GetEvtHandlerEnabled(self) -> bool"""
54f9ee45 2777 return _core_.EvtHandler_GetEvtHandlerEnabled(*args, **kwargs)
e811c8ce
RD
2778
2779 def SetEvtHandlerEnabled(*args, **kwargs):
a95a7133 2780 """SetEvtHandlerEnabled(self, bool enabled)"""
54f9ee45 2781 return _core_.EvtHandler_SetEvtHandlerEnabled(*args, **kwargs)
e811c8ce
RD
2782
2783 def ProcessEvent(*args, **kwargs):
a95a7133 2784 """ProcessEvent(self, Event event) -> bool"""
54f9ee45 2785 return _core_.EvtHandler_ProcessEvent(*args, **kwargs)
e811c8ce
RD
2786
2787 def AddPendingEvent(*args, **kwargs):
a95a7133 2788 """AddPendingEvent(self, Event event)"""
54f9ee45 2789 return _core_.EvtHandler_AddPendingEvent(*args, **kwargs)
e811c8ce
RD
2790
2791 def ProcessPendingEvents(*args, **kwargs):
a95a7133 2792 """ProcessPendingEvents(self)"""
54f9ee45 2793 return _core_.EvtHandler_ProcessPendingEvents(*args, **kwargs)
e811c8ce
RD
2794
2795 def Connect(*args, **kwargs):
a95a7133 2796 """Connect(self, int id, int lastId, int eventType, PyObject func)"""
54f9ee45 2797 return _core_.EvtHandler_Connect(*args, **kwargs)
e811c8ce
RD
2798
2799 def Disconnect(*args, **kwargs):
a95a7133 2800 """Disconnect(self, int id, int lastId=-1, wxEventType eventType=wxEVT_NULL) -> bool"""
54f9ee45 2801 return _core_.EvtHandler_Disconnect(*args, **kwargs)
e811c8ce
RD
2802
2803 def _setOORInfo(*args, **kwargs):
689b42ee 2804 """_setOORInfo(self, PyObject _self, bool incref=True)"""
54f9ee45 2805 return _core_.EvtHandler__setOORInfo(*args, **kwargs)
e811c8ce 2806
d14a1e28
RD
2807 def Bind(self, event, handler, source=None, id=wx.ID_ANY, id2=wx.ID_ANY):
2808 """
2809 Bind an event to an event handler.
2810
db3e571a
RD
2811 :param event: One of the EVT_* objects that specifies the
2812 type of event to bind,
d14a1e28 2813
db3e571a
RD
2814 :param handler: A callable object to be invoked when the
2815 event is delivered to self. Pass None to
2816 disconnect an event handler.
d14a1e28 2817
db3e571a
RD
2818 :param source: Sometimes the event originates from a
2819 different window than self, but you still
2820 want to catch it in self. (For example, a
2821 button event delivered to a frame.) By
2822 passing the source of the event, the event
2823 handling system is able to differentiate
2824 between the same event type from different
2825 controls.
d14a1e28 2826
db3e571a
RD
2827 :param id: Used to spcify the event source by ID instead
2828 of instance.
2829
2830 :param id2: Used when it is desirable to bind a handler
2831 to a range of IDs, such as with EVT_MENU_RANGE.
d14a1e28
RD
2832 """
2833 if source is not None:
2834 id = source.GetId()
2835 event.Bind(self, id, id2, handler)
2836
66c033b4
RD
2837 def Unbind(self, event, source=None, id=wx.ID_ANY, id2=wx.ID_ANY):
2838 """
2839 Disconencts the event handler binding for event from self.
2840 Returns True if successful.
2841 """
2842 if source is not None:
2843 id = source.GetId()
2844 return event.Unbind(self, id, id2)
d14a1e28 2845
d14a1e28
RD
2846
2847class EvtHandlerPtr(EvtHandler):
2848 def __init__(self, this):
2849 self.this = this
2850 if not hasattr(self,"thisown"): self.thisown = 0
2851 self.__class__ = EvtHandler
54f9ee45 2852_core_.EvtHandler_swigregister(EvtHandlerPtr)
d14a1e28
RD
2853
2854#---------------------------------------------------------------------------
2855
2856class PyEventBinder(object):
2857 """
2858 Instances of this class are used to bind specific events to event
2859 handlers.
2860 """
2861 def __init__(self, evtType, expectedIDs=0):
2862 if expectedIDs not in [0, 1, 2]:
2863 raise ValueError, "Invalid number of expectedIDs"
2864 self.expectedIDs = expectedIDs
2865
2866 if type(evtType) == list or type(evtType) == tuple:
2867 self.evtType = evtType
2868 else:
2869 self.evtType = [evtType]
2870
2871
2872 def Bind(self, target, id1, id2, function):
2873 """Bind this set of event types to target."""
2874 for et in self.evtType:
2875 target.Connect(id1, id2, et, function)
2876
66c033b4
RD
2877
2878 def Unbind(self, target, id1, id2):
2879 """Remove an event binding."""
2880 success = 0
2881 for et in self.evtType:
2882 success += target.Disconnect(id1, id2, et)
2883 return success != 0
2884
d14a1e28
RD
2885
2886 def __call__(self, *args):
2887 """
2888 For backwards compatibility with the old EVT_* functions.
2889 Should be called with either (window, func), (window, ID,
2890 func) or (window, ID1, ID2, func) parameters depending on the
2891 type of the event.
2892 """
2893 assert len(args) == 2 + self.expectedIDs
2894 id1 = wx.ID_ANY
2895 id2 = wx.ID_ANY
2896 target = args[0]
2897 if self.expectedIDs == 0:
2898 func = args[1]
2899 elif self.expectedIDs == 1:
2900 id1 = args[1]
2901 func = args[2]
2902 elif self.expectedIDs == 2:
2903 id1 = args[1]
2904 id2 = args[2]
2905 func = args[3]
2906 else:
2907 raise ValueError, "Unexpected number of IDs"
2908
2909 self.Bind(target, id1, id2, func)
2910
2911
2912# These two are square pegs that don't fit the PyEventBinder hole...
2913def EVT_COMMAND(win, id, cmd, func):
2914 win.Connect(id, -1, cmd, func)
2915def EVT_COMMAND_RANGE(win, id1, id2, cmd, func):
2916 win.Connect(id1, id2, cmd, func)
2917
2918
2919#---------------------------------------------------------------------------
2920
2921#---------------------------------------------------------------------------
2922
54f9ee45
RD
2923EVENT_PROPAGATE_NONE = _core_.EVENT_PROPAGATE_NONE
2924EVENT_PROPAGATE_MAX = _core_.EVENT_PROPAGATE_MAX
d14a1e28 2925
e811c8ce
RD
2926def NewEventType(*args, **kwargs):
2927 """NewEventType() -> wxEventType"""
54f9ee45
RD
2928 return _core_.NewEventType(*args, **kwargs)
2929wxEVT_NULL = _core_.wxEVT_NULL
2930wxEVT_FIRST = _core_.wxEVT_FIRST
2931wxEVT_USER_FIRST = _core_.wxEVT_USER_FIRST
2932wxEVT_COMMAND_BUTTON_CLICKED = _core_.wxEVT_COMMAND_BUTTON_CLICKED
2933wxEVT_COMMAND_CHECKBOX_CLICKED = _core_.wxEVT_COMMAND_CHECKBOX_CLICKED
2934wxEVT_COMMAND_CHOICE_SELECTED = _core_.wxEVT_COMMAND_CHOICE_SELECTED
2935wxEVT_COMMAND_LISTBOX_SELECTED = _core_.wxEVT_COMMAND_LISTBOX_SELECTED
2936wxEVT_COMMAND_LISTBOX_DOUBLECLICKED = _core_.wxEVT_COMMAND_LISTBOX_DOUBLECLICKED
2937wxEVT_COMMAND_CHECKLISTBOX_TOGGLED = _core_.wxEVT_COMMAND_CHECKLISTBOX_TOGGLED
2938wxEVT_COMMAND_MENU_SELECTED = _core_.wxEVT_COMMAND_MENU_SELECTED
2939wxEVT_COMMAND_TOOL_CLICKED = _core_.wxEVT_COMMAND_TOOL_CLICKED
2940wxEVT_COMMAND_SLIDER_UPDATED = _core_.wxEVT_COMMAND_SLIDER_UPDATED
2941wxEVT_COMMAND_RADIOBOX_SELECTED = _core_.wxEVT_COMMAND_RADIOBOX_SELECTED
2942wxEVT_COMMAND_RADIOBUTTON_SELECTED = _core_.wxEVT_COMMAND_RADIOBUTTON_SELECTED
2943wxEVT_COMMAND_SCROLLBAR_UPDATED = _core_.wxEVT_COMMAND_SCROLLBAR_UPDATED
2944wxEVT_COMMAND_VLBOX_SELECTED = _core_.wxEVT_COMMAND_VLBOX_SELECTED
2945wxEVT_COMMAND_COMBOBOX_SELECTED = _core_.wxEVT_COMMAND_COMBOBOX_SELECTED
2946wxEVT_COMMAND_TOOL_RCLICKED = _core_.wxEVT_COMMAND_TOOL_RCLICKED
2947wxEVT_COMMAND_TOOL_ENTER = _core_.wxEVT_COMMAND_TOOL_ENTER
2948wxEVT_LEFT_DOWN = _core_.wxEVT_LEFT_DOWN
2949wxEVT_LEFT_UP = _core_.wxEVT_LEFT_UP
2950wxEVT_MIDDLE_DOWN = _core_.wxEVT_MIDDLE_DOWN
2951wxEVT_MIDDLE_UP = _core_.wxEVT_MIDDLE_UP
2952wxEVT_RIGHT_DOWN = _core_.wxEVT_RIGHT_DOWN
2953wxEVT_RIGHT_UP = _core_.wxEVT_RIGHT_UP
2954wxEVT_MOTION = _core_.wxEVT_MOTION
2955wxEVT_ENTER_WINDOW = _core_.wxEVT_ENTER_WINDOW
2956wxEVT_LEAVE_WINDOW = _core_.wxEVT_LEAVE_WINDOW
2957wxEVT_LEFT_DCLICK = _core_.wxEVT_LEFT_DCLICK
2958wxEVT_MIDDLE_DCLICK = _core_.wxEVT_MIDDLE_DCLICK
2959wxEVT_RIGHT_DCLICK = _core_.wxEVT_RIGHT_DCLICK
2960wxEVT_SET_FOCUS = _core_.wxEVT_SET_FOCUS
2961wxEVT_KILL_FOCUS = _core_.wxEVT_KILL_FOCUS
2962wxEVT_CHILD_FOCUS = _core_.wxEVT_CHILD_FOCUS
2963wxEVT_MOUSEWHEEL = _core_.wxEVT_MOUSEWHEEL
2964wxEVT_NC_LEFT_DOWN = _core_.wxEVT_NC_LEFT_DOWN
2965wxEVT_NC_LEFT_UP = _core_.wxEVT_NC_LEFT_UP
2966wxEVT_NC_MIDDLE_DOWN = _core_.wxEVT_NC_MIDDLE_DOWN
2967wxEVT_NC_MIDDLE_UP = _core_.wxEVT_NC_MIDDLE_UP
2968wxEVT_NC_RIGHT_DOWN = _core_.wxEVT_NC_RIGHT_DOWN
2969wxEVT_NC_RIGHT_UP = _core_.wxEVT_NC_RIGHT_UP
2970wxEVT_NC_MOTION = _core_.wxEVT_NC_MOTION
2971wxEVT_NC_ENTER_WINDOW = _core_.wxEVT_NC_ENTER_WINDOW
2972wxEVT_NC_LEAVE_WINDOW = _core_.wxEVT_NC_LEAVE_WINDOW
2973wxEVT_NC_LEFT_DCLICK = _core_.wxEVT_NC_LEFT_DCLICK
2974wxEVT_NC_MIDDLE_DCLICK = _core_.wxEVT_NC_MIDDLE_DCLICK
2975wxEVT_NC_RIGHT_DCLICK = _core_.wxEVT_NC_RIGHT_DCLICK
2976wxEVT_CHAR = _core_.wxEVT_CHAR
2977wxEVT_CHAR_HOOK = _core_.wxEVT_CHAR_HOOK
2978wxEVT_NAVIGATION_KEY = _core_.wxEVT_NAVIGATION_KEY
2979wxEVT_KEY_DOWN = _core_.wxEVT_KEY_DOWN
2980wxEVT_KEY_UP = _core_.wxEVT_KEY_UP
2981wxEVT_HOTKEY = _core_.wxEVT_HOTKEY
2982wxEVT_SET_CURSOR = _core_.wxEVT_SET_CURSOR
2983wxEVT_SCROLL_TOP = _core_.wxEVT_SCROLL_TOP
2984wxEVT_SCROLL_BOTTOM = _core_.wxEVT_SCROLL_BOTTOM
2985wxEVT_SCROLL_LINEUP = _core_.wxEVT_SCROLL_LINEUP
2986wxEVT_SCROLL_LINEDOWN = _core_.wxEVT_SCROLL_LINEDOWN
2987wxEVT_SCROLL_PAGEUP = _core_.wxEVT_SCROLL_PAGEUP
2988wxEVT_SCROLL_PAGEDOWN = _core_.wxEVT_SCROLL_PAGEDOWN
2989wxEVT_SCROLL_THUMBTRACK = _core_.wxEVT_SCROLL_THUMBTRACK
2990wxEVT_SCROLL_THUMBRELEASE = _core_.wxEVT_SCROLL_THUMBRELEASE
2991wxEVT_SCROLL_ENDSCROLL = _core_.wxEVT_SCROLL_ENDSCROLL
2992wxEVT_SCROLLWIN_TOP = _core_.wxEVT_SCROLLWIN_TOP
2993wxEVT_SCROLLWIN_BOTTOM = _core_.wxEVT_SCROLLWIN_BOTTOM
2994wxEVT_SCROLLWIN_LINEUP = _core_.wxEVT_SCROLLWIN_LINEUP
2995wxEVT_SCROLLWIN_LINEDOWN = _core_.wxEVT_SCROLLWIN_LINEDOWN
2996wxEVT_SCROLLWIN_PAGEUP = _core_.wxEVT_SCROLLWIN_PAGEUP
2997wxEVT_SCROLLWIN_PAGEDOWN = _core_.wxEVT_SCROLLWIN_PAGEDOWN
2998wxEVT_SCROLLWIN_THUMBTRACK = _core_.wxEVT_SCROLLWIN_THUMBTRACK
2999wxEVT_SCROLLWIN_THUMBRELEASE = _core_.wxEVT_SCROLLWIN_THUMBRELEASE
3000wxEVT_SIZE = _core_.wxEVT_SIZE
3001wxEVT_MOVE = _core_.wxEVT_MOVE
3002wxEVT_CLOSE_WINDOW = _core_.wxEVT_CLOSE_WINDOW
3003wxEVT_END_SESSION = _core_.wxEVT_END_SESSION
3004wxEVT_QUERY_END_SESSION = _core_.wxEVT_QUERY_END_SESSION
3005wxEVT_ACTIVATE_APP = _core_.wxEVT_ACTIVATE_APP
3006wxEVT_POWER = _core_.wxEVT_POWER
3007wxEVT_ACTIVATE = _core_.wxEVT_ACTIVATE
3008wxEVT_CREATE = _core_.wxEVT_CREATE
3009wxEVT_DESTROY = _core_.wxEVT_DESTROY
3010wxEVT_SHOW = _core_.wxEVT_SHOW
3011wxEVT_ICONIZE = _core_.wxEVT_ICONIZE
3012wxEVT_MAXIMIZE = _core_.wxEVT_MAXIMIZE
3013wxEVT_MOUSE_CAPTURE_CHANGED = _core_.wxEVT_MOUSE_CAPTURE_CHANGED
3014wxEVT_PAINT = _core_.wxEVT_PAINT
3015wxEVT_ERASE_BACKGROUND = _core_.wxEVT_ERASE_BACKGROUND
3016wxEVT_NC_PAINT = _core_.wxEVT_NC_PAINT
3017wxEVT_PAINT_ICON = _core_.wxEVT_PAINT_ICON
3018wxEVT_MENU_OPEN = _core_.wxEVT_MENU_OPEN
3019wxEVT_MENU_CLOSE = _core_.wxEVT_MENU_CLOSE
3020wxEVT_MENU_HIGHLIGHT = _core_.wxEVT_MENU_HIGHLIGHT
3021wxEVT_CONTEXT_MENU = _core_.wxEVT_CONTEXT_MENU
3022wxEVT_SYS_COLOUR_CHANGED = _core_.wxEVT_SYS_COLOUR_CHANGED
3023wxEVT_DISPLAY_CHANGED = _core_.wxEVT_DISPLAY_CHANGED
3024wxEVT_SETTING_CHANGED = _core_.wxEVT_SETTING_CHANGED
3025wxEVT_QUERY_NEW_PALETTE = _core_.wxEVT_QUERY_NEW_PALETTE
3026wxEVT_PALETTE_CHANGED = _core_.wxEVT_PALETTE_CHANGED
3027wxEVT_DROP_FILES = _core_.wxEVT_DROP_FILES
3028wxEVT_DRAW_ITEM = _core_.wxEVT_DRAW_ITEM
3029wxEVT_MEASURE_ITEM = _core_.wxEVT_MEASURE_ITEM
3030wxEVT_COMPARE_ITEM = _core_.wxEVT_COMPARE_ITEM
3031wxEVT_INIT_DIALOG = _core_.wxEVT_INIT_DIALOG
3032wxEVT_IDLE = _core_.wxEVT_IDLE
3033wxEVT_UPDATE_UI = _core_.wxEVT_UPDATE_UI
3034wxEVT_SIZING = _core_.wxEVT_SIZING
3035wxEVT_MOVING = _core_.wxEVT_MOVING
3036wxEVT_COMMAND_LEFT_CLICK = _core_.wxEVT_COMMAND_LEFT_CLICK
3037wxEVT_COMMAND_LEFT_DCLICK = _core_.wxEVT_COMMAND_LEFT_DCLICK
3038wxEVT_COMMAND_RIGHT_CLICK = _core_.wxEVT_COMMAND_RIGHT_CLICK
3039wxEVT_COMMAND_RIGHT_DCLICK = _core_.wxEVT_COMMAND_RIGHT_DCLICK
3040wxEVT_COMMAND_SET_FOCUS = _core_.wxEVT_COMMAND_SET_FOCUS
3041wxEVT_COMMAND_KILL_FOCUS = _core_.wxEVT_COMMAND_KILL_FOCUS
3042wxEVT_COMMAND_ENTER = _core_.wxEVT_COMMAND_ENTER
d14a1e28
RD
3043#
3044# Create some event binders
3045EVT_SIZE = wx.PyEventBinder( wxEVT_SIZE )
3046EVT_SIZING = wx.PyEventBinder( wxEVT_SIZING )
3047EVT_MOVE = wx.PyEventBinder( wxEVT_MOVE )
3048EVT_MOVING = wx.PyEventBinder( wxEVT_MOVING )
3049EVT_CLOSE = wx.PyEventBinder( wxEVT_CLOSE_WINDOW )
3050EVT_END_SESSION = wx.PyEventBinder( wxEVT_END_SESSION )
3051EVT_QUERY_END_SESSION = wx.PyEventBinder( wxEVT_QUERY_END_SESSION )
3052EVT_PAINT = wx.PyEventBinder( wxEVT_PAINT )
3053EVT_NC_PAINT = wx.PyEventBinder( wxEVT_NC_PAINT )
3054EVT_ERASE_BACKGROUND = wx.PyEventBinder( wxEVT_ERASE_BACKGROUND )
3055EVT_CHAR = wx.PyEventBinder( wxEVT_CHAR )
3056EVT_KEY_DOWN = wx.PyEventBinder( wxEVT_KEY_DOWN )
3057EVT_KEY_UP = wx.PyEventBinder( wxEVT_KEY_UP )
3058EVT_HOTKEY = wx.PyEventBinder( wxEVT_HOTKEY, 1)
3059EVT_CHAR_HOOK = wx.PyEventBinder( wxEVT_CHAR_HOOK )
3060EVT_MENU_OPEN = wx.PyEventBinder( wxEVT_MENU_OPEN )
3061EVT_MENU_CLOSE = wx.PyEventBinder( wxEVT_MENU_CLOSE )
3062EVT_MENU_HIGHLIGHT = wx.PyEventBinder( wxEVT_MENU_HIGHLIGHT, 1)
3063EVT_MENU_HIGHLIGHT_ALL = wx.PyEventBinder( wxEVT_MENU_HIGHLIGHT )
3064EVT_SET_FOCUS = wx.PyEventBinder( wxEVT_SET_FOCUS )
3065EVT_KILL_FOCUS = wx.PyEventBinder( wxEVT_KILL_FOCUS )
3066EVT_CHILD_FOCUS = wx.PyEventBinder( wxEVT_CHILD_FOCUS )
3067EVT_ACTIVATE = wx.PyEventBinder( wxEVT_ACTIVATE )
3068EVT_ACTIVATE_APP = wx.PyEventBinder( wxEVT_ACTIVATE_APP )
3069EVT_END_SESSION = wx.PyEventBinder( wxEVT_END_SESSION )
3070EVT_QUERY_END_SESSION = wx.PyEventBinder( wxEVT_QUERY_END_SESSION )
3071EVT_DROP_FILES = wx.PyEventBinder( wxEVT_DROP_FILES )
3072EVT_INIT_DIALOG = wx.PyEventBinder( wxEVT_INIT_DIALOG )
3073EVT_SYS_COLOUR_CHANGED = wx.PyEventBinder( wxEVT_SYS_COLOUR_CHANGED )
3074EVT_DISPLAY_CHANGED = wx.PyEventBinder( wxEVT_DISPLAY_CHANGED )
3075EVT_SHOW = wx.PyEventBinder( wxEVT_SHOW )
3076EVT_MAXIMIZE = wx.PyEventBinder( wxEVT_MAXIMIZE )
3077EVT_ICONIZE = wx.PyEventBinder( wxEVT_ICONIZE )
3078EVT_NAVIGATION_KEY = wx.PyEventBinder( wxEVT_NAVIGATION_KEY )
3079EVT_PALETTE_CHANGED = wx.PyEventBinder( wxEVT_PALETTE_CHANGED )
3080EVT_QUERY_NEW_PALETTE = wx.PyEventBinder( wxEVT_QUERY_NEW_PALETTE )
3081EVT_WINDOW_CREATE = wx.PyEventBinder( wxEVT_CREATE )
3082EVT_WINDOW_DESTROY = wx.PyEventBinder( wxEVT_DESTROY )
3083EVT_SET_CURSOR = wx.PyEventBinder( wxEVT_SET_CURSOR )
3084EVT_MOUSE_CAPTURE_CHANGED = wx.PyEventBinder( wxEVT_MOUSE_CAPTURE_CHANGED )
3085
3086EVT_LEFT_DOWN = wx.PyEventBinder( wxEVT_LEFT_DOWN )
3087EVT_LEFT_UP = wx.PyEventBinder( wxEVT_LEFT_UP )
3088EVT_MIDDLE_DOWN = wx.PyEventBinder( wxEVT_MIDDLE_DOWN )
3089EVT_MIDDLE_UP = wx.PyEventBinder( wxEVT_MIDDLE_UP )
3090EVT_RIGHT_DOWN = wx.PyEventBinder( wxEVT_RIGHT_DOWN )
3091EVT_RIGHT_UP = wx.PyEventBinder( wxEVT_RIGHT_UP )
3092EVT_MOTION = wx.PyEventBinder( wxEVT_MOTION )
3093EVT_LEFT_DCLICK = wx.PyEventBinder( wxEVT_LEFT_DCLICK )
3094EVT_MIDDLE_DCLICK = wx.PyEventBinder( wxEVT_MIDDLE_DCLICK )
3095EVT_RIGHT_DCLICK = wx.PyEventBinder( wxEVT_RIGHT_DCLICK )
3096EVT_LEAVE_WINDOW = wx.PyEventBinder( wxEVT_LEAVE_WINDOW )
3097EVT_ENTER_WINDOW = wx.PyEventBinder( wxEVT_ENTER_WINDOW )
3098EVT_MOUSEWHEEL = wx.PyEventBinder( wxEVT_MOUSEWHEEL )
3099
3100EVT_MOUSE_EVENTS = wx.PyEventBinder([ wxEVT_LEFT_DOWN,
3101 wxEVT_LEFT_UP,
3102 wxEVT_MIDDLE_DOWN,
3103 wxEVT_MIDDLE_UP,
3104 wxEVT_RIGHT_DOWN,
3105 wxEVT_RIGHT_UP,
3106 wxEVT_MOTION,
3107 wxEVT_LEFT_DCLICK,
3108 wxEVT_MIDDLE_DCLICK,
3109 wxEVT_RIGHT_DCLICK,
3110 wxEVT_ENTER_WINDOW,
3111 wxEVT_LEAVE_WINDOW,
3112 wxEVT_MOUSEWHEEL
3113 ])
3114
3115
3116# Scrolling from wxWindow (sent to wxScrolledWindow)
3117EVT_SCROLLWIN = wx.PyEventBinder([ wxEVT_SCROLLWIN_TOP,
3118 wxEVT_SCROLLWIN_BOTTOM,
3119 wxEVT_SCROLLWIN_LINEUP,
3120 wxEVT_SCROLLWIN_LINEDOWN,
3121 wxEVT_SCROLLWIN_PAGEUP,
3122 wxEVT_SCROLLWIN_PAGEDOWN,
3123 wxEVT_SCROLLWIN_THUMBTRACK,
3124 wxEVT_SCROLLWIN_THUMBRELEASE,
3125 ])
3126
3127EVT_SCROLLWIN_TOP = wx.PyEventBinder( wxEVT_SCROLLWIN_TOP )
3128EVT_SCROLLWIN_BOTTOM = wx.PyEventBinder( wxEVT_SCROLLWIN_BOTTOM )
3129EVT_SCROLLWIN_LINEUP = wx.PyEventBinder( wxEVT_SCROLLWIN_LINEUP )
3130EVT_SCROLLWIN_LINEDOWN = wx.PyEventBinder( wxEVT_SCROLLWIN_LINEDOWN )
3131EVT_SCROLLWIN_PAGEUP = wx.PyEventBinder( wxEVT_SCROLLWIN_PAGEUP )
3132EVT_SCROLLWIN_PAGEDOWN = wx.PyEventBinder( wxEVT_SCROLLWIN_PAGEDOWN )
3133EVT_SCROLLWIN_THUMBTRACK = wx.PyEventBinder( wxEVT_SCROLLWIN_THUMBTRACK )
3134EVT_SCROLLWIN_THUMBRELEASE = wx.PyEventBinder( wxEVT_SCROLLWIN_THUMBRELEASE )
3135
3136# Scrolling from wxSlider and wxScrollBar
3137EVT_SCROLL = wx.PyEventBinder([ wxEVT_SCROLL_TOP,
3138 wxEVT_SCROLL_BOTTOM,
3139 wxEVT_SCROLL_LINEUP,
3140 wxEVT_SCROLL_LINEDOWN,
3141 wxEVT_SCROLL_PAGEUP,
3142 wxEVT_SCROLL_PAGEDOWN,
3143 wxEVT_SCROLL_THUMBTRACK,
3144 wxEVT_SCROLL_THUMBRELEASE,
3145 wxEVT_SCROLL_ENDSCROLL,
3146 ])
3147
3148EVT_SCROLL_TOP = wx.PyEventBinder( wxEVT_SCROLL_TOP )
3149EVT_SCROLL_BOTTOM = wx.PyEventBinder( wxEVT_SCROLL_BOTTOM )
3150EVT_SCROLL_LINEUP = wx.PyEventBinder( wxEVT_SCROLL_LINEUP )
3151EVT_SCROLL_LINEDOWN = wx.PyEventBinder( wxEVT_SCROLL_LINEDOWN )
3152EVT_SCROLL_PAGEUP = wx.PyEventBinder( wxEVT_SCROLL_PAGEUP )
3153EVT_SCROLL_PAGEDOWN = wx.PyEventBinder( wxEVT_SCROLL_PAGEDOWN )
3154EVT_SCROLL_THUMBTRACK = wx.PyEventBinder( wxEVT_SCROLL_THUMBTRACK )
3155EVT_SCROLL_THUMBRELEASE = wx.PyEventBinder( wxEVT_SCROLL_THUMBRELEASE )
3156EVT_SCROLL_ENDSCROLL = wx.PyEventBinder( wxEVT_SCROLL_ENDSCROLL )
3157
3158# Scrolling from wxSlider and wxScrollBar, with an id
3159EVT_COMMAND_SCROLL = wx.PyEventBinder([ wxEVT_SCROLL_TOP,
3160 wxEVT_SCROLL_BOTTOM,
3161 wxEVT_SCROLL_LINEUP,
3162 wxEVT_SCROLL_LINEDOWN,
3163 wxEVT_SCROLL_PAGEUP,
3164 wxEVT_SCROLL_PAGEDOWN,
3165 wxEVT_SCROLL_THUMBTRACK,
3166 wxEVT_SCROLL_THUMBRELEASE,
3167 wxEVT_SCROLL_ENDSCROLL,
3168 ], 1)
3169
3170EVT_COMMAND_SCROLL_TOP = wx.PyEventBinder( wxEVT_SCROLL_TOP, 1)
3171EVT_COMMAND_SCROLL_BOTTOM = wx.PyEventBinder( wxEVT_SCROLL_BOTTOM, 1)
3172EVT_COMMAND_SCROLL_LINEUP = wx.PyEventBinder( wxEVT_SCROLL_LINEUP, 1)
3173EVT_COMMAND_SCROLL_LINEDOWN = wx.PyEventBinder( wxEVT_SCROLL_LINEDOWN, 1)
3174EVT_COMMAND_SCROLL_PAGEUP = wx.PyEventBinder( wxEVT_SCROLL_PAGEUP, 1)
3175EVT_COMMAND_SCROLL_PAGEDOWN = wx.PyEventBinder( wxEVT_SCROLL_PAGEDOWN, 1)
3176EVT_COMMAND_SCROLL_THUMBTRACK = wx.PyEventBinder( wxEVT_SCROLL_THUMBTRACK, 1)
3177EVT_COMMAND_SCROLL_THUMBRELEASE = wx.PyEventBinder( wxEVT_SCROLL_THUMBRELEASE, 1)
3178EVT_COMMAND_SCROLL_ENDSCROLL = wx.PyEventBinder( wxEVT_SCROLL_ENDSCROLL, 1)
3179
d14a1e28
RD
3180EVT_BUTTON = wx.PyEventBinder( wxEVT_COMMAND_BUTTON_CLICKED, 1)
3181EVT_CHECKBOX = wx.PyEventBinder( wxEVT_COMMAND_CHECKBOX_CLICKED, 1)
3182EVT_CHOICE = wx.PyEventBinder( wxEVT_COMMAND_CHOICE_SELECTED, 1)
3183EVT_LISTBOX = wx.PyEventBinder( wxEVT_COMMAND_LISTBOX_SELECTED, 1)
3184EVT_LISTBOX_DCLICK = wx.PyEventBinder( wxEVT_COMMAND_LISTBOX_DOUBLECLICKED, 1)
3185EVT_MENU = wx.PyEventBinder( wxEVT_COMMAND_MENU_SELECTED, 1)
3186EVT_MENU_RANGE = wx.PyEventBinder( wxEVT_COMMAND_MENU_SELECTED, 2)
3187EVT_SLIDER = wx.PyEventBinder( wxEVT_COMMAND_SLIDER_UPDATED, 1)
3188EVT_RADIOBOX = wx.PyEventBinder( wxEVT_COMMAND_RADIOBOX_SELECTED, 1)
3189EVT_RADIOBUTTON = wx.PyEventBinder( wxEVT_COMMAND_RADIOBUTTON_SELECTED, 1)
3190
3191EVT_SCROLLBAR = wx.PyEventBinder( wxEVT_COMMAND_SCROLLBAR_UPDATED, 1)
3192EVT_VLBOX = wx.PyEventBinder( wxEVT_COMMAND_VLBOX_SELECTED, 1)
3193EVT_COMBOBOX = wx.PyEventBinder( wxEVT_COMMAND_COMBOBOX_SELECTED, 1)
3194EVT_TOOL = wx.PyEventBinder( wxEVT_COMMAND_TOOL_CLICKED, 1)
3195EVT_TOOL_RANGE = wx.PyEventBinder( wxEVT_COMMAND_TOOL_CLICKED, 2)
3196EVT_TOOL_RCLICKED = wx.PyEventBinder( wxEVT_COMMAND_TOOL_RCLICKED, 1)
3197EVT_TOOL_RCLICKED_RANGE = wx.PyEventBinder( wxEVT_COMMAND_TOOL_RCLICKED, 2)
3198EVT_TOOL_ENTER = wx.PyEventBinder( wxEVT_COMMAND_TOOL_ENTER, 1)
3199EVT_CHECKLISTBOX = wx.PyEventBinder( wxEVT_COMMAND_CHECKLISTBOX_TOGGLED, 1)
3200
3201
3202EVT_COMMAND_LEFT_CLICK = wx.PyEventBinder( wxEVT_COMMAND_LEFT_CLICK, 1)
3203EVT_COMMAND_LEFT_DCLICK = wx.PyEventBinder( wxEVT_COMMAND_LEFT_DCLICK, 1)
3204EVT_COMMAND_RIGHT_CLICK = wx.PyEventBinder( wxEVT_COMMAND_RIGHT_CLICK, 1)
3205EVT_COMMAND_RIGHT_DCLICK = wx.PyEventBinder( wxEVT_COMMAND_RIGHT_DCLICK, 1)
3206EVT_COMMAND_SET_FOCUS = wx.PyEventBinder( wxEVT_COMMAND_SET_FOCUS, 1)
3207EVT_COMMAND_KILL_FOCUS = wx.PyEventBinder( wxEVT_COMMAND_KILL_FOCUS, 1)
3208EVT_COMMAND_ENTER = wx.PyEventBinder( wxEVT_COMMAND_ENTER, 1)
3209
3210EVT_IDLE = wx.PyEventBinder( wxEVT_IDLE )
3211
3212EVT_UPDATE_UI = wx.PyEventBinder( wxEVT_UPDATE_UI, 1)
3213EVT_UPDATE_UI_RANGE = wx.PyEventBinder( wxEVT_UPDATE_UI, 2)
3214
3215EVT_CONTEXT_MENU = wx.PyEventBinder( wxEVT_CONTEXT_MENU )
3216
3217
3218
3219#---------------------------------------------------------------------------
3220
3221class Event(Object):
093d3ff1 3222 """Proxy of C++ Event class"""
e811c8ce
RD
3223 def __init__(self): raise RuntimeError, "No constructor defined"
3224 def __repr__(self):
3225 return "<%s.%s; proxy of C++ wxEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
54f9ee45 3226 def __del__(self, destroy=_core_.delete_Event):
a95a7133 3227 """__del__(self)"""
d14a1e28
RD
3228 try:
3229 if self.thisown: destroy(self)
3230 except: pass
e811c8ce
RD
3231
3232 def SetEventType(*args, **kwargs):
a95a7133 3233 """SetEventType(self, wxEventType typ)"""
54f9ee45 3234 return _core_.Event_SetEventType(*args, **kwargs)
e811c8ce
RD
3235
3236 def GetEventType(*args, **kwargs):
a95a7133 3237 """GetEventType(self) -> wxEventType"""
54f9ee45 3238 return _core_.Event_GetEventType(*args, **kwargs)
e811c8ce
RD
3239
3240 def GetEventObject(*args, **kwargs):
a95a7133 3241 """GetEventObject(self) -> Object"""
54f9ee45 3242 return _core_.Event_GetEventObject(*args, **kwargs)
e811c8ce
RD
3243
3244 def SetEventObject(*args, **kwargs):
a95a7133 3245 """SetEventObject(self, Object obj)"""
54f9ee45 3246 return _core_.Event_SetEventObject(*args, **kwargs)
e811c8ce
RD
3247
3248 def GetTimestamp(*args, **kwargs):
a95a7133 3249 """GetTimestamp(self) -> long"""
54f9ee45 3250 return _core_.Event_GetTimestamp(*args, **kwargs)
e811c8ce
RD
3251
3252 def SetTimestamp(*args, **kwargs):
a95a7133 3253 """SetTimestamp(self, long ts=0)"""
54f9ee45 3254 return _core_.Event_SetTimestamp(*args, **kwargs)
e811c8ce
RD
3255
3256 def GetId(*args, **kwargs):
a95a7133 3257 """GetId(self) -> int"""
54f9ee45 3258 return _core_.Event_GetId(*args, **kwargs)
e811c8ce
RD
3259
3260 def SetId(*args, **kwargs):
a95a7133 3261 """SetId(self, int Id)"""
54f9ee45 3262 return _core_.Event_SetId(*args, **kwargs)
e811c8ce
RD
3263
3264 def IsCommandEvent(*args, **kwargs):
a95a7133 3265 """IsCommandEvent(self) -> bool"""
54f9ee45 3266 return _core_.Event_IsCommandEvent(*args, **kwargs)
e811c8ce
RD
3267
3268 def Skip(*args, **kwargs):
51b83b37
RD
3269 """
3270 Skip(self, bool skip=True)
3271
3272 Called by an event handler, it controls whether additional event
3273 handlers bound to this event will be called after the current event
3274 handler returns. Skip(false) (the default setting) will prevent
3275 additional event handlers from being called and control will be
3276 returned to the sender of the event immediately after the current
3277 handler has finished. Skip(True) will cause the event processing
3278 system to continue searching for a handler function for this event.
3279
3280 """
54f9ee45 3281 return _core_.Event_Skip(*args, **kwargs)
e811c8ce
RD
3282
3283 def GetSkipped(*args, **kwargs):
a95a7133 3284 """GetSkipped(self) -> bool"""
54f9ee45 3285 return _core_.Event_GetSkipped(*args, **kwargs)
e811c8ce
RD
3286
3287 def ShouldPropagate(*args, **kwargs):
a95a7133 3288 """ShouldPropagate(self) -> bool"""
54f9ee45 3289 return _core_.Event_ShouldPropagate(*args, **kwargs)
e811c8ce
RD
3290
3291 def StopPropagation(*args, **kwargs):
a95a7133 3292 """StopPropagation(self) -> int"""
54f9ee45 3293 return _core_.Event_StopPropagation(*args, **kwargs)
e811c8ce
RD
3294
3295 def ResumePropagation(*args, **kwargs):
a95a7133 3296 """ResumePropagation(self, int propagationLevel)"""
54f9ee45 3297 return _core_.Event_ResumePropagation(*args, **kwargs)
e811c8ce
RD
3298
3299 def Clone(*args, **kwargs):
a95a7133 3300 """Clone(self) -> Event"""
54f9ee45 3301 return _core_.Event_Clone(*args, **kwargs)
e811c8ce 3302
d14a1e28
RD
3303
3304class EventPtr(Event):
3305 def __init__(self, this):
3306 self.this = this
3307 if not hasattr(self,"thisown"): self.thisown = 0
3308 self.__class__ = Event
54f9ee45 3309_core_.Event_swigregister(EventPtr)
d14a1e28
RD
3310
3311#---------------------------------------------------------------------------
3312
3313class PropagationDisabler(object):
093d3ff1 3314 """Proxy of C++ PropagationDisabler class"""
e811c8ce
RD
3315 def __repr__(self):
3316 return "<%s.%s; proxy of C++ wxPropagationDisabler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 3317 def __init__(self, *args, **kwargs):
a95a7133 3318 """__init__(self, Event event) -> PropagationDisabler"""
54f9ee45 3319 newobj = _core_.new_PropagationDisabler(*args, **kwargs)
d14a1e28
RD
3320 self.this = newobj.this
3321 self.thisown = 1
3322 del newobj.thisown
54f9ee45 3323 def __del__(self, destroy=_core_.delete_PropagationDisabler):
a95a7133 3324 """__del__(self)"""
d14a1e28
RD
3325 try:
3326 if self.thisown: destroy(self)
3327 except: pass
e811c8ce 3328
d14a1e28
RD
3329
3330class PropagationDisablerPtr(PropagationDisabler):
3331 def __init__(self, this):
3332 self.this = this
3333 if not hasattr(self,"thisown"): self.thisown = 0
3334 self.__class__ = PropagationDisabler
54f9ee45 3335_core_.PropagationDisabler_swigregister(PropagationDisablerPtr)
d14a1e28
RD
3336
3337class PropagateOnce(object):
093d3ff1 3338 """Proxy of C++ PropagateOnce class"""
e811c8ce
RD
3339 def __repr__(self):
3340 return "<%s.%s; proxy of C++ wxPropagateOnce instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 3341 def __init__(self, *args, **kwargs):
a95a7133 3342 """__init__(self, Event event) -> PropagateOnce"""
54f9ee45 3343 newobj = _core_.new_PropagateOnce(*args, **kwargs)
d14a1e28
RD
3344 self.this = newobj.this
3345 self.thisown = 1
3346 del newobj.thisown
54f9ee45 3347 def __del__(self, destroy=_core_.delete_PropagateOnce):
a95a7133 3348 """__del__(self)"""
d14a1e28
RD
3349 try:
3350 if self.thisown: destroy(self)
3351 except: pass
e811c8ce 3352
d14a1e28
RD
3353
3354class PropagateOncePtr(PropagateOnce):
3355 def __init__(self, this):
3356 self.this = this
3357 if not hasattr(self,"thisown"): self.thisown = 0
3358 self.__class__ = PropagateOnce
54f9ee45 3359_core_.PropagateOnce_swigregister(PropagateOncePtr)
d14a1e28
RD
3360
3361#---------------------------------------------------------------------------
3362
3363class CommandEvent(Event):
093d3ff1 3364 """Proxy of C++ CommandEvent class"""
e811c8ce
RD
3365 def __repr__(self):
3366 return "<%s.%s; proxy of C++ wxCommandEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 3367 def __init__(self, *args, **kwargs):
a95a7133 3368 """__init__(self, wxEventType commandType=wxEVT_NULL, int winid=0) -> CommandEvent"""
54f9ee45 3369 newobj = _core_.new_CommandEvent(*args, **kwargs)
d14a1e28
RD
3370 self.this = newobj.this
3371 self.thisown = 1
3372 del newobj.thisown
e811c8ce 3373 def GetSelection(*args, **kwargs):
a95a7133 3374 """GetSelection(self) -> int"""
54f9ee45 3375 return _core_.CommandEvent_GetSelection(*args, **kwargs)
e811c8ce
RD
3376
3377 def SetString(*args, **kwargs):
a95a7133 3378 """SetString(self, String s)"""
54f9ee45 3379 return _core_.CommandEvent_SetString(*args, **kwargs)
e811c8ce
RD
3380
3381 def GetString(*args, **kwargs):
a95a7133 3382 """GetString(self) -> String"""
54f9ee45 3383 return _core_.CommandEvent_GetString(*args, **kwargs)
e811c8ce
RD
3384
3385 def IsChecked(*args, **kwargs):
a95a7133 3386 """IsChecked(self) -> bool"""
54f9ee45 3387 return _core_.CommandEvent_IsChecked(*args, **kwargs)
e811c8ce 3388
242b7b46 3389 Checked = IsChecked
e811c8ce 3390 def IsSelection(*args, **kwargs):
a95a7133 3391 """IsSelection(self) -> bool"""
54f9ee45 3392 return _core_.CommandEvent_IsSelection(*args, **kwargs)
e811c8ce
RD
3393
3394 def SetExtraLong(*args, **kwargs):
a95a7133 3395 """SetExtraLong(self, long extraLong)"""
54f9ee45 3396 return _core_.CommandEvent_SetExtraLong(*args, **kwargs)
e811c8ce
RD
3397
3398 def GetExtraLong(*args, **kwargs):
a95a7133 3399 """GetExtraLong(self) -> long"""
54f9ee45 3400 return _core_.CommandEvent_GetExtraLong(*args, **kwargs)
e811c8ce
RD
3401
3402 def SetInt(*args, **kwargs):
a95a7133 3403 """SetInt(self, int i)"""
54f9ee45 3404 return _core_.CommandEvent_SetInt(*args, **kwargs)
e811c8ce
RD
3405
3406 def GetInt(*args, **kwargs):
a95a7133 3407 """GetInt(self) -> long"""
54f9ee45 3408 return _core_.CommandEvent_GetInt(*args, **kwargs)
e811c8ce
RD
3409
3410 def Clone(*args, **kwargs):
a95a7133 3411 """Clone(self) -> Event"""
54f9ee45 3412 return _core_.CommandEvent_Clone(*args, **kwargs)
e811c8ce 3413
d14a1e28
RD
3414
3415class CommandEventPtr(CommandEvent):
3416 def __init__(self, this):
3417 self.this = this
3418 if not hasattr(self,"thisown"): self.thisown = 0
3419 self.__class__ = CommandEvent
54f9ee45 3420_core_.CommandEvent_swigregister(CommandEventPtr)
d14a1e28
RD
3421
3422#---------------------------------------------------------------------------
3423
3424class NotifyEvent(CommandEvent):
093d3ff1 3425 """Proxy of C++ NotifyEvent class"""
e811c8ce
RD
3426 def __repr__(self):
3427 return "<%s.%s; proxy of C++ wxNotifyEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 3428 def __init__(self, *args, **kwargs):
a95a7133 3429 """__init__(self, wxEventType commandType=wxEVT_NULL, int winid=0) -> NotifyEvent"""
54f9ee45 3430 newobj = _core_.new_NotifyEvent(*args, **kwargs)
d14a1e28
RD
3431 self.this = newobj.this
3432 self.thisown = 1
3433 del newobj.thisown
e811c8ce 3434 def Veto(*args, **kwargs):
a95a7133 3435 """Veto(self)"""
54f9ee45 3436 return _core_.NotifyEvent_Veto(*args, **kwargs)
e811c8ce
RD
3437
3438 def Allow(*args, **kwargs):
a95a7133 3439 """Allow(self)"""
54f9ee45 3440 return _core_.NotifyEvent_Allow(*args, **kwargs)
e811c8ce
RD
3441
3442 def IsAllowed(*args, **kwargs):
a95a7133 3443 """IsAllowed(self) -> bool"""
54f9ee45 3444 return _core_.NotifyEvent_IsAllowed(*args, **kwargs)
e811c8ce 3445
d14a1e28
RD
3446
3447class NotifyEventPtr(NotifyEvent):
3448 def __init__(self, this):
3449 self.this = this
3450 if not hasattr(self,"thisown"): self.thisown = 0
3451 self.__class__ = NotifyEvent
54f9ee45 3452_core_.NotifyEvent_swigregister(NotifyEventPtr)
d14a1e28
RD
3453
3454#---------------------------------------------------------------------------
3455
3456class ScrollEvent(CommandEvent):
093d3ff1 3457 """Proxy of C++ ScrollEvent class"""
e811c8ce
RD
3458 def __repr__(self):
3459 return "<%s.%s; proxy of C++ wxScrollEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 3460 def __init__(self, *args, **kwargs):
0df68c9f 3461 """
a95a7133 3462 __init__(self, wxEventType commandType=wxEVT_NULL, int winid=0, int pos=0,
0df68c9f
RD
3463 int orient=0) -> ScrollEvent
3464 """
54f9ee45 3465 newobj = _core_.new_ScrollEvent(*args, **kwargs)
d14a1e28
RD
3466 self.this = newobj.this
3467 self.thisown = 1
3468 del newobj.thisown
e811c8ce 3469 def GetOrientation(*args, **kwargs):
a95a7133 3470 """GetOrientation(self) -> int"""
54f9ee45 3471 return _core_.ScrollEvent_GetOrientation(*args, **kwargs)
e811c8ce
RD
3472
3473 def GetPosition(*args, **kwargs):
a95a7133 3474 """GetPosition(self) -> int"""
54f9ee45 3475 return _core_.ScrollEvent_GetPosition(*args, **kwargs)
e811c8ce
RD
3476
3477 def SetOrientation(*args, **kwargs):
a95a7133 3478 """SetOrientation(self, int orient)"""
54f9ee45 3479 return _core_.ScrollEvent_SetOrientation(*args, **kwargs)
e811c8ce
RD
3480
3481 def SetPosition(*args, **kwargs):
a95a7133 3482 """SetPosition(self, int pos)"""
54f9ee45 3483 return _core_.ScrollEvent_SetPosition(*args, **kwargs)
e811c8ce 3484
d14a1e28
RD
3485
3486class ScrollEventPtr(ScrollEvent):
3487 def __init__(self, this):
3488 self.this = this
3489 if not hasattr(self,"thisown"): self.thisown = 0
3490 self.__class__ = ScrollEvent
54f9ee45 3491_core_.ScrollEvent_swigregister(ScrollEventPtr)
d14a1e28
RD
3492
3493#---------------------------------------------------------------------------
3494
3495class ScrollWinEvent(Event):
093d3ff1 3496 """Proxy of C++ ScrollWinEvent class"""
e811c8ce
RD
3497 def __repr__(self):
3498 return "<%s.%s; proxy of C++ wxScrollWinEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 3499 def __init__(self, *args, **kwargs):
a95a7133 3500 """__init__(self, wxEventType commandType=wxEVT_NULL, int pos=0, int orient=0) -> ScrollWinEvent"""
54f9ee45 3501 newobj = _core_.new_ScrollWinEvent(*args, **kwargs)
d14a1e28
RD
3502 self.this = newobj.this
3503 self.thisown = 1
3504 del newobj.thisown
e811c8ce 3505 def GetOrientation(*args, **kwargs):
a95a7133 3506 """GetOrientation(self) -> int"""
54f9ee45 3507 return _core_.ScrollWinEvent_GetOrientation(*args, **kwargs)
e811c8ce
RD
3508
3509 def GetPosition(*args, **kwargs):
a95a7133 3510 """GetPosition(self) -> int"""
54f9ee45 3511 return _core_.ScrollWinEvent_GetPosition(*args, **kwargs)
e811c8ce
RD
3512
3513 def SetOrientation(*args, **kwargs):
a95a7133 3514 """SetOrientation(self, int orient)"""
54f9ee45 3515 return _core_.ScrollWinEvent_SetOrientation(*args, **kwargs)
e811c8ce
RD
3516
3517 def SetPosition(*args, **kwargs):
a95a7133 3518 """SetPosition(self, int pos)"""
54f9ee45 3519 return _core_.ScrollWinEvent_SetPosition(*args, **kwargs)
e811c8ce 3520
d14a1e28
RD
3521
3522class ScrollWinEventPtr(ScrollWinEvent):
3523 def __init__(self, this):
3524 self.this = this
3525 if not hasattr(self,"thisown"): self.thisown = 0
3526 self.__class__ = ScrollWinEvent
54f9ee45 3527_core_.ScrollWinEvent_swigregister(ScrollWinEventPtr)
d14a1e28
RD
3528
3529#---------------------------------------------------------------------------
3530
54f9ee45
RD
3531MOUSE_BTN_ANY = _core_.MOUSE_BTN_ANY
3532MOUSE_BTN_NONE = _core_.MOUSE_BTN_NONE
3533MOUSE_BTN_LEFT = _core_.MOUSE_BTN_LEFT
3534MOUSE_BTN_MIDDLE = _core_.MOUSE_BTN_MIDDLE
3535MOUSE_BTN_RIGHT = _core_.MOUSE_BTN_RIGHT
d14a1e28 3536class MouseEvent(Event):
093d3ff1 3537 """Proxy of C++ MouseEvent class"""
e811c8ce
RD
3538 def __repr__(self):
3539 return "<%s.%s; proxy of C++ wxMouseEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 3540 def __init__(self, *args, **kwargs):
a95a7133 3541 """__init__(self, wxEventType mouseType=wxEVT_NULL) -> MouseEvent"""
54f9ee45 3542 newobj = _core_.new_MouseEvent(*args, **kwargs)
d14a1e28
RD
3543 self.this = newobj.this
3544 self.thisown = 1
3545 del newobj.thisown
e811c8ce 3546 def IsButton(*args, **kwargs):
a95a7133 3547 """IsButton(self) -> bool"""
54f9ee45 3548 return _core_.MouseEvent_IsButton(*args, **kwargs)
e811c8ce
RD
3549
3550 def ButtonDown(*args, **kwargs):
a95a7133 3551 """ButtonDown(self, int but=MOUSE_BTN_ANY) -> bool"""
54f9ee45 3552 return _core_.MouseEvent_ButtonDown(*args, **kwargs)
e811c8ce
RD
3553
3554 def ButtonDClick(*args, **kwargs):
a95a7133 3555 """ButtonDClick(self, int but=MOUSE_BTN_ANY) -> bool"""
54f9ee45 3556 return _core_.MouseEvent_ButtonDClick(*args, **kwargs)
e811c8ce
RD
3557
3558 def ButtonUp(*args, **kwargs):
a95a7133 3559 """ButtonUp(self, int but=MOUSE_BTN_ANY) -> bool"""
54f9ee45 3560 return _core_.MouseEvent_ButtonUp(*args, **kwargs)
e811c8ce
RD
3561
3562 def Button(*args, **kwargs):
a95a7133 3563 """Button(self, int but) -> bool"""
54f9ee45 3564 return _core_.MouseEvent_Button(*args, **kwargs)
e811c8ce
RD
3565
3566 def ButtonIsDown(*args, **kwargs):
a95a7133 3567 """ButtonIsDown(self, int but) -> bool"""
54f9ee45 3568 return _core_.MouseEvent_ButtonIsDown(*args, **kwargs)
e811c8ce
RD
3569
3570 def GetButton(*args, **kwargs):
a95a7133 3571 """GetButton(self) -> int"""
54f9ee45 3572 return _core_.MouseEvent_GetButton(*args, **kwargs)
e811c8ce
RD
3573
3574 def ControlDown(*args, **kwargs):
a95a7133 3575 """ControlDown(self) -> bool"""
54f9ee45 3576 return _core_.MouseEvent_ControlDown(*args, **kwargs)
e811c8ce
RD
3577
3578 def MetaDown(*args, **kwargs):
a95a7133 3579 """MetaDown(self) -> bool"""
54f9ee45 3580 return _core_.MouseEvent_MetaDown(*args, **kwargs)
e811c8ce
RD
3581
3582 def AltDown(*args, **kwargs):
a95a7133 3583 """AltDown(self) -> bool"""
54f9ee45 3584 return _core_.MouseEvent_AltDown(*args, **kwargs)
e811c8ce
RD
3585
3586 def ShiftDown(*args, **kwargs):
a95a7133 3587 """ShiftDown(self) -> bool"""
54f9ee45 3588 return _core_.MouseEvent_ShiftDown(*args, **kwargs)
e811c8ce 3589
412d302d
RD
3590 def CmdDown(*args, **kwargs):
3591 """
3592 CmdDown(self) -> bool
3593
3594 "Cmd" is a pseudo key which is the same as Control for PC and Unix
3595 platforms but the special "Apple" (a.k.a as "Command") key on
3596 Macs: it makes often sense to use it instead of, say, `ControlDown`
3597 because Cmd key is used for the same thing under Mac as Ctrl
3598 elsewhere. The Ctrl still exists, it's just not used for this
3599 purpose. So for non-Mac platforms this is the same as `ControlDown`
3600 and Macs this is the same as `MetaDown`.
3601 """
3602 return _core_.MouseEvent_CmdDown(*args, **kwargs)
3603
e811c8ce 3604 def LeftDown(*args, **kwargs):
a95a7133 3605 """LeftDown(self) -> bool"""
54f9ee45 3606 return _core_.MouseEvent_LeftDown(*args, **kwargs)
e811c8ce
RD
3607
3608 def MiddleDown(*args, **kwargs):
a95a7133 3609 """MiddleDown(self) -> bool"""
54f9ee45 3610 return _core_.MouseEvent_MiddleDown(*args, **kwargs)
e811c8ce
RD
3611
3612 def RightDown(*args, **kwargs):
a95a7133 3613 """RightDown(self) -> bool"""
54f9ee45 3614 return _core_.MouseEvent_RightDown(*args, **kwargs)
e811c8ce
RD
3615
3616 def LeftUp(*args, **kwargs):
a95a7133 3617 """LeftUp(self) -> bool"""
54f9ee45 3618 return _core_.MouseEvent_LeftUp(*args, **kwargs)
e811c8ce
RD
3619
3620 def MiddleUp(*args, **kwargs):
a95a7133 3621 """MiddleUp(self) -> bool"""
54f9ee45 3622 return _core_.MouseEvent_MiddleUp(*args, **kwargs)
e811c8ce
RD
3623
3624 def RightUp(*args, **kwargs):
a95a7133 3625 """RightUp(self) -> bool"""
54f9ee45 3626 return _core_.MouseEvent_RightUp(*args, **kwargs)
e811c8ce
RD
3627
3628 def LeftDClick(*args, **kwargs):
a95a7133 3629 """LeftDClick(self) -> bool"""
54f9ee45 3630 return _core_.MouseEvent_LeftDClick(*args, **kwargs)
e811c8ce
RD
3631
3632 def MiddleDClick(*args, **kwargs):
a95a7133 3633 """MiddleDClick(self) -> bool"""
54f9ee45 3634 return _core_.MouseEvent_MiddleDClick(*args, **kwargs)
e811c8ce
RD
3635
3636 def RightDClick(*args, **kwargs):
a95a7133 3637 """RightDClick(self) -> bool"""
54f9ee45 3638 return _core_.MouseEvent_RightDClick(*args, **kwargs)
e811c8ce
RD
3639
3640 def LeftIsDown(*args, **kwargs):
a95a7133 3641 """LeftIsDown(self) -> bool"""
54f9ee45 3642 return _core_.MouseEvent_LeftIsDown(*args, **kwargs)
e811c8ce
RD
3643
3644 def MiddleIsDown(*args, **kwargs):
a95a7133 3645 """MiddleIsDown(self) -> bool"""
54f9ee45 3646 return _core_.MouseEvent_MiddleIsDown(*args, **kwargs)
e811c8ce
RD
3647
3648 def RightIsDown(*args, **kwargs):
a95a7133 3649 """RightIsDown(self) -> bool"""
54f9ee45 3650 return _core_.MouseEvent_RightIsDown(*args, **kwargs)
e811c8ce
RD
3651
3652 def Dragging(*args, **kwargs):
a95a7133 3653 """Dragging(self) -> bool"""
54f9ee45 3654 return _core_.MouseEvent_Dragging(*args, **kwargs)
e811c8ce
RD
3655
3656 def Moving(*args, **kwargs):
a95a7133 3657 """Moving(self) -> bool"""
54f9ee45 3658 return _core_.MouseEvent_Moving(*args, **kwargs)
e811c8ce
RD
3659
3660 def Entering(*args, **kwargs):
a95a7133 3661 """Entering(self) -> bool"""
54f9ee45 3662 return _core_.MouseEvent_Entering(*args, **kwargs)
e811c8ce
RD
3663
3664 def Leaving(*args, **kwargs):
a95a7133 3665 """Leaving(self) -> bool"""
54f9ee45 3666 return _core_.MouseEvent_Leaving(*args, **kwargs)
e811c8ce
RD
3667
3668 def GetPosition(*args, **kwargs):
0df68c9f 3669 """
a95a7133 3670 GetPosition(self) -> Point
e811c8ce 3671
41e2b43e
RD
3672 Returns the position of the mouse in window coordinates when the event
3673 happened.
0df68c9f 3674 """
54f9ee45 3675 return _core_.MouseEvent_GetPosition(*args, **kwargs)
e811c8ce
RD
3676
3677 def GetPositionTuple(*args, **kwargs):
0df68c9f
RD
3678 """
3679 GetPositionTuple() -> (x,y)
e811c8ce 3680
41e2b43e
RD
3681 Returns the position of the mouse in window coordinates when the event
3682 happened.
0df68c9f 3683 """
54f9ee45 3684 return _core_.MouseEvent_GetPositionTuple(*args, **kwargs)
e811c8ce
RD
3685
3686 def GetLogicalPosition(*args, **kwargs):
a95a7133 3687 """GetLogicalPosition(self, DC dc) -> Point"""
54f9ee45 3688 return _core_.MouseEvent_GetLogicalPosition(*args, **kwargs)
e811c8ce
RD
3689
3690 def GetX(*args, **kwargs):
a95a7133 3691 """GetX(self) -> int"""
54f9ee45 3692 return _core_.MouseEvent_GetX(*args, **kwargs)
e811c8ce
RD
3693
3694 def GetY(*args, **kwargs):
a95a7133 3695 """GetY(self) -> int"""
54f9ee45 3696 return _core_.MouseEvent_GetY(*args, **kwargs)
e811c8ce
RD
3697
3698 def GetWheelRotation(*args, **kwargs):
a95a7133 3699 """GetWheelRotation(self) -> int"""
54f9ee45 3700 return _core_.MouseEvent_GetWheelRotation(*args, **kwargs)
e811c8ce
RD
3701
3702 def GetWheelDelta(*args, **kwargs):
a95a7133 3703 """GetWheelDelta(self) -> int"""
54f9ee45 3704 return _core_.MouseEvent_GetWheelDelta(*args, **kwargs)
e811c8ce
RD
3705
3706 def GetLinesPerAction(*args, **kwargs):
a95a7133 3707 """GetLinesPerAction(self) -> int"""
54f9ee45 3708 return _core_.MouseEvent_GetLinesPerAction(*args, **kwargs)
e811c8ce
RD
3709
3710 def IsPageScroll(*args, **kwargs):
a95a7133 3711 """IsPageScroll(self) -> bool"""
54f9ee45
RD
3712 return _core_.MouseEvent_IsPageScroll(*args, **kwargs)
3713
3714 m_x = property(_core_.MouseEvent_m_x_get, _core_.MouseEvent_m_x_set)
3715 m_y = property(_core_.MouseEvent_m_y_get, _core_.MouseEvent_m_y_set)
3716 m_leftDown = property(_core_.MouseEvent_m_leftDown_get, _core_.MouseEvent_m_leftDown_set)
3717 m_middleDown = property(_core_.MouseEvent_m_middleDown_get, _core_.MouseEvent_m_middleDown_set)
3718 m_rightDown = property(_core_.MouseEvent_m_rightDown_get, _core_.MouseEvent_m_rightDown_set)
3719 m_controlDown = property(_core_.MouseEvent_m_controlDown_get, _core_.MouseEvent_m_controlDown_set)
3720 m_shiftDown = property(_core_.MouseEvent_m_shiftDown_get, _core_.MouseEvent_m_shiftDown_set)
3721 m_altDown = property(_core_.MouseEvent_m_altDown_get, _core_.MouseEvent_m_altDown_set)
3722 m_metaDown = property(_core_.MouseEvent_m_metaDown_get, _core_.MouseEvent_m_metaDown_set)
3723 m_wheelRotation = property(_core_.MouseEvent_m_wheelRotation_get, _core_.MouseEvent_m_wheelRotation_set)
3724 m_wheelDelta = property(_core_.MouseEvent_m_wheelDelta_get, _core_.MouseEvent_m_wheelDelta_set)
3725 m_linesPerAction = property(_core_.MouseEvent_m_linesPerAction_get, _core_.MouseEvent_m_linesPerAction_set)
d14a1e28
RD
3726
3727class MouseEventPtr(MouseEvent):
3728 def __init__(self, this):
3729 self.this = this
3730 if not hasattr(self,"thisown"): self.thisown = 0
3731 self.__class__ = MouseEvent
54f9ee45 3732_core_.MouseEvent_swigregister(MouseEventPtr)
d14a1e28
RD
3733
3734#---------------------------------------------------------------------------
3735
3736class SetCursorEvent(Event):
093d3ff1 3737 """Proxy of C++ SetCursorEvent class"""
e811c8ce
RD
3738 def __repr__(self):
3739 return "<%s.%s; proxy of C++ wxSetCursorEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 3740 def __init__(self, *args, **kwargs):
a95a7133 3741 """__init__(self, int x=0, int y=0) -> SetCursorEvent"""
54f9ee45 3742 newobj = _core_.new_SetCursorEvent(*args, **kwargs)
d14a1e28
RD
3743 self.this = newobj.this
3744 self.thisown = 1
3745 del newobj.thisown
e811c8ce 3746 def GetX(*args, **kwargs):
a95a7133 3747 """GetX(self) -> int"""
54f9ee45 3748 return _core_.SetCursorEvent_GetX(*args, **kwargs)
e811c8ce
RD
3749
3750 def GetY(*args, **kwargs):
a95a7133 3751 """GetY(self) -> int"""
54f9ee45 3752 return _core_.SetCursorEvent_GetY(*args, **kwargs)
e811c8ce
RD
3753
3754 def SetCursor(*args, **kwargs):
a95a7133 3755 """SetCursor(self, Cursor cursor)"""
54f9ee45 3756 return _core_.SetCursorEvent_SetCursor(*args, **kwargs)
e811c8ce
RD
3757
3758 def GetCursor(*args, **kwargs):
a95a7133 3759 """GetCursor(self) -> Cursor"""
54f9ee45 3760 return _core_.SetCursorEvent_GetCursor(*args, **kwargs)
e811c8ce
RD
3761
3762 def HasCursor(*args, **kwargs):
a95a7133 3763 """HasCursor(self) -> bool"""
54f9ee45 3764 return _core_.SetCursorEvent_HasCursor(*args, **kwargs)
e811c8ce 3765
d14a1e28
RD
3766
3767class SetCursorEventPtr(SetCursorEvent):
3768 def __init__(self, this):
3769 self.this = this
3770 if not hasattr(self,"thisown"): self.thisown = 0
3771 self.__class__ = SetCursorEvent
54f9ee45 3772_core_.SetCursorEvent_swigregister(SetCursorEventPtr)
d14a1e28
RD
3773
3774#---------------------------------------------------------------------------
3775
3776class KeyEvent(Event):
093d3ff1 3777 """Proxy of C++ KeyEvent class"""
e811c8ce
RD
3778 def __repr__(self):
3779 return "<%s.%s; proxy of C++ wxKeyEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 3780 def __init__(self, *args, **kwargs):
a95a7133 3781 """__init__(self, wxEventType keyType=wxEVT_NULL) -> KeyEvent"""
54f9ee45 3782 newobj = _core_.new_KeyEvent(*args, **kwargs)
d14a1e28
RD
3783 self.this = newobj.this
3784 self.thisown = 1
3785 del newobj.thisown
e811c8ce 3786 def ControlDown(*args, **kwargs):
a95a7133 3787 """ControlDown(self) -> bool"""
54f9ee45 3788 return _core_.KeyEvent_ControlDown(*args, **kwargs)
e811c8ce
RD
3789
3790 def MetaDown(*args, **kwargs):
a95a7133 3791 """MetaDown(self) -> bool"""
54f9ee45 3792 return _core_.KeyEvent_MetaDown(*args, **kwargs)
e811c8ce
RD
3793
3794 def AltDown(*args, **kwargs):
a95a7133 3795 """AltDown(self) -> bool"""
54f9ee45 3796 return _core_.KeyEvent_AltDown(*args, **kwargs)
e811c8ce
RD
3797
3798 def ShiftDown(*args, **kwargs):
a95a7133 3799 """ShiftDown(self) -> bool"""
54f9ee45 3800 return _core_.KeyEvent_ShiftDown(*args, **kwargs)
e811c8ce 3801
412d302d
RD
3802 def CmdDown(*args, **kwargs):
3803 """
3804 CmdDown(self) -> bool
3805
3806 "Cmd" is a pseudo key which is the same as Control for PC and Unix
3807 platforms but the special "Apple" (a.k.a as "Command") key on
3808 Macs: it makes often sense to use it instead of, say, `ControlDown`
3809 because Cmd key is used for the same thing under Mac as Ctrl
3810 elsewhere. The Ctrl still exists, it's just not used for this
3811 purpose. So for non-Mac platforms this is the same as `ControlDown`
3812 and Macs this is the same as `MetaDown`.
3813 """
3814 return _core_.KeyEvent_CmdDown(*args, **kwargs)
3815
e811c8ce 3816 def HasModifiers(*args, **kwargs):
a95a7133 3817 """HasModifiers(self) -> bool"""
54f9ee45 3818 return _core_.KeyEvent_HasModifiers(*args, **kwargs)
e811c8ce
RD
3819
3820 def GetKeyCode(*args, **kwargs):
a95a7133 3821 """GetKeyCode(self) -> int"""
54f9ee45 3822 return _core_.KeyEvent_GetKeyCode(*args, **kwargs)
e811c8ce 3823
d14a1e28 3824 KeyCode = GetKeyCode
19272049
RD
3825 def GetUnicodeKey(*args, **kwargs):
3826 """GetUnicodeKey(self) -> int"""
3827 return _core_.KeyEvent_GetUnicodeKey(*args, **kwargs)
e811c8ce 3828
19272049 3829 GetUniChar = GetUnicodeKey
e811c8ce 3830 def GetRawKeyCode(*args, **kwargs):
a95a7133 3831 """GetRawKeyCode(self) -> unsigned int"""
54f9ee45 3832 return _core_.KeyEvent_GetRawKeyCode(*args, **kwargs)
e811c8ce
RD
3833
3834 def GetRawKeyFlags(*args, **kwargs):
a95a7133 3835 """GetRawKeyFlags(self) -> unsigned int"""
54f9ee45 3836 return _core_.KeyEvent_GetRawKeyFlags(*args, **kwargs)
e811c8ce
RD
3837
3838 def GetPosition(*args, **kwargs):
0df68c9f 3839 """
a95a7133 3840 GetPosition(self) -> Point
e811c8ce 3841
0df68c9f
RD
3842 Find the position of the event.
3843 """
54f9ee45 3844 return _core_.KeyEvent_GetPosition(*args, **kwargs)
e811c8ce
RD
3845
3846 def GetPositionTuple(*args, **kwargs):
0df68c9f
RD
3847 """
3848 GetPositionTuple() -> (x,y)
e811c8ce 3849
0df68c9f
RD
3850 Find the position of the event.
3851 """
54f9ee45 3852 return _core_.KeyEvent_GetPositionTuple(*args, **kwargs)
e811c8ce
RD
3853
3854 def GetX(*args, **kwargs):
a95a7133 3855 """GetX(self) -> int"""
54f9ee45 3856 return _core_.KeyEvent_GetX(*args, **kwargs)
e811c8ce
RD
3857
3858 def GetY(*args, **kwargs):
a95a7133 3859 """GetY(self) -> int"""
54f9ee45
RD
3860 return _core_.KeyEvent_GetY(*args, **kwargs)
3861
3862 m_x = property(_core_.KeyEvent_m_x_get, _core_.KeyEvent_m_x_set)
3863 m_y = property(_core_.KeyEvent_m_y_get, _core_.KeyEvent_m_y_set)
3864 m_keyCode = property(_core_.KeyEvent_m_keyCode_get, _core_.KeyEvent_m_keyCode_set)
3865 m_controlDown = property(_core_.KeyEvent_m_controlDown_get, _core_.KeyEvent_m_controlDown_set)
3866 m_shiftDown = property(_core_.KeyEvent_m_shiftDown_get, _core_.KeyEvent_m_shiftDown_set)
3867 m_altDown = property(_core_.KeyEvent_m_altDown_get, _core_.KeyEvent_m_altDown_set)
3868 m_metaDown = property(_core_.KeyEvent_m_metaDown_get, _core_.KeyEvent_m_metaDown_set)
3869 m_scanCode = property(_core_.KeyEvent_m_scanCode_get, _core_.KeyEvent_m_scanCode_set)
3870 m_rawCode = property(_core_.KeyEvent_m_rawCode_get, _core_.KeyEvent_m_rawCode_set)
3871 m_rawFlags = property(_core_.KeyEvent_m_rawFlags_get, _core_.KeyEvent_m_rawFlags_set)
d14a1e28
RD
3872
3873class KeyEventPtr(KeyEvent):
3874 def __init__(self, this):
3875 self.this = this
3876 if not hasattr(self,"thisown"): self.thisown = 0
3877 self.__class__ = KeyEvent
54f9ee45 3878_core_.KeyEvent_swigregister(KeyEventPtr)
d14a1e28
RD
3879
3880#---------------------------------------------------------------------------
3881
3882class SizeEvent(Event):
093d3ff1 3883 """Proxy of C++ SizeEvent class"""
e811c8ce
RD
3884 def __repr__(self):
3885 return "<%s.%s; proxy of C++ wxSizeEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 3886 def __init__(self, *args, **kwargs):
a95a7133 3887 """__init__(self, Size sz=DefaultSize, int winid=0) -> SizeEvent"""
54f9ee45 3888 newobj = _core_.new_SizeEvent(*args, **kwargs)
d14a1e28
RD
3889 self.this = newobj.this
3890 self.thisown = 1
3891 del newobj.thisown
e811c8ce 3892 def GetSize(*args, **kwargs):
a95a7133 3893 """GetSize(self) -> Size"""
54f9ee45 3894 return _core_.SizeEvent_GetSize(*args, **kwargs)
e811c8ce
RD
3895
3896 def GetRect(*args, **kwargs):
a95a7133 3897 """GetRect(self) -> Rect"""
54f9ee45 3898 return _core_.SizeEvent_GetRect(*args, **kwargs)
e811c8ce
RD
3899
3900 def SetRect(*args, **kwargs):
a95a7133 3901 """SetRect(self, Rect rect)"""
54f9ee45 3902 return _core_.SizeEvent_SetRect(*args, **kwargs)
e811c8ce
RD
3903
3904 def SetSize(*args, **kwargs):
a95a7133 3905 """SetSize(self, Size size)"""
54f9ee45 3906 return _core_.SizeEvent_SetSize(*args, **kwargs)
e811c8ce 3907
54f9ee45
RD
3908 m_size = property(_core_.SizeEvent_m_size_get, _core_.SizeEvent_m_size_set)
3909 m_rect = property(_core_.SizeEvent_m_rect_get, _core_.SizeEvent_m_rect_set)
d14a1e28
RD
3910
3911class SizeEventPtr(SizeEvent):
3912 def __init__(self, this):
3913 self.this = this
3914 if not hasattr(self,"thisown"): self.thisown = 0
3915 self.__class__ = SizeEvent
54f9ee45 3916_core_.SizeEvent_swigregister(SizeEventPtr)
d14a1e28
RD
3917
3918#---------------------------------------------------------------------------
3919
3920class MoveEvent(Event):
093d3ff1 3921 """Proxy of C++ MoveEvent class"""
e811c8ce
RD
3922 def __repr__(self):
3923 return "<%s.%s; proxy of C++ wxMoveEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 3924 def __init__(self, *args, **kwargs):
a95a7133 3925 """__init__(self, Point pos=DefaultPosition, int winid=0) -> MoveEvent"""
54f9ee45 3926 newobj = _core_.new_MoveEvent(*args, **kwargs)
d14a1e28
RD
3927 self.this = newobj.this
3928 self.thisown = 1
3929 del newobj.thisown
e811c8ce 3930 def GetPosition(*args, **kwargs):
a95a7133 3931 """GetPosition(self) -> Point"""
54f9ee45 3932 return _core_.MoveEvent_GetPosition(*args, **kwargs)
e811c8ce
RD
3933
3934 def GetRect(*args, **kwargs):
a95a7133 3935 """GetRect(self) -> Rect"""
54f9ee45 3936 return _core_.MoveEvent_GetRect(*args, **kwargs)
e811c8ce
RD
3937
3938 def SetRect(*args, **kwargs):
a95a7133 3939 """SetRect(self, Rect rect)"""
54f9ee45 3940 return _core_.MoveEvent_SetRect(*args, **kwargs)
e811c8ce
RD
3941
3942 def SetPosition(*args, **kwargs):
a95a7133 3943 """SetPosition(self, Point pos)"""
54f9ee45 3944 return _core_.MoveEvent_SetPosition(*args, **kwargs)
e811c8ce 3945
7557b9b5
RD
3946 m_pos = property(GetPosition, SetPosition)
3947 m_rect = property(GetRect, SetRect)
3948
d14a1e28
RD
3949
3950class MoveEventPtr(MoveEvent):
3951 def __init__(self, this):
3952 self.this = this
3953 if not hasattr(self,"thisown"): self.thisown = 0
3954 self.__class__ = MoveEvent
54f9ee45 3955_core_.MoveEvent_swigregister(MoveEventPtr)
d14a1e28
RD
3956
3957#---------------------------------------------------------------------------
3958
3959class PaintEvent(Event):
093d3ff1 3960 """Proxy of C++ PaintEvent class"""
e811c8ce
RD
3961 def __repr__(self):
3962 return "<%s.%s; proxy of C++ wxPaintEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 3963 def __init__(self, *args, **kwargs):
a95a7133 3964 """__init__(self, int Id=0) -> PaintEvent"""
54f9ee45 3965 newobj = _core_.new_PaintEvent(*args, **kwargs)
d14a1e28
RD
3966 self.this = newobj.this
3967 self.thisown = 1
3968 del newobj.thisown
d14a1e28
RD
3969
3970class PaintEventPtr(PaintEvent):
3971 def __init__(self, this):
3972 self.this = this
3973 if not hasattr(self,"thisown"): self.thisown = 0
3974 self.__class__ = PaintEvent
54f9ee45 3975_core_.PaintEvent_swigregister(PaintEventPtr)
d14a1e28
RD
3976
3977class NcPaintEvent(Event):
093d3ff1 3978 """Proxy of C++ NcPaintEvent class"""
e811c8ce
RD
3979 def __repr__(self):
3980 return "<%s.%s; proxy of C++ wxNcPaintEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 3981 def __init__(self, *args, **kwargs):
a95a7133 3982 """__init__(self, int winid=0) -> NcPaintEvent"""
54f9ee45 3983 newobj = _core_.new_NcPaintEvent(*args, **kwargs)
d14a1e28
RD
3984 self.this = newobj.this
3985 self.thisown = 1
3986 del newobj.thisown
d14a1e28
RD
3987
3988class NcPaintEventPtr(NcPaintEvent):
3989 def __init__(self, this):
3990 self.this = this
3991 if not hasattr(self,"thisown"): self.thisown = 0
3992 self.__class__ = NcPaintEvent
54f9ee45 3993_core_.NcPaintEvent_swigregister(NcPaintEventPtr)
d14a1e28
RD
3994
3995#---------------------------------------------------------------------------
3996
3997class EraseEvent(Event):
093d3ff1 3998 """Proxy of C++ EraseEvent class"""
e811c8ce
RD
3999 def __repr__(self):
4000 return "<%s.%s; proxy of C++ wxEraseEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 4001 def __init__(self, *args, **kwargs):
a95a7133 4002 """__init__(self, int Id=0, DC dc=(wxDC *) NULL) -> EraseEvent"""
54f9ee45 4003 newobj = _core_.new_EraseEvent(*args, **kwargs)
d14a1e28
RD
4004 self.this = newobj.this
4005 self.thisown = 1
4006 del newobj.thisown
e811c8ce 4007 def GetDC(*args, **kwargs):
a95a7133 4008 """GetDC(self) -> DC"""
54f9ee45 4009 return _core_.EraseEvent_GetDC(*args, **kwargs)
e811c8ce 4010
d14a1e28
RD
4011
4012class EraseEventPtr(EraseEvent):
4013 def __init__(self, this):
4014 self.this = this
4015 if not hasattr(self,"thisown"): self.thisown = 0
4016 self.__class__ = EraseEvent
54f9ee45 4017_core_.EraseEvent_swigregister(EraseEventPtr)
d14a1e28
RD
4018
4019#---------------------------------------------------------------------------
4020
4021class FocusEvent(Event):
093d3ff1 4022 """Proxy of C++ FocusEvent class"""
e811c8ce
RD
4023 def __repr__(self):
4024 return "<%s.%s; proxy of C++ wxFocusEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 4025 def __init__(self, *args, **kwargs):
a95a7133 4026 """__init__(self, wxEventType type=wxEVT_NULL, int winid=0) -> FocusEvent"""
54f9ee45 4027 newobj = _core_.new_FocusEvent(*args, **kwargs)
d14a1e28
RD
4028 self.this = newobj.this
4029 self.thisown = 1
4030 del newobj.thisown
e811c8ce 4031 def GetWindow(*args, **kwargs):
a95a7133 4032 """GetWindow(self) -> Window"""
54f9ee45 4033 return _core_.FocusEvent_GetWindow(*args, **kwargs)
e811c8ce
RD
4034
4035 def SetWindow(*args, **kwargs):
a95a7133 4036 """SetWindow(self, Window win)"""
54f9ee45 4037 return _core_.FocusEvent_SetWindow(*args, **kwargs)
e811c8ce 4038
d14a1e28
RD
4039
4040class FocusEventPtr(FocusEvent):
4041 def __init__(self, this):
4042 self.this = this
4043 if not hasattr(self,"thisown"): self.thisown = 0
4044 self.__class__ = FocusEvent
54f9ee45 4045_core_.FocusEvent_swigregister(FocusEventPtr)
d14a1e28
RD
4046
4047#---------------------------------------------------------------------------
4048
4049class ChildFocusEvent(CommandEvent):
093d3ff1 4050 """Proxy of C++ ChildFocusEvent class"""
e811c8ce
RD
4051 def __repr__(self):
4052 return "<%s.%s; proxy of C++ wxChildFocusEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 4053 def __init__(self, *args, **kwargs):
a95a7133 4054 """__init__(self, Window win=None) -> ChildFocusEvent"""
54f9ee45 4055 newobj = _core_.new_ChildFocusEvent(*args, **kwargs)
d14a1e28
RD
4056 self.this = newobj.this
4057 self.thisown = 1
4058 del newobj.thisown
e811c8ce 4059 def GetWindow(*args, **kwargs):
a95a7133 4060 """GetWindow(self) -> Window"""
54f9ee45 4061 return _core_.ChildFocusEvent_GetWindow(*args, **kwargs)
e811c8ce 4062
d14a1e28
RD
4063
4064class ChildFocusEventPtr(ChildFocusEvent):
4065 def __init__(self, this):
4066 self.this = this
4067 if not hasattr(self,"thisown"): self.thisown = 0
4068 self.__class__ = ChildFocusEvent
54f9ee45 4069_core_.ChildFocusEvent_swigregister(ChildFocusEventPtr)
d14a1e28
RD
4070
4071#---------------------------------------------------------------------------
4072
4073class ActivateEvent(Event):
093d3ff1 4074 """Proxy of C++ ActivateEvent class"""
e811c8ce
RD
4075 def __repr__(self):
4076 return "<%s.%s; proxy of C++ wxActivateEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 4077 def __init__(self, *args, **kwargs):
a95a7133 4078 """__init__(self, wxEventType type=wxEVT_NULL, bool active=True, int Id=0) -> ActivateEvent"""
54f9ee45 4079 newobj = _core_.new_ActivateEvent(*args, **kwargs)
d14a1e28
RD
4080 self.this = newobj.this
4081 self.thisown = 1
4082 del newobj.thisown
e811c8ce 4083 def GetActive(*args, **kwargs):
a95a7133 4084 """GetActive(self) -> bool"""
54f9ee45 4085 return _core_.ActivateEvent_GetActive(*args, **kwargs)
e811c8ce 4086
d14a1e28
RD
4087
4088class ActivateEventPtr(ActivateEvent):
4089 def __init__(self, this):
4090 self.this = this
4091 if not hasattr(self,"thisown"): self.thisown = 0
4092 self.__class__ = ActivateEvent
54f9ee45 4093_core_.ActivateEvent_swigregister(ActivateEventPtr)
d14a1e28
RD
4094
4095#---------------------------------------------------------------------------
4096
4097class InitDialogEvent(Event):
093d3ff1 4098 """Proxy of C++ InitDialogEvent class"""
e811c8ce
RD
4099 def __repr__(self):
4100 return "<%s.%s; proxy of C++ wxInitDialogEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 4101 def __init__(self, *args, **kwargs):
a95a7133 4102 """__init__(self, int Id=0) -> InitDialogEvent"""
54f9ee45 4103 newobj = _core_.new_InitDialogEvent(*args, **kwargs)
d14a1e28
RD
4104 self.this = newobj.this
4105 self.thisown = 1
4106 del newobj.thisown
d14a1e28
RD
4107
4108class InitDialogEventPtr(InitDialogEvent):
4109 def __init__(self, this):
4110 self.this = this
4111 if not hasattr(self,"thisown"): self.thisown = 0
4112 self.__class__ = InitDialogEvent
54f9ee45 4113_core_.InitDialogEvent_swigregister(InitDialogEventPtr)
d14a1e28
RD
4114
4115#---------------------------------------------------------------------------
4116
4117class MenuEvent(Event):
093d3ff1 4118 """Proxy of C++ MenuEvent class"""
e811c8ce
RD
4119 def __repr__(self):
4120 return "<%s.%s; proxy of C++ wxMenuEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 4121 def __init__(self, *args, **kwargs):
a95a7133 4122 """__init__(self, wxEventType type=wxEVT_NULL, int winid=0, Menu menu=None) -> MenuEvent"""
54f9ee45 4123 newobj = _core_.new_MenuEvent(*args, **kwargs)
d14a1e28
RD
4124 self.this = newobj.this
4125 self.thisown = 1
4126 del newobj.thisown
e811c8ce 4127 def GetMenuId(*args, **kwargs):
a95a7133 4128 """GetMenuId(self) -> int"""
54f9ee45 4129 return _core_.MenuEvent_GetMenuId(*args, **kwargs)
e811c8ce
RD
4130
4131 def IsPopup(*args, **kwargs):
a95a7133 4132 """IsPopup(self) -> bool"""
54f9ee45 4133 return _core_.MenuEvent_IsPopup(*args, **kwargs)
e811c8ce
RD
4134
4135 def GetMenu(*args, **kwargs):
a95a7133 4136 """GetMenu(self) -> Menu"""
54f9ee45 4137 return _core_.MenuEvent_GetMenu(*args, **kwargs)
e811c8ce 4138
d14a1e28
RD
4139
4140class MenuEventPtr(MenuEvent):
4141 def __init__(self, this):
4142 self.this = this
4143 if not hasattr(self,"thisown"): self.thisown = 0
4144 self.__class__ = MenuEvent
54f9ee45 4145_core_.MenuEvent_swigregister(MenuEventPtr)
d14a1e28
RD
4146
4147#---------------------------------------------------------------------------
4148
4149class CloseEvent(Event):
093d3ff1 4150 """Proxy of C++ CloseEvent class"""
e811c8ce
RD
4151 def __repr__(self):
4152 return "<%s.%s; proxy of C++ wxCloseEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 4153 def __init__(self, *args, **kwargs):
a95a7133 4154 """__init__(self, wxEventType type=wxEVT_NULL, int winid=0) -> CloseEvent"""
54f9ee45 4155 newobj = _core_.new_CloseEvent(*args, **kwargs)
d14a1e28
RD
4156 self.this = newobj.this
4157 self.thisown = 1
4158 del newobj.thisown
e811c8ce 4159 def SetLoggingOff(*args, **kwargs):
a95a7133 4160 """SetLoggingOff(self, bool logOff)"""
54f9ee45 4161 return _core_.CloseEvent_SetLoggingOff(*args, **kwargs)
e811c8ce
RD
4162
4163 def GetLoggingOff(*args, **kwargs):
a95a7133 4164 """GetLoggingOff(self) -> bool"""
54f9ee45 4165 return _core_.CloseEvent_GetLoggingOff(*args, **kwargs)
e811c8ce
RD
4166
4167 def Veto(*args, **kwargs):
a95a7133 4168 """Veto(self, bool veto=True)"""
54f9ee45 4169 return _core_.CloseEvent_Veto(*args, **kwargs)
e811c8ce
RD
4170
4171 def SetCanVeto(*args, **kwargs):
a95a7133 4172 """SetCanVeto(self, bool canVeto)"""
54f9ee45 4173 return _core_.CloseEvent_SetCanVeto(*args, **kwargs)
e811c8ce
RD
4174
4175 def CanVeto(*args, **kwargs):
a95a7133 4176 """CanVeto(self) -> bool"""
54f9ee45 4177 return _core_.CloseEvent_CanVeto(*args, **kwargs)
e811c8ce
RD
4178
4179 def GetVeto(*args, **kwargs):
a95a7133 4180 """GetVeto(self) -> bool"""
54f9ee45 4181 return _core_.CloseEvent_GetVeto(*args, **kwargs)
e811c8ce 4182
d14a1e28
RD
4183
4184class CloseEventPtr(CloseEvent):
4185 def __init__(self, this):
4186 self.this = this
4187 if not hasattr(self,"thisown"): self.thisown = 0
4188 self.__class__ = CloseEvent
54f9ee45 4189_core_.CloseEvent_swigregister(CloseEventPtr)
d14a1e28
RD
4190
4191#---------------------------------------------------------------------------
4192
4193class ShowEvent(Event):
093d3ff1 4194 """Proxy of C++ ShowEvent class"""
e811c8ce
RD
4195 def __repr__(self):
4196 return "<%s.%s; proxy of C++ wxShowEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 4197 def __init__(self, *args, **kwargs):
a95a7133 4198 """__init__(self, int winid=0, bool show=False) -> ShowEvent"""
54f9ee45 4199 newobj = _core_.new_ShowEvent(*args, **kwargs)
d14a1e28
RD
4200 self.this = newobj.this
4201 self.thisown = 1
4202 del newobj.thisown
e811c8ce 4203 def SetShow(*args, **kwargs):
a95a7133 4204 """SetShow(self, bool show)"""
54f9ee45 4205 return _core_.ShowEvent_SetShow(*args, **kwargs)
e811c8ce
RD
4206
4207 def GetShow(*args, **kwargs):
a95a7133 4208 """GetShow(self) -> bool"""
54f9ee45 4209 return _core_.ShowEvent_GetShow(*args, **kwargs)
e811c8ce 4210
d14a1e28
RD
4211
4212class ShowEventPtr(ShowEvent):
4213 def __init__(self, this):
4214 self.this = this
4215 if not hasattr(self,"thisown"): self.thisown = 0
4216 self.__class__ = ShowEvent
54f9ee45 4217_core_.ShowEvent_swigregister(ShowEventPtr)
d14a1e28
RD
4218
4219#---------------------------------------------------------------------------
4220
4221class IconizeEvent(Event):
093d3ff1 4222 """Proxy of C++ IconizeEvent class"""
e811c8ce
RD
4223 def __repr__(self):
4224 return "<%s.%s; proxy of C++ wxIconizeEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 4225 def __init__(self, *args, **kwargs):
a95a7133 4226 """__init__(self, int id=0, bool iconized=True) -> IconizeEvent"""
54f9ee45 4227 newobj = _core_.new_IconizeEvent(*args, **kwargs)
d14a1e28
RD
4228 self.this = newobj.this
4229 self.thisown = 1
4230 del newobj.thisown
e811c8ce 4231 def Iconized(*args, **kwargs):
a95a7133 4232 """Iconized(self) -> bool"""
54f9ee45 4233 return _core_.IconizeEvent_Iconized(*args, **kwargs)
e811c8ce 4234
d14a1e28
RD
4235
4236class IconizeEventPtr(IconizeEvent):
4237 def __init__(self, this):
4238 self.this = this
4239 if not hasattr(self,"thisown"): self.thisown = 0
4240 self.__class__ = IconizeEvent
54f9ee45 4241_core_.IconizeEvent_swigregister(IconizeEventPtr)
d14a1e28
RD
4242
4243#---------------------------------------------------------------------------
4244
4245class MaximizeEvent(Event):
093d3ff1 4246 """Proxy of C++ MaximizeEvent class"""
e811c8ce
RD
4247 def __repr__(self):
4248 return "<%s.%s; proxy of C++ wxMaximizeEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 4249 def __init__(self, *args, **kwargs):
a95a7133 4250 """__init__(self, int id=0) -> MaximizeEvent"""
54f9ee45 4251 newobj = _core_.new_MaximizeEvent(*args, **kwargs)
d14a1e28
RD
4252 self.this = newobj.this
4253 self.thisown = 1
4254 del newobj.thisown
d14a1e28
RD
4255
4256class MaximizeEventPtr(MaximizeEvent):
4257 def __init__(self, this):
4258 self.this = this
4259 if not hasattr(self,"thisown"): self.thisown = 0
4260 self.__class__ = MaximizeEvent
54f9ee45 4261_core_.MaximizeEvent_swigregister(MaximizeEventPtr)
d14a1e28
RD
4262
4263#---------------------------------------------------------------------------
4264
4265class DropFilesEvent(Event):
093d3ff1 4266 """Proxy of C++ DropFilesEvent class"""
d14a1e28
RD
4267 def __init__(self): raise RuntimeError, "No constructor defined"
4268 def __repr__(self):
4269 return "<%s.%s; proxy of C++ wxDropFilesEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
e811c8ce 4270 def GetPosition(*args, **kwargs):
a95a7133 4271 """GetPosition(self) -> Point"""
54f9ee45 4272 return _core_.DropFilesEvent_GetPosition(*args, **kwargs)
e811c8ce
RD
4273
4274 def GetNumberOfFiles(*args, **kwargs):
a95a7133 4275 """GetNumberOfFiles(self) -> int"""
54f9ee45 4276 return _core_.DropFilesEvent_GetNumberOfFiles(*args, **kwargs)
e811c8ce
RD
4277
4278 def GetFiles(*args, **kwargs):
a95a7133 4279 """GetFiles(self) -> PyObject"""
54f9ee45 4280 return _core_.DropFilesEvent_GetFiles(*args, **kwargs)
e811c8ce 4281
d14a1e28
RD
4282
4283class DropFilesEventPtr(DropFilesEvent):
4284 def __init__(self, this):
4285 self.this = this
4286 if not hasattr(self,"thisown"): self.thisown = 0
4287 self.__class__ = DropFilesEvent
54f9ee45 4288_core_.DropFilesEvent_swigregister(DropFilesEventPtr)
d14a1e28
RD
4289
4290#---------------------------------------------------------------------------
4291
54f9ee45
RD
4292UPDATE_UI_PROCESS_ALL = _core_.UPDATE_UI_PROCESS_ALL
4293UPDATE_UI_PROCESS_SPECIFIED = _core_.UPDATE_UI_PROCESS_SPECIFIED
d14a1e28 4294class UpdateUIEvent(CommandEvent):
093d3ff1 4295 """Proxy of C++ UpdateUIEvent class"""
e811c8ce
RD
4296 def __repr__(self):
4297 return "<%s.%s; proxy of C++ wxUpdateUIEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 4298 def __init__(self, *args, **kwargs):
a95a7133 4299 """__init__(self, int commandId=0) -> UpdateUIEvent"""
54f9ee45 4300 newobj = _core_.new_UpdateUIEvent(*args, **kwargs)
d14a1e28
RD
4301 self.this = newobj.this
4302 self.thisown = 1
4303 del newobj.thisown
e811c8ce 4304 def GetChecked(*args, **kwargs):
a95a7133 4305 """GetChecked(self) -> bool"""
54f9ee45 4306 return _core_.UpdateUIEvent_GetChecked(*args, **kwargs)
e811c8ce
RD
4307
4308 def GetEnabled(*args, **kwargs):
a95a7133 4309 """GetEnabled(self) -> bool"""
54f9ee45 4310 return _core_.UpdateUIEvent_GetEnabled(*args, **kwargs)
e811c8ce
RD
4311
4312 def GetText(*args, **kwargs):
a95a7133 4313 """GetText(self) -> String"""
54f9ee45 4314 return _core_.UpdateUIEvent_GetText(*args, **kwargs)
e811c8ce
RD
4315
4316 def GetSetText(*args, **kwargs):
a95a7133 4317 """GetSetText(self) -> bool"""
54f9ee45 4318 return _core_.UpdateUIEvent_GetSetText(*args, **kwargs)
e811c8ce
RD
4319
4320 def GetSetChecked(*args, **kwargs):
a95a7133 4321 """GetSetChecked(self) -> bool"""
54f9ee45 4322 return _core_.UpdateUIEvent_GetSetChecked(*args, **kwargs)
e811c8ce
RD
4323
4324 def GetSetEnabled(*args, **kwargs):
a95a7133 4325 """GetSetEnabled(self) -> bool"""
54f9ee45 4326 return _core_.UpdateUIEvent_GetSetEnabled(*args, **kwargs)
e811c8ce
RD
4327
4328 def Check(*args, **kwargs):
a95a7133 4329 """Check(self, bool check)"""
54f9ee45 4330 return _core_.UpdateUIEvent_Check(*args, **kwargs)
e811c8ce
RD
4331
4332 def Enable(*args, **kwargs):
a95a7133 4333 """Enable(self, bool enable)"""
54f9ee45 4334 return _core_.UpdateUIEvent_Enable(*args, **kwargs)
e811c8ce
RD
4335
4336 def SetText(*args, **kwargs):
a95a7133 4337 """SetText(self, String text)"""
54f9ee45 4338 return _core_.UpdateUIEvent_SetText(*args, **kwargs)
e811c8ce
RD
4339
4340 def SetUpdateInterval(*args, **kwargs):
66c033b4 4341 """SetUpdateInterval(long updateInterval)"""
54f9ee45 4342 return _core_.UpdateUIEvent_SetUpdateInterval(*args, **kwargs)
e811c8ce
RD
4343
4344 SetUpdateInterval = staticmethod(SetUpdateInterval)
4345 def GetUpdateInterval(*args, **kwargs):
66c033b4 4346 """GetUpdateInterval() -> long"""
54f9ee45 4347 return _core_.UpdateUIEvent_GetUpdateInterval(*args, **kwargs)
e811c8ce
RD
4348
4349 GetUpdateInterval = staticmethod(GetUpdateInterval)
4350 def CanUpdate(*args, **kwargs):
66c033b4 4351 """CanUpdate(Window win) -> bool"""
54f9ee45 4352 return _core_.UpdateUIEvent_CanUpdate(*args, **kwargs)
e811c8ce
RD
4353
4354 CanUpdate = staticmethod(CanUpdate)
4355 def ResetUpdateTime(*args, **kwargs):
66c033b4 4356 """ResetUpdateTime()"""
54f9ee45 4357 return _core_.UpdateUIEvent_ResetUpdateTime(*args, **kwargs)
e811c8ce
RD
4358
4359 ResetUpdateTime = staticmethod(ResetUpdateTime)
4360 def SetMode(*args, **kwargs):
66c033b4 4361 """SetMode(int mode)"""
54f9ee45 4362 return _core_.UpdateUIEvent_SetMode(*args, **kwargs)
e811c8ce
RD
4363
4364 SetMode = staticmethod(SetMode)
4365 def GetMode(*args, **kwargs):
66c033b4 4366 """GetMode() -> int"""
54f9ee45 4367 return _core_.UpdateUIEvent_GetMode(*args, **kwargs)
e811c8ce
RD
4368
4369 GetMode = staticmethod(GetMode)
d14a1e28
RD
4370
4371class UpdateUIEventPtr(UpdateUIEvent):
4372 def __init__(self, this):
4373 self.this = this
4374 if not hasattr(self,"thisown"): self.thisown = 0
4375 self.__class__ = UpdateUIEvent
54f9ee45 4376_core_.UpdateUIEvent_swigregister(UpdateUIEventPtr)
d14a1e28 4377
e811c8ce
RD
4378def UpdateUIEvent_SetUpdateInterval(*args, **kwargs):
4379 """UpdateUIEvent_SetUpdateInterval(long updateInterval)"""
54f9ee45 4380 return _core_.UpdateUIEvent_SetUpdateInterval(*args, **kwargs)
d14a1e28 4381
e811c8ce
RD
4382def UpdateUIEvent_GetUpdateInterval(*args, **kwargs):
4383 """UpdateUIEvent_GetUpdateInterval() -> long"""
54f9ee45 4384 return _core_.UpdateUIEvent_GetUpdateInterval(*args, **kwargs)
d14a1e28 4385
e811c8ce
RD
4386def UpdateUIEvent_CanUpdate(*args, **kwargs):
4387 """UpdateUIEvent_CanUpdate(Window win) -> bool"""
54f9ee45 4388 return _core_.UpdateUIEvent_CanUpdate(*args, **kwargs)
d14a1e28 4389
e811c8ce
RD
4390def UpdateUIEvent_ResetUpdateTime(*args, **kwargs):
4391 """UpdateUIEvent_ResetUpdateTime()"""
54f9ee45 4392 return _core_.UpdateUIEvent_ResetUpdateTime(*args, **kwargs)
d14a1e28 4393
e811c8ce 4394def UpdateUIEvent_SetMode(*args, **kwargs):
196addbf 4395 """UpdateUIEvent_SetMode(int mode)"""
54f9ee45 4396 return _core_.UpdateUIEvent_SetMode(*args, **kwargs)
d14a1e28 4397
e811c8ce 4398def UpdateUIEvent_GetMode(*args, **kwargs):
196addbf 4399 """UpdateUIEvent_GetMode() -> int"""
54f9ee45 4400 return _core_.UpdateUIEvent_GetMode(*args, **kwargs)
d14a1e28
RD
4401
4402#---------------------------------------------------------------------------
4403
4404class SysColourChangedEvent(Event):
093d3ff1 4405 """Proxy of C++ SysColourChangedEvent class"""
e811c8ce
RD
4406 def __repr__(self):
4407 return "<%s.%s; proxy of C++ wxSysColourChangedEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 4408 def __init__(self, *args, **kwargs):
a95a7133 4409 """__init__(self) -> SysColourChangedEvent"""
54f9ee45 4410 newobj = _core_.new_SysColourChangedEvent(*args, **kwargs)
d14a1e28
RD
4411 self.this = newobj.this
4412 self.thisown = 1
4413 del newobj.thisown
d14a1e28
RD
4414
4415class SysColourChangedEventPtr(SysColourChangedEvent):
4416 def __init__(self, this):
4417 self.this = this
4418 if not hasattr(self,"thisown"): self.thisown = 0
4419 self.__class__ = SysColourChangedEvent
54f9ee45 4420_core_.SysColourChangedEvent_swigregister(SysColourChangedEventPtr)
d14a1e28
RD
4421
4422#---------------------------------------------------------------------------
4423
4424class MouseCaptureChangedEvent(Event):
093d3ff1 4425 """Proxy of C++ MouseCaptureChangedEvent class"""
e811c8ce
RD
4426 def __repr__(self):
4427 return "<%s.%s; proxy of C++ wxMouseCaptureChangedEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 4428 def __init__(self, *args, **kwargs):
a95a7133 4429 """__init__(self, int winid=0, Window gainedCapture=None) -> MouseCaptureChangedEvent"""
54f9ee45 4430 newobj = _core_.new_MouseCaptureChangedEvent(*args, **kwargs)
d14a1e28
RD
4431 self.this = newobj.this
4432 self.thisown = 1
4433 del newobj.thisown
e811c8ce 4434 def GetCapturedWindow(*args, **kwargs):
a95a7133 4435 """GetCapturedWindow(self) -> Window"""
54f9ee45 4436 return _core_.MouseCaptureChangedEvent_GetCapturedWindow(*args, **kwargs)
e811c8ce 4437
d14a1e28
RD
4438
4439class MouseCaptureChangedEventPtr(MouseCaptureChangedEvent):
4440 def __init__(self, this):
4441 self.this = this
4442 if not hasattr(self,"thisown"): self.thisown = 0
4443 self.__class__ = MouseCaptureChangedEvent
54f9ee45 4444_core_.MouseCaptureChangedEvent_swigregister(MouseCaptureChangedEventPtr)
d14a1e28
RD
4445
4446#---------------------------------------------------------------------------
4447
4448class DisplayChangedEvent(Event):
093d3ff1 4449 """Proxy of C++ DisplayChangedEvent class"""
e811c8ce
RD
4450 def __repr__(self):
4451 return "<%s.%s; proxy of C++ wxDisplayChangedEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 4452 def __init__(self, *args, **kwargs):
a95a7133 4453 """__init__(self) -> DisplayChangedEvent"""
54f9ee45 4454 newobj = _core_.new_DisplayChangedEvent(*args, **kwargs)
d14a1e28
RD
4455 self.this = newobj.this
4456 self.thisown = 1
4457 del newobj.thisown
d14a1e28
RD
4458
4459class DisplayChangedEventPtr(DisplayChangedEvent):
4460 def __init__(self, this):
4461 self.this = this
4462 if not hasattr(self,"thisown"): self.thisown = 0
4463 self.__class__ = DisplayChangedEvent
54f9ee45 4464_core_.DisplayChangedEvent_swigregister(DisplayChangedEventPtr)
d14a1e28
RD
4465
4466#---------------------------------------------------------------------------
4467
4468class PaletteChangedEvent(Event):
093d3ff1 4469 """Proxy of C++ PaletteChangedEvent class"""
e811c8ce
RD
4470 def __repr__(self):
4471 return "<%s.%s; proxy of C++ wxPaletteChangedEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 4472 def __init__(self, *args, **kwargs):
a95a7133 4473 """__init__(self, int id=0) -> PaletteChangedEvent"""
54f9ee45 4474 newobj = _core_.new_PaletteChangedEvent(*args, **kwargs)
d14a1e28
RD
4475 self.this = newobj.this
4476 self.thisown = 1
4477 del newobj.thisown
e811c8ce 4478 def SetChangedWindow(*args, **kwargs):
a95a7133 4479 """SetChangedWindow(self, Window win)"""
54f9ee45 4480 return _core_.PaletteChangedEvent_SetChangedWindow(*args, **kwargs)
e811c8ce
RD
4481
4482 def GetChangedWindow(*args, **kwargs):
a95a7133 4483 """GetChangedWindow(self) -> Window"""
54f9ee45 4484 return _core_.PaletteChangedEvent_GetChangedWindow(*args, **kwargs)
e811c8ce 4485
d14a1e28
RD
4486
4487class PaletteChangedEventPtr(PaletteChangedEvent):
4488 def __init__(self, this):
4489 self.this = this
4490 if not hasattr(self,"thisown"): self.thisown = 0
4491 self.__class__ = PaletteChangedEvent
54f9ee45 4492_core_.PaletteChangedEvent_swigregister(PaletteChangedEventPtr)
d14a1e28
RD
4493
4494#---------------------------------------------------------------------------
4495
4496class QueryNewPaletteEvent(Event):
093d3ff1 4497 """Proxy of C++ QueryNewPaletteEvent class"""
e811c8ce
RD
4498 def __repr__(self):
4499 return "<%s.%s; proxy of C++ wxQueryNewPaletteEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 4500 def __init__(self, *args, **kwargs):
a95a7133 4501 """__init__(self, int winid=0) -> QueryNewPaletteEvent"""
54f9ee45 4502 newobj = _core_.new_QueryNewPaletteEvent(*args, **kwargs)
d14a1e28
RD
4503 self.this = newobj.this
4504 self.thisown = 1
4505 del newobj.thisown
e811c8ce 4506 def SetPaletteRealized(*args, **kwargs):
a95a7133 4507 """SetPaletteRealized(self, bool realized)"""
54f9ee45 4508 return _core_.QueryNewPaletteEvent_SetPaletteRealized(*args, **kwargs)
e811c8ce
RD
4509
4510 def GetPaletteRealized(*args, **kwargs):
a95a7133 4511 """GetPaletteRealized(self) -> bool"""
54f9ee45 4512 return _core_.QueryNewPaletteEvent_GetPaletteRealized(*args, **kwargs)
e811c8ce 4513
d14a1e28
RD
4514
4515class QueryNewPaletteEventPtr(QueryNewPaletteEvent):
4516 def __init__(self, this):
4517 self.this = this
4518 if not hasattr(self,"thisown"): self.thisown = 0
4519 self.__class__ = QueryNewPaletteEvent
54f9ee45 4520_core_.QueryNewPaletteEvent_swigregister(QueryNewPaletteEventPtr)
d14a1e28
RD
4521
4522#---------------------------------------------------------------------------
4523
4524class NavigationKeyEvent(Event):
093d3ff1 4525 """Proxy of C++ NavigationKeyEvent class"""
e811c8ce
RD
4526 def __repr__(self):
4527 return "<%s.%s; proxy of C++ wxNavigationKeyEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 4528 def __init__(self, *args, **kwargs):
a95a7133 4529 """__init__(self) -> NavigationKeyEvent"""
54f9ee45 4530 newobj = _core_.new_NavigationKeyEvent(*args, **kwargs)
d14a1e28
RD
4531 self.this = newobj.this
4532 self.thisown = 1
4533 del newobj.thisown
e811c8ce 4534 def GetDirection(*args, **kwargs):
a95a7133 4535 """GetDirection(self) -> bool"""
54f9ee45 4536 return _core_.NavigationKeyEvent_GetDirection(*args, **kwargs)
e811c8ce
RD
4537
4538 def SetDirection(*args, **kwargs):
908b74cd 4539 """SetDirection(self, bool forward)"""
54f9ee45 4540 return _core_.NavigationKeyEvent_SetDirection(*args, **kwargs)
e811c8ce
RD
4541
4542 def IsWindowChange(*args, **kwargs):
a95a7133 4543 """IsWindowChange(self) -> bool"""
54f9ee45 4544 return _core_.NavigationKeyEvent_IsWindowChange(*args, **kwargs)
e811c8ce
RD
4545
4546 def SetWindowChange(*args, **kwargs):
908b74cd 4547 """SetWindowChange(self, bool ischange)"""
54f9ee45 4548 return _core_.NavigationKeyEvent_SetWindowChange(*args, **kwargs)
e811c8ce 4549
908b74cd
RD
4550 def SetFlags(*args, **kwargs):
4551 """SetFlags(self, long flags)"""
4552 return _core_.NavigationKeyEvent_SetFlags(*args, **kwargs)
4553
e811c8ce 4554 def GetCurrentFocus(*args, **kwargs):
a95a7133 4555 """GetCurrentFocus(self) -> Window"""
54f9ee45 4556 return _core_.NavigationKeyEvent_GetCurrentFocus(*args, **kwargs)
e811c8ce
RD
4557
4558 def SetCurrentFocus(*args, **kwargs):
a95a7133 4559 """SetCurrentFocus(self, Window win)"""
54f9ee45 4560 return _core_.NavigationKeyEvent_SetCurrentFocus(*args, **kwargs)
e811c8ce 4561
b0f7404b 4562 IsBackward = _core_.NavigationKeyEvent_IsBackward
908b74cd
RD
4563 IsForward = _core_.NavigationKeyEvent_IsForward
4564 WinChange = _core_.NavigationKeyEvent_WinChange
d14a1e28
RD
4565
4566class NavigationKeyEventPtr(NavigationKeyEvent):
4567 def __init__(self, this):
4568 self.this = this
4569 if not hasattr(self,"thisown"): self.thisown = 0
4570 self.__class__ = NavigationKeyEvent
54f9ee45 4571_core_.NavigationKeyEvent_swigregister(NavigationKeyEventPtr)
d14a1e28
RD
4572
4573#---------------------------------------------------------------------------
4574
4575class WindowCreateEvent(CommandEvent):
093d3ff1 4576 """Proxy of C++ WindowCreateEvent class"""
e811c8ce
RD
4577 def __repr__(self):
4578 return "<%s.%s; proxy of C++ wxWindowCreateEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 4579 def __init__(self, *args, **kwargs):
a95a7133 4580 """__init__(self, Window win=None) -> WindowCreateEvent"""
54f9ee45 4581 newobj = _core_.new_WindowCreateEvent(*args, **kwargs)
d14a1e28
RD
4582 self.this = newobj.this
4583 self.thisown = 1
4584 del newobj.thisown
e811c8ce 4585 def GetWindow(*args, **kwargs):
a95a7133 4586 """GetWindow(self) -> Window"""
54f9ee45 4587 return _core_.WindowCreateEvent_GetWindow(*args, **kwargs)
e811c8ce 4588
d14a1e28
RD
4589
4590class WindowCreateEventPtr(WindowCreateEvent):
4591 def __init__(self, this):
4592 self.this = this
4593 if not hasattr(self,"thisown"): self.thisown = 0
4594 self.__class__ = WindowCreateEvent
54f9ee45 4595_core_.WindowCreateEvent_swigregister(WindowCreateEventPtr)
d14a1e28
RD
4596
4597class WindowDestroyEvent(CommandEvent):
093d3ff1 4598 """Proxy of C++ WindowDestroyEvent class"""
e811c8ce
RD
4599 def __repr__(self):
4600 return "<%s.%s; proxy of C++ wxWindowDestroyEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 4601 def __init__(self, *args, **kwargs):
a95a7133 4602 """__init__(self, Window win=None) -> WindowDestroyEvent"""
54f9ee45 4603 newobj = _core_.new_WindowDestroyEvent(*args, **kwargs)
d14a1e28
RD
4604 self.this = newobj.this
4605 self.thisown = 1
4606 del newobj.thisown
e811c8ce 4607 def GetWindow(*args, **kwargs):
a95a7133 4608 """GetWindow(self) -> Window"""
54f9ee45 4609 return _core_.WindowDestroyEvent_GetWindow(*args, **kwargs)
e811c8ce 4610
d14a1e28
RD
4611
4612class WindowDestroyEventPtr(WindowDestroyEvent):
4613 def __init__(self, this):
4614 self.this = this
4615 if not hasattr(self,"thisown"): self.thisown = 0
4616 self.__class__ = WindowDestroyEvent
54f9ee45 4617_core_.WindowDestroyEvent_swigregister(WindowDestroyEventPtr)
d14a1e28
RD
4618
4619#---------------------------------------------------------------------------
4620
4621class ContextMenuEvent(CommandEvent):
093d3ff1 4622 """Proxy of C++ ContextMenuEvent class"""
e811c8ce
RD
4623 def __repr__(self):
4624 return "<%s.%s; proxy of C++ wxContextMenuEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 4625 def __init__(self, *args, **kwargs):
a95a7133 4626 """__init__(self, wxEventType type=wxEVT_NULL, int winid=0, Point pt=DefaultPosition) -> ContextMenuEvent"""
54f9ee45 4627 newobj = _core_.new_ContextMenuEvent(*args, **kwargs)
d14a1e28
RD
4628 self.this = newobj.this
4629 self.thisown = 1
4630 del newobj.thisown
e811c8ce 4631 def GetPosition(*args, **kwargs):
a95a7133 4632 """GetPosition(self) -> Point"""
54f9ee45 4633 return _core_.ContextMenuEvent_GetPosition(*args, **kwargs)
e811c8ce
RD
4634
4635 def SetPosition(*args, **kwargs):
a95a7133 4636 """SetPosition(self, Point pos)"""
54f9ee45 4637 return _core_.ContextMenuEvent_SetPosition(*args, **kwargs)
e811c8ce 4638
d14a1e28
RD
4639
4640class ContextMenuEventPtr(ContextMenuEvent):
4641 def __init__(self, this):
4642 self.this = this
4643 if not hasattr(self,"thisown"): self.thisown = 0
4644 self.__class__ = ContextMenuEvent
54f9ee45 4645_core_.ContextMenuEvent_swigregister(ContextMenuEventPtr)
d14a1e28
RD
4646
4647#---------------------------------------------------------------------------
4648
54f9ee45
RD
4649IDLE_PROCESS_ALL = _core_.IDLE_PROCESS_ALL
4650IDLE_PROCESS_SPECIFIED = _core_.IDLE_PROCESS_SPECIFIED
d14a1e28 4651class IdleEvent(Event):
093d3ff1 4652 """Proxy of C++ IdleEvent class"""
e811c8ce
RD
4653 def __repr__(self):
4654 return "<%s.%s; proxy of C++ wxIdleEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 4655 def __init__(self, *args, **kwargs):
a95a7133 4656 """__init__(self) -> IdleEvent"""
54f9ee45 4657 newobj = _core_.new_IdleEvent(*args, **kwargs)
d14a1e28
RD
4658 self.this = newobj.this
4659 self.thisown = 1
4660 del newobj.thisown
e811c8ce 4661 def RequestMore(*args, **kwargs):
a95a7133 4662 """RequestMore(self, bool needMore=True)"""
54f9ee45 4663 return _core_.IdleEvent_RequestMore(*args, **kwargs)
e811c8ce
RD
4664
4665 def MoreRequested(*args, **kwargs):
a95a7133 4666 """MoreRequested(self) -> bool"""
54f9ee45 4667 return _core_.IdleEvent_MoreRequested(*args, **kwargs)
e811c8ce
RD
4668
4669 def SetMode(*args, **kwargs):
66c033b4 4670 """SetMode(int mode)"""
54f9ee45 4671 return _core_.IdleEvent_SetMode(*args, **kwargs)
e811c8ce
RD
4672
4673 SetMode = staticmethod(SetMode)
4674 def GetMode(*args, **kwargs):
66c033b4 4675 """GetMode() -> int"""
54f9ee45 4676 return _core_.IdleEvent_GetMode(*args, **kwargs)
e811c8ce
RD
4677
4678 GetMode = staticmethod(GetMode)
4679 def CanSend(*args, **kwargs):
66c033b4 4680 """CanSend(Window win) -> bool"""
54f9ee45 4681 return _core_.IdleEvent_CanSend(*args, **kwargs)
e811c8ce
RD
4682
4683 CanSend = staticmethod(CanSend)
d14a1e28
RD
4684
4685class IdleEventPtr(IdleEvent):
4686 def __init__(self, this):
4687 self.this = this
4688 if not hasattr(self,"thisown"): self.thisown = 0
4689 self.__class__ = IdleEvent
54f9ee45 4690_core_.IdleEvent_swigregister(IdleEventPtr)
d14a1e28 4691
e811c8ce 4692def IdleEvent_SetMode(*args, **kwargs):
196addbf 4693 """IdleEvent_SetMode(int mode)"""
54f9ee45 4694 return _core_.IdleEvent_SetMode(*args, **kwargs)
d14a1e28 4695
e811c8ce 4696def IdleEvent_GetMode(*args, **kwargs):
196addbf 4697 """IdleEvent_GetMode() -> int"""
54f9ee45 4698 return _core_.IdleEvent_GetMode(*args, **kwargs)
d14a1e28 4699
e811c8ce
RD
4700def IdleEvent_CanSend(*args, **kwargs):
4701 """IdleEvent_CanSend(Window win) -> bool"""
54f9ee45 4702 return _core_.IdleEvent_CanSend(*args, **kwargs)
d14a1e28
RD
4703
4704#---------------------------------------------------------------------------
4705
4706class PyEvent(Event):
093d3ff1 4707 """Proxy of C++ PyEvent class"""
e811c8ce
RD
4708 def __repr__(self):
4709 return "<%s.%s; proxy of C++ wxPyEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 4710 def __init__(self, *args, **kwargs):
a95a7133 4711 """__init__(self, int winid=0, wxEventType commandType=wxEVT_NULL) -> PyEvent"""
54f9ee45 4712 newobj = _core_.new_PyEvent(*args, **kwargs)
d14a1e28
RD
4713 self.this = newobj.this
4714 self.thisown = 1
4715 del newobj.thisown
4716 self.SetSelf(self)
e811c8ce 4717
54f9ee45 4718 def __del__(self, destroy=_core_.delete_PyEvent):
a95a7133 4719 """__del__(self)"""
d14a1e28
RD
4720 try:
4721 if self.thisown: destroy(self)
4722 except: pass
e811c8ce
RD
4723
4724 def SetSelf(*args, **kwargs):
a95a7133 4725 """SetSelf(self, PyObject self)"""
54f9ee45 4726 return _core_.PyEvent_SetSelf(*args, **kwargs)
e811c8ce
RD
4727
4728 def GetSelf(*args, **kwargs):
a95a7133 4729 """GetSelf(self) -> PyObject"""
54f9ee45 4730 return _core_.PyEvent_GetSelf(*args, **kwargs)
e811c8ce 4731
d14a1e28
RD
4732
4733class PyEventPtr(PyEvent):
4734 def __init__(self, this):
4735 self.this = this
4736 if not hasattr(self,"thisown"): self.thisown = 0
4737 self.__class__ = PyEvent
54f9ee45 4738_core_.PyEvent_swigregister(PyEventPtr)
d14a1e28
RD
4739
4740class PyCommandEvent(CommandEvent):
093d3ff1 4741 """Proxy of C++ PyCommandEvent class"""
e811c8ce
RD
4742 def __repr__(self):
4743 return "<%s.%s; proxy of C++ wxPyCommandEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 4744 def __init__(self, *args, **kwargs):
a95a7133 4745 """__init__(self, wxEventType commandType=wxEVT_NULL, int id=0) -> PyCommandEvent"""
54f9ee45 4746 newobj = _core_.new_PyCommandEvent(*args, **kwargs)
d14a1e28
RD
4747 self.this = newobj.this
4748 self.thisown = 1
4749 del newobj.thisown
4750 self.SetSelf(self)
e811c8ce 4751
54f9ee45 4752 def __del__(self, destroy=_core_.delete_PyCommandEvent):
a95a7133 4753 """__del__(self)"""
d14a1e28
RD
4754 try:
4755 if self.thisown: destroy(self)
4756 except: pass
e811c8ce
RD
4757
4758 def SetSelf(*args, **kwargs):
a95a7133 4759 """SetSelf(self, PyObject self)"""
54f9ee45 4760 return _core_.PyCommandEvent_SetSelf(*args, **kwargs)
e811c8ce
RD
4761
4762 def GetSelf(*args, **kwargs):
a95a7133 4763 """GetSelf(self) -> PyObject"""
54f9ee45 4764 return _core_.PyCommandEvent_GetSelf(*args, **kwargs)
e811c8ce 4765
d14a1e28
RD
4766
4767class PyCommandEventPtr(PyCommandEvent):
4768 def __init__(self, this):
4769 self.this = this
4770 if not hasattr(self,"thisown"): self.thisown = 0
4771 self.__class__ = PyCommandEvent
54f9ee45 4772_core_.PyCommandEvent_swigregister(PyCommandEventPtr)
d14a1e28
RD
4773
4774#---------------------------------------------------------------------------
4775
54f9ee45
RD
4776PYAPP_ASSERT_SUPPRESS = _core_.PYAPP_ASSERT_SUPPRESS
4777PYAPP_ASSERT_EXCEPTION = _core_.PYAPP_ASSERT_EXCEPTION
4778PYAPP_ASSERT_DIALOG = _core_.PYAPP_ASSERT_DIALOG
4779PYAPP_ASSERT_LOG = _core_.PYAPP_ASSERT_LOG
4780PRINT_WINDOWS = _core_.PRINT_WINDOWS
4781PRINT_POSTSCRIPT = _core_.PRINT_POSTSCRIPT
d14a1e28 4782class PyApp(EvtHandler):
66c033b4
RD
4783 """
4784 The ``wx.PyApp`` class is an *implementation detail*, please use the
4785 `wx.App` class (or some other derived class) instead.
4786 """
e811c8ce
RD
4787 def __repr__(self):
4788 return "<%s.%s; proxy of C++ wxPyApp instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 4789 def __init__(self, *args, **kwargs):
98e665d3 4790 """
a95a7133 4791 __init__(self) -> PyApp
98e665d3
RD
4792
4793 Create a new application object, starting the bootstrap process.
4794 """
54f9ee45 4795 newobj = _core_.new_PyApp(*args, **kwargs)
d14a1e28
RD
4796 self.this = newobj.this
4797 self.thisown = 1
4798 del newobj.thisown
4799 self._setCallbackInfo(self, PyApp)
4800 self._setOORInfo(self)
e811c8ce 4801
54f9ee45 4802 def __del__(self, destroy=_core_.delete_PyApp):
a95a7133 4803 """__del__(self)"""
d14a1e28
RD
4804 try:
4805 if self.thisown: destroy(self)
4806 except: pass
e811c8ce
RD
4807
4808 def _setCallbackInfo(*args, **kwargs):
a95a7133 4809 """_setCallbackInfo(self, PyObject self, PyObject _class)"""
54f9ee45 4810 return _core_.PyApp__setCallbackInfo(*args, **kwargs)
e811c8ce
RD
4811
4812 def GetAppName(*args, **kwargs):
0df68c9f 4813 """
a95a7133 4814 GetAppName(self) -> String
6c3b4aae 4815
0df68c9f
RD
4816 Get the application name.
4817 """
54f9ee45 4818 return _core_.PyApp_GetAppName(*args, **kwargs)
e811c8ce
RD
4819
4820 def SetAppName(*args, **kwargs):
0df68c9f 4821 """
a95a7133 4822 SetAppName(self, String name)
6c3b4aae 4823
66c033b4
RD
4824 Set the application name. This value may be used automatically by
4825 `wx.Config` and such.
0df68c9f 4826 """
54f9ee45 4827 return _core_.PyApp_SetAppName(*args, **kwargs)
e811c8ce
RD
4828
4829 def GetClassName(*args, **kwargs):
0df68c9f 4830 """
a95a7133 4831 GetClassName(self) -> String
e811c8ce 4832
0df68c9f
RD
4833 Get the application's class name.
4834 """
54f9ee45 4835 return _core_.PyApp_GetClassName(*args, **kwargs)
e811c8ce
RD
4836
4837 def SetClassName(*args, **kwargs):
0df68c9f 4838 """
a95a7133 4839 SetClassName(self, String name)
6c3b4aae 4840
66c033b4
RD
4841 Set the application's class name. This value may be used for
4842 X-resources if applicable for the platform
0df68c9f 4843 """
54f9ee45 4844 return _core_.PyApp_SetClassName(*args, **kwargs)
e811c8ce
RD
4845
4846 def GetVendorName(*args, **kwargs):
0df68c9f 4847 """
a95a7133 4848 GetVendorName(self) -> String
6c3b4aae 4849
0df68c9f
RD
4850 Get the application's vendor name.
4851 """
54f9ee45 4852 return _core_.PyApp_GetVendorName(*args, **kwargs)
e811c8ce
RD
4853
4854 def SetVendorName(*args, **kwargs):
0df68c9f 4855 """
a95a7133 4856 SetVendorName(self, String name)
6c3b4aae 4857
66c033b4
RD
4858 Set the application's vendor name. This value may be used
4859 automatically by `wx.Config` and such.
0df68c9f 4860 """
54f9ee45 4861 return _core_.PyApp_SetVendorName(*args, **kwargs)
e811c8ce
RD
4862
4863 def GetTraits(*args, **kwargs):
0df68c9f 4864 """
a95a7133 4865 GetTraits(self) -> wxAppTraits
6c3b4aae 4866
66c033b4
RD
4867 Return (and create if necessary) the app traits object to which we
4868 delegate for everything which either should be configurable by the
4869 user (then he can change the default behaviour simply by overriding
4870 CreateTraits() and returning his own traits object) or which is
4871 GUI/console dependent as then wx.AppTraits allows us to abstract the
4872 differences behind the common facade.
4873
4874 :todo: Add support for overriding CreateAppTraits in wxPython.
0df68c9f 4875 """
54f9ee45 4876 return _core_.PyApp_GetTraits(*args, **kwargs)
e811c8ce
RD
4877
4878 def ProcessPendingEvents(*args, **kwargs):
0df68c9f 4879 """
a95a7133 4880 ProcessPendingEvents(self)
6c3b4aae 4881
66c033b4
RD
4882 Process all events in the Pending Events list -- it is necessary to
4883 call this function to process posted events. This normally happens
4884 during each event loop iteration.
0df68c9f 4885 """
54f9ee45 4886 return _core_.PyApp_ProcessPendingEvents(*args, **kwargs)
e811c8ce
RD
4887
4888 def Yield(*args, **kwargs):
0df68c9f 4889 """
a95a7133 4890 Yield(self, bool onlyIfNeeded=False) -> bool
6c3b4aae 4891
66c033b4
RD
4892 Process all currently pending events right now, instead of waiting
4893 until return to the event loop. It is an error to call ``Yield``
4894 recursively unless the value of ``onlyIfNeeded`` is True.
6c3b4aae 4895
66c033b4 4896 :warning: This function is dangerous as it can lead to unexpected
41e2b43e
RD
4897 reentrancies (i.e. when called from an event handler it may
4898 result in calling the same event handler again), use with
4899 extreme care or, better, don't use at all!
0df68c9f 4900
66c033b4 4901 :see: `wx.Yield`, `wx.YieldIfNeeded`, `wx.SafeYield`
41e2b43e 4902
0df68c9f 4903 """
54f9ee45 4904 return _core_.PyApp_Yield(*args, **kwargs)
e811c8ce
RD
4905
4906 def WakeUpIdle(*args, **kwargs):
0df68c9f 4907 """
a95a7133 4908 WakeUpIdle(self)
6c3b4aae 4909
66c033b4
RD
4910 Make sure that idle events are sent again.
4911 :see: `wx.WakeUpIdle`
0df68c9f 4912 """
54f9ee45 4913 return _core_.PyApp_WakeUpIdle(*args, **kwargs)
e811c8ce 4914
1fc3b23a
RD
4915 def IsMainLoopRunning(*args, **kwargs):
4916 """
4917 IsMainLoopRunning() -> bool
4918
4919 Returns True if we're running the main loop, i.e. if the events can
4920 currently be dispatched.
4921 """
4922 return _core_.PyApp_IsMainLoopRunning(*args, **kwargs)
4923
4924 IsMainLoopRunning = staticmethod(IsMainLoopRunning)
e811c8ce 4925 def MainLoop(*args, **kwargs):
0df68c9f 4926 """
a95a7133 4927 MainLoop(self) -> int
6c3b4aae 4928
66c033b4
RD
4929 Execute the main GUI loop, the function doesn't normally return until
4930 all top level windows have been closed and destroyed.
0df68c9f 4931 """
54f9ee45 4932 return _core_.PyApp_MainLoop(*args, **kwargs)
e811c8ce
RD
4933
4934 def Exit(*args, **kwargs):
0df68c9f 4935 """
a95a7133 4936 Exit(self)
6c3b4aae 4937
0df68c9f 4938 Exit the main loop thus terminating the application.
66c033b4 4939 :see: `wx.Exit`
0df68c9f 4940 """
54f9ee45 4941 return _core_.PyApp_Exit(*args, **kwargs)
e811c8ce
RD
4942
4943 def ExitMainLoop(*args, **kwargs):
0df68c9f 4944 """
a95a7133 4945 ExitMainLoop(self)
6c3b4aae 4946
66c033b4
RD
4947 Exit the main GUI loop during the next iteration of the main
4948 loop, (i.e. it does not stop the program immediately!)
0df68c9f 4949 """
54f9ee45 4950 return _core_.PyApp_ExitMainLoop(*args, **kwargs)
e811c8ce
RD
4951
4952 def Pending(*args, **kwargs):
0df68c9f 4953 """
a95a7133 4954 Pending(self) -> bool
6c3b4aae 4955
0df68c9f
RD
4956 Returns True if there are unprocessed events in the event queue.
4957 """
54f9ee45 4958 return _core_.PyApp_Pending(*args, **kwargs)
e811c8ce
RD
4959
4960 def Dispatch(*args, **kwargs):
0df68c9f 4961 """
a95a7133 4962 Dispatch(self) -> bool
6c3b4aae 4963
0df68c9f
RD
4964 Process the first event in the event queue (blocks until an event
4965 appears if there are none currently)
4966 """
54f9ee45 4967 return _core_.PyApp_Dispatch(*args, **kwargs)
e811c8ce
RD
4968
4969 def ProcessIdle(*args, **kwargs):
0df68c9f 4970 """
a95a7133 4971 ProcessIdle(self) -> bool
6c3b4aae 4972
66c033b4
RD
4973 Called from the MainLoop when the application becomes idle (there are
4974 no pending events) and sends a `wx.IdleEvent` to all interested
4975 parties. Returns True if more idle events are needed, False if not.
0df68c9f 4976 """
54f9ee45 4977 return _core_.PyApp_ProcessIdle(*args, **kwargs)
e811c8ce
RD
4978
4979 def SendIdleEvents(*args, **kwargs):
0df68c9f 4980 """
a95a7133 4981 SendIdleEvents(self, Window win, IdleEvent event) -> bool
e811c8ce 4982
66c033b4
RD
4983 Send idle event to window and all subwindows. Returns True if more
4984 idle time is requested.
0df68c9f 4985 """
54f9ee45 4986 return _core_.PyApp_SendIdleEvents(*args, **kwargs)
e811c8ce
RD
4987
4988 def IsActive(*args, **kwargs):
0df68c9f 4989 """
a95a7133 4990 IsActive(self) -> bool
6c3b4aae 4991
0df68c9f
RD
4992 Return True if our app has focus.
4993 """
54f9ee45 4994 return _core_.PyApp_IsActive(*args, **kwargs)
e811c8ce
RD
4995
4996 def SetTopWindow(*args, **kwargs):
0df68c9f 4997 """
a95a7133 4998 SetTopWindow(self, Window win)
6c3b4aae 4999
66c033b4 5000 Set the *main* top level window
0df68c9f 5001 """
54f9ee45 5002 return _core_.PyApp_SetTopWindow(*args, **kwargs)
e811c8ce
RD
5003
5004 def GetTopWindow(*args, **kwargs):
0df68c9f 5005 """
a95a7133 5006 GetTopWindow(self) -> Window
6c3b4aae 5007
66c033b4
RD
5008 Return the *main* top level window (if it hadn't been set previously
5009 with SetTopWindow(), will return just some top level window and, if
5010 there not any, will return None)
0df68c9f 5011 """
54f9ee45 5012 return _core_.PyApp_GetTopWindow(*args, **kwargs)
e811c8ce
RD
5013
5014 def SetExitOnFrameDelete(*args, **kwargs):
0df68c9f 5015 """
a95a7133 5016 SetExitOnFrameDelete(self, bool flag)
0df68c9f 5017
66c033b4
RD
5018 Control the exit behaviour: by default, the program will exit the main
5019 loop (and so, usually, terminate) when the last top-level program
5020 window is deleted. Beware that if you disable this behaviour (with
5021 SetExitOnFrameDelete(False)), you'll have to call ExitMainLoop()
5022 explicitly from somewhere.
0df68c9f 5023 """
54f9ee45 5024 return _core_.PyApp_SetExitOnFrameDelete(*args, **kwargs)
e811c8ce
RD
5025
5026 def GetExitOnFrameDelete(*args, **kwargs):
0df68c9f 5027 """
a95a7133 5028 GetExitOnFrameDelete(self) -> bool
6c3b4aae 5029
0df68c9f
RD
5030 Get the current exit behaviour setting.
5031 """
54f9ee45 5032 return _core_.PyApp_GetExitOnFrameDelete(*args, **kwargs)
e811c8ce
RD
5033
5034 def SetUseBestVisual(*args, **kwargs):
0df68c9f 5035 """
a95a7133 5036 SetUseBestVisual(self, bool flag)
6c3b4aae 5037
66c033b4
RD
5038 Set whether the app should try to use the best available visual on
5039 systems where more than one is available, (Sun, SGI, XFree86 4, etc.)
0df68c9f 5040 """
54f9ee45 5041 return _core_.PyApp_SetUseBestVisual(*args, **kwargs)
e811c8ce
RD
5042
5043 def GetUseBestVisual(*args, **kwargs):
0df68c9f 5044 """
a95a7133 5045 GetUseBestVisual(self) -> bool
6c3b4aae 5046
0df68c9f
RD
5047 Get current UseBestVisual setting.
5048 """
54f9ee45 5049 return _core_.PyApp_GetUseBestVisual(*args, **kwargs)
e811c8ce
RD
5050
5051 def SetPrintMode(*args, **kwargs):
a95a7133 5052 """SetPrintMode(self, int mode)"""
54f9ee45 5053 return _core_.PyApp_SetPrintMode(*args, **kwargs)
e811c8ce
RD
5054
5055 def GetPrintMode(*args, **kwargs):
a95a7133 5056 """GetPrintMode(self) -> int"""
54f9ee45 5057 return _core_.PyApp_GetPrintMode(*args, **kwargs)
e811c8ce 5058
e811c8ce 5059 def SetAssertMode(*args, **kwargs):
0df68c9f 5060 """
a95a7133 5061 SetAssertMode(self, int mode)
6c3b4aae 5062
41e2b43e 5063 Set the OnAssert behaviour for debug and hybrid builds.
0df68c9f 5064 """
54f9ee45 5065 return _core_.PyApp_SetAssertMode(*args, **kwargs)
e811c8ce 5066
6c3b4aae 5067 def GetAssertMode(*args, **kwargs):
0df68c9f 5068 """
a95a7133 5069 GetAssertMode(self) -> int
6c3b4aae 5070
0df68c9f
RD
5071 Get the current OnAssert behaviour setting.
5072 """
54f9ee45 5073 return _core_.PyApp_GetAssertMode(*args, **kwargs)
6c3b4aae 5074
e811c8ce 5075 def GetMacSupportPCMenuShortcuts(*args, **kwargs):
66c033b4 5076 """GetMacSupportPCMenuShortcuts() -> bool"""
54f9ee45 5077 return _core_.PyApp_GetMacSupportPCMenuShortcuts(*args, **kwargs)
e811c8ce
RD
5078
5079 GetMacSupportPCMenuShortcuts = staticmethod(GetMacSupportPCMenuShortcuts)
5080 def GetMacAboutMenuItemId(*args, **kwargs):
66c033b4 5081 """GetMacAboutMenuItemId() -> long"""
54f9ee45 5082 return _core_.PyApp_GetMacAboutMenuItemId(*args, **kwargs)
e811c8ce
RD
5083
5084 GetMacAboutMenuItemId = staticmethod(GetMacAboutMenuItemId)
5085 def GetMacPreferencesMenuItemId(*args, **kwargs):
66c033b4 5086 """GetMacPreferencesMenuItemId() -> long"""
54f9ee45 5087 return _core_.PyApp_GetMacPreferencesMenuItemId(*args, **kwargs)
e811c8ce
RD
5088
5089 GetMacPreferencesMenuItemId = staticmethod(GetMacPreferencesMenuItemId)
5090 def GetMacExitMenuItemId(*args, **kwargs):
66c033b4 5091 """GetMacExitMenuItemId() -> long"""
54f9ee45 5092 return _core_.PyApp_GetMacExitMenuItemId(*args, **kwargs)
e811c8ce
RD
5093
5094 GetMacExitMenuItemId = staticmethod(GetMacExitMenuItemId)
5095 def GetMacHelpMenuTitleName(*args, **kwargs):
66c033b4 5096 """GetMacHelpMenuTitleName() -> String"""
54f9ee45 5097 return _core_.PyApp_GetMacHelpMenuTitleName(*args, **kwargs)
e811c8ce
RD
5098
5099 GetMacHelpMenuTitleName = staticmethod(GetMacHelpMenuTitleName)
5100 def SetMacSupportPCMenuShortcuts(*args, **kwargs):
66c033b4 5101 """SetMacSupportPCMenuShortcuts(bool val)"""
54f9ee45 5102 return _core_.PyApp_SetMacSupportPCMenuShortcuts(*args, **kwargs)
e811c8ce
RD
5103
5104 SetMacSupportPCMenuShortcuts = staticmethod(SetMacSupportPCMenuShortcuts)
5105 def SetMacAboutMenuItemId(*args, **kwargs):
66c033b4 5106 """SetMacAboutMenuItemId(long val)"""
54f9ee45 5107 return _core_.PyApp_SetMacAboutMenuItemId(*args, **kwargs)
e811c8ce
RD
5108
5109 SetMacAboutMenuItemId = staticmethod(SetMacAboutMenuItemId)
5110 def SetMacPreferencesMenuItemId(*args, **kwargs):
66c033b4 5111 """SetMacPreferencesMenuItemId(long val)"""
54f9ee45 5112 return _core_.PyApp_SetMacPreferencesMenuItemId(*args, **kwargs)
e811c8ce
RD
5113
5114 SetMacPreferencesMenuItemId = staticmethod(SetMacPreferencesMenuItemId)
5115 def SetMacExitMenuItemId(*args, **kwargs):
66c033b4 5116 """SetMacExitMenuItemId(long val)"""
54f9ee45 5117 return _core_.PyApp_SetMacExitMenuItemId(*args, **kwargs)
e811c8ce
RD
5118
5119 SetMacExitMenuItemId = staticmethod(SetMacExitMenuItemId)
5120 def SetMacHelpMenuTitleName(*args, **kwargs):
66c033b4 5121 """SetMacHelpMenuTitleName(String val)"""
54f9ee45 5122 return _core_.PyApp_SetMacHelpMenuTitleName(*args, **kwargs)
e811c8ce
RD
5123
5124 SetMacHelpMenuTitleName = staticmethod(SetMacHelpMenuTitleName)
5125 def _BootstrapApp(*args, **kwargs):
0df68c9f 5126 """
a95a7133 5127 _BootstrapApp(self)
6c3b4aae 5128
0df68c9f
RD
5129 For internal use only
5130 """
54f9ee45 5131 return _core_.PyApp__BootstrapApp(*args, **kwargs)
e811c8ce
RD
5132
5133 def GetComCtl32Version(*args, **kwargs):
0df68c9f 5134 """
66c033b4 5135 GetComCtl32Version() -> int
6c3b4aae 5136
66c033b4
RD
5137 Returns 400, 470, 471, etc. for comctl32.dll 4.00, 4.70, 4.71 or 0 if
5138 it wasn't found at all. Raises an exception on non-Windows platforms.
0df68c9f 5139 """
54f9ee45 5140 return _core_.PyApp_GetComCtl32Version(*args, **kwargs)
e811c8ce
RD
5141
5142 GetComCtl32Version = staticmethod(GetComCtl32Version)
d14a1e28
RD
5143
5144class PyAppPtr(PyApp):
5145 def __init__(self, this):
5146 self.this = this
5147 if not hasattr(self,"thisown"): self.thisown = 0
5148 self.__class__ = PyApp
54f9ee45 5149_core_.PyApp_swigregister(PyAppPtr)
d14a1e28 5150
1fc3b23a
RD
5151def PyApp_IsMainLoopRunning(*args, **kwargs):
5152 """
5153 PyApp_IsMainLoopRunning() -> bool
5154
5155 Returns True if we're running the main loop, i.e. if the events can
5156 currently be dispatched.
5157 """
5158 return _core_.PyApp_IsMainLoopRunning(*args, **kwargs)
5159
e811c8ce
RD
5160def PyApp_GetMacSupportPCMenuShortcuts(*args, **kwargs):
5161 """PyApp_GetMacSupportPCMenuShortcuts() -> bool"""
54f9ee45 5162 return _core_.PyApp_GetMacSupportPCMenuShortcuts(*args, **kwargs)
d14a1e28 5163
e811c8ce
RD
5164def PyApp_GetMacAboutMenuItemId(*args, **kwargs):
5165 """PyApp_GetMacAboutMenuItemId() -> long"""
54f9ee45 5166 return _core_.PyApp_GetMacAboutMenuItemId(*args, **kwargs)
d14a1e28 5167
e811c8ce
RD
5168def PyApp_GetMacPreferencesMenuItemId(*args, **kwargs):
5169 """PyApp_GetMacPreferencesMenuItemId() -> long"""
54f9ee45 5170 return _core_.PyApp_GetMacPreferencesMenuItemId(*args, **kwargs)
d14a1e28 5171
e811c8ce
RD
5172def PyApp_GetMacExitMenuItemId(*args, **kwargs):
5173 """PyApp_GetMacExitMenuItemId() -> long"""
54f9ee45 5174 return _core_.PyApp_GetMacExitMenuItemId(*args, **kwargs)
d14a1e28 5175
e811c8ce 5176def PyApp_GetMacHelpMenuTitleName(*args, **kwargs):
196addbf 5177 """PyApp_GetMacHelpMenuTitleName() -> String"""
54f9ee45 5178 return _core_.PyApp_GetMacHelpMenuTitleName(*args, **kwargs)
d14a1e28 5179
e811c8ce
RD
5180def PyApp_SetMacSupportPCMenuShortcuts(*args, **kwargs):
5181 """PyApp_SetMacSupportPCMenuShortcuts(bool val)"""
54f9ee45 5182 return _core_.PyApp_SetMacSupportPCMenuShortcuts(*args, **kwargs)
d14a1e28 5183
e811c8ce
RD
5184def PyApp_SetMacAboutMenuItemId(*args, **kwargs):
5185 """PyApp_SetMacAboutMenuItemId(long val)"""
54f9ee45 5186 return _core_.PyApp_SetMacAboutMenuItemId(*args, **kwargs)
d14a1e28 5187
e811c8ce
RD
5188def PyApp_SetMacPreferencesMenuItemId(*args, **kwargs):
5189 """PyApp_SetMacPreferencesMenuItemId(long val)"""
54f9ee45 5190 return _core_.PyApp_SetMacPreferencesMenuItemId(*args, **kwargs)
d14a1e28 5191
e811c8ce
RD
5192def PyApp_SetMacExitMenuItemId(*args, **kwargs):
5193 """PyApp_SetMacExitMenuItemId(long val)"""
54f9ee45 5194 return _core_.PyApp_SetMacExitMenuItemId(*args, **kwargs)
d14a1e28 5195
e811c8ce 5196def PyApp_SetMacHelpMenuTitleName(*args, **kwargs):
196addbf 5197 """PyApp_SetMacHelpMenuTitleName(String val)"""
54f9ee45 5198 return _core_.PyApp_SetMacHelpMenuTitleName(*args, **kwargs)
d14a1e28 5199
e811c8ce 5200def PyApp_GetComCtl32Version(*args, **kwargs):
0df68c9f
RD
5201 """
5202 PyApp_GetComCtl32Version() -> int
6c3b4aae 5203
66c033b4
RD
5204 Returns 400, 470, 471, etc. for comctl32.dll 4.00, 4.70, 4.71 or 0 if
5205 it wasn't found at all. Raises an exception on non-Windows platforms.
0df68c9f 5206 """
54f9ee45 5207 return _core_.PyApp_GetComCtl32Version(*args, **kwargs)
d14a1e28
RD
5208
5209#---------------------------------------------------------------------------
5210
5211
e811c8ce 5212def Exit(*args, **kwargs):
0df68c9f
RD
5213 """
5214 Exit()
6c3b4aae 5215
0df68c9f
RD
5216 Force an exit of the application. Convenience for wx.GetApp().Exit()
5217 """
54f9ee45 5218 return _core_.Exit(*args, **kwargs)
d14a1e28 5219
e811c8ce 5220def Yield(*args, **kwargs):
0df68c9f
RD
5221 """
5222 Yield() -> bool
6c3b4aae 5223
0df68c9f
RD
5224 Yield to other apps/messages. Convenience for wx.GetApp().Yield()
5225 """
54f9ee45 5226 return _core_.Yield(*args, **kwargs)
d14a1e28 5227
e811c8ce 5228def YieldIfNeeded(*args, **kwargs):
0df68c9f
RD
5229 """
5230 YieldIfNeeded() -> bool
6c3b4aae 5231
0df68c9f
RD
5232 Yield to other apps/messages. Convenience for wx.GetApp().Yield(True)
5233 """
54f9ee45 5234 return _core_.YieldIfNeeded(*args, **kwargs)
d14a1e28 5235
e811c8ce 5236def SafeYield(*args, **kwargs):
0df68c9f
RD
5237 """
5238 SafeYield(Window win=None, bool onlyIfNeeded=False) -> bool
6c3b4aae 5239
66c033b4
RD
5240 This function is similar to `wx.Yield`, except that it disables the
5241 user input to all program windows before calling `wx.Yield` and
5242 re-enables it again afterwards. If ``win`` is not None, this window
5243 will remain enabled, allowing the implementation of some limited user
5244 interaction.
6c3b4aae 5245
66c033b4 5246 :Returns: the result of the call to `wx.Yield`.
0df68c9f 5247 """
54f9ee45 5248 return _core_.SafeYield(*args, **kwargs)
d14a1e28 5249
e811c8ce 5250def WakeUpIdle(*args, **kwargs):
0df68c9f
RD
5251 """
5252 WakeUpIdle()
6c3b4aae 5253
66c033b4
RD
5254 Cause the message queue to become empty again, so idle events will be
5255 sent.
0df68c9f 5256 """
54f9ee45 5257 return _core_.WakeUpIdle(*args, **kwargs)
d14a1e28 5258
e811c8ce 5259def PostEvent(*args, **kwargs):
0df68c9f
RD
5260 """
5261 PostEvent(EvtHandler dest, Event event)
6c3b4aae 5262
66c033b4
RD
5263 Send an event to a window or other wx.EvtHandler to be processed
5264 later.
0df68c9f 5265 """
54f9ee45 5266 return _core_.PostEvent(*args, **kwargs)
d14a1e28 5267
e811c8ce 5268def App_CleanUp(*args, **kwargs):
0df68c9f
RD
5269 """
5270 App_CleanUp()
6c3b4aae 5271
41e2b43e 5272 For internal use only, it is used to cleanup after wxWidgets when
66c033b4 5273 Python shuts down.
0df68c9f 5274 """
54f9ee45 5275 return _core_.App_CleanUp(*args, **kwargs)
d14a1e28 5276
e811c8ce 5277def GetApp(*args, **kwargs):
0df68c9f
RD
5278 """
5279 GetApp() -> PyApp
6c3b4aae 5280
196addbf 5281 Return a reference to the current wx.App object.
0df68c9f 5282 """
54f9ee45 5283 return _core_.GetApp(*args, **kwargs)
5cbf236d
RD
5284
5285def SetDefaultPyEncoding(*args, **kwargs):
5286 """
5287 SetDefaultPyEncoding(string encoding)
5288
5289 Sets the encoding that wxPython will use when it needs to convert a
5290 Python string or unicode object to or from a wxString.
e505d15e
RD
5291
5292 The default encoding is the value of ``locale.getdefaultlocale()[1]``
5293 but please be aware that the default encoding within the same locale
5294 may be slightly different on different platforms. For example, please
5295 see http://www.alanwood.net/demos/charsetdiffs.html for differences
5296 between the common latin/roman encodings.
5cbf236d
RD
5297 """
5298 return _core_.SetDefaultPyEncoding(*args, **kwargs)
5299
5300def GetDefaultPyEncoding(*args, **kwargs):
5301 """
5302 GetDefaultPyEncoding() -> string
5303
5304 Gets the current encoding that wxPython will use when it needs to
5305 convert a Python string or unicode object to or from a wxString.
5306 """
5307 return _core_.GetDefaultPyEncoding(*args, **kwargs)
d14a1e28
RD
5308#----------------------------------------------------------------------
5309
5310class PyOnDemandOutputWindow:
6c3b4aae
RD
5311 """
5312 A class that can be used for redirecting Python's stdout and
5313 stderr streams. It will do nothing until something is wrriten to
5314 the stream at which point it will create a Frame with a text area
5315 and write the text there.
5316 """
d14a1e28
RD
5317 def __init__(self, title = "wxPython: stdout/stderr"):
5318 self.frame = None
5319 self.title = title
412d302d
RD
5320 self.pos = wx.DefaultPosition
5321 self.size = (450, 300)
d14a1e28
RD
5322 self.parent = None
5323
5324 def SetParent(self, parent):
6c3b4aae 5325 """Set the window to be used as the popup Frame's parent."""
d14a1e28
RD
5326 self.parent = parent
5327
6c3b4aae
RD
5328
5329 def CreateOutputWindow(self, st):
412d302d
RD
5330 self.frame = wx.Frame(self.parent, -1, self.title, self.pos, self.size,
5331 style=wx.DEFAULT_FRAME_STYLE)
196addbf 5332 self.text = wx.TextCtrl(self.frame, -1, "",
412d302d 5333 style=wx.TE_MULTILINE|wx.TE_READONLY)
d1e20054 5334 self.text.AppendText(st)
6c3b4aae
RD
5335 self.frame.Show(True)
5336 EVT_CLOSE(self.frame, self.OnCloseWindow)
5337
d14a1e28 5338
7409c0c6
RD
5339 def OnCloseWindow(self, event):
5340 if self.frame is not None:
5341 self.frame.Destroy()
5342 self.frame = None
5343 self.text = None
5344
5345
d14a1e28 5346 # These methods provide the file-like output behaviour.
6c3b4aae
RD
5347 def write(self, text):
5348 """
5349 Create the output window if needed and write the string to it.
5350 If not called in the context of the gui thread then uses
5351 CallAfter to do the work there.
5352 """
5353 if self.frame is None:
5354 if not wx.Thread_IsMain():
5355 wx.CallAfter(self.CreateOutputWindow, text)
5356 else:
5357 self.CreateOutputWindow(text)
5358 else:
5359 if not wx.Thread_IsMain():
5360 wx.CallAfter(self.text.AppendText, text)
5361 else:
5362 self.text.AppendText(text)
5363
d14a1e28
RD
5364
5365 def close(self):
6c3b4aae
RD
5366 if self.frame is not None:
5367 wx.CallAfter(self.frame.Close)
5368
d14a1e28 5369
19272049
RD
5370 def flush(self):
5371 pass
5372
5373
d14a1e28
RD
5374
5375#----------------------------------------------------------------------
d14a1e28
RD
5376
5377_defRedirect = (wx.Platform == '__WXMSW__' or wx.Platform == '__WXMAC__')
5378
5379class App(wx.PyApp):
6c3b4aae 5380 """
66c033b4
RD
5381 The ``wx.App`` class represents the application and is used to:
5382
5383 * bootstrap the wxPython system and initialize the underlying
5384 gui toolkit
5385 * set and get application-wide properties
5386 * implement the windowing system main message or event loop,
5387 and to dispatch events to window instances
5388 * etc.
5389
5390 Every application must have a ``wx.App`` instance, and all
5391 creation of UI objects should be delayed until after the
03e37cd5
RD
5392 ``wx.App`` object has been created in order to ensure that the gui
5393 platform and wxWidgets have been fully initialized.
66c033b4
RD
5394
5395 Normally you would derive from this class and implement an
5396 ``OnInit`` method that creates a frame and then calls
5397 ``self.SetTopWindow(frame)``.
5398
03e37cd5 5399 :see: `wx.PySimpleApp` for a simpler app class that can be used
1c0f361b 5400 directly.
6c3b4aae 5401 """
66c033b4 5402
d14a1e28
RD
5403 outputWindowClass = PyOnDemandOutputWindow
5404
03e37cd5
RD
5405 def __init__(self, redirect=_defRedirect, filename=None,
5406 useBestVisual=False, clearSigInt=True):
66c033b4
RD
5407 """
5408 Construct a ``wx.App`` object.
5409
03e37cd5
RD
5410 :param redirect: Should ``sys.stdout`` and ``sys.stderr`` be
5411 redirected? Defaults to True on Windows and Mac, False
5412 otherwise. If `filename` is None then output will be
5413 redirected to a window that pops up as needed. (You can
5414 control what kind of window is created for the output by
5415 resetting the class variable ``outputWindowClass`` to a
5416 class of your choosing.)
66c033b4 5417
03e37cd5
RD
5418 :param filename: The name of a file to redirect output to, if
5419 redirect is True.
66c033b4
RD
5420
5421 :param useBestVisual: Should the app try to use the best
03e37cd5
RD
5422 available visual provided by the system (only relevant on
5423 systems that have more than one visual.) This parameter
5424 must be used instead of calling `SetUseBestVisual` later
5425 on because it must be set before the underlying GUI
5426 toolkit is initialized.
5427
5428 :param clearSigInt: Should SIGINT be cleared? This allows the
5429 app to terminate upon a Ctrl-C in the console like other
5430 GUI apps will.
66c033b4
RD
5431
5432 :note: You should override OnInit to do applicaition
5433 initialization to ensure that the system, toolkit and
5434 wxWidgets are fully initialized.
5435 """
d14a1e28
RD
5436 wx.PyApp.__init__(self)
5437
5438 if wx.Platform == "__WXMAC__":
5439 try:
5440 import MacOS
5441 if not MacOS.WMAvailable():
5442 print """\
5443This program needs access to the screen. Please run with 'pythonw',
5444not 'python', and only when you are logged in on the main display of
5445your Mac."""
5446 _sys.exit(1)
36cadbf7
RD
5447 except SystemExit:
5448 raise
d14a1e28
RD
5449 except:
5450 pass
5451
5452 # This has to be done before OnInit
5453 self.SetUseBestVisual(useBestVisual)
5454
5455 # Set the default handler for SIGINT. This fixes a problem
5456 # where if Ctrl-C is pressed in the console that started this
5457 # app then it will not appear to do anything, (not even send
5458 # KeyboardInterrupt???) but will later segfault on exit. By
5459 # setting the default handler then the app will exit, as
5460 # expected (depending on platform.)
03e37cd5
RD
5461 if clearSigInt:
5462 try:
5463 import signal
5464 signal.signal(signal.SIGINT, signal.SIG_DFL)
5465 except:
5466 pass
d14a1e28
RD
5467
5468 # Save and redirect the stdio to a window?
5469 self.stdioWin = None
5470 self.saveStdio = (_sys.stdout, _sys.stderr)
5471 if redirect:
5472 self.RedirectStdio(filename)
5473
8fb0e70a
RD
5474 # Use Python's install prefix as the default
5475 wx.StandardPaths.Get().SetInstallPrefix(_sys.prefix)
5476
d14a1e28
RD
5477 # This finishes the initialization of wxWindows and then calls
5478 # the OnInit that should be present in the derived class
5479 self._BootstrapApp()
5480
5481
5482 def __del__(self):
5483 try:
5484 self.RestoreStdio() # Just in case the MainLoop was overridden
5485 except:
5486 pass
5487
5488
5489 def SetTopWindow(self, frame):
1e0c8722 5490 """Set the \"main\" top level window"""
d14a1e28
RD
5491 if self.stdioWin:
5492 self.stdioWin.SetParent(frame)
5493 wx.PyApp.SetTopWindow(self, frame)
5494
5495
5496 def MainLoop(self):
1e0c8722 5497 """Execute the main GUI event loop"""
d14a1e28
RD
5498 wx.PyApp.MainLoop(self)
5499 self.RestoreStdio()
5500
5501
7409c0c6 5502 def RedirectStdio(self, filename=None):
1e0c8722 5503 """Redirect sys.stdout and sys.stderr to a file or a popup window."""
d14a1e28
RD
5504 if filename:
5505 _sys.stdout = _sys.stderr = open(filename, 'a')
5506 else:
5507 self.stdioWin = self.outputWindowClass()
5508 _sys.stdout = _sys.stderr = self.stdioWin
5509
5510
5511 def RestoreStdio(self):
5512 _sys.stdout, _sys.stderr = self.saveStdio
5513
5514
412d302d
RD
5515 def SetOutputWindowAttributes(self, title=None, pos=None, size=None):
5516 """
5517 Set the title, position and/or size of the output window if
f5b96ee1
RD
5518 the stdio has been redirected. This should be called before
5519 any output would cause the output window to be created.
412d302d
RD
5520 """
5521 if self.stdioWin:
5522 if title is not None:
5523 self.stdioWin.title = title
5524 if pos is not None:
5525 self.stdioWin.pos = pos
5526 if size is not None:
5527 self.stdioWin.size = size
5528
5529
5530
d14a1e28 5531
66c033b4 5532# change from wx.PyApp_XX to wx.App_XX
54f9ee45
RD
5533App_GetMacSupportPCMenuShortcuts = _core_.PyApp_GetMacSupportPCMenuShortcuts
5534App_GetMacAboutMenuItemId = _core_.PyApp_GetMacAboutMenuItemId
5535App_GetMacPreferencesMenuItemId = _core_.PyApp_GetMacPreferencesMenuItemId
5536App_GetMacExitMenuItemId = _core_.PyApp_GetMacExitMenuItemId
5537App_GetMacHelpMenuTitleName = _core_.PyApp_GetMacHelpMenuTitleName
5538App_SetMacSupportPCMenuShortcuts = _core_.PyApp_SetMacSupportPCMenuShortcuts
5539App_SetMacAboutMenuItemId = _core_.PyApp_SetMacAboutMenuItemId
5540App_SetMacPreferencesMenuItemId = _core_.PyApp_SetMacPreferencesMenuItemId
5541App_SetMacExitMenuItemId = _core_.PyApp_SetMacExitMenuItemId
5542App_SetMacHelpMenuTitleName = _core_.PyApp_SetMacHelpMenuTitleName
5543App_GetComCtl32Version = _core_.PyApp_GetComCtl32Version
d14a1e28
RD
5544
5545#----------------------------------------------------------------------------
5546
5547class PySimpleApp(wx.App):
6c3b4aae
RD
5548 """
5549 A simple application class. You can just create one of these and
5550 then then make your top level windows later, and not have to worry
66c033b4
RD
5551 about OnInit. For example::
5552
5553 app = wx.PySimpleApp()
5554 frame = wx.Frame(None, title='Hello World')
5555 frame.Show()
5556 app.MainLoop()
5557
5558 :see: `wx.App`
5559 """
6c3b4aae 5560
03e37cd5
RD
5561 def __init__(self, redirect=False, filename=None,
5562 useBestVisual=False, clearSigInt=True):
66c033b4
RD
5563 """
5564 :see: `wx.App.__init__`
5565 """
03e37cd5 5566 wx.App.__init__(self, redirect, filename, useBestVisual, clearSigInt)
6c3b4aae 5567
d14a1e28 5568 def OnInit(self):
d14a1e28
RD
5569 return True
5570
5571
66c033b4 5572
6c3b4aae 5573# Is anybody using this one?
d14a1e28
RD
5574class PyWidgetTester(wx.App):
5575 def __init__(self, size = (250, 100)):
5576 self.size = size
5577 wx.App.__init__(self, 0)
5578
5579 def OnInit(self):
196addbf 5580 self.frame = wx.Frame(None, -1, "Widget Tester", pos=(0,0), size=self.size)
d14a1e28
RD
5581 self.SetTopWindow(self.frame)
5582 return True
5583
66c033b4
RD
5584 def SetWidget(self, widgetClass, *args, **kwargs):
5585 w = widgetClass(self.frame, *args, **kwargs)
d14a1e28
RD
5586 self.frame.Show(True)
5587
5588#----------------------------------------------------------------------------
5589# DO NOT hold any other references to this object. This is how we
66c033b4 5590# know when to cleanup system resources that wxWidgets is holding. When
d14a1e28 5591# the sys module is unloaded, the refcount on sys.__wxPythonCleanup
66c033b4 5592# goes to zero and it calls the wx.App_CleanUp function.
d14a1e28
RD
5593
5594class __wxPyCleanup:
5595 def __init__(self):
54f9ee45 5596 self.cleanup = _core_.App_CleanUp
d14a1e28
RD
5597 def __del__(self):
5598 self.cleanup()
5599
5600_sys.__wxPythonCleanup = __wxPyCleanup()
5601
5602## # another possible solution, but it gets called too early...
66c033b4
RD
5603## import atexit
5604## atexit.register(_core_.wxApp_CleanUp)
d14a1e28
RD
5605
5606
5607#----------------------------------------------------------------------------
5608
5609#---------------------------------------------------------------------------
2ef75293
RD
5610
5611class EventLoop(object):
093d3ff1 5612 """Proxy of C++ EventLoop class"""
2ef75293
RD
5613 def __repr__(self):
5614 return "<%s.%s; proxy of C++ wxEventLoop instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
5615 def __init__(self, *args, **kwargs):
5616 """__init__(self) -> EventLoop"""
5617 newobj = _core_.new_EventLoop(*args, **kwargs)
5618 self.this = newobj.this
5619 self.thisown = 1
5620 del newobj.thisown
5621 def __del__(self, destroy=_core_.delete_EventLoop):
5622 """__del__(self)"""
5623 try:
5624 if self.thisown: destroy(self)
5625 except: pass
5626
5627 def Run(*args, **kwargs):
5628 """Run(self) -> int"""
5629 return _core_.EventLoop_Run(*args, **kwargs)
5630
5631 def Exit(*args, **kwargs):
5632 """Exit(self, int rc=0)"""
5633 return _core_.EventLoop_Exit(*args, **kwargs)
5634
5635 def Pending(*args, **kwargs):
5636 """Pending(self) -> bool"""
5637 return _core_.EventLoop_Pending(*args, **kwargs)
5638
5639 def Dispatch(*args, **kwargs):
5640 """Dispatch(self) -> bool"""
5641 return _core_.EventLoop_Dispatch(*args, **kwargs)
5642
5643 def IsRunning(*args, **kwargs):
5644 """IsRunning(self) -> bool"""
5645 return _core_.EventLoop_IsRunning(*args, **kwargs)
5646
5647 def GetActive(*args, **kwargs):
5648 """GetActive() -> EventLoop"""
5649 return _core_.EventLoop_GetActive(*args, **kwargs)
5650
5651 GetActive = staticmethod(GetActive)
5652 def SetActive(*args, **kwargs):
5653 """SetActive(EventLoop loop)"""
5654 return _core_.EventLoop_SetActive(*args, **kwargs)
5655
5656 SetActive = staticmethod(SetActive)
5657
5658class EventLoopPtr(EventLoop):
5659 def __init__(self, this):
5660 self.this = this
5661 if not hasattr(self,"thisown"): self.thisown = 0
5662 self.__class__ = EventLoop
5663_core_.EventLoop_swigregister(EventLoopPtr)
5664
5665def EventLoop_GetActive(*args, **kwargs):
5666 """EventLoop_GetActive() -> EventLoop"""
5667 return _core_.EventLoop_GetActive(*args, **kwargs)
5668
5669def EventLoop_SetActive(*args, **kwargs):
5670 """EventLoop_SetActive(EventLoop loop)"""
5671 return _core_.EventLoop_SetActive(*args, **kwargs)
5672
5673#---------------------------------------------------------------------------
d14a1e28 5674
1e0c8722 5675class AcceleratorEntry(object):
66c033b4
RD
5676 """
5677 A class used to define items in an `wx.AcceleratorTable`. wxPython
5678 programs can choose to use wx.AcceleratorEntry objects, but using a
5679 list of 3-tuple of integers (flags, keyCode, cmdID) usually works just
41e2b43e 5680 as well. See `__init__` for of the tuple values.
66c033b4
RD
5681
5682 :see: `wx.AcceleratorTable`
5683 """
1e0c8722
RD
5684 def __repr__(self):
5685 return "<%s.%s; proxy of C++ wxAcceleratorEntry instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
5686 def __init__(self, *args, **kwargs):
66c033b4
RD
5687 """
5688 __init__(self, int flags=0, int keyCode=0, int cmdID=0) -> AcceleratorEntry
5689
5690 Construct a wx.AcceleratorEntry.
66c033b4 5691 """
54f9ee45 5692 newobj = _core_.new_AcceleratorEntry(*args, **kwargs)
1e0c8722
RD
5693 self.this = newobj.this
5694 self.thisown = 1
5695 del newobj.thisown
54f9ee45 5696 def __del__(self, destroy=_core_.delete_AcceleratorEntry):
a95a7133 5697 """__del__(self)"""
1e0c8722
RD
5698 try:
5699 if self.thisown: destroy(self)
5700 except: pass
5701
5702 def Set(*args, **kwargs):
66c033b4
RD
5703 """
5704 Set(self, int flags, int keyCode, int cmd)
1e0c8722 5705
66c033b4
RD
5706 (Re)set the attributes of a wx.AcceleratorEntry.
5707 :see `__init__`
5708 """
5709 return _core_.AcceleratorEntry_Set(*args, **kwargs)
1e0c8722
RD
5710
5711 def GetFlags(*args, **kwargs):
66c033b4
RD
5712 """
5713 GetFlags(self) -> int
5714
5715 Get the AcceleratorEntry's flags.
5716 """
54f9ee45 5717 return _core_.AcceleratorEntry_GetFlags(*args, **kwargs)
1e0c8722
RD
5718
5719 def GetKeyCode(*args, **kwargs):
66c033b4
RD
5720 """
5721 GetKeyCode(self) -> int
5722
5723 Get the AcceleratorEntry's keycode.
5724 """
54f9ee45 5725 return _core_.AcceleratorEntry_GetKeyCode(*args, **kwargs)
1e0c8722
RD
5726
5727 def GetCommand(*args, **kwargs):
66c033b4
RD
5728 """
5729 GetCommand(self) -> int
5730
5731 Get the AcceleratorEntry's command ID.
5732 """
54f9ee45 5733 return _core_.AcceleratorEntry_GetCommand(*args, **kwargs)
1e0c8722
RD
5734
5735
5736class AcceleratorEntryPtr(AcceleratorEntry):
5737 def __init__(self, this):
5738 self.this = this
5739 if not hasattr(self,"thisown"): self.thisown = 0
5740 self.__class__ = AcceleratorEntry
54f9ee45 5741_core_.AcceleratorEntry_swigregister(AcceleratorEntryPtr)
1e0c8722
RD
5742
5743class AcceleratorTable(Object):
66c033b4
RD
5744 """
5745 An accelerator table allows the application to specify a table of
5746 keyboard shortcuts for menus or other commands. On Windows, menu or
5747 button commands are supported; on GTK, only menu commands are
5748 supported.
66c033b4 5749 """
1e0c8722
RD
5750 def __repr__(self):
5751 return "<%s.%s; proxy of C++ wxAcceleratorTable instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
5752 def __init__(self, *args, **kwargs):
0df68c9f
RD
5753 """
5754 __init__(entries) -> AcceleratorTable
1e0c8722 5755
66c033b4
RD
5756 Construct an AcceleratorTable from a list of `wx.AcceleratorEntry`
5757 items or or of 3-tuples (flags, keyCode, cmdID)
5758
5759 :see: `wx.AcceleratorEntry`
0df68c9f 5760 """
54f9ee45 5761 newobj = _core_.new_AcceleratorTable(*args, **kwargs)
1e0c8722
RD
5762 self.this = newobj.this
5763 self.thisown = 1
5764 del newobj.thisown
54f9ee45 5765 def __del__(self, destroy=_core_.delete_AcceleratorTable):
a95a7133 5766 """__del__(self)"""
1e0c8722
RD
5767 try:
5768 if self.thisown: destroy(self)
5769 except: pass
5770
5771 def Ok(*args, **kwargs):
a95a7133 5772 """Ok(self) -> bool"""
54f9ee45 5773 return _core_.AcceleratorTable_Ok(*args, **kwargs)
1e0c8722
RD
5774
5775
5776class AcceleratorTablePtr(AcceleratorTable):
5777 def __init__(self, this):
5778 self.this = this
5779 if not hasattr(self,"thisown"): self.thisown = 0
5780 self.__class__ = AcceleratorTable
54f9ee45 5781_core_.AcceleratorTable_swigregister(AcceleratorTablePtr)
1e0c8722
RD
5782
5783
5784def GetAccelFromString(*args, **kwargs):
196addbf 5785 """GetAccelFromString(String label) -> AcceleratorEntry"""
54f9ee45 5786 return _core_.GetAccelFromString(*args, **kwargs)
1e0c8722
RD
5787#---------------------------------------------------------------------------
5788
74a57fcd
RD
5789class VisualAttributes(object):
5790 """struct containing all the visual attributes of a control"""
5791 def __repr__(self):
5792 return "<%s.%s; proxy of C++ wxVisualAttributes instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
5793 def __init__(self, *args, **kwargs):
5794 """
a95a7133 5795 __init__(self) -> VisualAttributes
74a57fcd
RD
5796
5797 struct containing all the visual attributes of a control
5798 """
54f9ee45 5799 newobj = _core_.new_VisualAttributes(*args, **kwargs)
74a57fcd
RD
5800 self.this = newobj.this
5801 self.thisown = 1
5802 del newobj.thisown
54f9ee45 5803 def __del__(self, destroy=_core_.delete_VisualAttributes):
a95a7133 5804 """__del__(self)"""
74a57fcd
RD
5805 try:
5806 if self.thisown: destroy(self)
5807 except: pass
5808
54f9ee45
RD
5809 font = property(_core_.VisualAttributes_font_get, _core_.VisualAttributes_font_set)
5810 colFg = property(_core_.VisualAttributes_colFg_get, _core_.VisualAttributes_colFg_set)
5811 colBg = property(_core_.VisualAttributes_colBg_get, _core_.VisualAttributes_colBg_set)
74a57fcd
RD
5812
5813class VisualAttributesPtr(VisualAttributes):
5814 def __init__(self, this):
5815 self.this = this
5816 if not hasattr(self,"thisown"): self.thisown = 0
5817 self.__class__ = VisualAttributes
54f9ee45 5818_core_.VisualAttributes_swigregister(VisualAttributesPtr)
74a57fcd
RD
5819NullAcceleratorTable = cvar.NullAcceleratorTable
5820PanelNameStr = cvar.PanelNameStr
5821
54f9ee45
RD
5822WINDOW_VARIANT_NORMAL = _core_.WINDOW_VARIANT_NORMAL
5823WINDOW_VARIANT_SMALL = _core_.WINDOW_VARIANT_SMALL
5824WINDOW_VARIANT_MINI = _core_.WINDOW_VARIANT_MINI
5825WINDOW_VARIANT_LARGE = _core_.WINDOW_VARIANT_LARGE
5826WINDOW_VARIANT_MAX = _core_.WINDOW_VARIANT_MAX
d14a1e28 5827class Window(EvtHandler):
15afbcd0
RD
5828 """
5829 wx.Window is the base class for all windows and represents any visible
5830 object on the screen. All controls, top level windows and so on are
5831 wx.Windows. Sizers and device contexts are not however, as they don't
5832 appear on screen themselves.
5833
5834 """
e811c8ce
RD
5835 def __repr__(self):
5836 return "<%s.%s; proxy of C++ wxWindow instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 5837 def __init__(self, *args, **kwargs):
0df68c9f 5838 """
a95a7133 5839 __init__(self, Window parent, int id=-1, Point pos=DefaultPosition,
74a57fcd 5840 Size size=DefaultSize, long style=0, String name=PanelNameStr) -> Window
15afbcd0
RD
5841
5842 Construct and show a generic Window.
0df68c9f 5843 """
54f9ee45 5844 newobj = _core_.new_Window(*args, **kwargs)
d14a1e28
RD
5845 self.this = newobj.this
5846 self.thisown = 1
5847 del newobj.thisown
5848 self._setOORInfo(self)
d14a1e28 5849
e811c8ce 5850 def Create(*args, **kwargs):
0df68c9f 5851 """
a95a7133 5852 Create(self, Window parent, int id=-1, Point pos=DefaultPosition,
74a57fcd 5853 Size size=DefaultSize, long style=0, String name=PanelNameStr) -> bool
15afbcd0
RD
5854
5855 Create the GUI part of the Window for 2-phase creation mode.
0df68c9f 5856 """
54f9ee45 5857 return _core_.Window_Create(*args, **kwargs)
d14a1e28 5858
e811c8ce 5859 def Close(*args, **kwargs):
15afbcd0 5860 """
a95a7133 5861 Close(self, bool force=False) -> bool
15afbcd0
RD
5862
5863 This function simply generates a EVT_CLOSE event whose handler usually
5864 tries to close the window. It doesn't close the window itself,
5865 however. If force is False (the default) then the window's close
5866 handler will be allowed to veto the destruction of the window.
15afbcd0 5867 """
54f9ee45 5868 return _core_.Window_Close(*args, **kwargs)
d14a1e28 5869
e811c8ce 5870 def Destroy(*args, **kwargs):
0df68c9f 5871 """
a95a7133 5872 Destroy(self) -> bool
d14a1e28 5873
15afbcd0
RD
5874 Destroys the window safely. Frames and dialogs are not destroyed
5875 immediately when this function is called -- they are added to a list
5876 of windows to be deleted on idle time, when all the window's events
5877 have been processed. This prevents problems with events being sent to
5878 non-existent windows.
5879
5880 Returns True if the window has either been successfully deleted, or it
5881 has been added to the list of windows pending real deletion.
0df68c9f 5882 """
54f9ee45 5883 return _core_.Window_Destroy(*args, **kwargs)
d14a1e28 5884
e811c8ce 5885 def DestroyChildren(*args, **kwargs):
15afbcd0 5886 """
a95a7133 5887 DestroyChildren(self) -> bool
15afbcd0 5888
41e2b43e
RD
5889 Destroys all children of a window. Called automatically by the
5890 destructor.
15afbcd0 5891 """
54f9ee45 5892 return _core_.Window_DestroyChildren(*args, **kwargs)
d14a1e28 5893
e811c8ce 5894 def IsBeingDeleted(*args, **kwargs):
15afbcd0 5895 """
a95a7133 5896 IsBeingDeleted(self) -> bool
15afbcd0
RD
5897
5898 Is the window in the process of being deleted?
5899 """
54f9ee45 5900 return _core_.Window_IsBeingDeleted(*args, **kwargs)
d14a1e28 5901
e811c8ce 5902 def SetTitle(*args, **kwargs):
15afbcd0 5903 """
a95a7133 5904 SetTitle(self, String title)
15afbcd0
RD
5905
5906 Sets the window's title. Applicable only to frames and dialogs.
5907 """
54f9ee45 5908 return _core_.Window_SetTitle(*args, **kwargs)
d14a1e28 5909
e811c8ce 5910 def GetTitle(*args, **kwargs):
15afbcd0 5911 """
a95a7133 5912 GetTitle(self) -> String
15afbcd0
RD
5913
5914 Gets the window's title. Applicable only to frames and dialogs.
5915 """
54f9ee45 5916 return _core_.Window_GetTitle(*args, **kwargs)
d14a1e28 5917
e811c8ce 5918 def SetLabel(*args, **kwargs):
15afbcd0 5919 """
a95a7133 5920 SetLabel(self, String label)
15afbcd0
RD
5921
5922 Set the text which the window shows in its label if applicable.
5923 """
54f9ee45 5924 return _core_.Window_SetLabel(*args, **kwargs)
d14a1e28 5925
e811c8ce 5926 def GetLabel(*args, **kwargs):
15afbcd0 5927 """
a95a7133 5928 GetLabel(self) -> String
15afbcd0 5929
41e2b43e
RD
5930 Generic way of getting a label from any window, for identification
5931 purposes. The interpretation of this function differs from class to
5932 class. For frames and dialogs, the value returned is the title. For
5933 buttons or static text controls, it is the button text. This function
5934 can be useful for meta-programs such as testing tools or special-needs
5935 access programs)which need to identify windows by name.
15afbcd0 5936 """
54f9ee45 5937 return _core_.Window_GetLabel(*args, **kwargs)
d14a1e28 5938
e811c8ce 5939 def SetName(*args, **kwargs):
15afbcd0 5940 """
a95a7133 5941 SetName(self, String name)
15afbcd0 5942
41e2b43e
RD
5943 Sets the window's name. The window name is used for ressource setting
5944 in X, it is not the same as the window title/label
15afbcd0 5945 """
54f9ee45 5946 return _core_.Window_SetName(*args, **kwargs)
d14a1e28 5947
e811c8ce 5948 def GetName(*args, **kwargs):
15afbcd0 5949 """
a95a7133 5950 GetName(self) -> String
15afbcd0 5951
41e2b43e
RD
5952 Returns the windows name. This name is not guaranteed to be unique;
5953 it is up to the programmer to supply an appropriate name in the window
5954 constructor or via wx.Window.SetName.
15afbcd0 5955 """
54f9ee45 5956 return _core_.Window_GetName(*args, **kwargs)
d14a1e28 5957
4276dc52
RD
5958 def SetWindowVariant(*args, **kwargs):
5959 """
a95a7133 5960 SetWindowVariant(self, int variant)
4276dc52 5961
41e2b43e
RD
5962 Sets the variant of the window/font size to use for this window, if
5963 the platform supports variants, for example, wxMac.
4276dc52 5964 """
54f9ee45 5965 return _core_.Window_SetWindowVariant(*args, **kwargs)
4276dc52
RD
5966
5967 def GetWindowVariant(*args, **kwargs):
a95a7133 5968 """GetWindowVariant(self) -> int"""
54f9ee45 5969 return _core_.Window_GetWindowVariant(*args, **kwargs)
4276dc52 5970
e811c8ce 5971 def SetId(*args, **kwargs):
15afbcd0 5972 """
a95a7133 5973 SetId(self, int winid)
15afbcd0
RD
5974
5975 Sets the identifier of the window. Each window has an integer
5976 identifier. If the application has not provided one, an identifier
5977 will be generated. Normally, the identifier should be provided on
5978 creation and should not be modified subsequently.
5979 """
54f9ee45 5980 return _core_.Window_SetId(*args, **kwargs)
d14a1e28 5981
e811c8ce 5982 def GetId(*args, **kwargs):
15afbcd0 5983 """
a95a7133 5984 GetId(self) -> int
15afbcd0
RD
5985
5986 Returns the identifier of the window. Each window has an integer
5987 identifier. If the application has not provided one (or the default Id
5988 -1 is used) then an unique identifier with a negative value will be
5989 generated.
5990 """
54f9ee45 5991 return _core_.Window_GetId(*args, **kwargs)
d14a1e28 5992
e811c8ce 5993 def NewControlId(*args, **kwargs):
15afbcd0 5994 """
66c033b4 5995 NewControlId() -> int
15afbcd0
RD
5996
5997 Generate a control id for the controls which were not given one.
5998 """
54f9ee45 5999 return _core_.Window_NewControlId(*args, **kwargs)
d14a1e28 6000
e811c8ce
RD
6001 NewControlId = staticmethod(NewControlId)
6002 def NextControlId(*args, **kwargs):
15afbcd0 6003 """
66c033b4 6004 NextControlId(int winid) -> int
15afbcd0
RD
6005
6006 Get the id of the control following the one with the given
41e2b43e 6007 autogenerated) id
15afbcd0 6008 """
54f9ee45 6009 return _core_.Window_NextControlId(*args, **kwargs)
d14a1e28 6010
e811c8ce
RD
6011 NextControlId = staticmethod(NextControlId)
6012 def PrevControlId(*args, **kwargs):
15afbcd0 6013 """
66c033b4 6014 PrevControlId(int winid) -> int
15afbcd0
RD
6015
6016 Get the id of the control preceding the one with the given
41e2b43e 6017 autogenerated) id
15afbcd0 6018 """
54f9ee45 6019 return _core_.Window_PrevControlId(*args, **kwargs)
d14a1e28 6020
e811c8ce
RD
6021 PrevControlId = staticmethod(PrevControlId)
6022 def SetSize(*args, **kwargs):
15afbcd0 6023 """
a95a7133 6024 SetSize(self, Size size)
15afbcd0
RD
6025
6026 Sets the size of the window in pixels.
6027 """
54f9ee45 6028 return _core_.Window_SetSize(*args, **kwargs)
d14a1e28 6029
e811c8ce 6030 def SetDimensions(*args, **kwargs):
15afbcd0 6031 """
a95a7133 6032 SetDimensions(self, int x, int y, int width, int height, int sizeFlags=SIZE_AUTO)
15afbcd0
RD
6033
6034 Sets the position and size of the window in pixels. The sizeFlags
6035 parameter indicates the interpretation of the other params if they are
e505d15e
RD
6036 equal to -1.
6037
6038 ======================== ======================================
6039 wx.SIZE_AUTO A -1 indicates that a class-specific
6040 default should be used.
6041 wx.SIZE_USE_EXISTING Axisting dimensions should be used if
6042 -1 values are supplied.
6043 wxSIZE_ALLOW_MINUS_ONE Allow dimensions of -1 and less to be
6044 interpreted as real dimensions, not
6045 default values.
6046 ======================== ======================================
6047
15afbcd0 6048 """
54f9ee45 6049 return _core_.Window_SetDimensions(*args, **kwargs)
d14a1e28 6050
e811c8ce 6051 def SetRect(*args, **kwargs):
15afbcd0 6052 """
a95a7133 6053 SetRect(self, Rect rect, int sizeFlags=SIZE_AUTO)
15afbcd0
RD
6054
6055 Sets the position and size of the window in pixels using a wx.Rect.
6056 """
54f9ee45 6057 return _core_.Window_SetRect(*args, **kwargs)
d14a1e28 6058
e811c8ce 6059 def SetSizeWH(*args, **kwargs):
15afbcd0 6060 """
a95a7133 6061 SetSizeWH(self, int width, int height)
15afbcd0
RD
6062
6063 Sets the size of the window in pixels.
6064 """
54f9ee45 6065 return _core_.Window_SetSizeWH(*args, **kwargs)
d14a1e28 6066
e811c8ce 6067 def Move(*args, **kwargs):
15afbcd0 6068 """
a95a7133 6069 Move(self, Point pt, int flags=SIZE_USE_EXISTING)
15afbcd0
RD
6070
6071 Moves the window to the given position.
6072 """
54f9ee45 6073 return _core_.Window_Move(*args, **kwargs)
d14a1e28 6074
e811c8ce
RD
6075 SetPosition = Move
6076 def MoveXY(*args, **kwargs):
15afbcd0 6077 """
a95a7133 6078 MoveXY(self, int x, int y, int flags=SIZE_USE_EXISTING)
15afbcd0
RD
6079
6080 Moves the window to the given position.
6081 """
54f9ee45 6082 return _core_.Window_MoveXY(*args, **kwargs)
e811c8ce 6083
f8167d6e
RD
6084 def SetBestFittingSize(*args, **kwargs):
6085 """
6086 SetBestFittingSize(self, Size size=DefaultSize)
6087
6088 A 'Smart' SetSize that will fill in default size components with the
6089 window's *best size* values. Also set's the minsize for use with sizers.
6090 """
6091 return _core_.Window_SetBestFittingSize(*args, **kwargs)
6092
e811c8ce 6093 def Raise(*args, **kwargs):
15afbcd0 6094 """
a95a7133 6095 Raise(self)
15afbcd0
RD
6096
6097 Raises the window to the top of the window hierarchy if it is a
6098 managed window (dialog or frame).
6099 """
54f9ee45 6100 return _core_.Window_Raise(*args, **kwargs)
e811c8ce
RD
6101
6102 def Lower(*args, **kwargs):
15afbcd0 6103 """
a95a7133 6104 Lower(self)
15afbcd0
RD
6105
6106 Lowers the window to the bottom of the window hierarchy if it is a
6107 managed window (dialog or frame).
6108 """
54f9ee45 6109 return _core_.Window_Lower(*args, **kwargs)
e811c8ce
RD
6110
6111 def SetClientSize(*args, **kwargs):
15afbcd0 6112 """
a95a7133 6113 SetClientSize(self, Size size)
15afbcd0
RD
6114
6115 This sets the size of the window client area in pixels. Using this
6116 function to size a window tends to be more device-independent than
6117 wx.Window.SetSize, since the application need not worry about what
6118 dimensions the border or title bar have when trying to fit the window
6119 around panel items, for example.
6120 """
54f9ee45 6121 return _core_.Window_SetClientSize(*args, **kwargs)
e811c8ce
RD
6122
6123 def SetClientSizeWH(*args, **kwargs):
15afbcd0 6124 """
a95a7133 6125 SetClientSizeWH(self, int width, int height)
15afbcd0
RD
6126
6127 This sets the size of the window client area in pixels. Using this
6128 function to size a window tends to be more device-independent than
6129 wx.Window.SetSize, since the application need not worry about what
6130 dimensions the border or title bar have when trying to fit the window
6131 around panel items, for example.
6132 """
54f9ee45 6133 return _core_.Window_SetClientSizeWH(*args, **kwargs)
e811c8ce
RD
6134
6135 def SetClientRect(*args, **kwargs):
15afbcd0 6136 """
a95a7133 6137 SetClientRect(self, Rect rect)
15afbcd0
RD
6138
6139 This sets the size of the window client area in pixels. Using this
6140 function to size a window tends to be more device-independent than
6141 wx.Window.SetSize, since the application need not worry about what
6142 dimensions the border or title bar have when trying to fit the window
6143 around panel items, for example.
6144 """
54f9ee45 6145 return _core_.Window_SetClientRect(*args, **kwargs)
e811c8ce
RD
6146
6147 def GetPosition(*args, **kwargs):
0df68c9f 6148 """
a95a7133 6149 GetPosition(self) -> Point
e811c8ce 6150
0df68c9f
RD
6151 Get the window's position.
6152 """
54f9ee45 6153 return _core_.Window_GetPosition(*args, **kwargs)
e811c8ce
RD
6154
6155 def GetPositionTuple(*args, **kwargs):
0df68c9f
RD
6156 """
6157 GetPositionTuple() -> (x,y)
e811c8ce 6158
0df68c9f
RD
6159 Get the window's position.
6160 """
54f9ee45 6161 return _core_.Window_GetPositionTuple(*args, **kwargs)
e811c8ce
RD
6162
6163 def GetSize(*args, **kwargs):
0df68c9f 6164 """
a95a7133 6165 GetSize(self) -> Size
e811c8ce 6166
0df68c9f
RD
6167 Get the window size.
6168 """
54f9ee45 6169 return _core_.Window_GetSize(*args, **kwargs)
e811c8ce
RD
6170
6171 def GetSizeTuple(*args, **kwargs):
0df68c9f
RD
6172 """
6173 GetSizeTuple() -> (width, height)
e811c8ce 6174
0df68c9f
RD
6175 Get the window size.
6176 """
54f9ee45 6177 return _core_.Window_GetSizeTuple(*args, **kwargs)
e811c8ce
RD
6178
6179 def GetRect(*args, **kwargs):
15afbcd0 6180 """
a95a7133 6181 GetRect(self) -> Rect
15afbcd0
RD
6182
6183 Returns the size and position of the window as a wx.Rect object.
6184 """
54f9ee45 6185 return _core_.Window_GetRect(*args, **kwargs)
e811c8ce
RD
6186
6187 def GetClientSize(*args, **kwargs):
0df68c9f 6188 """
a95a7133 6189 GetClientSize(self) -> Size
e811c8ce 6190
15afbcd0
RD
6191 This gets the size of the window's 'client area' in pixels. The client
6192 area is the area which may be drawn on by the programmer, excluding
6193 title bar, border, scrollbars, etc.
0df68c9f 6194 """
54f9ee45 6195 return _core_.Window_GetClientSize(*args, **kwargs)
e811c8ce
RD
6196
6197 def GetClientSizeTuple(*args, **kwargs):
0df68c9f
RD
6198 """
6199 GetClientSizeTuple() -> (width, height)
e811c8ce 6200
15afbcd0
RD
6201 This gets the size of the window's 'client area' in pixels. The client
6202 area is the area which may be drawn on by the programmer, excluding
6203 title bar, border, scrollbars, etc.
0df68c9f 6204 """
54f9ee45 6205 return _core_.Window_GetClientSizeTuple(*args, **kwargs)
e811c8ce
RD
6206
6207 def GetClientAreaOrigin(*args, **kwargs):
15afbcd0 6208 """
a95a7133 6209 GetClientAreaOrigin(self) -> Point
15afbcd0
RD
6210
6211 Get the origin of the client area of the window relative to the
6212 window's top left corner (the client area may be shifted because of
6213 the borders, scrollbars, other decorations...)
6214 """
54f9ee45 6215 return _core_.Window_GetClientAreaOrigin(*args, **kwargs)
e811c8ce
RD
6216
6217 def GetClientRect(*args, **kwargs):
15afbcd0 6218 """
a95a7133 6219 GetClientRect(self) -> Rect
15afbcd0 6220
61863841 6221 Get the client area position and size as a `wx.Rect` object.
15afbcd0 6222 """
54f9ee45 6223 return _core_.Window_GetClientRect(*args, **kwargs)
e811c8ce
RD
6224
6225 def GetBestSize(*args, **kwargs):
0df68c9f 6226 """
a95a7133 6227 GetBestSize(self) -> Size
e811c8ce 6228
248ed943 6229 This function returns the best acceptable minimal size for the
41e2b43e
RD
6230 window, if applicable. For example, for a static text control, it will
6231 be the minimal size such that the control label is not truncated. For
6232 windows containing subwindows (suzh aswx.Panel), the size returned by
6233 this function will be the same as the size the window would have had
6234 after calling Fit.
0df68c9f 6235 """
54f9ee45 6236 return _core_.Window_GetBestSize(*args, **kwargs)
e811c8ce
RD
6237
6238 def GetBestSizeTuple(*args, **kwargs):
0df68c9f
RD
6239 """
6240 GetBestSizeTuple() -> (width, height)
e811c8ce 6241
248ed943 6242 This function returns the best acceptable minimal size for the
41e2b43e
RD
6243 window, if applicable. For example, for a static text control, it will
6244 be the minimal size such that the control label is not truncated. For
6245 windows containing subwindows (suzh aswx.Panel), the size returned by
6246 this function will be the same as the size the window would have had
6247 after calling Fit.
0df68c9f 6248 """
54f9ee45 6249 return _core_.Window_GetBestSizeTuple(*args, **kwargs)
e811c8ce 6250
dfbb5885
RD
6251 def InvalidateBestSize(*args, **kwargs):
6252 """
6253 InvalidateBestSize(self)
6254
6255 Reset the cached best size value so it will be recalculated the next
6256 time it is needed.
6257 """
6258 return _core_.Window_InvalidateBestSize(*args, **kwargs)
6259
6260 def GetBestFittingSize(*args, **kwargs):
6261 """
6262 GetBestFittingSize(self) -> Size
6263
6264 This function will merge the window's best size into the window's
6265 minimum size, giving priority to the min size components, and returns
6266 the results.
6267
6268 """
6269 return _core_.Window_GetBestFittingSize(*args, **kwargs)
6270
e811c8ce 6271 def GetAdjustedBestSize(*args, **kwargs):
15afbcd0 6272 """
a95a7133 6273 GetAdjustedBestSize(self) -> Size
15afbcd0
RD
6274
6275 This method is similar to GetBestSize, except in one
6276 thing. GetBestSize should return the minimum untruncated size of the
6277 window, while this method will return the largest of BestSize and any
6278 user specified minimum size. ie. it is the minimum size the window
6279 should currently be drawn at, not the minimal size it can possibly
6280 tolerate.
6281 """
54f9ee45 6282 return _core_.Window_GetAdjustedBestSize(*args, **kwargs)
e811c8ce
RD
6283
6284 def Center(*args, **kwargs):
15afbcd0 6285 """
a95a7133 6286 Center(self, int direction=BOTH)
15afbcd0
RD
6287
6288 Centers the window. The parameter specifies the direction for
6289 cetering, and may be wx.HORIZONTAL, wx.VERTICAL or wx.BOTH. It may
6290 also include wx.CENTER_ON_SCREEN flag if you want to center the window
6291 on the entire screen and not on its parent window. If it is a
6292 top-level window and has no parent then it will always be centered
6293 relative to the screen.
6294 """
54f9ee45 6295 return _core_.Window_Center(*args, **kwargs)
e811c8ce
RD
6296
6297 Centre = Center
6298 def CenterOnScreen(*args, **kwargs):
15afbcd0 6299 """
a95a7133 6300 CenterOnScreen(self, int dir=BOTH)
15afbcd0
RD
6301
6302 Center on screen (only works for top level windows)
6303 """
54f9ee45 6304 return _core_.Window_CenterOnScreen(*args, **kwargs)
e811c8ce
RD
6305
6306 CentreOnScreen = CenterOnScreen
6307 def CenterOnParent(*args, **kwargs):
15afbcd0 6308 """
a95a7133 6309 CenterOnParent(self, int dir=BOTH)
15afbcd0
RD
6310
6311 Center with respect to the the parent window
6312 """
54f9ee45 6313 return _core_.Window_CenterOnParent(*args, **kwargs)
e811c8ce
RD
6314
6315 CentreOnParent = CenterOnParent
6316 def Fit(*args, **kwargs):
15afbcd0 6317 """
a95a7133 6318 Fit(self)
15afbcd0
RD
6319
6320 Sizes the window so that it fits around its subwindows. This function
6321 won't do anything if there are no subwindows and will only really work
6322 correctly if sizers are used for the subwindows layout. Also, if the
6323 window has exactly one subwindow it is better (faster and the result
6324 is more precise as Fit adds some margin to account for fuzziness of
6325 its calculations) to call window.SetClientSize(child.GetSize())
6326 instead of calling Fit.
6327 """
54f9ee45 6328 return _core_.Window_Fit(*args, **kwargs)
e811c8ce
RD
6329
6330 def FitInside(*args, **kwargs):
15afbcd0 6331 """
a95a7133 6332 FitInside(self)
15afbcd0
RD
6333
6334 Similar to Fit, but sizes the interior (virtual) size of a
6335 window. Mainly useful with scrolled windows to reset scrollbars after
6336 sizing changes that do not trigger a size event, and/or scrolled
6337 windows without an interior sizer. This function similarly won't do
6338 anything if there are no subwindows.
6339 """
54f9ee45 6340 return _core_.Window_FitInside(*args, **kwargs)
e811c8ce 6341
f16ab95d 6342 def SetSizeHints(*args, **kwargs):
0df68c9f 6343 """
a95a7133 6344 SetSizeHints(self, int minW, int minH, int maxW=-1, int maxH=-1, int incW=-1,
0df68c9f 6345 int incH=-1)
15afbcd0
RD
6346
6347 Allows specification of minimum and maximum window sizes, and window
6348 size increments. If a pair of values is not set (or set to -1), the
6349 default values will be used. If this function is called, the user
908b74cd
RD
6350 will not be able to size the window outside the given bounds (if it is
6351 a top-level window.) Sizers will also inspect the minimum window size
6352 and will use that value if set when calculating layout.
6353
6354 The resizing increments are only significant under Motif or Xt.
0df68c9f 6355 """
f16ab95d 6356 return _core_.Window_SetSizeHints(*args, **kwargs)
e811c8ce 6357
f16ab95d
RD
6358 def SetSizeHintsSz(*args, **kwargs):
6359 """
6360 SetSizeHintsSz(self, Size minSize, Size maxSize=DefaultSize, Size incSize=DefaultSize)
6361
6362 Allows specification of minimum and maximum window sizes, and window
6363 size increments. If a pair of values is not set (or set to -1), the
6364 default values will be used. If this function is called, the user
6365 will not be able to size the window outside the given bounds (if it is
6366 a top-level window.) Sizers will also inspect the minimum window size
6367 and will use that value if set when calculating layout.
6368
6369 The resizing increments are only significant under Motif or Xt.
6370 """
6371 return _core_.Window_SetSizeHintsSz(*args, **kwargs)
6372
6373 def SetVirtualSizeHints(*args, **kwargs):
15afbcd0 6374 """
908b74cd 6375 SetVirtualSizeHints(self, int minW, int minH, int maxW=-1, int maxH=-1)
15afbcd0
RD
6376
6377 Allows specification of minimum and maximum virtual window sizes. If a
6378 pair of values is not set (or set to -1), the default values will be
6379 used. If this function is called, the user will not be able to size
6380 the virtual area of the window outside the given bounds.
6381 """
f16ab95d
RD
6382 return _core_.Window_SetVirtualSizeHints(*args, **kwargs)
6383
6384 def SetVirtualSizeHintsSz(*args, **kwargs):
6385 """
6386 SetVirtualSizeHintsSz(self, Size minSize, Size maxSize=DefaultSize)
6387
6388 Allows specification of minimum and maximum virtual window sizes. If a
6389 pair of values is not set (or set to -1), the default values will be
6390 used. If this function is called, the user will not be able to size
6391 the virtual area of the window outside the given bounds.
6392 """
6393 return _core_.Window_SetVirtualSizeHintsSz(*args, **kwargs)
e811c8ce 6394
908b74cd
RD
6395 def GetMaxSize(*args, **kwargs):
6396 """GetMaxSize(self) -> Size"""
6397 return _core_.Window_GetMaxSize(*args, **kwargs)
6398
6399 def GetMinSize(*args, **kwargs):
6400 """GetMinSize(self) -> Size"""
6401 return _core_.Window_GetMinSize(*args, **kwargs)
6402
6403 def SetMinSize(*args, **kwargs):
6404 """
6405 SetMinSize(self, Size minSize)
6406
6407 A more convenient method than `SetSizeHints` for setting just the
6408 min size.
6409 """
6410 return _core_.Window_SetMinSize(*args, **kwargs)
6411
6412 def SetMaxSize(*args, **kwargs):
6413 """
6414 SetMaxSize(self, Size maxSize)
6415
6416 A more convenient method than `SetSizeHints` for setting just the
6417 max size.
6418 """
6419 return _core_.Window_SetMaxSize(*args, **kwargs)
6420
e811c8ce 6421 def GetMinWidth(*args, **kwargs):
a95a7133 6422 """GetMinWidth(self) -> int"""
54f9ee45 6423 return _core_.Window_GetMinWidth(*args, **kwargs)
e811c8ce
RD
6424
6425 def GetMinHeight(*args, **kwargs):
a95a7133 6426 """GetMinHeight(self) -> int"""
54f9ee45 6427 return _core_.Window_GetMinHeight(*args, **kwargs)
e811c8ce
RD
6428
6429 def GetMaxWidth(*args, **kwargs):
a95a7133 6430 """GetMaxWidth(self) -> int"""
54f9ee45 6431 return _core_.Window_GetMaxWidth(*args, **kwargs)
e811c8ce
RD
6432
6433 def GetMaxHeight(*args, **kwargs):
a95a7133 6434 """GetMaxHeight(self) -> int"""
54f9ee45 6435 return _core_.Window_GetMaxHeight(*args, **kwargs)
e811c8ce 6436
e811c8ce 6437 def SetVirtualSize(*args, **kwargs):
0df68c9f 6438 """
a95a7133 6439 SetVirtualSize(self, Size size)
e811c8ce 6440
15afbcd0
RD
6441 Set the the virtual size of a window in pixels. For most windows this
6442 is just the client area of the window, but for some like scrolled
6443 windows it is more or less independent of the screen window size.
0df68c9f 6444 """
54f9ee45 6445 return _core_.Window_SetVirtualSize(*args, **kwargs)
e811c8ce
RD
6446
6447 def SetVirtualSizeWH(*args, **kwargs):
0df68c9f 6448 """
a95a7133 6449 SetVirtualSizeWH(self, int w, int h)
e811c8ce 6450
15afbcd0
RD
6451 Set the the virtual size of a window in pixels. For most windows this
6452 is just the client area of the window, but for some like scrolled
6453 windows it is more or less independent of the screen window size.
0df68c9f 6454 """
54f9ee45 6455 return _core_.Window_SetVirtualSizeWH(*args, **kwargs)
e811c8ce
RD
6456
6457 def GetVirtualSize(*args, **kwargs):
0df68c9f 6458 """
a95a7133 6459 GetVirtualSize(self) -> Size
e811c8ce 6460
15afbcd0
RD
6461 Get the the virtual size of the window in pixels. For most windows
6462 this is just the client area of the window, but for some like scrolled
6463 windows it is more or less independent of the screen window size.
0df68c9f 6464 """
54f9ee45 6465 return _core_.Window_GetVirtualSize(*args, **kwargs)
e811c8ce
RD
6466
6467 def GetVirtualSizeTuple(*args, **kwargs):
0df68c9f
RD
6468 """
6469 GetVirtualSizeTuple() -> (width, height)
e811c8ce 6470
15afbcd0
RD
6471 Get the the virtual size of the window in pixels. For most windows
6472 this is just the client area of the window, but for some like scrolled
6473 windows it is more or less independent of the screen window size.
0df68c9f 6474 """
54f9ee45 6475 return _core_.Window_GetVirtualSizeTuple(*args, **kwargs)
e811c8ce
RD
6476
6477 def GetBestVirtualSize(*args, **kwargs):
15afbcd0 6478 """
a95a7133 6479 GetBestVirtualSize(self) -> Size
15afbcd0
RD
6480
6481 Return the largest of ClientSize and BestSize (as determined by a
6482 sizer, interior children, or other means)
6483 """
54f9ee45 6484 return _core_.Window_GetBestVirtualSize(*args, **kwargs)
e811c8ce
RD
6485
6486 def Show(*args, **kwargs):
15afbcd0 6487 """
a95a7133 6488 Show(self, bool show=True) -> bool
15afbcd0
RD
6489
6490 Shows or hides the window. You may need to call Raise for a top level
6491 window if you want to bring it to top, although this is not needed if
6492 Show is called immediately after the frame creation. Returns True if
6493 the window has been shown or hidden or False if nothing was done
6494 because it already was in the requested state.
6495 """
54f9ee45 6496 return _core_.Window_Show(*args, **kwargs)
e811c8ce
RD
6497
6498 def Hide(*args, **kwargs):
15afbcd0 6499 """
a95a7133 6500 Hide(self) -> bool
15afbcd0
RD
6501
6502 Equivalent to calling Show(False).
6503 """
54f9ee45 6504 return _core_.Window_Hide(*args, **kwargs)
e811c8ce
RD
6505
6506 def Enable(*args, **kwargs):
15afbcd0 6507 """
a95a7133 6508 Enable(self, bool enable=True) -> bool
15afbcd0
RD
6509
6510 Enable or disable the window for user input. Note that when a parent
6511 window is disabled, all of its children are disabled as well and they
6512 are reenabled again when the parent is. Returns true if the window
6513 has been enabled or disabled, false if nothing was done, i.e. if the
6514 window had already been in the specified state.
6515 """
54f9ee45 6516 return _core_.Window_Enable(*args, **kwargs)
e811c8ce
RD
6517
6518 def Disable(*args, **kwargs):
15afbcd0 6519 """
a95a7133 6520 Disable(self) -> bool
15afbcd0
RD
6521
6522 Disables the window, same as Enable(false).
6523 """
54f9ee45 6524 return _core_.Window_Disable(*args, **kwargs)
e811c8ce
RD
6525
6526 def IsShown(*args, **kwargs):
15afbcd0 6527 """
a95a7133 6528 IsShown(self) -> bool
15afbcd0
RD
6529
6530 Returns true if the window is shown, false if it has been hidden.
6531 """
54f9ee45 6532 return _core_.Window_IsShown(*args, **kwargs)
e811c8ce
RD
6533
6534 def IsEnabled(*args, **kwargs):
15afbcd0 6535 """
a95a7133 6536 IsEnabled(self) -> bool
15afbcd0
RD
6537
6538 Returns true if the window is enabled for input, false otherwise.
6539 """
54f9ee45 6540 return _core_.Window_IsEnabled(*args, **kwargs)
e811c8ce
RD
6541
6542 def SetWindowStyleFlag(*args, **kwargs):
15afbcd0 6543 """
a95a7133 6544 SetWindowStyleFlag(self, long style)
15afbcd0 6545
41e2b43e
RD
6546 Sets the style of the window. Please note that some styles cannot be
6547 changed after the window creation and that Refresh() might need to be
6548 called after changing the others for the change to take place
6549 immediately.
15afbcd0 6550 """
54f9ee45 6551 return _core_.Window_SetWindowStyleFlag(*args, **kwargs)
e811c8ce
RD
6552
6553 def GetWindowStyleFlag(*args, **kwargs):
15afbcd0 6554 """
a95a7133 6555 GetWindowStyleFlag(self) -> long
e811c8ce 6556
15afbcd0
RD
6557 Gets the window style that was passed to the constructor or Create
6558 method.
6559 """
54f9ee45 6560 return _core_.Window_GetWindowStyleFlag(*args, **kwargs)
e811c8ce 6561
15afbcd0 6562 SetWindowStyle = SetWindowStyleFlag; GetWindowStyle = GetWindowStyleFlag
e811c8ce 6563 def HasFlag(*args, **kwargs):
15afbcd0 6564 """
a95a7133 6565 HasFlag(self, int flag) -> bool
15afbcd0
RD
6566
6567 Test if the given style is set for this window.
6568 """
54f9ee45 6569 return _core_.Window_HasFlag(*args, **kwargs)
e811c8ce
RD
6570
6571 def IsRetained(*args, **kwargs):
15afbcd0 6572 """
a95a7133 6573 IsRetained(self) -> bool
15afbcd0
RD
6574
6575 Returns true if the window is retained, false otherwise. Retained
6576 windows are only available on X platforms.
6577 """
54f9ee45 6578 return _core_.Window_IsRetained(*args, **kwargs)
e811c8ce
RD
6579
6580 def SetExtraStyle(*args, **kwargs):
15afbcd0 6581 """
a95a7133 6582 SetExtraStyle(self, long exStyle)
15afbcd0
RD
6583
6584 Sets the extra style bits for the window. Extra styles are the less
6585 often used style bits which can't be set with the constructor or with
6586 SetWindowStyleFlag()
6587 """
54f9ee45 6588 return _core_.Window_SetExtraStyle(*args, **kwargs)
e811c8ce
RD
6589
6590 def GetExtraStyle(*args, **kwargs):
15afbcd0 6591 """
a95a7133 6592 GetExtraStyle(self) -> long
15afbcd0
RD
6593
6594 Returns the extra style bits for the window.
6595 """
54f9ee45 6596 return _core_.Window_GetExtraStyle(*args, **kwargs)
e811c8ce
RD
6597
6598 def MakeModal(*args, **kwargs):
15afbcd0 6599 """
a95a7133 6600 MakeModal(self, bool modal=True)
15afbcd0
RD
6601
6602 Disables all other windows in the application so that the user can
6603 only interact with this window. Passing False will reverse this
6604 effect.
6605 """
54f9ee45 6606 return _core_.Window_MakeModal(*args, **kwargs)
e811c8ce
RD
6607
6608 def SetThemeEnabled(*args, **kwargs):
15afbcd0 6609 """
a95a7133 6610 SetThemeEnabled(self, bool enableTheme)
15afbcd0
RD
6611
6612 This function tells a window if it should use the system's "theme"
6613 code to draw the windows' background instead if its own background
6614 drawing code. This will only have an effect on platforms that support
6615 the notion of themes in user defined windows. One such platform is
6616 GTK+ where windows can have (very colourful) backgrounds defined by a
6617 user's selected theme.
6618
6619 Dialogs, notebook pages and the status bar have this flag set to true
6620 by default so that the default look and feel is simulated best.
6621 """
54f9ee45 6622 return _core_.Window_SetThemeEnabled(*args, **kwargs)
e811c8ce
RD
6623
6624 def GetThemeEnabled(*args, **kwargs):
15afbcd0 6625 """
a95a7133 6626 GetThemeEnabled(self) -> bool
e811c8ce 6627
15afbcd0
RD
6628 Return the themeEnabled flag.
6629 """
54f9ee45 6630 return _core_.Window_GetThemeEnabled(*args, **kwargs)
e811c8ce
RD
6631
6632 def SetFocus(*args, **kwargs):
15afbcd0 6633 """
a95a7133 6634 SetFocus(self)
15afbcd0
RD
6635
6636 Set's the focus to this window, allowing it to receive keyboard input.
6637 """
54f9ee45 6638 return _core_.Window_SetFocus(*args, **kwargs)
e811c8ce
RD
6639
6640 def SetFocusFromKbd(*args, **kwargs):
15afbcd0 6641 """
a95a7133 6642 SetFocusFromKbd(self)
15afbcd0
RD
6643
6644 Set focus to this window as the result of a keyboard action. Normally
6645 only called internally.
6646 """
54f9ee45 6647 return _core_.Window_SetFocusFromKbd(*args, **kwargs)
e811c8ce
RD
6648
6649 def FindFocus(*args, **kwargs):
15afbcd0 6650 """
66c033b4 6651 FindFocus() -> Window
15afbcd0
RD
6652
6653 Returns the window or control that currently has the keyboard focus,
6654 or None.
6655 """
54f9ee45 6656 return _core_.Window_FindFocus(*args, **kwargs)
e811c8ce
RD
6657
6658 FindFocus = staticmethod(FindFocus)
6659 def AcceptsFocus(*args, **kwargs):
15afbcd0 6660 """
a95a7133 6661 AcceptsFocus(self) -> bool
15afbcd0
RD
6662
6663 Can this window have focus?
6664 """
54f9ee45 6665 return _core_.Window_AcceptsFocus(*args, **kwargs)
e811c8ce
RD
6666
6667 def AcceptsFocusFromKeyboard(*args, **kwargs):
15afbcd0 6668 """
a95a7133 6669 AcceptsFocusFromKeyboard(self) -> bool
15afbcd0
RD
6670
6671 Can this window be given focus by keyboard navigation? if not, the
6672 only way to give it focus (provided it accepts it at all) is to click
6673 it.
6674 """
54f9ee45 6675 return _core_.Window_AcceptsFocusFromKeyboard(*args, **kwargs)
e811c8ce
RD
6676
6677 def GetDefaultItem(*args, **kwargs):
15afbcd0 6678 """
a95a7133 6679 GetDefaultItem(self) -> Window
15afbcd0
RD
6680
6681 Get the default child of this parent, i.e. the one which is activated
6682 by pressing <Enter> such as the OK button on a wx.Dialog.
6683 """
54f9ee45 6684 return _core_.Window_GetDefaultItem(*args, **kwargs)
e811c8ce
RD
6685
6686 def SetDefaultItem(*args, **kwargs):
15afbcd0 6687 """
a95a7133 6688 SetDefaultItem(self, Window child) -> Window
15afbcd0
RD
6689
6690 Set this child as default, return the old default.
6691 """
54f9ee45 6692 return _core_.Window_SetDefaultItem(*args, **kwargs)
e811c8ce
RD
6693
6694 def SetTmpDefaultItem(*args, **kwargs):
15afbcd0 6695 """
a95a7133 6696 SetTmpDefaultItem(self, Window win)
15afbcd0
RD
6697
6698 Set this child as temporary default
6699 """
54f9ee45 6700 return _core_.Window_SetTmpDefaultItem(*args, **kwargs)
e811c8ce 6701
908b74cd
RD
6702 def Navigate(*args, **kwargs):
6703 """
6704 Navigate(self, int flags=NavigationKeyEvent.IsForward) -> bool
6705
fd2dc343
RD
6706 Does keyboard navigation from this window to another, by sending a
6707 `wx.NavigationKeyEvent`.
908b74cd
RD
6708 """
6709 return _core_.Window_Navigate(*args, **kwargs)
6710
7f98d120
RD
6711 def MoveAfterInTabOrder(*args, **kwargs):
6712 """
6713 MoveAfterInTabOrder(self, Window win)
6714
6715 Moves this window in the tab navigation order after the specified
6716 sibling window. This means that when the user presses the TAB key on
6717 that other window, the focus switches to this window.
6718
6719 The default tab order is the same as creation order. This function
6720 and `MoveBeforeInTabOrder` allow to change it after creating all the
6721 windows.
6722
6723 """
6724 return _core_.Window_MoveAfterInTabOrder(*args, **kwargs)
6725
6726 def MoveBeforeInTabOrder(*args, **kwargs):
6727 """
6728 MoveBeforeInTabOrder(self, Window win)
6729
6730 Same as `MoveAfterInTabOrder` except that it inserts this window just
6731 before win instead of putting it right after it.
6732 """
6733 return _core_.Window_MoveBeforeInTabOrder(*args, **kwargs)
6734
e811c8ce 6735 def GetChildren(*args, **kwargs):
15afbcd0 6736 """
a95a7133 6737 GetChildren(self) -> PyObject
15afbcd0
RD
6738
6739 Returns a list of the window's children. NOTE: Currently this is a
6740 copy of the child window list maintained by the window, so the return
6741 value of this function is only valid as long as the window's children
6742 do not change.
6743 """
54f9ee45 6744 return _core_.Window_GetChildren(*args, **kwargs)
e811c8ce
RD
6745
6746 def GetParent(*args, **kwargs):
15afbcd0 6747 """
a95a7133 6748 GetParent(self) -> Window
15afbcd0
RD
6749
6750 Returns the parent window of this window, or None if there isn't one.
6751 """
54f9ee45 6752 return _core_.Window_GetParent(*args, **kwargs)
e811c8ce
RD
6753
6754 def GetGrandParent(*args, **kwargs):
15afbcd0 6755 """
a95a7133 6756 GetGrandParent(self) -> Window
15afbcd0 6757
41e2b43e
RD
6758 Returns the parent of the parent of this window, or None if there
6759 isn't one.
15afbcd0 6760 """
54f9ee45 6761 return _core_.Window_GetGrandParent(*args, **kwargs)
e811c8ce
RD
6762
6763 def IsTopLevel(*args, **kwargs):
15afbcd0 6764 """
a95a7133 6765 IsTopLevel(self) -> bool
15afbcd0
RD
6766
6767 Returns true if the given window is a top-level one. Currently all
6768 frames and dialogs are always considered to be top-level windows (even
6769 if they have a parent window).
6770 """
54f9ee45 6771 return _core_.Window_IsTopLevel(*args, **kwargs)
e811c8ce
RD
6772
6773 def Reparent(*args, **kwargs):
15afbcd0 6774 """
a95a7133 6775 Reparent(self, Window newParent) -> bool
15afbcd0
RD
6776
6777 Reparents the window, i.e the window will be removed from its current
6778 parent window (e.g. a non-standard toolbar in a wxFrame) and then
6779 re-inserted into another. Available on Windows and GTK. Returns True
6780 if the parent was changed, False otherwise (error or newParent ==
6781 oldParent)
6782 """
54f9ee45 6783 return _core_.Window_Reparent(*args, **kwargs)
e811c8ce
RD
6784
6785 def AddChild(*args, **kwargs):
15afbcd0 6786 """
a95a7133 6787 AddChild(self, Window child)
15afbcd0
RD
6788
6789 Adds a child window. This is called automatically by window creation
6790 functions so should not be required by the application programmer.
6791 """
54f9ee45 6792 return _core_.Window_AddChild(*args, **kwargs)
e811c8ce
RD
6793
6794 def RemoveChild(*args, **kwargs):
15afbcd0 6795 """
a95a7133 6796 RemoveChild(self, Window child)
15afbcd0
RD
6797
6798 Removes a child window. This is called automatically by window
6799 deletion functions so should not be required by the application
6800 programmer.
6801 """
54f9ee45 6802 return _core_.Window_RemoveChild(*args, **kwargs)
e811c8ce
RD
6803
6804 def FindWindowById(*args, **kwargs):
15afbcd0 6805 """
a95a7133 6806 FindWindowById(self, long winid) -> Window
15afbcd0
RD
6807
6808 Find a chld of this window by window ID
6809 """
54f9ee45 6810 return _core_.Window_FindWindowById(*args, **kwargs)
e811c8ce
RD
6811
6812 def FindWindowByName(*args, **kwargs):
15afbcd0 6813 """
a95a7133 6814 FindWindowByName(self, String name) -> Window
15afbcd0
RD
6815
6816 Find a child of this window by name
6817 """
54f9ee45 6818 return _core_.Window_FindWindowByName(*args, **kwargs)
e811c8ce
RD
6819
6820 def GetEventHandler(*args, **kwargs):
15afbcd0 6821 """
a95a7133 6822 GetEventHandler(self) -> EvtHandler
15afbcd0
RD
6823
6824 Returns the event handler for this window. By default, the window is
6825 its own event handler.
6826 """
54f9ee45 6827 return _core_.Window_GetEventHandler(*args, **kwargs)
e811c8ce
RD
6828
6829 def SetEventHandler(*args, **kwargs):
15afbcd0 6830 """
a95a7133 6831 SetEventHandler(self, EvtHandler handler)
15afbcd0
RD
6832
6833 Sets the event handler for this window. An event handler is an object
6834 that is capable of processing the events sent to a window. By default,
6835 the window is its own event handler, but an application may wish to
6836 substitute another, for example to allow central implementation of
6837 event-handling for a variety of different window classes.
6838
41e2b43e 6839 It is usually better to use `wx.Window.PushEventHandler` since this sets
15afbcd0
RD
6840 up a chain of event handlers, where an event not handled by one event
6841 handler is handed to the next one in the chain.
6842 """
54f9ee45 6843 return _core_.Window_SetEventHandler(*args, **kwargs)
e811c8ce
RD
6844
6845 def PushEventHandler(*args, **kwargs):
15afbcd0 6846 """
a95a7133 6847 PushEventHandler(self, EvtHandler handler)
15afbcd0
RD
6848
6849 Pushes this event handler onto the event handler stack for the window.
6850 An event handler is an object that is capable of processing the events
6851 sent to a window. By default, the window is its own event handler, but
6852 an application may wish to substitute another, for example to allow
6853 central implementation of event-handling for a variety of different
6854 window classes.
6855
6856 wx.Window.PushEventHandler allows an application to set up a chain of
6857 event handlers, where an event not handled by one event handler is
41e2b43e 6858 handed to the next one in the chain. Use `wx.Window.PopEventHandler` to
15afbcd0
RD
6859 remove the event handler.
6860 """
54f9ee45 6861 return _core_.Window_PushEventHandler(*args, **kwargs)
e811c8ce
RD
6862
6863 def PopEventHandler(*args, **kwargs):
15afbcd0 6864 """
a95a7133 6865 PopEventHandler(self, bool deleteHandler=False) -> EvtHandler
15afbcd0
RD
6866
6867 Removes and returns the top-most event handler on the event handler
6868 stack. If deleteHandler is True then the wx.EvtHandler object will be
6869 destroyed after it is popped.
6870 """
54f9ee45 6871 return _core_.Window_PopEventHandler(*args, **kwargs)
e811c8ce
RD
6872
6873 def RemoveEventHandler(*args, **kwargs):
15afbcd0 6874 """
a95a7133 6875 RemoveEventHandler(self, EvtHandler handler) -> bool
15afbcd0 6876
41e2b43e
RD
6877 Find the given handler in the event handler chain and remove (but not
6878 delete) it from the event handler chain, return True if it was found
6879 and False otherwise (this also results in an assert failure so this
6880 function should only be called when the handler is supposed to be
6881 there.)
15afbcd0 6882 """
54f9ee45 6883 return _core_.Window_RemoveEventHandler(*args, **kwargs)
e811c8ce
RD
6884
6885 def SetValidator(*args, **kwargs):
15afbcd0 6886 """
a95a7133 6887 SetValidator(self, Validator validator)
15afbcd0
RD
6888
6889 Deletes the current validator (if any) and sets the window validator,
6890 having called wx.Validator.Clone to create a new validator of this
6891 type.
6892 """
54f9ee45 6893 return _core_.Window_SetValidator(*args, **kwargs)
e811c8ce
RD
6894
6895 def GetValidator(*args, **kwargs):
15afbcd0 6896 """
a95a7133 6897 GetValidator(self) -> Validator
15afbcd0
RD
6898
6899 Returns a pointer to the current validator for the window, or None if
6900 there is none.
6901 """
54f9ee45 6902 return _core_.Window_GetValidator(*args, **kwargs)
e811c8ce 6903
74a57fcd
RD
6904 def Validate(*args, **kwargs):
6905 """
a95a7133 6906 Validate(self) -> bool
74a57fcd
RD
6907
6908 Validates the current values of the child controls using their
41e2b43e
RD
6909 validators. If the window has wx.WS_EX_VALIDATE_RECURSIVELY extra
6910 style flag set, the method will also call Validate() of all child
6911 windows. Returns false if any of the validations failed.
74a57fcd 6912 """
54f9ee45 6913 return _core_.Window_Validate(*args, **kwargs)
74a57fcd
RD
6914
6915 def TransferDataToWindow(*args, **kwargs):
6916 """
a95a7133 6917 TransferDataToWindow(self) -> bool
74a57fcd 6918
41e2b43e
RD
6919 Transfers values to child controls from data areas specified by their
6920 validators. If the window has wx.WS_EX_VALIDATE_RECURSIVELY extra
6921 style flag set, the method will also call TransferDataToWindow() of
6922 all child windows.
74a57fcd 6923 """
54f9ee45 6924 return _core_.Window_TransferDataToWindow(*args, **kwargs)
74a57fcd
RD
6925
6926 def TransferDataFromWindow(*args, **kwargs):
6927 """
a95a7133 6928 TransferDataFromWindow(self) -> bool
74a57fcd 6929
41e2b43e
RD
6930 Transfers values from child controls to data areas specified by their
6931 validators. Returns false if a transfer failed. If the window has
6932 wx.WS_EX_VALIDATE_RECURSIVELY extra style flag set, the method will
6933 also call TransferDataFromWindow() of all child windows.
74a57fcd 6934 """
54f9ee45 6935 return _core_.Window_TransferDataFromWindow(*args, **kwargs)
74a57fcd
RD
6936
6937 def InitDialog(*args, **kwargs):
6938 """
a95a7133 6939 InitDialog(self)
74a57fcd 6940
41e2b43e
RD
6941 Sends an EVT_INIT_DIALOG event, whose handler usually transfers data
6942 to the dialog via validators.
74a57fcd 6943 """
54f9ee45 6944 return _core_.Window_InitDialog(*args, **kwargs)
74a57fcd 6945
e811c8ce 6946 def SetAcceleratorTable(*args, **kwargs):
15afbcd0 6947 """
a95a7133 6948 SetAcceleratorTable(self, AcceleratorTable accel)
15afbcd0
RD
6949
6950 Sets the accelerator table for this window.
6951 """
54f9ee45 6952 return _core_.Window_SetAcceleratorTable(*args, **kwargs)
e811c8ce
RD
6953
6954 def GetAcceleratorTable(*args, **kwargs):
15afbcd0 6955 """
a95a7133 6956 GetAcceleratorTable(self) -> AcceleratorTable
15afbcd0
RD
6957
6958 Gets the accelerator table for this window.
6959 """
54f9ee45 6960 return _core_.Window_GetAcceleratorTable(*args, **kwargs)
e811c8ce
RD
6961
6962 def RegisterHotKey(*args, **kwargs):
15afbcd0 6963 """
a95a7133 6964 RegisterHotKey(self, int hotkeyId, int modifiers, int keycode) -> bool
15afbcd0
RD
6965
6966 Registers a system wide hotkey. Every time the user presses the hotkey
6967 registered here, this window will receive a hotkey event. It will
6968 receive the event even if the application is in the background and
6969 does not have the input focus because the user is working with some
6970 other application. To bind an event handler function to this hotkey
6971 use EVT_HOTKEY with an id equal to hotkeyId. Returns True if the
6972 hotkey was registered successfully.
6973 """
54f9ee45 6974 return _core_.Window_RegisterHotKey(*args, **kwargs)
e811c8ce
RD
6975
6976 def UnregisterHotKey(*args, **kwargs):
15afbcd0 6977 """
a95a7133 6978 UnregisterHotKey(self, int hotkeyId) -> bool
15afbcd0
RD
6979
6980 Unregisters a system wide hotkey.
6981 """
54f9ee45 6982 return _core_.Window_UnregisterHotKey(*args, **kwargs)
e811c8ce
RD
6983
6984 def ConvertDialogPointToPixels(*args, **kwargs):
15afbcd0 6985 """
a95a7133 6986 ConvertDialogPointToPixels(self, Point pt) -> Point
15afbcd0
RD
6987
6988 Converts a point or size from dialog units to pixels. Dialog units
6989 are used for maintaining a dialog's proportions even if the font
6990 changes. For the x dimension, the dialog units are multiplied by the
6991 average character width and then divided by 4. For the y dimension,
6992 the dialog units are multiplied by the average character height and
6993 then divided by 8.
6994 """
54f9ee45 6995 return _core_.Window_ConvertDialogPointToPixels(*args, **kwargs)
e811c8ce
RD
6996
6997 def ConvertDialogSizeToPixels(*args, **kwargs):
15afbcd0 6998 """
a95a7133 6999 ConvertDialogSizeToPixels(self, Size sz) -> Size
15afbcd0
RD
7000
7001 Converts a point or size from dialog units to pixels. Dialog units
7002 are used for maintaining a dialog's proportions even if the font
7003 changes. For the x dimension, the dialog units are multiplied by the
7004 average character width and then divided by 4. For the y dimension,
7005 the dialog units are multiplied by the average character height and
7006 then divided by 8.
7007 """
54f9ee45 7008 return _core_.Window_ConvertDialogSizeToPixels(*args, **kwargs)
e811c8ce
RD
7009
7010 def DLG_PNT(*args, **kwargs):
15afbcd0 7011 """
a95a7133 7012 DLG_PNT(self, Point pt) -> Point
15afbcd0
RD
7013
7014 Converts a point or size from dialog units to pixels. Dialog units
7015 are used for maintaining a dialog's proportions even if the font
7016 changes. For the x dimension, the dialog units are multiplied by the
7017 average character width and then divided by 4. For the y dimension,
7018 the dialog units are multiplied by the average character height and
7019 then divided by 8.
7020 """
54f9ee45 7021 return _core_.Window_DLG_PNT(*args, **kwargs)
e811c8ce
RD
7022
7023 def DLG_SZE(*args, **kwargs):
15afbcd0 7024 """
a95a7133 7025 DLG_SZE(self, Size sz) -> Size
15afbcd0
RD
7026
7027 Converts a point or size from dialog units to pixels. Dialog units
7028 are used for maintaining a dialog's proportions even if the font
7029 changes. For the x dimension, the dialog units are multiplied by the
7030 average character width and then divided by 4. For the y dimension,
7031 the dialog units are multiplied by the average character height and
7032 then divided by 8.
7033 """
54f9ee45 7034 return _core_.Window_DLG_SZE(*args, **kwargs)
e811c8ce
RD
7035
7036 def ConvertPixelPointToDialog(*args, **kwargs):
a95a7133 7037 """ConvertPixelPointToDialog(self, Point pt) -> Point"""
54f9ee45 7038 return _core_.Window_ConvertPixelPointToDialog(*args, **kwargs)
e811c8ce
RD
7039
7040 def ConvertPixelSizeToDialog(*args, **kwargs):
a95a7133 7041 """ConvertPixelSizeToDialog(self, Size sz) -> Size"""
54f9ee45 7042 return _core_.Window_ConvertPixelSizeToDialog(*args, **kwargs)
e811c8ce
RD
7043
7044 def WarpPointer(*args, **kwargs):
15afbcd0 7045 """
a95a7133 7046 WarpPointer(self, int x, int y)
15afbcd0
RD
7047
7048 Moves the pointer to the given position on the window.
7049
7050 NOTE: This function is not supported under Mac because Apple Human
7051 Interface Guidelines forbid moving the mouse cursor programmatically.
7052 """
54f9ee45 7053 return _core_.Window_WarpPointer(*args, **kwargs)
e811c8ce
RD
7054
7055 def CaptureMouse(*args, **kwargs):
15afbcd0 7056 """
a95a7133 7057 CaptureMouse(self)
15afbcd0
RD
7058
7059 Directs all mouse input to this window. Call wx.Window.ReleaseMouse to
7060 release the capture.
7061
7062 Note that wxWindows maintains the stack of windows having captured the
7063 mouse and when the mouse is released the capture returns to the window
7064 which had had captured it previously and it is only really released if
7065 there were no previous window. In particular, this means that you must
7066 release the mouse as many times as you capture it.
7067 """
54f9ee45 7068 return _core_.Window_CaptureMouse(*args, **kwargs)
e811c8ce
RD
7069
7070 def ReleaseMouse(*args, **kwargs):
15afbcd0 7071 """
a95a7133 7072 ReleaseMouse(self)
15afbcd0
RD
7073
7074 Releases mouse input captured with wx.Window.CaptureMouse.
7075 """
54f9ee45 7076 return _core_.Window_ReleaseMouse(*args, **kwargs)
e811c8ce
RD
7077
7078 def GetCapture(*args, **kwargs):
15afbcd0 7079 """
66c033b4 7080 GetCapture() -> Window
15afbcd0
RD
7081
7082 Returns the window which currently captures the mouse or None
7083 """
54f9ee45 7084 return _core_.Window_GetCapture(*args, **kwargs)
e811c8ce
RD
7085
7086 GetCapture = staticmethod(GetCapture)
7087 def HasCapture(*args, **kwargs):
15afbcd0 7088 """
a95a7133 7089 HasCapture(self) -> bool
15afbcd0
RD
7090
7091 Returns true if this window has the current mouse capture.
7092 """
54f9ee45 7093 return _core_.Window_HasCapture(*args, **kwargs)
e811c8ce
RD
7094
7095 def Refresh(*args, **kwargs):
15afbcd0 7096 """
a95a7133 7097 Refresh(self, bool eraseBackground=True, Rect rect=None)
15afbcd0
RD
7098
7099 Mark the specified rectangle (or the whole window) as "dirty" so it
7100 will be repainted. Causes an EVT_PAINT event to be generated and sent
7101 to the window.
7102 """
54f9ee45 7103 return _core_.Window_Refresh(*args, **kwargs)
e811c8ce
RD
7104
7105 def RefreshRect(*args, **kwargs):
15afbcd0 7106 """
a95a7133 7107 RefreshRect(self, Rect rect)
15afbcd0
RD
7108
7109 Redraws the contents of the given rectangle: the area inside it will
7110 be repainted. This is the same as Refresh but has a nicer syntax.
7111 """
54f9ee45 7112 return _core_.Window_RefreshRect(*args, **kwargs)
e811c8ce
RD
7113
7114 def Update(*args, **kwargs):
15afbcd0 7115 """
a95a7133 7116 Update(self)
15afbcd0
RD
7117
7118 Calling this method immediately repaints the invalidated area of the
7119 window instead of waiting for the EVT_PAINT event to happen, (normally
7120 this would usually only happen when the flow of control returns to the
7121 event loop.) Notice that this function doesn't refresh the window and
7122 does nothing if the window has been already repainted. Use Refresh
7123 first if you want to immediately redraw the window (or some portion of
7124 it) unconditionally.
7125 """
54f9ee45 7126 return _core_.Window_Update(*args, **kwargs)
e811c8ce
RD
7127
7128 def ClearBackground(*args, **kwargs):
15afbcd0 7129 """
a95a7133 7130 ClearBackground(self)
15afbcd0
RD
7131
7132 Clears the window by filling it with the current background
7133 colour. Does not cause an erase background event to be generated.
7134 """
54f9ee45 7135 return _core_.Window_ClearBackground(*args, **kwargs)
e811c8ce
RD
7136
7137 def Freeze(*args, **kwargs):
15afbcd0 7138 """
a95a7133 7139 Freeze(self)
15afbcd0 7140
41e2b43e
RD
7141 Freezes the window or, in other words, prevents any updates from
7142 taking place on screen, the window is not redrawn at all. Thaw must be
7143 called to reenable window redrawing. Calls to Freeze/Thaw may be
7144 nested, with the actual Thaw being delayed until all the nesting has
7145 been undone.
15afbcd0
RD
7146
7147 This method is useful for visual appearance optimization (for example,
7148 it is a good idea to use it before inserting large amount of text into
7149 a wxTextCtrl under wxGTK) but is not implemented on all platforms nor
7150 for all controls so it is mostly just a hint to wxWindows and not a
7151 mandatory directive.
7152 """
54f9ee45 7153 return _core_.Window_Freeze(*args, **kwargs)
e811c8ce
RD
7154
7155 def Thaw(*args, **kwargs):
15afbcd0 7156 """
a95a7133 7157 Thaw(self)
15afbcd0 7158
4276dc52 7159 Reenables window updating after a previous call to Freeze. Calls to
41e2b43e
RD
7160 Freeze/Thaw may be nested, so Thaw must be called the same number of
7161 times that Freeze was before the window will be updated.
15afbcd0 7162 """
54f9ee45 7163 return _core_.Window_Thaw(*args, **kwargs)
e811c8ce
RD
7164
7165 def PrepareDC(*args, **kwargs):
15afbcd0 7166 """
a95a7133 7167 PrepareDC(self, DC dc)
15afbcd0
RD
7168
7169 Call this function to prepare the device context for drawing a
7170 scrolled image. It sets the device origin according to the current
7171 scroll position.
7172 """
54f9ee45 7173 return _core_.Window_PrepareDC(*args, **kwargs)
e811c8ce
RD
7174
7175 def GetUpdateRegion(*args, **kwargs):
15afbcd0 7176 """
a95a7133 7177 GetUpdateRegion(self) -> Region
15afbcd0
RD
7178
7179 Returns the region specifying which parts of the window have been
7180 damaged. Should only be called within an EVT_PAINT handler.
7181 """
54f9ee45 7182 return _core_.Window_GetUpdateRegion(*args, **kwargs)
e811c8ce
RD
7183
7184 def GetUpdateClientRect(*args, **kwargs):
15afbcd0 7185 """
a95a7133 7186 GetUpdateClientRect(self) -> Rect
15afbcd0
RD
7187
7188 Get the update rectangle region bounding box in client coords.
7189 """
54f9ee45 7190 return _core_.Window_GetUpdateClientRect(*args, **kwargs)
e811c8ce
RD
7191
7192 def IsExposed(*args, **kwargs):
15afbcd0 7193 """
a95a7133 7194 IsExposed(self, int x, int y, int w=1, int h=1) -> bool
15afbcd0
RD
7195
7196 Returns true if the given point or rectangle area has been exposed
7197 since the last repaint. Call this in an paint event handler to
7198 optimize redrawing by only redrawing those areas, which have been
7199 exposed.
7200 """
54f9ee45 7201 return _core_.Window_IsExposed(*args, **kwargs)
e811c8ce
RD
7202
7203 def IsExposedPoint(*args, **kwargs):
15afbcd0 7204 """
a95a7133 7205 IsExposedPoint(self, Point pt) -> bool
15afbcd0
RD
7206
7207 Returns true if the given point or rectangle area has been exposed
7208 since the last repaint. Call this in an paint event handler to
7209 optimize redrawing by only redrawing those areas, which have been
7210 exposed.
7211 """
54f9ee45 7212 return _core_.Window_IsExposedPoint(*args, **kwargs)
e811c8ce 7213
4276dc52 7214 def IsExposedRect(*args, **kwargs):
15afbcd0 7215 """
a95a7133 7216 IsExposedRect(self, Rect rect) -> bool
15afbcd0
RD
7217
7218 Returns true if the given point or rectangle area has been exposed
7219 since the last repaint. Call this in an paint event handler to
7220 optimize redrawing by only redrawing those areas, which have been
7221 exposed.
7222 """
54f9ee45 7223 return _core_.Window_IsExposedRect(*args, **kwargs)
e811c8ce 7224
74a57fcd
RD
7225 def GetDefaultAttributes(*args, **kwargs):
7226 """
a95a7133 7227 GetDefaultAttributes(self) -> VisualAttributes
74a57fcd 7228
41e2b43e
RD
7229 Get the default attributes for an instance of this class. This is
7230 useful if you want to use the same font or colour in your own control
7231 as in a standard control -- which is a much better idea than hard
7232 coding specific colours or fonts which might look completely out of
db3e571a 7233 place on the user's system, especially if it uses themes.
74a57fcd 7234 """
54f9ee45 7235 return _core_.Window_GetDefaultAttributes(*args, **kwargs)
74a57fcd
RD
7236
7237 def GetClassDefaultAttributes(*args, **kwargs):
7238 """
66c033b4 7239 GetClassDefaultAttributes(int variant=WINDOW_VARIANT_NORMAL) -> VisualAttributes
74a57fcd 7240
41e2b43e
RD
7241 Get the default attributes for this class. This is useful if you want
7242 to use the same font or colour in your own control as in a standard
7243 control -- which is a much better idea than hard coding specific
db3e571a
RD
7244 colours or fonts which might look completely out of place on the
7245 user's system, especially if it uses themes.
74a57fcd
RD
7246
7247 The variant parameter is only relevant under Mac currently and is
41e2b43e 7248 ignore under other platforms. Under Mac, it will change the size of
db3e571a
RD
7249 the returned font. See `wx.Window.SetWindowVariant` for more about
7250 this.
74a57fcd 7251 """
54f9ee45 7252 return _core_.Window_GetClassDefaultAttributes(*args, **kwargs)
74a57fcd
RD
7253
7254 GetClassDefaultAttributes = staticmethod(GetClassDefaultAttributes)
e811c8ce 7255 def SetBackgroundColour(*args, **kwargs):
15afbcd0 7256 """
a95a7133 7257 SetBackgroundColour(self, Colour colour) -> bool
15afbcd0
RD
7258
7259 Sets the background colour of the window. Returns True if the colour
7260 was changed. The background colour is usually painted by the default
7261 EVT_ERASE_BACKGROUND event handler function under Windows and
f8167d6e
RD
7262 automatically under GTK. Using `wx.NullColour` will reset the window
7263 to the default background colour.
15afbcd0 7264
db3e571a 7265 Note that setting the background colour may not cause an immediate
f8167d6e 7266 refresh, so you may wish to call `ClearBackground` or `Refresh` after
15afbcd0
RD
7267 calling this function.
7268
f8167d6e
RD
7269 Using this function will disable attempts to use themes for this
7270 window, if the system supports them. Use with care since usually the
7271 themes represent the appearance chosen by the user to be used for all
7272 applications on the system.
15afbcd0 7273 """
54f9ee45 7274 return _core_.Window_SetBackgroundColour(*args, **kwargs)
e811c8ce 7275
412d302d
RD
7276 def SetOwnBackgroundColour(*args, **kwargs):
7277 """SetOwnBackgroundColour(self, Colour colour)"""
7278 return _core_.Window_SetOwnBackgroundColour(*args, **kwargs)
b2df227b 7279
e811c8ce 7280 def SetForegroundColour(*args, **kwargs):
15afbcd0 7281 """
a95a7133 7282 SetForegroundColour(self, Colour colour) -> bool
15afbcd0
RD
7283
7284 Sets the foreground colour of the window. Returns True is the colour
7285 was changed. The interpretation of foreground colour is dependent on
7286 the window class; it may be the text colour or other colour, or it may
7287 not be used at all.
7288 """
54f9ee45 7289 return _core_.Window_SetForegroundColour(*args, **kwargs)
e811c8ce 7290
fa47d7a7
VS
7291 def SetOwnForegroundColour(*args, **kwargs):
7292 """SetOwnForegroundColour(self, Colour colour)"""
7293 return _core_.Window_SetOwnForegroundColour(*args, **kwargs)
b2df227b 7294
e811c8ce 7295 def GetBackgroundColour(*args, **kwargs):
15afbcd0 7296 """
a95a7133 7297 GetBackgroundColour(self) -> Colour
15afbcd0
RD
7298
7299 Returns the background colour of the window.
7300 """
54f9ee45 7301 return _core_.Window_GetBackgroundColour(*args, **kwargs)
e811c8ce
RD
7302
7303 def GetForegroundColour(*args, **kwargs):
15afbcd0 7304 """
a95a7133 7305 GetForegroundColour(self) -> Colour
15afbcd0
RD
7306
7307 Returns the foreground colour of the window. The interpretation of
7308 foreground colour is dependent on the window class; it may be the text
7309 colour or other colour, or it may not be used at all.
7310 """
54f9ee45 7311 return _core_.Window_GetForegroundColour(*args, **kwargs)
e811c8ce 7312
7bc1e663
RD
7313 def SetBackgroundStyle(*args, **kwargs):
7314 """
7315 SetBackgroundStyle(self, int style) -> bool
7316
7317 Returns the background style of the window. The background style
7318 indicates how the background of the window is drawn.
7319
7320 ====================== ========================================
7321 wx.BG_STYLE_SYSTEM The background colour or pattern should
7322 be determined by the system
7323 wx.BG_STYLE_COLOUR The background should be a solid colour
7324 wx.BG_STYLE_CUSTOM The background will be implemented by the
7325 application.
7326 ====================== ========================================
7327
7328 On GTK+, use of wx.BG_STYLE_CUSTOM allows the flicker-free drawing of
7329 a custom background, such as a tiled bitmap. Currently the style has
7330 no effect on other platforms.
7331
7332 :see: `GetBackgroundStyle`, `SetBackgroundColour`
7333 """
7334 return _core_.Window_SetBackgroundStyle(*args, **kwargs)
7335
7336 def GetBackgroundStyle(*args, **kwargs):
7337 """
7338 GetBackgroundStyle(self) -> int
7339
7340 Returns the background style of the window.
7341
7342 :see: `SetBackgroundStyle`
7343 """
7344 return _core_.Window_GetBackgroundStyle(*args, **kwargs)
7345
51b83b37
RD
7346 def HasTransparentBackground(*args, **kwargs):
7347 """
7348 HasTransparentBackground(self) -> bool
7349
7350 Returns True if this window's background is transparent (as, for
7351 example, for `wx.StaticText`) and should show the parent window's
7352 background.
7353
7354 This method is mostly used internally by the library itself and you
7355 normally shouldn't have to call it. You may, however, have to override
7356 it in your custom control classes to ensure that background is painted
7357 correctly.
7358 """
7359 return _core_.Window_HasTransparentBackground(*args, **kwargs)
7360
e811c8ce 7361 def SetCursor(*args, **kwargs):
15afbcd0 7362 """
a95a7133 7363 SetCursor(self, Cursor cursor) -> bool
15afbcd0
RD
7364
7365 Sets the window's cursor. Notice that the window cursor also sets it
7366 for the children of the window implicitly.
7367
7368 The cursor may be wx.NullCursor in which case the window cursor will
7369 be reset back to default.
7370 """
54f9ee45 7371 return _core_.Window_SetCursor(*args, **kwargs)
e811c8ce
RD
7372
7373 def GetCursor(*args, **kwargs):
15afbcd0 7374 """
a95a7133 7375 GetCursor(self) -> Cursor
15afbcd0
RD
7376
7377 Return the cursor associated with this window.
7378 """
54f9ee45 7379 return _core_.Window_GetCursor(*args, **kwargs)
e811c8ce
RD
7380
7381 def SetFont(*args, **kwargs):
15afbcd0 7382 """
a95a7133 7383 SetFont(self, Font font) -> bool
15afbcd0
RD
7384
7385 Sets the font for this window.
7386 """
54f9ee45 7387 return _core_.Window_SetFont(*args, **kwargs)
e811c8ce 7388
fa47d7a7
VS
7389 def SetOwnFont(*args, **kwargs):
7390 """SetOwnFont(self, Font font)"""
7391 return _core_.Window_SetOwnFont(*args, **kwargs)
b2df227b 7392
e811c8ce 7393 def GetFont(*args, **kwargs):
15afbcd0 7394 """
a95a7133 7395 GetFont(self) -> Font
15afbcd0 7396
4276dc52 7397 Returns the default font used for this window.
15afbcd0 7398 """
54f9ee45 7399 return _core_.Window_GetFont(*args, **kwargs)
e811c8ce
RD
7400
7401 def SetCaret(*args, **kwargs):
15afbcd0 7402 """
a95a7133 7403 SetCaret(self, Caret caret)
15afbcd0
RD
7404
7405 Sets the caret associated with the window.
7406 """
54f9ee45 7407 return _core_.Window_SetCaret(*args, **kwargs)
e811c8ce
RD
7408
7409 def GetCaret(*args, **kwargs):
15afbcd0 7410 """
a95a7133 7411 GetCaret(self) -> Caret
15afbcd0
RD
7412
7413 Returns the caret associated with the window.
7414 """
54f9ee45 7415 return _core_.Window_GetCaret(*args, **kwargs)
e811c8ce
RD
7416
7417 def GetCharHeight(*args, **kwargs):
15afbcd0 7418 """
a95a7133 7419 GetCharHeight(self) -> int
15afbcd0
RD
7420
7421 Get the (average) character size for the current font.
7422 """
54f9ee45 7423 return _core_.Window_GetCharHeight(*args, **kwargs)
e811c8ce
RD
7424
7425 def GetCharWidth(*args, **kwargs):
15afbcd0 7426 """
a95a7133 7427 GetCharWidth(self) -> int
15afbcd0
RD
7428
7429 Get the (average) character size for the current font.
7430 """
54f9ee45 7431 return _core_.Window_GetCharWidth(*args, **kwargs)
e811c8ce
RD
7432
7433 def GetTextExtent(*args, **kwargs):
fd2dc343
RD
7434 """
7435 GetTextExtent(String string) -> (width, height)
7436
7437 Get the width and height of the text using the current font.
7438 """
54f9ee45 7439 return _core_.Window_GetTextExtent(*args, **kwargs)
e811c8ce
RD
7440
7441 def GetFullTextExtent(*args, **kwargs):
0df68c9f 7442 """
196addbf 7443 GetFullTextExtent(String string, Font font=None) ->
0df68c9f 7444 (width, height, descent, externalLeading)
e811c8ce 7445
15afbcd0
RD
7446 Get the width, height, decent and leading of the text using the
7447 current or specified font.
0df68c9f 7448 """
54f9ee45 7449 return _core_.Window_GetFullTextExtent(*args, **kwargs)
e811c8ce
RD
7450
7451 def ClientToScreenXY(*args, **kwargs):
15afbcd0
RD
7452 """
7453 ClientToScreenXY(int x, int y) -> (x,y)
7454
7455 Converts to screen coordinates from coordinates relative to this window.
7456 """
54f9ee45 7457 return _core_.Window_ClientToScreenXY(*args, **kwargs)
e811c8ce
RD
7458
7459 def ScreenToClientXY(*args, **kwargs):
15afbcd0
RD
7460 """
7461 ScreenToClientXY(int x, int y) -> (x,y)
7462
7463 Converts from screen to client window coordinates.
7464 """
54f9ee45 7465 return _core_.Window_ScreenToClientXY(*args, **kwargs)
e811c8ce
RD
7466
7467 def ClientToScreen(*args, **kwargs):
15afbcd0 7468 """
a95a7133 7469 ClientToScreen(self, Point pt) -> Point
15afbcd0
RD
7470
7471 Converts to screen coordinates from coordinates relative to this window.
7472 """
54f9ee45 7473 return _core_.Window_ClientToScreen(*args, **kwargs)
e811c8ce
RD
7474
7475 def ScreenToClient(*args, **kwargs):
15afbcd0 7476 """
a95a7133 7477 ScreenToClient(self, Point pt) -> Point
15afbcd0
RD
7478
7479 Converts from screen to client window coordinates.
7480 """
54f9ee45 7481 return _core_.Window_ScreenToClient(*args, **kwargs)
e811c8ce
RD
7482
7483 def HitTestXY(*args, **kwargs):
15afbcd0 7484 """
a95a7133 7485 HitTestXY(self, int x, int y) -> int
15afbcd0
RD
7486
7487 Test where the given (in client coords) point lies
7488 """
54f9ee45 7489 return _core_.Window_HitTestXY(*args, **kwargs)
e811c8ce
RD
7490
7491 def HitTest(*args, **kwargs):
15afbcd0 7492 """
a95a7133 7493 HitTest(self, Point pt) -> int
15afbcd0
RD
7494
7495 Test where the given (in client coords) point lies
7496 """
54f9ee45 7497 return _core_.Window_HitTest(*args, **kwargs)
e811c8ce 7498
15afbcd0
RD
7499 def GetBorder(*args):
7500 """
a95a7133
RD
7501 GetBorder(self, long flags) -> int
7502 GetBorder(self) -> int
e811c8ce 7503
15afbcd0
RD
7504 Get border for the flags of this window
7505 """
54f9ee45 7506 return _core_.Window_GetBorder(*args)
e811c8ce
RD
7507
7508 def UpdateWindowUI(*args, **kwargs):
15afbcd0 7509 """
a95a7133 7510 UpdateWindowUI(self, long flags=UPDATE_UI_NONE)
15afbcd0
RD
7511
7512 This function sends EVT_UPDATE_UI events to the window. The particular
7513 implementation depends on the window; for example a wx.ToolBar will
7514 send an update UI event for each toolbar button, and a wx.Frame will
7515 send an update UI event for each menubar menu item. You can call this
7516 function from your application to ensure that your UI is up-to-date at
7517 a particular point in time (as far as your EVT_UPDATE_UI handlers are
7518 concerned). This may be necessary if you have called
7519 wx.UpdateUIEvent.SetMode or wx.UpdateUIEvent.SetUpdateInterval to
7520 limit the overhead that wxWindows incurs by sending update UI events
7521 in idle time.
15afbcd0 7522 """
54f9ee45 7523 return _core_.Window_UpdateWindowUI(*args, **kwargs)
e811c8ce
RD
7524
7525 def PopupMenuXY(*args, **kwargs):
15afbcd0 7526 """
b0503257 7527 PopupMenuXY(self, Menu menu, int x=-1, int y=-1) -> bool
15afbcd0 7528
b0503257
RD
7529 Pops up the given menu at the specified coordinates, relative to this window,
7530 and returns control when the user has dismissed the menu. If a menu item is
7531 selected, the corresponding menu event is generated and will be processed as
7532 usual. If the default position is given then the current position of the
7533 mouse cursor will be used.
15afbcd0 7534 """
54f9ee45 7535 return _core_.Window_PopupMenuXY(*args, **kwargs)
e811c8ce 7536
15afbcd0
RD
7537 def PopupMenu(*args, **kwargs):
7538 """
b0503257 7539 PopupMenu(self, Menu menu, Point pos=DefaultPosition) -> bool
15afbcd0 7540
b0503257
RD
7541 Pops up the given menu at the specified coordinates, relative to this window,
7542 and returns control when the user has dismissed the menu. If a menu item is
7543 selected, the corresponding menu event is generated and will be processed as
7544 usual. If the default position is given then the current position of the
7545 mouse cursor will be used.
15afbcd0 7546 """
54f9ee45 7547 return _core_.Window_PopupMenu(*args, **kwargs)
15afbcd0
RD
7548
7549 def GetHandle(*args, **kwargs):
7550 """
a95a7133 7551 GetHandle(self) -> long
15afbcd0
RD
7552
7553 Returns the platform-specific handle (as a long integer) of the
7554 physical window. Currently on wxMac it returns the handle of the
7555 toplevel parent of the window.
7556 """
54f9ee45 7557 return _core_.Window_GetHandle(*args, **kwargs)
15afbcd0 7558
7e63a440
RD
7559 def AssociateHandle(*args, **kwargs):
7560 """
7561 AssociateHandle(self, long handle)
7562
7563 Associate the window with a new native handle
7564 """
7565 return _core_.Window_AssociateHandle(*args, **kwargs)
7566
7567 def DissociateHandle(*args, **kwargs):
7568 """
7569 DissociateHandle(self)
7570
7571 Dissociate the current native handle from the window
7572 """
7573 return _core_.Window_DissociateHandle(*args, **kwargs)
7574
15afbcd0
RD
7575 def HasScrollbar(*args, **kwargs):
7576 """
a95a7133 7577 HasScrollbar(self, int orient) -> bool
15afbcd0
RD
7578
7579 Does the window have the scrollbar for this orientation?
7580 """
54f9ee45 7581 return _core_.Window_HasScrollbar(*args, **kwargs)
15afbcd0
RD
7582
7583 def SetScrollbar(*args, **kwargs):
7584 """
41e2b43e 7585 SetScrollbar(self, int orientation, int position, int thumbSize, int range,
15afbcd0
RD
7586 bool refresh=True)
7587
7588 Sets the scrollbar properties of a built-in scrollbar.
15afbcd0 7589 """
54f9ee45 7590 return _core_.Window_SetScrollbar(*args, **kwargs)
e811c8ce
RD
7591
7592 def SetScrollPos(*args, **kwargs):
15afbcd0 7593 """
a95a7133 7594 SetScrollPos(self, int orientation, int pos, bool refresh=True)
15afbcd0
RD
7595
7596 Sets the position of one of the built-in scrollbars.
7597 """
54f9ee45 7598 return _core_.Window_SetScrollPos(*args, **kwargs)
e811c8ce
RD
7599
7600 def GetScrollPos(*args, **kwargs):
15afbcd0 7601 """
a95a7133 7602 GetScrollPos(self, int orientation) -> int
15afbcd0
RD
7603
7604 Returns the built-in scrollbar position.
7605 """
54f9ee45 7606 return _core_.Window_GetScrollPos(*args, **kwargs)
e811c8ce
RD
7607
7608 def GetScrollThumb(*args, **kwargs):
15afbcd0 7609 """
a95a7133 7610 GetScrollThumb(self, int orientation) -> int
15afbcd0
RD
7611
7612 Returns the built-in scrollbar thumb size.
7613 """
54f9ee45 7614 return _core_.Window_GetScrollThumb(*args, **kwargs)
e811c8ce
RD
7615
7616 def GetScrollRange(*args, **kwargs):
15afbcd0 7617 """
a95a7133 7618 GetScrollRange(self, int orientation) -> int
15afbcd0
RD
7619
7620 Returns the built-in scrollbar range.
7621 """
54f9ee45 7622 return _core_.Window_GetScrollRange(*args, **kwargs)
e811c8ce
RD
7623
7624 def ScrollWindow(*args, **kwargs):
15afbcd0 7625 """
a95a7133 7626 ScrollWindow(self, int dx, int dy, Rect rect=None)
15afbcd0
RD
7627
7628 Physically scrolls the pixels in the window and move child windows
7629 accordingly. Use this function to optimise your scrolling
7630 implementations, to minimise the area that must be redrawn. Note that
7631 it is rarely required to call this function from a user program.
15afbcd0 7632 """
54f9ee45 7633 return _core_.Window_ScrollWindow(*args, **kwargs)
e811c8ce
RD
7634
7635 def ScrollLines(*args, **kwargs):
15afbcd0 7636 """
a95a7133 7637 ScrollLines(self, int lines) -> bool
15afbcd0
RD
7638
7639 If the platform and window class supports it, scrolls the window by
7640 the given number of lines down, if lines is positive, or up if lines
7641 is negative. Returns True if the window was scrolled, False if it was
7642 already on top/bottom and nothing was done.
7643 """
54f9ee45 7644 return _core_.Window_ScrollLines(*args, **kwargs)
e811c8ce
RD
7645
7646 def ScrollPages(*args, **kwargs):
15afbcd0 7647 """
a95a7133 7648 ScrollPages(self, int pages) -> bool
15afbcd0 7649
41e2b43e 7650 If the platform and window class supports it, scrolls the window by
15afbcd0
RD
7651 the given number of pages down, if pages is positive, or up if pages
7652 is negative. Returns True if the window was scrolled, False if it was
7653 already on top/bottom and nothing was done.
7654 """
54f9ee45 7655 return _core_.Window_ScrollPages(*args, **kwargs)
e811c8ce
RD
7656
7657 def LineUp(*args, **kwargs):
15afbcd0 7658 """
a95a7133 7659 LineUp(self) -> bool
15afbcd0
RD
7660
7661 This is just a wrapper for ScrollLines(-1).
7662 """
54f9ee45 7663 return _core_.Window_LineUp(*args, **kwargs)
e811c8ce
RD
7664
7665 def LineDown(*args, **kwargs):
15afbcd0 7666 """
a95a7133 7667 LineDown(self) -> bool
15afbcd0
RD
7668
7669 This is just a wrapper for ScrollLines(1).
7670 """
54f9ee45 7671 return _core_.Window_LineDown(*args, **kwargs)
e811c8ce
RD
7672
7673 def PageUp(*args, **kwargs):
15afbcd0 7674 """
a95a7133 7675 PageUp(self) -> bool
15afbcd0
RD
7676
7677 This is just a wrapper for ScrollPages(-1).
7678 """
54f9ee45 7679 return _core_.Window_PageUp(*args, **kwargs)
e811c8ce
RD
7680
7681 def PageDown(*args, **kwargs):
15afbcd0 7682 """
a95a7133 7683 PageDown(self) -> bool
15afbcd0
RD
7684
7685 This is just a wrapper for ScrollPages(1).
7686 """
54f9ee45 7687 return _core_.Window_PageDown(*args, **kwargs)
e811c8ce
RD
7688
7689 def SetHelpText(*args, **kwargs):
15afbcd0 7690 """
a95a7133 7691 SetHelpText(self, String text)
15afbcd0
RD
7692
7693 Sets the help text to be used as context-sensitive help for this
7694 window. Note that the text is actually stored by the current
7695 wxHelpProvider implementation, and not in the window object itself.
7696 """
54f9ee45 7697 return _core_.Window_SetHelpText(*args, **kwargs)
e811c8ce
RD
7698
7699 def SetHelpTextForId(*args, **kwargs):
15afbcd0 7700 """
a95a7133 7701 SetHelpTextForId(self, String text)
15afbcd0
RD
7702
7703 Associate this help text with all windows with the same id as this
7704 one.
7705 """
54f9ee45 7706 return _core_.Window_SetHelpTextForId(*args, **kwargs)
e811c8ce
RD
7707
7708 def GetHelpText(*args, **kwargs):
15afbcd0 7709 """
a95a7133 7710 GetHelpText(self) -> String
15afbcd0
RD
7711
7712 Gets the help text to be used as context-sensitive help for this
7713 window. Note that the text is actually stored by the current
7714 wxHelpProvider implementation, and not in the window object itself.
7715 """
54f9ee45 7716 return _core_.Window_GetHelpText(*args, **kwargs)
e811c8ce
RD
7717
7718 def SetToolTipString(*args, **kwargs):
15afbcd0 7719 """
a95a7133 7720 SetToolTipString(self, String tip)
15afbcd0
RD
7721
7722 Attach a tooltip to the window.
7723 """
54f9ee45 7724 return _core_.Window_SetToolTipString(*args, **kwargs)
e811c8ce
RD
7725
7726 def SetToolTip(*args, **kwargs):
15afbcd0 7727 """
a95a7133 7728 SetToolTip(self, ToolTip tip)
15afbcd0
RD
7729
7730 Attach a tooltip to the window.
7731 """
54f9ee45 7732 return _core_.Window_SetToolTip(*args, **kwargs)
e811c8ce
RD
7733
7734 def GetToolTip(*args, **kwargs):
15afbcd0 7735 """
a95a7133 7736 GetToolTip(self) -> ToolTip
15afbcd0
RD
7737
7738 get the associated tooltip or None if none
7739 """
54f9ee45 7740 return _core_.Window_GetToolTip(*args, **kwargs)
e811c8ce
RD
7741
7742 def SetDropTarget(*args, **kwargs):
15afbcd0 7743 """
a95a7133 7744 SetDropTarget(self, DropTarget dropTarget)
15afbcd0
RD
7745
7746 Associates a drop target with this window. If the window already has
7747 a drop target, it is deleted.
7748 """
54f9ee45 7749 return _core_.Window_SetDropTarget(*args, **kwargs)
e811c8ce
RD
7750
7751 def GetDropTarget(*args, **kwargs):
15afbcd0 7752 """
a95a7133 7753 GetDropTarget(self) -> DropTarget
15afbcd0
RD
7754
7755 Returns the associated drop target, which may be None.
7756 """
54f9ee45 7757 return _core_.Window_GetDropTarget(*args, **kwargs)
e811c8ce
RD
7758
7759 def SetConstraints(*args, **kwargs):
15afbcd0 7760 """
a95a7133 7761 SetConstraints(self, LayoutConstraints constraints)
15afbcd0
RD
7762
7763 Sets the window to have the given layout constraints. If an existing
7764 layout constraints object is already owned by the window, it will be
7765 deleted. Pass None to disassociate and delete the window's current
7766 constraints.
7767
7768 You must call SetAutoLayout to tell a window to use the constraints
7769 automatically in its default EVT_SIZE handler; otherwise, you must
7770 handle EVT_SIZE yourself and call Layout() explicitly. When setting
7771 both a wx.LayoutConstraints and a wx.Sizer, only the sizer will have
7772 effect.
7773 """
54f9ee45 7774 return _core_.Window_SetConstraints(*args, **kwargs)
e811c8ce
RD
7775
7776 def GetConstraints(*args, **kwargs):
15afbcd0 7777 """
a95a7133 7778 GetConstraints(self) -> LayoutConstraints
15afbcd0
RD
7779
7780 Returns a pointer to the window's layout constraints, or None if there
7781 are none.
7782 """
54f9ee45 7783 return _core_.Window_GetConstraints(*args, **kwargs)
e811c8ce
RD
7784
7785 def SetAutoLayout(*args, **kwargs):
15afbcd0 7786 """
a95a7133 7787 SetAutoLayout(self, bool autoLayout)
15afbcd0
RD
7788
7789 Determines whether the Layout function will be called automatically
7790 when the window is resized. It is called implicitly by SetSizer but
7791 if you use SetConstraints you should call it manually or otherwise the
7792 window layout won't be correctly updated when its size changes.
7793 """
54f9ee45 7794 return _core_.Window_SetAutoLayout(*args, **kwargs)
e811c8ce
RD
7795
7796 def GetAutoLayout(*args, **kwargs):
15afbcd0 7797 """
a95a7133 7798 GetAutoLayout(self) -> bool
15afbcd0
RD
7799
7800 Returns the current autoLayout setting
7801 """
54f9ee45 7802 return _core_.Window_GetAutoLayout(*args, **kwargs)
e811c8ce
RD
7803
7804 def Layout(*args, **kwargs):
15afbcd0 7805 """
a95a7133 7806 Layout(self) -> bool
15afbcd0
RD
7807
7808 Invokes the constraint-based layout algorithm or the sizer-based
7809 algorithm for this window. See SetAutoLayout: when auto layout is on,
7810 this function gets called automatically by the default EVT_SIZE
7811 handler when the window is resized.
7812 """
54f9ee45 7813 return _core_.Window_Layout(*args, **kwargs)
e811c8ce
RD
7814
7815 def SetSizer(*args, **kwargs):
15afbcd0 7816 """
a95a7133 7817 SetSizer(self, Sizer sizer, bool deleteOld=True)
15afbcd0
RD
7818
7819 Sets the window to have the given layout sizer. The window will then
7820 own the object, and will take care of its deletion. If an existing
7821 layout sizer object is already owned by the window, it will be deleted
7822 if the deleteOld parameter is true. Note that this function will also
7823 call SetAutoLayout implicitly with a True parameter if the sizer is
ae8162c8 7824 non-None, and False otherwise.
15afbcd0 7825 """
54f9ee45 7826 return _core_.Window_SetSizer(*args, **kwargs)
e811c8ce
RD
7827
7828 def SetSizerAndFit(*args, **kwargs):
15afbcd0 7829 """
a95a7133 7830 SetSizerAndFit(self, Sizer sizer, bool deleteOld=True)
15afbcd0
RD
7831
7832 The same as SetSizer, except it also sets the size hints for the
7833 window based on the sizer's minimum size.
7834 """
54f9ee45 7835 return _core_.Window_SetSizerAndFit(*args, **kwargs)
e811c8ce
RD
7836
7837 def GetSizer(*args, **kwargs):
15afbcd0 7838 """
a95a7133 7839 GetSizer(self) -> Sizer
15afbcd0
RD
7840
7841 Return the sizer associated with the window by a previous call to
7842 SetSizer or None if there isn't one.
7843 """
54f9ee45 7844 return _core_.Window_GetSizer(*args, **kwargs)
e811c8ce
RD
7845
7846 def SetContainingSizer(*args, **kwargs):
15afbcd0 7847 """
a95a7133 7848 SetContainingSizer(self, Sizer sizer)
15afbcd0
RD
7849
7850 This normally does not need to be called by application code. It is
7851 called internally when a window is added to a sizer, and is used so
7852 the window can remove itself from the sizer when it is destroyed.
7853 """
54f9ee45 7854 return _core_.Window_SetContainingSizer(*args, **kwargs)
e811c8ce
RD
7855
7856 def GetContainingSizer(*args, **kwargs):
15afbcd0 7857 """
a95a7133 7858 GetContainingSizer(self) -> Sizer
15afbcd0
RD
7859
7860 Return the sizer that this window is a member of, if any, otherwise None.
7861 """
54f9ee45 7862 return _core_.Window_GetContainingSizer(*args, **kwargs)
e811c8ce 7863
a95a7133
RD
7864 def InheritAttributes(*args, **kwargs):
7865 """
7866 InheritAttributes(self)
7867
41e2b43e
RD
7868 This function is (or should be, in case of custom controls) called
7869 during window creation to intelligently set up the window visual
7870 attributes, that is the font and the foreground and background
7871 colours.
7872
7873 By 'intelligently' the following is meant: by default, all windows use
7874 their own default attributes. However if some of the parent's
7875 attributes are explicitly changed (that is, using SetFont and not
fa47d7a7 7876 SetOwnFont) and if the corresponding attribute hadn't been
41e2b43e
RD
7877 explicitly set for this window itself, then this window takes the same
7878 value as used by the parent. In addition, if the window overrides
7879 ShouldInheritColours to return false, the colours will not be changed
7880 no matter what and only the font might.
7881
34621cc5 7882 This rather complicated logic is necessary in order to accommodate the
ec9b55ca 7883 different usage scenarios. The most common one is when all default
41e2b43e
RD
7884 attributes are used and in this case, nothing should be inherited as
7885 in modern GUIs different controls use different fonts (and colours)
7886 than their siblings so they can't inherit the same value from the
7887 parent. However it was also deemed desirable to allow to simply change
7888 the attributes of all children at once by just changing the font or
7889 colour of their common parent, hence in this case we do inherit the
7890 parents attributes.
7891
a95a7133 7892 """
54f9ee45 7893 return _core_.Window_InheritAttributes(*args, **kwargs)
a95a7133
RD
7894
7895 def ShouldInheritColours(*args, **kwargs):
7896 """
7897 ShouldInheritColours(self) -> bool
7898
7899 Return true from here to allow the colours of this window to be
41e2b43e
RD
7900 changed by InheritAttributes, returning false forbids inheriting them
7901 from the parent window.
a95a7133 7902
41e2b43e
RD
7903 The base class version returns false, but this method is overridden in
7904 wxControl where it returns true.
a95a7133 7905 """
54f9ee45 7906 return _core_.Window_ShouldInheritColours(*args, **kwargs)
a95a7133 7907
e811c8ce 7908 def PostCreate(self, pre):
15afbcd0
RD
7909 """
7910 Phase 3 of the 2-phase create <wink!>
7911 Call this method after precreating the window with the 2-phase create method.
7912 """
e811c8ce
RD
7913 self.this = pre.this
7914 self.thisown = pre.thisown
7915 pre.thisown = 0
7916 if hasattr(self, '_setOORInfo'):
7917 self._setOORInfo(self)
7918 if hasattr(self, '_setCallbackInfo'):
7919 self._setCallbackInfo(self, self.__class__)
7920
7921
7922class WindowPtr(Window):
7923 def __init__(self, this):
7924 self.this = this
7925 if not hasattr(self,"thisown"): self.thisown = 0
7926 self.__class__ = Window
54f9ee45 7927_core_.Window_swigregister(WindowPtr)
e811c8ce
RD
7928
7929def PreWindow(*args, **kwargs):
15afbcd0
RD
7930 """
7931 PreWindow() -> Window
7932
7933 Precreate a Window for 2-phase creation.
7934 """
54f9ee45 7935 val = _core_.new_PreWindow(*args, **kwargs)
e811c8ce
RD
7936 val.thisown = 1
7937 return val
7938
7939def Window_NewControlId(*args, **kwargs):
15afbcd0
RD
7940 """
7941 Window_NewControlId() -> int
7942
7943 Generate a control id for the controls which were not given one.
7944 """
54f9ee45 7945 return _core_.Window_NewControlId(*args, **kwargs)
e811c8ce
RD
7946
7947def Window_NextControlId(*args, **kwargs):
15afbcd0
RD
7948 """
7949 Window_NextControlId(int winid) -> int
7950
7951 Get the id of the control following the one with the given
41e2b43e 7952 autogenerated) id
15afbcd0 7953 """
54f9ee45 7954 return _core_.Window_NextControlId(*args, **kwargs)
e811c8ce
RD
7955
7956def Window_PrevControlId(*args, **kwargs):
15afbcd0
RD
7957 """
7958 Window_PrevControlId(int winid) -> int
7959
7960 Get the id of the control preceding the one with the given
41e2b43e 7961 autogenerated) id
15afbcd0 7962 """
54f9ee45 7963 return _core_.Window_PrevControlId(*args, **kwargs)
e811c8ce
RD
7964
7965def Window_FindFocus(*args, **kwargs):
15afbcd0
RD
7966 """
7967 Window_FindFocus() -> Window
7968
7969 Returns the window or control that currently has the keyboard focus,
7970 or None.
7971 """
54f9ee45 7972 return _core_.Window_FindFocus(*args, **kwargs)
e811c8ce
RD
7973
7974def Window_GetCapture(*args, **kwargs):
15afbcd0
RD
7975 """
7976 Window_GetCapture() -> Window
7977
7978 Returns the window which currently captures the mouse or None
7979 """
54f9ee45 7980 return _core_.Window_GetCapture(*args, **kwargs)
e811c8ce 7981
74a57fcd
RD
7982def Window_GetClassDefaultAttributes(*args, **kwargs):
7983 """
7984 Window_GetClassDefaultAttributes(int variant=WINDOW_VARIANT_NORMAL) -> VisualAttributes
7985
41e2b43e
RD
7986 Get the default attributes for this class. This is useful if you want
7987 to use the same font or colour in your own control as in a standard
7988 control -- which is a much better idea than hard coding specific
db3e571a
RD
7989 colours or fonts which might look completely out of place on the
7990 user's system, especially if it uses themes.
74a57fcd
RD
7991
7992 The variant parameter is only relevant under Mac currently and is
41e2b43e 7993 ignore under other platforms. Under Mac, it will change the size of
db3e571a
RD
7994 the returned font. See `wx.Window.SetWindowVariant` for more about
7995 this.
74a57fcd 7996 """
54f9ee45 7997 return _core_.Window_GetClassDefaultAttributes(*args, **kwargs)
74a57fcd 7998
e811c8ce 7999def DLG_PNT(win, point_or_x, y=None):
15afbcd0
RD
8000 """
8001 Convenience function for converting a Point or (x,y) in
8002 dialog units to pixel units.
8003 """
e811c8ce
RD
8004 if y is None:
8005 return win.ConvertDialogPointToPixels(point_or_x)
8006 else:
fd3f2efe 8007 return win.ConvertDialogPointToPixels(wx.Point(point_or_x, y))
e811c8ce
RD
8008
8009def DLG_SZE(win, size_width, height=None):
15afbcd0
RD
8010 """
8011 Convenience function for converting a Size or (w,h) in
8012 dialog units to pixel units.
8013 """
e811c8ce
RD
8014 if height is None:
8015 return win.ConvertDialogSizeToPixels(size_width)
8016 else:
fd3f2efe 8017 return win.ConvertDialogSizeToPixels(wx.Size(size_width, height))
e811c8ce
RD
8018
8019
8020def FindWindowById(*args, **kwargs):
15afbcd0
RD
8021 """
8022 FindWindowById(long id, Window parent=None) -> Window
8023
8024 Find the first window in the application with the given id. If parent
8025 is None, the search will start from all top-level frames and dialog
8026 boxes; if non-None, the search will be limited to the given window
8027 hierarchy. The search is recursive in both cases.
8028 """
54f9ee45 8029 return _core_.FindWindowById(*args, **kwargs)
e811c8ce
RD
8030
8031def FindWindowByName(*args, **kwargs):
15afbcd0
RD
8032 """
8033 FindWindowByName(String name, Window parent=None) -> Window
8034
8035 Find a window by its name (as given in a window constructor or Create
8036 function call). If parent is None, the search will start from all
8037 top-level frames and dialog boxes; if non-None, the search will be
8038 limited to the given window hierarchy. The search is recursive in both
8039 cases.
8040
8041 If no window with such name is found, wx.FindWindowByLabel is called.
8042 """
54f9ee45 8043 return _core_.FindWindowByName(*args, **kwargs)
e811c8ce
RD
8044
8045def FindWindowByLabel(*args, **kwargs):
15afbcd0
RD
8046 """
8047 FindWindowByLabel(String label, Window parent=None) -> Window
8048
8049 Find a window by its label. Depending on the type of window, the label
8050 may be a window title or panel item label. If parent is None, the
8051 search will start from all top-level frames and dialog boxes; if
8052 non-None, the search will be limited to the given window
8053 hierarchy. The search is recursive in both cases.
8054 """
54f9ee45 8055 return _core_.FindWindowByLabel(*args, **kwargs)
e811c8ce
RD
8056
8057def Window_FromHWND(*args, **kwargs):
4276dc52 8058 """Window_FromHWND(Window parent, unsigned long _hWnd) -> Window"""
54f9ee45 8059 return _core_.Window_FromHWND(*args, **kwargs)
e811c8ce
RD
8060#---------------------------------------------------------------------------
8061
8062class Validator(EvtHandler):
093d3ff1 8063 """Proxy of C++ Validator class"""
e811c8ce
RD
8064 def __repr__(self):
8065 return "<%s.%s; proxy of C++ wxValidator instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
8066 def __init__(self, *args, **kwargs):
a95a7133 8067 """__init__(self) -> Validator"""
54f9ee45 8068 newobj = _core_.new_Validator(*args, **kwargs)
d14a1e28
RD
8069 self.this = newobj.this
8070 self.thisown = 1
8071 del newobj.thisown
8072 self._setOORInfo(self)
e811c8ce
RD
8073
8074 def Clone(*args, **kwargs):
a95a7133 8075 """Clone(self) -> Validator"""
54f9ee45 8076 return _core_.Validator_Clone(*args, **kwargs)
e811c8ce
RD
8077
8078 def Validate(*args, **kwargs):
a95a7133 8079 """Validate(self, Window parent) -> bool"""
54f9ee45 8080 return _core_.Validator_Validate(*args, **kwargs)
e811c8ce
RD
8081
8082 def TransferToWindow(*args, **kwargs):
a95a7133 8083 """TransferToWindow(self) -> bool"""
54f9ee45 8084 return _core_.Validator_TransferToWindow(*args, **kwargs)
e811c8ce
RD
8085
8086 def TransferFromWindow(*args, **kwargs):
a95a7133 8087 """TransferFromWindow(self) -> bool"""
54f9ee45 8088 return _core_.Validator_TransferFromWindow(*args, **kwargs)
e811c8ce
RD
8089
8090 def GetWindow(*args, **kwargs):
a95a7133 8091 """GetWindow(self) -> Window"""
54f9ee45 8092 return _core_.Validator_GetWindow(*args, **kwargs)
e811c8ce
RD
8093
8094 def SetWindow(*args, **kwargs):
a95a7133 8095 """SetWindow(self, Window window)"""
54f9ee45 8096 return _core_.Validator_SetWindow(*args, **kwargs)
e811c8ce
RD
8097
8098 def IsSilent(*args, **kwargs):
66c033b4 8099 """IsSilent() -> bool"""
54f9ee45 8100 return _core_.Validator_IsSilent(*args, **kwargs)
e811c8ce
RD
8101
8102 IsSilent = staticmethod(IsSilent)
8103 def SetBellOnError(*args, **kwargs):
66c033b4 8104 """SetBellOnError(int doIt=True)"""
54f9ee45 8105 return _core_.Validator_SetBellOnError(*args, **kwargs)
e811c8ce
RD
8106
8107 SetBellOnError = staticmethod(SetBellOnError)
8108
8109class ValidatorPtr(Validator):
8110 def __init__(self, this):
8111 self.this = this
8112 if not hasattr(self,"thisown"): self.thisown = 0
8113 self.__class__ = Validator
54f9ee45 8114_core_.Validator_swigregister(ValidatorPtr)
e811c8ce
RD
8115
8116def Validator_IsSilent(*args, **kwargs):
8117 """Validator_IsSilent() -> bool"""
54f9ee45 8118 return _core_.Validator_IsSilent(*args, **kwargs)
e811c8ce
RD
8119
8120def Validator_SetBellOnError(*args, **kwargs):
8121 """Validator_SetBellOnError(int doIt=True)"""
54f9ee45 8122 return _core_.Validator_SetBellOnError(*args, **kwargs)
e811c8ce
RD
8123
8124class PyValidator(Validator):
093d3ff1 8125 """Proxy of C++ PyValidator class"""
e811c8ce
RD
8126 def __repr__(self):
8127 return "<%s.%s; proxy of C++ wxPyValidator instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
8128 def __init__(self, *args, **kwargs):
a95a7133 8129 """__init__(self) -> PyValidator"""
54f9ee45 8130 newobj = _core_.new_PyValidator(*args, **kwargs)
e811c8ce
RD
8131 self.this = newobj.this
8132 self.thisown = 1
8133 del newobj.thisown
8134
8135 self._setCallbackInfo(self, PyValidator, 1)
8136 self._setOORInfo(self)
8137
8138 def _setCallbackInfo(*args, **kwargs):
a95a7133 8139 """_setCallbackInfo(self, PyObject self, PyObject _class, int incref=True)"""
54f9ee45 8140 return _core_.PyValidator__setCallbackInfo(*args, **kwargs)
e811c8ce
RD
8141
8142
8143class PyValidatorPtr(PyValidator):
8144 def __init__(self, this):
8145 self.this = this
8146 if not hasattr(self,"thisown"): self.thisown = 0
8147 self.__class__ = PyValidator
54f9ee45 8148_core_.PyValidator_swigregister(PyValidatorPtr)
e811c8ce
RD
8149
8150#---------------------------------------------------------------------------
8151
8152class Menu(EvtHandler):
093d3ff1 8153 """Proxy of C++ Menu class"""
d14a1e28
RD
8154 def __repr__(self):
8155 return "<%s.%s; proxy of C++ wxMenu instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
e811c8ce 8156 def __init__(self, *args, **kwargs):
a95a7133 8157 """__init__(self, String title=EmptyString, long style=0) -> Menu"""
54f9ee45 8158 newobj = _core_.new_Menu(*args, **kwargs)
e811c8ce
RD
8159 self.this = newobj.this
8160 self.thisown = 1
8161 del newobj.thisown
8162 self._setOORInfo(self)
8163
8164 def Append(*args, **kwargs):
a95a7133 8165 """Append(self, int id, String text, String help=EmptyString, int kind=ITEM_NORMAL) -> MenuItem"""
54f9ee45 8166 return _core_.Menu_Append(*args, **kwargs)
e811c8ce
RD
8167
8168 def AppendSeparator(*args, **kwargs):
a95a7133 8169 """AppendSeparator(self) -> MenuItem"""
54f9ee45 8170 return _core_.Menu_AppendSeparator(*args, **kwargs)
e811c8ce
RD
8171
8172 def AppendCheckItem(*args, **kwargs):
a95a7133 8173 """AppendCheckItem(self, int id, String text, String help=EmptyString) -> MenuItem"""
54f9ee45 8174 return _core_.Menu_AppendCheckItem(*args, **kwargs)
e811c8ce
RD
8175
8176 def AppendRadioItem(*args, **kwargs):
a95a7133 8177 """AppendRadioItem(self, int id, String text, String help=EmptyString) -> MenuItem"""
54f9ee45 8178 return _core_.Menu_AppendRadioItem(*args, **kwargs)
e811c8ce
RD
8179
8180 def AppendMenu(*args, **kwargs):
a95a7133 8181 """AppendMenu(self, int id, String text, Menu submenu, String help=EmptyString) -> MenuItem"""
54f9ee45 8182 return _core_.Menu_AppendMenu(*args, **kwargs)
e811c8ce
RD
8183
8184 def AppendItem(*args, **kwargs):
a95a7133 8185 """AppendItem(self, MenuItem item) -> MenuItem"""
54f9ee45 8186 return _core_.Menu_AppendItem(*args, **kwargs)
e811c8ce
RD
8187
8188 def Break(*args, **kwargs):
a95a7133 8189 """Break(self)"""
54f9ee45 8190 return _core_.Menu_Break(*args, **kwargs)
e811c8ce
RD
8191
8192 def InsertItem(*args, **kwargs):
a95a7133 8193 """InsertItem(self, size_t pos, MenuItem item) -> MenuItem"""
54f9ee45 8194 return _core_.Menu_InsertItem(*args, **kwargs)
e811c8ce
RD
8195
8196 def Insert(*args, **kwargs):
0df68c9f 8197 """
a95a7133 8198 Insert(self, size_t pos, int id, String text, String help=EmptyString,
a41e16b6 8199 int kind=ITEM_NORMAL) -> MenuItem
0df68c9f 8200 """
54f9ee45 8201 return _core_.Menu_Insert(*args, **kwargs)
e811c8ce
RD
8202
8203 def InsertSeparator(*args, **kwargs):
a95a7133 8204 """InsertSeparator(self, size_t pos) -> MenuItem"""
54f9ee45 8205 return _core_.Menu_InsertSeparator(*args, **kwargs)
e811c8ce
RD
8206
8207 def InsertCheckItem(*args, **kwargs):
a95a7133 8208 """InsertCheckItem(self, size_t pos, int id, String text, String help=EmptyString) -> MenuItem"""
54f9ee45 8209 return _core_.Menu_InsertCheckItem(*args, **kwargs)
e811c8ce
RD
8210
8211 def InsertRadioItem(*args, **kwargs):
a95a7133 8212 """InsertRadioItem(self, size_t pos, int id, String text, String help=EmptyString) -> MenuItem"""
54f9ee45 8213 return _core_.Menu_InsertRadioItem(*args, **kwargs)
e811c8ce
RD
8214
8215 def InsertMenu(*args, **kwargs):
a95a7133 8216 """InsertMenu(self, size_t pos, int id, String text, Menu submenu, String help=EmptyString) -> MenuItem"""
54f9ee45 8217 return _core_.Menu_InsertMenu(*args, **kwargs)
e811c8ce
RD
8218
8219 def PrependItem(*args, **kwargs):
a95a7133 8220 """PrependItem(self, MenuItem item) -> MenuItem"""
54f9ee45 8221 return _core_.Menu_PrependItem(*args, **kwargs)
e811c8ce
RD
8222
8223 def Prepend(*args, **kwargs):
a95a7133 8224 """Prepend(self, int id, String text, String help=EmptyString, int kind=ITEM_NORMAL) -> MenuItem"""
54f9ee45 8225 return _core_.Menu_Prepend(*args, **kwargs)
e811c8ce
RD
8226
8227 def PrependSeparator(*args, **kwargs):
a95a7133 8228 """PrependSeparator(self) -> MenuItem"""
54f9ee45 8229 return _core_.Menu_PrependSeparator(*args, **kwargs)
e811c8ce
RD
8230
8231 def PrependCheckItem(*args, **kwargs):
a95a7133 8232 """PrependCheckItem(self, int id, String text, String help=EmptyString) -> MenuItem"""
54f9ee45 8233 return _core_.Menu_PrependCheckItem(*args, **kwargs)
e811c8ce
RD
8234
8235 def PrependRadioItem(*args, **kwargs):
a95a7133 8236 """PrependRadioItem(self, int id, String text, String help=EmptyString) -> MenuItem"""
54f9ee45 8237 return _core_.Menu_PrependRadioItem(*args, **kwargs)
e811c8ce
RD
8238
8239 def PrependMenu(*args, **kwargs):
a95a7133 8240 """PrependMenu(self, int id, String text, Menu submenu, String help=EmptyString) -> MenuItem"""
54f9ee45 8241 return _core_.Menu_PrependMenu(*args, **kwargs)
e811c8ce
RD
8242
8243 def Remove(*args, **kwargs):
a95a7133 8244 """Remove(self, int id) -> MenuItem"""
54f9ee45 8245 return _core_.Menu_Remove(*args, **kwargs)
e811c8ce
RD
8246
8247 def RemoveItem(*args, **kwargs):
a95a7133 8248 """RemoveItem(self, MenuItem item) -> MenuItem"""
54f9ee45 8249 return _core_.Menu_RemoveItem(*args, **kwargs)
e811c8ce
RD
8250
8251 def Delete(*args, **kwargs):
a95a7133 8252 """Delete(self, int id) -> bool"""
54f9ee45 8253 return _core_.Menu_Delete(*args, **kwargs)
e811c8ce
RD
8254
8255 def DeleteItem(*args, **kwargs):
a95a7133 8256 """DeleteItem(self, MenuItem item) -> bool"""
54f9ee45 8257 return _core_.Menu_DeleteItem(*args, **kwargs)
e811c8ce
RD
8258
8259 def Destroy(*args, **kwargs):
0df68c9f 8260 """
a95a7133 8261 Destroy(self)
e811c8ce 8262
0df68c9f
RD
8263 Deletes the C++ object this Python object is a proxy for.
8264 """
54f9ee45 8265 return _core_.Menu_Destroy(*args, **kwargs)
e811c8ce
RD
8266
8267 def DestroyId(*args, **kwargs):
0df68c9f 8268 """
a95a7133 8269 DestroyId(self, int id) -> bool
e811c8ce 8270
0df68c9f
RD
8271 Deletes the C++ object this Python object is a proxy for.
8272 """
54f9ee45 8273 return _core_.Menu_DestroyId(*args, **kwargs)
e811c8ce
RD
8274
8275 def DestroyItem(*args, **kwargs):
0df68c9f 8276 """
a95a7133 8277 DestroyItem(self, MenuItem item) -> bool
e811c8ce 8278
0df68c9f
RD
8279 Deletes the C++ object this Python object is a proxy for.
8280 """
54f9ee45 8281 return _core_.Menu_DestroyItem(*args, **kwargs)
e811c8ce
RD
8282
8283 def GetMenuItemCount(*args, **kwargs):
a95a7133 8284 """GetMenuItemCount(self) -> size_t"""
54f9ee45 8285 return _core_.Menu_GetMenuItemCount(*args, **kwargs)
e811c8ce
RD
8286
8287 def GetMenuItems(*args, **kwargs):
a95a7133 8288 """GetMenuItems(self) -> PyObject"""
54f9ee45 8289 return _core_.Menu_GetMenuItems(*args, **kwargs)
e811c8ce
RD
8290
8291 def FindItem(*args, **kwargs):
a95a7133 8292 """FindItem(self, String item) -> int"""
54f9ee45 8293 return _core_.Menu_FindItem(*args, **kwargs)
e811c8ce
RD
8294
8295 def FindItemById(*args, **kwargs):
a95a7133 8296 """FindItemById(self, int id) -> MenuItem"""
54f9ee45 8297 return _core_.Menu_FindItemById(*args, **kwargs)
e811c8ce
RD
8298
8299 def FindItemByPosition(*args, **kwargs):
a95a7133 8300 """FindItemByPosition(self, size_t position) -> MenuItem"""
54f9ee45 8301 return _core_.Menu_FindItemByPosition(*args, **kwargs)
e811c8ce
RD
8302
8303 def Enable(*args, **kwargs):
a95a7133 8304 """Enable(self, int id, bool enable)"""
54f9ee45 8305 return _core_.Menu_Enable(*args, **kwargs)
e811c8ce
RD
8306
8307 def IsEnabled(*args, **kwargs):
a95a7133 8308 """IsEnabled(self, int id) -> bool"""
54f9ee45 8309 return _core_.Menu_IsEnabled(*args, **kwargs)
e811c8ce
RD
8310
8311 def Check(*args, **kwargs):
a95a7133 8312 """Check(self, int id, bool check)"""
54f9ee45 8313 return _core_.Menu_Check(*args, **kwargs)
e811c8ce
RD
8314
8315 def IsChecked(*args, **kwargs):
a95a7133 8316 """IsChecked(self, int id) -> bool"""
54f9ee45 8317 return _core_.Menu_IsChecked(*args, **kwargs)
e811c8ce
RD
8318
8319 def SetLabel(*args, **kwargs):
a95a7133 8320 """SetLabel(self, int id, String label)"""
54f9ee45 8321 return _core_.Menu_SetLabel(*args, **kwargs)
e811c8ce
RD
8322
8323 def GetLabel(*args, **kwargs):
a95a7133 8324 """GetLabel(self, int id) -> String"""
54f9ee45 8325 return _core_.Menu_GetLabel(*args, **kwargs)
e811c8ce
RD
8326
8327 def SetHelpString(*args, **kwargs):
a95a7133 8328 """SetHelpString(self, int id, String helpString)"""
54f9ee45 8329 return _core_.Menu_SetHelpString(*args, **kwargs)
e811c8ce
RD
8330
8331 def GetHelpString(*args, **kwargs):
a95a7133 8332 """GetHelpString(self, int id) -> String"""
54f9ee45 8333 return _core_.Menu_GetHelpString(*args, **kwargs)
e811c8ce
RD
8334
8335 def SetTitle(*args, **kwargs):
a95a7133 8336 """SetTitle(self, String title)"""
54f9ee45 8337 return _core_.Menu_SetTitle(*args, **kwargs)
e811c8ce
RD
8338
8339 def GetTitle(*args, **kwargs):
a95a7133 8340 """GetTitle(self) -> String"""
54f9ee45 8341 return _core_.Menu_GetTitle(*args, **kwargs)
e811c8ce
RD
8342
8343 def SetEventHandler(*args, **kwargs):
a95a7133 8344 """SetEventHandler(self, EvtHandler handler)"""
54f9ee45 8345 return _core_.Menu_SetEventHandler(*args, **kwargs)
e811c8ce
RD
8346
8347 def GetEventHandler(*args, **kwargs):
a95a7133 8348 """GetEventHandler(self) -> EvtHandler"""
54f9ee45 8349 return _core_.Menu_GetEventHandler(*args, **kwargs)
e811c8ce
RD
8350
8351 def SetInvokingWindow(*args, **kwargs):
a95a7133 8352 """SetInvokingWindow(self, Window win)"""
54f9ee45 8353 return _core_.Menu_SetInvokingWindow(*args, **kwargs)
e811c8ce
RD
8354
8355 def GetInvokingWindow(*args, **kwargs):
a95a7133 8356 """GetInvokingWindow(self) -> Window"""
54f9ee45 8357 return _core_.Menu_GetInvokingWindow(*args, **kwargs)
e811c8ce
RD
8358
8359 def GetStyle(*args, **kwargs):
a95a7133 8360 """GetStyle(self) -> long"""
54f9ee45 8361 return _core_.Menu_GetStyle(*args, **kwargs)
e811c8ce
RD
8362
8363 def UpdateUI(*args, **kwargs):
a95a7133 8364 """UpdateUI(self, EvtHandler source=None)"""
54f9ee45 8365 return _core_.Menu_UpdateUI(*args, **kwargs)
e811c8ce
RD
8366
8367 def GetMenuBar(*args, **kwargs):
a95a7133 8368 """GetMenuBar(self) -> MenuBar"""
54f9ee45 8369 return _core_.Menu_GetMenuBar(*args, **kwargs)
e811c8ce
RD
8370
8371 def Attach(*args, **kwargs):
a95a7133 8372 """Attach(self, wxMenuBarBase menubar)"""
54f9ee45 8373 return _core_.Menu_Attach(*args, **kwargs)
e811c8ce
RD
8374
8375 def Detach(*args, **kwargs):
a95a7133 8376 """Detach(self)"""
54f9ee45 8377 return _core_.Menu_Detach(*args, **kwargs)
e811c8ce
RD
8378
8379 def IsAttached(*args, **kwargs):
a95a7133 8380 """IsAttached(self) -> bool"""
54f9ee45 8381 return _core_.Menu_IsAttached(*args, **kwargs)
e811c8ce
RD
8382
8383 def SetParent(*args, **kwargs):
a95a7133 8384 """SetParent(self, Menu parent)"""
54f9ee45 8385 return _core_.Menu_SetParent(*args, **kwargs)
e811c8ce
RD
8386
8387 def GetParent(*args, **kwargs):
a95a7133 8388 """GetParent(self) -> Menu"""
54f9ee45 8389 return _core_.Menu_GetParent(*args, **kwargs)
e811c8ce 8390
d14a1e28
RD
8391
8392class MenuPtr(Menu):
8393 def __init__(self, this):
8394 self.this = this
8395 if not hasattr(self,"thisown"): self.thisown = 0
8396 self.__class__ = Menu
54f9ee45 8397_core_.Menu_swigregister(MenuPtr)
d14a1e28
RD
8398DefaultValidator = cvar.DefaultValidator
8399
8400#---------------------------------------------------------------------------
8401
8402class MenuBar(Window):
093d3ff1 8403 """Proxy of C++ MenuBar class"""
e811c8ce
RD
8404 def __repr__(self):
8405 return "<%s.%s; proxy of C++ wxMenuBar instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 8406 def __init__(self, *args, **kwargs):
a95a7133 8407 """__init__(self, long style=0) -> MenuBar"""
54f9ee45 8408 newobj = _core_.new_MenuBar(*args, **kwargs)
d14a1e28
RD
8409 self.this = newobj.this
8410 self.thisown = 1
8411 del newobj.thisown
8412 self._setOORInfo(self)
e811c8ce
RD
8413
8414 def Append(*args, **kwargs):
a95a7133 8415 """Append(self, Menu menu, String title) -> bool"""
54f9ee45 8416 return _core_.MenuBar_Append(*args, **kwargs)
e811c8ce
RD
8417
8418 def Insert(*args, **kwargs):
a95a7133 8419 """Insert(self, size_t pos, Menu menu, String title) -> bool"""
54f9ee45 8420 return _core_.MenuBar_Insert(*args, **kwargs)
e811c8ce
RD
8421
8422 def GetMenuCount(*args, **kwargs):
a95a7133 8423 """GetMenuCount(self) -> size_t"""
54f9ee45 8424 return _core_.MenuBar_GetMenuCount(*args, **kwargs)
e811c8ce
RD
8425
8426 def GetMenu(*args, **kwargs):
a95a7133 8427 """GetMenu(self, size_t pos) -> Menu"""
54f9ee45 8428 return _core_.MenuBar_GetMenu(*args, **kwargs)
e811c8ce
RD
8429
8430 def Replace(*args, **kwargs):
a95a7133 8431 """Replace(self, size_t pos, Menu menu, String title) -> Menu"""
54f9ee45 8432 return _core_.MenuBar_Replace(*args, **kwargs)
e811c8ce
RD
8433
8434 def Remove(*args, **kwargs):
a95a7133 8435 """Remove(self, size_t pos) -> Menu"""
54f9ee45 8436 return _core_.MenuBar_Remove(*args, **kwargs)
e811c8ce
RD
8437
8438 def EnableTop(*args, **kwargs):
a95a7133 8439 """EnableTop(self, size_t pos, bool enable)"""
54f9ee45 8440 return _core_.MenuBar_EnableTop(*args, **kwargs)
e811c8ce
RD
8441
8442 def IsEnabledTop(*args, **kwargs):
a95a7133 8443 """IsEnabledTop(self, size_t pos) -> bool"""
54f9ee45 8444 return _core_.MenuBar_IsEnabledTop(*args, **kwargs)
e811c8ce
RD
8445
8446 def SetLabelTop(*args, **kwargs):
a95a7133 8447 """SetLabelTop(self, size_t pos, String label)"""
54f9ee45 8448 return _core_.MenuBar_SetLabelTop(*args, **kwargs)
e811c8ce
RD
8449
8450 def GetLabelTop(*args, **kwargs):
a95a7133 8451 """GetLabelTop(self, size_t pos) -> String"""
54f9ee45 8452 return _core_.MenuBar_GetLabelTop(*args, **kwargs)
e811c8ce
RD
8453
8454 def FindMenuItem(*args, **kwargs):
a95a7133 8455 """FindMenuItem(self, String menu, String item) -> int"""
54f9ee45 8456 return _core_.MenuBar_FindMenuItem(*args, **kwargs)
e811c8ce
RD
8457
8458 def FindItemById(*args, **kwargs):
a95a7133 8459 """FindItemById(self, int id) -> MenuItem"""
54f9ee45 8460 return _core_.MenuBar_FindItemById(*args, **kwargs)
e811c8ce
RD
8461
8462 def FindMenu(*args, **kwargs):
a95a7133 8463 """FindMenu(self, String title) -> int"""
54f9ee45 8464 return _core_.MenuBar_FindMenu(*args, **kwargs)
e811c8ce
RD
8465
8466 def Enable(*args, **kwargs):
a95a7133 8467 """Enable(self, int id, bool enable)"""
54f9ee45 8468 return _core_.MenuBar_Enable(*args, **kwargs)
e811c8ce
RD
8469
8470 def Check(*args, **kwargs):
a95a7133 8471 """Check(self, int id, bool check)"""
54f9ee45 8472 return _core_.MenuBar_Check(*args, **kwargs)
e811c8ce
RD
8473
8474 def IsChecked(*args, **kwargs):
a95a7133 8475 """IsChecked(self, int id) -> bool"""
54f9ee45 8476 return _core_.MenuBar_IsChecked(*args, **kwargs)
e811c8ce
RD
8477
8478 def IsEnabled(*args, **kwargs):
a95a7133 8479 """IsEnabled(self, int id) -> bool"""
54f9ee45 8480 return _core_.MenuBar_IsEnabled(*args, **kwargs)
e811c8ce
RD
8481
8482 def SetLabel(*args, **kwargs):
a95a7133 8483 """SetLabel(self, int id, String label)"""
54f9ee45 8484 return _core_.MenuBar_SetLabel(*args, **kwargs)
e811c8ce
RD
8485
8486 def GetLabel(*args, **kwargs):
a95a7133 8487 """GetLabel(self, int id) -> String"""
54f9ee45 8488 return _core_.MenuBar_GetLabel(*args, **kwargs)
e811c8ce
RD
8489
8490 def SetHelpString(*args, **kwargs):
a95a7133 8491 """SetHelpString(self, int id, String helpString)"""
54f9ee45 8492 return _core_.MenuBar_SetHelpString(*args, **kwargs)
e811c8ce
RD
8493
8494 def GetHelpString(*args, **kwargs):
a95a7133 8495 """GetHelpString(self, int id) -> String"""
54f9ee45 8496 return _core_.MenuBar_GetHelpString(*args, **kwargs)
e811c8ce
RD
8497
8498 def GetFrame(*args, **kwargs):
a95a7133 8499 """GetFrame(self) -> wxFrame"""
54f9ee45 8500 return _core_.MenuBar_GetFrame(*args, **kwargs)
e811c8ce
RD
8501
8502 def IsAttached(*args, **kwargs):
a95a7133 8503 """IsAttached(self) -> bool"""
54f9ee45 8504 return _core_.MenuBar_IsAttached(*args, **kwargs)
e811c8ce
RD
8505
8506 def Attach(*args, **kwargs):
a95a7133 8507 """Attach(self, wxFrame frame)"""
54f9ee45 8508 return _core_.MenuBar_Attach(*args, **kwargs)
e811c8ce
RD
8509
8510 def Detach(*args, **kwargs):
a95a7133 8511 """Detach(self)"""
54f9ee45 8512 return _core_.MenuBar_Detach(*args, **kwargs)
e811c8ce 8513
d14a1e28
RD
8514
8515class MenuBarPtr(MenuBar):
8516 def __init__(self, this):
8517 self.this = this
8518 if not hasattr(self,"thisown"): self.thisown = 0
8519 self.__class__ = MenuBar
54f9ee45 8520_core_.MenuBar_swigregister(MenuBarPtr)
d14a1e28
RD
8521
8522#---------------------------------------------------------------------------
8523
8524class MenuItem(Object):
093d3ff1 8525 """Proxy of C++ MenuItem class"""
e811c8ce
RD
8526 def __repr__(self):
8527 return "<%s.%s; proxy of C++ wxMenuItem instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 8528 def __init__(self, *args, **kwargs):
0df68c9f 8529 """
a95a7133 8530 __init__(self, Menu parentMenu=None, int id=ID_ANY, String text=EmptyString,
196addbf
RD
8531 String help=EmptyString, int kind=ITEM_NORMAL,
8532 Menu subMenu=None) -> MenuItem
0df68c9f 8533 """
54f9ee45 8534 newobj = _core_.new_MenuItem(*args, **kwargs)
d14a1e28
RD
8535 self.this = newobj.this
8536 self.thisown = 1
8537 del newobj.thisown
e811c8ce 8538 def GetMenu(*args, **kwargs):
a95a7133 8539 """GetMenu(self) -> Menu"""
54f9ee45 8540 return _core_.MenuItem_GetMenu(*args, **kwargs)
e811c8ce
RD
8541
8542 def SetMenu(*args, **kwargs):
a95a7133 8543 """SetMenu(self, Menu menu)"""
54f9ee45 8544 return _core_.MenuItem_SetMenu(*args, **kwargs)
e811c8ce
RD
8545
8546 def SetId(*args, **kwargs):
a95a7133 8547 """SetId(self, int id)"""
54f9ee45 8548 return _core_.MenuItem_SetId(*args, **kwargs)
e811c8ce
RD
8549
8550 def GetId(*args, **kwargs):
a95a7133 8551 """GetId(self) -> int"""
54f9ee45 8552 return _core_.MenuItem_GetId(*args, **kwargs)
e811c8ce
RD
8553
8554 def IsSeparator(*args, **kwargs):
a95a7133 8555 """IsSeparator(self) -> bool"""
54f9ee45 8556 return _core_.MenuItem_IsSeparator(*args, **kwargs)
e811c8ce
RD
8557
8558 def SetText(*args, **kwargs):
a95a7133 8559 """SetText(self, String str)"""
54f9ee45 8560 return _core_.MenuItem_SetText(*args, **kwargs)
e811c8ce
RD
8561
8562 def GetLabel(*args, **kwargs):
a95a7133 8563 """GetLabel(self) -> String"""
54f9ee45 8564 return _core_.MenuItem_GetLabel(*args, **kwargs)
e811c8ce
RD
8565
8566 def GetText(*args, **kwargs):
a95a7133 8567 """GetText(self) -> String"""
54f9ee45 8568 return _core_.MenuItem_GetText(*args, **kwargs)
e811c8ce
RD
8569
8570 def GetLabelFromText(*args, **kwargs):
66c033b4 8571 """GetLabelFromText(String text) -> String"""
54f9ee45 8572 return _core_.MenuItem_GetLabelFromText(*args, **kwargs)
e811c8ce
RD
8573
8574 GetLabelFromText = staticmethod(GetLabelFromText)
8575 def GetKind(*args, **kwargs):
a95a7133 8576 """GetKind(self) -> int"""
54f9ee45 8577 return _core_.MenuItem_GetKind(*args, **kwargs)
e811c8ce 8578
a95a7133
RD
8579 def SetKind(*args, **kwargs):
8580 """SetKind(self, int kind)"""
54f9ee45 8581 return _core_.MenuItem_SetKind(*args, **kwargs)
a95a7133 8582
e811c8ce 8583 def SetCheckable(*args, **kwargs):
a95a7133 8584 """SetCheckable(self, bool checkable)"""
54f9ee45 8585 return _core_.MenuItem_SetCheckable(*args, **kwargs)
e811c8ce
RD
8586
8587 def IsCheckable(*args, **kwargs):
a95a7133 8588 """IsCheckable(self) -> bool"""
54f9ee45 8589 return _core_.MenuItem_IsCheckable(*args, **kwargs)
e811c8ce
RD
8590
8591 def IsSubMenu(*args, **kwargs):
a95a7133 8592 """IsSubMenu(self) -> bool"""
54f9ee45 8593 return _core_.MenuItem_IsSubMenu(*args, **kwargs)
e811c8ce
RD
8594
8595 def SetSubMenu(*args, **kwargs):
a95a7133 8596 """SetSubMenu(self, Menu menu)"""
54f9ee45 8597 return _core_.MenuItem_SetSubMenu(*args, **kwargs)
e811c8ce
RD
8598
8599 def GetSubMenu(*args, **kwargs):
a95a7133 8600 """GetSubMenu(self) -> Menu"""
54f9ee45 8601 return _core_.MenuItem_GetSubMenu(*args, **kwargs)
e811c8ce
RD
8602
8603 def Enable(*args, **kwargs):
a95a7133 8604 """Enable(self, bool enable=True)"""
54f9ee45 8605 return _core_.MenuItem_Enable(*args, **kwargs)
e811c8ce
RD
8606
8607 def IsEnabled(*args, **kwargs):
a95a7133 8608 """IsEnabled(self) -> bool"""
54f9ee45 8609 return _core_.MenuItem_IsEnabled(*args, **kwargs)
e811c8ce
RD
8610
8611 def Check(*args, **kwargs):
a95a7133 8612 """Check(self, bool check=True)"""
54f9ee45 8613 return _core_.MenuItem_Check(*args, **kwargs)
e811c8ce
RD
8614
8615 def IsChecked(*args, **kwargs):
a95a7133 8616 """IsChecked(self) -> bool"""
54f9ee45 8617 return _core_.MenuItem_IsChecked(*args, **kwargs)
e811c8ce
RD
8618
8619 def Toggle(*args, **kwargs):
a95a7133 8620 """Toggle(self)"""
54f9ee45 8621 return _core_.MenuItem_Toggle(*args, **kwargs)
e811c8ce
RD
8622
8623 def SetHelp(*args, **kwargs):
a95a7133 8624 """SetHelp(self, String str)"""
54f9ee45 8625 return _core_.MenuItem_SetHelp(*args, **kwargs)
e811c8ce
RD
8626
8627 def GetHelp(*args, **kwargs):
a95a7133 8628 """GetHelp(self) -> String"""
54f9ee45 8629 return _core_.MenuItem_GetHelp(*args, **kwargs)
e811c8ce
RD
8630
8631 def GetAccel(*args, **kwargs):
a95a7133 8632 """GetAccel(self) -> AcceleratorEntry"""
54f9ee45 8633 return _core_.MenuItem_GetAccel(*args, **kwargs)
e811c8ce
RD
8634
8635 def SetAccel(*args, **kwargs):
a95a7133 8636 """SetAccel(self, AcceleratorEntry accel)"""
54f9ee45 8637 return _core_.MenuItem_SetAccel(*args, **kwargs)
e811c8ce
RD
8638
8639 def GetDefaultMarginWidth(*args, **kwargs):
66c033b4 8640 """GetDefaultMarginWidth() -> int"""
54f9ee45 8641 return _core_.MenuItem_GetDefaultMarginWidth(*args, **kwargs)
e811c8ce
RD
8642
8643 GetDefaultMarginWidth = staticmethod(GetDefaultMarginWidth)
8644 def SetBitmap(*args, **kwargs):
a95a7133 8645 """SetBitmap(self, Bitmap bitmap)"""
54f9ee45 8646 return _core_.MenuItem_SetBitmap(*args, **kwargs)
e811c8ce
RD
8647
8648 def GetBitmap(*args, **kwargs):
a95a7133 8649 """GetBitmap(self) -> Bitmap"""
54f9ee45 8650 return _core_.MenuItem_GetBitmap(*args, **kwargs)
e811c8ce 8651
d14a1e28
RD
8652
8653class MenuItemPtr(MenuItem):
8654 def __init__(self, this):
8655 self.this = this
8656 if not hasattr(self,"thisown"): self.thisown = 0
8657 self.__class__ = MenuItem
54f9ee45 8658_core_.MenuItem_swigregister(MenuItemPtr)
d14a1e28 8659
e811c8ce 8660def MenuItem_GetLabelFromText(*args, **kwargs):
196addbf 8661 """MenuItem_GetLabelFromText(String text) -> String"""
54f9ee45 8662 return _core_.MenuItem_GetLabelFromText(*args, **kwargs)
d14a1e28 8663
e811c8ce
RD
8664def MenuItem_GetDefaultMarginWidth(*args, **kwargs):
8665 """MenuItem_GetDefaultMarginWidth() -> int"""
54f9ee45 8666 return _core_.MenuItem_GetDefaultMarginWidth(*args, **kwargs)
d14a1e28
RD
8667
8668#---------------------------------------------------------------------------
8669
8670class Control(Window):
15afbcd0
RD
8671 """
8672 This is the base class for a control or 'widget'.
8673
41e2b43e
RD
8674 A control is generally a small window which processes user input
8675 and/or displays one or more item of data.
15afbcd0 8676 """
e811c8ce
RD
8677 def __repr__(self):
8678 return "<%s.%s; proxy of C++ wxControl instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 8679 def __init__(self, *args, **kwargs):
0df68c9f 8680 """
248ed943
RD
8681 __init__(self, Window parent, int id=-1, Point pos=DefaultPosition,
8682 Size size=DefaultSize, long style=0, Validator validator=DefaultValidator,
b2dc1044 8683 String name=ControlNameStr) -> Control
15afbcd0 8684
41e2b43e
RD
8685 Create a Control. Normally you should only call this from a subclass'
8686 __init__ as a plain old wx.Control is not very useful.
0df68c9f 8687 """
54f9ee45 8688 newobj = _core_.new_Control(*args, **kwargs)
d14a1e28
RD
8689 self.this = newobj.this
8690 self.thisown = 1
8691 del newobj.thisown
8692 self._setOORInfo(self)
e811c8ce
RD
8693
8694 def Create(*args, **kwargs):
0df68c9f 8695 """
248ed943
RD
8696 Create(self, Window parent, int id=-1, Point pos=DefaultPosition,
8697 Size size=DefaultSize, long style=0, Validator validator=DefaultValidator,
b2dc1044 8698 String name=ControlNameStr) -> bool
15afbcd0
RD
8699
8700 Do the 2nd phase and create the GUI control.
0df68c9f 8701 """
54f9ee45 8702 return _core_.Control_Create(*args, **kwargs)
e811c8ce
RD
8703
8704 def Command(*args, **kwargs):
15afbcd0 8705 """
a95a7133 8706 Command(self, CommandEvent event)
15afbcd0 8707
41e2b43e
RD
8708 Simulates the effect of the user issuing a command to the item.
8709
8710 :see: `wx.CommandEvent`
8711
15afbcd0 8712 """
54f9ee45 8713 return _core_.Control_Command(*args, **kwargs)
e811c8ce
RD
8714
8715 def GetLabel(*args, **kwargs):
15afbcd0 8716 """
a95a7133 8717 GetLabel(self) -> String
15afbcd0
RD
8718
8719 Return a control's text.
8720 """
54f9ee45 8721 return _core_.Control_GetLabel(*args, **kwargs)
e811c8ce
RD
8722
8723 def SetLabel(*args, **kwargs):
15afbcd0 8724 """
a95a7133 8725 SetLabel(self, String label)
15afbcd0
RD
8726
8727 Sets the item's text.
8728 """
54f9ee45 8729 return _core_.Control_SetLabel(*args, **kwargs)
e811c8ce 8730
74a57fcd 8731 def GetClassDefaultAttributes(*args, **kwargs):
110da5b0
RD
8732 """
8733 GetClassDefaultAttributes(int variant=WINDOW_VARIANT_NORMAL) -> VisualAttributes
8734
8735 Get the default attributes for this class. This is useful if you want
8736 to use the same font or colour in your own control as in a standard
8737 control -- which is a much better idea than hard coding specific
8738 colours or fonts which might look completely out of place on the
8739 user's system, especially if it uses themes.
8740
8741 The variant parameter is only relevant under Mac currently and is
8742 ignore under other platforms. Under Mac, it will change the size of
8743 the returned font. See `wx.Window.SetWindowVariant` for more about
8744 this.
8745 """
54f9ee45 8746 return _core_.Control_GetClassDefaultAttributes(*args, **kwargs)
74a57fcd
RD
8747
8748 GetClassDefaultAttributes = staticmethod(GetClassDefaultAttributes)
d14a1e28
RD
8749
8750class ControlPtr(Control):
8751 def __init__(self, this):
8752 self.this = this
8753 if not hasattr(self,"thisown"): self.thisown = 0
8754 self.__class__ = Control
54f9ee45 8755_core_.Control_swigregister(ControlPtr)
b2dc1044 8756ControlNameStr = cvar.ControlNameStr
d14a1e28
RD
8757
8758def PreControl(*args, **kwargs):
15afbcd0
RD
8759 """
8760 PreControl() -> Control
8761
8762 Precreate a Control control for 2-phase creation
8763 """
54f9ee45 8764 val = _core_.new_PreControl(*args, **kwargs)
d14a1e28
RD
8765 val.thisown = 1
8766 return val
8767
74a57fcd 8768def Control_GetClassDefaultAttributes(*args, **kwargs):
110da5b0
RD
8769 """
8770 Control_GetClassDefaultAttributes(int variant=WINDOW_VARIANT_NORMAL) -> VisualAttributes
8771
8772 Get the default attributes for this class. This is useful if you want
8773 to use the same font or colour in your own control as in a standard
8774 control -- which is a much better idea than hard coding specific
8775 colours or fonts which might look completely out of place on the
8776 user's system, especially if it uses themes.
8777
8778 The variant parameter is only relevant under Mac currently and is
8779 ignore under other platforms. Under Mac, it will change the size of
8780 the returned font. See `wx.Window.SetWindowVariant` for more about
8781 this.
8782 """
54f9ee45 8783 return _core_.Control_GetClassDefaultAttributes(*args, **kwargs)
74a57fcd 8784
d14a1e28
RD
8785#---------------------------------------------------------------------------
8786
8787class ItemContainer(object):
15afbcd0
RD
8788 """
8789 wx.ItemContainer defines an interface which is implemented by all
41e2b43e
RD
8790 controls which have string subitems, each of which may be selected,
8791 such as `wx.ListBox`, `wx.CheckListBox`, `wx.Choice` as well as
8792 `wx.ComboBox` which implements an extended interface deriving from
8793 this one.
15afbcd0 8794
41e2b43e
RD
8795 It defines the methods for accessing the control's items and although
8796 each of the derived classes implements them differently, they still
8797 all conform to the same interface.
15afbcd0 8798
41e2b43e
RD
8799 The items in a wx.ItemContainer have (non empty) string labels and,
8800 optionally, client data associated with them.
15afbcd0
RD
8801
8802 """
d14a1e28
RD
8803 def __init__(self): raise RuntimeError, "No constructor defined"
8804 def __repr__(self):
8805 return "<%s.%s; proxy of C++ wxItemContainer instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
e811c8ce 8806 def Append(*args, **kwargs):
15afbcd0 8807 """
a95a7133 8808 Append(self, String item, PyObject clientData=None) -> int
15afbcd0 8809
41e2b43e
RD
8810 Adds the item to the control, associating the given data with the item
8811 if not None. The return value is the index of the newly added item
8812 which may be different from the last one if the control is sorted (e.g.
8813 has wx.LB_SORT or wx.CB_SORT style).
15afbcd0 8814 """
54f9ee45 8815 return _core_.ItemContainer_Append(*args, **kwargs)
e811c8ce
RD
8816
8817 def AppendItems(*args, **kwargs):
15afbcd0 8818 """
f5b96ee1 8819 AppendItems(self, List strings)
15afbcd0 8820
41e2b43e
RD
8821 Apend several items at once to the control. Notice that calling this
8822 method may be much faster than appending the items one by one if you
8823 need to add a lot of items.
15afbcd0 8824 """
54f9ee45 8825 return _core_.ItemContainer_AppendItems(*args, **kwargs)
e811c8ce
RD
8826
8827 def Insert(*args, **kwargs):
15afbcd0 8828 """
a95a7133 8829 Insert(self, String item, int pos, PyObject clientData=None) -> int
15afbcd0 8830
41e2b43e 8831 Insert an item into the control before the item at the ``pos`` index,
15afbcd0
RD
8832 optionally associating some data object with the item.
8833 """
54f9ee45 8834 return _core_.ItemContainer_Insert(*args, **kwargs)
e811c8ce
RD
8835
8836 def Clear(*args, **kwargs):
15afbcd0 8837 """
a95a7133 8838 Clear(self)
15afbcd0
RD
8839
8840 Removes all items from the control.
8841 """
54f9ee45 8842 return _core_.ItemContainer_Clear(*args, **kwargs)
e811c8ce
RD
8843
8844 def Delete(*args, **kwargs):
15afbcd0 8845 """
a95a7133 8846 Delete(self, int n)
15afbcd0 8847
41e2b43e
RD
8848 Deletes the item at the zero-based index 'n' from the control. Note
8849 that it is an error (signalled by a `wx.PyAssertionError` exception if
8850 enabled) to remove an item with the index negative or greater or equal
8851 than the number of items in the control.
15afbcd0 8852 """
54f9ee45 8853 return _core_.ItemContainer_Delete(*args, **kwargs)
e811c8ce
RD
8854
8855 def GetCount(*args, **kwargs):
15afbcd0 8856 """
a95a7133 8857 GetCount(self) -> int
15afbcd0
RD
8858
8859 Returns the number of items in the control.
8860 """
54f9ee45 8861 return _core_.ItemContainer_GetCount(*args, **kwargs)
e811c8ce
RD
8862
8863 def IsEmpty(*args, **kwargs):
15afbcd0 8864 """
a95a7133 8865 IsEmpty(self) -> bool
15afbcd0
RD
8866
8867 Returns True if the control is empty or False if it has some items.
8868 """
54f9ee45 8869 return _core_.ItemContainer_IsEmpty(*args, **kwargs)
e811c8ce
RD
8870
8871 def GetString(*args, **kwargs):
15afbcd0 8872 """
a95a7133 8873 GetString(self, int n) -> String
15afbcd0
RD
8874
8875 Returns the label of the item with the given index.
8876 """
54f9ee45 8877 return _core_.ItemContainer_GetString(*args, **kwargs)
e811c8ce
RD
8878
8879 def GetStrings(*args, **kwargs):
a95a7133 8880 """GetStrings(self) -> wxArrayString"""
54f9ee45 8881 return _core_.ItemContainer_GetStrings(*args, **kwargs)
e811c8ce
RD
8882
8883 def SetString(*args, **kwargs):
15afbcd0 8884 """
a95a7133 8885 SetString(self, int n, String s)
15afbcd0
RD
8886
8887 Sets the label for the given item.
8888 """
54f9ee45 8889 return _core_.ItemContainer_SetString(*args, **kwargs)
e811c8ce
RD
8890
8891 def FindString(*args, **kwargs):
15afbcd0 8892 """
a95a7133 8893 FindString(self, String s) -> int
15afbcd0
RD
8894
8895 Finds an item whose label matches the given string. Returns the
41e2b43e
RD
8896 zero-based position of the item, or ``wx.NOT_FOUND`` if the string was not
8897 found.
15afbcd0 8898 """
54f9ee45 8899 return _core_.ItemContainer_FindString(*args, **kwargs)
e811c8ce
RD
8900
8901 def Select(*args, **kwargs):
15afbcd0 8902 """
a95a7133 8903 Select(self, int n)
15afbcd0
RD
8904
8905 Sets the item at index 'n' to be the selected item.
8906 """
54f9ee45 8907 return _core_.ItemContainer_Select(*args, **kwargs)
e811c8ce 8908
15afbcd0 8909 SetSelection = Select
e811c8ce 8910 def GetSelection(*args, **kwargs):
15afbcd0 8911 """
a95a7133 8912 GetSelection(self) -> int
15afbcd0 8913
41e2b43e
RD
8914 Returns the index of the selected item or ``wx.NOT_FOUND`` if no item
8915 is selected.
15afbcd0 8916 """
54f9ee45 8917 return _core_.ItemContainer_GetSelection(*args, **kwargs)
e811c8ce
RD
8918
8919 def GetStringSelection(*args, **kwargs):
15afbcd0 8920 """
a95a7133 8921 GetStringSelection(self) -> String
15afbcd0 8922
41e2b43e
RD
8923 Returns the label of the selected item or an empty string if no item
8924 is selected.
15afbcd0 8925 """
54f9ee45 8926 return _core_.ItemContainer_GetStringSelection(*args, **kwargs)
e811c8ce
RD
8927
8928 def GetClientData(*args, **kwargs):
15afbcd0 8929 """
a95a7133 8930 GetClientData(self, int n) -> PyObject
15afbcd0
RD
8931
8932 Returns the client data associated with the given item, (if any.)
8933 """
54f9ee45 8934 return _core_.ItemContainer_GetClientData(*args, **kwargs)
e811c8ce
RD
8935
8936 def SetClientData(*args, **kwargs):
15afbcd0 8937 """
a95a7133 8938 SetClientData(self, int n, PyObject clientData)
15afbcd0
RD
8939
8940 Associate the given client data with the item at position n.
8941 """
54f9ee45 8942 return _core_.ItemContainer_SetClientData(*args, **kwargs)
e811c8ce 8943
d14a1e28
RD
8944
8945class ItemContainerPtr(ItemContainer):
8946 def __init__(self, this):
8947 self.this = this
8948 if not hasattr(self,"thisown"): self.thisown = 0
8949 self.__class__ = ItemContainer
54f9ee45 8950_core_.ItemContainer_swigregister(ItemContainerPtr)
d14a1e28
RD
8951
8952#---------------------------------------------------------------------------
8953
8954class ControlWithItems(Control,ItemContainer):
15afbcd0 8955 """
41e2b43e
RD
8956 wx.ControlWithItems combines the ``wx.ItemContainer`` class with the
8957 wx.Control class, and is used for the base class of various controls
8958 that have items.
15afbcd0 8959 """
d14a1e28
RD
8960 def __init__(self): raise RuntimeError, "No constructor defined"
8961 def __repr__(self):
8962 return "<%s.%s; proxy of C++ wxControlWithItems instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
8963
8964class ControlWithItemsPtr(ControlWithItems):
8965 def __init__(self, this):
8966 self.this = this
8967 if not hasattr(self,"thisown"): self.thisown = 0
8968 self.__class__ = ControlWithItems
54f9ee45 8969_core_.ControlWithItems_swigregister(ControlWithItemsPtr)
d14a1e28
RD
8970
8971#---------------------------------------------------------------------------
8972
8973class SizerItem(Object):
248ed943
RD
8974 """
8975 The wx.SizerItem class is used to track the position, size and other
8976 attributes of each item managed by a `wx.Sizer`. In normal usage user
8977 code should never need to deal directly with a wx.SizerItem, but
8978 custom classes derived from `wx.PySizer` will probably need to use the
8979 collection of wx.SizerItems held by wx.Sizer when calculating layout.
8980
8981 :see: `wx.Sizer`, `wx.GBSizerItem`
8982 """
e811c8ce
RD
8983 def __repr__(self):
8984 return "<%s.%s; proxy of C++ wxSizerItem instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 8985 def __init__(self, *args, **kwargs):
248ed943
RD
8986 """
8987 __init__(self) -> SizerItem
8988
8989 Constructs an empty wx.SizerItem. Either a window, sizer or spacer
8990 size will need to be set before this item can be used in a Sizer.
8991
8992 You will probably never need to create a wx.SizerItem directly as they
8993 are created automatically when the sizer's Add, Insert or Prepend
8994 methods are called.
8995
8996 :see: `wx.SizerItemSpacer`, `wx.SizerItemWindow`, `wx.SizerItemSizer`
8997 """
54f9ee45 8998 newobj = _core_.new_SizerItem(*args, **kwargs)
d14a1e28
RD
8999 self.this = newobj.this
9000 self.thisown = 1
9001 del newobj.thisown
e811c8ce 9002 def DeleteWindows(*args, **kwargs):
248ed943
RD
9003 """
9004 DeleteWindows(self)
9005
9006 Destroy the window or the windows in a subsizer, depending on the type
9007 of item.
9008 """
54f9ee45 9009 return _core_.SizerItem_DeleteWindows(*args, **kwargs)
e811c8ce
RD
9010
9011 def DetachSizer(*args, **kwargs):
248ed943
RD
9012 """
9013 DetachSizer(self)
9014
9015 Enable deleting the SizerItem without destroying the contained sizer.
9016 """
54f9ee45 9017 return _core_.SizerItem_DetachSizer(*args, **kwargs)
e811c8ce
RD
9018
9019 def GetSize(*args, **kwargs):
248ed943
RD
9020 """
9021 GetSize(self) -> Size
9022
9023 Get the current size of the item, as set in the last Layout.
9024 """
54f9ee45 9025 return _core_.SizerItem_GetSize(*args, **kwargs)
e811c8ce
RD
9026
9027 def CalcMin(*args, **kwargs):
248ed943
RD
9028 """
9029 CalcMin(self) -> Size
9030
9031 Calculates the minimum desired size for the item, including any space
9032 needed by borders.
9033 """
54f9ee45 9034 return _core_.SizerItem_CalcMin(*args, **kwargs)
e811c8ce
RD
9035
9036 def SetDimension(*args, **kwargs):
248ed943
RD
9037 """
9038 SetDimension(self, Point pos, Size size)
9039
9040 Set the position and size of the space allocated for this item by the
9041 sizer, and adjust the position and size of the item (window or
9042 subsizer) to be within that space taking alignment and borders into
9043 account.
9044 """
54f9ee45 9045 return _core_.SizerItem_SetDimension(*args, **kwargs)
e811c8ce
RD
9046
9047 def GetMinSize(*args, **kwargs):
248ed943
RD
9048 """
9049 GetMinSize(self) -> Size
9050
9051 Get the minimum size needed for the item.
9052 """
54f9ee45 9053 return _core_.SizerItem_GetMinSize(*args, **kwargs)
e811c8ce 9054
dfbb5885
RD
9055 def GetMinSizeWithBorder(*args, **kwargs):
9056 """
9057 GetMinSizeWithBorder(self) -> Size
9058
9059 Get the minimum size needed for the item with space for the borders
9060 added, if needed.
9061 """
9062 return _core_.SizerItem_GetMinSizeWithBorder(*args, **kwargs)
9063
e811c8ce 9064 def SetInitSize(*args, **kwargs):
a95a7133 9065 """SetInitSize(self, int x, int y)"""
54f9ee45 9066 return _core_.SizerItem_SetInitSize(*args, **kwargs)
e811c8ce
RD
9067
9068 def SetRatioWH(*args, **kwargs):
248ed943
RD
9069 """
9070 SetRatioWH(self, int width, int height)
9071
9072 Set the ratio item attribute.
9073 """
54f9ee45 9074 return _core_.SizerItem_SetRatioWH(*args, **kwargs)
e811c8ce
RD
9075
9076 def SetRatioSize(*args, **kwargs):
248ed943
RD
9077 """
9078 SetRatioSize(self, Size size)
9079
9080 Set the ratio item attribute.
9081 """
54f9ee45 9082 return _core_.SizerItem_SetRatioSize(*args, **kwargs)
e811c8ce
RD
9083
9084 def SetRatio(*args, **kwargs):
248ed943
RD
9085 """
9086 SetRatio(self, float ratio)
9087
9088 Set the ratio item attribute.
9089 """
54f9ee45 9090 return _core_.SizerItem_SetRatio(*args, **kwargs)
e811c8ce
RD
9091
9092 def GetRatio(*args, **kwargs):
248ed943
RD
9093 """
9094 GetRatio(self) -> float
9095
9096 Set the ratio item attribute.
9097 """
54f9ee45 9098 return _core_.SizerItem_GetRatio(*args, **kwargs)
e811c8ce 9099
d3b6e4ff
RD
9100 def GetRect(*args, **kwargs):
9101 """
9102 GetRect(self) -> Rect
9103
9104 Returns the rectangle that the sizer item should occupy
9105 """
9106 return _core_.SizerItem_GetRect(*args, **kwargs)
9107
e811c8ce 9108 def IsWindow(*args, **kwargs):
248ed943
RD
9109 """
9110 IsWindow(self) -> bool
9111
9112 Is this sizer item a window?
9113 """
54f9ee45 9114 return _core_.SizerItem_IsWindow(*args, **kwargs)
e811c8ce
RD
9115
9116 def IsSizer(*args, **kwargs):
248ed943
RD
9117 """
9118 IsSizer(self) -> bool
9119
9120 Is this sizer item a subsizer?
9121 """
54f9ee45 9122 return _core_.SizerItem_IsSizer(*args, **kwargs)
e811c8ce
RD
9123
9124 def IsSpacer(*args, **kwargs):
248ed943
RD
9125 """
9126 IsSpacer(self) -> bool
9127
9128 Is this sizer item a spacer?
9129 """
54f9ee45 9130 return _core_.SizerItem_IsSpacer(*args, **kwargs)
e811c8ce
RD
9131
9132 def SetProportion(*args, **kwargs):
248ed943
RD
9133 """
9134 SetProportion(self, int proportion)
9135
9136 Set the proportion value for this item.
9137 """
54f9ee45 9138 return _core_.SizerItem_SetProportion(*args, **kwargs)
e811c8ce
RD
9139
9140 def GetProportion(*args, **kwargs):
248ed943
RD
9141 """
9142 GetProportion(self) -> int
9143
9144 Get the proportion value for this item.
9145 """
54f9ee45 9146 return _core_.SizerItem_GetProportion(*args, **kwargs)
e811c8ce 9147
248ed943
RD
9148 SetOption = wx._deprecated(SetProportion, "Please use `SetProportion` instead.")
9149 GetOption = wx._deprecated(GetProportion, "Please use `GetProportion` instead.")
e811c8ce 9150 def SetFlag(*args, **kwargs):
248ed943
RD
9151 """
9152 SetFlag(self, int flag)
9153
9154 Set the flag value for this item.
9155 """
54f9ee45 9156 return _core_.SizerItem_SetFlag(*args, **kwargs)
e811c8ce
RD
9157
9158 def GetFlag(*args, **kwargs):
248ed943
RD
9159 """
9160 GetFlag(self) -> int
9161
9162 Get the flag value for this item.
9163 """
54f9ee45 9164 return _core_.SizerItem_GetFlag(*args, **kwargs)
e811c8ce
RD
9165
9166 def SetBorder(*args, **kwargs):
248ed943
RD
9167 """
9168 SetBorder(self, int border)
9169
9170 Set the border value for this item.
9171 """
54f9ee45 9172 return _core_.SizerItem_SetBorder(*args, **kwargs)
e811c8ce
RD
9173
9174 def GetBorder(*args, **kwargs):
248ed943
RD
9175 """
9176 GetBorder(self) -> int
9177
9178 Get the border value for this item.
9179 """
54f9ee45 9180 return _core_.SizerItem_GetBorder(*args, **kwargs)
e811c8ce
RD
9181
9182 def GetWindow(*args, **kwargs):
248ed943
RD
9183 """
9184 GetWindow(self) -> Window
9185
9186 Get the window (if any) that is managed by this sizer item.
9187 """
54f9ee45 9188 return _core_.SizerItem_GetWindow(*args, **kwargs)
e811c8ce
RD
9189
9190 def SetWindow(*args, **kwargs):
248ed943
RD
9191 """
9192 SetWindow(self, Window window)
9193
9194 Set the window to be managed by this sizer item.
9195 """
54f9ee45 9196 return _core_.SizerItem_SetWindow(*args, **kwargs)
e811c8ce
RD
9197
9198 def GetSizer(*args, **kwargs):
248ed943
RD
9199 """
9200 GetSizer(self) -> Sizer
9201
9202 Get the subsizer (if any) that is managed by this sizer item.
9203 """
54f9ee45 9204 return _core_.SizerItem_GetSizer(*args, **kwargs)
e811c8ce
RD
9205
9206 def SetSizer(*args, **kwargs):
248ed943
RD
9207 """
9208 SetSizer(self, Sizer sizer)
9209
9210 Set the subsizer to be managed by this sizer item.
9211 """
54f9ee45 9212 return _core_.SizerItem_SetSizer(*args, **kwargs)
e811c8ce
RD
9213
9214 def GetSpacer(*args, **kwargs):
248ed943
RD
9215 """
9216 GetSpacer(self) -> Size
9217
9218 Get the size of the spacer managed by this sizer item.
9219 """
54f9ee45 9220 return _core_.SizerItem_GetSpacer(*args, **kwargs)
e811c8ce
RD
9221
9222 def SetSpacer(*args, **kwargs):
248ed943
RD
9223 """
9224 SetSpacer(self, Size size)
9225
9226 Set the size of the spacer to be managed by this sizer item.
9227 """
54f9ee45 9228 return _core_.SizerItem_SetSpacer(*args, **kwargs)
e811c8ce
RD
9229
9230 def Show(*args, **kwargs):
248ed943
RD
9231 """
9232 Show(self, bool show)
9233
9234 Set the show item attribute, which sizers use to determine if the item
9235 is to be made part of the layout or not. If the item is tracking a
9236 window then it is shown or hidden as needed.
9237 """
54f9ee45 9238 return _core_.SizerItem_Show(*args, **kwargs)
e811c8ce
RD
9239
9240 def IsShown(*args, **kwargs):
248ed943
RD
9241 """
9242 IsShown(self) -> bool
9243
9244 Is the item to be shown in the layout?
9245 """
54f9ee45 9246 return _core_.SizerItem_IsShown(*args, **kwargs)
e811c8ce
RD
9247
9248 def GetPosition(*args, **kwargs):
248ed943
RD
9249 """
9250 GetPosition(self) -> Point
9251
9252 Returns the current position of the item, as set in the last Layout.
9253 """
54f9ee45 9254 return _core_.SizerItem_GetPosition(*args, **kwargs)
e811c8ce
RD
9255
9256 def GetUserData(*args, **kwargs):
248ed943
RD
9257 """
9258 GetUserData(self) -> PyObject
9259
9260 Returns the userData associated with this sizer item, or None if there
9261 isn't any.
9262 """
54f9ee45 9263 return _core_.SizerItem_GetUserData(*args, **kwargs)
e811c8ce 9264
d14a1e28
RD
9265
9266class SizerItemPtr(SizerItem):
9267 def __init__(self, this):
9268 self.this = this
9269 if not hasattr(self,"thisown"): self.thisown = 0
9270 self.__class__ = SizerItem
54f9ee45 9271_core_.SizerItem_swigregister(SizerItemPtr)
d14a1e28 9272
248ed943 9273def SizerItemWindow(*args, **kwargs):
0df68c9f 9274 """
248ed943
RD
9275 SizerItemWindow(Window window, int proportion, int flag, int border,
9276 PyObject userData=None) -> SizerItem
9277
9278 Constructs a `wx.SizerItem` for tracking a window.
0df68c9f 9279 """
248ed943 9280 val = _core_.new_SizerItemWindow(*args, **kwargs)
d14a1e28
RD
9281 val.thisown = 1
9282 return val
9283
248ed943 9284def SizerItemSpacer(*args, **kwargs):
0df68c9f 9285 """
248ed943
RD
9286 SizerItemSpacer(int width, int height, int proportion, int flag, int border,
9287 PyObject userData=None) -> SizerItem
9288
9289 Constructs a `wx.SizerItem` for tracking a spacer.
0df68c9f 9290 """
248ed943 9291 val = _core_.new_SizerItemSpacer(*args, **kwargs)
d14a1e28
RD
9292 val.thisown = 1
9293 return val
9294
9295def SizerItemSizer(*args, **kwargs):
0df68c9f
RD
9296 """
9297 SizerItemSizer(Sizer sizer, int proportion, int flag, int border,
248ed943
RD
9298 PyObject userData=None) -> SizerItem
9299
9300 Constructs a `wx.SizerItem` for tracking a subsizer
0df68c9f 9301 """
54f9ee45 9302 val = _core_.new_SizerItemSizer(*args, **kwargs)
d14a1e28
RD
9303 val.thisown = 1
9304 return val
9305
9306class Sizer(Object):
248ed943
RD
9307 """
9308 wx.Sizer is the abstract base class used for laying out subwindows in
9309 a window. You cannot use wx.Sizer directly; instead, you will have to
9310 use one of the sizer classes derived from it such as `wx.BoxSizer`,
9311 `wx.StaticBoxSizer`, `wx.NotebookSizer`, `wx.GridSizer`, `wx.FlexGridSizer`
9312 and `wx.GridBagSizer`.
9313
9314 The concept implemented by sizers in wxWidgets is closely related to
9315 layout tools in other GUI toolkits, such as Java's AWT, the GTK
9316 toolkit or the Qt toolkit. It is based upon the idea of the individual
9317 subwindows reporting their minimal required size and their ability to
9318 get stretched if the size of the parent window has changed. This will
9319 most often mean that the programmer does not set the original size of
9320 a dialog in the beginning, rather the dialog will assigned a sizer and
9321 this sizer will be queried about the recommended size. The sizer in
9322 turn will query its children, which can be normal windows or contorls,
9323 empty space or other sizers, so that a hierarchy of sizers can be
9324 constructed. Note that wxSizer does not derive from wxWindow and thus
9325 do not interfere with tab ordering and requires very little resources
9326 compared to a real window on screen.
9327
9328 What makes sizers so well fitted for use in wxWidgets is the fact that
9329 every control reports its own minimal size and the algorithm can
9330 handle differences in font sizes or different window (dialog item)
9331 sizes on different platforms without problems. If for example the
9332 standard font as well as the overall design of Mac widgets requires
9333 more space than on Windows, then the initial size of a dialog using a
9334 sizer will automatically be bigger on Mac than on Windows.
9335 """
e811c8ce
RD
9336 def __init__(self): raise RuntimeError, "No constructor defined"
9337 def __repr__(self):
9338 return "<%s.%s; proxy of C++ wxSizer instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
9339 def _setOORInfo(*args, **kwargs):
a95a7133 9340 """_setOORInfo(self, PyObject _self)"""
54f9ee45 9341 return _core_.Sizer__setOORInfo(*args, **kwargs)
e811c8ce
RD
9342
9343 def Add(*args, **kwargs):
0df68c9f 9344 """
248ed943 9345 Add(self, item, int proportion=0, int flag=0, int border=0,
d3b6e4ff 9346 PyObject userData=None) -> wx.SizerItem
248ed943
RD
9347
9348 Appends a child item to the sizer.
0df68c9f 9349 """
54f9ee45 9350 return _core_.Sizer_Add(*args, **kwargs)
e811c8ce
RD
9351
9352 def Insert(*args, **kwargs):
0df68c9f 9353 """
248ed943 9354 Insert(self, int before, item, int proportion=0, int flag=0, int border=0,
d3b6e4ff 9355 PyObject userData=None) -> wx.SizerItem
248ed943
RD
9356
9357 Inserts a new item into the list of items managed by this sizer before
9358 the item at index *before*. See `Add` for a description of the parameters.
0df68c9f 9359 """
54f9ee45 9360 return _core_.Sizer_Insert(*args, **kwargs)
e811c8ce
RD
9361
9362 def Prepend(*args, **kwargs):
0df68c9f 9363 """
248ed943 9364 Prepend(self, item, int proportion=0, int flag=0, int border=0,
d3b6e4ff 9365 PyObject userData=None) -> wx.SizerItem
248ed943
RD
9366
9367 Adds a new item to the begining of the list of sizer items managed by
9368 this sizer. See `Add` for a description of the parameters.
0df68c9f 9369 """
54f9ee45 9370 return _core_.Sizer_Prepend(*args, **kwargs)
e811c8ce
RD
9371
9372 def Remove(*args, **kwargs):
248ed943
RD
9373 """
9374 Remove(self, item) -> bool
9375
9376 Removes an item from the sizer and destroys it. This method does not
9377 cause any layout or resizing to take place, call `Layout` to update
9378 the layout on screen after removing a child from the sizer. The
9379 *item* parameter can be either a window, a sizer, or the zero-based
9380 index of an item to remove. Returns True if the child item was found
9381 and removed.
9382 """
54f9ee45 9383 return _core_.Sizer_Remove(*args, **kwargs)
e811c8ce 9384
1c0f361b 9385 def Detach(*args, **kwargs):
248ed943
RD
9386 """
9387 Detach(self, item) -> bool
9388
9389 Detaches an item from the sizer without destroying it. This method
9390 does not cause any layout or resizing to take place, call `Layout` to
9391 do so. The *item* parameter can be either a window, a sizer, or the
9392 zero-based index of the item to be detached. Returns True if the child item
9393 was found and detached.
9394 """
1c0f361b
RD
9395 return _core_.Sizer_Detach(*args, **kwargs)
9396
d3b6e4ff
RD
9397 def GetItem(*args, **kwargs):
9398 """
9399 GetItem(self, item) -> wx.SizerItem
9400
9401 Returns the `wx.SizerItem` which holds the *item* given. The *item*
9402 parameter can be either a window, a sizer, or the zero-based index of
9403 the item to be detached.
9404 """
9405 return _core_.Sizer_GetItem(*args, **kwargs)
9406
e811c8ce 9407 def _SetItemMinSize(*args, **kwargs):
a95a7133 9408 """_SetItemMinSize(self, PyObject item, Size size)"""
54f9ee45 9409 return _core_.Sizer__SetItemMinSize(*args, **kwargs)
e811c8ce 9410
248ed943
RD
9411 def SetItemMinSize(self, item, *args):
9412 """
9413 SetItemMinSize(self, item, Size size)
9414
9415 Sets the minimum size that will be allocated for an item in the sizer.
9416 The *item* parameter can be either a window, a sizer, or the
9417 zero-based index of the item. If a window or sizer is given then it
9418 will be searched for recursivly in subsizers if neccessary.
9419 """
9420 if len(args) == 2:
9421 # for backward compatibility accept separate width,height args too
9422 return self._SetItemMinSize(item, args)
9423 else:
9424 return self._SetItemMinSize(item, args[0])
9425
e811c8ce 9426 def AddItem(*args, **kwargs):
248ed943
RD
9427 """
9428 AddItem(self, SizerItem item)
9429
9430 Adds a `wx.SizerItem` to the sizer.
9431 """
54f9ee45 9432 return _core_.Sizer_AddItem(*args, **kwargs)
e811c8ce
RD
9433
9434 def InsertItem(*args, **kwargs):
248ed943
RD
9435 """
9436 InsertItem(self, int index, SizerItem item)
9437
9438 Inserts a `wx.SizerItem` to the sizer at the position given by *index*.
9439 """
54f9ee45 9440 return _core_.Sizer_InsertItem(*args, **kwargs)
e811c8ce
RD
9441
9442 def PrependItem(*args, **kwargs):
248ed943
RD
9443 """
9444 PrependItem(self, SizerItem item)
9445
9446 Prepends a `wx.SizerItem` to the sizer.
9447 """
54f9ee45 9448 return _core_.Sizer_PrependItem(*args, **kwargs)
e811c8ce 9449
248ed943 9450 def AddMany(self, items):
66c033b4
RD
9451 """
9452 AddMany is a convenience method for adding several items
9453 to a sizer at one time. Simply pass it a list of tuples,
9454 where each tuple consists of the parameters that you
9455 would normally pass to the `Add` method.
9456 """
248ed943
RD
9457 for item in items:
9458 if type(item) != type(()) or (len(item) == 2 and type(item[0]) == type(1)):
9459 item = (item, )
9460 self.Add(*item)
d14a1e28 9461
74e96f3d 9462 # for backwards compatibility only, please do not use in new code
66c033b4
RD
9463 AddWindow = wx._deprecated(Add, "AddWindow is deprecated, use `Add` instead.")
9464 AddSizer = wx._deprecated(Add, "AddSizer is deprecated, use `Add` instead.")
9465 AddSpacer = wx._deprecated(Add, "AddSpacer is deprecated, use `Add` instead.")
9466 PrependWindow = wx._deprecated(Prepend, "PrependWindow is deprecated, use `Prepend` instead.")
9467 PrependSizer = wx._deprecated(Prepend, "PrependSizer is deprecated, use `Prepend` instead.")
9468 PrependSpacer = wx._deprecated(Prepend, "PrependSpacer is deprecated, use `Prepend` instead.")
9469 InsertWindow = wx._deprecated(Insert, "InsertWindow is deprecated, use `Insert` instead.")
9470 InsertSizer = wx._deprecated(Insert, "InsertSizer is deprecated, use `Insert` instead.")
9471 InsertSpacer = wx._deprecated(Insert, "InsertSpacer is deprecated, use `Insert` instead.")
9472 RemoveWindow = wx._deprecated(Remove, "RemoveWindow is deprecated, use `Remove` instead.")
9473 RemoveSizer = wx._deprecated(Remove, "RemoveSizer is deprecated, use `Remove` instead.")
9474 RemovePos = wx._deprecated(Remove, "RemovePos is deprecated, use `Remove` instead.")
d14a1e28
RD
9475
9476
e811c8ce 9477 def SetDimension(*args, **kwargs):
248ed943
RD
9478 """
9479 SetDimension(self, int x, int y, int width, int height)
9480
9481 Call this to force the sizer to take the given dimension and thus
9482 force the items owned by the sizer to resize themselves according to
9483 the rules defined by the parameter in the `Add`, `Insert` or `Prepend`
9484 methods.
9485 """
54f9ee45 9486 return _core_.Sizer_SetDimension(*args, **kwargs)
e811c8ce
RD
9487
9488 def SetMinSize(*args, **kwargs):
248ed943
RD
9489 """
9490 SetMinSize(self, Size size)
9491
9492 Call this to give the sizer a minimal size. Normally, the sizer will
9493 calculate its minimal size based purely on how much space its children
9494 need. After calling this method `GetMinSize` will return either the
9495 minimal size as requested by its children or the minimal size set
9496 here, depending on which is bigger.
9497 """
54f9ee45 9498 return _core_.Sizer_SetMinSize(*args, **kwargs)
e811c8ce
RD
9499
9500 def GetSize(*args, **kwargs):
248ed943
RD
9501 """
9502 GetSize(self) -> Size
9503
9504 Returns the current size of the space managed by the sizer.
9505 """
54f9ee45 9506 return _core_.Sizer_GetSize(*args, **kwargs)
e811c8ce
RD
9507
9508 def GetPosition(*args, **kwargs):
248ed943
RD
9509 """
9510 GetPosition(self) -> Point
9511
9512 Returns the current position of the sizer's managed space.
9513 """
54f9ee45 9514 return _core_.Sizer_GetPosition(*args, **kwargs)
e811c8ce
RD
9515
9516 def GetMinSize(*args, **kwargs):
248ed943
RD
9517 """
9518 GetMinSize(self) -> Size
9519
9520 Returns the minimal size of the sizer. This is either the combined
9521 minimal size of all the children and their borders or the minimal size
9522 set by SetMinSize, depending on which is bigger.
9523 """
54f9ee45 9524 return _core_.Sizer_GetMinSize(*args, **kwargs)
e811c8ce 9525
d14a1e28 9526 def GetSizeTuple(self):
1c0f361b 9527 return self.GetSize().Get()
d14a1e28 9528 def GetPositionTuple(self):
1c0f361b 9529 return self.GetPosition().Get()
d14a1e28 9530 def GetMinSizeTuple(self):
1c0f361b 9531 return self.GetMinSize().Get()
d14a1e28 9532
e811c8ce 9533 def RecalcSizes(*args, **kwargs):
248ed943
RD
9534 """
9535 RecalcSizes(self)
9536
9537 Using the sizes calculated by `CalcMin` reposition and resize all the
9538 items managed by this sizer. You should not need to call this directly as
9539 it is called by `Layout`.
9540 """
54f9ee45 9541 return _core_.Sizer_RecalcSizes(*args, **kwargs)
e811c8ce
RD
9542
9543 def CalcMin(*args, **kwargs):
248ed943
RD
9544 """
9545 CalcMin(self) -> Size
9546
9547 This method is where the sizer will do the actual calculation of its
9548 children's minimal sizes. You should not need to call this directly as
9549 it is called by `Layout`.
9550 """
54f9ee45 9551 return _core_.Sizer_CalcMin(*args, **kwargs)
e811c8ce
RD
9552
9553 def Layout(*args, **kwargs):
248ed943
RD
9554 """
9555 Layout(self)
9556
9557 This method will force the recalculation and layout of the items
9558 controlled by the sizer using the current space allocated to the
9559 sizer. Normally this is called automatically from the owning window's
9560 EVT_SIZE handler, but it is also useful to call it from user code when
9561 one of the items in a sizer change size, or items are added or
9562 removed.
9563 """
54f9ee45 9564 return _core_.Sizer_Layout(*args, **kwargs)
e811c8ce
RD
9565
9566 def Fit(*args, **kwargs):
248ed943
RD
9567 """
9568 Fit(self, Window window) -> Size
9569
9570 Tell the sizer to resize the *window* to match the sizer's minimal
9571 size. This is commonly done in the constructor of the window itself in
9572 order to set its initial size to match the needs of the children as
9573 determined by the sizer. Returns the new size.
9574
9575 For a top level window this is the total window size, not the client size.
9576 """
54f9ee45 9577 return _core_.Sizer_Fit(*args, **kwargs)
e811c8ce
RD
9578
9579 def FitInside(*args, **kwargs):
248ed943
RD
9580 """
9581 FitInside(self, Window window)
9582
9583 Tell the sizer to resize the *virtual size* of the *window* to match the
9584 sizer's minimal size. This will not alter the on screen size of the
9585 window, but may cause the addition/removal/alteration of scrollbars
9586 required to view the virtual area in windows which manage it.
9587
9588 :see: `wx.ScrolledWindow.SetScrollbars`, `SetVirtualSizeHints`
9589
9590 """
54f9ee45 9591 return _core_.Sizer_FitInside(*args, **kwargs)
e811c8ce
RD
9592
9593 def SetSizeHints(*args, **kwargs):
248ed943
RD
9594 """
9595 SetSizeHints(self, Window window)
9596
9597 Tell the sizer to set (and `Fit`) the minimal size of the *window* to
9598 match the sizer's minimal size. This is commonly done in the
9599 constructor of the window itself if the window is resizable (as are
9600 many dialogs under Unix and frames on probably all platforms) in order
9601 to prevent the window from being sized smaller than the minimal size
9602 required by the sizer.
9603 """
54f9ee45 9604 return _core_.Sizer_SetSizeHints(*args, **kwargs)
e811c8ce
RD
9605
9606 def SetVirtualSizeHints(*args, **kwargs):
248ed943
RD
9607 """
9608 SetVirtualSizeHints(self, Window window)
9609
9610 Tell the sizer to set the minimal size of the window virtual area to
9611 match the sizer's minimal size. For windows with managed scrollbars
9612 this will set them appropriately.
9613
9614 :see: `wx.ScrolledWindow.SetScrollbars`
9615
9616 """
54f9ee45 9617 return _core_.Sizer_SetVirtualSizeHints(*args, **kwargs)
e811c8ce
RD
9618
9619 def Clear(*args, **kwargs):
248ed943
RD
9620 """
9621 Clear(self, bool deleteWindows=False)
9622
9623 Clear all items from the sizer, optionally destroying the window items
9624 as well.
9625 """
54f9ee45 9626 return _core_.Sizer_Clear(*args, **kwargs)
e811c8ce
RD
9627
9628 def DeleteWindows(*args, **kwargs):
248ed943
RD
9629 """
9630 DeleteWindows(self)
9631
9632 Destroy all windows managed by the sizer.
9633 """
54f9ee45 9634 return _core_.Sizer_DeleteWindows(*args, **kwargs)
e811c8ce
RD
9635
9636 def GetChildren(*args, **kwargs):
248ed943 9637 """
51b83b37 9638 GetChildren(self) -> list
248ed943
RD
9639
9640 Returns a list of all the `wx.SizerItem` objects managed by the sizer.
9641 """
54f9ee45 9642 return _core_.Sizer_GetChildren(*args, **kwargs)
e811c8ce
RD
9643
9644 def Show(*args, **kwargs):
248ed943 9645 """
ae8162c8 9646 Show(self, item, bool show=True, bool recursive=false) -> bool
e811c8ce 9647
248ed943
RD
9648 Shows or hides an item managed by the sizer. To make a sizer item
9649 disappear or reappear, use Show followed by `Layout`. The *item*
9650 parameter can be either a window, a sizer, or the zero-based index of
7e63a440
RD
9651 the item. Use the recursive parameter to show or hide an item in a
9652 subsizer. Returns True if the item was found.
248ed943
RD
9653 """
9654 return _core_.Sizer_Show(*args, **kwargs)
e811c8ce
RD
9655
9656 def IsShown(*args, **kwargs):
248ed943
RD
9657 """
9658 IsShown(self, item)
9659
9660 Determines if the item is currently shown. sizer. To make a sizer
9661 item disappear or reappear, use Show followed by `Layout`. The *item*
9662 parameter can be either a window, a sizer, or the zero-based index of
9663 the item.
9664 """
54f9ee45 9665 return _core_.Sizer_IsShown(*args, **kwargs)
e811c8ce 9666
7e63a440 9667 def Hide(self, item, recursive=False):
248ed943 9668 """
7e63a440 9669 A convenience method for Show(item, False, recursive).
248ed943 9670 """
06759a38 9671 return self.Show(item, False, recursive)
248ed943 9672
e811c8ce 9673 def ShowItems(*args, **kwargs):
248ed943
RD
9674 """
9675 ShowItems(self, bool show)
9676
84f85550 9677 Recursively call `wx.SizerItem.Show` on all sizer items.
248ed943 9678 """
54f9ee45 9679 return _core_.Sizer_ShowItems(*args, **kwargs)
e811c8ce 9680
d14a1e28
RD
9681
9682class SizerPtr(Sizer):
9683 def __init__(self, this):
9684 self.this = this
9685 if not hasattr(self,"thisown"): self.thisown = 0
9686 self.__class__ = Sizer
54f9ee45 9687_core_.Sizer_swigregister(SizerPtr)
d14a1e28
RD
9688
9689class PySizer(Sizer):
248ed943
RD
9690 """
9691 wx.PySizer is a special version of `wx.Sizer` that has been
9692 instrumented to allow the C++ virtual methods to be overloaded in
9693 Python derived classes. You would derive from this class if you are
9694 wanting to implement a custom sizer in Python code. Simply implement
9695 `CalcMin` and `RecalcSizes` in the derived class and you're all set.
9696 For example::
9697
9698 class MySizer(wx.PySizer):
9699 def __init__(self):
9700 wx.PySizer.__init__(self)
9701
9702 def CalcMin(self):
9703 for item in self.GetChildren():
9704 # calculate the total minimum width and height needed
9705 # by all items in the sizer according to this sizer's
9706 # layout algorithm.
9707 ...
9708 return wx.Size(width, height)
9709
9710 def RecalcSizes(self):
9711 # find the space allotted to this sizer
9712 pos = self.GetPosition()
9713 size = self.GetSize()
9714 for item in self.GetChildren():
9715 # Recalculate (if necessary) the position and size of
9716 # each item and then call item.SetDimension to do the
9717 # actual positioning and sizing of the items within the
9718 # space alloted to this sizer.
9719 ...
9720 item.SetDimension(itemPos, itemSize)
9721
9722
9723 When `Layout` is called it first calls `CalcMin` followed by
9724 `RecalcSizes` so you can optimize a bit by saving the results of
e505d15e 9725 `CalcMin` and reusing them in `RecalcSizes`.
248ed943
RD
9726
9727 :see: `wx.SizerItem`, `wx.Sizer.GetChildren`
9728
9729
9730 """
e811c8ce
RD
9731 def __repr__(self):
9732 return "<%s.%s; proxy of C++ wxPySizer instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 9733 def __init__(self, *args, **kwargs):
248ed943
RD
9734 """
9735 __init__(self) -> PySizer
9736
9737 Creates a wx.PySizer. Must be called from the __init__ in the derived
9738 class.
9739 """
54f9ee45 9740 newobj = _core_.new_PySizer(*args, **kwargs)
d14a1e28
RD
9741 self.this = newobj.this
9742 self.thisown = 1
9743 del newobj.thisown
9744 self._setCallbackInfo(self, PySizer);self._setOORInfo(self)
e811c8ce
RD
9745
9746 def _setCallbackInfo(*args, **kwargs):
a95a7133 9747 """_setCallbackInfo(self, PyObject self, PyObject _class)"""
54f9ee45 9748 return _core_.PySizer__setCallbackInfo(*args, **kwargs)
e811c8ce 9749
d14a1e28
RD
9750
9751class PySizerPtr(PySizer):
9752 def __init__(self, this):
9753 self.this = this
9754 if not hasattr(self,"thisown"): self.thisown = 0
9755 self.__class__ = PySizer
54f9ee45 9756_core_.PySizer_swigregister(PySizerPtr)
d14a1e28
RD
9757
9758#---------------------------------------------------------------------------
9759
9760class BoxSizer(Sizer):
248ed943
RD
9761 """
9762 The basic idea behind a box sizer is that windows will most often be
9763 laid out in rather simple basic geometry, typically in a row or a
9764 column or nested hierarchies of either. A wx.BoxSizer will lay out
9765 its items in a simple row or column, depending on the orientation
9766 parameter passed to the constructor.
9767 """
e811c8ce
RD
9768 def __repr__(self):
9769 return "<%s.%s; proxy of C++ wxBoxSizer instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 9770 def __init__(self, *args, **kwargs):
248ed943
RD
9771 """
9772 __init__(self, int orient=HORIZONTAL) -> BoxSizer
9773
9774 Constructor for a wx.BoxSizer. *orient* may be one of ``wx.VERTICAL``
9775 or ``wx.HORIZONTAL`` for creating either a column sizer or a row
9776 sizer.
9777 """
54f9ee45 9778 newobj = _core_.new_BoxSizer(*args, **kwargs)
d14a1e28
RD
9779 self.this = newobj.this
9780 self.thisown = 1
9781 del newobj.thisown
9782 self._setOORInfo(self)
e811c8ce
RD
9783
9784 def GetOrientation(*args, **kwargs):
248ed943
RD
9785 """
9786 GetOrientation(self) -> int
9787
9788 Returns the current orientation of the sizer.
9789 """
54f9ee45 9790 return _core_.BoxSizer_GetOrientation(*args, **kwargs)
e811c8ce
RD
9791
9792 def SetOrientation(*args, **kwargs):
248ed943
RD
9793 """
9794 SetOrientation(self, int orient)
e811c8ce 9795
248ed943
RD
9796 Resets the orientation of the sizer.
9797 """
9798 return _core_.BoxSizer_SetOrientation(*args, **kwargs)
e811c8ce 9799
d14a1e28
RD
9800
9801class BoxSizerPtr(BoxSizer):
9802 def __init__(self, this):
9803 self.this = this
9804 if not hasattr(self,"thisown"): self.thisown = 0
9805 self.__class__ = BoxSizer
54f9ee45 9806_core_.BoxSizer_swigregister(BoxSizerPtr)
d14a1e28
RD
9807
9808#---------------------------------------------------------------------------
9809
9810class StaticBoxSizer(BoxSizer):
248ed943
RD
9811 """
9812 wx.StaticBoxSizer derives from and functions identically to the
9813 `wx.BoxSizer` and adds a `wx.StaticBox` around the items that the sizer
9814 manages. Note that this static box must be created separately and
9815 passed to the sizer constructor.
9816 """
e811c8ce
RD
9817 def __repr__(self):
9818 return "<%s.%s; proxy of C++ wxStaticBoxSizer instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 9819 def __init__(self, *args, **kwargs):
248ed943
RD
9820 """
9821 __init__(self, StaticBox box, int orient=HORIZONTAL) -> StaticBoxSizer
9822
9823 Constructor. It takes an associated static box and the orientation
9824 *orient* as parameters - orient can be either of ``wx.VERTICAL`` or
9825 ``wx.HORIZONTAL``.
9826 """
54f9ee45 9827 newobj = _core_.new_StaticBoxSizer(*args, **kwargs)
d14a1e28
RD
9828 self.this = newobj.this
9829 self.thisown = 1
9830 del newobj.thisown
9831 self._setOORInfo(self)
e811c8ce
RD
9832
9833 def GetStaticBox(*args, **kwargs):
248ed943
RD
9834 """
9835 GetStaticBox(self) -> StaticBox
e811c8ce 9836
248ed943
RD
9837 Returns the static box associated with this sizer.
9838 """
9839 return _core_.StaticBoxSizer_GetStaticBox(*args, **kwargs)
e811c8ce 9840
d14a1e28
RD
9841
9842class StaticBoxSizerPtr(StaticBoxSizer):
9843 def __init__(self, this):
9844 self.this = this
9845 if not hasattr(self,"thisown"): self.thisown = 0
9846 self.__class__ = StaticBoxSizer
54f9ee45 9847_core_.StaticBoxSizer_swigregister(StaticBoxSizerPtr)
d14a1e28
RD
9848
9849#---------------------------------------------------------------------------
9850
9851class GridSizer(Sizer):
248ed943
RD
9852 """
9853 A grid sizer is a sizer which lays out its children in a
9854 two-dimensional table with all cells having the same size. In other
9855 words, the width of each cell within the grid is the width of the
9856 widest item added to the sizer and the height of each grid cell is the
9857 height of the tallest item. An optional vertical and/or horizontal
9858 gap between items can also be specified (in pixels.)
9859
9860 Items are placed in the cells of the grid in the order they are added,
9861 in row-major order. In other words, the first row is filled first,
9862 then the second, and so on until all items have been added. (If
9863 neccessary, additional rows will be added as items are added.) If you
9864 need to have greater control over the cells that items are placed in
9865 then use the `wx.GridBagSizer`.
9866
9867 """
e811c8ce
RD
9868 def __repr__(self):
9869 return "<%s.%s; proxy of C++ wxGridSizer instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 9870 def __init__(self, *args, **kwargs):
248ed943
RD
9871 """
9872 __init__(self, int rows=1, int cols=0, int vgap=0, int hgap=0) -> GridSizer
9873
9874 Constructor for a wx.GridSizer. *rows* and *cols* determine the number
9875 of columns and rows in the sizer - if either of the parameters is
9876 zero, it will be calculated to from the total number of children in
9877 the sizer, thus making the sizer grow dynamically. *vgap* and *hgap*
9878 define extra space between all children.
9879 """
54f9ee45 9880 newobj = _core_.new_GridSizer(*args, **kwargs)
d14a1e28
RD
9881 self.this = newobj.this
9882 self.thisown = 1
9883 del newobj.thisown
9884 self._setOORInfo(self)
e811c8ce 9885
e811c8ce 9886 def SetCols(*args, **kwargs):
248ed943
RD
9887 """
9888 SetCols(self, int cols)
9889
9890 Sets the number of columns in the sizer.
9891 """
54f9ee45 9892 return _core_.GridSizer_SetCols(*args, **kwargs)
e811c8ce
RD
9893
9894 def SetRows(*args, **kwargs):
248ed943
RD
9895 """
9896 SetRows(self, int rows)
9897
9898 Sets the number of rows in the sizer.
9899 """
54f9ee45 9900 return _core_.GridSizer_SetRows(*args, **kwargs)
e811c8ce
RD
9901
9902 def SetVGap(*args, **kwargs):
248ed943
RD
9903 """
9904 SetVGap(self, int gap)
9905
9906 Sets the vertical gap (in pixels) between the cells in the sizer.
9907 """
54f9ee45 9908 return _core_.GridSizer_SetVGap(*args, **kwargs)
e811c8ce
RD
9909
9910 def SetHGap(*args, **kwargs):
248ed943
RD
9911 """
9912 SetHGap(self, int gap)
9913
9914 Sets the horizontal gap (in pixels) between cells in the sizer
9915 """
54f9ee45 9916 return _core_.GridSizer_SetHGap(*args, **kwargs)
e811c8ce
RD
9917
9918 def GetCols(*args, **kwargs):
248ed943
RD
9919 """
9920 GetCols(self) -> int
9921
9922 Returns the number of columns in the sizer.
9923 """
54f9ee45 9924 return _core_.GridSizer_GetCols(*args, **kwargs)
e811c8ce
RD
9925
9926 def GetRows(*args, **kwargs):
248ed943
RD
9927 """
9928 GetRows(self) -> int
9929
9930 Returns the number of rows in the sizer.
9931 """
54f9ee45 9932 return _core_.GridSizer_GetRows(*args, **kwargs)
e811c8ce
RD
9933
9934 def GetVGap(*args, **kwargs):
248ed943
RD
9935 """
9936 GetVGap(self) -> int
9937
9938 Returns the vertical gap (in pixels) between the cells in the sizer.
9939 """
54f9ee45 9940 return _core_.GridSizer_GetVGap(*args, **kwargs)
e811c8ce
RD
9941
9942 def GetHGap(*args, **kwargs):
248ed943
RD
9943 """
9944 GetHGap(self) -> int
9945
9946 Returns the horizontal gap (in pixels) between cells in the sizer.
9947 """
54f9ee45 9948 return _core_.GridSizer_GetHGap(*args, **kwargs)
e811c8ce 9949
d14a1e28
RD
9950
9951class GridSizerPtr(GridSizer):
9952 def __init__(self, this):
9953 self.this = this
9954 if not hasattr(self,"thisown"): self.thisown = 0
9955 self.__class__ = GridSizer
54f9ee45 9956_core_.GridSizer_swigregister(GridSizerPtr)
d14a1e28
RD
9957
9958#---------------------------------------------------------------------------
9959
54f9ee45
RD
9960FLEX_GROWMODE_NONE = _core_.FLEX_GROWMODE_NONE
9961FLEX_GROWMODE_SPECIFIED = _core_.FLEX_GROWMODE_SPECIFIED
9962FLEX_GROWMODE_ALL = _core_.FLEX_GROWMODE_ALL
d14a1e28 9963class FlexGridSizer(GridSizer):
248ed943
RD
9964 """
9965 A flex grid sizer is a sizer which lays out its children in a
9966 two-dimensional table with all table cells in one row having the same
9967 height and all cells in one column having the same width, but all
9968 rows or all columns are not necessarily the same height or width as in
9969 the `wx.GridSizer`.
9970
9971 wx.FlexGridSizer can also size items equally in one direction but
9972 unequally ("flexibly") in the other. If the sizer is only flexible
9973 in one direction (this can be changed using `SetFlexibleDirection`), it
9974 needs to be decided how the sizer should grow in the other ("non
9975 flexible") direction in order to fill the available space. The
9976 `SetNonFlexibleGrowMode` method serves this purpose.
9977
9978
9979 """
e811c8ce
RD
9980 def __repr__(self):
9981 return "<%s.%s; proxy of C++ wxFlexGridSizer instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 9982 def __init__(self, *args, **kwargs):
248ed943
RD
9983 """
9984 __init__(self, int rows=1, int cols=0, int vgap=0, int hgap=0) -> FlexGridSizer
9985
9986 Constructor for a wx.FlexGridSizer. *rows* and *cols* determine the
9987 number of columns and rows in the sizer - if either of the parameters
9988 is zero, it will be calculated to from the total number of children in
9989 the sizer, thus making the sizer grow dynamically. *vgap* and *hgap*
9990 define extra space between all children.
9991 """
54f9ee45 9992 newobj = _core_.new_FlexGridSizer(*args, **kwargs)
d14a1e28
RD
9993 self.this = newobj.this
9994 self.thisown = 1
9995 del newobj.thisown
9996 self._setOORInfo(self)
e811c8ce 9997
248ed943
RD
9998 def AddGrowableRow(*args, **kwargs):
9999 """
10000 AddGrowableRow(self, size_t idx, int proportion=0)
e811c8ce 10001
248ed943
RD
10002 Specifies that row *idx* (starting from zero) should be grown if there
10003 is extra space available to the sizer.
e811c8ce 10004
248ed943
RD
10005 The *proportion* parameter has the same meaning as the stretch factor
10006 for the box sizers except that if all proportions are 0, then all
10007 columns are resized equally (instead of not being resized at all).
10008 """
54f9ee45 10009 return _core_.FlexGridSizer_AddGrowableRow(*args, **kwargs)
e811c8ce
RD
10010
10011 def RemoveGrowableRow(*args, **kwargs):
248ed943
RD
10012 """
10013 RemoveGrowableRow(self, size_t idx)
10014
10015 Specifies that row *idx* is no longer growable.
10016 """
54f9ee45 10017 return _core_.FlexGridSizer_RemoveGrowableRow(*args, **kwargs)
e811c8ce
RD
10018
10019 def AddGrowableCol(*args, **kwargs):
248ed943
RD
10020 """
10021 AddGrowableCol(self, size_t idx, int proportion=0)
10022
10023 Specifies that column *idx* (starting from zero) should be grown if
10024 there is extra space available to the sizer.
10025
10026 The *proportion* parameter has the same meaning as the stretch factor
10027 for the box sizers except that if all proportions are 0, then all
10028 columns are resized equally (instead of not being resized at all).
10029 """
54f9ee45 10030 return _core_.FlexGridSizer_AddGrowableCol(*args, **kwargs)
e811c8ce
RD
10031
10032 def RemoveGrowableCol(*args, **kwargs):
248ed943
RD
10033 """
10034 RemoveGrowableCol(self, size_t idx)
10035
10036 Specifies that column *idx* is no longer growable.
10037 """
54f9ee45 10038 return _core_.FlexGridSizer_RemoveGrowableCol(*args, **kwargs)
e811c8ce
RD
10039
10040 def SetFlexibleDirection(*args, **kwargs):
248ed943
RD
10041 """
10042 SetFlexibleDirection(self, int direction)
10043
10044 Specifies whether the sizer should flexibly resize its columns, rows,
10045 or both. Argument *direction* can be one of the following values. Any
10046 other value is ignored.
10047
10048 ============== =======================================
10049 wx.VERTICAL Rows are flexibly sized.
10050 wx.HORIZONTAL Columns are flexibly sized.
10051 wx.BOTH Both rows and columns are flexibly sized
10052 (this is the default value).
10053 ============== =======================================
10054
10055 Note that this method does not trigger relayout.
10056
10057 """
54f9ee45 10058 return _core_.FlexGridSizer_SetFlexibleDirection(*args, **kwargs)
e811c8ce
RD
10059
10060 def GetFlexibleDirection(*args, **kwargs):
248ed943
RD
10061 """
10062 GetFlexibleDirection(self) -> int
10063
10064 Returns a value that specifies whether the sizer
10065 flexibly resizes its columns, rows, or both (default).
10066
10067 :see: `SetFlexibleDirection`
10068 """
54f9ee45 10069 return _core_.FlexGridSizer_GetFlexibleDirection(*args, **kwargs)
e811c8ce
RD
10070
10071 def SetNonFlexibleGrowMode(*args, **kwargs):
248ed943
RD
10072 """
10073 SetNonFlexibleGrowMode(self, int mode)
10074
10075 Specifies how the sizer should grow in the non-flexible direction if
10076 there is one (so `SetFlexibleDirection` must have been called
10077 previously). Argument *mode* can be one of the following values:
10078
10079 ========================== =================================================
10080 wx.FLEX_GROWMODE_NONE Sizer doesn't grow in the non flexible direction.
10081 wx.FLEX_GROWMODE_SPECIFIED Sizer honors growable columns/rows set with
10082 `AddGrowableCol` and `AddGrowableRow`. In this
10083 case equal sizing applies to minimum sizes of
10084 columns or rows (this is the default value).
10085 wx.FLEX_GROWMODE_ALL Sizer equally stretches all columns or rows in
10086 the non flexible direction, whether they are
10087 growable or not in the flexbile direction.
10088 ========================== =================================================
10089
10090 Note that this method does not trigger relayout.
10091
10092
10093 """
54f9ee45 10094 return _core_.FlexGridSizer_SetNonFlexibleGrowMode(*args, **kwargs)
e811c8ce
RD
10095
10096 def GetNonFlexibleGrowMode(*args, **kwargs):
248ed943
RD
10097 """
10098 GetNonFlexibleGrowMode(self) -> int
10099
10100 Returns the value that specifies how the sizer grows in the
10101 non-flexible direction if there is one.
10102
10103 :see: `SetNonFlexibleGrowMode`
10104 """
54f9ee45 10105 return _core_.FlexGridSizer_GetNonFlexibleGrowMode(*args, **kwargs)
e811c8ce
RD
10106
10107 def GetRowHeights(*args, **kwargs):
fd2dc343
RD
10108 """
10109 GetRowHeights(self) -> list
10110
10111 Returns a list of integers representing the heights of each of the
10112 rows in the sizer.
10113 """
54f9ee45 10114 return _core_.FlexGridSizer_GetRowHeights(*args, **kwargs)
e811c8ce
RD
10115
10116 def GetColWidths(*args, **kwargs):
fd2dc343
RD
10117 """
10118 GetColWidths(self) -> list
10119
10120 Returns a list of integers representing the widths of each of the
10121 columns in the sizer.
10122 """
54f9ee45 10123 return _core_.FlexGridSizer_GetColWidths(*args, **kwargs)
e811c8ce 10124
d14a1e28
RD
10125
10126class FlexGridSizerPtr(FlexGridSizer):
10127 def __init__(self, this):
10128 self.this = this
10129 if not hasattr(self,"thisown"): self.thisown = 0
10130 self.__class__ = FlexGridSizer
54f9ee45 10131_core_.FlexGridSizer_swigregister(FlexGridSizerPtr)
d14a1e28 10132
e505d15e
RD
10133class StdDialogButtonSizer(BoxSizer):
10134 """
10135 A special sizer that knows how to order and position standard buttons
10136 in order to conform to the current platform's standards. You simply
10137 need to add each `wx.Button` to the sizer, and be sure to create the
10138 buttons using the standard ID's. Then call `Finalize` and the sizer
10139 will take care of the rest.
10140
10141 """
10142 def __repr__(self):
10143 return "<%s.%s; proxy of C++ wxStdDialogButtonSizer instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
10144 def __init__(self, *args, **kwargs):
10145 """__init__(self) -> StdDialogButtonSizer"""
10146 newobj = _core_.new_StdDialogButtonSizer(*args, **kwargs)
10147 self.this = newobj.this
10148 self.thisown = 1
10149 del newobj.thisown
10150 def AddButton(*args, **kwargs):
10151 """
10152 AddButton(self, wxButton button)
10153
10154 Use this to add the buttons to this sizer. Do not use the `Add`
10155 method in the base class.
10156 """
10157 return _core_.StdDialogButtonSizer_AddButton(*args, **kwargs)
10158
10159 def Finalise(*args, **kwargs):
10160 """
10161 Finalise(self)
10162
10163 This funciton needs to be called after all the buttons have been added
10164 to the sizer. It will reorder them and position them in a platform
10165 specifc manner.
10166 """
10167 return _core_.StdDialogButtonSizer_Finalise(*args, **kwargs)
51b83b37
RD
10168
10169 def SetAffirmativeButton(*args, **kwargs):
10170 """SetAffirmativeButton(self, wxButton button)"""
10171 return _core_.StdDialogButtonSizer_SetAffirmativeButton(*args, **kwargs)
10172
10173 def SetNegativeButton(*args, **kwargs):
10174 """SetNegativeButton(self, wxButton button)"""
10175 return _core_.StdDialogButtonSizer_SetNegativeButton(*args, **kwargs)
10176
10177 def SetCancelButton(*args, **kwargs):
10178 """SetCancelButton(self, wxButton button)"""
10179 return _core_.StdDialogButtonSizer_SetCancelButton(*args, **kwargs)
e505d15e
RD
10180
10181 def GetAffirmativeButton(*args, **kwargs):
10182 """GetAffirmativeButton(self) -> wxButton"""
10183 return _core_.StdDialogButtonSizer_GetAffirmativeButton(*args, **kwargs)
10184
10185 def GetApplyButton(*args, **kwargs):
10186 """GetApplyButton(self) -> wxButton"""
10187 return _core_.StdDialogButtonSizer_GetApplyButton(*args, **kwargs)
10188
10189 def GetNegativeButton(*args, **kwargs):
10190 """GetNegativeButton(self) -> wxButton"""
10191 return _core_.StdDialogButtonSizer_GetNegativeButton(*args, **kwargs)
10192
10193 def GetCancelButton(*args, **kwargs):
10194 """GetCancelButton(self) -> wxButton"""
10195 return _core_.StdDialogButtonSizer_GetCancelButton(*args, **kwargs)
10196
10197 def GetHelpButton(*args, **kwargs):
10198 """GetHelpButton(self) -> wxButton"""
10199 return _core_.StdDialogButtonSizer_GetHelpButton(*args, **kwargs)
10200
10201
10202class StdDialogButtonSizerPtr(StdDialogButtonSizer):
10203 def __init__(self, this):
10204 self.this = this
10205 if not hasattr(self,"thisown"): self.thisown = 0
10206 self.__class__ = StdDialogButtonSizer
10207_core_.StdDialogButtonSizer_swigregister(StdDialogButtonSizerPtr)
10208
d14a1e28
RD
10209#---------------------------------------------------------------------------
10210
10211class GBPosition(object):
248ed943
RD
10212 """
10213 This class represents the position of an item in a virtual grid of
10214 rows and columns managed by a `wx.GridBagSizer`. wxPython has
10215 typemaps that will automatically convert from a 2-element sequence of
10216 integers to a wx.GBPosition, so you can use the more pythonic
10217 representation of the position nearly transparently in Python code.
10218 """
e811c8ce
RD
10219 def __repr__(self):
10220 return "<%s.%s; proxy of C++ wxGBPosition instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 10221 def __init__(self, *args, **kwargs):
248ed943
RD
10222 """
10223 __init__(self, int row=0, int col=0) -> GBPosition
10224
10225 This class represents the position of an item in a virtual grid of
10226 rows and columns managed by a `wx.GridBagSizer`. wxPython has
10227 typemaps that will automatically convert from a 2-element sequence of
10228 integers to a wx.GBPosition, so you can use the more pythonic
10229 representation of the position nearly transparently in Python code.
10230 """
54f9ee45 10231 newobj = _core_.new_GBPosition(*args, **kwargs)
d14a1e28
RD
10232 self.this = newobj.this
10233 self.thisown = 1
10234 del newobj.thisown
e811c8ce 10235 def GetRow(*args, **kwargs):
a95a7133 10236 """GetRow(self) -> int"""
54f9ee45 10237 return _core_.GBPosition_GetRow(*args, **kwargs)
e811c8ce
RD
10238
10239 def GetCol(*args, **kwargs):
a95a7133 10240 """GetCol(self) -> int"""
54f9ee45 10241 return _core_.GBPosition_GetCol(*args, **kwargs)
e811c8ce
RD
10242
10243 def SetRow(*args, **kwargs):
a95a7133 10244 """SetRow(self, int row)"""
54f9ee45 10245 return _core_.GBPosition_SetRow(*args, **kwargs)
e811c8ce
RD
10246
10247 def SetCol(*args, **kwargs):
a95a7133 10248 """SetCol(self, int col)"""
54f9ee45 10249 return _core_.GBPosition_SetCol(*args, **kwargs)
e811c8ce
RD
10250
10251 def __eq__(*args, **kwargs):
a95a7133 10252 """__eq__(self, GBPosition other) -> bool"""
54f9ee45 10253 return _core_.GBPosition___eq__(*args, **kwargs)
e811c8ce
RD
10254
10255 def __ne__(*args, **kwargs):
a95a7133 10256 """__ne__(self, GBPosition other) -> bool"""
54f9ee45 10257 return _core_.GBPosition___ne__(*args, **kwargs)
e811c8ce
RD
10258
10259 def Set(*args, **kwargs):
a95a7133 10260 """Set(self, int row=0, int col=0)"""
54f9ee45 10261 return _core_.GBPosition_Set(*args, **kwargs)
e811c8ce
RD
10262
10263 def Get(*args, **kwargs):
a95a7133 10264 """Get(self) -> PyObject"""
54f9ee45 10265 return _core_.GBPosition_Get(*args, **kwargs)
e811c8ce 10266
41e2b43e 10267 asTuple = wx._deprecated(Get, "asTuple is deprecated, use `Get` instead")
e811c8ce
RD
10268 def __str__(self): return str(self.Get())
10269 def __repr__(self): return 'wx.GBPosition'+str(self.Get())
10270 def __len__(self): return len(self.Get())
10271 def __getitem__(self, index): return self.Get()[index]
d14a1e28
RD
10272 def __setitem__(self, index, val):
10273 if index == 0: self.SetRow(val)
10274 elif index == 1: self.SetCol(val)
10275 else: raise IndexError
e811c8ce 10276 def __nonzero__(self): return self.Get() != (0,0)
74e96f3d
RD
10277 __safe_for_unpickling__ = True
10278 def __reduce__(self): return (wx.GBPosition, self.Get())
d14a1e28
RD
10279
10280 row = property(GetRow, SetRow)
10281 col = property(GetCol, SetCol)
10282
10283
10284class GBPositionPtr(GBPosition):
10285 def __init__(self, this):
10286 self.this = this
10287 if not hasattr(self,"thisown"): self.thisown = 0
10288 self.__class__ = GBPosition
54f9ee45 10289_core_.GBPosition_swigregister(GBPositionPtr)
d14a1e28
RD
10290
10291class GBSpan(object):
248ed943
RD
10292 """
10293 This class is used to hold the row and column spanning attributes of
10294 items in a `wx.GridBagSizer`. wxPython has typemaps that will
10295 automatically convert from a 2-element sequence of integers to a
10296 wx.GBSpan, so you can use the more pythonic representation of the span
10297 nearly transparently in Python code.
10298
10299 """
e811c8ce
RD
10300 def __repr__(self):
10301 return "<%s.%s; proxy of C++ wxGBSpan instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 10302 def __init__(self, *args, **kwargs):
248ed943
RD
10303 """
10304 __init__(self, int rowspan=1, int colspan=1) -> GBSpan
10305
10306 Construct a new wxGBSpan, optionally setting the rowspan and
10307 colspan. The default is (1,1). (Meaning that the item occupies one
10308 cell in each direction.
10309 """
54f9ee45 10310 newobj = _core_.new_GBSpan(*args, **kwargs)
d14a1e28
RD
10311 self.this = newobj.this
10312 self.thisown = 1
10313 del newobj.thisown
e811c8ce 10314 def GetRowspan(*args, **kwargs):
a95a7133 10315 """GetRowspan(self) -> int"""
54f9ee45 10316 return _core_.GBSpan_GetRowspan(*args, **kwargs)
e811c8ce
RD
10317
10318 def GetColspan(*args, **kwargs):
a95a7133 10319 """GetColspan(self) -> int"""
54f9ee45 10320 return _core_.GBSpan_GetColspan(*args, **kwargs)
e811c8ce
RD
10321
10322 def SetRowspan(*args, **kwargs):
a95a7133 10323 """SetRowspan(self, int rowspan)"""
54f9ee45 10324 return _core_.GBSpan_SetRowspan(*args, **kwargs)
e811c8ce
RD
10325
10326 def SetColspan(*args, **kwargs):
a95a7133 10327 """SetColspan(self, int colspan)"""
54f9ee45 10328 return _core_.GBSpan_SetColspan(*args, **kwargs)
e811c8ce
RD
10329
10330 def __eq__(*args, **kwargs):
a95a7133 10331 """__eq__(self, GBSpan other) -> bool"""
54f9ee45 10332 return _core_.GBSpan___eq__(*args, **kwargs)
e811c8ce
RD
10333
10334 def __ne__(*args, **kwargs):
a95a7133 10335 """__ne__(self, GBSpan other) -> bool"""
54f9ee45 10336 return _core_.GBSpan___ne__(*args, **kwargs)
e811c8ce
RD
10337
10338 def Set(*args, **kwargs):
a95a7133 10339 """Set(self, int rowspan=1, int colspan=1)"""
54f9ee45 10340 return _core_.GBSpan_Set(*args, **kwargs)
e811c8ce
RD
10341
10342 def Get(*args, **kwargs):
a95a7133 10343 """Get(self) -> PyObject"""
54f9ee45 10344 return _core_.GBSpan_Get(*args, **kwargs)
e811c8ce 10345
41e2b43e 10346 asTuple = wx._deprecated(Get, "asTuple is deprecated, use `Get` instead")
e811c8ce
RD
10347 def __str__(self): return str(self.Get())
10348 def __repr__(self): return 'wx.GBSpan'+str(self.Get())
10349 def __len__(self): return len(self.Get())
10350 def __getitem__(self, index): return self.Get()[index]
d14a1e28
RD
10351 def __setitem__(self, index, val):
10352 if index == 0: self.SetRowspan(val)
10353 elif index == 1: self.SetColspan(val)
10354 else: raise IndexError
e811c8ce 10355 def __nonzero__(self): return self.Get() != (0,0)
74e96f3d
RD
10356 __safe_for_unpickling__ = True
10357 def __reduce__(self): return (wx.GBSpan, self.Get())
d14a1e28
RD
10358
10359 rowspan = property(GetRowspan, SetRowspan)
10360 colspan = property(GetColspan, SetColspan)
10361
10362
10363class GBSpanPtr(GBSpan):
10364 def __init__(self, this):
10365 self.this = this
10366 if not hasattr(self,"thisown"): self.thisown = 0
10367 self.__class__ = GBSpan
54f9ee45 10368_core_.GBSpan_swigregister(GBSpanPtr)
d14a1e28
RD
10369
10370class GBSizerItem(SizerItem):
248ed943
RD
10371 """
10372 The wx.GBSizerItem class is used to track the additional data about
10373 items in a `wx.GridBagSizer` such as the item's position in the grid
10374 and how many rows or columns it spans.
10375
10376 """
e811c8ce
RD
10377 def __repr__(self):
10378 return "<%s.%s; proxy of C++ wxGBSizerItem instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 10379 def __init__(self, *args, **kwargs):
248ed943
RD
10380 """
10381 __init__(self) -> GBSizerItem
10382
10383 Constructs an empty wx.GBSizerItem. Either a window, sizer or spacer
10384 size will need to be set, as well as a position and span before this
10385 item can be used in a Sizer.
10386
10387 You will probably never need to create a wx.GBSizerItem directly as they
10388 are created automatically when the sizer's Add method is called.
10389 """
54f9ee45 10390 newobj = _core_.new_GBSizerItem(*args, **kwargs)
d14a1e28
RD
10391 self.this = newobj.this
10392 self.thisown = 1
10393 del newobj.thisown
e811c8ce 10394 def GetPos(*args, **kwargs):
248ed943
RD
10395 """
10396 GetPos(self) -> GBPosition
10397
10398 Get the grid position of the item
10399 """
54f9ee45 10400 return _core_.GBSizerItem_GetPos(*args, **kwargs)
e811c8ce
RD
10401
10402 def GetPosTuple(self): return self.GetPos().Get()
10403 def GetSpan(*args, **kwargs):
248ed943
RD
10404 """
10405 GetSpan(self) -> GBSpan
10406
10407 Get the row and column spanning of the item
10408 """
54f9ee45 10409 return _core_.GBSizerItem_GetSpan(*args, **kwargs)
e811c8ce
RD
10410
10411 def GetSpanTuple(self): return self.GetSpan().Get()
10412 def SetPos(*args, **kwargs):
248ed943
RD
10413 """
10414 SetPos(self, GBPosition pos) -> bool
10415
10416 If the item is already a member of a sizer then first ensure that
10417 there is no other item that would intersect with this one at the new
10418 position, then set the new position. Returns True if the change is
10419 successful and after the next Layout() the item will be moved.
10420 """
54f9ee45 10421 return _core_.GBSizerItem_SetPos(*args, **kwargs)
e811c8ce
RD
10422
10423 def SetSpan(*args, **kwargs):
248ed943
RD
10424 """
10425 SetSpan(self, GBSpan span) -> bool
10426
10427 If the item is already a member of a sizer then first ensure that
10428 there is no other item that would intersect with this one with its new
10429 spanning size, then set the new spanning. Returns True if the change
10430 is successful and after the next Layout() the item will be resized.
10431
10432 """
54f9ee45 10433 return _core_.GBSizerItem_SetSpan(*args, **kwargs)
e811c8ce 10434
248ed943 10435 def Intersects(*args, **kwargs):
0df68c9f 10436 """
a95a7133 10437 Intersects(self, GBSizerItem other) -> bool
248ed943
RD
10438
10439 Returns True if this item and the other item instersect.
0df68c9f 10440 """
248ed943
RD
10441 return _core_.GBSizerItem_Intersects(*args, **kwargs)
10442
10443 def IntersectsPos(*args, **kwargs):
10444 """
10445 IntersectsPos(self, GBPosition pos, GBSpan span) -> bool
10446
10447 Returns True if the given pos/span would intersect with this item.
10448 """
10449 return _core_.GBSizerItem_IntersectsPos(*args, **kwargs)
e811c8ce
RD
10450
10451 def GetEndPos(*args, **kwargs):
248ed943
RD
10452 """
10453 GetEndPos(self) -> GBPosition
10454
10455 Get the row and column of the endpoint of this item.
10456 """
54f9ee45 10457 return _core_.GBSizerItem_GetEndPos(*args, **kwargs)
e811c8ce
RD
10458
10459 def GetGBSizer(*args, **kwargs):
248ed943
RD
10460 """
10461 GetGBSizer(self) -> GridBagSizer
10462
10463 Get the sizer this item is a member of.
10464 """
54f9ee45 10465 return _core_.GBSizerItem_GetGBSizer(*args, **kwargs)
e811c8ce
RD
10466
10467 def SetGBSizer(*args, **kwargs):
248ed943
RD
10468 """
10469 SetGBSizer(self, GridBagSizer sizer)
10470
10471 Set the sizer this item is a member of.
10472 """
54f9ee45 10473 return _core_.GBSizerItem_SetGBSizer(*args, **kwargs)
e811c8ce 10474
d14a1e28
RD
10475
10476class GBSizerItemPtr(GBSizerItem):
10477 def __init__(self, this):
10478 self.this = this
10479 if not hasattr(self,"thisown"): self.thisown = 0
10480 self.__class__ = GBSizerItem
54f9ee45 10481_core_.GBSizerItem_swigregister(GBSizerItemPtr)
d14a1e28
RD
10482DefaultSpan = cvar.DefaultSpan
10483
10484def GBSizerItemWindow(*args, **kwargs):
0df68c9f
RD
10485 """
10486 GBSizerItemWindow(Window window, GBPosition pos, GBSpan span, int flag,
248ed943
RD
10487 int border, PyObject userData=None) -> GBSizerItem
10488
10489 Construct a `wx.GBSizerItem` for a window.
0df68c9f 10490 """
54f9ee45 10491 val = _core_.new_GBSizerItemWindow(*args, **kwargs)
d14a1e28
RD
10492 val.thisown = 1
10493 return val
10494
10495def GBSizerItemSizer(*args, **kwargs):
0df68c9f
RD
10496 """
10497 GBSizerItemSizer(Sizer sizer, GBPosition pos, GBSpan span, int flag,
248ed943
RD
10498 int border, PyObject userData=None) -> GBSizerItem
10499
10500 Construct a `wx.GBSizerItem` for a sizer
0df68c9f 10501 """
54f9ee45 10502 val = _core_.new_GBSizerItemSizer(*args, **kwargs)
d14a1e28
RD
10503 val.thisown = 1
10504 return val
10505
10506def GBSizerItemSpacer(*args, **kwargs):
0df68c9f
RD
10507 """
10508 GBSizerItemSpacer(int width, int height, GBPosition pos, GBSpan span,
248ed943
RD
10509 int flag, int border, PyObject userData=None) -> GBSizerItem
10510
10511 Construct a `wx.GBSizerItem` for a spacer.
0df68c9f 10512 """
54f9ee45 10513 val = _core_.new_GBSizerItemSpacer(*args, **kwargs)
d14a1e28
RD
10514 val.thisown = 1
10515 return val
10516
10517class GridBagSizer(FlexGridSizer):
248ed943
RD
10518 """
10519 A `wx.Sizer` that can lay out items in a virtual grid like a
10520 `wx.FlexGridSizer` but in this case explicit positioning of the items
10521 is allowed using `wx.GBPosition`, and items can optionally span more
10522 than one row and/or column using `wx.GBSpan`. The total size of the
10523 virtual grid is determined by the largest row and column that items are
10524 positioned at, adjusted for spanning.
10525
10526 """
e811c8ce
RD
10527 def __repr__(self):
10528 return "<%s.%s; proxy of C++ wxGridBagSizer instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 10529 def __init__(self, *args, **kwargs):
248ed943
RD
10530 """
10531 __init__(self, int vgap=0, int hgap=0) -> GridBagSizer
10532
10533 Constructor, with optional parameters to specify the gap between the
10534 rows and columns.
10535 """
54f9ee45 10536 newobj = _core_.new_GridBagSizer(*args, **kwargs)
d14a1e28
RD
10537 self.this = newobj.this
10538 self.thisown = 1
10539 del newobj.thisown
1823fbb4
RD
10540 self._setOORInfo(self)
10541
e811c8ce 10542 def Add(*args, **kwargs):
0df68c9f 10543 """
248ed943 10544 Add(self, item, GBPosition pos, GBSpan span=DefaultSpan, int flag=0,
d3b6e4ff 10545 int border=0, userData=None) -> wx.GBSizerItem
248ed943
RD
10546
10547 Adds an item to the sizer at the grid cell *pos*, optionally spanning
10548 more than one row or column as specified with *span*. The remaining
10549 args behave similarly to `wx.Sizer.Add`.
10550
10551 Returns True if the item was successfully placed at the given cell
10552 position, False if something was already there.
10553
0df68c9f 10554 """
54f9ee45 10555 return _core_.GridBagSizer_Add(*args, **kwargs)
e811c8ce
RD
10556
10557 def AddItem(*args, **kwargs):
248ed943 10558 """
d3b6e4ff 10559 Add(self, GBSizerItem item) -> wx.GBSizerItem
248ed943
RD
10560
10561 Add an item to the sizer using a `wx.GBSizerItem`. Returns True if
10562 the item was successfully placed at its given cell position, False if
10563 something was already there.
10564 """
54f9ee45 10565 return _core_.GridBagSizer_AddItem(*args, **kwargs)
e811c8ce 10566
84f85550
RD
10567 def GetCellSize(*args, **kwargs):
10568 """
10569 GetCellSize(self, int row, int col) -> Size
10570
10571 Get the size of the specified cell, including hgap and
10572 vgap. Only valid after a Layout.
10573 """
10574 return _core_.GridBagSizer_GetCellSize(*args, **kwargs)
10575
e811c8ce 10576 def GetEmptyCellSize(*args, **kwargs):
248ed943
RD
10577 """
10578 GetEmptyCellSize(self) -> Size
10579
10580 Get the size used for cells in the grid with no item.
10581 """
54f9ee45 10582 return _core_.GridBagSizer_GetEmptyCellSize(*args, **kwargs)
e811c8ce
RD
10583
10584 def SetEmptyCellSize(*args, **kwargs):
248ed943
RD
10585 """
10586 SetEmptyCellSize(self, Size sz)
10587
10588 Set the size used for cells in the grid with no item.
10589 """
54f9ee45 10590 return _core_.GridBagSizer_SetEmptyCellSize(*args, **kwargs)
e811c8ce
RD
10591
10592 def GetItemPosition(*args):
0df68c9f 10593 """
248ed943
RD
10594 GetItemPosition(self, item) -> GBPosition
10595
10596 Get the grid position of the specified *item* where *item* is either a
10597 window or subsizer that is a member of this sizer, or a zero-based
10598 index of an item.
0df68c9f 10599 """
54f9ee45 10600 return _core_.GridBagSizer_GetItemPosition(*args)
e811c8ce
RD
10601
10602 def SetItemPosition(*args):
0df68c9f 10603 """
248ed943
RD
10604 SetItemPosition(self, item, GBPosition pos) -> bool
10605
10606 Set the grid position of the specified *item* where *item* is either a
10607 window or subsizer that is a member of this sizer, or a zero-based
10608 index of an item. Returns True on success. If the move is not
10609 allowed (because an item is already there) then False is returned.
10610
0df68c9f 10611 """
54f9ee45 10612 return _core_.GridBagSizer_SetItemPosition(*args)
e811c8ce
RD
10613
10614 def GetItemSpan(*args):
0df68c9f 10615 """
248ed943
RD
10616 GetItemSpan(self, item) -> GBSpan
10617
10618 Get the row/col spanning of the specified *item* where *item* is
10619 either a window or subsizer that is a member of this sizer, or a
10620 zero-based index of an item.
0df68c9f 10621 """
54f9ee45 10622 return _core_.GridBagSizer_GetItemSpan(*args)
e811c8ce
RD
10623
10624 def SetItemSpan(*args):
0df68c9f 10625 """
248ed943
RD
10626 SetItemSpan(self, item, GBSpan span) -> bool
10627
10628 Set the row/col spanning of the specified *item* where *item* is
10629 either a window or subsizer that is a member of this sizer, or a
10630 zero-based index of an item. Returns True on success. If the move is
10631 not allowed (because an item is already there) then False is returned.
0df68c9f 10632 """
54f9ee45 10633 return _core_.GridBagSizer_SetItemSpan(*args)
e811c8ce
RD
10634
10635 def FindItem(*args):
0df68c9f 10636 """
248ed943
RD
10637 FindItem(self, item) -> GBSizerItem
10638
10639 Find the sizer item for the given window or subsizer, returns None if
10640 not found. (non-recursive)
0df68c9f 10641 """
54f9ee45 10642 return _core_.GridBagSizer_FindItem(*args)
e811c8ce
RD
10643
10644 def FindItemAtPosition(*args, **kwargs):
248ed943
RD
10645 """
10646 FindItemAtPosition(self, GBPosition pos) -> GBSizerItem
10647
10648 Return the sizer item for the given grid cell, or None if there is no
10649 item at that position. (non-recursive)
10650 """
54f9ee45 10651 return _core_.GridBagSizer_FindItemAtPosition(*args, **kwargs)
e811c8ce
RD
10652
10653 def FindItemAtPoint(*args, **kwargs):
248ed943
RD
10654 """
10655 FindItemAtPoint(self, Point pt) -> GBSizerItem
10656
10657 Return the sizer item located at the point given in *pt*, or None if
10658 there is no item at that point. The (x,y) coordinates in pt correspond
10659 to the client coordinates of the window using the sizer for
10660 layout. (non-recursive)
10661 """
54f9ee45 10662 return _core_.GridBagSizer_FindItemAtPoint(*args, **kwargs)
e811c8ce 10663
248ed943
RD
10664 def CheckForIntersection(*args, **kwargs):
10665 """
10666 CheckForIntersection(self, GBSizerItem item, GBSizerItem excludeItem=None) -> bool
e811c8ce 10667
248ed943
RD
10668 Look at all items and see if any intersect (or would overlap) the
10669 given *item*. Returns True if so, False if there would be no overlap.
10670 If an *excludeItem* is given then it will not be checked for
10671 intersection, for example it may be the item we are checking the
10672 position of.
e811c8ce 10673
248ed943
RD
10674 """
10675 return _core_.GridBagSizer_CheckForIntersection(*args, **kwargs)
e811c8ce 10676
248ed943 10677 def CheckForIntersectionPos(*args, **kwargs):
0df68c9f 10678 """
248ed943
RD
10679 CheckForIntersectionPos(self, GBPosition pos, GBSpan span, GBSizerItem excludeItem=None) -> bool
10680
10681 Look at all items and see if any intersect (or would overlap) the
10682 given position and span. Returns True if so, False if there would be
10683 no overlap. If an *excludeItem* is given then it will not be checked
10684 for intersection, for example it may be the item we are checking the
10685 position of.
0df68c9f 10686 """
248ed943 10687 return _core_.GridBagSizer_CheckForIntersectionPos(*args, **kwargs)
e811c8ce 10688
d14a1e28
RD
10689
10690class GridBagSizerPtr(GridBagSizer):
10691 def __init__(self, this):
10692 self.this = this
10693 if not hasattr(self,"thisown"): self.thisown = 0
10694 self.__class__ = GridBagSizer
54f9ee45 10695_core_.GridBagSizer_swigregister(GridBagSizerPtr)
d14a1e28
RD
10696
10697#---------------------------------------------------------------------------
10698
54f9ee45
RD
10699Left = _core_.Left
10700Top = _core_.Top
10701Right = _core_.Right
10702Bottom = _core_.Bottom
10703Width = _core_.Width
10704Height = _core_.Height
10705Centre = _core_.Centre
10706Center = _core_.Center
10707CentreX = _core_.CentreX
10708CentreY = _core_.CentreY
10709Unconstrained = _core_.Unconstrained
10710AsIs = _core_.AsIs
10711PercentOf = _core_.PercentOf
10712Above = _core_.Above
10713Below = _core_.Below
10714LeftOf = _core_.LeftOf
10715RightOf = _core_.RightOf
10716SameAs = _core_.SameAs
10717Absolute = _core_.Absolute
d14a1e28 10718class IndividualLayoutConstraint(Object):
15afbcd0 10719 """
41e2b43e
RD
10720 Objects of this class are stored in the `wx.LayoutConstraints` class as
10721 one of eight possible constraints that a window can be involved in.
10722 You will never need to create an instance of
10723 wx.IndividualLayoutConstraint, rather you should create a
10724 `wx.LayoutConstraints` instance and use the individual contstraints
15afbcd0 10725 that it contains.
15afbcd0 10726 """
d14a1e28
RD
10727 def __init__(self): raise RuntimeError, "No constructor defined"
10728 def __repr__(self):
10729 return "<%s.%s; proxy of C++ wxIndividualLayoutConstraint instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
e811c8ce 10730 def Set(*args, **kwargs):
41e2b43e
RD
10731 """
10732 Set(self, int rel, Window otherW, int otherE, int val=0, int marg=wxLAYOUT_DEFAULT_MARGIN)
10733
10734 Sets the properties of the constraint. Normally called by one of the
10735 convenience functions such as Above, RightOf, SameAs.
10736 """
54f9ee45 10737 return _core_.IndividualLayoutConstraint_Set(*args, **kwargs)
e811c8ce
RD
10738
10739 def LeftOf(*args, **kwargs):
15afbcd0 10740 """
a95a7133 10741 LeftOf(self, Window sibling, int marg=0)
15afbcd0 10742
41e2b43e
RD
10743 Constrains this edge to be to the left of the given window, with an
10744 optional margin. Implicitly, this is relative to the left edge of the
10745 other window.
15afbcd0 10746 """
54f9ee45 10747 return _core_.IndividualLayoutConstraint_LeftOf(*args, **kwargs)
e811c8ce
RD
10748
10749 def RightOf(*args, **kwargs):
15afbcd0 10750 """
a95a7133 10751 RightOf(self, Window sibling, int marg=0)
15afbcd0 10752
41e2b43e
RD
10753 Constrains this edge to be to the right of the given window, with an
10754 optional margin. Implicitly, this is relative to the right edge of the
10755 other window.
15afbcd0 10756 """
54f9ee45 10757 return _core_.IndividualLayoutConstraint_RightOf(*args, **kwargs)
e811c8ce
RD
10758
10759 def Above(*args, **kwargs):
15afbcd0 10760 """
a95a7133 10761 Above(self, Window sibling, int marg=0)
15afbcd0 10762
41e2b43e
RD
10763 Constrains this edge to be above the given window, with an optional
10764 margin. Implicitly, this is relative to the top edge of the other
10765 window.
15afbcd0 10766 """
54f9ee45 10767 return _core_.IndividualLayoutConstraint_Above(*args, **kwargs)
e811c8ce
RD
10768
10769 def Below(*args, **kwargs):
15afbcd0 10770 """
a95a7133 10771 Below(self, Window sibling, int marg=0)
15afbcd0 10772
41e2b43e
RD
10773 Constrains this edge to be below the given window, with an optional
10774 margin. Implicitly, this is relative to the bottom edge of the other
10775 window.
15afbcd0 10776 """
54f9ee45 10777 return _core_.IndividualLayoutConstraint_Below(*args, **kwargs)
e811c8ce
RD
10778
10779 def SameAs(*args, **kwargs):
15afbcd0 10780 """
a95a7133 10781 SameAs(self, Window otherW, int edge, int marg=0)
15afbcd0 10782
41e2b43e
RD
10783 Constrains this edge or dimension to be to the same as the edge of the
10784 given window, with an optional margin.
15afbcd0 10785 """
54f9ee45 10786 return _core_.IndividualLayoutConstraint_SameAs(*args, **kwargs)
e811c8ce
RD
10787
10788 def PercentOf(*args, **kwargs):
15afbcd0 10789 """
a95a7133 10790 PercentOf(self, Window otherW, int wh, int per)
15afbcd0 10791
41e2b43e
RD
10792 Constrains this edge or dimension to be to a percentage of the given
10793 window, with an optional margin.
15afbcd0 10794 """
54f9ee45 10795 return _core_.IndividualLayoutConstraint_PercentOf(*args, **kwargs)
e811c8ce
RD
10796
10797 def Absolute(*args, **kwargs):
15afbcd0 10798 """
a95a7133 10799 Absolute(self, int val)
15afbcd0 10800
41e2b43e 10801 Constrains this edge or dimension to be the given absolute value.
15afbcd0 10802 """
54f9ee45 10803 return _core_.IndividualLayoutConstraint_Absolute(*args, **kwargs)
e811c8ce
RD
10804
10805 def Unconstrained(*args, **kwargs):
15afbcd0 10806 """
a95a7133 10807 Unconstrained(self)
15afbcd0 10808
41e2b43e
RD
10809 Sets this edge or dimension to be unconstrained, that is, dependent on
10810 other edges and dimensions from which this value can be deduced.
15afbcd0 10811 """
54f9ee45 10812 return _core_.IndividualLayoutConstraint_Unconstrained(*args, **kwargs)
e811c8ce
RD
10813
10814 def AsIs(*args, **kwargs):
15afbcd0 10815 """
a95a7133 10816 AsIs(self)
15afbcd0 10817
41e2b43e
RD
10818 Sets this edge or constraint to be whatever the window's value is at
10819 the moment. If either of the width and height constraints are *as is*,
10820 the window will not be resized, but moved instead. This is important
10821 when considering panel items which are intended to have a default
10822 size, such as a button, which may take its size from the size of the
10823 button label.
15afbcd0 10824 """
54f9ee45 10825 return _core_.IndividualLayoutConstraint_AsIs(*args, **kwargs)
e811c8ce
RD
10826
10827 def GetOtherWindow(*args, **kwargs):
a95a7133 10828 """GetOtherWindow(self) -> Window"""
54f9ee45 10829 return _core_.IndividualLayoutConstraint_GetOtherWindow(*args, **kwargs)
e811c8ce
RD
10830
10831 def GetMyEdge(*args, **kwargs):
a95a7133 10832 """GetMyEdge(self) -> int"""
54f9ee45 10833 return _core_.IndividualLayoutConstraint_GetMyEdge(*args, **kwargs)
e811c8ce
RD
10834
10835 def SetEdge(*args, **kwargs):
a95a7133 10836 """SetEdge(self, int which)"""
54f9ee45 10837 return _core_.IndividualLayoutConstraint_SetEdge(*args, **kwargs)
e811c8ce
RD
10838
10839 def SetValue(*args, **kwargs):
a95a7133 10840 """SetValue(self, int v)"""
54f9ee45 10841 return _core_.IndividualLayoutConstraint_SetValue(*args, **kwargs)
e811c8ce
RD
10842
10843 def GetMargin(*args, **kwargs):
a95a7133 10844 """GetMargin(self) -> int"""
54f9ee45 10845 return _core_.IndividualLayoutConstraint_GetMargin(*args, **kwargs)
e811c8ce
RD
10846
10847 def SetMargin(*args, **kwargs):
a95a7133 10848 """SetMargin(self, int m)"""
54f9ee45 10849 return _core_.IndividualLayoutConstraint_SetMargin(*args, **kwargs)
e811c8ce
RD
10850
10851 def GetValue(*args, **kwargs):
a95a7133 10852 """GetValue(self) -> int"""
54f9ee45 10853 return _core_.IndividualLayoutConstraint_GetValue(*args, **kwargs)
e811c8ce
RD
10854
10855 def GetPercent(*args, **kwargs):
a95a7133 10856 """GetPercent(self) -> int"""
54f9ee45 10857 return _core_.IndividualLayoutConstraint_GetPercent(*args, **kwargs)
e811c8ce
RD
10858
10859 def GetOtherEdge(*args, **kwargs):
a95a7133 10860 """GetOtherEdge(self) -> int"""
54f9ee45 10861 return _core_.IndividualLayoutConstraint_GetOtherEdge(*args, **kwargs)
e811c8ce
RD
10862
10863 def GetDone(*args, **kwargs):
a95a7133 10864 """GetDone(self) -> bool"""
54f9ee45 10865 return _core_.IndividualLayoutConstraint_GetDone(*args, **kwargs)
e811c8ce
RD
10866
10867 def SetDone(*args, **kwargs):
a95a7133 10868 """SetDone(self, bool d)"""
54f9ee45 10869 return _core_.IndividualLayoutConstraint_SetDone(*args, **kwargs)
e811c8ce
RD
10870
10871 def GetRelationship(*args, **kwargs):
a95a7133 10872 """GetRelationship(self) -> int"""
54f9ee45 10873 return _core_.IndividualLayoutConstraint_GetRelationship(*args, **kwargs)
e811c8ce
RD
10874
10875 def SetRelationship(*args, **kwargs):
a95a7133 10876 """SetRelationship(self, int r)"""
54f9ee45 10877 return _core_.IndividualLayoutConstraint_SetRelationship(*args, **kwargs)
e811c8ce
RD
10878
10879 def ResetIfWin(*args, **kwargs):
15afbcd0 10880 """
a95a7133 10881 ResetIfWin(self, Window otherW) -> bool
15afbcd0
RD
10882
10883 Reset constraint if it mentions otherWin
10884 """
54f9ee45 10885 return _core_.IndividualLayoutConstraint_ResetIfWin(*args, **kwargs)
e811c8ce
RD
10886
10887 def SatisfyConstraint(*args, **kwargs):
15afbcd0 10888 """
a95a7133 10889 SatisfyConstraint(self, LayoutConstraints constraints, Window win) -> bool
15afbcd0
RD
10890
10891 Try to satisfy constraint
10892 """
54f9ee45 10893 return _core_.IndividualLayoutConstraint_SatisfyConstraint(*args, **kwargs)
e811c8ce
RD
10894
10895 def GetEdge(*args, **kwargs):
15afbcd0 10896 """
a95a7133 10897 GetEdge(self, int which, Window thisWin, Window other) -> int
15afbcd0
RD
10898
10899 Get the value of this edge or dimension, or if this
10900 is not determinable, -1.
10901 """
54f9ee45 10902 return _core_.IndividualLayoutConstraint_GetEdge(*args, **kwargs)
e811c8ce 10903
d14a1e28
RD
10904
10905class IndividualLayoutConstraintPtr(IndividualLayoutConstraint):
10906 def __init__(self, this):
10907 self.this = this
10908 if not hasattr(self,"thisown"): self.thisown = 0
10909 self.__class__ = IndividualLayoutConstraint
54f9ee45 10910_core_.IndividualLayoutConstraint_swigregister(IndividualLayoutConstraintPtr)
d14a1e28
RD
10911
10912class LayoutConstraints(Object):
15afbcd0 10913 """
41e2b43e
RD
10914 **Note:** constraints are now deprecated and you should use sizers
10915 instead.
15afbcd0 10916
41e2b43e
RD
10917 Objects of this class can be associated with a window to define its
10918 layout constraints, with respect to siblings or its parent.
15afbcd0
RD
10919
10920 The class consists of the following eight constraints of class
10921 wx.IndividualLayoutConstraint, some or all of which should be accessed
10922 directly to set the appropriate constraints.
10923
10924 * left: represents the left hand edge of the window
10925 * right: represents the right hand edge of the window
10926 * top: represents the top edge of the window
10927 * bottom: represents the bottom edge of the window
10928 * width: represents the width of the window
10929 * height: represents the height of the window
10930 * centreX: represents the horizontal centre point of the window
10931 * centreY: represents the vertical centre point of the window
10932
41e2b43e
RD
10933 Most constraints are initially set to have the relationship
10934 wxUnconstrained, which means that their values should be calculated by
10935 looking at known constraints. The exceptions are width and height,
10936 which are set to wxAsIs to ensure that if the user does not specify a
10937 constraint, the existing width and height will be used, to be
10938 compatible with panel items which often have take a default size. If
10939 the constraint is ``wx.AsIs``, the dimension will not be changed.
10940
10941 :see: `wx.IndividualLayoutConstraint`, `wx.Window.SetConstraints`
15afbcd0
RD
10942
10943 """
e811c8ce
RD
10944 def __repr__(self):
10945 return "<%s.%s; proxy of C++ wxLayoutConstraints instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
54f9ee45
RD
10946 left = property(_core_.LayoutConstraints_left_get)
10947 top = property(_core_.LayoutConstraints_top_get)
10948 right = property(_core_.LayoutConstraints_right_get)
10949 bottom = property(_core_.LayoutConstraints_bottom_get)
10950 width = property(_core_.LayoutConstraints_width_get)
10951 height = property(_core_.LayoutConstraints_height_get)
10952 centreX = property(_core_.LayoutConstraints_centreX_get)
10953 centreY = property(_core_.LayoutConstraints_centreY_get)
d14a1e28 10954 def __init__(self, *args, **kwargs):
a95a7133 10955 """__init__(self) -> LayoutConstraints"""
54f9ee45 10956 newobj = _core_.new_LayoutConstraints(*args, **kwargs)
d14a1e28
RD
10957 self.this = newobj.this
10958 self.thisown = 1
10959 del newobj.thisown
e811c8ce 10960 def SatisfyConstraints(*args, **kwargs):
6c3b4aae 10961 """SatisfyConstraints(Window win) -> (areSatisfied, noChanges)"""
54f9ee45 10962 return _core_.LayoutConstraints_SatisfyConstraints(*args, **kwargs)
e811c8ce
RD
10963
10964 def AreSatisfied(*args, **kwargs):
a95a7133 10965 """AreSatisfied(self) -> bool"""
54f9ee45 10966 return _core_.LayoutConstraints_AreSatisfied(*args, **kwargs)
e811c8ce 10967
d14a1e28
RD
10968
10969class LayoutConstraintsPtr(LayoutConstraints):
10970 def __init__(self, this):
10971 self.this = this
10972 if not hasattr(self,"thisown"): self.thisown = 0
10973 self.__class__ = LayoutConstraints
54f9ee45 10974_core_.LayoutConstraints_swigregister(LayoutConstraintsPtr)
d14a1e28
RD
10975
10976#----------------------------------------------------------------------------
10977
322913ce 10978# Use Python's bool constants if available, make some if not
d14a1e28
RD
10979try:
10980 True
10981except NameError:
322913ce
RD
10982 __builtins__.True = 1==1
10983 __builtins__.False = 1==0
4f89f6a3
RD
10984 def bool(value): return not not value
10985 __builtins__.bool = bool
d14a1e28 10986
d14a1e28
RD
10987
10988
10989# workarounds for bad wxRTTI names
10990__wxPyPtrTypeMap['wxGauge95'] = 'wxGauge'
10991__wxPyPtrTypeMap['wxSlider95'] = 'wxSlider'
10992__wxPyPtrTypeMap['wxStatusBar95'] = 'wxStatusBar'
10993
10994
10995#----------------------------------------------------------------------------
10996# Load version numbers from __version__... Ensure that major and minor
7bc1e663 10997# versions are the same for both wxPython and wxWidgets.
d14a1e28
RD
10998
10999from __version__ import *
11000__version__ = VERSION_STRING
11001
7bc1e663
RD
11002assert MAJOR_VERSION == _core_.MAJOR_VERSION, "wxPython/wxWidgets version mismatch"
11003assert MINOR_VERSION == _core_.MINOR_VERSION, "wxPython/wxWidgets version mismatch"
54f9ee45 11004if RELEASE_VERSION != _core_.RELEASE_VERSION:
d14a1e28 11005 import warnings
7bc1e663 11006 warnings.warn("wxPython/wxWidgets release number mismatch")
d14a1e28
RD
11007
11008#----------------------------------------------------------------------------
11009
e505d15e
RD
11010# Set the default string<-->unicode conversion encoding from the
11011# locale. This encoding is used when string or unicode objects need
11012# to be converted in order to pass them to wxWidgets. Please be aware
11013# that the default encoding within the same locale may be slightly
11014# different on different platforms. For example, please see
11015# http://www.alanwood.net/demos/charsetdiffs.html for differences
11016# between the common latin/roman encodings.
5cbf236d
RD
11017import locale
11018default = locale.getdefaultlocale()[1]
11019if default:
11020 wx.SetDefaultPyEncoding(default)
11021del default
11022del locale
11023
11024#----------------------------------------------------------------------------
11025
d14a1e28
RD
11026class PyDeadObjectError(AttributeError):
11027 pass
11028
d14a1e28
RD
11029class _wxPyDeadObject(object):
11030 """
11031 Instances of wx objects that are OOR capable will have their __class__
11032 changed to this class when the C++ object is deleted. This should help
11033 prevent crashes due to referencing a bogus C++ pointer.
11034 """
11035 reprStr = "wxPython wrapper for DELETED %s object! (The C++ object no longer exists.)"
11036 attrStr = "The C++ part of the %s object has been deleted, attribute access no longer allowed."
11037
3a04f143 11038 def __repr__(self):
d14a1e28
RD
11039 if not hasattr(self, "_name"):
11040 self._name = "[unknown]"
11041 return self.reprStr % self._name
11042
3a04f143 11043 def __getattr__(self, *args):
d14a1e28
RD
11044 if not hasattr(self, "_name"):
11045 self._name = "[unknown]"
3a04f143
RD
11046 raise PyDeadObjectError(self.attrStr % self._name)
11047
11048 def __nonzero__(self):
11049 return 0
11050
11051
11052
11053class PyUnbornObjectError(AttributeError):
11054 pass
11055
11056class _wxPyUnbornObject(object):
11057 """
54f9ee45 11058 Some stock objects are created when the wx._core module is
3a04f143
RD
11059 imported, but their C++ instance is not created until the wx.App
11060 object is created and initialized. These object instances will
11061 temporarily have their __class__ changed to this class so an
11062 exception will be raised if they are used before the C++ instance
11063 is ready.
11064 """
11065
11066 reprStr = "wxPython wrapper for UNBORN object! (The C++ object is not initialized yet.)"
11067 attrStr = "The C++ part of this object has not been initialized, attribute access not allowed."
11068
11069 def __repr__(self):
11070 #if not hasattr(self, "_name"):
11071 # self._name = "[unknown]"
11072 return self.reprStr #% self._name
11073
11074 def __getattr__(self, *args):
11075 #if not hasattr(self, "_name"):
11076 # self._name = "[unknown]"
11077 raise PyUnbornObjectError(self.attrStr) # % self._name )
d14a1e28
RD
11078
11079 def __nonzero__(self):
11080 return 0
11081
11082
11083#----------------------------------------------------------------------------
d14a1e28
RD
11084
11085def CallAfter(callable, *args, **kw):
11086 """
11087 Call the specified function after the current and pending event
11088 handlers have been completed. This is also good for making GUI
61863841
RD
11089 method calls from non-GUI threads. Any extra positional or
11090 keyword args are passed on to the callable when it is called.
11091
11092 :see: `wx.FutureCall`
d14a1e28
RD
11093 """
11094 app = wx.GetApp()
dfbb5885 11095 assert app is not None, 'No wx.App created yet'
d14a1e28 11096
148275d3
RD
11097 if not hasattr(app, "_CallAfterId"):
11098 app._CallAfterId = wx.NewEventType()
11099 app.Connect(-1, -1, app._CallAfterId,
11100 lambda event: event.callable(*event.args, **event.kw) )
d14a1e28 11101 evt = wx.PyEvent()
148275d3 11102 evt.SetEventType(app._CallAfterId)
d14a1e28
RD
11103 evt.callable = callable
11104 evt.args = args
11105 evt.kw = kw
11106 wx.PostEvent(app, evt)
11107
d14a1e28
RD
11108#----------------------------------------------------------------------------
11109
11110
11111class FutureCall:
11112 """
8ac8dba0 11113 A convenience class for `wx.Timer`, that calls the given callable
d14a1e28
RD
11114 object once after the given amount of milliseconds, passing any
11115 positional or keyword args. The return value of the callable is
61863841 11116 availbale after it has been run with the `GetResult` method.
d14a1e28
RD
11117
11118 If you don't need to get the return value or restart the timer
11119 then there is no need to hold a reference to this object. It will
11120 hold a reference to itself while the timer is running (the timer
11121 has a reference to self.Notify) but the cycle will be broken when
11122 the timer completes, automatically cleaning up the wx.FutureCall
11123 object.
61863841
RD
11124
11125 :see: `wx.CallAfter`
d14a1e28
RD
11126 """
11127 def __init__(self, millis, callable, *args, **kwargs):
11128 self.millis = millis
11129 self.callable = callable
11130 self.SetArgs(*args, **kwargs)
11131 self.runCount = 0
4276dc52 11132 self.running = False
d14a1e28
RD
11133 self.hasRun = False
11134 self.result = None
11135 self.timer = None
11136 self.Start()
11137
11138 def __del__(self):
11139 self.Stop()
11140
11141
11142 def Start(self, millis=None, *args, **kwargs):
11143 """
11144 (Re)start the timer
11145 """
11146 self.hasRun = False
11147 if millis is not None:
11148 self.millis = millis
11149 if args or kwargs:
11150 self.SetArgs(*args, **kwargs)
11151 self.Stop()
11152 self.timer = wx.PyTimer(self.Notify)
11153 self.timer.Start(self.millis, wx.TIMER_ONE_SHOT)
4276dc52 11154 self.running = True
d14a1e28
RD
11155 Restart = Start
11156
11157
11158 def Stop(self):
11159 """
11160 Stop and destroy the timer.
11161 """
11162 if self.timer is not None:
11163 self.timer.Stop()
11164 self.timer = None
11165
11166
11167 def GetInterval(self):
11168 if self.timer is not None:
11169 return self.timer.GetInterval()
11170 else:
11171 return 0
11172
11173
11174 def IsRunning(self):
11175 return self.timer is not None and self.timer.IsRunning()
11176
11177
11178 def SetArgs(self, *args, **kwargs):
11179 """
11180 (Re)set the args passed to the callable object. This is
11181 useful in conjunction with Restart if you want to schedule a
11182 new call to the same callable object but with different
11183 parameters.
11184 """
11185 self.args = args
11186 self.kwargs = kwargs
11187
11188
11189 def HasRun(self):
11190 return self.hasRun
11191
11192 def GetResult(self):
11193 return self.result
11194
11195 def Notify(self):
11196 """
11197 The timer has expired so call the callable.
11198 """
11199 if self.callable and getattr(self.callable, 'im_self', True):
11200 self.runCount += 1
4276dc52 11201 self.running = False
d14a1e28
RD
11202 self.result = self.callable(*self.args, **self.kwargs)
11203 self.hasRun = True
4276dc52
RD
11204 if not self.running:
11205 # if it wasn't restarted, then cleanup
11206 wx.CallAfter(self.Stop)
d14a1e28
RD
11207
11208
a95a7133
RD
11209
11210#----------------------------------------------------------------------------
11211# Control which items in this module should be documented by epydoc.
11212# We allow only classes and functions, which will help reduce the size
11213# of the docs by filtering out the zillions of constants, EVT objects,
11214# and etc that don't make much sense by themselves, but are instead
11215# documented (or will be) as part of the classes/functions/methods
11216# where they should be used.
11217
66c033b4
RD
11218class __DocFilter:
11219 """
11220 A filter for epydoc that only allows non-Ptr classes and
11221 fucntions, in order to reduce the clutter in the API docs.
11222 """
11223 def __init__(self, globals):
11224 self._globals = globals
11225
11226 def __call__(self, name):
11227 import types
11228 obj = self._globals.get(name, None)
11229 if type(obj) not in [type, types.ClassType, types.FunctionType, types.BuiltinFunctionType]:
11230 return False
11231 if name.startswith('_') or name.endswith('Ptr') or name.startswith('EVT'):
11232 return False
11233 return True
a95a7133 11234
d14a1e28
RD
11235#----------------------------------------------------------------------------
11236#----------------------------------------------------------------------------
11237
11238# Import other modules in this package that should show up in the
11239# "core" wx namespace
54f9ee45
RD
11240from _gdi import *
11241from _windows import *
11242from _controls import *
11243from _misc import *
d14a1e28 11244
3a04f143
RD
11245
11246# Fixup the stock objects since they can't be used yet. (They will be
11247# restored in wx.PyApp.OnInit.)
54f9ee45 11248_core_._wxPyFixStockObjects()
3a04f143 11249
d14a1e28
RD
11250#----------------------------------------------------------------------------
11251#----------------------------------------------------------------------------
11252
11253