]> git.saurik.com Git - wxWidgets.git/blame - wxPython/src/msw/_core.py
return name and extension by const ref, not by value, to prevent bugs as the one...
[wxWidgets.git] / wxPython / src / msw / _core.py
CommitLineData
d55e5bfc
RD
1# This file was created automatically by SWIG.
2# Don't modify this file, modify the SWIG interface instead.
3
4import _core_
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
d55e5bfc
RD
47#// Give a reference to the dictionary of this module to the C++ extension
48#// code.
49_core_._wxPySetDictionary(vars())
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
c24da6d6
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
d55e5bfc
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
d55e5bfc
RD
94CLIP_CHILDREN = _core_.CLIP_CHILDREN
95CLIP_SIBLINGS = _core_.CLIP_SIBLINGS
96ALWAYS_SHOW_SB = _core_.ALWAYS_SHOW_SB
97RETAINED = _core_.RETAINED
98BACKINGSTORE = _core_.BACKINGSTORE
99COLOURED = _core_.COLOURED
100FIXED_LENGTH = _core_.FIXED_LENGTH
101LB_NEEDED_SB = _core_.LB_NEEDED_SB
102LB_ALWAYS_SB = _core_.LB_ALWAYS_SB
103LB_SORT = _core_.LB_SORT
104LB_SINGLE = _core_.LB_SINGLE
105LB_MULTIPLE = _core_.LB_MULTIPLE
106LB_EXTENDED = _core_.LB_EXTENDED
107LB_OWNERDRAW = _core_.LB_OWNERDRAW
108LB_HSCROLL = _core_.LB_HSCROLL
109PROCESS_ENTER = _core_.PROCESS_ENTER
110PASSWORD = _core_.PASSWORD
111CB_SIMPLE = _core_.CB_SIMPLE
112CB_DROPDOWN = _core_.CB_DROPDOWN
113CB_SORT = _core_.CB_SORT
114CB_READONLY = _core_.CB_READONLY
115RA_HORIZONTAL = _core_.RA_HORIZONTAL
116RA_VERTICAL = _core_.RA_VERTICAL
117RA_SPECIFY_ROWS = _core_.RA_SPECIFY_ROWS
118RA_SPECIFY_COLS = _core_.RA_SPECIFY_COLS
fef4c27a 119RA_USE_CHECKBOX = _core_.RA_USE_CHECKBOX
d55e5bfc
RD
120RB_GROUP = _core_.RB_GROUP
121RB_SINGLE = _core_.RB_SINGLE
d55e5bfc
RD
122SB_HORIZONTAL = _core_.SB_HORIZONTAL
123SB_VERTICAL = _core_.SB_VERTICAL
fef4c27a 124RB_USE_CHECKBOX = _core_.RB_USE_CHECKBOX
d55e5bfc
RD
125ST_SIZEGRIP = _core_.ST_SIZEGRIP
126ST_NO_AUTORESIZE = _core_.ST_NO_AUTORESIZE
127FLOOD_SURFACE = _core_.FLOOD_SURFACE
128FLOOD_BORDER = _core_.FLOOD_BORDER
129ODDEVEN_RULE = _core_.ODDEVEN_RULE
130WINDING_RULE = _core_.WINDING_RULE
131TOOL_TOP = _core_.TOOL_TOP
132TOOL_BOTTOM = _core_.TOOL_BOTTOM
133TOOL_LEFT = _core_.TOOL_LEFT
134TOOL_RIGHT = _core_.TOOL_RIGHT
135OK = _core_.OK
136YES_NO = _core_.YES_NO
137CANCEL = _core_.CANCEL
138YES = _core_.YES
139NO = _core_.NO
140NO_DEFAULT = _core_.NO_DEFAULT
141YES_DEFAULT = _core_.YES_DEFAULT
142ICON_EXCLAMATION = _core_.ICON_EXCLAMATION
143ICON_HAND = _core_.ICON_HAND
144ICON_QUESTION = _core_.ICON_QUESTION
145ICON_INFORMATION = _core_.ICON_INFORMATION
146ICON_STOP = _core_.ICON_STOP
147ICON_ASTERISK = _core_.ICON_ASTERISK
148ICON_MASK = _core_.ICON_MASK
149ICON_WARNING = _core_.ICON_WARNING
150ICON_ERROR = _core_.ICON_ERROR
151FORWARD = _core_.FORWARD
152BACKWARD = _core_.BACKWARD
153RESET = _core_.RESET
154HELP = _core_.HELP
155MORE = _core_.MORE
156SETUP = _core_.SETUP
157SIZE_AUTO_WIDTH = _core_.SIZE_AUTO_WIDTH
158SIZE_AUTO_HEIGHT = _core_.SIZE_AUTO_HEIGHT
159SIZE_AUTO = _core_.SIZE_AUTO
160SIZE_USE_EXISTING = _core_.SIZE_USE_EXISTING
161SIZE_ALLOW_MINUS_ONE = _core_.SIZE_ALLOW_MINUS_ONE
162PORTRAIT = _core_.PORTRAIT
163LANDSCAPE = _core_.LANDSCAPE
164PRINT_QUALITY_HIGH = _core_.PRINT_QUALITY_HIGH
165PRINT_QUALITY_MEDIUM = _core_.PRINT_QUALITY_MEDIUM
166PRINT_QUALITY_LOW = _core_.PRINT_QUALITY_LOW
167PRINT_QUALITY_DRAFT = _core_.PRINT_QUALITY_DRAFT
168ID_ANY = _core_.ID_ANY
169ID_SEPARATOR = _core_.ID_SEPARATOR
170ID_LOWEST = _core_.ID_LOWEST
171ID_OPEN = _core_.ID_OPEN
172ID_CLOSE = _core_.ID_CLOSE
173ID_NEW = _core_.ID_NEW
174ID_SAVE = _core_.ID_SAVE
175ID_SAVEAS = _core_.ID_SAVEAS
176ID_REVERT = _core_.ID_REVERT
177ID_EXIT = _core_.ID_EXIT
178ID_UNDO = _core_.ID_UNDO
179ID_REDO = _core_.ID_REDO
180ID_HELP = _core_.ID_HELP
181ID_PRINT = _core_.ID_PRINT
182ID_PRINT_SETUP = _core_.ID_PRINT_SETUP
183ID_PREVIEW = _core_.ID_PREVIEW
184ID_ABOUT = _core_.ID_ABOUT
185ID_HELP_CONTENTS = _core_.ID_HELP_CONTENTS
186ID_HELP_COMMANDS = _core_.ID_HELP_COMMANDS
187ID_HELP_PROCEDURES = _core_.ID_HELP_PROCEDURES
188ID_HELP_CONTEXT = _core_.ID_HELP_CONTEXT
189ID_CLOSE_ALL = _core_.ID_CLOSE_ALL
190ID_PREFERENCES = _core_.ID_PREFERENCES
191ID_CUT = _core_.ID_CUT
192ID_COPY = _core_.ID_COPY
193ID_PASTE = _core_.ID_PASTE
194ID_CLEAR = _core_.ID_CLEAR
195ID_FIND = _core_.ID_FIND
196ID_DUPLICATE = _core_.ID_DUPLICATE
197ID_SELECTALL = _core_.ID_SELECTALL
198ID_DELETE = _core_.ID_DELETE
199ID_REPLACE = _core_.ID_REPLACE
200ID_REPLACE_ALL = _core_.ID_REPLACE_ALL
201ID_PROPERTIES = _core_.ID_PROPERTIES
202ID_VIEW_DETAILS = _core_.ID_VIEW_DETAILS
203ID_VIEW_LARGEICONS = _core_.ID_VIEW_LARGEICONS
204ID_VIEW_SMALLICONS = _core_.ID_VIEW_SMALLICONS
205ID_VIEW_LIST = _core_.ID_VIEW_LIST
206ID_VIEW_SORTDATE = _core_.ID_VIEW_SORTDATE
207ID_VIEW_SORTNAME = _core_.ID_VIEW_SORTNAME
208ID_VIEW_SORTSIZE = _core_.ID_VIEW_SORTSIZE
209ID_VIEW_SORTTYPE = _core_.ID_VIEW_SORTTYPE
210ID_FILE1 = _core_.ID_FILE1
211ID_FILE2 = _core_.ID_FILE2
212ID_FILE3 = _core_.ID_FILE3
213ID_FILE4 = _core_.ID_FILE4
214ID_FILE5 = _core_.ID_FILE5
215ID_FILE6 = _core_.ID_FILE6
216ID_FILE7 = _core_.ID_FILE7
217ID_FILE8 = _core_.ID_FILE8
218ID_FILE9 = _core_.ID_FILE9
219ID_OK = _core_.ID_OK
220ID_CANCEL = _core_.ID_CANCEL
221ID_APPLY = _core_.ID_APPLY
222ID_YES = _core_.ID_YES
223ID_NO = _core_.ID_NO
224ID_STATIC = _core_.ID_STATIC
225ID_FORWARD = _core_.ID_FORWARD
226ID_BACKWARD = _core_.ID_BACKWARD
227ID_DEFAULT = _core_.ID_DEFAULT
228ID_MORE = _core_.ID_MORE
229ID_SETUP = _core_.ID_SETUP
230ID_RESET = _core_.ID_RESET
231ID_CONTEXT_HELP = _core_.ID_CONTEXT_HELP
232ID_YESTOALL = _core_.ID_YESTOALL
233ID_NOTOALL = _core_.ID_NOTOALL
234ID_ABORT = _core_.ID_ABORT
235ID_RETRY = _core_.ID_RETRY
236ID_IGNORE = _core_.ID_IGNORE
0f63ec68
RD
237ID_ADD = _core_.ID_ADD
238ID_REMOVE = _core_.ID_REMOVE
239ID_UP = _core_.ID_UP
240ID_DOWN = _core_.ID_DOWN
241ID_HOME = _core_.ID_HOME
242ID_REFRESH = _core_.ID_REFRESH
243ID_STOP = _core_.ID_STOP
244ID_INDEX = _core_.ID_INDEX
245ID_BOLD = _core_.ID_BOLD
246ID_ITALIC = _core_.ID_ITALIC
247ID_JUSTIFY_CENTER = _core_.ID_JUSTIFY_CENTER
248ID_JUSTIFY_FILL = _core_.ID_JUSTIFY_FILL
249ID_JUSTIFY_RIGHT = _core_.ID_JUSTIFY_RIGHT
250ID_JUSTIFY_LEFT = _core_.ID_JUSTIFY_LEFT
251ID_UNDERLINE = _core_.ID_UNDERLINE
252ID_INDENT = _core_.ID_INDENT
253ID_UNINDENT = _core_.ID_UNINDENT
254ID_ZOOM_100 = _core_.ID_ZOOM_100
255ID_ZOOM_FIT = _core_.ID_ZOOM_FIT
256ID_ZOOM_IN = _core_.ID_ZOOM_IN
257ID_ZOOM_OUT = _core_.ID_ZOOM_OUT
258ID_UNDELETE = _core_.ID_UNDELETE
259ID_REVERT_TO_SAVED = _core_.ID_REVERT_TO_SAVED
d55e5bfc
RD
260ID_HIGHEST = _core_.ID_HIGHEST
261OPEN = _core_.OPEN
262SAVE = _core_.SAVE
263HIDE_READONLY = _core_.HIDE_READONLY
264OVERWRITE_PROMPT = _core_.OVERWRITE_PROMPT
265FILE_MUST_EXIST = _core_.FILE_MUST_EXIST
266MULTIPLE = _core_.MULTIPLE
267CHANGE_DIR = _core_.CHANGE_DIR
268ACCEL_ALT = _core_.ACCEL_ALT
269ACCEL_CTRL = _core_.ACCEL_CTRL
270ACCEL_SHIFT = _core_.ACCEL_SHIFT
271ACCEL_NORMAL = _core_.ACCEL_NORMAL
272PD_AUTO_HIDE = _core_.PD_AUTO_HIDE
273PD_APP_MODAL = _core_.PD_APP_MODAL
274PD_CAN_ABORT = _core_.PD_CAN_ABORT
275PD_ELAPSED_TIME = _core_.PD_ELAPSED_TIME
276PD_ESTIMATED_TIME = _core_.PD_ESTIMATED_TIME
277PD_REMAINING_TIME = _core_.PD_REMAINING_TIME
62d32a5f
RD
278PD_SMOOTH = _core_.PD_SMOOTH
279PD_CAN_SKIP = _core_.PD_CAN_SKIP
d55e5bfc
RD
280DD_NEW_DIR_BUTTON = _core_.DD_NEW_DIR_BUTTON
281DD_DEFAULT_STYLE = _core_.DD_DEFAULT_STYLE
282MENU_TEAROFF = _core_.MENU_TEAROFF
283MB_DOCKABLE = _core_.MB_DOCKABLE
284NO_FULL_REPAINT_ON_RESIZE = _core_.NO_FULL_REPAINT_ON_RESIZE
285FULL_REPAINT_ON_RESIZE = _core_.FULL_REPAINT_ON_RESIZE
286LI_HORIZONTAL = _core_.LI_HORIZONTAL
287LI_VERTICAL = _core_.LI_VERTICAL
288WS_EX_VALIDATE_RECURSIVELY = _core_.WS_EX_VALIDATE_RECURSIVELY
289WS_EX_BLOCK_EVENTS = _core_.WS_EX_BLOCK_EVENTS
290WS_EX_TRANSIENT = _core_.WS_EX_TRANSIENT
291WS_EX_THEMED_BACKGROUND = _core_.WS_EX_THEMED_BACKGROUND
292WS_EX_PROCESS_IDLE = _core_.WS_EX_PROCESS_IDLE
293WS_EX_PROCESS_UI_UPDATES = _core_.WS_EX_PROCESS_UI_UPDATES
294MM_TEXT = _core_.MM_TEXT
295MM_LOMETRIC = _core_.MM_LOMETRIC
296MM_HIMETRIC = _core_.MM_HIMETRIC
297MM_LOENGLISH = _core_.MM_LOENGLISH
298MM_HIENGLISH = _core_.MM_HIENGLISH
299MM_TWIPS = _core_.MM_TWIPS
300MM_ISOTROPIC = _core_.MM_ISOTROPIC
301MM_ANISOTROPIC = _core_.MM_ANISOTROPIC
302MM_POINTS = _core_.MM_POINTS
303MM_METRIC = _core_.MM_METRIC
304CENTRE = _core_.CENTRE
305CENTER = _core_.CENTER
306HORIZONTAL = _core_.HORIZONTAL
307VERTICAL = _core_.VERTICAL
308BOTH = _core_.BOTH
309LEFT = _core_.LEFT
310RIGHT = _core_.RIGHT
311UP = _core_.UP
312DOWN = _core_.DOWN
313TOP = _core_.TOP
314BOTTOM = _core_.BOTTOM
315NORTH = _core_.NORTH
316SOUTH = _core_.SOUTH
317WEST = _core_.WEST
318EAST = _core_.EAST
319ALL = _core_.ALL
320ALIGN_NOT = _core_.ALIGN_NOT
321ALIGN_CENTER_HORIZONTAL = _core_.ALIGN_CENTER_HORIZONTAL
322ALIGN_CENTRE_HORIZONTAL = _core_.ALIGN_CENTRE_HORIZONTAL
323ALIGN_LEFT = _core_.ALIGN_LEFT
324ALIGN_TOP = _core_.ALIGN_TOP
325ALIGN_RIGHT = _core_.ALIGN_RIGHT
326ALIGN_BOTTOM = _core_.ALIGN_BOTTOM
327ALIGN_CENTER_VERTICAL = _core_.ALIGN_CENTER_VERTICAL
328ALIGN_CENTRE_VERTICAL = _core_.ALIGN_CENTRE_VERTICAL
329ALIGN_CENTER = _core_.ALIGN_CENTER
330ALIGN_CENTRE = _core_.ALIGN_CENTRE
331ALIGN_MASK = _core_.ALIGN_MASK
332STRETCH_NOT = _core_.STRETCH_NOT
333SHRINK = _core_.SHRINK
334GROW = _core_.GROW
335EXPAND = _core_.EXPAND
336SHAPED = _core_.SHAPED
337FIXED_MINSIZE = _core_.FIXED_MINSIZE
338TILE = _core_.TILE
339ADJUST_MINSIZE = _core_.ADJUST_MINSIZE
340BORDER_DEFAULT = _core_.BORDER_DEFAULT
341BORDER_NONE = _core_.BORDER_NONE
342BORDER_STATIC = _core_.BORDER_STATIC
343BORDER_SIMPLE = _core_.BORDER_SIMPLE
344BORDER_RAISED = _core_.BORDER_RAISED
345BORDER_SUNKEN = _core_.BORDER_SUNKEN
346BORDER_DOUBLE = _core_.BORDER_DOUBLE
347BORDER_MASK = _core_.BORDER_MASK
0f63ec68
RD
348BG_STYLE_SYSTEM = _core_.BG_STYLE_SYSTEM
349BG_STYLE_COLOUR = _core_.BG_STYLE_COLOUR
350BG_STYLE_CUSTOM = _core_.BG_STYLE_CUSTOM
d55e5bfc
RD
351DEFAULT = _core_.DEFAULT
352DECORATIVE = _core_.DECORATIVE
353ROMAN = _core_.ROMAN
354SCRIPT = _core_.SCRIPT
355SWISS = _core_.SWISS
356MODERN = _core_.MODERN
357TELETYPE = _core_.TELETYPE
358VARIABLE = _core_.VARIABLE
359FIXED = _core_.FIXED
360NORMAL = _core_.NORMAL
361LIGHT = _core_.LIGHT
362BOLD = _core_.BOLD
363ITALIC = _core_.ITALIC
364SLANT = _core_.SLANT
365SOLID = _core_.SOLID
366DOT = _core_.DOT
367LONG_DASH = _core_.LONG_DASH
368SHORT_DASH = _core_.SHORT_DASH
369DOT_DASH = _core_.DOT_DASH
370USER_DASH = _core_.USER_DASH
371TRANSPARENT = _core_.TRANSPARENT
372STIPPLE = _core_.STIPPLE
373BDIAGONAL_HATCH = _core_.BDIAGONAL_HATCH
374CROSSDIAG_HATCH = _core_.CROSSDIAG_HATCH
375FDIAGONAL_HATCH = _core_.FDIAGONAL_HATCH
376CROSS_HATCH = _core_.CROSS_HATCH
377HORIZONTAL_HATCH = _core_.HORIZONTAL_HATCH
378VERTICAL_HATCH = _core_.VERTICAL_HATCH
379JOIN_BEVEL = _core_.JOIN_BEVEL
380JOIN_MITER = _core_.JOIN_MITER
381JOIN_ROUND = _core_.JOIN_ROUND
382CAP_ROUND = _core_.CAP_ROUND
383CAP_PROJECTING = _core_.CAP_PROJECTING
384CAP_BUTT = _core_.CAP_BUTT
385CLEAR = _core_.CLEAR
386XOR = _core_.XOR
387INVERT = _core_.INVERT
388OR_REVERSE = _core_.OR_REVERSE
389AND_REVERSE = _core_.AND_REVERSE
390COPY = _core_.COPY
391AND = _core_.AND
392AND_INVERT = _core_.AND_INVERT
393NO_OP = _core_.NO_OP
394NOR = _core_.NOR
395EQUIV = _core_.EQUIV
396SRC_INVERT = _core_.SRC_INVERT
397OR_INVERT = _core_.OR_INVERT
398NAND = _core_.NAND
399OR = _core_.OR
400SET = _core_.SET
401WXK_BACK = _core_.WXK_BACK
402WXK_TAB = _core_.WXK_TAB
403WXK_RETURN = _core_.WXK_RETURN
404WXK_ESCAPE = _core_.WXK_ESCAPE
405WXK_SPACE = _core_.WXK_SPACE
406WXK_DELETE = _core_.WXK_DELETE
407WXK_START = _core_.WXK_START
408WXK_LBUTTON = _core_.WXK_LBUTTON
409WXK_RBUTTON = _core_.WXK_RBUTTON
410WXK_CANCEL = _core_.WXK_CANCEL
411WXK_MBUTTON = _core_.WXK_MBUTTON
412WXK_CLEAR = _core_.WXK_CLEAR
413WXK_SHIFT = _core_.WXK_SHIFT
414WXK_ALT = _core_.WXK_ALT
415WXK_CONTROL = _core_.WXK_CONTROL
416WXK_MENU = _core_.WXK_MENU
417WXK_PAUSE = _core_.WXK_PAUSE
418WXK_CAPITAL = _core_.WXK_CAPITAL
419WXK_PRIOR = _core_.WXK_PRIOR
420WXK_NEXT = _core_.WXK_NEXT
421WXK_END = _core_.WXK_END
422WXK_HOME = _core_.WXK_HOME
423WXK_LEFT = _core_.WXK_LEFT
424WXK_UP = _core_.WXK_UP
425WXK_RIGHT = _core_.WXK_RIGHT
426WXK_DOWN = _core_.WXK_DOWN
427WXK_SELECT = _core_.WXK_SELECT
428WXK_PRINT = _core_.WXK_PRINT
429WXK_EXECUTE = _core_.WXK_EXECUTE
430WXK_SNAPSHOT = _core_.WXK_SNAPSHOT
431WXK_INSERT = _core_.WXK_INSERT
432WXK_HELP = _core_.WXK_HELP
433WXK_NUMPAD0 = _core_.WXK_NUMPAD0
434WXK_NUMPAD1 = _core_.WXK_NUMPAD1
435WXK_NUMPAD2 = _core_.WXK_NUMPAD2
436WXK_NUMPAD3 = _core_.WXK_NUMPAD3
437WXK_NUMPAD4 = _core_.WXK_NUMPAD4
438WXK_NUMPAD5 = _core_.WXK_NUMPAD5
439WXK_NUMPAD6 = _core_.WXK_NUMPAD6
440WXK_NUMPAD7 = _core_.WXK_NUMPAD7
441WXK_NUMPAD8 = _core_.WXK_NUMPAD8
442WXK_NUMPAD9 = _core_.WXK_NUMPAD9
443WXK_MULTIPLY = _core_.WXK_MULTIPLY
444WXK_ADD = _core_.WXK_ADD
445WXK_SEPARATOR = _core_.WXK_SEPARATOR
446WXK_SUBTRACT = _core_.WXK_SUBTRACT
447WXK_DECIMAL = _core_.WXK_DECIMAL
448WXK_DIVIDE = _core_.WXK_DIVIDE
449WXK_F1 = _core_.WXK_F1
450WXK_F2 = _core_.WXK_F2
451WXK_F3 = _core_.WXK_F3
452WXK_F4 = _core_.WXK_F4
453WXK_F5 = _core_.WXK_F5
454WXK_F6 = _core_.WXK_F6
455WXK_F7 = _core_.WXK_F7
456WXK_F8 = _core_.WXK_F8
457WXK_F9 = _core_.WXK_F9
458WXK_F10 = _core_.WXK_F10
459WXK_F11 = _core_.WXK_F11
460WXK_F12 = _core_.WXK_F12
461WXK_F13 = _core_.WXK_F13
462WXK_F14 = _core_.WXK_F14
463WXK_F15 = _core_.WXK_F15
464WXK_F16 = _core_.WXK_F16
465WXK_F17 = _core_.WXK_F17
466WXK_F18 = _core_.WXK_F18
467WXK_F19 = _core_.WXK_F19
468WXK_F20 = _core_.WXK_F20
469WXK_F21 = _core_.WXK_F21
470WXK_F22 = _core_.WXK_F22
471WXK_F23 = _core_.WXK_F23
472WXK_F24 = _core_.WXK_F24
473WXK_NUMLOCK = _core_.WXK_NUMLOCK
474WXK_SCROLL = _core_.WXK_SCROLL
475WXK_PAGEUP = _core_.WXK_PAGEUP
476WXK_PAGEDOWN = _core_.WXK_PAGEDOWN
477WXK_NUMPAD_SPACE = _core_.WXK_NUMPAD_SPACE
478WXK_NUMPAD_TAB = _core_.WXK_NUMPAD_TAB
479WXK_NUMPAD_ENTER = _core_.WXK_NUMPAD_ENTER
480WXK_NUMPAD_F1 = _core_.WXK_NUMPAD_F1
481WXK_NUMPAD_F2 = _core_.WXK_NUMPAD_F2
482WXK_NUMPAD_F3 = _core_.WXK_NUMPAD_F3
483WXK_NUMPAD_F4 = _core_.WXK_NUMPAD_F4
484WXK_NUMPAD_HOME = _core_.WXK_NUMPAD_HOME
485WXK_NUMPAD_LEFT = _core_.WXK_NUMPAD_LEFT
486WXK_NUMPAD_UP = _core_.WXK_NUMPAD_UP
487WXK_NUMPAD_RIGHT = _core_.WXK_NUMPAD_RIGHT
488WXK_NUMPAD_DOWN = _core_.WXK_NUMPAD_DOWN
489WXK_NUMPAD_PRIOR = _core_.WXK_NUMPAD_PRIOR
490WXK_NUMPAD_PAGEUP = _core_.WXK_NUMPAD_PAGEUP
491WXK_NUMPAD_NEXT = _core_.WXK_NUMPAD_NEXT
492WXK_NUMPAD_PAGEDOWN = _core_.WXK_NUMPAD_PAGEDOWN
493WXK_NUMPAD_END = _core_.WXK_NUMPAD_END
494WXK_NUMPAD_BEGIN = _core_.WXK_NUMPAD_BEGIN
495WXK_NUMPAD_INSERT = _core_.WXK_NUMPAD_INSERT
496WXK_NUMPAD_DELETE = _core_.WXK_NUMPAD_DELETE
497WXK_NUMPAD_EQUAL = _core_.WXK_NUMPAD_EQUAL
498WXK_NUMPAD_MULTIPLY = _core_.WXK_NUMPAD_MULTIPLY
499WXK_NUMPAD_ADD = _core_.WXK_NUMPAD_ADD
500WXK_NUMPAD_SEPARATOR = _core_.WXK_NUMPAD_SEPARATOR
501WXK_NUMPAD_SUBTRACT = _core_.WXK_NUMPAD_SUBTRACT
502WXK_NUMPAD_DECIMAL = _core_.WXK_NUMPAD_DECIMAL
503WXK_NUMPAD_DIVIDE = _core_.WXK_NUMPAD_DIVIDE
504WXK_WINDOWS_LEFT = _core_.WXK_WINDOWS_LEFT
505WXK_WINDOWS_RIGHT = _core_.WXK_WINDOWS_RIGHT
506WXK_WINDOWS_MENU = _core_.WXK_WINDOWS_MENU
507PAPER_NONE = _core_.PAPER_NONE
508PAPER_LETTER = _core_.PAPER_LETTER
509PAPER_LEGAL = _core_.PAPER_LEGAL
510PAPER_A4 = _core_.PAPER_A4
511PAPER_CSHEET = _core_.PAPER_CSHEET
512PAPER_DSHEET = _core_.PAPER_DSHEET
513PAPER_ESHEET = _core_.PAPER_ESHEET
514PAPER_LETTERSMALL = _core_.PAPER_LETTERSMALL
515PAPER_TABLOID = _core_.PAPER_TABLOID
516PAPER_LEDGER = _core_.PAPER_LEDGER
517PAPER_STATEMENT = _core_.PAPER_STATEMENT
518PAPER_EXECUTIVE = _core_.PAPER_EXECUTIVE
519PAPER_A3 = _core_.PAPER_A3
520PAPER_A4SMALL = _core_.PAPER_A4SMALL
521PAPER_A5 = _core_.PAPER_A5
522PAPER_B4 = _core_.PAPER_B4
523PAPER_B5 = _core_.PAPER_B5
524PAPER_FOLIO = _core_.PAPER_FOLIO
525PAPER_QUARTO = _core_.PAPER_QUARTO
526PAPER_10X14 = _core_.PAPER_10X14
527PAPER_11X17 = _core_.PAPER_11X17
528PAPER_NOTE = _core_.PAPER_NOTE
529PAPER_ENV_9 = _core_.PAPER_ENV_9
530PAPER_ENV_10 = _core_.PAPER_ENV_10
531PAPER_ENV_11 = _core_.PAPER_ENV_11
532PAPER_ENV_12 = _core_.PAPER_ENV_12
533PAPER_ENV_14 = _core_.PAPER_ENV_14
534PAPER_ENV_DL = _core_.PAPER_ENV_DL
535PAPER_ENV_C5 = _core_.PAPER_ENV_C5
536PAPER_ENV_C3 = _core_.PAPER_ENV_C3
537PAPER_ENV_C4 = _core_.PAPER_ENV_C4
538PAPER_ENV_C6 = _core_.PAPER_ENV_C6
539PAPER_ENV_C65 = _core_.PAPER_ENV_C65
540PAPER_ENV_B4 = _core_.PAPER_ENV_B4
541PAPER_ENV_B5 = _core_.PAPER_ENV_B5
542PAPER_ENV_B6 = _core_.PAPER_ENV_B6
543PAPER_ENV_ITALY = _core_.PAPER_ENV_ITALY
544PAPER_ENV_MONARCH = _core_.PAPER_ENV_MONARCH
545PAPER_ENV_PERSONAL = _core_.PAPER_ENV_PERSONAL
546PAPER_FANFOLD_US = _core_.PAPER_FANFOLD_US
547PAPER_FANFOLD_STD_GERMAN = _core_.PAPER_FANFOLD_STD_GERMAN
548PAPER_FANFOLD_LGL_GERMAN = _core_.PAPER_FANFOLD_LGL_GERMAN
549PAPER_ISO_B4 = _core_.PAPER_ISO_B4
550PAPER_JAPANESE_POSTCARD = _core_.PAPER_JAPANESE_POSTCARD
551PAPER_9X11 = _core_.PAPER_9X11
552PAPER_10X11 = _core_.PAPER_10X11
553PAPER_15X11 = _core_.PAPER_15X11
554PAPER_ENV_INVITE = _core_.PAPER_ENV_INVITE
555PAPER_LETTER_EXTRA = _core_.PAPER_LETTER_EXTRA
556PAPER_LEGAL_EXTRA = _core_.PAPER_LEGAL_EXTRA
557PAPER_TABLOID_EXTRA = _core_.PAPER_TABLOID_EXTRA
558PAPER_A4_EXTRA = _core_.PAPER_A4_EXTRA
559PAPER_LETTER_TRANSVERSE = _core_.PAPER_LETTER_TRANSVERSE
560PAPER_A4_TRANSVERSE = _core_.PAPER_A4_TRANSVERSE
561PAPER_LETTER_EXTRA_TRANSVERSE = _core_.PAPER_LETTER_EXTRA_TRANSVERSE
562PAPER_A_PLUS = _core_.PAPER_A_PLUS
563PAPER_B_PLUS = _core_.PAPER_B_PLUS
564PAPER_LETTER_PLUS = _core_.PAPER_LETTER_PLUS
565PAPER_A4_PLUS = _core_.PAPER_A4_PLUS
566PAPER_A5_TRANSVERSE = _core_.PAPER_A5_TRANSVERSE
567PAPER_B5_TRANSVERSE = _core_.PAPER_B5_TRANSVERSE
568PAPER_A3_EXTRA = _core_.PAPER_A3_EXTRA
569PAPER_A5_EXTRA = _core_.PAPER_A5_EXTRA
570PAPER_B5_EXTRA = _core_.PAPER_B5_EXTRA
571PAPER_A2 = _core_.PAPER_A2
572PAPER_A3_TRANSVERSE = _core_.PAPER_A3_TRANSVERSE
573PAPER_A3_EXTRA_TRANSVERSE = _core_.PAPER_A3_EXTRA_TRANSVERSE
574DUPLEX_SIMPLEX = _core_.DUPLEX_SIMPLEX
575DUPLEX_HORIZONTAL = _core_.DUPLEX_HORIZONTAL
576DUPLEX_VERTICAL = _core_.DUPLEX_VERTICAL
577ITEM_SEPARATOR = _core_.ITEM_SEPARATOR
578ITEM_NORMAL = _core_.ITEM_NORMAL
579ITEM_CHECK = _core_.ITEM_CHECK
580ITEM_RADIO = _core_.ITEM_RADIO
581ITEM_MAX = _core_.ITEM_MAX
582HT_NOWHERE = _core_.HT_NOWHERE
583HT_SCROLLBAR_FIRST = _core_.HT_SCROLLBAR_FIRST
584HT_SCROLLBAR_ARROW_LINE_1 = _core_.HT_SCROLLBAR_ARROW_LINE_1
585HT_SCROLLBAR_ARROW_LINE_2 = _core_.HT_SCROLLBAR_ARROW_LINE_2
586HT_SCROLLBAR_ARROW_PAGE_1 = _core_.HT_SCROLLBAR_ARROW_PAGE_1
587HT_SCROLLBAR_ARROW_PAGE_2 = _core_.HT_SCROLLBAR_ARROW_PAGE_2
588HT_SCROLLBAR_THUMB = _core_.HT_SCROLLBAR_THUMB
589HT_SCROLLBAR_BAR_1 = _core_.HT_SCROLLBAR_BAR_1
590HT_SCROLLBAR_BAR_2 = _core_.HT_SCROLLBAR_BAR_2
591HT_SCROLLBAR_LAST = _core_.HT_SCROLLBAR_LAST
592HT_WINDOW_OUTSIDE = _core_.HT_WINDOW_OUTSIDE
593HT_WINDOW_INSIDE = _core_.HT_WINDOW_INSIDE
594HT_WINDOW_VERT_SCROLLBAR = _core_.HT_WINDOW_VERT_SCROLLBAR
595HT_WINDOW_HORZ_SCROLLBAR = _core_.HT_WINDOW_HORZ_SCROLLBAR
596HT_WINDOW_CORNER = _core_.HT_WINDOW_CORNER
597HT_MAX = _core_.HT_MAX
598MOD_NONE = _core_.MOD_NONE
599MOD_ALT = _core_.MOD_ALT
600MOD_CONTROL = _core_.MOD_CONTROL
601MOD_SHIFT = _core_.MOD_SHIFT
602MOD_WIN = _core_.MOD_WIN
603UPDATE_UI_NONE = _core_.UPDATE_UI_NONE
604UPDATE_UI_RECURSE = _core_.UPDATE_UI_RECURSE
605UPDATE_UI_FROMIDLE = _core_.UPDATE_UI_FROMIDLE
606#---------------------------------------------------------------------------
607
608class Object(object):
609 """
610 The base class for most wx objects, although in wxPython not
611 much functionality is needed nor exposed.
612 """
613 def __init__(self): raise RuntimeError, "No constructor defined"
614 def __repr__(self):
615 return "<%s.%s; proxy of C++ wxObject instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
616 def GetClassName(*args, **kwargs):
617 """
618 GetClassName(self) -> String
619
620 Returns the class name of the C++ class using wxRTTI.
621 """
622 return _core_.Object_GetClassName(*args, **kwargs)
623
624 def Destroy(*args, **kwargs):
625 """
626 Destroy(self)
627
628 Deletes the C++ object this Python object is a proxy for.
629 """
630 return _core_.Object_Destroy(*args, **kwargs)
631
632
633class ObjectPtr(Object):
634 def __init__(self, this):
635 self.this = this
636 if not hasattr(self,"thisown"): self.thisown = 0
637 self.__class__ = Object
638_core_.Object_swigregister(ObjectPtr)
639_wxPySetDictionary = _core_._wxPySetDictionary
640
641_wxPyFixStockObjects = _core_._wxPyFixStockObjects
642
643cvar = _core_.cvar
644EmptyString = cvar.EmptyString
645
646#---------------------------------------------------------------------------
647
648BITMAP_TYPE_INVALID = _core_.BITMAP_TYPE_INVALID
649BITMAP_TYPE_BMP = _core_.BITMAP_TYPE_BMP
650BITMAP_TYPE_ICO = _core_.BITMAP_TYPE_ICO
651BITMAP_TYPE_CUR = _core_.BITMAP_TYPE_CUR
652BITMAP_TYPE_XBM = _core_.BITMAP_TYPE_XBM
653BITMAP_TYPE_XBM_DATA = _core_.BITMAP_TYPE_XBM_DATA
654BITMAP_TYPE_XPM = _core_.BITMAP_TYPE_XPM
655BITMAP_TYPE_XPM_DATA = _core_.BITMAP_TYPE_XPM_DATA
656BITMAP_TYPE_TIF = _core_.BITMAP_TYPE_TIF
657BITMAP_TYPE_GIF = _core_.BITMAP_TYPE_GIF
658BITMAP_TYPE_PNG = _core_.BITMAP_TYPE_PNG
659BITMAP_TYPE_JPEG = _core_.BITMAP_TYPE_JPEG
660BITMAP_TYPE_PNM = _core_.BITMAP_TYPE_PNM
661BITMAP_TYPE_PCX = _core_.BITMAP_TYPE_PCX
662BITMAP_TYPE_PICT = _core_.BITMAP_TYPE_PICT
663BITMAP_TYPE_ICON = _core_.BITMAP_TYPE_ICON
664BITMAP_TYPE_ANI = _core_.BITMAP_TYPE_ANI
665BITMAP_TYPE_IFF = _core_.BITMAP_TYPE_IFF
666BITMAP_TYPE_MACCURSOR = _core_.BITMAP_TYPE_MACCURSOR
667BITMAP_TYPE_ANY = _core_.BITMAP_TYPE_ANY
668CURSOR_NONE = _core_.CURSOR_NONE
669CURSOR_ARROW = _core_.CURSOR_ARROW
670CURSOR_RIGHT_ARROW = _core_.CURSOR_RIGHT_ARROW
671CURSOR_BULLSEYE = _core_.CURSOR_BULLSEYE
672CURSOR_CHAR = _core_.CURSOR_CHAR
673CURSOR_CROSS = _core_.CURSOR_CROSS
674CURSOR_HAND = _core_.CURSOR_HAND
675CURSOR_IBEAM = _core_.CURSOR_IBEAM
676CURSOR_LEFT_BUTTON = _core_.CURSOR_LEFT_BUTTON
677CURSOR_MAGNIFIER = _core_.CURSOR_MAGNIFIER
678CURSOR_MIDDLE_BUTTON = _core_.CURSOR_MIDDLE_BUTTON
679CURSOR_NO_ENTRY = _core_.CURSOR_NO_ENTRY
680CURSOR_PAINT_BRUSH = _core_.CURSOR_PAINT_BRUSH
681CURSOR_PENCIL = _core_.CURSOR_PENCIL
682CURSOR_POINT_LEFT = _core_.CURSOR_POINT_LEFT
683CURSOR_POINT_RIGHT = _core_.CURSOR_POINT_RIGHT
684CURSOR_QUESTION_ARROW = _core_.CURSOR_QUESTION_ARROW
685CURSOR_RIGHT_BUTTON = _core_.CURSOR_RIGHT_BUTTON
686CURSOR_SIZENESW = _core_.CURSOR_SIZENESW
687CURSOR_SIZENS = _core_.CURSOR_SIZENS
688CURSOR_SIZENWSE = _core_.CURSOR_SIZENWSE
689CURSOR_SIZEWE = _core_.CURSOR_SIZEWE
690CURSOR_SIZING = _core_.CURSOR_SIZING
691CURSOR_SPRAYCAN = _core_.CURSOR_SPRAYCAN
692CURSOR_WAIT = _core_.CURSOR_WAIT
693CURSOR_WATCH = _core_.CURSOR_WATCH
694CURSOR_BLANK = _core_.CURSOR_BLANK
695CURSOR_DEFAULT = _core_.CURSOR_DEFAULT
696CURSOR_COPY_ARROW = _core_.CURSOR_COPY_ARROW
697CURSOR_ARROWWAIT = _core_.CURSOR_ARROWWAIT
698CURSOR_MAX = _core_.CURSOR_MAX
699#---------------------------------------------------------------------------
700
701class Size(object):
702 """
79fccf9d 703 wx.Size is a useful data structure used to represent the size of
093d3ff1
RD
704 something. It simply contians integer width and height
705 proprtites. In most places in wxPython where a wx.Size is
706 expected a (width, height) tuple can be used instead.
d55e5bfc
RD
707 """
708 def __repr__(self):
709 return "<%s.%s; proxy of C++ wxSize instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
710 width = property(_core_.Size_width_get, _core_.Size_width_set)
711 height = property(_core_.Size_height_get, _core_.Size_height_set)
712 x = width; y = height
713 def __init__(self, *args, **kwargs):
714 """
715 __init__(self, int w=0, int h=0) -> Size
716
717 Creates a size object.
718 """
719 newobj = _core_.new_Size(*args, **kwargs)
720 self.this = newobj.this
721 self.thisown = 1
722 del newobj.thisown
723 def __del__(self, destroy=_core_.delete_Size):
724 """__del__(self)"""
725 try:
726 if self.thisown: destroy(self)
727 except: pass
728
729 def __eq__(*args, **kwargs):
730 """
731 __eq__(self, Size sz) -> bool
732
733 Test for equality of wx.Size objects.
734 """
735 return _core_.Size___eq__(*args, **kwargs)
736
737 def __ne__(*args, **kwargs):
738 """
739 __ne__(self, Size sz) -> bool
740
741 Test for inequality.
742 """
743 return _core_.Size___ne__(*args, **kwargs)
744
745 def __add__(*args, **kwargs):
746 """
747 __add__(self, Size sz) -> Size
748
749 Add sz's proprties to this and return the result.
750 """
751 return _core_.Size___add__(*args, **kwargs)
752
753 def __sub__(*args, **kwargs):
754 """
755 __sub__(self, Size sz) -> Size
756
757 Subtract sz's properties from this and return the result.
758 """
759 return _core_.Size___sub__(*args, **kwargs)
760
761 def IncTo(*args, **kwargs):
762 """
763 IncTo(self, Size sz)
764
765 Increments this object so that both of its dimensions are not less
766 than the corresponding dimensions of the size.
767 """
768 return _core_.Size_IncTo(*args, **kwargs)
769
770 def DecTo(*args, **kwargs):
771 """
772 DecTo(self, Size sz)
773
774 Decrements this object so that both of its dimensions are not greater
775 than the corresponding dimensions of the size.
776 """
777 return _core_.Size_DecTo(*args, **kwargs)
778
779 def Set(*args, **kwargs):
780 """
781 Set(self, int w, int h)
782
783 Set both width and height.
784 """
785 return _core_.Size_Set(*args, **kwargs)
786
787 def SetWidth(*args, **kwargs):
788 """SetWidth(self, int w)"""
789 return _core_.Size_SetWidth(*args, **kwargs)
790
791 def SetHeight(*args, **kwargs):
792 """SetHeight(self, int h)"""
793 return _core_.Size_SetHeight(*args, **kwargs)
794
795 def GetWidth(*args, **kwargs):
796 """GetWidth(self) -> int"""
797 return _core_.Size_GetWidth(*args, **kwargs)
798
799 def GetHeight(*args, **kwargs):
800 """GetHeight(self) -> int"""
801 return _core_.Size_GetHeight(*args, **kwargs)
802
803 def IsFullySpecified(*args, **kwargs):
804 """
805 IsFullySpecified(self) -> bool
806
807 Returns True if both components of the size are non-default values.
808 """
809 return _core_.Size_IsFullySpecified(*args, **kwargs)
810
811 def SetDefaults(*args, **kwargs):
812 """
813 SetDefaults(self, Size size)
814
79fccf9d
RD
815 Combine this size with the other one replacing the default components
816 of this object (i.e. equal to -1) with those of the other.
d55e5bfc
RD
817 """
818 return _core_.Size_SetDefaults(*args, **kwargs)
819
820 def Get(*args, **kwargs):
821 """
822 Get() -> (width,height)
823
824 Returns the width and height properties as a tuple.
825 """
826 return _core_.Size_Get(*args, **kwargs)
827
79fccf9d 828 asTuple = wx._deprecated(Get, "asTuple is deprecated, use `Get` instead")
d55e5bfc
RD
829 def __str__(self): return str(self.Get())
830 def __repr__(self): return 'wx.Size'+str(self.Get())
831 def __len__(self): return len(self.Get())
832 def __getitem__(self, index): return self.Get()[index]
833 def __setitem__(self, index, val):
834 if index == 0: self.width = val
835 elif index == 1: self.height = val
836 else: raise IndexError
837 def __nonzero__(self): return self.Get() != (0,0)
838 __safe_for_unpickling__ = True
839 def __reduce__(self): return (wx.Size, self.Get())
840
841
842class SizePtr(Size):
843 def __init__(self, this):
844 self.this = this
845 if not hasattr(self,"thisown"): self.thisown = 0
846 self.__class__ = Size
847_core_.Size_swigregister(SizePtr)
848
849#---------------------------------------------------------------------------
850
851class RealPoint(object):
852 """
79fccf9d
RD
853 A data structure for representing a point or position with floating
854 point x and y properties. In wxPython most places that expect a
855 wx.RealPoint can also accept a (x,y) tuple.
d55e5bfc
RD
856 """
857 def __repr__(self):
858 return "<%s.%s; proxy of C++ wxRealPoint instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
859 x = property(_core_.RealPoint_x_get, _core_.RealPoint_x_set)
860 y = property(_core_.RealPoint_y_get, _core_.RealPoint_y_set)
861 def __init__(self, *args, **kwargs):
862 """
863 __init__(self, double x=0.0, double y=0.0) -> RealPoint
864
865 Create a wx.RealPoint object
866 """
867 newobj = _core_.new_RealPoint(*args, **kwargs)
868 self.this = newobj.this
869 self.thisown = 1
870 del newobj.thisown
871 def __del__(self, destroy=_core_.delete_RealPoint):
872 """__del__(self)"""
873 try:
874 if self.thisown: destroy(self)
875 except: pass
876
877 def __eq__(*args, **kwargs):
878 """
879 __eq__(self, RealPoint pt) -> bool
880
881 Test for equality of wx.RealPoint objects.
882 """
883 return _core_.RealPoint___eq__(*args, **kwargs)
884
885 def __ne__(*args, **kwargs):
886 """
887 __ne__(self, RealPoint pt) -> bool
888
889 Test for inequality of wx.RealPoint objects.
890 """
891 return _core_.RealPoint___ne__(*args, **kwargs)
892
893 def __add__(*args, **kwargs):
894 """
895 __add__(self, RealPoint pt) -> RealPoint
896
897 Add pt's proprties to this and return the result.
898 """
899 return _core_.RealPoint___add__(*args, **kwargs)
900
901 def __sub__(*args, **kwargs):
902 """
903 __sub__(self, RealPoint pt) -> RealPoint
904
905 Subtract pt's proprties from this and return the result
906 """
907 return _core_.RealPoint___sub__(*args, **kwargs)
908
909 def Set(*args, **kwargs):
910 """
911 Set(self, double x, double y)
912
913 Set both the x and y properties
914 """
915 return _core_.RealPoint_Set(*args, **kwargs)
916
917 def Get(*args, **kwargs):
918 """
919 Get() -> (x,y)
920
921 Return the x and y properties as a tuple.
922 """
923 return _core_.RealPoint_Get(*args, **kwargs)
924
79fccf9d 925 asTuple = wx._deprecated(Get, "asTuple is deprecated, use `Get` instead")
d55e5bfc
RD
926 def __str__(self): return str(self.Get())
927 def __repr__(self): return 'wx.RealPoint'+str(self.Get())
928 def __len__(self): return len(self.Get())
929 def __getitem__(self, index): return self.Get()[index]
930 def __setitem__(self, index, val):
931 if index == 0: self.x = val
932 elif index == 1: self.y = val
933 else: raise IndexError
934 def __nonzero__(self): return self.Get() != (0.0, 0.0)
935 __safe_for_unpickling__ = True
936 def __reduce__(self): return (wx.RealPoint, self.Get())
937
938
939class RealPointPtr(RealPoint):
940 def __init__(self, this):
941 self.this = this
942 if not hasattr(self,"thisown"): self.thisown = 0
943 self.__class__ = RealPoint
944_core_.RealPoint_swigregister(RealPointPtr)
945
946#---------------------------------------------------------------------------
947
948class Point(object):
949 """
79fccf9d
RD
950 A data structure for representing a point or position with integer x
951 and y properties. Most places in wxPython that expect a wx.Point can
952 also accept a (x,y) tuple.
d55e5bfc
RD
953 """
954 def __repr__(self):
955 return "<%s.%s; proxy of C++ wxPoint instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
956 x = property(_core_.Point_x_get, _core_.Point_x_set)
957 y = property(_core_.Point_y_get, _core_.Point_y_set)
958 def __init__(self, *args, **kwargs):
959 """
960 __init__(self, int x=0, int y=0) -> Point
961
962 Create a wx.Point object
963 """
964 newobj = _core_.new_Point(*args, **kwargs)
965 self.this = newobj.this
966 self.thisown = 1
967 del newobj.thisown
968 def __del__(self, destroy=_core_.delete_Point):
969 """__del__(self)"""
970 try:
971 if self.thisown: destroy(self)
972 except: pass
973
974 def __eq__(*args, **kwargs):
975 """
976 __eq__(self, Point pt) -> bool
977
978 Test for equality of wx.Point objects.
979 """
980 return _core_.Point___eq__(*args, **kwargs)
981
982 def __ne__(*args, **kwargs):
983 """
984 __ne__(self, Point pt) -> bool
985
986 Test for inequality of wx.Point objects.
987 """
988 return _core_.Point___ne__(*args, **kwargs)
989
990 def __add__(*args, **kwargs):
991 """
992 __add__(self, Point pt) -> Point
993
994 Add pt's proprties to this and return the result.
995 """
996 return _core_.Point___add__(*args, **kwargs)
997
998 def __sub__(*args, **kwargs):
999 """
1000 __sub__(self, Point pt) -> Point
1001
1002 Subtract pt's proprties from this and return the result
1003 """
1004 return _core_.Point___sub__(*args, **kwargs)
1005
1006 def __iadd__(*args, **kwargs):
1007 """
1008 __iadd__(self, Point pt) -> Point
1009
1010 Add pt to this object.
1011 """
1012 return _core_.Point___iadd__(*args, **kwargs)
1013
1014 def __isub__(*args, **kwargs):
1015 """
1016 __isub__(self, Point pt) -> Point
1017
1018 Subtract pt from this object.
1019 """
1020 return _core_.Point___isub__(*args, **kwargs)
1021
1022 def Set(*args, **kwargs):
1023 """
1024 Set(self, long x, long y)
1025
1026 Set both the x and y properties
1027 """
1028 return _core_.Point_Set(*args, **kwargs)
1029
1030 def Get(*args, **kwargs):
1031 """
1032 Get() -> (x,y)
1033
1034 Return the x and y properties as a tuple.
1035 """
1036 return _core_.Point_Get(*args, **kwargs)
1037
79fccf9d 1038 asTuple = wx._deprecated(Get, "asTuple is deprecated, use `Get` instead")
d55e5bfc
RD
1039 def __str__(self): return str(self.Get())
1040 def __repr__(self): return 'wx.Point'+str(self.Get())
1041 def __len__(self): return len(self.Get())
1042 def __getitem__(self, index): return self.Get()[index]
1043 def __setitem__(self, index, val):
1044 if index == 0: self.x = val
1045 elif index == 1: self.y = val
1046 else: raise IndexError
1047 def __nonzero__(self): return self.Get() != (0,0)
1048 __safe_for_unpickling__ = True
1049 def __reduce__(self): return (wx.Point, self.Get())
1050
1051
1052class PointPtr(Point):
1053 def __init__(self, this):
1054 self.this = this
1055 if not hasattr(self,"thisown"): self.thisown = 0
1056 self.__class__ = Point
1057_core_.Point_swigregister(PointPtr)
1058
1059#---------------------------------------------------------------------------
1060
1061class Rect(object):
1062 """
79fccf9d
RD
1063 A class for representing and manipulating rectangles. It has x, y,
1064 width and height properties. In wxPython most palces that expect a
1065 wx.Rect can also accept a (x,y,width,height) tuple.
d55e5bfc
RD
1066 """
1067 def __repr__(self):
1068 return "<%s.%s; proxy of C++ wxRect instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
1069 def __init__(self, *args, **kwargs):
1070 """
1071 __init__(self, int x=0, int y=0, int width=0, int height=0) -> Rect
1072
1073 Create a new Rect object.
1074 """
1075 newobj = _core_.new_Rect(*args, **kwargs)
1076 self.this = newobj.this
1077 self.thisown = 1
1078 del newobj.thisown
1079 def __del__(self, destroy=_core_.delete_Rect):
1080 """__del__(self)"""
1081 try:
1082 if self.thisown: destroy(self)
1083 except: pass
1084
1085 def GetX(*args, **kwargs):
1086 """GetX(self) -> int"""
1087 return _core_.Rect_GetX(*args, **kwargs)
1088
1089 def SetX(*args, **kwargs):
1090 """SetX(self, int x)"""
1091 return _core_.Rect_SetX(*args, **kwargs)
1092
1093 def GetY(*args, **kwargs):
1094 """GetY(self) -> int"""
1095 return _core_.Rect_GetY(*args, **kwargs)
1096
1097 def SetY(*args, **kwargs):
1098 """SetY(self, int y)"""
1099 return _core_.Rect_SetY(*args, **kwargs)
1100
1101 def GetWidth(*args, **kwargs):
1102 """GetWidth(self) -> int"""
1103 return _core_.Rect_GetWidth(*args, **kwargs)
1104
1105 def SetWidth(*args, **kwargs):
1106 """SetWidth(self, int w)"""
1107 return _core_.Rect_SetWidth(*args, **kwargs)
1108
1109 def GetHeight(*args, **kwargs):
1110 """GetHeight(self) -> int"""
1111 return _core_.Rect_GetHeight(*args, **kwargs)
1112
1113 def SetHeight(*args, **kwargs):
1114 """SetHeight(self, int h)"""
1115 return _core_.Rect_SetHeight(*args, **kwargs)
1116
1117 def GetPosition(*args, **kwargs):
1118 """GetPosition(self) -> Point"""
1119 return _core_.Rect_GetPosition(*args, **kwargs)
1120
1121 def SetPosition(*args, **kwargs):
1122 """SetPosition(self, Point p)"""
1123 return _core_.Rect_SetPosition(*args, **kwargs)
1124
1125 def GetSize(*args, **kwargs):
1126 """GetSize(self) -> Size"""
1127 return _core_.Rect_GetSize(*args, **kwargs)
1128
1129 def SetSize(*args, **kwargs):
1130 """SetSize(self, Size s)"""
1131 return _core_.Rect_SetSize(*args, **kwargs)
1132
aff4cc5c
RD
1133 def IsEmpty(*args, **kwargs):
1134 """IsEmpty(self) -> bool"""
1135 return _core_.Rect_IsEmpty(*args, **kwargs)
1136
d55e5bfc
RD
1137 def GetTopLeft(*args, **kwargs):
1138 """GetTopLeft(self) -> Point"""
1139 return _core_.Rect_GetTopLeft(*args, **kwargs)
1140
1141 def SetTopLeft(*args, **kwargs):
1142 """SetTopLeft(self, Point p)"""
1143 return _core_.Rect_SetTopLeft(*args, **kwargs)
1144
1145 def GetBottomRight(*args, **kwargs):
1146 """GetBottomRight(self) -> Point"""
1147 return _core_.Rect_GetBottomRight(*args, **kwargs)
1148
1149 def SetBottomRight(*args, **kwargs):
1150 """SetBottomRight(self, Point p)"""
1151 return _core_.Rect_SetBottomRight(*args, **kwargs)
1152
1153 def GetLeft(*args, **kwargs):
1154 """GetLeft(self) -> int"""
1155 return _core_.Rect_GetLeft(*args, **kwargs)
1156
1157 def GetTop(*args, **kwargs):
1158 """GetTop(self) -> int"""
1159 return _core_.Rect_GetTop(*args, **kwargs)
1160
1161 def GetBottom(*args, **kwargs):
1162 """GetBottom(self) -> int"""
1163 return _core_.Rect_GetBottom(*args, **kwargs)
1164
1165 def GetRight(*args, **kwargs):
1166 """GetRight(self) -> int"""
1167 return _core_.Rect_GetRight(*args, **kwargs)
1168
1169 def SetLeft(*args, **kwargs):
1170 """SetLeft(self, int left)"""
1171 return _core_.Rect_SetLeft(*args, **kwargs)
1172
1173 def SetRight(*args, **kwargs):
1174 """SetRight(self, int right)"""
1175 return _core_.Rect_SetRight(*args, **kwargs)
1176
1177 def SetTop(*args, **kwargs):
1178 """SetTop(self, int top)"""
1179 return _core_.Rect_SetTop(*args, **kwargs)
1180
1181 def SetBottom(*args, **kwargs):
1182 """SetBottom(self, int bottom)"""
1183 return _core_.Rect_SetBottom(*args, **kwargs)
1184
1185 position = property(GetPosition, SetPosition)
1186 size = property(GetSize, SetSize)
1187 left = property(GetLeft, SetLeft)
1188 right = property(GetRight, SetRight)
1189 top = property(GetTop, SetTop)
1190 bottom = property(GetBottom, SetBottom)
1191
1192 def Inflate(*args, **kwargs):
1193 """
1194 Inflate(self, int dx, int dy) -> Rect
1195
091fdbfa
RD
1196 Increases the size of the rectangle.
1197
1198 The left border is moved farther left and the right border is moved
1199 farther right by ``dx``. The upper border is moved farther up and the
1200 bottom border is moved farther down by ``dy``. (Note the the width and
1201 height of the rectangle thus change by ``2*dx`` and ``2*dy``,
1202 respectively.) If one or both of ``dx`` and ``dy`` are negative, the
1203 opposite happens: the rectangle size decreases in the respective
1204 direction.
1205
1206 The change is made to the rectangle inplace, if instead you need a
1207 copy that is inflated, preserving the original then make the copy
1208 first::
1209
1210 copy = wx.Rect(*original)
1211 copy.Inflate(10,15)
1212
1213
d55e5bfc
RD
1214 """
1215 return _core_.Rect_Inflate(*args, **kwargs)
1216
1217 def Deflate(*args, **kwargs):
1218 """
1219 Deflate(self, int dx, int dy) -> Rect
1220
091fdbfa
RD
1221 Decrease the rectangle size. This method is the opposite of `Inflate`
1222 in that Deflate(a,b) is equivalent to Inflate(-a,-b). Please refer to
1223 `Inflate` for a full description.
d55e5bfc
RD
1224 """
1225 return _core_.Rect_Deflate(*args, **kwargs)
1226
1227 def OffsetXY(*args, **kwargs):
1228 """
1229 OffsetXY(self, int dx, int dy)
1230
79fccf9d
RD
1231 Moves the rectangle by the specified offset. If dx is positive, the
1232 rectangle is moved to the right, if dy is positive, it is moved to the
1233 bottom, otherwise it is moved to the left or top respectively.
d55e5bfc
RD
1234 """
1235 return _core_.Rect_OffsetXY(*args, **kwargs)
1236
1237 def Offset(*args, **kwargs):
1238 """
1239 Offset(self, Point pt)
1240
1241 Same as OffsetXY but uses dx,dy from Point
1242 """
1243 return _core_.Rect_Offset(*args, **kwargs)
1244
1245 def Intersect(*args, **kwargs):
1246 """
1247 Intersect(self, Rect rect) -> Rect
1248
b519803b 1249 Returns the intersectsion of this rectangle and rect.
d55e5bfc
RD
1250 """
1251 return _core_.Rect_Intersect(*args, **kwargs)
1252
b519803b
RD
1253 def Union(*args, **kwargs):
1254 """
1255 Union(self, Rect rect) -> Rect
1256
1257 Returns the union of this rectangle and rect.
1258 """
1259 return _core_.Rect_Union(*args, **kwargs)
1260
d55e5bfc
RD
1261 def __add__(*args, **kwargs):
1262 """
1263 __add__(self, Rect rect) -> Rect
1264
1265 Add the properties of rect to this rectangle and return the result.
1266 """
1267 return _core_.Rect___add__(*args, **kwargs)
1268
1269 def __iadd__(*args, **kwargs):
1270 """
1271 __iadd__(self, Rect rect) -> Rect
1272
1273 Add the properties of rect to this rectangle, updating this rectangle.
1274 """
1275 return _core_.Rect___iadd__(*args, **kwargs)
1276
1277 def __eq__(*args, **kwargs):
1278 """
1279 __eq__(self, Rect rect) -> bool
1280
1281 Test for equality.
1282 """
1283 return _core_.Rect___eq__(*args, **kwargs)
1284
1285 def __ne__(*args, **kwargs):
1286 """
1287 __ne__(self, Rect rect) -> bool
1288
1289 Test for inequality.
1290 """
1291 return _core_.Rect___ne__(*args, **kwargs)
1292
1293 def InsideXY(*args, **kwargs):
1294 """
1295 InsideXY(self, int x, int y) -> bool
1296
1297 Return True if the point is (not strcitly) inside the rect.
1298 """
1299 return _core_.Rect_InsideXY(*args, **kwargs)
1300
1301 def Inside(*args, **kwargs):
1302 """
1303 Inside(self, Point pt) -> bool
1304
1305 Return True if the point is (not strcitly) inside the rect.
1306 """
1307 return _core_.Rect_Inside(*args, **kwargs)
1308
1309 def Intersects(*args, **kwargs):
1310 """
1311 Intersects(self, Rect rect) -> bool
1312
1313 Returns True if the rectangles have a non empty intersection.
1314 """
1315 return _core_.Rect_Intersects(*args, **kwargs)
1316
1317 x = property(_core_.Rect_x_get, _core_.Rect_x_set)
1318 y = property(_core_.Rect_y_get, _core_.Rect_y_set)
1319 width = property(_core_.Rect_width_get, _core_.Rect_width_set)
1320 height = property(_core_.Rect_height_get, _core_.Rect_height_set)
1321 def Set(*args, **kwargs):
1322 """
1323 Set(self, int x=0, int y=0, int width=0, int height=0)
1324
1325 Set all rectangle properties.
1326 """
1327 return _core_.Rect_Set(*args, **kwargs)
1328
1329 def Get(*args, **kwargs):
1330 """
1331 Get() -> (x,y,width,height)
1332
1333 Return the rectangle properties as a tuple.
1334 """
1335 return _core_.Rect_Get(*args, **kwargs)
1336
79fccf9d 1337 asTuple = wx._deprecated(Get, "asTuple is deprecated, use `Get` instead")
d55e5bfc
RD
1338 def __str__(self): return str(self.Get())
1339 def __repr__(self): return 'wx.Rect'+str(self.Get())
1340 def __len__(self): return len(self.Get())
1341 def __getitem__(self, index): return self.Get()[index]
1342 def __setitem__(self, index, val):
1343 if index == 0: self.x = val
1344 elif index == 1: self.y = val
1345 elif index == 2: self.width = val
1346 elif index == 3: self.height = val
1347 else: raise IndexError
1348 def __nonzero__(self): return self.Get() != (0,0,0,0)
1349 __safe_for_unpickling__ = True
1350 def __reduce__(self): return (wx.Rect, self.Get())
1351
1352
1353class RectPtr(Rect):
1354 def __init__(self, this):
1355 self.this = this
1356 if not hasattr(self,"thisown"): self.thisown = 0
1357 self.__class__ = Rect
1358_core_.Rect_swigregister(RectPtr)
1359
1360def RectPP(*args, **kwargs):
1361 """
1362 RectPP(Point topLeft, Point bottomRight) -> Rect
1363
1364 Create a new Rect object from Points representing two corners.
1365 """
1366 val = _core_.new_RectPP(*args, **kwargs)
1367 val.thisown = 1
1368 return val
1369
1370def RectPS(*args, **kwargs):
1371 """
1372 RectPS(Point pos, Size size) -> Rect
1373
1374 Create a new Rect from a position and size.
1375 """
1376 val = _core_.new_RectPS(*args, **kwargs)
1377 val.thisown = 1
1378 return val
1379
c1cb24a4
RD
1380def RectS(*args, **kwargs):
1381 """
1382 RectS(Size size) -> Rect
1383
1384 Create a new Rect from a size only.
1385 """
1386 val = _core_.new_RectS(*args, **kwargs)
1387 val.thisown = 1
1388 return val
1389
d55e5bfc
RD
1390
1391def IntersectRect(*args, **kwargs):
1392 """
1393 IntersectRect(Rect r1, Rect r2) -> Rect
1394
1395 Calculate and return the intersection of r1 and r2.
1396 """
1397 return _core_.IntersectRect(*args, **kwargs)
1398#---------------------------------------------------------------------------
1399
1400class Point2D(object):
79fccf9d
RD
1401 """
1402 wx.Point2Ds represent a point or a vector in a 2d coordinate system
1403 with floating point values.
1404 """
d55e5bfc
RD
1405 def __repr__(self):
1406 return "<%s.%s; proxy of C++ wxPoint2D instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
1407 def __init__(self, *args, **kwargs):
1408 """
1409 __init__(self, double x=0.0, double y=0.0) -> Point2D
1410
1411 Create a w.Point2D object.
1412 """
1413 newobj = _core_.new_Point2D(*args, **kwargs)
1414 self.this = newobj.this
1415 self.thisown = 1
1416 del newobj.thisown
1417 def GetFloor(*args, **kwargs):
a8eff060
RD
1418 """
1419 GetFloor() -> (x,y)
1420
1421 Convert to integer
1422 """
d55e5bfc
RD
1423 return _core_.Point2D_GetFloor(*args, **kwargs)
1424
1425 def GetRounded(*args, **kwargs):
a8eff060
RD
1426 """
1427 GetRounded() -> (x,y)
1428
1429 Convert to integer
1430 """
d55e5bfc
RD
1431 return _core_.Point2D_GetRounded(*args, **kwargs)
1432
1433 def GetVectorLength(*args, **kwargs):
1434 """GetVectorLength(self) -> double"""
1435 return _core_.Point2D_GetVectorLength(*args, **kwargs)
1436
1437 def GetVectorAngle(*args, **kwargs):
1438 """GetVectorAngle(self) -> double"""
1439 return _core_.Point2D_GetVectorAngle(*args, **kwargs)
1440
1441 def SetVectorLength(*args, **kwargs):
1442 """SetVectorLength(self, double length)"""
1443 return _core_.Point2D_SetVectorLength(*args, **kwargs)
1444
1445 def SetVectorAngle(*args, **kwargs):
1446 """SetVectorAngle(self, double degrees)"""
1447 return _core_.Point2D_SetVectorAngle(*args, **kwargs)
1448
1449 def SetPolarCoordinates(self, angle, length):
1450 self.SetVectorLength(length)
1451 self.SetVectorAngle(angle)
1452 def Normalize(self):
1453 self.SetVectorLength(1.0)
1454
1455 def GetDistance(*args, **kwargs):
1456 """GetDistance(self, Point2D pt) -> double"""
1457 return _core_.Point2D_GetDistance(*args, **kwargs)
1458
1459 def GetDistanceSquare(*args, **kwargs):
1460 """GetDistanceSquare(self, Point2D pt) -> double"""
1461 return _core_.Point2D_GetDistanceSquare(*args, **kwargs)
1462
1463 def GetDotProduct(*args, **kwargs):
1464 """GetDotProduct(self, Point2D vec) -> double"""
1465 return _core_.Point2D_GetDotProduct(*args, **kwargs)
1466
1467 def GetCrossProduct(*args, **kwargs):
1468 """GetCrossProduct(self, Point2D vec) -> double"""
1469 return _core_.Point2D_GetCrossProduct(*args, **kwargs)
1470
1471 def __neg__(*args, **kwargs):
1472 """
1473 __neg__(self) -> Point2D
1474
1475 the reflection of this point
1476 """
1477 return _core_.Point2D___neg__(*args, **kwargs)
1478
1479 def __iadd__(*args, **kwargs):
1480 """__iadd__(self, Point2D pt) -> Point2D"""
1481 return _core_.Point2D___iadd__(*args, **kwargs)
1482
1483 def __isub__(*args, **kwargs):
1484 """__isub__(self, Point2D pt) -> Point2D"""
1485 return _core_.Point2D___isub__(*args, **kwargs)
1486
1487 def __imul__(*args, **kwargs):
1488 """__imul__(self, Point2D pt) -> Point2D"""
1489 return _core_.Point2D___imul__(*args, **kwargs)
1490
1491 def __idiv__(*args, **kwargs):
1492 """__idiv__(self, Point2D pt) -> Point2D"""
1493 return _core_.Point2D___idiv__(*args, **kwargs)
1494
1495 def __eq__(*args, **kwargs):
1496 """
1497 __eq__(self, Point2D pt) -> bool
1498
1499 Test for equality
1500 """
1501 return _core_.Point2D___eq__(*args, **kwargs)
1502
1503 def __ne__(*args, **kwargs):
1504 """
1505 __ne__(self, Point2D pt) -> bool
1506
1507 Test for inequality
1508 """
1509 return _core_.Point2D___ne__(*args, **kwargs)
1510
1511 x = property(_core_.Point2D_x_get, _core_.Point2D_x_set)
1512 y = property(_core_.Point2D_y_get, _core_.Point2D_y_set)
1513 def Set(*args, **kwargs):
1514 """Set(self, double x=0, double y=0)"""
1515 return _core_.Point2D_Set(*args, **kwargs)
1516
1517 def Get(*args, **kwargs):
1518 """
1519 Get() -> (x,y)
1520
1521 Return x and y properties as a tuple.
1522 """
1523 return _core_.Point2D_Get(*args, **kwargs)
1524
79fccf9d 1525 asTuple = wx._deprecated(Get, "asTuple is deprecated, use `Get` instead")
d55e5bfc
RD
1526 def __str__(self): return str(self.Get())
1527 def __repr__(self): return 'wx.Point2D'+str(self.Get())
1528 def __len__(self): return len(self.Get())
1529 def __getitem__(self, index): return self.Get()[index]
1530 def __setitem__(self, index, val):
1531 if index == 0: self.x = val
1532 elif index == 1: self.y = val
1533 else: raise IndexError
1534 def __nonzero__(self): return self.Get() != (0.0, 0.0)
1535 __safe_for_unpickling__ = True
1536 def __reduce__(self): return (wx.Point2D, self.Get())
1537
1538
1539class Point2DPtr(Point2D):
1540 def __init__(self, this):
1541 self.this = this
1542 if not hasattr(self,"thisown"): self.thisown = 0
1543 self.__class__ = Point2D
1544_core_.Point2D_swigregister(Point2DPtr)
1545
1546def Point2DCopy(*args, **kwargs):
1547 """
1548 Point2DCopy(Point2D pt) -> Point2D
1549
1550 Create a w.Point2D object.
1551 """
1552 val = _core_.new_Point2DCopy(*args, **kwargs)
1553 val.thisown = 1
1554 return val
1555
1556def Point2DFromPoint(*args, **kwargs):
1557 """
1558 Point2DFromPoint(Point pt) -> Point2D
1559
1560 Create a w.Point2D object.
1561 """
1562 val = _core_.new_Point2DFromPoint(*args, **kwargs)
1563 val.thisown = 1
1564 return val
1565
1566#---------------------------------------------------------------------------
1567
1568FromStart = _core_.FromStart
1569FromCurrent = _core_.FromCurrent
1570FromEnd = _core_.FromEnd
1571class InputStream(object):
093d3ff1 1572 """Proxy of C++ InputStream class"""
d55e5bfc
RD
1573 def __repr__(self):
1574 return "<%s.%s; proxy of C++ wxPyInputStream instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
1575 def __init__(self, *args, **kwargs):
1576 """__init__(self, PyObject p) -> InputStream"""
1577 newobj = _core_.new_InputStream(*args, **kwargs)
1578 self.this = newobj.this
1579 self.thisown = 1
1580 del newobj.thisown
8fb0e70a
RD
1581 def __del__(self, destroy=_core_.delete_InputStream):
1582 """__del__(self)"""
1583 try:
1584 if self.thisown: destroy(self)
1585 except: pass
1586
d55e5bfc
RD
1587 def close(*args, **kwargs):
1588 """close(self)"""
1589 return _core_.InputStream_close(*args, **kwargs)
1590
1591 def flush(*args, **kwargs):
1592 """flush(self)"""
1593 return _core_.InputStream_flush(*args, **kwargs)
1594
1595 def eof(*args, **kwargs):
1596 """eof(self) -> bool"""
1597 return _core_.InputStream_eof(*args, **kwargs)
1598
1599 def read(*args, **kwargs):
1600 """read(self, int size=-1) -> PyObject"""
1601 return _core_.InputStream_read(*args, **kwargs)
1602
1603 def readline(*args, **kwargs):
1604 """readline(self, int size=-1) -> PyObject"""
1605 return _core_.InputStream_readline(*args, **kwargs)
1606
1607 def readlines(*args, **kwargs):
1608 """readlines(self, int sizehint=-1) -> PyObject"""
1609 return _core_.InputStream_readlines(*args, **kwargs)
1610
1611 def seek(*args, **kwargs):
1612 """seek(self, int offset, int whence=0)"""
1613 return _core_.InputStream_seek(*args, **kwargs)
1614
1615 def tell(*args, **kwargs):
1616 """tell(self) -> int"""
1617 return _core_.InputStream_tell(*args, **kwargs)
1618
1619 def Peek(*args, **kwargs):
1620 """Peek(self) -> char"""
1621 return _core_.InputStream_Peek(*args, **kwargs)
1622
1623 def GetC(*args, **kwargs):
1624 """GetC(self) -> char"""
1625 return _core_.InputStream_GetC(*args, **kwargs)
1626
1627 def LastRead(*args, **kwargs):
1628 """LastRead(self) -> size_t"""
1629 return _core_.InputStream_LastRead(*args, **kwargs)
1630
1631 def CanRead(*args, **kwargs):
1632 """CanRead(self) -> bool"""
1633 return _core_.InputStream_CanRead(*args, **kwargs)
1634
1635 def Eof(*args, **kwargs):
1636 """Eof(self) -> bool"""
1637 return _core_.InputStream_Eof(*args, **kwargs)
1638
1639 def Ungetch(*args, **kwargs):
1640 """Ungetch(self, char c) -> bool"""
1641 return _core_.InputStream_Ungetch(*args, **kwargs)
1642
1643 def SeekI(*args, **kwargs):
1644 """SeekI(self, long pos, int mode=FromStart) -> long"""
1645 return _core_.InputStream_SeekI(*args, **kwargs)
1646
1647 def TellI(*args, **kwargs):
1648 """TellI(self) -> long"""
1649 return _core_.InputStream_TellI(*args, **kwargs)
1650
1651
1652class InputStreamPtr(InputStream):
1653 def __init__(self, this):
1654 self.this = this
1655 if not hasattr(self,"thisown"): self.thisown = 0
1656 self.__class__ = InputStream
1657_core_.InputStream_swigregister(InputStreamPtr)
1658DefaultPosition = cvar.DefaultPosition
1659DefaultSize = cvar.DefaultSize
1660
1661class OutputStream(object):
093d3ff1 1662 """Proxy of C++ OutputStream class"""
d55e5bfc
RD
1663 def __init__(self): raise RuntimeError, "No constructor defined"
1664 def __repr__(self):
1665 return "<%s.%s; proxy of C++ wxOutputStream instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
1666 def write(*args, **kwargs):
1667 """write(self, PyObject obj)"""
1668 return _core_.OutputStream_write(*args, **kwargs)
1669
1670
1671class OutputStreamPtr(OutputStream):
1672 def __init__(self, this):
1673 self.this = this
1674 if not hasattr(self,"thisown"): self.thisown = 0
1675 self.__class__ = OutputStream
1676_core_.OutputStream_swigregister(OutputStreamPtr)
1677
1678#---------------------------------------------------------------------------
1679
1680class FSFile(Object):
093d3ff1 1681 """Proxy of C++ FSFile class"""
d55e5bfc
RD
1682 def __repr__(self):
1683 return "<%s.%s; proxy of C++ wxFSFile instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
1684 def __init__(self, *args, **kwargs):
1685 """
1686 __init__(self, InputStream stream, String loc, String mimetype, String anchor,
1687 DateTime modif) -> FSFile
1688 """
1689 newobj = _core_.new_FSFile(*args, **kwargs)
1690 self.this = newobj.this
1691 self.thisown = 1
1692 del newobj.thisown
e2950dbb 1693 self.thisown = 0 # It will normally be deleted by the user of the wx.FileSystem
4cf4100f 1694
d55e5bfc
RD
1695 def __del__(self, destroy=_core_.delete_FSFile):
1696 """__del__(self)"""
1697 try:
1698 if self.thisown: destroy(self)
1699 except: pass
1700
1701 def GetStream(*args, **kwargs):
1702 """GetStream(self) -> InputStream"""
1703 return _core_.FSFile_GetStream(*args, **kwargs)
1704
1705 def GetMimeType(*args, **kwargs):
1706 """GetMimeType(self) -> String"""
1707 return _core_.FSFile_GetMimeType(*args, **kwargs)
1708
1709 def GetLocation(*args, **kwargs):
1710 """GetLocation(self) -> String"""
1711 return _core_.FSFile_GetLocation(*args, **kwargs)
1712
1713 def GetAnchor(*args, **kwargs):
1714 """GetAnchor(self) -> String"""
1715 return _core_.FSFile_GetAnchor(*args, **kwargs)
1716
1717 def GetModificationTime(*args, **kwargs):
1718 """GetModificationTime(self) -> DateTime"""
1719 return _core_.FSFile_GetModificationTime(*args, **kwargs)
1720
1721
1722class FSFilePtr(FSFile):
1723 def __init__(self, this):
1724 self.this = this
1725 if not hasattr(self,"thisown"): self.thisown = 0
1726 self.__class__ = FSFile
1727_core_.FSFile_swigregister(FSFilePtr)
1728
1729class CPPFileSystemHandler(object):
093d3ff1 1730 """Proxy of C++ CPPFileSystemHandler class"""
d55e5bfc
RD
1731 def __init__(self): raise RuntimeError, "No constructor defined"
1732 def __repr__(self):
1733 return "<%s.%s; proxy of C++ wxFileSystemHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
1734
1735class CPPFileSystemHandlerPtr(CPPFileSystemHandler):
1736 def __init__(self, this):
1737 self.this = this
1738 if not hasattr(self,"thisown"): self.thisown = 0
1739 self.__class__ = CPPFileSystemHandler
1740_core_.CPPFileSystemHandler_swigregister(CPPFileSystemHandlerPtr)
1741
1742class FileSystemHandler(CPPFileSystemHandler):
093d3ff1 1743 """Proxy of C++ FileSystemHandler class"""
d55e5bfc
RD
1744 def __repr__(self):
1745 return "<%s.%s; proxy of C++ wxPyFileSystemHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
1746 def __init__(self, *args, **kwargs):
1747 """__init__(self) -> FileSystemHandler"""
1748 newobj = _core_.new_FileSystemHandler(*args, **kwargs)
1749 self.this = newobj.this
1750 self.thisown = 1
1751 del newobj.thisown
1752 self._setCallbackInfo(self, FileSystemHandler)
1753
1754 def _setCallbackInfo(*args, **kwargs):
1755 """_setCallbackInfo(self, PyObject self, PyObject _class)"""
1756 return _core_.FileSystemHandler__setCallbackInfo(*args, **kwargs)
1757
1758 def CanOpen(*args, **kwargs):
1759 """CanOpen(self, String location) -> bool"""
1760 return _core_.FileSystemHandler_CanOpen(*args, **kwargs)
1761
1762 def OpenFile(*args, **kwargs):
1763 """OpenFile(self, FileSystem fs, String location) -> FSFile"""
1764 return _core_.FileSystemHandler_OpenFile(*args, **kwargs)
1765
1766 def FindFirst(*args, **kwargs):
1767 """FindFirst(self, String spec, int flags=0) -> String"""
1768 return _core_.FileSystemHandler_FindFirst(*args, **kwargs)
1769
1770 def FindNext(*args, **kwargs):
1771 """FindNext(self) -> String"""
1772 return _core_.FileSystemHandler_FindNext(*args, **kwargs)
1773
1774 def GetProtocol(*args, **kwargs):
1775 """GetProtocol(self, String location) -> String"""
1776 return _core_.FileSystemHandler_GetProtocol(*args, **kwargs)
1777
1778 def GetLeftLocation(*args, **kwargs):
1779 """GetLeftLocation(self, String location) -> String"""
1780 return _core_.FileSystemHandler_GetLeftLocation(*args, **kwargs)
1781
1782 def GetAnchor(*args, **kwargs):
1783 """GetAnchor(self, String location) -> String"""
1784 return _core_.FileSystemHandler_GetAnchor(*args, **kwargs)
1785
1786 def GetRightLocation(*args, **kwargs):
1787 """GetRightLocation(self, String location) -> String"""
1788 return _core_.FileSystemHandler_GetRightLocation(*args, **kwargs)
1789
1790 def GetMimeTypeFromExt(*args, **kwargs):
1791 """GetMimeTypeFromExt(self, String location) -> String"""
1792 return _core_.FileSystemHandler_GetMimeTypeFromExt(*args, **kwargs)
1793
1794
1795class FileSystemHandlerPtr(FileSystemHandler):
1796 def __init__(self, this):
1797 self.this = this
1798 if not hasattr(self,"thisown"): self.thisown = 0
1799 self.__class__ = FileSystemHandler
1800_core_.FileSystemHandler_swigregister(FileSystemHandlerPtr)
1801
1802class FileSystem(Object):
093d3ff1 1803 """Proxy of C++ FileSystem class"""
d55e5bfc
RD
1804 def __repr__(self):
1805 return "<%s.%s; proxy of C++ wxFileSystem instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
1806 def __init__(self, *args, **kwargs):
1807 """__init__(self) -> FileSystem"""
1808 newobj = _core_.new_FileSystem(*args, **kwargs)
1809 self.this = newobj.this
1810 self.thisown = 1
1811 del newobj.thisown
1812 def __del__(self, destroy=_core_.delete_FileSystem):
1813 """__del__(self)"""
1814 try:
1815 if self.thisown: destroy(self)
1816 except: pass
1817
1818 def ChangePathTo(*args, **kwargs):
1819 """ChangePathTo(self, String location, bool is_dir=False)"""
1820 return _core_.FileSystem_ChangePathTo(*args, **kwargs)
1821
1822 def GetPath(*args, **kwargs):
1823 """GetPath(self) -> String"""
1824 return _core_.FileSystem_GetPath(*args, **kwargs)
1825
1826 def OpenFile(*args, **kwargs):
1827 """OpenFile(self, String location) -> FSFile"""
1828 return _core_.FileSystem_OpenFile(*args, **kwargs)
1829
1830 def FindFirst(*args, **kwargs):
1831 """FindFirst(self, String spec, int flags=0) -> String"""
1832 return _core_.FileSystem_FindFirst(*args, **kwargs)
1833
1834 def FindNext(*args, **kwargs):
1835 """FindNext(self) -> String"""
1836 return _core_.FileSystem_FindNext(*args, **kwargs)
1837
1838 def AddHandler(*args, **kwargs):
c24da6d6 1839 """AddHandler(CPPFileSystemHandler handler)"""
d55e5bfc
RD
1840 return _core_.FileSystem_AddHandler(*args, **kwargs)
1841
1842 AddHandler = staticmethod(AddHandler)
1843 def CleanUpHandlers(*args, **kwargs):
c24da6d6 1844 """CleanUpHandlers()"""
d55e5bfc
RD
1845 return _core_.FileSystem_CleanUpHandlers(*args, **kwargs)
1846
1847 CleanUpHandlers = staticmethod(CleanUpHandlers)
1848 def FileNameToURL(*args, **kwargs):
c24da6d6 1849 """FileNameToURL(String filename) -> String"""
d55e5bfc
RD
1850 return _core_.FileSystem_FileNameToURL(*args, **kwargs)
1851
1852 FileNameToURL = staticmethod(FileNameToURL)
ae8162c8
RD
1853 def URLToFileName(*args, **kwargs):
1854 """URLToFileName(String url) -> String"""
1855 return _core_.FileSystem_URLToFileName(*args, **kwargs)
1856
1857 URLToFileName = staticmethod(URLToFileName)
d55e5bfc
RD
1858
1859class FileSystemPtr(FileSystem):
1860 def __init__(self, this):
1861 self.this = this
1862 if not hasattr(self,"thisown"): self.thisown = 0
1863 self.__class__ = FileSystem
1864_core_.FileSystem_swigregister(FileSystemPtr)
1865
1866def FileSystem_AddHandler(*args, **kwargs):
1867 """FileSystem_AddHandler(CPPFileSystemHandler handler)"""
1868 return _core_.FileSystem_AddHandler(*args, **kwargs)
1869
1870def FileSystem_CleanUpHandlers(*args, **kwargs):
1871 """FileSystem_CleanUpHandlers()"""
1872 return _core_.FileSystem_CleanUpHandlers(*args, **kwargs)
1873
1874def FileSystem_FileNameToURL(*args, **kwargs):
1875 """FileSystem_FileNameToURL(String filename) -> String"""
1876 return _core_.FileSystem_FileNameToURL(*args, **kwargs)
1877
d55e5bfc
RD
1878def FileSystem_URLToFileName(*args, **kwargs):
1879 """FileSystem_URLToFileName(String url) -> String"""
1880 return _core_.FileSystem_URLToFileName(*args, **kwargs)
ae8162c8 1881
d55e5bfc 1882class InternetFSHandler(CPPFileSystemHandler):
093d3ff1 1883 """Proxy of C++ InternetFSHandler class"""
d55e5bfc
RD
1884 def __repr__(self):
1885 return "<%s.%s; proxy of C++ wxInternetFSHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
1886 def __init__(self, *args, **kwargs):
1887 """__init__(self) -> InternetFSHandler"""
1888 newobj = _core_.new_InternetFSHandler(*args, **kwargs)
1889 self.this = newobj.this
1890 self.thisown = 1
1891 del newobj.thisown
1892 def CanOpen(*args, **kwargs):
1893 """CanOpen(self, String location) -> bool"""
1894 return _core_.InternetFSHandler_CanOpen(*args, **kwargs)
1895
1896 def OpenFile(*args, **kwargs):
1897 """OpenFile(self, FileSystem fs, String location) -> FSFile"""
1898 return _core_.InternetFSHandler_OpenFile(*args, **kwargs)
1899
1900
1901class InternetFSHandlerPtr(InternetFSHandler):
1902 def __init__(self, this):
1903 self.this = this
1904 if not hasattr(self,"thisown"): self.thisown = 0
1905 self.__class__ = InternetFSHandler
1906_core_.InternetFSHandler_swigregister(InternetFSHandlerPtr)
1907
1908class ZipFSHandler(CPPFileSystemHandler):
093d3ff1 1909 """Proxy of C++ ZipFSHandler class"""
d55e5bfc
RD
1910 def __repr__(self):
1911 return "<%s.%s; proxy of C++ wxZipFSHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
1912 def __init__(self, *args, **kwargs):
1913 """__init__(self) -> ZipFSHandler"""
1914 newobj = _core_.new_ZipFSHandler(*args, **kwargs)
1915 self.this = newobj.this
1916 self.thisown = 1
1917 del newobj.thisown
1918 def CanOpen(*args, **kwargs):
1919 """CanOpen(self, String location) -> bool"""
1920 return _core_.ZipFSHandler_CanOpen(*args, **kwargs)
1921
1922 def OpenFile(*args, **kwargs):
1923 """OpenFile(self, FileSystem fs, String location) -> FSFile"""
1924 return _core_.ZipFSHandler_OpenFile(*args, **kwargs)
1925
1926 def FindFirst(*args, **kwargs):
1927 """FindFirst(self, String spec, int flags=0) -> String"""
1928 return _core_.ZipFSHandler_FindFirst(*args, **kwargs)
1929
1930 def FindNext(*args, **kwargs):
1931 """FindNext(self) -> String"""
1932 return _core_.ZipFSHandler_FindNext(*args, **kwargs)
1933
1934
1935class ZipFSHandlerPtr(ZipFSHandler):
1936 def __init__(self, this):
1937 self.this = this
1938 if not hasattr(self,"thisown"): self.thisown = 0
1939 self.__class__ = ZipFSHandler
1940_core_.ZipFSHandler_swigregister(ZipFSHandlerPtr)
1941
1942
1943def __wxMemoryFSHandler_AddFile_wxImage(*args, **kwargs):
1944 """__wxMemoryFSHandler_AddFile_wxImage(String filename, Image image, long type)"""
1945 return _core_.__wxMemoryFSHandler_AddFile_wxImage(*args, **kwargs)
1946
1947def __wxMemoryFSHandler_AddFile_wxBitmap(*args, **kwargs):
1948 """__wxMemoryFSHandler_AddFile_wxBitmap(String filename, Bitmap bitmap, long type)"""
1949 return _core_.__wxMemoryFSHandler_AddFile_wxBitmap(*args, **kwargs)
1950
1951def __wxMemoryFSHandler_AddFile_Data(*args, **kwargs):
1952 """__wxMemoryFSHandler_AddFile_Data(String filename, PyObject data)"""
1953 return _core_.__wxMemoryFSHandler_AddFile_Data(*args, **kwargs)
ae8162c8
RD
1954def MemoryFSHandler_AddFile(filename, dataItem, imgType=-1):
1955 """
1956 Add 'file' to the memory filesystem. The dataItem parameter can
1957 either be a `wx.Bitmap`, `wx.Image` or a string that can contain
1958 arbitrary data. If a bitmap or image is used then the imgType
1959 parameter should specify what kind of image file it should be
1960 written as, wx.BITMAP_TYPE_PNG, etc.
1961 """
1962 if isinstance(dataItem, wx.Image):
1963 __wxMemoryFSHandler_AddFile_wxImage(filename, dataItem, imgType)
1964 elif isinstance(dataItem, wx.Bitmap):
1965 __wxMemoryFSHandler_AddFile_wxBitmap(filename, dataItem, imgType)
1966 elif type(dataItem) == str:
1967 __wxMemoryFSHandler_AddFile_Data(filename, dataItem)
1968 else:
1969 raise TypeError, 'wx.Image, wx.Bitmap or string expected'
d55e5bfc
RD
1970
1971class MemoryFSHandler(CPPFileSystemHandler):
093d3ff1 1972 """Proxy of C++ MemoryFSHandler class"""
d55e5bfc
RD
1973 def __repr__(self):
1974 return "<%s.%s; proxy of C++ wxMemoryFSHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
1975 def __init__(self, *args, **kwargs):
1976 """__init__(self) -> MemoryFSHandler"""
1977 newobj = _core_.new_MemoryFSHandler(*args, **kwargs)
1978 self.this = newobj.this
1979 self.thisown = 1
1980 del newobj.thisown
1981 def RemoveFile(*args, **kwargs):
c24da6d6 1982 """RemoveFile(String filename)"""
d55e5bfc
RD
1983 return _core_.MemoryFSHandler_RemoveFile(*args, **kwargs)
1984
1985 RemoveFile = staticmethod(RemoveFile)
1986 AddFile = staticmethod(MemoryFSHandler_AddFile)
1987 def CanOpen(*args, **kwargs):
1988 """CanOpen(self, String location) -> bool"""
1989 return _core_.MemoryFSHandler_CanOpen(*args, **kwargs)
1990
1991 def OpenFile(*args, **kwargs):
1992 """OpenFile(self, FileSystem fs, String location) -> FSFile"""
1993 return _core_.MemoryFSHandler_OpenFile(*args, **kwargs)
1994
1995 def FindFirst(*args, **kwargs):
1996 """FindFirst(self, String spec, int flags=0) -> String"""
1997 return _core_.MemoryFSHandler_FindFirst(*args, **kwargs)
1998
1999 def FindNext(*args, **kwargs):
2000 """FindNext(self) -> String"""
2001 return _core_.MemoryFSHandler_FindNext(*args, **kwargs)
2002
2003
2004class MemoryFSHandlerPtr(MemoryFSHandler):
2005 def __init__(self, this):
2006 self.this = this
2007 if not hasattr(self,"thisown"): self.thisown = 0
2008 self.__class__ = MemoryFSHandler
2009_core_.MemoryFSHandler_swigregister(MemoryFSHandlerPtr)
2010
2011def MemoryFSHandler_RemoveFile(*args, **kwargs):
2012 """MemoryFSHandler_RemoveFile(String filename)"""
2013 return _core_.MemoryFSHandler_RemoveFile(*args, **kwargs)
2014
2015#---------------------------------------------------------------------------
2016
2017class ImageHandler(Object):
093d3ff1 2018 """Proxy of C++ ImageHandler class"""
d55e5bfc
RD
2019 def __init__(self): raise RuntimeError, "No constructor defined"
2020 def __repr__(self):
2021 return "<%s.%s; proxy of C++ wxImageHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
2022 def GetName(*args, **kwargs):
2023 """GetName(self) -> String"""
2024 return _core_.ImageHandler_GetName(*args, **kwargs)
2025
2026 def GetExtension(*args, **kwargs):
2027 """GetExtension(self) -> String"""
2028 return _core_.ImageHandler_GetExtension(*args, **kwargs)
2029
2030 def GetType(*args, **kwargs):
2031 """GetType(self) -> long"""
2032 return _core_.ImageHandler_GetType(*args, **kwargs)
2033
2034 def GetMimeType(*args, **kwargs):
2035 """GetMimeType(self) -> String"""
2036 return _core_.ImageHandler_GetMimeType(*args, **kwargs)
2037
2038 def CanRead(*args, **kwargs):
2039 """CanRead(self, String name) -> bool"""
2040 return _core_.ImageHandler_CanRead(*args, **kwargs)
2041
2042 def SetName(*args, **kwargs):
2043 """SetName(self, String name)"""
2044 return _core_.ImageHandler_SetName(*args, **kwargs)
2045
2046 def SetExtension(*args, **kwargs):
2047 """SetExtension(self, String extension)"""
2048 return _core_.ImageHandler_SetExtension(*args, **kwargs)
2049
2050 def SetType(*args, **kwargs):
2051 """SetType(self, long type)"""
2052 return _core_.ImageHandler_SetType(*args, **kwargs)
2053
2054 def SetMimeType(*args, **kwargs):
2055 """SetMimeType(self, String mimetype)"""
2056 return _core_.ImageHandler_SetMimeType(*args, **kwargs)
2057
2058
2059class ImageHandlerPtr(ImageHandler):
2060 def __init__(self, this):
2061 self.this = this
2062 if not hasattr(self,"thisown"): self.thisown = 0
2063 self.__class__ = ImageHandler
2064_core_.ImageHandler_swigregister(ImageHandlerPtr)
2065
2066class ImageHistogram(object):
093d3ff1 2067 """Proxy of C++ ImageHistogram class"""
d55e5bfc
RD
2068 def __repr__(self):
2069 return "<%s.%s; proxy of C++ wxImageHistogram instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
2070 def __init__(self, *args, **kwargs):
2071 """__init__(self) -> ImageHistogram"""
2072 newobj = _core_.new_ImageHistogram(*args, **kwargs)
2073 self.this = newobj.this
2074 self.thisown = 1
2075 del newobj.thisown
2076 def MakeKey(*args, **kwargs):
2077 """
c24da6d6 2078 MakeKey(unsigned char r, unsigned char g, unsigned char b) -> unsigned long
d55e5bfc
RD
2079
2080 Get the key in the histogram for the given RGB values
2081 """
2082 return _core_.ImageHistogram_MakeKey(*args, **kwargs)
2083
2084 MakeKey = staticmethod(MakeKey)
2085 def FindFirstUnusedColour(*args, **kwargs):
a8eff060
RD
2086 """
2087 FindFirstUnusedColour(int startR=1, int startG=0, int startB=0) -> (success, r, g, b)
2088
2089 Find first colour that is not used in the image and has higher RGB
2090 values than startR, startG, startB. Returns a tuple consisting of a
2091 success flag and rgb values.
2092 """
d55e5bfc
RD
2093 return _core_.ImageHistogram_FindFirstUnusedColour(*args, **kwargs)
2094
2095
2096class ImageHistogramPtr(ImageHistogram):
2097 def __init__(self, this):
2098 self.this = this
2099 if not hasattr(self,"thisown"): self.thisown = 0
2100 self.__class__ = ImageHistogram
2101_core_.ImageHistogram_swigregister(ImageHistogramPtr)
2102
2103def ImageHistogram_MakeKey(*args, **kwargs):
2104 """
2105 ImageHistogram_MakeKey(unsigned char r, unsigned char g, unsigned char b) -> unsigned long
2106
2107 Get the key in the histogram for the given RGB values
2108 """
2109 return _core_.ImageHistogram_MakeKey(*args, **kwargs)
2110
2111class Image(Object):
093d3ff1 2112 """Proxy of C++ Image class"""
d55e5bfc
RD
2113 def __repr__(self):
2114 return "<%s.%s; proxy of C++ wxImage instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
2115 def __init__(self, *args, **kwargs):
2116 """__init__(self, String name, long type=BITMAP_TYPE_ANY, int index=-1) -> Image"""
2117 newobj = _core_.new_Image(*args, **kwargs)
2118 self.this = newobj.this
2119 self.thisown = 1
2120 del newobj.thisown
2121 def __del__(self, destroy=_core_.delete_Image):
2122 """__del__(self)"""
2123 try:
2124 if self.thisown: destroy(self)
2125 except: pass
2126
2127 def Create(*args, **kwargs):
2128 """Create(self, int width, int height)"""
2129 return _core_.Image_Create(*args, **kwargs)
2130
2131 def Destroy(*args, **kwargs):
2132 """
2133 Destroy(self)
2134
2135 Deletes the C++ object this Python object is a proxy for.
2136 """
2137 return _core_.Image_Destroy(*args, **kwargs)
2138
2139 def Scale(*args, **kwargs):
2140 """Scale(self, int width, int height) -> Image"""
2141 return _core_.Image_Scale(*args, **kwargs)
2142
2143 def ShrinkBy(*args, **kwargs):
2144 """ShrinkBy(self, int xFactor, int yFactor) -> Image"""
2145 return _core_.Image_ShrinkBy(*args, **kwargs)
2146
2147 def Rescale(*args, **kwargs):
2148 """Rescale(self, int width, int height) -> Image"""
2149 return _core_.Image_Rescale(*args, **kwargs)
2150
aff4cc5c
RD
2151 def Resize(*args, **kwargs):
2152 """Resize(self, Size size, Point pos, int r=-1, int g=-1, int b=-1) -> Image"""
2153 return _core_.Image_Resize(*args, **kwargs)
2154
d55e5bfc
RD
2155 def SetRGB(*args, **kwargs):
2156 """SetRGB(self, int x, int y, unsigned char r, unsigned char g, unsigned char b)"""
2157 return _core_.Image_SetRGB(*args, **kwargs)
2158
aff4cc5c
RD
2159 def SetRGBRect(*args, **kwargs):
2160 """SetRGBRect(self, Rect rect, unsigned char r, unsigned char g, unsigned char b)"""
2161 return _core_.Image_SetRGBRect(*args, **kwargs)
2162
d55e5bfc
RD
2163 def GetRed(*args, **kwargs):
2164 """GetRed(self, int x, int y) -> unsigned char"""
2165 return _core_.Image_GetRed(*args, **kwargs)
2166
2167 def GetGreen(*args, **kwargs):
2168 """GetGreen(self, int x, int y) -> unsigned char"""
2169 return _core_.Image_GetGreen(*args, **kwargs)
2170
2171 def GetBlue(*args, **kwargs):
2172 """GetBlue(self, int x, int y) -> unsigned char"""
2173 return _core_.Image_GetBlue(*args, **kwargs)
2174
2175 def SetAlpha(*args, **kwargs):
2176 """SetAlpha(self, int x, int y, unsigned char alpha)"""
2177 return _core_.Image_SetAlpha(*args, **kwargs)
2178
2179 def GetAlpha(*args, **kwargs):
2180 """GetAlpha(self, int x, int y) -> unsigned char"""
2181 return _core_.Image_GetAlpha(*args, **kwargs)
2182
2183 def HasAlpha(*args, **kwargs):
2184 """HasAlpha(self) -> bool"""
2185 return _core_.Image_HasAlpha(*args, **kwargs)
2186
68350608
RD
2187 def InitAlpha(*args, **kwargs):
2188 """
2189 InitAlpha(self)
2190
2191 Initializes the image alpha channel data. It is an error to call it if
2192 the image already has alpha data. If it doesn't, alpha data will be by
2193 default initialized to all pixels being fully opaque. But if the image
2194 has a a mask colour, all mask pixels will be completely transparent.
2195 """
2196 return _core_.Image_InitAlpha(*args, **kwargs)
2197
d55e5bfc 2198 def FindFirstUnusedColour(*args, **kwargs):
a8eff060
RD
2199 """
2200 FindFirstUnusedColour(int startR=1, int startG=0, int startB=0) -> (success, r, g, b)
2201
2202 Find first colour that is not used in the image and has higher RGB
2203 values than startR, startG, startB. Returns a tuple consisting of a
2204 success flag and rgb values.
2205 """
d55e5bfc
RD
2206 return _core_.Image_FindFirstUnusedColour(*args, **kwargs)
2207
4cf4100f
RD
2208 def ConvertAlphaToMask(*args, **kwargs):
2209 """
2210 ConvertAlphaToMask(self, byte threshold=128) -> bool
2211
2212 If the image has alpha channel, this method converts it to mask. All pixels
2213 with alpha value less than ``threshold`` are replaced with mask colour and the
2214 alpha channel is removed. Mask colour is chosen automatically using
2215 `FindFirstUnusedColour`.
2216
2217 If the image image doesn't have alpha channel, ConvertAlphaToMask does
2218 nothing.
2219 """
2220 return _core_.Image_ConvertAlphaToMask(*args, **kwargs)
2221
8fb0e70a
RD
2222 def ConvertColourToAlpha(*args, **kwargs):
2223 """
2224 ConvertColourToAlpha(self, unsigned char r, unsigned char g, unsigned char b) -> bool
2225
2226 This method converts an image where the original alpha information is
2227 only available as a shades of a colour (actually shades of grey)
2228 typically when you draw anti-aliased text into a bitmap. The DC
2229 drawing routines draw grey values on the black background although
2230 they actually mean to draw white with differnt alpha values. This
2231 method reverses it, assuming a black (!) background and white text.
2232 The method will then fill up the whole image with the colour given.
2233 """
2234 return _core_.Image_ConvertColourToAlpha(*args, **kwargs)
2235
d55e5bfc
RD
2236 def SetMaskFromImage(*args, **kwargs):
2237 """SetMaskFromImage(self, Image mask, byte mr, byte mg, byte mb) -> bool"""
2238 return _core_.Image_SetMaskFromImage(*args, **kwargs)
2239
2240 def CanRead(*args, **kwargs):
c24da6d6 2241 """CanRead(String name) -> bool"""
d55e5bfc
RD
2242 return _core_.Image_CanRead(*args, **kwargs)
2243
2244 CanRead = staticmethod(CanRead)
2245 def GetImageCount(*args, **kwargs):
c24da6d6 2246 """GetImageCount(String name, long type=BITMAP_TYPE_ANY) -> int"""
d55e5bfc
RD
2247 return _core_.Image_GetImageCount(*args, **kwargs)
2248
2249 GetImageCount = staticmethod(GetImageCount)
2250 def LoadFile(*args, **kwargs):
2251 """LoadFile(self, String name, long type=BITMAP_TYPE_ANY, int index=-1) -> bool"""
2252 return _core_.Image_LoadFile(*args, **kwargs)
2253
2254 def LoadMimeFile(*args, **kwargs):
2255 """LoadMimeFile(self, String name, String mimetype, int index=-1) -> bool"""
2256 return _core_.Image_LoadMimeFile(*args, **kwargs)
2257
2258 def SaveFile(*args, **kwargs):
2259 """SaveFile(self, String name, int type) -> bool"""
2260 return _core_.Image_SaveFile(*args, **kwargs)
2261
2262 def SaveMimeFile(*args, **kwargs):
2263 """SaveMimeFile(self, String name, String mimetype) -> bool"""
2264 return _core_.Image_SaveMimeFile(*args, **kwargs)
2265
2266 def CanReadStream(*args, **kwargs):
c24da6d6 2267 """CanReadStream(InputStream stream) -> bool"""
d55e5bfc
RD
2268 return _core_.Image_CanReadStream(*args, **kwargs)
2269
2270 CanReadStream = staticmethod(CanReadStream)
2271 def LoadStream(*args, **kwargs):
2272 """LoadStream(self, InputStream stream, long type=BITMAP_TYPE_ANY, int index=-1) -> bool"""
2273 return _core_.Image_LoadStream(*args, **kwargs)
2274
2275 def LoadMimeStream(*args, **kwargs):
2276 """LoadMimeStream(self, InputStream stream, String mimetype, int index=-1) -> bool"""
2277 return _core_.Image_LoadMimeStream(*args, **kwargs)
2278
2279 def Ok(*args, **kwargs):
2280 """Ok(self) -> bool"""
2281 return _core_.Image_Ok(*args, **kwargs)
2282
2283 def GetWidth(*args, **kwargs):
2284 """GetWidth(self) -> int"""
2285 return _core_.Image_GetWidth(*args, **kwargs)
2286
2287 def GetHeight(*args, **kwargs):
2288 """GetHeight(self) -> int"""
2289 return _core_.Image_GetHeight(*args, **kwargs)
2290
2291 def GetSize(*args, **kwargs):
2292 """GetSize(self) -> Size"""
2293 return _core_.Image_GetSize(*args, **kwargs)
2294
2295 def GetSubImage(*args, **kwargs):
2296 """GetSubImage(self, Rect rect) -> Image"""
2297 return _core_.Image_GetSubImage(*args, **kwargs)
2298
aff4cc5c
RD
2299 def Size(*args, **kwargs):
2300 """Size(self, Size size, Point pos, int r=-1, int g=-1, int b=-1) -> Image"""
2301 return _core_.Image_Size(*args, **kwargs)
2302
d55e5bfc
RD
2303 def Copy(*args, **kwargs):
2304 """Copy(self) -> Image"""
2305 return _core_.Image_Copy(*args, **kwargs)
2306
2307 def Paste(*args, **kwargs):
2308 """Paste(self, Image image, int x, int y)"""
2309 return _core_.Image_Paste(*args, **kwargs)
2310
2311 def GetData(*args, **kwargs):
2312 """GetData(self) -> PyObject"""
2313 return _core_.Image_GetData(*args, **kwargs)
2314
2315 def SetData(*args, **kwargs):
2316 """SetData(self, PyObject data)"""
2317 return _core_.Image_SetData(*args, **kwargs)
2318
2319 def GetDataBuffer(*args, **kwargs):
2320 """GetDataBuffer(self) -> PyObject"""
2321 return _core_.Image_GetDataBuffer(*args, **kwargs)
2322
2323 def SetDataBuffer(*args, **kwargs):
2324 """SetDataBuffer(self, PyObject data)"""
2325 return _core_.Image_SetDataBuffer(*args, **kwargs)
2326
2327 def GetAlphaData(*args, **kwargs):
2328 """GetAlphaData(self) -> PyObject"""
2329 return _core_.Image_GetAlphaData(*args, **kwargs)
2330
2331 def SetAlphaData(*args, **kwargs):
2332 """SetAlphaData(self, PyObject data)"""
2333 return _core_.Image_SetAlphaData(*args, **kwargs)
2334
2335 def GetAlphaBuffer(*args, **kwargs):
2336 """GetAlphaBuffer(self) -> PyObject"""
2337 return _core_.Image_GetAlphaBuffer(*args, **kwargs)
2338
2339 def SetAlphaBuffer(*args, **kwargs):
2340 """SetAlphaBuffer(self, PyObject data)"""
2341 return _core_.Image_SetAlphaBuffer(*args, **kwargs)
2342
2343 def SetMaskColour(*args, **kwargs):
2344 """SetMaskColour(self, unsigned char r, unsigned char g, unsigned char b)"""
2345 return _core_.Image_SetMaskColour(*args, **kwargs)
2346
aff4cc5c
RD
2347 def GetOrFindMaskColour(*args, **kwargs):
2348 """
2349 GetOrFindMaskColour() -> (r,g,b)
2350
2351 Get the current mask colour or find a suitable colour.
2352 """
2353 return _core_.Image_GetOrFindMaskColour(*args, **kwargs)
2354
d55e5bfc
RD
2355 def GetMaskRed(*args, **kwargs):
2356 """GetMaskRed(self) -> unsigned char"""
2357 return _core_.Image_GetMaskRed(*args, **kwargs)
2358
2359 def GetMaskGreen(*args, **kwargs):
2360 """GetMaskGreen(self) -> unsigned char"""
2361 return _core_.Image_GetMaskGreen(*args, **kwargs)
2362
2363 def GetMaskBlue(*args, **kwargs):
2364 """GetMaskBlue(self) -> unsigned char"""
2365 return _core_.Image_GetMaskBlue(*args, **kwargs)
2366
2367 def SetMask(*args, **kwargs):
2368 """SetMask(self, bool mask=True)"""
2369 return _core_.Image_SetMask(*args, **kwargs)
2370
2371 def HasMask(*args, **kwargs):
2372 """HasMask(self) -> bool"""
2373 return _core_.Image_HasMask(*args, **kwargs)
2374
2375 def Rotate(*args, **kwargs):
2376 """
2377 Rotate(self, double angle, Point centre_of_rotation, bool interpolating=True,
2378 Point offset_after_rotation=None) -> Image
2379 """
2380 return _core_.Image_Rotate(*args, **kwargs)
2381
2382 def Rotate90(*args, **kwargs):
2383 """Rotate90(self, bool clockwise=True) -> Image"""
2384 return _core_.Image_Rotate90(*args, **kwargs)
2385
2386 def Mirror(*args, **kwargs):
2387 """Mirror(self, bool horizontally=True) -> Image"""
2388 return _core_.Image_Mirror(*args, **kwargs)
2389
2390 def Replace(*args, **kwargs):
2391 """
2392 Replace(self, unsigned char r1, unsigned char g1, unsigned char b1,
2393 unsigned char r2, unsigned char g2, unsigned char b2)
2394 """
2395 return _core_.Image_Replace(*args, **kwargs)
2396
2397 def ConvertToMono(*args, **kwargs):
2398 """ConvertToMono(self, unsigned char r, unsigned char g, unsigned char b) -> Image"""
2399 return _core_.Image_ConvertToMono(*args, **kwargs)
2400
2401 def SetOption(*args, **kwargs):
2402 """SetOption(self, String name, String value)"""
2403 return _core_.Image_SetOption(*args, **kwargs)
2404
2405 def SetOptionInt(*args, **kwargs):
2406 """SetOptionInt(self, String name, int value)"""
2407 return _core_.Image_SetOptionInt(*args, **kwargs)
2408
2409 def GetOption(*args, **kwargs):
2410 """GetOption(self, String name) -> String"""
2411 return _core_.Image_GetOption(*args, **kwargs)
2412
2413 def GetOptionInt(*args, **kwargs):
2414 """GetOptionInt(self, String name) -> int"""
2415 return _core_.Image_GetOptionInt(*args, **kwargs)
2416
2417 def HasOption(*args, **kwargs):
2418 """HasOption(self, String name) -> bool"""
2419 return _core_.Image_HasOption(*args, **kwargs)
2420
2421 def CountColours(*args, **kwargs):
2422 """CountColours(self, unsigned long stopafter=(unsigned long) -1) -> unsigned long"""
2423 return _core_.Image_CountColours(*args, **kwargs)
2424
2425 def ComputeHistogram(*args, **kwargs):
2426 """ComputeHistogram(self, ImageHistogram h) -> unsigned long"""
2427 return _core_.Image_ComputeHistogram(*args, **kwargs)
2428
2429 def AddHandler(*args, **kwargs):
c24da6d6 2430 """AddHandler(ImageHandler handler)"""
d55e5bfc
RD
2431 return _core_.Image_AddHandler(*args, **kwargs)
2432
2433 AddHandler = staticmethod(AddHandler)
2434 def InsertHandler(*args, **kwargs):
c24da6d6 2435 """InsertHandler(ImageHandler handler)"""
d55e5bfc
RD
2436 return _core_.Image_InsertHandler(*args, **kwargs)
2437
2438 InsertHandler = staticmethod(InsertHandler)
2439 def RemoveHandler(*args, **kwargs):
c24da6d6 2440 """RemoveHandler(String name) -> bool"""
d55e5bfc
RD
2441 return _core_.Image_RemoveHandler(*args, **kwargs)
2442
2443 RemoveHandler = staticmethod(RemoveHandler)
2444 def GetImageExtWildcard(*args, **kwargs):
c24da6d6 2445 """GetImageExtWildcard() -> String"""
d55e5bfc
RD
2446 return _core_.Image_GetImageExtWildcard(*args, **kwargs)
2447
2448 GetImageExtWildcard = staticmethod(GetImageExtWildcard)
2449 def ConvertToBitmap(*args, **kwargs):
1fbf26be 2450 """ConvertToBitmap(self, int depth=-1) -> Bitmap"""
d55e5bfc
RD
2451 return _core_.Image_ConvertToBitmap(*args, **kwargs)
2452
2453 def ConvertToMonoBitmap(*args, **kwargs):
2454 """ConvertToMonoBitmap(self, unsigned char red, unsigned char green, unsigned char blue) -> Bitmap"""
2455 return _core_.Image_ConvertToMonoBitmap(*args, **kwargs)
2456
2457 def __nonzero__(self): return self.Ok()
2458
2459class ImagePtr(Image):
2460 def __init__(self, this):
2461 self.this = this
2462 if not hasattr(self,"thisown"): self.thisown = 0
2463 self.__class__ = Image
2464_core_.Image_swigregister(ImagePtr)
2465
2466def ImageFromMime(*args, **kwargs):
2467 """ImageFromMime(String name, String mimetype, int index=-1) -> Image"""
2468 val = _core_.new_ImageFromMime(*args, **kwargs)
2469 val.thisown = 1
2470 return val
2471
2472def ImageFromStream(*args, **kwargs):
2473 """ImageFromStream(InputStream stream, long type=BITMAP_TYPE_ANY, int index=-1) -> Image"""
2474 val = _core_.new_ImageFromStream(*args, **kwargs)
2475 val.thisown = 1
2476 return val
2477
2478def ImageFromStreamMime(*args, **kwargs):
2479 """ImageFromStreamMime(InputStream stream, String mimetype, int index=-1) -> Image"""
2480 val = _core_.new_ImageFromStreamMime(*args, **kwargs)
2481 val.thisown = 1
2482 return val
2483
c24da6d6
RD
2484def EmptyImage(*args, **kwargs):
2485 """EmptyImage(int width=0, int height=0, bool clear=True) -> Image"""
2486 val = _core_.new_EmptyImage(*args, **kwargs)
d55e5bfc
RD
2487 val.thisown = 1
2488 return val
2489
2490def ImageFromBitmap(*args, **kwargs):
2491 """ImageFromBitmap(Bitmap bitmap) -> Image"""
2492 val = _core_.new_ImageFromBitmap(*args, **kwargs)
2493 val.thisown = 1
2494 return val
2495
2496def ImageFromData(*args, **kwargs):
2497 """ImageFromData(int width, int height, unsigned char data) -> Image"""
2498 val = _core_.new_ImageFromData(*args, **kwargs)
2499 val.thisown = 1
2500 return val
2501
c9c2cf70
RD
2502def ImageFromDataWithAlpha(*args, **kwargs):
2503 """ImageFromDataWithAlpha(int width, int height, unsigned char data, unsigned char alpha) -> Image"""
2504 val = _core_.new_ImageFromDataWithAlpha(*args, **kwargs)
2505 val.thisown = 1
2506 return val
2507
d55e5bfc
RD
2508def Image_CanRead(*args, **kwargs):
2509 """Image_CanRead(String name) -> bool"""
2510 return _core_.Image_CanRead(*args, **kwargs)
2511
2512def Image_GetImageCount(*args, **kwargs):
2513 """Image_GetImageCount(String name, long type=BITMAP_TYPE_ANY) -> int"""
2514 return _core_.Image_GetImageCount(*args, **kwargs)
2515
2516def Image_CanReadStream(*args, **kwargs):
2517 """Image_CanReadStream(InputStream stream) -> bool"""
2518 return _core_.Image_CanReadStream(*args, **kwargs)
2519
2520def Image_AddHandler(*args, **kwargs):
2521 """Image_AddHandler(ImageHandler handler)"""
2522 return _core_.Image_AddHandler(*args, **kwargs)
2523
2524def Image_InsertHandler(*args, **kwargs):
2525 """Image_InsertHandler(ImageHandler handler)"""
2526 return _core_.Image_InsertHandler(*args, **kwargs)
2527
2528def Image_RemoveHandler(*args, **kwargs):
2529 """Image_RemoveHandler(String name) -> bool"""
2530 return _core_.Image_RemoveHandler(*args, **kwargs)
2531
2532def Image_GetImageExtWildcard(*args, **kwargs):
2533 """Image_GetImageExtWildcard() -> String"""
2534 return _core_.Image_GetImageExtWildcard(*args, **kwargs)
2535
a07a67e6
RD
2536def InitAllImageHandlers():
2537 """
2538 The former functionality of InitAllImageHanders is now done internal to
2539 the _core_ extension module and so this function has become a simple NOP.
2540 """
2541 pass
d55e5bfc 2542
d55e5bfc
RD
2543IMAGE_RESOLUTION_INCHES = _core_.IMAGE_RESOLUTION_INCHES
2544IMAGE_RESOLUTION_CM = _core_.IMAGE_RESOLUTION_CM
b9d6a5f3
RD
2545PNG_TYPE_COLOUR = _core_.PNG_TYPE_COLOUR
2546PNG_TYPE_GREY = _core_.PNG_TYPE_GREY
2547PNG_TYPE_GREY_RED = _core_.PNG_TYPE_GREY_RED
d55e5bfc
RD
2548BMP_24BPP = _core_.BMP_24BPP
2549BMP_8BPP = _core_.BMP_8BPP
2550BMP_8BPP_GREY = _core_.BMP_8BPP_GREY
2551BMP_8BPP_GRAY = _core_.BMP_8BPP_GRAY
2552BMP_8BPP_RED = _core_.BMP_8BPP_RED
2553BMP_8BPP_PALETTE = _core_.BMP_8BPP_PALETTE
2554BMP_4BPP = _core_.BMP_4BPP
2555BMP_1BPP = _core_.BMP_1BPP
2556BMP_1BPP_BW = _core_.BMP_1BPP_BW
2557class BMPHandler(ImageHandler):
093d3ff1 2558 """Proxy of C++ BMPHandler class"""
d55e5bfc
RD
2559 def __repr__(self):
2560 return "<%s.%s; proxy of C++ wxBMPHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
2561 def __init__(self, *args, **kwargs):
2562 """__init__(self) -> BMPHandler"""
2563 newobj = _core_.new_BMPHandler(*args, **kwargs)
2564 self.this = newobj.this
2565 self.thisown = 1
2566 del newobj.thisown
2567
2568class BMPHandlerPtr(BMPHandler):
2569 def __init__(self, this):
2570 self.this = this
2571 if not hasattr(self,"thisown"): self.thisown = 0
2572 self.__class__ = BMPHandler
2573_core_.BMPHandler_swigregister(BMPHandlerPtr)
2574NullImage = cvar.NullImage
68350608 2575IMAGE_OPTION_FILENAME = cvar.IMAGE_OPTION_FILENAME
d55e5bfc
RD
2576IMAGE_OPTION_BMP_FORMAT = cvar.IMAGE_OPTION_BMP_FORMAT
2577IMAGE_OPTION_CUR_HOTSPOT_X = cvar.IMAGE_OPTION_CUR_HOTSPOT_X
2578IMAGE_OPTION_CUR_HOTSPOT_Y = cvar.IMAGE_OPTION_CUR_HOTSPOT_Y
2579IMAGE_OPTION_RESOLUTION = cvar.IMAGE_OPTION_RESOLUTION
68350608
RD
2580IMAGE_OPTION_RESOLUTIONX = cvar.IMAGE_OPTION_RESOLUTIONX
2581IMAGE_OPTION_RESOLUTIONY = cvar.IMAGE_OPTION_RESOLUTIONY
d55e5bfc 2582IMAGE_OPTION_RESOLUTIONUNIT = cvar.IMAGE_OPTION_RESOLUTIONUNIT
24d7cbea 2583IMAGE_OPTION_QUALITY = cvar.IMAGE_OPTION_QUALITY
68350608
RD
2584IMAGE_OPTION_BITSPERSAMPLE = cvar.IMAGE_OPTION_BITSPERSAMPLE
2585IMAGE_OPTION_SAMPLESPERPIXEL = cvar.IMAGE_OPTION_SAMPLESPERPIXEL
2586IMAGE_OPTION_COMPRESSION = cvar.IMAGE_OPTION_COMPRESSION
2587IMAGE_OPTION_IMAGEDESCRIPTOR = cvar.IMAGE_OPTION_IMAGEDESCRIPTOR
b9d6a5f3
RD
2588IMAGE_OPTION_PNG_FORMAT = cvar.IMAGE_OPTION_PNG_FORMAT
2589IMAGE_OPTION_PNG_BITDEPTH = cvar.IMAGE_OPTION_PNG_BITDEPTH
d55e5bfc
RD
2590
2591class ICOHandler(BMPHandler):
093d3ff1 2592 """Proxy of C++ ICOHandler class"""
d55e5bfc
RD
2593 def __repr__(self):
2594 return "<%s.%s; proxy of C++ wxICOHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
2595 def __init__(self, *args, **kwargs):
2596 """__init__(self) -> ICOHandler"""
2597 newobj = _core_.new_ICOHandler(*args, **kwargs)
2598 self.this = newobj.this
2599 self.thisown = 1
2600 del newobj.thisown
2601
2602class ICOHandlerPtr(ICOHandler):
2603 def __init__(self, this):
2604 self.this = this
2605 if not hasattr(self,"thisown"): self.thisown = 0
2606 self.__class__ = ICOHandler
2607_core_.ICOHandler_swigregister(ICOHandlerPtr)
2608
2609class CURHandler(ICOHandler):
093d3ff1 2610 """Proxy of C++ CURHandler class"""
d55e5bfc
RD
2611 def __repr__(self):
2612 return "<%s.%s; proxy of C++ wxCURHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
2613 def __init__(self, *args, **kwargs):
2614 """__init__(self) -> CURHandler"""
2615 newobj = _core_.new_CURHandler(*args, **kwargs)
2616 self.this = newobj.this
2617 self.thisown = 1
2618 del newobj.thisown
2619
2620class CURHandlerPtr(CURHandler):
2621 def __init__(self, this):
2622 self.this = this
2623 if not hasattr(self,"thisown"): self.thisown = 0
2624 self.__class__ = CURHandler
2625_core_.CURHandler_swigregister(CURHandlerPtr)
2626
2627class ANIHandler(CURHandler):
093d3ff1 2628 """Proxy of C++ ANIHandler class"""
d55e5bfc
RD
2629 def __repr__(self):
2630 return "<%s.%s; proxy of C++ wxANIHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
2631 def __init__(self, *args, **kwargs):
2632 """__init__(self) -> ANIHandler"""
2633 newobj = _core_.new_ANIHandler(*args, **kwargs)
2634 self.this = newobj.this
2635 self.thisown = 1
2636 del newobj.thisown
2637
2638class ANIHandlerPtr(ANIHandler):
2639 def __init__(self, this):
2640 self.this = this
2641 if not hasattr(self,"thisown"): self.thisown = 0
2642 self.__class__ = ANIHandler
2643_core_.ANIHandler_swigregister(ANIHandlerPtr)
2644
2645class PNGHandler(ImageHandler):
093d3ff1 2646 """Proxy of C++ PNGHandler class"""
d55e5bfc
RD
2647 def __repr__(self):
2648 return "<%s.%s; proxy of C++ wxPNGHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
2649 def __init__(self, *args, **kwargs):
2650 """__init__(self) -> PNGHandler"""
2651 newobj = _core_.new_PNGHandler(*args, **kwargs)
2652 self.this = newobj.this
2653 self.thisown = 1
2654 del newobj.thisown
2655
2656class PNGHandlerPtr(PNGHandler):
2657 def __init__(self, this):
2658 self.this = this
2659 if not hasattr(self,"thisown"): self.thisown = 0
2660 self.__class__ = PNGHandler
2661_core_.PNGHandler_swigregister(PNGHandlerPtr)
2662
2663class GIFHandler(ImageHandler):
093d3ff1 2664 """Proxy of C++ GIFHandler class"""
d55e5bfc
RD
2665 def __repr__(self):
2666 return "<%s.%s; proxy of C++ wxGIFHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
2667 def __init__(self, *args, **kwargs):
2668 """__init__(self) -> GIFHandler"""
2669 newobj = _core_.new_GIFHandler(*args, **kwargs)
2670 self.this = newobj.this
2671 self.thisown = 1
2672 del newobj.thisown
2673
2674class GIFHandlerPtr(GIFHandler):
2675 def __init__(self, this):
2676 self.this = this
2677 if not hasattr(self,"thisown"): self.thisown = 0
2678 self.__class__ = GIFHandler
2679_core_.GIFHandler_swigregister(GIFHandlerPtr)
2680
2681class PCXHandler(ImageHandler):
093d3ff1 2682 """Proxy of C++ PCXHandler class"""
d55e5bfc
RD
2683 def __repr__(self):
2684 return "<%s.%s; proxy of C++ wxPCXHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
2685 def __init__(self, *args, **kwargs):
2686 """__init__(self) -> PCXHandler"""
2687 newobj = _core_.new_PCXHandler(*args, **kwargs)
2688 self.this = newobj.this
2689 self.thisown = 1
2690 del newobj.thisown
2691
2692class PCXHandlerPtr(PCXHandler):
2693 def __init__(self, this):
2694 self.this = this
2695 if not hasattr(self,"thisown"): self.thisown = 0
2696 self.__class__ = PCXHandler
2697_core_.PCXHandler_swigregister(PCXHandlerPtr)
2698
2699class JPEGHandler(ImageHandler):
093d3ff1 2700 """Proxy of C++ JPEGHandler class"""
d55e5bfc
RD
2701 def __repr__(self):
2702 return "<%s.%s; proxy of C++ wxJPEGHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
2703 def __init__(self, *args, **kwargs):
2704 """__init__(self) -> JPEGHandler"""
2705 newobj = _core_.new_JPEGHandler(*args, **kwargs)
2706 self.this = newobj.this
2707 self.thisown = 1
2708 del newobj.thisown
2709
2710class JPEGHandlerPtr(JPEGHandler):
2711 def __init__(self, this):
2712 self.this = this
2713 if not hasattr(self,"thisown"): self.thisown = 0
2714 self.__class__ = JPEGHandler
2715_core_.JPEGHandler_swigregister(JPEGHandlerPtr)
2716
2717class PNMHandler(ImageHandler):
093d3ff1 2718 """Proxy of C++ PNMHandler class"""
d55e5bfc
RD
2719 def __repr__(self):
2720 return "<%s.%s; proxy of C++ wxPNMHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
2721 def __init__(self, *args, **kwargs):
2722 """__init__(self) -> PNMHandler"""
2723 newobj = _core_.new_PNMHandler(*args, **kwargs)
2724 self.this = newobj.this
2725 self.thisown = 1
2726 del newobj.thisown
2727
2728class PNMHandlerPtr(PNMHandler):
2729 def __init__(self, this):
2730 self.this = this
2731 if not hasattr(self,"thisown"): self.thisown = 0
2732 self.__class__ = PNMHandler
2733_core_.PNMHandler_swigregister(PNMHandlerPtr)
2734
2735class XPMHandler(ImageHandler):
093d3ff1 2736 """Proxy of C++ XPMHandler class"""
d55e5bfc
RD
2737 def __repr__(self):
2738 return "<%s.%s; proxy of C++ wxXPMHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
2739 def __init__(self, *args, **kwargs):
2740 """__init__(self) -> XPMHandler"""
2741 newobj = _core_.new_XPMHandler(*args, **kwargs)
2742 self.this = newobj.this
2743 self.thisown = 1
2744 del newobj.thisown
2745
2746class XPMHandlerPtr(XPMHandler):
2747 def __init__(self, this):
2748 self.this = this
2749 if not hasattr(self,"thisown"): self.thisown = 0
2750 self.__class__ = XPMHandler
2751_core_.XPMHandler_swigregister(XPMHandlerPtr)
2752
2753class TIFFHandler(ImageHandler):
093d3ff1 2754 """Proxy of C++ TIFFHandler class"""
d55e5bfc
RD
2755 def __repr__(self):
2756 return "<%s.%s; proxy of C++ wxTIFFHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
2757 def __init__(self, *args, **kwargs):
2758 """__init__(self) -> TIFFHandler"""
2759 newobj = _core_.new_TIFFHandler(*args, **kwargs)
2760 self.this = newobj.this
2761 self.thisown = 1
2762 del newobj.thisown
2763
2764class TIFFHandlerPtr(TIFFHandler):
2765 def __init__(self, this):
2766 self.this = this
2767 if not hasattr(self,"thisown"): self.thisown = 0
2768 self.__class__ = TIFFHandler
2769_core_.TIFFHandler_swigregister(TIFFHandlerPtr)
2770
c0de73ae
RD
2771QUANTIZE_INCLUDE_WINDOWS_COLOURS = _core_.QUANTIZE_INCLUDE_WINDOWS_COLOURS
2772QUANTIZE_FILL_DESTINATION_IMAGE = _core_.QUANTIZE_FILL_DESTINATION_IMAGE
2773class Quantize(object):
2774 """Performs quantization, or colour reduction, on a wxImage."""
2775 def __init__(self): raise RuntimeError, "No constructor defined"
2776 def __repr__(self):
2777 return "<%s.%s; proxy of C++ wxQuantize instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
2778 def Quantize(*args, **kwargs):
2779 """
2780 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
2788 Quantize = staticmethod(Quantize)
2789
2790class QuantizePtr(Quantize):
2791 def __init__(self, this):
2792 self.this = this
2793 if not hasattr(self,"thisown"): self.thisown = 0
2794 self.__class__ = Quantize
2795_core_.Quantize_swigregister(QuantizePtr)
2796
2797def Quantize_Quantize(*args, **kwargs):
2798 """
2799 Quantize_Quantize(Image src, Image dest, int desiredNoColours=236, int flags=wxQUANTIZE_INCLUDE_WINDOWS_COLOURS|wxQUANTIZE_FILL_DESTINATION_IMAGE) -> bool
2800
2801 Reduce the colours in the source image and put the result into the
2802 destination image, setting the palette in the destination if
2803 needed. Both images may be the same, to overwrite the source image.
2804 """
2805 return _core_.Quantize_Quantize(*args, **kwargs)
2806
d55e5bfc
RD
2807#---------------------------------------------------------------------------
2808
2809class EvtHandler(Object):
093d3ff1 2810 """Proxy of C++ EvtHandler class"""
d55e5bfc
RD
2811 def __repr__(self):
2812 return "<%s.%s; proxy of C++ wxEvtHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
2813 def __init__(self, *args, **kwargs):
2814 """__init__(self) -> EvtHandler"""
2815 newobj = _core_.new_EvtHandler(*args, **kwargs)
2816 self.this = newobj.this
2817 self.thisown = 1
2818 del newobj.thisown
2819 def GetNextHandler(*args, **kwargs):
2820 """GetNextHandler(self) -> EvtHandler"""
2821 return _core_.EvtHandler_GetNextHandler(*args, **kwargs)
2822
2823 def GetPreviousHandler(*args, **kwargs):
2824 """GetPreviousHandler(self) -> EvtHandler"""
2825 return _core_.EvtHandler_GetPreviousHandler(*args, **kwargs)
2826
2827 def SetNextHandler(*args, **kwargs):
2828 """SetNextHandler(self, EvtHandler handler)"""
2829 return _core_.EvtHandler_SetNextHandler(*args, **kwargs)
2830
2831 def SetPreviousHandler(*args, **kwargs):
2832 """SetPreviousHandler(self, EvtHandler handler)"""
2833 return _core_.EvtHandler_SetPreviousHandler(*args, **kwargs)
2834
2835 def GetEvtHandlerEnabled(*args, **kwargs):
2836 """GetEvtHandlerEnabled(self) -> bool"""
2837 return _core_.EvtHandler_GetEvtHandlerEnabled(*args, **kwargs)
2838
2839 def SetEvtHandlerEnabled(*args, **kwargs):
2840 """SetEvtHandlerEnabled(self, bool enabled)"""
2841 return _core_.EvtHandler_SetEvtHandlerEnabled(*args, **kwargs)
2842
2843 def ProcessEvent(*args, **kwargs):
2844 """ProcessEvent(self, Event event) -> bool"""
2845 return _core_.EvtHandler_ProcessEvent(*args, **kwargs)
2846
2847 def AddPendingEvent(*args, **kwargs):
2848 """AddPendingEvent(self, Event event)"""
2849 return _core_.EvtHandler_AddPendingEvent(*args, **kwargs)
2850
2851 def ProcessPendingEvents(*args, **kwargs):
2852 """ProcessPendingEvents(self)"""
2853 return _core_.EvtHandler_ProcessPendingEvents(*args, **kwargs)
2854
2855 def Connect(*args, **kwargs):
2856 """Connect(self, int id, int lastId, int eventType, PyObject func)"""
2857 return _core_.EvtHandler_Connect(*args, **kwargs)
2858
2859 def Disconnect(*args, **kwargs):
2860 """Disconnect(self, int id, int lastId=-1, wxEventType eventType=wxEVT_NULL) -> bool"""
2861 return _core_.EvtHandler_Disconnect(*args, **kwargs)
2862
2863 def _setOORInfo(*args, **kwargs):
093d3ff1 2864 """_setOORInfo(self, PyObject _self, bool incref=True)"""
d55e5bfc
RD
2865 return _core_.EvtHandler__setOORInfo(*args, **kwargs)
2866
2867 def Bind(self, event, handler, source=None, id=wx.ID_ANY, id2=wx.ID_ANY):
2868 """
2869 Bind an event to an event handler.
2870
caef1a4d
RD
2871 :param event: One of the EVT_* objects that specifies the
2872 type of event to bind,
d55e5bfc 2873
caef1a4d
RD
2874 :param handler: A callable object to be invoked when the
2875 event is delivered to self. Pass None to
2876 disconnect an event handler.
d55e5bfc 2877
caef1a4d
RD
2878 :param source: Sometimes the event originates from a
2879 different window than self, but you still
2880 want to catch it in self. (For example, a
2881 button event delivered to a frame.) By
2882 passing the source of the event, the event
2883 handling system is able to differentiate
2884 between the same event type from different
2885 controls.
d55e5bfc 2886
caef1a4d
RD
2887 :param id: Used to spcify the event source by ID instead
2888 of instance.
2889
2890 :param id2: Used when it is desirable to bind a handler
2891 to a range of IDs, such as with EVT_MENU_RANGE.
d55e5bfc
RD
2892 """
2893 if source is not None:
2894 id = source.GetId()
2895 event.Bind(self, id, id2, handler)
2896
c24da6d6
RD
2897 def Unbind(self, event, source=None, id=wx.ID_ANY, id2=wx.ID_ANY):
2898 """
2899 Disconencts the event handler binding for event from self.
2900 Returns True if successful.
2901 """
2902 if source is not None:
2903 id = source.GetId()
2904 return event.Unbind(self, id, id2)
d55e5bfc
RD
2905
2906
2907class EvtHandlerPtr(EvtHandler):
2908 def __init__(self, this):
2909 self.this = this
2910 if not hasattr(self,"thisown"): self.thisown = 0
2911 self.__class__ = EvtHandler
2912_core_.EvtHandler_swigregister(EvtHandlerPtr)
2913
2914#---------------------------------------------------------------------------
2915
2916class PyEventBinder(object):
2917 """
2918 Instances of this class are used to bind specific events to event
2919 handlers.
2920 """
2921 def __init__(self, evtType, expectedIDs=0):
2922 if expectedIDs not in [0, 1, 2]:
2923 raise ValueError, "Invalid number of expectedIDs"
2924 self.expectedIDs = expectedIDs
2925
2926 if type(evtType) == list or type(evtType) == tuple:
2927 self.evtType = evtType
2928 else:
2929 self.evtType = [evtType]
2930
2931
2932 def Bind(self, target, id1, id2, function):
2933 """Bind this set of event types to target."""
2934 for et in self.evtType:
2935 target.Connect(id1, id2, et, function)
2936
c24da6d6
RD
2937
2938 def Unbind(self, target, id1, id2):
2939 """Remove an event binding."""
2940 success = 0
2941 for et in self.evtType:
2942 success += target.Disconnect(id1, id2, et)
2943 return success != 0
2944
d55e5bfc
RD
2945
2946 def __call__(self, *args):
2947 """
2948 For backwards compatibility with the old EVT_* functions.
2949 Should be called with either (window, func), (window, ID,
2950 func) or (window, ID1, ID2, func) parameters depending on the
2951 type of the event.
2952 """
2953 assert len(args) == 2 + self.expectedIDs
2954 id1 = wx.ID_ANY
2955 id2 = wx.ID_ANY
2956 target = args[0]
2957 if self.expectedIDs == 0:
2958 func = args[1]
2959 elif self.expectedIDs == 1:
2960 id1 = args[1]
2961 func = args[2]
2962 elif self.expectedIDs == 2:
2963 id1 = args[1]
2964 id2 = args[2]
2965 func = args[3]
2966 else:
2967 raise ValueError, "Unexpected number of IDs"
2968
2969 self.Bind(target, id1, id2, func)
2970
2971
2972# These two are square pegs that don't fit the PyEventBinder hole...
2973def EVT_COMMAND(win, id, cmd, func):
2974 win.Connect(id, -1, cmd, func)
2975def EVT_COMMAND_RANGE(win, id1, id2, cmd, func):
2976 win.Connect(id1, id2, cmd, func)
2977
2978
2979#---------------------------------------------------------------------------
2980
2981#---------------------------------------------------------------------------
2982
2983EVENT_PROPAGATE_NONE = _core_.EVENT_PROPAGATE_NONE
2984EVENT_PROPAGATE_MAX = _core_.EVENT_PROPAGATE_MAX
2985
2986def NewEventType(*args, **kwargs):
2987 """NewEventType() -> wxEventType"""
2988 return _core_.NewEventType(*args, **kwargs)
2989wxEVT_NULL = _core_.wxEVT_NULL
2990wxEVT_FIRST = _core_.wxEVT_FIRST
2991wxEVT_USER_FIRST = _core_.wxEVT_USER_FIRST
2992wxEVT_COMMAND_BUTTON_CLICKED = _core_.wxEVT_COMMAND_BUTTON_CLICKED
2993wxEVT_COMMAND_CHECKBOX_CLICKED = _core_.wxEVT_COMMAND_CHECKBOX_CLICKED
2994wxEVT_COMMAND_CHOICE_SELECTED = _core_.wxEVT_COMMAND_CHOICE_SELECTED
2995wxEVT_COMMAND_LISTBOX_SELECTED = _core_.wxEVT_COMMAND_LISTBOX_SELECTED
2996wxEVT_COMMAND_LISTBOX_DOUBLECLICKED = _core_.wxEVT_COMMAND_LISTBOX_DOUBLECLICKED
2997wxEVT_COMMAND_CHECKLISTBOX_TOGGLED = _core_.wxEVT_COMMAND_CHECKLISTBOX_TOGGLED
2998wxEVT_COMMAND_MENU_SELECTED = _core_.wxEVT_COMMAND_MENU_SELECTED
2999wxEVT_COMMAND_TOOL_CLICKED = _core_.wxEVT_COMMAND_TOOL_CLICKED
3000wxEVT_COMMAND_SLIDER_UPDATED = _core_.wxEVT_COMMAND_SLIDER_UPDATED
3001wxEVT_COMMAND_RADIOBOX_SELECTED = _core_.wxEVT_COMMAND_RADIOBOX_SELECTED
3002wxEVT_COMMAND_RADIOBUTTON_SELECTED = _core_.wxEVT_COMMAND_RADIOBUTTON_SELECTED
3003wxEVT_COMMAND_SCROLLBAR_UPDATED = _core_.wxEVT_COMMAND_SCROLLBAR_UPDATED
3004wxEVT_COMMAND_VLBOX_SELECTED = _core_.wxEVT_COMMAND_VLBOX_SELECTED
3005wxEVT_COMMAND_COMBOBOX_SELECTED = _core_.wxEVT_COMMAND_COMBOBOX_SELECTED
3006wxEVT_COMMAND_TOOL_RCLICKED = _core_.wxEVT_COMMAND_TOOL_RCLICKED
3007wxEVT_COMMAND_TOOL_ENTER = _core_.wxEVT_COMMAND_TOOL_ENTER
3008wxEVT_LEFT_DOWN = _core_.wxEVT_LEFT_DOWN
3009wxEVT_LEFT_UP = _core_.wxEVT_LEFT_UP
3010wxEVT_MIDDLE_DOWN = _core_.wxEVT_MIDDLE_DOWN
3011wxEVT_MIDDLE_UP = _core_.wxEVT_MIDDLE_UP
3012wxEVT_RIGHT_DOWN = _core_.wxEVT_RIGHT_DOWN
3013wxEVT_RIGHT_UP = _core_.wxEVT_RIGHT_UP
3014wxEVT_MOTION = _core_.wxEVT_MOTION
3015wxEVT_ENTER_WINDOW = _core_.wxEVT_ENTER_WINDOW
3016wxEVT_LEAVE_WINDOW = _core_.wxEVT_LEAVE_WINDOW
3017wxEVT_LEFT_DCLICK = _core_.wxEVT_LEFT_DCLICK
3018wxEVT_MIDDLE_DCLICK = _core_.wxEVT_MIDDLE_DCLICK
3019wxEVT_RIGHT_DCLICK = _core_.wxEVT_RIGHT_DCLICK
3020wxEVT_SET_FOCUS = _core_.wxEVT_SET_FOCUS
3021wxEVT_KILL_FOCUS = _core_.wxEVT_KILL_FOCUS
3022wxEVT_CHILD_FOCUS = _core_.wxEVT_CHILD_FOCUS
3023wxEVT_MOUSEWHEEL = _core_.wxEVT_MOUSEWHEEL
3024wxEVT_NC_LEFT_DOWN = _core_.wxEVT_NC_LEFT_DOWN
3025wxEVT_NC_LEFT_UP = _core_.wxEVT_NC_LEFT_UP
3026wxEVT_NC_MIDDLE_DOWN = _core_.wxEVT_NC_MIDDLE_DOWN
3027wxEVT_NC_MIDDLE_UP = _core_.wxEVT_NC_MIDDLE_UP
3028wxEVT_NC_RIGHT_DOWN = _core_.wxEVT_NC_RIGHT_DOWN
3029wxEVT_NC_RIGHT_UP = _core_.wxEVT_NC_RIGHT_UP
3030wxEVT_NC_MOTION = _core_.wxEVT_NC_MOTION
3031wxEVT_NC_ENTER_WINDOW = _core_.wxEVT_NC_ENTER_WINDOW
3032wxEVT_NC_LEAVE_WINDOW = _core_.wxEVT_NC_LEAVE_WINDOW
3033wxEVT_NC_LEFT_DCLICK = _core_.wxEVT_NC_LEFT_DCLICK
3034wxEVT_NC_MIDDLE_DCLICK = _core_.wxEVT_NC_MIDDLE_DCLICK
3035wxEVT_NC_RIGHT_DCLICK = _core_.wxEVT_NC_RIGHT_DCLICK
3036wxEVT_CHAR = _core_.wxEVT_CHAR
3037wxEVT_CHAR_HOOK = _core_.wxEVT_CHAR_HOOK
3038wxEVT_NAVIGATION_KEY = _core_.wxEVT_NAVIGATION_KEY
3039wxEVT_KEY_DOWN = _core_.wxEVT_KEY_DOWN
3040wxEVT_KEY_UP = _core_.wxEVT_KEY_UP
3041wxEVT_HOTKEY = _core_.wxEVT_HOTKEY
3042wxEVT_SET_CURSOR = _core_.wxEVT_SET_CURSOR
3043wxEVT_SCROLL_TOP = _core_.wxEVT_SCROLL_TOP
3044wxEVT_SCROLL_BOTTOM = _core_.wxEVT_SCROLL_BOTTOM
3045wxEVT_SCROLL_LINEUP = _core_.wxEVT_SCROLL_LINEUP
3046wxEVT_SCROLL_LINEDOWN = _core_.wxEVT_SCROLL_LINEDOWN
3047wxEVT_SCROLL_PAGEUP = _core_.wxEVT_SCROLL_PAGEUP
3048wxEVT_SCROLL_PAGEDOWN = _core_.wxEVT_SCROLL_PAGEDOWN
3049wxEVT_SCROLL_THUMBTRACK = _core_.wxEVT_SCROLL_THUMBTRACK
3050wxEVT_SCROLL_THUMBRELEASE = _core_.wxEVT_SCROLL_THUMBRELEASE
3051wxEVT_SCROLL_ENDSCROLL = _core_.wxEVT_SCROLL_ENDSCROLL
3052wxEVT_SCROLLWIN_TOP = _core_.wxEVT_SCROLLWIN_TOP
3053wxEVT_SCROLLWIN_BOTTOM = _core_.wxEVT_SCROLLWIN_BOTTOM
3054wxEVT_SCROLLWIN_LINEUP = _core_.wxEVT_SCROLLWIN_LINEUP
3055wxEVT_SCROLLWIN_LINEDOWN = _core_.wxEVT_SCROLLWIN_LINEDOWN
3056wxEVT_SCROLLWIN_PAGEUP = _core_.wxEVT_SCROLLWIN_PAGEUP
3057wxEVT_SCROLLWIN_PAGEDOWN = _core_.wxEVT_SCROLLWIN_PAGEDOWN
3058wxEVT_SCROLLWIN_THUMBTRACK = _core_.wxEVT_SCROLLWIN_THUMBTRACK
3059wxEVT_SCROLLWIN_THUMBRELEASE = _core_.wxEVT_SCROLLWIN_THUMBRELEASE
3060wxEVT_SIZE = _core_.wxEVT_SIZE
3061wxEVT_MOVE = _core_.wxEVT_MOVE
3062wxEVT_CLOSE_WINDOW = _core_.wxEVT_CLOSE_WINDOW
3063wxEVT_END_SESSION = _core_.wxEVT_END_SESSION
3064wxEVT_QUERY_END_SESSION = _core_.wxEVT_QUERY_END_SESSION
3065wxEVT_ACTIVATE_APP = _core_.wxEVT_ACTIVATE_APP
3066wxEVT_POWER = _core_.wxEVT_POWER
3067wxEVT_ACTIVATE = _core_.wxEVT_ACTIVATE
3068wxEVT_CREATE = _core_.wxEVT_CREATE
3069wxEVT_DESTROY = _core_.wxEVT_DESTROY
3070wxEVT_SHOW = _core_.wxEVT_SHOW
3071wxEVT_ICONIZE = _core_.wxEVT_ICONIZE
3072wxEVT_MAXIMIZE = _core_.wxEVT_MAXIMIZE
3073wxEVT_MOUSE_CAPTURE_CHANGED = _core_.wxEVT_MOUSE_CAPTURE_CHANGED
3074wxEVT_PAINT = _core_.wxEVT_PAINT
3075wxEVT_ERASE_BACKGROUND = _core_.wxEVT_ERASE_BACKGROUND
3076wxEVT_NC_PAINT = _core_.wxEVT_NC_PAINT
3077wxEVT_PAINT_ICON = _core_.wxEVT_PAINT_ICON
3078wxEVT_MENU_OPEN = _core_.wxEVT_MENU_OPEN
3079wxEVT_MENU_CLOSE = _core_.wxEVT_MENU_CLOSE
3080wxEVT_MENU_HIGHLIGHT = _core_.wxEVT_MENU_HIGHLIGHT
3081wxEVT_CONTEXT_MENU = _core_.wxEVT_CONTEXT_MENU
3082wxEVT_SYS_COLOUR_CHANGED = _core_.wxEVT_SYS_COLOUR_CHANGED
3083wxEVT_DISPLAY_CHANGED = _core_.wxEVT_DISPLAY_CHANGED
3084wxEVT_SETTING_CHANGED = _core_.wxEVT_SETTING_CHANGED
3085wxEVT_QUERY_NEW_PALETTE = _core_.wxEVT_QUERY_NEW_PALETTE
3086wxEVT_PALETTE_CHANGED = _core_.wxEVT_PALETTE_CHANGED
3087wxEVT_DROP_FILES = _core_.wxEVT_DROP_FILES
3088wxEVT_DRAW_ITEM = _core_.wxEVT_DRAW_ITEM
3089wxEVT_MEASURE_ITEM = _core_.wxEVT_MEASURE_ITEM
3090wxEVT_COMPARE_ITEM = _core_.wxEVT_COMPARE_ITEM
3091wxEVT_INIT_DIALOG = _core_.wxEVT_INIT_DIALOG
3092wxEVT_IDLE = _core_.wxEVT_IDLE
3093wxEVT_UPDATE_UI = _core_.wxEVT_UPDATE_UI
3094wxEVT_SIZING = _core_.wxEVT_SIZING
3095wxEVT_MOVING = _core_.wxEVT_MOVING
3096wxEVT_COMMAND_LEFT_CLICK = _core_.wxEVT_COMMAND_LEFT_CLICK
3097wxEVT_COMMAND_LEFT_DCLICK = _core_.wxEVT_COMMAND_LEFT_DCLICK
3098wxEVT_COMMAND_RIGHT_CLICK = _core_.wxEVT_COMMAND_RIGHT_CLICK
3099wxEVT_COMMAND_RIGHT_DCLICK = _core_.wxEVT_COMMAND_RIGHT_DCLICK
3100wxEVT_COMMAND_SET_FOCUS = _core_.wxEVT_COMMAND_SET_FOCUS
3101wxEVT_COMMAND_KILL_FOCUS = _core_.wxEVT_COMMAND_KILL_FOCUS
3102wxEVT_COMMAND_ENTER = _core_.wxEVT_COMMAND_ENTER
3103#
3104# Create some event binders
3105EVT_SIZE = wx.PyEventBinder( wxEVT_SIZE )
3106EVT_SIZING = wx.PyEventBinder( wxEVT_SIZING )
3107EVT_MOVE = wx.PyEventBinder( wxEVT_MOVE )
3108EVT_MOVING = wx.PyEventBinder( wxEVT_MOVING )
3109EVT_CLOSE = wx.PyEventBinder( wxEVT_CLOSE_WINDOW )
3110EVT_END_SESSION = wx.PyEventBinder( wxEVT_END_SESSION )
3111EVT_QUERY_END_SESSION = wx.PyEventBinder( wxEVT_QUERY_END_SESSION )
3112EVT_PAINT = wx.PyEventBinder( wxEVT_PAINT )
3113EVT_NC_PAINT = wx.PyEventBinder( wxEVT_NC_PAINT )
3114EVT_ERASE_BACKGROUND = wx.PyEventBinder( wxEVT_ERASE_BACKGROUND )
3115EVT_CHAR = wx.PyEventBinder( wxEVT_CHAR )
3116EVT_KEY_DOWN = wx.PyEventBinder( wxEVT_KEY_DOWN )
3117EVT_KEY_UP = wx.PyEventBinder( wxEVT_KEY_UP )
3118EVT_HOTKEY = wx.PyEventBinder( wxEVT_HOTKEY, 1)
3119EVT_CHAR_HOOK = wx.PyEventBinder( wxEVT_CHAR_HOOK )
3120EVT_MENU_OPEN = wx.PyEventBinder( wxEVT_MENU_OPEN )
3121EVT_MENU_CLOSE = wx.PyEventBinder( wxEVT_MENU_CLOSE )
3122EVT_MENU_HIGHLIGHT = wx.PyEventBinder( wxEVT_MENU_HIGHLIGHT, 1)
3123EVT_MENU_HIGHLIGHT_ALL = wx.PyEventBinder( wxEVT_MENU_HIGHLIGHT )
3124EVT_SET_FOCUS = wx.PyEventBinder( wxEVT_SET_FOCUS )
3125EVT_KILL_FOCUS = wx.PyEventBinder( wxEVT_KILL_FOCUS )
3126EVT_CHILD_FOCUS = wx.PyEventBinder( wxEVT_CHILD_FOCUS )
3127EVT_ACTIVATE = wx.PyEventBinder( wxEVT_ACTIVATE )
3128EVT_ACTIVATE_APP = wx.PyEventBinder( wxEVT_ACTIVATE_APP )
3129EVT_END_SESSION = wx.PyEventBinder( wxEVT_END_SESSION )
3130EVT_QUERY_END_SESSION = wx.PyEventBinder( wxEVT_QUERY_END_SESSION )
3131EVT_DROP_FILES = wx.PyEventBinder( wxEVT_DROP_FILES )
3132EVT_INIT_DIALOG = wx.PyEventBinder( wxEVT_INIT_DIALOG )
3133EVT_SYS_COLOUR_CHANGED = wx.PyEventBinder( wxEVT_SYS_COLOUR_CHANGED )
3134EVT_DISPLAY_CHANGED = wx.PyEventBinder( wxEVT_DISPLAY_CHANGED )
3135EVT_SHOW = wx.PyEventBinder( wxEVT_SHOW )
3136EVT_MAXIMIZE = wx.PyEventBinder( wxEVT_MAXIMIZE )
3137EVT_ICONIZE = wx.PyEventBinder( wxEVT_ICONIZE )
3138EVT_NAVIGATION_KEY = wx.PyEventBinder( wxEVT_NAVIGATION_KEY )
3139EVT_PALETTE_CHANGED = wx.PyEventBinder( wxEVT_PALETTE_CHANGED )
3140EVT_QUERY_NEW_PALETTE = wx.PyEventBinder( wxEVT_QUERY_NEW_PALETTE )
3141EVT_WINDOW_CREATE = wx.PyEventBinder( wxEVT_CREATE )
3142EVT_WINDOW_DESTROY = wx.PyEventBinder( wxEVT_DESTROY )
3143EVT_SET_CURSOR = wx.PyEventBinder( wxEVT_SET_CURSOR )
3144EVT_MOUSE_CAPTURE_CHANGED = wx.PyEventBinder( wxEVT_MOUSE_CAPTURE_CHANGED )
3145
3146EVT_LEFT_DOWN = wx.PyEventBinder( wxEVT_LEFT_DOWN )
3147EVT_LEFT_UP = wx.PyEventBinder( wxEVT_LEFT_UP )
3148EVT_MIDDLE_DOWN = wx.PyEventBinder( wxEVT_MIDDLE_DOWN )
3149EVT_MIDDLE_UP = wx.PyEventBinder( wxEVT_MIDDLE_UP )
3150EVT_RIGHT_DOWN = wx.PyEventBinder( wxEVT_RIGHT_DOWN )
3151EVT_RIGHT_UP = wx.PyEventBinder( wxEVT_RIGHT_UP )
3152EVT_MOTION = wx.PyEventBinder( wxEVT_MOTION )
3153EVT_LEFT_DCLICK = wx.PyEventBinder( wxEVT_LEFT_DCLICK )
3154EVT_MIDDLE_DCLICK = wx.PyEventBinder( wxEVT_MIDDLE_DCLICK )
3155EVT_RIGHT_DCLICK = wx.PyEventBinder( wxEVT_RIGHT_DCLICK )
3156EVT_LEAVE_WINDOW = wx.PyEventBinder( wxEVT_LEAVE_WINDOW )
3157EVT_ENTER_WINDOW = wx.PyEventBinder( wxEVT_ENTER_WINDOW )
3158EVT_MOUSEWHEEL = wx.PyEventBinder( wxEVT_MOUSEWHEEL )
3159
3160EVT_MOUSE_EVENTS = wx.PyEventBinder([ wxEVT_LEFT_DOWN,
3161 wxEVT_LEFT_UP,
3162 wxEVT_MIDDLE_DOWN,
3163 wxEVT_MIDDLE_UP,
3164 wxEVT_RIGHT_DOWN,
3165 wxEVT_RIGHT_UP,
3166 wxEVT_MOTION,
3167 wxEVT_LEFT_DCLICK,
3168 wxEVT_MIDDLE_DCLICK,
3169 wxEVT_RIGHT_DCLICK,
3170 wxEVT_ENTER_WINDOW,
3171 wxEVT_LEAVE_WINDOW,
3172 wxEVT_MOUSEWHEEL
3173 ])
3174
3175
3176# Scrolling from wxWindow (sent to wxScrolledWindow)
3177EVT_SCROLLWIN = wx.PyEventBinder([ wxEVT_SCROLLWIN_TOP,
3178 wxEVT_SCROLLWIN_BOTTOM,
3179 wxEVT_SCROLLWIN_LINEUP,
3180 wxEVT_SCROLLWIN_LINEDOWN,
3181 wxEVT_SCROLLWIN_PAGEUP,
3182 wxEVT_SCROLLWIN_PAGEDOWN,
3183 wxEVT_SCROLLWIN_THUMBTRACK,
3184 wxEVT_SCROLLWIN_THUMBRELEASE,
3185 ])
3186
3187EVT_SCROLLWIN_TOP = wx.PyEventBinder( wxEVT_SCROLLWIN_TOP )
3188EVT_SCROLLWIN_BOTTOM = wx.PyEventBinder( wxEVT_SCROLLWIN_BOTTOM )
3189EVT_SCROLLWIN_LINEUP = wx.PyEventBinder( wxEVT_SCROLLWIN_LINEUP )
3190EVT_SCROLLWIN_LINEDOWN = wx.PyEventBinder( wxEVT_SCROLLWIN_LINEDOWN )
3191EVT_SCROLLWIN_PAGEUP = wx.PyEventBinder( wxEVT_SCROLLWIN_PAGEUP )
3192EVT_SCROLLWIN_PAGEDOWN = wx.PyEventBinder( wxEVT_SCROLLWIN_PAGEDOWN )
3193EVT_SCROLLWIN_THUMBTRACK = wx.PyEventBinder( wxEVT_SCROLLWIN_THUMBTRACK )
3194EVT_SCROLLWIN_THUMBRELEASE = wx.PyEventBinder( wxEVT_SCROLLWIN_THUMBRELEASE )
3195
3196# Scrolling from wxSlider and wxScrollBar
3197EVT_SCROLL = wx.PyEventBinder([ wxEVT_SCROLL_TOP,
3198 wxEVT_SCROLL_BOTTOM,
3199 wxEVT_SCROLL_LINEUP,
3200 wxEVT_SCROLL_LINEDOWN,
3201 wxEVT_SCROLL_PAGEUP,
3202 wxEVT_SCROLL_PAGEDOWN,
3203 wxEVT_SCROLL_THUMBTRACK,
3204 wxEVT_SCROLL_THUMBRELEASE,
3205 wxEVT_SCROLL_ENDSCROLL,
3206 ])
3207
3208EVT_SCROLL_TOP = wx.PyEventBinder( wxEVT_SCROLL_TOP )
3209EVT_SCROLL_BOTTOM = wx.PyEventBinder( wxEVT_SCROLL_BOTTOM )
3210EVT_SCROLL_LINEUP = wx.PyEventBinder( wxEVT_SCROLL_LINEUP )
3211EVT_SCROLL_LINEDOWN = wx.PyEventBinder( wxEVT_SCROLL_LINEDOWN )
3212EVT_SCROLL_PAGEUP = wx.PyEventBinder( wxEVT_SCROLL_PAGEUP )
3213EVT_SCROLL_PAGEDOWN = wx.PyEventBinder( wxEVT_SCROLL_PAGEDOWN )
3214EVT_SCROLL_THUMBTRACK = wx.PyEventBinder( wxEVT_SCROLL_THUMBTRACK )
3215EVT_SCROLL_THUMBRELEASE = wx.PyEventBinder( wxEVT_SCROLL_THUMBRELEASE )
3216EVT_SCROLL_ENDSCROLL = wx.PyEventBinder( wxEVT_SCROLL_ENDSCROLL )
3217
3218# Scrolling from wxSlider and wxScrollBar, with an id
3219EVT_COMMAND_SCROLL = wx.PyEventBinder([ wxEVT_SCROLL_TOP,
3220 wxEVT_SCROLL_BOTTOM,
3221 wxEVT_SCROLL_LINEUP,
3222 wxEVT_SCROLL_LINEDOWN,
3223 wxEVT_SCROLL_PAGEUP,
3224 wxEVT_SCROLL_PAGEDOWN,
3225 wxEVT_SCROLL_THUMBTRACK,
3226 wxEVT_SCROLL_THUMBRELEASE,
3227 wxEVT_SCROLL_ENDSCROLL,
3228 ], 1)
3229
3230EVT_COMMAND_SCROLL_TOP = wx.PyEventBinder( wxEVT_SCROLL_TOP, 1)
3231EVT_COMMAND_SCROLL_BOTTOM = wx.PyEventBinder( wxEVT_SCROLL_BOTTOM, 1)
3232EVT_COMMAND_SCROLL_LINEUP = wx.PyEventBinder( wxEVT_SCROLL_LINEUP, 1)
3233EVT_COMMAND_SCROLL_LINEDOWN = wx.PyEventBinder( wxEVT_SCROLL_LINEDOWN, 1)
3234EVT_COMMAND_SCROLL_PAGEUP = wx.PyEventBinder( wxEVT_SCROLL_PAGEUP, 1)
3235EVT_COMMAND_SCROLL_PAGEDOWN = wx.PyEventBinder( wxEVT_SCROLL_PAGEDOWN, 1)
3236EVT_COMMAND_SCROLL_THUMBTRACK = wx.PyEventBinder( wxEVT_SCROLL_THUMBTRACK, 1)
3237EVT_COMMAND_SCROLL_THUMBRELEASE = wx.PyEventBinder( wxEVT_SCROLL_THUMBRELEASE, 1)
3238EVT_COMMAND_SCROLL_ENDSCROLL = wx.PyEventBinder( wxEVT_SCROLL_ENDSCROLL, 1)
3239
3240EVT_BUTTON = wx.PyEventBinder( wxEVT_COMMAND_BUTTON_CLICKED, 1)
3241EVT_CHECKBOX = wx.PyEventBinder( wxEVT_COMMAND_CHECKBOX_CLICKED, 1)
3242EVT_CHOICE = wx.PyEventBinder( wxEVT_COMMAND_CHOICE_SELECTED, 1)
3243EVT_LISTBOX = wx.PyEventBinder( wxEVT_COMMAND_LISTBOX_SELECTED, 1)
3244EVT_LISTBOX_DCLICK = wx.PyEventBinder( wxEVT_COMMAND_LISTBOX_DOUBLECLICKED, 1)
3245EVT_MENU = wx.PyEventBinder( wxEVT_COMMAND_MENU_SELECTED, 1)
3246EVT_MENU_RANGE = wx.PyEventBinder( wxEVT_COMMAND_MENU_SELECTED, 2)
3247EVT_SLIDER = wx.PyEventBinder( wxEVT_COMMAND_SLIDER_UPDATED, 1)
3248EVT_RADIOBOX = wx.PyEventBinder( wxEVT_COMMAND_RADIOBOX_SELECTED, 1)
3249EVT_RADIOBUTTON = wx.PyEventBinder( wxEVT_COMMAND_RADIOBUTTON_SELECTED, 1)
3250
3251EVT_SCROLLBAR = wx.PyEventBinder( wxEVT_COMMAND_SCROLLBAR_UPDATED, 1)
3252EVT_VLBOX = wx.PyEventBinder( wxEVT_COMMAND_VLBOX_SELECTED, 1)
3253EVT_COMBOBOX = wx.PyEventBinder( wxEVT_COMMAND_COMBOBOX_SELECTED, 1)
3254EVT_TOOL = wx.PyEventBinder( wxEVT_COMMAND_TOOL_CLICKED, 1)
3255EVT_TOOL_RANGE = wx.PyEventBinder( wxEVT_COMMAND_TOOL_CLICKED, 2)
3256EVT_TOOL_RCLICKED = wx.PyEventBinder( wxEVT_COMMAND_TOOL_RCLICKED, 1)
3257EVT_TOOL_RCLICKED_RANGE = wx.PyEventBinder( wxEVT_COMMAND_TOOL_RCLICKED, 2)
3258EVT_TOOL_ENTER = wx.PyEventBinder( wxEVT_COMMAND_TOOL_ENTER, 1)
3259EVT_CHECKLISTBOX = wx.PyEventBinder( wxEVT_COMMAND_CHECKLISTBOX_TOGGLED, 1)
3260
3261
3262EVT_COMMAND_LEFT_CLICK = wx.PyEventBinder( wxEVT_COMMAND_LEFT_CLICK, 1)
3263EVT_COMMAND_LEFT_DCLICK = wx.PyEventBinder( wxEVT_COMMAND_LEFT_DCLICK, 1)
3264EVT_COMMAND_RIGHT_CLICK = wx.PyEventBinder( wxEVT_COMMAND_RIGHT_CLICK, 1)
3265EVT_COMMAND_RIGHT_DCLICK = wx.PyEventBinder( wxEVT_COMMAND_RIGHT_DCLICK, 1)
3266EVT_COMMAND_SET_FOCUS = wx.PyEventBinder( wxEVT_COMMAND_SET_FOCUS, 1)
3267EVT_COMMAND_KILL_FOCUS = wx.PyEventBinder( wxEVT_COMMAND_KILL_FOCUS, 1)
3268EVT_COMMAND_ENTER = wx.PyEventBinder( wxEVT_COMMAND_ENTER, 1)
3269
3270EVT_IDLE = wx.PyEventBinder( wxEVT_IDLE )
3271
3272EVT_UPDATE_UI = wx.PyEventBinder( wxEVT_UPDATE_UI, 1)
3273EVT_UPDATE_UI_RANGE = wx.PyEventBinder( wxEVT_UPDATE_UI, 2)
3274
3275EVT_CONTEXT_MENU = wx.PyEventBinder( wxEVT_CONTEXT_MENU )
3276
3277
3278
3279#---------------------------------------------------------------------------
3280
3281class Event(Object):
093d3ff1 3282 """Proxy of C++ Event class"""
d55e5bfc
RD
3283 def __init__(self): raise RuntimeError, "No constructor defined"
3284 def __repr__(self):
3285 return "<%s.%s; proxy of C++ wxEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
3286 def __del__(self, destroy=_core_.delete_Event):
3287 """__del__(self)"""
3288 try:
3289 if self.thisown: destroy(self)
3290 except: pass
3291
3292 def SetEventType(*args, **kwargs):
3293 """SetEventType(self, wxEventType typ)"""
3294 return _core_.Event_SetEventType(*args, **kwargs)
3295
3296 def GetEventType(*args, **kwargs):
3297 """GetEventType(self) -> wxEventType"""
3298 return _core_.Event_GetEventType(*args, **kwargs)
3299
3300 def GetEventObject(*args, **kwargs):
3301 """GetEventObject(self) -> Object"""
3302 return _core_.Event_GetEventObject(*args, **kwargs)
3303
3304 def SetEventObject(*args, **kwargs):
3305 """SetEventObject(self, Object obj)"""
3306 return _core_.Event_SetEventObject(*args, **kwargs)
3307
3308 def GetTimestamp(*args, **kwargs):
3309 """GetTimestamp(self) -> long"""
3310 return _core_.Event_GetTimestamp(*args, **kwargs)
3311
3312 def SetTimestamp(*args, **kwargs):
3313 """SetTimestamp(self, long ts=0)"""
3314 return _core_.Event_SetTimestamp(*args, **kwargs)
3315
3316 def GetId(*args, **kwargs):
3317 """GetId(self) -> int"""
3318 return _core_.Event_GetId(*args, **kwargs)
3319
3320 def SetId(*args, **kwargs):
3321 """SetId(self, int Id)"""
3322 return _core_.Event_SetId(*args, **kwargs)
3323
3324 def IsCommandEvent(*args, **kwargs):
3325 """IsCommandEvent(self) -> bool"""
3326 return _core_.Event_IsCommandEvent(*args, **kwargs)
3327
3328 def Skip(*args, **kwargs):
51b83b37
RD
3329 """
3330 Skip(self, bool skip=True)
3331
3332 Called by an event handler, it controls whether additional event
3333 handlers bound to this event will be called after the current event
3334 handler returns. Skip(false) (the default setting) will prevent
3335 additional event handlers from being called and control will be
3336 returned to the sender of the event immediately after the current
3337 handler has finished. Skip(True) will cause the event processing
3338 system to continue searching for a handler function for this event.
3339
3340 """
d55e5bfc
RD
3341 return _core_.Event_Skip(*args, **kwargs)
3342
3343 def GetSkipped(*args, **kwargs):
3344 """GetSkipped(self) -> bool"""
3345 return _core_.Event_GetSkipped(*args, **kwargs)
3346
3347 def ShouldPropagate(*args, **kwargs):
3348 """ShouldPropagate(self) -> bool"""
3349 return _core_.Event_ShouldPropagate(*args, **kwargs)
3350
3351 def StopPropagation(*args, **kwargs):
3352 """StopPropagation(self) -> int"""
3353 return _core_.Event_StopPropagation(*args, **kwargs)
3354
3355 def ResumePropagation(*args, **kwargs):
3356 """ResumePropagation(self, int propagationLevel)"""
3357 return _core_.Event_ResumePropagation(*args, **kwargs)
3358
3359 def Clone(*args, **kwargs):
3360 """Clone(self) -> Event"""
3361 return _core_.Event_Clone(*args, **kwargs)
3362
3363
3364class EventPtr(Event):
3365 def __init__(self, this):
3366 self.this = this
3367 if not hasattr(self,"thisown"): self.thisown = 0
3368 self.__class__ = Event
3369_core_.Event_swigregister(EventPtr)
3370
3371#---------------------------------------------------------------------------
3372
3373class PropagationDisabler(object):
093d3ff1 3374 """Proxy of C++ PropagationDisabler class"""
d55e5bfc
RD
3375 def __repr__(self):
3376 return "<%s.%s; proxy of C++ wxPropagationDisabler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
3377 def __init__(self, *args, **kwargs):
3378 """__init__(self, Event event) -> PropagationDisabler"""
3379 newobj = _core_.new_PropagationDisabler(*args, **kwargs)
3380 self.this = newobj.this
3381 self.thisown = 1
3382 del newobj.thisown
3383 def __del__(self, destroy=_core_.delete_PropagationDisabler):
3384 """__del__(self)"""
3385 try:
3386 if self.thisown: destroy(self)
3387 except: pass
3388
3389
3390class PropagationDisablerPtr(PropagationDisabler):
3391 def __init__(self, this):
3392 self.this = this
3393 if not hasattr(self,"thisown"): self.thisown = 0
3394 self.__class__ = PropagationDisabler
3395_core_.PropagationDisabler_swigregister(PropagationDisablerPtr)
3396
3397class PropagateOnce(object):
093d3ff1 3398 """Proxy of C++ PropagateOnce class"""
d55e5bfc
RD
3399 def __repr__(self):
3400 return "<%s.%s; proxy of C++ wxPropagateOnce instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
3401 def __init__(self, *args, **kwargs):
3402 """__init__(self, Event event) -> PropagateOnce"""
3403 newobj = _core_.new_PropagateOnce(*args, **kwargs)
3404 self.this = newobj.this
3405 self.thisown = 1
3406 del newobj.thisown
3407 def __del__(self, destroy=_core_.delete_PropagateOnce):
3408 """__del__(self)"""
3409 try:
3410 if self.thisown: destroy(self)
3411 except: pass
3412
3413
3414class PropagateOncePtr(PropagateOnce):
3415 def __init__(self, this):
3416 self.this = this
3417 if not hasattr(self,"thisown"): self.thisown = 0
3418 self.__class__ = PropagateOnce
3419_core_.PropagateOnce_swigregister(PropagateOncePtr)
3420
3421#---------------------------------------------------------------------------
3422
3423class CommandEvent(Event):
093d3ff1 3424 """Proxy of C++ CommandEvent class"""
d55e5bfc
RD
3425 def __repr__(self):
3426 return "<%s.%s; proxy of C++ wxCommandEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
3427 def __init__(self, *args, **kwargs):
3428 """__init__(self, wxEventType commandType=wxEVT_NULL, int winid=0) -> CommandEvent"""
3429 newobj = _core_.new_CommandEvent(*args, **kwargs)
3430 self.this = newobj.this
3431 self.thisown = 1
3432 del newobj.thisown
3433 def GetSelection(*args, **kwargs):
3434 """GetSelection(self) -> int"""
3435 return _core_.CommandEvent_GetSelection(*args, **kwargs)
3436
3437 def SetString(*args, **kwargs):
3438 """SetString(self, String s)"""
3439 return _core_.CommandEvent_SetString(*args, **kwargs)
3440
3441 def GetString(*args, **kwargs):
3442 """GetString(self) -> String"""
3443 return _core_.CommandEvent_GetString(*args, **kwargs)
3444
3445 def IsChecked(*args, **kwargs):
3446 """IsChecked(self) -> bool"""
3447 return _core_.CommandEvent_IsChecked(*args, **kwargs)
3448
3449 Checked = IsChecked
3450 def IsSelection(*args, **kwargs):
3451 """IsSelection(self) -> bool"""
3452 return _core_.CommandEvent_IsSelection(*args, **kwargs)
3453
3454 def SetExtraLong(*args, **kwargs):
3455 """SetExtraLong(self, long extraLong)"""
3456 return _core_.CommandEvent_SetExtraLong(*args, **kwargs)
3457
3458 def GetExtraLong(*args, **kwargs):
3459 """GetExtraLong(self) -> long"""
3460 return _core_.CommandEvent_GetExtraLong(*args, **kwargs)
3461
3462 def SetInt(*args, **kwargs):
3463 """SetInt(self, int i)"""
3464 return _core_.CommandEvent_SetInt(*args, **kwargs)
3465
3466 def GetInt(*args, **kwargs):
3467 """GetInt(self) -> long"""
3468 return _core_.CommandEvent_GetInt(*args, **kwargs)
3469
3470 def Clone(*args, **kwargs):
3471 """Clone(self) -> Event"""
3472 return _core_.CommandEvent_Clone(*args, **kwargs)
3473
3474
3475class CommandEventPtr(CommandEvent):
3476 def __init__(self, this):
3477 self.this = this
3478 if not hasattr(self,"thisown"): self.thisown = 0
3479 self.__class__ = CommandEvent
3480_core_.CommandEvent_swigregister(CommandEventPtr)
3481
3482#---------------------------------------------------------------------------
3483
3484class NotifyEvent(CommandEvent):
093d3ff1 3485 """Proxy of C++ NotifyEvent class"""
d55e5bfc
RD
3486 def __repr__(self):
3487 return "<%s.%s; proxy of C++ wxNotifyEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
3488 def __init__(self, *args, **kwargs):
3489 """__init__(self, wxEventType commandType=wxEVT_NULL, int winid=0) -> NotifyEvent"""
3490 newobj = _core_.new_NotifyEvent(*args, **kwargs)
3491 self.this = newobj.this
3492 self.thisown = 1
3493 del newobj.thisown
3494 def Veto(*args, **kwargs):
3495 """Veto(self)"""
3496 return _core_.NotifyEvent_Veto(*args, **kwargs)
3497
3498 def Allow(*args, **kwargs):
3499 """Allow(self)"""
3500 return _core_.NotifyEvent_Allow(*args, **kwargs)
3501
3502 def IsAllowed(*args, **kwargs):
3503 """IsAllowed(self) -> bool"""
3504 return _core_.NotifyEvent_IsAllowed(*args, **kwargs)
3505
3506
3507class NotifyEventPtr(NotifyEvent):
3508 def __init__(self, this):
3509 self.this = this
3510 if not hasattr(self,"thisown"): self.thisown = 0
3511 self.__class__ = NotifyEvent
3512_core_.NotifyEvent_swigregister(NotifyEventPtr)
3513
3514#---------------------------------------------------------------------------
3515
3516class ScrollEvent(CommandEvent):
093d3ff1 3517 """Proxy of C++ ScrollEvent class"""
d55e5bfc
RD
3518 def __repr__(self):
3519 return "<%s.%s; proxy of C++ wxScrollEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
3520 def __init__(self, *args, **kwargs):
3521 """
3522 __init__(self, wxEventType commandType=wxEVT_NULL, int winid=0, int pos=0,
3523 int orient=0) -> ScrollEvent
3524 """
3525 newobj = _core_.new_ScrollEvent(*args, **kwargs)
3526 self.this = newobj.this
3527 self.thisown = 1
3528 del newobj.thisown
3529 def GetOrientation(*args, **kwargs):
3530 """GetOrientation(self) -> int"""
3531 return _core_.ScrollEvent_GetOrientation(*args, **kwargs)
3532
3533 def GetPosition(*args, **kwargs):
3534 """GetPosition(self) -> int"""
3535 return _core_.ScrollEvent_GetPosition(*args, **kwargs)
3536
3537 def SetOrientation(*args, **kwargs):
3538 """SetOrientation(self, int orient)"""
3539 return _core_.ScrollEvent_SetOrientation(*args, **kwargs)
3540
3541 def SetPosition(*args, **kwargs):
3542 """SetPosition(self, int pos)"""
3543 return _core_.ScrollEvent_SetPosition(*args, **kwargs)
3544
3545
3546class ScrollEventPtr(ScrollEvent):
3547 def __init__(self, this):
3548 self.this = this
3549 if not hasattr(self,"thisown"): self.thisown = 0
3550 self.__class__ = ScrollEvent
3551_core_.ScrollEvent_swigregister(ScrollEventPtr)
3552
3553#---------------------------------------------------------------------------
3554
3555class ScrollWinEvent(Event):
093d3ff1 3556 """Proxy of C++ ScrollWinEvent class"""
d55e5bfc
RD
3557 def __repr__(self):
3558 return "<%s.%s; proxy of C++ wxScrollWinEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
3559 def __init__(self, *args, **kwargs):
3560 """__init__(self, wxEventType commandType=wxEVT_NULL, int pos=0, int orient=0) -> ScrollWinEvent"""
3561 newobj = _core_.new_ScrollWinEvent(*args, **kwargs)
3562 self.this = newobj.this
3563 self.thisown = 1
3564 del newobj.thisown
3565 def GetOrientation(*args, **kwargs):
3566 """GetOrientation(self) -> int"""
3567 return _core_.ScrollWinEvent_GetOrientation(*args, **kwargs)
3568
3569 def GetPosition(*args, **kwargs):
3570 """GetPosition(self) -> int"""
3571 return _core_.ScrollWinEvent_GetPosition(*args, **kwargs)
3572
3573 def SetOrientation(*args, **kwargs):
3574 """SetOrientation(self, int orient)"""
3575 return _core_.ScrollWinEvent_SetOrientation(*args, **kwargs)
3576
3577 def SetPosition(*args, **kwargs):
3578 """SetPosition(self, int pos)"""
3579 return _core_.ScrollWinEvent_SetPosition(*args, **kwargs)
3580
3581
3582class ScrollWinEventPtr(ScrollWinEvent):
3583 def __init__(self, this):
3584 self.this = this
3585 if not hasattr(self,"thisown"): self.thisown = 0
3586 self.__class__ = ScrollWinEvent
3587_core_.ScrollWinEvent_swigregister(ScrollWinEventPtr)
3588
3589#---------------------------------------------------------------------------
3590
3591MOUSE_BTN_ANY = _core_.MOUSE_BTN_ANY
3592MOUSE_BTN_NONE = _core_.MOUSE_BTN_NONE
3593MOUSE_BTN_LEFT = _core_.MOUSE_BTN_LEFT
3594MOUSE_BTN_MIDDLE = _core_.MOUSE_BTN_MIDDLE
3595MOUSE_BTN_RIGHT = _core_.MOUSE_BTN_RIGHT
3596class MouseEvent(Event):
093d3ff1 3597 """Proxy of C++ MouseEvent class"""
d55e5bfc
RD
3598 def __repr__(self):
3599 return "<%s.%s; proxy of C++ wxMouseEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
3600 def __init__(self, *args, **kwargs):
3601 """__init__(self, wxEventType mouseType=wxEVT_NULL) -> MouseEvent"""
3602 newobj = _core_.new_MouseEvent(*args, **kwargs)
3603 self.this = newobj.this
3604 self.thisown = 1
3605 del newobj.thisown
3606 def IsButton(*args, **kwargs):
3607 """IsButton(self) -> bool"""
3608 return _core_.MouseEvent_IsButton(*args, **kwargs)
3609
3610 def ButtonDown(*args, **kwargs):
3611 """ButtonDown(self, int but=MOUSE_BTN_ANY) -> bool"""
3612 return _core_.MouseEvent_ButtonDown(*args, **kwargs)
3613
3614 def ButtonDClick(*args, **kwargs):
3615 """ButtonDClick(self, int but=MOUSE_BTN_ANY) -> bool"""
3616 return _core_.MouseEvent_ButtonDClick(*args, **kwargs)
3617
3618 def ButtonUp(*args, **kwargs):
3619 """ButtonUp(self, int but=MOUSE_BTN_ANY) -> bool"""
3620 return _core_.MouseEvent_ButtonUp(*args, **kwargs)
3621
3622 def Button(*args, **kwargs):
3623 """Button(self, int but) -> bool"""
3624 return _core_.MouseEvent_Button(*args, **kwargs)
3625
3626 def ButtonIsDown(*args, **kwargs):
3627 """ButtonIsDown(self, int but) -> bool"""
3628 return _core_.MouseEvent_ButtonIsDown(*args, **kwargs)
3629
3630 def GetButton(*args, **kwargs):
3631 """GetButton(self) -> int"""
3632 return _core_.MouseEvent_GetButton(*args, **kwargs)
3633
3634 def ControlDown(*args, **kwargs):
3635 """ControlDown(self) -> bool"""
3636 return _core_.MouseEvent_ControlDown(*args, **kwargs)
3637
3638 def MetaDown(*args, **kwargs):
3639 """MetaDown(self) -> bool"""
3640 return _core_.MouseEvent_MetaDown(*args, **kwargs)
3641
3642 def AltDown(*args, **kwargs):
3643 """AltDown(self) -> bool"""
3644 return _core_.MouseEvent_AltDown(*args, **kwargs)
3645
3646 def ShiftDown(*args, **kwargs):
3647 """ShiftDown(self) -> bool"""
3648 return _core_.MouseEvent_ShiftDown(*args, **kwargs)
3649
412d302d
RD
3650 def CmdDown(*args, **kwargs):
3651 """
3652 CmdDown(self) -> bool
3653
3654 "Cmd" is a pseudo key which is the same as Control for PC and Unix
3655 platforms but the special "Apple" (a.k.a as "Command") key on
3656 Macs: it makes often sense to use it instead of, say, `ControlDown`
3657 because Cmd key is used for the same thing under Mac as Ctrl
3658 elsewhere. The Ctrl still exists, it's just not used for this
3659 purpose. So for non-Mac platforms this is the same as `ControlDown`
3660 and Macs this is the same as `MetaDown`.
3661 """
3662 return _core_.MouseEvent_CmdDown(*args, **kwargs)
3663
d55e5bfc
RD
3664 def LeftDown(*args, **kwargs):
3665 """LeftDown(self) -> bool"""
3666 return _core_.MouseEvent_LeftDown(*args, **kwargs)
3667
3668 def MiddleDown(*args, **kwargs):
3669 """MiddleDown(self) -> bool"""
3670 return _core_.MouseEvent_MiddleDown(*args, **kwargs)
3671
3672 def RightDown(*args, **kwargs):
3673 """RightDown(self) -> bool"""
3674 return _core_.MouseEvent_RightDown(*args, **kwargs)
3675
3676 def LeftUp(*args, **kwargs):
3677 """LeftUp(self) -> bool"""
3678 return _core_.MouseEvent_LeftUp(*args, **kwargs)
3679
3680 def MiddleUp(*args, **kwargs):
3681 """MiddleUp(self) -> bool"""
3682 return _core_.MouseEvent_MiddleUp(*args, **kwargs)
3683
3684 def RightUp(*args, **kwargs):
3685 """RightUp(self) -> bool"""
3686 return _core_.MouseEvent_RightUp(*args, **kwargs)
3687
3688 def LeftDClick(*args, **kwargs):
3689 """LeftDClick(self) -> bool"""
3690 return _core_.MouseEvent_LeftDClick(*args, **kwargs)
3691
3692 def MiddleDClick(*args, **kwargs):
3693 """MiddleDClick(self) -> bool"""
3694 return _core_.MouseEvent_MiddleDClick(*args, **kwargs)
3695
3696 def RightDClick(*args, **kwargs):
3697 """RightDClick(self) -> bool"""
3698 return _core_.MouseEvent_RightDClick(*args, **kwargs)
3699
3700 def LeftIsDown(*args, **kwargs):
3701 """LeftIsDown(self) -> bool"""
3702 return _core_.MouseEvent_LeftIsDown(*args, **kwargs)
3703
3704 def MiddleIsDown(*args, **kwargs):
3705 """MiddleIsDown(self) -> bool"""
3706 return _core_.MouseEvent_MiddleIsDown(*args, **kwargs)
3707
3708 def RightIsDown(*args, **kwargs):
3709 """RightIsDown(self) -> bool"""
3710 return _core_.MouseEvent_RightIsDown(*args, **kwargs)
3711
3712 def Dragging(*args, **kwargs):
3713 """Dragging(self) -> bool"""
3714 return _core_.MouseEvent_Dragging(*args, **kwargs)
3715
3716 def Moving(*args, **kwargs):
3717 """Moving(self) -> bool"""
3718 return _core_.MouseEvent_Moving(*args, **kwargs)
3719
3720 def Entering(*args, **kwargs):
3721 """Entering(self) -> bool"""
3722 return _core_.MouseEvent_Entering(*args, **kwargs)
3723
3724 def Leaving(*args, **kwargs):
3725 """Leaving(self) -> bool"""
3726 return _core_.MouseEvent_Leaving(*args, **kwargs)
3727
3728 def GetPosition(*args, **kwargs):
3729 """
3730 GetPosition(self) -> Point
3731
79fccf9d
RD
3732 Returns the position of the mouse in window coordinates when the event
3733 happened.
d55e5bfc
RD
3734 """
3735 return _core_.MouseEvent_GetPosition(*args, **kwargs)
3736
3737 def GetPositionTuple(*args, **kwargs):
3738 """
3739 GetPositionTuple() -> (x,y)
3740
79fccf9d
RD
3741 Returns the position of the mouse in window coordinates when the event
3742 happened.
d55e5bfc
RD
3743 """
3744 return _core_.MouseEvent_GetPositionTuple(*args, **kwargs)
3745
3746 def GetLogicalPosition(*args, **kwargs):
3747 """GetLogicalPosition(self, DC dc) -> Point"""
3748 return _core_.MouseEvent_GetLogicalPosition(*args, **kwargs)
3749
3750 def GetX(*args, **kwargs):
3751 """GetX(self) -> int"""
3752 return _core_.MouseEvent_GetX(*args, **kwargs)
3753
3754 def GetY(*args, **kwargs):
3755 """GetY(self) -> int"""
3756 return _core_.MouseEvent_GetY(*args, **kwargs)
3757
3758 def GetWheelRotation(*args, **kwargs):
3759 """GetWheelRotation(self) -> int"""
3760 return _core_.MouseEvent_GetWheelRotation(*args, **kwargs)
3761
3762 def GetWheelDelta(*args, **kwargs):
3763 """GetWheelDelta(self) -> int"""
3764 return _core_.MouseEvent_GetWheelDelta(*args, **kwargs)
3765
3766 def GetLinesPerAction(*args, **kwargs):
3767 """GetLinesPerAction(self) -> int"""
3768 return _core_.MouseEvent_GetLinesPerAction(*args, **kwargs)
3769
3770 def IsPageScroll(*args, **kwargs):
3771 """IsPageScroll(self) -> bool"""
3772 return _core_.MouseEvent_IsPageScroll(*args, **kwargs)
3773
3774 m_x = property(_core_.MouseEvent_m_x_get, _core_.MouseEvent_m_x_set)
3775 m_y = property(_core_.MouseEvent_m_y_get, _core_.MouseEvent_m_y_set)
3776 m_leftDown = property(_core_.MouseEvent_m_leftDown_get, _core_.MouseEvent_m_leftDown_set)
3777 m_middleDown = property(_core_.MouseEvent_m_middleDown_get, _core_.MouseEvent_m_middleDown_set)
3778 m_rightDown = property(_core_.MouseEvent_m_rightDown_get, _core_.MouseEvent_m_rightDown_set)
3779 m_controlDown = property(_core_.MouseEvent_m_controlDown_get, _core_.MouseEvent_m_controlDown_set)
3780 m_shiftDown = property(_core_.MouseEvent_m_shiftDown_get, _core_.MouseEvent_m_shiftDown_set)
3781 m_altDown = property(_core_.MouseEvent_m_altDown_get, _core_.MouseEvent_m_altDown_set)
3782 m_metaDown = property(_core_.MouseEvent_m_metaDown_get, _core_.MouseEvent_m_metaDown_set)
3783 m_wheelRotation = property(_core_.MouseEvent_m_wheelRotation_get, _core_.MouseEvent_m_wheelRotation_set)
3784 m_wheelDelta = property(_core_.MouseEvent_m_wheelDelta_get, _core_.MouseEvent_m_wheelDelta_set)
3785 m_linesPerAction = property(_core_.MouseEvent_m_linesPerAction_get, _core_.MouseEvent_m_linesPerAction_set)
3786
3787class MouseEventPtr(MouseEvent):
3788 def __init__(self, this):
3789 self.this = this
3790 if not hasattr(self,"thisown"): self.thisown = 0
3791 self.__class__ = MouseEvent
3792_core_.MouseEvent_swigregister(MouseEventPtr)
3793
3794#---------------------------------------------------------------------------
3795
3796class SetCursorEvent(Event):
093d3ff1 3797 """Proxy of C++ SetCursorEvent class"""
d55e5bfc
RD
3798 def __repr__(self):
3799 return "<%s.%s; proxy of C++ wxSetCursorEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
3800 def __init__(self, *args, **kwargs):
3801 """__init__(self, int x=0, int y=0) -> SetCursorEvent"""
3802 newobj = _core_.new_SetCursorEvent(*args, **kwargs)
3803 self.this = newobj.this
3804 self.thisown = 1
3805 del newobj.thisown
3806 def GetX(*args, **kwargs):
3807 """GetX(self) -> int"""
3808 return _core_.SetCursorEvent_GetX(*args, **kwargs)
3809
3810 def GetY(*args, **kwargs):
3811 """GetY(self) -> int"""
3812 return _core_.SetCursorEvent_GetY(*args, **kwargs)
3813
3814 def SetCursor(*args, **kwargs):
3815 """SetCursor(self, Cursor cursor)"""
3816 return _core_.SetCursorEvent_SetCursor(*args, **kwargs)
3817
3818 def GetCursor(*args, **kwargs):
3819 """GetCursor(self) -> Cursor"""
3820 return _core_.SetCursorEvent_GetCursor(*args, **kwargs)
3821
3822 def HasCursor(*args, **kwargs):
3823 """HasCursor(self) -> bool"""
3824 return _core_.SetCursorEvent_HasCursor(*args, **kwargs)
3825
3826
3827class SetCursorEventPtr(SetCursorEvent):
3828 def __init__(self, this):
3829 self.this = this
3830 if not hasattr(self,"thisown"): self.thisown = 0
3831 self.__class__ = SetCursorEvent
3832_core_.SetCursorEvent_swigregister(SetCursorEventPtr)
3833
3834#---------------------------------------------------------------------------
3835
3836class KeyEvent(Event):
093d3ff1 3837 """Proxy of C++ KeyEvent class"""
d55e5bfc
RD
3838 def __repr__(self):
3839 return "<%s.%s; proxy of C++ wxKeyEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
3840 def __init__(self, *args, **kwargs):
3841 """__init__(self, wxEventType keyType=wxEVT_NULL) -> KeyEvent"""
3842 newobj = _core_.new_KeyEvent(*args, **kwargs)
3843 self.this = newobj.this
3844 self.thisown = 1
3845 del newobj.thisown
3846 def ControlDown(*args, **kwargs):
3847 """ControlDown(self) -> bool"""
3848 return _core_.KeyEvent_ControlDown(*args, **kwargs)
3849
3850 def MetaDown(*args, **kwargs):
3851 """MetaDown(self) -> bool"""
3852 return _core_.KeyEvent_MetaDown(*args, **kwargs)
3853
3854 def AltDown(*args, **kwargs):
3855 """AltDown(self) -> bool"""
3856 return _core_.KeyEvent_AltDown(*args, **kwargs)
3857
3858 def ShiftDown(*args, **kwargs):
3859 """ShiftDown(self) -> bool"""
3860 return _core_.KeyEvent_ShiftDown(*args, **kwargs)
3861
412d302d
RD
3862 def CmdDown(*args, **kwargs):
3863 """
3864 CmdDown(self) -> bool
3865
3866 "Cmd" is a pseudo key which is the same as Control for PC and Unix
3867 platforms but the special "Apple" (a.k.a as "Command") key on
3868 Macs: it makes often sense to use it instead of, say, `ControlDown`
3869 because Cmd key is used for the same thing under Mac as Ctrl
3870 elsewhere. The Ctrl still exists, it's just not used for this
3871 purpose. So for non-Mac platforms this is the same as `ControlDown`
3872 and Macs this is the same as `MetaDown`.
3873 """
3874 return _core_.KeyEvent_CmdDown(*args, **kwargs)
3875
d55e5bfc
RD
3876 def HasModifiers(*args, **kwargs):
3877 """HasModifiers(self) -> bool"""
3878 return _core_.KeyEvent_HasModifiers(*args, **kwargs)
3879
3880 def GetKeyCode(*args, **kwargs):
3881 """GetKeyCode(self) -> int"""
3882 return _core_.KeyEvent_GetKeyCode(*args, **kwargs)
3883
3884 KeyCode = GetKeyCode
19272049
RD
3885 def GetUnicodeKey(*args, **kwargs):
3886 """GetUnicodeKey(self) -> int"""
3887 return _core_.KeyEvent_GetUnicodeKey(*args, **kwargs)
d55e5bfc 3888
19272049 3889 GetUniChar = GetUnicodeKey
d55e5bfc
RD
3890 def GetRawKeyCode(*args, **kwargs):
3891 """GetRawKeyCode(self) -> unsigned int"""
3892 return _core_.KeyEvent_GetRawKeyCode(*args, **kwargs)
3893
3894 def GetRawKeyFlags(*args, **kwargs):
3895 """GetRawKeyFlags(self) -> unsigned int"""
3896 return _core_.KeyEvent_GetRawKeyFlags(*args, **kwargs)
3897
3898 def GetPosition(*args, **kwargs):
3899 """
3900 GetPosition(self) -> Point
3901
3902 Find the position of the event.
3903 """
3904 return _core_.KeyEvent_GetPosition(*args, **kwargs)
3905
3906 def GetPositionTuple(*args, **kwargs):
3907 """
3908 GetPositionTuple() -> (x,y)
3909
3910 Find the position of the event.
3911 """
3912 return _core_.KeyEvent_GetPositionTuple(*args, **kwargs)
3913
3914 def GetX(*args, **kwargs):
3915 """GetX(self) -> int"""
3916 return _core_.KeyEvent_GetX(*args, **kwargs)
3917
3918 def GetY(*args, **kwargs):
3919 """GetY(self) -> int"""
3920 return _core_.KeyEvent_GetY(*args, **kwargs)
3921
3922 m_x = property(_core_.KeyEvent_m_x_get, _core_.KeyEvent_m_x_set)
3923 m_y = property(_core_.KeyEvent_m_y_get, _core_.KeyEvent_m_y_set)
3924 m_keyCode = property(_core_.KeyEvent_m_keyCode_get, _core_.KeyEvent_m_keyCode_set)
3925 m_controlDown = property(_core_.KeyEvent_m_controlDown_get, _core_.KeyEvent_m_controlDown_set)
3926 m_shiftDown = property(_core_.KeyEvent_m_shiftDown_get, _core_.KeyEvent_m_shiftDown_set)
3927 m_altDown = property(_core_.KeyEvent_m_altDown_get, _core_.KeyEvent_m_altDown_set)
3928 m_metaDown = property(_core_.KeyEvent_m_metaDown_get, _core_.KeyEvent_m_metaDown_set)
3929 m_scanCode = property(_core_.KeyEvent_m_scanCode_get, _core_.KeyEvent_m_scanCode_set)
3930 m_rawCode = property(_core_.KeyEvent_m_rawCode_get, _core_.KeyEvent_m_rawCode_set)
3931 m_rawFlags = property(_core_.KeyEvent_m_rawFlags_get, _core_.KeyEvent_m_rawFlags_set)
3932
3933class KeyEventPtr(KeyEvent):
3934 def __init__(self, this):
3935 self.this = this
3936 if not hasattr(self,"thisown"): self.thisown = 0
3937 self.__class__ = KeyEvent
3938_core_.KeyEvent_swigregister(KeyEventPtr)
3939
3940#---------------------------------------------------------------------------
3941
3942class SizeEvent(Event):
093d3ff1 3943 """Proxy of C++ SizeEvent class"""
d55e5bfc
RD
3944 def __repr__(self):
3945 return "<%s.%s; proxy of C++ wxSizeEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
3946 def __init__(self, *args, **kwargs):
3947 """__init__(self, Size sz=DefaultSize, int winid=0) -> SizeEvent"""
3948 newobj = _core_.new_SizeEvent(*args, **kwargs)
3949 self.this = newobj.this
3950 self.thisown = 1
3951 del newobj.thisown
3952 def GetSize(*args, **kwargs):
3953 """GetSize(self) -> Size"""
3954 return _core_.SizeEvent_GetSize(*args, **kwargs)
3955
3956 def GetRect(*args, **kwargs):
3957 """GetRect(self) -> Rect"""
3958 return _core_.SizeEvent_GetRect(*args, **kwargs)
3959
3960 def SetRect(*args, **kwargs):
3961 """SetRect(self, Rect rect)"""
3962 return _core_.SizeEvent_SetRect(*args, **kwargs)
3963
3964 def SetSize(*args, **kwargs):
3965 """SetSize(self, Size size)"""
3966 return _core_.SizeEvent_SetSize(*args, **kwargs)
3967
3968 m_size = property(_core_.SizeEvent_m_size_get, _core_.SizeEvent_m_size_set)
3969 m_rect = property(_core_.SizeEvent_m_rect_get, _core_.SizeEvent_m_rect_set)
3970
3971class SizeEventPtr(SizeEvent):
3972 def __init__(self, this):
3973 self.this = this
3974 if not hasattr(self,"thisown"): self.thisown = 0
3975 self.__class__ = SizeEvent
3976_core_.SizeEvent_swigregister(SizeEventPtr)
3977
3978#---------------------------------------------------------------------------
3979
3980class MoveEvent(Event):
093d3ff1 3981 """Proxy of C++ MoveEvent class"""
d55e5bfc
RD
3982 def __repr__(self):
3983 return "<%s.%s; proxy of C++ wxMoveEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
3984 def __init__(self, *args, **kwargs):
3985 """__init__(self, Point pos=DefaultPosition, int winid=0) -> MoveEvent"""
3986 newobj = _core_.new_MoveEvent(*args, **kwargs)
3987 self.this = newobj.this
3988 self.thisown = 1
3989 del newobj.thisown
3990 def GetPosition(*args, **kwargs):
3991 """GetPosition(self) -> Point"""
3992 return _core_.MoveEvent_GetPosition(*args, **kwargs)
3993
3994 def GetRect(*args, **kwargs):
3995 """GetRect(self) -> Rect"""
3996 return _core_.MoveEvent_GetRect(*args, **kwargs)
3997
3998 def SetRect(*args, **kwargs):
3999 """SetRect(self, Rect rect)"""
4000 return _core_.MoveEvent_SetRect(*args, **kwargs)
4001
4002 def SetPosition(*args, **kwargs):
4003 """SetPosition(self, Point pos)"""
4004 return _core_.MoveEvent_SetPosition(*args, **kwargs)
4005
fef4c27a
RD
4006 m_pos = property(GetPosition, SetPosition)
4007 m_rect = property(GetRect, SetRect)
4008
d55e5bfc
RD
4009
4010class MoveEventPtr(MoveEvent):
4011 def __init__(self, this):
4012 self.this = this
4013 if not hasattr(self,"thisown"): self.thisown = 0
4014 self.__class__ = MoveEvent
4015_core_.MoveEvent_swigregister(MoveEventPtr)
4016
4017#---------------------------------------------------------------------------
4018
4019class PaintEvent(Event):
093d3ff1 4020 """Proxy of C++ PaintEvent class"""
d55e5bfc
RD
4021 def __repr__(self):
4022 return "<%s.%s; proxy of C++ wxPaintEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
4023 def __init__(self, *args, **kwargs):
4024 """__init__(self, int Id=0) -> PaintEvent"""
4025 newobj = _core_.new_PaintEvent(*args, **kwargs)
4026 self.this = newobj.this
4027 self.thisown = 1
4028 del newobj.thisown
4029
4030class PaintEventPtr(PaintEvent):
4031 def __init__(self, this):
4032 self.this = this
4033 if not hasattr(self,"thisown"): self.thisown = 0
4034 self.__class__ = PaintEvent
4035_core_.PaintEvent_swigregister(PaintEventPtr)
4036
4037class NcPaintEvent(Event):
093d3ff1 4038 """Proxy of C++ NcPaintEvent class"""
d55e5bfc
RD
4039 def __repr__(self):
4040 return "<%s.%s; proxy of C++ wxNcPaintEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
4041 def __init__(self, *args, **kwargs):
4042 """__init__(self, int winid=0) -> NcPaintEvent"""
4043 newobj = _core_.new_NcPaintEvent(*args, **kwargs)
4044 self.this = newobj.this
4045 self.thisown = 1
4046 del newobj.thisown
4047
4048class NcPaintEventPtr(NcPaintEvent):
4049 def __init__(self, this):
4050 self.this = this
4051 if not hasattr(self,"thisown"): self.thisown = 0
4052 self.__class__ = NcPaintEvent
4053_core_.NcPaintEvent_swigregister(NcPaintEventPtr)
4054
4055#---------------------------------------------------------------------------
4056
4057class EraseEvent(Event):
093d3ff1 4058 """Proxy of C++ EraseEvent class"""
d55e5bfc
RD
4059 def __repr__(self):
4060 return "<%s.%s; proxy of C++ wxEraseEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
4061 def __init__(self, *args, **kwargs):
4062 """__init__(self, int Id=0, DC dc=(wxDC *) NULL) -> EraseEvent"""
4063 newobj = _core_.new_EraseEvent(*args, **kwargs)
4064 self.this = newobj.this
4065 self.thisown = 1
4066 del newobj.thisown
4067 def GetDC(*args, **kwargs):
4068 """GetDC(self) -> DC"""
4069 return _core_.EraseEvent_GetDC(*args, **kwargs)
4070
4071
4072class EraseEventPtr(EraseEvent):
4073 def __init__(self, this):
4074 self.this = this
4075 if not hasattr(self,"thisown"): self.thisown = 0
4076 self.__class__ = EraseEvent
4077_core_.EraseEvent_swigregister(EraseEventPtr)
4078
4079#---------------------------------------------------------------------------
4080
4081class FocusEvent(Event):
093d3ff1 4082 """Proxy of C++ FocusEvent class"""
d55e5bfc
RD
4083 def __repr__(self):
4084 return "<%s.%s; proxy of C++ wxFocusEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
4085 def __init__(self, *args, **kwargs):
4086 """__init__(self, wxEventType type=wxEVT_NULL, int winid=0) -> FocusEvent"""
4087 newobj = _core_.new_FocusEvent(*args, **kwargs)
4088 self.this = newobj.this
4089 self.thisown = 1
4090 del newobj.thisown
4091 def GetWindow(*args, **kwargs):
4092 """GetWindow(self) -> Window"""
4093 return _core_.FocusEvent_GetWindow(*args, **kwargs)
4094
4095 def SetWindow(*args, **kwargs):
4096 """SetWindow(self, Window win)"""
4097 return _core_.FocusEvent_SetWindow(*args, **kwargs)
4098
4099
4100class FocusEventPtr(FocusEvent):
4101 def __init__(self, this):
4102 self.this = this
4103 if not hasattr(self,"thisown"): self.thisown = 0
4104 self.__class__ = FocusEvent
4105_core_.FocusEvent_swigregister(FocusEventPtr)
4106
4107#---------------------------------------------------------------------------
4108
4109class ChildFocusEvent(CommandEvent):
093d3ff1 4110 """Proxy of C++ ChildFocusEvent class"""
d55e5bfc
RD
4111 def __repr__(self):
4112 return "<%s.%s; proxy of C++ wxChildFocusEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
4113 def __init__(self, *args, **kwargs):
4114 """__init__(self, Window win=None) -> ChildFocusEvent"""
4115 newobj = _core_.new_ChildFocusEvent(*args, **kwargs)
4116 self.this = newobj.this
4117 self.thisown = 1
4118 del newobj.thisown
4119 def GetWindow(*args, **kwargs):
4120 """GetWindow(self) -> Window"""
4121 return _core_.ChildFocusEvent_GetWindow(*args, **kwargs)
4122
4123
4124class ChildFocusEventPtr(ChildFocusEvent):
4125 def __init__(self, this):
4126 self.this = this
4127 if not hasattr(self,"thisown"): self.thisown = 0
4128 self.__class__ = ChildFocusEvent
4129_core_.ChildFocusEvent_swigregister(ChildFocusEventPtr)
4130
4131#---------------------------------------------------------------------------
4132
4133class ActivateEvent(Event):
093d3ff1 4134 """Proxy of C++ ActivateEvent class"""
d55e5bfc
RD
4135 def __repr__(self):
4136 return "<%s.%s; proxy of C++ wxActivateEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
4137 def __init__(self, *args, **kwargs):
4138 """__init__(self, wxEventType type=wxEVT_NULL, bool active=True, int Id=0) -> ActivateEvent"""
4139 newobj = _core_.new_ActivateEvent(*args, **kwargs)
4140 self.this = newobj.this
4141 self.thisown = 1
4142 del newobj.thisown
4143 def GetActive(*args, **kwargs):
4144 """GetActive(self) -> bool"""
4145 return _core_.ActivateEvent_GetActive(*args, **kwargs)
4146
4147
4148class ActivateEventPtr(ActivateEvent):
4149 def __init__(self, this):
4150 self.this = this
4151 if not hasattr(self,"thisown"): self.thisown = 0
4152 self.__class__ = ActivateEvent
4153_core_.ActivateEvent_swigregister(ActivateEventPtr)
4154
4155#---------------------------------------------------------------------------
4156
4157class InitDialogEvent(Event):
093d3ff1 4158 """Proxy of C++ InitDialogEvent class"""
d55e5bfc
RD
4159 def __repr__(self):
4160 return "<%s.%s; proxy of C++ wxInitDialogEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
4161 def __init__(self, *args, **kwargs):
4162 """__init__(self, int Id=0) -> InitDialogEvent"""
4163 newobj = _core_.new_InitDialogEvent(*args, **kwargs)
4164 self.this = newobj.this
4165 self.thisown = 1
4166 del newobj.thisown
4167
4168class InitDialogEventPtr(InitDialogEvent):
4169 def __init__(self, this):
4170 self.this = this
4171 if not hasattr(self,"thisown"): self.thisown = 0
4172 self.__class__ = InitDialogEvent
4173_core_.InitDialogEvent_swigregister(InitDialogEventPtr)
4174
4175#---------------------------------------------------------------------------
4176
4177class MenuEvent(Event):
093d3ff1 4178 """Proxy of C++ MenuEvent class"""
d55e5bfc
RD
4179 def __repr__(self):
4180 return "<%s.%s; proxy of C++ wxMenuEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
4181 def __init__(self, *args, **kwargs):
4182 """__init__(self, wxEventType type=wxEVT_NULL, int winid=0, Menu menu=None) -> MenuEvent"""
4183 newobj = _core_.new_MenuEvent(*args, **kwargs)
4184 self.this = newobj.this
4185 self.thisown = 1
4186 del newobj.thisown
4187 def GetMenuId(*args, **kwargs):
4188 """GetMenuId(self) -> int"""
4189 return _core_.MenuEvent_GetMenuId(*args, **kwargs)
4190
4191 def IsPopup(*args, **kwargs):
4192 """IsPopup(self) -> bool"""
4193 return _core_.MenuEvent_IsPopup(*args, **kwargs)
4194
4195 def GetMenu(*args, **kwargs):
4196 """GetMenu(self) -> Menu"""
4197 return _core_.MenuEvent_GetMenu(*args, **kwargs)
4198
4199
4200class MenuEventPtr(MenuEvent):
4201 def __init__(self, this):
4202 self.this = this
4203 if not hasattr(self,"thisown"): self.thisown = 0
4204 self.__class__ = MenuEvent
4205_core_.MenuEvent_swigregister(MenuEventPtr)
4206
4207#---------------------------------------------------------------------------
4208
4209class CloseEvent(Event):
093d3ff1 4210 """Proxy of C++ CloseEvent class"""
d55e5bfc
RD
4211 def __repr__(self):
4212 return "<%s.%s; proxy of C++ wxCloseEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
4213 def __init__(self, *args, **kwargs):
4214 """__init__(self, wxEventType type=wxEVT_NULL, int winid=0) -> CloseEvent"""
4215 newobj = _core_.new_CloseEvent(*args, **kwargs)
4216 self.this = newobj.this
4217 self.thisown = 1
4218 del newobj.thisown
4219 def SetLoggingOff(*args, **kwargs):
4220 """SetLoggingOff(self, bool logOff)"""
4221 return _core_.CloseEvent_SetLoggingOff(*args, **kwargs)
4222
4223 def GetLoggingOff(*args, **kwargs):
4224 """GetLoggingOff(self) -> bool"""
4225 return _core_.CloseEvent_GetLoggingOff(*args, **kwargs)
4226
4227 def Veto(*args, **kwargs):
4228 """Veto(self, bool veto=True)"""
4229 return _core_.CloseEvent_Veto(*args, **kwargs)
4230
4231 def SetCanVeto(*args, **kwargs):
4232 """SetCanVeto(self, bool canVeto)"""
4233 return _core_.CloseEvent_SetCanVeto(*args, **kwargs)
4234
4235 def CanVeto(*args, **kwargs):
4236 """CanVeto(self) -> bool"""
4237 return _core_.CloseEvent_CanVeto(*args, **kwargs)
4238
4239 def GetVeto(*args, **kwargs):
4240 """GetVeto(self) -> bool"""
4241 return _core_.CloseEvent_GetVeto(*args, **kwargs)
4242
4243
4244class CloseEventPtr(CloseEvent):
4245 def __init__(self, this):
4246 self.this = this
4247 if not hasattr(self,"thisown"): self.thisown = 0
4248 self.__class__ = CloseEvent
4249_core_.CloseEvent_swigregister(CloseEventPtr)
4250
4251#---------------------------------------------------------------------------
4252
4253class ShowEvent(Event):
093d3ff1 4254 """Proxy of C++ ShowEvent class"""
d55e5bfc
RD
4255 def __repr__(self):
4256 return "<%s.%s; proxy of C++ wxShowEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
4257 def __init__(self, *args, **kwargs):
4258 """__init__(self, int winid=0, bool show=False) -> ShowEvent"""
4259 newobj = _core_.new_ShowEvent(*args, **kwargs)
4260 self.this = newobj.this
4261 self.thisown = 1
4262 del newobj.thisown
4263 def SetShow(*args, **kwargs):
4264 """SetShow(self, bool show)"""
4265 return _core_.ShowEvent_SetShow(*args, **kwargs)
4266
4267 def GetShow(*args, **kwargs):
4268 """GetShow(self) -> bool"""
4269 return _core_.ShowEvent_GetShow(*args, **kwargs)
4270
4271
4272class ShowEventPtr(ShowEvent):
4273 def __init__(self, this):
4274 self.this = this
4275 if not hasattr(self,"thisown"): self.thisown = 0
4276 self.__class__ = ShowEvent
4277_core_.ShowEvent_swigregister(ShowEventPtr)
4278
4279#---------------------------------------------------------------------------
4280
4281class IconizeEvent(Event):
093d3ff1 4282 """Proxy of C++ IconizeEvent class"""
d55e5bfc
RD
4283 def __repr__(self):
4284 return "<%s.%s; proxy of C++ wxIconizeEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
4285 def __init__(self, *args, **kwargs):
4286 """__init__(self, int id=0, bool iconized=True) -> IconizeEvent"""
4287 newobj = _core_.new_IconizeEvent(*args, **kwargs)
4288 self.this = newobj.this
4289 self.thisown = 1
4290 del newobj.thisown
4291 def Iconized(*args, **kwargs):
4292 """Iconized(self) -> bool"""
4293 return _core_.IconizeEvent_Iconized(*args, **kwargs)
4294
4295
4296class IconizeEventPtr(IconizeEvent):
4297 def __init__(self, this):
4298 self.this = this
4299 if not hasattr(self,"thisown"): self.thisown = 0
4300 self.__class__ = IconizeEvent
4301_core_.IconizeEvent_swigregister(IconizeEventPtr)
4302
4303#---------------------------------------------------------------------------
4304
4305class MaximizeEvent(Event):
093d3ff1 4306 """Proxy of C++ MaximizeEvent class"""
d55e5bfc
RD
4307 def __repr__(self):
4308 return "<%s.%s; proxy of C++ wxMaximizeEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
4309 def __init__(self, *args, **kwargs):
4310 """__init__(self, int id=0) -> MaximizeEvent"""
4311 newobj = _core_.new_MaximizeEvent(*args, **kwargs)
4312 self.this = newobj.this
4313 self.thisown = 1
4314 del newobj.thisown
4315
4316class MaximizeEventPtr(MaximizeEvent):
4317 def __init__(self, this):
4318 self.this = this
4319 if not hasattr(self,"thisown"): self.thisown = 0
4320 self.__class__ = MaximizeEvent
4321_core_.MaximizeEvent_swigregister(MaximizeEventPtr)
4322
4323#---------------------------------------------------------------------------
4324
4325class DropFilesEvent(Event):
093d3ff1 4326 """Proxy of C++ DropFilesEvent class"""
d55e5bfc
RD
4327 def __init__(self): raise RuntimeError, "No constructor defined"
4328 def __repr__(self):
4329 return "<%s.%s; proxy of C++ wxDropFilesEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
4330 def GetPosition(*args, **kwargs):
4331 """GetPosition(self) -> Point"""
4332 return _core_.DropFilesEvent_GetPosition(*args, **kwargs)
4333
4334 def GetNumberOfFiles(*args, **kwargs):
4335 """GetNumberOfFiles(self) -> int"""
4336 return _core_.DropFilesEvent_GetNumberOfFiles(*args, **kwargs)
4337
4338 def GetFiles(*args, **kwargs):
4339 """GetFiles(self) -> PyObject"""
4340 return _core_.DropFilesEvent_GetFiles(*args, **kwargs)
4341
4342
4343class DropFilesEventPtr(DropFilesEvent):
4344 def __init__(self, this):
4345 self.this = this
4346 if not hasattr(self,"thisown"): self.thisown = 0
4347 self.__class__ = DropFilesEvent
4348_core_.DropFilesEvent_swigregister(DropFilesEventPtr)
4349
4350#---------------------------------------------------------------------------
4351
4352UPDATE_UI_PROCESS_ALL = _core_.UPDATE_UI_PROCESS_ALL
4353UPDATE_UI_PROCESS_SPECIFIED = _core_.UPDATE_UI_PROCESS_SPECIFIED
4354class UpdateUIEvent(CommandEvent):
093d3ff1 4355 """Proxy of C++ UpdateUIEvent class"""
d55e5bfc
RD
4356 def __repr__(self):
4357 return "<%s.%s; proxy of C++ wxUpdateUIEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
4358 def __init__(self, *args, **kwargs):
4359 """__init__(self, int commandId=0) -> UpdateUIEvent"""
4360 newobj = _core_.new_UpdateUIEvent(*args, **kwargs)
4361 self.this = newobj.this
4362 self.thisown = 1
4363 del newobj.thisown
4364 def GetChecked(*args, **kwargs):
4365 """GetChecked(self) -> bool"""
4366 return _core_.UpdateUIEvent_GetChecked(*args, **kwargs)
4367
4368 def GetEnabled(*args, **kwargs):
4369 """GetEnabled(self) -> bool"""
4370 return _core_.UpdateUIEvent_GetEnabled(*args, **kwargs)
4371
4372 def GetText(*args, **kwargs):
4373 """GetText(self) -> String"""
4374 return _core_.UpdateUIEvent_GetText(*args, **kwargs)
4375
4376 def GetSetText(*args, **kwargs):
4377 """GetSetText(self) -> bool"""
4378 return _core_.UpdateUIEvent_GetSetText(*args, **kwargs)
4379
4380 def GetSetChecked(*args, **kwargs):
4381 """GetSetChecked(self) -> bool"""
4382 return _core_.UpdateUIEvent_GetSetChecked(*args, **kwargs)
4383
4384 def GetSetEnabled(*args, **kwargs):
4385 """GetSetEnabled(self) -> bool"""
4386 return _core_.UpdateUIEvent_GetSetEnabled(*args, **kwargs)
4387
4388 def Check(*args, **kwargs):
4389 """Check(self, bool check)"""
4390 return _core_.UpdateUIEvent_Check(*args, **kwargs)
4391
4392 def Enable(*args, **kwargs):
4393 """Enable(self, bool enable)"""
4394 return _core_.UpdateUIEvent_Enable(*args, **kwargs)
4395
4396 def SetText(*args, **kwargs):
4397 """SetText(self, String text)"""
4398 return _core_.UpdateUIEvent_SetText(*args, **kwargs)
4399
4400 def SetUpdateInterval(*args, **kwargs):
c24da6d6 4401 """SetUpdateInterval(long updateInterval)"""
d55e5bfc
RD
4402 return _core_.UpdateUIEvent_SetUpdateInterval(*args, **kwargs)
4403
4404 SetUpdateInterval = staticmethod(SetUpdateInterval)
4405 def GetUpdateInterval(*args, **kwargs):
c24da6d6 4406 """GetUpdateInterval() -> long"""
d55e5bfc
RD
4407 return _core_.UpdateUIEvent_GetUpdateInterval(*args, **kwargs)
4408
4409 GetUpdateInterval = staticmethod(GetUpdateInterval)
4410 def CanUpdate(*args, **kwargs):
c24da6d6 4411 """CanUpdate(Window win) -> bool"""
d55e5bfc
RD
4412 return _core_.UpdateUIEvent_CanUpdate(*args, **kwargs)
4413
4414 CanUpdate = staticmethod(CanUpdate)
4415 def ResetUpdateTime(*args, **kwargs):
c24da6d6 4416 """ResetUpdateTime()"""
d55e5bfc
RD
4417 return _core_.UpdateUIEvent_ResetUpdateTime(*args, **kwargs)
4418
4419 ResetUpdateTime = staticmethod(ResetUpdateTime)
4420 def SetMode(*args, **kwargs):
c24da6d6 4421 """SetMode(int mode)"""
d55e5bfc
RD
4422 return _core_.UpdateUIEvent_SetMode(*args, **kwargs)
4423
4424 SetMode = staticmethod(SetMode)
4425 def GetMode(*args, **kwargs):
c24da6d6 4426 """GetMode() -> int"""
d55e5bfc
RD
4427 return _core_.UpdateUIEvent_GetMode(*args, **kwargs)
4428
4429 GetMode = staticmethod(GetMode)
4430
4431class UpdateUIEventPtr(UpdateUIEvent):
4432 def __init__(self, this):
4433 self.this = this
4434 if not hasattr(self,"thisown"): self.thisown = 0
4435 self.__class__ = UpdateUIEvent
4436_core_.UpdateUIEvent_swigregister(UpdateUIEventPtr)
4437
4438def UpdateUIEvent_SetUpdateInterval(*args, **kwargs):
4439 """UpdateUIEvent_SetUpdateInterval(long updateInterval)"""
4440 return _core_.UpdateUIEvent_SetUpdateInterval(*args, **kwargs)
4441
4442def UpdateUIEvent_GetUpdateInterval(*args, **kwargs):
4443 """UpdateUIEvent_GetUpdateInterval() -> long"""
4444 return _core_.UpdateUIEvent_GetUpdateInterval(*args, **kwargs)
4445
4446def UpdateUIEvent_CanUpdate(*args, **kwargs):
4447 """UpdateUIEvent_CanUpdate(Window win) -> bool"""
4448 return _core_.UpdateUIEvent_CanUpdate(*args, **kwargs)
4449
4450def UpdateUIEvent_ResetUpdateTime(*args, **kwargs):
4451 """UpdateUIEvent_ResetUpdateTime()"""
4452 return _core_.UpdateUIEvent_ResetUpdateTime(*args, **kwargs)
4453
4454def UpdateUIEvent_SetMode(*args, **kwargs):
4455 """UpdateUIEvent_SetMode(int mode)"""
4456 return _core_.UpdateUIEvent_SetMode(*args, **kwargs)
4457
4458def UpdateUIEvent_GetMode(*args, **kwargs):
4459 """UpdateUIEvent_GetMode() -> int"""
4460 return _core_.UpdateUIEvent_GetMode(*args, **kwargs)
4461
4462#---------------------------------------------------------------------------
4463
4464class SysColourChangedEvent(Event):
093d3ff1 4465 """Proxy of C++ SysColourChangedEvent class"""
d55e5bfc
RD
4466 def __repr__(self):
4467 return "<%s.%s; proxy of C++ wxSysColourChangedEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
4468 def __init__(self, *args, **kwargs):
4469 """__init__(self) -> SysColourChangedEvent"""
4470 newobj = _core_.new_SysColourChangedEvent(*args, **kwargs)
4471 self.this = newobj.this
4472 self.thisown = 1
4473 del newobj.thisown
4474
4475class SysColourChangedEventPtr(SysColourChangedEvent):
4476 def __init__(self, this):
4477 self.this = this
4478 if not hasattr(self,"thisown"): self.thisown = 0
4479 self.__class__ = SysColourChangedEvent
4480_core_.SysColourChangedEvent_swigregister(SysColourChangedEventPtr)
4481
4482#---------------------------------------------------------------------------
4483
4484class MouseCaptureChangedEvent(Event):
093d3ff1 4485 """Proxy of C++ MouseCaptureChangedEvent class"""
d55e5bfc
RD
4486 def __repr__(self):
4487 return "<%s.%s; proxy of C++ wxMouseCaptureChangedEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
4488 def __init__(self, *args, **kwargs):
4489 """__init__(self, int winid=0, Window gainedCapture=None) -> MouseCaptureChangedEvent"""
4490 newobj = _core_.new_MouseCaptureChangedEvent(*args, **kwargs)
4491 self.this = newobj.this
4492 self.thisown = 1
4493 del newobj.thisown
4494 def GetCapturedWindow(*args, **kwargs):
4495 """GetCapturedWindow(self) -> Window"""
4496 return _core_.MouseCaptureChangedEvent_GetCapturedWindow(*args, **kwargs)
4497
4498
4499class MouseCaptureChangedEventPtr(MouseCaptureChangedEvent):
4500 def __init__(self, this):
4501 self.this = this
4502 if not hasattr(self,"thisown"): self.thisown = 0
4503 self.__class__ = MouseCaptureChangedEvent
4504_core_.MouseCaptureChangedEvent_swigregister(MouseCaptureChangedEventPtr)
4505
4506#---------------------------------------------------------------------------
4507
4508class DisplayChangedEvent(Event):
093d3ff1 4509 """Proxy of C++ DisplayChangedEvent class"""
d55e5bfc
RD
4510 def __repr__(self):
4511 return "<%s.%s; proxy of C++ wxDisplayChangedEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
4512 def __init__(self, *args, **kwargs):
4513 """__init__(self) -> DisplayChangedEvent"""
4514 newobj = _core_.new_DisplayChangedEvent(*args, **kwargs)
4515 self.this = newobj.this
4516 self.thisown = 1
4517 del newobj.thisown
4518
4519class DisplayChangedEventPtr(DisplayChangedEvent):
4520 def __init__(self, this):
4521 self.this = this
4522 if not hasattr(self,"thisown"): self.thisown = 0
4523 self.__class__ = DisplayChangedEvent
4524_core_.DisplayChangedEvent_swigregister(DisplayChangedEventPtr)
4525
4526#---------------------------------------------------------------------------
4527
4528class PaletteChangedEvent(Event):
093d3ff1 4529 """Proxy of C++ PaletteChangedEvent class"""
d55e5bfc
RD
4530 def __repr__(self):
4531 return "<%s.%s; proxy of C++ wxPaletteChangedEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
4532 def __init__(self, *args, **kwargs):
4533 """__init__(self, int id=0) -> PaletteChangedEvent"""
4534 newobj = _core_.new_PaletteChangedEvent(*args, **kwargs)
4535 self.this = newobj.this
4536 self.thisown = 1
4537 del newobj.thisown
4538 def SetChangedWindow(*args, **kwargs):
4539 """SetChangedWindow(self, Window win)"""
4540 return _core_.PaletteChangedEvent_SetChangedWindow(*args, **kwargs)
4541
4542 def GetChangedWindow(*args, **kwargs):
4543 """GetChangedWindow(self) -> Window"""
4544 return _core_.PaletteChangedEvent_GetChangedWindow(*args, **kwargs)
4545
4546
4547class PaletteChangedEventPtr(PaletteChangedEvent):
4548 def __init__(self, this):
4549 self.this = this
4550 if not hasattr(self,"thisown"): self.thisown = 0
4551 self.__class__ = PaletteChangedEvent
4552_core_.PaletteChangedEvent_swigregister(PaletteChangedEventPtr)
4553
4554#---------------------------------------------------------------------------
4555
4556class QueryNewPaletteEvent(Event):
093d3ff1 4557 """Proxy of C++ QueryNewPaletteEvent class"""
d55e5bfc
RD
4558 def __repr__(self):
4559 return "<%s.%s; proxy of C++ wxQueryNewPaletteEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
4560 def __init__(self, *args, **kwargs):
4561 """__init__(self, int winid=0) -> QueryNewPaletteEvent"""
4562 newobj = _core_.new_QueryNewPaletteEvent(*args, **kwargs)
4563 self.this = newobj.this
4564 self.thisown = 1
4565 del newobj.thisown
4566 def SetPaletteRealized(*args, **kwargs):
4567 """SetPaletteRealized(self, bool realized)"""
4568 return _core_.QueryNewPaletteEvent_SetPaletteRealized(*args, **kwargs)
4569
4570 def GetPaletteRealized(*args, **kwargs):
4571 """GetPaletteRealized(self) -> bool"""
4572 return _core_.QueryNewPaletteEvent_GetPaletteRealized(*args, **kwargs)
4573
4574
4575class QueryNewPaletteEventPtr(QueryNewPaletteEvent):
4576 def __init__(self, this):
4577 self.this = this
4578 if not hasattr(self,"thisown"): self.thisown = 0
4579 self.__class__ = QueryNewPaletteEvent
4580_core_.QueryNewPaletteEvent_swigregister(QueryNewPaletteEventPtr)
4581
4582#---------------------------------------------------------------------------
4583
4584class NavigationKeyEvent(Event):
093d3ff1 4585 """Proxy of C++ NavigationKeyEvent class"""
d55e5bfc
RD
4586 def __repr__(self):
4587 return "<%s.%s; proxy of C++ wxNavigationKeyEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
4588 def __init__(self, *args, **kwargs):
4589 """__init__(self) -> NavigationKeyEvent"""
4590 newobj = _core_.new_NavigationKeyEvent(*args, **kwargs)
4591 self.this = newobj.this
4592 self.thisown = 1
4593 del newobj.thisown
4594 def GetDirection(*args, **kwargs):
4595 """GetDirection(self) -> bool"""
4596 return _core_.NavigationKeyEvent_GetDirection(*args, **kwargs)
4597
4598 def SetDirection(*args, **kwargs):
908b74cd 4599 """SetDirection(self, bool forward)"""
d55e5bfc
RD
4600 return _core_.NavigationKeyEvent_SetDirection(*args, **kwargs)
4601
4602 def IsWindowChange(*args, **kwargs):
4603 """IsWindowChange(self) -> bool"""
4604 return _core_.NavigationKeyEvent_IsWindowChange(*args, **kwargs)
4605
4606 def SetWindowChange(*args, **kwargs):
908b74cd 4607 """SetWindowChange(self, bool ischange)"""
d55e5bfc
RD
4608 return _core_.NavigationKeyEvent_SetWindowChange(*args, **kwargs)
4609
68350608
RD
4610 def IsFromTab(*args, **kwargs):
4611 """IsFromTab(self) -> bool"""
4612 return _core_.NavigationKeyEvent_IsFromTab(*args, **kwargs)
4613
4614 def SetFromTab(*args, **kwargs):
4615 """SetFromTab(self, bool bIs)"""
4616 return _core_.NavigationKeyEvent_SetFromTab(*args, **kwargs)
4617
908b74cd
RD
4618 def SetFlags(*args, **kwargs):
4619 """SetFlags(self, long flags)"""
4620 return _core_.NavigationKeyEvent_SetFlags(*args, **kwargs)
4621
d55e5bfc
RD
4622 def GetCurrentFocus(*args, **kwargs):
4623 """GetCurrentFocus(self) -> Window"""
4624 return _core_.NavigationKeyEvent_GetCurrentFocus(*args, **kwargs)
4625
4626 def SetCurrentFocus(*args, **kwargs):
4627 """SetCurrentFocus(self, Window win)"""
4628 return _core_.NavigationKeyEvent_SetCurrentFocus(*args, **kwargs)
4629
b0f7404b 4630 IsBackward = _core_.NavigationKeyEvent_IsBackward
908b74cd
RD
4631 IsForward = _core_.NavigationKeyEvent_IsForward
4632 WinChange = _core_.NavigationKeyEvent_WinChange
68350608 4633 FromTab = _core_.NavigationKeyEvent_FromTab
d55e5bfc
RD
4634
4635class NavigationKeyEventPtr(NavigationKeyEvent):
4636 def __init__(self, this):
4637 self.this = this
4638 if not hasattr(self,"thisown"): self.thisown = 0
4639 self.__class__ = NavigationKeyEvent
4640_core_.NavigationKeyEvent_swigregister(NavigationKeyEventPtr)
4641
4642#---------------------------------------------------------------------------
4643
4644class WindowCreateEvent(CommandEvent):
093d3ff1 4645 """Proxy of C++ WindowCreateEvent class"""
d55e5bfc
RD
4646 def __repr__(self):
4647 return "<%s.%s; proxy of C++ wxWindowCreateEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
4648 def __init__(self, *args, **kwargs):
4649 """__init__(self, Window win=None) -> WindowCreateEvent"""
4650 newobj = _core_.new_WindowCreateEvent(*args, **kwargs)
4651 self.this = newobj.this
4652 self.thisown = 1
4653 del newobj.thisown
4654 def GetWindow(*args, **kwargs):
4655 """GetWindow(self) -> Window"""
4656 return _core_.WindowCreateEvent_GetWindow(*args, **kwargs)
4657
4658
4659class WindowCreateEventPtr(WindowCreateEvent):
4660 def __init__(self, this):
4661 self.this = this
4662 if not hasattr(self,"thisown"): self.thisown = 0
4663 self.__class__ = WindowCreateEvent
4664_core_.WindowCreateEvent_swigregister(WindowCreateEventPtr)
4665
4666class WindowDestroyEvent(CommandEvent):
093d3ff1 4667 """Proxy of C++ WindowDestroyEvent class"""
d55e5bfc
RD
4668 def __repr__(self):
4669 return "<%s.%s; proxy of C++ wxWindowDestroyEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
4670 def __init__(self, *args, **kwargs):
4671 """__init__(self, Window win=None) -> WindowDestroyEvent"""
4672 newobj = _core_.new_WindowDestroyEvent(*args, **kwargs)
4673 self.this = newobj.this
4674 self.thisown = 1
4675 del newobj.thisown
4676 def GetWindow(*args, **kwargs):
4677 """GetWindow(self) -> Window"""
4678 return _core_.WindowDestroyEvent_GetWindow(*args, **kwargs)
4679
4680
4681class WindowDestroyEventPtr(WindowDestroyEvent):
4682 def __init__(self, this):
4683 self.this = this
4684 if not hasattr(self,"thisown"): self.thisown = 0
4685 self.__class__ = WindowDestroyEvent
4686_core_.WindowDestroyEvent_swigregister(WindowDestroyEventPtr)
4687
4688#---------------------------------------------------------------------------
4689
4690class ContextMenuEvent(CommandEvent):
093d3ff1 4691 """Proxy of C++ ContextMenuEvent class"""
d55e5bfc
RD
4692 def __repr__(self):
4693 return "<%s.%s; proxy of C++ wxContextMenuEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
4694 def __init__(self, *args, **kwargs):
4695 """__init__(self, wxEventType type=wxEVT_NULL, int winid=0, Point pt=DefaultPosition) -> ContextMenuEvent"""
4696 newobj = _core_.new_ContextMenuEvent(*args, **kwargs)
4697 self.this = newobj.this
4698 self.thisown = 1
4699 del newobj.thisown
4700 def GetPosition(*args, **kwargs):
4701 """GetPosition(self) -> Point"""
4702 return _core_.ContextMenuEvent_GetPosition(*args, **kwargs)
4703
4704 def SetPosition(*args, **kwargs):
4705 """SetPosition(self, Point pos)"""
4706 return _core_.ContextMenuEvent_SetPosition(*args, **kwargs)
4707
4708
4709class ContextMenuEventPtr(ContextMenuEvent):
4710 def __init__(self, this):
4711 self.this = this
4712 if not hasattr(self,"thisown"): self.thisown = 0
4713 self.__class__ = ContextMenuEvent
4714_core_.ContextMenuEvent_swigregister(ContextMenuEventPtr)
4715
4716#---------------------------------------------------------------------------
4717
4718IDLE_PROCESS_ALL = _core_.IDLE_PROCESS_ALL
4719IDLE_PROCESS_SPECIFIED = _core_.IDLE_PROCESS_SPECIFIED
4720class IdleEvent(Event):
093d3ff1 4721 """Proxy of C++ IdleEvent class"""
d55e5bfc
RD
4722 def __repr__(self):
4723 return "<%s.%s; proxy of C++ wxIdleEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
4724 def __init__(self, *args, **kwargs):
4725 """__init__(self) -> IdleEvent"""
4726 newobj = _core_.new_IdleEvent(*args, **kwargs)
4727 self.this = newobj.this
4728 self.thisown = 1
4729 del newobj.thisown
4730 def RequestMore(*args, **kwargs):
4731 """RequestMore(self, bool needMore=True)"""
4732 return _core_.IdleEvent_RequestMore(*args, **kwargs)
4733
4734 def MoreRequested(*args, **kwargs):
4735 """MoreRequested(self) -> bool"""
4736 return _core_.IdleEvent_MoreRequested(*args, **kwargs)
4737
4738 def SetMode(*args, **kwargs):
c24da6d6 4739 """SetMode(int mode)"""
d55e5bfc
RD
4740 return _core_.IdleEvent_SetMode(*args, **kwargs)
4741
4742 SetMode = staticmethod(SetMode)
4743 def GetMode(*args, **kwargs):
c24da6d6 4744 """GetMode() -> int"""
d55e5bfc
RD
4745 return _core_.IdleEvent_GetMode(*args, **kwargs)
4746
4747 GetMode = staticmethod(GetMode)
4748 def CanSend(*args, **kwargs):
c24da6d6 4749 """CanSend(Window win) -> bool"""
d55e5bfc
RD
4750 return _core_.IdleEvent_CanSend(*args, **kwargs)
4751
4752 CanSend = staticmethod(CanSend)
4753
4754class IdleEventPtr(IdleEvent):
4755 def __init__(self, this):
4756 self.this = this
4757 if not hasattr(self,"thisown"): self.thisown = 0
4758 self.__class__ = IdleEvent
4759_core_.IdleEvent_swigregister(IdleEventPtr)
4760
4761def IdleEvent_SetMode(*args, **kwargs):
4762 """IdleEvent_SetMode(int mode)"""
4763 return _core_.IdleEvent_SetMode(*args, **kwargs)
4764
4765def IdleEvent_GetMode(*args, **kwargs):
4766 """IdleEvent_GetMode() -> int"""
4767 return _core_.IdleEvent_GetMode(*args, **kwargs)
4768
4769def IdleEvent_CanSend(*args, **kwargs):
4770 """IdleEvent_CanSend(Window win) -> bool"""
4771 return _core_.IdleEvent_CanSend(*args, **kwargs)
4772
4773#---------------------------------------------------------------------------
4774
4775class PyEvent(Event):
093d3ff1 4776 """Proxy of C++ PyEvent class"""
d55e5bfc
RD
4777 def __repr__(self):
4778 return "<%s.%s; proxy of C++ wxPyEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
4779 def __init__(self, *args, **kwargs):
4780 """__init__(self, int winid=0, wxEventType commandType=wxEVT_NULL) -> PyEvent"""
4781 newobj = _core_.new_PyEvent(*args, **kwargs)
4782 self.this = newobj.this
4783 self.thisown = 1
4784 del newobj.thisown
4785 self.SetSelf(self)
4786
4787 def __del__(self, destroy=_core_.delete_PyEvent):
4788 """__del__(self)"""
4789 try:
4790 if self.thisown: destroy(self)
4791 except: pass
4792
4793 def SetSelf(*args, **kwargs):
4794 """SetSelf(self, PyObject self)"""
4795 return _core_.PyEvent_SetSelf(*args, **kwargs)
4796
4797 def GetSelf(*args, **kwargs):
4798 """GetSelf(self) -> PyObject"""
4799 return _core_.PyEvent_GetSelf(*args, **kwargs)
4800
4801
4802class PyEventPtr(PyEvent):
4803 def __init__(self, this):
4804 self.this = this
4805 if not hasattr(self,"thisown"): self.thisown = 0
4806 self.__class__ = PyEvent
4807_core_.PyEvent_swigregister(PyEventPtr)
4808
4809class PyCommandEvent(CommandEvent):
093d3ff1 4810 """Proxy of C++ PyCommandEvent class"""
d55e5bfc
RD
4811 def __repr__(self):
4812 return "<%s.%s; proxy of C++ wxPyCommandEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
4813 def __init__(self, *args, **kwargs):
4814 """__init__(self, wxEventType commandType=wxEVT_NULL, int id=0) -> PyCommandEvent"""
4815 newobj = _core_.new_PyCommandEvent(*args, **kwargs)
4816 self.this = newobj.this
4817 self.thisown = 1
4818 del newobj.thisown
4819 self.SetSelf(self)
4820
4821 def __del__(self, destroy=_core_.delete_PyCommandEvent):
4822 """__del__(self)"""
4823 try:
4824 if self.thisown: destroy(self)
4825 except: pass
4826
4827 def SetSelf(*args, **kwargs):
4828 """SetSelf(self, PyObject self)"""
4829 return _core_.PyCommandEvent_SetSelf(*args, **kwargs)
4830
4831 def GetSelf(*args, **kwargs):
4832 """GetSelf(self) -> PyObject"""
4833 return _core_.PyCommandEvent_GetSelf(*args, **kwargs)
4834
4835
4836class PyCommandEventPtr(PyCommandEvent):
4837 def __init__(self, this):
4838 self.this = this
4839 if not hasattr(self,"thisown"): self.thisown = 0
4840 self.__class__ = PyCommandEvent
4841_core_.PyCommandEvent_swigregister(PyCommandEventPtr)
4842
53aa7709
RD
4843class DateEvent(CommandEvent):
4844 """Proxy of C++ DateEvent class"""
4845 def __repr__(self):
4846 return "<%s.%s; proxy of C++ wxDateEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
4847 def __init__(self, *args, **kwargs):
4848 """__init__(self, Window win, DateTime dt, wxEventType type) -> DateEvent"""
4849 newobj = _core_.new_DateEvent(*args, **kwargs)
4850 self.this = newobj.this
4851 self.thisown = 1
4852 del newobj.thisown
4853 def GetDate(*args, **kwargs):
4854 """GetDate(self) -> DateTime"""
4855 return _core_.DateEvent_GetDate(*args, **kwargs)
4856
4857 def SetDate(*args, **kwargs):
4858 """SetDate(self, DateTime date)"""
4859 return _core_.DateEvent_SetDate(*args, **kwargs)
4860
4861
4862class DateEventPtr(DateEvent):
4863 def __init__(self, this):
4864 self.this = this
4865 if not hasattr(self,"thisown"): self.thisown = 0
4866 self.__class__ = DateEvent
4867_core_.DateEvent_swigregister(DateEventPtr)
4868
4869wxEVT_DATE_CHANGED = _core_.wxEVT_DATE_CHANGED
4870EVT_DATE_CHANGED = wx.PyEventBinder( wxEVT_DATE_CHANGED, 1 )
4871
d55e5bfc
RD
4872#---------------------------------------------------------------------------
4873
4874PYAPP_ASSERT_SUPPRESS = _core_.PYAPP_ASSERT_SUPPRESS
4875PYAPP_ASSERT_EXCEPTION = _core_.PYAPP_ASSERT_EXCEPTION
4876PYAPP_ASSERT_DIALOG = _core_.PYAPP_ASSERT_DIALOG
4877PYAPP_ASSERT_LOG = _core_.PYAPP_ASSERT_LOG
4878PRINT_WINDOWS = _core_.PRINT_WINDOWS
4879PRINT_POSTSCRIPT = _core_.PRINT_POSTSCRIPT
4880class PyApp(EvtHandler):
c24da6d6
RD
4881 """
4882 The ``wx.PyApp`` class is an *implementation detail*, please use the
4883 `wx.App` class (or some other derived class) instead.
4884 """
d55e5bfc
RD
4885 def __repr__(self):
4886 return "<%s.%s; proxy of C++ wxPyApp instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
4887 def __init__(self, *args, **kwargs):
4888 """
4889 __init__(self) -> PyApp
4890
4891 Create a new application object, starting the bootstrap process.
4892 """
4893 newobj = _core_.new_PyApp(*args, **kwargs)
4894 self.this = newobj.this
4895 self.thisown = 1
4896 del newobj.thisown
4897 self._setCallbackInfo(self, PyApp)
4898 self._setOORInfo(self)
4899
4900 def __del__(self, destroy=_core_.delete_PyApp):
4901 """__del__(self)"""
4902 try:
4903 if self.thisown: destroy(self)
4904 except: pass
4905
4906 def _setCallbackInfo(*args, **kwargs):
4907 """_setCallbackInfo(self, PyObject self, PyObject _class)"""
4908 return _core_.PyApp__setCallbackInfo(*args, **kwargs)
4909
4910 def GetAppName(*args, **kwargs):
4911 """
4912 GetAppName(self) -> String
4913
4914 Get the application name.
4915 """
4916 return _core_.PyApp_GetAppName(*args, **kwargs)
4917
4918 def SetAppName(*args, **kwargs):
4919 """
4920 SetAppName(self, String name)
4921
c24da6d6
RD
4922 Set the application name. This value may be used automatically by
4923 `wx.Config` and such.
d55e5bfc
RD
4924 """
4925 return _core_.PyApp_SetAppName(*args, **kwargs)
4926
4927 def GetClassName(*args, **kwargs):
4928 """
4929 GetClassName(self) -> String
4930
4931 Get the application's class name.
4932 """
4933 return _core_.PyApp_GetClassName(*args, **kwargs)
4934
4935 def SetClassName(*args, **kwargs):
4936 """
4937 SetClassName(self, String name)
4938
c24da6d6
RD
4939 Set the application's class name. This value may be used for
4940 X-resources if applicable for the platform
d55e5bfc
RD
4941 """
4942 return _core_.PyApp_SetClassName(*args, **kwargs)
4943
4944 def GetVendorName(*args, **kwargs):
4945 """
4946 GetVendorName(self) -> String
4947
4948 Get the application's vendor name.
4949 """
4950 return _core_.PyApp_GetVendorName(*args, **kwargs)
4951
4952 def SetVendorName(*args, **kwargs):
4953 """
4954 SetVendorName(self, String name)
4955
c24da6d6
RD
4956 Set the application's vendor name. This value may be used
4957 automatically by `wx.Config` and such.
d55e5bfc
RD
4958 """
4959 return _core_.PyApp_SetVendorName(*args, **kwargs)
4960
4961 def GetTraits(*args, **kwargs):
4962 """
4963 GetTraits(self) -> wxAppTraits
4964
c24da6d6
RD
4965 Return (and create if necessary) the app traits object to which we
4966 delegate for everything which either should be configurable by the
4967 user (then he can change the default behaviour simply by overriding
4968 CreateTraits() and returning his own traits object) or which is
4969 GUI/console dependent as then wx.AppTraits allows us to abstract the
4970 differences behind the common facade.
4971
4972 :todo: Add support for overriding CreateAppTraits in wxPython.
d55e5bfc
RD
4973 """
4974 return _core_.PyApp_GetTraits(*args, **kwargs)
4975
4976 def ProcessPendingEvents(*args, **kwargs):
4977 """
4978 ProcessPendingEvents(self)
4979
c24da6d6
RD
4980 Process all events in the Pending Events list -- it is necessary to
4981 call this function to process posted events. This normally happens
4982 during each event loop iteration.
d55e5bfc
RD
4983 """
4984 return _core_.PyApp_ProcessPendingEvents(*args, **kwargs)
4985
4986 def Yield(*args, **kwargs):
4987 """
4988 Yield(self, bool onlyIfNeeded=False) -> bool
4989
c24da6d6
RD
4990 Process all currently pending events right now, instead of waiting
4991 until return to the event loop. It is an error to call ``Yield``
4992 recursively unless the value of ``onlyIfNeeded`` is True.
d55e5bfc 4993
c24da6d6 4994 :warning: This function is dangerous as it can lead to unexpected
79fccf9d
RD
4995 reentrancies (i.e. when called from an event handler it may
4996 result in calling the same event handler again), use with
4997 extreme care or, better, don't use at all!
d55e5bfc 4998
c24da6d6 4999 :see: `wx.Yield`, `wx.YieldIfNeeded`, `wx.SafeYield`
79fccf9d 5000
d55e5bfc
RD
5001 """
5002 return _core_.PyApp_Yield(*args, **kwargs)
5003
5004 def WakeUpIdle(*args, **kwargs):
5005 """
5006 WakeUpIdle(self)
5007
c24da6d6
RD
5008 Make sure that idle events are sent again.
5009 :see: `wx.WakeUpIdle`
d55e5bfc
RD
5010 """
5011 return _core_.PyApp_WakeUpIdle(*args, **kwargs)
5012
84f85550
RD
5013 def IsMainLoopRunning(*args, **kwargs):
5014 """
5015 IsMainLoopRunning() -> bool
5016
5017 Returns True if we're running the main loop, i.e. if the events can
5018 currently be dispatched.
5019 """
5020 return _core_.PyApp_IsMainLoopRunning(*args, **kwargs)
5021
5022 IsMainLoopRunning = staticmethod(IsMainLoopRunning)
d55e5bfc
RD
5023 def MainLoop(*args, **kwargs):
5024 """
5025 MainLoop(self) -> int
5026
c24da6d6
RD
5027 Execute the main GUI loop, the function doesn't normally return until
5028 all top level windows have been closed and destroyed.
d55e5bfc
RD
5029 """
5030 return _core_.PyApp_MainLoop(*args, **kwargs)
5031
5032 def Exit(*args, **kwargs):
5033 """
5034 Exit(self)
5035
5036 Exit the main loop thus terminating the application.
c24da6d6 5037 :see: `wx.Exit`
d55e5bfc
RD
5038 """
5039 return _core_.PyApp_Exit(*args, **kwargs)
5040
5041 def ExitMainLoop(*args, **kwargs):
5042 """
5043 ExitMainLoop(self)
5044
c24da6d6
RD
5045 Exit the main GUI loop during the next iteration of the main
5046 loop, (i.e. it does not stop the program immediately!)
d55e5bfc
RD
5047 """
5048 return _core_.PyApp_ExitMainLoop(*args, **kwargs)
5049
5050 def Pending(*args, **kwargs):
5051 """
5052 Pending(self) -> bool
5053
5054 Returns True if there are unprocessed events in the event queue.
5055 """
5056 return _core_.PyApp_Pending(*args, **kwargs)
5057
5058 def Dispatch(*args, **kwargs):
5059 """
5060 Dispatch(self) -> bool
5061
5062 Process the first event in the event queue (blocks until an event
5063 appears if there are none currently)
5064 """
5065 return _core_.PyApp_Dispatch(*args, **kwargs)
5066
5067 def ProcessIdle(*args, **kwargs):
5068 """
5069 ProcessIdle(self) -> bool
5070
c24da6d6
RD
5071 Called from the MainLoop when the application becomes idle (there are
5072 no pending events) and sends a `wx.IdleEvent` to all interested
5073 parties. Returns True if more idle events are needed, False if not.
d55e5bfc
RD
5074 """
5075 return _core_.PyApp_ProcessIdle(*args, **kwargs)
5076
5077 def SendIdleEvents(*args, **kwargs):
5078 """
5079 SendIdleEvents(self, Window win, IdleEvent event) -> bool
5080
c24da6d6
RD
5081 Send idle event to window and all subwindows. Returns True if more
5082 idle time is requested.
d55e5bfc
RD
5083 """
5084 return _core_.PyApp_SendIdleEvents(*args, **kwargs)
5085
5086 def IsActive(*args, **kwargs):
5087 """
5088 IsActive(self) -> bool
5089
5090 Return True if our app has focus.
5091 """
5092 return _core_.PyApp_IsActive(*args, **kwargs)
5093
5094 def SetTopWindow(*args, **kwargs):
5095 """
5096 SetTopWindow(self, Window win)
5097
c24da6d6 5098 Set the *main* top level window
d55e5bfc
RD
5099 """
5100 return _core_.PyApp_SetTopWindow(*args, **kwargs)
5101
5102 def GetTopWindow(*args, **kwargs):
5103 """
5104 GetTopWindow(self) -> Window
5105
c24da6d6
RD
5106 Return the *main* top level window (if it hadn't been set previously
5107 with SetTopWindow(), will return just some top level window and, if
5108 there not any, will return None)
d55e5bfc
RD
5109 """
5110 return _core_.PyApp_GetTopWindow(*args, **kwargs)
5111
5112 def SetExitOnFrameDelete(*args, **kwargs):
5113 """
5114 SetExitOnFrameDelete(self, bool flag)
5115
c24da6d6
RD
5116 Control the exit behaviour: by default, the program will exit the main
5117 loop (and so, usually, terminate) when the last top-level program
5118 window is deleted. Beware that if you disable this behaviour (with
5119 SetExitOnFrameDelete(False)), you'll have to call ExitMainLoop()
5120 explicitly from somewhere.
d55e5bfc
RD
5121 """
5122 return _core_.PyApp_SetExitOnFrameDelete(*args, **kwargs)
5123
5124 def GetExitOnFrameDelete(*args, **kwargs):
5125 """
5126 GetExitOnFrameDelete(self) -> bool
5127
5128 Get the current exit behaviour setting.
5129 """
5130 return _core_.PyApp_GetExitOnFrameDelete(*args, **kwargs)
5131
5132 def SetUseBestVisual(*args, **kwargs):
5133 """
5134 SetUseBestVisual(self, bool flag)
5135
c24da6d6
RD
5136 Set whether the app should try to use the best available visual on
5137 systems where more than one is available, (Sun, SGI, XFree86 4, etc.)
d55e5bfc
RD
5138 """
5139 return _core_.PyApp_SetUseBestVisual(*args, **kwargs)
5140
5141 def GetUseBestVisual(*args, **kwargs):
5142 """
5143 GetUseBestVisual(self) -> bool
5144
5145 Get current UseBestVisual setting.
5146 """
5147 return _core_.PyApp_GetUseBestVisual(*args, **kwargs)
5148
5149 def SetPrintMode(*args, **kwargs):
5150 """SetPrintMode(self, int mode)"""
5151 return _core_.PyApp_SetPrintMode(*args, **kwargs)
5152
5153 def GetPrintMode(*args, **kwargs):
5154 """GetPrintMode(self) -> int"""
5155 return _core_.PyApp_GetPrintMode(*args, **kwargs)
5156
5157 def SetAssertMode(*args, **kwargs):
5158 """
5159 SetAssertMode(self, int mode)
5160
79fccf9d 5161 Set the OnAssert behaviour for debug and hybrid builds.
d55e5bfc
RD
5162 """
5163 return _core_.PyApp_SetAssertMode(*args, **kwargs)
5164
5165 def GetAssertMode(*args, **kwargs):
5166 """
5167 GetAssertMode(self) -> int
5168
5169 Get the current OnAssert behaviour setting.
5170 """
5171 return _core_.PyApp_GetAssertMode(*args, **kwargs)
5172
5173 def GetMacSupportPCMenuShortcuts(*args, **kwargs):
c24da6d6 5174 """GetMacSupportPCMenuShortcuts() -> bool"""
d55e5bfc
RD
5175 return _core_.PyApp_GetMacSupportPCMenuShortcuts(*args, **kwargs)
5176
5177 GetMacSupportPCMenuShortcuts = staticmethod(GetMacSupportPCMenuShortcuts)
5178 def GetMacAboutMenuItemId(*args, **kwargs):
c24da6d6 5179 """GetMacAboutMenuItemId() -> long"""
d55e5bfc
RD
5180 return _core_.PyApp_GetMacAboutMenuItemId(*args, **kwargs)
5181
5182 GetMacAboutMenuItemId = staticmethod(GetMacAboutMenuItemId)
5183 def GetMacPreferencesMenuItemId(*args, **kwargs):
c24da6d6 5184 """GetMacPreferencesMenuItemId() -> long"""
d55e5bfc
RD
5185 return _core_.PyApp_GetMacPreferencesMenuItemId(*args, **kwargs)
5186
5187 GetMacPreferencesMenuItemId = staticmethod(GetMacPreferencesMenuItemId)
5188 def GetMacExitMenuItemId(*args, **kwargs):
c24da6d6 5189 """GetMacExitMenuItemId() -> long"""
d55e5bfc
RD
5190 return _core_.PyApp_GetMacExitMenuItemId(*args, **kwargs)
5191
5192 GetMacExitMenuItemId = staticmethod(GetMacExitMenuItemId)
5193 def GetMacHelpMenuTitleName(*args, **kwargs):
c24da6d6 5194 """GetMacHelpMenuTitleName() -> String"""
d55e5bfc
RD
5195 return _core_.PyApp_GetMacHelpMenuTitleName(*args, **kwargs)
5196
5197 GetMacHelpMenuTitleName = staticmethod(GetMacHelpMenuTitleName)
5198 def SetMacSupportPCMenuShortcuts(*args, **kwargs):
c24da6d6 5199 """SetMacSupportPCMenuShortcuts(bool val)"""
d55e5bfc
RD
5200 return _core_.PyApp_SetMacSupportPCMenuShortcuts(*args, **kwargs)
5201
5202 SetMacSupportPCMenuShortcuts = staticmethod(SetMacSupportPCMenuShortcuts)
5203 def SetMacAboutMenuItemId(*args, **kwargs):
c24da6d6 5204 """SetMacAboutMenuItemId(long val)"""
d55e5bfc
RD
5205 return _core_.PyApp_SetMacAboutMenuItemId(*args, **kwargs)
5206
5207 SetMacAboutMenuItemId = staticmethod(SetMacAboutMenuItemId)
5208 def SetMacPreferencesMenuItemId(*args, **kwargs):
c24da6d6 5209 """SetMacPreferencesMenuItemId(long val)"""
d55e5bfc
RD
5210 return _core_.PyApp_SetMacPreferencesMenuItemId(*args, **kwargs)
5211
5212 SetMacPreferencesMenuItemId = staticmethod(SetMacPreferencesMenuItemId)
5213 def SetMacExitMenuItemId(*args, **kwargs):
c24da6d6 5214 """SetMacExitMenuItemId(long val)"""
d55e5bfc
RD
5215 return _core_.PyApp_SetMacExitMenuItemId(*args, **kwargs)
5216
5217 SetMacExitMenuItemId = staticmethod(SetMacExitMenuItemId)
5218 def SetMacHelpMenuTitleName(*args, **kwargs):
c24da6d6 5219 """SetMacHelpMenuTitleName(String val)"""
d55e5bfc
RD
5220 return _core_.PyApp_SetMacHelpMenuTitleName(*args, **kwargs)
5221
5222 SetMacHelpMenuTitleName = staticmethod(SetMacHelpMenuTitleName)
5223 def _BootstrapApp(*args, **kwargs):
5224 """
5225 _BootstrapApp(self)
5226
5227 For internal use only
5228 """
5229 return _core_.PyApp__BootstrapApp(*args, **kwargs)
5230
5231 def GetComCtl32Version(*args, **kwargs):
5232 """
c24da6d6 5233 GetComCtl32Version() -> int
d55e5bfc 5234
c24da6d6
RD
5235 Returns 400, 470, 471, etc. for comctl32.dll 4.00, 4.70, 4.71 or 0 if
5236 it wasn't found at all. Raises an exception on non-Windows platforms.
d55e5bfc
RD
5237 """
5238 return _core_.PyApp_GetComCtl32Version(*args, **kwargs)
5239
5240 GetComCtl32Version = staticmethod(GetComCtl32Version)
5241
5242class PyAppPtr(PyApp):
5243 def __init__(self, this):
5244 self.this = this
5245 if not hasattr(self,"thisown"): self.thisown = 0
5246 self.__class__ = PyApp
5247_core_.PyApp_swigregister(PyAppPtr)
5248
84f85550
RD
5249def PyApp_IsMainLoopRunning(*args, **kwargs):
5250 """
5251 PyApp_IsMainLoopRunning() -> bool
5252
5253 Returns True if we're running the main loop, i.e. if the events can
5254 currently be dispatched.
5255 """
5256 return _core_.PyApp_IsMainLoopRunning(*args, **kwargs)
5257
d55e5bfc
RD
5258def PyApp_GetMacSupportPCMenuShortcuts(*args, **kwargs):
5259 """PyApp_GetMacSupportPCMenuShortcuts() -> bool"""
5260 return _core_.PyApp_GetMacSupportPCMenuShortcuts(*args, **kwargs)
5261
5262def PyApp_GetMacAboutMenuItemId(*args, **kwargs):
5263 """PyApp_GetMacAboutMenuItemId() -> long"""
5264 return _core_.PyApp_GetMacAboutMenuItemId(*args, **kwargs)
5265
5266def PyApp_GetMacPreferencesMenuItemId(*args, **kwargs):
5267 """PyApp_GetMacPreferencesMenuItemId() -> long"""
5268 return _core_.PyApp_GetMacPreferencesMenuItemId(*args, **kwargs)
5269
5270def PyApp_GetMacExitMenuItemId(*args, **kwargs):
5271 """PyApp_GetMacExitMenuItemId() -> long"""
5272 return _core_.PyApp_GetMacExitMenuItemId(*args, **kwargs)
5273
5274def PyApp_GetMacHelpMenuTitleName(*args, **kwargs):
5275 """PyApp_GetMacHelpMenuTitleName() -> String"""
5276 return _core_.PyApp_GetMacHelpMenuTitleName(*args, **kwargs)
5277
5278def PyApp_SetMacSupportPCMenuShortcuts(*args, **kwargs):
5279 """PyApp_SetMacSupportPCMenuShortcuts(bool val)"""
5280 return _core_.PyApp_SetMacSupportPCMenuShortcuts(*args, **kwargs)
5281
5282def PyApp_SetMacAboutMenuItemId(*args, **kwargs):
5283 """PyApp_SetMacAboutMenuItemId(long val)"""
5284 return _core_.PyApp_SetMacAboutMenuItemId(*args, **kwargs)
5285
5286def PyApp_SetMacPreferencesMenuItemId(*args, **kwargs):
5287 """PyApp_SetMacPreferencesMenuItemId(long val)"""
5288 return _core_.PyApp_SetMacPreferencesMenuItemId(*args, **kwargs)
5289
5290def PyApp_SetMacExitMenuItemId(*args, **kwargs):
5291 """PyApp_SetMacExitMenuItemId(long val)"""
5292 return _core_.PyApp_SetMacExitMenuItemId(*args, **kwargs)
5293
5294def PyApp_SetMacHelpMenuTitleName(*args, **kwargs):
5295 """PyApp_SetMacHelpMenuTitleName(String val)"""
5296 return _core_.PyApp_SetMacHelpMenuTitleName(*args, **kwargs)
5297
5298def PyApp_GetComCtl32Version(*args, **kwargs):
5299 """
5300 PyApp_GetComCtl32Version() -> int
5301
c24da6d6
RD
5302 Returns 400, 470, 471, etc. for comctl32.dll 4.00, 4.70, 4.71 or 0 if
5303 it wasn't found at all. Raises an exception on non-Windows platforms.
d55e5bfc
RD
5304 """
5305 return _core_.PyApp_GetComCtl32Version(*args, **kwargs)
5306
5307#---------------------------------------------------------------------------
5308
5309
5310def Exit(*args, **kwargs):
5311 """
5312 Exit()
5313
5314 Force an exit of the application. Convenience for wx.GetApp().Exit()
5315 """
5316 return _core_.Exit(*args, **kwargs)
5317
5318def Yield(*args, **kwargs):
5319 """
5320 Yield() -> bool
5321
5322 Yield to other apps/messages. Convenience for wx.GetApp().Yield()
5323 """
5324 return _core_.Yield(*args, **kwargs)
5325
5326def YieldIfNeeded(*args, **kwargs):
5327 """
5328 YieldIfNeeded() -> bool
5329
5330 Yield to other apps/messages. Convenience for wx.GetApp().Yield(True)
5331 """
5332 return _core_.YieldIfNeeded(*args, **kwargs)
5333
5334def SafeYield(*args, **kwargs):
5335 """
5336 SafeYield(Window win=None, bool onlyIfNeeded=False) -> bool
5337
c24da6d6
RD
5338 This function is similar to `wx.Yield`, except that it disables the
5339 user input to all program windows before calling `wx.Yield` and
5340 re-enables it again afterwards. If ``win`` is not None, this window
5341 will remain enabled, allowing the implementation of some limited user
5342 interaction.
d55e5bfc 5343
c24da6d6 5344 :Returns: the result of the call to `wx.Yield`.
d55e5bfc
RD
5345 """
5346 return _core_.SafeYield(*args, **kwargs)
5347
5348def WakeUpIdle(*args, **kwargs):
5349 """
5350 WakeUpIdle()
5351
c24da6d6
RD
5352 Cause the message queue to become empty again, so idle events will be
5353 sent.
d55e5bfc
RD
5354 """
5355 return _core_.WakeUpIdle(*args, **kwargs)
5356
5357def PostEvent(*args, **kwargs):
5358 """
5359 PostEvent(EvtHandler dest, Event event)
5360
c24da6d6
RD
5361 Send an event to a window or other wx.EvtHandler to be processed
5362 later.
d55e5bfc
RD
5363 """
5364 return _core_.PostEvent(*args, **kwargs)
5365
5366def App_CleanUp(*args, **kwargs):
5367 """
5368 App_CleanUp()
5369
79fccf9d 5370 For internal use only, it is used to cleanup after wxWidgets when
c24da6d6 5371 Python shuts down.
d55e5bfc
RD
5372 """
5373 return _core_.App_CleanUp(*args, **kwargs)
5374
5375def GetApp(*args, **kwargs):
5376 """
5377 GetApp() -> PyApp
5378
5379 Return a reference to the current wx.App object.
5380 """
5381 return _core_.GetApp(*args, **kwargs)
5cbf236d
RD
5382
5383def SetDefaultPyEncoding(*args, **kwargs):
5384 """
5385 SetDefaultPyEncoding(string encoding)
5386
5387 Sets the encoding that wxPython will use when it needs to convert a
5388 Python string or unicode object to or from a wxString.
62d32a5f
RD
5389
5390 The default encoding is the value of ``locale.getdefaultlocale()[1]``
5391 but please be aware that the default encoding within the same locale
5392 may be slightly different on different platforms. For example, please
5393 see http://www.alanwood.net/demos/charsetdiffs.html for differences
5394 between the common latin/roman encodings.
5cbf236d
RD
5395 """
5396 return _core_.SetDefaultPyEncoding(*args, **kwargs)
5397
5398def GetDefaultPyEncoding(*args, **kwargs):
5399 """
5400 GetDefaultPyEncoding() -> string
5401
5402 Gets the current encoding that wxPython will use when it needs to
5403 convert a Python string or unicode object to or from a wxString.
5404 """
5405 return _core_.GetDefaultPyEncoding(*args, **kwargs)
d55e5bfc
RD
5406#----------------------------------------------------------------------
5407
5408class PyOnDemandOutputWindow:
5409 """
5410 A class that can be used for redirecting Python's stdout and
5411 stderr streams. It will do nothing until something is wrriten to
5412 the stream at which point it will create a Frame with a text area
5413 and write the text there.
5414 """
5415 def __init__(self, title = "wxPython: stdout/stderr"):
5416 self.frame = None
5417 self.title = title
412d302d
RD
5418 self.pos = wx.DefaultPosition
5419 self.size = (450, 300)
d55e5bfc
RD
5420 self.parent = None
5421
5422 def SetParent(self, parent):
5423 """Set the window to be used as the popup Frame's parent."""
5424 self.parent = parent
5425
5426
5427 def CreateOutputWindow(self, st):
412d302d
RD
5428 self.frame = wx.Frame(self.parent, -1, self.title, self.pos, self.size,
5429 style=wx.DEFAULT_FRAME_STYLE)
d55e5bfc 5430 self.text = wx.TextCtrl(self.frame, -1, "",
412d302d 5431 style=wx.TE_MULTILINE|wx.TE_READONLY)
d55e5bfc 5432 self.text.AppendText(st)
d55e5bfc
RD
5433 self.frame.Show(True)
5434 EVT_CLOSE(self.frame, self.OnCloseWindow)
5435
5436
5437 def OnCloseWindow(self, event):
5438 if self.frame is not None:
5439 self.frame.Destroy()
5440 self.frame = None
5441 self.text = None
5442
5443
5444 # These methods provide the file-like output behaviour.
5445 def write(self, text):
5446 """
5447 Create the output window if needed and write the string to it.
5448 If not called in the context of the gui thread then uses
5449 CallAfter to do the work there.
5450 """
5451 if self.frame is None:
5452 if not wx.Thread_IsMain():
5453 wx.CallAfter(self.CreateOutputWindow, text)
5454 else:
5455 self.CreateOutputWindow(text)
5456 else:
5457 if not wx.Thread_IsMain():
5458 wx.CallAfter(self.text.AppendText, text)
5459 else:
5460 self.text.AppendText(text)
5461
5462
5463 def close(self):
5464 if self.frame is not None:
5465 wx.CallAfter(self.frame.Close)
5466
5467
19272049
RD
5468 def flush(self):
5469 pass
5470
5471
d55e5bfc
RD
5472
5473#----------------------------------------------------------------------
5474
5475_defRedirect = (wx.Platform == '__WXMSW__' or wx.Platform == '__WXMAC__')
5476
5477class App(wx.PyApp):
5478 """
c24da6d6
RD
5479 The ``wx.App`` class represents the application and is used to:
5480
5481 * bootstrap the wxPython system and initialize the underlying
5482 gui toolkit
5483 * set and get application-wide properties
5484 * implement the windowing system main message or event loop,
5485 and to dispatch events to window instances
5486 * etc.
5487
5488 Every application must have a ``wx.App`` instance, and all
5489 creation of UI objects should be delayed until after the
5490 ``wx.App`` object has been created in order to ensure that the gui
5491 platform and wxWidgets have been fully initialized.
5492
5493 Normally you would derive from this class and implement an
5494 ``OnInit`` method that creates a frame and then calls
5495 ``self.SetTopWindow(frame)``.
5496
5497 :see: `wx.PySimpleApp` for a simpler app class that can be used
79fccf9d 5498 directly.
d55e5bfc 5499 """
c24da6d6 5500
d55e5bfc
RD
5501 outputWindowClass = PyOnDemandOutputWindow
5502
c24da6d6
RD
5503 def __init__(self, redirect=_defRedirect, filename=None,
5504 useBestVisual=False, clearSigInt=True):
5505 """
5506 Construct a ``wx.App`` object.
5507
5508 :param redirect: Should ``sys.stdout`` and ``sys.stderr`` be
5509 redirected? Defaults to True on Windows and Mac, False
5510 otherwise. If `filename` is None then output will be
5511 redirected to a window that pops up as needed. (You can
5512 control what kind of window is created for the output by
5513 resetting the class variable ``outputWindowClass`` to a
5514 class of your choosing.)
5515
5516 :param filename: The name of a file to redirect output to, if
5517 redirect is True.
5518
5519 :param useBestVisual: Should the app try to use the best
5520 available visual provided by the system (only relevant on
5521 systems that have more than one visual.) This parameter
5522 must be used instead of calling `SetUseBestVisual` later
5523 on because it must be set before the underlying GUI
5524 toolkit is initialized.
5525
5526 :param clearSigInt: Should SIGINT be cleared? This allows the
5527 app to terminate upon a Ctrl-C in the console like other
5528 GUI apps will.
5529
5530 :note: You should override OnInit to do applicaition
5531 initialization to ensure that the system, toolkit and
5532 wxWidgets are fully initialized.
5533 """
d55e5bfc
RD
5534 wx.PyApp.__init__(self)
5535
5536 if wx.Platform == "__WXMAC__":
5537 try:
5538 import MacOS
5539 if not MacOS.WMAvailable():
5540 print """\
5541This program needs access to the screen. Please run with 'pythonw',
5542not 'python', and only when you are logged in on the main display of
5543your Mac."""
5544 _sys.exit(1)
b1f29bf7
RD
5545 except SystemExit:
5546 raise
d55e5bfc
RD
5547 except:
5548 pass
5549
5550 # This has to be done before OnInit
5551 self.SetUseBestVisual(useBestVisual)
5552
5553 # Set the default handler for SIGINT. This fixes a problem
5554 # where if Ctrl-C is pressed in the console that started this
5555 # app then it will not appear to do anything, (not even send
5556 # KeyboardInterrupt???) but will later segfault on exit. By
5557 # setting the default handler then the app will exit, as
5558 # expected (depending on platform.)
c24da6d6
RD
5559 if clearSigInt:
5560 try:
5561 import signal
5562 signal.signal(signal.SIGINT, signal.SIG_DFL)
5563 except:
5564 pass
d55e5bfc
RD
5565
5566 # Save and redirect the stdio to a window?
5567 self.stdioWin = None
5568 self.saveStdio = (_sys.stdout, _sys.stderr)
5569 if redirect:
5570 self.RedirectStdio(filename)
5571
8fb0e70a
RD
5572 # Use Python's install prefix as the default
5573 wx.StandardPaths.Get().SetInstallPrefix(_sys.prefix)
5574
d55e5bfc
RD
5575 # This finishes the initialization of wxWindows and then calls
5576 # the OnInit that should be present in the derived class
5577 self._BootstrapApp()
5578
5579
5580 def __del__(self):
5581 try:
5582 self.RestoreStdio() # Just in case the MainLoop was overridden
5583 except:
5584 pass
5585
5586
5587 def SetTopWindow(self, frame):
5588 """Set the \"main\" top level window"""
5589 if self.stdioWin:
5590 self.stdioWin.SetParent(frame)
5591 wx.PyApp.SetTopWindow(self, frame)
5592
5593
5594 def MainLoop(self):
5595 """Execute the main GUI event loop"""
5596 wx.PyApp.MainLoop(self)
5597 self.RestoreStdio()
5598
5599
5600 def RedirectStdio(self, filename=None):
5601 """Redirect sys.stdout and sys.stderr to a file or a popup window."""
5602 if filename:
5603 _sys.stdout = _sys.stderr = open(filename, 'a')
5604 else:
5605 self.stdioWin = self.outputWindowClass()
5606 _sys.stdout = _sys.stderr = self.stdioWin
5607
5608
5609 def RestoreStdio(self):
5610 _sys.stdout, _sys.stderr = self.saveStdio
5611
5612
412d302d
RD
5613 def SetOutputWindowAttributes(self, title=None, pos=None, size=None):
5614 """
5615 Set the title, position and/or size of the output window if
f5b96ee1
RD
5616 the stdio has been redirected. This should be called before
5617 any output would cause the output window to be created.
412d302d
RD
5618 """
5619 if self.stdioWin:
5620 if title is not None:
5621 self.stdioWin.title = title
5622 if pos is not None:
5623 self.stdioWin.pos = pos
5624 if size is not None:
5625 self.stdioWin.size = size
5626
5627
5628
d55e5bfc 5629
c24da6d6 5630# change from wx.PyApp_XX to wx.App_XX
d55e5bfc
RD
5631App_GetMacSupportPCMenuShortcuts = _core_.PyApp_GetMacSupportPCMenuShortcuts
5632App_GetMacAboutMenuItemId = _core_.PyApp_GetMacAboutMenuItemId
5633App_GetMacPreferencesMenuItemId = _core_.PyApp_GetMacPreferencesMenuItemId
5634App_GetMacExitMenuItemId = _core_.PyApp_GetMacExitMenuItemId
5635App_GetMacHelpMenuTitleName = _core_.PyApp_GetMacHelpMenuTitleName
5636App_SetMacSupportPCMenuShortcuts = _core_.PyApp_SetMacSupportPCMenuShortcuts
5637App_SetMacAboutMenuItemId = _core_.PyApp_SetMacAboutMenuItemId
5638App_SetMacPreferencesMenuItemId = _core_.PyApp_SetMacPreferencesMenuItemId
5639App_SetMacExitMenuItemId = _core_.PyApp_SetMacExitMenuItemId
5640App_SetMacHelpMenuTitleName = _core_.PyApp_SetMacHelpMenuTitleName
5641App_GetComCtl32Version = _core_.PyApp_GetComCtl32Version
5642
5643#----------------------------------------------------------------------------
5644
5645class PySimpleApp(wx.App):
5646 """
5647 A simple application class. You can just create one of these and
5648 then then make your top level windows later, and not have to worry
c24da6d6 5649 about OnInit. For example::
d55e5bfc 5650
c24da6d6
RD
5651 app = wx.PySimpleApp()
5652 frame = wx.Frame(None, title='Hello World')
5653 frame.Show()
5654 app.MainLoop()
5655
5656 :see: `wx.App`
5657 """
5658
5659 def __init__(self, redirect=False, filename=None,
5660 useBestVisual=False, clearSigInt=True):
5661 """
5662 :see: `wx.App.__init__`
5663 """
5664 wx.App.__init__(self, redirect, filename, useBestVisual, clearSigInt)
d55e5bfc
RD
5665
5666 def OnInit(self):
d55e5bfc
RD
5667 return True
5668
5669
c24da6d6 5670
d55e5bfc
RD
5671# Is anybody using this one?
5672class PyWidgetTester(wx.App):
5673 def __init__(self, size = (250, 100)):
5674 self.size = size
5675 wx.App.__init__(self, 0)
5676
5677 def OnInit(self):
5678 self.frame = wx.Frame(None, -1, "Widget Tester", pos=(0,0), size=self.size)
5679 self.SetTopWindow(self.frame)
5680 return True
5681
c24da6d6
RD
5682 def SetWidget(self, widgetClass, *args, **kwargs):
5683 w = widgetClass(self.frame, *args, **kwargs)
d55e5bfc
RD
5684 self.frame.Show(True)
5685
5686#----------------------------------------------------------------------------
5687# DO NOT hold any other references to this object. This is how we
c24da6d6 5688# know when to cleanup system resources that wxWidgets is holding. When
d55e5bfc 5689# the sys module is unloaded, the refcount on sys.__wxPythonCleanup
c24da6d6 5690# goes to zero and it calls the wx.App_CleanUp function.
d55e5bfc
RD
5691
5692class __wxPyCleanup:
5693 def __init__(self):
5694 self.cleanup = _core_.App_CleanUp
5695 def __del__(self):
5696 self.cleanup()
5697
5698_sys.__wxPythonCleanup = __wxPyCleanup()
5699
5700## # another possible solution, but it gets called too early...
c24da6d6
RD
5701## import atexit
5702## atexit.register(_core_.wxApp_CleanUp)
d55e5bfc
RD
5703
5704
5705#----------------------------------------------------------------------------
5706
5707#---------------------------------------------------------------------------
5708
ae8162c8 5709class EventLoop(object):
093d3ff1 5710 """Proxy of C++ EventLoop class"""
ae8162c8
RD
5711 def __repr__(self):
5712 return "<%s.%s; proxy of C++ wxEventLoop instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
5713 def __init__(self, *args, **kwargs):
5714 """__init__(self) -> EventLoop"""
5715 newobj = _core_.new_EventLoop(*args, **kwargs)
5716 self.this = newobj.this
5717 self.thisown = 1
5718 del newobj.thisown
5719 def __del__(self, destroy=_core_.delete_EventLoop):
5720 """__del__(self)"""
5721 try:
5722 if self.thisown: destroy(self)
5723 except: pass
5724
5725 def Run(*args, **kwargs):
5726 """Run(self) -> int"""
5727 return _core_.EventLoop_Run(*args, **kwargs)
5728
5729 def Exit(*args, **kwargs):
5730 """Exit(self, int rc=0)"""
5731 return _core_.EventLoop_Exit(*args, **kwargs)
5732
5733 def Pending(*args, **kwargs):
5734 """Pending(self) -> bool"""
5735 return _core_.EventLoop_Pending(*args, **kwargs)
5736
5737 def Dispatch(*args, **kwargs):
5738 """Dispatch(self) -> bool"""
5739 return _core_.EventLoop_Dispatch(*args, **kwargs)
5740
5741 def IsRunning(*args, **kwargs):
5742 """IsRunning(self) -> bool"""
5743 return _core_.EventLoop_IsRunning(*args, **kwargs)
5744
5745 def GetActive(*args, **kwargs):
5746 """GetActive() -> EventLoop"""
5747 return _core_.EventLoop_GetActive(*args, **kwargs)
5748
5749 GetActive = staticmethod(GetActive)
5750 def SetActive(*args, **kwargs):
5751 """SetActive(EventLoop loop)"""
5752 return _core_.EventLoop_SetActive(*args, **kwargs)
5753
5754 SetActive = staticmethod(SetActive)
5755
5756class EventLoopPtr(EventLoop):
5757 def __init__(self, this):
5758 self.this = this
5759 if not hasattr(self,"thisown"): self.thisown = 0
5760 self.__class__ = EventLoop
5761_core_.EventLoop_swigregister(EventLoopPtr)
5762
5763def EventLoop_GetActive(*args, **kwargs):
5764 """EventLoop_GetActive() -> EventLoop"""
5765 return _core_.EventLoop_GetActive(*args, **kwargs)
5766
5767def EventLoop_SetActive(*args, **kwargs):
5768 """EventLoop_SetActive(EventLoop loop)"""
5769 return _core_.EventLoop_SetActive(*args, **kwargs)
5770
5771#---------------------------------------------------------------------------
5772
d55e5bfc 5773class AcceleratorEntry(object):
c24da6d6
RD
5774 """
5775 A class used to define items in an `wx.AcceleratorTable`. wxPython
5776 programs can choose to use wx.AcceleratorEntry objects, but using a
5777 list of 3-tuple of integers (flags, keyCode, cmdID) usually works just
79fccf9d 5778 as well. See `__init__` for of the tuple values.
c24da6d6
RD
5779
5780 :see: `wx.AcceleratorTable`
5781 """
d55e5bfc
RD
5782 def __repr__(self):
5783 return "<%s.%s; proxy of C++ wxAcceleratorEntry instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
5784 def __init__(self, *args, **kwargs):
c24da6d6
RD
5785 """
5786 __init__(self, int flags=0, int keyCode=0, int cmdID=0) -> AcceleratorEntry
5787
5788 Construct a wx.AcceleratorEntry.
c24da6d6 5789 """
d55e5bfc
RD
5790 newobj = _core_.new_AcceleratorEntry(*args, **kwargs)
5791 self.this = newobj.this
5792 self.thisown = 1
5793 del newobj.thisown
5794 def __del__(self, destroy=_core_.delete_AcceleratorEntry):
5795 """__del__(self)"""
5796 try:
5797 if self.thisown: destroy(self)
5798 except: pass
5799
5800 def Set(*args, **kwargs):
c24da6d6
RD
5801 """
5802 Set(self, int flags, int keyCode, int cmd)
d55e5bfc 5803
c24da6d6
RD
5804 (Re)set the attributes of a wx.AcceleratorEntry.
5805 :see `__init__`
5806 """
5807 return _core_.AcceleratorEntry_Set(*args, **kwargs)
d55e5bfc
RD
5808
5809 def GetFlags(*args, **kwargs):
c24da6d6
RD
5810 """
5811 GetFlags(self) -> int
5812
5813 Get the AcceleratorEntry's flags.
5814 """
d55e5bfc
RD
5815 return _core_.AcceleratorEntry_GetFlags(*args, **kwargs)
5816
5817 def GetKeyCode(*args, **kwargs):
c24da6d6
RD
5818 """
5819 GetKeyCode(self) -> int
5820
5821 Get the AcceleratorEntry's keycode.
5822 """
d55e5bfc
RD
5823 return _core_.AcceleratorEntry_GetKeyCode(*args, **kwargs)
5824
5825 def GetCommand(*args, **kwargs):
c24da6d6
RD
5826 """
5827 GetCommand(self) -> int
5828
5829 Get the AcceleratorEntry's command ID.
5830 """
d55e5bfc
RD
5831 return _core_.AcceleratorEntry_GetCommand(*args, **kwargs)
5832
5833
5834class AcceleratorEntryPtr(AcceleratorEntry):
5835 def __init__(self, this):
5836 self.this = this
5837 if not hasattr(self,"thisown"): self.thisown = 0
5838 self.__class__ = AcceleratorEntry
5839_core_.AcceleratorEntry_swigregister(AcceleratorEntryPtr)
5840
5841class AcceleratorTable(Object):
c24da6d6
RD
5842 """
5843 An accelerator table allows the application to specify a table of
5844 keyboard shortcuts for menus or other commands. On Windows, menu or
5845 button commands are supported; on GTK, only menu commands are
5846 supported.
c24da6d6 5847 """
d55e5bfc
RD
5848 def __repr__(self):
5849 return "<%s.%s; proxy of C++ wxAcceleratorTable instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
5850 def __init__(self, *args, **kwargs):
5851 """
5852 __init__(entries) -> AcceleratorTable
5853
c24da6d6
RD
5854 Construct an AcceleratorTable from a list of `wx.AcceleratorEntry`
5855 items or or of 3-tuples (flags, keyCode, cmdID)
5856
5857 :see: `wx.AcceleratorEntry`
d55e5bfc
RD
5858 """
5859 newobj = _core_.new_AcceleratorTable(*args, **kwargs)
5860 self.this = newobj.this
5861 self.thisown = 1
5862 del newobj.thisown
5863 def __del__(self, destroy=_core_.delete_AcceleratorTable):
5864 """__del__(self)"""
5865 try:
5866 if self.thisown: destroy(self)
5867 except: pass
5868
5869 def Ok(*args, **kwargs):
5870 """Ok(self) -> bool"""
5871 return _core_.AcceleratorTable_Ok(*args, **kwargs)
5872
5873
5874class AcceleratorTablePtr(AcceleratorTable):
5875 def __init__(self, this):
5876 self.this = this
5877 if not hasattr(self,"thisown"): self.thisown = 0
5878 self.__class__ = AcceleratorTable
5879_core_.AcceleratorTable_swigregister(AcceleratorTablePtr)
5880
5881
5882def GetAccelFromString(*args, **kwargs):
5883 """GetAccelFromString(String label) -> AcceleratorEntry"""
5884 return _core_.GetAccelFromString(*args, **kwargs)
5885#---------------------------------------------------------------------------
5886
5887class VisualAttributes(object):
5888 """struct containing all the visual attributes of a control"""
5889 def __repr__(self):
5890 return "<%s.%s; proxy of C++ wxVisualAttributes instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
5891 def __init__(self, *args, **kwargs):
5892 """
5893 __init__(self) -> VisualAttributes
5894
5895 struct containing all the visual attributes of a control
5896 """
5897 newobj = _core_.new_VisualAttributes(*args, **kwargs)
5898 self.this = newobj.this
5899 self.thisown = 1
5900 del newobj.thisown
5901 def __del__(self, destroy=_core_.delete_VisualAttributes):
5902 """__del__(self)"""
5903 try:
5904 if self.thisown: destroy(self)
5905 except: pass
5906
5907 font = property(_core_.VisualAttributes_font_get, _core_.VisualAttributes_font_set)
5908 colFg = property(_core_.VisualAttributes_colFg_get, _core_.VisualAttributes_colFg_set)
5909 colBg = property(_core_.VisualAttributes_colBg_get, _core_.VisualAttributes_colBg_set)
5910
5911class VisualAttributesPtr(VisualAttributes):
5912 def __init__(self, this):
5913 self.this = this
5914 if not hasattr(self,"thisown"): self.thisown = 0
5915 self.__class__ = VisualAttributes
5916_core_.VisualAttributes_swigregister(VisualAttributesPtr)
5917NullAcceleratorTable = cvar.NullAcceleratorTable
5918PanelNameStr = cvar.PanelNameStr
5919
5920WINDOW_VARIANT_NORMAL = _core_.WINDOW_VARIANT_NORMAL
5921WINDOW_VARIANT_SMALL = _core_.WINDOW_VARIANT_SMALL
5922WINDOW_VARIANT_MINI = _core_.WINDOW_VARIANT_MINI
5923WINDOW_VARIANT_LARGE = _core_.WINDOW_VARIANT_LARGE
5924WINDOW_VARIANT_MAX = _core_.WINDOW_VARIANT_MAX
5925class Window(EvtHandler):
5926 """
5927 wx.Window is the base class for all windows and represents any visible
5928 object on the screen. All controls, top level windows and so on are
5929 wx.Windows. Sizers and device contexts are not however, as they don't
5930 appear on screen themselves.
5931
5932 """
5933 def __repr__(self):
5934 return "<%s.%s; proxy of C++ wxWindow instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
5935 def __init__(self, *args, **kwargs):
5936 """
5937 __init__(self, Window parent, int id=-1, Point pos=DefaultPosition,
5938 Size size=DefaultSize, long style=0, String name=PanelNameStr) -> Window
5939
5940 Construct and show a generic Window.
5941 """
5942 newobj = _core_.new_Window(*args, **kwargs)
5943 self.this = newobj.this
5944 self.thisown = 1
5945 del newobj.thisown
5946 self._setOORInfo(self)
5947
5948 def Create(*args, **kwargs):
5949 """
5950 Create(self, Window parent, int id=-1, Point pos=DefaultPosition,
5951 Size size=DefaultSize, long style=0, String name=PanelNameStr) -> bool
5952
5953 Create the GUI part of the Window for 2-phase creation mode.
5954 """
5955 return _core_.Window_Create(*args, **kwargs)
5956
5957 def Close(*args, **kwargs):
5958 """
5959 Close(self, bool force=False) -> bool
5960
5961 This function simply generates a EVT_CLOSE event whose handler usually
5962 tries to close the window. It doesn't close the window itself,
5963 however. If force is False (the default) then the window's close
5964 handler will be allowed to veto the destruction of the window.
d55e5bfc
RD
5965 """
5966 return _core_.Window_Close(*args, **kwargs)
5967
5968 def Destroy(*args, **kwargs):
5969 """
5970 Destroy(self) -> bool
5971
5972 Destroys the window safely. Frames and dialogs are not destroyed
5973 immediately when this function is called -- they are added to a list
5974 of windows to be deleted on idle time, when all the window's events
5975 have been processed. This prevents problems with events being sent to
5976 non-existent windows.
5977
5978 Returns True if the window has either been successfully deleted, or it
5979 has been added to the list of windows pending real deletion.
5980 """
5981 return _core_.Window_Destroy(*args, **kwargs)
5982
5983 def DestroyChildren(*args, **kwargs):
5984 """
5985 DestroyChildren(self) -> bool
5986
79fccf9d
RD
5987 Destroys all children of a window. Called automatically by the
5988 destructor.
d55e5bfc
RD
5989 """
5990 return _core_.Window_DestroyChildren(*args, **kwargs)
5991
5992 def IsBeingDeleted(*args, **kwargs):
5993 """
5994 IsBeingDeleted(self) -> bool
5995
5996 Is the window in the process of being deleted?
5997 """
5998 return _core_.Window_IsBeingDeleted(*args, **kwargs)
5999
6000 def SetTitle(*args, **kwargs):
6001 """
6002 SetTitle(self, String title)
6003
6004 Sets the window's title. Applicable only to frames and dialogs.
6005 """
6006 return _core_.Window_SetTitle(*args, **kwargs)
6007
6008 def GetTitle(*args, **kwargs):
6009 """
6010 GetTitle(self) -> String
6011
6012 Gets the window's title. Applicable only to frames and dialogs.
6013 """
6014 return _core_.Window_GetTitle(*args, **kwargs)
6015
6016 def SetLabel(*args, **kwargs):
6017 """
6018 SetLabel(self, String label)
6019
6020 Set the text which the window shows in its label if applicable.
6021 """
6022 return _core_.Window_SetLabel(*args, **kwargs)
6023
6024 def GetLabel(*args, **kwargs):
6025 """
6026 GetLabel(self) -> String
6027
79fccf9d
RD
6028 Generic way of getting a label from any window, for identification
6029 purposes. The interpretation of this function differs from class to
6030 class. For frames and dialogs, the value returned is the title. For
6031 buttons or static text controls, it is the button text. This function
6032 can be useful for meta-programs such as testing tools or special-needs
6033 access programs)which need to identify windows by name.
d55e5bfc
RD
6034 """
6035 return _core_.Window_GetLabel(*args, **kwargs)
6036
6037 def SetName(*args, **kwargs):
6038 """
6039 SetName(self, String name)
6040
79fccf9d
RD
6041 Sets the window's name. The window name is used for ressource setting
6042 in X, it is not the same as the window title/label
d55e5bfc
RD
6043 """
6044 return _core_.Window_SetName(*args, **kwargs)
6045
6046 def GetName(*args, **kwargs):
6047 """
6048 GetName(self) -> String
6049
79fccf9d
RD
6050 Returns the windows name. This name is not guaranteed to be unique;
6051 it is up to the programmer to supply an appropriate name in the window
6052 constructor or via wx.Window.SetName.
d55e5bfc
RD
6053 """
6054 return _core_.Window_GetName(*args, **kwargs)
6055
6056 def SetWindowVariant(*args, **kwargs):
6057 """
6058 SetWindowVariant(self, int variant)
6059
79fccf9d
RD
6060 Sets the variant of the window/font size to use for this window, if
6061 the platform supports variants, for example, wxMac.
d55e5bfc
RD
6062 """
6063 return _core_.Window_SetWindowVariant(*args, **kwargs)
6064
6065 def GetWindowVariant(*args, **kwargs):
6066 """GetWindowVariant(self) -> int"""
6067 return _core_.Window_GetWindowVariant(*args, **kwargs)
6068
6069 def SetId(*args, **kwargs):
6070 """
6071 SetId(self, int winid)
6072
6073 Sets the identifier of the window. Each window has an integer
6074 identifier. If the application has not provided one, an identifier
6075 will be generated. Normally, the identifier should be provided on
6076 creation and should not be modified subsequently.
6077 """
6078 return _core_.Window_SetId(*args, **kwargs)
6079
6080 def GetId(*args, **kwargs):
6081 """
6082 GetId(self) -> int
6083
6084 Returns the identifier of the window. Each window has an integer
6085 identifier. If the application has not provided one (or the default Id
6086 -1 is used) then an unique identifier with a negative value will be
6087 generated.
6088 """
6089 return _core_.Window_GetId(*args, **kwargs)
6090
6091 def NewControlId(*args, **kwargs):
6092 """
c24da6d6 6093 NewControlId() -> int
d55e5bfc
RD
6094
6095 Generate a control id for the controls which were not given one.
6096 """
6097 return _core_.Window_NewControlId(*args, **kwargs)
6098
6099 NewControlId = staticmethod(NewControlId)
6100 def NextControlId(*args, **kwargs):
6101 """
c24da6d6 6102 NextControlId(int winid) -> int
d55e5bfc
RD
6103
6104 Get the id of the control following the one with the given
79fccf9d 6105 autogenerated) id
d55e5bfc
RD
6106 """
6107 return _core_.Window_NextControlId(*args, **kwargs)
6108
6109 NextControlId = staticmethod(NextControlId)
6110 def PrevControlId(*args, **kwargs):
6111 """
c24da6d6 6112 PrevControlId(int winid) -> int
d55e5bfc
RD
6113
6114 Get the id of the control preceding the one with the given
79fccf9d 6115 autogenerated) id
d55e5bfc
RD
6116 """
6117 return _core_.Window_PrevControlId(*args, **kwargs)
6118
6119 PrevControlId = staticmethod(PrevControlId)
6120 def SetSize(*args, **kwargs):
6121 """
6122 SetSize(self, Size size)
6123
6124 Sets the size of the window in pixels.
6125 """
6126 return _core_.Window_SetSize(*args, **kwargs)
6127
6128 def SetDimensions(*args, **kwargs):
6129 """
6130 SetDimensions(self, int x, int y, int width, int height, int sizeFlags=SIZE_AUTO)
6131
6132 Sets the position and size of the window in pixels. The sizeFlags
6133 parameter indicates the interpretation of the other params if they are
62d32a5f
RD
6134 equal to -1.
6135
6136 ======================== ======================================
6137 wx.SIZE_AUTO A -1 indicates that a class-specific
6138 default should be used.
6139 wx.SIZE_USE_EXISTING Axisting dimensions should be used if
6140 -1 values are supplied.
6141 wxSIZE_ALLOW_MINUS_ONE Allow dimensions of -1 and less to be
6142 interpreted as real dimensions, not
6143 default values.
6144 ======================== ======================================
6145
d55e5bfc
RD
6146 """
6147 return _core_.Window_SetDimensions(*args, **kwargs)
6148
6149 def SetRect(*args, **kwargs):
6150 """
6151 SetRect(self, Rect rect, int sizeFlags=SIZE_AUTO)
6152
6153 Sets the position and size of the window in pixels using a wx.Rect.
6154 """
6155 return _core_.Window_SetRect(*args, **kwargs)
6156
6157 def SetSizeWH(*args, **kwargs):
6158 """
6159 SetSizeWH(self, int width, int height)
6160
6161 Sets the size of the window in pixels.
6162 """
6163 return _core_.Window_SetSizeWH(*args, **kwargs)
6164
6165 def Move(*args, **kwargs):
6166 """
6167 Move(self, Point pt, int flags=SIZE_USE_EXISTING)
6168
6169 Moves the window to the given position.
6170 """
6171 return _core_.Window_Move(*args, **kwargs)
6172
6173 SetPosition = Move
6174 def MoveXY(*args, **kwargs):
6175 """
6176 MoveXY(self, int x, int y, int flags=SIZE_USE_EXISTING)
6177
6178 Moves the window to the given position.
6179 """
6180 return _core_.Window_MoveXY(*args, **kwargs)
6181
f8167d6e
RD
6182 def SetBestFittingSize(*args, **kwargs):
6183 """
6184 SetBestFittingSize(self, Size size=DefaultSize)
6185
6186 A 'Smart' SetSize that will fill in default size components with the
6187 window's *best size* values. Also set's the minsize for use with sizers.
6188 """
6189 return _core_.Window_SetBestFittingSize(*args, **kwargs)
6190
d55e5bfc
RD
6191 def Raise(*args, **kwargs):
6192 """
6193 Raise(self)
6194
6195 Raises the window to the top of the window hierarchy if it is a
6196 managed window (dialog or frame).
6197 """
6198 return _core_.Window_Raise(*args, **kwargs)
6199
6200 def Lower(*args, **kwargs):
6201 """
6202 Lower(self)
6203
6204 Lowers the window to the bottom of the window hierarchy if it is a
6205 managed window (dialog or frame).
6206 """
6207 return _core_.Window_Lower(*args, **kwargs)
6208
6209 def SetClientSize(*args, **kwargs):
6210 """
6211 SetClientSize(self, Size size)
6212
6213 This sets the size of the window client area in pixels. Using this
6214 function to size a window tends to be more device-independent than
6215 wx.Window.SetSize, since the application need not worry about what
6216 dimensions the border or title bar have when trying to fit the window
6217 around panel items, for example.
6218 """
6219 return _core_.Window_SetClientSize(*args, **kwargs)
6220
6221 def SetClientSizeWH(*args, **kwargs):
6222 """
6223 SetClientSizeWH(self, int width, int height)
6224
6225 This sets the size of the window client area in pixels. Using this
6226 function to size a window tends to be more device-independent than
6227 wx.Window.SetSize, since the application need not worry about what
6228 dimensions the border or title bar have when trying to fit the window
6229 around panel items, for example.
6230 """
6231 return _core_.Window_SetClientSizeWH(*args, **kwargs)
6232
6233 def SetClientRect(*args, **kwargs):
6234 """
6235 SetClientRect(self, Rect rect)
6236
6237 This sets the size of the window client area in pixels. Using this
6238 function to size a window tends to be more device-independent than
6239 wx.Window.SetSize, since the application need not worry about what
6240 dimensions the border or title bar have when trying to fit the window
6241 around panel items, for example.
6242 """
6243 return _core_.Window_SetClientRect(*args, **kwargs)
6244
6245 def GetPosition(*args, **kwargs):
6246 """
6247 GetPosition(self) -> Point
6248
6249 Get the window's position.
6250 """
6251 return _core_.Window_GetPosition(*args, **kwargs)
6252
6253 def GetPositionTuple(*args, **kwargs):
6254 """
6255 GetPositionTuple() -> (x,y)
6256
6257 Get the window's position.
6258 """
6259 return _core_.Window_GetPositionTuple(*args, **kwargs)
6260
6261 def GetSize(*args, **kwargs):
6262 """
6263 GetSize(self) -> Size
6264
6265 Get the window size.
6266 """
6267 return _core_.Window_GetSize(*args, **kwargs)
6268
6269 def GetSizeTuple(*args, **kwargs):
6270 """
6271 GetSizeTuple() -> (width, height)
6272
6273 Get the window size.
6274 """
6275 return _core_.Window_GetSizeTuple(*args, **kwargs)
6276
6277 def GetRect(*args, **kwargs):
6278 """
6279 GetRect(self) -> Rect
6280
6281 Returns the size and position of the window as a wx.Rect object.
6282 """
6283 return _core_.Window_GetRect(*args, **kwargs)
6284
6285 def GetClientSize(*args, **kwargs):
6286 """
6287 GetClientSize(self) -> Size
6288
6289 This gets the size of the window's 'client area' in pixels. The client
6290 area is the area which may be drawn on by the programmer, excluding
6291 title bar, border, scrollbars, etc.
6292 """
6293 return _core_.Window_GetClientSize(*args, **kwargs)
6294
6295 def GetClientSizeTuple(*args, **kwargs):
6296 """
6297 GetClientSizeTuple() -> (width, height)
6298
6299 This gets the size of the window's 'client area' in pixels. The client
6300 area is the area which may be drawn on by the programmer, excluding
6301 title bar, border, scrollbars, etc.
6302 """
6303 return _core_.Window_GetClientSizeTuple(*args, **kwargs)
6304
6305 def GetClientAreaOrigin(*args, **kwargs):
6306 """
6307 GetClientAreaOrigin(self) -> Point
6308
6309 Get the origin of the client area of the window relative to the
6310 window's top left corner (the client area may be shifted because of
6311 the borders, scrollbars, other decorations...)
6312 """
6313 return _core_.Window_GetClientAreaOrigin(*args, **kwargs)
6314
6315 def GetClientRect(*args, **kwargs):
6316 """
6317 GetClientRect(self) -> Rect
6318
629f3c1b 6319 Get the client area position and size as a `wx.Rect` object.
d55e5bfc
RD
6320 """
6321 return _core_.Window_GetClientRect(*args, **kwargs)
6322
6323 def GetBestSize(*args, **kwargs):
6324 """
6325 GetBestSize(self) -> Size
6326
248ed943 6327 This function returns the best acceptable minimal size for the
79fccf9d
RD
6328 window, if applicable. For example, for a static text control, it will
6329 be the minimal size such that the control label is not truncated. For
6330 windows containing subwindows (suzh aswx.Panel), the size returned by
6331 this function will be the same as the size the window would have had
6332 after calling Fit.
d55e5bfc
RD
6333 """
6334 return _core_.Window_GetBestSize(*args, **kwargs)
6335
6336 def GetBestSizeTuple(*args, **kwargs):
6337 """
6338 GetBestSizeTuple() -> (width, height)
6339
248ed943 6340 This function returns the best acceptable minimal size for the
79fccf9d
RD
6341 window, if applicable. For example, for a static text control, it will
6342 be the minimal size such that the control label is not truncated. For
6343 windows containing subwindows (suzh aswx.Panel), the size returned by
6344 this function will be the same as the size the window would have had
6345 after calling Fit.
d55e5bfc
RD
6346 """
6347 return _core_.Window_GetBestSizeTuple(*args, **kwargs)
6348
a001823c
RD
6349 def InvalidateBestSize(*args, **kwargs):
6350 """
6351 InvalidateBestSize(self)
6352
6353 Reset the cached best size value so it will be recalculated the next
6354 time it is needed.
6355 """
6356 return _core_.Window_InvalidateBestSize(*args, **kwargs)
6357
6358 def GetBestFittingSize(*args, **kwargs):
6359 """
6360 GetBestFittingSize(self) -> Size
6361
6362 This function will merge the window's best size into the window's
6363 minimum size, giving priority to the min size components, and returns
6364 the results.
6365
6366 """
6367 return _core_.Window_GetBestFittingSize(*args, **kwargs)
6368
d55e5bfc
RD
6369 def GetAdjustedBestSize(*args, **kwargs):
6370 """
6371 GetAdjustedBestSize(self) -> Size
6372
6373 This method is similar to GetBestSize, except in one
6374 thing. GetBestSize should return the minimum untruncated size of the
6375 window, while this method will return the largest of BestSize and any
6376 user specified minimum size. ie. it is the minimum size the window
6377 should currently be drawn at, not the minimal size it can possibly
6378 tolerate.
6379 """
6380 return _core_.Window_GetAdjustedBestSize(*args, **kwargs)
6381
6382 def Center(*args, **kwargs):
6383 """
6384 Center(self, int direction=BOTH)
6385
6386 Centers the window. The parameter specifies the direction for
6387 cetering, and may be wx.HORIZONTAL, wx.VERTICAL or wx.BOTH. It may
6388 also include wx.CENTER_ON_SCREEN flag if you want to center the window
6389 on the entire screen and not on its parent window. If it is a
6390 top-level window and has no parent then it will always be centered
6391 relative to the screen.
6392 """
6393 return _core_.Window_Center(*args, **kwargs)
6394
6395 Centre = Center
6396 def CenterOnScreen(*args, **kwargs):
6397 """
6398 CenterOnScreen(self, int dir=BOTH)
6399
6400 Center on screen (only works for top level windows)
6401 """
6402 return _core_.Window_CenterOnScreen(*args, **kwargs)
6403
6404 CentreOnScreen = CenterOnScreen
6405 def CenterOnParent(*args, **kwargs):
6406 """
6407 CenterOnParent(self, int dir=BOTH)
6408
6409 Center with respect to the the parent window
6410 """
6411 return _core_.Window_CenterOnParent(*args, **kwargs)
6412
6413 CentreOnParent = CenterOnParent
6414 def Fit(*args, **kwargs):
6415 """
6416 Fit(self)
6417
6418 Sizes the window so that it fits around its subwindows. This function
6419 won't do anything if there are no subwindows and will only really work
6420 correctly if sizers are used for the subwindows layout. Also, if the
6421 window has exactly one subwindow it is better (faster and the result
6422 is more precise as Fit adds some margin to account for fuzziness of
6423 its calculations) to call window.SetClientSize(child.GetSize())
6424 instead of calling Fit.
6425 """
6426 return _core_.Window_Fit(*args, **kwargs)
6427
6428 def FitInside(*args, **kwargs):
6429 """
6430 FitInside(self)
6431
6432 Similar to Fit, but sizes the interior (virtual) size of a
6433 window. Mainly useful with scrolled windows to reset scrollbars after
6434 sizing changes that do not trigger a size event, and/or scrolled
6435 windows without an interior sizer. This function similarly won't do
6436 anything if there are no subwindows.
6437 """
6438 return _core_.Window_FitInside(*args, **kwargs)
6439
03837c5c 6440 def SetSizeHints(*args, **kwargs):
d55e5bfc
RD
6441 """
6442 SetSizeHints(self, int minW, int minH, int maxW=-1, int maxH=-1, int incW=-1,
6443 int incH=-1)
d55e5bfc
RD
6444
6445 Allows specification of minimum and maximum window sizes, and window
6446 size increments. If a pair of values is not set (or set to -1), the
6447 default values will be used. If this function is called, the user
908b74cd
RD
6448 will not be able to size the window outside the given bounds (if it is
6449 a top-level window.) Sizers will also inspect the minimum window size
6450 and will use that value if set when calculating layout.
6451
6452 The resizing increments are only significant under Motif or Xt.
d55e5bfc 6453 """
03837c5c 6454 return _core_.Window_SetSizeHints(*args, **kwargs)
d55e5bfc 6455
03837c5c
RD
6456 def SetSizeHintsSz(*args, **kwargs):
6457 """
6458 SetSizeHintsSz(self, Size minSize, Size maxSize=DefaultSize, Size incSize=DefaultSize)
6459
6460 Allows specification of minimum and maximum window sizes, and window
6461 size increments. If a pair of values is not set (or set to -1), the
6462 default values will be used. If this function is called, the user
6463 will not be able to size the window outside the given bounds (if it is
6464 a top-level window.) Sizers will also inspect the minimum window size
6465 and will use that value if set when calculating layout.
6466
6467 The resizing increments are only significant under Motif or Xt.
6468 """
6469 return _core_.Window_SetSizeHintsSz(*args, **kwargs)
6470
6471 def SetVirtualSizeHints(*args, **kwargs):
d55e5bfc 6472 """
908b74cd 6473 SetVirtualSizeHints(self, int minW, int minH, int maxW=-1, int maxH=-1)
d55e5bfc
RD
6474
6475 Allows specification of minimum and maximum virtual window sizes. If a
6476 pair of values is not set (or set to -1), the default values will be
6477 used. If this function is called, the user will not be able to size
6478 the virtual area of the window outside the given bounds.
6479 """
03837c5c
RD
6480 return _core_.Window_SetVirtualSizeHints(*args, **kwargs)
6481
6482 def SetVirtualSizeHintsSz(*args, **kwargs):
6483 """
6484 SetVirtualSizeHintsSz(self, Size minSize, Size maxSize=DefaultSize)
6485
6486 Allows specification of minimum and maximum virtual window sizes. If a
6487 pair of values is not set (or set to -1), the default values will be
6488 used. If this function is called, the user will not be able to size
6489 the virtual area of the window outside the given bounds.
6490 """
6491 return _core_.Window_SetVirtualSizeHintsSz(*args, **kwargs)
d55e5bfc 6492
908b74cd
RD
6493 def GetMaxSize(*args, **kwargs):
6494 """GetMaxSize(self) -> Size"""
6495 return _core_.Window_GetMaxSize(*args, **kwargs)
6496
6497 def GetMinSize(*args, **kwargs):
6498 """GetMinSize(self) -> Size"""
6499 return _core_.Window_GetMinSize(*args, **kwargs)
6500
6501 def SetMinSize(*args, **kwargs):
6502 """
6503 SetMinSize(self, Size minSize)
6504
6505 A more convenient method than `SetSizeHints` for setting just the
6506 min size.
6507 """
6508 return _core_.Window_SetMinSize(*args, **kwargs)
6509
6510 def SetMaxSize(*args, **kwargs):
6511 """
6512 SetMaxSize(self, Size maxSize)
6513
6514 A more convenient method than `SetSizeHints` for setting just the
6515 max size.
6516 """
6517 return _core_.Window_SetMaxSize(*args, **kwargs)
6518
d55e5bfc
RD
6519 def GetMinWidth(*args, **kwargs):
6520 """GetMinWidth(self) -> int"""
6521 return _core_.Window_GetMinWidth(*args, **kwargs)
6522
6523 def GetMinHeight(*args, **kwargs):
6524 """GetMinHeight(self) -> int"""
6525 return _core_.Window_GetMinHeight(*args, **kwargs)
6526
6527 def GetMaxWidth(*args, **kwargs):
6528 """GetMaxWidth(self) -> int"""
6529 return _core_.Window_GetMaxWidth(*args, **kwargs)
6530
6531 def GetMaxHeight(*args, **kwargs):
6532 """GetMaxHeight(self) -> int"""
6533 return _core_.Window_GetMaxHeight(*args, **kwargs)
6534
d55e5bfc
RD
6535 def SetVirtualSize(*args, **kwargs):
6536 """
6537 SetVirtualSize(self, Size size)
6538
6539 Set the the virtual size of a window in pixels. For most windows this
6540 is just the client area of the window, but for some like scrolled
6541 windows it is more or less independent of the screen window size.
6542 """
6543 return _core_.Window_SetVirtualSize(*args, **kwargs)
6544
6545 def SetVirtualSizeWH(*args, **kwargs):
6546 """
6547 SetVirtualSizeWH(self, int w, int h)
6548
6549 Set the the virtual size of a window in pixels. For most windows this
6550 is just the client area of the window, but for some like scrolled
6551 windows it is more or less independent of the screen window size.
6552 """
6553 return _core_.Window_SetVirtualSizeWH(*args, **kwargs)
6554
6555 def GetVirtualSize(*args, **kwargs):
6556 """
6557 GetVirtualSize(self) -> Size
6558
6559 Get the the virtual size of the window in pixels. For most windows
6560 this is just the client area of the window, but for some like scrolled
6561 windows it is more or less independent of the screen window size.
6562 """
6563 return _core_.Window_GetVirtualSize(*args, **kwargs)
6564
6565 def GetVirtualSizeTuple(*args, **kwargs):
6566 """
6567 GetVirtualSizeTuple() -> (width, height)
6568
6569 Get the the virtual size of the window in pixels. For most windows
6570 this is just the client area of the window, but for some like scrolled
6571 windows it is more or less independent of the screen window size.
6572 """
6573 return _core_.Window_GetVirtualSizeTuple(*args, **kwargs)
6574
6575 def GetBestVirtualSize(*args, **kwargs):
6576 """
6577 GetBestVirtualSize(self) -> Size
6578
6579 Return the largest of ClientSize and BestSize (as determined by a
6580 sizer, interior children, or other means)
6581 """
6582 return _core_.Window_GetBestVirtualSize(*args, **kwargs)
6583
6584 def Show(*args, **kwargs):
6585 """
6586 Show(self, bool show=True) -> bool
6587
6588 Shows or hides the window. You may need to call Raise for a top level
6589 window if you want to bring it to top, although this is not needed if
6590 Show is called immediately after the frame creation. Returns True if
6591 the window has been shown or hidden or False if nothing was done
6592 because it already was in the requested state.
6593 """
6594 return _core_.Window_Show(*args, **kwargs)
6595
6596 def Hide(*args, **kwargs):
6597 """
6598 Hide(self) -> bool
6599
6600 Equivalent to calling Show(False).
6601 """
6602 return _core_.Window_Hide(*args, **kwargs)
6603
6604 def Enable(*args, **kwargs):
6605 """
6606 Enable(self, bool enable=True) -> bool
6607
6608 Enable or disable the window for user input. Note that when a parent
6609 window is disabled, all of its children are disabled as well and they
6610 are reenabled again when the parent is. Returns true if the window
6611 has been enabled or disabled, false if nothing was done, i.e. if the
6612 window had already been in the specified state.
6613 """
6614 return _core_.Window_Enable(*args, **kwargs)
6615
6616 def Disable(*args, **kwargs):
6617 """
6618 Disable(self) -> bool
6619
6620 Disables the window, same as Enable(false).
6621 """
6622 return _core_.Window_Disable(*args, **kwargs)
6623
6624 def IsShown(*args, **kwargs):
6625 """
6626 IsShown(self) -> bool
6627
6628 Returns true if the window is shown, false if it has been hidden.
6629 """
6630 return _core_.Window_IsShown(*args, **kwargs)
6631
6632 def IsEnabled(*args, **kwargs):
6633 """
6634 IsEnabled(self) -> bool
6635
6636 Returns true if the window is enabled for input, false otherwise.
6637 """
6638 return _core_.Window_IsEnabled(*args, **kwargs)
6639
6640 def SetWindowStyleFlag(*args, **kwargs):
6641 """
6642 SetWindowStyleFlag(self, long style)
6643
79fccf9d
RD
6644 Sets the style of the window. Please note that some styles cannot be
6645 changed after the window creation and that Refresh() might need to be
6646 called after changing the others for the change to take place
6647 immediately.
d55e5bfc
RD
6648 """
6649 return _core_.Window_SetWindowStyleFlag(*args, **kwargs)
6650
6651 def GetWindowStyleFlag(*args, **kwargs):
6652 """
6653 GetWindowStyleFlag(self) -> long
6654
6655 Gets the window style that was passed to the constructor or Create
6656 method.
6657 """
6658 return _core_.Window_GetWindowStyleFlag(*args, **kwargs)
6659
6660 SetWindowStyle = SetWindowStyleFlag; GetWindowStyle = GetWindowStyleFlag
6661 def HasFlag(*args, **kwargs):
6662 """
6663 HasFlag(self, int flag) -> bool
6664
6665 Test if the given style is set for this window.
6666 """
6667 return _core_.Window_HasFlag(*args, **kwargs)
6668
6669 def IsRetained(*args, **kwargs):
6670 """
6671 IsRetained(self) -> bool
6672
6673 Returns true if the window is retained, false otherwise. Retained
6674 windows are only available on X platforms.
6675 """
6676 return _core_.Window_IsRetained(*args, **kwargs)
6677
6678 def SetExtraStyle(*args, **kwargs):
6679 """
6680 SetExtraStyle(self, long exStyle)
6681
6682 Sets the extra style bits for the window. Extra styles are the less
6683 often used style bits which can't be set with the constructor or with
6684 SetWindowStyleFlag()
6685 """
6686 return _core_.Window_SetExtraStyle(*args, **kwargs)
6687
6688 def GetExtraStyle(*args, **kwargs):
6689 """
6690 GetExtraStyle(self) -> long
6691
6692 Returns the extra style bits for the window.
6693 """
6694 return _core_.Window_GetExtraStyle(*args, **kwargs)
6695
6696 def MakeModal(*args, **kwargs):
6697 """
6698 MakeModal(self, bool modal=True)
6699
6700 Disables all other windows in the application so that the user can
6701 only interact with this window. Passing False will reverse this
6702 effect.
6703 """
6704 return _core_.Window_MakeModal(*args, **kwargs)
6705
6706 def SetThemeEnabled(*args, **kwargs):
6707 """
6708 SetThemeEnabled(self, bool enableTheme)
6709
6710 This function tells a window if it should use the system's "theme"
6711 code to draw the windows' background instead if its own background
6712 drawing code. This will only have an effect on platforms that support
6713 the notion of themes in user defined windows. One such platform is
6714 GTK+ where windows can have (very colourful) backgrounds defined by a
6715 user's selected theme.
6716
6717 Dialogs, notebook pages and the status bar have this flag set to true
6718 by default so that the default look and feel is simulated best.
6719 """
6720 return _core_.Window_SetThemeEnabled(*args, **kwargs)
6721
6722 def GetThemeEnabled(*args, **kwargs):
6723 """
6724 GetThemeEnabled(self) -> bool
6725
6726 Return the themeEnabled flag.
6727 """
6728 return _core_.Window_GetThemeEnabled(*args, **kwargs)
6729
6730 def SetFocus(*args, **kwargs):
6731 """
6732 SetFocus(self)
6733
6734 Set's the focus to this window, allowing it to receive keyboard input.
6735 """
6736 return _core_.Window_SetFocus(*args, **kwargs)
6737
6738 def SetFocusFromKbd(*args, **kwargs):
6739 """
6740 SetFocusFromKbd(self)
6741
6742 Set focus to this window as the result of a keyboard action. Normally
6743 only called internally.
6744 """
6745 return _core_.Window_SetFocusFromKbd(*args, **kwargs)
6746
6747 def FindFocus(*args, **kwargs):
6748 """
c24da6d6 6749 FindFocus() -> Window
d55e5bfc
RD
6750
6751 Returns the window or control that currently has the keyboard focus,
6752 or None.
6753 """
6754 return _core_.Window_FindFocus(*args, **kwargs)
6755
6756 FindFocus = staticmethod(FindFocus)
6757 def AcceptsFocus(*args, **kwargs):
6758 """
6759 AcceptsFocus(self) -> bool
6760
6761 Can this window have focus?
6762 """
6763 return _core_.Window_AcceptsFocus(*args, **kwargs)
6764
6765 def AcceptsFocusFromKeyboard(*args, **kwargs):
6766 """
6767 AcceptsFocusFromKeyboard(self) -> bool
6768
6769 Can this window be given focus by keyboard navigation? if not, the
6770 only way to give it focus (provided it accepts it at all) is to click
6771 it.
6772 """
6773 return _core_.Window_AcceptsFocusFromKeyboard(*args, **kwargs)
6774
6775 def GetDefaultItem(*args, **kwargs):
6776 """
6777 GetDefaultItem(self) -> Window
6778
6779 Get the default child of this parent, i.e. the one which is activated
6780 by pressing <Enter> such as the OK button on a wx.Dialog.
6781 """
6782 return _core_.Window_GetDefaultItem(*args, **kwargs)
6783
6784 def SetDefaultItem(*args, **kwargs):
6785 """
6786 SetDefaultItem(self, Window child) -> Window
6787
6788 Set this child as default, return the old default.
6789 """
6790 return _core_.Window_SetDefaultItem(*args, **kwargs)
6791
6792 def SetTmpDefaultItem(*args, **kwargs):
6793 """
6794 SetTmpDefaultItem(self, Window win)
6795
6796 Set this child as temporary default
6797 """
6798 return _core_.Window_SetTmpDefaultItem(*args, **kwargs)
6799
908b74cd
RD
6800 def Navigate(*args, **kwargs):
6801 """
6802 Navigate(self, int flags=NavigationKeyEvent.IsForward) -> bool
6803
a8eff060
RD
6804 Does keyboard navigation from this window to another, by sending a
6805 `wx.NavigationKeyEvent`.
908b74cd
RD
6806 """
6807 return _core_.Window_Navigate(*args, **kwargs)
6808
bf26d883
RD
6809 def MoveAfterInTabOrder(*args, **kwargs):
6810 """
6811 MoveAfterInTabOrder(self, Window win)
6812
6813 Moves this window in the tab navigation order after the specified
6814 sibling window. This means that when the user presses the TAB key on
6815 that other window, the focus switches to this window.
6816
6817 The default tab order is the same as creation order. This function
6818 and `MoveBeforeInTabOrder` allow to change it after creating all the
6819 windows.
6820
6821 """
6822 return _core_.Window_MoveAfterInTabOrder(*args, **kwargs)
6823
6824 def MoveBeforeInTabOrder(*args, **kwargs):
6825 """
6826 MoveBeforeInTabOrder(self, Window win)
6827
6828 Same as `MoveAfterInTabOrder` except that it inserts this window just
6829 before win instead of putting it right after it.
6830 """
6831 return _core_.Window_MoveBeforeInTabOrder(*args, **kwargs)
6832
d55e5bfc
RD
6833 def GetChildren(*args, **kwargs):
6834 """
6835 GetChildren(self) -> PyObject
6836
6837 Returns a list of the window's children. NOTE: Currently this is a
6838 copy of the child window list maintained by the window, so the return
6839 value of this function is only valid as long as the window's children
6840 do not change.
6841 """
6842 return _core_.Window_GetChildren(*args, **kwargs)
6843
6844 def GetParent(*args, **kwargs):
6845 """
6846 GetParent(self) -> Window
6847
6848 Returns the parent window of this window, or None if there isn't one.
6849 """
6850 return _core_.Window_GetParent(*args, **kwargs)
6851
6852 def GetGrandParent(*args, **kwargs):
6853 """
6854 GetGrandParent(self) -> Window
6855
79fccf9d
RD
6856 Returns the parent of the parent of this window, or None if there
6857 isn't one.
d55e5bfc
RD
6858 """
6859 return _core_.Window_GetGrandParent(*args, **kwargs)
6860
6861 def IsTopLevel(*args, **kwargs):
6862 """
6863 IsTopLevel(self) -> bool
6864
6865 Returns true if the given window is a top-level one. Currently all
6866 frames and dialogs are always considered to be top-level windows (even
6867 if they have a parent window).
6868 """
6869 return _core_.Window_IsTopLevel(*args, **kwargs)
6870
6871 def Reparent(*args, **kwargs):
6872 """
6873 Reparent(self, Window newParent) -> bool
6874
6875 Reparents the window, i.e the window will be removed from its current
6876 parent window (e.g. a non-standard toolbar in a wxFrame) and then
6877 re-inserted into another. Available on Windows and GTK. Returns True
6878 if the parent was changed, False otherwise (error or newParent ==
6879 oldParent)
6880 """
6881 return _core_.Window_Reparent(*args, **kwargs)
6882
6883 def AddChild(*args, **kwargs):
6884 """
6885 AddChild(self, Window child)
6886
6887 Adds a child window. This is called automatically by window creation
6888 functions so should not be required by the application programmer.
6889 """
6890 return _core_.Window_AddChild(*args, **kwargs)
6891
6892 def RemoveChild(*args, **kwargs):
6893 """
6894 RemoveChild(self, Window child)
6895
6896 Removes a child window. This is called automatically by window
6897 deletion functions so should not be required by the application
6898 programmer.
6899 """
6900 return _core_.Window_RemoveChild(*args, **kwargs)
6901
6902 def FindWindowById(*args, **kwargs):
6903 """
6904 FindWindowById(self, long winid) -> Window
6905
6906 Find a chld of this window by window ID
6907 """
6908 return _core_.Window_FindWindowById(*args, **kwargs)
6909
6910 def FindWindowByName(*args, **kwargs):
6911 """
6912 FindWindowByName(self, String name) -> Window
6913
6914 Find a child of this window by name
6915 """
6916 return _core_.Window_FindWindowByName(*args, **kwargs)
6917
6918 def GetEventHandler(*args, **kwargs):
6919 """
6920 GetEventHandler(self) -> EvtHandler
6921
6922 Returns the event handler for this window. By default, the window is
6923 its own event handler.
6924 """
6925 return _core_.Window_GetEventHandler(*args, **kwargs)
6926
6927 def SetEventHandler(*args, **kwargs):
6928 """
6929 SetEventHandler(self, EvtHandler handler)
6930
6931 Sets the event handler for this window. An event handler is an object
6932 that is capable of processing the events sent to a window. By default,
6933 the window is its own event handler, but an application may wish to
6934 substitute another, for example to allow central implementation of
6935 event-handling for a variety of different window classes.
6936
79fccf9d 6937 It is usually better to use `wx.Window.PushEventHandler` since this sets
d55e5bfc
RD
6938 up a chain of event handlers, where an event not handled by one event
6939 handler is handed to the next one in the chain.
6940 """
6941 return _core_.Window_SetEventHandler(*args, **kwargs)
6942
6943 def PushEventHandler(*args, **kwargs):
6944 """
6945 PushEventHandler(self, EvtHandler handler)
6946
6947 Pushes this event handler onto the event handler stack for the window.
6948 An event handler is an object that is capable of processing the events
6949 sent to a window. By default, the window is its own event handler, but
6950 an application may wish to substitute another, for example to allow
6951 central implementation of event-handling for a variety of different
6952 window classes.
6953
6954 wx.Window.PushEventHandler allows an application to set up a chain of
6955 event handlers, where an event not handled by one event handler is
79fccf9d 6956 handed to the next one in the chain. Use `wx.Window.PopEventHandler` to
d55e5bfc
RD
6957 remove the event handler.
6958 """
6959 return _core_.Window_PushEventHandler(*args, **kwargs)
6960
6961 def PopEventHandler(*args, **kwargs):
6962 """
6963 PopEventHandler(self, bool deleteHandler=False) -> EvtHandler
6964
6965 Removes and returns the top-most event handler on the event handler
6966 stack. If deleteHandler is True then the wx.EvtHandler object will be
6967 destroyed after it is popped.
6968 """
6969 return _core_.Window_PopEventHandler(*args, **kwargs)
6970
6971 def RemoveEventHandler(*args, **kwargs):
6972 """
6973 RemoveEventHandler(self, EvtHandler handler) -> bool
6974
79fccf9d
RD
6975 Find the given handler in the event handler chain and remove (but not
6976 delete) it from the event handler chain, return True if it was found
6977 and False otherwise (this also results in an assert failure so this
6978 function should only be called when the handler is supposed to be
6979 there.)
d55e5bfc
RD
6980 """
6981 return _core_.Window_RemoveEventHandler(*args, **kwargs)
6982
6983 def SetValidator(*args, **kwargs):
6984 """
6985 SetValidator(self, Validator validator)
6986
6987 Deletes the current validator (if any) and sets the window validator,
6988 having called wx.Validator.Clone to create a new validator of this
6989 type.
6990 """
6991 return _core_.Window_SetValidator(*args, **kwargs)
6992
6993 def GetValidator(*args, **kwargs):
6994 """
6995 GetValidator(self) -> Validator
6996
6997 Returns a pointer to the current validator for the window, or None if
6998 there is none.
6999 """
7000 return _core_.Window_GetValidator(*args, **kwargs)
7001
7002 def Validate(*args, **kwargs):
7003 """
7004 Validate(self) -> bool
7005
7006 Validates the current values of the child controls using their
79fccf9d
RD
7007 validators. If the window has wx.WS_EX_VALIDATE_RECURSIVELY extra
7008 style flag set, the method will also call Validate() of all child
7009 windows. Returns false if any of the validations failed.
d55e5bfc
RD
7010 """
7011 return _core_.Window_Validate(*args, **kwargs)
7012
7013 def TransferDataToWindow(*args, **kwargs):
7014 """
7015 TransferDataToWindow(self) -> bool
7016
79fccf9d
RD
7017 Transfers values to child controls from data areas specified by their
7018 validators. If the window has wx.WS_EX_VALIDATE_RECURSIVELY extra
7019 style flag set, the method will also call TransferDataToWindow() of
7020 all child windows.
d55e5bfc
RD
7021 """
7022 return _core_.Window_TransferDataToWindow(*args, **kwargs)
7023
7024 def TransferDataFromWindow(*args, **kwargs):
7025 """
7026 TransferDataFromWindow(self) -> bool
7027
79fccf9d
RD
7028 Transfers values from child controls to data areas specified by their
7029 validators. Returns false if a transfer failed. If the window has
7030 wx.WS_EX_VALIDATE_RECURSIVELY extra style flag set, the method will
7031 also call TransferDataFromWindow() of all child windows.
d55e5bfc
RD
7032 """
7033 return _core_.Window_TransferDataFromWindow(*args, **kwargs)
7034
7035 def InitDialog(*args, **kwargs):
7036 """
7037 InitDialog(self)
7038
79fccf9d
RD
7039 Sends an EVT_INIT_DIALOG event, whose handler usually transfers data
7040 to the dialog via validators.
d55e5bfc
RD
7041 """
7042 return _core_.Window_InitDialog(*args, **kwargs)
7043
7044 def SetAcceleratorTable(*args, **kwargs):
7045 """
7046 SetAcceleratorTable(self, AcceleratorTable accel)
7047
7048 Sets the accelerator table for this window.
7049 """
7050 return _core_.Window_SetAcceleratorTable(*args, **kwargs)
7051
7052 def GetAcceleratorTable(*args, **kwargs):
7053 """
7054 GetAcceleratorTable(self) -> AcceleratorTable
7055
7056 Gets the accelerator table for this window.
7057 """
7058 return _core_.Window_GetAcceleratorTable(*args, **kwargs)
7059
7060 def RegisterHotKey(*args, **kwargs):
7061 """
7062 RegisterHotKey(self, int hotkeyId, int modifiers, int keycode) -> bool
7063
7064 Registers a system wide hotkey. Every time the user presses the hotkey
7065 registered here, this window will receive a hotkey event. It will
7066 receive the event even if the application is in the background and
7067 does not have the input focus because the user is working with some
7068 other application. To bind an event handler function to this hotkey
7069 use EVT_HOTKEY with an id equal to hotkeyId. Returns True if the
7070 hotkey was registered successfully.
7071 """
7072 return _core_.Window_RegisterHotKey(*args, **kwargs)
7073
7074 def UnregisterHotKey(*args, **kwargs):
7075 """
7076 UnregisterHotKey(self, int hotkeyId) -> bool
7077
7078 Unregisters a system wide hotkey.
7079 """
7080 return _core_.Window_UnregisterHotKey(*args, **kwargs)
7081
7082 def ConvertDialogPointToPixels(*args, **kwargs):
7083 """
7084 ConvertDialogPointToPixels(self, Point pt) -> Point
7085
7086 Converts a point or size from dialog units to pixels. Dialog units
7087 are used for maintaining a dialog's proportions even if the font
7088 changes. For the x dimension, the dialog units are multiplied by the
7089 average character width and then divided by 4. For the y dimension,
7090 the dialog units are multiplied by the average character height and
7091 then divided by 8.
7092 """
7093 return _core_.Window_ConvertDialogPointToPixels(*args, **kwargs)
7094
7095 def ConvertDialogSizeToPixels(*args, **kwargs):
7096 """
7097 ConvertDialogSizeToPixels(self, Size sz) -> Size
7098
7099 Converts a point or size from dialog units to pixels. Dialog units
7100 are used for maintaining a dialog's proportions even if the font
7101 changes. For the x dimension, the dialog units are multiplied by the
7102 average character width and then divided by 4. For the y dimension,
7103 the dialog units are multiplied by the average character height and
7104 then divided by 8.
7105 """
7106 return _core_.Window_ConvertDialogSizeToPixels(*args, **kwargs)
7107
7108 def DLG_PNT(*args, **kwargs):
7109 """
7110 DLG_PNT(self, Point pt) -> Point
7111
7112 Converts a point or size from dialog units to pixels. Dialog units
7113 are used for maintaining a dialog's proportions even if the font
7114 changes. For the x dimension, the dialog units are multiplied by the
7115 average character width and then divided by 4. For the y dimension,
7116 the dialog units are multiplied by the average character height and
7117 then divided by 8.
7118 """
7119 return _core_.Window_DLG_PNT(*args, **kwargs)
7120
7121 def DLG_SZE(*args, **kwargs):
7122 """
7123 DLG_SZE(self, Size sz) -> Size
7124
7125 Converts a point or size from dialog units to pixels. Dialog units
7126 are used for maintaining a dialog's proportions even if the font
7127 changes. For the x dimension, the dialog units are multiplied by the
7128 average character width and then divided by 4. For the y dimension,
7129 the dialog units are multiplied by the average character height and
7130 then divided by 8.
7131 """
7132 return _core_.Window_DLG_SZE(*args, **kwargs)
7133
7134 def ConvertPixelPointToDialog(*args, **kwargs):
7135 """ConvertPixelPointToDialog(self, Point pt) -> Point"""
7136 return _core_.Window_ConvertPixelPointToDialog(*args, **kwargs)
7137
7138 def ConvertPixelSizeToDialog(*args, **kwargs):
7139 """ConvertPixelSizeToDialog(self, Size sz) -> Size"""
7140 return _core_.Window_ConvertPixelSizeToDialog(*args, **kwargs)
7141
7142 def WarpPointer(*args, **kwargs):
7143 """
7144 WarpPointer(self, int x, int y)
7145
7146 Moves the pointer to the given position on the window.
7147
7148 NOTE: This function is not supported under Mac because Apple Human
7149 Interface Guidelines forbid moving the mouse cursor programmatically.
7150 """
7151 return _core_.Window_WarpPointer(*args, **kwargs)
7152
7153 def CaptureMouse(*args, **kwargs):
7154 """
7155 CaptureMouse(self)
7156
7157 Directs all mouse input to this window. Call wx.Window.ReleaseMouse to
7158 release the capture.
7159
7160 Note that wxWindows maintains the stack of windows having captured the
7161 mouse and when the mouse is released the capture returns to the window
7162 which had had captured it previously and it is only really released if
7163 there were no previous window. In particular, this means that you must
7164 release the mouse as many times as you capture it.
7165 """
7166 return _core_.Window_CaptureMouse(*args, **kwargs)
7167
7168 def ReleaseMouse(*args, **kwargs):
7169 """
7170 ReleaseMouse(self)
7171
7172 Releases mouse input captured with wx.Window.CaptureMouse.
7173 """
7174 return _core_.Window_ReleaseMouse(*args, **kwargs)
7175
7176 def GetCapture(*args, **kwargs):
7177 """
c24da6d6 7178 GetCapture() -> Window
d55e5bfc
RD
7179
7180 Returns the window which currently captures the mouse or None
7181 """
7182 return _core_.Window_GetCapture(*args, **kwargs)
7183
7184 GetCapture = staticmethod(GetCapture)
7185 def HasCapture(*args, **kwargs):
7186 """
7187 HasCapture(self) -> bool
7188
7189 Returns true if this window has the current mouse capture.
7190 """
7191 return _core_.Window_HasCapture(*args, **kwargs)
7192
7193 def Refresh(*args, **kwargs):
7194 """
7195 Refresh(self, bool eraseBackground=True, Rect rect=None)
7196
7197 Mark the specified rectangle (or the whole window) as "dirty" so it
7198 will be repainted. Causes an EVT_PAINT event to be generated and sent
7199 to the window.
7200 """
7201 return _core_.Window_Refresh(*args, **kwargs)
7202
7203 def RefreshRect(*args, **kwargs):
7204 """
fef4c27a 7205 RefreshRect(self, Rect rect, bool eraseBackground=True)
d55e5bfc
RD
7206
7207 Redraws the contents of the given rectangle: the area inside it will
7208 be repainted. This is the same as Refresh but has a nicer syntax.
7209 """
7210 return _core_.Window_RefreshRect(*args, **kwargs)
7211
7212 def Update(*args, **kwargs):
7213 """
7214 Update(self)
7215
7216 Calling this method immediately repaints the invalidated area of the
7217 window instead of waiting for the EVT_PAINT event to happen, (normally
7218 this would usually only happen when the flow of control returns to the
7219 event loop.) Notice that this function doesn't refresh the window and
7220 does nothing if the window has been already repainted. Use Refresh
7221 first if you want to immediately redraw the window (or some portion of
7222 it) unconditionally.
7223 """
7224 return _core_.Window_Update(*args, **kwargs)
7225
7226 def ClearBackground(*args, **kwargs):
7227 """
7228 ClearBackground(self)
7229
7230 Clears the window by filling it with the current background
7231 colour. Does not cause an erase background event to be generated.
7232 """
7233 return _core_.Window_ClearBackground(*args, **kwargs)
7234
7235 def Freeze(*args, **kwargs):
7236 """
7237 Freeze(self)
7238
79fccf9d
RD
7239 Freezes the window or, in other words, prevents any updates from
7240 taking place on screen, the window is not redrawn at all. Thaw must be
7241 called to reenable window redrawing. Calls to Freeze/Thaw may be
7242 nested, with the actual Thaw being delayed until all the nesting has
7243 been undone.
d55e5bfc
RD
7244
7245 This method is useful for visual appearance optimization (for example,
7246 it is a good idea to use it before inserting large amount of text into
7247 a wxTextCtrl under wxGTK) but is not implemented on all platforms nor
7248 for all controls so it is mostly just a hint to wxWindows and not a
7249 mandatory directive.
7250 """
7251 return _core_.Window_Freeze(*args, **kwargs)
7252
7253 def Thaw(*args, **kwargs):
7254 """
7255 Thaw(self)
7256
7257 Reenables window updating after a previous call to Freeze. Calls to
79fccf9d
RD
7258 Freeze/Thaw may be nested, so Thaw must be called the same number of
7259 times that Freeze was before the window will be updated.
d55e5bfc
RD
7260 """
7261 return _core_.Window_Thaw(*args, **kwargs)
7262
7263 def PrepareDC(*args, **kwargs):
7264 """
7265 PrepareDC(self, DC dc)
7266
7267 Call this function to prepare the device context for drawing a
7268 scrolled image. It sets the device origin according to the current
7269 scroll position.
7270 """
7271 return _core_.Window_PrepareDC(*args, **kwargs)
7272
7273 def GetUpdateRegion(*args, **kwargs):
7274 """
7275 GetUpdateRegion(self) -> Region
7276
7277 Returns the region specifying which parts of the window have been
7278 damaged. Should only be called within an EVT_PAINT handler.
7279 """
7280 return _core_.Window_GetUpdateRegion(*args, **kwargs)
7281
7282 def GetUpdateClientRect(*args, **kwargs):
7283 """
7284 GetUpdateClientRect(self) -> Rect
7285
7286 Get the update rectangle region bounding box in client coords.
7287 """
7288 return _core_.Window_GetUpdateClientRect(*args, **kwargs)
7289
7290 def IsExposed(*args, **kwargs):
7291 """
7292 IsExposed(self, int x, int y, int w=1, int h=1) -> bool
7293
7294 Returns true if the given point or rectangle area has been exposed
7295 since the last repaint. Call this in an paint event handler to
7296 optimize redrawing by only redrawing those areas, which have been
7297 exposed.
7298 """
7299 return _core_.Window_IsExposed(*args, **kwargs)
7300
7301 def IsExposedPoint(*args, **kwargs):
7302 """
7303 IsExposedPoint(self, Point pt) -> bool
7304
7305 Returns true if the given point or rectangle area has been exposed
7306 since the last repaint. Call this in an paint event handler to
7307 optimize redrawing by only redrawing those areas, which have been
7308 exposed.
7309 """
7310 return _core_.Window_IsExposedPoint(*args, **kwargs)
7311
7312 def IsExposedRect(*args, **kwargs):
7313 """
7314 IsExposedRect(self, Rect rect) -> bool
7315
7316 Returns true if the given point or rectangle area has been exposed
7317 since the last repaint. Call this in an paint event handler to
7318 optimize redrawing by only redrawing those areas, which have been
7319 exposed.
7320 """
7321 return _core_.Window_IsExposedRect(*args, **kwargs)
7322
7323 def GetDefaultAttributes(*args, **kwargs):
7324 """
7325 GetDefaultAttributes(self) -> VisualAttributes
7326
79fccf9d
RD
7327 Get the default attributes for an instance of this class. This is
7328 useful if you want to use the same font or colour in your own control
7329 as in a standard control -- which is a much better idea than hard
7330 coding specific colours or fonts which might look completely out of
caef1a4d 7331 place on the user's system, especially if it uses themes.
d55e5bfc
RD
7332 """
7333 return _core_.Window_GetDefaultAttributes(*args, **kwargs)
7334
7335 def GetClassDefaultAttributes(*args, **kwargs):
7336 """
c24da6d6 7337 GetClassDefaultAttributes(int variant=WINDOW_VARIANT_NORMAL) -> VisualAttributes
d55e5bfc 7338
79fccf9d
RD
7339 Get the default attributes for this class. This is useful if you want
7340 to use the same font or colour in your own control as in a standard
7341 control -- which is a much better idea than hard coding specific
caef1a4d
RD
7342 colours or fonts which might look completely out of place on the
7343 user's system, especially if it uses themes.
d55e5bfc
RD
7344
7345 The variant parameter is only relevant under Mac currently and is
79fccf9d 7346 ignore under other platforms. Under Mac, it will change the size of
caef1a4d
RD
7347 the returned font. See `wx.Window.SetWindowVariant` for more about
7348 this.
d55e5bfc
RD
7349 """
7350 return _core_.Window_GetClassDefaultAttributes(*args, **kwargs)
7351
7352 GetClassDefaultAttributes = staticmethod(GetClassDefaultAttributes)
7353 def SetBackgroundColour(*args, **kwargs):
7354 """
7355 SetBackgroundColour(self, Colour colour) -> bool
7356
7357 Sets the background colour of the window. Returns True if the colour
7358 was changed. The background colour is usually painted by the default
7359 EVT_ERASE_BACKGROUND event handler function under Windows and
f8167d6e
RD
7360 automatically under GTK. Using `wx.NullColour` will reset the window
7361 to the default background colour.
d55e5bfc 7362
caef1a4d 7363 Note that setting the background colour may not cause an immediate
f8167d6e 7364 refresh, so you may wish to call `ClearBackground` or `Refresh` after
d55e5bfc
RD
7365 calling this function.
7366
f8167d6e
RD
7367 Using this function will disable attempts to use themes for this
7368 window, if the system supports them. Use with care since usually the
7369 themes represent the appearance chosen by the user to be used for all
7370 applications on the system.
d55e5bfc
RD
7371 """
7372 return _core_.Window_SetBackgroundColour(*args, **kwargs)
7373
412d302d
RD
7374 def SetOwnBackgroundColour(*args, **kwargs):
7375 """SetOwnBackgroundColour(self, Colour colour)"""
7376 return _core_.Window_SetOwnBackgroundColour(*args, **kwargs)
d55e5bfc
RD
7377
7378 def SetForegroundColour(*args, **kwargs):
7379 """
7380 SetForegroundColour(self, Colour colour) -> bool
7381
7382 Sets the foreground colour of the window. Returns True is the colour
7383 was changed. The interpretation of foreground colour is dependent on
7384 the window class; it may be the text colour or other colour, or it may
7385 not be used at all.
7386 """
7387 return _core_.Window_SetForegroundColour(*args, **kwargs)
7388
fa47d7a7
VS
7389 def SetOwnForegroundColour(*args, **kwargs):
7390 """SetOwnForegroundColour(self, Colour colour)"""
7391 return _core_.Window_SetOwnForegroundColour(*args, **kwargs)
d55e5bfc
RD
7392
7393 def GetBackgroundColour(*args, **kwargs):
7394 """
7395 GetBackgroundColour(self) -> Colour
7396
7397 Returns the background colour of the window.
7398 """
7399 return _core_.Window_GetBackgroundColour(*args, **kwargs)
7400
7401 def GetForegroundColour(*args, **kwargs):
7402 """
7403 GetForegroundColour(self) -> Colour
7404
7405 Returns the foreground colour of the window. The interpretation of
7406 foreground colour is dependent on the window class; it may be the text
7407 colour or other colour, or it may not be used at all.
7408 """
7409 return _core_.Window_GetForegroundColour(*args, **kwargs)
7410
dcb8fc74
RD
7411 def InheritsBackgroundColour(*args, **kwargs):
7412 """InheritsBackgroundColour(self) -> bool"""
7413 return _core_.Window_InheritsBackgroundColour(*args, **kwargs)
7414
7415 def UseBgCol(*args, **kwargs):
7416 """UseBgCol(self) -> bool"""
7417 return _core_.Window_UseBgCol(*args, **kwargs)
7418
0f63ec68
RD
7419 def SetBackgroundStyle(*args, **kwargs):
7420 """
7421 SetBackgroundStyle(self, int style) -> bool
7422
7423 Returns the background style of the window. The background style
7424 indicates how the background of the window is drawn.
7425
7426 ====================== ========================================
7427 wx.BG_STYLE_SYSTEM The background colour or pattern should
7428 be determined by the system
7429 wx.BG_STYLE_COLOUR The background should be a solid colour
7430 wx.BG_STYLE_CUSTOM The background will be implemented by the
7431 application.
7432 ====================== ========================================
7433
7434 On GTK+, use of wx.BG_STYLE_CUSTOM allows the flicker-free drawing of
7435 a custom background, such as a tiled bitmap. Currently the style has
7436 no effect on other platforms.
7437
7438 :see: `GetBackgroundStyle`, `SetBackgroundColour`
7439 """
7440 return _core_.Window_SetBackgroundStyle(*args, **kwargs)
7441
7442 def GetBackgroundStyle(*args, **kwargs):
7443 """
7444 GetBackgroundStyle(self) -> int
7445
7446 Returns the background style of the window.
7447
7448 :see: `SetBackgroundStyle`
7449 """
7450 return _core_.Window_GetBackgroundStyle(*args, **kwargs)
7451
51b83b37
RD
7452 def HasTransparentBackground(*args, **kwargs):
7453 """
7454 HasTransparentBackground(self) -> bool
7455
7456 Returns True if this window's background is transparent (as, for
7457 example, for `wx.StaticText`) and should show the parent window's
7458 background.
7459
7460 This method is mostly used internally by the library itself and you
7461 normally shouldn't have to call it. You may, however, have to override
7462 it in your custom control classes to ensure that background is painted
7463 correctly.
7464 """
7465 return _core_.Window_HasTransparentBackground(*args, **kwargs)
7466
d55e5bfc
RD
7467 def SetCursor(*args, **kwargs):
7468 """
7469 SetCursor(self, Cursor cursor) -> bool
7470
7471 Sets the window's cursor. Notice that the window cursor also sets it
7472 for the children of the window implicitly.
7473
7474 The cursor may be wx.NullCursor in which case the window cursor will
7475 be reset back to default.
7476 """
7477 return _core_.Window_SetCursor(*args, **kwargs)
7478
7479 def GetCursor(*args, **kwargs):
7480 """
7481 GetCursor(self) -> Cursor
7482
7483 Return the cursor associated with this window.
7484 """
7485 return _core_.Window_GetCursor(*args, **kwargs)
7486
7487 def SetFont(*args, **kwargs):
7488 """
7489 SetFont(self, Font font) -> bool
7490
7491 Sets the font for this window.
7492 """
7493 return _core_.Window_SetFont(*args, **kwargs)
7494
fa47d7a7
VS
7495 def SetOwnFont(*args, **kwargs):
7496 """SetOwnFont(self, Font font)"""
7497 return _core_.Window_SetOwnFont(*args, **kwargs)
d55e5bfc
RD
7498
7499 def GetFont(*args, **kwargs):
7500 """
7501 GetFont(self) -> Font
7502
7503 Returns the default font used for this window.
7504 """
7505 return _core_.Window_GetFont(*args, **kwargs)
7506
7507 def SetCaret(*args, **kwargs):
7508 """
7509 SetCaret(self, Caret caret)
7510
7511 Sets the caret associated with the window.
7512 """
7513 return _core_.Window_SetCaret(*args, **kwargs)
7514
7515 def GetCaret(*args, **kwargs):
7516 """
7517 GetCaret(self) -> Caret
7518
7519 Returns the caret associated with the window.
7520 """
7521 return _core_.Window_GetCaret(*args, **kwargs)
7522
7523 def GetCharHeight(*args, **kwargs):
7524 """
7525 GetCharHeight(self) -> int
7526
7527 Get the (average) character size for the current font.
7528 """
7529 return _core_.Window_GetCharHeight(*args, **kwargs)
7530
7531 def GetCharWidth(*args, **kwargs):
7532 """
7533 GetCharWidth(self) -> int
7534
7535 Get the (average) character size for the current font.
7536 """
7537 return _core_.Window_GetCharWidth(*args, **kwargs)
7538
7539 def GetTextExtent(*args, **kwargs):
a8eff060
RD
7540 """
7541 GetTextExtent(String string) -> (width, height)
7542
7543 Get the width and height of the text using the current font.
7544 """
d55e5bfc
RD
7545 return _core_.Window_GetTextExtent(*args, **kwargs)
7546
7547 def GetFullTextExtent(*args, **kwargs):
7548 """
7549 GetFullTextExtent(String string, Font font=None) ->
7550 (width, height, descent, externalLeading)
7551
7552 Get the width, height, decent and leading of the text using the
7553 current or specified font.
7554 """
7555 return _core_.Window_GetFullTextExtent(*args, **kwargs)
7556
7557 def ClientToScreenXY(*args, **kwargs):
7558 """
7559 ClientToScreenXY(int x, int y) -> (x,y)
7560
7561 Converts to screen coordinates from coordinates relative to this window.
7562 """
7563 return _core_.Window_ClientToScreenXY(*args, **kwargs)
7564
7565 def ScreenToClientXY(*args, **kwargs):
7566 """
7567 ScreenToClientXY(int x, int y) -> (x,y)
7568
7569 Converts from screen to client window coordinates.
7570 """
7571 return _core_.Window_ScreenToClientXY(*args, **kwargs)
7572
7573 def ClientToScreen(*args, **kwargs):
7574 """
7575 ClientToScreen(self, Point pt) -> Point
7576
7577 Converts to screen coordinates from coordinates relative to this window.
7578 """
7579 return _core_.Window_ClientToScreen(*args, **kwargs)
7580
7581 def ScreenToClient(*args, **kwargs):
7582 """
7583 ScreenToClient(self, Point pt) -> Point
7584
7585 Converts from screen to client window coordinates.
7586 """
7587 return _core_.Window_ScreenToClient(*args, **kwargs)
7588
7589 def HitTestXY(*args, **kwargs):
7590 """
7591 HitTestXY(self, int x, int y) -> int
7592
7593 Test where the given (in client coords) point lies
7594 """
7595 return _core_.Window_HitTestXY(*args, **kwargs)
7596
7597 def HitTest(*args, **kwargs):
7598 """
7599 HitTest(self, Point pt) -> int
7600
7601 Test where the given (in client coords) point lies
7602 """
7603 return _core_.Window_HitTest(*args, **kwargs)
7604
7605 def GetBorder(*args):
7606 """
7607 GetBorder(self, long flags) -> int
7608 GetBorder(self) -> int
7609
7610 Get border for the flags of this window
7611 """
7612 return _core_.Window_GetBorder(*args)
7613
7614 def UpdateWindowUI(*args, **kwargs):
7615 """
7616 UpdateWindowUI(self, long flags=UPDATE_UI_NONE)
7617
7618 This function sends EVT_UPDATE_UI events to the window. The particular
7619 implementation depends on the window; for example a wx.ToolBar will
7620 send an update UI event for each toolbar button, and a wx.Frame will
7621 send an update UI event for each menubar menu item. You can call this
7622 function from your application to ensure that your UI is up-to-date at
7623 a particular point in time (as far as your EVT_UPDATE_UI handlers are
7624 concerned). This may be necessary if you have called
7625 wx.UpdateUIEvent.SetMode or wx.UpdateUIEvent.SetUpdateInterval to
7626 limit the overhead that wxWindows incurs by sending update UI events
7627 in idle time.
d55e5bfc
RD
7628 """
7629 return _core_.Window_UpdateWindowUI(*args, **kwargs)
7630
7631 def PopupMenuXY(*args, **kwargs):
7632 """
7a0b95b0 7633 PopupMenuXY(self, Menu menu, int x=-1, int y=-1) -> bool
d55e5bfc 7634
7a0b95b0
RD
7635 Pops up the given menu at the specified coordinates, relative to this window,
7636 and returns control when the user has dismissed the menu. If a menu item is
7637 selected, the corresponding menu event is generated and will be processed as
7638 usual. If the default position is given then the current position of the
7639 mouse cursor will be used.
d55e5bfc
RD
7640 """
7641 return _core_.Window_PopupMenuXY(*args, **kwargs)
7642
7643 def PopupMenu(*args, **kwargs):
7644 """
7a0b95b0 7645 PopupMenu(self, Menu menu, Point pos=DefaultPosition) -> bool
d55e5bfc 7646
7a0b95b0
RD
7647 Pops up the given menu at the specified coordinates, relative to this window,
7648 and returns control when the user has dismissed the menu. If a menu item is
7649 selected, the corresponding menu event is generated and will be processed as
7650 usual. If the default position is given then the current position of the
7651 mouse cursor will be used.
d55e5bfc
RD
7652 """
7653 return _core_.Window_PopupMenu(*args, **kwargs)
7654
7655 def GetHandle(*args, **kwargs):
7656 """
7657 GetHandle(self) -> long
7658
7659 Returns the platform-specific handle (as a long integer) of the
7660 physical window. Currently on wxMac it returns the handle of the
7661 toplevel parent of the window.
7662 """
7663 return _core_.Window_GetHandle(*args, **kwargs)
7664
629e65c2
RD
7665 def AssociateHandle(*args, **kwargs):
7666 """
7667 AssociateHandle(self, long handle)
7668
7669 Associate the window with a new native handle
7670 """
7671 return _core_.Window_AssociateHandle(*args, **kwargs)
7672
7673 def DissociateHandle(*args, **kwargs):
7674 """
7675 DissociateHandle(self)
7676
7677 Dissociate the current native handle from the window
7678 """
7679 return _core_.Window_DissociateHandle(*args, **kwargs)
7680
d55e5bfc
RD
7681 def OnPaint(*args, **kwargs):
7682 """OnPaint(self, PaintEvent event)"""
7683 return _core_.Window_OnPaint(*args, **kwargs)
7684
7685 def HasScrollbar(*args, **kwargs):
7686 """
7687 HasScrollbar(self, int orient) -> bool
7688
7689 Does the window have the scrollbar for this orientation?
7690 """
7691 return _core_.Window_HasScrollbar(*args, **kwargs)
7692
7693 def SetScrollbar(*args, **kwargs):
7694 """
79fccf9d 7695 SetScrollbar(self, int orientation, int position, int thumbSize, int range,
d55e5bfc
RD
7696 bool refresh=True)
7697
7698 Sets the scrollbar properties of a built-in scrollbar.
d55e5bfc
RD
7699 """
7700 return _core_.Window_SetScrollbar(*args, **kwargs)
7701
7702 def SetScrollPos(*args, **kwargs):
7703 """
7704 SetScrollPos(self, int orientation, int pos, bool refresh=True)
7705
7706 Sets the position of one of the built-in scrollbars.
7707 """
7708 return _core_.Window_SetScrollPos(*args, **kwargs)
7709
7710 def GetScrollPos(*args, **kwargs):
7711 """
7712 GetScrollPos(self, int orientation) -> int
7713
7714 Returns the built-in scrollbar position.
7715 """
7716 return _core_.Window_GetScrollPos(*args, **kwargs)
7717
7718 def GetScrollThumb(*args, **kwargs):
7719 """
7720 GetScrollThumb(self, int orientation) -> int
7721
7722 Returns the built-in scrollbar thumb size.
7723 """
7724 return _core_.Window_GetScrollThumb(*args, **kwargs)
7725
7726 def GetScrollRange(*args, **kwargs):
7727 """
7728 GetScrollRange(self, int orientation) -> int
7729
7730 Returns the built-in scrollbar range.
7731 """
7732 return _core_.Window_GetScrollRange(*args, **kwargs)
7733
7734 def ScrollWindow(*args, **kwargs):
7735 """
7736 ScrollWindow(self, int dx, int dy, Rect rect=None)
7737
7738 Physically scrolls the pixels in the window and move child windows
7739 accordingly. Use this function to optimise your scrolling
7740 implementations, to minimise the area that must be redrawn. Note that
7741 it is rarely required to call this function from a user program.
d55e5bfc
RD
7742 """
7743 return _core_.Window_ScrollWindow(*args, **kwargs)
7744
7745 def ScrollLines(*args, **kwargs):
7746 """
7747 ScrollLines(self, int lines) -> bool
7748
7749 If the platform and window class supports it, scrolls the window by
7750 the given number of lines down, if lines is positive, or up if lines
7751 is negative. Returns True if the window was scrolled, False if it was
7752 already on top/bottom and nothing was done.
7753 """
7754 return _core_.Window_ScrollLines(*args, **kwargs)
7755
7756 def ScrollPages(*args, **kwargs):
7757 """
7758 ScrollPages(self, int pages) -> bool
7759
79fccf9d 7760 If the platform and window class supports it, scrolls the window by
d55e5bfc
RD
7761 the given number of pages down, if pages is positive, or up if pages
7762 is negative. Returns True if the window was scrolled, False if it was
7763 already on top/bottom and nothing was done.
7764 """
7765 return _core_.Window_ScrollPages(*args, **kwargs)
7766
7767 def LineUp(*args, **kwargs):
7768 """
7769 LineUp(self) -> bool
7770
7771 This is just a wrapper for ScrollLines(-1).
7772 """
7773 return _core_.Window_LineUp(*args, **kwargs)
7774
7775 def LineDown(*args, **kwargs):
7776 """
7777 LineDown(self) -> bool
7778
7779 This is just a wrapper for ScrollLines(1).
7780 """
7781 return _core_.Window_LineDown(*args, **kwargs)
7782
7783 def PageUp(*args, **kwargs):
7784 """
7785 PageUp(self) -> bool
7786
7787 This is just a wrapper for ScrollPages(-1).
7788 """
7789 return _core_.Window_PageUp(*args, **kwargs)
7790
7791 def PageDown(*args, **kwargs):
7792 """
7793 PageDown(self) -> bool
7794
7795 This is just a wrapper for ScrollPages(1).
7796 """
7797 return _core_.Window_PageDown(*args, **kwargs)
7798
7799 def SetHelpText(*args, **kwargs):
7800 """
7801 SetHelpText(self, String text)
7802
7803 Sets the help text to be used as context-sensitive help for this
7804 window. Note that the text is actually stored by the current
7805 wxHelpProvider implementation, and not in the window object itself.
7806 """
7807 return _core_.Window_SetHelpText(*args, **kwargs)
7808
7809 def SetHelpTextForId(*args, **kwargs):
7810 """
7811 SetHelpTextForId(self, String text)
7812
7813 Associate this help text with all windows with the same id as this
7814 one.
7815 """
7816 return _core_.Window_SetHelpTextForId(*args, **kwargs)
7817
7818 def GetHelpText(*args, **kwargs):
7819 """
7820 GetHelpText(self) -> String
7821
7822 Gets the help text to be used as context-sensitive help for this
7823 window. Note that the text is actually stored by the current
7824 wxHelpProvider implementation, and not in the window object itself.
7825 """
7826 return _core_.Window_GetHelpText(*args, **kwargs)
7827
7828 def SetToolTipString(*args, **kwargs):
7829 """
7830 SetToolTipString(self, String tip)
7831
7832 Attach a tooltip to the window.
7833 """
7834 return _core_.Window_SetToolTipString(*args, **kwargs)
7835
7836 def SetToolTip(*args, **kwargs):
7837 """
7838 SetToolTip(self, ToolTip tip)
7839
7840 Attach a tooltip to the window.
7841 """
7842 return _core_.Window_SetToolTip(*args, **kwargs)
7843
7844 def GetToolTip(*args, **kwargs):
7845 """
7846 GetToolTip(self) -> ToolTip
7847
7848 get the associated tooltip or None if none
7849 """
7850 return _core_.Window_GetToolTip(*args, **kwargs)
7851
7852 def SetDropTarget(*args, **kwargs):
7853 """
7854 SetDropTarget(self, DropTarget dropTarget)
7855
7856 Associates a drop target with this window. If the window already has
7857 a drop target, it is deleted.
7858 """
7859 return _core_.Window_SetDropTarget(*args, **kwargs)
7860
7861 def GetDropTarget(*args, **kwargs):
7862 """
7863 GetDropTarget(self) -> DropTarget
7864
7865 Returns the associated drop target, which may be None.
7866 """
7867 return _core_.Window_GetDropTarget(*args, **kwargs)
7868
7869 def DragAcceptFiles(*args, **kwargs):
7870 """
7871 DragAcceptFiles(self, bool accept)
7872
7873 Enables or disables eligibility for drop file events, EVT_DROP_FILES.
7874 Only available on Windows.
7875 """
7876 return _core_.Window_DragAcceptFiles(*args, **kwargs)
7877
7878 def SetConstraints(*args, **kwargs):
7879 """
7880 SetConstraints(self, LayoutConstraints constraints)
7881
7882 Sets the window to have the given layout constraints. If an existing
7883 layout constraints object is already owned by the window, it will be
7884 deleted. Pass None to disassociate and delete the window's current
7885 constraints.
7886
7887 You must call SetAutoLayout to tell a window to use the constraints
7888 automatically in its default EVT_SIZE handler; otherwise, you must
7889 handle EVT_SIZE yourself and call Layout() explicitly. When setting
7890 both a wx.LayoutConstraints and a wx.Sizer, only the sizer will have
7891 effect.
7892 """
7893 return _core_.Window_SetConstraints(*args, **kwargs)
7894
7895 def GetConstraints(*args, **kwargs):
7896 """
7897 GetConstraints(self) -> LayoutConstraints
7898
7899 Returns a pointer to the window's layout constraints, or None if there
7900 are none.
7901 """
7902 return _core_.Window_GetConstraints(*args, **kwargs)
7903
7904 def SetAutoLayout(*args, **kwargs):
7905 """
7906 SetAutoLayout(self, bool autoLayout)
7907
7908 Determines whether the Layout function will be called automatically
7909 when the window is resized. It is called implicitly by SetSizer but
7910 if you use SetConstraints you should call it manually or otherwise the
7911 window layout won't be correctly updated when its size changes.
7912 """
7913 return _core_.Window_SetAutoLayout(*args, **kwargs)
7914
7915 def GetAutoLayout(*args, **kwargs):
7916 """
7917 GetAutoLayout(self) -> bool
7918
7919 Returns the current autoLayout setting
7920 """
7921 return _core_.Window_GetAutoLayout(*args, **kwargs)
7922
7923 def Layout(*args, **kwargs):
7924 """
7925 Layout(self) -> bool
7926
7927 Invokes the constraint-based layout algorithm or the sizer-based
7928 algorithm for this window. See SetAutoLayout: when auto layout is on,
7929 this function gets called automatically by the default EVT_SIZE
7930 handler when the window is resized.
7931 """
7932 return _core_.Window_Layout(*args, **kwargs)
7933
7934 def SetSizer(*args, **kwargs):
7935 """
7936 SetSizer(self, Sizer sizer, bool deleteOld=True)
7937
7938 Sets the window to have the given layout sizer. The window will then
7939 own the object, and will take care of its deletion. If an existing
7940 layout sizer object is already owned by the window, it will be deleted
7941 if the deleteOld parameter is true. Note that this function will also
7942 call SetAutoLayout implicitly with a True parameter if the sizer is
ae8162c8 7943 non-None, and False otherwise.
d55e5bfc
RD
7944 """
7945 return _core_.Window_SetSizer(*args, **kwargs)
7946
7947 def SetSizerAndFit(*args, **kwargs):
7948 """
7949 SetSizerAndFit(self, Sizer sizer, bool deleteOld=True)
7950
7951 The same as SetSizer, except it also sets the size hints for the
7952 window based on the sizer's minimum size.
7953 """
7954 return _core_.Window_SetSizerAndFit(*args, **kwargs)
7955
7956 def GetSizer(*args, **kwargs):
7957 """
7958 GetSizer(self) -> Sizer
7959
7960 Return the sizer associated with the window by a previous call to
7961 SetSizer or None if there isn't one.
7962 """
7963 return _core_.Window_GetSizer(*args, **kwargs)
7964
7965 def SetContainingSizer(*args, **kwargs):
7966 """
7967 SetContainingSizer(self, Sizer sizer)
7968
7969 This normally does not need to be called by application code. It is
7970 called internally when a window is added to a sizer, and is used so
7971 the window can remove itself from the sizer when it is destroyed.
7972 """
7973 return _core_.Window_SetContainingSizer(*args, **kwargs)
7974
7975 def GetContainingSizer(*args, **kwargs):
7976 """
7977 GetContainingSizer(self) -> Sizer
7978
7979 Return the sizer that this window is a member of, if any, otherwise None.
7980 """
7981 return _core_.Window_GetContainingSizer(*args, **kwargs)
7982
7983 def InheritAttributes(*args, **kwargs):
7984 """
7985 InheritAttributes(self)
7986
79fccf9d
RD
7987 This function is (or should be, in case of custom controls) called
7988 during window creation to intelligently set up the window visual
7989 attributes, that is the font and the foreground and background
7990 colours.
7991
7992 By 'intelligently' the following is meant: by default, all windows use
7993 their own default attributes. However if some of the parent's
7994 attributes are explicitly changed (that is, using SetFont and not
fa47d7a7 7995 SetOwnFont) and if the corresponding attribute hadn't been
79fccf9d
RD
7996 explicitly set for this window itself, then this window takes the same
7997 value as used by the parent. In addition, if the window overrides
7998 ShouldInheritColours to return false, the colours will not be changed
7999 no matter what and only the font might.
8000
ec9b55ca
RD
8001 This rather complicated logic is necessary in order to accommodate the
8002 different usage scenarios. The most common one is when all default
79fccf9d
RD
8003 attributes are used and in this case, nothing should be inherited as
8004 in modern GUIs different controls use different fonts (and colours)
8005 than their siblings so they can't inherit the same value from the
8006 parent. However it was also deemed desirable to allow to simply change
8007 the attributes of all children at once by just changing the font or
8008 colour of their common parent, hence in this case we do inherit the
8009 parents attributes.
8010
d55e5bfc
RD
8011 """
8012 return _core_.Window_InheritAttributes(*args, **kwargs)
8013
8014 def ShouldInheritColours(*args, **kwargs):
8015 """
8016 ShouldInheritColours(self) -> bool
8017
8018 Return true from here to allow the colours of this window to be
79fccf9d
RD
8019 changed by InheritAttributes, returning false forbids inheriting them
8020 from the parent window.
d55e5bfc 8021
79fccf9d
RD
8022 The base class version returns false, but this method is overridden in
8023 wxControl where it returns true.
d55e5bfc
RD
8024 """
8025 return _core_.Window_ShouldInheritColours(*args, **kwargs)
8026
8027 def PostCreate(self, pre):
8028 """
8029 Phase 3 of the 2-phase create <wink!>
8030 Call this method after precreating the window with the 2-phase create method.
8031 """
8032 self.this = pre.this
8033 self.thisown = pre.thisown
8034 pre.thisown = 0
8035 if hasattr(self, '_setOORInfo'):
8036 self._setOORInfo(self)
8037 if hasattr(self, '_setCallbackInfo'):
8038 self._setCallbackInfo(self, self.__class__)
8039
8040
8041class WindowPtr(Window):
8042 def __init__(self, this):
8043 self.this = this
8044 if not hasattr(self,"thisown"): self.thisown = 0
8045 self.__class__ = Window
8046_core_.Window_swigregister(WindowPtr)
8047
8048def PreWindow(*args, **kwargs):
8049 """
8050 PreWindow() -> Window
8051
8052 Precreate a Window for 2-phase creation.
8053 """
8054 val = _core_.new_PreWindow(*args, **kwargs)
8055 val.thisown = 1
8056 return val
8057
8058def Window_NewControlId(*args, **kwargs):
8059 """
8060 Window_NewControlId() -> int
8061
8062 Generate a control id for the controls which were not given one.
8063 """
8064 return _core_.Window_NewControlId(*args, **kwargs)
8065
8066def Window_NextControlId(*args, **kwargs):
8067 """
8068 Window_NextControlId(int winid) -> int
8069
8070 Get the id of the control following the one with the given
79fccf9d 8071 autogenerated) id
d55e5bfc
RD
8072 """
8073 return _core_.Window_NextControlId(*args, **kwargs)
8074
8075def Window_PrevControlId(*args, **kwargs):
8076 """
8077 Window_PrevControlId(int winid) -> int
8078
8079 Get the id of the control preceding the one with the given
79fccf9d 8080 autogenerated) id
d55e5bfc
RD
8081 """
8082 return _core_.Window_PrevControlId(*args, **kwargs)
8083
8084def Window_FindFocus(*args, **kwargs):
8085 """
8086 Window_FindFocus() -> Window
8087
8088 Returns the window or control that currently has the keyboard focus,
8089 or None.
8090 """
8091 return _core_.Window_FindFocus(*args, **kwargs)
8092
8093def Window_GetCapture(*args, **kwargs):
8094 """
8095 Window_GetCapture() -> Window
8096
8097 Returns the window which currently captures the mouse or None
8098 """
8099 return _core_.Window_GetCapture(*args, **kwargs)
8100
8101def Window_GetClassDefaultAttributes(*args, **kwargs):
8102 """
8103 Window_GetClassDefaultAttributes(int variant=WINDOW_VARIANT_NORMAL) -> VisualAttributes
8104
79fccf9d
RD
8105 Get the default attributes for this class. This is useful if you want
8106 to use the same font or colour in your own control as in a standard
8107 control -- which is a much better idea than hard coding specific
caef1a4d
RD
8108 colours or fonts which might look completely out of place on the
8109 user's system, especially if it uses themes.
d55e5bfc
RD
8110
8111 The variant parameter is only relevant under Mac currently and is
79fccf9d 8112 ignore under other platforms. Under Mac, it will change the size of
caef1a4d
RD
8113 the returned font. See `wx.Window.SetWindowVariant` for more about
8114 this.
d55e5bfc
RD
8115 """
8116 return _core_.Window_GetClassDefaultAttributes(*args, **kwargs)
8117
8118def DLG_PNT(win, point_or_x, y=None):
8119 """
8120 Convenience function for converting a Point or (x,y) in
8121 dialog units to pixel units.
8122 """
8123 if y is None:
8124 return win.ConvertDialogPointToPixels(point_or_x)
8125 else:
8126 return win.ConvertDialogPointToPixels(wx.Point(point_or_x, y))
8127
8128def DLG_SZE(win, size_width, height=None):
8129 """
8130 Convenience function for converting a Size or (w,h) in
8131 dialog units to pixel units.
8132 """
8133 if height is None:
8134 return win.ConvertDialogSizeToPixels(size_width)
8135 else:
8136 return win.ConvertDialogSizeToPixels(wx.Size(size_width, height))
8137
8138
8139def FindWindowById(*args, **kwargs):
8140 """
8141 FindWindowById(long id, Window parent=None) -> Window
8142
8143 Find the first window in the application with the given id. If parent
8144 is None, the search will start from all top-level frames and dialog
8145 boxes; if non-None, the search will be limited to the given window
8146 hierarchy. The search is recursive in both cases.
8147 """
8148 return _core_.FindWindowById(*args, **kwargs)
8149
8150def FindWindowByName(*args, **kwargs):
8151 """
8152 FindWindowByName(String name, Window parent=None) -> Window
8153
8154 Find a window by its name (as given in a window constructor or Create
8155 function call). If parent is None, the search will start from all
8156 top-level frames and dialog boxes; if non-None, the search will be
8157 limited to the given window hierarchy. The search is recursive in both
8158 cases.
8159
8160 If no window with such name is found, wx.FindWindowByLabel is called.
8161 """
8162 return _core_.FindWindowByName(*args, **kwargs)
8163
8164def FindWindowByLabel(*args, **kwargs):
8165 """
8166 FindWindowByLabel(String label, Window parent=None) -> Window
8167
8168 Find a window by its label. Depending on the type of window, the label
8169 may be a window title or panel item label. If parent is None, the
8170 search will start from all top-level frames and dialog boxes; if
8171 non-None, the search will be limited to the given window
8172 hierarchy. The search is recursive in both cases.
8173 """
8174 return _core_.FindWindowByLabel(*args, **kwargs)
8175
8176def Window_FromHWND(*args, **kwargs):
8177 """Window_FromHWND(Window parent, unsigned long _hWnd) -> Window"""
8178 return _core_.Window_FromHWND(*args, **kwargs)
8179#---------------------------------------------------------------------------
8180
8181class Validator(EvtHandler):
093d3ff1 8182 """Proxy of C++ Validator class"""
d55e5bfc
RD
8183 def __repr__(self):
8184 return "<%s.%s; proxy of C++ wxValidator instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
8185 def __init__(self, *args, **kwargs):
8186 """__init__(self) -> Validator"""
8187 newobj = _core_.new_Validator(*args, **kwargs)
8188 self.this = newobj.this
8189 self.thisown = 1
8190 del newobj.thisown
8191 self._setOORInfo(self)
8192
8193 def Clone(*args, **kwargs):
8194 """Clone(self) -> Validator"""
8195 return _core_.Validator_Clone(*args, **kwargs)
8196
8197 def Validate(*args, **kwargs):
8198 """Validate(self, Window parent) -> bool"""
8199 return _core_.Validator_Validate(*args, **kwargs)
8200
8201 def TransferToWindow(*args, **kwargs):
8202 """TransferToWindow(self) -> bool"""
8203 return _core_.Validator_TransferToWindow(*args, **kwargs)
8204
8205 def TransferFromWindow(*args, **kwargs):
8206 """TransferFromWindow(self) -> bool"""
8207 return _core_.Validator_TransferFromWindow(*args, **kwargs)
8208
8209 def GetWindow(*args, **kwargs):
8210 """GetWindow(self) -> Window"""
8211 return _core_.Validator_GetWindow(*args, **kwargs)
8212
8213 def SetWindow(*args, **kwargs):
8214 """SetWindow(self, Window window)"""
8215 return _core_.Validator_SetWindow(*args, **kwargs)
8216
8217 def IsSilent(*args, **kwargs):
c24da6d6 8218 """IsSilent() -> bool"""
d55e5bfc
RD
8219 return _core_.Validator_IsSilent(*args, **kwargs)
8220
8221 IsSilent = staticmethod(IsSilent)
8222 def SetBellOnError(*args, **kwargs):
c24da6d6 8223 """SetBellOnError(int doIt=True)"""
d55e5bfc
RD
8224 return _core_.Validator_SetBellOnError(*args, **kwargs)
8225
8226 SetBellOnError = staticmethod(SetBellOnError)
8227
8228class ValidatorPtr(Validator):
8229 def __init__(self, this):
8230 self.this = this
8231 if not hasattr(self,"thisown"): self.thisown = 0
8232 self.__class__ = Validator
8233_core_.Validator_swigregister(ValidatorPtr)
8234
8235def Validator_IsSilent(*args, **kwargs):
8236 """Validator_IsSilent() -> bool"""
8237 return _core_.Validator_IsSilent(*args, **kwargs)
8238
8239def Validator_SetBellOnError(*args, **kwargs):
8240 """Validator_SetBellOnError(int doIt=True)"""
8241 return _core_.Validator_SetBellOnError(*args, **kwargs)
8242
8243class PyValidator(Validator):
093d3ff1 8244 """Proxy of C++ PyValidator class"""
d55e5bfc
RD
8245 def __repr__(self):
8246 return "<%s.%s; proxy of C++ wxPyValidator instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
8247 def __init__(self, *args, **kwargs):
8248 """__init__(self) -> PyValidator"""
8249 newobj = _core_.new_PyValidator(*args, **kwargs)
8250 self.this = newobj.this
8251 self.thisown = 1
8252 del newobj.thisown
8253
8254 self._setCallbackInfo(self, PyValidator, 1)
8255 self._setOORInfo(self)
8256
8257 def _setCallbackInfo(*args, **kwargs):
8258 """_setCallbackInfo(self, PyObject self, PyObject _class, int incref=True)"""
8259 return _core_.PyValidator__setCallbackInfo(*args, **kwargs)
8260
8261
8262class PyValidatorPtr(PyValidator):
8263 def __init__(self, this):
8264 self.this = this
8265 if not hasattr(self,"thisown"): self.thisown = 0
8266 self.__class__ = PyValidator
8267_core_.PyValidator_swigregister(PyValidatorPtr)
8268
8269#---------------------------------------------------------------------------
8270
8271class Menu(EvtHandler):
093d3ff1 8272 """Proxy of C++ Menu class"""
d55e5bfc
RD
8273 def __repr__(self):
8274 return "<%s.%s; proxy of C++ wxMenu instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
8275 def __init__(self, *args, **kwargs):
8276 """__init__(self, String title=EmptyString, long style=0) -> Menu"""
8277 newobj = _core_.new_Menu(*args, **kwargs)
8278 self.this = newobj.this
8279 self.thisown = 1
8280 del newobj.thisown
8281 self._setOORInfo(self)
8282
8283 def Append(*args, **kwargs):
8284 """Append(self, int id, String text, String help=EmptyString, int kind=ITEM_NORMAL) -> MenuItem"""
8285 return _core_.Menu_Append(*args, **kwargs)
8286
8287 def AppendSeparator(*args, **kwargs):
8288 """AppendSeparator(self) -> MenuItem"""
8289 return _core_.Menu_AppendSeparator(*args, **kwargs)
8290
8291 def AppendCheckItem(*args, **kwargs):
8292 """AppendCheckItem(self, int id, String text, String help=EmptyString) -> MenuItem"""
8293 return _core_.Menu_AppendCheckItem(*args, **kwargs)
8294
8295 def AppendRadioItem(*args, **kwargs):
8296 """AppendRadioItem(self, int id, String text, String help=EmptyString) -> MenuItem"""
8297 return _core_.Menu_AppendRadioItem(*args, **kwargs)
8298
8299 def AppendMenu(*args, **kwargs):
8300 """AppendMenu(self, int id, String text, Menu submenu, String help=EmptyString) -> MenuItem"""
8301 return _core_.Menu_AppendMenu(*args, **kwargs)
8302
8303 def AppendItem(*args, **kwargs):
8304 """AppendItem(self, MenuItem item) -> MenuItem"""
8305 return _core_.Menu_AppendItem(*args, **kwargs)
8306
8307 def Break(*args, **kwargs):
8308 """Break(self)"""
8309 return _core_.Menu_Break(*args, **kwargs)
8310
8311 def InsertItem(*args, **kwargs):
8312 """InsertItem(self, size_t pos, MenuItem item) -> MenuItem"""
8313 return _core_.Menu_InsertItem(*args, **kwargs)
8314
8315 def Insert(*args, **kwargs):
8316 """
8317 Insert(self, size_t pos, int id, String text, String help=EmptyString,
8318 int kind=ITEM_NORMAL) -> MenuItem
8319 """
8320 return _core_.Menu_Insert(*args, **kwargs)
8321
8322 def InsertSeparator(*args, **kwargs):
8323 """InsertSeparator(self, size_t pos) -> MenuItem"""
8324 return _core_.Menu_InsertSeparator(*args, **kwargs)
8325
8326 def InsertCheckItem(*args, **kwargs):
8327 """InsertCheckItem(self, size_t pos, int id, String text, String help=EmptyString) -> MenuItem"""
8328 return _core_.Menu_InsertCheckItem(*args, **kwargs)
8329
8330 def InsertRadioItem(*args, **kwargs):
8331 """InsertRadioItem(self, size_t pos, int id, String text, String help=EmptyString) -> MenuItem"""
8332 return _core_.Menu_InsertRadioItem(*args, **kwargs)
8333
8334 def InsertMenu(*args, **kwargs):
8335 """InsertMenu(self, size_t pos, int id, String text, Menu submenu, String help=EmptyString) -> MenuItem"""
8336 return _core_.Menu_InsertMenu(*args, **kwargs)
8337
8338 def PrependItem(*args, **kwargs):
8339 """PrependItem(self, MenuItem item) -> MenuItem"""
8340 return _core_.Menu_PrependItem(*args, **kwargs)
8341
8342 def Prepend(*args, **kwargs):
8343 """Prepend(self, int id, String text, String help=EmptyString, int kind=ITEM_NORMAL) -> MenuItem"""
8344 return _core_.Menu_Prepend(*args, **kwargs)
8345
8346 def PrependSeparator(*args, **kwargs):
8347 """PrependSeparator(self) -> MenuItem"""
8348 return _core_.Menu_PrependSeparator(*args, **kwargs)
8349
8350 def PrependCheckItem(*args, **kwargs):
8351 """PrependCheckItem(self, int id, String text, String help=EmptyString) -> MenuItem"""
8352 return _core_.Menu_PrependCheckItem(*args, **kwargs)
8353
8354 def PrependRadioItem(*args, **kwargs):
8355 """PrependRadioItem(self, int id, String text, String help=EmptyString) -> MenuItem"""
8356 return _core_.Menu_PrependRadioItem(*args, **kwargs)
8357
8358 def PrependMenu(*args, **kwargs):
8359 """PrependMenu(self, int id, String text, Menu submenu, String help=EmptyString) -> MenuItem"""
8360 return _core_.Menu_PrependMenu(*args, **kwargs)
8361
8362 def Remove(*args, **kwargs):
8363 """Remove(self, int id) -> MenuItem"""
8364 return _core_.Menu_Remove(*args, **kwargs)
8365
8366 def RemoveItem(*args, **kwargs):
8367 """RemoveItem(self, MenuItem item) -> MenuItem"""
8368 return _core_.Menu_RemoveItem(*args, **kwargs)
8369
8370 def Delete(*args, **kwargs):
8371 """Delete(self, int id) -> bool"""
8372 return _core_.Menu_Delete(*args, **kwargs)
8373
8374 def DeleteItem(*args, **kwargs):
8375 """DeleteItem(self, MenuItem item) -> bool"""
8376 return _core_.Menu_DeleteItem(*args, **kwargs)
8377
8378 def Destroy(*args, **kwargs):
8379 """
8380 Destroy(self)
8381
8382 Deletes the C++ object this Python object is a proxy for.
8383 """
8384 return _core_.Menu_Destroy(*args, **kwargs)
8385
8386 def DestroyId(*args, **kwargs):
8387 """
8388 DestroyId(self, int id) -> bool
8389
8390 Deletes the C++ object this Python object is a proxy for.
8391 """
8392 return _core_.Menu_DestroyId(*args, **kwargs)
8393
8394 def DestroyItem(*args, **kwargs):
8395 """
8396 DestroyItem(self, MenuItem item) -> bool
8397
8398 Deletes the C++ object this Python object is a proxy for.
8399 """
8400 return _core_.Menu_DestroyItem(*args, **kwargs)
8401
8402 def GetMenuItemCount(*args, **kwargs):
8403 """GetMenuItemCount(self) -> size_t"""
8404 return _core_.Menu_GetMenuItemCount(*args, **kwargs)
8405
8406 def GetMenuItems(*args, **kwargs):
8407 """GetMenuItems(self) -> PyObject"""
8408 return _core_.Menu_GetMenuItems(*args, **kwargs)
8409
8410 def FindItem(*args, **kwargs):
8411 """FindItem(self, String item) -> int"""
8412 return _core_.Menu_FindItem(*args, **kwargs)
8413
8414 def FindItemById(*args, **kwargs):
8415 """FindItemById(self, int id) -> MenuItem"""
8416 return _core_.Menu_FindItemById(*args, **kwargs)
8417
8418 def FindItemByPosition(*args, **kwargs):
8419 """FindItemByPosition(self, size_t position) -> MenuItem"""
8420 return _core_.Menu_FindItemByPosition(*args, **kwargs)
8421
8422 def Enable(*args, **kwargs):
8423 """Enable(self, int id, bool enable)"""
8424 return _core_.Menu_Enable(*args, **kwargs)
8425
8426 def IsEnabled(*args, **kwargs):
8427 """IsEnabled(self, int id) -> bool"""
8428 return _core_.Menu_IsEnabled(*args, **kwargs)
8429
8430 def Check(*args, **kwargs):
8431 """Check(self, int id, bool check)"""
8432 return _core_.Menu_Check(*args, **kwargs)
8433
8434 def IsChecked(*args, **kwargs):
8435 """IsChecked(self, int id) -> bool"""
8436 return _core_.Menu_IsChecked(*args, **kwargs)
8437
8438 def SetLabel(*args, **kwargs):
8439 """SetLabel(self, int id, String label)"""
8440 return _core_.Menu_SetLabel(*args, **kwargs)
8441
8442 def GetLabel(*args, **kwargs):
8443 """GetLabel(self, int id) -> String"""
8444 return _core_.Menu_GetLabel(*args, **kwargs)
8445
8446 def SetHelpString(*args, **kwargs):
8447 """SetHelpString(self, int id, String helpString)"""
8448 return _core_.Menu_SetHelpString(*args, **kwargs)
8449
8450 def GetHelpString(*args, **kwargs):
8451 """GetHelpString(self, int id) -> String"""
8452 return _core_.Menu_GetHelpString(*args, **kwargs)
8453
8454 def SetTitle(*args, **kwargs):
8455 """SetTitle(self, String title)"""
8456 return _core_.Menu_SetTitle(*args, **kwargs)
8457
8458 def GetTitle(*args, **kwargs):
8459 """GetTitle(self) -> String"""
8460 return _core_.Menu_GetTitle(*args, **kwargs)
8461
8462 def SetEventHandler(*args, **kwargs):
8463 """SetEventHandler(self, EvtHandler handler)"""
8464 return _core_.Menu_SetEventHandler(*args, **kwargs)
8465
8466 def GetEventHandler(*args, **kwargs):
8467 """GetEventHandler(self) -> EvtHandler"""
8468 return _core_.Menu_GetEventHandler(*args, **kwargs)
8469
8470 def SetInvokingWindow(*args, **kwargs):
8471 """SetInvokingWindow(self, Window win)"""
8472 return _core_.Menu_SetInvokingWindow(*args, **kwargs)
8473
8474 def GetInvokingWindow(*args, **kwargs):
8475 """GetInvokingWindow(self) -> Window"""
8476 return _core_.Menu_GetInvokingWindow(*args, **kwargs)
8477
8478 def GetStyle(*args, **kwargs):
8479 """GetStyle(self) -> long"""
8480 return _core_.Menu_GetStyle(*args, **kwargs)
8481
8482 def UpdateUI(*args, **kwargs):
8483 """UpdateUI(self, EvtHandler source=None)"""
8484 return _core_.Menu_UpdateUI(*args, **kwargs)
8485
8486 def GetMenuBar(*args, **kwargs):
8487 """GetMenuBar(self) -> MenuBar"""
8488 return _core_.Menu_GetMenuBar(*args, **kwargs)
8489
8490 def Attach(*args, **kwargs):
8491 """Attach(self, wxMenuBarBase menubar)"""
8492 return _core_.Menu_Attach(*args, **kwargs)
8493
8494 def Detach(*args, **kwargs):
8495 """Detach(self)"""
8496 return _core_.Menu_Detach(*args, **kwargs)
8497
8498 def IsAttached(*args, **kwargs):
8499 """IsAttached(self) -> bool"""
8500 return _core_.Menu_IsAttached(*args, **kwargs)
8501
8502 def SetParent(*args, **kwargs):
8503 """SetParent(self, Menu parent)"""
8504 return _core_.Menu_SetParent(*args, **kwargs)
8505
8506 def GetParent(*args, **kwargs):
8507 """GetParent(self) -> Menu"""
8508 return _core_.Menu_GetParent(*args, **kwargs)
8509
8510
8511class MenuPtr(Menu):
8512 def __init__(self, this):
8513 self.this = this
8514 if not hasattr(self,"thisown"): self.thisown = 0
8515 self.__class__ = Menu
8516_core_.Menu_swigregister(MenuPtr)
8517DefaultValidator = cvar.DefaultValidator
8518
8519#---------------------------------------------------------------------------
8520
8521class MenuBar(Window):
093d3ff1 8522 """Proxy of C++ MenuBar class"""
d55e5bfc
RD
8523 def __repr__(self):
8524 return "<%s.%s; proxy of C++ wxMenuBar instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
8525 def __init__(self, *args, **kwargs):
8526 """__init__(self, long style=0) -> MenuBar"""
8527 newobj = _core_.new_MenuBar(*args, **kwargs)
8528 self.this = newobj.this
8529 self.thisown = 1
8530 del newobj.thisown
8531 self._setOORInfo(self)
8532
8533 def Append(*args, **kwargs):
8534 """Append(self, Menu menu, String title) -> bool"""
8535 return _core_.MenuBar_Append(*args, **kwargs)
8536
8537 def Insert(*args, **kwargs):
8538 """Insert(self, size_t pos, Menu menu, String title) -> bool"""
8539 return _core_.MenuBar_Insert(*args, **kwargs)
8540
8541 def GetMenuCount(*args, **kwargs):
8542 """GetMenuCount(self) -> size_t"""
8543 return _core_.MenuBar_GetMenuCount(*args, **kwargs)
8544
8545 def GetMenu(*args, **kwargs):
8546 """GetMenu(self, size_t pos) -> Menu"""
8547 return _core_.MenuBar_GetMenu(*args, **kwargs)
8548
8549 def Replace(*args, **kwargs):
8550 """Replace(self, size_t pos, Menu menu, String title) -> Menu"""
8551 return _core_.MenuBar_Replace(*args, **kwargs)
8552
8553 def Remove(*args, **kwargs):
8554 """Remove(self, size_t pos) -> Menu"""
8555 return _core_.MenuBar_Remove(*args, **kwargs)
8556
8557 def EnableTop(*args, **kwargs):
8558 """EnableTop(self, size_t pos, bool enable)"""
8559 return _core_.MenuBar_EnableTop(*args, **kwargs)
8560
8561 def IsEnabledTop(*args, **kwargs):
8562 """IsEnabledTop(self, size_t pos) -> bool"""
8563 return _core_.MenuBar_IsEnabledTop(*args, **kwargs)
8564
8565 def SetLabelTop(*args, **kwargs):
8566 """SetLabelTop(self, size_t pos, String label)"""
8567 return _core_.MenuBar_SetLabelTop(*args, **kwargs)
8568
8569 def GetLabelTop(*args, **kwargs):
8570 """GetLabelTop(self, size_t pos) -> String"""
8571 return _core_.MenuBar_GetLabelTop(*args, **kwargs)
8572
8573 def FindMenuItem(*args, **kwargs):
8574 """FindMenuItem(self, String menu, String item) -> int"""
8575 return _core_.MenuBar_FindMenuItem(*args, **kwargs)
8576
8577 def FindItemById(*args, **kwargs):
8578 """FindItemById(self, int id) -> MenuItem"""
8579 return _core_.MenuBar_FindItemById(*args, **kwargs)
8580
8581 def FindMenu(*args, **kwargs):
8582 """FindMenu(self, String title) -> int"""
8583 return _core_.MenuBar_FindMenu(*args, **kwargs)
8584
8585 def Enable(*args, **kwargs):
8586 """Enable(self, int id, bool enable)"""
8587 return _core_.MenuBar_Enable(*args, **kwargs)
8588
8589 def Check(*args, **kwargs):
8590 """Check(self, int id, bool check)"""
8591 return _core_.MenuBar_Check(*args, **kwargs)
8592
8593 def IsChecked(*args, **kwargs):
8594 """IsChecked(self, int id) -> bool"""
8595 return _core_.MenuBar_IsChecked(*args, **kwargs)
8596
8597 def IsEnabled(*args, **kwargs):
8598 """IsEnabled(self, int id) -> bool"""
8599 return _core_.MenuBar_IsEnabled(*args, **kwargs)
8600
8601 def SetLabel(*args, **kwargs):
8602 """SetLabel(self, int id, String label)"""
8603 return _core_.MenuBar_SetLabel(*args, **kwargs)
8604
8605 def GetLabel(*args, **kwargs):
8606 """GetLabel(self, int id) -> String"""
8607 return _core_.MenuBar_GetLabel(*args, **kwargs)
8608
8609 def SetHelpString(*args, **kwargs):
8610 """SetHelpString(self, int id, String helpString)"""
8611 return _core_.MenuBar_SetHelpString(*args, **kwargs)
8612
8613 def GetHelpString(*args, **kwargs):
8614 """GetHelpString(self, int id) -> String"""
8615 return _core_.MenuBar_GetHelpString(*args, **kwargs)
8616
8617 def GetFrame(*args, **kwargs):
8618 """GetFrame(self) -> wxFrame"""
8619 return _core_.MenuBar_GetFrame(*args, **kwargs)
8620
8621 def IsAttached(*args, **kwargs):
8622 """IsAttached(self) -> bool"""
8623 return _core_.MenuBar_IsAttached(*args, **kwargs)
8624
8625 def Attach(*args, **kwargs):
8626 """Attach(self, wxFrame frame)"""
8627 return _core_.MenuBar_Attach(*args, **kwargs)
8628
8629 def Detach(*args, **kwargs):
8630 """Detach(self)"""
8631 return _core_.MenuBar_Detach(*args, **kwargs)
8632
8633
8634class MenuBarPtr(MenuBar):
8635 def __init__(self, this):
8636 self.this = this
8637 if not hasattr(self,"thisown"): self.thisown = 0
8638 self.__class__ = MenuBar
8639_core_.MenuBar_swigregister(MenuBarPtr)
8640
8641#---------------------------------------------------------------------------
8642
8643class MenuItem(Object):
093d3ff1 8644 """Proxy of C++ MenuItem class"""
d55e5bfc
RD
8645 def __repr__(self):
8646 return "<%s.%s; proxy of C++ wxMenuItem instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
8647 def __init__(self, *args, **kwargs):
8648 """
8649 __init__(self, Menu parentMenu=None, int id=ID_ANY, String text=EmptyString,
8650 String help=EmptyString, int kind=ITEM_NORMAL,
8651 Menu subMenu=None) -> MenuItem
8652 """
8653 newobj = _core_.new_MenuItem(*args, **kwargs)
8654 self.this = newobj.this
8655 self.thisown = 1
8656 del newobj.thisown
8657 def GetMenu(*args, **kwargs):
8658 """GetMenu(self) -> Menu"""
8659 return _core_.MenuItem_GetMenu(*args, **kwargs)
8660
8661 def SetMenu(*args, **kwargs):
8662 """SetMenu(self, Menu menu)"""
8663 return _core_.MenuItem_SetMenu(*args, **kwargs)
8664
8665 def SetId(*args, **kwargs):
8666 """SetId(self, int id)"""
8667 return _core_.MenuItem_SetId(*args, **kwargs)
8668
8669 def GetId(*args, **kwargs):
8670 """GetId(self) -> int"""
8671 return _core_.MenuItem_GetId(*args, **kwargs)
8672
8673 def IsSeparator(*args, **kwargs):
8674 """IsSeparator(self) -> bool"""
8675 return _core_.MenuItem_IsSeparator(*args, **kwargs)
8676
8677 def SetText(*args, **kwargs):
8678 """SetText(self, String str)"""
8679 return _core_.MenuItem_SetText(*args, **kwargs)
8680
8681 def GetLabel(*args, **kwargs):
8682 """GetLabel(self) -> String"""
8683 return _core_.MenuItem_GetLabel(*args, **kwargs)
8684
8685 def GetText(*args, **kwargs):
8686 """GetText(self) -> String"""
8687 return _core_.MenuItem_GetText(*args, **kwargs)
8688
8689 def GetLabelFromText(*args, **kwargs):
c24da6d6 8690 """GetLabelFromText(String text) -> String"""
d55e5bfc
RD
8691 return _core_.MenuItem_GetLabelFromText(*args, **kwargs)
8692
8693 GetLabelFromText = staticmethod(GetLabelFromText)
8694 def GetKind(*args, **kwargs):
8695 """GetKind(self) -> int"""
8696 return _core_.MenuItem_GetKind(*args, **kwargs)
8697
8698 def SetKind(*args, **kwargs):
8699 """SetKind(self, int kind)"""
8700 return _core_.MenuItem_SetKind(*args, **kwargs)
8701
8702 def SetCheckable(*args, **kwargs):
8703 """SetCheckable(self, bool checkable)"""
8704 return _core_.MenuItem_SetCheckable(*args, **kwargs)
8705
8706 def IsCheckable(*args, **kwargs):
8707 """IsCheckable(self) -> bool"""
8708 return _core_.MenuItem_IsCheckable(*args, **kwargs)
8709
8710 def IsSubMenu(*args, **kwargs):
8711 """IsSubMenu(self) -> bool"""
8712 return _core_.MenuItem_IsSubMenu(*args, **kwargs)
8713
8714 def SetSubMenu(*args, **kwargs):
8715 """SetSubMenu(self, Menu menu)"""
8716 return _core_.MenuItem_SetSubMenu(*args, **kwargs)
8717
8718 def GetSubMenu(*args, **kwargs):
8719 """GetSubMenu(self) -> Menu"""
8720 return _core_.MenuItem_GetSubMenu(*args, **kwargs)
8721
8722 def Enable(*args, **kwargs):
8723 """Enable(self, bool enable=True)"""
8724 return _core_.MenuItem_Enable(*args, **kwargs)
8725
8726 def IsEnabled(*args, **kwargs):
8727 """IsEnabled(self) -> bool"""
8728 return _core_.MenuItem_IsEnabled(*args, **kwargs)
8729
8730 def Check(*args, **kwargs):
8731 """Check(self, bool check=True)"""
8732 return _core_.MenuItem_Check(*args, **kwargs)
8733
8734 def IsChecked(*args, **kwargs):
8735 """IsChecked(self) -> bool"""
8736 return _core_.MenuItem_IsChecked(*args, **kwargs)
8737
8738 def Toggle(*args, **kwargs):
8739 """Toggle(self)"""
8740 return _core_.MenuItem_Toggle(*args, **kwargs)
8741
8742 def SetHelp(*args, **kwargs):
8743 """SetHelp(self, String str)"""
8744 return _core_.MenuItem_SetHelp(*args, **kwargs)
8745
8746 def GetHelp(*args, **kwargs):
8747 """GetHelp(self) -> String"""
8748 return _core_.MenuItem_GetHelp(*args, **kwargs)
8749
8750 def GetAccel(*args, **kwargs):
8751 """GetAccel(self) -> AcceleratorEntry"""
8752 return _core_.MenuItem_GetAccel(*args, **kwargs)
8753
8754 def SetAccel(*args, **kwargs):
8755 """SetAccel(self, AcceleratorEntry accel)"""
8756 return _core_.MenuItem_SetAccel(*args, **kwargs)
8757
8758 def SetFont(*args, **kwargs):
8759 """SetFont(self, Font font)"""
8760 return _core_.MenuItem_SetFont(*args, **kwargs)
8761
8762 def GetFont(*args, **kwargs):
8763 """GetFont(self) -> Font"""
8764 return _core_.MenuItem_GetFont(*args, **kwargs)
8765
8766 def SetTextColour(*args, **kwargs):
8767 """SetTextColour(self, Colour colText)"""
8768 return _core_.MenuItem_SetTextColour(*args, **kwargs)
8769
8770 def GetTextColour(*args, **kwargs):
8771 """GetTextColour(self) -> Colour"""
8772 return _core_.MenuItem_GetTextColour(*args, **kwargs)
8773
8774 def SetBackgroundColour(*args, **kwargs):
8775 """SetBackgroundColour(self, Colour colBack)"""
8776 return _core_.MenuItem_SetBackgroundColour(*args, **kwargs)
8777
8778 def GetBackgroundColour(*args, **kwargs):
8779 """GetBackgroundColour(self) -> Colour"""
8780 return _core_.MenuItem_GetBackgroundColour(*args, **kwargs)
8781
8782 def SetBitmaps(*args, **kwargs):
8783 """SetBitmaps(self, Bitmap bmpChecked, Bitmap bmpUnchecked=wxNullBitmap)"""
8784 return _core_.MenuItem_SetBitmaps(*args, **kwargs)
8785
8786 def SetDisabledBitmap(*args, **kwargs):
8787 """SetDisabledBitmap(self, Bitmap bmpDisabled)"""
8788 return _core_.MenuItem_SetDisabledBitmap(*args, **kwargs)
8789
8790 def GetDisabledBitmap(*args, **kwargs):
8791 """GetDisabledBitmap(self) -> Bitmap"""
8792 return _core_.MenuItem_GetDisabledBitmap(*args, **kwargs)
8793
8794 def SetMarginWidth(*args, **kwargs):
8795 """SetMarginWidth(self, int nWidth)"""
8796 return _core_.MenuItem_SetMarginWidth(*args, **kwargs)
8797
8798 def GetMarginWidth(*args, **kwargs):
8799 """GetMarginWidth(self) -> int"""
8800 return _core_.MenuItem_GetMarginWidth(*args, **kwargs)
8801
8802 def GetDefaultMarginWidth(*args, **kwargs):
c24da6d6 8803 """GetDefaultMarginWidth() -> int"""
d55e5bfc
RD
8804 return _core_.MenuItem_GetDefaultMarginWidth(*args, **kwargs)
8805
8806 GetDefaultMarginWidth = staticmethod(GetDefaultMarginWidth)
8807 def IsOwnerDrawn(*args, **kwargs):
8808 """IsOwnerDrawn(self) -> bool"""
8809 return _core_.MenuItem_IsOwnerDrawn(*args, **kwargs)
8810
8811 def SetOwnerDrawn(*args, **kwargs):
8812 """SetOwnerDrawn(self, bool ownerDrawn=True)"""
8813 return _core_.MenuItem_SetOwnerDrawn(*args, **kwargs)
8814
8815 def ResetOwnerDrawn(*args, **kwargs):
8816 """ResetOwnerDrawn(self)"""
8817 return _core_.MenuItem_ResetOwnerDrawn(*args, **kwargs)
8818
8819 def SetBitmap(*args, **kwargs):
8820 """SetBitmap(self, Bitmap bitmap)"""
8821 return _core_.MenuItem_SetBitmap(*args, **kwargs)
8822
8823 def GetBitmap(*args, **kwargs):
8824 """GetBitmap(self) -> Bitmap"""
8825 return _core_.MenuItem_GetBitmap(*args, **kwargs)
8826
8827
8828class MenuItemPtr(MenuItem):
8829 def __init__(self, this):
8830 self.this = this
8831 if not hasattr(self,"thisown"): self.thisown = 0
8832 self.__class__ = MenuItem
8833_core_.MenuItem_swigregister(MenuItemPtr)
8834
8835def MenuItem_GetLabelFromText(*args, **kwargs):
8836 """MenuItem_GetLabelFromText(String text) -> String"""
8837 return _core_.MenuItem_GetLabelFromText(*args, **kwargs)
8838
8839def MenuItem_GetDefaultMarginWidth(*args, **kwargs):
8840 """MenuItem_GetDefaultMarginWidth() -> int"""
8841 return _core_.MenuItem_GetDefaultMarginWidth(*args, **kwargs)
8842
8843#---------------------------------------------------------------------------
8844
8845class Control(Window):
8846 """
8847 This is the base class for a control or 'widget'.
8848
79fccf9d
RD
8849 A control is generally a small window which processes user input
8850 and/or displays one or more item of data.
d55e5bfc
RD
8851 """
8852 def __repr__(self):
8853 return "<%s.%s; proxy of C++ wxControl instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
8854 def __init__(self, *args, **kwargs):
8855 """
248ed943
RD
8856 __init__(self, Window parent, int id=-1, Point pos=DefaultPosition,
8857 Size size=DefaultSize, long style=0, Validator validator=DefaultValidator,
d55e5bfc
RD
8858 String name=ControlNameStr) -> Control
8859
79fccf9d
RD
8860 Create a Control. Normally you should only call this from a subclass'
8861 __init__ as a plain old wx.Control is not very useful.
d55e5bfc
RD
8862 """
8863 newobj = _core_.new_Control(*args, **kwargs)
8864 self.this = newobj.this
8865 self.thisown = 1
8866 del newobj.thisown
8867 self._setOORInfo(self)
8868
8869 def Create(*args, **kwargs):
8870 """
248ed943
RD
8871 Create(self, Window parent, int id=-1, Point pos=DefaultPosition,
8872 Size size=DefaultSize, long style=0, Validator validator=DefaultValidator,
d55e5bfc
RD
8873 String name=ControlNameStr) -> bool
8874
8875 Do the 2nd phase and create the GUI control.
8876 """
8877 return _core_.Control_Create(*args, **kwargs)
8878
8879 def Command(*args, **kwargs):
8880 """
8881 Command(self, CommandEvent event)
8882
79fccf9d
RD
8883 Simulates the effect of the user issuing a command to the item.
8884
8885 :see: `wx.CommandEvent`
8886
d55e5bfc
RD
8887 """
8888 return _core_.Control_Command(*args, **kwargs)
8889
8890 def GetLabel(*args, **kwargs):
8891 """
8892 GetLabel(self) -> String
8893
8894 Return a control's text.
8895 """
8896 return _core_.Control_GetLabel(*args, **kwargs)
8897
8898 def SetLabel(*args, **kwargs):
8899 """
8900 SetLabel(self, String label)
8901
8902 Sets the item's text.
8903 """
8904 return _core_.Control_SetLabel(*args, **kwargs)
8905
a001823c 8906 def GetClassDefaultAttributes(*args, **kwargs):
f8167d6e 8907 """
a001823c 8908 GetClassDefaultAttributes(int variant=WINDOW_VARIANT_NORMAL) -> VisualAttributes
f8167d6e 8909
a001823c
RD
8910 Get the default attributes for this class. This is useful if you want
8911 to use the same font or colour in your own control as in a standard
8912 control -- which is a much better idea than hard coding specific
8913 colours or fonts which might look completely out of place on the
8914 user's system, especially if it uses themes.
f8167d6e 8915
a001823c
RD
8916 The variant parameter is only relevant under Mac currently and is
8917 ignore under other platforms. Under Mac, it will change the size of
8918 the returned font. See `wx.Window.SetWindowVariant` for more about
8919 this.
f8167d6e 8920 """
d55e5bfc
RD
8921 return _core_.Control_GetClassDefaultAttributes(*args, **kwargs)
8922
8923 GetClassDefaultAttributes = staticmethod(GetClassDefaultAttributes)
8924
8925class ControlPtr(Control):
8926 def __init__(self, this):
8927 self.this = this
8928 if not hasattr(self,"thisown"): self.thisown = 0
8929 self.__class__ = Control
8930_core_.Control_swigregister(ControlPtr)
8931ControlNameStr = cvar.ControlNameStr
8932
8933def PreControl(*args, **kwargs):
8934 """
8935 PreControl() -> Control
8936
8937 Precreate a Control control for 2-phase creation
8938 """
8939 val = _core_.new_PreControl(*args, **kwargs)
8940 val.thisown = 1
8941 return val
8942
8943def Control_GetClassDefaultAttributes(*args, **kwargs):
a001823c
RD
8944 """
8945 Control_GetClassDefaultAttributes(int variant=WINDOW_VARIANT_NORMAL) -> VisualAttributes
8946
8947 Get the default attributes for this class. This is useful if you want
8948 to use the same font or colour in your own control as in a standard
8949 control -- which is a much better idea than hard coding specific
8950 colours or fonts which might look completely out of place on the
8951 user's system, especially if it uses themes.
8952
8953 The variant parameter is only relevant under Mac currently and is
8954 ignore under other platforms. Under Mac, it will change the size of
8955 the returned font. See `wx.Window.SetWindowVariant` for more about
8956 this.
8957 """
d55e5bfc
RD
8958 return _core_.Control_GetClassDefaultAttributes(*args, **kwargs)
8959
8960#---------------------------------------------------------------------------
8961
8962class ItemContainer(object):
8963 """
53aa7709
RD
8964 The wx.ItemContainer class defines an interface which is implemented
8965 by all controls which have string subitems, each of which may be
8966 selected, such as `wx.ListBox`, `wx.CheckListBox`, `wx.Choice` as well
8967 as `wx.ComboBox` which implements an extended interface deriving from
79fccf9d 8968 this one.
d55e5bfc 8969
79fccf9d
RD
8970 It defines the methods for accessing the control's items and although
8971 each of the derived classes implements them differently, they still
8972 all conform to the same interface.
d55e5bfc 8973
79fccf9d
RD
8974 The items in a wx.ItemContainer have (non empty) string labels and,
8975 optionally, client data associated with them.
d55e5bfc
RD
8976
8977 """
8978 def __init__(self): raise RuntimeError, "No constructor defined"
8979 def __repr__(self):
8980 return "<%s.%s; proxy of C++ wxItemContainer instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
8981 def Append(*args, **kwargs):
8982 """
8983 Append(self, String item, PyObject clientData=None) -> int
8984
79fccf9d
RD
8985 Adds the item to the control, associating the given data with the item
8986 if not None. The return value is the index of the newly added item
8987 which may be different from the last one if the control is sorted (e.g.
8988 has wx.LB_SORT or wx.CB_SORT style).
d55e5bfc
RD
8989 """
8990 return _core_.ItemContainer_Append(*args, **kwargs)
8991
8992 def AppendItems(*args, **kwargs):
8993 """
f5b96ee1 8994 AppendItems(self, List strings)
d55e5bfc 8995
79fccf9d
RD
8996 Apend several items at once to the control. Notice that calling this
8997 method may be much faster than appending the items one by one if you
8998 need to add a lot of items.
d55e5bfc
RD
8999 """
9000 return _core_.ItemContainer_AppendItems(*args, **kwargs)
9001
9002 def Insert(*args, **kwargs):
9003 """
9004 Insert(self, String item, int pos, PyObject clientData=None) -> int
9005
79fccf9d 9006 Insert an item into the control before the item at the ``pos`` index,
d55e5bfc
RD
9007 optionally associating some data object with the item.
9008 """
9009 return _core_.ItemContainer_Insert(*args, **kwargs)
9010
9011 def Clear(*args, **kwargs):
9012 """
9013 Clear(self)
9014
9015 Removes all items from the control.
9016 """
9017 return _core_.ItemContainer_Clear(*args, **kwargs)
9018
9019 def Delete(*args, **kwargs):
9020 """
9021 Delete(self, int n)
9022
79fccf9d
RD
9023 Deletes the item at the zero-based index 'n' from the control. Note
9024 that it is an error (signalled by a `wx.PyAssertionError` exception if
9025 enabled) to remove an item with the index negative or greater or equal
9026 than the number of items in the control.
d55e5bfc
RD
9027 """
9028 return _core_.ItemContainer_Delete(*args, **kwargs)
9029
53aa7709
RD
9030 def GetClientData(*args, **kwargs):
9031 """
9032 GetClientData(self, int n) -> PyObject
9033
9034 Returns the client data associated with the given item, (if any.)
9035 """
9036 return _core_.ItemContainer_GetClientData(*args, **kwargs)
9037
9038 def SetClientData(*args, **kwargs):
9039 """
9040 SetClientData(self, int n, PyObject clientData)
9041
9042 Associate the given client data with the item at position n.
9043 """
9044 return _core_.ItemContainer_SetClientData(*args, **kwargs)
9045
d55e5bfc
RD
9046 def GetCount(*args, **kwargs):
9047 """
9048 GetCount(self) -> int
9049
9050 Returns the number of items in the control.
9051 """
9052 return _core_.ItemContainer_GetCount(*args, **kwargs)
9053
9054 def IsEmpty(*args, **kwargs):
9055 """
9056 IsEmpty(self) -> bool
9057
9058 Returns True if the control is empty or False if it has some items.
9059 """
9060 return _core_.ItemContainer_IsEmpty(*args, **kwargs)
9061
9062 def GetString(*args, **kwargs):
9063 """
9064 GetString(self, int n) -> String
9065
9066 Returns the label of the item with the given index.
9067 """
9068 return _core_.ItemContainer_GetString(*args, **kwargs)
9069
9070 def GetStrings(*args, **kwargs):
9071 """GetStrings(self) -> wxArrayString"""
9072 return _core_.ItemContainer_GetStrings(*args, **kwargs)
9073
9074 def SetString(*args, **kwargs):
9075 """
9076 SetString(self, int n, String s)
9077
9078 Sets the label for the given item.
9079 """
9080 return _core_.ItemContainer_SetString(*args, **kwargs)
9081
9082 def FindString(*args, **kwargs):
9083 """
9084 FindString(self, String s) -> int
9085
9086 Finds an item whose label matches the given string. Returns the
79fccf9d
RD
9087 zero-based position of the item, or ``wx.NOT_FOUND`` if the string was not
9088 found.
d55e5bfc
RD
9089 """
9090 return _core_.ItemContainer_FindString(*args, **kwargs)
9091
53aa7709 9092 def SetSelection(*args, **kwargs):
d55e5bfc 9093 """
53aa7709 9094 SetSelection(self, int n)
d55e5bfc
RD
9095
9096 Sets the item at index 'n' to be the selected item.
9097 """
53aa7709 9098 return _core_.ItemContainer_SetSelection(*args, **kwargs)
d55e5bfc 9099
d55e5bfc
RD
9100 def GetSelection(*args, **kwargs):
9101 """
9102 GetSelection(self) -> int
9103
79fccf9d
RD
9104 Returns the index of the selected item or ``wx.NOT_FOUND`` if no item
9105 is selected.
d55e5bfc
RD
9106 """
9107 return _core_.ItemContainer_GetSelection(*args, **kwargs)
9108
53aa7709
RD
9109 def SetStringSelection(*args, **kwargs):
9110 """SetStringSelection(self, String s) -> bool"""
9111 return _core_.ItemContainer_SetStringSelection(*args, **kwargs)
9112
d55e5bfc
RD
9113 def GetStringSelection(*args, **kwargs):
9114 """
9115 GetStringSelection(self) -> String
9116
79fccf9d
RD
9117 Returns the label of the selected item or an empty string if no item
9118 is selected.
d55e5bfc
RD
9119 """
9120 return _core_.ItemContainer_GetStringSelection(*args, **kwargs)
9121
53aa7709 9122 def Select(*args, **kwargs):
d55e5bfc 9123 """
53aa7709 9124 Select(self, int n)
d55e5bfc 9125
53aa7709
RD
9126 This is the same as `SetSelection` and exists only because it is
9127 slightly more natural for controls which support multiple selection.
d55e5bfc 9128 """
53aa7709 9129 return _core_.ItemContainer_Select(*args, **kwargs)
d55e5bfc
RD
9130
9131
9132class ItemContainerPtr(ItemContainer):
9133 def __init__(self, this):
9134 self.this = this
9135 if not hasattr(self,"thisown"): self.thisown = 0
9136 self.__class__ = ItemContainer
9137_core_.ItemContainer_swigregister(ItemContainerPtr)
9138
9139#---------------------------------------------------------------------------
9140
9141class ControlWithItems(Control,ItemContainer):
9142 """
79fccf9d
RD
9143 wx.ControlWithItems combines the ``wx.ItemContainer`` class with the
9144 wx.Control class, and is used for the base class of various controls
9145 that have items.
d55e5bfc
RD
9146 """
9147 def __init__(self): raise RuntimeError, "No constructor defined"
9148 def __repr__(self):
9149 return "<%s.%s; proxy of C++ wxControlWithItems instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
9150
9151class ControlWithItemsPtr(ControlWithItems):
9152 def __init__(self, this):
9153 self.this = this
9154 if not hasattr(self,"thisown"): self.thisown = 0
9155 self.__class__ = ControlWithItems
9156_core_.ControlWithItems_swigregister(ControlWithItemsPtr)
9157
9158#---------------------------------------------------------------------------
9159
9160class SizerItem(Object):
248ed943
RD
9161 """
9162 The wx.SizerItem class is used to track the position, size and other
9163 attributes of each item managed by a `wx.Sizer`. In normal usage user
9164 code should never need to deal directly with a wx.SizerItem, but
9165 custom classes derived from `wx.PySizer` will probably need to use the
9166 collection of wx.SizerItems held by wx.Sizer when calculating layout.
9167
9168 :see: `wx.Sizer`, `wx.GBSizerItem`
9169 """
d55e5bfc
RD
9170 def __repr__(self):
9171 return "<%s.%s; proxy of C++ wxSizerItem instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
9172 def __init__(self, *args, **kwargs):
248ed943
RD
9173 """
9174 __init__(self) -> SizerItem
9175
9176 Constructs an empty wx.SizerItem. Either a window, sizer or spacer
9177 size will need to be set before this item can be used in a Sizer.
9178
9179 You will probably never need to create a wx.SizerItem directly as they
9180 are created automatically when the sizer's Add, Insert or Prepend
9181 methods are called.
9182
9183 :see: `wx.SizerItemSpacer`, `wx.SizerItemWindow`, `wx.SizerItemSizer`
9184 """
d55e5bfc
RD
9185 newobj = _core_.new_SizerItem(*args, **kwargs)
9186 self.this = newobj.this
9187 self.thisown = 1
9188 del newobj.thisown
9189 def DeleteWindows(*args, **kwargs):
248ed943
RD
9190 """
9191 DeleteWindows(self)
9192
9193 Destroy the window or the windows in a subsizer, depending on the type
9194 of item.
9195 """
d55e5bfc
RD
9196 return _core_.SizerItem_DeleteWindows(*args, **kwargs)
9197
9198 def DetachSizer(*args, **kwargs):
248ed943
RD
9199 """
9200 DetachSizer(self)
9201
9202 Enable deleting the SizerItem without destroying the contained sizer.
9203 """
d55e5bfc
RD
9204 return _core_.SizerItem_DetachSizer(*args, **kwargs)
9205
9206 def GetSize(*args, **kwargs):
248ed943
RD
9207 """
9208 GetSize(self) -> Size
9209
9210 Get the current size of the item, as set in the last Layout.
9211 """
d55e5bfc
RD
9212 return _core_.SizerItem_GetSize(*args, **kwargs)
9213
9214 def CalcMin(*args, **kwargs):
248ed943
RD
9215 """
9216 CalcMin(self) -> Size
9217
9218 Calculates the minimum desired size for the item, including any space
9219 needed by borders.
9220 """
d55e5bfc
RD
9221 return _core_.SizerItem_CalcMin(*args, **kwargs)
9222
9223 def SetDimension(*args, **kwargs):
248ed943
RD
9224 """
9225 SetDimension(self, Point pos, Size size)
9226
9227 Set the position and size of the space allocated for this item by the
9228 sizer, and adjust the position and size of the item (window or
9229 subsizer) to be within that space taking alignment and borders into
9230 account.
9231 """
d55e5bfc
RD
9232 return _core_.SizerItem_SetDimension(*args, **kwargs)
9233
9234 def GetMinSize(*args, **kwargs):
248ed943
RD
9235 """
9236 GetMinSize(self) -> Size
9237
9238 Get the minimum size needed for the item.
9239 """
d55e5bfc
RD
9240 return _core_.SizerItem_GetMinSize(*args, **kwargs)
9241
a001823c
RD
9242 def GetMinSizeWithBorder(*args, **kwargs):
9243 """
9244 GetMinSizeWithBorder(self) -> Size
9245
9246 Get the minimum size needed for the item with space for the borders
9247 added, if needed.
9248 """
9249 return _core_.SizerItem_GetMinSizeWithBorder(*args, **kwargs)
9250
d55e5bfc
RD
9251 def SetInitSize(*args, **kwargs):
9252 """SetInitSize(self, int x, int y)"""
9253 return _core_.SizerItem_SetInitSize(*args, **kwargs)
9254
9255 def SetRatioWH(*args, **kwargs):
248ed943
RD
9256 """
9257 SetRatioWH(self, int width, int height)
9258
9259 Set the ratio item attribute.
9260 """
d55e5bfc
RD
9261 return _core_.SizerItem_SetRatioWH(*args, **kwargs)
9262
9263 def SetRatioSize(*args, **kwargs):
248ed943
RD
9264 """
9265 SetRatioSize(self, Size size)
9266
9267 Set the ratio item attribute.
9268 """
d55e5bfc
RD
9269 return _core_.SizerItem_SetRatioSize(*args, **kwargs)
9270
9271 def SetRatio(*args, **kwargs):
248ed943
RD
9272 """
9273 SetRatio(self, float ratio)
9274
9275 Set the ratio item attribute.
9276 """
d55e5bfc
RD
9277 return _core_.SizerItem_SetRatio(*args, **kwargs)
9278
9279 def GetRatio(*args, **kwargs):
248ed943
RD
9280 """
9281 GetRatio(self) -> float
9282
9283 Set the ratio item attribute.
9284 """
d55e5bfc
RD
9285 return _core_.SizerItem_GetRatio(*args, **kwargs)
9286
c1cb24a4
RD
9287 def GetRect(*args, **kwargs):
9288 """
9289 GetRect(self) -> Rect
9290
9291 Returns the rectangle that the sizer item should occupy
9292 """
9293 return _core_.SizerItem_GetRect(*args, **kwargs)
9294
d55e5bfc 9295 def IsWindow(*args, **kwargs):
248ed943
RD
9296 """
9297 IsWindow(self) -> bool
9298
9299 Is this sizer item a window?
9300 """
d55e5bfc
RD
9301 return _core_.SizerItem_IsWindow(*args, **kwargs)
9302
9303 def IsSizer(*args, **kwargs):
248ed943
RD
9304 """
9305 IsSizer(self) -> bool
9306
9307 Is this sizer item a subsizer?
9308 """
d55e5bfc
RD
9309 return _core_.SizerItem_IsSizer(*args, **kwargs)
9310
9311 def IsSpacer(*args, **kwargs):
248ed943
RD
9312 """
9313 IsSpacer(self) -> bool
9314
9315 Is this sizer item a spacer?
9316 """
d55e5bfc
RD
9317 return _core_.SizerItem_IsSpacer(*args, **kwargs)
9318
9319 def SetProportion(*args, **kwargs):
248ed943
RD
9320 """
9321 SetProportion(self, int proportion)
9322
9323 Set the proportion value for this item.
9324 """
d55e5bfc
RD
9325 return _core_.SizerItem_SetProportion(*args, **kwargs)
9326
9327 def GetProportion(*args, **kwargs):
248ed943
RD
9328 """
9329 GetProportion(self) -> int
9330
9331 Get the proportion value for this item.
9332 """
d55e5bfc
RD
9333 return _core_.SizerItem_GetProportion(*args, **kwargs)
9334
248ed943
RD
9335 SetOption = wx._deprecated(SetProportion, "Please use `SetProportion` instead.")
9336 GetOption = wx._deprecated(GetProportion, "Please use `GetProportion` instead.")
d55e5bfc 9337 def SetFlag(*args, **kwargs):
248ed943
RD
9338 """
9339 SetFlag(self, int flag)
9340
9341 Set the flag value for this item.
9342 """
d55e5bfc
RD
9343 return _core_.SizerItem_SetFlag(*args, **kwargs)
9344
9345 def GetFlag(*args, **kwargs):
248ed943
RD
9346 """
9347 GetFlag(self) -> int
9348
9349 Get the flag value for this item.
9350 """
d55e5bfc
RD
9351 return _core_.SizerItem_GetFlag(*args, **kwargs)
9352
9353 def SetBorder(*args, **kwargs):
248ed943
RD
9354 """
9355 SetBorder(self, int border)
9356
9357 Set the border value for this item.
9358 """
d55e5bfc
RD
9359 return _core_.SizerItem_SetBorder(*args, **kwargs)
9360
9361 def GetBorder(*args, **kwargs):
248ed943
RD
9362 """
9363 GetBorder(self) -> int
9364
9365 Get the border value for this item.
9366 """
d55e5bfc
RD
9367 return _core_.SizerItem_GetBorder(*args, **kwargs)
9368
9369 def GetWindow(*args, **kwargs):
248ed943
RD
9370 """
9371 GetWindow(self) -> Window
9372
9373 Get the window (if any) that is managed by this sizer item.
9374 """
d55e5bfc
RD
9375 return _core_.SizerItem_GetWindow(*args, **kwargs)
9376
9377 def SetWindow(*args, **kwargs):
248ed943
RD
9378 """
9379 SetWindow(self, Window window)
9380
9381 Set the window to be managed by this sizer item.
9382 """
d55e5bfc
RD
9383 return _core_.SizerItem_SetWindow(*args, **kwargs)
9384
9385 def GetSizer(*args, **kwargs):
248ed943
RD
9386 """
9387 GetSizer(self) -> Sizer
9388
9389 Get the subsizer (if any) that is managed by this sizer item.
9390 """
d55e5bfc
RD
9391 return _core_.SizerItem_GetSizer(*args, **kwargs)
9392
9393 def SetSizer(*args, **kwargs):
248ed943
RD
9394 """
9395 SetSizer(self, Sizer sizer)
9396
9397 Set the subsizer to be managed by this sizer item.
9398 """
d55e5bfc
RD
9399 return _core_.SizerItem_SetSizer(*args, **kwargs)
9400
9401 def GetSpacer(*args, **kwargs):
248ed943
RD
9402 """
9403 GetSpacer(self) -> Size
9404
9405 Get the size of the spacer managed by this sizer item.
9406 """
d55e5bfc
RD
9407 return _core_.SizerItem_GetSpacer(*args, **kwargs)
9408
9409 def SetSpacer(*args, **kwargs):
248ed943
RD
9410 """
9411 SetSpacer(self, Size size)
9412
9413 Set the size of the spacer to be managed by this sizer item.
9414 """
d55e5bfc
RD
9415 return _core_.SizerItem_SetSpacer(*args, **kwargs)
9416
9417 def Show(*args, **kwargs):
248ed943
RD
9418 """
9419 Show(self, bool show)
9420
9421 Set the show item attribute, which sizers use to determine if the item
9422 is to be made part of the layout or not. If the item is tracking a
9423 window then it is shown or hidden as needed.
9424 """
d55e5bfc
RD
9425 return _core_.SizerItem_Show(*args, **kwargs)
9426
9427 def IsShown(*args, **kwargs):
248ed943
RD
9428 """
9429 IsShown(self) -> bool
9430
9431 Is the item to be shown in the layout?
9432 """
d55e5bfc
RD
9433 return _core_.SizerItem_IsShown(*args, **kwargs)
9434
9435 def GetPosition(*args, **kwargs):
248ed943
RD
9436 """
9437 GetPosition(self) -> Point
9438
9439 Returns the current position of the item, as set in the last Layout.
9440 """
d55e5bfc
RD
9441 return _core_.SizerItem_GetPosition(*args, **kwargs)
9442
9443 def GetUserData(*args, **kwargs):
248ed943
RD
9444 """
9445 GetUserData(self) -> PyObject
9446
9447 Returns the userData associated with this sizer item, or None if there
9448 isn't any.
9449 """
d55e5bfc
RD
9450 return _core_.SizerItem_GetUserData(*args, **kwargs)
9451
9452
9453class SizerItemPtr(SizerItem):
9454 def __init__(self, this):
9455 self.this = this
9456 if not hasattr(self,"thisown"): self.thisown = 0
9457 self.__class__ = SizerItem
9458_core_.SizerItem_swigregister(SizerItemPtr)
9459
248ed943 9460def SizerItemWindow(*args, **kwargs):
d55e5bfc 9461 """
248ed943
RD
9462 SizerItemWindow(Window window, int proportion, int flag, int border,
9463 PyObject userData=None) -> SizerItem
9464
9465 Constructs a `wx.SizerItem` for tracking a window.
d55e5bfc 9466 """
248ed943 9467 val = _core_.new_SizerItemWindow(*args, **kwargs)
d55e5bfc
RD
9468 val.thisown = 1
9469 return val
9470
248ed943 9471def SizerItemSpacer(*args, **kwargs):
d55e5bfc 9472 """
248ed943
RD
9473 SizerItemSpacer(int width, int height, int proportion, int flag, int border,
9474 PyObject userData=None) -> SizerItem
9475
9476 Constructs a `wx.SizerItem` for tracking a spacer.
d55e5bfc 9477 """
248ed943 9478 val = _core_.new_SizerItemSpacer(*args, **kwargs)
d55e5bfc
RD
9479 val.thisown = 1
9480 return val
9481
9482def SizerItemSizer(*args, **kwargs):
9483 """
9484 SizerItemSizer(Sizer sizer, int proportion, int flag, int border,
248ed943
RD
9485 PyObject userData=None) -> SizerItem
9486
9487 Constructs a `wx.SizerItem` for tracking a subsizer
d55e5bfc
RD
9488 """
9489 val = _core_.new_SizerItemSizer(*args, **kwargs)
9490 val.thisown = 1
9491 return val
9492
9493class Sizer(Object):
248ed943
RD
9494 """
9495 wx.Sizer is the abstract base class used for laying out subwindows in
9496 a window. You cannot use wx.Sizer directly; instead, you will have to
9497 use one of the sizer classes derived from it such as `wx.BoxSizer`,
9498 `wx.StaticBoxSizer`, `wx.NotebookSizer`, `wx.GridSizer`, `wx.FlexGridSizer`
9499 and `wx.GridBagSizer`.
9500
9501 The concept implemented by sizers in wxWidgets is closely related to
9502 layout tools in other GUI toolkits, such as Java's AWT, the GTK
9503 toolkit or the Qt toolkit. It is based upon the idea of the individual
9504 subwindows reporting their minimal required size and their ability to
9505 get stretched if the size of the parent window has changed. This will
9506 most often mean that the programmer does not set the original size of
9507 a dialog in the beginning, rather the dialog will assigned a sizer and
9508 this sizer will be queried about the recommended size. The sizer in
9509 turn will query its children, which can be normal windows or contorls,
9510 empty space or other sizers, so that a hierarchy of sizers can be
9511 constructed. Note that wxSizer does not derive from wxWindow and thus
9512 do not interfere with tab ordering and requires very little resources
9513 compared to a real window on screen.
9514
9515 What makes sizers so well fitted for use in wxWidgets is the fact that
9516 every control reports its own minimal size and the algorithm can
9517 handle differences in font sizes or different window (dialog item)
9518 sizes on different platforms without problems. If for example the
9519 standard font as well as the overall design of Mac widgets requires
9520 more space than on Windows, then the initial size of a dialog using a
9521 sizer will automatically be bigger on Mac than on Windows.
9522 """
d55e5bfc
RD
9523 def __init__(self): raise RuntimeError, "No constructor defined"
9524 def __repr__(self):
9525 return "<%s.%s; proxy of C++ wxSizer instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
9526 def _setOORInfo(*args, **kwargs):
9527 """_setOORInfo(self, PyObject _self)"""
9528 return _core_.Sizer__setOORInfo(*args, **kwargs)
9529
9530 def Add(*args, **kwargs):
9531 """
248ed943 9532 Add(self, item, int proportion=0, int flag=0, int border=0,
c1cb24a4 9533 PyObject userData=None) -> wx.SizerItem
248ed943
RD
9534
9535 Appends a child item to the sizer.
d55e5bfc
RD
9536 """
9537 return _core_.Sizer_Add(*args, **kwargs)
9538
9539 def Insert(*args, **kwargs):
9540 """
248ed943 9541 Insert(self, int before, item, int proportion=0, int flag=0, int border=0,
c1cb24a4 9542 PyObject userData=None) -> wx.SizerItem
248ed943
RD
9543
9544 Inserts a new item into the list of items managed by this sizer before
9545 the item at index *before*. See `Add` for a description of the parameters.
d55e5bfc
RD
9546 """
9547 return _core_.Sizer_Insert(*args, **kwargs)
9548
9549 def Prepend(*args, **kwargs):
9550 """
248ed943 9551 Prepend(self, item, int proportion=0, int flag=0, int border=0,
c1cb24a4 9552 PyObject userData=None) -> wx.SizerItem
248ed943
RD
9553
9554 Adds a new item to the begining of the list of sizer items managed by
9555 this sizer. See `Add` for a description of the parameters.
d55e5bfc
RD
9556 """
9557 return _core_.Sizer_Prepend(*args, **kwargs)
9558
9559 def Remove(*args, **kwargs):
248ed943
RD
9560 """
9561 Remove(self, item) -> bool
9562
9563 Removes an item from the sizer and destroys it. This method does not
9564 cause any layout or resizing to take place, call `Layout` to update
9565 the layout on screen after removing a child from the sizer. The
9566 *item* parameter can be either a window, a sizer, or the zero-based
9567 index of an item to remove. Returns True if the child item was found
9568 and removed.
9569 """
d55e5bfc
RD
9570 return _core_.Sizer_Remove(*args, **kwargs)
9571
1a6bba1e 9572 def Detach(*args, **kwargs):
248ed943
RD
9573 """
9574 Detach(self, item) -> bool
9575
9576 Detaches an item from the sizer without destroying it. This method
9577 does not cause any layout or resizing to take place, call `Layout` to
9578 do so. The *item* parameter can be either a window, a sizer, or the
9579 zero-based index of the item to be detached. Returns True if the child item
9580 was found and detached.
9581 """
1a6bba1e
RD
9582 return _core_.Sizer_Detach(*args, **kwargs)
9583
c1cb24a4
RD
9584 def GetItem(*args, **kwargs):
9585 """
9586 GetItem(self, item) -> wx.SizerItem
9587
9588 Returns the `wx.SizerItem` which holds the *item* given. The *item*
9589 parameter can be either a window, a sizer, or the zero-based index of
9590 the item to be detached.
9591 """
9592 return _core_.Sizer_GetItem(*args, **kwargs)
9593
d55e5bfc
RD
9594 def _SetItemMinSize(*args, **kwargs):
9595 """_SetItemMinSize(self, PyObject item, Size size)"""
9596 return _core_.Sizer__SetItemMinSize(*args, **kwargs)
9597
248ed943
RD
9598 def SetItemMinSize(self, item, *args):
9599 """
9600 SetItemMinSize(self, item, Size size)
9601
9602 Sets the minimum size that will be allocated for an item in the sizer.
9603 The *item* parameter can be either a window, a sizer, or the
9604 zero-based index of the item. If a window or sizer is given then it
9605 will be searched for recursivly in subsizers if neccessary.
9606 """
9607 if len(args) == 2:
9608 # for backward compatibility accept separate width,height args too
9609 return self._SetItemMinSize(item, args)
9610 else:
9611 return self._SetItemMinSize(item, args[0])
9612
d55e5bfc 9613 def AddItem(*args, **kwargs):
248ed943
RD
9614 """
9615 AddItem(self, SizerItem item)
9616
9617 Adds a `wx.SizerItem` to the sizer.
9618 """
d55e5bfc
RD
9619 return _core_.Sizer_AddItem(*args, **kwargs)
9620
9621 def InsertItem(*args, **kwargs):
248ed943
RD
9622 """
9623 InsertItem(self, int index, SizerItem item)
9624
9625 Inserts a `wx.SizerItem` to the sizer at the position given by *index*.
9626 """
d55e5bfc
RD
9627 return _core_.Sizer_InsertItem(*args, **kwargs)
9628
9629 def PrependItem(*args, **kwargs):
248ed943
RD
9630 """
9631 PrependItem(self, SizerItem item)
9632
9633 Prepends a `wx.SizerItem` to the sizer.
9634 """
d55e5bfc
RD
9635 return _core_.Sizer_PrependItem(*args, **kwargs)
9636
248ed943 9637 def AddMany(self, items):
c24da6d6
RD
9638 """
9639 AddMany is a convenience method for adding several items
9640 to a sizer at one time. Simply pass it a list of tuples,
9641 where each tuple consists of the parameters that you
9642 would normally pass to the `Add` method.
9643 """
248ed943
RD
9644 for item in items:
9645 if type(item) != type(()) or (len(item) == 2 and type(item[0]) == type(1)):
9646 item = (item, )
9647 self.Add(*item)
d55e5bfc
RD
9648
9649 # for backwards compatibility only, please do not use in new code
b9d6a5f3
RD
9650 def AddWindow(self, *args, **kw):
9651 """Compatibility alias for `Add`."""
9652 return self.Add(*args, **kw)
9653 def AddSizer(self, *args, **kw):
9654 """Compatibility alias for `Add`."""
9655 return self.Add(*args, **kw)
9656 def AddSpacer(self, *args, **kw):
9657 """Compatibility alias for `Add`."""
9658 return self.Add(*args, **kw)
9659
9660 def PrependWindow(self, *args, **kw):
9661 """Compatibility alias for `Prepend`."""
9662 return self.Prepend(*args, **kw)
9663 def PrependSizer(self, *args, **kw):
9664 """Compatibility alias for `Prepend`."""
9665 return self.Prepend(*args, **kw)
9666 def PrependSpacer(self, *args, **kw):
9667 """Compatibility alias for `Prepend`."""
9668 return self.Prepend(*args, **kw)
9669
9670 def InsertWindow(self, *args, **kw):
9671 """Compatibility alias for `Insert`."""
9672 return self.Insert(*args, **kw)
9673 def InsertSizer(self, *args, **kw):
9674 """Compatibility alias for `Insert`."""
9675 return self.Insert(*args, **kw)
9676 def InsertSpacer(self, *args, **kw):
9677 """Compatibility alias for `Insert`."""
9678 return self.Insert(*args, **kw)
9679
9680 def RemoveWindow(self, *args, **kw):
9681 """Compatibility alias for `Remove`."""
9682 return self.Remove(*args, **kw)
9683 def RemoveSizer(self, *args, **kw):
9684 """Compatibility alias for `Remove`."""
9685 return self.Remove(*args, **kw)
9686 def RemovePos(self, *args, **kw):
9687 """Compatibility alias for `Remove`."""
9688 return self.Remove(*args, **kw)
d55e5bfc
RD
9689
9690
d55e5bfc 9691 def SetDimension(*args, **kwargs):
248ed943
RD
9692 """
9693 SetDimension(self, int x, int y, int width, int height)
9694
9695 Call this to force the sizer to take the given dimension and thus
9696 force the items owned by the sizer to resize themselves according to
9697 the rules defined by the parameter in the `Add`, `Insert` or `Prepend`
9698 methods.
9699 """
d55e5bfc
RD
9700 return _core_.Sizer_SetDimension(*args, **kwargs)
9701
9702 def SetMinSize(*args, **kwargs):
248ed943
RD
9703 """
9704 SetMinSize(self, Size size)
9705
9706 Call this to give the sizer a minimal size. Normally, the sizer will
9707 calculate its minimal size based purely on how much space its children
9708 need. After calling this method `GetMinSize` will return either the
9709 minimal size as requested by its children or the minimal size set
9710 here, depending on which is bigger.
9711 """
d55e5bfc
RD
9712 return _core_.Sizer_SetMinSize(*args, **kwargs)
9713
9714 def GetSize(*args, **kwargs):
248ed943
RD
9715 """
9716 GetSize(self) -> Size
9717
9718 Returns the current size of the space managed by the sizer.
9719 """
d55e5bfc
RD
9720 return _core_.Sizer_GetSize(*args, **kwargs)
9721
9722 def GetPosition(*args, **kwargs):
248ed943
RD
9723 """
9724 GetPosition(self) -> Point
9725
9726 Returns the current position of the sizer's managed space.
9727 """
d55e5bfc
RD
9728 return _core_.Sizer_GetPosition(*args, **kwargs)
9729
9730 def GetMinSize(*args, **kwargs):
248ed943
RD
9731 """
9732 GetMinSize(self) -> Size
9733
9734 Returns the minimal size of the sizer. This is either the combined
9735 minimal size of all the children and their borders or the minimal size
9736 set by SetMinSize, depending on which is bigger.
9737 """
d55e5bfc
RD
9738 return _core_.Sizer_GetMinSize(*args, **kwargs)
9739
9740 def GetSizeTuple(self):
1a6bba1e 9741 return self.GetSize().Get()
d55e5bfc 9742 def GetPositionTuple(self):
1a6bba1e 9743 return self.GetPosition().Get()
d55e5bfc 9744 def GetMinSizeTuple(self):
1a6bba1e 9745 return self.GetMinSize().Get()
d55e5bfc
RD
9746
9747 def RecalcSizes(*args, **kwargs):
248ed943
RD
9748 """
9749 RecalcSizes(self)
9750
9751 Using the sizes calculated by `CalcMin` reposition and resize all the
9752 items managed by this sizer. You should not need to call this directly as
9753 it is called by `Layout`.
9754 """
d55e5bfc
RD
9755 return _core_.Sizer_RecalcSizes(*args, **kwargs)
9756
9757 def CalcMin(*args, **kwargs):
248ed943
RD
9758 """
9759 CalcMin(self) -> Size
9760
9761 This method is where the sizer will do the actual calculation of its
9762 children's minimal sizes. You should not need to call this directly as
9763 it is called by `Layout`.
9764 """
d55e5bfc
RD
9765 return _core_.Sizer_CalcMin(*args, **kwargs)
9766
9767 def Layout(*args, **kwargs):
248ed943
RD
9768 """
9769 Layout(self)
9770
9771 This method will force the recalculation and layout of the items
9772 controlled by the sizer using the current space allocated to the
9773 sizer. Normally this is called automatically from the owning window's
9774 EVT_SIZE handler, but it is also useful to call it from user code when
9775 one of the items in a sizer change size, or items are added or
9776 removed.
9777 """
d55e5bfc
RD
9778 return _core_.Sizer_Layout(*args, **kwargs)
9779
9780 def Fit(*args, **kwargs):
248ed943
RD
9781 """
9782 Fit(self, Window window) -> Size
9783
9784 Tell the sizer to resize the *window* to match the sizer's minimal
9785 size. This is commonly done in the constructor of the window itself in
9786 order to set its initial size to match the needs of the children as
9787 determined by the sizer. Returns the new size.
9788
9789 For a top level window this is the total window size, not the client size.
9790 """
d55e5bfc
RD
9791 return _core_.Sizer_Fit(*args, **kwargs)
9792
9793 def FitInside(*args, **kwargs):
248ed943
RD
9794 """
9795 FitInside(self, Window window)
9796
9797 Tell the sizer to resize the *virtual size* of the *window* to match the
9798 sizer's minimal size. This will not alter the on screen size of the
9799 window, but may cause the addition/removal/alteration of scrollbars
9800 required to view the virtual area in windows which manage it.
9801
9802 :see: `wx.ScrolledWindow.SetScrollbars`, `SetVirtualSizeHints`
9803
9804 """
d55e5bfc
RD
9805 return _core_.Sizer_FitInside(*args, **kwargs)
9806
9807 def SetSizeHints(*args, **kwargs):
248ed943
RD
9808 """
9809 SetSizeHints(self, Window window)
9810
9811 Tell the sizer to set (and `Fit`) the minimal size of the *window* to
9812 match the sizer's minimal size. This is commonly done in the
9813 constructor of the window itself if the window is resizable (as are
9814 many dialogs under Unix and frames on probably all platforms) in order
9815 to prevent the window from being sized smaller than the minimal size
9816 required by the sizer.
9817 """
d55e5bfc
RD
9818 return _core_.Sizer_SetSizeHints(*args, **kwargs)
9819
9820 def SetVirtualSizeHints(*args, **kwargs):
248ed943
RD
9821 """
9822 SetVirtualSizeHints(self, Window window)
9823
9824 Tell the sizer to set the minimal size of the window virtual area to
9825 match the sizer's minimal size. For windows with managed scrollbars
9826 this will set them appropriately.
9827
9828 :see: `wx.ScrolledWindow.SetScrollbars`
9829
9830 """
d55e5bfc
RD
9831 return _core_.Sizer_SetVirtualSizeHints(*args, **kwargs)
9832
9833 def Clear(*args, **kwargs):
248ed943
RD
9834 """
9835 Clear(self, bool deleteWindows=False)
9836
9837 Clear all items from the sizer, optionally destroying the window items
9838 as well.
9839 """
d55e5bfc
RD
9840 return _core_.Sizer_Clear(*args, **kwargs)
9841
9842 def DeleteWindows(*args, **kwargs):
248ed943
RD
9843 """
9844 DeleteWindows(self)
9845
9846 Destroy all windows managed by the sizer.
9847 """
d55e5bfc
RD
9848 return _core_.Sizer_DeleteWindows(*args, **kwargs)
9849
9850 def GetChildren(*args, **kwargs):
248ed943 9851 """
51b83b37 9852 GetChildren(self) -> list
248ed943
RD
9853
9854 Returns a list of all the `wx.SizerItem` objects managed by the sizer.
9855 """
d55e5bfc
RD
9856 return _core_.Sizer_GetChildren(*args, **kwargs)
9857
9858 def Show(*args, **kwargs):
248ed943 9859 """
ae8162c8 9860 Show(self, item, bool show=True, bool recursive=false) -> bool
d55e5bfc 9861
248ed943
RD
9862 Shows or hides an item managed by the sizer. To make a sizer item
9863 disappear or reappear, use Show followed by `Layout`. The *item*
9864 parameter can be either a window, a sizer, or the zero-based index of
629e65c2
RD
9865 the item. Use the recursive parameter to show or hide an item in a
9866 subsizer. Returns True if the item was found.
248ed943
RD
9867 """
9868 return _core_.Sizer_Show(*args, **kwargs)
d55e5bfc
RD
9869
9870 def IsShown(*args, **kwargs):
248ed943
RD
9871 """
9872 IsShown(self, item)
9873
9874 Determines if the item is currently shown. sizer. To make a sizer
9875 item disappear or reappear, use Show followed by `Layout`. The *item*
9876 parameter can be either a window, a sizer, or the zero-based index of
9877 the item.
9878 """
d55e5bfc
RD
9879 return _core_.Sizer_IsShown(*args, **kwargs)
9880
629e65c2 9881 def Hide(self, item, recursive=False):
248ed943 9882 """
629e65c2 9883 A convenience method for Show(item, False, recursive).
248ed943 9884 """
06759a38 9885 return self.Show(item, False, recursive)
248ed943 9886
d55e5bfc 9887 def ShowItems(*args, **kwargs):
248ed943
RD
9888 """
9889 ShowItems(self, bool show)
9890
84f85550 9891 Recursively call `wx.SizerItem.Show` on all sizer items.
248ed943 9892 """
d55e5bfc
RD
9893 return _core_.Sizer_ShowItems(*args, **kwargs)
9894
9895
9896class SizerPtr(Sizer):
9897 def __init__(self, this):
9898 self.this = this
9899 if not hasattr(self,"thisown"): self.thisown = 0
9900 self.__class__ = Sizer
9901_core_.Sizer_swigregister(SizerPtr)
9902
9903class PySizer(Sizer):
248ed943
RD
9904 """
9905 wx.PySizer is a special version of `wx.Sizer` that has been
9906 instrumented to allow the C++ virtual methods to be overloaded in
9907 Python derived classes. You would derive from this class if you are
9908 wanting to implement a custom sizer in Python code. Simply implement
9909 `CalcMin` and `RecalcSizes` in the derived class and you're all set.
9910 For example::
9911
9912 class MySizer(wx.PySizer):
9913 def __init__(self):
9914 wx.PySizer.__init__(self)
9915
9916 def CalcMin(self):
9917 for item in self.GetChildren():
9918 # calculate the total minimum width and height needed
9919 # by all items in the sizer according to this sizer's
9920 # layout algorithm.
9921 ...
9922 return wx.Size(width, height)
9923
9924 def RecalcSizes(self):
9925 # find the space allotted to this sizer
9926 pos = self.GetPosition()
9927 size = self.GetSize()
9928 for item in self.GetChildren():
9929 # Recalculate (if necessary) the position and size of
9930 # each item and then call item.SetDimension to do the
9931 # actual positioning and sizing of the items within the
9932 # space alloted to this sizer.
9933 ...
9934 item.SetDimension(itemPos, itemSize)
9935
9936
9937 When `Layout` is called it first calls `CalcMin` followed by
9938 `RecalcSizes` so you can optimize a bit by saving the results of
62d32a5f 9939 `CalcMin` and reusing them in `RecalcSizes`.
248ed943
RD
9940
9941 :see: `wx.SizerItem`, `wx.Sizer.GetChildren`
9942
9943
9944 """
d55e5bfc
RD
9945 def __repr__(self):
9946 return "<%s.%s; proxy of C++ wxPySizer instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
9947 def __init__(self, *args, **kwargs):
248ed943
RD
9948 """
9949 __init__(self) -> PySizer
9950
9951 Creates a wx.PySizer. Must be called from the __init__ in the derived
9952 class.
9953 """
d55e5bfc
RD
9954 newobj = _core_.new_PySizer(*args, **kwargs)
9955 self.this = newobj.this
9956 self.thisown = 1
9957 del newobj.thisown
9958 self._setCallbackInfo(self, PySizer);self._setOORInfo(self)
9959
9960 def _setCallbackInfo(*args, **kwargs):
9961 """_setCallbackInfo(self, PyObject self, PyObject _class)"""
9962 return _core_.PySizer__setCallbackInfo(*args, **kwargs)
9963
9964
9965class PySizerPtr(PySizer):
9966 def __init__(self, this):
9967 self.this = this
9968 if not hasattr(self,"thisown"): self.thisown = 0
9969 self.__class__ = PySizer
9970_core_.PySizer_swigregister(PySizerPtr)
9971
9972#---------------------------------------------------------------------------
9973
9974class BoxSizer(Sizer):
248ed943
RD
9975 """
9976 The basic idea behind a box sizer is that windows will most often be
9977 laid out in rather simple basic geometry, typically in a row or a
9978 column or nested hierarchies of either. A wx.BoxSizer will lay out
9979 its items in a simple row or column, depending on the orientation
9980 parameter passed to the constructor.
9981 """
d55e5bfc
RD
9982 def __repr__(self):
9983 return "<%s.%s; proxy of C++ wxBoxSizer instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
9984 def __init__(self, *args, **kwargs):
248ed943
RD
9985 """
9986 __init__(self, int orient=HORIZONTAL) -> BoxSizer
9987
9988 Constructor for a wx.BoxSizer. *orient* may be one of ``wx.VERTICAL``
9989 or ``wx.HORIZONTAL`` for creating either a column sizer or a row
9990 sizer.
9991 """
d55e5bfc
RD
9992 newobj = _core_.new_BoxSizer(*args, **kwargs)
9993 self.this = newobj.this
9994 self.thisown = 1
9995 del newobj.thisown
9996 self._setOORInfo(self)
9997
9998 def GetOrientation(*args, **kwargs):
248ed943
RD
9999 """
10000 GetOrientation(self) -> int
10001
10002 Returns the current orientation of the sizer.
10003 """
d55e5bfc
RD
10004 return _core_.BoxSizer_GetOrientation(*args, **kwargs)
10005
10006 def SetOrientation(*args, **kwargs):
248ed943
RD
10007 """
10008 SetOrientation(self, int orient)
d55e5bfc 10009
248ed943
RD
10010 Resets the orientation of the sizer.
10011 """
10012 return _core_.BoxSizer_SetOrientation(*args, **kwargs)
d55e5bfc
RD
10013
10014
10015class BoxSizerPtr(BoxSizer):
10016 def __init__(self, this):
10017 self.this = this
10018 if not hasattr(self,"thisown"): self.thisown = 0
10019 self.__class__ = BoxSizer
10020_core_.BoxSizer_swigregister(BoxSizerPtr)
10021
10022#---------------------------------------------------------------------------
10023
10024class StaticBoxSizer(BoxSizer):
248ed943
RD
10025 """
10026 wx.StaticBoxSizer derives from and functions identically to the
10027 `wx.BoxSizer` and adds a `wx.StaticBox` around the items that the sizer
10028 manages. Note that this static box must be created separately and
10029 passed to the sizer constructor.
10030 """
d55e5bfc
RD
10031 def __repr__(self):
10032 return "<%s.%s; proxy of C++ wxStaticBoxSizer instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
10033 def __init__(self, *args, **kwargs):
248ed943
RD
10034 """
10035 __init__(self, StaticBox box, int orient=HORIZONTAL) -> StaticBoxSizer
10036
10037 Constructor. It takes an associated static box and the orientation
10038 *orient* as parameters - orient can be either of ``wx.VERTICAL`` or
10039 ``wx.HORIZONTAL``.
10040 """
d55e5bfc
RD
10041 newobj = _core_.new_StaticBoxSizer(*args, **kwargs)
10042 self.this = newobj.this
10043 self.thisown = 1
10044 del newobj.thisown
10045 self._setOORInfo(self)
10046
10047 def GetStaticBox(*args, **kwargs):
248ed943
RD
10048 """
10049 GetStaticBox(self) -> StaticBox
d55e5bfc 10050
248ed943
RD
10051 Returns the static box associated with this sizer.
10052 """
10053 return _core_.StaticBoxSizer_GetStaticBox(*args, **kwargs)
d55e5bfc
RD
10054
10055
10056class StaticBoxSizerPtr(StaticBoxSizer):
10057 def __init__(self, this):
10058 self.this = this
10059 if not hasattr(self,"thisown"): self.thisown = 0
10060 self.__class__ = StaticBoxSizer
10061_core_.StaticBoxSizer_swigregister(StaticBoxSizerPtr)
10062
10063#---------------------------------------------------------------------------
10064
10065class GridSizer(Sizer):
248ed943
RD
10066 """
10067 A grid sizer is a sizer which lays out its children in a
10068 two-dimensional table with all cells having the same size. In other
10069 words, the width of each cell within the grid is the width of the
10070 widest item added to the sizer and the height of each grid cell is the
10071 height of the tallest item. An optional vertical and/or horizontal
10072 gap between items can also be specified (in pixels.)
10073
10074 Items are placed in the cells of the grid in the order they are added,
10075 in row-major order. In other words, the first row is filled first,
10076 then the second, and so on until all items have been added. (If
10077 neccessary, additional rows will be added as items are added.) If you
10078 need to have greater control over the cells that items are placed in
10079 then use the `wx.GridBagSizer`.
10080
10081 """
d55e5bfc
RD
10082 def __repr__(self):
10083 return "<%s.%s; proxy of C++ wxGridSizer instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
10084 def __init__(self, *args, **kwargs):
248ed943
RD
10085 """
10086 __init__(self, int rows=1, int cols=0, int vgap=0, int hgap=0) -> GridSizer
10087
10088 Constructor for a wx.GridSizer. *rows* and *cols* determine the number
10089 of columns and rows in the sizer - if either of the parameters is
10090 zero, it will be calculated to from the total number of children in
10091 the sizer, thus making the sizer grow dynamically. *vgap* and *hgap*
10092 define extra space between all children.
10093 """
d55e5bfc
RD
10094 newobj = _core_.new_GridSizer(*args, **kwargs)
10095 self.this = newobj.this
10096 self.thisown = 1
10097 del newobj.thisown
10098 self._setOORInfo(self)
10099
d55e5bfc 10100 def SetCols(*args, **kwargs):
248ed943
RD
10101 """
10102 SetCols(self, int cols)
10103
10104 Sets the number of columns in the sizer.
10105 """
d55e5bfc
RD
10106 return _core_.GridSizer_SetCols(*args, **kwargs)
10107
10108 def SetRows(*args, **kwargs):
248ed943
RD
10109 """
10110 SetRows(self, int rows)
10111
10112 Sets the number of rows in the sizer.
10113 """
d55e5bfc
RD
10114 return _core_.GridSizer_SetRows(*args, **kwargs)
10115
10116 def SetVGap(*args, **kwargs):
248ed943
RD
10117 """
10118 SetVGap(self, int gap)
10119
10120 Sets the vertical gap (in pixels) between the cells in the sizer.
10121 """
d55e5bfc
RD
10122 return _core_.GridSizer_SetVGap(*args, **kwargs)
10123
10124 def SetHGap(*args, **kwargs):
248ed943
RD
10125 """
10126 SetHGap(self, int gap)
10127
10128 Sets the horizontal gap (in pixels) between cells in the sizer
10129 """
d55e5bfc
RD
10130 return _core_.GridSizer_SetHGap(*args, **kwargs)
10131
10132 def GetCols(*args, **kwargs):
248ed943
RD
10133 """
10134 GetCols(self) -> int
10135
10136 Returns the number of columns in the sizer.
10137 """
d55e5bfc
RD
10138 return _core_.GridSizer_GetCols(*args, **kwargs)
10139
10140 def GetRows(*args, **kwargs):
248ed943
RD
10141 """
10142 GetRows(self) -> int
10143
10144 Returns the number of rows in the sizer.
10145 """
d55e5bfc
RD
10146 return _core_.GridSizer_GetRows(*args, **kwargs)
10147
10148 def GetVGap(*args, **kwargs):
248ed943
RD
10149 """
10150 GetVGap(self) -> int
10151
10152 Returns the vertical gap (in pixels) between the cells in the sizer.
10153 """
d55e5bfc
RD
10154 return _core_.GridSizer_GetVGap(*args, **kwargs)
10155
10156 def GetHGap(*args, **kwargs):
248ed943
RD
10157 """
10158 GetHGap(self) -> int
10159
10160 Returns the horizontal gap (in pixels) between cells in the sizer.
10161 """
d55e5bfc
RD
10162 return _core_.GridSizer_GetHGap(*args, **kwargs)
10163
10164
10165class GridSizerPtr(GridSizer):
10166 def __init__(self, this):
10167 self.this = this
10168 if not hasattr(self,"thisown"): self.thisown = 0
10169 self.__class__ = GridSizer
10170_core_.GridSizer_swigregister(GridSizerPtr)
10171
10172#---------------------------------------------------------------------------
10173
10174FLEX_GROWMODE_NONE = _core_.FLEX_GROWMODE_NONE
10175FLEX_GROWMODE_SPECIFIED = _core_.FLEX_GROWMODE_SPECIFIED
10176FLEX_GROWMODE_ALL = _core_.FLEX_GROWMODE_ALL
10177class FlexGridSizer(GridSizer):
248ed943
RD
10178 """
10179 A flex grid sizer is a sizer which lays out its children in a
10180 two-dimensional table with all table cells in one row having the same
10181 height and all cells in one column having the same width, but all
10182 rows or all columns are not necessarily the same height or width as in
10183 the `wx.GridSizer`.
10184
10185 wx.FlexGridSizer can also size items equally in one direction but
10186 unequally ("flexibly") in the other. If the sizer is only flexible
10187 in one direction (this can be changed using `SetFlexibleDirection`), it
10188 needs to be decided how the sizer should grow in the other ("non
10189 flexible") direction in order to fill the available space. The
10190 `SetNonFlexibleGrowMode` method serves this purpose.
10191
10192
10193 """
d55e5bfc
RD
10194 def __repr__(self):
10195 return "<%s.%s; proxy of C++ wxFlexGridSizer instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
10196 def __init__(self, *args, **kwargs):
248ed943
RD
10197 """
10198 __init__(self, int rows=1, int cols=0, int vgap=0, int hgap=0) -> FlexGridSizer
10199
10200 Constructor for a wx.FlexGridSizer. *rows* and *cols* determine the
10201 number of columns and rows in the sizer - if either of the parameters
10202 is zero, it will be calculated to from the total number of children in
10203 the sizer, thus making the sizer grow dynamically. *vgap* and *hgap*
10204 define extra space between all children.
10205 """
d55e5bfc
RD
10206 newobj = _core_.new_FlexGridSizer(*args, **kwargs)
10207 self.this = newobj.this
10208 self.thisown = 1
10209 del newobj.thisown
10210 self._setOORInfo(self)
10211
248ed943
RD
10212 def AddGrowableRow(*args, **kwargs):
10213 """
10214 AddGrowableRow(self, size_t idx, int proportion=0)
d55e5bfc 10215
248ed943
RD
10216 Specifies that row *idx* (starting from zero) should be grown if there
10217 is extra space available to the sizer.
d55e5bfc 10218
248ed943
RD
10219 The *proportion* parameter has the same meaning as the stretch factor
10220 for the box sizers except that if all proportions are 0, then all
10221 columns are resized equally (instead of not being resized at all).
10222 """
d55e5bfc
RD
10223 return _core_.FlexGridSizer_AddGrowableRow(*args, **kwargs)
10224
10225 def RemoveGrowableRow(*args, **kwargs):
248ed943
RD
10226 """
10227 RemoveGrowableRow(self, size_t idx)
10228
10229 Specifies that row *idx* is no longer growable.
10230 """
d55e5bfc
RD
10231 return _core_.FlexGridSizer_RemoveGrowableRow(*args, **kwargs)
10232
10233 def AddGrowableCol(*args, **kwargs):
248ed943
RD
10234 """
10235 AddGrowableCol(self, size_t idx, int proportion=0)
10236
10237 Specifies that column *idx* (starting from zero) should be grown if
10238 there is extra space available to the sizer.
10239
10240 The *proportion* parameter has the same meaning as the stretch factor
10241 for the box sizers except that if all proportions are 0, then all
10242 columns are resized equally (instead of not being resized at all).
10243 """
d55e5bfc
RD
10244 return _core_.FlexGridSizer_AddGrowableCol(*args, **kwargs)
10245
10246 def RemoveGrowableCol(*args, **kwargs):
248ed943
RD
10247 """
10248 RemoveGrowableCol(self, size_t idx)
10249
10250 Specifies that column *idx* is no longer growable.
10251 """
d55e5bfc
RD
10252 return _core_.FlexGridSizer_RemoveGrowableCol(*args, **kwargs)
10253
10254 def SetFlexibleDirection(*args, **kwargs):
248ed943
RD
10255 """
10256 SetFlexibleDirection(self, int direction)
10257
10258 Specifies whether the sizer should flexibly resize its columns, rows,
10259 or both. Argument *direction* can be one of the following values. Any
10260 other value is ignored.
10261
10262 ============== =======================================
10263 wx.VERTICAL Rows are flexibly sized.
10264 wx.HORIZONTAL Columns are flexibly sized.
10265 wx.BOTH Both rows and columns are flexibly sized
10266 (this is the default value).
10267 ============== =======================================
10268
10269 Note that this method does not trigger relayout.
10270
10271 """
d55e5bfc
RD
10272 return _core_.FlexGridSizer_SetFlexibleDirection(*args, **kwargs)
10273
10274 def GetFlexibleDirection(*args, **kwargs):
248ed943
RD
10275 """
10276 GetFlexibleDirection(self) -> int
10277
10278 Returns a value that specifies whether the sizer
10279 flexibly resizes its columns, rows, or both (default).
10280
10281 :see: `SetFlexibleDirection`
10282 """
d55e5bfc
RD
10283 return _core_.FlexGridSizer_GetFlexibleDirection(*args, **kwargs)
10284
10285 def SetNonFlexibleGrowMode(*args, **kwargs):
248ed943
RD
10286 """
10287 SetNonFlexibleGrowMode(self, int mode)
10288
10289 Specifies how the sizer should grow in the non-flexible direction if
10290 there is one (so `SetFlexibleDirection` must have been called
10291 previously). Argument *mode* can be one of the following values:
10292
10293 ========================== =================================================
10294 wx.FLEX_GROWMODE_NONE Sizer doesn't grow in the non flexible direction.
10295 wx.FLEX_GROWMODE_SPECIFIED Sizer honors growable columns/rows set with
10296 `AddGrowableCol` and `AddGrowableRow`. In this
10297 case equal sizing applies to minimum sizes of
10298 columns or rows (this is the default value).
10299 wx.FLEX_GROWMODE_ALL Sizer equally stretches all columns or rows in
10300 the non flexible direction, whether they are
10301 growable or not in the flexbile direction.
10302 ========================== =================================================
10303
10304 Note that this method does not trigger relayout.
10305
10306
10307 """
d55e5bfc
RD
10308 return _core_.FlexGridSizer_SetNonFlexibleGrowMode(*args, **kwargs)
10309
10310 def GetNonFlexibleGrowMode(*args, **kwargs):
248ed943
RD
10311 """
10312 GetNonFlexibleGrowMode(self) -> int
10313
10314 Returns the value that specifies how the sizer grows in the
10315 non-flexible direction if there is one.
10316
10317 :see: `SetNonFlexibleGrowMode`
10318 """
d55e5bfc
RD
10319 return _core_.FlexGridSizer_GetNonFlexibleGrowMode(*args, **kwargs)
10320
10321 def GetRowHeights(*args, **kwargs):
a8eff060
RD
10322 """
10323 GetRowHeights(self) -> list
10324
10325 Returns a list of integers representing the heights of each of the
10326 rows in the sizer.
10327 """
d55e5bfc
RD
10328 return _core_.FlexGridSizer_GetRowHeights(*args, **kwargs)
10329
10330 def GetColWidths(*args, **kwargs):
a8eff060
RD
10331 """
10332 GetColWidths(self) -> list
10333
10334 Returns a list of integers representing the widths of each of the
10335 columns in the sizer.
10336 """
d55e5bfc
RD
10337 return _core_.FlexGridSizer_GetColWidths(*args, **kwargs)
10338
10339
10340class FlexGridSizerPtr(FlexGridSizer):
10341 def __init__(self, this):
10342 self.this = this
10343 if not hasattr(self,"thisown"): self.thisown = 0
10344 self.__class__ = FlexGridSizer
10345_core_.FlexGridSizer_swigregister(FlexGridSizerPtr)
10346
62d32a5f
RD
10347class StdDialogButtonSizer(BoxSizer):
10348 """
10349 A special sizer that knows how to order and position standard buttons
10350 in order to conform to the current platform's standards. You simply
10351 need to add each `wx.Button` to the sizer, and be sure to create the
53aa7709 10352 buttons using the standard ID's. Then call `Realize` and the sizer
62d32a5f
RD
10353 will take care of the rest.
10354
10355 """
10356 def __repr__(self):
10357 return "<%s.%s; proxy of C++ wxStdDialogButtonSizer instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
10358 def __init__(self, *args, **kwargs):
10359 """__init__(self) -> StdDialogButtonSizer"""
10360 newobj = _core_.new_StdDialogButtonSizer(*args, **kwargs)
10361 self.this = newobj.this
10362 self.thisown = 1
10363 del newobj.thisown
10364 def AddButton(*args, **kwargs):
10365 """
10366 AddButton(self, wxButton button)
10367
10368 Use this to add the buttons to this sizer. Do not use the `Add`
10369 method in the base class.
10370 """
10371 return _core_.StdDialogButtonSizer_AddButton(*args, **kwargs)
10372
53aa7709 10373 def Realize(*args, **kwargs):
62d32a5f 10374 """
53aa7709 10375 Realize(self)
62d32a5f
RD
10376
10377 This funciton needs to be called after all the buttons have been added
10378 to the sizer. It will reorder them and position them in a platform
10379 specifc manner.
10380 """
53aa7709 10381 return _core_.StdDialogButtonSizer_Realize(*args, **kwargs)
51b83b37
RD
10382
10383 def SetAffirmativeButton(*args, **kwargs):
10384 """SetAffirmativeButton(self, wxButton button)"""
10385 return _core_.StdDialogButtonSizer_SetAffirmativeButton(*args, **kwargs)
10386
10387 def SetNegativeButton(*args, **kwargs):
10388 """SetNegativeButton(self, wxButton button)"""
10389 return _core_.StdDialogButtonSizer_SetNegativeButton(*args, **kwargs)
10390
10391 def SetCancelButton(*args, **kwargs):
10392 """SetCancelButton(self, wxButton button)"""
10393 return _core_.StdDialogButtonSizer_SetCancelButton(*args, **kwargs)
62d32a5f
RD
10394
10395 def GetAffirmativeButton(*args, **kwargs):
10396 """GetAffirmativeButton(self) -> wxButton"""
10397 return _core_.StdDialogButtonSizer_GetAffirmativeButton(*args, **kwargs)
10398
10399 def GetApplyButton(*args, **kwargs):
10400 """GetApplyButton(self) -> wxButton"""
10401 return _core_.StdDialogButtonSizer_GetApplyButton(*args, **kwargs)
10402
10403 def GetNegativeButton(*args, **kwargs):
10404 """GetNegativeButton(self) -> wxButton"""
10405 return _core_.StdDialogButtonSizer_GetNegativeButton(*args, **kwargs)
10406
10407 def GetCancelButton(*args, **kwargs):
10408 """GetCancelButton(self) -> wxButton"""
10409 return _core_.StdDialogButtonSizer_GetCancelButton(*args, **kwargs)
10410
10411 def GetHelpButton(*args, **kwargs):
10412 """GetHelpButton(self) -> wxButton"""
10413 return _core_.StdDialogButtonSizer_GetHelpButton(*args, **kwargs)
10414
10415
10416class StdDialogButtonSizerPtr(StdDialogButtonSizer):
10417 def __init__(self, this):
10418 self.this = this
10419 if not hasattr(self,"thisown"): self.thisown = 0
10420 self.__class__ = StdDialogButtonSizer
10421_core_.StdDialogButtonSizer_swigregister(StdDialogButtonSizerPtr)
10422
d55e5bfc
RD
10423#---------------------------------------------------------------------------
10424
10425class GBPosition(object):
248ed943
RD
10426 """
10427 This class represents the position of an item in a virtual grid of
10428 rows and columns managed by a `wx.GridBagSizer`. wxPython has
10429 typemaps that will automatically convert from a 2-element sequence of
10430 integers to a wx.GBPosition, so you can use the more pythonic
10431 representation of the position nearly transparently in Python code.
10432 """
d55e5bfc
RD
10433 def __repr__(self):
10434 return "<%s.%s; proxy of C++ wxGBPosition instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
10435 def __init__(self, *args, **kwargs):
248ed943
RD
10436 """
10437 __init__(self, int row=0, int col=0) -> GBPosition
10438
10439 This class represents the position of an item in a virtual grid of
10440 rows and columns managed by a `wx.GridBagSizer`. wxPython has
10441 typemaps that will automatically convert from a 2-element sequence of
10442 integers to a wx.GBPosition, so you can use the more pythonic
10443 representation of the position nearly transparently in Python code.
10444 """
d55e5bfc
RD
10445 newobj = _core_.new_GBPosition(*args, **kwargs)
10446 self.this = newobj.this
10447 self.thisown = 1
10448 del newobj.thisown
10449 def GetRow(*args, **kwargs):
10450 """GetRow(self) -> int"""
10451 return _core_.GBPosition_GetRow(*args, **kwargs)
10452
10453 def GetCol(*args, **kwargs):
10454 """GetCol(self) -> int"""
10455 return _core_.GBPosition_GetCol(*args, **kwargs)
10456
10457 def SetRow(*args, **kwargs):
10458 """SetRow(self, int row)"""
10459 return _core_.GBPosition_SetRow(*args, **kwargs)
10460
10461 def SetCol(*args, **kwargs):
10462 """SetCol(self, int col)"""
10463 return _core_.GBPosition_SetCol(*args, **kwargs)
10464
10465 def __eq__(*args, **kwargs):
10466 """__eq__(self, GBPosition other) -> bool"""
10467 return _core_.GBPosition___eq__(*args, **kwargs)
10468
10469 def __ne__(*args, **kwargs):
10470 """__ne__(self, GBPosition other) -> bool"""
10471 return _core_.GBPosition___ne__(*args, **kwargs)
10472
10473 def Set(*args, **kwargs):
10474 """Set(self, int row=0, int col=0)"""
10475 return _core_.GBPosition_Set(*args, **kwargs)
10476
10477 def Get(*args, **kwargs):
10478 """Get(self) -> PyObject"""
10479 return _core_.GBPosition_Get(*args, **kwargs)
10480
79fccf9d 10481 asTuple = wx._deprecated(Get, "asTuple is deprecated, use `Get` instead")
d55e5bfc
RD
10482 def __str__(self): return str(self.Get())
10483 def __repr__(self): return 'wx.GBPosition'+str(self.Get())
10484 def __len__(self): return len(self.Get())
10485 def __getitem__(self, index): return self.Get()[index]
10486 def __setitem__(self, index, val):
10487 if index == 0: self.SetRow(val)
10488 elif index == 1: self.SetCol(val)
10489 else: raise IndexError
10490 def __nonzero__(self): return self.Get() != (0,0)
10491 __safe_for_unpickling__ = True
10492 def __reduce__(self): return (wx.GBPosition, self.Get())
10493
10494 row = property(GetRow, SetRow)
10495 col = property(GetCol, SetCol)
10496
10497
10498class GBPositionPtr(GBPosition):
10499 def __init__(self, this):
10500 self.this = this
10501 if not hasattr(self,"thisown"): self.thisown = 0
10502 self.__class__ = GBPosition
10503_core_.GBPosition_swigregister(GBPositionPtr)
10504
10505class GBSpan(object):
248ed943
RD
10506 """
10507 This class is used to hold the row and column spanning attributes of
10508 items in a `wx.GridBagSizer`. wxPython has typemaps that will
10509 automatically convert from a 2-element sequence of integers to a
10510 wx.GBSpan, so you can use the more pythonic representation of the span
10511 nearly transparently in Python code.
10512
10513 """
d55e5bfc
RD
10514 def __repr__(self):
10515 return "<%s.%s; proxy of C++ wxGBSpan instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
10516 def __init__(self, *args, **kwargs):
248ed943
RD
10517 """
10518 __init__(self, int rowspan=1, int colspan=1) -> GBSpan
10519
10520 Construct a new wxGBSpan, optionally setting the rowspan and
10521 colspan. The default is (1,1). (Meaning that the item occupies one
10522 cell in each direction.
10523 """
d55e5bfc
RD
10524 newobj = _core_.new_GBSpan(*args, **kwargs)
10525 self.this = newobj.this
10526 self.thisown = 1
10527 del newobj.thisown
10528 def GetRowspan(*args, **kwargs):
10529 """GetRowspan(self) -> int"""
10530 return _core_.GBSpan_GetRowspan(*args, **kwargs)
10531
10532 def GetColspan(*args, **kwargs):
10533 """GetColspan(self) -> int"""
10534 return _core_.GBSpan_GetColspan(*args, **kwargs)
10535
10536 def SetRowspan(*args, **kwargs):
10537 """SetRowspan(self, int rowspan)"""
10538 return _core_.GBSpan_SetRowspan(*args, **kwargs)
10539
10540 def SetColspan(*args, **kwargs):
10541 """SetColspan(self, int colspan)"""
10542 return _core_.GBSpan_SetColspan(*args, **kwargs)
10543
10544 def __eq__(*args, **kwargs):
10545 """__eq__(self, GBSpan other) -> bool"""
10546 return _core_.GBSpan___eq__(*args, **kwargs)
10547
10548 def __ne__(*args, **kwargs):
10549 """__ne__(self, GBSpan other) -> bool"""
10550 return _core_.GBSpan___ne__(*args, **kwargs)
10551
10552 def Set(*args, **kwargs):
10553 """Set(self, int rowspan=1, int colspan=1)"""
10554 return _core_.GBSpan_Set(*args, **kwargs)
10555
10556 def Get(*args, **kwargs):
10557 """Get(self) -> PyObject"""
10558 return _core_.GBSpan_Get(*args, **kwargs)
10559
79fccf9d 10560 asTuple = wx._deprecated(Get, "asTuple is deprecated, use `Get` instead")
d55e5bfc
RD
10561 def __str__(self): return str(self.Get())
10562 def __repr__(self): return 'wx.GBSpan'+str(self.Get())
10563 def __len__(self): return len(self.Get())
10564 def __getitem__(self, index): return self.Get()[index]
10565 def __setitem__(self, index, val):
10566 if index == 0: self.SetRowspan(val)
10567 elif index == 1: self.SetColspan(val)
10568 else: raise IndexError
10569 def __nonzero__(self): return self.Get() != (0,0)
10570 __safe_for_unpickling__ = True
10571 def __reduce__(self): return (wx.GBSpan, self.Get())
10572
10573 rowspan = property(GetRowspan, SetRowspan)
10574 colspan = property(GetColspan, SetColspan)
10575
10576
10577class GBSpanPtr(GBSpan):
10578 def __init__(self, this):
10579 self.this = this
10580 if not hasattr(self,"thisown"): self.thisown = 0
10581 self.__class__ = GBSpan
10582_core_.GBSpan_swigregister(GBSpanPtr)
10583
10584class GBSizerItem(SizerItem):
248ed943
RD
10585 """
10586 The wx.GBSizerItem class is used to track the additional data about
10587 items in a `wx.GridBagSizer` such as the item's position in the grid
10588 and how many rows or columns it spans.
10589
10590 """
d55e5bfc
RD
10591 def __repr__(self):
10592 return "<%s.%s; proxy of C++ wxGBSizerItem instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
10593 def __init__(self, *args, **kwargs):
248ed943
RD
10594 """
10595 __init__(self) -> GBSizerItem
10596
10597 Constructs an empty wx.GBSizerItem. Either a window, sizer or spacer
10598 size will need to be set, as well as a position and span before this
10599 item can be used in a Sizer.
10600
10601 You will probably never need to create a wx.GBSizerItem directly as they
10602 are created automatically when the sizer's Add method is called.
10603 """
d55e5bfc
RD
10604 newobj = _core_.new_GBSizerItem(*args, **kwargs)
10605 self.this = newobj.this
10606 self.thisown = 1
10607 del newobj.thisown
10608 def GetPos(*args, **kwargs):
248ed943
RD
10609 """
10610 GetPos(self) -> GBPosition
10611
10612 Get the grid position of the item
10613 """
d55e5bfc
RD
10614 return _core_.GBSizerItem_GetPos(*args, **kwargs)
10615
10616 def GetPosTuple(self): return self.GetPos().Get()
10617 def GetSpan(*args, **kwargs):
248ed943
RD
10618 """
10619 GetSpan(self) -> GBSpan
10620
10621 Get the row and column spanning of the item
10622 """
d55e5bfc
RD
10623 return _core_.GBSizerItem_GetSpan(*args, **kwargs)
10624
10625 def GetSpanTuple(self): return self.GetSpan().Get()
10626 def SetPos(*args, **kwargs):
248ed943
RD
10627 """
10628 SetPos(self, GBPosition pos) -> bool
10629
10630 If the item is already a member of a sizer then first ensure that
10631 there is no other item that would intersect with this one at the new
10632 position, then set the new position. Returns True if the change is
10633 successful and after the next Layout() the item will be moved.
10634 """
d55e5bfc
RD
10635 return _core_.GBSizerItem_SetPos(*args, **kwargs)
10636
10637 def SetSpan(*args, **kwargs):
248ed943
RD
10638 """
10639 SetSpan(self, GBSpan span) -> bool
10640
10641 If the item is already a member of a sizer then first ensure that
10642 there is no other item that would intersect with this one with its new
10643 spanning size, then set the new spanning. Returns True if the change
10644 is successful and after the next Layout() the item will be resized.
10645
10646 """
d55e5bfc
RD
10647 return _core_.GBSizerItem_SetSpan(*args, **kwargs)
10648
248ed943 10649 def Intersects(*args, **kwargs):
d55e5bfc
RD
10650 """
10651 Intersects(self, GBSizerItem other) -> bool
248ed943
RD
10652
10653 Returns True if this item and the other item instersect.
d55e5bfc 10654 """
248ed943
RD
10655 return _core_.GBSizerItem_Intersects(*args, **kwargs)
10656
10657 def IntersectsPos(*args, **kwargs):
10658 """
10659 IntersectsPos(self, GBPosition pos, GBSpan span) -> bool
10660
10661 Returns True if the given pos/span would intersect with this item.
10662 """
10663 return _core_.GBSizerItem_IntersectsPos(*args, **kwargs)
d55e5bfc
RD
10664
10665 def GetEndPos(*args, **kwargs):
248ed943
RD
10666 """
10667 GetEndPos(self) -> GBPosition
10668
10669 Get the row and column of the endpoint of this item.
10670 """
d55e5bfc
RD
10671 return _core_.GBSizerItem_GetEndPos(*args, **kwargs)
10672
10673 def GetGBSizer(*args, **kwargs):
248ed943
RD
10674 """
10675 GetGBSizer(self) -> GridBagSizer
10676
10677 Get the sizer this item is a member of.
10678 """
d55e5bfc
RD
10679 return _core_.GBSizerItem_GetGBSizer(*args, **kwargs)
10680
10681 def SetGBSizer(*args, **kwargs):
248ed943
RD
10682 """
10683 SetGBSizer(self, GridBagSizer sizer)
10684
10685 Set the sizer this item is a member of.
10686 """
d55e5bfc
RD
10687 return _core_.GBSizerItem_SetGBSizer(*args, **kwargs)
10688
10689
10690class GBSizerItemPtr(GBSizerItem):
10691 def __init__(self, this):
10692 self.this = this
10693 if not hasattr(self,"thisown"): self.thisown = 0
10694 self.__class__ = GBSizerItem
10695_core_.GBSizerItem_swigregister(GBSizerItemPtr)
10696DefaultSpan = cvar.DefaultSpan
10697
10698def GBSizerItemWindow(*args, **kwargs):
10699 """
10700 GBSizerItemWindow(Window window, GBPosition pos, GBSpan span, int flag,
248ed943
RD
10701 int border, PyObject userData=None) -> GBSizerItem
10702
10703 Construct a `wx.GBSizerItem` for a window.
d55e5bfc
RD
10704 """
10705 val = _core_.new_GBSizerItemWindow(*args, **kwargs)
10706 val.thisown = 1
10707 return val
10708
10709def GBSizerItemSizer(*args, **kwargs):
10710 """
10711 GBSizerItemSizer(Sizer sizer, GBPosition pos, GBSpan span, int flag,
248ed943
RD
10712 int border, PyObject userData=None) -> GBSizerItem
10713
10714 Construct a `wx.GBSizerItem` for a sizer
d55e5bfc
RD
10715 """
10716 val = _core_.new_GBSizerItemSizer(*args, **kwargs)
10717 val.thisown = 1
10718 return val
10719
10720def GBSizerItemSpacer(*args, **kwargs):
10721 """
10722 GBSizerItemSpacer(int width, int height, GBPosition pos, GBSpan span,
248ed943
RD
10723 int flag, int border, PyObject userData=None) -> GBSizerItem
10724
10725 Construct a `wx.GBSizerItem` for a spacer.
d55e5bfc
RD
10726 """
10727 val = _core_.new_GBSizerItemSpacer(*args, **kwargs)
10728 val.thisown = 1
10729 return val
10730
10731class GridBagSizer(FlexGridSizer):
248ed943
RD
10732 """
10733 A `wx.Sizer` that can lay out items in a virtual grid like a
10734 `wx.FlexGridSizer` but in this case explicit positioning of the items
10735 is allowed using `wx.GBPosition`, and items can optionally span more
10736 than one row and/or column using `wx.GBSpan`. The total size of the
10737 virtual grid is determined by the largest row and column that items are
10738 positioned at, adjusted for spanning.
10739
10740 """
d55e5bfc
RD
10741 def __repr__(self):
10742 return "<%s.%s; proxy of C++ wxGridBagSizer instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
10743 def __init__(self, *args, **kwargs):
248ed943
RD
10744 """
10745 __init__(self, int vgap=0, int hgap=0) -> GridBagSizer
10746
10747 Constructor, with optional parameters to specify the gap between the
10748 rows and columns.
10749 """
d55e5bfc
RD
10750 newobj = _core_.new_GridBagSizer(*args, **kwargs)
10751 self.this = newobj.this
10752 self.thisown = 1
10753 del newobj.thisown
c9c2cf70
RD
10754 self._setOORInfo(self)
10755
d55e5bfc
RD
10756 def Add(*args, **kwargs):
10757 """
248ed943 10758 Add(self, item, GBPosition pos, GBSpan span=DefaultSpan, int flag=0,
c1cb24a4 10759 int border=0, userData=None) -> wx.GBSizerItem
248ed943
RD
10760
10761 Adds an item to the sizer at the grid cell *pos*, optionally spanning
10762 more than one row or column as specified with *span*. The remaining
10763 args behave similarly to `wx.Sizer.Add`.
10764
10765 Returns True if the item was successfully placed at the given cell
10766 position, False if something was already there.
10767
d55e5bfc
RD
10768 """
10769 return _core_.GridBagSizer_Add(*args, **kwargs)
10770
10771 def AddItem(*args, **kwargs):
248ed943 10772 """
c1cb24a4 10773 Add(self, GBSizerItem item) -> wx.GBSizerItem
248ed943
RD
10774
10775 Add an item to the sizer using a `wx.GBSizerItem`. Returns True if
10776 the item was successfully placed at its given cell position, False if
10777 something was already there.
10778 """
d55e5bfc
RD
10779 return _core_.GridBagSizer_AddItem(*args, **kwargs)
10780
84f85550
RD
10781 def GetCellSize(*args, **kwargs):
10782 """
10783 GetCellSize(self, int row, int col) -> Size
10784
10785 Get the size of the specified cell, including hgap and
10786 vgap. Only valid after a Layout.
10787 """
10788 return _core_.GridBagSizer_GetCellSize(*args, **kwargs)
10789
d55e5bfc 10790 def GetEmptyCellSize(*args, **kwargs):
248ed943
RD
10791 """
10792 GetEmptyCellSize(self) -> Size
10793
10794 Get the size used for cells in the grid with no item.
10795 """
d55e5bfc
RD
10796 return _core_.GridBagSizer_GetEmptyCellSize(*args, **kwargs)
10797
10798 def SetEmptyCellSize(*args, **kwargs):
248ed943
RD
10799 """
10800 SetEmptyCellSize(self, Size sz)
10801
10802 Set the size used for cells in the grid with no item.
10803 """
d55e5bfc
RD
10804 return _core_.GridBagSizer_SetEmptyCellSize(*args, **kwargs)
10805
10806 def GetItemPosition(*args):
10807 """
248ed943
RD
10808 GetItemPosition(self, item) -> GBPosition
10809
10810 Get the grid position of the specified *item* where *item* is either a
10811 window or subsizer that is a member of this sizer, or a zero-based
10812 index of an item.
d55e5bfc
RD
10813 """
10814 return _core_.GridBagSizer_GetItemPosition(*args)
10815
10816 def SetItemPosition(*args):
10817 """
248ed943
RD
10818 SetItemPosition(self, item, GBPosition pos) -> bool
10819
10820 Set the grid position of the specified *item* where *item* is either a
10821 window or subsizer that is a member of this sizer, or a zero-based
10822 index of an item. Returns True on success. If the move is not
10823 allowed (because an item is already there) then False is returned.
10824
d55e5bfc
RD
10825 """
10826 return _core_.GridBagSizer_SetItemPosition(*args)
10827
10828 def GetItemSpan(*args):
10829 """
248ed943
RD
10830 GetItemSpan(self, item) -> GBSpan
10831
10832 Get the row/col spanning of the specified *item* where *item* is
10833 either a window or subsizer that is a member of this sizer, or a
10834 zero-based index of an item.
d55e5bfc
RD
10835 """
10836 return _core_.GridBagSizer_GetItemSpan(*args)
10837
10838 def SetItemSpan(*args):
10839 """
248ed943
RD
10840 SetItemSpan(self, item, GBSpan span) -> bool
10841
10842 Set the row/col spanning of the specified *item* where *item* is
10843 either a window or subsizer that is a member of this sizer, or a
10844 zero-based index of an item. Returns True on success. If the move is
10845 not allowed (because an item is already there) then False is returned.
d55e5bfc
RD
10846 """
10847 return _core_.GridBagSizer_SetItemSpan(*args)
10848
10849 def FindItem(*args):
10850 """
248ed943
RD
10851 FindItem(self, item) -> GBSizerItem
10852
10853 Find the sizer item for the given window or subsizer, returns None if
10854 not found. (non-recursive)
d55e5bfc
RD
10855 """
10856 return _core_.GridBagSizer_FindItem(*args)
10857
10858 def FindItemAtPosition(*args, **kwargs):
248ed943
RD
10859 """
10860 FindItemAtPosition(self, GBPosition pos) -> GBSizerItem
10861
10862 Return the sizer item for the given grid cell, or None if there is no
10863 item at that position. (non-recursive)
10864 """
d55e5bfc
RD
10865 return _core_.GridBagSizer_FindItemAtPosition(*args, **kwargs)
10866
10867 def FindItemAtPoint(*args, **kwargs):
248ed943
RD
10868 """
10869 FindItemAtPoint(self, Point pt) -> GBSizerItem
10870
10871 Return the sizer item located at the point given in *pt*, or None if
10872 there is no item at that point. The (x,y) coordinates in pt correspond
10873 to the client coordinates of the window using the sizer for
10874 layout. (non-recursive)
10875 """
d55e5bfc
RD
10876 return _core_.GridBagSizer_FindItemAtPoint(*args, **kwargs)
10877
248ed943
RD
10878 def CheckForIntersection(*args, **kwargs):
10879 """
10880 CheckForIntersection(self, GBSizerItem item, GBSizerItem excludeItem=None) -> bool
d55e5bfc 10881
248ed943
RD
10882 Look at all items and see if any intersect (or would overlap) the
10883 given *item*. Returns True if so, False if there would be no overlap.
10884 If an *excludeItem* is given then it will not be checked for
10885 intersection, for example it may be the item we are checking the
10886 position of.
d55e5bfc 10887
248ed943
RD
10888 """
10889 return _core_.GridBagSizer_CheckForIntersection(*args, **kwargs)
d55e5bfc 10890
248ed943 10891 def CheckForIntersectionPos(*args, **kwargs):
d55e5bfc 10892 """
248ed943
RD
10893 CheckForIntersectionPos(self, GBPosition pos, GBSpan span, GBSizerItem excludeItem=None) -> bool
10894
10895 Look at all items and see if any intersect (or would overlap) the
10896 given position and span. Returns True if so, False if there would be
10897 no overlap. If an *excludeItem* is given then it will not be checked
10898 for intersection, for example it may be the item we are checking the
10899 position of.
d55e5bfc 10900 """
248ed943 10901 return _core_.GridBagSizer_CheckForIntersectionPos(*args, **kwargs)
d55e5bfc
RD
10902
10903
10904class GridBagSizerPtr(GridBagSizer):
10905 def __init__(self, this):
10906 self.this = this
10907 if not hasattr(self,"thisown"): self.thisown = 0
10908 self.__class__ = GridBagSizer
10909_core_.GridBagSizer_swigregister(GridBagSizerPtr)
10910
10911#---------------------------------------------------------------------------
10912
10913Left = _core_.Left
10914Top = _core_.Top
10915Right = _core_.Right
10916Bottom = _core_.Bottom
10917Width = _core_.Width
10918Height = _core_.Height
10919Centre = _core_.Centre
10920Center = _core_.Center
10921CentreX = _core_.CentreX
10922CentreY = _core_.CentreY
10923Unconstrained = _core_.Unconstrained
10924AsIs = _core_.AsIs
10925PercentOf = _core_.PercentOf
10926Above = _core_.Above
10927Below = _core_.Below
10928LeftOf = _core_.LeftOf
10929RightOf = _core_.RightOf
10930SameAs = _core_.SameAs
10931Absolute = _core_.Absolute
10932class IndividualLayoutConstraint(Object):
10933 """
79fccf9d
RD
10934 Objects of this class are stored in the `wx.LayoutConstraints` class as
10935 one of eight possible constraints that a window can be involved in.
10936 You will never need to create an instance of
10937 wx.IndividualLayoutConstraint, rather you should create a
10938 `wx.LayoutConstraints` instance and use the individual contstraints
d55e5bfc 10939 that it contains.
d55e5bfc
RD
10940 """
10941 def __init__(self): raise RuntimeError, "No constructor defined"
10942 def __repr__(self):
10943 return "<%s.%s; proxy of C++ wxIndividualLayoutConstraint instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
10944 def Set(*args, **kwargs):
79fccf9d
RD
10945 """
10946 Set(self, int rel, Window otherW, int otherE, int val=0, int marg=wxLAYOUT_DEFAULT_MARGIN)
10947
10948 Sets the properties of the constraint. Normally called by one of the
10949 convenience functions such as Above, RightOf, SameAs.
10950 """
d55e5bfc
RD
10951 return _core_.IndividualLayoutConstraint_Set(*args, **kwargs)
10952
10953 def LeftOf(*args, **kwargs):
10954 """
10955 LeftOf(self, Window sibling, int marg=0)
10956
79fccf9d
RD
10957 Constrains this edge to be to the left of the given window, with an
10958 optional margin. Implicitly, this is relative to the left edge of the
10959 other window.
d55e5bfc
RD
10960 """
10961 return _core_.IndividualLayoutConstraint_LeftOf(*args, **kwargs)
10962
10963 def RightOf(*args, **kwargs):
10964 """
10965 RightOf(self, Window sibling, int marg=0)
10966
79fccf9d
RD
10967 Constrains this edge to be to the right of the given window, with an
10968 optional margin. Implicitly, this is relative to the right edge of the
10969 other window.
d55e5bfc
RD
10970 """
10971 return _core_.IndividualLayoutConstraint_RightOf(*args, **kwargs)
10972
10973 def Above(*args, **kwargs):
10974 """
10975 Above(self, Window sibling, int marg=0)
10976
79fccf9d
RD
10977 Constrains this edge to be above the given window, with an optional
10978 margin. Implicitly, this is relative to the top edge of the other
10979 window.
d55e5bfc
RD
10980 """
10981 return _core_.IndividualLayoutConstraint_Above(*args, **kwargs)
10982
10983 def Below(*args, **kwargs):
10984 """
10985 Below(self, Window sibling, int marg=0)
10986
79fccf9d
RD
10987 Constrains this edge to be below the given window, with an optional
10988 margin. Implicitly, this is relative to the bottom edge of the other
10989 window.
d55e5bfc
RD
10990 """
10991 return _core_.IndividualLayoutConstraint_Below(*args, **kwargs)
10992
10993 def SameAs(*args, **kwargs):
10994 """
10995 SameAs(self, Window otherW, int edge, int marg=0)
10996
79fccf9d
RD
10997 Constrains this edge or dimension to be to the same as the edge of the
10998 given window, with an optional margin.
d55e5bfc
RD
10999 """
11000 return _core_.IndividualLayoutConstraint_SameAs(*args, **kwargs)
11001
11002 def PercentOf(*args, **kwargs):
11003 """
11004 PercentOf(self, Window otherW, int wh, int per)
11005
79fccf9d
RD
11006 Constrains this edge or dimension to be to a percentage of the given
11007 window, with an optional margin.
d55e5bfc
RD
11008 """
11009 return _core_.IndividualLayoutConstraint_PercentOf(*args, **kwargs)
11010
11011 def Absolute(*args, **kwargs):
11012 """
11013 Absolute(self, int val)
11014
79fccf9d 11015 Constrains this edge or dimension to be the given absolute value.
d55e5bfc
RD
11016 """
11017 return _core_.IndividualLayoutConstraint_Absolute(*args, **kwargs)
11018
11019 def Unconstrained(*args, **kwargs):
11020 """
11021 Unconstrained(self)
11022
79fccf9d
RD
11023 Sets this edge or dimension to be unconstrained, that is, dependent on
11024 other edges and dimensions from which this value can be deduced.
d55e5bfc
RD
11025 """
11026 return _core_.IndividualLayoutConstraint_Unconstrained(*args, **kwargs)
11027
11028 def AsIs(*args, **kwargs):
11029 """
11030 AsIs(self)
11031
79fccf9d
RD
11032 Sets this edge or constraint to be whatever the window's value is at
11033 the moment. If either of the width and height constraints are *as is*,
11034 the window will not be resized, but moved instead. This is important
11035 when considering panel items which are intended to have a default
11036 size, such as a button, which may take its size from the size of the
11037 button label.
d55e5bfc
RD
11038 """
11039 return _core_.IndividualLayoutConstraint_AsIs(*args, **kwargs)
11040
11041 def GetOtherWindow(*args, **kwargs):
11042 """GetOtherWindow(self) -> Window"""
11043 return _core_.IndividualLayoutConstraint_GetOtherWindow(*args, **kwargs)
11044
11045 def GetMyEdge(*args, **kwargs):
11046 """GetMyEdge(self) -> int"""
11047 return _core_.IndividualLayoutConstraint_GetMyEdge(*args, **kwargs)
11048
11049 def SetEdge(*args, **kwargs):
11050 """SetEdge(self, int which)"""
11051 return _core_.IndividualLayoutConstraint_SetEdge(*args, **kwargs)
11052
11053 def SetValue(*args, **kwargs):
11054 """SetValue(self, int v)"""
11055 return _core_.IndividualLayoutConstraint_SetValue(*args, **kwargs)
11056
11057 def GetMargin(*args, **kwargs):
11058 """GetMargin(self) -> int"""
11059 return _core_.IndividualLayoutConstraint_GetMargin(*args, **kwargs)
11060
11061 def SetMargin(*args, **kwargs):
11062 """SetMargin(self, int m)"""
11063 return _core_.IndividualLayoutConstraint_SetMargin(*args, **kwargs)
11064
11065 def GetValue(*args, **kwargs):
11066 """GetValue(self) -> int"""
11067 return _core_.IndividualLayoutConstraint_GetValue(*args, **kwargs)
11068
11069 def GetPercent(*args, **kwargs):
11070 """GetPercent(self) -> int"""
11071 return _core_.IndividualLayoutConstraint_GetPercent(*args, **kwargs)
11072
11073 def GetOtherEdge(*args, **kwargs):
11074 """GetOtherEdge(self) -> int"""
11075 return _core_.IndividualLayoutConstraint_GetOtherEdge(*args, **kwargs)
11076
11077 def GetDone(*args, **kwargs):
11078 """GetDone(self) -> bool"""
11079 return _core_.IndividualLayoutConstraint_GetDone(*args, **kwargs)
11080
11081 def SetDone(*args, **kwargs):
11082 """SetDone(self, bool d)"""
11083 return _core_.IndividualLayoutConstraint_SetDone(*args, **kwargs)
11084
11085 def GetRelationship(*args, **kwargs):
11086 """GetRelationship(self) -> int"""
11087 return _core_.IndividualLayoutConstraint_GetRelationship(*args, **kwargs)
11088
11089 def SetRelationship(*args, **kwargs):
11090 """SetRelationship(self, int r)"""
11091 return _core_.IndividualLayoutConstraint_SetRelationship(*args, **kwargs)
11092
11093 def ResetIfWin(*args, **kwargs):
11094 """
11095 ResetIfWin(self, Window otherW) -> bool
11096
11097 Reset constraint if it mentions otherWin
11098 """
11099 return _core_.IndividualLayoutConstraint_ResetIfWin(*args, **kwargs)
11100
11101 def SatisfyConstraint(*args, **kwargs):
11102 """
11103 SatisfyConstraint(self, LayoutConstraints constraints, Window win) -> bool
11104
11105 Try to satisfy constraint
11106 """
11107 return _core_.IndividualLayoutConstraint_SatisfyConstraint(*args, **kwargs)
11108
11109 def GetEdge(*args, **kwargs):
11110 """
11111 GetEdge(self, int which, Window thisWin, Window other) -> int
11112
11113 Get the value of this edge or dimension, or if this
11114 is not determinable, -1.
11115 """
11116 return _core_.IndividualLayoutConstraint_GetEdge(*args, **kwargs)
11117
11118
11119class IndividualLayoutConstraintPtr(IndividualLayoutConstraint):
11120 def __init__(self, this):
11121 self.this = this
11122 if not hasattr(self,"thisown"): self.thisown = 0
11123 self.__class__ = IndividualLayoutConstraint
11124_core_.IndividualLayoutConstraint_swigregister(IndividualLayoutConstraintPtr)
11125
11126class LayoutConstraints(Object):
11127 """
79fccf9d
RD
11128 **Note:** constraints are now deprecated and you should use sizers
11129 instead.
d55e5bfc 11130
79fccf9d
RD
11131 Objects of this class can be associated with a window to define its
11132 layout constraints, with respect to siblings or its parent.
d55e5bfc
RD
11133
11134 The class consists of the following eight constraints of class
11135 wx.IndividualLayoutConstraint, some or all of which should be accessed
11136 directly to set the appropriate constraints.
11137
11138 * left: represents the left hand edge of the window
11139 * right: represents the right hand edge of the window
11140 * top: represents the top edge of the window
11141 * bottom: represents the bottom edge of the window
11142 * width: represents the width of the window
11143 * height: represents the height of the window
11144 * centreX: represents the horizontal centre point of the window
11145 * centreY: represents the vertical centre point of the window
11146
79fccf9d
RD
11147 Most constraints are initially set to have the relationship
11148 wxUnconstrained, which means that their values should be calculated by
11149 looking at known constraints. The exceptions are width and height,
11150 which are set to wxAsIs to ensure that if the user does not specify a
11151 constraint, the existing width and height will be used, to be
11152 compatible with panel items which often have take a default size. If
11153 the constraint is ``wx.AsIs``, the dimension will not be changed.
11154
11155 :see: `wx.IndividualLayoutConstraint`, `wx.Window.SetConstraints`
d55e5bfc
RD
11156
11157 """
11158 def __repr__(self):
11159 return "<%s.%s; proxy of C++ wxLayoutConstraints instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
11160 left = property(_core_.LayoutConstraints_left_get)
11161 top = property(_core_.LayoutConstraints_top_get)
11162 right = property(_core_.LayoutConstraints_right_get)
11163 bottom = property(_core_.LayoutConstraints_bottom_get)
11164 width = property(_core_.LayoutConstraints_width_get)
11165 height = property(_core_.LayoutConstraints_height_get)
11166 centreX = property(_core_.LayoutConstraints_centreX_get)
11167 centreY = property(_core_.LayoutConstraints_centreY_get)
11168 def __init__(self, *args, **kwargs):
11169 """__init__(self) -> LayoutConstraints"""
11170 newobj = _core_.new_LayoutConstraints(*args, **kwargs)
11171 self.this = newobj.this
11172 self.thisown = 1
11173 del newobj.thisown
11174 def SatisfyConstraints(*args, **kwargs):
11175 """SatisfyConstraints(Window win) -> (areSatisfied, noChanges)"""
11176 return _core_.LayoutConstraints_SatisfyConstraints(*args, **kwargs)
11177
11178 def AreSatisfied(*args, **kwargs):
11179 """AreSatisfied(self) -> bool"""
11180 return _core_.LayoutConstraints_AreSatisfied(*args, **kwargs)
11181
11182
11183class LayoutConstraintsPtr(LayoutConstraints):
11184 def __init__(self, this):
11185 self.this = this
11186 if not hasattr(self,"thisown"): self.thisown = 0
11187 self.__class__ = LayoutConstraints
11188_core_.LayoutConstraints_swigregister(LayoutConstraintsPtr)
11189
11190#----------------------------------------------------------------------------
11191
11192# Use Python's bool constants if available, make some if not
11193try:
11194 True
11195except NameError:
11196 __builtins__.True = 1==1
11197 __builtins__.False = 1==0
11198 def bool(value): return not not value
11199 __builtins__.bool = bool
11200
11201
11202
11203# workarounds for bad wxRTTI names
11204__wxPyPtrTypeMap['wxGauge95'] = 'wxGauge'
11205__wxPyPtrTypeMap['wxSlider95'] = 'wxSlider'
11206__wxPyPtrTypeMap['wxStatusBar95'] = 'wxStatusBar'
11207
11208
11209#----------------------------------------------------------------------------
11210# Load version numbers from __version__... Ensure that major and minor
0f63ec68 11211# versions are the same for both wxPython and wxWidgets.
d55e5bfc
RD
11212
11213from __version__ import *
11214__version__ = VERSION_STRING
11215
0f63ec68
RD
11216assert MAJOR_VERSION == _core_.MAJOR_VERSION, "wxPython/wxWidgets version mismatch"
11217assert MINOR_VERSION == _core_.MINOR_VERSION, "wxPython/wxWidgets version mismatch"
d55e5bfc
RD
11218if RELEASE_VERSION != _core_.RELEASE_VERSION:
11219 import warnings
0f63ec68 11220 warnings.warn("wxPython/wxWidgets release number mismatch")
d55e5bfc
RD
11221
11222#----------------------------------------------------------------------------
11223
62d32a5f
RD
11224# Set the default string<-->unicode conversion encoding from the
11225# locale. This encoding is used when string or unicode objects need
11226# to be converted in order to pass them to wxWidgets. Please be aware
11227# that the default encoding within the same locale may be slightly
11228# different on different platforms. For example, please see
11229# http://www.alanwood.net/demos/charsetdiffs.html for differences
11230# between the common latin/roman encodings.
5cbf236d
RD
11231import locale
11232default = locale.getdefaultlocale()[1]
11233if default:
11234 wx.SetDefaultPyEncoding(default)
11235del default
11236del locale
11237
11238#----------------------------------------------------------------------------
11239
d55e5bfc
RD
11240class PyDeadObjectError(AttributeError):
11241 pass
11242
11243class _wxPyDeadObject(object):
11244 """
11245 Instances of wx objects that are OOR capable will have their __class__
11246 changed to this class when the C++ object is deleted. This should help
11247 prevent crashes due to referencing a bogus C++ pointer.
11248 """
11249 reprStr = "wxPython wrapper for DELETED %s object! (The C++ object no longer exists.)"
11250 attrStr = "The C++ part of the %s object has been deleted, attribute access no longer allowed."
11251
11252 def __repr__(self):
11253 if not hasattr(self, "_name"):
11254 self._name = "[unknown]"
11255 return self.reprStr % self._name
11256
11257 def __getattr__(self, *args):
11258 if not hasattr(self, "_name"):
11259 self._name = "[unknown]"
11260 raise PyDeadObjectError(self.attrStr % self._name)
11261
11262 def __nonzero__(self):
11263 return 0
11264
11265
11266
11267class PyUnbornObjectError(AttributeError):
11268 pass
11269
11270class _wxPyUnbornObject(object):
11271 """
11272 Some stock objects are created when the wx._core module is
11273 imported, but their C++ instance is not created until the wx.App
11274 object is created and initialized. These object instances will
11275 temporarily have their __class__ changed to this class so an
11276 exception will be raised if they are used before the C++ instance
11277 is ready.
11278 """
11279
11280 reprStr = "wxPython wrapper for UNBORN object! (The C++ object is not initialized yet.)"
11281 attrStr = "The C++ part of this object has not been initialized, attribute access not allowed."
11282
11283 def __repr__(self):
11284 #if not hasattr(self, "_name"):
11285 # self._name = "[unknown]"
11286 return self.reprStr #% self._name
11287
11288 def __getattr__(self, *args):
11289 #if not hasattr(self, "_name"):
11290 # self._name = "[unknown]"
11291 raise PyUnbornObjectError(self.attrStr) # % self._name )
11292
11293 def __nonzero__(self):
11294 return 0
11295
11296
11297#----------------------------------------------------------------------------
d55e5bfc
RD
11298
11299def CallAfter(callable, *args, **kw):
11300 """
11301 Call the specified function after the current and pending event
11302 handlers have been completed. This is also good for making GUI
0439c23b
RD
11303 method calls from non-GUI threads. Any extra positional or
11304 keyword args are passed on to the callable when it is called.
11305
11306 :see: `wx.FutureCall`
d55e5bfc
RD
11307 """
11308 app = wx.GetApp()
a001823c 11309 assert app is not None, 'No wx.App created yet'
d55e5bfc 11310
891bb194
RD
11311 if not hasattr(app, "_CallAfterId"):
11312 app._CallAfterId = wx.NewEventType()
11313 app.Connect(-1, -1, app._CallAfterId,
11314 lambda event: event.callable(*event.args, **event.kw) )
d55e5bfc 11315 evt = wx.PyEvent()
891bb194 11316 evt.SetEventType(app._CallAfterId)
d55e5bfc
RD
11317 evt.callable = callable
11318 evt.args = args
11319 evt.kw = kw
11320 wx.PostEvent(app, evt)
11321
d55e5bfc
RD
11322#----------------------------------------------------------------------------
11323
11324
11325class FutureCall:
11326 """
8ac8dba0 11327 A convenience class for `wx.Timer`, that calls the given callable
d55e5bfc
RD
11328 object once after the given amount of milliseconds, passing any
11329 positional or keyword args. The return value of the callable is
0439c23b 11330 availbale after it has been run with the `GetResult` method.
d55e5bfc
RD
11331
11332 If you don't need to get the return value or restart the timer
11333 then there is no need to hold a reference to this object. It will
11334 hold a reference to itself while the timer is running (the timer
11335 has a reference to self.Notify) but the cycle will be broken when
11336 the timer completes, automatically cleaning up the wx.FutureCall
11337 object.
0439c23b
RD
11338
11339 :see: `wx.CallAfter`
d55e5bfc
RD
11340 """
11341 def __init__(self, millis, callable, *args, **kwargs):
11342 self.millis = millis
11343 self.callable = callable
11344 self.SetArgs(*args, **kwargs)
11345 self.runCount = 0
11346 self.running = False
11347 self.hasRun = False
11348 self.result = None
11349 self.timer = None
11350 self.Start()
11351
11352 def __del__(self):
11353 self.Stop()
11354
11355
11356 def Start(self, millis=None, *args, **kwargs):
11357 """
11358 (Re)start the timer
11359 """
11360 self.hasRun = False
11361 if millis is not None:
11362 self.millis = millis
11363 if args or kwargs:
11364 self.SetArgs(*args, **kwargs)
11365 self.Stop()
11366 self.timer = wx.PyTimer(self.Notify)
11367 self.timer.Start(self.millis, wx.TIMER_ONE_SHOT)
11368 self.running = True
11369 Restart = Start
11370
11371
11372 def Stop(self):
11373 """
11374 Stop and destroy the timer.
11375 """
11376 if self.timer is not None:
11377 self.timer.Stop()
11378 self.timer = None
11379
11380
11381 def GetInterval(self):
11382 if self.timer is not None:
11383 return self.timer.GetInterval()
11384 else:
11385 return 0
11386
11387
11388 def IsRunning(self):
11389 return self.timer is not None and self.timer.IsRunning()
11390
11391
11392 def SetArgs(self, *args, **kwargs):
11393 """
11394 (Re)set the args passed to the callable object. This is
11395 useful in conjunction with Restart if you want to schedule a
11396 new call to the same callable object but with different
11397 parameters.
11398 """
11399 self.args = args
11400 self.kwargs = kwargs
11401
11402
11403 def HasRun(self):
11404 return self.hasRun
11405
11406 def GetResult(self):
11407 return self.result
11408
11409 def Notify(self):
11410 """
11411 The timer has expired so call the callable.
11412 """
11413 if self.callable and getattr(self.callable, 'im_self', True):
11414 self.runCount += 1
11415 self.running = False
11416 self.result = self.callable(*self.args, **self.kwargs)
11417 self.hasRun = True
11418 if not self.running:
11419 # if it wasn't restarted, then cleanup
11420 wx.CallAfter(self.Stop)
11421
11422
11423
11424#----------------------------------------------------------------------------
11425# Control which items in this module should be documented by epydoc.
11426# We allow only classes and functions, which will help reduce the size
11427# of the docs by filtering out the zillions of constants, EVT objects,
11428# and etc that don't make much sense by themselves, but are instead
11429# documented (or will be) as part of the classes/functions/methods
11430# where they should be used.
11431
c24da6d6
RD
11432class __DocFilter:
11433 """
11434 A filter for epydoc that only allows non-Ptr classes and
11435 fucntions, in order to reduce the clutter in the API docs.
11436 """
11437 def __init__(self, globals):
11438 self._globals = globals
11439
11440 def __call__(self, name):
11441 import types
11442 obj = self._globals.get(name, None)
11443 if type(obj) not in [type, types.ClassType, types.FunctionType, types.BuiltinFunctionType]:
11444 return False
11445 if name.startswith('_') or name.endswith('Ptr') or name.startswith('EVT'):
11446 return False
11447 return True
d55e5bfc
RD
11448
11449#----------------------------------------------------------------------------
11450#----------------------------------------------------------------------------
11451
11452# Import other modules in this package that should show up in the
11453# "core" wx namespace
11454from _gdi import *
11455from _windows import *
11456from _controls import *
11457from _misc import *
11458
11459
11460# Fixup the stock objects since they can't be used yet. (They will be
11461# restored in wx.PyApp.OnInit.)
11462_core_._wxPyFixStockObjects()
11463
11464#----------------------------------------------------------------------------
11465#----------------------------------------------------------------------------
11466
11467