]> git.saurik.com Git - wxWidgets.git/blame_incremental - wxPython/src/gtk/_core.py
added a test to check how exception handling works with Win32 SEH; corrected copyright
[wxWidgets.git] / wxPython / src / gtk / _core.py
... / ...
CommitLineData
1# This file was created automatically by SWIG.
2# Don't modify this file, modify the SWIG interface instead.
3
4import _core_
5
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
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
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
76NOT_FOUND = _core_.NOT_FOUND
77VSCROLL = _core_.VSCROLL
78HSCROLL = _core_.HSCROLL
79CAPTION = _core_.CAPTION
80DOUBLE_BORDER = _core_.DOUBLE_BORDER
81SUNKEN_BORDER = _core_.SUNKEN_BORDER
82RAISED_BORDER = _core_.RAISED_BORDER
83BORDER = _core_.BORDER
84SIMPLE_BORDER = _core_.SIMPLE_BORDER
85STATIC_BORDER = _core_.STATIC_BORDER
86TRANSPARENT_WINDOW = _core_.TRANSPARENT_WINDOW
87NO_BORDER = _core_.NO_BORDER
88TAB_TRAVERSAL = _core_.TAB_TRAVERSAL
89WANTS_CHARS = _core_.WANTS_CHARS
90POPUP_WINDOW = _core_.POPUP_WINDOW
91CENTER_FRAME = _core_.CENTER_FRAME
92CENTRE_ON_SCREEN = _core_.CENTRE_ON_SCREEN
93CENTER_ON_SCREEN = _core_.CENTER_ON_SCREEN
94ED_CLIENT_MARGIN = _core_.ED_CLIENT_MARGIN
95ED_BUTTONS_BOTTOM = _core_.ED_BUTTONS_BOTTOM
96ED_BUTTONS_RIGHT = _core_.ED_BUTTONS_RIGHT
97ED_STATIC_LINE = _core_.ED_STATIC_LINE
98EXT_DIALOG_STYLE = _core_.EXT_DIALOG_STYLE
99CLIP_CHILDREN = _core_.CLIP_CHILDREN
100CLIP_SIBLINGS = _core_.CLIP_SIBLINGS
101ALWAYS_SHOW_SB = _core_.ALWAYS_SHOW_SB
102RETAINED = _core_.RETAINED
103BACKINGSTORE = _core_.BACKINGSTORE
104COLOURED = _core_.COLOURED
105FIXED_LENGTH = _core_.FIXED_LENGTH
106LB_NEEDED_SB = _core_.LB_NEEDED_SB
107LB_ALWAYS_SB = _core_.LB_ALWAYS_SB
108LB_SORT = _core_.LB_SORT
109LB_SINGLE = _core_.LB_SINGLE
110LB_MULTIPLE = _core_.LB_MULTIPLE
111LB_EXTENDED = _core_.LB_EXTENDED
112LB_OWNERDRAW = _core_.LB_OWNERDRAW
113LB_HSCROLL = _core_.LB_HSCROLL
114PROCESS_ENTER = _core_.PROCESS_ENTER
115PASSWORD = _core_.PASSWORD
116CB_SIMPLE = _core_.CB_SIMPLE
117CB_DROPDOWN = _core_.CB_DROPDOWN
118CB_SORT = _core_.CB_SORT
119CB_READONLY = _core_.CB_READONLY
120RA_HORIZONTAL = _core_.RA_HORIZONTAL
121RA_VERTICAL = _core_.RA_VERTICAL
122RA_SPECIFY_ROWS = _core_.RA_SPECIFY_ROWS
123RA_SPECIFY_COLS = _core_.RA_SPECIFY_COLS
124RB_GROUP = _core_.RB_GROUP
125RB_SINGLE = _core_.RB_SINGLE
126SL_HORIZONTAL = _core_.SL_HORIZONTAL
127SL_VERTICAL = _core_.SL_VERTICAL
128SL_AUTOTICKS = _core_.SL_AUTOTICKS
129SL_LABELS = _core_.SL_LABELS
130SL_LEFT = _core_.SL_LEFT
131SL_TOP = _core_.SL_TOP
132SL_RIGHT = _core_.SL_RIGHT
133SL_BOTTOM = _core_.SL_BOTTOM
134SL_BOTH = _core_.SL_BOTH
135SL_SELRANGE = _core_.SL_SELRANGE
136SB_HORIZONTAL = _core_.SB_HORIZONTAL
137SB_VERTICAL = _core_.SB_VERTICAL
138ST_SIZEGRIP = _core_.ST_SIZEGRIP
139ST_NO_AUTORESIZE = _core_.ST_NO_AUTORESIZE
140FLOOD_SURFACE = _core_.FLOOD_SURFACE
141FLOOD_BORDER = _core_.FLOOD_BORDER
142ODDEVEN_RULE = _core_.ODDEVEN_RULE
143WINDING_RULE = _core_.WINDING_RULE
144TOOL_TOP = _core_.TOOL_TOP
145TOOL_BOTTOM = _core_.TOOL_BOTTOM
146TOOL_LEFT = _core_.TOOL_LEFT
147TOOL_RIGHT = _core_.TOOL_RIGHT
148OK = _core_.OK
149YES_NO = _core_.YES_NO
150CANCEL = _core_.CANCEL
151YES = _core_.YES
152NO = _core_.NO
153NO_DEFAULT = _core_.NO_DEFAULT
154YES_DEFAULT = _core_.YES_DEFAULT
155ICON_EXCLAMATION = _core_.ICON_EXCLAMATION
156ICON_HAND = _core_.ICON_HAND
157ICON_QUESTION = _core_.ICON_QUESTION
158ICON_INFORMATION = _core_.ICON_INFORMATION
159ICON_STOP = _core_.ICON_STOP
160ICON_ASTERISK = _core_.ICON_ASTERISK
161ICON_MASK = _core_.ICON_MASK
162ICON_WARNING = _core_.ICON_WARNING
163ICON_ERROR = _core_.ICON_ERROR
164FORWARD = _core_.FORWARD
165BACKWARD = _core_.BACKWARD
166RESET = _core_.RESET
167HELP = _core_.HELP
168MORE = _core_.MORE
169SETUP = _core_.SETUP
170SIZE_AUTO_WIDTH = _core_.SIZE_AUTO_WIDTH
171SIZE_AUTO_HEIGHT = _core_.SIZE_AUTO_HEIGHT
172SIZE_AUTO = _core_.SIZE_AUTO
173SIZE_USE_EXISTING = _core_.SIZE_USE_EXISTING
174SIZE_ALLOW_MINUS_ONE = _core_.SIZE_ALLOW_MINUS_ONE
175PORTRAIT = _core_.PORTRAIT
176LANDSCAPE = _core_.LANDSCAPE
177PRINT_QUALITY_HIGH = _core_.PRINT_QUALITY_HIGH
178PRINT_QUALITY_MEDIUM = _core_.PRINT_QUALITY_MEDIUM
179PRINT_QUALITY_LOW = _core_.PRINT_QUALITY_LOW
180PRINT_QUALITY_DRAFT = _core_.PRINT_QUALITY_DRAFT
181ID_ANY = _core_.ID_ANY
182ID_SEPARATOR = _core_.ID_SEPARATOR
183ID_LOWEST = _core_.ID_LOWEST
184ID_OPEN = _core_.ID_OPEN
185ID_CLOSE = _core_.ID_CLOSE
186ID_NEW = _core_.ID_NEW
187ID_SAVE = _core_.ID_SAVE
188ID_SAVEAS = _core_.ID_SAVEAS
189ID_REVERT = _core_.ID_REVERT
190ID_EXIT = _core_.ID_EXIT
191ID_UNDO = _core_.ID_UNDO
192ID_REDO = _core_.ID_REDO
193ID_HELP = _core_.ID_HELP
194ID_PRINT = _core_.ID_PRINT
195ID_PRINT_SETUP = _core_.ID_PRINT_SETUP
196ID_PREVIEW = _core_.ID_PREVIEW
197ID_ABOUT = _core_.ID_ABOUT
198ID_HELP_CONTENTS = _core_.ID_HELP_CONTENTS
199ID_HELP_COMMANDS = _core_.ID_HELP_COMMANDS
200ID_HELP_PROCEDURES = _core_.ID_HELP_PROCEDURES
201ID_HELP_CONTEXT = _core_.ID_HELP_CONTEXT
202ID_CLOSE_ALL = _core_.ID_CLOSE_ALL
203ID_PREFERENCES = _core_.ID_PREFERENCES
204ID_CUT = _core_.ID_CUT
205ID_COPY = _core_.ID_COPY
206ID_PASTE = _core_.ID_PASTE
207ID_CLEAR = _core_.ID_CLEAR
208ID_FIND = _core_.ID_FIND
209ID_DUPLICATE = _core_.ID_DUPLICATE
210ID_SELECTALL = _core_.ID_SELECTALL
211ID_DELETE = _core_.ID_DELETE
212ID_REPLACE = _core_.ID_REPLACE
213ID_REPLACE_ALL = _core_.ID_REPLACE_ALL
214ID_PROPERTIES = _core_.ID_PROPERTIES
215ID_VIEW_DETAILS = _core_.ID_VIEW_DETAILS
216ID_VIEW_LARGEICONS = _core_.ID_VIEW_LARGEICONS
217ID_VIEW_SMALLICONS = _core_.ID_VIEW_SMALLICONS
218ID_VIEW_LIST = _core_.ID_VIEW_LIST
219ID_VIEW_SORTDATE = _core_.ID_VIEW_SORTDATE
220ID_VIEW_SORTNAME = _core_.ID_VIEW_SORTNAME
221ID_VIEW_SORTSIZE = _core_.ID_VIEW_SORTSIZE
222ID_VIEW_SORTTYPE = _core_.ID_VIEW_SORTTYPE
223ID_FILE1 = _core_.ID_FILE1
224ID_FILE2 = _core_.ID_FILE2
225ID_FILE3 = _core_.ID_FILE3
226ID_FILE4 = _core_.ID_FILE4
227ID_FILE5 = _core_.ID_FILE5
228ID_FILE6 = _core_.ID_FILE6
229ID_FILE7 = _core_.ID_FILE7
230ID_FILE8 = _core_.ID_FILE8
231ID_FILE9 = _core_.ID_FILE9
232ID_OK = _core_.ID_OK
233ID_CANCEL = _core_.ID_CANCEL
234ID_APPLY = _core_.ID_APPLY
235ID_YES = _core_.ID_YES
236ID_NO = _core_.ID_NO
237ID_STATIC = _core_.ID_STATIC
238ID_FORWARD = _core_.ID_FORWARD
239ID_BACKWARD = _core_.ID_BACKWARD
240ID_DEFAULT = _core_.ID_DEFAULT
241ID_MORE = _core_.ID_MORE
242ID_SETUP = _core_.ID_SETUP
243ID_RESET = _core_.ID_RESET
244ID_CONTEXT_HELP = _core_.ID_CONTEXT_HELP
245ID_YESTOALL = _core_.ID_YESTOALL
246ID_NOTOALL = _core_.ID_NOTOALL
247ID_ABORT = _core_.ID_ABORT
248ID_RETRY = _core_.ID_RETRY
249ID_IGNORE = _core_.ID_IGNORE
250ID_ADD = _core_.ID_ADD
251ID_REMOVE = _core_.ID_REMOVE
252ID_UP = _core_.ID_UP
253ID_DOWN = _core_.ID_DOWN
254ID_HOME = _core_.ID_HOME
255ID_REFRESH = _core_.ID_REFRESH
256ID_STOP = _core_.ID_STOP
257ID_INDEX = _core_.ID_INDEX
258ID_BOLD = _core_.ID_BOLD
259ID_ITALIC = _core_.ID_ITALIC
260ID_JUSTIFY_CENTER = _core_.ID_JUSTIFY_CENTER
261ID_JUSTIFY_FILL = _core_.ID_JUSTIFY_FILL
262ID_JUSTIFY_RIGHT = _core_.ID_JUSTIFY_RIGHT
263ID_JUSTIFY_LEFT = _core_.ID_JUSTIFY_LEFT
264ID_UNDERLINE = _core_.ID_UNDERLINE
265ID_INDENT = _core_.ID_INDENT
266ID_UNINDENT = _core_.ID_UNINDENT
267ID_ZOOM_100 = _core_.ID_ZOOM_100
268ID_ZOOM_FIT = _core_.ID_ZOOM_FIT
269ID_ZOOM_IN = _core_.ID_ZOOM_IN
270ID_ZOOM_OUT = _core_.ID_ZOOM_OUT
271ID_UNDELETE = _core_.ID_UNDELETE
272ID_REVERT_TO_SAVED = _core_.ID_REVERT_TO_SAVED
273ID_HIGHEST = _core_.ID_HIGHEST
274OPEN = _core_.OPEN
275SAVE = _core_.SAVE
276HIDE_READONLY = _core_.HIDE_READONLY
277OVERWRITE_PROMPT = _core_.OVERWRITE_PROMPT
278FILE_MUST_EXIST = _core_.FILE_MUST_EXIST
279MULTIPLE = _core_.MULTIPLE
280CHANGE_DIR = _core_.CHANGE_DIR
281ACCEL_ALT = _core_.ACCEL_ALT
282ACCEL_CTRL = _core_.ACCEL_CTRL
283ACCEL_SHIFT = _core_.ACCEL_SHIFT
284ACCEL_NORMAL = _core_.ACCEL_NORMAL
285PD_AUTO_HIDE = _core_.PD_AUTO_HIDE
286PD_APP_MODAL = _core_.PD_APP_MODAL
287PD_CAN_ABORT = _core_.PD_CAN_ABORT
288PD_ELAPSED_TIME = _core_.PD_ELAPSED_TIME
289PD_ESTIMATED_TIME = _core_.PD_ESTIMATED_TIME
290PD_REMAINING_TIME = _core_.PD_REMAINING_TIME
291PD_SMOOTH = _core_.PD_SMOOTH
292PD_CAN_SKIP = _core_.PD_CAN_SKIP
293DD_NEW_DIR_BUTTON = _core_.DD_NEW_DIR_BUTTON
294DD_DEFAULT_STYLE = _core_.DD_DEFAULT_STYLE
295MENU_TEAROFF = _core_.MENU_TEAROFF
296MB_DOCKABLE = _core_.MB_DOCKABLE
297NO_FULL_REPAINT_ON_RESIZE = _core_.NO_FULL_REPAINT_ON_RESIZE
298FULL_REPAINT_ON_RESIZE = _core_.FULL_REPAINT_ON_RESIZE
299LI_HORIZONTAL = _core_.LI_HORIZONTAL
300LI_VERTICAL = _core_.LI_VERTICAL
301WS_EX_VALIDATE_RECURSIVELY = _core_.WS_EX_VALIDATE_RECURSIVELY
302WS_EX_BLOCK_EVENTS = _core_.WS_EX_BLOCK_EVENTS
303WS_EX_TRANSIENT = _core_.WS_EX_TRANSIENT
304WS_EX_THEMED_BACKGROUND = _core_.WS_EX_THEMED_BACKGROUND
305WS_EX_PROCESS_IDLE = _core_.WS_EX_PROCESS_IDLE
306WS_EX_PROCESS_UI_UPDATES = _core_.WS_EX_PROCESS_UI_UPDATES
307MM_TEXT = _core_.MM_TEXT
308MM_LOMETRIC = _core_.MM_LOMETRIC
309MM_HIMETRIC = _core_.MM_HIMETRIC
310MM_LOENGLISH = _core_.MM_LOENGLISH
311MM_HIENGLISH = _core_.MM_HIENGLISH
312MM_TWIPS = _core_.MM_TWIPS
313MM_ISOTROPIC = _core_.MM_ISOTROPIC
314MM_ANISOTROPIC = _core_.MM_ANISOTROPIC
315MM_POINTS = _core_.MM_POINTS
316MM_METRIC = _core_.MM_METRIC
317CENTRE = _core_.CENTRE
318CENTER = _core_.CENTER
319HORIZONTAL = _core_.HORIZONTAL
320VERTICAL = _core_.VERTICAL
321BOTH = _core_.BOTH
322LEFT = _core_.LEFT
323RIGHT = _core_.RIGHT
324UP = _core_.UP
325DOWN = _core_.DOWN
326TOP = _core_.TOP
327BOTTOM = _core_.BOTTOM
328NORTH = _core_.NORTH
329SOUTH = _core_.SOUTH
330WEST = _core_.WEST
331EAST = _core_.EAST
332ALL = _core_.ALL
333ALIGN_NOT = _core_.ALIGN_NOT
334ALIGN_CENTER_HORIZONTAL = _core_.ALIGN_CENTER_HORIZONTAL
335ALIGN_CENTRE_HORIZONTAL = _core_.ALIGN_CENTRE_HORIZONTAL
336ALIGN_LEFT = _core_.ALIGN_LEFT
337ALIGN_TOP = _core_.ALIGN_TOP
338ALIGN_RIGHT = _core_.ALIGN_RIGHT
339ALIGN_BOTTOM = _core_.ALIGN_BOTTOM
340ALIGN_CENTER_VERTICAL = _core_.ALIGN_CENTER_VERTICAL
341ALIGN_CENTRE_VERTICAL = _core_.ALIGN_CENTRE_VERTICAL
342ALIGN_CENTER = _core_.ALIGN_CENTER
343ALIGN_CENTRE = _core_.ALIGN_CENTRE
344ALIGN_MASK = _core_.ALIGN_MASK
345STRETCH_NOT = _core_.STRETCH_NOT
346SHRINK = _core_.SHRINK
347GROW = _core_.GROW
348EXPAND = _core_.EXPAND
349SHAPED = _core_.SHAPED
350FIXED_MINSIZE = _core_.FIXED_MINSIZE
351TILE = _core_.TILE
352ADJUST_MINSIZE = _core_.ADJUST_MINSIZE
353BORDER_DEFAULT = _core_.BORDER_DEFAULT
354BORDER_NONE = _core_.BORDER_NONE
355BORDER_STATIC = _core_.BORDER_STATIC
356BORDER_SIMPLE = _core_.BORDER_SIMPLE
357BORDER_RAISED = _core_.BORDER_RAISED
358BORDER_SUNKEN = _core_.BORDER_SUNKEN
359BORDER_DOUBLE = _core_.BORDER_DOUBLE
360BORDER_MASK = _core_.BORDER_MASK
361BG_STYLE_SYSTEM = _core_.BG_STYLE_SYSTEM
362BG_STYLE_COLOUR = _core_.BG_STYLE_COLOUR
363BG_STYLE_CUSTOM = _core_.BG_STYLE_CUSTOM
364DEFAULT = _core_.DEFAULT
365DECORATIVE = _core_.DECORATIVE
366ROMAN = _core_.ROMAN
367SCRIPT = _core_.SCRIPT
368SWISS = _core_.SWISS
369MODERN = _core_.MODERN
370TELETYPE = _core_.TELETYPE
371VARIABLE = _core_.VARIABLE
372FIXED = _core_.FIXED
373NORMAL = _core_.NORMAL
374LIGHT = _core_.LIGHT
375BOLD = _core_.BOLD
376ITALIC = _core_.ITALIC
377SLANT = _core_.SLANT
378SOLID = _core_.SOLID
379DOT = _core_.DOT
380LONG_DASH = _core_.LONG_DASH
381SHORT_DASH = _core_.SHORT_DASH
382DOT_DASH = _core_.DOT_DASH
383USER_DASH = _core_.USER_DASH
384TRANSPARENT = _core_.TRANSPARENT
385STIPPLE = _core_.STIPPLE
386BDIAGONAL_HATCH = _core_.BDIAGONAL_HATCH
387CROSSDIAG_HATCH = _core_.CROSSDIAG_HATCH
388FDIAGONAL_HATCH = _core_.FDIAGONAL_HATCH
389CROSS_HATCH = _core_.CROSS_HATCH
390HORIZONTAL_HATCH = _core_.HORIZONTAL_HATCH
391VERTICAL_HATCH = _core_.VERTICAL_HATCH
392JOIN_BEVEL = _core_.JOIN_BEVEL
393JOIN_MITER = _core_.JOIN_MITER
394JOIN_ROUND = _core_.JOIN_ROUND
395CAP_ROUND = _core_.CAP_ROUND
396CAP_PROJECTING = _core_.CAP_PROJECTING
397CAP_BUTT = _core_.CAP_BUTT
398CLEAR = _core_.CLEAR
399XOR = _core_.XOR
400INVERT = _core_.INVERT
401OR_REVERSE = _core_.OR_REVERSE
402AND_REVERSE = _core_.AND_REVERSE
403COPY = _core_.COPY
404AND = _core_.AND
405AND_INVERT = _core_.AND_INVERT
406NO_OP = _core_.NO_OP
407NOR = _core_.NOR
408EQUIV = _core_.EQUIV
409SRC_INVERT = _core_.SRC_INVERT
410OR_INVERT = _core_.OR_INVERT
411NAND = _core_.NAND
412OR = _core_.OR
413SET = _core_.SET
414WXK_BACK = _core_.WXK_BACK
415WXK_TAB = _core_.WXK_TAB
416WXK_RETURN = _core_.WXK_RETURN
417WXK_ESCAPE = _core_.WXK_ESCAPE
418WXK_SPACE = _core_.WXK_SPACE
419WXK_DELETE = _core_.WXK_DELETE
420WXK_START = _core_.WXK_START
421WXK_LBUTTON = _core_.WXK_LBUTTON
422WXK_RBUTTON = _core_.WXK_RBUTTON
423WXK_CANCEL = _core_.WXK_CANCEL
424WXK_MBUTTON = _core_.WXK_MBUTTON
425WXK_CLEAR = _core_.WXK_CLEAR
426WXK_SHIFT = _core_.WXK_SHIFT
427WXK_ALT = _core_.WXK_ALT
428WXK_CONTROL = _core_.WXK_CONTROL
429WXK_MENU = _core_.WXK_MENU
430WXK_PAUSE = _core_.WXK_PAUSE
431WXK_CAPITAL = _core_.WXK_CAPITAL
432WXK_PRIOR = _core_.WXK_PRIOR
433WXK_NEXT = _core_.WXK_NEXT
434WXK_END = _core_.WXK_END
435WXK_HOME = _core_.WXK_HOME
436WXK_LEFT = _core_.WXK_LEFT
437WXK_UP = _core_.WXK_UP
438WXK_RIGHT = _core_.WXK_RIGHT
439WXK_DOWN = _core_.WXK_DOWN
440WXK_SELECT = _core_.WXK_SELECT
441WXK_PRINT = _core_.WXK_PRINT
442WXK_EXECUTE = _core_.WXK_EXECUTE
443WXK_SNAPSHOT = _core_.WXK_SNAPSHOT
444WXK_INSERT = _core_.WXK_INSERT
445WXK_HELP = _core_.WXK_HELP
446WXK_NUMPAD0 = _core_.WXK_NUMPAD0
447WXK_NUMPAD1 = _core_.WXK_NUMPAD1
448WXK_NUMPAD2 = _core_.WXK_NUMPAD2
449WXK_NUMPAD3 = _core_.WXK_NUMPAD3
450WXK_NUMPAD4 = _core_.WXK_NUMPAD4
451WXK_NUMPAD5 = _core_.WXK_NUMPAD5
452WXK_NUMPAD6 = _core_.WXK_NUMPAD6
453WXK_NUMPAD7 = _core_.WXK_NUMPAD7
454WXK_NUMPAD8 = _core_.WXK_NUMPAD8
455WXK_NUMPAD9 = _core_.WXK_NUMPAD9
456WXK_MULTIPLY = _core_.WXK_MULTIPLY
457WXK_ADD = _core_.WXK_ADD
458WXK_SEPARATOR = _core_.WXK_SEPARATOR
459WXK_SUBTRACT = _core_.WXK_SUBTRACT
460WXK_DECIMAL = _core_.WXK_DECIMAL
461WXK_DIVIDE = _core_.WXK_DIVIDE
462WXK_F1 = _core_.WXK_F1
463WXK_F2 = _core_.WXK_F2
464WXK_F3 = _core_.WXK_F3
465WXK_F4 = _core_.WXK_F4
466WXK_F5 = _core_.WXK_F5
467WXK_F6 = _core_.WXK_F6
468WXK_F7 = _core_.WXK_F7
469WXK_F8 = _core_.WXK_F8
470WXK_F9 = _core_.WXK_F9
471WXK_F10 = _core_.WXK_F10
472WXK_F11 = _core_.WXK_F11
473WXK_F12 = _core_.WXK_F12
474WXK_F13 = _core_.WXK_F13
475WXK_F14 = _core_.WXK_F14
476WXK_F15 = _core_.WXK_F15
477WXK_F16 = _core_.WXK_F16
478WXK_F17 = _core_.WXK_F17
479WXK_F18 = _core_.WXK_F18
480WXK_F19 = _core_.WXK_F19
481WXK_F20 = _core_.WXK_F20
482WXK_F21 = _core_.WXK_F21
483WXK_F22 = _core_.WXK_F22
484WXK_F23 = _core_.WXK_F23
485WXK_F24 = _core_.WXK_F24
486WXK_NUMLOCK = _core_.WXK_NUMLOCK
487WXK_SCROLL = _core_.WXK_SCROLL
488WXK_PAGEUP = _core_.WXK_PAGEUP
489WXK_PAGEDOWN = _core_.WXK_PAGEDOWN
490WXK_NUMPAD_SPACE = _core_.WXK_NUMPAD_SPACE
491WXK_NUMPAD_TAB = _core_.WXK_NUMPAD_TAB
492WXK_NUMPAD_ENTER = _core_.WXK_NUMPAD_ENTER
493WXK_NUMPAD_F1 = _core_.WXK_NUMPAD_F1
494WXK_NUMPAD_F2 = _core_.WXK_NUMPAD_F2
495WXK_NUMPAD_F3 = _core_.WXK_NUMPAD_F3
496WXK_NUMPAD_F4 = _core_.WXK_NUMPAD_F4
497WXK_NUMPAD_HOME = _core_.WXK_NUMPAD_HOME
498WXK_NUMPAD_LEFT = _core_.WXK_NUMPAD_LEFT
499WXK_NUMPAD_UP = _core_.WXK_NUMPAD_UP
500WXK_NUMPAD_RIGHT = _core_.WXK_NUMPAD_RIGHT
501WXK_NUMPAD_DOWN = _core_.WXK_NUMPAD_DOWN
502WXK_NUMPAD_PRIOR = _core_.WXK_NUMPAD_PRIOR
503WXK_NUMPAD_PAGEUP = _core_.WXK_NUMPAD_PAGEUP
504WXK_NUMPAD_NEXT = _core_.WXK_NUMPAD_NEXT
505WXK_NUMPAD_PAGEDOWN = _core_.WXK_NUMPAD_PAGEDOWN
506WXK_NUMPAD_END = _core_.WXK_NUMPAD_END
507WXK_NUMPAD_BEGIN = _core_.WXK_NUMPAD_BEGIN
508WXK_NUMPAD_INSERT = _core_.WXK_NUMPAD_INSERT
509WXK_NUMPAD_DELETE = _core_.WXK_NUMPAD_DELETE
510WXK_NUMPAD_EQUAL = _core_.WXK_NUMPAD_EQUAL
511WXK_NUMPAD_MULTIPLY = _core_.WXK_NUMPAD_MULTIPLY
512WXK_NUMPAD_ADD = _core_.WXK_NUMPAD_ADD
513WXK_NUMPAD_SEPARATOR = _core_.WXK_NUMPAD_SEPARATOR
514WXK_NUMPAD_SUBTRACT = _core_.WXK_NUMPAD_SUBTRACT
515WXK_NUMPAD_DECIMAL = _core_.WXK_NUMPAD_DECIMAL
516WXK_NUMPAD_DIVIDE = _core_.WXK_NUMPAD_DIVIDE
517WXK_WINDOWS_LEFT = _core_.WXK_WINDOWS_LEFT
518WXK_WINDOWS_RIGHT = _core_.WXK_WINDOWS_RIGHT
519WXK_WINDOWS_MENU = _core_.WXK_WINDOWS_MENU
520PAPER_NONE = _core_.PAPER_NONE
521PAPER_LETTER = _core_.PAPER_LETTER
522PAPER_LEGAL = _core_.PAPER_LEGAL
523PAPER_A4 = _core_.PAPER_A4
524PAPER_CSHEET = _core_.PAPER_CSHEET
525PAPER_DSHEET = _core_.PAPER_DSHEET
526PAPER_ESHEET = _core_.PAPER_ESHEET
527PAPER_LETTERSMALL = _core_.PAPER_LETTERSMALL
528PAPER_TABLOID = _core_.PAPER_TABLOID
529PAPER_LEDGER = _core_.PAPER_LEDGER
530PAPER_STATEMENT = _core_.PAPER_STATEMENT
531PAPER_EXECUTIVE = _core_.PAPER_EXECUTIVE
532PAPER_A3 = _core_.PAPER_A3
533PAPER_A4SMALL = _core_.PAPER_A4SMALL
534PAPER_A5 = _core_.PAPER_A5
535PAPER_B4 = _core_.PAPER_B4
536PAPER_B5 = _core_.PAPER_B5
537PAPER_FOLIO = _core_.PAPER_FOLIO
538PAPER_QUARTO = _core_.PAPER_QUARTO
539PAPER_10X14 = _core_.PAPER_10X14
540PAPER_11X17 = _core_.PAPER_11X17
541PAPER_NOTE = _core_.PAPER_NOTE
542PAPER_ENV_9 = _core_.PAPER_ENV_9
543PAPER_ENV_10 = _core_.PAPER_ENV_10
544PAPER_ENV_11 = _core_.PAPER_ENV_11
545PAPER_ENV_12 = _core_.PAPER_ENV_12
546PAPER_ENV_14 = _core_.PAPER_ENV_14
547PAPER_ENV_DL = _core_.PAPER_ENV_DL
548PAPER_ENV_C5 = _core_.PAPER_ENV_C5
549PAPER_ENV_C3 = _core_.PAPER_ENV_C3
550PAPER_ENV_C4 = _core_.PAPER_ENV_C4
551PAPER_ENV_C6 = _core_.PAPER_ENV_C6
552PAPER_ENV_C65 = _core_.PAPER_ENV_C65
553PAPER_ENV_B4 = _core_.PAPER_ENV_B4
554PAPER_ENV_B5 = _core_.PAPER_ENV_B5
555PAPER_ENV_B6 = _core_.PAPER_ENV_B6
556PAPER_ENV_ITALY = _core_.PAPER_ENV_ITALY
557PAPER_ENV_MONARCH = _core_.PAPER_ENV_MONARCH
558PAPER_ENV_PERSONAL = _core_.PAPER_ENV_PERSONAL
559PAPER_FANFOLD_US = _core_.PAPER_FANFOLD_US
560PAPER_FANFOLD_STD_GERMAN = _core_.PAPER_FANFOLD_STD_GERMAN
561PAPER_FANFOLD_LGL_GERMAN = _core_.PAPER_FANFOLD_LGL_GERMAN
562PAPER_ISO_B4 = _core_.PAPER_ISO_B4
563PAPER_JAPANESE_POSTCARD = _core_.PAPER_JAPANESE_POSTCARD
564PAPER_9X11 = _core_.PAPER_9X11
565PAPER_10X11 = _core_.PAPER_10X11
566PAPER_15X11 = _core_.PAPER_15X11
567PAPER_ENV_INVITE = _core_.PAPER_ENV_INVITE
568PAPER_LETTER_EXTRA = _core_.PAPER_LETTER_EXTRA
569PAPER_LEGAL_EXTRA = _core_.PAPER_LEGAL_EXTRA
570PAPER_TABLOID_EXTRA = _core_.PAPER_TABLOID_EXTRA
571PAPER_A4_EXTRA = _core_.PAPER_A4_EXTRA
572PAPER_LETTER_TRANSVERSE = _core_.PAPER_LETTER_TRANSVERSE
573PAPER_A4_TRANSVERSE = _core_.PAPER_A4_TRANSVERSE
574PAPER_LETTER_EXTRA_TRANSVERSE = _core_.PAPER_LETTER_EXTRA_TRANSVERSE
575PAPER_A_PLUS = _core_.PAPER_A_PLUS
576PAPER_B_PLUS = _core_.PAPER_B_PLUS
577PAPER_LETTER_PLUS = _core_.PAPER_LETTER_PLUS
578PAPER_A4_PLUS = _core_.PAPER_A4_PLUS
579PAPER_A5_TRANSVERSE = _core_.PAPER_A5_TRANSVERSE
580PAPER_B5_TRANSVERSE = _core_.PAPER_B5_TRANSVERSE
581PAPER_A3_EXTRA = _core_.PAPER_A3_EXTRA
582PAPER_A5_EXTRA = _core_.PAPER_A5_EXTRA
583PAPER_B5_EXTRA = _core_.PAPER_B5_EXTRA
584PAPER_A2 = _core_.PAPER_A2
585PAPER_A3_TRANSVERSE = _core_.PAPER_A3_TRANSVERSE
586PAPER_A3_EXTRA_TRANSVERSE = _core_.PAPER_A3_EXTRA_TRANSVERSE
587DUPLEX_SIMPLEX = _core_.DUPLEX_SIMPLEX
588DUPLEX_HORIZONTAL = _core_.DUPLEX_HORIZONTAL
589DUPLEX_VERTICAL = _core_.DUPLEX_VERTICAL
590ITEM_SEPARATOR = _core_.ITEM_SEPARATOR
591ITEM_NORMAL = _core_.ITEM_NORMAL
592ITEM_CHECK = _core_.ITEM_CHECK
593ITEM_RADIO = _core_.ITEM_RADIO
594ITEM_MAX = _core_.ITEM_MAX
595HT_NOWHERE = _core_.HT_NOWHERE
596HT_SCROLLBAR_FIRST = _core_.HT_SCROLLBAR_FIRST
597HT_SCROLLBAR_ARROW_LINE_1 = _core_.HT_SCROLLBAR_ARROW_LINE_1
598HT_SCROLLBAR_ARROW_LINE_2 = _core_.HT_SCROLLBAR_ARROW_LINE_2
599HT_SCROLLBAR_ARROW_PAGE_1 = _core_.HT_SCROLLBAR_ARROW_PAGE_1
600HT_SCROLLBAR_ARROW_PAGE_2 = _core_.HT_SCROLLBAR_ARROW_PAGE_2
601HT_SCROLLBAR_THUMB = _core_.HT_SCROLLBAR_THUMB
602HT_SCROLLBAR_BAR_1 = _core_.HT_SCROLLBAR_BAR_1
603HT_SCROLLBAR_BAR_2 = _core_.HT_SCROLLBAR_BAR_2
604HT_SCROLLBAR_LAST = _core_.HT_SCROLLBAR_LAST
605HT_WINDOW_OUTSIDE = _core_.HT_WINDOW_OUTSIDE
606HT_WINDOW_INSIDE = _core_.HT_WINDOW_INSIDE
607HT_WINDOW_VERT_SCROLLBAR = _core_.HT_WINDOW_VERT_SCROLLBAR
608HT_WINDOW_HORZ_SCROLLBAR = _core_.HT_WINDOW_HORZ_SCROLLBAR
609HT_WINDOW_CORNER = _core_.HT_WINDOW_CORNER
610HT_MAX = _core_.HT_MAX
611MOD_NONE = _core_.MOD_NONE
612MOD_ALT = _core_.MOD_ALT
613MOD_CONTROL = _core_.MOD_CONTROL
614MOD_SHIFT = _core_.MOD_SHIFT
615MOD_WIN = _core_.MOD_WIN
616UPDATE_UI_NONE = _core_.UPDATE_UI_NONE
617UPDATE_UI_RECURSE = _core_.UPDATE_UI_RECURSE
618UPDATE_UI_FROMIDLE = _core_.UPDATE_UI_FROMIDLE
619#---------------------------------------------------------------------------
620
621class Object(object):
622 """
623 The base class for most wx objects, although in wxPython not
624 much functionality is needed nor exposed.
625 """
626 def __init__(self): raise RuntimeError, "No constructor defined"
627 def __repr__(self):
628 return "<%s.%s; proxy of C++ wxObject instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
629 def GetClassName(*args, **kwargs):
630 """
631 GetClassName(self) -> String
632
633 Returns the class name of the C++ class using wxRTTI.
634 """
635 return _core_.Object_GetClassName(*args, **kwargs)
636
637 def Destroy(*args, **kwargs):
638 """
639 Destroy(self)
640
641 Deletes the C++ object this Python object is a proxy for.
642 """
643 return _core_.Object_Destroy(*args, **kwargs)
644
645
646class ObjectPtr(Object):
647 def __init__(self, this):
648 self.this = this
649 if not hasattr(self,"thisown"): self.thisown = 0
650 self.__class__ = Object
651_core_.Object_swigregister(ObjectPtr)
652_wxPySetDictionary = _core_._wxPySetDictionary
653
654_wxPyFixStockObjects = _core_._wxPyFixStockObjects
655
656cvar = _core_.cvar
657EmptyString = cvar.EmptyString
658
659#---------------------------------------------------------------------------
660
661BITMAP_TYPE_INVALID = _core_.BITMAP_TYPE_INVALID
662BITMAP_TYPE_BMP = _core_.BITMAP_TYPE_BMP
663BITMAP_TYPE_ICO = _core_.BITMAP_TYPE_ICO
664BITMAP_TYPE_CUR = _core_.BITMAP_TYPE_CUR
665BITMAP_TYPE_XBM = _core_.BITMAP_TYPE_XBM
666BITMAP_TYPE_XBM_DATA = _core_.BITMAP_TYPE_XBM_DATA
667BITMAP_TYPE_XPM = _core_.BITMAP_TYPE_XPM
668BITMAP_TYPE_XPM_DATA = _core_.BITMAP_TYPE_XPM_DATA
669BITMAP_TYPE_TIF = _core_.BITMAP_TYPE_TIF
670BITMAP_TYPE_GIF = _core_.BITMAP_TYPE_GIF
671BITMAP_TYPE_PNG = _core_.BITMAP_TYPE_PNG
672BITMAP_TYPE_JPEG = _core_.BITMAP_TYPE_JPEG
673BITMAP_TYPE_PNM = _core_.BITMAP_TYPE_PNM
674BITMAP_TYPE_PCX = _core_.BITMAP_TYPE_PCX
675BITMAP_TYPE_PICT = _core_.BITMAP_TYPE_PICT
676BITMAP_TYPE_ICON = _core_.BITMAP_TYPE_ICON
677BITMAP_TYPE_ANI = _core_.BITMAP_TYPE_ANI
678BITMAP_TYPE_IFF = _core_.BITMAP_TYPE_IFF
679BITMAP_TYPE_MACCURSOR = _core_.BITMAP_TYPE_MACCURSOR
680BITMAP_TYPE_ANY = _core_.BITMAP_TYPE_ANY
681CURSOR_NONE = _core_.CURSOR_NONE
682CURSOR_ARROW = _core_.CURSOR_ARROW
683CURSOR_RIGHT_ARROW = _core_.CURSOR_RIGHT_ARROW
684CURSOR_BULLSEYE = _core_.CURSOR_BULLSEYE
685CURSOR_CHAR = _core_.CURSOR_CHAR
686CURSOR_CROSS = _core_.CURSOR_CROSS
687CURSOR_HAND = _core_.CURSOR_HAND
688CURSOR_IBEAM = _core_.CURSOR_IBEAM
689CURSOR_LEFT_BUTTON = _core_.CURSOR_LEFT_BUTTON
690CURSOR_MAGNIFIER = _core_.CURSOR_MAGNIFIER
691CURSOR_MIDDLE_BUTTON = _core_.CURSOR_MIDDLE_BUTTON
692CURSOR_NO_ENTRY = _core_.CURSOR_NO_ENTRY
693CURSOR_PAINT_BRUSH = _core_.CURSOR_PAINT_BRUSH
694CURSOR_PENCIL = _core_.CURSOR_PENCIL
695CURSOR_POINT_LEFT = _core_.CURSOR_POINT_LEFT
696CURSOR_POINT_RIGHT = _core_.CURSOR_POINT_RIGHT
697CURSOR_QUESTION_ARROW = _core_.CURSOR_QUESTION_ARROW
698CURSOR_RIGHT_BUTTON = _core_.CURSOR_RIGHT_BUTTON
699CURSOR_SIZENESW = _core_.CURSOR_SIZENESW
700CURSOR_SIZENS = _core_.CURSOR_SIZENS
701CURSOR_SIZENWSE = _core_.CURSOR_SIZENWSE
702CURSOR_SIZEWE = _core_.CURSOR_SIZEWE
703CURSOR_SIZING = _core_.CURSOR_SIZING
704CURSOR_SPRAYCAN = _core_.CURSOR_SPRAYCAN
705CURSOR_WAIT = _core_.CURSOR_WAIT
706CURSOR_WATCH = _core_.CURSOR_WATCH
707CURSOR_BLANK = _core_.CURSOR_BLANK
708CURSOR_DEFAULT = _core_.CURSOR_DEFAULT
709CURSOR_COPY_ARROW = _core_.CURSOR_COPY_ARROW
710CURSOR_ARROWWAIT = _core_.CURSOR_ARROWWAIT
711CURSOR_MAX = _core_.CURSOR_MAX
712#---------------------------------------------------------------------------
713
714class Size(object):
715 """
716 wx.Size is a useful data structure used to represent the size of
717 something. It simply contians integer width and height
718 proprtites. In most places in wxPython where a wx.Size is
719 expected a (width, height) tuple can be used instead.
720 """
721 def __repr__(self):
722 return "<%s.%s; proxy of C++ wxSize instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
723 width = property(_core_.Size_width_get, _core_.Size_width_set)
724 height = property(_core_.Size_height_get, _core_.Size_height_set)
725 x = width; y = height
726 def __init__(self, *args, **kwargs):
727 """
728 __init__(self, int w=0, int h=0) -> Size
729
730 Creates a size object.
731 """
732 newobj = _core_.new_Size(*args, **kwargs)
733 self.this = newobj.this
734 self.thisown = 1
735 del newobj.thisown
736 def __del__(self, destroy=_core_.delete_Size):
737 """__del__(self)"""
738 try:
739 if self.thisown: destroy(self)
740 except: pass
741
742 def __eq__(*args, **kwargs):
743 """
744 __eq__(self, Size sz) -> bool
745
746 Test for equality of wx.Size objects.
747 """
748 return _core_.Size___eq__(*args, **kwargs)
749
750 def __ne__(*args, **kwargs):
751 """
752 __ne__(self, Size sz) -> bool
753
754 Test for inequality.
755 """
756 return _core_.Size___ne__(*args, **kwargs)
757
758 def __add__(*args, **kwargs):
759 """
760 __add__(self, Size sz) -> Size
761
762 Add sz's proprties to this and return the result.
763 """
764 return _core_.Size___add__(*args, **kwargs)
765
766 def __sub__(*args, **kwargs):
767 """
768 __sub__(self, Size sz) -> Size
769
770 Subtract sz's properties from this and return the result.
771 """
772 return _core_.Size___sub__(*args, **kwargs)
773
774 def IncTo(*args, **kwargs):
775 """
776 IncTo(self, Size sz)
777
778 Increments this object so that both of its dimensions are not less
779 than the corresponding dimensions of the size.
780 """
781 return _core_.Size_IncTo(*args, **kwargs)
782
783 def DecTo(*args, **kwargs):
784 """
785 DecTo(self, Size sz)
786
787 Decrements this object so that both of its dimensions are not greater
788 than the corresponding dimensions of the size.
789 """
790 return _core_.Size_DecTo(*args, **kwargs)
791
792 def Set(*args, **kwargs):
793 """
794 Set(self, int w, int h)
795
796 Set both width and height.
797 """
798 return _core_.Size_Set(*args, **kwargs)
799
800 def SetWidth(*args, **kwargs):
801 """SetWidth(self, int w)"""
802 return _core_.Size_SetWidth(*args, **kwargs)
803
804 def SetHeight(*args, **kwargs):
805 """SetHeight(self, int h)"""
806 return _core_.Size_SetHeight(*args, **kwargs)
807
808 def GetWidth(*args, **kwargs):
809 """GetWidth(self) -> int"""
810 return _core_.Size_GetWidth(*args, **kwargs)
811
812 def GetHeight(*args, **kwargs):
813 """GetHeight(self) -> int"""
814 return _core_.Size_GetHeight(*args, **kwargs)
815
816 def IsFullySpecified(*args, **kwargs):
817 """
818 IsFullySpecified(self) -> bool
819
820 Returns True if both components of the size are non-default values.
821 """
822 return _core_.Size_IsFullySpecified(*args, **kwargs)
823
824 def SetDefaults(*args, **kwargs):
825 """
826 SetDefaults(self, Size size)
827
828 Combine this size with the other one replacing the default components
829 of this object (i.e. equal to -1) with those of the other.
830 """
831 return _core_.Size_SetDefaults(*args, **kwargs)
832
833 def Get(*args, **kwargs):
834 """
835 Get() -> (width,height)
836
837 Returns the width and height properties as a tuple.
838 """
839 return _core_.Size_Get(*args, **kwargs)
840
841 asTuple = wx._deprecated(Get, "asTuple is deprecated, use `Get` instead")
842 def __str__(self): return str(self.Get())
843 def __repr__(self): return 'wx.Size'+str(self.Get())
844 def __len__(self): return len(self.Get())
845 def __getitem__(self, index): return self.Get()[index]
846 def __setitem__(self, index, val):
847 if index == 0: self.width = val
848 elif index == 1: self.height = val
849 else: raise IndexError
850 def __nonzero__(self): return self.Get() != (0,0)
851 __safe_for_unpickling__ = True
852 def __reduce__(self): return (wx.Size, self.Get())
853
854
855class SizePtr(Size):
856 def __init__(self, this):
857 self.this = this
858 if not hasattr(self,"thisown"): self.thisown = 0
859 self.__class__ = Size
860_core_.Size_swigregister(SizePtr)
861
862#---------------------------------------------------------------------------
863
864class RealPoint(object):
865 """
866 A data structure for representing a point or position with floating
867 point x and y properties. In wxPython most places that expect a
868 wx.RealPoint can also accept a (x,y) tuple.
869 """
870 def __repr__(self):
871 return "<%s.%s; proxy of C++ wxRealPoint instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
872 x = property(_core_.RealPoint_x_get, _core_.RealPoint_x_set)
873 y = property(_core_.RealPoint_y_get, _core_.RealPoint_y_set)
874 def __init__(self, *args, **kwargs):
875 """
876 __init__(self, double x=0.0, double y=0.0) -> RealPoint
877
878 Create a wx.RealPoint object
879 """
880 newobj = _core_.new_RealPoint(*args, **kwargs)
881 self.this = newobj.this
882 self.thisown = 1
883 del newobj.thisown
884 def __del__(self, destroy=_core_.delete_RealPoint):
885 """__del__(self)"""
886 try:
887 if self.thisown: destroy(self)
888 except: pass
889
890 def __eq__(*args, **kwargs):
891 """
892 __eq__(self, RealPoint pt) -> bool
893
894 Test for equality of wx.RealPoint objects.
895 """
896 return _core_.RealPoint___eq__(*args, **kwargs)
897
898 def __ne__(*args, **kwargs):
899 """
900 __ne__(self, RealPoint pt) -> bool
901
902 Test for inequality of wx.RealPoint objects.
903 """
904 return _core_.RealPoint___ne__(*args, **kwargs)
905
906 def __add__(*args, **kwargs):
907 """
908 __add__(self, RealPoint pt) -> RealPoint
909
910 Add pt's proprties to this and return the result.
911 """
912 return _core_.RealPoint___add__(*args, **kwargs)
913
914 def __sub__(*args, **kwargs):
915 """
916 __sub__(self, RealPoint pt) -> RealPoint
917
918 Subtract pt's proprties from this and return the result
919 """
920 return _core_.RealPoint___sub__(*args, **kwargs)
921
922 def Set(*args, **kwargs):
923 """
924 Set(self, double x, double y)
925
926 Set both the x and y properties
927 """
928 return _core_.RealPoint_Set(*args, **kwargs)
929
930 def Get(*args, **kwargs):
931 """
932 Get() -> (x,y)
933
934 Return the x and y properties as a tuple.
935 """
936 return _core_.RealPoint_Get(*args, **kwargs)
937
938 asTuple = wx._deprecated(Get, "asTuple is deprecated, use `Get` instead")
939 def __str__(self): return str(self.Get())
940 def __repr__(self): return 'wx.RealPoint'+str(self.Get())
941 def __len__(self): return len(self.Get())
942 def __getitem__(self, index): return self.Get()[index]
943 def __setitem__(self, index, val):
944 if index == 0: self.x = val
945 elif index == 1: self.y = val
946 else: raise IndexError
947 def __nonzero__(self): return self.Get() != (0.0, 0.0)
948 __safe_for_unpickling__ = True
949 def __reduce__(self): return (wx.RealPoint, self.Get())
950
951
952class RealPointPtr(RealPoint):
953 def __init__(self, this):
954 self.this = this
955 if not hasattr(self,"thisown"): self.thisown = 0
956 self.__class__ = RealPoint
957_core_.RealPoint_swigregister(RealPointPtr)
958
959#---------------------------------------------------------------------------
960
961class Point(object):
962 """
963 A data structure for representing a point or position with integer x
964 and y properties. Most places in wxPython that expect a wx.Point can
965 also accept a (x,y) tuple.
966 """
967 def __repr__(self):
968 return "<%s.%s; proxy of C++ wxPoint instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
969 x = property(_core_.Point_x_get, _core_.Point_x_set)
970 y = property(_core_.Point_y_get, _core_.Point_y_set)
971 def __init__(self, *args, **kwargs):
972 """
973 __init__(self, int x=0, int y=0) -> Point
974
975 Create a wx.Point object
976 """
977 newobj = _core_.new_Point(*args, **kwargs)
978 self.this = newobj.this
979 self.thisown = 1
980 del newobj.thisown
981 def __del__(self, destroy=_core_.delete_Point):
982 """__del__(self)"""
983 try:
984 if self.thisown: destroy(self)
985 except: pass
986
987 def __eq__(*args, **kwargs):
988 """
989 __eq__(self, Point pt) -> bool
990
991 Test for equality of wx.Point objects.
992 """
993 return _core_.Point___eq__(*args, **kwargs)
994
995 def __ne__(*args, **kwargs):
996 """
997 __ne__(self, Point pt) -> bool
998
999 Test for inequality of wx.Point objects.
1000 """
1001 return _core_.Point___ne__(*args, **kwargs)
1002
1003 def __add__(*args, **kwargs):
1004 """
1005 __add__(self, Point pt) -> Point
1006
1007 Add pt's proprties to this and return the result.
1008 """
1009 return _core_.Point___add__(*args, **kwargs)
1010
1011 def __sub__(*args, **kwargs):
1012 """
1013 __sub__(self, Point pt) -> Point
1014
1015 Subtract pt's proprties from this and return the result
1016 """
1017 return _core_.Point___sub__(*args, **kwargs)
1018
1019 def __iadd__(*args, **kwargs):
1020 """
1021 __iadd__(self, Point pt) -> Point
1022
1023 Add pt to this object.
1024 """
1025 return _core_.Point___iadd__(*args, **kwargs)
1026
1027 def __isub__(*args, **kwargs):
1028 """
1029 __isub__(self, Point pt) -> Point
1030
1031 Subtract pt from this object.
1032 """
1033 return _core_.Point___isub__(*args, **kwargs)
1034
1035 def Set(*args, **kwargs):
1036 """
1037 Set(self, long x, long y)
1038
1039 Set both the x and y properties
1040 """
1041 return _core_.Point_Set(*args, **kwargs)
1042
1043 def Get(*args, **kwargs):
1044 """
1045 Get() -> (x,y)
1046
1047 Return the x and y properties as a tuple.
1048 """
1049 return _core_.Point_Get(*args, **kwargs)
1050
1051 asTuple = wx._deprecated(Get, "asTuple is deprecated, use `Get` instead")
1052 def __str__(self): return str(self.Get())
1053 def __repr__(self): return 'wx.Point'+str(self.Get())
1054 def __len__(self): return len(self.Get())
1055 def __getitem__(self, index): return self.Get()[index]
1056 def __setitem__(self, index, val):
1057 if index == 0: self.x = val
1058 elif index == 1: self.y = val
1059 else: raise IndexError
1060 def __nonzero__(self): return self.Get() != (0,0)
1061 __safe_for_unpickling__ = True
1062 def __reduce__(self): return (wx.Point, self.Get())
1063
1064
1065class PointPtr(Point):
1066 def __init__(self, this):
1067 self.this = this
1068 if not hasattr(self,"thisown"): self.thisown = 0
1069 self.__class__ = Point
1070_core_.Point_swigregister(PointPtr)
1071
1072#---------------------------------------------------------------------------
1073
1074class Rect(object):
1075 """
1076 A class for representing and manipulating rectangles. It has x, y,
1077 width and height properties. In wxPython most palces that expect a
1078 wx.Rect can also accept a (x,y,width,height) tuple.
1079 """
1080 def __repr__(self):
1081 return "<%s.%s; proxy of C++ wxRect instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
1082 def __init__(self, *args, **kwargs):
1083 """
1084 __init__(self, int x=0, int y=0, int width=0, int height=0) -> Rect
1085
1086 Create a new Rect object.
1087 """
1088 newobj = _core_.new_Rect(*args, **kwargs)
1089 self.this = newobj.this
1090 self.thisown = 1
1091 del newobj.thisown
1092 def __del__(self, destroy=_core_.delete_Rect):
1093 """__del__(self)"""
1094 try:
1095 if self.thisown: destroy(self)
1096 except: pass
1097
1098 def GetX(*args, **kwargs):
1099 """GetX(self) -> int"""
1100 return _core_.Rect_GetX(*args, **kwargs)
1101
1102 def SetX(*args, **kwargs):
1103 """SetX(self, int x)"""
1104 return _core_.Rect_SetX(*args, **kwargs)
1105
1106 def GetY(*args, **kwargs):
1107 """GetY(self) -> int"""
1108 return _core_.Rect_GetY(*args, **kwargs)
1109
1110 def SetY(*args, **kwargs):
1111 """SetY(self, int y)"""
1112 return _core_.Rect_SetY(*args, **kwargs)
1113
1114 def GetWidth(*args, **kwargs):
1115 """GetWidth(self) -> int"""
1116 return _core_.Rect_GetWidth(*args, **kwargs)
1117
1118 def SetWidth(*args, **kwargs):
1119 """SetWidth(self, int w)"""
1120 return _core_.Rect_SetWidth(*args, **kwargs)
1121
1122 def GetHeight(*args, **kwargs):
1123 """GetHeight(self) -> int"""
1124 return _core_.Rect_GetHeight(*args, **kwargs)
1125
1126 def SetHeight(*args, **kwargs):
1127 """SetHeight(self, int h)"""
1128 return _core_.Rect_SetHeight(*args, **kwargs)
1129
1130 def GetPosition(*args, **kwargs):
1131 """GetPosition(self) -> Point"""
1132 return _core_.Rect_GetPosition(*args, **kwargs)
1133
1134 def SetPosition(*args, **kwargs):
1135 """SetPosition(self, Point p)"""
1136 return _core_.Rect_SetPosition(*args, **kwargs)
1137
1138 def GetSize(*args, **kwargs):
1139 """GetSize(self) -> Size"""
1140 return _core_.Rect_GetSize(*args, **kwargs)
1141
1142 def SetSize(*args, **kwargs):
1143 """SetSize(self, Size s)"""
1144 return _core_.Rect_SetSize(*args, **kwargs)
1145
1146 def GetTopLeft(*args, **kwargs):
1147 """GetTopLeft(self) -> Point"""
1148 return _core_.Rect_GetTopLeft(*args, **kwargs)
1149
1150 def SetTopLeft(*args, **kwargs):
1151 """SetTopLeft(self, Point p)"""
1152 return _core_.Rect_SetTopLeft(*args, **kwargs)
1153
1154 def GetBottomRight(*args, **kwargs):
1155 """GetBottomRight(self) -> Point"""
1156 return _core_.Rect_GetBottomRight(*args, **kwargs)
1157
1158 def SetBottomRight(*args, **kwargs):
1159 """SetBottomRight(self, Point p)"""
1160 return _core_.Rect_SetBottomRight(*args, **kwargs)
1161
1162 def GetLeft(*args, **kwargs):
1163 """GetLeft(self) -> int"""
1164 return _core_.Rect_GetLeft(*args, **kwargs)
1165
1166 def GetTop(*args, **kwargs):
1167 """GetTop(self) -> int"""
1168 return _core_.Rect_GetTop(*args, **kwargs)
1169
1170 def GetBottom(*args, **kwargs):
1171 """GetBottom(self) -> int"""
1172 return _core_.Rect_GetBottom(*args, **kwargs)
1173
1174 def GetRight(*args, **kwargs):
1175 """GetRight(self) -> int"""
1176 return _core_.Rect_GetRight(*args, **kwargs)
1177
1178 def SetLeft(*args, **kwargs):
1179 """SetLeft(self, int left)"""
1180 return _core_.Rect_SetLeft(*args, **kwargs)
1181
1182 def SetRight(*args, **kwargs):
1183 """SetRight(self, int right)"""
1184 return _core_.Rect_SetRight(*args, **kwargs)
1185
1186 def SetTop(*args, **kwargs):
1187 """SetTop(self, int top)"""
1188 return _core_.Rect_SetTop(*args, **kwargs)
1189
1190 def SetBottom(*args, **kwargs):
1191 """SetBottom(self, int bottom)"""
1192 return _core_.Rect_SetBottom(*args, **kwargs)
1193
1194 position = property(GetPosition, SetPosition)
1195 size = property(GetSize, SetSize)
1196 left = property(GetLeft, SetLeft)
1197 right = property(GetRight, SetRight)
1198 top = property(GetTop, SetTop)
1199 bottom = property(GetBottom, SetBottom)
1200
1201 def Inflate(*args, **kwargs):
1202 """
1203 Inflate(self, int dx, int dy) -> Rect
1204
1205 Increase the rectangle size by dx in x direction and dy in y
1206 direction. Both (or one of) parameters may be negative to decrease the
1207 rectangle size.
1208 """
1209 return _core_.Rect_Inflate(*args, **kwargs)
1210
1211 def Deflate(*args, **kwargs):
1212 """
1213 Deflate(self, int dx, int dy) -> Rect
1214
1215 Decrease the rectangle size by dx in x direction and dy in y
1216 direction. Both (or one of) parameters may be negative to increase the
1217 rectngle size. This method is the opposite of Inflate.
1218 """
1219 return _core_.Rect_Deflate(*args, **kwargs)
1220
1221 def OffsetXY(*args, **kwargs):
1222 """
1223 OffsetXY(self, int dx, int dy)
1224
1225 Moves the rectangle by the specified offset. If dx is positive, the
1226 rectangle is moved to the right, if dy is positive, it is moved to the
1227 bottom, otherwise it is moved to the left or top respectively.
1228 """
1229 return _core_.Rect_OffsetXY(*args, **kwargs)
1230
1231 def Offset(*args, **kwargs):
1232 """
1233 Offset(self, Point pt)
1234
1235 Same as OffsetXY but uses dx,dy from Point
1236 """
1237 return _core_.Rect_Offset(*args, **kwargs)
1238
1239 def Intersect(*args, **kwargs):
1240 """
1241 Intersect(self, Rect rect) -> Rect
1242
1243 Returns the intersectsion of this rectangle and rect.
1244 """
1245 return _core_.Rect_Intersect(*args, **kwargs)
1246
1247 def Union(*args, **kwargs):
1248 """
1249 Union(self, Rect rect) -> Rect
1250
1251 Returns the union of this rectangle and rect.
1252 """
1253 return _core_.Rect_Union(*args, **kwargs)
1254
1255 def __add__(*args, **kwargs):
1256 """
1257 __add__(self, Rect rect) -> Rect
1258
1259 Add the properties of rect to this rectangle and return the result.
1260 """
1261 return _core_.Rect___add__(*args, **kwargs)
1262
1263 def __iadd__(*args, **kwargs):
1264 """
1265 __iadd__(self, Rect rect) -> Rect
1266
1267 Add the properties of rect to this rectangle, updating this rectangle.
1268 """
1269 return _core_.Rect___iadd__(*args, **kwargs)
1270
1271 def __eq__(*args, **kwargs):
1272 """
1273 __eq__(self, Rect rect) -> bool
1274
1275 Test for equality.
1276 """
1277 return _core_.Rect___eq__(*args, **kwargs)
1278
1279 def __ne__(*args, **kwargs):
1280 """
1281 __ne__(self, Rect rect) -> bool
1282
1283 Test for inequality.
1284 """
1285 return _core_.Rect___ne__(*args, **kwargs)
1286
1287 def InsideXY(*args, **kwargs):
1288 """
1289 InsideXY(self, int x, int y) -> bool
1290
1291 Return True if the point is (not strcitly) inside the rect.
1292 """
1293 return _core_.Rect_InsideXY(*args, **kwargs)
1294
1295 def Inside(*args, **kwargs):
1296 """
1297 Inside(self, Point pt) -> bool
1298
1299 Return True if the point is (not strcitly) inside the rect.
1300 """
1301 return _core_.Rect_Inside(*args, **kwargs)
1302
1303 def Intersects(*args, **kwargs):
1304 """
1305 Intersects(self, Rect rect) -> bool
1306
1307 Returns True if the rectangles have a non empty intersection.
1308 """
1309 return _core_.Rect_Intersects(*args, **kwargs)
1310
1311 x = property(_core_.Rect_x_get, _core_.Rect_x_set)
1312 y = property(_core_.Rect_y_get, _core_.Rect_y_set)
1313 width = property(_core_.Rect_width_get, _core_.Rect_width_set)
1314 height = property(_core_.Rect_height_get, _core_.Rect_height_set)
1315 def Set(*args, **kwargs):
1316 """
1317 Set(self, int x=0, int y=0, int width=0, int height=0)
1318
1319 Set all rectangle properties.
1320 """
1321 return _core_.Rect_Set(*args, **kwargs)
1322
1323 def Get(*args, **kwargs):
1324 """
1325 Get() -> (x,y,width,height)
1326
1327 Return the rectangle properties as a tuple.
1328 """
1329 return _core_.Rect_Get(*args, **kwargs)
1330
1331 asTuple = wx._deprecated(Get, "asTuple is deprecated, use `Get` instead")
1332 def __str__(self): return str(self.Get())
1333 def __repr__(self): return 'wx.Rect'+str(self.Get())
1334 def __len__(self): return len(self.Get())
1335 def __getitem__(self, index): return self.Get()[index]
1336 def __setitem__(self, index, val):
1337 if index == 0: self.x = val
1338 elif index == 1: self.y = val
1339 elif index == 2: self.width = val
1340 elif index == 3: self.height = val
1341 else: raise IndexError
1342 def __nonzero__(self): return self.Get() != (0,0,0,0)
1343 __safe_for_unpickling__ = True
1344 def __reduce__(self): return (wx.Rect, self.Get())
1345
1346
1347class RectPtr(Rect):
1348 def __init__(self, this):
1349 self.this = this
1350 if not hasattr(self,"thisown"): self.thisown = 0
1351 self.__class__ = Rect
1352_core_.Rect_swigregister(RectPtr)
1353
1354def RectPP(*args, **kwargs):
1355 """
1356 RectPP(Point topLeft, Point bottomRight) -> Rect
1357
1358 Create a new Rect object from Points representing two corners.
1359 """
1360 val = _core_.new_RectPP(*args, **kwargs)
1361 val.thisown = 1
1362 return val
1363
1364def RectPS(*args, **kwargs):
1365 """
1366 RectPS(Point pos, Size size) -> Rect
1367
1368 Create a new Rect from a position and size.
1369 """
1370 val = _core_.new_RectPS(*args, **kwargs)
1371 val.thisown = 1
1372 return val
1373
1374def RectS(*args, **kwargs):
1375 """
1376 RectS(Size size) -> Rect
1377
1378 Create a new Rect from a size only.
1379 """
1380 val = _core_.new_RectS(*args, **kwargs)
1381 val.thisown = 1
1382 return val
1383
1384
1385def IntersectRect(*args, **kwargs):
1386 """
1387 IntersectRect(Rect r1, Rect r2) -> Rect
1388
1389 Calculate and return the intersection of r1 and r2.
1390 """
1391 return _core_.IntersectRect(*args, **kwargs)
1392#---------------------------------------------------------------------------
1393
1394class Point2D(object):
1395 """
1396 wx.Point2Ds represent a point or a vector in a 2d coordinate system
1397 with floating point values.
1398 """
1399 def __repr__(self):
1400 return "<%s.%s; proxy of C++ wxPoint2D instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
1401 def __init__(self, *args, **kwargs):
1402 """
1403 __init__(self, double x=0.0, double y=0.0) -> Point2D
1404
1405 Create a w.Point2D object.
1406 """
1407 newobj = _core_.new_Point2D(*args, **kwargs)
1408 self.this = newobj.this
1409 self.thisown = 1
1410 del newobj.thisown
1411 def GetFloor(*args, **kwargs):
1412 """
1413 GetFloor() -> (x,y)
1414
1415 Convert to integer
1416 """
1417 return _core_.Point2D_GetFloor(*args, **kwargs)
1418
1419 def GetRounded(*args, **kwargs):
1420 """
1421 GetRounded() -> (x,y)
1422
1423 Convert to integer
1424 """
1425 return _core_.Point2D_GetRounded(*args, **kwargs)
1426
1427 def GetVectorLength(*args, **kwargs):
1428 """GetVectorLength(self) -> double"""
1429 return _core_.Point2D_GetVectorLength(*args, **kwargs)
1430
1431 def GetVectorAngle(*args, **kwargs):
1432 """GetVectorAngle(self) -> double"""
1433 return _core_.Point2D_GetVectorAngle(*args, **kwargs)
1434
1435 def SetVectorLength(*args, **kwargs):
1436 """SetVectorLength(self, double length)"""
1437 return _core_.Point2D_SetVectorLength(*args, **kwargs)
1438
1439 def SetVectorAngle(*args, **kwargs):
1440 """SetVectorAngle(self, double degrees)"""
1441 return _core_.Point2D_SetVectorAngle(*args, **kwargs)
1442
1443 def SetPolarCoordinates(self, angle, length):
1444 self.SetVectorLength(length)
1445 self.SetVectorAngle(angle)
1446 def Normalize(self):
1447 self.SetVectorLength(1.0)
1448
1449 def GetDistance(*args, **kwargs):
1450 """GetDistance(self, Point2D pt) -> double"""
1451 return _core_.Point2D_GetDistance(*args, **kwargs)
1452
1453 def GetDistanceSquare(*args, **kwargs):
1454 """GetDistanceSquare(self, Point2D pt) -> double"""
1455 return _core_.Point2D_GetDistanceSquare(*args, **kwargs)
1456
1457 def GetDotProduct(*args, **kwargs):
1458 """GetDotProduct(self, Point2D vec) -> double"""
1459 return _core_.Point2D_GetDotProduct(*args, **kwargs)
1460
1461 def GetCrossProduct(*args, **kwargs):
1462 """GetCrossProduct(self, Point2D vec) -> double"""
1463 return _core_.Point2D_GetCrossProduct(*args, **kwargs)
1464
1465 def __neg__(*args, **kwargs):
1466 """
1467 __neg__(self) -> Point2D
1468
1469 the reflection of this point
1470 """
1471 return _core_.Point2D___neg__(*args, **kwargs)
1472
1473 def __iadd__(*args, **kwargs):
1474 """__iadd__(self, Point2D pt) -> Point2D"""
1475 return _core_.Point2D___iadd__(*args, **kwargs)
1476
1477 def __isub__(*args, **kwargs):
1478 """__isub__(self, Point2D pt) -> Point2D"""
1479 return _core_.Point2D___isub__(*args, **kwargs)
1480
1481 def __imul__(*args, **kwargs):
1482 """__imul__(self, Point2D pt) -> Point2D"""
1483 return _core_.Point2D___imul__(*args, **kwargs)
1484
1485 def __idiv__(*args, **kwargs):
1486 """__idiv__(self, Point2D pt) -> Point2D"""
1487 return _core_.Point2D___idiv__(*args, **kwargs)
1488
1489 def __eq__(*args, **kwargs):
1490 """
1491 __eq__(self, Point2D pt) -> bool
1492
1493 Test for equality
1494 """
1495 return _core_.Point2D___eq__(*args, **kwargs)
1496
1497 def __ne__(*args, **kwargs):
1498 """
1499 __ne__(self, Point2D pt) -> bool
1500
1501 Test for inequality
1502 """
1503 return _core_.Point2D___ne__(*args, **kwargs)
1504
1505 x = property(_core_.Point2D_x_get, _core_.Point2D_x_set)
1506 y = property(_core_.Point2D_y_get, _core_.Point2D_y_set)
1507 def Set(*args, **kwargs):
1508 """Set(self, double x=0, double y=0)"""
1509 return _core_.Point2D_Set(*args, **kwargs)
1510
1511 def Get(*args, **kwargs):
1512 """
1513 Get() -> (x,y)
1514
1515 Return x and y properties as a tuple.
1516 """
1517 return _core_.Point2D_Get(*args, **kwargs)
1518
1519 asTuple = wx._deprecated(Get, "asTuple is deprecated, use `Get` instead")
1520 def __str__(self): return str(self.Get())
1521 def __repr__(self): return 'wx.Point2D'+str(self.Get())
1522 def __len__(self): return len(self.Get())
1523 def __getitem__(self, index): return self.Get()[index]
1524 def __setitem__(self, index, val):
1525 if index == 0: self.x = val
1526 elif index == 1: self.y = val
1527 else: raise IndexError
1528 def __nonzero__(self): return self.Get() != (0.0, 0.0)
1529 __safe_for_unpickling__ = True
1530 def __reduce__(self): return (wx.Point2D, self.Get())
1531
1532
1533class Point2DPtr(Point2D):
1534 def __init__(self, this):
1535 self.this = this
1536 if not hasattr(self,"thisown"): self.thisown = 0
1537 self.__class__ = Point2D
1538_core_.Point2D_swigregister(Point2DPtr)
1539
1540def Point2DCopy(*args, **kwargs):
1541 """
1542 Point2DCopy(Point2D pt) -> Point2D
1543
1544 Create a w.Point2D object.
1545 """
1546 val = _core_.new_Point2DCopy(*args, **kwargs)
1547 val.thisown = 1
1548 return val
1549
1550def Point2DFromPoint(*args, **kwargs):
1551 """
1552 Point2DFromPoint(Point pt) -> Point2D
1553
1554 Create a w.Point2D object.
1555 """
1556 val = _core_.new_Point2DFromPoint(*args, **kwargs)
1557 val.thisown = 1
1558 return val
1559
1560#---------------------------------------------------------------------------
1561
1562FromStart = _core_.FromStart
1563FromCurrent = _core_.FromCurrent
1564FromEnd = _core_.FromEnd
1565class InputStream(object):
1566 """Proxy of C++ InputStream class"""
1567 def __repr__(self):
1568 return "<%s.%s; proxy of C++ wxPyInputStream instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
1569 def __init__(self, *args, **kwargs):
1570 """__init__(self, PyObject p) -> InputStream"""
1571 newobj = _core_.new_InputStream(*args, **kwargs)
1572 self.this = newobj.this
1573 self.thisown = 1
1574 del newobj.thisown
1575 def __del__(self, destroy=_core_.delete_InputStream):
1576 """__del__(self)"""
1577 try:
1578 if self.thisown: destroy(self)
1579 except: pass
1580
1581 def close(*args, **kwargs):
1582 """close(self)"""
1583 return _core_.InputStream_close(*args, **kwargs)
1584
1585 def flush(*args, **kwargs):
1586 """flush(self)"""
1587 return _core_.InputStream_flush(*args, **kwargs)
1588
1589 def eof(*args, **kwargs):
1590 """eof(self) -> bool"""
1591 return _core_.InputStream_eof(*args, **kwargs)
1592
1593 def read(*args, **kwargs):
1594 """read(self, int size=-1) -> PyObject"""
1595 return _core_.InputStream_read(*args, **kwargs)
1596
1597 def readline(*args, **kwargs):
1598 """readline(self, int size=-1) -> PyObject"""
1599 return _core_.InputStream_readline(*args, **kwargs)
1600
1601 def readlines(*args, **kwargs):
1602 """readlines(self, int sizehint=-1) -> PyObject"""
1603 return _core_.InputStream_readlines(*args, **kwargs)
1604
1605 def seek(*args, **kwargs):
1606 """seek(self, int offset, int whence=0)"""
1607 return _core_.InputStream_seek(*args, **kwargs)
1608
1609 def tell(*args, **kwargs):
1610 """tell(self) -> int"""
1611 return _core_.InputStream_tell(*args, **kwargs)
1612
1613 def Peek(*args, **kwargs):
1614 """Peek(self) -> char"""
1615 return _core_.InputStream_Peek(*args, **kwargs)
1616
1617 def GetC(*args, **kwargs):
1618 """GetC(self) -> char"""
1619 return _core_.InputStream_GetC(*args, **kwargs)
1620
1621 def LastRead(*args, **kwargs):
1622 """LastRead(self) -> size_t"""
1623 return _core_.InputStream_LastRead(*args, **kwargs)
1624
1625 def CanRead(*args, **kwargs):
1626 """CanRead(self) -> bool"""
1627 return _core_.InputStream_CanRead(*args, **kwargs)
1628
1629 def Eof(*args, **kwargs):
1630 """Eof(self) -> bool"""
1631 return _core_.InputStream_Eof(*args, **kwargs)
1632
1633 def Ungetch(*args, **kwargs):
1634 """Ungetch(self, char c) -> bool"""
1635 return _core_.InputStream_Ungetch(*args, **kwargs)
1636
1637 def SeekI(*args, **kwargs):
1638 """SeekI(self, long pos, int mode=FromStart) -> long"""
1639 return _core_.InputStream_SeekI(*args, **kwargs)
1640
1641 def TellI(*args, **kwargs):
1642 """TellI(self) -> long"""
1643 return _core_.InputStream_TellI(*args, **kwargs)
1644
1645
1646class InputStreamPtr(InputStream):
1647 def __init__(self, this):
1648 self.this = this
1649 if not hasattr(self,"thisown"): self.thisown = 0
1650 self.__class__ = InputStream
1651_core_.InputStream_swigregister(InputStreamPtr)
1652DefaultPosition = cvar.DefaultPosition
1653DefaultSize = cvar.DefaultSize
1654
1655class OutputStream(object):
1656 """Proxy of C++ OutputStream class"""
1657 def __init__(self): raise RuntimeError, "No constructor defined"
1658 def __repr__(self):
1659 return "<%s.%s; proxy of C++ wxOutputStream instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
1660 def write(*args, **kwargs):
1661 """write(self, PyObject obj)"""
1662 return _core_.OutputStream_write(*args, **kwargs)
1663
1664
1665class OutputStreamPtr(OutputStream):
1666 def __init__(self, this):
1667 self.this = this
1668 if not hasattr(self,"thisown"): self.thisown = 0
1669 self.__class__ = OutputStream
1670_core_.OutputStream_swigregister(OutputStreamPtr)
1671
1672#---------------------------------------------------------------------------
1673
1674class FSFile(Object):
1675 """Proxy of C++ FSFile class"""
1676 def __repr__(self):
1677 return "<%s.%s; proxy of C++ wxFSFile instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
1678 def __init__(self, *args, **kwargs):
1679 """
1680 __init__(self, InputStream stream, String loc, String mimetype, String anchor,
1681 DateTime modif) -> FSFile
1682 """
1683 newobj = _core_.new_FSFile(*args, **kwargs)
1684 self.this = newobj.this
1685 self.thisown = 1
1686 del newobj.thisown
1687 self.thisown = 0 # It will normally be deleted by the user of the wxFileSystem
1688
1689 def __del__(self, destroy=_core_.delete_FSFile):
1690 """__del__(self)"""
1691 try:
1692 if self.thisown: destroy(self)
1693 except: pass
1694
1695 def GetStream(*args, **kwargs):
1696 """GetStream(self) -> InputStream"""
1697 return _core_.FSFile_GetStream(*args, **kwargs)
1698
1699 def GetMimeType(*args, **kwargs):
1700 """GetMimeType(self) -> String"""
1701 return _core_.FSFile_GetMimeType(*args, **kwargs)
1702
1703 def GetLocation(*args, **kwargs):
1704 """GetLocation(self) -> String"""
1705 return _core_.FSFile_GetLocation(*args, **kwargs)
1706
1707 def GetAnchor(*args, **kwargs):
1708 """GetAnchor(self) -> String"""
1709 return _core_.FSFile_GetAnchor(*args, **kwargs)
1710
1711 def GetModificationTime(*args, **kwargs):
1712 """GetModificationTime(self) -> DateTime"""
1713 return _core_.FSFile_GetModificationTime(*args, **kwargs)
1714
1715
1716class FSFilePtr(FSFile):
1717 def __init__(self, this):
1718 self.this = this
1719 if not hasattr(self,"thisown"): self.thisown = 0
1720 self.__class__ = FSFile
1721_core_.FSFile_swigregister(FSFilePtr)
1722
1723class CPPFileSystemHandler(object):
1724 """Proxy of C++ CPPFileSystemHandler class"""
1725 def __init__(self): raise RuntimeError, "No constructor defined"
1726 def __repr__(self):
1727 return "<%s.%s; proxy of C++ wxFileSystemHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
1728
1729class CPPFileSystemHandlerPtr(CPPFileSystemHandler):
1730 def __init__(self, this):
1731 self.this = this
1732 if not hasattr(self,"thisown"): self.thisown = 0
1733 self.__class__ = CPPFileSystemHandler
1734_core_.CPPFileSystemHandler_swigregister(CPPFileSystemHandlerPtr)
1735
1736class FileSystemHandler(CPPFileSystemHandler):
1737 """Proxy of C++ FileSystemHandler class"""
1738 def __repr__(self):
1739 return "<%s.%s; proxy of C++ wxPyFileSystemHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
1740 def __init__(self, *args, **kwargs):
1741 """__init__(self) -> FileSystemHandler"""
1742 newobj = _core_.new_FileSystemHandler(*args, **kwargs)
1743 self.this = newobj.this
1744 self.thisown = 1
1745 del newobj.thisown
1746 self._setCallbackInfo(self, FileSystemHandler)
1747
1748 def _setCallbackInfo(*args, **kwargs):
1749 """_setCallbackInfo(self, PyObject self, PyObject _class)"""
1750 return _core_.FileSystemHandler__setCallbackInfo(*args, **kwargs)
1751
1752 def CanOpen(*args, **kwargs):
1753 """CanOpen(self, String location) -> bool"""
1754 return _core_.FileSystemHandler_CanOpen(*args, **kwargs)
1755
1756 def OpenFile(*args, **kwargs):
1757 """OpenFile(self, FileSystem fs, String location) -> FSFile"""
1758 return _core_.FileSystemHandler_OpenFile(*args, **kwargs)
1759
1760 def FindFirst(*args, **kwargs):
1761 """FindFirst(self, String spec, int flags=0) -> String"""
1762 return _core_.FileSystemHandler_FindFirst(*args, **kwargs)
1763
1764 def FindNext(*args, **kwargs):
1765 """FindNext(self) -> String"""
1766 return _core_.FileSystemHandler_FindNext(*args, **kwargs)
1767
1768 def GetProtocol(*args, **kwargs):
1769 """GetProtocol(self, String location) -> String"""
1770 return _core_.FileSystemHandler_GetProtocol(*args, **kwargs)
1771
1772 def GetLeftLocation(*args, **kwargs):
1773 """GetLeftLocation(self, String location) -> String"""
1774 return _core_.FileSystemHandler_GetLeftLocation(*args, **kwargs)
1775
1776 def GetAnchor(*args, **kwargs):
1777 """GetAnchor(self, String location) -> String"""
1778 return _core_.FileSystemHandler_GetAnchor(*args, **kwargs)
1779
1780 def GetRightLocation(*args, **kwargs):
1781 """GetRightLocation(self, String location) -> String"""
1782 return _core_.FileSystemHandler_GetRightLocation(*args, **kwargs)
1783
1784 def GetMimeTypeFromExt(*args, **kwargs):
1785 """GetMimeTypeFromExt(self, String location) -> String"""
1786 return _core_.FileSystemHandler_GetMimeTypeFromExt(*args, **kwargs)
1787
1788
1789class FileSystemHandlerPtr(FileSystemHandler):
1790 def __init__(self, this):
1791 self.this = this
1792 if not hasattr(self,"thisown"): self.thisown = 0
1793 self.__class__ = FileSystemHandler
1794_core_.FileSystemHandler_swigregister(FileSystemHandlerPtr)
1795
1796class FileSystem(Object):
1797 """Proxy of C++ FileSystem class"""
1798 def __repr__(self):
1799 return "<%s.%s; proxy of C++ wxFileSystem instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
1800 def __init__(self, *args, **kwargs):
1801 """__init__(self) -> FileSystem"""
1802 newobj = _core_.new_FileSystem(*args, **kwargs)
1803 self.this = newobj.this
1804 self.thisown = 1
1805 del newobj.thisown
1806 def __del__(self, destroy=_core_.delete_FileSystem):
1807 """__del__(self)"""
1808 try:
1809 if self.thisown: destroy(self)
1810 except: pass
1811
1812 def ChangePathTo(*args, **kwargs):
1813 """ChangePathTo(self, String location, bool is_dir=False)"""
1814 return _core_.FileSystem_ChangePathTo(*args, **kwargs)
1815
1816 def GetPath(*args, **kwargs):
1817 """GetPath(self) -> String"""
1818 return _core_.FileSystem_GetPath(*args, **kwargs)
1819
1820 def OpenFile(*args, **kwargs):
1821 """OpenFile(self, String location) -> FSFile"""
1822 return _core_.FileSystem_OpenFile(*args, **kwargs)
1823
1824 def FindFirst(*args, **kwargs):
1825 """FindFirst(self, String spec, int flags=0) -> String"""
1826 return _core_.FileSystem_FindFirst(*args, **kwargs)
1827
1828 def FindNext(*args, **kwargs):
1829 """FindNext(self) -> String"""
1830 return _core_.FileSystem_FindNext(*args, **kwargs)
1831
1832 def AddHandler(*args, **kwargs):
1833 """AddHandler(CPPFileSystemHandler handler)"""
1834 return _core_.FileSystem_AddHandler(*args, **kwargs)
1835
1836 AddHandler = staticmethod(AddHandler)
1837 def CleanUpHandlers(*args, **kwargs):
1838 """CleanUpHandlers()"""
1839 return _core_.FileSystem_CleanUpHandlers(*args, **kwargs)
1840
1841 CleanUpHandlers = staticmethod(CleanUpHandlers)
1842 def FileNameToURL(*args, **kwargs):
1843 """FileNameToURL(String filename) -> String"""
1844 return _core_.FileSystem_FileNameToURL(*args, **kwargs)
1845
1846 FileNameToURL = staticmethod(FileNameToURL)
1847 def URLToFileName(*args, **kwargs):
1848 """URLToFileName(String url) -> String"""
1849 return _core_.FileSystem_URLToFileName(*args, **kwargs)
1850
1851 URLToFileName = staticmethod(URLToFileName)
1852
1853class FileSystemPtr(FileSystem):
1854 def __init__(self, this):
1855 self.this = this
1856 if not hasattr(self,"thisown"): self.thisown = 0
1857 self.__class__ = FileSystem
1858_core_.FileSystem_swigregister(FileSystemPtr)
1859
1860def FileSystem_AddHandler(*args, **kwargs):
1861 """FileSystem_AddHandler(CPPFileSystemHandler handler)"""
1862 return _core_.FileSystem_AddHandler(*args, **kwargs)
1863
1864def FileSystem_CleanUpHandlers(*args, **kwargs):
1865 """FileSystem_CleanUpHandlers()"""
1866 return _core_.FileSystem_CleanUpHandlers(*args, **kwargs)
1867
1868def FileSystem_FileNameToURL(*args, **kwargs):
1869 """FileSystem_FileNameToURL(String filename) -> String"""
1870 return _core_.FileSystem_FileNameToURL(*args, **kwargs)
1871
1872def FileSystem_URLToFileName(*args, **kwargs):
1873 """FileSystem_URLToFileName(String url) -> String"""
1874 return _core_.FileSystem_URLToFileName(*args, **kwargs)
1875
1876class InternetFSHandler(CPPFileSystemHandler):
1877 """Proxy of C++ InternetFSHandler class"""
1878 def __repr__(self):
1879 return "<%s.%s; proxy of C++ wxInternetFSHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
1880 def __init__(self, *args, **kwargs):
1881 """__init__(self) -> InternetFSHandler"""
1882 newobj = _core_.new_InternetFSHandler(*args, **kwargs)
1883 self.this = newobj.this
1884 self.thisown = 1
1885 del newobj.thisown
1886 def CanOpen(*args, **kwargs):
1887 """CanOpen(self, String location) -> bool"""
1888 return _core_.InternetFSHandler_CanOpen(*args, **kwargs)
1889
1890 def OpenFile(*args, **kwargs):
1891 """OpenFile(self, FileSystem fs, String location) -> FSFile"""
1892 return _core_.InternetFSHandler_OpenFile(*args, **kwargs)
1893
1894
1895class InternetFSHandlerPtr(InternetFSHandler):
1896 def __init__(self, this):
1897 self.this = this
1898 if not hasattr(self,"thisown"): self.thisown = 0
1899 self.__class__ = InternetFSHandler
1900_core_.InternetFSHandler_swigregister(InternetFSHandlerPtr)
1901
1902class ZipFSHandler(CPPFileSystemHandler):
1903 """Proxy of C++ ZipFSHandler class"""
1904 def __repr__(self):
1905 return "<%s.%s; proxy of C++ wxZipFSHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
1906 def __init__(self, *args, **kwargs):
1907 """__init__(self) -> ZipFSHandler"""
1908 newobj = _core_.new_ZipFSHandler(*args, **kwargs)
1909 self.this = newobj.this
1910 self.thisown = 1
1911 del newobj.thisown
1912 def CanOpen(*args, **kwargs):
1913 """CanOpen(self, String location) -> bool"""
1914 return _core_.ZipFSHandler_CanOpen(*args, **kwargs)
1915
1916 def OpenFile(*args, **kwargs):
1917 """OpenFile(self, FileSystem fs, String location) -> FSFile"""
1918 return _core_.ZipFSHandler_OpenFile(*args, **kwargs)
1919
1920 def FindFirst(*args, **kwargs):
1921 """FindFirst(self, String spec, int flags=0) -> String"""
1922 return _core_.ZipFSHandler_FindFirst(*args, **kwargs)
1923
1924 def FindNext(*args, **kwargs):
1925 """FindNext(self) -> String"""
1926 return _core_.ZipFSHandler_FindNext(*args, **kwargs)
1927
1928
1929class ZipFSHandlerPtr(ZipFSHandler):
1930 def __init__(self, this):
1931 self.this = this
1932 if not hasattr(self,"thisown"): self.thisown = 0
1933 self.__class__ = ZipFSHandler
1934_core_.ZipFSHandler_swigregister(ZipFSHandlerPtr)
1935
1936
1937def __wxMemoryFSHandler_AddFile_wxImage(*args, **kwargs):
1938 """__wxMemoryFSHandler_AddFile_wxImage(String filename, Image image, long type)"""
1939 return _core_.__wxMemoryFSHandler_AddFile_wxImage(*args, **kwargs)
1940
1941def __wxMemoryFSHandler_AddFile_wxBitmap(*args, **kwargs):
1942 """__wxMemoryFSHandler_AddFile_wxBitmap(String filename, Bitmap bitmap, long type)"""
1943 return _core_.__wxMemoryFSHandler_AddFile_wxBitmap(*args, **kwargs)
1944
1945def __wxMemoryFSHandler_AddFile_Data(*args, **kwargs):
1946 """__wxMemoryFSHandler_AddFile_Data(String filename, PyObject data)"""
1947 return _core_.__wxMemoryFSHandler_AddFile_Data(*args, **kwargs)
1948def MemoryFSHandler_AddFile(filename, dataItem, imgType=-1):
1949 """
1950 Add 'file' to the memory filesystem. The dataItem parameter can
1951 either be a `wx.Bitmap`, `wx.Image` or a string that can contain
1952 arbitrary data. If a bitmap or image is used then the imgType
1953 parameter should specify what kind of image file it should be
1954 written as, wx.BITMAP_TYPE_PNG, etc.
1955 """
1956 if isinstance(dataItem, wx.Image):
1957 __wxMemoryFSHandler_AddFile_wxImage(filename, dataItem, imgType)
1958 elif isinstance(dataItem, wx.Bitmap):
1959 __wxMemoryFSHandler_AddFile_wxBitmap(filename, dataItem, imgType)
1960 elif type(dataItem) == str:
1961 __wxMemoryFSHandler_AddFile_Data(filename, dataItem)
1962 else:
1963 raise TypeError, 'wx.Image, wx.Bitmap or string expected'
1964
1965class MemoryFSHandler(CPPFileSystemHandler):
1966 """Proxy of C++ MemoryFSHandler class"""
1967 def __repr__(self):
1968 return "<%s.%s; proxy of C++ wxMemoryFSHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
1969 def __init__(self, *args, **kwargs):
1970 """__init__(self) -> MemoryFSHandler"""
1971 newobj = _core_.new_MemoryFSHandler(*args, **kwargs)
1972 self.this = newobj.this
1973 self.thisown = 1
1974 del newobj.thisown
1975 def RemoveFile(*args, **kwargs):
1976 """RemoveFile(String filename)"""
1977 return _core_.MemoryFSHandler_RemoveFile(*args, **kwargs)
1978
1979 RemoveFile = staticmethod(RemoveFile)
1980 AddFile = staticmethod(MemoryFSHandler_AddFile)
1981 def CanOpen(*args, **kwargs):
1982 """CanOpen(self, String location) -> bool"""
1983 return _core_.MemoryFSHandler_CanOpen(*args, **kwargs)
1984
1985 def OpenFile(*args, **kwargs):
1986 """OpenFile(self, FileSystem fs, String location) -> FSFile"""
1987 return _core_.MemoryFSHandler_OpenFile(*args, **kwargs)
1988
1989 def FindFirst(*args, **kwargs):
1990 """FindFirst(self, String spec, int flags=0) -> String"""
1991 return _core_.MemoryFSHandler_FindFirst(*args, **kwargs)
1992
1993 def FindNext(*args, **kwargs):
1994 """FindNext(self) -> String"""
1995 return _core_.MemoryFSHandler_FindNext(*args, **kwargs)
1996
1997
1998class MemoryFSHandlerPtr(MemoryFSHandler):
1999 def __init__(self, this):
2000 self.this = this
2001 if not hasattr(self,"thisown"): self.thisown = 0
2002 self.__class__ = MemoryFSHandler
2003_core_.MemoryFSHandler_swigregister(MemoryFSHandlerPtr)
2004
2005def MemoryFSHandler_RemoveFile(*args, **kwargs):
2006 """MemoryFSHandler_RemoveFile(String filename)"""
2007 return _core_.MemoryFSHandler_RemoveFile(*args, **kwargs)
2008
2009#---------------------------------------------------------------------------
2010
2011class ImageHandler(Object):
2012 """Proxy of C++ ImageHandler class"""
2013 def __init__(self): raise RuntimeError, "No constructor defined"
2014 def __repr__(self):
2015 return "<%s.%s; proxy of C++ wxImageHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
2016 def GetName(*args, **kwargs):
2017 """GetName(self) -> String"""
2018 return _core_.ImageHandler_GetName(*args, **kwargs)
2019
2020 def GetExtension(*args, **kwargs):
2021 """GetExtension(self) -> String"""
2022 return _core_.ImageHandler_GetExtension(*args, **kwargs)
2023
2024 def GetType(*args, **kwargs):
2025 """GetType(self) -> long"""
2026 return _core_.ImageHandler_GetType(*args, **kwargs)
2027
2028 def GetMimeType(*args, **kwargs):
2029 """GetMimeType(self) -> String"""
2030 return _core_.ImageHandler_GetMimeType(*args, **kwargs)
2031
2032 def CanRead(*args, **kwargs):
2033 """CanRead(self, String name) -> bool"""
2034 return _core_.ImageHandler_CanRead(*args, **kwargs)
2035
2036 def SetName(*args, **kwargs):
2037 """SetName(self, String name)"""
2038 return _core_.ImageHandler_SetName(*args, **kwargs)
2039
2040 def SetExtension(*args, **kwargs):
2041 """SetExtension(self, String extension)"""
2042 return _core_.ImageHandler_SetExtension(*args, **kwargs)
2043
2044 def SetType(*args, **kwargs):
2045 """SetType(self, long type)"""
2046 return _core_.ImageHandler_SetType(*args, **kwargs)
2047
2048 def SetMimeType(*args, **kwargs):
2049 """SetMimeType(self, String mimetype)"""
2050 return _core_.ImageHandler_SetMimeType(*args, **kwargs)
2051
2052
2053class ImageHandlerPtr(ImageHandler):
2054 def __init__(self, this):
2055 self.this = this
2056 if not hasattr(self,"thisown"): self.thisown = 0
2057 self.__class__ = ImageHandler
2058_core_.ImageHandler_swigregister(ImageHandlerPtr)
2059
2060class ImageHistogram(object):
2061 """Proxy of C++ ImageHistogram class"""
2062 def __repr__(self):
2063 return "<%s.%s; proxy of C++ wxImageHistogram instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
2064 def __init__(self, *args, **kwargs):
2065 """__init__(self) -> ImageHistogram"""
2066 newobj = _core_.new_ImageHistogram(*args, **kwargs)
2067 self.this = newobj.this
2068 self.thisown = 1
2069 del newobj.thisown
2070 def MakeKey(*args, **kwargs):
2071 """
2072 MakeKey(unsigned char r, unsigned char g, unsigned char b) -> unsigned long
2073
2074 Get the key in the histogram for the given RGB values
2075 """
2076 return _core_.ImageHistogram_MakeKey(*args, **kwargs)
2077
2078 MakeKey = staticmethod(MakeKey)
2079 def FindFirstUnusedColour(*args, **kwargs):
2080 """
2081 FindFirstUnusedColour(int startR=1, int startG=0, int startB=0) -> (success, r, g, b)
2082
2083 Find first colour that is not used in the image and has higher RGB
2084 values than startR, startG, startB. Returns a tuple consisting of a
2085 success flag and rgb values.
2086 """
2087 return _core_.ImageHistogram_FindFirstUnusedColour(*args, **kwargs)
2088
2089
2090class ImageHistogramPtr(ImageHistogram):
2091 def __init__(self, this):
2092 self.this = this
2093 if not hasattr(self,"thisown"): self.thisown = 0
2094 self.__class__ = ImageHistogram
2095_core_.ImageHistogram_swigregister(ImageHistogramPtr)
2096
2097def ImageHistogram_MakeKey(*args, **kwargs):
2098 """
2099 ImageHistogram_MakeKey(unsigned char r, unsigned char g, unsigned char b) -> unsigned long
2100
2101 Get the key in the histogram for the given RGB values
2102 """
2103 return _core_.ImageHistogram_MakeKey(*args, **kwargs)
2104
2105class Image(Object):
2106 """Proxy of C++ Image class"""
2107 def __repr__(self):
2108 return "<%s.%s; proxy of C++ wxImage instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
2109 def __init__(self, *args, **kwargs):
2110 """__init__(self, String name, long type=BITMAP_TYPE_ANY, int index=-1) -> Image"""
2111 newobj = _core_.new_Image(*args, **kwargs)
2112 self.this = newobj.this
2113 self.thisown = 1
2114 del newobj.thisown
2115 def __del__(self, destroy=_core_.delete_Image):
2116 """__del__(self)"""
2117 try:
2118 if self.thisown: destroy(self)
2119 except: pass
2120
2121 def Create(*args, **kwargs):
2122 """Create(self, int width, int height)"""
2123 return _core_.Image_Create(*args, **kwargs)
2124
2125 def Destroy(*args, **kwargs):
2126 """
2127 Destroy(self)
2128
2129 Deletes the C++ object this Python object is a proxy for.
2130 """
2131 return _core_.Image_Destroy(*args, **kwargs)
2132
2133 def Scale(*args, **kwargs):
2134 """Scale(self, int width, int height) -> Image"""
2135 return _core_.Image_Scale(*args, **kwargs)
2136
2137 def ShrinkBy(*args, **kwargs):
2138 """ShrinkBy(self, int xFactor, int yFactor) -> Image"""
2139 return _core_.Image_ShrinkBy(*args, **kwargs)
2140
2141 def Rescale(*args, **kwargs):
2142 """Rescale(self, int width, int height) -> Image"""
2143 return _core_.Image_Rescale(*args, **kwargs)
2144
2145 def SetRGB(*args, **kwargs):
2146 """SetRGB(self, int x, int y, unsigned char r, unsigned char g, unsigned char b)"""
2147 return _core_.Image_SetRGB(*args, **kwargs)
2148
2149 def GetRed(*args, **kwargs):
2150 """GetRed(self, int x, int y) -> unsigned char"""
2151 return _core_.Image_GetRed(*args, **kwargs)
2152
2153 def GetGreen(*args, **kwargs):
2154 """GetGreen(self, int x, int y) -> unsigned char"""
2155 return _core_.Image_GetGreen(*args, **kwargs)
2156
2157 def GetBlue(*args, **kwargs):
2158 """GetBlue(self, int x, int y) -> unsigned char"""
2159 return _core_.Image_GetBlue(*args, **kwargs)
2160
2161 def SetAlpha(*args, **kwargs):
2162 """SetAlpha(self, int x, int y, unsigned char alpha)"""
2163 return _core_.Image_SetAlpha(*args, **kwargs)
2164
2165 def GetAlpha(*args, **kwargs):
2166 """GetAlpha(self, int x, int y) -> unsigned char"""
2167 return _core_.Image_GetAlpha(*args, **kwargs)
2168
2169 def HasAlpha(*args, **kwargs):
2170 """HasAlpha(self) -> bool"""
2171 return _core_.Image_HasAlpha(*args, **kwargs)
2172
2173 def FindFirstUnusedColour(*args, **kwargs):
2174 """
2175 FindFirstUnusedColour(int startR=1, int startG=0, int startB=0) -> (success, r, g, b)
2176
2177 Find first colour that is not used in the image and has higher RGB
2178 values than startR, startG, startB. Returns a tuple consisting of a
2179 success flag and rgb values.
2180 """
2181 return _core_.Image_FindFirstUnusedColour(*args, **kwargs)
2182
2183 def ConvertAlphaToMask(*args, **kwargs):
2184 """
2185 ConvertAlphaToMask(self, byte threshold=128) -> bool
2186
2187 If the image has alpha channel, this method converts it to mask. All pixels
2188 with alpha value less than ``threshold`` are replaced with mask colour and the
2189 alpha channel is removed. Mask colour is chosen automatically using
2190 `FindFirstUnusedColour`.
2191
2192 If the image image doesn't have alpha channel, ConvertAlphaToMask does
2193 nothing.
2194 """
2195 return _core_.Image_ConvertAlphaToMask(*args, **kwargs)
2196
2197 def ConvertColourToAlpha(*args, **kwargs):
2198 """
2199 ConvertColourToAlpha(self, unsigned char r, unsigned char g, unsigned char b) -> bool
2200
2201 This method converts an image where the original alpha information is
2202 only available as a shades of a colour (actually shades of grey)
2203 typically when you draw anti-aliased text into a bitmap. The DC
2204 drawing routines draw grey values on the black background although
2205 they actually mean to draw white with differnt alpha values. This
2206 method reverses it, assuming a black (!) background and white text.
2207 The method will then fill up the whole image with the colour given.
2208 """
2209 return _core_.Image_ConvertColourToAlpha(*args, **kwargs)
2210
2211 def SetMaskFromImage(*args, **kwargs):
2212 """SetMaskFromImage(self, Image mask, byte mr, byte mg, byte mb) -> bool"""
2213 return _core_.Image_SetMaskFromImage(*args, **kwargs)
2214
2215 def CanRead(*args, **kwargs):
2216 """CanRead(String name) -> bool"""
2217 return _core_.Image_CanRead(*args, **kwargs)
2218
2219 CanRead = staticmethod(CanRead)
2220 def GetImageCount(*args, **kwargs):
2221 """GetImageCount(String name, long type=BITMAP_TYPE_ANY) -> int"""
2222 return _core_.Image_GetImageCount(*args, **kwargs)
2223
2224 GetImageCount = staticmethod(GetImageCount)
2225 def LoadFile(*args, **kwargs):
2226 """LoadFile(self, String name, long type=BITMAP_TYPE_ANY, int index=-1) -> bool"""
2227 return _core_.Image_LoadFile(*args, **kwargs)
2228
2229 def LoadMimeFile(*args, **kwargs):
2230 """LoadMimeFile(self, String name, String mimetype, int index=-1) -> bool"""
2231 return _core_.Image_LoadMimeFile(*args, **kwargs)
2232
2233 def SaveFile(*args, **kwargs):
2234 """SaveFile(self, String name, int type) -> bool"""
2235 return _core_.Image_SaveFile(*args, **kwargs)
2236
2237 def SaveMimeFile(*args, **kwargs):
2238 """SaveMimeFile(self, String name, String mimetype) -> bool"""
2239 return _core_.Image_SaveMimeFile(*args, **kwargs)
2240
2241 def CanReadStream(*args, **kwargs):
2242 """CanReadStream(InputStream stream) -> bool"""
2243 return _core_.Image_CanReadStream(*args, **kwargs)
2244
2245 CanReadStream = staticmethod(CanReadStream)
2246 def LoadStream(*args, **kwargs):
2247 """LoadStream(self, InputStream stream, long type=BITMAP_TYPE_ANY, int index=-1) -> bool"""
2248 return _core_.Image_LoadStream(*args, **kwargs)
2249
2250 def LoadMimeStream(*args, **kwargs):
2251 """LoadMimeStream(self, InputStream stream, String mimetype, int index=-1) -> bool"""
2252 return _core_.Image_LoadMimeStream(*args, **kwargs)
2253
2254 def Ok(*args, **kwargs):
2255 """Ok(self) -> bool"""
2256 return _core_.Image_Ok(*args, **kwargs)
2257
2258 def GetWidth(*args, **kwargs):
2259 """GetWidth(self) -> int"""
2260 return _core_.Image_GetWidth(*args, **kwargs)
2261
2262 def GetHeight(*args, **kwargs):
2263 """GetHeight(self) -> int"""
2264 return _core_.Image_GetHeight(*args, **kwargs)
2265
2266 def GetSize(*args, **kwargs):
2267 """GetSize(self) -> Size"""
2268 return _core_.Image_GetSize(*args, **kwargs)
2269
2270 def GetSubImage(*args, **kwargs):
2271 """GetSubImage(self, Rect rect) -> Image"""
2272 return _core_.Image_GetSubImage(*args, **kwargs)
2273
2274 def Copy(*args, **kwargs):
2275 """Copy(self) -> Image"""
2276 return _core_.Image_Copy(*args, **kwargs)
2277
2278 def Paste(*args, **kwargs):
2279 """Paste(self, Image image, int x, int y)"""
2280 return _core_.Image_Paste(*args, **kwargs)
2281
2282 def GetData(*args, **kwargs):
2283 """GetData(self) -> PyObject"""
2284 return _core_.Image_GetData(*args, **kwargs)
2285
2286 def SetData(*args, **kwargs):
2287 """SetData(self, PyObject data)"""
2288 return _core_.Image_SetData(*args, **kwargs)
2289
2290 def GetDataBuffer(*args, **kwargs):
2291 """GetDataBuffer(self) -> PyObject"""
2292 return _core_.Image_GetDataBuffer(*args, **kwargs)
2293
2294 def SetDataBuffer(*args, **kwargs):
2295 """SetDataBuffer(self, PyObject data)"""
2296 return _core_.Image_SetDataBuffer(*args, **kwargs)
2297
2298 def GetAlphaData(*args, **kwargs):
2299 """GetAlphaData(self) -> PyObject"""
2300 return _core_.Image_GetAlphaData(*args, **kwargs)
2301
2302 def SetAlphaData(*args, **kwargs):
2303 """SetAlphaData(self, PyObject data)"""
2304 return _core_.Image_SetAlphaData(*args, **kwargs)
2305
2306 def GetAlphaBuffer(*args, **kwargs):
2307 """GetAlphaBuffer(self) -> PyObject"""
2308 return _core_.Image_GetAlphaBuffer(*args, **kwargs)
2309
2310 def SetAlphaBuffer(*args, **kwargs):
2311 """SetAlphaBuffer(self, PyObject data)"""
2312 return _core_.Image_SetAlphaBuffer(*args, **kwargs)
2313
2314 def SetMaskColour(*args, **kwargs):
2315 """SetMaskColour(self, unsigned char r, unsigned char g, unsigned char b)"""
2316 return _core_.Image_SetMaskColour(*args, **kwargs)
2317
2318 def GetMaskRed(*args, **kwargs):
2319 """GetMaskRed(self) -> unsigned char"""
2320 return _core_.Image_GetMaskRed(*args, **kwargs)
2321
2322 def GetMaskGreen(*args, **kwargs):
2323 """GetMaskGreen(self) -> unsigned char"""
2324 return _core_.Image_GetMaskGreen(*args, **kwargs)
2325
2326 def GetMaskBlue(*args, **kwargs):
2327 """GetMaskBlue(self) -> unsigned char"""
2328 return _core_.Image_GetMaskBlue(*args, **kwargs)
2329
2330 def SetMask(*args, **kwargs):
2331 """SetMask(self, bool mask=True)"""
2332 return _core_.Image_SetMask(*args, **kwargs)
2333
2334 def HasMask(*args, **kwargs):
2335 """HasMask(self) -> bool"""
2336 return _core_.Image_HasMask(*args, **kwargs)
2337
2338 def Rotate(*args, **kwargs):
2339 """
2340 Rotate(self, double angle, Point centre_of_rotation, bool interpolating=True,
2341 Point offset_after_rotation=None) -> Image
2342 """
2343 return _core_.Image_Rotate(*args, **kwargs)
2344
2345 def Rotate90(*args, **kwargs):
2346 """Rotate90(self, bool clockwise=True) -> Image"""
2347 return _core_.Image_Rotate90(*args, **kwargs)
2348
2349 def Mirror(*args, **kwargs):
2350 """Mirror(self, bool horizontally=True) -> Image"""
2351 return _core_.Image_Mirror(*args, **kwargs)
2352
2353 def Replace(*args, **kwargs):
2354 """
2355 Replace(self, unsigned char r1, unsigned char g1, unsigned char b1,
2356 unsigned char r2, unsigned char g2, unsigned char b2)
2357 """
2358 return _core_.Image_Replace(*args, **kwargs)
2359
2360 def ConvertToMono(*args, **kwargs):
2361 """ConvertToMono(self, unsigned char r, unsigned char g, unsigned char b) -> Image"""
2362 return _core_.Image_ConvertToMono(*args, **kwargs)
2363
2364 def SetOption(*args, **kwargs):
2365 """SetOption(self, String name, String value)"""
2366 return _core_.Image_SetOption(*args, **kwargs)
2367
2368 def SetOptionInt(*args, **kwargs):
2369 """SetOptionInt(self, String name, int value)"""
2370 return _core_.Image_SetOptionInt(*args, **kwargs)
2371
2372 def GetOption(*args, **kwargs):
2373 """GetOption(self, String name) -> String"""
2374 return _core_.Image_GetOption(*args, **kwargs)
2375
2376 def GetOptionInt(*args, **kwargs):
2377 """GetOptionInt(self, String name) -> int"""
2378 return _core_.Image_GetOptionInt(*args, **kwargs)
2379
2380 def HasOption(*args, **kwargs):
2381 """HasOption(self, String name) -> bool"""
2382 return _core_.Image_HasOption(*args, **kwargs)
2383
2384 def CountColours(*args, **kwargs):
2385 """CountColours(self, unsigned long stopafter=(unsigned long) -1) -> unsigned long"""
2386 return _core_.Image_CountColours(*args, **kwargs)
2387
2388 def ComputeHistogram(*args, **kwargs):
2389 """ComputeHistogram(self, ImageHistogram h) -> unsigned long"""
2390 return _core_.Image_ComputeHistogram(*args, **kwargs)
2391
2392 def AddHandler(*args, **kwargs):
2393 """AddHandler(ImageHandler handler)"""
2394 return _core_.Image_AddHandler(*args, **kwargs)
2395
2396 AddHandler = staticmethod(AddHandler)
2397 def InsertHandler(*args, **kwargs):
2398 """InsertHandler(ImageHandler handler)"""
2399 return _core_.Image_InsertHandler(*args, **kwargs)
2400
2401 InsertHandler = staticmethod(InsertHandler)
2402 def RemoveHandler(*args, **kwargs):
2403 """RemoveHandler(String name) -> bool"""
2404 return _core_.Image_RemoveHandler(*args, **kwargs)
2405
2406 RemoveHandler = staticmethod(RemoveHandler)
2407 def GetImageExtWildcard(*args, **kwargs):
2408 """GetImageExtWildcard() -> String"""
2409 return _core_.Image_GetImageExtWildcard(*args, **kwargs)
2410
2411 GetImageExtWildcard = staticmethod(GetImageExtWildcard)
2412 def ConvertToBitmap(*args, **kwargs):
2413 """ConvertToBitmap(self, int depth=-1) -> Bitmap"""
2414 return _core_.Image_ConvertToBitmap(*args, **kwargs)
2415
2416 def ConvertToMonoBitmap(*args, **kwargs):
2417 """ConvertToMonoBitmap(self, unsigned char red, unsigned char green, unsigned char blue) -> Bitmap"""
2418 return _core_.Image_ConvertToMonoBitmap(*args, **kwargs)
2419
2420 def __nonzero__(self): return self.Ok()
2421
2422class ImagePtr(Image):
2423 def __init__(self, this):
2424 self.this = this
2425 if not hasattr(self,"thisown"): self.thisown = 0
2426 self.__class__ = Image
2427_core_.Image_swigregister(ImagePtr)
2428
2429def ImageFromMime(*args, **kwargs):
2430 """ImageFromMime(String name, String mimetype, int index=-1) -> Image"""
2431 val = _core_.new_ImageFromMime(*args, **kwargs)
2432 val.thisown = 1
2433 return val
2434
2435def ImageFromStream(*args, **kwargs):
2436 """ImageFromStream(InputStream stream, long type=BITMAP_TYPE_ANY, int index=-1) -> Image"""
2437 val = _core_.new_ImageFromStream(*args, **kwargs)
2438 val.thisown = 1
2439 return val
2440
2441def ImageFromStreamMime(*args, **kwargs):
2442 """ImageFromStreamMime(InputStream stream, String mimetype, int index=-1) -> Image"""
2443 val = _core_.new_ImageFromStreamMime(*args, **kwargs)
2444 val.thisown = 1
2445 return val
2446
2447def EmptyImage(*args, **kwargs):
2448 """EmptyImage(int width=0, int height=0, bool clear=True) -> Image"""
2449 val = _core_.new_EmptyImage(*args, **kwargs)
2450 val.thisown = 1
2451 return val
2452
2453def ImageFromBitmap(*args, **kwargs):
2454 """ImageFromBitmap(Bitmap bitmap) -> Image"""
2455 val = _core_.new_ImageFromBitmap(*args, **kwargs)
2456 val.thisown = 1
2457 return val
2458
2459def ImageFromData(*args, **kwargs):
2460 """ImageFromData(int width, int height, unsigned char data) -> Image"""
2461 val = _core_.new_ImageFromData(*args, **kwargs)
2462 val.thisown = 1
2463 return val
2464
2465def ImageFromDataWithAlpha(*args, **kwargs):
2466 """ImageFromDataWithAlpha(int width, int height, unsigned char data, unsigned char alpha) -> Image"""
2467 val = _core_.new_ImageFromDataWithAlpha(*args, **kwargs)
2468 val.thisown = 1
2469 return val
2470
2471def Image_CanRead(*args, **kwargs):
2472 """Image_CanRead(String name) -> bool"""
2473 return _core_.Image_CanRead(*args, **kwargs)
2474
2475def Image_GetImageCount(*args, **kwargs):
2476 """Image_GetImageCount(String name, long type=BITMAP_TYPE_ANY) -> int"""
2477 return _core_.Image_GetImageCount(*args, **kwargs)
2478
2479def Image_CanReadStream(*args, **kwargs):
2480 """Image_CanReadStream(InputStream stream) -> bool"""
2481 return _core_.Image_CanReadStream(*args, **kwargs)
2482
2483def Image_AddHandler(*args, **kwargs):
2484 """Image_AddHandler(ImageHandler handler)"""
2485 return _core_.Image_AddHandler(*args, **kwargs)
2486
2487def Image_InsertHandler(*args, **kwargs):
2488 """Image_InsertHandler(ImageHandler handler)"""
2489 return _core_.Image_InsertHandler(*args, **kwargs)
2490
2491def Image_RemoveHandler(*args, **kwargs):
2492 """Image_RemoveHandler(String name) -> bool"""
2493 return _core_.Image_RemoveHandler(*args, **kwargs)
2494
2495def Image_GetImageExtWildcard(*args, **kwargs):
2496 """Image_GetImageExtWildcard() -> String"""
2497 return _core_.Image_GetImageExtWildcard(*args, **kwargs)
2498
2499def InitAllImageHandlers():
2500 """
2501 The former functionality of InitAllImageHanders is now done internal to
2502 the _core_ extension module and so this function has become a simple NOP.
2503 """
2504 pass
2505
2506IMAGE_RESOLUTION_INCHES = _core_.IMAGE_RESOLUTION_INCHES
2507IMAGE_RESOLUTION_CM = _core_.IMAGE_RESOLUTION_CM
2508BMP_24BPP = _core_.BMP_24BPP
2509BMP_8BPP = _core_.BMP_8BPP
2510BMP_8BPP_GREY = _core_.BMP_8BPP_GREY
2511BMP_8BPP_GRAY = _core_.BMP_8BPP_GRAY
2512BMP_8BPP_RED = _core_.BMP_8BPP_RED
2513BMP_8BPP_PALETTE = _core_.BMP_8BPP_PALETTE
2514BMP_4BPP = _core_.BMP_4BPP
2515BMP_1BPP = _core_.BMP_1BPP
2516BMP_1BPP_BW = _core_.BMP_1BPP_BW
2517class BMPHandler(ImageHandler):
2518 """Proxy of C++ BMPHandler class"""
2519 def __repr__(self):
2520 return "<%s.%s; proxy of C++ wxBMPHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
2521 def __init__(self, *args, **kwargs):
2522 """__init__(self) -> BMPHandler"""
2523 newobj = _core_.new_BMPHandler(*args, **kwargs)
2524 self.this = newobj.this
2525 self.thisown = 1
2526 del newobj.thisown
2527
2528class BMPHandlerPtr(BMPHandler):
2529 def __init__(self, this):
2530 self.this = this
2531 if not hasattr(self,"thisown"): self.thisown = 0
2532 self.__class__ = BMPHandler
2533_core_.BMPHandler_swigregister(BMPHandlerPtr)
2534NullImage = cvar.NullImage
2535IMAGE_OPTION_BMP_FORMAT = cvar.IMAGE_OPTION_BMP_FORMAT
2536IMAGE_OPTION_CUR_HOTSPOT_X = cvar.IMAGE_OPTION_CUR_HOTSPOT_X
2537IMAGE_OPTION_CUR_HOTSPOT_Y = cvar.IMAGE_OPTION_CUR_HOTSPOT_Y
2538IMAGE_OPTION_RESOLUTION = cvar.IMAGE_OPTION_RESOLUTION
2539IMAGE_OPTION_RESOLUTIONUNIT = cvar.IMAGE_OPTION_RESOLUTIONUNIT
2540
2541class ICOHandler(BMPHandler):
2542 """Proxy of C++ ICOHandler class"""
2543 def __repr__(self):
2544 return "<%s.%s; proxy of C++ wxICOHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
2545 def __init__(self, *args, **kwargs):
2546 """__init__(self) -> ICOHandler"""
2547 newobj = _core_.new_ICOHandler(*args, **kwargs)
2548 self.this = newobj.this
2549 self.thisown = 1
2550 del newobj.thisown
2551
2552class ICOHandlerPtr(ICOHandler):
2553 def __init__(self, this):
2554 self.this = this
2555 if not hasattr(self,"thisown"): self.thisown = 0
2556 self.__class__ = ICOHandler
2557_core_.ICOHandler_swigregister(ICOHandlerPtr)
2558
2559class CURHandler(ICOHandler):
2560 """Proxy of C++ CURHandler class"""
2561 def __repr__(self):
2562 return "<%s.%s; proxy of C++ wxCURHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
2563 def __init__(self, *args, **kwargs):
2564 """__init__(self) -> CURHandler"""
2565 newobj = _core_.new_CURHandler(*args, **kwargs)
2566 self.this = newobj.this
2567 self.thisown = 1
2568 del newobj.thisown
2569
2570class CURHandlerPtr(CURHandler):
2571 def __init__(self, this):
2572 self.this = this
2573 if not hasattr(self,"thisown"): self.thisown = 0
2574 self.__class__ = CURHandler
2575_core_.CURHandler_swigregister(CURHandlerPtr)
2576
2577class ANIHandler(CURHandler):
2578 """Proxy of C++ ANIHandler class"""
2579 def __repr__(self):
2580 return "<%s.%s; proxy of C++ wxANIHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
2581 def __init__(self, *args, **kwargs):
2582 """__init__(self) -> ANIHandler"""
2583 newobj = _core_.new_ANIHandler(*args, **kwargs)
2584 self.this = newobj.this
2585 self.thisown = 1
2586 del newobj.thisown
2587
2588class ANIHandlerPtr(ANIHandler):
2589 def __init__(self, this):
2590 self.this = this
2591 if not hasattr(self,"thisown"): self.thisown = 0
2592 self.__class__ = ANIHandler
2593_core_.ANIHandler_swigregister(ANIHandlerPtr)
2594
2595class PNGHandler(ImageHandler):
2596 """Proxy of C++ PNGHandler class"""
2597 def __repr__(self):
2598 return "<%s.%s; proxy of C++ wxPNGHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
2599 def __init__(self, *args, **kwargs):
2600 """__init__(self) -> PNGHandler"""
2601 newobj = _core_.new_PNGHandler(*args, **kwargs)
2602 self.this = newobj.this
2603 self.thisown = 1
2604 del newobj.thisown
2605
2606class PNGHandlerPtr(PNGHandler):
2607 def __init__(self, this):
2608 self.this = this
2609 if not hasattr(self,"thisown"): self.thisown = 0
2610 self.__class__ = PNGHandler
2611_core_.PNGHandler_swigregister(PNGHandlerPtr)
2612
2613class GIFHandler(ImageHandler):
2614 """Proxy of C++ GIFHandler class"""
2615 def __repr__(self):
2616 return "<%s.%s; proxy of C++ wxGIFHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
2617 def __init__(self, *args, **kwargs):
2618 """__init__(self) -> GIFHandler"""
2619 newobj = _core_.new_GIFHandler(*args, **kwargs)
2620 self.this = newobj.this
2621 self.thisown = 1
2622 del newobj.thisown
2623
2624class GIFHandlerPtr(GIFHandler):
2625 def __init__(self, this):
2626 self.this = this
2627 if not hasattr(self,"thisown"): self.thisown = 0
2628 self.__class__ = GIFHandler
2629_core_.GIFHandler_swigregister(GIFHandlerPtr)
2630
2631class PCXHandler(ImageHandler):
2632 """Proxy of C++ PCXHandler class"""
2633 def __repr__(self):
2634 return "<%s.%s; proxy of C++ wxPCXHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
2635 def __init__(self, *args, **kwargs):
2636 """__init__(self) -> PCXHandler"""
2637 newobj = _core_.new_PCXHandler(*args, **kwargs)
2638 self.this = newobj.this
2639 self.thisown = 1
2640 del newobj.thisown
2641
2642class PCXHandlerPtr(PCXHandler):
2643 def __init__(self, this):
2644 self.this = this
2645 if not hasattr(self,"thisown"): self.thisown = 0
2646 self.__class__ = PCXHandler
2647_core_.PCXHandler_swigregister(PCXHandlerPtr)
2648
2649class JPEGHandler(ImageHandler):
2650 """Proxy of C++ JPEGHandler class"""
2651 def __repr__(self):
2652 return "<%s.%s; proxy of C++ wxJPEGHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
2653 def __init__(self, *args, **kwargs):
2654 """__init__(self) -> JPEGHandler"""
2655 newobj = _core_.new_JPEGHandler(*args, **kwargs)
2656 self.this = newobj.this
2657 self.thisown = 1
2658 del newobj.thisown
2659
2660class JPEGHandlerPtr(JPEGHandler):
2661 def __init__(self, this):
2662 self.this = this
2663 if not hasattr(self,"thisown"): self.thisown = 0
2664 self.__class__ = JPEGHandler
2665_core_.JPEGHandler_swigregister(JPEGHandlerPtr)
2666
2667class PNMHandler(ImageHandler):
2668 """Proxy of C++ PNMHandler class"""
2669 def __repr__(self):
2670 return "<%s.%s; proxy of C++ wxPNMHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
2671 def __init__(self, *args, **kwargs):
2672 """__init__(self) -> PNMHandler"""
2673 newobj = _core_.new_PNMHandler(*args, **kwargs)
2674 self.this = newobj.this
2675 self.thisown = 1
2676 del newobj.thisown
2677
2678class PNMHandlerPtr(PNMHandler):
2679 def __init__(self, this):
2680 self.this = this
2681 if not hasattr(self,"thisown"): self.thisown = 0
2682 self.__class__ = PNMHandler
2683_core_.PNMHandler_swigregister(PNMHandlerPtr)
2684
2685class XPMHandler(ImageHandler):
2686 """Proxy of C++ XPMHandler class"""
2687 def __repr__(self):
2688 return "<%s.%s; proxy of C++ wxXPMHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
2689 def __init__(self, *args, **kwargs):
2690 """__init__(self) -> XPMHandler"""
2691 newobj = _core_.new_XPMHandler(*args, **kwargs)
2692 self.this = newobj.this
2693 self.thisown = 1
2694 del newobj.thisown
2695
2696class XPMHandlerPtr(XPMHandler):
2697 def __init__(self, this):
2698 self.this = this
2699 if not hasattr(self,"thisown"): self.thisown = 0
2700 self.__class__ = XPMHandler
2701_core_.XPMHandler_swigregister(XPMHandlerPtr)
2702
2703class TIFFHandler(ImageHandler):
2704 """Proxy of C++ TIFFHandler class"""
2705 def __repr__(self):
2706 return "<%s.%s; proxy of C++ wxTIFFHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
2707 def __init__(self, *args, **kwargs):
2708 """__init__(self) -> TIFFHandler"""
2709 newobj = _core_.new_TIFFHandler(*args, **kwargs)
2710 self.this = newobj.this
2711 self.thisown = 1
2712 del newobj.thisown
2713
2714class TIFFHandlerPtr(TIFFHandler):
2715 def __init__(self, this):
2716 self.this = this
2717 if not hasattr(self,"thisown"): self.thisown = 0
2718 self.__class__ = TIFFHandler
2719_core_.TIFFHandler_swigregister(TIFFHandlerPtr)
2720
2721QUANTIZE_INCLUDE_WINDOWS_COLOURS = _core_.QUANTIZE_INCLUDE_WINDOWS_COLOURS
2722QUANTIZE_FILL_DESTINATION_IMAGE = _core_.QUANTIZE_FILL_DESTINATION_IMAGE
2723class Quantize(object):
2724 """Performs quantization, or colour reduction, on a wxImage."""
2725 def __init__(self): raise RuntimeError, "No constructor defined"
2726 def __repr__(self):
2727 return "<%s.%s; proxy of C++ wxQuantize instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
2728 def Quantize(*args, **kwargs):
2729 """
2730 Quantize(Image src, Image dest, int desiredNoColours=236, int flags=wxQUANTIZE_INCLUDE_WINDOWS_COLOURS|wxQUANTIZE_FILL_DESTINATION_IMAGE) -> bool
2731
2732 Reduce the colours in the source image and put the result into the
2733 destination image, setting the palette in the destination if
2734 needed. Both images may be the same, to overwrite the source image.
2735 """
2736 return _core_.Quantize_Quantize(*args, **kwargs)
2737
2738 Quantize = staticmethod(Quantize)
2739
2740class QuantizePtr(Quantize):
2741 def __init__(self, this):
2742 self.this = this
2743 if not hasattr(self,"thisown"): self.thisown = 0
2744 self.__class__ = Quantize
2745_core_.Quantize_swigregister(QuantizePtr)
2746
2747def Quantize_Quantize(*args, **kwargs):
2748 """
2749 Quantize_Quantize(Image src, Image dest, int desiredNoColours=236, int flags=wxQUANTIZE_INCLUDE_WINDOWS_COLOURS|wxQUANTIZE_FILL_DESTINATION_IMAGE) -> bool
2750
2751 Reduce the colours in the source image and put the result into the
2752 destination image, setting the palette in the destination if
2753 needed. Both images may be the same, to overwrite the source image.
2754 """
2755 return _core_.Quantize_Quantize(*args, **kwargs)
2756
2757#---------------------------------------------------------------------------
2758
2759class EvtHandler(Object):
2760 """Proxy of C++ EvtHandler class"""
2761 def __repr__(self):
2762 return "<%s.%s; proxy of C++ wxEvtHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
2763 def __init__(self, *args, **kwargs):
2764 """__init__(self) -> EvtHandler"""
2765 newobj = _core_.new_EvtHandler(*args, **kwargs)
2766 self.this = newobj.this
2767 self.thisown = 1
2768 del newobj.thisown
2769 def GetNextHandler(*args, **kwargs):
2770 """GetNextHandler(self) -> EvtHandler"""
2771 return _core_.EvtHandler_GetNextHandler(*args, **kwargs)
2772
2773 def GetPreviousHandler(*args, **kwargs):
2774 """GetPreviousHandler(self) -> EvtHandler"""
2775 return _core_.EvtHandler_GetPreviousHandler(*args, **kwargs)
2776
2777 def SetNextHandler(*args, **kwargs):
2778 """SetNextHandler(self, EvtHandler handler)"""
2779 return _core_.EvtHandler_SetNextHandler(*args, **kwargs)
2780
2781 def SetPreviousHandler(*args, **kwargs):
2782 """SetPreviousHandler(self, EvtHandler handler)"""
2783 return _core_.EvtHandler_SetPreviousHandler(*args, **kwargs)
2784
2785 def GetEvtHandlerEnabled(*args, **kwargs):
2786 """GetEvtHandlerEnabled(self) -> bool"""
2787 return _core_.EvtHandler_GetEvtHandlerEnabled(*args, **kwargs)
2788
2789 def SetEvtHandlerEnabled(*args, **kwargs):
2790 """SetEvtHandlerEnabled(self, bool enabled)"""
2791 return _core_.EvtHandler_SetEvtHandlerEnabled(*args, **kwargs)
2792
2793 def ProcessEvent(*args, **kwargs):
2794 """ProcessEvent(self, Event event) -> bool"""
2795 return _core_.EvtHandler_ProcessEvent(*args, **kwargs)
2796
2797 def AddPendingEvent(*args, **kwargs):
2798 """AddPendingEvent(self, Event event)"""
2799 return _core_.EvtHandler_AddPendingEvent(*args, **kwargs)
2800
2801 def ProcessPendingEvents(*args, **kwargs):
2802 """ProcessPendingEvents(self)"""
2803 return _core_.EvtHandler_ProcessPendingEvents(*args, **kwargs)
2804
2805 def Connect(*args, **kwargs):
2806 """Connect(self, int id, int lastId, int eventType, PyObject func)"""
2807 return _core_.EvtHandler_Connect(*args, **kwargs)
2808
2809 def Disconnect(*args, **kwargs):
2810 """Disconnect(self, int id, int lastId=-1, wxEventType eventType=wxEVT_NULL) -> bool"""
2811 return _core_.EvtHandler_Disconnect(*args, **kwargs)
2812
2813 def _setOORInfo(*args, **kwargs):
2814 """_setOORInfo(self, PyObject _self, bool incref=True)"""
2815 return _core_.EvtHandler__setOORInfo(*args, **kwargs)
2816
2817 def Bind(self, event, handler, source=None, id=wx.ID_ANY, id2=wx.ID_ANY):
2818 """
2819 Bind an event to an event handler.
2820
2821 :param event: One of the EVT_* objects that specifies the
2822 type of event to bind,
2823
2824 :param handler: A callable object to be invoked when the
2825 event is delivered to self. Pass None to
2826 disconnect an event handler.
2827
2828 :param source: Sometimes the event originates from a
2829 different window than self, but you still
2830 want to catch it in self. (For example, a
2831 button event delivered to a frame.) By
2832 passing the source of the event, the event
2833 handling system is able to differentiate
2834 between the same event type from different
2835 controls.
2836
2837 :param id: Used to spcify the event source by ID instead
2838 of instance.
2839
2840 :param id2: Used when it is desirable to bind a handler
2841 to a range of IDs, such as with EVT_MENU_RANGE.
2842 """
2843 if source is not None:
2844 id = source.GetId()
2845 event.Bind(self, id, id2, handler)
2846
2847 def Unbind(self, event, source=None, id=wx.ID_ANY, id2=wx.ID_ANY):
2848 """
2849 Disconencts the event handler binding for event from self.
2850 Returns True if successful.
2851 """
2852 if source is not None:
2853 id = source.GetId()
2854 return event.Unbind(self, id, id2)
2855
2856
2857class EvtHandlerPtr(EvtHandler):
2858 def __init__(self, this):
2859 self.this = this
2860 if not hasattr(self,"thisown"): self.thisown = 0
2861 self.__class__ = EvtHandler
2862_core_.EvtHandler_swigregister(EvtHandlerPtr)
2863
2864#---------------------------------------------------------------------------
2865
2866class PyEventBinder(object):
2867 """
2868 Instances of this class are used to bind specific events to event
2869 handlers.
2870 """
2871 def __init__(self, evtType, expectedIDs=0):
2872 if expectedIDs not in [0, 1, 2]:
2873 raise ValueError, "Invalid number of expectedIDs"
2874 self.expectedIDs = expectedIDs
2875
2876 if type(evtType) == list or type(evtType) == tuple:
2877 self.evtType = evtType
2878 else:
2879 self.evtType = [evtType]
2880
2881
2882 def Bind(self, target, id1, id2, function):
2883 """Bind this set of event types to target."""
2884 for et in self.evtType:
2885 target.Connect(id1, id2, et, function)
2886
2887
2888 def Unbind(self, target, id1, id2):
2889 """Remove an event binding."""
2890 success = 0
2891 for et in self.evtType:
2892 success += target.Disconnect(id1, id2, et)
2893 return success != 0
2894
2895
2896 def __call__(self, *args):
2897 """
2898 For backwards compatibility with the old EVT_* functions.
2899 Should be called with either (window, func), (window, ID,
2900 func) or (window, ID1, ID2, func) parameters depending on the
2901 type of the event.
2902 """
2903 assert len(args) == 2 + self.expectedIDs
2904 id1 = wx.ID_ANY
2905 id2 = wx.ID_ANY
2906 target = args[0]
2907 if self.expectedIDs == 0:
2908 func = args[1]
2909 elif self.expectedIDs == 1:
2910 id1 = args[1]
2911 func = args[2]
2912 elif self.expectedIDs == 2:
2913 id1 = args[1]
2914 id2 = args[2]
2915 func = args[3]
2916 else:
2917 raise ValueError, "Unexpected number of IDs"
2918
2919 self.Bind(target, id1, id2, func)
2920
2921
2922# These two are square pegs that don't fit the PyEventBinder hole...
2923def EVT_COMMAND(win, id, cmd, func):
2924 win.Connect(id, -1, cmd, func)
2925def EVT_COMMAND_RANGE(win, id1, id2, cmd, func):
2926 win.Connect(id1, id2, cmd, func)
2927
2928
2929#---------------------------------------------------------------------------
2930
2931#---------------------------------------------------------------------------
2932
2933EVENT_PROPAGATE_NONE = _core_.EVENT_PROPAGATE_NONE
2934EVENT_PROPAGATE_MAX = _core_.EVENT_PROPAGATE_MAX
2935
2936def NewEventType(*args, **kwargs):
2937 """NewEventType() -> wxEventType"""
2938 return _core_.NewEventType(*args, **kwargs)
2939wxEVT_NULL = _core_.wxEVT_NULL
2940wxEVT_FIRST = _core_.wxEVT_FIRST
2941wxEVT_USER_FIRST = _core_.wxEVT_USER_FIRST
2942wxEVT_COMMAND_BUTTON_CLICKED = _core_.wxEVT_COMMAND_BUTTON_CLICKED
2943wxEVT_COMMAND_CHECKBOX_CLICKED = _core_.wxEVT_COMMAND_CHECKBOX_CLICKED
2944wxEVT_COMMAND_CHOICE_SELECTED = _core_.wxEVT_COMMAND_CHOICE_SELECTED
2945wxEVT_COMMAND_LISTBOX_SELECTED = _core_.wxEVT_COMMAND_LISTBOX_SELECTED
2946wxEVT_COMMAND_LISTBOX_DOUBLECLICKED = _core_.wxEVT_COMMAND_LISTBOX_DOUBLECLICKED
2947wxEVT_COMMAND_CHECKLISTBOX_TOGGLED = _core_.wxEVT_COMMAND_CHECKLISTBOX_TOGGLED
2948wxEVT_COMMAND_MENU_SELECTED = _core_.wxEVT_COMMAND_MENU_SELECTED
2949wxEVT_COMMAND_TOOL_CLICKED = _core_.wxEVT_COMMAND_TOOL_CLICKED
2950wxEVT_COMMAND_SLIDER_UPDATED = _core_.wxEVT_COMMAND_SLIDER_UPDATED
2951wxEVT_COMMAND_RADIOBOX_SELECTED = _core_.wxEVT_COMMAND_RADIOBOX_SELECTED
2952wxEVT_COMMAND_RADIOBUTTON_SELECTED = _core_.wxEVT_COMMAND_RADIOBUTTON_SELECTED
2953wxEVT_COMMAND_SCROLLBAR_UPDATED = _core_.wxEVT_COMMAND_SCROLLBAR_UPDATED
2954wxEVT_COMMAND_VLBOX_SELECTED = _core_.wxEVT_COMMAND_VLBOX_SELECTED
2955wxEVT_COMMAND_COMBOBOX_SELECTED = _core_.wxEVT_COMMAND_COMBOBOX_SELECTED
2956wxEVT_COMMAND_TOOL_RCLICKED = _core_.wxEVT_COMMAND_TOOL_RCLICKED
2957wxEVT_COMMAND_TOOL_ENTER = _core_.wxEVT_COMMAND_TOOL_ENTER
2958wxEVT_LEFT_DOWN = _core_.wxEVT_LEFT_DOWN
2959wxEVT_LEFT_UP = _core_.wxEVT_LEFT_UP
2960wxEVT_MIDDLE_DOWN = _core_.wxEVT_MIDDLE_DOWN
2961wxEVT_MIDDLE_UP = _core_.wxEVT_MIDDLE_UP
2962wxEVT_RIGHT_DOWN = _core_.wxEVT_RIGHT_DOWN
2963wxEVT_RIGHT_UP = _core_.wxEVT_RIGHT_UP
2964wxEVT_MOTION = _core_.wxEVT_MOTION
2965wxEVT_ENTER_WINDOW = _core_.wxEVT_ENTER_WINDOW
2966wxEVT_LEAVE_WINDOW = _core_.wxEVT_LEAVE_WINDOW
2967wxEVT_LEFT_DCLICK = _core_.wxEVT_LEFT_DCLICK
2968wxEVT_MIDDLE_DCLICK = _core_.wxEVT_MIDDLE_DCLICK
2969wxEVT_RIGHT_DCLICK = _core_.wxEVT_RIGHT_DCLICK
2970wxEVT_SET_FOCUS = _core_.wxEVT_SET_FOCUS
2971wxEVT_KILL_FOCUS = _core_.wxEVT_KILL_FOCUS
2972wxEVT_CHILD_FOCUS = _core_.wxEVT_CHILD_FOCUS
2973wxEVT_MOUSEWHEEL = _core_.wxEVT_MOUSEWHEEL
2974wxEVT_NC_LEFT_DOWN = _core_.wxEVT_NC_LEFT_DOWN
2975wxEVT_NC_LEFT_UP = _core_.wxEVT_NC_LEFT_UP
2976wxEVT_NC_MIDDLE_DOWN = _core_.wxEVT_NC_MIDDLE_DOWN
2977wxEVT_NC_MIDDLE_UP = _core_.wxEVT_NC_MIDDLE_UP
2978wxEVT_NC_RIGHT_DOWN = _core_.wxEVT_NC_RIGHT_DOWN
2979wxEVT_NC_RIGHT_UP = _core_.wxEVT_NC_RIGHT_UP
2980wxEVT_NC_MOTION = _core_.wxEVT_NC_MOTION
2981wxEVT_NC_ENTER_WINDOW = _core_.wxEVT_NC_ENTER_WINDOW
2982wxEVT_NC_LEAVE_WINDOW = _core_.wxEVT_NC_LEAVE_WINDOW
2983wxEVT_NC_LEFT_DCLICK = _core_.wxEVT_NC_LEFT_DCLICK
2984wxEVT_NC_MIDDLE_DCLICK = _core_.wxEVT_NC_MIDDLE_DCLICK
2985wxEVT_NC_RIGHT_DCLICK = _core_.wxEVT_NC_RIGHT_DCLICK
2986wxEVT_CHAR = _core_.wxEVT_CHAR
2987wxEVT_CHAR_HOOK = _core_.wxEVT_CHAR_HOOK
2988wxEVT_NAVIGATION_KEY = _core_.wxEVT_NAVIGATION_KEY
2989wxEVT_KEY_DOWN = _core_.wxEVT_KEY_DOWN
2990wxEVT_KEY_UP = _core_.wxEVT_KEY_UP
2991wxEVT_HOTKEY = _core_.wxEVT_HOTKEY
2992wxEVT_SET_CURSOR = _core_.wxEVT_SET_CURSOR
2993wxEVT_SCROLL_TOP = _core_.wxEVT_SCROLL_TOP
2994wxEVT_SCROLL_BOTTOM = _core_.wxEVT_SCROLL_BOTTOM
2995wxEVT_SCROLL_LINEUP = _core_.wxEVT_SCROLL_LINEUP
2996wxEVT_SCROLL_LINEDOWN = _core_.wxEVT_SCROLL_LINEDOWN
2997wxEVT_SCROLL_PAGEUP = _core_.wxEVT_SCROLL_PAGEUP
2998wxEVT_SCROLL_PAGEDOWN = _core_.wxEVT_SCROLL_PAGEDOWN
2999wxEVT_SCROLL_THUMBTRACK = _core_.wxEVT_SCROLL_THUMBTRACK
3000wxEVT_SCROLL_THUMBRELEASE = _core_.wxEVT_SCROLL_THUMBRELEASE
3001wxEVT_SCROLL_ENDSCROLL = _core_.wxEVT_SCROLL_ENDSCROLL
3002wxEVT_SCROLLWIN_TOP = _core_.wxEVT_SCROLLWIN_TOP
3003wxEVT_SCROLLWIN_BOTTOM = _core_.wxEVT_SCROLLWIN_BOTTOM
3004wxEVT_SCROLLWIN_LINEUP = _core_.wxEVT_SCROLLWIN_LINEUP
3005wxEVT_SCROLLWIN_LINEDOWN = _core_.wxEVT_SCROLLWIN_LINEDOWN
3006wxEVT_SCROLLWIN_PAGEUP = _core_.wxEVT_SCROLLWIN_PAGEUP
3007wxEVT_SCROLLWIN_PAGEDOWN = _core_.wxEVT_SCROLLWIN_PAGEDOWN
3008wxEVT_SCROLLWIN_THUMBTRACK = _core_.wxEVT_SCROLLWIN_THUMBTRACK
3009wxEVT_SCROLLWIN_THUMBRELEASE = _core_.wxEVT_SCROLLWIN_THUMBRELEASE
3010wxEVT_SIZE = _core_.wxEVT_SIZE
3011wxEVT_MOVE = _core_.wxEVT_MOVE
3012wxEVT_CLOSE_WINDOW = _core_.wxEVT_CLOSE_WINDOW
3013wxEVT_END_SESSION = _core_.wxEVT_END_SESSION
3014wxEVT_QUERY_END_SESSION = _core_.wxEVT_QUERY_END_SESSION
3015wxEVT_ACTIVATE_APP = _core_.wxEVT_ACTIVATE_APP
3016wxEVT_POWER = _core_.wxEVT_POWER
3017wxEVT_ACTIVATE = _core_.wxEVT_ACTIVATE
3018wxEVT_CREATE = _core_.wxEVT_CREATE
3019wxEVT_DESTROY = _core_.wxEVT_DESTROY
3020wxEVT_SHOW = _core_.wxEVT_SHOW
3021wxEVT_ICONIZE = _core_.wxEVT_ICONIZE
3022wxEVT_MAXIMIZE = _core_.wxEVT_MAXIMIZE
3023wxEVT_MOUSE_CAPTURE_CHANGED = _core_.wxEVT_MOUSE_CAPTURE_CHANGED
3024wxEVT_PAINT = _core_.wxEVT_PAINT
3025wxEVT_ERASE_BACKGROUND = _core_.wxEVT_ERASE_BACKGROUND
3026wxEVT_NC_PAINT = _core_.wxEVT_NC_PAINT
3027wxEVT_PAINT_ICON = _core_.wxEVT_PAINT_ICON
3028wxEVT_MENU_OPEN = _core_.wxEVT_MENU_OPEN
3029wxEVT_MENU_CLOSE = _core_.wxEVT_MENU_CLOSE
3030wxEVT_MENU_HIGHLIGHT = _core_.wxEVT_MENU_HIGHLIGHT
3031wxEVT_CONTEXT_MENU = _core_.wxEVT_CONTEXT_MENU
3032wxEVT_SYS_COLOUR_CHANGED = _core_.wxEVT_SYS_COLOUR_CHANGED
3033wxEVT_DISPLAY_CHANGED = _core_.wxEVT_DISPLAY_CHANGED
3034wxEVT_SETTING_CHANGED = _core_.wxEVT_SETTING_CHANGED
3035wxEVT_QUERY_NEW_PALETTE = _core_.wxEVT_QUERY_NEW_PALETTE
3036wxEVT_PALETTE_CHANGED = _core_.wxEVT_PALETTE_CHANGED
3037wxEVT_DROP_FILES = _core_.wxEVT_DROP_FILES
3038wxEVT_DRAW_ITEM = _core_.wxEVT_DRAW_ITEM
3039wxEVT_MEASURE_ITEM = _core_.wxEVT_MEASURE_ITEM
3040wxEVT_COMPARE_ITEM = _core_.wxEVT_COMPARE_ITEM
3041wxEVT_INIT_DIALOG = _core_.wxEVT_INIT_DIALOG
3042wxEVT_IDLE = _core_.wxEVT_IDLE
3043wxEVT_UPDATE_UI = _core_.wxEVT_UPDATE_UI
3044wxEVT_SIZING = _core_.wxEVT_SIZING
3045wxEVT_MOVING = _core_.wxEVT_MOVING
3046wxEVT_COMMAND_LEFT_CLICK = _core_.wxEVT_COMMAND_LEFT_CLICK
3047wxEVT_COMMAND_LEFT_DCLICK = _core_.wxEVT_COMMAND_LEFT_DCLICK
3048wxEVT_COMMAND_RIGHT_CLICK = _core_.wxEVT_COMMAND_RIGHT_CLICK
3049wxEVT_COMMAND_RIGHT_DCLICK = _core_.wxEVT_COMMAND_RIGHT_DCLICK
3050wxEVT_COMMAND_SET_FOCUS = _core_.wxEVT_COMMAND_SET_FOCUS
3051wxEVT_COMMAND_KILL_FOCUS = _core_.wxEVT_COMMAND_KILL_FOCUS
3052wxEVT_COMMAND_ENTER = _core_.wxEVT_COMMAND_ENTER
3053#
3054# Create some event binders
3055EVT_SIZE = wx.PyEventBinder( wxEVT_SIZE )
3056EVT_SIZING = wx.PyEventBinder( wxEVT_SIZING )
3057EVT_MOVE = wx.PyEventBinder( wxEVT_MOVE )
3058EVT_MOVING = wx.PyEventBinder( wxEVT_MOVING )
3059EVT_CLOSE = wx.PyEventBinder( wxEVT_CLOSE_WINDOW )
3060EVT_END_SESSION = wx.PyEventBinder( wxEVT_END_SESSION )
3061EVT_QUERY_END_SESSION = wx.PyEventBinder( wxEVT_QUERY_END_SESSION )
3062EVT_PAINT = wx.PyEventBinder( wxEVT_PAINT )
3063EVT_NC_PAINT = wx.PyEventBinder( wxEVT_NC_PAINT )
3064EVT_ERASE_BACKGROUND = wx.PyEventBinder( wxEVT_ERASE_BACKGROUND )
3065EVT_CHAR = wx.PyEventBinder( wxEVT_CHAR )
3066EVT_KEY_DOWN = wx.PyEventBinder( wxEVT_KEY_DOWN )
3067EVT_KEY_UP = wx.PyEventBinder( wxEVT_KEY_UP )
3068EVT_HOTKEY = wx.PyEventBinder( wxEVT_HOTKEY, 1)
3069EVT_CHAR_HOOK = wx.PyEventBinder( wxEVT_CHAR_HOOK )
3070EVT_MENU_OPEN = wx.PyEventBinder( wxEVT_MENU_OPEN )
3071EVT_MENU_CLOSE = wx.PyEventBinder( wxEVT_MENU_CLOSE )
3072EVT_MENU_HIGHLIGHT = wx.PyEventBinder( wxEVT_MENU_HIGHLIGHT, 1)
3073EVT_MENU_HIGHLIGHT_ALL = wx.PyEventBinder( wxEVT_MENU_HIGHLIGHT )
3074EVT_SET_FOCUS = wx.PyEventBinder( wxEVT_SET_FOCUS )
3075EVT_KILL_FOCUS = wx.PyEventBinder( wxEVT_KILL_FOCUS )
3076EVT_CHILD_FOCUS = wx.PyEventBinder( wxEVT_CHILD_FOCUS )
3077EVT_ACTIVATE = wx.PyEventBinder( wxEVT_ACTIVATE )
3078EVT_ACTIVATE_APP = wx.PyEventBinder( wxEVT_ACTIVATE_APP )
3079EVT_END_SESSION = wx.PyEventBinder( wxEVT_END_SESSION )
3080EVT_QUERY_END_SESSION = wx.PyEventBinder( wxEVT_QUERY_END_SESSION )
3081EVT_DROP_FILES = wx.PyEventBinder( wxEVT_DROP_FILES )
3082EVT_INIT_DIALOG = wx.PyEventBinder( wxEVT_INIT_DIALOG )
3083EVT_SYS_COLOUR_CHANGED = wx.PyEventBinder( wxEVT_SYS_COLOUR_CHANGED )
3084EVT_DISPLAY_CHANGED = wx.PyEventBinder( wxEVT_DISPLAY_CHANGED )
3085EVT_SHOW = wx.PyEventBinder( wxEVT_SHOW )
3086EVT_MAXIMIZE = wx.PyEventBinder( wxEVT_MAXIMIZE )
3087EVT_ICONIZE = wx.PyEventBinder( wxEVT_ICONIZE )
3088EVT_NAVIGATION_KEY = wx.PyEventBinder( wxEVT_NAVIGATION_KEY )
3089EVT_PALETTE_CHANGED = wx.PyEventBinder( wxEVT_PALETTE_CHANGED )
3090EVT_QUERY_NEW_PALETTE = wx.PyEventBinder( wxEVT_QUERY_NEW_PALETTE )
3091EVT_WINDOW_CREATE = wx.PyEventBinder( wxEVT_CREATE )
3092EVT_WINDOW_DESTROY = wx.PyEventBinder( wxEVT_DESTROY )
3093EVT_SET_CURSOR = wx.PyEventBinder( wxEVT_SET_CURSOR )
3094EVT_MOUSE_CAPTURE_CHANGED = wx.PyEventBinder( wxEVT_MOUSE_CAPTURE_CHANGED )
3095
3096EVT_LEFT_DOWN = wx.PyEventBinder( wxEVT_LEFT_DOWN )
3097EVT_LEFT_UP = wx.PyEventBinder( wxEVT_LEFT_UP )
3098EVT_MIDDLE_DOWN = wx.PyEventBinder( wxEVT_MIDDLE_DOWN )
3099EVT_MIDDLE_UP = wx.PyEventBinder( wxEVT_MIDDLE_UP )
3100EVT_RIGHT_DOWN = wx.PyEventBinder( wxEVT_RIGHT_DOWN )
3101EVT_RIGHT_UP = wx.PyEventBinder( wxEVT_RIGHT_UP )
3102EVT_MOTION = wx.PyEventBinder( wxEVT_MOTION )
3103EVT_LEFT_DCLICK = wx.PyEventBinder( wxEVT_LEFT_DCLICK )
3104EVT_MIDDLE_DCLICK = wx.PyEventBinder( wxEVT_MIDDLE_DCLICK )
3105EVT_RIGHT_DCLICK = wx.PyEventBinder( wxEVT_RIGHT_DCLICK )
3106EVT_LEAVE_WINDOW = wx.PyEventBinder( wxEVT_LEAVE_WINDOW )
3107EVT_ENTER_WINDOW = wx.PyEventBinder( wxEVT_ENTER_WINDOW )
3108EVT_MOUSEWHEEL = wx.PyEventBinder( wxEVT_MOUSEWHEEL )
3109
3110EVT_MOUSE_EVENTS = wx.PyEventBinder([ wxEVT_LEFT_DOWN,
3111 wxEVT_LEFT_UP,
3112 wxEVT_MIDDLE_DOWN,
3113 wxEVT_MIDDLE_UP,
3114 wxEVT_RIGHT_DOWN,
3115 wxEVT_RIGHT_UP,
3116 wxEVT_MOTION,
3117 wxEVT_LEFT_DCLICK,
3118 wxEVT_MIDDLE_DCLICK,
3119 wxEVT_RIGHT_DCLICK,
3120 wxEVT_ENTER_WINDOW,
3121 wxEVT_LEAVE_WINDOW,
3122 wxEVT_MOUSEWHEEL
3123 ])
3124
3125
3126# Scrolling from wxWindow (sent to wxScrolledWindow)
3127EVT_SCROLLWIN = wx.PyEventBinder([ wxEVT_SCROLLWIN_TOP,
3128 wxEVT_SCROLLWIN_BOTTOM,
3129 wxEVT_SCROLLWIN_LINEUP,
3130 wxEVT_SCROLLWIN_LINEDOWN,
3131 wxEVT_SCROLLWIN_PAGEUP,
3132 wxEVT_SCROLLWIN_PAGEDOWN,
3133 wxEVT_SCROLLWIN_THUMBTRACK,
3134 wxEVT_SCROLLWIN_THUMBRELEASE,
3135 ])
3136
3137EVT_SCROLLWIN_TOP = wx.PyEventBinder( wxEVT_SCROLLWIN_TOP )
3138EVT_SCROLLWIN_BOTTOM = wx.PyEventBinder( wxEVT_SCROLLWIN_BOTTOM )
3139EVT_SCROLLWIN_LINEUP = wx.PyEventBinder( wxEVT_SCROLLWIN_LINEUP )
3140EVT_SCROLLWIN_LINEDOWN = wx.PyEventBinder( wxEVT_SCROLLWIN_LINEDOWN )
3141EVT_SCROLLWIN_PAGEUP = wx.PyEventBinder( wxEVT_SCROLLWIN_PAGEUP )
3142EVT_SCROLLWIN_PAGEDOWN = wx.PyEventBinder( wxEVT_SCROLLWIN_PAGEDOWN )
3143EVT_SCROLLWIN_THUMBTRACK = wx.PyEventBinder( wxEVT_SCROLLWIN_THUMBTRACK )
3144EVT_SCROLLWIN_THUMBRELEASE = wx.PyEventBinder( wxEVT_SCROLLWIN_THUMBRELEASE )
3145
3146# Scrolling from wxSlider and wxScrollBar
3147EVT_SCROLL = wx.PyEventBinder([ wxEVT_SCROLL_TOP,
3148 wxEVT_SCROLL_BOTTOM,
3149 wxEVT_SCROLL_LINEUP,
3150 wxEVT_SCROLL_LINEDOWN,
3151 wxEVT_SCROLL_PAGEUP,
3152 wxEVT_SCROLL_PAGEDOWN,
3153 wxEVT_SCROLL_THUMBTRACK,
3154 wxEVT_SCROLL_THUMBRELEASE,
3155 wxEVT_SCROLL_ENDSCROLL,
3156 ])
3157
3158EVT_SCROLL_TOP = wx.PyEventBinder( wxEVT_SCROLL_TOP )
3159EVT_SCROLL_BOTTOM = wx.PyEventBinder( wxEVT_SCROLL_BOTTOM )
3160EVT_SCROLL_LINEUP = wx.PyEventBinder( wxEVT_SCROLL_LINEUP )
3161EVT_SCROLL_LINEDOWN = wx.PyEventBinder( wxEVT_SCROLL_LINEDOWN )
3162EVT_SCROLL_PAGEUP = wx.PyEventBinder( wxEVT_SCROLL_PAGEUP )
3163EVT_SCROLL_PAGEDOWN = wx.PyEventBinder( wxEVT_SCROLL_PAGEDOWN )
3164EVT_SCROLL_THUMBTRACK = wx.PyEventBinder( wxEVT_SCROLL_THUMBTRACK )
3165EVT_SCROLL_THUMBRELEASE = wx.PyEventBinder( wxEVT_SCROLL_THUMBRELEASE )
3166EVT_SCROLL_ENDSCROLL = wx.PyEventBinder( wxEVT_SCROLL_ENDSCROLL )
3167
3168# Scrolling from wxSlider and wxScrollBar, with an id
3169EVT_COMMAND_SCROLL = wx.PyEventBinder([ wxEVT_SCROLL_TOP,
3170 wxEVT_SCROLL_BOTTOM,
3171 wxEVT_SCROLL_LINEUP,
3172 wxEVT_SCROLL_LINEDOWN,
3173 wxEVT_SCROLL_PAGEUP,
3174 wxEVT_SCROLL_PAGEDOWN,
3175 wxEVT_SCROLL_THUMBTRACK,
3176 wxEVT_SCROLL_THUMBRELEASE,
3177 wxEVT_SCROLL_ENDSCROLL,
3178 ], 1)
3179
3180EVT_COMMAND_SCROLL_TOP = wx.PyEventBinder( wxEVT_SCROLL_TOP, 1)
3181EVT_COMMAND_SCROLL_BOTTOM = wx.PyEventBinder( wxEVT_SCROLL_BOTTOM, 1)
3182EVT_COMMAND_SCROLL_LINEUP = wx.PyEventBinder( wxEVT_SCROLL_LINEUP, 1)
3183EVT_COMMAND_SCROLL_LINEDOWN = wx.PyEventBinder( wxEVT_SCROLL_LINEDOWN, 1)
3184EVT_COMMAND_SCROLL_PAGEUP = wx.PyEventBinder( wxEVT_SCROLL_PAGEUP, 1)
3185EVT_COMMAND_SCROLL_PAGEDOWN = wx.PyEventBinder( wxEVT_SCROLL_PAGEDOWN, 1)
3186EVT_COMMAND_SCROLL_THUMBTRACK = wx.PyEventBinder( wxEVT_SCROLL_THUMBTRACK, 1)
3187EVT_COMMAND_SCROLL_THUMBRELEASE = wx.PyEventBinder( wxEVT_SCROLL_THUMBRELEASE, 1)
3188EVT_COMMAND_SCROLL_ENDSCROLL = wx.PyEventBinder( wxEVT_SCROLL_ENDSCROLL, 1)
3189
3190EVT_BUTTON = wx.PyEventBinder( wxEVT_COMMAND_BUTTON_CLICKED, 1)
3191EVT_CHECKBOX = wx.PyEventBinder( wxEVT_COMMAND_CHECKBOX_CLICKED, 1)
3192EVT_CHOICE = wx.PyEventBinder( wxEVT_COMMAND_CHOICE_SELECTED, 1)
3193EVT_LISTBOX = wx.PyEventBinder( wxEVT_COMMAND_LISTBOX_SELECTED, 1)
3194EVT_LISTBOX_DCLICK = wx.PyEventBinder( wxEVT_COMMAND_LISTBOX_DOUBLECLICKED, 1)
3195EVT_MENU = wx.PyEventBinder( wxEVT_COMMAND_MENU_SELECTED, 1)
3196EVT_MENU_RANGE = wx.PyEventBinder( wxEVT_COMMAND_MENU_SELECTED, 2)
3197EVT_SLIDER = wx.PyEventBinder( wxEVT_COMMAND_SLIDER_UPDATED, 1)
3198EVT_RADIOBOX = wx.PyEventBinder( wxEVT_COMMAND_RADIOBOX_SELECTED, 1)
3199EVT_RADIOBUTTON = wx.PyEventBinder( wxEVT_COMMAND_RADIOBUTTON_SELECTED, 1)
3200
3201EVT_SCROLLBAR = wx.PyEventBinder( wxEVT_COMMAND_SCROLLBAR_UPDATED, 1)
3202EVT_VLBOX = wx.PyEventBinder( wxEVT_COMMAND_VLBOX_SELECTED, 1)
3203EVT_COMBOBOX = wx.PyEventBinder( wxEVT_COMMAND_COMBOBOX_SELECTED, 1)
3204EVT_TOOL = wx.PyEventBinder( wxEVT_COMMAND_TOOL_CLICKED, 1)
3205EVT_TOOL_RANGE = wx.PyEventBinder( wxEVT_COMMAND_TOOL_CLICKED, 2)
3206EVT_TOOL_RCLICKED = wx.PyEventBinder( wxEVT_COMMAND_TOOL_RCLICKED, 1)
3207EVT_TOOL_RCLICKED_RANGE = wx.PyEventBinder( wxEVT_COMMAND_TOOL_RCLICKED, 2)
3208EVT_TOOL_ENTER = wx.PyEventBinder( wxEVT_COMMAND_TOOL_ENTER, 1)
3209EVT_CHECKLISTBOX = wx.PyEventBinder( wxEVT_COMMAND_CHECKLISTBOX_TOGGLED, 1)
3210
3211
3212EVT_COMMAND_LEFT_CLICK = wx.PyEventBinder( wxEVT_COMMAND_LEFT_CLICK, 1)
3213EVT_COMMAND_LEFT_DCLICK = wx.PyEventBinder( wxEVT_COMMAND_LEFT_DCLICK, 1)
3214EVT_COMMAND_RIGHT_CLICK = wx.PyEventBinder( wxEVT_COMMAND_RIGHT_CLICK, 1)
3215EVT_COMMAND_RIGHT_DCLICK = wx.PyEventBinder( wxEVT_COMMAND_RIGHT_DCLICK, 1)
3216EVT_COMMAND_SET_FOCUS = wx.PyEventBinder( wxEVT_COMMAND_SET_FOCUS, 1)
3217EVT_COMMAND_KILL_FOCUS = wx.PyEventBinder( wxEVT_COMMAND_KILL_FOCUS, 1)
3218EVT_COMMAND_ENTER = wx.PyEventBinder( wxEVT_COMMAND_ENTER, 1)
3219
3220EVT_IDLE = wx.PyEventBinder( wxEVT_IDLE )
3221
3222EVT_UPDATE_UI = wx.PyEventBinder( wxEVT_UPDATE_UI, 1)
3223EVT_UPDATE_UI_RANGE = wx.PyEventBinder( wxEVT_UPDATE_UI, 2)
3224
3225EVT_CONTEXT_MENU = wx.PyEventBinder( wxEVT_CONTEXT_MENU )
3226
3227
3228
3229#---------------------------------------------------------------------------
3230
3231class Event(Object):
3232 """Proxy of C++ Event class"""
3233 def __init__(self): raise RuntimeError, "No constructor defined"
3234 def __repr__(self):
3235 return "<%s.%s; proxy of C++ wxEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
3236 def __del__(self, destroy=_core_.delete_Event):
3237 """__del__(self)"""
3238 try:
3239 if self.thisown: destroy(self)
3240 except: pass
3241
3242 def SetEventType(*args, **kwargs):
3243 """SetEventType(self, wxEventType typ)"""
3244 return _core_.Event_SetEventType(*args, **kwargs)
3245
3246 def GetEventType(*args, **kwargs):
3247 """GetEventType(self) -> wxEventType"""
3248 return _core_.Event_GetEventType(*args, **kwargs)
3249
3250 def GetEventObject(*args, **kwargs):
3251 """GetEventObject(self) -> Object"""
3252 return _core_.Event_GetEventObject(*args, **kwargs)
3253
3254 def SetEventObject(*args, **kwargs):
3255 """SetEventObject(self, Object obj)"""
3256 return _core_.Event_SetEventObject(*args, **kwargs)
3257
3258 def GetTimestamp(*args, **kwargs):
3259 """GetTimestamp(self) -> long"""
3260 return _core_.Event_GetTimestamp(*args, **kwargs)
3261
3262 def SetTimestamp(*args, **kwargs):
3263 """SetTimestamp(self, long ts=0)"""
3264 return _core_.Event_SetTimestamp(*args, **kwargs)
3265
3266 def GetId(*args, **kwargs):
3267 """GetId(self) -> int"""
3268 return _core_.Event_GetId(*args, **kwargs)
3269
3270 def SetId(*args, **kwargs):
3271 """SetId(self, int Id)"""
3272 return _core_.Event_SetId(*args, **kwargs)
3273
3274 def IsCommandEvent(*args, **kwargs):
3275 """IsCommandEvent(self) -> bool"""
3276 return _core_.Event_IsCommandEvent(*args, **kwargs)
3277
3278 def Skip(*args, **kwargs):
3279 """Skip(self, bool skip=True)"""
3280 return _core_.Event_Skip(*args, **kwargs)
3281
3282 def GetSkipped(*args, **kwargs):
3283 """GetSkipped(self) -> bool"""
3284 return _core_.Event_GetSkipped(*args, **kwargs)
3285
3286 def ShouldPropagate(*args, **kwargs):
3287 """ShouldPropagate(self) -> bool"""
3288 return _core_.Event_ShouldPropagate(*args, **kwargs)
3289
3290 def StopPropagation(*args, **kwargs):
3291 """StopPropagation(self) -> int"""
3292 return _core_.Event_StopPropagation(*args, **kwargs)
3293
3294 def ResumePropagation(*args, **kwargs):
3295 """ResumePropagation(self, int propagationLevel)"""
3296 return _core_.Event_ResumePropagation(*args, **kwargs)
3297
3298 def Clone(*args, **kwargs):
3299 """Clone(self) -> Event"""
3300 return _core_.Event_Clone(*args, **kwargs)
3301
3302
3303class EventPtr(Event):
3304 def __init__(self, this):
3305 self.this = this
3306 if not hasattr(self,"thisown"): self.thisown = 0
3307 self.__class__ = Event
3308_core_.Event_swigregister(EventPtr)
3309
3310#---------------------------------------------------------------------------
3311
3312class PropagationDisabler(object):
3313 """Proxy of C++ PropagationDisabler class"""
3314 def __repr__(self):
3315 return "<%s.%s; proxy of C++ wxPropagationDisabler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
3316 def __init__(self, *args, **kwargs):
3317 """__init__(self, Event event) -> PropagationDisabler"""
3318 newobj = _core_.new_PropagationDisabler(*args, **kwargs)
3319 self.this = newobj.this
3320 self.thisown = 1
3321 del newobj.thisown
3322 def __del__(self, destroy=_core_.delete_PropagationDisabler):
3323 """__del__(self)"""
3324 try:
3325 if self.thisown: destroy(self)
3326 except: pass
3327
3328
3329class PropagationDisablerPtr(PropagationDisabler):
3330 def __init__(self, this):
3331 self.this = this
3332 if not hasattr(self,"thisown"): self.thisown = 0
3333 self.__class__ = PropagationDisabler
3334_core_.PropagationDisabler_swigregister(PropagationDisablerPtr)
3335
3336class PropagateOnce(object):
3337 """Proxy of C++ PropagateOnce class"""
3338 def __repr__(self):
3339 return "<%s.%s; proxy of C++ wxPropagateOnce instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
3340 def __init__(self, *args, **kwargs):
3341 """__init__(self, Event event) -> PropagateOnce"""
3342 newobj = _core_.new_PropagateOnce(*args, **kwargs)
3343 self.this = newobj.this
3344 self.thisown = 1
3345 del newobj.thisown
3346 def __del__(self, destroy=_core_.delete_PropagateOnce):
3347 """__del__(self)"""
3348 try:
3349 if self.thisown: destroy(self)
3350 except: pass
3351
3352
3353class PropagateOncePtr(PropagateOnce):
3354 def __init__(self, this):
3355 self.this = this
3356 if not hasattr(self,"thisown"): self.thisown = 0
3357 self.__class__ = PropagateOnce
3358_core_.PropagateOnce_swigregister(PropagateOncePtr)
3359
3360#---------------------------------------------------------------------------
3361
3362class CommandEvent(Event):
3363 """Proxy of C++ CommandEvent class"""
3364 def __repr__(self):
3365 return "<%s.%s; proxy of C++ wxCommandEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
3366 def __init__(self, *args, **kwargs):
3367 """__init__(self, wxEventType commandType=wxEVT_NULL, int winid=0) -> CommandEvent"""
3368 newobj = _core_.new_CommandEvent(*args, **kwargs)
3369 self.this = newobj.this
3370 self.thisown = 1
3371 del newobj.thisown
3372 def GetSelection(*args, **kwargs):
3373 """GetSelection(self) -> int"""
3374 return _core_.CommandEvent_GetSelection(*args, **kwargs)
3375
3376 def SetString(*args, **kwargs):
3377 """SetString(self, String s)"""
3378 return _core_.CommandEvent_SetString(*args, **kwargs)
3379
3380 def GetString(*args, **kwargs):
3381 """GetString(self) -> String"""
3382 return _core_.CommandEvent_GetString(*args, **kwargs)
3383
3384 def IsChecked(*args, **kwargs):
3385 """IsChecked(self) -> bool"""
3386 return _core_.CommandEvent_IsChecked(*args, **kwargs)
3387
3388 Checked = IsChecked
3389 def IsSelection(*args, **kwargs):
3390 """IsSelection(self) -> bool"""
3391 return _core_.CommandEvent_IsSelection(*args, **kwargs)
3392
3393 def SetExtraLong(*args, **kwargs):
3394 """SetExtraLong(self, long extraLong)"""
3395 return _core_.CommandEvent_SetExtraLong(*args, **kwargs)
3396
3397 def GetExtraLong(*args, **kwargs):
3398 """GetExtraLong(self) -> long"""
3399 return _core_.CommandEvent_GetExtraLong(*args, **kwargs)
3400
3401 def SetInt(*args, **kwargs):
3402 """SetInt(self, int i)"""
3403 return _core_.CommandEvent_SetInt(*args, **kwargs)
3404
3405 def GetInt(*args, **kwargs):
3406 """GetInt(self) -> long"""
3407 return _core_.CommandEvent_GetInt(*args, **kwargs)
3408
3409 def Clone(*args, **kwargs):
3410 """Clone(self) -> Event"""
3411 return _core_.CommandEvent_Clone(*args, **kwargs)
3412
3413
3414class CommandEventPtr(CommandEvent):
3415 def __init__(self, this):
3416 self.this = this
3417 if not hasattr(self,"thisown"): self.thisown = 0
3418 self.__class__ = CommandEvent
3419_core_.CommandEvent_swigregister(CommandEventPtr)
3420
3421#---------------------------------------------------------------------------
3422
3423class NotifyEvent(CommandEvent):
3424 """Proxy of C++ NotifyEvent class"""
3425 def __repr__(self):
3426 return "<%s.%s; proxy of C++ wxNotifyEvent 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) -> NotifyEvent"""
3429 newobj = _core_.new_NotifyEvent(*args, **kwargs)
3430 self.this = newobj.this
3431 self.thisown = 1
3432 del newobj.thisown
3433 def Veto(*args, **kwargs):
3434 """Veto(self)"""
3435 return _core_.NotifyEvent_Veto(*args, **kwargs)
3436
3437 def Allow(*args, **kwargs):
3438 """Allow(self)"""
3439 return _core_.NotifyEvent_Allow(*args, **kwargs)
3440
3441 def IsAllowed(*args, **kwargs):
3442 """IsAllowed(self) -> bool"""
3443 return _core_.NotifyEvent_IsAllowed(*args, **kwargs)
3444
3445
3446class NotifyEventPtr(NotifyEvent):
3447 def __init__(self, this):
3448 self.this = this
3449 if not hasattr(self,"thisown"): self.thisown = 0
3450 self.__class__ = NotifyEvent
3451_core_.NotifyEvent_swigregister(NotifyEventPtr)
3452
3453#---------------------------------------------------------------------------
3454
3455class ScrollEvent(CommandEvent):
3456 """Proxy of C++ ScrollEvent class"""
3457 def __repr__(self):
3458 return "<%s.%s; proxy of C++ wxScrollEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
3459 def __init__(self, *args, **kwargs):
3460 """
3461 __init__(self, wxEventType commandType=wxEVT_NULL, int winid=0, int pos=0,
3462 int orient=0) -> ScrollEvent
3463 """
3464 newobj = _core_.new_ScrollEvent(*args, **kwargs)
3465 self.this = newobj.this
3466 self.thisown = 1
3467 del newobj.thisown
3468 def GetOrientation(*args, **kwargs):
3469 """GetOrientation(self) -> int"""
3470 return _core_.ScrollEvent_GetOrientation(*args, **kwargs)
3471
3472 def GetPosition(*args, **kwargs):
3473 """GetPosition(self) -> int"""
3474 return _core_.ScrollEvent_GetPosition(*args, **kwargs)
3475
3476 def SetOrientation(*args, **kwargs):
3477 """SetOrientation(self, int orient)"""
3478 return _core_.ScrollEvent_SetOrientation(*args, **kwargs)
3479
3480 def SetPosition(*args, **kwargs):
3481 """SetPosition(self, int pos)"""
3482 return _core_.ScrollEvent_SetPosition(*args, **kwargs)
3483
3484
3485class ScrollEventPtr(ScrollEvent):
3486 def __init__(self, this):
3487 self.this = this
3488 if not hasattr(self,"thisown"): self.thisown = 0
3489 self.__class__ = ScrollEvent
3490_core_.ScrollEvent_swigregister(ScrollEventPtr)
3491
3492#---------------------------------------------------------------------------
3493
3494class ScrollWinEvent(Event):
3495 """Proxy of C++ ScrollWinEvent class"""
3496 def __repr__(self):
3497 return "<%s.%s; proxy of C++ wxScrollWinEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
3498 def __init__(self, *args, **kwargs):
3499 """__init__(self, wxEventType commandType=wxEVT_NULL, int pos=0, int orient=0) -> ScrollWinEvent"""
3500 newobj = _core_.new_ScrollWinEvent(*args, **kwargs)
3501 self.this = newobj.this
3502 self.thisown = 1
3503 del newobj.thisown
3504 def GetOrientation(*args, **kwargs):
3505 """GetOrientation(self) -> int"""
3506 return _core_.ScrollWinEvent_GetOrientation(*args, **kwargs)
3507
3508 def GetPosition(*args, **kwargs):
3509 """GetPosition(self) -> int"""
3510 return _core_.ScrollWinEvent_GetPosition(*args, **kwargs)
3511
3512 def SetOrientation(*args, **kwargs):
3513 """SetOrientation(self, int orient)"""
3514 return _core_.ScrollWinEvent_SetOrientation(*args, **kwargs)
3515
3516 def SetPosition(*args, **kwargs):
3517 """SetPosition(self, int pos)"""
3518 return _core_.ScrollWinEvent_SetPosition(*args, **kwargs)
3519
3520
3521class ScrollWinEventPtr(ScrollWinEvent):
3522 def __init__(self, this):
3523 self.this = this
3524 if not hasattr(self,"thisown"): self.thisown = 0
3525 self.__class__ = ScrollWinEvent
3526_core_.ScrollWinEvent_swigregister(ScrollWinEventPtr)
3527
3528#---------------------------------------------------------------------------
3529
3530MOUSE_BTN_ANY = _core_.MOUSE_BTN_ANY
3531MOUSE_BTN_NONE = _core_.MOUSE_BTN_NONE
3532MOUSE_BTN_LEFT = _core_.MOUSE_BTN_LEFT
3533MOUSE_BTN_MIDDLE = _core_.MOUSE_BTN_MIDDLE
3534MOUSE_BTN_RIGHT = _core_.MOUSE_BTN_RIGHT
3535class MouseEvent(Event):
3536 """Proxy of C++ MouseEvent class"""
3537 def __repr__(self):
3538 return "<%s.%s; proxy of C++ wxMouseEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
3539 def __init__(self, *args, **kwargs):
3540 """__init__(self, wxEventType mouseType=wxEVT_NULL) -> MouseEvent"""
3541 newobj = _core_.new_MouseEvent(*args, **kwargs)
3542 self.this = newobj.this
3543 self.thisown = 1
3544 del newobj.thisown
3545 def IsButton(*args, **kwargs):
3546 """IsButton(self) -> bool"""
3547 return _core_.MouseEvent_IsButton(*args, **kwargs)
3548
3549 def ButtonDown(*args, **kwargs):
3550 """ButtonDown(self, int but=MOUSE_BTN_ANY) -> bool"""
3551 return _core_.MouseEvent_ButtonDown(*args, **kwargs)
3552
3553 def ButtonDClick(*args, **kwargs):
3554 """ButtonDClick(self, int but=MOUSE_BTN_ANY) -> bool"""
3555 return _core_.MouseEvent_ButtonDClick(*args, **kwargs)
3556
3557 def ButtonUp(*args, **kwargs):
3558 """ButtonUp(self, int but=MOUSE_BTN_ANY) -> bool"""
3559 return _core_.MouseEvent_ButtonUp(*args, **kwargs)
3560
3561 def Button(*args, **kwargs):
3562 """Button(self, int but) -> bool"""
3563 return _core_.MouseEvent_Button(*args, **kwargs)
3564
3565 def ButtonIsDown(*args, **kwargs):
3566 """ButtonIsDown(self, int but) -> bool"""
3567 return _core_.MouseEvent_ButtonIsDown(*args, **kwargs)
3568
3569 def GetButton(*args, **kwargs):
3570 """GetButton(self) -> int"""
3571 return _core_.MouseEvent_GetButton(*args, **kwargs)
3572
3573 def ControlDown(*args, **kwargs):
3574 """ControlDown(self) -> bool"""
3575 return _core_.MouseEvent_ControlDown(*args, **kwargs)
3576
3577 def MetaDown(*args, **kwargs):
3578 """MetaDown(self) -> bool"""
3579 return _core_.MouseEvent_MetaDown(*args, **kwargs)
3580
3581 def AltDown(*args, **kwargs):
3582 """AltDown(self) -> bool"""
3583 return _core_.MouseEvent_AltDown(*args, **kwargs)
3584
3585 def ShiftDown(*args, **kwargs):
3586 """ShiftDown(self) -> bool"""
3587 return _core_.MouseEvent_ShiftDown(*args, **kwargs)
3588
3589 def CmdDown(*args, **kwargs):
3590 """
3591 CmdDown(self) -> bool
3592
3593 "Cmd" is a pseudo key which is the same as Control for PC and Unix
3594 platforms but the special "Apple" (a.k.a as "Command") key on
3595 Macs: it makes often sense to use it instead of, say, `ControlDown`
3596 because Cmd key is used for the same thing under Mac as Ctrl
3597 elsewhere. The Ctrl still exists, it's just not used for this
3598 purpose. So for non-Mac platforms this is the same as `ControlDown`
3599 and Macs this is the same as `MetaDown`.
3600 """
3601 return _core_.MouseEvent_CmdDown(*args, **kwargs)
3602
3603 def LeftDown(*args, **kwargs):
3604 """LeftDown(self) -> bool"""
3605 return _core_.MouseEvent_LeftDown(*args, **kwargs)
3606
3607 def MiddleDown(*args, **kwargs):
3608 """MiddleDown(self) -> bool"""
3609 return _core_.MouseEvent_MiddleDown(*args, **kwargs)
3610
3611 def RightDown(*args, **kwargs):
3612 """RightDown(self) -> bool"""
3613 return _core_.MouseEvent_RightDown(*args, **kwargs)
3614
3615 def LeftUp(*args, **kwargs):
3616 """LeftUp(self) -> bool"""
3617 return _core_.MouseEvent_LeftUp(*args, **kwargs)
3618
3619 def MiddleUp(*args, **kwargs):
3620 """MiddleUp(self) -> bool"""
3621 return _core_.MouseEvent_MiddleUp(*args, **kwargs)
3622
3623 def RightUp(*args, **kwargs):
3624 """RightUp(self) -> bool"""
3625 return _core_.MouseEvent_RightUp(*args, **kwargs)
3626
3627 def LeftDClick(*args, **kwargs):
3628 """LeftDClick(self) -> bool"""
3629 return _core_.MouseEvent_LeftDClick(*args, **kwargs)
3630
3631 def MiddleDClick(*args, **kwargs):
3632 """MiddleDClick(self) -> bool"""
3633 return _core_.MouseEvent_MiddleDClick(*args, **kwargs)
3634
3635 def RightDClick(*args, **kwargs):
3636 """RightDClick(self) -> bool"""
3637 return _core_.MouseEvent_RightDClick(*args, **kwargs)
3638
3639 def LeftIsDown(*args, **kwargs):
3640 """LeftIsDown(self) -> bool"""
3641 return _core_.MouseEvent_LeftIsDown(*args, **kwargs)
3642
3643 def MiddleIsDown(*args, **kwargs):
3644 """MiddleIsDown(self) -> bool"""
3645 return _core_.MouseEvent_MiddleIsDown(*args, **kwargs)
3646
3647 def RightIsDown(*args, **kwargs):
3648 """RightIsDown(self) -> bool"""
3649 return _core_.MouseEvent_RightIsDown(*args, **kwargs)
3650
3651 def Dragging(*args, **kwargs):
3652 """Dragging(self) -> bool"""
3653 return _core_.MouseEvent_Dragging(*args, **kwargs)
3654
3655 def Moving(*args, **kwargs):
3656 """Moving(self) -> bool"""
3657 return _core_.MouseEvent_Moving(*args, **kwargs)
3658
3659 def Entering(*args, **kwargs):
3660 """Entering(self) -> bool"""
3661 return _core_.MouseEvent_Entering(*args, **kwargs)
3662
3663 def Leaving(*args, **kwargs):
3664 """Leaving(self) -> bool"""
3665 return _core_.MouseEvent_Leaving(*args, **kwargs)
3666
3667 def GetPosition(*args, **kwargs):
3668 """
3669 GetPosition(self) -> Point
3670
3671 Returns the position of the mouse in window coordinates when the event
3672 happened.
3673 """
3674 return _core_.MouseEvent_GetPosition(*args, **kwargs)
3675
3676 def GetPositionTuple(*args, **kwargs):
3677 """
3678 GetPositionTuple() -> (x,y)
3679
3680 Returns the position of the mouse in window coordinates when the event
3681 happened.
3682 """
3683 return _core_.MouseEvent_GetPositionTuple(*args, **kwargs)
3684
3685 def GetLogicalPosition(*args, **kwargs):
3686 """GetLogicalPosition(self, DC dc) -> Point"""
3687 return _core_.MouseEvent_GetLogicalPosition(*args, **kwargs)
3688
3689 def GetX(*args, **kwargs):
3690 """GetX(self) -> int"""
3691 return _core_.MouseEvent_GetX(*args, **kwargs)
3692
3693 def GetY(*args, **kwargs):
3694 """GetY(self) -> int"""
3695 return _core_.MouseEvent_GetY(*args, **kwargs)
3696
3697 def GetWheelRotation(*args, **kwargs):
3698 """GetWheelRotation(self) -> int"""
3699 return _core_.MouseEvent_GetWheelRotation(*args, **kwargs)
3700
3701 def GetWheelDelta(*args, **kwargs):
3702 """GetWheelDelta(self) -> int"""
3703 return _core_.MouseEvent_GetWheelDelta(*args, **kwargs)
3704
3705 def GetLinesPerAction(*args, **kwargs):
3706 """GetLinesPerAction(self) -> int"""
3707 return _core_.MouseEvent_GetLinesPerAction(*args, **kwargs)
3708
3709 def IsPageScroll(*args, **kwargs):
3710 """IsPageScroll(self) -> bool"""
3711 return _core_.MouseEvent_IsPageScroll(*args, **kwargs)
3712
3713 m_x = property(_core_.MouseEvent_m_x_get, _core_.MouseEvent_m_x_set)
3714 m_y = property(_core_.MouseEvent_m_y_get, _core_.MouseEvent_m_y_set)
3715 m_leftDown = property(_core_.MouseEvent_m_leftDown_get, _core_.MouseEvent_m_leftDown_set)
3716 m_middleDown = property(_core_.MouseEvent_m_middleDown_get, _core_.MouseEvent_m_middleDown_set)
3717 m_rightDown = property(_core_.MouseEvent_m_rightDown_get, _core_.MouseEvent_m_rightDown_set)
3718 m_controlDown = property(_core_.MouseEvent_m_controlDown_get, _core_.MouseEvent_m_controlDown_set)
3719 m_shiftDown = property(_core_.MouseEvent_m_shiftDown_get, _core_.MouseEvent_m_shiftDown_set)
3720 m_altDown = property(_core_.MouseEvent_m_altDown_get, _core_.MouseEvent_m_altDown_set)
3721 m_metaDown = property(_core_.MouseEvent_m_metaDown_get, _core_.MouseEvent_m_metaDown_set)
3722 m_wheelRotation = property(_core_.MouseEvent_m_wheelRotation_get, _core_.MouseEvent_m_wheelRotation_set)
3723 m_wheelDelta = property(_core_.MouseEvent_m_wheelDelta_get, _core_.MouseEvent_m_wheelDelta_set)
3724 m_linesPerAction = property(_core_.MouseEvent_m_linesPerAction_get, _core_.MouseEvent_m_linesPerAction_set)
3725
3726class MouseEventPtr(MouseEvent):
3727 def __init__(self, this):
3728 self.this = this
3729 if not hasattr(self,"thisown"): self.thisown = 0
3730 self.__class__ = MouseEvent
3731_core_.MouseEvent_swigregister(MouseEventPtr)
3732
3733#---------------------------------------------------------------------------
3734
3735class SetCursorEvent(Event):
3736 """Proxy of C++ SetCursorEvent class"""
3737 def __repr__(self):
3738 return "<%s.%s; proxy of C++ wxSetCursorEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
3739 def __init__(self, *args, **kwargs):
3740 """__init__(self, int x=0, int y=0) -> SetCursorEvent"""
3741 newobj = _core_.new_SetCursorEvent(*args, **kwargs)
3742 self.this = newobj.this
3743 self.thisown = 1
3744 del newobj.thisown
3745 def GetX(*args, **kwargs):
3746 """GetX(self) -> int"""
3747 return _core_.SetCursorEvent_GetX(*args, **kwargs)
3748
3749 def GetY(*args, **kwargs):
3750 """GetY(self) -> int"""
3751 return _core_.SetCursorEvent_GetY(*args, **kwargs)
3752
3753 def SetCursor(*args, **kwargs):
3754 """SetCursor(self, Cursor cursor)"""
3755 return _core_.SetCursorEvent_SetCursor(*args, **kwargs)
3756
3757 def GetCursor(*args, **kwargs):
3758 """GetCursor(self) -> Cursor"""
3759 return _core_.SetCursorEvent_GetCursor(*args, **kwargs)
3760
3761 def HasCursor(*args, **kwargs):
3762 """HasCursor(self) -> bool"""
3763 return _core_.SetCursorEvent_HasCursor(*args, **kwargs)
3764
3765
3766class SetCursorEventPtr(SetCursorEvent):
3767 def __init__(self, this):
3768 self.this = this
3769 if not hasattr(self,"thisown"): self.thisown = 0
3770 self.__class__ = SetCursorEvent
3771_core_.SetCursorEvent_swigregister(SetCursorEventPtr)
3772
3773#---------------------------------------------------------------------------
3774
3775class KeyEvent(Event):
3776 """Proxy of C++ KeyEvent class"""
3777 def __repr__(self):
3778 return "<%s.%s; proxy of C++ wxKeyEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
3779 def __init__(self, *args, **kwargs):
3780 """__init__(self, wxEventType keyType=wxEVT_NULL) -> KeyEvent"""
3781 newobj = _core_.new_KeyEvent(*args, **kwargs)
3782 self.this = newobj.this
3783 self.thisown = 1
3784 del newobj.thisown
3785 def ControlDown(*args, **kwargs):
3786 """ControlDown(self) -> bool"""
3787 return _core_.KeyEvent_ControlDown(*args, **kwargs)
3788
3789 def MetaDown(*args, **kwargs):
3790 """MetaDown(self) -> bool"""
3791 return _core_.KeyEvent_MetaDown(*args, **kwargs)
3792
3793 def AltDown(*args, **kwargs):
3794 """AltDown(self) -> bool"""
3795 return _core_.KeyEvent_AltDown(*args, **kwargs)
3796
3797 def ShiftDown(*args, **kwargs):
3798 """ShiftDown(self) -> bool"""
3799 return _core_.KeyEvent_ShiftDown(*args, **kwargs)
3800
3801 def CmdDown(*args, **kwargs):
3802 """
3803 CmdDown(self) -> bool
3804
3805 "Cmd" is a pseudo key which is the same as Control for PC and Unix
3806 platforms but the special "Apple" (a.k.a as "Command") key on
3807 Macs: it makes often sense to use it instead of, say, `ControlDown`
3808 because Cmd key is used for the same thing under Mac as Ctrl
3809 elsewhere. The Ctrl still exists, it's just not used for this
3810 purpose. So for non-Mac platforms this is the same as `ControlDown`
3811 and Macs this is the same as `MetaDown`.
3812 """
3813 return _core_.KeyEvent_CmdDown(*args, **kwargs)
3814
3815 def HasModifiers(*args, **kwargs):
3816 """HasModifiers(self) -> bool"""
3817 return _core_.KeyEvent_HasModifiers(*args, **kwargs)
3818
3819 def GetKeyCode(*args, **kwargs):
3820 """GetKeyCode(self) -> int"""
3821 return _core_.KeyEvent_GetKeyCode(*args, **kwargs)
3822
3823 KeyCode = GetKeyCode
3824 def GetUnicodeKey(*args, **kwargs):
3825 """GetUnicodeKey(self) -> int"""
3826 return _core_.KeyEvent_GetUnicodeKey(*args, **kwargs)
3827
3828 GetUniChar = GetUnicodeKey
3829 def GetRawKeyCode(*args, **kwargs):
3830 """GetRawKeyCode(self) -> unsigned int"""
3831 return _core_.KeyEvent_GetRawKeyCode(*args, **kwargs)
3832
3833 def GetRawKeyFlags(*args, **kwargs):
3834 """GetRawKeyFlags(self) -> unsigned int"""
3835 return _core_.KeyEvent_GetRawKeyFlags(*args, **kwargs)
3836
3837 def GetPosition(*args, **kwargs):
3838 """
3839 GetPosition(self) -> Point
3840
3841 Find the position of the event.
3842 """
3843 return _core_.KeyEvent_GetPosition(*args, **kwargs)
3844
3845 def GetPositionTuple(*args, **kwargs):
3846 """
3847 GetPositionTuple() -> (x,y)
3848
3849 Find the position of the event.
3850 """
3851 return _core_.KeyEvent_GetPositionTuple(*args, **kwargs)
3852
3853 def GetX(*args, **kwargs):
3854 """GetX(self) -> int"""
3855 return _core_.KeyEvent_GetX(*args, **kwargs)
3856
3857 def GetY(*args, **kwargs):
3858 """GetY(self) -> int"""
3859 return _core_.KeyEvent_GetY(*args, **kwargs)
3860
3861 m_x = property(_core_.KeyEvent_m_x_get, _core_.KeyEvent_m_x_set)
3862 m_y = property(_core_.KeyEvent_m_y_get, _core_.KeyEvent_m_y_set)
3863 m_keyCode = property(_core_.KeyEvent_m_keyCode_get, _core_.KeyEvent_m_keyCode_set)
3864 m_controlDown = property(_core_.KeyEvent_m_controlDown_get, _core_.KeyEvent_m_controlDown_set)
3865 m_shiftDown = property(_core_.KeyEvent_m_shiftDown_get, _core_.KeyEvent_m_shiftDown_set)
3866 m_altDown = property(_core_.KeyEvent_m_altDown_get, _core_.KeyEvent_m_altDown_set)
3867 m_metaDown = property(_core_.KeyEvent_m_metaDown_get, _core_.KeyEvent_m_metaDown_set)
3868 m_scanCode = property(_core_.KeyEvent_m_scanCode_get, _core_.KeyEvent_m_scanCode_set)
3869 m_rawCode = property(_core_.KeyEvent_m_rawCode_get, _core_.KeyEvent_m_rawCode_set)
3870 m_rawFlags = property(_core_.KeyEvent_m_rawFlags_get, _core_.KeyEvent_m_rawFlags_set)
3871
3872class KeyEventPtr(KeyEvent):
3873 def __init__(self, this):
3874 self.this = this
3875 if not hasattr(self,"thisown"): self.thisown = 0
3876 self.__class__ = KeyEvent
3877_core_.KeyEvent_swigregister(KeyEventPtr)
3878
3879#---------------------------------------------------------------------------
3880
3881class SizeEvent(Event):
3882 """Proxy of C++ SizeEvent class"""
3883 def __repr__(self):
3884 return "<%s.%s; proxy of C++ wxSizeEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
3885 def __init__(self, *args, **kwargs):
3886 """__init__(self, Size sz=DefaultSize, int winid=0) -> SizeEvent"""
3887 newobj = _core_.new_SizeEvent(*args, **kwargs)
3888 self.this = newobj.this
3889 self.thisown = 1
3890 del newobj.thisown
3891 def GetSize(*args, **kwargs):
3892 """GetSize(self) -> Size"""
3893 return _core_.SizeEvent_GetSize(*args, **kwargs)
3894
3895 def GetRect(*args, **kwargs):
3896 """GetRect(self) -> Rect"""
3897 return _core_.SizeEvent_GetRect(*args, **kwargs)
3898
3899 def SetRect(*args, **kwargs):
3900 """SetRect(self, Rect rect)"""
3901 return _core_.SizeEvent_SetRect(*args, **kwargs)
3902
3903 def SetSize(*args, **kwargs):
3904 """SetSize(self, Size size)"""
3905 return _core_.SizeEvent_SetSize(*args, **kwargs)
3906
3907 m_size = property(_core_.SizeEvent_m_size_get, _core_.SizeEvent_m_size_set)
3908 m_rect = property(_core_.SizeEvent_m_rect_get, _core_.SizeEvent_m_rect_set)
3909
3910class SizeEventPtr(SizeEvent):
3911 def __init__(self, this):
3912 self.this = this
3913 if not hasattr(self,"thisown"): self.thisown = 0
3914 self.__class__ = SizeEvent
3915_core_.SizeEvent_swigregister(SizeEventPtr)
3916
3917#---------------------------------------------------------------------------
3918
3919class MoveEvent(Event):
3920 """Proxy of C++ MoveEvent class"""
3921 def __repr__(self):
3922 return "<%s.%s; proxy of C++ wxMoveEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
3923 def __init__(self, *args, **kwargs):
3924 """__init__(self, Point pos=DefaultPosition, int winid=0) -> MoveEvent"""
3925 newobj = _core_.new_MoveEvent(*args, **kwargs)
3926 self.this = newobj.this
3927 self.thisown = 1
3928 del newobj.thisown
3929 def GetPosition(*args, **kwargs):
3930 """GetPosition(self) -> Point"""
3931 return _core_.MoveEvent_GetPosition(*args, **kwargs)
3932
3933 def GetRect(*args, **kwargs):
3934 """GetRect(self) -> Rect"""
3935 return _core_.MoveEvent_GetRect(*args, **kwargs)
3936
3937 def SetRect(*args, **kwargs):
3938 """SetRect(self, Rect rect)"""
3939 return _core_.MoveEvent_SetRect(*args, **kwargs)
3940
3941 def SetPosition(*args, **kwargs):
3942 """SetPosition(self, Point pos)"""
3943 return _core_.MoveEvent_SetPosition(*args, **kwargs)
3944
3945 m_pos = property(_core_.MoveEvent_m_pos_get, _core_.MoveEvent_m_pos_set)
3946 m_rect = property(_core_.MoveEvent_m_rect_get, _core_.MoveEvent_m_rect_set)
3947
3948class MoveEventPtr(MoveEvent):
3949 def __init__(self, this):
3950 self.this = this
3951 if not hasattr(self,"thisown"): self.thisown = 0
3952 self.__class__ = MoveEvent
3953_core_.MoveEvent_swigregister(MoveEventPtr)
3954
3955#---------------------------------------------------------------------------
3956
3957class PaintEvent(Event):
3958 """Proxy of C++ PaintEvent class"""
3959 def __repr__(self):
3960 return "<%s.%s; proxy of C++ wxPaintEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
3961 def __init__(self, *args, **kwargs):
3962 """__init__(self, int Id=0) -> PaintEvent"""
3963 newobj = _core_.new_PaintEvent(*args, **kwargs)
3964 self.this = newobj.this
3965 self.thisown = 1
3966 del newobj.thisown
3967
3968class PaintEventPtr(PaintEvent):
3969 def __init__(self, this):
3970 self.this = this
3971 if not hasattr(self,"thisown"): self.thisown = 0
3972 self.__class__ = PaintEvent
3973_core_.PaintEvent_swigregister(PaintEventPtr)
3974
3975class NcPaintEvent(Event):
3976 """Proxy of C++ NcPaintEvent class"""
3977 def __repr__(self):
3978 return "<%s.%s; proxy of C++ wxNcPaintEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
3979 def __init__(self, *args, **kwargs):
3980 """__init__(self, int winid=0) -> NcPaintEvent"""
3981 newobj = _core_.new_NcPaintEvent(*args, **kwargs)
3982 self.this = newobj.this
3983 self.thisown = 1
3984 del newobj.thisown
3985
3986class NcPaintEventPtr(NcPaintEvent):
3987 def __init__(self, this):
3988 self.this = this
3989 if not hasattr(self,"thisown"): self.thisown = 0
3990 self.__class__ = NcPaintEvent
3991_core_.NcPaintEvent_swigregister(NcPaintEventPtr)
3992
3993#---------------------------------------------------------------------------
3994
3995class EraseEvent(Event):
3996 """Proxy of C++ EraseEvent class"""
3997 def __repr__(self):
3998 return "<%s.%s; proxy of C++ wxEraseEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
3999 def __init__(self, *args, **kwargs):
4000 """__init__(self, int Id=0, DC dc=(wxDC *) NULL) -> EraseEvent"""
4001 newobj = _core_.new_EraseEvent(*args, **kwargs)
4002 self.this = newobj.this
4003 self.thisown = 1
4004 del newobj.thisown
4005 def GetDC(*args, **kwargs):
4006 """GetDC(self) -> DC"""
4007 return _core_.EraseEvent_GetDC(*args, **kwargs)
4008
4009
4010class EraseEventPtr(EraseEvent):
4011 def __init__(self, this):
4012 self.this = this
4013 if not hasattr(self,"thisown"): self.thisown = 0
4014 self.__class__ = EraseEvent
4015_core_.EraseEvent_swigregister(EraseEventPtr)
4016
4017#---------------------------------------------------------------------------
4018
4019class FocusEvent(Event):
4020 """Proxy of C++ FocusEvent class"""
4021 def __repr__(self):
4022 return "<%s.%s; proxy of C++ wxFocusEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
4023 def __init__(self, *args, **kwargs):
4024 """__init__(self, wxEventType type=wxEVT_NULL, int winid=0) -> FocusEvent"""
4025 newobj = _core_.new_FocusEvent(*args, **kwargs)
4026 self.this = newobj.this
4027 self.thisown = 1
4028 del newobj.thisown
4029 def GetWindow(*args, **kwargs):
4030 """GetWindow(self) -> Window"""
4031 return _core_.FocusEvent_GetWindow(*args, **kwargs)
4032
4033 def SetWindow(*args, **kwargs):
4034 """SetWindow(self, Window win)"""
4035 return _core_.FocusEvent_SetWindow(*args, **kwargs)
4036
4037
4038class FocusEventPtr(FocusEvent):
4039 def __init__(self, this):
4040 self.this = this
4041 if not hasattr(self,"thisown"): self.thisown = 0
4042 self.__class__ = FocusEvent
4043_core_.FocusEvent_swigregister(FocusEventPtr)
4044
4045#---------------------------------------------------------------------------
4046
4047class ChildFocusEvent(CommandEvent):
4048 """Proxy of C++ ChildFocusEvent class"""
4049 def __repr__(self):
4050 return "<%s.%s; proxy of C++ wxChildFocusEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
4051 def __init__(self, *args, **kwargs):
4052 """__init__(self, Window win=None) -> ChildFocusEvent"""
4053 newobj = _core_.new_ChildFocusEvent(*args, **kwargs)
4054 self.this = newobj.this
4055 self.thisown = 1
4056 del newobj.thisown
4057 def GetWindow(*args, **kwargs):
4058 """GetWindow(self) -> Window"""
4059 return _core_.ChildFocusEvent_GetWindow(*args, **kwargs)
4060
4061
4062class ChildFocusEventPtr(ChildFocusEvent):
4063 def __init__(self, this):
4064 self.this = this
4065 if not hasattr(self,"thisown"): self.thisown = 0
4066 self.__class__ = ChildFocusEvent
4067_core_.ChildFocusEvent_swigregister(ChildFocusEventPtr)
4068
4069#---------------------------------------------------------------------------
4070
4071class ActivateEvent(Event):
4072 """Proxy of C++ ActivateEvent class"""
4073 def __repr__(self):
4074 return "<%s.%s; proxy of C++ wxActivateEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
4075 def __init__(self, *args, **kwargs):
4076 """__init__(self, wxEventType type=wxEVT_NULL, bool active=True, int Id=0) -> ActivateEvent"""
4077 newobj = _core_.new_ActivateEvent(*args, **kwargs)
4078 self.this = newobj.this
4079 self.thisown = 1
4080 del newobj.thisown
4081 def GetActive(*args, **kwargs):
4082 """GetActive(self) -> bool"""
4083 return _core_.ActivateEvent_GetActive(*args, **kwargs)
4084
4085
4086class ActivateEventPtr(ActivateEvent):
4087 def __init__(self, this):
4088 self.this = this
4089 if not hasattr(self,"thisown"): self.thisown = 0
4090 self.__class__ = ActivateEvent
4091_core_.ActivateEvent_swigregister(ActivateEventPtr)
4092
4093#---------------------------------------------------------------------------
4094
4095class InitDialogEvent(Event):
4096 """Proxy of C++ InitDialogEvent class"""
4097 def __repr__(self):
4098 return "<%s.%s; proxy of C++ wxInitDialogEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
4099 def __init__(self, *args, **kwargs):
4100 """__init__(self, int Id=0) -> InitDialogEvent"""
4101 newobj = _core_.new_InitDialogEvent(*args, **kwargs)
4102 self.this = newobj.this
4103 self.thisown = 1
4104 del newobj.thisown
4105
4106class InitDialogEventPtr(InitDialogEvent):
4107 def __init__(self, this):
4108 self.this = this
4109 if not hasattr(self,"thisown"): self.thisown = 0
4110 self.__class__ = InitDialogEvent
4111_core_.InitDialogEvent_swigregister(InitDialogEventPtr)
4112
4113#---------------------------------------------------------------------------
4114
4115class MenuEvent(Event):
4116 """Proxy of C++ MenuEvent class"""
4117 def __repr__(self):
4118 return "<%s.%s; proxy of C++ wxMenuEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
4119 def __init__(self, *args, **kwargs):
4120 """__init__(self, wxEventType type=wxEVT_NULL, int winid=0, Menu menu=None) -> MenuEvent"""
4121 newobj = _core_.new_MenuEvent(*args, **kwargs)
4122 self.this = newobj.this
4123 self.thisown = 1
4124 del newobj.thisown
4125 def GetMenuId(*args, **kwargs):
4126 """GetMenuId(self) -> int"""
4127 return _core_.MenuEvent_GetMenuId(*args, **kwargs)
4128
4129 def IsPopup(*args, **kwargs):
4130 """IsPopup(self) -> bool"""
4131 return _core_.MenuEvent_IsPopup(*args, **kwargs)
4132
4133 def GetMenu(*args, **kwargs):
4134 """GetMenu(self) -> Menu"""
4135 return _core_.MenuEvent_GetMenu(*args, **kwargs)
4136
4137
4138class MenuEventPtr(MenuEvent):
4139 def __init__(self, this):
4140 self.this = this
4141 if not hasattr(self,"thisown"): self.thisown = 0
4142 self.__class__ = MenuEvent
4143_core_.MenuEvent_swigregister(MenuEventPtr)
4144
4145#---------------------------------------------------------------------------
4146
4147class CloseEvent(Event):
4148 """Proxy of C++ CloseEvent class"""
4149 def __repr__(self):
4150 return "<%s.%s; proxy of C++ wxCloseEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
4151 def __init__(self, *args, **kwargs):
4152 """__init__(self, wxEventType type=wxEVT_NULL, int winid=0) -> CloseEvent"""
4153 newobj = _core_.new_CloseEvent(*args, **kwargs)
4154 self.this = newobj.this
4155 self.thisown = 1
4156 del newobj.thisown
4157 def SetLoggingOff(*args, **kwargs):
4158 """SetLoggingOff(self, bool logOff)"""
4159 return _core_.CloseEvent_SetLoggingOff(*args, **kwargs)
4160
4161 def GetLoggingOff(*args, **kwargs):
4162 """GetLoggingOff(self) -> bool"""
4163 return _core_.CloseEvent_GetLoggingOff(*args, **kwargs)
4164
4165 def Veto(*args, **kwargs):
4166 """Veto(self, bool veto=True)"""
4167 return _core_.CloseEvent_Veto(*args, **kwargs)
4168
4169 def SetCanVeto(*args, **kwargs):
4170 """SetCanVeto(self, bool canVeto)"""
4171 return _core_.CloseEvent_SetCanVeto(*args, **kwargs)
4172
4173 def CanVeto(*args, **kwargs):
4174 """CanVeto(self) -> bool"""
4175 return _core_.CloseEvent_CanVeto(*args, **kwargs)
4176
4177 def GetVeto(*args, **kwargs):
4178 """GetVeto(self) -> bool"""
4179 return _core_.CloseEvent_GetVeto(*args, **kwargs)
4180
4181
4182class CloseEventPtr(CloseEvent):
4183 def __init__(self, this):
4184 self.this = this
4185 if not hasattr(self,"thisown"): self.thisown = 0
4186 self.__class__ = CloseEvent
4187_core_.CloseEvent_swigregister(CloseEventPtr)
4188
4189#---------------------------------------------------------------------------
4190
4191class ShowEvent(Event):
4192 """Proxy of C++ ShowEvent class"""
4193 def __repr__(self):
4194 return "<%s.%s; proxy of C++ wxShowEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
4195 def __init__(self, *args, **kwargs):
4196 """__init__(self, int winid=0, bool show=False) -> ShowEvent"""
4197 newobj = _core_.new_ShowEvent(*args, **kwargs)
4198 self.this = newobj.this
4199 self.thisown = 1
4200 del newobj.thisown
4201 def SetShow(*args, **kwargs):
4202 """SetShow(self, bool show)"""
4203 return _core_.ShowEvent_SetShow(*args, **kwargs)
4204
4205 def GetShow(*args, **kwargs):
4206 """GetShow(self) -> bool"""
4207 return _core_.ShowEvent_GetShow(*args, **kwargs)
4208
4209
4210class ShowEventPtr(ShowEvent):
4211 def __init__(self, this):
4212 self.this = this
4213 if not hasattr(self,"thisown"): self.thisown = 0
4214 self.__class__ = ShowEvent
4215_core_.ShowEvent_swigregister(ShowEventPtr)
4216
4217#---------------------------------------------------------------------------
4218
4219class IconizeEvent(Event):
4220 """Proxy of C++ IconizeEvent class"""
4221 def __repr__(self):
4222 return "<%s.%s; proxy of C++ wxIconizeEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
4223 def __init__(self, *args, **kwargs):
4224 """__init__(self, int id=0, bool iconized=True) -> IconizeEvent"""
4225 newobj = _core_.new_IconizeEvent(*args, **kwargs)
4226 self.this = newobj.this
4227 self.thisown = 1
4228 del newobj.thisown
4229 def Iconized(*args, **kwargs):
4230 """Iconized(self) -> bool"""
4231 return _core_.IconizeEvent_Iconized(*args, **kwargs)
4232
4233
4234class IconizeEventPtr(IconizeEvent):
4235 def __init__(self, this):
4236 self.this = this
4237 if not hasattr(self,"thisown"): self.thisown = 0
4238 self.__class__ = IconizeEvent
4239_core_.IconizeEvent_swigregister(IconizeEventPtr)
4240
4241#---------------------------------------------------------------------------
4242
4243class MaximizeEvent(Event):
4244 """Proxy of C++ MaximizeEvent class"""
4245 def __repr__(self):
4246 return "<%s.%s; proxy of C++ wxMaximizeEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
4247 def __init__(self, *args, **kwargs):
4248 """__init__(self, int id=0) -> MaximizeEvent"""
4249 newobj = _core_.new_MaximizeEvent(*args, **kwargs)
4250 self.this = newobj.this
4251 self.thisown = 1
4252 del newobj.thisown
4253
4254class MaximizeEventPtr(MaximizeEvent):
4255 def __init__(self, this):
4256 self.this = this
4257 if not hasattr(self,"thisown"): self.thisown = 0
4258 self.__class__ = MaximizeEvent
4259_core_.MaximizeEvent_swigregister(MaximizeEventPtr)
4260
4261#---------------------------------------------------------------------------
4262
4263class DropFilesEvent(Event):
4264 """Proxy of C++ DropFilesEvent class"""
4265 def __init__(self): raise RuntimeError, "No constructor defined"
4266 def __repr__(self):
4267 return "<%s.%s; proxy of C++ wxDropFilesEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
4268 def GetPosition(*args, **kwargs):
4269 """GetPosition(self) -> Point"""
4270 return _core_.DropFilesEvent_GetPosition(*args, **kwargs)
4271
4272 def GetNumberOfFiles(*args, **kwargs):
4273 """GetNumberOfFiles(self) -> int"""
4274 return _core_.DropFilesEvent_GetNumberOfFiles(*args, **kwargs)
4275
4276 def GetFiles(*args, **kwargs):
4277 """GetFiles(self) -> PyObject"""
4278 return _core_.DropFilesEvent_GetFiles(*args, **kwargs)
4279
4280
4281class DropFilesEventPtr(DropFilesEvent):
4282 def __init__(self, this):
4283 self.this = this
4284 if not hasattr(self,"thisown"): self.thisown = 0
4285 self.__class__ = DropFilesEvent
4286_core_.DropFilesEvent_swigregister(DropFilesEventPtr)
4287
4288#---------------------------------------------------------------------------
4289
4290UPDATE_UI_PROCESS_ALL = _core_.UPDATE_UI_PROCESS_ALL
4291UPDATE_UI_PROCESS_SPECIFIED = _core_.UPDATE_UI_PROCESS_SPECIFIED
4292class UpdateUIEvent(CommandEvent):
4293 """Proxy of C++ UpdateUIEvent class"""
4294 def __repr__(self):
4295 return "<%s.%s; proxy of C++ wxUpdateUIEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
4296 def __init__(self, *args, **kwargs):
4297 """__init__(self, int commandId=0) -> UpdateUIEvent"""
4298 newobj = _core_.new_UpdateUIEvent(*args, **kwargs)
4299 self.this = newobj.this
4300 self.thisown = 1
4301 del newobj.thisown
4302 def GetChecked(*args, **kwargs):
4303 """GetChecked(self) -> bool"""
4304 return _core_.UpdateUIEvent_GetChecked(*args, **kwargs)
4305
4306 def GetEnabled(*args, **kwargs):
4307 """GetEnabled(self) -> bool"""
4308 return _core_.UpdateUIEvent_GetEnabled(*args, **kwargs)
4309
4310 def GetText(*args, **kwargs):
4311 """GetText(self) -> String"""
4312 return _core_.UpdateUIEvent_GetText(*args, **kwargs)
4313
4314 def GetSetText(*args, **kwargs):
4315 """GetSetText(self) -> bool"""
4316 return _core_.UpdateUIEvent_GetSetText(*args, **kwargs)
4317
4318 def GetSetChecked(*args, **kwargs):
4319 """GetSetChecked(self) -> bool"""
4320 return _core_.UpdateUIEvent_GetSetChecked(*args, **kwargs)
4321
4322 def GetSetEnabled(*args, **kwargs):
4323 """GetSetEnabled(self) -> bool"""
4324 return _core_.UpdateUIEvent_GetSetEnabled(*args, **kwargs)
4325
4326 def Check(*args, **kwargs):
4327 """Check(self, bool check)"""
4328 return _core_.UpdateUIEvent_Check(*args, **kwargs)
4329
4330 def Enable(*args, **kwargs):
4331 """Enable(self, bool enable)"""
4332 return _core_.UpdateUIEvent_Enable(*args, **kwargs)
4333
4334 def SetText(*args, **kwargs):
4335 """SetText(self, String text)"""
4336 return _core_.UpdateUIEvent_SetText(*args, **kwargs)
4337
4338 def SetUpdateInterval(*args, **kwargs):
4339 """SetUpdateInterval(long updateInterval)"""
4340 return _core_.UpdateUIEvent_SetUpdateInterval(*args, **kwargs)
4341
4342 SetUpdateInterval = staticmethod(SetUpdateInterval)
4343 def GetUpdateInterval(*args, **kwargs):
4344 """GetUpdateInterval() -> long"""
4345 return _core_.UpdateUIEvent_GetUpdateInterval(*args, **kwargs)
4346
4347 GetUpdateInterval = staticmethod(GetUpdateInterval)
4348 def CanUpdate(*args, **kwargs):
4349 """CanUpdate(Window win) -> bool"""
4350 return _core_.UpdateUIEvent_CanUpdate(*args, **kwargs)
4351
4352 CanUpdate = staticmethod(CanUpdate)
4353 def ResetUpdateTime(*args, **kwargs):
4354 """ResetUpdateTime()"""
4355 return _core_.UpdateUIEvent_ResetUpdateTime(*args, **kwargs)
4356
4357 ResetUpdateTime = staticmethod(ResetUpdateTime)
4358 def SetMode(*args, **kwargs):
4359 """SetMode(int mode)"""
4360 return _core_.UpdateUIEvent_SetMode(*args, **kwargs)
4361
4362 SetMode = staticmethod(SetMode)
4363 def GetMode(*args, **kwargs):
4364 """GetMode() -> int"""
4365 return _core_.UpdateUIEvent_GetMode(*args, **kwargs)
4366
4367 GetMode = staticmethod(GetMode)
4368
4369class UpdateUIEventPtr(UpdateUIEvent):
4370 def __init__(self, this):
4371 self.this = this
4372 if not hasattr(self,"thisown"): self.thisown = 0
4373 self.__class__ = UpdateUIEvent
4374_core_.UpdateUIEvent_swigregister(UpdateUIEventPtr)
4375
4376def UpdateUIEvent_SetUpdateInterval(*args, **kwargs):
4377 """UpdateUIEvent_SetUpdateInterval(long updateInterval)"""
4378 return _core_.UpdateUIEvent_SetUpdateInterval(*args, **kwargs)
4379
4380def UpdateUIEvent_GetUpdateInterval(*args, **kwargs):
4381 """UpdateUIEvent_GetUpdateInterval() -> long"""
4382 return _core_.UpdateUIEvent_GetUpdateInterval(*args, **kwargs)
4383
4384def UpdateUIEvent_CanUpdate(*args, **kwargs):
4385 """UpdateUIEvent_CanUpdate(Window win) -> bool"""
4386 return _core_.UpdateUIEvent_CanUpdate(*args, **kwargs)
4387
4388def UpdateUIEvent_ResetUpdateTime(*args, **kwargs):
4389 """UpdateUIEvent_ResetUpdateTime()"""
4390 return _core_.UpdateUIEvent_ResetUpdateTime(*args, **kwargs)
4391
4392def UpdateUIEvent_SetMode(*args, **kwargs):
4393 """UpdateUIEvent_SetMode(int mode)"""
4394 return _core_.UpdateUIEvent_SetMode(*args, **kwargs)
4395
4396def UpdateUIEvent_GetMode(*args, **kwargs):
4397 """UpdateUIEvent_GetMode() -> int"""
4398 return _core_.UpdateUIEvent_GetMode(*args, **kwargs)
4399
4400#---------------------------------------------------------------------------
4401
4402class SysColourChangedEvent(Event):
4403 """Proxy of C++ SysColourChangedEvent class"""
4404 def __repr__(self):
4405 return "<%s.%s; proxy of C++ wxSysColourChangedEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
4406 def __init__(self, *args, **kwargs):
4407 """__init__(self) -> SysColourChangedEvent"""
4408 newobj = _core_.new_SysColourChangedEvent(*args, **kwargs)
4409 self.this = newobj.this
4410 self.thisown = 1
4411 del newobj.thisown
4412
4413class SysColourChangedEventPtr(SysColourChangedEvent):
4414 def __init__(self, this):
4415 self.this = this
4416 if not hasattr(self,"thisown"): self.thisown = 0
4417 self.__class__ = SysColourChangedEvent
4418_core_.SysColourChangedEvent_swigregister(SysColourChangedEventPtr)
4419
4420#---------------------------------------------------------------------------
4421
4422class MouseCaptureChangedEvent(Event):
4423 """Proxy of C++ MouseCaptureChangedEvent class"""
4424 def __repr__(self):
4425 return "<%s.%s; proxy of C++ wxMouseCaptureChangedEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
4426 def __init__(self, *args, **kwargs):
4427 """__init__(self, int winid=0, Window gainedCapture=None) -> MouseCaptureChangedEvent"""
4428 newobj = _core_.new_MouseCaptureChangedEvent(*args, **kwargs)
4429 self.this = newobj.this
4430 self.thisown = 1
4431 del newobj.thisown
4432 def GetCapturedWindow(*args, **kwargs):
4433 """GetCapturedWindow(self) -> Window"""
4434 return _core_.MouseCaptureChangedEvent_GetCapturedWindow(*args, **kwargs)
4435
4436
4437class MouseCaptureChangedEventPtr(MouseCaptureChangedEvent):
4438 def __init__(self, this):
4439 self.this = this
4440 if not hasattr(self,"thisown"): self.thisown = 0
4441 self.__class__ = MouseCaptureChangedEvent
4442_core_.MouseCaptureChangedEvent_swigregister(MouseCaptureChangedEventPtr)
4443
4444#---------------------------------------------------------------------------
4445
4446class DisplayChangedEvent(Event):
4447 """Proxy of C++ DisplayChangedEvent class"""
4448 def __repr__(self):
4449 return "<%s.%s; proxy of C++ wxDisplayChangedEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
4450 def __init__(self, *args, **kwargs):
4451 """__init__(self) -> DisplayChangedEvent"""
4452 newobj = _core_.new_DisplayChangedEvent(*args, **kwargs)
4453 self.this = newobj.this
4454 self.thisown = 1
4455 del newobj.thisown
4456
4457class DisplayChangedEventPtr(DisplayChangedEvent):
4458 def __init__(self, this):
4459 self.this = this
4460 if not hasattr(self,"thisown"): self.thisown = 0
4461 self.__class__ = DisplayChangedEvent
4462_core_.DisplayChangedEvent_swigregister(DisplayChangedEventPtr)
4463
4464#---------------------------------------------------------------------------
4465
4466class PaletteChangedEvent(Event):
4467 """Proxy of C++ PaletteChangedEvent class"""
4468 def __repr__(self):
4469 return "<%s.%s; proxy of C++ wxPaletteChangedEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
4470 def __init__(self, *args, **kwargs):
4471 """__init__(self, int id=0) -> PaletteChangedEvent"""
4472 newobj = _core_.new_PaletteChangedEvent(*args, **kwargs)
4473 self.this = newobj.this
4474 self.thisown = 1
4475 del newobj.thisown
4476 def SetChangedWindow(*args, **kwargs):
4477 """SetChangedWindow(self, Window win)"""
4478 return _core_.PaletteChangedEvent_SetChangedWindow(*args, **kwargs)
4479
4480 def GetChangedWindow(*args, **kwargs):
4481 """GetChangedWindow(self) -> Window"""
4482 return _core_.PaletteChangedEvent_GetChangedWindow(*args, **kwargs)
4483
4484
4485class PaletteChangedEventPtr(PaletteChangedEvent):
4486 def __init__(self, this):
4487 self.this = this
4488 if not hasattr(self,"thisown"): self.thisown = 0
4489 self.__class__ = PaletteChangedEvent
4490_core_.PaletteChangedEvent_swigregister(PaletteChangedEventPtr)
4491
4492#---------------------------------------------------------------------------
4493
4494class QueryNewPaletteEvent(Event):
4495 """Proxy of C++ QueryNewPaletteEvent class"""
4496 def __repr__(self):
4497 return "<%s.%s; proxy of C++ wxQueryNewPaletteEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
4498 def __init__(self, *args, **kwargs):
4499 """__init__(self, int winid=0) -> QueryNewPaletteEvent"""
4500 newobj = _core_.new_QueryNewPaletteEvent(*args, **kwargs)
4501 self.this = newobj.this
4502 self.thisown = 1
4503 del newobj.thisown
4504 def SetPaletteRealized(*args, **kwargs):
4505 """SetPaletteRealized(self, bool realized)"""
4506 return _core_.QueryNewPaletteEvent_SetPaletteRealized(*args, **kwargs)
4507
4508 def GetPaletteRealized(*args, **kwargs):
4509 """GetPaletteRealized(self) -> bool"""
4510 return _core_.QueryNewPaletteEvent_GetPaletteRealized(*args, **kwargs)
4511
4512
4513class QueryNewPaletteEventPtr(QueryNewPaletteEvent):
4514 def __init__(self, this):
4515 self.this = this
4516 if not hasattr(self,"thisown"): self.thisown = 0
4517 self.__class__ = QueryNewPaletteEvent
4518_core_.QueryNewPaletteEvent_swigregister(QueryNewPaletteEventPtr)
4519
4520#---------------------------------------------------------------------------
4521
4522class NavigationKeyEvent(Event):
4523 """Proxy of C++ NavigationKeyEvent class"""
4524 def __repr__(self):
4525 return "<%s.%s; proxy of C++ wxNavigationKeyEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
4526 def __init__(self, *args, **kwargs):
4527 """__init__(self) -> NavigationKeyEvent"""
4528 newobj = _core_.new_NavigationKeyEvent(*args, **kwargs)
4529 self.this = newobj.this
4530 self.thisown = 1
4531 del newobj.thisown
4532 def GetDirection(*args, **kwargs):
4533 """GetDirection(self) -> bool"""
4534 return _core_.NavigationKeyEvent_GetDirection(*args, **kwargs)
4535
4536 def SetDirection(*args, **kwargs):
4537 """SetDirection(self, bool forward)"""
4538 return _core_.NavigationKeyEvent_SetDirection(*args, **kwargs)
4539
4540 def IsWindowChange(*args, **kwargs):
4541 """IsWindowChange(self) -> bool"""
4542 return _core_.NavigationKeyEvent_IsWindowChange(*args, **kwargs)
4543
4544 def SetWindowChange(*args, **kwargs):
4545 """SetWindowChange(self, bool ischange)"""
4546 return _core_.NavigationKeyEvent_SetWindowChange(*args, **kwargs)
4547
4548 def SetFlags(*args, **kwargs):
4549 """SetFlags(self, long flags)"""
4550 return _core_.NavigationKeyEvent_SetFlags(*args, **kwargs)
4551
4552 def GetCurrentFocus(*args, **kwargs):
4553 """GetCurrentFocus(self) -> Window"""
4554 return _core_.NavigationKeyEvent_GetCurrentFocus(*args, **kwargs)
4555
4556 def SetCurrentFocus(*args, **kwargs):
4557 """SetCurrentFocus(self, Window win)"""
4558 return _core_.NavigationKeyEvent_SetCurrentFocus(*args, **kwargs)
4559
4560 IsBackward = _core_.NavigationKeyEvent_IsBackward
4561 IsForward = _core_.NavigationKeyEvent_IsForward
4562 WinChange = _core_.NavigationKeyEvent_WinChange
4563
4564class NavigationKeyEventPtr(NavigationKeyEvent):
4565 def __init__(self, this):
4566 self.this = this
4567 if not hasattr(self,"thisown"): self.thisown = 0
4568 self.__class__ = NavigationKeyEvent
4569_core_.NavigationKeyEvent_swigregister(NavigationKeyEventPtr)
4570
4571#---------------------------------------------------------------------------
4572
4573class WindowCreateEvent(CommandEvent):
4574 """Proxy of C++ WindowCreateEvent class"""
4575 def __repr__(self):
4576 return "<%s.%s; proxy of C++ wxWindowCreateEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
4577 def __init__(self, *args, **kwargs):
4578 """__init__(self, Window win=None) -> WindowCreateEvent"""
4579 newobj = _core_.new_WindowCreateEvent(*args, **kwargs)
4580 self.this = newobj.this
4581 self.thisown = 1
4582 del newobj.thisown
4583 def GetWindow(*args, **kwargs):
4584 """GetWindow(self) -> Window"""
4585 return _core_.WindowCreateEvent_GetWindow(*args, **kwargs)
4586
4587
4588class WindowCreateEventPtr(WindowCreateEvent):
4589 def __init__(self, this):
4590 self.this = this
4591 if not hasattr(self,"thisown"): self.thisown = 0
4592 self.__class__ = WindowCreateEvent
4593_core_.WindowCreateEvent_swigregister(WindowCreateEventPtr)
4594
4595class WindowDestroyEvent(CommandEvent):
4596 """Proxy of C++ WindowDestroyEvent class"""
4597 def __repr__(self):
4598 return "<%s.%s; proxy of C++ wxWindowDestroyEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
4599 def __init__(self, *args, **kwargs):
4600 """__init__(self, Window win=None) -> WindowDestroyEvent"""
4601 newobj = _core_.new_WindowDestroyEvent(*args, **kwargs)
4602 self.this = newobj.this
4603 self.thisown = 1
4604 del newobj.thisown
4605 def GetWindow(*args, **kwargs):
4606 """GetWindow(self) -> Window"""
4607 return _core_.WindowDestroyEvent_GetWindow(*args, **kwargs)
4608
4609
4610class WindowDestroyEventPtr(WindowDestroyEvent):
4611 def __init__(self, this):
4612 self.this = this
4613 if not hasattr(self,"thisown"): self.thisown = 0
4614 self.__class__ = WindowDestroyEvent
4615_core_.WindowDestroyEvent_swigregister(WindowDestroyEventPtr)
4616
4617#---------------------------------------------------------------------------
4618
4619class ContextMenuEvent(CommandEvent):
4620 """Proxy of C++ ContextMenuEvent class"""
4621 def __repr__(self):
4622 return "<%s.%s; proxy of C++ wxContextMenuEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
4623 def __init__(self, *args, **kwargs):
4624 """__init__(self, wxEventType type=wxEVT_NULL, int winid=0, Point pt=DefaultPosition) -> ContextMenuEvent"""
4625 newobj = _core_.new_ContextMenuEvent(*args, **kwargs)
4626 self.this = newobj.this
4627 self.thisown = 1
4628 del newobj.thisown
4629 def GetPosition(*args, **kwargs):
4630 """GetPosition(self) -> Point"""
4631 return _core_.ContextMenuEvent_GetPosition(*args, **kwargs)
4632
4633 def SetPosition(*args, **kwargs):
4634 """SetPosition(self, Point pos)"""
4635 return _core_.ContextMenuEvent_SetPosition(*args, **kwargs)
4636
4637
4638class ContextMenuEventPtr(ContextMenuEvent):
4639 def __init__(self, this):
4640 self.this = this
4641 if not hasattr(self,"thisown"): self.thisown = 0
4642 self.__class__ = ContextMenuEvent
4643_core_.ContextMenuEvent_swigregister(ContextMenuEventPtr)
4644
4645#---------------------------------------------------------------------------
4646
4647IDLE_PROCESS_ALL = _core_.IDLE_PROCESS_ALL
4648IDLE_PROCESS_SPECIFIED = _core_.IDLE_PROCESS_SPECIFIED
4649class IdleEvent(Event):
4650 """Proxy of C++ IdleEvent class"""
4651 def __repr__(self):
4652 return "<%s.%s; proxy of C++ wxIdleEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
4653 def __init__(self, *args, **kwargs):
4654 """__init__(self) -> IdleEvent"""
4655 newobj = _core_.new_IdleEvent(*args, **kwargs)
4656 self.this = newobj.this
4657 self.thisown = 1
4658 del newobj.thisown
4659 def RequestMore(*args, **kwargs):
4660 """RequestMore(self, bool needMore=True)"""
4661 return _core_.IdleEvent_RequestMore(*args, **kwargs)
4662
4663 def MoreRequested(*args, **kwargs):
4664 """MoreRequested(self) -> bool"""
4665 return _core_.IdleEvent_MoreRequested(*args, **kwargs)
4666
4667 def SetMode(*args, **kwargs):
4668 """SetMode(int mode)"""
4669 return _core_.IdleEvent_SetMode(*args, **kwargs)
4670
4671 SetMode = staticmethod(SetMode)
4672 def GetMode(*args, **kwargs):
4673 """GetMode() -> int"""
4674 return _core_.IdleEvent_GetMode(*args, **kwargs)
4675
4676 GetMode = staticmethod(GetMode)
4677 def CanSend(*args, **kwargs):
4678 """CanSend(Window win) -> bool"""
4679 return _core_.IdleEvent_CanSend(*args, **kwargs)
4680
4681 CanSend = staticmethod(CanSend)
4682
4683class IdleEventPtr(IdleEvent):
4684 def __init__(self, this):
4685 self.this = this
4686 if not hasattr(self,"thisown"): self.thisown = 0
4687 self.__class__ = IdleEvent
4688_core_.IdleEvent_swigregister(IdleEventPtr)
4689
4690def IdleEvent_SetMode(*args, **kwargs):
4691 """IdleEvent_SetMode(int mode)"""
4692 return _core_.IdleEvent_SetMode(*args, **kwargs)
4693
4694def IdleEvent_GetMode(*args, **kwargs):
4695 """IdleEvent_GetMode() -> int"""
4696 return _core_.IdleEvent_GetMode(*args, **kwargs)
4697
4698def IdleEvent_CanSend(*args, **kwargs):
4699 """IdleEvent_CanSend(Window win) -> bool"""
4700 return _core_.IdleEvent_CanSend(*args, **kwargs)
4701
4702#---------------------------------------------------------------------------
4703
4704class PyEvent(Event):
4705 """Proxy of C++ PyEvent class"""
4706 def __repr__(self):
4707 return "<%s.%s; proxy of C++ wxPyEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
4708 def __init__(self, *args, **kwargs):
4709 """__init__(self, int winid=0, wxEventType commandType=wxEVT_NULL) -> PyEvent"""
4710 newobj = _core_.new_PyEvent(*args, **kwargs)
4711 self.this = newobj.this
4712 self.thisown = 1
4713 del newobj.thisown
4714 self.SetSelf(self)
4715
4716 def __del__(self, destroy=_core_.delete_PyEvent):
4717 """__del__(self)"""
4718 try:
4719 if self.thisown: destroy(self)
4720 except: pass
4721
4722 def SetSelf(*args, **kwargs):
4723 """SetSelf(self, PyObject self)"""
4724 return _core_.PyEvent_SetSelf(*args, **kwargs)
4725
4726 def GetSelf(*args, **kwargs):
4727 """GetSelf(self) -> PyObject"""
4728 return _core_.PyEvent_GetSelf(*args, **kwargs)
4729
4730
4731class PyEventPtr(PyEvent):
4732 def __init__(self, this):
4733 self.this = this
4734 if not hasattr(self,"thisown"): self.thisown = 0
4735 self.__class__ = PyEvent
4736_core_.PyEvent_swigregister(PyEventPtr)
4737
4738class PyCommandEvent(CommandEvent):
4739 """Proxy of C++ PyCommandEvent class"""
4740 def __repr__(self):
4741 return "<%s.%s; proxy of C++ wxPyCommandEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
4742 def __init__(self, *args, **kwargs):
4743 """__init__(self, wxEventType commandType=wxEVT_NULL, int id=0) -> PyCommandEvent"""
4744 newobj = _core_.new_PyCommandEvent(*args, **kwargs)
4745 self.this = newobj.this
4746 self.thisown = 1
4747 del newobj.thisown
4748 self.SetSelf(self)
4749
4750 def __del__(self, destroy=_core_.delete_PyCommandEvent):
4751 """__del__(self)"""
4752 try:
4753 if self.thisown: destroy(self)
4754 except: pass
4755
4756 def SetSelf(*args, **kwargs):
4757 """SetSelf(self, PyObject self)"""
4758 return _core_.PyCommandEvent_SetSelf(*args, **kwargs)
4759
4760 def GetSelf(*args, **kwargs):
4761 """GetSelf(self) -> PyObject"""
4762 return _core_.PyCommandEvent_GetSelf(*args, **kwargs)
4763
4764
4765class PyCommandEventPtr(PyCommandEvent):
4766 def __init__(self, this):
4767 self.this = this
4768 if not hasattr(self,"thisown"): self.thisown = 0
4769 self.__class__ = PyCommandEvent
4770_core_.PyCommandEvent_swigregister(PyCommandEventPtr)
4771
4772#---------------------------------------------------------------------------
4773
4774PYAPP_ASSERT_SUPPRESS = _core_.PYAPP_ASSERT_SUPPRESS
4775PYAPP_ASSERT_EXCEPTION = _core_.PYAPP_ASSERT_EXCEPTION
4776PYAPP_ASSERT_DIALOG = _core_.PYAPP_ASSERT_DIALOG
4777PYAPP_ASSERT_LOG = _core_.PYAPP_ASSERT_LOG
4778PRINT_WINDOWS = _core_.PRINT_WINDOWS
4779PRINT_POSTSCRIPT = _core_.PRINT_POSTSCRIPT
4780class PyApp(EvtHandler):
4781 """
4782 The ``wx.PyApp`` class is an *implementation detail*, please use the
4783 `wx.App` class (or some other derived class) instead.
4784 """
4785 def __repr__(self):
4786 return "<%s.%s; proxy of C++ wxPyApp instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
4787 def __init__(self, *args, **kwargs):
4788 """
4789 __init__(self) -> PyApp
4790
4791 Create a new application object, starting the bootstrap process.
4792 """
4793 newobj = _core_.new_PyApp(*args, **kwargs)
4794 self.this = newobj.this
4795 self.thisown = 1
4796 del newobj.thisown
4797 self._setCallbackInfo(self, PyApp)
4798 self._setOORInfo(self)
4799
4800 def __del__(self, destroy=_core_.delete_PyApp):
4801 """__del__(self)"""
4802 try:
4803 if self.thisown: destroy(self)
4804 except: pass
4805
4806 def _setCallbackInfo(*args, **kwargs):
4807 """_setCallbackInfo(self, PyObject self, PyObject _class)"""
4808 return _core_.PyApp__setCallbackInfo(*args, **kwargs)
4809
4810 def GetAppName(*args, **kwargs):
4811 """
4812 GetAppName(self) -> String
4813
4814 Get the application name.
4815 """
4816 return _core_.PyApp_GetAppName(*args, **kwargs)
4817
4818 def SetAppName(*args, **kwargs):
4819 """
4820 SetAppName(self, String name)
4821
4822 Set the application name. This value may be used automatically by
4823 `wx.Config` and such.
4824 """
4825 return _core_.PyApp_SetAppName(*args, **kwargs)
4826
4827 def GetClassName(*args, **kwargs):
4828 """
4829 GetClassName(self) -> String
4830
4831 Get the application's class name.
4832 """
4833 return _core_.PyApp_GetClassName(*args, **kwargs)
4834
4835 def SetClassName(*args, **kwargs):
4836 """
4837 SetClassName(self, String name)
4838
4839 Set the application's class name. This value may be used for
4840 X-resources if applicable for the platform
4841 """
4842 return _core_.PyApp_SetClassName(*args, **kwargs)
4843
4844 def GetVendorName(*args, **kwargs):
4845 """
4846 GetVendorName(self) -> String
4847
4848 Get the application's vendor name.
4849 """
4850 return _core_.PyApp_GetVendorName(*args, **kwargs)
4851
4852 def SetVendorName(*args, **kwargs):
4853 """
4854 SetVendorName(self, String name)
4855
4856 Set the application's vendor name. This value may be used
4857 automatically by `wx.Config` and such.
4858 """
4859 return _core_.PyApp_SetVendorName(*args, **kwargs)
4860
4861 def GetTraits(*args, **kwargs):
4862 """
4863 GetTraits(self) -> wxAppTraits
4864
4865 Return (and create if necessary) the app traits object to which we
4866 delegate for everything which either should be configurable by the
4867 user (then he can change the default behaviour simply by overriding
4868 CreateTraits() and returning his own traits object) or which is
4869 GUI/console dependent as then wx.AppTraits allows us to abstract the
4870 differences behind the common facade.
4871
4872 :todo: Add support for overriding CreateAppTraits in wxPython.
4873 """
4874 return _core_.PyApp_GetTraits(*args, **kwargs)
4875
4876 def ProcessPendingEvents(*args, **kwargs):
4877 """
4878 ProcessPendingEvents(self)
4879
4880 Process all events in the Pending Events list -- it is necessary to
4881 call this function to process posted events. This normally happens
4882 during each event loop iteration.
4883 """
4884 return _core_.PyApp_ProcessPendingEvents(*args, **kwargs)
4885
4886 def Yield(*args, **kwargs):
4887 """
4888 Yield(self, bool onlyIfNeeded=False) -> bool
4889
4890 Process all currently pending events right now, instead of waiting
4891 until return to the event loop. It is an error to call ``Yield``
4892 recursively unless the value of ``onlyIfNeeded`` is True.
4893
4894 :warning: This function is dangerous as it can lead to unexpected
4895 reentrancies (i.e. when called from an event handler it may
4896 result in calling the same event handler again), use with
4897 extreme care or, better, don't use at all!
4898
4899 :see: `wx.Yield`, `wx.YieldIfNeeded`, `wx.SafeYield`
4900
4901 """
4902 return _core_.PyApp_Yield(*args, **kwargs)
4903
4904 def WakeUpIdle(*args, **kwargs):
4905 """
4906 WakeUpIdle(self)
4907
4908 Make sure that idle events are sent again.
4909 :see: `wx.WakeUpIdle`
4910 """
4911 return _core_.PyApp_WakeUpIdle(*args, **kwargs)
4912
4913 def IsMainLoopRunning(*args, **kwargs):
4914 """
4915 IsMainLoopRunning() -> bool
4916
4917 Returns True if we're running the main loop, i.e. if the events can
4918 currently be dispatched.
4919 """
4920 return _core_.PyApp_IsMainLoopRunning(*args, **kwargs)
4921
4922 IsMainLoopRunning = staticmethod(IsMainLoopRunning)
4923 def MainLoop(*args, **kwargs):
4924 """
4925 MainLoop(self) -> int
4926
4927 Execute the main GUI loop, the function doesn't normally return until
4928 all top level windows have been closed and destroyed.
4929 """
4930 return _core_.PyApp_MainLoop(*args, **kwargs)
4931
4932 def Exit(*args, **kwargs):
4933 """
4934 Exit(self)
4935
4936 Exit the main loop thus terminating the application.
4937 :see: `wx.Exit`
4938 """
4939 return _core_.PyApp_Exit(*args, **kwargs)
4940
4941 def ExitMainLoop(*args, **kwargs):
4942 """
4943 ExitMainLoop(self)
4944
4945 Exit the main GUI loop during the next iteration of the main
4946 loop, (i.e. it does not stop the program immediately!)
4947 """
4948 return _core_.PyApp_ExitMainLoop(*args, **kwargs)
4949
4950 def Pending(*args, **kwargs):
4951 """
4952 Pending(self) -> bool
4953
4954 Returns True if there are unprocessed events in the event queue.
4955 """
4956 return _core_.PyApp_Pending(*args, **kwargs)
4957
4958 def Dispatch(*args, **kwargs):
4959 """
4960 Dispatch(self) -> bool
4961
4962 Process the first event in the event queue (blocks until an event
4963 appears if there are none currently)
4964 """
4965 return _core_.PyApp_Dispatch(*args, **kwargs)
4966
4967 def ProcessIdle(*args, **kwargs):
4968 """
4969 ProcessIdle(self) -> bool
4970
4971 Called from the MainLoop when the application becomes idle (there are
4972 no pending events) and sends a `wx.IdleEvent` to all interested
4973 parties. Returns True if more idle events are needed, False if not.
4974 """
4975 return _core_.PyApp_ProcessIdle(*args, **kwargs)
4976
4977 def SendIdleEvents(*args, **kwargs):
4978 """
4979 SendIdleEvents(self, Window win, IdleEvent event) -> bool
4980
4981 Send idle event to window and all subwindows. Returns True if more
4982 idle time is requested.
4983 """
4984 return _core_.PyApp_SendIdleEvents(*args, **kwargs)
4985
4986 def IsActive(*args, **kwargs):
4987 """
4988 IsActive(self) -> bool
4989
4990 Return True if our app has focus.
4991 """
4992 return _core_.PyApp_IsActive(*args, **kwargs)
4993
4994 def SetTopWindow(*args, **kwargs):
4995 """
4996 SetTopWindow(self, Window win)
4997
4998 Set the *main* top level window
4999 """
5000 return _core_.PyApp_SetTopWindow(*args, **kwargs)
5001
5002 def GetTopWindow(*args, **kwargs):
5003 """
5004 GetTopWindow(self) -> Window
5005
5006 Return the *main* top level window (if it hadn't been set previously
5007 with SetTopWindow(), will return just some top level window and, if
5008 there not any, will return None)
5009 """
5010 return _core_.PyApp_GetTopWindow(*args, **kwargs)
5011
5012 def SetExitOnFrameDelete(*args, **kwargs):
5013 """
5014 SetExitOnFrameDelete(self, bool flag)
5015
5016 Control the exit behaviour: by default, the program will exit the main
5017 loop (and so, usually, terminate) when the last top-level program
5018 window is deleted. Beware that if you disable this behaviour (with
5019 SetExitOnFrameDelete(False)), you'll have to call ExitMainLoop()
5020 explicitly from somewhere.
5021 """
5022 return _core_.PyApp_SetExitOnFrameDelete(*args, **kwargs)
5023
5024 def GetExitOnFrameDelete(*args, **kwargs):
5025 """
5026 GetExitOnFrameDelete(self) -> bool
5027
5028 Get the current exit behaviour setting.
5029 """
5030 return _core_.PyApp_GetExitOnFrameDelete(*args, **kwargs)
5031
5032 def SetUseBestVisual(*args, **kwargs):
5033 """
5034 SetUseBestVisual(self, bool flag)
5035
5036 Set whether the app should try to use the best available visual on
5037 systems where more than one is available, (Sun, SGI, XFree86 4, etc.)
5038 """
5039 return _core_.PyApp_SetUseBestVisual(*args, **kwargs)
5040
5041 def GetUseBestVisual(*args, **kwargs):
5042 """
5043 GetUseBestVisual(self) -> bool
5044
5045 Get current UseBestVisual setting.
5046 """
5047 return _core_.PyApp_GetUseBestVisual(*args, **kwargs)
5048
5049 def SetPrintMode(*args, **kwargs):
5050 """SetPrintMode(self, int mode)"""
5051 return _core_.PyApp_SetPrintMode(*args, **kwargs)
5052
5053 def GetPrintMode(*args, **kwargs):
5054 """GetPrintMode(self) -> int"""
5055 return _core_.PyApp_GetPrintMode(*args, **kwargs)
5056
5057 def SetAssertMode(*args, **kwargs):
5058 """
5059 SetAssertMode(self, int mode)
5060
5061 Set the OnAssert behaviour for debug and hybrid builds.
5062 """
5063 return _core_.PyApp_SetAssertMode(*args, **kwargs)
5064
5065 def GetAssertMode(*args, **kwargs):
5066 """
5067 GetAssertMode(self) -> int
5068
5069 Get the current OnAssert behaviour setting.
5070 """
5071 return _core_.PyApp_GetAssertMode(*args, **kwargs)
5072
5073 def GetMacSupportPCMenuShortcuts(*args, **kwargs):
5074 """GetMacSupportPCMenuShortcuts() -> bool"""
5075 return _core_.PyApp_GetMacSupportPCMenuShortcuts(*args, **kwargs)
5076
5077 GetMacSupportPCMenuShortcuts = staticmethod(GetMacSupportPCMenuShortcuts)
5078 def GetMacAboutMenuItemId(*args, **kwargs):
5079 """GetMacAboutMenuItemId() -> long"""
5080 return _core_.PyApp_GetMacAboutMenuItemId(*args, **kwargs)
5081
5082 GetMacAboutMenuItemId = staticmethod(GetMacAboutMenuItemId)
5083 def GetMacPreferencesMenuItemId(*args, **kwargs):
5084 """GetMacPreferencesMenuItemId() -> long"""
5085 return _core_.PyApp_GetMacPreferencesMenuItemId(*args, **kwargs)
5086
5087 GetMacPreferencesMenuItemId = staticmethod(GetMacPreferencesMenuItemId)
5088 def GetMacExitMenuItemId(*args, **kwargs):
5089 """GetMacExitMenuItemId() -> long"""
5090 return _core_.PyApp_GetMacExitMenuItemId(*args, **kwargs)
5091
5092 GetMacExitMenuItemId = staticmethod(GetMacExitMenuItemId)
5093 def GetMacHelpMenuTitleName(*args, **kwargs):
5094 """GetMacHelpMenuTitleName() -> String"""
5095 return _core_.PyApp_GetMacHelpMenuTitleName(*args, **kwargs)
5096
5097 GetMacHelpMenuTitleName = staticmethod(GetMacHelpMenuTitleName)
5098 def SetMacSupportPCMenuShortcuts(*args, **kwargs):
5099 """SetMacSupportPCMenuShortcuts(bool val)"""
5100 return _core_.PyApp_SetMacSupportPCMenuShortcuts(*args, **kwargs)
5101
5102 SetMacSupportPCMenuShortcuts = staticmethod(SetMacSupportPCMenuShortcuts)
5103 def SetMacAboutMenuItemId(*args, **kwargs):
5104 """SetMacAboutMenuItemId(long val)"""
5105 return _core_.PyApp_SetMacAboutMenuItemId(*args, **kwargs)
5106
5107 SetMacAboutMenuItemId = staticmethod(SetMacAboutMenuItemId)
5108 def SetMacPreferencesMenuItemId(*args, **kwargs):
5109 """SetMacPreferencesMenuItemId(long val)"""
5110 return _core_.PyApp_SetMacPreferencesMenuItemId(*args, **kwargs)
5111
5112 SetMacPreferencesMenuItemId = staticmethod(SetMacPreferencesMenuItemId)
5113 def SetMacExitMenuItemId(*args, **kwargs):
5114 """SetMacExitMenuItemId(long val)"""
5115 return _core_.PyApp_SetMacExitMenuItemId(*args, **kwargs)
5116
5117 SetMacExitMenuItemId = staticmethod(SetMacExitMenuItemId)
5118 def SetMacHelpMenuTitleName(*args, **kwargs):
5119 """SetMacHelpMenuTitleName(String val)"""
5120 return _core_.PyApp_SetMacHelpMenuTitleName(*args, **kwargs)
5121
5122 SetMacHelpMenuTitleName = staticmethod(SetMacHelpMenuTitleName)
5123 def _BootstrapApp(*args, **kwargs):
5124 """
5125 _BootstrapApp(self)
5126
5127 For internal use only
5128 """
5129 return _core_.PyApp__BootstrapApp(*args, **kwargs)
5130
5131 def GetComCtl32Version(*args, **kwargs):
5132 """
5133 GetComCtl32Version() -> int
5134
5135 Returns 400, 470, 471, etc. for comctl32.dll 4.00, 4.70, 4.71 or 0 if
5136 it wasn't found at all. Raises an exception on non-Windows platforms.
5137 """
5138 return _core_.PyApp_GetComCtl32Version(*args, **kwargs)
5139
5140 GetComCtl32Version = staticmethod(GetComCtl32Version)
5141
5142class PyAppPtr(PyApp):
5143 def __init__(self, this):
5144 self.this = this
5145 if not hasattr(self,"thisown"): self.thisown = 0
5146 self.__class__ = PyApp
5147_core_.PyApp_swigregister(PyAppPtr)
5148
5149def PyApp_IsMainLoopRunning(*args, **kwargs):
5150 """
5151 PyApp_IsMainLoopRunning() -> bool
5152
5153 Returns True if we're running the main loop, i.e. if the events can
5154 currently be dispatched.
5155 """
5156 return _core_.PyApp_IsMainLoopRunning(*args, **kwargs)
5157
5158def PyApp_GetMacSupportPCMenuShortcuts(*args, **kwargs):
5159 """PyApp_GetMacSupportPCMenuShortcuts() -> bool"""
5160 return _core_.PyApp_GetMacSupportPCMenuShortcuts(*args, **kwargs)
5161
5162def PyApp_GetMacAboutMenuItemId(*args, **kwargs):
5163 """PyApp_GetMacAboutMenuItemId() -> long"""
5164 return _core_.PyApp_GetMacAboutMenuItemId(*args, **kwargs)
5165
5166def PyApp_GetMacPreferencesMenuItemId(*args, **kwargs):
5167 """PyApp_GetMacPreferencesMenuItemId() -> long"""
5168 return _core_.PyApp_GetMacPreferencesMenuItemId(*args, **kwargs)
5169
5170def PyApp_GetMacExitMenuItemId(*args, **kwargs):
5171 """PyApp_GetMacExitMenuItemId() -> long"""
5172 return _core_.PyApp_GetMacExitMenuItemId(*args, **kwargs)
5173
5174def PyApp_GetMacHelpMenuTitleName(*args, **kwargs):
5175 """PyApp_GetMacHelpMenuTitleName() -> String"""
5176 return _core_.PyApp_GetMacHelpMenuTitleName(*args, **kwargs)
5177
5178def PyApp_SetMacSupportPCMenuShortcuts(*args, **kwargs):
5179 """PyApp_SetMacSupportPCMenuShortcuts(bool val)"""
5180 return _core_.PyApp_SetMacSupportPCMenuShortcuts(*args, **kwargs)
5181
5182def PyApp_SetMacAboutMenuItemId(*args, **kwargs):
5183 """PyApp_SetMacAboutMenuItemId(long val)"""
5184 return _core_.PyApp_SetMacAboutMenuItemId(*args, **kwargs)
5185
5186def PyApp_SetMacPreferencesMenuItemId(*args, **kwargs):
5187 """PyApp_SetMacPreferencesMenuItemId(long val)"""
5188 return _core_.PyApp_SetMacPreferencesMenuItemId(*args, **kwargs)
5189
5190def PyApp_SetMacExitMenuItemId(*args, **kwargs):
5191 """PyApp_SetMacExitMenuItemId(long val)"""
5192 return _core_.PyApp_SetMacExitMenuItemId(*args, **kwargs)
5193
5194def PyApp_SetMacHelpMenuTitleName(*args, **kwargs):
5195 """PyApp_SetMacHelpMenuTitleName(String val)"""
5196 return _core_.PyApp_SetMacHelpMenuTitleName(*args, **kwargs)
5197
5198def PyApp_GetComCtl32Version(*args, **kwargs):
5199 """
5200 PyApp_GetComCtl32Version() -> int
5201
5202 Returns 400, 470, 471, etc. for comctl32.dll 4.00, 4.70, 4.71 or 0 if
5203 it wasn't found at all. Raises an exception on non-Windows platforms.
5204 """
5205 return _core_.PyApp_GetComCtl32Version(*args, **kwargs)
5206
5207#---------------------------------------------------------------------------
5208
5209
5210def Exit(*args, **kwargs):
5211 """
5212 Exit()
5213
5214 Force an exit of the application. Convenience for wx.GetApp().Exit()
5215 """
5216 return _core_.Exit(*args, **kwargs)
5217
5218def Yield(*args, **kwargs):
5219 """
5220 Yield() -> bool
5221
5222 Yield to other apps/messages. Convenience for wx.GetApp().Yield()
5223 """
5224 return _core_.Yield(*args, **kwargs)
5225
5226def YieldIfNeeded(*args, **kwargs):
5227 """
5228 YieldIfNeeded() -> bool
5229
5230 Yield to other apps/messages. Convenience for wx.GetApp().Yield(True)
5231 """
5232 return _core_.YieldIfNeeded(*args, **kwargs)
5233
5234def SafeYield(*args, **kwargs):
5235 """
5236 SafeYield(Window win=None, bool onlyIfNeeded=False) -> bool
5237
5238 This function is similar to `wx.Yield`, except that it disables the
5239 user input to all program windows before calling `wx.Yield` and
5240 re-enables it again afterwards. If ``win`` is not None, this window
5241 will remain enabled, allowing the implementation of some limited user
5242 interaction.
5243
5244 :Returns: the result of the call to `wx.Yield`.
5245 """
5246 return _core_.SafeYield(*args, **kwargs)
5247
5248def WakeUpIdle(*args, **kwargs):
5249 """
5250 WakeUpIdle()
5251
5252 Cause the message queue to become empty again, so idle events will be
5253 sent.
5254 """
5255 return _core_.WakeUpIdle(*args, **kwargs)
5256
5257def PostEvent(*args, **kwargs):
5258 """
5259 PostEvent(EvtHandler dest, Event event)
5260
5261 Send an event to a window or other wx.EvtHandler to be processed
5262 later.
5263 """
5264 return _core_.PostEvent(*args, **kwargs)
5265
5266def App_CleanUp(*args, **kwargs):
5267 """
5268 App_CleanUp()
5269
5270 For internal use only, it is used to cleanup after wxWidgets when
5271 Python shuts down.
5272 """
5273 return _core_.App_CleanUp(*args, **kwargs)
5274
5275def GetApp(*args, **kwargs):
5276 """
5277 GetApp() -> PyApp
5278
5279 Return a reference to the current wx.App object.
5280 """
5281 return _core_.GetApp(*args, **kwargs)
5282
5283def SetDefaultPyEncoding(*args, **kwargs):
5284 """
5285 SetDefaultPyEncoding(string encoding)
5286
5287 Sets the encoding that wxPython will use when it needs to convert a
5288 Python string or unicode object to or from a wxString.
5289
5290 The default encoding is the value of ``locale.getdefaultlocale()[1]``
5291 but please be aware that the default encoding within the same locale
5292 may be slightly different on different platforms. For example, please
5293 see http://www.alanwood.net/demos/charsetdiffs.html for differences
5294 between the common latin/roman encodings.
5295 """
5296 return _core_.SetDefaultPyEncoding(*args, **kwargs)
5297
5298def GetDefaultPyEncoding(*args, **kwargs):
5299 """
5300 GetDefaultPyEncoding() -> string
5301
5302 Gets the current encoding that wxPython will use when it needs to
5303 convert a Python string or unicode object to or from a wxString.
5304 """
5305 return _core_.GetDefaultPyEncoding(*args, **kwargs)
5306#----------------------------------------------------------------------
5307
5308class PyOnDemandOutputWindow:
5309 """
5310 A class that can be used for redirecting Python's stdout and
5311 stderr streams. It will do nothing until something is wrriten to
5312 the stream at which point it will create a Frame with a text area
5313 and write the text there.
5314 """
5315 def __init__(self, title = "wxPython: stdout/stderr"):
5316 self.frame = None
5317 self.title = title
5318 self.pos = wx.DefaultPosition
5319 self.size = (450, 300)
5320 self.parent = None
5321
5322 def SetParent(self, parent):
5323 """Set the window to be used as the popup Frame's parent."""
5324 self.parent = parent
5325
5326
5327 def CreateOutputWindow(self, st):
5328 self.frame = wx.Frame(self.parent, -1, self.title, self.pos, self.size,
5329 style=wx.DEFAULT_FRAME_STYLE)
5330 self.text = wx.TextCtrl(self.frame, -1, "",
5331 style=wx.TE_MULTILINE|wx.TE_READONLY)
5332 self.text.AppendText(st)
5333 self.frame.Show(True)
5334 EVT_CLOSE(self.frame, self.OnCloseWindow)
5335
5336
5337 def OnCloseWindow(self, event):
5338 if self.frame is not None:
5339 self.frame.Destroy()
5340 self.frame = None
5341 self.text = None
5342
5343
5344 # These methods provide the file-like output behaviour.
5345 def write(self, text):
5346 """
5347 Create the output window if needed and write the string to it.
5348 If not called in the context of the gui thread then uses
5349 CallAfter to do the work there.
5350 """
5351 if self.frame is None:
5352 if not wx.Thread_IsMain():
5353 wx.CallAfter(self.CreateOutputWindow, text)
5354 else:
5355 self.CreateOutputWindow(text)
5356 else:
5357 if not wx.Thread_IsMain():
5358 wx.CallAfter(self.text.AppendText, text)
5359 else:
5360 self.text.AppendText(text)
5361
5362
5363 def close(self):
5364 if self.frame is not None:
5365 wx.CallAfter(self.frame.Close)
5366
5367
5368 def flush(self):
5369 pass
5370
5371
5372
5373#----------------------------------------------------------------------
5374
5375_defRedirect = (wx.Platform == '__WXMSW__' or wx.Platform == '__WXMAC__')
5376
5377class App(wx.PyApp):
5378 """
5379 The ``wx.App`` class represents the application and is used to:
5380
5381 * bootstrap the wxPython system and initialize the underlying
5382 gui toolkit
5383 * set and get application-wide properties
5384 * implement the windowing system main message or event loop,
5385 and to dispatch events to window instances
5386 * etc.
5387
5388 Every application must have a ``wx.App`` instance, and all
5389 creation of UI objects should be delayed until after the
5390 ``wx.App`` object has been created in order to ensure that the gui
5391 platform and wxWidgets have been fully initialized.
5392
5393 Normally you would derive from this class and implement an
5394 ``OnInit`` method that creates a frame and then calls
5395 ``self.SetTopWindow(frame)``.
5396
5397 :see: `wx.PySimpleApp` for a simpler app class that can be used
5398 directly.
5399 """
5400
5401 outputWindowClass = PyOnDemandOutputWindow
5402
5403 def __init__(self, redirect=_defRedirect, filename=None,
5404 useBestVisual=False, clearSigInt=True):
5405 """
5406 Construct a ``wx.App`` object.
5407
5408 :param redirect: Should ``sys.stdout`` and ``sys.stderr`` be
5409 redirected? Defaults to True on Windows and Mac, False
5410 otherwise. If `filename` is None then output will be
5411 redirected to a window that pops up as needed. (You can
5412 control what kind of window is created for the output by
5413 resetting the class variable ``outputWindowClass`` to a
5414 class of your choosing.)
5415
5416 :param filename: The name of a file to redirect output to, if
5417 redirect is True.
5418
5419 :param useBestVisual: Should the app try to use the best
5420 available visual provided by the system (only relevant on
5421 systems that have more than one visual.) This parameter
5422 must be used instead of calling `SetUseBestVisual` later
5423 on because it must be set before the underlying GUI
5424 toolkit is initialized.
5425
5426 :param clearSigInt: Should SIGINT be cleared? This allows the
5427 app to terminate upon a Ctrl-C in the console like other
5428 GUI apps will.
5429
5430 :note: You should override OnInit to do applicaition
5431 initialization to ensure that the system, toolkit and
5432 wxWidgets are fully initialized.
5433 """
5434 wx.PyApp.__init__(self)
5435
5436 if wx.Platform == "__WXMAC__":
5437 try:
5438 import MacOS
5439 if not MacOS.WMAvailable():
5440 print """\
5441This program needs access to the screen. Please run with 'pythonw',
5442not 'python', and only when you are logged in on the main display of
5443your Mac."""
5444 _sys.exit(1)
5445 except SystemExit:
5446 raise
5447 except:
5448 pass
5449
5450 # This has to be done before OnInit
5451 self.SetUseBestVisual(useBestVisual)
5452
5453 # Set the default handler for SIGINT. This fixes a problem
5454 # where if Ctrl-C is pressed in the console that started this
5455 # app then it will not appear to do anything, (not even send
5456 # KeyboardInterrupt???) but will later segfault on exit. By
5457 # setting the default handler then the app will exit, as
5458 # expected (depending on platform.)
5459 if clearSigInt:
5460 try:
5461 import signal
5462 signal.signal(signal.SIGINT, signal.SIG_DFL)
5463 except:
5464 pass
5465
5466 # Save and redirect the stdio to a window?
5467 self.stdioWin = None
5468 self.saveStdio = (_sys.stdout, _sys.stderr)
5469 if redirect:
5470 self.RedirectStdio(filename)
5471
5472 # Use Python's install prefix as the default
5473 wx.StandardPaths.Get().SetInstallPrefix(_sys.prefix)
5474
5475 # This finishes the initialization of wxWindows and then calls
5476 # the OnInit that should be present in the derived class
5477 self._BootstrapApp()
5478
5479
5480 def __del__(self):
5481 try:
5482 self.RestoreStdio() # Just in case the MainLoop was overridden
5483 except:
5484 pass
5485
5486
5487 def SetTopWindow(self, frame):
5488 """Set the \"main\" top level window"""
5489 if self.stdioWin:
5490 self.stdioWin.SetParent(frame)
5491 wx.PyApp.SetTopWindow(self, frame)
5492
5493
5494 def MainLoop(self):
5495 """Execute the main GUI event loop"""
5496 wx.PyApp.MainLoop(self)
5497 self.RestoreStdio()
5498
5499
5500 def RedirectStdio(self, filename=None):
5501 """Redirect sys.stdout and sys.stderr to a file or a popup window."""
5502 if filename:
5503 _sys.stdout = _sys.stderr = open(filename, 'a')
5504 else:
5505 self.stdioWin = self.outputWindowClass()
5506 _sys.stdout = _sys.stderr = self.stdioWin
5507
5508
5509 def RestoreStdio(self):
5510 _sys.stdout, _sys.stderr = self.saveStdio
5511
5512
5513 def SetOutputWindowAttributes(self, title=None, pos=None, size=None):
5514 """
5515 Set the title, position and/or size of the output window if
5516 the stdio has been redirected. This should be called before
5517 any output would cause the output window to be created.
5518 """
5519 if self.stdioWin:
5520 if title is not None:
5521 self.stdioWin.title = title
5522 if pos is not None:
5523 self.stdioWin.pos = pos
5524 if size is not None:
5525 self.stdioWin.size = size
5526
5527
5528
5529
5530# change from wx.PyApp_XX to wx.App_XX
5531App_GetMacSupportPCMenuShortcuts = _core_.PyApp_GetMacSupportPCMenuShortcuts
5532App_GetMacAboutMenuItemId = _core_.PyApp_GetMacAboutMenuItemId
5533App_GetMacPreferencesMenuItemId = _core_.PyApp_GetMacPreferencesMenuItemId
5534App_GetMacExitMenuItemId = _core_.PyApp_GetMacExitMenuItemId
5535App_GetMacHelpMenuTitleName = _core_.PyApp_GetMacHelpMenuTitleName
5536App_SetMacSupportPCMenuShortcuts = _core_.PyApp_SetMacSupportPCMenuShortcuts
5537App_SetMacAboutMenuItemId = _core_.PyApp_SetMacAboutMenuItemId
5538App_SetMacPreferencesMenuItemId = _core_.PyApp_SetMacPreferencesMenuItemId
5539App_SetMacExitMenuItemId = _core_.PyApp_SetMacExitMenuItemId
5540App_SetMacHelpMenuTitleName = _core_.PyApp_SetMacHelpMenuTitleName
5541App_GetComCtl32Version = _core_.PyApp_GetComCtl32Version
5542
5543#----------------------------------------------------------------------------
5544
5545class PySimpleApp(wx.App):
5546 """
5547 A simple application class. You can just create one of these and
5548 then then make your top level windows later, and not have to worry
5549 about OnInit. For example::
5550
5551 app = wx.PySimpleApp()
5552 frame = wx.Frame(None, title='Hello World')
5553 frame.Show()
5554 app.MainLoop()
5555
5556 :see: `wx.App`
5557 """
5558
5559 def __init__(self, redirect=False, filename=None,
5560 useBestVisual=False, clearSigInt=True):
5561 """
5562 :see: `wx.App.__init__`
5563 """
5564 wx.App.__init__(self, redirect, filename, useBestVisual, clearSigInt)
5565
5566 def OnInit(self):
5567 return True
5568
5569
5570
5571# Is anybody using this one?
5572class PyWidgetTester(wx.App):
5573 def __init__(self, size = (250, 100)):
5574 self.size = size
5575 wx.App.__init__(self, 0)
5576
5577 def OnInit(self):
5578 self.frame = wx.Frame(None, -1, "Widget Tester", pos=(0,0), size=self.size)
5579 self.SetTopWindow(self.frame)
5580 return True
5581
5582 def SetWidget(self, widgetClass, *args, **kwargs):
5583 w = widgetClass(self.frame, *args, **kwargs)
5584 self.frame.Show(True)
5585
5586#----------------------------------------------------------------------------
5587# DO NOT hold any other references to this object. This is how we
5588# know when to cleanup system resources that wxWidgets is holding. When
5589# the sys module is unloaded, the refcount on sys.__wxPythonCleanup
5590# goes to zero and it calls the wx.App_CleanUp function.
5591
5592class __wxPyCleanup:
5593 def __init__(self):
5594 self.cleanup = _core_.App_CleanUp
5595 def __del__(self):
5596 self.cleanup()
5597
5598_sys.__wxPythonCleanup = __wxPyCleanup()
5599
5600## # another possible solution, but it gets called too early...
5601## import atexit
5602## atexit.register(_core_.wxApp_CleanUp)
5603
5604
5605#----------------------------------------------------------------------------
5606
5607#---------------------------------------------------------------------------
5608
5609class EventLoop(object):
5610 """Proxy of C++ EventLoop class"""
5611 def __repr__(self):
5612 return "<%s.%s; proxy of C++ wxEventLoop instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
5613 def __init__(self, *args, **kwargs):
5614 """__init__(self) -> EventLoop"""
5615 newobj = _core_.new_EventLoop(*args, **kwargs)
5616 self.this = newobj.this
5617 self.thisown = 1
5618 del newobj.thisown
5619 def __del__(self, destroy=_core_.delete_EventLoop):
5620 """__del__(self)"""
5621 try:
5622 if self.thisown: destroy(self)
5623 except: pass
5624
5625 def Run(*args, **kwargs):
5626 """Run(self) -> int"""
5627 return _core_.EventLoop_Run(*args, **kwargs)
5628
5629 def Exit(*args, **kwargs):
5630 """Exit(self, int rc=0)"""
5631 return _core_.EventLoop_Exit(*args, **kwargs)
5632
5633 def Pending(*args, **kwargs):
5634 """Pending(self) -> bool"""
5635 return _core_.EventLoop_Pending(*args, **kwargs)
5636
5637 def Dispatch(*args, **kwargs):
5638 """Dispatch(self) -> bool"""
5639 return _core_.EventLoop_Dispatch(*args, **kwargs)
5640
5641 def IsRunning(*args, **kwargs):
5642 """IsRunning(self) -> bool"""
5643 return _core_.EventLoop_IsRunning(*args, **kwargs)
5644
5645 def GetActive(*args, **kwargs):
5646 """GetActive() -> EventLoop"""
5647 return _core_.EventLoop_GetActive(*args, **kwargs)
5648
5649 GetActive = staticmethod(GetActive)
5650 def SetActive(*args, **kwargs):
5651 """SetActive(EventLoop loop)"""
5652 return _core_.EventLoop_SetActive(*args, **kwargs)
5653
5654 SetActive = staticmethod(SetActive)
5655
5656class EventLoopPtr(EventLoop):
5657 def __init__(self, this):
5658 self.this = this
5659 if not hasattr(self,"thisown"): self.thisown = 0
5660 self.__class__ = EventLoop
5661_core_.EventLoop_swigregister(EventLoopPtr)
5662
5663def EventLoop_GetActive(*args, **kwargs):
5664 """EventLoop_GetActive() -> EventLoop"""
5665 return _core_.EventLoop_GetActive(*args, **kwargs)
5666
5667def EventLoop_SetActive(*args, **kwargs):
5668 """EventLoop_SetActive(EventLoop loop)"""
5669 return _core_.EventLoop_SetActive(*args, **kwargs)
5670
5671#---------------------------------------------------------------------------
5672
5673class AcceleratorEntry(object):
5674 """
5675 A class used to define items in an `wx.AcceleratorTable`. wxPython
5676 programs can choose to use wx.AcceleratorEntry objects, but using a
5677 list of 3-tuple of integers (flags, keyCode, cmdID) usually works just
5678 as well. See `__init__` for of the tuple values.
5679
5680 :see: `wx.AcceleratorTable`
5681 """
5682 def __repr__(self):
5683 return "<%s.%s; proxy of C++ wxAcceleratorEntry instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
5684 def __init__(self, *args, **kwargs):
5685 """
5686 __init__(self, int flags=0, int keyCode=0, int cmdID=0) -> AcceleratorEntry
5687
5688 Construct a wx.AcceleratorEntry.
5689 """
5690 newobj = _core_.new_AcceleratorEntry(*args, **kwargs)
5691 self.this = newobj.this
5692 self.thisown = 1
5693 del newobj.thisown
5694 def __del__(self, destroy=_core_.delete_AcceleratorEntry):
5695 """__del__(self)"""
5696 try:
5697 if self.thisown: destroy(self)
5698 except: pass
5699
5700 def Set(*args, **kwargs):
5701 """
5702 Set(self, int flags, int keyCode, int cmd)
5703
5704 (Re)set the attributes of a wx.AcceleratorEntry.
5705 :see `__init__`
5706 """
5707 return _core_.AcceleratorEntry_Set(*args, **kwargs)
5708
5709 def GetFlags(*args, **kwargs):
5710 """
5711 GetFlags(self) -> int
5712
5713 Get the AcceleratorEntry's flags.
5714 """
5715 return _core_.AcceleratorEntry_GetFlags(*args, **kwargs)
5716
5717 def GetKeyCode(*args, **kwargs):
5718 """
5719 GetKeyCode(self) -> int
5720
5721 Get the AcceleratorEntry's keycode.
5722 """
5723 return _core_.AcceleratorEntry_GetKeyCode(*args, **kwargs)
5724
5725 def GetCommand(*args, **kwargs):
5726 """
5727 GetCommand(self) -> int
5728
5729 Get the AcceleratorEntry's command ID.
5730 """
5731 return _core_.AcceleratorEntry_GetCommand(*args, **kwargs)
5732
5733
5734class AcceleratorEntryPtr(AcceleratorEntry):
5735 def __init__(self, this):
5736 self.this = this
5737 if not hasattr(self,"thisown"): self.thisown = 0
5738 self.__class__ = AcceleratorEntry
5739_core_.AcceleratorEntry_swigregister(AcceleratorEntryPtr)
5740
5741class AcceleratorTable(Object):
5742 """
5743 An accelerator table allows the application to specify a table of
5744 keyboard shortcuts for menus or other commands. On Windows, menu or
5745 button commands are supported; on GTK, only menu commands are
5746 supported.
5747 """
5748 def __repr__(self):
5749 return "<%s.%s; proxy of C++ wxAcceleratorTable instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
5750 def __init__(self, *args, **kwargs):
5751 """
5752 __init__(entries) -> AcceleratorTable
5753
5754 Construct an AcceleratorTable from a list of `wx.AcceleratorEntry`
5755 items or or of 3-tuples (flags, keyCode, cmdID)
5756
5757 :see: `wx.AcceleratorEntry`
5758 """
5759 newobj = _core_.new_AcceleratorTable(*args, **kwargs)
5760 self.this = newobj.this
5761 self.thisown = 1
5762 del newobj.thisown
5763 def __del__(self, destroy=_core_.delete_AcceleratorTable):
5764 """__del__(self)"""
5765 try:
5766 if self.thisown: destroy(self)
5767 except: pass
5768
5769 def Ok(*args, **kwargs):
5770 """Ok(self) -> bool"""
5771 return _core_.AcceleratorTable_Ok(*args, **kwargs)
5772
5773
5774class AcceleratorTablePtr(AcceleratorTable):
5775 def __init__(self, this):
5776 self.this = this
5777 if not hasattr(self,"thisown"): self.thisown = 0
5778 self.__class__ = AcceleratorTable
5779_core_.AcceleratorTable_swigregister(AcceleratorTablePtr)
5780
5781
5782def GetAccelFromString(*args, **kwargs):
5783 """GetAccelFromString(String label) -> AcceleratorEntry"""
5784 return _core_.GetAccelFromString(*args, **kwargs)
5785#---------------------------------------------------------------------------
5786
5787class VisualAttributes(object):
5788 """struct containing all the visual attributes of a control"""
5789 def __repr__(self):
5790 return "<%s.%s; proxy of C++ wxVisualAttributes instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
5791 def __init__(self, *args, **kwargs):
5792 """
5793 __init__(self) -> VisualAttributes
5794
5795 struct containing all the visual attributes of a control
5796 """
5797 newobj = _core_.new_VisualAttributes(*args, **kwargs)
5798 self.this = newobj.this
5799 self.thisown = 1
5800 del newobj.thisown
5801 def __del__(self, destroy=_core_.delete_VisualAttributes):
5802 """__del__(self)"""
5803 try:
5804 if self.thisown: destroy(self)
5805 except: pass
5806
5807 font = property(_core_.VisualAttributes_font_get, _core_.VisualAttributes_font_set)
5808 colFg = property(_core_.VisualAttributes_colFg_get, _core_.VisualAttributes_colFg_set)
5809 colBg = property(_core_.VisualAttributes_colBg_get, _core_.VisualAttributes_colBg_set)
5810
5811class VisualAttributesPtr(VisualAttributes):
5812 def __init__(self, this):
5813 self.this = this
5814 if not hasattr(self,"thisown"): self.thisown = 0
5815 self.__class__ = VisualAttributes
5816_core_.VisualAttributes_swigregister(VisualAttributesPtr)
5817NullAcceleratorTable = cvar.NullAcceleratorTable
5818PanelNameStr = cvar.PanelNameStr
5819
5820WINDOW_VARIANT_NORMAL = _core_.WINDOW_VARIANT_NORMAL
5821WINDOW_VARIANT_SMALL = _core_.WINDOW_VARIANT_SMALL
5822WINDOW_VARIANT_MINI = _core_.WINDOW_VARIANT_MINI
5823WINDOW_VARIANT_LARGE = _core_.WINDOW_VARIANT_LARGE
5824WINDOW_VARIANT_MAX = _core_.WINDOW_VARIANT_MAX
5825class Window(EvtHandler):
5826 """
5827 wx.Window is the base class for all windows and represents any visible
5828 object on the screen. All controls, top level windows and so on are
5829 wx.Windows. Sizers and device contexts are not however, as they don't
5830 appear on screen themselves.
5831
5832 """
5833 def __repr__(self):
5834 return "<%s.%s; proxy of C++ wxWindow instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
5835 def __init__(self, *args, **kwargs):
5836 """
5837 __init__(self, Window parent, int id=-1, Point pos=DefaultPosition,
5838 Size size=DefaultSize, long style=0, String name=PanelNameStr) -> Window
5839
5840 Construct and show a generic Window.
5841 """
5842 newobj = _core_.new_Window(*args, **kwargs)
5843 self.this = newobj.this
5844 self.thisown = 1
5845 del newobj.thisown
5846 self._setOORInfo(self)
5847
5848 def Create(*args, **kwargs):
5849 """
5850 Create(self, Window parent, int id=-1, Point pos=DefaultPosition,
5851 Size size=DefaultSize, long style=0, String name=PanelNameStr) -> bool
5852
5853 Create the GUI part of the Window for 2-phase creation mode.
5854 """
5855 return _core_.Window_Create(*args, **kwargs)
5856
5857 def Close(*args, **kwargs):
5858 """
5859 Close(self, bool force=False) -> bool
5860
5861 This function simply generates a EVT_CLOSE event whose handler usually
5862 tries to close the window. It doesn't close the window itself,
5863 however. If force is False (the default) then the window's close
5864 handler will be allowed to veto the destruction of the window.
5865 """
5866 return _core_.Window_Close(*args, **kwargs)
5867
5868 def Destroy(*args, **kwargs):
5869 """
5870 Destroy(self) -> bool
5871
5872 Destroys the window safely. Frames and dialogs are not destroyed
5873 immediately when this function is called -- they are added to a list
5874 of windows to be deleted on idle time, when all the window's events
5875 have been processed. This prevents problems with events being sent to
5876 non-existent windows.
5877
5878 Returns True if the window has either been successfully deleted, or it
5879 has been added to the list of windows pending real deletion.
5880 """
5881 return _core_.Window_Destroy(*args, **kwargs)
5882
5883 def DestroyChildren(*args, **kwargs):
5884 """
5885 DestroyChildren(self) -> bool
5886
5887 Destroys all children of a window. Called automatically by the
5888 destructor.
5889 """
5890 return _core_.Window_DestroyChildren(*args, **kwargs)
5891
5892 def IsBeingDeleted(*args, **kwargs):
5893 """
5894 IsBeingDeleted(self) -> bool
5895
5896 Is the window in the process of being deleted?
5897 """
5898 return _core_.Window_IsBeingDeleted(*args, **kwargs)
5899
5900 def SetTitle(*args, **kwargs):
5901 """
5902 SetTitle(self, String title)
5903
5904 Sets the window's title. Applicable only to frames and dialogs.
5905 """
5906 return _core_.Window_SetTitle(*args, **kwargs)
5907
5908 def GetTitle(*args, **kwargs):
5909 """
5910 GetTitle(self) -> String
5911
5912 Gets the window's title. Applicable only to frames and dialogs.
5913 """
5914 return _core_.Window_GetTitle(*args, **kwargs)
5915
5916 def SetLabel(*args, **kwargs):
5917 """
5918 SetLabel(self, String label)
5919
5920 Set the text which the window shows in its label if applicable.
5921 """
5922 return _core_.Window_SetLabel(*args, **kwargs)
5923
5924 def GetLabel(*args, **kwargs):
5925 """
5926 GetLabel(self) -> String
5927
5928 Generic way of getting a label from any window, for identification
5929 purposes. The interpretation of this function differs from class to
5930 class. For frames and dialogs, the value returned is the title. For
5931 buttons or static text controls, it is the button text. This function
5932 can be useful for meta-programs such as testing tools or special-needs
5933 access programs)which need to identify windows by name.
5934 """
5935 return _core_.Window_GetLabel(*args, **kwargs)
5936
5937 def SetName(*args, **kwargs):
5938 """
5939 SetName(self, String name)
5940
5941 Sets the window's name. The window name is used for ressource setting
5942 in X, it is not the same as the window title/label
5943 """
5944 return _core_.Window_SetName(*args, **kwargs)
5945
5946 def GetName(*args, **kwargs):
5947 """
5948 GetName(self) -> String
5949
5950 Returns the windows name. This name is not guaranteed to be unique;
5951 it is up to the programmer to supply an appropriate name in the window
5952 constructor or via wx.Window.SetName.
5953 """
5954 return _core_.Window_GetName(*args, **kwargs)
5955
5956 def SetWindowVariant(*args, **kwargs):
5957 """
5958 SetWindowVariant(self, int variant)
5959
5960 Sets the variant of the window/font size to use for this window, if
5961 the platform supports variants, for example, wxMac.
5962 """
5963 return _core_.Window_SetWindowVariant(*args, **kwargs)
5964
5965 def GetWindowVariant(*args, **kwargs):
5966 """GetWindowVariant(self) -> int"""
5967 return _core_.Window_GetWindowVariant(*args, **kwargs)
5968
5969 def SetId(*args, **kwargs):
5970 """
5971 SetId(self, int winid)
5972
5973 Sets the identifier of the window. Each window has an integer
5974 identifier. If the application has not provided one, an identifier
5975 will be generated. Normally, the identifier should be provided on
5976 creation and should not be modified subsequently.
5977 """
5978 return _core_.Window_SetId(*args, **kwargs)
5979
5980 def GetId(*args, **kwargs):
5981 """
5982 GetId(self) -> int
5983
5984 Returns the identifier of the window. Each window has an integer
5985 identifier. If the application has not provided one (or the default Id
5986 -1 is used) then an unique identifier with a negative value will be
5987 generated.
5988 """
5989 return _core_.Window_GetId(*args, **kwargs)
5990
5991 def NewControlId(*args, **kwargs):
5992 """
5993 NewControlId() -> int
5994
5995 Generate a control id for the controls which were not given one.
5996 """
5997 return _core_.Window_NewControlId(*args, **kwargs)
5998
5999 NewControlId = staticmethod(NewControlId)
6000 def NextControlId(*args, **kwargs):
6001 """
6002 NextControlId(int winid) -> int
6003
6004 Get the id of the control following the one with the given
6005 autogenerated) id
6006 """
6007 return _core_.Window_NextControlId(*args, **kwargs)
6008
6009 NextControlId = staticmethod(NextControlId)
6010 def PrevControlId(*args, **kwargs):
6011 """
6012 PrevControlId(int winid) -> int
6013
6014 Get the id of the control preceding the one with the given
6015 autogenerated) id
6016 """
6017 return _core_.Window_PrevControlId(*args, **kwargs)
6018
6019 PrevControlId = staticmethod(PrevControlId)
6020 def SetSize(*args, **kwargs):
6021 """
6022 SetSize(self, Size size)
6023
6024 Sets the size of the window in pixels.
6025 """
6026 return _core_.Window_SetSize(*args, **kwargs)
6027
6028 def SetDimensions(*args, **kwargs):
6029 """
6030 SetDimensions(self, int x, int y, int width, int height, int sizeFlags=SIZE_AUTO)
6031
6032 Sets the position and size of the window in pixels. The sizeFlags
6033 parameter indicates the interpretation of the other params if they are
6034 equal to -1.
6035
6036 ======================== ======================================
6037 wx.SIZE_AUTO A -1 indicates that a class-specific
6038 default should be used.
6039 wx.SIZE_USE_EXISTING Axisting dimensions should be used if
6040 -1 values are supplied.
6041 wxSIZE_ALLOW_MINUS_ONE Allow dimensions of -1 and less to be
6042 interpreted as real dimensions, not
6043 default values.
6044 ======================== ======================================
6045
6046 """
6047 return _core_.Window_SetDimensions(*args, **kwargs)
6048
6049 def SetRect(*args, **kwargs):
6050 """
6051 SetRect(self, Rect rect, int sizeFlags=SIZE_AUTO)
6052
6053 Sets the position and size of the window in pixels using a wx.Rect.
6054 """
6055 return _core_.Window_SetRect(*args, **kwargs)
6056
6057 def SetSizeWH(*args, **kwargs):
6058 """
6059 SetSizeWH(self, int width, int height)
6060
6061 Sets the size of the window in pixels.
6062 """
6063 return _core_.Window_SetSizeWH(*args, **kwargs)
6064
6065 def Move(*args, **kwargs):
6066 """
6067 Move(self, Point pt, int flags=SIZE_USE_EXISTING)
6068
6069 Moves the window to the given position.
6070 """
6071 return _core_.Window_Move(*args, **kwargs)
6072
6073 SetPosition = Move
6074 def MoveXY(*args, **kwargs):
6075 """
6076 MoveXY(self, int x, int y, int flags=SIZE_USE_EXISTING)
6077
6078 Moves the window to the given position.
6079 """
6080 return _core_.Window_MoveXY(*args, **kwargs)
6081
6082 def SetBestFittingSize(*args, **kwargs):
6083 """
6084 SetBestFittingSize(self, Size size=DefaultSize)
6085
6086 A 'Smart' SetSize that will fill in default size components with the
6087 window's *best size* values. Also set's the minsize for use with sizers.
6088 """
6089 return _core_.Window_SetBestFittingSize(*args, **kwargs)
6090
6091 def Raise(*args, **kwargs):
6092 """
6093 Raise(self)
6094
6095 Raises the window to the top of the window hierarchy if it is a
6096 managed window (dialog or frame).
6097 """
6098 return _core_.Window_Raise(*args, **kwargs)
6099
6100 def Lower(*args, **kwargs):
6101 """
6102 Lower(self)
6103
6104 Lowers the window to the bottom of the window hierarchy if it is a
6105 managed window (dialog or frame).
6106 """
6107 return _core_.Window_Lower(*args, **kwargs)
6108
6109 def SetClientSize(*args, **kwargs):
6110 """
6111 SetClientSize(self, Size size)
6112
6113 This sets the size of the window client area in pixels. Using this
6114 function to size a window tends to be more device-independent than
6115 wx.Window.SetSize, since the application need not worry about what
6116 dimensions the border or title bar have when trying to fit the window
6117 around panel items, for example.
6118 """
6119 return _core_.Window_SetClientSize(*args, **kwargs)
6120
6121 def SetClientSizeWH(*args, **kwargs):
6122 """
6123 SetClientSizeWH(self, int width, int height)
6124
6125 This sets the size of the window client area in pixels. Using this
6126 function to size a window tends to be more device-independent than
6127 wx.Window.SetSize, since the application need not worry about what
6128 dimensions the border or title bar have when trying to fit the window
6129 around panel items, for example.
6130 """
6131 return _core_.Window_SetClientSizeWH(*args, **kwargs)
6132
6133 def SetClientRect(*args, **kwargs):
6134 """
6135 SetClientRect(self, Rect rect)
6136
6137 This sets the size of the window client area in pixels. Using this
6138 function to size a window tends to be more device-independent than
6139 wx.Window.SetSize, since the application need not worry about what
6140 dimensions the border or title bar have when trying to fit the window
6141 around panel items, for example.
6142 """
6143 return _core_.Window_SetClientRect(*args, **kwargs)
6144
6145 def GetPosition(*args, **kwargs):
6146 """
6147 GetPosition(self) -> Point
6148
6149 Get the window's position.
6150 """
6151 return _core_.Window_GetPosition(*args, **kwargs)
6152
6153 def GetPositionTuple(*args, **kwargs):
6154 """
6155 GetPositionTuple() -> (x,y)
6156
6157 Get the window's position.
6158 """
6159 return _core_.Window_GetPositionTuple(*args, **kwargs)
6160
6161 def GetSize(*args, **kwargs):
6162 """
6163 GetSize(self) -> Size
6164
6165 Get the window size.
6166 """
6167 return _core_.Window_GetSize(*args, **kwargs)
6168
6169 def GetSizeTuple(*args, **kwargs):
6170 """
6171 GetSizeTuple() -> (width, height)
6172
6173 Get the window size.
6174 """
6175 return _core_.Window_GetSizeTuple(*args, **kwargs)
6176
6177 def GetRect(*args, **kwargs):
6178 """
6179 GetRect(self) -> Rect
6180
6181 Returns the size and position of the window as a wx.Rect object.
6182 """
6183 return _core_.Window_GetRect(*args, **kwargs)
6184
6185 def GetClientSize(*args, **kwargs):
6186 """
6187 GetClientSize(self) -> Size
6188
6189 This gets the size of the window's 'client area' in pixels. The client
6190 area is the area which may be drawn on by the programmer, excluding
6191 title bar, border, scrollbars, etc.
6192 """
6193 return _core_.Window_GetClientSize(*args, **kwargs)
6194
6195 def GetClientSizeTuple(*args, **kwargs):
6196 """
6197 GetClientSizeTuple() -> (width, height)
6198
6199 This gets the size of the window's 'client area' in pixels. The client
6200 area is the area which may be drawn on by the programmer, excluding
6201 title bar, border, scrollbars, etc.
6202 """
6203 return _core_.Window_GetClientSizeTuple(*args, **kwargs)
6204
6205 def GetClientAreaOrigin(*args, **kwargs):
6206 """
6207 GetClientAreaOrigin(self) -> Point
6208
6209 Get the origin of the client area of the window relative to the
6210 window's top left corner (the client area may be shifted because of
6211 the borders, scrollbars, other decorations...)
6212 """
6213 return _core_.Window_GetClientAreaOrigin(*args, **kwargs)
6214
6215 def GetClientRect(*args, **kwargs):
6216 """
6217 GetClientRect(self) -> Rect
6218
6219 Get the client area position and size as a `wx.Rect` object.
6220 """
6221 return _core_.Window_GetClientRect(*args, **kwargs)
6222
6223 def GetBestSize(*args, **kwargs):
6224 """
6225 GetBestSize(self) -> Size
6226
6227 This function returns the best acceptable minimal size for the
6228 window, if applicable. For example, for a static text control, it will
6229 be the minimal size such that the control label is not truncated. For
6230 windows containing subwindows (suzh aswx.Panel), the size returned by
6231 this function will be the same as the size the window would have had
6232 after calling Fit.
6233 """
6234 return _core_.Window_GetBestSize(*args, **kwargs)
6235
6236 def GetBestSizeTuple(*args, **kwargs):
6237 """
6238 GetBestSizeTuple() -> (width, height)
6239
6240 This function returns the best acceptable minimal size for the
6241 window, if applicable. For example, for a static text control, it will
6242 be the minimal size such that the control label is not truncated. For
6243 windows containing subwindows (suzh aswx.Panel), the size returned by
6244 this function will be the same as the size the window would have had
6245 after calling Fit.
6246 """
6247 return _core_.Window_GetBestSizeTuple(*args, **kwargs)
6248
6249 def InvalidateBestSize(*args, **kwargs):
6250 """
6251 InvalidateBestSize(self)
6252
6253 Reset the cached best size value so it will be recalculated the next
6254 time it is needed.
6255 """
6256 return _core_.Window_InvalidateBestSize(*args, **kwargs)
6257
6258 def GetBestFittingSize(*args, **kwargs):
6259 """
6260 GetBestFittingSize(self) -> Size
6261
6262 This function will merge the window's best size into the window's
6263 minimum size, giving priority to the min size components, and returns
6264 the results.
6265
6266 """
6267 return _core_.Window_GetBestFittingSize(*args, **kwargs)
6268
6269 def GetAdjustedBestSize(*args, **kwargs):
6270 """
6271 GetAdjustedBestSize(self) -> Size
6272
6273 This method is similar to GetBestSize, except in one
6274 thing. GetBestSize should return the minimum untruncated size of the
6275 window, while this method will return the largest of BestSize and any
6276 user specified minimum size. ie. it is the minimum size the window
6277 should currently be drawn at, not the minimal size it can possibly
6278 tolerate.
6279 """
6280 return _core_.Window_GetAdjustedBestSize(*args, **kwargs)
6281
6282 def Center(*args, **kwargs):
6283 """
6284 Center(self, int direction=BOTH)
6285
6286 Centers the window. The parameter specifies the direction for
6287 cetering, and may be wx.HORIZONTAL, wx.VERTICAL or wx.BOTH. It may
6288 also include wx.CENTER_ON_SCREEN flag if you want to center the window
6289 on the entire screen and not on its parent window. If it is a
6290 top-level window and has no parent then it will always be centered
6291 relative to the screen.
6292 """
6293 return _core_.Window_Center(*args, **kwargs)
6294
6295 Centre = Center
6296 def CenterOnScreen(*args, **kwargs):
6297 """
6298 CenterOnScreen(self, int dir=BOTH)
6299
6300 Center on screen (only works for top level windows)
6301 """
6302 return _core_.Window_CenterOnScreen(*args, **kwargs)
6303
6304 CentreOnScreen = CenterOnScreen
6305 def CenterOnParent(*args, **kwargs):
6306 """
6307 CenterOnParent(self, int dir=BOTH)
6308
6309 Center with respect to the the parent window
6310 """
6311 return _core_.Window_CenterOnParent(*args, **kwargs)
6312
6313 CentreOnParent = CenterOnParent
6314 def Fit(*args, **kwargs):
6315 """
6316 Fit(self)
6317
6318 Sizes the window so that it fits around its subwindows. This function
6319 won't do anything if there are no subwindows and will only really work
6320 correctly if sizers are used for the subwindows layout. Also, if the
6321 window has exactly one subwindow it is better (faster and the result
6322 is more precise as Fit adds some margin to account for fuzziness of
6323 its calculations) to call window.SetClientSize(child.GetSize())
6324 instead of calling Fit.
6325 """
6326 return _core_.Window_Fit(*args, **kwargs)
6327
6328 def FitInside(*args, **kwargs):
6329 """
6330 FitInside(self)
6331
6332 Similar to Fit, but sizes the interior (virtual) size of a
6333 window. Mainly useful with scrolled windows to reset scrollbars after
6334 sizing changes that do not trigger a size event, and/or scrolled
6335 windows without an interior sizer. This function similarly won't do
6336 anything if there are no subwindows.
6337 """
6338 return _core_.Window_FitInside(*args, **kwargs)
6339
6340 def SetSizeHints(*args, **kwargs):
6341 """
6342 SetSizeHints(self, int minW, int minH, int maxW=-1, int maxH=-1, int incW=-1,
6343 int incH=-1)
6344
6345 Allows specification of minimum and maximum window sizes, and window
6346 size increments. If a pair of values is not set (or set to -1), the
6347 default values will be used. If this function is called, the user
6348 will not be able to size the window outside the given bounds (if it is
6349 a top-level window.) Sizers will also inspect the minimum window size
6350 and will use that value if set when calculating layout.
6351
6352 The resizing increments are only significant under Motif or Xt.
6353 """
6354 return _core_.Window_SetSizeHints(*args, **kwargs)
6355
6356 def SetSizeHintsSz(*args, **kwargs):
6357 """
6358 SetSizeHintsSz(self, Size minSize, Size maxSize=DefaultSize, Size incSize=DefaultSize)
6359
6360 Allows specification of minimum and maximum window sizes, and window
6361 size increments. If a pair of values is not set (or set to -1), the
6362 default values will be used. If this function is called, the user
6363 will not be able to size the window outside the given bounds (if it is
6364 a top-level window.) Sizers will also inspect the minimum window size
6365 and will use that value if set when calculating layout.
6366
6367 The resizing increments are only significant under Motif or Xt.
6368 """
6369 return _core_.Window_SetSizeHintsSz(*args, **kwargs)
6370
6371 def SetVirtualSizeHints(*args, **kwargs):
6372 """
6373 SetVirtualSizeHints(self, int minW, int minH, int maxW=-1, int maxH=-1)
6374
6375 Allows specification of minimum and maximum virtual window sizes. If a
6376 pair of values is not set (or set to -1), the default values will be
6377 used. If this function is called, the user will not be able to size
6378 the virtual area of the window outside the given bounds.
6379 """
6380 return _core_.Window_SetVirtualSizeHints(*args, **kwargs)
6381
6382 def SetVirtualSizeHintsSz(*args, **kwargs):
6383 """
6384 SetVirtualSizeHintsSz(self, Size minSize, Size maxSize=DefaultSize)
6385
6386 Allows specification of minimum and maximum virtual window sizes. If a
6387 pair of values is not set (or set to -1), the default values will be
6388 used. If this function is called, the user will not be able to size
6389 the virtual area of the window outside the given bounds.
6390 """
6391 return _core_.Window_SetVirtualSizeHintsSz(*args, **kwargs)
6392
6393 def GetMaxSize(*args, **kwargs):
6394 """GetMaxSize(self) -> Size"""
6395 return _core_.Window_GetMaxSize(*args, **kwargs)
6396
6397 def GetMinSize(*args, **kwargs):
6398 """GetMinSize(self) -> Size"""
6399 return _core_.Window_GetMinSize(*args, **kwargs)
6400
6401 def SetMinSize(*args, **kwargs):
6402 """
6403 SetMinSize(self, Size minSize)
6404
6405 A more convenient method than `SetSizeHints` for setting just the
6406 min size.
6407 """
6408 return _core_.Window_SetMinSize(*args, **kwargs)
6409
6410 def SetMaxSize(*args, **kwargs):
6411 """
6412 SetMaxSize(self, Size maxSize)
6413
6414 A more convenient method than `SetSizeHints` for setting just the
6415 max size.
6416 """
6417 return _core_.Window_SetMaxSize(*args, **kwargs)
6418
6419 def GetMinWidth(*args, **kwargs):
6420 """GetMinWidth(self) -> int"""
6421 return _core_.Window_GetMinWidth(*args, **kwargs)
6422
6423 def GetMinHeight(*args, **kwargs):
6424 """GetMinHeight(self) -> int"""
6425 return _core_.Window_GetMinHeight(*args, **kwargs)
6426
6427 def GetMaxWidth(*args, **kwargs):
6428 """GetMaxWidth(self) -> int"""
6429 return _core_.Window_GetMaxWidth(*args, **kwargs)
6430
6431 def GetMaxHeight(*args, **kwargs):
6432 """GetMaxHeight(self) -> int"""
6433 return _core_.Window_GetMaxHeight(*args, **kwargs)
6434
6435 def SetVirtualSize(*args, **kwargs):
6436 """
6437 SetVirtualSize(self, Size size)
6438
6439 Set the the virtual size of a window in pixels. For most windows this
6440 is just the client area of the window, but for some like scrolled
6441 windows it is more or less independent of the screen window size.
6442 """
6443 return _core_.Window_SetVirtualSize(*args, **kwargs)
6444
6445 def SetVirtualSizeWH(*args, **kwargs):
6446 """
6447 SetVirtualSizeWH(self, int w, int h)
6448
6449 Set the the virtual size of a window in pixels. For most windows this
6450 is just the client area of the window, but for some like scrolled
6451 windows it is more or less independent of the screen window size.
6452 """
6453 return _core_.Window_SetVirtualSizeWH(*args, **kwargs)
6454
6455 def GetVirtualSize(*args, **kwargs):
6456 """
6457 GetVirtualSize(self) -> Size
6458
6459 Get the the virtual size of the window in pixels. For most windows
6460 this is just the client area of the window, but for some like scrolled
6461 windows it is more or less independent of the screen window size.
6462 """
6463 return _core_.Window_GetVirtualSize(*args, **kwargs)
6464
6465 def GetVirtualSizeTuple(*args, **kwargs):
6466 """
6467 GetVirtualSizeTuple() -> (width, height)
6468
6469 Get the the virtual size of the window in pixels. For most windows
6470 this is just the client area of the window, but for some like scrolled
6471 windows it is more or less independent of the screen window size.
6472 """
6473 return _core_.Window_GetVirtualSizeTuple(*args, **kwargs)
6474
6475 def GetBestVirtualSize(*args, **kwargs):
6476 """
6477 GetBestVirtualSize(self) -> Size
6478
6479 Return the largest of ClientSize and BestSize (as determined by a
6480 sizer, interior children, or other means)
6481 """
6482 return _core_.Window_GetBestVirtualSize(*args, **kwargs)
6483
6484 def Show(*args, **kwargs):
6485 """
6486 Show(self, bool show=True) -> bool
6487
6488 Shows or hides the window. You may need to call Raise for a top level
6489 window if you want to bring it to top, although this is not needed if
6490 Show is called immediately after the frame creation. Returns True if
6491 the window has been shown or hidden or False if nothing was done
6492 because it already was in the requested state.
6493 """
6494 return _core_.Window_Show(*args, **kwargs)
6495
6496 def Hide(*args, **kwargs):
6497 """
6498 Hide(self) -> bool
6499
6500 Equivalent to calling Show(False).
6501 """
6502 return _core_.Window_Hide(*args, **kwargs)
6503
6504 def Enable(*args, **kwargs):
6505 """
6506 Enable(self, bool enable=True) -> bool
6507
6508 Enable or disable the window for user input. Note that when a parent
6509 window is disabled, all of its children are disabled as well and they
6510 are reenabled again when the parent is. Returns true if the window
6511 has been enabled or disabled, false if nothing was done, i.e. if the
6512 window had already been in the specified state.
6513 """
6514 return _core_.Window_Enable(*args, **kwargs)
6515
6516 def Disable(*args, **kwargs):
6517 """
6518 Disable(self) -> bool
6519
6520 Disables the window, same as Enable(false).
6521 """
6522 return _core_.Window_Disable(*args, **kwargs)
6523
6524 def IsShown(*args, **kwargs):
6525 """
6526 IsShown(self) -> bool
6527
6528 Returns true if the window is shown, false if it has been hidden.
6529 """
6530 return _core_.Window_IsShown(*args, **kwargs)
6531
6532 def IsEnabled(*args, **kwargs):
6533 """
6534 IsEnabled(self) -> bool
6535
6536 Returns true if the window is enabled for input, false otherwise.
6537 """
6538 return _core_.Window_IsEnabled(*args, **kwargs)
6539
6540 def SetWindowStyleFlag(*args, **kwargs):
6541 """
6542 SetWindowStyleFlag(self, long style)
6543
6544 Sets the style of the window. Please note that some styles cannot be
6545 changed after the window creation and that Refresh() might need to be
6546 called after changing the others for the change to take place
6547 immediately.
6548 """
6549 return _core_.Window_SetWindowStyleFlag(*args, **kwargs)
6550
6551 def GetWindowStyleFlag(*args, **kwargs):
6552 """
6553 GetWindowStyleFlag(self) -> long
6554
6555 Gets the window style that was passed to the constructor or Create
6556 method.
6557 """
6558 return _core_.Window_GetWindowStyleFlag(*args, **kwargs)
6559
6560 SetWindowStyle = SetWindowStyleFlag; GetWindowStyle = GetWindowStyleFlag
6561 def HasFlag(*args, **kwargs):
6562 """
6563 HasFlag(self, int flag) -> bool
6564
6565 Test if the given style is set for this window.
6566 """
6567 return _core_.Window_HasFlag(*args, **kwargs)
6568
6569 def IsRetained(*args, **kwargs):
6570 """
6571 IsRetained(self) -> bool
6572
6573 Returns true if the window is retained, false otherwise. Retained
6574 windows are only available on X platforms.
6575 """
6576 return _core_.Window_IsRetained(*args, **kwargs)
6577
6578 def SetExtraStyle(*args, **kwargs):
6579 """
6580 SetExtraStyle(self, long exStyle)
6581
6582 Sets the extra style bits for the window. Extra styles are the less
6583 often used style bits which can't be set with the constructor or with
6584 SetWindowStyleFlag()
6585 """
6586 return _core_.Window_SetExtraStyle(*args, **kwargs)
6587
6588 def GetExtraStyle(*args, **kwargs):
6589 """
6590 GetExtraStyle(self) -> long
6591
6592 Returns the extra style bits for the window.
6593 """
6594 return _core_.Window_GetExtraStyle(*args, **kwargs)
6595
6596 def MakeModal(*args, **kwargs):
6597 """
6598 MakeModal(self, bool modal=True)
6599
6600 Disables all other windows in the application so that the user can
6601 only interact with this window. Passing False will reverse this
6602 effect.
6603 """
6604 return _core_.Window_MakeModal(*args, **kwargs)
6605
6606 def SetThemeEnabled(*args, **kwargs):
6607 """
6608 SetThemeEnabled(self, bool enableTheme)
6609
6610 This function tells a window if it should use the system's "theme"
6611 code to draw the windows' background instead if its own background
6612 drawing code. This will only have an effect on platforms that support
6613 the notion of themes in user defined windows. One such platform is
6614 GTK+ where windows can have (very colourful) backgrounds defined by a
6615 user's selected theme.
6616
6617 Dialogs, notebook pages and the status bar have this flag set to true
6618 by default so that the default look and feel is simulated best.
6619 """
6620 return _core_.Window_SetThemeEnabled(*args, **kwargs)
6621
6622 def GetThemeEnabled(*args, **kwargs):
6623 """
6624 GetThemeEnabled(self) -> bool
6625
6626 Return the themeEnabled flag.
6627 """
6628 return _core_.Window_GetThemeEnabled(*args, **kwargs)
6629
6630 def SetFocus(*args, **kwargs):
6631 """
6632 SetFocus(self)
6633
6634 Set's the focus to this window, allowing it to receive keyboard input.
6635 """
6636 return _core_.Window_SetFocus(*args, **kwargs)
6637
6638 def SetFocusFromKbd(*args, **kwargs):
6639 """
6640 SetFocusFromKbd(self)
6641
6642 Set focus to this window as the result of a keyboard action. Normally
6643 only called internally.
6644 """
6645 return _core_.Window_SetFocusFromKbd(*args, **kwargs)
6646
6647 def FindFocus(*args, **kwargs):
6648 """
6649 FindFocus() -> Window
6650
6651 Returns the window or control that currently has the keyboard focus,
6652 or None.
6653 """
6654 return _core_.Window_FindFocus(*args, **kwargs)
6655
6656 FindFocus = staticmethod(FindFocus)
6657 def AcceptsFocus(*args, **kwargs):
6658 """
6659 AcceptsFocus(self) -> bool
6660
6661 Can this window have focus?
6662 """
6663 return _core_.Window_AcceptsFocus(*args, **kwargs)
6664
6665 def AcceptsFocusFromKeyboard(*args, **kwargs):
6666 """
6667 AcceptsFocusFromKeyboard(self) -> bool
6668
6669 Can this window be given focus by keyboard navigation? if not, the
6670 only way to give it focus (provided it accepts it at all) is to click
6671 it.
6672 """
6673 return _core_.Window_AcceptsFocusFromKeyboard(*args, **kwargs)
6674
6675 def GetDefaultItem(*args, **kwargs):
6676 """
6677 GetDefaultItem(self) -> Window
6678
6679 Get the default child of this parent, i.e. the one which is activated
6680 by pressing <Enter> such as the OK button on a wx.Dialog.
6681 """
6682 return _core_.Window_GetDefaultItem(*args, **kwargs)
6683
6684 def SetDefaultItem(*args, **kwargs):
6685 """
6686 SetDefaultItem(self, Window child) -> Window
6687
6688 Set this child as default, return the old default.
6689 """
6690 return _core_.Window_SetDefaultItem(*args, **kwargs)
6691
6692 def SetTmpDefaultItem(*args, **kwargs):
6693 """
6694 SetTmpDefaultItem(self, Window win)
6695
6696 Set this child as temporary default
6697 """
6698 return _core_.Window_SetTmpDefaultItem(*args, **kwargs)
6699
6700 def Navigate(*args, **kwargs):
6701 """
6702 Navigate(self, int flags=NavigationKeyEvent.IsForward) -> bool
6703
6704 Does keyboard navigation from this window to another, by sending a
6705 `wx.NavigationKeyEvent`.
6706 """
6707 return _core_.Window_Navigate(*args, **kwargs)
6708
6709 def MoveAfterInTabOrder(*args, **kwargs):
6710 """
6711 MoveAfterInTabOrder(self, Window win)
6712
6713 Moves this window in the tab navigation order after the specified
6714 sibling window. This means that when the user presses the TAB key on
6715 that other window, the focus switches to this window.
6716
6717 The default tab order is the same as creation order. This function
6718 and `MoveBeforeInTabOrder` allow to change it after creating all the
6719 windows.
6720
6721 """
6722 return _core_.Window_MoveAfterInTabOrder(*args, **kwargs)
6723
6724 def MoveBeforeInTabOrder(*args, **kwargs):
6725 """
6726 MoveBeforeInTabOrder(self, Window win)
6727
6728 Same as `MoveAfterInTabOrder` except that it inserts this window just
6729 before win instead of putting it right after it.
6730 """
6731 return _core_.Window_MoveBeforeInTabOrder(*args, **kwargs)
6732
6733 def GetChildren(*args, **kwargs):
6734 """
6735 GetChildren(self) -> PyObject
6736
6737 Returns a list of the window's children. NOTE: Currently this is a
6738 copy of the child window list maintained by the window, so the return
6739 value of this function is only valid as long as the window's children
6740 do not change.
6741 """
6742 return _core_.Window_GetChildren(*args, **kwargs)
6743
6744 def GetParent(*args, **kwargs):
6745 """
6746 GetParent(self) -> Window
6747
6748 Returns the parent window of this window, or None if there isn't one.
6749 """
6750 return _core_.Window_GetParent(*args, **kwargs)
6751
6752 def GetGrandParent(*args, **kwargs):
6753 """
6754 GetGrandParent(self) -> Window
6755
6756 Returns the parent of the parent of this window, or None if there
6757 isn't one.
6758 """
6759 return _core_.Window_GetGrandParent(*args, **kwargs)
6760
6761 def IsTopLevel(*args, **kwargs):
6762 """
6763 IsTopLevel(self) -> bool
6764
6765 Returns true if the given window is a top-level one. Currently all
6766 frames and dialogs are always considered to be top-level windows (even
6767 if they have a parent window).
6768 """
6769 return _core_.Window_IsTopLevel(*args, **kwargs)
6770
6771 def Reparent(*args, **kwargs):
6772 """
6773 Reparent(self, Window newParent) -> bool
6774
6775 Reparents the window, i.e the window will be removed from its current
6776 parent window (e.g. a non-standard toolbar in a wxFrame) and then
6777 re-inserted into another. Available on Windows and GTK. Returns True
6778 if the parent was changed, False otherwise (error or newParent ==
6779 oldParent)
6780 """
6781 return _core_.Window_Reparent(*args, **kwargs)
6782
6783 def AddChild(*args, **kwargs):
6784 """
6785 AddChild(self, Window child)
6786
6787 Adds a child window. This is called automatically by window creation
6788 functions so should not be required by the application programmer.
6789 """
6790 return _core_.Window_AddChild(*args, **kwargs)
6791
6792 def RemoveChild(*args, **kwargs):
6793 """
6794 RemoveChild(self, Window child)
6795
6796 Removes a child window. This is called automatically by window
6797 deletion functions so should not be required by the application
6798 programmer.
6799 """
6800 return _core_.Window_RemoveChild(*args, **kwargs)
6801
6802 def FindWindowById(*args, **kwargs):
6803 """
6804 FindWindowById(self, long winid) -> Window
6805
6806 Find a chld of this window by window ID
6807 """
6808 return _core_.Window_FindWindowById(*args, **kwargs)
6809
6810 def FindWindowByName(*args, **kwargs):
6811 """
6812 FindWindowByName(self, String name) -> Window
6813
6814 Find a child of this window by name
6815 """
6816 return _core_.Window_FindWindowByName(*args, **kwargs)
6817
6818 def GetEventHandler(*args, **kwargs):
6819 """
6820 GetEventHandler(self) -> EvtHandler
6821
6822 Returns the event handler for this window. By default, the window is
6823 its own event handler.
6824 """
6825 return _core_.Window_GetEventHandler(*args, **kwargs)
6826
6827 def SetEventHandler(*args, **kwargs):
6828 """
6829 SetEventHandler(self, EvtHandler handler)
6830
6831 Sets the event handler for this window. An event handler is an object
6832 that is capable of processing the events sent to a window. By default,
6833 the window is its own event handler, but an application may wish to
6834 substitute another, for example to allow central implementation of
6835 event-handling for a variety of different window classes.
6836
6837 It is usually better to use `wx.Window.PushEventHandler` since this sets
6838 up a chain of event handlers, where an event not handled by one event
6839 handler is handed to the next one in the chain.
6840 """
6841 return _core_.Window_SetEventHandler(*args, **kwargs)
6842
6843 def PushEventHandler(*args, **kwargs):
6844 """
6845 PushEventHandler(self, EvtHandler handler)
6846
6847 Pushes this event handler onto the event handler stack for the window.
6848 An event handler is an object that is capable of processing the events
6849 sent to a window. By default, the window is its own event handler, but
6850 an application may wish to substitute another, for example to allow
6851 central implementation of event-handling for a variety of different
6852 window classes.
6853
6854 wx.Window.PushEventHandler allows an application to set up a chain of
6855 event handlers, where an event not handled by one event handler is
6856 handed to the next one in the chain. Use `wx.Window.PopEventHandler` to
6857 remove the event handler.
6858 """
6859 return _core_.Window_PushEventHandler(*args, **kwargs)
6860
6861 def PopEventHandler(*args, **kwargs):
6862 """
6863 PopEventHandler(self, bool deleteHandler=False) -> EvtHandler
6864
6865 Removes and returns the top-most event handler on the event handler
6866 stack. If deleteHandler is True then the wx.EvtHandler object will be
6867 destroyed after it is popped.
6868 """
6869 return _core_.Window_PopEventHandler(*args, **kwargs)
6870
6871 def RemoveEventHandler(*args, **kwargs):
6872 """
6873 RemoveEventHandler(self, EvtHandler handler) -> bool
6874
6875 Find the given handler in the event handler chain and remove (but not
6876 delete) it from the event handler chain, return True if it was found
6877 and False otherwise (this also results in an assert failure so this
6878 function should only be called when the handler is supposed to be
6879 there.)
6880 """
6881 return _core_.Window_RemoveEventHandler(*args, **kwargs)
6882
6883 def SetValidator(*args, **kwargs):
6884 """
6885 SetValidator(self, Validator validator)
6886
6887 Deletes the current validator (if any) and sets the window validator,
6888 having called wx.Validator.Clone to create a new validator of this
6889 type.
6890 """
6891 return _core_.Window_SetValidator(*args, **kwargs)
6892
6893 def GetValidator(*args, **kwargs):
6894 """
6895 GetValidator(self) -> Validator
6896
6897 Returns a pointer to the current validator for the window, or None if
6898 there is none.
6899 """
6900 return _core_.Window_GetValidator(*args, **kwargs)
6901
6902 def Validate(*args, **kwargs):
6903 """
6904 Validate(self) -> bool
6905
6906 Validates the current values of the child controls using their
6907 validators. If the window has wx.WS_EX_VALIDATE_RECURSIVELY extra
6908 style flag set, the method will also call Validate() of all child
6909 windows. Returns false if any of the validations failed.
6910 """
6911 return _core_.Window_Validate(*args, **kwargs)
6912
6913 def TransferDataToWindow(*args, **kwargs):
6914 """
6915 TransferDataToWindow(self) -> bool
6916
6917 Transfers values to child controls from data areas specified by their
6918 validators. If the window has wx.WS_EX_VALIDATE_RECURSIVELY extra
6919 style flag set, the method will also call TransferDataToWindow() of
6920 all child windows.
6921 """
6922 return _core_.Window_TransferDataToWindow(*args, **kwargs)
6923
6924 def TransferDataFromWindow(*args, **kwargs):
6925 """
6926 TransferDataFromWindow(self) -> bool
6927
6928 Transfers values from child controls to data areas specified by their
6929 validators. Returns false if a transfer failed. If the window has
6930 wx.WS_EX_VALIDATE_RECURSIVELY extra style flag set, the method will
6931 also call TransferDataFromWindow() of all child windows.
6932 """
6933 return _core_.Window_TransferDataFromWindow(*args, **kwargs)
6934
6935 def InitDialog(*args, **kwargs):
6936 """
6937 InitDialog(self)
6938
6939 Sends an EVT_INIT_DIALOG event, whose handler usually transfers data
6940 to the dialog via validators.
6941 """
6942 return _core_.Window_InitDialog(*args, **kwargs)
6943
6944 def SetAcceleratorTable(*args, **kwargs):
6945 """
6946 SetAcceleratorTable(self, AcceleratorTable accel)
6947
6948 Sets the accelerator table for this window.
6949 """
6950 return _core_.Window_SetAcceleratorTable(*args, **kwargs)
6951
6952 def GetAcceleratorTable(*args, **kwargs):
6953 """
6954 GetAcceleratorTable(self) -> AcceleratorTable
6955
6956 Gets the accelerator table for this window.
6957 """
6958 return _core_.Window_GetAcceleratorTable(*args, **kwargs)
6959
6960 def RegisterHotKey(*args, **kwargs):
6961 """
6962 RegisterHotKey(self, int hotkeyId, int modifiers, int keycode) -> bool
6963
6964 Registers a system wide hotkey. Every time the user presses the hotkey
6965 registered here, this window will receive a hotkey event. It will
6966 receive the event even if the application is in the background and
6967 does not have the input focus because the user is working with some
6968 other application. To bind an event handler function to this hotkey
6969 use EVT_HOTKEY with an id equal to hotkeyId. Returns True if the
6970 hotkey was registered successfully.
6971 """
6972 return _core_.Window_RegisterHotKey(*args, **kwargs)
6973
6974 def UnregisterHotKey(*args, **kwargs):
6975 """
6976 UnregisterHotKey(self, int hotkeyId) -> bool
6977
6978 Unregisters a system wide hotkey.
6979 """
6980 return _core_.Window_UnregisterHotKey(*args, **kwargs)
6981
6982 def ConvertDialogPointToPixels(*args, **kwargs):
6983 """
6984 ConvertDialogPointToPixels(self, Point pt) -> Point
6985
6986 Converts a point or size from dialog units to pixels. Dialog units
6987 are used for maintaining a dialog's proportions even if the font
6988 changes. For the x dimension, the dialog units are multiplied by the
6989 average character width and then divided by 4. For the y dimension,
6990 the dialog units are multiplied by the average character height and
6991 then divided by 8.
6992 """
6993 return _core_.Window_ConvertDialogPointToPixels(*args, **kwargs)
6994
6995 def ConvertDialogSizeToPixels(*args, **kwargs):
6996 """
6997 ConvertDialogSizeToPixels(self, Size sz) -> Size
6998
6999 Converts a point or size from dialog units to pixels. Dialog units
7000 are used for maintaining a dialog's proportions even if the font
7001 changes. For the x dimension, the dialog units are multiplied by the
7002 average character width and then divided by 4. For the y dimension,
7003 the dialog units are multiplied by the average character height and
7004 then divided by 8.
7005 """
7006 return _core_.Window_ConvertDialogSizeToPixels(*args, **kwargs)
7007
7008 def DLG_PNT(*args, **kwargs):
7009 """
7010 DLG_PNT(self, Point pt) -> Point
7011
7012 Converts a point or size from dialog units to pixels. Dialog units
7013 are used for maintaining a dialog's proportions even if the font
7014 changes. For the x dimension, the dialog units are multiplied by the
7015 average character width and then divided by 4. For the y dimension,
7016 the dialog units are multiplied by the average character height and
7017 then divided by 8.
7018 """
7019 return _core_.Window_DLG_PNT(*args, **kwargs)
7020
7021 def DLG_SZE(*args, **kwargs):
7022 """
7023 DLG_SZE(self, Size sz) -> Size
7024
7025 Converts a point or size from dialog units to pixels. Dialog units
7026 are used for maintaining a dialog's proportions even if the font
7027 changes. For the x dimension, the dialog units are multiplied by the
7028 average character width and then divided by 4. For the y dimension,
7029 the dialog units are multiplied by the average character height and
7030 then divided by 8.
7031 """
7032 return _core_.Window_DLG_SZE(*args, **kwargs)
7033
7034 def ConvertPixelPointToDialog(*args, **kwargs):
7035 """ConvertPixelPointToDialog(self, Point pt) -> Point"""
7036 return _core_.Window_ConvertPixelPointToDialog(*args, **kwargs)
7037
7038 def ConvertPixelSizeToDialog(*args, **kwargs):
7039 """ConvertPixelSizeToDialog(self, Size sz) -> Size"""
7040 return _core_.Window_ConvertPixelSizeToDialog(*args, **kwargs)
7041
7042 def WarpPointer(*args, **kwargs):
7043 """
7044 WarpPointer(self, int x, int y)
7045
7046 Moves the pointer to the given position on the window.
7047
7048 NOTE: This function is not supported under Mac because Apple Human
7049 Interface Guidelines forbid moving the mouse cursor programmatically.
7050 """
7051 return _core_.Window_WarpPointer(*args, **kwargs)
7052
7053 def CaptureMouse(*args, **kwargs):
7054 """
7055 CaptureMouse(self)
7056
7057 Directs all mouse input to this window. Call wx.Window.ReleaseMouse to
7058 release the capture.
7059
7060 Note that wxWindows maintains the stack of windows having captured the
7061 mouse and when the mouse is released the capture returns to the window
7062 which had had captured it previously and it is only really released if
7063 there were no previous window. In particular, this means that you must
7064 release the mouse as many times as you capture it.
7065 """
7066 return _core_.Window_CaptureMouse(*args, **kwargs)
7067
7068 def ReleaseMouse(*args, **kwargs):
7069 """
7070 ReleaseMouse(self)
7071
7072 Releases mouse input captured with wx.Window.CaptureMouse.
7073 """
7074 return _core_.Window_ReleaseMouse(*args, **kwargs)
7075
7076 def GetCapture(*args, **kwargs):
7077 """
7078 GetCapture() -> Window
7079
7080 Returns the window which currently captures the mouse or None
7081 """
7082 return _core_.Window_GetCapture(*args, **kwargs)
7083
7084 GetCapture = staticmethod(GetCapture)
7085 def HasCapture(*args, **kwargs):
7086 """
7087 HasCapture(self) -> bool
7088
7089 Returns true if this window has the current mouse capture.
7090 """
7091 return _core_.Window_HasCapture(*args, **kwargs)
7092
7093 def Refresh(*args, **kwargs):
7094 """
7095 Refresh(self, bool eraseBackground=True, Rect rect=None)
7096
7097 Mark the specified rectangle (or the whole window) as "dirty" so it
7098 will be repainted. Causes an EVT_PAINT event to be generated and sent
7099 to the window.
7100 """
7101 return _core_.Window_Refresh(*args, **kwargs)
7102
7103 def RefreshRect(*args, **kwargs):
7104 """
7105 RefreshRect(self, Rect rect)
7106
7107 Redraws the contents of the given rectangle: the area inside it will
7108 be repainted. This is the same as Refresh but has a nicer syntax.
7109 """
7110 return _core_.Window_RefreshRect(*args, **kwargs)
7111
7112 def Update(*args, **kwargs):
7113 """
7114 Update(self)
7115
7116 Calling this method immediately repaints the invalidated area of the
7117 window instead of waiting for the EVT_PAINT event to happen, (normally
7118 this would usually only happen when the flow of control returns to the
7119 event loop.) Notice that this function doesn't refresh the window and
7120 does nothing if the window has been already repainted. Use Refresh
7121 first if you want to immediately redraw the window (or some portion of
7122 it) unconditionally.
7123 """
7124 return _core_.Window_Update(*args, **kwargs)
7125
7126 def ClearBackground(*args, **kwargs):
7127 """
7128 ClearBackground(self)
7129
7130 Clears the window by filling it with the current background
7131 colour. Does not cause an erase background event to be generated.
7132 """
7133 return _core_.Window_ClearBackground(*args, **kwargs)
7134
7135 def Freeze(*args, **kwargs):
7136 """
7137 Freeze(self)
7138
7139 Freezes the window or, in other words, prevents any updates from
7140 taking place on screen, the window is not redrawn at all. Thaw must be
7141 called to reenable window redrawing. Calls to Freeze/Thaw may be
7142 nested, with the actual Thaw being delayed until all the nesting has
7143 been undone.
7144
7145 This method is useful for visual appearance optimization (for example,
7146 it is a good idea to use it before inserting large amount of text into
7147 a wxTextCtrl under wxGTK) but is not implemented on all platforms nor
7148 for all controls so it is mostly just a hint to wxWindows and not a
7149 mandatory directive.
7150 """
7151 return _core_.Window_Freeze(*args, **kwargs)
7152
7153 def Thaw(*args, **kwargs):
7154 """
7155 Thaw(self)
7156
7157 Reenables window updating after a previous call to Freeze. Calls to
7158 Freeze/Thaw may be nested, so Thaw must be called the same number of
7159 times that Freeze was before the window will be updated.
7160 """
7161 return _core_.Window_Thaw(*args, **kwargs)
7162
7163 def PrepareDC(*args, **kwargs):
7164 """
7165 PrepareDC(self, DC dc)
7166
7167 Call this function to prepare the device context for drawing a
7168 scrolled image. It sets the device origin according to the current
7169 scroll position.
7170 """
7171 return _core_.Window_PrepareDC(*args, **kwargs)
7172
7173 def GetUpdateRegion(*args, **kwargs):
7174 """
7175 GetUpdateRegion(self) -> Region
7176
7177 Returns the region specifying which parts of the window have been
7178 damaged. Should only be called within an EVT_PAINT handler.
7179 """
7180 return _core_.Window_GetUpdateRegion(*args, **kwargs)
7181
7182 def GetUpdateClientRect(*args, **kwargs):
7183 """
7184 GetUpdateClientRect(self) -> Rect
7185
7186 Get the update rectangle region bounding box in client coords.
7187 """
7188 return _core_.Window_GetUpdateClientRect(*args, **kwargs)
7189
7190 def IsExposed(*args, **kwargs):
7191 """
7192 IsExposed(self, int x, int y, int w=1, int h=1) -> bool
7193
7194 Returns true if the given point or rectangle area has been exposed
7195 since the last repaint. Call this in an paint event handler to
7196 optimize redrawing by only redrawing those areas, which have been
7197 exposed.
7198 """
7199 return _core_.Window_IsExposed(*args, **kwargs)
7200
7201 def IsExposedPoint(*args, **kwargs):
7202 """
7203 IsExposedPoint(self, Point pt) -> bool
7204
7205 Returns true if the given point or rectangle area has been exposed
7206 since the last repaint. Call this in an paint event handler to
7207 optimize redrawing by only redrawing those areas, which have been
7208 exposed.
7209 """
7210 return _core_.Window_IsExposedPoint(*args, **kwargs)
7211
7212 def IsExposedRect(*args, **kwargs):
7213 """
7214 IsExposedRect(self, Rect rect) -> bool
7215
7216 Returns true if the given point or rectangle area has been exposed
7217 since the last repaint. Call this in an paint event handler to
7218 optimize redrawing by only redrawing those areas, which have been
7219 exposed.
7220 """
7221 return _core_.Window_IsExposedRect(*args, **kwargs)
7222
7223 def GetDefaultAttributes(*args, **kwargs):
7224 """
7225 GetDefaultAttributes(self) -> VisualAttributes
7226
7227 Get the default attributes for an instance of this class. This is
7228 useful if you want to use the same font or colour in your own control
7229 as in a standard control -- which is a much better idea than hard
7230 coding specific colours or fonts which might look completely out of
7231 place on the user's system, especially if it uses themes.
7232 """
7233 return _core_.Window_GetDefaultAttributes(*args, **kwargs)
7234
7235 def GetClassDefaultAttributes(*args, **kwargs):
7236 """
7237 GetClassDefaultAttributes(int variant=WINDOW_VARIANT_NORMAL) -> VisualAttributes
7238
7239 Get the default attributes for this class. This is useful if you want
7240 to use the same font or colour in your own control as in a standard
7241 control -- which is a much better idea than hard coding specific
7242 colours or fonts which might look completely out of place on the
7243 user's system, especially if it uses themes.
7244
7245 The variant parameter is only relevant under Mac currently and is
7246 ignore under other platforms. Under Mac, it will change the size of
7247 the returned font. See `wx.Window.SetWindowVariant` for more about
7248 this.
7249 """
7250 return _core_.Window_GetClassDefaultAttributes(*args, **kwargs)
7251
7252 GetClassDefaultAttributes = staticmethod(GetClassDefaultAttributes)
7253 def SetBackgroundColour(*args, **kwargs):
7254 """
7255 SetBackgroundColour(self, Colour colour) -> bool
7256
7257 Sets the background colour of the window. Returns True if the colour
7258 was changed. The background colour is usually painted by the default
7259 EVT_ERASE_BACKGROUND event handler function under Windows and
7260 automatically under GTK. Using `wx.NullColour` will reset the window
7261 to the default background colour.
7262
7263 Note that setting the background colour may not cause an immediate
7264 refresh, so you may wish to call `ClearBackground` or `Refresh` after
7265 calling this function.
7266
7267 Using this function will disable attempts to use themes for this
7268 window, if the system supports them. Use with care since usually the
7269 themes represent the appearance chosen by the user to be used for all
7270 applications on the system.
7271 """
7272 return _core_.Window_SetBackgroundColour(*args, **kwargs)
7273
7274 def SetOwnBackgroundColour(*args, **kwargs):
7275 """SetOwnBackgroundColour(self, Colour colour)"""
7276 return _core_.Window_SetOwnBackgroundColour(*args, **kwargs)
7277
7278 def SetForegroundColour(*args, **kwargs):
7279 """
7280 SetForegroundColour(self, Colour colour) -> bool
7281
7282 Sets the foreground colour of the window. Returns True is the colour
7283 was changed. The interpretation of foreground colour is dependent on
7284 the window class; it may be the text colour or other colour, or it may
7285 not be used at all.
7286 """
7287 return _core_.Window_SetForegroundColour(*args, **kwargs)
7288
7289 def SetOwnForegroundColour(*args, **kwargs):
7290 """SetOwnForegroundColour(self, Colour colour)"""
7291 return _core_.Window_SetOwnForegroundColour(*args, **kwargs)
7292
7293 def GetBackgroundColour(*args, **kwargs):
7294 """
7295 GetBackgroundColour(self) -> Colour
7296
7297 Returns the background colour of the window.
7298 """
7299 return _core_.Window_GetBackgroundColour(*args, **kwargs)
7300
7301 def GetForegroundColour(*args, **kwargs):
7302 """
7303 GetForegroundColour(self) -> Colour
7304
7305 Returns the foreground colour of the window. The interpretation of
7306 foreground colour is dependent on the window class; it may be the text
7307 colour or other colour, or it may not be used at all.
7308 """
7309 return _core_.Window_GetForegroundColour(*args, **kwargs)
7310
7311 def SetBackgroundStyle(*args, **kwargs):
7312 """
7313 SetBackgroundStyle(self, int style) -> bool
7314
7315 Returns the background style of the window. The background style
7316 indicates how the background of the window is drawn.
7317
7318 ====================== ========================================
7319 wx.BG_STYLE_SYSTEM The background colour or pattern should
7320 be determined by the system
7321 wx.BG_STYLE_COLOUR The background should be a solid colour
7322 wx.BG_STYLE_CUSTOM The background will be implemented by the
7323 application.
7324 ====================== ========================================
7325
7326 On GTK+, use of wx.BG_STYLE_CUSTOM allows the flicker-free drawing of
7327 a custom background, such as a tiled bitmap. Currently the style has
7328 no effect on other platforms.
7329
7330 :see: `GetBackgroundStyle`, `SetBackgroundColour`
7331 """
7332 return _core_.Window_SetBackgroundStyle(*args, **kwargs)
7333
7334 def GetBackgroundStyle(*args, **kwargs):
7335 """
7336 GetBackgroundStyle(self) -> int
7337
7338 Returns the background style of the window.
7339
7340 :see: `SetBackgroundStyle`
7341 """
7342 return _core_.Window_GetBackgroundStyle(*args, **kwargs)
7343
7344 def SetCursor(*args, **kwargs):
7345 """
7346 SetCursor(self, Cursor cursor) -> bool
7347
7348 Sets the window's cursor. Notice that the window cursor also sets it
7349 for the children of the window implicitly.
7350
7351 The cursor may be wx.NullCursor in which case the window cursor will
7352 be reset back to default.
7353 """
7354 return _core_.Window_SetCursor(*args, **kwargs)
7355
7356 def GetCursor(*args, **kwargs):
7357 """
7358 GetCursor(self) -> Cursor
7359
7360 Return the cursor associated with this window.
7361 """
7362 return _core_.Window_GetCursor(*args, **kwargs)
7363
7364 def SetFont(*args, **kwargs):
7365 """
7366 SetFont(self, Font font) -> bool
7367
7368 Sets the font for this window.
7369 """
7370 return _core_.Window_SetFont(*args, **kwargs)
7371
7372 def SetOwnFont(*args, **kwargs):
7373 """SetOwnFont(self, Font font)"""
7374 return _core_.Window_SetOwnFont(*args, **kwargs)
7375
7376 def GetFont(*args, **kwargs):
7377 """
7378 GetFont(self) -> Font
7379
7380 Returns the default font used for this window.
7381 """
7382 return _core_.Window_GetFont(*args, **kwargs)
7383
7384 def SetCaret(*args, **kwargs):
7385 """
7386 SetCaret(self, Caret caret)
7387
7388 Sets the caret associated with the window.
7389 """
7390 return _core_.Window_SetCaret(*args, **kwargs)
7391
7392 def GetCaret(*args, **kwargs):
7393 """
7394 GetCaret(self) -> Caret
7395
7396 Returns the caret associated with the window.
7397 """
7398 return _core_.Window_GetCaret(*args, **kwargs)
7399
7400 def GetCharHeight(*args, **kwargs):
7401 """
7402 GetCharHeight(self) -> int
7403
7404 Get the (average) character size for the current font.
7405 """
7406 return _core_.Window_GetCharHeight(*args, **kwargs)
7407
7408 def GetCharWidth(*args, **kwargs):
7409 """
7410 GetCharWidth(self) -> int
7411
7412 Get the (average) character size for the current font.
7413 """
7414 return _core_.Window_GetCharWidth(*args, **kwargs)
7415
7416 def GetTextExtent(*args, **kwargs):
7417 """
7418 GetTextExtent(String string) -> (width, height)
7419
7420 Get the width and height of the text using the current font.
7421 """
7422 return _core_.Window_GetTextExtent(*args, **kwargs)
7423
7424 def GetFullTextExtent(*args, **kwargs):
7425 """
7426 GetFullTextExtent(String string, Font font=None) ->
7427 (width, height, descent, externalLeading)
7428
7429 Get the width, height, decent and leading of the text using the
7430 current or specified font.
7431 """
7432 return _core_.Window_GetFullTextExtent(*args, **kwargs)
7433
7434 def ClientToScreenXY(*args, **kwargs):
7435 """
7436 ClientToScreenXY(int x, int y) -> (x,y)
7437
7438 Converts to screen coordinates from coordinates relative to this window.
7439 """
7440 return _core_.Window_ClientToScreenXY(*args, **kwargs)
7441
7442 def ScreenToClientXY(*args, **kwargs):
7443 """
7444 ScreenToClientXY(int x, int y) -> (x,y)
7445
7446 Converts from screen to client window coordinates.
7447 """
7448 return _core_.Window_ScreenToClientXY(*args, **kwargs)
7449
7450 def ClientToScreen(*args, **kwargs):
7451 """
7452 ClientToScreen(self, Point pt) -> Point
7453
7454 Converts to screen coordinates from coordinates relative to this window.
7455 """
7456 return _core_.Window_ClientToScreen(*args, **kwargs)
7457
7458 def ScreenToClient(*args, **kwargs):
7459 """
7460 ScreenToClient(self, Point pt) -> Point
7461
7462 Converts from screen to client window coordinates.
7463 """
7464 return _core_.Window_ScreenToClient(*args, **kwargs)
7465
7466 def HitTestXY(*args, **kwargs):
7467 """
7468 HitTestXY(self, int x, int y) -> int
7469
7470 Test where the given (in client coords) point lies
7471 """
7472 return _core_.Window_HitTestXY(*args, **kwargs)
7473
7474 def HitTest(*args, **kwargs):
7475 """
7476 HitTest(self, Point pt) -> int
7477
7478 Test where the given (in client coords) point lies
7479 """
7480 return _core_.Window_HitTest(*args, **kwargs)
7481
7482 def GetBorder(*args):
7483 """
7484 GetBorder(self, long flags) -> int
7485 GetBorder(self) -> int
7486
7487 Get border for the flags of this window
7488 """
7489 return _core_.Window_GetBorder(*args)
7490
7491 def UpdateWindowUI(*args, **kwargs):
7492 """
7493 UpdateWindowUI(self, long flags=UPDATE_UI_NONE)
7494
7495 This function sends EVT_UPDATE_UI events to the window. The particular
7496 implementation depends on the window; for example a wx.ToolBar will
7497 send an update UI event for each toolbar button, and a wx.Frame will
7498 send an update UI event for each menubar menu item. You can call this
7499 function from your application to ensure that your UI is up-to-date at
7500 a particular point in time (as far as your EVT_UPDATE_UI handlers are
7501 concerned). This may be necessary if you have called
7502 wx.UpdateUIEvent.SetMode or wx.UpdateUIEvent.SetUpdateInterval to
7503 limit the overhead that wxWindows incurs by sending update UI events
7504 in idle time.
7505 """
7506 return _core_.Window_UpdateWindowUI(*args, **kwargs)
7507
7508 def PopupMenuXY(*args, **kwargs):
7509 """
7510 PopupMenuXY(self, Menu menu, int x=-1, int y=-1) -> bool
7511
7512 Pops up the given menu at the specified coordinates, relative to this window,
7513 and returns control when the user has dismissed the menu. If a menu item is
7514 selected, the corresponding menu event is generated and will be processed as
7515 usual. If the default position is given then the current position of the
7516 mouse cursor will be used.
7517 """
7518 return _core_.Window_PopupMenuXY(*args, **kwargs)
7519
7520 def PopupMenu(*args, **kwargs):
7521 """
7522 PopupMenu(self, Menu menu, Point pos=DefaultPosition) -> bool
7523
7524 Pops up the given menu at the specified coordinates, relative to this window,
7525 and returns control when the user has dismissed the menu. If a menu item is
7526 selected, the corresponding menu event is generated and will be processed as
7527 usual. If the default position is given then the current position of the
7528 mouse cursor will be used.
7529 """
7530 return _core_.Window_PopupMenu(*args, **kwargs)
7531
7532 def GetHandle(*args, **kwargs):
7533 """
7534 GetHandle(self) -> long
7535
7536 Returns the platform-specific handle (as a long integer) of the
7537 physical window. Currently on wxMac it returns the handle of the
7538 toplevel parent of the window.
7539 """
7540 return _core_.Window_GetHandle(*args, **kwargs)
7541
7542 def AssociateHandle(*args, **kwargs):
7543 """
7544 AssociateHandle(self, long handle)
7545
7546 Associate the window with a new native handle
7547 """
7548 return _core_.Window_AssociateHandle(*args, **kwargs)
7549
7550 def DissociateHandle(*args, **kwargs):
7551 """
7552 DissociateHandle(self)
7553
7554 Dissociate the current native handle from the window
7555 """
7556 return _core_.Window_DissociateHandle(*args, **kwargs)
7557
7558 def HasScrollbar(*args, **kwargs):
7559 """
7560 HasScrollbar(self, int orient) -> bool
7561
7562 Does the window have the scrollbar for this orientation?
7563 """
7564 return _core_.Window_HasScrollbar(*args, **kwargs)
7565
7566 def SetScrollbar(*args, **kwargs):
7567 """
7568 SetScrollbar(self, int orientation, int position, int thumbSize, int range,
7569 bool refresh=True)
7570
7571 Sets the scrollbar properties of a built-in scrollbar.
7572 """
7573 return _core_.Window_SetScrollbar(*args, **kwargs)
7574
7575 def SetScrollPos(*args, **kwargs):
7576 """
7577 SetScrollPos(self, int orientation, int pos, bool refresh=True)
7578
7579 Sets the position of one of the built-in scrollbars.
7580 """
7581 return _core_.Window_SetScrollPos(*args, **kwargs)
7582
7583 def GetScrollPos(*args, **kwargs):
7584 """
7585 GetScrollPos(self, int orientation) -> int
7586
7587 Returns the built-in scrollbar position.
7588 """
7589 return _core_.Window_GetScrollPos(*args, **kwargs)
7590
7591 def GetScrollThumb(*args, **kwargs):
7592 """
7593 GetScrollThumb(self, int orientation) -> int
7594
7595 Returns the built-in scrollbar thumb size.
7596 """
7597 return _core_.Window_GetScrollThumb(*args, **kwargs)
7598
7599 def GetScrollRange(*args, **kwargs):
7600 """
7601 GetScrollRange(self, int orientation) -> int
7602
7603 Returns the built-in scrollbar range.
7604 """
7605 return _core_.Window_GetScrollRange(*args, **kwargs)
7606
7607 def ScrollWindow(*args, **kwargs):
7608 """
7609 ScrollWindow(self, int dx, int dy, Rect rect=None)
7610
7611 Physically scrolls the pixels in the window and move child windows
7612 accordingly. Use this function to optimise your scrolling
7613 implementations, to minimise the area that must be redrawn. Note that
7614 it is rarely required to call this function from a user program.
7615 """
7616 return _core_.Window_ScrollWindow(*args, **kwargs)
7617
7618 def ScrollLines(*args, **kwargs):
7619 """
7620 ScrollLines(self, int lines) -> bool
7621
7622 If the platform and window class supports it, scrolls the window by
7623 the given number of lines down, if lines is positive, or up if lines
7624 is negative. Returns True if the window was scrolled, False if it was
7625 already on top/bottom and nothing was done.
7626 """
7627 return _core_.Window_ScrollLines(*args, **kwargs)
7628
7629 def ScrollPages(*args, **kwargs):
7630 """
7631 ScrollPages(self, int pages) -> bool
7632
7633 If the platform and window class supports it, scrolls the window by
7634 the given number of pages down, if pages is positive, or up if pages
7635 is negative. Returns True if the window was scrolled, False if it was
7636 already on top/bottom and nothing was done.
7637 """
7638 return _core_.Window_ScrollPages(*args, **kwargs)
7639
7640 def LineUp(*args, **kwargs):
7641 """
7642 LineUp(self) -> bool
7643
7644 This is just a wrapper for ScrollLines(-1).
7645 """
7646 return _core_.Window_LineUp(*args, **kwargs)
7647
7648 def LineDown(*args, **kwargs):
7649 """
7650 LineDown(self) -> bool
7651
7652 This is just a wrapper for ScrollLines(1).
7653 """
7654 return _core_.Window_LineDown(*args, **kwargs)
7655
7656 def PageUp(*args, **kwargs):
7657 """
7658 PageUp(self) -> bool
7659
7660 This is just a wrapper for ScrollPages(-1).
7661 """
7662 return _core_.Window_PageUp(*args, **kwargs)
7663
7664 def PageDown(*args, **kwargs):
7665 """
7666 PageDown(self) -> bool
7667
7668 This is just a wrapper for ScrollPages(1).
7669 """
7670 return _core_.Window_PageDown(*args, **kwargs)
7671
7672 def SetHelpText(*args, **kwargs):
7673 """
7674 SetHelpText(self, String text)
7675
7676 Sets the help text to be used as context-sensitive help for this
7677 window. Note that the text is actually stored by the current
7678 wxHelpProvider implementation, and not in the window object itself.
7679 """
7680 return _core_.Window_SetHelpText(*args, **kwargs)
7681
7682 def SetHelpTextForId(*args, **kwargs):
7683 """
7684 SetHelpTextForId(self, String text)
7685
7686 Associate this help text with all windows with the same id as this
7687 one.
7688 """
7689 return _core_.Window_SetHelpTextForId(*args, **kwargs)
7690
7691 def GetHelpText(*args, **kwargs):
7692 """
7693 GetHelpText(self) -> String
7694
7695 Gets the help text to be used as context-sensitive help for this
7696 window. Note that the text is actually stored by the current
7697 wxHelpProvider implementation, and not in the window object itself.
7698 """
7699 return _core_.Window_GetHelpText(*args, **kwargs)
7700
7701 def SetToolTipString(*args, **kwargs):
7702 """
7703 SetToolTipString(self, String tip)
7704
7705 Attach a tooltip to the window.
7706 """
7707 return _core_.Window_SetToolTipString(*args, **kwargs)
7708
7709 def SetToolTip(*args, **kwargs):
7710 """
7711 SetToolTip(self, ToolTip tip)
7712
7713 Attach a tooltip to the window.
7714 """
7715 return _core_.Window_SetToolTip(*args, **kwargs)
7716
7717 def GetToolTip(*args, **kwargs):
7718 """
7719 GetToolTip(self) -> ToolTip
7720
7721 get the associated tooltip or None if none
7722 """
7723 return _core_.Window_GetToolTip(*args, **kwargs)
7724
7725 def SetDropTarget(*args, **kwargs):
7726 """
7727 SetDropTarget(self, DropTarget dropTarget)
7728
7729 Associates a drop target with this window. If the window already has
7730 a drop target, it is deleted.
7731 """
7732 return _core_.Window_SetDropTarget(*args, **kwargs)
7733
7734 def GetDropTarget(*args, **kwargs):
7735 """
7736 GetDropTarget(self) -> DropTarget
7737
7738 Returns the associated drop target, which may be None.
7739 """
7740 return _core_.Window_GetDropTarget(*args, **kwargs)
7741
7742 def SetConstraints(*args, **kwargs):
7743 """
7744 SetConstraints(self, LayoutConstraints constraints)
7745
7746 Sets the window to have the given layout constraints. If an existing
7747 layout constraints object is already owned by the window, it will be
7748 deleted. Pass None to disassociate and delete the window's current
7749 constraints.
7750
7751 You must call SetAutoLayout to tell a window to use the constraints
7752 automatically in its default EVT_SIZE handler; otherwise, you must
7753 handle EVT_SIZE yourself and call Layout() explicitly. When setting
7754 both a wx.LayoutConstraints and a wx.Sizer, only the sizer will have
7755 effect.
7756 """
7757 return _core_.Window_SetConstraints(*args, **kwargs)
7758
7759 def GetConstraints(*args, **kwargs):
7760 """
7761 GetConstraints(self) -> LayoutConstraints
7762
7763 Returns a pointer to the window's layout constraints, or None if there
7764 are none.
7765 """
7766 return _core_.Window_GetConstraints(*args, **kwargs)
7767
7768 def SetAutoLayout(*args, **kwargs):
7769 """
7770 SetAutoLayout(self, bool autoLayout)
7771
7772 Determines whether the Layout function will be called automatically
7773 when the window is resized. It is called implicitly by SetSizer but
7774 if you use SetConstraints you should call it manually or otherwise the
7775 window layout won't be correctly updated when its size changes.
7776 """
7777 return _core_.Window_SetAutoLayout(*args, **kwargs)
7778
7779 def GetAutoLayout(*args, **kwargs):
7780 """
7781 GetAutoLayout(self) -> bool
7782
7783 Returns the current autoLayout setting
7784 """
7785 return _core_.Window_GetAutoLayout(*args, **kwargs)
7786
7787 def Layout(*args, **kwargs):
7788 """
7789 Layout(self) -> bool
7790
7791 Invokes the constraint-based layout algorithm or the sizer-based
7792 algorithm for this window. See SetAutoLayout: when auto layout is on,
7793 this function gets called automatically by the default EVT_SIZE
7794 handler when the window is resized.
7795 """
7796 return _core_.Window_Layout(*args, **kwargs)
7797
7798 def SetSizer(*args, **kwargs):
7799 """
7800 SetSizer(self, Sizer sizer, bool deleteOld=True)
7801
7802 Sets the window to have the given layout sizer. The window will then
7803 own the object, and will take care of its deletion. If an existing
7804 layout sizer object is already owned by the window, it will be deleted
7805 if the deleteOld parameter is true. Note that this function will also
7806 call SetAutoLayout implicitly with a True parameter if the sizer is
7807 non-None, and False otherwise.
7808 """
7809 return _core_.Window_SetSizer(*args, **kwargs)
7810
7811 def SetSizerAndFit(*args, **kwargs):
7812 """
7813 SetSizerAndFit(self, Sizer sizer, bool deleteOld=True)
7814
7815 The same as SetSizer, except it also sets the size hints for the
7816 window based on the sizer's minimum size.
7817 """
7818 return _core_.Window_SetSizerAndFit(*args, **kwargs)
7819
7820 def GetSizer(*args, **kwargs):
7821 """
7822 GetSizer(self) -> Sizer
7823
7824 Return the sizer associated with the window by a previous call to
7825 SetSizer or None if there isn't one.
7826 """
7827 return _core_.Window_GetSizer(*args, **kwargs)
7828
7829 def SetContainingSizer(*args, **kwargs):
7830 """
7831 SetContainingSizer(self, Sizer sizer)
7832
7833 This normally does not need to be called by application code. It is
7834 called internally when a window is added to a sizer, and is used so
7835 the window can remove itself from the sizer when it is destroyed.
7836 """
7837 return _core_.Window_SetContainingSizer(*args, **kwargs)
7838
7839 def GetContainingSizer(*args, **kwargs):
7840 """
7841 GetContainingSizer(self) -> Sizer
7842
7843 Return the sizer that this window is a member of, if any, otherwise None.
7844 """
7845 return _core_.Window_GetContainingSizer(*args, **kwargs)
7846
7847 def InheritAttributes(*args, **kwargs):
7848 """
7849 InheritAttributes(self)
7850
7851 This function is (or should be, in case of custom controls) called
7852 during window creation to intelligently set up the window visual
7853 attributes, that is the font and the foreground and background
7854 colours.
7855
7856 By 'intelligently' the following is meant: by default, all windows use
7857 their own default attributes. However if some of the parent's
7858 attributes are explicitly changed (that is, using SetFont and not
7859 SetOwnFont) and if the corresponding attribute hadn't been
7860 explicitly set for this window itself, then this window takes the same
7861 value as used by the parent. In addition, if the window overrides
7862 ShouldInheritColours to return false, the colours will not be changed
7863 no matter what and only the font might.
7864
7865 This rather complicated logic is necessary in order to accommodate the
7866 different usage scenarios. The most common one is when all default
7867 attributes are used and in this case, nothing should be inherited as
7868 in modern GUIs different controls use different fonts (and colours)
7869 than their siblings so they can't inherit the same value from the
7870 parent. However it was also deemed desirable to allow to simply change
7871 the attributes of all children at once by just changing the font or
7872 colour of their common parent, hence in this case we do inherit the
7873 parents attributes.
7874
7875 """
7876 return _core_.Window_InheritAttributes(*args, **kwargs)
7877
7878 def ShouldInheritColours(*args, **kwargs):
7879 """
7880 ShouldInheritColours(self) -> bool
7881
7882 Return true from here to allow the colours of this window to be
7883 changed by InheritAttributes, returning false forbids inheriting them
7884 from the parent window.
7885
7886 The base class version returns false, but this method is overridden in
7887 wxControl where it returns true.
7888 """
7889 return _core_.Window_ShouldInheritColours(*args, **kwargs)
7890
7891 def PostCreate(self, pre):
7892 """
7893 Phase 3 of the 2-phase create <wink!>
7894 Call this method after precreating the window with the 2-phase create method.
7895 """
7896 self.this = pre.this
7897 self.thisown = pre.thisown
7898 pre.thisown = 0
7899 if hasattr(self, '_setOORInfo'):
7900 self._setOORInfo(self)
7901 if hasattr(self, '_setCallbackInfo'):
7902 self._setCallbackInfo(self, self.__class__)
7903
7904
7905class WindowPtr(Window):
7906 def __init__(self, this):
7907 self.this = this
7908 if not hasattr(self,"thisown"): self.thisown = 0
7909 self.__class__ = Window
7910_core_.Window_swigregister(WindowPtr)
7911
7912def PreWindow(*args, **kwargs):
7913 """
7914 PreWindow() -> Window
7915
7916 Precreate a Window for 2-phase creation.
7917 """
7918 val = _core_.new_PreWindow(*args, **kwargs)
7919 val.thisown = 1
7920 return val
7921
7922def Window_NewControlId(*args, **kwargs):
7923 """
7924 Window_NewControlId() -> int
7925
7926 Generate a control id for the controls which were not given one.
7927 """
7928 return _core_.Window_NewControlId(*args, **kwargs)
7929
7930def Window_NextControlId(*args, **kwargs):
7931 """
7932 Window_NextControlId(int winid) -> int
7933
7934 Get the id of the control following the one with the given
7935 autogenerated) id
7936 """
7937 return _core_.Window_NextControlId(*args, **kwargs)
7938
7939def Window_PrevControlId(*args, **kwargs):
7940 """
7941 Window_PrevControlId(int winid) -> int
7942
7943 Get the id of the control preceding the one with the given
7944 autogenerated) id
7945 """
7946 return _core_.Window_PrevControlId(*args, **kwargs)
7947
7948def Window_FindFocus(*args, **kwargs):
7949 """
7950 Window_FindFocus() -> Window
7951
7952 Returns the window or control that currently has the keyboard focus,
7953 or None.
7954 """
7955 return _core_.Window_FindFocus(*args, **kwargs)
7956
7957def Window_GetCapture(*args, **kwargs):
7958 """
7959 Window_GetCapture() -> Window
7960
7961 Returns the window which currently captures the mouse or None
7962 """
7963 return _core_.Window_GetCapture(*args, **kwargs)
7964
7965def Window_GetClassDefaultAttributes(*args, **kwargs):
7966 """
7967 Window_GetClassDefaultAttributes(int variant=WINDOW_VARIANT_NORMAL) -> VisualAttributes
7968
7969 Get the default attributes for this class. This is useful if you want
7970 to use the same font or colour in your own control as in a standard
7971 control -- which is a much better idea than hard coding specific
7972 colours or fonts which might look completely out of place on the
7973 user's system, especially if it uses themes.
7974
7975 The variant parameter is only relevant under Mac currently and is
7976 ignore under other platforms. Under Mac, it will change the size of
7977 the returned font. See `wx.Window.SetWindowVariant` for more about
7978 this.
7979 """
7980 return _core_.Window_GetClassDefaultAttributes(*args, **kwargs)
7981
7982def DLG_PNT(win, point_or_x, y=None):
7983 """
7984 Convenience function for converting a Point or (x,y) in
7985 dialog units to pixel units.
7986 """
7987 if y is None:
7988 return win.ConvertDialogPointToPixels(point_or_x)
7989 else:
7990 return win.ConvertDialogPointToPixels(wx.Point(point_or_x, y))
7991
7992def DLG_SZE(win, size_width, height=None):
7993 """
7994 Convenience function for converting a Size or (w,h) in
7995 dialog units to pixel units.
7996 """
7997 if height is None:
7998 return win.ConvertDialogSizeToPixels(size_width)
7999 else:
8000 return win.ConvertDialogSizeToPixels(wx.Size(size_width, height))
8001
8002
8003def FindWindowById(*args, **kwargs):
8004 """
8005 FindWindowById(long id, Window parent=None) -> Window
8006
8007 Find the first window in the application with the given id. If parent
8008 is None, the search will start from all top-level frames and dialog
8009 boxes; if non-None, the search will be limited to the given window
8010 hierarchy. The search is recursive in both cases.
8011 """
8012 return _core_.FindWindowById(*args, **kwargs)
8013
8014def FindWindowByName(*args, **kwargs):
8015 """
8016 FindWindowByName(String name, Window parent=None) -> Window
8017
8018 Find a window by its name (as given in a window constructor or Create
8019 function call). If parent is None, the search will start from all
8020 top-level frames and dialog boxes; if non-None, the search will be
8021 limited to the given window hierarchy. The search is recursive in both
8022 cases.
8023
8024 If no window with such name is found, wx.FindWindowByLabel is called.
8025 """
8026 return _core_.FindWindowByName(*args, **kwargs)
8027
8028def FindWindowByLabel(*args, **kwargs):
8029 """
8030 FindWindowByLabel(String label, Window parent=None) -> Window
8031
8032 Find a window by its label. Depending on the type of window, the label
8033 may be a window title or panel item label. If parent is None, the
8034 search will start from all top-level frames and dialog boxes; if
8035 non-None, the search will be limited to the given window
8036 hierarchy. The search is recursive in both cases.
8037 """
8038 return _core_.FindWindowByLabel(*args, **kwargs)
8039
8040def Window_FromHWND(*args, **kwargs):
8041 """Window_FromHWND(Window parent, unsigned long _hWnd) -> Window"""
8042 return _core_.Window_FromHWND(*args, **kwargs)
8043#---------------------------------------------------------------------------
8044
8045class Validator(EvtHandler):
8046 """Proxy of C++ Validator class"""
8047 def __repr__(self):
8048 return "<%s.%s; proxy of C++ wxValidator instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
8049 def __init__(self, *args, **kwargs):
8050 """__init__(self) -> Validator"""
8051 newobj = _core_.new_Validator(*args, **kwargs)
8052 self.this = newobj.this
8053 self.thisown = 1
8054 del newobj.thisown
8055 self._setOORInfo(self)
8056
8057 def Clone(*args, **kwargs):
8058 """Clone(self) -> Validator"""
8059 return _core_.Validator_Clone(*args, **kwargs)
8060
8061 def Validate(*args, **kwargs):
8062 """Validate(self, Window parent) -> bool"""
8063 return _core_.Validator_Validate(*args, **kwargs)
8064
8065 def TransferToWindow(*args, **kwargs):
8066 """TransferToWindow(self) -> bool"""
8067 return _core_.Validator_TransferToWindow(*args, **kwargs)
8068
8069 def TransferFromWindow(*args, **kwargs):
8070 """TransferFromWindow(self) -> bool"""
8071 return _core_.Validator_TransferFromWindow(*args, **kwargs)
8072
8073 def GetWindow(*args, **kwargs):
8074 """GetWindow(self) -> Window"""
8075 return _core_.Validator_GetWindow(*args, **kwargs)
8076
8077 def SetWindow(*args, **kwargs):
8078 """SetWindow(self, Window window)"""
8079 return _core_.Validator_SetWindow(*args, **kwargs)
8080
8081 def IsSilent(*args, **kwargs):
8082 """IsSilent() -> bool"""
8083 return _core_.Validator_IsSilent(*args, **kwargs)
8084
8085 IsSilent = staticmethod(IsSilent)
8086 def SetBellOnError(*args, **kwargs):
8087 """SetBellOnError(int doIt=True)"""
8088 return _core_.Validator_SetBellOnError(*args, **kwargs)
8089
8090 SetBellOnError = staticmethod(SetBellOnError)
8091
8092class ValidatorPtr(Validator):
8093 def __init__(self, this):
8094 self.this = this
8095 if not hasattr(self,"thisown"): self.thisown = 0
8096 self.__class__ = Validator
8097_core_.Validator_swigregister(ValidatorPtr)
8098
8099def Validator_IsSilent(*args, **kwargs):
8100 """Validator_IsSilent() -> bool"""
8101 return _core_.Validator_IsSilent(*args, **kwargs)
8102
8103def Validator_SetBellOnError(*args, **kwargs):
8104 """Validator_SetBellOnError(int doIt=True)"""
8105 return _core_.Validator_SetBellOnError(*args, **kwargs)
8106
8107class PyValidator(Validator):
8108 """Proxy of C++ PyValidator class"""
8109 def __repr__(self):
8110 return "<%s.%s; proxy of C++ wxPyValidator instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
8111 def __init__(self, *args, **kwargs):
8112 """__init__(self) -> PyValidator"""
8113 newobj = _core_.new_PyValidator(*args, **kwargs)
8114 self.this = newobj.this
8115 self.thisown = 1
8116 del newobj.thisown
8117
8118 self._setCallbackInfo(self, PyValidator, 1)
8119 self._setOORInfo(self)
8120
8121 def _setCallbackInfo(*args, **kwargs):
8122 """_setCallbackInfo(self, PyObject self, PyObject _class, int incref=True)"""
8123 return _core_.PyValidator__setCallbackInfo(*args, **kwargs)
8124
8125
8126class PyValidatorPtr(PyValidator):
8127 def __init__(self, this):
8128 self.this = this
8129 if not hasattr(self,"thisown"): self.thisown = 0
8130 self.__class__ = PyValidator
8131_core_.PyValidator_swigregister(PyValidatorPtr)
8132
8133#---------------------------------------------------------------------------
8134
8135class Menu(EvtHandler):
8136 """Proxy of C++ Menu class"""
8137 def __repr__(self):
8138 return "<%s.%s; proxy of C++ wxMenu instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
8139 def __init__(self, *args, **kwargs):
8140 """__init__(self, String title=EmptyString, long style=0) -> Menu"""
8141 newobj = _core_.new_Menu(*args, **kwargs)
8142 self.this = newobj.this
8143 self.thisown = 1
8144 del newobj.thisown
8145 self._setOORInfo(self)
8146
8147 def Append(*args, **kwargs):
8148 """Append(self, int id, String text, String help=EmptyString, int kind=ITEM_NORMAL) -> MenuItem"""
8149 return _core_.Menu_Append(*args, **kwargs)
8150
8151 def AppendSeparator(*args, **kwargs):
8152 """AppendSeparator(self) -> MenuItem"""
8153 return _core_.Menu_AppendSeparator(*args, **kwargs)
8154
8155 def AppendCheckItem(*args, **kwargs):
8156 """AppendCheckItem(self, int id, String text, String help=EmptyString) -> MenuItem"""
8157 return _core_.Menu_AppendCheckItem(*args, **kwargs)
8158
8159 def AppendRadioItem(*args, **kwargs):
8160 """AppendRadioItem(self, int id, String text, String help=EmptyString) -> MenuItem"""
8161 return _core_.Menu_AppendRadioItem(*args, **kwargs)
8162
8163 def AppendMenu(*args, **kwargs):
8164 """AppendMenu(self, int id, String text, Menu submenu, String help=EmptyString) -> MenuItem"""
8165 return _core_.Menu_AppendMenu(*args, **kwargs)
8166
8167 def AppendItem(*args, **kwargs):
8168 """AppendItem(self, MenuItem item) -> MenuItem"""
8169 return _core_.Menu_AppendItem(*args, **kwargs)
8170
8171 def Break(*args, **kwargs):
8172 """Break(self)"""
8173 return _core_.Menu_Break(*args, **kwargs)
8174
8175 def InsertItem(*args, **kwargs):
8176 """InsertItem(self, size_t pos, MenuItem item) -> MenuItem"""
8177 return _core_.Menu_InsertItem(*args, **kwargs)
8178
8179 def Insert(*args, **kwargs):
8180 """
8181 Insert(self, size_t pos, int id, String text, String help=EmptyString,
8182 int kind=ITEM_NORMAL) -> MenuItem
8183 """
8184 return _core_.Menu_Insert(*args, **kwargs)
8185
8186 def InsertSeparator(*args, **kwargs):
8187 """InsertSeparator(self, size_t pos) -> MenuItem"""
8188 return _core_.Menu_InsertSeparator(*args, **kwargs)
8189
8190 def InsertCheckItem(*args, **kwargs):
8191 """InsertCheckItem(self, size_t pos, int id, String text, String help=EmptyString) -> MenuItem"""
8192 return _core_.Menu_InsertCheckItem(*args, **kwargs)
8193
8194 def InsertRadioItem(*args, **kwargs):
8195 """InsertRadioItem(self, size_t pos, int id, String text, String help=EmptyString) -> MenuItem"""
8196 return _core_.Menu_InsertRadioItem(*args, **kwargs)
8197
8198 def InsertMenu(*args, **kwargs):
8199 """InsertMenu(self, size_t pos, int id, String text, Menu submenu, String help=EmptyString) -> MenuItem"""
8200 return _core_.Menu_InsertMenu(*args, **kwargs)
8201
8202 def PrependItem(*args, **kwargs):
8203 """PrependItem(self, MenuItem item) -> MenuItem"""
8204 return _core_.Menu_PrependItem(*args, **kwargs)
8205
8206 def Prepend(*args, **kwargs):
8207 """Prepend(self, int id, String text, String help=EmptyString, int kind=ITEM_NORMAL) -> MenuItem"""
8208 return _core_.Menu_Prepend(*args, **kwargs)
8209
8210 def PrependSeparator(*args, **kwargs):
8211 """PrependSeparator(self) -> MenuItem"""
8212 return _core_.Menu_PrependSeparator(*args, **kwargs)
8213
8214 def PrependCheckItem(*args, **kwargs):
8215 """PrependCheckItem(self, int id, String text, String help=EmptyString) -> MenuItem"""
8216 return _core_.Menu_PrependCheckItem(*args, **kwargs)
8217
8218 def PrependRadioItem(*args, **kwargs):
8219 """PrependRadioItem(self, int id, String text, String help=EmptyString) -> MenuItem"""
8220 return _core_.Menu_PrependRadioItem(*args, **kwargs)
8221
8222 def PrependMenu(*args, **kwargs):
8223 """PrependMenu(self, int id, String text, Menu submenu, String help=EmptyString) -> MenuItem"""
8224 return _core_.Menu_PrependMenu(*args, **kwargs)
8225
8226 def Remove(*args, **kwargs):
8227 """Remove(self, int id) -> MenuItem"""
8228 return _core_.Menu_Remove(*args, **kwargs)
8229
8230 def RemoveItem(*args, **kwargs):
8231 """RemoveItem(self, MenuItem item) -> MenuItem"""
8232 return _core_.Menu_RemoveItem(*args, **kwargs)
8233
8234 def Delete(*args, **kwargs):
8235 """Delete(self, int id) -> bool"""
8236 return _core_.Menu_Delete(*args, **kwargs)
8237
8238 def DeleteItem(*args, **kwargs):
8239 """DeleteItem(self, MenuItem item) -> bool"""
8240 return _core_.Menu_DeleteItem(*args, **kwargs)
8241
8242 def Destroy(*args, **kwargs):
8243 """
8244 Destroy(self)
8245
8246 Deletes the C++ object this Python object is a proxy for.
8247 """
8248 return _core_.Menu_Destroy(*args, **kwargs)
8249
8250 def DestroyId(*args, **kwargs):
8251 """
8252 DestroyId(self, int id) -> bool
8253
8254 Deletes the C++ object this Python object is a proxy for.
8255 """
8256 return _core_.Menu_DestroyId(*args, **kwargs)
8257
8258 def DestroyItem(*args, **kwargs):
8259 """
8260 DestroyItem(self, MenuItem item) -> bool
8261
8262 Deletes the C++ object this Python object is a proxy for.
8263 """
8264 return _core_.Menu_DestroyItem(*args, **kwargs)
8265
8266 def GetMenuItemCount(*args, **kwargs):
8267 """GetMenuItemCount(self) -> size_t"""
8268 return _core_.Menu_GetMenuItemCount(*args, **kwargs)
8269
8270 def GetMenuItems(*args, **kwargs):
8271 """GetMenuItems(self) -> PyObject"""
8272 return _core_.Menu_GetMenuItems(*args, **kwargs)
8273
8274 def FindItem(*args, **kwargs):
8275 """FindItem(self, String item) -> int"""
8276 return _core_.Menu_FindItem(*args, **kwargs)
8277
8278 def FindItemById(*args, **kwargs):
8279 """FindItemById(self, int id) -> MenuItem"""
8280 return _core_.Menu_FindItemById(*args, **kwargs)
8281
8282 def FindItemByPosition(*args, **kwargs):
8283 """FindItemByPosition(self, size_t position) -> MenuItem"""
8284 return _core_.Menu_FindItemByPosition(*args, **kwargs)
8285
8286 def Enable(*args, **kwargs):
8287 """Enable(self, int id, bool enable)"""
8288 return _core_.Menu_Enable(*args, **kwargs)
8289
8290 def IsEnabled(*args, **kwargs):
8291 """IsEnabled(self, int id) -> bool"""
8292 return _core_.Menu_IsEnabled(*args, **kwargs)
8293
8294 def Check(*args, **kwargs):
8295 """Check(self, int id, bool check)"""
8296 return _core_.Menu_Check(*args, **kwargs)
8297
8298 def IsChecked(*args, **kwargs):
8299 """IsChecked(self, int id) -> bool"""
8300 return _core_.Menu_IsChecked(*args, **kwargs)
8301
8302 def SetLabel(*args, **kwargs):
8303 """SetLabel(self, int id, String label)"""
8304 return _core_.Menu_SetLabel(*args, **kwargs)
8305
8306 def GetLabel(*args, **kwargs):
8307 """GetLabel(self, int id) -> String"""
8308 return _core_.Menu_GetLabel(*args, **kwargs)
8309
8310 def SetHelpString(*args, **kwargs):
8311 """SetHelpString(self, int id, String helpString)"""
8312 return _core_.Menu_SetHelpString(*args, **kwargs)
8313
8314 def GetHelpString(*args, **kwargs):
8315 """GetHelpString(self, int id) -> String"""
8316 return _core_.Menu_GetHelpString(*args, **kwargs)
8317
8318 def SetTitle(*args, **kwargs):
8319 """SetTitle(self, String title)"""
8320 return _core_.Menu_SetTitle(*args, **kwargs)
8321
8322 def GetTitle(*args, **kwargs):
8323 """GetTitle(self) -> String"""
8324 return _core_.Menu_GetTitle(*args, **kwargs)
8325
8326 def SetEventHandler(*args, **kwargs):
8327 """SetEventHandler(self, EvtHandler handler)"""
8328 return _core_.Menu_SetEventHandler(*args, **kwargs)
8329
8330 def GetEventHandler(*args, **kwargs):
8331 """GetEventHandler(self) -> EvtHandler"""
8332 return _core_.Menu_GetEventHandler(*args, **kwargs)
8333
8334 def SetInvokingWindow(*args, **kwargs):
8335 """SetInvokingWindow(self, Window win)"""
8336 return _core_.Menu_SetInvokingWindow(*args, **kwargs)
8337
8338 def GetInvokingWindow(*args, **kwargs):
8339 """GetInvokingWindow(self) -> Window"""
8340 return _core_.Menu_GetInvokingWindow(*args, **kwargs)
8341
8342 def GetStyle(*args, **kwargs):
8343 """GetStyle(self) -> long"""
8344 return _core_.Menu_GetStyle(*args, **kwargs)
8345
8346 def UpdateUI(*args, **kwargs):
8347 """UpdateUI(self, EvtHandler source=None)"""
8348 return _core_.Menu_UpdateUI(*args, **kwargs)
8349
8350 def GetMenuBar(*args, **kwargs):
8351 """GetMenuBar(self) -> MenuBar"""
8352 return _core_.Menu_GetMenuBar(*args, **kwargs)
8353
8354 def Attach(*args, **kwargs):
8355 """Attach(self, wxMenuBarBase menubar)"""
8356 return _core_.Menu_Attach(*args, **kwargs)
8357
8358 def Detach(*args, **kwargs):
8359 """Detach(self)"""
8360 return _core_.Menu_Detach(*args, **kwargs)
8361
8362 def IsAttached(*args, **kwargs):
8363 """IsAttached(self) -> bool"""
8364 return _core_.Menu_IsAttached(*args, **kwargs)
8365
8366 def SetParent(*args, **kwargs):
8367 """SetParent(self, Menu parent)"""
8368 return _core_.Menu_SetParent(*args, **kwargs)
8369
8370 def GetParent(*args, **kwargs):
8371 """GetParent(self) -> Menu"""
8372 return _core_.Menu_GetParent(*args, **kwargs)
8373
8374
8375class MenuPtr(Menu):
8376 def __init__(self, this):
8377 self.this = this
8378 if not hasattr(self,"thisown"): self.thisown = 0
8379 self.__class__ = Menu
8380_core_.Menu_swigregister(MenuPtr)
8381DefaultValidator = cvar.DefaultValidator
8382
8383#---------------------------------------------------------------------------
8384
8385class MenuBar(Window):
8386 """Proxy of C++ MenuBar class"""
8387 def __repr__(self):
8388 return "<%s.%s; proxy of C++ wxMenuBar instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
8389 def __init__(self, *args, **kwargs):
8390 """__init__(self, long style=0) -> MenuBar"""
8391 newobj = _core_.new_MenuBar(*args, **kwargs)
8392 self.this = newobj.this
8393 self.thisown = 1
8394 del newobj.thisown
8395 self._setOORInfo(self)
8396
8397 def Append(*args, **kwargs):
8398 """Append(self, Menu menu, String title) -> bool"""
8399 return _core_.MenuBar_Append(*args, **kwargs)
8400
8401 def Insert(*args, **kwargs):
8402 """Insert(self, size_t pos, Menu menu, String title) -> bool"""
8403 return _core_.MenuBar_Insert(*args, **kwargs)
8404
8405 def GetMenuCount(*args, **kwargs):
8406 """GetMenuCount(self) -> size_t"""
8407 return _core_.MenuBar_GetMenuCount(*args, **kwargs)
8408
8409 def GetMenu(*args, **kwargs):
8410 """GetMenu(self, size_t pos) -> Menu"""
8411 return _core_.MenuBar_GetMenu(*args, **kwargs)
8412
8413 def Replace(*args, **kwargs):
8414 """Replace(self, size_t pos, Menu menu, String title) -> Menu"""
8415 return _core_.MenuBar_Replace(*args, **kwargs)
8416
8417 def Remove(*args, **kwargs):
8418 """Remove(self, size_t pos) -> Menu"""
8419 return _core_.MenuBar_Remove(*args, **kwargs)
8420
8421 def EnableTop(*args, **kwargs):
8422 """EnableTop(self, size_t pos, bool enable)"""
8423 return _core_.MenuBar_EnableTop(*args, **kwargs)
8424
8425 def IsEnabledTop(*args, **kwargs):
8426 """IsEnabledTop(self, size_t pos) -> bool"""
8427 return _core_.MenuBar_IsEnabledTop(*args, **kwargs)
8428
8429 def SetLabelTop(*args, **kwargs):
8430 """SetLabelTop(self, size_t pos, String label)"""
8431 return _core_.MenuBar_SetLabelTop(*args, **kwargs)
8432
8433 def GetLabelTop(*args, **kwargs):
8434 """GetLabelTop(self, size_t pos) -> String"""
8435 return _core_.MenuBar_GetLabelTop(*args, **kwargs)
8436
8437 def FindMenuItem(*args, **kwargs):
8438 """FindMenuItem(self, String menu, String item) -> int"""
8439 return _core_.MenuBar_FindMenuItem(*args, **kwargs)
8440
8441 def FindItemById(*args, **kwargs):
8442 """FindItemById(self, int id) -> MenuItem"""
8443 return _core_.MenuBar_FindItemById(*args, **kwargs)
8444
8445 def FindMenu(*args, **kwargs):
8446 """FindMenu(self, String title) -> int"""
8447 return _core_.MenuBar_FindMenu(*args, **kwargs)
8448
8449 def Enable(*args, **kwargs):
8450 """Enable(self, int id, bool enable)"""
8451 return _core_.MenuBar_Enable(*args, **kwargs)
8452
8453 def Check(*args, **kwargs):
8454 """Check(self, int id, bool check)"""
8455 return _core_.MenuBar_Check(*args, **kwargs)
8456
8457 def IsChecked(*args, **kwargs):
8458 """IsChecked(self, int id) -> bool"""
8459 return _core_.MenuBar_IsChecked(*args, **kwargs)
8460
8461 def IsEnabled(*args, **kwargs):
8462 """IsEnabled(self, int id) -> bool"""
8463 return _core_.MenuBar_IsEnabled(*args, **kwargs)
8464
8465 def SetLabel(*args, **kwargs):
8466 """SetLabel(self, int id, String label)"""
8467 return _core_.MenuBar_SetLabel(*args, **kwargs)
8468
8469 def GetLabel(*args, **kwargs):
8470 """GetLabel(self, int id) -> String"""
8471 return _core_.MenuBar_GetLabel(*args, **kwargs)
8472
8473 def SetHelpString(*args, **kwargs):
8474 """SetHelpString(self, int id, String helpString)"""
8475 return _core_.MenuBar_SetHelpString(*args, **kwargs)
8476
8477 def GetHelpString(*args, **kwargs):
8478 """GetHelpString(self, int id) -> String"""
8479 return _core_.MenuBar_GetHelpString(*args, **kwargs)
8480
8481 def GetFrame(*args, **kwargs):
8482 """GetFrame(self) -> wxFrame"""
8483 return _core_.MenuBar_GetFrame(*args, **kwargs)
8484
8485 def IsAttached(*args, **kwargs):
8486 """IsAttached(self) -> bool"""
8487 return _core_.MenuBar_IsAttached(*args, **kwargs)
8488
8489 def Attach(*args, **kwargs):
8490 """Attach(self, wxFrame frame)"""
8491 return _core_.MenuBar_Attach(*args, **kwargs)
8492
8493 def Detach(*args, **kwargs):
8494 """Detach(self)"""
8495 return _core_.MenuBar_Detach(*args, **kwargs)
8496
8497
8498class MenuBarPtr(MenuBar):
8499 def __init__(self, this):
8500 self.this = this
8501 if not hasattr(self,"thisown"): self.thisown = 0
8502 self.__class__ = MenuBar
8503_core_.MenuBar_swigregister(MenuBarPtr)
8504
8505#---------------------------------------------------------------------------
8506
8507class MenuItem(Object):
8508 """Proxy of C++ MenuItem class"""
8509 def __repr__(self):
8510 return "<%s.%s; proxy of C++ wxMenuItem instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
8511 def __init__(self, *args, **kwargs):
8512 """
8513 __init__(self, Menu parentMenu=None, int id=ID_ANY, String text=EmptyString,
8514 String help=EmptyString, int kind=ITEM_NORMAL,
8515 Menu subMenu=None) -> MenuItem
8516 """
8517 newobj = _core_.new_MenuItem(*args, **kwargs)
8518 self.this = newobj.this
8519 self.thisown = 1
8520 del newobj.thisown
8521 def GetMenu(*args, **kwargs):
8522 """GetMenu(self) -> Menu"""
8523 return _core_.MenuItem_GetMenu(*args, **kwargs)
8524
8525 def SetMenu(*args, **kwargs):
8526 """SetMenu(self, Menu menu)"""
8527 return _core_.MenuItem_SetMenu(*args, **kwargs)
8528
8529 def SetId(*args, **kwargs):
8530 """SetId(self, int id)"""
8531 return _core_.MenuItem_SetId(*args, **kwargs)
8532
8533 def GetId(*args, **kwargs):
8534 """GetId(self) -> int"""
8535 return _core_.MenuItem_GetId(*args, **kwargs)
8536
8537 def IsSeparator(*args, **kwargs):
8538 """IsSeparator(self) -> bool"""
8539 return _core_.MenuItem_IsSeparator(*args, **kwargs)
8540
8541 def SetText(*args, **kwargs):
8542 """SetText(self, String str)"""
8543 return _core_.MenuItem_SetText(*args, **kwargs)
8544
8545 def GetLabel(*args, **kwargs):
8546 """GetLabel(self) -> String"""
8547 return _core_.MenuItem_GetLabel(*args, **kwargs)
8548
8549 def GetText(*args, **kwargs):
8550 """GetText(self) -> String"""
8551 return _core_.MenuItem_GetText(*args, **kwargs)
8552
8553 def GetLabelFromText(*args, **kwargs):
8554 """GetLabelFromText(String text) -> String"""
8555 return _core_.MenuItem_GetLabelFromText(*args, **kwargs)
8556
8557 GetLabelFromText = staticmethod(GetLabelFromText)
8558 def GetKind(*args, **kwargs):
8559 """GetKind(self) -> int"""
8560 return _core_.MenuItem_GetKind(*args, **kwargs)
8561
8562 def SetKind(*args, **kwargs):
8563 """SetKind(self, int kind)"""
8564 return _core_.MenuItem_SetKind(*args, **kwargs)
8565
8566 def SetCheckable(*args, **kwargs):
8567 """SetCheckable(self, bool checkable)"""
8568 return _core_.MenuItem_SetCheckable(*args, **kwargs)
8569
8570 def IsCheckable(*args, **kwargs):
8571 """IsCheckable(self) -> bool"""
8572 return _core_.MenuItem_IsCheckable(*args, **kwargs)
8573
8574 def IsSubMenu(*args, **kwargs):
8575 """IsSubMenu(self) -> bool"""
8576 return _core_.MenuItem_IsSubMenu(*args, **kwargs)
8577
8578 def SetSubMenu(*args, **kwargs):
8579 """SetSubMenu(self, Menu menu)"""
8580 return _core_.MenuItem_SetSubMenu(*args, **kwargs)
8581
8582 def GetSubMenu(*args, **kwargs):
8583 """GetSubMenu(self) -> Menu"""
8584 return _core_.MenuItem_GetSubMenu(*args, **kwargs)
8585
8586 def Enable(*args, **kwargs):
8587 """Enable(self, bool enable=True)"""
8588 return _core_.MenuItem_Enable(*args, **kwargs)
8589
8590 def IsEnabled(*args, **kwargs):
8591 """IsEnabled(self) -> bool"""
8592 return _core_.MenuItem_IsEnabled(*args, **kwargs)
8593
8594 def Check(*args, **kwargs):
8595 """Check(self, bool check=True)"""
8596 return _core_.MenuItem_Check(*args, **kwargs)
8597
8598 def IsChecked(*args, **kwargs):
8599 """IsChecked(self) -> bool"""
8600 return _core_.MenuItem_IsChecked(*args, **kwargs)
8601
8602 def Toggle(*args, **kwargs):
8603 """Toggle(self)"""
8604 return _core_.MenuItem_Toggle(*args, **kwargs)
8605
8606 def SetHelp(*args, **kwargs):
8607 """SetHelp(self, String str)"""
8608 return _core_.MenuItem_SetHelp(*args, **kwargs)
8609
8610 def GetHelp(*args, **kwargs):
8611 """GetHelp(self) -> String"""
8612 return _core_.MenuItem_GetHelp(*args, **kwargs)
8613
8614 def GetAccel(*args, **kwargs):
8615 """GetAccel(self) -> AcceleratorEntry"""
8616 return _core_.MenuItem_GetAccel(*args, **kwargs)
8617
8618 def SetAccel(*args, **kwargs):
8619 """SetAccel(self, AcceleratorEntry accel)"""
8620 return _core_.MenuItem_SetAccel(*args, **kwargs)
8621
8622 def GetDefaultMarginWidth(*args, **kwargs):
8623 """GetDefaultMarginWidth() -> int"""
8624 return _core_.MenuItem_GetDefaultMarginWidth(*args, **kwargs)
8625
8626 GetDefaultMarginWidth = staticmethod(GetDefaultMarginWidth)
8627 def SetBitmap(*args, **kwargs):
8628 """SetBitmap(self, Bitmap bitmap)"""
8629 return _core_.MenuItem_SetBitmap(*args, **kwargs)
8630
8631 def GetBitmap(*args, **kwargs):
8632 """GetBitmap(self) -> Bitmap"""
8633 return _core_.MenuItem_GetBitmap(*args, **kwargs)
8634
8635
8636class MenuItemPtr(MenuItem):
8637 def __init__(self, this):
8638 self.this = this
8639 if not hasattr(self,"thisown"): self.thisown = 0
8640 self.__class__ = MenuItem
8641_core_.MenuItem_swigregister(MenuItemPtr)
8642
8643def MenuItem_GetLabelFromText(*args, **kwargs):
8644 """MenuItem_GetLabelFromText(String text) -> String"""
8645 return _core_.MenuItem_GetLabelFromText(*args, **kwargs)
8646
8647def MenuItem_GetDefaultMarginWidth(*args, **kwargs):
8648 """MenuItem_GetDefaultMarginWidth() -> int"""
8649 return _core_.MenuItem_GetDefaultMarginWidth(*args, **kwargs)
8650
8651#---------------------------------------------------------------------------
8652
8653class Control(Window):
8654 """
8655 This is the base class for a control or 'widget'.
8656
8657 A control is generally a small window which processes user input
8658 and/or displays one or more item of data.
8659 """
8660 def __repr__(self):
8661 return "<%s.%s; proxy of C++ wxControl instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
8662 def __init__(self, *args, **kwargs):
8663 """
8664 __init__(self, Window parent, int id=-1, Point pos=DefaultPosition,
8665 Size size=DefaultSize, long style=0, Validator validator=DefaultValidator,
8666 String name=ControlNameStr) -> Control
8667
8668 Create a Control. Normally you should only call this from a subclass'
8669 __init__ as a plain old wx.Control is not very useful.
8670 """
8671 newobj = _core_.new_Control(*args, **kwargs)
8672 self.this = newobj.this
8673 self.thisown = 1
8674 del newobj.thisown
8675 self._setOORInfo(self)
8676
8677 def Create(*args, **kwargs):
8678 """
8679 Create(self, Window parent, int id=-1, Point pos=DefaultPosition,
8680 Size size=DefaultSize, long style=0, Validator validator=DefaultValidator,
8681 String name=ControlNameStr) -> bool
8682
8683 Do the 2nd phase and create the GUI control.
8684 """
8685 return _core_.Control_Create(*args, **kwargs)
8686
8687 def Command(*args, **kwargs):
8688 """
8689 Command(self, CommandEvent event)
8690
8691 Simulates the effect of the user issuing a command to the item.
8692
8693 :see: `wx.CommandEvent`
8694
8695 """
8696 return _core_.Control_Command(*args, **kwargs)
8697
8698 def GetLabel(*args, **kwargs):
8699 """
8700 GetLabel(self) -> String
8701
8702 Return a control's text.
8703 """
8704 return _core_.Control_GetLabel(*args, **kwargs)
8705
8706 def SetLabel(*args, **kwargs):
8707 """
8708 SetLabel(self, String label)
8709
8710 Sets the item's text.
8711 """
8712 return _core_.Control_SetLabel(*args, **kwargs)
8713
8714 def GetClassDefaultAttributes(*args, **kwargs):
8715 """
8716 GetClassDefaultAttributes(int variant=WINDOW_VARIANT_NORMAL) -> VisualAttributes
8717
8718 Get the default attributes for this class. This is useful if you want
8719 to use the same font or colour in your own control as in a standard
8720 control -- which is a much better idea than hard coding specific
8721 colours or fonts which might look completely out of place on the
8722 user's system, especially if it uses themes.
8723
8724 The variant parameter is only relevant under Mac currently and is
8725 ignore under other platforms. Under Mac, it will change the size of
8726 the returned font. See `wx.Window.SetWindowVariant` for more about
8727 this.
8728 """
8729 return _core_.Control_GetClassDefaultAttributes(*args, **kwargs)
8730
8731 GetClassDefaultAttributes = staticmethod(GetClassDefaultAttributes)
8732
8733class ControlPtr(Control):
8734 def __init__(self, this):
8735 self.this = this
8736 if not hasattr(self,"thisown"): self.thisown = 0
8737 self.__class__ = Control
8738_core_.Control_swigregister(ControlPtr)
8739ControlNameStr = cvar.ControlNameStr
8740
8741def PreControl(*args, **kwargs):
8742 """
8743 PreControl() -> Control
8744
8745 Precreate a Control control for 2-phase creation
8746 """
8747 val = _core_.new_PreControl(*args, **kwargs)
8748 val.thisown = 1
8749 return val
8750
8751def Control_GetClassDefaultAttributes(*args, **kwargs):
8752 """
8753 Control_GetClassDefaultAttributes(int variant=WINDOW_VARIANT_NORMAL) -> VisualAttributes
8754
8755 Get the default attributes for this class. This is useful if you want
8756 to use the same font or colour in your own control as in a standard
8757 control -- which is a much better idea than hard coding specific
8758 colours or fonts which might look completely out of place on the
8759 user's system, especially if it uses themes.
8760
8761 The variant parameter is only relevant under Mac currently and is
8762 ignore under other platforms. Under Mac, it will change the size of
8763 the returned font. See `wx.Window.SetWindowVariant` for more about
8764 this.
8765 """
8766 return _core_.Control_GetClassDefaultAttributes(*args, **kwargs)
8767
8768#---------------------------------------------------------------------------
8769
8770class ItemContainer(object):
8771 """
8772 wx.ItemContainer defines an interface which is implemented by all
8773 controls which have string subitems, each of which may be selected,
8774 such as `wx.ListBox`, `wx.CheckListBox`, `wx.Choice` as well as
8775 `wx.ComboBox` which implements an extended interface deriving from
8776 this one.
8777
8778 It defines the methods for accessing the control's items and although
8779 each of the derived classes implements them differently, they still
8780 all conform to the same interface.
8781
8782 The items in a wx.ItemContainer have (non empty) string labels and,
8783 optionally, client data associated with them.
8784
8785 """
8786 def __init__(self): raise RuntimeError, "No constructor defined"
8787 def __repr__(self):
8788 return "<%s.%s; proxy of C++ wxItemContainer instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
8789 def Append(*args, **kwargs):
8790 """
8791 Append(self, String item, PyObject clientData=None) -> int
8792
8793 Adds the item to the control, associating the given data with the item
8794 if not None. The return value is the index of the newly added item
8795 which may be different from the last one if the control is sorted (e.g.
8796 has wx.LB_SORT or wx.CB_SORT style).
8797 """
8798 return _core_.ItemContainer_Append(*args, **kwargs)
8799
8800 def AppendItems(*args, **kwargs):
8801 """
8802 AppendItems(self, List strings)
8803
8804 Apend several items at once to the control. Notice that calling this
8805 method may be much faster than appending the items one by one if you
8806 need to add a lot of items.
8807 """
8808 return _core_.ItemContainer_AppendItems(*args, **kwargs)
8809
8810 def Insert(*args, **kwargs):
8811 """
8812 Insert(self, String item, int pos, PyObject clientData=None) -> int
8813
8814 Insert an item into the control before the item at the ``pos`` index,
8815 optionally associating some data object with the item.
8816 """
8817 return _core_.ItemContainer_Insert(*args, **kwargs)
8818
8819 def Clear(*args, **kwargs):
8820 """
8821 Clear(self)
8822
8823 Removes all items from the control.
8824 """
8825 return _core_.ItemContainer_Clear(*args, **kwargs)
8826
8827 def Delete(*args, **kwargs):
8828 """
8829 Delete(self, int n)
8830
8831 Deletes the item at the zero-based index 'n' from the control. Note
8832 that it is an error (signalled by a `wx.PyAssertionError` exception if
8833 enabled) to remove an item with the index negative or greater or equal
8834 than the number of items in the control.
8835 """
8836 return _core_.ItemContainer_Delete(*args, **kwargs)
8837
8838 def GetCount(*args, **kwargs):
8839 """
8840 GetCount(self) -> int
8841
8842 Returns the number of items in the control.
8843 """
8844 return _core_.ItemContainer_GetCount(*args, **kwargs)
8845
8846 def IsEmpty(*args, **kwargs):
8847 """
8848 IsEmpty(self) -> bool
8849
8850 Returns True if the control is empty or False if it has some items.
8851 """
8852 return _core_.ItemContainer_IsEmpty(*args, **kwargs)
8853
8854 def GetString(*args, **kwargs):
8855 """
8856 GetString(self, int n) -> String
8857
8858 Returns the label of the item with the given index.
8859 """
8860 return _core_.ItemContainer_GetString(*args, **kwargs)
8861
8862 def GetStrings(*args, **kwargs):
8863 """GetStrings(self) -> wxArrayString"""
8864 return _core_.ItemContainer_GetStrings(*args, **kwargs)
8865
8866 def SetString(*args, **kwargs):
8867 """
8868 SetString(self, int n, String s)
8869
8870 Sets the label for the given item.
8871 """
8872 return _core_.ItemContainer_SetString(*args, **kwargs)
8873
8874 def FindString(*args, **kwargs):
8875 """
8876 FindString(self, String s) -> int
8877
8878 Finds an item whose label matches the given string. Returns the
8879 zero-based position of the item, or ``wx.NOT_FOUND`` if the string was not
8880 found.
8881 """
8882 return _core_.ItemContainer_FindString(*args, **kwargs)
8883
8884 def Select(*args, **kwargs):
8885 """
8886 Select(self, int n)
8887
8888 Sets the item at index 'n' to be the selected item.
8889 """
8890 return _core_.ItemContainer_Select(*args, **kwargs)
8891
8892 SetSelection = Select
8893 def GetSelection(*args, **kwargs):
8894 """
8895 GetSelection(self) -> int
8896
8897 Returns the index of the selected item or ``wx.NOT_FOUND`` if no item
8898 is selected.
8899 """
8900 return _core_.ItemContainer_GetSelection(*args, **kwargs)
8901
8902 def GetStringSelection(*args, **kwargs):
8903 """
8904 GetStringSelection(self) -> String
8905
8906 Returns the label of the selected item or an empty string if no item
8907 is selected.
8908 """
8909 return _core_.ItemContainer_GetStringSelection(*args, **kwargs)
8910
8911 def GetClientData(*args, **kwargs):
8912 """
8913 GetClientData(self, int n) -> PyObject
8914
8915 Returns the client data associated with the given item, (if any.)
8916 """
8917 return _core_.ItemContainer_GetClientData(*args, **kwargs)
8918
8919 def SetClientData(*args, **kwargs):
8920 """
8921 SetClientData(self, int n, PyObject clientData)
8922
8923 Associate the given client data with the item at position n.
8924 """
8925 return _core_.ItemContainer_SetClientData(*args, **kwargs)
8926
8927
8928class ItemContainerPtr(ItemContainer):
8929 def __init__(self, this):
8930 self.this = this
8931 if not hasattr(self,"thisown"): self.thisown = 0
8932 self.__class__ = ItemContainer
8933_core_.ItemContainer_swigregister(ItemContainerPtr)
8934
8935#---------------------------------------------------------------------------
8936
8937class ControlWithItems(Control,ItemContainer):
8938 """
8939 wx.ControlWithItems combines the ``wx.ItemContainer`` class with the
8940 wx.Control class, and is used for the base class of various controls
8941 that have items.
8942 """
8943 def __init__(self): raise RuntimeError, "No constructor defined"
8944 def __repr__(self):
8945 return "<%s.%s; proxy of C++ wxControlWithItems instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
8946
8947class ControlWithItemsPtr(ControlWithItems):
8948 def __init__(self, this):
8949 self.this = this
8950 if not hasattr(self,"thisown"): self.thisown = 0
8951 self.__class__ = ControlWithItems
8952_core_.ControlWithItems_swigregister(ControlWithItemsPtr)
8953
8954#---------------------------------------------------------------------------
8955
8956class SizerItem(Object):
8957 """
8958 The wx.SizerItem class is used to track the position, size and other
8959 attributes of each item managed by a `wx.Sizer`. In normal usage user
8960 code should never need to deal directly with a wx.SizerItem, but
8961 custom classes derived from `wx.PySizer` will probably need to use the
8962 collection of wx.SizerItems held by wx.Sizer when calculating layout.
8963
8964 :see: `wx.Sizer`, `wx.GBSizerItem`
8965 """
8966 def __repr__(self):
8967 return "<%s.%s; proxy of C++ wxSizerItem instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
8968 def __init__(self, *args, **kwargs):
8969 """
8970 __init__(self) -> SizerItem
8971
8972 Constructs an empty wx.SizerItem. Either a window, sizer or spacer
8973 size will need to be set before this item can be used in a Sizer.
8974
8975 You will probably never need to create a wx.SizerItem directly as they
8976 are created automatically when the sizer's Add, Insert or Prepend
8977 methods are called.
8978
8979 :see: `wx.SizerItemSpacer`, `wx.SizerItemWindow`, `wx.SizerItemSizer`
8980 """
8981 newobj = _core_.new_SizerItem(*args, **kwargs)
8982 self.this = newobj.this
8983 self.thisown = 1
8984 del newobj.thisown
8985 def DeleteWindows(*args, **kwargs):
8986 """
8987 DeleteWindows(self)
8988
8989 Destroy the window or the windows in a subsizer, depending on the type
8990 of item.
8991 """
8992 return _core_.SizerItem_DeleteWindows(*args, **kwargs)
8993
8994 def DetachSizer(*args, **kwargs):
8995 """
8996 DetachSizer(self)
8997
8998 Enable deleting the SizerItem without destroying the contained sizer.
8999 """
9000 return _core_.SizerItem_DetachSizer(*args, **kwargs)
9001
9002 def GetSize(*args, **kwargs):
9003 """
9004 GetSize(self) -> Size
9005
9006 Get the current size of the item, as set in the last Layout.
9007 """
9008 return _core_.SizerItem_GetSize(*args, **kwargs)
9009
9010 def CalcMin(*args, **kwargs):
9011 """
9012 CalcMin(self) -> Size
9013
9014 Calculates the minimum desired size for the item, including any space
9015 needed by borders.
9016 """
9017 return _core_.SizerItem_CalcMin(*args, **kwargs)
9018
9019 def SetDimension(*args, **kwargs):
9020 """
9021 SetDimension(self, Point pos, Size size)
9022
9023 Set the position and size of the space allocated for this item by the
9024 sizer, and adjust the position and size of the item (window or
9025 subsizer) to be within that space taking alignment and borders into
9026 account.
9027 """
9028 return _core_.SizerItem_SetDimension(*args, **kwargs)
9029
9030 def GetMinSize(*args, **kwargs):
9031 """
9032 GetMinSize(self) -> Size
9033
9034 Get the minimum size needed for the item.
9035 """
9036 return _core_.SizerItem_GetMinSize(*args, **kwargs)
9037
9038 def GetMinSizeWithBorder(*args, **kwargs):
9039 """
9040 GetMinSizeWithBorder(self) -> Size
9041
9042 Get the minimum size needed for the item with space for the borders
9043 added, if needed.
9044 """
9045 return _core_.SizerItem_GetMinSizeWithBorder(*args, **kwargs)
9046
9047 def SetInitSize(*args, **kwargs):
9048 """SetInitSize(self, int x, int y)"""
9049 return _core_.SizerItem_SetInitSize(*args, **kwargs)
9050
9051 def SetRatioWH(*args, **kwargs):
9052 """
9053 SetRatioWH(self, int width, int height)
9054
9055 Set the ratio item attribute.
9056 """
9057 return _core_.SizerItem_SetRatioWH(*args, **kwargs)
9058
9059 def SetRatioSize(*args, **kwargs):
9060 """
9061 SetRatioSize(self, Size size)
9062
9063 Set the ratio item attribute.
9064 """
9065 return _core_.SizerItem_SetRatioSize(*args, **kwargs)
9066
9067 def SetRatio(*args, **kwargs):
9068 """
9069 SetRatio(self, float ratio)
9070
9071 Set the ratio item attribute.
9072 """
9073 return _core_.SizerItem_SetRatio(*args, **kwargs)
9074
9075 def GetRatio(*args, **kwargs):
9076 """
9077 GetRatio(self) -> float
9078
9079 Set the ratio item attribute.
9080 """
9081 return _core_.SizerItem_GetRatio(*args, **kwargs)
9082
9083 def GetRect(*args, **kwargs):
9084 """
9085 GetRect(self) -> Rect
9086
9087 Returns the rectangle that the sizer item should occupy
9088 """
9089 return _core_.SizerItem_GetRect(*args, **kwargs)
9090
9091 def IsWindow(*args, **kwargs):
9092 """
9093 IsWindow(self) -> bool
9094
9095 Is this sizer item a window?
9096 """
9097 return _core_.SizerItem_IsWindow(*args, **kwargs)
9098
9099 def IsSizer(*args, **kwargs):
9100 """
9101 IsSizer(self) -> bool
9102
9103 Is this sizer item a subsizer?
9104 """
9105 return _core_.SizerItem_IsSizer(*args, **kwargs)
9106
9107 def IsSpacer(*args, **kwargs):
9108 """
9109 IsSpacer(self) -> bool
9110
9111 Is this sizer item a spacer?
9112 """
9113 return _core_.SizerItem_IsSpacer(*args, **kwargs)
9114
9115 def SetProportion(*args, **kwargs):
9116 """
9117 SetProportion(self, int proportion)
9118
9119 Set the proportion value for this item.
9120 """
9121 return _core_.SizerItem_SetProportion(*args, **kwargs)
9122
9123 def GetProportion(*args, **kwargs):
9124 """
9125 GetProportion(self) -> int
9126
9127 Get the proportion value for this item.
9128 """
9129 return _core_.SizerItem_GetProportion(*args, **kwargs)
9130
9131 SetOption = wx._deprecated(SetProportion, "Please use `SetProportion` instead.")
9132 GetOption = wx._deprecated(GetProportion, "Please use `GetProportion` instead.")
9133 def SetFlag(*args, **kwargs):
9134 """
9135 SetFlag(self, int flag)
9136
9137 Set the flag value for this item.
9138 """
9139 return _core_.SizerItem_SetFlag(*args, **kwargs)
9140
9141 def GetFlag(*args, **kwargs):
9142 """
9143 GetFlag(self) -> int
9144
9145 Get the flag value for this item.
9146 """
9147 return _core_.SizerItem_GetFlag(*args, **kwargs)
9148
9149 def SetBorder(*args, **kwargs):
9150 """
9151 SetBorder(self, int border)
9152
9153 Set the border value for this item.
9154 """
9155 return _core_.SizerItem_SetBorder(*args, **kwargs)
9156
9157 def GetBorder(*args, **kwargs):
9158 """
9159 GetBorder(self) -> int
9160
9161 Get the border value for this item.
9162 """
9163 return _core_.SizerItem_GetBorder(*args, **kwargs)
9164
9165 def GetWindow(*args, **kwargs):
9166 """
9167 GetWindow(self) -> Window
9168
9169 Get the window (if any) that is managed by this sizer item.
9170 """
9171 return _core_.SizerItem_GetWindow(*args, **kwargs)
9172
9173 def SetWindow(*args, **kwargs):
9174 """
9175 SetWindow(self, Window window)
9176
9177 Set the window to be managed by this sizer item.
9178 """
9179 return _core_.SizerItem_SetWindow(*args, **kwargs)
9180
9181 def GetSizer(*args, **kwargs):
9182 """
9183 GetSizer(self) -> Sizer
9184
9185 Get the subsizer (if any) that is managed by this sizer item.
9186 """
9187 return _core_.SizerItem_GetSizer(*args, **kwargs)
9188
9189 def SetSizer(*args, **kwargs):
9190 """
9191 SetSizer(self, Sizer sizer)
9192
9193 Set the subsizer to be managed by this sizer item.
9194 """
9195 return _core_.SizerItem_SetSizer(*args, **kwargs)
9196
9197 def GetSpacer(*args, **kwargs):
9198 """
9199 GetSpacer(self) -> Size
9200
9201 Get the size of the spacer managed by this sizer item.
9202 """
9203 return _core_.SizerItem_GetSpacer(*args, **kwargs)
9204
9205 def SetSpacer(*args, **kwargs):
9206 """
9207 SetSpacer(self, Size size)
9208
9209 Set the size of the spacer to be managed by this sizer item.
9210 """
9211 return _core_.SizerItem_SetSpacer(*args, **kwargs)
9212
9213 def Show(*args, **kwargs):
9214 """
9215 Show(self, bool show)
9216
9217 Set the show item attribute, which sizers use to determine if the item
9218 is to be made part of the layout or not. If the item is tracking a
9219 window then it is shown or hidden as needed.
9220 """
9221 return _core_.SizerItem_Show(*args, **kwargs)
9222
9223 def IsShown(*args, **kwargs):
9224 """
9225 IsShown(self) -> bool
9226
9227 Is the item to be shown in the layout?
9228 """
9229 return _core_.SizerItem_IsShown(*args, **kwargs)
9230
9231 def GetPosition(*args, **kwargs):
9232 """
9233 GetPosition(self) -> Point
9234
9235 Returns the current position of the item, as set in the last Layout.
9236 """
9237 return _core_.SizerItem_GetPosition(*args, **kwargs)
9238
9239 def GetUserData(*args, **kwargs):
9240 """
9241 GetUserData(self) -> PyObject
9242
9243 Returns the userData associated with this sizer item, or None if there
9244 isn't any.
9245 """
9246 return _core_.SizerItem_GetUserData(*args, **kwargs)
9247
9248
9249class SizerItemPtr(SizerItem):
9250 def __init__(self, this):
9251 self.this = this
9252 if not hasattr(self,"thisown"): self.thisown = 0
9253 self.__class__ = SizerItem
9254_core_.SizerItem_swigregister(SizerItemPtr)
9255
9256def SizerItemWindow(*args, **kwargs):
9257 """
9258 SizerItemWindow(Window window, int proportion, int flag, int border,
9259 PyObject userData=None) -> SizerItem
9260
9261 Constructs a `wx.SizerItem` for tracking a window.
9262 """
9263 val = _core_.new_SizerItemWindow(*args, **kwargs)
9264 val.thisown = 1
9265 return val
9266
9267def SizerItemSpacer(*args, **kwargs):
9268 """
9269 SizerItemSpacer(int width, int height, int proportion, int flag, int border,
9270 PyObject userData=None) -> SizerItem
9271
9272 Constructs a `wx.SizerItem` for tracking a spacer.
9273 """
9274 val = _core_.new_SizerItemSpacer(*args, **kwargs)
9275 val.thisown = 1
9276 return val
9277
9278def SizerItemSizer(*args, **kwargs):
9279 """
9280 SizerItemSizer(Sizer sizer, int proportion, int flag, int border,
9281 PyObject userData=None) -> SizerItem
9282
9283 Constructs a `wx.SizerItem` for tracking a subsizer
9284 """
9285 val = _core_.new_SizerItemSizer(*args, **kwargs)
9286 val.thisown = 1
9287 return val
9288
9289class Sizer(Object):
9290 """
9291 wx.Sizer is the abstract base class used for laying out subwindows in
9292 a window. You cannot use wx.Sizer directly; instead, you will have to
9293 use one of the sizer classes derived from it such as `wx.BoxSizer`,
9294 `wx.StaticBoxSizer`, `wx.NotebookSizer`, `wx.GridSizer`, `wx.FlexGridSizer`
9295 and `wx.GridBagSizer`.
9296
9297 The concept implemented by sizers in wxWidgets is closely related to
9298 layout tools in other GUI toolkits, such as Java's AWT, the GTK
9299 toolkit or the Qt toolkit. It is based upon the idea of the individual
9300 subwindows reporting their minimal required size and their ability to
9301 get stretched if the size of the parent window has changed. This will
9302 most often mean that the programmer does not set the original size of
9303 a dialog in the beginning, rather the dialog will assigned a sizer and
9304 this sizer will be queried about the recommended size. The sizer in
9305 turn will query its children, which can be normal windows or contorls,
9306 empty space or other sizers, so that a hierarchy of sizers can be
9307 constructed. Note that wxSizer does not derive from wxWindow and thus
9308 do not interfere with tab ordering and requires very little resources
9309 compared to a real window on screen.
9310
9311 What makes sizers so well fitted for use in wxWidgets is the fact that
9312 every control reports its own minimal size and the algorithm can
9313 handle differences in font sizes or different window (dialog item)
9314 sizes on different platforms without problems. If for example the
9315 standard font as well as the overall design of Mac widgets requires
9316 more space than on Windows, then the initial size of a dialog using a
9317 sizer will automatically be bigger on Mac than on Windows.
9318 """
9319 def __init__(self): raise RuntimeError, "No constructor defined"
9320 def __repr__(self):
9321 return "<%s.%s; proxy of C++ wxSizer instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
9322 def _setOORInfo(*args, **kwargs):
9323 """_setOORInfo(self, PyObject _self)"""
9324 return _core_.Sizer__setOORInfo(*args, **kwargs)
9325
9326 def Add(*args, **kwargs):
9327 """
9328 Add(self, item, int proportion=0, int flag=0, int border=0,
9329 PyObject userData=None) -> wx.SizerItem
9330
9331 Appends a child item to the sizer.
9332 """
9333 return _core_.Sizer_Add(*args, **kwargs)
9334
9335 def Insert(*args, **kwargs):
9336 """
9337 Insert(self, int before, item, int proportion=0, int flag=0, int border=0,
9338 PyObject userData=None) -> wx.SizerItem
9339
9340 Inserts a new item into the list of items managed by this sizer before
9341 the item at index *before*. See `Add` for a description of the parameters.
9342 """
9343 return _core_.Sizer_Insert(*args, **kwargs)
9344
9345 def Prepend(*args, **kwargs):
9346 """
9347 Prepend(self, item, int proportion=0, int flag=0, int border=0,
9348 PyObject userData=None) -> wx.SizerItem
9349
9350 Adds a new item to the begining of the list of sizer items managed by
9351 this sizer. See `Add` for a description of the parameters.
9352 """
9353 return _core_.Sizer_Prepend(*args, **kwargs)
9354
9355 def Remove(*args, **kwargs):
9356 """
9357 Remove(self, item) -> bool
9358
9359 Removes an item from the sizer and destroys it. This method does not
9360 cause any layout or resizing to take place, call `Layout` to update
9361 the layout on screen after removing a child from the sizer. The
9362 *item* parameter can be either a window, a sizer, or the zero-based
9363 index of an item to remove. Returns True if the child item was found
9364 and removed.
9365 """
9366 return _core_.Sizer_Remove(*args, **kwargs)
9367
9368 def Detach(*args, **kwargs):
9369 """
9370 Detach(self, item) -> bool
9371
9372 Detaches an item from the sizer without destroying it. This method
9373 does not cause any layout or resizing to take place, call `Layout` to
9374 do so. The *item* parameter can be either a window, a sizer, or the
9375 zero-based index of the item to be detached. Returns True if the child item
9376 was found and detached.
9377 """
9378 return _core_.Sizer_Detach(*args, **kwargs)
9379
9380 def GetItem(*args, **kwargs):
9381 """
9382 GetItem(self, item) -> wx.SizerItem
9383
9384 Returns the `wx.SizerItem` which holds the *item* given. The *item*
9385 parameter can be either a window, a sizer, or the zero-based index of
9386 the item to be detached.
9387 """
9388 return _core_.Sizer_GetItem(*args, **kwargs)
9389
9390 def _SetItemMinSize(*args, **kwargs):
9391 """_SetItemMinSize(self, PyObject item, Size size)"""
9392 return _core_.Sizer__SetItemMinSize(*args, **kwargs)
9393
9394 def SetItemMinSize(self, item, *args):
9395 """
9396 SetItemMinSize(self, item, Size size)
9397
9398 Sets the minimum size that will be allocated for an item in the sizer.
9399 The *item* parameter can be either a window, a sizer, or the
9400 zero-based index of the item. If a window or sizer is given then it
9401 will be searched for recursivly in subsizers if neccessary.
9402 """
9403 if len(args) == 2:
9404 # for backward compatibility accept separate width,height args too
9405 return self._SetItemMinSize(item, args)
9406 else:
9407 return self._SetItemMinSize(item, args[0])
9408
9409 def AddItem(*args, **kwargs):
9410 """
9411 AddItem(self, SizerItem item)
9412
9413 Adds a `wx.SizerItem` to the sizer.
9414 """
9415 return _core_.Sizer_AddItem(*args, **kwargs)
9416
9417 def InsertItem(*args, **kwargs):
9418 """
9419 InsertItem(self, int index, SizerItem item)
9420
9421 Inserts a `wx.SizerItem` to the sizer at the position given by *index*.
9422 """
9423 return _core_.Sizer_InsertItem(*args, **kwargs)
9424
9425 def PrependItem(*args, **kwargs):
9426 """
9427 PrependItem(self, SizerItem item)
9428
9429 Prepends a `wx.SizerItem` to the sizer.
9430 """
9431 return _core_.Sizer_PrependItem(*args, **kwargs)
9432
9433 def AddMany(self, items):
9434 """
9435 AddMany is a convenience method for adding several items
9436 to a sizer at one time. Simply pass it a list of tuples,
9437 where each tuple consists of the parameters that you
9438 would normally pass to the `Add` method.
9439 """
9440 for item in items:
9441 if type(item) != type(()) or (len(item) == 2 and type(item[0]) == type(1)):
9442 item = (item, )
9443 self.Add(*item)
9444
9445 # for backwards compatibility only, please do not use in new code
9446 AddWindow = wx._deprecated(Add, "AddWindow is deprecated, use `Add` instead.")
9447 AddSizer = wx._deprecated(Add, "AddSizer is deprecated, use `Add` instead.")
9448 AddSpacer = wx._deprecated(Add, "AddSpacer is deprecated, use `Add` instead.")
9449 PrependWindow = wx._deprecated(Prepend, "PrependWindow is deprecated, use `Prepend` instead.")
9450 PrependSizer = wx._deprecated(Prepend, "PrependSizer is deprecated, use `Prepend` instead.")
9451 PrependSpacer = wx._deprecated(Prepend, "PrependSpacer is deprecated, use `Prepend` instead.")
9452 InsertWindow = wx._deprecated(Insert, "InsertWindow is deprecated, use `Insert` instead.")
9453 InsertSizer = wx._deprecated(Insert, "InsertSizer is deprecated, use `Insert` instead.")
9454 InsertSpacer = wx._deprecated(Insert, "InsertSpacer is deprecated, use `Insert` instead.")
9455 RemoveWindow = wx._deprecated(Remove, "RemoveWindow is deprecated, use `Remove` instead.")
9456 RemoveSizer = wx._deprecated(Remove, "RemoveSizer is deprecated, use `Remove` instead.")
9457 RemovePos = wx._deprecated(Remove, "RemovePos is deprecated, use `Remove` instead.")
9458
9459
9460 def SetDimension(*args, **kwargs):
9461 """
9462 SetDimension(self, int x, int y, int width, int height)
9463
9464 Call this to force the sizer to take the given dimension and thus
9465 force the items owned by the sizer to resize themselves according to
9466 the rules defined by the parameter in the `Add`, `Insert` or `Prepend`
9467 methods.
9468 """
9469 return _core_.Sizer_SetDimension(*args, **kwargs)
9470
9471 def SetMinSize(*args, **kwargs):
9472 """
9473 SetMinSize(self, Size size)
9474
9475 Call this to give the sizer a minimal size. Normally, the sizer will
9476 calculate its minimal size based purely on how much space its children
9477 need. After calling this method `GetMinSize` will return either the
9478 minimal size as requested by its children or the minimal size set
9479 here, depending on which is bigger.
9480 """
9481 return _core_.Sizer_SetMinSize(*args, **kwargs)
9482
9483 def GetSize(*args, **kwargs):
9484 """
9485 GetSize(self) -> Size
9486
9487 Returns the current size of the space managed by the sizer.
9488 """
9489 return _core_.Sizer_GetSize(*args, **kwargs)
9490
9491 def GetPosition(*args, **kwargs):
9492 """
9493 GetPosition(self) -> Point
9494
9495 Returns the current position of the sizer's managed space.
9496 """
9497 return _core_.Sizer_GetPosition(*args, **kwargs)
9498
9499 def GetMinSize(*args, **kwargs):
9500 """
9501 GetMinSize(self) -> Size
9502
9503 Returns the minimal size of the sizer. This is either the combined
9504 minimal size of all the children and their borders or the minimal size
9505 set by SetMinSize, depending on which is bigger.
9506 """
9507 return _core_.Sizer_GetMinSize(*args, **kwargs)
9508
9509 def GetSizeTuple(self):
9510 return self.GetSize().Get()
9511 def GetPositionTuple(self):
9512 return self.GetPosition().Get()
9513 def GetMinSizeTuple(self):
9514 return self.GetMinSize().Get()
9515
9516 def RecalcSizes(*args, **kwargs):
9517 """
9518 RecalcSizes(self)
9519
9520 Using the sizes calculated by `CalcMin` reposition and resize all the
9521 items managed by this sizer. You should not need to call this directly as
9522 it is called by `Layout`.
9523 """
9524 return _core_.Sizer_RecalcSizes(*args, **kwargs)
9525
9526 def CalcMin(*args, **kwargs):
9527 """
9528 CalcMin(self) -> Size
9529
9530 This method is where the sizer will do the actual calculation of its
9531 children's minimal sizes. You should not need to call this directly as
9532 it is called by `Layout`.
9533 """
9534 return _core_.Sizer_CalcMin(*args, **kwargs)
9535
9536 def Layout(*args, **kwargs):
9537 """
9538 Layout(self)
9539
9540 This method will force the recalculation and layout of the items
9541 controlled by the sizer using the current space allocated to the
9542 sizer. Normally this is called automatically from the owning window's
9543 EVT_SIZE handler, but it is also useful to call it from user code when
9544 one of the items in a sizer change size, or items are added or
9545 removed.
9546 """
9547 return _core_.Sizer_Layout(*args, **kwargs)
9548
9549 def Fit(*args, **kwargs):
9550 """
9551 Fit(self, Window window) -> Size
9552
9553 Tell the sizer to resize the *window* to match the sizer's minimal
9554 size. This is commonly done in the constructor of the window itself in
9555 order to set its initial size to match the needs of the children as
9556 determined by the sizer. Returns the new size.
9557
9558 For a top level window this is the total window size, not the client size.
9559 """
9560 return _core_.Sizer_Fit(*args, **kwargs)
9561
9562 def FitInside(*args, **kwargs):
9563 """
9564 FitInside(self, Window window)
9565
9566 Tell the sizer to resize the *virtual size* of the *window* to match the
9567 sizer's minimal size. This will not alter the on screen size of the
9568 window, but may cause the addition/removal/alteration of scrollbars
9569 required to view the virtual area in windows which manage it.
9570
9571 :see: `wx.ScrolledWindow.SetScrollbars`, `SetVirtualSizeHints`
9572
9573 """
9574 return _core_.Sizer_FitInside(*args, **kwargs)
9575
9576 def SetSizeHints(*args, **kwargs):
9577 """
9578 SetSizeHints(self, Window window)
9579
9580 Tell the sizer to set (and `Fit`) the minimal size of the *window* to
9581 match the sizer's minimal size. This is commonly done in the
9582 constructor of the window itself if the window is resizable (as are
9583 many dialogs under Unix and frames on probably all platforms) in order
9584 to prevent the window from being sized smaller than the minimal size
9585 required by the sizer.
9586 """
9587 return _core_.Sizer_SetSizeHints(*args, **kwargs)
9588
9589 def SetVirtualSizeHints(*args, **kwargs):
9590 """
9591 SetVirtualSizeHints(self, Window window)
9592
9593 Tell the sizer to set the minimal size of the window virtual area to
9594 match the sizer's minimal size. For windows with managed scrollbars
9595 this will set them appropriately.
9596
9597 :see: `wx.ScrolledWindow.SetScrollbars`
9598
9599 """
9600 return _core_.Sizer_SetVirtualSizeHints(*args, **kwargs)
9601
9602 def Clear(*args, **kwargs):
9603 """
9604 Clear(self, bool deleteWindows=False)
9605
9606 Clear all items from the sizer, optionally destroying the window items
9607 as well.
9608 """
9609 return _core_.Sizer_Clear(*args, **kwargs)
9610
9611 def DeleteWindows(*args, **kwargs):
9612 """
9613 DeleteWindows(self)
9614
9615 Destroy all windows managed by the sizer.
9616 """
9617 return _core_.Sizer_DeleteWindows(*args, **kwargs)
9618
9619 def GetChildren(*args, **kwargs):
9620 """
9621 GetChildren(sefl) -> list
9622
9623 Returns a list of all the `wx.SizerItem` objects managed by the sizer.
9624 """
9625 return _core_.Sizer_GetChildren(*args, **kwargs)
9626
9627 def Show(*args, **kwargs):
9628 """
9629 Show(self, item, bool show=True, bool recursive=false) -> bool
9630
9631 Shows or hides an item managed by the sizer. To make a sizer item
9632 disappear or reappear, use Show followed by `Layout`. The *item*
9633 parameter can be either a window, a sizer, or the zero-based index of
9634 the item. Use the recursive parameter to show or hide an item in a
9635 subsizer. Returns True if the item was found.
9636 """
9637 return _core_.Sizer_Show(*args, **kwargs)
9638
9639 def IsShown(*args, **kwargs):
9640 """
9641 IsShown(self, item)
9642
9643 Determines if the item is currently shown. sizer. To make a sizer
9644 item disappear or reappear, use Show followed by `Layout`. The *item*
9645 parameter can be either a window, a sizer, or the zero-based index of
9646 the item.
9647 """
9648 return _core_.Sizer_IsShown(*args, **kwargs)
9649
9650 def Hide(self, item, recursive=False):
9651 """
9652 A convenience method for Show(item, False, recursive).
9653 """
9654 return self.Show(item, False, recursive)
9655
9656 def ShowItems(*args, **kwargs):
9657 """
9658 ShowItems(self, bool show)
9659
9660 Recursively call `wx.SizerItem.Show` on all sizer items.
9661 """
9662 return _core_.Sizer_ShowItems(*args, **kwargs)
9663
9664
9665class SizerPtr(Sizer):
9666 def __init__(self, this):
9667 self.this = this
9668 if not hasattr(self,"thisown"): self.thisown = 0
9669 self.__class__ = Sizer
9670_core_.Sizer_swigregister(SizerPtr)
9671
9672class PySizer(Sizer):
9673 """
9674 wx.PySizer is a special version of `wx.Sizer` that has been
9675 instrumented to allow the C++ virtual methods to be overloaded in
9676 Python derived classes. You would derive from this class if you are
9677 wanting to implement a custom sizer in Python code. Simply implement
9678 `CalcMin` and `RecalcSizes` in the derived class and you're all set.
9679 For example::
9680
9681 class MySizer(wx.PySizer):
9682 def __init__(self):
9683 wx.PySizer.__init__(self)
9684
9685 def CalcMin(self):
9686 for item in self.GetChildren():
9687 # calculate the total minimum width and height needed
9688 # by all items in the sizer according to this sizer's
9689 # layout algorithm.
9690 ...
9691 return wx.Size(width, height)
9692
9693 def RecalcSizes(self):
9694 # find the space allotted to this sizer
9695 pos = self.GetPosition()
9696 size = self.GetSize()
9697 for item in self.GetChildren():
9698 # Recalculate (if necessary) the position and size of
9699 # each item and then call item.SetDimension to do the
9700 # actual positioning and sizing of the items within the
9701 # space alloted to this sizer.
9702 ...
9703 item.SetDimension(itemPos, itemSize)
9704
9705
9706 When `Layout` is called it first calls `CalcMin` followed by
9707 `RecalcSizes` so you can optimize a bit by saving the results of
9708 `CalcMin` and reusing them in `RecalcSizes`.
9709
9710 :see: `wx.SizerItem`, `wx.Sizer.GetChildren`
9711
9712
9713 """
9714 def __repr__(self):
9715 return "<%s.%s; proxy of C++ wxPySizer instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
9716 def __init__(self, *args, **kwargs):
9717 """
9718 __init__(self) -> PySizer
9719
9720 Creates a wx.PySizer. Must be called from the __init__ in the derived
9721 class.
9722 """
9723 newobj = _core_.new_PySizer(*args, **kwargs)
9724 self.this = newobj.this
9725 self.thisown = 1
9726 del newobj.thisown
9727 self._setCallbackInfo(self, PySizer);self._setOORInfo(self)
9728
9729 def _setCallbackInfo(*args, **kwargs):
9730 """_setCallbackInfo(self, PyObject self, PyObject _class)"""
9731 return _core_.PySizer__setCallbackInfo(*args, **kwargs)
9732
9733
9734class PySizerPtr(PySizer):
9735 def __init__(self, this):
9736 self.this = this
9737 if not hasattr(self,"thisown"): self.thisown = 0
9738 self.__class__ = PySizer
9739_core_.PySizer_swigregister(PySizerPtr)
9740
9741#---------------------------------------------------------------------------
9742
9743class BoxSizer(Sizer):
9744 """
9745 The basic idea behind a box sizer is that windows will most often be
9746 laid out in rather simple basic geometry, typically in a row or a
9747 column or nested hierarchies of either. A wx.BoxSizer will lay out
9748 its items in a simple row or column, depending on the orientation
9749 parameter passed to the constructor.
9750 """
9751 def __repr__(self):
9752 return "<%s.%s; proxy of C++ wxBoxSizer instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
9753 def __init__(self, *args, **kwargs):
9754 """
9755 __init__(self, int orient=HORIZONTAL) -> BoxSizer
9756
9757 Constructor for a wx.BoxSizer. *orient* may be one of ``wx.VERTICAL``
9758 or ``wx.HORIZONTAL`` for creating either a column sizer or a row
9759 sizer.
9760 """
9761 newobj = _core_.new_BoxSizer(*args, **kwargs)
9762 self.this = newobj.this
9763 self.thisown = 1
9764 del newobj.thisown
9765 self._setOORInfo(self)
9766
9767 def GetOrientation(*args, **kwargs):
9768 """
9769 GetOrientation(self) -> int
9770
9771 Returns the current orientation of the sizer.
9772 """
9773 return _core_.BoxSizer_GetOrientation(*args, **kwargs)
9774
9775 def SetOrientation(*args, **kwargs):
9776 """
9777 SetOrientation(self, int orient)
9778
9779 Resets the orientation of the sizer.
9780 """
9781 return _core_.BoxSizer_SetOrientation(*args, **kwargs)
9782
9783
9784class BoxSizerPtr(BoxSizer):
9785 def __init__(self, this):
9786 self.this = this
9787 if not hasattr(self,"thisown"): self.thisown = 0
9788 self.__class__ = BoxSizer
9789_core_.BoxSizer_swigregister(BoxSizerPtr)
9790
9791#---------------------------------------------------------------------------
9792
9793class StaticBoxSizer(BoxSizer):
9794 """
9795 wx.StaticBoxSizer derives from and functions identically to the
9796 `wx.BoxSizer` and adds a `wx.StaticBox` around the items that the sizer
9797 manages. Note that this static box must be created separately and
9798 passed to the sizer constructor.
9799 """
9800 def __repr__(self):
9801 return "<%s.%s; proxy of C++ wxStaticBoxSizer instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
9802 def __init__(self, *args, **kwargs):
9803 """
9804 __init__(self, StaticBox box, int orient=HORIZONTAL) -> StaticBoxSizer
9805
9806 Constructor. It takes an associated static box and the orientation
9807 *orient* as parameters - orient can be either of ``wx.VERTICAL`` or
9808 ``wx.HORIZONTAL``.
9809 """
9810 newobj = _core_.new_StaticBoxSizer(*args, **kwargs)
9811 self.this = newobj.this
9812 self.thisown = 1
9813 del newobj.thisown
9814 self._setOORInfo(self)
9815
9816 def GetStaticBox(*args, **kwargs):
9817 """
9818 GetStaticBox(self) -> StaticBox
9819
9820 Returns the static box associated with this sizer.
9821 """
9822 return _core_.StaticBoxSizer_GetStaticBox(*args, **kwargs)
9823
9824
9825class StaticBoxSizerPtr(StaticBoxSizer):
9826 def __init__(self, this):
9827 self.this = this
9828 if not hasattr(self,"thisown"): self.thisown = 0
9829 self.__class__ = StaticBoxSizer
9830_core_.StaticBoxSizer_swigregister(StaticBoxSizerPtr)
9831
9832#---------------------------------------------------------------------------
9833
9834class GridSizer(Sizer):
9835 """
9836 A grid sizer is a sizer which lays out its children in a
9837 two-dimensional table with all cells having the same size. In other
9838 words, the width of each cell within the grid is the width of the
9839 widest item added to the sizer and the height of each grid cell is the
9840 height of the tallest item. An optional vertical and/or horizontal
9841 gap between items can also be specified (in pixels.)
9842
9843 Items are placed in the cells of the grid in the order they are added,
9844 in row-major order. In other words, the first row is filled first,
9845 then the second, and so on until all items have been added. (If
9846 neccessary, additional rows will be added as items are added.) If you
9847 need to have greater control over the cells that items are placed in
9848 then use the `wx.GridBagSizer`.
9849
9850 """
9851 def __repr__(self):
9852 return "<%s.%s; proxy of C++ wxGridSizer instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
9853 def __init__(self, *args, **kwargs):
9854 """
9855 __init__(self, int rows=1, int cols=0, int vgap=0, int hgap=0) -> GridSizer
9856
9857 Constructor for a wx.GridSizer. *rows* and *cols* determine the number
9858 of columns and rows in the sizer - if either of the parameters is
9859 zero, it will be calculated to from the total number of children in
9860 the sizer, thus making the sizer grow dynamically. *vgap* and *hgap*
9861 define extra space between all children.
9862 """
9863 newobj = _core_.new_GridSizer(*args, **kwargs)
9864 self.this = newobj.this
9865 self.thisown = 1
9866 del newobj.thisown
9867 self._setOORInfo(self)
9868
9869 def SetCols(*args, **kwargs):
9870 """
9871 SetCols(self, int cols)
9872
9873 Sets the number of columns in the sizer.
9874 """
9875 return _core_.GridSizer_SetCols(*args, **kwargs)
9876
9877 def SetRows(*args, **kwargs):
9878 """
9879 SetRows(self, int rows)
9880
9881 Sets the number of rows in the sizer.
9882 """
9883 return _core_.GridSizer_SetRows(*args, **kwargs)
9884
9885 def SetVGap(*args, **kwargs):
9886 """
9887 SetVGap(self, int gap)
9888
9889 Sets the vertical gap (in pixels) between the cells in the sizer.
9890 """
9891 return _core_.GridSizer_SetVGap(*args, **kwargs)
9892
9893 def SetHGap(*args, **kwargs):
9894 """
9895 SetHGap(self, int gap)
9896
9897 Sets the horizontal gap (in pixels) between cells in the sizer
9898 """
9899 return _core_.GridSizer_SetHGap(*args, **kwargs)
9900
9901 def GetCols(*args, **kwargs):
9902 """
9903 GetCols(self) -> int
9904
9905 Returns the number of columns in the sizer.
9906 """
9907 return _core_.GridSizer_GetCols(*args, **kwargs)
9908
9909 def GetRows(*args, **kwargs):
9910 """
9911 GetRows(self) -> int
9912
9913 Returns the number of rows in the sizer.
9914 """
9915 return _core_.GridSizer_GetRows(*args, **kwargs)
9916
9917 def GetVGap(*args, **kwargs):
9918 """
9919 GetVGap(self) -> int
9920
9921 Returns the vertical gap (in pixels) between the cells in the sizer.
9922 """
9923 return _core_.GridSizer_GetVGap(*args, **kwargs)
9924
9925 def GetHGap(*args, **kwargs):
9926 """
9927 GetHGap(self) -> int
9928
9929 Returns the horizontal gap (in pixels) between cells in the sizer.
9930 """
9931 return _core_.GridSizer_GetHGap(*args, **kwargs)
9932
9933
9934class GridSizerPtr(GridSizer):
9935 def __init__(self, this):
9936 self.this = this
9937 if not hasattr(self,"thisown"): self.thisown = 0
9938 self.__class__ = GridSizer
9939_core_.GridSizer_swigregister(GridSizerPtr)
9940
9941#---------------------------------------------------------------------------
9942
9943FLEX_GROWMODE_NONE = _core_.FLEX_GROWMODE_NONE
9944FLEX_GROWMODE_SPECIFIED = _core_.FLEX_GROWMODE_SPECIFIED
9945FLEX_GROWMODE_ALL = _core_.FLEX_GROWMODE_ALL
9946class FlexGridSizer(GridSizer):
9947 """
9948 A flex grid sizer is a sizer which lays out its children in a
9949 two-dimensional table with all table cells in one row having the same
9950 height and all cells in one column having the same width, but all
9951 rows or all columns are not necessarily the same height or width as in
9952 the `wx.GridSizer`.
9953
9954 wx.FlexGridSizer can also size items equally in one direction but
9955 unequally ("flexibly") in the other. If the sizer is only flexible
9956 in one direction (this can be changed using `SetFlexibleDirection`), it
9957 needs to be decided how the sizer should grow in the other ("non
9958 flexible") direction in order to fill the available space. The
9959 `SetNonFlexibleGrowMode` method serves this purpose.
9960
9961
9962 """
9963 def __repr__(self):
9964 return "<%s.%s; proxy of C++ wxFlexGridSizer instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
9965 def __init__(self, *args, **kwargs):
9966 """
9967 __init__(self, int rows=1, int cols=0, int vgap=0, int hgap=0) -> FlexGridSizer
9968
9969 Constructor for a wx.FlexGridSizer. *rows* and *cols* determine the
9970 number of columns and rows in the sizer - if either of the parameters
9971 is zero, it will be calculated to from the total number of children in
9972 the sizer, thus making the sizer grow dynamically. *vgap* and *hgap*
9973 define extra space between all children.
9974 """
9975 newobj = _core_.new_FlexGridSizer(*args, **kwargs)
9976 self.this = newobj.this
9977 self.thisown = 1
9978 del newobj.thisown
9979 self._setOORInfo(self)
9980
9981 def AddGrowableRow(*args, **kwargs):
9982 """
9983 AddGrowableRow(self, size_t idx, int proportion=0)
9984
9985 Specifies that row *idx* (starting from zero) should be grown if there
9986 is extra space available to the sizer.
9987
9988 The *proportion* parameter has the same meaning as the stretch factor
9989 for the box sizers except that if all proportions are 0, then all
9990 columns are resized equally (instead of not being resized at all).
9991 """
9992 return _core_.FlexGridSizer_AddGrowableRow(*args, **kwargs)
9993
9994 def RemoveGrowableRow(*args, **kwargs):
9995 """
9996 RemoveGrowableRow(self, size_t idx)
9997
9998 Specifies that row *idx* is no longer growable.
9999 """
10000 return _core_.FlexGridSizer_RemoveGrowableRow(*args, **kwargs)
10001
10002 def AddGrowableCol(*args, **kwargs):
10003 """
10004 AddGrowableCol(self, size_t idx, int proportion=0)
10005
10006 Specifies that column *idx* (starting from zero) should be grown if
10007 there is extra space available to the sizer.
10008
10009 The *proportion* parameter has the same meaning as the stretch factor
10010 for the box sizers except that if all proportions are 0, then all
10011 columns are resized equally (instead of not being resized at all).
10012 """
10013 return _core_.FlexGridSizer_AddGrowableCol(*args, **kwargs)
10014
10015 def RemoveGrowableCol(*args, **kwargs):
10016 """
10017 RemoveGrowableCol(self, size_t idx)
10018
10019 Specifies that column *idx* is no longer growable.
10020 """
10021 return _core_.FlexGridSizer_RemoveGrowableCol(*args, **kwargs)
10022
10023 def SetFlexibleDirection(*args, **kwargs):
10024 """
10025 SetFlexibleDirection(self, int direction)
10026
10027 Specifies whether the sizer should flexibly resize its columns, rows,
10028 or both. Argument *direction* can be one of the following values. Any
10029 other value is ignored.
10030
10031 ============== =======================================
10032 wx.VERTICAL Rows are flexibly sized.
10033 wx.HORIZONTAL Columns are flexibly sized.
10034 wx.BOTH Both rows and columns are flexibly sized
10035 (this is the default value).
10036 ============== =======================================
10037
10038 Note that this method does not trigger relayout.
10039
10040 """
10041 return _core_.FlexGridSizer_SetFlexibleDirection(*args, **kwargs)
10042
10043 def GetFlexibleDirection(*args, **kwargs):
10044 """
10045 GetFlexibleDirection(self) -> int
10046
10047 Returns a value that specifies whether the sizer
10048 flexibly resizes its columns, rows, or both (default).
10049
10050 :see: `SetFlexibleDirection`
10051 """
10052 return _core_.FlexGridSizer_GetFlexibleDirection(*args, **kwargs)
10053
10054 def SetNonFlexibleGrowMode(*args, **kwargs):
10055 """
10056 SetNonFlexibleGrowMode(self, int mode)
10057
10058 Specifies how the sizer should grow in the non-flexible direction if
10059 there is one (so `SetFlexibleDirection` must have been called
10060 previously). Argument *mode* can be one of the following values:
10061
10062 ========================== =================================================
10063 wx.FLEX_GROWMODE_NONE Sizer doesn't grow in the non flexible direction.
10064 wx.FLEX_GROWMODE_SPECIFIED Sizer honors growable columns/rows set with
10065 `AddGrowableCol` and `AddGrowableRow`. In this
10066 case equal sizing applies to minimum sizes of
10067 columns or rows (this is the default value).
10068 wx.FLEX_GROWMODE_ALL Sizer equally stretches all columns or rows in
10069 the non flexible direction, whether they are
10070 growable or not in the flexbile direction.
10071 ========================== =================================================
10072
10073 Note that this method does not trigger relayout.
10074
10075
10076 """
10077 return _core_.FlexGridSizer_SetNonFlexibleGrowMode(*args, **kwargs)
10078
10079 def GetNonFlexibleGrowMode(*args, **kwargs):
10080 """
10081 GetNonFlexibleGrowMode(self) -> int
10082
10083 Returns the value that specifies how the sizer grows in the
10084 non-flexible direction if there is one.
10085
10086 :see: `SetNonFlexibleGrowMode`
10087 """
10088 return _core_.FlexGridSizer_GetNonFlexibleGrowMode(*args, **kwargs)
10089
10090 def GetRowHeights(*args, **kwargs):
10091 """
10092 GetRowHeights(self) -> list
10093
10094 Returns a list of integers representing the heights of each of the
10095 rows in the sizer.
10096 """
10097 return _core_.FlexGridSizer_GetRowHeights(*args, **kwargs)
10098
10099 def GetColWidths(*args, **kwargs):
10100 """
10101 GetColWidths(self) -> list
10102
10103 Returns a list of integers representing the widths of each of the
10104 columns in the sizer.
10105 """
10106 return _core_.FlexGridSizer_GetColWidths(*args, **kwargs)
10107
10108
10109class FlexGridSizerPtr(FlexGridSizer):
10110 def __init__(self, this):
10111 self.this = this
10112 if not hasattr(self,"thisown"): self.thisown = 0
10113 self.__class__ = FlexGridSizer
10114_core_.FlexGridSizer_swigregister(FlexGridSizerPtr)
10115
10116class StdDialogButtonSizer(BoxSizer):
10117 """
10118 A special sizer that knows how to order and position standard buttons
10119 in order to conform to the current platform's standards. You simply
10120 need to add each `wx.Button` to the sizer, and be sure to create the
10121 buttons using the standard ID's. Then call `Finalize` and the sizer
10122 will take care of the rest.
10123
10124 """
10125 def __repr__(self):
10126 return "<%s.%s; proxy of C++ wxStdDialogButtonSizer instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
10127 def __init__(self, *args, **kwargs):
10128 """__init__(self) -> StdDialogButtonSizer"""
10129 newobj = _core_.new_StdDialogButtonSizer(*args, **kwargs)
10130 self.this = newobj.this
10131 self.thisown = 1
10132 del newobj.thisown
10133 def AddButton(*args, **kwargs):
10134 """
10135 AddButton(self, wxButton button)
10136
10137 Use this to add the buttons to this sizer. Do not use the `Add`
10138 method in the base class.
10139 """
10140 return _core_.StdDialogButtonSizer_AddButton(*args, **kwargs)
10141
10142 def Finalise(*args, **kwargs):
10143 """
10144 Finalise(self)
10145
10146 This funciton needs to be called after all the buttons have been added
10147 to the sizer. It will reorder them and position them in a platform
10148 specifc manner.
10149 """
10150 return _core_.StdDialogButtonSizer_Finalise(*args, **kwargs)
10151
10152 def GetAffirmativeButton(*args, **kwargs):
10153 """GetAffirmativeButton(self) -> wxButton"""
10154 return _core_.StdDialogButtonSizer_GetAffirmativeButton(*args, **kwargs)
10155
10156 def GetApplyButton(*args, **kwargs):
10157 """GetApplyButton(self) -> wxButton"""
10158 return _core_.StdDialogButtonSizer_GetApplyButton(*args, **kwargs)
10159
10160 def GetNegativeButton(*args, **kwargs):
10161 """GetNegativeButton(self) -> wxButton"""
10162 return _core_.StdDialogButtonSizer_GetNegativeButton(*args, **kwargs)
10163
10164 def GetCancelButton(*args, **kwargs):
10165 """GetCancelButton(self) -> wxButton"""
10166 return _core_.StdDialogButtonSizer_GetCancelButton(*args, **kwargs)
10167
10168 def GetHelpButton(*args, **kwargs):
10169 """GetHelpButton(self) -> wxButton"""
10170 return _core_.StdDialogButtonSizer_GetHelpButton(*args, **kwargs)
10171
10172
10173class StdDialogButtonSizerPtr(StdDialogButtonSizer):
10174 def __init__(self, this):
10175 self.this = this
10176 if not hasattr(self,"thisown"): self.thisown = 0
10177 self.__class__ = StdDialogButtonSizer
10178_core_.StdDialogButtonSizer_swigregister(StdDialogButtonSizerPtr)
10179
10180#---------------------------------------------------------------------------
10181
10182class GBPosition(object):
10183 """
10184 This class represents the position of an item in a virtual grid of
10185 rows and columns managed by a `wx.GridBagSizer`. wxPython has
10186 typemaps that will automatically convert from a 2-element sequence of
10187 integers to a wx.GBPosition, so you can use the more pythonic
10188 representation of the position nearly transparently in Python code.
10189 """
10190 def __repr__(self):
10191 return "<%s.%s; proxy of C++ wxGBPosition instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
10192 def __init__(self, *args, **kwargs):
10193 """
10194 __init__(self, int row=0, int col=0) -> GBPosition
10195
10196 This class represents the position of an item in a virtual grid of
10197 rows and columns managed by a `wx.GridBagSizer`. wxPython has
10198 typemaps that will automatically convert from a 2-element sequence of
10199 integers to a wx.GBPosition, so you can use the more pythonic
10200 representation of the position nearly transparently in Python code.
10201 """
10202 newobj = _core_.new_GBPosition(*args, **kwargs)
10203 self.this = newobj.this
10204 self.thisown = 1
10205 del newobj.thisown
10206 def GetRow(*args, **kwargs):
10207 """GetRow(self) -> int"""
10208 return _core_.GBPosition_GetRow(*args, **kwargs)
10209
10210 def GetCol(*args, **kwargs):
10211 """GetCol(self) -> int"""
10212 return _core_.GBPosition_GetCol(*args, **kwargs)
10213
10214 def SetRow(*args, **kwargs):
10215 """SetRow(self, int row)"""
10216 return _core_.GBPosition_SetRow(*args, **kwargs)
10217
10218 def SetCol(*args, **kwargs):
10219 """SetCol(self, int col)"""
10220 return _core_.GBPosition_SetCol(*args, **kwargs)
10221
10222 def __eq__(*args, **kwargs):
10223 """__eq__(self, GBPosition other) -> bool"""
10224 return _core_.GBPosition___eq__(*args, **kwargs)
10225
10226 def __ne__(*args, **kwargs):
10227 """__ne__(self, GBPosition other) -> bool"""
10228 return _core_.GBPosition___ne__(*args, **kwargs)
10229
10230 def Set(*args, **kwargs):
10231 """Set(self, int row=0, int col=0)"""
10232 return _core_.GBPosition_Set(*args, **kwargs)
10233
10234 def Get(*args, **kwargs):
10235 """Get(self) -> PyObject"""
10236 return _core_.GBPosition_Get(*args, **kwargs)
10237
10238 asTuple = wx._deprecated(Get, "asTuple is deprecated, use `Get` instead")
10239 def __str__(self): return str(self.Get())
10240 def __repr__(self): return 'wx.GBPosition'+str(self.Get())
10241 def __len__(self): return len(self.Get())
10242 def __getitem__(self, index): return self.Get()[index]
10243 def __setitem__(self, index, val):
10244 if index == 0: self.SetRow(val)
10245 elif index == 1: self.SetCol(val)
10246 else: raise IndexError
10247 def __nonzero__(self): return self.Get() != (0,0)
10248 __safe_for_unpickling__ = True
10249 def __reduce__(self): return (wx.GBPosition, self.Get())
10250
10251 row = property(GetRow, SetRow)
10252 col = property(GetCol, SetCol)
10253
10254
10255class GBPositionPtr(GBPosition):
10256 def __init__(self, this):
10257 self.this = this
10258 if not hasattr(self,"thisown"): self.thisown = 0
10259 self.__class__ = GBPosition
10260_core_.GBPosition_swigregister(GBPositionPtr)
10261
10262class GBSpan(object):
10263 """
10264 This class is used to hold the row and column spanning attributes of
10265 items in a `wx.GridBagSizer`. wxPython has typemaps that will
10266 automatically convert from a 2-element sequence of integers to a
10267 wx.GBSpan, so you can use the more pythonic representation of the span
10268 nearly transparently in Python code.
10269
10270 """
10271 def __repr__(self):
10272 return "<%s.%s; proxy of C++ wxGBSpan instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
10273 def __init__(self, *args, **kwargs):
10274 """
10275 __init__(self, int rowspan=1, int colspan=1) -> GBSpan
10276
10277 Construct a new wxGBSpan, optionally setting the rowspan and
10278 colspan. The default is (1,1). (Meaning that the item occupies one
10279 cell in each direction.
10280 """
10281 newobj = _core_.new_GBSpan(*args, **kwargs)
10282 self.this = newobj.this
10283 self.thisown = 1
10284 del newobj.thisown
10285 def GetRowspan(*args, **kwargs):
10286 """GetRowspan(self) -> int"""
10287 return _core_.GBSpan_GetRowspan(*args, **kwargs)
10288
10289 def GetColspan(*args, **kwargs):
10290 """GetColspan(self) -> int"""
10291 return _core_.GBSpan_GetColspan(*args, **kwargs)
10292
10293 def SetRowspan(*args, **kwargs):
10294 """SetRowspan(self, int rowspan)"""
10295 return _core_.GBSpan_SetRowspan(*args, **kwargs)
10296
10297 def SetColspan(*args, **kwargs):
10298 """SetColspan(self, int colspan)"""
10299 return _core_.GBSpan_SetColspan(*args, **kwargs)
10300
10301 def __eq__(*args, **kwargs):
10302 """__eq__(self, GBSpan other) -> bool"""
10303 return _core_.GBSpan___eq__(*args, **kwargs)
10304
10305 def __ne__(*args, **kwargs):
10306 """__ne__(self, GBSpan other) -> bool"""
10307 return _core_.GBSpan___ne__(*args, **kwargs)
10308
10309 def Set(*args, **kwargs):
10310 """Set(self, int rowspan=1, int colspan=1)"""
10311 return _core_.GBSpan_Set(*args, **kwargs)
10312
10313 def Get(*args, **kwargs):
10314 """Get(self) -> PyObject"""
10315 return _core_.GBSpan_Get(*args, **kwargs)
10316
10317 asTuple = wx._deprecated(Get, "asTuple is deprecated, use `Get` instead")
10318 def __str__(self): return str(self.Get())
10319 def __repr__(self): return 'wx.GBSpan'+str(self.Get())
10320 def __len__(self): return len(self.Get())
10321 def __getitem__(self, index): return self.Get()[index]
10322 def __setitem__(self, index, val):
10323 if index == 0: self.SetRowspan(val)
10324 elif index == 1: self.SetColspan(val)
10325 else: raise IndexError
10326 def __nonzero__(self): return self.Get() != (0,0)
10327 __safe_for_unpickling__ = True
10328 def __reduce__(self): return (wx.GBSpan, self.Get())
10329
10330 rowspan = property(GetRowspan, SetRowspan)
10331 colspan = property(GetColspan, SetColspan)
10332
10333
10334class GBSpanPtr(GBSpan):
10335 def __init__(self, this):
10336 self.this = this
10337 if not hasattr(self,"thisown"): self.thisown = 0
10338 self.__class__ = GBSpan
10339_core_.GBSpan_swigregister(GBSpanPtr)
10340
10341class GBSizerItem(SizerItem):
10342 """
10343 The wx.GBSizerItem class is used to track the additional data about
10344 items in a `wx.GridBagSizer` such as the item's position in the grid
10345 and how many rows or columns it spans.
10346
10347 """
10348 def __repr__(self):
10349 return "<%s.%s; proxy of C++ wxGBSizerItem instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
10350 def __init__(self, *args, **kwargs):
10351 """
10352 __init__(self) -> GBSizerItem
10353
10354 Constructs an empty wx.GBSizerItem. Either a window, sizer or spacer
10355 size will need to be set, as well as a position and span before this
10356 item can be used in a Sizer.
10357
10358 You will probably never need to create a wx.GBSizerItem directly as they
10359 are created automatically when the sizer's Add method is called.
10360 """
10361 newobj = _core_.new_GBSizerItem(*args, **kwargs)
10362 self.this = newobj.this
10363 self.thisown = 1
10364 del newobj.thisown
10365 def GetPos(*args, **kwargs):
10366 """
10367 GetPos(self) -> GBPosition
10368
10369 Get the grid position of the item
10370 """
10371 return _core_.GBSizerItem_GetPos(*args, **kwargs)
10372
10373 def GetPosTuple(self): return self.GetPos().Get()
10374 def GetSpan(*args, **kwargs):
10375 """
10376 GetSpan(self) -> GBSpan
10377
10378 Get the row and column spanning of the item
10379 """
10380 return _core_.GBSizerItem_GetSpan(*args, **kwargs)
10381
10382 def GetSpanTuple(self): return self.GetSpan().Get()
10383 def SetPos(*args, **kwargs):
10384 """
10385 SetPos(self, GBPosition pos) -> bool
10386
10387 If the item is already a member of a sizer then first ensure that
10388 there is no other item that would intersect with this one at the new
10389 position, then set the new position. Returns True if the change is
10390 successful and after the next Layout() the item will be moved.
10391 """
10392 return _core_.GBSizerItem_SetPos(*args, **kwargs)
10393
10394 def SetSpan(*args, **kwargs):
10395 """
10396 SetSpan(self, GBSpan span) -> bool
10397
10398 If the item is already a member of a sizer then first ensure that
10399 there is no other item that would intersect with this one with its new
10400 spanning size, then set the new spanning. Returns True if the change
10401 is successful and after the next Layout() the item will be resized.
10402
10403 """
10404 return _core_.GBSizerItem_SetSpan(*args, **kwargs)
10405
10406 def Intersects(*args, **kwargs):
10407 """
10408 Intersects(self, GBSizerItem other) -> bool
10409
10410 Returns True if this item and the other item instersect.
10411 """
10412 return _core_.GBSizerItem_Intersects(*args, **kwargs)
10413
10414 def IntersectsPos(*args, **kwargs):
10415 """
10416 IntersectsPos(self, GBPosition pos, GBSpan span) -> bool
10417
10418 Returns True if the given pos/span would intersect with this item.
10419 """
10420 return _core_.GBSizerItem_IntersectsPos(*args, **kwargs)
10421
10422 def GetEndPos(*args, **kwargs):
10423 """
10424 GetEndPos(self) -> GBPosition
10425
10426 Get the row and column of the endpoint of this item.
10427 """
10428 return _core_.GBSizerItem_GetEndPos(*args, **kwargs)
10429
10430 def GetGBSizer(*args, **kwargs):
10431 """
10432 GetGBSizer(self) -> GridBagSizer
10433
10434 Get the sizer this item is a member of.
10435 """
10436 return _core_.GBSizerItem_GetGBSizer(*args, **kwargs)
10437
10438 def SetGBSizer(*args, **kwargs):
10439 """
10440 SetGBSizer(self, GridBagSizer sizer)
10441
10442 Set the sizer this item is a member of.
10443 """
10444 return _core_.GBSizerItem_SetGBSizer(*args, **kwargs)
10445
10446
10447class GBSizerItemPtr(GBSizerItem):
10448 def __init__(self, this):
10449 self.this = this
10450 if not hasattr(self,"thisown"): self.thisown = 0
10451 self.__class__ = GBSizerItem
10452_core_.GBSizerItem_swigregister(GBSizerItemPtr)
10453DefaultSpan = cvar.DefaultSpan
10454
10455def GBSizerItemWindow(*args, **kwargs):
10456 """
10457 GBSizerItemWindow(Window window, GBPosition pos, GBSpan span, int flag,
10458 int border, PyObject userData=None) -> GBSizerItem
10459
10460 Construct a `wx.GBSizerItem` for a window.
10461 """
10462 val = _core_.new_GBSizerItemWindow(*args, **kwargs)
10463 val.thisown = 1
10464 return val
10465
10466def GBSizerItemSizer(*args, **kwargs):
10467 """
10468 GBSizerItemSizer(Sizer sizer, GBPosition pos, GBSpan span, int flag,
10469 int border, PyObject userData=None) -> GBSizerItem
10470
10471 Construct a `wx.GBSizerItem` for a sizer
10472 """
10473 val = _core_.new_GBSizerItemSizer(*args, **kwargs)
10474 val.thisown = 1
10475 return val
10476
10477def GBSizerItemSpacer(*args, **kwargs):
10478 """
10479 GBSizerItemSpacer(int width, int height, GBPosition pos, GBSpan span,
10480 int flag, int border, PyObject userData=None) -> GBSizerItem
10481
10482 Construct a `wx.GBSizerItem` for a spacer.
10483 """
10484 val = _core_.new_GBSizerItemSpacer(*args, **kwargs)
10485 val.thisown = 1
10486 return val
10487
10488class GridBagSizer(FlexGridSizer):
10489 """
10490 A `wx.Sizer` that can lay out items in a virtual grid like a
10491 `wx.FlexGridSizer` but in this case explicit positioning of the items
10492 is allowed using `wx.GBPosition`, and items can optionally span more
10493 than one row and/or column using `wx.GBSpan`. The total size of the
10494 virtual grid is determined by the largest row and column that items are
10495 positioned at, adjusted for spanning.
10496
10497 """
10498 def __repr__(self):
10499 return "<%s.%s; proxy of C++ wxGridBagSizer instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
10500 def __init__(self, *args, **kwargs):
10501 """
10502 __init__(self, int vgap=0, int hgap=0) -> GridBagSizer
10503
10504 Constructor, with optional parameters to specify the gap between the
10505 rows and columns.
10506 """
10507 newobj = _core_.new_GridBagSizer(*args, **kwargs)
10508 self.this = newobj.this
10509 self.thisown = 1
10510 del newobj.thisown
10511 self._setOORInfo(self)
10512
10513 def Add(*args, **kwargs):
10514 """
10515 Add(self, item, GBPosition pos, GBSpan span=DefaultSpan, int flag=0,
10516 int border=0, userData=None) -> wx.GBSizerItem
10517
10518 Adds an item to the sizer at the grid cell *pos*, optionally spanning
10519 more than one row or column as specified with *span*. The remaining
10520 args behave similarly to `wx.Sizer.Add`.
10521
10522 Returns True if the item was successfully placed at the given cell
10523 position, False if something was already there.
10524
10525 """
10526 return _core_.GridBagSizer_Add(*args, **kwargs)
10527
10528 def AddItem(*args, **kwargs):
10529 """
10530 Add(self, GBSizerItem item) -> wx.GBSizerItem
10531
10532 Add an item to the sizer using a `wx.GBSizerItem`. Returns True if
10533 the item was successfully placed at its given cell position, False if
10534 something was already there.
10535 """
10536 return _core_.GridBagSizer_AddItem(*args, **kwargs)
10537
10538 def GetCellSize(*args, **kwargs):
10539 """
10540 GetCellSize(self, int row, int col) -> Size
10541
10542 Get the size of the specified cell, including hgap and
10543 vgap. Only valid after a Layout.
10544 """
10545 return _core_.GridBagSizer_GetCellSize(*args, **kwargs)
10546
10547 def GetEmptyCellSize(*args, **kwargs):
10548 """
10549 GetEmptyCellSize(self) -> Size
10550
10551 Get the size used for cells in the grid with no item.
10552 """
10553 return _core_.GridBagSizer_GetEmptyCellSize(*args, **kwargs)
10554
10555 def SetEmptyCellSize(*args, **kwargs):
10556 """
10557 SetEmptyCellSize(self, Size sz)
10558
10559 Set the size used for cells in the grid with no item.
10560 """
10561 return _core_.GridBagSizer_SetEmptyCellSize(*args, **kwargs)
10562
10563 def GetItemPosition(*args):
10564 """
10565 GetItemPosition(self, item) -> GBPosition
10566
10567 Get the grid position of the specified *item* where *item* is either a
10568 window or subsizer that is a member of this sizer, or a zero-based
10569 index of an item.
10570 """
10571 return _core_.GridBagSizer_GetItemPosition(*args)
10572
10573 def SetItemPosition(*args):
10574 """
10575 SetItemPosition(self, item, GBPosition pos) -> bool
10576
10577 Set the grid position of the specified *item* where *item* is either a
10578 window or subsizer that is a member of this sizer, or a zero-based
10579 index of an item. Returns True on success. If the move is not
10580 allowed (because an item is already there) then False is returned.
10581
10582 """
10583 return _core_.GridBagSizer_SetItemPosition(*args)
10584
10585 def GetItemSpan(*args):
10586 """
10587 GetItemSpan(self, item) -> GBSpan
10588
10589 Get the row/col spanning of the specified *item* where *item* is
10590 either a window or subsizer that is a member of this sizer, or a
10591 zero-based index of an item.
10592 """
10593 return _core_.GridBagSizer_GetItemSpan(*args)
10594
10595 def SetItemSpan(*args):
10596 """
10597 SetItemSpan(self, item, GBSpan span) -> bool
10598
10599 Set the row/col spanning of the specified *item* where *item* is
10600 either a window or subsizer that is a member of this sizer, or a
10601 zero-based index of an item. Returns True on success. If the move is
10602 not allowed (because an item is already there) then False is returned.
10603 """
10604 return _core_.GridBagSizer_SetItemSpan(*args)
10605
10606 def FindItem(*args):
10607 """
10608 FindItem(self, item) -> GBSizerItem
10609
10610 Find the sizer item for the given window or subsizer, returns None if
10611 not found. (non-recursive)
10612 """
10613 return _core_.GridBagSizer_FindItem(*args)
10614
10615 def FindItemAtPosition(*args, **kwargs):
10616 """
10617 FindItemAtPosition(self, GBPosition pos) -> GBSizerItem
10618
10619 Return the sizer item for the given grid cell, or None if there is no
10620 item at that position. (non-recursive)
10621 """
10622 return _core_.GridBagSizer_FindItemAtPosition(*args, **kwargs)
10623
10624 def FindItemAtPoint(*args, **kwargs):
10625 """
10626 FindItemAtPoint(self, Point pt) -> GBSizerItem
10627
10628 Return the sizer item located at the point given in *pt*, or None if
10629 there is no item at that point. The (x,y) coordinates in pt correspond
10630 to the client coordinates of the window using the sizer for
10631 layout. (non-recursive)
10632 """
10633 return _core_.GridBagSizer_FindItemAtPoint(*args, **kwargs)
10634
10635 def CheckForIntersection(*args, **kwargs):
10636 """
10637 CheckForIntersection(self, GBSizerItem item, GBSizerItem excludeItem=None) -> bool
10638
10639 Look at all items and see if any intersect (or would overlap) the
10640 given *item*. Returns True if so, False if there would be no overlap.
10641 If an *excludeItem* is given then it will not be checked for
10642 intersection, for example it may be the item we are checking the
10643 position of.
10644
10645 """
10646 return _core_.GridBagSizer_CheckForIntersection(*args, **kwargs)
10647
10648 def CheckForIntersectionPos(*args, **kwargs):
10649 """
10650 CheckForIntersectionPos(self, GBPosition pos, GBSpan span, GBSizerItem excludeItem=None) -> bool
10651
10652 Look at all items and see if any intersect (or would overlap) the
10653 given position and span. Returns True if so, False if there would be
10654 no overlap. If an *excludeItem* is given then it will not be checked
10655 for intersection, for example it may be the item we are checking the
10656 position of.
10657 """
10658 return _core_.GridBagSizer_CheckForIntersectionPos(*args, **kwargs)
10659
10660
10661class GridBagSizerPtr(GridBagSizer):
10662 def __init__(self, this):
10663 self.this = this
10664 if not hasattr(self,"thisown"): self.thisown = 0
10665 self.__class__ = GridBagSizer
10666_core_.GridBagSizer_swigregister(GridBagSizerPtr)
10667
10668#---------------------------------------------------------------------------
10669
10670Left = _core_.Left
10671Top = _core_.Top
10672Right = _core_.Right
10673Bottom = _core_.Bottom
10674Width = _core_.Width
10675Height = _core_.Height
10676Centre = _core_.Centre
10677Center = _core_.Center
10678CentreX = _core_.CentreX
10679CentreY = _core_.CentreY
10680Unconstrained = _core_.Unconstrained
10681AsIs = _core_.AsIs
10682PercentOf = _core_.PercentOf
10683Above = _core_.Above
10684Below = _core_.Below
10685LeftOf = _core_.LeftOf
10686RightOf = _core_.RightOf
10687SameAs = _core_.SameAs
10688Absolute = _core_.Absolute
10689class IndividualLayoutConstraint(Object):
10690 """
10691 Objects of this class are stored in the `wx.LayoutConstraints` class as
10692 one of eight possible constraints that a window can be involved in.
10693 You will never need to create an instance of
10694 wx.IndividualLayoutConstraint, rather you should create a
10695 `wx.LayoutConstraints` instance and use the individual contstraints
10696 that it contains.
10697 """
10698 def __init__(self): raise RuntimeError, "No constructor defined"
10699 def __repr__(self):
10700 return "<%s.%s; proxy of C++ wxIndividualLayoutConstraint instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
10701 def Set(*args, **kwargs):
10702 """
10703 Set(self, int rel, Window otherW, int otherE, int val=0, int marg=wxLAYOUT_DEFAULT_MARGIN)
10704
10705 Sets the properties of the constraint. Normally called by one of the
10706 convenience functions such as Above, RightOf, SameAs.
10707 """
10708 return _core_.IndividualLayoutConstraint_Set(*args, **kwargs)
10709
10710 def LeftOf(*args, **kwargs):
10711 """
10712 LeftOf(self, Window sibling, int marg=0)
10713
10714 Constrains this edge to be to the left of the given window, with an
10715 optional margin. Implicitly, this is relative to the left edge of the
10716 other window.
10717 """
10718 return _core_.IndividualLayoutConstraint_LeftOf(*args, **kwargs)
10719
10720 def RightOf(*args, **kwargs):
10721 """
10722 RightOf(self, Window sibling, int marg=0)
10723
10724 Constrains this edge to be to the right of the given window, with an
10725 optional margin. Implicitly, this is relative to the right edge of the
10726 other window.
10727 """
10728 return _core_.IndividualLayoutConstraint_RightOf(*args, **kwargs)
10729
10730 def Above(*args, **kwargs):
10731 """
10732 Above(self, Window sibling, int marg=0)
10733
10734 Constrains this edge to be above the given window, with an optional
10735 margin. Implicitly, this is relative to the top edge of the other
10736 window.
10737 """
10738 return _core_.IndividualLayoutConstraint_Above(*args, **kwargs)
10739
10740 def Below(*args, **kwargs):
10741 """
10742 Below(self, Window sibling, int marg=0)
10743
10744 Constrains this edge to be below the given window, with an optional
10745 margin. Implicitly, this is relative to the bottom edge of the other
10746 window.
10747 """
10748 return _core_.IndividualLayoutConstraint_Below(*args, **kwargs)
10749
10750 def SameAs(*args, **kwargs):
10751 """
10752 SameAs(self, Window otherW, int edge, int marg=0)
10753
10754 Constrains this edge or dimension to be to the same as the edge of the
10755 given window, with an optional margin.
10756 """
10757 return _core_.IndividualLayoutConstraint_SameAs(*args, **kwargs)
10758
10759 def PercentOf(*args, **kwargs):
10760 """
10761 PercentOf(self, Window otherW, int wh, int per)
10762
10763 Constrains this edge or dimension to be to a percentage of the given
10764 window, with an optional margin.
10765 """
10766 return _core_.IndividualLayoutConstraint_PercentOf(*args, **kwargs)
10767
10768 def Absolute(*args, **kwargs):
10769 """
10770 Absolute(self, int val)
10771
10772 Constrains this edge or dimension to be the given absolute value.
10773 """
10774 return _core_.IndividualLayoutConstraint_Absolute(*args, **kwargs)
10775
10776 def Unconstrained(*args, **kwargs):
10777 """
10778 Unconstrained(self)
10779
10780 Sets this edge or dimension to be unconstrained, that is, dependent on
10781 other edges and dimensions from which this value can be deduced.
10782 """
10783 return _core_.IndividualLayoutConstraint_Unconstrained(*args, **kwargs)
10784
10785 def AsIs(*args, **kwargs):
10786 """
10787 AsIs(self)
10788
10789 Sets this edge or constraint to be whatever the window's value is at
10790 the moment. If either of the width and height constraints are *as is*,
10791 the window will not be resized, but moved instead. This is important
10792 when considering panel items which are intended to have a default
10793 size, such as a button, which may take its size from the size of the
10794 button label.
10795 """
10796 return _core_.IndividualLayoutConstraint_AsIs(*args, **kwargs)
10797
10798 def GetOtherWindow(*args, **kwargs):
10799 """GetOtherWindow(self) -> Window"""
10800 return _core_.IndividualLayoutConstraint_GetOtherWindow(*args, **kwargs)
10801
10802 def GetMyEdge(*args, **kwargs):
10803 """GetMyEdge(self) -> int"""
10804 return _core_.IndividualLayoutConstraint_GetMyEdge(*args, **kwargs)
10805
10806 def SetEdge(*args, **kwargs):
10807 """SetEdge(self, int which)"""
10808 return _core_.IndividualLayoutConstraint_SetEdge(*args, **kwargs)
10809
10810 def SetValue(*args, **kwargs):
10811 """SetValue(self, int v)"""
10812 return _core_.IndividualLayoutConstraint_SetValue(*args, **kwargs)
10813
10814 def GetMargin(*args, **kwargs):
10815 """GetMargin(self) -> int"""
10816 return _core_.IndividualLayoutConstraint_GetMargin(*args, **kwargs)
10817
10818 def SetMargin(*args, **kwargs):
10819 """SetMargin(self, int m)"""
10820 return _core_.IndividualLayoutConstraint_SetMargin(*args, **kwargs)
10821
10822 def GetValue(*args, **kwargs):
10823 """GetValue(self) -> int"""
10824 return _core_.IndividualLayoutConstraint_GetValue(*args, **kwargs)
10825
10826 def GetPercent(*args, **kwargs):
10827 """GetPercent(self) -> int"""
10828 return _core_.IndividualLayoutConstraint_GetPercent(*args, **kwargs)
10829
10830 def GetOtherEdge(*args, **kwargs):
10831 """GetOtherEdge(self) -> int"""
10832 return _core_.IndividualLayoutConstraint_GetOtherEdge(*args, **kwargs)
10833
10834 def GetDone(*args, **kwargs):
10835 """GetDone(self) -> bool"""
10836 return _core_.IndividualLayoutConstraint_GetDone(*args, **kwargs)
10837
10838 def SetDone(*args, **kwargs):
10839 """SetDone(self, bool d)"""
10840 return _core_.IndividualLayoutConstraint_SetDone(*args, **kwargs)
10841
10842 def GetRelationship(*args, **kwargs):
10843 """GetRelationship(self) -> int"""
10844 return _core_.IndividualLayoutConstraint_GetRelationship(*args, **kwargs)
10845
10846 def SetRelationship(*args, **kwargs):
10847 """SetRelationship(self, int r)"""
10848 return _core_.IndividualLayoutConstraint_SetRelationship(*args, **kwargs)
10849
10850 def ResetIfWin(*args, **kwargs):
10851 """
10852 ResetIfWin(self, Window otherW) -> bool
10853
10854 Reset constraint if it mentions otherWin
10855 """
10856 return _core_.IndividualLayoutConstraint_ResetIfWin(*args, **kwargs)
10857
10858 def SatisfyConstraint(*args, **kwargs):
10859 """
10860 SatisfyConstraint(self, LayoutConstraints constraints, Window win) -> bool
10861
10862 Try to satisfy constraint
10863 """
10864 return _core_.IndividualLayoutConstraint_SatisfyConstraint(*args, **kwargs)
10865
10866 def GetEdge(*args, **kwargs):
10867 """
10868 GetEdge(self, int which, Window thisWin, Window other) -> int
10869
10870 Get the value of this edge or dimension, or if this
10871 is not determinable, -1.
10872 """
10873 return _core_.IndividualLayoutConstraint_GetEdge(*args, **kwargs)
10874
10875
10876class IndividualLayoutConstraintPtr(IndividualLayoutConstraint):
10877 def __init__(self, this):
10878 self.this = this
10879 if not hasattr(self,"thisown"): self.thisown = 0
10880 self.__class__ = IndividualLayoutConstraint
10881_core_.IndividualLayoutConstraint_swigregister(IndividualLayoutConstraintPtr)
10882
10883class LayoutConstraints(Object):
10884 """
10885 **Note:** constraints are now deprecated and you should use sizers
10886 instead.
10887
10888 Objects of this class can be associated with a window to define its
10889 layout constraints, with respect to siblings or its parent.
10890
10891 The class consists of the following eight constraints of class
10892 wx.IndividualLayoutConstraint, some or all of which should be accessed
10893 directly to set the appropriate constraints.
10894
10895 * left: represents the left hand edge of the window
10896 * right: represents the right hand edge of the window
10897 * top: represents the top edge of the window
10898 * bottom: represents the bottom edge of the window
10899 * width: represents the width of the window
10900 * height: represents the height of the window
10901 * centreX: represents the horizontal centre point of the window
10902 * centreY: represents the vertical centre point of the window
10903
10904 Most constraints are initially set to have the relationship
10905 wxUnconstrained, which means that their values should be calculated by
10906 looking at known constraints. The exceptions are width and height,
10907 which are set to wxAsIs to ensure that if the user does not specify a
10908 constraint, the existing width and height will be used, to be
10909 compatible with panel items which often have take a default size. If
10910 the constraint is ``wx.AsIs``, the dimension will not be changed.
10911
10912 :see: `wx.IndividualLayoutConstraint`, `wx.Window.SetConstraints`
10913
10914 """
10915 def __repr__(self):
10916 return "<%s.%s; proxy of C++ wxLayoutConstraints instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
10917 left = property(_core_.LayoutConstraints_left_get)
10918 top = property(_core_.LayoutConstraints_top_get)
10919 right = property(_core_.LayoutConstraints_right_get)
10920 bottom = property(_core_.LayoutConstraints_bottom_get)
10921 width = property(_core_.LayoutConstraints_width_get)
10922 height = property(_core_.LayoutConstraints_height_get)
10923 centreX = property(_core_.LayoutConstraints_centreX_get)
10924 centreY = property(_core_.LayoutConstraints_centreY_get)
10925 def __init__(self, *args, **kwargs):
10926 """__init__(self) -> LayoutConstraints"""
10927 newobj = _core_.new_LayoutConstraints(*args, **kwargs)
10928 self.this = newobj.this
10929 self.thisown = 1
10930 del newobj.thisown
10931 def SatisfyConstraints(*args, **kwargs):
10932 """SatisfyConstraints(Window win) -> (areSatisfied, noChanges)"""
10933 return _core_.LayoutConstraints_SatisfyConstraints(*args, **kwargs)
10934
10935 def AreSatisfied(*args, **kwargs):
10936 """AreSatisfied(self) -> bool"""
10937 return _core_.LayoutConstraints_AreSatisfied(*args, **kwargs)
10938
10939
10940class LayoutConstraintsPtr(LayoutConstraints):
10941 def __init__(self, this):
10942 self.this = this
10943 if not hasattr(self,"thisown"): self.thisown = 0
10944 self.__class__ = LayoutConstraints
10945_core_.LayoutConstraints_swigregister(LayoutConstraintsPtr)
10946
10947#----------------------------------------------------------------------------
10948
10949# Use Python's bool constants if available, make some if not
10950try:
10951 True
10952except NameError:
10953 __builtins__.True = 1==1
10954 __builtins__.False = 1==0
10955 def bool(value): return not not value
10956 __builtins__.bool = bool
10957
10958
10959
10960# workarounds for bad wxRTTI names
10961__wxPyPtrTypeMap['wxGauge95'] = 'wxGauge'
10962__wxPyPtrTypeMap['wxSlider95'] = 'wxSlider'
10963__wxPyPtrTypeMap['wxStatusBar95'] = 'wxStatusBar'
10964
10965
10966#----------------------------------------------------------------------------
10967# Load version numbers from __version__... Ensure that major and minor
10968# versions are the same for both wxPython and wxWidgets.
10969
10970from __version__ import *
10971__version__ = VERSION_STRING
10972
10973assert MAJOR_VERSION == _core_.MAJOR_VERSION, "wxPython/wxWidgets version mismatch"
10974assert MINOR_VERSION == _core_.MINOR_VERSION, "wxPython/wxWidgets version mismatch"
10975if RELEASE_VERSION != _core_.RELEASE_VERSION:
10976 import warnings
10977 warnings.warn("wxPython/wxWidgets release number mismatch")
10978
10979#----------------------------------------------------------------------------
10980
10981# Set the default string<-->unicode conversion encoding from the
10982# locale. This encoding is used when string or unicode objects need
10983# to be converted in order to pass them to wxWidgets. Please be aware
10984# that the default encoding within the same locale may be slightly
10985# different on different platforms. For example, please see
10986# http://www.alanwood.net/demos/charsetdiffs.html for differences
10987# between the common latin/roman encodings.
10988import locale
10989default = locale.getdefaultlocale()[1]
10990if default:
10991 wx.SetDefaultPyEncoding(default)
10992del default
10993del locale
10994
10995#----------------------------------------------------------------------------
10996
10997class PyDeadObjectError(AttributeError):
10998 pass
10999
11000class _wxPyDeadObject(object):
11001 """
11002 Instances of wx objects that are OOR capable will have their __class__
11003 changed to this class when the C++ object is deleted. This should help
11004 prevent crashes due to referencing a bogus C++ pointer.
11005 """
11006 reprStr = "wxPython wrapper for DELETED %s object! (The C++ object no longer exists.)"
11007 attrStr = "The C++ part of the %s object has been deleted, attribute access no longer allowed."
11008
11009 def __repr__(self):
11010 if not hasattr(self, "_name"):
11011 self._name = "[unknown]"
11012 return self.reprStr % self._name
11013
11014 def __getattr__(self, *args):
11015 if not hasattr(self, "_name"):
11016 self._name = "[unknown]"
11017 raise PyDeadObjectError(self.attrStr % self._name)
11018
11019 def __nonzero__(self):
11020 return 0
11021
11022
11023
11024class PyUnbornObjectError(AttributeError):
11025 pass
11026
11027class _wxPyUnbornObject(object):
11028 """
11029 Some stock objects are created when the wx._core module is
11030 imported, but their C++ instance is not created until the wx.App
11031 object is created and initialized. These object instances will
11032 temporarily have their __class__ changed to this class so an
11033 exception will be raised if they are used before the C++ instance
11034 is ready.
11035 """
11036
11037 reprStr = "wxPython wrapper for UNBORN object! (The C++ object is not initialized yet.)"
11038 attrStr = "The C++ part of this object has not been initialized, attribute access not allowed."
11039
11040 def __repr__(self):
11041 #if not hasattr(self, "_name"):
11042 # self._name = "[unknown]"
11043 return self.reprStr #% self._name
11044
11045 def __getattr__(self, *args):
11046 #if not hasattr(self, "_name"):
11047 # self._name = "[unknown]"
11048 raise PyUnbornObjectError(self.attrStr) # % self._name )
11049
11050 def __nonzero__(self):
11051 return 0
11052
11053
11054#----------------------------------------------------------------------------
11055
11056def CallAfter(callable, *args, **kw):
11057 """
11058 Call the specified function after the current and pending event
11059 handlers have been completed. This is also good for making GUI
11060 method calls from non-GUI threads. Any extra positional or
11061 keyword args are passed on to the callable when it is called.
11062
11063 :see: `wx.FutureCall`
11064 """
11065 app = wx.GetApp()
11066 assert app is not None, 'No wx.App created yet'
11067
11068 if not hasattr(app, "_CallAfterId"):
11069 app._CallAfterId = wx.NewEventType()
11070 app.Connect(-1, -1, app._CallAfterId,
11071 lambda event: event.callable(*event.args, **event.kw) )
11072 evt = wx.PyEvent()
11073 evt.SetEventType(app._CallAfterId)
11074 evt.callable = callable
11075 evt.args = args
11076 evt.kw = kw
11077 wx.PostEvent(app, evt)
11078
11079#----------------------------------------------------------------------------
11080
11081
11082class FutureCall:
11083 """
11084 A convenience class for `wx.Timer`, that calls the given callable
11085 object once after the given amount of milliseconds, passing any
11086 positional or keyword args. The return value of the callable is
11087 availbale after it has been run with the `GetResult` method.
11088
11089 If you don't need to get the return value or restart the timer
11090 then there is no need to hold a reference to this object. It will
11091 hold a reference to itself while the timer is running (the timer
11092 has a reference to self.Notify) but the cycle will be broken when
11093 the timer completes, automatically cleaning up the wx.FutureCall
11094 object.
11095
11096 :see: `wx.CallAfter`
11097 """
11098 def __init__(self, millis, callable, *args, **kwargs):
11099 self.millis = millis
11100 self.callable = callable
11101 self.SetArgs(*args, **kwargs)
11102 self.runCount = 0
11103 self.running = False
11104 self.hasRun = False
11105 self.result = None
11106 self.timer = None
11107 self.Start()
11108
11109 def __del__(self):
11110 self.Stop()
11111
11112
11113 def Start(self, millis=None, *args, **kwargs):
11114 """
11115 (Re)start the timer
11116 """
11117 self.hasRun = False
11118 if millis is not None:
11119 self.millis = millis
11120 if args or kwargs:
11121 self.SetArgs(*args, **kwargs)
11122 self.Stop()
11123 self.timer = wx.PyTimer(self.Notify)
11124 self.timer.Start(self.millis, wx.TIMER_ONE_SHOT)
11125 self.running = True
11126 Restart = Start
11127
11128
11129 def Stop(self):
11130 """
11131 Stop and destroy the timer.
11132 """
11133 if self.timer is not None:
11134 self.timer.Stop()
11135 self.timer = None
11136
11137
11138 def GetInterval(self):
11139 if self.timer is not None:
11140 return self.timer.GetInterval()
11141 else:
11142 return 0
11143
11144
11145 def IsRunning(self):
11146 return self.timer is not None and self.timer.IsRunning()
11147
11148
11149 def SetArgs(self, *args, **kwargs):
11150 """
11151 (Re)set the args passed to the callable object. This is
11152 useful in conjunction with Restart if you want to schedule a
11153 new call to the same callable object but with different
11154 parameters.
11155 """
11156 self.args = args
11157 self.kwargs = kwargs
11158
11159
11160 def HasRun(self):
11161 return self.hasRun
11162
11163 def GetResult(self):
11164 return self.result
11165
11166 def Notify(self):
11167 """
11168 The timer has expired so call the callable.
11169 """
11170 if self.callable and getattr(self.callable, 'im_self', True):
11171 self.runCount += 1
11172 self.running = False
11173 self.result = self.callable(*self.args, **self.kwargs)
11174 self.hasRun = True
11175 if not self.running:
11176 # if it wasn't restarted, then cleanup
11177 wx.CallAfter(self.Stop)
11178
11179
11180
11181#----------------------------------------------------------------------------
11182# Control which items in this module should be documented by epydoc.
11183# We allow only classes and functions, which will help reduce the size
11184# of the docs by filtering out the zillions of constants, EVT objects,
11185# and etc that don't make much sense by themselves, but are instead
11186# documented (or will be) as part of the classes/functions/methods
11187# where they should be used.
11188
11189class __DocFilter:
11190 """
11191 A filter for epydoc that only allows non-Ptr classes and
11192 fucntions, in order to reduce the clutter in the API docs.
11193 """
11194 def __init__(self, globals):
11195 self._globals = globals
11196
11197 def __call__(self, name):
11198 import types
11199 obj = self._globals.get(name, None)
11200 if type(obj) not in [type, types.ClassType, types.FunctionType, types.BuiltinFunctionType]:
11201 return False
11202 if name.startswith('_') or name.endswith('Ptr') or name.startswith('EVT'):
11203 return False
11204 return True
11205
11206#----------------------------------------------------------------------------
11207#----------------------------------------------------------------------------
11208
11209# Import other modules in this package that should show up in the
11210# "core" wx namespace
11211from _gdi import *
11212from _windows import *
11213from _controls import *
11214from _misc import *
11215
11216
11217# Fixup the stock objects since they can't be used yet. (They will be
11218# restored in wx.PyApp.OnInit.)
11219_core_._wxPyFixStockObjects()
11220
11221#----------------------------------------------------------------------------
11222#----------------------------------------------------------------------------
11223
11224