]> git.saurik.com Git - wxWidgets.git/blame - wxPython/src/gtk/_core.py
Make IsSelected be a bit more specific
[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
fef4c27a 124RA_USE_CHECKBOX = _core_.RA_USE_CHECKBOX
54f9ee45
RD
125RB_GROUP = _core_.RB_GROUP
126RB_SINGLE = _core_.RB_SINGLE
54f9ee45
RD
127SB_HORIZONTAL = _core_.SB_HORIZONTAL
128SB_VERTICAL = _core_.SB_VERTICAL
fef4c27a 129RB_USE_CHECKBOX = _core_.RB_USE_CHECKBOX
54f9ee45
RD
130ST_SIZEGRIP = _core_.ST_SIZEGRIP
131ST_NO_AUTORESIZE = _core_.ST_NO_AUTORESIZE
132FLOOD_SURFACE = _core_.FLOOD_SURFACE
133FLOOD_BORDER = _core_.FLOOD_BORDER
134ODDEVEN_RULE = _core_.ODDEVEN_RULE
135WINDING_RULE = _core_.WINDING_RULE
136TOOL_TOP = _core_.TOOL_TOP
137TOOL_BOTTOM = _core_.TOOL_BOTTOM
138TOOL_LEFT = _core_.TOOL_LEFT
139TOOL_RIGHT = _core_.TOOL_RIGHT
140OK = _core_.OK
141YES_NO = _core_.YES_NO
142CANCEL = _core_.CANCEL
143YES = _core_.YES
144NO = _core_.NO
145NO_DEFAULT = _core_.NO_DEFAULT
146YES_DEFAULT = _core_.YES_DEFAULT
147ICON_EXCLAMATION = _core_.ICON_EXCLAMATION
148ICON_HAND = _core_.ICON_HAND
149ICON_QUESTION = _core_.ICON_QUESTION
150ICON_INFORMATION = _core_.ICON_INFORMATION
151ICON_STOP = _core_.ICON_STOP
152ICON_ASTERISK = _core_.ICON_ASTERISK
153ICON_MASK = _core_.ICON_MASK
154ICON_WARNING = _core_.ICON_WARNING
155ICON_ERROR = _core_.ICON_ERROR
156FORWARD = _core_.FORWARD
157BACKWARD = _core_.BACKWARD
158RESET = _core_.RESET
159HELP = _core_.HELP
160MORE = _core_.MORE
161SETUP = _core_.SETUP
162SIZE_AUTO_WIDTH = _core_.SIZE_AUTO_WIDTH
163SIZE_AUTO_HEIGHT = _core_.SIZE_AUTO_HEIGHT
164SIZE_AUTO = _core_.SIZE_AUTO
165SIZE_USE_EXISTING = _core_.SIZE_USE_EXISTING
166SIZE_ALLOW_MINUS_ONE = _core_.SIZE_ALLOW_MINUS_ONE
167PORTRAIT = _core_.PORTRAIT
168LANDSCAPE = _core_.LANDSCAPE
169PRINT_QUALITY_HIGH = _core_.PRINT_QUALITY_HIGH
170PRINT_QUALITY_MEDIUM = _core_.PRINT_QUALITY_MEDIUM
171PRINT_QUALITY_LOW = _core_.PRINT_QUALITY_LOW
172PRINT_QUALITY_DRAFT = _core_.PRINT_QUALITY_DRAFT
173ID_ANY = _core_.ID_ANY
174ID_SEPARATOR = _core_.ID_SEPARATOR
175ID_LOWEST = _core_.ID_LOWEST
176ID_OPEN = _core_.ID_OPEN
177ID_CLOSE = _core_.ID_CLOSE
178ID_NEW = _core_.ID_NEW
179ID_SAVE = _core_.ID_SAVE
180ID_SAVEAS = _core_.ID_SAVEAS
181ID_REVERT = _core_.ID_REVERT
182ID_EXIT = _core_.ID_EXIT
183ID_UNDO = _core_.ID_UNDO
184ID_REDO = _core_.ID_REDO
185ID_HELP = _core_.ID_HELP
186ID_PRINT = _core_.ID_PRINT
187ID_PRINT_SETUP = _core_.ID_PRINT_SETUP
188ID_PREVIEW = _core_.ID_PREVIEW
189ID_ABOUT = _core_.ID_ABOUT
190ID_HELP_CONTENTS = _core_.ID_HELP_CONTENTS
191ID_HELP_COMMANDS = _core_.ID_HELP_COMMANDS
192ID_HELP_PROCEDURES = _core_.ID_HELP_PROCEDURES
193ID_HELP_CONTEXT = _core_.ID_HELP_CONTEXT
194ID_CLOSE_ALL = _core_.ID_CLOSE_ALL
195ID_PREFERENCES = _core_.ID_PREFERENCES
196ID_CUT = _core_.ID_CUT
197ID_COPY = _core_.ID_COPY
198ID_PASTE = _core_.ID_PASTE
199ID_CLEAR = _core_.ID_CLEAR
200ID_FIND = _core_.ID_FIND
201ID_DUPLICATE = _core_.ID_DUPLICATE
202ID_SELECTALL = _core_.ID_SELECTALL
203ID_DELETE = _core_.ID_DELETE
204ID_REPLACE = _core_.ID_REPLACE
205ID_REPLACE_ALL = _core_.ID_REPLACE_ALL
206ID_PROPERTIES = _core_.ID_PROPERTIES
207ID_VIEW_DETAILS = _core_.ID_VIEW_DETAILS
208ID_VIEW_LARGEICONS = _core_.ID_VIEW_LARGEICONS
209ID_VIEW_SMALLICONS = _core_.ID_VIEW_SMALLICONS
210ID_VIEW_LIST = _core_.ID_VIEW_LIST
211ID_VIEW_SORTDATE = _core_.ID_VIEW_SORTDATE
212ID_VIEW_SORTNAME = _core_.ID_VIEW_SORTNAME
213ID_VIEW_SORTSIZE = _core_.ID_VIEW_SORTSIZE
214ID_VIEW_SORTTYPE = _core_.ID_VIEW_SORTTYPE
215ID_FILE1 = _core_.ID_FILE1
216ID_FILE2 = _core_.ID_FILE2
217ID_FILE3 = _core_.ID_FILE3
218ID_FILE4 = _core_.ID_FILE4
219ID_FILE5 = _core_.ID_FILE5
220ID_FILE6 = _core_.ID_FILE6
221ID_FILE7 = _core_.ID_FILE7
222ID_FILE8 = _core_.ID_FILE8
223ID_FILE9 = _core_.ID_FILE9
224ID_OK = _core_.ID_OK
225ID_CANCEL = _core_.ID_CANCEL
226ID_APPLY = _core_.ID_APPLY
227ID_YES = _core_.ID_YES
228ID_NO = _core_.ID_NO
229ID_STATIC = _core_.ID_STATIC
230ID_FORWARD = _core_.ID_FORWARD
231ID_BACKWARD = _core_.ID_BACKWARD
232ID_DEFAULT = _core_.ID_DEFAULT
233ID_MORE = _core_.ID_MORE
234ID_SETUP = _core_.ID_SETUP
235ID_RESET = _core_.ID_RESET
236ID_CONTEXT_HELP = _core_.ID_CONTEXT_HELP
237ID_YESTOALL = _core_.ID_YESTOALL
238ID_NOTOALL = _core_.ID_NOTOALL
239ID_ABORT = _core_.ID_ABORT
240ID_RETRY = _core_.ID_RETRY
241ID_IGNORE = _core_.ID_IGNORE
7bc1e663
RD
242ID_ADD = _core_.ID_ADD
243ID_REMOVE = _core_.ID_REMOVE
244ID_UP = _core_.ID_UP
245ID_DOWN = _core_.ID_DOWN
246ID_HOME = _core_.ID_HOME
247ID_REFRESH = _core_.ID_REFRESH
248ID_STOP = _core_.ID_STOP
249ID_INDEX = _core_.ID_INDEX
250ID_BOLD = _core_.ID_BOLD
251ID_ITALIC = _core_.ID_ITALIC
252ID_JUSTIFY_CENTER = _core_.ID_JUSTIFY_CENTER
253ID_JUSTIFY_FILL = _core_.ID_JUSTIFY_FILL
254ID_JUSTIFY_RIGHT = _core_.ID_JUSTIFY_RIGHT
255ID_JUSTIFY_LEFT = _core_.ID_JUSTIFY_LEFT
256ID_UNDERLINE = _core_.ID_UNDERLINE
257ID_INDENT = _core_.ID_INDENT
258ID_UNINDENT = _core_.ID_UNINDENT
259ID_ZOOM_100 = _core_.ID_ZOOM_100
260ID_ZOOM_FIT = _core_.ID_ZOOM_FIT
261ID_ZOOM_IN = _core_.ID_ZOOM_IN
262ID_ZOOM_OUT = _core_.ID_ZOOM_OUT
263ID_UNDELETE = _core_.ID_UNDELETE
264ID_REVERT_TO_SAVED = _core_.ID_REVERT_TO_SAVED
54f9ee45
RD
265ID_HIGHEST = _core_.ID_HIGHEST
266OPEN = _core_.OPEN
267SAVE = _core_.SAVE
268HIDE_READONLY = _core_.HIDE_READONLY
269OVERWRITE_PROMPT = _core_.OVERWRITE_PROMPT
270FILE_MUST_EXIST = _core_.FILE_MUST_EXIST
271MULTIPLE = _core_.MULTIPLE
272CHANGE_DIR = _core_.CHANGE_DIR
273ACCEL_ALT = _core_.ACCEL_ALT
274ACCEL_CTRL = _core_.ACCEL_CTRL
275ACCEL_SHIFT = _core_.ACCEL_SHIFT
276ACCEL_NORMAL = _core_.ACCEL_NORMAL
277PD_AUTO_HIDE = _core_.PD_AUTO_HIDE
278PD_APP_MODAL = _core_.PD_APP_MODAL
279PD_CAN_ABORT = _core_.PD_CAN_ABORT
280PD_ELAPSED_TIME = _core_.PD_ELAPSED_TIME
281PD_ESTIMATED_TIME = _core_.PD_ESTIMATED_TIME
282PD_REMAINING_TIME = _core_.PD_REMAINING_TIME
e505d15e
RD
283PD_SMOOTH = _core_.PD_SMOOTH
284PD_CAN_SKIP = _core_.PD_CAN_SKIP
54f9ee45
RD
285DD_NEW_DIR_BUTTON = _core_.DD_NEW_DIR_BUTTON
286DD_DEFAULT_STYLE = _core_.DD_DEFAULT_STYLE
287MENU_TEAROFF = _core_.MENU_TEAROFF
288MB_DOCKABLE = _core_.MB_DOCKABLE
289NO_FULL_REPAINT_ON_RESIZE = _core_.NO_FULL_REPAINT_ON_RESIZE
290FULL_REPAINT_ON_RESIZE = _core_.FULL_REPAINT_ON_RESIZE
291LI_HORIZONTAL = _core_.LI_HORIZONTAL
292LI_VERTICAL = _core_.LI_VERTICAL
293WS_EX_VALIDATE_RECURSIVELY = _core_.WS_EX_VALIDATE_RECURSIVELY
294WS_EX_BLOCK_EVENTS = _core_.WS_EX_BLOCK_EVENTS
295WS_EX_TRANSIENT = _core_.WS_EX_TRANSIENT
296WS_EX_THEMED_BACKGROUND = _core_.WS_EX_THEMED_BACKGROUND
297WS_EX_PROCESS_IDLE = _core_.WS_EX_PROCESS_IDLE
298WS_EX_PROCESS_UI_UPDATES = _core_.WS_EX_PROCESS_UI_UPDATES
299MM_TEXT = _core_.MM_TEXT
300MM_LOMETRIC = _core_.MM_LOMETRIC
301MM_HIMETRIC = _core_.MM_HIMETRIC
302MM_LOENGLISH = _core_.MM_LOENGLISH
303MM_HIENGLISH = _core_.MM_HIENGLISH
304MM_TWIPS = _core_.MM_TWIPS
305MM_ISOTROPIC = _core_.MM_ISOTROPIC
306MM_ANISOTROPIC = _core_.MM_ANISOTROPIC
307MM_POINTS = _core_.MM_POINTS
308MM_METRIC = _core_.MM_METRIC
309CENTRE = _core_.CENTRE
310CENTER = _core_.CENTER
311HORIZONTAL = _core_.HORIZONTAL
312VERTICAL = _core_.VERTICAL
313BOTH = _core_.BOTH
314LEFT = _core_.LEFT
315RIGHT = _core_.RIGHT
316UP = _core_.UP
317DOWN = _core_.DOWN
318TOP = _core_.TOP
319BOTTOM = _core_.BOTTOM
320NORTH = _core_.NORTH
321SOUTH = _core_.SOUTH
322WEST = _core_.WEST
323EAST = _core_.EAST
324ALL = _core_.ALL
325ALIGN_NOT = _core_.ALIGN_NOT
326ALIGN_CENTER_HORIZONTAL = _core_.ALIGN_CENTER_HORIZONTAL
327ALIGN_CENTRE_HORIZONTAL = _core_.ALIGN_CENTRE_HORIZONTAL
328ALIGN_LEFT = _core_.ALIGN_LEFT
329ALIGN_TOP = _core_.ALIGN_TOP
330ALIGN_RIGHT = _core_.ALIGN_RIGHT
331ALIGN_BOTTOM = _core_.ALIGN_BOTTOM
332ALIGN_CENTER_VERTICAL = _core_.ALIGN_CENTER_VERTICAL
333ALIGN_CENTRE_VERTICAL = _core_.ALIGN_CENTRE_VERTICAL
334ALIGN_CENTER = _core_.ALIGN_CENTER
335ALIGN_CENTRE = _core_.ALIGN_CENTRE
336ALIGN_MASK = _core_.ALIGN_MASK
337STRETCH_NOT = _core_.STRETCH_NOT
338SHRINK = _core_.SHRINK
339GROW = _core_.GROW
340EXPAND = _core_.EXPAND
341SHAPED = _core_.SHAPED
342FIXED_MINSIZE = _core_.FIXED_MINSIZE
343TILE = _core_.TILE
344ADJUST_MINSIZE = _core_.ADJUST_MINSIZE
345BORDER_DEFAULT = _core_.BORDER_DEFAULT
346BORDER_NONE = _core_.BORDER_NONE
347BORDER_STATIC = _core_.BORDER_STATIC
348BORDER_SIMPLE = _core_.BORDER_SIMPLE
349BORDER_RAISED = _core_.BORDER_RAISED
350BORDER_SUNKEN = _core_.BORDER_SUNKEN
351BORDER_DOUBLE = _core_.BORDER_DOUBLE
352BORDER_MASK = _core_.BORDER_MASK
7bc1e663
RD
353BG_STYLE_SYSTEM = _core_.BG_STYLE_SYSTEM
354BG_STYLE_COLOUR = _core_.BG_STYLE_COLOUR
355BG_STYLE_CUSTOM = _core_.BG_STYLE_CUSTOM
54f9ee45
RD
356DEFAULT = _core_.DEFAULT
357DECORATIVE = _core_.DECORATIVE
358ROMAN = _core_.ROMAN
359SCRIPT = _core_.SCRIPT
360SWISS = _core_.SWISS
361MODERN = _core_.MODERN
362TELETYPE = _core_.TELETYPE
363VARIABLE = _core_.VARIABLE
364FIXED = _core_.FIXED
365NORMAL = _core_.NORMAL
366LIGHT = _core_.LIGHT
367BOLD = _core_.BOLD
368ITALIC = _core_.ITALIC
369SLANT = _core_.SLANT
370SOLID = _core_.SOLID
371DOT = _core_.DOT
372LONG_DASH = _core_.LONG_DASH
373SHORT_DASH = _core_.SHORT_DASH
374DOT_DASH = _core_.DOT_DASH
375USER_DASH = _core_.USER_DASH
376TRANSPARENT = _core_.TRANSPARENT
377STIPPLE = _core_.STIPPLE
378BDIAGONAL_HATCH = _core_.BDIAGONAL_HATCH
379CROSSDIAG_HATCH = _core_.CROSSDIAG_HATCH
380FDIAGONAL_HATCH = _core_.FDIAGONAL_HATCH
381CROSS_HATCH = _core_.CROSS_HATCH
382HORIZONTAL_HATCH = _core_.HORIZONTAL_HATCH
383VERTICAL_HATCH = _core_.VERTICAL_HATCH
384JOIN_BEVEL = _core_.JOIN_BEVEL
385JOIN_MITER = _core_.JOIN_MITER
386JOIN_ROUND = _core_.JOIN_ROUND
387CAP_ROUND = _core_.CAP_ROUND
388CAP_PROJECTING = _core_.CAP_PROJECTING
389CAP_BUTT = _core_.CAP_BUTT
390CLEAR = _core_.CLEAR
391XOR = _core_.XOR
392INVERT = _core_.INVERT
393OR_REVERSE = _core_.OR_REVERSE
394AND_REVERSE = _core_.AND_REVERSE
395COPY = _core_.COPY
396AND = _core_.AND
397AND_INVERT = _core_.AND_INVERT
398NO_OP = _core_.NO_OP
399NOR = _core_.NOR
400EQUIV = _core_.EQUIV
401SRC_INVERT = _core_.SRC_INVERT
402OR_INVERT = _core_.OR_INVERT
403NAND = _core_.NAND
404OR = _core_.OR
405SET = _core_.SET
406WXK_BACK = _core_.WXK_BACK
407WXK_TAB = _core_.WXK_TAB
408WXK_RETURN = _core_.WXK_RETURN
409WXK_ESCAPE = _core_.WXK_ESCAPE
410WXK_SPACE = _core_.WXK_SPACE
411WXK_DELETE = _core_.WXK_DELETE
412WXK_START = _core_.WXK_START
413WXK_LBUTTON = _core_.WXK_LBUTTON
414WXK_RBUTTON = _core_.WXK_RBUTTON
415WXK_CANCEL = _core_.WXK_CANCEL
416WXK_MBUTTON = _core_.WXK_MBUTTON
417WXK_CLEAR = _core_.WXK_CLEAR
418WXK_SHIFT = _core_.WXK_SHIFT
419WXK_ALT = _core_.WXK_ALT
420WXK_CONTROL = _core_.WXK_CONTROL
421WXK_MENU = _core_.WXK_MENU
422WXK_PAUSE = _core_.WXK_PAUSE
423WXK_CAPITAL = _core_.WXK_CAPITAL
424WXK_PRIOR = _core_.WXK_PRIOR
425WXK_NEXT = _core_.WXK_NEXT
426WXK_END = _core_.WXK_END
427WXK_HOME = _core_.WXK_HOME
428WXK_LEFT = _core_.WXK_LEFT
429WXK_UP = _core_.WXK_UP
430WXK_RIGHT = _core_.WXK_RIGHT
431WXK_DOWN = _core_.WXK_DOWN
432WXK_SELECT = _core_.WXK_SELECT
433WXK_PRINT = _core_.WXK_PRINT
434WXK_EXECUTE = _core_.WXK_EXECUTE
435WXK_SNAPSHOT = _core_.WXK_SNAPSHOT
436WXK_INSERT = _core_.WXK_INSERT
437WXK_HELP = _core_.WXK_HELP
438WXK_NUMPAD0 = _core_.WXK_NUMPAD0
439WXK_NUMPAD1 = _core_.WXK_NUMPAD1
440WXK_NUMPAD2 = _core_.WXK_NUMPAD2
441WXK_NUMPAD3 = _core_.WXK_NUMPAD3
442WXK_NUMPAD4 = _core_.WXK_NUMPAD4
443WXK_NUMPAD5 = _core_.WXK_NUMPAD5
444WXK_NUMPAD6 = _core_.WXK_NUMPAD6
445WXK_NUMPAD7 = _core_.WXK_NUMPAD7
446WXK_NUMPAD8 = _core_.WXK_NUMPAD8
447WXK_NUMPAD9 = _core_.WXK_NUMPAD9
448WXK_MULTIPLY = _core_.WXK_MULTIPLY
449WXK_ADD = _core_.WXK_ADD
450WXK_SEPARATOR = _core_.WXK_SEPARATOR
451WXK_SUBTRACT = _core_.WXK_SUBTRACT
452WXK_DECIMAL = _core_.WXK_DECIMAL
453WXK_DIVIDE = _core_.WXK_DIVIDE
454WXK_F1 = _core_.WXK_F1
455WXK_F2 = _core_.WXK_F2
456WXK_F3 = _core_.WXK_F3
457WXK_F4 = _core_.WXK_F4
458WXK_F5 = _core_.WXK_F5
459WXK_F6 = _core_.WXK_F6
460WXK_F7 = _core_.WXK_F7
461WXK_F8 = _core_.WXK_F8
462WXK_F9 = _core_.WXK_F9
463WXK_F10 = _core_.WXK_F10
464WXK_F11 = _core_.WXK_F11
465WXK_F12 = _core_.WXK_F12
466WXK_F13 = _core_.WXK_F13
467WXK_F14 = _core_.WXK_F14
468WXK_F15 = _core_.WXK_F15
469WXK_F16 = _core_.WXK_F16
470WXK_F17 = _core_.WXK_F17
471WXK_F18 = _core_.WXK_F18
472WXK_F19 = _core_.WXK_F19
473WXK_F20 = _core_.WXK_F20
474WXK_F21 = _core_.WXK_F21
475WXK_F22 = _core_.WXK_F22
476WXK_F23 = _core_.WXK_F23
477WXK_F24 = _core_.WXK_F24
478WXK_NUMLOCK = _core_.WXK_NUMLOCK
479WXK_SCROLL = _core_.WXK_SCROLL
480WXK_PAGEUP = _core_.WXK_PAGEUP
481WXK_PAGEDOWN = _core_.WXK_PAGEDOWN
482WXK_NUMPAD_SPACE = _core_.WXK_NUMPAD_SPACE
483WXK_NUMPAD_TAB = _core_.WXK_NUMPAD_TAB
484WXK_NUMPAD_ENTER = _core_.WXK_NUMPAD_ENTER
485WXK_NUMPAD_F1 = _core_.WXK_NUMPAD_F1
486WXK_NUMPAD_F2 = _core_.WXK_NUMPAD_F2
487WXK_NUMPAD_F3 = _core_.WXK_NUMPAD_F3
488WXK_NUMPAD_F4 = _core_.WXK_NUMPAD_F4
489WXK_NUMPAD_HOME = _core_.WXK_NUMPAD_HOME
490WXK_NUMPAD_LEFT = _core_.WXK_NUMPAD_LEFT
491WXK_NUMPAD_UP = _core_.WXK_NUMPAD_UP
492WXK_NUMPAD_RIGHT = _core_.WXK_NUMPAD_RIGHT
493WXK_NUMPAD_DOWN = _core_.WXK_NUMPAD_DOWN
494WXK_NUMPAD_PRIOR = _core_.WXK_NUMPAD_PRIOR
495WXK_NUMPAD_PAGEUP = _core_.WXK_NUMPAD_PAGEUP
496WXK_NUMPAD_NEXT = _core_.WXK_NUMPAD_NEXT
497WXK_NUMPAD_PAGEDOWN = _core_.WXK_NUMPAD_PAGEDOWN
498WXK_NUMPAD_END = _core_.WXK_NUMPAD_END
499WXK_NUMPAD_BEGIN = _core_.WXK_NUMPAD_BEGIN
500WXK_NUMPAD_INSERT = _core_.WXK_NUMPAD_INSERT
501WXK_NUMPAD_DELETE = _core_.WXK_NUMPAD_DELETE
502WXK_NUMPAD_EQUAL = _core_.WXK_NUMPAD_EQUAL
503WXK_NUMPAD_MULTIPLY = _core_.WXK_NUMPAD_MULTIPLY
504WXK_NUMPAD_ADD = _core_.WXK_NUMPAD_ADD
505WXK_NUMPAD_SEPARATOR = _core_.WXK_NUMPAD_SEPARATOR
506WXK_NUMPAD_SUBTRACT = _core_.WXK_NUMPAD_SUBTRACT
507WXK_NUMPAD_DECIMAL = _core_.WXK_NUMPAD_DECIMAL
508WXK_NUMPAD_DIVIDE = _core_.WXK_NUMPAD_DIVIDE
509WXK_WINDOWS_LEFT = _core_.WXK_WINDOWS_LEFT
510WXK_WINDOWS_RIGHT = _core_.WXK_WINDOWS_RIGHT
511WXK_WINDOWS_MENU = _core_.WXK_WINDOWS_MENU
512PAPER_NONE = _core_.PAPER_NONE
513PAPER_LETTER = _core_.PAPER_LETTER
514PAPER_LEGAL = _core_.PAPER_LEGAL
515PAPER_A4 = _core_.PAPER_A4
516PAPER_CSHEET = _core_.PAPER_CSHEET
517PAPER_DSHEET = _core_.PAPER_DSHEET
518PAPER_ESHEET = _core_.PAPER_ESHEET
519PAPER_LETTERSMALL = _core_.PAPER_LETTERSMALL
520PAPER_TABLOID = _core_.PAPER_TABLOID
521PAPER_LEDGER = _core_.PAPER_LEDGER
522PAPER_STATEMENT = _core_.PAPER_STATEMENT
523PAPER_EXECUTIVE = _core_.PAPER_EXECUTIVE
524PAPER_A3 = _core_.PAPER_A3
525PAPER_A4SMALL = _core_.PAPER_A4SMALL
526PAPER_A5 = _core_.PAPER_A5
527PAPER_B4 = _core_.PAPER_B4
528PAPER_B5 = _core_.PAPER_B5
529PAPER_FOLIO = _core_.PAPER_FOLIO
530PAPER_QUARTO = _core_.PAPER_QUARTO
531PAPER_10X14 = _core_.PAPER_10X14
532PAPER_11X17 = _core_.PAPER_11X17
533PAPER_NOTE = _core_.PAPER_NOTE
534PAPER_ENV_9 = _core_.PAPER_ENV_9
535PAPER_ENV_10 = _core_.PAPER_ENV_10
536PAPER_ENV_11 = _core_.PAPER_ENV_11
537PAPER_ENV_12 = _core_.PAPER_ENV_12
538PAPER_ENV_14 = _core_.PAPER_ENV_14
539PAPER_ENV_DL = _core_.PAPER_ENV_DL
540PAPER_ENV_C5 = _core_.PAPER_ENV_C5
541PAPER_ENV_C3 = _core_.PAPER_ENV_C3
542PAPER_ENV_C4 = _core_.PAPER_ENV_C4
543PAPER_ENV_C6 = _core_.PAPER_ENV_C6
544PAPER_ENV_C65 = _core_.PAPER_ENV_C65
545PAPER_ENV_B4 = _core_.PAPER_ENV_B4
546PAPER_ENV_B5 = _core_.PAPER_ENV_B5
547PAPER_ENV_B6 = _core_.PAPER_ENV_B6
548PAPER_ENV_ITALY = _core_.PAPER_ENV_ITALY
549PAPER_ENV_MONARCH = _core_.PAPER_ENV_MONARCH
550PAPER_ENV_PERSONAL = _core_.PAPER_ENV_PERSONAL
551PAPER_FANFOLD_US = _core_.PAPER_FANFOLD_US
552PAPER_FANFOLD_STD_GERMAN = _core_.PAPER_FANFOLD_STD_GERMAN
553PAPER_FANFOLD_LGL_GERMAN = _core_.PAPER_FANFOLD_LGL_GERMAN
554PAPER_ISO_B4 = _core_.PAPER_ISO_B4
555PAPER_JAPANESE_POSTCARD = _core_.PAPER_JAPANESE_POSTCARD
556PAPER_9X11 = _core_.PAPER_9X11
557PAPER_10X11 = _core_.PAPER_10X11
558PAPER_15X11 = _core_.PAPER_15X11
559PAPER_ENV_INVITE = _core_.PAPER_ENV_INVITE
560PAPER_LETTER_EXTRA = _core_.PAPER_LETTER_EXTRA
561PAPER_LEGAL_EXTRA = _core_.PAPER_LEGAL_EXTRA
562PAPER_TABLOID_EXTRA = _core_.PAPER_TABLOID_EXTRA
563PAPER_A4_EXTRA = _core_.PAPER_A4_EXTRA
564PAPER_LETTER_TRANSVERSE = _core_.PAPER_LETTER_TRANSVERSE
565PAPER_A4_TRANSVERSE = _core_.PAPER_A4_TRANSVERSE
566PAPER_LETTER_EXTRA_TRANSVERSE = _core_.PAPER_LETTER_EXTRA_TRANSVERSE
567PAPER_A_PLUS = _core_.PAPER_A_PLUS
568PAPER_B_PLUS = _core_.PAPER_B_PLUS
569PAPER_LETTER_PLUS = _core_.PAPER_LETTER_PLUS
570PAPER_A4_PLUS = _core_.PAPER_A4_PLUS
571PAPER_A5_TRANSVERSE = _core_.PAPER_A5_TRANSVERSE
572PAPER_B5_TRANSVERSE = _core_.PAPER_B5_TRANSVERSE
573PAPER_A3_EXTRA = _core_.PAPER_A3_EXTRA
574PAPER_A5_EXTRA = _core_.PAPER_A5_EXTRA
575PAPER_B5_EXTRA = _core_.PAPER_B5_EXTRA
576PAPER_A2 = _core_.PAPER_A2
577PAPER_A3_TRANSVERSE = _core_.PAPER_A3_TRANSVERSE
578PAPER_A3_EXTRA_TRANSVERSE = _core_.PAPER_A3_EXTRA_TRANSVERSE
579DUPLEX_SIMPLEX = _core_.DUPLEX_SIMPLEX
580DUPLEX_HORIZONTAL = _core_.DUPLEX_HORIZONTAL
581DUPLEX_VERTICAL = _core_.DUPLEX_VERTICAL
582ITEM_SEPARATOR = _core_.ITEM_SEPARATOR
583ITEM_NORMAL = _core_.ITEM_NORMAL
584ITEM_CHECK = _core_.ITEM_CHECK
585ITEM_RADIO = _core_.ITEM_RADIO
586ITEM_MAX = _core_.ITEM_MAX
587HT_NOWHERE = _core_.HT_NOWHERE
588HT_SCROLLBAR_FIRST = _core_.HT_SCROLLBAR_FIRST
589HT_SCROLLBAR_ARROW_LINE_1 = _core_.HT_SCROLLBAR_ARROW_LINE_1
590HT_SCROLLBAR_ARROW_LINE_2 = _core_.HT_SCROLLBAR_ARROW_LINE_2
591HT_SCROLLBAR_ARROW_PAGE_1 = _core_.HT_SCROLLBAR_ARROW_PAGE_1
592HT_SCROLLBAR_ARROW_PAGE_2 = _core_.HT_SCROLLBAR_ARROW_PAGE_2
593HT_SCROLLBAR_THUMB = _core_.HT_SCROLLBAR_THUMB
594HT_SCROLLBAR_BAR_1 = _core_.HT_SCROLLBAR_BAR_1
595HT_SCROLLBAR_BAR_2 = _core_.HT_SCROLLBAR_BAR_2
596HT_SCROLLBAR_LAST = _core_.HT_SCROLLBAR_LAST
597HT_WINDOW_OUTSIDE = _core_.HT_WINDOW_OUTSIDE
598HT_WINDOW_INSIDE = _core_.HT_WINDOW_INSIDE
599HT_WINDOW_VERT_SCROLLBAR = _core_.HT_WINDOW_VERT_SCROLLBAR
600HT_WINDOW_HORZ_SCROLLBAR = _core_.HT_WINDOW_HORZ_SCROLLBAR
601HT_WINDOW_CORNER = _core_.HT_WINDOW_CORNER
602HT_MAX = _core_.HT_MAX
603MOD_NONE = _core_.MOD_NONE
604MOD_ALT = _core_.MOD_ALT
605MOD_CONTROL = _core_.MOD_CONTROL
606MOD_SHIFT = _core_.MOD_SHIFT
607MOD_WIN = _core_.MOD_WIN
608UPDATE_UI_NONE = _core_.UPDATE_UI_NONE
609UPDATE_UI_RECURSE = _core_.UPDATE_UI_RECURSE
610UPDATE_UI_FROMIDLE = _core_.UPDATE_UI_FROMIDLE
d14a1e28
RD
611#---------------------------------------------------------------------------
612
613class Object(object):
0df68c9f
RD
614 """
615 The base class for most wx objects, although in wxPython not
616 much functionality is needed nor exposed.
617 """
d14a1e28
RD
618 def __init__(self): raise RuntimeError, "No constructor defined"
619 def __repr__(self):
620 return "<%s.%s; proxy of C++ wxObject instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
e811c8ce 621 def GetClassName(*args, **kwargs):
0df68c9f 622 """
a95a7133 623 GetClassName(self) -> String
e811c8ce 624
a95a7133 625 Returns the class name of the C++ class using wxRTTI.
0df68c9f 626 """
54f9ee45 627 return _core_.Object_GetClassName(*args, **kwargs)
e811c8ce
RD
628
629 def Destroy(*args, **kwargs):
0df68c9f 630 """
a95a7133 631 Destroy(self)
e811c8ce 632
0df68c9f
RD
633 Deletes the C++ object this Python object is a proxy for.
634 """
54f9ee45 635 return _core_.Object_Destroy(*args, **kwargs)
e811c8ce 636
d14a1e28
RD
637
638class ObjectPtr(Object):
639 def __init__(self, this):
640 self.this = this
641 if not hasattr(self,"thisown"): self.thisown = 0
642 self.__class__ = Object
54f9ee45
RD
643_core_.Object_swigregister(ObjectPtr)
644_wxPySetDictionary = _core_._wxPySetDictionary
d14a1e28 645
54f9ee45 646_wxPyFixStockObjects = _core_._wxPyFixStockObjects
3a04f143 647
54f9ee45 648cvar = _core_.cvar
196addbf 649EmptyString = cvar.EmptyString
d14a1e28
RD
650
651#---------------------------------------------------------------------------
652
54f9ee45
RD
653BITMAP_TYPE_INVALID = _core_.BITMAP_TYPE_INVALID
654BITMAP_TYPE_BMP = _core_.BITMAP_TYPE_BMP
655BITMAP_TYPE_ICO = _core_.BITMAP_TYPE_ICO
656BITMAP_TYPE_CUR = _core_.BITMAP_TYPE_CUR
657BITMAP_TYPE_XBM = _core_.BITMAP_TYPE_XBM
658BITMAP_TYPE_XBM_DATA = _core_.BITMAP_TYPE_XBM_DATA
659BITMAP_TYPE_XPM = _core_.BITMAP_TYPE_XPM
660BITMAP_TYPE_XPM_DATA = _core_.BITMAP_TYPE_XPM_DATA
661BITMAP_TYPE_TIF = _core_.BITMAP_TYPE_TIF
662BITMAP_TYPE_GIF = _core_.BITMAP_TYPE_GIF
663BITMAP_TYPE_PNG = _core_.BITMAP_TYPE_PNG
664BITMAP_TYPE_JPEG = _core_.BITMAP_TYPE_JPEG
665BITMAP_TYPE_PNM = _core_.BITMAP_TYPE_PNM
666BITMAP_TYPE_PCX = _core_.BITMAP_TYPE_PCX
667BITMAP_TYPE_PICT = _core_.BITMAP_TYPE_PICT
668BITMAP_TYPE_ICON = _core_.BITMAP_TYPE_ICON
669BITMAP_TYPE_ANI = _core_.BITMAP_TYPE_ANI
670BITMAP_TYPE_IFF = _core_.BITMAP_TYPE_IFF
671BITMAP_TYPE_MACCURSOR = _core_.BITMAP_TYPE_MACCURSOR
672BITMAP_TYPE_ANY = _core_.BITMAP_TYPE_ANY
673CURSOR_NONE = _core_.CURSOR_NONE
674CURSOR_ARROW = _core_.CURSOR_ARROW
675CURSOR_RIGHT_ARROW = _core_.CURSOR_RIGHT_ARROW
676CURSOR_BULLSEYE = _core_.CURSOR_BULLSEYE
677CURSOR_CHAR = _core_.CURSOR_CHAR
678CURSOR_CROSS = _core_.CURSOR_CROSS
679CURSOR_HAND = _core_.CURSOR_HAND
680CURSOR_IBEAM = _core_.CURSOR_IBEAM
681CURSOR_LEFT_BUTTON = _core_.CURSOR_LEFT_BUTTON
682CURSOR_MAGNIFIER = _core_.CURSOR_MAGNIFIER
683CURSOR_MIDDLE_BUTTON = _core_.CURSOR_MIDDLE_BUTTON
684CURSOR_NO_ENTRY = _core_.CURSOR_NO_ENTRY
685CURSOR_PAINT_BRUSH = _core_.CURSOR_PAINT_BRUSH
686CURSOR_PENCIL = _core_.CURSOR_PENCIL
687CURSOR_POINT_LEFT = _core_.CURSOR_POINT_LEFT
688CURSOR_POINT_RIGHT = _core_.CURSOR_POINT_RIGHT
689CURSOR_QUESTION_ARROW = _core_.CURSOR_QUESTION_ARROW
690CURSOR_RIGHT_BUTTON = _core_.CURSOR_RIGHT_BUTTON
691CURSOR_SIZENESW = _core_.CURSOR_SIZENESW
692CURSOR_SIZENS = _core_.CURSOR_SIZENS
693CURSOR_SIZENWSE = _core_.CURSOR_SIZENWSE
694CURSOR_SIZEWE = _core_.CURSOR_SIZEWE
695CURSOR_SIZING = _core_.CURSOR_SIZING
696CURSOR_SPRAYCAN = _core_.CURSOR_SPRAYCAN
697CURSOR_WAIT = _core_.CURSOR_WAIT
698CURSOR_WATCH = _core_.CURSOR_WATCH
699CURSOR_BLANK = _core_.CURSOR_BLANK
700CURSOR_DEFAULT = _core_.CURSOR_DEFAULT
701CURSOR_COPY_ARROW = _core_.CURSOR_COPY_ARROW
702CURSOR_ARROWWAIT = _core_.CURSOR_ARROWWAIT
703CURSOR_MAX = _core_.CURSOR_MAX
d14a1e28
RD
704#---------------------------------------------------------------------------
705
706class Size(object):
0df68c9f 707 """
41e2b43e 708 wx.Size is a useful data structure used to represent the size of
093d3ff1
RD
709 something. It simply contians integer width and height
710 proprtites. In most places in wxPython where a wx.Size is
711 expected a (width, height) tuple can be used instead.
0df68c9f 712 """
e811c8ce
RD
713 def __repr__(self):
714 return "<%s.%s; proxy of C++ wxSize instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
54f9ee45
RD
715 width = property(_core_.Size_width_get, _core_.Size_width_set)
716 height = property(_core_.Size_height_get, _core_.Size_height_set)
242b7b46 717 x = width; y = height
d14a1e28 718 def __init__(self, *args, **kwargs):
0df68c9f 719 """
a95a7133 720 __init__(self, int w=0, int h=0) -> Size
e811c8ce 721
0df68c9f
RD
722 Creates a size object.
723 """
54f9ee45 724 newobj = _core_.new_Size(*args, **kwargs)
d14a1e28
RD
725 self.this = newobj.this
726 self.thisown = 1
727 del newobj.thisown
54f9ee45 728 def __del__(self, destroy=_core_.delete_Size):
a95a7133 729 """__del__(self)"""
d14a1e28
RD
730 try:
731 if self.thisown: destroy(self)
732 except: pass
e811c8ce
RD
733
734 def __eq__(*args, **kwargs):
0df68c9f 735 """
a95a7133 736 __eq__(self, Size sz) -> bool
e811c8ce 737
0df68c9f
RD
738 Test for equality of wx.Size objects.
739 """
54f9ee45 740 return _core_.Size___eq__(*args, **kwargs)
e811c8ce
RD
741
742 def __ne__(*args, **kwargs):
0df68c9f 743 """
a95a7133 744 __ne__(self, Size sz) -> bool
e811c8ce 745
0df68c9f
RD
746 Test for inequality.
747 """
54f9ee45 748 return _core_.Size___ne__(*args, **kwargs)
e811c8ce
RD
749
750 def __add__(*args, **kwargs):
0df68c9f 751 """
a95a7133 752 __add__(self, Size sz) -> Size
e811c8ce 753
0df68c9f
RD
754 Add sz's proprties to this and return the result.
755 """
54f9ee45 756 return _core_.Size___add__(*args, **kwargs)
e811c8ce
RD
757
758 def __sub__(*args, **kwargs):
0df68c9f 759 """
a95a7133 760 __sub__(self, Size sz) -> Size
e811c8ce 761
0df68c9f
RD
762 Subtract sz's properties from this and return the result.
763 """
54f9ee45 764 return _core_.Size___sub__(*args, **kwargs)
e811c8ce
RD
765
766 def IncTo(*args, **kwargs):
0df68c9f 767 """
a95a7133 768 IncTo(self, Size sz)
e811c8ce 769
0df68c9f
RD
770 Increments this object so that both of its dimensions are not less
771 than the corresponding dimensions of the size.
772 """
54f9ee45 773 return _core_.Size_IncTo(*args, **kwargs)
e811c8ce
RD
774
775 def DecTo(*args, **kwargs):
0df68c9f 776 """
a95a7133 777 DecTo(self, Size sz)
e811c8ce 778
0df68c9f
RD
779 Decrements this object so that both of its dimensions are not greater
780 than the corresponding dimensions of the size.
781 """
54f9ee45 782 return _core_.Size_DecTo(*args, **kwargs)
e811c8ce
RD
783
784 def Set(*args, **kwargs):
0df68c9f 785 """
a95a7133 786 Set(self, int w, int h)
e811c8ce 787
0df68c9f
RD
788 Set both width and height.
789 """
54f9ee45 790 return _core_.Size_Set(*args, **kwargs)
e811c8ce
RD
791
792 def SetWidth(*args, **kwargs):
a95a7133 793 """SetWidth(self, int w)"""
54f9ee45 794 return _core_.Size_SetWidth(*args, **kwargs)
e811c8ce
RD
795
796 def SetHeight(*args, **kwargs):
a95a7133 797 """SetHeight(self, int h)"""
54f9ee45 798 return _core_.Size_SetHeight(*args, **kwargs)
e811c8ce
RD
799
800 def GetWidth(*args, **kwargs):
a95a7133 801 """GetWidth(self) -> int"""
54f9ee45 802 return _core_.Size_GetWidth(*args, **kwargs)
e811c8ce
RD
803
804 def GetHeight(*args, **kwargs):
a95a7133 805 """GetHeight(self) -> int"""
54f9ee45 806 return _core_.Size_GetHeight(*args, **kwargs)
e811c8ce 807
74a57fcd
RD
808 def IsFullySpecified(*args, **kwargs):
809 """
a95a7133 810 IsFullySpecified(self) -> bool
74a57fcd
RD
811
812 Returns True if both components of the size are non-default values.
813 """
54f9ee45 814 return _core_.Size_IsFullySpecified(*args, **kwargs)
74a57fcd
RD
815
816 def SetDefaults(*args, **kwargs):
817 """
a95a7133 818 SetDefaults(self, Size size)
74a57fcd 819
41e2b43e
RD
820 Combine this size with the other one replacing the default components
821 of this object (i.e. equal to -1) with those of the other.
74a57fcd 822 """
54f9ee45 823 return _core_.Size_SetDefaults(*args, **kwargs)
74a57fcd 824
e811c8ce 825 def Get(*args, **kwargs):
0df68c9f
RD
826 """
827 Get() -> (width,height)
e811c8ce 828
0df68c9f
RD
829 Returns the width and height properties as a tuple.
830 """
54f9ee45 831 return _core_.Size_Get(*args, **kwargs)
e811c8ce 832
41e2b43e 833 asTuple = wx._deprecated(Get, "asTuple is deprecated, use `Get` instead")
e811c8ce
RD
834 def __str__(self): return str(self.Get())
835 def __repr__(self): return 'wx.Size'+str(self.Get())
836 def __len__(self): return len(self.Get())
837 def __getitem__(self, index): return self.Get()[index]
d14a1e28
RD
838 def __setitem__(self, index, val):
839 if index == 0: self.width = val
840 elif index == 1: self.height = val
841 else: raise IndexError
e811c8ce 842 def __nonzero__(self): return self.Get() != (0,0)
74e96f3d
RD
843 __safe_for_unpickling__ = True
844 def __reduce__(self): return (wx.Size, self.Get())
d14a1e28
RD
845
846
847class SizePtr(Size):
848 def __init__(self, this):
849 self.this = this
850 if not hasattr(self,"thisown"): self.thisown = 0
851 self.__class__ = Size
54f9ee45 852_core_.Size_swigregister(SizePtr)
d14a1e28
RD
853
854#---------------------------------------------------------------------------
855
856class RealPoint(object):
0df68c9f 857 """
41e2b43e
RD
858 A data structure for representing a point or position with floating
859 point x and y properties. In wxPython most places that expect a
860 wx.RealPoint can also accept a (x,y) tuple.
0df68c9f 861 """
e811c8ce
RD
862 def __repr__(self):
863 return "<%s.%s; proxy of C++ wxRealPoint instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
54f9ee45
RD
864 x = property(_core_.RealPoint_x_get, _core_.RealPoint_x_set)
865 y = property(_core_.RealPoint_y_get, _core_.RealPoint_y_set)
d14a1e28 866 def __init__(self, *args, **kwargs):
0df68c9f 867 """
a95a7133 868 __init__(self, double x=0.0, double y=0.0) -> RealPoint
e811c8ce 869
0df68c9f
RD
870 Create a wx.RealPoint object
871 """
54f9ee45 872 newobj = _core_.new_RealPoint(*args, **kwargs)
d14a1e28
RD
873 self.this = newobj.this
874 self.thisown = 1
875 del newobj.thisown
54f9ee45 876 def __del__(self, destroy=_core_.delete_RealPoint):
a95a7133 877 """__del__(self)"""
d14a1e28
RD
878 try:
879 if self.thisown: destroy(self)
880 except: pass
e811c8ce
RD
881
882 def __eq__(*args, **kwargs):
0df68c9f 883 """
a95a7133 884 __eq__(self, RealPoint pt) -> bool
e811c8ce 885
0df68c9f
RD
886 Test for equality of wx.RealPoint objects.
887 """
54f9ee45 888 return _core_.RealPoint___eq__(*args, **kwargs)
e811c8ce
RD
889
890 def __ne__(*args, **kwargs):
0df68c9f 891 """
a95a7133 892 __ne__(self, RealPoint pt) -> bool
e811c8ce 893
0df68c9f
RD
894 Test for inequality of wx.RealPoint objects.
895 """
54f9ee45 896 return _core_.RealPoint___ne__(*args, **kwargs)
e811c8ce
RD
897
898 def __add__(*args, **kwargs):
0df68c9f 899 """
a95a7133 900 __add__(self, RealPoint pt) -> RealPoint
e811c8ce 901
0df68c9f
RD
902 Add pt's proprties to this and return the result.
903 """
54f9ee45 904 return _core_.RealPoint___add__(*args, **kwargs)
e811c8ce
RD
905
906 def __sub__(*args, **kwargs):
0df68c9f 907 """
a95a7133 908 __sub__(self, RealPoint pt) -> RealPoint
e811c8ce 909
0df68c9f
RD
910 Subtract pt's proprties from this and return the result
911 """
54f9ee45 912 return _core_.RealPoint___sub__(*args, **kwargs)
e811c8ce
RD
913
914 def Set(*args, **kwargs):
0df68c9f 915 """
a95a7133 916 Set(self, double x, double y)
e811c8ce 917
0df68c9f
RD
918 Set both the x and y properties
919 """
54f9ee45 920 return _core_.RealPoint_Set(*args, **kwargs)
e811c8ce
RD
921
922 def Get(*args, **kwargs):
0df68c9f
RD
923 """
924 Get() -> (x,y)
e811c8ce 925
0df68c9f
RD
926 Return the x and y properties as a tuple.
927 """
54f9ee45 928 return _core_.RealPoint_Get(*args, **kwargs)
e811c8ce 929
41e2b43e 930 asTuple = wx._deprecated(Get, "asTuple is deprecated, use `Get` instead")
e811c8ce
RD
931 def __str__(self): return str(self.Get())
932 def __repr__(self): return 'wx.RealPoint'+str(self.Get())
933 def __len__(self): return len(self.Get())
934 def __getitem__(self, index): return self.Get()[index]
d14a1e28 935 def __setitem__(self, index, val):
e811c8ce
RD
936 if index == 0: self.x = val
937 elif index == 1: self.y = val
d14a1e28 938 else: raise IndexError
e811c8ce 939 def __nonzero__(self): return self.Get() != (0.0, 0.0)
74e96f3d
RD
940 __safe_for_unpickling__ = True
941 def __reduce__(self): return (wx.RealPoint, self.Get())
d14a1e28
RD
942
943
944class RealPointPtr(RealPoint):
945 def __init__(self, this):
946 self.this = this
947 if not hasattr(self,"thisown"): self.thisown = 0
948 self.__class__ = RealPoint
54f9ee45 949_core_.RealPoint_swigregister(RealPointPtr)
d14a1e28
RD
950
951#---------------------------------------------------------------------------
952
953class Point(object):
0df68c9f 954 """
41e2b43e
RD
955 A data structure for representing a point or position with integer x
956 and y properties. Most places in wxPython that expect a wx.Point can
957 also accept a (x,y) tuple.
0df68c9f 958 """
e811c8ce
RD
959 def __repr__(self):
960 return "<%s.%s; proxy of C++ wxPoint instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
54f9ee45
RD
961 x = property(_core_.Point_x_get, _core_.Point_x_set)
962 y = property(_core_.Point_y_get, _core_.Point_y_set)
d14a1e28 963 def __init__(self, *args, **kwargs):
0df68c9f 964 """
a95a7133 965 __init__(self, int x=0, int y=0) -> Point
e811c8ce 966
0df68c9f
RD
967 Create a wx.Point object
968 """
54f9ee45 969 newobj = _core_.new_Point(*args, **kwargs)
d14a1e28
RD
970 self.this = newobj.this
971 self.thisown = 1
972 del newobj.thisown
54f9ee45 973 def __del__(self, destroy=_core_.delete_Point):
a95a7133 974 """__del__(self)"""
d14a1e28
RD
975 try:
976 if self.thisown: destroy(self)
977 except: pass
e811c8ce
RD
978
979 def __eq__(*args, **kwargs):
0df68c9f 980 """
a95a7133 981 __eq__(self, Point pt) -> bool
e811c8ce 982
0df68c9f
RD
983 Test for equality of wx.Point objects.
984 """
54f9ee45 985 return _core_.Point___eq__(*args, **kwargs)
e811c8ce
RD
986
987 def __ne__(*args, **kwargs):
0df68c9f 988 """
a95a7133 989 __ne__(self, Point pt) -> bool
e811c8ce 990
0df68c9f
RD
991 Test for inequality of wx.Point objects.
992 """
54f9ee45 993 return _core_.Point___ne__(*args, **kwargs)
e811c8ce
RD
994
995 def __add__(*args, **kwargs):
0df68c9f 996 """
a95a7133 997 __add__(self, Point pt) -> Point
e811c8ce 998
0df68c9f
RD
999 Add pt's proprties to this and return the result.
1000 """
54f9ee45 1001 return _core_.Point___add__(*args, **kwargs)
e811c8ce
RD
1002
1003 def __sub__(*args, **kwargs):
0df68c9f 1004 """
a95a7133 1005 __sub__(self, Point pt) -> Point
e811c8ce 1006
0df68c9f
RD
1007 Subtract pt's proprties from this and return the result
1008 """
54f9ee45 1009 return _core_.Point___sub__(*args, **kwargs)
e811c8ce
RD
1010
1011 def __iadd__(*args, **kwargs):
0df68c9f 1012 """
a95a7133 1013 __iadd__(self, Point pt) -> Point
e811c8ce 1014
0df68c9f
RD
1015 Add pt to this object.
1016 """
54f9ee45 1017 return _core_.Point___iadd__(*args, **kwargs)
e811c8ce
RD
1018
1019 def __isub__(*args, **kwargs):
0df68c9f 1020 """
a95a7133 1021 __isub__(self, Point pt) -> Point
e811c8ce 1022
0df68c9f
RD
1023 Subtract pt from this object.
1024 """
54f9ee45 1025 return _core_.Point___isub__(*args, **kwargs)
e811c8ce
RD
1026
1027 def Set(*args, **kwargs):
0df68c9f 1028 """
a95a7133 1029 Set(self, long x, long y)
e811c8ce 1030
0df68c9f
RD
1031 Set both the x and y properties
1032 """
54f9ee45 1033 return _core_.Point_Set(*args, **kwargs)
e811c8ce
RD
1034
1035 def Get(*args, **kwargs):
0df68c9f
RD
1036 """
1037 Get() -> (x,y)
e811c8ce 1038
0df68c9f
RD
1039 Return the x and y properties as a tuple.
1040 """
54f9ee45 1041 return _core_.Point_Get(*args, **kwargs)
e811c8ce 1042
41e2b43e 1043 asTuple = wx._deprecated(Get, "asTuple is deprecated, use `Get` instead")
e811c8ce
RD
1044 def __str__(self): return str(self.Get())
1045 def __repr__(self): return 'wx.Point'+str(self.Get())
1046 def __len__(self): return len(self.Get())
1047 def __getitem__(self, index): return self.Get()[index]
d14a1e28
RD
1048 def __setitem__(self, index, val):
1049 if index == 0: self.x = val
1050 elif index == 1: self.y = val
1051 else: raise IndexError
e811c8ce 1052 def __nonzero__(self): return self.Get() != (0,0)
74e96f3d
RD
1053 __safe_for_unpickling__ = True
1054 def __reduce__(self): return (wx.Point, self.Get())
d14a1e28
RD
1055
1056
1057class PointPtr(Point):
1058 def __init__(self, this):
1059 self.this = this
1060 if not hasattr(self,"thisown"): self.thisown = 0
1061 self.__class__ = Point
54f9ee45 1062_core_.Point_swigregister(PointPtr)
d14a1e28
RD
1063
1064#---------------------------------------------------------------------------
1065
1066class Rect(object):
0df68c9f 1067 """
41e2b43e
RD
1068 A class for representing and manipulating rectangles. It has x, y,
1069 width and height properties. In wxPython most palces that expect a
1070 wx.Rect can also accept a (x,y,width,height) tuple.
0df68c9f 1071 """
e811c8ce
RD
1072 def __repr__(self):
1073 return "<%s.%s; proxy of C++ wxRect instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 1074 def __init__(self, *args, **kwargs):
0df68c9f 1075 """
a95a7133 1076 __init__(self, int x=0, int y=0, int width=0, int height=0) -> Rect
e811c8ce 1077
0df68c9f
RD
1078 Create a new Rect object.
1079 """
54f9ee45 1080 newobj = _core_.new_Rect(*args, **kwargs)
d14a1e28
RD
1081 self.this = newobj.this
1082 self.thisown = 1
1083 del newobj.thisown
54f9ee45 1084 def __del__(self, destroy=_core_.delete_Rect):
a95a7133 1085 """__del__(self)"""
d14a1e28
RD
1086 try:
1087 if self.thisown: destroy(self)
1088 except: pass
e811c8ce
RD
1089
1090 def GetX(*args, **kwargs):
a95a7133 1091 """GetX(self) -> int"""
54f9ee45 1092 return _core_.Rect_GetX(*args, **kwargs)
e811c8ce
RD
1093
1094 def SetX(*args, **kwargs):
a95a7133 1095 """SetX(self, int x)"""
54f9ee45 1096 return _core_.Rect_SetX(*args, **kwargs)
e811c8ce
RD
1097
1098 def GetY(*args, **kwargs):
a95a7133 1099 """GetY(self) -> int"""
54f9ee45 1100 return _core_.Rect_GetY(*args, **kwargs)
e811c8ce
RD
1101
1102 def SetY(*args, **kwargs):
a95a7133 1103 """SetY(self, int y)"""
54f9ee45 1104 return _core_.Rect_SetY(*args, **kwargs)
e811c8ce
RD
1105
1106 def GetWidth(*args, **kwargs):
a95a7133 1107 """GetWidth(self) -> int"""
54f9ee45 1108 return _core_.Rect_GetWidth(*args, **kwargs)
e811c8ce
RD
1109
1110 def SetWidth(*args, **kwargs):
a95a7133 1111 """SetWidth(self, int w)"""
54f9ee45 1112 return _core_.Rect_SetWidth(*args, **kwargs)
e811c8ce
RD
1113
1114 def GetHeight(*args, **kwargs):
a95a7133 1115 """GetHeight(self) -> int"""
54f9ee45 1116 return _core_.Rect_GetHeight(*args, **kwargs)
e811c8ce
RD
1117
1118 def SetHeight(*args, **kwargs):
a95a7133 1119 """SetHeight(self, int h)"""
54f9ee45 1120 return _core_.Rect_SetHeight(*args, **kwargs)
e811c8ce
RD
1121
1122 def GetPosition(*args, **kwargs):
a95a7133 1123 """GetPosition(self) -> Point"""
54f9ee45 1124 return _core_.Rect_GetPosition(*args, **kwargs)
e811c8ce
RD
1125
1126 def SetPosition(*args, **kwargs):
a95a7133 1127 """SetPosition(self, Point p)"""
54f9ee45 1128 return _core_.Rect_SetPosition(*args, **kwargs)
e811c8ce
RD
1129
1130 def GetSize(*args, **kwargs):
a95a7133 1131 """GetSize(self) -> Size"""
54f9ee45 1132 return _core_.Rect_GetSize(*args, **kwargs)
e811c8ce
RD
1133
1134 def SetSize(*args, **kwargs):
a95a7133 1135 """SetSize(self, Size s)"""
54f9ee45 1136 return _core_.Rect_SetSize(*args, **kwargs)
e811c8ce 1137
c9c7117a 1138 def GetTopLeft(*args, **kwargs):
a95a7133 1139 """GetTopLeft(self) -> Point"""
54f9ee45 1140 return _core_.Rect_GetTopLeft(*args, **kwargs)
c9c7117a
RD
1141
1142 def SetTopLeft(*args, **kwargs):
a95a7133 1143 """SetTopLeft(self, Point p)"""
54f9ee45 1144 return _core_.Rect_SetTopLeft(*args, **kwargs)
c9c7117a
RD
1145
1146 def GetBottomRight(*args, **kwargs):
a95a7133 1147 """GetBottomRight(self) -> Point"""
54f9ee45 1148 return _core_.Rect_GetBottomRight(*args, **kwargs)
c9c7117a
RD
1149
1150 def SetBottomRight(*args, **kwargs):
a95a7133 1151 """SetBottomRight(self, Point p)"""
54f9ee45 1152 return _core_.Rect_SetBottomRight(*args, **kwargs)
c9c7117a 1153
e811c8ce 1154 def GetLeft(*args, **kwargs):
a95a7133 1155 """GetLeft(self) -> int"""
54f9ee45 1156 return _core_.Rect_GetLeft(*args, **kwargs)
e811c8ce
RD
1157
1158 def GetTop(*args, **kwargs):
a95a7133 1159 """GetTop(self) -> int"""
54f9ee45 1160 return _core_.Rect_GetTop(*args, **kwargs)
e811c8ce
RD
1161
1162 def GetBottom(*args, **kwargs):
a95a7133 1163 """GetBottom(self) -> int"""
54f9ee45 1164 return _core_.Rect_GetBottom(*args, **kwargs)
e811c8ce
RD
1165
1166 def GetRight(*args, **kwargs):
a95a7133 1167 """GetRight(self) -> int"""
54f9ee45 1168 return _core_.Rect_GetRight(*args, **kwargs)
e811c8ce
RD
1169
1170 def SetLeft(*args, **kwargs):
a95a7133 1171 """SetLeft(self, int left)"""
54f9ee45 1172 return _core_.Rect_SetLeft(*args, **kwargs)
e811c8ce
RD
1173
1174 def SetRight(*args, **kwargs):
a95a7133 1175 """SetRight(self, int right)"""
54f9ee45 1176 return _core_.Rect_SetRight(*args, **kwargs)
e811c8ce
RD
1177
1178 def SetTop(*args, **kwargs):
a95a7133 1179 """SetTop(self, int top)"""
54f9ee45 1180 return _core_.Rect_SetTop(*args, **kwargs)
e811c8ce
RD
1181
1182 def SetBottom(*args, **kwargs):
a95a7133 1183 """SetBottom(self, int bottom)"""
54f9ee45 1184 return _core_.Rect_SetBottom(*args, **kwargs)
e811c8ce
RD
1185
1186 position = property(GetPosition, SetPosition)
1187 size = property(GetSize, SetSize)
1188 left = property(GetLeft, SetLeft)
1189 right = property(GetRight, SetRight)
1190 top = property(GetTop, SetTop)
1191 bottom = property(GetBottom, SetBottom)
1192
1193 def Inflate(*args, **kwargs):
0df68c9f 1194 """
a95a7133 1195 Inflate(self, int dx, int dy) -> Rect
e811c8ce 1196
8e738329
RD
1197 Increases the size of the rectangle.
1198
1199 The left border is moved farther left and the right border is moved
1200 farther right by ``dx``. The upper border is moved farther up and the
1201 bottom border is moved farther down by ``dy``. (Note the the width and
1202 height of the rectangle thus change by ``2*dx`` and ``2*dy``,
1203 respectively.) If one or both of ``dx`` and ``dy`` are negative, the
1204 opposite happens: the rectangle size decreases in the respective
1205 direction.
1206
1207 The change is made to the rectangle inplace, if instead you need a
1208 copy that is inflated, preserving the original then make the copy
1209 first::
1210
1211 copy = wx.Rect(*original)
1212 copy.Inflate(10,15)
1213
1214
0df68c9f 1215 """
54f9ee45 1216 return _core_.Rect_Inflate(*args, **kwargs)
e811c8ce
RD
1217
1218 def Deflate(*args, **kwargs):
0df68c9f 1219 """
a95a7133 1220 Deflate(self, int dx, int dy) -> Rect
e811c8ce 1221
8e738329
RD
1222 Decrease the rectangle size. This method is the opposite of `Inflate`
1223 in that Deflate(a,b) is equivalent to Inflate(-a,-b). Please refer to
1224 `Inflate` for a full description.
0df68c9f 1225 """
54f9ee45 1226 return _core_.Rect_Deflate(*args, **kwargs)
e811c8ce
RD
1227
1228 def OffsetXY(*args, **kwargs):
0df68c9f 1229 """
a95a7133 1230 OffsetXY(self, int dx, int dy)
e811c8ce 1231
41e2b43e
RD
1232 Moves the rectangle by the specified offset. If dx is positive, the
1233 rectangle is moved to the right, if dy is positive, it is moved to the
1234 bottom, otherwise it is moved to the left or top respectively.
0df68c9f 1235 """
54f9ee45 1236 return _core_.Rect_OffsetXY(*args, **kwargs)
e811c8ce
RD
1237
1238 def Offset(*args, **kwargs):
0df68c9f 1239 """
a95a7133 1240 Offset(self, Point pt)
e811c8ce 1241
0df68c9f
RD
1242 Same as OffsetXY but uses dx,dy from Point
1243 """
54f9ee45 1244 return _core_.Rect_Offset(*args, **kwargs)
e811c8ce
RD
1245
1246 def Intersect(*args, **kwargs):
0df68c9f 1247 """
a95a7133 1248 Intersect(self, Rect rect) -> Rect
e811c8ce 1249
5cbf236d 1250 Returns the intersectsion of this rectangle and rect.
0df68c9f 1251 """
54f9ee45 1252 return _core_.Rect_Intersect(*args, **kwargs)
e811c8ce 1253
5cbf236d
RD
1254 def Union(*args, **kwargs):
1255 """
1256 Union(self, Rect rect) -> Rect
1257
1258 Returns the union of this rectangle and rect.
1259 """
1260 return _core_.Rect_Union(*args, **kwargs)
1261
e811c8ce 1262 def __add__(*args, **kwargs):
0df68c9f 1263 """
a95a7133 1264 __add__(self, Rect rect) -> Rect
e811c8ce 1265
0df68c9f
RD
1266 Add the properties of rect to this rectangle and return the result.
1267 """
54f9ee45 1268 return _core_.Rect___add__(*args, **kwargs)
e811c8ce
RD
1269
1270 def __iadd__(*args, **kwargs):
0df68c9f 1271 """
a95a7133 1272 __iadd__(self, Rect rect) -> Rect
e811c8ce 1273
0df68c9f
RD
1274 Add the properties of rect to this rectangle, updating this rectangle.
1275 """
54f9ee45 1276 return _core_.Rect___iadd__(*args, **kwargs)
e811c8ce
RD
1277
1278 def __eq__(*args, **kwargs):
0df68c9f 1279 """
a95a7133 1280 __eq__(self, Rect rect) -> bool
e811c8ce 1281
0df68c9f
RD
1282 Test for equality.
1283 """
54f9ee45 1284 return _core_.Rect___eq__(*args, **kwargs)
e811c8ce
RD
1285
1286 def __ne__(*args, **kwargs):
0df68c9f 1287 """
a95a7133 1288 __ne__(self, Rect rect) -> bool
e811c8ce 1289
0df68c9f
RD
1290 Test for inequality.
1291 """
54f9ee45 1292 return _core_.Rect___ne__(*args, **kwargs)
e811c8ce
RD
1293
1294 def InsideXY(*args, **kwargs):
0df68c9f 1295 """
a95a7133 1296 InsideXY(self, int x, int y) -> bool
e811c8ce 1297
0df68c9f
RD
1298 Return True if the point is (not strcitly) inside the rect.
1299 """
54f9ee45 1300 return _core_.Rect_InsideXY(*args, **kwargs)
e811c8ce
RD
1301
1302 def Inside(*args, **kwargs):
0df68c9f 1303 """
a95a7133 1304 Inside(self, Point pt) -> bool
e811c8ce 1305
0df68c9f
RD
1306 Return True if the point is (not strcitly) inside the rect.
1307 """
54f9ee45 1308 return _core_.Rect_Inside(*args, **kwargs)
e811c8ce
RD
1309
1310 def Intersects(*args, **kwargs):
0df68c9f 1311 """
a95a7133 1312 Intersects(self, Rect rect) -> bool
e811c8ce 1313
0df68c9f
RD
1314 Returns True if the rectangles have a non empty intersection.
1315 """
54f9ee45 1316 return _core_.Rect_Intersects(*args, **kwargs)
e811c8ce 1317
54f9ee45
RD
1318 x = property(_core_.Rect_x_get, _core_.Rect_x_set)
1319 y = property(_core_.Rect_y_get, _core_.Rect_y_set)
1320 width = property(_core_.Rect_width_get, _core_.Rect_width_set)
1321 height = property(_core_.Rect_height_get, _core_.Rect_height_set)
e811c8ce 1322 def Set(*args, **kwargs):
0df68c9f 1323 """
a95a7133 1324 Set(self, int x=0, int y=0, int width=0, int height=0)
e811c8ce 1325
0df68c9f
RD
1326 Set all rectangle properties.
1327 """
54f9ee45 1328 return _core_.Rect_Set(*args, **kwargs)
e811c8ce
RD
1329
1330 def Get(*args, **kwargs):
0df68c9f
RD
1331 """
1332 Get() -> (x,y,width,height)
e811c8ce 1333
0df68c9f
RD
1334 Return the rectangle properties as a tuple.
1335 """
54f9ee45 1336 return _core_.Rect_Get(*args, **kwargs)
e811c8ce 1337
41e2b43e 1338 asTuple = wx._deprecated(Get, "asTuple is deprecated, use `Get` instead")
e811c8ce
RD
1339 def __str__(self): return str(self.Get())
1340 def __repr__(self): return 'wx.Rect'+str(self.Get())
1341 def __len__(self): return len(self.Get())
1342 def __getitem__(self, index): return self.Get()[index]
d14a1e28
RD
1343 def __setitem__(self, index, val):
1344 if index == 0: self.x = val
1345 elif index == 1: self.y = val
1346 elif index == 2: self.width = val
1347 elif index == 3: self.height = val
1348 else: raise IndexError
e811c8ce 1349 def __nonzero__(self): return self.Get() != (0,0,0,0)
74e96f3d
RD
1350 __safe_for_unpickling__ = True
1351 def __reduce__(self): return (wx.Rect, self.Get())
d14a1e28
RD
1352
1353
1354class RectPtr(Rect):
1355 def __init__(self, this):
1356 self.this = this
1357 if not hasattr(self,"thisown"): self.thisown = 0
1358 self.__class__ = Rect
54f9ee45 1359_core_.Rect_swigregister(RectPtr)
d14a1e28
RD
1360
1361def RectPP(*args, **kwargs):
0df68c9f
RD
1362 """
1363 RectPP(Point topLeft, Point bottomRight) -> Rect
e811c8ce 1364
0df68c9f
RD
1365 Create a new Rect object from Points representing two corners.
1366 """
54f9ee45 1367 val = _core_.new_RectPP(*args, **kwargs)
d14a1e28
RD
1368 val.thisown = 1
1369 return val
1370
1371def RectPS(*args, **kwargs):
0df68c9f
RD
1372 """
1373 RectPS(Point pos, Size size) -> Rect
e811c8ce 1374
0df68c9f
RD
1375 Create a new Rect from a position and size.
1376 """
54f9ee45 1377 val = _core_.new_RectPS(*args, **kwargs)
d14a1e28
RD
1378 val.thisown = 1
1379 return val
1380
d3b6e4ff
RD
1381def RectS(*args, **kwargs):
1382 """
1383 RectS(Size size) -> Rect
1384
1385 Create a new Rect from a size only.
1386 """
1387 val = _core_.new_RectS(*args, **kwargs)
1388 val.thisown = 1
1389 return val
1390
d14a1e28 1391
e811c8ce 1392def IntersectRect(*args, **kwargs):
0df68c9f
RD
1393 """
1394 IntersectRect(Rect r1, Rect r2) -> Rect
e811c8ce 1395
0df68c9f
RD
1396 Calculate and return the intersection of r1 and r2.
1397 """
54f9ee45 1398 return _core_.IntersectRect(*args, **kwargs)
d14a1e28
RD
1399#---------------------------------------------------------------------------
1400
1401class Point2D(object):
41e2b43e
RD
1402 """
1403 wx.Point2Ds represent a point or a vector in a 2d coordinate system
1404 with floating point values.
1405 """
e811c8ce
RD
1406 def __repr__(self):
1407 return "<%s.%s; proxy of C++ wxPoint2D instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 1408 def __init__(self, *args, **kwargs):
0df68c9f 1409 """
a95a7133 1410 __init__(self, double x=0.0, double y=0.0) -> Point2D
e811c8ce 1411
0df68c9f
RD
1412 Create a w.Point2D object.
1413 """
54f9ee45 1414 newobj = _core_.new_Point2D(*args, **kwargs)
d14a1e28
RD
1415 self.this = newobj.this
1416 self.thisown = 1
1417 del newobj.thisown
e811c8ce 1418 def GetFloor(*args, **kwargs):
fd2dc343
RD
1419 """
1420 GetFloor() -> (x,y)
1421
1422 Convert to integer
1423 """
54f9ee45 1424 return _core_.Point2D_GetFloor(*args, **kwargs)
e811c8ce
RD
1425
1426 def GetRounded(*args, **kwargs):
fd2dc343
RD
1427 """
1428 GetRounded() -> (x,y)
1429
1430 Convert to integer
1431 """
54f9ee45 1432 return _core_.Point2D_GetRounded(*args, **kwargs)
e811c8ce
RD
1433
1434 def GetVectorLength(*args, **kwargs):
a95a7133 1435 """GetVectorLength(self) -> double"""
54f9ee45 1436 return _core_.Point2D_GetVectorLength(*args, **kwargs)
e811c8ce
RD
1437
1438 def GetVectorAngle(*args, **kwargs):
a95a7133 1439 """GetVectorAngle(self) -> double"""
54f9ee45 1440 return _core_.Point2D_GetVectorAngle(*args, **kwargs)
e811c8ce
RD
1441
1442 def SetVectorLength(*args, **kwargs):
a95a7133 1443 """SetVectorLength(self, double length)"""
54f9ee45 1444 return _core_.Point2D_SetVectorLength(*args, **kwargs)
e811c8ce
RD
1445
1446 def SetVectorAngle(*args, **kwargs):
a95a7133 1447 """SetVectorAngle(self, double degrees)"""
54f9ee45 1448 return _core_.Point2D_SetVectorAngle(*args, **kwargs)
e811c8ce 1449
d14a1e28
RD
1450 def SetPolarCoordinates(self, angle, length):
1451 self.SetVectorLength(length)
1452 self.SetVectorAngle(angle)
1453 def Normalize(self):
1454 self.SetVectorLength(1.0)
1455
e811c8ce 1456 def GetDistance(*args, **kwargs):
a95a7133 1457 """GetDistance(self, Point2D pt) -> double"""
54f9ee45 1458 return _core_.Point2D_GetDistance(*args, **kwargs)
e811c8ce
RD
1459
1460 def GetDistanceSquare(*args, **kwargs):
a95a7133 1461 """GetDistanceSquare(self, Point2D pt) -> double"""
54f9ee45 1462 return _core_.Point2D_GetDistanceSquare(*args, **kwargs)
e811c8ce
RD
1463
1464 def GetDotProduct(*args, **kwargs):
a95a7133 1465 """GetDotProduct(self, Point2D vec) -> double"""
54f9ee45 1466 return _core_.Point2D_GetDotProduct(*args, **kwargs)
e811c8ce
RD
1467
1468 def GetCrossProduct(*args, **kwargs):
a95a7133 1469 """GetCrossProduct(self, Point2D vec) -> double"""
54f9ee45 1470 return _core_.Point2D_GetCrossProduct(*args, **kwargs)
e811c8ce
RD
1471
1472 def __neg__(*args, **kwargs):
0df68c9f 1473 """
a95a7133 1474 __neg__(self) -> Point2D
e811c8ce 1475
0df68c9f
RD
1476 the reflection of this point
1477 """
54f9ee45 1478 return _core_.Point2D___neg__(*args, **kwargs)
e811c8ce
RD
1479
1480 def __iadd__(*args, **kwargs):
a95a7133 1481 """__iadd__(self, Point2D pt) -> Point2D"""
54f9ee45 1482 return _core_.Point2D___iadd__(*args, **kwargs)
e811c8ce
RD
1483
1484 def __isub__(*args, **kwargs):
a95a7133 1485 """__isub__(self, Point2D pt) -> Point2D"""
54f9ee45 1486 return _core_.Point2D___isub__(*args, **kwargs)
e811c8ce
RD
1487
1488 def __imul__(*args, **kwargs):
a95a7133 1489 """__imul__(self, Point2D pt) -> Point2D"""
54f9ee45 1490 return _core_.Point2D___imul__(*args, **kwargs)
e811c8ce
RD
1491
1492 def __idiv__(*args, **kwargs):
a95a7133 1493 """__idiv__(self, Point2D pt) -> Point2D"""
54f9ee45 1494 return _core_.Point2D___idiv__(*args, **kwargs)
e811c8ce
RD
1495
1496 def __eq__(*args, **kwargs):
0df68c9f 1497 """
a95a7133 1498 __eq__(self, Point2D pt) -> bool
e811c8ce 1499
0df68c9f
RD
1500 Test for equality
1501 """
54f9ee45 1502 return _core_.Point2D___eq__(*args, **kwargs)
e811c8ce
RD
1503
1504 def __ne__(*args, **kwargs):
0df68c9f 1505 """
a95a7133 1506 __ne__(self, Point2D pt) -> bool
e811c8ce 1507
0df68c9f
RD
1508 Test for inequality
1509 """
54f9ee45 1510 return _core_.Point2D___ne__(*args, **kwargs)
e811c8ce 1511
54f9ee45
RD
1512 x = property(_core_.Point2D_x_get, _core_.Point2D_x_set)
1513 y = property(_core_.Point2D_y_get, _core_.Point2D_y_set)
e811c8ce 1514 def Set(*args, **kwargs):
a95a7133 1515 """Set(self, double x=0, double y=0)"""
54f9ee45 1516 return _core_.Point2D_Set(*args, **kwargs)
e811c8ce
RD
1517
1518 def Get(*args, **kwargs):
0df68c9f
RD
1519 """
1520 Get() -> (x,y)
e811c8ce 1521
0df68c9f
RD
1522 Return x and y properties as a tuple.
1523 """
54f9ee45 1524 return _core_.Point2D_Get(*args, **kwargs)
e811c8ce 1525
41e2b43e 1526 asTuple = wx._deprecated(Get, "asTuple is deprecated, use `Get` instead")
e811c8ce
RD
1527 def __str__(self): return str(self.Get())
1528 def __repr__(self): return 'wx.Point2D'+str(self.Get())
1529 def __len__(self): return len(self.Get())
1530 def __getitem__(self, index): return self.Get()[index]
d14a1e28 1531 def __setitem__(self, index, val):
e811c8ce
RD
1532 if index == 0: self.x = val
1533 elif index == 1: self.y = val
d14a1e28 1534 else: raise IndexError
e811c8ce 1535 def __nonzero__(self): return self.Get() != (0.0, 0.0)
74e96f3d
RD
1536 __safe_for_unpickling__ = True
1537 def __reduce__(self): return (wx.Point2D, self.Get())
d14a1e28
RD
1538
1539
1540class Point2DPtr(Point2D):
1541 def __init__(self, this):
1542 self.this = this
1543 if not hasattr(self,"thisown"): self.thisown = 0
1544 self.__class__ = Point2D
54f9ee45 1545_core_.Point2D_swigregister(Point2DPtr)
d14a1e28
RD
1546
1547def Point2DCopy(*args, **kwargs):
0df68c9f
RD
1548 """
1549 Point2DCopy(Point2D pt) -> Point2D
e811c8ce 1550
0df68c9f
RD
1551 Create a w.Point2D object.
1552 """
54f9ee45 1553 val = _core_.new_Point2DCopy(*args, **kwargs)
d14a1e28
RD
1554 val.thisown = 1
1555 return val
1556
1557def Point2DFromPoint(*args, **kwargs):
0df68c9f
RD
1558 """
1559 Point2DFromPoint(Point pt) -> Point2D
e811c8ce 1560
0df68c9f
RD
1561 Create a w.Point2D object.
1562 """
54f9ee45 1563 val = _core_.new_Point2DFromPoint(*args, **kwargs)
d14a1e28
RD
1564 val.thisown = 1
1565 return val
1566
1567#---------------------------------------------------------------------------
1568
54f9ee45
RD
1569FromStart = _core_.FromStart
1570FromCurrent = _core_.FromCurrent
1571FromEnd = _core_.FromEnd
d14a1e28 1572class InputStream(object):
093d3ff1 1573 """Proxy of C++ InputStream class"""
e811c8ce
RD
1574 def __repr__(self):
1575 return "<%s.%s; proxy of C++ wxPyInputStream instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 1576 def __init__(self, *args, **kwargs):
a95a7133 1577 """__init__(self, PyObject p) -> InputStream"""
54f9ee45 1578 newobj = _core_.new_InputStream(*args, **kwargs)
d14a1e28
RD
1579 self.this = newobj.this
1580 self.thisown = 1
1581 del newobj.thisown
8fb0e70a
RD
1582 def __del__(self, destroy=_core_.delete_InputStream):
1583 """__del__(self)"""
1584 try:
1585 if self.thisown: destroy(self)
1586 except: pass
1587
e811c8ce 1588 def close(*args, **kwargs):
a95a7133 1589 """close(self)"""
54f9ee45 1590 return _core_.InputStream_close(*args, **kwargs)
e811c8ce
RD
1591
1592 def flush(*args, **kwargs):
a95a7133 1593 """flush(self)"""
54f9ee45 1594 return _core_.InputStream_flush(*args, **kwargs)
e811c8ce
RD
1595
1596 def eof(*args, **kwargs):
a95a7133 1597 """eof(self) -> bool"""
54f9ee45 1598 return _core_.InputStream_eof(*args, **kwargs)
e811c8ce
RD
1599
1600 def read(*args, **kwargs):
a95a7133 1601 """read(self, int size=-1) -> PyObject"""
54f9ee45 1602 return _core_.InputStream_read(*args, **kwargs)
e811c8ce
RD
1603
1604 def readline(*args, **kwargs):
a95a7133 1605 """readline(self, int size=-1) -> PyObject"""
54f9ee45 1606 return _core_.InputStream_readline(*args, **kwargs)
e811c8ce
RD
1607
1608 def readlines(*args, **kwargs):
a95a7133 1609 """readlines(self, int sizehint=-1) -> PyObject"""
54f9ee45 1610 return _core_.InputStream_readlines(*args, **kwargs)
e811c8ce
RD
1611
1612 def seek(*args, **kwargs):
a95a7133 1613 """seek(self, int offset, int whence=0)"""
54f9ee45 1614 return _core_.InputStream_seek(*args, **kwargs)
e811c8ce
RD
1615
1616 def tell(*args, **kwargs):
a95a7133 1617 """tell(self) -> int"""
54f9ee45 1618 return _core_.InputStream_tell(*args, **kwargs)
e811c8ce
RD
1619
1620 def Peek(*args, **kwargs):
a95a7133 1621 """Peek(self) -> char"""
54f9ee45 1622 return _core_.InputStream_Peek(*args, **kwargs)
e811c8ce
RD
1623
1624 def GetC(*args, **kwargs):
a95a7133 1625 """GetC(self) -> char"""
54f9ee45 1626 return _core_.InputStream_GetC(*args, **kwargs)
e811c8ce
RD
1627
1628 def LastRead(*args, **kwargs):
a95a7133 1629 """LastRead(self) -> size_t"""
54f9ee45 1630 return _core_.InputStream_LastRead(*args, **kwargs)
e811c8ce
RD
1631
1632 def CanRead(*args, **kwargs):
a95a7133 1633 """CanRead(self) -> bool"""
54f9ee45 1634 return _core_.InputStream_CanRead(*args, **kwargs)
e811c8ce
RD
1635
1636 def Eof(*args, **kwargs):
a95a7133 1637 """Eof(self) -> bool"""
54f9ee45 1638 return _core_.InputStream_Eof(*args, **kwargs)
e811c8ce
RD
1639
1640 def Ungetch(*args, **kwargs):
a95a7133 1641 """Ungetch(self, char c) -> bool"""
54f9ee45 1642 return _core_.InputStream_Ungetch(*args, **kwargs)
e811c8ce
RD
1643
1644 def SeekI(*args, **kwargs):
a95a7133 1645 """SeekI(self, long pos, int mode=FromStart) -> long"""
54f9ee45 1646 return _core_.InputStream_SeekI(*args, **kwargs)
e811c8ce
RD
1647
1648 def TellI(*args, **kwargs):
a95a7133 1649 """TellI(self) -> long"""
54f9ee45 1650 return _core_.InputStream_TellI(*args, **kwargs)
e811c8ce 1651
d14a1e28
RD
1652
1653class InputStreamPtr(InputStream):
1654 def __init__(self, this):
1655 self.this = this
1656 if not hasattr(self,"thisown"): self.thisown = 0
1657 self.__class__ = InputStream
54f9ee45 1658_core_.InputStream_swigregister(InputStreamPtr)
d14a1e28
RD
1659DefaultPosition = cvar.DefaultPosition
1660DefaultSize = cvar.DefaultSize
1661
1662class OutputStream(object):
093d3ff1 1663 """Proxy of C++ OutputStream class"""
d14a1e28
RD
1664 def __init__(self): raise RuntimeError, "No constructor defined"
1665 def __repr__(self):
1666 return "<%s.%s; proxy of C++ wxOutputStream instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
e811c8ce 1667 def write(*args, **kwargs):
a95a7133 1668 """write(self, PyObject obj)"""
54f9ee45 1669 return _core_.OutputStream_write(*args, **kwargs)
e811c8ce 1670
d14a1e28
RD
1671
1672class OutputStreamPtr(OutputStream):
1673 def __init__(self, this):
1674 self.this = this
1675 if not hasattr(self,"thisown"): self.thisown = 0
1676 self.__class__ = OutputStream
54f9ee45 1677_core_.OutputStream_swigregister(OutputStreamPtr)
d14a1e28
RD
1678
1679#---------------------------------------------------------------------------
1680
1681class FSFile(Object):
093d3ff1 1682 """Proxy of C++ FSFile class"""
e811c8ce
RD
1683 def __repr__(self):
1684 return "<%s.%s; proxy of C++ wxFSFile instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 1685 def __init__(self, *args, **kwargs):
0df68c9f 1686 """
a95a7133 1687 __init__(self, InputStream stream, String loc, String mimetype, String anchor,
196addbf 1688 DateTime modif) -> FSFile
0df68c9f 1689 """
54f9ee45 1690 newobj = _core_.new_FSFile(*args, **kwargs)
d14a1e28
RD
1691 self.this = newobj.this
1692 self.thisown = 1
1693 del newobj.thisown
4cf4100f
RD
1694 self.thisown = 0 # It will normally be deleted by the user of the wxFileSystem
1695
54f9ee45 1696 def __del__(self, destroy=_core_.delete_FSFile):
a95a7133 1697 """__del__(self)"""
d14a1e28
RD
1698 try:
1699 if self.thisown: destroy(self)
1700 except: pass
e811c8ce
RD
1701
1702 def GetStream(*args, **kwargs):
a95a7133 1703 """GetStream(self) -> InputStream"""
54f9ee45 1704 return _core_.FSFile_GetStream(*args, **kwargs)
e811c8ce
RD
1705
1706 def GetMimeType(*args, **kwargs):
a95a7133 1707 """GetMimeType(self) -> String"""
54f9ee45 1708 return _core_.FSFile_GetMimeType(*args, **kwargs)
e811c8ce
RD
1709
1710 def GetLocation(*args, **kwargs):
a95a7133 1711 """GetLocation(self) -> String"""
54f9ee45 1712 return _core_.FSFile_GetLocation(*args, **kwargs)
e811c8ce
RD
1713
1714 def GetAnchor(*args, **kwargs):
a95a7133 1715 """GetAnchor(self) -> String"""
54f9ee45 1716 return _core_.FSFile_GetAnchor(*args, **kwargs)
e811c8ce
RD
1717
1718 def GetModificationTime(*args, **kwargs):
a95a7133 1719 """GetModificationTime(self) -> DateTime"""
54f9ee45 1720 return _core_.FSFile_GetModificationTime(*args, **kwargs)
e811c8ce 1721
d14a1e28
RD
1722
1723class FSFilePtr(FSFile):
1724 def __init__(self, this):
1725 self.this = this
1726 if not hasattr(self,"thisown"): self.thisown = 0
1727 self.__class__ = FSFile
54f9ee45 1728_core_.FSFile_swigregister(FSFilePtr)
d14a1e28
RD
1729
1730class CPPFileSystemHandler(object):
093d3ff1 1731 """Proxy of C++ CPPFileSystemHandler class"""
d14a1e28
RD
1732 def __init__(self): raise RuntimeError, "No constructor defined"
1733 def __repr__(self):
1734 return "<%s.%s; proxy of C++ wxFileSystemHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
1735
1736class CPPFileSystemHandlerPtr(CPPFileSystemHandler):
1737 def __init__(self, this):
1738 self.this = this
1739 if not hasattr(self,"thisown"): self.thisown = 0
1740 self.__class__ = CPPFileSystemHandler
54f9ee45 1741_core_.CPPFileSystemHandler_swigregister(CPPFileSystemHandlerPtr)
d14a1e28
RD
1742
1743class FileSystemHandler(CPPFileSystemHandler):
093d3ff1 1744 """Proxy of C++ FileSystemHandler class"""
e811c8ce
RD
1745 def __repr__(self):
1746 return "<%s.%s; proxy of C++ wxPyFileSystemHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 1747 def __init__(self, *args, **kwargs):
a95a7133 1748 """__init__(self) -> FileSystemHandler"""
54f9ee45 1749 newobj = _core_.new_FileSystemHandler(*args, **kwargs)
d14a1e28
RD
1750 self.this = newobj.this
1751 self.thisown = 1
1752 del newobj.thisown
1753 self._setCallbackInfo(self, FileSystemHandler)
e811c8ce
RD
1754
1755 def _setCallbackInfo(*args, **kwargs):
a95a7133 1756 """_setCallbackInfo(self, PyObject self, PyObject _class)"""
54f9ee45 1757 return _core_.FileSystemHandler__setCallbackInfo(*args, **kwargs)
e811c8ce
RD
1758
1759 def CanOpen(*args, **kwargs):
a95a7133 1760 """CanOpen(self, String location) -> bool"""
54f9ee45 1761 return _core_.FileSystemHandler_CanOpen(*args, **kwargs)
e811c8ce
RD
1762
1763 def OpenFile(*args, **kwargs):
a95a7133 1764 """OpenFile(self, FileSystem fs, String location) -> FSFile"""
54f9ee45 1765 return _core_.FileSystemHandler_OpenFile(*args, **kwargs)
e811c8ce
RD
1766
1767 def FindFirst(*args, **kwargs):
a95a7133 1768 """FindFirst(self, String spec, int flags=0) -> String"""
54f9ee45 1769 return _core_.FileSystemHandler_FindFirst(*args, **kwargs)
e811c8ce
RD
1770
1771 def FindNext(*args, **kwargs):
a95a7133 1772 """FindNext(self) -> String"""
54f9ee45 1773 return _core_.FileSystemHandler_FindNext(*args, **kwargs)
e811c8ce
RD
1774
1775 def GetProtocol(*args, **kwargs):
a95a7133 1776 """GetProtocol(self, String location) -> String"""
54f9ee45 1777 return _core_.FileSystemHandler_GetProtocol(*args, **kwargs)
e811c8ce
RD
1778
1779 def GetLeftLocation(*args, **kwargs):
a95a7133 1780 """GetLeftLocation(self, String location) -> String"""
54f9ee45 1781 return _core_.FileSystemHandler_GetLeftLocation(*args, **kwargs)
e811c8ce
RD
1782
1783 def GetAnchor(*args, **kwargs):
a95a7133 1784 """GetAnchor(self, String location) -> String"""
54f9ee45 1785 return _core_.FileSystemHandler_GetAnchor(*args, **kwargs)
e811c8ce
RD
1786
1787 def GetRightLocation(*args, **kwargs):
a95a7133 1788 """GetRightLocation(self, String location) -> String"""
54f9ee45 1789 return _core_.FileSystemHandler_GetRightLocation(*args, **kwargs)
e811c8ce
RD
1790
1791 def GetMimeTypeFromExt(*args, **kwargs):
a95a7133 1792 """GetMimeTypeFromExt(self, String location) -> String"""
54f9ee45 1793 return _core_.FileSystemHandler_GetMimeTypeFromExt(*args, **kwargs)
e811c8ce 1794
d14a1e28
RD
1795
1796class FileSystemHandlerPtr(FileSystemHandler):
1797 def __init__(self, this):
1798 self.this = this
1799 if not hasattr(self,"thisown"): self.thisown = 0
1800 self.__class__ = FileSystemHandler
54f9ee45 1801_core_.FileSystemHandler_swigregister(FileSystemHandlerPtr)
d14a1e28
RD
1802
1803class FileSystem(Object):
093d3ff1 1804 """Proxy of C++ FileSystem class"""
e811c8ce
RD
1805 def __repr__(self):
1806 return "<%s.%s; proxy of C++ wxFileSystem instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 1807 def __init__(self, *args, **kwargs):
a95a7133 1808 """__init__(self) -> FileSystem"""
54f9ee45 1809 newobj = _core_.new_FileSystem(*args, **kwargs)
d14a1e28
RD
1810 self.this = newobj.this
1811 self.thisown = 1
1812 del newobj.thisown
54f9ee45 1813 def __del__(self, destroy=_core_.delete_FileSystem):
a95a7133 1814 """__del__(self)"""
d14a1e28
RD
1815 try:
1816 if self.thisown: destroy(self)
1817 except: pass
e811c8ce
RD
1818
1819 def ChangePathTo(*args, **kwargs):
a95a7133 1820 """ChangePathTo(self, String location, bool is_dir=False)"""
54f9ee45 1821 return _core_.FileSystem_ChangePathTo(*args, **kwargs)
e811c8ce
RD
1822
1823 def GetPath(*args, **kwargs):
a95a7133 1824 """GetPath(self) -> String"""
54f9ee45 1825 return _core_.FileSystem_GetPath(*args, **kwargs)
e811c8ce
RD
1826
1827 def OpenFile(*args, **kwargs):
a95a7133 1828 """OpenFile(self, String location) -> FSFile"""
54f9ee45 1829 return _core_.FileSystem_OpenFile(*args, **kwargs)
e811c8ce
RD
1830
1831 def FindFirst(*args, **kwargs):
a95a7133 1832 """FindFirst(self, String spec, int flags=0) -> String"""
54f9ee45 1833 return _core_.FileSystem_FindFirst(*args, **kwargs)
e811c8ce
RD
1834
1835 def FindNext(*args, **kwargs):
a95a7133 1836 """FindNext(self) -> String"""
54f9ee45 1837 return _core_.FileSystem_FindNext(*args, **kwargs)
e811c8ce
RD
1838
1839 def AddHandler(*args, **kwargs):
66c033b4 1840 """AddHandler(CPPFileSystemHandler handler)"""
54f9ee45 1841 return _core_.FileSystem_AddHandler(*args, **kwargs)
e811c8ce
RD
1842
1843 AddHandler = staticmethod(AddHandler)
1844 def CleanUpHandlers(*args, **kwargs):
66c033b4 1845 """CleanUpHandlers()"""
54f9ee45 1846 return _core_.FileSystem_CleanUpHandlers(*args, **kwargs)
e811c8ce
RD
1847
1848 CleanUpHandlers = staticmethod(CleanUpHandlers)
1849 def FileNameToURL(*args, **kwargs):
66c033b4 1850 """FileNameToURL(String filename) -> String"""
54f9ee45 1851 return _core_.FileSystem_FileNameToURL(*args, **kwargs)
e811c8ce
RD
1852
1853 FileNameToURL = staticmethod(FileNameToURL)
2ef75293
RD
1854 def URLToFileName(*args, **kwargs):
1855 """URLToFileName(String url) -> String"""
1856 return _core_.FileSystem_URLToFileName(*args, **kwargs)
1857
1858 URLToFileName = staticmethod(URLToFileName)
d14a1e28
RD
1859
1860class FileSystemPtr(FileSystem):
1861 def __init__(self, this):
1862 self.this = this
1863 if not hasattr(self,"thisown"): self.thisown = 0
1864 self.__class__ = FileSystem
54f9ee45 1865_core_.FileSystem_swigregister(FileSystemPtr)
d14a1e28 1866
e811c8ce
RD
1867def FileSystem_AddHandler(*args, **kwargs):
1868 """FileSystem_AddHandler(CPPFileSystemHandler handler)"""
54f9ee45 1869 return _core_.FileSystem_AddHandler(*args, **kwargs)
d14a1e28 1870
e811c8ce
RD
1871def FileSystem_CleanUpHandlers(*args, **kwargs):
1872 """FileSystem_CleanUpHandlers()"""
54f9ee45 1873 return _core_.FileSystem_CleanUpHandlers(*args, **kwargs)
d14a1e28 1874
e811c8ce 1875def FileSystem_FileNameToURL(*args, **kwargs):
196addbf 1876 """FileSystem_FileNameToURL(String filename) -> String"""
54f9ee45 1877 return _core_.FileSystem_FileNameToURL(*args, **kwargs)
d14a1e28 1878
e811c8ce 1879def FileSystem_URLToFileName(*args, **kwargs):
196addbf 1880 """FileSystem_URLToFileName(String url) -> String"""
54f9ee45 1881 return _core_.FileSystem_URLToFileName(*args, **kwargs)
2ef75293 1882
d14a1e28 1883class InternetFSHandler(CPPFileSystemHandler):
093d3ff1 1884 """Proxy of C++ InternetFSHandler class"""
e811c8ce
RD
1885 def __repr__(self):
1886 return "<%s.%s; proxy of C++ wxInternetFSHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 1887 def __init__(self, *args, **kwargs):
a95a7133 1888 """__init__(self) -> InternetFSHandler"""
54f9ee45 1889 newobj = _core_.new_InternetFSHandler(*args, **kwargs)
d14a1e28
RD
1890 self.this = newobj.this
1891 self.thisown = 1
1892 del newobj.thisown
e811c8ce 1893 def CanOpen(*args, **kwargs):
a95a7133 1894 """CanOpen(self, String location) -> bool"""
54f9ee45 1895 return _core_.InternetFSHandler_CanOpen(*args, **kwargs)
e811c8ce
RD
1896
1897 def OpenFile(*args, **kwargs):
a95a7133 1898 """OpenFile(self, FileSystem fs, String location) -> FSFile"""
54f9ee45 1899 return _core_.InternetFSHandler_OpenFile(*args, **kwargs)
e811c8ce 1900
d14a1e28
RD
1901
1902class InternetFSHandlerPtr(InternetFSHandler):
1903 def __init__(self, this):
1904 self.this = this
1905 if not hasattr(self,"thisown"): self.thisown = 0
1906 self.__class__ = InternetFSHandler
54f9ee45 1907_core_.InternetFSHandler_swigregister(InternetFSHandlerPtr)
d14a1e28
RD
1908
1909class ZipFSHandler(CPPFileSystemHandler):
093d3ff1 1910 """Proxy of C++ ZipFSHandler class"""
e811c8ce
RD
1911 def __repr__(self):
1912 return "<%s.%s; proxy of C++ wxZipFSHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 1913 def __init__(self, *args, **kwargs):
a95a7133 1914 """__init__(self) -> ZipFSHandler"""
54f9ee45 1915 newobj = _core_.new_ZipFSHandler(*args, **kwargs)
d14a1e28
RD
1916 self.this = newobj.this
1917 self.thisown = 1
1918 del newobj.thisown
e811c8ce 1919 def CanOpen(*args, **kwargs):
a95a7133 1920 """CanOpen(self, String location) -> bool"""
54f9ee45 1921 return _core_.ZipFSHandler_CanOpen(*args, **kwargs)
e811c8ce
RD
1922
1923 def OpenFile(*args, **kwargs):
a95a7133 1924 """OpenFile(self, FileSystem fs, String location) -> FSFile"""
54f9ee45 1925 return _core_.ZipFSHandler_OpenFile(*args, **kwargs)
e811c8ce
RD
1926
1927 def FindFirst(*args, **kwargs):
a95a7133 1928 """FindFirst(self, String spec, int flags=0) -> String"""
54f9ee45 1929 return _core_.ZipFSHandler_FindFirst(*args, **kwargs)
e811c8ce
RD
1930
1931 def FindNext(*args, **kwargs):
a95a7133 1932 """FindNext(self) -> String"""
54f9ee45 1933 return _core_.ZipFSHandler_FindNext(*args, **kwargs)
e811c8ce 1934
d14a1e28
RD
1935
1936class ZipFSHandlerPtr(ZipFSHandler):
1937 def __init__(self, this):
1938 self.this = this
1939 if not hasattr(self,"thisown"): self.thisown = 0
1940 self.__class__ = ZipFSHandler
54f9ee45 1941_core_.ZipFSHandler_swigregister(ZipFSHandlerPtr)
d14a1e28
RD
1942
1943
e811c8ce 1944def __wxMemoryFSHandler_AddFile_wxImage(*args, **kwargs):
196addbf 1945 """__wxMemoryFSHandler_AddFile_wxImage(String filename, Image image, long type)"""
54f9ee45 1946 return _core_.__wxMemoryFSHandler_AddFile_wxImage(*args, **kwargs)
d14a1e28 1947
e811c8ce 1948def __wxMemoryFSHandler_AddFile_wxBitmap(*args, **kwargs):
196addbf 1949 """__wxMemoryFSHandler_AddFile_wxBitmap(String filename, Bitmap bitmap, long type)"""
54f9ee45 1950 return _core_.__wxMemoryFSHandler_AddFile_wxBitmap(*args, **kwargs)
d14a1e28 1951
e811c8ce 1952def __wxMemoryFSHandler_AddFile_Data(*args, **kwargs):
196addbf 1953 """__wxMemoryFSHandler_AddFile_Data(String filename, PyObject data)"""
54f9ee45 1954 return _core_.__wxMemoryFSHandler_AddFile_Data(*args, **kwargs)
2ef75293
RD
1955def MemoryFSHandler_AddFile(filename, dataItem, imgType=-1):
1956 """
1957 Add 'file' to the memory filesystem. The dataItem parameter can
1958 either be a `wx.Bitmap`, `wx.Image` or a string that can contain
1959 arbitrary data. If a bitmap or image is used then the imgType
1960 parameter should specify what kind of image file it should be
1961 written as, wx.BITMAP_TYPE_PNG, etc.
1962 """
1963 if isinstance(dataItem, wx.Image):
1964 __wxMemoryFSHandler_AddFile_wxImage(filename, dataItem, imgType)
1965 elif isinstance(dataItem, wx.Bitmap):
1966 __wxMemoryFSHandler_AddFile_wxBitmap(filename, dataItem, imgType)
1967 elif type(dataItem) == str:
1968 __wxMemoryFSHandler_AddFile_Data(filename, dataItem)
1969 else:
1970 raise TypeError, 'wx.Image, wx.Bitmap or string expected'
d14a1e28
RD
1971
1972class MemoryFSHandler(CPPFileSystemHandler):
093d3ff1 1973 """Proxy of C++ MemoryFSHandler class"""
e811c8ce
RD
1974 def __repr__(self):
1975 return "<%s.%s; proxy of C++ wxMemoryFSHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 1976 def __init__(self, *args, **kwargs):
a95a7133 1977 """__init__(self) -> MemoryFSHandler"""
54f9ee45 1978 newobj = _core_.new_MemoryFSHandler(*args, **kwargs)
d14a1e28
RD
1979 self.this = newobj.this
1980 self.thisown = 1
1981 del newobj.thisown
e811c8ce 1982 def RemoveFile(*args, **kwargs):
66c033b4 1983 """RemoveFile(String filename)"""
54f9ee45 1984 return _core_.MemoryFSHandler_RemoveFile(*args, **kwargs)
e811c8ce
RD
1985
1986 RemoveFile = staticmethod(RemoveFile)
d14a1e28 1987 AddFile = staticmethod(MemoryFSHandler_AddFile)
e811c8ce 1988 def CanOpen(*args, **kwargs):
a95a7133 1989 """CanOpen(self, String location) -> bool"""
54f9ee45 1990 return _core_.MemoryFSHandler_CanOpen(*args, **kwargs)
e811c8ce
RD
1991
1992 def OpenFile(*args, **kwargs):
a95a7133 1993 """OpenFile(self, FileSystem fs, String location) -> FSFile"""
54f9ee45 1994 return _core_.MemoryFSHandler_OpenFile(*args, **kwargs)
e811c8ce
RD
1995
1996 def FindFirst(*args, **kwargs):
a95a7133 1997 """FindFirst(self, String spec, int flags=0) -> String"""
54f9ee45 1998 return _core_.MemoryFSHandler_FindFirst(*args, **kwargs)
e811c8ce
RD
1999
2000 def FindNext(*args, **kwargs):
a95a7133 2001 """FindNext(self) -> String"""
54f9ee45 2002 return _core_.MemoryFSHandler_FindNext(*args, **kwargs)
e811c8ce 2003
d14a1e28
RD
2004
2005class MemoryFSHandlerPtr(MemoryFSHandler):
2006 def __init__(self, this):
2007 self.this = this
2008 if not hasattr(self,"thisown"): self.thisown = 0
2009 self.__class__ = MemoryFSHandler
54f9ee45 2010_core_.MemoryFSHandler_swigregister(MemoryFSHandlerPtr)
d14a1e28 2011
e811c8ce 2012def MemoryFSHandler_RemoveFile(*args, **kwargs):
196addbf 2013 """MemoryFSHandler_RemoveFile(String filename)"""
54f9ee45 2014 return _core_.MemoryFSHandler_RemoveFile(*args, **kwargs)
d14a1e28
RD
2015
2016#---------------------------------------------------------------------------
2017
2018class ImageHandler(Object):
093d3ff1 2019 """Proxy of C++ ImageHandler class"""
d14a1e28
RD
2020 def __init__(self): raise RuntimeError, "No constructor defined"
2021 def __repr__(self):
2022 return "<%s.%s; proxy of C++ wxImageHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
e811c8ce 2023 def GetName(*args, **kwargs):
a95a7133 2024 """GetName(self) -> String"""
54f9ee45 2025 return _core_.ImageHandler_GetName(*args, **kwargs)
e811c8ce
RD
2026
2027 def GetExtension(*args, **kwargs):
a95a7133 2028 """GetExtension(self) -> String"""
54f9ee45 2029 return _core_.ImageHandler_GetExtension(*args, **kwargs)
e811c8ce
RD
2030
2031 def GetType(*args, **kwargs):
a95a7133 2032 """GetType(self) -> long"""
54f9ee45 2033 return _core_.ImageHandler_GetType(*args, **kwargs)
e811c8ce
RD
2034
2035 def GetMimeType(*args, **kwargs):
a95a7133 2036 """GetMimeType(self) -> String"""
54f9ee45 2037 return _core_.ImageHandler_GetMimeType(*args, **kwargs)
e811c8ce
RD
2038
2039 def CanRead(*args, **kwargs):
a95a7133 2040 """CanRead(self, String name) -> bool"""
54f9ee45 2041 return _core_.ImageHandler_CanRead(*args, **kwargs)
e811c8ce
RD
2042
2043 def SetName(*args, **kwargs):
a95a7133 2044 """SetName(self, String name)"""
54f9ee45 2045 return _core_.ImageHandler_SetName(*args, **kwargs)
e811c8ce
RD
2046
2047 def SetExtension(*args, **kwargs):
a95a7133 2048 """SetExtension(self, String extension)"""
54f9ee45 2049 return _core_.ImageHandler_SetExtension(*args, **kwargs)
e811c8ce
RD
2050
2051 def SetType(*args, **kwargs):
a95a7133 2052 """SetType(self, long type)"""
54f9ee45 2053 return _core_.ImageHandler_SetType(*args, **kwargs)
e811c8ce
RD
2054
2055 def SetMimeType(*args, **kwargs):
a95a7133 2056 """SetMimeType(self, String mimetype)"""
54f9ee45 2057 return _core_.ImageHandler_SetMimeType(*args, **kwargs)
e811c8ce 2058
d14a1e28
RD
2059
2060class ImageHandlerPtr(ImageHandler):
2061 def __init__(self, this):
2062 self.this = this
2063 if not hasattr(self,"thisown"): self.thisown = 0
2064 self.__class__ = ImageHandler
54f9ee45 2065_core_.ImageHandler_swigregister(ImageHandlerPtr)
d14a1e28
RD
2066
2067class ImageHistogram(object):
093d3ff1 2068 """Proxy of C++ ImageHistogram class"""
e811c8ce
RD
2069 def __repr__(self):
2070 return "<%s.%s; proxy of C++ wxImageHistogram instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 2071 def __init__(self, *args, **kwargs):
a95a7133 2072 """__init__(self) -> ImageHistogram"""
54f9ee45 2073 newobj = _core_.new_ImageHistogram(*args, **kwargs)
d14a1e28
RD
2074 self.this = newobj.this
2075 self.thisown = 1
2076 del newobj.thisown
e811c8ce 2077 def MakeKey(*args, **kwargs):
0df68c9f 2078 """
66c033b4 2079 MakeKey(unsigned char r, unsigned char g, unsigned char b) -> unsigned long
e811c8ce 2080
0df68c9f
RD
2081 Get the key in the histogram for the given RGB values
2082 """
54f9ee45 2083 return _core_.ImageHistogram_MakeKey(*args, **kwargs)
e811c8ce
RD
2084
2085 MakeKey = staticmethod(MakeKey)
2086 def FindFirstUnusedColour(*args, **kwargs):
fd2dc343
RD
2087 """
2088 FindFirstUnusedColour(int startR=1, int startG=0, int startB=0) -> (success, r, g, b)
2089
2090 Find first colour that is not used in the image and has higher RGB
2091 values than startR, startG, startB. Returns a tuple consisting of a
2092 success flag and rgb values.
2093 """
54f9ee45 2094 return _core_.ImageHistogram_FindFirstUnusedColour(*args, **kwargs)
e811c8ce 2095
d14a1e28
RD
2096
2097class ImageHistogramPtr(ImageHistogram):
2098 def __init__(self, this):
2099 self.this = this
2100 if not hasattr(self,"thisown"): self.thisown = 0
2101 self.__class__ = ImageHistogram
54f9ee45 2102_core_.ImageHistogram_swigregister(ImageHistogramPtr)
d14a1e28 2103
e811c8ce 2104def ImageHistogram_MakeKey(*args, **kwargs):
0df68c9f
RD
2105 """
2106 ImageHistogram_MakeKey(unsigned char r, unsigned char g, unsigned char b) -> unsigned long
e811c8ce 2107
0df68c9f
RD
2108 Get the key in the histogram for the given RGB values
2109 """
54f9ee45 2110 return _core_.ImageHistogram_MakeKey(*args, **kwargs)
d14a1e28
RD
2111
2112class Image(Object):
093d3ff1 2113 """Proxy of C++ Image class"""
e811c8ce
RD
2114 def __repr__(self):
2115 return "<%s.%s; proxy of C++ wxImage instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 2116 def __init__(self, *args, **kwargs):
a95a7133 2117 """__init__(self, String name, long type=BITMAP_TYPE_ANY, int index=-1) -> Image"""
54f9ee45 2118 newobj = _core_.new_Image(*args, **kwargs)
d14a1e28
RD
2119 self.this = newobj.this
2120 self.thisown = 1
2121 del newobj.thisown
54f9ee45 2122 def __del__(self, destroy=_core_.delete_Image):
a95a7133 2123 """__del__(self)"""
d14a1e28
RD
2124 try:
2125 if self.thisown: destroy(self)
2126 except: pass
e811c8ce
RD
2127
2128 def Create(*args, **kwargs):
a95a7133 2129 """Create(self, int width, int height)"""
54f9ee45 2130 return _core_.Image_Create(*args, **kwargs)
e811c8ce
RD
2131
2132 def Destroy(*args, **kwargs):
0df68c9f 2133 """
a95a7133 2134 Destroy(self)
e811c8ce 2135
0df68c9f
RD
2136 Deletes the C++ object this Python object is a proxy for.
2137 """
54f9ee45 2138 return _core_.Image_Destroy(*args, **kwargs)
e811c8ce
RD
2139
2140 def Scale(*args, **kwargs):
a95a7133 2141 """Scale(self, int width, int height) -> Image"""
54f9ee45 2142 return _core_.Image_Scale(*args, **kwargs)
e811c8ce
RD
2143
2144 def ShrinkBy(*args, **kwargs):
a95a7133 2145 """ShrinkBy(self, int xFactor, int yFactor) -> Image"""
54f9ee45 2146 return _core_.Image_ShrinkBy(*args, **kwargs)
e811c8ce
RD
2147
2148 def Rescale(*args, **kwargs):
a95a7133 2149 """Rescale(self, int width, int height) -> Image"""
54f9ee45 2150 return _core_.Image_Rescale(*args, **kwargs)
e811c8ce
RD
2151
2152 def SetRGB(*args, **kwargs):
a95a7133 2153 """SetRGB(self, int x, int y, unsigned char r, unsigned char g, unsigned char b)"""
54f9ee45 2154 return _core_.Image_SetRGB(*args, **kwargs)
e811c8ce
RD
2155
2156 def GetRed(*args, **kwargs):
a95a7133 2157 """GetRed(self, int x, int y) -> unsigned char"""
54f9ee45 2158 return _core_.Image_GetRed(*args, **kwargs)
e811c8ce
RD
2159
2160 def GetGreen(*args, **kwargs):
a95a7133 2161 """GetGreen(self, int x, int y) -> unsigned char"""
54f9ee45 2162 return _core_.Image_GetGreen(*args, **kwargs)
e811c8ce
RD
2163
2164 def GetBlue(*args, **kwargs):
a95a7133 2165 """GetBlue(self, int x, int y) -> unsigned char"""
54f9ee45 2166 return _core_.Image_GetBlue(*args, **kwargs)
e811c8ce
RD
2167
2168 def SetAlpha(*args, **kwargs):
a95a7133 2169 """SetAlpha(self, int x, int y, unsigned char alpha)"""
54f9ee45 2170 return _core_.Image_SetAlpha(*args, **kwargs)
e811c8ce
RD
2171
2172 def GetAlpha(*args, **kwargs):
a95a7133 2173 """GetAlpha(self, int x, int y) -> unsigned char"""
54f9ee45 2174 return _core_.Image_GetAlpha(*args, **kwargs)
e811c8ce
RD
2175
2176 def HasAlpha(*args, **kwargs):
a95a7133 2177 """HasAlpha(self) -> bool"""
54f9ee45 2178 return _core_.Image_HasAlpha(*args, **kwargs)
e811c8ce 2179
68350608
RD
2180 def InitAlpha(*args, **kwargs):
2181 """
2182 InitAlpha(self)
2183
2184 Initializes the image alpha channel data. It is an error to call it if
2185 the image already has alpha data. If it doesn't, alpha data will be by
2186 default initialized to all pixels being fully opaque. But if the image
2187 has a a mask colour, all mask pixels will be completely transparent.
2188 """
2189 return _core_.Image_InitAlpha(*args, **kwargs)
2190
e811c8ce 2191 def FindFirstUnusedColour(*args, **kwargs):
fd2dc343
RD
2192 """
2193 FindFirstUnusedColour(int startR=1, int startG=0, int startB=0) -> (success, r, g, b)
2194
2195 Find first colour that is not used in the image and has higher RGB
2196 values than startR, startG, startB. Returns a tuple consisting of a
2197 success flag and rgb values.
2198 """
54f9ee45 2199 return _core_.Image_FindFirstUnusedColour(*args, **kwargs)
e811c8ce 2200
4cf4100f
RD
2201 def ConvertAlphaToMask(*args, **kwargs):
2202 """
2203 ConvertAlphaToMask(self, byte threshold=128) -> bool
2204
2205 If the image has alpha channel, this method converts it to mask. All pixels
2206 with alpha value less than ``threshold`` are replaced with mask colour and the
2207 alpha channel is removed. Mask colour is chosen automatically using
2208 `FindFirstUnusedColour`.
2209
2210 If the image image doesn't have alpha channel, ConvertAlphaToMask does
2211 nothing.
2212 """
2213 return _core_.Image_ConvertAlphaToMask(*args, **kwargs)
2214
8fb0e70a
RD
2215 def ConvertColourToAlpha(*args, **kwargs):
2216 """
2217 ConvertColourToAlpha(self, unsigned char r, unsigned char g, unsigned char b) -> bool
2218
2219 This method converts an image where the original alpha information is
2220 only available as a shades of a colour (actually shades of grey)
2221 typically when you draw anti-aliased text into a bitmap. The DC
2222 drawing routines draw grey values on the black background although
2223 they actually mean to draw white with differnt alpha values. This
2224 method reverses it, assuming a black (!) background and white text.
2225 The method will then fill up the whole image with the colour given.
2226 """
2227 return _core_.Image_ConvertColourToAlpha(*args, **kwargs)
2228
e811c8ce 2229 def SetMaskFromImage(*args, **kwargs):
a95a7133 2230 """SetMaskFromImage(self, Image mask, byte mr, byte mg, byte mb) -> bool"""
54f9ee45 2231 return _core_.Image_SetMaskFromImage(*args, **kwargs)
e811c8ce
RD
2232
2233 def CanRead(*args, **kwargs):
66c033b4 2234 """CanRead(String name) -> bool"""
54f9ee45 2235 return _core_.Image_CanRead(*args, **kwargs)
e811c8ce
RD
2236
2237 CanRead = staticmethod(CanRead)
2238 def GetImageCount(*args, **kwargs):
66c033b4 2239 """GetImageCount(String name, long type=BITMAP_TYPE_ANY) -> int"""
54f9ee45 2240 return _core_.Image_GetImageCount(*args, **kwargs)
e811c8ce
RD
2241
2242 GetImageCount = staticmethod(GetImageCount)
2243 def LoadFile(*args, **kwargs):
a95a7133 2244 """LoadFile(self, String name, long type=BITMAP_TYPE_ANY, int index=-1) -> bool"""
54f9ee45 2245 return _core_.Image_LoadFile(*args, **kwargs)
e811c8ce
RD
2246
2247 def LoadMimeFile(*args, **kwargs):
a95a7133 2248 """LoadMimeFile(self, String name, String mimetype, int index=-1) -> bool"""
54f9ee45 2249 return _core_.Image_LoadMimeFile(*args, **kwargs)
e811c8ce
RD
2250
2251 def SaveFile(*args, **kwargs):
a95a7133 2252 """SaveFile(self, String name, int type) -> bool"""
54f9ee45 2253 return _core_.Image_SaveFile(*args, **kwargs)
e811c8ce
RD
2254
2255 def SaveMimeFile(*args, **kwargs):
a95a7133 2256 """SaveMimeFile(self, String name, String mimetype) -> bool"""
54f9ee45 2257 return _core_.Image_SaveMimeFile(*args, **kwargs)
e811c8ce
RD
2258
2259 def CanReadStream(*args, **kwargs):
66c033b4 2260 """CanReadStream(InputStream stream) -> bool"""
54f9ee45 2261 return _core_.Image_CanReadStream(*args, **kwargs)
e811c8ce
RD
2262
2263 CanReadStream = staticmethod(CanReadStream)
2264 def LoadStream(*args, **kwargs):
a95a7133 2265 """LoadStream(self, InputStream stream, long type=BITMAP_TYPE_ANY, int index=-1) -> bool"""
54f9ee45 2266 return _core_.Image_LoadStream(*args, **kwargs)
e811c8ce
RD
2267
2268 def LoadMimeStream(*args, **kwargs):
a95a7133 2269 """LoadMimeStream(self, InputStream stream, String mimetype, int index=-1) -> bool"""
54f9ee45 2270 return _core_.Image_LoadMimeStream(*args, **kwargs)
e811c8ce
RD
2271
2272 def Ok(*args, **kwargs):
a95a7133 2273 """Ok(self) -> bool"""
54f9ee45 2274 return _core_.Image_Ok(*args, **kwargs)
e811c8ce
RD
2275
2276 def GetWidth(*args, **kwargs):
a95a7133 2277 """GetWidth(self) -> int"""
54f9ee45 2278 return _core_.Image_GetWidth(*args, **kwargs)
e811c8ce
RD
2279
2280 def GetHeight(*args, **kwargs):
a95a7133 2281 """GetHeight(self) -> int"""
54f9ee45 2282 return _core_.Image_GetHeight(*args, **kwargs)
e811c8ce 2283
b2df227b 2284 def GetSize(*args, **kwargs):
a95a7133 2285 """GetSize(self) -> Size"""
54f9ee45 2286 return _core_.Image_GetSize(*args, **kwargs)
b2df227b 2287
e811c8ce 2288 def GetSubImage(*args, **kwargs):
a95a7133 2289 """GetSubImage(self, Rect rect) -> Image"""
54f9ee45 2290 return _core_.Image_GetSubImage(*args, **kwargs)
e811c8ce
RD
2291
2292 def Copy(*args, **kwargs):
a95a7133 2293 """Copy(self) -> Image"""
54f9ee45 2294 return _core_.Image_Copy(*args, **kwargs)
e811c8ce
RD
2295
2296 def Paste(*args, **kwargs):
a95a7133 2297 """Paste(self, Image image, int x, int y)"""
54f9ee45 2298 return _core_.Image_Paste(*args, **kwargs)
e811c8ce
RD
2299
2300 def GetData(*args, **kwargs):
a95a7133 2301 """GetData(self) -> PyObject"""
54f9ee45 2302 return _core_.Image_GetData(*args, **kwargs)
e811c8ce
RD
2303
2304 def SetData(*args, **kwargs):
a95a7133 2305 """SetData(self, PyObject data)"""
54f9ee45 2306 return _core_.Image_SetData(*args, **kwargs)
e811c8ce
RD
2307
2308 def GetDataBuffer(*args, **kwargs):
a95a7133 2309 """GetDataBuffer(self) -> PyObject"""
54f9ee45 2310 return _core_.Image_GetDataBuffer(*args, **kwargs)
e811c8ce
RD
2311
2312 def SetDataBuffer(*args, **kwargs):
a95a7133 2313 """SetDataBuffer(self, PyObject data)"""
54f9ee45 2314 return _core_.Image_SetDataBuffer(*args, **kwargs)
e811c8ce
RD
2315
2316 def GetAlphaData(*args, **kwargs):
a95a7133 2317 """GetAlphaData(self) -> PyObject"""
54f9ee45 2318 return _core_.Image_GetAlphaData(*args, **kwargs)
e811c8ce
RD
2319
2320 def SetAlphaData(*args, **kwargs):
a95a7133 2321 """SetAlphaData(self, PyObject data)"""
54f9ee45 2322 return _core_.Image_SetAlphaData(*args, **kwargs)
e811c8ce
RD
2323
2324 def GetAlphaBuffer(*args, **kwargs):
a95a7133 2325 """GetAlphaBuffer(self) -> PyObject"""
54f9ee45 2326 return _core_.Image_GetAlphaBuffer(*args, **kwargs)
e811c8ce
RD
2327
2328 def SetAlphaBuffer(*args, **kwargs):
a95a7133 2329 """SetAlphaBuffer(self, PyObject data)"""
54f9ee45 2330 return _core_.Image_SetAlphaBuffer(*args, **kwargs)
e811c8ce
RD
2331
2332 def SetMaskColour(*args, **kwargs):
a95a7133 2333 """SetMaskColour(self, unsigned char r, unsigned char g, unsigned char b)"""
54f9ee45 2334 return _core_.Image_SetMaskColour(*args, **kwargs)
e811c8ce
RD
2335
2336 def GetMaskRed(*args, **kwargs):
a95a7133 2337 """GetMaskRed(self) -> unsigned char"""
54f9ee45 2338 return _core_.Image_GetMaskRed(*args, **kwargs)
e811c8ce
RD
2339
2340 def GetMaskGreen(*args, **kwargs):
a95a7133 2341 """GetMaskGreen(self) -> unsigned char"""
54f9ee45 2342 return _core_.Image_GetMaskGreen(*args, **kwargs)
e811c8ce
RD
2343
2344 def GetMaskBlue(*args, **kwargs):
a95a7133 2345 """GetMaskBlue(self) -> unsigned char"""
54f9ee45 2346 return _core_.Image_GetMaskBlue(*args, **kwargs)
e811c8ce
RD
2347
2348 def SetMask(*args, **kwargs):
a95a7133 2349 """SetMask(self, bool mask=True)"""
54f9ee45 2350 return _core_.Image_SetMask(*args, **kwargs)
e811c8ce
RD
2351
2352 def HasMask(*args, **kwargs):
a95a7133 2353 """HasMask(self) -> bool"""
54f9ee45 2354 return _core_.Image_HasMask(*args, **kwargs)
e811c8ce
RD
2355
2356 def Rotate(*args, **kwargs):
0df68c9f 2357 """
a95a7133 2358 Rotate(self, double angle, Point centre_of_rotation, bool interpolating=True,
0df68c9f
RD
2359 Point offset_after_rotation=None) -> Image
2360 """
54f9ee45 2361 return _core_.Image_Rotate(*args, **kwargs)
e811c8ce
RD
2362
2363 def Rotate90(*args, **kwargs):
a95a7133 2364 """Rotate90(self, bool clockwise=True) -> Image"""
54f9ee45 2365 return _core_.Image_Rotate90(*args, **kwargs)
e811c8ce
RD
2366
2367 def Mirror(*args, **kwargs):
a95a7133 2368 """Mirror(self, bool horizontally=True) -> Image"""
54f9ee45 2369 return _core_.Image_Mirror(*args, **kwargs)
e811c8ce
RD
2370
2371 def Replace(*args, **kwargs):
0df68c9f 2372 """
a95a7133 2373 Replace(self, unsigned char r1, unsigned char g1, unsigned char b1,
0df68c9f
RD
2374 unsigned char r2, unsigned char g2, unsigned char b2)
2375 """
54f9ee45 2376 return _core_.Image_Replace(*args, **kwargs)
e811c8ce
RD
2377
2378 def ConvertToMono(*args, **kwargs):
a95a7133 2379 """ConvertToMono(self, unsigned char r, unsigned char g, unsigned char b) -> Image"""
54f9ee45 2380 return _core_.Image_ConvertToMono(*args, **kwargs)
e811c8ce
RD
2381
2382 def SetOption(*args, **kwargs):
a95a7133 2383 """SetOption(self, String name, String value)"""
54f9ee45 2384 return _core_.Image_SetOption(*args, **kwargs)
e811c8ce
RD
2385
2386 def SetOptionInt(*args, **kwargs):
a95a7133 2387 """SetOptionInt(self, String name, int value)"""
54f9ee45 2388 return _core_.Image_SetOptionInt(*args, **kwargs)
e811c8ce
RD
2389
2390 def GetOption(*args, **kwargs):
a95a7133 2391 """GetOption(self, String name) -> String"""
54f9ee45 2392 return _core_.Image_GetOption(*args, **kwargs)
e811c8ce
RD
2393
2394 def GetOptionInt(*args, **kwargs):
a95a7133 2395 """GetOptionInt(self, String name) -> int"""
54f9ee45 2396 return _core_.Image_GetOptionInt(*args, **kwargs)
e811c8ce
RD
2397
2398 def HasOption(*args, **kwargs):
a95a7133 2399 """HasOption(self, String name) -> bool"""
54f9ee45 2400 return _core_.Image_HasOption(*args, **kwargs)
e811c8ce
RD
2401
2402 def CountColours(*args, **kwargs):
a95a7133 2403 """CountColours(self, unsigned long stopafter=(unsigned long) -1) -> unsigned long"""
54f9ee45 2404 return _core_.Image_CountColours(*args, **kwargs)
e811c8ce
RD
2405
2406 def ComputeHistogram(*args, **kwargs):
a95a7133 2407 """ComputeHistogram(self, ImageHistogram h) -> unsigned long"""
54f9ee45 2408 return _core_.Image_ComputeHistogram(*args, **kwargs)
e811c8ce
RD
2409
2410 def AddHandler(*args, **kwargs):
66c033b4 2411 """AddHandler(ImageHandler handler)"""
54f9ee45 2412 return _core_.Image_AddHandler(*args, **kwargs)
e811c8ce
RD
2413
2414 AddHandler = staticmethod(AddHandler)
2415 def InsertHandler(*args, **kwargs):
66c033b4 2416 """InsertHandler(ImageHandler handler)"""
54f9ee45 2417 return _core_.Image_InsertHandler(*args, **kwargs)
e811c8ce
RD
2418
2419 InsertHandler = staticmethod(InsertHandler)
2420 def RemoveHandler(*args, **kwargs):
66c033b4 2421 """RemoveHandler(String name) -> bool"""
54f9ee45 2422 return _core_.Image_RemoveHandler(*args, **kwargs)
e811c8ce
RD
2423
2424 RemoveHandler = staticmethod(RemoveHandler)
2425 def GetImageExtWildcard(*args, **kwargs):
66c033b4 2426 """GetImageExtWildcard() -> String"""
54f9ee45 2427 return _core_.Image_GetImageExtWildcard(*args, **kwargs)
e811c8ce
RD
2428
2429 GetImageExtWildcard = staticmethod(GetImageExtWildcard)
2430 def ConvertToBitmap(*args, **kwargs):
1fbf26be 2431 """ConvertToBitmap(self, int depth=-1) -> Bitmap"""
54f9ee45 2432 return _core_.Image_ConvertToBitmap(*args, **kwargs)
e811c8ce
RD
2433
2434 def ConvertToMonoBitmap(*args, **kwargs):
a95a7133 2435 """ConvertToMonoBitmap(self, unsigned char red, unsigned char green, unsigned char blue) -> Bitmap"""
54f9ee45 2436 return _core_.Image_ConvertToMonoBitmap(*args, **kwargs)
e811c8ce
RD
2437
2438 def __nonzero__(self): return self.Ok()
d14a1e28
RD
2439
2440class ImagePtr(Image):
2441 def __init__(self, this):
2442 self.this = this
2443 if not hasattr(self,"thisown"): self.thisown = 0
2444 self.__class__ = Image
54f9ee45 2445_core_.Image_swigregister(ImagePtr)
d14a1e28
RD
2446
2447def ImageFromMime(*args, **kwargs):
196addbf 2448 """ImageFromMime(String name, String mimetype, int index=-1) -> Image"""
54f9ee45 2449 val = _core_.new_ImageFromMime(*args, **kwargs)
d14a1e28
RD
2450 val.thisown = 1
2451 return val
2452
2453def ImageFromStream(*args, **kwargs):
196addbf 2454 """ImageFromStream(InputStream stream, long type=BITMAP_TYPE_ANY, int index=-1) -> Image"""
54f9ee45 2455 val = _core_.new_ImageFromStream(*args, **kwargs)
d14a1e28
RD
2456 val.thisown = 1
2457 return val
2458
2459def ImageFromStreamMime(*args, **kwargs):
196addbf 2460 """ImageFromStreamMime(InputStream stream, String mimetype, int index=-1) -> Image"""
54f9ee45 2461 val = _core_.new_ImageFromStreamMime(*args, **kwargs)
d14a1e28
RD
2462 val.thisown = 1
2463 return val
2464
66c033b4
RD
2465def EmptyImage(*args, **kwargs):
2466 """EmptyImage(int width=0, int height=0, bool clear=True) -> Image"""
2467 val = _core_.new_EmptyImage(*args, **kwargs)
d14a1e28
RD
2468 val.thisown = 1
2469 return val
2470
2471def ImageFromBitmap(*args, **kwargs):
196addbf 2472 """ImageFromBitmap(Bitmap bitmap) -> Image"""
54f9ee45 2473 val = _core_.new_ImageFromBitmap(*args, **kwargs)
d14a1e28
RD
2474 val.thisown = 1
2475 return val
2476
2477def ImageFromData(*args, **kwargs):
e811c8ce 2478 """ImageFromData(int width, int height, unsigned char data) -> Image"""
54f9ee45 2479 val = _core_.new_ImageFromData(*args, **kwargs)
d14a1e28
RD
2480 val.thisown = 1
2481 return val
2482
1823fbb4
RD
2483def ImageFromDataWithAlpha(*args, **kwargs):
2484 """ImageFromDataWithAlpha(int width, int height, unsigned char data, unsigned char alpha) -> Image"""
2485 val = _core_.new_ImageFromDataWithAlpha(*args, **kwargs)
2486 val.thisown = 1
2487 return val
2488
e811c8ce 2489def Image_CanRead(*args, **kwargs):
196addbf 2490 """Image_CanRead(String name) -> bool"""
54f9ee45 2491 return _core_.Image_CanRead(*args, **kwargs)
d14a1e28 2492
e811c8ce 2493def Image_GetImageCount(*args, **kwargs):
196addbf 2494 """Image_GetImageCount(String name, long type=BITMAP_TYPE_ANY) -> int"""
54f9ee45 2495 return _core_.Image_GetImageCount(*args, **kwargs)
d14a1e28 2496
e811c8ce 2497def Image_CanReadStream(*args, **kwargs):
196addbf 2498 """Image_CanReadStream(InputStream stream) -> bool"""
54f9ee45 2499 return _core_.Image_CanReadStream(*args, **kwargs)
d14a1e28 2500
e811c8ce
RD
2501def Image_AddHandler(*args, **kwargs):
2502 """Image_AddHandler(ImageHandler handler)"""
54f9ee45 2503 return _core_.Image_AddHandler(*args, **kwargs)
d14a1e28 2504
e811c8ce
RD
2505def Image_InsertHandler(*args, **kwargs):
2506 """Image_InsertHandler(ImageHandler handler)"""
54f9ee45 2507 return _core_.Image_InsertHandler(*args, **kwargs)
d14a1e28 2508
e811c8ce 2509def Image_RemoveHandler(*args, **kwargs):
196addbf 2510 """Image_RemoveHandler(String name) -> bool"""
54f9ee45 2511 return _core_.Image_RemoveHandler(*args, **kwargs)
d14a1e28 2512
e811c8ce 2513def Image_GetImageExtWildcard(*args, **kwargs):
196addbf 2514 """Image_GetImageExtWildcard() -> String"""
54f9ee45 2515 return _core_.Image_GetImageExtWildcard(*args, **kwargs)
d14a1e28 2516
5e4ca4a8
RD
2517def InitAllImageHandlers():
2518 """
2519 The former functionality of InitAllImageHanders is now done internal to
2520 the _core_ extension module and so this function has become a simple NOP.
2521 """
2522 pass
d14a1e28 2523
54f9ee45
RD
2524IMAGE_RESOLUTION_INCHES = _core_.IMAGE_RESOLUTION_INCHES
2525IMAGE_RESOLUTION_CM = _core_.IMAGE_RESOLUTION_CM
b9d6a5f3
RD
2526PNG_TYPE_COLOUR = _core_.PNG_TYPE_COLOUR
2527PNG_TYPE_GREY = _core_.PNG_TYPE_GREY
2528PNG_TYPE_GREY_RED = _core_.PNG_TYPE_GREY_RED
54f9ee45
RD
2529BMP_24BPP = _core_.BMP_24BPP
2530BMP_8BPP = _core_.BMP_8BPP
2531BMP_8BPP_GREY = _core_.BMP_8BPP_GREY
2532BMP_8BPP_GRAY = _core_.BMP_8BPP_GRAY
2533BMP_8BPP_RED = _core_.BMP_8BPP_RED
2534BMP_8BPP_PALETTE = _core_.BMP_8BPP_PALETTE
2535BMP_4BPP = _core_.BMP_4BPP
2536BMP_1BPP = _core_.BMP_1BPP
2537BMP_1BPP_BW = _core_.BMP_1BPP_BW
d14a1e28 2538class BMPHandler(ImageHandler):
093d3ff1 2539 """Proxy of C++ BMPHandler class"""
e811c8ce
RD
2540 def __repr__(self):
2541 return "<%s.%s; proxy of C++ wxBMPHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 2542 def __init__(self, *args, **kwargs):
a95a7133 2543 """__init__(self) -> BMPHandler"""
54f9ee45 2544 newobj = _core_.new_BMPHandler(*args, **kwargs)
d14a1e28
RD
2545 self.this = newobj.this
2546 self.thisown = 1
2547 del newobj.thisown
d14a1e28
RD
2548
2549class BMPHandlerPtr(BMPHandler):
2550 def __init__(self, this):
2551 self.this = this
2552 if not hasattr(self,"thisown"): self.thisown = 0
2553 self.__class__ = BMPHandler
54f9ee45 2554_core_.BMPHandler_swigregister(BMPHandlerPtr)
d14a1e28 2555NullImage = cvar.NullImage
0c243d93 2556IMAGE_OPTION_FILENAME = cvar.IMAGE_OPTION_FILENAME
d14a1e28
RD
2557IMAGE_OPTION_BMP_FORMAT = cvar.IMAGE_OPTION_BMP_FORMAT
2558IMAGE_OPTION_CUR_HOTSPOT_X = cvar.IMAGE_OPTION_CUR_HOTSPOT_X
2559IMAGE_OPTION_CUR_HOTSPOT_Y = cvar.IMAGE_OPTION_CUR_HOTSPOT_Y
2560IMAGE_OPTION_RESOLUTION = cvar.IMAGE_OPTION_RESOLUTION
0c243d93
RD
2561IMAGE_OPTION_RESOLUTIONX = cvar.IMAGE_OPTION_RESOLUTIONX
2562IMAGE_OPTION_RESOLUTIONY = cvar.IMAGE_OPTION_RESOLUTIONY
d14a1e28 2563IMAGE_OPTION_RESOLUTIONUNIT = cvar.IMAGE_OPTION_RESOLUTIONUNIT
24d7cbea 2564IMAGE_OPTION_QUALITY = cvar.IMAGE_OPTION_QUALITY
0c243d93
RD
2565IMAGE_OPTION_BITSPERSAMPLE = cvar.IMAGE_OPTION_BITSPERSAMPLE
2566IMAGE_OPTION_SAMPLESPERPIXEL = cvar.IMAGE_OPTION_SAMPLESPERPIXEL
2567IMAGE_OPTION_COMPRESSION = cvar.IMAGE_OPTION_COMPRESSION
2568IMAGE_OPTION_IMAGEDESCRIPTOR = cvar.IMAGE_OPTION_IMAGEDESCRIPTOR
b9d6a5f3
RD
2569IMAGE_OPTION_PNG_FORMAT = cvar.IMAGE_OPTION_PNG_FORMAT
2570IMAGE_OPTION_PNG_BITDEPTH = cvar.IMAGE_OPTION_PNG_BITDEPTH
d14a1e28
RD
2571
2572class ICOHandler(BMPHandler):
093d3ff1 2573 """Proxy of C++ ICOHandler class"""
e811c8ce
RD
2574 def __repr__(self):
2575 return "<%s.%s; proxy of C++ wxICOHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 2576 def __init__(self, *args, **kwargs):
a95a7133 2577 """__init__(self) -> ICOHandler"""
54f9ee45 2578 newobj = _core_.new_ICOHandler(*args, **kwargs)
d14a1e28
RD
2579 self.this = newobj.this
2580 self.thisown = 1
2581 del newobj.thisown
d14a1e28
RD
2582
2583class ICOHandlerPtr(ICOHandler):
2584 def __init__(self, this):
2585 self.this = this
2586 if not hasattr(self,"thisown"): self.thisown = 0
2587 self.__class__ = ICOHandler
54f9ee45 2588_core_.ICOHandler_swigregister(ICOHandlerPtr)
d14a1e28
RD
2589
2590class CURHandler(ICOHandler):
093d3ff1 2591 """Proxy of C++ CURHandler class"""
e811c8ce
RD
2592 def __repr__(self):
2593 return "<%s.%s; proxy of C++ wxCURHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 2594 def __init__(self, *args, **kwargs):
a95a7133 2595 """__init__(self) -> CURHandler"""
54f9ee45 2596 newobj = _core_.new_CURHandler(*args, **kwargs)
d14a1e28
RD
2597 self.this = newobj.this
2598 self.thisown = 1
2599 del newobj.thisown
d14a1e28
RD
2600
2601class CURHandlerPtr(CURHandler):
2602 def __init__(self, this):
2603 self.this = this
2604 if not hasattr(self,"thisown"): self.thisown = 0
2605 self.__class__ = CURHandler
54f9ee45 2606_core_.CURHandler_swigregister(CURHandlerPtr)
d14a1e28
RD
2607
2608class ANIHandler(CURHandler):
093d3ff1 2609 """Proxy of C++ ANIHandler class"""
e811c8ce
RD
2610 def __repr__(self):
2611 return "<%s.%s; proxy of C++ wxANIHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 2612 def __init__(self, *args, **kwargs):
a95a7133 2613 """__init__(self) -> ANIHandler"""
54f9ee45 2614 newobj = _core_.new_ANIHandler(*args, **kwargs)
d14a1e28
RD
2615 self.this = newobj.this
2616 self.thisown = 1
2617 del newobj.thisown
d14a1e28
RD
2618
2619class ANIHandlerPtr(ANIHandler):
2620 def __init__(self, this):
2621 self.this = this
2622 if not hasattr(self,"thisown"): self.thisown = 0
2623 self.__class__ = ANIHandler
54f9ee45 2624_core_.ANIHandler_swigregister(ANIHandlerPtr)
d14a1e28
RD
2625
2626class PNGHandler(ImageHandler):
093d3ff1 2627 """Proxy of C++ PNGHandler class"""
e811c8ce
RD
2628 def __repr__(self):
2629 return "<%s.%s; proxy of C++ wxPNGHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 2630 def __init__(self, *args, **kwargs):
a95a7133 2631 """__init__(self) -> PNGHandler"""
54f9ee45 2632 newobj = _core_.new_PNGHandler(*args, **kwargs)
d14a1e28
RD
2633 self.this = newobj.this
2634 self.thisown = 1
2635 del newobj.thisown
d14a1e28
RD
2636
2637class PNGHandlerPtr(PNGHandler):
2638 def __init__(self, this):
2639 self.this = this
2640 if not hasattr(self,"thisown"): self.thisown = 0
2641 self.__class__ = PNGHandler
54f9ee45 2642_core_.PNGHandler_swigregister(PNGHandlerPtr)
d14a1e28
RD
2643
2644class GIFHandler(ImageHandler):
093d3ff1 2645 """Proxy of C++ GIFHandler class"""
e811c8ce
RD
2646 def __repr__(self):
2647 return "<%s.%s; proxy of C++ wxGIFHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 2648 def __init__(self, *args, **kwargs):
a95a7133 2649 """__init__(self) -> GIFHandler"""
54f9ee45 2650 newobj = _core_.new_GIFHandler(*args, **kwargs)
d14a1e28
RD
2651 self.this = newobj.this
2652 self.thisown = 1
2653 del newobj.thisown
d14a1e28
RD
2654
2655class GIFHandlerPtr(GIFHandler):
2656 def __init__(self, this):
2657 self.this = this
2658 if not hasattr(self,"thisown"): self.thisown = 0
2659 self.__class__ = GIFHandler
54f9ee45 2660_core_.GIFHandler_swigregister(GIFHandlerPtr)
d14a1e28
RD
2661
2662class PCXHandler(ImageHandler):
093d3ff1 2663 """Proxy of C++ PCXHandler class"""
e811c8ce
RD
2664 def __repr__(self):
2665 return "<%s.%s; proxy of C++ wxPCXHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 2666 def __init__(self, *args, **kwargs):
a95a7133 2667 """__init__(self) -> PCXHandler"""
54f9ee45 2668 newobj = _core_.new_PCXHandler(*args, **kwargs)
d14a1e28
RD
2669 self.this = newobj.this
2670 self.thisown = 1
2671 del newobj.thisown
d14a1e28
RD
2672
2673class PCXHandlerPtr(PCXHandler):
2674 def __init__(self, this):
2675 self.this = this
2676 if not hasattr(self,"thisown"): self.thisown = 0
2677 self.__class__ = PCXHandler
54f9ee45 2678_core_.PCXHandler_swigregister(PCXHandlerPtr)
d14a1e28
RD
2679
2680class JPEGHandler(ImageHandler):
093d3ff1 2681 """Proxy of C++ JPEGHandler class"""
e811c8ce
RD
2682 def __repr__(self):
2683 return "<%s.%s; proxy of C++ wxJPEGHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 2684 def __init__(self, *args, **kwargs):
a95a7133 2685 """__init__(self) -> JPEGHandler"""
54f9ee45 2686 newobj = _core_.new_JPEGHandler(*args, **kwargs)
d14a1e28
RD
2687 self.this = newobj.this
2688 self.thisown = 1
2689 del newobj.thisown
d14a1e28
RD
2690
2691class JPEGHandlerPtr(JPEGHandler):
2692 def __init__(self, this):
2693 self.this = this
2694 if not hasattr(self,"thisown"): self.thisown = 0
2695 self.__class__ = JPEGHandler
54f9ee45 2696_core_.JPEGHandler_swigregister(JPEGHandlerPtr)
d14a1e28
RD
2697
2698class PNMHandler(ImageHandler):
093d3ff1 2699 """Proxy of C++ PNMHandler class"""
e811c8ce
RD
2700 def __repr__(self):
2701 return "<%s.%s; proxy of C++ wxPNMHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 2702 def __init__(self, *args, **kwargs):
a95a7133 2703 """__init__(self) -> PNMHandler"""
54f9ee45 2704 newobj = _core_.new_PNMHandler(*args, **kwargs)
d14a1e28
RD
2705 self.this = newobj.this
2706 self.thisown = 1
2707 del newobj.thisown
d14a1e28
RD
2708
2709class PNMHandlerPtr(PNMHandler):
2710 def __init__(self, this):
2711 self.this = this
2712 if not hasattr(self,"thisown"): self.thisown = 0
2713 self.__class__ = PNMHandler
54f9ee45 2714_core_.PNMHandler_swigregister(PNMHandlerPtr)
d14a1e28
RD
2715
2716class XPMHandler(ImageHandler):
093d3ff1 2717 """Proxy of C++ XPMHandler class"""
e811c8ce
RD
2718 def __repr__(self):
2719 return "<%s.%s; proxy of C++ wxXPMHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 2720 def __init__(self, *args, **kwargs):
a95a7133 2721 """__init__(self) -> XPMHandler"""
54f9ee45 2722 newobj = _core_.new_XPMHandler(*args, **kwargs)
d14a1e28
RD
2723 self.this = newobj.this
2724 self.thisown = 1
2725 del newobj.thisown
d14a1e28
RD
2726
2727class XPMHandlerPtr(XPMHandler):
2728 def __init__(self, this):
2729 self.this = this
2730 if not hasattr(self,"thisown"): self.thisown = 0
2731 self.__class__ = XPMHandler
54f9ee45 2732_core_.XPMHandler_swigregister(XPMHandlerPtr)
d14a1e28
RD
2733
2734class TIFFHandler(ImageHandler):
093d3ff1 2735 """Proxy of C++ TIFFHandler class"""
e811c8ce
RD
2736 def __repr__(self):
2737 return "<%s.%s; proxy of C++ wxTIFFHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 2738 def __init__(self, *args, **kwargs):
a95a7133 2739 """__init__(self) -> TIFFHandler"""
54f9ee45 2740 newobj = _core_.new_TIFFHandler(*args, **kwargs)
d14a1e28
RD
2741 self.this = newobj.this
2742 self.thisown = 1
2743 del newobj.thisown
d14a1e28
RD
2744
2745class TIFFHandlerPtr(TIFFHandler):
2746 def __init__(self, this):
2747 self.this = this
2748 if not hasattr(self,"thisown"): self.thisown = 0
2749 self.__class__ = TIFFHandler
54f9ee45 2750_core_.TIFFHandler_swigregister(TIFFHandlerPtr)
d14a1e28 2751
c0de73ae
RD
2752QUANTIZE_INCLUDE_WINDOWS_COLOURS = _core_.QUANTIZE_INCLUDE_WINDOWS_COLOURS
2753QUANTIZE_FILL_DESTINATION_IMAGE = _core_.QUANTIZE_FILL_DESTINATION_IMAGE
2754class Quantize(object):
2755 """Performs quantization, or colour reduction, on a wxImage."""
2756 def __init__(self): raise RuntimeError, "No constructor defined"
2757 def __repr__(self):
2758 return "<%s.%s; proxy of C++ wxQuantize instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
2759 def Quantize(*args, **kwargs):
2760 """
2761 Quantize(Image src, Image dest, int desiredNoColours=236, int flags=wxQUANTIZE_INCLUDE_WINDOWS_COLOURS|wxQUANTIZE_FILL_DESTINATION_IMAGE) -> bool
2762
2763 Reduce the colours in the source image and put the result into the
2764 destination image, setting the palette in the destination if
2765 needed. Both images may be the same, to overwrite the source image.
2766 """
2767 return _core_.Quantize_Quantize(*args, **kwargs)
2768
2769 Quantize = staticmethod(Quantize)
2770
2771class QuantizePtr(Quantize):
2772 def __init__(self, this):
2773 self.this = this
2774 if not hasattr(self,"thisown"): self.thisown = 0
2775 self.__class__ = Quantize
2776_core_.Quantize_swigregister(QuantizePtr)
2777
2778def Quantize_Quantize(*args, **kwargs):
2779 """
2780 Quantize_Quantize(Image src, Image dest, int desiredNoColours=236, int flags=wxQUANTIZE_INCLUDE_WINDOWS_COLOURS|wxQUANTIZE_FILL_DESTINATION_IMAGE) -> bool
2781
2782 Reduce the colours in the source image and put the result into the
2783 destination image, setting the palette in the destination if
2784 needed. Both images may be the same, to overwrite the source image.
2785 """
2786 return _core_.Quantize_Quantize(*args, **kwargs)
2787
d14a1e28
RD
2788#---------------------------------------------------------------------------
2789
2790class EvtHandler(Object):
093d3ff1 2791 """Proxy of C++ EvtHandler class"""
e811c8ce
RD
2792 def __repr__(self):
2793 return "<%s.%s; proxy of C++ wxEvtHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 2794 def __init__(self, *args, **kwargs):
a95a7133 2795 """__init__(self) -> EvtHandler"""
54f9ee45 2796 newobj = _core_.new_EvtHandler(*args, **kwargs)
d14a1e28
RD
2797 self.this = newobj.this
2798 self.thisown = 1
2799 del newobj.thisown
e811c8ce 2800 def GetNextHandler(*args, **kwargs):
a95a7133 2801 """GetNextHandler(self) -> EvtHandler"""
54f9ee45 2802 return _core_.EvtHandler_GetNextHandler(*args, **kwargs)
e811c8ce
RD
2803
2804 def GetPreviousHandler(*args, **kwargs):
a95a7133 2805 """GetPreviousHandler(self) -> EvtHandler"""
54f9ee45 2806 return _core_.EvtHandler_GetPreviousHandler(*args, **kwargs)
e811c8ce
RD
2807
2808 def SetNextHandler(*args, **kwargs):
a95a7133 2809 """SetNextHandler(self, EvtHandler handler)"""
54f9ee45 2810 return _core_.EvtHandler_SetNextHandler(*args, **kwargs)
e811c8ce
RD
2811
2812 def SetPreviousHandler(*args, **kwargs):
a95a7133 2813 """SetPreviousHandler(self, EvtHandler handler)"""
54f9ee45 2814 return _core_.EvtHandler_SetPreviousHandler(*args, **kwargs)
e811c8ce
RD
2815
2816 def GetEvtHandlerEnabled(*args, **kwargs):
a95a7133 2817 """GetEvtHandlerEnabled(self) -> bool"""
54f9ee45 2818 return _core_.EvtHandler_GetEvtHandlerEnabled(*args, **kwargs)
e811c8ce
RD
2819
2820 def SetEvtHandlerEnabled(*args, **kwargs):
a95a7133 2821 """SetEvtHandlerEnabled(self, bool enabled)"""
54f9ee45 2822 return _core_.EvtHandler_SetEvtHandlerEnabled(*args, **kwargs)
e811c8ce
RD
2823
2824 def ProcessEvent(*args, **kwargs):
a95a7133 2825 """ProcessEvent(self, Event event) -> bool"""
54f9ee45 2826 return _core_.EvtHandler_ProcessEvent(*args, **kwargs)
e811c8ce
RD
2827
2828 def AddPendingEvent(*args, **kwargs):
a95a7133 2829 """AddPendingEvent(self, Event event)"""
54f9ee45 2830 return _core_.EvtHandler_AddPendingEvent(*args, **kwargs)
e811c8ce
RD
2831
2832 def ProcessPendingEvents(*args, **kwargs):
a95a7133 2833 """ProcessPendingEvents(self)"""
54f9ee45 2834 return _core_.EvtHandler_ProcessPendingEvents(*args, **kwargs)
e811c8ce
RD
2835
2836 def Connect(*args, **kwargs):
a95a7133 2837 """Connect(self, int id, int lastId, int eventType, PyObject func)"""
54f9ee45 2838 return _core_.EvtHandler_Connect(*args, **kwargs)
e811c8ce
RD
2839
2840 def Disconnect(*args, **kwargs):
a95a7133 2841 """Disconnect(self, int id, int lastId=-1, wxEventType eventType=wxEVT_NULL) -> bool"""
54f9ee45 2842 return _core_.EvtHandler_Disconnect(*args, **kwargs)
e811c8ce
RD
2843
2844 def _setOORInfo(*args, **kwargs):
689b42ee 2845 """_setOORInfo(self, PyObject _self, bool incref=True)"""
54f9ee45 2846 return _core_.EvtHandler__setOORInfo(*args, **kwargs)
e811c8ce 2847
d14a1e28
RD
2848 def Bind(self, event, handler, source=None, id=wx.ID_ANY, id2=wx.ID_ANY):
2849 """
2850 Bind an event to an event handler.
2851
db3e571a
RD
2852 :param event: One of the EVT_* objects that specifies the
2853 type of event to bind,
d14a1e28 2854
db3e571a
RD
2855 :param handler: A callable object to be invoked when the
2856 event is delivered to self. Pass None to
2857 disconnect an event handler.
d14a1e28 2858
db3e571a
RD
2859 :param source: Sometimes the event originates from a
2860 different window than self, but you still
2861 want to catch it in self. (For example, a
2862 button event delivered to a frame.) By
2863 passing the source of the event, the event
2864 handling system is able to differentiate
2865 between the same event type from different
2866 controls.
d14a1e28 2867
db3e571a
RD
2868 :param id: Used to spcify the event source by ID instead
2869 of instance.
2870
2871 :param id2: Used when it is desirable to bind a handler
2872 to a range of IDs, such as with EVT_MENU_RANGE.
d14a1e28
RD
2873 """
2874 if source is not None:
2875 id = source.GetId()
2876 event.Bind(self, id, id2, handler)
2877
66c033b4
RD
2878 def Unbind(self, event, source=None, id=wx.ID_ANY, id2=wx.ID_ANY):
2879 """
2880 Disconencts the event handler binding for event from self.
2881 Returns True if successful.
2882 """
2883 if source is not None:
2884 id = source.GetId()
2885 return event.Unbind(self, id, id2)
d14a1e28 2886
d14a1e28
RD
2887
2888class EvtHandlerPtr(EvtHandler):
2889 def __init__(self, this):
2890 self.this = this
2891 if not hasattr(self,"thisown"): self.thisown = 0
2892 self.__class__ = EvtHandler
54f9ee45 2893_core_.EvtHandler_swigregister(EvtHandlerPtr)
d14a1e28
RD
2894
2895#---------------------------------------------------------------------------
2896
2897class PyEventBinder(object):
2898 """
2899 Instances of this class are used to bind specific events to event
2900 handlers.
2901 """
2902 def __init__(self, evtType, expectedIDs=0):
2903 if expectedIDs not in [0, 1, 2]:
2904 raise ValueError, "Invalid number of expectedIDs"
2905 self.expectedIDs = expectedIDs
2906
2907 if type(evtType) == list or type(evtType) == tuple:
2908 self.evtType = evtType
2909 else:
2910 self.evtType = [evtType]
2911
2912
2913 def Bind(self, target, id1, id2, function):
2914 """Bind this set of event types to target."""
2915 for et in self.evtType:
2916 target.Connect(id1, id2, et, function)
2917
66c033b4
RD
2918
2919 def Unbind(self, target, id1, id2):
2920 """Remove an event binding."""
2921 success = 0
2922 for et in self.evtType:
2923 success += target.Disconnect(id1, id2, et)
2924 return success != 0
2925
d14a1e28
RD
2926
2927 def __call__(self, *args):
2928 """
2929 For backwards compatibility with the old EVT_* functions.
2930 Should be called with either (window, func), (window, ID,
2931 func) or (window, ID1, ID2, func) parameters depending on the
2932 type of the event.
2933 """
2934 assert len(args) == 2 + self.expectedIDs
2935 id1 = wx.ID_ANY
2936 id2 = wx.ID_ANY
2937 target = args[0]
2938 if self.expectedIDs == 0:
2939 func = args[1]
2940 elif self.expectedIDs == 1:
2941 id1 = args[1]
2942 func = args[2]
2943 elif self.expectedIDs == 2:
2944 id1 = args[1]
2945 id2 = args[2]
2946 func = args[3]
2947 else:
2948 raise ValueError, "Unexpected number of IDs"
2949
2950 self.Bind(target, id1, id2, func)
2951
2952
2953# These two are square pegs that don't fit the PyEventBinder hole...
2954def EVT_COMMAND(win, id, cmd, func):
2955 win.Connect(id, -1, cmd, func)
2956def EVT_COMMAND_RANGE(win, id1, id2, cmd, func):
2957 win.Connect(id1, id2, cmd, func)
2958
2959
2960#---------------------------------------------------------------------------
2961
2962#---------------------------------------------------------------------------
2963
54f9ee45
RD
2964EVENT_PROPAGATE_NONE = _core_.EVENT_PROPAGATE_NONE
2965EVENT_PROPAGATE_MAX = _core_.EVENT_PROPAGATE_MAX
d14a1e28 2966
e811c8ce
RD
2967def NewEventType(*args, **kwargs):
2968 """NewEventType() -> wxEventType"""
54f9ee45
RD
2969 return _core_.NewEventType(*args, **kwargs)
2970wxEVT_NULL = _core_.wxEVT_NULL
2971wxEVT_FIRST = _core_.wxEVT_FIRST
2972wxEVT_USER_FIRST = _core_.wxEVT_USER_FIRST
2973wxEVT_COMMAND_BUTTON_CLICKED = _core_.wxEVT_COMMAND_BUTTON_CLICKED
2974wxEVT_COMMAND_CHECKBOX_CLICKED = _core_.wxEVT_COMMAND_CHECKBOX_CLICKED
2975wxEVT_COMMAND_CHOICE_SELECTED = _core_.wxEVT_COMMAND_CHOICE_SELECTED
2976wxEVT_COMMAND_LISTBOX_SELECTED = _core_.wxEVT_COMMAND_LISTBOX_SELECTED
2977wxEVT_COMMAND_LISTBOX_DOUBLECLICKED = _core_.wxEVT_COMMAND_LISTBOX_DOUBLECLICKED
2978wxEVT_COMMAND_CHECKLISTBOX_TOGGLED = _core_.wxEVT_COMMAND_CHECKLISTBOX_TOGGLED
2979wxEVT_COMMAND_MENU_SELECTED = _core_.wxEVT_COMMAND_MENU_SELECTED
2980wxEVT_COMMAND_TOOL_CLICKED = _core_.wxEVT_COMMAND_TOOL_CLICKED
2981wxEVT_COMMAND_SLIDER_UPDATED = _core_.wxEVT_COMMAND_SLIDER_UPDATED
2982wxEVT_COMMAND_RADIOBOX_SELECTED = _core_.wxEVT_COMMAND_RADIOBOX_SELECTED
2983wxEVT_COMMAND_RADIOBUTTON_SELECTED = _core_.wxEVT_COMMAND_RADIOBUTTON_SELECTED
2984wxEVT_COMMAND_SCROLLBAR_UPDATED = _core_.wxEVT_COMMAND_SCROLLBAR_UPDATED
2985wxEVT_COMMAND_VLBOX_SELECTED = _core_.wxEVT_COMMAND_VLBOX_SELECTED
2986wxEVT_COMMAND_COMBOBOX_SELECTED = _core_.wxEVT_COMMAND_COMBOBOX_SELECTED
2987wxEVT_COMMAND_TOOL_RCLICKED = _core_.wxEVT_COMMAND_TOOL_RCLICKED
2988wxEVT_COMMAND_TOOL_ENTER = _core_.wxEVT_COMMAND_TOOL_ENTER
2989wxEVT_LEFT_DOWN = _core_.wxEVT_LEFT_DOWN
2990wxEVT_LEFT_UP = _core_.wxEVT_LEFT_UP
2991wxEVT_MIDDLE_DOWN = _core_.wxEVT_MIDDLE_DOWN
2992wxEVT_MIDDLE_UP = _core_.wxEVT_MIDDLE_UP
2993wxEVT_RIGHT_DOWN = _core_.wxEVT_RIGHT_DOWN
2994wxEVT_RIGHT_UP = _core_.wxEVT_RIGHT_UP
2995wxEVT_MOTION = _core_.wxEVT_MOTION
2996wxEVT_ENTER_WINDOW = _core_.wxEVT_ENTER_WINDOW
2997wxEVT_LEAVE_WINDOW = _core_.wxEVT_LEAVE_WINDOW
2998wxEVT_LEFT_DCLICK = _core_.wxEVT_LEFT_DCLICK
2999wxEVT_MIDDLE_DCLICK = _core_.wxEVT_MIDDLE_DCLICK
3000wxEVT_RIGHT_DCLICK = _core_.wxEVT_RIGHT_DCLICK
3001wxEVT_SET_FOCUS = _core_.wxEVT_SET_FOCUS
3002wxEVT_KILL_FOCUS = _core_.wxEVT_KILL_FOCUS
3003wxEVT_CHILD_FOCUS = _core_.wxEVT_CHILD_FOCUS
3004wxEVT_MOUSEWHEEL = _core_.wxEVT_MOUSEWHEEL
3005wxEVT_NC_LEFT_DOWN = _core_.wxEVT_NC_LEFT_DOWN
3006wxEVT_NC_LEFT_UP = _core_.wxEVT_NC_LEFT_UP
3007wxEVT_NC_MIDDLE_DOWN = _core_.wxEVT_NC_MIDDLE_DOWN
3008wxEVT_NC_MIDDLE_UP = _core_.wxEVT_NC_MIDDLE_UP
3009wxEVT_NC_RIGHT_DOWN = _core_.wxEVT_NC_RIGHT_DOWN
3010wxEVT_NC_RIGHT_UP = _core_.wxEVT_NC_RIGHT_UP
3011wxEVT_NC_MOTION = _core_.wxEVT_NC_MOTION
3012wxEVT_NC_ENTER_WINDOW = _core_.wxEVT_NC_ENTER_WINDOW
3013wxEVT_NC_LEAVE_WINDOW = _core_.wxEVT_NC_LEAVE_WINDOW
3014wxEVT_NC_LEFT_DCLICK = _core_.wxEVT_NC_LEFT_DCLICK
3015wxEVT_NC_MIDDLE_DCLICK = _core_.wxEVT_NC_MIDDLE_DCLICK
3016wxEVT_NC_RIGHT_DCLICK = _core_.wxEVT_NC_RIGHT_DCLICK
3017wxEVT_CHAR = _core_.wxEVT_CHAR
3018wxEVT_CHAR_HOOK = _core_.wxEVT_CHAR_HOOK
3019wxEVT_NAVIGATION_KEY = _core_.wxEVT_NAVIGATION_KEY
3020wxEVT_KEY_DOWN = _core_.wxEVT_KEY_DOWN
3021wxEVT_KEY_UP = _core_.wxEVT_KEY_UP
3022wxEVT_HOTKEY = _core_.wxEVT_HOTKEY
3023wxEVT_SET_CURSOR = _core_.wxEVT_SET_CURSOR
3024wxEVT_SCROLL_TOP = _core_.wxEVT_SCROLL_TOP
3025wxEVT_SCROLL_BOTTOM = _core_.wxEVT_SCROLL_BOTTOM
3026wxEVT_SCROLL_LINEUP = _core_.wxEVT_SCROLL_LINEUP
3027wxEVT_SCROLL_LINEDOWN = _core_.wxEVT_SCROLL_LINEDOWN
3028wxEVT_SCROLL_PAGEUP = _core_.wxEVT_SCROLL_PAGEUP
3029wxEVT_SCROLL_PAGEDOWN = _core_.wxEVT_SCROLL_PAGEDOWN
3030wxEVT_SCROLL_THUMBTRACK = _core_.wxEVT_SCROLL_THUMBTRACK
3031wxEVT_SCROLL_THUMBRELEASE = _core_.wxEVT_SCROLL_THUMBRELEASE
3032wxEVT_SCROLL_ENDSCROLL = _core_.wxEVT_SCROLL_ENDSCROLL
3033wxEVT_SCROLLWIN_TOP = _core_.wxEVT_SCROLLWIN_TOP
3034wxEVT_SCROLLWIN_BOTTOM = _core_.wxEVT_SCROLLWIN_BOTTOM
3035wxEVT_SCROLLWIN_LINEUP = _core_.wxEVT_SCROLLWIN_LINEUP
3036wxEVT_SCROLLWIN_LINEDOWN = _core_.wxEVT_SCROLLWIN_LINEDOWN
3037wxEVT_SCROLLWIN_PAGEUP = _core_.wxEVT_SCROLLWIN_PAGEUP
3038wxEVT_SCROLLWIN_PAGEDOWN = _core_.wxEVT_SCROLLWIN_PAGEDOWN
3039wxEVT_SCROLLWIN_THUMBTRACK = _core_.wxEVT_SCROLLWIN_THUMBTRACK
3040wxEVT_SCROLLWIN_THUMBRELEASE = _core_.wxEVT_SCROLLWIN_THUMBRELEASE
3041wxEVT_SIZE = _core_.wxEVT_SIZE
3042wxEVT_MOVE = _core_.wxEVT_MOVE
3043wxEVT_CLOSE_WINDOW = _core_.wxEVT_CLOSE_WINDOW
3044wxEVT_END_SESSION = _core_.wxEVT_END_SESSION
3045wxEVT_QUERY_END_SESSION = _core_.wxEVT_QUERY_END_SESSION
3046wxEVT_ACTIVATE_APP = _core_.wxEVT_ACTIVATE_APP
3047wxEVT_POWER = _core_.wxEVT_POWER
3048wxEVT_ACTIVATE = _core_.wxEVT_ACTIVATE
3049wxEVT_CREATE = _core_.wxEVT_CREATE
3050wxEVT_DESTROY = _core_.wxEVT_DESTROY
3051wxEVT_SHOW = _core_.wxEVT_SHOW
3052wxEVT_ICONIZE = _core_.wxEVT_ICONIZE
3053wxEVT_MAXIMIZE = _core_.wxEVT_MAXIMIZE
3054wxEVT_MOUSE_CAPTURE_CHANGED = _core_.wxEVT_MOUSE_CAPTURE_CHANGED
3055wxEVT_PAINT = _core_.wxEVT_PAINT
3056wxEVT_ERASE_BACKGROUND = _core_.wxEVT_ERASE_BACKGROUND
3057wxEVT_NC_PAINT = _core_.wxEVT_NC_PAINT
3058wxEVT_PAINT_ICON = _core_.wxEVT_PAINT_ICON
3059wxEVT_MENU_OPEN = _core_.wxEVT_MENU_OPEN
3060wxEVT_MENU_CLOSE = _core_.wxEVT_MENU_CLOSE
3061wxEVT_MENU_HIGHLIGHT = _core_.wxEVT_MENU_HIGHLIGHT
3062wxEVT_CONTEXT_MENU = _core_.wxEVT_CONTEXT_MENU
3063wxEVT_SYS_COLOUR_CHANGED = _core_.wxEVT_SYS_COLOUR_CHANGED
3064wxEVT_DISPLAY_CHANGED = _core_.wxEVT_DISPLAY_CHANGED
3065wxEVT_SETTING_CHANGED = _core_.wxEVT_SETTING_CHANGED
3066wxEVT_QUERY_NEW_PALETTE = _core_.wxEVT_QUERY_NEW_PALETTE
3067wxEVT_PALETTE_CHANGED = _core_.wxEVT_PALETTE_CHANGED
3068wxEVT_DROP_FILES = _core_.wxEVT_DROP_FILES
3069wxEVT_DRAW_ITEM = _core_.wxEVT_DRAW_ITEM
3070wxEVT_MEASURE_ITEM = _core_.wxEVT_MEASURE_ITEM
3071wxEVT_COMPARE_ITEM = _core_.wxEVT_COMPARE_ITEM
3072wxEVT_INIT_DIALOG = _core_.wxEVT_INIT_DIALOG
3073wxEVT_IDLE = _core_.wxEVT_IDLE
3074wxEVT_UPDATE_UI = _core_.wxEVT_UPDATE_UI
3075wxEVT_SIZING = _core_.wxEVT_SIZING
3076wxEVT_MOVING = _core_.wxEVT_MOVING
3077wxEVT_COMMAND_LEFT_CLICK = _core_.wxEVT_COMMAND_LEFT_CLICK
3078wxEVT_COMMAND_LEFT_DCLICK = _core_.wxEVT_COMMAND_LEFT_DCLICK
3079wxEVT_COMMAND_RIGHT_CLICK = _core_.wxEVT_COMMAND_RIGHT_CLICK
3080wxEVT_COMMAND_RIGHT_DCLICK = _core_.wxEVT_COMMAND_RIGHT_DCLICK
3081wxEVT_COMMAND_SET_FOCUS = _core_.wxEVT_COMMAND_SET_FOCUS
3082wxEVT_COMMAND_KILL_FOCUS = _core_.wxEVT_COMMAND_KILL_FOCUS
3083wxEVT_COMMAND_ENTER = _core_.wxEVT_COMMAND_ENTER
d14a1e28
RD
3084#
3085# Create some event binders
3086EVT_SIZE = wx.PyEventBinder( wxEVT_SIZE )
3087EVT_SIZING = wx.PyEventBinder( wxEVT_SIZING )
3088EVT_MOVE = wx.PyEventBinder( wxEVT_MOVE )
3089EVT_MOVING = wx.PyEventBinder( wxEVT_MOVING )
3090EVT_CLOSE = wx.PyEventBinder( wxEVT_CLOSE_WINDOW )
3091EVT_END_SESSION = wx.PyEventBinder( wxEVT_END_SESSION )
3092EVT_QUERY_END_SESSION = wx.PyEventBinder( wxEVT_QUERY_END_SESSION )
3093EVT_PAINT = wx.PyEventBinder( wxEVT_PAINT )
3094EVT_NC_PAINT = wx.PyEventBinder( wxEVT_NC_PAINT )
3095EVT_ERASE_BACKGROUND = wx.PyEventBinder( wxEVT_ERASE_BACKGROUND )
3096EVT_CHAR = wx.PyEventBinder( wxEVT_CHAR )
3097EVT_KEY_DOWN = wx.PyEventBinder( wxEVT_KEY_DOWN )
3098EVT_KEY_UP = wx.PyEventBinder( wxEVT_KEY_UP )
3099EVT_HOTKEY = wx.PyEventBinder( wxEVT_HOTKEY, 1)
3100EVT_CHAR_HOOK = wx.PyEventBinder( wxEVT_CHAR_HOOK )
3101EVT_MENU_OPEN = wx.PyEventBinder( wxEVT_MENU_OPEN )
3102EVT_MENU_CLOSE = wx.PyEventBinder( wxEVT_MENU_CLOSE )
3103EVT_MENU_HIGHLIGHT = wx.PyEventBinder( wxEVT_MENU_HIGHLIGHT, 1)
3104EVT_MENU_HIGHLIGHT_ALL = wx.PyEventBinder( wxEVT_MENU_HIGHLIGHT )
3105EVT_SET_FOCUS = wx.PyEventBinder( wxEVT_SET_FOCUS )
3106EVT_KILL_FOCUS = wx.PyEventBinder( wxEVT_KILL_FOCUS )
3107EVT_CHILD_FOCUS = wx.PyEventBinder( wxEVT_CHILD_FOCUS )
3108EVT_ACTIVATE = wx.PyEventBinder( wxEVT_ACTIVATE )
3109EVT_ACTIVATE_APP = wx.PyEventBinder( wxEVT_ACTIVATE_APP )
3110EVT_END_SESSION = wx.PyEventBinder( wxEVT_END_SESSION )
3111EVT_QUERY_END_SESSION = wx.PyEventBinder( wxEVT_QUERY_END_SESSION )
3112EVT_DROP_FILES = wx.PyEventBinder( wxEVT_DROP_FILES )
3113EVT_INIT_DIALOG = wx.PyEventBinder( wxEVT_INIT_DIALOG )
3114EVT_SYS_COLOUR_CHANGED = wx.PyEventBinder( wxEVT_SYS_COLOUR_CHANGED )
3115EVT_DISPLAY_CHANGED = wx.PyEventBinder( wxEVT_DISPLAY_CHANGED )
3116EVT_SHOW = wx.PyEventBinder( wxEVT_SHOW )
3117EVT_MAXIMIZE = wx.PyEventBinder( wxEVT_MAXIMIZE )
3118EVT_ICONIZE = wx.PyEventBinder( wxEVT_ICONIZE )
3119EVT_NAVIGATION_KEY = wx.PyEventBinder( wxEVT_NAVIGATION_KEY )
3120EVT_PALETTE_CHANGED = wx.PyEventBinder( wxEVT_PALETTE_CHANGED )
3121EVT_QUERY_NEW_PALETTE = wx.PyEventBinder( wxEVT_QUERY_NEW_PALETTE )
3122EVT_WINDOW_CREATE = wx.PyEventBinder( wxEVT_CREATE )
3123EVT_WINDOW_DESTROY = wx.PyEventBinder( wxEVT_DESTROY )
3124EVT_SET_CURSOR = wx.PyEventBinder( wxEVT_SET_CURSOR )
3125EVT_MOUSE_CAPTURE_CHANGED = wx.PyEventBinder( wxEVT_MOUSE_CAPTURE_CHANGED )
3126
3127EVT_LEFT_DOWN = wx.PyEventBinder( wxEVT_LEFT_DOWN )
3128EVT_LEFT_UP = wx.PyEventBinder( wxEVT_LEFT_UP )
3129EVT_MIDDLE_DOWN = wx.PyEventBinder( wxEVT_MIDDLE_DOWN )
3130EVT_MIDDLE_UP = wx.PyEventBinder( wxEVT_MIDDLE_UP )
3131EVT_RIGHT_DOWN = wx.PyEventBinder( wxEVT_RIGHT_DOWN )
3132EVT_RIGHT_UP = wx.PyEventBinder( wxEVT_RIGHT_UP )
3133EVT_MOTION = wx.PyEventBinder( wxEVT_MOTION )
3134EVT_LEFT_DCLICK = wx.PyEventBinder( wxEVT_LEFT_DCLICK )
3135EVT_MIDDLE_DCLICK = wx.PyEventBinder( wxEVT_MIDDLE_DCLICK )
3136EVT_RIGHT_DCLICK = wx.PyEventBinder( wxEVT_RIGHT_DCLICK )
3137EVT_LEAVE_WINDOW = wx.PyEventBinder( wxEVT_LEAVE_WINDOW )
3138EVT_ENTER_WINDOW = wx.PyEventBinder( wxEVT_ENTER_WINDOW )
3139EVT_MOUSEWHEEL = wx.PyEventBinder( wxEVT_MOUSEWHEEL )
3140
3141EVT_MOUSE_EVENTS = wx.PyEventBinder([ wxEVT_LEFT_DOWN,
3142 wxEVT_LEFT_UP,
3143 wxEVT_MIDDLE_DOWN,
3144 wxEVT_MIDDLE_UP,
3145 wxEVT_RIGHT_DOWN,
3146 wxEVT_RIGHT_UP,
3147 wxEVT_MOTION,
3148 wxEVT_LEFT_DCLICK,
3149 wxEVT_MIDDLE_DCLICK,
3150 wxEVT_RIGHT_DCLICK,
3151 wxEVT_ENTER_WINDOW,
3152 wxEVT_LEAVE_WINDOW,
3153 wxEVT_MOUSEWHEEL
3154 ])
3155
3156
3157# Scrolling from wxWindow (sent to wxScrolledWindow)
3158EVT_SCROLLWIN = wx.PyEventBinder([ wxEVT_SCROLLWIN_TOP,
3159 wxEVT_SCROLLWIN_BOTTOM,
3160 wxEVT_SCROLLWIN_LINEUP,
3161 wxEVT_SCROLLWIN_LINEDOWN,
3162 wxEVT_SCROLLWIN_PAGEUP,
3163 wxEVT_SCROLLWIN_PAGEDOWN,
3164 wxEVT_SCROLLWIN_THUMBTRACK,
3165 wxEVT_SCROLLWIN_THUMBRELEASE,
3166 ])
3167
3168EVT_SCROLLWIN_TOP = wx.PyEventBinder( wxEVT_SCROLLWIN_TOP )
3169EVT_SCROLLWIN_BOTTOM = wx.PyEventBinder( wxEVT_SCROLLWIN_BOTTOM )
3170EVT_SCROLLWIN_LINEUP = wx.PyEventBinder( wxEVT_SCROLLWIN_LINEUP )
3171EVT_SCROLLWIN_LINEDOWN = wx.PyEventBinder( wxEVT_SCROLLWIN_LINEDOWN )
3172EVT_SCROLLWIN_PAGEUP = wx.PyEventBinder( wxEVT_SCROLLWIN_PAGEUP )
3173EVT_SCROLLWIN_PAGEDOWN = wx.PyEventBinder( wxEVT_SCROLLWIN_PAGEDOWN )
3174EVT_SCROLLWIN_THUMBTRACK = wx.PyEventBinder( wxEVT_SCROLLWIN_THUMBTRACK )
3175EVT_SCROLLWIN_THUMBRELEASE = wx.PyEventBinder( wxEVT_SCROLLWIN_THUMBRELEASE )
3176
3177# Scrolling from wxSlider and wxScrollBar
3178EVT_SCROLL = wx.PyEventBinder([ wxEVT_SCROLL_TOP,
3179 wxEVT_SCROLL_BOTTOM,
3180 wxEVT_SCROLL_LINEUP,
3181 wxEVT_SCROLL_LINEDOWN,
3182 wxEVT_SCROLL_PAGEUP,
3183 wxEVT_SCROLL_PAGEDOWN,
3184 wxEVT_SCROLL_THUMBTRACK,
3185 wxEVT_SCROLL_THUMBRELEASE,
3186 wxEVT_SCROLL_ENDSCROLL,
3187 ])
3188
3189EVT_SCROLL_TOP = wx.PyEventBinder( wxEVT_SCROLL_TOP )
3190EVT_SCROLL_BOTTOM = wx.PyEventBinder( wxEVT_SCROLL_BOTTOM )
3191EVT_SCROLL_LINEUP = wx.PyEventBinder( wxEVT_SCROLL_LINEUP )
3192EVT_SCROLL_LINEDOWN = wx.PyEventBinder( wxEVT_SCROLL_LINEDOWN )
3193EVT_SCROLL_PAGEUP = wx.PyEventBinder( wxEVT_SCROLL_PAGEUP )
3194EVT_SCROLL_PAGEDOWN = wx.PyEventBinder( wxEVT_SCROLL_PAGEDOWN )
3195EVT_SCROLL_THUMBTRACK = wx.PyEventBinder( wxEVT_SCROLL_THUMBTRACK )
3196EVT_SCROLL_THUMBRELEASE = wx.PyEventBinder( wxEVT_SCROLL_THUMBRELEASE )
3197EVT_SCROLL_ENDSCROLL = wx.PyEventBinder( wxEVT_SCROLL_ENDSCROLL )
3198
3199# Scrolling from wxSlider and wxScrollBar, with an id
3200EVT_COMMAND_SCROLL = wx.PyEventBinder([ wxEVT_SCROLL_TOP,
3201 wxEVT_SCROLL_BOTTOM,
3202 wxEVT_SCROLL_LINEUP,
3203 wxEVT_SCROLL_LINEDOWN,
3204 wxEVT_SCROLL_PAGEUP,
3205 wxEVT_SCROLL_PAGEDOWN,
3206 wxEVT_SCROLL_THUMBTRACK,
3207 wxEVT_SCROLL_THUMBRELEASE,
3208 wxEVT_SCROLL_ENDSCROLL,
3209 ], 1)
3210
3211EVT_COMMAND_SCROLL_TOP = wx.PyEventBinder( wxEVT_SCROLL_TOP, 1)
3212EVT_COMMAND_SCROLL_BOTTOM = wx.PyEventBinder( wxEVT_SCROLL_BOTTOM, 1)
3213EVT_COMMAND_SCROLL_LINEUP = wx.PyEventBinder( wxEVT_SCROLL_LINEUP, 1)
3214EVT_COMMAND_SCROLL_LINEDOWN = wx.PyEventBinder( wxEVT_SCROLL_LINEDOWN, 1)
3215EVT_COMMAND_SCROLL_PAGEUP = wx.PyEventBinder( wxEVT_SCROLL_PAGEUP, 1)
3216EVT_COMMAND_SCROLL_PAGEDOWN = wx.PyEventBinder( wxEVT_SCROLL_PAGEDOWN, 1)
3217EVT_COMMAND_SCROLL_THUMBTRACK = wx.PyEventBinder( wxEVT_SCROLL_THUMBTRACK, 1)
3218EVT_COMMAND_SCROLL_THUMBRELEASE = wx.PyEventBinder( wxEVT_SCROLL_THUMBRELEASE, 1)
3219EVT_COMMAND_SCROLL_ENDSCROLL = wx.PyEventBinder( wxEVT_SCROLL_ENDSCROLL, 1)
3220
d14a1e28
RD
3221EVT_BUTTON = wx.PyEventBinder( wxEVT_COMMAND_BUTTON_CLICKED, 1)
3222EVT_CHECKBOX = wx.PyEventBinder( wxEVT_COMMAND_CHECKBOX_CLICKED, 1)
3223EVT_CHOICE = wx.PyEventBinder( wxEVT_COMMAND_CHOICE_SELECTED, 1)
3224EVT_LISTBOX = wx.PyEventBinder( wxEVT_COMMAND_LISTBOX_SELECTED, 1)
3225EVT_LISTBOX_DCLICK = wx.PyEventBinder( wxEVT_COMMAND_LISTBOX_DOUBLECLICKED, 1)
3226EVT_MENU = wx.PyEventBinder( wxEVT_COMMAND_MENU_SELECTED, 1)
3227EVT_MENU_RANGE = wx.PyEventBinder( wxEVT_COMMAND_MENU_SELECTED, 2)
3228EVT_SLIDER = wx.PyEventBinder( wxEVT_COMMAND_SLIDER_UPDATED, 1)
3229EVT_RADIOBOX = wx.PyEventBinder( wxEVT_COMMAND_RADIOBOX_SELECTED, 1)
3230EVT_RADIOBUTTON = wx.PyEventBinder( wxEVT_COMMAND_RADIOBUTTON_SELECTED, 1)
3231
3232EVT_SCROLLBAR = wx.PyEventBinder( wxEVT_COMMAND_SCROLLBAR_UPDATED, 1)
3233EVT_VLBOX = wx.PyEventBinder( wxEVT_COMMAND_VLBOX_SELECTED, 1)
3234EVT_COMBOBOX = wx.PyEventBinder( wxEVT_COMMAND_COMBOBOX_SELECTED, 1)
3235EVT_TOOL = wx.PyEventBinder( wxEVT_COMMAND_TOOL_CLICKED, 1)
3236EVT_TOOL_RANGE = wx.PyEventBinder( wxEVT_COMMAND_TOOL_CLICKED, 2)
3237EVT_TOOL_RCLICKED = wx.PyEventBinder( wxEVT_COMMAND_TOOL_RCLICKED, 1)
3238EVT_TOOL_RCLICKED_RANGE = wx.PyEventBinder( wxEVT_COMMAND_TOOL_RCLICKED, 2)
3239EVT_TOOL_ENTER = wx.PyEventBinder( wxEVT_COMMAND_TOOL_ENTER, 1)
3240EVT_CHECKLISTBOX = wx.PyEventBinder( wxEVT_COMMAND_CHECKLISTBOX_TOGGLED, 1)
3241
3242
3243EVT_COMMAND_LEFT_CLICK = wx.PyEventBinder( wxEVT_COMMAND_LEFT_CLICK, 1)
3244EVT_COMMAND_LEFT_DCLICK = wx.PyEventBinder( wxEVT_COMMAND_LEFT_DCLICK, 1)
3245EVT_COMMAND_RIGHT_CLICK = wx.PyEventBinder( wxEVT_COMMAND_RIGHT_CLICK, 1)
3246EVT_COMMAND_RIGHT_DCLICK = wx.PyEventBinder( wxEVT_COMMAND_RIGHT_DCLICK, 1)
3247EVT_COMMAND_SET_FOCUS = wx.PyEventBinder( wxEVT_COMMAND_SET_FOCUS, 1)
3248EVT_COMMAND_KILL_FOCUS = wx.PyEventBinder( wxEVT_COMMAND_KILL_FOCUS, 1)
3249EVT_COMMAND_ENTER = wx.PyEventBinder( wxEVT_COMMAND_ENTER, 1)
3250
3251EVT_IDLE = wx.PyEventBinder( wxEVT_IDLE )
3252
3253EVT_UPDATE_UI = wx.PyEventBinder( wxEVT_UPDATE_UI, 1)
3254EVT_UPDATE_UI_RANGE = wx.PyEventBinder( wxEVT_UPDATE_UI, 2)
3255
3256EVT_CONTEXT_MENU = wx.PyEventBinder( wxEVT_CONTEXT_MENU )
3257
3258
3259
3260#---------------------------------------------------------------------------
3261
3262class Event(Object):
093d3ff1 3263 """Proxy of C++ Event class"""
e811c8ce
RD
3264 def __init__(self): raise RuntimeError, "No constructor defined"
3265 def __repr__(self):
3266 return "<%s.%s; proxy of C++ wxEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
54f9ee45 3267 def __del__(self, destroy=_core_.delete_Event):
a95a7133 3268 """__del__(self)"""
d14a1e28
RD
3269 try:
3270 if self.thisown: destroy(self)
3271 except: pass
e811c8ce
RD
3272
3273 def SetEventType(*args, **kwargs):
a95a7133 3274 """SetEventType(self, wxEventType typ)"""
54f9ee45 3275 return _core_.Event_SetEventType(*args, **kwargs)
e811c8ce
RD
3276
3277 def GetEventType(*args, **kwargs):
a95a7133 3278 """GetEventType(self) -> wxEventType"""
54f9ee45 3279 return _core_.Event_GetEventType(*args, **kwargs)
e811c8ce
RD
3280
3281 def GetEventObject(*args, **kwargs):
a95a7133 3282 """GetEventObject(self) -> Object"""
54f9ee45 3283 return _core_.Event_GetEventObject(*args, **kwargs)
e811c8ce
RD
3284
3285 def SetEventObject(*args, **kwargs):
a95a7133 3286 """SetEventObject(self, Object obj)"""
54f9ee45 3287 return _core_.Event_SetEventObject(*args, **kwargs)
e811c8ce
RD
3288
3289 def GetTimestamp(*args, **kwargs):
a95a7133 3290 """GetTimestamp(self) -> long"""
54f9ee45 3291 return _core_.Event_GetTimestamp(*args, **kwargs)
e811c8ce
RD
3292
3293 def SetTimestamp(*args, **kwargs):
a95a7133 3294 """SetTimestamp(self, long ts=0)"""
54f9ee45 3295 return _core_.Event_SetTimestamp(*args, **kwargs)
e811c8ce
RD
3296
3297 def GetId(*args, **kwargs):
a95a7133 3298 """GetId(self) -> int"""
54f9ee45 3299 return _core_.Event_GetId(*args, **kwargs)
e811c8ce
RD
3300
3301 def SetId(*args, **kwargs):
a95a7133 3302 """SetId(self, int Id)"""
54f9ee45 3303 return _core_.Event_SetId(*args, **kwargs)
e811c8ce
RD
3304
3305 def IsCommandEvent(*args, **kwargs):
a95a7133 3306 """IsCommandEvent(self) -> bool"""
54f9ee45 3307 return _core_.Event_IsCommandEvent(*args, **kwargs)
e811c8ce
RD
3308
3309 def Skip(*args, **kwargs):
51b83b37
RD
3310 """
3311 Skip(self, bool skip=True)
3312
3313 Called by an event handler, it controls whether additional event
3314 handlers bound to this event will be called after the current event
3315 handler returns. Skip(false) (the default setting) will prevent
3316 additional event handlers from being called and control will be
3317 returned to the sender of the event immediately after the current
3318 handler has finished. Skip(True) will cause the event processing
3319 system to continue searching for a handler function for this event.
3320
3321 """
54f9ee45 3322 return _core_.Event_Skip(*args, **kwargs)
e811c8ce
RD
3323
3324 def GetSkipped(*args, **kwargs):
a95a7133 3325 """GetSkipped(self) -> bool"""
54f9ee45 3326 return _core_.Event_GetSkipped(*args, **kwargs)
e811c8ce
RD
3327
3328 def ShouldPropagate(*args, **kwargs):
a95a7133 3329 """ShouldPropagate(self) -> bool"""
54f9ee45 3330 return _core_.Event_ShouldPropagate(*args, **kwargs)
e811c8ce
RD
3331
3332 def StopPropagation(*args, **kwargs):
a95a7133 3333 """StopPropagation(self) -> int"""
54f9ee45 3334 return _core_.Event_StopPropagation(*args, **kwargs)
e811c8ce
RD
3335
3336 def ResumePropagation(*args, **kwargs):
a95a7133 3337 """ResumePropagation(self, int propagationLevel)"""
54f9ee45 3338 return _core_.Event_ResumePropagation(*args, **kwargs)
e811c8ce
RD
3339
3340 def Clone(*args, **kwargs):
a95a7133 3341 """Clone(self) -> Event"""
54f9ee45 3342 return _core_.Event_Clone(*args, **kwargs)
e811c8ce 3343
d14a1e28
RD
3344
3345class EventPtr(Event):
3346 def __init__(self, this):
3347 self.this = this
3348 if not hasattr(self,"thisown"): self.thisown = 0
3349 self.__class__ = Event
54f9ee45 3350_core_.Event_swigregister(EventPtr)
d14a1e28
RD
3351
3352#---------------------------------------------------------------------------
3353
3354class PropagationDisabler(object):
093d3ff1 3355 """Proxy of C++ PropagationDisabler class"""
e811c8ce
RD
3356 def __repr__(self):
3357 return "<%s.%s; proxy of C++ wxPropagationDisabler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 3358 def __init__(self, *args, **kwargs):
a95a7133 3359 """__init__(self, Event event) -> PropagationDisabler"""
54f9ee45 3360 newobj = _core_.new_PropagationDisabler(*args, **kwargs)
d14a1e28
RD
3361 self.this = newobj.this
3362 self.thisown = 1
3363 del newobj.thisown
54f9ee45 3364 def __del__(self, destroy=_core_.delete_PropagationDisabler):
a95a7133 3365 """__del__(self)"""
d14a1e28
RD
3366 try:
3367 if self.thisown: destroy(self)
3368 except: pass
e811c8ce 3369
d14a1e28
RD
3370
3371class PropagationDisablerPtr(PropagationDisabler):
3372 def __init__(self, this):
3373 self.this = this
3374 if not hasattr(self,"thisown"): self.thisown = 0
3375 self.__class__ = PropagationDisabler
54f9ee45 3376_core_.PropagationDisabler_swigregister(PropagationDisablerPtr)
d14a1e28
RD
3377
3378class PropagateOnce(object):
093d3ff1 3379 """Proxy of C++ PropagateOnce class"""
e811c8ce
RD
3380 def __repr__(self):
3381 return "<%s.%s; proxy of C++ wxPropagateOnce instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 3382 def __init__(self, *args, **kwargs):
a95a7133 3383 """__init__(self, Event event) -> PropagateOnce"""
54f9ee45 3384 newobj = _core_.new_PropagateOnce(*args, **kwargs)
d14a1e28
RD
3385 self.this = newobj.this
3386 self.thisown = 1
3387 del newobj.thisown
54f9ee45 3388 def __del__(self, destroy=_core_.delete_PropagateOnce):
a95a7133 3389 """__del__(self)"""
d14a1e28
RD
3390 try:
3391 if self.thisown: destroy(self)
3392 except: pass
e811c8ce 3393
d14a1e28
RD
3394
3395class PropagateOncePtr(PropagateOnce):
3396 def __init__(self, this):
3397 self.this = this
3398 if not hasattr(self,"thisown"): self.thisown = 0
3399 self.__class__ = PropagateOnce
54f9ee45 3400_core_.PropagateOnce_swigregister(PropagateOncePtr)
d14a1e28
RD
3401
3402#---------------------------------------------------------------------------
3403
3404class CommandEvent(Event):
093d3ff1 3405 """Proxy of C++ CommandEvent class"""
e811c8ce
RD
3406 def __repr__(self):
3407 return "<%s.%s; proxy of C++ wxCommandEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 3408 def __init__(self, *args, **kwargs):
a95a7133 3409 """__init__(self, wxEventType commandType=wxEVT_NULL, int winid=0) -> CommandEvent"""
54f9ee45 3410 newobj = _core_.new_CommandEvent(*args, **kwargs)
d14a1e28
RD
3411 self.this = newobj.this
3412 self.thisown = 1
3413 del newobj.thisown
e811c8ce 3414 def GetSelection(*args, **kwargs):
a95a7133 3415 """GetSelection(self) -> int"""
54f9ee45 3416 return _core_.CommandEvent_GetSelection(*args, **kwargs)
e811c8ce
RD
3417
3418 def SetString(*args, **kwargs):
a95a7133 3419 """SetString(self, String s)"""
54f9ee45 3420 return _core_.CommandEvent_SetString(*args, **kwargs)
e811c8ce
RD
3421
3422 def GetString(*args, **kwargs):
a95a7133 3423 """GetString(self) -> String"""
54f9ee45 3424 return _core_.CommandEvent_GetString(*args, **kwargs)
e811c8ce
RD
3425
3426 def IsChecked(*args, **kwargs):
a95a7133 3427 """IsChecked(self) -> bool"""
54f9ee45 3428 return _core_.CommandEvent_IsChecked(*args, **kwargs)
e811c8ce 3429
242b7b46 3430 Checked = IsChecked
e811c8ce 3431 def IsSelection(*args, **kwargs):
a95a7133 3432 """IsSelection(self) -> bool"""
54f9ee45 3433 return _core_.CommandEvent_IsSelection(*args, **kwargs)
e811c8ce
RD
3434
3435 def SetExtraLong(*args, **kwargs):
a95a7133 3436 """SetExtraLong(self, long extraLong)"""
54f9ee45 3437 return _core_.CommandEvent_SetExtraLong(*args, **kwargs)
e811c8ce
RD
3438
3439 def GetExtraLong(*args, **kwargs):
a95a7133 3440 """GetExtraLong(self) -> long"""
54f9ee45 3441 return _core_.CommandEvent_GetExtraLong(*args, **kwargs)
e811c8ce
RD
3442
3443 def SetInt(*args, **kwargs):
a95a7133 3444 """SetInt(self, int i)"""
54f9ee45 3445 return _core_.CommandEvent_SetInt(*args, **kwargs)
e811c8ce
RD
3446
3447 def GetInt(*args, **kwargs):
a95a7133 3448 """GetInt(self) -> long"""
54f9ee45 3449 return _core_.CommandEvent_GetInt(*args, **kwargs)
e811c8ce
RD
3450
3451 def Clone(*args, **kwargs):
a95a7133 3452 """Clone(self) -> Event"""
54f9ee45 3453 return _core_.CommandEvent_Clone(*args, **kwargs)
e811c8ce 3454
d14a1e28
RD
3455
3456class CommandEventPtr(CommandEvent):
3457 def __init__(self, this):
3458 self.this = this
3459 if not hasattr(self,"thisown"): self.thisown = 0
3460 self.__class__ = CommandEvent
54f9ee45 3461_core_.CommandEvent_swigregister(CommandEventPtr)
d14a1e28
RD
3462
3463#---------------------------------------------------------------------------
3464
3465class NotifyEvent(CommandEvent):
093d3ff1 3466 """Proxy of C++ NotifyEvent class"""
e811c8ce
RD
3467 def __repr__(self):
3468 return "<%s.%s; proxy of C++ wxNotifyEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 3469 def __init__(self, *args, **kwargs):
a95a7133 3470 """__init__(self, wxEventType commandType=wxEVT_NULL, int winid=0) -> NotifyEvent"""
54f9ee45 3471 newobj = _core_.new_NotifyEvent(*args, **kwargs)
d14a1e28
RD
3472 self.this = newobj.this
3473 self.thisown = 1
3474 del newobj.thisown
e811c8ce 3475 def Veto(*args, **kwargs):
a95a7133 3476 """Veto(self)"""
54f9ee45 3477 return _core_.NotifyEvent_Veto(*args, **kwargs)
e811c8ce
RD
3478
3479 def Allow(*args, **kwargs):
a95a7133 3480 """Allow(self)"""
54f9ee45 3481 return _core_.NotifyEvent_Allow(*args, **kwargs)
e811c8ce
RD
3482
3483 def IsAllowed(*args, **kwargs):
a95a7133 3484 """IsAllowed(self) -> bool"""
54f9ee45 3485 return _core_.NotifyEvent_IsAllowed(*args, **kwargs)
e811c8ce 3486
d14a1e28
RD
3487
3488class NotifyEventPtr(NotifyEvent):
3489 def __init__(self, this):
3490 self.this = this
3491 if not hasattr(self,"thisown"): self.thisown = 0
3492 self.__class__ = NotifyEvent
54f9ee45 3493_core_.NotifyEvent_swigregister(NotifyEventPtr)
d14a1e28
RD
3494
3495#---------------------------------------------------------------------------
3496
3497class ScrollEvent(CommandEvent):
093d3ff1 3498 """Proxy of C++ ScrollEvent class"""
e811c8ce
RD
3499 def __repr__(self):
3500 return "<%s.%s; proxy of C++ wxScrollEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 3501 def __init__(self, *args, **kwargs):
0df68c9f 3502 """
a95a7133 3503 __init__(self, wxEventType commandType=wxEVT_NULL, int winid=0, int pos=0,
0df68c9f
RD
3504 int orient=0) -> ScrollEvent
3505 """
54f9ee45 3506 newobj = _core_.new_ScrollEvent(*args, **kwargs)
d14a1e28
RD
3507 self.this = newobj.this
3508 self.thisown = 1
3509 del newobj.thisown
e811c8ce 3510 def GetOrientation(*args, **kwargs):
a95a7133 3511 """GetOrientation(self) -> int"""
54f9ee45 3512 return _core_.ScrollEvent_GetOrientation(*args, **kwargs)
e811c8ce
RD
3513
3514 def GetPosition(*args, **kwargs):
a95a7133 3515 """GetPosition(self) -> int"""
54f9ee45 3516 return _core_.ScrollEvent_GetPosition(*args, **kwargs)
e811c8ce
RD
3517
3518 def SetOrientation(*args, **kwargs):
a95a7133 3519 """SetOrientation(self, int orient)"""
54f9ee45 3520 return _core_.ScrollEvent_SetOrientation(*args, **kwargs)
e811c8ce
RD
3521
3522 def SetPosition(*args, **kwargs):
a95a7133 3523 """SetPosition(self, int pos)"""
54f9ee45 3524 return _core_.ScrollEvent_SetPosition(*args, **kwargs)
e811c8ce 3525
d14a1e28
RD
3526
3527class ScrollEventPtr(ScrollEvent):
3528 def __init__(self, this):
3529 self.this = this
3530 if not hasattr(self,"thisown"): self.thisown = 0
3531 self.__class__ = ScrollEvent
54f9ee45 3532_core_.ScrollEvent_swigregister(ScrollEventPtr)
d14a1e28
RD
3533
3534#---------------------------------------------------------------------------
3535
3536class ScrollWinEvent(Event):
093d3ff1 3537 """Proxy of C++ ScrollWinEvent class"""
e811c8ce
RD
3538 def __repr__(self):
3539 return "<%s.%s; proxy of C++ wxScrollWinEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 3540 def __init__(self, *args, **kwargs):
a95a7133 3541 """__init__(self, wxEventType commandType=wxEVT_NULL, int pos=0, int orient=0) -> ScrollWinEvent"""
54f9ee45 3542 newobj = _core_.new_ScrollWinEvent(*args, **kwargs)
d14a1e28
RD
3543 self.this = newobj.this
3544 self.thisown = 1
3545 del newobj.thisown
e811c8ce 3546 def GetOrientation(*args, **kwargs):
a95a7133 3547 """GetOrientation(self) -> int"""
54f9ee45 3548 return _core_.ScrollWinEvent_GetOrientation(*args, **kwargs)
e811c8ce
RD
3549
3550 def GetPosition(*args, **kwargs):
a95a7133 3551 """GetPosition(self) -> int"""
54f9ee45 3552 return _core_.ScrollWinEvent_GetPosition(*args, **kwargs)
e811c8ce
RD
3553
3554 def SetOrientation(*args, **kwargs):
a95a7133 3555 """SetOrientation(self, int orient)"""
54f9ee45 3556 return _core_.ScrollWinEvent_SetOrientation(*args, **kwargs)
e811c8ce
RD
3557
3558 def SetPosition(*args, **kwargs):
a95a7133 3559 """SetPosition(self, int pos)"""
54f9ee45 3560 return _core_.ScrollWinEvent_SetPosition(*args, **kwargs)
e811c8ce 3561
d14a1e28
RD
3562
3563class ScrollWinEventPtr(ScrollWinEvent):
3564 def __init__(self, this):
3565 self.this = this
3566 if not hasattr(self,"thisown"): self.thisown = 0
3567 self.__class__ = ScrollWinEvent
54f9ee45 3568_core_.ScrollWinEvent_swigregister(ScrollWinEventPtr)
d14a1e28
RD
3569
3570#---------------------------------------------------------------------------
3571
54f9ee45
RD
3572MOUSE_BTN_ANY = _core_.MOUSE_BTN_ANY
3573MOUSE_BTN_NONE = _core_.MOUSE_BTN_NONE
3574MOUSE_BTN_LEFT = _core_.MOUSE_BTN_LEFT
3575MOUSE_BTN_MIDDLE = _core_.MOUSE_BTN_MIDDLE
3576MOUSE_BTN_RIGHT = _core_.MOUSE_BTN_RIGHT
d14a1e28 3577class MouseEvent(Event):
093d3ff1 3578 """Proxy of C++ MouseEvent class"""
e811c8ce
RD
3579 def __repr__(self):
3580 return "<%s.%s; proxy of C++ wxMouseEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 3581 def __init__(self, *args, **kwargs):
a95a7133 3582 """__init__(self, wxEventType mouseType=wxEVT_NULL) -> MouseEvent"""
54f9ee45 3583 newobj = _core_.new_MouseEvent(*args, **kwargs)
d14a1e28
RD
3584 self.this = newobj.this
3585 self.thisown = 1
3586 del newobj.thisown
e811c8ce 3587 def IsButton(*args, **kwargs):
a95a7133 3588 """IsButton(self) -> bool"""
54f9ee45 3589 return _core_.MouseEvent_IsButton(*args, **kwargs)
e811c8ce
RD
3590
3591 def ButtonDown(*args, **kwargs):
a95a7133 3592 """ButtonDown(self, int but=MOUSE_BTN_ANY) -> bool"""
54f9ee45 3593 return _core_.MouseEvent_ButtonDown(*args, **kwargs)
e811c8ce
RD
3594
3595 def ButtonDClick(*args, **kwargs):
a95a7133 3596 """ButtonDClick(self, int but=MOUSE_BTN_ANY) -> bool"""
54f9ee45 3597 return _core_.MouseEvent_ButtonDClick(*args, **kwargs)
e811c8ce
RD
3598
3599 def ButtonUp(*args, **kwargs):
a95a7133 3600 """ButtonUp(self, int but=MOUSE_BTN_ANY) -> bool"""
54f9ee45 3601 return _core_.MouseEvent_ButtonUp(*args, **kwargs)
e811c8ce
RD
3602
3603 def Button(*args, **kwargs):
a95a7133 3604 """Button(self, int but) -> bool"""
54f9ee45 3605 return _core_.MouseEvent_Button(*args, **kwargs)
e811c8ce
RD
3606
3607 def ButtonIsDown(*args, **kwargs):
a95a7133 3608 """ButtonIsDown(self, int but) -> bool"""
54f9ee45 3609 return _core_.MouseEvent_ButtonIsDown(*args, **kwargs)
e811c8ce
RD
3610
3611 def GetButton(*args, **kwargs):
a95a7133 3612 """GetButton(self) -> int"""
54f9ee45 3613 return _core_.MouseEvent_GetButton(*args, **kwargs)
e811c8ce
RD
3614
3615 def ControlDown(*args, **kwargs):
a95a7133 3616 """ControlDown(self) -> bool"""
54f9ee45 3617 return _core_.MouseEvent_ControlDown(*args, **kwargs)
e811c8ce
RD
3618
3619 def MetaDown(*args, **kwargs):
a95a7133 3620 """MetaDown(self) -> bool"""
54f9ee45 3621 return _core_.MouseEvent_MetaDown(*args, **kwargs)
e811c8ce
RD
3622
3623 def AltDown(*args, **kwargs):
a95a7133 3624 """AltDown(self) -> bool"""
54f9ee45 3625 return _core_.MouseEvent_AltDown(*args, **kwargs)
e811c8ce
RD
3626
3627 def ShiftDown(*args, **kwargs):
a95a7133 3628 """ShiftDown(self) -> bool"""
54f9ee45 3629 return _core_.MouseEvent_ShiftDown(*args, **kwargs)
e811c8ce 3630
412d302d
RD
3631 def CmdDown(*args, **kwargs):
3632 """
3633 CmdDown(self) -> bool
3634
3635 "Cmd" is a pseudo key which is the same as Control for PC and Unix
3636 platforms but the special "Apple" (a.k.a as "Command") key on
3637 Macs: it makes often sense to use it instead of, say, `ControlDown`
3638 because Cmd key is used for the same thing under Mac as Ctrl
3639 elsewhere. The Ctrl still exists, it's just not used for this
3640 purpose. So for non-Mac platforms this is the same as `ControlDown`
3641 and Macs this is the same as `MetaDown`.
3642 """
3643 return _core_.MouseEvent_CmdDown(*args, **kwargs)
3644
e811c8ce 3645 def LeftDown(*args, **kwargs):
a95a7133 3646 """LeftDown(self) -> bool"""
54f9ee45 3647 return _core_.MouseEvent_LeftDown(*args, **kwargs)
e811c8ce
RD
3648
3649 def MiddleDown(*args, **kwargs):
a95a7133 3650 """MiddleDown(self) -> bool"""
54f9ee45 3651 return _core_.MouseEvent_MiddleDown(*args, **kwargs)
e811c8ce
RD
3652
3653 def RightDown(*args, **kwargs):
a95a7133 3654 """RightDown(self) -> bool"""
54f9ee45 3655 return _core_.MouseEvent_RightDown(*args, **kwargs)
e811c8ce
RD
3656
3657 def LeftUp(*args, **kwargs):
a95a7133 3658 """LeftUp(self) -> bool"""
54f9ee45 3659 return _core_.MouseEvent_LeftUp(*args, **kwargs)
e811c8ce
RD
3660
3661 def MiddleUp(*args, **kwargs):
a95a7133 3662 """MiddleUp(self) -> bool"""
54f9ee45 3663 return _core_.MouseEvent_MiddleUp(*args, **kwargs)
e811c8ce
RD
3664
3665 def RightUp(*args, **kwargs):
a95a7133 3666 """RightUp(self) -> bool"""
54f9ee45 3667 return _core_.MouseEvent_RightUp(*args, **kwargs)
e811c8ce
RD
3668
3669 def LeftDClick(*args, **kwargs):
a95a7133 3670 """LeftDClick(self) -> bool"""
54f9ee45 3671 return _core_.MouseEvent_LeftDClick(*args, **kwargs)
e811c8ce
RD
3672
3673 def MiddleDClick(*args, **kwargs):
a95a7133 3674 """MiddleDClick(self) -> bool"""
54f9ee45 3675 return _core_.MouseEvent_MiddleDClick(*args, **kwargs)
e811c8ce
RD
3676
3677 def RightDClick(*args, **kwargs):
a95a7133 3678 """RightDClick(self) -> bool"""
54f9ee45 3679 return _core_.MouseEvent_RightDClick(*args, **kwargs)
e811c8ce
RD
3680
3681 def LeftIsDown(*args, **kwargs):
a95a7133 3682 """LeftIsDown(self) -> bool"""
54f9ee45 3683 return _core_.MouseEvent_LeftIsDown(*args, **kwargs)
e811c8ce
RD
3684
3685 def MiddleIsDown(*args, **kwargs):
a95a7133 3686 """MiddleIsDown(self) -> bool"""
54f9ee45 3687 return _core_.MouseEvent_MiddleIsDown(*args, **kwargs)
e811c8ce
RD
3688
3689 def RightIsDown(*args, **kwargs):
a95a7133 3690 """RightIsDown(self) -> bool"""
54f9ee45 3691 return _core_.MouseEvent_RightIsDown(*args, **kwargs)
e811c8ce
RD
3692
3693 def Dragging(*args, **kwargs):
a95a7133 3694 """Dragging(self) -> bool"""
54f9ee45 3695 return _core_.MouseEvent_Dragging(*args, **kwargs)
e811c8ce
RD
3696
3697 def Moving(*args, **kwargs):
a95a7133 3698 """Moving(self) -> bool"""
54f9ee45 3699 return _core_.MouseEvent_Moving(*args, **kwargs)
e811c8ce
RD
3700
3701 def Entering(*args, **kwargs):
a95a7133 3702 """Entering(self) -> bool"""
54f9ee45 3703 return _core_.MouseEvent_Entering(*args, **kwargs)
e811c8ce
RD
3704
3705 def Leaving(*args, **kwargs):
a95a7133 3706 """Leaving(self) -> bool"""
54f9ee45 3707 return _core_.MouseEvent_Leaving(*args, **kwargs)
e811c8ce
RD
3708
3709 def GetPosition(*args, **kwargs):
0df68c9f 3710 """
a95a7133 3711 GetPosition(self) -> Point
e811c8ce 3712
41e2b43e
RD
3713 Returns the position of the mouse in window coordinates when the event
3714 happened.
0df68c9f 3715 """
54f9ee45 3716 return _core_.MouseEvent_GetPosition(*args, **kwargs)
e811c8ce
RD
3717
3718 def GetPositionTuple(*args, **kwargs):
0df68c9f
RD
3719 """
3720 GetPositionTuple() -> (x,y)
e811c8ce 3721
41e2b43e
RD
3722 Returns the position of the mouse in window coordinates when the event
3723 happened.
0df68c9f 3724 """
54f9ee45 3725 return _core_.MouseEvent_GetPositionTuple(*args, **kwargs)
e811c8ce
RD
3726
3727 def GetLogicalPosition(*args, **kwargs):
a95a7133 3728 """GetLogicalPosition(self, DC dc) -> Point"""
54f9ee45 3729 return _core_.MouseEvent_GetLogicalPosition(*args, **kwargs)
e811c8ce
RD
3730
3731 def GetX(*args, **kwargs):
a95a7133 3732 """GetX(self) -> int"""
54f9ee45 3733 return _core_.MouseEvent_GetX(*args, **kwargs)
e811c8ce
RD
3734
3735 def GetY(*args, **kwargs):
a95a7133 3736 """GetY(self) -> int"""
54f9ee45 3737 return _core_.MouseEvent_GetY(*args, **kwargs)
e811c8ce
RD
3738
3739 def GetWheelRotation(*args, **kwargs):
a95a7133 3740 """GetWheelRotation(self) -> int"""
54f9ee45 3741 return _core_.MouseEvent_GetWheelRotation(*args, **kwargs)
e811c8ce
RD
3742
3743 def GetWheelDelta(*args, **kwargs):
a95a7133 3744 """GetWheelDelta(self) -> int"""
54f9ee45 3745 return _core_.MouseEvent_GetWheelDelta(*args, **kwargs)
e811c8ce
RD
3746
3747 def GetLinesPerAction(*args, **kwargs):
a95a7133 3748 """GetLinesPerAction(self) -> int"""
54f9ee45 3749 return _core_.MouseEvent_GetLinesPerAction(*args, **kwargs)
e811c8ce
RD
3750
3751 def IsPageScroll(*args, **kwargs):
a95a7133 3752 """IsPageScroll(self) -> bool"""
54f9ee45
RD
3753 return _core_.MouseEvent_IsPageScroll(*args, **kwargs)
3754
3755 m_x = property(_core_.MouseEvent_m_x_get, _core_.MouseEvent_m_x_set)
3756 m_y = property(_core_.MouseEvent_m_y_get, _core_.MouseEvent_m_y_set)
3757 m_leftDown = property(_core_.MouseEvent_m_leftDown_get, _core_.MouseEvent_m_leftDown_set)
3758 m_middleDown = property(_core_.MouseEvent_m_middleDown_get, _core_.MouseEvent_m_middleDown_set)
3759 m_rightDown = property(_core_.MouseEvent_m_rightDown_get, _core_.MouseEvent_m_rightDown_set)
3760 m_controlDown = property(_core_.MouseEvent_m_controlDown_get, _core_.MouseEvent_m_controlDown_set)
3761 m_shiftDown = property(_core_.MouseEvent_m_shiftDown_get, _core_.MouseEvent_m_shiftDown_set)
3762 m_altDown = property(_core_.MouseEvent_m_altDown_get, _core_.MouseEvent_m_altDown_set)
3763 m_metaDown = property(_core_.MouseEvent_m_metaDown_get, _core_.MouseEvent_m_metaDown_set)
3764 m_wheelRotation = property(_core_.MouseEvent_m_wheelRotation_get, _core_.MouseEvent_m_wheelRotation_set)
3765 m_wheelDelta = property(_core_.MouseEvent_m_wheelDelta_get, _core_.MouseEvent_m_wheelDelta_set)
3766 m_linesPerAction = property(_core_.MouseEvent_m_linesPerAction_get, _core_.MouseEvent_m_linesPerAction_set)
d14a1e28
RD
3767
3768class MouseEventPtr(MouseEvent):
3769 def __init__(self, this):
3770 self.this = this
3771 if not hasattr(self,"thisown"): self.thisown = 0
3772 self.__class__ = MouseEvent
54f9ee45 3773_core_.MouseEvent_swigregister(MouseEventPtr)
d14a1e28
RD
3774
3775#---------------------------------------------------------------------------
3776
3777class SetCursorEvent(Event):
093d3ff1 3778 """Proxy of C++ SetCursorEvent class"""
e811c8ce
RD
3779 def __repr__(self):
3780 return "<%s.%s; proxy of C++ wxSetCursorEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 3781 def __init__(self, *args, **kwargs):
a95a7133 3782 """__init__(self, int x=0, int y=0) -> SetCursorEvent"""
54f9ee45 3783 newobj = _core_.new_SetCursorEvent(*args, **kwargs)
d14a1e28
RD
3784 self.this = newobj.this
3785 self.thisown = 1
3786 del newobj.thisown
e811c8ce 3787 def GetX(*args, **kwargs):
a95a7133 3788 """GetX(self) -> int"""
54f9ee45 3789 return _core_.SetCursorEvent_GetX(*args, **kwargs)
e811c8ce
RD
3790
3791 def GetY(*args, **kwargs):
a95a7133 3792 """GetY(self) -> int"""
54f9ee45 3793 return _core_.SetCursorEvent_GetY(*args, **kwargs)
e811c8ce
RD
3794
3795 def SetCursor(*args, **kwargs):
a95a7133 3796 """SetCursor(self, Cursor cursor)"""
54f9ee45 3797 return _core_.SetCursorEvent_SetCursor(*args, **kwargs)
e811c8ce
RD
3798
3799 def GetCursor(*args, **kwargs):
a95a7133 3800 """GetCursor(self) -> Cursor"""
54f9ee45 3801 return _core_.SetCursorEvent_GetCursor(*args, **kwargs)
e811c8ce
RD
3802
3803 def HasCursor(*args, **kwargs):
a95a7133 3804 """HasCursor(self) -> bool"""
54f9ee45 3805 return _core_.SetCursorEvent_HasCursor(*args, **kwargs)
e811c8ce 3806
d14a1e28
RD
3807
3808class SetCursorEventPtr(SetCursorEvent):
3809 def __init__(self, this):
3810 self.this = this
3811 if not hasattr(self,"thisown"): self.thisown = 0
3812 self.__class__ = SetCursorEvent
54f9ee45 3813_core_.SetCursorEvent_swigregister(SetCursorEventPtr)
d14a1e28
RD
3814
3815#---------------------------------------------------------------------------
3816
3817class KeyEvent(Event):
093d3ff1 3818 """Proxy of C++ KeyEvent class"""
e811c8ce
RD
3819 def __repr__(self):
3820 return "<%s.%s; proxy of C++ wxKeyEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 3821 def __init__(self, *args, **kwargs):
a95a7133 3822 """__init__(self, wxEventType keyType=wxEVT_NULL) -> KeyEvent"""
54f9ee45 3823 newobj = _core_.new_KeyEvent(*args, **kwargs)
d14a1e28
RD
3824 self.this = newobj.this
3825 self.thisown = 1
3826 del newobj.thisown
e811c8ce 3827 def ControlDown(*args, **kwargs):
a95a7133 3828 """ControlDown(self) -> bool"""
54f9ee45 3829 return _core_.KeyEvent_ControlDown(*args, **kwargs)
e811c8ce
RD
3830
3831 def MetaDown(*args, **kwargs):
a95a7133 3832 """MetaDown(self) -> bool"""
54f9ee45 3833 return _core_.KeyEvent_MetaDown(*args, **kwargs)
e811c8ce
RD
3834
3835 def AltDown(*args, **kwargs):
a95a7133 3836 """AltDown(self) -> bool"""
54f9ee45 3837 return _core_.KeyEvent_AltDown(*args, **kwargs)
e811c8ce
RD
3838
3839 def ShiftDown(*args, **kwargs):
a95a7133 3840 """ShiftDown(self) -> bool"""
54f9ee45 3841 return _core_.KeyEvent_ShiftDown(*args, **kwargs)
e811c8ce 3842
412d302d
RD
3843 def CmdDown(*args, **kwargs):
3844 """
3845 CmdDown(self) -> bool
3846
3847 "Cmd" is a pseudo key which is the same as Control for PC and Unix
3848 platforms but the special "Apple" (a.k.a as "Command") key on
3849 Macs: it makes often sense to use it instead of, say, `ControlDown`
3850 because Cmd key is used for the same thing under Mac as Ctrl
3851 elsewhere. The Ctrl still exists, it's just not used for this
3852 purpose. So for non-Mac platforms this is the same as `ControlDown`
3853 and Macs this is the same as `MetaDown`.
3854 """
3855 return _core_.KeyEvent_CmdDown(*args, **kwargs)
3856
e811c8ce 3857 def HasModifiers(*args, **kwargs):
a95a7133 3858 """HasModifiers(self) -> bool"""
54f9ee45 3859 return _core_.KeyEvent_HasModifiers(*args, **kwargs)
e811c8ce
RD
3860
3861 def GetKeyCode(*args, **kwargs):
a95a7133 3862 """GetKeyCode(self) -> int"""
54f9ee45 3863 return _core_.KeyEvent_GetKeyCode(*args, **kwargs)
e811c8ce 3864
d14a1e28 3865 KeyCode = GetKeyCode
19272049
RD
3866 def GetUnicodeKey(*args, **kwargs):
3867 """GetUnicodeKey(self) -> int"""
3868 return _core_.KeyEvent_GetUnicodeKey(*args, **kwargs)
e811c8ce 3869
19272049 3870 GetUniChar = GetUnicodeKey
e811c8ce 3871 def GetRawKeyCode(*args, **kwargs):
a95a7133 3872 """GetRawKeyCode(self) -> unsigned int"""
54f9ee45 3873 return _core_.KeyEvent_GetRawKeyCode(*args, **kwargs)
e811c8ce
RD
3874
3875 def GetRawKeyFlags(*args, **kwargs):
a95a7133 3876 """GetRawKeyFlags(self) -> unsigned int"""
54f9ee45 3877 return _core_.KeyEvent_GetRawKeyFlags(*args, **kwargs)
e811c8ce
RD
3878
3879 def GetPosition(*args, **kwargs):
0df68c9f 3880 """
a95a7133 3881 GetPosition(self) -> Point
e811c8ce 3882
0df68c9f
RD
3883 Find the position of the event.
3884 """
54f9ee45 3885 return _core_.KeyEvent_GetPosition(*args, **kwargs)
e811c8ce
RD
3886
3887 def GetPositionTuple(*args, **kwargs):
0df68c9f
RD
3888 """
3889 GetPositionTuple() -> (x,y)
e811c8ce 3890
0df68c9f
RD
3891 Find the position of the event.
3892 """
54f9ee45 3893 return _core_.KeyEvent_GetPositionTuple(*args, **kwargs)
e811c8ce
RD
3894
3895 def GetX(*args, **kwargs):
a95a7133 3896 """GetX(self) -> int"""
54f9ee45 3897 return _core_.KeyEvent_GetX(*args, **kwargs)
e811c8ce
RD
3898
3899 def GetY(*args, **kwargs):
a95a7133 3900 """GetY(self) -> int"""
54f9ee45
RD
3901 return _core_.KeyEvent_GetY(*args, **kwargs)
3902
3903 m_x = property(_core_.KeyEvent_m_x_get, _core_.KeyEvent_m_x_set)
3904 m_y = property(_core_.KeyEvent_m_y_get, _core_.KeyEvent_m_y_set)
3905 m_keyCode = property(_core_.KeyEvent_m_keyCode_get, _core_.KeyEvent_m_keyCode_set)
3906 m_controlDown = property(_core_.KeyEvent_m_controlDown_get, _core_.KeyEvent_m_controlDown_set)
3907 m_shiftDown = property(_core_.KeyEvent_m_shiftDown_get, _core_.KeyEvent_m_shiftDown_set)
3908 m_altDown = property(_core_.KeyEvent_m_altDown_get, _core_.KeyEvent_m_altDown_set)
3909 m_metaDown = property(_core_.KeyEvent_m_metaDown_get, _core_.KeyEvent_m_metaDown_set)
3910 m_scanCode = property(_core_.KeyEvent_m_scanCode_get, _core_.KeyEvent_m_scanCode_set)
3911 m_rawCode = property(_core_.KeyEvent_m_rawCode_get, _core_.KeyEvent_m_rawCode_set)
3912 m_rawFlags = property(_core_.KeyEvent_m_rawFlags_get, _core_.KeyEvent_m_rawFlags_set)
d14a1e28
RD
3913
3914class KeyEventPtr(KeyEvent):
3915 def __init__(self, this):
3916 self.this = this
3917 if not hasattr(self,"thisown"): self.thisown = 0
3918 self.__class__ = KeyEvent
54f9ee45 3919_core_.KeyEvent_swigregister(KeyEventPtr)
d14a1e28
RD
3920
3921#---------------------------------------------------------------------------
3922
3923class SizeEvent(Event):
093d3ff1 3924 """Proxy of C++ SizeEvent class"""
e811c8ce
RD
3925 def __repr__(self):
3926 return "<%s.%s; proxy of C++ wxSizeEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 3927 def __init__(self, *args, **kwargs):
a95a7133 3928 """__init__(self, Size sz=DefaultSize, int winid=0) -> SizeEvent"""
54f9ee45 3929 newobj = _core_.new_SizeEvent(*args, **kwargs)
d14a1e28
RD
3930 self.this = newobj.this
3931 self.thisown = 1
3932 del newobj.thisown
e811c8ce 3933 def GetSize(*args, **kwargs):
a95a7133 3934 """GetSize(self) -> Size"""
54f9ee45 3935 return _core_.SizeEvent_GetSize(*args, **kwargs)
e811c8ce
RD
3936
3937 def GetRect(*args, **kwargs):
a95a7133 3938 """GetRect(self) -> Rect"""
54f9ee45 3939 return _core_.SizeEvent_GetRect(*args, **kwargs)
e811c8ce
RD
3940
3941 def SetRect(*args, **kwargs):
a95a7133 3942 """SetRect(self, Rect rect)"""
54f9ee45 3943 return _core_.SizeEvent_SetRect(*args, **kwargs)
e811c8ce
RD
3944
3945 def SetSize(*args, **kwargs):
a95a7133 3946 """SetSize(self, Size size)"""
54f9ee45 3947 return _core_.SizeEvent_SetSize(*args, **kwargs)
e811c8ce 3948
54f9ee45
RD
3949 m_size = property(_core_.SizeEvent_m_size_get, _core_.SizeEvent_m_size_set)
3950 m_rect = property(_core_.SizeEvent_m_rect_get, _core_.SizeEvent_m_rect_set)
d14a1e28
RD
3951
3952class SizeEventPtr(SizeEvent):
3953 def __init__(self, this):
3954 self.this = this
3955 if not hasattr(self,"thisown"): self.thisown = 0
3956 self.__class__ = SizeEvent
54f9ee45 3957_core_.SizeEvent_swigregister(SizeEventPtr)
d14a1e28
RD
3958
3959#---------------------------------------------------------------------------
3960
3961class MoveEvent(Event):
093d3ff1 3962 """Proxy of C++ MoveEvent class"""
e811c8ce
RD
3963 def __repr__(self):
3964 return "<%s.%s; proxy of C++ wxMoveEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 3965 def __init__(self, *args, **kwargs):
a95a7133 3966 """__init__(self, Point pos=DefaultPosition, int winid=0) -> MoveEvent"""
54f9ee45 3967 newobj = _core_.new_MoveEvent(*args, **kwargs)
d14a1e28
RD
3968 self.this = newobj.this
3969 self.thisown = 1
3970 del newobj.thisown
e811c8ce 3971 def GetPosition(*args, **kwargs):
a95a7133 3972 """GetPosition(self) -> Point"""
54f9ee45 3973 return _core_.MoveEvent_GetPosition(*args, **kwargs)
e811c8ce
RD
3974
3975 def GetRect(*args, **kwargs):
a95a7133 3976 """GetRect(self) -> Rect"""
54f9ee45 3977 return _core_.MoveEvent_GetRect(*args, **kwargs)
e811c8ce
RD
3978
3979 def SetRect(*args, **kwargs):
a95a7133 3980 """SetRect(self, Rect rect)"""
54f9ee45 3981 return _core_.MoveEvent_SetRect(*args, **kwargs)
e811c8ce
RD
3982
3983 def SetPosition(*args, **kwargs):
a95a7133 3984 """SetPosition(self, Point pos)"""
54f9ee45 3985 return _core_.MoveEvent_SetPosition(*args, **kwargs)
e811c8ce 3986
7557b9b5
RD
3987 m_pos = property(GetPosition, SetPosition)
3988 m_rect = property(GetRect, SetRect)
3989
d14a1e28
RD
3990
3991class MoveEventPtr(MoveEvent):
3992 def __init__(self, this):
3993 self.this = this
3994 if not hasattr(self,"thisown"): self.thisown = 0
3995 self.__class__ = MoveEvent
54f9ee45 3996_core_.MoveEvent_swigregister(MoveEventPtr)
d14a1e28
RD
3997
3998#---------------------------------------------------------------------------
3999
4000class PaintEvent(Event):
093d3ff1 4001 """Proxy of C++ PaintEvent class"""
e811c8ce
RD
4002 def __repr__(self):
4003 return "<%s.%s; proxy of C++ wxPaintEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 4004 def __init__(self, *args, **kwargs):
a95a7133 4005 """__init__(self, int Id=0) -> PaintEvent"""
54f9ee45 4006 newobj = _core_.new_PaintEvent(*args, **kwargs)
d14a1e28
RD
4007 self.this = newobj.this
4008 self.thisown = 1
4009 del newobj.thisown
d14a1e28
RD
4010
4011class PaintEventPtr(PaintEvent):
4012 def __init__(self, this):
4013 self.this = this
4014 if not hasattr(self,"thisown"): self.thisown = 0
4015 self.__class__ = PaintEvent
54f9ee45 4016_core_.PaintEvent_swigregister(PaintEventPtr)
d14a1e28
RD
4017
4018class NcPaintEvent(Event):
093d3ff1 4019 """Proxy of C++ NcPaintEvent class"""
e811c8ce
RD
4020 def __repr__(self):
4021 return "<%s.%s; proxy of C++ wxNcPaintEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 4022 def __init__(self, *args, **kwargs):
a95a7133 4023 """__init__(self, int winid=0) -> NcPaintEvent"""
54f9ee45 4024 newobj = _core_.new_NcPaintEvent(*args, **kwargs)
d14a1e28
RD
4025 self.this = newobj.this
4026 self.thisown = 1
4027 del newobj.thisown
d14a1e28
RD
4028
4029class NcPaintEventPtr(NcPaintEvent):
4030 def __init__(self, this):
4031 self.this = this
4032 if not hasattr(self,"thisown"): self.thisown = 0
4033 self.__class__ = NcPaintEvent
54f9ee45 4034_core_.NcPaintEvent_swigregister(NcPaintEventPtr)
d14a1e28
RD
4035
4036#---------------------------------------------------------------------------
4037
4038class EraseEvent(Event):
093d3ff1 4039 """Proxy of C++ EraseEvent class"""
e811c8ce
RD
4040 def __repr__(self):
4041 return "<%s.%s; proxy of C++ wxEraseEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 4042 def __init__(self, *args, **kwargs):
a95a7133 4043 """__init__(self, int Id=0, DC dc=(wxDC *) NULL) -> EraseEvent"""
54f9ee45 4044 newobj = _core_.new_EraseEvent(*args, **kwargs)
d14a1e28
RD
4045 self.this = newobj.this
4046 self.thisown = 1
4047 del newobj.thisown
e811c8ce 4048 def GetDC(*args, **kwargs):
a95a7133 4049 """GetDC(self) -> DC"""
54f9ee45 4050 return _core_.EraseEvent_GetDC(*args, **kwargs)
e811c8ce 4051
d14a1e28
RD
4052
4053class EraseEventPtr(EraseEvent):
4054 def __init__(self, this):
4055 self.this = this
4056 if not hasattr(self,"thisown"): self.thisown = 0
4057 self.__class__ = EraseEvent
54f9ee45 4058_core_.EraseEvent_swigregister(EraseEventPtr)
d14a1e28
RD
4059
4060#---------------------------------------------------------------------------
4061
4062class FocusEvent(Event):
093d3ff1 4063 """Proxy of C++ FocusEvent class"""
e811c8ce
RD
4064 def __repr__(self):
4065 return "<%s.%s; proxy of C++ wxFocusEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 4066 def __init__(self, *args, **kwargs):
a95a7133 4067 """__init__(self, wxEventType type=wxEVT_NULL, int winid=0) -> FocusEvent"""
54f9ee45 4068 newobj = _core_.new_FocusEvent(*args, **kwargs)
d14a1e28
RD
4069 self.this = newobj.this
4070 self.thisown = 1
4071 del newobj.thisown
e811c8ce 4072 def GetWindow(*args, **kwargs):
a95a7133 4073 """GetWindow(self) -> Window"""
54f9ee45 4074 return _core_.FocusEvent_GetWindow(*args, **kwargs)
e811c8ce
RD
4075
4076 def SetWindow(*args, **kwargs):
a95a7133 4077 """SetWindow(self, Window win)"""
54f9ee45 4078 return _core_.FocusEvent_SetWindow(*args, **kwargs)
e811c8ce 4079
d14a1e28
RD
4080
4081class FocusEventPtr(FocusEvent):
4082 def __init__(self, this):
4083 self.this = this
4084 if not hasattr(self,"thisown"): self.thisown = 0
4085 self.__class__ = FocusEvent
54f9ee45 4086_core_.FocusEvent_swigregister(FocusEventPtr)
d14a1e28
RD
4087
4088#---------------------------------------------------------------------------
4089
4090class ChildFocusEvent(CommandEvent):
093d3ff1 4091 """Proxy of C++ ChildFocusEvent class"""
e811c8ce
RD
4092 def __repr__(self):
4093 return "<%s.%s; proxy of C++ wxChildFocusEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 4094 def __init__(self, *args, **kwargs):
a95a7133 4095 """__init__(self, Window win=None) -> ChildFocusEvent"""
54f9ee45 4096 newobj = _core_.new_ChildFocusEvent(*args, **kwargs)
d14a1e28
RD
4097 self.this = newobj.this
4098 self.thisown = 1
4099 del newobj.thisown
e811c8ce 4100 def GetWindow(*args, **kwargs):
a95a7133 4101 """GetWindow(self) -> Window"""
54f9ee45 4102 return _core_.ChildFocusEvent_GetWindow(*args, **kwargs)
e811c8ce 4103
d14a1e28
RD
4104
4105class ChildFocusEventPtr(ChildFocusEvent):
4106 def __init__(self, this):
4107 self.this = this
4108 if not hasattr(self,"thisown"): self.thisown = 0
4109 self.__class__ = ChildFocusEvent
54f9ee45 4110_core_.ChildFocusEvent_swigregister(ChildFocusEventPtr)
d14a1e28
RD
4111
4112#---------------------------------------------------------------------------
4113
4114class ActivateEvent(Event):
093d3ff1 4115 """Proxy of C++ ActivateEvent class"""
e811c8ce
RD
4116 def __repr__(self):
4117 return "<%s.%s; proxy of C++ wxActivateEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 4118 def __init__(self, *args, **kwargs):
a95a7133 4119 """__init__(self, wxEventType type=wxEVT_NULL, bool active=True, int Id=0) -> ActivateEvent"""
54f9ee45 4120 newobj = _core_.new_ActivateEvent(*args, **kwargs)
d14a1e28
RD
4121 self.this = newobj.this
4122 self.thisown = 1
4123 del newobj.thisown
e811c8ce 4124 def GetActive(*args, **kwargs):
a95a7133 4125 """GetActive(self) -> bool"""
54f9ee45 4126 return _core_.ActivateEvent_GetActive(*args, **kwargs)
e811c8ce 4127
d14a1e28
RD
4128
4129class ActivateEventPtr(ActivateEvent):
4130 def __init__(self, this):
4131 self.this = this
4132 if not hasattr(self,"thisown"): self.thisown = 0
4133 self.__class__ = ActivateEvent
54f9ee45 4134_core_.ActivateEvent_swigregister(ActivateEventPtr)
d14a1e28
RD
4135
4136#---------------------------------------------------------------------------
4137
4138class InitDialogEvent(Event):
093d3ff1 4139 """Proxy of C++ InitDialogEvent class"""
e811c8ce
RD
4140 def __repr__(self):
4141 return "<%s.%s; proxy of C++ wxInitDialogEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 4142 def __init__(self, *args, **kwargs):
a95a7133 4143 """__init__(self, int Id=0) -> InitDialogEvent"""
54f9ee45 4144 newobj = _core_.new_InitDialogEvent(*args, **kwargs)
d14a1e28
RD
4145 self.this = newobj.this
4146 self.thisown = 1
4147 del newobj.thisown
d14a1e28
RD
4148
4149class InitDialogEventPtr(InitDialogEvent):
4150 def __init__(self, this):
4151 self.this = this
4152 if not hasattr(self,"thisown"): self.thisown = 0
4153 self.__class__ = InitDialogEvent
54f9ee45 4154_core_.InitDialogEvent_swigregister(InitDialogEventPtr)
d14a1e28
RD
4155
4156#---------------------------------------------------------------------------
4157
4158class MenuEvent(Event):
093d3ff1 4159 """Proxy of C++ MenuEvent class"""
e811c8ce
RD
4160 def __repr__(self):
4161 return "<%s.%s; proxy of C++ wxMenuEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 4162 def __init__(self, *args, **kwargs):
a95a7133 4163 """__init__(self, wxEventType type=wxEVT_NULL, int winid=0, Menu menu=None) -> MenuEvent"""
54f9ee45 4164 newobj = _core_.new_MenuEvent(*args, **kwargs)
d14a1e28
RD
4165 self.this = newobj.this
4166 self.thisown = 1
4167 del newobj.thisown
e811c8ce 4168 def GetMenuId(*args, **kwargs):
a95a7133 4169 """GetMenuId(self) -> int"""
54f9ee45 4170 return _core_.MenuEvent_GetMenuId(*args, **kwargs)
e811c8ce
RD
4171
4172 def IsPopup(*args, **kwargs):
a95a7133 4173 """IsPopup(self) -> bool"""
54f9ee45 4174 return _core_.MenuEvent_IsPopup(*args, **kwargs)
e811c8ce
RD
4175
4176 def GetMenu(*args, **kwargs):
a95a7133 4177 """GetMenu(self) -> Menu"""
54f9ee45 4178 return _core_.MenuEvent_GetMenu(*args, **kwargs)
e811c8ce 4179
d14a1e28
RD
4180
4181class MenuEventPtr(MenuEvent):
4182 def __init__(self, this):
4183 self.this = this
4184 if not hasattr(self,"thisown"): self.thisown = 0
4185 self.__class__ = MenuEvent
54f9ee45 4186_core_.MenuEvent_swigregister(MenuEventPtr)
d14a1e28
RD
4187
4188#---------------------------------------------------------------------------
4189
4190class CloseEvent(Event):
093d3ff1 4191 """Proxy of C++ CloseEvent class"""
e811c8ce
RD
4192 def __repr__(self):
4193 return "<%s.%s; proxy of C++ wxCloseEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 4194 def __init__(self, *args, **kwargs):
a95a7133 4195 """__init__(self, wxEventType type=wxEVT_NULL, int winid=0) -> CloseEvent"""
54f9ee45 4196 newobj = _core_.new_CloseEvent(*args, **kwargs)
d14a1e28
RD
4197 self.this = newobj.this
4198 self.thisown = 1
4199 del newobj.thisown
e811c8ce 4200 def SetLoggingOff(*args, **kwargs):
a95a7133 4201 """SetLoggingOff(self, bool logOff)"""
54f9ee45 4202 return _core_.CloseEvent_SetLoggingOff(*args, **kwargs)
e811c8ce
RD
4203
4204 def GetLoggingOff(*args, **kwargs):
a95a7133 4205 """GetLoggingOff(self) -> bool"""
54f9ee45 4206 return _core_.CloseEvent_GetLoggingOff(*args, **kwargs)
e811c8ce
RD
4207
4208 def Veto(*args, **kwargs):
a95a7133 4209 """Veto(self, bool veto=True)"""
54f9ee45 4210 return _core_.CloseEvent_Veto(*args, **kwargs)
e811c8ce
RD
4211
4212 def SetCanVeto(*args, **kwargs):
a95a7133 4213 """SetCanVeto(self, bool canVeto)"""
54f9ee45 4214 return _core_.CloseEvent_SetCanVeto(*args, **kwargs)
e811c8ce
RD
4215
4216 def CanVeto(*args, **kwargs):
a95a7133 4217 """CanVeto(self) -> bool"""
54f9ee45 4218 return _core_.CloseEvent_CanVeto(*args, **kwargs)
e811c8ce
RD
4219
4220 def GetVeto(*args, **kwargs):
a95a7133 4221 """GetVeto(self) -> bool"""
54f9ee45 4222 return _core_.CloseEvent_GetVeto(*args, **kwargs)
e811c8ce 4223
d14a1e28
RD
4224
4225class CloseEventPtr(CloseEvent):
4226 def __init__(self, this):
4227 self.this = this
4228 if not hasattr(self,"thisown"): self.thisown = 0
4229 self.__class__ = CloseEvent
54f9ee45 4230_core_.CloseEvent_swigregister(CloseEventPtr)
d14a1e28
RD
4231
4232#---------------------------------------------------------------------------
4233
4234class ShowEvent(Event):
093d3ff1 4235 """Proxy of C++ ShowEvent class"""
e811c8ce
RD
4236 def __repr__(self):
4237 return "<%s.%s; proxy of C++ wxShowEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 4238 def __init__(self, *args, **kwargs):
a95a7133 4239 """__init__(self, int winid=0, bool show=False) -> ShowEvent"""
54f9ee45 4240 newobj = _core_.new_ShowEvent(*args, **kwargs)
d14a1e28
RD
4241 self.this = newobj.this
4242 self.thisown = 1
4243 del newobj.thisown
e811c8ce 4244 def SetShow(*args, **kwargs):
a95a7133 4245 """SetShow(self, bool show)"""
54f9ee45 4246 return _core_.ShowEvent_SetShow(*args, **kwargs)
e811c8ce
RD
4247
4248 def GetShow(*args, **kwargs):
a95a7133 4249 """GetShow(self) -> bool"""
54f9ee45 4250 return _core_.ShowEvent_GetShow(*args, **kwargs)
e811c8ce 4251
d14a1e28
RD
4252
4253class ShowEventPtr(ShowEvent):
4254 def __init__(self, this):
4255 self.this = this
4256 if not hasattr(self,"thisown"): self.thisown = 0
4257 self.__class__ = ShowEvent
54f9ee45 4258_core_.ShowEvent_swigregister(ShowEventPtr)
d14a1e28
RD
4259
4260#---------------------------------------------------------------------------
4261
4262class IconizeEvent(Event):
093d3ff1 4263 """Proxy of C++ IconizeEvent class"""
e811c8ce
RD
4264 def __repr__(self):
4265 return "<%s.%s; proxy of C++ wxIconizeEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 4266 def __init__(self, *args, **kwargs):
a95a7133 4267 """__init__(self, int id=0, bool iconized=True) -> IconizeEvent"""
54f9ee45 4268 newobj = _core_.new_IconizeEvent(*args, **kwargs)
d14a1e28
RD
4269 self.this = newobj.this
4270 self.thisown = 1
4271 del newobj.thisown
e811c8ce 4272 def Iconized(*args, **kwargs):
a95a7133 4273 """Iconized(self) -> bool"""
54f9ee45 4274 return _core_.IconizeEvent_Iconized(*args, **kwargs)
e811c8ce 4275
d14a1e28
RD
4276
4277class IconizeEventPtr(IconizeEvent):
4278 def __init__(self, this):
4279 self.this = this
4280 if not hasattr(self,"thisown"): self.thisown = 0
4281 self.__class__ = IconizeEvent
54f9ee45 4282_core_.IconizeEvent_swigregister(IconizeEventPtr)
d14a1e28
RD
4283
4284#---------------------------------------------------------------------------
4285
4286class MaximizeEvent(Event):
093d3ff1 4287 """Proxy of C++ MaximizeEvent class"""
e811c8ce
RD
4288 def __repr__(self):
4289 return "<%s.%s; proxy of C++ wxMaximizeEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 4290 def __init__(self, *args, **kwargs):
a95a7133 4291 """__init__(self, int id=0) -> MaximizeEvent"""
54f9ee45 4292 newobj = _core_.new_MaximizeEvent(*args, **kwargs)
d14a1e28
RD
4293 self.this = newobj.this
4294 self.thisown = 1
4295 del newobj.thisown
d14a1e28
RD
4296
4297class MaximizeEventPtr(MaximizeEvent):
4298 def __init__(self, this):
4299 self.this = this
4300 if not hasattr(self,"thisown"): self.thisown = 0
4301 self.__class__ = MaximizeEvent
54f9ee45 4302_core_.MaximizeEvent_swigregister(MaximizeEventPtr)
d14a1e28
RD
4303
4304#---------------------------------------------------------------------------
4305
4306class DropFilesEvent(Event):
093d3ff1 4307 """Proxy of C++ DropFilesEvent class"""
d14a1e28
RD
4308 def __init__(self): raise RuntimeError, "No constructor defined"
4309 def __repr__(self):
4310 return "<%s.%s; proxy of C++ wxDropFilesEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
e811c8ce 4311 def GetPosition(*args, **kwargs):
a95a7133 4312 """GetPosition(self) -> Point"""
54f9ee45 4313 return _core_.DropFilesEvent_GetPosition(*args, **kwargs)
e811c8ce
RD
4314
4315 def GetNumberOfFiles(*args, **kwargs):
a95a7133 4316 """GetNumberOfFiles(self) -> int"""
54f9ee45 4317 return _core_.DropFilesEvent_GetNumberOfFiles(*args, **kwargs)
e811c8ce
RD
4318
4319 def GetFiles(*args, **kwargs):
a95a7133 4320 """GetFiles(self) -> PyObject"""
54f9ee45 4321 return _core_.DropFilesEvent_GetFiles(*args, **kwargs)
e811c8ce 4322
d14a1e28
RD
4323
4324class DropFilesEventPtr(DropFilesEvent):
4325 def __init__(self, this):
4326 self.this = this
4327 if not hasattr(self,"thisown"): self.thisown = 0
4328 self.__class__ = DropFilesEvent
54f9ee45 4329_core_.DropFilesEvent_swigregister(DropFilesEventPtr)
d14a1e28
RD
4330
4331#---------------------------------------------------------------------------
4332
54f9ee45
RD
4333UPDATE_UI_PROCESS_ALL = _core_.UPDATE_UI_PROCESS_ALL
4334UPDATE_UI_PROCESS_SPECIFIED = _core_.UPDATE_UI_PROCESS_SPECIFIED
d14a1e28 4335class UpdateUIEvent(CommandEvent):
093d3ff1 4336 """Proxy of C++ UpdateUIEvent class"""
e811c8ce
RD
4337 def __repr__(self):
4338 return "<%s.%s; proxy of C++ wxUpdateUIEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 4339 def __init__(self, *args, **kwargs):
a95a7133 4340 """__init__(self, int commandId=0) -> UpdateUIEvent"""
54f9ee45 4341 newobj = _core_.new_UpdateUIEvent(*args, **kwargs)
d14a1e28
RD
4342 self.this = newobj.this
4343 self.thisown = 1
4344 del newobj.thisown
e811c8ce 4345 def GetChecked(*args, **kwargs):
a95a7133 4346 """GetChecked(self) -> bool"""
54f9ee45 4347 return _core_.UpdateUIEvent_GetChecked(*args, **kwargs)
e811c8ce
RD
4348
4349 def GetEnabled(*args, **kwargs):
a95a7133 4350 """GetEnabled(self) -> bool"""
54f9ee45 4351 return _core_.UpdateUIEvent_GetEnabled(*args, **kwargs)
e811c8ce
RD
4352
4353 def GetText(*args, **kwargs):
a95a7133 4354 """GetText(self) -> String"""
54f9ee45 4355 return _core_.UpdateUIEvent_GetText(*args, **kwargs)
e811c8ce
RD
4356
4357 def GetSetText(*args, **kwargs):
a95a7133 4358 """GetSetText(self) -> bool"""
54f9ee45 4359 return _core_.UpdateUIEvent_GetSetText(*args, **kwargs)
e811c8ce
RD
4360
4361 def GetSetChecked(*args, **kwargs):
a95a7133 4362 """GetSetChecked(self) -> bool"""
54f9ee45 4363 return _core_.UpdateUIEvent_GetSetChecked(*args, **kwargs)
e811c8ce
RD
4364
4365 def GetSetEnabled(*args, **kwargs):
a95a7133 4366 """GetSetEnabled(self) -> bool"""
54f9ee45 4367 return _core_.UpdateUIEvent_GetSetEnabled(*args, **kwargs)
e811c8ce
RD
4368
4369 def Check(*args, **kwargs):
a95a7133 4370 """Check(self, bool check)"""
54f9ee45 4371 return _core_.UpdateUIEvent_Check(*args, **kwargs)
e811c8ce
RD
4372
4373 def Enable(*args, **kwargs):
a95a7133 4374 """Enable(self, bool enable)"""
54f9ee45 4375 return _core_.UpdateUIEvent_Enable(*args, **kwargs)
e811c8ce
RD
4376
4377 def SetText(*args, **kwargs):
a95a7133 4378 """SetText(self, String text)"""
54f9ee45 4379 return _core_.UpdateUIEvent_SetText(*args, **kwargs)
e811c8ce
RD
4380
4381 def SetUpdateInterval(*args, **kwargs):
66c033b4 4382 """SetUpdateInterval(long updateInterval)"""
54f9ee45 4383 return _core_.UpdateUIEvent_SetUpdateInterval(*args, **kwargs)
e811c8ce
RD
4384
4385 SetUpdateInterval = staticmethod(SetUpdateInterval)
4386 def GetUpdateInterval(*args, **kwargs):
66c033b4 4387 """GetUpdateInterval() -> long"""
54f9ee45 4388 return _core_.UpdateUIEvent_GetUpdateInterval(*args, **kwargs)
e811c8ce
RD
4389
4390 GetUpdateInterval = staticmethod(GetUpdateInterval)
4391 def CanUpdate(*args, **kwargs):
66c033b4 4392 """CanUpdate(Window win) -> bool"""
54f9ee45 4393 return _core_.UpdateUIEvent_CanUpdate(*args, **kwargs)
e811c8ce
RD
4394
4395 CanUpdate = staticmethod(CanUpdate)
4396 def ResetUpdateTime(*args, **kwargs):
66c033b4 4397 """ResetUpdateTime()"""
54f9ee45 4398 return _core_.UpdateUIEvent_ResetUpdateTime(*args, **kwargs)
e811c8ce
RD
4399
4400 ResetUpdateTime = staticmethod(ResetUpdateTime)
4401 def SetMode(*args, **kwargs):
66c033b4 4402 """SetMode(int mode)"""
54f9ee45 4403 return _core_.UpdateUIEvent_SetMode(*args, **kwargs)
e811c8ce
RD
4404
4405 SetMode = staticmethod(SetMode)
4406 def GetMode(*args, **kwargs):
66c033b4 4407 """GetMode() -> int"""
54f9ee45 4408 return _core_.UpdateUIEvent_GetMode(*args, **kwargs)
e811c8ce
RD
4409
4410 GetMode = staticmethod(GetMode)
d14a1e28
RD
4411
4412class UpdateUIEventPtr(UpdateUIEvent):
4413 def __init__(self, this):
4414 self.this = this
4415 if not hasattr(self,"thisown"): self.thisown = 0
4416 self.__class__ = UpdateUIEvent
54f9ee45 4417_core_.UpdateUIEvent_swigregister(UpdateUIEventPtr)
d14a1e28 4418
e811c8ce
RD
4419def UpdateUIEvent_SetUpdateInterval(*args, **kwargs):
4420 """UpdateUIEvent_SetUpdateInterval(long updateInterval)"""
54f9ee45 4421 return _core_.UpdateUIEvent_SetUpdateInterval(*args, **kwargs)
d14a1e28 4422
e811c8ce
RD
4423def UpdateUIEvent_GetUpdateInterval(*args, **kwargs):
4424 """UpdateUIEvent_GetUpdateInterval() -> long"""
54f9ee45 4425 return _core_.UpdateUIEvent_GetUpdateInterval(*args, **kwargs)
d14a1e28 4426
e811c8ce
RD
4427def UpdateUIEvent_CanUpdate(*args, **kwargs):
4428 """UpdateUIEvent_CanUpdate(Window win) -> bool"""
54f9ee45 4429 return _core_.UpdateUIEvent_CanUpdate(*args, **kwargs)
d14a1e28 4430
e811c8ce
RD
4431def UpdateUIEvent_ResetUpdateTime(*args, **kwargs):
4432 """UpdateUIEvent_ResetUpdateTime()"""
54f9ee45 4433 return _core_.UpdateUIEvent_ResetUpdateTime(*args, **kwargs)
d14a1e28 4434
e811c8ce 4435def UpdateUIEvent_SetMode(*args, **kwargs):
196addbf 4436 """UpdateUIEvent_SetMode(int mode)"""
54f9ee45 4437 return _core_.UpdateUIEvent_SetMode(*args, **kwargs)
d14a1e28 4438
e811c8ce 4439def UpdateUIEvent_GetMode(*args, **kwargs):
196addbf 4440 """UpdateUIEvent_GetMode() -> int"""
54f9ee45 4441 return _core_.UpdateUIEvent_GetMode(*args, **kwargs)
d14a1e28
RD
4442
4443#---------------------------------------------------------------------------
4444
4445class SysColourChangedEvent(Event):
093d3ff1 4446 """Proxy of C++ SysColourChangedEvent class"""
e811c8ce
RD
4447 def __repr__(self):
4448 return "<%s.%s; proxy of C++ wxSysColourChangedEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 4449 def __init__(self, *args, **kwargs):
a95a7133 4450 """__init__(self) -> SysColourChangedEvent"""
54f9ee45 4451 newobj = _core_.new_SysColourChangedEvent(*args, **kwargs)
d14a1e28
RD
4452 self.this = newobj.this
4453 self.thisown = 1
4454 del newobj.thisown
d14a1e28
RD
4455
4456class SysColourChangedEventPtr(SysColourChangedEvent):
4457 def __init__(self, this):
4458 self.this = this
4459 if not hasattr(self,"thisown"): self.thisown = 0
4460 self.__class__ = SysColourChangedEvent
54f9ee45 4461_core_.SysColourChangedEvent_swigregister(SysColourChangedEventPtr)
d14a1e28
RD
4462
4463#---------------------------------------------------------------------------
4464
4465class MouseCaptureChangedEvent(Event):
093d3ff1 4466 """Proxy of C++ MouseCaptureChangedEvent class"""
e811c8ce
RD
4467 def __repr__(self):
4468 return "<%s.%s; proxy of C++ wxMouseCaptureChangedEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 4469 def __init__(self, *args, **kwargs):
a95a7133 4470 """__init__(self, int winid=0, Window gainedCapture=None) -> MouseCaptureChangedEvent"""
54f9ee45 4471 newobj = _core_.new_MouseCaptureChangedEvent(*args, **kwargs)
d14a1e28
RD
4472 self.this = newobj.this
4473 self.thisown = 1
4474 del newobj.thisown
e811c8ce 4475 def GetCapturedWindow(*args, **kwargs):
a95a7133 4476 """GetCapturedWindow(self) -> Window"""
54f9ee45 4477 return _core_.MouseCaptureChangedEvent_GetCapturedWindow(*args, **kwargs)
e811c8ce 4478
d14a1e28
RD
4479
4480class MouseCaptureChangedEventPtr(MouseCaptureChangedEvent):
4481 def __init__(self, this):
4482 self.this = this
4483 if not hasattr(self,"thisown"): self.thisown = 0
4484 self.__class__ = MouseCaptureChangedEvent
54f9ee45 4485_core_.MouseCaptureChangedEvent_swigregister(MouseCaptureChangedEventPtr)
d14a1e28
RD
4486
4487#---------------------------------------------------------------------------
4488
4489class DisplayChangedEvent(Event):
093d3ff1 4490 """Proxy of C++ DisplayChangedEvent class"""
e811c8ce
RD
4491 def __repr__(self):
4492 return "<%s.%s; proxy of C++ wxDisplayChangedEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 4493 def __init__(self, *args, **kwargs):
a95a7133 4494 """__init__(self) -> DisplayChangedEvent"""
54f9ee45 4495 newobj = _core_.new_DisplayChangedEvent(*args, **kwargs)
d14a1e28
RD
4496 self.this = newobj.this
4497 self.thisown = 1
4498 del newobj.thisown
d14a1e28
RD
4499
4500class DisplayChangedEventPtr(DisplayChangedEvent):
4501 def __init__(self, this):
4502 self.this = this
4503 if not hasattr(self,"thisown"): self.thisown = 0
4504 self.__class__ = DisplayChangedEvent
54f9ee45 4505_core_.DisplayChangedEvent_swigregister(DisplayChangedEventPtr)
d14a1e28
RD
4506
4507#---------------------------------------------------------------------------
4508
4509class PaletteChangedEvent(Event):
093d3ff1 4510 """Proxy of C++ PaletteChangedEvent class"""
e811c8ce
RD
4511 def __repr__(self):
4512 return "<%s.%s; proxy of C++ wxPaletteChangedEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 4513 def __init__(self, *args, **kwargs):
a95a7133 4514 """__init__(self, int id=0) -> PaletteChangedEvent"""
54f9ee45 4515 newobj = _core_.new_PaletteChangedEvent(*args, **kwargs)
d14a1e28
RD
4516 self.this = newobj.this
4517 self.thisown = 1
4518 del newobj.thisown
e811c8ce 4519 def SetChangedWindow(*args, **kwargs):
a95a7133 4520 """SetChangedWindow(self, Window win)"""
54f9ee45 4521 return _core_.PaletteChangedEvent_SetChangedWindow(*args, **kwargs)
e811c8ce
RD
4522
4523 def GetChangedWindow(*args, **kwargs):
a95a7133 4524 """GetChangedWindow(self) -> Window"""
54f9ee45 4525 return _core_.PaletteChangedEvent_GetChangedWindow(*args, **kwargs)
e811c8ce 4526
d14a1e28
RD
4527
4528class PaletteChangedEventPtr(PaletteChangedEvent):
4529 def __init__(self, this):
4530 self.this = this
4531 if not hasattr(self,"thisown"): self.thisown = 0
4532 self.__class__ = PaletteChangedEvent
54f9ee45 4533_core_.PaletteChangedEvent_swigregister(PaletteChangedEventPtr)
d14a1e28
RD
4534
4535#---------------------------------------------------------------------------
4536
4537class QueryNewPaletteEvent(Event):
093d3ff1 4538 """Proxy of C++ QueryNewPaletteEvent class"""
e811c8ce
RD
4539 def __repr__(self):
4540 return "<%s.%s; proxy of C++ wxQueryNewPaletteEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 4541 def __init__(self, *args, **kwargs):
a95a7133 4542 """__init__(self, int winid=0) -> QueryNewPaletteEvent"""
54f9ee45 4543 newobj = _core_.new_QueryNewPaletteEvent(*args, **kwargs)
d14a1e28
RD
4544 self.this = newobj.this
4545 self.thisown = 1
4546 del newobj.thisown
e811c8ce 4547 def SetPaletteRealized(*args, **kwargs):
a95a7133 4548 """SetPaletteRealized(self, bool realized)"""
54f9ee45 4549 return _core_.QueryNewPaletteEvent_SetPaletteRealized(*args, **kwargs)
e811c8ce
RD
4550
4551 def GetPaletteRealized(*args, **kwargs):
a95a7133 4552 """GetPaletteRealized(self) -> bool"""
54f9ee45 4553 return _core_.QueryNewPaletteEvent_GetPaletteRealized(*args, **kwargs)
e811c8ce 4554
d14a1e28
RD
4555
4556class QueryNewPaletteEventPtr(QueryNewPaletteEvent):
4557 def __init__(self, this):
4558 self.this = this
4559 if not hasattr(self,"thisown"): self.thisown = 0
4560 self.__class__ = QueryNewPaletteEvent
54f9ee45 4561_core_.QueryNewPaletteEvent_swigregister(QueryNewPaletteEventPtr)
d14a1e28
RD
4562
4563#---------------------------------------------------------------------------
4564
4565class NavigationKeyEvent(Event):
093d3ff1 4566 """Proxy of C++ NavigationKeyEvent class"""
e811c8ce
RD
4567 def __repr__(self):
4568 return "<%s.%s; proxy of C++ wxNavigationKeyEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 4569 def __init__(self, *args, **kwargs):
a95a7133 4570 """__init__(self) -> NavigationKeyEvent"""
54f9ee45 4571 newobj = _core_.new_NavigationKeyEvent(*args, **kwargs)
d14a1e28
RD
4572 self.this = newobj.this
4573 self.thisown = 1
4574 del newobj.thisown
e811c8ce 4575 def GetDirection(*args, **kwargs):
a95a7133 4576 """GetDirection(self) -> bool"""
54f9ee45 4577 return _core_.NavigationKeyEvent_GetDirection(*args, **kwargs)
e811c8ce
RD
4578
4579 def SetDirection(*args, **kwargs):
908b74cd 4580 """SetDirection(self, bool forward)"""
54f9ee45 4581 return _core_.NavigationKeyEvent_SetDirection(*args, **kwargs)
e811c8ce
RD
4582
4583 def IsWindowChange(*args, **kwargs):
a95a7133 4584 """IsWindowChange(self) -> bool"""
54f9ee45 4585 return _core_.NavigationKeyEvent_IsWindowChange(*args, **kwargs)
e811c8ce
RD
4586
4587 def SetWindowChange(*args, **kwargs):
908b74cd 4588 """SetWindowChange(self, bool ischange)"""
54f9ee45 4589 return _core_.NavigationKeyEvent_SetWindowChange(*args, **kwargs)
e811c8ce 4590
68350608
RD
4591 def IsFromTab(*args, **kwargs):
4592 """IsFromTab(self) -> bool"""
4593 return _core_.NavigationKeyEvent_IsFromTab(*args, **kwargs)
4594
4595 def SetFromTab(*args, **kwargs):
4596 """SetFromTab(self, bool bIs)"""
4597 return _core_.NavigationKeyEvent_SetFromTab(*args, **kwargs)
4598
908b74cd
RD
4599 def SetFlags(*args, **kwargs):
4600 """SetFlags(self, long flags)"""
4601 return _core_.NavigationKeyEvent_SetFlags(*args, **kwargs)
4602
e811c8ce 4603 def GetCurrentFocus(*args, **kwargs):
a95a7133 4604 """GetCurrentFocus(self) -> Window"""
54f9ee45 4605 return _core_.NavigationKeyEvent_GetCurrentFocus(*args, **kwargs)
e811c8ce
RD
4606
4607 def SetCurrentFocus(*args, **kwargs):
a95a7133 4608 """SetCurrentFocus(self, Window win)"""
54f9ee45 4609 return _core_.NavigationKeyEvent_SetCurrentFocus(*args, **kwargs)
e811c8ce 4610
b0f7404b 4611 IsBackward = _core_.NavigationKeyEvent_IsBackward
908b74cd
RD
4612 IsForward = _core_.NavigationKeyEvent_IsForward
4613 WinChange = _core_.NavigationKeyEvent_WinChange
68350608 4614 FromTab = _core_.NavigationKeyEvent_FromTab
d14a1e28
RD
4615
4616class NavigationKeyEventPtr(NavigationKeyEvent):
4617 def __init__(self, this):
4618 self.this = this
4619 if not hasattr(self,"thisown"): self.thisown = 0
4620 self.__class__ = NavigationKeyEvent
54f9ee45 4621_core_.NavigationKeyEvent_swigregister(NavigationKeyEventPtr)
d14a1e28
RD
4622
4623#---------------------------------------------------------------------------
4624
4625class WindowCreateEvent(CommandEvent):
093d3ff1 4626 """Proxy of C++ WindowCreateEvent class"""
e811c8ce
RD
4627 def __repr__(self):
4628 return "<%s.%s; proxy of C++ wxWindowCreateEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 4629 def __init__(self, *args, **kwargs):
a95a7133 4630 """__init__(self, Window win=None) -> WindowCreateEvent"""
54f9ee45 4631 newobj = _core_.new_WindowCreateEvent(*args, **kwargs)
d14a1e28
RD
4632 self.this = newobj.this
4633 self.thisown = 1
4634 del newobj.thisown
e811c8ce 4635 def GetWindow(*args, **kwargs):
a95a7133 4636 """GetWindow(self) -> Window"""
54f9ee45 4637 return _core_.WindowCreateEvent_GetWindow(*args, **kwargs)
e811c8ce 4638
d14a1e28
RD
4639
4640class WindowCreateEventPtr(WindowCreateEvent):
4641 def __init__(self, this):
4642 self.this = this
4643 if not hasattr(self,"thisown"): self.thisown = 0
4644 self.__class__ = WindowCreateEvent
54f9ee45 4645_core_.WindowCreateEvent_swigregister(WindowCreateEventPtr)
d14a1e28
RD
4646
4647class WindowDestroyEvent(CommandEvent):
093d3ff1 4648 """Proxy of C++ WindowDestroyEvent class"""
e811c8ce
RD
4649 def __repr__(self):
4650 return "<%s.%s; proxy of C++ wxWindowDestroyEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 4651 def __init__(self, *args, **kwargs):
a95a7133 4652 """__init__(self, Window win=None) -> WindowDestroyEvent"""
54f9ee45 4653 newobj = _core_.new_WindowDestroyEvent(*args, **kwargs)
d14a1e28
RD
4654 self.this = newobj.this
4655 self.thisown = 1
4656 del newobj.thisown
e811c8ce 4657 def GetWindow(*args, **kwargs):
a95a7133 4658 """GetWindow(self) -> Window"""
54f9ee45 4659 return _core_.WindowDestroyEvent_GetWindow(*args, **kwargs)
e811c8ce 4660
d14a1e28
RD
4661
4662class WindowDestroyEventPtr(WindowDestroyEvent):
4663 def __init__(self, this):
4664 self.this = this
4665 if not hasattr(self,"thisown"): self.thisown = 0
4666 self.__class__ = WindowDestroyEvent
54f9ee45 4667_core_.WindowDestroyEvent_swigregister(WindowDestroyEventPtr)
d14a1e28
RD
4668
4669#---------------------------------------------------------------------------
4670
4671class ContextMenuEvent(CommandEvent):
093d3ff1 4672 """Proxy of C++ ContextMenuEvent class"""
e811c8ce
RD
4673 def __repr__(self):
4674 return "<%s.%s; proxy of C++ wxContextMenuEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 4675 def __init__(self, *args, **kwargs):
a95a7133 4676 """__init__(self, wxEventType type=wxEVT_NULL, int winid=0, Point pt=DefaultPosition) -> ContextMenuEvent"""
54f9ee45 4677 newobj = _core_.new_ContextMenuEvent(*args, **kwargs)
d14a1e28
RD
4678 self.this = newobj.this
4679 self.thisown = 1
4680 del newobj.thisown
e811c8ce 4681 def GetPosition(*args, **kwargs):
a95a7133 4682 """GetPosition(self) -> Point"""
54f9ee45 4683 return _core_.ContextMenuEvent_GetPosition(*args, **kwargs)
e811c8ce
RD
4684
4685 def SetPosition(*args, **kwargs):
a95a7133 4686 """SetPosition(self, Point pos)"""
54f9ee45 4687 return _core_.ContextMenuEvent_SetPosition(*args, **kwargs)
e811c8ce 4688
d14a1e28
RD
4689
4690class ContextMenuEventPtr(ContextMenuEvent):
4691 def __init__(self, this):
4692 self.this = this
4693 if not hasattr(self,"thisown"): self.thisown = 0
4694 self.__class__ = ContextMenuEvent
54f9ee45 4695_core_.ContextMenuEvent_swigregister(ContextMenuEventPtr)
d14a1e28
RD
4696
4697#---------------------------------------------------------------------------
4698
54f9ee45
RD
4699IDLE_PROCESS_ALL = _core_.IDLE_PROCESS_ALL
4700IDLE_PROCESS_SPECIFIED = _core_.IDLE_PROCESS_SPECIFIED
d14a1e28 4701class IdleEvent(Event):
093d3ff1 4702 """Proxy of C++ IdleEvent class"""
e811c8ce
RD
4703 def __repr__(self):
4704 return "<%s.%s; proxy of C++ wxIdleEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 4705 def __init__(self, *args, **kwargs):
a95a7133 4706 """__init__(self) -> IdleEvent"""
54f9ee45 4707 newobj = _core_.new_IdleEvent(*args, **kwargs)
d14a1e28
RD
4708 self.this = newobj.this
4709 self.thisown = 1
4710 del newobj.thisown
e811c8ce 4711 def RequestMore(*args, **kwargs):
a95a7133 4712 """RequestMore(self, bool needMore=True)"""
54f9ee45 4713 return _core_.IdleEvent_RequestMore(*args, **kwargs)
e811c8ce
RD
4714
4715 def MoreRequested(*args, **kwargs):
a95a7133 4716 """MoreRequested(self) -> bool"""
54f9ee45 4717 return _core_.IdleEvent_MoreRequested(*args, **kwargs)
e811c8ce
RD
4718
4719 def SetMode(*args, **kwargs):
66c033b4 4720 """SetMode(int mode)"""
54f9ee45 4721 return _core_.IdleEvent_SetMode(*args, **kwargs)
e811c8ce
RD
4722
4723 SetMode = staticmethod(SetMode)
4724 def GetMode(*args, **kwargs):
66c033b4 4725 """GetMode() -> int"""
54f9ee45 4726 return _core_.IdleEvent_GetMode(*args, **kwargs)
e811c8ce
RD
4727
4728 GetMode = staticmethod(GetMode)
4729 def CanSend(*args, **kwargs):
66c033b4 4730 """CanSend(Window win) -> bool"""
54f9ee45 4731 return _core_.IdleEvent_CanSend(*args, **kwargs)
e811c8ce
RD
4732
4733 CanSend = staticmethod(CanSend)
d14a1e28
RD
4734
4735class IdleEventPtr(IdleEvent):
4736 def __init__(self, this):
4737 self.this = this
4738 if not hasattr(self,"thisown"): self.thisown = 0
4739 self.__class__ = IdleEvent
54f9ee45 4740_core_.IdleEvent_swigregister(IdleEventPtr)
d14a1e28 4741
e811c8ce 4742def IdleEvent_SetMode(*args, **kwargs):
196addbf 4743 """IdleEvent_SetMode(int mode)"""
54f9ee45 4744 return _core_.IdleEvent_SetMode(*args, **kwargs)
d14a1e28 4745
e811c8ce 4746def IdleEvent_GetMode(*args, **kwargs):
196addbf 4747 """IdleEvent_GetMode() -> int"""
54f9ee45 4748 return _core_.IdleEvent_GetMode(*args, **kwargs)
d14a1e28 4749
e811c8ce
RD
4750def IdleEvent_CanSend(*args, **kwargs):
4751 """IdleEvent_CanSend(Window win) -> bool"""
54f9ee45 4752 return _core_.IdleEvent_CanSend(*args, **kwargs)
d14a1e28
RD
4753
4754#---------------------------------------------------------------------------
4755
4756class PyEvent(Event):
093d3ff1 4757 """Proxy of C++ PyEvent class"""
e811c8ce
RD
4758 def __repr__(self):
4759 return "<%s.%s; proxy of C++ wxPyEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 4760 def __init__(self, *args, **kwargs):
a95a7133 4761 """__init__(self, int winid=0, wxEventType commandType=wxEVT_NULL) -> PyEvent"""
54f9ee45 4762 newobj = _core_.new_PyEvent(*args, **kwargs)
d14a1e28
RD
4763 self.this = newobj.this
4764 self.thisown = 1
4765 del newobj.thisown
4766 self.SetSelf(self)
e811c8ce 4767
54f9ee45 4768 def __del__(self, destroy=_core_.delete_PyEvent):
a95a7133 4769 """__del__(self)"""
d14a1e28
RD
4770 try:
4771 if self.thisown: destroy(self)
4772 except: pass
e811c8ce
RD
4773
4774 def SetSelf(*args, **kwargs):
a95a7133 4775 """SetSelf(self, PyObject self)"""
54f9ee45 4776 return _core_.PyEvent_SetSelf(*args, **kwargs)
e811c8ce
RD
4777
4778 def GetSelf(*args, **kwargs):
a95a7133 4779 """GetSelf(self) -> PyObject"""
54f9ee45 4780 return _core_.PyEvent_GetSelf(*args, **kwargs)
e811c8ce 4781
d14a1e28
RD
4782
4783class PyEventPtr(PyEvent):
4784 def __init__(self, this):
4785 self.this = this
4786 if not hasattr(self,"thisown"): self.thisown = 0
4787 self.__class__ = PyEvent
54f9ee45 4788_core_.PyEvent_swigregister(PyEventPtr)
d14a1e28
RD
4789
4790class PyCommandEvent(CommandEvent):
093d3ff1 4791 """Proxy of C++ PyCommandEvent class"""
e811c8ce
RD
4792 def __repr__(self):
4793 return "<%s.%s; proxy of C++ wxPyCommandEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 4794 def __init__(self, *args, **kwargs):
a95a7133 4795 """__init__(self, wxEventType commandType=wxEVT_NULL, int id=0) -> PyCommandEvent"""
54f9ee45 4796 newobj = _core_.new_PyCommandEvent(*args, **kwargs)
d14a1e28
RD
4797 self.this = newobj.this
4798 self.thisown = 1
4799 del newobj.thisown
4800 self.SetSelf(self)
e811c8ce 4801
54f9ee45 4802 def __del__(self, destroy=_core_.delete_PyCommandEvent):
a95a7133 4803 """__del__(self)"""
d14a1e28
RD
4804 try:
4805 if self.thisown: destroy(self)
4806 except: pass
e811c8ce
RD
4807
4808 def SetSelf(*args, **kwargs):
a95a7133 4809 """SetSelf(self, PyObject self)"""
54f9ee45 4810 return _core_.PyCommandEvent_SetSelf(*args, **kwargs)
e811c8ce
RD
4811
4812 def GetSelf(*args, **kwargs):
a95a7133 4813 """GetSelf(self) -> PyObject"""
54f9ee45 4814 return _core_.PyCommandEvent_GetSelf(*args, **kwargs)
e811c8ce 4815
d14a1e28
RD
4816
4817class PyCommandEventPtr(PyCommandEvent):
4818 def __init__(self, this):
4819 self.this = this
4820 if not hasattr(self,"thisown"): self.thisown = 0
4821 self.__class__ = PyCommandEvent
54f9ee45 4822_core_.PyCommandEvent_swigregister(PyCommandEventPtr)
d14a1e28 4823
53aa7709
RD
4824class DateEvent(CommandEvent):
4825 """Proxy of C++ DateEvent class"""
4826 def __repr__(self):
4827 return "<%s.%s; proxy of C++ wxDateEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
4828 def __init__(self, *args, **kwargs):
4829 """__init__(self, Window win, DateTime dt, wxEventType type) -> DateEvent"""
4830 newobj = _core_.new_DateEvent(*args, **kwargs)
4831 self.this = newobj.this
4832 self.thisown = 1
4833 del newobj.thisown
4834 def GetDate(*args, **kwargs):
4835 """GetDate(self) -> DateTime"""
4836 return _core_.DateEvent_GetDate(*args, **kwargs)
4837
4838 def SetDate(*args, **kwargs):
4839 """SetDate(self, DateTime date)"""
4840 return _core_.DateEvent_SetDate(*args, **kwargs)
4841
4842
4843class DateEventPtr(DateEvent):
4844 def __init__(self, this):
4845 self.this = this
4846 if not hasattr(self,"thisown"): self.thisown = 0
4847 self.__class__ = DateEvent
4848_core_.DateEvent_swigregister(DateEventPtr)
4849
4850wxEVT_DATE_CHANGED = _core_.wxEVT_DATE_CHANGED
4851EVT_DATE_CHANGED = wx.PyEventBinder( wxEVT_DATE_CHANGED, 1 )
4852
d14a1e28
RD
4853#---------------------------------------------------------------------------
4854
54f9ee45
RD
4855PYAPP_ASSERT_SUPPRESS = _core_.PYAPP_ASSERT_SUPPRESS
4856PYAPP_ASSERT_EXCEPTION = _core_.PYAPP_ASSERT_EXCEPTION
4857PYAPP_ASSERT_DIALOG = _core_.PYAPP_ASSERT_DIALOG
4858PYAPP_ASSERT_LOG = _core_.PYAPP_ASSERT_LOG
4859PRINT_WINDOWS = _core_.PRINT_WINDOWS
4860PRINT_POSTSCRIPT = _core_.PRINT_POSTSCRIPT
d14a1e28 4861class PyApp(EvtHandler):
66c033b4
RD
4862 """
4863 The ``wx.PyApp`` class is an *implementation detail*, please use the
4864 `wx.App` class (or some other derived class) instead.
4865 """
e811c8ce
RD
4866 def __repr__(self):
4867 return "<%s.%s; proxy of C++ wxPyApp instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 4868 def __init__(self, *args, **kwargs):
98e665d3 4869 """
a95a7133 4870 __init__(self) -> PyApp
98e665d3
RD
4871
4872 Create a new application object, starting the bootstrap process.
4873 """
54f9ee45 4874 newobj = _core_.new_PyApp(*args, **kwargs)
d14a1e28
RD
4875 self.this = newobj.this
4876 self.thisown = 1
4877 del newobj.thisown
4878 self._setCallbackInfo(self, PyApp)
4879 self._setOORInfo(self)
e811c8ce 4880
54f9ee45 4881 def __del__(self, destroy=_core_.delete_PyApp):
a95a7133 4882 """__del__(self)"""
d14a1e28
RD
4883 try:
4884 if self.thisown: destroy(self)
4885 except: pass
e811c8ce
RD
4886
4887 def _setCallbackInfo(*args, **kwargs):
a95a7133 4888 """_setCallbackInfo(self, PyObject self, PyObject _class)"""
54f9ee45 4889 return _core_.PyApp__setCallbackInfo(*args, **kwargs)
e811c8ce
RD
4890
4891 def GetAppName(*args, **kwargs):
0df68c9f 4892 """
a95a7133 4893 GetAppName(self) -> String
6c3b4aae 4894
0df68c9f
RD
4895 Get the application name.
4896 """
54f9ee45 4897 return _core_.PyApp_GetAppName(*args, **kwargs)
e811c8ce
RD
4898
4899 def SetAppName(*args, **kwargs):
0df68c9f 4900 """
a95a7133 4901 SetAppName(self, String name)
6c3b4aae 4902
66c033b4
RD
4903 Set the application name. This value may be used automatically by
4904 `wx.Config` and such.
0df68c9f 4905 """
54f9ee45 4906 return _core_.PyApp_SetAppName(*args, **kwargs)
e811c8ce
RD
4907
4908 def GetClassName(*args, **kwargs):
0df68c9f 4909 """
a95a7133 4910 GetClassName(self) -> String
e811c8ce 4911
0df68c9f
RD
4912 Get the application's class name.
4913 """
54f9ee45 4914 return _core_.PyApp_GetClassName(*args, **kwargs)
e811c8ce
RD
4915
4916 def SetClassName(*args, **kwargs):
0df68c9f 4917 """
a95a7133 4918 SetClassName(self, String name)
6c3b4aae 4919
66c033b4
RD
4920 Set the application's class name. This value may be used for
4921 X-resources if applicable for the platform
0df68c9f 4922 """
54f9ee45 4923 return _core_.PyApp_SetClassName(*args, **kwargs)
e811c8ce
RD
4924
4925 def GetVendorName(*args, **kwargs):
0df68c9f 4926 """
a95a7133 4927 GetVendorName(self) -> String
6c3b4aae 4928
0df68c9f
RD
4929 Get the application's vendor name.
4930 """
54f9ee45 4931 return _core_.PyApp_GetVendorName(*args, **kwargs)
e811c8ce
RD
4932
4933 def SetVendorName(*args, **kwargs):
0df68c9f 4934 """
a95a7133 4935 SetVendorName(self, String name)
6c3b4aae 4936
66c033b4
RD
4937 Set the application's vendor name. This value may be used
4938 automatically by `wx.Config` and such.
0df68c9f 4939 """
54f9ee45 4940 return _core_.PyApp_SetVendorName(*args, **kwargs)
e811c8ce
RD
4941
4942 def GetTraits(*args, **kwargs):
0df68c9f 4943 """
a95a7133 4944 GetTraits(self) -> wxAppTraits
6c3b4aae 4945
66c033b4
RD
4946 Return (and create if necessary) the app traits object to which we
4947 delegate for everything which either should be configurable by the
4948 user (then he can change the default behaviour simply by overriding
4949 CreateTraits() and returning his own traits object) or which is
4950 GUI/console dependent as then wx.AppTraits allows us to abstract the
4951 differences behind the common facade.
4952
4953 :todo: Add support for overriding CreateAppTraits in wxPython.
0df68c9f 4954 """
54f9ee45 4955 return _core_.PyApp_GetTraits(*args, **kwargs)
e811c8ce
RD
4956
4957 def ProcessPendingEvents(*args, **kwargs):
0df68c9f 4958 """
a95a7133 4959 ProcessPendingEvents(self)
6c3b4aae 4960
66c033b4
RD
4961 Process all events in the Pending Events list -- it is necessary to
4962 call this function to process posted events. This normally happens
4963 during each event loop iteration.
0df68c9f 4964 """
54f9ee45 4965 return _core_.PyApp_ProcessPendingEvents(*args, **kwargs)
e811c8ce
RD
4966
4967 def Yield(*args, **kwargs):
0df68c9f 4968 """
a95a7133 4969 Yield(self, bool onlyIfNeeded=False) -> bool
6c3b4aae 4970
66c033b4
RD
4971 Process all currently pending events right now, instead of waiting
4972 until return to the event loop. It is an error to call ``Yield``
4973 recursively unless the value of ``onlyIfNeeded`` is True.
6c3b4aae 4974
66c033b4 4975 :warning: This function is dangerous as it can lead to unexpected
41e2b43e
RD
4976 reentrancies (i.e. when called from an event handler it may
4977 result in calling the same event handler again), use with
4978 extreme care or, better, don't use at all!
0df68c9f 4979
66c033b4 4980 :see: `wx.Yield`, `wx.YieldIfNeeded`, `wx.SafeYield`
41e2b43e 4981
0df68c9f 4982 """
54f9ee45 4983 return _core_.PyApp_Yield(*args, **kwargs)
e811c8ce
RD
4984
4985 def WakeUpIdle(*args, **kwargs):
0df68c9f 4986 """
a95a7133 4987 WakeUpIdle(self)
6c3b4aae 4988
66c033b4
RD
4989 Make sure that idle events are sent again.
4990 :see: `wx.WakeUpIdle`
0df68c9f 4991 """
54f9ee45 4992 return _core_.PyApp_WakeUpIdle(*args, **kwargs)
e811c8ce 4993
1fc3b23a
RD
4994 def IsMainLoopRunning(*args, **kwargs):
4995 """
4996 IsMainLoopRunning() -> bool
4997
4998 Returns True if we're running the main loop, i.e. if the events can
4999 currently be dispatched.
5000 """
5001 return _core_.PyApp_IsMainLoopRunning(*args, **kwargs)
5002
5003 IsMainLoopRunning = staticmethod(IsMainLoopRunning)
e811c8ce 5004 def MainLoop(*args, **kwargs):
0df68c9f 5005 """
a95a7133 5006 MainLoop(self) -> int
6c3b4aae 5007
66c033b4
RD
5008 Execute the main GUI loop, the function doesn't normally return until
5009 all top level windows have been closed and destroyed.
0df68c9f 5010 """
54f9ee45 5011 return _core_.PyApp_MainLoop(*args, **kwargs)
e811c8ce
RD
5012
5013 def Exit(*args, **kwargs):
0df68c9f 5014 """
a95a7133 5015 Exit(self)
6c3b4aae 5016
0df68c9f 5017 Exit the main loop thus terminating the application.
66c033b4 5018 :see: `wx.Exit`
0df68c9f 5019 """
54f9ee45 5020 return _core_.PyApp_Exit(*args, **kwargs)
e811c8ce
RD
5021
5022 def ExitMainLoop(*args, **kwargs):
0df68c9f 5023 """
a95a7133 5024 ExitMainLoop(self)
6c3b4aae 5025
66c033b4
RD
5026 Exit the main GUI loop during the next iteration of the main
5027 loop, (i.e. it does not stop the program immediately!)
0df68c9f 5028 """
54f9ee45 5029 return _core_.PyApp_ExitMainLoop(*args, **kwargs)
e811c8ce
RD
5030
5031 def Pending(*args, **kwargs):
0df68c9f 5032 """
a95a7133 5033 Pending(self) -> bool
6c3b4aae 5034
0df68c9f
RD
5035 Returns True if there are unprocessed events in the event queue.
5036 """
54f9ee45 5037 return _core_.PyApp_Pending(*args, **kwargs)
e811c8ce
RD
5038
5039 def Dispatch(*args, **kwargs):
0df68c9f 5040 """
a95a7133 5041 Dispatch(self) -> bool
6c3b4aae 5042
0df68c9f
RD
5043 Process the first event in the event queue (blocks until an event
5044 appears if there are none currently)
5045 """
54f9ee45 5046 return _core_.PyApp_Dispatch(*args, **kwargs)
e811c8ce
RD
5047
5048 def ProcessIdle(*args, **kwargs):
0df68c9f 5049 """
a95a7133 5050 ProcessIdle(self) -> bool
6c3b4aae 5051
66c033b4
RD
5052 Called from the MainLoop when the application becomes idle (there are
5053 no pending events) and sends a `wx.IdleEvent` to all interested
5054 parties. Returns True if more idle events are needed, False if not.
0df68c9f 5055 """
54f9ee45 5056 return _core_.PyApp_ProcessIdle(*args, **kwargs)
e811c8ce
RD
5057
5058 def SendIdleEvents(*args, **kwargs):
0df68c9f 5059 """
a95a7133 5060 SendIdleEvents(self, Window win, IdleEvent event) -> bool
e811c8ce 5061
66c033b4
RD
5062 Send idle event to window and all subwindows. Returns True if more
5063 idle time is requested.
0df68c9f 5064 """
54f9ee45 5065 return _core_.PyApp_SendIdleEvents(*args, **kwargs)
e811c8ce
RD
5066
5067 def IsActive(*args, **kwargs):
0df68c9f 5068 """
a95a7133 5069 IsActive(self) -> bool
6c3b4aae 5070
0df68c9f
RD
5071 Return True if our app has focus.
5072 """
54f9ee45 5073 return _core_.PyApp_IsActive(*args, **kwargs)
e811c8ce
RD
5074
5075 def SetTopWindow(*args, **kwargs):
0df68c9f 5076 """
a95a7133 5077 SetTopWindow(self, Window win)
6c3b4aae 5078
66c033b4 5079 Set the *main* top level window
0df68c9f 5080 """
54f9ee45 5081 return _core_.PyApp_SetTopWindow(*args, **kwargs)
e811c8ce
RD
5082
5083 def GetTopWindow(*args, **kwargs):
0df68c9f 5084 """
a95a7133 5085 GetTopWindow(self) -> Window
6c3b4aae 5086
66c033b4
RD
5087 Return the *main* top level window (if it hadn't been set previously
5088 with SetTopWindow(), will return just some top level window and, if
5089 there not any, will return None)
0df68c9f 5090 """
54f9ee45 5091 return _core_.PyApp_GetTopWindow(*args, **kwargs)
e811c8ce
RD
5092
5093 def SetExitOnFrameDelete(*args, **kwargs):
0df68c9f 5094 """
a95a7133 5095 SetExitOnFrameDelete(self, bool flag)
0df68c9f 5096
66c033b4
RD
5097 Control the exit behaviour: by default, the program will exit the main
5098 loop (and so, usually, terminate) when the last top-level program
5099 window is deleted. Beware that if you disable this behaviour (with
5100 SetExitOnFrameDelete(False)), you'll have to call ExitMainLoop()
5101 explicitly from somewhere.
0df68c9f 5102 """
54f9ee45 5103 return _core_.PyApp_SetExitOnFrameDelete(*args, **kwargs)
e811c8ce
RD
5104
5105 def GetExitOnFrameDelete(*args, **kwargs):
0df68c9f 5106 """
a95a7133 5107 GetExitOnFrameDelete(self) -> bool
6c3b4aae 5108
0df68c9f
RD
5109 Get the current exit behaviour setting.
5110 """
54f9ee45 5111 return _core_.PyApp_GetExitOnFrameDelete(*args, **kwargs)
e811c8ce
RD
5112
5113 def SetUseBestVisual(*args, **kwargs):
0df68c9f 5114 """
a95a7133 5115 SetUseBestVisual(self, bool flag)
6c3b4aae 5116
66c033b4
RD
5117 Set whether the app should try to use the best available visual on
5118 systems where more than one is available, (Sun, SGI, XFree86 4, etc.)
0df68c9f 5119 """
54f9ee45 5120 return _core_.PyApp_SetUseBestVisual(*args, **kwargs)
e811c8ce
RD
5121
5122 def GetUseBestVisual(*args, **kwargs):
0df68c9f 5123 """
a95a7133 5124 GetUseBestVisual(self) -> bool
6c3b4aae 5125
0df68c9f
RD
5126 Get current UseBestVisual setting.
5127 """
54f9ee45 5128 return _core_.PyApp_GetUseBestVisual(*args, **kwargs)
e811c8ce
RD
5129
5130 def SetPrintMode(*args, **kwargs):
a95a7133 5131 """SetPrintMode(self, int mode)"""
54f9ee45 5132 return _core_.PyApp_SetPrintMode(*args, **kwargs)
e811c8ce
RD
5133
5134 def GetPrintMode(*args, **kwargs):
a95a7133 5135 """GetPrintMode(self) -> int"""
54f9ee45 5136 return _core_.PyApp_GetPrintMode(*args, **kwargs)
e811c8ce 5137
e811c8ce 5138 def SetAssertMode(*args, **kwargs):
0df68c9f 5139 """
a95a7133 5140 SetAssertMode(self, int mode)
6c3b4aae 5141
41e2b43e 5142 Set the OnAssert behaviour for debug and hybrid builds.
0df68c9f 5143 """
54f9ee45 5144 return _core_.PyApp_SetAssertMode(*args, **kwargs)
e811c8ce 5145
6c3b4aae 5146 def GetAssertMode(*args, **kwargs):
0df68c9f 5147 """
a95a7133 5148 GetAssertMode(self) -> int
6c3b4aae 5149
0df68c9f
RD
5150 Get the current OnAssert behaviour setting.
5151 """
54f9ee45 5152 return _core_.PyApp_GetAssertMode(*args, **kwargs)
6c3b4aae 5153
e811c8ce 5154 def GetMacSupportPCMenuShortcuts(*args, **kwargs):
66c033b4 5155 """GetMacSupportPCMenuShortcuts() -> bool"""
54f9ee45 5156 return _core_.PyApp_GetMacSupportPCMenuShortcuts(*args, **kwargs)
e811c8ce
RD
5157
5158 GetMacSupportPCMenuShortcuts = staticmethod(GetMacSupportPCMenuShortcuts)
5159 def GetMacAboutMenuItemId(*args, **kwargs):
66c033b4 5160 """GetMacAboutMenuItemId() -> long"""
54f9ee45 5161 return _core_.PyApp_GetMacAboutMenuItemId(*args, **kwargs)
e811c8ce
RD
5162
5163 GetMacAboutMenuItemId = staticmethod(GetMacAboutMenuItemId)
5164 def GetMacPreferencesMenuItemId(*args, **kwargs):
66c033b4 5165 """GetMacPreferencesMenuItemId() -> long"""
54f9ee45 5166 return _core_.PyApp_GetMacPreferencesMenuItemId(*args, **kwargs)
e811c8ce
RD
5167
5168 GetMacPreferencesMenuItemId = staticmethod(GetMacPreferencesMenuItemId)
5169 def GetMacExitMenuItemId(*args, **kwargs):
66c033b4 5170 """GetMacExitMenuItemId() -> long"""
54f9ee45 5171 return _core_.PyApp_GetMacExitMenuItemId(*args, **kwargs)
e811c8ce
RD
5172
5173 GetMacExitMenuItemId = staticmethod(GetMacExitMenuItemId)
5174 def GetMacHelpMenuTitleName(*args, **kwargs):
66c033b4 5175 """GetMacHelpMenuTitleName() -> String"""
54f9ee45 5176 return _core_.PyApp_GetMacHelpMenuTitleName(*args, **kwargs)
e811c8ce
RD
5177
5178 GetMacHelpMenuTitleName = staticmethod(GetMacHelpMenuTitleName)
5179 def SetMacSupportPCMenuShortcuts(*args, **kwargs):
66c033b4 5180 """SetMacSupportPCMenuShortcuts(bool val)"""
54f9ee45 5181 return _core_.PyApp_SetMacSupportPCMenuShortcuts(*args, **kwargs)
e811c8ce
RD
5182
5183 SetMacSupportPCMenuShortcuts = staticmethod(SetMacSupportPCMenuShortcuts)
5184 def SetMacAboutMenuItemId(*args, **kwargs):
66c033b4 5185 """SetMacAboutMenuItemId(long val)"""
54f9ee45 5186 return _core_.PyApp_SetMacAboutMenuItemId(*args, **kwargs)
e811c8ce
RD
5187
5188 SetMacAboutMenuItemId = staticmethod(SetMacAboutMenuItemId)
5189 def SetMacPreferencesMenuItemId(*args, **kwargs):
66c033b4 5190 """SetMacPreferencesMenuItemId(long val)"""
54f9ee45 5191 return _core_.PyApp_SetMacPreferencesMenuItemId(*args, **kwargs)
e811c8ce
RD
5192
5193 SetMacPreferencesMenuItemId = staticmethod(SetMacPreferencesMenuItemId)
5194 def SetMacExitMenuItemId(*args, **kwargs):
66c033b4 5195 """SetMacExitMenuItemId(long val)"""
54f9ee45 5196 return _core_.PyApp_SetMacExitMenuItemId(*args, **kwargs)
e811c8ce
RD
5197
5198 SetMacExitMenuItemId = staticmethod(SetMacExitMenuItemId)
5199 def SetMacHelpMenuTitleName(*args, **kwargs):
66c033b4 5200 """SetMacHelpMenuTitleName(String val)"""
54f9ee45 5201 return _core_.PyApp_SetMacHelpMenuTitleName(*args, **kwargs)
e811c8ce
RD
5202
5203 SetMacHelpMenuTitleName = staticmethod(SetMacHelpMenuTitleName)
5204 def _BootstrapApp(*args, **kwargs):
0df68c9f 5205 """
a95a7133 5206 _BootstrapApp(self)
6c3b4aae 5207
0df68c9f
RD
5208 For internal use only
5209 """
54f9ee45 5210 return _core_.PyApp__BootstrapApp(*args, **kwargs)
e811c8ce
RD
5211
5212 def GetComCtl32Version(*args, **kwargs):
0df68c9f 5213 """
66c033b4 5214 GetComCtl32Version() -> int
6c3b4aae 5215
66c033b4
RD
5216 Returns 400, 470, 471, etc. for comctl32.dll 4.00, 4.70, 4.71 or 0 if
5217 it wasn't found at all. Raises an exception on non-Windows platforms.
0df68c9f 5218 """
54f9ee45 5219 return _core_.PyApp_GetComCtl32Version(*args, **kwargs)
e811c8ce
RD
5220
5221 GetComCtl32Version = staticmethod(GetComCtl32Version)
d14a1e28
RD
5222
5223class PyAppPtr(PyApp):
5224 def __init__(self, this):
5225 self.this = this
5226 if not hasattr(self,"thisown"): self.thisown = 0
5227 self.__class__ = PyApp
54f9ee45 5228_core_.PyApp_swigregister(PyAppPtr)
d14a1e28 5229
1fc3b23a
RD
5230def PyApp_IsMainLoopRunning(*args, **kwargs):
5231 """
5232 PyApp_IsMainLoopRunning() -> bool
5233
5234 Returns True if we're running the main loop, i.e. if the events can
5235 currently be dispatched.
5236 """
5237 return _core_.PyApp_IsMainLoopRunning(*args, **kwargs)
5238
e811c8ce
RD
5239def PyApp_GetMacSupportPCMenuShortcuts(*args, **kwargs):
5240 """PyApp_GetMacSupportPCMenuShortcuts() -> bool"""
54f9ee45 5241 return _core_.PyApp_GetMacSupportPCMenuShortcuts(*args, **kwargs)
d14a1e28 5242
e811c8ce
RD
5243def PyApp_GetMacAboutMenuItemId(*args, **kwargs):
5244 """PyApp_GetMacAboutMenuItemId() -> long"""
54f9ee45 5245 return _core_.PyApp_GetMacAboutMenuItemId(*args, **kwargs)
d14a1e28 5246
e811c8ce
RD
5247def PyApp_GetMacPreferencesMenuItemId(*args, **kwargs):
5248 """PyApp_GetMacPreferencesMenuItemId() -> long"""
54f9ee45 5249 return _core_.PyApp_GetMacPreferencesMenuItemId(*args, **kwargs)
d14a1e28 5250
e811c8ce
RD
5251def PyApp_GetMacExitMenuItemId(*args, **kwargs):
5252 """PyApp_GetMacExitMenuItemId() -> long"""
54f9ee45 5253 return _core_.PyApp_GetMacExitMenuItemId(*args, **kwargs)
d14a1e28 5254
e811c8ce 5255def PyApp_GetMacHelpMenuTitleName(*args, **kwargs):
196addbf 5256 """PyApp_GetMacHelpMenuTitleName() -> String"""
54f9ee45 5257 return _core_.PyApp_GetMacHelpMenuTitleName(*args, **kwargs)
d14a1e28 5258
e811c8ce
RD
5259def PyApp_SetMacSupportPCMenuShortcuts(*args, **kwargs):
5260 """PyApp_SetMacSupportPCMenuShortcuts(bool val)"""
54f9ee45 5261 return _core_.PyApp_SetMacSupportPCMenuShortcuts(*args, **kwargs)
d14a1e28 5262
e811c8ce
RD
5263def PyApp_SetMacAboutMenuItemId(*args, **kwargs):
5264 """PyApp_SetMacAboutMenuItemId(long val)"""
54f9ee45 5265 return _core_.PyApp_SetMacAboutMenuItemId(*args, **kwargs)
d14a1e28 5266
e811c8ce
RD
5267def PyApp_SetMacPreferencesMenuItemId(*args, **kwargs):
5268 """PyApp_SetMacPreferencesMenuItemId(long val)"""
54f9ee45 5269 return _core_.PyApp_SetMacPreferencesMenuItemId(*args, **kwargs)
d14a1e28 5270
e811c8ce
RD
5271def PyApp_SetMacExitMenuItemId(*args, **kwargs):
5272 """PyApp_SetMacExitMenuItemId(long val)"""
54f9ee45 5273 return _core_.PyApp_SetMacExitMenuItemId(*args, **kwargs)
d14a1e28 5274
e811c8ce 5275def PyApp_SetMacHelpMenuTitleName(*args, **kwargs):
196addbf 5276 """PyApp_SetMacHelpMenuTitleName(String val)"""
54f9ee45 5277 return _core_.PyApp_SetMacHelpMenuTitleName(*args, **kwargs)
d14a1e28 5278
e811c8ce 5279def PyApp_GetComCtl32Version(*args, **kwargs):
0df68c9f
RD
5280 """
5281 PyApp_GetComCtl32Version() -> int
6c3b4aae 5282
66c033b4
RD
5283 Returns 400, 470, 471, etc. for comctl32.dll 4.00, 4.70, 4.71 or 0 if
5284 it wasn't found at all. Raises an exception on non-Windows platforms.
0df68c9f 5285 """
54f9ee45 5286 return _core_.PyApp_GetComCtl32Version(*args, **kwargs)
d14a1e28
RD
5287
5288#---------------------------------------------------------------------------
5289
5290
e811c8ce 5291def Exit(*args, **kwargs):
0df68c9f
RD
5292 """
5293 Exit()
6c3b4aae 5294
0df68c9f
RD
5295 Force an exit of the application. Convenience for wx.GetApp().Exit()
5296 """
54f9ee45 5297 return _core_.Exit(*args, **kwargs)
d14a1e28 5298
e811c8ce 5299def Yield(*args, **kwargs):
0df68c9f
RD
5300 """
5301 Yield() -> bool
6c3b4aae 5302
0df68c9f
RD
5303 Yield to other apps/messages. Convenience for wx.GetApp().Yield()
5304 """
54f9ee45 5305 return _core_.Yield(*args, **kwargs)
d14a1e28 5306
e811c8ce 5307def YieldIfNeeded(*args, **kwargs):
0df68c9f
RD
5308 """
5309 YieldIfNeeded() -> bool
6c3b4aae 5310
0df68c9f
RD
5311 Yield to other apps/messages. Convenience for wx.GetApp().Yield(True)
5312 """
54f9ee45 5313 return _core_.YieldIfNeeded(*args, **kwargs)
d14a1e28 5314
e811c8ce 5315def SafeYield(*args, **kwargs):
0df68c9f
RD
5316 """
5317 SafeYield(Window win=None, bool onlyIfNeeded=False) -> bool
6c3b4aae 5318
66c033b4
RD
5319 This function is similar to `wx.Yield`, except that it disables the
5320 user input to all program windows before calling `wx.Yield` and
5321 re-enables it again afterwards. If ``win`` is not None, this window
5322 will remain enabled, allowing the implementation of some limited user
5323 interaction.
6c3b4aae 5324
66c033b4 5325 :Returns: the result of the call to `wx.Yield`.
0df68c9f 5326 """
54f9ee45 5327 return _core_.SafeYield(*args, **kwargs)
d14a1e28 5328
e811c8ce 5329def WakeUpIdle(*args, **kwargs):
0df68c9f
RD
5330 """
5331 WakeUpIdle()
6c3b4aae 5332
66c033b4
RD
5333 Cause the message queue to become empty again, so idle events will be
5334 sent.
0df68c9f 5335 """
54f9ee45 5336 return _core_.WakeUpIdle(*args, **kwargs)
d14a1e28 5337
e811c8ce 5338def PostEvent(*args, **kwargs):
0df68c9f
RD
5339 """
5340 PostEvent(EvtHandler dest, Event event)
6c3b4aae 5341
66c033b4
RD
5342 Send an event to a window or other wx.EvtHandler to be processed
5343 later.
0df68c9f 5344 """
54f9ee45 5345 return _core_.PostEvent(*args, **kwargs)
d14a1e28 5346
e811c8ce 5347def App_CleanUp(*args, **kwargs):
0df68c9f
RD
5348 """
5349 App_CleanUp()
6c3b4aae 5350
41e2b43e 5351 For internal use only, it is used to cleanup after wxWidgets when
66c033b4 5352 Python shuts down.
0df68c9f 5353 """
54f9ee45 5354 return _core_.App_CleanUp(*args, **kwargs)
d14a1e28 5355
e811c8ce 5356def GetApp(*args, **kwargs):
0df68c9f
RD
5357 """
5358 GetApp() -> PyApp
6c3b4aae 5359
196addbf 5360 Return a reference to the current wx.App object.
0df68c9f 5361 """
54f9ee45 5362 return _core_.GetApp(*args, **kwargs)
5cbf236d
RD
5363
5364def SetDefaultPyEncoding(*args, **kwargs):
5365 """
5366 SetDefaultPyEncoding(string encoding)
5367
5368 Sets the encoding that wxPython will use when it needs to convert a
5369 Python string or unicode object to or from a wxString.
e505d15e
RD
5370
5371 The default encoding is the value of ``locale.getdefaultlocale()[1]``
5372 but please be aware that the default encoding within the same locale
5373 may be slightly different on different platforms. For example, please
5374 see http://www.alanwood.net/demos/charsetdiffs.html for differences
5375 between the common latin/roman encodings.
5cbf236d
RD
5376 """
5377 return _core_.SetDefaultPyEncoding(*args, **kwargs)
5378
5379def GetDefaultPyEncoding(*args, **kwargs):
5380 """
5381 GetDefaultPyEncoding() -> string
5382
5383 Gets the current encoding that wxPython will use when it needs to
5384 convert a Python string or unicode object to or from a wxString.
5385 """
5386 return _core_.GetDefaultPyEncoding(*args, **kwargs)
d14a1e28
RD
5387#----------------------------------------------------------------------
5388
5389class PyOnDemandOutputWindow:
6c3b4aae
RD
5390 """
5391 A class that can be used for redirecting Python's stdout and
5392 stderr streams. It will do nothing until something is wrriten to
5393 the stream at which point it will create a Frame with a text area
5394 and write the text there.
5395 """
d14a1e28
RD
5396 def __init__(self, title = "wxPython: stdout/stderr"):
5397 self.frame = None
5398 self.title = title
412d302d
RD
5399 self.pos = wx.DefaultPosition
5400 self.size = (450, 300)
d14a1e28
RD
5401 self.parent = None
5402
5403 def SetParent(self, parent):
6c3b4aae 5404 """Set the window to be used as the popup Frame's parent."""
d14a1e28
RD
5405 self.parent = parent
5406
6c3b4aae
RD
5407
5408 def CreateOutputWindow(self, st):
412d302d
RD
5409 self.frame = wx.Frame(self.parent, -1, self.title, self.pos, self.size,
5410 style=wx.DEFAULT_FRAME_STYLE)
196addbf 5411 self.text = wx.TextCtrl(self.frame, -1, "",
412d302d 5412 style=wx.TE_MULTILINE|wx.TE_READONLY)
d1e20054 5413 self.text.AppendText(st)
6c3b4aae
RD
5414 self.frame.Show(True)
5415 EVT_CLOSE(self.frame, self.OnCloseWindow)
5416
d14a1e28 5417
7409c0c6
RD
5418 def OnCloseWindow(self, event):
5419 if self.frame is not None:
5420 self.frame.Destroy()
5421 self.frame = None
5422 self.text = None
5423
5424
d14a1e28 5425 # These methods provide the file-like output behaviour.
6c3b4aae
RD
5426 def write(self, text):
5427 """
5428 Create the output window if needed and write the string to it.
5429 If not called in the context of the gui thread then uses
5430 CallAfter to do the work there.
5431 """
5432 if self.frame is None:
5433 if not wx.Thread_IsMain():
5434 wx.CallAfter(self.CreateOutputWindow, text)
5435 else:
5436 self.CreateOutputWindow(text)
5437 else:
5438 if not wx.Thread_IsMain():
5439 wx.CallAfter(self.text.AppendText, text)
5440 else:
5441 self.text.AppendText(text)
5442
d14a1e28
RD
5443
5444 def close(self):
6c3b4aae
RD
5445 if self.frame is not None:
5446 wx.CallAfter(self.frame.Close)
5447
d14a1e28 5448
19272049
RD
5449 def flush(self):
5450 pass
5451
5452
d14a1e28
RD
5453
5454#----------------------------------------------------------------------
d14a1e28
RD
5455
5456_defRedirect = (wx.Platform == '__WXMSW__' or wx.Platform == '__WXMAC__')
5457
5458class App(wx.PyApp):
6c3b4aae 5459 """
66c033b4
RD
5460 The ``wx.App`` class represents the application and is used to:
5461
5462 * bootstrap the wxPython system and initialize the underlying
5463 gui toolkit
5464 * set and get application-wide properties
5465 * implement the windowing system main message or event loop,
5466 and to dispatch events to window instances
5467 * etc.
5468
5469 Every application must have a ``wx.App`` instance, and all
5470 creation of UI objects should be delayed until after the
03e37cd5
RD
5471 ``wx.App`` object has been created in order to ensure that the gui
5472 platform and wxWidgets have been fully initialized.
66c033b4
RD
5473
5474 Normally you would derive from this class and implement an
5475 ``OnInit`` method that creates a frame and then calls
5476 ``self.SetTopWindow(frame)``.
5477
03e37cd5 5478 :see: `wx.PySimpleApp` for a simpler app class that can be used
1c0f361b 5479 directly.
6c3b4aae 5480 """
66c033b4 5481
d14a1e28
RD
5482 outputWindowClass = PyOnDemandOutputWindow
5483
03e37cd5
RD
5484 def __init__(self, redirect=_defRedirect, filename=None,
5485 useBestVisual=False, clearSigInt=True):
66c033b4
RD
5486 """
5487 Construct a ``wx.App`` object.
5488
03e37cd5
RD
5489 :param redirect: Should ``sys.stdout`` and ``sys.stderr`` be
5490 redirected? Defaults to True on Windows and Mac, False
5491 otherwise. If `filename` is None then output will be
5492 redirected to a window that pops up as needed. (You can
5493 control what kind of window is created for the output by
5494 resetting the class variable ``outputWindowClass`` to a
5495 class of your choosing.)
66c033b4 5496
03e37cd5
RD
5497 :param filename: The name of a file to redirect output to, if
5498 redirect is True.
66c033b4
RD
5499
5500 :param useBestVisual: Should the app try to use the best
03e37cd5
RD
5501 available visual provided by the system (only relevant on
5502 systems that have more than one visual.) This parameter
5503 must be used instead of calling `SetUseBestVisual` later
5504 on because it must be set before the underlying GUI
5505 toolkit is initialized.
5506
5507 :param clearSigInt: Should SIGINT be cleared? This allows the
5508 app to terminate upon a Ctrl-C in the console like other
5509 GUI apps will.
66c033b4
RD
5510
5511 :note: You should override OnInit to do applicaition
5512 initialization to ensure that the system, toolkit and
5513 wxWidgets are fully initialized.
5514 """
d14a1e28
RD
5515 wx.PyApp.__init__(self)
5516
5517 if wx.Platform == "__WXMAC__":
5518 try:
5519 import MacOS
5520 if not MacOS.WMAvailable():
5521 print """\
5522This program needs access to the screen. Please run with 'pythonw',
5523not 'python', and only when you are logged in on the main display of
5524your Mac."""
5525 _sys.exit(1)
36cadbf7
RD
5526 except SystemExit:
5527 raise
d14a1e28
RD
5528 except:
5529 pass
5530
5531 # This has to be done before OnInit
5532 self.SetUseBestVisual(useBestVisual)
5533
5534 # Set the default handler for SIGINT. This fixes a problem
5535 # where if Ctrl-C is pressed in the console that started this
5536 # app then it will not appear to do anything, (not even send
5537 # KeyboardInterrupt???) but will later segfault on exit. By
5538 # setting the default handler then the app will exit, as
5539 # expected (depending on platform.)
03e37cd5
RD
5540 if clearSigInt:
5541 try:
5542 import signal
5543 signal.signal(signal.SIGINT, signal.SIG_DFL)
5544 except:
5545 pass
d14a1e28
RD
5546
5547 # Save and redirect the stdio to a window?
5548 self.stdioWin = None
5549 self.saveStdio = (_sys.stdout, _sys.stderr)
5550 if redirect:
5551 self.RedirectStdio(filename)
5552
8fb0e70a
RD
5553 # Use Python's install prefix as the default
5554 wx.StandardPaths.Get().SetInstallPrefix(_sys.prefix)
5555
d14a1e28
RD
5556 # This finishes the initialization of wxWindows and then calls
5557 # the OnInit that should be present in the derived class
5558 self._BootstrapApp()
5559
5560
5561 def __del__(self):
5562 try:
5563 self.RestoreStdio() # Just in case the MainLoop was overridden
5564 except:
5565 pass
5566
5567
5568 def SetTopWindow(self, frame):
1e0c8722 5569 """Set the \"main\" top level window"""
d14a1e28
RD
5570 if self.stdioWin:
5571 self.stdioWin.SetParent(frame)
5572 wx.PyApp.SetTopWindow(self, frame)
5573
5574
5575 def MainLoop(self):
1e0c8722 5576 """Execute the main GUI event loop"""
d14a1e28
RD
5577 wx.PyApp.MainLoop(self)
5578 self.RestoreStdio()
5579
5580
7409c0c6 5581 def RedirectStdio(self, filename=None):
1e0c8722 5582 """Redirect sys.stdout and sys.stderr to a file or a popup window."""
d14a1e28
RD
5583 if filename:
5584 _sys.stdout = _sys.stderr = open(filename, 'a')
5585 else:
5586 self.stdioWin = self.outputWindowClass()
5587 _sys.stdout = _sys.stderr = self.stdioWin
5588
5589
5590 def RestoreStdio(self):
5591 _sys.stdout, _sys.stderr = self.saveStdio
5592
5593
412d302d
RD
5594 def SetOutputWindowAttributes(self, title=None, pos=None, size=None):
5595 """
5596 Set the title, position and/or size of the output window if
f5b96ee1
RD
5597 the stdio has been redirected. This should be called before
5598 any output would cause the output window to be created.
412d302d
RD
5599 """
5600 if self.stdioWin:
5601 if title is not None:
5602 self.stdioWin.title = title
5603 if pos is not None:
5604 self.stdioWin.pos = pos
5605 if size is not None:
5606 self.stdioWin.size = size
5607
5608
5609
d14a1e28 5610
66c033b4 5611# change from wx.PyApp_XX to wx.App_XX
54f9ee45
RD
5612App_GetMacSupportPCMenuShortcuts = _core_.PyApp_GetMacSupportPCMenuShortcuts
5613App_GetMacAboutMenuItemId = _core_.PyApp_GetMacAboutMenuItemId
5614App_GetMacPreferencesMenuItemId = _core_.PyApp_GetMacPreferencesMenuItemId
5615App_GetMacExitMenuItemId = _core_.PyApp_GetMacExitMenuItemId
5616App_GetMacHelpMenuTitleName = _core_.PyApp_GetMacHelpMenuTitleName
5617App_SetMacSupportPCMenuShortcuts = _core_.PyApp_SetMacSupportPCMenuShortcuts
5618App_SetMacAboutMenuItemId = _core_.PyApp_SetMacAboutMenuItemId
5619App_SetMacPreferencesMenuItemId = _core_.PyApp_SetMacPreferencesMenuItemId
5620App_SetMacExitMenuItemId = _core_.PyApp_SetMacExitMenuItemId
5621App_SetMacHelpMenuTitleName = _core_.PyApp_SetMacHelpMenuTitleName
5622App_GetComCtl32Version = _core_.PyApp_GetComCtl32Version
d14a1e28
RD
5623
5624#----------------------------------------------------------------------------
5625
5626class PySimpleApp(wx.App):
6c3b4aae
RD
5627 """
5628 A simple application class. You can just create one of these and
5629 then then make your top level windows later, and not have to worry
66c033b4
RD
5630 about OnInit. For example::
5631
5632 app = wx.PySimpleApp()
5633 frame = wx.Frame(None, title='Hello World')
5634 frame.Show()
5635 app.MainLoop()
5636
5637 :see: `wx.App`
5638 """
6c3b4aae 5639
03e37cd5
RD
5640 def __init__(self, redirect=False, filename=None,
5641 useBestVisual=False, clearSigInt=True):
66c033b4
RD
5642 """
5643 :see: `wx.App.__init__`
5644 """
03e37cd5 5645 wx.App.__init__(self, redirect, filename, useBestVisual, clearSigInt)
6c3b4aae 5646
d14a1e28 5647 def OnInit(self):
d14a1e28
RD
5648 return True
5649
5650
66c033b4 5651
6c3b4aae 5652# Is anybody using this one?
d14a1e28
RD
5653class PyWidgetTester(wx.App):
5654 def __init__(self, size = (250, 100)):
5655 self.size = size
5656 wx.App.__init__(self, 0)
5657
5658 def OnInit(self):
196addbf 5659 self.frame = wx.Frame(None, -1, "Widget Tester", pos=(0,0), size=self.size)
d14a1e28
RD
5660 self.SetTopWindow(self.frame)
5661 return True
5662
66c033b4
RD
5663 def SetWidget(self, widgetClass, *args, **kwargs):
5664 w = widgetClass(self.frame, *args, **kwargs)
d14a1e28
RD
5665 self.frame.Show(True)
5666
5667#----------------------------------------------------------------------------
5668# DO NOT hold any other references to this object. This is how we
66c033b4 5669# know when to cleanup system resources that wxWidgets is holding. When
d14a1e28 5670# the sys module is unloaded, the refcount on sys.__wxPythonCleanup
66c033b4 5671# goes to zero and it calls the wx.App_CleanUp function.
d14a1e28
RD
5672
5673class __wxPyCleanup:
5674 def __init__(self):
54f9ee45 5675 self.cleanup = _core_.App_CleanUp
d14a1e28
RD
5676 def __del__(self):
5677 self.cleanup()
5678
5679_sys.__wxPythonCleanup = __wxPyCleanup()
5680
5681## # another possible solution, but it gets called too early...
66c033b4
RD
5682## import atexit
5683## atexit.register(_core_.wxApp_CleanUp)
d14a1e28
RD
5684
5685
5686#----------------------------------------------------------------------------
5687
5688#---------------------------------------------------------------------------
2ef75293
RD
5689
5690class EventLoop(object):
093d3ff1 5691 """Proxy of C++ EventLoop class"""
2ef75293
RD
5692 def __repr__(self):
5693 return "<%s.%s; proxy of C++ wxEventLoop instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
5694 def __init__(self, *args, **kwargs):
5695 """__init__(self) -> EventLoop"""
5696 newobj = _core_.new_EventLoop(*args, **kwargs)
5697 self.this = newobj.this
5698 self.thisown = 1
5699 del newobj.thisown
5700 def __del__(self, destroy=_core_.delete_EventLoop):
5701 """__del__(self)"""
5702 try:
5703 if self.thisown: destroy(self)
5704 except: pass
5705
5706 def Run(*args, **kwargs):
5707 """Run(self) -> int"""
5708 return _core_.EventLoop_Run(*args, **kwargs)
5709
5710 def Exit(*args, **kwargs):
5711 """Exit(self, int rc=0)"""
5712 return _core_.EventLoop_Exit(*args, **kwargs)
5713
5714 def Pending(*args, **kwargs):
5715 """Pending(self) -> bool"""
5716 return _core_.EventLoop_Pending(*args, **kwargs)
5717
5718 def Dispatch(*args, **kwargs):
5719 """Dispatch(self) -> bool"""
5720 return _core_.EventLoop_Dispatch(*args, **kwargs)
5721
5722 def IsRunning(*args, **kwargs):
5723 """IsRunning(self) -> bool"""
5724 return _core_.EventLoop_IsRunning(*args, **kwargs)
5725
5726 def GetActive(*args, **kwargs):
5727 """GetActive() -> EventLoop"""
5728 return _core_.EventLoop_GetActive(*args, **kwargs)
5729
5730 GetActive = staticmethod(GetActive)
5731 def SetActive(*args, **kwargs):
5732 """SetActive(EventLoop loop)"""
5733 return _core_.EventLoop_SetActive(*args, **kwargs)
5734
5735 SetActive = staticmethod(SetActive)
5736
5737class EventLoopPtr(EventLoop):
5738 def __init__(self, this):
5739 self.this = this
5740 if not hasattr(self,"thisown"): self.thisown = 0
5741 self.__class__ = EventLoop
5742_core_.EventLoop_swigregister(EventLoopPtr)
5743
5744def EventLoop_GetActive(*args, **kwargs):
5745 """EventLoop_GetActive() -> EventLoop"""
5746 return _core_.EventLoop_GetActive(*args, **kwargs)
5747
5748def EventLoop_SetActive(*args, **kwargs):
5749 """EventLoop_SetActive(EventLoop loop)"""
5750 return _core_.EventLoop_SetActive(*args, **kwargs)
5751
5752#---------------------------------------------------------------------------
d14a1e28 5753
1e0c8722 5754class AcceleratorEntry(object):
66c033b4
RD
5755 """
5756 A class used to define items in an `wx.AcceleratorTable`. wxPython
5757 programs can choose to use wx.AcceleratorEntry objects, but using a
5758 list of 3-tuple of integers (flags, keyCode, cmdID) usually works just
41e2b43e 5759 as well. See `__init__` for of the tuple values.
66c033b4
RD
5760
5761 :see: `wx.AcceleratorTable`
5762 """
1e0c8722
RD
5763 def __repr__(self):
5764 return "<%s.%s; proxy of C++ wxAcceleratorEntry instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
5765 def __init__(self, *args, **kwargs):
66c033b4
RD
5766 """
5767 __init__(self, int flags=0, int keyCode=0, int cmdID=0) -> AcceleratorEntry
5768
5769 Construct a wx.AcceleratorEntry.
66c033b4 5770 """
54f9ee45 5771 newobj = _core_.new_AcceleratorEntry(*args, **kwargs)
1e0c8722
RD
5772 self.this = newobj.this
5773 self.thisown = 1
5774 del newobj.thisown
54f9ee45 5775 def __del__(self, destroy=_core_.delete_AcceleratorEntry):
a95a7133 5776 """__del__(self)"""
1e0c8722
RD
5777 try:
5778 if self.thisown: destroy(self)
5779 except: pass
5780
5781 def Set(*args, **kwargs):
66c033b4
RD
5782 """
5783 Set(self, int flags, int keyCode, int cmd)
1e0c8722 5784
66c033b4
RD
5785 (Re)set the attributes of a wx.AcceleratorEntry.
5786 :see `__init__`
5787 """
5788 return _core_.AcceleratorEntry_Set(*args, **kwargs)
1e0c8722
RD
5789
5790 def GetFlags(*args, **kwargs):
66c033b4
RD
5791 """
5792 GetFlags(self) -> int
5793
5794 Get the AcceleratorEntry's flags.
5795 """
54f9ee45 5796 return _core_.AcceleratorEntry_GetFlags(*args, **kwargs)
1e0c8722
RD
5797
5798 def GetKeyCode(*args, **kwargs):
66c033b4
RD
5799 """
5800 GetKeyCode(self) -> int
5801
5802 Get the AcceleratorEntry's keycode.
5803 """
54f9ee45 5804 return _core_.AcceleratorEntry_GetKeyCode(*args, **kwargs)
1e0c8722
RD
5805
5806 def GetCommand(*args, **kwargs):
66c033b4
RD
5807 """
5808 GetCommand(self) -> int
5809
5810 Get the AcceleratorEntry's command ID.
5811 """
54f9ee45 5812 return _core_.AcceleratorEntry_GetCommand(*args, **kwargs)
1e0c8722
RD
5813
5814
5815class AcceleratorEntryPtr(AcceleratorEntry):
5816 def __init__(self, this):
5817 self.this = this
5818 if not hasattr(self,"thisown"): self.thisown = 0
5819 self.__class__ = AcceleratorEntry
54f9ee45 5820_core_.AcceleratorEntry_swigregister(AcceleratorEntryPtr)
1e0c8722
RD
5821
5822class AcceleratorTable(Object):
66c033b4
RD
5823 """
5824 An accelerator table allows the application to specify a table of
5825 keyboard shortcuts for menus or other commands. On Windows, menu or
5826 button commands are supported; on GTK, only menu commands are
5827 supported.
66c033b4 5828 """
1e0c8722
RD
5829 def __repr__(self):
5830 return "<%s.%s; proxy of C++ wxAcceleratorTable instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
5831 def __init__(self, *args, **kwargs):
0df68c9f
RD
5832 """
5833 __init__(entries) -> AcceleratorTable
1e0c8722 5834
66c033b4
RD
5835 Construct an AcceleratorTable from a list of `wx.AcceleratorEntry`
5836 items or or of 3-tuples (flags, keyCode, cmdID)
5837
5838 :see: `wx.AcceleratorEntry`
0df68c9f 5839 """
54f9ee45 5840 newobj = _core_.new_AcceleratorTable(*args, **kwargs)
1e0c8722
RD
5841 self.this = newobj.this
5842 self.thisown = 1
5843 del newobj.thisown
54f9ee45 5844 def __del__(self, destroy=_core_.delete_AcceleratorTable):
a95a7133 5845 """__del__(self)"""
1e0c8722
RD
5846 try:
5847 if self.thisown: destroy(self)
5848 except: pass
5849
5850 def Ok(*args, **kwargs):
a95a7133 5851 """Ok(self) -> bool"""
54f9ee45 5852 return _core_.AcceleratorTable_Ok(*args, **kwargs)
1e0c8722
RD
5853
5854
5855class AcceleratorTablePtr(AcceleratorTable):
5856 def __init__(self, this):
5857 self.this = this
5858 if not hasattr(self,"thisown"): self.thisown = 0
5859 self.__class__ = AcceleratorTable
54f9ee45 5860_core_.AcceleratorTable_swigregister(AcceleratorTablePtr)
1e0c8722
RD
5861
5862
5863def GetAccelFromString(*args, **kwargs):
196addbf 5864 """GetAccelFromString(String label) -> AcceleratorEntry"""
54f9ee45 5865 return _core_.GetAccelFromString(*args, **kwargs)
1e0c8722
RD
5866#---------------------------------------------------------------------------
5867
74a57fcd
RD
5868class VisualAttributes(object):
5869 """struct containing all the visual attributes of a control"""
5870 def __repr__(self):
5871 return "<%s.%s; proxy of C++ wxVisualAttributes instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
5872 def __init__(self, *args, **kwargs):
5873 """
a95a7133 5874 __init__(self) -> VisualAttributes
74a57fcd
RD
5875
5876 struct containing all the visual attributes of a control
5877 """
54f9ee45 5878 newobj = _core_.new_VisualAttributes(*args, **kwargs)
74a57fcd
RD
5879 self.this = newobj.this
5880 self.thisown = 1
5881 del newobj.thisown
54f9ee45 5882 def __del__(self, destroy=_core_.delete_VisualAttributes):
a95a7133 5883 """__del__(self)"""
74a57fcd
RD
5884 try:
5885 if self.thisown: destroy(self)
5886 except: pass
5887
54f9ee45
RD
5888 font = property(_core_.VisualAttributes_font_get, _core_.VisualAttributes_font_set)
5889 colFg = property(_core_.VisualAttributes_colFg_get, _core_.VisualAttributes_colFg_set)
5890 colBg = property(_core_.VisualAttributes_colBg_get, _core_.VisualAttributes_colBg_set)
74a57fcd
RD
5891
5892class VisualAttributesPtr(VisualAttributes):
5893 def __init__(self, this):
5894 self.this = this
5895 if not hasattr(self,"thisown"): self.thisown = 0
5896 self.__class__ = VisualAttributes
54f9ee45 5897_core_.VisualAttributes_swigregister(VisualAttributesPtr)
74a57fcd
RD
5898NullAcceleratorTable = cvar.NullAcceleratorTable
5899PanelNameStr = cvar.PanelNameStr
5900
54f9ee45
RD
5901WINDOW_VARIANT_NORMAL = _core_.WINDOW_VARIANT_NORMAL
5902WINDOW_VARIANT_SMALL = _core_.WINDOW_VARIANT_SMALL
5903WINDOW_VARIANT_MINI = _core_.WINDOW_VARIANT_MINI
5904WINDOW_VARIANT_LARGE = _core_.WINDOW_VARIANT_LARGE
5905WINDOW_VARIANT_MAX = _core_.WINDOW_VARIANT_MAX
d14a1e28 5906class Window(EvtHandler):
15afbcd0
RD
5907 """
5908 wx.Window is the base class for all windows and represents any visible
5909 object on the screen. All controls, top level windows and so on are
5910 wx.Windows. Sizers and device contexts are not however, as they don't
5911 appear on screen themselves.
5912
5913 """
e811c8ce
RD
5914 def __repr__(self):
5915 return "<%s.%s; proxy of C++ wxWindow instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 5916 def __init__(self, *args, **kwargs):
0df68c9f 5917 """
a95a7133 5918 __init__(self, Window parent, int id=-1, Point pos=DefaultPosition,
74a57fcd 5919 Size size=DefaultSize, long style=0, String name=PanelNameStr) -> Window
15afbcd0
RD
5920
5921 Construct and show a generic Window.
0df68c9f 5922 """
54f9ee45 5923 newobj = _core_.new_Window(*args, **kwargs)
d14a1e28
RD
5924 self.this = newobj.this
5925 self.thisown = 1
5926 del newobj.thisown
5927 self._setOORInfo(self)
d14a1e28 5928
e811c8ce 5929 def Create(*args, **kwargs):
0df68c9f 5930 """
a95a7133 5931 Create(self, Window parent, int id=-1, Point pos=DefaultPosition,
74a57fcd 5932 Size size=DefaultSize, long style=0, String name=PanelNameStr) -> bool
15afbcd0
RD
5933
5934 Create the GUI part of the Window for 2-phase creation mode.
0df68c9f 5935 """
54f9ee45 5936 return _core_.Window_Create(*args, **kwargs)
d14a1e28 5937
e811c8ce 5938 def Close(*args, **kwargs):
15afbcd0 5939 """
a95a7133 5940 Close(self, bool force=False) -> bool
15afbcd0
RD
5941
5942 This function simply generates a EVT_CLOSE event whose handler usually
5943 tries to close the window. It doesn't close the window itself,
5944 however. If force is False (the default) then the window's close
5945 handler will be allowed to veto the destruction of the window.
15afbcd0 5946 """
54f9ee45 5947 return _core_.Window_Close(*args, **kwargs)
d14a1e28 5948
e811c8ce 5949 def Destroy(*args, **kwargs):
0df68c9f 5950 """
a95a7133 5951 Destroy(self) -> bool
d14a1e28 5952
15afbcd0
RD
5953 Destroys the window safely. Frames and dialogs are not destroyed
5954 immediately when this function is called -- they are added to a list
5955 of windows to be deleted on idle time, when all the window's events
5956 have been processed. This prevents problems with events being sent to
5957 non-existent windows.
5958
5959 Returns True if the window has either been successfully deleted, or it
5960 has been added to the list of windows pending real deletion.
0df68c9f 5961 """
54f9ee45 5962 return _core_.Window_Destroy(*args, **kwargs)
d14a1e28 5963
e811c8ce 5964 def DestroyChildren(*args, **kwargs):
15afbcd0 5965 """
a95a7133 5966 DestroyChildren(self) -> bool
15afbcd0 5967
41e2b43e
RD
5968 Destroys all children of a window. Called automatically by the
5969 destructor.
15afbcd0 5970 """
54f9ee45 5971 return _core_.Window_DestroyChildren(*args, **kwargs)
d14a1e28 5972
e811c8ce 5973 def IsBeingDeleted(*args, **kwargs):
15afbcd0 5974 """
a95a7133 5975 IsBeingDeleted(self) -> bool
15afbcd0
RD
5976
5977 Is the window in the process of being deleted?
5978 """
54f9ee45 5979 return _core_.Window_IsBeingDeleted(*args, **kwargs)
d14a1e28 5980
e811c8ce 5981 def SetTitle(*args, **kwargs):
15afbcd0 5982 """
a95a7133 5983 SetTitle(self, String title)
15afbcd0
RD
5984
5985 Sets the window's title. Applicable only to frames and dialogs.
5986 """
54f9ee45 5987 return _core_.Window_SetTitle(*args, **kwargs)
d14a1e28 5988
e811c8ce 5989 def GetTitle(*args, **kwargs):
15afbcd0 5990 """
a95a7133 5991 GetTitle(self) -> String
15afbcd0
RD
5992
5993 Gets the window's title. Applicable only to frames and dialogs.
5994 """
54f9ee45 5995 return _core_.Window_GetTitle(*args, **kwargs)
d14a1e28 5996
e811c8ce 5997 def SetLabel(*args, **kwargs):
15afbcd0 5998 """
a95a7133 5999 SetLabel(self, String label)
15afbcd0
RD
6000
6001 Set the text which the window shows in its label if applicable.
6002 """
54f9ee45 6003 return _core_.Window_SetLabel(*args, **kwargs)
d14a1e28 6004
e811c8ce 6005 def GetLabel(*args, **kwargs):
15afbcd0 6006 """
a95a7133 6007 GetLabel(self) -> String
15afbcd0 6008
41e2b43e
RD
6009 Generic way of getting a label from any window, for identification
6010 purposes. The interpretation of this function differs from class to
6011 class. For frames and dialogs, the value returned is the title. For
6012 buttons or static text controls, it is the button text. This function
6013 can be useful for meta-programs such as testing tools or special-needs
6014 access programs)which need to identify windows by name.
15afbcd0 6015 """
54f9ee45 6016 return _core_.Window_GetLabel(*args, **kwargs)
d14a1e28 6017
e811c8ce 6018 def SetName(*args, **kwargs):
15afbcd0 6019 """
a95a7133 6020 SetName(self, String name)
15afbcd0 6021
41e2b43e
RD
6022 Sets the window's name. The window name is used for ressource setting
6023 in X, it is not the same as the window title/label
15afbcd0 6024 """
54f9ee45 6025 return _core_.Window_SetName(*args, **kwargs)
d14a1e28 6026
e811c8ce 6027 def GetName(*args, **kwargs):
15afbcd0 6028 """
a95a7133 6029 GetName(self) -> String
15afbcd0 6030
41e2b43e
RD
6031 Returns the windows name. This name is not guaranteed to be unique;
6032 it is up to the programmer to supply an appropriate name in the window
6033 constructor or via wx.Window.SetName.
15afbcd0 6034 """
54f9ee45 6035 return _core_.Window_GetName(*args, **kwargs)
d14a1e28 6036
4276dc52
RD
6037 def SetWindowVariant(*args, **kwargs):
6038 """
a95a7133 6039 SetWindowVariant(self, int variant)
4276dc52 6040
41e2b43e
RD
6041 Sets the variant of the window/font size to use for this window, if
6042 the platform supports variants, for example, wxMac.
4276dc52 6043 """
54f9ee45 6044 return _core_.Window_SetWindowVariant(*args, **kwargs)
4276dc52
RD
6045
6046 def GetWindowVariant(*args, **kwargs):
a95a7133 6047 """GetWindowVariant(self) -> int"""
54f9ee45 6048 return _core_.Window_GetWindowVariant(*args, **kwargs)
4276dc52 6049
e811c8ce 6050 def SetId(*args, **kwargs):
15afbcd0 6051 """
a95a7133 6052 SetId(self, int winid)
15afbcd0
RD
6053
6054 Sets the identifier of the window. Each window has an integer
6055 identifier. If the application has not provided one, an identifier
6056 will be generated. Normally, the identifier should be provided on
6057 creation and should not be modified subsequently.
6058 """
54f9ee45 6059 return _core_.Window_SetId(*args, **kwargs)
d14a1e28 6060
e811c8ce 6061 def GetId(*args, **kwargs):
15afbcd0 6062 """
a95a7133 6063 GetId(self) -> int
15afbcd0
RD
6064
6065 Returns the identifier of the window. Each window has an integer
6066 identifier. If the application has not provided one (or the default Id
6067 -1 is used) then an unique identifier with a negative value will be
6068 generated.
6069 """
54f9ee45 6070 return _core_.Window_GetId(*args, **kwargs)
d14a1e28 6071
e811c8ce 6072 def NewControlId(*args, **kwargs):
15afbcd0 6073 """
66c033b4 6074 NewControlId() -> int
15afbcd0
RD
6075
6076 Generate a control id for the controls which were not given one.
6077 """
54f9ee45 6078 return _core_.Window_NewControlId(*args, **kwargs)
d14a1e28 6079
e811c8ce
RD
6080 NewControlId = staticmethod(NewControlId)
6081 def NextControlId(*args, **kwargs):
15afbcd0 6082 """
66c033b4 6083 NextControlId(int winid) -> int
15afbcd0
RD
6084
6085 Get the id of the control following the one with the given
41e2b43e 6086 autogenerated) id
15afbcd0 6087 """
54f9ee45 6088 return _core_.Window_NextControlId(*args, **kwargs)
d14a1e28 6089
e811c8ce
RD
6090 NextControlId = staticmethod(NextControlId)
6091 def PrevControlId(*args, **kwargs):
15afbcd0 6092 """
66c033b4 6093 PrevControlId(int winid) -> int
15afbcd0
RD
6094
6095 Get the id of the control preceding the one with the given
41e2b43e 6096 autogenerated) id
15afbcd0 6097 """
54f9ee45 6098 return _core_.Window_PrevControlId(*args, **kwargs)
d14a1e28 6099
e811c8ce
RD
6100 PrevControlId = staticmethod(PrevControlId)
6101 def SetSize(*args, **kwargs):
15afbcd0 6102 """
a95a7133 6103 SetSize(self, Size size)
15afbcd0
RD
6104
6105 Sets the size of the window in pixels.
6106 """
54f9ee45 6107 return _core_.Window_SetSize(*args, **kwargs)
d14a1e28 6108
e811c8ce 6109 def SetDimensions(*args, **kwargs):
15afbcd0 6110 """
a95a7133 6111 SetDimensions(self, int x, int y, int width, int height, int sizeFlags=SIZE_AUTO)
15afbcd0
RD
6112
6113 Sets the position and size of the window in pixels. The sizeFlags
6114 parameter indicates the interpretation of the other params if they are
e505d15e
RD
6115 equal to -1.
6116
6117 ======================== ======================================
6118 wx.SIZE_AUTO A -1 indicates that a class-specific
6119 default should be used.
6120 wx.SIZE_USE_EXISTING Axisting dimensions should be used if
6121 -1 values are supplied.
6122 wxSIZE_ALLOW_MINUS_ONE Allow dimensions of -1 and less to be
6123 interpreted as real dimensions, not
6124 default values.
6125 ======================== ======================================
6126
15afbcd0 6127 """
54f9ee45 6128 return _core_.Window_SetDimensions(*args, **kwargs)
d14a1e28 6129
e811c8ce 6130 def SetRect(*args, **kwargs):
15afbcd0 6131 """
a95a7133 6132 SetRect(self, Rect rect, int sizeFlags=SIZE_AUTO)
15afbcd0
RD
6133
6134 Sets the position and size of the window in pixels using a wx.Rect.
6135 """
54f9ee45 6136 return _core_.Window_SetRect(*args, **kwargs)
d14a1e28 6137
e811c8ce 6138 def SetSizeWH(*args, **kwargs):
15afbcd0 6139 """
a95a7133 6140 SetSizeWH(self, int width, int height)
15afbcd0
RD
6141
6142 Sets the size of the window in pixels.
6143 """
54f9ee45 6144 return _core_.Window_SetSizeWH(*args, **kwargs)
d14a1e28 6145
e811c8ce 6146 def Move(*args, **kwargs):
15afbcd0 6147 """
a95a7133 6148 Move(self, Point pt, int flags=SIZE_USE_EXISTING)
15afbcd0
RD
6149
6150 Moves the window to the given position.
6151 """
54f9ee45 6152 return _core_.Window_Move(*args, **kwargs)
d14a1e28 6153
e811c8ce
RD
6154 SetPosition = Move
6155 def MoveXY(*args, **kwargs):
15afbcd0 6156 """
a95a7133 6157 MoveXY(self, int x, int y, int flags=SIZE_USE_EXISTING)
15afbcd0
RD
6158
6159 Moves the window to the given position.
6160 """
54f9ee45 6161 return _core_.Window_MoveXY(*args, **kwargs)
e811c8ce 6162
f8167d6e
RD
6163 def SetBestFittingSize(*args, **kwargs):
6164 """
6165 SetBestFittingSize(self, Size size=DefaultSize)
6166
6167 A 'Smart' SetSize that will fill in default size components with the
6168 window's *best size* values. Also set's the minsize for use with sizers.
6169 """
6170 return _core_.Window_SetBestFittingSize(*args, **kwargs)
6171
e811c8ce 6172 def Raise(*args, **kwargs):
15afbcd0 6173 """
a95a7133 6174 Raise(self)
15afbcd0
RD
6175
6176 Raises the window to the top of the window hierarchy if it is a
6177 managed window (dialog or frame).
6178 """
54f9ee45 6179 return _core_.Window_Raise(*args, **kwargs)
e811c8ce
RD
6180
6181 def Lower(*args, **kwargs):
15afbcd0 6182 """
a95a7133 6183 Lower(self)
15afbcd0
RD
6184
6185 Lowers the window to the bottom of the window hierarchy if it is a
6186 managed window (dialog or frame).
6187 """
54f9ee45 6188 return _core_.Window_Lower(*args, **kwargs)
e811c8ce
RD
6189
6190 def SetClientSize(*args, **kwargs):
15afbcd0 6191 """
a95a7133 6192 SetClientSize(self, Size size)
15afbcd0
RD
6193
6194 This sets the size of the window client area in pixels. Using this
6195 function to size a window tends to be more device-independent than
6196 wx.Window.SetSize, since the application need not worry about what
6197 dimensions the border or title bar have when trying to fit the window
6198 around panel items, for example.
6199 """
54f9ee45 6200 return _core_.Window_SetClientSize(*args, **kwargs)
e811c8ce
RD
6201
6202 def SetClientSizeWH(*args, **kwargs):
15afbcd0 6203 """
a95a7133 6204 SetClientSizeWH(self, int width, int height)
15afbcd0
RD
6205
6206 This sets the size of the window client area in pixels. Using this
6207 function to size a window tends to be more device-independent than
6208 wx.Window.SetSize, since the application need not worry about what
6209 dimensions the border or title bar have when trying to fit the window
6210 around panel items, for example.
6211 """
54f9ee45 6212 return _core_.Window_SetClientSizeWH(*args, **kwargs)
e811c8ce
RD
6213
6214 def SetClientRect(*args, **kwargs):
15afbcd0 6215 """
a95a7133 6216 SetClientRect(self, Rect rect)
15afbcd0
RD
6217
6218 This sets the size of the window client area in pixels. Using this
6219 function to size a window tends to be more device-independent than
6220 wx.Window.SetSize, since the application need not worry about what
6221 dimensions the border or title bar have when trying to fit the window
6222 around panel items, for example.
6223 """
54f9ee45 6224 return _core_.Window_SetClientRect(*args, **kwargs)
e811c8ce
RD
6225
6226 def GetPosition(*args, **kwargs):
0df68c9f 6227 """
a95a7133 6228 GetPosition(self) -> Point
e811c8ce 6229
0df68c9f
RD
6230 Get the window's position.
6231 """
54f9ee45 6232 return _core_.Window_GetPosition(*args, **kwargs)
e811c8ce
RD
6233
6234 def GetPositionTuple(*args, **kwargs):
0df68c9f
RD
6235 """
6236 GetPositionTuple() -> (x,y)
e811c8ce 6237
0df68c9f
RD
6238 Get the window's position.
6239 """
54f9ee45 6240 return _core_.Window_GetPositionTuple(*args, **kwargs)
e811c8ce
RD
6241
6242 def GetSize(*args, **kwargs):
0df68c9f 6243 """
a95a7133 6244 GetSize(self) -> Size
e811c8ce 6245
0df68c9f
RD
6246 Get the window size.
6247 """
54f9ee45 6248 return _core_.Window_GetSize(*args, **kwargs)
e811c8ce
RD
6249
6250 def GetSizeTuple(*args, **kwargs):
0df68c9f
RD
6251 """
6252 GetSizeTuple() -> (width, height)
e811c8ce 6253
0df68c9f
RD
6254 Get the window size.
6255 """
54f9ee45 6256 return _core_.Window_GetSizeTuple(*args, **kwargs)
e811c8ce
RD
6257
6258 def GetRect(*args, **kwargs):
15afbcd0 6259 """
a95a7133 6260 GetRect(self) -> Rect
15afbcd0
RD
6261
6262 Returns the size and position of the window as a wx.Rect object.
6263 """
54f9ee45 6264 return _core_.Window_GetRect(*args, **kwargs)
e811c8ce
RD
6265
6266 def GetClientSize(*args, **kwargs):
0df68c9f 6267 """
a95a7133 6268 GetClientSize(self) -> Size
e811c8ce 6269
15afbcd0
RD
6270 This gets the size of the window's 'client area' in pixels. The client
6271 area is the area which may be drawn on by the programmer, excluding
6272 title bar, border, scrollbars, etc.
0df68c9f 6273 """
54f9ee45 6274 return _core_.Window_GetClientSize(*args, **kwargs)
e811c8ce
RD
6275
6276 def GetClientSizeTuple(*args, **kwargs):
0df68c9f
RD
6277 """
6278 GetClientSizeTuple() -> (width, height)
e811c8ce 6279
15afbcd0
RD
6280 This gets the size of the window's 'client area' in pixels. The client
6281 area is the area which may be drawn on by the programmer, excluding
6282 title bar, border, scrollbars, etc.
0df68c9f 6283 """
54f9ee45 6284 return _core_.Window_GetClientSizeTuple(*args, **kwargs)
e811c8ce
RD
6285
6286 def GetClientAreaOrigin(*args, **kwargs):
15afbcd0 6287 """
a95a7133 6288 GetClientAreaOrigin(self) -> Point
15afbcd0
RD
6289
6290 Get the origin of the client area of the window relative to the
6291 window's top left corner (the client area may be shifted because of
6292 the borders, scrollbars, other decorations...)
6293 """
54f9ee45 6294 return _core_.Window_GetClientAreaOrigin(*args, **kwargs)
e811c8ce
RD
6295
6296 def GetClientRect(*args, **kwargs):
15afbcd0 6297 """
a95a7133 6298 GetClientRect(self) -> Rect
15afbcd0 6299
61863841 6300 Get the client area position and size as a `wx.Rect` object.
15afbcd0 6301 """
54f9ee45 6302 return _core_.Window_GetClientRect(*args, **kwargs)
e811c8ce
RD
6303
6304 def GetBestSize(*args, **kwargs):
0df68c9f 6305 """
a95a7133 6306 GetBestSize(self) -> Size
e811c8ce 6307
248ed943 6308 This function returns the best acceptable minimal size for the
41e2b43e
RD
6309 window, if applicable. For example, for a static text control, it will
6310 be the minimal size such that the control label is not truncated. For
6311 windows containing subwindows (suzh aswx.Panel), the size returned by
6312 this function will be the same as the size the window would have had
6313 after calling Fit.
0df68c9f 6314 """
54f9ee45 6315 return _core_.Window_GetBestSize(*args, **kwargs)
e811c8ce
RD
6316
6317 def GetBestSizeTuple(*args, **kwargs):
0df68c9f
RD
6318 """
6319 GetBestSizeTuple() -> (width, height)
e811c8ce 6320
248ed943 6321 This function returns the best acceptable minimal size for the
41e2b43e
RD
6322 window, if applicable. For example, for a static text control, it will
6323 be the minimal size such that the control label is not truncated. For
6324 windows containing subwindows (suzh aswx.Panel), the size returned by
6325 this function will be the same as the size the window would have had
6326 after calling Fit.
0df68c9f 6327 """
54f9ee45 6328 return _core_.Window_GetBestSizeTuple(*args, **kwargs)
e811c8ce 6329
dfbb5885
RD
6330 def InvalidateBestSize(*args, **kwargs):
6331 """
6332 InvalidateBestSize(self)
6333
6334 Reset the cached best size value so it will be recalculated the next
6335 time it is needed.
6336 """
6337 return _core_.Window_InvalidateBestSize(*args, **kwargs)
6338
6339 def GetBestFittingSize(*args, **kwargs):
6340 """
6341 GetBestFittingSize(self) -> Size
6342
6343 This function will merge the window's best size into the window's
6344 minimum size, giving priority to the min size components, and returns
6345 the results.
6346
6347 """
6348 return _core_.Window_GetBestFittingSize(*args, **kwargs)
6349
e811c8ce 6350 def GetAdjustedBestSize(*args, **kwargs):
15afbcd0 6351 """
a95a7133 6352 GetAdjustedBestSize(self) -> Size
15afbcd0
RD
6353
6354 This method is similar to GetBestSize, except in one
6355 thing. GetBestSize should return the minimum untruncated size of the
6356 window, while this method will return the largest of BestSize and any
6357 user specified minimum size. ie. it is the minimum size the window
6358 should currently be drawn at, not the minimal size it can possibly
6359 tolerate.
6360 """
54f9ee45 6361 return _core_.Window_GetAdjustedBestSize(*args, **kwargs)
e811c8ce
RD
6362
6363 def Center(*args, **kwargs):
15afbcd0 6364 """
a95a7133 6365 Center(self, int direction=BOTH)
15afbcd0
RD
6366
6367 Centers the window. The parameter specifies the direction for
6368 cetering, and may be wx.HORIZONTAL, wx.VERTICAL or wx.BOTH. It may
6369 also include wx.CENTER_ON_SCREEN flag if you want to center the window
6370 on the entire screen and not on its parent window. If it is a
6371 top-level window and has no parent then it will always be centered
6372 relative to the screen.
6373 """
54f9ee45 6374 return _core_.Window_Center(*args, **kwargs)
e811c8ce
RD
6375
6376 Centre = Center
6377 def CenterOnScreen(*args, **kwargs):
15afbcd0 6378 """
a95a7133 6379 CenterOnScreen(self, int dir=BOTH)
15afbcd0
RD
6380
6381 Center on screen (only works for top level windows)
6382 """
54f9ee45 6383 return _core_.Window_CenterOnScreen(*args, **kwargs)
e811c8ce
RD
6384
6385 CentreOnScreen = CenterOnScreen
6386 def CenterOnParent(*args, **kwargs):
15afbcd0 6387 """
a95a7133 6388 CenterOnParent(self, int dir=BOTH)
15afbcd0
RD
6389
6390 Center with respect to the the parent window
6391 """
54f9ee45 6392 return _core_.Window_CenterOnParent(*args, **kwargs)
e811c8ce
RD
6393
6394 CentreOnParent = CenterOnParent
6395 def Fit(*args, **kwargs):
15afbcd0 6396 """
a95a7133 6397 Fit(self)
15afbcd0
RD
6398
6399 Sizes the window so that it fits around its subwindows. This function
6400 won't do anything if there are no subwindows and will only really work
6401 correctly if sizers are used for the subwindows layout. Also, if the
6402 window has exactly one subwindow it is better (faster and the result
6403 is more precise as Fit adds some margin to account for fuzziness of
6404 its calculations) to call window.SetClientSize(child.GetSize())
6405 instead of calling Fit.
6406 """
54f9ee45 6407 return _core_.Window_Fit(*args, **kwargs)
e811c8ce
RD
6408
6409 def FitInside(*args, **kwargs):
15afbcd0 6410 """
a95a7133 6411 FitInside(self)
15afbcd0
RD
6412
6413 Similar to Fit, but sizes the interior (virtual) size of a
6414 window. Mainly useful with scrolled windows to reset scrollbars after
6415 sizing changes that do not trigger a size event, and/or scrolled
6416 windows without an interior sizer. This function similarly won't do
6417 anything if there are no subwindows.
6418 """
54f9ee45 6419 return _core_.Window_FitInside(*args, **kwargs)
e811c8ce 6420
f16ab95d 6421 def SetSizeHints(*args, **kwargs):
0df68c9f 6422 """
a95a7133 6423 SetSizeHints(self, int minW, int minH, int maxW=-1, int maxH=-1, int incW=-1,
0df68c9f 6424 int incH=-1)
15afbcd0
RD
6425
6426 Allows specification of minimum and maximum window sizes, and window
6427 size increments. If a pair of values is not set (or set to -1), the
6428 default values will be used. If this function is called, the user
908b74cd
RD
6429 will not be able to size the window outside the given bounds (if it is
6430 a top-level window.) Sizers will also inspect the minimum window size
6431 and will use that value if set when calculating layout.
6432
6433 The resizing increments are only significant under Motif or Xt.
0df68c9f 6434 """
f16ab95d 6435 return _core_.Window_SetSizeHints(*args, **kwargs)
e811c8ce 6436
f16ab95d
RD
6437 def SetSizeHintsSz(*args, **kwargs):
6438 """
6439 SetSizeHintsSz(self, Size minSize, Size maxSize=DefaultSize, Size incSize=DefaultSize)
6440
6441 Allows specification of minimum and maximum window sizes, and window
6442 size increments. If a pair of values is not set (or set to -1), the
6443 default values will be used. If this function is called, the user
6444 will not be able to size the window outside the given bounds (if it is
6445 a top-level window.) Sizers will also inspect the minimum window size
6446 and will use that value if set when calculating layout.
6447
6448 The resizing increments are only significant under Motif or Xt.
6449 """
6450 return _core_.Window_SetSizeHintsSz(*args, **kwargs)
6451
6452 def SetVirtualSizeHints(*args, **kwargs):
15afbcd0 6453 """
908b74cd 6454 SetVirtualSizeHints(self, int minW, int minH, int maxW=-1, int maxH=-1)
15afbcd0
RD
6455
6456 Allows specification of minimum and maximum virtual window sizes. If a
6457 pair of values is not set (or set to -1), the default values will be
6458 used. If this function is called, the user will not be able to size
6459 the virtual area of the window outside the given bounds.
6460 """
f16ab95d
RD
6461 return _core_.Window_SetVirtualSizeHints(*args, **kwargs)
6462
6463 def SetVirtualSizeHintsSz(*args, **kwargs):
6464 """
6465 SetVirtualSizeHintsSz(self, Size minSize, Size maxSize=DefaultSize)
6466
6467 Allows specification of minimum and maximum virtual window sizes. If a
6468 pair of values is not set (or set to -1), the default values will be
6469 used. If this function is called, the user will not be able to size
6470 the virtual area of the window outside the given bounds.
6471 """
6472 return _core_.Window_SetVirtualSizeHintsSz(*args, **kwargs)
e811c8ce 6473
908b74cd
RD
6474 def GetMaxSize(*args, **kwargs):
6475 """GetMaxSize(self) -> Size"""
6476 return _core_.Window_GetMaxSize(*args, **kwargs)
6477
6478 def GetMinSize(*args, **kwargs):
6479 """GetMinSize(self) -> Size"""
6480 return _core_.Window_GetMinSize(*args, **kwargs)
6481
6482 def SetMinSize(*args, **kwargs):
6483 """
6484 SetMinSize(self, Size minSize)
6485
6486 A more convenient method than `SetSizeHints` for setting just the
6487 min size.
6488 """
6489 return _core_.Window_SetMinSize(*args, **kwargs)
6490
6491 def SetMaxSize(*args, **kwargs):
6492 """
6493 SetMaxSize(self, Size maxSize)
6494
6495 A more convenient method than `SetSizeHints` for setting just the
6496 max size.
6497 """
6498 return _core_.Window_SetMaxSize(*args, **kwargs)
6499
e811c8ce 6500 def GetMinWidth(*args, **kwargs):
a95a7133 6501 """GetMinWidth(self) -> int"""
54f9ee45 6502 return _core_.Window_GetMinWidth(*args, **kwargs)
e811c8ce
RD
6503
6504 def GetMinHeight(*args, **kwargs):
a95a7133 6505 """GetMinHeight(self) -> int"""
54f9ee45 6506 return _core_.Window_GetMinHeight(*args, **kwargs)
e811c8ce
RD
6507
6508 def GetMaxWidth(*args, **kwargs):
a95a7133 6509 """GetMaxWidth(self) -> int"""
54f9ee45 6510 return _core_.Window_GetMaxWidth(*args, **kwargs)
e811c8ce
RD
6511
6512 def GetMaxHeight(*args, **kwargs):
a95a7133 6513 """GetMaxHeight(self) -> int"""
54f9ee45 6514 return _core_.Window_GetMaxHeight(*args, **kwargs)
e811c8ce 6515
e811c8ce 6516 def SetVirtualSize(*args, **kwargs):
0df68c9f 6517 """
a95a7133 6518 SetVirtualSize(self, Size size)
e811c8ce 6519
15afbcd0
RD
6520 Set the the virtual size of a window in pixels. For most windows this
6521 is just the client area of the window, but for some like scrolled
6522 windows it is more or less independent of the screen window size.
0df68c9f 6523 """
54f9ee45 6524 return _core_.Window_SetVirtualSize(*args, **kwargs)
e811c8ce
RD
6525
6526 def SetVirtualSizeWH(*args, **kwargs):
0df68c9f 6527 """
a95a7133 6528 SetVirtualSizeWH(self, int w, int h)
e811c8ce 6529
15afbcd0
RD
6530 Set the the virtual size of a window in pixels. For most windows this
6531 is just the client area of the window, but for some like scrolled
6532 windows it is more or less independent of the screen window size.
0df68c9f 6533 """
54f9ee45 6534 return _core_.Window_SetVirtualSizeWH(*args, **kwargs)
e811c8ce
RD
6535
6536 def GetVirtualSize(*args, **kwargs):
0df68c9f 6537 """
a95a7133 6538 GetVirtualSize(self) -> Size
e811c8ce 6539
15afbcd0
RD
6540 Get the the virtual size of the window in pixels. For most windows
6541 this is just the client area of the window, but for some like scrolled
6542 windows it is more or less independent of the screen window size.
0df68c9f 6543 """
54f9ee45 6544 return _core_.Window_GetVirtualSize(*args, **kwargs)
e811c8ce
RD
6545
6546 def GetVirtualSizeTuple(*args, **kwargs):
0df68c9f
RD
6547 """
6548 GetVirtualSizeTuple() -> (width, height)
e811c8ce 6549
15afbcd0
RD
6550 Get the the virtual size of the window in pixels. For most windows
6551 this is just the client area of the window, but for some like scrolled
6552 windows it is more or less independent of the screen window size.
0df68c9f 6553 """
54f9ee45 6554 return _core_.Window_GetVirtualSizeTuple(*args, **kwargs)
e811c8ce
RD
6555
6556 def GetBestVirtualSize(*args, **kwargs):
15afbcd0 6557 """
a95a7133 6558 GetBestVirtualSize(self) -> Size
15afbcd0
RD
6559
6560 Return the largest of ClientSize and BestSize (as determined by a
6561 sizer, interior children, or other means)
6562 """
54f9ee45 6563 return _core_.Window_GetBestVirtualSize(*args, **kwargs)
e811c8ce
RD
6564
6565 def Show(*args, **kwargs):
15afbcd0 6566 """
a95a7133 6567 Show(self, bool show=True) -> bool
15afbcd0
RD
6568
6569 Shows or hides the window. You may need to call Raise for a top level
6570 window if you want to bring it to top, although this is not needed if
6571 Show is called immediately after the frame creation. Returns True if
6572 the window has been shown or hidden or False if nothing was done
6573 because it already was in the requested state.
6574 """
54f9ee45 6575 return _core_.Window_Show(*args, **kwargs)
e811c8ce
RD
6576
6577 def Hide(*args, **kwargs):
15afbcd0 6578 """
a95a7133 6579 Hide(self) -> bool
15afbcd0
RD
6580
6581 Equivalent to calling Show(False).
6582 """
54f9ee45 6583 return _core_.Window_Hide(*args, **kwargs)
e811c8ce
RD
6584
6585 def Enable(*args, **kwargs):
15afbcd0 6586 """
a95a7133 6587 Enable(self, bool enable=True) -> bool
15afbcd0
RD
6588
6589 Enable or disable the window for user input. Note that when a parent
6590 window is disabled, all of its children are disabled as well and they
6591 are reenabled again when the parent is. Returns true if the window
6592 has been enabled or disabled, false if nothing was done, i.e. if the
6593 window had already been in the specified state.
6594 """
54f9ee45 6595 return _core_.Window_Enable(*args, **kwargs)
e811c8ce
RD
6596
6597 def Disable(*args, **kwargs):
15afbcd0 6598 """
a95a7133 6599 Disable(self) -> bool
15afbcd0
RD
6600
6601 Disables the window, same as Enable(false).
6602 """
54f9ee45 6603 return _core_.Window_Disable(*args, **kwargs)
e811c8ce
RD
6604
6605 def IsShown(*args, **kwargs):
15afbcd0 6606 """
a95a7133 6607 IsShown(self) -> bool
15afbcd0
RD
6608
6609 Returns true if the window is shown, false if it has been hidden.
6610 """
54f9ee45 6611 return _core_.Window_IsShown(*args, **kwargs)
e811c8ce
RD
6612
6613 def IsEnabled(*args, **kwargs):
15afbcd0 6614 """
a95a7133 6615 IsEnabled(self) -> bool
15afbcd0
RD
6616
6617 Returns true if the window is enabled for input, false otherwise.
6618 """
54f9ee45 6619 return _core_.Window_IsEnabled(*args, **kwargs)
e811c8ce
RD
6620
6621 def SetWindowStyleFlag(*args, **kwargs):
15afbcd0 6622 """
a95a7133 6623 SetWindowStyleFlag(self, long style)
15afbcd0 6624
41e2b43e
RD
6625 Sets the style of the window. Please note that some styles cannot be
6626 changed after the window creation and that Refresh() might need to be
6627 called after changing the others for the change to take place
6628 immediately.
15afbcd0 6629 """
54f9ee45 6630 return _core_.Window_SetWindowStyleFlag(*args, **kwargs)
e811c8ce
RD
6631
6632 def GetWindowStyleFlag(*args, **kwargs):
15afbcd0 6633 """
a95a7133 6634 GetWindowStyleFlag(self) -> long
e811c8ce 6635
15afbcd0
RD
6636 Gets the window style that was passed to the constructor or Create
6637 method.
6638 """
54f9ee45 6639 return _core_.Window_GetWindowStyleFlag(*args, **kwargs)
e811c8ce 6640
15afbcd0 6641 SetWindowStyle = SetWindowStyleFlag; GetWindowStyle = GetWindowStyleFlag
e811c8ce 6642 def HasFlag(*args, **kwargs):
15afbcd0 6643 """
a95a7133 6644 HasFlag(self, int flag) -> bool
15afbcd0
RD
6645
6646 Test if the given style is set for this window.
6647 """
54f9ee45 6648 return _core_.Window_HasFlag(*args, **kwargs)
e811c8ce
RD
6649
6650 def IsRetained(*args, **kwargs):
15afbcd0 6651 """
a95a7133 6652 IsRetained(self) -> bool
15afbcd0
RD
6653
6654 Returns true if the window is retained, false otherwise. Retained
6655 windows are only available on X platforms.
6656 """
54f9ee45 6657 return _core_.Window_IsRetained(*args, **kwargs)
e811c8ce
RD
6658
6659 def SetExtraStyle(*args, **kwargs):
15afbcd0 6660 """
a95a7133 6661 SetExtraStyle(self, long exStyle)
15afbcd0
RD
6662
6663 Sets the extra style bits for the window. Extra styles are the less
6664 often used style bits which can't be set with the constructor or with
6665 SetWindowStyleFlag()
6666 """
54f9ee45 6667 return _core_.Window_SetExtraStyle(*args, **kwargs)
e811c8ce
RD
6668
6669 def GetExtraStyle(*args, **kwargs):
15afbcd0 6670 """
a95a7133 6671 GetExtraStyle(self) -> long
15afbcd0
RD
6672
6673 Returns the extra style bits for the window.
6674 """
54f9ee45 6675 return _core_.Window_GetExtraStyle(*args, **kwargs)
e811c8ce
RD
6676
6677 def MakeModal(*args, **kwargs):
15afbcd0 6678 """
a95a7133 6679 MakeModal(self, bool modal=True)
15afbcd0
RD
6680
6681 Disables all other windows in the application so that the user can
6682 only interact with this window. Passing False will reverse this
6683 effect.
6684 """
54f9ee45 6685 return _core_.Window_MakeModal(*args, **kwargs)
e811c8ce
RD
6686
6687 def SetThemeEnabled(*args, **kwargs):
15afbcd0 6688 """
a95a7133 6689 SetThemeEnabled(self, bool enableTheme)
15afbcd0
RD
6690
6691 This function tells a window if it should use the system's "theme"
6692 code to draw the windows' background instead if its own background
6693 drawing code. This will only have an effect on platforms that support
6694 the notion of themes in user defined windows. One such platform is
6695 GTK+ where windows can have (very colourful) backgrounds defined by a
6696 user's selected theme.
6697
6698 Dialogs, notebook pages and the status bar have this flag set to true
6699 by default so that the default look and feel is simulated best.
6700 """
54f9ee45 6701 return _core_.Window_SetThemeEnabled(*args, **kwargs)
e811c8ce
RD
6702
6703 def GetThemeEnabled(*args, **kwargs):
15afbcd0 6704 """
a95a7133 6705 GetThemeEnabled(self) -> bool
e811c8ce 6706
15afbcd0
RD
6707 Return the themeEnabled flag.
6708 """
54f9ee45 6709 return _core_.Window_GetThemeEnabled(*args, **kwargs)
e811c8ce
RD
6710
6711 def SetFocus(*args, **kwargs):
15afbcd0 6712 """
a95a7133 6713 SetFocus(self)
15afbcd0
RD
6714
6715 Set's the focus to this window, allowing it to receive keyboard input.
6716 """
54f9ee45 6717 return _core_.Window_SetFocus(*args, **kwargs)
e811c8ce
RD
6718
6719 def SetFocusFromKbd(*args, **kwargs):
15afbcd0 6720 """
a95a7133 6721 SetFocusFromKbd(self)
15afbcd0
RD
6722
6723 Set focus to this window as the result of a keyboard action. Normally
6724 only called internally.
6725 """
54f9ee45 6726 return _core_.Window_SetFocusFromKbd(*args, **kwargs)
e811c8ce
RD
6727
6728 def FindFocus(*args, **kwargs):
15afbcd0 6729 """
66c033b4 6730 FindFocus() -> Window
15afbcd0
RD
6731
6732 Returns the window or control that currently has the keyboard focus,
6733 or None.
6734 """
54f9ee45 6735 return _core_.Window_FindFocus(*args, **kwargs)
e811c8ce
RD
6736
6737 FindFocus = staticmethod(FindFocus)
6738 def AcceptsFocus(*args, **kwargs):
15afbcd0 6739 """
a95a7133 6740 AcceptsFocus(self) -> bool
15afbcd0
RD
6741
6742 Can this window have focus?
6743 """
54f9ee45 6744 return _core_.Window_AcceptsFocus(*args, **kwargs)
e811c8ce
RD
6745
6746 def AcceptsFocusFromKeyboard(*args, **kwargs):
15afbcd0 6747 """
a95a7133 6748 AcceptsFocusFromKeyboard(self) -> bool
15afbcd0
RD
6749
6750 Can this window be given focus by keyboard navigation? if not, the
6751 only way to give it focus (provided it accepts it at all) is to click
6752 it.
6753 """
54f9ee45 6754 return _core_.Window_AcceptsFocusFromKeyboard(*args, **kwargs)
e811c8ce
RD
6755
6756 def GetDefaultItem(*args, **kwargs):
15afbcd0 6757 """
a95a7133 6758 GetDefaultItem(self) -> Window
15afbcd0
RD
6759
6760 Get the default child of this parent, i.e. the one which is activated
6761 by pressing <Enter> such as the OK button on a wx.Dialog.
6762 """
54f9ee45 6763 return _core_.Window_GetDefaultItem(*args, **kwargs)
e811c8ce
RD
6764
6765 def SetDefaultItem(*args, **kwargs):
15afbcd0 6766 """
a95a7133 6767 SetDefaultItem(self, Window child) -> Window
15afbcd0
RD
6768
6769 Set this child as default, return the old default.
6770 """
54f9ee45 6771 return _core_.Window_SetDefaultItem(*args, **kwargs)
e811c8ce
RD
6772
6773 def SetTmpDefaultItem(*args, **kwargs):
15afbcd0 6774 """
a95a7133 6775 SetTmpDefaultItem(self, Window win)
15afbcd0
RD
6776
6777 Set this child as temporary default
6778 """
54f9ee45 6779 return _core_.Window_SetTmpDefaultItem(*args, **kwargs)
e811c8ce 6780
908b74cd
RD
6781 def Navigate(*args, **kwargs):
6782 """
6783 Navigate(self, int flags=NavigationKeyEvent.IsForward) -> bool
6784
fd2dc343
RD
6785 Does keyboard navigation from this window to another, by sending a
6786 `wx.NavigationKeyEvent`.
908b74cd
RD
6787 """
6788 return _core_.Window_Navigate(*args, **kwargs)
6789
7f98d120
RD
6790 def MoveAfterInTabOrder(*args, **kwargs):
6791 """
6792 MoveAfterInTabOrder(self, Window win)
6793
6794 Moves this window in the tab navigation order after the specified
6795 sibling window. This means that when the user presses the TAB key on
6796 that other window, the focus switches to this window.
6797
6798 The default tab order is the same as creation order. This function
6799 and `MoveBeforeInTabOrder` allow to change it after creating all the
6800 windows.
6801
6802 """
6803 return _core_.Window_MoveAfterInTabOrder(*args, **kwargs)
6804
6805 def MoveBeforeInTabOrder(*args, **kwargs):
6806 """
6807 MoveBeforeInTabOrder(self, Window win)
6808
6809 Same as `MoveAfterInTabOrder` except that it inserts this window just
6810 before win instead of putting it right after it.
6811 """
6812 return _core_.Window_MoveBeforeInTabOrder(*args, **kwargs)
6813
e811c8ce 6814 def GetChildren(*args, **kwargs):
15afbcd0 6815 """
a95a7133 6816 GetChildren(self) -> PyObject
15afbcd0
RD
6817
6818 Returns a list of the window's children. NOTE: Currently this is a
6819 copy of the child window list maintained by the window, so the return
6820 value of this function is only valid as long as the window's children
6821 do not change.
6822 """
54f9ee45 6823 return _core_.Window_GetChildren(*args, **kwargs)
e811c8ce
RD
6824
6825 def GetParent(*args, **kwargs):
15afbcd0 6826 """
a95a7133 6827 GetParent(self) -> Window
15afbcd0
RD
6828
6829 Returns the parent window of this window, or None if there isn't one.
6830 """
54f9ee45 6831 return _core_.Window_GetParent(*args, **kwargs)
e811c8ce
RD
6832
6833 def GetGrandParent(*args, **kwargs):
15afbcd0 6834 """
a95a7133 6835 GetGrandParent(self) -> Window
15afbcd0 6836
41e2b43e
RD
6837 Returns the parent of the parent of this window, or None if there
6838 isn't one.
15afbcd0 6839 """
54f9ee45 6840 return _core_.Window_GetGrandParent(*args, **kwargs)
e811c8ce
RD
6841
6842 def IsTopLevel(*args, **kwargs):
15afbcd0 6843 """
a95a7133 6844 IsTopLevel(self) -> bool
15afbcd0
RD
6845
6846 Returns true if the given window is a top-level one. Currently all
6847 frames and dialogs are always considered to be top-level windows (even
6848 if they have a parent window).
6849 """
54f9ee45 6850 return _core_.Window_IsTopLevel(*args, **kwargs)
e811c8ce
RD
6851
6852 def Reparent(*args, **kwargs):
15afbcd0 6853 """
a95a7133 6854 Reparent(self, Window newParent) -> bool
15afbcd0
RD
6855
6856 Reparents the window, i.e the window will be removed from its current
6857 parent window (e.g. a non-standard toolbar in a wxFrame) and then
6858 re-inserted into another. Available on Windows and GTK. Returns True
6859 if the parent was changed, False otherwise (error or newParent ==
6860 oldParent)
6861 """
54f9ee45 6862 return _core_.Window_Reparent(*args, **kwargs)
e811c8ce
RD
6863
6864 def AddChild(*args, **kwargs):
15afbcd0 6865 """
a95a7133 6866 AddChild(self, Window child)
15afbcd0
RD
6867
6868 Adds a child window. This is called automatically by window creation
6869 functions so should not be required by the application programmer.
6870 """
54f9ee45 6871 return _core_.Window_AddChild(*args, **kwargs)
e811c8ce
RD
6872
6873 def RemoveChild(*args, **kwargs):
15afbcd0 6874 """
a95a7133 6875 RemoveChild(self, Window child)
15afbcd0
RD
6876
6877 Removes a child window. This is called automatically by window
6878 deletion functions so should not be required by the application
6879 programmer.
6880 """
54f9ee45 6881 return _core_.Window_RemoveChild(*args, **kwargs)
e811c8ce
RD
6882
6883 def FindWindowById(*args, **kwargs):
15afbcd0 6884 """
a95a7133 6885 FindWindowById(self, long winid) -> Window
15afbcd0
RD
6886
6887 Find a chld of this window by window ID
6888 """
54f9ee45 6889 return _core_.Window_FindWindowById(*args, **kwargs)
e811c8ce
RD
6890
6891 def FindWindowByName(*args, **kwargs):
15afbcd0 6892 """
a95a7133 6893 FindWindowByName(self, String name) -> Window
15afbcd0
RD
6894
6895 Find a child of this window by name
6896 """
54f9ee45 6897 return _core_.Window_FindWindowByName(*args, **kwargs)
e811c8ce
RD
6898
6899 def GetEventHandler(*args, **kwargs):
15afbcd0 6900 """
a95a7133 6901 GetEventHandler(self) -> EvtHandler
15afbcd0
RD
6902
6903 Returns the event handler for this window. By default, the window is
6904 its own event handler.
6905 """
54f9ee45 6906 return _core_.Window_GetEventHandler(*args, **kwargs)
e811c8ce
RD
6907
6908 def SetEventHandler(*args, **kwargs):
15afbcd0 6909 """
a95a7133 6910 SetEventHandler(self, EvtHandler handler)
15afbcd0
RD
6911
6912 Sets the event handler for this window. An event handler is an object
6913 that is capable of processing the events sent to a window. By default,
6914 the window is its own event handler, but an application may wish to
6915 substitute another, for example to allow central implementation of
6916 event-handling for a variety of different window classes.
6917
41e2b43e 6918 It is usually better to use `wx.Window.PushEventHandler` since this sets
15afbcd0
RD
6919 up a chain of event handlers, where an event not handled by one event
6920 handler is handed to the next one in the chain.
6921 """
54f9ee45 6922 return _core_.Window_SetEventHandler(*args, **kwargs)
e811c8ce
RD
6923
6924 def PushEventHandler(*args, **kwargs):
15afbcd0 6925 """
a95a7133 6926 PushEventHandler(self, EvtHandler handler)
15afbcd0
RD
6927
6928 Pushes this event handler onto the event handler stack for the window.
6929 An event handler is an object that is capable of processing the events
6930 sent to a window. By default, the window is its own event handler, but
6931 an application may wish to substitute another, for example to allow
6932 central implementation of event-handling for a variety of different
6933 window classes.
6934
6935 wx.Window.PushEventHandler allows an application to set up a chain of
6936 event handlers, where an event not handled by one event handler is
41e2b43e 6937 handed to the next one in the chain. Use `wx.Window.PopEventHandler` to
15afbcd0
RD
6938 remove the event handler.
6939 """
54f9ee45 6940 return _core_.Window_PushEventHandler(*args, **kwargs)
e811c8ce
RD
6941
6942 def PopEventHandler(*args, **kwargs):
15afbcd0 6943 """
a95a7133 6944 PopEventHandler(self, bool deleteHandler=False) -> EvtHandler
15afbcd0
RD
6945
6946 Removes and returns the top-most event handler on the event handler
6947 stack. If deleteHandler is True then the wx.EvtHandler object will be
6948 destroyed after it is popped.
6949 """
54f9ee45 6950 return _core_.Window_PopEventHandler(*args, **kwargs)
e811c8ce
RD
6951
6952 def RemoveEventHandler(*args, **kwargs):
15afbcd0 6953 """
a95a7133 6954 RemoveEventHandler(self, EvtHandler handler) -> bool
15afbcd0 6955
41e2b43e
RD
6956 Find the given handler in the event handler chain and remove (but not
6957 delete) it from the event handler chain, return True if it was found
6958 and False otherwise (this also results in an assert failure so this
6959 function should only be called when the handler is supposed to be
6960 there.)
15afbcd0 6961 """
54f9ee45 6962 return _core_.Window_RemoveEventHandler(*args, **kwargs)
e811c8ce
RD
6963
6964 def SetValidator(*args, **kwargs):
15afbcd0 6965 """
a95a7133 6966 SetValidator(self, Validator validator)
15afbcd0
RD
6967
6968 Deletes the current validator (if any) and sets the window validator,
6969 having called wx.Validator.Clone to create a new validator of this
6970 type.
6971 """
54f9ee45 6972 return _core_.Window_SetValidator(*args, **kwargs)
e811c8ce
RD
6973
6974 def GetValidator(*args, **kwargs):
15afbcd0 6975 """
a95a7133 6976 GetValidator(self) -> Validator
15afbcd0
RD
6977
6978 Returns a pointer to the current validator for the window, or None if
6979 there is none.
6980 """
54f9ee45 6981 return _core_.Window_GetValidator(*args, **kwargs)
e811c8ce 6982
74a57fcd
RD
6983 def Validate(*args, **kwargs):
6984 """
a95a7133 6985 Validate(self) -> bool
74a57fcd
RD
6986
6987 Validates the current values of the child controls using their
41e2b43e
RD
6988 validators. If the window has wx.WS_EX_VALIDATE_RECURSIVELY extra
6989 style flag set, the method will also call Validate() of all child
6990 windows. Returns false if any of the validations failed.
74a57fcd 6991 """
54f9ee45 6992 return _core_.Window_Validate(*args, **kwargs)
74a57fcd
RD
6993
6994 def TransferDataToWindow(*args, **kwargs):
6995 """
a95a7133 6996 TransferDataToWindow(self) -> bool
74a57fcd 6997
41e2b43e
RD
6998 Transfers values to child controls from data areas specified by their
6999 validators. If the window has wx.WS_EX_VALIDATE_RECURSIVELY extra
7000 style flag set, the method will also call TransferDataToWindow() of
7001 all child windows.
74a57fcd 7002 """
54f9ee45 7003 return _core_.Window_TransferDataToWindow(*args, **kwargs)
74a57fcd
RD
7004
7005 def TransferDataFromWindow(*args, **kwargs):
7006 """
a95a7133 7007 TransferDataFromWindow(self) -> bool
74a57fcd 7008
41e2b43e
RD
7009 Transfers values from child controls to data areas specified by their
7010 validators. Returns false if a transfer failed. If the window has
7011 wx.WS_EX_VALIDATE_RECURSIVELY extra style flag set, the method will
7012 also call TransferDataFromWindow() of all child windows.
74a57fcd 7013 """
54f9ee45 7014 return _core_.Window_TransferDataFromWindow(*args, **kwargs)
74a57fcd
RD
7015
7016 def InitDialog(*args, **kwargs):
7017 """
a95a7133 7018 InitDialog(self)
74a57fcd 7019
41e2b43e
RD
7020 Sends an EVT_INIT_DIALOG event, whose handler usually transfers data
7021 to the dialog via validators.
74a57fcd 7022 """
54f9ee45 7023 return _core_.Window_InitDialog(*args, **kwargs)
74a57fcd 7024
e811c8ce 7025 def SetAcceleratorTable(*args, **kwargs):
15afbcd0 7026 """
a95a7133 7027 SetAcceleratorTable(self, AcceleratorTable accel)
15afbcd0
RD
7028
7029 Sets the accelerator table for this window.
7030 """
54f9ee45 7031 return _core_.Window_SetAcceleratorTable(*args, **kwargs)
e811c8ce
RD
7032
7033 def GetAcceleratorTable(*args, **kwargs):
15afbcd0 7034 """
a95a7133 7035 GetAcceleratorTable(self) -> AcceleratorTable
15afbcd0
RD
7036
7037 Gets the accelerator table for this window.
7038 """
54f9ee45 7039 return _core_.Window_GetAcceleratorTable(*args, **kwargs)
e811c8ce
RD
7040
7041 def RegisterHotKey(*args, **kwargs):
15afbcd0 7042 """
a95a7133 7043 RegisterHotKey(self, int hotkeyId, int modifiers, int keycode) -> bool
15afbcd0
RD
7044
7045 Registers a system wide hotkey. Every time the user presses the hotkey
7046 registered here, this window will receive a hotkey event. It will
7047 receive the event even if the application is in the background and
7048 does not have the input focus because the user is working with some
7049 other application. To bind an event handler function to this hotkey
7050 use EVT_HOTKEY with an id equal to hotkeyId. Returns True if the
7051 hotkey was registered successfully.
7052 """
54f9ee45 7053 return _core_.Window_RegisterHotKey(*args, **kwargs)
e811c8ce
RD
7054
7055 def UnregisterHotKey(*args, **kwargs):
15afbcd0 7056 """
a95a7133 7057 UnregisterHotKey(self, int hotkeyId) -> bool
15afbcd0
RD
7058
7059 Unregisters a system wide hotkey.
7060 """
54f9ee45 7061 return _core_.Window_UnregisterHotKey(*args, **kwargs)
e811c8ce
RD
7062
7063 def ConvertDialogPointToPixels(*args, **kwargs):
15afbcd0 7064 """
a95a7133 7065 ConvertDialogPointToPixels(self, Point pt) -> Point
15afbcd0
RD
7066
7067 Converts a point or size from dialog units to pixels. Dialog units
7068 are used for maintaining a dialog's proportions even if the font
7069 changes. For the x dimension, the dialog units are multiplied by the
7070 average character width and then divided by 4. For the y dimension,
7071 the dialog units are multiplied by the average character height and
7072 then divided by 8.
7073 """
54f9ee45 7074 return _core_.Window_ConvertDialogPointToPixels(*args, **kwargs)
e811c8ce
RD
7075
7076 def ConvertDialogSizeToPixels(*args, **kwargs):
15afbcd0 7077 """
a95a7133 7078 ConvertDialogSizeToPixels(self, Size sz) -> Size
15afbcd0
RD
7079
7080 Converts a point or size from dialog units to pixels. Dialog units
7081 are used for maintaining a dialog's proportions even if the font
7082 changes. For the x dimension, the dialog units are multiplied by the
7083 average character width and then divided by 4. For the y dimension,
7084 the dialog units are multiplied by the average character height and
7085 then divided by 8.
7086 """
54f9ee45 7087 return _core_.Window_ConvertDialogSizeToPixels(*args, **kwargs)
e811c8ce
RD
7088
7089 def DLG_PNT(*args, **kwargs):
15afbcd0 7090 """
a95a7133 7091 DLG_PNT(self, Point pt) -> Point
15afbcd0
RD
7092
7093 Converts a point or size from dialog units to pixels. Dialog units
7094 are used for maintaining a dialog's proportions even if the font
7095 changes. For the x dimension, the dialog units are multiplied by the
7096 average character width and then divided by 4. For the y dimension,
7097 the dialog units are multiplied by the average character height and
7098 then divided by 8.
7099 """
54f9ee45 7100 return _core_.Window_DLG_PNT(*args, **kwargs)
e811c8ce
RD
7101
7102 def DLG_SZE(*args, **kwargs):
15afbcd0 7103 """
a95a7133 7104 DLG_SZE(self, Size sz) -> Size
15afbcd0
RD
7105
7106 Converts a point or size from dialog units to pixels. Dialog units
7107 are used for maintaining a dialog's proportions even if the font
7108 changes. For the x dimension, the dialog units are multiplied by the
7109 average character width and then divided by 4. For the y dimension,
7110 the dialog units are multiplied by the average character height and
7111 then divided by 8.
7112 """
54f9ee45 7113 return _core_.Window_DLG_SZE(*args, **kwargs)
e811c8ce
RD
7114
7115 def ConvertPixelPointToDialog(*args, **kwargs):
a95a7133 7116 """ConvertPixelPointToDialog(self, Point pt) -> Point"""
54f9ee45 7117 return _core_.Window_ConvertPixelPointToDialog(*args, **kwargs)
e811c8ce
RD
7118
7119 def ConvertPixelSizeToDialog(*args, **kwargs):
a95a7133 7120 """ConvertPixelSizeToDialog(self, Size sz) -> Size"""
54f9ee45 7121 return _core_.Window_ConvertPixelSizeToDialog(*args, **kwargs)
e811c8ce
RD
7122
7123 def WarpPointer(*args, **kwargs):
15afbcd0 7124 """
a95a7133 7125 WarpPointer(self, int x, int y)
15afbcd0
RD
7126
7127 Moves the pointer to the given position on the window.
7128
7129 NOTE: This function is not supported under Mac because Apple Human
7130 Interface Guidelines forbid moving the mouse cursor programmatically.
7131 """
54f9ee45 7132 return _core_.Window_WarpPointer(*args, **kwargs)
e811c8ce
RD
7133
7134 def CaptureMouse(*args, **kwargs):
15afbcd0 7135 """
a95a7133 7136 CaptureMouse(self)
15afbcd0
RD
7137
7138 Directs all mouse input to this window. Call wx.Window.ReleaseMouse to
7139 release the capture.
7140
7141 Note that wxWindows maintains the stack of windows having captured the
7142 mouse and when the mouse is released the capture returns to the window
7143 which had had captured it previously and it is only really released if
7144 there were no previous window. In particular, this means that you must
7145 release the mouse as many times as you capture it.
7146 """
54f9ee45 7147 return _core_.Window_CaptureMouse(*args, **kwargs)
e811c8ce
RD
7148
7149 def ReleaseMouse(*args, **kwargs):
15afbcd0 7150 """
a95a7133 7151 ReleaseMouse(self)
15afbcd0
RD
7152
7153 Releases mouse input captured with wx.Window.CaptureMouse.
7154 """
54f9ee45 7155 return _core_.Window_ReleaseMouse(*args, **kwargs)
e811c8ce
RD
7156
7157 def GetCapture(*args, **kwargs):
15afbcd0 7158 """
66c033b4 7159 GetCapture() -> Window
15afbcd0
RD
7160
7161 Returns the window which currently captures the mouse or None
7162 """
54f9ee45 7163 return _core_.Window_GetCapture(*args, **kwargs)
e811c8ce
RD
7164
7165 GetCapture = staticmethod(GetCapture)
7166 def HasCapture(*args, **kwargs):
15afbcd0 7167 """
a95a7133 7168 HasCapture(self) -> bool
15afbcd0
RD
7169
7170 Returns true if this window has the current mouse capture.
7171 """
54f9ee45 7172 return _core_.Window_HasCapture(*args, **kwargs)
e811c8ce
RD
7173
7174 def Refresh(*args, **kwargs):
15afbcd0 7175 """
a95a7133 7176 Refresh(self, bool eraseBackground=True, Rect rect=None)
15afbcd0
RD
7177
7178 Mark the specified rectangle (or the whole window) as "dirty" so it
7179 will be repainted. Causes an EVT_PAINT event to be generated and sent
7180 to the window.
7181 """
54f9ee45 7182 return _core_.Window_Refresh(*args, **kwargs)
e811c8ce
RD
7183
7184 def RefreshRect(*args, **kwargs):
15afbcd0 7185 """
fef4c27a 7186 RefreshRect(self, Rect rect, bool eraseBackground=True)
15afbcd0
RD
7187
7188 Redraws the contents of the given rectangle: the area inside it will
7189 be repainted. This is the same as Refresh but has a nicer syntax.
7190 """
54f9ee45 7191 return _core_.Window_RefreshRect(*args, **kwargs)
e811c8ce
RD
7192
7193 def Update(*args, **kwargs):
15afbcd0 7194 """
a95a7133 7195 Update(self)
15afbcd0
RD
7196
7197 Calling this method immediately repaints the invalidated area of the
7198 window instead of waiting for the EVT_PAINT event to happen, (normally
7199 this would usually only happen when the flow of control returns to the
7200 event loop.) Notice that this function doesn't refresh the window and
7201 does nothing if the window has been already repainted. Use Refresh
7202 first if you want to immediately redraw the window (or some portion of
7203 it) unconditionally.
7204 """
54f9ee45 7205 return _core_.Window_Update(*args, **kwargs)
e811c8ce
RD
7206
7207 def ClearBackground(*args, **kwargs):
15afbcd0 7208 """
a95a7133 7209 ClearBackground(self)
15afbcd0
RD
7210
7211 Clears the window by filling it with the current background
7212 colour. Does not cause an erase background event to be generated.
7213 """
54f9ee45 7214 return _core_.Window_ClearBackground(*args, **kwargs)
e811c8ce
RD
7215
7216 def Freeze(*args, **kwargs):
15afbcd0 7217 """
a95a7133 7218 Freeze(self)
15afbcd0 7219
41e2b43e
RD
7220 Freezes the window or, in other words, prevents any updates from
7221 taking place on screen, the window is not redrawn at all. Thaw must be
7222 called to reenable window redrawing. Calls to Freeze/Thaw may be
7223 nested, with the actual Thaw being delayed until all the nesting has
7224 been undone.
15afbcd0
RD
7225
7226 This method is useful for visual appearance optimization (for example,
7227 it is a good idea to use it before inserting large amount of text into
7228 a wxTextCtrl under wxGTK) but is not implemented on all platforms nor
7229 for all controls so it is mostly just a hint to wxWindows and not a
7230 mandatory directive.
7231 """
54f9ee45 7232 return _core_.Window_Freeze(*args, **kwargs)
e811c8ce
RD
7233
7234 def Thaw(*args, **kwargs):
15afbcd0 7235 """
a95a7133 7236 Thaw(self)
15afbcd0 7237
4276dc52 7238 Reenables window updating after a previous call to Freeze. Calls to
41e2b43e
RD
7239 Freeze/Thaw may be nested, so Thaw must be called the same number of
7240 times that Freeze was before the window will be updated.
15afbcd0 7241 """
54f9ee45 7242 return _core_.Window_Thaw(*args, **kwargs)
e811c8ce
RD
7243
7244 def PrepareDC(*args, **kwargs):
15afbcd0 7245 """
a95a7133 7246 PrepareDC(self, DC dc)
15afbcd0
RD
7247
7248 Call this function to prepare the device context for drawing a
7249 scrolled image. It sets the device origin according to the current
7250 scroll position.
7251 """
54f9ee45 7252 return _core_.Window_PrepareDC(*args, **kwargs)
e811c8ce
RD
7253
7254 def GetUpdateRegion(*args, **kwargs):
15afbcd0 7255 """
a95a7133 7256 GetUpdateRegion(self) -> Region
15afbcd0
RD
7257
7258 Returns the region specifying which parts of the window have been
7259 damaged. Should only be called within an EVT_PAINT handler.
7260 """
54f9ee45 7261 return _core_.Window_GetUpdateRegion(*args, **kwargs)
e811c8ce
RD
7262
7263 def GetUpdateClientRect(*args, **kwargs):
15afbcd0 7264 """
a95a7133 7265 GetUpdateClientRect(self) -> Rect
15afbcd0
RD
7266
7267 Get the update rectangle region bounding box in client coords.
7268 """
54f9ee45 7269 return _core_.Window_GetUpdateClientRect(*args, **kwargs)
e811c8ce
RD
7270
7271 def IsExposed(*args, **kwargs):
15afbcd0 7272 """
a95a7133 7273 IsExposed(self, int x, int y, int w=1, int h=1) -> bool
15afbcd0
RD
7274
7275 Returns true if the given point or rectangle area has been exposed
7276 since the last repaint. Call this in an paint event handler to
7277 optimize redrawing by only redrawing those areas, which have been
7278 exposed.
7279 """
54f9ee45 7280 return _core_.Window_IsExposed(*args, **kwargs)
e811c8ce
RD
7281
7282 def IsExposedPoint(*args, **kwargs):
15afbcd0 7283 """
a95a7133 7284 IsExposedPoint(self, Point pt) -> bool
15afbcd0
RD
7285
7286 Returns true if the given point or rectangle area has been exposed
7287 since the last repaint. Call this in an paint event handler to
7288 optimize redrawing by only redrawing those areas, which have been
7289 exposed.
7290 """
54f9ee45 7291 return _core_.Window_IsExposedPoint(*args, **kwargs)
e811c8ce 7292
4276dc52 7293 def IsExposedRect(*args, **kwargs):
15afbcd0 7294 """
a95a7133 7295 IsExposedRect(self, Rect rect) -> bool
15afbcd0
RD
7296
7297 Returns true if the given point or rectangle area has been exposed
7298 since the last repaint. Call this in an paint event handler to
7299 optimize redrawing by only redrawing those areas, which have been
7300 exposed.
7301 """
54f9ee45 7302 return _core_.Window_IsExposedRect(*args, **kwargs)
e811c8ce 7303
74a57fcd
RD
7304 def GetDefaultAttributes(*args, **kwargs):
7305 """
a95a7133 7306 GetDefaultAttributes(self) -> VisualAttributes
74a57fcd 7307
41e2b43e
RD
7308 Get the default attributes for an instance of this class. This is
7309 useful if you want to use the same font or colour in your own control
7310 as in a standard control -- which is a much better idea than hard
7311 coding specific colours or fonts which might look completely out of
db3e571a 7312 place on the user's system, especially if it uses themes.
74a57fcd 7313 """
54f9ee45 7314 return _core_.Window_GetDefaultAttributes(*args, **kwargs)
74a57fcd
RD
7315
7316 def GetClassDefaultAttributes(*args, **kwargs):
7317 """
66c033b4 7318 GetClassDefaultAttributes(int variant=WINDOW_VARIANT_NORMAL) -> VisualAttributes
74a57fcd 7319
41e2b43e
RD
7320 Get the default attributes for this class. This is useful if you want
7321 to use the same font or colour in your own control as in a standard
7322 control -- which is a much better idea than hard coding specific
db3e571a
RD
7323 colours or fonts which might look completely out of place on the
7324 user's system, especially if it uses themes.
74a57fcd
RD
7325
7326 The variant parameter is only relevant under Mac currently and is
41e2b43e 7327 ignore under other platforms. Under Mac, it will change the size of
db3e571a
RD
7328 the returned font. See `wx.Window.SetWindowVariant` for more about
7329 this.
74a57fcd 7330 """
54f9ee45 7331 return _core_.Window_GetClassDefaultAttributes(*args, **kwargs)
74a57fcd
RD
7332
7333 GetClassDefaultAttributes = staticmethod(GetClassDefaultAttributes)
e811c8ce 7334 def SetBackgroundColour(*args, **kwargs):
15afbcd0 7335 """
a95a7133 7336 SetBackgroundColour(self, Colour colour) -> bool
15afbcd0
RD
7337
7338 Sets the background colour of the window. Returns True if the colour
7339 was changed. The background colour is usually painted by the default
7340 EVT_ERASE_BACKGROUND event handler function under Windows and
f8167d6e
RD
7341 automatically under GTK. Using `wx.NullColour` will reset the window
7342 to the default background colour.
15afbcd0 7343
db3e571a 7344 Note that setting the background colour may not cause an immediate
f8167d6e 7345 refresh, so you may wish to call `ClearBackground` or `Refresh` after
15afbcd0
RD
7346 calling this function.
7347
f8167d6e
RD
7348 Using this function will disable attempts to use themes for this
7349 window, if the system supports them. Use with care since usually the
7350 themes represent the appearance chosen by the user to be used for all
7351 applications on the system.
15afbcd0 7352 """
54f9ee45 7353 return _core_.Window_SetBackgroundColour(*args, **kwargs)
e811c8ce 7354
412d302d
RD
7355 def SetOwnBackgroundColour(*args, **kwargs):
7356 """SetOwnBackgroundColour(self, Colour colour)"""
7357 return _core_.Window_SetOwnBackgroundColour(*args, **kwargs)
b2df227b 7358
e811c8ce 7359 def SetForegroundColour(*args, **kwargs):
15afbcd0 7360 """
a95a7133 7361 SetForegroundColour(self, Colour colour) -> bool
15afbcd0
RD
7362
7363 Sets the foreground colour of the window. Returns True is the colour
7364 was changed. The interpretation of foreground colour is dependent on
7365 the window class; it may be the text colour or other colour, or it may
7366 not be used at all.
7367 """
54f9ee45 7368 return _core_.Window_SetForegroundColour(*args, **kwargs)
e811c8ce 7369
fa47d7a7
VS
7370 def SetOwnForegroundColour(*args, **kwargs):
7371 """SetOwnForegroundColour(self, Colour colour)"""
7372 return _core_.Window_SetOwnForegroundColour(*args, **kwargs)
b2df227b 7373
e811c8ce 7374 def GetBackgroundColour(*args, **kwargs):
15afbcd0 7375 """
a95a7133 7376 GetBackgroundColour(self) -> Colour
15afbcd0
RD
7377
7378 Returns the background colour of the window.
7379 """
54f9ee45 7380 return _core_.Window_GetBackgroundColour(*args, **kwargs)
e811c8ce
RD
7381
7382 def GetForegroundColour(*args, **kwargs):
15afbcd0 7383 """
a95a7133 7384 GetForegroundColour(self) -> Colour
15afbcd0
RD
7385
7386 Returns the foreground colour of the window. The interpretation of
7387 foreground colour is dependent on the window class; it may be the text
7388 colour or other colour, or it may not be used at all.
7389 """
54f9ee45 7390 return _core_.Window_GetForegroundColour(*args, **kwargs)
e811c8ce 7391
7bc1e663
RD
7392 def SetBackgroundStyle(*args, **kwargs):
7393 """
7394 SetBackgroundStyle(self, int style) -> bool
7395
7396 Returns the background style of the window. The background style
7397 indicates how the background of the window is drawn.
7398
7399 ====================== ========================================
7400 wx.BG_STYLE_SYSTEM The background colour or pattern should
7401 be determined by the system
7402 wx.BG_STYLE_COLOUR The background should be a solid colour
7403 wx.BG_STYLE_CUSTOM The background will be implemented by the
7404 application.
7405 ====================== ========================================
7406
7407 On GTK+, use of wx.BG_STYLE_CUSTOM allows the flicker-free drawing of
7408 a custom background, such as a tiled bitmap. Currently the style has
7409 no effect on other platforms.
7410
7411 :see: `GetBackgroundStyle`, `SetBackgroundColour`
7412 """
7413 return _core_.Window_SetBackgroundStyle(*args, **kwargs)
7414
7415 def GetBackgroundStyle(*args, **kwargs):
7416 """
7417 GetBackgroundStyle(self) -> int
7418
7419 Returns the background style of the window.
7420
7421 :see: `SetBackgroundStyle`
7422 """
7423 return _core_.Window_GetBackgroundStyle(*args, **kwargs)
7424
51b83b37
RD
7425 def HasTransparentBackground(*args, **kwargs):
7426 """
7427 HasTransparentBackground(self) -> bool
7428
7429 Returns True if this window's background is transparent (as, for
7430 example, for `wx.StaticText`) and should show the parent window's
7431 background.
7432
7433 This method is mostly used internally by the library itself and you
7434 normally shouldn't have to call it. You may, however, have to override
7435 it in your custom control classes to ensure that background is painted
7436 correctly.
7437 """
7438 return _core_.Window_HasTransparentBackground(*args, **kwargs)
7439
e811c8ce 7440 def SetCursor(*args, **kwargs):
15afbcd0 7441 """
a95a7133 7442 SetCursor(self, Cursor cursor) -> bool
15afbcd0
RD
7443
7444 Sets the window's cursor. Notice that the window cursor also sets it
7445 for the children of the window implicitly.
7446
7447 The cursor may be wx.NullCursor in which case the window cursor will
7448 be reset back to default.
7449 """
54f9ee45 7450 return _core_.Window_SetCursor(*args, **kwargs)
e811c8ce
RD
7451
7452 def GetCursor(*args, **kwargs):
15afbcd0 7453 """
a95a7133 7454 GetCursor(self) -> Cursor
15afbcd0
RD
7455
7456 Return the cursor associated with this window.
7457 """
54f9ee45 7458 return _core_.Window_GetCursor(*args, **kwargs)
e811c8ce
RD
7459
7460 def SetFont(*args, **kwargs):
15afbcd0 7461 """
a95a7133 7462 SetFont(self, Font font) -> bool
15afbcd0
RD
7463
7464 Sets the font for this window.
7465 """
54f9ee45 7466 return _core_.Window_SetFont(*args, **kwargs)
e811c8ce 7467
fa47d7a7
VS
7468 def SetOwnFont(*args, **kwargs):
7469 """SetOwnFont(self, Font font)"""
7470 return _core_.Window_SetOwnFont(*args, **kwargs)
b2df227b 7471
e811c8ce 7472 def GetFont(*args, **kwargs):
15afbcd0 7473 """
a95a7133 7474 GetFont(self) -> Font
15afbcd0 7475
4276dc52 7476 Returns the default font used for this window.
15afbcd0 7477 """
54f9ee45 7478 return _core_.Window_GetFont(*args, **kwargs)
e811c8ce
RD
7479
7480 def SetCaret(*args, **kwargs):
15afbcd0 7481 """
a95a7133 7482 SetCaret(self, Caret caret)
15afbcd0
RD
7483
7484 Sets the caret associated with the window.
7485 """
54f9ee45 7486 return _core_.Window_SetCaret(*args, **kwargs)
e811c8ce
RD
7487
7488 def GetCaret(*args, **kwargs):
15afbcd0 7489 """
a95a7133 7490 GetCaret(self) -> Caret
15afbcd0
RD
7491
7492 Returns the caret associated with the window.
7493 """
54f9ee45 7494 return _core_.Window_GetCaret(*args, **kwargs)
e811c8ce
RD
7495
7496 def GetCharHeight(*args, **kwargs):
15afbcd0 7497 """
a95a7133 7498 GetCharHeight(self) -> int
15afbcd0
RD
7499
7500 Get the (average) character size for the current font.
7501 """
54f9ee45 7502 return _core_.Window_GetCharHeight(*args, **kwargs)
e811c8ce
RD
7503
7504 def GetCharWidth(*args, **kwargs):
15afbcd0 7505 """
a95a7133 7506 GetCharWidth(self) -> int
15afbcd0
RD
7507
7508 Get the (average) character size for the current font.
7509 """
54f9ee45 7510 return _core_.Window_GetCharWidth(*args, **kwargs)
e811c8ce
RD
7511
7512 def GetTextExtent(*args, **kwargs):
fd2dc343
RD
7513 """
7514 GetTextExtent(String string) -> (width, height)
7515
7516 Get the width and height of the text using the current font.
7517 """
54f9ee45 7518 return _core_.Window_GetTextExtent(*args, **kwargs)
e811c8ce
RD
7519
7520 def GetFullTextExtent(*args, **kwargs):
0df68c9f 7521 """
196addbf 7522 GetFullTextExtent(String string, Font font=None) ->
0df68c9f 7523 (width, height, descent, externalLeading)
e811c8ce 7524
15afbcd0
RD
7525 Get the width, height, decent and leading of the text using the
7526 current or specified font.
0df68c9f 7527 """
54f9ee45 7528 return _core_.Window_GetFullTextExtent(*args, **kwargs)
e811c8ce
RD
7529
7530 def ClientToScreenXY(*args, **kwargs):
15afbcd0
RD
7531 """
7532 ClientToScreenXY(int x, int y) -> (x,y)
7533
7534 Converts to screen coordinates from coordinates relative to this window.
7535 """
54f9ee45 7536 return _core_.Window_ClientToScreenXY(*args, **kwargs)
e811c8ce
RD
7537
7538 def ScreenToClientXY(*args, **kwargs):
15afbcd0
RD
7539 """
7540 ScreenToClientXY(int x, int y) -> (x,y)
7541
7542 Converts from screen to client window coordinates.
7543 """
54f9ee45 7544 return _core_.Window_ScreenToClientXY(*args, **kwargs)
e811c8ce
RD
7545
7546 def ClientToScreen(*args, **kwargs):
15afbcd0 7547 """
a95a7133 7548 ClientToScreen(self, Point pt) -> Point
15afbcd0
RD
7549
7550 Converts to screen coordinates from coordinates relative to this window.
7551 """
54f9ee45 7552 return _core_.Window_ClientToScreen(*args, **kwargs)
e811c8ce
RD
7553
7554 def ScreenToClient(*args, **kwargs):
15afbcd0 7555 """
a95a7133 7556 ScreenToClient(self, Point pt) -> Point
15afbcd0
RD
7557
7558 Converts from screen to client window coordinates.
7559 """
54f9ee45 7560 return _core_.Window_ScreenToClient(*args, **kwargs)
e811c8ce
RD
7561
7562 def HitTestXY(*args, **kwargs):
15afbcd0 7563 """
a95a7133 7564 HitTestXY(self, int x, int y) -> int
15afbcd0
RD
7565
7566 Test where the given (in client coords) point lies
7567 """
54f9ee45 7568 return _core_.Window_HitTestXY(*args, **kwargs)
e811c8ce
RD
7569
7570 def HitTest(*args, **kwargs):
15afbcd0 7571 """
a95a7133 7572 HitTest(self, Point pt) -> int
15afbcd0
RD
7573
7574 Test where the given (in client coords) point lies
7575 """
54f9ee45 7576 return _core_.Window_HitTest(*args, **kwargs)
e811c8ce 7577
15afbcd0
RD
7578 def GetBorder(*args):
7579 """
a95a7133
RD
7580 GetBorder(self, long flags) -> int
7581 GetBorder(self) -> int
e811c8ce 7582
15afbcd0
RD
7583 Get border for the flags of this window
7584 """
54f9ee45 7585 return _core_.Window_GetBorder(*args)
e811c8ce
RD
7586
7587 def UpdateWindowUI(*args, **kwargs):
15afbcd0 7588 """
a95a7133 7589 UpdateWindowUI(self, long flags=UPDATE_UI_NONE)
15afbcd0
RD
7590
7591 This function sends EVT_UPDATE_UI events to the window. The particular
7592 implementation depends on the window; for example a wx.ToolBar will
7593 send an update UI event for each toolbar button, and a wx.Frame will
7594 send an update UI event for each menubar menu item. You can call this
7595 function from your application to ensure that your UI is up-to-date at
7596 a particular point in time (as far as your EVT_UPDATE_UI handlers are
7597 concerned). This may be necessary if you have called
7598 wx.UpdateUIEvent.SetMode or wx.UpdateUIEvent.SetUpdateInterval to
7599 limit the overhead that wxWindows incurs by sending update UI events
7600 in idle time.
15afbcd0 7601 """
54f9ee45 7602 return _core_.Window_UpdateWindowUI(*args, **kwargs)
e811c8ce
RD
7603
7604 def PopupMenuXY(*args, **kwargs):
15afbcd0 7605 """
b0503257 7606 PopupMenuXY(self, Menu menu, int x=-1, int y=-1) -> bool
15afbcd0 7607
b0503257
RD
7608 Pops up the given menu at the specified coordinates, relative to this window,
7609 and returns control when the user has dismissed the menu. If a menu item is
7610 selected, the corresponding menu event is generated and will be processed as
7611 usual. If the default position is given then the current position of the
7612 mouse cursor will be used.
15afbcd0 7613 """
54f9ee45 7614 return _core_.Window_PopupMenuXY(*args, **kwargs)
e811c8ce 7615
15afbcd0
RD
7616 def PopupMenu(*args, **kwargs):
7617 """
b0503257 7618 PopupMenu(self, Menu menu, Point pos=DefaultPosition) -> bool
15afbcd0 7619
b0503257
RD
7620 Pops up the given menu at the specified coordinates, relative to this window,
7621 and returns control when the user has dismissed the menu. If a menu item is
7622 selected, the corresponding menu event is generated and will be processed as
7623 usual. If the default position is given then the current position of the
7624 mouse cursor will be used.
15afbcd0 7625 """
54f9ee45 7626 return _core_.Window_PopupMenu(*args, **kwargs)
15afbcd0
RD
7627
7628 def GetHandle(*args, **kwargs):
7629 """
a95a7133 7630 GetHandle(self) -> long
15afbcd0
RD
7631
7632 Returns the platform-specific handle (as a long integer) of the
7633 physical window. Currently on wxMac it returns the handle of the
7634 toplevel parent of the window.
7635 """
54f9ee45 7636 return _core_.Window_GetHandle(*args, **kwargs)
15afbcd0 7637
7e63a440
RD
7638 def AssociateHandle(*args, **kwargs):
7639 """
7640 AssociateHandle(self, long handle)
7641
7642 Associate the window with a new native handle
7643 """
7644 return _core_.Window_AssociateHandle(*args, **kwargs)
7645
7646 def DissociateHandle(*args, **kwargs):
7647 """
7648 DissociateHandle(self)
7649
7650 Dissociate the current native handle from the window
7651 """
7652 return _core_.Window_DissociateHandle(*args, **kwargs)
7653
15afbcd0
RD
7654 def HasScrollbar(*args, **kwargs):
7655 """
a95a7133 7656 HasScrollbar(self, int orient) -> bool
15afbcd0
RD
7657
7658 Does the window have the scrollbar for this orientation?
7659 """
54f9ee45 7660 return _core_.Window_HasScrollbar(*args, **kwargs)
15afbcd0
RD
7661
7662 def SetScrollbar(*args, **kwargs):
7663 """
41e2b43e 7664 SetScrollbar(self, int orientation, int position, int thumbSize, int range,
15afbcd0
RD
7665 bool refresh=True)
7666
7667 Sets the scrollbar properties of a built-in scrollbar.
15afbcd0 7668 """
54f9ee45 7669 return _core_.Window_SetScrollbar(*args, **kwargs)
e811c8ce
RD
7670
7671 def SetScrollPos(*args, **kwargs):
15afbcd0 7672 """
a95a7133 7673 SetScrollPos(self, int orientation, int pos, bool refresh=True)
15afbcd0
RD
7674
7675 Sets the position of one of the built-in scrollbars.
7676 """
54f9ee45 7677 return _core_.Window_SetScrollPos(*args, **kwargs)
e811c8ce
RD
7678
7679 def GetScrollPos(*args, **kwargs):
15afbcd0 7680 """
a95a7133 7681 GetScrollPos(self, int orientation) -> int
15afbcd0
RD
7682
7683 Returns the built-in scrollbar position.
7684 """
54f9ee45 7685 return _core_.Window_GetScrollPos(*args, **kwargs)
e811c8ce
RD
7686
7687 def GetScrollThumb(*args, **kwargs):
15afbcd0 7688 """
a95a7133 7689 GetScrollThumb(self, int orientation) -> int
15afbcd0
RD
7690
7691 Returns the built-in scrollbar thumb size.
7692 """
54f9ee45 7693 return _core_.Window_GetScrollThumb(*args, **kwargs)
e811c8ce
RD
7694
7695 def GetScrollRange(*args, **kwargs):
15afbcd0 7696 """
a95a7133 7697 GetScrollRange(self, int orientation) -> int
15afbcd0
RD
7698
7699 Returns the built-in scrollbar range.
7700 """
54f9ee45 7701 return _core_.Window_GetScrollRange(*args, **kwargs)
e811c8ce
RD
7702
7703 def ScrollWindow(*args, **kwargs):
15afbcd0 7704 """
a95a7133 7705 ScrollWindow(self, int dx, int dy, Rect rect=None)
15afbcd0
RD
7706
7707 Physically scrolls the pixels in the window and move child windows
7708 accordingly. Use this function to optimise your scrolling
7709 implementations, to minimise the area that must be redrawn. Note that
7710 it is rarely required to call this function from a user program.
15afbcd0 7711 """
54f9ee45 7712 return _core_.Window_ScrollWindow(*args, **kwargs)
e811c8ce
RD
7713
7714 def ScrollLines(*args, **kwargs):
15afbcd0 7715 """
a95a7133 7716 ScrollLines(self, int lines) -> bool
15afbcd0
RD
7717
7718 If the platform and window class supports it, scrolls the window by
7719 the given number of lines down, if lines is positive, or up if lines
7720 is negative. Returns True if the window was scrolled, False if it was
7721 already on top/bottom and nothing was done.
7722 """
54f9ee45 7723 return _core_.Window_ScrollLines(*args, **kwargs)
e811c8ce
RD
7724
7725 def ScrollPages(*args, **kwargs):
15afbcd0 7726 """
a95a7133 7727 ScrollPages(self, int pages) -> bool
15afbcd0 7728
41e2b43e 7729 If the platform and window class supports it, scrolls the window by
15afbcd0
RD
7730 the given number of pages down, if pages is positive, or up if pages
7731 is negative. Returns True if the window was scrolled, False if it was
7732 already on top/bottom and nothing was done.
7733 """
54f9ee45 7734 return _core_.Window_ScrollPages(*args, **kwargs)
e811c8ce
RD
7735
7736 def LineUp(*args, **kwargs):
15afbcd0 7737 """
a95a7133 7738 LineUp(self) -> bool
15afbcd0
RD
7739
7740 This is just a wrapper for ScrollLines(-1).
7741 """
54f9ee45 7742 return _core_.Window_LineUp(*args, **kwargs)
e811c8ce
RD
7743
7744 def LineDown(*args, **kwargs):
15afbcd0 7745 """
a95a7133 7746 LineDown(self) -> bool
15afbcd0
RD
7747
7748 This is just a wrapper for ScrollLines(1).
7749 """
54f9ee45 7750 return _core_.Window_LineDown(*args, **kwargs)
e811c8ce
RD
7751
7752 def PageUp(*args, **kwargs):
15afbcd0 7753 """
a95a7133 7754 PageUp(self) -> bool
15afbcd0
RD
7755
7756 This is just a wrapper for ScrollPages(-1).
7757 """
54f9ee45 7758 return _core_.Window_PageUp(*args, **kwargs)
e811c8ce
RD
7759
7760 def PageDown(*args, **kwargs):
15afbcd0 7761 """
a95a7133 7762 PageDown(self) -> bool
15afbcd0
RD
7763
7764 This is just a wrapper for ScrollPages(1).
7765 """
54f9ee45 7766 return _core_.Window_PageDown(*args, **kwargs)
e811c8ce
RD
7767
7768 def SetHelpText(*args, **kwargs):
15afbcd0 7769 """
a95a7133 7770 SetHelpText(self, String text)
15afbcd0
RD
7771
7772 Sets the help text to be used as context-sensitive help for this
7773 window. Note that the text is actually stored by the current
7774 wxHelpProvider implementation, and not in the window object itself.
7775 """
54f9ee45 7776 return _core_.Window_SetHelpText(*args, **kwargs)
e811c8ce
RD
7777
7778 def SetHelpTextForId(*args, **kwargs):
15afbcd0 7779 """
a95a7133 7780 SetHelpTextForId(self, String text)
15afbcd0
RD
7781
7782 Associate this help text with all windows with the same id as this
7783 one.
7784 """
54f9ee45 7785 return _core_.Window_SetHelpTextForId(*args, **kwargs)
e811c8ce
RD
7786
7787 def GetHelpText(*args, **kwargs):
15afbcd0 7788 """
a95a7133 7789 GetHelpText(self) -> String
15afbcd0
RD
7790
7791 Gets the help text to be used as context-sensitive help for this
7792 window. Note that the text is actually stored by the current
7793 wxHelpProvider implementation, and not in the window object itself.
7794 """
54f9ee45 7795 return _core_.Window_GetHelpText(*args, **kwargs)
e811c8ce
RD
7796
7797 def SetToolTipString(*args, **kwargs):
15afbcd0 7798 """
a95a7133 7799 SetToolTipString(self, String tip)
15afbcd0
RD
7800
7801 Attach a tooltip to the window.
7802 """
54f9ee45 7803 return _core_.Window_SetToolTipString(*args, **kwargs)
e811c8ce
RD
7804
7805 def SetToolTip(*args, **kwargs):
15afbcd0 7806 """
a95a7133 7807 SetToolTip(self, ToolTip tip)
15afbcd0
RD
7808
7809 Attach a tooltip to the window.
7810 """
54f9ee45 7811 return _core_.Window_SetToolTip(*args, **kwargs)
e811c8ce
RD
7812
7813 def GetToolTip(*args, **kwargs):
15afbcd0 7814 """
a95a7133 7815 GetToolTip(self) -> ToolTip
15afbcd0
RD
7816
7817 get the associated tooltip or None if none
7818 """
54f9ee45 7819 return _core_.Window_GetToolTip(*args, **kwargs)
e811c8ce
RD
7820
7821 def SetDropTarget(*args, **kwargs):
15afbcd0 7822 """
a95a7133 7823 SetDropTarget(self, DropTarget dropTarget)
15afbcd0
RD
7824
7825 Associates a drop target with this window. If the window already has
7826 a drop target, it is deleted.
7827 """
54f9ee45 7828 return _core_.Window_SetDropTarget(*args, **kwargs)
e811c8ce
RD
7829
7830 def GetDropTarget(*args, **kwargs):
15afbcd0 7831 """
a95a7133 7832 GetDropTarget(self) -> DropTarget
15afbcd0
RD
7833
7834 Returns the associated drop target, which may be None.
7835 """
54f9ee45 7836 return _core_.Window_GetDropTarget(*args, **kwargs)
e811c8ce
RD
7837
7838 def SetConstraints(*args, **kwargs):
15afbcd0 7839 """
a95a7133 7840 SetConstraints(self, LayoutConstraints constraints)
15afbcd0
RD
7841
7842 Sets the window to have the given layout constraints. If an existing
7843 layout constraints object is already owned by the window, it will be
7844 deleted. Pass None to disassociate and delete the window's current
7845 constraints.
7846
7847 You must call SetAutoLayout to tell a window to use the constraints
7848 automatically in its default EVT_SIZE handler; otherwise, you must
7849 handle EVT_SIZE yourself and call Layout() explicitly. When setting
7850 both a wx.LayoutConstraints and a wx.Sizer, only the sizer will have
7851 effect.
7852 """
54f9ee45 7853 return _core_.Window_SetConstraints(*args, **kwargs)
e811c8ce
RD
7854
7855 def GetConstraints(*args, **kwargs):
15afbcd0 7856 """
a95a7133 7857 GetConstraints(self) -> LayoutConstraints
15afbcd0
RD
7858
7859 Returns a pointer to the window's layout constraints, or None if there
7860 are none.
7861 """
54f9ee45 7862 return _core_.Window_GetConstraints(*args, **kwargs)
e811c8ce
RD
7863
7864 def SetAutoLayout(*args, **kwargs):
15afbcd0 7865 """
a95a7133 7866 SetAutoLayout(self, bool autoLayout)
15afbcd0
RD
7867
7868 Determines whether the Layout function will be called automatically
7869 when the window is resized. It is called implicitly by SetSizer but
7870 if you use SetConstraints you should call it manually or otherwise the
7871 window layout won't be correctly updated when its size changes.
7872 """
54f9ee45 7873 return _core_.Window_SetAutoLayout(*args, **kwargs)
e811c8ce
RD
7874
7875 def GetAutoLayout(*args, **kwargs):
15afbcd0 7876 """
a95a7133 7877 GetAutoLayout(self) -> bool
15afbcd0
RD
7878
7879 Returns the current autoLayout setting
7880 """
54f9ee45 7881 return _core_.Window_GetAutoLayout(*args, **kwargs)
e811c8ce
RD
7882
7883 def Layout(*args, **kwargs):
15afbcd0 7884 """
a95a7133 7885 Layout(self) -> bool
15afbcd0
RD
7886
7887 Invokes the constraint-based layout algorithm or the sizer-based
7888 algorithm for this window. See SetAutoLayout: when auto layout is on,
7889 this function gets called automatically by the default EVT_SIZE
7890 handler when the window is resized.
7891 """
54f9ee45 7892 return _core_.Window_Layout(*args, **kwargs)
e811c8ce
RD
7893
7894 def SetSizer(*args, **kwargs):
15afbcd0 7895 """
a95a7133 7896 SetSizer(self, Sizer sizer, bool deleteOld=True)
15afbcd0
RD
7897
7898 Sets the window to have the given layout sizer. The window will then
7899 own the object, and will take care of its deletion. If an existing
7900 layout sizer object is already owned by the window, it will be deleted
7901 if the deleteOld parameter is true. Note that this function will also
7902 call SetAutoLayout implicitly with a True parameter if the sizer is
ae8162c8 7903 non-None, and False otherwise.
15afbcd0 7904 """
54f9ee45 7905 return _core_.Window_SetSizer(*args, **kwargs)
e811c8ce
RD
7906
7907 def SetSizerAndFit(*args, **kwargs):
15afbcd0 7908 """
a95a7133 7909 SetSizerAndFit(self, Sizer sizer, bool deleteOld=True)
15afbcd0
RD
7910
7911 The same as SetSizer, except it also sets the size hints for the
7912 window based on the sizer's minimum size.
7913 """
54f9ee45 7914 return _core_.Window_SetSizerAndFit(*args, **kwargs)
e811c8ce
RD
7915
7916 def GetSizer(*args, **kwargs):
15afbcd0 7917 """
a95a7133 7918 GetSizer(self) -> Sizer
15afbcd0
RD
7919
7920 Return the sizer associated with the window by a previous call to
7921 SetSizer or None if there isn't one.
7922 """
54f9ee45 7923 return _core_.Window_GetSizer(*args, **kwargs)
e811c8ce
RD
7924
7925 def SetContainingSizer(*args, **kwargs):
15afbcd0 7926 """
a95a7133 7927 SetContainingSizer(self, Sizer sizer)
15afbcd0
RD
7928
7929 This normally does not need to be called by application code. It is
7930 called internally when a window is added to a sizer, and is used so
7931 the window can remove itself from the sizer when it is destroyed.
7932 """
54f9ee45 7933 return _core_.Window_SetContainingSizer(*args, **kwargs)
e811c8ce
RD
7934
7935 def GetContainingSizer(*args, **kwargs):
15afbcd0 7936 """
a95a7133 7937 GetContainingSizer(self) -> Sizer
15afbcd0
RD
7938
7939 Return the sizer that this window is a member of, if any, otherwise None.
7940 """
54f9ee45 7941 return _core_.Window_GetContainingSizer(*args, **kwargs)
e811c8ce 7942
a95a7133
RD
7943 def InheritAttributes(*args, **kwargs):
7944 """
7945 InheritAttributes(self)
7946
41e2b43e
RD
7947 This function is (or should be, in case of custom controls) called
7948 during window creation to intelligently set up the window visual
7949 attributes, that is the font and the foreground and background
7950 colours.
7951
7952 By 'intelligently' the following is meant: by default, all windows use
7953 their own default attributes. However if some of the parent's
7954 attributes are explicitly changed (that is, using SetFont and not
fa47d7a7 7955 SetOwnFont) and if the corresponding attribute hadn't been
41e2b43e
RD
7956 explicitly set for this window itself, then this window takes the same
7957 value as used by the parent. In addition, if the window overrides
7958 ShouldInheritColours to return false, the colours will not be changed
7959 no matter what and only the font might.
7960
34621cc5 7961 This rather complicated logic is necessary in order to accommodate the
ec9b55ca 7962 different usage scenarios. The most common one is when all default
41e2b43e
RD
7963 attributes are used and in this case, nothing should be inherited as
7964 in modern GUIs different controls use different fonts (and colours)
7965 than their siblings so they can't inherit the same value from the
7966 parent. However it was also deemed desirable to allow to simply change
7967 the attributes of all children at once by just changing the font or
7968 colour of their common parent, hence in this case we do inherit the
7969 parents attributes.
7970
a95a7133 7971 """
54f9ee45 7972 return _core_.Window_InheritAttributes(*args, **kwargs)
a95a7133
RD
7973
7974 def ShouldInheritColours(*args, **kwargs):
7975 """
7976 ShouldInheritColours(self) -> bool
7977
7978 Return true from here to allow the colours of this window to be
41e2b43e
RD
7979 changed by InheritAttributes, returning false forbids inheriting them
7980 from the parent window.
a95a7133 7981
41e2b43e
RD
7982 The base class version returns false, but this method is overridden in
7983 wxControl where it returns true.
a95a7133 7984 """
54f9ee45 7985 return _core_.Window_ShouldInheritColours(*args, **kwargs)
a95a7133 7986
e811c8ce 7987 def PostCreate(self, pre):
15afbcd0
RD
7988 """
7989 Phase 3 of the 2-phase create <wink!>
7990 Call this method after precreating the window with the 2-phase create method.
7991 """
e811c8ce
RD
7992 self.this = pre.this
7993 self.thisown = pre.thisown
7994 pre.thisown = 0
7995 if hasattr(self, '_setOORInfo'):
7996 self._setOORInfo(self)
7997 if hasattr(self, '_setCallbackInfo'):
7998 self._setCallbackInfo(self, self.__class__)
7999
8000
8001class WindowPtr(Window):
8002 def __init__(self, this):
8003 self.this = this
8004 if not hasattr(self,"thisown"): self.thisown = 0
8005 self.__class__ = Window
54f9ee45 8006_core_.Window_swigregister(WindowPtr)
e811c8ce
RD
8007
8008def PreWindow(*args, **kwargs):
15afbcd0
RD
8009 """
8010 PreWindow() -> Window
8011
8012 Precreate a Window for 2-phase creation.
8013 """
54f9ee45 8014 val = _core_.new_PreWindow(*args, **kwargs)
e811c8ce
RD
8015 val.thisown = 1
8016 return val
8017
8018def Window_NewControlId(*args, **kwargs):
15afbcd0
RD
8019 """
8020 Window_NewControlId() -> int
8021
8022 Generate a control id for the controls which were not given one.
8023 """
54f9ee45 8024 return _core_.Window_NewControlId(*args, **kwargs)
e811c8ce
RD
8025
8026def Window_NextControlId(*args, **kwargs):
15afbcd0
RD
8027 """
8028 Window_NextControlId(int winid) -> int
8029
8030 Get the id of the control following the one with the given
41e2b43e 8031 autogenerated) id
15afbcd0 8032 """
54f9ee45 8033 return _core_.Window_NextControlId(*args, **kwargs)
e811c8ce
RD
8034
8035def Window_PrevControlId(*args, **kwargs):
15afbcd0
RD
8036 """
8037 Window_PrevControlId(int winid) -> int
8038
8039 Get the id of the control preceding the one with the given
41e2b43e 8040 autogenerated) id
15afbcd0 8041 """
54f9ee45 8042 return _core_.Window_PrevControlId(*args, **kwargs)
e811c8ce
RD
8043
8044def Window_FindFocus(*args, **kwargs):
15afbcd0
RD
8045 """
8046 Window_FindFocus() -> Window
8047
8048 Returns the window or control that currently has the keyboard focus,
8049 or None.
8050 """
54f9ee45 8051 return _core_.Window_FindFocus(*args, **kwargs)
e811c8ce
RD
8052
8053def Window_GetCapture(*args, **kwargs):
15afbcd0
RD
8054 """
8055 Window_GetCapture() -> Window
8056
8057 Returns the window which currently captures the mouse or None
8058 """
54f9ee45 8059 return _core_.Window_GetCapture(*args, **kwargs)
e811c8ce 8060
74a57fcd
RD
8061def Window_GetClassDefaultAttributes(*args, **kwargs):
8062 """
8063 Window_GetClassDefaultAttributes(int variant=WINDOW_VARIANT_NORMAL) -> VisualAttributes
8064
41e2b43e
RD
8065 Get the default attributes for this class. This is useful if you want
8066 to use the same font or colour in your own control as in a standard
8067 control -- which is a much better idea than hard coding specific
db3e571a
RD
8068 colours or fonts which might look completely out of place on the
8069 user's system, especially if it uses themes.
74a57fcd
RD
8070
8071 The variant parameter is only relevant under Mac currently and is
41e2b43e 8072 ignore under other platforms. Under Mac, it will change the size of
db3e571a
RD
8073 the returned font. See `wx.Window.SetWindowVariant` for more about
8074 this.
74a57fcd 8075 """
54f9ee45 8076 return _core_.Window_GetClassDefaultAttributes(*args, **kwargs)
74a57fcd 8077
e811c8ce 8078def DLG_PNT(win, point_or_x, y=None):
15afbcd0
RD
8079 """
8080 Convenience function for converting a Point or (x,y) in
8081 dialog units to pixel units.
8082 """
e811c8ce
RD
8083 if y is None:
8084 return win.ConvertDialogPointToPixels(point_or_x)
8085 else:
fd3f2efe 8086 return win.ConvertDialogPointToPixels(wx.Point(point_or_x, y))
e811c8ce
RD
8087
8088def DLG_SZE(win, size_width, height=None):
15afbcd0
RD
8089 """
8090 Convenience function for converting a Size or (w,h) in
8091 dialog units to pixel units.
8092 """
e811c8ce
RD
8093 if height is None:
8094 return win.ConvertDialogSizeToPixels(size_width)
8095 else:
fd3f2efe 8096 return win.ConvertDialogSizeToPixels(wx.Size(size_width, height))
e811c8ce
RD
8097
8098
8099def FindWindowById(*args, **kwargs):
15afbcd0
RD
8100 """
8101 FindWindowById(long id, Window parent=None) -> Window
8102
8103 Find the first window in the application with the given id. If parent
8104 is None, the search will start from all top-level frames and dialog
8105 boxes; if non-None, the search will be limited to the given window
8106 hierarchy. The search is recursive in both cases.
8107 """
54f9ee45 8108 return _core_.FindWindowById(*args, **kwargs)
e811c8ce
RD
8109
8110def FindWindowByName(*args, **kwargs):
15afbcd0
RD
8111 """
8112 FindWindowByName(String name, Window parent=None) -> Window
8113
8114 Find a window by its name (as given in a window constructor or Create
8115 function call). If parent is None, the search will start from all
8116 top-level frames and dialog boxes; if non-None, the search will be
8117 limited to the given window hierarchy. The search is recursive in both
8118 cases.
8119
8120 If no window with such name is found, wx.FindWindowByLabel is called.
8121 """
54f9ee45 8122 return _core_.FindWindowByName(*args, **kwargs)
e811c8ce
RD
8123
8124def FindWindowByLabel(*args, **kwargs):
15afbcd0
RD
8125 """
8126 FindWindowByLabel(String label, Window parent=None) -> Window
8127
8128 Find a window by its label. Depending on the type of window, the label
8129 may be a window title or panel item label. If parent is None, the
8130 search will start from all top-level frames and dialog boxes; if
8131 non-None, the search will be limited to the given window
8132 hierarchy. The search is recursive in both cases.
8133 """
54f9ee45 8134 return _core_.FindWindowByLabel(*args, **kwargs)
e811c8ce
RD
8135
8136def Window_FromHWND(*args, **kwargs):
4276dc52 8137 """Window_FromHWND(Window parent, unsigned long _hWnd) -> Window"""
54f9ee45 8138 return _core_.Window_FromHWND(*args, **kwargs)
e811c8ce
RD
8139#---------------------------------------------------------------------------
8140
8141class Validator(EvtHandler):
093d3ff1 8142 """Proxy of C++ Validator class"""
e811c8ce
RD
8143 def __repr__(self):
8144 return "<%s.%s; proxy of C++ wxValidator instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
8145 def __init__(self, *args, **kwargs):
a95a7133 8146 """__init__(self) -> Validator"""
54f9ee45 8147 newobj = _core_.new_Validator(*args, **kwargs)
d14a1e28
RD
8148 self.this = newobj.this
8149 self.thisown = 1
8150 del newobj.thisown
8151 self._setOORInfo(self)
e811c8ce
RD
8152
8153 def Clone(*args, **kwargs):
a95a7133 8154 """Clone(self) -> Validator"""
54f9ee45 8155 return _core_.Validator_Clone(*args, **kwargs)
e811c8ce
RD
8156
8157 def Validate(*args, **kwargs):
a95a7133 8158 """Validate(self, Window parent) -> bool"""
54f9ee45 8159 return _core_.Validator_Validate(*args, **kwargs)
e811c8ce
RD
8160
8161 def TransferToWindow(*args, **kwargs):
a95a7133 8162 """TransferToWindow(self) -> bool"""
54f9ee45 8163 return _core_.Validator_TransferToWindow(*args, **kwargs)
e811c8ce
RD
8164
8165 def TransferFromWindow(*args, **kwargs):
a95a7133 8166 """TransferFromWindow(self) -> bool"""
54f9ee45 8167 return _core_.Validator_TransferFromWindow(*args, **kwargs)
e811c8ce
RD
8168
8169 def GetWindow(*args, **kwargs):
a95a7133 8170 """GetWindow(self) -> Window"""
54f9ee45 8171 return _core_.Validator_GetWindow(*args, **kwargs)
e811c8ce
RD
8172
8173 def SetWindow(*args, **kwargs):
a95a7133 8174 """SetWindow(self, Window window)"""
54f9ee45 8175 return _core_.Validator_SetWindow(*args, **kwargs)
e811c8ce
RD
8176
8177 def IsSilent(*args, **kwargs):
66c033b4 8178 """IsSilent() -> bool"""
54f9ee45 8179 return _core_.Validator_IsSilent(*args, **kwargs)
e811c8ce
RD
8180
8181 IsSilent = staticmethod(IsSilent)
8182 def SetBellOnError(*args, **kwargs):
66c033b4 8183 """SetBellOnError(int doIt=True)"""
54f9ee45 8184 return _core_.Validator_SetBellOnError(*args, **kwargs)
e811c8ce
RD
8185
8186 SetBellOnError = staticmethod(SetBellOnError)
8187
8188class ValidatorPtr(Validator):
8189 def __init__(self, this):
8190 self.this = this
8191 if not hasattr(self,"thisown"): self.thisown = 0
8192 self.__class__ = Validator
54f9ee45 8193_core_.Validator_swigregister(ValidatorPtr)
e811c8ce
RD
8194
8195def Validator_IsSilent(*args, **kwargs):
8196 """Validator_IsSilent() -> bool"""
54f9ee45 8197 return _core_.Validator_IsSilent(*args, **kwargs)
e811c8ce
RD
8198
8199def Validator_SetBellOnError(*args, **kwargs):
8200 """Validator_SetBellOnError(int doIt=True)"""
54f9ee45 8201 return _core_.Validator_SetBellOnError(*args, **kwargs)
e811c8ce
RD
8202
8203class PyValidator(Validator):
093d3ff1 8204 """Proxy of C++ PyValidator class"""
e811c8ce
RD
8205 def __repr__(self):
8206 return "<%s.%s; proxy of C++ wxPyValidator instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
8207 def __init__(self, *args, **kwargs):
a95a7133 8208 """__init__(self) -> PyValidator"""
54f9ee45 8209 newobj = _core_.new_PyValidator(*args, **kwargs)
e811c8ce
RD
8210 self.this = newobj.this
8211 self.thisown = 1
8212 del newobj.thisown
8213
8214 self._setCallbackInfo(self, PyValidator, 1)
8215 self._setOORInfo(self)
8216
8217 def _setCallbackInfo(*args, **kwargs):
a95a7133 8218 """_setCallbackInfo(self, PyObject self, PyObject _class, int incref=True)"""
54f9ee45 8219 return _core_.PyValidator__setCallbackInfo(*args, **kwargs)
e811c8ce
RD
8220
8221
8222class PyValidatorPtr(PyValidator):
8223 def __init__(self, this):
8224 self.this = this
8225 if not hasattr(self,"thisown"): self.thisown = 0
8226 self.__class__ = PyValidator
54f9ee45 8227_core_.PyValidator_swigregister(PyValidatorPtr)
e811c8ce
RD
8228
8229#---------------------------------------------------------------------------
8230
8231class Menu(EvtHandler):
093d3ff1 8232 """Proxy of C++ Menu class"""
d14a1e28
RD
8233 def __repr__(self):
8234 return "<%s.%s; proxy of C++ wxMenu instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
e811c8ce 8235 def __init__(self, *args, **kwargs):
a95a7133 8236 """__init__(self, String title=EmptyString, long style=0) -> Menu"""
54f9ee45 8237 newobj = _core_.new_Menu(*args, **kwargs)
e811c8ce
RD
8238 self.this = newobj.this
8239 self.thisown = 1
8240 del newobj.thisown
8241 self._setOORInfo(self)
8242
8243 def Append(*args, **kwargs):
a95a7133 8244 """Append(self, int id, String text, String help=EmptyString, int kind=ITEM_NORMAL) -> MenuItem"""
54f9ee45 8245 return _core_.Menu_Append(*args, **kwargs)
e811c8ce
RD
8246
8247 def AppendSeparator(*args, **kwargs):
a95a7133 8248 """AppendSeparator(self) -> MenuItem"""
54f9ee45 8249 return _core_.Menu_AppendSeparator(*args, **kwargs)
e811c8ce
RD
8250
8251 def AppendCheckItem(*args, **kwargs):
a95a7133 8252 """AppendCheckItem(self, int id, String text, String help=EmptyString) -> MenuItem"""
54f9ee45 8253 return _core_.Menu_AppendCheckItem(*args, **kwargs)
e811c8ce
RD
8254
8255 def AppendRadioItem(*args, **kwargs):
a95a7133 8256 """AppendRadioItem(self, int id, String text, String help=EmptyString) -> MenuItem"""
54f9ee45 8257 return _core_.Menu_AppendRadioItem(*args, **kwargs)
e811c8ce
RD
8258
8259 def AppendMenu(*args, **kwargs):
a95a7133 8260 """AppendMenu(self, int id, String text, Menu submenu, String help=EmptyString) -> MenuItem"""
54f9ee45 8261 return _core_.Menu_AppendMenu(*args, **kwargs)
e811c8ce
RD
8262
8263 def AppendItem(*args, **kwargs):
a95a7133 8264 """AppendItem(self, MenuItem item) -> MenuItem"""
54f9ee45 8265 return _core_.Menu_AppendItem(*args, **kwargs)
e811c8ce
RD
8266
8267 def Break(*args, **kwargs):
a95a7133 8268 """Break(self)"""
54f9ee45 8269 return _core_.Menu_Break(*args, **kwargs)
e811c8ce
RD
8270
8271 def InsertItem(*args, **kwargs):
a95a7133 8272 """InsertItem(self, size_t pos, MenuItem item) -> MenuItem"""
54f9ee45 8273 return _core_.Menu_InsertItem(*args, **kwargs)
e811c8ce
RD
8274
8275 def Insert(*args, **kwargs):
0df68c9f 8276 """
a95a7133 8277 Insert(self, size_t pos, int id, String text, String help=EmptyString,
a41e16b6 8278 int kind=ITEM_NORMAL) -> MenuItem
0df68c9f 8279 """
54f9ee45 8280 return _core_.Menu_Insert(*args, **kwargs)
e811c8ce
RD
8281
8282 def InsertSeparator(*args, **kwargs):
a95a7133 8283 """InsertSeparator(self, size_t pos) -> MenuItem"""
54f9ee45 8284 return _core_.Menu_InsertSeparator(*args, **kwargs)
e811c8ce
RD
8285
8286 def InsertCheckItem(*args, **kwargs):
a95a7133 8287 """InsertCheckItem(self, size_t pos, int id, String text, String help=EmptyString) -> MenuItem"""
54f9ee45 8288 return _core_.Menu_InsertCheckItem(*args, **kwargs)
e811c8ce
RD
8289
8290 def InsertRadioItem(*args, **kwargs):
a95a7133 8291 """InsertRadioItem(self, size_t pos, int id, String text, String help=EmptyString) -> MenuItem"""
54f9ee45 8292 return _core_.Menu_InsertRadioItem(*args, **kwargs)
e811c8ce
RD
8293
8294 def InsertMenu(*args, **kwargs):
a95a7133 8295 """InsertMenu(self, size_t pos, int id, String text, Menu submenu, String help=EmptyString) -> MenuItem"""
54f9ee45 8296 return _core_.Menu_InsertMenu(*args, **kwargs)
e811c8ce
RD
8297
8298 def PrependItem(*args, **kwargs):
a95a7133 8299 """PrependItem(self, MenuItem item) -> MenuItem"""
54f9ee45 8300 return _core_.Menu_PrependItem(*args, **kwargs)
e811c8ce
RD
8301
8302 def Prepend(*args, **kwargs):
a95a7133 8303 """Prepend(self, int id, String text, String help=EmptyString, int kind=ITEM_NORMAL) -> MenuItem"""
54f9ee45 8304 return _core_.Menu_Prepend(*args, **kwargs)
e811c8ce
RD
8305
8306 def PrependSeparator(*args, **kwargs):
a95a7133 8307 """PrependSeparator(self) -> MenuItem"""
54f9ee45 8308 return _core_.Menu_PrependSeparator(*args, **kwargs)
e811c8ce
RD
8309
8310 def PrependCheckItem(*args, **kwargs):
a95a7133 8311 """PrependCheckItem(self, int id, String text, String help=EmptyString) -> MenuItem"""
54f9ee45 8312 return _core_.Menu_PrependCheckItem(*args, **kwargs)
e811c8ce
RD
8313
8314 def PrependRadioItem(*args, **kwargs):
a95a7133 8315 """PrependRadioItem(self, int id, String text, String help=EmptyString) -> MenuItem"""
54f9ee45 8316 return _core_.Menu_PrependRadioItem(*args, **kwargs)
e811c8ce
RD
8317
8318 def PrependMenu(*args, **kwargs):
a95a7133 8319 """PrependMenu(self, int id, String text, Menu submenu, String help=EmptyString) -> MenuItem"""
54f9ee45 8320 return _core_.Menu_PrependMenu(*args, **kwargs)
e811c8ce
RD
8321
8322 def Remove(*args, **kwargs):
a95a7133 8323 """Remove(self, int id) -> MenuItem"""
54f9ee45 8324 return _core_.Menu_Remove(*args, **kwargs)
e811c8ce
RD
8325
8326 def RemoveItem(*args, **kwargs):
a95a7133 8327 """RemoveItem(self, MenuItem item) -> MenuItem"""
54f9ee45 8328 return _core_.Menu_RemoveItem(*args, **kwargs)
e811c8ce
RD
8329
8330 def Delete(*args, **kwargs):
a95a7133 8331 """Delete(self, int id) -> bool"""
54f9ee45 8332 return _core_.Menu_Delete(*args, **kwargs)
e811c8ce
RD
8333
8334 def DeleteItem(*args, **kwargs):
a95a7133 8335 """DeleteItem(self, MenuItem item) -> bool"""
54f9ee45 8336 return _core_.Menu_DeleteItem(*args, **kwargs)
e811c8ce
RD
8337
8338 def Destroy(*args, **kwargs):
0df68c9f 8339 """
a95a7133 8340 Destroy(self)
e811c8ce 8341
0df68c9f
RD
8342 Deletes the C++ object this Python object is a proxy for.
8343 """
54f9ee45 8344 return _core_.Menu_Destroy(*args, **kwargs)
e811c8ce
RD
8345
8346 def DestroyId(*args, **kwargs):
0df68c9f 8347 """
a95a7133 8348 DestroyId(self, int id) -> bool
e811c8ce 8349
0df68c9f
RD
8350 Deletes the C++ object this Python object is a proxy for.
8351 """
54f9ee45 8352 return _core_.Menu_DestroyId(*args, **kwargs)
e811c8ce
RD
8353
8354 def DestroyItem(*args, **kwargs):
0df68c9f 8355 """
a95a7133 8356 DestroyItem(self, MenuItem item) -> bool
e811c8ce 8357
0df68c9f
RD
8358 Deletes the C++ object this Python object is a proxy for.
8359 """
54f9ee45 8360 return _core_.Menu_DestroyItem(*args, **kwargs)
e811c8ce
RD
8361
8362 def GetMenuItemCount(*args, **kwargs):
a95a7133 8363 """GetMenuItemCount(self) -> size_t"""
54f9ee45 8364 return _core_.Menu_GetMenuItemCount(*args, **kwargs)
e811c8ce
RD
8365
8366 def GetMenuItems(*args, **kwargs):
a95a7133 8367 """GetMenuItems(self) -> PyObject"""
54f9ee45 8368 return _core_.Menu_GetMenuItems(*args, **kwargs)
e811c8ce
RD
8369
8370 def FindItem(*args, **kwargs):
a95a7133 8371 """FindItem(self, String item) -> int"""
54f9ee45 8372 return _core_.Menu_FindItem(*args, **kwargs)
e811c8ce
RD
8373
8374 def FindItemById(*args, **kwargs):
a95a7133 8375 """FindItemById(self, int id) -> MenuItem"""
54f9ee45 8376 return _core_.Menu_FindItemById(*args, **kwargs)
e811c8ce
RD
8377
8378 def FindItemByPosition(*args, **kwargs):
a95a7133 8379 """FindItemByPosition(self, size_t position) -> MenuItem"""
54f9ee45 8380 return _core_.Menu_FindItemByPosition(*args, **kwargs)
e811c8ce
RD
8381
8382 def Enable(*args, **kwargs):
a95a7133 8383 """Enable(self, int id, bool enable)"""
54f9ee45 8384 return _core_.Menu_Enable(*args, **kwargs)
e811c8ce
RD
8385
8386 def IsEnabled(*args, **kwargs):
a95a7133 8387 """IsEnabled(self, int id) -> bool"""
54f9ee45 8388 return _core_.Menu_IsEnabled(*args, **kwargs)
e811c8ce
RD
8389
8390 def Check(*args, **kwargs):
a95a7133 8391 """Check(self, int id, bool check)"""
54f9ee45 8392 return _core_.Menu_Check(*args, **kwargs)
e811c8ce
RD
8393
8394 def IsChecked(*args, **kwargs):
a95a7133 8395 """IsChecked(self, int id) -> bool"""
54f9ee45 8396 return _core_.Menu_IsChecked(*args, **kwargs)
e811c8ce
RD
8397
8398 def SetLabel(*args, **kwargs):
a95a7133 8399 """SetLabel(self, int id, String label)"""
54f9ee45 8400 return _core_.Menu_SetLabel(*args, **kwargs)
e811c8ce
RD
8401
8402 def GetLabel(*args, **kwargs):
a95a7133 8403 """GetLabel(self, int id) -> String"""
54f9ee45 8404 return _core_.Menu_GetLabel(*args, **kwargs)
e811c8ce
RD
8405
8406 def SetHelpString(*args, **kwargs):
a95a7133 8407 """SetHelpString(self, int id, String helpString)"""
54f9ee45 8408 return _core_.Menu_SetHelpString(*args, **kwargs)
e811c8ce
RD
8409
8410 def GetHelpString(*args, **kwargs):
a95a7133 8411 """GetHelpString(self, int id) -> String"""
54f9ee45 8412 return _core_.Menu_GetHelpString(*args, **kwargs)
e811c8ce
RD
8413
8414 def SetTitle(*args, **kwargs):
a95a7133 8415 """SetTitle(self, String title)"""
54f9ee45 8416 return _core_.Menu_SetTitle(*args, **kwargs)
e811c8ce
RD
8417
8418 def GetTitle(*args, **kwargs):
a95a7133 8419 """GetTitle(self) -> String"""
54f9ee45 8420 return _core_.Menu_GetTitle(*args, **kwargs)
e811c8ce
RD
8421
8422 def SetEventHandler(*args, **kwargs):
a95a7133 8423 """SetEventHandler(self, EvtHandler handler)"""
54f9ee45 8424 return _core_.Menu_SetEventHandler(*args, **kwargs)
e811c8ce
RD
8425
8426 def GetEventHandler(*args, **kwargs):
a95a7133 8427 """GetEventHandler(self) -> EvtHandler"""
54f9ee45 8428 return _core_.Menu_GetEventHandler(*args, **kwargs)
e811c8ce
RD
8429
8430 def SetInvokingWindow(*args, **kwargs):
a95a7133 8431 """SetInvokingWindow(self, Window win)"""
54f9ee45 8432 return _core_.Menu_SetInvokingWindow(*args, **kwargs)
e811c8ce
RD
8433
8434 def GetInvokingWindow(*args, **kwargs):
a95a7133 8435 """GetInvokingWindow(self) -> Window"""
54f9ee45 8436 return _core_.Menu_GetInvokingWindow(*args, **kwargs)
e811c8ce
RD
8437
8438 def GetStyle(*args, **kwargs):
a95a7133 8439 """GetStyle(self) -> long"""
54f9ee45 8440 return _core_.Menu_GetStyle(*args, **kwargs)
e811c8ce
RD
8441
8442 def UpdateUI(*args, **kwargs):
a95a7133 8443 """UpdateUI(self, EvtHandler source=None)"""
54f9ee45 8444 return _core_.Menu_UpdateUI(*args, **kwargs)
e811c8ce
RD
8445
8446 def GetMenuBar(*args, **kwargs):
a95a7133 8447 """GetMenuBar(self) -> MenuBar"""
54f9ee45 8448 return _core_.Menu_GetMenuBar(*args, **kwargs)
e811c8ce
RD
8449
8450 def Attach(*args, **kwargs):
a95a7133 8451 """Attach(self, wxMenuBarBase menubar)"""
54f9ee45 8452 return _core_.Menu_Attach(*args, **kwargs)
e811c8ce
RD
8453
8454 def Detach(*args, **kwargs):
a95a7133 8455 """Detach(self)"""
54f9ee45 8456 return _core_.Menu_Detach(*args, **kwargs)
e811c8ce
RD
8457
8458 def IsAttached(*args, **kwargs):
a95a7133 8459 """IsAttached(self) -> bool"""
54f9ee45 8460 return _core_.Menu_IsAttached(*args, **kwargs)
e811c8ce
RD
8461
8462 def SetParent(*args, **kwargs):
a95a7133 8463 """SetParent(self, Menu parent)"""
54f9ee45 8464 return _core_.Menu_SetParent(*args, **kwargs)
e811c8ce
RD
8465
8466 def GetParent(*args, **kwargs):
a95a7133 8467 """GetParent(self) -> Menu"""
54f9ee45 8468 return _core_.Menu_GetParent(*args, **kwargs)
e811c8ce 8469
d14a1e28
RD
8470
8471class MenuPtr(Menu):
8472 def __init__(self, this):
8473 self.this = this
8474 if not hasattr(self,"thisown"): self.thisown = 0
8475 self.__class__ = Menu
54f9ee45 8476_core_.Menu_swigregister(MenuPtr)
d14a1e28
RD
8477DefaultValidator = cvar.DefaultValidator
8478
8479#---------------------------------------------------------------------------
8480
8481class MenuBar(Window):
093d3ff1 8482 """Proxy of C++ MenuBar class"""
e811c8ce
RD
8483 def __repr__(self):
8484 return "<%s.%s; proxy of C++ wxMenuBar instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 8485 def __init__(self, *args, **kwargs):
a95a7133 8486 """__init__(self, long style=0) -> MenuBar"""
54f9ee45 8487 newobj = _core_.new_MenuBar(*args, **kwargs)
d14a1e28
RD
8488 self.this = newobj.this
8489 self.thisown = 1
8490 del newobj.thisown
8491 self._setOORInfo(self)
e811c8ce
RD
8492
8493 def Append(*args, **kwargs):
a95a7133 8494 """Append(self, Menu menu, String title) -> bool"""
54f9ee45 8495 return _core_.MenuBar_Append(*args, **kwargs)
e811c8ce
RD
8496
8497 def Insert(*args, **kwargs):
a95a7133 8498 """Insert(self, size_t pos, Menu menu, String title) -> bool"""
54f9ee45 8499 return _core_.MenuBar_Insert(*args, **kwargs)
e811c8ce
RD
8500
8501 def GetMenuCount(*args, **kwargs):
a95a7133 8502 """GetMenuCount(self) -> size_t"""
54f9ee45 8503 return _core_.MenuBar_GetMenuCount(*args, **kwargs)
e811c8ce
RD
8504
8505 def GetMenu(*args, **kwargs):
a95a7133 8506 """GetMenu(self, size_t pos) -> Menu"""
54f9ee45 8507 return _core_.MenuBar_GetMenu(*args, **kwargs)
e811c8ce
RD
8508
8509 def Replace(*args, **kwargs):
a95a7133 8510 """Replace(self, size_t pos, Menu menu, String title) -> Menu"""
54f9ee45 8511 return _core_.MenuBar_Replace(*args, **kwargs)
e811c8ce
RD
8512
8513 def Remove(*args, **kwargs):
a95a7133 8514 """Remove(self, size_t pos) -> Menu"""
54f9ee45 8515 return _core_.MenuBar_Remove(*args, **kwargs)
e811c8ce
RD
8516
8517 def EnableTop(*args, **kwargs):
a95a7133 8518 """EnableTop(self, size_t pos, bool enable)"""
54f9ee45 8519 return _core_.MenuBar_EnableTop(*args, **kwargs)
e811c8ce
RD
8520
8521 def IsEnabledTop(*args, **kwargs):
a95a7133 8522 """IsEnabledTop(self, size_t pos) -> bool"""
54f9ee45 8523 return _core_.MenuBar_IsEnabledTop(*args, **kwargs)
e811c8ce
RD
8524
8525 def SetLabelTop(*args, **kwargs):
a95a7133 8526 """SetLabelTop(self, size_t pos, String label)"""
54f9ee45 8527 return _core_.MenuBar_SetLabelTop(*args, **kwargs)
e811c8ce
RD
8528
8529 def GetLabelTop(*args, **kwargs):
a95a7133 8530 """GetLabelTop(self, size_t pos) -> String"""
54f9ee45 8531 return _core_.MenuBar_GetLabelTop(*args, **kwargs)
e811c8ce
RD
8532
8533 def FindMenuItem(*args, **kwargs):
a95a7133 8534 """FindMenuItem(self, String menu, String item) -> int"""
54f9ee45 8535 return _core_.MenuBar_FindMenuItem(*args, **kwargs)
e811c8ce
RD
8536
8537 def FindItemById(*args, **kwargs):
a95a7133 8538 """FindItemById(self, int id) -> MenuItem"""
54f9ee45 8539 return _core_.MenuBar_FindItemById(*args, **kwargs)
e811c8ce
RD
8540
8541 def FindMenu(*args, **kwargs):
a95a7133 8542 """FindMenu(self, String title) -> int"""
54f9ee45 8543 return _core_.MenuBar_FindMenu(*args, **kwargs)
e811c8ce
RD
8544
8545 def Enable(*args, **kwargs):
a95a7133 8546 """Enable(self, int id, bool enable)"""
54f9ee45 8547 return _core_.MenuBar_Enable(*args, **kwargs)
e811c8ce
RD
8548
8549 def Check(*args, **kwargs):
a95a7133 8550 """Check(self, int id, bool check)"""
54f9ee45 8551 return _core_.MenuBar_Check(*args, **kwargs)
e811c8ce
RD
8552
8553 def IsChecked(*args, **kwargs):
a95a7133 8554 """IsChecked(self, int id) -> bool"""
54f9ee45 8555 return _core_.MenuBar_IsChecked(*args, **kwargs)
e811c8ce
RD
8556
8557 def IsEnabled(*args, **kwargs):
a95a7133 8558 """IsEnabled(self, int id) -> bool"""
54f9ee45 8559 return _core_.MenuBar_IsEnabled(*args, **kwargs)
e811c8ce
RD
8560
8561 def SetLabel(*args, **kwargs):
a95a7133 8562 """SetLabel(self, int id, String label)"""
54f9ee45 8563 return _core_.MenuBar_SetLabel(*args, **kwargs)
e811c8ce
RD
8564
8565 def GetLabel(*args, **kwargs):
a95a7133 8566 """GetLabel(self, int id) -> String"""
54f9ee45 8567 return _core_.MenuBar_GetLabel(*args, **kwargs)
e811c8ce
RD
8568
8569 def SetHelpString(*args, **kwargs):
a95a7133 8570 """SetHelpString(self, int id, String helpString)"""
54f9ee45 8571 return _core_.MenuBar_SetHelpString(*args, **kwargs)
e811c8ce
RD
8572
8573 def GetHelpString(*args, **kwargs):
a95a7133 8574 """GetHelpString(self, int id) -> String"""
54f9ee45 8575 return _core_.MenuBar_GetHelpString(*args, **kwargs)
e811c8ce
RD
8576
8577 def GetFrame(*args, **kwargs):
a95a7133 8578 """GetFrame(self) -> wxFrame"""
54f9ee45 8579 return _core_.MenuBar_GetFrame(*args, **kwargs)
e811c8ce
RD
8580
8581 def IsAttached(*args, **kwargs):
a95a7133 8582 """IsAttached(self) -> bool"""
54f9ee45 8583 return _core_.MenuBar_IsAttached(*args, **kwargs)
e811c8ce
RD
8584
8585 def Attach(*args, **kwargs):
a95a7133 8586 """Attach(self, wxFrame frame)"""
54f9ee45 8587 return _core_.MenuBar_Attach(*args, **kwargs)
e811c8ce
RD
8588
8589 def Detach(*args, **kwargs):
a95a7133 8590 """Detach(self)"""
54f9ee45 8591 return _core_.MenuBar_Detach(*args, **kwargs)
e811c8ce 8592
d14a1e28
RD
8593
8594class MenuBarPtr(MenuBar):
8595 def __init__(self, this):
8596 self.this = this
8597 if not hasattr(self,"thisown"): self.thisown = 0
8598 self.__class__ = MenuBar
54f9ee45 8599_core_.MenuBar_swigregister(MenuBarPtr)
d14a1e28
RD
8600
8601#---------------------------------------------------------------------------
8602
8603class MenuItem(Object):
093d3ff1 8604 """Proxy of C++ MenuItem class"""
e811c8ce
RD
8605 def __repr__(self):
8606 return "<%s.%s; proxy of C++ wxMenuItem instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 8607 def __init__(self, *args, **kwargs):
0df68c9f 8608 """
a95a7133 8609 __init__(self, Menu parentMenu=None, int id=ID_ANY, String text=EmptyString,
196addbf
RD
8610 String help=EmptyString, int kind=ITEM_NORMAL,
8611 Menu subMenu=None) -> MenuItem
0df68c9f 8612 """
54f9ee45 8613 newobj = _core_.new_MenuItem(*args, **kwargs)
d14a1e28
RD
8614 self.this = newobj.this
8615 self.thisown = 1
8616 del newobj.thisown
e811c8ce 8617 def GetMenu(*args, **kwargs):
a95a7133 8618 """GetMenu(self) -> Menu"""
54f9ee45 8619 return _core_.MenuItem_GetMenu(*args, **kwargs)
e811c8ce
RD
8620
8621 def SetMenu(*args, **kwargs):
a95a7133 8622 """SetMenu(self, Menu menu)"""
54f9ee45 8623 return _core_.MenuItem_SetMenu(*args, **kwargs)
e811c8ce
RD
8624
8625 def SetId(*args, **kwargs):
a95a7133 8626 """SetId(self, int id)"""
54f9ee45 8627 return _core_.MenuItem_SetId(*args, **kwargs)
e811c8ce
RD
8628
8629 def GetId(*args, **kwargs):
a95a7133 8630 """GetId(self) -> int"""
54f9ee45 8631 return _core_.MenuItem_GetId(*args, **kwargs)
e811c8ce
RD
8632
8633 def IsSeparator(*args, **kwargs):
a95a7133 8634 """IsSeparator(self) -> bool"""
54f9ee45 8635 return _core_.MenuItem_IsSeparator(*args, **kwargs)
e811c8ce
RD
8636
8637 def SetText(*args, **kwargs):
a95a7133 8638 """SetText(self, String str)"""
54f9ee45 8639 return _core_.MenuItem_SetText(*args, **kwargs)
e811c8ce
RD
8640
8641 def GetLabel(*args, **kwargs):
a95a7133 8642 """GetLabel(self) -> String"""
54f9ee45 8643 return _core_.MenuItem_GetLabel(*args, **kwargs)
e811c8ce
RD
8644
8645 def GetText(*args, **kwargs):
a95a7133 8646 """GetText(self) -> String"""
54f9ee45 8647 return _core_.MenuItem_GetText(*args, **kwargs)
e811c8ce
RD
8648
8649 def GetLabelFromText(*args, **kwargs):
66c033b4 8650 """GetLabelFromText(String text) -> String"""
54f9ee45 8651 return _core_.MenuItem_GetLabelFromText(*args, **kwargs)
e811c8ce
RD
8652
8653 GetLabelFromText = staticmethod(GetLabelFromText)
8654 def GetKind(*args, **kwargs):
a95a7133 8655 """GetKind(self) -> int"""
54f9ee45 8656 return _core_.MenuItem_GetKind(*args, **kwargs)
e811c8ce 8657
a95a7133
RD
8658 def SetKind(*args, **kwargs):
8659 """SetKind(self, int kind)"""
54f9ee45 8660 return _core_.MenuItem_SetKind(*args, **kwargs)
a95a7133 8661
e811c8ce 8662 def SetCheckable(*args, **kwargs):
a95a7133 8663 """SetCheckable(self, bool checkable)"""
54f9ee45 8664 return _core_.MenuItem_SetCheckable(*args, **kwargs)
e811c8ce
RD
8665
8666 def IsCheckable(*args, **kwargs):
a95a7133 8667 """IsCheckable(self) -> bool"""
54f9ee45 8668 return _core_.MenuItem_IsCheckable(*args, **kwargs)
e811c8ce
RD
8669
8670 def IsSubMenu(*args, **kwargs):
a95a7133 8671 """IsSubMenu(self) -> bool"""
54f9ee45 8672 return _core_.MenuItem_IsSubMenu(*args, **kwargs)
e811c8ce
RD
8673
8674 def SetSubMenu(*args, **kwargs):
a95a7133 8675 """SetSubMenu(self, Menu menu)"""
54f9ee45 8676 return _core_.MenuItem_SetSubMenu(*args, **kwargs)
e811c8ce
RD
8677
8678 def GetSubMenu(*args, **kwargs):
a95a7133 8679 """GetSubMenu(self) -> Menu"""
54f9ee45 8680 return _core_.MenuItem_GetSubMenu(*args, **kwargs)
e811c8ce
RD
8681
8682 def Enable(*args, **kwargs):
a95a7133 8683 """Enable(self, bool enable=True)"""
54f9ee45 8684 return _core_.MenuItem_Enable(*args, **kwargs)
e811c8ce
RD
8685
8686 def IsEnabled(*args, **kwargs):
a95a7133 8687 """IsEnabled(self) -> bool"""
54f9ee45 8688 return _core_.MenuItem_IsEnabled(*args, **kwargs)
e811c8ce
RD
8689
8690 def Check(*args, **kwargs):
a95a7133 8691 """Check(self, bool check=True)"""
54f9ee45 8692 return _core_.MenuItem_Check(*args, **kwargs)
e811c8ce
RD
8693
8694 def IsChecked(*args, **kwargs):
a95a7133 8695 """IsChecked(self) -> bool"""
54f9ee45 8696 return _core_.MenuItem_IsChecked(*args, **kwargs)
e811c8ce
RD
8697
8698 def Toggle(*args, **kwargs):
a95a7133 8699 """Toggle(self)"""
54f9ee45 8700 return _core_.MenuItem_Toggle(*args, **kwargs)
e811c8ce
RD
8701
8702 def SetHelp(*args, **kwargs):
a95a7133 8703 """SetHelp(self, String str)"""
54f9ee45 8704 return _core_.MenuItem_SetHelp(*args, **kwargs)
e811c8ce
RD
8705
8706 def GetHelp(*args, **kwargs):
a95a7133 8707 """GetHelp(self) -> String"""
54f9ee45 8708 return _core_.MenuItem_GetHelp(*args, **kwargs)
e811c8ce
RD
8709
8710 def GetAccel(*args, **kwargs):
a95a7133 8711 """GetAccel(self) -> AcceleratorEntry"""
54f9ee45 8712 return _core_.MenuItem_GetAccel(*args, **kwargs)
e811c8ce
RD
8713
8714 def SetAccel(*args, **kwargs):
a95a7133 8715 """SetAccel(self, AcceleratorEntry accel)"""
54f9ee45 8716 return _core_.MenuItem_SetAccel(*args, **kwargs)
e811c8ce 8717
c1280d1e
RD
8718 def SetFont(*args, **kwargs):
8719 """SetFont(self, Font font)"""
8720 return _core_.MenuItem_SetFont(*args, **kwargs)
8721
8722 def GetFont(*args, **kwargs):
8723 """GetFont(self) -> Font"""
8724 return _core_.MenuItem_GetFont(*args, **kwargs)
8725
8726 def SetTextColour(*args, **kwargs):
8727 """SetTextColour(self, Colour colText)"""
8728 return _core_.MenuItem_SetTextColour(*args, **kwargs)
8729
8730 def GetTextColour(*args, **kwargs):
8731 """GetTextColour(self) -> Colour"""
8732 return _core_.MenuItem_GetTextColour(*args, **kwargs)
8733
8734 def SetBackgroundColour(*args, **kwargs):
8735 """SetBackgroundColour(self, Colour colBack)"""
8736 return _core_.MenuItem_SetBackgroundColour(*args, **kwargs)
8737
8738 def GetBackgroundColour(*args, **kwargs):
8739 """GetBackgroundColour(self) -> Colour"""
8740 return _core_.MenuItem_GetBackgroundColour(*args, **kwargs)
8741
8742 def SetBitmaps(*args, **kwargs):
8743 """SetBitmaps(self, Bitmap bmpChecked, Bitmap bmpUnchecked=wxNullBitmap)"""
8744 return _core_.MenuItem_SetBitmaps(*args, **kwargs)
8745
8746 def SetDisabledBitmap(*args, **kwargs):
8747 """SetDisabledBitmap(self, Bitmap bmpDisabled)"""
8748 return _core_.MenuItem_SetDisabledBitmap(*args, **kwargs)
8749
8750 def GetDisabledBitmap(*args, **kwargs):
8751 """GetDisabledBitmap(self) -> Bitmap"""
8752 return _core_.MenuItem_GetDisabledBitmap(*args, **kwargs)
8753
8754 def SetMarginWidth(*args, **kwargs):
8755 """SetMarginWidth(self, int nWidth)"""
8756 return _core_.MenuItem_SetMarginWidth(*args, **kwargs)
8757
8758 def GetMarginWidth(*args, **kwargs):
8759 """GetMarginWidth(self) -> int"""
8760 return _core_.MenuItem_GetMarginWidth(*args, **kwargs)
8761
e811c8ce 8762 def GetDefaultMarginWidth(*args, **kwargs):
66c033b4 8763 """GetDefaultMarginWidth() -> int"""
54f9ee45 8764 return _core_.MenuItem_GetDefaultMarginWidth(*args, **kwargs)
e811c8ce
RD
8765
8766 GetDefaultMarginWidth = staticmethod(GetDefaultMarginWidth)
c1280d1e
RD
8767 def IsOwnerDrawn(*args, **kwargs):
8768 """IsOwnerDrawn(self) -> bool"""
8769 return _core_.MenuItem_IsOwnerDrawn(*args, **kwargs)
8770
8771 def SetOwnerDrawn(*args, **kwargs):
8772 """SetOwnerDrawn(self, bool ownerDrawn=True)"""
8773 return _core_.MenuItem_SetOwnerDrawn(*args, **kwargs)
8774
8775 def ResetOwnerDrawn(*args, **kwargs):
8776 """ResetOwnerDrawn(self)"""
8777 return _core_.MenuItem_ResetOwnerDrawn(*args, **kwargs)
8778
e811c8ce 8779 def SetBitmap(*args, **kwargs):
a95a7133 8780 """SetBitmap(self, Bitmap bitmap)"""
54f9ee45 8781 return _core_.MenuItem_SetBitmap(*args, **kwargs)
e811c8ce
RD
8782
8783 def GetBitmap(*args, **kwargs):
a95a7133 8784 """GetBitmap(self) -> Bitmap"""
54f9ee45 8785 return _core_.MenuItem_GetBitmap(*args, **kwargs)
e811c8ce 8786
d14a1e28
RD
8787
8788class MenuItemPtr(MenuItem):
8789 def __init__(self, this):
8790 self.this = this
8791 if not hasattr(self,"thisown"): self.thisown = 0
8792 self.__class__ = MenuItem
54f9ee45 8793_core_.MenuItem_swigregister(MenuItemPtr)
d14a1e28 8794
e811c8ce 8795def MenuItem_GetLabelFromText(*args, **kwargs):
196addbf 8796 """MenuItem_GetLabelFromText(String text) -> String"""
54f9ee45 8797 return _core_.MenuItem_GetLabelFromText(*args, **kwargs)
d14a1e28 8798
e811c8ce
RD
8799def MenuItem_GetDefaultMarginWidth(*args, **kwargs):
8800 """MenuItem_GetDefaultMarginWidth() -> int"""
54f9ee45 8801 return _core_.MenuItem_GetDefaultMarginWidth(*args, **kwargs)
d14a1e28
RD
8802
8803#---------------------------------------------------------------------------
8804
8805class Control(Window):
15afbcd0
RD
8806 """
8807 This is the base class for a control or 'widget'.
8808
41e2b43e
RD
8809 A control is generally a small window which processes user input
8810 and/or displays one or more item of data.
15afbcd0 8811 """
e811c8ce
RD
8812 def __repr__(self):
8813 return "<%s.%s; proxy of C++ wxControl instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 8814 def __init__(self, *args, **kwargs):
0df68c9f 8815 """
248ed943
RD
8816 __init__(self, Window parent, int id=-1, Point pos=DefaultPosition,
8817 Size size=DefaultSize, long style=0, Validator validator=DefaultValidator,
b2dc1044 8818 String name=ControlNameStr) -> Control
15afbcd0 8819
41e2b43e
RD
8820 Create a Control. Normally you should only call this from a subclass'
8821 __init__ as a plain old wx.Control is not very useful.
0df68c9f 8822 """
54f9ee45 8823 newobj = _core_.new_Control(*args, **kwargs)
d14a1e28
RD
8824 self.this = newobj.this
8825 self.thisown = 1
8826 del newobj.thisown
8827 self._setOORInfo(self)
e811c8ce
RD
8828
8829 def Create(*args, **kwargs):
0df68c9f 8830 """
248ed943
RD
8831 Create(self, Window parent, int id=-1, Point pos=DefaultPosition,
8832 Size size=DefaultSize, long style=0, Validator validator=DefaultValidator,
b2dc1044 8833 String name=ControlNameStr) -> bool
15afbcd0
RD
8834
8835 Do the 2nd phase and create the GUI control.
0df68c9f 8836 """
54f9ee45 8837 return _core_.Control_Create(*args, **kwargs)
e811c8ce
RD
8838
8839 def Command(*args, **kwargs):
15afbcd0 8840 """
a95a7133 8841 Command(self, CommandEvent event)
15afbcd0 8842
41e2b43e
RD
8843 Simulates the effect of the user issuing a command to the item.
8844
8845 :see: `wx.CommandEvent`
8846
15afbcd0 8847 """
54f9ee45 8848 return _core_.Control_Command(*args, **kwargs)
e811c8ce
RD
8849
8850 def GetLabel(*args, **kwargs):
15afbcd0 8851 """
a95a7133 8852 GetLabel(self) -> String
15afbcd0
RD
8853
8854 Return a control's text.
8855 """
54f9ee45 8856 return _core_.Control_GetLabel(*args, **kwargs)
e811c8ce
RD
8857
8858 def SetLabel(*args, **kwargs):
15afbcd0 8859 """
a95a7133 8860 SetLabel(self, String label)
15afbcd0
RD
8861
8862 Sets the item's text.
8863 """
54f9ee45 8864 return _core_.Control_SetLabel(*args, **kwargs)
e811c8ce 8865
74a57fcd 8866 def GetClassDefaultAttributes(*args, **kwargs):
110da5b0
RD
8867 """
8868 GetClassDefaultAttributes(int variant=WINDOW_VARIANT_NORMAL) -> VisualAttributes
8869
8870 Get the default attributes for this class. This is useful if you want
8871 to use the same font or colour in your own control as in a standard
8872 control -- which is a much better idea than hard coding specific
8873 colours or fonts which might look completely out of place on the
8874 user's system, especially if it uses themes.
8875
8876 The variant parameter is only relevant under Mac currently and is
8877 ignore under other platforms. Under Mac, it will change the size of
8878 the returned font. See `wx.Window.SetWindowVariant` for more about
8879 this.
8880 """
54f9ee45 8881 return _core_.Control_GetClassDefaultAttributes(*args, **kwargs)
74a57fcd
RD
8882
8883 GetClassDefaultAttributes = staticmethod(GetClassDefaultAttributes)
d14a1e28
RD
8884
8885class ControlPtr(Control):
8886 def __init__(self, this):
8887 self.this = this
8888 if not hasattr(self,"thisown"): self.thisown = 0
8889 self.__class__ = Control
54f9ee45 8890_core_.Control_swigregister(ControlPtr)
b2dc1044 8891ControlNameStr = cvar.ControlNameStr
d14a1e28
RD
8892
8893def PreControl(*args, **kwargs):
15afbcd0
RD
8894 """
8895 PreControl() -> Control
8896
8897 Precreate a Control control for 2-phase creation
8898 """
54f9ee45 8899 val = _core_.new_PreControl(*args, **kwargs)
d14a1e28
RD
8900 val.thisown = 1
8901 return val
8902
74a57fcd 8903def Control_GetClassDefaultAttributes(*args, **kwargs):
110da5b0
RD
8904 """
8905 Control_GetClassDefaultAttributes(int variant=WINDOW_VARIANT_NORMAL) -> VisualAttributes
8906
8907 Get the default attributes for this class. This is useful if you want
8908 to use the same font or colour in your own control as in a standard
8909 control -- which is a much better idea than hard coding specific
8910 colours or fonts which might look completely out of place on the
8911 user's system, especially if it uses themes.
8912
8913 The variant parameter is only relevant under Mac currently and is
8914 ignore under other platforms. Under Mac, it will change the size of
8915 the returned font. See `wx.Window.SetWindowVariant` for more about
8916 this.
8917 """
54f9ee45 8918 return _core_.Control_GetClassDefaultAttributes(*args, **kwargs)
74a57fcd 8919
d14a1e28
RD
8920#---------------------------------------------------------------------------
8921
8922class ItemContainer(object):
15afbcd0 8923 """
53aa7709
RD
8924 The wx.ItemContainer class defines an interface which is implemented
8925 by all controls which have string subitems, each of which may be
8926 selected, such as `wx.ListBox`, `wx.CheckListBox`, `wx.Choice` as well
8927 as `wx.ComboBox` which implements an extended interface deriving from
41e2b43e 8928 this one.
15afbcd0 8929
41e2b43e
RD
8930 It defines the methods for accessing the control's items and although
8931 each of the derived classes implements them differently, they still
8932 all conform to the same interface.
15afbcd0 8933
41e2b43e
RD
8934 The items in a wx.ItemContainer have (non empty) string labels and,
8935 optionally, client data associated with them.
15afbcd0
RD
8936
8937 """
d14a1e28
RD
8938 def __init__(self): raise RuntimeError, "No constructor defined"
8939 def __repr__(self):
8940 return "<%s.%s; proxy of C++ wxItemContainer instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
e811c8ce 8941 def Append(*args, **kwargs):
15afbcd0 8942 """
a95a7133 8943 Append(self, String item, PyObject clientData=None) -> int
15afbcd0 8944
41e2b43e
RD
8945 Adds the item to the control, associating the given data with the item
8946 if not None. The return value is the index of the newly added item
8947 which may be different from the last one if the control is sorted (e.g.
8948 has wx.LB_SORT or wx.CB_SORT style).
15afbcd0 8949 """
54f9ee45 8950 return _core_.ItemContainer_Append(*args, **kwargs)
e811c8ce
RD
8951
8952 def AppendItems(*args, **kwargs):
15afbcd0 8953 """
f5b96ee1 8954 AppendItems(self, List strings)
15afbcd0 8955
41e2b43e
RD
8956 Apend several items at once to the control. Notice that calling this
8957 method may be much faster than appending the items one by one if you
8958 need to add a lot of items.
15afbcd0 8959 """
54f9ee45 8960 return _core_.ItemContainer_AppendItems(*args, **kwargs)
e811c8ce
RD
8961
8962 def Insert(*args, **kwargs):
15afbcd0 8963 """
a95a7133 8964 Insert(self, String item, int pos, PyObject clientData=None) -> int
15afbcd0 8965
41e2b43e 8966 Insert an item into the control before the item at the ``pos`` index,
15afbcd0
RD
8967 optionally associating some data object with the item.
8968 """
54f9ee45 8969 return _core_.ItemContainer_Insert(*args, **kwargs)
e811c8ce
RD
8970
8971 def Clear(*args, **kwargs):
15afbcd0 8972 """
a95a7133 8973 Clear(self)
15afbcd0
RD
8974
8975 Removes all items from the control.
8976 """
54f9ee45 8977 return _core_.ItemContainer_Clear(*args, **kwargs)
e811c8ce
RD
8978
8979 def Delete(*args, **kwargs):
15afbcd0 8980 """
a95a7133 8981 Delete(self, int n)
15afbcd0 8982
41e2b43e
RD
8983 Deletes the item at the zero-based index 'n' from the control. Note
8984 that it is an error (signalled by a `wx.PyAssertionError` exception if
8985 enabled) to remove an item with the index negative or greater or equal
8986 than the number of items in the control.
15afbcd0 8987 """
54f9ee45 8988 return _core_.ItemContainer_Delete(*args, **kwargs)
e811c8ce 8989
53aa7709
RD
8990 def GetClientData(*args, **kwargs):
8991 """
8992 GetClientData(self, int n) -> PyObject
8993
8994 Returns the client data associated with the given item, (if any.)
8995 """
8996 return _core_.ItemContainer_GetClientData(*args, **kwargs)
8997
8998 def SetClientData(*args, **kwargs):
8999 """
9000 SetClientData(self, int n, PyObject clientData)
9001
9002 Associate the given client data with the item at position n.
9003 """
9004 return _core_.ItemContainer_SetClientData(*args, **kwargs)
9005
e811c8ce 9006 def GetCount(*args, **kwargs):
15afbcd0 9007 """
a95a7133 9008 GetCount(self) -> int
15afbcd0
RD
9009
9010 Returns the number of items in the control.
9011 """
54f9ee45 9012 return _core_.ItemContainer_GetCount(*args, **kwargs)
e811c8ce
RD
9013
9014 def IsEmpty(*args, **kwargs):
15afbcd0 9015 """
a95a7133 9016 IsEmpty(self) -> bool
15afbcd0
RD
9017
9018 Returns True if the control is empty or False if it has some items.
9019 """
54f9ee45 9020 return _core_.ItemContainer_IsEmpty(*args, **kwargs)
e811c8ce
RD
9021
9022 def GetString(*args, **kwargs):
15afbcd0 9023 """
a95a7133 9024 GetString(self, int n) -> String
15afbcd0
RD
9025
9026 Returns the label of the item with the given index.
9027 """
54f9ee45 9028 return _core_.ItemContainer_GetString(*args, **kwargs)
e811c8ce
RD
9029
9030 def GetStrings(*args, **kwargs):
a95a7133 9031 """GetStrings(self) -> wxArrayString"""
54f9ee45 9032 return _core_.ItemContainer_GetStrings(*args, **kwargs)
e811c8ce
RD
9033
9034 def SetString(*args, **kwargs):
15afbcd0 9035 """
a95a7133 9036 SetString(self, int n, String s)
15afbcd0
RD
9037
9038 Sets the label for the given item.
9039 """
54f9ee45 9040 return _core_.ItemContainer_SetString(*args, **kwargs)
e811c8ce
RD
9041
9042 def FindString(*args, **kwargs):
15afbcd0 9043 """
a95a7133 9044 FindString(self, String s) -> int
15afbcd0
RD
9045
9046 Finds an item whose label matches the given string. Returns the
41e2b43e
RD
9047 zero-based position of the item, or ``wx.NOT_FOUND`` if the string was not
9048 found.
15afbcd0 9049 """
54f9ee45 9050 return _core_.ItemContainer_FindString(*args, **kwargs)
e811c8ce 9051
53aa7709 9052 def SetSelection(*args, **kwargs):
15afbcd0 9053 """
53aa7709 9054 SetSelection(self, int n)
15afbcd0
RD
9055
9056 Sets the item at index 'n' to be the selected item.
9057 """
53aa7709 9058 return _core_.ItemContainer_SetSelection(*args, **kwargs)
e811c8ce
RD
9059
9060 def GetSelection(*args, **kwargs):
15afbcd0 9061 """
a95a7133 9062 GetSelection(self) -> int
15afbcd0 9063
41e2b43e
RD
9064 Returns the index of the selected item or ``wx.NOT_FOUND`` if no item
9065 is selected.
15afbcd0 9066 """
54f9ee45 9067 return _core_.ItemContainer_GetSelection(*args, **kwargs)
e811c8ce 9068
53aa7709
RD
9069 def SetStringSelection(*args, **kwargs):
9070 """SetStringSelection(self, String s) -> bool"""
9071 return _core_.ItemContainer_SetStringSelection(*args, **kwargs)
9072
e811c8ce 9073 def GetStringSelection(*args, **kwargs):
15afbcd0 9074 """
a95a7133 9075 GetStringSelection(self) -> String
15afbcd0 9076
41e2b43e
RD
9077 Returns the label of the selected item or an empty string if no item
9078 is selected.
15afbcd0 9079 """
54f9ee45 9080 return _core_.ItemContainer_GetStringSelection(*args, **kwargs)
e811c8ce 9081
53aa7709 9082 def Select(*args, **kwargs):
15afbcd0 9083 """
53aa7709 9084 Select(self, int n)
15afbcd0 9085
53aa7709
RD
9086 This is the same as `SetSelection` and exists only because it is
9087 slightly more natural for controls which support multiple selection.
15afbcd0 9088 """
53aa7709 9089 return _core_.ItemContainer_Select(*args, **kwargs)
e811c8ce 9090
d14a1e28
RD
9091
9092class ItemContainerPtr(ItemContainer):
9093 def __init__(self, this):
9094 self.this = this
9095 if not hasattr(self,"thisown"): self.thisown = 0
9096 self.__class__ = ItemContainer
54f9ee45 9097_core_.ItemContainer_swigregister(ItemContainerPtr)
d14a1e28
RD
9098
9099#---------------------------------------------------------------------------
9100
9101class ControlWithItems(Control,ItemContainer):
15afbcd0 9102 """
41e2b43e
RD
9103 wx.ControlWithItems combines the ``wx.ItemContainer`` class with the
9104 wx.Control class, and is used for the base class of various controls
9105 that have items.
15afbcd0 9106 """
d14a1e28
RD
9107 def __init__(self): raise RuntimeError, "No constructor defined"
9108 def __repr__(self):
9109 return "<%s.%s; proxy of C++ wxControlWithItems instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
9110
9111class ControlWithItemsPtr(ControlWithItems):
9112 def __init__(self, this):
9113 self.this = this
9114 if not hasattr(self,"thisown"): self.thisown = 0
9115 self.__class__ = ControlWithItems
54f9ee45 9116_core_.ControlWithItems_swigregister(ControlWithItemsPtr)
d14a1e28
RD
9117
9118#---------------------------------------------------------------------------
9119
9120class SizerItem(Object):
248ed943
RD
9121 """
9122 The wx.SizerItem class is used to track the position, size and other
9123 attributes of each item managed by a `wx.Sizer`. In normal usage user
9124 code should never need to deal directly with a wx.SizerItem, but
9125 custom classes derived from `wx.PySizer` will probably need to use the
9126 collection of wx.SizerItems held by wx.Sizer when calculating layout.
9127
9128 :see: `wx.Sizer`, `wx.GBSizerItem`
9129 """
e811c8ce
RD
9130 def __repr__(self):
9131 return "<%s.%s; proxy of C++ wxSizerItem instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 9132 def __init__(self, *args, **kwargs):
248ed943
RD
9133 """
9134 __init__(self) -> SizerItem
9135
9136 Constructs an empty wx.SizerItem. Either a window, sizer or spacer
9137 size will need to be set before this item can be used in a Sizer.
9138
9139 You will probably never need to create a wx.SizerItem directly as they
9140 are created automatically when the sizer's Add, Insert or Prepend
9141 methods are called.
9142
9143 :see: `wx.SizerItemSpacer`, `wx.SizerItemWindow`, `wx.SizerItemSizer`
9144 """
54f9ee45 9145 newobj = _core_.new_SizerItem(*args, **kwargs)
d14a1e28
RD
9146 self.this = newobj.this
9147 self.thisown = 1
9148 del newobj.thisown
e811c8ce 9149 def DeleteWindows(*args, **kwargs):
248ed943
RD
9150 """
9151 DeleteWindows(self)
9152
9153 Destroy the window or the windows in a subsizer, depending on the type
9154 of item.
9155 """
54f9ee45 9156 return _core_.SizerItem_DeleteWindows(*args, **kwargs)
e811c8ce
RD
9157
9158 def DetachSizer(*args, **kwargs):
248ed943
RD
9159 """
9160 DetachSizer(self)
9161
9162 Enable deleting the SizerItem without destroying the contained sizer.
9163 """
54f9ee45 9164 return _core_.SizerItem_DetachSizer(*args, **kwargs)
e811c8ce
RD
9165
9166 def GetSize(*args, **kwargs):
248ed943
RD
9167 """
9168 GetSize(self) -> Size
9169
9170 Get the current size of the item, as set in the last Layout.
9171 """
54f9ee45 9172 return _core_.SizerItem_GetSize(*args, **kwargs)
e811c8ce
RD
9173
9174 def CalcMin(*args, **kwargs):
248ed943
RD
9175 """
9176 CalcMin(self) -> Size
9177
9178 Calculates the minimum desired size for the item, including any space
9179 needed by borders.
9180 """
54f9ee45 9181 return _core_.SizerItem_CalcMin(*args, **kwargs)
e811c8ce
RD
9182
9183 def SetDimension(*args, **kwargs):
248ed943
RD
9184 """
9185 SetDimension(self, Point pos, Size size)
9186
9187 Set the position and size of the space allocated for this item by the
9188 sizer, and adjust the position and size of the item (window or
9189 subsizer) to be within that space taking alignment and borders into
9190 account.
9191 """
54f9ee45 9192 return _core_.SizerItem_SetDimension(*args, **kwargs)
e811c8ce
RD
9193
9194 def GetMinSize(*args, **kwargs):
248ed943
RD
9195 """
9196 GetMinSize(self) -> Size
9197
9198 Get the minimum size needed for the item.
9199 """
54f9ee45 9200 return _core_.SizerItem_GetMinSize(*args, **kwargs)
e811c8ce 9201
dfbb5885
RD
9202 def GetMinSizeWithBorder(*args, **kwargs):
9203 """
9204 GetMinSizeWithBorder(self) -> Size
9205
9206 Get the minimum size needed for the item with space for the borders
9207 added, if needed.
9208 """
9209 return _core_.SizerItem_GetMinSizeWithBorder(*args, **kwargs)
9210
e811c8ce 9211 def SetInitSize(*args, **kwargs):
a95a7133 9212 """SetInitSize(self, int x, int y)"""
54f9ee45 9213 return _core_.SizerItem_SetInitSize(*args, **kwargs)
e811c8ce
RD
9214
9215 def SetRatioWH(*args, **kwargs):
248ed943
RD
9216 """
9217 SetRatioWH(self, int width, int height)
9218
9219 Set the ratio item attribute.
9220 """
54f9ee45 9221 return _core_.SizerItem_SetRatioWH(*args, **kwargs)
e811c8ce
RD
9222
9223 def SetRatioSize(*args, **kwargs):
248ed943
RD
9224 """
9225 SetRatioSize(self, Size size)
9226
9227 Set the ratio item attribute.
9228 """
54f9ee45 9229 return _core_.SizerItem_SetRatioSize(*args, **kwargs)
e811c8ce
RD
9230
9231 def SetRatio(*args, **kwargs):
248ed943
RD
9232 """
9233 SetRatio(self, float ratio)
9234
9235 Set the ratio item attribute.
9236 """
54f9ee45 9237 return _core_.SizerItem_SetRatio(*args, **kwargs)
e811c8ce
RD
9238
9239 def GetRatio(*args, **kwargs):
248ed943
RD
9240 """
9241 GetRatio(self) -> float
9242
9243 Set the ratio item attribute.
9244 """
54f9ee45 9245 return _core_.SizerItem_GetRatio(*args, **kwargs)
e811c8ce 9246
d3b6e4ff
RD
9247 def GetRect(*args, **kwargs):
9248 """
9249 GetRect(self) -> Rect
9250
9251 Returns the rectangle that the sizer item should occupy
9252 """
9253 return _core_.SizerItem_GetRect(*args, **kwargs)
9254
e811c8ce 9255 def IsWindow(*args, **kwargs):
248ed943
RD
9256 """
9257 IsWindow(self) -> bool
9258
9259 Is this sizer item a window?
9260 """
54f9ee45 9261 return _core_.SizerItem_IsWindow(*args, **kwargs)
e811c8ce
RD
9262
9263 def IsSizer(*args, **kwargs):
248ed943
RD
9264 """
9265 IsSizer(self) -> bool
9266
9267 Is this sizer item a subsizer?
9268 """
54f9ee45 9269 return _core_.SizerItem_IsSizer(*args, **kwargs)
e811c8ce
RD
9270
9271 def IsSpacer(*args, **kwargs):
248ed943
RD
9272 """
9273 IsSpacer(self) -> bool
9274
9275 Is this sizer item a spacer?
9276 """
54f9ee45 9277 return _core_.SizerItem_IsSpacer(*args, **kwargs)
e811c8ce
RD
9278
9279 def SetProportion(*args, **kwargs):
248ed943
RD
9280 """
9281 SetProportion(self, int proportion)
9282
9283 Set the proportion value for this item.
9284 """
54f9ee45 9285 return _core_.SizerItem_SetProportion(*args, **kwargs)
e811c8ce
RD
9286
9287 def GetProportion(*args, **kwargs):
248ed943
RD
9288 """
9289 GetProportion(self) -> int
9290
9291 Get the proportion value for this item.
9292 """
54f9ee45 9293 return _core_.SizerItem_GetProportion(*args, **kwargs)
e811c8ce 9294
248ed943
RD
9295 SetOption = wx._deprecated(SetProportion, "Please use `SetProportion` instead.")
9296 GetOption = wx._deprecated(GetProportion, "Please use `GetProportion` instead.")
e811c8ce 9297 def SetFlag(*args, **kwargs):
248ed943
RD
9298 """
9299 SetFlag(self, int flag)
9300
9301 Set the flag value for this item.
9302 """
54f9ee45 9303 return _core_.SizerItem_SetFlag(*args, **kwargs)
e811c8ce
RD
9304
9305 def GetFlag(*args, **kwargs):
248ed943
RD
9306 """
9307 GetFlag(self) -> int
9308
9309 Get the flag value for this item.
9310 """
54f9ee45 9311 return _core_.SizerItem_GetFlag(*args, **kwargs)
e811c8ce
RD
9312
9313 def SetBorder(*args, **kwargs):
248ed943
RD
9314 """
9315 SetBorder(self, int border)
9316
9317 Set the border value for this item.
9318 """
54f9ee45 9319 return _core_.SizerItem_SetBorder(*args, **kwargs)
e811c8ce
RD
9320
9321 def GetBorder(*args, **kwargs):
248ed943
RD
9322 """
9323 GetBorder(self) -> int
9324
9325 Get the border value for this item.
9326 """
54f9ee45 9327 return _core_.SizerItem_GetBorder(*args, **kwargs)
e811c8ce
RD
9328
9329 def GetWindow(*args, **kwargs):
248ed943
RD
9330 """
9331 GetWindow(self) -> Window
9332
9333 Get the window (if any) that is managed by this sizer item.
9334 """
54f9ee45 9335 return _core_.SizerItem_GetWindow(*args, **kwargs)
e811c8ce
RD
9336
9337 def SetWindow(*args, **kwargs):
248ed943
RD
9338 """
9339 SetWindow(self, Window window)
9340
9341 Set the window to be managed by this sizer item.
9342 """
54f9ee45 9343 return _core_.SizerItem_SetWindow(*args, **kwargs)
e811c8ce
RD
9344
9345 def GetSizer(*args, **kwargs):
248ed943
RD
9346 """
9347 GetSizer(self) -> Sizer
9348
9349 Get the subsizer (if any) that is managed by this sizer item.
9350 """
54f9ee45 9351 return _core_.SizerItem_GetSizer(*args, **kwargs)
e811c8ce
RD
9352
9353 def SetSizer(*args, **kwargs):
248ed943
RD
9354 """
9355 SetSizer(self, Sizer sizer)
9356
9357 Set the subsizer to be managed by this sizer item.
9358 """
54f9ee45 9359 return _core_.SizerItem_SetSizer(*args, **kwargs)
e811c8ce
RD
9360
9361 def GetSpacer(*args, **kwargs):
248ed943
RD
9362 """
9363 GetSpacer(self) -> Size
9364
9365 Get the size of the spacer managed by this sizer item.
9366 """
54f9ee45 9367 return _core_.SizerItem_GetSpacer(*args, **kwargs)
e811c8ce
RD
9368
9369 def SetSpacer(*args, **kwargs):
248ed943
RD
9370 """
9371 SetSpacer(self, Size size)
9372
9373 Set the size of the spacer to be managed by this sizer item.
9374 """
54f9ee45 9375 return _core_.SizerItem_SetSpacer(*args, **kwargs)
e811c8ce
RD
9376
9377 def Show(*args, **kwargs):
248ed943
RD
9378 """
9379 Show(self, bool show)
9380
9381 Set the show item attribute, which sizers use to determine if the item
9382 is to be made part of the layout or not. If the item is tracking a
9383 window then it is shown or hidden as needed.
9384 """
54f9ee45 9385 return _core_.SizerItem_Show(*args, **kwargs)
e811c8ce
RD
9386
9387 def IsShown(*args, **kwargs):
248ed943
RD
9388 """
9389 IsShown(self) -> bool
9390
9391 Is the item to be shown in the layout?
9392 """
54f9ee45 9393 return _core_.SizerItem_IsShown(*args, **kwargs)
e811c8ce
RD
9394
9395 def GetPosition(*args, **kwargs):
248ed943
RD
9396 """
9397 GetPosition(self) -> Point
9398
9399 Returns the current position of the item, as set in the last Layout.
9400 """
54f9ee45 9401 return _core_.SizerItem_GetPosition(*args, **kwargs)
e811c8ce
RD
9402
9403 def GetUserData(*args, **kwargs):
248ed943
RD
9404 """
9405 GetUserData(self) -> PyObject
9406
9407 Returns the userData associated with this sizer item, or None if there
9408 isn't any.
9409 """
54f9ee45 9410 return _core_.SizerItem_GetUserData(*args, **kwargs)
e811c8ce 9411
d14a1e28
RD
9412
9413class SizerItemPtr(SizerItem):
9414 def __init__(self, this):
9415 self.this = this
9416 if not hasattr(self,"thisown"): self.thisown = 0
9417 self.__class__ = SizerItem
54f9ee45 9418_core_.SizerItem_swigregister(SizerItemPtr)
d14a1e28 9419
248ed943 9420def SizerItemWindow(*args, **kwargs):
0df68c9f 9421 """
248ed943
RD
9422 SizerItemWindow(Window window, int proportion, int flag, int border,
9423 PyObject userData=None) -> SizerItem
9424
9425 Constructs a `wx.SizerItem` for tracking a window.
0df68c9f 9426 """
248ed943 9427 val = _core_.new_SizerItemWindow(*args, **kwargs)
d14a1e28
RD
9428 val.thisown = 1
9429 return val
9430
248ed943 9431def SizerItemSpacer(*args, **kwargs):
0df68c9f 9432 """
248ed943
RD
9433 SizerItemSpacer(int width, int height, int proportion, int flag, int border,
9434 PyObject userData=None) -> SizerItem
9435
9436 Constructs a `wx.SizerItem` for tracking a spacer.
0df68c9f 9437 """
248ed943 9438 val = _core_.new_SizerItemSpacer(*args, **kwargs)
d14a1e28
RD
9439 val.thisown = 1
9440 return val
9441
9442def SizerItemSizer(*args, **kwargs):
0df68c9f
RD
9443 """
9444 SizerItemSizer(Sizer sizer, int proportion, int flag, int border,
248ed943
RD
9445 PyObject userData=None) -> SizerItem
9446
9447 Constructs a `wx.SizerItem` for tracking a subsizer
0df68c9f 9448 """
54f9ee45 9449 val = _core_.new_SizerItemSizer(*args, **kwargs)
d14a1e28
RD
9450 val.thisown = 1
9451 return val
9452
9453class Sizer(Object):
248ed943
RD
9454 """
9455 wx.Sizer is the abstract base class used for laying out subwindows in
9456 a window. You cannot use wx.Sizer directly; instead, you will have to
9457 use one of the sizer classes derived from it such as `wx.BoxSizer`,
9458 `wx.StaticBoxSizer`, `wx.NotebookSizer`, `wx.GridSizer`, `wx.FlexGridSizer`
9459 and `wx.GridBagSizer`.
9460
9461 The concept implemented by sizers in wxWidgets is closely related to
9462 layout tools in other GUI toolkits, such as Java's AWT, the GTK
9463 toolkit or the Qt toolkit. It is based upon the idea of the individual
9464 subwindows reporting their minimal required size and their ability to
9465 get stretched if the size of the parent window has changed. This will
9466 most often mean that the programmer does not set the original size of
9467 a dialog in the beginning, rather the dialog will assigned a sizer and
9468 this sizer will be queried about the recommended size. The sizer in
9469 turn will query its children, which can be normal windows or contorls,
9470 empty space or other sizers, so that a hierarchy of sizers can be
9471 constructed. Note that wxSizer does not derive from wxWindow and thus
9472 do not interfere with tab ordering and requires very little resources
9473 compared to a real window on screen.
9474
9475 What makes sizers so well fitted for use in wxWidgets is the fact that
9476 every control reports its own minimal size and the algorithm can
9477 handle differences in font sizes or different window (dialog item)
9478 sizes on different platforms without problems. If for example the
9479 standard font as well as the overall design of Mac widgets requires
9480 more space than on Windows, then the initial size of a dialog using a
9481 sizer will automatically be bigger on Mac than on Windows.
9482 """
e811c8ce
RD
9483 def __init__(self): raise RuntimeError, "No constructor defined"
9484 def __repr__(self):
9485 return "<%s.%s; proxy of C++ wxSizer instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
9486 def _setOORInfo(*args, **kwargs):
a95a7133 9487 """_setOORInfo(self, PyObject _self)"""
54f9ee45 9488 return _core_.Sizer__setOORInfo(*args, **kwargs)
e811c8ce
RD
9489
9490 def Add(*args, **kwargs):
0df68c9f 9491 """
248ed943 9492 Add(self, item, int proportion=0, int flag=0, int border=0,
d3b6e4ff 9493 PyObject userData=None) -> wx.SizerItem
248ed943
RD
9494
9495 Appends a child item to the sizer.
0df68c9f 9496 """
54f9ee45 9497 return _core_.Sizer_Add(*args, **kwargs)
e811c8ce
RD
9498
9499 def Insert(*args, **kwargs):
0df68c9f 9500 """
248ed943 9501 Insert(self, int before, item, int proportion=0, int flag=0, int border=0,
d3b6e4ff 9502 PyObject userData=None) -> wx.SizerItem
248ed943
RD
9503
9504 Inserts a new item into the list of items managed by this sizer before
9505 the item at index *before*. See `Add` for a description of the parameters.
0df68c9f 9506 """
54f9ee45 9507 return _core_.Sizer_Insert(*args, **kwargs)
e811c8ce
RD
9508
9509 def Prepend(*args, **kwargs):
0df68c9f 9510 """
248ed943 9511 Prepend(self, item, int proportion=0, int flag=0, int border=0,
d3b6e4ff 9512 PyObject userData=None) -> wx.SizerItem
248ed943
RD
9513
9514 Adds a new item to the begining of the list of sizer items managed by
9515 this sizer. See `Add` for a description of the parameters.
0df68c9f 9516 """
54f9ee45 9517 return _core_.Sizer_Prepend(*args, **kwargs)
e811c8ce
RD
9518
9519 def Remove(*args, **kwargs):
248ed943
RD
9520 """
9521 Remove(self, item) -> bool
9522
9523 Removes an item from the sizer and destroys it. This method does not
9524 cause any layout or resizing to take place, call `Layout` to update
9525 the layout on screen after removing a child from the sizer. The
9526 *item* parameter can be either a window, a sizer, or the zero-based
9527 index of an item to remove. Returns True if the child item was found
9528 and removed.
9529 """
54f9ee45 9530 return _core_.Sizer_Remove(*args, **kwargs)
e811c8ce 9531
1c0f361b 9532 def Detach(*args, **kwargs):
248ed943
RD
9533 """
9534 Detach(self, item) -> bool
9535
9536 Detaches an item from the sizer without destroying it. This method
9537 does not cause any layout or resizing to take place, call `Layout` to
9538 do so. The *item* parameter can be either a window, a sizer, or the
9539 zero-based index of the item to be detached. Returns True if the child item
9540 was found and detached.
9541 """
1c0f361b
RD
9542 return _core_.Sizer_Detach(*args, **kwargs)
9543
d3b6e4ff
RD
9544 def GetItem(*args, **kwargs):
9545 """
9546 GetItem(self, item) -> wx.SizerItem
9547
9548 Returns the `wx.SizerItem` which holds the *item* given. The *item*
9549 parameter can be either a window, a sizer, or the zero-based index of
9550 the item to be detached.
9551 """
9552 return _core_.Sizer_GetItem(*args, **kwargs)
9553
e811c8ce 9554 def _SetItemMinSize(*args, **kwargs):
a95a7133 9555 """_SetItemMinSize(self, PyObject item, Size size)"""
54f9ee45 9556 return _core_.Sizer__SetItemMinSize(*args, **kwargs)
e811c8ce 9557
248ed943
RD
9558 def SetItemMinSize(self, item, *args):
9559 """
9560 SetItemMinSize(self, item, Size size)
9561
9562 Sets the minimum size that will be allocated for an item in the sizer.
9563 The *item* parameter can be either a window, a sizer, or the
9564 zero-based index of the item. If a window or sizer is given then it
9565 will be searched for recursivly in subsizers if neccessary.
9566 """
9567 if len(args) == 2:
9568 # for backward compatibility accept separate width,height args too
9569 return self._SetItemMinSize(item, args)
9570 else:
9571 return self._SetItemMinSize(item, args[0])
9572
e811c8ce 9573 def AddItem(*args, **kwargs):
248ed943
RD
9574 """
9575 AddItem(self, SizerItem item)
9576
9577 Adds a `wx.SizerItem` to the sizer.
9578 """
54f9ee45 9579 return _core_.Sizer_AddItem(*args, **kwargs)
e811c8ce
RD
9580
9581 def InsertItem(*args, **kwargs):
248ed943
RD
9582 """
9583 InsertItem(self, int index, SizerItem item)
9584
9585 Inserts a `wx.SizerItem` to the sizer at the position given by *index*.
9586 """
54f9ee45 9587 return _core_.Sizer_InsertItem(*args, **kwargs)
e811c8ce
RD
9588
9589 def PrependItem(*args, **kwargs):
248ed943
RD
9590 """
9591 PrependItem(self, SizerItem item)
9592
9593 Prepends a `wx.SizerItem` to the sizer.
9594 """
54f9ee45 9595 return _core_.Sizer_PrependItem(*args, **kwargs)
e811c8ce 9596
248ed943 9597 def AddMany(self, items):
66c033b4
RD
9598 """
9599 AddMany is a convenience method for adding several items
9600 to a sizer at one time. Simply pass it a list of tuples,
9601 where each tuple consists of the parameters that you
9602 would normally pass to the `Add` method.
9603 """
248ed943
RD
9604 for item in items:
9605 if type(item) != type(()) or (len(item) == 2 and type(item[0]) == type(1)):
9606 item = (item, )
9607 self.Add(*item)
d14a1e28 9608
74e96f3d 9609 # for backwards compatibility only, please do not use in new code
b9d6a5f3
RD
9610 def AddWindow(self, *args, **kw):
9611 """Compatibility alias for `Add`."""
9612 return self.Add(*args, **kw)
9613 def AddSizer(self, *args, **kw):
9614 """Compatibility alias for `Add`."""
9615 return self.Add(*args, **kw)
9616 def AddSpacer(self, *args, **kw):
9617 """Compatibility alias for `Add`."""
9618 return self.Add(*args, **kw)
9619
9620 def PrependWindow(self, *args, **kw):
9621 """Compatibility alias for `Prepend`."""
9622 return self.Prepend(*args, **kw)
9623 def PrependSizer(self, *args, **kw):
9624 """Compatibility alias for `Prepend`."""
9625 return self.Prepend(*args, **kw)
9626 def PrependSpacer(self, *args, **kw):
9627 """Compatibility alias for `Prepend`."""
9628 return self.Prepend(*args, **kw)
9629
9630 def InsertWindow(self, *args, **kw):
9631 """Compatibility alias for `Insert`."""
9632 return self.Insert(*args, **kw)
9633 def InsertSizer(self, *args, **kw):
9634 """Compatibility alias for `Insert`."""
9635 return self.Insert(*args, **kw)
9636 def InsertSpacer(self, *args, **kw):
9637 """Compatibility alias for `Insert`."""
9638 return self.Insert(*args, **kw)
9639
9640 def RemoveWindow(self, *args, **kw):
9641 """Compatibility alias for `Remove`."""
9642 return self.Remove(*args, **kw)
9643 def RemoveSizer(self, *args, **kw):
9644 """Compatibility alias for `Remove`."""
9645 return self.Remove(*args, **kw)
9646 def RemovePos(self, *args, **kw):
9647 """Compatibility alias for `Remove`."""
9648 return self.Remove(*args, **kw)
d14a1e28
RD
9649
9650
e811c8ce 9651 def SetDimension(*args, **kwargs):
248ed943
RD
9652 """
9653 SetDimension(self, int x, int y, int width, int height)
9654
9655 Call this to force the sizer to take the given dimension and thus
9656 force the items owned by the sizer to resize themselves according to
9657 the rules defined by the parameter in the `Add`, `Insert` or `Prepend`
9658 methods.
9659 """
54f9ee45 9660 return _core_.Sizer_SetDimension(*args, **kwargs)
e811c8ce
RD
9661
9662 def SetMinSize(*args, **kwargs):
248ed943
RD
9663 """
9664 SetMinSize(self, Size size)
9665
9666 Call this to give the sizer a minimal size. Normally, the sizer will
9667 calculate its minimal size based purely on how much space its children
9668 need. After calling this method `GetMinSize` will return either the
9669 minimal size as requested by its children or the minimal size set
9670 here, depending on which is bigger.
9671 """
54f9ee45 9672 return _core_.Sizer_SetMinSize(*args, **kwargs)
e811c8ce
RD
9673
9674 def GetSize(*args, **kwargs):
248ed943
RD
9675 """
9676 GetSize(self) -> Size
9677
9678 Returns the current size of the space managed by the sizer.
9679 """
54f9ee45 9680 return _core_.Sizer_GetSize(*args, **kwargs)
e811c8ce
RD
9681
9682 def GetPosition(*args, **kwargs):
248ed943
RD
9683 """
9684 GetPosition(self) -> Point
9685
9686 Returns the current position of the sizer's managed space.
9687 """
54f9ee45 9688 return _core_.Sizer_GetPosition(*args, **kwargs)
e811c8ce
RD
9689
9690 def GetMinSize(*args, **kwargs):
248ed943
RD
9691 """
9692 GetMinSize(self) -> Size
9693
9694 Returns the minimal size of the sizer. This is either the combined
9695 minimal size of all the children and their borders or the minimal size
9696 set by SetMinSize, depending on which is bigger.
9697 """
54f9ee45 9698 return _core_.Sizer_GetMinSize(*args, **kwargs)
e811c8ce 9699
d14a1e28 9700 def GetSizeTuple(self):
1c0f361b 9701 return self.GetSize().Get()
d14a1e28 9702 def GetPositionTuple(self):
1c0f361b 9703 return self.GetPosition().Get()
d14a1e28 9704 def GetMinSizeTuple(self):
1c0f361b 9705 return self.GetMinSize().Get()
d14a1e28 9706
e811c8ce 9707 def RecalcSizes(*args, **kwargs):
248ed943
RD
9708 """
9709 RecalcSizes(self)
9710
9711 Using the sizes calculated by `CalcMin` reposition and resize all the
9712 items managed by this sizer. You should not need to call this directly as
9713 it is called by `Layout`.
9714 """
54f9ee45 9715 return _core_.Sizer_RecalcSizes(*args, **kwargs)
e811c8ce
RD
9716
9717 def CalcMin(*args, **kwargs):
248ed943
RD
9718 """
9719 CalcMin(self) -> Size
9720
9721 This method is where the sizer will do the actual calculation of its
9722 children's minimal sizes. You should not need to call this directly as
9723 it is called by `Layout`.
9724 """
54f9ee45 9725 return _core_.Sizer_CalcMin(*args, **kwargs)
e811c8ce
RD
9726
9727 def Layout(*args, **kwargs):
248ed943
RD
9728 """
9729 Layout(self)
9730
9731 This method will force the recalculation and layout of the items
9732 controlled by the sizer using the current space allocated to the
9733 sizer. Normally this is called automatically from the owning window's
9734 EVT_SIZE handler, but it is also useful to call it from user code when
9735 one of the items in a sizer change size, or items are added or
9736 removed.
9737 """
54f9ee45 9738 return _core_.Sizer_Layout(*args, **kwargs)
e811c8ce
RD
9739
9740 def Fit(*args, **kwargs):
248ed943
RD
9741 """
9742 Fit(self, Window window) -> Size
9743
9744 Tell the sizer to resize the *window* to match the sizer's minimal
9745 size. This is commonly done in the constructor of the window itself in
9746 order to set its initial size to match the needs of the children as
9747 determined by the sizer. Returns the new size.
9748
9749 For a top level window this is the total window size, not the client size.
9750 """
54f9ee45 9751 return _core_.Sizer_Fit(*args, **kwargs)
e811c8ce
RD
9752
9753 def FitInside(*args, **kwargs):
248ed943
RD
9754 """
9755 FitInside(self, Window window)
9756
9757 Tell the sizer to resize the *virtual size* of the *window* to match the
9758 sizer's minimal size. This will not alter the on screen size of the
9759 window, but may cause the addition/removal/alteration of scrollbars
9760 required to view the virtual area in windows which manage it.
9761
9762 :see: `wx.ScrolledWindow.SetScrollbars`, `SetVirtualSizeHints`
9763
9764 """
54f9ee45 9765 return _core_.Sizer_FitInside(*args, **kwargs)
e811c8ce
RD
9766
9767 def SetSizeHints(*args, **kwargs):
248ed943
RD
9768 """
9769 SetSizeHints(self, Window window)
9770
9771 Tell the sizer to set (and `Fit`) the minimal size of the *window* to
9772 match the sizer's minimal size. This is commonly done in the
9773 constructor of the window itself if the window is resizable (as are
9774 many dialogs under Unix and frames on probably all platforms) in order
9775 to prevent the window from being sized smaller than the minimal size
9776 required by the sizer.
9777 """
54f9ee45 9778 return _core_.Sizer_SetSizeHints(*args, **kwargs)
e811c8ce
RD
9779
9780 def SetVirtualSizeHints(*args, **kwargs):
248ed943
RD
9781 """
9782 SetVirtualSizeHints(self, Window window)
9783
9784 Tell the sizer to set the minimal size of the window virtual area to
9785 match the sizer's minimal size. For windows with managed scrollbars
9786 this will set them appropriately.
9787
9788 :see: `wx.ScrolledWindow.SetScrollbars`
9789
9790 """
54f9ee45 9791 return _core_.Sizer_SetVirtualSizeHints(*args, **kwargs)
e811c8ce
RD
9792
9793 def Clear(*args, **kwargs):
248ed943
RD
9794 """
9795 Clear(self, bool deleteWindows=False)
9796
9797 Clear all items from the sizer, optionally destroying the window items
9798 as well.
9799 """
54f9ee45 9800 return _core_.Sizer_Clear(*args, **kwargs)
e811c8ce
RD
9801
9802 def DeleteWindows(*args, **kwargs):
248ed943
RD
9803 """
9804 DeleteWindows(self)
9805
9806 Destroy all windows managed by the sizer.
9807 """
54f9ee45 9808 return _core_.Sizer_DeleteWindows(*args, **kwargs)
e811c8ce
RD
9809
9810 def GetChildren(*args, **kwargs):
248ed943 9811 """
51b83b37 9812 GetChildren(self) -> list
248ed943
RD
9813
9814 Returns a list of all the `wx.SizerItem` objects managed by the sizer.
9815 """
54f9ee45 9816 return _core_.Sizer_GetChildren(*args, **kwargs)
e811c8ce
RD
9817
9818 def Show(*args, **kwargs):
248ed943 9819 """
ae8162c8 9820 Show(self, item, bool show=True, bool recursive=false) -> bool
e811c8ce 9821
248ed943
RD
9822 Shows or hides an item managed by the sizer. To make a sizer item
9823 disappear or reappear, use Show followed by `Layout`. The *item*
9824 parameter can be either a window, a sizer, or the zero-based index of
7e63a440
RD
9825 the item. Use the recursive parameter to show or hide an item in a
9826 subsizer. Returns True if the item was found.
248ed943
RD
9827 """
9828 return _core_.Sizer_Show(*args, **kwargs)
e811c8ce
RD
9829
9830 def IsShown(*args, **kwargs):
248ed943
RD
9831 """
9832 IsShown(self, item)
9833
9834 Determines if the item is currently shown. sizer. To make a sizer
9835 item disappear or reappear, use Show followed by `Layout`. The *item*
9836 parameter can be either a window, a sizer, or the zero-based index of
9837 the item.
9838 """
54f9ee45 9839 return _core_.Sizer_IsShown(*args, **kwargs)
e811c8ce 9840
7e63a440 9841 def Hide(self, item, recursive=False):
248ed943 9842 """
7e63a440 9843 A convenience method for Show(item, False, recursive).
248ed943 9844 """
06759a38 9845 return self.Show(item, False, recursive)
248ed943 9846
e811c8ce 9847 def ShowItems(*args, **kwargs):
248ed943
RD
9848 """
9849 ShowItems(self, bool show)
9850
84f85550 9851 Recursively call `wx.SizerItem.Show` on all sizer items.
248ed943 9852 """
54f9ee45 9853 return _core_.Sizer_ShowItems(*args, **kwargs)
e811c8ce 9854
d14a1e28
RD
9855
9856class SizerPtr(Sizer):
9857 def __init__(self, this):
9858 self.this = this
9859 if not hasattr(self,"thisown"): self.thisown = 0
9860 self.__class__ = Sizer
54f9ee45 9861_core_.Sizer_swigregister(SizerPtr)
d14a1e28
RD
9862
9863class PySizer(Sizer):
248ed943
RD
9864 """
9865 wx.PySizer is a special version of `wx.Sizer` that has been
9866 instrumented to allow the C++ virtual methods to be overloaded in
9867 Python derived classes. You would derive from this class if you are
9868 wanting to implement a custom sizer in Python code. Simply implement
9869 `CalcMin` and `RecalcSizes` in the derived class and you're all set.
9870 For example::
9871
9872 class MySizer(wx.PySizer):
9873 def __init__(self):
9874 wx.PySizer.__init__(self)
9875
9876 def CalcMin(self):
9877 for item in self.GetChildren():
9878 # calculate the total minimum width and height needed
9879 # by all items in the sizer according to this sizer's
9880 # layout algorithm.
9881 ...
9882 return wx.Size(width, height)
9883
9884 def RecalcSizes(self):
9885 # find the space allotted to this sizer
9886 pos = self.GetPosition()
9887 size = self.GetSize()
9888 for item in self.GetChildren():
9889 # Recalculate (if necessary) the position and size of
9890 # each item and then call item.SetDimension to do the
9891 # actual positioning and sizing of the items within the
9892 # space alloted to this sizer.
9893 ...
9894 item.SetDimension(itemPos, itemSize)
9895
9896
9897 When `Layout` is called it first calls `CalcMin` followed by
9898 `RecalcSizes` so you can optimize a bit by saving the results of
e505d15e 9899 `CalcMin` and reusing them in `RecalcSizes`.
248ed943
RD
9900
9901 :see: `wx.SizerItem`, `wx.Sizer.GetChildren`
9902
9903
9904 """
e811c8ce
RD
9905 def __repr__(self):
9906 return "<%s.%s; proxy of C++ wxPySizer instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 9907 def __init__(self, *args, **kwargs):
248ed943
RD
9908 """
9909 __init__(self) -> PySizer
9910
9911 Creates a wx.PySizer. Must be called from the __init__ in the derived
9912 class.
9913 """
54f9ee45 9914 newobj = _core_.new_PySizer(*args, **kwargs)
d14a1e28
RD
9915 self.this = newobj.this
9916 self.thisown = 1
9917 del newobj.thisown
9918 self._setCallbackInfo(self, PySizer);self._setOORInfo(self)
e811c8ce
RD
9919
9920 def _setCallbackInfo(*args, **kwargs):
a95a7133 9921 """_setCallbackInfo(self, PyObject self, PyObject _class)"""
54f9ee45 9922 return _core_.PySizer__setCallbackInfo(*args, **kwargs)
e811c8ce 9923
d14a1e28
RD
9924
9925class PySizerPtr(PySizer):
9926 def __init__(self, this):
9927 self.this = this
9928 if not hasattr(self,"thisown"): self.thisown = 0
9929 self.__class__ = PySizer
54f9ee45 9930_core_.PySizer_swigregister(PySizerPtr)
d14a1e28
RD
9931
9932#---------------------------------------------------------------------------
9933
9934class BoxSizer(Sizer):
248ed943
RD
9935 """
9936 The basic idea behind a box sizer is that windows will most often be
9937 laid out in rather simple basic geometry, typically in a row or a
9938 column or nested hierarchies of either. A wx.BoxSizer will lay out
9939 its items in a simple row or column, depending on the orientation
9940 parameter passed to the constructor.
9941 """
e811c8ce
RD
9942 def __repr__(self):
9943 return "<%s.%s; proxy of C++ wxBoxSizer instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 9944 def __init__(self, *args, **kwargs):
248ed943
RD
9945 """
9946 __init__(self, int orient=HORIZONTAL) -> BoxSizer
9947
9948 Constructor for a wx.BoxSizer. *orient* may be one of ``wx.VERTICAL``
9949 or ``wx.HORIZONTAL`` for creating either a column sizer or a row
9950 sizer.
9951 """
54f9ee45 9952 newobj = _core_.new_BoxSizer(*args, **kwargs)
d14a1e28
RD
9953 self.this = newobj.this
9954 self.thisown = 1
9955 del newobj.thisown
9956 self._setOORInfo(self)
e811c8ce
RD
9957
9958 def GetOrientation(*args, **kwargs):
248ed943
RD
9959 """
9960 GetOrientation(self) -> int
9961
9962 Returns the current orientation of the sizer.
9963 """
54f9ee45 9964 return _core_.BoxSizer_GetOrientation(*args, **kwargs)
e811c8ce
RD
9965
9966 def SetOrientation(*args, **kwargs):
248ed943
RD
9967 """
9968 SetOrientation(self, int orient)
e811c8ce 9969
248ed943
RD
9970 Resets the orientation of the sizer.
9971 """
9972 return _core_.BoxSizer_SetOrientation(*args, **kwargs)
e811c8ce 9973
d14a1e28
RD
9974
9975class BoxSizerPtr(BoxSizer):
9976 def __init__(self, this):
9977 self.this = this
9978 if not hasattr(self,"thisown"): self.thisown = 0
9979 self.__class__ = BoxSizer
54f9ee45 9980_core_.BoxSizer_swigregister(BoxSizerPtr)
d14a1e28
RD
9981
9982#---------------------------------------------------------------------------
9983
9984class StaticBoxSizer(BoxSizer):
248ed943
RD
9985 """
9986 wx.StaticBoxSizer derives from and functions identically to the
9987 `wx.BoxSizer` and adds a `wx.StaticBox` around the items that the sizer
9988 manages. Note that this static box must be created separately and
9989 passed to the sizer constructor.
9990 """
e811c8ce
RD
9991 def __repr__(self):
9992 return "<%s.%s; proxy of C++ wxStaticBoxSizer instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 9993 def __init__(self, *args, **kwargs):
248ed943
RD
9994 """
9995 __init__(self, StaticBox box, int orient=HORIZONTAL) -> StaticBoxSizer
9996
9997 Constructor. It takes an associated static box and the orientation
9998 *orient* as parameters - orient can be either of ``wx.VERTICAL`` or
9999 ``wx.HORIZONTAL``.
10000 """
54f9ee45 10001 newobj = _core_.new_StaticBoxSizer(*args, **kwargs)
d14a1e28
RD
10002 self.this = newobj.this
10003 self.thisown = 1
10004 del newobj.thisown
10005 self._setOORInfo(self)
e811c8ce
RD
10006
10007 def GetStaticBox(*args, **kwargs):
248ed943
RD
10008 """
10009 GetStaticBox(self) -> StaticBox
e811c8ce 10010
248ed943
RD
10011 Returns the static box associated with this sizer.
10012 """
10013 return _core_.StaticBoxSizer_GetStaticBox(*args, **kwargs)
e811c8ce 10014
d14a1e28
RD
10015
10016class StaticBoxSizerPtr(StaticBoxSizer):
10017 def __init__(self, this):
10018 self.this = this
10019 if not hasattr(self,"thisown"): self.thisown = 0
10020 self.__class__ = StaticBoxSizer
54f9ee45 10021_core_.StaticBoxSizer_swigregister(StaticBoxSizerPtr)
d14a1e28
RD
10022
10023#---------------------------------------------------------------------------
10024
10025class GridSizer(Sizer):
248ed943
RD
10026 """
10027 A grid sizer is a sizer which lays out its children in a
10028 two-dimensional table with all cells having the same size. In other
10029 words, the width of each cell within the grid is the width of the
10030 widest item added to the sizer and the height of each grid cell is the
10031 height of the tallest item. An optional vertical and/or horizontal
10032 gap between items can also be specified (in pixels.)
10033
10034 Items are placed in the cells of the grid in the order they are added,
10035 in row-major order. In other words, the first row is filled first,
10036 then the second, and so on until all items have been added. (If
10037 neccessary, additional rows will be added as items are added.) If you
10038 need to have greater control over the cells that items are placed in
10039 then use the `wx.GridBagSizer`.
10040
10041 """
e811c8ce
RD
10042 def __repr__(self):
10043 return "<%s.%s; proxy of C++ wxGridSizer instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 10044 def __init__(self, *args, **kwargs):
248ed943
RD
10045 """
10046 __init__(self, int rows=1, int cols=0, int vgap=0, int hgap=0) -> GridSizer
10047
10048 Constructor for a wx.GridSizer. *rows* and *cols* determine the number
10049 of columns and rows in the sizer - if either of the parameters is
10050 zero, it will be calculated to from the total number of children in
10051 the sizer, thus making the sizer grow dynamically. *vgap* and *hgap*
10052 define extra space between all children.
10053 """
54f9ee45 10054 newobj = _core_.new_GridSizer(*args, **kwargs)
d14a1e28
RD
10055 self.this = newobj.this
10056 self.thisown = 1
10057 del newobj.thisown
10058 self._setOORInfo(self)
e811c8ce 10059
e811c8ce 10060 def SetCols(*args, **kwargs):
248ed943
RD
10061 """
10062 SetCols(self, int cols)
10063
10064 Sets the number of columns in the sizer.
10065 """
54f9ee45 10066 return _core_.GridSizer_SetCols(*args, **kwargs)
e811c8ce
RD
10067
10068 def SetRows(*args, **kwargs):
248ed943
RD
10069 """
10070 SetRows(self, int rows)
10071
10072 Sets the number of rows in the sizer.
10073 """
54f9ee45 10074 return _core_.GridSizer_SetRows(*args, **kwargs)
e811c8ce
RD
10075
10076 def SetVGap(*args, **kwargs):
248ed943
RD
10077 """
10078 SetVGap(self, int gap)
10079
10080 Sets the vertical gap (in pixels) between the cells in the sizer.
10081 """
54f9ee45 10082 return _core_.GridSizer_SetVGap(*args, **kwargs)
e811c8ce
RD
10083
10084 def SetHGap(*args, **kwargs):
248ed943
RD
10085 """
10086 SetHGap(self, int gap)
10087
10088 Sets the horizontal gap (in pixels) between cells in the sizer
10089 """
54f9ee45 10090 return _core_.GridSizer_SetHGap(*args, **kwargs)
e811c8ce
RD
10091
10092 def GetCols(*args, **kwargs):
248ed943
RD
10093 """
10094 GetCols(self) -> int
10095
10096 Returns the number of columns in the sizer.
10097 """
54f9ee45 10098 return _core_.GridSizer_GetCols(*args, **kwargs)
e811c8ce
RD
10099
10100 def GetRows(*args, **kwargs):
248ed943
RD
10101 """
10102 GetRows(self) -> int
10103
10104 Returns the number of rows in the sizer.
10105 """
54f9ee45 10106 return _core_.GridSizer_GetRows(*args, **kwargs)
e811c8ce
RD
10107
10108 def GetVGap(*args, **kwargs):
248ed943
RD
10109 """
10110 GetVGap(self) -> int
10111
10112 Returns the vertical gap (in pixels) between the cells in the sizer.
10113 """
54f9ee45 10114 return _core_.GridSizer_GetVGap(*args, **kwargs)
e811c8ce
RD
10115
10116 def GetHGap(*args, **kwargs):
248ed943
RD
10117 """
10118 GetHGap(self) -> int
10119
10120 Returns the horizontal gap (in pixels) between cells in the sizer.
10121 """
54f9ee45 10122 return _core_.GridSizer_GetHGap(*args, **kwargs)
e811c8ce 10123
d14a1e28
RD
10124
10125class GridSizerPtr(GridSizer):
10126 def __init__(self, this):
10127 self.this = this
10128 if not hasattr(self,"thisown"): self.thisown = 0
10129 self.__class__ = GridSizer
54f9ee45 10130_core_.GridSizer_swigregister(GridSizerPtr)
d14a1e28
RD
10131
10132#---------------------------------------------------------------------------
10133
54f9ee45
RD
10134FLEX_GROWMODE_NONE = _core_.FLEX_GROWMODE_NONE
10135FLEX_GROWMODE_SPECIFIED = _core_.FLEX_GROWMODE_SPECIFIED
10136FLEX_GROWMODE_ALL = _core_.FLEX_GROWMODE_ALL
d14a1e28 10137class FlexGridSizer(GridSizer):
248ed943
RD
10138 """
10139 A flex grid sizer is a sizer which lays out its children in a
10140 two-dimensional table with all table cells in one row having the same
10141 height and all cells in one column having the same width, but all
10142 rows or all columns are not necessarily the same height or width as in
10143 the `wx.GridSizer`.
10144
10145 wx.FlexGridSizer can also size items equally in one direction but
10146 unequally ("flexibly") in the other. If the sizer is only flexible
10147 in one direction (this can be changed using `SetFlexibleDirection`), it
10148 needs to be decided how the sizer should grow in the other ("non
10149 flexible") direction in order to fill the available space. The
10150 `SetNonFlexibleGrowMode` method serves this purpose.
10151
10152
10153 """
e811c8ce
RD
10154 def __repr__(self):
10155 return "<%s.%s; proxy of C++ wxFlexGridSizer instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 10156 def __init__(self, *args, **kwargs):
248ed943
RD
10157 """
10158 __init__(self, int rows=1, int cols=0, int vgap=0, int hgap=0) -> FlexGridSizer
10159
10160 Constructor for a wx.FlexGridSizer. *rows* and *cols* determine the
10161 number of columns and rows in the sizer - if either of the parameters
10162 is zero, it will be calculated to from the total number of children in
10163 the sizer, thus making the sizer grow dynamically. *vgap* and *hgap*
10164 define extra space between all children.
10165 """
54f9ee45 10166 newobj = _core_.new_FlexGridSizer(*args, **kwargs)
d14a1e28
RD
10167 self.this = newobj.this
10168 self.thisown = 1
10169 del newobj.thisown
10170 self._setOORInfo(self)
e811c8ce 10171
248ed943
RD
10172 def AddGrowableRow(*args, **kwargs):
10173 """
10174 AddGrowableRow(self, size_t idx, int proportion=0)
e811c8ce 10175
248ed943
RD
10176 Specifies that row *idx* (starting from zero) should be grown if there
10177 is extra space available to the sizer.
e811c8ce 10178
248ed943
RD
10179 The *proportion* parameter has the same meaning as the stretch factor
10180 for the box sizers except that if all proportions are 0, then all
10181 columns are resized equally (instead of not being resized at all).
10182 """
54f9ee45 10183 return _core_.FlexGridSizer_AddGrowableRow(*args, **kwargs)
e811c8ce
RD
10184
10185 def RemoveGrowableRow(*args, **kwargs):
248ed943
RD
10186 """
10187 RemoveGrowableRow(self, size_t idx)
10188
10189 Specifies that row *idx* is no longer growable.
10190 """
54f9ee45 10191 return _core_.FlexGridSizer_RemoveGrowableRow(*args, **kwargs)
e811c8ce
RD
10192
10193 def AddGrowableCol(*args, **kwargs):
248ed943
RD
10194 """
10195 AddGrowableCol(self, size_t idx, int proportion=0)
10196
10197 Specifies that column *idx* (starting from zero) should be grown if
10198 there is extra space available to the sizer.
10199
10200 The *proportion* parameter has the same meaning as the stretch factor
10201 for the box sizers except that if all proportions are 0, then all
10202 columns are resized equally (instead of not being resized at all).
10203 """
54f9ee45 10204 return _core_.FlexGridSizer_AddGrowableCol(*args, **kwargs)
e811c8ce
RD
10205
10206 def RemoveGrowableCol(*args, **kwargs):
248ed943
RD
10207 """
10208 RemoveGrowableCol(self, size_t idx)
10209
10210 Specifies that column *idx* is no longer growable.
10211 """
54f9ee45 10212 return _core_.FlexGridSizer_RemoveGrowableCol(*args, **kwargs)
e811c8ce
RD
10213
10214 def SetFlexibleDirection(*args, **kwargs):
248ed943
RD
10215 """
10216 SetFlexibleDirection(self, int direction)
10217
10218 Specifies whether the sizer should flexibly resize its columns, rows,
10219 or both. Argument *direction* can be one of the following values. Any
10220 other value is ignored.
10221
10222 ============== =======================================
10223 wx.VERTICAL Rows are flexibly sized.
10224 wx.HORIZONTAL Columns are flexibly sized.
10225 wx.BOTH Both rows and columns are flexibly sized
10226 (this is the default value).
10227 ============== =======================================
10228
10229 Note that this method does not trigger relayout.
10230
10231 """
54f9ee45 10232 return _core_.FlexGridSizer_SetFlexibleDirection(*args, **kwargs)
e811c8ce
RD
10233
10234 def GetFlexibleDirection(*args, **kwargs):
248ed943
RD
10235 """
10236 GetFlexibleDirection(self) -> int
10237
10238 Returns a value that specifies whether the sizer
10239 flexibly resizes its columns, rows, or both (default).
10240
10241 :see: `SetFlexibleDirection`
10242 """
54f9ee45 10243 return _core_.FlexGridSizer_GetFlexibleDirection(*args, **kwargs)
e811c8ce
RD
10244
10245 def SetNonFlexibleGrowMode(*args, **kwargs):
248ed943
RD
10246 """
10247 SetNonFlexibleGrowMode(self, int mode)
10248
10249 Specifies how the sizer should grow in the non-flexible direction if
10250 there is one (so `SetFlexibleDirection` must have been called
10251 previously). Argument *mode* can be one of the following values:
10252
10253 ========================== =================================================
10254 wx.FLEX_GROWMODE_NONE Sizer doesn't grow in the non flexible direction.
10255 wx.FLEX_GROWMODE_SPECIFIED Sizer honors growable columns/rows set with
10256 `AddGrowableCol` and `AddGrowableRow`. In this
10257 case equal sizing applies to minimum sizes of
10258 columns or rows (this is the default value).
10259 wx.FLEX_GROWMODE_ALL Sizer equally stretches all columns or rows in
10260 the non flexible direction, whether they are
10261 growable or not in the flexbile direction.
10262 ========================== =================================================
10263
10264 Note that this method does not trigger relayout.
10265
10266
10267 """
54f9ee45 10268 return _core_.FlexGridSizer_SetNonFlexibleGrowMode(*args, **kwargs)
e811c8ce
RD
10269
10270 def GetNonFlexibleGrowMode(*args, **kwargs):
248ed943
RD
10271 """
10272 GetNonFlexibleGrowMode(self) -> int
10273
10274 Returns the value that specifies how the sizer grows in the
10275 non-flexible direction if there is one.
10276
10277 :see: `SetNonFlexibleGrowMode`
10278 """
54f9ee45 10279 return _core_.FlexGridSizer_GetNonFlexibleGrowMode(*args, **kwargs)
e811c8ce
RD
10280
10281 def GetRowHeights(*args, **kwargs):
fd2dc343
RD
10282 """
10283 GetRowHeights(self) -> list
10284
10285 Returns a list of integers representing the heights of each of the
10286 rows in the sizer.
10287 """
54f9ee45 10288 return _core_.FlexGridSizer_GetRowHeights(*args, **kwargs)
e811c8ce
RD
10289
10290 def GetColWidths(*args, **kwargs):
fd2dc343
RD
10291 """
10292 GetColWidths(self) -> list
10293
10294 Returns a list of integers representing the widths of each of the
10295 columns in the sizer.
10296 """
54f9ee45 10297 return _core_.FlexGridSizer_GetColWidths(*args, **kwargs)
e811c8ce 10298
d14a1e28
RD
10299
10300class FlexGridSizerPtr(FlexGridSizer):
10301 def __init__(self, this):
10302 self.this = this
10303 if not hasattr(self,"thisown"): self.thisown = 0
10304 self.__class__ = FlexGridSizer
54f9ee45 10305_core_.FlexGridSizer_swigregister(FlexGridSizerPtr)
d14a1e28 10306
e505d15e
RD
10307class StdDialogButtonSizer(BoxSizer):
10308 """
10309 A special sizer that knows how to order and position standard buttons
10310 in order to conform to the current platform's standards. You simply
10311 need to add each `wx.Button` to the sizer, and be sure to create the
53aa7709 10312 buttons using the standard ID's. Then call `Realize` and the sizer
e505d15e
RD
10313 will take care of the rest.
10314
10315 """
10316 def __repr__(self):
10317 return "<%s.%s; proxy of C++ wxStdDialogButtonSizer instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
10318 def __init__(self, *args, **kwargs):
10319 """__init__(self) -> StdDialogButtonSizer"""
10320 newobj = _core_.new_StdDialogButtonSizer(*args, **kwargs)
10321 self.this = newobj.this
10322 self.thisown = 1
10323 del newobj.thisown
10324 def AddButton(*args, **kwargs):
10325 """
10326 AddButton(self, wxButton button)
10327
10328 Use this to add the buttons to this sizer. Do not use the `Add`
10329 method in the base class.
10330 """
10331 return _core_.StdDialogButtonSizer_AddButton(*args, **kwargs)
10332
53aa7709 10333 def Realize(*args, **kwargs):
e505d15e 10334 """
53aa7709 10335 Realize(self)
e505d15e
RD
10336
10337 This funciton needs to be called after all the buttons have been added
10338 to the sizer. It will reorder them and position them in a platform
10339 specifc manner.
10340 """
53aa7709 10341 return _core_.StdDialogButtonSizer_Realize(*args, **kwargs)
51b83b37
RD
10342
10343 def SetAffirmativeButton(*args, **kwargs):
10344 """SetAffirmativeButton(self, wxButton button)"""
10345 return _core_.StdDialogButtonSizer_SetAffirmativeButton(*args, **kwargs)
10346
10347 def SetNegativeButton(*args, **kwargs):
10348 """SetNegativeButton(self, wxButton button)"""
10349 return _core_.StdDialogButtonSizer_SetNegativeButton(*args, **kwargs)
10350
10351 def SetCancelButton(*args, **kwargs):
10352 """SetCancelButton(self, wxButton button)"""
10353 return _core_.StdDialogButtonSizer_SetCancelButton(*args, **kwargs)
e505d15e
RD
10354
10355 def GetAffirmativeButton(*args, **kwargs):
10356 """GetAffirmativeButton(self) -> wxButton"""
10357 return _core_.StdDialogButtonSizer_GetAffirmativeButton(*args, **kwargs)
10358
10359 def GetApplyButton(*args, **kwargs):
10360 """GetApplyButton(self) -> wxButton"""
10361 return _core_.StdDialogButtonSizer_GetApplyButton(*args, **kwargs)
10362
10363 def GetNegativeButton(*args, **kwargs):
10364 """GetNegativeButton(self) -> wxButton"""
10365 return _core_.StdDialogButtonSizer_GetNegativeButton(*args, **kwargs)
10366
10367 def GetCancelButton(*args, **kwargs):
10368 """GetCancelButton(self) -> wxButton"""
10369 return _core_.StdDialogButtonSizer_GetCancelButton(*args, **kwargs)
10370
10371 def GetHelpButton(*args, **kwargs):
10372 """GetHelpButton(self) -> wxButton"""
10373 return _core_.StdDialogButtonSizer_GetHelpButton(*args, **kwargs)
10374
10375
10376class StdDialogButtonSizerPtr(StdDialogButtonSizer):
10377 def __init__(self, this):
10378 self.this = this
10379 if not hasattr(self,"thisown"): self.thisown = 0
10380 self.__class__ = StdDialogButtonSizer
10381_core_.StdDialogButtonSizer_swigregister(StdDialogButtonSizerPtr)
10382
d14a1e28
RD
10383#---------------------------------------------------------------------------
10384
10385class GBPosition(object):
248ed943
RD
10386 """
10387 This class represents the position of an item in a virtual grid of
10388 rows and columns managed by a `wx.GridBagSizer`. wxPython has
10389 typemaps that will automatically convert from a 2-element sequence of
10390 integers to a wx.GBPosition, so you can use the more pythonic
10391 representation of the position nearly transparently in Python code.
10392 """
e811c8ce
RD
10393 def __repr__(self):
10394 return "<%s.%s; proxy of C++ wxGBPosition instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 10395 def __init__(self, *args, **kwargs):
248ed943
RD
10396 """
10397 __init__(self, int row=0, int col=0) -> GBPosition
10398
10399 This class represents the position of an item in a virtual grid of
10400 rows and columns managed by a `wx.GridBagSizer`. wxPython has
10401 typemaps that will automatically convert from a 2-element sequence of
10402 integers to a wx.GBPosition, so you can use the more pythonic
10403 representation of the position nearly transparently in Python code.
10404 """
54f9ee45 10405 newobj = _core_.new_GBPosition(*args, **kwargs)
d14a1e28
RD
10406 self.this = newobj.this
10407 self.thisown = 1
10408 del newobj.thisown
e811c8ce 10409 def GetRow(*args, **kwargs):
a95a7133 10410 """GetRow(self) -> int"""
54f9ee45 10411 return _core_.GBPosition_GetRow(*args, **kwargs)
e811c8ce
RD
10412
10413 def GetCol(*args, **kwargs):
a95a7133 10414 """GetCol(self) -> int"""
54f9ee45 10415 return _core_.GBPosition_GetCol(*args, **kwargs)
e811c8ce
RD
10416
10417 def SetRow(*args, **kwargs):
a95a7133 10418 """SetRow(self, int row)"""
54f9ee45 10419 return _core_.GBPosition_SetRow(*args, **kwargs)
e811c8ce
RD
10420
10421 def SetCol(*args, **kwargs):
a95a7133 10422 """SetCol(self, int col)"""
54f9ee45 10423 return _core_.GBPosition_SetCol(*args, **kwargs)
e811c8ce
RD
10424
10425 def __eq__(*args, **kwargs):
a95a7133 10426 """__eq__(self, GBPosition other) -> bool"""
54f9ee45 10427 return _core_.GBPosition___eq__(*args, **kwargs)
e811c8ce
RD
10428
10429 def __ne__(*args, **kwargs):
a95a7133 10430 """__ne__(self, GBPosition other) -> bool"""
54f9ee45 10431 return _core_.GBPosition___ne__(*args, **kwargs)
e811c8ce
RD
10432
10433 def Set(*args, **kwargs):
a95a7133 10434 """Set(self, int row=0, int col=0)"""
54f9ee45 10435 return _core_.GBPosition_Set(*args, **kwargs)
e811c8ce
RD
10436
10437 def Get(*args, **kwargs):
a95a7133 10438 """Get(self) -> PyObject"""
54f9ee45 10439 return _core_.GBPosition_Get(*args, **kwargs)
e811c8ce 10440
41e2b43e 10441 asTuple = wx._deprecated(Get, "asTuple is deprecated, use `Get` instead")
e811c8ce
RD
10442 def __str__(self): return str(self.Get())
10443 def __repr__(self): return 'wx.GBPosition'+str(self.Get())
10444 def __len__(self): return len(self.Get())
10445 def __getitem__(self, index): return self.Get()[index]
d14a1e28
RD
10446 def __setitem__(self, index, val):
10447 if index == 0: self.SetRow(val)
10448 elif index == 1: self.SetCol(val)
10449 else: raise IndexError
e811c8ce 10450 def __nonzero__(self): return self.Get() != (0,0)
74e96f3d
RD
10451 __safe_for_unpickling__ = True
10452 def __reduce__(self): return (wx.GBPosition, self.Get())
d14a1e28
RD
10453
10454 row = property(GetRow, SetRow)
10455 col = property(GetCol, SetCol)
10456
10457
10458class GBPositionPtr(GBPosition):
10459 def __init__(self, this):
10460 self.this = this
10461 if not hasattr(self,"thisown"): self.thisown = 0
10462 self.__class__ = GBPosition
54f9ee45 10463_core_.GBPosition_swigregister(GBPositionPtr)
d14a1e28
RD
10464
10465class GBSpan(object):
248ed943
RD
10466 """
10467 This class is used to hold the row and column spanning attributes of
10468 items in a `wx.GridBagSizer`. wxPython has typemaps that will
10469 automatically convert from a 2-element sequence of integers to a
10470 wx.GBSpan, so you can use the more pythonic representation of the span
10471 nearly transparently in Python code.
10472
10473 """
e811c8ce
RD
10474 def __repr__(self):
10475 return "<%s.%s; proxy of C++ wxGBSpan instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 10476 def __init__(self, *args, **kwargs):
248ed943
RD
10477 """
10478 __init__(self, int rowspan=1, int colspan=1) -> GBSpan
10479
10480 Construct a new wxGBSpan, optionally setting the rowspan and
10481 colspan. The default is (1,1). (Meaning that the item occupies one
10482 cell in each direction.
10483 """
54f9ee45 10484 newobj = _core_.new_GBSpan(*args, **kwargs)
d14a1e28
RD
10485 self.this = newobj.this
10486 self.thisown = 1
10487 del newobj.thisown
e811c8ce 10488 def GetRowspan(*args, **kwargs):
a95a7133 10489 """GetRowspan(self) -> int"""
54f9ee45 10490 return _core_.GBSpan_GetRowspan(*args, **kwargs)
e811c8ce
RD
10491
10492 def GetColspan(*args, **kwargs):
a95a7133 10493 """GetColspan(self) -> int"""
54f9ee45 10494 return _core_.GBSpan_GetColspan(*args, **kwargs)
e811c8ce
RD
10495
10496 def SetRowspan(*args, **kwargs):
a95a7133 10497 """SetRowspan(self, int rowspan)"""
54f9ee45 10498 return _core_.GBSpan_SetRowspan(*args, **kwargs)
e811c8ce
RD
10499
10500 def SetColspan(*args, **kwargs):
a95a7133 10501 """SetColspan(self, int colspan)"""
54f9ee45 10502 return _core_.GBSpan_SetColspan(*args, **kwargs)
e811c8ce
RD
10503
10504 def __eq__(*args, **kwargs):
a95a7133 10505 """__eq__(self, GBSpan other) -> bool"""
54f9ee45 10506 return _core_.GBSpan___eq__(*args, **kwargs)
e811c8ce
RD
10507
10508 def __ne__(*args, **kwargs):
a95a7133 10509 """__ne__(self, GBSpan other) -> bool"""
54f9ee45 10510 return _core_.GBSpan___ne__(*args, **kwargs)
e811c8ce
RD
10511
10512 def Set(*args, **kwargs):
a95a7133 10513 """Set(self, int rowspan=1, int colspan=1)"""
54f9ee45 10514 return _core_.GBSpan_Set(*args, **kwargs)
e811c8ce
RD
10515
10516 def Get(*args, **kwargs):
a95a7133 10517 """Get(self) -> PyObject"""
54f9ee45 10518 return _core_.GBSpan_Get(*args, **kwargs)
e811c8ce 10519
41e2b43e 10520 asTuple = wx._deprecated(Get, "asTuple is deprecated, use `Get` instead")
e811c8ce
RD
10521 def __str__(self): return str(self.Get())
10522 def __repr__(self): return 'wx.GBSpan'+str(self.Get())
10523 def __len__(self): return len(self.Get())
10524 def __getitem__(self, index): return self.Get()[index]
d14a1e28
RD
10525 def __setitem__(self, index, val):
10526 if index == 0: self.SetRowspan(val)
10527 elif index == 1: self.SetColspan(val)
10528 else: raise IndexError
e811c8ce 10529 def __nonzero__(self): return self.Get() != (0,0)
74e96f3d
RD
10530 __safe_for_unpickling__ = True
10531 def __reduce__(self): return (wx.GBSpan, self.Get())
d14a1e28
RD
10532
10533 rowspan = property(GetRowspan, SetRowspan)
10534 colspan = property(GetColspan, SetColspan)
10535
10536
10537class GBSpanPtr(GBSpan):
10538 def __init__(self, this):
10539 self.this = this
10540 if not hasattr(self,"thisown"): self.thisown = 0
10541 self.__class__ = GBSpan
54f9ee45 10542_core_.GBSpan_swigregister(GBSpanPtr)
d14a1e28
RD
10543
10544class GBSizerItem(SizerItem):
248ed943
RD
10545 """
10546 The wx.GBSizerItem class is used to track the additional data about
10547 items in a `wx.GridBagSizer` such as the item's position in the grid
10548 and how many rows or columns it spans.
10549
10550 """
e811c8ce
RD
10551 def __repr__(self):
10552 return "<%s.%s; proxy of C++ wxGBSizerItem instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 10553 def __init__(self, *args, **kwargs):
248ed943
RD
10554 """
10555 __init__(self) -> GBSizerItem
10556
10557 Constructs an empty wx.GBSizerItem. Either a window, sizer or spacer
10558 size will need to be set, as well as a position and span before this
10559 item can be used in a Sizer.
10560
10561 You will probably never need to create a wx.GBSizerItem directly as they
10562 are created automatically when the sizer's Add method is called.
10563 """
54f9ee45 10564 newobj = _core_.new_GBSizerItem(*args, **kwargs)
d14a1e28
RD
10565 self.this = newobj.this
10566 self.thisown = 1
10567 del newobj.thisown
e811c8ce 10568 def GetPos(*args, **kwargs):
248ed943
RD
10569 """
10570 GetPos(self) -> GBPosition
10571
10572 Get the grid position of the item
10573 """
54f9ee45 10574 return _core_.GBSizerItem_GetPos(*args, **kwargs)
e811c8ce
RD
10575
10576 def GetPosTuple(self): return self.GetPos().Get()
10577 def GetSpan(*args, **kwargs):
248ed943
RD
10578 """
10579 GetSpan(self) -> GBSpan
10580
10581 Get the row and column spanning of the item
10582 """
54f9ee45 10583 return _core_.GBSizerItem_GetSpan(*args, **kwargs)
e811c8ce
RD
10584
10585 def GetSpanTuple(self): return self.GetSpan().Get()
10586 def SetPos(*args, **kwargs):
248ed943
RD
10587 """
10588 SetPos(self, GBPosition pos) -> bool
10589
10590 If the item is already a member of a sizer then first ensure that
10591 there is no other item that would intersect with this one at the new
10592 position, then set the new position. Returns True if the change is
10593 successful and after the next Layout() the item will be moved.
10594 """
54f9ee45 10595 return _core_.GBSizerItem_SetPos(*args, **kwargs)
e811c8ce
RD
10596
10597 def SetSpan(*args, **kwargs):
248ed943
RD
10598 """
10599 SetSpan(self, GBSpan span) -> bool
10600
10601 If the item is already a member of a sizer then first ensure that
10602 there is no other item that would intersect with this one with its new
10603 spanning size, then set the new spanning. Returns True if the change
10604 is successful and after the next Layout() the item will be resized.
10605
10606 """
54f9ee45 10607 return _core_.GBSizerItem_SetSpan(*args, **kwargs)
e811c8ce 10608
248ed943 10609 def Intersects(*args, **kwargs):
0df68c9f 10610 """
a95a7133 10611 Intersects(self, GBSizerItem other) -> bool
248ed943
RD
10612
10613 Returns True if this item and the other item instersect.
0df68c9f 10614 """
248ed943
RD
10615 return _core_.GBSizerItem_Intersects(*args, **kwargs)
10616
10617 def IntersectsPos(*args, **kwargs):
10618 """
10619 IntersectsPos(self, GBPosition pos, GBSpan span) -> bool
10620
10621 Returns True if the given pos/span would intersect with this item.
10622 """
10623 return _core_.GBSizerItem_IntersectsPos(*args, **kwargs)
e811c8ce
RD
10624
10625 def GetEndPos(*args, **kwargs):
248ed943
RD
10626 """
10627 GetEndPos(self) -> GBPosition
10628
10629 Get the row and column of the endpoint of this item.
10630 """
54f9ee45 10631 return _core_.GBSizerItem_GetEndPos(*args, **kwargs)
e811c8ce
RD
10632
10633 def GetGBSizer(*args, **kwargs):
248ed943
RD
10634 """
10635 GetGBSizer(self) -> GridBagSizer
10636
10637 Get the sizer this item is a member of.
10638 """
54f9ee45 10639 return _core_.GBSizerItem_GetGBSizer(*args, **kwargs)
e811c8ce
RD
10640
10641 def SetGBSizer(*args, **kwargs):
248ed943
RD
10642 """
10643 SetGBSizer(self, GridBagSizer sizer)
10644
10645 Set the sizer this item is a member of.
10646 """
54f9ee45 10647 return _core_.GBSizerItem_SetGBSizer(*args, **kwargs)
e811c8ce 10648
d14a1e28
RD
10649
10650class GBSizerItemPtr(GBSizerItem):
10651 def __init__(self, this):
10652 self.this = this
10653 if not hasattr(self,"thisown"): self.thisown = 0
10654 self.__class__ = GBSizerItem
54f9ee45 10655_core_.GBSizerItem_swigregister(GBSizerItemPtr)
d14a1e28
RD
10656DefaultSpan = cvar.DefaultSpan
10657
10658def GBSizerItemWindow(*args, **kwargs):
0df68c9f
RD
10659 """
10660 GBSizerItemWindow(Window window, GBPosition pos, GBSpan span, int flag,
248ed943
RD
10661 int border, PyObject userData=None) -> GBSizerItem
10662
10663 Construct a `wx.GBSizerItem` for a window.
0df68c9f 10664 """
54f9ee45 10665 val = _core_.new_GBSizerItemWindow(*args, **kwargs)
d14a1e28
RD
10666 val.thisown = 1
10667 return val
10668
10669def GBSizerItemSizer(*args, **kwargs):
0df68c9f
RD
10670 """
10671 GBSizerItemSizer(Sizer sizer, GBPosition pos, GBSpan span, int flag,
248ed943
RD
10672 int border, PyObject userData=None) -> GBSizerItem
10673
10674 Construct a `wx.GBSizerItem` for a sizer
0df68c9f 10675 """
54f9ee45 10676 val = _core_.new_GBSizerItemSizer(*args, **kwargs)
d14a1e28
RD
10677 val.thisown = 1
10678 return val
10679
10680def GBSizerItemSpacer(*args, **kwargs):
0df68c9f
RD
10681 """
10682 GBSizerItemSpacer(int width, int height, GBPosition pos, GBSpan span,
248ed943
RD
10683 int flag, int border, PyObject userData=None) -> GBSizerItem
10684
10685 Construct a `wx.GBSizerItem` for a spacer.
0df68c9f 10686 """
54f9ee45 10687 val = _core_.new_GBSizerItemSpacer(*args, **kwargs)
d14a1e28
RD
10688 val.thisown = 1
10689 return val
10690
10691class GridBagSizer(FlexGridSizer):
248ed943
RD
10692 """
10693 A `wx.Sizer` that can lay out items in a virtual grid like a
10694 `wx.FlexGridSizer` but in this case explicit positioning of the items
10695 is allowed using `wx.GBPosition`, and items can optionally span more
10696 than one row and/or column using `wx.GBSpan`. The total size of the
10697 virtual grid is determined by the largest row and column that items are
10698 positioned at, adjusted for spanning.
10699
10700 """
e811c8ce
RD
10701 def __repr__(self):
10702 return "<%s.%s; proxy of C++ wxGridBagSizer instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 10703 def __init__(self, *args, **kwargs):
248ed943
RD
10704 """
10705 __init__(self, int vgap=0, int hgap=0) -> GridBagSizer
10706
10707 Constructor, with optional parameters to specify the gap between the
10708 rows and columns.
10709 """
54f9ee45 10710 newobj = _core_.new_GridBagSizer(*args, **kwargs)
d14a1e28
RD
10711 self.this = newobj.this
10712 self.thisown = 1
10713 del newobj.thisown
1823fbb4
RD
10714 self._setOORInfo(self)
10715
e811c8ce 10716 def Add(*args, **kwargs):
0df68c9f 10717 """
248ed943 10718 Add(self, item, GBPosition pos, GBSpan span=DefaultSpan, int flag=0,
d3b6e4ff 10719 int border=0, userData=None) -> wx.GBSizerItem
248ed943
RD
10720
10721 Adds an item to the sizer at the grid cell *pos*, optionally spanning
10722 more than one row or column as specified with *span*. The remaining
10723 args behave similarly to `wx.Sizer.Add`.
10724
10725 Returns True if the item was successfully placed at the given cell
10726 position, False if something was already there.
10727
0df68c9f 10728 """
54f9ee45 10729 return _core_.GridBagSizer_Add(*args, **kwargs)
e811c8ce
RD
10730
10731 def AddItem(*args, **kwargs):
248ed943 10732 """
d3b6e4ff 10733 Add(self, GBSizerItem item) -> wx.GBSizerItem
248ed943
RD
10734
10735 Add an item to the sizer using a `wx.GBSizerItem`. Returns True if
10736 the item was successfully placed at its given cell position, False if
10737 something was already there.
10738 """
54f9ee45 10739 return _core_.GridBagSizer_AddItem(*args, **kwargs)
e811c8ce 10740
84f85550
RD
10741 def GetCellSize(*args, **kwargs):
10742 """
10743 GetCellSize(self, int row, int col) -> Size
10744
10745 Get the size of the specified cell, including hgap and
10746 vgap. Only valid after a Layout.
10747 """
10748 return _core_.GridBagSizer_GetCellSize(*args, **kwargs)
10749
e811c8ce 10750 def GetEmptyCellSize(*args, **kwargs):
248ed943
RD
10751 """
10752 GetEmptyCellSize(self) -> Size
10753
10754 Get the size used for cells in the grid with no item.
10755 """
54f9ee45 10756 return _core_.GridBagSizer_GetEmptyCellSize(*args, **kwargs)
e811c8ce
RD
10757
10758 def SetEmptyCellSize(*args, **kwargs):
248ed943
RD
10759 """
10760 SetEmptyCellSize(self, Size sz)
10761
10762 Set the size used for cells in the grid with no item.
10763 """
54f9ee45 10764 return _core_.GridBagSizer_SetEmptyCellSize(*args, **kwargs)
e811c8ce
RD
10765
10766 def GetItemPosition(*args):
0df68c9f 10767 """
248ed943
RD
10768 GetItemPosition(self, item) -> GBPosition
10769
10770 Get the grid position of the specified *item* where *item* is either a
10771 window or subsizer that is a member of this sizer, or a zero-based
10772 index of an item.
0df68c9f 10773 """
54f9ee45 10774 return _core_.GridBagSizer_GetItemPosition(*args)
e811c8ce
RD
10775
10776 def SetItemPosition(*args):
0df68c9f 10777 """
248ed943
RD
10778 SetItemPosition(self, item, GBPosition pos) -> bool
10779
10780 Set the grid position of the specified *item* where *item* is either a
10781 window or subsizer that is a member of this sizer, or a zero-based
10782 index of an item. Returns True on success. If the move is not
10783 allowed (because an item is already there) then False is returned.
10784
0df68c9f 10785 """
54f9ee45 10786 return _core_.GridBagSizer_SetItemPosition(*args)
e811c8ce
RD
10787
10788 def GetItemSpan(*args):
0df68c9f 10789 """
248ed943
RD
10790 GetItemSpan(self, item) -> GBSpan
10791
10792 Get the row/col spanning of the specified *item* where *item* is
10793 either a window or subsizer that is a member of this sizer, or a
10794 zero-based index of an item.
0df68c9f 10795 """
54f9ee45 10796 return _core_.GridBagSizer_GetItemSpan(*args)
e811c8ce
RD
10797
10798 def SetItemSpan(*args):
0df68c9f 10799 """
248ed943
RD
10800 SetItemSpan(self, item, GBSpan span) -> bool
10801
10802 Set the row/col spanning of the specified *item* where *item* is
10803 either a window or subsizer that is a member of this sizer, or a
10804 zero-based index of an item. Returns True on success. If the move is
10805 not allowed (because an item is already there) then False is returned.
0df68c9f 10806 """
54f9ee45 10807 return _core_.GridBagSizer_SetItemSpan(*args)
e811c8ce
RD
10808
10809 def FindItem(*args):
0df68c9f 10810 """
248ed943
RD
10811 FindItem(self, item) -> GBSizerItem
10812
10813 Find the sizer item for the given window or subsizer, returns None if
10814 not found. (non-recursive)
0df68c9f 10815 """
54f9ee45 10816 return _core_.GridBagSizer_FindItem(*args)
e811c8ce
RD
10817
10818 def FindItemAtPosition(*args, **kwargs):
248ed943
RD
10819 """
10820 FindItemAtPosition(self, GBPosition pos) -> GBSizerItem
10821
10822 Return the sizer item for the given grid cell, or None if there is no
10823 item at that position. (non-recursive)
10824 """
54f9ee45 10825 return _core_.GridBagSizer_FindItemAtPosition(*args, **kwargs)
e811c8ce
RD
10826
10827 def FindItemAtPoint(*args, **kwargs):
248ed943
RD
10828 """
10829 FindItemAtPoint(self, Point pt) -> GBSizerItem
10830
10831 Return the sizer item located at the point given in *pt*, or None if
10832 there is no item at that point. The (x,y) coordinates in pt correspond
10833 to the client coordinates of the window using the sizer for
10834 layout. (non-recursive)
10835 """
54f9ee45 10836 return _core_.GridBagSizer_FindItemAtPoint(*args, **kwargs)
e811c8ce 10837
248ed943
RD
10838 def CheckForIntersection(*args, **kwargs):
10839 """
10840 CheckForIntersection(self, GBSizerItem item, GBSizerItem excludeItem=None) -> bool
e811c8ce 10841
248ed943
RD
10842 Look at all items and see if any intersect (or would overlap) the
10843 given *item*. Returns True if so, False if there would be no overlap.
10844 If an *excludeItem* is given then it will not be checked for
10845 intersection, for example it may be the item we are checking the
10846 position of.
e811c8ce 10847
248ed943
RD
10848 """
10849 return _core_.GridBagSizer_CheckForIntersection(*args, **kwargs)
e811c8ce 10850
248ed943 10851 def CheckForIntersectionPos(*args, **kwargs):
0df68c9f 10852 """
248ed943
RD
10853 CheckForIntersectionPos(self, GBPosition pos, GBSpan span, GBSizerItem excludeItem=None) -> bool
10854
10855 Look at all items and see if any intersect (or would overlap) the
10856 given position and span. Returns True if so, False if there would be
10857 no overlap. If an *excludeItem* is given then it will not be checked
10858 for intersection, for example it may be the item we are checking the
10859 position of.
0df68c9f 10860 """
248ed943 10861 return _core_.GridBagSizer_CheckForIntersectionPos(*args, **kwargs)
e811c8ce 10862
d14a1e28
RD
10863
10864class GridBagSizerPtr(GridBagSizer):
10865 def __init__(self, this):
10866 self.this = this
10867 if not hasattr(self,"thisown"): self.thisown = 0
10868 self.__class__ = GridBagSizer
54f9ee45 10869_core_.GridBagSizer_swigregister(GridBagSizerPtr)
d14a1e28
RD
10870
10871#---------------------------------------------------------------------------
10872
54f9ee45
RD
10873Left = _core_.Left
10874Top = _core_.Top
10875Right = _core_.Right
10876Bottom = _core_.Bottom
10877Width = _core_.Width
10878Height = _core_.Height
10879Centre = _core_.Centre
10880Center = _core_.Center
10881CentreX = _core_.CentreX
10882CentreY = _core_.CentreY
10883Unconstrained = _core_.Unconstrained
10884AsIs = _core_.AsIs
10885PercentOf = _core_.PercentOf
10886Above = _core_.Above
10887Below = _core_.Below
10888LeftOf = _core_.LeftOf
10889RightOf = _core_.RightOf
10890SameAs = _core_.SameAs
10891Absolute = _core_.Absolute
d14a1e28 10892class IndividualLayoutConstraint(Object):
15afbcd0 10893 """
41e2b43e
RD
10894 Objects of this class are stored in the `wx.LayoutConstraints` class as
10895 one of eight possible constraints that a window can be involved in.
10896 You will never need to create an instance of
10897 wx.IndividualLayoutConstraint, rather you should create a
10898 `wx.LayoutConstraints` instance and use the individual contstraints
15afbcd0 10899 that it contains.
15afbcd0 10900 """
d14a1e28
RD
10901 def __init__(self): raise RuntimeError, "No constructor defined"
10902 def __repr__(self):
10903 return "<%s.%s; proxy of C++ wxIndividualLayoutConstraint instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
e811c8ce 10904 def Set(*args, **kwargs):
41e2b43e
RD
10905 """
10906 Set(self, int rel, Window otherW, int otherE, int val=0, int marg=wxLAYOUT_DEFAULT_MARGIN)
10907
10908 Sets the properties of the constraint. Normally called by one of the
10909 convenience functions such as Above, RightOf, SameAs.
10910 """
54f9ee45 10911 return _core_.IndividualLayoutConstraint_Set(*args, **kwargs)
e811c8ce
RD
10912
10913 def LeftOf(*args, **kwargs):
15afbcd0 10914 """
a95a7133 10915 LeftOf(self, Window sibling, int marg=0)
15afbcd0 10916
41e2b43e
RD
10917 Constrains this edge to be to the left of the given window, with an
10918 optional margin. Implicitly, this is relative to the left edge of the
10919 other window.
15afbcd0 10920 """
54f9ee45 10921 return _core_.IndividualLayoutConstraint_LeftOf(*args, **kwargs)
e811c8ce
RD
10922
10923 def RightOf(*args, **kwargs):
15afbcd0 10924 """
a95a7133 10925 RightOf(self, Window sibling, int marg=0)
15afbcd0 10926
41e2b43e
RD
10927 Constrains this edge to be to the right of the given window, with an
10928 optional margin. Implicitly, this is relative to the right edge of the
10929 other window.
15afbcd0 10930 """
54f9ee45 10931 return _core_.IndividualLayoutConstraint_RightOf(*args, **kwargs)
e811c8ce
RD
10932
10933 def Above(*args, **kwargs):
15afbcd0 10934 """
a95a7133 10935 Above(self, Window sibling, int marg=0)
15afbcd0 10936
41e2b43e
RD
10937 Constrains this edge to be above the given window, with an optional
10938 margin. Implicitly, this is relative to the top edge of the other
10939 window.
15afbcd0 10940 """
54f9ee45 10941 return _core_.IndividualLayoutConstraint_Above(*args, **kwargs)
e811c8ce
RD
10942
10943 def Below(*args, **kwargs):
15afbcd0 10944 """
a95a7133 10945 Below(self, Window sibling, int marg=0)
15afbcd0 10946
41e2b43e
RD
10947 Constrains this edge to be below the given window, with an optional
10948 margin. Implicitly, this is relative to the bottom edge of the other
10949 window.
15afbcd0 10950 """
54f9ee45 10951 return _core_.IndividualLayoutConstraint_Below(*args, **kwargs)
e811c8ce
RD
10952
10953 def SameAs(*args, **kwargs):
15afbcd0 10954 """
a95a7133 10955 SameAs(self, Window otherW, int edge, int marg=0)
15afbcd0 10956
41e2b43e
RD
10957 Constrains this edge or dimension to be to the same as the edge of the
10958 given window, with an optional margin.
15afbcd0 10959 """
54f9ee45 10960 return _core_.IndividualLayoutConstraint_SameAs(*args, **kwargs)
e811c8ce
RD
10961
10962 def PercentOf(*args, **kwargs):
15afbcd0 10963 """
a95a7133 10964 PercentOf(self, Window otherW, int wh, int per)
15afbcd0 10965
41e2b43e
RD
10966 Constrains this edge or dimension to be to a percentage of the given
10967 window, with an optional margin.
15afbcd0 10968 """
54f9ee45 10969 return _core_.IndividualLayoutConstraint_PercentOf(*args, **kwargs)
e811c8ce
RD
10970
10971 def Absolute(*args, **kwargs):
15afbcd0 10972 """
a95a7133 10973 Absolute(self, int val)
15afbcd0 10974
41e2b43e 10975 Constrains this edge or dimension to be the given absolute value.
15afbcd0 10976 """
54f9ee45 10977 return _core_.IndividualLayoutConstraint_Absolute(*args, **kwargs)
e811c8ce
RD
10978
10979 def Unconstrained(*args, **kwargs):
15afbcd0 10980 """
a95a7133 10981 Unconstrained(self)
15afbcd0 10982
41e2b43e
RD
10983 Sets this edge or dimension to be unconstrained, that is, dependent on
10984 other edges and dimensions from which this value can be deduced.
15afbcd0 10985 """
54f9ee45 10986 return _core_.IndividualLayoutConstraint_Unconstrained(*args, **kwargs)
e811c8ce
RD
10987
10988 def AsIs(*args, **kwargs):
15afbcd0 10989 """
a95a7133 10990 AsIs(self)
15afbcd0 10991
41e2b43e
RD
10992 Sets this edge or constraint to be whatever the window's value is at
10993 the moment. If either of the width and height constraints are *as is*,
10994 the window will not be resized, but moved instead. This is important
10995 when considering panel items which are intended to have a default
10996 size, such as a button, which may take its size from the size of the
10997 button label.
15afbcd0 10998 """
54f9ee45 10999 return _core_.IndividualLayoutConstraint_AsIs(*args, **kwargs)
e811c8ce
RD
11000
11001 def GetOtherWindow(*args, **kwargs):
a95a7133 11002 """GetOtherWindow(self) -> Window"""
54f9ee45 11003 return _core_.IndividualLayoutConstraint_GetOtherWindow(*args, **kwargs)
e811c8ce
RD
11004
11005 def GetMyEdge(*args, **kwargs):
a95a7133 11006 """GetMyEdge(self) -> int"""
54f9ee45 11007 return _core_.IndividualLayoutConstraint_GetMyEdge(*args, **kwargs)
e811c8ce
RD
11008
11009 def SetEdge(*args, **kwargs):
a95a7133 11010 """SetEdge(self, int which)"""
54f9ee45 11011 return _core_.IndividualLayoutConstraint_SetEdge(*args, **kwargs)
e811c8ce
RD
11012
11013 def SetValue(*args, **kwargs):
a95a7133 11014 """SetValue(self, int v)"""
54f9ee45 11015 return _core_.IndividualLayoutConstraint_SetValue(*args, **kwargs)
e811c8ce
RD
11016
11017 def GetMargin(*args, **kwargs):
a95a7133 11018 """GetMargin(self) -> int"""
54f9ee45 11019 return _core_.IndividualLayoutConstraint_GetMargin(*args, **kwargs)
e811c8ce
RD
11020
11021 def SetMargin(*args, **kwargs):
a95a7133 11022 """SetMargin(self, int m)"""
54f9ee45 11023 return _core_.IndividualLayoutConstraint_SetMargin(*args, **kwargs)
e811c8ce
RD
11024
11025 def GetValue(*args, **kwargs):
a95a7133 11026 """GetValue(self) -> int"""
54f9ee45 11027 return _core_.IndividualLayoutConstraint_GetValue(*args, **kwargs)
e811c8ce
RD
11028
11029 def GetPercent(*args, **kwargs):
a95a7133 11030 """GetPercent(self) -> int"""
54f9ee45 11031 return _core_.IndividualLayoutConstraint_GetPercent(*args, **kwargs)
e811c8ce
RD
11032
11033 def GetOtherEdge(*args, **kwargs):
a95a7133 11034 """GetOtherEdge(self) -> int"""
54f9ee45 11035 return _core_.IndividualLayoutConstraint_GetOtherEdge(*args, **kwargs)
e811c8ce
RD
11036
11037 def GetDone(*args, **kwargs):
a95a7133 11038 """GetDone(self) -> bool"""
54f9ee45 11039 return _core_.IndividualLayoutConstraint_GetDone(*args, **kwargs)
e811c8ce
RD
11040
11041 def SetDone(*args, **kwargs):
a95a7133 11042 """SetDone(self, bool d)"""
54f9ee45 11043 return _core_.IndividualLayoutConstraint_SetDone(*args, **kwargs)
e811c8ce
RD
11044
11045 def GetRelationship(*args, **kwargs):
a95a7133 11046 """GetRelationship(self) -> int"""
54f9ee45 11047 return _core_.IndividualLayoutConstraint_GetRelationship(*args, **kwargs)
e811c8ce
RD
11048
11049 def SetRelationship(*args, **kwargs):
a95a7133 11050 """SetRelationship(self, int r)"""
54f9ee45 11051 return _core_.IndividualLayoutConstraint_SetRelationship(*args, **kwargs)
e811c8ce
RD
11052
11053 def ResetIfWin(*args, **kwargs):
15afbcd0 11054 """
a95a7133 11055 ResetIfWin(self, Window otherW) -> bool
15afbcd0
RD
11056
11057 Reset constraint if it mentions otherWin
11058 """
54f9ee45 11059 return _core_.IndividualLayoutConstraint_ResetIfWin(*args, **kwargs)
e811c8ce
RD
11060
11061 def SatisfyConstraint(*args, **kwargs):
15afbcd0 11062 """
a95a7133 11063 SatisfyConstraint(self, LayoutConstraints constraints, Window win) -> bool
15afbcd0
RD
11064
11065 Try to satisfy constraint
11066 """
54f9ee45 11067 return _core_.IndividualLayoutConstraint_SatisfyConstraint(*args, **kwargs)
e811c8ce
RD
11068
11069 def GetEdge(*args, **kwargs):
15afbcd0 11070 """
a95a7133 11071 GetEdge(self, int which, Window thisWin, Window other) -> int
15afbcd0
RD
11072
11073 Get the value of this edge or dimension, or if this
11074 is not determinable, -1.
11075 """
54f9ee45 11076 return _core_.IndividualLayoutConstraint_GetEdge(*args, **kwargs)
e811c8ce 11077
d14a1e28
RD
11078
11079class IndividualLayoutConstraintPtr(IndividualLayoutConstraint):
11080 def __init__(self, this):
11081 self.this = this
11082 if not hasattr(self,"thisown"): self.thisown = 0
11083 self.__class__ = IndividualLayoutConstraint
54f9ee45 11084_core_.IndividualLayoutConstraint_swigregister(IndividualLayoutConstraintPtr)
d14a1e28
RD
11085
11086class LayoutConstraints(Object):
15afbcd0 11087 """
41e2b43e
RD
11088 **Note:** constraints are now deprecated and you should use sizers
11089 instead.
15afbcd0 11090
41e2b43e
RD
11091 Objects of this class can be associated with a window to define its
11092 layout constraints, with respect to siblings or its parent.
15afbcd0
RD
11093
11094 The class consists of the following eight constraints of class
11095 wx.IndividualLayoutConstraint, some or all of which should be accessed
11096 directly to set the appropriate constraints.
11097
11098 * left: represents the left hand edge of the window
11099 * right: represents the right hand edge of the window
11100 * top: represents the top edge of the window
11101 * bottom: represents the bottom edge of the window
11102 * width: represents the width of the window
11103 * height: represents the height of the window
11104 * centreX: represents the horizontal centre point of the window
11105 * centreY: represents the vertical centre point of the window
11106
41e2b43e
RD
11107 Most constraints are initially set to have the relationship
11108 wxUnconstrained, which means that their values should be calculated by
11109 looking at known constraints. The exceptions are width and height,
11110 which are set to wxAsIs to ensure that if the user does not specify a
11111 constraint, the existing width and height will be used, to be
11112 compatible with panel items which often have take a default size. If
11113 the constraint is ``wx.AsIs``, the dimension will not be changed.
11114
11115 :see: `wx.IndividualLayoutConstraint`, `wx.Window.SetConstraints`
15afbcd0
RD
11116
11117 """
e811c8ce
RD
11118 def __repr__(self):
11119 return "<%s.%s; proxy of C++ wxLayoutConstraints instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
54f9ee45
RD
11120 left = property(_core_.LayoutConstraints_left_get)
11121 top = property(_core_.LayoutConstraints_top_get)
11122 right = property(_core_.LayoutConstraints_right_get)
11123 bottom = property(_core_.LayoutConstraints_bottom_get)
11124 width = property(_core_.LayoutConstraints_width_get)
11125 height = property(_core_.LayoutConstraints_height_get)
11126 centreX = property(_core_.LayoutConstraints_centreX_get)
11127 centreY = property(_core_.LayoutConstraints_centreY_get)
d14a1e28 11128 def __init__(self, *args, **kwargs):
a95a7133 11129 """__init__(self) -> LayoutConstraints"""
54f9ee45 11130 newobj = _core_.new_LayoutConstraints(*args, **kwargs)
d14a1e28
RD
11131 self.this = newobj.this
11132 self.thisown = 1
11133 del newobj.thisown
e811c8ce 11134 def SatisfyConstraints(*args, **kwargs):
6c3b4aae 11135 """SatisfyConstraints(Window win) -> (areSatisfied, noChanges)"""
54f9ee45 11136 return _core_.LayoutConstraints_SatisfyConstraints(*args, **kwargs)
e811c8ce
RD
11137
11138 def AreSatisfied(*args, **kwargs):
a95a7133 11139 """AreSatisfied(self) -> bool"""
54f9ee45 11140 return _core_.LayoutConstraints_AreSatisfied(*args, **kwargs)
e811c8ce 11141
d14a1e28
RD
11142
11143class LayoutConstraintsPtr(LayoutConstraints):
11144 def __init__(self, this):
11145 self.this = this
11146 if not hasattr(self,"thisown"): self.thisown = 0
11147 self.__class__ = LayoutConstraints
54f9ee45 11148_core_.LayoutConstraints_swigregister(LayoutConstraintsPtr)
d14a1e28
RD
11149
11150#----------------------------------------------------------------------------
11151
322913ce 11152# Use Python's bool constants if available, make some if not
d14a1e28
RD
11153try:
11154 True
11155except NameError:
322913ce
RD
11156 __builtins__.True = 1==1
11157 __builtins__.False = 1==0
4f89f6a3
RD
11158 def bool(value): return not not value
11159 __builtins__.bool = bool
d14a1e28 11160
d14a1e28
RD
11161
11162
11163# workarounds for bad wxRTTI names
11164__wxPyPtrTypeMap['wxGauge95'] = 'wxGauge'
11165__wxPyPtrTypeMap['wxSlider95'] = 'wxSlider'
11166__wxPyPtrTypeMap['wxStatusBar95'] = 'wxStatusBar'
11167
11168
11169#----------------------------------------------------------------------------
11170# Load version numbers from __version__... Ensure that major and minor
7bc1e663 11171# versions are the same for both wxPython and wxWidgets.
d14a1e28
RD
11172
11173from __version__ import *
11174__version__ = VERSION_STRING
11175
7bc1e663
RD
11176assert MAJOR_VERSION == _core_.MAJOR_VERSION, "wxPython/wxWidgets version mismatch"
11177assert MINOR_VERSION == _core_.MINOR_VERSION, "wxPython/wxWidgets version mismatch"
54f9ee45 11178if RELEASE_VERSION != _core_.RELEASE_VERSION:
d14a1e28 11179 import warnings
7bc1e663 11180 warnings.warn("wxPython/wxWidgets release number mismatch")
d14a1e28
RD
11181
11182#----------------------------------------------------------------------------
11183
e505d15e
RD
11184# Set the default string<-->unicode conversion encoding from the
11185# locale. This encoding is used when string or unicode objects need
11186# to be converted in order to pass them to wxWidgets. Please be aware
11187# that the default encoding within the same locale may be slightly
11188# different on different platforms. For example, please see
11189# http://www.alanwood.net/demos/charsetdiffs.html for differences
11190# between the common latin/roman encodings.
5cbf236d
RD
11191import locale
11192default = locale.getdefaultlocale()[1]
11193if default:
11194 wx.SetDefaultPyEncoding(default)
11195del default
11196del locale
11197
11198#----------------------------------------------------------------------------
11199
d14a1e28
RD
11200class PyDeadObjectError(AttributeError):
11201 pass
11202
d14a1e28
RD
11203class _wxPyDeadObject(object):
11204 """
11205 Instances of wx objects that are OOR capable will have their __class__
11206 changed to this class when the C++ object is deleted. This should help
11207 prevent crashes due to referencing a bogus C++ pointer.
11208 """
11209 reprStr = "wxPython wrapper for DELETED %s object! (The C++ object no longer exists.)"
11210 attrStr = "The C++ part of the %s object has been deleted, attribute access no longer allowed."
11211
3a04f143 11212 def __repr__(self):
d14a1e28
RD
11213 if not hasattr(self, "_name"):
11214 self._name = "[unknown]"
11215 return self.reprStr % self._name
11216
3a04f143 11217 def __getattr__(self, *args):
d14a1e28
RD
11218 if not hasattr(self, "_name"):
11219 self._name = "[unknown]"
3a04f143
RD
11220 raise PyDeadObjectError(self.attrStr % self._name)
11221
11222 def __nonzero__(self):
11223 return 0
11224
11225
11226
11227class PyUnbornObjectError(AttributeError):
11228 pass
11229
11230class _wxPyUnbornObject(object):
11231 """
54f9ee45 11232 Some stock objects are created when the wx._core module is
3a04f143
RD
11233 imported, but their C++ instance is not created until the wx.App
11234 object is created and initialized. These object instances will
11235 temporarily have their __class__ changed to this class so an
11236 exception will be raised if they are used before the C++ instance
11237 is ready.
11238 """
11239
11240 reprStr = "wxPython wrapper for UNBORN object! (The C++ object is not initialized yet.)"
11241 attrStr = "The C++ part of this object has not been initialized, attribute access not allowed."
11242
11243 def __repr__(self):
11244 #if not hasattr(self, "_name"):
11245 # self._name = "[unknown]"
11246 return self.reprStr #% self._name
11247
11248 def __getattr__(self, *args):
11249 #if not hasattr(self, "_name"):
11250 # self._name = "[unknown]"
11251 raise PyUnbornObjectError(self.attrStr) # % self._name )
d14a1e28
RD
11252
11253 def __nonzero__(self):
11254 return 0
11255
11256
11257#----------------------------------------------------------------------------
d14a1e28
RD
11258
11259def CallAfter(callable, *args, **kw):
11260 """
11261 Call the specified function after the current and pending event
11262 handlers have been completed. This is also good for making GUI
61863841
RD
11263 method calls from non-GUI threads. Any extra positional or
11264 keyword args are passed on to the callable when it is called.
11265
11266 :see: `wx.FutureCall`
d14a1e28
RD
11267 """
11268 app = wx.GetApp()
dfbb5885 11269 assert app is not None, 'No wx.App created yet'
d14a1e28 11270
148275d3
RD
11271 if not hasattr(app, "_CallAfterId"):
11272 app._CallAfterId = wx.NewEventType()
11273 app.Connect(-1, -1, app._CallAfterId,
11274 lambda event: event.callable(*event.args, **event.kw) )
d14a1e28 11275 evt = wx.PyEvent()
148275d3 11276 evt.SetEventType(app._CallAfterId)
d14a1e28
RD
11277 evt.callable = callable
11278 evt.args = args
11279 evt.kw = kw
11280 wx.PostEvent(app, evt)
11281
d14a1e28
RD
11282#----------------------------------------------------------------------------
11283
11284
11285class FutureCall:
11286 """
8ac8dba0 11287 A convenience class for `wx.Timer`, that calls the given callable
d14a1e28
RD
11288 object once after the given amount of milliseconds, passing any
11289 positional or keyword args. The return value of the callable is
61863841 11290 availbale after it has been run with the `GetResult` method.
d14a1e28
RD
11291
11292 If you don't need to get the return value or restart the timer
11293 then there is no need to hold a reference to this object. It will
11294 hold a reference to itself while the timer is running (the timer
11295 has a reference to self.Notify) but the cycle will be broken when
11296 the timer completes, automatically cleaning up the wx.FutureCall
11297 object.
61863841
RD
11298
11299 :see: `wx.CallAfter`
d14a1e28
RD
11300 """
11301 def __init__(self, millis, callable, *args, **kwargs):
11302 self.millis = millis
11303 self.callable = callable
11304 self.SetArgs(*args, **kwargs)
11305 self.runCount = 0
4276dc52 11306 self.running = False
d14a1e28
RD
11307 self.hasRun = False
11308 self.result = None
11309 self.timer = None
11310 self.Start()
11311
11312 def __del__(self):
11313 self.Stop()
11314
11315
11316 def Start(self, millis=None, *args, **kwargs):
11317 """
11318 (Re)start the timer
11319 """
11320 self.hasRun = False
11321 if millis is not None:
11322 self.millis = millis
11323 if args or kwargs:
11324 self.SetArgs(*args, **kwargs)
11325 self.Stop()
11326 self.timer = wx.PyTimer(self.Notify)
11327 self.timer.Start(self.millis, wx.TIMER_ONE_SHOT)
4276dc52 11328 self.running = True
d14a1e28
RD
11329 Restart = Start
11330
11331
11332 def Stop(self):
11333 """
11334 Stop and destroy the timer.
11335 """
11336 if self.timer is not None:
11337 self.timer.Stop()
11338 self.timer = None
11339
11340
11341 def GetInterval(self):
11342 if self.timer is not None:
11343 return self.timer.GetInterval()
11344 else:
11345 return 0
11346
11347
11348 def IsRunning(self):
11349 return self.timer is not None and self.timer.IsRunning()
11350
11351
11352 def SetArgs(self, *args, **kwargs):
11353 """
11354 (Re)set the args passed to the callable object. This is
11355 useful in conjunction with Restart if you want to schedule a
11356 new call to the same callable object but with different
11357 parameters.
11358 """
11359 self.args = args
11360 self.kwargs = kwargs
11361
11362
11363 def HasRun(self):
11364 return self.hasRun
11365
11366 def GetResult(self):
11367 return self.result
11368
11369 def Notify(self):
11370 """
11371 The timer has expired so call the callable.
11372 """
11373 if self.callable and getattr(self.callable, 'im_self', True):
11374 self.runCount += 1
4276dc52 11375 self.running = False
d14a1e28
RD
11376 self.result = self.callable(*self.args, **self.kwargs)
11377 self.hasRun = True
4276dc52
RD
11378 if not self.running:
11379 # if it wasn't restarted, then cleanup
11380 wx.CallAfter(self.Stop)
d14a1e28
RD
11381
11382
a95a7133
RD
11383
11384#----------------------------------------------------------------------------
11385# Control which items in this module should be documented by epydoc.
11386# We allow only classes and functions, which will help reduce the size
11387# of the docs by filtering out the zillions of constants, EVT objects,
11388# and etc that don't make much sense by themselves, but are instead
11389# documented (or will be) as part of the classes/functions/methods
11390# where they should be used.
11391
66c033b4
RD
11392class __DocFilter:
11393 """
11394 A filter for epydoc that only allows non-Ptr classes and
11395 fucntions, in order to reduce the clutter in the API docs.
11396 """
11397 def __init__(self, globals):
11398 self._globals = globals
11399
11400 def __call__(self, name):
11401 import types
11402 obj = self._globals.get(name, None)
11403 if type(obj) not in [type, types.ClassType, types.FunctionType, types.BuiltinFunctionType]:
11404 return False
11405 if name.startswith('_') or name.endswith('Ptr') or name.startswith('EVT'):
11406 return False
11407 return True
a95a7133 11408
d14a1e28
RD
11409#----------------------------------------------------------------------------
11410#----------------------------------------------------------------------------
11411
11412# Import other modules in this package that should show up in the
11413# "core" wx namespace
54f9ee45
RD
11414from _gdi import *
11415from _windows import *
11416from _controls import *
11417from _misc import *
d14a1e28 11418
3a04f143
RD
11419
11420# Fixup the stock objects since they can't be used yet. (They will be
11421# restored in wx.PyApp.OnInit.)
54f9ee45 11422_core_._wxPyFixStockObjects()
3a04f143 11423
d14a1e28
RD
11424#----------------------------------------------------------------------------
11425#----------------------------------------------------------------------------
11426
11427