]> git.saurik.com Git - wxWidgets.git/blame - wxPython/src/msw/_core.py
docstring fixes
[wxWidgets.git] / wxPython / src / msw / _core.py
CommitLineData
d55e5bfc
RD
1# This file was created automatically by SWIG.
2# Don't modify this file, modify the SWIG interface instead.
3
4import _core_
5
093d3ff1
RD
6def _swig_setattr_nondynamic(self,class_type,name,value,static=1):
7 if (name == "this"):
8 if isinstance(value, class_type):
9 self.__dict__[name] = value.this
10 if hasattr(value,"thisown"): self.__dict__["thisown"] = value.thisown
11 del value.thisown
12 return
13 method = class_type.__swig_setmethods__.get(name,None)
14 if method: return method(self,value)
15 if (not static) or hasattr(self,name) or (name == "thisown"):
16 self.__dict__[name] = value
17 else:
18 raise AttributeError("You cannot add attributes to %s" % self)
19
20def _swig_setattr(self,class_type,name,value):
21 return _swig_setattr_nondynamic(self,class_type,name,value,0)
22
23def _swig_getattr(self,class_type,name):
24 method = class_type.__swig_getmethods__.get(name,None)
25 if method: return method(self)
26 raise AttributeError,name
27
28import types
29try:
30 _object = types.ObjectType
31 _newclass = 1
32except AttributeError:
33 class _object : pass
34 _newclass = 0
35del types
36
37
38def _swig_setattr_nondynamic_method(set):
39 def set_attr(self,name,value):
40 if hasattr(self,name) or (name in ("this", "thisown")):
41 set(self,name,value)
42 else:
43 raise AttributeError("You cannot add attributes to %s" % self)
44 return set_attr
45
46
d55e5bfc
RD
47#// Give a reference to the dictionary of this module to the C++ extension
48#// code.
49_core_._wxPySetDictionary(vars())
50
51#// A little trick to make 'wx' be a reference to this module so wx.Names can
52#// be used here.
53import sys as _sys
54wx = _sys.modules[__name__]
55
c24da6d6
RD
56
57#----------------------------------------------------------------------------
58
59def _deprecated(callable, msg=None):
60 """
61 Create a wrapper function that will raise a DeprecationWarning
62 before calling the callable.
63 """
64 if msg is None:
65 msg = "%s is deprecated" % callable
66 def deprecatedWrapper(*args, **kwargs):
67 import warnings
68 warnings.warn(msg, DeprecationWarning, stacklevel=2)
69 return callable(*args, **kwargs)
70 deprecatedWrapper.__doc__ = msg
71 return deprecatedWrapper
72
73
74#----------------------------------------------------------------------------
75
d55e5bfc
RD
76NOT_FOUND = _core_.NOT_FOUND
77VSCROLL = _core_.VSCROLL
78HSCROLL = _core_.HSCROLL
79CAPTION = _core_.CAPTION
80DOUBLE_BORDER = _core_.DOUBLE_BORDER
81SUNKEN_BORDER = _core_.SUNKEN_BORDER
82RAISED_BORDER = _core_.RAISED_BORDER
83BORDER = _core_.BORDER
84SIMPLE_BORDER = _core_.SIMPLE_BORDER
85STATIC_BORDER = _core_.STATIC_BORDER
86TRANSPARENT_WINDOW = _core_.TRANSPARENT_WINDOW
87NO_BORDER = _core_.NO_BORDER
88TAB_TRAVERSAL = _core_.TAB_TRAVERSAL
89WANTS_CHARS = _core_.WANTS_CHARS
90POPUP_WINDOW = _core_.POPUP_WINDOW
91CENTER_FRAME = _core_.CENTER_FRAME
92CENTRE_ON_SCREEN = _core_.CENTRE_ON_SCREEN
93CENTER_ON_SCREEN = _core_.CENTER_ON_SCREEN
94ED_CLIENT_MARGIN = _core_.ED_CLIENT_MARGIN
95ED_BUTTONS_BOTTOM = _core_.ED_BUTTONS_BOTTOM
96ED_BUTTONS_RIGHT = _core_.ED_BUTTONS_RIGHT
97ED_STATIC_LINE = _core_.ED_STATIC_LINE
98EXT_DIALOG_STYLE = _core_.EXT_DIALOG_STYLE
99CLIP_CHILDREN = _core_.CLIP_CHILDREN
100CLIP_SIBLINGS = _core_.CLIP_SIBLINGS
101ALWAYS_SHOW_SB = _core_.ALWAYS_SHOW_SB
102RETAINED = _core_.RETAINED
103BACKINGSTORE = _core_.BACKINGSTORE
104COLOURED = _core_.COLOURED
105FIXED_LENGTH = _core_.FIXED_LENGTH
106LB_NEEDED_SB = _core_.LB_NEEDED_SB
107LB_ALWAYS_SB = _core_.LB_ALWAYS_SB
108LB_SORT = _core_.LB_SORT
109LB_SINGLE = _core_.LB_SINGLE
110LB_MULTIPLE = _core_.LB_MULTIPLE
111LB_EXTENDED = _core_.LB_EXTENDED
112LB_OWNERDRAW = _core_.LB_OWNERDRAW
113LB_HSCROLL = _core_.LB_HSCROLL
114PROCESS_ENTER = _core_.PROCESS_ENTER
115PASSWORD = _core_.PASSWORD
116CB_SIMPLE = _core_.CB_SIMPLE
117CB_DROPDOWN = _core_.CB_DROPDOWN
118CB_SORT = _core_.CB_SORT
119CB_READONLY = _core_.CB_READONLY
120RA_HORIZONTAL = _core_.RA_HORIZONTAL
121RA_VERTICAL = _core_.RA_VERTICAL
122RA_SPECIFY_ROWS = _core_.RA_SPECIFY_ROWS
123RA_SPECIFY_COLS = _core_.RA_SPECIFY_COLS
fef4c27a 124RA_USE_CHECKBOX = _core_.RA_USE_CHECKBOX
d55e5bfc
RD
125RB_GROUP = _core_.RB_GROUP
126RB_SINGLE = _core_.RB_SINGLE
d55e5bfc
RD
127SB_HORIZONTAL = _core_.SB_HORIZONTAL
128SB_VERTICAL = _core_.SB_VERTICAL
fef4c27a 129RB_USE_CHECKBOX = _core_.RB_USE_CHECKBOX
d55e5bfc
RD
130ST_SIZEGRIP = _core_.ST_SIZEGRIP
131ST_NO_AUTORESIZE = _core_.ST_NO_AUTORESIZE
132FLOOD_SURFACE = _core_.FLOOD_SURFACE
133FLOOD_BORDER = _core_.FLOOD_BORDER
134ODDEVEN_RULE = _core_.ODDEVEN_RULE
135WINDING_RULE = _core_.WINDING_RULE
136TOOL_TOP = _core_.TOOL_TOP
137TOOL_BOTTOM = _core_.TOOL_BOTTOM
138TOOL_LEFT = _core_.TOOL_LEFT
139TOOL_RIGHT = _core_.TOOL_RIGHT
140OK = _core_.OK
141YES_NO = _core_.YES_NO
142CANCEL = _core_.CANCEL
143YES = _core_.YES
144NO = _core_.NO
145NO_DEFAULT = _core_.NO_DEFAULT
146YES_DEFAULT = _core_.YES_DEFAULT
147ICON_EXCLAMATION = _core_.ICON_EXCLAMATION
148ICON_HAND = _core_.ICON_HAND
149ICON_QUESTION = _core_.ICON_QUESTION
150ICON_INFORMATION = _core_.ICON_INFORMATION
151ICON_STOP = _core_.ICON_STOP
152ICON_ASTERISK = _core_.ICON_ASTERISK
153ICON_MASK = _core_.ICON_MASK
154ICON_WARNING = _core_.ICON_WARNING
155ICON_ERROR = _core_.ICON_ERROR
156FORWARD = _core_.FORWARD
157BACKWARD = _core_.BACKWARD
158RESET = _core_.RESET
159HELP = _core_.HELP
160MORE = _core_.MORE
161SETUP = _core_.SETUP
162SIZE_AUTO_WIDTH = _core_.SIZE_AUTO_WIDTH
163SIZE_AUTO_HEIGHT = _core_.SIZE_AUTO_HEIGHT
164SIZE_AUTO = _core_.SIZE_AUTO
165SIZE_USE_EXISTING = _core_.SIZE_USE_EXISTING
166SIZE_ALLOW_MINUS_ONE = _core_.SIZE_ALLOW_MINUS_ONE
167PORTRAIT = _core_.PORTRAIT
168LANDSCAPE = _core_.LANDSCAPE
169PRINT_QUALITY_HIGH = _core_.PRINT_QUALITY_HIGH
170PRINT_QUALITY_MEDIUM = _core_.PRINT_QUALITY_MEDIUM
171PRINT_QUALITY_LOW = _core_.PRINT_QUALITY_LOW
172PRINT_QUALITY_DRAFT = _core_.PRINT_QUALITY_DRAFT
173ID_ANY = _core_.ID_ANY
174ID_SEPARATOR = _core_.ID_SEPARATOR
175ID_LOWEST = _core_.ID_LOWEST
176ID_OPEN = _core_.ID_OPEN
177ID_CLOSE = _core_.ID_CLOSE
178ID_NEW = _core_.ID_NEW
179ID_SAVE = _core_.ID_SAVE
180ID_SAVEAS = _core_.ID_SAVEAS
181ID_REVERT = _core_.ID_REVERT
182ID_EXIT = _core_.ID_EXIT
183ID_UNDO = _core_.ID_UNDO
184ID_REDO = _core_.ID_REDO
185ID_HELP = _core_.ID_HELP
186ID_PRINT = _core_.ID_PRINT
187ID_PRINT_SETUP = _core_.ID_PRINT_SETUP
188ID_PREVIEW = _core_.ID_PREVIEW
189ID_ABOUT = _core_.ID_ABOUT
190ID_HELP_CONTENTS = _core_.ID_HELP_CONTENTS
191ID_HELP_COMMANDS = _core_.ID_HELP_COMMANDS
192ID_HELP_PROCEDURES = _core_.ID_HELP_PROCEDURES
193ID_HELP_CONTEXT = _core_.ID_HELP_CONTEXT
194ID_CLOSE_ALL = _core_.ID_CLOSE_ALL
195ID_PREFERENCES = _core_.ID_PREFERENCES
196ID_CUT = _core_.ID_CUT
197ID_COPY = _core_.ID_COPY
198ID_PASTE = _core_.ID_PASTE
199ID_CLEAR = _core_.ID_CLEAR
200ID_FIND = _core_.ID_FIND
201ID_DUPLICATE = _core_.ID_DUPLICATE
202ID_SELECTALL = _core_.ID_SELECTALL
203ID_DELETE = _core_.ID_DELETE
204ID_REPLACE = _core_.ID_REPLACE
205ID_REPLACE_ALL = _core_.ID_REPLACE_ALL
206ID_PROPERTIES = _core_.ID_PROPERTIES
207ID_VIEW_DETAILS = _core_.ID_VIEW_DETAILS
208ID_VIEW_LARGEICONS = _core_.ID_VIEW_LARGEICONS
209ID_VIEW_SMALLICONS = _core_.ID_VIEW_SMALLICONS
210ID_VIEW_LIST = _core_.ID_VIEW_LIST
211ID_VIEW_SORTDATE = _core_.ID_VIEW_SORTDATE
212ID_VIEW_SORTNAME = _core_.ID_VIEW_SORTNAME
213ID_VIEW_SORTSIZE = _core_.ID_VIEW_SORTSIZE
214ID_VIEW_SORTTYPE = _core_.ID_VIEW_SORTTYPE
215ID_FILE1 = _core_.ID_FILE1
216ID_FILE2 = _core_.ID_FILE2
217ID_FILE3 = _core_.ID_FILE3
218ID_FILE4 = _core_.ID_FILE4
219ID_FILE5 = _core_.ID_FILE5
220ID_FILE6 = _core_.ID_FILE6
221ID_FILE7 = _core_.ID_FILE7
222ID_FILE8 = _core_.ID_FILE8
223ID_FILE9 = _core_.ID_FILE9
224ID_OK = _core_.ID_OK
225ID_CANCEL = _core_.ID_CANCEL
226ID_APPLY = _core_.ID_APPLY
227ID_YES = _core_.ID_YES
228ID_NO = _core_.ID_NO
229ID_STATIC = _core_.ID_STATIC
230ID_FORWARD = _core_.ID_FORWARD
231ID_BACKWARD = _core_.ID_BACKWARD
232ID_DEFAULT = _core_.ID_DEFAULT
233ID_MORE = _core_.ID_MORE
234ID_SETUP = _core_.ID_SETUP
235ID_RESET = _core_.ID_RESET
236ID_CONTEXT_HELP = _core_.ID_CONTEXT_HELP
237ID_YESTOALL = _core_.ID_YESTOALL
238ID_NOTOALL = _core_.ID_NOTOALL
239ID_ABORT = _core_.ID_ABORT
240ID_RETRY = _core_.ID_RETRY
241ID_IGNORE = _core_.ID_IGNORE
0f63ec68
RD
242ID_ADD = _core_.ID_ADD
243ID_REMOVE = _core_.ID_REMOVE
244ID_UP = _core_.ID_UP
245ID_DOWN = _core_.ID_DOWN
246ID_HOME = _core_.ID_HOME
247ID_REFRESH = _core_.ID_REFRESH
248ID_STOP = _core_.ID_STOP
249ID_INDEX = _core_.ID_INDEX
250ID_BOLD = _core_.ID_BOLD
251ID_ITALIC = _core_.ID_ITALIC
252ID_JUSTIFY_CENTER = _core_.ID_JUSTIFY_CENTER
253ID_JUSTIFY_FILL = _core_.ID_JUSTIFY_FILL
254ID_JUSTIFY_RIGHT = _core_.ID_JUSTIFY_RIGHT
255ID_JUSTIFY_LEFT = _core_.ID_JUSTIFY_LEFT
256ID_UNDERLINE = _core_.ID_UNDERLINE
257ID_INDENT = _core_.ID_INDENT
258ID_UNINDENT = _core_.ID_UNINDENT
259ID_ZOOM_100 = _core_.ID_ZOOM_100
260ID_ZOOM_FIT = _core_.ID_ZOOM_FIT
261ID_ZOOM_IN = _core_.ID_ZOOM_IN
262ID_ZOOM_OUT = _core_.ID_ZOOM_OUT
263ID_UNDELETE = _core_.ID_UNDELETE
264ID_REVERT_TO_SAVED = _core_.ID_REVERT_TO_SAVED
d55e5bfc
RD
265ID_HIGHEST = _core_.ID_HIGHEST
266OPEN = _core_.OPEN
267SAVE = _core_.SAVE
268HIDE_READONLY = _core_.HIDE_READONLY
269OVERWRITE_PROMPT = _core_.OVERWRITE_PROMPT
270FILE_MUST_EXIST = _core_.FILE_MUST_EXIST
271MULTIPLE = _core_.MULTIPLE
272CHANGE_DIR = _core_.CHANGE_DIR
273ACCEL_ALT = _core_.ACCEL_ALT
274ACCEL_CTRL = _core_.ACCEL_CTRL
275ACCEL_SHIFT = _core_.ACCEL_SHIFT
276ACCEL_NORMAL = _core_.ACCEL_NORMAL
277PD_AUTO_HIDE = _core_.PD_AUTO_HIDE
278PD_APP_MODAL = _core_.PD_APP_MODAL
279PD_CAN_ABORT = _core_.PD_CAN_ABORT
280PD_ELAPSED_TIME = _core_.PD_ELAPSED_TIME
281PD_ESTIMATED_TIME = _core_.PD_ESTIMATED_TIME
282PD_REMAINING_TIME = _core_.PD_REMAINING_TIME
62d32a5f
RD
283PD_SMOOTH = _core_.PD_SMOOTH
284PD_CAN_SKIP = _core_.PD_CAN_SKIP
d55e5bfc
RD
285DD_NEW_DIR_BUTTON = _core_.DD_NEW_DIR_BUTTON
286DD_DEFAULT_STYLE = _core_.DD_DEFAULT_STYLE
287MENU_TEAROFF = _core_.MENU_TEAROFF
288MB_DOCKABLE = _core_.MB_DOCKABLE
289NO_FULL_REPAINT_ON_RESIZE = _core_.NO_FULL_REPAINT_ON_RESIZE
290FULL_REPAINT_ON_RESIZE = _core_.FULL_REPAINT_ON_RESIZE
291LI_HORIZONTAL = _core_.LI_HORIZONTAL
292LI_VERTICAL = _core_.LI_VERTICAL
293WS_EX_VALIDATE_RECURSIVELY = _core_.WS_EX_VALIDATE_RECURSIVELY
294WS_EX_BLOCK_EVENTS = _core_.WS_EX_BLOCK_EVENTS
295WS_EX_TRANSIENT = _core_.WS_EX_TRANSIENT
296WS_EX_THEMED_BACKGROUND = _core_.WS_EX_THEMED_BACKGROUND
297WS_EX_PROCESS_IDLE = _core_.WS_EX_PROCESS_IDLE
298WS_EX_PROCESS_UI_UPDATES = _core_.WS_EX_PROCESS_UI_UPDATES
299MM_TEXT = _core_.MM_TEXT
300MM_LOMETRIC = _core_.MM_LOMETRIC
301MM_HIMETRIC = _core_.MM_HIMETRIC
302MM_LOENGLISH = _core_.MM_LOENGLISH
303MM_HIENGLISH = _core_.MM_HIENGLISH
304MM_TWIPS = _core_.MM_TWIPS
305MM_ISOTROPIC = _core_.MM_ISOTROPIC
306MM_ANISOTROPIC = _core_.MM_ANISOTROPIC
307MM_POINTS = _core_.MM_POINTS
308MM_METRIC = _core_.MM_METRIC
309CENTRE = _core_.CENTRE
310CENTER = _core_.CENTER
311HORIZONTAL = _core_.HORIZONTAL
312VERTICAL = _core_.VERTICAL
313BOTH = _core_.BOTH
314LEFT = _core_.LEFT
315RIGHT = _core_.RIGHT
316UP = _core_.UP
317DOWN = _core_.DOWN
318TOP = _core_.TOP
319BOTTOM = _core_.BOTTOM
320NORTH = _core_.NORTH
321SOUTH = _core_.SOUTH
322WEST = _core_.WEST
323EAST = _core_.EAST
324ALL = _core_.ALL
325ALIGN_NOT = _core_.ALIGN_NOT
326ALIGN_CENTER_HORIZONTAL = _core_.ALIGN_CENTER_HORIZONTAL
327ALIGN_CENTRE_HORIZONTAL = _core_.ALIGN_CENTRE_HORIZONTAL
328ALIGN_LEFT = _core_.ALIGN_LEFT
329ALIGN_TOP = _core_.ALIGN_TOP
330ALIGN_RIGHT = _core_.ALIGN_RIGHT
331ALIGN_BOTTOM = _core_.ALIGN_BOTTOM
332ALIGN_CENTER_VERTICAL = _core_.ALIGN_CENTER_VERTICAL
333ALIGN_CENTRE_VERTICAL = _core_.ALIGN_CENTRE_VERTICAL
334ALIGN_CENTER = _core_.ALIGN_CENTER
335ALIGN_CENTRE = _core_.ALIGN_CENTRE
336ALIGN_MASK = _core_.ALIGN_MASK
337STRETCH_NOT = _core_.STRETCH_NOT
338SHRINK = _core_.SHRINK
339GROW = _core_.GROW
340EXPAND = _core_.EXPAND
341SHAPED = _core_.SHAPED
342FIXED_MINSIZE = _core_.FIXED_MINSIZE
343TILE = _core_.TILE
344ADJUST_MINSIZE = _core_.ADJUST_MINSIZE
345BORDER_DEFAULT = _core_.BORDER_DEFAULT
346BORDER_NONE = _core_.BORDER_NONE
347BORDER_STATIC = _core_.BORDER_STATIC
348BORDER_SIMPLE = _core_.BORDER_SIMPLE
349BORDER_RAISED = _core_.BORDER_RAISED
350BORDER_SUNKEN = _core_.BORDER_SUNKEN
351BORDER_DOUBLE = _core_.BORDER_DOUBLE
352BORDER_MASK = _core_.BORDER_MASK
0f63ec68
RD
353BG_STYLE_SYSTEM = _core_.BG_STYLE_SYSTEM
354BG_STYLE_COLOUR = _core_.BG_STYLE_COLOUR
355BG_STYLE_CUSTOM = _core_.BG_STYLE_CUSTOM
d55e5bfc
RD
356DEFAULT = _core_.DEFAULT
357DECORATIVE = _core_.DECORATIVE
358ROMAN = _core_.ROMAN
359SCRIPT = _core_.SCRIPT
360SWISS = _core_.SWISS
361MODERN = _core_.MODERN
362TELETYPE = _core_.TELETYPE
363VARIABLE = _core_.VARIABLE
364FIXED = _core_.FIXED
365NORMAL = _core_.NORMAL
366LIGHT = _core_.LIGHT
367BOLD = _core_.BOLD
368ITALIC = _core_.ITALIC
369SLANT = _core_.SLANT
370SOLID = _core_.SOLID
371DOT = _core_.DOT
372LONG_DASH = _core_.LONG_DASH
373SHORT_DASH = _core_.SHORT_DASH
374DOT_DASH = _core_.DOT_DASH
375USER_DASH = _core_.USER_DASH
376TRANSPARENT = _core_.TRANSPARENT
377STIPPLE = _core_.STIPPLE
378BDIAGONAL_HATCH = _core_.BDIAGONAL_HATCH
379CROSSDIAG_HATCH = _core_.CROSSDIAG_HATCH
380FDIAGONAL_HATCH = _core_.FDIAGONAL_HATCH
381CROSS_HATCH = _core_.CROSS_HATCH
382HORIZONTAL_HATCH = _core_.HORIZONTAL_HATCH
383VERTICAL_HATCH = _core_.VERTICAL_HATCH
384JOIN_BEVEL = _core_.JOIN_BEVEL
385JOIN_MITER = _core_.JOIN_MITER
386JOIN_ROUND = _core_.JOIN_ROUND
387CAP_ROUND = _core_.CAP_ROUND
388CAP_PROJECTING = _core_.CAP_PROJECTING
389CAP_BUTT = _core_.CAP_BUTT
390CLEAR = _core_.CLEAR
391XOR = _core_.XOR
392INVERT = _core_.INVERT
393OR_REVERSE = _core_.OR_REVERSE
394AND_REVERSE = _core_.AND_REVERSE
395COPY = _core_.COPY
396AND = _core_.AND
397AND_INVERT = _core_.AND_INVERT
398NO_OP = _core_.NO_OP
399NOR = _core_.NOR
400EQUIV = _core_.EQUIV
401SRC_INVERT = _core_.SRC_INVERT
402OR_INVERT = _core_.OR_INVERT
403NAND = _core_.NAND
404OR = _core_.OR
405SET = _core_.SET
406WXK_BACK = _core_.WXK_BACK
407WXK_TAB = _core_.WXK_TAB
408WXK_RETURN = _core_.WXK_RETURN
409WXK_ESCAPE = _core_.WXK_ESCAPE
410WXK_SPACE = _core_.WXK_SPACE
411WXK_DELETE = _core_.WXK_DELETE
412WXK_START = _core_.WXK_START
413WXK_LBUTTON = _core_.WXK_LBUTTON
414WXK_RBUTTON = _core_.WXK_RBUTTON
415WXK_CANCEL = _core_.WXK_CANCEL
416WXK_MBUTTON = _core_.WXK_MBUTTON
417WXK_CLEAR = _core_.WXK_CLEAR
418WXK_SHIFT = _core_.WXK_SHIFT
419WXK_ALT = _core_.WXK_ALT
420WXK_CONTROL = _core_.WXK_CONTROL
421WXK_MENU = _core_.WXK_MENU
422WXK_PAUSE = _core_.WXK_PAUSE
423WXK_CAPITAL = _core_.WXK_CAPITAL
424WXK_PRIOR = _core_.WXK_PRIOR
425WXK_NEXT = _core_.WXK_NEXT
426WXK_END = _core_.WXK_END
427WXK_HOME = _core_.WXK_HOME
428WXK_LEFT = _core_.WXK_LEFT
429WXK_UP = _core_.WXK_UP
430WXK_RIGHT = _core_.WXK_RIGHT
431WXK_DOWN = _core_.WXK_DOWN
432WXK_SELECT = _core_.WXK_SELECT
433WXK_PRINT = _core_.WXK_PRINT
434WXK_EXECUTE = _core_.WXK_EXECUTE
435WXK_SNAPSHOT = _core_.WXK_SNAPSHOT
436WXK_INSERT = _core_.WXK_INSERT
437WXK_HELP = _core_.WXK_HELP
438WXK_NUMPAD0 = _core_.WXK_NUMPAD0
439WXK_NUMPAD1 = _core_.WXK_NUMPAD1
440WXK_NUMPAD2 = _core_.WXK_NUMPAD2
441WXK_NUMPAD3 = _core_.WXK_NUMPAD3
442WXK_NUMPAD4 = _core_.WXK_NUMPAD4
443WXK_NUMPAD5 = _core_.WXK_NUMPAD5
444WXK_NUMPAD6 = _core_.WXK_NUMPAD6
445WXK_NUMPAD7 = _core_.WXK_NUMPAD7
446WXK_NUMPAD8 = _core_.WXK_NUMPAD8
447WXK_NUMPAD9 = _core_.WXK_NUMPAD9
448WXK_MULTIPLY = _core_.WXK_MULTIPLY
449WXK_ADD = _core_.WXK_ADD
450WXK_SEPARATOR = _core_.WXK_SEPARATOR
451WXK_SUBTRACT = _core_.WXK_SUBTRACT
452WXK_DECIMAL = _core_.WXK_DECIMAL
453WXK_DIVIDE = _core_.WXK_DIVIDE
454WXK_F1 = _core_.WXK_F1
455WXK_F2 = _core_.WXK_F2
456WXK_F3 = _core_.WXK_F3
457WXK_F4 = _core_.WXK_F4
458WXK_F5 = _core_.WXK_F5
459WXK_F6 = _core_.WXK_F6
460WXK_F7 = _core_.WXK_F7
461WXK_F8 = _core_.WXK_F8
462WXK_F9 = _core_.WXK_F9
463WXK_F10 = _core_.WXK_F10
464WXK_F11 = _core_.WXK_F11
465WXK_F12 = _core_.WXK_F12
466WXK_F13 = _core_.WXK_F13
467WXK_F14 = _core_.WXK_F14
468WXK_F15 = _core_.WXK_F15
469WXK_F16 = _core_.WXK_F16
470WXK_F17 = _core_.WXK_F17
471WXK_F18 = _core_.WXK_F18
472WXK_F19 = _core_.WXK_F19
473WXK_F20 = _core_.WXK_F20
474WXK_F21 = _core_.WXK_F21
475WXK_F22 = _core_.WXK_F22
476WXK_F23 = _core_.WXK_F23
477WXK_F24 = _core_.WXK_F24
478WXK_NUMLOCK = _core_.WXK_NUMLOCK
479WXK_SCROLL = _core_.WXK_SCROLL
480WXK_PAGEUP = _core_.WXK_PAGEUP
481WXK_PAGEDOWN = _core_.WXK_PAGEDOWN
482WXK_NUMPAD_SPACE = _core_.WXK_NUMPAD_SPACE
483WXK_NUMPAD_TAB = _core_.WXK_NUMPAD_TAB
484WXK_NUMPAD_ENTER = _core_.WXK_NUMPAD_ENTER
485WXK_NUMPAD_F1 = _core_.WXK_NUMPAD_F1
486WXK_NUMPAD_F2 = _core_.WXK_NUMPAD_F2
487WXK_NUMPAD_F3 = _core_.WXK_NUMPAD_F3
488WXK_NUMPAD_F4 = _core_.WXK_NUMPAD_F4
489WXK_NUMPAD_HOME = _core_.WXK_NUMPAD_HOME
490WXK_NUMPAD_LEFT = _core_.WXK_NUMPAD_LEFT
491WXK_NUMPAD_UP = _core_.WXK_NUMPAD_UP
492WXK_NUMPAD_RIGHT = _core_.WXK_NUMPAD_RIGHT
493WXK_NUMPAD_DOWN = _core_.WXK_NUMPAD_DOWN
494WXK_NUMPAD_PRIOR = _core_.WXK_NUMPAD_PRIOR
495WXK_NUMPAD_PAGEUP = _core_.WXK_NUMPAD_PAGEUP
496WXK_NUMPAD_NEXT = _core_.WXK_NUMPAD_NEXT
497WXK_NUMPAD_PAGEDOWN = _core_.WXK_NUMPAD_PAGEDOWN
498WXK_NUMPAD_END = _core_.WXK_NUMPAD_END
499WXK_NUMPAD_BEGIN = _core_.WXK_NUMPAD_BEGIN
500WXK_NUMPAD_INSERT = _core_.WXK_NUMPAD_INSERT
501WXK_NUMPAD_DELETE = _core_.WXK_NUMPAD_DELETE
502WXK_NUMPAD_EQUAL = _core_.WXK_NUMPAD_EQUAL
503WXK_NUMPAD_MULTIPLY = _core_.WXK_NUMPAD_MULTIPLY
504WXK_NUMPAD_ADD = _core_.WXK_NUMPAD_ADD
505WXK_NUMPAD_SEPARATOR = _core_.WXK_NUMPAD_SEPARATOR
506WXK_NUMPAD_SUBTRACT = _core_.WXK_NUMPAD_SUBTRACT
507WXK_NUMPAD_DECIMAL = _core_.WXK_NUMPAD_DECIMAL
508WXK_NUMPAD_DIVIDE = _core_.WXK_NUMPAD_DIVIDE
509WXK_WINDOWS_LEFT = _core_.WXK_WINDOWS_LEFT
510WXK_WINDOWS_RIGHT = _core_.WXK_WINDOWS_RIGHT
511WXK_WINDOWS_MENU = _core_.WXK_WINDOWS_MENU
512PAPER_NONE = _core_.PAPER_NONE
513PAPER_LETTER = _core_.PAPER_LETTER
514PAPER_LEGAL = _core_.PAPER_LEGAL
515PAPER_A4 = _core_.PAPER_A4
516PAPER_CSHEET = _core_.PAPER_CSHEET
517PAPER_DSHEET = _core_.PAPER_DSHEET
518PAPER_ESHEET = _core_.PAPER_ESHEET
519PAPER_LETTERSMALL = _core_.PAPER_LETTERSMALL
520PAPER_TABLOID = _core_.PAPER_TABLOID
521PAPER_LEDGER = _core_.PAPER_LEDGER
522PAPER_STATEMENT = _core_.PAPER_STATEMENT
523PAPER_EXECUTIVE = _core_.PAPER_EXECUTIVE
524PAPER_A3 = _core_.PAPER_A3
525PAPER_A4SMALL = _core_.PAPER_A4SMALL
526PAPER_A5 = _core_.PAPER_A5
527PAPER_B4 = _core_.PAPER_B4
528PAPER_B5 = _core_.PAPER_B5
529PAPER_FOLIO = _core_.PAPER_FOLIO
530PAPER_QUARTO = _core_.PAPER_QUARTO
531PAPER_10X14 = _core_.PAPER_10X14
532PAPER_11X17 = _core_.PAPER_11X17
533PAPER_NOTE = _core_.PAPER_NOTE
534PAPER_ENV_9 = _core_.PAPER_ENV_9
535PAPER_ENV_10 = _core_.PAPER_ENV_10
536PAPER_ENV_11 = _core_.PAPER_ENV_11
537PAPER_ENV_12 = _core_.PAPER_ENV_12
538PAPER_ENV_14 = _core_.PAPER_ENV_14
539PAPER_ENV_DL = _core_.PAPER_ENV_DL
540PAPER_ENV_C5 = _core_.PAPER_ENV_C5
541PAPER_ENV_C3 = _core_.PAPER_ENV_C3
542PAPER_ENV_C4 = _core_.PAPER_ENV_C4
543PAPER_ENV_C6 = _core_.PAPER_ENV_C6
544PAPER_ENV_C65 = _core_.PAPER_ENV_C65
545PAPER_ENV_B4 = _core_.PAPER_ENV_B4
546PAPER_ENV_B5 = _core_.PAPER_ENV_B5
547PAPER_ENV_B6 = _core_.PAPER_ENV_B6
548PAPER_ENV_ITALY = _core_.PAPER_ENV_ITALY
549PAPER_ENV_MONARCH = _core_.PAPER_ENV_MONARCH
550PAPER_ENV_PERSONAL = _core_.PAPER_ENV_PERSONAL
551PAPER_FANFOLD_US = _core_.PAPER_FANFOLD_US
552PAPER_FANFOLD_STD_GERMAN = _core_.PAPER_FANFOLD_STD_GERMAN
553PAPER_FANFOLD_LGL_GERMAN = _core_.PAPER_FANFOLD_LGL_GERMAN
554PAPER_ISO_B4 = _core_.PAPER_ISO_B4
555PAPER_JAPANESE_POSTCARD = _core_.PAPER_JAPANESE_POSTCARD
556PAPER_9X11 = _core_.PAPER_9X11
557PAPER_10X11 = _core_.PAPER_10X11
558PAPER_15X11 = _core_.PAPER_15X11
559PAPER_ENV_INVITE = _core_.PAPER_ENV_INVITE
560PAPER_LETTER_EXTRA = _core_.PAPER_LETTER_EXTRA
561PAPER_LEGAL_EXTRA = _core_.PAPER_LEGAL_EXTRA
562PAPER_TABLOID_EXTRA = _core_.PAPER_TABLOID_EXTRA
563PAPER_A4_EXTRA = _core_.PAPER_A4_EXTRA
564PAPER_LETTER_TRANSVERSE = _core_.PAPER_LETTER_TRANSVERSE
565PAPER_A4_TRANSVERSE = _core_.PAPER_A4_TRANSVERSE
566PAPER_LETTER_EXTRA_TRANSVERSE = _core_.PAPER_LETTER_EXTRA_TRANSVERSE
567PAPER_A_PLUS = _core_.PAPER_A_PLUS
568PAPER_B_PLUS = _core_.PAPER_B_PLUS
569PAPER_LETTER_PLUS = _core_.PAPER_LETTER_PLUS
570PAPER_A4_PLUS = _core_.PAPER_A4_PLUS
571PAPER_A5_TRANSVERSE = _core_.PAPER_A5_TRANSVERSE
572PAPER_B5_TRANSVERSE = _core_.PAPER_B5_TRANSVERSE
573PAPER_A3_EXTRA = _core_.PAPER_A3_EXTRA
574PAPER_A5_EXTRA = _core_.PAPER_A5_EXTRA
575PAPER_B5_EXTRA = _core_.PAPER_B5_EXTRA
576PAPER_A2 = _core_.PAPER_A2
577PAPER_A3_TRANSVERSE = _core_.PAPER_A3_TRANSVERSE
578PAPER_A3_EXTRA_TRANSVERSE = _core_.PAPER_A3_EXTRA_TRANSVERSE
579DUPLEX_SIMPLEX = _core_.DUPLEX_SIMPLEX
580DUPLEX_HORIZONTAL = _core_.DUPLEX_HORIZONTAL
581DUPLEX_VERTICAL = _core_.DUPLEX_VERTICAL
582ITEM_SEPARATOR = _core_.ITEM_SEPARATOR
583ITEM_NORMAL = _core_.ITEM_NORMAL
584ITEM_CHECK = _core_.ITEM_CHECK
585ITEM_RADIO = _core_.ITEM_RADIO
586ITEM_MAX = _core_.ITEM_MAX
587HT_NOWHERE = _core_.HT_NOWHERE
588HT_SCROLLBAR_FIRST = _core_.HT_SCROLLBAR_FIRST
589HT_SCROLLBAR_ARROW_LINE_1 = _core_.HT_SCROLLBAR_ARROW_LINE_1
590HT_SCROLLBAR_ARROW_LINE_2 = _core_.HT_SCROLLBAR_ARROW_LINE_2
591HT_SCROLLBAR_ARROW_PAGE_1 = _core_.HT_SCROLLBAR_ARROW_PAGE_1
592HT_SCROLLBAR_ARROW_PAGE_2 = _core_.HT_SCROLLBAR_ARROW_PAGE_2
593HT_SCROLLBAR_THUMB = _core_.HT_SCROLLBAR_THUMB
594HT_SCROLLBAR_BAR_1 = _core_.HT_SCROLLBAR_BAR_1
595HT_SCROLLBAR_BAR_2 = _core_.HT_SCROLLBAR_BAR_2
596HT_SCROLLBAR_LAST = _core_.HT_SCROLLBAR_LAST
597HT_WINDOW_OUTSIDE = _core_.HT_WINDOW_OUTSIDE
598HT_WINDOW_INSIDE = _core_.HT_WINDOW_INSIDE
599HT_WINDOW_VERT_SCROLLBAR = _core_.HT_WINDOW_VERT_SCROLLBAR
600HT_WINDOW_HORZ_SCROLLBAR = _core_.HT_WINDOW_HORZ_SCROLLBAR
601HT_WINDOW_CORNER = _core_.HT_WINDOW_CORNER
602HT_MAX = _core_.HT_MAX
603MOD_NONE = _core_.MOD_NONE
604MOD_ALT = _core_.MOD_ALT
605MOD_CONTROL = _core_.MOD_CONTROL
606MOD_SHIFT = _core_.MOD_SHIFT
607MOD_WIN = _core_.MOD_WIN
608UPDATE_UI_NONE = _core_.UPDATE_UI_NONE
609UPDATE_UI_RECURSE = _core_.UPDATE_UI_RECURSE
610UPDATE_UI_FROMIDLE = _core_.UPDATE_UI_FROMIDLE
611#---------------------------------------------------------------------------
612
613class Object(object):
614 """
615 The base class for most wx objects, although in wxPython not
616 much functionality is needed nor exposed.
617 """
618 def __init__(self): raise RuntimeError, "No constructor defined"
619 def __repr__(self):
620 return "<%s.%s; proxy of C++ wxObject instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
621 def GetClassName(*args, **kwargs):
622 """
623 GetClassName(self) -> String
624
625 Returns the class name of the C++ class using wxRTTI.
626 """
627 return _core_.Object_GetClassName(*args, **kwargs)
628
629 def Destroy(*args, **kwargs):
630 """
631 Destroy(self)
632
633 Deletes the C++ object this Python object is a proxy for.
634 """
635 return _core_.Object_Destroy(*args, **kwargs)
636
637
638class ObjectPtr(Object):
639 def __init__(self, this):
640 self.this = this
641 if not hasattr(self,"thisown"): self.thisown = 0
642 self.__class__ = Object
643_core_.Object_swigregister(ObjectPtr)
644_wxPySetDictionary = _core_._wxPySetDictionary
645
646_wxPyFixStockObjects = _core_._wxPyFixStockObjects
647
648cvar = _core_.cvar
649EmptyString = cvar.EmptyString
650
651#---------------------------------------------------------------------------
652
653BITMAP_TYPE_INVALID = _core_.BITMAP_TYPE_INVALID
654BITMAP_TYPE_BMP = _core_.BITMAP_TYPE_BMP
655BITMAP_TYPE_ICO = _core_.BITMAP_TYPE_ICO
656BITMAP_TYPE_CUR = _core_.BITMAP_TYPE_CUR
657BITMAP_TYPE_XBM = _core_.BITMAP_TYPE_XBM
658BITMAP_TYPE_XBM_DATA = _core_.BITMAP_TYPE_XBM_DATA
659BITMAP_TYPE_XPM = _core_.BITMAP_TYPE_XPM
660BITMAP_TYPE_XPM_DATA = _core_.BITMAP_TYPE_XPM_DATA
661BITMAP_TYPE_TIF = _core_.BITMAP_TYPE_TIF
662BITMAP_TYPE_GIF = _core_.BITMAP_TYPE_GIF
663BITMAP_TYPE_PNG = _core_.BITMAP_TYPE_PNG
664BITMAP_TYPE_JPEG = _core_.BITMAP_TYPE_JPEG
665BITMAP_TYPE_PNM = _core_.BITMAP_TYPE_PNM
666BITMAP_TYPE_PCX = _core_.BITMAP_TYPE_PCX
667BITMAP_TYPE_PICT = _core_.BITMAP_TYPE_PICT
668BITMAP_TYPE_ICON = _core_.BITMAP_TYPE_ICON
669BITMAP_TYPE_ANI = _core_.BITMAP_TYPE_ANI
670BITMAP_TYPE_IFF = _core_.BITMAP_TYPE_IFF
671BITMAP_TYPE_MACCURSOR = _core_.BITMAP_TYPE_MACCURSOR
672BITMAP_TYPE_ANY = _core_.BITMAP_TYPE_ANY
673CURSOR_NONE = _core_.CURSOR_NONE
674CURSOR_ARROW = _core_.CURSOR_ARROW
675CURSOR_RIGHT_ARROW = _core_.CURSOR_RIGHT_ARROW
676CURSOR_BULLSEYE = _core_.CURSOR_BULLSEYE
677CURSOR_CHAR = _core_.CURSOR_CHAR
678CURSOR_CROSS = _core_.CURSOR_CROSS
679CURSOR_HAND = _core_.CURSOR_HAND
680CURSOR_IBEAM = _core_.CURSOR_IBEAM
681CURSOR_LEFT_BUTTON = _core_.CURSOR_LEFT_BUTTON
682CURSOR_MAGNIFIER = _core_.CURSOR_MAGNIFIER
683CURSOR_MIDDLE_BUTTON = _core_.CURSOR_MIDDLE_BUTTON
684CURSOR_NO_ENTRY = _core_.CURSOR_NO_ENTRY
685CURSOR_PAINT_BRUSH = _core_.CURSOR_PAINT_BRUSH
686CURSOR_PENCIL = _core_.CURSOR_PENCIL
687CURSOR_POINT_LEFT = _core_.CURSOR_POINT_LEFT
688CURSOR_POINT_RIGHT = _core_.CURSOR_POINT_RIGHT
689CURSOR_QUESTION_ARROW = _core_.CURSOR_QUESTION_ARROW
690CURSOR_RIGHT_BUTTON = _core_.CURSOR_RIGHT_BUTTON
691CURSOR_SIZENESW = _core_.CURSOR_SIZENESW
692CURSOR_SIZENS = _core_.CURSOR_SIZENS
693CURSOR_SIZENWSE = _core_.CURSOR_SIZENWSE
694CURSOR_SIZEWE = _core_.CURSOR_SIZEWE
695CURSOR_SIZING = _core_.CURSOR_SIZING
696CURSOR_SPRAYCAN = _core_.CURSOR_SPRAYCAN
697CURSOR_WAIT = _core_.CURSOR_WAIT
698CURSOR_WATCH = _core_.CURSOR_WATCH
699CURSOR_BLANK = _core_.CURSOR_BLANK
700CURSOR_DEFAULT = _core_.CURSOR_DEFAULT
701CURSOR_COPY_ARROW = _core_.CURSOR_COPY_ARROW
702CURSOR_ARROWWAIT = _core_.CURSOR_ARROWWAIT
703CURSOR_MAX = _core_.CURSOR_MAX
704#---------------------------------------------------------------------------
705
706class Size(object):
707 """
79fccf9d 708 wx.Size is a useful data structure used to represent the size of
093d3ff1
RD
709 something. It simply contians integer width and height
710 proprtites. In most places in wxPython where a wx.Size is
711 expected a (width, height) tuple can be used instead.
d55e5bfc
RD
712 """
713 def __repr__(self):
714 return "<%s.%s; proxy of C++ wxSize instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
715 width = property(_core_.Size_width_get, _core_.Size_width_set)
716 height = property(_core_.Size_height_get, _core_.Size_height_set)
717 x = width; y = height
718 def __init__(self, *args, **kwargs):
719 """
720 __init__(self, int w=0, int h=0) -> Size
721
722 Creates a size object.
723 """
724 newobj = _core_.new_Size(*args, **kwargs)
725 self.this = newobj.this
726 self.thisown = 1
727 del newobj.thisown
728 def __del__(self, destroy=_core_.delete_Size):
729 """__del__(self)"""
730 try:
731 if self.thisown: destroy(self)
732 except: pass
733
734 def __eq__(*args, **kwargs):
735 """
736 __eq__(self, Size sz) -> bool
737
738 Test for equality of wx.Size objects.
739 """
740 return _core_.Size___eq__(*args, **kwargs)
741
742 def __ne__(*args, **kwargs):
743 """
744 __ne__(self, Size sz) -> bool
745
746 Test for inequality.
747 """
748 return _core_.Size___ne__(*args, **kwargs)
749
750 def __add__(*args, **kwargs):
751 """
752 __add__(self, Size sz) -> Size
753
754 Add sz's proprties to this and return the result.
755 """
756 return _core_.Size___add__(*args, **kwargs)
757
758 def __sub__(*args, **kwargs):
759 """
760 __sub__(self, Size sz) -> Size
761
762 Subtract sz's properties from this and return the result.
763 """
764 return _core_.Size___sub__(*args, **kwargs)
765
766 def IncTo(*args, **kwargs):
767 """
768 IncTo(self, Size sz)
769
770 Increments this object so that both of its dimensions are not less
771 than the corresponding dimensions of the size.
772 """
773 return _core_.Size_IncTo(*args, **kwargs)
774
775 def DecTo(*args, **kwargs):
776 """
777 DecTo(self, Size sz)
778
779 Decrements this object so that both of its dimensions are not greater
780 than the corresponding dimensions of the size.
781 """
782 return _core_.Size_DecTo(*args, **kwargs)
783
784 def Set(*args, **kwargs):
785 """
786 Set(self, int w, int h)
787
788 Set both width and height.
789 """
790 return _core_.Size_Set(*args, **kwargs)
791
792 def SetWidth(*args, **kwargs):
793 """SetWidth(self, int w)"""
794 return _core_.Size_SetWidth(*args, **kwargs)
795
796 def SetHeight(*args, **kwargs):
797 """SetHeight(self, int h)"""
798 return _core_.Size_SetHeight(*args, **kwargs)
799
800 def GetWidth(*args, **kwargs):
801 """GetWidth(self) -> int"""
802 return _core_.Size_GetWidth(*args, **kwargs)
803
804 def GetHeight(*args, **kwargs):
805 """GetHeight(self) -> int"""
806 return _core_.Size_GetHeight(*args, **kwargs)
807
808 def IsFullySpecified(*args, **kwargs):
809 """
810 IsFullySpecified(self) -> bool
811
812 Returns True if both components of the size are non-default values.
813 """
814 return _core_.Size_IsFullySpecified(*args, **kwargs)
815
816 def SetDefaults(*args, **kwargs):
817 """
818 SetDefaults(self, Size size)
819
79fccf9d
RD
820 Combine this size with the other one replacing the default components
821 of this object (i.e. equal to -1) with those of the other.
d55e5bfc
RD
822 """
823 return _core_.Size_SetDefaults(*args, **kwargs)
824
825 def Get(*args, **kwargs):
826 """
827 Get() -> (width,height)
828
829 Returns the width and height properties as a tuple.
830 """
831 return _core_.Size_Get(*args, **kwargs)
832
79fccf9d 833 asTuple = wx._deprecated(Get, "asTuple is deprecated, use `Get` instead")
d55e5bfc
RD
834 def __str__(self): return str(self.Get())
835 def __repr__(self): return 'wx.Size'+str(self.Get())
836 def __len__(self): return len(self.Get())
837 def __getitem__(self, index): return self.Get()[index]
838 def __setitem__(self, index, val):
839 if index == 0: self.width = val
840 elif index == 1: self.height = val
841 else: raise IndexError
842 def __nonzero__(self): return self.Get() != (0,0)
843 __safe_for_unpickling__ = True
844 def __reduce__(self): return (wx.Size, self.Get())
845
846
847class SizePtr(Size):
848 def __init__(self, this):
849 self.this = this
850 if not hasattr(self,"thisown"): self.thisown = 0
851 self.__class__ = Size
852_core_.Size_swigregister(SizePtr)
853
854#---------------------------------------------------------------------------
855
856class RealPoint(object):
857 """
79fccf9d
RD
858 A data structure for representing a point or position with floating
859 point x and y properties. In wxPython most places that expect a
860 wx.RealPoint can also accept a (x,y) tuple.
d55e5bfc
RD
861 """
862 def __repr__(self):
863 return "<%s.%s; proxy of C++ wxRealPoint instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
864 x = property(_core_.RealPoint_x_get, _core_.RealPoint_x_set)
865 y = property(_core_.RealPoint_y_get, _core_.RealPoint_y_set)
866 def __init__(self, *args, **kwargs):
867 """
868 __init__(self, double x=0.0, double y=0.0) -> RealPoint
869
870 Create a wx.RealPoint object
871 """
872 newobj = _core_.new_RealPoint(*args, **kwargs)
873 self.this = newobj.this
874 self.thisown = 1
875 del newobj.thisown
876 def __del__(self, destroy=_core_.delete_RealPoint):
877 """__del__(self)"""
878 try:
879 if self.thisown: destroy(self)
880 except: pass
881
882 def __eq__(*args, **kwargs):
883 """
884 __eq__(self, RealPoint pt) -> bool
885
886 Test for equality of wx.RealPoint objects.
887 """
888 return _core_.RealPoint___eq__(*args, **kwargs)
889
890 def __ne__(*args, **kwargs):
891 """
892 __ne__(self, RealPoint pt) -> bool
893
894 Test for inequality of wx.RealPoint objects.
895 """
896 return _core_.RealPoint___ne__(*args, **kwargs)
897
898 def __add__(*args, **kwargs):
899 """
900 __add__(self, RealPoint pt) -> RealPoint
901
902 Add pt's proprties to this and return the result.
903 """
904 return _core_.RealPoint___add__(*args, **kwargs)
905
906 def __sub__(*args, **kwargs):
907 """
908 __sub__(self, RealPoint pt) -> RealPoint
909
910 Subtract pt's proprties from this and return the result
911 """
912 return _core_.RealPoint___sub__(*args, **kwargs)
913
914 def Set(*args, **kwargs):
915 """
916 Set(self, double x, double y)
917
918 Set both the x and y properties
919 """
920 return _core_.RealPoint_Set(*args, **kwargs)
921
922 def Get(*args, **kwargs):
923 """
924 Get() -> (x,y)
925
926 Return the x and y properties as a tuple.
927 """
928 return _core_.RealPoint_Get(*args, **kwargs)
929
79fccf9d 930 asTuple = wx._deprecated(Get, "asTuple is deprecated, use `Get` instead")
d55e5bfc
RD
931 def __str__(self): return str(self.Get())
932 def __repr__(self): return 'wx.RealPoint'+str(self.Get())
933 def __len__(self): return len(self.Get())
934 def __getitem__(self, index): return self.Get()[index]
935 def __setitem__(self, index, val):
936 if index == 0: self.x = val
937 elif index == 1: self.y = val
938 else: raise IndexError
939 def __nonzero__(self): return self.Get() != (0.0, 0.0)
940 __safe_for_unpickling__ = True
941 def __reduce__(self): return (wx.RealPoint, self.Get())
942
943
944class RealPointPtr(RealPoint):
945 def __init__(self, this):
946 self.this = this
947 if not hasattr(self,"thisown"): self.thisown = 0
948 self.__class__ = RealPoint
949_core_.RealPoint_swigregister(RealPointPtr)
950
951#---------------------------------------------------------------------------
952
953class Point(object):
954 """
79fccf9d
RD
955 A data structure for representing a point or position with integer x
956 and y properties. Most places in wxPython that expect a wx.Point can
957 also accept a (x,y) tuple.
d55e5bfc
RD
958 """
959 def __repr__(self):
960 return "<%s.%s; proxy of C++ wxPoint instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
961 x = property(_core_.Point_x_get, _core_.Point_x_set)
962 y = property(_core_.Point_y_get, _core_.Point_y_set)
963 def __init__(self, *args, **kwargs):
964 """
965 __init__(self, int x=0, int y=0) -> Point
966
967 Create a wx.Point object
968 """
969 newobj = _core_.new_Point(*args, **kwargs)
970 self.this = newobj.this
971 self.thisown = 1
972 del newobj.thisown
973 def __del__(self, destroy=_core_.delete_Point):
974 """__del__(self)"""
975 try:
976 if self.thisown: destroy(self)
977 except: pass
978
979 def __eq__(*args, **kwargs):
980 """
981 __eq__(self, Point pt) -> bool
982
983 Test for equality of wx.Point objects.
984 """
985 return _core_.Point___eq__(*args, **kwargs)
986
987 def __ne__(*args, **kwargs):
988 """
989 __ne__(self, Point pt) -> bool
990
991 Test for inequality of wx.Point objects.
992 """
993 return _core_.Point___ne__(*args, **kwargs)
994
995 def __add__(*args, **kwargs):
996 """
997 __add__(self, Point pt) -> Point
998
999 Add pt's proprties to this and return the result.
1000 """
1001 return _core_.Point___add__(*args, **kwargs)
1002
1003 def __sub__(*args, **kwargs):
1004 """
1005 __sub__(self, Point pt) -> Point
1006
1007 Subtract pt's proprties from this and return the result
1008 """
1009 return _core_.Point___sub__(*args, **kwargs)
1010
1011 def __iadd__(*args, **kwargs):
1012 """
1013 __iadd__(self, Point pt) -> Point
1014
1015 Add pt to this object.
1016 """
1017 return _core_.Point___iadd__(*args, **kwargs)
1018
1019 def __isub__(*args, **kwargs):
1020 """
1021 __isub__(self, Point pt) -> Point
1022
1023 Subtract pt from this object.
1024 """
1025 return _core_.Point___isub__(*args, **kwargs)
1026
1027 def Set(*args, **kwargs):
1028 """
1029 Set(self, long x, long y)
1030
1031 Set both the x and y properties
1032 """
1033 return _core_.Point_Set(*args, **kwargs)
1034
1035 def Get(*args, **kwargs):
1036 """
1037 Get() -> (x,y)
1038
1039 Return the x and y properties as a tuple.
1040 """
1041 return _core_.Point_Get(*args, **kwargs)
1042
79fccf9d 1043 asTuple = wx._deprecated(Get, "asTuple is deprecated, use `Get` instead")
d55e5bfc
RD
1044 def __str__(self): return str(self.Get())
1045 def __repr__(self): return 'wx.Point'+str(self.Get())
1046 def __len__(self): return len(self.Get())
1047 def __getitem__(self, index): return self.Get()[index]
1048 def __setitem__(self, index, val):
1049 if index == 0: self.x = val
1050 elif index == 1: self.y = val
1051 else: raise IndexError
1052 def __nonzero__(self): return self.Get() != (0,0)
1053 __safe_for_unpickling__ = True
1054 def __reduce__(self): return (wx.Point, self.Get())
1055
1056
1057class PointPtr(Point):
1058 def __init__(self, this):
1059 self.this = this
1060 if not hasattr(self,"thisown"): self.thisown = 0
1061 self.__class__ = Point
1062_core_.Point_swigregister(PointPtr)
1063
1064#---------------------------------------------------------------------------
1065
1066class Rect(object):
1067 """
79fccf9d
RD
1068 A class for representing and manipulating rectangles. It has x, y,
1069 width and height properties. In wxPython most palces that expect a
1070 wx.Rect can also accept a (x,y,width,height) tuple.
d55e5bfc
RD
1071 """
1072 def __repr__(self):
1073 return "<%s.%s; proxy of C++ wxRect instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
1074 def __init__(self, *args, **kwargs):
1075 """
1076 __init__(self, int x=0, int y=0, int width=0, int height=0) -> Rect
1077
1078 Create a new Rect object.
1079 """
1080 newobj = _core_.new_Rect(*args, **kwargs)
1081 self.this = newobj.this
1082 self.thisown = 1
1083 del newobj.thisown
1084 def __del__(self, destroy=_core_.delete_Rect):
1085 """__del__(self)"""
1086 try:
1087 if self.thisown: destroy(self)
1088 except: pass
1089
1090 def GetX(*args, **kwargs):
1091 """GetX(self) -> int"""
1092 return _core_.Rect_GetX(*args, **kwargs)
1093
1094 def SetX(*args, **kwargs):
1095 """SetX(self, int x)"""
1096 return _core_.Rect_SetX(*args, **kwargs)
1097
1098 def GetY(*args, **kwargs):
1099 """GetY(self) -> int"""
1100 return _core_.Rect_GetY(*args, **kwargs)
1101
1102 def SetY(*args, **kwargs):
1103 """SetY(self, int y)"""
1104 return _core_.Rect_SetY(*args, **kwargs)
1105
1106 def GetWidth(*args, **kwargs):
1107 """GetWidth(self) -> int"""
1108 return _core_.Rect_GetWidth(*args, **kwargs)
1109
1110 def SetWidth(*args, **kwargs):
1111 """SetWidth(self, int w)"""
1112 return _core_.Rect_SetWidth(*args, **kwargs)
1113
1114 def GetHeight(*args, **kwargs):
1115 """GetHeight(self) -> int"""
1116 return _core_.Rect_GetHeight(*args, **kwargs)
1117
1118 def SetHeight(*args, **kwargs):
1119 """SetHeight(self, int h)"""
1120 return _core_.Rect_SetHeight(*args, **kwargs)
1121
1122 def GetPosition(*args, **kwargs):
1123 """GetPosition(self) -> Point"""
1124 return _core_.Rect_GetPosition(*args, **kwargs)
1125
1126 def SetPosition(*args, **kwargs):
1127 """SetPosition(self, Point p)"""
1128 return _core_.Rect_SetPosition(*args, **kwargs)
1129
1130 def GetSize(*args, **kwargs):
1131 """GetSize(self) -> Size"""
1132 return _core_.Rect_GetSize(*args, **kwargs)
1133
1134 def SetSize(*args, **kwargs):
1135 """SetSize(self, Size s)"""
1136 return _core_.Rect_SetSize(*args, **kwargs)
1137
1138 def GetTopLeft(*args, **kwargs):
1139 """GetTopLeft(self) -> Point"""
1140 return _core_.Rect_GetTopLeft(*args, **kwargs)
1141
1142 def SetTopLeft(*args, **kwargs):
1143 """SetTopLeft(self, Point p)"""
1144 return _core_.Rect_SetTopLeft(*args, **kwargs)
1145
1146 def GetBottomRight(*args, **kwargs):
1147 """GetBottomRight(self) -> Point"""
1148 return _core_.Rect_GetBottomRight(*args, **kwargs)
1149
1150 def SetBottomRight(*args, **kwargs):
1151 """SetBottomRight(self, Point p)"""
1152 return _core_.Rect_SetBottomRight(*args, **kwargs)
1153
1154 def GetLeft(*args, **kwargs):
1155 """GetLeft(self) -> int"""
1156 return _core_.Rect_GetLeft(*args, **kwargs)
1157
1158 def GetTop(*args, **kwargs):
1159 """GetTop(self) -> int"""
1160 return _core_.Rect_GetTop(*args, **kwargs)
1161
1162 def GetBottom(*args, **kwargs):
1163 """GetBottom(self) -> int"""
1164 return _core_.Rect_GetBottom(*args, **kwargs)
1165
1166 def GetRight(*args, **kwargs):
1167 """GetRight(self) -> int"""
1168 return _core_.Rect_GetRight(*args, **kwargs)
1169
1170 def SetLeft(*args, **kwargs):
1171 """SetLeft(self, int left)"""
1172 return _core_.Rect_SetLeft(*args, **kwargs)
1173
1174 def SetRight(*args, **kwargs):
1175 """SetRight(self, int right)"""
1176 return _core_.Rect_SetRight(*args, **kwargs)
1177
1178 def SetTop(*args, **kwargs):
1179 """SetTop(self, int top)"""
1180 return _core_.Rect_SetTop(*args, **kwargs)
1181
1182 def SetBottom(*args, **kwargs):
1183 """SetBottom(self, int bottom)"""
1184 return _core_.Rect_SetBottom(*args, **kwargs)
1185
1186 position = property(GetPosition, SetPosition)
1187 size = property(GetSize, SetSize)
1188 left = property(GetLeft, SetLeft)
1189 right = property(GetRight, SetRight)
1190 top = property(GetTop, SetTop)
1191 bottom = property(GetBottom, SetBottom)
1192
1193 def Inflate(*args, **kwargs):
1194 """
1195 Inflate(self, int dx, int dy) -> Rect
1196
091fdbfa
RD
1197 Increases the size of the rectangle.
1198
1199 The left border is moved farther left and the right border is moved
1200 farther right by ``dx``. The upper border is moved farther up and the
1201 bottom border is moved farther down by ``dy``. (Note the the width and
1202 height of the rectangle thus change by ``2*dx`` and ``2*dy``,
1203 respectively.) If one or both of ``dx`` and ``dy`` are negative, the
1204 opposite happens: the rectangle size decreases in the respective
1205 direction.
1206
1207 The change is made to the rectangle inplace, if instead you need a
1208 copy that is inflated, preserving the original then make the copy
1209 first::
1210
1211 copy = wx.Rect(*original)
1212 copy.Inflate(10,15)
1213
1214
d55e5bfc
RD
1215 """
1216 return _core_.Rect_Inflate(*args, **kwargs)
1217
1218 def Deflate(*args, **kwargs):
1219 """
1220 Deflate(self, int dx, int dy) -> Rect
1221
091fdbfa
RD
1222 Decrease the rectangle size. This method is the opposite of `Inflate`
1223 in that Deflate(a,b) is equivalent to Inflate(-a,-b). Please refer to
1224 `Inflate` for a full description.
d55e5bfc
RD
1225 """
1226 return _core_.Rect_Deflate(*args, **kwargs)
1227
1228 def OffsetXY(*args, **kwargs):
1229 """
1230 OffsetXY(self, int dx, int dy)
1231
79fccf9d
RD
1232 Moves the rectangle by the specified offset. If dx is positive, the
1233 rectangle is moved to the right, if dy is positive, it is moved to the
1234 bottom, otherwise it is moved to the left or top respectively.
d55e5bfc
RD
1235 """
1236 return _core_.Rect_OffsetXY(*args, **kwargs)
1237
1238 def Offset(*args, **kwargs):
1239 """
1240 Offset(self, Point pt)
1241
1242 Same as OffsetXY but uses dx,dy from Point
1243 """
1244 return _core_.Rect_Offset(*args, **kwargs)
1245
1246 def Intersect(*args, **kwargs):
1247 """
1248 Intersect(self, Rect rect) -> Rect
1249
b519803b 1250 Returns the intersectsion of this rectangle and rect.
d55e5bfc
RD
1251 """
1252 return _core_.Rect_Intersect(*args, **kwargs)
1253
b519803b
RD
1254 def Union(*args, **kwargs):
1255 """
1256 Union(self, Rect rect) -> Rect
1257
1258 Returns the union of this rectangle and rect.
1259 """
1260 return _core_.Rect_Union(*args, **kwargs)
1261
d55e5bfc
RD
1262 def __add__(*args, **kwargs):
1263 """
1264 __add__(self, Rect rect) -> Rect
1265
1266 Add the properties of rect to this rectangle and return the result.
1267 """
1268 return _core_.Rect___add__(*args, **kwargs)
1269
1270 def __iadd__(*args, **kwargs):
1271 """
1272 __iadd__(self, Rect rect) -> Rect
1273
1274 Add the properties of rect to this rectangle, updating this rectangle.
1275 """
1276 return _core_.Rect___iadd__(*args, **kwargs)
1277
1278 def __eq__(*args, **kwargs):
1279 """
1280 __eq__(self, Rect rect) -> bool
1281
1282 Test for equality.
1283 """
1284 return _core_.Rect___eq__(*args, **kwargs)
1285
1286 def __ne__(*args, **kwargs):
1287 """
1288 __ne__(self, Rect rect) -> bool
1289
1290 Test for inequality.
1291 """
1292 return _core_.Rect___ne__(*args, **kwargs)
1293
1294 def InsideXY(*args, **kwargs):
1295 """
1296 InsideXY(self, int x, int y) -> bool
1297
1298 Return True if the point is (not strcitly) inside the rect.
1299 """
1300 return _core_.Rect_InsideXY(*args, **kwargs)
1301
1302 def Inside(*args, **kwargs):
1303 """
1304 Inside(self, Point pt) -> bool
1305
1306 Return True if the point is (not strcitly) inside the rect.
1307 """
1308 return _core_.Rect_Inside(*args, **kwargs)
1309
1310 def Intersects(*args, **kwargs):
1311 """
1312 Intersects(self, Rect rect) -> bool
1313
1314 Returns True if the rectangles have a non empty intersection.
1315 """
1316 return _core_.Rect_Intersects(*args, **kwargs)
1317
1318 x = property(_core_.Rect_x_get, _core_.Rect_x_set)
1319 y = property(_core_.Rect_y_get, _core_.Rect_y_set)
1320 width = property(_core_.Rect_width_get, _core_.Rect_width_set)
1321 height = property(_core_.Rect_height_get, _core_.Rect_height_set)
1322 def Set(*args, **kwargs):
1323 """
1324 Set(self, int x=0, int y=0, int width=0, int height=0)
1325
1326 Set all rectangle properties.
1327 """
1328 return _core_.Rect_Set(*args, **kwargs)
1329
1330 def Get(*args, **kwargs):
1331 """
1332 Get() -> (x,y,width,height)
1333
1334 Return the rectangle properties as a tuple.
1335 """
1336 return _core_.Rect_Get(*args, **kwargs)
1337
79fccf9d 1338 asTuple = wx._deprecated(Get, "asTuple is deprecated, use `Get` instead")
d55e5bfc
RD
1339 def __str__(self): return str(self.Get())
1340 def __repr__(self): return 'wx.Rect'+str(self.Get())
1341 def __len__(self): return len(self.Get())
1342 def __getitem__(self, index): return self.Get()[index]
1343 def __setitem__(self, index, val):
1344 if index == 0: self.x = val
1345 elif index == 1: self.y = val
1346 elif index == 2: self.width = val
1347 elif index == 3: self.height = val
1348 else: raise IndexError
1349 def __nonzero__(self): return self.Get() != (0,0,0,0)
1350 __safe_for_unpickling__ = True
1351 def __reduce__(self): return (wx.Rect, self.Get())
1352
1353
1354class RectPtr(Rect):
1355 def __init__(self, this):
1356 self.this = this
1357 if not hasattr(self,"thisown"): self.thisown = 0
1358 self.__class__ = Rect
1359_core_.Rect_swigregister(RectPtr)
1360
1361def RectPP(*args, **kwargs):
1362 """
1363 RectPP(Point topLeft, Point bottomRight) -> Rect
1364
1365 Create a new Rect object from Points representing two corners.
1366 """
1367 val = _core_.new_RectPP(*args, **kwargs)
1368 val.thisown = 1
1369 return val
1370
1371def RectPS(*args, **kwargs):
1372 """
1373 RectPS(Point pos, Size size) -> Rect
1374
1375 Create a new Rect from a position and size.
1376 """
1377 val = _core_.new_RectPS(*args, **kwargs)
1378 val.thisown = 1
1379 return val
1380
c1cb24a4
RD
1381def RectS(*args, **kwargs):
1382 """
1383 RectS(Size size) -> Rect
1384
1385 Create a new Rect from a size only.
1386 """
1387 val = _core_.new_RectS(*args, **kwargs)
1388 val.thisown = 1
1389 return val
1390
d55e5bfc
RD
1391
1392def IntersectRect(*args, **kwargs):
1393 """
1394 IntersectRect(Rect r1, Rect r2) -> Rect
1395
1396 Calculate and return the intersection of r1 and r2.
1397 """
1398 return _core_.IntersectRect(*args, **kwargs)
1399#---------------------------------------------------------------------------
1400
1401class Point2D(object):
79fccf9d
RD
1402 """
1403 wx.Point2Ds represent a point or a vector in a 2d coordinate system
1404 with floating point values.
1405 """
d55e5bfc
RD
1406 def __repr__(self):
1407 return "<%s.%s; proxy of C++ wxPoint2D instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
1408 def __init__(self, *args, **kwargs):
1409 """
1410 __init__(self, double x=0.0, double y=0.0) -> Point2D
1411
1412 Create a w.Point2D object.
1413 """
1414 newobj = _core_.new_Point2D(*args, **kwargs)
1415 self.this = newobj.this
1416 self.thisown = 1
1417 del newobj.thisown
1418 def GetFloor(*args, **kwargs):
a8eff060
RD
1419 """
1420 GetFloor() -> (x,y)
1421
1422 Convert to integer
1423 """
d55e5bfc
RD
1424 return _core_.Point2D_GetFloor(*args, **kwargs)
1425
1426 def GetRounded(*args, **kwargs):
a8eff060
RD
1427 """
1428 GetRounded() -> (x,y)
1429
1430 Convert to integer
1431 """
d55e5bfc
RD
1432 return _core_.Point2D_GetRounded(*args, **kwargs)
1433
1434 def GetVectorLength(*args, **kwargs):
1435 """GetVectorLength(self) -> double"""
1436 return _core_.Point2D_GetVectorLength(*args, **kwargs)
1437
1438 def GetVectorAngle(*args, **kwargs):
1439 """GetVectorAngle(self) -> double"""
1440 return _core_.Point2D_GetVectorAngle(*args, **kwargs)
1441
1442 def SetVectorLength(*args, **kwargs):
1443 """SetVectorLength(self, double length)"""
1444 return _core_.Point2D_SetVectorLength(*args, **kwargs)
1445
1446 def SetVectorAngle(*args, **kwargs):
1447 """SetVectorAngle(self, double degrees)"""
1448 return _core_.Point2D_SetVectorAngle(*args, **kwargs)
1449
1450 def SetPolarCoordinates(self, angle, length):
1451 self.SetVectorLength(length)
1452 self.SetVectorAngle(angle)
1453 def Normalize(self):
1454 self.SetVectorLength(1.0)
1455
1456 def GetDistance(*args, **kwargs):
1457 """GetDistance(self, Point2D pt) -> double"""
1458 return _core_.Point2D_GetDistance(*args, **kwargs)
1459
1460 def GetDistanceSquare(*args, **kwargs):
1461 """GetDistanceSquare(self, Point2D pt) -> double"""
1462 return _core_.Point2D_GetDistanceSquare(*args, **kwargs)
1463
1464 def GetDotProduct(*args, **kwargs):
1465 """GetDotProduct(self, Point2D vec) -> double"""
1466 return _core_.Point2D_GetDotProduct(*args, **kwargs)
1467
1468 def GetCrossProduct(*args, **kwargs):
1469 """GetCrossProduct(self, Point2D vec) -> double"""
1470 return _core_.Point2D_GetCrossProduct(*args, **kwargs)
1471
1472 def __neg__(*args, **kwargs):
1473 """
1474 __neg__(self) -> Point2D
1475
1476 the reflection of this point
1477 """
1478 return _core_.Point2D___neg__(*args, **kwargs)
1479
1480 def __iadd__(*args, **kwargs):
1481 """__iadd__(self, Point2D pt) -> Point2D"""
1482 return _core_.Point2D___iadd__(*args, **kwargs)
1483
1484 def __isub__(*args, **kwargs):
1485 """__isub__(self, Point2D pt) -> Point2D"""
1486 return _core_.Point2D___isub__(*args, **kwargs)
1487
1488 def __imul__(*args, **kwargs):
1489 """__imul__(self, Point2D pt) -> Point2D"""
1490 return _core_.Point2D___imul__(*args, **kwargs)
1491
1492 def __idiv__(*args, **kwargs):
1493 """__idiv__(self, Point2D pt) -> Point2D"""
1494 return _core_.Point2D___idiv__(*args, **kwargs)
1495
1496 def __eq__(*args, **kwargs):
1497 """
1498 __eq__(self, Point2D pt) -> bool
1499
1500 Test for equality
1501 """
1502 return _core_.Point2D___eq__(*args, **kwargs)
1503
1504 def __ne__(*args, **kwargs):
1505 """
1506 __ne__(self, Point2D pt) -> bool
1507
1508 Test for inequality
1509 """
1510 return _core_.Point2D___ne__(*args, **kwargs)
1511
1512 x = property(_core_.Point2D_x_get, _core_.Point2D_x_set)
1513 y = property(_core_.Point2D_y_get, _core_.Point2D_y_set)
1514 def Set(*args, **kwargs):
1515 """Set(self, double x=0, double y=0)"""
1516 return _core_.Point2D_Set(*args, **kwargs)
1517
1518 def Get(*args, **kwargs):
1519 """
1520 Get() -> (x,y)
1521
1522 Return x and y properties as a tuple.
1523 """
1524 return _core_.Point2D_Get(*args, **kwargs)
1525
79fccf9d 1526 asTuple = wx._deprecated(Get, "asTuple is deprecated, use `Get` instead")
d55e5bfc
RD
1527 def __str__(self): return str(self.Get())
1528 def __repr__(self): return 'wx.Point2D'+str(self.Get())
1529 def __len__(self): return len(self.Get())
1530 def __getitem__(self, index): return self.Get()[index]
1531 def __setitem__(self, index, val):
1532 if index == 0: self.x = val
1533 elif index == 1: self.y = val
1534 else: raise IndexError
1535 def __nonzero__(self): return self.Get() != (0.0, 0.0)
1536 __safe_for_unpickling__ = True
1537 def __reduce__(self): return (wx.Point2D, self.Get())
1538
1539
1540class Point2DPtr(Point2D):
1541 def __init__(self, this):
1542 self.this = this
1543 if not hasattr(self,"thisown"): self.thisown = 0
1544 self.__class__ = Point2D
1545_core_.Point2D_swigregister(Point2DPtr)
1546
1547def Point2DCopy(*args, **kwargs):
1548 """
1549 Point2DCopy(Point2D pt) -> Point2D
1550
1551 Create a w.Point2D object.
1552 """
1553 val = _core_.new_Point2DCopy(*args, **kwargs)
1554 val.thisown = 1
1555 return val
1556
1557def Point2DFromPoint(*args, **kwargs):
1558 """
1559 Point2DFromPoint(Point pt) -> Point2D
1560
1561 Create a w.Point2D object.
1562 """
1563 val = _core_.new_Point2DFromPoint(*args, **kwargs)
1564 val.thisown = 1
1565 return val
1566
1567#---------------------------------------------------------------------------
1568
1569FromStart = _core_.FromStart
1570FromCurrent = _core_.FromCurrent
1571FromEnd = _core_.FromEnd
1572class InputStream(object):
093d3ff1 1573 """Proxy of C++ InputStream class"""
d55e5bfc
RD
1574 def __repr__(self):
1575 return "<%s.%s; proxy of C++ wxPyInputStream instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
1576 def __init__(self, *args, **kwargs):
1577 """__init__(self, PyObject p) -> InputStream"""
1578 newobj = _core_.new_InputStream(*args, **kwargs)
1579 self.this = newobj.this
1580 self.thisown = 1
1581 del newobj.thisown
8fb0e70a
RD
1582 def __del__(self, destroy=_core_.delete_InputStream):
1583 """__del__(self)"""
1584 try:
1585 if self.thisown: destroy(self)
1586 except: pass
1587
d55e5bfc
RD
1588 def close(*args, **kwargs):
1589 """close(self)"""
1590 return _core_.InputStream_close(*args, **kwargs)
1591
1592 def flush(*args, **kwargs):
1593 """flush(self)"""
1594 return _core_.InputStream_flush(*args, **kwargs)
1595
1596 def eof(*args, **kwargs):
1597 """eof(self) -> bool"""
1598 return _core_.InputStream_eof(*args, **kwargs)
1599
1600 def read(*args, **kwargs):
1601 """read(self, int size=-1) -> PyObject"""
1602 return _core_.InputStream_read(*args, **kwargs)
1603
1604 def readline(*args, **kwargs):
1605 """readline(self, int size=-1) -> PyObject"""
1606 return _core_.InputStream_readline(*args, **kwargs)
1607
1608 def readlines(*args, **kwargs):
1609 """readlines(self, int sizehint=-1) -> PyObject"""
1610 return _core_.InputStream_readlines(*args, **kwargs)
1611
1612 def seek(*args, **kwargs):
1613 """seek(self, int offset, int whence=0)"""
1614 return _core_.InputStream_seek(*args, **kwargs)
1615
1616 def tell(*args, **kwargs):
1617 """tell(self) -> int"""
1618 return _core_.InputStream_tell(*args, **kwargs)
1619
1620 def Peek(*args, **kwargs):
1621 """Peek(self) -> char"""
1622 return _core_.InputStream_Peek(*args, **kwargs)
1623
1624 def GetC(*args, **kwargs):
1625 """GetC(self) -> char"""
1626 return _core_.InputStream_GetC(*args, **kwargs)
1627
1628 def LastRead(*args, **kwargs):
1629 """LastRead(self) -> size_t"""
1630 return _core_.InputStream_LastRead(*args, **kwargs)
1631
1632 def CanRead(*args, **kwargs):
1633 """CanRead(self) -> bool"""
1634 return _core_.InputStream_CanRead(*args, **kwargs)
1635
1636 def Eof(*args, **kwargs):
1637 """Eof(self) -> bool"""
1638 return _core_.InputStream_Eof(*args, **kwargs)
1639
1640 def Ungetch(*args, **kwargs):
1641 """Ungetch(self, char c) -> bool"""
1642 return _core_.InputStream_Ungetch(*args, **kwargs)
1643
1644 def SeekI(*args, **kwargs):
1645 """SeekI(self, long pos, int mode=FromStart) -> long"""
1646 return _core_.InputStream_SeekI(*args, **kwargs)
1647
1648 def TellI(*args, **kwargs):
1649 """TellI(self) -> long"""
1650 return _core_.InputStream_TellI(*args, **kwargs)
1651
1652
1653class InputStreamPtr(InputStream):
1654 def __init__(self, this):
1655 self.this = this
1656 if not hasattr(self,"thisown"): self.thisown = 0
1657 self.__class__ = InputStream
1658_core_.InputStream_swigregister(InputStreamPtr)
1659DefaultPosition = cvar.DefaultPosition
1660DefaultSize = cvar.DefaultSize
1661
1662class OutputStream(object):
093d3ff1 1663 """Proxy of C++ OutputStream class"""
d55e5bfc
RD
1664 def __init__(self): raise RuntimeError, "No constructor defined"
1665 def __repr__(self):
1666 return "<%s.%s; proxy of C++ wxOutputStream instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
1667 def write(*args, **kwargs):
1668 """write(self, PyObject obj)"""
1669 return _core_.OutputStream_write(*args, **kwargs)
1670
1671
1672class OutputStreamPtr(OutputStream):
1673 def __init__(self, this):
1674 self.this = this
1675 if not hasattr(self,"thisown"): self.thisown = 0
1676 self.__class__ = OutputStream
1677_core_.OutputStream_swigregister(OutputStreamPtr)
1678
1679#---------------------------------------------------------------------------
1680
1681class FSFile(Object):
093d3ff1 1682 """Proxy of C++ FSFile class"""
d55e5bfc
RD
1683 def __repr__(self):
1684 return "<%s.%s; proxy of C++ wxFSFile instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
1685 def __init__(self, *args, **kwargs):
1686 """
1687 __init__(self, InputStream stream, String loc, String mimetype, String anchor,
1688 DateTime modif) -> FSFile
1689 """
1690 newobj = _core_.new_FSFile(*args, **kwargs)
1691 self.this = newobj.this
1692 self.thisown = 1
1693 del newobj.thisown
4cf4100f
RD
1694 self.thisown = 0 # It will normally be deleted by the user of the wxFileSystem
1695
d55e5bfc
RD
1696 def __del__(self, destroy=_core_.delete_FSFile):
1697 """__del__(self)"""
1698 try:
1699 if self.thisown: destroy(self)
1700 except: pass
1701
1702 def GetStream(*args, **kwargs):
1703 """GetStream(self) -> InputStream"""
1704 return _core_.FSFile_GetStream(*args, **kwargs)
1705
1706 def GetMimeType(*args, **kwargs):
1707 """GetMimeType(self) -> String"""
1708 return _core_.FSFile_GetMimeType(*args, **kwargs)
1709
1710 def GetLocation(*args, **kwargs):
1711 """GetLocation(self) -> String"""
1712 return _core_.FSFile_GetLocation(*args, **kwargs)
1713
1714 def GetAnchor(*args, **kwargs):
1715 """GetAnchor(self) -> String"""
1716 return _core_.FSFile_GetAnchor(*args, **kwargs)
1717
1718 def GetModificationTime(*args, **kwargs):
1719 """GetModificationTime(self) -> DateTime"""
1720 return _core_.FSFile_GetModificationTime(*args, **kwargs)
1721
1722
1723class FSFilePtr(FSFile):
1724 def __init__(self, this):
1725 self.this = this
1726 if not hasattr(self,"thisown"): self.thisown = 0
1727 self.__class__ = FSFile
1728_core_.FSFile_swigregister(FSFilePtr)
1729
1730class CPPFileSystemHandler(object):
093d3ff1 1731 """Proxy of C++ CPPFileSystemHandler class"""
d55e5bfc
RD
1732 def __init__(self): raise RuntimeError, "No constructor defined"
1733 def __repr__(self):
1734 return "<%s.%s; proxy of C++ wxFileSystemHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
1735
1736class CPPFileSystemHandlerPtr(CPPFileSystemHandler):
1737 def __init__(self, this):
1738 self.this = this
1739 if not hasattr(self,"thisown"): self.thisown = 0
1740 self.__class__ = CPPFileSystemHandler
1741_core_.CPPFileSystemHandler_swigregister(CPPFileSystemHandlerPtr)
1742
1743class FileSystemHandler(CPPFileSystemHandler):
093d3ff1 1744 """Proxy of C++ FileSystemHandler class"""
d55e5bfc
RD
1745 def __repr__(self):
1746 return "<%s.%s; proxy of C++ wxPyFileSystemHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
1747 def __init__(self, *args, **kwargs):
1748 """__init__(self) -> FileSystemHandler"""
1749 newobj = _core_.new_FileSystemHandler(*args, **kwargs)
1750 self.this = newobj.this
1751 self.thisown = 1
1752 del newobj.thisown
1753 self._setCallbackInfo(self, FileSystemHandler)
1754
1755 def _setCallbackInfo(*args, **kwargs):
1756 """_setCallbackInfo(self, PyObject self, PyObject _class)"""
1757 return _core_.FileSystemHandler__setCallbackInfo(*args, **kwargs)
1758
1759 def CanOpen(*args, **kwargs):
1760 """CanOpen(self, String location) -> bool"""
1761 return _core_.FileSystemHandler_CanOpen(*args, **kwargs)
1762
1763 def OpenFile(*args, **kwargs):
1764 """OpenFile(self, FileSystem fs, String location) -> FSFile"""
1765 return _core_.FileSystemHandler_OpenFile(*args, **kwargs)
1766
1767 def FindFirst(*args, **kwargs):
1768 """FindFirst(self, String spec, int flags=0) -> String"""
1769 return _core_.FileSystemHandler_FindFirst(*args, **kwargs)
1770
1771 def FindNext(*args, **kwargs):
1772 """FindNext(self) -> String"""
1773 return _core_.FileSystemHandler_FindNext(*args, **kwargs)
1774
1775 def GetProtocol(*args, **kwargs):
1776 """GetProtocol(self, String location) -> String"""
1777 return _core_.FileSystemHandler_GetProtocol(*args, **kwargs)
1778
1779 def GetLeftLocation(*args, **kwargs):
1780 """GetLeftLocation(self, String location) -> String"""
1781 return _core_.FileSystemHandler_GetLeftLocation(*args, **kwargs)
1782
1783 def GetAnchor(*args, **kwargs):
1784 """GetAnchor(self, String location) -> String"""
1785 return _core_.FileSystemHandler_GetAnchor(*args, **kwargs)
1786
1787 def GetRightLocation(*args, **kwargs):
1788 """GetRightLocation(self, String location) -> String"""
1789 return _core_.FileSystemHandler_GetRightLocation(*args, **kwargs)
1790
1791 def GetMimeTypeFromExt(*args, **kwargs):
1792 """GetMimeTypeFromExt(self, String location) -> String"""
1793 return _core_.FileSystemHandler_GetMimeTypeFromExt(*args, **kwargs)
1794
1795
1796class FileSystemHandlerPtr(FileSystemHandler):
1797 def __init__(self, this):
1798 self.this = this
1799 if not hasattr(self,"thisown"): self.thisown = 0
1800 self.__class__ = FileSystemHandler
1801_core_.FileSystemHandler_swigregister(FileSystemHandlerPtr)
1802
1803class FileSystem(Object):
093d3ff1 1804 """Proxy of C++ FileSystem class"""
d55e5bfc
RD
1805 def __repr__(self):
1806 return "<%s.%s; proxy of C++ wxFileSystem instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
1807 def __init__(self, *args, **kwargs):
1808 """__init__(self) -> FileSystem"""
1809 newobj = _core_.new_FileSystem(*args, **kwargs)
1810 self.this = newobj.this
1811 self.thisown = 1
1812 del newobj.thisown
1813 def __del__(self, destroy=_core_.delete_FileSystem):
1814 """__del__(self)"""
1815 try:
1816 if self.thisown: destroy(self)
1817 except: pass
1818
1819 def ChangePathTo(*args, **kwargs):
1820 """ChangePathTo(self, String location, bool is_dir=False)"""
1821 return _core_.FileSystem_ChangePathTo(*args, **kwargs)
1822
1823 def GetPath(*args, **kwargs):
1824 """GetPath(self) -> String"""
1825 return _core_.FileSystem_GetPath(*args, **kwargs)
1826
1827 def OpenFile(*args, **kwargs):
1828 """OpenFile(self, String location) -> FSFile"""
1829 return _core_.FileSystem_OpenFile(*args, **kwargs)
1830
1831 def FindFirst(*args, **kwargs):
1832 """FindFirst(self, String spec, int flags=0) -> String"""
1833 return _core_.FileSystem_FindFirst(*args, **kwargs)
1834
1835 def FindNext(*args, **kwargs):
1836 """FindNext(self) -> String"""
1837 return _core_.FileSystem_FindNext(*args, **kwargs)
1838
1839 def AddHandler(*args, **kwargs):
c24da6d6 1840 """AddHandler(CPPFileSystemHandler handler)"""
d55e5bfc
RD
1841 return _core_.FileSystem_AddHandler(*args, **kwargs)
1842
1843 AddHandler = staticmethod(AddHandler)
1844 def CleanUpHandlers(*args, **kwargs):
c24da6d6 1845 """CleanUpHandlers()"""
d55e5bfc
RD
1846 return _core_.FileSystem_CleanUpHandlers(*args, **kwargs)
1847
1848 CleanUpHandlers = staticmethod(CleanUpHandlers)
1849 def FileNameToURL(*args, **kwargs):
c24da6d6 1850 """FileNameToURL(String filename) -> String"""
d55e5bfc
RD
1851 return _core_.FileSystem_FileNameToURL(*args, **kwargs)
1852
1853 FileNameToURL = staticmethod(FileNameToURL)
ae8162c8
RD
1854 def URLToFileName(*args, **kwargs):
1855 """URLToFileName(String url) -> String"""
1856 return _core_.FileSystem_URLToFileName(*args, **kwargs)
1857
1858 URLToFileName = staticmethod(URLToFileName)
d55e5bfc
RD
1859
1860class FileSystemPtr(FileSystem):
1861 def __init__(self, this):
1862 self.this = this
1863 if not hasattr(self,"thisown"): self.thisown = 0
1864 self.__class__ = FileSystem
1865_core_.FileSystem_swigregister(FileSystemPtr)
1866
1867def FileSystem_AddHandler(*args, **kwargs):
1868 """FileSystem_AddHandler(CPPFileSystemHandler handler)"""
1869 return _core_.FileSystem_AddHandler(*args, **kwargs)
1870
1871def FileSystem_CleanUpHandlers(*args, **kwargs):
1872 """FileSystem_CleanUpHandlers()"""
1873 return _core_.FileSystem_CleanUpHandlers(*args, **kwargs)
1874
1875def FileSystem_FileNameToURL(*args, **kwargs):
1876 """FileSystem_FileNameToURL(String filename) -> String"""
1877 return _core_.FileSystem_FileNameToURL(*args, **kwargs)
1878
d55e5bfc
RD
1879def FileSystem_URLToFileName(*args, **kwargs):
1880 """FileSystem_URLToFileName(String url) -> String"""
1881 return _core_.FileSystem_URLToFileName(*args, **kwargs)
ae8162c8 1882
d55e5bfc 1883class InternetFSHandler(CPPFileSystemHandler):
093d3ff1 1884 """Proxy of C++ InternetFSHandler class"""
d55e5bfc
RD
1885 def __repr__(self):
1886 return "<%s.%s; proxy of C++ wxInternetFSHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
1887 def __init__(self, *args, **kwargs):
1888 """__init__(self) -> InternetFSHandler"""
1889 newobj = _core_.new_InternetFSHandler(*args, **kwargs)
1890 self.this = newobj.this
1891 self.thisown = 1
1892 del newobj.thisown
1893 def CanOpen(*args, **kwargs):
1894 """CanOpen(self, String location) -> bool"""
1895 return _core_.InternetFSHandler_CanOpen(*args, **kwargs)
1896
1897 def OpenFile(*args, **kwargs):
1898 """OpenFile(self, FileSystem fs, String location) -> FSFile"""
1899 return _core_.InternetFSHandler_OpenFile(*args, **kwargs)
1900
1901
1902class InternetFSHandlerPtr(InternetFSHandler):
1903 def __init__(self, this):
1904 self.this = this
1905 if not hasattr(self,"thisown"): self.thisown = 0
1906 self.__class__ = InternetFSHandler
1907_core_.InternetFSHandler_swigregister(InternetFSHandlerPtr)
1908
1909class ZipFSHandler(CPPFileSystemHandler):
093d3ff1 1910 """Proxy of C++ ZipFSHandler class"""
d55e5bfc
RD
1911 def __repr__(self):
1912 return "<%s.%s; proxy of C++ wxZipFSHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
1913 def __init__(self, *args, **kwargs):
1914 """__init__(self) -> ZipFSHandler"""
1915 newobj = _core_.new_ZipFSHandler(*args, **kwargs)
1916 self.this = newobj.this
1917 self.thisown = 1
1918 del newobj.thisown
1919 def CanOpen(*args, **kwargs):
1920 """CanOpen(self, String location) -> bool"""
1921 return _core_.ZipFSHandler_CanOpen(*args, **kwargs)
1922
1923 def OpenFile(*args, **kwargs):
1924 """OpenFile(self, FileSystem fs, String location) -> FSFile"""
1925 return _core_.ZipFSHandler_OpenFile(*args, **kwargs)
1926
1927 def FindFirst(*args, **kwargs):
1928 """FindFirst(self, String spec, int flags=0) -> String"""
1929 return _core_.ZipFSHandler_FindFirst(*args, **kwargs)
1930
1931 def FindNext(*args, **kwargs):
1932 """FindNext(self) -> String"""
1933 return _core_.ZipFSHandler_FindNext(*args, **kwargs)
1934
1935
1936class ZipFSHandlerPtr(ZipFSHandler):
1937 def __init__(self, this):
1938 self.this = this
1939 if not hasattr(self,"thisown"): self.thisown = 0
1940 self.__class__ = ZipFSHandler
1941_core_.ZipFSHandler_swigregister(ZipFSHandlerPtr)
1942
1943
1944def __wxMemoryFSHandler_AddFile_wxImage(*args, **kwargs):
1945 """__wxMemoryFSHandler_AddFile_wxImage(String filename, Image image, long type)"""
1946 return _core_.__wxMemoryFSHandler_AddFile_wxImage(*args, **kwargs)
1947
1948def __wxMemoryFSHandler_AddFile_wxBitmap(*args, **kwargs):
1949 """__wxMemoryFSHandler_AddFile_wxBitmap(String filename, Bitmap bitmap, long type)"""
1950 return _core_.__wxMemoryFSHandler_AddFile_wxBitmap(*args, **kwargs)
1951
1952def __wxMemoryFSHandler_AddFile_Data(*args, **kwargs):
1953 """__wxMemoryFSHandler_AddFile_Data(String filename, PyObject data)"""
1954 return _core_.__wxMemoryFSHandler_AddFile_Data(*args, **kwargs)
ae8162c8
RD
1955def MemoryFSHandler_AddFile(filename, dataItem, imgType=-1):
1956 """
1957 Add 'file' to the memory filesystem. The dataItem parameter can
1958 either be a `wx.Bitmap`, `wx.Image` or a string that can contain
1959 arbitrary data. If a bitmap or image is used then the imgType
1960 parameter should specify what kind of image file it should be
1961 written as, wx.BITMAP_TYPE_PNG, etc.
1962 """
1963 if isinstance(dataItem, wx.Image):
1964 __wxMemoryFSHandler_AddFile_wxImage(filename, dataItem, imgType)
1965 elif isinstance(dataItem, wx.Bitmap):
1966 __wxMemoryFSHandler_AddFile_wxBitmap(filename, dataItem, imgType)
1967 elif type(dataItem) == str:
1968 __wxMemoryFSHandler_AddFile_Data(filename, dataItem)
1969 else:
1970 raise TypeError, 'wx.Image, wx.Bitmap or string expected'
d55e5bfc
RD
1971
1972class MemoryFSHandler(CPPFileSystemHandler):
093d3ff1 1973 """Proxy of C++ MemoryFSHandler class"""
d55e5bfc
RD
1974 def __repr__(self):
1975 return "<%s.%s; proxy of C++ wxMemoryFSHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
1976 def __init__(self, *args, **kwargs):
1977 """__init__(self) -> MemoryFSHandler"""
1978 newobj = _core_.new_MemoryFSHandler(*args, **kwargs)
1979 self.this = newobj.this
1980 self.thisown = 1
1981 del newobj.thisown
1982 def RemoveFile(*args, **kwargs):
c24da6d6 1983 """RemoveFile(String filename)"""
d55e5bfc
RD
1984 return _core_.MemoryFSHandler_RemoveFile(*args, **kwargs)
1985
1986 RemoveFile = staticmethod(RemoveFile)
1987 AddFile = staticmethod(MemoryFSHandler_AddFile)
1988 def CanOpen(*args, **kwargs):
1989 """CanOpen(self, String location) -> bool"""
1990 return _core_.MemoryFSHandler_CanOpen(*args, **kwargs)
1991
1992 def OpenFile(*args, **kwargs):
1993 """OpenFile(self, FileSystem fs, String location) -> FSFile"""
1994 return _core_.MemoryFSHandler_OpenFile(*args, **kwargs)
1995
1996 def FindFirst(*args, **kwargs):
1997 """FindFirst(self, String spec, int flags=0) -> String"""
1998 return _core_.MemoryFSHandler_FindFirst(*args, **kwargs)
1999
2000 def FindNext(*args, **kwargs):
2001 """FindNext(self) -> String"""
2002 return _core_.MemoryFSHandler_FindNext(*args, **kwargs)
2003
2004
2005class MemoryFSHandlerPtr(MemoryFSHandler):
2006 def __init__(self, this):
2007 self.this = this
2008 if not hasattr(self,"thisown"): self.thisown = 0
2009 self.__class__ = MemoryFSHandler
2010_core_.MemoryFSHandler_swigregister(MemoryFSHandlerPtr)
2011
2012def MemoryFSHandler_RemoveFile(*args, **kwargs):
2013 """MemoryFSHandler_RemoveFile(String filename)"""
2014 return _core_.MemoryFSHandler_RemoveFile(*args, **kwargs)
2015
2016#---------------------------------------------------------------------------
2017
2018class ImageHandler(Object):
093d3ff1 2019 """Proxy of C++ ImageHandler class"""
d55e5bfc
RD
2020 def __init__(self): raise RuntimeError, "No constructor defined"
2021 def __repr__(self):
2022 return "<%s.%s; proxy of C++ wxImageHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
2023 def GetName(*args, **kwargs):
2024 """GetName(self) -> String"""
2025 return _core_.ImageHandler_GetName(*args, **kwargs)
2026
2027 def GetExtension(*args, **kwargs):
2028 """GetExtension(self) -> String"""
2029 return _core_.ImageHandler_GetExtension(*args, **kwargs)
2030
2031 def GetType(*args, **kwargs):
2032 """GetType(self) -> long"""
2033 return _core_.ImageHandler_GetType(*args, **kwargs)
2034
2035 def GetMimeType(*args, **kwargs):
2036 """GetMimeType(self) -> String"""
2037 return _core_.ImageHandler_GetMimeType(*args, **kwargs)
2038
2039 def CanRead(*args, **kwargs):
2040 """CanRead(self, String name) -> bool"""
2041 return _core_.ImageHandler_CanRead(*args, **kwargs)
2042
2043 def SetName(*args, **kwargs):
2044 """SetName(self, String name)"""
2045 return _core_.ImageHandler_SetName(*args, **kwargs)
2046
2047 def SetExtension(*args, **kwargs):
2048 """SetExtension(self, String extension)"""
2049 return _core_.ImageHandler_SetExtension(*args, **kwargs)
2050
2051 def SetType(*args, **kwargs):
2052 """SetType(self, long type)"""
2053 return _core_.ImageHandler_SetType(*args, **kwargs)
2054
2055 def SetMimeType(*args, **kwargs):
2056 """SetMimeType(self, String mimetype)"""
2057 return _core_.ImageHandler_SetMimeType(*args, **kwargs)
2058
2059
2060class ImageHandlerPtr(ImageHandler):
2061 def __init__(self, this):
2062 self.this = this
2063 if not hasattr(self,"thisown"): self.thisown = 0
2064 self.__class__ = ImageHandler
2065_core_.ImageHandler_swigregister(ImageHandlerPtr)
2066
2067class ImageHistogram(object):
093d3ff1 2068 """Proxy of C++ ImageHistogram class"""
d55e5bfc
RD
2069 def __repr__(self):
2070 return "<%s.%s; proxy of C++ wxImageHistogram instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
2071 def __init__(self, *args, **kwargs):
2072 """__init__(self) -> ImageHistogram"""
2073 newobj = _core_.new_ImageHistogram(*args, **kwargs)
2074 self.this = newobj.this
2075 self.thisown = 1
2076 del newobj.thisown
2077 def MakeKey(*args, **kwargs):
2078 """
c24da6d6 2079 MakeKey(unsigned char r, unsigned char g, unsigned char b) -> unsigned long
d55e5bfc
RD
2080
2081 Get the key in the histogram for the given RGB values
2082 """
2083 return _core_.ImageHistogram_MakeKey(*args, **kwargs)
2084
2085 MakeKey = staticmethod(MakeKey)
2086 def FindFirstUnusedColour(*args, **kwargs):
a8eff060
RD
2087 """
2088 FindFirstUnusedColour(int startR=1, int startG=0, int startB=0) -> (success, r, g, b)
2089
2090 Find first colour that is not used in the image and has higher RGB
2091 values than startR, startG, startB. Returns a tuple consisting of a
2092 success flag and rgb values.
2093 """
d55e5bfc
RD
2094 return _core_.ImageHistogram_FindFirstUnusedColour(*args, **kwargs)
2095
2096
2097class ImageHistogramPtr(ImageHistogram):
2098 def __init__(self, this):
2099 self.this = this
2100 if not hasattr(self,"thisown"): self.thisown = 0
2101 self.__class__ = ImageHistogram
2102_core_.ImageHistogram_swigregister(ImageHistogramPtr)
2103
2104def ImageHistogram_MakeKey(*args, **kwargs):
2105 """
2106 ImageHistogram_MakeKey(unsigned char r, unsigned char g, unsigned char b) -> unsigned long
2107
2108 Get the key in the histogram for the given RGB values
2109 """
2110 return _core_.ImageHistogram_MakeKey(*args, **kwargs)
2111
2112class Image(Object):
093d3ff1 2113 """Proxy of C++ Image class"""
d55e5bfc
RD
2114 def __repr__(self):
2115 return "<%s.%s; proxy of C++ wxImage instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
2116 def __init__(self, *args, **kwargs):
2117 """__init__(self, String name, long type=BITMAP_TYPE_ANY, int index=-1) -> Image"""
2118 newobj = _core_.new_Image(*args, **kwargs)
2119 self.this = newobj.this
2120 self.thisown = 1
2121 del newobj.thisown
2122 def __del__(self, destroy=_core_.delete_Image):
2123 """__del__(self)"""
2124 try:
2125 if self.thisown: destroy(self)
2126 except: pass
2127
2128 def Create(*args, **kwargs):
2129 """Create(self, int width, int height)"""
2130 return _core_.Image_Create(*args, **kwargs)
2131
2132 def Destroy(*args, **kwargs):
2133 """
2134 Destroy(self)
2135
2136 Deletes the C++ object this Python object is a proxy for.
2137 """
2138 return _core_.Image_Destroy(*args, **kwargs)
2139
2140 def Scale(*args, **kwargs):
2141 """Scale(self, int width, int height) -> Image"""
2142 return _core_.Image_Scale(*args, **kwargs)
2143
2144 def ShrinkBy(*args, **kwargs):
2145 """ShrinkBy(self, int xFactor, int yFactor) -> Image"""
2146 return _core_.Image_ShrinkBy(*args, **kwargs)
2147
2148 def Rescale(*args, **kwargs):
2149 """Rescale(self, int width, int height) -> Image"""
2150 return _core_.Image_Rescale(*args, **kwargs)
2151
2152 def SetRGB(*args, **kwargs):
2153 """SetRGB(self, int x, int y, unsigned char r, unsigned char g, unsigned char b)"""
2154 return _core_.Image_SetRGB(*args, **kwargs)
2155
2156 def GetRed(*args, **kwargs):
2157 """GetRed(self, int x, int y) -> unsigned char"""
2158 return _core_.Image_GetRed(*args, **kwargs)
2159
2160 def GetGreen(*args, **kwargs):
2161 """GetGreen(self, int x, int y) -> unsigned char"""
2162 return _core_.Image_GetGreen(*args, **kwargs)
2163
2164 def GetBlue(*args, **kwargs):
2165 """GetBlue(self, int x, int y) -> unsigned char"""
2166 return _core_.Image_GetBlue(*args, **kwargs)
2167
2168 def SetAlpha(*args, **kwargs):
2169 """SetAlpha(self, int x, int y, unsigned char alpha)"""
2170 return _core_.Image_SetAlpha(*args, **kwargs)
2171
2172 def GetAlpha(*args, **kwargs):
2173 """GetAlpha(self, int x, int y) -> unsigned char"""
2174 return _core_.Image_GetAlpha(*args, **kwargs)
2175
2176 def HasAlpha(*args, **kwargs):
2177 """HasAlpha(self) -> bool"""
2178 return _core_.Image_HasAlpha(*args, **kwargs)
2179
2180 def FindFirstUnusedColour(*args, **kwargs):
a8eff060
RD
2181 """
2182 FindFirstUnusedColour(int startR=1, int startG=0, int startB=0) -> (success, r, g, b)
2183
2184 Find first colour that is not used in the image and has higher RGB
2185 values than startR, startG, startB. Returns a tuple consisting of a
2186 success flag and rgb values.
2187 """
d55e5bfc
RD
2188 return _core_.Image_FindFirstUnusedColour(*args, **kwargs)
2189
4cf4100f
RD
2190 def ConvertAlphaToMask(*args, **kwargs):
2191 """
2192 ConvertAlphaToMask(self, byte threshold=128) -> bool
2193
2194 If the image has alpha channel, this method converts it to mask. All pixels
2195 with alpha value less than ``threshold`` are replaced with mask colour and the
2196 alpha channel is removed. Mask colour is chosen automatically using
2197 `FindFirstUnusedColour`.
2198
2199 If the image image doesn't have alpha channel, ConvertAlphaToMask does
2200 nothing.
2201 """
2202 return _core_.Image_ConvertAlphaToMask(*args, **kwargs)
2203
8fb0e70a
RD
2204 def ConvertColourToAlpha(*args, **kwargs):
2205 """
2206 ConvertColourToAlpha(self, unsigned char r, unsigned char g, unsigned char b) -> bool
2207
2208 This method converts an image where the original alpha information is
2209 only available as a shades of a colour (actually shades of grey)
2210 typically when you draw anti-aliased text into a bitmap. The DC
2211 drawing routines draw grey values on the black background although
2212 they actually mean to draw white with differnt alpha values. This
2213 method reverses it, assuming a black (!) background and white text.
2214 The method will then fill up the whole image with the colour given.
2215 """
2216 return _core_.Image_ConvertColourToAlpha(*args, **kwargs)
2217
d55e5bfc
RD
2218 def SetMaskFromImage(*args, **kwargs):
2219 """SetMaskFromImage(self, Image mask, byte mr, byte mg, byte mb) -> bool"""
2220 return _core_.Image_SetMaskFromImage(*args, **kwargs)
2221
2222 def CanRead(*args, **kwargs):
c24da6d6 2223 """CanRead(String name) -> bool"""
d55e5bfc
RD
2224 return _core_.Image_CanRead(*args, **kwargs)
2225
2226 CanRead = staticmethod(CanRead)
2227 def GetImageCount(*args, **kwargs):
c24da6d6 2228 """GetImageCount(String name, long type=BITMAP_TYPE_ANY) -> int"""
d55e5bfc
RD
2229 return _core_.Image_GetImageCount(*args, **kwargs)
2230
2231 GetImageCount = staticmethod(GetImageCount)
2232 def LoadFile(*args, **kwargs):
2233 """LoadFile(self, String name, long type=BITMAP_TYPE_ANY, int index=-1) -> bool"""
2234 return _core_.Image_LoadFile(*args, **kwargs)
2235
2236 def LoadMimeFile(*args, **kwargs):
2237 """LoadMimeFile(self, String name, String mimetype, int index=-1) -> bool"""
2238 return _core_.Image_LoadMimeFile(*args, **kwargs)
2239
2240 def SaveFile(*args, **kwargs):
2241 """SaveFile(self, String name, int type) -> bool"""
2242 return _core_.Image_SaveFile(*args, **kwargs)
2243
2244 def SaveMimeFile(*args, **kwargs):
2245 """SaveMimeFile(self, String name, String mimetype) -> bool"""
2246 return _core_.Image_SaveMimeFile(*args, **kwargs)
2247
2248 def CanReadStream(*args, **kwargs):
c24da6d6 2249 """CanReadStream(InputStream stream) -> bool"""
d55e5bfc
RD
2250 return _core_.Image_CanReadStream(*args, **kwargs)
2251
2252 CanReadStream = staticmethod(CanReadStream)
2253 def LoadStream(*args, **kwargs):
2254 """LoadStream(self, InputStream stream, long type=BITMAP_TYPE_ANY, int index=-1) -> bool"""
2255 return _core_.Image_LoadStream(*args, **kwargs)
2256
2257 def LoadMimeStream(*args, **kwargs):
2258 """LoadMimeStream(self, InputStream stream, String mimetype, int index=-1) -> bool"""
2259 return _core_.Image_LoadMimeStream(*args, **kwargs)
2260
2261 def Ok(*args, **kwargs):
2262 """Ok(self) -> bool"""
2263 return _core_.Image_Ok(*args, **kwargs)
2264
2265 def GetWidth(*args, **kwargs):
2266 """GetWidth(self) -> int"""
2267 return _core_.Image_GetWidth(*args, **kwargs)
2268
2269 def GetHeight(*args, **kwargs):
2270 """GetHeight(self) -> int"""
2271 return _core_.Image_GetHeight(*args, **kwargs)
2272
2273 def GetSize(*args, **kwargs):
2274 """GetSize(self) -> Size"""
2275 return _core_.Image_GetSize(*args, **kwargs)
2276
2277 def GetSubImage(*args, **kwargs):
2278 """GetSubImage(self, Rect rect) -> Image"""
2279 return _core_.Image_GetSubImage(*args, **kwargs)
2280
2281 def Copy(*args, **kwargs):
2282 """Copy(self) -> Image"""
2283 return _core_.Image_Copy(*args, **kwargs)
2284
2285 def Paste(*args, **kwargs):
2286 """Paste(self, Image image, int x, int y)"""
2287 return _core_.Image_Paste(*args, **kwargs)
2288
2289 def GetData(*args, **kwargs):
2290 """GetData(self) -> PyObject"""
2291 return _core_.Image_GetData(*args, **kwargs)
2292
2293 def SetData(*args, **kwargs):
2294 """SetData(self, PyObject data)"""
2295 return _core_.Image_SetData(*args, **kwargs)
2296
2297 def GetDataBuffer(*args, **kwargs):
2298 """GetDataBuffer(self) -> PyObject"""
2299 return _core_.Image_GetDataBuffer(*args, **kwargs)
2300
2301 def SetDataBuffer(*args, **kwargs):
2302 """SetDataBuffer(self, PyObject data)"""
2303 return _core_.Image_SetDataBuffer(*args, **kwargs)
2304
2305 def GetAlphaData(*args, **kwargs):
2306 """GetAlphaData(self) -> PyObject"""
2307 return _core_.Image_GetAlphaData(*args, **kwargs)
2308
2309 def SetAlphaData(*args, **kwargs):
2310 """SetAlphaData(self, PyObject data)"""
2311 return _core_.Image_SetAlphaData(*args, **kwargs)
2312
2313 def GetAlphaBuffer(*args, **kwargs):
2314 """GetAlphaBuffer(self) -> PyObject"""
2315 return _core_.Image_GetAlphaBuffer(*args, **kwargs)
2316
2317 def SetAlphaBuffer(*args, **kwargs):
2318 """SetAlphaBuffer(self, PyObject data)"""
2319 return _core_.Image_SetAlphaBuffer(*args, **kwargs)
2320
2321 def SetMaskColour(*args, **kwargs):
2322 """SetMaskColour(self, unsigned char r, unsigned char g, unsigned char b)"""
2323 return _core_.Image_SetMaskColour(*args, **kwargs)
2324
2325 def GetMaskRed(*args, **kwargs):
2326 """GetMaskRed(self) -> unsigned char"""
2327 return _core_.Image_GetMaskRed(*args, **kwargs)
2328
2329 def GetMaskGreen(*args, **kwargs):
2330 """GetMaskGreen(self) -> unsigned char"""
2331 return _core_.Image_GetMaskGreen(*args, **kwargs)
2332
2333 def GetMaskBlue(*args, **kwargs):
2334 """GetMaskBlue(self) -> unsigned char"""
2335 return _core_.Image_GetMaskBlue(*args, **kwargs)
2336
2337 def SetMask(*args, **kwargs):
2338 """SetMask(self, bool mask=True)"""
2339 return _core_.Image_SetMask(*args, **kwargs)
2340
2341 def HasMask(*args, **kwargs):
2342 """HasMask(self) -> bool"""
2343 return _core_.Image_HasMask(*args, **kwargs)
2344
2345 def Rotate(*args, **kwargs):
2346 """
2347 Rotate(self, double angle, Point centre_of_rotation, bool interpolating=True,
2348 Point offset_after_rotation=None) -> Image
2349 """
2350 return _core_.Image_Rotate(*args, **kwargs)
2351
2352 def Rotate90(*args, **kwargs):
2353 """Rotate90(self, bool clockwise=True) -> Image"""
2354 return _core_.Image_Rotate90(*args, **kwargs)
2355
2356 def Mirror(*args, **kwargs):
2357 """Mirror(self, bool horizontally=True) -> Image"""
2358 return _core_.Image_Mirror(*args, **kwargs)
2359
2360 def Replace(*args, **kwargs):
2361 """
2362 Replace(self, unsigned char r1, unsigned char g1, unsigned char b1,
2363 unsigned char r2, unsigned char g2, unsigned char b2)
2364 """
2365 return _core_.Image_Replace(*args, **kwargs)
2366
2367 def ConvertToMono(*args, **kwargs):
2368 """ConvertToMono(self, unsigned char r, unsigned char g, unsigned char b) -> Image"""
2369 return _core_.Image_ConvertToMono(*args, **kwargs)
2370
2371 def SetOption(*args, **kwargs):
2372 """SetOption(self, String name, String value)"""
2373 return _core_.Image_SetOption(*args, **kwargs)
2374
2375 def SetOptionInt(*args, **kwargs):
2376 """SetOptionInt(self, String name, int value)"""
2377 return _core_.Image_SetOptionInt(*args, **kwargs)
2378
2379 def GetOption(*args, **kwargs):
2380 """GetOption(self, String name) -> String"""
2381 return _core_.Image_GetOption(*args, **kwargs)
2382
2383 def GetOptionInt(*args, **kwargs):
2384 """GetOptionInt(self, String name) -> int"""
2385 return _core_.Image_GetOptionInt(*args, **kwargs)
2386
2387 def HasOption(*args, **kwargs):
2388 """HasOption(self, String name) -> bool"""
2389 return _core_.Image_HasOption(*args, **kwargs)
2390
2391 def CountColours(*args, **kwargs):
2392 """CountColours(self, unsigned long stopafter=(unsigned long) -1) -> unsigned long"""
2393 return _core_.Image_CountColours(*args, **kwargs)
2394
2395 def ComputeHistogram(*args, **kwargs):
2396 """ComputeHistogram(self, ImageHistogram h) -> unsigned long"""
2397 return _core_.Image_ComputeHistogram(*args, **kwargs)
2398
2399 def AddHandler(*args, **kwargs):
c24da6d6 2400 """AddHandler(ImageHandler handler)"""
d55e5bfc
RD
2401 return _core_.Image_AddHandler(*args, **kwargs)
2402
2403 AddHandler = staticmethod(AddHandler)
2404 def InsertHandler(*args, **kwargs):
c24da6d6 2405 """InsertHandler(ImageHandler handler)"""
d55e5bfc
RD
2406 return _core_.Image_InsertHandler(*args, **kwargs)
2407
2408 InsertHandler = staticmethod(InsertHandler)
2409 def RemoveHandler(*args, **kwargs):
c24da6d6 2410 """RemoveHandler(String name) -> bool"""
d55e5bfc
RD
2411 return _core_.Image_RemoveHandler(*args, **kwargs)
2412
2413 RemoveHandler = staticmethod(RemoveHandler)
2414 def GetImageExtWildcard(*args, **kwargs):
c24da6d6 2415 """GetImageExtWildcard() -> String"""
d55e5bfc
RD
2416 return _core_.Image_GetImageExtWildcard(*args, **kwargs)
2417
2418 GetImageExtWildcard = staticmethod(GetImageExtWildcard)
2419 def ConvertToBitmap(*args, **kwargs):
1fbf26be 2420 """ConvertToBitmap(self, int depth=-1) -> Bitmap"""
d55e5bfc
RD
2421 return _core_.Image_ConvertToBitmap(*args, **kwargs)
2422
2423 def ConvertToMonoBitmap(*args, **kwargs):
2424 """ConvertToMonoBitmap(self, unsigned char red, unsigned char green, unsigned char blue) -> Bitmap"""
2425 return _core_.Image_ConvertToMonoBitmap(*args, **kwargs)
2426
2427 def __nonzero__(self): return self.Ok()
2428
2429class ImagePtr(Image):
2430 def __init__(self, this):
2431 self.this = this
2432 if not hasattr(self,"thisown"): self.thisown = 0
2433 self.__class__ = Image
2434_core_.Image_swigregister(ImagePtr)
2435
2436def ImageFromMime(*args, **kwargs):
2437 """ImageFromMime(String name, String mimetype, int index=-1) -> Image"""
2438 val = _core_.new_ImageFromMime(*args, **kwargs)
2439 val.thisown = 1
2440 return val
2441
2442def ImageFromStream(*args, **kwargs):
2443 """ImageFromStream(InputStream stream, long type=BITMAP_TYPE_ANY, int index=-1) -> Image"""
2444 val = _core_.new_ImageFromStream(*args, **kwargs)
2445 val.thisown = 1
2446 return val
2447
2448def ImageFromStreamMime(*args, **kwargs):
2449 """ImageFromStreamMime(InputStream stream, String mimetype, int index=-1) -> Image"""
2450 val = _core_.new_ImageFromStreamMime(*args, **kwargs)
2451 val.thisown = 1
2452 return val
2453
c24da6d6
RD
2454def EmptyImage(*args, **kwargs):
2455 """EmptyImage(int width=0, int height=0, bool clear=True) -> Image"""
2456 val = _core_.new_EmptyImage(*args, **kwargs)
d55e5bfc
RD
2457 val.thisown = 1
2458 return val
2459
2460def ImageFromBitmap(*args, **kwargs):
2461 """ImageFromBitmap(Bitmap bitmap) -> Image"""
2462 val = _core_.new_ImageFromBitmap(*args, **kwargs)
2463 val.thisown = 1
2464 return val
2465
2466def ImageFromData(*args, **kwargs):
2467 """ImageFromData(int width, int height, unsigned char data) -> Image"""
2468 val = _core_.new_ImageFromData(*args, **kwargs)
2469 val.thisown = 1
2470 return val
2471
c9c2cf70
RD
2472def ImageFromDataWithAlpha(*args, **kwargs):
2473 """ImageFromDataWithAlpha(int width, int height, unsigned char data, unsigned char alpha) -> Image"""
2474 val = _core_.new_ImageFromDataWithAlpha(*args, **kwargs)
2475 val.thisown = 1
2476 return val
2477
d55e5bfc
RD
2478def Image_CanRead(*args, **kwargs):
2479 """Image_CanRead(String name) -> bool"""
2480 return _core_.Image_CanRead(*args, **kwargs)
2481
2482def Image_GetImageCount(*args, **kwargs):
2483 """Image_GetImageCount(String name, long type=BITMAP_TYPE_ANY) -> int"""
2484 return _core_.Image_GetImageCount(*args, **kwargs)
2485
2486def Image_CanReadStream(*args, **kwargs):
2487 """Image_CanReadStream(InputStream stream) -> bool"""
2488 return _core_.Image_CanReadStream(*args, **kwargs)
2489
2490def Image_AddHandler(*args, **kwargs):
2491 """Image_AddHandler(ImageHandler handler)"""
2492 return _core_.Image_AddHandler(*args, **kwargs)
2493
2494def Image_InsertHandler(*args, **kwargs):
2495 """Image_InsertHandler(ImageHandler handler)"""
2496 return _core_.Image_InsertHandler(*args, **kwargs)
2497
2498def Image_RemoveHandler(*args, **kwargs):
2499 """Image_RemoveHandler(String name) -> bool"""
2500 return _core_.Image_RemoveHandler(*args, **kwargs)
2501
2502def Image_GetImageExtWildcard(*args, **kwargs):
2503 """Image_GetImageExtWildcard() -> String"""
2504 return _core_.Image_GetImageExtWildcard(*args, **kwargs)
2505
a07a67e6
RD
2506def InitAllImageHandlers():
2507 """
2508 The former functionality of InitAllImageHanders is now done internal to
2509 the _core_ extension module and so this function has become a simple NOP.
2510 """
2511 pass
d55e5bfc 2512
d55e5bfc
RD
2513IMAGE_RESOLUTION_INCHES = _core_.IMAGE_RESOLUTION_INCHES
2514IMAGE_RESOLUTION_CM = _core_.IMAGE_RESOLUTION_CM
2515BMP_24BPP = _core_.BMP_24BPP
2516BMP_8BPP = _core_.BMP_8BPP
2517BMP_8BPP_GREY = _core_.BMP_8BPP_GREY
2518BMP_8BPP_GRAY = _core_.BMP_8BPP_GRAY
2519BMP_8BPP_RED = _core_.BMP_8BPP_RED
2520BMP_8BPP_PALETTE = _core_.BMP_8BPP_PALETTE
2521BMP_4BPP = _core_.BMP_4BPP
2522BMP_1BPP = _core_.BMP_1BPP
2523BMP_1BPP_BW = _core_.BMP_1BPP_BW
2524class BMPHandler(ImageHandler):
093d3ff1 2525 """Proxy of C++ BMPHandler class"""
d55e5bfc
RD
2526 def __repr__(self):
2527 return "<%s.%s; proxy of C++ wxBMPHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
2528 def __init__(self, *args, **kwargs):
2529 """__init__(self) -> BMPHandler"""
2530 newobj = _core_.new_BMPHandler(*args, **kwargs)
2531 self.this = newobj.this
2532 self.thisown = 1
2533 del newobj.thisown
2534
2535class BMPHandlerPtr(BMPHandler):
2536 def __init__(self, this):
2537 self.this = this
2538 if not hasattr(self,"thisown"): self.thisown = 0
2539 self.__class__ = BMPHandler
2540_core_.BMPHandler_swigregister(BMPHandlerPtr)
2541NullImage = cvar.NullImage
2542IMAGE_OPTION_BMP_FORMAT = cvar.IMAGE_OPTION_BMP_FORMAT
2543IMAGE_OPTION_CUR_HOTSPOT_X = cvar.IMAGE_OPTION_CUR_HOTSPOT_X
2544IMAGE_OPTION_CUR_HOTSPOT_Y = cvar.IMAGE_OPTION_CUR_HOTSPOT_Y
2545IMAGE_OPTION_RESOLUTION = cvar.IMAGE_OPTION_RESOLUTION
2546IMAGE_OPTION_RESOLUTIONUNIT = cvar.IMAGE_OPTION_RESOLUTIONUNIT
2547
2548class ICOHandler(BMPHandler):
093d3ff1 2549 """Proxy of C++ ICOHandler class"""
d55e5bfc
RD
2550 def __repr__(self):
2551 return "<%s.%s; proxy of C++ wxICOHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
2552 def __init__(self, *args, **kwargs):
2553 """__init__(self) -> ICOHandler"""
2554 newobj = _core_.new_ICOHandler(*args, **kwargs)
2555 self.this = newobj.this
2556 self.thisown = 1
2557 del newobj.thisown
2558
2559class ICOHandlerPtr(ICOHandler):
2560 def __init__(self, this):
2561 self.this = this
2562 if not hasattr(self,"thisown"): self.thisown = 0
2563 self.__class__ = ICOHandler
2564_core_.ICOHandler_swigregister(ICOHandlerPtr)
2565
2566class CURHandler(ICOHandler):
093d3ff1 2567 """Proxy of C++ CURHandler class"""
d55e5bfc
RD
2568 def __repr__(self):
2569 return "<%s.%s; proxy of C++ wxCURHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
2570 def __init__(self, *args, **kwargs):
2571 """__init__(self) -> CURHandler"""
2572 newobj = _core_.new_CURHandler(*args, **kwargs)
2573 self.this = newobj.this
2574 self.thisown = 1
2575 del newobj.thisown
2576
2577class CURHandlerPtr(CURHandler):
2578 def __init__(self, this):
2579 self.this = this
2580 if not hasattr(self,"thisown"): self.thisown = 0
2581 self.__class__ = CURHandler
2582_core_.CURHandler_swigregister(CURHandlerPtr)
2583
2584class ANIHandler(CURHandler):
093d3ff1 2585 """Proxy of C++ ANIHandler class"""
d55e5bfc
RD
2586 def __repr__(self):
2587 return "<%s.%s; proxy of C++ wxANIHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
2588 def __init__(self, *args, **kwargs):
2589 """__init__(self) -> ANIHandler"""
2590 newobj = _core_.new_ANIHandler(*args, **kwargs)
2591 self.this = newobj.this
2592 self.thisown = 1
2593 del newobj.thisown
2594
2595class ANIHandlerPtr(ANIHandler):
2596 def __init__(self, this):
2597 self.this = this
2598 if not hasattr(self,"thisown"): self.thisown = 0
2599 self.__class__ = ANIHandler
2600_core_.ANIHandler_swigregister(ANIHandlerPtr)
2601
2602class PNGHandler(ImageHandler):
093d3ff1 2603 """Proxy of C++ PNGHandler class"""
d55e5bfc
RD
2604 def __repr__(self):
2605 return "<%s.%s; proxy of C++ wxPNGHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
2606 def __init__(self, *args, **kwargs):
2607 """__init__(self) -> PNGHandler"""
2608 newobj = _core_.new_PNGHandler(*args, **kwargs)
2609 self.this = newobj.this
2610 self.thisown = 1
2611 del newobj.thisown
2612
2613class PNGHandlerPtr(PNGHandler):
2614 def __init__(self, this):
2615 self.this = this
2616 if not hasattr(self,"thisown"): self.thisown = 0
2617 self.__class__ = PNGHandler
2618_core_.PNGHandler_swigregister(PNGHandlerPtr)
2619
2620class GIFHandler(ImageHandler):
093d3ff1 2621 """Proxy of C++ GIFHandler class"""
d55e5bfc
RD
2622 def __repr__(self):
2623 return "<%s.%s; proxy of C++ wxGIFHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
2624 def __init__(self, *args, **kwargs):
2625 """__init__(self) -> GIFHandler"""
2626 newobj = _core_.new_GIFHandler(*args, **kwargs)
2627 self.this = newobj.this
2628 self.thisown = 1
2629 del newobj.thisown
2630
2631class GIFHandlerPtr(GIFHandler):
2632 def __init__(self, this):
2633 self.this = this
2634 if not hasattr(self,"thisown"): self.thisown = 0
2635 self.__class__ = GIFHandler
2636_core_.GIFHandler_swigregister(GIFHandlerPtr)
2637
2638class PCXHandler(ImageHandler):
093d3ff1 2639 """Proxy of C++ PCXHandler class"""
d55e5bfc
RD
2640 def __repr__(self):
2641 return "<%s.%s; proxy of C++ wxPCXHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
2642 def __init__(self, *args, **kwargs):
2643 """__init__(self) -> PCXHandler"""
2644 newobj = _core_.new_PCXHandler(*args, **kwargs)
2645 self.this = newobj.this
2646 self.thisown = 1
2647 del newobj.thisown
2648
2649class PCXHandlerPtr(PCXHandler):
2650 def __init__(self, this):
2651 self.this = this
2652 if not hasattr(self,"thisown"): self.thisown = 0
2653 self.__class__ = PCXHandler
2654_core_.PCXHandler_swigregister(PCXHandlerPtr)
2655
2656class JPEGHandler(ImageHandler):
093d3ff1 2657 """Proxy of C++ JPEGHandler class"""
d55e5bfc
RD
2658 def __repr__(self):
2659 return "<%s.%s; proxy of C++ wxJPEGHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
2660 def __init__(self, *args, **kwargs):
2661 """__init__(self) -> JPEGHandler"""
2662 newobj = _core_.new_JPEGHandler(*args, **kwargs)
2663 self.this = newobj.this
2664 self.thisown = 1
2665 del newobj.thisown
2666
2667class JPEGHandlerPtr(JPEGHandler):
2668 def __init__(self, this):
2669 self.this = this
2670 if not hasattr(self,"thisown"): self.thisown = 0
2671 self.__class__ = JPEGHandler
2672_core_.JPEGHandler_swigregister(JPEGHandlerPtr)
2673
2674class PNMHandler(ImageHandler):
093d3ff1 2675 """Proxy of C++ PNMHandler class"""
d55e5bfc
RD
2676 def __repr__(self):
2677 return "<%s.%s; proxy of C++ wxPNMHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
2678 def __init__(self, *args, **kwargs):
2679 """__init__(self) -> PNMHandler"""
2680 newobj = _core_.new_PNMHandler(*args, **kwargs)
2681 self.this = newobj.this
2682 self.thisown = 1
2683 del newobj.thisown
2684
2685class PNMHandlerPtr(PNMHandler):
2686 def __init__(self, this):
2687 self.this = this
2688 if not hasattr(self,"thisown"): self.thisown = 0
2689 self.__class__ = PNMHandler
2690_core_.PNMHandler_swigregister(PNMHandlerPtr)
2691
2692class XPMHandler(ImageHandler):
093d3ff1 2693 """Proxy of C++ XPMHandler class"""
d55e5bfc
RD
2694 def __repr__(self):
2695 return "<%s.%s; proxy of C++ wxXPMHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
2696 def __init__(self, *args, **kwargs):
2697 """__init__(self) -> XPMHandler"""
2698 newobj = _core_.new_XPMHandler(*args, **kwargs)
2699 self.this = newobj.this
2700 self.thisown = 1
2701 del newobj.thisown
2702
2703class XPMHandlerPtr(XPMHandler):
2704 def __init__(self, this):
2705 self.this = this
2706 if not hasattr(self,"thisown"): self.thisown = 0
2707 self.__class__ = XPMHandler
2708_core_.XPMHandler_swigregister(XPMHandlerPtr)
2709
2710class TIFFHandler(ImageHandler):
093d3ff1 2711 """Proxy of C++ TIFFHandler class"""
d55e5bfc
RD
2712 def __repr__(self):
2713 return "<%s.%s; proxy of C++ wxTIFFHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
2714 def __init__(self, *args, **kwargs):
2715 """__init__(self) -> TIFFHandler"""
2716 newobj = _core_.new_TIFFHandler(*args, **kwargs)
2717 self.this = newobj.this
2718 self.thisown = 1
2719 del newobj.thisown
2720
2721class TIFFHandlerPtr(TIFFHandler):
2722 def __init__(self, this):
2723 self.this = this
2724 if not hasattr(self,"thisown"): self.thisown = 0
2725 self.__class__ = TIFFHandler
2726_core_.TIFFHandler_swigregister(TIFFHandlerPtr)
2727
c0de73ae
RD
2728QUANTIZE_INCLUDE_WINDOWS_COLOURS = _core_.QUANTIZE_INCLUDE_WINDOWS_COLOURS
2729QUANTIZE_FILL_DESTINATION_IMAGE = _core_.QUANTIZE_FILL_DESTINATION_IMAGE
2730class Quantize(object):
2731 """Performs quantization, or colour reduction, on a wxImage."""
2732 def __init__(self): raise RuntimeError, "No constructor defined"
2733 def __repr__(self):
2734 return "<%s.%s; proxy of C++ wxQuantize instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
2735 def Quantize(*args, **kwargs):
2736 """
2737 Quantize(Image src, Image dest, int desiredNoColours=236, int flags=wxQUANTIZE_INCLUDE_WINDOWS_COLOURS|wxQUANTIZE_FILL_DESTINATION_IMAGE) -> bool
2738
2739 Reduce the colours in the source image and put the result into the
2740 destination image, setting the palette in the destination if
2741 needed. Both images may be the same, to overwrite the source image.
2742 """
2743 return _core_.Quantize_Quantize(*args, **kwargs)
2744
2745 Quantize = staticmethod(Quantize)
2746
2747class QuantizePtr(Quantize):
2748 def __init__(self, this):
2749 self.this = this
2750 if not hasattr(self,"thisown"): self.thisown = 0
2751 self.__class__ = Quantize
2752_core_.Quantize_swigregister(QuantizePtr)
2753
2754def Quantize_Quantize(*args, **kwargs):
2755 """
2756 Quantize_Quantize(Image src, Image dest, int desiredNoColours=236, int flags=wxQUANTIZE_INCLUDE_WINDOWS_COLOURS|wxQUANTIZE_FILL_DESTINATION_IMAGE) -> bool
2757
2758 Reduce the colours in the source image and put the result into the
2759 destination image, setting the palette in the destination if
2760 needed. Both images may be the same, to overwrite the source image.
2761 """
2762 return _core_.Quantize_Quantize(*args, **kwargs)
2763
d55e5bfc
RD
2764#---------------------------------------------------------------------------
2765
2766class EvtHandler(Object):
093d3ff1 2767 """Proxy of C++ EvtHandler class"""
d55e5bfc
RD
2768 def __repr__(self):
2769 return "<%s.%s; proxy of C++ wxEvtHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
2770 def __init__(self, *args, **kwargs):
2771 """__init__(self) -> EvtHandler"""
2772 newobj = _core_.new_EvtHandler(*args, **kwargs)
2773 self.this = newobj.this
2774 self.thisown = 1
2775 del newobj.thisown
2776 def GetNextHandler(*args, **kwargs):
2777 """GetNextHandler(self) -> EvtHandler"""
2778 return _core_.EvtHandler_GetNextHandler(*args, **kwargs)
2779
2780 def GetPreviousHandler(*args, **kwargs):
2781 """GetPreviousHandler(self) -> EvtHandler"""
2782 return _core_.EvtHandler_GetPreviousHandler(*args, **kwargs)
2783
2784 def SetNextHandler(*args, **kwargs):
2785 """SetNextHandler(self, EvtHandler handler)"""
2786 return _core_.EvtHandler_SetNextHandler(*args, **kwargs)
2787
2788 def SetPreviousHandler(*args, **kwargs):
2789 """SetPreviousHandler(self, EvtHandler handler)"""
2790 return _core_.EvtHandler_SetPreviousHandler(*args, **kwargs)
2791
2792 def GetEvtHandlerEnabled(*args, **kwargs):
2793 """GetEvtHandlerEnabled(self) -> bool"""
2794 return _core_.EvtHandler_GetEvtHandlerEnabled(*args, **kwargs)
2795
2796 def SetEvtHandlerEnabled(*args, **kwargs):
2797 """SetEvtHandlerEnabled(self, bool enabled)"""
2798 return _core_.EvtHandler_SetEvtHandlerEnabled(*args, **kwargs)
2799
2800 def ProcessEvent(*args, **kwargs):
2801 """ProcessEvent(self, Event event) -> bool"""
2802 return _core_.EvtHandler_ProcessEvent(*args, **kwargs)
2803
2804 def AddPendingEvent(*args, **kwargs):
2805 """AddPendingEvent(self, Event event)"""
2806 return _core_.EvtHandler_AddPendingEvent(*args, **kwargs)
2807
2808 def ProcessPendingEvents(*args, **kwargs):
2809 """ProcessPendingEvents(self)"""
2810 return _core_.EvtHandler_ProcessPendingEvents(*args, **kwargs)
2811
2812 def Connect(*args, **kwargs):
2813 """Connect(self, int id, int lastId, int eventType, PyObject func)"""
2814 return _core_.EvtHandler_Connect(*args, **kwargs)
2815
2816 def Disconnect(*args, **kwargs):
2817 """Disconnect(self, int id, int lastId=-1, wxEventType eventType=wxEVT_NULL) -> bool"""
2818 return _core_.EvtHandler_Disconnect(*args, **kwargs)
2819
2820 def _setOORInfo(*args, **kwargs):
093d3ff1 2821 """_setOORInfo(self, PyObject _self, bool incref=True)"""
d55e5bfc
RD
2822 return _core_.EvtHandler__setOORInfo(*args, **kwargs)
2823
2824 def Bind(self, event, handler, source=None, id=wx.ID_ANY, id2=wx.ID_ANY):
2825 """
2826 Bind an event to an event handler.
2827
caef1a4d
RD
2828 :param event: One of the EVT_* objects that specifies the
2829 type of event to bind,
d55e5bfc 2830
caef1a4d
RD
2831 :param handler: A callable object to be invoked when the
2832 event is delivered to self. Pass None to
2833 disconnect an event handler.
d55e5bfc 2834
caef1a4d
RD
2835 :param source: Sometimes the event originates from a
2836 different window than self, but you still
2837 want to catch it in self. (For example, a
2838 button event delivered to a frame.) By
2839 passing the source of the event, the event
2840 handling system is able to differentiate
2841 between the same event type from different
2842 controls.
d55e5bfc 2843
caef1a4d
RD
2844 :param id: Used to spcify the event source by ID instead
2845 of instance.
2846
2847 :param id2: Used when it is desirable to bind a handler
2848 to a range of IDs, such as with EVT_MENU_RANGE.
d55e5bfc
RD
2849 """
2850 if source is not None:
2851 id = source.GetId()
2852 event.Bind(self, id, id2, handler)
2853
c24da6d6
RD
2854 def Unbind(self, event, source=None, id=wx.ID_ANY, id2=wx.ID_ANY):
2855 """
2856 Disconencts the event handler binding for event from self.
2857 Returns True if successful.
2858 """
2859 if source is not None:
2860 id = source.GetId()
2861 return event.Unbind(self, id, id2)
d55e5bfc
RD
2862
2863
2864class EvtHandlerPtr(EvtHandler):
2865 def __init__(self, this):
2866 self.this = this
2867 if not hasattr(self,"thisown"): self.thisown = 0
2868 self.__class__ = EvtHandler
2869_core_.EvtHandler_swigregister(EvtHandlerPtr)
2870
2871#---------------------------------------------------------------------------
2872
2873class PyEventBinder(object):
2874 """
2875 Instances of this class are used to bind specific events to event
2876 handlers.
2877 """
2878 def __init__(self, evtType, expectedIDs=0):
2879 if expectedIDs not in [0, 1, 2]:
2880 raise ValueError, "Invalid number of expectedIDs"
2881 self.expectedIDs = expectedIDs
2882
2883 if type(evtType) == list or type(evtType) == tuple:
2884 self.evtType = evtType
2885 else:
2886 self.evtType = [evtType]
2887
2888
2889 def Bind(self, target, id1, id2, function):
2890 """Bind this set of event types to target."""
2891 for et in self.evtType:
2892 target.Connect(id1, id2, et, function)
2893
c24da6d6
RD
2894
2895 def Unbind(self, target, id1, id2):
2896 """Remove an event binding."""
2897 success = 0
2898 for et in self.evtType:
2899 success += target.Disconnect(id1, id2, et)
2900 return success != 0
2901
d55e5bfc
RD
2902
2903 def __call__(self, *args):
2904 """
2905 For backwards compatibility with the old EVT_* functions.
2906 Should be called with either (window, func), (window, ID,
2907 func) or (window, ID1, ID2, func) parameters depending on the
2908 type of the event.
2909 """
2910 assert len(args) == 2 + self.expectedIDs
2911 id1 = wx.ID_ANY
2912 id2 = wx.ID_ANY
2913 target = args[0]
2914 if self.expectedIDs == 0:
2915 func = args[1]
2916 elif self.expectedIDs == 1:
2917 id1 = args[1]
2918 func = args[2]
2919 elif self.expectedIDs == 2:
2920 id1 = args[1]
2921 id2 = args[2]
2922 func = args[3]
2923 else:
2924 raise ValueError, "Unexpected number of IDs"
2925
2926 self.Bind(target, id1, id2, func)
2927
2928
2929# These two are square pegs that don't fit the PyEventBinder hole...
2930def EVT_COMMAND(win, id, cmd, func):
2931 win.Connect(id, -1, cmd, func)
2932def EVT_COMMAND_RANGE(win, id1, id2, cmd, func):
2933 win.Connect(id1, id2, cmd, func)
2934
2935
2936#---------------------------------------------------------------------------
2937
2938#---------------------------------------------------------------------------
2939
2940EVENT_PROPAGATE_NONE = _core_.EVENT_PROPAGATE_NONE
2941EVENT_PROPAGATE_MAX = _core_.EVENT_PROPAGATE_MAX
2942
2943def NewEventType(*args, **kwargs):
2944 """NewEventType() -> wxEventType"""
2945 return _core_.NewEventType(*args, **kwargs)
2946wxEVT_NULL = _core_.wxEVT_NULL
2947wxEVT_FIRST = _core_.wxEVT_FIRST
2948wxEVT_USER_FIRST = _core_.wxEVT_USER_FIRST
2949wxEVT_COMMAND_BUTTON_CLICKED = _core_.wxEVT_COMMAND_BUTTON_CLICKED
2950wxEVT_COMMAND_CHECKBOX_CLICKED = _core_.wxEVT_COMMAND_CHECKBOX_CLICKED
2951wxEVT_COMMAND_CHOICE_SELECTED = _core_.wxEVT_COMMAND_CHOICE_SELECTED
2952wxEVT_COMMAND_LISTBOX_SELECTED = _core_.wxEVT_COMMAND_LISTBOX_SELECTED
2953wxEVT_COMMAND_LISTBOX_DOUBLECLICKED = _core_.wxEVT_COMMAND_LISTBOX_DOUBLECLICKED
2954wxEVT_COMMAND_CHECKLISTBOX_TOGGLED = _core_.wxEVT_COMMAND_CHECKLISTBOX_TOGGLED
2955wxEVT_COMMAND_MENU_SELECTED = _core_.wxEVT_COMMAND_MENU_SELECTED
2956wxEVT_COMMAND_TOOL_CLICKED = _core_.wxEVT_COMMAND_TOOL_CLICKED
2957wxEVT_COMMAND_SLIDER_UPDATED = _core_.wxEVT_COMMAND_SLIDER_UPDATED
2958wxEVT_COMMAND_RADIOBOX_SELECTED = _core_.wxEVT_COMMAND_RADIOBOX_SELECTED
2959wxEVT_COMMAND_RADIOBUTTON_SELECTED = _core_.wxEVT_COMMAND_RADIOBUTTON_SELECTED
2960wxEVT_COMMAND_SCROLLBAR_UPDATED = _core_.wxEVT_COMMAND_SCROLLBAR_UPDATED
2961wxEVT_COMMAND_VLBOX_SELECTED = _core_.wxEVT_COMMAND_VLBOX_SELECTED
2962wxEVT_COMMAND_COMBOBOX_SELECTED = _core_.wxEVT_COMMAND_COMBOBOX_SELECTED
2963wxEVT_COMMAND_TOOL_RCLICKED = _core_.wxEVT_COMMAND_TOOL_RCLICKED
2964wxEVT_COMMAND_TOOL_ENTER = _core_.wxEVT_COMMAND_TOOL_ENTER
2965wxEVT_LEFT_DOWN = _core_.wxEVT_LEFT_DOWN
2966wxEVT_LEFT_UP = _core_.wxEVT_LEFT_UP
2967wxEVT_MIDDLE_DOWN = _core_.wxEVT_MIDDLE_DOWN
2968wxEVT_MIDDLE_UP = _core_.wxEVT_MIDDLE_UP
2969wxEVT_RIGHT_DOWN = _core_.wxEVT_RIGHT_DOWN
2970wxEVT_RIGHT_UP = _core_.wxEVT_RIGHT_UP
2971wxEVT_MOTION = _core_.wxEVT_MOTION
2972wxEVT_ENTER_WINDOW = _core_.wxEVT_ENTER_WINDOW
2973wxEVT_LEAVE_WINDOW = _core_.wxEVT_LEAVE_WINDOW
2974wxEVT_LEFT_DCLICK = _core_.wxEVT_LEFT_DCLICK
2975wxEVT_MIDDLE_DCLICK = _core_.wxEVT_MIDDLE_DCLICK
2976wxEVT_RIGHT_DCLICK = _core_.wxEVT_RIGHT_DCLICK
2977wxEVT_SET_FOCUS = _core_.wxEVT_SET_FOCUS
2978wxEVT_KILL_FOCUS = _core_.wxEVT_KILL_FOCUS
2979wxEVT_CHILD_FOCUS = _core_.wxEVT_CHILD_FOCUS
2980wxEVT_MOUSEWHEEL = _core_.wxEVT_MOUSEWHEEL
2981wxEVT_NC_LEFT_DOWN = _core_.wxEVT_NC_LEFT_DOWN
2982wxEVT_NC_LEFT_UP = _core_.wxEVT_NC_LEFT_UP
2983wxEVT_NC_MIDDLE_DOWN = _core_.wxEVT_NC_MIDDLE_DOWN
2984wxEVT_NC_MIDDLE_UP = _core_.wxEVT_NC_MIDDLE_UP
2985wxEVT_NC_RIGHT_DOWN = _core_.wxEVT_NC_RIGHT_DOWN
2986wxEVT_NC_RIGHT_UP = _core_.wxEVT_NC_RIGHT_UP
2987wxEVT_NC_MOTION = _core_.wxEVT_NC_MOTION
2988wxEVT_NC_ENTER_WINDOW = _core_.wxEVT_NC_ENTER_WINDOW
2989wxEVT_NC_LEAVE_WINDOW = _core_.wxEVT_NC_LEAVE_WINDOW
2990wxEVT_NC_LEFT_DCLICK = _core_.wxEVT_NC_LEFT_DCLICK
2991wxEVT_NC_MIDDLE_DCLICK = _core_.wxEVT_NC_MIDDLE_DCLICK
2992wxEVT_NC_RIGHT_DCLICK = _core_.wxEVT_NC_RIGHT_DCLICK
2993wxEVT_CHAR = _core_.wxEVT_CHAR
2994wxEVT_CHAR_HOOK = _core_.wxEVT_CHAR_HOOK
2995wxEVT_NAVIGATION_KEY = _core_.wxEVT_NAVIGATION_KEY
2996wxEVT_KEY_DOWN = _core_.wxEVT_KEY_DOWN
2997wxEVT_KEY_UP = _core_.wxEVT_KEY_UP
2998wxEVT_HOTKEY = _core_.wxEVT_HOTKEY
2999wxEVT_SET_CURSOR = _core_.wxEVT_SET_CURSOR
3000wxEVT_SCROLL_TOP = _core_.wxEVT_SCROLL_TOP
3001wxEVT_SCROLL_BOTTOM = _core_.wxEVT_SCROLL_BOTTOM
3002wxEVT_SCROLL_LINEUP = _core_.wxEVT_SCROLL_LINEUP
3003wxEVT_SCROLL_LINEDOWN = _core_.wxEVT_SCROLL_LINEDOWN
3004wxEVT_SCROLL_PAGEUP = _core_.wxEVT_SCROLL_PAGEUP
3005wxEVT_SCROLL_PAGEDOWN = _core_.wxEVT_SCROLL_PAGEDOWN
3006wxEVT_SCROLL_THUMBTRACK = _core_.wxEVT_SCROLL_THUMBTRACK
3007wxEVT_SCROLL_THUMBRELEASE = _core_.wxEVT_SCROLL_THUMBRELEASE
3008wxEVT_SCROLL_ENDSCROLL = _core_.wxEVT_SCROLL_ENDSCROLL
3009wxEVT_SCROLLWIN_TOP = _core_.wxEVT_SCROLLWIN_TOP
3010wxEVT_SCROLLWIN_BOTTOM = _core_.wxEVT_SCROLLWIN_BOTTOM
3011wxEVT_SCROLLWIN_LINEUP = _core_.wxEVT_SCROLLWIN_LINEUP
3012wxEVT_SCROLLWIN_LINEDOWN = _core_.wxEVT_SCROLLWIN_LINEDOWN
3013wxEVT_SCROLLWIN_PAGEUP = _core_.wxEVT_SCROLLWIN_PAGEUP
3014wxEVT_SCROLLWIN_PAGEDOWN = _core_.wxEVT_SCROLLWIN_PAGEDOWN
3015wxEVT_SCROLLWIN_THUMBTRACK = _core_.wxEVT_SCROLLWIN_THUMBTRACK
3016wxEVT_SCROLLWIN_THUMBRELEASE = _core_.wxEVT_SCROLLWIN_THUMBRELEASE
3017wxEVT_SIZE = _core_.wxEVT_SIZE
3018wxEVT_MOVE = _core_.wxEVT_MOVE
3019wxEVT_CLOSE_WINDOW = _core_.wxEVT_CLOSE_WINDOW
3020wxEVT_END_SESSION = _core_.wxEVT_END_SESSION
3021wxEVT_QUERY_END_SESSION = _core_.wxEVT_QUERY_END_SESSION
3022wxEVT_ACTIVATE_APP = _core_.wxEVT_ACTIVATE_APP
3023wxEVT_POWER = _core_.wxEVT_POWER
3024wxEVT_ACTIVATE = _core_.wxEVT_ACTIVATE
3025wxEVT_CREATE = _core_.wxEVT_CREATE
3026wxEVT_DESTROY = _core_.wxEVT_DESTROY
3027wxEVT_SHOW = _core_.wxEVT_SHOW
3028wxEVT_ICONIZE = _core_.wxEVT_ICONIZE
3029wxEVT_MAXIMIZE = _core_.wxEVT_MAXIMIZE
3030wxEVT_MOUSE_CAPTURE_CHANGED = _core_.wxEVT_MOUSE_CAPTURE_CHANGED
3031wxEVT_PAINT = _core_.wxEVT_PAINT
3032wxEVT_ERASE_BACKGROUND = _core_.wxEVT_ERASE_BACKGROUND
3033wxEVT_NC_PAINT = _core_.wxEVT_NC_PAINT
3034wxEVT_PAINT_ICON = _core_.wxEVT_PAINT_ICON
3035wxEVT_MENU_OPEN = _core_.wxEVT_MENU_OPEN
3036wxEVT_MENU_CLOSE = _core_.wxEVT_MENU_CLOSE
3037wxEVT_MENU_HIGHLIGHT = _core_.wxEVT_MENU_HIGHLIGHT
3038wxEVT_CONTEXT_MENU = _core_.wxEVT_CONTEXT_MENU
3039wxEVT_SYS_COLOUR_CHANGED = _core_.wxEVT_SYS_COLOUR_CHANGED
3040wxEVT_DISPLAY_CHANGED = _core_.wxEVT_DISPLAY_CHANGED
3041wxEVT_SETTING_CHANGED = _core_.wxEVT_SETTING_CHANGED
3042wxEVT_QUERY_NEW_PALETTE = _core_.wxEVT_QUERY_NEW_PALETTE
3043wxEVT_PALETTE_CHANGED = _core_.wxEVT_PALETTE_CHANGED
3044wxEVT_DROP_FILES = _core_.wxEVT_DROP_FILES
3045wxEVT_DRAW_ITEM = _core_.wxEVT_DRAW_ITEM
3046wxEVT_MEASURE_ITEM = _core_.wxEVT_MEASURE_ITEM
3047wxEVT_COMPARE_ITEM = _core_.wxEVT_COMPARE_ITEM
3048wxEVT_INIT_DIALOG = _core_.wxEVT_INIT_DIALOG
3049wxEVT_IDLE = _core_.wxEVT_IDLE
3050wxEVT_UPDATE_UI = _core_.wxEVT_UPDATE_UI
3051wxEVT_SIZING = _core_.wxEVT_SIZING
3052wxEVT_MOVING = _core_.wxEVT_MOVING
3053wxEVT_COMMAND_LEFT_CLICK = _core_.wxEVT_COMMAND_LEFT_CLICK
3054wxEVT_COMMAND_LEFT_DCLICK = _core_.wxEVT_COMMAND_LEFT_DCLICK
3055wxEVT_COMMAND_RIGHT_CLICK = _core_.wxEVT_COMMAND_RIGHT_CLICK
3056wxEVT_COMMAND_RIGHT_DCLICK = _core_.wxEVT_COMMAND_RIGHT_DCLICK
3057wxEVT_COMMAND_SET_FOCUS = _core_.wxEVT_COMMAND_SET_FOCUS
3058wxEVT_COMMAND_KILL_FOCUS = _core_.wxEVT_COMMAND_KILL_FOCUS
3059wxEVT_COMMAND_ENTER = _core_.wxEVT_COMMAND_ENTER
3060#
3061# Create some event binders
3062EVT_SIZE = wx.PyEventBinder( wxEVT_SIZE )
3063EVT_SIZING = wx.PyEventBinder( wxEVT_SIZING )
3064EVT_MOVE = wx.PyEventBinder( wxEVT_MOVE )
3065EVT_MOVING = wx.PyEventBinder( wxEVT_MOVING )
3066EVT_CLOSE = wx.PyEventBinder( wxEVT_CLOSE_WINDOW )
3067EVT_END_SESSION = wx.PyEventBinder( wxEVT_END_SESSION )
3068EVT_QUERY_END_SESSION = wx.PyEventBinder( wxEVT_QUERY_END_SESSION )
3069EVT_PAINT = wx.PyEventBinder( wxEVT_PAINT )
3070EVT_NC_PAINT = wx.PyEventBinder( wxEVT_NC_PAINT )
3071EVT_ERASE_BACKGROUND = wx.PyEventBinder( wxEVT_ERASE_BACKGROUND )
3072EVT_CHAR = wx.PyEventBinder( wxEVT_CHAR )
3073EVT_KEY_DOWN = wx.PyEventBinder( wxEVT_KEY_DOWN )
3074EVT_KEY_UP = wx.PyEventBinder( wxEVT_KEY_UP )
3075EVT_HOTKEY = wx.PyEventBinder( wxEVT_HOTKEY, 1)
3076EVT_CHAR_HOOK = wx.PyEventBinder( wxEVT_CHAR_HOOK )
3077EVT_MENU_OPEN = wx.PyEventBinder( wxEVT_MENU_OPEN )
3078EVT_MENU_CLOSE = wx.PyEventBinder( wxEVT_MENU_CLOSE )
3079EVT_MENU_HIGHLIGHT = wx.PyEventBinder( wxEVT_MENU_HIGHLIGHT, 1)
3080EVT_MENU_HIGHLIGHT_ALL = wx.PyEventBinder( wxEVT_MENU_HIGHLIGHT )
3081EVT_SET_FOCUS = wx.PyEventBinder( wxEVT_SET_FOCUS )
3082EVT_KILL_FOCUS = wx.PyEventBinder( wxEVT_KILL_FOCUS )
3083EVT_CHILD_FOCUS = wx.PyEventBinder( wxEVT_CHILD_FOCUS )
3084EVT_ACTIVATE = wx.PyEventBinder( wxEVT_ACTIVATE )
3085EVT_ACTIVATE_APP = wx.PyEventBinder( wxEVT_ACTIVATE_APP )
3086EVT_END_SESSION = wx.PyEventBinder( wxEVT_END_SESSION )
3087EVT_QUERY_END_SESSION = wx.PyEventBinder( wxEVT_QUERY_END_SESSION )
3088EVT_DROP_FILES = wx.PyEventBinder( wxEVT_DROP_FILES )
3089EVT_INIT_DIALOG = wx.PyEventBinder( wxEVT_INIT_DIALOG )
3090EVT_SYS_COLOUR_CHANGED = wx.PyEventBinder( wxEVT_SYS_COLOUR_CHANGED )
3091EVT_DISPLAY_CHANGED = wx.PyEventBinder( wxEVT_DISPLAY_CHANGED )
3092EVT_SHOW = wx.PyEventBinder( wxEVT_SHOW )
3093EVT_MAXIMIZE = wx.PyEventBinder( wxEVT_MAXIMIZE )
3094EVT_ICONIZE = wx.PyEventBinder( wxEVT_ICONIZE )
3095EVT_NAVIGATION_KEY = wx.PyEventBinder( wxEVT_NAVIGATION_KEY )
3096EVT_PALETTE_CHANGED = wx.PyEventBinder( wxEVT_PALETTE_CHANGED )
3097EVT_QUERY_NEW_PALETTE = wx.PyEventBinder( wxEVT_QUERY_NEW_PALETTE )
3098EVT_WINDOW_CREATE = wx.PyEventBinder( wxEVT_CREATE )
3099EVT_WINDOW_DESTROY = wx.PyEventBinder( wxEVT_DESTROY )
3100EVT_SET_CURSOR = wx.PyEventBinder( wxEVT_SET_CURSOR )
3101EVT_MOUSE_CAPTURE_CHANGED = wx.PyEventBinder( wxEVT_MOUSE_CAPTURE_CHANGED )
3102
3103EVT_LEFT_DOWN = wx.PyEventBinder( wxEVT_LEFT_DOWN )
3104EVT_LEFT_UP = wx.PyEventBinder( wxEVT_LEFT_UP )
3105EVT_MIDDLE_DOWN = wx.PyEventBinder( wxEVT_MIDDLE_DOWN )
3106EVT_MIDDLE_UP = wx.PyEventBinder( wxEVT_MIDDLE_UP )
3107EVT_RIGHT_DOWN = wx.PyEventBinder( wxEVT_RIGHT_DOWN )
3108EVT_RIGHT_UP = wx.PyEventBinder( wxEVT_RIGHT_UP )
3109EVT_MOTION = wx.PyEventBinder( wxEVT_MOTION )
3110EVT_LEFT_DCLICK = wx.PyEventBinder( wxEVT_LEFT_DCLICK )
3111EVT_MIDDLE_DCLICK = wx.PyEventBinder( wxEVT_MIDDLE_DCLICK )
3112EVT_RIGHT_DCLICK = wx.PyEventBinder( wxEVT_RIGHT_DCLICK )
3113EVT_LEAVE_WINDOW = wx.PyEventBinder( wxEVT_LEAVE_WINDOW )
3114EVT_ENTER_WINDOW = wx.PyEventBinder( wxEVT_ENTER_WINDOW )
3115EVT_MOUSEWHEEL = wx.PyEventBinder( wxEVT_MOUSEWHEEL )
3116
3117EVT_MOUSE_EVENTS = wx.PyEventBinder([ wxEVT_LEFT_DOWN,
3118 wxEVT_LEFT_UP,
3119 wxEVT_MIDDLE_DOWN,
3120 wxEVT_MIDDLE_UP,
3121 wxEVT_RIGHT_DOWN,
3122 wxEVT_RIGHT_UP,
3123 wxEVT_MOTION,
3124 wxEVT_LEFT_DCLICK,
3125 wxEVT_MIDDLE_DCLICK,
3126 wxEVT_RIGHT_DCLICK,
3127 wxEVT_ENTER_WINDOW,
3128 wxEVT_LEAVE_WINDOW,
3129 wxEVT_MOUSEWHEEL
3130 ])
3131
3132
3133# Scrolling from wxWindow (sent to wxScrolledWindow)
3134EVT_SCROLLWIN = wx.PyEventBinder([ wxEVT_SCROLLWIN_TOP,
3135 wxEVT_SCROLLWIN_BOTTOM,
3136 wxEVT_SCROLLWIN_LINEUP,
3137 wxEVT_SCROLLWIN_LINEDOWN,
3138 wxEVT_SCROLLWIN_PAGEUP,
3139 wxEVT_SCROLLWIN_PAGEDOWN,
3140 wxEVT_SCROLLWIN_THUMBTRACK,
3141 wxEVT_SCROLLWIN_THUMBRELEASE,
3142 ])
3143
3144EVT_SCROLLWIN_TOP = wx.PyEventBinder( wxEVT_SCROLLWIN_TOP )
3145EVT_SCROLLWIN_BOTTOM = wx.PyEventBinder( wxEVT_SCROLLWIN_BOTTOM )
3146EVT_SCROLLWIN_LINEUP = wx.PyEventBinder( wxEVT_SCROLLWIN_LINEUP )
3147EVT_SCROLLWIN_LINEDOWN = wx.PyEventBinder( wxEVT_SCROLLWIN_LINEDOWN )
3148EVT_SCROLLWIN_PAGEUP = wx.PyEventBinder( wxEVT_SCROLLWIN_PAGEUP )
3149EVT_SCROLLWIN_PAGEDOWN = wx.PyEventBinder( wxEVT_SCROLLWIN_PAGEDOWN )
3150EVT_SCROLLWIN_THUMBTRACK = wx.PyEventBinder( wxEVT_SCROLLWIN_THUMBTRACK )
3151EVT_SCROLLWIN_THUMBRELEASE = wx.PyEventBinder( wxEVT_SCROLLWIN_THUMBRELEASE )
3152
3153# Scrolling from wxSlider and wxScrollBar
3154EVT_SCROLL = wx.PyEventBinder([ wxEVT_SCROLL_TOP,
3155 wxEVT_SCROLL_BOTTOM,
3156 wxEVT_SCROLL_LINEUP,
3157 wxEVT_SCROLL_LINEDOWN,
3158 wxEVT_SCROLL_PAGEUP,
3159 wxEVT_SCROLL_PAGEDOWN,
3160 wxEVT_SCROLL_THUMBTRACK,
3161 wxEVT_SCROLL_THUMBRELEASE,
3162 wxEVT_SCROLL_ENDSCROLL,
3163 ])
3164
3165EVT_SCROLL_TOP = wx.PyEventBinder( wxEVT_SCROLL_TOP )
3166EVT_SCROLL_BOTTOM = wx.PyEventBinder( wxEVT_SCROLL_BOTTOM )
3167EVT_SCROLL_LINEUP = wx.PyEventBinder( wxEVT_SCROLL_LINEUP )
3168EVT_SCROLL_LINEDOWN = wx.PyEventBinder( wxEVT_SCROLL_LINEDOWN )
3169EVT_SCROLL_PAGEUP = wx.PyEventBinder( wxEVT_SCROLL_PAGEUP )
3170EVT_SCROLL_PAGEDOWN = wx.PyEventBinder( wxEVT_SCROLL_PAGEDOWN )
3171EVT_SCROLL_THUMBTRACK = wx.PyEventBinder( wxEVT_SCROLL_THUMBTRACK )
3172EVT_SCROLL_THUMBRELEASE = wx.PyEventBinder( wxEVT_SCROLL_THUMBRELEASE )
3173EVT_SCROLL_ENDSCROLL = wx.PyEventBinder( wxEVT_SCROLL_ENDSCROLL )
3174
3175# Scrolling from wxSlider and wxScrollBar, with an id
3176EVT_COMMAND_SCROLL = wx.PyEventBinder([ wxEVT_SCROLL_TOP,
3177 wxEVT_SCROLL_BOTTOM,
3178 wxEVT_SCROLL_LINEUP,
3179 wxEVT_SCROLL_LINEDOWN,
3180 wxEVT_SCROLL_PAGEUP,
3181 wxEVT_SCROLL_PAGEDOWN,
3182 wxEVT_SCROLL_THUMBTRACK,
3183 wxEVT_SCROLL_THUMBRELEASE,
3184 wxEVT_SCROLL_ENDSCROLL,
3185 ], 1)
3186
3187EVT_COMMAND_SCROLL_TOP = wx.PyEventBinder( wxEVT_SCROLL_TOP, 1)
3188EVT_COMMAND_SCROLL_BOTTOM = wx.PyEventBinder( wxEVT_SCROLL_BOTTOM, 1)
3189EVT_COMMAND_SCROLL_LINEUP = wx.PyEventBinder( wxEVT_SCROLL_LINEUP, 1)
3190EVT_COMMAND_SCROLL_LINEDOWN = wx.PyEventBinder( wxEVT_SCROLL_LINEDOWN, 1)
3191EVT_COMMAND_SCROLL_PAGEUP = wx.PyEventBinder( wxEVT_SCROLL_PAGEUP, 1)
3192EVT_COMMAND_SCROLL_PAGEDOWN = wx.PyEventBinder( wxEVT_SCROLL_PAGEDOWN, 1)
3193EVT_COMMAND_SCROLL_THUMBTRACK = wx.PyEventBinder( wxEVT_SCROLL_THUMBTRACK, 1)
3194EVT_COMMAND_SCROLL_THUMBRELEASE = wx.PyEventBinder( wxEVT_SCROLL_THUMBRELEASE, 1)
3195EVT_COMMAND_SCROLL_ENDSCROLL = wx.PyEventBinder( wxEVT_SCROLL_ENDSCROLL, 1)
3196
3197EVT_BUTTON = wx.PyEventBinder( wxEVT_COMMAND_BUTTON_CLICKED, 1)
3198EVT_CHECKBOX = wx.PyEventBinder( wxEVT_COMMAND_CHECKBOX_CLICKED, 1)
3199EVT_CHOICE = wx.PyEventBinder( wxEVT_COMMAND_CHOICE_SELECTED, 1)
3200EVT_LISTBOX = wx.PyEventBinder( wxEVT_COMMAND_LISTBOX_SELECTED, 1)
3201EVT_LISTBOX_DCLICK = wx.PyEventBinder( wxEVT_COMMAND_LISTBOX_DOUBLECLICKED, 1)
3202EVT_MENU = wx.PyEventBinder( wxEVT_COMMAND_MENU_SELECTED, 1)
3203EVT_MENU_RANGE = wx.PyEventBinder( wxEVT_COMMAND_MENU_SELECTED, 2)
3204EVT_SLIDER = wx.PyEventBinder( wxEVT_COMMAND_SLIDER_UPDATED, 1)
3205EVT_RADIOBOX = wx.PyEventBinder( wxEVT_COMMAND_RADIOBOX_SELECTED, 1)
3206EVT_RADIOBUTTON = wx.PyEventBinder( wxEVT_COMMAND_RADIOBUTTON_SELECTED, 1)
3207
3208EVT_SCROLLBAR = wx.PyEventBinder( wxEVT_COMMAND_SCROLLBAR_UPDATED, 1)
3209EVT_VLBOX = wx.PyEventBinder( wxEVT_COMMAND_VLBOX_SELECTED, 1)
3210EVT_COMBOBOX = wx.PyEventBinder( wxEVT_COMMAND_COMBOBOX_SELECTED, 1)
3211EVT_TOOL = wx.PyEventBinder( wxEVT_COMMAND_TOOL_CLICKED, 1)
3212EVT_TOOL_RANGE = wx.PyEventBinder( wxEVT_COMMAND_TOOL_CLICKED, 2)
3213EVT_TOOL_RCLICKED = wx.PyEventBinder( wxEVT_COMMAND_TOOL_RCLICKED, 1)
3214EVT_TOOL_RCLICKED_RANGE = wx.PyEventBinder( wxEVT_COMMAND_TOOL_RCLICKED, 2)
3215EVT_TOOL_ENTER = wx.PyEventBinder( wxEVT_COMMAND_TOOL_ENTER, 1)
3216EVT_CHECKLISTBOX = wx.PyEventBinder( wxEVT_COMMAND_CHECKLISTBOX_TOGGLED, 1)
3217
3218
3219EVT_COMMAND_LEFT_CLICK = wx.PyEventBinder( wxEVT_COMMAND_LEFT_CLICK, 1)
3220EVT_COMMAND_LEFT_DCLICK = wx.PyEventBinder( wxEVT_COMMAND_LEFT_DCLICK, 1)
3221EVT_COMMAND_RIGHT_CLICK = wx.PyEventBinder( wxEVT_COMMAND_RIGHT_CLICK, 1)
3222EVT_COMMAND_RIGHT_DCLICK = wx.PyEventBinder( wxEVT_COMMAND_RIGHT_DCLICK, 1)
3223EVT_COMMAND_SET_FOCUS = wx.PyEventBinder( wxEVT_COMMAND_SET_FOCUS, 1)
3224EVT_COMMAND_KILL_FOCUS = wx.PyEventBinder( wxEVT_COMMAND_KILL_FOCUS, 1)
3225EVT_COMMAND_ENTER = wx.PyEventBinder( wxEVT_COMMAND_ENTER, 1)
3226
3227EVT_IDLE = wx.PyEventBinder( wxEVT_IDLE )
3228
3229EVT_UPDATE_UI = wx.PyEventBinder( wxEVT_UPDATE_UI, 1)
3230EVT_UPDATE_UI_RANGE = wx.PyEventBinder( wxEVT_UPDATE_UI, 2)
3231
3232EVT_CONTEXT_MENU = wx.PyEventBinder( wxEVT_CONTEXT_MENU )
3233
3234
3235
3236#---------------------------------------------------------------------------
3237
3238class Event(Object):
093d3ff1 3239 """Proxy of C++ Event class"""
d55e5bfc
RD
3240 def __init__(self): raise RuntimeError, "No constructor defined"
3241 def __repr__(self):
3242 return "<%s.%s; proxy of C++ wxEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
3243 def __del__(self, destroy=_core_.delete_Event):
3244 """__del__(self)"""
3245 try:
3246 if self.thisown: destroy(self)
3247 except: pass
3248
3249 def SetEventType(*args, **kwargs):
3250 """SetEventType(self, wxEventType typ)"""
3251 return _core_.Event_SetEventType(*args, **kwargs)
3252
3253 def GetEventType(*args, **kwargs):
3254 """GetEventType(self) -> wxEventType"""
3255 return _core_.Event_GetEventType(*args, **kwargs)
3256
3257 def GetEventObject(*args, **kwargs):
3258 """GetEventObject(self) -> Object"""
3259 return _core_.Event_GetEventObject(*args, **kwargs)
3260
3261 def SetEventObject(*args, **kwargs):
3262 """SetEventObject(self, Object obj)"""
3263 return _core_.Event_SetEventObject(*args, **kwargs)
3264
3265 def GetTimestamp(*args, **kwargs):
3266 """GetTimestamp(self) -> long"""
3267 return _core_.Event_GetTimestamp(*args, **kwargs)
3268
3269 def SetTimestamp(*args, **kwargs):
3270 """SetTimestamp(self, long ts=0)"""
3271 return _core_.Event_SetTimestamp(*args, **kwargs)
3272
3273 def GetId(*args, **kwargs):
3274 """GetId(self) -> int"""
3275 return _core_.Event_GetId(*args, **kwargs)
3276
3277 def SetId(*args, **kwargs):
3278 """SetId(self, int Id)"""
3279 return _core_.Event_SetId(*args, **kwargs)
3280
3281 def IsCommandEvent(*args, **kwargs):
3282 """IsCommandEvent(self) -> bool"""
3283 return _core_.Event_IsCommandEvent(*args, **kwargs)
3284
3285 def Skip(*args, **kwargs):
51b83b37
RD
3286 """
3287 Skip(self, bool skip=True)
3288
3289 Called by an event handler, it controls whether additional event
3290 handlers bound to this event will be called after the current event
3291 handler returns. Skip(false) (the default setting) will prevent
3292 additional event handlers from being called and control will be
3293 returned to the sender of the event immediately after the current
3294 handler has finished. Skip(True) will cause the event processing
3295 system to continue searching for a handler function for this event.
3296
3297 """
d55e5bfc
RD
3298 return _core_.Event_Skip(*args, **kwargs)
3299
3300 def GetSkipped(*args, **kwargs):
3301 """GetSkipped(self) -> bool"""
3302 return _core_.Event_GetSkipped(*args, **kwargs)
3303
3304 def ShouldPropagate(*args, **kwargs):
3305 """ShouldPropagate(self) -> bool"""
3306 return _core_.Event_ShouldPropagate(*args, **kwargs)
3307
3308 def StopPropagation(*args, **kwargs):
3309 """StopPropagation(self) -> int"""
3310 return _core_.Event_StopPropagation(*args, **kwargs)
3311
3312 def ResumePropagation(*args, **kwargs):
3313 """ResumePropagation(self, int propagationLevel)"""
3314 return _core_.Event_ResumePropagation(*args, **kwargs)
3315
3316 def Clone(*args, **kwargs):
3317 """Clone(self) -> Event"""
3318 return _core_.Event_Clone(*args, **kwargs)
3319
3320
3321class EventPtr(Event):
3322 def __init__(self, this):
3323 self.this = this
3324 if not hasattr(self,"thisown"): self.thisown = 0
3325 self.__class__ = Event
3326_core_.Event_swigregister(EventPtr)
3327
3328#---------------------------------------------------------------------------
3329
3330class PropagationDisabler(object):
093d3ff1 3331 """Proxy of C++ PropagationDisabler class"""
d55e5bfc
RD
3332 def __repr__(self):
3333 return "<%s.%s; proxy of C++ wxPropagationDisabler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
3334 def __init__(self, *args, **kwargs):
3335 """__init__(self, Event event) -> PropagationDisabler"""
3336 newobj = _core_.new_PropagationDisabler(*args, **kwargs)
3337 self.this = newobj.this
3338 self.thisown = 1
3339 del newobj.thisown
3340 def __del__(self, destroy=_core_.delete_PropagationDisabler):
3341 """__del__(self)"""
3342 try:
3343 if self.thisown: destroy(self)
3344 except: pass
3345
3346
3347class PropagationDisablerPtr(PropagationDisabler):
3348 def __init__(self, this):
3349 self.this = this
3350 if not hasattr(self,"thisown"): self.thisown = 0
3351 self.__class__ = PropagationDisabler
3352_core_.PropagationDisabler_swigregister(PropagationDisablerPtr)
3353
3354class PropagateOnce(object):
093d3ff1 3355 """Proxy of C++ PropagateOnce class"""
d55e5bfc
RD
3356 def __repr__(self):
3357 return "<%s.%s; proxy of C++ wxPropagateOnce instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
3358 def __init__(self, *args, **kwargs):
3359 """__init__(self, Event event) -> PropagateOnce"""
3360 newobj = _core_.new_PropagateOnce(*args, **kwargs)
3361 self.this = newobj.this
3362 self.thisown = 1
3363 del newobj.thisown
3364 def __del__(self, destroy=_core_.delete_PropagateOnce):
3365 """__del__(self)"""
3366 try:
3367 if self.thisown: destroy(self)
3368 except: pass
3369
3370
3371class PropagateOncePtr(PropagateOnce):
3372 def __init__(self, this):
3373 self.this = this
3374 if not hasattr(self,"thisown"): self.thisown = 0
3375 self.__class__ = PropagateOnce
3376_core_.PropagateOnce_swigregister(PropagateOncePtr)
3377
3378#---------------------------------------------------------------------------
3379
3380class CommandEvent(Event):
093d3ff1 3381 """Proxy of C++ CommandEvent class"""
d55e5bfc
RD
3382 def __repr__(self):
3383 return "<%s.%s; proxy of C++ wxCommandEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
3384 def __init__(self, *args, **kwargs):
3385 """__init__(self, wxEventType commandType=wxEVT_NULL, int winid=0) -> CommandEvent"""
3386 newobj = _core_.new_CommandEvent(*args, **kwargs)
3387 self.this = newobj.this
3388 self.thisown = 1
3389 del newobj.thisown
3390 def GetSelection(*args, **kwargs):
3391 """GetSelection(self) -> int"""
3392 return _core_.CommandEvent_GetSelection(*args, **kwargs)
3393
3394 def SetString(*args, **kwargs):
3395 """SetString(self, String s)"""
3396 return _core_.CommandEvent_SetString(*args, **kwargs)
3397
3398 def GetString(*args, **kwargs):
3399 """GetString(self) -> String"""
3400 return _core_.CommandEvent_GetString(*args, **kwargs)
3401
3402 def IsChecked(*args, **kwargs):
3403 """IsChecked(self) -> bool"""
3404 return _core_.CommandEvent_IsChecked(*args, **kwargs)
3405
3406 Checked = IsChecked
3407 def IsSelection(*args, **kwargs):
3408 """IsSelection(self) -> bool"""
3409 return _core_.CommandEvent_IsSelection(*args, **kwargs)
3410
3411 def SetExtraLong(*args, **kwargs):
3412 """SetExtraLong(self, long extraLong)"""
3413 return _core_.CommandEvent_SetExtraLong(*args, **kwargs)
3414
3415 def GetExtraLong(*args, **kwargs):
3416 """GetExtraLong(self) -> long"""
3417 return _core_.CommandEvent_GetExtraLong(*args, **kwargs)
3418
3419 def SetInt(*args, **kwargs):
3420 """SetInt(self, int i)"""
3421 return _core_.CommandEvent_SetInt(*args, **kwargs)
3422
3423 def GetInt(*args, **kwargs):
3424 """GetInt(self) -> long"""
3425 return _core_.CommandEvent_GetInt(*args, **kwargs)
3426
3427 def Clone(*args, **kwargs):
3428 """Clone(self) -> Event"""
3429 return _core_.CommandEvent_Clone(*args, **kwargs)
3430
3431
3432class CommandEventPtr(CommandEvent):
3433 def __init__(self, this):
3434 self.this = this
3435 if not hasattr(self,"thisown"): self.thisown = 0
3436 self.__class__ = CommandEvent
3437_core_.CommandEvent_swigregister(CommandEventPtr)
3438
3439#---------------------------------------------------------------------------
3440
3441class NotifyEvent(CommandEvent):
093d3ff1 3442 """Proxy of C++ NotifyEvent class"""
d55e5bfc
RD
3443 def __repr__(self):
3444 return "<%s.%s; proxy of C++ wxNotifyEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
3445 def __init__(self, *args, **kwargs):
3446 """__init__(self, wxEventType commandType=wxEVT_NULL, int winid=0) -> NotifyEvent"""
3447 newobj = _core_.new_NotifyEvent(*args, **kwargs)
3448 self.this = newobj.this
3449 self.thisown = 1
3450 del newobj.thisown
3451 def Veto(*args, **kwargs):
3452 """Veto(self)"""
3453 return _core_.NotifyEvent_Veto(*args, **kwargs)
3454
3455 def Allow(*args, **kwargs):
3456 """Allow(self)"""
3457 return _core_.NotifyEvent_Allow(*args, **kwargs)
3458
3459 def IsAllowed(*args, **kwargs):
3460 """IsAllowed(self) -> bool"""
3461 return _core_.NotifyEvent_IsAllowed(*args, **kwargs)
3462
3463
3464class NotifyEventPtr(NotifyEvent):
3465 def __init__(self, this):
3466 self.this = this
3467 if not hasattr(self,"thisown"): self.thisown = 0
3468 self.__class__ = NotifyEvent
3469_core_.NotifyEvent_swigregister(NotifyEventPtr)
3470
3471#---------------------------------------------------------------------------
3472
3473class ScrollEvent(CommandEvent):
093d3ff1 3474 """Proxy of C++ ScrollEvent class"""
d55e5bfc
RD
3475 def __repr__(self):
3476 return "<%s.%s; proxy of C++ wxScrollEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
3477 def __init__(self, *args, **kwargs):
3478 """
3479 __init__(self, wxEventType commandType=wxEVT_NULL, int winid=0, int pos=0,
3480 int orient=0) -> ScrollEvent
3481 """
3482 newobj = _core_.new_ScrollEvent(*args, **kwargs)
3483 self.this = newobj.this
3484 self.thisown = 1
3485 del newobj.thisown
3486 def GetOrientation(*args, **kwargs):
3487 """GetOrientation(self) -> int"""
3488 return _core_.ScrollEvent_GetOrientation(*args, **kwargs)
3489
3490 def GetPosition(*args, **kwargs):
3491 """GetPosition(self) -> int"""
3492 return _core_.ScrollEvent_GetPosition(*args, **kwargs)
3493
3494 def SetOrientation(*args, **kwargs):
3495 """SetOrientation(self, int orient)"""
3496 return _core_.ScrollEvent_SetOrientation(*args, **kwargs)
3497
3498 def SetPosition(*args, **kwargs):
3499 """SetPosition(self, int pos)"""
3500 return _core_.ScrollEvent_SetPosition(*args, **kwargs)
3501
3502
3503class ScrollEventPtr(ScrollEvent):
3504 def __init__(self, this):
3505 self.this = this
3506 if not hasattr(self,"thisown"): self.thisown = 0
3507 self.__class__ = ScrollEvent
3508_core_.ScrollEvent_swigregister(ScrollEventPtr)
3509
3510#---------------------------------------------------------------------------
3511
3512class ScrollWinEvent(Event):
093d3ff1 3513 """Proxy of C++ ScrollWinEvent class"""
d55e5bfc
RD
3514 def __repr__(self):
3515 return "<%s.%s; proxy of C++ wxScrollWinEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
3516 def __init__(self, *args, **kwargs):
3517 """__init__(self, wxEventType commandType=wxEVT_NULL, int pos=0, int orient=0) -> ScrollWinEvent"""
3518 newobj = _core_.new_ScrollWinEvent(*args, **kwargs)
3519 self.this = newobj.this
3520 self.thisown = 1
3521 del newobj.thisown
3522 def GetOrientation(*args, **kwargs):
3523 """GetOrientation(self) -> int"""
3524 return _core_.ScrollWinEvent_GetOrientation(*args, **kwargs)
3525
3526 def GetPosition(*args, **kwargs):
3527 """GetPosition(self) -> int"""
3528 return _core_.ScrollWinEvent_GetPosition(*args, **kwargs)
3529
3530 def SetOrientation(*args, **kwargs):
3531 """SetOrientation(self, int orient)"""
3532 return _core_.ScrollWinEvent_SetOrientation(*args, **kwargs)
3533
3534 def SetPosition(*args, **kwargs):
3535 """SetPosition(self, int pos)"""
3536 return _core_.ScrollWinEvent_SetPosition(*args, **kwargs)
3537
3538
3539class ScrollWinEventPtr(ScrollWinEvent):
3540 def __init__(self, this):
3541 self.this = this
3542 if not hasattr(self,"thisown"): self.thisown = 0
3543 self.__class__ = ScrollWinEvent
3544_core_.ScrollWinEvent_swigregister(ScrollWinEventPtr)
3545
3546#---------------------------------------------------------------------------
3547
3548MOUSE_BTN_ANY = _core_.MOUSE_BTN_ANY
3549MOUSE_BTN_NONE = _core_.MOUSE_BTN_NONE
3550MOUSE_BTN_LEFT = _core_.MOUSE_BTN_LEFT
3551MOUSE_BTN_MIDDLE = _core_.MOUSE_BTN_MIDDLE
3552MOUSE_BTN_RIGHT = _core_.MOUSE_BTN_RIGHT
3553class MouseEvent(Event):
093d3ff1 3554 """Proxy of C++ MouseEvent class"""
d55e5bfc
RD
3555 def __repr__(self):
3556 return "<%s.%s; proxy of C++ wxMouseEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
3557 def __init__(self, *args, **kwargs):
3558 """__init__(self, wxEventType mouseType=wxEVT_NULL) -> MouseEvent"""
3559 newobj = _core_.new_MouseEvent(*args, **kwargs)
3560 self.this = newobj.this
3561 self.thisown = 1
3562 del newobj.thisown
3563 def IsButton(*args, **kwargs):
3564 """IsButton(self) -> bool"""
3565 return _core_.MouseEvent_IsButton(*args, **kwargs)
3566
3567 def ButtonDown(*args, **kwargs):
3568 """ButtonDown(self, int but=MOUSE_BTN_ANY) -> bool"""
3569 return _core_.MouseEvent_ButtonDown(*args, **kwargs)
3570
3571 def ButtonDClick(*args, **kwargs):
3572 """ButtonDClick(self, int but=MOUSE_BTN_ANY) -> bool"""
3573 return _core_.MouseEvent_ButtonDClick(*args, **kwargs)
3574
3575 def ButtonUp(*args, **kwargs):
3576 """ButtonUp(self, int but=MOUSE_BTN_ANY) -> bool"""
3577 return _core_.MouseEvent_ButtonUp(*args, **kwargs)
3578
3579 def Button(*args, **kwargs):
3580 """Button(self, int but) -> bool"""
3581 return _core_.MouseEvent_Button(*args, **kwargs)
3582
3583 def ButtonIsDown(*args, **kwargs):
3584 """ButtonIsDown(self, int but) -> bool"""
3585 return _core_.MouseEvent_ButtonIsDown(*args, **kwargs)
3586
3587 def GetButton(*args, **kwargs):
3588 """GetButton(self) -> int"""
3589 return _core_.MouseEvent_GetButton(*args, **kwargs)
3590
3591 def ControlDown(*args, **kwargs):
3592 """ControlDown(self) -> bool"""
3593 return _core_.MouseEvent_ControlDown(*args, **kwargs)
3594
3595 def MetaDown(*args, **kwargs):
3596 """MetaDown(self) -> bool"""
3597 return _core_.MouseEvent_MetaDown(*args, **kwargs)
3598
3599 def AltDown(*args, **kwargs):
3600 """AltDown(self) -> bool"""
3601 return _core_.MouseEvent_AltDown(*args, **kwargs)
3602
3603 def ShiftDown(*args, **kwargs):
3604 """ShiftDown(self) -> bool"""
3605 return _core_.MouseEvent_ShiftDown(*args, **kwargs)
3606
412d302d
RD
3607 def CmdDown(*args, **kwargs):
3608 """
3609 CmdDown(self) -> bool
3610
3611 "Cmd" is a pseudo key which is the same as Control for PC and Unix
3612 platforms but the special "Apple" (a.k.a as "Command") key on
3613 Macs: it makes often sense to use it instead of, say, `ControlDown`
3614 because Cmd key is used for the same thing under Mac as Ctrl
3615 elsewhere. The Ctrl still exists, it's just not used for this
3616 purpose. So for non-Mac platforms this is the same as `ControlDown`
3617 and Macs this is the same as `MetaDown`.
3618 """
3619 return _core_.MouseEvent_CmdDown(*args, **kwargs)
3620
d55e5bfc
RD
3621 def LeftDown(*args, **kwargs):
3622 """LeftDown(self) -> bool"""
3623 return _core_.MouseEvent_LeftDown(*args, **kwargs)
3624
3625 def MiddleDown(*args, **kwargs):
3626 """MiddleDown(self) -> bool"""
3627 return _core_.MouseEvent_MiddleDown(*args, **kwargs)
3628
3629 def RightDown(*args, **kwargs):
3630 """RightDown(self) -> bool"""
3631 return _core_.MouseEvent_RightDown(*args, **kwargs)
3632
3633 def LeftUp(*args, **kwargs):
3634 """LeftUp(self) -> bool"""
3635 return _core_.MouseEvent_LeftUp(*args, **kwargs)
3636
3637 def MiddleUp(*args, **kwargs):
3638 """MiddleUp(self) -> bool"""
3639 return _core_.MouseEvent_MiddleUp(*args, **kwargs)
3640
3641 def RightUp(*args, **kwargs):
3642 """RightUp(self) -> bool"""
3643 return _core_.MouseEvent_RightUp(*args, **kwargs)
3644
3645 def LeftDClick(*args, **kwargs):
3646 """LeftDClick(self) -> bool"""
3647 return _core_.MouseEvent_LeftDClick(*args, **kwargs)
3648
3649 def MiddleDClick(*args, **kwargs):
3650 """MiddleDClick(self) -> bool"""
3651 return _core_.MouseEvent_MiddleDClick(*args, **kwargs)
3652
3653 def RightDClick(*args, **kwargs):
3654 """RightDClick(self) -> bool"""
3655 return _core_.MouseEvent_RightDClick(*args, **kwargs)
3656
3657 def LeftIsDown(*args, **kwargs):
3658 """LeftIsDown(self) -> bool"""
3659 return _core_.MouseEvent_LeftIsDown(*args, **kwargs)
3660
3661 def MiddleIsDown(*args, **kwargs):
3662 """MiddleIsDown(self) -> bool"""
3663 return _core_.MouseEvent_MiddleIsDown(*args, **kwargs)
3664
3665 def RightIsDown(*args, **kwargs):
3666 """RightIsDown(self) -> bool"""
3667 return _core_.MouseEvent_RightIsDown(*args, **kwargs)
3668
3669 def Dragging(*args, **kwargs):
3670 """Dragging(self) -> bool"""
3671 return _core_.MouseEvent_Dragging(*args, **kwargs)
3672
3673 def Moving(*args, **kwargs):
3674 """Moving(self) -> bool"""
3675 return _core_.MouseEvent_Moving(*args, **kwargs)
3676
3677 def Entering(*args, **kwargs):
3678 """Entering(self) -> bool"""
3679 return _core_.MouseEvent_Entering(*args, **kwargs)
3680
3681 def Leaving(*args, **kwargs):
3682 """Leaving(self) -> bool"""
3683 return _core_.MouseEvent_Leaving(*args, **kwargs)
3684
3685 def GetPosition(*args, **kwargs):
3686 """
3687 GetPosition(self) -> Point
3688
79fccf9d
RD
3689 Returns the position of the mouse in window coordinates when the event
3690 happened.
d55e5bfc
RD
3691 """
3692 return _core_.MouseEvent_GetPosition(*args, **kwargs)
3693
3694 def GetPositionTuple(*args, **kwargs):
3695 """
3696 GetPositionTuple() -> (x,y)
3697
79fccf9d
RD
3698 Returns the position of the mouse in window coordinates when the event
3699 happened.
d55e5bfc
RD
3700 """
3701 return _core_.MouseEvent_GetPositionTuple(*args, **kwargs)
3702
3703 def GetLogicalPosition(*args, **kwargs):
3704 """GetLogicalPosition(self, DC dc) -> Point"""
3705 return _core_.MouseEvent_GetLogicalPosition(*args, **kwargs)
3706
3707 def GetX(*args, **kwargs):
3708 """GetX(self) -> int"""
3709 return _core_.MouseEvent_GetX(*args, **kwargs)
3710
3711 def GetY(*args, **kwargs):
3712 """GetY(self) -> int"""
3713 return _core_.MouseEvent_GetY(*args, **kwargs)
3714
3715 def GetWheelRotation(*args, **kwargs):
3716 """GetWheelRotation(self) -> int"""
3717 return _core_.MouseEvent_GetWheelRotation(*args, **kwargs)
3718
3719 def GetWheelDelta(*args, **kwargs):
3720 """GetWheelDelta(self) -> int"""
3721 return _core_.MouseEvent_GetWheelDelta(*args, **kwargs)
3722
3723 def GetLinesPerAction(*args, **kwargs):
3724 """GetLinesPerAction(self) -> int"""
3725 return _core_.MouseEvent_GetLinesPerAction(*args, **kwargs)
3726
3727 def IsPageScroll(*args, **kwargs):
3728 """IsPageScroll(self) -> bool"""
3729 return _core_.MouseEvent_IsPageScroll(*args, **kwargs)
3730
3731 m_x = property(_core_.MouseEvent_m_x_get, _core_.MouseEvent_m_x_set)
3732 m_y = property(_core_.MouseEvent_m_y_get, _core_.MouseEvent_m_y_set)
3733 m_leftDown = property(_core_.MouseEvent_m_leftDown_get, _core_.MouseEvent_m_leftDown_set)
3734 m_middleDown = property(_core_.MouseEvent_m_middleDown_get, _core_.MouseEvent_m_middleDown_set)
3735 m_rightDown = property(_core_.MouseEvent_m_rightDown_get, _core_.MouseEvent_m_rightDown_set)
3736 m_controlDown = property(_core_.MouseEvent_m_controlDown_get, _core_.MouseEvent_m_controlDown_set)
3737 m_shiftDown = property(_core_.MouseEvent_m_shiftDown_get, _core_.MouseEvent_m_shiftDown_set)
3738 m_altDown = property(_core_.MouseEvent_m_altDown_get, _core_.MouseEvent_m_altDown_set)
3739 m_metaDown = property(_core_.MouseEvent_m_metaDown_get, _core_.MouseEvent_m_metaDown_set)
3740 m_wheelRotation = property(_core_.MouseEvent_m_wheelRotation_get, _core_.MouseEvent_m_wheelRotation_set)
3741 m_wheelDelta = property(_core_.MouseEvent_m_wheelDelta_get, _core_.MouseEvent_m_wheelDelta_set)
3742 m_linesPerAction = property(_core_.MouseEvent_m_linesPerAction_get, _core_.MouseEvent_m_linesPerAction_set)
3743
3744class MouseEventPtr(MouseEvent):
3745 def __init__(self, this):
3746 self.this = this
3747 if not hasattr(self,"thisown"): self.thisown = 0
3748 self.__class__ = MouseEvent
3749_core_.MouseEvent_swigregister(MouseEventPtr)
3750
3751#---------------------------------------------------------------------------
3752
3753class SetCursorEvent(Event):
093d3ff1 3754 """Proxy of C++ SetCursorEvent class"""
d55e5bfc
RD
3755 def __repr__(self):
3756 return "<%s.%s; proxy of C++ wxSetCursorEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
3757 def __init__(self, *args, **kwargs):
3758 """__init__(self, int x=0, int y=0) -> SetCursorEvent"""
3759 newobj = _core_.new_SetCursorEvent(*args, **kwargs)
3760 self.this = newobj.this
3761 self.thisown = 1
3762 del newobj.thisown
3763 def GetX(*args, **kwargs):
3764 """GetX(self) -> int"""
3765 return _core_.SetCursorEvent_GetX(*args, **kwargs)
3766
3767 def GetY(*args, **kwargs):
3768 """GetY(self) -> int"""
3769 return _core_.SetCursorEvent_GetY(*args, **kwargs)
3770
3771 def SetCursor(*args, **kwargs):
3772 """SetCursor(self, Cursor cursor)"""
3773 return _core_.SetCursorEvent_SetCursor(*args, **kwargs)
3774
3775 def GetCursor(*args, **kwargs):
3776 """GetCursor(self) -> Cursor"""
3777 return _core_.SetCursorEvent_GetCursor(*args, **kwargs)
3778
3779 def HasCursor(*args, **kwargs):
3780 """HasCursor(self) -> bool"""
3781 return _core_.SetCursorEvent_HasCursor(*args, **kwargs)
3782
3783
3784class SetCursorEventPtr(SetCursorEvent):
3785 def __init__(self, this):
3786 self.this = this
3787 if not hasattr(self,"thisown"): self.thisown = 0
3788 self.__class__ = SetCursorEvent
3789_core_.SetCursorEvent_swigregister(SetCursorEventPtr)
3790
3791#---------------------------------------------------------------------------
3792
3793class KeyEvent(Event):
093d3ff1 3794 """Proxy of C++ KeyEvent class"""
d55e5bfc
RD
3795 def __repr__(self):
3796 return "<%s.%s; proxy of C++ wxKeyEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
3797 def __init__(self, *args, **kwargs):
3798 """__init__(self, wxEventType keyType=wxEVT_NULL) -> KeyEvent"""
3799 newobj = _core_.new_KeyEvent(*args, **kwargs)
3800 self.this = newobj.this
3801 self.thisown = 1
3802 del newobj.thisown
3803 def ControlDown(*args, **kwargs):
3804 """ControlDown(self) -> bool"""
3805 return _core_.KeyEvent_ControlDown(*args, **kwargs)
3806
3807 def MetaDown(*args, **kwargs):
3808 """MetaDown(self) -> bool"""
3809 return _core_.KeyEvent_MetaDown(*args, **kwargs)
3810
3811 def AltDown(*args, **kwargs):
3812 """AltDown(self) -> bool"""
3813 return _core_.KeyEvent_AltDown(*args, **kwargs)
3814
3815 def ShiftDown(*args, **kwargs):
3816 """ShiftDown(self) -> bool"""
3817 return _core_.KeyEvent_ShiftDown(*args, **kwargs)
3818
412d302d
RD
3819 def CmdDown(*args, **kwargs):
3820 """
3821 CmdDown(self) -> bool
3822
3823 "Cmd" is a pseudo key which is the same as Control for PC and Unix
3824 platforms but the special "Apple" (a.k.a as "Command") key on
3825 Macs: it makes often sense to use it instead of, say, `ControlDown`
3826 because Cmd key is used for the same thing under Mac as Ctrl
3827 elsewhere. The Ctrl still exists, it's just not used for this
3828 purpose. So for non-Mac platforms this is the same as `ControlDown`
3829 and Macs this is the same as `MetaDown`.
3830 """
3831 return _core_.KeyEvent_CmdDown(*args, **kwargs)
3832
d55e5bfc
RD
3833 def HasModifiers(*args, **kwargs):
3834 """HasModifiers(self) -> bool"""
3835 return _core_.KeyEvent_HasModifiers(*args, **kwargs)
3836
3837 def GetKeyCode(*args, **kwargs):
3838 """GetKeyCode(self) -> int"""
3839 return _core_.KeyEvent_GetKeyCode(*args, **kwargs)
3840
3841 KeyCode = GetKeyCode
19272049
RD
3842 def GetUnicodeKey(*args, **kwargs):
3843 """GetUnicodeKey(self) -> int"""
3844 return _core_.KeyEvent_GetUnicodeKey(*args, **kwargs)
d55e5bfc 3845
19272049 3846 GetUniChar = GetUnicodeKey
d55e5bfc
RD
3847 def GetRawKeyCode(*args, **kwargs):
3848 """GetRawKeyCode(self) -> unsigned int"""
3849 return _core_.KeyEvent_GetRawKeyCode(*args, **kwargs)
3850
3851 def GetRawKeyFlags(*args, **kwargs):
3852 """GetRawKeyFlags(self) -> unsigned int"""
3853 return _core_.KeyEvent_GetRawKeyFlags(*args, **kwargs)
3854
3855 def GetPosition(*args, **kwargs):
3856 """
3857 GetPosition(self) -> Point
3858
3859 Find the position of the event.
3860 """
3861 return _core_.KeyEvent_GetPosition(*args, **kwargs)
3862
3863 def GetPositionTuple(*args, **kwargs):
3864 """
3865 GetPositionTuple() -> (x,y)
3866
3867 Find the position of the event.
3868 """
3869 return _core_.KeyEvent_GetPositionTuple(*args, **kwargs)
3870
3871 def GetX(*args, **kwargs):
3872 """GetX(self) -> int"""
3873 return _core_.KeyEvent_GetX(*args, **kwargs)
3874
3875 def GetY(*args, **kwargs):
3876 """GetY(self) -> int"""
3877 return _core_.KeyEvent_GetY(*args, **kwargs)
3878
3879 m_x = property(_core_.KeyEvent_m_x_get, _core_.KeyEvent_m_x_set)
3880 m_y = property(_core_.KeyEvent_m_y_get, _core_.KeyEvent_m_y_set)
3881 m_keyCode = property(_core_.KeyEvent_m_keyCode_get, _core_.KeyEvent_m_keyCode_set)
3882 m_controlDown = property(_core_.KeyEvent_m_controlDown_get, _core_.KeyEvent_m_controlDown_set)
3883 m_shiftDown = property(_core_.KeyEvent_m_shiftDown_get, _core_.KeyEvent_m_shiftDown_set)
3884 m_altDown = property(_core_.KeyEvent_m_altDown_get, _core_.KeyEvent_m_altDown_set)
3885 m_metaDown = property(_core_.KeyEvent_m_metaDown_get, _core_.KeyEvent_m_metaDown_set)
3886 m_scanCode = property(_core_.KeyEvent_m_scanCode_get, _core_.KeyEvent_m_scanCode_set)
3887 m_rawCode = property(_core_.KeyEvent_m_rawCode_get, _core_.KeyEvent_m_rawCode_set)
3888 m_rawFlags = property(_core_.KeyEvent_m_rawFlags_get, _core_.KeyEvent_m_rawFlags_set)
3889
3890class KeyEventPtr(KeyEvent):
3891 def __init__(self, this):
3892 self.this = this
3893 if not hasattr(self,"thisown"): self.thisown = 0
3894 self.__class__ = KeyEvent
3895_core_.KeyEvent_swigregister(KeyEventPtr)
3896
3897#---------------------------------------------------------------------------
3898
3899class SizeEvent(Event):
093d3ff1 3900 """Proxy of C++ SizeEvent class"""
d55e5bfc
RD
3901 def __repr__(self):
3902 return "<%s.%s; proxy of C++ wxSizeEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
3903 def __init__(self, *args, **kwargs):
3904 """__init__(self, Size sz=DefaultSize, int winid=0) -> SizeEvent"""
3905 newobj = _core_.new_SizeEvent(*args, **kwargs)
3906 self.this = newobj.this
3907 self.thisown = 1
3908 del newobj.thisown
3909 def GetSize(*args, **kwargs):
3910 """GetSize(self) -> Size"""
3911 return _core_.SizeEvent_GetSize(*args, **kwargs)
3912
3913 def GetRect(*args, **kwargs):
3914 """GetRect(self) -> Rect"""
3915 return _core_.SizeEvent_GetRect(*args, **kwargs)
3916
3917 def SetRect(*args, **kwargs):
3918 """SetRect(self, Rect rect)"""
3919 return _core_.SizeEvent_SetRect(*args, **kwargs)
3920
3921 def SetSize(*args, **kwargs):
3922 """SetSize(self, Size size)"""
3923 return _core_.SizeEvent_SetSize(*args, **kwargs)
3924
3925 m_size = property(_core_.SizeEvent_m_size_get, _core_.SizeEvent_m_size_set)
3926 m_rect = property(_core_.SizeEvent_m_rect_get, _core_.SizeEvent_m_rect_set)
3927
3928class SizeEventPtr(SizeEvent):
3929 def __init__(self, this):
3930 self.this = this
3931 if not hasattr(self,"thisown"): self.thisown = 0
3932 self.__class__ = SizeEvent
3933_core_.SizeEvent_swigregister(SizeEventPtr)
3934
3935#---------------------------------------------------------------------------
3936
3937class MoveEvent(Event):
093d3ff1 3938 """Proxy of C++ MoveEvent class"""
d55e5bfc
RD
3939 def __repr__(self):
3940 return "<%s.%s; proxy of C++ wxMoveEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
3941 def __init__(self, *args, **kwargs):
3942 """__init__(self, Point pos=DefaultPosition, int winid=0) -> MoveEvent"""
3943 newobj = _core_.new_MoveEvent(*args, **kwargs)
3944 self.this = newobj.this
3945 self.thisown = 1
3946 del newobj.thisown
3947 def GetPosition(*args, **kwargs):
3948 """GetPosition(self) -> Point"""
3949 return _core_.MoveEvent_GetPosition(*args, **kwargs)
3950
3951 def GetRect(*args, **kwargs):
3952 """GetRect(self) -> Rect"""
3953 return _core_.MoveEvent_GetRect(*args, **kwargs)
3954
3955 def SetRect(*args, **kwargs):
3956 """SetRect(self, Rect rect)"""
3957 return _core_.MoveEvent_SetRect(*args, **kwargs)
3958
3959 def SetPosition(*args, **kwargs):
3960 """SetPosition(self, Point pos)"""
3961 return _core_.MoveEvent_SetPosition(*args, **kwargs)
3962
fef4c27a
RD
3963 m_pos = property(GetPosition, SetPosition)
3964 m_rect = property(GetRect, SetRect)
3965
d55e5bfc
RD
3966
3967class MoveEventPtr(MoveEvent):
3968 def __init__(self, this):
3969 self.this = this
3970 if not hasattr(self,"thisown"): self.thisown = 0
3971 self.__class__ = MoveEvent
3972_core_.MoveEvent_swigregister(MoveEventPtr)
3973
3974#---------------------------------------------------------------------------
3975
3976class PaintEvent(Event):
093d3ff1 3977 """Proxy of C++ PaintEvent class"""
d55e5bfc
RD
3978 def __repr__(self):
3979 return "<%s.%s; proxy of C++ wxPaintEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
3980 def __init__(self, *args, **kwargs):
3981 """__init__(self, int Id=0) -> PaintEvent"""
3982 newobj = _core_.new_PaintEvent(*args, **kwargs)
3983 self.this = newobj.this
3984 self.thisown = 1
3985 del newobj.thisown
3986
3987class PaintEventPtr(PaintEvent):
3988 def __init__(self, this):
3989 self.this = this
3990 if not hasattr(self,"thisown"): self.thisown = 0
3991 self.__class__ = PaintEvent
3992_core_.PaintEvent_swigregister(PaintEventPtr)
3993
3994class NcPaintEvent(Event):
093d3ff1 3995 """Proxy of C++ NcPaintEvent class"""
d55e5bfc
RD
3996 def __repr__(self):
3997 return "<%s.%s; proxy of C++ wxNcPaintEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
3998 def __init__(self, *args, **kwargs):
3999 """__init__(self, int winid=0) -> NcPaintEvent"""
4000 newobj = _core_.new_NcPaintEvent(*args, **kwargs)
4001 self.this = newobj.this
4002 self.thisown = 1
4003 del newobj.thisown
4004
4005class NcPaintEventPtr(NcPaintEvent):
4006 def __init__(self, this):
4007 self.this = this
4008 if not hasattr(self,"thisown"): self.thisown = 0
4009 self.__class__ = NcPaintEvent
4010_core_.NcPaintEvent_swigregister(NcPaintEventPtr)
4011
4012#---------------------------------------------------------------------------
4013
4014class EraseEvent(Event):
093d3ff1 4015 """Proxy of C++ EraseEvent class"""
d55e5bfc
RD
4016 def __repr__(self):
4017 return "<%s.%s; proxy of C++ wxEraseEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
4018 def __init__(self, *args, **kwargs):
4019 """__init__(self, int Id=0, DC dc=(wxDC *) NULL) -> EraseEvent"""
4020 newobj = _core_.new_EraseEvent(*args, **kwargs)
4021 self.this = newobj.this
4022 self.thisown = 1
4023 del newobj.thisown
4024 def GetDC(*args, **kwargs):
4025 """GetDC(self) -> DC"""
4026 return _core_.EraseEvent_GetDC(*args, **kwargs)
4027
4028
4029class EraseEventPtr(EraseEvent):
4030 def __init__(self, this):
4031 self.this = this
4032 if not hasattr(self,"thisown"): self.thisown = 0
4033 self.__class__ = EraseEvent
4034_core_.EraseEvent_swigregister(EraseEventPtr)
4035
4036#---------------------------------------------------------------------------
4037
4038class FocusEvent(Event):
093d3ff1 4039 """Proxy of C++ FocusEvent class"""
d55e5bfc
RD
4040 def __repr__(self):
4041 return "<%s.%s; proxy of C++ wxFocusEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
4042 def __init__(self, *args, **kwargs):
4043 """__init__(self, wxEventType type=wxEVT_NULL, int winid=0) -> FocusEvent"""
4044 newobj = _core_.new_FocusEvent(*args, **kwargs)
4045 self.this = newobj.this
4046 self.thisown = 1
4047 del newobj.thisown
4048 def GetWindow(*args, **kwargs):
4049 """GetWindow(self) -> Window"""
4050 return _core_.FocusEvent_GetWindow(*args, **kwargs)
4051
4052 def SetWindow(*args, **kwargs):
4053 """SetWindow(self, Window win)"""
4054 return _core_.FocusEvent_SetWindow(*args, **kwargs)
4055
4056
4057class FocusEventPtr(FocusEvent):
4058 def __init__(self, this):
4059 self.this = this
4060 if not hasattr(self,"thisown"): self.thisown = 0
4061 self.__class__ = FocusEvent
4062_core_.FocusEvent_swigregister(FocusEventPtr)
4063
4064#---------------------------------------------------------------------------
4065
4066class ChildFocusEvent(CommandEvent):
093d3ff1 4067 """Proxy of C++ ChildFocusEvent class"""
d55e5bfc
RD
4068 def __repr__(self):
4069 return "<%s.%s; proxy of C++ wxChildFocusEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
4070 def __init__(self, *args, **kwargs):
4071 """__init__(self, Window win=None) -> ChildFocusEvent"""
4072 newobj = _core_.new_ChildFocusEvent(*args, **kwargs)
4073 self.this = newobj.this
4074 self.thisown = 1
4075 del newobj.thisown
4076 def GetWindow(*args, **kwargs):
4077 """GetWindow(self) -> Window"""
4078 return _core_.ChildFocusEvent_GetWindow(*args, **kwargs)
4079
4080
4081class ChildFocusEventPtr(ChildFocusEvent):
4082 def __init__(self, this):
4083 self.this = this
4084 if not hasattr(self,"thisown"): self.thisown = 0
4085 self.__class__ = ChildFocusEvent
4086_core_.ChildFocusEvent_swigregister(ChildFocusEventPtr)
4087
4088#---------------------------------------------------------------------------
4089
4090class ActivateEvent(Event):
093d3ff1 4091 """Proxy of C++ ActivateEvent class"""
d55e5bfc
RD
4092 def __repr__(self):
4093 return "<%s.%s; proxy of C++ wxActivateEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
4094 def __init__(self, *args, **kwargs):
4095 """__init__(self, wxEventType type=wxEVT_NULL, bool active=True, int Id=0) -> ActivateEvent"""
4096 newobj = _core_.new_ActivateEvent(*args, **kwargs)
4097 self.this = newobj.this
4098 self.thisown = 1
4099 del newobj.thisown
4100 def GetActive(*args, **kwargs):
4101 """GetActive(self) -> bool"""
4102 return _core_.ActivateEvent_GetActive(*args, **kwargs)
4103
4104
4105class ActivateEventPtr(ActivateEvent):
4106 def __init__(self, this):
4107 self.this = this
4108 if not hasattr(self,"thisown"): self.thisown = 0
4109 self.__class__ = ActivateEvent
4110_core_.ActivateEvent_swigregister(ActivateEventPtr)
4111
4112#---------------------------------------------------------------------------
4113
4114class InitDialogEvent(Event):
093d3ff1 4115 """Proxy of C++ InitDialogEvent class"""
d55e5bfc
RD
4116 def __repr__(self):
4117 return "<%s.%s; proxy of C++ wxInitDialogEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
4118 def __init__(self, *args, **kwargs):
4119 """__init__(self, int Id=0) -> InitDialogEvent"""
4120 newobj = _core_.new_InitDialogEvent(*args, **kwargs)
4121 self.this = newobj.this
4122 self.thisown = 1
4123 del newobj.thisown
4124
4125class InitDialogEventPtr(InitDialogEvent):
4126 def __init__(self, this):
4127 self.this = this
4128 if not hasattr(self,"thisown"): self.thisown = 0
4129 self.__class__ = InitDialogEvent
4130_core_.InitDialogEvent_swigregister(InitDialogEventPtr)
4131
4132#---------------------------------------------------------------------------
4133
4134class MenuEvent(Event):
093d3ff1 4135 """Proxy of C++ MenuEvent class"""
d55e5bfc
RD
4136 def __repr__(self):
4137 return "<%s.%s; proxy of C++ wxMenuEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
4138 def __init__(self, *args, **kwargs):
4139 """__init__(self, wxEventType type=wxEVT_NULL, int winid=0, Menu menu=None) -> MenuEvent"""
4140 newobj = _core_.new_MenuEvent(*args, **kwargs)
4141 self.this = newobj.this
4142 self.thisown = 1
4143 del newobj.thisown
4144 def GetMenuId(*args, **kwargs):
4145 """GetMenuId(self) -> int"""
4146 return _core_.MenuEvent_GetMenuId(*args, **kwargs)
4147
4148 def IsPopup(*args, **kwargs):
4149 """IsPopup(self) -> bool"""
4150 return _core_.MenuEvent_IsPopup(*args, **kwargs)
4151
4152 def GetMenu(*args, **kwargs):
4153 """GetMenu(self) -> Menu"""
4154 return _core_.MenuEvent_GetMenu(*args, **kwargs)
4155
4156
4157class MenuEventPtr(MenuEvent):
4158 def __init__(self, this):
4159 self.this = this
4160 if not hasattr(self,"thisown"): self.thisown = 0
4161 self.__class__ = MenuEvent
4162_core_.MenuEvent_swigregister(MenuEventPtr)
4163
4164#---------------------------------------------------------------------------
4165
4166class CloseEvent(Event):
093d3ff1 4167 """Proxy of C++ CloseEvent class"""
d55e5bfc
RD
4168 def __repr__(self):
4169 return "<%s.%s; proxy of C++ wxCloseEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
4170 def __init__(self, *args, **kwargs):
4171 """__init__(self, wxEventType type=wxEVT_NULL, int winid=0) -> CloseEvent"""
4172 newobj = _core_.new_CloseEvent(*args, **kwargs)
4173 self.this = newobj.this
4174 self.thisown = 1
4175 del newobj.thisown
4176 def SetLoggingOff(*args, **kwargs):
4177 """SetLoggingOff(self, bool logOff)"""
4178 return _core_.CloseEvent_SetLoggingOff(*args, **kwargs)
4179
4180 def GetLoggingOff(*args, **kwargs):
4181 """GetLoggingOff(self) -> bool"""
4182 return _core_.CloseEvent_GetLoggingOff(*args, **kwargs)
4183
4184 def Veto(*args, **kwargs):
4185 """Veto(self, bool veto=True)"""
4186 return _core_.CloseEvent_Veto(*args, **kwargs)
4187
4188 def SetCanVeto(*args, **kwargs):
4189 """SetCanVeto(self, bool canVeto)"""
4190 return _core_.CloseEvent_SetCanVeto(*args, **kwargs)
4191
4192 def CanVeto(*args, **kwargs):
4193 """CanVeto(self) -> bool"""
4194 return _core_.CloseEvent_CanVeto(*args, **kwargs)
4195
4196 def GetVeto(*args, **kwargs):
4197 """GetVeto(self) -> bool"""
4198 return _core_.CloseEvent_GetVeto(*args, **kwargs)
4199
4200
4201class CloseEventPtr(CloseEvent):
4202 def __init__(self, this):
4203 self.this = this
4204 if not hasattr(self,"thisown"): self.thisown = 0
4205 self.__class__ = CloseEvent
4206_core_.CloseEvent_swigregister(CloseEventPtr)
4207
4208#---------------------------------------------------------------------------
4209
4210class ShowEvent(Event):
093d3ff1 4211 """Proxy of C++ ShowEvent class"""
d55e5bfc
RD
4212 def __repr__(self):
4213 return "<%s.%s; proxy of C++ wxShowEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
4214 def __init__(self, *args, **kwargs):
4215 """__init__(self, int winid=0, bool show=False) -> ShowEvent"""
4216 newobj = _core_.new_ShowEvent(*args, **kwargs)
4217 self.this = newobj.this
4218 self.thisown = 1
4219 del newobj.thisown
4220 def SetShow(*args, **kwargs):
4221 """SetShow(self, bool show)"""
4222 return _core_.ShowEvent_SetShow(*args, **kwargs)
4223
4224 def GetShow(*args, **kwargs):
4225 """GetShow(self) -> bool"""
4226 return _core_.ShowEvent_GetShow(*args, **kwargs)
4227
4228
4229class ShowEventPtr(ShowEvent):
4230 def __init__(self, this):
4231 self.this = this
4232 if not hasattr(self,"thisown"): self.thisown = 0
4233 self.__class__ = ShowEvent
4234_core_.ShowEvent_swigregister(ShowEventPtr)
4235
4236#---------------------------------------------------------------------------
4237
4238class IconizeEvent(Event):
093d3ff1 4239 """Proxy of C++ IconizeEvent class"""
d55e5bfc
RD
4240 def __repr__(self):
4241 return "<%s.%s; proxy of C++ wxIconizeEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
4242 def __init__(self, *args, **kwargs):
4243 """__init__(self, int id=0, bool iconized=True) -> IconizeEvent"""
4244 newobj = _core_.new_IconizeEvent(*args, **kwargs)
4245 self.this = newobj.this
4246 self.thisown = 1
4247 del newobj.thisown
4248 def Iconized(*args, **kwargs):
4249 """Iconized(self) -> bool"""
4250 return _core_.IconizeEvent_Iconized(*args, **kwargs)
4251
4252
4253class IconizeEventPtr(IconizeEvent):
4254 def __init__(self, this):
4255 self.this = this
4256 if not hasattr(self,"thisown"): self.thisown = 0
4257 self.__class__ = IconizeEvent
4258_core_.IconizeEvent_swigregister(IconizeEventPtr)
4259
4260#---------------------------------------------------------------------------
4261
4262class MaximizeEvent(Event):
093d3ff1 4263 """Proxy of C++ MaximizeEvent class"""
d55e5bfc
RD
4264 def __repr__(self):
4265 return "<%s.%s; proxy of C++ wxMaximizeEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
4266 def __init__(self, *args, **kwargs):
4267 """__init__(self, int id=0) -> MaximizeEvent"""
4268 newobj = _core_.new_MaximizeEvent(*args, **kwargs)
4269 self.this = newobj.this
4270 self.thisown = 1
4271 del newobj.thisown
4272
4273class MaximizeEventPtr(MaximizeEvent):
4274 def __init__(self, this):
4275 self.this = this
4276 if not hasattr(self,"thisown"): self.thisown = 0
4277 self.__class__ = MaximizeEvent
4278_core_.MaximizeEvent_swigregister(MaximizeEventPtr)
4279
4280#---------------------------------------------------------------------------
4281
4282class DropFilesEvent(Event):
093d3ff1 4283 """Proxy of C++ DropFilesEvent class"""
d55e5bfc
RD
4284 def __init__(self): raise RuntimeError, "No constructor defined"
4285 def __repr__(self):
4286 return "<%s.%s; proxy of C++ wxDropFilesEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
4287 def GetPosition(*args, **kwargs):
4288 """GetPosition(self) -> Point"""
4289 return _core_.DropFilesEvent_GetPosition(*args, **kwargs)
4290
4291 def GetNumberOfFiles(*args, **kwargs):
4292 """GetNumberOfFiles(self) -> int"""
4293 return _core_.DropFilesEvent_GetNumberOfFiles(*args, **kwargs)
4294
4295 def GetFiles(*args, **kwargs):
4296 """GetFiles(self) -> PyObject"""
4297 return _core_.DropFilesEvent_GetFiles(*args, **kwargs)
4298
4299
4300class DropFilesEventPtr(DropFilesEvent):
4301 def __init__(self, this):
4302 self.this = this
4303 if not hasattr(self,"thisown"): self.thisown = 0
4304 self.__class__ = DropFilesEvent
4305_core_.DropFilesEvent_swigregister(DropFilesEventPtr)
4306
4307#---------------------------------------------------------------------------
4308
4309UPDATE_UI_PROCESS_ALL = _core_.UPDATE_UI_PROCESS_ALL
4310UPDATE_UI_PROCESS_SPECIFIED = _core_.UPDATE_UI_PROCESS_SPECIFIED
4311class UpdateUIEvent(CommandEvent):
093d3ff1 4312 """Proxy of C++ UpdateUIEvent class"""
d55e5bfc
RD
4313 def __repr__(self):
4314 return "<%s.%s; proxy of C++ wxUpdateUIEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
4315 def __init__(self, *args, **kwargs):
4316 """__init__(self, int commandId=0) -> UpdateUIEvent"""
4317 newobj = _core_.new_UpdateUIEvent(*args, **kwargs)
4318 self.this = newobj.this
4319 self.thisown = 1
4320 del newobj.thisown
4321 def GetChecked(*args, **kwargs):
4322 """GetChecked(self) -> bool"""
4323 return _core_.UpdateUIEvent_GetChecked(*args, **kwargs)
4324
4325 def GetEnabled(*args, **kwargs):
4326 """GetEnabled(self) -> bool"""
4327 return _core_.UpdateUIEvent_GetEnabled(*args, **kwargs)
4328
4329 def GetText(*args, **kwargs):
4330 """GetText(self) -> String"""
4331 return _core_.UpdateUIEvent_GetText(*args, **kwargs)
4332
4333 def GetSetText(*args, **kwargs):
4334 """GetSetText(self) -> bool"""
4335 return _core_.UpdateUIEvent_GetSetText(*args, **kwargs)
4336
4337 def GetSetChecked(*args, **kwargs):
4338 """GetSetChecked(self) -> bool"""
4339 return _core_.UpdateUIEvent_GetSetChecked(*args, **kwargs)
4340
4341 def GetSetEnabled(*args, **kwargs):
4342 """GetSetEnabled(self) -> bool"""
4343 return _core_.UpdateUIEvent_GetSetEnabled(*args, **kwargs)
4344
4345 def Check(*args, **kwargs):
4346 """Check(self, bool check)"""
4347 return _core_.UpdateUIEvent_Check(*args, **kwargs)
4348
4349 def Enable(*args, **kwargs):
4350 """Enable(self, bool enable)"""
4351 return _core_.UpdateUIEvent_Enable(*args, **kwargs)
4352
4353 def SetText(*args, **kwargs):
4354 """SetText(self, String text)"""
4355 return _core_.UpdateUIEvent_SetText(*args, **kwargs)
4356
4357 def SetUpdateInterval(*args, **kwargs):
c24da6d6 4358 """SetUpdateInterval(long updateInterval)"""
d55e5bfc
RD
4359 return _core_.UpdateUIEvent_SetUpdateInterval(*args, **kwargs)
4360
4361 SetUpdateInterval = staticmethod(SetUpdateInterval)
4362 def GetUpdateInterval(*args, **kwargs):
c24da6d6 4363 """GetUpdateInterval() -> long"""
d55e5bfc
RD
4364 return _core_.UpdateUIEvent_GetUpdateInterval(*args, **kwargs)
4365
4366 GetUpdateInterval = staticmethod(GetUpdateInterval)
4367 def CanUpdate(*args, **kwargs):
c24da6d6 4368 """CanUpdate(Window win) -> bool"""
d55e5bfc
RD
4369 return _core_.UpdateUIEvent_CanUpdate(*args, **kwargs)
4370
4371 CanUpdate = staticmethod(CanUpdate)
4372 def ResetUpdateTime(*args, **kwargs):
c24da6d6 4373 """ResetUpdateTime()"""
d55e5bfc
RD
4374 return _core_.UpdateUIEvent_ResetUpdateTime(*args, **kwargs)
4375
4376 ResetUpdateTime = staticmethod(ResetUpdateTime)
4377 def SetMode(*args, **kwargs):
c24da6d6 4378 """SetMode(int mode)"""
d55e5bfc
RD
4379 return _core_.UpdateUIEvent_SetMode(*args, **kwargs)
4380
4381 SetMode = staticmethod(SetMode)
4382 def GetMode(*args, **kwargs):
c24da6d6 4383 """GetMode() -> int"""
d55e5bfc
RD
4384 return _core_.UpdateUIEvent_GetMode(*args, **kwargs)
4385
4386 GetMode = staticmethod(GetMode)
4387
4388class UpdateUIEventPtr(UpdateUIEvent):
4389 def __init__(self, this):
4390 self.this = this
4391 if not hasattr(self,"thisown"): self.thisown = 0
4392 self.__class__ = UpdateUIEvent
4393_core_.UpdateUIEvent_swigregister(UpdateUIEventPtr)
4394
4395def UpdateUIEvent_SetUpdateInterval(*args, **kwargs):
4396 """UpdateUIEvent_SetUpdateInterval(long updateInterval)"""
4397 return _core_.UpdateUIEvent_SetUpdateInterval(*args, **kwargs)
4398
4399def UpdateUIEvent_GetUpdateInterval(*args, **kwargs):
4400 """UpdateUIEvent_GetUpdateInterval() -> long"""
4401 return _core_.UpdateUIEvent_GetUpdateInterval(*args, **kwargs)
4402
4403def UpdateUIEvent_CanUpdate(*args, **kwargs):
4404 """UpdateUIEvent_CanUpdate(Window win) -> bool"""
4405 return _core_.UpdateUIEvent_CanUpdate(*args, **kwargs)
4406
4407def UpdateUIEvent_ResetUpdateTime(*args, **kwargs):
4408 """UpdateUIEvent_ResetUpdateTime()"""
4409 return _core_.UpdateUIEvent_ResetUpdateTime(*args, **kwargs)
4410
4411def UpdateUIEvent_SetMode(*args, **kwargs):
4412 """UpdateUIEvent_SetMode(int mode)"""
4413 return _core_.UpdateUIEvent_SetMode(*args, **kwargs)
4414
4415def UpdateUIEvent_GetMode(*args, **kwargs):
4416 """UpdateUIEvent_GetMode() -> int"""
4417 return _core_.UpdateUIEvent_GetMode(*args, **kwargs)
4418
4419#---------------------------------------------------------------------------
4420
4421class SysColourChangedEvent(Event):
093d3ff1 4422 """Proxy of C++ SysColourChangedEvent class"""
d55e5bfc
RD
4423 def __repr__(self):
4424 return "<%s.%s; proxy of C++ wxSysColourChangedEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
4425 def __init__(self, *args, **kwargs):
4426 """__init__(self) -> SysColourChangedEvent"""
4427 newobj = _core_.new_SysColourChangedEvent(*args, **kwargs)
4428 self.this = newobj.this
4429 self.thisown = 1
4430 del newobj.thisown
4431
4432class SysColourChangedEventPtr(SysColourChangedEvent):
4433 def __init__(self, this):
4434 self.this = this
4435 if not hasattr(self,"thisown"): self.thisown = 0
4436 self.__class__ = SysColourChangedEvent
4437_core_.SysColourChangedEvent_swigregister(SysColourChangedEventPtr)
4438
4439#---------------------------------------------------------------------------
4440
4441class MouseCaptureChangedEvent(Event):
093d3ff1 4442 """Proxy of C++ MouseCaptureChangedEvent class"""
d55e5bfc
RD
4443 def __repr__(self):
4444 return "<%s.%s; proxy of C++ wxMouseCaptureChangedEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
4445 def __init__(self, *args, **kwargs):
4446 """__init__(self, int winid=0, Window gainedCapture=None) -> MouseCaptureChangedEvent"""
4447 newobj = _core_.new_MouseCaptureChangedEvent(*args, **kwargs)
4448 self.this = newobj.this
4449 self.thisown = 1
4450 del newobj.thisown
4451 def GetCapturedWindow(*args, **kwargs):
4452 """GetCapturedWindow(self) -> Window"""
4453 return _core_.MouseCaptureChangedEvent_GetCapturedWindow(*args, **kwargs)
4454
4455
4456class MouseCaptureChangedEventPtr(MouseCaptureChangedEvent):
4457 def __init__(self, this):
4458 self.this = this
4459 if not hasattr(self,"thisown"): self.thisown = 0
4460 self.__class__ = MouseCaptureChangedEvent
4461_core_.MouseCaptureChangedEvent_swigregister(MouseCaptureChangedEventPtr)
4462
4463#---------------------------------------------------------------------------
4464
4465class DisplayChangedEvent(Event):
093d3ff1 4466 """Proxy of C++ DisplayChangedEvent class"""
d55e5bfc
RD
4467 def __repr__(self):
4468 return "<%s.%s; proxy of C++ wxDisplayChangedEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
4469 def __init__(self, *args, **kwargs):
4470 """__init__(self) -> DisplayChangedEvent"""
4471 newobj = _core_.new_DisplayChangedEvent(*args, **kwargs)
4472 self.this = newobj.this
4473 self.thisown = 1
4474 del newobj.thisown
4475
4476class DisplayChangedEventPtr(DisplayChangedEvent):
4477 def __init__(self, this):
4478 self.this = this
4479 if not hasattr(self,"thisown"): self.thisown = 0
4480 self.__class__ = DisplayChangedEvent
4481_core_.DisplayChangedEvent_swigregister(DisplayChangedEventPtr)
4482
4483#---------------------------------------------------------------------------
4484
4485class PaletteChangedEvent(Event):
093d3ff1 4486 """Proxy of C++ PaletteChangedEvent class"""
d55e5bfc
RD
4487 def __repr__(self):
4488 return "<%s.%s; proxy of C++ wxPaletteChangedEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
4489 def __init__(self, *args, **kwargs):
4490 """__init__(self, int id=0) -> PaletteChangedEvent"""
4491 newobj = _core_.new_PaletteChangedEvent(*args, **kwargs)
4492 self.this = newobj.this
4493 self.thisown = 1
4494 del newobj.thisown
4495 def SetChangedWindow(*args, **kwargs):
4496 """SetChangedWindow(self, Window win)"""
4497 return _core_.PaletteChangedEvent_SetChangedWindow(*args, **kwargs)
4498
4499 def GetChangedWindow(*args, **kwargs):
4500 """GetChangedWindow(self) -> Window"""
4501 return _core_.PaletteChangedEvent_GetChangedWindow(*args, **kwargs)
4502
4503
4504class PaletteChangedEventPtr(PaletteChangedEvent):
4505 def __init__(self, this):
4506 self.this = this
4507 if not hasattr(self,"thisown"): self.thisown = 0
4508 self.__class__ = PaletteChangedEvent
4509_core_.PaletteChangedEvent_swigregister(PaletteChangedEventPtr)
4510
4511#---------------------------------------------------------------------------
4512
4513class QueryNewPaletteEvent(Event):
093d3ff1 4514 """Proxy of C++ QueryNewPaletteEvent class"""
d55e5bfc
RD
4515 def __repr__(self):
4516 return "<%s.%s; proxy of C++ wxQueryNewPaletteEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
4517 def __init__(self, *args, **kwargs):
4518 """__init__(self, int winid=0) -> QueryNewPaletteEvent"""
4519 newobj = _core_.new_QueryNewPaletteEvent(*args, **kwargs)
4520 self.this = newobj.this
4521 self.thisown = 1
4522 del newobj.thisown
4523 def SetPaletteRealized(*args, **kwargs):
4524 """SetPaletteRealized(self, bool realized)"""
4525 return _core_.QueryNewPaletteEvent_SetPaletteRealized(*args, **kwargs)
4526
4527 def GetPaletteRealized(*args, **kwargs):
4528 """GetPaletteRealized(self) -> bool"""
4529 return _core_.QueryNewPaletteEvent_GetPaletteRealized(*args, **kwargs)
4530
4531
4532class QueryNewPaletteEventPtr(QueryNewPaletteEvent):
4533 def __init__(self, this):
4534 self.this = this
4535 if not hasattr(self,"thisown"): self.thisown = 0
4536 self.__class__ = QueryNewPaletteEvent
4537_core_.QueryNewPaletteEvent_swigregister(QueryNewPaletteEventPtr)
4538
4539#---------------------------------------------------------------------------
4540
4541class NavigationKeyEvent(Event):
093d3ff1 4542 """Proxy of C++ NavigationKeyEvent class"""
d55e5bfc
RD
4543 def __repr__(self):
4544 return "<%s.%s; proxy of C++ wxNavigationKeyEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
4545 def __init__(self, *args, **kwargs):
4546 """__init__(self) -> NavigationKeyEvent"""
4547 newobj = _core_.new_NavigationKeyEvent(*args, **kwargs)
4548 self.this = newobj.this
4549 self.thisown = 1
4550 del newobj.thisown
4551 def GetDirection(*args, **kwargs):
4552 """GetDirection(self) -> bool"""
4553 return _core_.NavigationKeyEvent_GetDirection(*args, **kwargs)
4554
4555 def SetDirection(*args, **kwargs):
908b74cd 4556 """SetDirection(self, bool forward)"""
d55e5bfc
RD
4557 return _core_.NavigationKeyEvent_SetDirection(*args, **kwargs)
4558
4559 def IsWindowChange(*args, **kwargs):
4560 """IsWindowChange(self) -> bool"""
4561 return _core_.NavigationKeyEvent_IsWindowChange(*args, **kwargs)
4562
4563 def SetWindowChange(*args, **kwargs):
908b74cd 4564 """SetWindowChange(self, bool ischange)"""
d55e5bfc
RD
4565 return _core_.NavigationKeyEvent_SetWindowChange(*args, **kwargs)
4566
908b74cd
RD
4567 def SetFlags(*args, **kwargs):
4568 """SetFlags(self, long flags)"""
4569 return _core_.NavigationKeyEvent_SetFlags(*args, **kwargs)
4570
d55e5bfc
RD
4571 def GetCurrentFocus(*args, **kwargs):
4572 """GetCurrentFocus(self) -> Window"""
4573 return _core_.NavigationKeyEvent_GetCurrentFocus(*args, **kwargs)
4574
4575 def SetCurrentFocus(*args, **kwargs):
4576 """SetCurrentFocus(self, Window win)"""
4577 return _core_.NavigationKeyEvent_SetCurrentFocus(*args, **kwargs)
4578
b0f7404b 4579 IsBackward = _core_.NavigationKeyEvent_IsBackward
908b74cd
RD
4580 IsForward = _core_.NavigationKeyEvent_IsForward
4581 WinChange = _core_.NavigationKeyEvent_WinChange
d55e5bfc
RD
4582
4583class NavigationKeyEventPtr(NavigationKeyEvent):
4584 def __init__(self, this):
4585 self.this = this
4586 if not hasattr(self,"thisown"): self.thisown = 0
4587 self.__class__ = NavigationKeyEvent
4588_core_.NavigationKeyEvent_swigregister(NavigationKeyEventPtr)
4589
4590#---------------------------------------------------------------------------
4591
4592class WindowCreateEvent(CommandEvent):
093d3ff1 4593 """Proxy of C++ WindowCreateEvent class"""
d55e5bfc
RD
4594 def __repr__(self):
4595 return "<%s.%s; proxy of C++ wxWindowCreateEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
4596 def __init__(self, *args, **kwargs):
4597 """__init__(self, Window win=None) -> WindowCreateEvent"""
4598 newobj = _core_.new_WindowCreateEvent(*args, **kwargs)
4599 self.this = newobj.this
4600 self.thisown = 1
4601 del newobj.thisown
4602 def GetWindow(*args, **kwargs):
4603 """GetWindow(self) -> Window"""
4604 return _core_.WindowCreateEvent_GetWindow(*args, **kwargs)
4605
4606
4607class WindowCreateEventPtr(WindowCreateEvent):
4608 def __init__(self, this):
4609 self.this = this
4610 if not hasattr(self,"thisown"): self.thisown = 0
4611 self.__class__ = WindowCreateEvent
4612_core_.WindowCreateEvent_swigregister(WindowCreateEventPtr)
4613
4614class WindowDestroyEvent(CommandEvent):
093d3ff1 4615 """Proxy of C++ WindowDestroyEvent class"""
d55e5bfc
RD
4616 def __repr__(self):
4617 return "<%s.%s; proxy of C++ wxWindowDestroyEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
4618 def __init__(self, *args, **kwargs):
4619 """__init__(self, Window win=None) -> WindowDestroyEvent"""
4620 newobj = _core_.new_WindowDestroyEvent(*args, **kwargs)
4621 self.this = newobj.this
4622 self.thisown = 1
4623 del newobj.thisown
4624 def GetWindow(*args, **kwargs):
4625 """GetWindow(self) -> Window"""
4626 return _core_.WindowDestroyEvent_GetWindow(*args, **kwargs)
4627
4628
4629class WindowDestroyEventPtr(WindowDestroyEvent):
4630 def __init__(self, this):
4631 self.this = this
4632 if not hasattr(self,"thisown"): self.thisown = 0
4633 self.__class__ = WindowDestroyEvent
4634_core_.WindowDestroyEvent_swigregister(WindowDestroyEventPtr)
4635
4636#---------------------------------------------------------------------------
4637
4638class ContextMenuEvent(CommandEvent):
093d3ff1 4639 """Proxy of C++ ContextMenuEvent class"""
d55e5bfc
RD
4640 def __repr__(self):
4641 return "<%s.%s; proxy of C++ wxContextMenuEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
4642 def __init__(self, *args, **kwargs):
4643 """__init__(self, wxEventType type=wxEVT_NULL, int winid=0, Point pt=DefaultPosition) -> ContextMenuEvent"""
4644 newobj = _core_.new_ContextMenuEvent(*args, **kwargs)
4645 self.this = newobj.this
4646 self.thisown = 1
4647 del newobj.thisown
4648 def GetPosition(*args, **kwargs):
4649 """GetPosition(self) -> Point"""
4650 return _core_.ContextMenuEvent_GetPosition(*args, **kwargs)
4651
4652 def SetPosition(*args, **kwargs):
4653 """SetPosition(self, Point pos)"""
4654 return _core_.ContextMenuEvent_SetPosition(*args, **kwargs)
4655
4656
4657class ContextMenuEventPtr(ContextMenuEvent):
4658 def __init__(self, this):
4659 self.this = this
4660 if not hasattr(self,"thisown"): self.thisown = 0
4661 self.__class__ = ContextMenuEvent
4662_core_.ContextMenuEvent_swigregister(ContextMenuEventPtr)
4663
4664#---------------------------------------------------------------------------
4665
4666IDLE_PROCESS_ALL = _core_.IDLE_PROCESS_ALL
4667IDLE_PROCESS_SPECIFIED = _core_.IDLE_PROCESS_SPECIFIED
4668class IdleEvent(Event):
093d3ff1 4669 """Proxy of C++ IdleEvent class"""
d55e5bfc
RD
4670 def __repr__(self):
4671 return "<%s.%s; proxy of C++ wxIdleEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
4672 def __init__(self, *args, **kwargs):
4673 """__init__(self) -> IdleEvent"""
4674 newobj = _core_.new_IdleEvent(*args, **kwargs)
4675 self.this = newobj.this
4676 self.thisown = 1
4677 del newobj.thisown
4678 def RequestMore(*args, **kwargs):
4679 """RequestMore(self, bool needMore=True)"""
4680 return _core_.IdleEvent_RequestMore(*args, **kwargs)
4681
4682 def MoreRequested(*args, **kwargs):
4683 """MoreRequested(self) -> bool"""
4684 return _core_.IdleEvent_MoreRequested(*args, **kwargs)
4685
4686 def SetMode(*args, **kwargs):
c24da6d6 4687 """SetMode(int mode)"""
d55e5bfc
RD
4688 return _core_.IdleEvent_SetMode(*args, **kwargs)
4689
4690 SetMode = staticmethod(SetMode)
4691 def GetMode(*args, **kwargs):
c24da6d6 4692 """GetMode() -> int"""
d55e5bfc
RD
4693 return _core_.IdleEvent_GetMode(*args, **kwargs)
4694
4695 GetMode = staticmethod(GetMode)
4696 def CanSend(*args, **kwargs):
c24da6d6 4697 """CanSend(Window win) -> bool"""
d55e5bfc
RD
4698 return _core_.IdleEvent_CanSend(*args, **kwargs)
4699
4700 CanSend = staticmethod(CanSend)
4701
4702class IdleEventPtr(IdleEvent):
4703 def __init__(self, this):
4704 self.this = this
4705 if not hasattr(self,"thisown"): self.thisown = 0
4706 self.__class__ = IdleEvent
4707_core_.IdleEvent_swigregister(IdleEventPtr)
4708
4709def IdleEvent_SetMode(*args, **kwargs):
4710 """IdleEvent_SetMode(int mode)"""
4711 return _core_.IdleEvent_SetMode(*args, **kwargs)
4712
4713def IdleEvent_GetMode(*args, **kwargs):
4714 """IdleEvent_GetMode() -> int"""
4715 return _core_.IdleEvent_GetMode(*args, **kwargs)
4716
4717def IdleEvent_CanSend(*args, **kwargs):
4718 """IdleEvent_CanSend(Window win) -> bool"""
4719 return _core_.IdleEvent_CanSend(*args, **kwargs)
4720
4721#---------------------------------------------------------------------------
4722
4723class PyEvent(Event):
093d3ff1 4724 """Proxy of C++ PyEvent class"""
d55e5bfc
RD
4725 def __repr__(self):
4726 return "<%s.%s; proxy of C++ wxPyEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
4727 def __init__(self, *args, **kwargs):
4728 """__init__(self, int winid=0, wxEventType commandType=wxEVT_NULL) -> PyEvent"""
4729 newobj = _core_.new_PyEvent(*args, **kwargs)
4730 self.this = newobj.this
4731 self.thisown = 1
4732 del newobj.thisown
4733 self.SetSelf(self)
4734
4735 def __del__(self, destroy=_core_.delete_PyEvent):
4736 """__del__(self)"""
4737 try:
4738 if self.thisown: destroy(self)
4739 except: pass
4740
4741 def SetSelf(*args, **kwargs):
4742 """SetSelf(self, PyObject self)"""
4743 return _core_.PyEvent_SetSelf(*args, **kwargs)
4744
4745 def GetSelf(*args, **kwargs):
4746 """GetSelf(self) -> PyObject"""
4747 return _core_.PyEvent_GetSelf(*args, **kwargs)
4748
4749
4750class PyEventPtr(PyEvent):
4751 def __init__(self, this):
4752 self.this = this
4753 if not hasattr(self,"thisown"): self.thisown = 0
4754 self.__class__ = PyEvent
4755_core_.PyEvent_swigregister(PyEventPtr)
4756
4757class PyCommandEvent(CommandEvent):
093d3ff1 4758 """Proxy of C++ PyCommandEvent class"""
d55e5bfc
RD
4759 def __repr__(self):
4760 return "<%s.%s; proxy of C++ wxPyCommandEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
4761 def __init__(self, *args, **kwargs):
4762 """__init__(self, wxEventType commandType=wxEVT_NULL, int id=0) -> PyCommandEvent"""
4763 newobj = _core_.new_PyCommandEvent(*args, **kwargs)
4764 self.this = newobj.this
4765 self.thisown = 1
4766 del newobj.thisown
4767 self.SetSelf(self)
4768
4769 def __del__(self, destroy=_core_.delete_PyCommandEvent):
4770 """__del__(self)"""
4771 try:
4772 if self.thisown: destroy(self)
4773 except: pass
4774
4775 def SetSelf(*args, **kwargs):
4776 """SetSelf(self, PyObject self)"""
4777 return _core_.PyCommandEvent_SetSelf(*args, **kwargs)
4778
4779 def GetSelf(*args, **kwargs):
4780 """GetSelf(self) -> PyObject"""
4781 return _core_.PyCommandEvent_GetSelf(*args, **kwargs)
4782
4783
4784class PyCommandEventPtr(PyCommandEvent):
4785 def __init__(self, this):
4786 self.this = this
4787 if not hasattr(self,"thisown"): self.thisown = 0
4788 self.__class__ = PyCommandEvent
4789_core_.PyCommandEvent_swigregister(PyCommandEventPtr)
4790
4791#---------------------------------------------------------------------------
4792
4793PYAPP_ASSERT_SUPPRESS = _core_.PYAPP_ASSERT_SUPPRESS
4794PYAPP_ASSERT_EXCEPTION = _core_.PYAPP_ASSERT_EXCEPTION
4795PYAPP_ASSERT_DIALOG = _core_.PYAPP_ASSERT_DIALOG
4796PYAPP_ASSERT_LOG = _core_.PYAPP_ASSERT_LOG
4797PRINT_WINDOWS = _core_.PRINT_WINDOWS
4798PRINT_POSTSCRIPT = _core_.PRINT_POSTSCRIPT
4799class PyApp(EvtHandler):
c24da6d6
RD
4800 """
4801 The ``wx.PyApp`` class is an *implementation detail*, please use the
4802 `wx.App` class (or some other derived class) instead.
4803 """
d55e5bfc
RD
4804 def __repr__(self):
4805 return "<%s.%s; proxy of C++ wxPyApp instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
4806 def __init__(self, *args, **kwargs):
4807 """
4808 __init__(self) -> PyApp
4809
4810 Create a new application object, starting the bootstrap process.
4811 """
4812 newobj = _core_.new_PyApp(*args, **kwargs)
4813 self.this = newobj.this
4814 self.thisown = 1
4815 del newobj.thisown
4816 self._setCallbackInfo(self, PyApp)
4817 self._setOORInfo(self)
4818
4819 def __del__(self, destroy=_core_.delete_PyApp):
4820 """__del__(self)"""
4821 try:
4822 if self.thisown: destroy(self)
4823 except: pass
4824
4825 def _setCallbackInfo(*args, **kwargs):
4826 """_setCallbackInfo(self, PyObject self, PyObject _class)"""
4827 return _core_.PyApp__setCallbackInfo(*args, **kwargs)
4828
4829 def GetAppName(*args, **kwargs):
4830 """
4831 GetAppName(self) -> String
4832
4833 Get the application name.
4834 """
4835 return _core_.PyApp_GetAppName(*args, **kwargs)
4836
4837 def SetAppName(*args, **kwargs):
4838 """
4839 SetAppName(self, String name)
4840
c24da6d6
RD
4841 Set the application name. This value may be used automatically by
4842 `wx.Config` and such.
d55e5bfc
RD
4843 """
4844 return _core_.PyApp_SetAppName(*args, **kwargs)
4845
4846 def GetClassName(*args, **kwargs):
4847 """
4848 GetClassName(self) -> String
4849
4850 Get the application's class name.
4851 """
4852 return _core_.PyApp_GetClassName(*args, **kwargs)
4853
4854 def SetClassName(*args, **kwargs):
4855 """
4856 SetClassName(self, String name)
4857
c24da6d6
RD
4858 Set the application's class name. This value may be used for
4859 X-resources if applicable for the platform
d55e5bfc
RD
4860 """
4861 return _core_.PyApp_SetClassName(*args, **kwargs)
4862
4863 def GetVendorName(*args, **kwargs):
4864 """
4865 GetVendorName(self) -> String
4866
4867 Get the application's vendor name.
4868 """
4869 return _core_.PyApp_GetVendorName(*args, **kwargs)
4870
4871 def SetVendorName(*args, **kwargs):
4872 """
4873 SetVendorName(self, String name)
4874
c24da6d6
RD
4875 Set the application's vendor name. This value may be used
4876 automatically by `wx.Config` and such.
d55e5bfc
RD
4877 """
4878 return _core_.PyApp_SetVendorName(*args, **kwargs)
4879
4880 def GetTraits(*args, **kwargs):
4881 """
4882 GetTraits(self) -> wxAppTraits
4883
c24da6d6
RD
4884 Return (and create if necessary) the app traits object to which we
4885 delegate for everything which either should be configurable by the
4886 user (then he can change the default behaviour simply by overriding
4887 CreateTraits() and returning his own traits object) or which is
4888 GUI/console dependent as then wx.AppTraits allows us to abstract the
4889 differences behind the common facade.
4890
4891 :todo: Add support for overriding CreateAppTraits in wxPython.
d55e5bfc
RD
4892 """
4893 return _core_.PyApp_GetTraits(*args, **kwargs)
4894
4895 def ProcessPendingEvents(*args, **kwargs):
4896 """
4897 ProcessPendingEvents(self)
4898
c24da6d6
RD
4899 Process all events in the Pending Events list -- it is necessary to
4900 call this function to process posted events. This normally happens
4901 during each event loop iteration.
d55e5bfc
RD
4902 """
4903 return _core_.PyApp_ProcessPendingEvents(*args, **kwargs)
4904
4905 def Yield(*args, **kwargs):
4906 """
4907 Yield(self, bool onlyIfNeeded=False) -> bool
4908
c24da6d6
RD
4909 Process all currently pending events right now, instead of waiting
4910 until return to the event loop. It is an error to call ``Yield``
4911 recursively unless the value of ``onlyIfNeeded`` is True.
d55e5bfc 4912
c24da6d6 4913 :warning: This function is dangerous as it can lead to unexpected
79fccf9d
RD
4914 reentrancies (i.e. when called from an event handler it may
4915 result in calling the same event handler again), use with
4916 extreme care or, better, don't use at all!
d55e5bfc 4917
c24da6d6 4918 :see: `wx.Yield`, `wx.YieldIfNeeded`, `wx.SafeYield`
79fccf9d 4919
d55e5bfc
RD
4920 """
4921 return _core_.PyApp_Yield(*args, **kwargs)
4922
4923 def WakeUpIdle(*args, **kwargs):
4924 """
4925 WakeUpIdle(self)
4926
c24da6d6
RD
4927 Make sure that idle events are sent again.
4928 :see: `wx.WakeUpIdle`
d55e5bfc
RD
4929 """
4930 return _core_.PyApp_WakeUpIdle(*args, **kwargs)
4931
84f85550
RD
4932 def IsMainLoopRunning(*args, **kwargs):
4933 """
4934 IsMainLoopRunning() -> bool
4935
4936 Returns True if we're running the main loop, i.e. if the events can
4937 currently be dispatched.
4938 """
4939 return _core_.PyApp_IsMainLoopRunning(*args, **kwargs)
4940
4941 IsMainLoopRunning = staticmethod(IsMainLoopRunning)
d55e5bfc
RD
4942 def MainLoop(*args, **kwargs):
4943 """
4944 MainLoop(self) -> int
4945
c24da6d6
RD
4946 Execute the main GUI loop, the function doesn't normally return until
4947 all top level windows have been closed and destroyed.
d55e5bfc
RD
4948 """
4949 return _core_.PyApp_MainLoop(*args, **kwargs)
4950
4951 def Exit(*args, **kwargs):
4952 """
4953 Exit(self)
4954
4955 Exit the main loop thus terminating the application.
c24da6d6 4956 :see: `wx.Exit`
d55e5bfc
RD
4957 """
4958 return _core_.PyApp_Exit(*args, **kwargs)
4959
4960 def ExitMainLoop(*args, **kwargs):
4961 """
4962 ExitMainLoop(self)
4963
c24da6d6
RD
4964 Exit the main GUI loop during the next iteration of the main
4965 loop, (i.e. it does not stop the program immediately!)
d55e5bfc
RD
4966 """
4967 return _core_.PyApp_ExitMainLoop(*args, **kwargs)
4968
4969 def Pending(*args, **kwargs):
4970 """
4971 Pending(self) -> bool
4972
4973 Returns True if there are unprocessed events in the event queue.
4974 """
4975 return _core_.PyApp_Pending(*args, **kwargs)
4976
4977 def Dispatch(*args, **kwargs):
4978 """
4979 Dispatch(self) -> bool
4980
4981 Process the first event in the event queue (blocks until an event
4982 appears if there are none currently)
4983 """
4984 return _core_.PyApp_Dispatch(*args, **kwargs)
4985
4986 def ProcessIdle(*args, **kwargs):
4987 """
4988 ProcessIdle(self) -> bool
4989
c24da6d6
RD
4990 Called from the MainLoop when the application becomes idle (there are
4991 no pending events) and sends a `wx.IdleEvent` to all interested
4992 parties. Returns True if more idle events are needed, False if not.
d55e5bfc
RD
4993 """
4994 return _core_.PyApp_ProcessIdle(*args, **kwargs)
4995
4996 def SendIdleEvents(*args, **kwargs):
4997 """
4998 SendIdleEvents(self, Window win, IdleEvent event) -> bool
4999
c24da6d6
RD
5000 Send idle event to window and all subwindows. Returns True if more
5001 idle time is requested.
d55e5bfc
RD
5002 """
5003 return _core_.PyApp_SendIdleEvents(*args, **kwargs)
5004
5005 def IsActive(*args, **kwargs):
5006 """
5007 IsActive(self) -> bool
5008
5009 Return True if our app has focus.
5010 """
5011 return _core_.PyApp_IsActive(*args, **kwargs)
5012
5013 def SetTopWindow(*args, **kwargs):
5014 """
5015 SetTopWindow(self, Window win)
5016
c24da6d6 5017 Set the *main* top level window
d55e5bfc
RD
5018 """
5019 return _core_.PyApp_SetTopWindow(*args, **kwargs)
5020
5021 def GetTopWindow(*args, **kwargs):
5022 """
5023 GetTopWindow(self) -> Window
5024
c24da6d6
RD
5025 Return the *main* top level window (if it hadn't been set previously
5026 with SetTopWindow(), will return just some top level window and, if
5027 there not any, will return None)
d55e5bfc
RD
5028 """
5029 return _core_.PyApp_GetTopWindow(*args, **kwargs)
5030
5031 def SetExitOnFrameDelete(*args, **kwargs):
5032 """
5033 SetExitOnFrameDelete(self, bool flag)
5034
c24da6d6
RD
5035 Control the exit behaviour: by default, the program will exit the main
5036 loop (and so, usually, terminate) when the last top-level program
5037 window is deleted. Beware that if you disable this behaviour (with
5038 SetExitOnFrameDelete(False)), you'll have to call ExitMainLoop()
5039 explicitly from somewhere.
d55e5bfc
RD
5040 """
5041 return _core_.PyApp_SetExitOnFrameDelete(*args, **kwargs)
5042
5043 def GetExitOnFrameDelete(*args, **kwargs):
5044 """
5045 GetExitOnFrameDelete(self) -> bool
5046
5047 Get the current exit behaviour setting.
5048 """
5049 return _core_.PyApp_GetExitOnFrameDelete(*args, **kwargs)
5050
5051 def SetUseBestVisual(*args, **kwargs):
5052 """
5053 SetUseBestVisual(self, bool flag)
5054
c24da6d6
RD
5055 Set whether the app should try to use the best available visual on
5056 systems where more than one is available, (Sun, SGI, XFree86 4, etc.)
d55e5bfc
RD
5057 """
5058 return _core_.PyApp_SetUseBestVisual(*args, **kwargs)
5059
5060 def GetUseBestVisual(*args, **kwargs):
5061 """
5062 GetUseBestVisual(self) -> bool
5063
5064 Get current UseBestVisual setting.
5065 """
5066 return _core_.PyApp_GetUseBestVisual(*args, **kwargs)
5067
5068 def SetPrintMode(*args, **kwargs):
5069 """SetPrintMode(self, int mode)"""
5070 return _core_.PyApp_SetPrintMode(*args, **kwargs)
5071
5072 def GetPrintMode(*args, **kwargs):
5073 """GetPrintMode(self) -> int"""
5074 return _core_.PyApp_GetPrintMode(*args, **kwargs)
5075
5076 def SetAssertMode(*args, **kwargs):
5077 """
5078 SetAssertMode(self, int mode)
5079
79fccf9d 5080 Set the OnAssert behaviour for debug and hybrid builds.
d55e5bfc
RD
5081 """
5082 return _core_.PyApp_SetAssertMode(*args, **kwargs)
5083
5084 def GetAssertMode(*args, **kwargs):
5085 """
5086 GetAssertMode(self) -> int
5087
5088 Get the current OnAssert behaviour setting.
5089 """
5090 return _core_.PyApp_GetAssertMode(*args, **kwargs)
5091
5092 def GetMacSupportPCMenuShortcuts(*args, **kwargs):
c24da6d6 5093 """GetMacSupportPCMenuShortcuts() -> bool"""
d55e5bfc
RD
5094 return _core_.PyApp_GetMacSupportPCMenuShortcuts(*args, **kwargs)
5095
5096 GetMacSupportPCMenuShortcuts = staticmethod(GetMacSupportPCMenuShortcuts)
5097 def GetMacAboutMenuItemId(*args, **kwargs):
c24da6d6 5098 """GetMacAboutMenuItemId() -> long"""
d55e5bfc
RD
5099 return _core_.PyApp_GetMacAboutMenuItemId(*args, **kwargs)
5100
5101 GetMacAboutMenuItemId = staticmethod(GetMacAboutMenuItemId)
5102 def GetMacPreferencesMenuItemId(*args, **kwargs):
c24da6d6 5103 """GetMacPreferencesMenuItemId() -> long"""
d55e5bfc
RD
5104 return _core_.PyApp_GetMacPreferencesMenuItemId(*args, **kwargs)
5105
5106 GetMacPreferencesMenuItemId = staticmethod(GetMacPreferencesMenuItemId)
5107 def GetMacExitMenuItemId(*args, **kwargs):
c24da6d6 5108 """GetMacExitMenuItemId() -> long"""
d55e5bfc
RD
5109 return _core_.PyApp_GetMacExitMenuItemId(*args, **kwargs)
5110
5111 GetMacExitMenuItemId = staticmethod(GetMacExitMenuItemId)
5112 def GetMacHelpMenuTitleName(*args, **kwargs):
c24da6d6 5113 """GetMacHelpMenuTitleName() -> String"""
d55e5bfc
RD
5114 return _core_.PyApp_GetMacHelpMenuTitleName(*args, **kwargs)
5115
5116 GetMacHelpMenuTitleName = staticmethod(GetMacHelpMenuTitleName)
5117 def SetMacSupportPCMenuShortcuts(*args, **kwargs):
c24da6d6 5118 """SetMacSupportPCMenuShortcuts(bool val)"""
d55e5bfc
RD
5119 return _core_.PyApp_SetMacSupportPCMenuShortcuts(*args, **kwargs)
5120
5121 SetMacSupportPCMenuShortcuts = staticmethod(SetMacSupportPCMenuShortcuts)
5122 def SetMacAboutMenuItemId(*args, **kwargs):
c24da6d6 5123 """SetMacAboutMenuItemId(long val)"""
d55e5bfc
RD
5124 return _core_.PyApp_SetMacAboutMenuItemId(*args, **kwargs)
5125
5126 SetMacAboutMenuItemId = staticmethod(SetMacAboutMenuItemId)
5127 def SetMacPreferencesMenuItemId(*args, **kwargs):
c24da6d6 5128 """SetMacPreferencesMenuItemId(long val)"""
d55e5bfc
RD
5129 return _core_.PyApp_SetMacPreferencesMenuItemId(*args, **kwargs)
5130
5131 SetMacPreferencesMenuItemId = staticmethod(SetMacPreferencesMenuItemId)
5132 def SetMacExitMenuItemId(*args, **kwargs):
c24da6d6 5133 """SetMacExitMenuItemId(long val)"""
d55e5bfc
RD
5134 return _core_.PyApp_SetMacExitMenuItemId(*args, **kwargs)
5135
5136 SetMacExitMenuItemId = staticmethod(SetMacExitMenuItemId)
5137 def SetMacHelpMenuTitleName(*args, **kwargs):
c24da6d6 5138 """SetMacHelpMenuTitleName(String val)"""
d55e5bfc
RD
5139 return _core_.PyApp_SetMacHelpMenuTitleName(*args, **kwargs)
5140
5141 SetMacHelpMenuTitleName = staticmethod(SetMacHelpMenuTitleName)
5142 def _BootstrapApp(*args, **kwargs):
5143 """
5144 _BootstrapApp(self)
5145
5146 For internal use only
5147 """
5148 return _core_.PyApp__BootstrapApp(*args, **kwargs)
5149
5150 def GetComCtl32Version(*args, **kwargs):
5151 """
c24da6d6 5152 GetComCtl32Version() -> int
d55e5bfc 5153
c24da6d6
RD
5154 Returns 400, 470, 471, etc. for comctl32.dll 4.00, 4.70, 4.71 or 0 if
5155 it wasn't found at all. Raises an exception on non-Windows platforms.
d55e5bfc
RD
5156 """
5157 return _core_.PyApp_GetComCtl32Version(*args, **kwargs)
5158
5159 GetComCtl32Version = staticmethod(GetComCtl32Version)
5160
5161class PyAppPtr(PyApp):
5162 def __init__(self, this):
5163 self.this = this
5164 if not hasattr(self,"thisown"): self.thisown = 0
5165 self.__class__ = PyApp
5166_core_.PyApp_swigregister(PyAppPtr)
5167
84f85550
RD
5168def PyApp_IsMainLoopRunning(*args, **kwargs):
5169 """
5170 PyApp_IsMainLoopRunning() -> bool
5171
5172 Returns True if we're running the main loop, i.e. if the events can
5173 currently be dispatched.
5174 """
5175 return _core_.PyApp_IsMainLoopRunning(*args, **kwargs)
5176
d55e5bfc
RD
5177def PyApp_GetMacSupportPCMenuShortcuts(*args, **kwargs):
5178 """PyApp_GetMacSupportPCMenuShortcuts() -> bool"""
5179 return _core_.PyApp_GetMacSupportPCMenuShortcuts(*args, **kwargs)
5180
5181def PyApp_GetMacAboutMenuItemId(*args, **kwargs):
5182 """PyApp_GetMacAboutMenuItemId() -> long"""
5183 return _core_.PyApp_GetMacAboutMenuItemId(*args, **kwargs)
5184
5185def PyApp_GetMacPreferencesMenuItemId(*args, **kwargs):
5186 """PyApp_GetMacPreferencesMenuItemId() -> long"""
5187 return _core_.PyApp_GetMacPreferencesMenuItemId(*args, **kwargs)
5188
5189def PyApp_GetMacExitMenuItemId(*args, **kwargs):
5190 """PyApp_GetMacExitMenuItemId() -> long"""
5191 return _core_.PyApp_GetMacExitMenuItemId(*args, **kwargs)
5192
5193def PyApp_GetMacHelpMenuTitleName(*args, **kwargs):
5194 """PyApp_GetMacHelpMenuTitleName() -> String"""
5195 return _core_.PyApp_GetMacHelpMenuTitleName(*args, **kwargs)
5196
5197def PyApp_SetMacSupportPCMenuShortcuts(*args, **kwargs):
5198 """PyApp_SetMacSupportPCMenuShortcuts(bool val)"""
5199 return _core_.PyApp_SetMacSupportPCMenuShortcuts(*args, **kwargs)
5200
5201def PyApp_SetMacAboutMenuItemId(*args, **kwargs):
5202 """PyApp_SetMacAboutMenuItemId(long val)"""
5203 return _core_.PyApp_SetMacAboutMenuItemId(*args, **kwargs)
5204
5205def PyApp_SetMacPreferencesMenuItemId(*args, **kwargs):
5206 """PyApp_SetMacPreferencesMenuItemId(long val)"""
5207 return _core_.PyApp_SetMacPreferencesMenuItemId(*args, **kwargs)
5208
5209def PyApp_SetMacExitMenuItemId(*args, **kwargs):
5210 """PyApp_SetMacExitMenuItemId(long val)"""
5211 return _core_.PyApp_SetMacExitMenuItemId(*args, **kwargs)
5212
5213def PyApp_SetMacHelpMenuTitleName(*args, **kwargs):
5214 """PyApp_SetMacHelpMenuTitleName(String val)"""
5215 return _core_.PyApp_SetMacHelpMenuTitleName(*args, **kwargs)
5216
5217def PyApp_GetComCtl32Version(*args, **kwargs):
5218 """
5219 PyApp_GetComCtl32Version() -> int
5220
c24da6d6
RD
5221 Returns 400, 470, 471, etc. for comctl32.dll 4.00, 4.70, 4.71 or 0 if
5222 it wasn't found at all. Raises an exception on non-Windows platforms.
d55e5bfc
RD
5223 """
5224 return _core_.PyApp_GetComCtl32Version(*args, **kwargs)
5225
5226#---------------------------------------------------------------------------
5227
5228
5229def Exit(*args, **kwargs):
5230 """
5231 Exit()
5232
5233 Force an exit of the application. Convenience for wx.GetApp().Exit()
5234 """
5235 return _core_.Exit(*args, **kwargs)
5236
5237def Yield(*args, **kwargs):
5238 """
5239 Yield() -> bool
5240
5241 Yield to other apps/messages. Convenience for wx.GetApp().Yield()
5242 """
5243 return _core_.Yield(*args, **kwargs)
5244
5245def YieldIfNeeded(*args, **kwargs):
5246 """
5247 YieldIfNeeded() -> bool
5248
5249 Yield to other apps/messages. Convenience for wx.GetApp().Yield(True)
5250 """
5251 return _core_.YieldIfNeeded(*args, **kwargs)
5252
5253def SafeYield(*args, **kwargs):
5254 """
5255 SafeYield(Window win=None, bool onlyIfNeeded=False) -> bool
5256
c24da6d6
RD
5257 This function is similar to `wx.Yield`, except that it disables the
5258 user input to all program windows before calling `wx.Yield` and
5259 re-enables it again afterwards. If ``win`` is not None, this window
5260 will remain enabled, allowing the implementation of some limited user
5261 interaction.
d55e5bfc 5262
c24da6d6 5263 :Returns: the result of the call to `wx.Yield`.
d55e5bfc
RD
5264 """
5265 return _core_.SafeYield(*args, **kwargs)
5266
5267def WakeUpIdle(*args, **kwargs):
5268 """
5269 WakeUpIdle()
5270
c24da6d6
RD
5271 Cause the message queue to become empty again, so idle events will be
5272 sent.
d55e5bfc
RD
5273 """
5274 return _core_.WakeUpIdle(*args, **kwargs)
5275
5276def PostEvent(*args, **kwargs):
5277 """
5278 PostEvent(EvtHandler dest, Event event)
5279
c24da6d6
RD
5280 Send an event to a window or other wx.EvtHandler to be processed
5281 later.
d55e5bfc
RD
5282 """
5283 return _core_.PostEvent(*args, **kwargs)
5284
5285def App_CleanUp(*args, **kwargs):
5286 """
5287 App_CleanUp()
5288
79fccf9d 5289 For internal use only, it is used to cleanup after wxWidgets when
c24da6d6 5290 Python shuts down.
d55e5bfc
RD
5291 """
5292 return _core_.App_CleanUp(*args, **kwargs)
5293
5294def GetApp(*args, **kwargs):
5295 """
5296 GetApp() -> PyApp
5297
5298 Return a reference to the current wx.App object.
5299 """
5300 return _core_.GetApp(*args, **kwargs)
5cbf236d
RD
5301
5302def SetDefaultPyEncoding(*args, **kwargs):
5303 """
5304 SetDefaultPyEncoding(string encoding)
5305
5306 Sets the encoding that wxPython will use when it needs to convert a
5307 Python string or unicode object to or from a wxString.
62d32a5f
RD
5308
5309 The default encoding is the value of ``locale.getdefaultlocale()[1]``
5310 but please be aware that the default encoding within the same locale
5311 may be slightly different on different platforms. For example, please
5312 see http://www.alanwood.net/demos/charsetdiffs.html for differences
5313 between the common latin/roman encodings.
5cbf236d
RD
5314 """
5315 return _core_.SetDefaultPyEncoding(*args, **kwargs)
5316
5317def GetDefaultPyEncoding(*args, **kwargs):
5318 """
5319 GetDefaultPyEncoding() -> string
5320
5321 Gets the current encoding that wxPython will use when it needs to
5322 convert a Python string or unicode object to or from a wxString.
5323 """
5324 return _core_.GetDefaultPyEncoding(*args, **kwargs)
d55e5bfc
RD
5325#----------------------------------------------------------------------
5326
5327class PyOnDemandOutputWindow:
5328 """
5329 A class that can be used for redirecting Python's stdout and
5330 stderr streams. It will do nothing until something is wrriten to
5331 the stream at which point it will create a Frame with a text area
5332 and write the text there.
5333 """
5334 def __init__(self, title = "wxPython: stdout/stderr"):
5335 self.frame = None
5336 self.title = title
412d302d
RD
5337 self.pos = wx.DefaultPosition
5338 self.size = (450, 300)
d55e5bfc
RD
5339 self.parent = None
5340
5341 def SetParent(self, parent):
5342 """Set the window to be used as the popup Frame's parent."""
5343 self.parent = parent
5344
5345
5346 def CreateOutputWindow(self, st):
412d302d
RD
5347 self.frame = wx.Frame(self.parent, -1, self.title, self.pos, self.size,
5348 style=wx.DEFAULT_FRAME_STYLE)
d55e5bfc 5349 self.text = wx.TextCtrl(self.frame, -1, "",
412d302d 5350 style=wx.TE_MULTILINE|wx.TE_READONLY)
d55e5bfc 5351 self.text.AppendText(st)
d55e5bfc
RD
5352 self.frame.Show(True)
5353 EVT_CLOSE(self.frame, self.OnCloseWindow)
5354
5355
5356 def OnCloseWindow(self, event):
5357 if self.frame is not None:
5358 self.frame.Destroy()
5359 self.frame = None
5360 self.text = None
5361
5362
5363 # These methods provide the file-like output behaviour.
5364 def write(self, text):
5365 """
5366 Create the output window if needed and write the string to it.
5367 If not called in the context of the gui thread then uses
5368 CallAfter to do the work there.
5369 """
5370 if self.frame is None:
5371 if not wx.Thread_IsMain():
5372 wx.CallAfter(self.CreateOutputWindow, text)
5373 else:
5374 self.CreateOutputWindow(text)
5375 else:
5376 if not wx.Thread_IsMain():
5377 wx.CallAfter(self.text.AppendText, text)
5378 else:
5379 self.text.AppendText(text)
5380
5381
5382 def close(self):
5383 if self.frame is not None:
5384 wx.CallAfter(self.frame.Close)
5385
5386
19272049
RD
5387 def flush(self):
5388 pass
5389
5390
d55e5bfc
RD
5391
5392#----------------------------------------------------------------------
5393
5394_defRedirect = (wx.Platform == '__WXMSW__' or wx.Platform == '__WXMAC__')
5395
5396class App(wx.PyApp):
5397 """
c24da6d6
RD
5398 The ``wx.App`` class represents the application and is used to:
5399
5400 * bootstrap the wxPython system and initialize the underlying
5401 gui toolkit
5402 * set and get application-wide properties
5403 * implement the windowing system main message or event loop,
5404 and to dispatch events to window instances
5405 * etc.
5406
5407 Every application must have a ``wx.App`` instance, and all
5408 creation of UI objects should be delayed until after the
5409 ``wx.App`` object has been created in order to ensure that the gui
5410 platform and wxWidgets have been fully initialized.
5411
5412 Normally you would derive from this class and implement an
5413 ``OnInit`` method that creates a frame and then calls
5414 ``self.SetTopWindow(frame)``.
5415
5416 :see: `wx.PySimpleApp` for a simpler app class that can be used
79fccf9d 5417 directly.
d55e5bfc 5418 """
c24da6d6 5419
d55e5bfc
RD
5420 outputWindowClass = PyOnDemandOutputWindow
5421
c24da6d6
RD
5422 def __init__(self, redirect=_defRedirect, filename=None,
5423 useBestVisual=False, clearSigInt=True):
5424 """
5425 Construct a ``wx.App`` object.
5426
5427 :param redirect: Should ``sys.stdout`` and ``sys.stderr`` be
5428 redirected? Defaults to True on Windows and Mac, False
5429 otherwise. If `filename` is None then output will be
5430 redirected to a window that pops up as needed. (You can
5431 control what kind of window is created for the output by
5432 resetting the class variable ``outputWindowClass`` to a
5433 class of your choosing.)
5434
5435 :param filename: The name of a file to redirect output to, if
5436 redirect is True.
5437
5438 :param useBestVisual: Should the app try to use the best
5439 available visual provided by the system (only relevant on
5440 systems that have more than one visual.) This parameter
5441 must be used instead of calling `SetUseBestVisual` later
5442 on because it must be set before the underlying GUI
5443 toolkit is initialized.
5444
5445 :param clearSigInt: Should SIGINT be cleared? This allows the
5446 app to terminate upon a Ctrl-C in the console like other
5447 GUI apps will.
5448
5449 :note: You should override OnInit to do applicaition
5450 initialization to ensure that the system, toolkit and
5451 wxWidgets are fully initialized.
5452 """
d55e5bfc
RD
5453 wx.PyApp.__init__(self)
5454
5455 if wx.Platform == "__WXMAC__":
5456 try:
5457 import MacOS
5458 if not MacOS.WMAvailable():
5459 print """\
5460This program needs access to the screen. Please run with 'pythonw',
5461not 'python', and only when you are logged in on the main display of
5462your Mac."""
5463 _sys.exit(1)
b1f29bf7
RD
5464 except SystemExit:
5465 raise
d55e5bfc
RD
5466 except:
5467 pass
5468
5469 # This has to be done before OnInit
5470 self.SetUseBestVisual(useBestVisual)
5471
5472 # Set the default handler for SIGINT. This fixes a problem
5473 # where if Ctrl-C is pressed in the console that started this
5474 # app then it will not appear to do anything, (not even send
5475 # KeyboardInterrupt???) but will later segfault on exit. By
5476 # setting the default handler then the app will exit, as
5477 # expected (depending on platform.)
c24da6d6
RD
5478 if clearSigInt:
5479 try:
5480 import signal
5481 signal.signal(signal.SIGINT, signal.SIG_DFL)
5482 except:
5483 pass
d55e5bfc
RD
5484
5485 # Save and redirect the stdio to a window?
5486 self.stdioWin = None
5487 self.saveStdio = (_sys.stdout, _sys.stderr)
5488 if redirect:
5489 self.RedirectStdio(filename)
5490
8fb0e70a
RD
5491 # Use Python's install prefix as the default
5492 wx.StandardPaths.Get().SetInstallPrefix(_sys.prefix)
5493
d55e5bfc
RD
5494 # This finishes the initialization of wxWindows and then calls
5495 # the OnInit that should be present in the derived class
5496 self._BootstrapApp()
5497
5498
5499 def __del__(self):
5500 try:
5501 self.RestoreStdio() # Just in case the MainLoop was overridden
5502 except:
5503 pass
5504
5505
5506 def SetTopWindow(self, frame):
5507 """Set the \"main\" top level window"""
5508 if self.stdioWin:
5509 self.stdioWin.SetParent(frame)
5510 wx.PyApp.SetTopWindow(self, frame)
5511
5512
5513 def MainLoop(self):
5514 """Execute the main GUI event loop"""
5515 wx.PyApp.MainLoop(self)
5516 self.RestoreStdio()
5517
5518
5519 def RedirectStdio(self, filename=None):
5520 """Redirect sys.stdout and sys.stderr to a file or a popup window."""
5521 if filename:
5522 _sys.stdout = _sys.stderr = open(filename, 'a')
5523 else:
5524 self.stdioWin = self.outputWindowClass()
5525 _sys.stdout = _sys.stderr = self.stdioWin
5526
5527
5528 def RestoreStdio(self):
5529 _sys.stdout, _sys.stderr = self.saveStdio
5530
5531
412d302d
RD
5532 def SetOutputWindowAttributes(self, title=None, pos=None, size=None):
5533 """
5534 Set the title, position and/or size of the output window if
f5b96ee1
RD
5535 the stdio has been redirected. This should be called before
5536 any output would cause the output window to be created.
412d302d
RD
5537 """
5538 if self.stdioWin:
5539 if title is not None:
5540 self.stdioWin.title = title
5541 if pos is not None:
5542 self.stdioWin.pos = pos
5543 if size is not None:
5544 self.stdioWin.size = size
5545
5546
5547
d55e5bfc 5548
c24da6d6 5549# change from wx.PyApp_XX to wx.App_XX
d55e5bfc
RD
5550App_GetMacSupportPCMenuShortcuts = _core_.PyApp_GetMacSupportPCMenuShortcuts
5551App_GetMacAboutMenuItemId = _core_.PyApp_GetMacAboutMenuItemId
5552App_GetMacPreferencesMenuItemId = _core_.PyApp_GetMacPreferencesMenuItemId
5553App_GetMacExitMenuItemId = _core_.PyApp_GetMacExitMenuItemId
5554App_GetMacHelpMenuTitleName = _core_.PyApp_GetMacHelpMenuTitleName
5555App_SetMacSupportPCMenuShortcuts = _core_.PyApp_SetMacSupportPCMenuShortcuts
5556App_SetMacAboutMenuItemId = _core_.PyApp_SetMacAboutMenuItemId
5557App_SetMacPreferencesMenuItemId = _core_.PyApp_SetMacPreferencesMenuItemId
5558App_SetMacExitMenuItemId = _core_.PyApp_SetMacExitMenuItemId
5559App_SetMacHelpMenuTitleName = _core_.PyApp_SetMacHelpMenuTitleName
5560App_GetComCtl32Version = _core_.PyApp_GetComCtl32Version
5561
5562#----------------------------------------------------------------------------
5563
5564class PySimpleApp(wx.App):
5565 """
5566 A simple application class. You can just create one of these and
5567 then then make your top level windows later, and not have to worry
c24da6d6 5568 about OnInit. For example::
d55e5bfc 5569
c24da6d6
RD
5570 app = wx.PySimpleApp()
5571 frame = wx.Frame(None, title='Hello World')
5572 frame.Show()
5573 app.MainLoop()
5574
5575 :see: `wx.App`
5576 """
5577
5578 def __init__(self, redirect=False, filename=None,
5579 useBestVisual=False, clearSigInt=True):
5580 """
5581 :see: `wx.App.__init__`
5582 """
5583 wx.App.__init__(self, redirect, filename, useBestVisual, clearSigInt)
d55e5bfc
RD
5584
5585 def OnInit(self):
d55e5bfc
RD
5586 return True
5587
5588
c24da6d6 5589
d55e5bfc
RD
5590# Is anybody using this one?
5591class PyWidgetTester(wx.App):
5592 def __init__(self, size = (250, 100)):
5593 self.size = size
5594 wx.App.__init__(self, 0)
5595
5596 def OnInit(self):
5597 self.frame = wx.Frame(None, -1, "Widget Tester", pos=(0,0), size=self.size)
5598 self.SetTopWindow(self.frame)
5599 return True
5600
c24da6d6
RD
5601 def SetWidget(self, widgetClass, *args, **kwargs):
5602 w = widgetClass(self.frame, *args, **kwargs)
d55e5bfc
RD
5603 self.frame.Show(True)
5604
5605#----------------------------------------------------------------------------
5606# DO NOT hold any other references to this object. This is how we
c24da6d6 5607# know when to cleanup system resources that wxWidgets is holding. When
d55e5bfc 5608# the sys module is unloaded, the refcount on sys.__wxPythonCleanup
c24da6d6 5609# goes to zero and it calls the wx.App_CleanUp function.
d55e5bfc
RD
5610
5611class __wxPyCleanup:
5612 def __init__(self):
5613 self.cleanup = _core_.App_CleanUp
5614 def __del__(self):
5615 self.cleanup()
5616
5617_sys.__wxPythonCleanup = __wxPyCleanup()
5618
5619## # another possible solution, but it gets called too early...
c24da6d6
RD
5620## import atexit
5621## atexit.register(_core_.wxApp_CleanUp)
d55e5bfc
RD
5622
5623
5624#----------------------------------------------------------------------------
5625
5626#---------------------------------------------------------------------------
5627
ae8162c8 5628class EventLoop(object):
093d3ff1 5629 """Proxy of C++ EventLoop class"""
ae8162c8
RD
5630 def __repr__(self):
5631 return "<%s.%s; proxy of C++ wxEventLoop instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
5632 def __init__(self, *args, **kwargs):
5633 """__init__(self) -> EventLoop"""
5634 newobj = _core_.new_EventLoop(*args, **kwargs)
5635 self.this = newobj.this
5636 self.thisown = 1
5637 del newobj.thisown
5638 def __del__(self, destroy=_core_.delete_EventLoop):
5639 """__del__(self)"""
5640 try:
5641 if self.thisown: destroy(self)
5642 except: pass
5643
5644 def Run(*args, **kwargs):
5645 """Run(self) -> int"""
5646 return _core_.EventLoop_Run(*args, **kwargs)
5647
5648 def Exit(*args, **kwargs):
5649 """Exit(self, int rc=0)"""
5650 return _core_.EventLoop_Exit(*args, **kwargs)
5651
5652 def Pending(*args, **kwargs):
5653 """Pending(self) -> bool"""
5654 return _core_.EventLoop_Pending(*args, **kwargs)
5655
5656 def Dispatch(*args, **kwargs):
5657 """Dispatch(self) -> bool"""
5658 return _core_.EventLoop_Dispatch(*args, **kwargs)
5659
5660 def IsRunning(*args, **kwargs):
5661 """IsRunning(self) -> bool"""
5662 return _core_.EventLoop_IsRunning(*args, **kwargs)
5663
5664 def GetActive(*args, **kwargs):
5665 """GetActive() -> EventLoop"""
5666 return _core_.EventLoop_GetActive(*args, **kwargs)
5667
5668 GetActive = staticmethod(GetActive)
5669 def SetActive(*args, **kwargs):
5670 """SetActive(EventLoop loop)"""
5671 return _core_.EventLoop_SetActive(*args, **kwargs)
5672
5673 SetActive = staticmethod(SetActive)
5674
5675class EventLoopPtr(EventLoop):
5676 def __init__(self, this):
5677 self.this = this
5678 if not hasattr(self,"thisown"): self.thisown = 0
5679 self.__class__ = EventLoop
5680_core_.EventLoop_swigregister(EventLoopPtr)
5681
5682def EventLoop_GetActive(*args, **kwargs):
5683 """EventLoop_GetActive() -> EventLoop"""
5684 return _core_.EventLoop_GetActive(*args, **kwargs)
5685
5686def EventLoop_SetActive(*args, **kwargs):
5687 """EventLoop_SetActive(EventLoop loop)"""
5688 return _core_.EventLoop_SetActive(*args, **kwargs)
5689
5690#---------------------------------------------------------------------------
5691
d55e5bfc 5692class AcceleratorEntry(object):
c24da6d6
RD
5693 """
5694 A class used to define items in an `wx.AcceleratorTable`. wxPython
5695 programs can choose to use wx.AcceleratorEntry objects, but using a
5696 list of 3-tuple of integers (flags, keyCode, cmdID) usually works just
79fccf9d 5697 as well. See `__init__` for of the tuple values.
c24da6d6
RD
5698
5699 :see: `wx.AcceleratorTable`
5700 """
d55e5bfc
RD
5701 def __repr__(self):
5702 return "<%s.%s; proxy of C++ wxAcceleratorEntry instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
5703 def __init__(self, *args, **kwargs):
c24da6d6
RD
5704 """
5705 __init__(self, int flags=0, int keyCode=0, int cmdID=0) -> AcceleratorEntry
5706
5707 Construct a wx.AcceleratorEntry.
c24da6d6 5708 """
d55e5bfc
RD
5709 newobj = _core_.new_AcceleratorEntry(*args, **kwargs)
5710 self.this = newobj.this
5711 self.thisown = 1
5712 del newobj.thisown
5713 def __del__(self, destroy=_core_.delete_AcceleratorEntry):
5714 """__del__(self)"""
5715 try:
5716 if self.thisown: destroy(self)
5717 except: pass
5718
5719 def Set(*args, **kwargs):
c24da6d6
RD
5720 """
5721 Set(self, int flags, int keyCode, int cmd)
d55e5bfc 5722
c24da6d6
RD
5723 (Re)set the attributes of a wx.AcceleratorEntry.
5724 :see `__init__`
5725 """
5726 return _core_.AcceleratorEntry_Set(*args, **kwargs)
d55e5bfc
RD
5727
5728 def GetFlags(*args, **kwargs):
c24da6d6
RD
5729 """
5730 GetFlags(self) -> int
5731
5732 Get the AcceleratorEntry's flags.
5733 """
d55e5bfc
RD
5734 return _core_.AcceleratorEntry_GetFlags(*args, **kwargs)
5735
5736 def GetKeyCode(*args, **kwargs):
c24da6d6
RD
5737 """
5738 GetKeyCode(self) -> int
5739
5740 Get the AcceleratorEntry's keycode.
5741 """
d55e5bfc
RD
5742 return _core_.AcceleratorEntry_GetKeyCode(*args, **kwargs)
5743
5744 def GetCommand(*args, **kwargs):
c24da6d6
RD
5745 """
5746 GetCommand(self) -> int
5747
5748 Get the AcceleratorEntry's command ID.
5749 """
d55e5bfc
RD
5750 return _core_.AcceleratorEntry_GetCommand(*args, **kwargs)
5751
5752
5753class AcceleratorEntryPtr(AcceleratorEntry):
5754 def __init__(self, this):
5755 self.this = this
5756 if not hasattr(self,"thisown"): self.thisown = 0
5757 self.__class__ = AcceleratorEntry
5758_core_.AcceleratorEntry_swigregister(AcceleratorEntryPtr)
5759
5760class AcceleratorTable(Object):
c24da6d6
RD
5761 """
5762 An accelerator table allows the application to specify a table of
5763 keyboard shortcuts for menus or other commands. On Windows, menu or
5764 button commands are supported; on GTK, only menu commands are
5765 supported.
c24da6d6 5766 """
d55e5bfc
RD
5767 def __repr__(self):
5768 return "<%s.%s; proxy of C++ wxAcceleratorTable instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
5769 def __init__(self, *args, **kwargs):
5770 """
5771 __init__(entries) -> AcceleratorTable
5772
c24da6d6
RD
5773 Construct an AcceleratorTable from a list of `wx.AcceleratorEntry`
5774 items or or of 3-tuples (flags, keyCode, cmdID)
5775
5776 :see: `wx.AcceleratorEntry`
d55e5bfc
RD
5777 """
5778 newobj = _core_.new_AcceleratorTable(*args, **kwargs)
5779 self.this = newobj.this
5780 self.thisown = 1
5781 del newobj.thisown
5782 def __del__(self, destroy=_core_.delete_AcceleratorTable):
5783 """__del__(self)"""
5784 try:
5785 if self.thisown: destroy(self)
5786 except: pass
5787
5788 def Ok(*args, **kwargs):
5789 """Ok(self) -> bool"""
5790 return _core_.AcceleratorTable_Ok(*args, **kwargs)
5791
5792
5793class AcceleratorTablePtr(AcceleratorTable):
5794 def __init__(self, this):
5795 self.this = this
5796 if not hasattr(self,"thisown"): self.thisown = 0
5797 self.__class__ = AcceleratorTable
5798_core_.AcceleratorTable_swigregister(AcceleratorTablePtr)
5799
5800
5801def GetAccelFromString(*args, **kwargs):
5802 """GetAccelFromString(String label) -> AcceleratorEntry"""
5803 return _core_.GetAccelFromString(*args, **kwargs)
5804#---------------------------------------------------------------------------
5805
5806class VisualAttributes(object):
5807 """struct containing all the visual attributes of a control"""
5808 def __repr__(self):
5809 return "<%s.%s; proxy of C++ wxVisualAttributes instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
5810 def __init__(self, *args, **kwargs):
5811 """
5812 __init__(self) -> VisualAttributes
5813
5814 struct containing all the visual attributes of a control
5815 """
5816 newobj = _core_.new_VisualAttributes(*args, **kwargs)
5817 self.this = newobj.this
5818 self.thisown = 1
5819 del newobj.thisown
5820 def __del__(self, destroy=_core_.delete_VisualAttributes):
5821 """__del__(self)"""
5822 try:
5823 if self.thisown: destroy(self)
5824 except: pass
5825
5826 font = property(_core_.VisualAttributes_font_get, _core_.VisualAttributes_font_set)
5827 colFg = property(_core_.VisualAttributes_colFg_get, _core_.VisualAttributes_colFg_set)
5828 colBg = property(_core_.VisualAttributes_colBg_get, _core_.VisualAttributes_colBg_set)
5829
5830class VisualAttributesPtr(VisualAttributes):
5831 def __init__(self, this):
5832 self.this = this
5833 if not hasattr(self,"thisown"): self.thisown = 0
5834 self.__class__ = VisualAttributes
5835_core_.VisualAttributes_swigregister(VisualAttributesPtr)
5836NullAcceleratorTable = cvar.NullAcceleratorTable
5837PanelNameStr = cvar.PanelNameStr
5838
5839WINDOW_VARIANT_NORMAL = _core_.WINDOW_VARIANT_NORMAL
5840WINDOW_VARIANT_SMALL = _core_.WINDOW_VARIANT_SMALL
5841WINDOW_VARIANT_MINI = _core_.WINDOW_VARIANT_MINI
5842WINDOW_VARIANT_LARGE = _core_.WINDOW_VARIANT_LARGE
5843WINDOW_VARIANT_MAX = _core_.WINDOW_VARIANT_MAX
5844class Window(EvtHandler):
5845 """
5846 wx.Window is the base class for all windows and represents any visible
5847 object on the screen. All controls, top level windows and so on are
5848 wx.Windows. Sizers and device contexts are not however, as they don't
5849 appear on screen themselves.
5850
5851 """
5852 def __repr__(self):
5853 return "<%s.%s; proxy of C++ wxWindow instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
5854 def __init__(self, *args, **kwargs):
5855 """
5856 __init__(self, Window parent, int id=-1, Point pos=DefaultPosition,
5857 Size size=DefaultSize, long style=0, String name=PanelNameStr) -> Window
5858
5859 Construct and show a generic Window.
5860 """
5861 newobj = _core_.new_Window(*args, **kwargs)
5862 self.this = newobj.this
5863 self.thisown = 1
5864 del newobj.thisown
5865 self._setOORInfo(self)
5866
5867 def Create(*args, **kwargs):
5868 """
5869 Create(self, Window parent, int id=-1, Point pos=DefaultPosition,
5870 Size size=DefaultSize, long style=0, String name=PanelNameStr) -> bool
5871
5872 Create the GUI part of the Window for 2-phase creation mode.
5873 """
5874 return _core_.Window_Create(*args, **kwargs)
5875
5876 def Close(*args, **kwargs):
5877 """
5878 Close(self, bool force=False) -> bool
5879
5880 This function simply generates a EVT_CLOSE event whose handler usually
5881 tries to close the window. It doesn't close the window itself,
5882 however. If force is False (the default) then the window's close
5883 handler will be allowed to veto the destruction of the window.
d55e5bfc
RD
5884 """
5885 return _core_.Window_Close(*args, **kwargs)
5886
5887 def Destroy(*args, **kwargs):
5888 """
5889 Destroy(self) -> bool
5890
5891 Destroys the window safely. Frames and dialogs are not destroyed
5892 immediately when this function is called -- they are added to a list
5893 of windows to be deleted on idle time, when all the window's events
5894 have been processed. This prevents problems with events being sent to
5895 non-existent windows.
5896
5897 Returns True if the window has either been successfully deleted, or it
5898 has been added to the list of windows pending real deletion.
5899 """
5900 return _core_.Window_Destroy(*args, **kwargs)
5901
5902 def DestroyChildren(*args, **kwargs):
5903 """
5904 DestroyChildren(self) -> bool
5905
79fccf9d
RD
5906 Destroys all children of a window. Called automatically by the
5907 destructor.
d55e5bfc
RD
5908 """
5909 return _core_.Window_DestroyChildren(*args, **kwargs)
5910
5911 def IsBeingDeleted(*args, **kwargs):
5912 """
5913 IsBeingDeleted(self) -> bool
5914
5915 Is the window in the process of being deleted?
5916 """
5917 return _core_.Window_IsBeingDeleted(*args, **kwargs)
5918
5919 def SetTitle(*args, **kwargs):
5920 """
5921 SetTitle(self, String title)
5922
5923 Sets the window's title. Applicable only to frames and dialogs.
5924 """
5925 return _core_.Window_SetTitle(*args, **kwargs)
5926
5927 def GetTitle(*args, **kwargs):
5928 """
5929 GetTitle(self) -> String
5930
5931 Gets the window's title. Applicable only to frames and dialogs.
5932 """
5933 return _core_.Window_GetTitle(*args, **kwargs)
5934
5935 def SetLabel(*args, **kwargs):
5936 """
5937 SetLabel(self, String label)
5938
5939 Set the text which the window shows in its label if applicable.
5940 """
5941 return _core_.Window_SetLabel(*args, **kwargs)
5942
5943 def GetLabel(*args, **kwargs):
5944 """
5945 GetLabel(self) -> String
5946
79fccf9d
RD
5947 Generic way of getting a label from any window, for identification
5948 purposes. The interpretation of this function differs from class to
5949 class. For frames and dialogs, the value returned is the title. For
5950 buttons or static text controls, it is the button text. This function
5951 can be useful for meta-programs such as testing tools or special-needs
5952 access programs)which need to identify windows by name.
d55e5bfc
RD
5953 """
5954 return _core_.Window_GetLabel(*args, **kwargs)
5955
5956 def SetName(*args, **kwargs):
5957 """
5958 SetName(self, String name)
5959
79fccf9d
RD
5960 Sets the window's name. The window name is used for ressource setting
5961 in X, it is not the same as the window title/label
d55e5bfc
RD
5962 """
5963 return _core_.Window_SetName(*args, **kwargs)
5964
5965 def GetName(*args, **kwargs):
5966 """
5967 GetName(self) -> String
5968
79fccf9d
RD
5969 Returns the windows name. This name is not guaranteed to be unique;
5970 it is up to the programmer to supply an appropriate name in the window
5971 constructor or via wx.Window.SetName.
d55e5bfc
RD
5972 """
5973 return _core_.Window_GetName(*args, **kwargs)
5974
5975 def SetWindowVariant(*args, **kwargs):
5976 """
5977 SetWindowVariant(self, int variant)
5978
79fccf9d
RD
5979 Sets the variant of the window/font size to use for this window, if
5980 the platform supports variants, for example, wxMac.
d55e5bfc
RD
5981 """
5982 return _core_.Window_SetWindowVariant(*args, **kwargs)
5983
5984 def GetWindowVariant(*args, **kwargs):
5985 """GetWindowVariant(self) -> int"""
5986 return _core_.Window_GetWindowVariant(*args, **kwargs)
5987
5988 def SetId(*args, **kwargs):
5989 """
5990 SetId(self, int winid)
5991
5992 Sets the identifier of the window. Each window has an integer
5993 identifier. If the application has not provided one, an identifier
5994 will be generated. Normally, the identifier should be provided on
5995 creation and should not be modified subsequently.
5996 """
5997 return _core_.Window_SetId(*args, **kwargs)
5998
5999 def GetId(*args, **kwargs):
6000 """
6001 GetId(self) -> int
6002
6003 Returns the identifier of the window. Each window has an integer
6004 identifier. If the application has not provided one (or the default Id
6005 -1 is used) then an unique identifier with a negative value will be
6006 generated.
6007 """
6008 return _core_.Window_GetId(*args, **kwargs)
6009
6010 def NewControlId(*args, **kwargs):
6011 """
c24da6d6 6012 NewControlId() -> int
d55e5bfc
RD
6013
6014 Generate a control id for the controls which were not given one.
6015 """
6016 return _core_.Window_NewControlId(*args, **kwargs)
6017
6018 NewControlId = staticmethod(NewControlId)
6019 def NextControlId(*args, **kwargs):
6020 """
c24da6d6 6021 NextControlId(int winid) -> int
d55e5bfc
RD
6022
6023 Get the id of the control following the one with the given
79fccf9d 6024 autogenerated) id
d55e5bfc
RD
6025 """
6026 return _core_.Window_NextControlId(*args, **kwargs)
6027
6028 NextControlId = staticmethod(NextControlId)
6029 def PrevControlId(*args, **kwargs):
6030 """
c24da6d6 6031 PrevControlId(int winid) -> int
d55e5bfc
RD
6032
6033 Get the id of the control preceding the one with the given
79fccf9d 6034 autogenerated) id
d55e5bfc
RD
6035 """
6036 return _core_.Window_PrevControlId(*args, **kwargs)
6037
6038 PrevControlId = staticmethod(PrevControlId)
6039 def SetSize(*args, **kwargs):
6040 """
6041 SetSize(self, Size size)
6042
6043 Sets the size of the window in pixels.
6044 """
6045 return _core_.Window_SetSize(*args, **kwargs)
6046
6047 def SetDimensions(*args, **kwargs):
6048 """
6049 SetDimensions(self, int x, int y, int width, int height, int sizeFlags=SIZE_AUTO)
6050
6051 Sets the position and size of the window in pixels. The sizeFlags
6052 parameter indicates the interpretation of the other params if they are
62d32a5f
RD
6053 equal to -1.
6054
6055 ======================== ======================================
6056 wx.SIZE_AUTO A -1 indicates that a class-specific
6057 default should be used.
6058 wx.SIZE_USE_EXISTING Axisting dimensions should be used if
6059 -1 values are supplied.
6060 wxSIZE_ALLOW_MINUS_ONE Allow dimensions of -1 and less to be
6061 interpreted as real dimensions, not
6062 default values.
6063 ======================== ======================================
6064
d55e5bfc
RD
6065 """
6066 return _core_.Window_SetDimensions(*args, **kwargs)
6067
6068 def SetRect(*args, **kwargs):
6069 """
6070 SetRect(self, Rect rect, int sizeFlags=SIZE_AUTO)
6071
6072 Sets the position and size of the window in pixels using a wx.Rect.
6073 """
6074 return _core_.Window_SetRect(*args, **kwargs)
6075
6076 def SetSizeWH(*args, **kwargs):
6077 """
6078 SetSizeWH(self, int width, int height)
6079
6080 Sets the size of the window in pixels.
6081 """
6082 return _core_.Window_SetSizeWH(*args, **kwargs)
6083
6084 def Move(*args, **kwargs):
6085 """
6086 Move(self, Point pt, int flags=SIZE_USE_EXISTING)
6087
6088 Moves the window to the given position.
6089 """
6090 return _core_.Window_Move(*args, **kwargs)
6091
6092 SetPosition = Move
6093 def MoveXY(*args, **kwargs):
6094 """
6095 MoveXY(self, int x, int y, int flags=SIZE_USE_EXISTING)
6096
6097 Moves the window to the given position.
6098 """
6099 return _core_.Window_MoveXY(*args, **kwargs)
6100
f8167d6e
RD
6101 def SetBestFittingSize(*args, **kwargs):
6102 """
6103 SetBestFittingSize(self, Size size=DefaultSize)
6104
6105 A 'Smart' SetSize that will fill in default size components with the
6106 window's *best size* values. Also set's the minsize for use with sizers.
6107 """
6108 return _core_.Window_SetBestFittingSize(*args, **kwargs)
6109
d55e5bfc
RD
6110 def Raise(*args, **kwargs):
6111 """
6112 Raise(self)
6113
6114 Raises the window to the top of the window hierarchy if it is a
6115 managed window (dialog or frame).
6116 """
6117 return _core_.Window_Raise(*args, **kwargs)
6118
6119 def Lower(*args, **kwargs):
6120 """
6121 Lower(self)
6122
6123 Lowers the window to the bottom of the window hierarchy if it is a
6124 managed window (dialog or frame).
6125 """
6126 return _core_.Window_Lower(*args, **kwargs)
6127
6128 def SetClientSize(*args, **kwargs):
6129 """
6130 SetClientSize(self, Size size)
6131
6132 This sets the size of the window client area in pixels. Using this
6133 function to size a window tends to be more device-independent than
6134 wx.Window.SetSize, since the application need not worry about what
6135 dimensions the border or title bar have when trying to fit the window
6136 around panel items, for example.
6137 """
6138 return _core_.Window_SetClientSize(*args, **kwargs)
6139
6140 def SetClientSizeWH(*args, **kwargs):
6141 """
6142 SetClientSizeWH(self, int width, int height)
6143
6144 This sets the size of the window client area in pixels. Using this
6145 function to size a window tends to be more device-independent than
6146 wx.Window.SetSize, since the application need not worry about what
6147 dimensions the border or title bar have when trying to fit the window
6148 around panel items, for example.
6149 """
6150 return _core_.Window_SetClientSizeWH(*args, **kwargs)
6151
6152 def SetClientRect(*args, **kwargs):
6153 """
6154 SetClientRect(self, Rect rect)
6155
6156 This sets the size of the window client area in pixels. Using this
6157 function to size a window tends to be more device-independent than
6158 wx.Window.SetSize, since the application need not worry about what
6159 dimensions the border or title bar have when trying to fit the window
6160 around panel items, for example.
6161 """
6162 return _core_.Window_SetClientRect(*args, **kwargs)
6163
6164 def GetPosition(*args, **kwargs):
6165 """
6166 GetPosition(self) -> Point
6167
6168 Get the window's position.
6169 """
6170 return _core_.Window_GetPosition(*args, **kwargs)
6171
6172 def GetPositionTuple(*args, **kwargs):
6173 """
6174 GetPositionTuple() -> (x,y)
6175
6176 Get the window's position.
6177 """
6178 return _core_.Window_GetPositionTuple(*args, **kwargs)
6179
6180 def GetSize(*args, **kwargs):
6181 """
6182 GetSize(self) -> Size
6183
6184 Get the window size.
6185 """
6186 return _core_.Window_GetSize(*args, **kwargs)
6187
6188 def GetSizeTuple(*args, **kwargs):
6189 """
6190 GetSizeTuple() -> (width, height)
6191
6192 Get the window size.
6193 """
6194 return _core_.Window_GetSizeTuple(*args, **kwargs)
6195
6196 def GetRect(*args, **kwargs):
6197 """
6198 GetRect(self) -> Rect
6199
6200 Returns the size and position of the window as a wx.Rect object.
6201 """
6202 return _core_.Window_GetRect(*args, **kwargs)
6203
6204 def GetClientSize(*args, **kwargs):
6205 """
6206 GetClientSize(self) -> Size
6207
6208 This gets the size of the window's 'client area' in pixels. The client
6209 area is the area which may be drawn on by the programmer, excluding
6210 title bar, border, scrollbars, etc.
6211 """
6212 return _core_.Window_GetClientSize(*args, **kwargs)
6213
6214 def GetClientSizeTuple(*args, **kwargs):
6215 """
6216 GetClientSizeTuple() -> (width, height)
6217
6218 This gets the size of the window's 'client area' in pixels. The client
6219 area is the area which may be drawn on by the programmer, excluding
6220 title bar, border, scrollbars, etc.
6221 """
6222 return _core_.Window_GetClientSizeTuple(*args, **kwargs)
6223
6224 def GetClientAreaOrigin(*args, **kwargs):
6225 """
6226 GetClientAreaOrigin(self) -> Point
6227
6228 Get the origin of the client area of the window relative to the
6229 window's top left corner (the client area may be shifted because of
6230 the borders, scrollbars, other decorations...)
6231 """
6232 return _core_.Window_GetClientAreaOrigin(*args, **kwargs)
6233
6234 def GetClientRect(*args, **kwargs):
6235 """
6236 GetClientRect(self) -> Rect
6237
629f3c1b 6238 Get the client area position and size as a `wx.Rect` object.
d55e5bfc
RD
6239 """
6240 return _core_.Window_GetClientRect(*args, **kwargs)
6241
6242 def GetBestSize(*args, **kwargs):
6243 """
6244 GetBestSize(self) -> Size
6245
248ed943 6246 This function returns the best acceptable minimal size for the
79fccf9d
RD
6247 window, if applicable. For example, for a static text control, it will
6248 be the minimal size such that the control label is not truncated. For
6249 windows containing subwindows (suzh aswx.Panel), the size returned by
6250 this function will be the same as the size the window would have had
6251 after calling Fit.
d55e5bfc
RD
6252 """
6253 return _core_.Window_GetBestSize(*args, **kwargs)
6254
6255 def GetBestSizeTuple(*args, **kwargs):
6256 """
6257 GetBestSizeTuple() -> (width, height)
6258
248ed943 6259 This function returns the best acceptable minimal size for the
79fccf9d
RD
6260 window, if applicable. For example, for a static text control, it will
6261 be the minimal size such that the control label is not truncated. For
6262 windows containing subwindows (suzh aswx.Panel), the size returned by
6263 this function will be the same as the size the window would have had
6264 after calling Fit.
d55e5bfc
RD
6265 """
6266 return _core_.Window_GetBestSizeTuple(*args, **kwargs)
6267
a001823c
RD
6268 def InvalidateBestSize(*args, **kwargs):
6269 """
6270 InvalidateBestSize(self)
6271
6272 Reset the cached best size value so it will be recalculated the next
6273 time it is needed.
6274 """
6275 return _core_.Window_InvalidateBestSize(*args, **kwargs)
6276
6277 def GetBestFittingSize(*args, **kwargs):
6278 """
6279 GetBestFittingSize(self) -> Size
6280
6281 This function will merge the window's best size into the window's
6282 minimum size, giving priority to the min size components, and returns
6283 the results.
6284
6285 """
6286 return _core_.Window_GetBestFittingSize(*args, **kwargs)
6287
d55e5bfc
RD
6288 def GetAdjustedBestSize(*args, **kwargs):
6289 """
6290 GetAdjustedBestSize(self) -> Size
6291
6292 This method is similar to GetBestSize, except in one
6293 thing. GetBestSize should return the minimum untruncated size of the
6294 window, while this method will return the largest of BestSize and any
6295 user specified minimum size. ie. it is the minimum size the window
6296 should currently be drawn at, not the minimal size it can possibly
6297 tolerate.
6298 """
6299 return _core_.Window_GetAdjustedBestSize(*args, **kwargs)
6300
6301 def Center(*args, **kwargs):
6302 """
6303 Center(self, int direction=BOTH)
6304
6305 Centers the window. The parameter specifies the direction for
6306 cetering, and may be wx.HORIZONTAL, wx.VERTICAL or wx.BOTH. It may
6307 also include wx.CENTER_ON_SCREEN flag if you want to center the window
6308 on the entire screen and not on its parent window. If it is a
6309 top-level window and has no parent then it will always be centered
6310 relative to the screen.
6311 """
6312 return _core_.Window_Center(*args, **kwargs)
6313
6314 Centre = Center
6315 def CenterOnScreen(*args, **kwargs):
6316 """
6317 CenterOnScreen(self, int dir=BOTH)
6318
6319 Center on screen (only works for top level windows)
6320 """
6321 return _core_.Window_CenterOnScreen(*args, **kwargs)
6322
6323 CentreOnScreen = CenterOnScreen
6324 def CenterOnParent(*args, **kwargs):
6325 """
6326 CenterOnParent(self, int dir=BOTH)
6327
6328 Center with respect to the the parent window
6329 """
6330 return _core_.Window_CenterOnParent(*args, **kwargs)
6331
6332 CentreOnParent = CenterOnParent
6333 def Fit(*args, **kwargs):
6334 """
6335 Fit(self)
6336
6337 Sizes the window so that it fits around its subwindows. This function
6338 won't do anything if there are no subwindows and will only really work
6339 correctly if sizers are used for the subwindows layout. Also, if the
6340 window has exactly one subwindow it is better (faster and the result
6341 is more precise as Fit adds some margin to account for fuzziness of
6342 its calculations) to call window.SetClientSize(child.GetSize())
6343 instead of calling Fit.
6344 """
6345 return _core_.Window_Fit(*args, **kwargs)
6346
6347 def FitInside(*args, **kwargs):
6348 """
6349 FitInside(self)
6350
6351 Similar to Fit, but sizes the interior (virtual) size of a
6352 window. Mainly useful with scrolled windows to reset scrollbars after
6353 sizing changes that do not trigger a size event, and/or scrolled
6354 windows without an interior sizer. This function similarly won't do
6355 anything if there are no subwindows.
6356 """
6357 return _core_.Window_FitInside(*args, **kwargs)
6358
03837c5c 6359 def SetSizeHints(*args, **kwargs):
d55e5bfc
RD
6360 """
6361 SetSizeHints(self, int minW, int minH, int maxW=-1, int maxH=-1, int incW=-1,
6362 int incH=-1)
d55e5bfc
RD
6363
6364 Allows specification of minimum and maximum window sizes, and window
6365 size increments. If a pair of values is not set (or set to -1), the
6366 default values will be used. If this function is called, the user
908b74cd
RD
6367 will not be able to size the window outside the given bounds (if it is
6368 a top-level window.) Sizers will also inspect the minimum window size
6369 and will use that value if set when calculating layout.
6370
6371 The resizing increments are only significant under Motif or Xt.
d55e5bfc 6372 """
03837c5c 6373 return _core_.Window_SetSizeHints(*args, **kwargs)
d55e5bfc 6374
03837c5c
RD
6375 def SetSizeHintsSz(*args, **kwargs):
6376 """
6377 SetSizeHintsSz(self, Size minSize, Size maxSize=DefaultSize, Size incSize=DefaultSize)
6378
6379 Allows specification of minimum and maximum window sizes, and window
6380 size increments. If a pair of values is not set (or set to -1), the
6381 default values will be used. If this function is called, the user
6382 will not be able to size the window outside the given bounds (if it is
6383 a top-level window.) Sizers will also inspect the minimum window size
6384 and will use that value if set when calculating layout.
6385
6386 The resizing increments are only significant under Motif or Xt.
6387 """
6388 return _core_.Window_SetSizeHintsSz(*args, **kwargs)
6389
6390 def SetVirtualSizeHints(*args, **kwargs):
d55e5bfc 6391 """
908b74cd 6392 SetVirtualSizeHints(self, int minW, int minH, int maxW=-1, int maxH=-1)
d55e5bfc
RD
6393
6394 Allows specification of minimum and maximum virtual window sizes. If a
6395 pair of values is not set (or set to -1), the default values will be
6396 used. If this function is called, the user will not be able to size
6397 the virtual area of the window outside the given bounds.
6398 """
03837c5c
RD
6399 return _core_.Window_SetVirtualSizeHints(*args, **kwargs)
6400
6401 def SetVirtualSizeHintsSz(*args, **kwargs):
6402 """
6403 SetVirtualSizeHintsSz(self, Size minSize, Size maxSize=DefaultSize)
6404
6405 Allows specification of minimum and maximum virtual window sizes. If a
6406 pair of values is not set (or set to -1), the default values will be
6407 used. If this function is called, the user will not be able to size
6408 the virtual area of the window outside the given bounds.
6409 """
6410 return _core_.Window_SetVirtualSizeHintsSz(*args, **kwargs)
d55e5bfc 6411
908b74cd
RD
6412 def GetMaxSize(*args, **kwargs):
6413 """GetMaxSize(self) -> Size"""
6414 return _core_.Window_GetMaxSize(*args, **kwargs)
6415
6416 def GetMinSize(*args, **kwargs):
6417 """GetMinSize(self) -> Size"""
6418 return _core_.Window_GetMinSize(*args, **kwargs)
6419
6420 def SetMinSize(*args, **kwargs):
6421 """
6422 SetMinSize(self, Size minSize)
6423
6424 A more convenient method than `SetSizeHints` for setting just the
6425 min size.
6426 """
6427 return _core_.Window_SetMinSize(*args, **kwargs)
6428
6429 def SetMaxSize(*args, **kwargs):
6430 """
6431 SetMaxSize(self, Size maxSize)
6432
6433 A more convenient method than `SetSizeHints` for setting just the
6434 max size.
6435 """
6436 return _core_.Window_SetMaxSize(*args, **kwargs)
6437
d55e5bfc
RD
6438 def GetMinWidth(*args, **kwargs):
6439 """GetMinWidth(self) -> int"""
6440 return _core_.Window_GetMinWidth(*args, **kwargs)
6441
6442 def GetMinHeight(*args, **kwargs):
6443 """GetMinHeight(self) -> int"""
6444 return _core_.Window_GetMinHeight(*args, **kwargs)
6445
6446 def GetMaxWidth(*args, **kwargs):
6447 """GetMaxWidth(self) -> int"""
6448 return _core_.Window_GetMaxWidth(*args, **kwargs)
6449
6450 def GetMaxHeight(*args, **kwargs):
6451 """GetMaxHeight(self) -> int"""
6452 return _core_.Window_GetMaxHeight(*args, **kwargs)
6453
d55e5bfc
RD
6454 def SetVirtualSize(*args, **kwargs):
6455 """
6456 SetVirtualSize(self, Size size)
6457
6458 Set the the virtual size of a window in pixels. For most windows this
6459 is just the client area of the window, but for some like scrolled
6460 windows it is more or less independent of the screen window size.
6461 """
6462 return _core_.Window_SetVirtualSize(*args, **kwargs)
6463
6464 def SetVirtualSizeWH(*args, **kwargs):
6465 """
6466 SetVirtualSizeWH(self, int w, int h)
6467
6468 Set the the virtual size of a window in pixels. For most windows this
6469 is just the client area of the window, but for some like scrolled
6470 windows it is more or less independent of the screen window size.
6471 """
6472 return _core_.Window_SetVirtualSizeWH(*args, **kwargs)
6473
6474 def GetVirtualSize(*args, **kwargs):
6475 """
6476 GetVirtualSize(self) -> Size
6477
6478 Get the the virtual size of the window in pixels. For most windows
6479 this is just the client area of the window, but for some like scrolled
6480 windows it is more or less independent of the screen window size.
6481 """
6482 return _core_.Window_GetVirtualSize(*args, **kwargs)
6483
6484 def GetVirtualSizeTuple(*args, **kwargs):
6485 """
6486 GetVirtualSizeTuple() -> (width, height)
6487
6488 Get the the virtual size of the window in pixels. For most windows
6489 this is just the client area of the window, but for some like scrolled
6490 windows it is more or less independent of the screen window size.
6491 """
6492 return _core_.Window_GetVirtualSizeTuple(*args, **kwargs)
6493
6494 def GetBestVirtualSize(*args, **kwargs):
6495 """
6496 GetBestVirtualSize(self) -> Size
6497
6498 Return the largest of ClientSize and BestSize (as determined by a
6499 sizer, interior children, or other means)
6500 """
6501 return _core_.Window_GetBestVirtualSize(*args, **kwargs)
6502
6503 def Show(*args, **kwargs):
6504 """
6505 Show(self, bool show=True) -> bool
6506
6507 Shows or hides the window. You may need to call Raise for a top level
6508 window if you want to bring it to top, although this is not needed if
6509 Show is called immediately after the frame creation. Returns True if
6510 the window has been shown or hidden or False if nothing was done
6511 because it already was in the requested state.
6512 """
6513 return _core_.Window_Show(*args, **kwargs)
6514
6515 def Hide(*args, **kwargs):
6516 """
6517 Hide(self) -> bool
6518
6519 Equivalent to calling Show(False).
6520 """
6521 return _core_.Window_Hide(*args, **kwargs)
6522
6523 def Enable(*args, **kwargs):
6524 """
6525 Enable(self, bool enable=True) -> bool
6526
6527 Enable or disable the window for user input. Note that when a parent
6528 window is disabled, all of its children are disabled as well and they
6529 are reenabled again when the parent is. Returns true if the window
6530 has been enabled or disabled, false if nothing was done, i.e. if the
6531 window had already been in the specified state.
6532 """
6533 return _core_.Window_Enable(*args, **kwargs)
6534
6535 def Disable(*args, **kwargs):
6536 """
6537 Disable(self) -> bool
6538
6539 Disables the window, same as Enable(false).
6540 """
6541 return _core_.Window_Disable(*args, **kwargs)
6542
6543 def IsShown(*args, **kwargs):
6544 """
6545 IsShown(self) -> bool
6546
6547 Returns true if the window is shown, false if it has been hidden.
6548 """
6549 return _core_.Window_IsShown(*args, **kwargs)
6550
6551 def IsEnabled(*args, **kwargs):
6552 """
6553 IsEnabled(self) -> bool
6554
6555 Returns true if the window is enabled for input, false otherwise.
6556 """
6557 return _core_.Window_IsEnabled(*args, **kwargs)
6558
6559 def SetWindowStyleFlag(*args, **kwargs):
6560 """
6561 SetWindowStyleFlag(self, long style)
6562
79fccf9d
RD
6563 Sets the style of the window. Please note that some styles cannot be
6564 changed after the window creation and that Refresh() might need to be
6565 called after changing the others for the change to take place
6566 immediately.
d55e5bfc
RD
6567 """
6568 return _core_.Window_SetWindowStyleFlag(*args, **kwargs)
6569
6570 def GetWindowStyleFlag(*args, **kwargs):
6571 """
6572 GetWindowStyleFlag(self) -> long
6573
6574 Gets the window style that was passed to the constructor or Create
6575 method.
6576 """
6577 return _core_.Window_GetWindowStyleFlag(*args, **kwargs)
6578
6579 SetWindowStyle = SetWindowStyleFlag; GetWindowStyle = GetWindowStyleFlag
6580 def HasFlag(*args, **kwargs):
6581 """
6582 HasFlag(self, int flag) -> bool
6583
6584 Test if the given style is set for this window.
6585 """
6586 return _core_.Window_HasFlag(*args, **kwargs)
6587
6588 def IsRetained(*args, **kwargs):
6589 """
6590 IsRetained(self) -> bool
6591
6592 Returns true if the window is retained, false otherwise. Retained
6593 windows are only available on X platforms.
6594 """
6595 return _core_.Window_IsRetained(*args, **kwargs)
6596
6597 def SetExtraStyle(*args, **kwargs):
6598 """
6599 SetExtraStyle(self, long exStyle)
6600
6601 Sets the extra style bits for the window. Extra styles are the less
6602 often used style bits which can't be set with the constructor or with
6603 SetWindowStyleFlag()
6604 """
6605 return _core_.Window_SetExtraStyle(*args, **kwargs)
6606
6607 def GetExtraStyle(*args, **kwargs):
6608 """
6609 GetExtraStyle(self) -> long
6610
6611 Returns the extra style bits for the window.
6612 """
6613 return _core_.Window_GetExtraStyle(*args, **kwargs)
6614
6615 def MakeModal(*args, **kwargs):
6616 """
6617 MakeModal(self, bool modal=True)
6618
6619 Disables all other windows in the application so that the user can
6620 only interact with this window. Passing False will reverse this
6621 effect.
6622 """
6623 return _core_.Window_MakeModal(*args, **kwargs)
6624
6625 def SetThemeEnabled(*args, **kwargs):
6626 """
6627 SetThemeEnabled(self, bool enableTheme)
6628
6629 This function tells a window if it should use the system's "theme"
6630 code to draw the windows' background instead if its own background
6631 drawing code. This will only have an effect on platforms that support
6632 the notion of themes in user defined windows. One such platform is
6633 GTK+ where windows can have (very colourful) backgrounds defined by a
6634 user's selected theme.
6635
6636 Dialogs, notebook pages and the status bar have this flag set to true
6637 by default so that the default look and feel is simulated best.
6638 """
6639 return _core_.Window_SetThemeEnabled(*args, **kwargs)
6640
6641 def GetThemeEnabled(*args, **kwargs):
6642 """
6643 GetThemeEnabled(self) -> bool
6644
6645 Return the themeEnabled flag.
6646 """
6647 return _core_.Window_GetThemeEnabled(*args, **kwargs)
6648
6649 def SetFocus(*args, **kwargs):
6650 """
6651 SetFocus(self)
6652
6653 Set's the focus to this window, allowing it to receive keyboard input.
6654 """
6655 return _core_.Window_SetFocus(*args, **kwargs)
6656
6657 def SetFocusFromKbd(*args, **kwargs):
6658 """
6659 SetFocusFromKbd(self)
6660
6661 Set focus to this window as the result of a keyboard action. Normally
6662 only called internally.
6663 """
6664 return _core_.Window_SetFocusFromKbd(*args, **kwargs)
6665
6666 def FindFocus(*args, **kwargs):
6667 """
c24da6d6 6668 FindFocus() -> Window
d55e5bfc
RD
6669
6670 Returns the window or control that currently has the keyboard focus,
6671 or None.
6672 """
6673 return _core_.Window_FindFocus(*args, **kwargs)
6674
6675 FindFocus = staticmethod(FindFocus)
6676 def AcceptsFocus(*args, **kwargs):
6677 """
6678 AcceptsFocus(self) -> bool
6679
6680 Can this window have focus?
6681 """
6682 return _core_.Window_AcceptsFocus(*args, **kwargs)
6683
6684 def AcceptsFocusFromKeyboard(*args, **kwargs):
6685 """
6686 AcceptsFocusFromKeyboard(self) -> bool
6687
6688 Can this window be given focus by keyboard navigation? if not, the
6689 only way to give it focus (provided it accepts it at all) is to click
6690 it.
6691 """
6692 return _core_.Window_AcceptsFocusFromKeyboard(*args, **kwargs)
6693
6694 def GetDefaultItem(*args, **kwargs):
6695 """
6696 GetDefaultItem(self) -> Window
6697
6698 Get the default child of this parent, i.e. the one which is activated
6699 by pressing <Enter> such as the OK button on a wx.Dialog.
6700 """
6701 return _core_.Window_GetDefaultItem(*args, **kwargs)
6702
6703 def SetDefaultItem(*args, **kwargs):
6704 """
6705 SetDefaultItem(self, Window child) -> Window
6706
6707 Set this child as default, return the old default.
6708 """
6709 return _core_.Window_SetDefaultItem(*args, **kwargs)
6710
6711 def SetTmpDefaultItem(*args, **kwargs):
6712 """
6713 SetTmpDefaultItem(self, Window win)
6714
6715 Set this child as temporary default
6716 """
6717 return _core_.Window_SetTmpDefaultItem(*args, **kwargs)
6718
908b74cd
RD
6719 def Navigate(*args, **kwargs):
6720 """
6721 Navigate(self, int flags=NavigationKeyEvent.IsForward) -> bool
6722
a8eff060
RD
6723 Does keyboard navigation from this window to another, by sending a
6724 `wx.NavigationKeyEvent`.
908b74cd
RD
6725 """
6726 return _core_.Window_Navigate(*args, **kwargs)
6727
bf26d883
RD
6728 def MoveAfterInTabOrder(*args, **kwargs):
6729 """
6730 MoveAfterInTabOrder(self, Window win)
6731
6732 Moves this window in the tab navigation order after the specified
6733 sibling window. This means that when the user presses the TAB key on
6734 that other window, the focus switches to this window.
6735
6736 The default tab order is the same as creation order. This function
6737 and `MoveBeforeInTabOrder` allow to change it after creating all the
6738 windows.
6739
6740 """
6741 return _core_.Window_MoveAfterInTabOrder(*args, **kwargs)
6742
6743 def MoveBeforeInTabOrder(*args, **kwargs):
6744 """
6745 MoveBeforeInTabOrder(self, Window win)
6746
6747 Same as `MoveAfterInTabOrder` except that it inserts this window just
6748 before win instead of putting it right after it.
6749 """
6750 return _core_.Window_MoveBeforeInTabOrder(*args, **kwargs)
6751
d55e5bfc
RD
6752 def GetChildren(*args, **kwargs):
6753 """
6754 GetChildren(self) -> PyObject
6755
6756 Returns a list of the window's children. NOTE: Currently this is a
6757 copy of the child window list maintained by the window, so the return
6758 value of this function is only valid as long as the window's children
6759 do not change.
6760 """
6761 return _core_.Window_GetChildren(*args, **kwargs)
6762
6763 def GetParent(*args, **kwargs):
6764 """
6765 GetParent(self) -> Window
6766
6767 Returns the parent window of this window, or None if there isn't one.
6768 """
6769 return _core_.Window_GetParent(*args, **kwargs)
6770
6771 def GetGrandParent(*args, **kwargs):
6772 """
6773 GetGrandParent(self) -> Window
6774
79fccf9d
RD
6775 Returns the parent of the parent of this window, or None if there
6776 isn't one.
d55e5bfc
RD
6777 """
6778 return _core_.Window_GetGrandParent(*args, **kwargs)
6779
6780 def IsTopLevel(*args, **kwargs):
6781 """
6782 IsTopLevel(self) -> bool
6783
6784 Returns true if the given window is a top-level one. Currently all
6785 frames and dialogs are always considered to be top-level windows (even
6786 if they have a parent window).
6787 """
6788 return _core_.Window_IsTopLevel(*args, **kwargs)
6789
6790 def Reparent(*args, **kwargs):
6791 """
6792 Reparent(self, Window newParent) -> bool
6793
6794 Reparents the window, i.e the window will be removed from its current
6795 parent window (e.g. a non-standard toolbar in a wxFrame) and then
6796 re-inserted into another. Available on Windows and GTK. Returns True
6797 if the parent was changed, False otherwise (error or newParent ==
6798 oldParent)
6799 """
6800 return _core_.Window_Reparent(*args, **kwargs)
6801
6802 def AddChild(*args, **kwargs):
6803 """
6804 AddChild(self, Window child)
6805
6806 Adds a child window. This is called automatically by window creation
6807 functions so should not be required by the application programmer.
6808 """
6809 return _core_.Window_AddChild(*args, **kwargs)
6810
6811 def RemoveChild(*args, **kwargs):
6812 """
6813 RemoveChild(self, Window child)
6814
6815 Removes a child window. This is called automatically by window
6816 deletion functions so should not be required by the application
6817 programmer.
6818 """
6819 return _core_.Window_RemoveChild(*args, **kwargs)
6820
6821 def FindWindowById(*args, **kwargs):
6822 """
6823 FindWindowById(self, long winid) -> Window
6824
6825 Find a chld of this window by window ID
6826 """
6827 return _core_.Window_FindWindowById(*args, **kwargs)
6828
6829 def FindWindowByName(*args, **kwargs):
6830 """
6831 FindWindowByName(self, String name) -> Window
6832
6833 Find a child of this window by name
6834 """
6835 return _core_.Window_FindWindowByName(*args, **kwargs)
6836
6837 def GetEventHandler(*args, **kwargs):
6838 """
6839 GetEventHandler(self) -> EvtHandler
6840
6841 Returns the event handler for this window. By default, the window is
6842 its own event handler.
6843 """
6844 return _core_.Window_GetEventHandler(*args, **kwargs)
6845
6846 def SetEventHandler(*args, **kwargs):
6847 """
6848 SetEventHandler(self, EvtHandler handler)
6849
6850 Sets the event handler for this window. An event handler is an object
6851 that is capable of processing the events sent to a window. By default,
6852 the window is its own event handler, but an application may wish to
6853 substitute another, for example to allow central implementation of
6854 event-handling for a variety of different window classes.
6855
79fccf9d 6856 It is usually better to use `wx.Window.PushEventHandler` since this sets
d55e5bfc
RD
6857 up a chain of event handlers, where an event not handled by one event
6858 handler is handed to the next one in the chain.
6859 """
6860 return _core_.Window_SetEventHandler(*args, **kwargs)
6861
6862 def PushEventHandler(*args, **kwargs):
6863 """
6864 PushEventHandler(self, EvtHandler handler)
6865
6866 Pushes this event handler onto the event handler stack for the window.
6867 An event handler is an object that is capable of processing the events
6868 sent to a window. By default, the window is its own event handler, but
6869 an application may wish to substitute another, for example to allow
6870 central implementation of event-handling for a variety of different
6871 window classes.
6872
6873 wx.Window.PushEventHandler allows an application to set up a chain of
6874 event handlers, where an event not handled by one event handler is
79fccf9d 6875 handed to the next one in the chain. Use `wx.Window.PopEventHandler` to
d55e5bfc
RD
6876 remove the event handler.
6877 """
6878 return _core_.Window_PushEventHandler(*args, **kwargs)
6879
6880 def PopEventHandler(*args, **kwargs):
6881 """
6882 PopEventHandler(self, bool deleteHandler=False) -> EvtHandler
6883
6884 Removes and returns the top-most event handler on the event handler
6885 stack. If deleteHandler is True then the wx.EvtHandler object will be
6886 destroyed after it is popped.
6887 """
6888 return _core_.Window_PopEventHandler(*args, **kwargs)
6889
6890 def RemoveEventHandler(*args, **kwargs):
6891 """
6892 RemoveEventHandler(self, EvtHandler handler) -> bool
6893
79fccf9d
RD
6894 Find the given handler in the event handler chain and remove (but not
6895 delete) it from the event handler chain, return True if it was found
6896 and False otherwise (this also results in an assert failure so this
6897 function should only be called when the handler is supposed to be
6898 there.)
d55e5bfc
RD
6899 """
6900 return _core_.Window_RemoveEventHandler(*args, **kwargs)
6901
6902 def SetValidator(*args, **kwargs):
6903 """
6904 SetValidator(self, Validator validator)
6905
6906 Deletes the current validator (if any) and sets the window validator,
6907 having called wx.Validator.Clone to create a new validator of this
6908 type.
6909 """
6910 return _core_.Window_SetValidator(*args, **kwargs)
6911
6912 def GetValidator(*args, **kwargs):
6913 """
6914 GetValidator(self) -> Validator
6915
6916 Returns a pointer to the current validator for the window, or None if
6917 there is none.
6918 """
6919 return _core_.Window_GetValidator(*args, **kwargs)
6920
6921 def Validate(*args, **kwargs):
6922 """
6923 Validate(self) -> bool
6924
6925 Validates the current values of the child controls using their
79fccf9d
RD
6926 validators. If the window has wx.WS_EX_VALIDATE_RECURSIVELY extra
6927 style flag set, the method will also call Validate() of all child
6928 windows. Returns false if any of the validations failed.
d55e5bfc
RD
6929 """
6930 return _core_.Window_Validate(*args, **kwargs)
6931
6932 def TransferDataToWindow(*args, **kwargs):
6933 """
6934 TransferDataToWindow(self) -> bool
6935
79fccf9d
RD
6936 Transfers values to child controls from data areas specified by their
6937 validators. If the window has wx.WS_EX_VALIDATE_RECURSIVELY extra
6938 style flag set, the method will also call TransferDataToWindow() of
6939 all child windows.
d55e5bfc
RD
6940 """
6941 return _core_.Window_TransferDataToWindow(*args, **kwargs)
6942
6943 def TransferDataFromWindow(*args, **kwargs):
6944 """
6945 TransferDataFromWindow(self) -> bool
6946
79fccf9d
RD
6947 Transfers values from child controls to data areas specified by their
6948 validators. Returns false if a transfer failed. If the window has
6949 wx.WS_EX_VALIDATE_RECURSIVELY extra style flag set, the method will
6950 also call TransferDataFromWindow() of all child windows.
d55e5bfc
RD
6951 """
6952 return _core_.Window_TransferDataFromWindow(*args, **kwargs)
6953
6954 def InitDialog(*args, **kwargs):
6955 """
6956 InitDialog(self)
6957
79fccf9d
RD
6958 Sends an EVT_INIT_DIALOG event, whose handler usually transfers data
6959 to the dialog via validators.
d55e5bfc
RD
6960 """
6961 return _core_.Window_InitDialog(*args, **kwargs)
6962
6963 def SetAcceleratorTable(*args, **kwargs):
6964 """
6965 SetAcceleratorTable(self, AcceleratorTable accel)
6966
6967 Sets the accelerator table for this window.
6968 """
6969 return _core_.Window_SetAcceleratorTable(*args, **kwargs)
6970
6971 def GetAcceleratorTable(*args, **kwargs):
6972 """
6973 GetAcceleratorTable(self) -> AcceleratorTable
6974
6975 Gets the accelerator table for this window.
6976 """
6977 return _core_.Window_GetAcceleratorTable(*args, **kwargs)
6978
6979 def RegisterHotKey(*args, **kwargs):
6980 """
6981 RegisterHotKey(self, int hotkeyId, int modifiers, int keycode) -> bool
6982
6983 Registers a system wide hotkey. Every time the user presses the hotkey
6984 registered here, this window will receive a hotkey event. It will
6985 receive the event even if the application is in the background and
6986 does not have the input focus because the user is working with some
6987 other application. To bind an event handler function to this hotkey
6988 use EVT_HOTKEY with an id equal to hotkeyId. Returns True if the
6989 hotkey was registered successfully.
6990 """
6991 return _core_.Window_RegisterHotKey(*args, **kwargs)
6992
6993 def UnregisterHotKey(*args, **kwargs):
6994 """
6995 UnregisterHotKey(self, int hotkeyId) -> bool
6996
6997 Unregisters a system wide hotkey.
6998 """
6999 return _core_.Window_UnregisterHotKey(*args, **kwargs)
7000
7001 def ConvertDialogPointToPixels(*args, **kwargs):
7002 """
7003 ConvertDialogPointToPixels(self, Point pt) -> Point
7004
7005 Converts a point or size from dialog units to pixels. Dialog units
7006 are used for maintaining a dialog's proportions even if the font
7007 changes. For the x dimension, the dialog units are multiplied by the
7008 average character width and then divided by 4. For the y dimension,
7009 the dialog units are multiplied by the average character height and
7010 then divided by 8.
7011 """
7012 return _core_.Window_ConvertDialogPointToPixels(*args, **kwargs)
7013
7014 def ConvertDialogSizeToPixels(*args, **kwargs):
7015 """
7016 ConvertDialogSizeToPixels(self, Size sz) -> Size
7017
7018 Converts a point or size from dialog units to pixels. Dialog units
7019 are used for maintaining a dialog's proportions even if the font
7020 changes. For the x dimension, the dialog units are multiplied by the
7021 average character width and then divided by 4. For the y dimension,
7022 the dialog units are multiplied by the average character height and
7023 then divided by 8.
7024 """
7025 return _core_.Window_ConvertDialogSizeToPixels(*args, **kwargs)
7026
7027 def DLG_PNT(*args, **kwargs):
7028 """
7029 DLG_PNT(self, Point pt) -> Point
7030
7031 Converts a point or size from dialog units to pixels. Dialog units
7032 are used for maintaining a dialog's proportions even if the font
7033 changes. For the x dimension, the dialog units are multiplied by the
7034 average character width and then divided by 4. For the y dimension,
7035 the dialog units are multiplied by the average character height and
7036 then divided by 8.
7037 """
7038 return _core_.Window_DLG_PNT(*args, **kwargs)
7039
7040 def DLG_SZE(*args, **kwargs):
7041 """
7042 DLG_SZE(self, Size sz) -> Size
7043
7044 Converts a point or size from dialog units to pixels. Dialog units
7045 are used for maintaining a dialog's proportions even if the font
7046 changes. For the x dimension, the dialog units are multiplied by the
7047 average character width and then divided by 4. For the y dimension,
7048 the dialog units are multiplied by the average character height and
7049 then divided by 8.
7050 """
7051 return _core_.Window_DLG_SZE(*args, **kwargs)
7052
7053 def ConvertPixelPointToDialog(*args, **kwargs):
7054 """ConvertPixelPointToDialog(self, Point pt) -> Point"""
7055 return _core_.Window_ConvertPixelPointToDialog(*args, **kwargs)
7056
7057 def ConvertPixelSizeToDialog(*args, **kwargs):
7058 """ConvertPixelSizeToDialog(self, Size sz) -> Size"""
7059 return _core_.Window_ConvertPixelSizeToDialog(*args, **kwargs)
7060
7061 def WarpPointer(*args, **kwargs):
7062 """
7063 WarpPointer(self, int x, int y)
7064
7065 Moves the pointer to the given position on the window.
7066
7067 NOTE: This function is not supported under Mac because Apple Human
7068 Interface Guidelines forbid moving the mouse cursor programmatically.
7069 """
7070 return _core_.Window_WarpPointer(*args, **kwargs)
7071
7072 def CaptureMouse(*args, **kwargs):
7073 """
7074 CaptureMouse(self)
7075
7076 Directs all mouse input to this window. Call wx.Window.ReleaseMouse to
7077 release the capture.
7078
7079 Note that wxWindows maintains the stack of windows having captured the
7080 mouse and when the mouse is released the capture returns to the window
7081 which had had captured it previously and it is only really released if
7082 there were no previous window. In particular, this means that you must
7083 release the mouse as many times as you capture it.
7084 """
7085 return _core_.Window_CaptureMouse(*args, **kwargs)
7086
7087 def ReleaseMouse(*args, **kwargs):
7088 """
7089 ReleaseMouse(self)
7090
7091 Releases mouse input captured with wx.Window.CaptureMouse.
7092 """
7093 return _core_.Window_ReleaseMouse(*args, **kwargs)
7094
7095 def GetCapture(*args, **kwargs):
7096 """
c24da6d6 7097 GetCapture() -> Window
d55e5bfc
RD
7098
7099 Returns the window which currently captures the mouse or None
7100 """
7101 return _core_.Window_GetCapture(*args, **kwargs)
7102
7103 GetCapture = staticmethod(GetCapture)
7104 def HasCapture(*args, **kwargs):
7105 """
7106 HasCapture(self) -> bool
7107
7108 Returns true if this window has the current mouse capture.
7109 """
7110 return _core_.Window_HasCapture(*args, **kwargs)
7111
7112 def Refresh(*args, **kwargs):
7113 """
7114 Refresh(self, bool eraseBackground=True, Rect rect=None)
7115
7116 Mark the specified rectangle (or the whole window) as "dirty" so it
7117 will be repainted. Causes an EVT_PAINT event to be generated and sent
7118 to the window.
7119 """
7120 return _core_.Window_Refresh(*args, **kwargs)
7121
7122 def RefreshRect(*args, **kwargs):
7123 """
fef4c27a 7124 RefreshRect(self, Rect rect, bool eraseBackground=True)
d55e5bfc
RD
7125
7126 Redraws the contents of the given rectangle: the area inside it will
7127 be repainted. This is the same as Refresh but has a nicer syntax.
7128 """
7129 return _core_.Window_RefreshRect(*args, **kwargs)
7130
7131 def Update(*args, **kwargs):
7132 """
7133 Update(self)
7134
7135 Calling this method immediately repaints the invalidated area of the
7136 window instead of waiting for the EVT_PAINT event to happen, (normally
7137 this would usually only happen when the flow of control returns to the
7138 event loop.) Notice that this function doesn't refresh the window and
7139 does nothing if the window has been already repainted. Use Refresh
7140 first if you want to immediately redraw the window (or some portion of
7141 it) unconditionally.
7142 """
7143 return _core_.Window_Update(*args, **kwargs)
7144
7145 def ClearBackground(*args, **kwargs):
7146 """
7147 ClearBackground(self)
7148
7149 Clears the window by filling it with the current background
7150 colour. Does not cause an erase background event to be generated.
7151 """
7152 return _core_.Window_ClearBackground(*args, **kwargs)
7153
7154 def Freeze(*args, **kwargs):
7155 """
7156 Freeze(self)
7157
79fccf9d
RD
7158 Freezes the window or, in other words, prevents any updates from
7159 taking place on screen, the window is not redrawn at all. Thaw must be
7160 called to reenable window redrawing. Calls to Freeze/Thaw may be
7161 nested, with the actual Thaw being delayed until all the nesting has
7162 been undone.
d55e5bfc
RD
7163
7164 This method is useful for visual appearance optimization (for example,
7165 it is a good idea to use it before inserting large amount of text into
7166 a wxTextCtrl under wxGTK) but is not implemented on all platforms nor
7167 for all controls so it is mostly just a hint to wxWindows and not a
7168 mandatory directive.
7169 """
7170 return _core_.Window_Freeze(*args, **kwargs)
7171
7172 def Thaw(*args, **kwargs):
7173 """
7174 Thaw(self)
7175
7176 Reenables window updating after a previous call to Freeze. Calls to
79fccf9d
RD
7177 Freeze/Thaw may be nested, so Thaw must be called the same number of
7178 times that Freeze was before the window will be updated.
d55e5bfc
RD
7179 """
7180 return _core_.Window_Thaw(*args, **kwargs)
7181
7182 def PrepareDC(*args, **kwargs):
7183 """
7184 PrepareDC(self, DC dc)
7185
7186 Call this function to prepare the device context for drawing a
7187 scrolled image. It sets the device origin according to the current
7188 scroll position.
7189 """
7190 return _core_.Window_PrepareDC(*args, **kwargs)
7191
7192 def GetUpdateRegion(*args, **kwargs):
7193 """
7194 GetUpdateRegion(self) -> Region
7195
7196 Returns the region specifying which parts of the window have been
7197 damaged. Should only be called within an EVT_PAINT handler.
7198 """
7199 return _core_.Window_GetUpdateRegion(*args, **kwargs)
7200
7201 def GetUpdateClientRect(*args, **kwargs):
7202 """
7203 GetUpdateClientRect(self) -> Rect
7204
7205 Get the update rectangle region bounding box in client coords.
7206 """
7207 return _core_.Window_GetUpdateClientRect(*args, **kwargs)
7208
7209 def IsExposed(*args, **kwargs):
7210 """
7211 IsExposed(self, int x, int y, int w=1, int h=1) -> bool
7212
7213 Returns true if the given point or rectangle area has been exposed
7214 since the last repaint. Call this in an paint event handler to
7215 optimize redrawing by only redrawing those areas, which have been
7216 exposed.
7217 """
7218 return _core_.Window_IsExposed(*args, **kwargs)
7219
7220 def IsExposedPoint(*args, **kwargs):
7221 """
7222 IsExposedPoint(self, Point pt) -> bool
7223
7224 Returns true if the given point or rectangle area has been exposed
7225 since the last repaint. Call this in an paint event handler to
7226 optimize redrawing by only redrawing those areas, which have been
7227 exposed.
7228 """
7229 return _core_.Window_IsExposedPoint(*args, **kwargs)
7230
7231 def IsExposedRect(*args, **kwargs):
7232 """
7233 IsExposedRect(self, Rect rect) -> bool
7234
7235 Returns true if the given point or rectangle area has been exposed
7236 since the last repaint. Call this in an paint event handler to
7237 optimize redrawing by only redrawing those areas, which have been
7238 exposed.
7239 """
7240 return _core_.Window_IsExposedRect(*args, **kwargs)
7241
7242 def GetDefaultAttributes(*args, **kwargs):
7243 """
7244 GetDefaultAttributes(self) -> VisualAttributes
7245
79fccf9d
RD
7246 Get the default attributes for an instance of this class. This is
7247 useful if you want to use the same font or colour in your own control
7248 as in a standard control -- which is a much better idea than hard
7249 coding specific colours or fonts which might look completely out of
caef1a4d 7250 place on the user's system, especially if it uses themes.
d55e5bfc
RD
7251 """
7252 return _core_.Window_GetDefaultAttributes(*args, **kwargs)
7253
7254 def GetClassDefaultAttributes(*args, **kwargs):
7255 """
c24da6d6 7256 GetClassDefaultAttributes(int variant=WINDOW_VARIANT_NORMAL) -> VisualAttributes
d55e5bfc 7257
79fccf9d
RD
7258 Get the default attributes for this class. This is useful if you want
7259 to use the same font or colour in your own control as in a standard
7260 control -- which is a much better idea than hard coding specific
caef1a4d
RD
7261 colours or fonts which might look completely out of place on the
7262 user's system, especially if it uses themes.
d55e5bfc
RD
7263
7264 The variant parameter is only relevant under Mac currently and is
79fccf9d 7265 ignore under other platforms. Under Mac, it will change the size of
caef1a4d
RD
7266 the returned font. See `wx.Window.SetWindowVariant` for more about
7267 this.
d55e5bfc
RD
7268 """
7269 return _core_.Window_GetClassDefaultAttributes(*args, **kwargs)
7270
7271 GetClassDefaultAttributes = staticmethod(GetClassDefaultAttributes)
7272 def SetBackgroundColour(*args, **kwargs):
7273 """
7274 SetBackgroundColour(self, Colour colour) -> bool
7275
7276 Sets the background colour of the window. Returns True if the colour
7277 was changed. The background colour is usually painted by the default
7278 EVT_ERASE_BACKGROUND event handler function under Windows and
f8167d6e
RD
7279 automatically under GTK. Using `wx.NullColour` will reset the window
7280 to the default background colour.
d55e5bfc 7281
caef1a4d 7282 Note that setting the background colour may not cause an immediate
f8167d6e 7283 refresh, so you may wish to call `ClearBackground` or `Refresh` after
d55e5bfc
RD
7284 calling this function.
7285
f8167d6e
RD
7286 Using this function will disable attempts to use themes for this
7287 window, if the system supports them. Use with care since usually the
7288 themes represent the appearance chosen by the user to be used for all
7289 applications on the system.
d55e5bfc
RD
7290 """
7291 return _core_.Window_SetBackgroundColour(*args, **kwargs)
7292
412d302d
RD
7293 def SetOwnBackgroundColour(*args, **kwargs):
7294 """SetOwnBackgroundColour(self, Colour colour)"""
7295 return _core_.Window_SetOwnBackgroundColour(*args, **kwargs)
d55e5bfc
RD
7296
7297 def SetForegroundColour(*args, **kwargs):
7298 """
7299 SetForegroundColour(self, Colour colour) -> bool
7300
7301 Sets the foreground colour of the window. Returns True is the colour
7302 was changed. The interpretation of foreground colour is dependent on
7303 the window class; it may be the text colour or other colour, or it may
7304 not be used at all.
7305 """
7306 return _core_.Window_SetForegroundColour(*args, **kwargs)
7307
fa47d7a7
VS
7308 def SetOwnForegroundColour(*args, **kwargs):
7309 """SetOwnForegroundColour(self, Colour colour)"""
7310 return _core_.Window_SetOwnForegroundColour(*args, **kwargs)
d55e5bfc
RD
7311
7312 def GetBackgroundColour(*args, **kwargs):
7313 """
7314 GetBackgroundColour(self) -> Colour
7315
7316 Returns the background colour of the window.
7317 """
7318 return _core_.Window_GetBackgroundColour(*args, **kwargs)
7319
7320 def GetForegroundColour(*args, **kwargs):
7321 """
7322 GetForegroundColour(self) -> Colour
7323
7324 Returns the foreground colour of the window. The interpretation of
7325 foreground colour is dependent on the window class; it may be the text
7326 colour or other colour, or it may not be used at all.
7327 """
7328 return _core_.Window_GetForegroundColour(*args, **kwargs)
7329
0f63ec68
RD
7330 def SetBackgroundStyle(*args, **kwargs):
7331 """
7332 SetBackgroundStyle(self, int style) -> bool
7333
7334 Returns the background style of the window. The background style
7335 indicates how the background of the window is drawn.
7336
7337 ====================== ========================================
7338 wx.BG_STYLE_SYSTEM The background colour or pattern should
7339 be determined by the system
7340 wx.BG_STYLE_COLOUR The background should be a solid colour
7341 wx.BG_STYLE_CUSTOM The background will be implemented by the
7342 application.
7343 ====================== ========================================
7344
7345 On GTK+, use of wx.BG_STYLE_CUSTOM allows the flicker-free drawing of
7346 a custom background, such as a tiled bitmap. Currently the style has
7347 no effect on other platforms.
7348
7349 :see: `GetBackgroundStyle`, `SetBackgroundColour`
7350 """
7351 return _core_.Window_SetBackgroundStyle(*args, **kwargs)
7352
7353 def GetBackgroundStyle(*args, **kwargs):
7354 """
7355 GetBackgroundStyle(self) -> int
7356
7357 Returns the background style of the window.
7358
7359 :see: `SetBackgroundStyle`
7360 """
7361 return _core_.Window_GetBackgroundStyle(*args, **kwargs)
7362
51b83b37
RD
7363 def HasTransparentBackground(*args, **kwargs):
7364 """
7365 HasTransparentBackground(self) -> bool
7366
7367 Returns True if this window's background is transparent (as, for
7368 example, for `wx.StaticText`) and should show the parent window's
7369 background.
7370
7371 This method is mostly used internally by the library itself and you
7372 normally shouldn't have to call it. You may, however, have to override
7373 it in your custom control classes to ensure that background is painted
7374 correctly.
7375 """
7376 return _core_.Window_HasTransparentBackground(*args, **kwargs)
7377
d55e5bfc
RD
7378 def SetCursor(*args, **kwargs):
7379 """
7380 SetCursor(self, Cursor cursor) -> bool
7381
7382 Sets the window's cursor. Notice that the window cursor also sets it
7383 for the children of the window implicitly.
7384
7385 The cursor may be wx.NullCursor in which case the window cursor will
7386 be reset back to default.
7387 """
7388 return _core_.Window_SetCursor(*args, **kwargs)
7389
7390 def GetCursor(*args, **kwargs):
7391 """
7392 GetCursor(self) -> Cursor
7393
7394 Return the cursor associated with this window.
7395 """
7396 return _core_.Window_GetCursor(*args, **kwargs)
7397
7398 def SetFont(*args, **kwargs):
7399 """
7400 SetFont(self, Font font) -> bool
7401
7402 Sets the font for this window.
7403 """
7404 return _core_.Window_SetFont(*args, **kwargs)
7405
fa47d7a7
VS
7406 def SetOwnFont(*args, **kwargs):
7407 """SetOwnFont(self, Font font)"""
7408 return _core_.Window_SetOwnFont(*args, **kwargs)
d55e5bfc
RD
7409
7410 def GetFont(*args, **kwargs):
7411 """
7412 GetFont(self) -> Font
7413
7414 Returns the default font used for this window.
7415 """
7416 return _core_.Window_GetFont(*args, **kwargs)
7417
7418 def SetCaret(*args, **kwargs):
7419 """
7420 SetCaret(self, Caret caret)
7421
7422 Sets the caret associated with the window.
7423 """
7424 return _core_.Window_SetCaret(*args, **kwargs)
7425
7426 def GetCaret(*args, **kwargs):
7427 """
7428 GetCaret(self) -> Caret
7429
7430 Returns the caret associated with the window.
7431 """
7432 return _core_.Window_GetCaret(*args, **kwargs)
7433
7434 def GetCharHeight(*args, **kwargs):
7435 """
7436 GetCharHeight(self) -> int
7437
7438 Get the (average) character size for the current font.
7439 """
7440 return _core_.Window_GetCharHeight(*args, **kwargs)
7441
7442 def GetCharWidth(*args, **kwargs):
7443 """
7444 GetCharWidth(self) -> int
7445
7446 Get the (average) character size for the current font.
7447 """
7448 return _core_.Window_GetCharWidth(*args, **kwargs)
7449
7450 def GetTextExtent(*args, **kwargs):
a8eff060
RD
7451 """
7452 GetTextExtent(String string) -> (width, height)
7453
7454 Get the width and height of the text using the current font.
7455 """
d55e5bfc
RD
7456 return _core_.Window_GetTextExtent(*args, **kwargs)
7457
7458 def GetFullTextExtent(*args, **kwargs):
7459 """
7460 GetFullTextExtent(String string, Font font=None) ->
7461 (width, height, descent, externalLeading)
7462
7463 Get the width, height, decent and leading of the text using the
7464 current or specified font.
7465 """
7466 return _core_.Window_GetFullTextExtent(*args, **kwargs)
7467
7468 def ClientToScreenXY(*args, **kwargs):
7469 """
7470 ClientToScreenXY(int x, int y) -> (x,y)
7471
7472 Converts to screen coordinates from coordinates relative to this window.
7473 """
7474 return _core_.Window_ClientToScreenXY(*args, **kwargs)
7475
7476 def ScreenToClientXY(*args, **kwargs):
7477 """
7478 ScreenToClientXY(int x, int y) -> (x,y)
7479
7480 Converts from screen to client window coordinates.
7481 """
7482 return _core_.Window_ScreenToClientXY(*args, **kwargs)
7483
7484 def ClientToScreen(*args, **kwargs):
7485 """
7486 ClientToScreen(self, Point pt) -> Point
7487
7488 Converts to screen coordinates from coordinates relative to this window.
7489 """
7490 return _core_.Window_ClientToScreen(*args, **kwargs)
7491
7492 def ScreenToClient(*args, **kwargs):
7493 """
7494 ScreenToClient(self, Point pt) -> Point
7495
7496 Converts from screen to client window coordinates.
7497 """
7498 return _core_.Window_ScreenToClient(*args, **kwargs)
7499
7500 def HitTestXY(*args, **kwargs):
7501 """
7502 HitTestXY(self, int x, int y) -> int
7503
7504 Test where the given (in client coords) point lies
7505 """
7506 return _core_.Window_HitTestXY(*args, **kwargs)
7507
7508 def HitTest(*args, **kwargs):
7509 """
7510 HitTest(self, Point pt) -> int
7511
7512 Test where the given (in client coords) point lies
7513 """
7514 return _core_.Window_HitTest(*args, **kwargs)
7515
7516 def GetBorder(*args):
7517 """
7518 GetBorder(self, long flags) -> int
7519 GetBorder(self) -> int
7520
7521 Get border for the flags of this window
7522 """
7523 return _core_.Window_GetBorder(*args)
7524
7525 def UpdateWindowUI(*args, **kwargs):
7526 """
7527 UpdateWindowUI(self, long flags=UPDATE_UI_NONE)
7528
7529 This function sends EVT_UPDATE_UI events to the window. The particular
7530 implementation depends on the window; for example a wx.ToolBar will
7531 send an update UI event for each toolbar button, and a wx.Frame will
7532 send an update UI event for each menubar menu item. You can call this
7533 function from your application to ensure that your UI is up-to-date at
7534 a particular point in time (as far as your EVT_UPDATE_UI handlers are
7535 concerned). This may be necessary if you have called
7536 wx.UpdateUIEvent.SetMode or wx.UpdateUIEvent.SetUpdateInterval to
7537 limit the overhead that wxWindows incurs by sending update UI events
7538 in idle time.
d55e5bfc
RD
7539 """
7540 return _core_.Window_UpdateWindowUI(*args, **kwargs)
7541
7542 def PopupMenuXY(*args, **kwargs):
7543 """
7a0b95b0 7544 PopupMenuXY(self, Menu menu, int x=-1, int y=-1) -> bool
d55e5bfc 7545
7a0b95b0
RD
7546 Pops up the given menu at the specified coordinates, relative to this window,
7547 and returns control when the user has dismissed the menu. If a menu item is
7548 selected, the corresponding menu event is generated and will be processed as
7549 usual. If the default position is given then the current position of the
7550 mouse cursor will be used.
d55e5bfc
RD
7551 """
7552 return _core_.Window_PopupMenuXY(*args, **kwargs)
7553
7554 def PopupMenu(*args, **kwargs):
7555 """
7a0b95b0 7556 PopupMenu(self, Menu menu, Point pos=DefaultPosition) -> bool
d55e5bfc 7557
7a0b95b0
RD
7558 Pops up the given menu at the specified coordinates, relative to this window,
7559 and returns control when the user has dismissed the menu. If a menu item is
7560 selected, the corresponding menu event is generated and will be processed as
7561 usual. If the default position is given then the current position of the
7562 mouse cursor will be used.
d55e5bfc
RD
7563 """
7564 return _core_.Window_PopupMenu(*args, **kwargs)
7565
7566 def GetHandle(*args, **kwargs):
7567 """
7568 GetHandle(self) -> long
7569
7570 Returns the platform-specific handle (as a long integer) of the
7571 physical window. Currently on wxMac it returns the handle of the
7572 toplevel parent of the window.
7573 """
7574 return _core_.Window_GetHandle(*args, **kwargs)
7575
629e65c2
RD
7576 def AssociateHandle(*args, **kwargs):
7577 """
7578 AssociateHandle(self, long handle)
7579
7580 Associate the window with a new native handle
7581 """
7582 return _core_.Window_AssociateHandle(*args, **kwargs)
7583
7584 def DissociateHandle(*args, **kwargs):
7585 """
7586 DissociateHandle(self)
7587
7588 Dissociate the current native handle from the window
7589 """
7590 return _core_.Window_DissociateHandle(*args, **kwargs)
7591
d55e5bfc
RD
7592 def OnPaint(*args, **kwargs):
7593 """OnPaint(self, PaintEvent event)"""
7594 return _core_.Window_OnPaint(*args, **kwargs)
7595
7596 def HasScrollbar(*args, **kwargs):
7597 """
7598 HasScrollbar(self, int orient) -> bool
7599
7600 Does the window have the scrollbar for this orientation?
7601 """
7602 return _core_.Window_HasScrollbar(*args, **kwargs)
7603
7604 def SetScrollbar(*args, **kwargs):
7605 """
79fccf9d 7606 SetScrollbar(self, int orientation, int position, int thumbSize, int range,
d55e5bfc
RD
7607 bool refresh=True)
7608
7609 Sets the scrollbar properties of a built-in scrollbar.
d55e5bfc
RD
7610 """
7611 return _core_.Window_SetScrollbar(*args, **kwargs)
7612
7613 def SetScrollPos(*args, **kwargs):
7614 """
7615 SetScrollPos(self, int orientation, int pos, bool refresh=True)
7616
7617 Sets the position of one of the built-in scrollbars.
7618 """
7619 return _core_.Window_SetScrollPos(*args, **kwargs)
7620
7621 def GetScrollPos(*args, **kwargs):
7622 """
7623 GetScrollPos(self, int orientation) -> int
7624
7625 Returns the built-in scrollbar position.
7626 """
7627 return _core_.Window_GetScrollPos(*args, **kwargs)
7628
7629 def GetScrollThumb(*args, **kwargs):
7630 """
7631 GetScrollThumb(self, int orientation) -> int
7632
7633 Returns the built-in scrollbar thumb size.
7634 """
7635 return _core_.Window_GetScrollThumb(*args, **kwargs)
7636
7637 def GetScrollRange(*args, **kwargs):
7638 """
7639 GetScrollRange(self, int orientation) -> int
7640
7641 Returns the built-in scrollbar range.
7642 """
7643 return _core_.Window_GetScrollRange(*args, **kwargs)
7644
7645 def ScrollWindow(*args, **kwargs):
7646 """
7647 ScrollWindow(self, int dx, int dy, Rect rect=None)
7648
7649 Physically scrolls the pixels in the window and move child windows
7650 accordingly. Use this function to optimise your scrolling
7651 implementations, to minimise the area that must be redrawn. Note that
7652 it is rarely required to call this function from a user program.
d55e5bfc
RD
7653 """
7654 return _core_.Window_ScrollWindow(*args, **kwargs)
7655
7656 def ScrollLines(*args, **kwargs):
7657 """
7658 ScrollLines(self, int lines) -> bool
7659
7660 If the platform and window class supports it, scrolls the window by
7661 the given number of lines down, if lines is positive, or up if lines
7662 is negative. Returns True if the window was scrolled, False if it was
7663 already on top/bottom and nothing was done.
7664 """
7665 return _core_.Window_ScrollLines(*args, **kwargs)
7666
7667 def ScrollPages(*args, **kwargs):
7668 """
7669 ScrollPages(self, int pages) -> bool
7670
79fccf9d 7671 If the platform and window class supports it, scrolls the window by
d55e5bfc
RD
7672 the given number of pages down, if pages is positive, or up if pages
7673 is negative. Returns True if the window was scrolled, False if it was
7674 already on top/bottom and nothing was done.
7675 """
7676 return _core_.Window_ScrollPages(*args, **kwargs)
7677
7678 def LineUp(*args, **kwargs):
7679 """
7680 LineUp(self) -> bool
7681
7682 This is just a wrapper for ScrollLines(-1).
7683 """
7684 return _core_.Window_LineUp(*args, **kwargs)
7685
7686 def LineDown(*args, **kwargs):
7687 """
7688 LineDown(self) -> bool
7689
7690 This is just a wrapper for ScrollLines(1).
7691 """
7692 return _core_.Window_LineDown(*args, **kwargs)
7693
7694 def PageUp(*args, **kwargs):
7695 """
7696 PageUp(self) -> bool
7697
7698 This is just a wrapper for ScrollPages(-1).
7699 """
7700 return _core_.Window_PageUp(*args, **kwargs)
7701
7702 def PageDown(*args, **kwargs):
7703 """
7704 PageDown(self) -> bool
7705
7706 This is just a wrapper for ScrollPages(1).
7707 """
7708 return _core_.Window_PageDown(*args, **kwargs)
7709
7710 def SetHelpText(*args, **kwargs):
7711 """
7712 SetHelpText(self, String text)
7713
7714 Sets the help text to be used as context-sensitive help for this
7715 window. Note that the text is actually stored by the current
7716 wxHelpProvider implementation, and not in the window object itself.
7717 """
7718 return _core_.Window_SetHelpText(*args, **kwargs)
7719
7720 def SetHelpTextForId(*args, **kwargs):
7721 """
7722 SetHelpTextForId(self, String text)
7723
7724 Associate this help text with all windows with the same id as this
7725 one.
7726 """
7727 return _core_.Window_SetHelpTextForId(*args, **kwargs)
7728
7729 def GetHelpText(*args, **kwargs):
7730 """
7731 GetHelpText(self) -> String
7732
7733 Gets the help text to be used as context-sensitive help for this
7734 window. Note that the text is actually stored by the current
7735 wxHelpProvider implementation, and not in the window object itself.
7736 """
7737 return _core_.Window_GetHelpText(*args, **kwargs)
7738
7739 def SetToolTipString(*args, **kwargs):
7740 """
7741 SetToolTipString(self, String tip)
7742
7743 Attach a tooltip to the window.
7744 """
7745 return _core_.Window_SetToolTipString(*args, **kwargs)
7746
7747 def SetToolTip(*args, **kwargs):
7748 """
7749 SetToolTip(self, ToolTip tip)
7750
7751 Attach a tooltip to the window.
7752 """
7753 return _core_.Window_SetToolTip(*args, **kwargs)
7754
7755 def GetToolTip(*args, **kwargs):
7756 """
7757 GetToolTip(self) -> ToolTip
7758
7759 get the associated tooltip or None if none
7760 """
7761 return _core_.Window_GetToolTip(*args, **kwargs)
7762
7763 def SetDropTarget(*args, **kwargs):
7764 """
7765 SetDropTarget(self, DropTarget dropTarget)
7766
7767 Associates a drop target with this window. If the window already has
7768 a drop target, it is deleted.
7769 """
7770 return _core_.Window_SetDropTarget(*args, **kwargs)
7771
7772 def GetDropTarget(*args, **kwargs):
7773 """
7774 GetDropTarget(self) -> DropTarget
7775
7776 Returns the associated drop target, which may be None.
7777 """
7778 return _core_.Window_GetDropTarget(*args, **kwargs)
7779
7780 def DragAcceptFiles(*args, **kwargs):
7781 """
7782 DragAcceptFiles(self, bool accept)
7783
7784 Enables or disables eligibility for drop file events, EVT_DROP_FILES.
7785 Only available on Windows.
7786 """
7787 return _core_.Window_DragAcceptFiles(*args, **kwargs)
7788
7789 def SetConstraints(*args, **kwargs):
7790 """
7791 SetConstraints(self, LayoutConstraints constraints)
7792
7793 Sets the window to have the given layout constraints. If an existing
7794 layout constraints object is already owned by the window, it will be
7795 deleted. Pass None to disassociate and delete the window's current
7796 constraints.
7797
7798 You must call SetAutoLayout to tell a window to use the constraints
7799 automatically in its default EVT_SIZE handler; otherwise, you must
7800 handle EVT_SIZE yourself and call Layout() explicitly. When setting
7801 both a wx.LayoutConstraints and a wx.Sizer, only the sizer will have
7802 effect.
7803 """
7804 return _core_.Window_SetConstraints(*args, **kwargs)
7805
7806 def GetConstraints(*args, **kwargs):
7807 """
7808 GetConstraints(self) -> LayoutConstraints
7809
7810 Returns a pointer to the window's layout constraints, or None if there
7811 are none.
7812 """
7813 return _core_.Window_GetConstraints(*args, **kwargs)
7814
7815 def SetAutoLayout(*args, **kwargs):
7816 """
7817 SetAutoLayout(self, bool autoLayout)
7818
7819 Determines whether the Layout function will be called automatically
7820 when the window is resized. It is called implicitly by SetSizer but
7821 if you use SetConstraints you should call it manually or otherwise the
7822 window layout won't be correctly updated when its size changes.
7823 """
7824 return _core_.Window_SetAutoLayout(*args, **kwargs)
7825
7826 def GetAutoLayout(*args, **kwargs):
7827 """
7828 GetAutoLayout(self) -> bool
7829
7830 Returns the current autoLayout setting
7831 """
7832 return _core_.Window_GetAutoLayout(*args, **kwargs)
7833
7834 def Layout(*args, **kwargs):
7835 """
7836 Layout(self) -> bool
7837
7838 Invokes the constraint-based layout algorithm or the sizer-based
7839 algorithm for this window. See SetAutoLayout: when auto layout is on,
7840 this function gets called automatically by the default EVT_SIZE
7841 handler when the window is resized.
7842 """
7843 return _core_.Window_Layout(*args, **kwargs)
7844
7845 def SetSizer(*args, **kwargs):
7846 """
7847 SetSizer(self, Sizer sizer, bool deleteOld=True)
7848
7849 Sets the window to have the given layout sizer. The window will then
7850 own the object, and will take care of its deletion. If an existing
7851 layout sizer object is already owned by the window, it will be deleted
7852 if the deleteOld parameter is true. Note that this function will also
7853 call SetAutoLayout implicitly with a True parameter if the sizer is
ae8162c8 7854 non-None, and False otherwise.
d55e5bfc
RD
7855 """
7856 return _core_.Window_SetSizer(*args, **kwargs)
7857
7858 def SetSizerAndFit(*args, **kwargs):
7859 """
7860 SetSizerAndFit(self, Sizer sizer, bool deleteOld=True)
7861
7862 The same as SetSizer, except it also sets the size hints for the
7863 window based on the sizer's minimum size.
7864 """
7865 return _core_.Window_SetSizerAndFit(*args, **kwargs)
7866
7867 def GetSizer(*args, **kwargs):
7868 """
7869 GetSizer(self) -> Sizer
7870
7871 Return the sizer associated with the window by a previous call to
7872 SetSizer or None if there isn't one.
7873 """
7874 return _core_.Window_GetSizer(*args, **kwargs)
7875
7876 def SetContainingSizer(*args, **kwargs):
7877 """
7878 SetContainingSizer(self, Sizer sizer)
7879
7880 This normally does not need to be called by application code. It is
7881 called internally when a window is added to a sizer, and is used so
7882 the window can remove itself from the sizer when it is destroyed.
7883 """
7884 return _core_.Window_SetContainingSizer(*args, **kwargs)
7885
7886 def GetContainingSizer(*args, **kwargs):
7887 """
7888 GetContainingSizer(self) -> Sizer
7889
7890 Return the sizer that this window is a member of, if any, otherwise None.
7891 """
7892 return _core_.Window_GetContainingSizer(*args, **kwargs)
7893
7894 def InheritAttributes(*args, **kwargs):
7895 """
7896 InheritAttributes(self)
7897
79fccf9d
RD
7898 This function is (or should be, in case of custom controls) called
7899 during window creation to intelligently set up the window visual
7900 attributes, that is the font and the foreground and background
7901 colours.
7902
7903 By 'intelligently' the following is meant: by default, all windows use
7904 their own default attributes. However if some of the parent's
7905 attributes are explicitly changed (that is, using SetFont and not
fa47d7a7 7906 SetOwnFont) and if the corresponding attribute hadn't been
79fccf9d
RD
7907 explicitly set for this window itself, then this window takes the same
7908 value as used by the parent. In addition, if the window overrides
7909 ShouldInheritColours to return false, the colours will not be changed
7910 no matter what and only the font might.
7911
ec9b55ca
RD
7912 This rather complicated logic is necessary in order to accommodate the
7913 different usage scenarios. The most common one is when all default
79fccf9d
RD
7914 attributes are used and in this case, nothing should be inherited as
7915 in modern GUIs different controls use different fonts (and colours)
7916 than their siblings so they can't inherit the same value from the
7917 parent. However it was also deemed desirable to allow to simply change
7918 the attributes of all children at once by just changing the font or
7919 colour of their common parent, hence in this case we do inherit the
7920 parents attributes.
7921
d55e5bfc
RD
7922 """
7923 return _core_.Window_InheritAttributes(*args, **kwargs)
7924
7925 def ShouldInheritColours(*args, **kwargs):
7926 """
7927 ShouldInheritColours(self) -> bool
7928
7929 Return true from here to allow the colours of this window to be
79fccf9d
RD
7930 changed by InheritAttributes, returning false forbids inheriting them
7931 from the parent window.
d55e5bfc 7932
79fccf9d
RD
7933 The base class version returns false, but this method is overridden in
7934 wxControl where it returns true.
d55e5bfc
RD
7935 """
7936 return _core_.Window_ShouldInheritColours(*args, **kwargs)
7937
7938 def PostCreate(self, pre):
7939 """
7940 Phase 3 of the 2-phase create <wink!>
7941 Call this method after precreating the window with the 2-phase create method.
7942 """
7943 self.this = pre.this
7944 self.thisown = pre.thisown
7945 pre.thisown = 0
7946 if hasattr(self, '_setOORInfo'):
7947 self._setOORInfo(self)
7948 if hasattr(self, '_setCallbackInfo'):
7949 self._setCallbackInfo(self, self.__class__)
7950
7951
7952class WindowPtr(Window):
7953 def __init__(self, this):
7954 self.this = this
7955 if not hasattr(self,"thisown"): self.thisown = 0
7956 self.__class__ = Window
7957_core_.Window_swigregister(WindowPtr)
7958
7959def PreWindow(*args, **kwargs):
7960 """
7961 PreWindow() -> Window
7962
7963 Precreate a Window for 2-phase creation.
7964 """
7965 val = _core_.new_PreWindow(*args, **kwargs)
7966 val.thisown = 1
7967 return val
7968
7969def Window_NewControlId(*args, **kwargs):
7970 """
7971 Window_NewControlId() -> int
7972
7973 Generate a control id for the controls which were not given one.
7974 """
7975 return _core_.Window_NewControlId(*args, **kwargs)
7976
7977def Window_NextControlId(*args, **kwargs):
7978 """
7979 Window_NextControlId(int winid) -> int
7980
7981 Get the id of the control following the one with the given
79fccf9d 7982 autogenerated) id
d55e5bfc
RD
7983 """
7984 return _core_.Window_NextControlId(*args, **kwargs)
7985
7986def Window_PrevControlId(*args, **kwargs):
7987 """
7988 Window_PrevControlId(int winid) -> int
7989
7990 Get the id of the control preceding the one with the given
79fccf9d 7991 autogenerated) id
d55e5bfc
RD
7992 """
7993 return _core_.Window_PrevControlId(*args, **kwargs)
7994
7995def Window_FindFocus(*args, **kwargs):
7996 """
7997 Window_FindFocus() -> Window
7998
7999 Returns the window or control that currently has the keyboard focus,
8000 or None.
8001 """
8002 return _core_.Window_FindFocus(*args, **kwargs)
8003
8004def Window_GetCapture(*args, **kwargs):
8005 """
8006 Window_GetCapture() -> Window
8007
8008 Returns the window which currently captures the mouse or None
8009 """
8010 return _core_.Window_GetCapture(*args, **kwargs)
8011
8012def Window_GetClassDefaultAttributes(*args, **kwargs):
8013 """
8014 Window_GetClassDefaultAttributes(int variant=WINDOW_VARIANT_NORMAL) -> VisualAttributes
8015
79fccf9d
RD
8016 Get the default attributes for this class. This is useful if you want
8017 to use the same font or colour in your own control as in a standard
8018 control -- which is a much better idea than hard coding specific
caef1a4d
RD
8019 colours or fonts which might look completely out of place on the
8020 user's system, especially if it uses themes.
d55e5bfc
RD
8021
8022 The variant parameter is only relevant under Mac currently and is
79fccf9d 8023 ignore under other platforms. Under Mac, it will change the size of
caef1a4d
RD
8024 the returned font. See `wx.Window.SetWindowVariant` for more about
8025 this.
d55e5bfc
RD
8026 """
8027 return _core_.Window_GetClassDefaultAttributes(*args, **kwargs)
8028
8029def DLG_PNT(win, point_or_x, y=None):
8030 """
8031 Convenience function for converting a Point or (x,y) in
8032 dialog units to pixel units.
8033 """
8034 if y is None:
8035 return win.ConvertDialogPointToPixels(point_or_x)
8036 else:
8037 return win.ConvertDialogPointToPixels(wx.Point(point_or_x, y))
8038
8039def DLG_SZE(win, size_width, height=None):
8040 """
8041 Convenience function for converting a Size or (w,h) in
8042 dialog units to pixel units.
8043 """
8044 if height is None:
8045 return win.ConvertDialogSizeToPixels(size_width)
8046 else:
8047 return win.ConvertDialogSizeToPixels(wx.Size(size_width, height))
8048
8049
8050def FindWindowById(*args, **kwargs):
8051 """
8052 FindWindowById(long id, Window parent=None) -> Window
8053
8054 Find the first window in the application with the given id. If parent
8055 is None, the search will start from all top-level frames and dialog
8056 boxes; if non-None, the search will be limited to the given window
8057 hierarchy. The search is recursive in both cases.
8058 """
8059 return _core_.FindWindowById(*args, **kwargs)
8060
8061def FindWindowByName(*args, **kwargs):
8062 """
8063 FindWindowByName(String name, Window parent=None) -> Window
8064
8065 Find a window by its name (as given in a window constructor or Create
8066 function call). If parent is None, the search will start from all
8067 top-level frames and dialog boxes; if non-None, the search will be
8068 limited to the given window hierarchy. The search is recursive in both
8069 cases.
8070
8071 If no window with such name is found, wx.FindWindowByLabel is called.
8072 """
8073 return _core_.FindWindowByName(*args, **kwargs)
8074
8075def FindWindowByLabel(*args, **kwargs):
8076 """
8077 FindWindowByLabel(String label, Window parent=None) -> Window
8078
8079 Find a window by its label. Depending on the type of window, the label
8080 may be a window title or panel item label. If parent is None, the
8081 search will start from all top-level frames and dialog boxes; if
8082 non-None, the search will be limited to the given window
8083 hierarchy. The search is recursive in both cases.
8084 """
8085 return _core_.FindWindowByLabel(*args, **kwargs)
8086
8087def Window_FromHWND(*args, **kwargs):
8088 """Window_FromHWND(Window parent, unsigned long _hWnd) -> Window"""
8089 return _core_.Window_FromHWND(*args, **kwargs)
8090#---------------------------------------------------------------------------
8091
8092class Validator(EvtHandler):
093d3ff1 8093 """Proxy of C++ Validator class"""
d55e5bfc
RD
8094 def __repr__(self):
8095 return "<%s.%s; proxy of C++ wxValidator instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
8096 def __init__(self, *args, **kwargs):
8097 """__init__(self) -> Validator"""
8098 newobj = _core_.new_Validator(*args, **kwargs)
8099 self.this = newobj.this
8100 self.thisown = 1
8101 del newobj.thisown
8102 self._setOORInfo(self)
8103
8104 def Clone(*args, **kwargs):
8105 """Clone(self) -> Validator"""
8106 return _core_.Validator_Clone(*args, **kwargs)
8107
8108 def Validate(*args, **kwargs):
8109 """Validate(self, Window parent) -> bool"""
8110 return _core_.Validator_Validate(*args, **kwargs)
8111
8112 def TransferToWindow(*args, **kwargs):
8113 """TransferToWindow(self) -> bool"""
8114 return _core_.Validator_TransferToWindow(*args, **kwargs)
8115
8116 def TransferFromWindow(*args, **kwargs):
8117 """TransferFromWindow(self) -> bool"""
8118 return _core_.Validator_TransferFromWindow(*args, **kwargs)
8119
8120 def GetWindow(*args, **kwargs):
8121 """GetWindow(self) -> Window"""
8122 return _core_.Validator_GetWindow(*args, **kwargs)
8123
8124 def SetWindow(*args, **kwargs):
8125 """SetWindow(self, Window window)"""
8126 return _core_.Validator_SetWindow(*args, **kwargs)
8127
8128 def IsSilent(*args, **kwargs):
c24da6d6 8129 """IsSilent() -> bool"""
d55e5bfc
RD
8130 return _core_.Validator_IsSilent(*args, **kwargs)
8131
8132 IsSilent = staticmethod(IsSilent)
8133 def SetBellOnError(*args, **kwargs):
c24da6d6 8134 """SetBellOnError(int doIt=True)"""
d55e5bfc
RD
8135 return _core_.Validator_SetBellOnError(*args, **kwargs)
8136
8137 SetBellOnError = staticmethod(SetBellOnError)
8138
8139class ValidatorPtr(Validator):
8140 def __init__(self, this):
8141 self.this = this
8142 if not hasattr(self,"thisown"): self.thisown = 0
8143 self.__class__ = Validator
8144_core_.Validator_swigregister(ValidatorPtr)
8145
8146def Validator_IsSilent(*args, **kwargs):
8147 """Validator_IsSilent() -> bool"""
8148 return _core_.Validator_IsSilent(*args, **kwargs)
8149
8150def Validator_SetBellOnError(*args, **kwargs):
8151 """Validator_SetBellOnError(int doIt=True)"""
8152 return _core_.Validator_SetBellOnError(*args, **kwargs)
8153
8154class PyValidator(Validator):
093d3ff1 8155 """Proxy of C++ PyValidator class"""
d55e5bfc
RD
8156 def __repr__(self):
8157 return "<%s.%s; proxy of C++ wxPyValidator instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
8158 def __init__(self, *args, **kwargs):
8159 """__init__(self) -> PyValidator"""
8160 newobj = _core_.new_PyValidator(*args, **kwargs)
8161 self.this = newobj.this
8162 self.thisown = 1
8163 del newobj.thisown
8164
8165 self._setCallbackInfo(self, PyValidator, 1)
8166 self._setOORInfo(self)
8167
8168 def _setCallbackInfo(*args, **kwargs):
8169 """_setCallbackInfo(self, PyObject self, PyObject _class, int incref=True)"""
8170 return _core_.PyValidator__setCallbackInfo(*args, **kwargs)
8171
8172
8173class PyValidatorPtr(PyValidator):
8174 def __init__(self, this):
8175 self.this = this
8176 if not hasattr(self,"thisown"): self.thisown = 0
8177 self.__class__ = PyValidator
8178_core_.PyValidator_swigregister(PyValidatorPtr)
8179
8180#---------------------------------------------------------------------------
8181
8182class Menu(EvtHandler):
093d3ff1 8183 """Proxy of C++ Menu class"""
d55e5bfc
RD
8184 def __repr__(self):
8185 return "<%s.%s; proxy of C++ wxMenu instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
8186 def __init__(self, *args, **kwargs):
8187 """__init__(self, String title=EmptyString, long style=0) -> Menu"""
8188 newobj = _core_.new_Menu(*args, **kwargs)
8189 self.this = newobj.this
8190 self.thisown = 1
8191 del newobj.thisown
8192 self._setOORInfo(self)
8193
8194 def Append(*args, **kwargs):
8195 """Append(self, int id, String text, String help=EmptyString, int kind=ITEM_NORMAL) -> MenuItem"""
8196 return _core_.Menu_Append(*args, **kwargs)
8197
8198 def AppendSeparator(*args, **kwargs):
8199 """AppendSeparator(self) -> MenuItem"""
8200 return _core_.Menu_AppendSeparator(*args, **kwargs)
8201
8202 def AppendCheckItem(*args, **kwargs):
8203 """AppendCheckItem(self, int id, String text, String help=EmptyString) -> MenuItem"""
8204 return _core_.Menu_AppendCheckItem(*args, **kwargs)
8205
8206 def AppendRadioItem(*args, **kwargs):
8207 """AppendRadioItem(self, int id, String text, String help=EmptyString) -> MenuItem"""
8208 return _core_.Menu_AppendRadioItem(*args, **kwargs)
8209
8210 def AppendMenu(*args, **kwargs):
8211 """AppendMenu(self, int id, String text, Menu submenu, String help=EmptyString) -> MenuItem"""
8212 return _core_.Menu_AppendMenu(*args, **kwargs)
8213
8214 def AppendItem(*args, **kwargs):
8215 """AppendItem(self, MenuItem item) -> MenuItem"""
8216 return _core_.Menu_AppendItem(*args, **kwargs)
8217
8218 def Break(*args, **kwargs):
8219 """Break(self)"""
8220 return _core_.Menu_Break(*args, **kwargs)
8221
8222 def InsertItem(*args, **kwargs):
8223 """InsertItem(self, size_t pos, MenuItem item) -> MenuItem"""
8224 return _core_.Menu_InsertItem(*args, **kwargs)
8225
8226 def Insert(*args, **kwargs):
8227 """
8228 Insert(self, size_t pos, int id, String text, String help=EmptyString,
8229 int kind=ITEM_NORMAL) -> MenuItem
8230 """
8231 return _core_.Menu_Insert(*args, **kwargs)
8232
8233 def InsertSeparator(*args, **kwargs):
8234 """InsertSeparator(self, size_t pos) -> MenuItem"""
8235 return _core_.Menu_InsertSeparator(*args, **kwargs)
8236
8237 def InsertCheckItem(*args, **kwargs):
8238 """InsertCheckItem(self, size_t pos, int id, String text, String help=EmptyString) -> MenuItem"""
8239 return _core_.Menu_InsertCheckItem(*args, **kwargs)
8240
8241 def InsertRadioItem(*args, **kwargs):
8242 """InsertRadioItem(self, size_t pos, int id, String text, String help=EmptyString) -> MenuItem"""
8243 return _core_.Menu_InsertRadioItem(*args, **kwargs)
8244
8245 def InsertMenu(*args, **kwargs):
8246 """InsertMenu(self, size_t pos, int id, String text, Menu submenu, String help=EmptyString) -> MenuItem"""
8247 return _core_.Menu_InsertMenu(*args, **kwargs)
8248
8249 def PrependItem(*args, **kwargs):
8250 """PrependItem(self, MenuItem item) -> MenuItem"""
8251 return _core_.Menu_PrependItem(*args, **kwargs)
8252
8253 def Prepend(*args, **kwargs):
8254 """Prepend(self, int id, String text, String help=EmptyString, int kind=ITEM_NORMAL) -> MenuItem"""
8255 return _core_.Menu_Prepend(*args, **kwargs)
8256
8257 def PrependSeparator(*args, **kwargs):
8258 """PrependSeparator(self) -> MenuItem"""
8259 return _core_.Menu_PrependSeparator(*args, **kwargs)
8260
8261 def PrependCheckItem(*args, **kwargs):
8262 """PrependCheckItem(self, int id, String text, String help=EmptyString) -> MenuItem"""
8263 return _core_.Menu_PrependCheckItem(*args, **kwargs)
8264
8265 def PrependRadioItem(*args, **kwargs):
8266 """PrependRadioItem(self, int id, String text, String help=EmptyString) -> MenuItem"""
8267 return _core_.Menu_PrependRadioItem(*args, **kwargs)
8268
8269 def PrependMenu(*args, **kwargs):
8270 """PrependMenu(self, int id, String text, Menu submenu, String help=EmptyString) -> MenuItem"""
8271 return _core_.Menu_PrependMenu(*args, **kwargs)
8272
8273 def Remove(*args, **kwargs):
8274 """Remove(self, int id) -> MenuItem"""
8275 return _core_.Menu_Remove(*args, **kwargs)
8276
8277 def RemoveItem(*args, **kwargs):
8278 """RemoveItem(self, MenuItem item) -> MenuItem"""
8279 return _core_.Menu_RemoveItem(*args, **kwargs)
8280
8281 def Delete(*args, **kwargs):
8282 """Delete(self, int id) -> bool"""
8283 return _core_.Menu_Delete(*args, **kwargs)
8284
8285 def DeleteItem(*args, **kwargs):
8286 """DeleteItem(self, MenuItem item) -> bool"""
8287 return _core_.Menu_DeleteItem(*args, **kwargs)
8288
8289 def Destroy(*args, **kwargs):
8290 """
8291 Destroy(self)
8292
8293 Deletes the C++ object this Python object is a proxy for.
8294 """
8295 return _core_.Menu_Destroy(*args, **kwargs)
8296
8297 def DestroyId(*args, **kwargs):
8298 """
8299 DestroyId(self, int id) -> bool
8300
8301 Deletes the C++ object this Python object is a proxy for.
8302 """
8303 return _core_.Menu_DestroyId(*args, **kwargs)
8304
8305 def DestroyItem(*args, **kwargs):
8306 """
8307 DestroyItem(self, MenuItem item) -> bool
8308
8309 Deletes the C++ object this Python object is a proxy for.
8310 """
8311 return _core_.Menu_DestroyItem(*args, **kwargs)
8312
8313 def GetMenuItemCount(*args, **kwargs):
8314 """GetMenuItemCount(self) -> size_t"""
8315 return _core_.Menu_GetMenuItemCount(*args, **kwargs)
8316
8317 def GetMenuItems(*args, **kwargs):
8318 """GetMenuItems(self) -> PyObject"""
8319 return _core_.Menu_GetMenuItems(*args, **kwargs)
8320
8321 def FindItem(*args, **kwargs):
8322 """FindItem(self, String item) -> int"""
8323 return _core_.Menu_FindItem(*args, **kwargs)
8324
8325 def FindItemById(*args, **kwargs):
8326 """FindItemById(self, int id) -> MenuItem"""
8327 return _core_.Menu_FindItemById(*args, **kwargs)
8328
8329 def FindItemByPosition(*args, **kwargs):
8330 """FindItemByPosition(self, size_t position) -> MenuItem"""
8331 return _core_.Menu_FindItemByPosition(*args, **kwargs)
8332
8333 def Enable(*args, **kwargs):
8334 """Enable(self, int id, bool enable)"""
8335 return _core_.Menu_Enable(*args, **kwargs)
8336
8337 def IsEnabled(*args, **kwargs):
8338 """IsEnabled(self, int id) -> bool"""
8339 return _core_.Menu_IsEnabled(*args, **kwargs)
8340
8341 def Check(*args, **kwargs):
8342 """Check(self, int id, bool check)"""
8343 return _core_.Menu_Check(*args, **kwargs)
8344
8345 def IsChecked(*args, **kwargs):
8346 """IsChecked(self, int id) -> bool"""
8347 return _core_.Menu_IsChecked(*args, **kwargs)
8348
8349 def SetLabel(*args, **kwargs):
8350 """SetLabel(self, int id, String label)"""
8351 return _core_.Menu_SetLabel(*args, **kwargs)
8352
8353 def GetLabel(*args, **kwargs):
8354 """GetLabel(self, int id) -> String"""
8355 return _core_.Menu_GetLabel(*args, **kwargs)
8356
8357 def SetHelpString(*args, **kwargs):
8358 """SetHelpString(self, int id, String helpString)"""
8359 return _core_.Menu_SetHelpString(*args, **kwargs)
8360
8361 def GetHelpString(*args, **kwargs):
8362 """GetHelpString(self, int id) -> String"""
8363 return _core_.Menu_GetHelpString(*args, **kwargs)
8364
8365 def SetTitle(*args, **kwargs):
8366 """SetTitle(self, String title)"""
8367 return _core_.Menu_SetTitle(*args, **kwargs)
8368
8369 def GetTitle(*args, **kwargs):
8370 """GetTitle(self) -> String"""
8371 return _core_.Menu_GetTitle(*args, **kwargs)
8372
8373 def SetEventHandler(*args, **kwargs):
8374 """SetEventHandler(self, EvtHandler handler)"""
8375 return _core_.Menu_SetEventHandler(*args, **kwargs)
8376
8377 def GetEventHandler(*args, **kwargs):
8378 """GetEventHandler(self) -> EvtHandler"""
8379 return _core_.Menu_GetEventHandler(*args, **kwargs)
8380
8381 def SetInvokingWindow(*args, **kwargs):
8382 """SetInvokingWindow(self, Window win)"""
8383 return _core_.Menu_SetInvokingWindow(*args, **kwargs)
8384
8385 def GetInvokingWindow(*args, **kwargs):
8386 """GetInvokingWindow(self) -> Window"""
8387 return _core_.Menu_GetInvokingWindow(*args, **kwargs)
8388
8389 def GetStyle(*args, **kwargs):
8390 """GetStyle(self) -> long"""
8391 return _core_.Menu_GetStyle(*args, **kwargs)
8392
8393 def UpdateUI(*args, **kwargs):
8394 """UpdateUI(self, EvtHandler source=None)"""
8395 return _core_.Menu_UpdateUI(*args, **kwargs)
8396
8397 def GetMenuBar(*args, **kwargs):
8398 """GetMenuBar(self) -> MenuBar"""
8399 return _core_.Menu_GetMenuBar(*args, **kwargs)
8400
8401 def Attach(*args, **kwargs):
8402 """Attach(self, wxMenuBarBase menubar)"""
8403 return _core_.Menu_Attach(*args, **kwargs)
8404
8405 def Detach(*args, **kwargs):
8406 """Detach(self)"""
8407 return _core_.Menu_Detach(*args, **kwargs)
8408
8409 def IsAttached(*args, **kwargs):
8410 """IsAttached(self) -> bool"""
8411 return _core_.Menu_IsAttached(*args, **kwargs)
8412
8413 def SetParent(*args, **kwargs):
8414 """SetParent(self, Menu parent)"""
8415 return _core_.Menu_SetParent(*args, **kwargs)
8416
8417 def GetParent(*args, **kwargs):
8418 """GetParent(self) -> Menu"""
8419 return _core_.Menu_GetParent(*args, **kwargs)
8420
8421
8422class MenuPtr(Menu):
8423 def __init__(self, this):
8424 self.this = this
8425 if not hasattr(self,"thisown"): self.thisown = 0
8426 self.__class__ = Menu
8427_core_.Menu_swigregister(MenuPtr)
8428DefaultValidator = cvar.DefaultValidator
8429
8430#---------------------------------------------------------------------------
8431
8432class MenuBar(Window):
093d3ff1 8433 """Proxy of C++ MenuBar class"""
d55e5bfc
RD
8434 def __repr__(self):
8435 return "<%s.%s; proxy of C++ wxMenuBar instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
8436 def __init__(self, *args, **kwargs):
8437 """__init__(self, long style=0) -> MenuBar"""
8438 newobj = _core_.new_MenuBar(*args, **kwargs)
8439 self.this = newobj.this
8440 self.thisown = 1
8441 del newobj.thisown
8442 self._setOORInfo(self)
8443
8444 def Append(*args, **kwargs):
8445 """Append(self, Menu menu, String title) -> bool"""
8446 return _core_.MenuBar_Append(*args, **kwargs)
8447
8448 def Insert(*args, **kwargs):
8449 """Insert(self, size_t pos, Menu menu, String title) -> bool"""
8450 return _core_.MenuBar_Insert(*args, **kwargs)
8451
8452 def GetMenuCount(*args, **kwargs):
8453 """GetMenuCount(self) -> size_t"""
8454 return _core_.MenuBar_GetMenuCount(*args, **kwargs)
8455
8456 def GetMenu(*args, **kwargs):
8457 """GetMenu(self, size_t pos) -> Menu"""
8458 return _core_.MenuBar_GetMenu(*args, **kwargs)
8459
8460 def Replace(*args, **kwargs):
8461 """Replace(self, size_t pos, Menu menu, String title) -> Menu"""
8462 return _core_.MenuBar_Replace(*args, **kwargs)
8463
8464 def Remove(*args, **kwargs):
8465 """Remove(self, size_t pos) -> Menu"""
8466 return _core_.MenuBar_Remove(*args, **kwargs)
8467
8468 def EnableTop(*args, **kwargs):
8469 """EnableTop(self, size_t pos, bool enable)"""
8470 return _core_.MenuBar_EnableTop(*args, **kwargs)
8471
8472 def IsEnabledTop(*args, **kwargs):
8473 """IsEnabledTop(self, size_t pos) -> bool"""
8474 return _core_.MenuBar_IsEnabledTop(*args, **kwargs)
8475
8476 def SetLabelTop(*args, **kwargs):
8477 """SetLabelTop(self, size_t pos, String label)"""
8478 return _core_.MenuBar_SetLabelTop(*args, **kwargs)
8479
8480 def GetLabelTop(*args, **kwargs):
8481 """GetLabelTop(self, size_t pos) -> String"""
8482 return _core_.MenuBar_GetLabelTop(*args, **kwargs)
8483
8484 def FindMenuItem(*args, **kwargs):
8485 """FindMenuItem(self, String menu, String item) -> int"""
8486 return _core_.MenuBar_FindMenuItem(*args, **kwargs)
8487
8488 def FindItemById(*args, **kwargs):
8489 """FindItemById(self, int id) -> MenuItem"""
8490 return _core_.MenuBar_FindItemById(*args, **kwargs)
8491
8492 def FindMenu(*args, **kwargs):
8493 """FindMenu(self, String title) -> int"""
8494 return _core_.MenuBar_FindMenu(*args, **kwargs)
8495
8496 def Enable(*args, **kwargs):
8497 """Enable(self, int id, bool enable)"""
8498 return _core_.MenuBar_Enable(*args, **kwargs)
8499
8500 def Check(*args, **kwargs):
8501 """Check(self, int id, bool check)"""
8502 return _core_.MenuBar_Check(*args, **kwargs)
8503
8504 def IsChecked(*args, **kwargs):
8505 """IsChecked(self, int id) -> bool"""
8506 return _core_.MenuBar_IsChecked(*args, **kwargs)
8507
8508 def IsEnabled(*args, **kwargs):
8509 """IsEnabled(self, int id) -> bool"""
8510 return _core_.MenuBar_IsEnabled(*args, **kwargs)
8511
8512 def SetLabel(*args, **kwargs):
8513 """SetLabel(self, int id, String label)"""
8514 return _core_.MenuBar_SetLabel(*args, **kwargs)
8515
8516 def GetLabel(*args, **kwargs):
8517 """GetLabel(self, int id) -> String"""
8518 return _core_.MenuBar_GetLabel(*args, **kwargs)
8519
8520 def SetHelpString(*args, **kwargs):
8521 """SetHelpString(self, int id, String helpString)"""
8522 return _core_.MenuBar_SetHelpString(*args, **kwargs)
8523
8524 def GetHelpString(*args, **kwargs):
8525 """GetHelpString(self, int id) -> String"""
8526 return _core_.MenuBar_GetHelpString(*args, **kwargs)
8527
8528 def GetFrame(*args, **kwargs):
8529 """GetFrame(self) -> wxFrame"""
8530 return _core_.MenuBar_GetFrame(*args, **kwargs)
8531
8532 def IsAttached(*args, **kwargs):
8533 """IsAttached(self) -> bool"""
8534 return _core_.MenuBar_IsAttached(*args, **kwargs)
8535
8536 def Attach(*args, **kwargs):
8537 """Attach(self, wxFrame frame)"""
8538 return _core_.MenuBar_Attach(*args, **kwargs)
8539
8540 def Detach(*args, **kwargs):
8541 """Detach(self)"""
8542 return _core_.MenuBar_Detach(*args, **kwargs)
8543
8544
8545class MenuBarPtr(MenuBar):
8546 def __init__(self, this):
8547 self.this = this
8548 if not hasattr(self,"thisown"): self.thisown = 0
8549 self.__class__ = MenuBar
8550_core_.MenuBar_swigregister(MenuBarPtr)
8551
8552#---------------------------------------------------------------------------
8553
8554class MenuItem(Object):
093d3ff1 8555 """Proxy of C++ MenuItem class"""
d55e5bfc
RD
8556 def __repr__(self):
8557 return "<%s.%s; proxy of C++ wxMenuItem instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
8558 def __init__(self, *args, **kwargs):
8559 """
8560 __init__(self, Menu parentMenu=None, int id=ID_ANY, String text=EmptyString,
8561 String help=EmptyString, int kind=ITEM_NORMAL,
8562 Menu subMenu=None) -> MenuItem
8563 """
8564 newobj = _core_.new_MenuItem(*args, **kwargs)
8565 self.this = newobj.this
8566 self.thisown = 1
8567 del newobj.thisown
8568 def GetMenu(*args, **kwargs):
8569 """GetMenu(self) -> Menu"""
8570 return _core_.MenuItem_GetMenu(*args, **kwargs)
8571
8572 def SetMenu(*args, **kwargs):
8573 """SetMenu(self, Menu menu)"""
8574 return _core_.MenuItem_SetMenu(*args, **kwargs)
8575
8576 def SetId(*args, **kwargs):
8577 """SetId(self, int id)"""
8578 return _core_.MenuItem_SetId(*args, **kwargs)
8579
8580 def GetId(*args, **kwargs):
8581 """GetId(self) -> int"""
8582 return _core_.MenuItem_GetId(*args, **kwargs)
8583
8584 def IsSeparator(*args, **kwargs):
8585 """IsSeparator(self) -> bool"""
8586 return _core_.MenuItem_IsSeparator(*args, **kwargs)
8587
8588 def SetText(*args, **kwargs):
8589 """SetText(self, String str)"""
8590 return _core_.MenuItem_SetText(*args, **kwargs)
8591
8592 def GetLabel(*args, **kwargs):
8593 """GetLabel(self) -> String"""
8594 return _core_.MenuItem_GetLabel(*args, **kwargs)
8595
8596 def GetText(*args, **kwargs):
8597 """GetText(self) -> String"""
8598 return _core_.MenuItem_GetText(*args, **kwargs)
8599
8600 def GetLabelFromText(*args, **kwargs):
c24da6d6 8601 """GetLabelFromText(String text) -> String"""
d55e5bfc
RD
8602 return _core_.MenuItem_GetLabelFromText(*args, **kwargs)
8603
8604 GetLabelFromText = staticmethod(GetLabelFromText)
8605 def GetKind(*args, **kwargs):
8606 """GetKind(self) -> int"""
8607 return _core_.MenuItem_GetKind(*args, **kwargs)
8608
8609 def SetKind(*args, **kwargs):
8610 """SetKind(self, int kind)"""
8611 return _core_.MenuItem_SetKind(*args, **kwargs)
8612
8613 def SetCheckable(*args, **kwargs):
8614 """SetCheckable(self, bool checkable)"""
8615 return _core_.MenuItem_SetCheckable(*args, **kwargs)
8616
8617 def IsCheckable(*args, **kwargs):
8618 """IsCheckable(self) -> bool"""
8619 return _core_.MenuItem_IsCheckable(*args, **kwargs)
8620
8621 def IsSubMenu(*args, **kwargs):
8622 """IsSubMenu(self) -> bool"""
8623 return _core_.MenuItem_IsSubMenu(*args, **kwargs)
8624
8625 def SetSubMenu(*args, **kwargs):
8626 """SetSubMenu(self, Menu menu)"""
8627 return _core_.MenuItem_SetSubMenu(*args, **kwargs)
8628
8629 def GetSubMenu(*args, **kwargs):
8630 """GetSubMenu(self) -> Menu"""
8631 return _core_.MenuItem_GetSubMenu(*args, **kwargs)
8632
8633 def Enable(*args, **kwargs):
8634 """Enable(self, bool enable=True)"""
8635 return _core_.MenuItem_Enable(*args, **kwargs)
8636
8637 def IsEnabled(*args, **kwargs):
8638 """IsEnabled(self) -> bool"""
8639 return _core_.MenuItem_IsEnabled(*args, **kwargs)
8640
8641 def Check(*args, **kwargs):
8642 """Check(self, bool check=True)"""
8643 return _core_.MenuItem_Check(*args, **kwargs)
8644
8645 def IsChecked(*args, **kwargs):
8646 """IsChecked(self) -> bool"""
8647 return _core_.MenuItem_IsChecked(*args, **kwargs)
8648
8649 def Toggle(*args, **kwargs):
8650 """Toggle(self)"""
8651 return _core_.MenuItem_Toggle(*args, **kwargs)
8652
8653 def SetHelp(*args, **kwargs):
8654 """SetHelp(self, String str)"""
8655 return _core_.MenuItem_SetHelp(*args, **kwargs)
8656
8657 def GetHelp(*args, **kwargs):
8658 """GetHelp(self) -> String"""
8659 return _core_.MenuItem_GetHelp(*args, **kwargs)
8660
8661 def GetAccel(*args, **kwargs):
8662 """GetAccel(self) -> AcceleratorEntry"""
8663 return _core_.MenuItem_GetAccel(*args, **kwargs)
8664
8665 def SetAccel(*args, **kwargs):
8666 """SetAccel(self, AcceleratorEntry accel)"""
8667 return _core_.MenuItem_SetAccel(*args, **kwargs)
8668
8669 def SetFont(*args, **kwargs):
8670 """SetFont(self, Font font)"""
8671 return _core_.MenuItem_SetFont(*args, **kwargs)
8672
8673 def GetFont(*args, **kwargs):
8674 """GetFont(self) -> Font"""
8675 return _core_.MenuItem_GetFont(*args, **kwargs)
8676
8677 def SetTextColour(*args, **kwargs):
8678 """SetTextColour(self, Colour colText)"""
8679 return _core_.MenuItem_SetTextColour(*args, **kwargs)
8680
8681 def GetTextColour(*args, **kwargs):
8682 """GetTextColour(self) -> Colour"""
8683 return _core_.MenuItem_GetTextColour(*args, **kwargs)
8684
8685 def SetBackgroundColour(*args, **kwargs):
8686 """SetBackgroundColour(self, Colour colBack)"""
8687 return _core_.MenuItem_SetBackgroundColour(*args, **kwargs)
8688
8689 def GetBackgroundColour(*args, **kwargs):
8690 """GetBackgroundColour(self) -> Colour"""
8691 return _core_.MenuItem_GetBackgroundColour(*args, **kwargs)
8692
8693 def SetBitmaps(*args, **kwargs):
8694 """SetBitmaps(self, Bitmap bmpChecked, Bitmap bmpUnchecked=wxNullBitmap)"""
8695 return _core_.MenuItem_SetBitmaps(*args, **kwargs)
8696
8697 def SetDisabledBitmap(*args, **kwargs):
8698 """SetDisabledBitmap(self, Bitmap bmpDisabled)"""
8699 return _core_.MenuItem_SetDisabledBitmap(*args, **kwargs)
8700
8701 def GetDisabledBitmap(*args, **kwargs):
8702 """GetDisabledBitmap(self) -> Bitmap"""
8703 return _core_.MenuItem_GetDisabledBitmap(*args, **kwargs)
8704
8705 def SetMarginWidth(*args, **kwargs):
8706 """SetMarginWidth(self, int nWidth)"""
8707 return _core_.MenuItem_SetMarginWidth(*args, **kwargs)
8708
8709 def GetMarginWidth(*args, **kwargs):
8710 """GetMarginWidth(self) -> int"""
8711 return _core_.MenuItem_GetMarginWidth(*args, **kwargs)
8712
8713 def GetDefaultMarginWidth(*args, **kwargs):
c24da6d6 8714 """GetDefaultMarginWidth() -> int"""
d55e5bfc
RD
8715 return _core_.MenuItem_GetDefaultMarginWidth(*args, **kwargs)
8716
8717 GetDefaultMarginWidth = staticmethod(GetDefaultMarginWidth)
8718 def IsOwnerDrawn(*args, **kwargs):
8719 """IsOwnerDrawn(self) -> bool"""
8720 return _core_.MenuItem_IsOwnerDrawn(*args, **kwargs)
8721
8722 def SetOwnerDrawn(*args, **kwargs):
8723 """SetOwnerDrawn(self, bool ownerDrawn=True)"""
8724 return _core_.MenuItem_SetOwnerDrawn(*args, **kwargs)
8725
8726 def ResetOwnerDrawn(*args, **kwargs):
8727 """ResetOwnerDrawn(self)"""
8728 return _core_.MenuItem_ResetOwnerDrawn(*args, **kwargs)
8729
8730 def SetBitmap(*args, **kwargs):
8731 """SetBitmap(self, Bitmap bitmap)"""
8732 return _core_.MenuItem_SetBitmap(*args, **kwargs)
8733
8734 def GetBitmap(*args, **kwargs):
8735 """GetBitmap(self) -> Bitmap"""
8736 return _core_.MenuItem_GetBitmap(*args, **kwargs)
8737
8738
8739class MenuItemPtr(MenuItem):
8740 def __init__(self, this):
8741 self.this = this
8742 if not hasattr(self,"thisown"): self.thisown = 0
8743 self.__class__ = MenuItem
8744_core_.MenuItem_swigregister(MenuItemPtr)
8745
8746def MenuItem_GetLabelFromText(*args, **kwargs):
8747 """MenuItem_GetLabelFromText(String text) -> String"""
8748 return _core_.MenuItem_GetLabelFromText(*args, **kwargs)
8749
8750def MenuItem_GetDefaultMarginWidth(*args, **kwargs):
8751 """MenuItem_GetDefaultMarginWidth() -> int"""
8752 return _core_.MenuItem_GetDefaultMarginWidth(*args, **kwargs)
8753
8754#---------------------------------------------------------------------------
8755
8756class Control(Window):
8757 """
8758 This is the base class for a control or 'widget'.
8759
79fccf9d
RD
8760 A control is generally a small window which processes user input
8761 and/or displays one or more item of data.
d55e5bfc
RD
8762 """
8763 def __repr__(self):
8764 return "<%s.%s; proxy of C++ wxControl instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
8765 def __init__(self, *args, **kwargs):
8766 """
248ed943
RD
8767 __init__(self, Window parent, int id=-1, Point pos=DefaultPosition,
8768 Size size=DefaultSize, long style=0, Validator validator=DefaultValidator,
d55e5bfc
RD
8769 String name=ControlNameStr) -> Control
8770
79fccf9d
RD
8771 Create a Control. Normally you should only call this from a subclass'
8772 __init__ as a plain old wx.Control is not very useful.
d55e5bfc
RD
8773 """
8774 newobj = _core_.new_Control(*args, **kwargs)
8775 self.this = newobj.this
8776 self.thisown = 1
8777 del newobj.thisown
8778 self._setOORInfo(self)
8779
8780 def Create(*args, **kwargs):
8781 """
248ed943
RD
8782 Create(self, Window parent, int id=-1, Point pos=DefaultPosition,
8783 Size size=DefaultSize, long style=0, Validator validator=DefaultValidator,
d55e5bfc
RD
8784 String name=ControlNameStr) -> bool
8785
8786 Do the 2nd phase and create the GUI control.
8787 """
8788 return _core_.Control_Create(*args, **kwargs)
8789
8790 def Command(*args, **kwargs):
8791 """
8792 Command(self, CommandEvent event)
8793
79fccf9d
RD
8794 Simulates the effect of the user issuing a command to the item.
8795
8796 :see: `wx.CommandEvent`
8797
d55e5bfc
RD
8798 """
8799 return _core_.Control_Command(*args, **kwargs)
8800
8801 def GetLabel(*args, **kwargs):
8802 """
8803 GetLabel(self) -> String
8804
8805 Return a control's text.
8806 """
8807 return _core_.Control_GetLabel(*args, **kwargs)
8808
8809 def SetLabel(*args, **kwargs):
8810 """
8811 SetLabel(self, String label)
8812
8813 Sets the item's text.
8814 """
8815 return _core_.Control_SetLabel(*args, **kwargs)
8816
a001823c 8817 def GetClassDefaultAttributes(*args, **kwargs):
f8167d6e 8818 """
a001823c 8819 GetClassDefaultAttributes(int variant=WINDOW_VARIANT_NORMAL) -> VisualAttributes
f8167d6e 8820
a001823c
RD
8821 Get the default attributes for this class. This is useful if you want
8822 to use the same font or colour in your own control as in a standard
8823 control -- which is a much better idea than hard coding specific
8824 colours or fonts which might look completely out of place on the
8825 user's system, especially if it uses themes.
f8167d6e 8826
a001823c
RD
8827 The variant parameter is only relevant under Mac currently and is
8828 ignore under other platforms. Under Mac, it will change the size of
8829 the returned font. See `wx.Window.SetWindowVariant` for more about
8830 this.
f8167d6e 8831 """
d55e5bfc
RD
8832 return _core_.Control_GetClassDefaultAttributes(*args, **kwargs)
8833
8834 GetClassDefaultAttributes = staticmethod(GetClassDefaultAttributes)
8835
8836class ControlPtr(Control):
8837 def __init__(self, this):
8838 self.this = this
8839 if not hasattr(self,"thisown"): self.thisown = 0
8840 self.__class__ = Control
8841_core_.Control_swigregister(ControlPtr)
8842ControlNameStr = cvar.ControlNameStr
8843
8844def PreControl(*args, **kwargs):
8845 """
8846 PreControl() -> Control
8847
8848 Precreate a Control control for 2-phase creation
8849 """
8850 val = _core_.new_PreControl(*args, **kwargs)
8851 val.thisown = 1
8852 return val
8853
8854def Control_GetClassDefaultAttributes(*args, **kwargs):
a001823c
RD
8855 """
8856 Control_GetClassDefaultAttributes(int variant=WINDOW_VARIANT_NORMAL) -> VisualAttributes
8857
8858 Get the default attributes for this class. This is useful if you want
8859 to use the same font or colour in your own control as in a standard
8860 control -- which is a much better idea than hard coding specific
8861 colours or fonts which might look completely out of place on the
8862 user's system, especially if it uses themes.
8863
8864 The variant parameter is only relevant under Mac currently and is
8865 ignore under other platforms. Under Mac, it will change the size of
8866 the returned font. See `wx.Window.SetWindowVariant` for more about
8867 this.
8868 """
d55e5bfc
RD
8869 return _core_.Control_GetClassDefaultAttributes(*args, **kwargs)
8870
8871#---------------------------------------------------------------------------
8872
8873class ItemContainer(object):
8874 """
8875 wx.ItemContainer defines an interface which is implemented by all
79fccf9d
RD
8876 controls which have string subitems, each of which may be selected,
8877 such as `wx.ListBox`, `wx.CheckListBox`, `wx.Choice` as well as
8878 `wx.ComboBox` which implements an extended interface deriving from
8879 this one.
d55e5bfc 8880
79fccf9d
RD
8881 It defines the methods for accessing the control's items and although
8882 each of the derived classes implements them differently, they still
8883 all conform to the same interface.
d55e5bfc 8884
79fccf9d
RD
8885 The items in a wx.ItemContainer have (non empty) string labels and,
8886 optionally, client data associated with them.
d55e5bfc
RD
8887
8888 """
8889 def __init__(self): raise RuntimeError, "No constructor defined"
8890 def __repr__(self):
8891 return "<%s.%s; proxy of C++ wxItemContainer instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
8892 def Append(*args, **kwargs):
8893 """
8894 Append(self, String item, PyObject clientData=None) -> int
8895
79fccf9d
RD
8896 Adds the item to the control, associating the given data with the item
8897 if not None. The return value is the index of the newly added item
8898 which may be different from the last one if the control is sorted (e.g.
8899 has wx.LB_SORT or wx.CB_SORT style).
d55e5bfc
RD
8900 """
8901 return _core_.ItemContainer_Append(*args, **kwargs)
8902
8903 def AppendItems(*args, **kwargs):
8904 """
f5b96ee1 8905 AppendItems(self, List strings)
d55e5bfc 8906
79fccf9d
RD
8907 Apend several items at once to the control. Notice that calling this
8908 method may be much faster than appending the items one by one if you
8909 need to add a lot of items.
d55e5bfc
RD
8910 """
8911 return _core_.ItemContainer_AppendItems(*args, **kwargs)
8912
8913 def Insert(*args, **kwargs):
8914 """
8915 Insert(self, String item, int pos, PyObject clientData=None) -> int
8916
79fccf9d 8917 Insert an item into the control before the item at the ``pos`` index,
d55e5bfc
RD
8918 optionally associating some data object with the item.
8919 """
8920 return _core_.ItemContainer_Insert(*args, **kwargs)
8921
8922 def Clear(*args, **kwargs):
8923 """
8924 Clear(self)
8925
8926 Removes all items from the control.
8927 """
8928 return _core_.ItemContainer_Clear(*args, **kwargs)
8929
8930 def Delete(*args, **kwargs):
8931 """
8932 Delete(self, int n)
8933
79fccf9d
RD
8934 Deletes the item at the zero-based index 'n' from the control. Note
8935 that it is an error (signalled by a `wx.PyAssertionError` exception if
8936 enabled) to remove an item with the index negative or greater or equal
8937 than the number of items in the control.
d55e5bfc
RD
8938 """
8939 return _core_.ItemContainer_Delete(*args, **kwargs)
8940
8941 def GetCount(*args, **kwargs):
8942 """
8943 GetCount(self) -> int
8944
8945 Returns the number of items in the control.
8946 """
8947 return _core_.ItemContainer_GetCount(*args, **kwargs)
8948
8949 def IsEmpty(*args, **kwargs):
8950 """
8951 IsEmpty(self) -> bool
8952
8953 Returns True if the control is empty or False if it has some items.
8954 """
8955 return _core_.ItemContainer_IsEmpty(*args, **kwargs)
8956
8957 def GetString(*args, **kwargs):
8958 """
8959 GetString(self, int n) -> String
8960
8961 Returns the label of the item with the given index.
8962 """
8963 return _core_.ItemContainer_GetString(*args, **kwargs)
8964
8965 def GetStrings(*args, **kwargs):
8966 """GetStrings(self) -> wxArrayString"""
8967 return _core_.ItemContainer_GetStrings(*args, **kwargs)
8968
8969 def SetString(*args, **kwargs):
8970 """
8971 SetString(self, int n, String s)
8972
8973 Sets the label for the given item.
8974 """
8975 return _core_.ItemContainer_SetString(*args, **kwargs)
8976
8977 def FindString(*args, **kwargs):
8978 """
8979 FindString(self, String s) -> int
8980
8981 Finds an item whose label matches the given string. Returns the
79fccf9d
RD
8982 zero-based position of the item, or ``wx.NOT_FOUND`` if the string was not
8983 found.
d55e5bfc
RD
8984 """
8985 return _core_.ItemContainer_FindString(*args, **kwargs)
8986
8987 def Select(*args, **kwargs):
8988 """
8989 Select(self, int n)
8990
8991 Sets the item at index 'n' to be the selected item.
8992 """
8993 return _core_.ItemContainer_Select(*args, **kwargs)
8994
8995 SetSelection = Select
8996 def GetSelection(*args, **kwargs):
8997 """
8998 GetSelection(self) -> int
8999
79fccf9d
RD
9000 Returns the index of the selected item or ``wx.NOT_FOUND`` if no item
9001 is selected.
d55e5bfc
RD
9002 """
9003 return _core_.ItemContainer_GetSelection(*args, **kwargs)
9004
9005 def GetStringSelection(*args, **kwargs):
9006 """
9007 GetStringSelection(self) -> String
9008
79fccf9d
RD
9009 Returns the label of the selected item or an empty string if no item
9010 is selected.
d55e5bfc
RD
9011 """
9012 return _core_.ItemContainer_GetStringSelection(*args, **kwargs)
9013
9014 def GetClientData(*args, **kwargs):
9015 """
9016 GetClientData(self, int n) -> PyObject
9017
9018 Returns the client data associated with the given item, (if any.)
9019 """
9020 return _core_.ItemContainer_GetClientData(*args, **kwargs)
9021
9022 def SetClientData(*args, **kwargs):
9023 """
9024 SetClientData(self, int n, PyObject clientData)
9025
9026 Associate the given client data with the item at position n.
9027 """
9028 return _core_.ItemContainer_SetClientData(*args, **kwargs)
9029
9030
9031class ItemContainerPtr(ItemContainer):
9032 def __init__(self, this):
9033 self.this = this
9034 if not hasattr(self,"thisown"): self.thisown = 0
9035 self.__class__ = ItemContainer
9036_core_.ItemContainer_swigregister(ItemContainerPtr)
9037
9038#---------------------------------------------------------------------------
9039
9040class ControlWithItems(Control,ItemContainer):
9041 """
79fccf9d
RD
9042 wx.ControlWithItems combines the ``wx.ItemContainer`` class with the
9043 wx.Control class, and is used for the base class of various controls
9044 that have items.
d55e5bfc
RD
9045 """
9046 def __init__(self): raise RuntimeError, "No constructor defined"
9047 def __repr__(self):
9048 return "<%s.%s; proxy of C++ wxControlWithItems instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
9049
9050class ControlWithItemsPtr(ControlWithItems):
9051 def __init__(self, this):
9052 self.this = this
9053 if not hasattr(self,"thisown"): self.thisown = 0
9054 self.__class__ = ControlWithItems
9055_core_.ControlWithItems_swigregister(ControlWithItemsPtr)
9056
9057#---------------------------------------------------------------------------
9058
9059class SizerItem(Object):
248ed943
RD
9060 """
9061 The wx.SizerItem class is used to track the position, size and other
9062 attributes of each item managed by a `wx.Sizer`. In normal usage user
9063 code should never need to deal directly with a wx.SizerItem, but
9064 custom classes derived from `wx.PySizer` will probably need to use the
9065 collection of wx.SizerItems held by wx.Sizer when calculating layout.
9066
9067 :see: `wx.Sizer`, `wx.GBSizerItem`
9068 """
d55e5bfc
RD
9069 def __repr__(self):
9070 return "<%s.%s; proxy of C++ wxSizerItem instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
9071 def __init__(self, *args, **kwargs):
248ed943
RD
9072 """
9073 __init__(self) -> SizerItem
9074
9075 Constructs an empty wx.SizerItem. Either a window, sizer or spacer
9076 size will need to be set before this item can be used in a Sizer.
9077
9078 You will probably never need to create a wx.SizerItem directly as they
9079 are created automatically when the sizer's Add, Insert or Prepend
9080 methods are called.
9081
9082 :see: `wx.SizerItemSpacer`, `wx.SizerItemWindow`, `wx.SizerItemSizer`
9083 """
d55e5bfc
RD
9084 newobj = _core_.new_SizerItem(*args, **kwargs)
9085 self.this = newobj.this
9086 self.thisown = 1
9087 del newobj.thisown
9088 def DeleteWindows(*args, **kwargs):
248ed943
RD
9089 """
9090 DeleteWindows(self)
9091
9092 Destroy the window or the windows in a subsizer, depending on the type
9093 of item.
9094 """
d55e5bfc
RD
9095 return _core_.SizerItem_DeleteWindows(*args, **kwargs)
9096
9097 def DetachSizer(*args, **kwargs):
248ed943
RD
9098 """
9099 DetachSizer(self)
9100
9101 Enable deleting the SizerItem without destroying the contained sizer.
9102 """
d55e5bfc
RD
9103 return _core_.SizerItem_DetachSizer(*args, **kwargs)
9104
9105 def GetSize(*args, **kwargs):
248ed943
RD
9106 """
9107 GetSize(self) -> Size
9108
9109 Get the current size of the item, as set in the last Layout.
9110 """
d55e5bfc
RD
9111 return _core_.SizerItem_GetSize(*args, **kwargs)
9112
9113 def CalcMin(*args, **kwargs):
248ed943
RD
9114 """
9115 CalcMin(self) -> Size
9116
9117 Calculates the minimum desired size for the item, including any space
9118 needed by borders.
9119 """
d55e5bfc
RD
9120 return _core_.SizerItem_CalcMin(*args, **kwargs)
9121
9122 def SetDimension(*args, **kwargs):
248ed943
RD
9123 """
9124 SetDimension(self, Point pos, Size size)
9125
9126 Set the position and size of the space allocated for this item by the
9127 sizer, and adjust the position and size of the item (window or
9128 subsizer) to be within that space taking alignment and borders into
9129 account.
9130 """
d55e5bfc
RD
9131 return _core_.SizerItem_SetDimension(*args, **kwargs)
9132
9133 def GetMinSize(*args, **kwargs):
248ed943
RD
9134 """
9135 GetMinSize(self) -> Size
9136
9137 Get the minimum size needed for the item.
9138 """
d55e5bfc
RD
9139 return _core_.SizerItem_GetMinSize(*args, **kwargs)
9140
a001823c
RD
9141 def GetMinSizeWithBorder(*args, **kwargs):
9142 """
9143 GetMinSizeWithBorder(self) -> Size
9144
9145 Get the minimum size needed for the item with space for the borders
9146 added, if needed.
9147 """
9148 return _core_.SizerItem_GetMinSizeWithBorder(*args, **kwargs)
9149
d55e5bfc
RD
9150 def SetInitSize(*args, **kwargs):
9151 """SetInitSize(self, int x, int y)"""
9152 return _core_.SizerItem_SetInitSize(*args, **kwargs)
9153
9154 def SetRatioWH(*args, **kwargs):
248ed943
RD
9155 """
9156 SetRatioWH(self, int width, int height)
9157
9158 Set the ratio item attribute.
9159 """
d55e5bfc
RD
9160 return _core_.SizerItem_SetRatioWH(*args, **kwargs)
9161
9162 def SetRatioSize(*args, **kwargs):
248ed943
RD
9163 """
9164 SetRatioSize(self, Size size)
9165
9166 Set the ratio item attribute.
9167 """
d55e5bfc
RD
9168 return _core_.SizerItem_SetRatioSize(*args, **kwargs)
9169
9170 def SetRatio(*args, **kwargs):
248ed943
RD
9171 """
9172 SetRatio(self, float ratio)
9173
9174 Set the ratio item attribute.
9175 """
d55e5bfc
RD
9176 return _core_.SizerItem_SetRatio(*args, **kwargs)
9177
9178 def GetRatio(*args, **kwargs):
248ed943
RD
9179 """
9180 GetRatio(self) -> float
9181
9182 Set the ratio item attribute.
9183 """
d55e5bfc
RD
9184 return _core_.SizerItem_GetRatio(*args, **kwargs)
9185
c1cb24a4
RD
9186 def GetRect(*args, **kwargs):
9187 """
9188 GetRect(self) -> Rect
9189
9190 Returns the rectangle that the sizer item should occupy
9191 """
9192 return _core_.SizerItem_GetRect(*args, **kwargs)
9193
d55e5bfc 9194 def IsWindow(*args, **kwargs):
248ed943
RD
9195 """
9196 IsWindow(self) -> bool
9197
9198 Is this sizer item a window?
9199 """
d55e5bfc
RD
9200 return _core_.SizerItem_IsWindow(*args, **kwargs)
9201
9202 def IsSizer(*args, **kwargs):
248ed943
RD
9203 """
9204 IsSizer(self) -> bool
9205
9206 Is this sizer item a subsizer?
9207 """
d55e5bfc
RD
9208 return _core_.SizerItem_IsSizer(*args, **kwargs)
9209
9210 def IsSpacer(*args, **kwargs):
248ed943
RD
9211 """
9212 IsSpacer(self) -> bool
9213
9214 Is this sizer item a spacer?
9215 """
d55e5bfc
RD
9216 return _core_.SizerItem_IsSpacer(*args, **kwargs)
9217
9218 def SetProportion(*args, **kwargs):
248ed943
RD
9219 """
9220 SetProportion(self, int proportion)
9221
9222 Set the proportion value for this item.
9223 """
d55e5bfc
RD
9224 return _core_.SizerItem_SetProportion(*args, **kwargs)
9225
9226 def GetProportion(*args, **kwargs):
248ed943
RD
9227 """
9228 GetProportion(self) -> int
9229
9230 Get the proportion value for this item.
9231 """
d55e5bfc
RD
9232 return _core_.SizerItem_GetProportion(*args, **kwargs)
9233
248ed943
RD
9234 SetOption = wx._deprecated(SetProportion, "Please use `SetProportion` instead.")
9235 GetOption = wx._deprecated(GetProportion, "Please use `GetProportion` instead.")
d55e5bfc 9236 def SetFlag(*args, **kwargs):
248ed943
RD
9237 """
9238 SetFlag(self, int flag)
9239
9240 Set the flag value for this item.
9241 """
d55e5bfc
RD
9242 return _core_.SizerItem_SetFlag(*args, **kwargs)
9243
9244 def GetFlag(*args, **kwargs):
248ed943
RD
9245 """
9246 GetFlag(self) -> int
9247
9248 Get the flag value for this item.
9249 """
d55e5bfc
RD
9250 return _core_.SizerItem_GetFlag(*args, **kwargs)
9251
9252 def SetBorder(*args, **kwargs):
248ed943
RD
9253 """
9254 SetBorder(self, int border)
9255
9256 Set the border value for this item.
9257 """
d55e5bfc
RD
9258 return _core_.SizerItem_SetBorder(*args, **kwargs)
9259
9260 def GetBorder(*args, **kwargs):
248ed943
RD
9261 """
9262 GetBorder(self) -> int
9263
9264 Get the border value for this item.
9265 """
d55e5bfc
RD
9266 return _core_.SizerItem_GetBorder(*args, **kwargs)
9267
9268 def GetWindow(*args, **kwargs):
248ed943
RD
9269 """
9270 GetWindow(self) -> Window
9271
9272 Get the window (if any) that is managed by this sizer item.
9273 """
d55e5bfc
RD
9274 return _core_.SizerItem_GetWindow(*args, **kwargs)
9275
9276 def SetWindow(*args, **kwargs):
248ed943
RD
9277 """
9278 SetWindow(self, Window window)
9279
9280 Set the window to be managed by this sizer item.
9281 """
d55e5bfc
RD
9282 return _core_.SizerItem_SetWindow(*args, **kwargs)
9283
9284 def GetSizer(*args, **kwargs):
248ed943
RD
9285 """
9286 GetSizer(self) -> Sizer
9287
9288 Get the subsizer (if any) that is managed by this sizer item.
9289 """
d55e5bfc
RD
9290 return _core_.SizerItem_GetSizer(*args, **kwargs)
9291
9292 def SetSizer(*args, **kwargs):
248ed943
RD
9293 """
9294 SetSizer(self, Sizer sizer)
9295
9296 Set the subsizer to be managed by this sizer item.
9297 """
d55e5bfc
RD
9298 return _core_.SizerItem_SetSizer(*args, **kwargs)
9299
9300 def GetSpacer(*args, **kwargs):
248ed943
RD
9301 """
9302 GetSpacer(self) -> Size
9303
9304 Get the size of the spacer managed by this sizer item.
9305 """
d55e5bfc
RD
9306 return _core_.SizerItem_GetSpacer(*args, **kwargs)
9307
9308 def SetSpacer(*args, **kwargs):
248ed943
RD
9309 """
9310 SetSpacer(self, Size size)
9311
9312 Set the size of the spacer to be managed by this sizer item.
9313 """
d55e5bfc
RD
9314 return _core_.SizerItem_SetSpacer(*args, **kwargs)
9315
9316 def Show(*args, **kwargs):
248ed943
RD
9317 """
9318 Show(self, bool show)
9319
9320 Set the show item attribute, which sizers use to determine if the item
9321 is to be made part of the layout or not. If the item is tracking a
9322 window then it is shown or hidden as needed.
9323 """
d55e5bfc
RD
9324 return _core_.SizerItem_Show(*args, **kwargs)
9325
9326 def IsShown(*args, **kwargs):
248ed943
RD
9327 """
9328 IsShown(self) -> bool
9329
9330 Is the item to be shown in the layout?
9331 """
d55e5bfc
RD
9332 return _core_.SizerItem_IsShown(*args, **kwargs)
9333
9334 def GetPosition(*args, **kwargs):
248ed943
RD
9335 """
9336 GetPosition(self) -> Point
9337
9338 Returns the current position of the item, as set in the last Layout.
9339 """
d55e5bfc
RD
9340 return _core_.SizerItem_GetPosition(*args, **kwargs)
9341
9342 def GetUserData(*args, **kwargs):
248ed943
RD
9343 """
9344 GetUserData(self) -> PyObject
9345
9346 Returns the userData associated with this sizer item, or None if there
9347 isn't any.
9348 """
d55e5bfc
RD
9349 return _core_.SizerItem_GetUserData(*args, **kwargs)
9350
9351
9352class SizerItemPtr(SizerItem):
9353 def __init__(self, this):
9354 self.this = this
9355 if not hasattr(self,"thisown"): self.thisown = 0
9356 self.__class__ = SizerItem
9357_core_.SizerItem_swigregister(SizerItemPtr)
9358
248ed943 9359def SizerItemWindow(*args, **kwargs):
d55e5bfc 9360 """
248ed943
RD
9361 SizerItemWindow(Window window, int proportion, int flag, int border,
9362 PyObject userData=None) -> SizerItem
9363
9364 Constructs a `wx.SizerItem` for tracking a window.
d55e5bfc 9365 """
248ed943 9366 val = _core_.new_SizerItemWindow(*args, **kwargs)
d55e5bfc
RD
9367 val.thisown = 1
9368 return val
9369
248ed943 9370def SizerItemSpacer(*args, **kwargs):
d55e5bfc 9371 """
248ed943
RD
9372 SizerItemSpacer(int width, int height, int proportion, int flag, int border,
9373 PyObject userData=None) -> SizerItem
9374
9375 Constructs a `wx.SizerItem` for tracking a spacer.
d55e5bfc 9376 """
248ed943 9377 val = _core_.new_SizerItemSpacer(*args, **kwargs)
d55e5bfc
RD
9378 val.thisown = 1
9379 return val
9380
9381def SizerItemSizer(*args, **kwargs):
9382 """
9383 SizerItemSizer(Sizer sizer, int proportion, int flag, int border,
248ed943
RD
9384 PyObject userData=None) -> SizerItem
9385
9386 Constructs a `wx.SizerItem` for tracking a subsizer
d55e5bfc
RD
9387 """
9388 val = _core_.new_SizerItemSizer(*args, **kwargs)
9389 val.thisown = 1
9390 return val
9391
9392class Sizer(Object):
248ed943
RD
9393 """
9394 wx.Sizer is the abstract base class used for laying out subwindows in
9395 a window. You cannot use wx.Sizer directly; instead, you will have to
9396 use one of the sizer classes derived from it such as `wx.BoxSizer`,
9397 `wx.StaticBoxSizer`, `wx.NotebookSizer`, `wx.GridSizer`, `wx.FlexGridSizer`
9398 and `wx.GridBagSizer`.
9399
9400 The concept implemented by sizers in wxWidgets is closely related to
9401 layout tools in other GUI toolkits, such as Java's AWT, the GTK
9402 toolkit or the Qt toolkit. It is based upon the idea of the individual
9403 subwindows reporting their minimal required size and their ability to
9404 get stretched if the size of the parent window has changed. This will
9405 most often mean that the programmer does not set the original size of
9406 a dialog in the beginning, rather the dialog will assigned a sizer and
9407 this sizer will be queried about the recommended size. The sizer in
9408 turn will query its children, which can be normal windows or contorls,
9409 empty space or other sizers, so that a hierarchy of sizers can be
9410 constructed. Note that wxSizer does not derive from wxWindow and thus
9411 do not interfere with tab ordering and requires very little resources
9412 compared to a real window on screen.
9413
9414 What makes sizers so well fitted for use in wxWidgets is the fact that
9415 every control reports its own minimal size and the algorithm can
9416 handle differences in font sizes or different window (dialog item)
9417 sizes on different platforms without problems. If for example the
9418 standard font as well as the overall design of Mac widgets requires
9419 more space than on Windows, then the initial size of a dialog using a
9420 sizer will automatically be bigger on Mac than on Windows.
9421 """
d55e5bfc
RD
9422 def __init__(self): raise RuntimeError, "No constructor defined"
9423 def __repr__(self):
9424 return "<%s.%s; proxy of C++ wxSizer instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
9425 def _setOORInfo(*args, **kwargs):
9426 """_setOORInfo(self, PyObject _self)"""
9427 return _core_.Sizer__setOORInfo(*args, **kwargs)
9428
9429 def Add(*args, **kwargs):
9430 """
248ed943 9431 Add(self, item, int proportion=0, int flag=0, int border=0,
c1cb24a4 9432 PyObject userData=None) -> wx.SizerItem
248ed943
RD
9433
9434 Appends a child item to the sizer.
d55e5bfc
RD
9435 """
9436 return _core_.Sizer_Add(*args, **kwargs)
9437
9438 def Insert(*args, **kwargs):
9439 """
248ed943 9440 Insert(self, int before, item, int proportion=0, int flag=0, int border=0,
c1cb24a4 9441 PyObject userData=None) -> wx.SizerItem
248ed943
RD
9442
9443 Inserts a new item into the list of items managed by this sizer before
9444 the item at index *before*. See `Add` for a description of the parameters.
d55e5bfc
RD
9445 """
9446 return _core_.Sizer_Insert(*args, **kwargs)
9447
9448 def Prepend(*args, **kwargs):
9449 """
248ed943 9450 Prepend(self, item, int proportion=0, int flag=0, int border=0,
c1cb24a4 9451 PyObject userData=None) -> wx.SizerItem
248ed943
RD
9452
9453 Adds a new item to the begining of the list of sizer items managed by
9454 this sizer. See `Add` for a description of the parameters.
d55e5bfc
RD
9455 """
9456 return _core_.Sizer_Prepend(*args, **kwargs)
9457
9458 def Remove(*args, **kwargs):
248ed943
RD
9459 """
9460 Remove(self, item) -> bool
9461
9462 Removes an item from the sizer and destroys it. This method does not
9463 cause any layout or resizing to take place, call `Layout` to update
9464 the layout on screen after removing a child from the sizer. The
9465 *item* parameter can be either a window, a sizer, or the zero-based
9466 index of an item to remove. Returns True if the child item was found
9467 and removed.
9468 """
d55e5bfc
RD
9469 return _core_.Sizer_Remove(*args, **kwargs)
9470
1a6bba1e 9471 def Detach(*args, **kwargs):
248ed943
RD
9472 """
9473 Detach(self, item) -> bool
9474
9475 Detaches an item from the sizer without destroying it. This method
9476 does not cause any layout or resizing to take place, call `Layout` to
9477 do so. The *item* parameter can be either a window, a sizer, or the
9478 zero-based index of the item to be detached. Returns True if the child item
9479 was found and detached.
9480 """
1a6bba1e
RD
9481 return _core_.Sizer_Detach(*args, **kwargs)
9482
c1cb24a4
RD
9483 def GetItem(*args, **kwargs):
9484 """
9485 GetItem(self, item) -> wx.SizerItem
9486
9487 Returns the `wx.SizerItem` which holds the *item* given. The *item*
9488 parameter can be either a window, a sizer, or the zero-based index of
9489 the item to be detached.
9490 """
9491 return _core_.Sizer_GetItem(*args, **kwargs)
9492
d55e5bfc
RD
9493 def _SetItemMinSize(*args, **kwargs):
9494 """_SetItemMinSize(self, PyObject item, Size size)"""
9495 return _core_.Sizer__SetItemMinSize(*args, **kwargs)
9496
248ed943
RD
9497 def SetItemMinSize(self, item, *args):
9498 """
9499 SetItemMinSize(self, item, Size size)
9500
9501 Sets the minimum size that will be allocated for an item in the sizer.
9502 The *item* parameter can be either a window, a sizer, or the
9503 zero-based index of the item. If a window or sizer is given then it
9504 will be searched for recursivly in subsizers if neccessary.
9505 """
9506 if len(args) == 2:
9507 # for backward compatibility accept separate width,height args too
9508 return self._SetItemMinSize(item, args)
9509 else:
9510 return self._SetItemMinSize(item, args[0])
9511
d55e5bfc 9512 def AddItem(*args, **kwargs):
248ed943
RD
9513 """
9514 AddItem(self, SizerItem item)
9515
9516 Adds a `wx.SizerItem` to the sizer.
9517 """
d55e5bfc
RD
9518 return _core_.Sizer_AddItem(*args, **kwargs)
9519
9520 def InsertItem(*args, **kwargs):
248ed943
RD
9521 """
9522 InsertItem(self, int index, SizerItem item)
9523
9524 Inserts a `wx.SizerItem` to the sizer at the position given by *index*.
9525 """
d55e5bfc
RD
9526 return _core_.Sizer_InsertItem(*args, **kwargs)
9527
9528 def PrependItem(*args, **kwargs):
248ed943
RD
9529 """
9530 PrependItem(self, SizerItem item)
9531
9532 Prepends a `wx.SizerItem` to the sizer.
9533 """
d55e5bfc
RD
9534 return _core_.Sizer_PrependItem(*args, **kwargs)
9535
248ed943 9536 def AddMany(self, items):
c24da6d6
RD
9537 """
9538 AddMany is a convenience method for adding several items
9539 to a sizer at one time. Simply pass it a list of tuples,
9540 where each tuple consists of the parameters that you
9541 would normally pass to the `Add` method.
9542 """
248ed943
RD
9543 for item in items:
9544 if type(item) != type(()) or (len(item) == 2 and type(item[0]) == type(1)):
9545 item = (item, )
9546 self.Add(*item)
d55e5bfc
RD
9547
9548 # for backwards compatibility only, please do not use in new code
c24da6d6
RD
9549 AddWindow = wx._deprecated(Add, "AddWindow is deprecated, use `Add` instead.")
9550 AddSizer = wx._deprecated(Add, "AddSizer is deprecated, use `Add` instead.")
9551 AddSpacer = wx._deprecated(Add, "AddSpacer is deprecated, use `Add` instead.")
9552 PrependWindow = wx._deprecated(Prepend, "PrependWindow is deprecated, use `Prepend` instead.")
9553 PrependSizer = wx._deprecated(Prepend, "PrependSizer is deprecated, use `Prepend` instead.")
9554 PrependSpacer = wx._deprecated(Prepend, "PrependSpacer is deprecated, use `Prepend` instead.")
9555 InsertWindow = wx._deprecated(Insert, "InsertWindow is deprecated, use `Insert` instead.")
9556 InsertSizer = wx._deprecated(Insert, "InsertSizer is deprecated, use `Insert` instead.")
9557 InsertSpacer = wx._deprecated(Insert, "InsertSpacer is deprecated, use `Insert` instead.")
9558 RemoveWindow = wx._deprecated(Remove, "RemoveWindow is deprecated, use `Remove` instead.")
9559 RemoveSizer = wx._deprecated(Remove, "RemoveSizer is deprecated, use `Remove` instead.")
9560 RemovePos = wx._deprecated(Remove, "RemovePos is deprecated, use `Remove` instead.")
d55e5bfc
RD
9561
9562
d55e5bfc 9563 def SetDimension(*args, **kwargs):
248ed943
RD
9564 """
9565 SetDimension(self, int x, int y, int width, int height)
9566
9567 Call this to force the sizer to take the given dimension and thus
9568 force the items owned by the sizer to resize themselves according to
9569 the rules defined by the parameter in the `Add`, `Insert` or `Prepend`
9570 methods.
9571 """
d55e5bfc
RD
9572 return _core_.Sizer_SetDimension(*args, **kwargs)
9573
9574 def SetMinSize(*args, **kwargs):
248ed943
RD
9575 """
9576 SetMinSize(self, Size size)
9577
9578 Call this to give the sizer a minimal size. Normally, the sizer will
9579 calculate its minimal size based purely on how much space its children
9580 need. After calling this method `GetMinSize` will return either the
9581 minimal size as requested by its children or the minimal size set
9582 here, depending on which is bigger.
9583 """
d55e5bfc
RD
9584 return _core_.Sizer_SetMinSize(*args, **kwargs)
9585
9586 def GetSize(*args, **kwargs):
248ed943
RD
9587 """
9588 GetSize(self) -> Size
9589
9590 Returns the current size of the space managed by the sizer.
9591 """
d55e5bfc
RD
9592 return _core_.Sizer_GetSize(*args, **kwargs)
9593
9594 def GetPosition(*args, **kwargs):
248ed943
RD
9595 """
9596 GetPosition(self) -> Point
9597
9598 Returns the current position of the sizer's managed space.
9599 """
d55e5bfc
RD
9600 return _core_.Sizer_GetPosition(*args, **kwargs)
9601
9602 def GetMinSize(*args, **kwargs):
248ed943
RD
9603 """
9604 GetMinSize(self) -> Size
9605
9606 Returns the minimal size of the sizer. This is either the combined
9607 minimal size of all the children and their borders or the minimal size
9608 set by SetMinSize, depending on which is bigger.
9609 """
d55e5bfc
RD
9610 return _core_.Sizer_GetMinSize(*args, **kwargs)
9611
9612 def GetSizeTuple(self):
1a6bba1e 9613 return self.GetSize().Get()
d55e5bfc 9614 def GetPositionTuple(self):
1a6bba1e 9615 return self.GetPosition().Get()
d55e5bfc 9616 def GetMinSizeTuple(self):
1a6bba1e 9617 return self.GetMinSize().Get()
d55e5bfc
RD
9618
9619 def RecalcSizes(*args, **kwargs):
248ed943
RD
9620 """
9621 RecalcSizes(self)
9622
9623 Using the sizes calculated by `CalcMin` reposition and resize all the
9624 items managed by this sizer. You should not need to call this directly as
9625 it is called by `Layout`.
9626 """
d55e5bfc
RD
9627 return _core_.Sizer_RecalcSizes(*args, **kwargs)
9628
9629 def CalcMin(*args, **kwargs):
248ed943
RD
9630 """
9631 CalcMin(self) -> Size
9632
9633 This method is where the sizer will do the actual calculation of its
9634 children's minimal sizes. You should not need to call this directly as
9635 it is called by `Layout`.
9636 """
d55e5bfc
RD
9637 return _core_.Sizer_CalcMin(*args, **kwargs)
9638
9639 def Layout(*args, **kwargs):
248ed943
RD
9640 """
9641 Layout(self)
9642
9643 This method will force the recalculation and layout of the items
9644 controlled by the sizer using the current space allocated to the
9645 sizer. Normally this is called automatically from the owning window's
9646 EVT_SIZE handler, but it is also useful to call it from user code when
9647 one of the items in a sizer change size, or items are added or
9648 removed.
9649 """
d55e5bfc
RD
9650 return _core_.Sizer_Layout(*args, **kwargs)
9651
9652 def Fit(*args, **kwargs):
248ed943
RD
9653 """
9654 Fit(self, Window window) -> Size
9655
9656 Tell the sizer to resize the *window* to match the sizer's minimal
9657 size. This is commonly done in the constructor of the window itself in
9658 order to set its initial size to match the needs of the children as
9659 determined by the sizer. Returns the new size.
9660
9661 For a top level window this is the total window size, not the client size.
9662 """
d55e5bfc
RD
9663 return _core_.Sizer_Fit(*args, **kwargs)
9664
9665 def FitInside(*args, **kwargs):
248ed943
RD
9666 """
9667 FitInside(self, Window window)
9668
9669 Tell the sizer to resize the *virtual size* of the *window* to match the
9670 sizer's minimal size. This will not alter the on screen size of the
9671 window, but may cause the addition/removal/alteration of scrollbars
9672 required to view the virtual area in windows which manage it.
9673
9674 :see: `wx.ScrolledWindow.SetScrollbars`, `SetVirtualSizeHints`
9675
9676 """
d55e5bfc
RD
9677 return _core_.Sizer_FitInside(*args, **kwargs)
9678
9679 def SetSizeHints(*args, **kwargs):
248ed943
RD
9680 """
9681 SetSizeHints(self, Window window)
9682
9683 Tell the sizer to set (and `Fit`) the minimal size of the *window* to
9684 match the sizer's minimal size. This is commonly done in the
9685 constructor of the window itself if the window is resizable (as are
9686 many dialogs under Unix and frames on probably all platforms) in order
9687 to prevent the window from being sized smaller than the minimal size
9688 required by the sizer.
9689 """
d55e5bfc
RD
9690 return _core_.Sizer_SetSizeHints(*args, **kwargs)
9691
9692 def SetVirtualSizeHints(*args, **kwargs):
248ed943
RD
9693 """
9694 SetVirtualSizeHints(self, Window window)
9695
9696 Tell the sizer to set the minimal size of the window virtual area to
9697 match the sizer's minimal size. For windows with managed scrollbars
9698 this will set them appropriately.
9699
9700 :see: `wx.ScrolledWindow.SetScrollbars`
9701
9702 """
d55e5bfc
RD
9703 return _core_.Sizer_SetVirtualSizeHints(*args, **kwargs)
9704
9705 def Clear(*args, **kwargs):
248ed943
RD
9706 """
9707 Clear(self, bool deleteWindows=False)
9708
9709 Clear all items from the sizer, optionally destroying the window items
9710 as well.
9711 """
d55e5bfc
RD
9712 return _core_.Sizer_Clear(*args, **kwargs)
9713
9714 def DeleteWindows(*args, **kwargs):
248ed943
RD
9715 """
9716 DeleteWindows(self)
9717
9718 Destroy all windows managed by the sizer.
9719 """
d55e5bfc
RD
9720 return _core_.Sizer_DeleteWindows(*args, **kwargs)
9721
9722 def GetChildren(*args, **kwargs):
248ed943 9723 """
51b83b37 9724 GetChildren(self) -> list
248ed943
RD
9725
9726 Returns a list of all the `wx.SizerItem` objects managed by the sizer.
9727 """
d55e5bfc
RD
9728 return _core_.Sizer_GetChildren(*args, **kwargs)
9729
9730 def Show(*args, **kwargs):
248ed943 9731 """
ae8162c8 9732 Show(self, item, bool show=True, bool recursive=false) -> bool
d55e5bfc 9733
248ed943
RD
9734 Shows or hides an item managed by the sizer. To make a sizer item
9735 disappear or reappear, use Show followed by `Layout`. The *item*
9736 parameter can be either a window, a sizer, or the zero-based index of
629e65c2
RD
9737 the item. Use the recursive parameter to show or hide an item in a
9738 subsizer. Returns True if the item was found.
248ed943
RD
9739 """
9740 return _core_.Sizer_Show(*args, **kwargs)
d55e5bfc
RD
9741
9742 def IsShown(*args, **kwargs):
248ed943
RD
9743 """
9744 IsShown(self, item)
9745
9746 Determines if the item is currently shown. sizer. To make a sizer
9747 item disappear or reappear, use Show followed by `Layout`. The *item*
9748 parameter can be either a window, a sizer, or the zero-based index of
9749 the item.
9750 """
d55e5bfc
RD
9751 return _core_.Sizer_IsShown(*args, **kwargs)
9752
629e65c2 9753 def Hide(self, item, recursive=False):
248ed943 9754 """
629e65c2 9755 A convenience method for Show(item, False, recursive).
248ed943 9756 """
06759a38 9757 return self.Show(item, False, recursive)
248ed943 9758
d55e5bfc 9759 def ShowItems(*args, **kwargs):
248ed943
RD
9760 """
9761 ShowItems(self, bool show)
9762
84f85550 9763 Recursively call `wx.SizerItem.Show` on all sizer items.
248ed943 9764 """
d55e5bfc
RD
9765 return _core_.Sizer_ShowItems(*args, **kwargs)
9766
9767
9768class SizerPtr(Sizer):
9769 def __init__(self, this):
9770 self.this = this
9771 if not hasattr(self,"thisown"): self.thisown = 0
9772 self.__class__ = Sizer
9773_core_.Sizer_swigregister(SizerPtr)
9774
9775class PySizer(Sizer):
248ed943
RD
9776 """
9777 wx.PySizer is a special version of `wx.Sizer` that has been
9778 instrumented to allow the C++ virtual methods to be overloaded in
9779 Python derived classes. You would derive from this class if you are
9780 wanting to implement a custom sizer in Python code. Simply implement
9781 `CalcMin` and `RecalcSizes` in the derived class and you're all set.
9782 For example::
9783
9784 class MySizer(wx.PySizer):
9785 def __init__(self):
9786 wx.PySizer.__init__(self)
9787
9788 def CalcMin(self):
9789 for item in self.GetChildren():
9790 # calculate the total minimum width and height needed
9791 # by all items in the sizer according to this sizer's
9792 # layout algorithm.
9793 ...
9794 return wx.Size(width, height)
9795
9796 def RecalcSizes(self):
9797 # find the space allotted to this sizer
9798 pos = self.GetPosition()
9799 size = self.GetSize()
9800 for item in self.GetChildren():
9801 # Recalculate (if necessary) the position and size of
9802 # each item and then call item.SetDimension to do the
9803 # actual positioning and sizing of the items within the
9804 # space alloted to this sizer.
9805 ...
9806 item.SetDimension(itemPos, itemSize)
9807
9808
9809 When `Layout` is called it first calls `CalcMin` followed by
9810 `RecalcSizes` so you can optimize a bit by saving the results of
62d32a5f 9811 `CalcMin` and reusing them in `RecalcSizes`.
248ed943
RD
9812
9813 :see: `wx.SizerItem`, `wx.Sizer.GetChildren`
9814
9815
9816 """
d55e5bfc
RD
9817 def __repr__(self):
9818 return "<%s.%s; proxy of C++ wxPySizer instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
9819 def __init__(self, *args, **kwargs):
248ed943
RD
9820 """
9821 __init__(self) -> PySizer
9822
9823 Creates a wx.PySizer. Must be called from the __init__ in the derived
9824 class.
9825 """
d55e5bfc
RD
9826 newobj = _core_.new_PySizer(*args, **kwargs)
9827 self.this = newobj.this
9828 self.thisown = 1
9829 del newobj.thisown
9830 self._setCallbackInfo(self, PySizer);self._setOORInfo(self)
9831
9832 def _setCallbackInfo(*args, **kwargs):
9833 """_setCallbackInfo(self, PyObject self, PyObject _class)"""
9834 return _core_.PySizer__setCallbackInfo(*args, **kwargs)
9835
9836
9837class PySizerPtr(PySizer):
9838 def __init__(self, this):
9839 self.this = this
9840 if not hasattr(self,"thisown"): self.thisown = 0
9841 self.__class__ = PySizer
9842_core_.PySizer_swigregister(PySizerPtr)
9843
9844#---------------------------------------------------------------------------
9845
9846class BoxSizer(Sizer):
248ed943
RD
9847 """
9848 The basic idea behind a box sizer is that windows will most often be
9849 laid out in rather simple basic geometry, typically in a row or a
9850 column or nested hierarchies of either. A wx.BoxSizer will lay out
9851 its items in a simple row or column, depending on the orientation
9852 parameter passed to the constructor.
9853 """
d55e5bfc
RD
9854 def __repr__(self):
9855 return "<%s.%s; proxy of C++ wxBoxSizer instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
9856 def __init__(self, *args, **kwargs):
248ed943
RD
9857 """
9858 __init__(self, int orient=HORIZONTAL) -> BoxSizer
9859
9860 Constructor for a wx.BoxSizer. *orient* may be one of ``wx.VERTICAL``
9861 or ``wx.HORIZONTAL`` for creating either a column sizer or a row
9862 sizer.
9863 """
d55e5bfc
RD
9864 newobj = _core_.new_BoxSizer(*args, **kwargs)
9865 self.this = newobj.this
9866 self.thisown = 1
9867 del newobj.thisown
9868 self._setOORInfo(self)
9869
9870 def GetOrientation(*args, **kwargs):
248ed943
RD
9871 """
9872 GetOrientation(self) -> int
9873
9874 Returns the current orientation of the sizer.
9875 """
d55e5bfc
RD
9876 return _core_.BoxSizer_GetOrientation(*args, **kwargs)
9877
9878 def SetOrientation(*args, **kwargs):
248ed943
RD
9879 """
9880 SetOrientation(self, int orient)
d55e5bfc 9881
248ed943
RD
9882 Resets the orientation of the sizer.
9883 """
9884 return _core_.BoxSizer_SetOrientation(*args, **kwargs)
d55e5bfc
RD
9885
9886
9887class BoxSizerPtr(BoxSizer):
9888 def __init__(self, this):
9889 self.this = this
9890 if not hasattr(self,"thisown"): self.thisown = 0
9891 self.__class__ = BoxSizer
9892_core_.BoxSizer_swigregister(BoxSizerPtr)
9893
9894#---------------------------------------------------------------------------
9895
9896class StaticBoxSizer(BoxSizer):
248ed943
RD
9897 """
9898 wx.StaticBoxSizer derives from and functions identically to the
9899 `wx.BoxSizer` and adds a `wx.StaticBox` around the items that the sizer
9900 manages. Note that this static box must be created separately and
9901 passed to the sizer constructor.
9902 """
d55e5bfc
RD
9903 def __repr__(self):
9904 return "<%s.%s; proxy of C++ wxStaticBoxSizer instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
9905 def __init__(self, *args, **kwargs):
248ed943
RD
9906 """
9907 __init__(self, StaticBox box, int orient=HORIZONTAL) -> StaticBoxSizer
9908
9909 Constructor. It takes an associated static box and the orientation
9910 *orient* as parameters - orient can be either of ``wx.VERTICAL`` or
9911 ``wx.HORIZONTAL``.
9912 """
d55e5bfc
RD
9913 newobj = _core_.new_StaticBoxSizer(*args, **kwargs)
9914 self.this = newobj.this
9915 self.thisown = 1
9916 del newobj.thisown
9917 self._setOORInfo(self)
9918
9919 def GetStaticBox(*args, **kwargs):
248ed943
RD
9920 """
9921 GetStaticBox(self) -> StaticBox
d55e5bfc 9922
248ed943
RD
9923 Returns the static box associated with this sizer.
9924 """
9925 return _core_.StaticBoxSizer_GetStaticBox(*args, **kwargs)
d55e5bfc
RD
9926
9927
9928class StaticBoxSizerPtr(StaticBoxSizer):
9929 def __init__(self, this):
9930 self.this = this
9931 if not hasattr(self,"thisown"): self.thisown = 0
9932 self.__class__ = StaticBoxSizer
9933_core_.StaticBoxSizer_swigregister(StaticBoxSizerPtr)
9934
9935#---------------------------------------------------------------------------
9936
9937class GridSizer(Sizer):
248ed943
RD
9938 """
9939 A grid sizer is a sizer which lays out its children in a
9940 two-dimensional table with all cells having the same size. In other
9941 words, the width of each cell within the grid is the width of the
9942 widest item added to the sizer and the height of each grid cell is the
9943 height of the tallest item. An optional vertical and/or horizontal
9944 gap between items can also be specified (in pixels.)
9945
9946 Items are placed in the cells of the grid in the order they are added,
9947 in row-major order. In other words, the first row is filled first,
9948 then the second, and so on until all items have been added. (If
9949 neccessary, additional rows will be added as items are added.) If you
9950 need to have greater control over the cells that items are placed in
9951 then use the `wx.GridBagSizer`.
9952
9953 """
d55e5bfc
RD
9954 def __repr__(self):
9955 return "<%s.%s; proxy of C++ wxGridSizer instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
9956 def __init__(self, *args, **kwargs):
248ed943
RD
9957 """
9958 __init__(self, int rows=1, int cols=0, int vgap=0, int hgap=0) -> GridSizer
9959
9960 Constructor for a wx.GridSizer. *rows* and *cols* determine the number
9961 of columns and rows in the sizer - if either of the parameters is
9962 zero, it will be calculated to from the total number of children in
9963 the sizer, thus making the sizer grow dynamically. *vgap* and *hgap*
9964 define extra space between all children.
9965 """
d55e5bfc
RD
9966 newobj = _core_.new_GridSizer(*args, **kwargs)
9967 self.this = newobj.this
9968 self.thisown = 1
9969 del newobj.thisown
9970 self._setOORInfo(self)
9971
d55e5bfc 9972 def SetCols(*args, **kwargs):
248ed943
RD
9973 """
9974 SetCols(self, int cols)
9975
9976 Sets the number of columns in the sizer.
9977 """
d55e5bfc
RD
9978 return _core_.GridSizer_SetCols(*args, **kwargs)
9979
9980 def SetRows(*args, **kwargs):
248ed943
RD
9981 """
9982 SetRows(self, int rows)
9983
9984 Sets the number of rows in the sizer.
9985 """
d55e5bfc
RD
9986 return _core_.GridSizer_SetRows(*args, **kwargs)
9987
9988 def SetVGap(*args, **kwargs):
248ed943
RD
9989 """
9990 SetVGap(self, int gap)
9991
9992 Sets the vertical gap (in pixels) between the cells in the sizer.
9993 """
d55e5bfc
RD
9994 return _core_.GridSizer_SetVGap(*args, **kwargs)
9995
9996 def SetHGap(*args, **kwargs):
248ed943
RD
9997 """
9998 SetHGap(self, int gap)
9999
10000 Sets the horizontal gap (in pixels) between cells in the sizer
10001 """
d55e5bfc
RD
10002 return _core_.GridSizer_SetHGap(*args, **kwargs)
10003
10004 def GetCols(*args, **kwargs):
248ed943
RD
10005 """
10006 GetCols(self) -> int
10007
10008 Returns the number of columns in the sizer.
10009 """
d55e5bfc
RD
10010 return _core_.GridSizer_GetCols(*args, **kwargs)
10011
10012 def GetRows(*args, **kwargs):
248ed943
RD
10013 """
10014 GetRows(self) -> int
10015
10016 Returns the number of rows in the sizer.
10017 """
d55e5bfc
RD
10018 return _core_.GridSizer_GetRows(*args, **kwargs)
10019
10020 def GetVGap(*args, **kwargs):
248ed943
RD
10021 """
10022 GetVGap(self) -> int
10023
10024 Returns the vertical gap (in pixels) between the cells in the sizer.
10025 """
d55e5bfc
RD
10026 return _core_.GridSizer_GetVGap(*args, **kwargs)
10027
10028 def GetHGap(*args, **kwargs):
248ed943
RD
10029 """
10030 GetHGap(self) -> int
10031
10032 Returns the horizontal gap (in pixels) between cells in the sizer.
10033 """
d55e5bfc
RD
10034 return _core_.GridSizer_GetHGap(*args, **kwargs)
10035
10036
10037class GridSizerPtr(GridSizer):
10038 def __init__(self, this):
10039 self.this = this
10040 if not hasattr(self,"thisown"): self.thisown = 0
10041 self.__class__ = GridSizer
10042_core_.GridSizer_swigregister(GridSizerPtr)
10043
10044#---------------------------------------------------------------------------
10045
10046FLEX_GROWMODE_NONE = _core_.FLEX_GROWMODE_NONE
10047FLEX_GROWMODE_SPECIFIED = _core_.FLEX_GROWMODE_SPECIFIED
10048FLEX_GROWMODE_ALL = _core_.FLEX_GROWMODE_ALL
10049class FlexGridSizer(GridSizer):
248ed943
RD
10050 """
10051 A flex grid sizer is a sizer which lays out its children in a
10052 two-dimensional table with all table cells in one row having the same
10053 height and all cells in one column having the same width, but all
10054 rows or all columns are not necessarily the same height or width as in
10055 the `wx.GridSizer`.
10056
10057 wx.FlexGridSizer can also size items equally in one direction but
10058 unequally ("flexibly") in the other. If the sizer is only flexible
10059 in one direction (this can be changed using `SetFlexibleDirection`), it
10060 needs to be decided how the sizer should grow in the other ("non
10061 flexible") direction in order to fill the available space. The
10062 `SetNonFlexibleGrowMode` method serves this purpose.
10063
10064
10065 """
d55e5bfc
RD
10066 def __repr__(self):
10067 return "<%s.%s; proxy of C++ wxFlexGridSizer instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
10068 def __init__(self, *args, **kwargs):
248ed943
RD
10069 """
10070 __init__(self, int rows=1, int cols=0, int vgap=0, int hgap=0) -> FlexGridSizer
10071
10072 Constructor for a wx.FlexGridSizer. *rows* and *cols* determine the
10073 number of columns and rows in the sizer - if either of the parameters
10074 is zero, it will be calculated to from the total number of children in
10075 the sizer, thus making the sizer grow dynamically. *vgap* and *hgap*
10076 define extra space between all children.
10077 """
d55e5bfc
RD
10078 newobj = _core_.new_FlexGridSizer(*args, **kwargs)
10079 self.this = newobj.this
10080 self.thisown = 1
10081 del newobj.thisown
10082 self._setOORInfo(self)
10083
248ed943
RD
10084 def AddGrowableRow(*args, **kwargs):
10085 """
10086 AddGrowableRow(self, size_t idx, int proportion=0)
d55e5bfc 10087
248ed943
RD
10088 Specifies that row *idx* (starting from zero) should be grown if there
10089 is extra space available to the sizer.
d55e5bfc 10090
248ed943
RD
10091 The *proportion* parameter has the same meaning as the stretch factor
10092 for the box sizers except that if all proportions are 0, then all
10093 columns are resized equally (instead of not being resized at all).
10094 """
d55e5bfc
RD
10095 return _core_.FlexGridSizer_AddGrowableRow(*args, **kwargs)
10096
10097 def RemoveGrowableRow(*args, **kwargs):
248ed943
RD
10098 """
10099 RemoveGrowableRow(self, size_t idx)
10100
10101 Specifies that row *idx* is no longer growable.
10102 """
d55e5bfc
RD
10103 return _core_.FlexGridSizer_RemoveGrowableRow(*args, **kwargs)
10104
10105 def AddGrowableCol(*args, **kwargs):
248ed943
RD
10106 """
10107 AddGrowableCol(self, size_t idx, int proportion=0)
10108
10109 Specifies that column *idx* (starting from zero) should be grown if
10110 there is extra space available to the sizer.
10111
10112 The *proportion* parameter has the same meaning as the stretch factor
10113 for the box sizers except that if all proportions are 0, then all
10114 columns are resized equally (instead of not being resized at all).
10115 """
d55e5bfc
RD
10116 return _core_.FlexGridSizer_AddGrowableCol(*args, **kwargs)
10117
10118 def RemoveGrowableCol(*args, **kwargs):
248ed943
RD
10119 """
10120 RemoveGrowableCol(self, size_t idx)
10121
10122 Specifies that column *idx* is no longer growable.
10123 """
d55e5bfc
RD
10124 return _core_.FlexGridSizer_RemoveGrowableCol(*args, **kwargs)
10125
10126 def SetFlexibleDirection(*args, **kwargs):
248ed943
RD
10127 """
10128 SetFlexibleDirection(self, int direction)
10129
10130 Specifies whether the sizer should flexibly resize its columns, rows,
10131 or both. Argument *direction* can be one of the following values. Any
10132 other value is ignored.
10133
10134 ============== =======================================
10135 wx.VERTICAL Rows are flexibly sized.
10136 wx.HORIZONTAL Columns are flexibly sized.
10137 wx.BOTH Both rows and columns are flexibly sized
10138 (this is the default value).
10139 ============== =======================================
10140
10141 Note that this method does not trigger relayout.
10142
10143 """
d55e5bfc
RD
10144 return _core_.FlexGridSizer_SetFlexibleDirection(*args, **kwargs)
10145
10146 def GetFlexibleDirection(*args, **kwargs):
248ed943
RD
10147 """
10148 GetFlexibleDirection(self) -> int
10149
10150 Returns a value that specifies whether the sizer
10151 flexibly resizes its columns, rows, or both (default).
10152
10153 :see: `SetFlexibleDirection`
10154 """
d55e5bfc
RD
10155 return _core_.FlexGridSizer_GetFlexibleDirection(*args, **kwargs)
10156
10157 def SetNonFlexibleGrowMode(*args, **kwargs):
248ed943
RD
10158 """
10159 SetNonFlexibleGrowMode(self, int mode)
10160
10161 Specifies how the sizer should grow in the non-flexible direction if
10162 there is one (so `SetFlexibleDirection` must have been called
10163 previously). Argument *mode* can be one of the following values:
10164
10165 ========================== =================================================
10166 wx.FLEX_GROWMODE_NONE Sizer doesn't grow in the non flexible direction.
10167 wx.FLEX_GROWMODE_SPECIFIED Sizer honors growable columns/rows set with
10168 `AddGrowableCol` and `AddGrowableRow`. In this
10169 case equal sizing applies to minimum sizes of
10170 columns or rows (this is the default value).
10171 wx.FLEX_GROWMODE_ALL Sizer equally stretches all columns or rows in
10172 the non flexible direction, whether they are
10173 growable or not in the flexbile direction.
10174 ========================== =================================================
10175
10176 Note that this method does not trigger relayout.
10177
10178
10179 """
d55e5bfc
RD
10180 return _core_.FlexGridSizer_SetNonFlexibleGrowMode(*args, **kwargs)
10181
10182 def GetNonFlexibleGrowMode(*args, **kwargs):
248ed943
RD
10183 """
10184 GetNonFlexibleGrowMode(self) -> int
10185
10186 Returns the value that specifies how the sizer grows in the
10187 non-flexible direction if there is one.
10188
10189 :see: `SetNonFlexibleGrowMode`
10190 """
d55e5bfc
RD
10191 return _core_.FlexGridSizer_GetNonFlexibleGrowMode(*args, **kwargs)
10192
10193 def GetRowHeights(*args, **kwargs):
a8eff060
RD
10194 """
10195 GetRowHeights(self) -> list
10196
10197 Returns a list of integers representing the heights of each of the
10198 rows in the sizer.
10199 """
d55e5bfc
RD
10200 return _core_.FlexGridSizer_GetRowHeights(*args, **kwargs)
10201
10202 def GetColWidths(*args, **kwargs):
a8eff060
RD
10203 """
10204 GetColWidths(self) -> list
10205
10206 Returns a list of integers representing the widths of each of the
10207 columns in the sizer.
10208 """
d55e5bfc
RD
10209 return _core_.FlexGridSizer_GetColWidths(*args, **kwargs)
10210
10211
10212class FlexGridSizerPtr(FlexGridSizer):
10213 def __init__(self, this):
10214 self.this = this
10215 if not hasattr(self,"thisown"): self.thisown = 0
10216 self.__class__ = FlexGridSizer
10217_core_.FlexGridSizer_swigregister(FlexGridSizerPtr)
10218
62d32a5f
RD
10219class StdDialogButtonSizer(BoxSizer):
10220 """
10221 A special sizer that knows how to order and position standard buttons
10222 in order to conform to the current platform's standards. You simply
10223 need to add each `wx.Button` to the sizer, and be sure to create the
10224 buttons using the standard ID's. Then call `Finalize` and the sizer
10225 will take care of the rest.
10226
10227 """
10228 def __repr__(self):
10229 return "<%s.%s; proxy of C++ wxStdDialogButtonSizer instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
10230 def __init__(self, *args, **kwargs):
10231 """__init__(self) -> StdDialogButtonSizer"""
10232 newobj = _core_.new_StdDialogButtonSizer(*args, **kwargs)
10233 self.this = newobj.this
10234 self.thisown = 1
10235 del newobj.thisown
10236 def AddButton(*args, **kwargs):
10237 """
10238 AddButton(self, wxButton button)
10239
10240 Use this to add the buttons to this sizer. Do not use the `Add`
10241 method in the base class.
10242 """
10243 return _core_.StdDialogButtonSizer_AddButton(*args, **kwargs)
10244
10245 def Finalise(*args, **kwargs):
10246 """
10247 Finalise(self)
10248
10249 This funciton needs to be called after all the buttons have been added
10250 to the sizer. It will reorder them and position them in a platform
10251 specifc manner.
10252 """
10253 return _core_.StdDialogButtonSizer_Finalise(*args, **kwargs)
51b83b37
RD
10254
10255 def SetAffirmativeButton(*args, **kwargs):
10256 """SetAffirmativeButton(self, wxButton button)"""
10257 return _core_.StdDialogButtonSizer_SetAffirmativeButton(*args, **kwargs)
10258
10259 def SetNegativeButton(*args, **kwargs):
10260 """SetNegativeButton(self, wxButton button)"""
10261 return _core_.StdDialogButtonSizer_SetNegativeButton(*args, **kwargs)
10262
10263 def SetCancelButton(*args, **kwargs):
10264 """SetCancelButton(self, wxButton button)"""
10265 return _core_.StdDialogButtonSizer_SetCancelButton(*args, **kwargs)
62d32a5f
RD
10266
10267 def GetAffirmativeButton(*args, **kwargs):
10268 """GetAffirmativeButton(self) -> wxButton"""
10269 return _core_.StdDialogButtonSizer_GetAffirmativeButton(*args, **kwargs)
10270
10271 def GetApplyButton(*args, **kwargs):
10272 """GetApplyButton(self) -> wxButton"""
10273 return _core_.StdDialogButtonSizer_GetApplyButton(*args, **kwargs)
10274
10275 def GetNegativeButton(*args, **kwargs):
10276 """GetNegativeButton(self) -> wxButton"""
10277 return _core_.StdDialogButtonSizer_GetNegativeButton(*args, **kwargs)
10278
10279 def GetCancelButton(*args, **kwargs):
10280 """GetCancelButton(self) -> wxButton"""
10281 return _core_.StdDialogButtonSizer_GetCancelButton(*args, **kwargs)
10282
10283 def GetHelpButton(*args, **kwargs):
10284 """GetHelpButton(self) -> wxButton"""
10285 return _core_.StdDialogButtonSizer_GetHelpButton(*args, **kwargs)
10286
10287
10288class StdDialogButtonSizerPtr(StdDialogButtonSizer):
10289 def __init__(self, this):
10290 self.this = this
10291 if not hasattr(self,"thisown"): self.thisown = 0
10292 self.__class__ = StdDialogButtonSizer
10293_core_.StdDialogButtonSizer_swigregister(StdDialogButtonSizerPtr)
10294
d55e5bfc
RD
10295#---------------------------------------------------------------------------
10296
10297class GBPosition(object):
248ed943
RD
10298 """
10299 This class represents the position of an item in a virtual grid of
10300 rows and columns managed by a `wx.GridBagSizer`. wxPython has
10301 typemaps that will automatically convert from a 2-element sequence of
10302 integers to a wx.GBPosition, so you can use the more pythonic
10303 representation of the position nearly transparently in Python code.
10304 """
d55e5bfc
RD
10305 def __repr__(self):
10306 return "<%s.%s; proxy of C++ wxGBPosition instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
10307 def __init__(self, *args, **kwargs):
248ed943
RD
10308 """
10309 __init__(self, int row=0, int col=0) -> GBPosition
10310
10311 This class represents the position of an item in a virtual grid of
10312 rows and columns managed by a `wx.GridBagSizer`. wxPython has
10313 typemaps that will automatically convert from a 2-element sequence of
10314 integers to a wx.GBPosition, so you can use the more pythonic
10315 representation of the position nearly transparently in Python code.
10316 """
d55e5bfc
RD
10317 newobj = _core_.new_GBPosition(*args, **kwargs)
10318 self.this = newobj.this
10319 self.thisown = 1
10320 del newobj.thisown
10321 def GetRow(*args, **kwargs):
10322 """GetRow(self) -> int"""
10323 return _core_.GBPosition_GetRow(*args, **kwargs)
10324
10325 def GetCol(*args, **kwargs):
10326 """GetCol(self) -> int"""
10327 return _core_.GBPosition_GetCol(*args, **kwargs)
10328
10329 def SetRow(*args, **kwargs):
10330 """SetRow(self, int row)"""
10331 return _core_.GBPosition_SetRow(*args, **kwargs)
10332
10333 def SetCol(*args, **kwargs):
10334 """SetCol(self, int col)"""
10335 return _core_.GBPosition_SetCol(*args, **kwargs)
10336
10337 def __eq__(*args, **kwargs):
10338 """__eq__(self, GBPosition other) -> bool"""
10339 return _core_.GBPosition___eq__(*args, **kwargs)
10340
10341 def __ne__(*args, **kwargs):
10342 """__ne__(self, GBPosition other) -> bool"""
10343 return _core_.GBPosition___ne__(*args, **kwargs)
10344
10345 def Set(*args, **kwargs):
10346 """Set(self, int row=0, int col=0)"""
10347 return _core_.GBPosition_Set(*args, **kwargs)
10348
10349 def Get(*args, **kwargs):
10350 """Get(self) -> PyObject"""
10351 return _core_.GBPosition_Get(*args, **kwargs)
10352
79fccf9d 10353 asTuple = wx._deprecated(Get, "asTuple is deprecated, use `Get` instead")
d55e5bfc
RD
10354 def __str__(self): return str(self.Get())
10355 def __repr__(self): return 'wx.GBPosition'+str(self.Get())
10356 def __len__(self): return len(self.Get())
10357 def __getitem__(self, index): return self.Get()[index]
10358 def __setitem__(self, index, val):
10359 if index == 0: self.SetRow(val)
10360 elif index == 1: self.SetCol(val)
10361 else: raise IndexError
10362 def __nonzero__(self): return self.Get() != (0,0)
10363 __safe_for_unpickling__ = True
10364 def __reduce__(self): return (wx.GBPosition, self.Get())
10365
10366 row = property(GetRow, SetRow)
10367 col = property(GetCol, SetCol)
10368
10369
10370class GBPositionPtr(GBPosition):
10371 def __init__(self, this):
10372 self.this = this
10373 if not hasattr(self,"thisown"): self.thisown = 0
10374 self.__class__ = GBPosition
10375_core_.GBPosition_swigregister(GBPositionPtr)
10376
10377class GBSpan(object):
248ed943
RD
10378 """
10379 This class is used to hold the row and column spanning attributes of
10380 items in a `wx.GridBagSizer`. wxPython has typemaps that will
10381 automatically convert from a 2-element sequence of integers to a
10382 wx.GBSpan, so you can use the more pythonic representation of the span
10383 nearly transparently in Python code.
10384
10385 """
d55e5bfc
RD
10386 def __repr__(self):
10387 return "<%s.%s; proxy of C++ wxGBSpan instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
10388 def __init__(self, *args, **kwargs):
248ed943
RD
10389 """
10390 __init__(self, int rowspan=1, int colspan=1) -> GBSpan
10391
10392 Construct a new wxGBSpan, optionally setting the rowspan and
10393 colspan. The default is (1,1). (Meaning that the item occupies one
10394 cell in each direction.
10395 """
d55e5bfc
RD
10396 newobj = _core_.new_GBSpan(*args, **kwargs)
10397 self.this = newobj.this
10398 self.thisown = 1
10399 del newobj.thisown
10400 def GetRowspan(*args, **kwargs):
10401 """GetRowspan(self) -> int"""
10402 return _core_.GBSpan_GetRowspan(*args, **kwargs)
10403
10404 def GetColspan(*args, **kwargs):
10405 """GetColspan(self) -> int"""
10406 return _core_.GBSpan_GetColspan(*args, **kwargs)
10407
10408 def SetRowspan(*args, **kwargs):
10409 """SetRowspan(self, int rowspan)"""
10410 return _core_.GBSpan_SetRowspan(*args, **kwargs)
10411
10412 def SetColspan(*args, **kwargs):
10413 """SetColspan(self, int colspan)"""
10414 return _core_.GBSpan_SetColspan(*args, **kwargs)
10415
10416 def __eq__(*args, **kwargs):
10417 """__eq__(self, GBSpan other) -> bool"""
10418 return _core_.GBSpan___eq__(*args, **kwargs)
10419
10420 def __ne__(*args, **kwargs):
10421 """__ne__(self, GBSpan other) -> bool"""
10422 return _core_.GBSpan___ne__(*args, **kwargs)
10423
10424 def Set(*args, **kwargs):
10425 """Set(self, int rowspan=1, int colspan=1)"""
10426 return _core_.GBSpan_Set(*args, **kwargs)
10427
10428 def Get(*args, **kwargs):
10429 """Get(self) -> PyObject"""
10430 return _core_.GBSpan_Get(*args, **kwargs)
10431
79fccf9d 10432 asTuple = wx._deprecated(Get, "asTuple is deprecated, use `Get` instead")
d55e5bfc
RD
10433 def __str__(self): return str(self.Get())
10434 def __repr__(self): return 'wx.GBSpan'+str(self.Get())
10435 def __len__(self): return len(self.Get())
10436 def __getitem__(self, index): return self.Get()[index]
10437 def __setitem__(self, index, val):
10438 if index == 0: self.SetRowspan(val)
10439 elif index == 1: self.SetColspan(val)
10440 else: raise IndexError
10441 def __nonzero__(self): return self.Get() != (0,0)
10442 __safe_for_unpickling__ = True
10443 def __reduce__(self): return (wx.GBSpan, self.Get())
10444
10445 rowspan = property(GetRowspan, SetRowspan)
10446 colspan = property(GetColspan, SetColspan)
10447
10448
10449class GBSpanPtr(GBSpan):
10450 def __init__(self, this):
10451 self.this = this
10452 if not hasattr(self,"thisown"): self.thisown = 0
10453 self.__class__ = GBSpan
10454_core_.GBSpan_swigregister(GBSpanPtr)
10455
10456class GBSizerItem(SizerItem):
248ed943
RD
10457 """
10458 The wx.GBSizerItem class is used to track the additional data about
10459 items in a `wx.GridBagSizer` such as the item's position in the grid
10460 and how many rows or columns it spans.
10461
10462 """
d55e5bfc
RD
10463 def __repr__(self):
10464 return "<%s.%s; proxy of C++ wxGBSizerItem instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
10465 def __init__(self, *args, **kwargs):
248ed943
RD
10466 """
10467 __init__(self) -> GBSizerItem
10468
10469 Constructs an empty wx.GBSizerItem. Either a window, sizer or spacer
10470 size will need to be set, as well as a position and span before this
10471 item can be used in a Sizer.
10472
10473 You will probably never need to create a wx.GBSizerItem directly as they
10474 are created automatically when the sizer's Add method is called.
10475 """
d55e5bfc
RD
10476 newobj = _core_.new_GBSizerItem(*args, **kwargs)
10477 self.this = newobj.this
10478 self.thisown = 1
10479 del newobj.thisown
10480 def GetPos(*args, **kwargs):
248ed943
RD
10481 """
10482 GetPos(self) -> GBPosition
10483
10484 Get the grid position of the item
10485 """
d55e5bfc
RD
10486 return _core_.GBSizerItem_GetPos(*args, **kwargs)
10487
10488 def GetPosTuple(self): return self.GetPos().Get()
10489 def GetSpan(*args, **kwargs):
248ed943
RD
10490 """
10491 GetSpan(self) -> GBSpan
10492
10493 Get the row and column spanning of the item
10494 """
d55e5bfc
RD
10495 return _core_.GBSizerItem_GetSpan(*args, **kwargs)
10496
10497 def GetSpanTuple(self): return self.GetSpan().Get()
10498 def SetPos(*args, **kwargs):
248ed943
RD
10499 """
10500 SetPos(self, GBPosition pos) -> bool
10501
10502 If the item is already a member of a sizer then first ensure that
10503 there is no other item that would intersect with this one at the new
10504 position, then set the new position. Returns True if the change is
10505 successful and after the next Layout() the item will be moved.
10506 """
d55e5bfc
RD
10507 return _core_.GBSizerItem_SetPos(*args, **kwargs)
10508
10509 def SetSpan(*args, **kwargs):
248ed943
RD
10510 """
10511 SetSpan(self, GBSpan span) -> bool
10512
10513 If the item is already a member of a sizer then first ensure that
10514 there is no other item that would intersect with this one with its new
10515 spanning size, then set the new spanning. Returns True if the change
10516 is successful and after the next Layout() the item will be resized.
10517
10518 """
d55e5bfc
RD
10519 return _core_.GBSizerItem_SetSpan(*args, **kwargs)
10520
248ed943 10521 def Intersects(*args, **kwargs):
d55e5bfc
RD
10522 """
10523 Intersects(self, GBSizerItem other) -> bool
248ed943
RD
10524
10525 Returns True if this item and the other item instersect.
d55e5bfc 10526 """
248ed943
RD
10527 return _core_.GBSizerItem_Intersects(*args, **kwargs)
10528
10529 def IntersectsPos(*args, **kwargs):
10530 """
10531 IntersectsPos(self, GBPosition pos, GBSpan span) -> bool
10532
10533 Returns True if the given pos/span would intersect with this item.
10534 """
10535 return _core_.GBSizerItem_IntersectsPos(*args, **kwargs)
d55e5bfc
RD
10536
10537 def GetEndPos(*args, **kwargs):
248ed943
RD
10538 """
10539 GetEndPos(self) -> GBPosition
10540
10541 Get the row and column of the endpoint of this item.
10542 """
d55e5bfc
RD
10543 return _core_.GBSizerItem_GetEndPos(*args, **kwargs)
10544
10545 def GetGBSizer(*args, **kwargs):
248ed943
RD
10546 """
10547 GetGBSizer(self) -> GridBagSizer
10548
10549 Get the sizer this item is a member of.
10550 """
d55e5bfc
RD
10551 return _core_.GBSizerItem_GetGBSizer(*args, **kwargs)
10552
10553 def SetGBSizer(*args, **kwargs):
248ed943
RD
10554 """
10555 SetGBSizer(self, GridBagSizer sizer)
10556
10557 Set the sizer this item is a member of.
10558 """
d55e5bfc
RD
10559 return _core_.GBSizerItem_SetGBSizer(*args, **kwargs)
10560
10561
10562class GBSizerItemPtr(GBSizerItem):
10563 def __init__(self, this):
10564 self.this = this
10565 if not hasattr(self,"thisown"): self.thisown = 0
10566 self.__class__ = GBSizerItem
10567_core_.GBSizerItem_swigregister(GBSizerItemPtr)
10568DefaultSpan = cvar.DefaultSpan
10569
10570def GBSizerItemWindow(*args, **kwargs):
10571 """
10572 GBSizerItemWindow(Window window, GBPosition pos, GBSpan span, int flag,
248ed943
RD
10573 int border, PyObject userData=None) -> GBSizerItem
10574
10575 Construct a `wx.GBSizerItem` for a window.
d55e5bfc
RD
10576 """
10577 val = _core_.new_GBSizerItemWindow(*args, **kwargs)
10578 val.thisown = 1
10579 return val
10580
10581def GBSizerItemSizer(*args, **kwargs):
10582 """
10583 GBSizerItemSizer(Sizer sizer, GBPosition pos, GBSpan span, int flag,
248ed943
RD
10584 int border, PyObject userData=None) -> GBSizerItem
10585
10586 Construct a `wx.GBSizerItem` for a sizer
d55e5bfc
RD
10587 """
10588 val = _core_.new_GBSizerItemSizer(*args, **kwargs)
10589 val.thisown = 1
10590 return val
10591
10592def GBSizerItemSpacer(*args, **kwargs):
10593 """
10594 GBSizerItemSpacer(int width, int height, GBPosition pos, GBSpan span,
248ed943
RD
10595 int flag, int border, PyObject userData=None) -> GBSizerItem
10596
10597 Construct a `wx.GBSizerItem` for a spacer.
d55e5bfc
RD
10598 """
10599 val = _core_.new_GBSizerItemSpacer(*args, **kwargs)
10600 val.thisown = 1
10601 return val
10602
10603class GridBagSizer(FlexGridSizer):
248ed943
RD
10604 """
10605 A `wx.Sizer` that can lay out items in a virtual grid like a
10606 `wx.FlexGridSizer` but in this case explicit positioning of the items
10607 is allowed using `wx.GBPosition`, and items can optionally span more
10608 than one row and/or column using `wx.GBSpan`. The total size of the
10609 virtual grid is determined by the largest row and column that items are
10610 positioned at, adjusted for spanning.
10611
10612 """
d55e5bfc
RD
10613 def __repr__(self):
10614 return "<%s.%s; proxy of C++ wxGridBagSizer instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
10615 def __init__(self, *args, **kwargs):
248ed943
RD
10616 """
10617 __init__(self, int vgap=0, int hgap=0) -> GridBagSizer
10618
10619 Constructor, with optional parameters to specify the gap between the
10620 rows and columns.
10621 """
d55e5bfc
RD
10622 newobj = _core_.new_GridBagSizer(*args, **kwargs)
10623 self.this = newobj.this
10624 self.thisown = 1
10625 del newobj.thisown
c9c2cf70
RD
10626 self._setOORInfo(self)
10627
d55e5bfc
RD
10628 def Add(*args, **kwargs):
10629 """
248ed943 10630 Add(self, item, GBPosition pos, GBSpan span=DefaultSpan, int flag=0,
c1cb24a4 10631 int border=0, userData=None) -> wx.GBSizerItem
248ed943
RD
10632
10633 Adds an item to the sizer at the grid cell *pos*, optionally spanning
10634 more than one row or column as specified with *span*. The remaining
10635 args behave similarly to `wx.Sizer.Add`.
10636
10637 Returns True if the item was successfully placed at the given cell
10638 position, False if something was already there.
10639
d55e5bfc
RD
10640 """
10641 return _core_.GridBagSizer_Add(*args, **kwargs)
10642
10643 def AddItem(*args, **kwargs):
248ed943 10644 """
c1cb24a4 10645 Add(self, GBSizerItem item) -> wx.GBSizerItem
248ed943
RD
10646
10647 Add an item to the sizer using a `wx.GBSizerItem`. Returns True if
10648 the item was successfully placed at its given cell position, False if
10649 something was already there.
10650 """
d55e5bfc
RD
10651 return _core_.GridBagSizer_AddItem(*args, **kwargs)
10652
84f85550
RD
10653 def GetCellSize(*args, **kwargs):
10654 """
10655 GetCellSize(self, int row, int col) -> Size
10656
10657 Get the size of the specified cell, including hgap and
10658 vgap. Only valid after a Layout.
10659 """
10660 return _core_.GridBagSizer_GetCellSize(*args, **kwargs)
10661
d55e5bfc 10662 def GetEmptyCellSize(*args, **kwargs):
248ed943
RD
10663 """
10664 GetEmptyCellSize(self) -> Size
10665
10666 Get the size used for cells in the grid with no item.
10667 """
d55e5bfc
RD
10668 return _core_.GridBagSizer_GetEmptyCellSize(*args, **kwargs)
10669
10670 def SetEmptyCellSize(*args, **kwargs):
248ed943
RD
10671 """
10672 SetEmptyCellSize(self, Size sz)
10673
10674 Set the size used for cells in the grid with no item.
10675 """
d55e5bfc
RD
10676 return _core_.GridBagSizer_SetEmptyCellSize(*args, **kwargs)
10677
10678 def GetItemPosition(*args):
10679 """
248ed943
RD
10680 GetItemPosition(self, item) -> GBPosition
10681
10682 Get the grid position of the specified *item* where *item* is either a
10683 window or subsizer that is a member of this sizer, or a zero-based
10684 index of an item.
d55e5bfc
RD
10685 """
10686 return _core_.GridBagSizer_GetItemPosition(*args)
10687
10688 def SetItemPosition(*args):
10689 """
248ed943
RD
10690 SetItemPosition(self, item, GBPosition pos) -> bool
10691
10692 Set the grid position of the specified *item* where *item* is either a
10693 window or subsizer that is a member of this sizer, or a zero-based
10694 index of an item. Returns True on success. If the move is not
10695 allowed (because an item is already there) then False is returned.
10696
d55e5bfc
RD
10697 """
10698 return _core_.GridBagSizer_SetItemPosition(*args)
10699
10700 def GetItemSpan(*args):
10701 """
248ed943
RD
10702 GetItemSpan(self, item) -> GBSpan
10703
10704 Get the row/col spanning of the specified *item* where *item* is
10705 either a window or subsizer that is a member of this sizer, or a
10706 zero-based index of an item.
d55e5bfc
RD
10707 """
10708 return _core_.GridBagSizer_GetItemSpan(*args)
10709
10710 def SetItemSpan(*args):
10711 """
248ed943
RD
10712 SetItemSpan(self, item, GBSpan span) -> bool
10713
10714 Set the row/col spanning of the specified *item* where *item* is
10715 either a window or subsizer that is a member of this sizer, or a
10716 zero-based index of an item. Returns True on success. If the move is
10717 not allowed (because an item is already there) then False is returned.
d55e5bfc
RD
10718 """
10719 return _core_.GridBagSizer_SetItemSpan(*args)
10720
10721 def FindItem(*args):
10722 """
248ed943
RD
10723 FindItem(self, item) -> GBSizerItem
10724
10725 Find the sizer item for the given window or subsizer, returns None if
10726 not found. (non-recursive)
d55e5bfc
RD
10727 """
10728 return _core_.GridBagSizer_FindItem(*args)
10729
10730 def FindItemAtPosition(*args, **kwargs):
248ed943
RD
10731 """
10732 FindItemAtPosition(self, GBPosition pos) -> GBSizerItem
10733
10734 Return the sizer item for the given grid cell, or None if there is no
10735 item at that position. (non-recursive)
10736 """
d55e5bfc
RD
10737 return _core_.GridBagSizer_FindItemAtPosition(*args, **kwargs)
10738
10739 def FindItemAtPoint(*args, **kwargs):
248ed943
RD
10740 """
10741 FindItemAtPoint(self, Point pt) -> GBSizerItem
10742
10743 Return the sizer item located at the point given in *pt*, or None if
10744 there is no item at that point. The (x,y) coordinates in pt correspond
10745 to the client coordinates of the window using the sizer for
10746 layout. (non-recursive)
10747 """
d55e5bfc
RD
10748 return _core_.GridBagSizer_FindItemAtPoint(*args, **kwargs)
10749
248ed943
RD
10750 def CheckForIntersection(*args, **kwargs):
10751 """
10752 CheckForIntersection(self, GBSizerItem item, GBSizerItem excludeItem=None) -> bool
d55e5bfc 10753
248ed943
RD
10754 Look at all items and see if any intersect (or would overlap) the
10755 given *item*. Returns True if so, False if there would be no overlap.
10756 If an *excludeItem* is given then it will not be checked for
10757 intersection, for example it may be the item we are checking the
10758 position of.
d55e5bfc 10759
248ed943
RD
10760 """
10761 return _core_.GridBagSizer_CheckForIntersection(*args, **kwargs)
d55e5bfc 10762
248ed943 10763 def CheckForIntersectionPos(*args, **kwargs):
d55e5bfc 10764 """
248ed943
RD
10765 CheckForIntersectionPos(self, GBPosition pos, GBSpan span, GBSizerItem excludeItem=None) -> bool
10766
10767 Look at all items and see if any intersect (or would overlap) the
10768 given position and span. Returns True if so, False if there would be
10769 no overlap. If an *excludeItem* is given then it will not be checked
10770 for intersection, for example it may be the item we are checking the
10771 position of.
d55e5bfc 10772 """
248ed943 10773 return _core_.GridBagSizer_CheckForIntersectionPos(*args, **kwargs)
d55e5bfc
RD
10774
10775
10776class GridBagSizerPtr(GridBagSizer):
10777 def __init__(self, this):
10778 self.this = this
10779 if not hasattr(self,"thisown"): self.thisown = 0
10780 self.__class__ = GridBagSizer
10781_core_.GridBagSizer_swigregister(GridBagSizerPtr)
10782
10783#---------------------------------------------------------------------------
10784
10785Left = _core_.Left
10786Top = _core_.Top
10787Right = _core_.Right
10788Bottom = _core_.Bottom
10789Width = _core_.Width
10790Height = _core_.Height
10791Centre = _core_.Centre
10792Center = _core_.Center
10793CentreX = _core_.CentreX
10794CentreY = _core_.CentreY
10795Unconstrained = _core_.Unconstrained
10796AsIs = _core_.AsIs
10797PercentOf = _core_.PercentOf
10798Above = _core_.Above
10799Below = _core_.Below
10800LeftOf = _core_.LeftOf
10801RightOf = _core_.RightOf
10802SameAs = _core_.SameAs
10803Absolute = _core_.Absolute
10804class IndividualLayoutConstraint(Object):
10805 """
79fccf9d
RD
10806 Objects of this class are stored in the `wx.LayoutConstraints` class as
10807 one of eight possible constraints that a window can be involved in.
10808 You will never need to create an instance of
10809 wx.IndividualLayoutConstraint, rather you should create a
10810 `wx.LayoutConstraints` instance and use the individual contstraints
d55e5bfc 10811 that it contains.
d55e5bfc
RD
10812 """
10813 def __init__(self): raise RuntimeError, "No constructor defined"
10814 def __repr__(self):
10815 return "<%s.%s; proxy of C++ wxIndividualLayoutConstraint instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
10816 def Set(*args, **kwargs):
79fccf9d
RD
10817 """
10818 Set(self, int rel, Window otherW, int otherE, int val=0, int marg=wxLAYOUT_DEFAULT_MARGIN)
10819
10820 Sets the properties of the constraint. Normally called by one of the
10821 convenience functions such as Above, RightOf, SameAs.
10822 """
d55e5bfc
RD
10823 return _core_.IndividualLayoutConstraint_Set(*args, **kwargs)
10824
10825 def LeftOf(*args, **kwargs):
10826 """
10827 LeftOf(self, Window sibling, int marg=0)
10828
79fccf9d
RD
10829 Constrains this edge to be to the left of the given window, with an
10830 optional margin. Implicitly, this is relative to the left edge of the
10831 other window.
d55e5bfc
RD
10832 """
10833 return _core_.IndividualLayoutConstraint_LeftOf(*args, **kwargs)
10834
10835 def RightOf(*args, **kwargs):
10836 """
10837 RightOf(self, Window sibling, int marg=0)
10838
79fccf9d
RD
10839 Constrains this edge to be to the right of the given window, with an
10840 optional margin. Implicitly, this is relative to the right edge of the
10841 other window.
d55e5bfc
RD
10842 """
10843 return _core_.IndividualLayoutConstraint_RightOf(*args, **kwargs)
10844
10845 def Above(*args, **kwargs):
10846 """
10847 Above(self, Window sibling, int marg=0)
10848
79fccf9d
RD
10849 Constrains this edge to be above the given window, with an optional
10850 margin. Implicitly, this is relative to the top edge of the other
10851 window.
d55e5bfc
RD
10852 """
10853 return _core_.IndividualLayoutConstraint_Above(*args, **kwargs)
10854
10855 def Below(*args, **kwargs):
10856 """
10857 Below(self, Window sibling, int marg=0)
10858
79fccf9d
RD
10859 Constrains this edge to be below the given window, with an optional
10860 margin. Implicitly, this is relative to the bottom edge of the other
10861 window.
d55e5bfc
RD
10862 """
10863 return _core_.IndividualLayoutConstraint_Below(*args, **kwargs)
10864
10865 def SameAs(*args, **kwargs):
10866 """
10867 SameAs(self, Window otherW, int edge, int marg=0)
10868
79fccf9d
RD
10869 Constrains this edge or dimension to be to the same as the edge of the
10870 given window, with an optional margin.
d55e5bfc
RD
10871 """
10872 return _core_.IndividualLayoutConstraint_SameAs(*args, **kwargs)
10873
10874 def PercentOf(*args, **kwargs):
10875 """
10876 PercentOf(self, Window otherW, int wh, int per)
10877
79fccf9d
RD
10878 Constrains this edge or dimension to be to a percentage of the given
10879 window, with an optional margin.
d55e5bfc
RD
10880 """
10881 return _core_.IndividualLayoutConstraint_PercentOf(*args, **kwargs)
10882
10883 def Absolute(*args, **kwargs):
10884 """
10885 Absolute(self, int val)
10886
79fccf9d 10887 Constrains this edge or dimension to be the given absolute value.
d55e5bfc
RD
10888 """
10889 return _core_.IndividualLayoutConstraint_Absolute(*args, **kwargs)
10890
10891 def Unconstrained(*args, **kwargs):
10892 """
10893 Unconstrained(self)
10894
79fccf9d
RD
10895 Sets this edge or dimension to be unconstrained, that is, dependent on
10896 other edges and dimensions from which this value can be deduced.
d55e5bfc
RD
10897 """
10898 return _core_.IndividualLayoutConstraint_Unconstrained(*args, **kwargs)
10899
10900 def AsIs(*args, **kwargs):
10901 """
10902 AsIs(self)
10903
79fccf9d
RD
10904 Sets this edge or constraint to be whatever the window's value is at
10905 the moment. If either of the width and height constraints are *as is*,
10906 the window will not be resized, but moved instead. This is important
10907 when considering panel items which are intended to have a default
10908 size, such as a button, which may take its size from the size of the
10909 button label.
d55e5bfc
RD
10910 """
10911 return _core_.IndividualLayoutConstraint_AsIs(*args, **kwargs)
10912
10913 def GetOtherWindow(*args, **kwargs):
10914 """GetOtherWindow(self) -> Window"""
10915 return _core_.IndividualLayoutConstraint_GetOtherWindow(*args, **kwargs)
10916
10917 def GetMyEdge(*args, **kwargs):
10918 """GetMyEdge(self) -> int"""
10919 return _core_.IndividualLayoutConstraint_GetMyEdge(*args, **kwargs)
10920
10921 def SetEdge(*args, **kwargs):
10922 """SetEdge(self, int which)"""
10923 return _core_.IndividualLayoutConstraint_SetEdge(*args, **kwargs)
10924
10925 def SetValue(*args, **kwargs):
10926 """SetValue(self, int v)"""
10927 return _core_.IndividualLayoutConstraint_SetValue(*args, **kwargs)
10928
10929 def GetMargin(*args, **kwargs):
10930 """GetMargin(self) -> int"""
10931 return _core_.IndividualLayoutConstraint_GetMargin(*args, **kwargs)
10932
10933 def SetMargin(*args, **kwargs):
10934 """SetMargin(self, int m)"""
10935 return _core_.IndividualLayoutConstraint_SetMargin(*args, **kwargs)
10936
10937 def GetValue(*args, **kwargs):
10938 """GetValue(self) -> int"""
10939 return _core_.IndividualLayoutConstraint_GetValue(*args, **kwargs)
10940
10941 def GetPercent(*args, **kwargs):
10942 """GetPercent(self) -> int"""
10943 return _core_.IndividualLayoutConstraint_GetPercent(*args, **kwargs)
10944
10945 def GetOtherEdge(*args, **kwargs):
10946 """GetOtherEdge(self) -> int"""
10947 return _core_.IndividualLayoutConstraint_GetOtherEdge(*args, **kwargs)
10948
10949 def GetDone(*args, **kwargs):
10950 """GetDone(self) -> bool"""
10951 return _core_.IndividualLayoutConstraint_GetDone(*args, **kwargs)
10952
10953 def SetDone(*args, **kwargs):
10954 """SetDone(self, bool d)"""
10955 return _core_.IndividualLayoutConstraint_SetDone(*args, **kwargs)
10956
10957 def GetRelationship(*args, **kwargs):
10958 """GetRelationship(self) -> int"""
10959 return _core_.IndividualLayoutConstraint_GetRelationship(*args, **kwargs)
10960
10961 def SetRelationship(*args, **kwargs):
10962 """SetRelationship(self, int r)"""
10963 return _core_.IndividualLayoutConstraint_SetRelationship(*args, **kwargs)
10964
10965 def ResetIfWin(*args, **kwargs):
10966 """
10967 ResetIfWin(self, Window otherW) -> bool
10968
10969 Reset constraint if it mentions otherWin
10970 """
10971 return _core_.IndividualLayoutConstraint_ResetIfWin(*args, **kwargs)
10972
10973 def SatisfyConstraint(*args, **kwargs):
10974 """
10975 SatisfyConstraint(self, LayoutConstraints constraints, Window win) -> bool
10976
10977 Try to satisfy constraint
10978 """
10979 return _core_.IndividualLayoutConstraint_SatisfyConstraint(*args, **kwargs)
10980
10981 def GetEdge(*args, **kwargs):
10982 """
10983 GetEdge(self, int which, Window thisWin, Window other) -> int
10984
10985 Get the value of this edge or dimension, or if this
10986 is not determinable, -1.
10987 """
10988 return _core_.IndividualLayoutConstraint_GetEdge(*args, **kwargs)
10989
10990
10991class IndividualLayoutConstraintPtr(IndividualLayoutConstraint):
10992 def __init__(self, this):
10993 self.this = this
10994 if not hasattr(self,"thisown"): self.thisown = 0
10995 self.__class__ = IndividualLayoutConstraint
10996_core_.IndividualLayoutConstraint_swigregister(IndividualLayoutConstraintPtr)
10997
10998class LayoutConstraints(Object):
10999 """
79fccf9d
RD
11000 **Note:** constraints are now deprecated and you should use sizers
11001 instead.
d55e5bfc 11002
79fccf9d
RD
11003 Objects of this class can be associated with a window to define its
11004 layout constraints, with respect to siblings or its parent.
d55e5bfc
RD
11005
11006 The class consists of the following eight constraints of class
11007 wx.IndividualLayoutConstraint, some or all of which should be accessed
11008 directly to set the appropriate constraints.
11009
11010 * left: represents the left hand edge of the window
11011 * right: represents the right hand edge of the window
11012 * top: represents the top edge of the window
11013 * bottom: represents the bottom edge of the window
11014 * width: represents the width of the window
11015 * height: represents the height of the window
11016 * centreX: represents the horizontal centre point of the window
11017 * centreY: represents the vertical centre point of the window
11018
79fccf9d
RD
11019 Most constraints are initially set to have the relationship
11020 wxUnconstrained, which means that their values should be calculated by
11021 looking at known constraints. The exceptions are width and height,
11022 which are set to wxAsIs to ensure that if the user does not specify a
11023 constraint, the existing width and height will be used, to be
11024 compatible with panel items which often have take a default size. If
11025 the constraint is ``wx.AsIs``, the dimension will not be changed.
11026
11027 :see: `wx.IndividualLayoutConstraint`, `wx.Window.SetConstraints`
d55e5bfc
RD
11028
11029 """
11030 def __repr__(self):
11031 return "<%s.%s; proxy of C++ wxLayoutConstraints instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
11032 left = property(_core_.LayoutConstraints_left_get)
11033 top = property(_core_.LayoutConstraints_top_get)
11034 right = property(_core_.LayoutConstraints_right_get)
11035 bottom = property(_core_.LayoutConstraints_bottom_get)
11036 width = property(_core_.LayoutConstraints_width_get)
11037 height = property(_core_.LayoutConstraints_height_get)
11038 centreX = property(_core_.LayoutConstraints_centreX_get)
11039 centreY = property(_core_.LayoutConstraints_centreY_get)
11040 def __init__(self, *args, **kwargs):
11041 """__init__(self) -> LayoutConstraints"""
11042 newobj = _core_.new_LayoutConstraints(*args, **kwargs)
11043 self.this = newobj.this
11044 self.thisown = 1
11045 del newobj.thisown
11046 def SatisfyConstraints(*args, **kwargs):
11047 """SatisfyConstraints(Window win) -> (areSatisfied, noChanges)"""
11048 return _core_.LayoutConstraints_SatisfyConstraints(*args, **kwargs)
11049
11050 def AreSatisfied(*args, **kwargs):
11051 """AreSatisfied(self) -> bool"""
11052 return _core_.LayoutConstraints_AreSatisfied(*args, **kwargs)
11053
11054
11055class LayoutConstraintsPtr(LayoutConstraints):
11056 def __init__(self, this):
11057 self.this = this
11058 if not hasattr(self,"thisown"): self.thisown = 0
11059 self.__class__ = LayoutConstraints
11060_core_.LayoutConstraints_swigregister(LayoutConstraintsPtr)
11061
11062#----------------------------------------------------------------------------
11063
11064# Use Python's bool constants if available, make some if not
11065try:
11066 True
11067except NameError:
11068 __builtins__.True = 1==1
11069 __builtins__.False = 1==0
11070 def bool(value): return not not value
11071 __builtins__.bool = bool
11072
11073
11074
11075# workarounds for bad wxRTTI names
11076__wxPyPtrTypeMap['wxGauge95'] = 'wxGauge'
11077__wxPyPtrTypeMap['wxSlider95'] = 'wxSlider'
11078__wxPyPtrTypeMap['wxStatusBar95'] = 'wxStatusBar'
11079
11080
11081#----------------------------------------------------------------------------
11082# Load version numbers from __version__... Ensure that major and minor
0f63ec68 11083# versions are the same for both wxPython and wxWidgets.
d55e5bfc
RD
11084
11085from __version__ import *
11086__version__ = VERSION_STRING
11087
0f63ec68
RD
11088assert MAJOR_VERSION == _core_.MAJOR_VERSION, "wxPython/wxWidgets version mismatch"
11089assert MINOR_VERSION == _core_.MINOR_VERSION, "wxPython/wxWidgets version mismatch"
d55e5bfc
RD
11090if RELEASE_VERSION != _core_.RELEASE_VERSION:
11091 import warnings
0f63ec68 11092 warnings.warn("wxPython/wxWidgets release number mismatch")
d55e5bfc
RD
11093
11094#----------------------------------------------------------------------------
11095
62d32a5f
RD
11096# Set the default string<-->unicode conversion encoding from the
11097# locale. This encoding is used when string or unicode objects need
11098# to be converted in order to pass them to wxWidgets. Please be aware
11099# that the default encoding within the same locale may be slightly
11100# different on different platforms. For example, please see
11101# http://www.alanwood.net/demos/charsetdiffs.html for differences
11102# between the common latin/roman encodings.
5cbf236d
RD
11103import locale
11104default = locale.getdefaultlocale()[1]
11105if default:
11106 wx.SetDefaultPyEncoding(default)
11107del default
11108del locale
11109
11110#----------------------------------------------------------------------------
11111
d55e5bfc
RD
11112class PyDeadObjectError(AttributeError):
11113 pass
11114
11115class _wxPyDeadObject(object):
11116 """
11117 Instances of wx objects that are OOR capable will have their __class__
11118 changed to this class when the C++ object is deleted. This should help
11119 prevent crashes due to referencing a bogus C++ pointer.
11120 """
11121 reprStr = "wxPython wrapper for DELETED %s object! (The C++ object no longer exists.)"
11122 attrStr = "The C++ part of the %s object has been deleted, attribute access no longer allowed."
11123
11124 def __repr__(self):
11125 if not hasattr(self, "_name"):
11126 self._name = "[unknown]"
11127 return self.reprStr % self._name
11128
11129 def __getattr__(self, *args):
11130 if not hasattr(self, "_name"):
11131 self._name = "[unknown]"
11132 raise PyDeadObjectError(self.attrStr % self._name)
11133
11134 def __nonzero__(self):
11135 return 0
11136
11137
11138
11139class PyUnbornObjectError(AttributeError):
11140 pass
11141
11142class _wxPyUnbornObject(object):
11143 """
11144 Some stock objects are created when the wx._core module is
11145 imported, but their C++ instance is not created until the wx.App
11146 object is created and initialized. These object instances will
11147 temporarily have their __class__ changed to this class so an
11148 exception will be raised if they are used before the C++ instance
11149 is ready.
11150 """
11151
11152 reprStr = "wxPython wrapper for UNBORN object! (The C++ object is not initialized yet.)"
11153 attrStr = "The C++ part of this object has not been initialized, attribute access not allowed."
11154
11155 def __repr__(self):
11156 #if not hasattr(self, "_name"):
11157 # self._name = "[unknown]"
11158 return self.reprStr #% self._name
11159
11160 def __getattr__(self, *args):
11161 #if not hasattr(self, "_name"):
11162 # self._name = "[unknown]"
11163 raise PyUnbornObjectError(self.attrStr) # % self._name )
11164
11165 def __nonzero__(self):
11166 return 0
11167
11168
11169#----------------------------------------------------------------------------
d55e5bfc
RD
11170
11171def CallAfter(callable, *args, **kw):
11172 """
11173 Call the specified function after the current and pending event
11174 handlers have been completed. This is also good for making GUI
0439c23b
RD
11175 method calls from non-GUI threads. Any extra positional or
11176 keyword args are passed on to the callable when it is called.
11177
11178 :see: `wx.FutureCall`
d55e5bfc
RD
11179 """
11180 app = wx.GetApp()
a001823c 11181 assert app is not None, 'No wx.App created yet'
d55e5bfc 11182
891bb194
RD
11183 if not hasattr(app, "_CallAfterId"):
11184 app._CallAfterId = wx.NewEventType()
11185 app.Connect(-1, -1, app._CallAfterId,
11186 lambda event: event.callable(*event.args, **event.kw) )
d55e5bfc 11187 evt = wx.PyEvent()
891bb194 11188 evt.SetEventType(app._CallAfterId)
d55e5bfc
RD
11189 evt.callable = callable
11190 evt.args = args
11191 evt.kw = kw
11192 wx.PostEvent(app, evt)
11193
d55e5bfc
RD
11194#----------------------------------------------------------------------------
11195
11196
11197class FutureCall:
11198 """
8ac8dba0 11199 A convenience class for `wx.Timer`, that calls the given callable
d55e5bfc
RD
11200 object once after the given amount of milliseconds, passing any
11201 positional or keyword args. The return value of the callable is
0439c23b 11202 availbale after it has been run with the `GetResult` method.
d55e5bfc
RD
11203
11204 If you don't need to get the return value or restart the timer
11205 then there is no need to hold a reference to this object. It will
11206 hold a reference to itself while the timer is running (the timer
11207 has a reference to self.Notify) but the cycle will be broken when
11208 the timer completes, automatically cleaning up the wx.FutureCall
11209 object.
0439c23b
RD
11210
11211 :see: `wx.CallAfter`
d55e5bfc
RD
11212 """
11213 def __init__(self, millis, callable, *args, **kwargs):
11214 self.millis = millis
11215 self.callable = callable
11216 self.SetArgs(*args, **kwargs)
11217 self.runCount = 0
11218 self.running = False
11219 self.hasRun = False
11220 self.result = None
11221 self.timer = None
11222 self.Start()
11223
11224 def __del__(self):
11225 self.Stop()
11226
11227
11228 def Start(self, millis=None, *args, **kwargs):
11229 """
11230 (Re)start the timer
11231 """
11232 self.hasRun = False
11233 if millis is not None:
11234 self.millis = millis
11235 if args or kwargs:
11236 self.SetArgs(*args, **kwargs)
11237 self.Stop()
11238 self.timer = wx.PyTimer(self.Notify)
11239 self.timer.Start(self.millis, wx.TIMER_ONE_SHOT)
11240 self.running = True
11241 Restart = Start
11242
11243
11244 def Stop(self):
11245 """
11246 Stop and destroy the timer.
11247 """
11248 if self.timer is not None:
11249 self.timer.Stop()
11250 self.timer = None
11251
11252
11253 def GetInterval(self):
11254 if self.timer is not None:
11255 return self.timer.GetInterval()
11256 else:
11257 return 0
11258
11259
11260 def IsRunning(self):
11261 return self.timer is not None and self.timer.IsRunning()
11262
11263
11264 def SetArgs(self, *args, **kwargs):
11265 """
11266 (Re)set the args passed to the callable object. This is
11267 useful in conjunction with Restart if you want to schedule a
11268 new call to the same callable object but with different
11269 parameters.
11270 """
11271 self.args = args
11272 self.kwargs = kwargs
11273
11274
11275 def HasRun(self):
11276 return self.hasRun
11277
11278 def GetResult(self):
11279 return self.result
11280
11281 def Notify(self):
11282 """
11283 The timer has expired so call the callable.
11284 """
11285 if self.callable and getattr(self.callable, 'im_self', True):
11286 self.runCount += 1
11287 self.running = False
11288 self.result = self.callable(*self.args, **self.kwargs)
11289 self.hasRun = True
11290 if not self.running:
11291 # if it wasn't restarted, then cleanup
11292 wx.CallAfter(self.Stop)
11293
11294
11295
11296#----------------------------------------------------------------------------
11297# Control which items in this module should be documented by epydoc.
11298# We allow only classes and functions, which will help reduce the size
11299# of the docs by filtering out the zillions of constants, EVT objects,
11300# and etc that don't make much sense by themselves, but are instead
11301# documented (or will be) as part of the classes/functions/methods
11302# where they should be used.
11303
c24da6d6
RD
11304class __DocFilter:
11305 """
11306 A filter for epydoc that only allows non-Ptr classes and
11307 fucntions, in order to reduce the clutter in the API docs.
11308 """
11309 def __init__(self, globals):
11310 self._globals = globals
11311
11312 def __call__(self, name):
11313 import types
11314 obj = self._globals.get(name, None)
11315 if type(obj) not in [type, types.ClassType, types.FunctionType, types.BuiltinFunctionType]:
11316 return False
11317 if name.startswith('_') or name.endswith('Ptr') or name.startswith('EVT'):
11318 return False
11319 return True
d55e5bfc
RD
11320
11321#----------------------------------------------------------------------------
11322#----------------------------------------------------------------------------
11323
11324# Import other modules in this package that should show up in the
11325# "core" wx namespace
11326from _gdi import *
11327from _windows import *
11328from _controls import *
11329from _misc import *
11330
11331
11332# Fixup the stock objects since they can't be used yet. (They will be
11333# restored in wx.PyApp.OnInit.)
11334_core_._wxPyFixStockObjects()
11335
11336#----------------------------------------------------------------------------
11337#----------------------------------------------------------------------------
11338
11339