]> git.saurik.com Git - wxWidgets.git/blame - wxPython/src/mac/_core.py
The key event for the shift key should not start the cell editor
[wxWidgets.git] / wxPython / src / mac / _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
36ed4f51
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
d6c14a4c
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 """
15817c7e 708 wx.Size is a useful data structure used to represent the size of
36ed4f51
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
15817c7e
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
15817c7e 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 """
15817c7e
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
15817c7e 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 """
15817c7e
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
15817c7e 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 """
15817c7e
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
15817c7e
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
5cbf236d 1250 Returns the intersectsion of this rectangle and rect.
d55e5bfc
RD
1251 """
1252 return _core_.Rect_Intersect(*args, **kwargs)
1253
5cbf236d
RD
1254 def Union(*args, **kwargs):
1255 """
1256 Union(self, Rect rect) -> Rect
1257
1258 Returns the union of this rectangle and rect.
1259 """
1260 return _core_.Rect_Union(*args, **kwargs)
1261
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
15817c7e 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
070c48b4
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):
15817c7e
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):
fd2dc343
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):
fd2dc343
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
15817c7e 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):
36ed4f51 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):
36ed4f51 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):
36ed4f51 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):
36ed4f51 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):
36ed4f51 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):
36ed4f51 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):
d6c14a4c 1840 """AddHandler(CPPFileSystemHandler handler)"""
d55e5bfc
RD
1841 return _core_.FileSystem_AddHandler(*args, **kwargs)
1842
1843 AddHandler = staticmethod(AddHandler)
1844 def CleanUpHandlers(*args, **kwargs):
d6c14a4c 1845 """CleanUpHandlers()"""
d55e5bfc
RD
1846 return _core_.FileSystem_CleanUpHandlers(*args, **kwargs)
1847
1848 CleanUpHandlers = staticmethod(CleanUpHandlers)
1849 def FileNameToURL(*args, **kwargs):
d6c14a4c 1850 """FileNameToURL(String filename) -> String"""
d55e5bfc
RD
1851 return _core_.FileSystem_FileNameToURL(*args, **kwargs)
1852
1853 FileNameToURL = staticmethod(FileNameToURL)
b411df4a
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)
b411df4a 1882
d55e5bfc 1883class InternetFSHandler(CPPFileSystemHandler):
36ed4f51 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):
36ed4f51 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)
b411df4a
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):
36ed4f51 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):
d6c14a4c 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):
36ed4f51 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):
36ed4f51 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 """
d6c14a4c 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):
fd2dc343
RD
2087 """
2088 FindFirstUnusedColour(int startR=1, int startG=0, int startB=0) -> (success, r, g, b)
2089
2090 Find first colour that is not used in the image and has higher RGB
2091 values than startR, startG, startB. Returns a tuple consisting of a
2092 success flag and rgb values.
2093 """
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):
36ed4f51 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
68350608
RD
2180 def InitAlpha(*args, **kwargs):
2181 """
2182 InitAlpha(self)
2183
2184 Initializes the image alpha channel data. It is an error to call it if
2185 the image already has alpha data. If it doesn't, alpha data will be by
2186 default initialized to all pixels being fully opaque. But if the image
2187 has a a mask colour, all mask pixels will be completely transparent.
2188 """
2189 return _core_.Image_InitAlpha(*args, **kwargs)
2190
d55e5bfc 2191 def FindFirstUnusedColour(*args, **kwargs):
fd2dc343
RD
2192 """
2193 FindFirstUnusedColour(int startR=1, int startG=0, int startB=0) -> (success, r, g, b)
2194
2195 Find first colour that is not used in the image and has higher RGB
2196 values than startR, startG, startB. Returns a tuple consisting of a
2197 success flag and rgb values.
2198 """
d55e5bfc
RD
2199 return _core_.Image_FindFirstUnusedColour(*args, **kwargs)
2200
4cf4100f
RD
2201 def ConvertAlphaToMask(*args, **kwargs):
2202 """
2203 ConvertAlphaToMask(self, byte threshold=128) -> bool
2204
2205 If the image has alpha channel, this method converts it to mask. All pixels
2206 with alpha value less than ``threshold`` are replaced with mask colour and the
2207 alpha channel is removed. Mask colour is chosen automatically using
2208 `FindFirstUnusedColour`.
2209
2210 If the image image doesn't have alpha channel, ConvertAlphaToMask does
2211 nothing.
2212 """
2213 return _core_.Image_ConvertAlphaToMask(*args, **kwargs)
2214
8fb0e70a
RD
2215 def ConvertColourToAlpha(*args, **kwargs):
2216 """
2217 ConvertColourToAlpha(self, unsigned char r, unsigned char g, unsigned char b) -> bool
2218
2219 This method converts an image where the original alpha information is
2220 only available as a shades of a colour (actually shades of grey)
2221 typically when you draw anti-aliased text into a bitmap. The DC
2222 drawing routines draw grey values on the black background although
2223 they actually mean to draw white with differnt alpha values. This
2224 method reverses it, assuming a black (!) background and white text.
2225 The method will then fill up the whole image with the colour given.
2226 """
2227 return _core_.Image_ConvertColourToAlpha(*args, **kwargs)
2228
d55e5bfc
RD
2229 def SetMaskFromImage(*args, **kwargs):
2230 """SetMaskFromImage(self, Image mask, byte mr, byte mg, byte mb) -> bool"""
2231 return _core_.Image_SetMaskFromImage(*args, **kwargs)
2232
2233 def CanRead(*args, **kwargs):
d6c14a4c 2234 """CanRead(String name) -> bool"""
d55e5bfc
RD
2235 return _core_.Image_CanRead(*args, **kwargs)
2236
2237 CanRead = staticmethod(CanRead)
2238 def GetImageCount(*args, **kwargs):
d6c14a4c 2239 """GetImageCount(String name, long type=BITMAP_TYPE_ANY) -> int"""
d55e5bfc
RD
2240 return _core_.Image_GetImageCount(*args, **kwargs)
2241
2242 GetImageCount = staticmethod(GetImageCount)
2243 def LoadFile(*args, **kwargs):
2244 """LoadFile(self, String name, long type=BITMAP_TYPE_ANY, int index=-1) -> bool"""
2245 return _core_.Image_LoadFile(*args, **kwargs)
2246
2247 def LoadMimeFile(*args, **kwargs):
2248 """LoadMimeFile(self, String name, String mimetype, int index=-1) -> bool"""
2249 return _core_.Image_LoadMimeFile(*args, **kwargs)
2250
2251 def SaveFile(*args, **kwargs):
2252 """SaveFile(self, String name, int type) -> bool"""
2253 return _core_.Image_SaveFile(*args, **kwargs)
2254
2255 def SaveMimeFile(*args, **kwargs):
2256 """SaveMimeFile(self, String name, String mimetype) -> bool"""
2257 return _core_.Image_SaveMimeFile(*args, **kwargs)
2258
2259 def CanReadStream(*args, **kwargs):
d6c14a4c 2260 """CanReadStream(InputStream stream) -> bool"""
d55e5bfc
RD
2261 return _core_.Image_CanReadStream(*args, **kwargs)
2262
2263 CanReadStream = staticmethod(CanReadStream)
2264 def LoadStream(*args, **kwargs):
2265 """LoadStream(self, InputStream stream, long type=BITMAP_TYPE_ANY, int index=-1) -> bool"""
2266 return _core_.Image_LoadStream(*args, **kwargs)
2267
2268 def LoadMimeStream(*args, **kwargs):
2269 """LoadMimeStream(self, InputStream stream, String mimetype, int index=-1) -> bool"""
2270 return _core_.Image_LoadMimeStream(*args, **kwargs)
2271
2272 def Ok(*args, **kwargs):
2273 """Ok(self) -> bool"""
2274 return _core_.Image_Ok(*args, **kwargs)
2275
2276 def GetWidth(*args, **kwargs):
2277 """GetWidth(self) -> int"""
2278 return _core_.Image_GetWidth(*args, **kwargs)
2279
2280 def GetHeight(*args, **kwargs):
2281 """GetHeight(self) -> int"""
2282 return _core_.Image_GetHeight(*args, **kwargs)
2283
2284 def GetSize(*args, **kwargs):
2285 """GetSize(self) -> Size"""
2286 return _core_.Image_GetSize(*args, **kwargs)
2287
2288 def GetSubImage(*args, **kwargs):
2289 """GetSubImage(self, Rect rect) -> Image"""
2290 return _core_.Image_GetSubImage(*args, **kwargs)
2291
2292 def Copy(*args, **kwargs):
2293 """Copy(self) -> Image"""
2294 return _core_.Image_Copy(*args, **kwargs)
2295
2296 def Paste(*args, **kwargs):
2297 """Paste(self, Image image, int x, int y)"""
2298 return _core_.Image_Paste(*args, **kwargs)
2299
2300 def GetData(*args, **kwargs):
2301 """GetData(self) -> PyObject"""
2302 return _core_.Image_GetData(*args, **kwargs)
2303
2304 def SetData(*args, **kwargs):
2305 """SetData(self, PyObject data)"""
2306 return _core_.Image_SetData(*args, **kwargs)
2307
2308 def GetDataBuffer(*args, **kwargs):
2309 """GetDataBuffer(self) -> PyObject"""
2310 return _core_.Image_GetDataBuffer(*args, **kwargs)
2311
2312 def SetDataBuffer(*args, **kwargs):
2313 """SetDataBuffer(self, PyObject data)"""
2314 return _core_.Image_SetDataBuffer(*args, **kwargs)
2315
2316 def GetAlphaData(*args, **kwargs):
2317 """GetAlphaData(self) -> PyObject"""
2318 return _core_.Image_GetAlphaData(*args, **kwargs)
2319
2320 def SetAlphaData(*args, **kwargs):
2321 """SetAlphaData(self, PyObject data)"""
2322 return _core_.Image_SetAlphaData(*args, **kwargs)
2323
2324 def GetAlphaBuffer(*args, **kwargs):
2325 """GetAlphaBuffer(self) -> PyObject"""
2326 return _core_.Image_GetAlphaBuffer(*args, **kwargs)
2327
2328 def SetAlphaBuffer(*args, **kwargs):
2329 """SetAlphaBuffer(self, PyObject data)"""
2330 return _core_.Image_SetAlphaBuffer(*args, **kwargs)
2331
2332 def SetMaskColour(*args, **kwargs):
2333 """SetMaskColour(self, unsigned char r, unsigned char g, unsigned char b)"""
2334 return _core_.Image_SetMaskColour(*args, **kwargs)
2335
2336 def GetMaskRed(*args, **kwargs):
2337 """GetMaskRed(self) -> unsigned char"""
2338 return _core_.Image_GetMaskRed(*args, **kwargs)
2339
2340 def GetMaskGreen(*args, **kwargs):
2341 """GetMaskGreen(self) -> unsigned char"""
2342 return _core_.Image_GetMaskGreen(*args, **kwargs)
2343
2344 def GetMaskBlue(*args, **kwargs):
2345 """GetMaskBlue(self) -> unsigned char"""
2346 return _core_.Image_GetMaskBlue(*args, **kwargs)
2347
2348 def SetMask(*args, **kwargs):
2349 """SetMask(self, bool mask=True)"""
2350 return _core_.Image_SetMask(*args, **kwargs)
2351
2352 def HasMask(*args, **kwargs):
2353 """HasMask(self) -> bool"""
2354 return _core_.Image_HasMask(*args, **kwargs)
2355
2356 def Rotate(*args, **kwargs):
2357 """
2358 Rotate(self, double angle, Point centre_of_rotation, bool interpolating=True,
2359 Point offset_after_rotation=None) -> Image
2360 """
2361 return _core_.Image_Rotate(*args, **kwargs)
2362
2363 def Rotate90(*args, **kwargs):
2364 """Rotate90(self, bool clockwise=True) -> Image"""
2365 return _core_.Image_Rotate90(*args, **kwargs)
2366
2367 def Mirror(*args, **kwargs):
2368 """Mirror(self, bool horizontally=True) -> Image"""
2369 return _core_.Image_Mirror(*args, **kwargs)
2370
2371 def Replace(*args, **kwargs):
2372 """
2373 Replace(self, unsigned char r1, unsigned char g1, unsigned char b1,
2374 unsigned char r2, unsigned char g2, unsigned char b2)
2375 """
2376 return _core_.Image_Replace(*args, **kwargs)
2377
2378 def ConvertToMono(*args, **kwargs):
2379 """ConvertToMono(self, unsigned char r, unsigned char g, unsigned char b) -> Image"""
2380 return _core_.Image_ConvertToMono(*args, **kwargs)
2381
2382 def SetOption(*args, **kwargs):
2383 """SetOption(self, String name, String value)"""
2384 return _core_.Image_SetOption(*args, **kwargs)
2385
2386 def SetOptionInt(*args, **kwargs):
2387 """SetOptionInt(self, String name, int value)"""
2388 return _core_.Image_SetOptionInt(*args, **kwargs)
2389
2390 def GetOption(*args, **kwargs):
2391 """GetOption(self, String name) -> String"""
2392 return _core_.Image_GetOption(*args, **kwargs)
2393
2394 def GetOptionInt(*args, **kwargs):
2395 """GetOptionInt(self, String name) -> int"""
2396 return _core_.Image_GetOptionInt(*args, **kwargs)
2397
2398 def HasOption(*args, **kwargs):
2399 """HasOption(self, String name) -> bool"""
2400 return _core_.Image_HasOption(*args, **kwargs)
2401
2402 def CountColours(*args, **kwargs):
2403 """CountColours(self, unsigned long stopafter=(unsigned long) -1) -> unsigned long"""
2404 return _core_.Image_CountColours(*args, **kwargs)
2405
2406 def ComputeHistogram(*args, **kwargs):
2407 """ComputeHistogram(self, ImageHistogram h) -> unsigned long"""
2408 return _core_.Image_ComputeHistogram(*args, **kwargs)
2409
2410 def AddHandler(*args, **kwargs):
d6c14a4c 2411 """AddHandler(ImageHandler handler)"""
d55e5bfc
RD
2412 return _core_.Image_AddHandler(*args, **kwargs)
2413
2414 AddHandler = staticmethod(AddHandler)
2415 def InsertHandler(*args, **kwargs):
d6c14a4c 2416 """InsertHandler(ImageHandler handler)"""
d55e5bfc
RD
2417 return _core_.Image_InsertHandler(*args, **kwargs)
2418
2419 InsertHandler = staticmethod(InsertHandler)
2420 def RemoveHandler(*args, **kwargs):
d6c14a4c 2421 """RemoveHandler(String name) -> bool"""
d55e5bfc
RD
2422 return _core_.Image_RemoveHandler(*args, **kwargs)
2423
2424 RemoveHandler = staticmethod(RemoveHandler)
2425 def GetImageExtWildcard(*args, **kwargs):
d6c14a4c 2426 """GetImageExtWildcard() -> String"""
d55e5bfc
RD
2427 return _core_.Image_GetImageExtWildcard(*args, **kwargs)
2428
2429 GetImageExtWildcard = staticmethod(GetImageExtWildcard)
2430 def ConvertToBitmap(*args, **kwargs):
44bf767a 2431 """ConvertToBitmap(self, int depth=-1) -> Bitmap"""
d55e5bfc
RD
2432 return _core_.Image_ConvertToBitmap(*args, **kwargs)
2433
2434 def ConvertToMonoBitmap(*args, **kwargs):
2435 """ConvertToMonoBitmap(self, unsigned char red, unsigned char green, unsigned char blue) -> Bitmap"""
2436 return _core_.Image_ConvertToMonoBitmap(*args, **kwargs)
2437
2438 def __nonzero__(self): return self.Ok()
2439
2440class ImagePtr(Image):
2441 def __init__(self, this):
2442 self.this = this
2443 if not hasattr(self,"thisown"): self.thisown = 0
2444 self.__class__ = Image
2445_core_.Image_swigregister(ImagePtr)
2446
2447def ImageFromMime(*args, **kwargs):
2448 """ImageFromMime(String name, String mimetype, int index=-1) -> Image"""
2449 val = _core_.new_ImageFromMime(*args, **kwargs)
2450 val.thisown = 1
2451 return val
2452
2453def ImageFromStream(*args, **kwargs):
2454 """ImageFromStream(InputStream stream, long type=BITMAP_TYPE_ANY, int index=-1) -> Image"""
2455 val = _core_.new_ImageFromStream(*args, **kwargs)
2456 val.thisown = 1
2457 return val
2458
2459def ImageFromStreamMime(*args, **kwargs):
2460 """ImageFromStreamMime(InputStream stream, String mimetype, int index=-1) -> Image"""
2461 val = _core_.new_ImageFromStreamMime(*args, **kwargs)
2462 val.thisown = 1
2463 return val
2464
d6c14a4c
RD
2465def EmptyImage(*args, **kwargs):
2466 """EmptyImage(int width=0, int height=0, bool clear=True) -> Image"""
2467 val = _core_.new_EmptyImage(*args, **kwargs)
d55e5bfc
RD
2468 val.thisown = 1
2469 return val
2470
2471def ImageFromBitmap(*args, **kwargs):
2472 """ImageFromBitmap(Bitmap bitmap) -> Image"""
2473 val = _core_.new_ImageFromBitmap(*args, **kwargs)
2474 val.thisown = 1
2475 return val
2476
2477def ImageFromData(*args, **kwargs):
2478 """ImageFromData(int width, int height, unsigned char data) -> Image"""
2479 val = _core_.new_ImageFromData(*args, **kwargs)
2480 val.thisown = 1
2481 return val
2482
03e46024
RD
2483def ImageFromDataWithAlpha(*args, **kwargs):
2484 """ImageFromDataWithAlpha(int width, int height, unsigned char data, unsigned char alpha) -> Image"""
2485 val = _core_.new_ImageFromDataWithAlpha(*args, **kwargs)
2486 val.thisown = 1
2487 return val
2488
d55e5bfc
RD
2489def Image_CanRead(*args, **kwargs):
2490 """Image_CanRead(String name) -> bool"""
2491 return _core_.Image_CanRead(*args, **kwargs)
2492
2493def Image_GetImageCount(*args, **kwargs):
2494 """Image_GetImageCount(String name, long type=BITMAP_TYPE_ANY) -> int"""
2495 return _core_.Image_GetImageCount(*args, **kwargs)
2496
2497def Image_CanReadStream(*args, **kwargs):
2498 """Image_CanReadStream(InputStream stream) -> bool"""
2499 return _core_.Image_CanReadStream(*args, **kwargs)
2500
2501def Image_AddHandler(*args, **kwargs):
2502 """Image_AddHandler(ImageHandler handler)"""
2503 return _core_.Image_AddHandler(*args, **kwargs)
2504
2505def Image_InsertHandler(*args, **kwargs):
2506 """Image_InsertHandler(ImageHandler handler)"""
2507 return _core_.Image_InsertHandler(*args, **kwargs)
2508
2509def Image_RemoveHandler(*args, **kwargs):
2510 """Image_RemoveHandler(String name) -> bool"""
2511 return _core_.Image_RemoveHandler(*args, **kwargs)
2512
2513def Image_GetImageExtWildcard(*args, **kwargs):
2514 """Image_GetImageExtWildcard() -> String"""
2515 return _core_.Image_GetImageExtWildcard(*args, **kwargs)
2516
68e533f8
RD
2517def InitAllImageHandlers():
2518 """
2519 The former functionality of InitAllImageHanders is now done internal to
2520 the _core_ extension module and so this function has become a simple NOP.
2521 """
2522 pass
d55e5bfc 2523
d55e5bfc
RD
2524IMAGE_RESOLUTION_INCHES = _core_.IMAGE_RESOLUTION_INCHES
2525IMAGE_RESOLUTION_CM = _core_.IMAGE_RESOLUTION_CM
2526BMP_24BPP = _core_.BMP_24BPP
2527BMP_8BPP = _core_.BMP_8BPP
2528BMP_8BPP_GREY = _core_.BMP_8BPP_GREY
2529BMP_8BPP_GRAY = _core_.BMP_8BPP_GRAY
2530BMP_8BPP_RED = _core_.BMP_8BPP_RED
2531BMP_8BPP_PALETTE = _core_.BMP_8BPP_PALETTE
2532BMP_4BPP = _core_.BMP_4BPP
2533BMP_1BPP = _core_.BMP_1BPP
2534BMP_1BPP_BW = _core_.BMP_1BPP_BW
2535class BMPHandler(ImageHandler):
36ed4f51 2536 """Proxy of C++ BMPHandler class"""
d55e5bfc
RD
2537 def __repr__(self):
2538 return "<%s.%s; proxy of C++ wxBMPHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
2539 def __init__(self, *args, **kwargs):
2540 """__init__(self) -> BMPHandler"""
2541 newobj = _core_.new_BMPHandler(*args, **kwargs)
2542 self.this = newobj.this
2543 self.thisown = 1
2544 del newobj.thisown
2545
2546class BMPHandlerPtr(BMPHandler):
2547 def __init__(self, this):
2548 self.this = this
2549 if not hasattr(self,"thisown"): self.thisown = 0
2550 self.__class__ = BMPHandler
2551_core_.BMPHandler_swigregister(BMPHandlerPtr)
2552NullImage = cvar.NullImage
68350608 2553IMAGE_OPTION_FILENAME = cvar.IMAGE_OPTION_FILENAME
d55e5bfc
RD
2554IMAGE_OPTION_BMP_FORMAT = cvar.IMAGE_OPTION_BMP_FORMAT
2555IMAGE_OPTION_CUR_HOTSPOT_X = cvar.IMAGE_OPTION_CUR_HOTSPOT_X
2556IMAGE_OPTION_CUR_HOTSPOT_Y = cvar.IMAGE_OPTION_CUR_HOTSPOT_Y
2557IMAGE_OPTION_RESOLUTION = cvar.IMAGE_OPTION_RESOLUTION
68350608
RD
2558IMAGE_OPTION_RESOLUTIONX = cvar.IMAGE_OPTION_RESOLUTIONX
2559IMAGE_OPTION_RESOLUTIONY = cvar.IMAGE_OPTION_RESOLUTIONY
d55e5bfc 2560IMAGE_OPTION_RESOLUTIONUNIT = cvar.IMAGE_OPTION_RESOLUTIONUNIT
68350608
RD
2561IMAGE_OPTION_BITSPERSAMPLE = cvar.IMAGE_OPTION_BITSPERSAMPLE
2562IMAGE_OPTION_SAMPLESPERPIXEL = cvar.IMAGE_OPTION_SAMPLESPERPIXEL
2563IMAGE_OPTION_COMPRESSION = cvar.IMAGE_OPTION_COMPRESSION
2564IMAGE_OPTION_IMAGEDESCRIPTOR = cvar.IMAGE_OPTION_IMAGEDESCRIPTOR
d55e5bfc
RD
2565
2566class ICOHandler(BMPHandler):
36ed4f51 2567 """Proxy of C++ ICOHandler class"""
d55e5bfc
RD
2568 def __repr__(self):
2569 return "<%s.%s; proxy of C++ wxICOHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
2570 def __init__(self, *args, **kwargs):
2571 """__init__(self) -> ICOHandler"""
2572 newobj = _core_.new_ICOHandler(*args, **kwargs)
2573 self.this = newobj.this
2574 self.thisown = 1
2575 del newobj.thisown
2576
2577class ICOHandlerPtr(ICOHandler):
2578 def __init__(self, this):
2579 self.this = this
2580 if not hasattr(self,"thisown"): self.thisown = 0
2581 self.__class__ = ICOHandler
2582_core_.ICOHandler_swigregister(ICOHandlerPtr)
2583
2584class CURHandler(ICOHandler):
36ed4f51 2585 """Proxy of C++ CURHandler class"""
d55e5bfc
RD
2586 def __repr__(self):
2587 return "<%s.%s; proxy of C++ wxCURHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
2588 def __init__(self, *args, **kwargs):
2589 """__init__(self) -> CURHandler"""
2590 newobj = _core_.new_CURHandler(*args, **kwargs)
2591 self.this = newobj.this
2592 self.thisown = 1
2593 del newobj.thisown
2594
2595class CURHandlerPtr(CURHandler):
2596 def __init__(self, this):
2597 self.this = this
2598 if not hasattr(self,"thisown"): self.thisown = 0
2599 self.__class__ = CURHandler
2600_core_.CURHandler_swigregister(CURHandlerPtr)
2601
2602class ANIHandler(CURHandler):
36ed4f51 2603 """Proxy of C++ ANIHandler class"""
d55e5bfc
RD
2604 def __repr__(self):
2605 return "<%s.%s; proxy of C++ wxANIHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
2606 def __init__(self, *args, **kwargs):
2607 """__init__(self) -> ANIHandler"""
2608 newobj = _core_.new_ANIHandler(*args, **kwargs)
2609 self.this = newobj.this
2610 self.thisown = 1
2611 del newobj.thisown
2612
2613class ANIHandlerPtr(ANIHandler):
2614 def __init__(self, this):
2615 self.this = this
2616 if not hasattr(self,"thisown"): self.thisown = 0
2617 self.__class__ = ANIHandler
2618_core_.ANIHandler_swigregister(ANIHandlerPtr)
2619
2620class PNGHandler(ImageHandler):
36ed4f51 2621 """Proxy of C++ PNGHandler class"""
d55e5bfc
RD
2622 def __repr__(self):
2623 return "<%s.%s; proxy of C++ wxPNGHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
2624 def __init__(self, *args, **kwargs):
2625 """__init__(self) -> PNGHandler"""
2626 newobj = _core_.new_PNGHandler(*args, **kwargs)
2627 self.this = newobj.this
2628 self.thisown = 1
2629 del newobj.thisown
2630
2631class PNGHandlerPtr(PNGHandler):
2632 def __init__(self, this):
2633 self.this = this
2634 if not hasattr(self,"thisown"): self.thisown = 0
2635 self.__class__ = PNGHandler
2636_core_.PNGHandler_swigregister(PNGHandlerPtr)
2637
2638class GIFHandler(ImageHandler):
36ed4f51 2639 """Proxy of C++ GIFHandler class"""
d55e5bfc
RD
2640 def __repr__(self):
2641 return "<%s.%s; proxy of C++ wxGIFHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
2642 def __init__(self, *args, **kwargs):
2643 """__init__(self) -> GIFHandler"""
2644 newobj = _core_.new_GIFHandler(*args, **kwargs)
2645 self.this = newobj.this
2646 self.thisown = 1
2647 del newobj.thisown
2648
2649class GIFHandlerPtr(GIFHandler):
2650 def __init__(self, this):
2651 self.this = this
2652 if not hasattr(self,"thisown"): self.thisown = 0
2653 self.__class__ = GIFHandler
2654_core_.GIFHandler_swigregister(GIFHandlerPtr)
2655
2656class PCXHandler(ImageHandler):
36ed4f51 2657 """Proxy of C++ PCXHandler class"""
d55e5bfc
RD
2658 def __repr__(self):
2659 return "<%s.%s; proxy of C++ wxPCXHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
2660 def __init__(self, *args, **kwargs):
2661 """__init__(self) -> PCXHandler"""
2662 newobj = _core_.new_PCXHandler(*args, **kwargs)
2663 self.this = newobj.this
2664 self.thisown = 1
2665 del newobj.thisown
2666
2667class PCXHandlerPtr(PCXHandler):
2668 def __init__(self, this):
2669 self.this = this
2670 if not hasattr(self,"thisown"): self.thisown = 0
2671 self.__class__ = PCXHandler
2672_core_.PCXHandler_swigregister(PCXHandlerPtr)
2673
2674class JPEGHandler(ImageHandler):
36ed4f51 2675 """Proxy of C++ JPEGHandler class"""
d55e5bfc
RD
2676 def __repr__(self):
2677 return "<%s.%s; proxy of C++ wxJPEGHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
2678 def __init__(self, *args, **kwargs):
2679 """__init__(self) -> JPEGHandler"""
2680 newobj = _core_.new_JPEGHandler(*args, **kwargs)
2681 self.this = newobj.this
2682 self.thisown = 1
2683 del newobj.thisown
2684
2685class JPEGHandlerPtr(JPEGHandler):
2686 def __init__(self, this):
2687 self.this = this
2688 if not hasattr(self,"thisown"): self.thisown = 0
2689 self.__class__ = JPEGHandler
2690_core_.JPEGHandler_swigregister(JPEGHandlerPtr)
2691
2692class PNMHandler(ImageHandler):
36ed4f51 2693 """Proxy of C++ PNMHandler class"""
d55e5bfc
RD
2694 def __repr__(self):
2695 return "<%s.%s; proxy of C++ wxPNMHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
2696 def __init__(self, *args, **kwargs):
2697 """__init__(self) -> PNMHandler"""
2698 newobj = _core_.new_PNMHandler(*args, **kwargs)
2699 self.this = newobj.this
2700 self.thisown = 1
2701 del newobj.thisown
2702
2703class PNMHandlerPtr(PNMHandler):
2704 def __init__(self, this):
2705 self.this = this
2706 if not hasattr(self,"thisown"): self.thisown = 0
2707 self.__class__ = PNMHandler
2708_core_.PNMHandler_swigregister(PNMHandlerPtr)
2709
2710class XPMHandler(ImageHandler):
36ed4f51 2711 """Proxy of C++ XPMHandler class"""
d55e5bfc
RD
2712 def __repr__(self):
2713 return "<%s.%s; proxy of C++ wxXPMHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
2714 def __init__(self, *args, **kwargs):
2715 """__init__(self) -> XPMHandler"""
2716 newobj = _core_.new_XPMHandler(*args, **kwargs)
2717 self.this = newobj.this
2718 self.thisown = 1
2719 del newobj.thisown
2720
2721class XPMHandlerPtr(XPMHandler):
2722 def __init__(self, this):
2723 self.this = this
2724 if not hasattr(self,"thisown"): self.thisown = 0
2725 self.__class__ = XPMHandler
2726_core_.XPMHandler_swigregister(XPMHandlerPtr)
2727
2728class TIFFHandler(ImageHandler):
36ed4f51 2729 """Proxy of C++ TIFFHandler class"""
d55e5bfc
RD
2730 def __repr__(self):
2731 return "<%s.%s; proxy of C++ wxTIFFHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
2732 def __init__(self, *args, **kwargs):
2733 """__init__(self) -> TIFFHandler"""
2734 newobj = _core_.new_TIFFHandler(*args, **kwargs)
2735 self.this = newobj.this
2736 self.thisown = 1
2737 del newobj.thisown
2738
2739class TIFFHandlerPtr(TIFFHandler):
2740 def __init__(self, this):
2741 self.this = this
2742 if not hasattr(self,"thisown"): self.thisown = 0
2743 self.__class__ = TIFFHandler
2744_core_.TIFFHandler_swigregister(TIFFHandlerPtr)
2745
c0de73ae
RD
2746QUANTIZE_INCLUDE_WINDOWS_COLOURS = _core_.QUANTIZE_INCLUDE_WINDOWS_COLOURS
2747QUANTIZE_FILL_DESTINATION_IMAGE = _core_.QUANTIZE_FILL_DESTINATION_IMAGE
2748class Quantize(object):
2749 """Performs quantization, or colour reduction, on a wxImage."""
2750 def __init__(self): raise RuntimeError, "No constructor defined"
2751 def __repr__(self):
2752 return "<%s.%s; proxy of C++ wxQuantize instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
2753 def Quantize(*args, **kwargs):
2754 """
2755 Quantize(Image src, Image dest, int desiredNoColours=236, int flags=wxQUANTIZE_INCLUDE_WINDOWS_COLOURS|wxQUANTIZE_FILL_DESTINATION_IMAGE) -> bool
2756
2757 Reduce the colours in the source image and put the result into the
2758 destination image, setting the palette in the destination if
2759 needed. Both images may be the same, to overwrite the source image.
2760 """
2761 return _core_.Quantize_Quantize(*args, **kwargs)
2762
2763 Quantize = staticmethod(Quantize)
2764
2765class QuantizePtr(Quantize):
2766 def __init__(self, this):
2767 self.this = this
2768 if not hasattr(self,"thisown"): self.thisown = 0
2769 self.__class__ = Quantize
2770_core_.Quantize_swigregister(QuantizePtr)
2771
2772def Quantize_Quantize(*args, **kwargs):
2773 """
2774 Quantize_Quantize(Image src, Image dest, int desiredNoColours=236, int flags=wxQUANTIZE_INCLUDE_WINDOWS_COLOURS|wxQUANTIZE_FILL_DESTINATION_IMAGE) -> bool
2775
2776 Reduce the colours in the source image and put the result into the
2777 destination image, setting the palette in the destination if
2778 needed. Both images may be the same, to overwrite the source image.
2779 """
2780 return _core_.Quantize_Quantize(*args, **kwargs)
2781
d55e5bfc
RD
2782#---------------------------------------------------------------------------
2783
2784class EvtHandler(Object):
36ed4f51 2785 """Proxy of C++ EvtHandler class"""
d55e5bfc
RD
2786 def __repr__(self):
2787 return "<%s.%s; proxy of C++ wxEvtHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
2788 def __init__(self, *args, **kwargs):
2789 """__init__(self) -> EvtHandler"""
2790 newobj = _core_.new_EvtHandler(*args, **kwargs)
2791 self.this = newobj.this
2792 self.thisown = 1
2793 del newobj.thisown
2794 def GetNextHandler(*args, **kwargs):
2795 """GetNextHandler(self) -> EvtHandler"""
2796 return _core_.EvtHandler_GetNextHandler(*args, **kwargs)
2797
2798 def GetPreviousHandler(*args, **kwargs):
2799 """GetPreviousHandler(self) -> EvtHandler"""
2800 return _core_.EvtHandler_GetPreviousHandler(*args, **kwargs)
2801
2802 def SetNextHandler(*args, **kwargs):
2803 """SetNextHandler(self, EvtHandler handler)"""
2804 return _core_.EvtHandler_SetNextHandler(*args, **kwargs)
2805
2806 def SetPreviousHandler(*args, **kwargs):
2807 """SetPreviousHandler(self, EvtHandler handler)"""
2808 return _core_.EvtHandler_SetPreviousHandler(*args, **kwargs)
2809
2810 def GetEvtHandlerEnabled(*args, **kwargs):
2811 """GetEvtHandlerEnabled(self) -> bool"""
2812 return _core_.EvtHandler_GetEvtHandlerEnabled(*args, **kwargs)
2813
2814 def SetEvtHandlerEnabled(*args, **kwargs):
2815 """SetEvtHandlerEnabled(self, bool enabled)"""
2816 return _core_.EvtHandler_SetEvtHandlerEnabled(*args, **kwargs)
2817
2818 def ProcessEvent(*args, **kwargs):
2819 """ProcessEvent(self, Event event) -> bool"""
2820 return _core_.EvtHandler_ProcessEvent(*args, **kwargs)
2821
2822 def AddPendingEvent(*args, **kwargs):
2823 """AddPendingEvent(self, Event event)"""
2824 return _core_.EvtHandler_AddPendingEvent(*args, **kwargs)
2825
2826 def ProcessPendingEvents(*args, **kwargs):
2827 """ProcessPendingEvents(self)"""
2828 return _core_.EvtHandler_ProcessPendingEvents(*args, **kwargs)
2829
2830 def Connect(*args, **kwargs):
2831 """Connect(self, int id, int lastId, int eventType, PyObject func)"""
2832 return _core_.EvtHandler_Connect(*args, **kwargs)
2833
2834 def Disconnect(*args, **kwargs):
2835 """Disconnect(self, int id, int lastId=-1, wxEventType eventType=wxEVT_NULL) -> bool"""
2836 return _core_.EvtHandler_Disconnect(*args, **kwargs)
2837
2838 def _setOORInfo(*args, **kwargs):
36ed4f51 2839 """_setOORInfo(self, PyObject _self, bool incref=True)"""
d55e5bfc
RD
2840 return _core_.EvtHandler__setOORInfo(*args, **kwargs)
2841
2842 def Bind(self, event, handler, source=None, id=wx.ID_ANY, id2=wx.ID_ANY):
2843 """
2844 Bind an event to an event handler.
2845
a5ee0656
RD
2846 :param event: One of the EVT_* objects that specifies the
2847 type of event to bind,
d55e5bfc 2848
a5ee0656
RD
2849 :param handler: A callable object to be invoked when the
2850 event is delivered to self. Pass None to
2851 disconnect an event handler.
d55e5bfc 2852
a5ee0656
RD
2853 :param source: Sometimes the event originates from a
2854 different window than self, but you still
2855 want to catch it in self. (For example, a
2856 button event delivered to a frame.) By
2857 passing the source of the event, the event
2858 handling system is able to differentiate
2859 between the same event type from different
2860 controls.
d55e5bfc 2861
a5ee0656
RD
2862 :param id: Used to spcify the event source by ID instead
2863 of instance.
2864
2865 :param id2: Used when it is desirable to bind a handler
2866 to a range of IDs, such as with EVT_MENU_RANGE.
d55e5bfc
RD
2867 """
2868 if source is not None:
2869 id = source.GetId()
2870 event.Bind(self, id, id2, handler)
2871
d6c14a4c
RD
2872 def Unbind(self, event, source=None, id=wx.ID_ANY, id2=wx.ID_ANY):
2873 """
2874 Disconencts the event handler binding for event from self.
2875 Returns True if successful.
2876 """
2877 if source is not None:
2878 id = source.GetId()
2879 return event.Unbind(self, id, id2)
d55e5bfc
RD
2880
2881
2882class EvtHandlerPtr(EvtHandler):
2883 def __init__(self, this):
2884 self.this = this
2885 if not hasattr(self,"thisown"): self.thisown = 0
2886 self.__class__ = EvtHandler
2887_core_.EvtHandler_swigregister(EvtHandlerPtr)
2888
2889#---------------------------------------------------------------------------
2890
2891class PyEventBinder(object):
2892 """
2893 Instances of this class are used to bind specific events to event
2894 handlers.
2895 """
2896 def __init__(self, evtType, expectedIDs=0):
2897 if expectedIDs not in [0, 1, 2]:
2898 raise ValueError, "Invalid number of expectedIDs"
2899 self.expectedIDs = expectedIDs
2900
2901 if type(evtType) == list or type(evtType) == tuple:
2902 self.evtType = evtType
2903 else:
2904 self.evtType = [evtType]
2905
2906
2907 def Bind(self, target, id1, id2, function):
2908 """Bind this set of event types to target."""
2909 for et in self.evtType:
2910 target.Connect(id1, id2, et, function)
2911
d6c14a4c
RD
2912
2913 def Unbind(self, target, id1, id2):
2914 """Remove an event binding."""
2915 success = 0
2916 for et in self.evtType:
2917 success += target.Disconnect(id1, id2, et)
2918 return success != 0
2919
d55e5bfc
RD
2920
2921 def __call__(self, *args):
2922 """
2923 For backwards compatibility with the old EVT_* functions.
2924 Should be called with either (window, func), (window, ID,
2925 func) or (window, ID1, ID2, func) parameters depending on the
2926 type of the event.
2927 """
2928 assert len(args) == 2 + self.expectedIDs
2929 id1 = wx.ID_ANY
2930 id2 = wx.ID_ANY
2931 target = args[0]
2932 if self.expectedIDs == 0:
2933 func = args[1]
2934 elif self.expectedIDs == 1:
2935 id1 = args[1]
2936 func = args[2]
2937 elif self.expectedIDs == 2:
2938 id1 = args[1]
2939 id2 = args[2]
2940 func = args[3]
2941 else:
2942 raise ValueError, "Unexpected number of IDs"
2943
2944 self.Bind(target, id1, id2, func)
2945
2946
2947# These two are square pegs that don't fit the PyEventBinder hole...
2948def EVT_COMMAND(win, id, cmd, func):
2949 win.Connect(id, -1, cmd, func)
2950def EVT_COMMAND_RANGE(win, id1, id2, cmd, func):
2951 win.Connect(id1, id2, cmd, func)
2952
2953
2954#---------------------------------------------------------------------------
2955
2956#---------------------------------------------------------------------------
2957
2958EVENT_PROPAGATE_NONE = _core_.EVENT_PROPAGATE_NONE
2959EVENT_PROPAGATE_MAX = _core_.EVENT_PROPAGATE_MAX
2960
2961def NewEventType(*args, **kwargs):
2962 """NewEventType() -> wxEventType"""
2963 return _core_.NewEventType(*args, **kwargs)
2964wxEVT_NULL = _core_.wxEVT_NULL
2965wxEVT_FIRST = _core_.wxEVT_FIRST
2966wxEVT_USER_FIRST = _core_.wxEVT_USER_FIRST
2967wxEVT_COMMAND_BUTTON_CLICKED = _core_.wxEVT_COMMAND_BUTTON_CLICKED
2968wxEVT_COMMAND_CHECKBOX_CLICKED = _core_.wxEVT_COMMAND_CHECKBOX_CLICKED
2969wxEVT_COMMAND_CHOICE_SELECTED = _core_.wxEVT_COMMAND_CHOICE_SELECTED
2970wxEVT_COMMAND_LISTBOX_SELECTED = _core_.wxEVT_COMMAND_LISTBOX_SELECTED
2971wxEVT_COMMAND_LISTBOX_DOUBLECLICKED = _core_.wxEVT_COMMAND_LISTBOX_DOUBLECLICKED
2972wxEVT_COMMAND_CHECKLISTBOX_TOGGLED = _core_.wxEVT_COMMAND_CHECKLISTBOX_TOGGLED
2973wxEVT_COMMAND_MENU_SELECTED = _core_.wxEVT_COMMAND_MENU_SELECTED
2974wxEVT_COMMAND_TOOL_CLICKED = _core_.wxEVT_COMMAND_TOOL_CLICKED
2975wxEVT_COMMAND_SLIDER_UPDATED = _core_.wxEVT_COMMAND_SLIDER_UPDATED
2976wxEVT_COMMAND_RADIOBOX_SELECTED = _core_.wxEVT_COMMAND_RADIOBOX_SELECTED
2977wxEVT_COMMAND_RADIOBUTTON_SELECTED = _core_.wxEVT_COMMAND_RADIOBUTTON_SELECTED
2978wxEVT_COMMAND_SCROLLBAR_UPDATED = _core_.wxEVT_COMMAND_SCROLLBAR_UPDATED
2979wxEVT_COMMAND_VLBOX_SELECTED = _core_.wxEVT_COMMAND_VLBOX_SELECTED
2980wxEVT_COMMAND_COMBOBOX_SELECTED = _core_.wxEVT_COMMAND_COMBOBOX_SELECTED
2981wxEVT_COMMAND_TOOL_RCLICKED = _core_.wxEVT_COMMAND_TOOL_RCLICKED
2982wxEVT_COMMAND_TOOL_ENTER = _core_.wxEVT_COMMAND_TOOL_ENTER
2983wxEVT_LEFT_DOWN = _core_.wxEVT_LEFT_DOWN
2984wxEVT_LEFT_UP = _core_.wxEVT_LEFT_UP
2985wxEVT_MIDDLE_DOWN = _core_.wxEVT_MIDDLE_DOWN
2986wxEVT_MIDDLE_UP = _core_.wxEVT_MIDDLE_UP
2987wxEVT_RIGHT_DOWN = _core_.wxEVT_RIGHT_DOWN
2988wxEVT_RIGHT_UP = _core_.wxEVT_RIGHT_UP
2989wxEVT_MOTION = _core_.wxEVT_MOTION
2990wxEVT_ENTER_WINDOW = _core_.wxEVT_ENTER_WINDOW
2991wxEVT_LEAVE_WINDOW = _core_.wxEVT_LEAVE_WINDOW
2992wxEVT_LEFT_DCLICK = _core_.wxEVT_LEFT_DCLICK
2993wxEVT_MIDDLE_DCLICK = _core_.wxEVT_MIDDLE_DCLICK
2994wxEVT_RIGHT_DCLICK = _core_.wxEVT_RIGHT_DCLICK
2995wxEVT_SET_FOCUS = _core_.wxEVT_SET_FOCUS
2996wxEVT_KILL_FOCUS = _core_.wxEVT_KILL_FOCUS
2997wxEVT_CHILD_FOCUS = _core_.wxEVT_CHILD_FOCUS
2998wxEVT_MOUSEWHEEL = _core_.wxEVT_MOUSEWHEEL
2999wxEVT_NC_LEFT_DOWN = _core_.wxEVT_NC_LEFT_DOWN
3000wxEVT_NC_LEFT_UP = _core_.wxEVT_NC_LEFT_UP
3001wxEVT_NC_MIDDLE_DOWN = _core_.wxEVT_NC_MIDDLE_DOWN
3002wxEVT_NC_MIDDLE_UP = _core_.wxEVT_NC_MIDDLE_UP
3003wxEVT_NC_RIGHT_DOWN = _core_.wxEVT_NC_RIGHT_DOWN
3004wxEVT_NC_RIGHT_UP = _core_.wxEVT_NC_RIGHT_UP
3005wxEVT_NC_MOTION = _core_.wxEVT_NC_MOTION
3006wxEVT_NC_ENTER_WINDOW = _core_.wxEVT_NC_ENTER_WINDOW
3007wxEVT_NC_LEAVE_WINDOW = _core_.wxEVT_NC_LEAVE_WINDOW
3008wxEVT_NC_LEFT_DCLICK = _core_.wxEVT_NC_LEFT_DCLICK
3009wxEVT_NC_MIDDLE_DCLICK = _core_.wxEVT_NC_MIDDLE_DCLICK
3010wxEVT_NC_RIGHT_DCLICK = _core_.wxEVT_NC_RIGHT_DCLICK
3011wxEVT_CHAR = _core_.wxEVT_CHAR
3012wxEVT_CHAR_HOOK = _core_.wxEVT_CHAR_HOOK
3013wxEVT_NAVIGATION_KEY = _core_.wxEVT_NAVIGATION_KEY
3014wxEVT_KEY_DOWN = _core_.wxEVT_KEY_DOWN
3015wxEVT_KEY_UP = _core_.wxEVT_KEY_UP
3016wxEVT_HOTKEY = _core_.wxEVT_HOTKEY
3017wxEVT_SET_CURSOR = _core_.wxEVT_SET_CURSOR
3018wxEVT_SCROLL_TOP = _core_.wxEVT_SCROLL_TOP
3019wxEVT_SCROLL_BOTTOM = _core_.wxEVT_SCROLL_BOTTOM
3020wxEVT_SCROLL_LINEUP = _core_.wxEVT_SCROLL_LINEUP
3021wxEVT_SCROLL_LINEDOWN = _core_.wxEVT_SCROLL_LINEDOWN
3022wxEVT_SCROLL_PAGEUP = _core_.wxEVT_SCROLL_PAGEUP
3023wxEVT_SCROLL_PAGEDOWN = _core_.wxEVT_SCROLL_PAGEDOWN
3024wxEVT_SCROLL_THUMBTRACK = _core_.wxEVT_SCROLL_THUMBTRACK
3025wxEVT_SCROLL_THUMBRELEASE = _core_.wxEVT_SCROLL_THUMBRELEASE
3026wxEVT_SCROLL_ENDSCROLL = _core_.wxEVT_SCROLL_ENDSCROLL
3027wxEVT_SCROLLWIN_TOP = _core_.wxEVT_SCROLLWIN_TOP
3028wxEVT_SCROLLWIN_BOTTOM = _core_.wxEVT_SCROLLWIN_BOTTOM
3029wxEVT_SCROLLWIN_LINEUP = _core_.wxEVT_SCROLLWIN_LINEUP
3030wxEVT_SCROLLWIN_LINEDOWN = _core_.wxEVT_SCROLLWIN_LINEDOWN
3031wxEVT_SCROLLWIN_PAGEUP = _core_.wxEVT_SCROLLWIN_PAGEUP
3032wxEVT_SCROLLWIN_PAGEDOWN = _core_.wxEVT_SCROLLWIN_PAGEDOWN
3033wxEVT_SCROLLWIN_THUMBTRACK = _core_.wxEVT_SCROLLWIN_THUMBTRACK
3034wxEVT_SCROLLWIN_THUMBRELEASE = _core_.wxEVT_SCROLLWIN_THUMBRELEASE
3035wxEVT_SIZE = _core_.wxEVT_SIZE
3036wxEVT_MOVE = _core_.wxEVT_MOVE
3037wxEVT_CLOSE_WINDOW = _core_.wxEVT_CLOSE_WINDOW
3038wxEVT_END_SESSION = _core_.wxEVT_END_SESSION
3039wxEVT_QUERY_END_SESSION = _core_.wxEVT_QUERY_END_SESSION
3040wxEVT_ACTIVATE_APP = _core_.wxEVT_ACTIVATE_APP
3041wxEVT_POWER = _core_.wxEVT_POWER
3042wxEVT_ACTIVATE = _core_.wxEVT_ACTIVATE
3043wxEVT_CREATE = _core_.wxEVT_CREATE
3044wxEVT_DESTROY = _core_.wxEVT_DESTROY
3045wxEVT_SHOW = _core_.wxEVT_SHOW
3046wxEVT_ICONIZE = _core_.wxEVT_ICONIZE
3047wxEVT_MAXIMIZE = _core_.wxEVT_MAXIMIZE
3048wxEVT_MOUSE_CAPTURE_CHANGED = _core_.wxEVT_MOUSE_CAPTURE_CHANGED
3049wxEVT_PAINT = _core_.wxEVT_PAINT
3050wxEVT_ERASE_BACKGROUND = _core_.wxEVT_ERASE_BACKGROUND
3051wxEVT_NC_PAINT = _core_.wxEVT_NC_PAINT
3052wxEVT_PAINT_ICON = _core_.wxEVT_PAINT_ICON
3053wxEVT_MENU_OPEN = _core_.wxEVT_MENU_OPEN
3054wxEVT_MENU_CLOSE = _core_.wxEVT_MENU_CLOSE
3055wxEVT_MENU_HIGHLIGHT = _core_.wxEVT_MENU_HIGHLIGHT
3056wxEVT_CONTEXT_MENU = _core_.wxEVT_CONTEXT_MENU
3057wxEVT_SYS_COLOUR_CHANGED = _core_.wxEVT_SYS_COLOUR_CHANGED
3058wxEVT_DISPLAY_CHANGED = _core_.wxEVT_DISPLAY_CHANGED
3059wxEVT_SETTING_CHANGED = _core_.wxEVT_SETTING_CHANGED
3060wxEVT_QUERY_NEW_PALETTE = _core_.wxEVT_QUERY_NEW_PALETTE
3061wxEVT_PALETTE_CHANGED = _core_.wxEVT_PALETTE_CHANGED
3062wxEVT_DROP_FILES = _core_.wxEVT_DROP_FILES
3063wxEVT_DRAW_ITEM = _core_.wxEVT_DRAW_ITEM
3064wxEVT_MEASURE_ITEM = _core_.wxEVT_MEASURE_ITEM
3065wxEVT_COMPARE_ITEM = _core_.wxEVT_COMPARE_ITEM
3066wxEVT_INIT_DIALOG = _core_.wxEVT_INIT_DIALOG
3067wxEVT_IDLE = _core_.wxEVT_IDLE
3068wxEVT_UPDATE_UI = _core_.wxEVT_UPDATE_UI
3069wxEVT_SIZING = _core_.wxEVT_SIZING
3070wxEVT_MOVING = _core_.wxEVT_MOVING
3071wxEVT_COMMAND_LEFT_CLICK = _core_.wxEVT_COMMAND_LEFT_CLICK
3072wxEVT_COMMAND_LEFT_DCLICK = _core_.wxEVT_COMMAND_LEFT_DCLICK
3073wxEVT_COMMAND_RIGHT_CLICK = _core_.wxEVT_COMMAND_RIGHT_CLICK
3074wxEVT_COMMAND_RIGHT_DCLICK = _core_.wxEVT_COMMAND_RIGHT_DCLICK
3075wxEVT_COMMAND_SET_FOCUS = _core_.wxEVT_COMMAND_SET_FOCUS
3076wxEVT_COMMAND_KILL_FOCUS = _core_.wxEVT_COMMAND_KILL_FOCUS
3077wxEVT_COMMAND_ENTER = _core_.wxEVT_COMMAND_ENTER
3078#
3079# Create some event binders
3080EVT_SIZE = wx.PyEventBinder( wxEVT_SIZE )
3081EVT_SIZING = wx.PyEventBinder( wxEVT_SIZING )
3082EVT_MOVE = wx.PyEventBinder( wxEVT_MOVE )
3083EVT_MOVING = wx.PyEventBinder( wxEVT_MOVING )
3084EVT_CLOSE = wx.PyEventBinder( wxEVT_CLOSE_WINDOW )
3085EVT_END_SESSION = wx.PyEventBinder( wxEVT_END_SESSION )
3086EVT_QUERY_END_SESSION = wx.PyEventBinder( wxEVT_QUERY_END_SESSION )
3087EVT_PAINT = wx.PyEventBinder( wxEVT_PAINT )
3088EVT_NC_PAINT = wx.PyEventBinder( wxEVT_NC_PAINT )
3089EVT_ERASE_BACKGROUND = wx.PyEventBinder( wxEVT_ERASE_BACKGROUND )
3090EVT_CHAR = wx.PyEventBinder( wxEVT_CHAR )
3091EVT_KEY_DOWN = wx.PyEventBinder( wxEVT_KEY_DOWN )
3092EVT_KEY_UP = wx.PyEventBinder( wxEVT_KEY_UP )
3093EVT_HOTKEY = wx.PyEventBinder( wxEVT_HOTKEY, 1)
3094EVT_CHAR_HOOK = wx.PyEventBinder( wxEVT_CHAR_HOOK )
3095EVT_MENU_OPEN = wx.PyEventBinder( wxEVT_MENU_OPEN )
3096EVT_MENU_CLOSE = wx.PyEventBinder( wxEVT_MENU_CLOSE )
3097EVT_MENU_HIGHLIGHT = wx.PyEventBinder( wxEVT_MENU_HIGHLIGHT, 1)
3098EVT_MENU_HIGHLIGHT_ALL = wx.PyEventBinder( wxEVT_MENU_HIGHLIGHT )
3099EVT_SET_FOCUS = wx.PyEventBinder( wxEVT_SET_FOCUS )
3100EVT_KILL_FOCUS = wx.PyEventBinder( wxEVT_KILL_FOCUS )
3101EVT_CHILD_FOCUS = wx.PyEventBinder( wxEVT_CHILD_FOCUS )
3102EVT_ACTIVATE = wx.PyEventBinder( wxEVT_ACTIVATE )
3103EVT_ACTIVATE_APP = wx.PyEventBinder( wxEVT_ACTIVATE_APP )
3104EVT_END_SESSION = wx.PyEventBinder( wxEVT_END_SESSION )
3105EVT_QUERY_END_SESSION = wx.PyEventBinder( wxEVT_QUERY_END_SESSION )
3106EVT_DROP_FILES = wx.PyEventBinder( wxEVT_DROP_FILES )
3107EVT_INIT_DIALOG = wx.PyEventBinder( wxEVT_INIT_DIALOG )
3108EVT_SYS_COLOUR_CHANGED = wx.PyEventBinder( wxEVT_SYS_COLOUR_CHANGED )
3109EVT_DISPLAY_CHANGED = wx.PyEventBinder( wxEVT_DISPLAY_CHANGED )
3110EVT_SHOW = wx.PyEventBinder( wxEVT_SHOW )
3111EVT_MAXIMIZE = wx.PyEventBinder( wxEVT_MAXIMIZE )
3112EVT_ICONIZE = wx.PyEventBinder( wxEVT_ICONIZE )
3113EVT_NAVIGATION_KEY = wx.PyEventBinder( wxEVT_NAVIGATION_KEY )
3114EVT_PALETTE_CHANGED = wx.PyEventBinder( wxEVT_PALETTE_CHANGED )
3115EVT_QUERY_NEW_PALETTE = wx.PyEventBinder( wxEVT_QUERY_NEW_PALETTE )
3116EVT_WINDOW_CREATE = wx.PyEventBinder( wxEVT_CREATE )
3117EVT_WINDOW_DESTROY = wx.PyEventBinder( wxEVT_DESTROY )
3118EVT_SET_CURSOR = wx.PyEventBinder( wxEVT_SET_CURSOR )
3119EVT_MOUSE_CAPTURE_CHANGED = wx.PyEventBinder( wxEVT_MOUSE_CAPTURE_CHANGED )
3120
3121EVT_LEFT_DOWN = wx.PyEventBinder( wxEVT_LEFT_DOWN )
3122EVT_LEFT_UP = wx.PyEventBinder( wxEVT_LEFT_UP )
3123EVT_MIDDLE_DOWN = wx.PyEventBinder( wxEVT_MIDDLE_DOWN )
3124EVT_MIDDLE_UP = wx.PyEventBinder( wxEVT_MIDDLE_UP )
3125EVT_RIGHT_DOWN = wx.PyEventBinder( wxEVT_RIGHT_DOWN )
3126EVT_RIGHT_UP = wx.PyEventBinder( wxEVT_RIGHT_UP )
3127EVT_MOTION = wx.PyEventBinder( wxEVT_MOTION )
3128EVT_LEFT_DCLICK = wx.PyEventBinder( wxEVT_LEFT_DCLICK )
3129EVT_MIDDLE_DCLICK = wx.PyEventBinder( wxEVT_MIDDLE_DCLICK )
3130EVT_RIGHT_DCLICK = wx.PyEventBinder( wxEVT_RIGHT_DCLICK )
3131EVT_LEAVE_WINDOW = wx.PyEventBinder( wxEVT_LEAVE_WINDOW )
3132EVT_ENTER_WINDOW = wx.PyEventBinder( wxEVT_ENTER_WINDOW )
3133EVT_MOUSEWHEEL = wx.PyEventBinder( wxEVT_MOUSEWHEEL )
3134
3135EVT_MOUSE_EVENTS = wx.PyEventBinder([ wxEVT_LEFT_DOWN,
3136 wxEVT_LEFT_UP,
3137 wxEVT_MIDDLE_DOWN,
3138 wxEVT_MIDDLE_UP,
3139 wxEVT_RIGHT_DOWN,
3140 wxEVT_RIGHT_UP,
3141 wxEVT_MOTION,
3142 wxEVT_LEFT_DCLICK,
3143 wxEVT_MIDDLE_DCLICK,
3144 wxEVT_RIGHT_DCLICK,
3145 wxEVT_ENTER_WINDOW,
3146 wxEVT_LEAVE_WINDOW,
3147 wxEVT_MOUSEWHEEL
3148 ])
3149
3150
3151# Scrolling from wxWindow (sent to wxScrolledWindow)
3152EVT_SCROLLWIN = wx.PyEventBinder([ wxEVT_SCROLLWIN_TOP,
3153 wxEVT_SCROLLWIN_BOTTOM,
3154 wxEVT_SCROLLWIN_LINEUP,
3155 wxEVT_SCROLLWIN_LINEDOWN,
3156 wxEVT_SCROLLWIN_PAGEUP,
3157 wxEVT_SCROLLWIN_PAGEDOWN,
3158 wxEVT_SCROLLWIN_THUMBTRACK,
3159 wxEVT_SCROLLWIN_THUMBRELEASE,
3160 ])
3161
3162EVT_SCROLLWIN_TOP = wx.PyEventBinder( wxEVT_SCROLLWIN_TOP )
3163EVT_SCROLLWIN_BOTTOM = wx.PyEventBinder( wxEVT_SCROLLWIN_BOTTOM )
3164EVT_SCROLLWIN_LINEUP = wx.PyEventBinder( wxEVT_SCROLLWIN_LINEUP )
3165EVT_SCROLLWIN_LINEDOWN = wx.PyEventBinder( wxEVT_SCROLLWIN_LINEDOWN )
3166EVT_SCROLLWIN_PAGEUP = wx.PyEventBinder( wxEVT_SCROLLWIN_PAGEUP )
3167EVT_SCROLLWIN_PAGEDOWN = wx.PyEventBinder( wxEVT_SCROLLWIN_PAGEDOWN )
3168EVT_SCROLLWIN_THUMBTRACK = wx.PyEventBinder( wxEVT_SCROLLWIN_THUMBTRACK )
3169EVT_SCROLLWIN_THUMBRELEASE = wx.PyEventBinder( wxEVT_SCROLLWIN_THUMBRELEASE )
3170
3171# Scrolling from wxSlider and wxScrollBar
3172EVT_SCROLL = wx.PyEventBinder([ wxEVT_SCROLL_TOP,
3173 wxEVT_SCROLL_BOTTOM,
3174 wxEVT_SCROLL_LINEUP,
3175 wxEVT_SCROLL_LINEDOWN,
3176 wxEVT_SCROLL_PAGEUP,
3177 wxEVT_SCROLL_PAGEDOWN,
3178 wxEVT_SCROLL_THUMBTRACK,
3179 wxEVT_SCROLL_THUMBRELEASE,
3180 wxEVT_SCROLL_ENDSCROLL,
3181 ])
3182
3183EVT_SCROLL_TOP = wx.PyEventBinder( wxEVT_SCROLL_TOP )
3184EVT_SCROLL_BOTTOM = wx.PyEventBinder( wxEVT_SCROLL_BOTTOM )
3185EVT_SCROLL_LINEUP = wx.PyEventBinder( wxEVT_SCROLL_LINEUP )
3186EVT_SCROLL_LINEDOWN = wx.PyEventBinder( wxEVT_SCROLL_LINEDOWN )
3187EVT_SCROLL_PAGEUP = wx.PyEventBinder( wxEVT_SCROLL_PAGEUP )
3188EVT_SCROLL_PAGEDOWN = wx.PyEventBinder( wxEVT_SCROLL_PAGEDOWN )
3189EVT_SCROLL_THUMBTRACK = wx.PyEventBinder( wxEVT_SCROLL_THUMBTRACK )
3190EVT_SCROLL_THUMBRELEASE = wx.PyEventBinder( wxEVT_SCROLL_THUMBRELEASE )
3191EVT_SCROLL_ENDSCROLL = wx.PyEventBinder( wxEVT_SCROLL_ENDSCROLL )
3192
3193# Scrolling from wxSlider and wxScrollBar, with an id
3194EVT_COMMAND_SCROLL = wx.PyEventBinder([ wxEVT_SCROLL_TOP,
3195 wxEVT_SCROLL_BOTTOM,
3196 wxEVT_SCROLL_LINEUP,
3197 wxEVT_SCROLL_LINEDOWN,
3198 wxEVT_SCROLL_PAGEUP,
3199 wxEVT_SCROLL_PAGEDOWN,
3200 wxEVT_SCROLL_THUMBTRACK,
3201 wxEVT_SCROLL_THUMBRELEASE,
3202 wxEVT_SCROLL_ENDSCROLL,
3203 ], 1)
3204
3205EVT_COMMAND_SCROLL_TOP = wx.PyEventBinder( wxEVT_SCROLL_TOP, 1)
3206EVT_COMMAND_SCROLL_BOTTOM = wx.PyEventBinder( wxEVT_SCROLL_BOTTOM, 1)
3207EVT_COMMAND_SCROLL_LINEUP = wx.PyEventBinder( wxEVT_SCROLL_LINEUP, 1)
3208EVT_COMMAND_SCROLL_LINEDOWN = wx.PyEventBinder( wxEVT_SCROLL_LINEDOWN, 1)
3209EVT_COMMAND_SCROLL_PAGEUP = wx.PyEventBinder( wxEVT_SCROLL_PAGEUP, 1)
3210EVT_COMMAND_SCROLL_PAGEDOWN = wx.PyEventBinder( wxEVT_SCROLL_PAGEDOWN, 1)
3211EVT_COMMAND_SCROLL_THUMBTRACK = wx.PyEventBinder( wxEVT_SCROLL_THUMBTRACK, 1)
3212EVT_COMMAND_SCROLL_THUMBRELEASE = wx.PyEventBinder( wxEVT_SCROLL_THUMBRELEASE, 1)
3213EVT_COMMAND_SCROLL_ENDSCROLL = wx.PyEventBinder( wxEVT_SCROLL_ENDSCROLL, 1)
3214
3215EVT_BUTTON = wx.PyEventBinder( wxEVT_COMMAND_BUTTON_CLICKED, 1)
3216EVT_CHECKBOX = wx.PyEventBinder( wxEVT_COMMAND_CHECKBOX_CLICKED, 1)
3217EVT_CHOICE = wx.PyEventBinder( wxEVT_COMMAND_CHOICE_SELECTED, 1)
3218EVT_LISTBOX = wx.PyEventBinder( wxEVT_COMMAND_LISTBOX_SELECTED, 1)
3219EVT_LISTBOX_DCLICK = wx.PyEventBinder( wxEVT_COMMAND_LISTBOX_DOUBLECLICKED, 1)
3220EVT_MENU = wx.PyEventBinder( wxEVT_COMMAND_MENU_SELECTED, 1)
3221EVT_MENU_RANGE = wx.PyEventBinder( wxEVT_COMMAND_MENU_SELECTED, 2)
3222EVT_SLIDER = wx.PyEventBinder( wxEVT_COMMAND_SLIDER_UPDATED, 1)
3223EVT_RADIOBOX = wx.PyEventBinder( wxEVT_COMMAND_RADIOBOX_SELECTED, 1)
3224EVT_RADIOBUTTON = wx.PyEventBinder( wxEVT_COMMAND_RADIOBUTTON_SELECTED, 1)
3225
3226EVT_SCROLLBAR = wx.PyEventBinder( wxEVT_COMMAND_SCROLLBAR_UPDATED, 1)
3227EVT_VLBOX = wx.PyEventBinder( wxEVT_COMMAND_VLBOX_SELECTED, 1)
3228EVT_COMBOBOX = wx.PyEventBinder( wxEVT_COMMAND_COMBOBOX_SELECTED, 1)
3229EVT_TOOL = wx.PyEventBinder( wxEVT_COMMAND_TOOL_CLICKED, 1)
3230EVT_TOOL_RANGE = wx.PyEventBinder( wxEVT_COMMAND_TOOL_CLICKED, 2)
3231EVT_TOOL_RCLICKED = wx.PyEventBinder( wxEVT_COMMAND_TOOL_RCLICKED, 1)
3232EVT_TOOL_RCLICKED_RANGE = wx.PyEventBinder( wxEVT_COMMAND_TOOL_RCLICKED, 2)
3233EVT_TOOL_ENTER = wx.PyEventBinder( wxEVT_COMMAND_TOOL_ENTER, 1)
3234EVT_CHECKLISTBOX = wx.PyEventBinder( wxEVT_COMMAND_CHECKLISTBOX_TOGGLED, 1)
3235
3236
3237EVT_COMMAND_LEFT_CLICK = wx.PyEventBinder( wxEVT_COMMAND_LEFT_CLICK, 1)
3238EVT_COMMAND_LEFT_DCLICK = wx.PyEventBinder( wxEVT_COMMAND_LEFT_DCLICK, 1)
3239EVT_COMMAND_RIGHT_CLICK = wx.PyEventBinder( wxEVT_COMMAND_RIGHT_CLICK, 1)
3240EVT_COMMAND_RIGHT_DCLICK = wx.PyEventBinder( wxEVT_COMMAND_RIGHT_DCLICK, 1)
3241EVT_COMMAND_SET_FOCUS = wx.PyEventBinder( wxEVT_COMMAND_SET_FOCUS, 1)
3242EVT_COMMAND_KILL_FOCUS = wx.PyEventBinder( wxEVT_COMMAND_KILL_FOCUS, 1)
3243EVT_COMMAND_ENTER = wx.PyEventBinder( wxEVT_COMMAND_ENTER, 1)
3244
3245EVT_IDLE = wx.PyEventBinder( wxEVT_IDLE )
3246
3247EVT_UPDATE_UI = wx.PyEventBinder( wxEVT_UPDATE_UI, 1)
3248EVT_UPDATE_UI_RANGE = wx.PyEventBinder( wxEVT_UPDATE_UI, 2)
3249
3250EVT_CONTEXT_MENU = wx.PyEventBinder( wxEVT_CONTEXT_MENU )
3251
3252
3253
3254#---------------------------------------------------------------------------
3255
3256class Event(Object):
36ed4f51 3257 """Proxy of C++ Event class"""
d55e5bfc
RD
3258 def __init__(self): raise RuntimeError, "No constructor defined"
3259 def __repr__(self):
3260 return "<%s.%s; proxy of C++ wxEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
3261 def __del__(self, destroy=_core_.delete_Event):
3262 """__del__(self)"""
3263 try:
3264 if self.thisown: destroy(self)
3265 except: pass
3266
3267 def SetEventType(*args, **kwargs):
3268 """SetEventType(self, wxEventType typ)"""
3269 return _core_.Event_SetEventType(*args, **kwargs)
3270
3271 def GetEventType(*args, **kwargs):
3272 """GetEventType(self) -> wxEventType"""
3273 return _core_.Event_GetEventType(*args, **kwargs)
3274
3275 def GetEventObject(*args, **kwargs):
3276 """GetEventObject(self) -> Object"""
3277 return _core_.Event_GetEventObject(*args, **kwargs)
3278
3279 def SetEventObject(*args, **kwargs):
3280 """SetEventObject(self, Object obj)"""
3281 return _core_.Event_SetEventObject(*args, **kwargs)
3282
3283 def GetTimestamp(*args, **kwargs):
3284 """GetTimestamp(self) -> long"""
3285 return _core_.Event_GetTimestamp(*args, **kwargs)
3286
3287 def SetTimestamp(*args, **kwargs):
3288 """SetTimestamp(self, long ts=0)"""
3289 return _core_.Event_SetTimestamp(*args, **kwargs)
3290
3291 def GetId(*args, **kwargs):
3292 """GetId(self) -> int"""
3293 return _core_.Event_GetId(*args, **kwargs)
3294
3295 def SetId(*args, **kwargs):
3296 """SetId(self, int Id)"""
3297 return _core_.Event_SetId(*args, **kwargs)
3298
3299 def IsCommandEvent(*args, **kwargs):
3300 """IsCommandEvent(self) -> bool"""
3301 return _core_.Event_IsCommandEvent(*args, **kwargs)
3302
3303 def Skip(*args, **kwargs):
51b83b37
RD
3304 """
3305 Skip(self, bool skip=True)
3306
3307 Called by an event handler, it controls whether additional event
3308 handlers bound to this event will be called after the current event
3309 handler returns. Skip(false) (the default setting) will prevent
3310 additional event handlers from being called and control will be
3311 returned to the sender of the event immediately after the current
3312 handler has finished. Skip(True) will cause the event processing
3313 system to continue searching for a handler function for this event.
3314
3315 """
d55e5bfc
RD
3316 return _core_.Event_Skip(*args, **kwargs)
3317
3318 def GetSkipped(*args, **kwargs):
3319 """GetSkipped(self) -> bool"""
3320 return _core_.Event_GetSkipped(*args, **kwargs)
3321
3322 def ShouldPropagate(*args, **kwargs):
3323 """ShouldPropagate(self) -> bool"""
3324 return _core_.Event_ShouldPropagate(*args, **kwargs)
3325
3326 def StopPropagation(*args, **kwargs):
3327 """StopPropagation(self) -> int"""
3328 return _core_.Event_StopPropagation(*args, **kwargs)
3329
3330 def ResumePropagation(*args, **kwargs):
3331 """ResumePropagation(self, int propagationLevel)"""
3332 return _core_.Event_ResumePropagation(*args, **kwargs)
3333
3334 def Clone(*args, **kwargs):
3335 """Clone(self) -> Event"""
3336 return _core_.Event_Clone(*args, **kwargs)
3337
3338
3339class EventPtr(Event):
3340 def __init__(self, this):
3341 self.this = this
3342 if not hasattr(self,"thisown"): self.thisown = 0
3343 self.__class__ = Event
3344_core_.Event_swigregister(EventPtr)
3345
3346#---------------------------------------------------------------------------
3347
3348class PropagationDisabler(object):
36ed4f51 3349 """Proxy of C++ PropagationDisabler class"""
d55e5bfc
RD
3350 def __repr__(self):
3351 return "<%s.%s; proxy of C++ wxPropagationDisabler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
3352 def __init__(self, *args, **kwargs):
3353 """__init__(self, Event event) -> PropagationDisabler"""
3354 newobj = _core_.new_PropagationDisabler(*args, **kwargs)
3355 self.this = newobj.this
3356 self.thisown = 1
3357 del newobj.thisown
3358 def __del__(self, destroy=_core_.delete_PropagationDisabler):
3359 """__del__(self)"""
3360 try:
3361 if self.thisown: destroy(self)
3362 except: pass
3363
3364
3365class PropagationDisablerPtr(PropagationDisabler):
3366 def __init__(self, this):
3367 self.this = this
3368 if not hasattr(self,"thisown"): self.thisown = 0
3369 self.__class__ = PropagationDisabler
3370_core_.PropagationDisabler_swigregister(PropagationDisablerPtr)
3371
3372class PropagateOnce(object):
36ed4f51 3373 """Proxy of C++ PropagateOnce class"""
d55e5bfc
RD
3374 def __repr__(self):
3375 return "<%s.%s; proxy of C++ wxPropagateOnce instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
3376 def __init__(self, *args, **kwargs):
3377 """__init__(self, Event event) -> PropagateOnce"""
3378 newobj = _core_.new_PropagateOnce(*args, **kwargs)
3379 self.this = newobj.this
3380 self.thisown = 1
3381 del newobj.thisown
3382 def __del__(self, destroy=_core_.delete_PropagateOnce):
3383 """__del__(self)"""
3384 try:
3385 if self.thisown: destroy(self)
3386 except: pass
3387
3388
3389class PropagateOncePtr(PropagateOnce):
3390 def __init__(self, this):
3391 self.this = this
3392 if not hasattr(self,"thisown"): self.thisown = 0
3393 self.__class__ = PropagateOnce
3394_core_.PropagateOnce_swigregister(PropagateOncePtr)
3395
3396#---------------------------------------------------------------------------
3397
3398class CommandEvent(Event):
36ed4f51 3399 """Proxy of C++ CommandEvent class"""
d55e5bfc
RD
3400 def __repr__(self):
3401 return "<%s.%s; proxy of C++ wxCommandEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
3402 def __init__(self, *args, **kwargs):
3403 """__init__(self, wxEventType commandType=wxEVT_NULL, int winid=0) -> CommandEvent"""
3404 newobj = _core_.new_CommandEvent(*args, **kwargs)
3405 self.this = newobj.this
3406 self.thisown = 1
3407 del newobj.thisown
3408 def GetSelection(*args, **kwargs):
3409 """GetSelection(self) -> int"""
3410 return _core_.CommandEvent_GetSelection(*args, **kwargs)
3411
3412 def SetString(*args, **kwargs):
3413 """SetString(self, String s)"""
3414 return _core_.CommandEvent_SetString(*args, **kwargs)
3415
3416 def GetString(*args, **kwargs):
3417 """GetString(self) -> String"""
3418 return _core_.CommandEvent_GetString(*args, **kwargs)
3419
3420 def IsChecked(*args, **kwargs):
3421 """IsChecked(self) -> bool"""
3422 return _core_.CommandEvent_IsChecked(*args, **kwargs)
3423
3424 Checked = IsChecked
3425 def IsSelection(*args, **kwargs):
3426 """IsSelection(self) -> bool"""
3427 return _core_.CommandEvent_IsSelection(*args, **kwargs)
3428
3429 def SetExtraLong(*args, **kwargs):
3430 """SetExtraLong(self, long extraLong)"""
3431 return _core_.CommandEvent_SetExtraLong(*args, **kwargs)
3432
3433 def GetExtraLong(*args, **kwargs):
3434 """GetExtraLong(self) -> long"""
3435 return _core_.CommandEvent_GetExtraLong(*args, **kwargs)
3436
3437 def SetInt(*args, **kwargs):
3438 """SetInt(self, int i)"""
3439 return _core_.CommandEvent_SetInt(*args, **kwargs)
3440
3441 def GetInt(*args, **kwargs):
3442 """GetInt(self) -> long"""
3443 return _core_.CommandEvent_GetInt(*args, **kwargs)
3444
3445 def Clone(*args, **kwargs):
3446 """Clone(self) -> Event"""
3447 return _core_.CommandEvent_Clone(*args, **kwargs)
3448
3449
3450class CommandEventPtr(CommandEvent):
3451 def __init__(self, this):
3452 self.this = this
3453 if not hasattr(self,"thisown"): self.thisown = 0
3454 self.__class__ = CommandEvent
3455_core_.CommandEvent_swigregister(CommandEventPtr)
3456
3457#---------------------------------------------------------------------------
3458
3459class NotifyEvent(CommandEvent):
36ed4f51 3460 """Proxy of C++ NotifyEvent class"""
d55e5bfc
RD
3461 def __repr__(self):
3462 return "<%s.%s; proxy of C++ wxNotifyEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
3463 def __init__(self, *args, **kwargs):
3464 """__init__(self, wxEventType commandType=wxEVT_NULL, int winid=0) -> NotifyEvent"""
3465 newobj = _core_.new_NotifyEvent(*args, **kwargs)
3466 self.this = newobj.this
3467 self.thisown = 1
3468 del newobj.thisown
3469 def Veto(*args, **kwargs):
3470 """Veto(self)"""
3471 return _core_.NotifyEvent_Veto(*args, **kwargs)
3472
3473 def Allow(*args, **kwargs):
3474 """Allow(self)"""
3475 return _core_.NotifyEvent_Allow(*args, **kwargs)
3476
3477 def IsAllowed(*args, **kwargs):
3478 """IsAllowed(self) -> bool"""
3479 return _core_.NotifyEvent_IsAllowed(*args, **kwargs)
3480
3481
3482class NotifyEventPtr(NotifyEvent):
3483 def __init__(self, this):
3484 self.this = this
3485 if not hasattr(self,"thisown"): self.thisown = 0
3486 self.__class__ = NotifyEvent
3487_core_.NotifyEvent_swigregister(NotifyEventPtr)
3488
3489#---------------------------------------------------------------------------
3490
3491class ScrollEvent(CommandEvent):
36ed4f51 3492 """Proxy of C++ ScrollEvent class"""
d55e5bfc
RD
3493 def __repr__(self):
3494 return "<%s.%s; proxy of C++ wxScrollEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
3495 def __init__(self, *args, **kwargs):
3496 """
3497 __init__(self, wxEventType commandType=wxEVT_NULL, int winid=0, int pos=0,
3498 int orient=0) -> ScrollEvent
3499 """
3500 newobj = _core_.new_ScrollEvent(*args, **kwargs)
3501 self.this = newobj.this
3502 self.thisown = 1
3503 del newobj.thisown
3504 def GetOrientation(*args, **kwargs):
3505 """GetOrientation(self) -> int"""
3506 return _core_.ScrollEvent_GetOrientation(*args, **kwargs)
3507
3508 def GetPosition(*args, **kwargs):
3509 """GetPosition(self) -> int"""
3510 return _core_.ScrollEvent_GetPosition(*args, **kwargs)
3511
3512 def SetOrientation(*args, **kwargs):
3513 """SetOrientation(self, int orient)"""
3514 return _core_.ScrollEvent_SetOrientation(*args, **kwargs)
3515
3516 def SetPosition(*args, **kwargs):
3517 """SetPosition(self, int pos)"""
3518 return _core_.ScrollEvent_SetPosition(*args, **kwargs)
3519
3520
3521class ScrollEventPtr(ScrollEvent):
3522 def __init__(self, this):
3523 self.this = this
3524 if not hasattr(self,"thisown"): self.thisown = 0
3525 self.__class__ = ScrollEvent
3526_core_.ScrollEvent_swigregister(ScrollEventPtr)
3527
3528#---------------------------------------------------------------------------
3529
3530class ScrollWinEvent(Event):
36ed4f51 3531 """Proxy of C++ ScrollWinEvent class"""
d55e5bfc
RD
3532 def __repr__(self):
3533 return "<%s.%s; proxy of C++ wxScrollWinEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
3534 def __init__(self, *args, **kwargs):
3535 """__init__(self, wxEventType commandType=wxEVT_NULL, int pos=0, int orient=0) -> ScrollWinEvent"""
3536 newobj = _core_.new_ScrollWinEvent(*args, **kwargs)
3537 self.this = newobj.this
3538 self.thisown = 1
3539 del newobj.thisown
3540 def GetOrientation(*args, **kwargs):
3541 """GetOrientation(self) -> int"""
3542 return _core_.ScrollWinEvent_GetOrientation(*args, **kwargs)
3543
3544 def GetPosition(*args, **kwargs):
3545 """GetPosition(self) -> int"""
3546 return _core_.ScrollWinEvent_GetPosition(*args, **kwargs)
3547
3548 def SetOrientation(*args, **kwargs):
3549 """SetOrientation(self, int orient)"""
3550 return _core_.ScrollWinEvent_SetOrientation(*args, **kwargs)
3551
3552 def SetPosition(*args, **kwargs):
3553 """SetPosition(self, int pos)"""
3554 return _core_.ScrollWinEvent_SetPosition(*args, **kwargs)
3555
3556
3557class ScrollWinEventPtr(ScrollWinEvent):
3558 def __init__(self, this):
3559 self.this = this
3560 if not hasattr(self,"thisown"): self.thisown = 0
3561 self.__class__ = ScrollWinEvent
3562_core_.ScrollWinEvent_swigregister(ScrollWinEventPtr)
3563
3564#---------------------------------------------------------------------------
3565
3566MOUSE_BTN_ANY = _core_.MOUSE_BTN_ANY
3567MOUSE_BTN_NONE = _core_.MOUSE_BTN_NONE
3568MOUSE_BTN_LEFT = _core_.MOUSE_BTN_LEFT
3569MOUSE_BTN_MIDDLE = _core_.MOUSE_BTN_MIDDLE
3570MOUSE_BTN_RIGHT = _core_.MOUSE_BTN_RIGHT
3571class MouseEvent(Event):
36ed4f51 3572 """Proxy of C++ MouseEvent class"""
d55e5bfc
RD
3573 def __repr__(self):
3574 return "<%s.%s; proxy of C++ wxMouseEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
3575 def __init__(self, *args, **kwargs):
3576 """__init__(self, wxEventType mouseType=wxEVT_NULL) -> MouseEvent"""
3577 newobj = _core_.new_MouseEvent(*args, **kwargs)
3578 self.this = newobj.this
3579 self.thisown = 1
3580 del newobj.thisown
3581 def IsButton(*args, **kwargs):
3582 """IsButton(self) -> bool"""
3583 return _core_.MouseEvent_IsButton(*args, **kwargs)
3584
3585 def ButtonDown(*args, **kwargs):
3586 """ButtonDown(self, int but=MOUSE_BTN_ANY) -> bool"""
3587 return _core_.MouseEvent_ButtonDown(*args, **kwargs)
3588
3589 def ButtonDClick(*args, **kwargs):
3590 """ButtonDClick(self, int but=MOUSE_BTN_ANY) -> bool"""
3591 return _core_.MouseEvent_ButtonDClick(*args, **kwargs)
3592
3593 def ButtonUp(*args, **kwargs):
3594 """ButtonUp(self, int but=MOUSE_BTN_ANY) -> bool"""
3595 return _core_.MouseEvent_ButtonUp(*args, **kwargs)
3596
3597 def Button(*args, **kwargs):
3598 """Button(self, int but) -> bool"""
3599 return _core_.MouseEvent_Button(*args, **kwargs)
3600
3601 def ButtonIsDown(*args, **kwargs):
3602 """ButtonIsDown(self, int but) -> bool"""
3603 return _core_.MouseEvent_ButtonIsDown(*args, **kwargs)
3604
3605 def GetButton(*args, **kwargs):
3606 """GetButton(self) -> int"""
3607 return _core_.MouseEvent_GetButton(*args, **kwargs)
3608
3609 def ControlDown(*args, **kwargs):
3610 """ControlDown(self) -> bool"""
3611 return _core_.MouseEvent_ControlDown(*args, **kwargs)
3612
3613 def MetaDown(*args, **kwargs):
3614 """MetaDown(self) -> bool"""
3615 return _core_.MouseEvent_MetaDown(*args, **kwargs)
3616
3617 def AltDown(*args, **kwargs):
3618 """AltDown(self) -> bool"""
3619 return _core_.MouseEvent_AltDown(*args, **kwargs)
3620
3621 def ShiftDown(*args, **kwargs):
3622 """ShiftDown(self) -> bool"""
3623 return _core_.MouseEvent_ShiftDown(*args, **kwargs)
3624
412d302d
RD
3625 def CmdDown(*args, **kwargs):
3626 """
3627 CmdDown(self) -> bool
3628
3629 "Cmd" is a pseudo key which is the same as Control for PC and Unix
3630 platforms but the special "Apple" (a.k.a as "Command") key on
3631 Macs: it makes often sense to use it instead of, say, `ControlDown`
3632 because Cmd key is used for the same thing under Mac as Ctrl
3633 elsewhere. The Ctrl still exists, it's just not used for this
3634 purpose. So for non-Mac platforms this is the same as `ControlDown`
3635 and Macs this is the same as `MetaDown`.
3636 """
3637 return _core_.MouseEvent_CmdDown(*args, **kwargs)
3638
d55e5bfc
RD
3639 def LeftDown(*args, **kwargs):
3640 """LeftDown(self) -> bool"""
3641 return _core_.MouseEvent_LeftDown(*args, **kwargs)
3642
3643 def MiddleDown(*args, **kwargs):
3644 """MiddleDown(self) -> bool"""
3645 return _core_.MouseEvent_MiddleDown(*args, **kwargs)
3646
3647 def RightDown(*args, **kwargs):
3648 """RightDown(self) -> bool"""
3649 return _core_.MouseEvent_RightDown(*args, **kwargs)
3650
3651 def LeftUp(*args, **kwargs):
3652 """LeftUp(self) -> bool"""
3653 return _core_.MouseEvent_LeftUp(*args, **kwargs)
3654
3655 def MiddleUp(*args, **kwargs):
3656 """MiddleUp(self) -> bool"""
3657 return _core_.MouseEvent_MiddleUp(*args, **kwargs)
3658
3659 def RightUp(*args, **kwargs):
3660 """RightUp(self) -> bool"""
3661 return _core_.MouseEvent_RightUp(*args, **kwargs)
3662
3663 def LeftDClick(*args, **kwargs):
3664 """LeftDClick(self) -> bool"""
3665 return _core_.MouseEvent_LeftDClick(*args, **kwargs)
3666
3667 def MiddleDClick(*args, **kwargs):
3668 """MiddleDClick(self) -> bool"""
3669 return _core_.MouseEvent_MiddleDClick(*args, **kwargs)
3670
3671 def RightDClick(*args, **kwargs):
3672 """RightDClick(self) -> bool"""
3673 return _core_.MouseEvent_RightDClick(*args, **kwargs)
3674
3675 def LeftIsDown(*args, **kwargs):
3676 """LeftIsDown(self) -> bool"""
3677 return _core_.MouseEvent_LeftIsDown(*args, **kwargs)
3678
3679 def MiddleIsDown(*args, **kwargs):
3680 """MiddleIsDown(self) -> bool"""
3681 return _core_.MouseEvent_MiddleIsDown(*args, **kwargs)
3682
3683 def RightIsDown(*args, **kwargs):
3684 """RightIsDown(self) -> bool"""
3685 return _core_.MouseEvent_RightIsDown(*args, **kwargs)
3686
3687 def Dragging(*args, **kwargs):
3688 """Dragging(self) -> bool"""
3689 return _core_.MouseEvent_Dragging(*args, **kwargs)
3690
3691 def Moving(*args, **kwargs):
3692 """Moving(self) -> bool"""
3693 return _core_.MouseEvent_Moving(*args, **kwargs)
3694
3695 def Entering(*args, **kwargs):
3696 """Entering(self) -> bool"""
3697 return _core_.MouseEvent_Entering(*args, **kwargs)
3698
3699 def Leaving(*args, **kwargs):
3700 """Leaving(self) -> bool"""
3701 return _core_.MouseEvent_Leaving(*args, **kwargs)
3702
3703 def GetPosition(*args, **kwargs):
3704 """
3705 GetPosition(self) -> Point
3706
15817c7e
RD
3707 Returns the position of the mouse in window coordinates when the event
3708 happened.
d55e5bfc
RD
3709 """
3710 return _core_.MouseEvent_GetPosition(*args, **kwargs)
3711
3712 def GetPositionTuple(*args, **kwargs):
3713 """
3714 GetPositionTuple() -> (x,y)
3715
15817c7e
RD
3716 Returns the position of the mouse in window coordinates when the event
3717 happened.
d55e5bfc
RD
3718 """
3719 return _core_.MouseEvent_GetPositionTuple(*args, **kwargs)
3720
3721 def GetLogicalPosition(*args, **kwargs):
3722 """GetLogicalPosition(self, DC dc) -> Point"""
3723 return _core_.MouseEvent_GetLogicalPosition(*args, **kwargs)
3724
3725 def GetX(*args, **kwargs):
3726 """GetX(self) -> int"""
3727 return _core_.MouseEvent_GetX(*args, **kwargs)
3728
3729 def GetY(*args, **kwargs):
3730 """GetY(self) -> int"""
3731 return _core_.MouseEvent_GetY(*args, **kwargs)
3732
3733 def GetWheelRotation(*args, **kwargs):
3734 """GetWheelRotation(self) -> int"""
3735 return _core_.MouseEvent_GetWheelRotation(*args, **kwargs)
3736
3737 def GetWheelDelta(*args, **kwargs):
3738 """GetWheelDelta(self) -> int"""
3739 return _core_.MouseEvent_GetWheelDelta(*args, **kwargs)
3740
3741 def GetLinesPerAction(*args, **kwargs):
3742 """GetLinesPerAction(self) -> int"""
3743 return _core_.MouseEvent_GetLinesPerAction(*args, **kwargs)
3744
3745 def IsPageScroll(*args, **kwargs):
3746 """IsPageScroll(self) -> bool"""
3747 return _core_.MouseEvent_IsPageScroll(*args, **kwargs)
3748
3749 m_x = property(_core_.MouseEvent_m_x_get, _core_.MouseEvent_m_x_set)
3750 m_y = property(_core_.MouseEvent_m_y_get, _core_.MouseEvent_m_y_set)
3751 m_leftDown = property(_core_.MouseEvent_m_leftDown_get, _core_.MouseEvent_m_leftDown_set)
3752 m_middleDown = property(_core_.MouseEvent_m_middleDown_get, _core_.MouseEvent_m_middleDown_set)
3753 m_rightDown = property(_core_.MouseEvent_m_rightDown_get, _core_.MouseEvent_m_rightDown_set)
3754 m_controlDown = property(_core_.MouseEvent_m_controlDown_get, _core_.MouseEvent_m_controlDown_set)
3755 m_shiftDown = property(_core_.MouseEvent_m_shiftDown_get, _core_.MouseEvent_m_shiftDown_set)
3756 m_altDown = property(_core_.MouseEvent_m_altDown_get, _core_.MouseEvent_m_altDown_set)
3757 m_metaDown = property(_core_.MouseEvent_m_metaDown_get, _core_.MouseEvent_m_metaDown_set)
3758 m_wheelRotation = property(_core_.MouseEvent_m_wheelRotation_get, _core_.MouseEvent_m_wheelRotation_set)
3759 m_wheelDelta = property(_core_.MouseEvent_m_wheelDelta_get, _core_.MouseEvent_m_wheelDelta_set)
3760 m_linesPerAction = property(_core_.MouseEvent_m_linesPerAction_get, _core_.MouseEvent_m_linesPerAction_set)
3761
3762class MouseEventPtr(MouseEvent):
3763 def __init__(self, this):
3764 self.this = this
3765 if not hasattr(self,"thisown"): self.thisown = 0
3766 self.__class__ = MouseEvent
3767_core_.MouseEvent_swigregister(MouseEventPtr)
3768
3769#---------------------------------------------------------------------------
3770
3771class SetCursorEvent(Event):
36ed4f51 3772 """Proxy of C++ SetCursorEvent class"""
d55e5bfc
RD
3773 def __repr__(self):
3774 return "<%s.%s; proxy of C++ wxSetCursorEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
3775 def __init__(self, *args, **kwargs):
3776 """__init__(self, int x=0, int y=0) -> SetCursorEvent"""
3777 newobj = _core_.new_SetCursorEvent(*args, **kwargs)
3778 self.this = newobj.this
3779 self.thisown = 1
3780 del newobj.thisown
3781 def GetX(*args, **kwargs):
3782 """GetX(self) -> int"""
3783 return _core_.SetCursorEvent_GetX(*args, **kwargs)
3784
3785 def GetY(*args, **kwargs):
3786 """GetY(self) -> int"""
3787 return _core_.SetCursorEvent_GetY(*args, **kwargs)
3788
3789 def SetCursor(*args, **kwargs):
3790 """SetCursor(self, Cursor cursor)"""
3791 return _core_.SetCursorEvent_SetCursor(*args, **kwargs)
3792
3793 def GetCursor(*args, **kwargs):
3794 """GetCursor(self) -> Cursor"""
3795 return _core_.SetCursorEvent_GetCursor(*args, **kwargs)
3796
3797 def HasCursor(*args, **kwargs):
3798 """HasCursor(self) -> bool"""
3799 return _core_.SetCursorEvent_HasCursor(*args, **kwargs)
3800
3801
3802class SetCursorEventPtr(SetCursorEvent):
3803 def __init__(self, this):
3804 self.this = this
3805 if not hasattr(self,"thisown"): self.thisown = 0
3806 self.__class__ = SetCursorEvent
3807_core_.SetCursorEvent_swigregister(SetCursorEventPtr)
3808
3809#---------------------------------------------------------------------------
3810
3811class KeyEvent(Event):
36ed4f51 3812 """Proxy of C++ KeyEvent class"""
d55e5bfc
RD
3813 def __repr__(self):
3814 return "<%s.%s; proxy of C++ wxKeyEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
3815 def __init__(self, *args, **kwargs):
3816 """__init__(self, wxEventType keyType=wxEVT_NULL) -> KeyEvent"""
3817 newobj = _core_.new_KeyEvent(*args, **kwargs)
3818 self.this = newobj.this
3819 self.thisown = 1
3820 del newobj.thisown
3821 def ControlDown(*args, **kwargs):
3822 """ControlDown(self) -> bool"""
3823 return _core_.KeyEvent_ControlDown(*args, **kwargs)
3824
3825 def MetaDown(*args, **kwargs):
3826 """MetaDown(self) -> bool"""
3827 return _core_.KeyEvent_MetaDown(*args, **kwargs)
3828
3829 def AltDown(*args, **kwargs):
3830 """AltDown(self) -> bool"""
3831 return _core_.KeyEvent_AltDown(*args, **kwargs)
3832
3833 def ShiftDown(*args, **kwargs):
3834 """ShiftDown(self) -> bool"""
3835 return _core_.KeyEvent_ShiftDown(*args, **kwargs)
3836
412d302d
RD
3837 def CmdDown(*args, **kwargs):
3838 """
3839 CmdDown(self) -> bool
3840
3841 "Cmd" is a pseudo key which is the same as Control for PC and Unix
3842 platforms but the special "Apple" (a.k.a as "Command") key on
3843 Macs: it makes often sense to use it instead of, say, `ControlDown`
3844 because Cmd key is used for the same thing under Mac as Ctrl
3845 elsewhere. The Ctrl still exists, it's just not used for this
3846 purpose. So for non-Mac platforms this is the same as `ControlDown`
3847 and Macs this is the same as `MetaDown`.
3848 """
3849 return _core_.KeyEvent_CmdDown(*args, **kwargs)
3850
d55e5bfc
RD
3851 def HasModifiers(*args, **kwargs):
3852 """HasModifiers(self) -> bool"""
3853 return _core_.KeyEvent_HasModifiers(*args, **kwargs)
3854
3855 def GetKeyCode(*args, **kwargs):
3856 """GetKeyCode(self) -> int"""
3857 return _core_.KeyEvent_GetKeyCode(*args, **kwargs)
3858
3859 KeyCode = GetKeyCode
bb4524c4
RD
3860 def GetUnicodeKey(*args, **kwargs):
3861 """GetUnicodeKey(self) -> int"""
3862 return _core_.KeyEvent_GetUnicodeKey(*args, **kwargs)
d55e5bfc 3863
bb4524c4 3864 GetUniChar = GetUnicodeKey
d55e5bfc
RD
3865 def GetRawKeyCode(*args, **kwargs):
3866 """GetRawKeyCode(self) -> unsigned int"""
3867 return _core_.KeyEvent_GetRawKeyCode(*args, **kwargs)
3868
3869 def GetRawKeyFlags(*args, **kwargs):
3870 """GetRawKeyFlags(self) -> unsigned int"""
3871 return _core_.KeyEvent_GetRawKeyFlags(*args, **kwargs)
3872
3873 def GetPosition(*args, **kwargs):
3874 """
3875 GetPosition(self) -> Point
3876
3877 Find the position of the event.
3878 """
3879 return _core_.KeyEvent_GetPosition(*args, **kwargs)
3880
3881 def GetPositionTuple(*args, **kwargs):
3882 """
3883 GetPositionTuple() -> (x,y)
3884
3885 Find the position of the event.
3886 """
3887 return _core_.KeyEvent_GetPositionTuple(*args, **kwargs)
3888
3889 def GetX(*args, **kwargs):
3890 """GetX(self) -> int"""
3891 return _core_.KeyEvent_GetX(*args, **kwargs)
3892
3893 def GetY(*args, **kwargs):
3894 """GetY(self) -> int"""
3895 return _core_.KeyEvent_GetY(*args, **kwargs)
3896
3897 m_x = property(_core_.KeyEvent_m_x_get, _core_.KeyEvent_m_x_set)
3898 m_y = property(_core_.KeyEvent_m_y_get, _core_.KeyEvent_m_y_set)
3899 m_keyCode = property(_core_.KeyEvent_m_keyCode_get, _core_.KeyEvent_m_keyCode_set)
3900 m_controlDown = property(_core_.KeyEvent_m_controlDown_get, _core_.KeyEvent_m_controlDown_set)
3901 m_shiftDown = property(_core_.KeyEvent_m_shiftDown_get, _core_.KeyEvent_m_shiftDown_set)
3902 m_altDown = property(_core_.KeyEvent_m_altDown_get, _core_.KeyEvent_m_altDown_set)
3903 m_metaDown = property(_core_.KeyEvent_m_metaDown_get, _core_.KeyEvent_m_metaDown_set)
3904 m_scanCode = property(_core_.KeyEvent_m_scanCode_get, _core_.KeyEvent_m_scanCode_set)
3905 m_rawCode = property(_core_.KeyEvent_m_rawCode_get, _core_.KeyEvent_m_rawCode_set)
3906 m_rawFlags = property(_core_.KeyEvent_m_rawFlags_get, _core_.KeyEvent_m_rawFlags_set)
3907
3908class KeyEventPtr(KeyEvent):
3909 def __init__(self, this):
3910 self.this = this
3911 if not hasattr(self,"thisown"): self.thisown = 0
3912 self.__class__ = KeyEvent
3913_core_.KeyEvent_swigregister(KeyEventPtr)
3914
3915#---------------------------------------------------------------------------
3916
3917class SizeEvent(Event):
36ed4f51 3918 """Proxy of C++ SizeEvent class"""
d55e5bfc
RD
3919 def __repr__(self):
3920 return "<%s.%s; proxy of C++ wxSizeEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
3921 def __init__(self, *args, **kwargs):
3922 """__init__(self, Size sz=DefaultSize, int winid=0) -> SizeEvent"""
3923 newobj = _core_.new_SizeEvent(*args, **kwargs)
3924 self.this = newobj.this
3925 self.thisown = 1
3926 del newobj.thisown
3927 def GetSize(*args, **kwargs):
3928 """GetSize(self) -> Size"""
3929 return _core_.SizeEvent_GetSize(*args, **kwargs)
3930
3931 def GetRect(*args, **kwargs):
3932 """GetRect(self) -> Rect"""
3933 return _core_.SizeEvent_GetRect(*args, **kwargs)
3934
3935 def SetRect(*args, **kwargs):
3936 """SetRect(self, Rect rect)"""
3937 return _core_.SizeEvent_SetRect(*args, **kwargs)
3938
3939 def SetSize(*args, **kwargs):
3940 """SetSize(self, Size size)"""
3941 return _core_.SizeEvent_SetSize(*args, **kwargs)
3942
3943 m_size = property(_core_.SizeEvent_m_size_get, _core_.SizeEvent_m_size_set)
3944 m_rect = property(_core_.SizeEvent_m_rect_get, _core_.SizeEvent_m_rect_set)
3945
3946class SizeEventPtr(SizeEvent):
3947 def __init__(self, this):
3948 self.this = this
3949 if not hasattr(self,"thisown"): self.thisown = 0
3950 self.__class__ = SizeEvent
3951_core_.SizeEvent_swigregister(SizeEventPtr)
3952
3953#---------------------------------------------------------------------------
3954
3955class MoveEvent(Event):
36ed4f51 3956 """Proxy of C++ MoveEvent class"""
d55e5bfc
RD
3957 def __repr__(self):
3958 return "<%s.%s; proxy of C++ wxMoveEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
3959 def __init__(self, *args, **kwargs):
3960 """__init__(self, Point pos=DefaultPosition, int winid=0) -> MoveEvent"""
3961 newobj = _core_.new_MoveEvent(*args, **kwargs)
3962 self.this = newobj.this
3963 self.thisown = 1
3964 del newobj.thisown
3965 def GetPosition(*args, **kwargs):
3966 """GetPosition(self) -> Point"""
3967 return _core_.MoveEvent_GetPosition(*args, **kwargs)
3968
3969 def GetRect(*args, **kwargs):
3970 """GetRect(self) -> Rect"""
3971 return _core_.MoveEvent_GetRect(*args, **kwargs)
3972
3973 def SetRect(*args, **kwargs):
3974 """SetRect(self, Rect rect)"""
3975 return _core_.MoveEvent_SetRect(*args, **kwargs)
3976
3977 def SetPosition(*args, **kwargs):
3978 """SetPosition(self, Point pos)"""
3979 return _core_.MoveEvent_SetPosition(*args, **kwargs)
3980
fef4c27a
RD
3981 m_pos = property(GetPosition, SetPosition)
3982 m_rect = property(GetRect, SetRect)
3983
d55e5bfc
RD
3984
3985class MoveEventPtr(MoveEvent):
3986 def __init__(self, this):
3987 self.this = this
3988 if not hasattr(self,"thisown"): self.thisown = 0
3989 self.__class__ = MoveEvent
3990_core_.MoveEvent_swigregister(MoveEventPtr)
3991
3992#---------------------------------------------------------------------------
3993
3994class PaintEvent(Event):
36ed4f51 3995 """Proxy of C++ PaintEvent class"""
d55e5bfc
RD
3996 def __repr__(self):
3997 return "<%s.%s; proxy of C++ wxPaintEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
3998 def __init__(self, *args, **kwargs):
3999 """__init__(self, int Id=0) -> PaintEvent"""
4000 newobj = _core_.new_PaintEvent(*args, **kwargs)
4001 self.this = newobj.this
4002 self.thisown = 1
4003 del newobj.thisown
4004
4005class PaintEventPtr(PaintEvent):
4006 def __init__(self, this):
4007 self.this = this
4008 if not hasattr(self,"thisown"): self.thisown = 0
4009 self.__class__ = PaintEvent
4010_core_.PaintEvent_swigregister(PaintEventPtr)
4011
4012class NcPaintEvent(Event):
36ed4f51 4013 """Proxy of C++ NcPaintEvent class"""
d55e5bfc
RD
4014 def __repr__(self):
4015 return "<%s.%s; proxy of C++ wxNcPaintEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
4016 def __init__(self, *args, **kwargs):
4017 """__init__(self, int winid=0) -> NcPaintEvent"""
4018 newobj = _core_.new_NcPaintEvent(*args, **kwargs)
4019 self.this = newobj.this
4020 self.thisown = 1
4021 del newobj.thisown
4022
4023class NcPaintEventPtr(NcPaintEvent):
4024 def __init__(self, this):
4025 self.this = this
4026 if not hasattr(self,"thisown"): self.thisown = 0
4027 self.__class__ = NcPaintEvent
4028_core_.NcPaintEvent_swigregister(NcPaintEventPtr)
4029
4030#---------------------------------------------------------------------------
4031
4032class EraseEvent(Event):
36ed4f51 4033 """Proxy of C++ EraseEvent class"""
d55e5bfc
RD
4034 def __repr__(self):
4035 return "<%s.%s; proxy of C++ wxEraseEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
4036 def __init__(self, *args, **kwargs):
4037 """__init__(self, int Id=0, DC dc=(wxDC *) NULL) -> EraseEvent"""
4038 newobj = _core_.new_EraseEvent(*args, **kwargs)
4039 self.this = newobj.this
4040 self.thisown = 1
4041 del newobj.thisown
4042 def GetDC(*args, **kwargs):
4043 """GetDC(self) -> DC"""
4044 return _core_.EraseEvent_GetDC(*args, **kwargs)
4045
4046
4047class EraseEventPtr(EraseEvent):
4048 def __init__(self, this):
4049 self.this = this
4050 if not hasattr(self,"thisown"): self.thisown = 0
4051 self.__class__ = EraseEvent
4052_core_.EraseEvent_swigregister(EraseEventPtr)
4053
4054#---------------------------------------------------------------------------
4055
4056class FocusEvent(Event):
36ed4f51 4057 """Proxy of C++ FocusEvent class"""
d55e5bfc
RD
4058 def __repr__(self):
4059 return "<%s.%s; proxy of C++ wxFocusEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
4060 def __init__(self, *args, **kwargs):
4061 """__init__(self, wxEventType type=wxEVT_NULL, int winid=0) -> FocusEvent"""
4062 newobj = _core_.new_FocusEvent(*args, **kwargs)
4063 self.this = newobj.this
4064 self.thisown = 1
4065 del newobj.thisown
4066 def GetWindow(*args, **kwargs):
4067 """GetWindow(self) -> Window"""
4068 return _core_.FocusEvent_GetWindow(*args, **kwargs)
4069
4070 def SetWindow(*args, **kwargs):
4071 """SetWindow(self, Window win)"""
4072 return _core_.FocusEvent_SetWindow(*args, **kwargs)
4073
4074
4075class FocusEventPtr(FocusEvent):
4076 def __init__(self, this):
4077 self.this = this
4078 if not hasattr(self,"thisown"): self.thisown = 0
4079 self.__class__ = FocusEvent
4080_core_.FocusEvent_swigregister(FocusEventPtr)
4081
4082#---------------------------------------------------------------------------
4083
4084class ChildFocusEvent(CommandEvent):
36ed4f51 4085 """Proxy of C++ ChildFocusEvent class"""
d55e5bfc
RD
4086 def __repr__(self):
4087 return "<%s.%s; proxy of C++ wxChildFocusEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
4088 def __init__(self, *args, **kwargs):
4089 """__init__(self, Window win=None) -> ChildFocusEvent"""
4090 newobj = _core_.new_ChildFocusEvent(*args, **kwargs)
4091 self.this = newobj.this
4092 self.thisown = 1
4093 del newobj.thisown
4094 def GetWindow(*args, **kwargs):
4095 """GetWindow(self) -> Window"""
4096 return _core_.ChildFocusEvent_GetWindow(*args, **kwargs)
4097
4098
4099class ChildFocusEventPtr(ChildFocusEvent):
4100 def __init__(self, this):
4101 self.this = this
4102 if not hasattr(self,"thisown"): self.thisown = 0
4103 self.__class__ = ChildFocusEvent
4104_core_.ChildFocusEvent_swigregister(ChildFocusEventPtr)
4105
4106#---------------------------------------------------------------------------
4107
4108class ActivateEvent(Event):
36ed4f51 4109 """Proxy of C++ ActivateEvent class"""
d55e5bfc
RD
4110 def __repr__(self):
4111 return "<%s.%s; proxy of C++ wxActivateEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
4112 def __init__(self, *args, **kwargs):
4113 """__init__(self, wxEventType type=wxEVT_NULL, bool active=True, int Id=0) -> ActivateEvent"""
4114 newobj = _core_.new_ActivateEvent(*args, **kwargs)
4115 self.this = newobj.this
4116 self.thisown = 1
4117 del newobj.thisown
4118 def GetActive(*args, **kwargs):
4119 """GetActive(self) -> bool"""
4120 return _core_.ActivateEvent_GetActive(*args, **kwargs)
4121
4122
4123class ActivateEventPtr(ActivateEvent):
4124 def __init__(self, this):
4125 self.this = this
4126 if not hasattr(self,"thisown"): self.thisown = 0
4127 self.__class__ = ActivateEvent
4128_core_.ActivateEvent_swigregister(ActivateEventPtr)
4129
4130#---------------------------------------------------------------------------
4131
4132class InitDialogEvent(Event):
36ed4f51 4133 """Proxy of C++ InitDialogEvent class"""
d55e5bfc
RD
4134 def __repr__(self):
4135 return "<%s.%s; proxy of C++ wxInitDialogEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
4136 def __init__(self, *args, **kwargs):
4137 """__init__(self, int Id=0) -> InitDialogEvent"""
4138 newobj = _core_.new_InitDialogEvent(*args, **kwargs)
4139 self.this = newobj.this
4140 self.thisown = 1
4141 del newobj.thisown
4142
4143class InitDialogEventPtr(InitDialogEvent):
4144 def __init__(self, this):
4145 self.this = this
4146 if not hasattr(self,"thisown"): self.thisown = 0
4147 self.__class__ = InitDialogEvent
4148_core_.InitDialogEvent_swigregister(InitDialogEventPtr)
4149
4150#---------------------------------------------------------------------------
4151
4152class MenuEvent(Event):
36ed4f51 4153 """Proxy of C++ MenuEvent class"""
d55e5bfc
RD
4154 def __repr__(self):
4155 return "<%s.%s; proxy of C++ wxMenuEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
4156 def __init__(self, *args, **kwargs):
4157 """__init__(self, wxEventType type=wxEVT_NULL, int winid=0, Menu menu=None) -> MenuEvent"""
4158 newobj = _core_.new_MenuEvent(*args, **kwargs)
4159 self.this = newobj.this
4160 self.thisown = 1
4161 del newobj.thisown
4162 def GetMenuId(*args, **kwargs):
4163 """GetMenuId(self) -> int"""
4164 return _core_.MenuEvent_GetMenuId(*args, **kwargs)
4165
4166 def IsPopup(*args, **kwargs):
4167 """IsPopup(self) -> bool"""
4168 return _core_.MenuEvent_IsPopup(*args, **kwargs)
4169
4170 def GetMenu(*args, **kwargs):
4171 """GetMenu(self) -> Menu"""
4172 return _core_.MenuEvent_GetMenu(*args, **kwargs)
4173
4174
4175class MenuEventPtr(MenuEvent):
4176 def __init__(self, this):
4177 self.this = this
4178 if not hasattr(self,"thisown"): self.thisown = 0
4179 self.__class__ = MenuEvent
4180_core_.MenuEvent_swigregister(MenuEventPtr)
4181
4182#---------------------------------------------------------------------------
4183
4184class CloseEvent(Event):
36ed4f51 4185 """Proxy of C++ CloseEvent class"""
d55e5bfc
RD
4186 def __repr__(self):
4187 return "<%s.%s; proxy of C++ wxCloseEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
4188 def __init__(self, *args, **kwargs):
4189 """__init__(self, wxEventType type=wxEVT_NULL, int winid=0) -> CloseEvent"""
4190 newobj = _core_.new_CloseEvent(*args, **kwargs)
4191 self.this = newobj.this
4192 self.thisown = 1
4193 del newobj.thisown
4194 def SetLoggingOff(*args, **kwargs):
4195 """SetLoggingOff(self, bool logOff)"""
4196 return _core_.CloseEvent_SetLoggingOff(*args, **kwargs)
4197
4198 def GetLoggingOff(*args, **kwargs):
4199 """GetLoggingOff(self) -> bool"""
4200 return _core_.CloseEvent_GetLoggingOff(*args, **kwargs)
4201
4202 def Veto(*args, **kwargs):
4203 """Veto(self, bool veto=True)"""
4204 return _core_.CloseEvent_Veto(*args, **kwargs)
4205
4206 def SetCanVeto(*args, **kwargs):
4207 """SetCanVeto(self, bool canVeto)"""
4208 return _core_.CloseEvent_SetCanVeto(*args, **kwargs)
4209
4210 def CanVeto(*args, **kwargs):
4211 """CanVeto(self) -> bool"""
4212 return _core_.CloseEvent_CanVeto(*args, **kwargs)
4213
4214 def GetVeto(*args, **kwargs):
4215 """GetVeto(self) -> bool"""
4216 return _core_.CloseEvent_GetVeto(*args, **kwargs)
4217
4218
4219class CloseEventPtr(CloseEvent):
4220 def __init__(self, this):
4221 self.this = this
4222 if not hasattr(self,"thisown"): self.thisown = 0
4223 self.__class__ = CloseEvent
4224_core_.CloseEvent_swigregister(CloseEventPtr)
4225
4226#---------------------------------------------------------------------------
4227
4228class ShowEvent(Event):
36ed4f51 4229 """Proxy of C++ ShowEvent class"""
d55e5bfc
RD
4230 def __repr__(self):
4231 return "<%s.%s; proxy of C++ wxShowEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
4232 def __init__(self, *args, **kwargs):
4233 """__init__(self, int winid=0, bool show=False) -> ShowEvent"""
4234 newobj = _core_.new_ShowEvent(*args, **kwargs)
4235 self.this = newobj.this
4236 self.thisown = 1
4237 del newobj.thisown
4238 def SetShow(*args, **kwargs):
4239 """SetShow(self, bool show)"""
4240 return _core_.ShowEvent_SetShow(*args, **kwargs)
4241
4242 def GetShow(*args, **kwargs):
4243 """GetShow(self) -> bool"""
4244 return _core_.ShowEvent_GetShow(*args, **kwargs)
4245
4246
4247class ShowEventPtr(ShowEvent):
4248 def __init__(self, this):
4249 self.this = this
4250 if not hasattr(self,"thisown"): self.thisown = 0
4251 self.__class__ = ShowEvent
4252_core_.ShowEvent_swigregister(ShowEventPtr)
4253
4254#---------------------------------------------------------------------------
4255
4256class IconizeEvent(Event):
36ed4f51 4257 """Proxy of C++ IconizeEvent class"""
d55e5bfc
RD
4258 def __repr__(self):
4259 return "<%s.%s; proxy of C++ wxIconizeEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
4260 def __init__(self, *args, **kwargs):
4261 """__init__(self, int id=0, bool iconized=True) -> IconizeEvent"""
4262 newobj = _core_.new_IconizeEvent(*args, **kwargs)
4263 self.this = newobj.this
4264 self.thisown = 1
4265 del newobj.thisown
4266 def Iconized(*args, **kwargs):
4267 """Iconized(self) -> bool"""
4268 return _core_.IconizeEvent_Iconized(*args, **kwargs)
4269
4270
4271class IconizeEventPtr(IconizeEvent):
4272 def __init__(self, this):
4273 self.this = this
4274 if not hasattr(self,"thisown"): self.thisown = 0
4275 self.__class__ = IconizeEvent
4276_core_.IconizeEvent_swigregister(IconizeEventPtr)
4277
4278#---------------------------------------------------------------------------
4279
4280class MaximizeEvent(Event):
36ed4f51 4281 """Proxy of C++ MaximizeEvent class"""
d55e5bfc
RD
4282 def __repr__(self):
4283 return "<%s.%s; proxy of C++ wxMaximizeEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
4284 def __init__(self, *args, **kwargs):
4285 """__init__(self, int id=0) -> MaximizeEvent"""
4286 newobj = _core_.new_MaximizeEvent(*args, **kwargs)
4287 self.this = newobj.this
4288 self.thisown = 1
4289 del newobj.thisown
4290
4291class MaximizeEventPtr(MaximizeEvent):
4292 def __init__(self, this):
4293 self.this = this
4294 if not hasattr(self,"thisown"): self.thisown = 0
4295 self.__class__ = MaximizeEvent
4296_core_.MaximizeEvent_swigregister(MaximizeEventPtr)
4297
4298#---------------------------------------------------------------------------
4299
4300class DropFilesEvent(Event):
36ed4f51 4301 """Proxy of C++ DropFilesEvent class"""
d55e5bfc
RD
4302 def __init__(self): raise RuntimeError, "No constructor defined"
4303 def __repr__(self):
4304 return "<%s.%s; proxy of C++ wxDropFilesEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
4305 def GetPosition(*args, **kwargs):
4306 """GetPosition(self) -> Point"""
4307 return _core_.DropFilesEvent_GetPosition(*args, **kwargs)
4308
4309 def GetNumberOfFiles(*args, **kwargs):
4310 """GetNumberOfFiles(self) -> int"""
4311 return _core_.DropFilesEvent_GetNumberOfFiles(*args, **kwargs)
4312
4313 def GetFiles(*args, **kwargs):
4314 """GetFiles(self) -> PyObject"""
4315 return _core_.DropFilesEvent_GetFiles(*args, **kwargs)
4316
4317
4318class DropFilesEventPtr(DropFilesEvent):
4319 def __init__(self, this):
4320 self.this = this
4321 if not hasattr(self,"thisown"): self.thisown = 0
4322 self.__class__ = DropFilesEvent
4323_core_.DropFilesEvent_swigregister(DropFilesEventPtr)
4324
4325#---------------------------------------------------------------------------
4326
4327UPDATE_UI_PROCESS_ALL = _core_.UPDATE_UI_PROCESS_ALL
4328UPDATE_UI_PROCESS_SPECIFIED = _core_.UPDATE_UI_PROCESS_SPECIFIED
4329class UpdateUIEvent(CommandEvent):
36ed4f51 4330 """Proxy of C++ UpdateUIEvent class"""
d55e5bfc
RD
4331 def __repr__(self):
4332 return "<%s.%s; proxy of C++ wxUpdateUIEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
4333 def __init__(self, *args, **kwargs):
4334 """__init__(self, int commandId=0) -> UpdateUIEvent"""
4335 newobj = _core_.new_UpdateUIEvent(*args, **kwargs)
4336 self.this = newobj.this
4337 self.thisown = 1
4338 del newobj.thisown
4339 def GetChecked(*args, **kwargs):
4340 """GetChecked(self) -> bool"""
4341 return _core_.UpdateUIEvent_GetChecked(*args, **kwargs)
4342
4343 def GetEnabled(*args, **kwargs):
4344 """GetEnabled(self) -> bool"""
4345 return _core_.UpdateUIEvent_GetEnabled(*args, **kwargs)
4346
4347 def GetText(*args, **kwargs):
4348 """GetText(self) -> String"""
4349 return _core_.UpdateUIEvent_GetText(*args, **kwargs)
4350
4351 def GetSetText(*args, **kwargs):
4352 """GetSetText(self) -> bool"""
4353 return _core_.UpdateUIEvent_GetSetText(*args, **kwargs)
4354
4355 def GetSetChecked(*args, **kwargs):
4356 """GetSetChecked(self) -> bool"""
4357 return _core_.UpdateUIEvent_GetSetChecked(*args, **kwargs)
4358
4359 def GetSetEnabled(*args, **kwargs):
4360 """GetSetEnabled(self) -> bool"""
4361 return _core_.UpdateUIEvent_GetSetEnabled(*args, **kwargs)
4362
4363 def Check(*args, **kwargs):
4364 """Check(self, bool check)"""
4365 return _core_.UpdateUIEvent_Check(*args, **kwargs)
4366
4367 def Enable(*args, **kwargs):
4368 """Enable(self, bool enable)"""
4369 return _core_.UpdateUIEvent_Enable(*args, **kwargs)
4370
4371 def SetText(*args, **kwargs):
4372 """SetText(self, String text)"""
4373 return _core_.UpdateUIEvent_SetText(*args, **kwargs)
4374
4375 def SetUpdateInterval(*args, **kwargs):
d6c14a4c 4376 """SetUpdateInterval(long updateInterval)"""
d55e5bfc
RD
4377 return _core_.UpdateUIEvent_SetUpdateInterval(*args, **kwargs)
4378
4379 SetUpdateInterval = staticmethod(SetUpdateInterval)
4380 def GetUpdateInterval(*args, **kwargs):
d6c14a4c 4381 """GetUpdateInterval() -> long"""
d55e5bfc
RD
4382 return _core_.UpdateUIEvent_GetUpdateInterval(*args, **kwargs)
4383
4384 GetUpdateInterval = staticmethod(GetUpdateInterval)
4385 def CanUpdate(*args, **kwargs):
d6c14a4c 4386 """CanUpdate(Window win) -> bool"""
d55e5bfc
RD
4387 return _core_.UpdateUIEvent_CanUpdate(*args, **kwargs)
4388
4389 CanUpdate = staticmethod(CanUpdate)
4390 def ResetUpdateTime(*args, **kwargs):
d6c14a4c 4391 """ResetUpdateTime()"""
d55e5bfc
RD
4392 return _core_.UpdateUIEvent_ResetUpdateTime(*args, **kwargs)
4393
4394 ResetUpdateTime = staticmethod(ResetUpdateTime)
4395 def SetMode(*args, **kwargs):
d6c14a4c 4396 """SetMode(int mode)"""
d55e5bfc
RD
4397 return _core_.UpdateUIEvent_SetMode(*args, **kwargs)
4398
4399 SetMode = staticmethod(SetMode)
4400 def GetMode(*args, **kwargs):
d6c14a4c 4401 """GetMode() -> int"""
d55e5bfc
RD
4402 return _core_.UpdateUIEvent_GetMode(*args, **kwargs)
4403
4404 GetMode = staticmethod(GetMode)
4405
4406class UpdateUIEventPtr(UpdateUIEvent):
4407 def __init__(self, this):
4408 self.this = this
4409 if not hasattr(self,"thisown"): self.thisown = 0
4410 self.__class__ = UpdateUIEvent
4411_core_.UpdateUIEvent_swigregister(UpdateUIEventPtr)
4412
4413def UpdateUIEvent_SetUpdateInterval(*args, **kwargs):
4414 """UpdateUIEvent_SetUpdateInterval(long updateInterval)"""
4415 return _core_.UpdateUIEvent_SetUpdateInterval(*args, **kwargs)
4416
4417def UpdateUIEvent_GetUpdateInterval(*args, **kwargs):
4418 """UpdateUIEvent_GetUpdateInterval() -> long"""
4419 return _core_.UpdateUIEvent_GetUpdateInterval(*args, **kwargs)
4420
4421def UpdateUIEvent_CanUpdate(*args, **kwargs):
4422 """UpdateUIEvent_CanUpdate(Window win) -> bool"""
4423 return _core_.UpdateUIEvent_CanUpdate(*args, **kwargs)
4424
4425def UpdateUIEvent_ResetUpdateTime(*args, **kwargs):
4426 """UpdateUIEvent_ResetUpdateTime()"""
4427 return _core_.UpdateUIEvent_ResetUpdateTime(*args, **kwargs)
4428
4429def UpdateUIEvent_SetMode(*args, **kwargs):
4430 """UpdateUIEvent_SetMode(int mode)"""
4431 return _core_.UpdateUIEvent_SetMode(*args, **kwargs)
4432
4433def UpdateUIEvent_GetMode(*args, **kwargs):
4434 """UpdateUIEvent_GetMode() -> int"""
4435 return _core_.UpdateUIEvent_GetMode(*args, **kwargs)
4436
4437#---------------------------------------------------------------------------
4438
4439class SysColourChangedEvent(Event):
36ed4f51 4440 """Proxy of C++ SysColourChangedEvent class"""
d55e5bfc
RD
4441 def __repr__(self):
4442 return "<%s.%s; proxy of C++ wxSysColourChangedEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
4443 def __init__(self, *args, **kwargs):
4444 """__init__(self) -> SysColourChangedEvent"""
4445 newobj = _core_.new_SysColourChangedEvent(*args, **kwargs)
4446 self.this = newobj.this
4447 self.thisown = 1
4448 del newobj.thisown
4449
4450class SysColourChangedEventPtr(SysColourChangedEvent):
4451 def __init__(self, this):
4452 self.this = this
4453 if not hasattr(self,"thisown"): self.thisown = 0
4454 self.__class__ = SysColourChangedEvent
4455_core_.SysColourChangedEvent_swigregister(SysColourChangedEventPtr)
4456
4457#---------------------------------------------------------------------------
4458
4459class MouseCaptureChangedEvent(Event):
36ed4f51 4460 """Proxy of C++ MouseCaptureChangedEvent class"""
d55e5bfc
RD
4461 def __repr__(self):
4462 return "<%s.%s; proxy of C++ wxMouseCaptureChangedEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
4463 def __init__(self, *args, **kwargs):
4464 """__init__(self, int winid=0, Window gainedCapture=None) -> MouseCaptureChangedEvent"""
4465 newobj = _core_.new_MouseCaptureChangedEvent(*args, **kwargs)
4466 self.this = newobj.this
4467 self.thisown = 1
4468 del newobj.thisown
4469 def GetCapturedWindow(*args, **kwargs):
4470 """GetCapturedWindow(self) -> Window"""
4471 return _core_.MouseCaptureChangedEvent_GetCapturedWindow(*args, **kwargs)
4472
4473
4474class MouseCaptureChangedEventPtr(MouseCaptureChangedEvent):
4475 def __init__(self, this):
4476 self.this = this
4477 if not hasattr(self,"thisown"): self.thisown = 0
4478 self.__class__ = MouseCaptureChangedEvent
4479_core_.MouseCaptureChangedEvent_swigregister(MouseCaptureChangedEventPtr)
4480
4481#---------------------------------------------------------------------------
4482
4483class DisplayChangedEvent(Event):
36ed4f51 4484 """Proxy of C++ DisplayChangedEvent class"""
d55e5bfc
RD
4485 def __repr__(self):
4486 return "<%s.%s; proxy of C++ wxDisplayChangedEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
4487 def __init__(self, *args, **kwargs):
4488 """__init__(self) -> DisplayChangedEvent"""
4489 newobj = _core_.new_DisplayChangedEvent(*args, **kwargs)
4490 self.this = newobj.this
4491 self.thisown = 1
4492 del newobj.thisown
4493
4494class DisplayChangedEventPtr(DisplayChangedEvent):
4495 def __init__(self, this):
4496 self.this = this
4497 if not hasattr(self,"thisown"): self.thisown = 0
4498 self.__class__ = DisplayChangedEvent
4499_core_.DisplayChangedEvent_swigregister(DisplayChangedEventPtr)
4500
4501#---------------------------------------------------------------------------
4502
4503class PaletteChangedEvent(Event):
36ed4f51 4504 """Proxy of C++ PaletteChangedEvent class"""
d55e5bfc
RD
4505 def __repr__(self):
4506 return "<%s.%s; proxy of C++ wxPaletteChangedEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
4507 def __init__(self, *args, **kwargs):
4508 """__init__(self, int id=0) -> PaletteChangedEvent"""
4509 newobj = _core_.new_PaletteChangedEvent(*args, **kwargs)
4510 self.this = newobj.this
4511 self.thisown = 1
4512 del newobj.thisown
4513 def SetChangedWindow(*args, **kwargs):
4514 """SetChangedWindow(self, Window win)"""
4515 return _core_.PaletteChangedEvent_SetChangedWindow(*args, **kwargs)
4516
4517 def GetChangedWindow(*args, **kwargs):
4518 """GetChangedWindow(self) -> Window"""
4519 return _core_.PaletteChangedEvent_GetChangedWindow(*args, **kwargs)
4520
4521
4522class PaletteChangedEventPtr(PaletteChangedEvent):
4523 def __init__(self, this):
4524 self.this = this
4525 if not hasattr(self,"thisown"): self.thisown = 0
4526 self.__class__ = PaletteChangedEvent
4527_core_.PaletteChangedEvent_swigregister(PaletteChangedEventPtr)
4528
4529#---------------------------------------------------------------------------
4530
4531class QueryNewPaletteEvent(Event):
36ed4f51 4532 """Proxy of C++ QueryNewPaletteEvent class"""
d55e5bfc
RD
4533 def __repr__(self):
4534 return "<%s.%s; proxy of C++ wxQueryNewPaletteEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
4535 def __init__(self, *args, **kwargs):
4536 """__init__(self, int winid=0) -> QueryNewPaletteEvent"""
4537 newobj = _core_.new_QueryNewPaletteEvent(*args, **kwargs)
4538 self.this = newobj.this
4539 self.thisown = 1
4540 del newobj.thisown
4541 def SetPaletteRealized(*args, **kwargs):
4542 """SetPaletteRealized(self, bool realized)"""
4543 return _core_.QueryNewPaletteEvent_SetPaletteRealized(*args, **kwargs)
4544
4545 def GetPaletteRealized(*args, **kwargs):
4546 """GetPaletteRealized(self) -> bool"""
4547 return _core_.QueryNewPaletteEvent_GetPaletteRealized(*args, **kwargs)
4548
4549
4550class QueryNewPaletteEventPtr(QueryNewPaletteEvent):
4551 def __init__(self, this):
4552 self.this = this
4553 if not hasattr(self,"thisown"): self.thisown = 0
4554 self.__class__ = QueryNewPaletteEvent
4555_core_.QueryNewPaletteEvent_swigregister(QueryNewPaletteEventPtr)
4556
4557#---------------------------------------------------------------------------
4558
4559class NavigationKeyEvent(Event):
36ed4f51 4560 """Proxy of C++ NavigationKeyEvent class"""
d55e5bfc
RD
4561 def __repr__(self):
4562 return "<%s.%s; proxy of C++ wxNavigationKeyEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
4563 def __init__(self, *args, **kwargs):
4564 """__init__(self) -> NavigationKeyEvent"""
4565 newobj = _core_.new_NavigationKeyEvent(*args, **kwargs)
4566 self.this = newobj.this
4567 self.thisown = 1
4568 del newobj.thisown
4569 def GetDirection(*args, **kwargs):
4570 """GetDirection(self) -> bool"""
4571 return _core_.NavigationKeyEvent_GetDirection(*args, **kwargs)
4572
4573 def SetDirection(*args, **kwargs):
908b74cd 4574 """SetDirection(self, bool forward)"""
d55e5bfc
RD
4575 return _core_.NavigationKeyEvent_SetDirection(*args, **kwargs)
4576
4577 def IsWindowChange(*args, **kwargs):
4578 """IsWindowChange(self) -> bool"""
4579 return _core_.NavigationKeyEvent_IsWindowChange(*args, **kwargs)
4580
4581 def SetWindowChange(*args, **kwargs):
908b74cd 4582 """SetWindowChange(self, bool ischange)"""
d55e5bfc
RD
4583 return _core_.NavigationKeyEvent_SetWindowChange(*args, **kwargs)
4584
68350608
RD
4585 def IsFromTab(*args, **kwargs):
4586 """IsFromTab(self) -> bool"""
4587 return _core_.NavigationKeyEvent_IsFromTab(*args, **kwargs)
4588
4589 def SetFromTab(*args, **kwargs):
4590 """SetFromTab(self, bool bIs)"""
4591 return _core_.NavigationKeyEvent_SetFromTab(*args, **kwargs)
4592
908b74cd
RD
4593 def SetFlags(*args, **kwargs):
4594 """SetFlags(self, long flags)"""
4595 return _core_.NavigationKeyEvent_SetFlags(*args, **kwargs)
4596
d55e5bfc
RD
4597 def GetCurrentFocus(*args, **kwargs):
4598 """GetCurrentFocus(self) -> Window"""
4599 return _core_.NavigationKeyEvent_GetCurrentFocus(*args, **kwargs)
4600
4601 def SetCurrentFocus(*args, **kwargs):
4602 """SetCurrentFocus(self, Window win)"""
4603 return _core_.NavigationKeyEvent_SetCurrentFocus(*args, **kwargs)
4604
92379a03 4605 IsBackward = _core_.NavigationKeyEvent_IsBackward
908b74cd
RD
4606 IsForward = _core_.NavigationKeyEvent_IsForward
4607 WinChange = _core_.NavigationKeyEvent_WinChange
68350608 4608 FromTab = _core_.NavigationKeyEvent_FromTab
d55e5bfc
RD
4609
4610class NavigationKeyEventPtr(NavigationKeyEvent):
4611 def __init__(self, this):
4612 self.this = this
4613 if not hasattr(self,"thisown"): self.thisown = 0
4614 self.__class__ = NavigationKeyEvent
4615_core_.NavigationKeyEvent_swigregister(NavigationKeyEventPtr)
4616
4617#---------------------------------------------------------------------------
4618
4619class WindowCreateEvent(CommandEvent):
36ed4f51 4620 """Proxy of C++ WindowCreateEvent class"""
d55e5bfc
RD
4621 def __repr__(self):
4622 return "<%s.%s; proxy of C++ wxWindowCreateEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
4623 def __init__(self, *args, **kwargs):
4624 """__init__(self, Window win=None) -> WindowCreateEvent"""
4625 newobj = _core_.new_WindowCreateEvent(*args, **kwargs)
4626 self.this = newobj.this
4627 self.thisown = 1
4628 del newobj.thisown
4629 def GetWindow(*args, **kwargs):
4630 """GetWindow(self) -> Window"""
4631 return _core_.WindowCreateEvent_GetWindow(*args, **kwargs)
4632
4633
4634class WindowCreateEventPtr(WindowCreateEvent):
4635 def __init__(self, this):
4636 self.this = this
4637 if not hasattr(self,"thisown"): self.thisown = 0
4638 self.__class__ = WindowCreateEvent
4639_core_.WindowCreateEvent_swigregister(WindowCreateEventPtr)
4640
4641class WindowDestroyEvent(CommandEvent):
36ed4f51 4642 """Proxy of C++ WindowDestroyEvent class"""
d55e5bfc
RD
4643 def __repr__(self):
4644 return "<%s.%s; proxy of C++ wxWindowDestroyEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
4645 def __init__(self, *args, **kwargs):
4646 """__init__(self, Window win=None) -> WindowDestroyEvent"""
4647 newobj = _core_.new_WindowDestroyEvent(*args, **kwargs)
4648 self.this = newobj.this
4649 self.thisown = 1
4650 del newobj.thisown
4651 def GetWindow(*args, **kwargs):
4652 """GetWindow(self) -> Window"""
4653 return _core_.WindowDestroyEvent_GetWindow(*args, **kwargs)
4654
4655
4656class WindowDestroyEventPtr(WindowDestroyEvent):
4657 def __init__(self, this):
4658 self.this = this
4659 if not hasattr(self,"thisown"): self.thisown = 0
4660 self.__class__ = WindowDestroyEvent
4661_core_.WindowDestroyEvent_swigregister(WindowDestroyEventPtr)
4662
4663#---------------------------------------------------------------------------
4664
4665class ContextMenuEvent(CommandEvent):
36ed4f51 4666 """Proxy of C++ ContextMenuEvent class"""
d55e5bfc
RD
4667 def __repr__(self):
4668 return "<%s.%s; proxy of C++ wxContextMenuEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
4669 def __init__(self, *args, **kwargs):
4670 """__init__(self, wxEventType type=wxEVT_NULL, int winid=0, Point pt=DefaultPosition) -> ContextMenuEvent"""
4671 newobj = _core_.new_ContextMenuEvent(*args, **kwargs)
4672 self.this = newobj.this
4673 self.thisown = 1
4674 del newobj.thisown
4675 def GetPosition(*args, **kwargs):
4676 """GetPosition(self) -> Point"""
4677 return _core_.ContextMenuEvent_GetPosition(*args, **kwargs)
4678
4679 def SetPosition(*args, **kwargs):
4680 """SetPosition(self, Point pos)"""
4681 return _core_.ContextMenuEvent_SetPosition(*args, **kwargs)
4682
4683
4684class ContextMenuEventPtr(ContextMenuEvent):
4685 def __init__(self, this):
4686 self.this = this
4687 if not hasattr(self,"thisown"): self.thisown = 0
4688 self.__class__ = ContextMenuEvent
4689_core_.ContextMenuEvent_swigregister(ContextMenuEventPtr)
4690
4691#---------------------------------------------------------------------------
4692
4693IDLE_PROCESS_ALL = _core_.IDLE_PROCESS_ALL
4694IDLE_PROCESS_SPECIFIED = _core_.IDLE_PROCESS_SPECIFIED
4695class IdleEvent(Event):
36ed4f51 4696 """Proxy of C++ IdleEvent class"""
d55e5bfc
RD
4697 def __repr__(self):
4698 return "<%s.%s; proxy of C++ wxIdleEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
4699 def __init__(self, *args, **kwargs):
4700 """__init__(self) -> IdleEvent"""
4701 newobj = _core_.new_IdleEvent(*args, **kwargs)
4702 self.this = newobj.this
4703 self.thisown = 1
4704 del newobj.thisown
4705 def RequestMore(*args, **kwargs):
4706 """RequestMore(self, bool needMore=True)"""
4707 return _core_.IdleEvent_RequestMore(*args, **kwargs)
4708
4709 def MoreRequested(*args, **kwargs):
4710 """MoreRequested(self) -> bool"""
4711 return _core_.IdleEvent_MoreRequested(*args, **kwargs)
4712
4713 def SetMode(*args, **kwargs):
d6c14a4c 4714 """SetMode(int mode)"""
d55e5bfc
RD
4715 return _core_.IdleEvent_SetMode(*args, **kwargs)
4716
4717 SetMode = staticmethod(SetMode)
4718 def GetMode(*args, **kwargs):
d6c14a4c 4719 """GetMode() -> int"""
d55e5bfc
RD
4720 return _core_.IdleEvent_GetMode(*args, **kwargs)
4721
4722 GetMode = staticmethod(GetMode)
4723 def CanSend(*args, **kwargs):
d6c14a4c 4724 """CanSend(Window win) -> bool"""
d55e5bfc
RD
4725 return _core_.IdleEvent_CanSend(*args, **kwargs)
4726
4727 CanSend = staticmethod(CanSend)
4728
4729class IdleEventPtr(IdleEvent):
4730 def __init__(self, this):
4731 self.this = this
4732 if not hasattr(self,"thisown"): self.thisown = 0
4733 self.__class__ = IdleEvent
4734_core_.IdleEvent_swigregister(IdleEventPtr)
4735
4736def IdleEvent_SetMode(*args, **kwargs):
4737 """IdleEvent_SetMode(int mode)"""
4738 return _core_.IdleEvent_SetMode(*args, **kwargs)
4739
4740def IdleEvent_GetMode(*args, **kwargs):
4741 """IdleEvent_GetMode() -> int"""
4742 return _core_.IdleEvent_GetMode(*args, **kwargs)
4743
4744def IdleEvent_CanSend(*args, **kwargs):
4745 """IdleEvent_CanSend(Window win) -> bool"""
4746 return _core_.IdleEvent_CanSend(*args, **kwargs)
4747
4748#---------------------------------------------------------------------------
4749
4750class PyEvent(Event):
36ed4f51 4751 """Proxy of C++ PyEvent class"""
d55e5bfc
RD
4752 def __repr__(self):
4753 return "<%s.%s; proxy of C++ wxPyEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
4754 def __init__(self, *args, **kwargs):
4755 """__init__(self, int winid=0, wxEventType commandType=wxEVT_NULL) -> PyEvent"""
4756 newobj = _core_.new_PyEvent(*args, **kwargs)
4757 self.this = newobj.this
4758 self.thisown = 1
4759 del newobj.thisown
4760 self.SetSelf(self)
4761
4762 def __del__(self, destroy=_core_.delete_PyEvent):
4763 """__del__(self)"""
4764 try:
4765 if self.thisown: destroy(self)
4766 except: pass
4767
4768 def SetSelf(*args, **kwargs):
4769 """SetSelf(self, PyObject self)"""
4770 return _core_.PyEvent_SetSelf(*args, **kwargs)
4771
4772 def GetSelf(*args, **kwargs):
4773 """GetSelf(self) -> PyObject"""
4774 return _core_.PyEvent_GetSelf(*args, **kwargs)
4775
4776
4777class PyEventPtr(PyEvent):
4778 def __init__(self, this):
4779 self.this = this
4780 if not hasattr(self,"thisown"): self.thisown = 0
4781 self.__class__ = PyEvent
4782_core_.PyEvent_swigregister(PyEventPtr)
4783
4784class PyCommandEvent(CommandEvent):
36ed4f51 4785 """Proxy of C++ PyCommandEvent class"""
d55e5bfc
RD
4786 def __repr__(self):
4787 return "<%s.%s; proxy of C++ wxPyCommandEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
4788 def __init__(self, *args, **kwargs):
4789 """__init__(self, wxEventType commandType=wxEVT_NULL, int id=0) -> PyCommandEvent"""
4790 newobj = _core_.new_PyCommandEvent(*args, **kwargs)
4791 self.this = newobj.this
4792 self.thisown = 1
4793 del newobj.thisown
4794 self.SetSelf(self)
4795
4796 def __del__(self, destroy=_core_.delete_PyCommandEvent):
4797 """__del__(self)"""
4798 try:
4799 if self.thisown: destroy(self)
4800 except: pass
4801
4802 def SetSelf(*args, **kwargs):
4803 """SetSelf(self, PyObject self)"""
4804 return _core_.PyCommandEvent_SetSelf(*args, **kwargs)
4805
4806 def GetSelf(*args, **kwargs):
4807 """GetSelf(self) -> PyObject"""
4808 return _core_.PyCommandEvent_GetSelf(*args, **kwargs)
4809
4810
4811class PyCommandEventPtr(PyCommandEvent):
4812 def __init__(self, this):
4813 self.this = this
4814 if not hasattr(self,"thisown"): self.thisown = 0
4815 self.__class__ = PyCommandEvent
4816_core_.PyCommandEvent_swigregister(PyCommandEventPtr)
4817
53aa7709
RD
4818class DateEvent(CommandEvent):
4819 """Proxy of C++ DateEvent class"""
4820 def __repr__(self):
4821 return "<%s.%s; proxy of C++ wxDateEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
4822 def __init__(self, *args, **kwargs):
4823 """__init__(self, Window win, DateTime dt, wxEventType type) -> DateEvent"""
4824 newobj = _core_.new_DateEvent(*args, **kwargs)
4825 self.this = newobj.this
4826 self.thisown = 1
4827 del newobj.thisown
4828 def GetDate(*args, **kwargs):
4829 """GetDate(self) -> DateTime"""
4830 return _core_.DateEvent_GetDate(*args, **kwargs)
4831
4832 def SetDate(*args, **kwargs):
4833 """SetDate(self, DateTime date)"""
4834 return _core_.DateEvent_SetDate(*args, **kwargs)
4835
4836
4837class DateEventPtr(DateEvent):
4838 def __init__(self, this):
4839 self.this = this
4840 if not hasattr(self,"thisown"): self.thisown = 0
4841 self.__class__ = DateEvent
4842_core_.DateEvent_swigregister(DateEventPtr)
4843
4844wxEVT_DATE_CHANGED = _core_.wxEVT_DATE_CHANGED
4845EVT_DATE_CHANGED = wx.PyEventBinder( wxEVT_DATE_CHANGED, 1 )
4846
d55e5bfc
RD
4847#---------------------------------------------------------------------------
4848
4849PYAPP_ASSERT_SUPPRESS = _core_.PYAPP_ASSERT_SUPPRESS
4850PYAPP_ASSERT_EXCEPTION = _core_.PYAPP_ASSERT_EXCEPTION
4851PYAPP_ASSERT_DIALOG = _core_.PYAPP_ASSERT_DIALOG
4852PYAPP_ASSERT_LOG = _core_.PYAPP_ASSERT_LOG
4853PRINT_WINDOWS = _core_.PRINT_WINDOWS
4854PRINT_POSTSCRIPT = _core_.PRINT_POSTSCRIPT
4855class PyApp(EvtHandler):
d6c14a4c
RD
4856 """
4857 The ``wx.PyApp`` class is an *implementation detail*, please use the
4858 `wx.App` class (or some other derived class) instead.
4859 """
d55e5bfc
RD
4860 def __repr__(self):
4861 return "<%s.%s; proxy of C++ wxPyApp instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
4862 def __init__(self, *args, **kwargs):
4863 """
4864 __init__(self) -> PyApp
4865
4866 Create a new application object, starting the bootstrap process.
4867 """
4868 newobj = _core_.new_PyApp(*args, **kwargs)
4869 self.this = newobj.this
4870 self.thisown = 1
4871 del newobj.thisown
4872 self._setCallbackInfo(self, PyApp)
4873 self._setOORInfo(self)
4874
4875 def __del__(self, destroy=_core_.delete_PyApp):
4876 """__del__(self)"""
4877 try:
4878 if self.thisown: destroy(self)
4879 except: pass
4880
4881 def _setCallbackInfo(*args, **kwargs):
4882 """_setCallbackInfo(self, PyObject self, PyObject _class)"""
4883 return _core_.PyApp__setCallbackInfo(*args, **kwargs)
4884
4885 def GetAppName(*args, **kwargs):
4886 """
4887 GetAppName(self) -> String
4888
4889 Get the application name.
4890 """
4891 return _core_.PyApp_GetAppName(*args, **kwargs)
4892
4893 def SetAppName(*args, **kwargs):
4894 """
4895 SetAppName(self, String name)
4896
d6c14a4c
RD
4897 Set the application name. This value may be used automatically by
4898 `wx.Config` and such.
d55e5bfc
RD
4899 """
4900 return _core_.PyApp_SetAppName(*args, **kwargs)
4901
4902 def GetClassName(*args, **kwargs):
4903 """
4904 GetClassName(self) -> String
4905
4906 Get the application's class name.
4907 """
4908 return _core_.PyApp_GetClassName(*args, **kwargs)
4909
4910 def SetClassName(*args, **kwargs):
4911 """
4912 SetClassName(self, String name)
4913
d6c14a4c
RD
4914 Set the application's class name. This value may be used for
4915 X-resources if applicable for the platform
d55e5bfc
RD
4916 """
4917 return _core_.PyApp_SetClassName(*args, **kwargs)
4918
4919 def GetVendorName(*args, **kwargs):
4920 """
4921 GetVendorName(self) -> String
4922
4923 Get the application's vendor name.
4924 """
4925 return _core_.PyApp_GetVendorName(*args, **kwargs)
4926
4927 def SetVendorName(*args, **kwargs):
4928 """
4929 SetVendorName(self, String name)
4930
d6c14a4c
RD
4931 Set the application's vendor name. This value may be used
4932 automatically by `wx.Config` and such.
d55e5bfc
RD
4933 """
4934 return _core_.PyApp_SetVendorName(*args, **kwargs)
4935
4936 def GetTraits(*args, **kwargs):
4937 """
4938 GetTraits(self) -> wxAppTraits
4939
d6c14a4c
RD
4940 Return (and create if necessary) the app traits object to which we
4941 delegate for everything which either should be configurable by the
4942 user (then he can change the default behaviour simply by overriding
4943 CreateTraits() and returning his own traits object) or which is
4944 GUI/console dependent as then wx.AppTraits allows us to abstract the
4945 differences behind the common facade.
4946
4947 :todo: Add support for overriding CreateAppTraits in wxPython.
d55e5bfc
RD
4948 """
4949 return _core_.PyApp_GetTraits(*args, **kwargs)
4950
4951 def ProcessPendingEvents(*args, **kwargs):
4952 """
4953 ProcessPendingEvents(self)
4954
d6c14a4c
RD
4955 Process all events in the Pending Events list -- it is necessary to
4956 call this function to process posted events. This normally happens
4957 during each event loop iteration.
d55e5bfc
RD
4958 """
4959 return _core_.PyApp_ProcessPendingEvents(*args, **kwargs)
4960
4961 def Yield(*args, **kwargs):
4962 """
4963 Yield(self, bool onlyIfNeeded=False) -> bool
4964
d6c14a4c
RD
4965 Process all currently pending events right now, instead of waiting
4966 until return to the event loop. It is an error to call ``Yield``
4967 recursively unless the value of ``onlyIfNeeded`` is True.
d55e5bfc 4968
d6c14a4c 4969 :warning: This function is dangerous as it can lead to unexpected
15817c7e
RD
4970 reentrancies (i.e. when called from an event handler it may
4971 result in calling the same event handler again), use with
4972 extreme care or, better, don't use at all!
d55e5bfc 4973
d6c14a4c 4974 :see: `wx.Yield`, `wx.YieldIfNeeded`, `wx.SafeYield`
15817c7e 4975
d55e5bfc
RD
4976 """
4977 return _core_.PyApp_Yield(*args, **kwargs)
4978
4979 def WakeUpIdle(*args, **kwargs):
4980 """
4981 WakeUpIdle(self)
4982
d6c14a4c
RD
4983 Make sure that idle events are sent again.
4984 :see: `wx.WakeUpIdle`
d55e5bfc
RD
4985 """
4986 return _core_.PyApp_WakeUpIdle(*args, **kwargs)
4987
84f85550
RD
4988 def IsMainLoopRunning(*args, **kwargs):
4989 """
4990 IsMainLoopRunning() -> bool
4991
4992 Returns True if we're running the main loop, i.e. if the events can
4993 currently be dispatched.
4994 """
4995 return _core_.PyApp_IsMainLoopRunning(*args, **kwargs)
4996
4997 IsMainLoopRunning = staticmethod(IsMainLoopRunning)
d55e5bfc
RD
4998 def MainLoop(*args, **kwargs):
4999 """
5000 MainLoop(self) -> int
5001
d6c14a4c
RD
5002 Execute the main GUI loop, the function doesn't normally return until
5003 all top level windows have been closed and destroyed.
d55e5bfc
RD
5004 """
5005 return _core_.PyApp_MainLoop(*args, **kwargs)
5006
5007 def Exit(*args, **kwargs):
5008 """
5009 Exit(self)
5010
5011 Exit the main loop thus terminating the application.
d6c14a4c 5012 :see: `wx.Exit`
d55e5bfc
RD
5013 """
5014 return _core_.PyApp_Exit(*args, **kwargs)
5015
5016 def ExitMainLoop(*args, **kwargs):
5017 """
5018 ExitMainLoop(self)
5019
d6c14a4c
RD
5020 Exit the main GUI loop during the next iteration of the main
5021 loop, (i.e. it does not stop the program immediately!)
d55e5bfc
RD
5022 """
5023 return _core_.PyApp_ExitMainLoop(*args, **kwargs)
5024
5025 def Pending(*args, **kwargs):
5026 """
5027 Pending(self) -> bool
5028
5029 Returns True if there are unprocessed events in the event queue.
5030 """
5031 return _core_.PyApp_Pending(*args, **kwargs)
5032
5033 def Dispatch(*args, **kwargs):
5034 """
5035 Dispatch(self) -> bool
5036
5037 Process the first event in the event queue (blocks until an event
5038 appears if there are none currently)
5039 """
5040 return _core_.PyApp_Dispatch(*args, **kwargs)
5041
5042 def ProcessIdle(*args, **kwargs):
5043 """
5044 ProcessIdle(self) -> bool
5045
d6c14a4c
RD
5046 Called from the MainLoop when the application becomes idle (there are
5047 no pending events) and sends a `wx.IdleEvent` to all interested
5048 parties. Returns True if more idle events are needed, False if not.
d55e5bfc
RD
5049 """
5050 return _core_.PyApp_ProcessIdle(*args, **kwargs)
5051
5052 def SendIdleEvents(*args, **kwargs):
5053 """
5054 SendIdleEvents(self, Window win, IdleEvent event) -> bool
5055
d6c14a4c
RD
5056 Send idle event to window and all subwindows. Returns True if more
5057 idle time is requested.
d55e5bfc
RD
5058 """
5059 return _core_.PyApp_SendIdleEvents(*args, **kwargs)
5060
5061 def IsActive(*args, **kwargs):
5062 """
5063 IsActive(self) -> bool
5064
5065 Return True if our app has focus.
5066 """
5067 return _core_.PyApp_IsActive(*args, **kwargs)
5068
5069 def SetTopWindow(*args, **kwargs):
5070 """
5071 SetTopWindow(self, Window win)
5072
d6c14a4c 5073 Set the *main* top level window
d55e5bfc
RD
5074 """
5075 return _core_.PyApp_SetTopWindow(*args, **kwargs)
5076
5077 def GetTopWindow(*args, **kwargs):
5078 """
5079 GetTopWindow(self) -> Window
5080
d6c14a4c
RD
5081 Return the *main* top level window (if it hadn't been set previously
5082 with SetTopWindow(), will return just some top level window and, if
5083 there not any, will return None)
d55e5bfc
RD
5084 """
5085 return _core_.PyApp_GetTopWindow(*args, **kwargs)
5086
5087 def SetExitOnFrameDelete(*args, **kwargs):
5088 """
5089 SetExitOnFrameDelete(self, bool flag)
5090
d6c14a4c
RD
5091 Control the exit behaviour: by default, the program will exit the main
5092 loop (and so, usually, terminate) when the last top-level program
5093 window is deleted. Beware that if you disable this behaviour (with
5094 SetExitOnFrameDelete(False)), you'll have to call ExitMainLoop()
5095 explicitly from somewhere.
d55e5bfc
RD
5096 """
5097 return _core_.PyApp_SetExitOnFrameDelete(*args, **kwargs)
5098
5099 def GetExitOnFrameDelete(*args, **kwargs):
5100 """
5101 GetExitOnFrameDelete(self) -> bool
5102
5103 Get the current exit behaviour setting.
5104 """
5105 return _core_.PyApp_GetExitOnFrameDelete(*args, **kwargs)
5106
5107 def SetUseBestVisual(*args, **kwargs):
5108 """
5109 SetUseBestVisual(self, bool flag)
5110
d6c14a4c
RD
5111 Set whether the app should try to use the best available visual on
5112 systems where more than one is available, (Sun, SGI, XFree86 4, etc.)
d55e5bfc
RD
5113 """
5114 return _core_.PyApp_SetUseBestVisual(*args, **kwargs)
5115
5116 def GetUseBestVisual(*args, **kwargs):
5117 """
5118 GetUseBestVisual(self) -> bool
5119
5120 Get current UseBestVisual setting.
5121 """
5122 return _core_.PyApp_GetUseBestVisual(*args, **kwargs)
5123
5124 def SetPrintMode(*args, **kwargs):
5125 """SetPrintMode(self, int mode)"""
5126 return _core_.PyApp_SetPrintMode(*args, **kwargs)
5127
5128 def GetPrintMode(*args, **kwargs):
5129 """GetPrintMode(self) -> int"""
5130 return _core_.PyApp_GetPrintMode(*args, **kwargs)
5131
5132 def SetAssertMode(*args, **kwargs):
5133 """
5134 SetAssertMode(self, int mode)
5135
15817c7e 5136 Set the OnAssert behaviour for debug and hybrid builds.
d55e5bfc
RD
5137 """
5138 return _core_.PyApp_SetAssertMode(*args, **kwargs)
5139
5140 def GetAssertMode(*args, **kwargs):
5141 """
5142 GetAssertMode(self) -> int
5143
5144 Get the current OnAssert behaviour setting.
5145 """
5146 return _core_.PyApp_GetAssertMode(*args, **kwargs)
5147
5148 def GetMacSupportPCMenuShortcuts(*args, **kwargs):
d6c14a4c 5149 """GetMacSupportPCMenuShortcuts() -> bool"""
d55e5bfc
RD
5150 return _core_.PyApp_GetMacSupportPCMenuShortcuts(*args, **kwargs)
5151
5152 GetMacSupportPCMenuShortcuts = staticmethod(GetMacSupportPCMenuShortcuts)
5153 def GetMacAboutMenuItemId(*args, **kwargs):
d6c14a4c 5154 """GetMacAboutMenuItemId() -> long"""
d55e5bfc
RD
5155 return _core_.PyApp_GetMacAboutMenuItemId(*args, **kwargs)
5156
5157 GetMacAboutMenuItemId = staticmethod(GetMacAboutMenuItemId)
5158 def GetMacPreferencesMenuItemId(*args, **kwargs):
d6c14a4c 5159 """GetMacPreferencesMenuItemId() -> long"""
d55e5bfc
RD
5160 return _core_.PyApp_GetMacPreferencesMenuItemId(*args, **kwargs)
5161
5162 GetMacPreferencesMenuItemId = staticmethod(GetMacPreferencesMenuItemId)
5163 def GetMacExitMenuItemId(*args, **kwargs):
d6c14a4c 5164 """GetMacExitMenuItemId() -> long"""
d55e5bfc
RD
5165 return _core_.PyApp_GetMacExitMenuItemId(*args, **kwargs)
5166
5167 GetMacExitMenuItemId = staticmethod(GetMacExitMenuItemId)
5168 def GetMacHelpMenuTitleName(*args, **kwargs):
d6c14a4c 5169 """GetMacHelpMenuTitleName() -> String"""
d55e5bfc
RD
5170 return _core_.PyApp_GetMacHelpMenuTitleName(*args, **kwargs)
5171
5172 GetMacHelpMenuTitleName = staticmethod(GetMacHelpMenuTitleName)
5173 def SetMacSupportPCMenuShortcuts(*args, **kwargs):
d6c14a4c 5174 """SetMacSupportPCMenuShortcuts(bool val)"""
d55e5bfc
RD
5175 return _core_.PyApp_SetMacSupportPCMenuShortcuts(*args, **kwargs)
5176
5177 SetMacSupportPCMenuShortcuts = staticmethod(SetMacSupportPCMenuShortcuts)
5178 def SetMacAboutMenuItemId(*args, **kwargs):
d6c14a4c 5179 """SetMacAboutMenuItemId(long val)"""
d55e5bfc
RD
5180 return _core_.PyApp_SetMacAboutMenuItemId(*args, **kwargs)
5181
5182 SetMacAboutMenuItemId = staticmethod(SetMacAboutMenuItemId)
5183 def SetMacPreferencesMenuItemId(*args, **kwargs):
d6c14a4c 5184 """SetMacPreferencesMenuItemId(long val)"""
d55e5bfc
RD
5185 return _core_.PyApp_SetMacPreferencesMenuItemId(*args, **kwargs)
5186
5187 SetMacPreferencesMenuItemId = staticmethod(SetMacPreferencesMenuItemId)
5188 def SetMacExitMenuItemId(*args, **kwargs):
d6c14a4c 5189 """SetMacExitMenuItemId(long val)"""
d55e5bfc
RD
5190 return _core_.PyApp_SetMacExitMenuItemId(*args, **kwargs)
5191
5192 SetMacExitMenuItemId = staticmethod(SetMacExitMenuItemId)
5193 def SetMacHelpMenuTitleName(*args, **kwargs):
d6c14a4c 5194 """SetMacHelpMenuTitleName(String val)"""
d55e5bfc
RD
5195 return _core_.PyApp_SetMacHelpMenuTitleName(*args, **kwargs)
5196
5197 SetMacHelpMenuTitleName = staticmethod(SetMacHelpMenuTitleName)
5198 def _BootstrapApp(*args, **kwargs):
5199 """
5200 _BootstrapApp(self)
5201
5202 For internal use only
5203 """
5204 return _core_.PyApp__BootstrapApp(*args, **kwargs)
5205
5206 def GetComCtl32Version(*args, **kwargs):
5207 """
d6c14a4c 5208 GetComCtl32Version() -> int
d55e5bfc 5209
d6c14a4c
RD
5210 Returns 400, 470, 471, etc. for comctl32.dll 4.00, 4.70, 4.71 or 0 if
5211 it wasn't found at all. Raises an exception on non-Windows platforms.
d55e5bfc
RD
5212 """
5213 return _core_.PyApp_GetComCtl32Version(*args, **kwargs)
5214
5215 GetComCtl32Version = staticmethod(GetComCtl32Version)
5216
5217class PyAppPtr(PyApp):
5218 def __init__(self, this):
5219 self.this = this
5220 if not hasattr(self,"thisown"): self.thisown = 0
5221 self.__class__ = PyApp
5222_core_.PyApp_swigregister(PyAppPtr)
5223
84f85550
RD
5224def PyApp_IsMainLoopRunning(*args, **kwargs):
5225 """
5226 PyApp_IsMainLoopRunning() -> bool
5227
5228 Returns True if we're running the main loop, i.e. if the events can
5229 currently be dispatched.
5230 """
5231 return _core_.PyApp_IsMainLoopRunning(*args, **kwargs)
5232
d55e5bfc
RD
5233def PyApp_GetMacSupportPCMenuShortcuts(*args, **kwargs):
5234 """PyApp_GetMacSupportPCMenuShortcuts() -> bool"""
5235 return _core_.PyApp_GetMacSupportPCMenuShortcuts(*args, **kwargs)
5236
5237def PyApp_GetMacAboutMenuItemId(*args, **kwargs):
5238 """PyApp_GetMacAboutMenuItemId() -> long"""
5239 return _core_.PyApp_GetMacAboutMenuItemId(*args, **kwargs)
5240
5241def PyApp_GetMacPreferencesMenuItemId(*args, **kwargs):
5242 """PyApp_GetMacPreferencesMenuItemId() -> long"""
5243 return _core_.PyApp_GetMacPreferencesMenuItemId(*args, **kwargs)
5244
5245def PyApp_GetMacExitMenuItemId(*args, **kwargs):
5246 """PyApp_GetMacExitMenuItemId() -> long"""
5247 return _core_.PyApp_GetMacExitMenuItemId(*args, **kwargs)
5248
5249def PyApp_GetMacHelpMenuTitleName(*args, **kwargs):
5250 """PyApp_GetMacHelpMenuTitleName() -> String"""
5251 return _core_.PyApp_GetMacHelpMenuTitleName(*args, **kwargs)
5252
5253def PyApp_SetMacSupportPCMenuShortcuts(*args, **kwargs):
5254 """PyApp_SetMacSupportPCMenuShortcuts(bool val)"""
5255 return _core_.PyApp_SetMacSupportPCMenuShortcuts(*args, **kwargs)
5256
5257def PyApp_SetMacAboutMenuItemId(*args, **kwargs):
5258 """PyApp_SetMacAboutMenuItemId(long val)"""
5259 return _core_.PyApp_SetMacAboutMenuItemId(*args, **kwargs)
5260
5261def PyApp_SetMacPreferencesMenuItemId(*args, **kwargs):
5262 """PyApp_SetMacPreferencesMenuItemId(long val)"""
5263 return _core_.PyApp_SetMacPreferencesMenuItemId(*args, **kwargs)
5264
5265def PyApp_SetMacExitMenuItemId(*args, **kwargs):
5266 """PyApp_SetMacExitMenuItemId(long val)"""
5267 return _core_.PyApp_SetMacExitMenuItemId(*args, **kwargs)
5268
5269def PyApp_SetMacHelpMenuTitleName(*args, **kwargs):
5270 """PyApp_SetMacHelpMenuTitleName(String val)"""
5271 return _core_.PyApp_SetMacHelpMenuTitleName(*args, **kwargs)
5272
5273def PyApp_GetComCtl32Version(*args, **kwargs):
5274 """
5275 PyApp_GetComCtl32Version() -> int
5276
d6c14a4c
RD
5277 Returns 400, 470, 471, etc. for comctl32.dll 4.00, 4.70, 4.71 or 0 if
5278 it wasn't found at all. Raises an exception on non-Windows platforms.
d55e5bfc
RD
5279 """
5280 return _core_.PyApp_GetComCtl32Version(*args, **kwargs)
5281
5282#---------------------------------------------------------------------------
5283
5284
5285def Exit(*args, **kwargs):
5286 """
5287 Exit()
5288
5289 Force an exit of the application. Convenience for wx.GetApp().Exit()
5290 """
5291 return _core_.Exit(*args, **kwargs)
5292
5293def Yield(*args, **kwargs):
5294 """
5295 Yield() -> bool
5296
5297 Yield to other apps/messages. Convenience for wx.GetApp().Yield()
5298 """
5299 return _core_.Yield(*args, **kwargs)
5300
5301def YieldIfNeeded(*args, **kwargs):
5302 """
5303 YieldIfNeeded() -> bool
5304
5305 Yield to other apps/messages. Convenience for wx.GetApp().Yield(True)
5306 """
5307 return _core_.YieldIfNeeded(*args, **kwargs)
5308
5309def SafeYield(*args, **kwargs):
5310 """
5311 SafeYield(Window win=None, bool onlyIfNeeded=False) -> bool
5312
d6c14a4c
RD
5313 This function is similar to `wx.Yield`, except that it disables the
5314 user input to all program windows before calling `wx.Yield` and
5315 re-enables it again afterwards. If ``win`` is not None, this window
5316 will remain enabled, allowing the implementation of some limited user
5317 interaction.
d55e5bfc 5318
d6c14a4c 5319 :Returns: the result of the call to `wx.Yield`.
d55e5bfc
RD
5320 """
5321 return _core_.SafeYield(*args, **kwargs)
5322
5323def WakeUpIdle(*args, **kwargs):
5324 """
5325 WakeUpIdle()
5326
d6c14a4c
RD
5327 Cause the message queue to become empty again, so idle events will be
5328 sent.
d55e5bfc
RD
5329 """
5330 return _core_.WakeUpIdle(*args, **kwargs)
5331
5332def PostEvent(*args, **kwargs):
5333 """
5334 PostEvent(EvtHandler dest, Event event)
5335
d6c14a4c
RD
5336 Send an event to a window or other wx.EvtHandler to be processed
5337 later.
d55e5bfc
RD
5338 """
5339 return _core_.PostEvent(*args, **kwargs)
5340
5341def App_CleanUp(*args, **kwargs):
5342 """
5343 App_CleanUp()
5344
15817c7e 5345 For internal use only, it is used to cleanup after wxWidgets when
d6c14a4c 5346 Python shuts down.
d55e5bfc
RD
5347 """
5348 return _core_.App_CleanUp(*args, **kwargs)
5349
5350def GetApp(*args, **kwargs):
5351 """
5352 GetApp() -> PyApp
5353
5354 Return a reference to the current wx.App object.
5355 """
5356 return _core_.GetApp(*args, **kwargs)
5cbf236d
RD
5357
5358def SetDefaultPyEncoding(*args, **kwargs):
5359 """
5360 SetDefaultPyEncoding(string encoding)
5361
5362 Sets the encoding that wxPython will use when it needs to convert a
5363 Python string or unicode object to or from a wxString.
62d32a5f
RD
5364
5365 The default encoding is the value of ``locale.getdefaultlocale()[1]``
5366 but please be aware that the default encoding within the same locale
5367 may be slightly different on different platforms. For example, please
5368 see http://www.alanwood.net/demos/charsetdiffs.html for differences
5369 between the common latin/roman encodings.
5cbf236d
RD
5370 """
5371 return _core_.SetDefaultPyEncoding(*args, **kwargs)
5372
5373def GetDefaultPyEncoding(*args, **kwargs):
5374 """
5375 GetDefaultPyEncoding() -> string
5376
5377 Gets the current encoding that wxPython will use when it needs to
5378 convert a Python string or unicode object to or from a wxString.
5379 """
5380 return _core_.GetDefaultPyEncoding(*args, **kwargs)
d55e5bfc
RD
5381#----------------------------------------------------------------------
5382
5383class PyOnDemandOutputWindow:
5384 """
5385 A class that can be used for redirecting Python's stdout and
5386 stderr streams. It will do nothing until something is wrriten to
5387 the stream at which point it will create a Frame with a text area
5388 and write the text there.
5389 """
5390 def __init__(self, title = "wxPython: stdout/stderr"):
5391 self.frame = None
5392 self.title = title
412d302d
RD
5393 self.pos = wx.DefaultPosition
5394 self.size = (450, 300)
d55e5bfc
RD
5395 self.parent = None
5396
5397 def SetParent(self, parent):
5398 """Set the window to be used as the popup Frame's parent."""
5399 self.parent = parent
5400
5401
5402 def CreateOutputWindow(self, st):
412d302d
RD
5403 self.frame = wx.Frame(self.parent, -1, self.title, self.pos, self.size,
5404 style=wx.DEFAULT_FRAME_STYLE)
d55e5bfc 5405 self.text = wx.TextCtrl(self.frame, -1, "",
412d302d 5406 style=wx.TE_MULTILINE|wx.TE_READONLY)
d55e5bfc 5407 self.text.AppendText(st)
d55e5bfc
RD
5408 self.frame.Show(True)
5409 EVT_CLOSE(self.frame, self.OnCloseWindow)
5410
5411
5412 def OnCloseWindow(self, event):
5413 if self.frame is not None:
5414 self.frame.Destroy()
5415 self.frame = None
5416 self.text = None
5417
5418
5419 # These methods provide the file-like output behaviour.
5420 def write(self, text):
5421 """
5422 Create the output window if needed and write the string to it.
5423 If not called in the context of the gui thread then uses
5424 CallAfter to do the work there.
5425 """
5426 if self.frame is None:
5427 if not wx.Thread_IsMain():
5428 wx.CallAfter(self.CreateOutputWindow, text)
5429 else:
5430 self.CreateOutputWindow(text)
5431 else:
5432 if not wx.Thread_IsMain():
5433 wx.CallAfter(self.text.AppendText, text)
5434 else:
5435 self.text.AppendText(text)
5436
5437
5438 def close(self):
5439 if self.frame is not None:
5440 wx.CallAfter(self.frame.Close)
5441
5442
bb4524c4
RD
5443 def flush(self):
5444 pass
5445
5446
d55e5bfc
RD
5447
5448#----------------------------------------------------------------------
5449
5450_defRedirect = (wx.Platform == '__WXMSW__' or wx.Platform == '__WXMAC__')
5451
5452class App(wx.PyApp):
5453 """
d6c14a4c
RD
5454 The ``wx.App`` class represents the application and is used to:
5455
5456 * bootstrap the wxPython system and initialize the underlying
5457 gui toolkit
5458 * set and get application-wide properties
5459 * implement the windowing system main message or event loop,
5460 and to dispatch events to window instances
5461 * etc.
5462
5463 Every application must have a ``wx.App`` instance, and all
5464 creation of UI objects should be delayed until after the
5465 ``wx.App`` object has been created in order to ensure that the gui
5466 platform and wxWidgets have been fully initialized.
5467
5468 Normally you would derive from this class and implement an
5469 ``OnInit`` method that creates a frame and then calls
5470 ``self.SetTopWindow(frame)``.
5471
5472 :see: `wx.PySimpleApp` for a simpler app class that can be used
15817c7e 5473 directly.
d55e5bfc 5474 """
d6c14a4c 5475
d55e5bfc
RD
5476 outputWindowClass = PyOnDemandOutputWindow
5477
d6c14a4c
RD
5478 def __init__(self, redirect=_defRedirect, filename=None,
5479 useBestVisual=False, clearSigInt=True):
5480 """
5481 Construct a ``wx.App`` object.
5482
5483 :param redirect: Should ``sys.stdout`` and ``sys.stderr`` be
5484 redirected? Defaults to True on Windows and Mac, False
5485 otherwise. If `filename` is None then output will be
5486 redirected to a window that pops up as needed. (You can
5487 control what kind of window is created for the output by
5488 resetting the class variable ``outputWindowClass`` to a
5489 class of your choosing.)
5490
5491 :param filename: The name of a file to redirect output to, if
5492 redirect is True.
5493
5494 :param useBestVisual: Should the app try to use the best
5495 available visual provided by the system (only relevant on
5496 systems that have more than one visual.) This parameter
5497 must be used instead of calling `SetUseBestVisual` later
5498 on because it must be set before the underlying GUI
5499 toolkit is initialized.
5500
5501 :param clearSigInt: Should SIGINT be cleared? This allows the
5502 app to terminate upon a Ctrl-C in the console like other
5503 GUI apps will.
5504
5505 :note: You should override OnInit to do applicaition
5506 initialization to ensure that the system, toolkit and
5507 wxWidgets are fully initialized.
5508 """
d55e5bfc
RD
5509 wx.PyApp.__init__(self)
5510
5511 if wx.Platform == "__WXMAC__":
5512 try:
5513 import MacOS
5514 if not MacOS.WMAvailable():
5515 print """\
5516This program needs access to the screen. Please run with 'pythonw',
5517not 'python', and only when you are logged in on the main display of
5518your Mac."""
5519 _sys.exit(1)
0346c964
RD
5520 except SystemExit:
5521 raise
d55e5bfc
RD
5522 except:
5523 pass
5524
5525 # This has to be done before OnInit
5526 self.SetUseBestVisual(useBestVisual)
5527
5528 # Set the default handler for SIGINT. This fixes a problem
5529 # where if Ctrl-C is pressed in the console that started this
5530 # app then it will not appear to do anything, (not even send
5531 # KeyboardInterrupt???) but will later segfault on exit. By
5532 # setting the default handler then the app will exit, as
5533 # expected (depending on platform.)
d6c14a4c
RD
5534 if clearSigInt:
5535 try:
5536 import signal
5537 signal.signal(signal.SIGINT, signal.SIG_DFL)
5538 except:
5539 pass
d55e5bfc
RD
5540
5541 # Save and redirect the stdio to a window?
5542 self.stdioWin = None
5543 self.saveStdio = (_sys.stdout, _sys.stderr)
5544 if redirect:
5545 self.RedirectStdio(filename)
5546
8fb0e70a
RD
5547 # Use Python's install prefix as the default
5548 wx.StandardPaths.Get().SetInstallPrefix(_sys.prefix)
5549
d55e5bfc
RD
5550 # This finishes the initialization of wxWindows and then calls
5551 # the OnInit that should be present in the derived class
5552 self._BootstrapApp()
5553
5554
5555 def __del__(self):
5556 try:
5557 self.RestoreStdio() # Just in case the MainLoop was overridden
5558 except:
5559 pass
5560
5561
5562 def SetTopWindow(self, frame):
5563 """Set the \"main\" top level window"""
5564 if self.stdioWin:
5565 self.stdioWin.SetParent(frame)
5566 wx.PyApp.SetTopWindow(self, frame)
5567
5568
5569 def MainLoop(self):
5570 """Execute the main GUI event loop"""
5571 wx.PyApp.MainLoop(self)
5572 self.RestoreStdio()
5573
5574
5575 def RedirectStdio(self, filename=None):
5576 """Redirect sys.stdout and sys.stderr to a file or a popup window."""
5577 if filename:
5578 _sys.stdout = _sys.stderr = open(filename, 'a')
5579 else:
5580 self.stdioWin = self.outputWindowClass()
5581 _sys.stdout = _sys.stderr = self.stdioWin
5582
5583
5584 def RestoreStdio(self):
5585 _sys.stdout, _sys.stderr = self.saveStdio
5586
5587
412d302d
RD
5588 def SetOutputWindowAttributes(self, title=None, pos=None, size=None):
5589 """
5590 Set the title, position and/or size of the output window if
f5b96ee1
RD
5591 the stdio has been redirected. This should be called before
5592 any output would cause the output window to be created.
412d302d
RD
5593 """
5594 if self.stdioWin:
5595 if title is not None:
5596 self.stdioWin.title = title
5597 if pos is not None:
5598 self.stdioWin.pos = pos
5599 if size is not None:
5600 self.stdioWin.size = size
5601
5602
5603
d55e5bfc 5604
d6c14a4c 5605# change from wx.PyApp_XX to wx.App_XX
d55e5bfc
RD
5606App_GetMacSupportPCMenuShortcuts = _core_.PyApp_GetMacSupportPCMenuShortcuts
5607App_GetMacAboutMenuItemId = _core_.PyApp_GetMacAboutMenuItemId
5608App_GetMacPreferencesMenuItemId = _core_.PyApp_GetMacPreferencesMenuItemId
5609App_GetMacExitMenuItemId = _core_.PyApp_GetMacExitMenuItemId
5610App_GetMacHelpMenuTitleName = _core_.PyApp_GetMacHelpMenuTitleName
5611App_SetMacSupportPCMenuShortcuts = _core_.PyApp_SetMacSupportPCMenuShortcuts
5612App_SetMacAboutMenuItemId = _core_.PyApp_SetMacAboutMenuItemId
5613App_SetMacPreferencesMenuItemId = _core_.PyApp_SetMacPreferencesMenuItemId
5614App_SetMacExitMenuItemId = _core_.PyApp_SetMacExitMenuItemId
5615App_SetMacHelpMenuTitleName = _core_.PyApp_SetMacHelpMenuTitleName
5616App_GetComCtl32Version = _core_.PyApp_GetComCtl32Version
5617
5618#----------------------------------------------------------------------------
5619
5620class PySimpleApp(wx.App):
5621 """
5622 A simple application class. You can just create one of these and
5623 then then make your top level windows later, and not have to worry
d6c14a4c 5624 about OnInit. For example::
d55e5bfc 5625
d6c14a4c
RD
5626 app = wx.PySimpleApp()
5627 frame = wx.Frame(None, title='Hello World')
5628 frame.Show()
5629 app.MainLoop()
5630
5631 :see: `wx.App`
5632 """
5633
5634 def __init__(self, redirect=False, filename=None,
5635 useBestVisual=False, clearSigInt=True):
5636 """
5637 :see: `wx.App.__init__`
5638 """
5639 wx.App.__init__(self, redirect, filename, useBestVisual, clearSigInt)
d55e5bfc
RD
5640
5641 def OnInit(self):
d55e5bfc
RD
5642 return True
5643
5644
d6c14a4c 5645
d55e5bfc
RD
5646# Is anybody using this one?
5647class PyWidgetTester(wx.App):
5648 def __init__(self, size = (250, 100)):
5649 self.size = size
5650 wx.App.__init__(self, 0)
5651
5652 def OnInit(self):
5653 self.frame = wx.Frame(None, -1, "Widget Tester", pos=(0,0), size=self.size)
5654 self.SetTopWindow(self.frame)
5655 return True
5656
d6c14a4c
RD
5657 def SetWidget(self, widgetClass, *args, **kwargs):
5658 w = widgetClass(self.frame, *args, **kwargs)
d55e5bfc
RD
5659 self.frame.Show(True)
5660
5661#----------------------------------------------------------------------------
5662# DO NOT hold any other references to this object. This is how we
d6c14a4c 5663# know when to cleanup system resources that wxWidgets is holding. When
d55e5bfc 5664# the sys module is unloaded, the refcount on sys.__wxPythonCleanup
d6c14a4c 5665# goes to zero and it calls the wx.App_CleanUp function.
d55e5bfc
RD
5666
5667class __wxPyCleanup:
5668 def __init__(self):
5669 self.cleanup = _core_.App_CleanUp
5670 def __del__(self):
5671 self.cleanup()
5672
5673_sys.__wxPythonCleanup = __wxPyCleanup()
5674
5675## # another possible solution, but it gets called too early...
d6c14a4c
RD
5676## import atexit
5677## atexit.register(_core_.wxApp_CleanUp)
d55e5bfc
RD
5678
5679
5680#----------------------------------------------------------------------------
5681
5682#---------------------------------------------------------------------------
5683
b411df4a 5684class EventLoop(object):
36ed4f51 5685 """Proxy of C++ EventLoop class"""
b411df4a
RD
5686 def __repr__(self):
5687 return "<%s.%s; proxy of C++ wxEventLoop instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
5688 def __init__(self, *args, **kwargs):
5689 """__init__(self) -> EventLoop"""
5690 newobj = _core_.new_EventLoop(*args, **kwargs)
5691 self.this = newobj.this
5692 self.thisown = 1
5693 del newobj.thisown
5694 def __del__(self, destroy=_core_.delete_EventLoop):
5695 """__del__(self)"""
5696 try:
5697 if self.thisown: destroy(self)
5698 except: pass
5699
5700 def Run(*args, **kwargs):
5701 """Run(self) -> int"""
5702 return _core_.EventLoop_Run(*args, **kwargs)
5703
5704 def Exit(*args, **kwargs):
5705 """Exit(self, int rc=0)"""
5706 return _core_.EventLoop_Exit(*args, **kwargs)
5707
5708 def Pending(*args, **kwargs):
5709 """Pending(self) -> bool"""
5710 return _core_.EventLoop_Pending(*args, **kwargs)
5711
5712 def Dispatch(*args, **kwargs):
5713 """Dispatch(self) -> bool"""
5714 return _core_.EventLoop_Dispatch(*args, **kwargs)
5715
5716 def IsRunning(*args, **kwargs):
5717 """IsRunning(self) -> bool"""
5718 return _core_.EventLoop_IsRunning(*args, **kwargs)
5719
5720 def GetActive(*args, **kwargs):
5721 """GetActive() -> EventLoop"""
5722 return _core_.EventLoop_GetActive(*args, **kwargs)
5723
5724 GetActive = staticmethod(GetActive)
5725 def SetActive(*args, **kwargs):
5726 """SetActive(EventLoop loop)"""
5727 return _core_.EventLoop_SetActive(*args, **kwargs)
5728
5729 SetActive = staticmethod(SetActive)
5730
5731class EventLoopPtr(EventLoop):
5732 def __init__(self, this):
5733 self.this = this
5734 if not hasattr(self,"thisown"): self.thisown = 0
5735 self.__class__ = EventLoop
5736_core_.EventLoop_swigregister(EventLoopPtr)
5737
5738def EventLoop_GetActive(*args, **kwargs):
5739 """EventLoop_GetActive() -> EventLoop"""
5740 return _core_.EventLoop_GetActive(*args, **kwargs)
5741
5742def EventLoop_SetActive(*args, **kwargs):
5743 """EventLoop_SetActive(EventLoop loop)"""
5744 return _core_.EventLoop_SetActive(*args, **kwargs)
5745
5746#---------------------------------------------------------------------------
5747
d55e5bfc 5748class AcceleratorEntry(object):
d6c14a4c
RD
5749 """
5750 A class used to define items in an `wx.AcceleratorTable`. wxPython
5751 programs can choose to use wx.AcceleratorEntry objects, but using a
5752 list of 3-tuple of integers (flags, keyCode, cmdID) usually works just
15817c7e 5753 as well. See `__init__` for of the tuple values.
d6c14a4c
RD
5754
5755 :see: `wx.AcceleratorTable`
5756 """
d55e5bfc
RD
5757 def __repr__(self):
5758 return "<%s.%s; proxy of C++ wxAcceleratorEntry instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
5759 def __init__(self, *args, **kwargs):
d6c14a4c
RD
5760 """
5761 __init__(self, int flags=0, int keyCode=0, int cmdID=0) -> AcceleratorEntry
5762
5763 Construct a wx.AcceleratorEntry.
d6c14a4c 5764 """
d55e5bfc
RD
5765 newobj = _core_.new_AcceleratorEntry(*args, **kwargs)
5766 self.this = newobj.this
5767 self.thisown = 1
5768 del newobj.thisown
5769 def __del__(self, destroy=_core_.delete_AcceleratorEntry):
5770 """__del__(self)"""
5771 try:
5772 if self.thisown: destroy(self)
5773 except: pass
5774
5775 def Set(*args, **kwargs):
d6c14a4c
RD
5776 """
5777 Set(self, int flags, int keyCode, int cmd)
d55e5bfc 5778
d6c14a4c
RD
5779 (Re)set the attributes of a wx.AcceleratorEntry.
5780 :see `__init__`
5781 """
5782 return _core_.AcceleratorEntry_Set(*args, **kwargs)
d55e5bfc
RD
5783
5784 def GetFlags(*args, **kwargs):
d6c14a4c
RD
5785 """
5786 GetFlags(self) -> int
5787
5788 Get the AcceleratorEntry's flags.
5789 """
d55e5bfc
RD
5790 return _core_.AcceleratorEntry_GetFlags(*args, **kwargs)
5791
5792 def GetKeyCode(*args, **kwargs):
d6c14a4c
RD
5793 """
5794 GetKeyCode(self) -> int
5795
5796 Get the AcceleratorEntry's keycode.
5797 """
d55e5bfc
RD
5798 return _core_.AcceleratorEntry_GetKeyCode(*args, **kwargs)
5799
5800 def GetCommand(*args, **kwargs):
d6c14a4c
RD
5801 """
5802 GetCommand(self) -> int
5803
5804 Get the AcceleratorEntry's command ID.
5805 """
d55e5bfc
RD
5806 return _core_.AcceleratorEntry_GetCommand(*args, **kwargs)
5807
5808
5809class AcceleratorEntryPtr(AcceleratorEntry):
5810 def __init__(self, this):
5811 self.this = this
5812 if not hasattr(self,"thisown"): self.thisown = 0
5813 self.__class__ = AcceleratorEntry
5814_core_.AcceleratorEntry_swigregister(AcceleratorEntryPtr)
5815
5816class AcceleratorTable(Object):
d6c14a4c
RD
5817 """
5818 An accelerator table allows the application to specify a table of
5819 keyboard shortcuts for menus or other commands. On Windows, menu or
5820 button commands are supported; on GTK, only menu commands are
5821 supported.
d6c14a4c 5822 """
d55e5bfc
RD
5823 def __repr__(self):
5824 return "<%s.%s; proxy of C++ wxAcceleratorTable instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
5825 def __init__(self, *args, **kwargs):
5826 """
5827 __init__(entries) -> AcceleratorTable
5828
d6c14a4c
RD
5829 Construct an AcceleratorTable from a list of `wx.AcceleratorEntry`
5830 items or or of 3-tuples (flags, keyCode, cmdID)
5831
5832 :see: `wx.AcceleratorEntry`
d55e5bfc
RD
5833 """
5834 newobj = _core_.new_AcceleratorTable(*args, **kwargs)
5835 self.this = newobj.this
5836 self.thisown = 1
5837 del newobj.thisown
5838 def __del__(self, destroy=_core_.delete_AcceleratorTable):
5839 """__del__(self)"""
5840 try:
5841 if self.thisown: destroy(self)
5842 except: pass
5843
5844 def Ok(*args, **kwargs):
5845 """Ok(self) -> bool"""
5846 return _core_.AcceleratorTable_Ok(*args, **kwargs)
5847
5848
5849class AcceleratorTablePtr(AcceleratorTable):
5850 def __init__(self, this):
5851 self.this = this
5852 if not hasattr(self,"thisown"): self.thisown = 0
5853 self.__class__ = AcceleratorTable
5854_core_.AcceleratorTable_swigregister(AcceleratorTablePtr)
5855
5856
5857def GetAccelFromString(*args, **kwargs):
5858 """GetAccelFromString(String label) -> AcceleratorEntry"""
5859 return _core_.GetAccelFromString(*args, **kwargs)
5860#---------------------------------------------------------------------------
5861
5862class VisualAttributes(object):
5863 """struct containing all the visual attributes of a control"""
5864 def __repr__(self):
5865 return "<%s.%s; proxy of C++ wxVisualAttributes instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
5866 def __init__(self, *args, **kwargs):
5867 """
5868 __init__(self) -> VisualAttributes
5869
5870 struct containing all the visual attributes of a control
5871 """
5872 newobj = _core_.new_VisualAttributes(*args, **kwargs)
5873 self.this = newobj.this
5874 self.thisown = 1
5875 del newobj.thisown
5876 def __del__(self, destroy=_core_.delete_VisualAttributes):
5877 """__del__(self)"""
5878 try:
5879 if self.thisown: destroy(self)
5880 except: pass
5881
5882 font = property(_core_.VisualAttributes_font_get, _core_.VisualAttributes_font_set)
5883 colFg = property(_core_.VisualAttributes_colFg_get, _core_.VisualAttributes_colFg_set)
5884 colBg = property(_core_.VisualAttributes_colBg_get, _core_.VisualAttributes_colBg_set)
5885
5886class VisualAttributesPtr(VisualAttributes):
5887 def __init__(self, this):
5888 self.this = this
5889 if not hasattr(self,"thisown"): self.thisown = 0
5890 self.__class__ = VisualAttributes
5891_core_.VisualAttributes_swigregister(VisualAttributesPtr)
5892NullAcceleratorTable = cvar.NullAcceleratorTable
5893PanelNameStr = cvar.PanelNameStr
5894
5895WINDOW_VARIANT_NORMAL = _core_.WINDOW_VARIANT_NORMAL
5896WINDOW_VARIANT_SMALL = _core_.WINDOW_VARIANT_SMALL
5897WINDOW_VARIANT_MINI = _core_.WINDOW_VARIANT_MINI
5898WINDOW_VARIANT_LARGE = _core_.WINDOW_VARIANT_LARGE
5899WINDOW_VARIANT_MAX = _core_.WINDOW_VARIANT_MAX
5900class Window(EvtHandler):
5901 """
5902 wx.Window is the base class for all windows and represents any visible
5903 object on the screen. All controls, top level windows and so on are
5904 wx.Windows. Sizers and device contexts are not however, as they don't
5905 appear on screen themselves.
5906
5907 """
5908 def __repr__(self):
5909 return "<%s.%s; proxy of C++ wxWindow instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
5910 def __init__(self, *args, **kwargs):
5911 """
5912 __init__(self, Window parent, int id=-1, Point pos=DefaultPosition,
5913 Size size=DefaultSize, long style=0, String name=PanelNameStr) -> Window
5914
5915 Construct and show a generic Window.
5916 """
5917 newobj = _core_.new_Window(*args, **kwargs)
5918 self.this = newobj.this
5919 self.thisown = 1
5920 del newobj.thisown
5921 self._setOORInfo(self)
5922
5923 def Create(*args, **kwargs):
5924 """
5925 Create(self, Window parent, int id=-1, Point pos=DefaultPosition,
5926 Size size=DefaultSize, long style=0, String name=PanelNameStr) -> bool
5927
5928 Create the GUI part of the Window for 2-phase creation mode.
5929 """
5930 return _core_.Window_Create(*args, **kwargs)
5931
5932 def Close(*args, **kwargs):
5933 """
5934 Close(self, bool force=False) -> bool
5935
5936 This function simply generates a EVT_CLOSE event whose handler usually
5937 tries to close the window. It doesn't close the window itself,
5938 however. If force is False (the default) then the window's close
5939 handler will be allowed to veto the destruction of the window.
d55e5bfc
RD
5940 """
5941 return _core_.Window_Close(*args, **kwargs)
5942
5943 def Destroy(*args, **kwargs):
5944 """
5945 Destroy(self) -> bool
5946
5947 Destroys the window safely. Frames and dialogs are not destroyed
5948 immediately when this function is called -- they are added to a list
5949 of windows to be deleted on idle time, when all the window's events
5950 have been processed. This prevents problems with events being sent to
5951 non-existent windows.
5952
5953 Returns True if the window has either been successfully deleted, or it
5954 has been added to the list of windows pending real deletion.
5955 """
5956 return _core_.Window_Destroy(*args, **kwargs)
5957
5958 def DestroyChildren(*args, **kwargs):
5959 """
5960 DestroyChildren(self) -> bool
5961
15817c7e
RD
5962 Destroys all children of a window. Called automatically by the
5963 destructor.
d55e5bfc
RD
5964 """
5965 return _core_.Window_DestroyChildren(*args, **kwargs)
5966
5967 def IsBeingDeleted(*args, **kwargs):
5968 """
5969 IsBeingDeleted(self) -> bool
5970
5971 Is the window in the process of being deleted?
5972 """
5973 return _core_.Window_IsBeingDeleted(*args, **kwargs)
5974
5975 def SetTitle(*args, **kwargs):
5976 """
5977 SetTitle(self, String title)
5978
5979 Sets the window's title. Applicable only to frames and dialogs.
5980 """
5981 return _core_.Window_SetTitle(*args, **kwargs)
5982
5983 def GetTitle(*args, **kwargs):
5984 """
5985 GetTitle(self) -> String
5986
5987 Gets the window's title. Applicable only to frames and dialogs.
5988 """
5989 return _core_.Window_GetTitle(*args, **kwargs)
5990
5991 def SetLabel(*args, **kwargs):
5992 """
5993 SetLabel(self, String label)
5994
5995 Set the text which the window shows in its label if applicable.
5996 """
5997 return _core_.Window_SetLabel(*args, **kwargs)
5998
5999 def GetLabel(*args, **kwargs):
6000 """
6001 GetLabel(self) -> String
6002
15817c7e
RD
6003 Generic way of getting a label from any window, for identification
6004 purposes. The interpretation of this function differs from class to
6005 class. For frames and dialogs, the value returned is the title. For
6006 buttons or static text controls, it is the button text. This function
6007 can be useful for meta-programs such as testing tools or special-needs
6008 access programs)which need to identify windows by name.
d55e5bfc
RD
6009 """
6010 return _core_.Window_GetLabel(*args, **kwargs)
6011
6012 def SetName(*args, **kwargs):
6013 """
6014 SetName(self, String name)
6015
15817c7e
RD
6016 Sets the window's name. The window name is used for ressource setting
6017 in X, it is not the same as the window title/label
d55e5bfc
RD
6018 """
6019 return _core_.Window_SetName(*args, **kwargs)
6020
6021 def GetName(*args, **kwargs):
6022 """
6023 GetName(self) -> String
6024
15817c7e
RD
6025 Returns the windows name. This name is not guaranteed to be unique;
6026 it is up to the programmer to supply an appropriate name in the window
6027 constructor or via wx.Window.SetName.
d55e5bfc
RD
6028 """
6029 return _core_.Window_GetName(*args, **kwargs)
6030
6031 def SetWindowVariant(*args, **kwargs):
6032 """
6033 SetWindowVariant(self, int variant)
6034
15817c7e
RD
6035 Sets the variant of the window/font size to use for this window, if
6036 the platform supports variants, for example, wxMac.
d55e5bfc
RD
6037 """
6038 return _core_.Window_SetWindowVariant(*args, **kwargs)
6039
6040 def GetWindowVariant(*args, **kwargs):
6041 """GetWindowVariant(self) -> int"""
6042 return _core_.Window_GetWindowVariant(*args, **kwargs)
6043
6044 def SetId(*args, **kwargs):
6045 """
6046 SetId(self, int winid)
6047
6048 Sets the identifier of the window. Each window has an integer
6049 identifier. If the application has not provided one, an identifier
6050 will be generated. Normally, the identifier should be provided on
6051 creation and should not be modified subsequently.
6052 """
6053 return _core_.Window_SetId(*args, **kwargs)
6054
6055 def GetId(*args, **kwargs):
6056 """
6057 GetId(self) -> int
6058
6059 Returns the identifier of the window. Each window has an integer
6060 identifier. If the application has not provided one (or the default Id
6061 -1 is used) then an unique identifier with a negative value will be
6062 generated.
6063 """
6064 return _core_.Window_GetId(*args, **kwargs)
6065
6066 def NewControlId(*args, **kwargs):
6067 """
d6c14a4c 6068 NewControlId() -> int
d55e5bfc
RD
6069
6070 Generate a control id for the controls which were not given one.
6071 """
6072 return _core_.Window_NewControlId(*args, **kwargs)
6073
6074 NewControlId = staticmethod(NewControlId)
6075 def NextControlId(*args, **kwargs):
6076 """
d6c14a4c 6077 NextControlId(int winid) -> int
d55e5bfc
RD
6078
6079 Get the id of the control following the one with the given
15817c7e 6080 autogenerated) id
d55e5bfc
RD
6081 """
6082 return _core_.Window_NextControlId(*args, **kwargs)
6083
6084 NextControlId = staticmethod(NextControlId)
6085 def PrevControlId(*args, **kwargs):
6086 """
d6c14a4c 6087 PrevControlId(int winid) -> int
d55e5bfc
RD
6088
6089 Get the id of the control preceding the one with the given
15817c7e 6090 autogenerated) id
d55e5bfc
RD
6091 """
6092 return _core_.Window_PrevControlId(*args, **kwargs)
6093
6094 PrevControlId = staticmethod(PrevControlId)
6095 def SetSize(*args, **kwargs):
6096 """
6097 SetSize(self, Size size)
6098
6099 Sets the size of the window in pixels.
6100 """
6101 return _core_.Window_SetSize(*args, **kwargs)
6102
6103 def SetDimensions(*args, **kwargs):
6104 """
6105 SetDimensions(self, int x, int y, int width, int height, int sizeFlags=SIZE_AUTO)
6106
6107 Sets the position and size of the window in pixels. The sizeFlags
6108 parameter indicates the interpretation of the other params if they are
62d32a5f
RD
6109 equal to -1.
6110
6111 ======================== ======================================
6112 wx.SIZE_AUTO A -1 indicates that a class-specific
6113 default should be used.
6114 wx.SIZE_USE_EXISTING Axisting dimensions should be used if
6115 -1 values are supplied.
6116 wxSIZE_ALLOW_MINUS_ONE Allow dimensions of -1 and less to be
6117 interpreted as real dimensions, not
6118 default values.
6119 ======================== ======================================
6120
d55e5bfc
RD
6121 """
6122 return _core_.Window_SetDimensions(*args, **kwargs)
6123
6124 def SetRect(*args, **kwargs):
6125 """
6126 SetRect(self, Rect rect, int sizeFlags=SIZE_AUTO)
6127
6128 Sets the position and size of the window in pixels using a wx.Rect.
6129 """
6130 return _core_.Window_SetRect(*args, **kwargs)
6131
6132 def SetSizeWH(*args, **kwargs):
6133 """
6134 SetSizeWH(self, int width, int height)
6135
6136 Sets the size of the window in pixels.
6137 """
6138 return _core_.Window_SetSizeWH(*args, **kwargs)
6139
6140 def Move(*args, **kwargs):
6141 """
6142 Move(self, Point pt, int flags=SIZE_USE_EXISTING)
6143
6144 Moves the window to the given position.
6145 """
6146 return _core_.Window_Move(*args, **kwargs)
6147
6148 SetPosition = Move
6149 def MoveXY(*args, **kwargs):
6150 """
6151 MoveXY(self, int x, int y, int flags=SIZE_USE_EXISTING)
6152
6153 Moves the window to the given position.
6154 """
6155 return _core_.Window_MoveXY(*args, **kwargs)
6156
f8167d6e
RD
6157 def SetBestFittingSize(*args, **kwargs):
6158 """
6159 SetBestFittingSize(self, Size size=DefaultSize)
6160
6161 A 'Smart' SetSize that will fill in default size components with the
6162 window's *best size* values. Also set's the minsize for use with sizers.
6163 """
6164 return _core_.Window_SetBestFittingSize(*args, **kwargs)
6165
d55e5bfc
RD
6166 def Raise(*args, **kwargs):
6167 """
6168 Raise(self)
6169
6170 Raises the window to the top of the window hierarchy if it is a
6171 managed window (dialog or frame).
6172 """
6173 return _core_.Window_Raise(*args, **kwargs)
6174
6175 def Lower(*args, **kwargs):
6176 """
6177 Lower(self)
6178
6179 Lowers the window to the bottom of the window hierarchy if it is a
6180 managed window (dialog or frame).
6181 """
6182 return _core_.Window_Lower(*args, **kwargs)
6183
6184 def SetClientSize(*args, **kwargs):
6185 """
6186 SetClientSize(self, Size size)
6187
6188 This sets the size of the window client area in pixels. Using this
6189 function to size a window tends to be more device-independent than
6190 wx.Window.SetSize, since the application need not worry about what
6191 dimensions the border or title bar have when trying to fit the window
6192 around panel items, for example.
6193 """
6194 return _core_.Window_SetClientSize(*args, **kwargs)
6195
6196 def SetClientSizeWH(*args, **kwargs):
6197 """
6198 SetClientSizeWH(self, int width, int height)
6199
6200 This sets the size of the window client area in pixels. Using this
6201 function to size a window tends to be more device-independent than
6202 wx.Window.SetSize, since the application need not worry about what
6203 dimensions the border or title bar have when trying to fit the window
6204 around panel items, for example.
6205 """
6206 return _core_.Window_SetClientSizeWH(*args, **kwargs)
6207
6208 def SetClientRect(*args, **kwargs):
6209 """
6210 SetClientRect(self, Rect rect)
6211
6212 This sets the size of the window client area in pixels. Using this
6213 function to size a window tends to be more device-independent than
6214 wx.Window.SetSize, since the application need not worry about what
6215 dimensions the border or title bar have when trying to fit the window
6216 around panel items, for example.
6217 """
6218 return _core_.Window_SetClientRect(*args, **kwargs)
6219
6220 def GetPosition(*args, **kwargs):
6221 """
6222 GetPosition(self) -> Point
6223
6224 Get the window's position.
6225 """
6226 return _core_.Window_GetPosition(*args, **kwargs)
6227
6228 def GetPositionTuple(*args, **kwargs):
6229 """
6230 GetPositionTuple() -> (x,y)
6231
6232 Get the window's position.
6233 """
6234 return _core_.Window_GetPositionTuple(*args, **kwargs)
6235
6236 def GetSize(*args, **kwargs):
6237 """
6238 GetSize(self) -> Size
6239
6240 Get the window size.
6241 """
6242 return _core_.Window_GetSize(*args, **kwargs)
6243
6244 def GetSizeTuple(*args, **kwargs):
6245 """
6246 GetSizeTuple() -> (width, height)
6247
6248 Get the window size.
6249 """
6250 return _core_.Window_GetSizeTuple(*args, **kwargs)
6251
6252 def GetRect(*args, **kwargs):
6253 """
6254 GetRect(self) -> Rect
6255
6256 Returns the size and position of the window as a wx.Rect object.
6257 """
6258 return _core_.Window_GetRect(*args, **kwargs)
6259
6260 def GetClientSize(*args, **kwargs):
6261 """
6262 GetClientSize(self) -> Size
6263
6264 This gets the size of the window's 'client area' in pixels. The client
6265 area is the area which may be drawn on by the programmer, excluding
6266 title bar, border, scrollbars, etc.
6267 """
6268 return _core_.Window_GetClientSize(*args, **kwargs)
6269
6270 def GetClientSizeTuple(*args, **kwargs):
6271 """
6272 GetClientSizeTuple() -> (width, height)
6273
6274 This gets the size of the window's 'client area' in pixels. The client
6275 area is the area which may be drawn on by the programmer, excluding
6276 title bar, border, scrollbars, etc.
6277 """
6278 return _core_.Window_GetClientSizeTuple(*args, **kwargs)
6279
6280 def GetClientAreaOrigin(*args, **kwargs):
6281 """
6282 GetClientAreaOrigin(self) -> Point
6283
6284 Get the origin of the client area of the window relative to the
6285 window's top left corner (the client area may be shifted because of
6286 the borders, scrollbars, other decorations...)
6287 """
6288 return _core_.Window_GetClientAreaOrigin(*args, **kwargs)
6289
6290 def GetClientRect(*args, **kwargs):
6291 """
6292 GetClientRect(self) -> Rect
6293
0439c23b 6294 Get the client area position and size as a `wx.Rect` object.
d55e5bfc
RD
6295 """
6296 return _core_.Window_GetClientRect(*args, **kwargs)
6297
6298 def GetBestSize(*args, **kwargs):
6299 """
6300 GetBestSize(self) -> Size
6301
bfddbb17 6302 This function returns the best acceptable minimal size for the
15817c7e
RD
6303 window, if applicable. For example, for a static text control, it will
6304 be the minimal size such that the control label is not truncated. For
6305 windows containing subwindows (suzh aswx.Panel), the size returned by
6306 this function will be the same as the size the window would have had
6307 after calling Fit.
d55e5bfc
RD
6308 """
6309 return _core_.Window_GetBestSize(*args, **kwargs)
6310
6311 def GetBestSizeTuple(*args, **kwargs):
6312 """
6313 GetBestSizeTuple() -> (width, height)
6314
bfddbb17 6315 This function returns the best acceptable minimal size for the
15817c7e
RD
6316 window, if applicable. For example, for a static text control, it will
6317 be the minimal size such that the control label is not truncated. For
6318 windows containing subwindows (suzh aswx.Panel), the size returned by
6319 this function will be the same as the size the window would have had
6320 after calling Fit.
d55e5bfc
RD
6321 """
6322 return _core_.Window_GetBestSizeTuple(*args, **kwargs)
6323
a001823c
RD
6324 def InvalidateBestSize(*args, **kwargs):
6325 """
6326 InvalidateBestSize(self)
6327
6328 Reset the cached best size value so it will be recalculated the next
6329 time it is needed.
6330 """
6331 return _core_.Window_InvalidateBestSize(*args, **kwargs)
6332
6333 def GetBestFittingSize(*args, **kwargs):
6334 """
6335 GetBestFittingSize(self) -> Size
6336
6337 This function will merge the window's best size into the window's
6338 minimum size, giving priority to the min size components, and returns
6339 the results.
6340
6341 """
6342 return _core_.Window_GetBestFittingSize(*args, **kwargs)
6343
d55e5bfc
RD
6344 def GetAdjustedBestSize(*args, **kwargs):
6345 """
6346 GetAdjustedBestSize(self) -> Size
6347
6348 This method is similar to GetBestSize, except in one
6349 thing. GetBestSize should return the minimum untruncated size of the
6350 window, while this method will return the largest of BestSize and any
6351 user specified minimum size. ie. it is the minimum size the window
6352 should currently be drawn at, not the minimal size it can possibly
6353 tolerate.
6354 """
6355 return _core_.Window_GetAdjustedBestSize(*args, **kwargs)
6356
6357 def Center(*args, **kwargs):
6358 """
6359 Center(self, int direction=BOTH)
6360
6361 Centers the window. The parameter specifies the direction for
6362 cetering, and may be wx.HORIZONTAL, wx.VERTICAL or wx.BOTH. It may
6363 also include wx.CENTER_ON_SCREEN flag if you want to center the window
6364 on the entire screen and not on its parent window. If it is a
6365 top-level window and has no parent then it will always be centered
6366 relative to the screen.
6367 """
6368 return _core_.Window_Center(*args, **kwargs)
6369
6370 Centre = Center
6371 def CenterOnScreen(*args, **kwargs):
6372 """
6373 CenterOnScreen(self, int dir=BOTH)
6374
6375 Center on screen (only works for top level windows)
6376 """
6377 return _core_.Window_CenterOnScreen(*args, **kwargs)
6378
6379 CentreOnScreen = CenterOnScreen
6380 def CenterOnParent(*args, **kwargs):
6381 """
6382 CenterOnParent(self, int dir=BOTH)
6383
6384 Center with respect to the the parent window
6385 """
6386 return _core_.Window_CenterOnParent(*args, **kwargs)
6387
6388 CentreOnParent = CenterOnParent
6389 def Fit(*args, **kwargs):
6390 """
6391 Fit(self)
6392
6393 Sizes the window so that it fits around its subwindows. This function
6394 won't do anything if there are no subwindows and will only really work
6395 correctly if sizers are used for the subwindows layout. Also, if the
6396 window has exactly one subwindow it is better (faster and the result
6397 is more precise as Fit adds some margin to account for fuzziness of
6398 its calculations) to call window.SetClientSize(child.GetSize())
6399 instead of calling Fit.
6400 """
6401 return _core_.Window_Fit(*args, **kwargs)
6402
6403 def FitInside(*args, **kwargs):
6404 """
6405 FitInside(self)
6406
6407 Similar to Fit, but sizes the interior (virtual) size of a
6408 window. Mainly useful with scrolled windows to reset scrollbars after
6409 sizing changes that do not trigger a size event, and/or scrolled
6410 windows without an interior sizer. This function similarly won't do
6411 anything if there are no subwindows.
6412 """
6413 return _core_.Window_FitInside(*args, **kwargs)
6414
03837c5c 6415 def SetSizeHints(*args, **kwargs):
d55e5bfc
RD
6416 """
6417 SetSizeHints(self, int minW, int minH, int maxW=-1, int maxH=-1, int incW=-1,
6418 int incH=-1)
d55e5bfc
RD
6419
6420 Allows specification of minimum and maximum window sizes, and window
6421 size increments. If a pair of values is not set (or set to -1), the
6422 default values will be used. If this function is called, the user
908b74cd
RD
6423 will not be able to size the window outside the given bounds (if it is
6424 a top-level window.) Sizers will also inspect the minimum window size
6425 and will use that value if set when calculating layout.
6426
6427 The resizing increments are only significant under Motif or Xt.
d55e5bfc 6428 """
03837c5c 6429 return _core_.Window_SetSizeHints(*args, **kwargs)
d55e5bfc 6430
03837c5c
RD
6431 def SetSizeHintsSz(*args, **kwargs):
6432 """
6433 SetSizeHintsSz(self, Size minSize, Size maxSize=DefaultSize, Size incSize=DefaultSize)
6434
6435 Allows specification of minimum and maximum window sizes, and window
6436 size increments. If a pair of values is not set (or set to -1), the
6437 default values will be used. If this function is called, the user
6438 will not be able to size the window outside the given bounds (if it is
6439 a top-level window.) Sizers will also inspect the minimum window size
6440 and will use that value if set when calculating layout.
6441
6442 The resizing increments are only significant under Motif or Xt.
6443 """
6444 return _core_.Window_SetSizeHintsSz(*args, **kwargs)
6445
6446 def SetVirtualSizeHints(*args, **kwargs):
d55e5bfc 6447 """
908b74cd 6448 SetVirtualSizeHints(self, int minW, int minH, int maxW=-1, int maxH=-1)
d55e5bfc
RD
6449
6450 Allows specification of minimum and maximum virtual window sizes. If a
6451 pair of values is not set (or set to -1), the default values will be
6452 used. If this function is called, the user will not be able to size
6453 the virtual area of the window outside the given bounds.
6454 """
03837c5c
RD
6455 return _core_.Window_SetVirtualSizeHints(*args, **kwargs)
6456
6457 def SetVirtualSizeHintsSz(*args, **kwargs):
6458 """
6459 SetVirtualSizeHintsSz(self, Size minSize, Size maxSize=DefaultSize)
6460
6461 Allows specification of minimum and maximum virtual window sizes. If a
6462 pair of values is not set (or set to -1), the default values will be
6463 used. If this function is called, the user will not be able to size
6464 the virtual area of the window outside the given bounds.
6465 """
6466 return _core_.Window_SetVirtualSizeHintsSz(*args, **kwargs)
d55e5bfc 6467
908b74cd
RD
6468 def GetMaxSize(*args, **kwargs):
6469 """GetMaxSize(self) -> Size"""
6470 return _core_.Window_GetMaxSize(*args, **kwargs)
6471
6472 def GetMinSize(*args, **kwargs):
6473 """GetMinSize(self) -> Size"""
6474 return _core_.Window_GetMinSize(*args, **kwargs)
6475
6476 def SetMinSize(*args, **kwargs):
6477 """
6478 SetMinSize(self, Size minSize)
6479
6480 A more convenient method than `SetSizeHints` for setting just the
6481 min size.
6482 """
6483 return _core_.Window_SetMinSize(*args, **kwargs)
6484
6485 def SetMaxSize(*args, **kwargs):
6486 """
6487 SetMaxSize(self, Size maxSize)
6488
6489 A more convenient method than `SetSizeHints` for setting just the
6490 max size.
6491 """
6492 return _core_.Window_SetMaxSize(*args, **kwargs)
6493
d55e5bfc
RD
6494 def GetMinWidth(*args, **kwargs):
6495 """GetMinWidth(self) -> int"""
6496 return _core_.Window_GetMinWidth(*args, **kwargs)
6497
6498 def GetMinHeight(*args, **kwargs):
6499 """GetMinHeight(self) -> int"""
6500 return _core_.Window_GetMinHeight(*args, **kwargs)
6501
6502 def GetMaxWidth(*args, **kwargs):
6503 """GetMaxWidth(self) -> int"""
6504 return _core_.Window_GetMaxWidth(*args, **kwargs)
6505
6506 def GetMaxHeight(*args, **kwargs):
6507 """GetMaxHeight(self) -> int"""
6508 return _core_.Window_GetMaxHeight(*args, **kwargs)
6509
d55e5bfc
RD
6510 def SetVirtualSize(*args, **kwargs):
6511 """
6512 SetVirtualSize(self, Size size)
6513
6514 Set the the virtual size of a window in pixels. For most windows this
6515 is just the client area of the window, but for some like scrolled
6516 windows it is more or less independent of the screen window size.
6517 """
6518 return _core_.Window_SetVirtualSize(*args, **kwargs)
6519
6520 def SetVirtualSizeWH(*args, **kwargs):
6521 """
6522 SetVirtualSizeWH(self, int w, int h)
6523
6524 Set the the virtual size of a window in pixels. For most windows this
6525 is just the client area of the window, but for some like scrolled
6526 windows it is more or less independent of the screen window size.
6527 """
6528 return _core_.Window_SetVirtualSizeWH(*args, **kwargs)
6529
6530 def GetVirtualSize(*args, **kwargs):
6531 """
6532 GetVirtualSize(self) -> Size
6533
6534 Get the the virtual size of the window in pixels. For most windows
6535 this is just the client area of the window, but for some like scrolled
6536 windows it is more or less independent of the screen window size.
6537 """
6538 return _core_.Window_GetVirtualSize(*args, **kwargs)
6539
6540 def GetVirtualSizeTuple(*args, **kwargs):
6541 """
6542 GetVirtualSizeTuple() -> (width, height)
6543
6544 Get the the virtual size of the window in pixels. For most windows
6545 this is just the client area of the window, but for some like scrolled
6546 windows it is more or less independent of the screen window size.
6547 """
6548 return _core_.Window_GetVirtualSizeTuple(*args, **kwargs)
6549
6550 def GetBestVirtualSize(*args, **kwargs):
6551 """
6552 GetBestVirtualSize(self) -> Size
6553
6554 Return the largest of ClientSize and BestSize (as determined by a
6555 sizer, interior children, or other means)
6556 """
6557 return _core_.Window_GetBestVirtualSize(*args, **kwargs)
6558
6559 def Show(*args, **kwargs):
6560 """
6561 Show(self, bool show=True) -> bool
6562
6563 Shows or hides the window. You may need to call Raise for a top level
6564 window if you want to bring it to top, although this is not needed if
6565 Show is called immediately after the frame creation. Returns True if
6566 the window has been shown or hidden or False if nothing was done
6567 because it already was in the requested state.
6568 """
6569 return _core_.Window_Show(*args, **kwargs)
6570
6571 def Hide(*args, **kwargs):
6572 """
6573 Hide(self) -> bool
6574
6575 Equivalent to calling Show(False).
6576 """
6577 return _core_.Window_Hide(*args, **kwargs)
6578
6579 def Enable(*args, **kwargs):
6580 """
6581 Enable(self, bool enable=True) -> bool
6582
6583 Enable or disable the window for user input. Note that when a parent
6584 window is disabled, all of its children are disabled as well and they
6585 are reenabled again when the parent is. Returns true if the window
6586 has been enabled or disabled, false if nothing was done, i.e. if the
6587 window had already been in the specified state.
6588 """
6589 return _core_.Window_Enable(*args, **kwargs)
6590
6591 def Disable(*args, **kwargs):
6592 """
6593 Disable(self) -> bool
6594
6595 Disables the window, same as Enable(false).
6596 """
6597 return _core_.Window_Disable(*args, **kwargs)
6598
6599 def IsShown(*args, **kwargs):
6600 """
6601 IsShown(self) -> bool
6602
6603 Returns true if the window is shown, false if it has been hidden.
6604 """
6605 return _core_.Window_IsShown(*args, **kwargs)
6606
6607 def IsEnabled(*args, **kwargs):
6608 """
6609 IsEnabled(self) -> bool
6610
6611 Returns true if the window is enabled for input, false otherwise.
6612 """
6613 return _core_.Window_IsEnabled(*args, **kwargs)
6614
6615 def SetWindowStyleFlag(*args, **kwargs):
6616 """
6617 SetWindowStyleFlag(self, long style)
6618
15817c7e
RD
6619 Sets the style of the window. Please note that some styles cannot be
6620 changed after the window creation and that Refresh() might need to be
6621 called after changing the others for the change to take place
6622 immediately.
d55e5bfc
RD
6623 """
6624 return _core_.Window_SetWindowStyleFlag(*args, **kwargs)
6625
6626 def GetWindowStyleFlag(*args, **kwargs):
6627 """
6628 GetWindowStyleFlag(self) -> long
6629
6630 Gets the window style that was passed to the constructor or Create
6631 method.
6632 """
6633 return _core_.Window_GetWindowStyleFlag(*args, **kwargs)
6634
6635 SetWindowStyle = SetWindowStyleFlag; GetWindowStyle = GetWindowStyleFlag
6636 def HasFlag(*args, **kwargs):
6637 """
6638 HasFlag(self, int flag) -> bool
6639
6640 Test if the given style is set for this window.
6641 """
6642 return _core_.Window_HasFlag(*args, **kwargs)
6643
6644 def IsRetained(*args, **kwargs):
6645 """
6646 IsRetained(self) -> bool
6647
6648 Returns true if the window is retained, false otherwise. Retained
6649 windows are only available on X platforms.
6650 """
6651 return _core_.Window_IsRetained(*args, **kwargs)
6652
6653 def SetExtraStyle(*args, **kwargs):
6654 """
6655 SetExtraStyle(self, long exStyle)
6656
6657 Sets the extra style bits for the window. Extra styles are the less
6658 often used style bits which can't be set with the constructor or with
6659 SetWindowStyleFlag()
6660 """
6661 return _core_.Window_SetExtraStyle(*args, **kwargs)
6662
6663 def GetExtraStyle(*args, **kwargs):
6664 """
6665 GetExtraStyle(self) -> long
6666
6667 Returns the extra style bits for the window.
6668 """
6669 return _core_.Window_GetExtraStyle(*args, **kwargs)
6670
6671 def MakeModal(*args, **kwargs):
6672 """
6673 MakeModal(self, bool modal=True)
6674
6675 Disables all other windows in the application so that the user can
6676 only interact with this window. Passing False will reverse this
6677 effect.
6678 """
6679 return _core_.Window_MakeModal(*args, **kwargs)
6680
6681 def SetThemeEnabled(*args, **kwargs):
6682 """
6683 SetThemeEnabled(self, bool enableTheme)
6684
6685 This function tells a window if it should use the system's "theme"
6686 code to draw the windows' background instead if its own background
6687 drawing code. This will only have an effect on platforms that support
6688 the notion of themes in user defined windows. One such platform is
6689 GTK+ where windows can have (very colourful) backgrounds defined by a
6690 user's selected theme.
6691
6692 Dialogs, notebook pages and the status bar have this flag set to true
6693 by default so that the default look and feel is simulated best.
6694 """
6695 return _core_.Window_SetThemeEnabled(*args, **kwargs)
6696
6697 def GetThemeEnabled(*args, **kwargs):
6698 """
6699 GetThemeEnabled(self) -> bool
6700
6701 Return the themeEnabled flag.
6702 """
6703 return _core_.Window_GetThemeEnabled(*args, **kwargs)
6704
6705 def SetFocus(*args, **kwargs):
6706 """
6707 SetFocus(self)
6708
6709 Set's the focus to this window, allowing it to receive keyboard input.
6710 """
6711 return _core_.Window_SetFocus(*args, **kwargs)
6712
6713 def SetFocusFromKbd(*args, **kwargs):
6714 """
6715 SetFocusFromKbd(self)
6716
6717 Set focus to this window as the result of a keyboard action. Normally
6718 only called internally.
6719 """
6720 return _core_.Window_SetFocusFromKbd(*args, **kwargs)
6721
6722 def FindFocus(*args, **kwargs):
6723 """
d6c14a4c 6724 FindFocus() -> Window
d55e5bfc
RD
6725
6726 Returns the window or control that currently has the keyboard focus,
6727 or None.
6728 """
6729 return _core_.Window_FindFocus(*args, **kwargs)
6730
6731 FindFocus = staticmethod(FindFocus)
6732 def AcceptsFocus(*args, **kwargs):
6733 """
6734 AcceptsFocus(self) -> bool
6735
6736 Can this window have focus?
6737 """
6738 return _core_.Window_AcceptsFocus(*args, **kwargs)
6739
6740 def AcceptsFocusFromKeyboard(*args, **kwargs):
6741 """
6742 AcceptsFocusFromKeyboard(self) -> bool
6743
6744 Can this window be given focus by keyboard navigation? if not, the
6745 only way to give it focus (provided it accepts it at all) is to click
6746 it.
6747 """
6748 return _core_.Window_AcceptsFocusFromKeyboard(*args, **kwargs)
6749
6750 def GetDefaultItem(*args, **kwargs):
6751 """
6752 GetDefaultItem(self) -> Window
6753
6754 Get the default child of this parent, i.e. the one which is activated
6755 by pressing <Enter> such as the OK button on a wx.Dialog.
6756 """
6757 return _core_.Window_GetDefaultItem(*args, **kwargs)
6758
6759 def SetDefaultItem(*args, **kwargs):
6760 """
6761 SetDefaultItem(self, Window child) -> Window
6762
6763 Set this child as default, return the old default.
6764 """
6765 return _core_.Window_SetDefaultItem(*args, **kwargs)
6766
6767 def SetTmpDefaultItem(*args, **kwargs):
6768 """
6769 SetTmpDefaultItem(self, Window win)
6770
6771 Set this child as temporary default
6772 """
6773 return _core_.Window_SetTmpDefaultItem(*args, **kwargs)
6774
908b74cd
RD
6775 def Navigate(*args, **kwargs):
6776 """
6777 Navigate(self, int flags=NavigationKeyEvent.IsForward) -> bool
6778
fd2dc343
RD
6779 Does keyboard navigation from this window to another, by sending a
6780 `wx.NavigationKeyEvent`.
908b74cd
RD
6781 """
6782 return _core_.Window_Navigate(*args, **kwargs)
6783
bf26d883
RD
6784 def MoveAfterInTabOrder(*args, **kwargs):
6785 """
6786 MoveAfterInTabOrder(self, Window win)
6787
6788 Moves this window in the tab navigation order after the specified
6789 sibling window. This means that when the user presses the TAB key on
6790 that other window, the focus switches to this window.
6791
6792 The default tab order is the same as creation order. This function
6793 and `MoveBeforeInTabOrder` allow to change it after creating all the
6794 windows.
6795
6796 """
6797 return _core_.Window_MoveAfterInTabOrder(*args, **kwargs)
6798
6799 def MoveBeforeInTabOrder(*args, **kwargs):
6800 """
6801 MoveBeforeInTabOrder(self, Window win)
6802
6803 Same as `MoveAfterInTabOrder` except that it inserts this window just
6804 before win instead of putting it right after it.
6805 """
6806 return _core_.Window_MoveBeforeInTabOrder(*args, **kwargs)
6807
d55e5bfc
RD
6808 def GetChildren(*args, **kwargs):
6809 """
6810 GetChildren(self) -> PyObject
6811
6812 Returns a list of the window's children. NOTE: Currently this is a
6813 copy of the child window list maintained by the window, so the return
6814 value of this function is only valid as long as the window's children
6815 do not change.
6816 """
6817 return _core_.Window_GetChildren(*args, **kwargs)
6818
6819 def GetParent(*args, **kwargs):
6820 """
6821 GetParent(self) -> Window
6822
6823 Returns the parent window of this window, or None if there isn't one.
6824 """
6825 return _core_.Window_GetParent(*args, **kwargs)
6826
6827 def GetGrandParent(*args, **kwargs):
6828 """
6829 GetGrandParent(self) -> Window
6830
15817c7e
RD
6831 Returns the parent of the parent of this window, or None if there
6832 isn't one.
d55e5bfc
RD
6833 """
6834 return _core_.Window_GetGrandParent(*args, **kwargs)
6835
6836 def IsTopLevel(*args, **kwargs):
6837 """
6838 IsTopLevel(self) -> bool
6839
6840 Returns true if the given window is a top-level one. Currently all
6841 frames and dialogs are always considered to be top-level windows (even
6842 if they have a parent window).
6843 """
6844 return _core_.Window_IsTopLevel(*args, **kwargs)
6845
6846 def Reparent(*args, **kwargs):
6847 """
6848 Reparent(self, Window newParent) -> bool
6849
6850 Reparents the window, i.e the window will be removed from its current
6851 parent window (e.g. a non-standard toolbar in a wxFrame) and then
6852 re-inserted into another. Available on Windows and GTK. Returns True
6853 if the parent was changed, False otherwise (error or newParent ==
6854 oldParent)
6855 """
6856 return _core_.Window_Reparent(*args, **kwargs)
6857
6858 def AddChild(*args, **kwargs):
6859 """
6860 AddChild(self, Window child)
6861
6862 Adds a child window. This is called automatically by window creation
6863 functions so should not be required by the application programmer.
6864 """
6865 return _core_.Window_AddChild(*args, **kwargs)
6866
6867 def RemoveChild(*args, **kwargs):
6868 """
6869 RemoveChild(self, Window child)
6870
6871 Removes a child window. This is called automatically by window
6872 deletion functions so should not be required by the application
6873 programmer.
6874 """
6875 return _core_.Window_RemoveChild(*args, **kwargs)
6876
6877 def FindWindowById(*args, **kwargs):
6878 """
6879 FindWindowById(self, long winid) -> Window
6880
6881 Find a chld of this window by window ID
6882 """
6883 return _core_.Window_FindWindowById(*args, **kwargs)
6884
6885 def FindWindowByName(*args, **kwargs):
6886 """
6887 FindWindowByName(self, String name) -> Window
6888
6889 Find a child of this window by name
6890 """
6891 return _core_.Window_FindWindowByName(*args, **kwargs)
6892
6893 def GetEventHandler(*args, **kwargs):
6894 """
6895 GetEventHandler(self) -> EvtHandler
6896
6897 Returns the event handler for this window. By default, the window is
6898 its own event handler.
6899 """
6900 return _core_.Window_GetEventHandler(*args, **kwargs)
6901
6902 def SetEventHandler(*args, **kwargs):
6903 """
6904 SetEventHandler(self, EvtHandler handler)
6905
6906 Sets the event handler for this window. An event handler is an object
6907 that is capable of processing the events sent to a window. By default,
6908 the window is its own event handler, but an application may wish to
6909 substitute another, for example to allow central implementation of
6910 event-handling for a variety of different window classes.
6911
15817c7e 6912 It is usually better to use `wx.Window.PushEventHandler` since this sets
d55e5bfc
RD
6913 up a chain of event handlers, where an event not handled by one event
6914 handler is handed to the next one in the chain.
6915 """
6916 return _core_.Window_SetEventHandler(*args, **kwargs)
6917
6918 def PushEventHandler(*args, **kwargs):
6919 """
6920 PushEventHandler(self, EvtHandler handler)
6921
6922 Pushes this event handler onto the event handler stack for the window.
6923 An event handler is an object that is capable of processing the events
6924 sent to a window. By default, the window is its own event handler, but
6925 an application may wish to substitute another, for example to allow
6926 central implementation of event-handling for a variety of different
6927 window classes.
6928
6929 wx.Window.PushEventHandler allows an application to set up a chain of
6930 event handlers, where an event not handled by one event handler is
15817c7e 6931 handed to the next one in the chain. Use `wx.Window.PopEventHandler` to
d55e5bfc
RD
6932 remove the event handler.
6933 """
6934 return _core_.Window_PushEventHandler(*args, **kwargs)
6935
6936 def PopEventHandler(*args, **kwargs):
6937 """
6938 PopEventHandler(self, bool deleteHandler=False) -> EvtHandler
6939
6940 Removes and returns the top-most event handler on the event handler
6941 stack. If deleteHandler is True then the wx.EvtHandler object will be
6942 destroyed after it is popped.
6943 """
6944 return _core_.Window_PopEventHandler(*args, **kwargs)
6945
6946 def RemoveEventHandler(*args, **kwargs):
6947 """
6948 RemoveEventHandler(self, EvtHandler handler) -> bool
6949
15817c7e
RD
6950 Find the given handler in the event handler chain and remove (but not
6951 delete) it from the event handler chain, return True if it was found
6952 and False otherwise (this also results in an assert failure so this
6953 function should only be called when the handler is supposed to be
6954 there.)
d55e5bfc
RD
6955 """
6956 return _core_.Window_RemoveEventHandler(*args, **kwargs)
6957
6958 def SetValidator(*args, **kwargs):
6959 """
6960 SetValidator(self, Validator validator)
6961
6962 Deletes the current validator (if any) and sets the window validator,
6963 having called wx.Validator.Clone to create a new validator of this
6964 type.
6965 """
6966 return _core_.Window_SetValidator(*args, **kwargs)
6967
6968 def GetValidator(*args, **kwargs):
6969 """
6970 GetValidator(self) -> Validator
6971
6972 Returns a pointer to the current validator for the window, or None if
6973 there is none.
6974 """
6975 return _core_.Window_GetValidator(*args, **kwargs)
6976
6977 def Validate(*args, **kwargs):
6978 """
6979 Validate(self) -> bool
6980
6981 Validates the current values of the child controls using their
15817c7e
RD
6982 validators. If the window has wx.WS_EX_VALIDATE_RECURSIVELY extra
6983 style flag set, the method will also call Validate() of all child
6984 windows. Returns false if any of the validations failed.
d55e5bfc
RD
6985 """
6986 return _core_.Window_Validate(*args, **kwargs)
6987
6988 def TransferDataToWindow(*args, **kwargs):
6989 """
6990 TransferDataToWindow(self) -> bool
6991
15817c7e
RD
6992 Transfers values to child controls from data areas specified by their
6993 validators. If the window has wx.WS_EX_VALIDATE_RECURSIVELY extra
6994 style flag set, the method will also call TransferDataToWindow() of
6995 all child windows.
d55e5bfc
RD
6996 """
6997 return _core_.Window_TransferDataToWindow(*args, **kwargs)
6998
6999 def TransferDataFromWindow(*args, **kwargs):
7000 """
7001 TransferDataFromWindow(self) -> bool
7002
15817c7e
RD
7003 Transfers values from child controls to data areas specified by their
7004 validators. Returns false if a transfer failed. If the window has
7005 wx.WS_EX_VALIDATE_RECURSIVELY extra style flag set, the method will
7006 also call TransferDataFromWindow() of all child windows.
d55e5bfc
RD
7007 """
7008 return _core_.Window_TransferDataFromWindow(*args, **kwargs)
7009
7010 def InitDialog(*args, **kwargs):
7011 """
7012 InitDialog(self)
7013
15817c7e
RD
7014 Sends an EVT_INIT_DIALOG event, whose handler usually transfers data
7015 to the dialog via validators.
d55e5bfc
RD
7016 """
7017 return _core_.Window_InitDialog(*args, **kwargs)
7018
7019 def SetAcceleratorTable(*args, **kwargs):
7020 """
7021 SetAcceleratorTable(self, AcceleratorTable accel)
7022
7023 Sets the accelerator table for this window.
7024 """
7025 return _core_.Window_SetAcceleratorTable(*args, **kwargs)
7026
7027 def GetAcceleratorTable(*args, **kwargs):
7028 """
7029 GetAcceleratorTable(self) -> AcceleratorTable
7030
7031 Gets the accelerator table for this window.
7032 """
7033 return _core_.Window_GetAcceleratorTable(*args, **kwargs)
7034
7035 def RegisterHotKey(*args, **kwargs):
7036 """
7037 RegisterHotKey(self, int hotkeyId, int modifiers, int keycode) -> bool
7038
7039 Registers a system wide hotkey. Every time the user presses the hotkey
7040 registered here, this window will receive a hotkey event. It will
7041 receive the event even if the application is in the background and
7042 does not have the input focus because the user is working with some
7043 other application. To bind an event handler function to this hotkey
7044 use EVT_HOTKEY with an id equal to hotkeyId. Returns True if the
7045 hotkey was registered successfully.
7046 """
7047 return _core_.Window_RegisterHotKey(*args, **kwargs)
7048
7049 def UnregisterHotKey(*args, **kwargs):
7050 """
7051 UnregisterHotKey(self, int hotkeyId) -> bool
7052
7053 Unregisters a system wide hotkey.
7054 """
7055 return _core_.Window_UnregisterHotKey(*args, **kwargs)
7056
7057 def ConvertDialogPointToPixels(*args, **kwargs):
7058 """
7059 ConvertDialogPointToPixels(self, Point pt) -> Point
7060
7061 Converts a point or size from dialog units to pixels. Dialog units
7062 are used for maintaining a dialog's proportions even if the font
7063 changes. For the x dimension, the dialog units are multiplied by the
7064 average character width and then divided by 4. For the y dimension,
7065 the dialog units are multiplied by the average character height and
7066 then divided by 8.
7067 """
7068 return _core_.Window_ConvertDialogPointToPixels(*args, **kwargs)
7069
7070 def ConvertDialogSizeToPixels(*args, **kwargs):
7071 """
7072 ConvertDialogSizeToPixels(self, Size sz) -> Size
7073
7074 Converts a point or size from dialog units to pixels. Dialog units
7075 are used for maintaining a dialog's proportions even if the font
7076 changes. For the x dimension, the dialog units are multiplied by the
7077 average character width and then divided by 4. For the y dimension,
7078 the dialog units are multiplied by the average character height and
7079 then divided by 8.
7080 """
7081 return _core_.Window_ConvertDialogSizeToPixels(*args, **kwargs)
7082
7083 def DLG_PNT(*args, **kwargs):
7084 """
7085 DLG_PNT(self, Point pt) -> Point
7086
7087 Converts a point or size from dialog units to pixels. Dialog units
7088 are used for maintaining a dialog's proportions even if the font
7089 changes. For the x dimension, the dialog units are multiplied by the
7090 average character width and then divided by 4. For the y dimension,
7091 the dialog units are multiplied by the average character height and
7092 then divided by 8.
7093 """
7094 return _core_.Window_DLG_PNT(*args, **kwargs)
7095
7096 def DLG_SZE(*args, **kwargs):
7097 """
7098 DLG_SZE(self, Size sz) -> Size
7099
7100 Converts a point or size from dialog units to pixels. Dialog units
7101 are used for maintaining a dialog's proportions even if the font
7102 changes. For the x dimension, the dialog units are multiplied by the
7103 average character width and then divided by 4. For the y dimension,
7104 the dialog units are multiplied by the average character height and
7105 then divided by 8.
7106 """
7107 return _core_.Window_DLG_SZE(*args, **kwargs)
7108
7109 def ConvertPixelPointToDialog(*args, **kwargs):
7110 """ConvertPixelPointToDialog(self, Point pt) -> Point"""
7111 return _core_.Window_ConvertPixelPointToDialog(*args, **kwargs)
7112
7113 def ConvertPixelSizeToDialog(*args, **kwargs):
7114 """ConvertPixelSizeToDialog(self, Size sz) -> Size"""
7115 return _core_.Window_ConvertPixelSizeToDialog(*args, **kwargs)
7116
7117 def WarpPointer(*args, **kwargs):
7118 """
7119 WarpPointer(self, int x, int y)
7120
7121 Moves the pointer to the given position on the window.
7122
7123 NOTE: This function is not supported under Mac because Apple Human
7124 Interface Guidelines forbid moving the mouse cursor programmatically.
7125 """
7126 return _core_.Window_WarpPointer(*args, **kwargs)
7127
7128 def CaptureMouse(*args, **kwargs):
7129 """
7130 CaptureMouse(self)
7131
7132 Directs all mouse input to this window. Call wx.Window.ReleaseMouse to
7133 release the capture.
7134
7135 Note that wxWindows maintains the stack of windows having captured the
7136 mouse and when the mouse is released the capture returns to the window
7137 which had had captured it previously and it is only really released if
7138 there were no previous window. In particular, this means that you must
7139 release the mouse as many times as you capture it.
7140 """
7141 return _core_.Window_CaptureMouse(*args, **kwargs)
7142
7143 def ReleaseMouse(*args, **kwargs):
7144 """
7145 ReleaseMouse(self)
7146
7147 Releases mouse input captured with wx.Window.CaptureMouse.
7148 """
7149 return _core_.Window_ReleaseMouse(*args, **kwargs)
7150
7151 def GetCapture(*args, **kwargs):
7152 """
d6c14a4c 7153 GetCapture() -> Window
d55e5bfc
RD
7154
7155 Returns the window which currently captures the mouse or None
7156 """
7157 return _core_.Window_GetCapture(*args, **kwargs)
7158
7159 GetCapture = staticmethod(GetCapture)
7160 def HasCapture(*args, **kwargs):
7161 """
7162 HasCapture(self) -> bool
7163
7164 Returns true if this window has the current mouse capture.
7165 """
7166 return _core_.Window_HasCapture(*args, **kwargs)
7167
7168 def Refresh(*args, **kwargs):
7169 """
7170 Refresh(self, bool eraseBackground=True, Rect rect=None)
7171
7172 Mark the specified rectangle (or the whole window) as "dirty" so it
7173 will be repainted. Causes an EVT_PAINT event to be generated and sent
7174 to the window.
7175 """
7176 return _core_.Window_Refresh(*args, **kwargs)
7177
7178 def RefreshRect(*args, **kwargs):
7179 """
fef4c27a 7180 RefreshRect(self, Rect rect, bool eraseBackground=True)
d55e5bfc
RD
7181
7182 Redraws the contents of the given rectangle: the area inside it will
7183 be repainted. This is the same as Refresh but has a nicer syntax.
7184 """
7185 return _core_.Window_RefreshRect(*args, **kwargs)
7186
7187 def Update(*args, **kwargs):
7188 """
7189 Update(self)
7190
7191 Calling this method immediately repaints the invalidated area of the
7192 window instead of waiting for the EVT_PAINT event to happen, (normally
7193 this would usually only happen when the flow of control returns to the
7194 event loop.) Notice that this function doesn't refresh the window and
7195 does nothing if the window has been already repainted. Use Refresh
7196 first if you want to immediately redraw the window (or some portion of
7197 it) unconditionally.
7198 """
7199 return _core_.Window_Update(*args, **kwargs)
7200
7201 def ClearBackground(*args, **kwargs):
7202 """
7203 ClearBackground(self)
7204
7205 Clears the window by filling it with the current background
7206 colour. Does not cause an erase background event to be generated.
7207 """
7208 return _core_.Window_ClearBackground(*args, **kwargs)
7209
7210 def Freeze(*args, **kwargs):
7211 """
7212 Freeze(self)
7213
15817c7e
RD
7214 Freezes the window or, in other words, prevents any updates from
7215 taking place on screen, the window is not redrawn at all. Thaw must be
7216 called to reenable window redrawing. Calls to Freeze/Thaw may be
7217 nested, with the actual Thaw being delayed until all the nesting has
7218 been undone.
d55e5bfc
RD
7219
7220 This method is useful for visual appearance optimization (for example,
7221 it is a good idea to use it before inserting large amount of text into
7222 a wxTextCtrl under wxGTK) but is not implemented on all platforms nor
7223 for all controls so it is mostly just a hint to wxWindows and not a
7224 mandatory directive.
7225 """
7226 return _core_.Window_Freeze(*args, **kwargs)
7227
7228 def Thaw(*args, **kwargs):
7229 """
7230 Thaw(self)
7231
7232 Reenables window updating after a previous call to Freeze. Calls to
15817c7e
RD
7233 Freeze/Thaw may be nested, so Thaw must be called the same number of
7234 times that Freeze was before the window will be updated.
d55e5bfc
RD
7235 """
7236 return _core_.Window_Thaw(*args, **kwargs)
7237
7238 def PrepareDC(*args, **kwargs):
7239 """
7240 PrepareDC(self, DC dc)
7241
7242 Call this function to prepare the device context for drawing a
7243 scrolled image. It sets the device origin according to the current
7244 scroll position.
7245 """
7246 return _core_.Window_PrepareDC(*args, **kwargs)
7247
7248 def GetUpdateRegion(*args, **kwargs):
7249 """
7250 GetUpdateRegion(self) -> Region
7251
7252 Returns the region specifying which parts of the window have been
7253 damaged. Should only be called within an EVT_PAINT handler.
7254 """
7255 return _core_.Window_GetUpdateRegion(*args, **kwargs)
7256
7257 def GetUpdateClientRect(*args, **kwargs):
7258 """
7259 GetUpdateClientRect(self) -> Rect
7260
7261 Get the update rectangle region bounding box in client coords.
7262 """
7263 return _core_.Window_GetUpdateClientRect(*args, **kwargs)
7264
7265 def IsExposed(*args, **kwargs):
7266 """
7267 IsExposed(self, int x, int y, int w=1, int h=1) -> bool
7268
7269 Returns true if the given point or rectangle area has been exposed
7270 since the last repaint. Call this in an paint event handler to
7271 optimize redrawing by only redrawing those areas, which have been
7272 exposed.
7273 """
7274 return _core_.Window_IsExposed(*args, **kwargs)
7275
7276 def IsExposedPoint(*args, **kwargs):
7277 """
7278 IsExposedPoint(self, Point pt) -> bool
7279
7280 Returns true if the given point or rectangle area has been exposed
7281 since the last repaint. Call this in an paint event handler to
7282 optimize redrawing by only redrawing those areas, which have been
7283 exposed.
7284 """
7285 return _core_.Window_IsExposedPoint(*args, **kwargs)
7286
7287 def IsExposedRect(*args, **kwargs):
7288 """
7289 IsExposedRect(self, Rect rect) -> bool
7290
7291 Returns true if the given point or rectangle area has been exposed
7292 since the last repaint. Call this in an paint event handler to
7293 optimize redrawing by only redrawing those areas, which have been
7294 exposed.
7295 """
7296 return _core_.Window_IsExposedRect(*args, **kwargs)
7297
7298 def GetDefaultAttributes(*args, **kwargs):
7299 """
7300 GetDefaultAttributes(self) -> VisualAttributes
7301
15817c7e
RD
7302 Get the default attributes for an instance of this class. This is
7303 useful if you want to use the same font or colour in your own control
7304 as in a standard control -- which is a much better idea than hard
7305 coding specific colours or fonts which might look completely out of
a5ee0656 7306 place on the user's system, especially if it uses themes.
d55e5bfc
RD
7307 """
7308 return _core_.Window_GetDefaultAttributes(*args, **kwargs)
7309
7310 def GetClassDefaultAttributes(*args, **kwargs):
7311 """
d6c14a4c 7312 GetClassDefaultAttributes(int variant=WINDOW_VARIANT_NORMAL) -> VisualAttributes
d55e5bfc 7313
15817c7e
RD
7314 Get the default attributes for this class. This is useful if you want
7315 to use the same font or colour in your own control as in a standard
7316 control -- which is a much better idea than hard coding specific
a5ee0656
RD
7317 colours or fonts which might look completely out of place on the
7318 user's system, especially if it uses themes.
d55e5bfc
RD
7319
7320 The variant parameter is only relevant under Mac currently and is
15817c7e 7321 ignore under other platforms. Under Mac, it will change the size of
a5ee0656
RD
7322 the returned font. See `wx.Window.SetWindowVariant` for more about
7323 this.
d55e5bfc
RD
7324 """
7325 return _core_.Window_GetClassDefaultAttributes(*args, **kwargs)
7326
7327 GetClassDefaultAttributes = staticmethod(GetClassDefaultAttributes)
7328 def SetBackgroundColour(*args, **kwargs):
7329 """
7330 SetBackgroundColour(self, Colour colour) -> bool
7331
7332 Sets the background colour of the window. Returns True if the colour
7333 was changed. The background colour is usually painted by the default
7334 EVT_ERASE_BACKGROUND event handler function under Windows and
f8167d6e
RD
7335 automatically under GTK. Using `wx.NullColour` will reset the window
7336 to the default background colour.
d55e5bfc 7337
a5ee0656 7338 Note that setting the background colour may not cause an immediate
f8167d6e 7339 refresh, so you may wish to call `ClearBackground` or `Refresh` after
d55e5bfc
RD
7340 calling this function.
7341
f8167d6e
RD
7342 Using this function will disable attempts to use themes for this
7343 window, if the system supports them. Use with care since usually the
7344 themes represent the appearance chosen by the user to be used for all
7345 applications on the system.
d55e5bfc
RD
7346 """
7347 return _core_.Window_SetBackgroundColour(*args, **kwargs)
7348
412d302d
RD
7349 def SetOwnBackgroundColour(*args, **kwargs):
7350 """SetOwnBackgroundColour(self, Colour colour)"""
7351 return _core_.Window_SetOwnBackgroundColour(*args, **kwargs)
d55e5bfc
RD
7352
7353 def SetForegroundColour(*args, **kwargs):
7354 """
7355 SetForegroundColour(self, Colour colour) -> bool
7356
7357 Sets the foreground colour of the window. Returns True is the colour
7358 was changed. The interpretation of foreground colour is dependent on
7359 the window class; it may be the text colour or other colour, or it may
7360 not be used at all.
7361 """
7362 return _core_.Window_SetForegroundColour(*args, **kwargs)
7363
fa47d7a7
VS
7364 def SetOwnForegroundColour(*args, **kwargs):
7365 """SetOwnForegroundColour(self, Colour colour)"""
7366 return _core_.Window_SetOwnForegroundColour(*args, **kwargs)
d55e5bfc
RD
7367
7368 def GetBackgroundColour(*args, **kwargs):
7369 """
7370 GetBackgroundColour(self) -> Colour
7371
7372 Returns the background colour of the window.
7373 """
7374 return _core_.Window_GetBackgroundColour(*args, **kwargs)
7375
7376 def GetForegroundColour(*args, **kwargs):
7377 """
7378 GetForegroundColour(self) -> Colour
7379
7380 Returns the foreground colour of the window. The interpretation of
7381 foreground colour is dependent on the window class; it may be the text
7382 colour or other colour, or it may not be used at all.
7383 """
7384 return _core_.Window_GetForegroundColour(*args, **kwargs)
7385
0f63ec68
RD
7386 def SetBackgroundStyle(*args, **kwargs):
7387 """
7388 SetBackgroundStyle(self, int style) -> bool
7389
7390 Returns the background style of the window. The background style
7391 indicates how the background of the window is drawn.
7392
7393 ====================== ========================================
7394 wx.BG_STYLE_SYSTEM The background colour or pattern should
7395 be determined by the system
7396 wx.BG_STYLE_COLOUR The background should be a solid colour
7397 wx.BG_STYLE_CUSTOM The background will be implemented by the
7398 application.
7399 ====================== ========================================
7400
7401 On GTK+, use of wx.BG_STYLE_CUSTOM allows the flicker-free drawing of
7402 a custom background, such as a tiled bitmap. Currently the style has
7403 no effect on other platforms.
7404
7405 :see: `GetBackgroundStyle`, `SetBackgroundColour`
7406 """
7407 return _core_.Window_SetBackgroundStyle(*args, **kwargs)
7408
7409 def GetBackgroundStyle(*args, **kwargs):
7410 """
7411 GetBackgroundStyle(self) -> int
7412
7413 Returns the background style of the window.
7414
7415 :see: `SetBackgroundStyle`
7416 """
7417 return _core_.Window_GetBackgroundStyle(*args, **kwargs)
7418
51b83b37
RD
7419 def HasTransparentBackground(*args, **kwargs):
7420 """
7421 HasTransparentBackground(self) -> bool
7422
7423 Returns True if this window's background is transparent (as, for
7424 example, for `wx.StaticText`) and should show the parent window's
7425 background.
7426
7427 This method is mostly used internally by the library itself and you
7428 normally shouldn't have to call it. You may, however, have to override
7429 it in your custom control classes to ensure that background is painted
7430 correctly.
7431 """
7432 return _core_.Window_HasTransparentBackground(*args, **kwargs)
7433
d55e5bfc
RD
7434 def SetCursor(*args, **kwargs):
7435 """
7436 SetCursor(self, Cursor cursor) -> bool
7437
7438 Sets the window's cursor. Notice that the window cursor also sets it
7439 for the children of the window implicitly.
7440
7441 The cursor may be wx.NullCursor in which case the window cursor will
7442 be reset back to default.
7443 """
7444 return _core_.Window_SetCursor(*args, **kwargs)
7445
7446 def GetCursor(*args, **kwargs):
7447 """
7448 GetCursor(self) -> Cursor
7449
7450 Return the cursor associated with this window.
7451 """
7452 return _core_.Window_GetCursor(*args, **kwargs)
7453
7454 def SetFont(*args, **kwargs):
7455 """
7456 SetFont(self, Font font) -> bool
7457
7458 Sets the font for this window.
7459 """
7460 return _core_.Window_SetFont(*args, **kwargs)
7461
fa47d7a7
VS
7462 def SetOwnFont(*args, **kwargs):
7463 """SetOwnFont(self, Font font)"""
7464 return _core_.Window_SetOwnFont(*args, **kwargs)
d55e5bfc
RD
7465
7466 def GetFont(*args, **kwargs):
7467 """
7468 GetFont(self) -> Font
7469
7470 Returns the default font used for this window.
7471 """
7472 return _core_.Window_GetFont(*args, **kwargs)
7473
7474 def SetCaret(*args, **kwargs):
7475 """
7476 SetCaret(self, Caret caret)
7477
7478 Sets the caret associated with the window.
7479 """
7480 return _core_.Window_SetCaret(*args, **kwargs)
7481
7482 def GetCaret(*args, **kwargs):
7483 """
7484 GetCaret(self) -> Caret
7485
7486 Returns the caret associated with the window.
7487 """
7488 return _core_.Window_GetCaret(*args, **kwargs)
7489
7490 def GetCharHeight(*args, **kwargs):
7491 """
7492 GetCharHeight(self) -> int
7493
7494 Get the (average) character size for the current font.
7495 """
7496 return _core_.Window_GetCharHeight(*args, **kwargs)
7497
7498 def GetCharWidth(*args, **kwargs):
7499 """
7500 GetCharWidth(self) -> int
7501
7502 Get the (average) character size for the current font.
7503 """
7504 return _core_.Window_GetCharWidth(*args, **kwargs)
7505
7506 def GetTextExtent(*args, **kwargs):
fd2dc343
RD
7507 """
7508 GetTextExtent(String string) -> (width, height)
7509
7510 Get the width and height of the text using the current font.
7511 """
d55e5bfc
RD
7512 return _core_.Window_GetTextExtent(*args, **kwargs)
7513
7514 def GetFullTextExtent(*args, **kwargs):
7515 """
7516 GetFullTextExtent(String string, Font font=None) ->
7517 (width, height, descent, externalLeading)
7518
7519 Get the width, height, decent and leading of the text using the
7520 current or specified font.
7521 """
7522 return _core_.Window_GetFullTextExtent(*args, **kwargs)
7523
7524 def ClientToScreenXY(*args, **kwargs):
7525 """
7526 ClientToScreenXY(int x, int y) -> (x,y)
7527
7528 Converts to screen coordinates from coordinates relative to this window.
7529 """
7530 return _core_.Window_ClientToScreenXY(*args, **kwargs)
7531
7532 def ScreenToClientXY(*args, **kwargs):
7533 """
7534 ScreenToClientXY(int x, int y) -> (x,y)
7535
7536 Converts from screen to client window coordinates.
7537 """
7538 return _core_.Window_ScreenToClientXY(*args, **kwargs)
7539
7540 def ClientToScreen(*args, **kwargs):
7541 """
7542 ClientToScreen(self, Point pt) -> Point
7543
7544 Converts to screen coordinates from coordinates relative to this window.
7545 """
7546 return _core_.Window_ClientToScreen(*args, **kwargs)
7547
7548 def ScreenToClient(*args, **kwargs):
7549 """
7550 ScreenToClient(self, Point pt) -> Point
7551
7552 Converts from screen to client window coordinates.
7553 """
7554 return _core_.Window_ScreenToClient(*args, **kwargs)
7555
7556 def HitTestXY(*args, **kwargs):
7557 """
7558 HitTestXY(self, int x, int y) -> int
7559
7560 Test where the given (in client coords) point lies
7561 """
7562 return _core_.Window_HitTestXY(*args, **kwargs)
7563
7564 def HitTest(*args, **kwargs):
7565 """
7566 HitTest(self, Point pt) -> int
7567
7568 Test where the given (in client coords) point lies
7569 """
7570 return _core_.Window_HitTest(*args, **kwargs)
7571
7572 def GetBorder(*args):
7573 """
7574 GetBorder(self, long flags) -> int
7575 GetBorder(self) -> int
7576
7577 Get border for the flags of this window
7578 """
7579 return _core_.Window_GetBorder(*args)
7580
7581 def UpdateWindowUI(*args, **kwargs):
7582 """
7583 UpdateWindowUI(self, long flags=UPDATE_UI_NONE)
7584
7585 This function sends EVT_UPDATE_UI events to the window. The particular
7586 implementation depends on the window; for example a wx.ToolBar will
7587 send an update UI event for each toolbar button, and a wx.Frame will
7588 send an update UI event for each menubar menu item. You can call this
7589 function from your application to ensure that your UI is up-to-date at
7590 a particular point in time (as far as your EVT_UPDATE_UI handlers are
7591 concerned). This may be necessary if you have called
7592 wx.UpdateUIEvent.SetMode or wx.UpdateUIEvent.SetUpdateInterval to
7593 limit the overhead that wxWindows incurs by sending update UI events
7594 in idle time.
d55e5bfc
RD
7595 """
7596 return _core_.Window_UpdateWindowUI(*args, **kwargs)
7597
7598 def PopupMenuXY(*args, **kwargs):
7599 """
b0503257 7600 PopupMenuXY(self, Menu menu, int x=-1, int y=-1) -> bool
d55e5bfc 7601
b0503257
RD
7602 Pops up the given menu at the specified coordinates, relative to this window,
7603 and returns control when the user has dismissed the menu. If a menu item is
7604 selected, the corresponding menu event is generated and will be processed as
7605 usual. If the default position is given then the current position of the
7606 mouse cursor will be used.
d55e5bfc
RD
7607 """
7608 return _core_.Window_PopupMenuXY(*args, **kwargs)
7609
7610 def PopupMenu(*args, **kwargs):
7611 """
b0503257 7612 PopupMenu(self, Menu menu, Point pos=DefaultPosition) -> bool
d55e5bfc 7613
b0503257
RD
7614 Pops up the given menu at the specified coordinates, relative to this window,
7615 and returns control when the user has dismissed the menu. If a menu item is
7616 selected, the corresponding menu event is generated and will be processed as
7617 usual. If the default position is given then the current position of the
7618 mouse cursor will be used.
d55e5bfc
RD
7619 """
7620 return _core_.Window_PopupMenu(*args, **kwargs)
7621
7622 def GetHandle(*args, **kwargs):
7623 """
7624 GetHandle(self) -> long
7625
7626 Returns the platform-specific handle (as a long integer) of the
7627 physical window. Currently on wxMac it returns the handle of the
7628 toplevel parent of the window.
7629 """
7630 return _core_.Window_GetHandle(*args, **kwargs)
7631
629e65c2
RD
7632 def AssociateHandle(*args, **kwargs):
7633 """
7634 AssociateHandle(self, long handle)
7635
7636 Associate the window with a new native handle
7637 """
7638 return _core_.Window_AssociateHandle(*args, **kwargs)
7639
7640 def DissociateHandle(*args, **kwargs):
7641 """
7642 DissociateHandle(self)
7643
7644 Dissociate the current native handle from the window
7645 """
7646 return _core_.Window_DissociateHandle(*args, **kwargs)
7647
d55e5bfc
RD
7648 def HasScrollbar(*args, **kwargs):
7649 """
7650 HasScrollbar(self, int orient) -> bool
7651
7652 Does the window have the scrollbar for this orientation?
7653 """
7654 return _core_.Window_HasScrollbar(*args, **kwargs)
7655
7656 def SetScrollbar(*args, **kwargs):
7657 """
15817c7e 7658 SetScrollbar(self, int orientation, int position, int thumbSize, int range,
d55e5bfc
RD
7659 bool refresh=True)
7660
7661 Sets the scrollbar properties of a built-in scrollbar.
d55e5bfc
RD
7662 """
7663 return _core_.Window_SetScrollbar(*args, **kwargs)
7664
7665 def SetScrollPos(*args, **kwargs):
7666 """
7667 SetScrollPos(self, int orientation, int pos, bool refresh=True)
7668
7669 Sets the position of one of the built-in scrollbars.
7670 """
7671 return _core_.Window_SetScrollPos(*args, **kwargs)
7672
7673 def GetScrollPos(*args, **kwargs):
7674 """
7675 GetScrollPos(self, int orientation) -> int
7676
7677 Returns the built-in scrollbar position.
7678 """
7679 return _core_.Window_GetScrollPos(*args, **kwargs)
7680
7681 def GetScrollThumb(*args, **kwargs):
7682 """
7683 GetScrollThumb(self, int orientation) -> int
7684
7685 Returns the built-in scrollbar thumb size.
7686 """
7687 return _core_.Window_GetScrollThumb(*args, **kwargs)
7688
7689 def GetScrollRange(*args, **kwargs):
7690 """
7691 GetScrollRange(self, int orientation) -> int
7692
7693 Returns the built-in scrollbar range.
7694 """
7695 return _core_.Window_GetScrollRange(*args, **kwargs)
7696
7697 def ScrollWindow(*args, **kwargs):
7698 """
7699 ScrollWindow(self, int dx, int dy, Rect rect=None)
7700
7701 Physically scrolls the pixels in the window and move child windows
7702 accordingly. Use this function to optimise your scrolling
7703 implementations, to minimise the area that must be redrawn. Note that
7704 it is rarely required to call this function from a user program.
d55e5bfc
RD
7705 """
7706 return _core_.Window_ScrollWindow(*args, **kwargs)
7707
7708 def ScrollLines(*args, **kwargs):
7709 """
7710 ScrollLines(self, int lines) -> bool
7711
7712 If the platform and window class supports it, scrolls the window by
7713 the given number of lines down, if lines is positive, or up if lines
7714 is negative. Returns True if the window was scrolled, False if it was
7715 already on top/bottom and nothing was done.
7716 """
7717 return _core_.Window_ScrollLines(*args, **kwargs)
7718
7719 def ScrollPages(*args, **kwargs):
7720 """
7721 ScrollPages(self, int pages) -> bool
7722
15817c7e 7723 If the platform and window class supports it, scrolls the window by
d55e5bfc
RD
7724 the given number of pages down, if pages is positive, or up if pages
7725 is negative. Returns True if the window was scrolled, False if it was
7726 already on top/bottom and nothing was done.
7727 """
7728 return _core_.Window_ScrollPages(*args, **kwargs)
7729
7730 def LineUp(*args, **kwargs):
7731 """
7732 LineUp(self) -> bool
7733
7734 This is just a wrapper for ScrollLines(-1).
7735 """
7736 return _core_.Window_LineUp(*args, **kwargs)
7737
7738 def LineDown(*args, **kwargs):
7739 """
7740 LineDown(self) -> bool
7741
7742 This is just a wrapper for ScrollLines(1).
7743 """
7744 return _core_.Window_LineDown(*args, **kwargs)
7745
7746 def PageUp(*args, **kwargs):
7747 """
7748 PageUp(self) -> bool
7749
7750 This is just a wrapper for ScrollPages(-1).
7751 """
7752 return _core_.Window_PageUp(*args, **kwargs)
7753
7754 def PageDown(*args, **kwargs):
7755 """
7756 PageDown(self) -> bool
7757
7758 This is just a wrapper for ScrollPages(1).
7759 """
7760 return _core_.Window_PageDown(*args, **kwargs)
7761
7762 def SetHelpText(*args, **kwargs):
7763 """
7764 SetHelpText(self, String text)
7765
7766 Sets the help text to be used as context-sensitive help for this
7767 window. Note that the text is actually stored by the current
7768 wxHelpProvider implementation, and not in the window object itself.
7769 """
7770 return _core_.Window_SetHelpText(*args, **kwargs)
7771
7772 def SetHelpTextForId(*args, **kwargs):
7773 """
7774 SetHelpTextForId(self, String text)
7775
7776 Associate this help text with all windows with the same id as this
7777 one.
7778 """
7779 return _core_.Window_SetHelpTextForId(*args, **kwargs)
7780
7781 def GetHelpText(*args, **kwargs):
7782 """
7783 GetHelpText(self) -> String
7784
7785 Gets the help text to be used as context-sensitive help for this
7786 window. Note that the text is actually stored by the current
7787 wxHelpProvider implementation, and not in the window object itself.
7788 """
7789 return _core_.Window_GetHelpText(*args, **kwargs)
7790
7791 def SetToolTipString(*args, **kwargs):
7792 """
7793 SetToolTipString(self, String tip)
7794
7795 Attach a tooltip to the window.
7796 """
7797 return _core_.Window_SetToolTipString(*args, **kwargs)
7798
7799 def SetToolTip(*args, **kwargs):
7800 """
7801 SetToolTip(self, ToolTip tip)
7802
7803 Attach a tooltip to the window.
7804 """
7805 return _core_.Window_SetToolTip(*args, **kwargs)
7806
7807 def GetToolTip(*args, **kwargs):
7808 """
7809 GetToolTip(self) -> ToolTip
7810
7811 get the associated tooltip or None if none
7812 """
7813 return _core_.Window_GetToolTip(*args, **kwargs)
7814
7815 def SetDropTarget(*args, **kwargs):
7816 """
7817 SetDropTarget(self, DropTarget dropTarget)
7818
7819 Associates a drop target with this window. If the window already has
7820 a drop target, it is deleted.
7821 """
7822 return _core_.Window_SetDropTarget(*args, **kwargs)
7823
7824 def GetDropTarget(*args, **kwargs):
7825 """
7826 GetDropTarget(self) -> DropTarget
7827
7828 Returns the associated drop target, which may be None.
7829 """
7830 return _core_.Window_GetDropTarget(*args, **kwargs)
7831
7832 def SetConstraints(*args, **kwargs):
7833 """
7834 SetConstraints(self, LayoutConstraints constraints)
7835
7836 Sets the window to have the given layout constraints. If an existing
7837 layout constraints object is already owned by the window, it will be
7838 deleted. Pass None to disassociate and delete the window's current
7839 constraints.
7840
7841 You must call SetAutoLayout to tell a window to use the constraints
7842 automatically in its default EVT_SIZE handler; otherwise, you must
7843 handle EVT_SIZE yourself and call Layout() explicitly. When setting
7844 both a wx.LayoutConstraints and a wx.Sizer, only the sizer will have
7845 effect.
7846 """
7847 return _core_.Window_SetConstraints(*args, **kwargs)
7848
7849 def GetConstraints(*args, **kwargs):
7850 """
7851 GetConstraints(self) -> LayoutConstraints
7852
7853 Returns a pointer to the window's layout constraints, or None if there
7854 are none.
7855 """
7856 return _core_.Window_GetConstraints(*args, **kwargs)
7857
7858 def SetAutoLayout(*args, **kwargs):
7859 """
7860 SetAutoLayout(self, bool autoLayout)
7861
7862 Determines whether the Layout function will be called automatically
7863 when the window is resized. It is called implicitly by SetSizer but
7864 if you use SetConstraints you should call it manually or otherwise the
7865 window layout won't be correctly updated when its size changes.
7866 """
7867 return _core_.Window_SetAutoLayout(*args, **kwargs)
7868
7869 def GetAutoLayout(*args, **kwargs):
7870 """
7871 GetAutoLayout(self) -> bool
7872
7873 Returns the current autoLayout setting
7874 """
7875 return _core_.Window_GetAutoLayout(*args, **kwargs)
7876
7877 def Layout(*args, **kwargs):
7878 """
7879 Layout(self) -> bool
7880
7881 Invokes the constraint-based layout algorithm or the sizer-based
7882 algorithm for this window. See SetAutoLayout: when auto layout is on,
7883 this function gets called automatically by the default EVT_SIZE
7884 handler when the window is resized.
7885 """
7886 return _core_.Window_Layout(*args, **kwargs)
7887
7888 def SetSizer(*args, **kwargs):
7889 """
7890 SetSizer(self, Sizer sizer, bool deleteOld=True)
7891
7892 Sets the window to have the given layout sizer. The window will then
7893 own the object, and will take care of its deletion. If an existing
7894 layout sizer object is already owned by the window, it will be deleted
7895 if the deleteOld parameter is true. Note that this function will also
7896 call SetAutoLayout implicitly with a True parameter if the sizer is
b411df4a 7897 non-None, and False otherwise.
d55e5bfc
RD
7898 """
7899 return _core_.Window_SetSizer(*args, **kwargs)
7900
7901 def SetSizerAndFit(*args, **kwargs):
7902 """
7903 SetSizerAndFit(self, Sizer sizer, bool deleteOld=True)
7904
7905 The same as SetSizer, except it also sets the size hints for the
7906 window based on the sizer's minimum size.
7907 """
7908 return _core_.Window_SetSizerAndFit(*args, **kwargs)
7909
7910 def GetSizer(*args, **kwargs):
7911 """
7912 GetSizer(self) -> Sizer
7913
7914 Return the sizer associated with the window by a previous call to
7915 SetSizer or None if there isn't one.
7916 """
7917 return _core_.Window_GetSizer(*args, **kwargs)
7918
7919 def SetContainingSizer(*args, **kwargs):
7920 """
7921 SetContainingSizer(self, Sizer sizer)
7922
7923 This normally does not need to be called by application code. It is
7924 called internally when a window is added to a sizer, and is used so
7925 the window can remove itself from the sizer when it is destroyed.
7926 """
7927 return _core_.Window_SetContainingSizer(*args, **kwargs)
7928
7929 def GetContainingSizer(*args, **kwargs):
7930 """
7931 GetContainingSizer(self) -> Sizer
7932
7933 Return the sizer that this window is a member of, if any, otherwise None.
7934 """
7935 return _core_.Window_GetContainingSizer(*args, **kwargs)
7936
7937 def InheritAttributes(*args, **kwargs):
7938 """
7939 InheritAttributes(self)
7940
15817c7e
RD
7941 This function is (or should be, in case of custom controls) called
7942 during window creation to intelligently set up the window visual
7943 attributes, that is the font and the foreground and background
7944 colours.
7945
7946 By 'intelligently' the following is meant: by default, all windows use
7947 their own default attributes. However if some of the parent's
7948 attributes are explicitly changed (that is, using SetFont and not
fa47d7a7 7949 SetOwnFont) and if the corresponding attribute hadn't been
15817c7e
RD
7950 explicitly set for this window itself, then this window takes the same
7951 value as used by the parent. In addition, if the window overrides
7952 ShouldInheritColours to return false, the colours will not be changed
7953 no matter what and only the font might.
7954
a7bb0a9d
RD
7955 This rather complicated logic is necessary in order to accommodate the
7956 different usage scenarios. The most common one is when all default
15817c7e
RD
7957 attributes are used and in this case, nothing should be inherited as
7958 in modern GUIs different controls use different fonts (and colours)
7959 than their siblings so they can't inherit the same value from the
7960 parent. However it was also deemed desirable to allow to simply change
7961 the attributes of all children at once by just changing the font or
7962 colour of their common parent, hence in this case we do inherit the
7963 parents attributes.
7964
d55e5bfc
RD
7965 """
7966 return _core_.Window_InheritAttributes(*args, **kwargs)
7967
7968 def ShouldInheritColours(*args, **kwargs):
7969 """
7970 ShouldInheritColours(self) -> bool
7971
7972 Return true from here to allow the colours of this window to be
15817c7e
RD
7973 changed by InheritAttributes, returning false forbids inheriting them
7974 from the parent window.
d55e5bfc 7975
15817c7e
RD
7976 The base class version returns false, but this method is overridden in
7977 wxControl where it returns true.
d55e5bfc
RD
7978 """
7979 return _core_.Window_ShouldInheritColours(*args, **kwargs)
7980
7981 def PostCreate(self, pre):
7982 """
7983 Phase 3 of the 2-phase create <wink!>
7984 Call this method after precreating the window with the 2-phase create method.
7985 """
7986 self.this = pre.this
7987 self.thisown = pre.thisown
7988 pre.thisown = 0
7989 if hasattr(self, '_setOORInfo'):
7990 self._setOORInfo(self)
7991 if hasattr(self, '_setCallbackInfo'):
7992 self._setCallbackInfo(self, self.__class__)
7993
7994
7995class WindowPtr(Window):
7996 def __init__(self, this):
7997 self.this = this
7998 if not hasattr(self,"thisown"): self.thisown = 0
7999 self.__class__ = Window
8000_core_.Window_swigregister(WindowPtr)
8001
8002def PreWindow(*args, **kwargs):
8003 """
8004 PreWindow() -> Window
8005
8006 Precreate a Window for 2-phase creation.
8007 """
8008 val = _core_.new_PreWindow(*args, **kwargs)
8009 val.thisown = 1
8010 return val
8011
8012def Window_NewControlId(*args, **kwargs):
8013 """
8014 Window_NewControlId() -> int
8015
8016 Generate a control id for the controls which were not given one.
8017 """
8018 return _core_.Window_NewControlId(*args, **kwargs)
8019
8020def Window_NextControlId(*args, **kwargs):
8021 """
8022 Window_NextControlId(int winid) -> int
8023
8024 Get the id of the control following the one with the given
15817c7e 8025 autogenerated) id
d55e5bfc
RD
8026 """
8027 return _core_.Window_NextControlId(*args, **kwargs)
8028
8029def Window_PrevControlId(*args, **kwargs):
8030 """
8031 Window_PrevControlId(int winid) -> int
8032
8033 Get the id of the control preceding the one with the given
15817c7e 8034 autogenerated) id
d55e5bfc
RD
8035 """
8036 return _core_.Window_PrevControlId(*args, **kwargs)
8037
8038def Window_FindFocus(*args, **kwargs):
8039 """
8040 Window_FindFocus() -> Window
8041
8042 Returns the window or control that currently has the keyboard focus,
8043 or None.
8044 """
8045 return _core_.Window_FindFocus(*args, **kwargs)
8046
8047def Window_GetCapture(*args, **kwargs):
8048 """
8049 Window_GetCapture() -> Window
8050
8051 Returns the window which currently captures the mouse or None
8052 """
8053 return _core_.Window_GetCapture(*args, **kwargs)
8054
8055def Window_GetClassDefaultAttributes(*args, **kwargs):
8056 """
8057 Window_GetClassDefaultAttributes(int variant=WINDOW_VARIANT_NORMAL) -> VisualAttributes
8058
15817c7e
RD
8059 Get the default attributes for this class. This is useful if you want
8060 to use the same font or colour in your own control as in a standard
8061 control -- which is a much better idea than hard coding specific
a5ee0656
RD
8062 colours or fonts which might look completely out of place on the
8063 user's system, especially if it uses themes.
d55e5bfc
RD
8064
8065 The variant parameter is only relevant under Mac currently and is
15817c7e 8066 ignore under other platforms. Under Mac, it will change the size of
a5ee0656
RD
8067 the returned font. See `wx.Window.SetWindowVariant` for more about
8068 this.
d55e5bfc
RD
8069 """
8070 return _core_.Window_GetClassDefaultAttributes(*args, **kwargs)
8071
8072def DLG_PNT(win, point_or_x, y=None):
8073 """
8074 Convenience function for converting a Point or (x,y) in
8075 dialog units to pixel units.
8076 """
8077 if y is None:
8078 return win.ConvertDialogPointToPixels(point_or_x)
8079 else:
8080 return win.ConvertDialogPointToPixels(wx.Point(point_or_x, y))
8081
8082def DLG_SZE(win, size_width, height=None):
8083 """
8084 Convenience function for converting a Size or (w,h) in
8085 dialog units to pixel units.
8086 """
8087 if height is None:
8088 return win.ConvertDialogSizeToPixels(size_width)
8089 else:
8090 return win.ConvertDialogSizeToPixels(wx.Size(size_width, height))
8091
8092
8093def FindWindowById(*args, **kwargs):
8094 """
8095 FindWindowById(long id, Window parent=None) -> Window
8096
8097 Find the first window in the application with the given id. If parent
8098 is None, the search will start from all top-level frames and dialog
8099 boxes; if non-None, the search will be limited to the given window
8100 hierarchy. The search is recursive in both cases.
8101 """
8102 return _core_.FindWindowById(*args, **kwargs)
8103
8104def FindWindowByName(*args, **kwargs):
8105 """
8106 FindWindowByName(String name, Window parent=None) -> Window
8107
8108 Find a window by its name (as given in a window constructor or Create
8109 function call). If parent is None, the search will start from all
8110 top-level frames and dialog boxes; if non-None, the search will be
8111 limited to the given window hierarchy. The search is recursive in both
8112 cases.
8113
8114 If no window with such name is found, wx.FindWindowByLabel is called.
8115 """
8116 return _core_.FindWindowByName(*args, **kwargs)
8117
8118def FindWindowByLabel(*args, **kwargs):
8119 """
8120 FindWindowByLabel(String label, Window parent=None) -> Window
8121
8122 Find a window by its label. Depending on the type of window, the label
8123 may be a window title or panel item label. If parent is None, the
8124 search will start from all top-level frames and dialog boxes; if
8125 non-None, the search will be limited to the given window
8126 hierarchy. The search is recursive in both cases.
8127 """
8128 return _core_.FindWindowByLabel(*args, **kwargs)
8129
8130def Window_FromHWND(*args, **kwargs):
8131 """Window_FromHWND(Window parent, unsigned long _hWnd) -> Window"""
8132 return _core_.Window_FromHWND(*args, **kwargs)
8133#---------------------------------------------------------------------------
8134
8135class Validator(EvtHandler):
36ed4f51 8136 """Proxy of C++ Validator class"""
d55e5bfc
RD
8137 def __repr__(self):
8138 return "<%s.%s; proxy of C++ wxValidator instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
8139 def __init__(self, *args, **kwargs):
8140 """__init__(self) -> Validator"""
8141 newobj = _core_.new_Validator(*args, **kwargs)
8142 self.this = newobj.this
8143 self.thisown = 1
8144 del newobj.thisown
8145 self._setOORInfo(self)
8146
8147 def Clone(*args, **kwargs):
8148 """Clone(self) -> Validator"""
8149 return _core_.Validator_Clone(*args, **kwargs)
8150
8151 def Validate(*args, **kwargs):
8152 """Validate(self, Window parent) -> bool"""
8153 return _core_.Validator_Validate(*args, **kwargs)
8154
8155 def TransferToWindow(*args, **kwargs):
8156 """TransferToWindow(self) -> bool"""
8157 return _core_.Validator_TransferToWindow(*args, **kwargs)
8158
8159 def TransferFromWindow(*args, **kwargs):
8160 """TransferFromWindow(self) -> bool"""
8161 return _core_.Validator_TransferFromWindow(*args, **kwargs)
8162
8163 def GetWindow(*args, **kwargs):
8164 """GetWindow(self) -> Window"""
8165 return _core_.Validator_GetWindow(*args, **kwargs)
8166
8167 def SetWindow(*args, **kwargs):
8168 """SetWindow(self, Window window)"""
8169 return _core_.Validator_SetWindow(*args, **kwargs)
8170
8171 def IsSilent(*args, **kwargs):
d6c14a4c 8172 """IsSilent() -> bool"""
d55e5bfc
RD
8173 return _core_.Validator_IsSilent(*args, **kwargs)
8174
8175 IsSilent = staticmethod(IsSilent)
8176 def SetBellOnError(*args, **kwargs):
d6c14a4c 8177 """SetBellOnError(int doIt=True)"""
d55e5bfc
RD
8178 return _core_.Validator_SetBellOnError(*args, **kwargs)
8179
8180 SetBellOnError = staticmethod(SetBellOnError)
8181
8182class ValidatorPtr(Validator):
8183 def __init__(self, this):
8184 self.this = this
8185 if not hasattr(self,"thisown"): self.thisown = 0
8186 self.__class__ = Validator
8187_core_.Validator_swigregister(ValidatorPtr)
8188
8189def Validator_IsSilent(*args, **kwargs):
8190 """Validator_IsSilent() -> bool"""
8191 return _core_.Validator_IsSilent(*args, **kwargs)
8192
8193def Validator_SetBellOnError(*args, **kwargs):
8194 """Validator_SetBellOnError(int doIt=True)"""
8195 return _core_.Validator_SetBellOnError(*args, **kwargs)
8196
8197class PyValidator(Validator):
36ed4f51 8198 """Proxy of C++ PyValidator class"""
d55e5bfc
RD
8199 def __repr__(self):
8200 return "<%s.%s; proxy of C++ wxPyValidator instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
8201 def __init__(self, *args, **kwargs):
8202 """__init__(self) -> PyValidator"""
8203 newobj = _core_.new_PyValidator(*args, **kwargs)
8204 self.this = newobj.this
8205 self.thisown = 1
8206 del newobj.thisown
8207
8208 self._setCallbackInfo(self, PyValidator, 1)
8209 self._setOORInfo(self)
8210
8211 def _setCallbackInfo(*args, **kwargs):
8212 """_setCallbackInfo(self, PyObject self, PyObject _class, int incref=True)"""
8213 return _core_.PyValidator__setCallbackInfo(*args, **kwargs)
8214
8215
8216class PyValidatorPtr(PyValidator):
8217 def __init__(self, this):
8218 self.this = this
8219 if not hasattr(self,"thisown"): self.thisown = 0
8220 self.__class__ = PyValidator
8221_core_.PyValidator_swigregister(PyValidatorPtr)
8222
8223#---------------------------------------------------------------------------
8224
8225class Menu(EvtHandler):
36ed4f51 8226 """Proxy of C++ Menu class"""
d55e5bfc
RD
8227 def __repr__(self):
8228 return "<%s.%s; proxy of C++ wxMenu instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
8229 def __init__(self, *args, **kwargs):
8230 """__init__(self, String title=EmptyString, long style=0) -> Menu"""
8231 newobj = _core_.new_Menu(*args, **kwargs)
8232 self.this = newobj.this
8233 self.thisown = 1
8234 del newobj.thisown
8235 self._setOORInfo(self)
8236
8237 def Append(*args, **kwargs):
8238 """Append(self, int id, String text, String help=EmptyString, int kind=ITEM_NORMAL) -> MenuItem"""
8239 return _core_.Menu_Append(*args, **kwargs)
8240
8241 def AppendSeparator(*args, **kwargs):
8242 """AppendSeparator(self) -> MenuItem"""
8243 return _core_.Menu_AppendSeparator(*args, **kwargs)
8244
8245 def AppendCheckItem(*args, **kwargs):
8246 """AppendCheckItem(self, int id, String text, String help=EmptyString) -> MenuItem"""
8247 return _core_.Menu_AppendCheckItem(*args, **kwargs)
8248
8249 def AppendRadioItem(*args, **kwargs):
8250 """AppendRadioItem(self, int id, String text, String help=EmptyString) -> MenuItem"""
8251 return _core_.Menu_AppendRadioItem(*args, **kwargs)
8252
8253 def AppendMenu(*args, **kwargs):
8254 """AppendMenu(self, int id, String text, Menu submenu, String help=EmptyString) -> MenuItem"""
8255 return _core_.Menu_AppendMenu(*args, **kwargs)
8256
8257 def AppendItem(*args, **kwargs):
8258 """AppendItem(self, MenuItem item) -> MenuItem"""
8259 return _core_.Menu_AppendItem(*args, **kwargs)
8260
8261 def Break(*args, **kwargs):
8262 """Break(self)"""
8263 return _core_.Menu_Break(*args, **kwargs)
8264
8265 def InsertItem(*args, **kwargs):
8266 """InsertItem(self, size_t pos, MenuItem item) -> MenuItem"""
8267 return _core_.Menu_InsertItem(*args, **kwargs)
8268
8269 def Insert(*args, **kwargs):
8270 """
8271 Insert(self, size_t pos, int id, String text, String help=EmptyString,
8272 int kind=ITEM_NORMAL) -> MenuItem
8273 """
8274 return _core_.Menu_Insert(*args, **kwargs)
8275
8276 def InsertSeparator(*args, **kwargs):
8277 """InsertSeparator(self, size_t pos) -> MenuItem"""
8278 return _core_.Menu_InsertSeparator(*args, **kwargs)
8279
8280 def InsertCheckItem(*args, **kwargs):
8281 """InsertCheckItem(self, size_t pos, int id, String text, String help=EmptyString) -> MenuItem"""
8282 return _core_.Menu_InsertCheckItem(*args, **kwargs)
8283
8284 def InsertRadioItem(*args, **kwargs):
8285 """InsertRadioItem(self, size_t pos, int id, String text, String help=EmptyString) -> MenuItem"""
8286 return _core_.Menu_InsertRadioItem(*args, **kwargs)
8287
8288 def InsertMenu(*args, **kwargs):
8289 """InsertMenu(self, size_t pos, int id, String text, Menu submenu, String help=EmptyString) -> MenuItem"""
8290 return _core_.Menu_InsertMenu(*args, **kwargs)
8291
8292 def PrependItem(*args, **kwargs):
8293 """PrependItem(self, MenuItem item) -> MenuItem"""
8294 return _core_.Menu_PrependItem(*args, **kwargs)
8295
8296 def Prepend(*args, **kwargs):
8297 """Prepend(self, int id, String text, String help=EmptyString, int kind=ITEM_NORMAL) -> MenuItem"""
8298 return _core_.Menu_Prepend(*args, **kwargs)
8299
8300 def PrependSeparator(*args, **kwargs):
8301 """PrependSeparator(self) -> MenuItem"""
8302 return _core_.Menu_PrependSeparator(*args, **kwargs)
8303
8304 def PrependCheckItem(*args, **kwargs):
8305 """PrependCheckItem(self, int id, String text, String help=EmptyString) -> MenuItem"""
8306 return _core_.Menu_PrependCheckItem(*args, **kwargs)
8307
8308 def PrependRadioItem(*args, **kwargs):
8309 """PrependRadioItem(self, int id, String text, String help=EmptyString) -> MenuItem"""
8310 return _core_.Menu_PrependRadioItem(*args, **kwargs)
8311
8312 def PrependMenu(*args, **kwargs):
8313 """PrependMenu(self, int id, String text, Menu submenu, String help=EmptyString) -> MenuItem"""
8314 return _core_.Menu_PrependMenu(*args, **kwargs)
8315
8316 def Remove(*args, **kwargs):
8317 """Remove(self, int id) -> MenuItem"""
8318 return _core_.Menu_Remove(*args, **kwargs)
8319
8320 def RemoveItem(*args, **kwargs):
8321 """RemoveItem(self, MenuItem item) -> MenuItem"""
8322 return _core_.Menu_RemoveItem(*args, **kwargs)
8323
8324 def Delete(*args, **kwargs):
8325 """Delete(self, int id) -> bool"""
8326 return _core_.Menu_Delete(*args, **kwargs)
8327
8328 def DeleteItem(*args, **kwargs):
8329 """DeleteItem(self, MenuItem item) -> bool"""
8330 return _core_.Menu_DeleteItem(*args, **kwargs)
8331
8332 def Destroy(*args, **kwargs):
8333 """
8334 Destroy(self)
8335
8336 Deletes the C++ object this Python object is a proxy for.
8337 """
8338 return _core_.Menu_Destroy(*args, **kwargs)
8339
8340 def DestroyId(*args, **kwargs):
8341 """
8342 DestroyId(self, int id) -> bool
8343
8344 Deletes the C++ object this Python object is a proxy for.
8345 """
8346 return _core_.Menu_DestroyId(*args, **kwargs)
8347
8348 def DestroyItem(*args, **kwargs):
8349 """
8350 DestroyItem(self, MenuItem item) -> bool
8351
8352 Deletes the C++ object this Python object is a proxy for.
8353 """
8354 return _core_.Menu_DestroyItem(*args, **kwargs)
8355
8356 def GetMenuItemCount(*args, **kwargs):
8357 """GetMenuItemCount(self) -> size_t"""
8358 return _core_.Menu_GetMenuItemCount(*args, **kwargs)
8359
8360 def GetMenuItems(*args, **kwargs):
8361 """GetMenuItems(self) -> PyObject"""
8362 return _core_.Menu_GetMenuItems(*args, **kwargs)
8363
8364 def FindItem(*args, **kwargs):
8365 """FindItem(self, String item) -> int"""
8366 return _core_.Menu_FindItem(*args, **kwargs)
8367
8368 def FindItemById(*args, **kwargs):
8369 """FindItemById(self, int id) -> MenuItem"""
8370 return _core_.Menu_FindItemById(*args, **kwargs)
8371
8372 def FindItemByPosition(*args, **kwargs):
8373 """FindItemByPosition(self, size_t position) -> MenuItem"""
8374 return _core_.Menu_FindItemByPosition(*args, **kwargs)
8375
8376 def Enable(*args, **kwargs):
8377 """Enable(self, int id, bool enable)"""
8378 return _core_.Menu_Enable(*args, **kwargs)
8379
8380 def IsEnabled(*args, **kwargs):
8381 """IsEnabled(self, int id) -> bool"""
8382 return _core_.Menu_IsEnabled(*args, **kwargs)
8383
8384 def Check(*args, **kwargs):
8385 """Check(self, int id, bool check)"""
8386 return _core_.Menu_Check(*args, **kwargs)
8387
8388 def IsChecked(*args, **kwargs):
8389 """IsChecked(self, int id) -> bool"""
8390 return _core_.Menu_IsChecked(*args, **kwargs)
8391
8392 def SetLabel(*args, **kwargs):
8393 """SetLabel(self, int id, String label)"""
8394 return _core_.Menu_SetLabel(*args, **kwargs)
8395
8396 def GetLabel(*args, **kwargs):
8397 """GetLabel(self, int id) -> String"""
8398 return _core_.Menu_GetLabel(*args, **kwargs)
8399
8400 def SetHelpString(*args, **kwargs):
8401 """SetHelpString(self, int id, String helpString)"""
8402 return _core_.Menu_SetHelpString(*args, **kwargs)
8403
8404 def GetHelpString(*args, **kwargs):
8405 """GetHelpString(self, int id) -> String"""
8406 return _core_.Menu_GetHelpString(*args, **kwargs)
8407
8408 def SetTitle(*args, **kwargs):
8409 """SetTitle(self, String title)"""
8410 return _core_.Menu_SetTitle(*args, **kwargs)
8411
8412 def GetTitle(*args, **kwargs):
8413 """GetTitle(self) -> String"""
8414 return _core_.Menu_GetTitle(*args, **kwargs)
8415
8416 def SetEventHandler(*args, **kwargs):
8417 """SetEventHandler(self, EvtHandler handler)"""
8418 return _core_.Menu_SetEventHandler(*args, **kwargs)
8419
8420 def GetEventHandler(*args, **kwargs):
8421 """GetEventHandler(self) -> EvtHandler"""
8422 return _core_.Menu_GetEventHandler(*args, **kwargs)
8423
8424 def SetInvokingWindow(*args, **kwargs):
8425 """SetInvokingWindow(self, Window win)"""
8426 return _core_.Menu_SetInvokingWindow(*args, **kwargs)
8427
8428 def GetInvokingWindow(*args, **kwargs):
8429 """GetInvokingWindow(self) -> Window"""
8430 return _core_.Menu_GetInvokingWindow(*args, **kwargs)
8431
8432 def GetStyle(*args, **kwargs):
8433 """GetStyle(self) -> long"""
8434 return _core_.Menu_GetStyle(*args, **kwargs)
8435
8436 def UpdateUI(*args, **kwargs):
8437 """UpdateUI(self, EvtHandler source=None)"""
8438 return _core_.Menu_UpdateUI(*args, **kwargs)
8439
8440 def GetMenuBar(*args, **kwargs):
8441 """GetMenuBar(self) -> MenuBar"""
8442 return _core_.Menu_GetMenuBar(*args, **kwargs)
8443
8444 def Attach(*args, **kwargs):
8445 """Attach(self, wxMenuBarBase menubar)"""
8446 return _core_.Menu_Attach(*args, **kwargs)
8447
8448 def Detach(*args, **kwargs):
8449 """Detach(self)"""
8450 return _core_.Menu_Detach(*args, **kwargs)
8451
8452 def IsAttached(*args, **kwargs):
8453 """IsAttached(self) -> bool"""
8454 return _core_.Menu_IsAttached(*args, **kwargs)
8455
8456 def SetParent(*args, **kwargs):
8457 """SetParent(self, Menu parent)"""
8458 return _core_.Menu_SetParent(*args, **kwargs)
8459
8460 def GetParent(*args, **kwargs):
8461 """GetParent(self) -> Menu"""
8462 return _core_.Menu_GetParent(*args, **kwargs)
8463
8464
8465class MenuPtr(Menu):
8466 def __init__(self, this):
8467 self.this = this
8468 if not hasattr(self,"thisown"): self.thisown = 0
8469 self.__class__ = Menu
8470_core_.Menu_swigregister(MenuPtr)
8471DefaultValidator = cvar.DefaultValidator
8472
8473#---------------------------------------------------------------------------
8474
8475class MenuBar(Window):
36ed4f51 8476 """Proxy of C++ MenuBar class"""
d55e5bfc
RD
8477 def __repr__(self):
8478 return "<%s.%s; proxy of C++ wxMenuBar instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
8479 def __init__(self, *args, **kwargs):
8480 """__init__(self, long style=0) -> MenuBar"""
8481 newobj = _core_.new_MenuBar(*args, **kwargs)
8482 self.this = newobj.this
8483 self.thisown = 1
8484 del newobj.thisown
8485 self._setOORInfo(self)
8486
8487 def Append(*args, **kwargs):
8488 """Append(self, Menu menu, String title) -> bool"""
8489 return _core_.MenuBar_Append(*args, **kwargs)
8490
8491 def Insert(*args, **kwargs):
8492 """Insert(self, size_t pos, Menu menu, String title) -> bool"""
8493 return _core_.MenuBar_Insert(*args, **kwargs)
8494
8495 def GetMenuCount(*args, **kwargs):
8496 """GetMenuCount(self) -> size_t"""
8497 return _core_.MenuBar_GetMenuCount(*args, **kwargs)
8498
8499 def GetMenu(*args, **kwargs):
8500 """GetMenu(self, size_t pos) -> Menu"""
8501 return _core_.MenuBar_GetMenu(*args, **kwargs)
8502
8503 def Replace(*args, **kwargs):
8504 """Replace(self, size_t pos, Menu menu, String title) -> Menu"""
8505 return _core_.MenuBar_Replace(*args, **kwargs)
8506
8507 def Remove(*args, **kwargs):
8508 """Remove(self, size_t pos) -> Menu"""
8509 return _core_.MenuBar_Remove(*args, **kwargs)
8510
8511 def EnableTop(*args, **kwargs):
8512 """EnableTop(self, size_t pos, bool enable)"""
8513 return _core_.MenuBar_EnableTop(*args, **kwargs)
8514
8515 def IsEnabledTop(*args, **kwargs):
8516 """IsEnabledTop(self, size_t pos) -> bool"""
8517 return _core_.MenuBar_IsEnabledTop(*args, **kwargs)
8518
8519 def SetLabelTop(*args, **kwargs):
8520 """SetLabelTop(self, size_t pos, String label)"""
8521 return _core_.MenuBar_SetLabelTop(*args, **kwargs)
8522
8523 def GetLabelTop(*args, **kwargs):
8524 """GetLabelTop(self, size_t pos) -> String"""
8525 return _core_.MenuBar_GetLabelTop(*args, **kwargs)
8526
8527 def FindMenuItem(*args, **kwargs):
8528 """FindMenuItem(self, String menu, String item) -> int"""
8529 return _core_.MenuBar_FindMenuItem(*args, **kwargs)
8530
8531 def FindItemById(*args, **kwargs):
8532 """FindItemById(self, int id) -> MenuItem"""
8533 return _core_.MenuBar_FindItemById(*args, **kwargs)
8534
8535 def FindMenu(*args, **kwargs):
8536 """FindMenu(self, String title) -> int"""
8537 return _core_.MenuBar_FindMenu(*args, **kwargs)
8538
8539 def Enable(*args, **kwargs):
8540 """Enable(self, int id, bool enable)"""
8541 return _core_.MenuBar_Enable(*args, **kwargs)
8542
8543 def Check(*args, **kwargs):
8544 """Check(self, int id, bool check)"""
8545 return _core_.MenuBar_Check(*args, **kwargs)
8546
8547 def IsChecked(*args, **kwargs):
8548 """IsChecked(self, int id) -> bool"""
8549 return _core_.MenuBar_IsChecked(*args, **kwargs)
8550
8551 def IsEnabled(*args, **kwargs):
8552 """IsEnabled(self, int id) -> bool"""
8553 return _core_.MenuBar_IsEnabled(*args, **kwargs)
8554
8555 def SetLabel(*args, **kwargs):
8556 """SetLabel(self, int id, String label)"""
8557 return _core_.MenuBar_SetLabel(*args, **kwargs)
8558
8559 def GetLabel(*args, **kwargs):
8560 """GetLabel(self, int id) -> String"""
8561 return _core_.MenuBar_GetLabel(*args, **kwargs)
8562
8563 def SetHelpString(*args, **kwargs):
8564 """SetHelpString(self, int id, String helpString)"""
8565 return _core_.MenuBar_SetHelpString(*args, **kwargs)
8566
8567 def GetHelpString(*args, **kwargs):
8568 """GetHelpString(self, int id) -> String"""
8569 return _core_.MenuBar_GetHelpString(*args, **kwargs)
8570
8571 def GetFrame(*args, **kwargs):
8572 """GetFrame(self) -> wxFrame"""
8573 return _core_.MenuBar_GetFrame(*args, **kwargs)
8574
8575 def IsAttached(*args, **kwargs):
8576 """IsAttached(self) -> bool"""
8577 return _core_.MenuBar_IsAttached(*args, **kwargs)
8578
8579 def Attach(*args, **kwargs):
8580 """Attach(self, wxFrame frame)"""
8581 return _core_.MenuBar_Attach(*args, **kwargs)
8582
8583 def Detach(*args, **kwargs):
8584 """Detach(self)"""
8585 return _core_.MenuBar_Detach(*args, **kwargs)
8586
8587
8588class MenuBarPtr(MenuBar):
8589 def __init__(self, this):
8590 self.this = this
8591 if not hasattr(self,"thisown"): self.thisown = 0
8592 self.__class__ = MenuBar
8593_core_.MenuBar_swigregister(MenuBarPtr)
8594
8595#---------------------------------------------------------------------------
8596
8597class MenuItem(Object):
36ed4f51 8598 """Proxy of C++ MenuItem class"""
d55e5bfc
RD
8599 def __repr__(self):
8600 return "<%s.%s; proxy of C++ wxMenuItem instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
8601 def __init__(self, *args, **kwargs):
8602 """
8603 __init__(self, Menu parentMenu=None, int id=ID_ANY, String text=EmptyString,
8604 String help=EmptyString, int kind=ITEM_NORMAL,
8605 Menu subMenu=None) -> MenuItem
8606 """
8607 newobj = _core_.new_MenuItem(*args, **kwargs)
8608 self.this = newobj.this
8609 self.thisown = 1
8610 del newobj.thisown
8611 def GetMenu(*args, **kwargs):
8612 """GetMenu(self) -> Menu"""
8613 return _core_.MenuItem_GetMenu(*args, **kwargs)
8614
8615 def SetMenu(*args, **kwargs):
8616 """SetMenu(self, Menu menu)"""
8617 return _core_.MenuItem_SetMenu(*args, **kwargs)
8618
8619 def SetId(*args, **kwargs):
8620 """SetId(self, int id)"""
8621 return _core_.MenuItem_SetId(*args, **kwargs)
8622
8623 def GetId(*args, **kwargs):
8624 """GetId(self) -> int"""
8625 return _core_.MenuItem_GetId(*args, **kwargs)
8626
8627 def IsSeparator(*args, **kwargs):
8628 """IsSeparator(self) -> bool"""
8629 return _core_.MenuItem_IsSeparator(*args, **kwargs)
8630
8631 def SetText(*args, **kwargs):
8632 """SetText(self, String str)"""
8633 return _core_.MenuItem_SetText(*args, **kwargs)
8634
8635 def GetLabel(*args, **kwargs):
8636 """GetLabel(self) -> String"""
8637 return _core_.MenuItem_GetLabel(*args, **kwargs)
8638
8639 def GetText(*args, **kwargs):
8640 """GetText(self) -> String"""
8641 return _core_.MenuItem_GetText(*args, **kwargs)
8642
8643 def GetLabelFromText(*args, **kwargs):
d6c14a4c 8644 """GetLabelFromText(String text) -> String"""
d55e5bfc
RD
8645 return _core_.MenuItem_GetLabelFromText(*args, **kwargs)
8646
8647 GetLabelFromText = staticmethod(GetLabelFromText)
8648 def GetKind(*args, **kwargs):
8649 """GetKind(self) -> int"""
8650 return _core_.MenuItem_GetKind(*args, **kwargs)
8651
8652 def SetKind(*args, **kwargs):
8653 """SetKind(self, int kind)"""
8654 return _core_.MenuItem_SetKind(*args, **kwargs)
8655
8656 def SetCheckable(*args, **kwargs):
8657 """SetCheckable(self, bool checkable)"""
8658 return _core_.MenuItem_SetCheckable(*args, **kwargs)
8659
8660 def IsCheckable(*args, **kwargs):
8661 """IsCheckable(self) -> bool"""
8662 return _core_.MenuItem_IsCheckable(*args, **kwargs)
8663
8664 def IsSubMenu(*args, **kwargs):
8665 """IsSubMenu(self) -> bool"""
8666 return _core_.MenuItem_IsSubMenu(*args, **kwargs)
8667
8668 def SetSubMenu(*args, **kwargs):
8669 """SetSubMenu(self, Menu menu)"""
8670 return _core_.MenuItem_SetSubMenu(*args, **kwargs)
8671
8672 def GetSubMenu(*args, **kwargs):
8673 """GetSubMenu(self) -> Menu"""
8674 return _core_.MenuItem_GetSubMenu(*args, **kwargs)
8675
8676 def Enable(*args, **kwargs):
8677 """Enable(self, bool enable=True)"""
8678 return _core_.MenuItem_Enable(*args, **kwargs)
8679
8680 def IsEnabled(*args, **kwargs):
8681 """IsEnabled(self) -> bool"""
8682 return _core_.MenuItem_IsEnabled(*args, **kwargs)
8683
8684 def Check(*args, **kwargs):
8685 """Check(self, bool check=True)"""
8686 return _core_.MenuItem_Check(*args, **kwargs)
8687
8688 def IsChecked(*args, **kwargs):
8689 """IsChecked(self) -> bool"""
8690 return _core_.MenuItem_IsChecked(*args, **kwargs)
8691
8692 def Toggle(*args, **kwargs):
8693 """Toggle(self)"""
8694 return _core_.MenuItem_Toggle(*args, **kwargs)
8695
8696 def SetHelp(*args, **kwargs):
8697 """SetHelp(self, String str)"""
8698 return _core_.MenuItem_SetHelp(*args, **kwargs)
8699
8700 def GetHelp(*args, **kwargs):
8701 """GetHelp(self) -> String"""
8702 return _core_.MenuItem_GetHelp(*args, **kwargs)
8703
8704 def GetAccel(*args, **kwargs):
8705 """GetAccel(self) -> AcceleratorEntry"""
8706 return _core_.MenuItem_GetAccel(*args, **kwargs)
8707
8708 def SetAccel(*args, **kwargs):
8709 """SetAccel(self, AcceleratorEntry accel)"""
8710 return _core_.MenuItem_SetAccel(*args, **kwargs)
8711
c1280d1e
RD
8712 def SetFont(*args, **kwargs):
8713 """SetFont(self, Font font)"""
8714 return _core_.MenuItem_SetFont(*args, **kwargs)
8715
8716 def GetFont(*args, **kwargs):
8717 """GetFont(self) -> Font"""
8718 return _core_.MenuItem_GetFont(*args, **kwargs)
8719
8720 def SetTextColour(*args, **kwargs):
8721 """SetTextColour(self, Colour colText)"""
8722 return _core_.MenuItem_SetTextColour(*args, **kwargs)
8723
8724 def GetTextColour(*args, **kwargs):
8725 """GetTextColour(self) -> Colour"""
8726 return _core_.MenuItem_GetTextColour(*args, **kwargs)
8727
8728 def SetBackgroundColour(*args, **kwargs):
8729 """SetBackgroundColour(self, Colour colBack)"""
8730 return _core_.MenuItem_SetBackgroundColour(*args, **kwargs)
8731
8732 def GetBackgroundColour(*args, **kwargs):
8733 """GetBackgroundColour(self) -> Colour"""
8734 return _core_.MenuItem_GetBackgroundColour(*args, **kwargs)
8735
8736 def SetBitmaps(*args, **kwargs):
8737 """SetBitmaps(self, Bitmap bmpChecked, Bitmap bmpUnchecked=wxNullBitmap)"""
8738 return _core_.MenuItem_SetBitmaps(*args, **kwargs)
8739
8740 def SetDisabledBitmap(*args, **kwargs):
8741 """SetDisabledBitmap(self, Bitmap bmpDisabled)"""
8742 return _core_.MenuItem_SetDisabledBitmap(*args, **kwargs)
8743
8744 def GetDisabledBitmap(*args, **kwargs):
8745 """GetDisabledBitmap(self) -> Bitmap"""
8746 return _core_.MenuItem_GetDisabledBitmap(*args, **kwargs)
8747
8748 def SetMarginWidth(*args, **kwargs):
8749 """SetMarginWidth(self, int nWidth)"""
8750 return _core_.MenuItem_SetMarginWidth(*args, **kwargs)
8751
8752 def GetMarginWidth(*args, **kwargs):
8753 """GetMarginWidth(self) -> int"""
8754 return _core_.MenuItem_GetMarginWidth(*args, **kwargs)
8755
d55e5bfc 8756 def GetDefaultMarginWidth(*args, **kwargs):
d6c14a4c 8757 """GetDefaultMarginWidth() -> int"""
d55e5bfc
RD
8758 return _core_.MenuItem_GetDefaultMarginWidth(*args, **kwargs)
8759
8760 GetDefaultMarginWidth = staticmethod(GetDefaultMarginWidth)
c1280d1e
RD
8761 def IsOwnerDrawn(*args, **kwargs):
8762 """IsOwnerDrawn(self) -> bool"""
8763 return _core_.MenuItem_IsOwnerDrawn(*args, **kwargs)
8764
8765 def SetOwnerDrawn(*args, **kwargs):
8766 """SetOwnerDrawn(self, bool ownerDrawn=True)"""
8767 return _core_.MenuItem_SetOwnerDrawn(*args, **kwargs)
8768
8769 def ResetOwnerDrawn(*args, **kwargs):
8770 """ResetOwnerDrawn(self)"""
8771 return _core_.MenuItem_ResetOwnerDrawn(*args, **kwargs)
8772
d55e5bfc
RD
8773 def SetBitmap(*args, **kwargs):
8774 """SetBitmap(self, Bitmap bitmap)"""
8775 return _core_.MenuItem_SetBitmap(*args, **kwargs)
8776
8777 def GetBitmap(*args, **kwargs):
8778 """GetBitmap(self) -> Bitmap"""
8779 return _core_.MenuItem_GetBitmap(*args, **kwargs)
8780
8781
8782class MenuItemPtr(MenuItem):
8783 def __init__(self, this):
8784 self.this = this
8785 if not hasattr(self,"thisown"): self.thisown = 0
8786 self.__class__ = MenuItem
8787_core_.MenuItem_swigregister(MenuItemPtr)
8788
8789def MenuItem_GetLabelFromText(*args, **kwargs):
8790 """MenuItem_GetLabelFromText(String text) -> String"""
8791 return _core_.MenuItem_GetLabelFromText(*args, **kwargs)
8792
8793def MenuItem_GetDefaultMarginWidth(*args, **kwargs):
8794 """MenuItem_GetDefaultMarginWidth() -> int"""
8795 return _core_.MenuItem_GetDefaultMarginWidth(*args, **kwargs)
8796
8797#---------------------------------------------------------------------------
8798
8799class Control(Window):
8800 """
8801 This is the base class for a control or 'widget'.
8802
15817c7e
RD
8803 A control is generally a small window which processes user input
8804 and/or displays one or more item of data.
d55e5bfc
RD
8805 """
8806 def __repr__(self):
8807 return "<%s.%s; proxy of C++ wxControl instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
8808 def __init__(self, *args, **kwargs):
8809 """
bfddbb17
RD
8810 __init__(self, Window parent, int id=-1, Point pos=DefaultPosition,
8811 Size size=DefaultSize, long style=0, Validator validator=DefaultValidator,
d55e5bfc
RD
8812 String name=ControlNameStr) -> Control
8813
15817c7e
RD
8814 Create a Control. Normally you should only call this from a subclass'
8815 __init__ as a plain old wx.Control is not very useful.
d55e5bfc
RD
8816 """
8817 newobj = _core_.new_Control(*args, **kwargs)
8818 self.this = newobj.this
8819 self.thisown = 1
8820 del newobj.thisown
8821 self._setOORInfo(self)
8822
8823 def Create(*args, **kwargs):
8824 """
bfddbb17
RD
8825 Create(self, Window parent, int id=-1, Point pos=DefaultPosition,
8826 Size size=DefaultSize, long style=0, Validator validator=DefaultValidator,
d55e5bfc
RD
8827 String name=ControlNameStr) -> bool
8828
8829 Do the 2nd phase and create the GUI control.
8830 """
8831 return _core_.Control_Create(*args, **kwargs)
8832
8833 def Command(*args, **kwargs):
8834 """
8835 Command(self, CommandEvent event)
8836
15817c7e
RD
8837 Simulates the effect of the user issuing a command to the item.
8838
8839 :see: `wx.CommandEvent`
8840
d55e5bfc
RD
8841 """
8842 return _core_.Control_Command(*args, **kwargs)
8843
8844 def GetLabel(*args, **kwargs):
8845 """
8846 GetLabel(self) -> String
8847
8848 Return a control's text.
8849 """
8850 return _core_.Control_GetLabel(*args, **kwargs)
8851
8852 def SetLabel(*args, **kwargs):
8853 """
8854 SetLabel(self, String label)
8855
8856 Sets the item's text.
8857 """
8858 return _core_.Control_SetLabel(*args, **kwargs)
8859
8860 def GetClassDefaultAttributes(*args, **kwargs):
110da5b0
RD
8861 """
8862 GetClassDefaultAttributes(int variant=WINDOW_VARIANT_NORMAL) -> VisualAttributes
8863
8864 Get the default attributes for this class. This is useful if you want
8865 to use the same font or colour in your own control as in a standard
8866 control -- which is a much better idea than hard coding specific
8867 colours or fonts which might look completely out of place on the
8868 user's system, especially if it uses themes.
8869
8870 The variant parameter is only relevant under Mac currently and is
8871 ignore under other platforms. Under Mac, it will change the size of
8872 the returned font. See `wx.Window.SetWindowVariant` for more about
8873 this.
8874 """
d55e5bfc
RD
8875 return _core_.Control_GetClassDefaultAttributes(*args, **kwargs)
8876
8877 GetClassDefaultAttributes = staticmethod(GetClassDefaultAttributes)
8878
8879class ControlPtr(Control):
8880 def __init__(self, this):
8881 self.this = this
8882 if not hasattr(self,"thisown"): self.thisown = 0
8883 self.__class__ = Control
8884_core_.Control_swigregister(ControlPtr)
8885ControlNameStr = cvar.ControlNameStr
8886
8887def PreControl(*args, **kwargs):
8888 """
8889 PreControl() -> Control
8890
8891 Precreate a Control control for 2-phase creation
8892 """
8893 val = _core_.new_PreControl(*args, **kwargs)
8894 val.thisown = 1
8895 return val
8896
8897def Control_GetClassDefaultAttributes(*args, **kwargs):
110da5b0
RD
8898 """
8899 Control_GetClassDefaultAttributes(int variant=WINDOW_VARIANT_NORMAL) -> VisualAttributes
8900
8901 Get the default attributes for this class. This is useful if you want
8902 to use the same font or colour in your own control as in a standard
8903 control -- which is a much better idea than hard coding specific
8904 colours or fonts which might look completely out of place on the
8905 user's system, especially if it uses themes.
8906
8907 The variant parameter is only relevant under Mac currently and is
8908 ignore under other platforms. Under Mac, it will change the size of
8909 the returned font. See `wx.Window.SetWindowVariant` for more about
8910 this.
8911 """
d55e5bfc
RD
8912 return _core_.Control_GetClassDefaultAttributes(*args, **kwargs)
8913
8914#---------------------------------------------------------------------------
8915
8916class ItemContainer(object):
8917 """
53aa7709
RD
8918 The wx.ItemContainer class defines an interface which is implemented
8919 by all controls which have string subitems, each of which may be
8920 selected, such as `wx.ListBox`, `wx.CheckListBox`, `wx.Choice` as well
8921 as `wx.ComboBox` which implements an extended interface deriving from
15817c7e 8922 this one.
d55e5bfc 8923
15817c7e
RD
8924 It defines the methods for accessing the control's items and although
8925 each of the derived classes implements them differently, they still
8926 all conform to the same interface.
d55e5bfc 8927
15817c7e
RD
8928 The items in a wx.ItemContainer have (non empty) string labels and,
8929 optionally, client data associated with them.
d55e5bfc
RD
8930
8931 """
8932 def __init__(self): raise RuntimeError, "No constructor defined"
8933 def __repr__(self):
8934 return "<%s.%s; proxy of C++ wxItemContainer instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
8935 def Append(*args, **kwargs):
8936 """
8937 Append(self, String item, PyObject clientData=None) -> int
8938
15817c7e
RD
8939 Adds the item to the control, associating the given data with the item
8940 if not None. The return value is the index of the newly added item
8941 which may be different from the last one if the control is sorted (e.g.
8942 has wx.LB_SORT or wx.CB_SORT style).
d55e5bfc
RD
8943 """
8944 return _core_.ItemContainer_Append(*args, **kwargs)
8945
8946 def AppendItems(*args, **kwargs):
8947 """
f5b96ee1 8948 AppendItems(self, List strings)
d55e5bfc 8949
15817c7e
RD
8950 Apend several items at once to the control. Notice that calling this
8951 method may be much faster than appending the items one by one if you
8952 need to add a lot of items.
d55e5bfc
RD
8953 """
8954 return _core_.ItemContainer_AppendItems(*args, **kwargs)
8955
8956 def Insert(*args, **kwargs):
8957 """
8958 Insert(self, String item, int pos, PyObject clientData=None) -> int
8959
15817c7e 8960 Insert an item into the control before the item at the ``pos`` index,
d55e5bfc
RD
8961 optionally associating some data object with the item.
8962 """
8963 return _core_.ItemContainer_Insert(*args, **kwargs)
8964
8965 def Clear(*args, **kwargs):
8966 """
8967 Clear(self)
8968
8969 Removes all items from the control.
8970 """
8971 return _core_.ItemContainer_Clear(*args, **kwargs)
8972
8973 def Delete(*args, **kwargs):
8974 """
8975 Delete(self, int n)
8976
15817c7e
RD
8977 Deletes the item at the zero-based index 'n' from the control. Note
8978 that it is an error (signalled by a `wx.PyAssertionError` exception if
8979 enabled) to remove an item with the index negative or greater or equal
8980 than the number of items in the control.
d55e5bfc
RD
8981 """
8982 return _core_.ItemContainer_Delete(*args, **kwargs)
8983
53aa7709
RD
8984 def GetClientData(*args, **kwargs):
8985 """
8986 GetClientData(self, int n) -> PyObject
8987
8988 Returns the client data associated with the given item, (if any.)
8989 """
8990 return _core_.ItemContainer_GetClientData(*args, **kwargs)
8991
8992 def SetClientData(*args, **kwargs):
8993 """
8994 SetClientData(self, int n, PyObject clientData)
8995
8996 Associate the given client data with the item at position n.
8997 """
8998 return _core_.ItemContainer_SetClientData(*args, **kwargs)
8999
d55e5bfc
RD
9000 def GetCount(*args, **kwargs):
9001 """
9002 GetCount(self) -> int
9003
9004 Returns the number of items in the control.
9005 """
9006 return _core_.ItemContainer_GetCount(*args, **kwargs)
9007
9008 def IsEmpty(*args, **kwargs):
9009 """
9010 IsEmpty(self) -> bool
9011
9012 Returns True if the control is empty or False if it has some items.
9013 """
9014 return _core_.ItemContainer_IsEmpty(*args, **kwargs)
9015
9016 def GetString(*args, **kwargs):
9017 """
9018 GetString(self, int n) -> String
9019
9020 Returns the label of the item with the given index.
9021 """
9022 return _core_.ItemContainer_GetString(*args, **kwargs)
9023
9024 def GetStrings(*args, **kwargs):
9025 """GetStrings(self) -> wxArrayString"""
9026 return _core_.ItemContainer_GetStrings(*args, **kwargs)
9027
9028 def SetString(*args, **kwargs):
9029 """
9030 SetString(self, int n, String s)
9031
9032 Sets the label for the given item.
9033 """
9034 return _core_.ItemContainer_SetString(*args, **kwargs)
9035
9036 def FindString(*args, **kwargs):
9037 """
9038 FindString(self, String s) -> int
9039
9040 Finds an item whose label matches the given string. Returns the
15817c7e
RD
9041 zero-based position of the item, or ``wx.NOT_FOUND`` if the string was not
9042 found.
d55e5bfc
RD
9043 """
9044 return _core_.ItemContainer_FindString(*args, **kwargs)
9045
53aa7709 9046 def SetSelection(*args, **kwargs):
d55e5bfc 9047 """
53aa7709 9048 SetSelection(self, int n)
d55e5bfc
RD
9049
9050 Sets the item at index 'n' to be the selected item.
9051 """
53aa7709 9052 return _core_.ItemContainer_SetSelection(*args, **kwargs)
d55e5bfc 9053
d55e5bfc
RD
9054 def GetSelection(*args, **kwargs):
9055 """
9056 GetSelection(self) -> int
9057
15817c7e
RD
9058 Returns the index of the selected item or ``wx.NOT_FOUND`` if no item
9059 is selected.
d55e5bfc
RD
9060 """
9061 return _core_.ItemContainer_GetSelection(*args, **kwargs)
9062
53aa7709
RD
9063 def SetStringSelection(*args, **kwargs):
9064 """SetStringSelection(self, String s) -> bool"""
9065 return _core_.ItemContainer_SetStringSelection(*args, **kwargs)
9066
d55e5bfc
RD
9067 def GetStringSelection(*args, **kwargs):
9068 """
9069 GetStringSelection(self) -> String
9070
15817c7e
RD
9071 Returns the label of the selected item or an empty string if no item
9072 is selected.
d55e5bfc
RD
9073 """
9074 return _core_.ItemContainer_GetStringSelection(*args, **kwargs)
9075
53aa7709 9076 def Select(*args, **kwargs):
d55e5bfc 9077 """
53aa7709 9078 Select(self, int n)
d55e5bfc 9079
53aa7709
RD
9080 This is the same as `SetSelection` and exists only because it is
9081 slightly more natural for controls which support multiple selection.
d55e5bfc 9082 """
53aa7709 9083 return _core_.ItemContainer_Select(*args, **kwargs)
d55e5bfc
RD
9084
9085
9086class ItemContainerPtr(ItemContainer):
9087 def __init__(self, this):
9088 self.this = this
9089 if not hasattr(self,"thisown"): self.thisown = 0
9090 self.__class__ = ItemContainer
9091_core_.ItemContainer_swigregister(ItemContainerPtr)
9092
9093#---------------------------------------------------------------------------
9094
9095class ControlWithItems(Control,ItemContainer):
9096 """
15817c7e
RD
9097 wx.ControlWithItems combines the ``wx.ItemContainer`` class with the
9098 wx.Control class, and is used for the base class of various controls
9099 that have items.
d55e5bfc
RD
9100 """
9101 def __init__(self): raise RuntimeError, "No constructor defined"
9102 def __repr__(self):
9103 return "<%s.%s; proxy of C++ wxControlWithItems instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
9104
9105class ControlWithItemsPtr(ControlWithItems):
9106 def __init__(self, this):
9107 self.this = this
9108 if not hasattr(self,"thisown"): self.thisown = 0
9109 self.__class__ = ControlWithItems
9110_core_.ControlWithItems_swigregister(ControlWithItemsPtr)
9111
9112#---------------------------------------------------------------------------
9113
9114class SizerItem(Object):
bfddbb17
RD
9115 """
9116 The wx.SizerItem class is used to track the position, size and other
9117 attributes of each item managed by a `wx.Sizer`. In normal usage user
9118 code should never need to deal directly with a wx.SizerItem, but
9119 custom classes derived from `wx.PySizer` will probably need to use the
9120 collection of wx.SizerItems held by wx.Sizer when calculating layout.
9121
9122 :see: `wx.Sizer`, `wx.GBSizerItem`
9123 """
d55e5bfc
RD
9124 def __repr__(self):
9125 return "<%s.%s; proxy of C++ wxSizerItem instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
9126 def __init__(self, *args, **kwargs):
bfddbb17
RD
9127 """
9128 __init__(self) -> SizerItem
9129
9130 Constructs an empty wx.SizerItem. Either a window, sizer or spacer
9131 size will need to be set before this item can be used in a Sizer.
9132
9133 You will probably never need to create a wx.SizerItem directly as they
9134 are created automatically when the sizer's Add, Insert or Prepend
9135 methods are called.
9136
9137 :see: `wx.SizerItemSpacer`, `wx.SizerItemWindow`, `wx.SizerItemSizer`
9138 """
d55e5bfc
RD
9139 newobj = _core_.new_SizerItem(*args, **kwargs)
9140 self.this = newobj.this
9141 self.thisown = 1
9142 del newobj.thisown
9143 def DeleteWindows(*args, **kwargs):
bfddbb17
RD
9144 """
9145 DeleteWindows(self)
9146
9147 Destroy the window or the windows in a subsizer, depending on the type
9148 of item.
9149 """
d55e5bfc
RD
9150 return _core_.SizerItem_DeleteWindows(*args, **kwargs)
9151
9152 def DetachSizer(*args, **kwargs):
bfddbb17
RD
9153 """
9154 DetachSizer(self)
9155
9156 Enable deleting the SizerItem without destroying the contained sizer.
9157 """
d55e5bfc
RD
9158 return _core_.SizerItem_DetachSizer(*args, **kwargs)
9159
9160 def GetSize(*args, **kwargs):
bfddbb17
RD
9161 """
9162 GetSize(self) -> Size
9163
9164 Get the current size of the item, as set in the last Layout.
9165 """
d55e5bfc
RD
9166 return _core_.SizerItem_GetSize(*args, **kwargs)
9167
9168 def CalcMin(*args, **kwargs):
bfddbb17
RD
9169 """
9170 CalcMin(self) -> Size
9171
9172 Calculates the minimum desired size for the item, including any space
9173 needed by borders.
9174 """
d55e5bfc
RD
9175 return _core_.SizerItem_CalcMin(*args, **kwargs)
9176
9177 def SetDimension(*args, **kwargs):
bfddbb17
RD
9178 """
9179 SetDimension(self, Point pos, Size size)
9180
9181 Set the position and size of the space allocated for this item by the
9182 sizer, and adjust the position and size of the item (window or
9183 subsizer) to be within that space taking alignment and borders into
9184 account.
9185 """
d55e5bfc
RD
9186 return _core_.SizerItem_SetDimension(*args, **kwargs)
9187
9188 def GetMinSize(*args, **kwargs):
bfddbb17
RD
9189 """
9190 GetMinSize(self) -> Size
9191
9192 Get the minimum size needed for the item.
9193 """
d55e5bfc
RD
9194 return _core_.SizerItem_GetMinSize(*args, **kwargs)
9195
a001823c
RD
9196 def GetMinSizeWithBorder(*args, **kwargs):
9197 """
9198 GetMinSizeWithBorder(self) -> Size
9199
9200 Get the minimum size needed for the item with space for the borders
9201 added, if needed.
9202 """
9203 return _core_.SizerItem_GetMinSizeWithBorder(*args, **kwargs)
9204
d55e5bfc
RD
9205 def SetInitSize(*args, **kwargs):
9206 """SetInitSize(self, int x, int y)"""
9207 return _core_.SizerItem_SetInitSize(*args, **kwargs)
9208
9209 def SetRatioWH(*args, **kwargs):
bfddbb17
RD
9210 """
9211 SetRatioWH(self, int width, int height)
9212
9213 Set the ratio item attribute.
9214 """
d55e5bfc
RD
9215 return _core_.SizerItem_SetRatioWH(*args, **kwargs)
9216
9217 def SetRatioSize(*args, **kwargs):
bfddbb17
RD
9218 """
9219 SetRatioSize(self, Size size)
9220
9221 Set the ratio item attribute.
9222 """
d55e5bfc
RD
9223 return _core_.SizerItem_SetRatioSize(*args, **kwargs)
9224
9225 def SetRatio(*args, **kwargs):
bfddbb17
RD
9226 """
9227 SetRatio(self, float ratio)
9228
9229 Set the ratio item attribute.
9230 """
d55e5bfc
RD
9231 return _core_.SizerItem_SetRatio(*args, **kwargs)
9232
9233 def GetRatio(*args, **kwargs):
bfddbb17
RD
9234 """
9235 GetRatio(self) -> float
9236
9237 Set the ratio item attribute.
9238 """
d55e5bfc
RD
9239 return _core_.SizerItem_GetRatio(*args, **kwargs)
9240
070c48b4
RD
9241 def GetRect(*args, **kwargs):
9242 """
9243 GetRect(self) -> Rect
9244
9245 Returns the rectangle that the sizer item should occupy
9246 """
9247 return _core_.SizerItem_GetRect(*args, **kwargs)
9248
d55e5bfc 9249 def IsWindow(*args, **kwargs):
bfddbb17
RD
9250 """
9251 IsWindow(self) -> bool
9252
9253 Is this sizer item a window?
9254 """
d55e5bfc
RD
9255 return _core_.SizerItem_IsWindow(*args, **kwargs)
9256
9257 def IsSizer(*args, **kwargs):
bfddbb17
RD
9258 """
9259 IsSizer(self) -> bool
9260
9261 Is this sizer item a subsizer?
9262 """
d55e5bfc
RD
9263 return _core_.SizerItem_IsSizer(*args, **kwargs)
9264
9265 def IsSpacer(*args, **kwargs):
bfddbb17
RD
9266 """
9267 IsSpacer(self) -> bool
9268
9269 Is this sizer item a spacer?
9270 """
d55e5bfc
RD
9271 return _core_.SizerItem_IsSpacer(*args, **kwargs)
9272
9273 def SetProportion(*args, **kwargs):
bfddbb17
RD
9274 """
9275 SetProportion(self, int proportion)
9276
9277 Set the proportion value for this item.
9278 """
d55e5bfc
RD
9279 return _core_.SizerItem_SetProportion(*args, **kwargs)
9280
9281 def GetProportion(*args, **kwargs):
bfddbb17
RD
9282 """
9283 GetProportion(self) -> int
9284
9285 Get the proportion value for this item.
9286 """
d55e5bfc
RD
9287 return _core_.SizerItem_GetProportion(*args, **kwargs)
9288
bfddbb17
RD
9289 SetOption = wx._deprecated(SetProportion, "Please use `SetProportion` instead.")
9290 GetOption = wx._deprecated(GetProportion, "Please use `GetProportion` instead.")
d55e5bfc 9291 def SetFlag(*args, **kwargs):
bfddbb17
RD
9292 """
9293 SetFlag(self, int flag)
9294
9295 Set the flag value for this item.
9296 """
d55e5bfc
RD
9297 return _core_.SizerItem_SetFlag(*args, **kwargs)
9298
9299 def GetFlag(*args, **kwargs):
bfddbb17
RD
9300 """
9301 GetFlag(self) -> int
9302
9303 Get the flag value for this item.
9304 """
d55e5bfc
RD
9305 return _core_.SizerItem_GetFlag(*args, **kwargs)
9306
9307 def SetBorder(*args, **kwargs):
bfddbb17
RD
9308 """
9309 SetBorder(self, int border)
9310
9311 Set the border value for this item.
9312 """
d55e5bfc
RD
9313 return _core_.SizerItem_SetBorder(*args, **kwargs)
9314
9315 def GetBorder(*args, **kwargs):
bfddbb17
RD
9316 """
9317 GetBorder(self) -> int
9318
9319 Get the border value for this item.
9320 """
d55e5bfc
RD
9321 return _core_.SizerItem_GetBorder(*args, **kwargs)
9322
9323 def GetWindow(*args, **kwargs):
bfddbb17
RD
9324 """
9325 GetWindow(self) -> Window
9326
9327 Get the window (if any) that is managed by this sizer item.
9328 """
d55e5bfc
RD
9329 return _core_.SizerItem_GetWindow(*args, **kwargs)
9330
9331 def SetWindow(*args, **kwargs):
bfddbb17
RD
9332 """
9333 SetWindow(self, Window window)
9334
9335 Set the window to be managed by this sizer item.
9336 """
d55e5bfc
RD
9337 return _core_.SizerItem_SetWindow(*args, **kwargs)
9338
9339 def GetSizer(*args, **kwargs):
bfddbb17
RD
9340 """
9341 GetSizer(self) -> Sizer
9342
9343 Get the subsizer (if any) that is managed by this sizer item.
9344 """
d55e5bfc
RD
9345 return _core_.SizerItem_GetSizer(*args, **kwargs)
9346
9347 def SetSizer(*args, **kwargs):
bfddbb17
RD
9348 """
9349 SetSizer(self, Sizer sizer)
9350
9351 Set the subsizer to be managed by this sizer item.
9352 """
d55e5bfc
RD
9353 return _core_.SizerItem_SetSizer(*args, **kwargs)
9354
9355 def GetSpacer(*args, **kwargs):
bfddbb17
RD
9356 """
9357 GetSpacer(self) -> Size
9358
9359 Get the size of the spacer managed by this sizer item.
9360 """
d55e5bfc
RD
9361 return _core_.SizerItem_GetSpacer(*args, **kwargs)
9362
9363 def SetSpacer(*args, **kwargs):
bfddbb17
RD
9364 """
9365 SetSpacer(self, Size size)
9366
9367 Set the size of the spacer to be managed by this sizer item.
9368 """
d55e5bfc
RD
9369 return _core_.SizerItem_SetSpacer(*args, **kwargs)
9370
9371 def Show(*args, **kwargs):
bfddbb17
RD
9372 """
9373 Show(self, bool show)
9374
9375 Set the show item attribute, which sizers use to determine if the item
9376 is to be made part of the layout or not. If the item is tracking a
9377 window then it is shown or hidden as needed.
9378 """
d55e5bfc
RD
9379 return _core_.SizerItem_Show(*args, **kwargs)
9380
9381 def IsShown(*args, **kwargs):
bfddbb17
RD
9382 """
9383 IsShown(self) -> bool
9384
9385 Is the item to be shown in the layout?
9386 """
d55e5bfc
RD
9387 return _core_.SizerItem_IsShown(*args, **kwargs)
9388
9389 def GetPosition(*args, **kwargs):
bfddbb17
RD
9390 """
9391 GetPosition(self) -> Point
9392
9393 Returns the current position of the item, as set in the last Layout.
9394 """
d55e5bfc
RD
9395 return _core_.SizerItem_GetPosition(*args, **kwargs)
9396
9397 def GetUserData(*args, **kwargs):
bfddbb17
RD
9398 """
9399 GetUserData(self) -> PyObject
9400
9401 Returns the userData associated with this sizer item, or None if there
9402 isn't any.
9403 """
d55e5bfc
RD
9404 return _core_.SizerItem_GetUserData(*args, **kwargs)
9405
9406
9407class SizerItemPtr(SizerItem):
9408 def __init__(self, this):
9409 self.this = this
9410 if not hasattr(self,"thisown"): self.thisown = 0
9411 self.__class__ = SizerItem
9412_core_.SizerItem_swigregister(SizerItemPtr)
9413
bfddbb17 9414def SizerItemWindow(*args, **kwargs):
d55e5bfc 9415 """
bfddbb17
RD
9416 SizerItemWindow(Window window, int proportion, int flag, int border,
9417 PyObject userData=None) -> SizerItem
9418
9419 Constructs a `wx.SizerItem` for tracking a window.
d55e5bfc 9420 """
bfddbb17 9421 val = _core_.new_SizerItemWindow(*args, **kwargs)
d55e5bfc
RD
9422 val.thisown = 1
9423 return val
9424
bfddbb17 9425def SizerItemSpacer(*args, **kwargs):
d55e5bfc 9426 """
bfddbb17
RD
9427 SizerItemSpacer(int width, int height, int proportion, int flag, int border,
9428 PyObject userData=None) -> SizerItem
9429
9430 Constructs a `wx.SizerItem` for tracking a spacer.
d55e5bfc 9431 """
bfddbb17 9432 val = _core_.new_SizerItemSpacer(*args, **kwargs)
d55e5bfc
RD
9433 val.thisown = 1
9434 return val
9435
9436def SizerItemSizer(*args, **kwargs):
9437 """
9438 SizerItemSizer(Sizer sizer, int proportion, int flag, int border,
bfddbb17
RD
9439 PyObject userData=None) -> SizerItem
9440
9441 Constructs a `wx.SizerItem` for tracking a subsizer
d55e5bfc
RD
9442 """
9443 val = _core_.new_SizerItemSizer(*args, **kwargs)
9444 val.thisown = 1
9445 return val
9446
9447class Sizer(Object):
bfddbb17
RD
9448 """
9449 wx.Sizer is the abstract base class used for laying out subwindows in
9450 a window. You cannot use wx.Sizer directly; instead, you will have to
9451 use one of the sizer classes derived from it such as `wx.BoxSizer`,
9452 `wx.StaticBoxSizer`, `wx.NotebookSizer`, `wx.GridSizer`, `wx.FlexGridSizer`
9453 and `wx.GridBagSizer`.
9454
9455 The concept implemented by sizers in wxWidgets is closely related to
9456 layout tools in other GUI toolkits, such as Java's AWT, the GTK
9457 toolkit or the Qt toolkit. It is based upon the idea of the individual
9458 subwindows reporting their minimal required size and their ability to
9459 get stretched if the size of the parent window has changed. This will
9460 most often mean that the programmer does not set the original size of
9461 a dialog in the beginning, rather the dialog will assigned a sizer and
9462 this sizer will be queried about the recommended size. The sizer in
9463 turn will query its children, which can be normal windows or contorls,
9464 empty space or other sizers, so that a hierarchy of sizers can be
9465 constructed. Note that wxSizer does not derive from wxWindow and thus
9466 do not interfere with tab ordering and requires very little resources
9467 compared to a real window on screen.
9468
9469 What makes sizers so well fitted for use in wxWidgets is the fact that
9470 every control reports its own minimal size and the algorithm can
9471 handle differences in font sizes or different window (dialog item)
9472 sizes on different platforms without problems. If for example the
9473 standard font as well as the overall design of Mac widgets requires
9474 more space than on Windows, then the initial size of a dialog using a
9475 sizer will automatically be bigger on Mac than on Windows.
9476 """
d55e5bfc
RD
9477 def __init__(self): raise RuntimeError, "No constructor defined"
9478 def __repr__(self):
9479 return "<%s.%s; proxy of C++ wxSizer instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
9480 def _setOORInfo(*args, **kwargs):
9481 """_setOORInfo(self, PyObject _self)"""
9482 return _core_.Sizer__setOORInfo(*args, **kwargs)
9483
9484 def Add(*args, **kwargs):
9485 """
bfddbb17 9486 Add(self, item, int proportion=0, int flag=0, int border=0,
070c48b4 9487 PyObject userData=None) -> wx.SizerItem
bfddbb17
RD
9488
9489 Appends a child item to the sizer.
d55e5bfc
RD
9490 """
9491 return _core_.Sizer_Add(*args, **kwargs)
9492
9493 def Insert(*args, **kwargs):
9494 """
bfddbb17 9495 Insert(self, int before, item, int proportion=0, int flag=0, int border=0,
070c48b4 9496 PyObject userData=None) -> wx.SizerItem
bfddbb17
RD
9497
9498 Inserts a new item into the list of items managed by this sizer before
9499 the item at index *before*. See `Add` for a description of the parameters.
d55e5bfc
RD
9500 """
9501 return _core_.Sizer_Insert(*args, **kwargs)
9502
9503 def Prepend(*args, **kwargs):
9504 """
bfddbb17 9505 Prepend(self, item, int proportion=0, int flag=0, int border=0,
070c48b4 9506 PyObject userData=None) -> wx.SizerItem
bfddbb17
RD
9507
9508 Adds a new item to the begining of the list of sizer items managed by
9509 this sizer. See `Add` for a description of the parameters.
d55e5bfc
RD
9510 """
9511 return _core_.Sizer_Prepend(*args, **kwargs)
9512
9513 def Remove(*args, **kwargs):
bfddbb17
RD
9514 """
9515 Remove(self, item) -> bool
9516
9517 Removes an item from the sizer and destroys it. This method does not
9518 cause any layout or resizing to take place, call `Layout` to update
9519 the layout on screen after removing a child from the sizer. The
9520 *item* parameter can be either a window, a sizer, or the zero-based
9521 index of an item to remove. Returns True if the child item was found
9522 and removed.
9523 """
d55e5bfc
RD
9524 return _core_.Sizer_Remove(*args, **kwargs)
9525
1a6bba1e 9526 def Detach(*args, **kwargs):
bfddbb17
RD
9527 """
9528 Detach(self, item) -> bool
9529
9530 Detaches an item from the sizer without destroying it. This method
9531 does not cause any layout or resizing to take place, call `Layout` to
9532 do so. The *item* parameter can be either a window, a sizer, or the
9533 zero-based index of the item to be detached. Returns True if the child item
9534 was found and detached.
9535 """
1a6bba1e
RD
9536 return _core_.Sizer_Detach(*args, **kwargs)
9537
070c48b4
RD
9538 def GetItem(*args, **kwargs):
9539 """
9540 GetItem(self, item) -> wx.SizerItem
9541
9542 Returns the `wx.SizerItem` which holds the *item* given. The *item*
9543 parameter can be either a window, a sizer, or the zero-based index of
9544 the item to be detached.
9545 """
9546 return _core_.Sizer_GetItem(*args, **kwargs)
9547
d55e5bfc
RD
9548 def _SetItemMinSize(*args, **kwargs):
9549 """_SetItemMinSize(self, PyObject item, Size size)"""
9550 return _core_.Sizer__SetItemMinSize(*args, **kwargs)
9551
bfddbb17
RD
9552 def SetItemMinSize(self, item, *args):
9553 """
9554 SetItemMinSize(self, item, Size size)
9555
9556 Sets the minimum size that will be allocated for an item in the sizer.
9557 The *item* parameter can be either a window, a sizer, or the
9558 zero-based index of the item. If a window or sizer is given then it
9559 will be searched for recursivly in subsizers if neccessary.
9560 """
9561 if len(args) == 2:
9562 # for backward compatibility accept separate width,height args too
9563 return self._SetItemMinSize(item, args)
9564 else:
9565 return self._SetItemMinSize(item, args[0])
9566
d55e5bfc 9567 def AddItem(*args, **kwargs):
bfddbb17
RD
9568 """
9569 AddItem(self, SizerItem item)
9570
9571 Adds a `wx.SizerItem` to the sizer.
9572 """
d55e5bfc
RD
9573 return _core_.Sizer_AddItem(*args, **kwargs)
9574
9575 def InsertItem(*args, **kwargs):
bfddbb17
RD
9576 """
9577 InsertItem(self, int index, SizerItem item)
9578
9579 Inserts a `wx.SizerItem` to the sizer at the position given by *index*.
9580 """
d55e5bfc
RD
9581 return _core_.Sizer_InsertItem(*args, **kwargs)
9582
9583 def PrependItem(*args, **kwargs):
bfddbb17
RD
9584 """
9585 PrependItem(self, SizerItem item)
9586
9587 Prepends a `wx.SizerItem` to the sizer.
9588 """
d55e5bfc
RD
9589 return _core_.Sizer_PrependItem(*args, **kwargs)
9590
bfddbb17 9591 def AddMany(self, items):
d6c14a4c
RD
9592 """
9593 AddMany is a convenience method for adding several items
9594 to a sizer at one time. Simply pass it a list of tuples,
9595 where each tuple consists of the parameters that you
9596 would normally pass to the `Add` method.
9597 """
bfddbb17
RD
9598 for item in items:
9599 if type(item) != type(()) or (len(item) == 2 and type(item[0]) == type(1)):
9600 item = (item, )
9601 self.Add(*item)
d55e5bfc
RD
9602
9603 # for backwards compatibility only, please do not use in new code
d6c14a4c
RD
9604 AddWindow = wx._deprecated(Add, "AddWindow is deprecated, use `Add` instead.")
9605 AddSizer = wx._deprecated(Add, "AddSizer is deprecated, use `Add` instead.")
9606 AddSpacer = wx._deprecated(Add, "AddSpacer is deprecated, use `Add` instead.")
9607 PrependWindow = wx._deprecated(Prepend, "PrependWindow is deprecated, use `Prepend` instead.")
9608 PrependSizer = wx._deprecated(Prepend, "PrependSizer is deprecated, use `Prepend` instead.")
9609 PrependSpacer = wx._deprecated(Prepend, "PrependSpacer is deprecated, use `Prepend` instead.")
9610 InsertWindow = wx._deprecated(Insert, "InsertWindow is deprecated, use `Insert` instead.")
9611 InsertSizer = wx._deprecated(Insert, "InsertSizer is deprecated, use `Insert` instead.")
9612 InsertSpacer = wx._deprecated(Insert, "InsertSpacer is deprecated, use `Insert` instead.")
9613 RemoveWindow = wx._deprecated(Remove, "RemoveWindow is deprecated, use `Remove` instead.")
9614 RemoveSizer = wx._deprecated(Remove, "RemoveSizer is deprecated, use `Remove` instead.")
9615 RemovePos = wx._deprecated(Remove, "RemovePos is deprecated, use `Remove` instead.")
d55e5bfc
RD
9616
9617
d55e5bfc 9618 def SetDimension(*args, **kwargs):
bfddbb17
RD
9619 """
9620 SetDimension(self, int x, int y, int width, int height)
9621
9622 Call this to force the sizer to take the given dimension and thus
9623 force the items owned by the sizer to resize themselves according to
9624 the rules defined by the parameter in the `Add`, `Insert` or `Prepend`
9625 methods.
9626 """
d55e5bfc
RD
9627 return _core_.Sizer_SetDimension(*args, **kwargs)
9628
9629 def SetMinSize(*args, **kwargs):
bfddbb17
RD
9630 """
9631 SetMinSize(self, Size size)
9632
9633 Call this to give the sizer a minimal size. Normally, the sizer will
9634 calculate its minimal size based purely on how much space its children
9635 need. After calling this method `GetMinSize` will return either the
9636 minimal size as requested by its children or the minimal size set
9637 here, depending on which is bigger.
9638 """
d55e5bfc
RD
9639 return _core_.Sizer_SetMinSize(*args, **kwargs)
9640
9641 def GetSize(*args, **kwargs):
bfddbb17
RD
9642 """
9643 GetSize(self) -> Size
9644
9645 Returns the current size of the space managed by the sizer.
9646 """
d55e5bfc
RD
9647 return _core_.Sizer_GetSize(*args, **kwargs)
9648
9649 def GetPosition(*args, **kwargs):
bfddbb17
RD
9650 """
9651 GetPosition(self) -> Point
9652
9653 Returns the current position of the sizer's managed space.
9654 """
d55e5bfc
RD
9655 return _core_.Sizer_GetPosition(*args, **kwargs)
9656
9657 def GetMinSize(*args, **kwargs):
bfddbb17
RD
9658 """
9659 GetMinSize(self) -> Size
9660
9661 Returns the minimal size of the sizer. This is either the combined
9662 minimal size of all the children and their borders or the minimal size
9663 set by SetMinSize, depending on which is bigger.
9664 """
d55e5bfc
RD
9665 return _core_.Sizer_GetMinSize(*args, **kwargs)
9666
9667 def GetSizeTuple(self):
1a6bba1e 9668 return self.GetSize().Get()
d55e5bfc 9669 def GetPositionTuple(self):
1a6bba1e 9670 return self.GetPosition().Get()
d55e5bfc 9671 def GetMinSizeTuple(self):
1a6bba1e 9672 return self.GetMinSize().Get()
d55e5bfc
RD
9673
9674 def RecalcSizes(*args, **kwargs):
bfddbb17
RD
9675 """
9676 RecalcSizes(self)
9677
9678 Using the sizes calculated by `CalcMin` reposition and resize all the
9679 items managed by this sizer. You should not need to call this directly as
9680 it is called by `Layout`.
9681 """
d55e5bfc
RD
9682 return _core_.Sizer_RecalcSizes(*args, **kwargs)
9683
9684 def CalcMin(*args, **kwargs):
bfddbb17
RD
9685 """
9686 CalcMin(self) -> Size
9687
9688 This method is where the sizer will do the actual calculation of its
9689 children's minimal sizes. You should not need to call this directly as
9690 it is called by `Layout`.
9691 """
d55e5bfc
RD
9692 return _core_.Sizer_CalcMin(*args, **kwargs)
9693
9694 def Layout(*args, **kwargs):
bfddbb17
RD
9695 """
9696 Layout(self)
9697
9698 This method will force the recalculation and layout of the items
9699 controlled by the sizer using the current space allocated to the
9700 sizer. Normally this is called automatically from the owning window's
9701 EVT_SIZE handler, but it is also useful to call it from user code when
9702 one of the items in a sizer change size, or items are added or
9703 removed.
9704 """
d55e5bfc
RD
9705 return _core_.Sizer_Layout(*args, **kwargs)
9706
9707 def Fit(*args, **kwargs):
bfddbb17
RD
9708 """
9709 Fit(self, Window window) -> Size
9710
9711 Tell the sizer to resize the *window* to match the sizer's minimal
9712 size. This is commonly done in the constructor of the window itself in
9713 order to set its initial size to match the needs of the children as
9714 determined by the sizer. Returns the new size.
9715
9716 For a top level window this is the total window size, not the client size.
9717 """
d55e5bfc
RD
9718 return _core_.Sizer_Fit(*args, **kwargs)
9719
9720 def FitInside(*args, **kwargs):
bfddbb17
RD
9721 """
9722 FitInside(self, Window window)
9723
9724 Tell the sizer to resize the *virtual size* of the *window* to match the
9725 sizer's minimal size. This will not alter the on screen size of the
9726 window, but may cause the addition/removal/alteration of scrollbars
9727 required to view the virtual area in windows which manage it.
9728
9729 :see: `wx.ScrolledWindow.SetScrollbars`, `SetVirtualSizeHints`
9730
9731 """
d55e5bfc
RD
9732 return _core_.Sizer_FitInside(*args, **kwargs)
9733
9734 def SetSizeHints(*args, **kwargs):
bfddbb17
RD
9735 """
9736 SetSizeHints(self, Window window)
9737
9738 Tell the sizer to set (and `Fit`) the minimal size of the *window* to
9739 match the sizer's minimal size. This is commonly done in the
9740 constructor of the window itself if the window is resizable (as are
9741 many dialogs under Unix and frames on probably all platforms) in order
9742 to prevent the window from being sized smaller than the minimal size
9743 required by the sizer.
9744 """
d55e5bfc
RD
9745 return _core_.Sizer_SetSizeHints(*args, **kwargs)
9746
9747 def SetVirtualSizeHints(*args, **kwargs):
bfddbb17
RD
9748 """
9749 SetVirtualSizeHints(self, Window window)
9750
9751 Tell the sizer to set the minimal size of the window virtual area to
9752 match the sizer's minimal size. For windows with managed scrollbars
9753 this will set them appropriately.
9754
9755 :see: `wx.ScrolledWindow.SetScrollbars`
9756
9757 """
d55e5bfc
RD
9758 return _core_.Sizer_SetVirtualSizeHints(*args, **kwargs)
9759
9760 def Clear(*args, **kwargs):
bfddbb17
RD
9761 """
9762 Clear(self, bool deleteWindows=False)
9763
9764 Clear all items from the sizer, optionally destroying the window items
9765 as well.
9766 """
d55e5bfc
RD
9767 return _core_.Sizer_Clear(*args, **kwargs)
9768
9769 def DeleteWindows(*args, **kwargs):
bfddbb17
RD
9770 """
9771 DeleteWindows(self)
9772
9773 Destroy all windows managed by the sizer.
9774 """
d55e5bfc
RD
9775 return _core_.Sizer_DeleteWindows(*args, **kwargs)
9776
9777 def GetChildren(*args, **kwargs):
bfddbb17 9778 """
51b83b37 9779 GetChildren(self) -> list
bfddbb17
RD
9780
9781 Returns a list of all the `wx.SizerItem` objects managed by the sizer.
9782 """
d55e5bfc
RD
9783 return _core_.Sizer_GetChildren(*args, **kwargs)
9784
9785 def Show(*args, **kwargs):
bfddbb17 9786 """
b411df4a 9787 Show(self, item, bool show=True, bool recursive=false) -> bool
d55e5bfc 9788
bfddbb17
RD
9789 Shows or hides an item managed by the sizer. To make a sizer item
9790 disappear or reappear, use Show followed by `Layout`. The *item*
9791 parameter can be either a window, a sizer, or the zero-based index of
629e65c2
RD
9792 the item. Use the recursive parameter to show or hide an item in a
9793 subsizer. Returns True if the item was found.
bfddbb17
RD
9794 """
9795 return _core_.Sizer_Show(*args, **kwargs)
d55e5bfc
RD
9796
9797 def IsShown(*args, **kwargs):
bfddbb17
RD
9798 """
9799 IsShown(self, item)
9800
9801 Determines if the item is currently shown. sizer. To make a sizer
9802 item disappear or reappear, use Show followed by `Layout`. The *item*
9803 parameter can be either a window, a sizer, or the zero-based index of
9804 the item.
9805 """
d55e5bfc
RD
9806 return _core_.Sizer_IsShown(*args, **kwargs)
9807
629e65c2 9808 def Hide(self, item, recursive=False):
bfddbb17 9809 """
629e65c2 9810 A convenience method for Show(item, False, recursive).
bfddbb17 9811 """
06759a38 9812 return self.Show(item, False, recursive)
bfddbb17 9813
d55e5bfc 9814 def ShowItems(*args, **kwargs):
bfddbb17
RD
9815 """
9816 ShowItems(self, bool show)
9817
84f85550 9818 Recursively call `wx.SizerItem.Show` on all sizer items.
bfddbb17 9819 """
d55e5bfc
RD
9820 return _core_.Sizer_ShowItems(*args, **kwargs)
9821
9822
9823class SizerPtr(Sizer):
9824 def __init__(self, this):
9825 self.this = this
9826 if not hasattr(self,"thisown"): self.thisown = 0
9827 self.__class__ = Sizer
9828_core_.Sizer_swigregister(SizerPtr)
9829
9830class PySizer(Sizer):
bfddbb17
RD
9831 """
9832 wx.PySizer is a special version of `wx.Sizer` that has been
9833 instrumented to allow the C++ virtual methods to be overloaded in
9834 Python derived classes. You would derive from this class if you are
9835 wanting to implement a custom sizer in Python code. Simply implement
9836 `CalcMin` and `RecalcSizes` in the derived class and you're all set.
9837 For example::
9838
9839 class MySizer(wx.PySizer):
9840 def __init__(self):
9841 wx.PySizer.__init__(self)
9842
9843 def CalcMin(self):
9844 for item in self.GetChildren():
9845 # calculate the total minimum width and height needed
9846 # by all items in the sizer according to this sizer's
9847 # layout algorithm.
9848 ...
9849 return wx.Size(width, height)
9850
9851 def RecalcSizes(self):
9852 # find the space allotted to this sizer
9853 pos = self.GetPosition()
9854 size = self.GetSize()
9855 for item in self.GetChildren():
9856 # Recalculate (if necessary) the position and size of
9857 # each item and then call item.SetDimension to do the
9858 # actual positioning and sizing of the items within the
9859 # space alloted to this sizer.
9860 ...
9861 item.SetDimension(itemPos, itemSize)
9862
9863
9864 When `Layout` is called it first calls `CalcMin` followed by
9865 `RecalcSizes` so you can optimize a bit by saving the results of
62d32a5f 9866 `CalcMin` and reusing them in `RecalcSizes`.
bfddbb17
RD
9867
9868 :see: `wx.SizerItem`, `wx.Sizer.GetChildren`
9869
9870
9871 """
d55e5bfc
RD
9872 def __repr__(self):
9873 return "<%s.%s; proxy of C++ wxPySizer instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
9874 def __init__(self, *args, **kwargs):
bfddbb17
RD
9875 """
9876 __init__(self) -> PySizer
9877
9878 Creates a wx.PySizer. Must be called from the __init__ in the derived
9879 class.
9880 """
d55e5bfc
RD
9881 newobj = _core_.new_PySizer(*args, **kwargs)
9882 self.this = newobj.this
9883 self.thisown = 1
9884 del newobj.thisown
9885 self._setCallbackInfo(self, PySizer);self._setOORInfo(self)
9886
9887 def _setCallbackInfo(*args, **kwargs):
9888 """_setCallbackInfo(self, PyObject self, PyObject _class)"""
9889 return _core_.PySizer__setCallbackInfo(*args, **kwargs)
9890
9891
9892class PySizerPtr(PySizer):
9893 def __init__(self, this):
9894 self.this = this
9895 if not hasattr(self,"thisown"): self.thisown = 0
9896 self.__class__ = PySizer
9897_core_.PySizer_swigregister(PySizerPtr)
9898
9899#---------------------------------------------------------------------------
9900
9901class BoxSizer(Sizer):
bfddbb17
RD
9902 """
9903 The basic idea behind a box sizer is that windows will most often be
9904 laid out in rather simple basic geometry, typically in a row or a
9905 column or nested hierarchies of either. A wx.BoxSizer will lay out
9906 its items in a simple row or column, depending on the orientation
9907 parameter passed to the constructor.
9908 """
d55e5bfc
RD
9909 def __repr__(self):
9910 return "<%s.%s; proxy of C++ wxBoxSizer instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
9911 def __init__(self, *args, **kwargs):
bfddbb17
RD
9912 """
9913 __init__(self, int orient=HORIZONTAL) -> BoxSizer
9914
9915 Constructor for a wx.BoxSizer. *orient* may be one of ``wx.VERTICAL``
9916 or ``wx.HORIZONTAL`` for creating either a column sizer or a row
9917 sizer.
9918 """
d55e5bfc
RD
9919 newobj = _core_.new_BoxSizer(*args, **kwargs)
9920 self.this = newobj.this
9921 self.thisown = 1
9922 del newobj.thisown
9923 self._setOORInfo(self)
9924
9925 def GetOrientation(*args, **kwargs):
bfddbb17
RD
9926 """
9927 GetOrientation(self) -> int
9928
9929 Returns the current orientation of the sizer.
9930 """
d55e5bfc
RD
9931 return _core_.BoxSizer_GetOrientation(*args, **kwargs)
9932
9933 def SetOrientation(*args, **kwargs):
bfddbb17
RD
9934 """
9935 SetOrientation(self, int orient)
d55e5bfc 9936
bfddbb17
RD
9937 Resets the orientation of the sizer.
9938 """
9939 return _core_.BoxSizer_SetOrientation(*args, **kwargs)
d55e5bfc
RD
9940
9941
9942class BoxSizerPtr(BoxSizer):
9943 def __init__(self, this):
9944 self.this = this
9945 if not hasattr(self,"thisown"): self.thisown = 0
9946 self.__class__ = BoxSizer
9947_core_.BoxSizer_swigregister(BoxSizerPtr)
9948
9949#---------------------------------------------------------------------------
9950
9951class StaticBoxSizer(BoxSizer):
bfddbb17
RD
9952 """
9953 wx.StaticBoxSizer derives from and functions identically to the
9954 `wx.BoxSizer` and adds a `wx.StaticBox` around the items that the sizer
9955 manages. Note that this static box must be created separately and
9956 passed to the sizer constructor.
9957 """
d55e5bfc
RD
9958 def __repr__(self):
9959 return "<%s.%s; proxy of C++ wxStaticBoxSizer instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
9960 def __init__(self, *args, **kwargs):
bfddbb17
RD
9961 """
9962 __init__(self, StaticBox box, int orient=HORIZONTAL) -> StaticBoxSizer
9963
9964 Constructor. It takes an associated static box and the orientation
9965 *orient* as parameters - orient can be either of ``wx.VERTICAL`` or
9966 ``wx.HORIZONTAL``.
9967 """
d55e5bfc
RD
9968 newobj = _core_.new_StaticBoxSizer(*args, **kwargs)
9969 self.this = newobj.this
9970 self.thisown = 1
9971 del newobj.thisown
9972 self._setOORInfo(self)
9973
9974 def GetStaticBox(*args, **kwargs):
bfddbb17
RD
9975 """
9976 GetStaticBox(self) -> StaticBox
d55e5bfc 9977
bfddbb17
RD
9978 Returns the static box associated with this sizer.
9979 """
9980 return _core_.StaticBoxSizer_GetStaticBox(*args, **kwargs)
d55e5bfc
RD
9981
9982
9983class StaticBoxSizerPtr(StaticBoxSizer):
9984 def __init__(self, this):
9985 self.this = this
9986 if not hasattr(self,"thisown"): self.thisown = 0
9987 self.__class__ = StaticBoxSizer
9988_core_.StaticBoxSizer_swigregister(StaticBoxSizerPtr)
9989
9990#---------------------------------------------------------------------------
9991
9992class GridSizer(Sizer):
bfddbb17
RD
9993 """
9994 A grid sizer is a sizer which lays out its children in a
9995 two-dimensional table with all cells having the same size. In other
9996 words, the width of each cell within the grid is the width of the
9997 widest item added to the sizer and the height of each grid cell is the
9998 height of the tallest item. An optional vertical and/or horizontal
9999 gap between items can also be specified (in pixels.)
10000
10001 Items are placed in the cells of the grid in the order they are added,
10002 in row-major order. In other words, the first row is filled first,
10003 then the second, and so on until all items have been added. (If
10004 neccessary, additional rows will be added as items are added.) If you
10005 need to have greater control over the cells that items are placed in
10006 then use the `wx.GridBagSizer`.
10007
10008 """
d55e5bfc
RD
10009 def __repr__(self):
10010 return "<%s.%s; proxy of C++ wxGridSizer instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
10011 def __init__(self, *args, **kwargs):
bfddbb17
RD
10012 """
10013 __init__(self, int rows=1, int cols=0, int vgap=0, int hgap=0) -> GridSizer
10014
10015 Constructor for a wx.GridSizer. *rows* and *cols* determine the number
10016 of columns and rows in the sizer - if either of the parameters is
10017 zero, it will be calculated to from the total number of children in
10018 the sizer, thus making the sizer grow dynamically. *vgap* and *hgap*
10019 define extra space between all children.
10020 """
d55e5bfc
RD
10021 newobj = _core_.new_GridSizer(*args, **kwargs)
10022 self.this = newobj.this
10023 self.thisown = 1
10024 del newobj.thisown
10025 self._setOORInfo(self)
10026
d55e5bfc 10027 def SetCols(*args, **kwargs):
bfddbb17
RD
10028 """
10029 SetCols(self, int cols)
10030
10031 Sets the number of columns in the sizer.
10032 """
d55e5bfc
RD
10033 return _core_.GridSizer_SetCols(*args, **kwargs)
10034
10035 def SetRows(*args, **kwargs):
bfddbb17
RD
10036 """
10037 SetRows(self, int rows)
10038
10039 Sets the number of rows in the sizer.
10040 """
d55e5bfc
RD
10041 return _core_.GridSizer_SetRows(*args, **kwargs)
10042
10043 def SetVGap(*args, **kwargs):
bfddbb17
RD
10044 """
10045 SetVGap(self, int gap)
10046
10047 Sets the vertical gap (in pixels) between the cells in the sizer.
10048 """
d55e5bfc
RD
10049 return _core_.GridSizer_SetVGap(*args, **kwargs)
10050
10051 def SetHGap(*args, **kwargs):
bfddbb17
RD
10052 """
10053 SetHGap(self, int gap)
10054
10055 Sets the horizontal gap (in pixels) between cells in the sizer
10056 """
d55e5bfc
RD
10057 return _core_.GridSizer_SetHGap(*args, **kwargs)
10058
10059 def GetCols(*args, **kwargs):
bfddbb17
RD
10060 """
10061 GetCols(self) -> int
10062
10063 Returns the number of columns in the sizer.
10064 """
d55e5bfc
RD
10065 return _core_.GridSizer_GetCols(*args, **kwargs)
10066
10067 def GetRows(*args, **kwargs):
bfddbb17
RD
10068 """
10069 GetRows(self) -> int
10070
10071 Returns the number of rows in the sizer.
10072 """
d55e5bfc
RD
10073 return _core_.GridSizer_GetRows(*args, **kwargs)
10074
10075 def GetVGap(*args, **kwargs):
bfddbb17
RD
10076 """
10077 GetVGap(self) -> int
10078
10079 Returns the vertical gap (in pixels) between the cells in the sizer.
10080 """
d55e5bfc
RD
10081 return _core_.GridSizer_GetVGap(*args, **kwargs)
10082
10083 def GetHGap(*args, **kwargs):
bfddbb17
RD
10084 """
10085 GetHGap(self) -> int
10086
10087 Returns the horizontal gap (in pixels) between cells in the sizer.
10088 """
d55e5bfc
RD
10089 return _core_.GridSizer_GetHGap(*args, **kwargs)
10090
10091
10092class GridSizerPtr(GridSizer):
10093 def __init__(self, this):
10094 self.this = this
10095 if not hasattr(self,"thisown"): self.thisown = 0
10096 self.__class__ = GridSizer
10097_core_.GridSizer_swigregister(GridSizerPtr)
10098
10099#---------------------------------------------------------------------------
10100
10101FLEX_GROWMODE_NONE = _core_.FLEX_GROWMODE_NONE
10102FLEX_GROWMODE_SPECIFIED = _core_.FLEX_GROWMODE_SPECIFIED
10103FLEX_GROWMODE_ALL = _core_.FLEX_GROWMODE_ALL
10104class FlexGridSizer(GridSizer):
bfddbb17
RD
10105 """
10106 A flex grid sizer is a sizer which lays out its children in a
10107 two-dimensional table with all table cells in one row having the same
10108 height and all cells in one column having the same width, but all
10109 rows or all columns are not necessarily the same height or width as in
10110 the `wx.GridSizer`.
10111
10112 wx.FlexGridSizer can also size items equally in one direction but
10113 unequally ("flexibly") in the other. If the sizer is only flexible
10114 in one direction (this can be changed using `SetFlexibleDirection`), it
10115 needs to be decided how the sizer should grow in the other ("non
10116 flexible") direction in order to fill the available space. The
10117 `SetNonFlexibleGrowMode` method serves this purpose.
10118
10119
10120 """
d55e5bfc
RD
10121 def __repr__(self):
10122 return "<%s.%s; proxy of C++ wxFlexGridSizer instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
10123 def __init__(self, *args, **kwargs):
bfddbb17
RD
10124 """
10125 __init__(self, int rows=1, int cols=0, int vgap=0, int hgap=0) -> FlexGridSizer
10126
10127 Constructor for a wx.FlexGridSizer. *rows* and *cols* determine the
10128 number of columns and rows in the sizer - if either of the parameters
10129 is zero, it will be calculated to from the total number of children in
10130 the sizer, thus making the sizer grow dynamically. *vgap* and *hgap*
10131 define extra space between all children.
10132 """
d55e5bfc
RD
10133 newobj = _core_.new_FlexGridSizer(*args, **kwargs)
10134 self.this = newobj.this
10135 self.thisown = 1
10136 del newobj.thisown
10137 self._setOORInfo(self)
10138
bfddbb17
RD
10139 def AddGrowableRow(*args, **kwargs):
10140 """
10141 AddGrowableRow(self, size_t idx, int proportion=0)
d55e5bfc 10142
bfddbb17
RD
10143 Specifies that row *idx* (starting from zero) should be grown if there
10144 is extra space available to the sizer.
d55e5bfc 10145
bfddbb17
RD
10146 The *proportion* parameter has the same meaning as the stretch factor
10147 for the box sizers except that if all proportions are 0, then all
10148 columns are resized equally (instead of not being resized at all).
10149 """
d55e5bfc
RD
10150 return _core_.FlexGridSizer_AddGrowableRow(*args, **kwargs)
10151
10152 def RemoveGrowableRow(*args, **kwargs):
bfddbb17
RD
10153 """
10154 RemoveGrowableRow(self, size_t idx)
10155
10156 Specifies that row *idx* is no longer growable.
10157 """
d55e5bfc
RD
10158 return _core_.FlexGridSizer_RemoveGrowableRow(*args, **kwargs)
10159
10160 def AddGrowableCol(*args, **kwargs):
bfddbb17
RD
10161 """
10162 AddGrowableCol(self, size_t idx, int proportion=0)
10163
10164 Specifies that column *idx* (starting from zero) should be grown if
10165 there is extra space available to the sizer.
10166
10167 The *proportion* parameter has the same meaning as the stretch factor
10168 for the box sizers except that if all proportions are 0, then all
10169 columns are resized equally (instead of not being resized at all).
10170 """
d55e5bfc
RD
10171 return _core_.FlexGridSizer_AddGrowableCol(*args, **kwargs)
10172
10173 def RemoveGrowableCol(*args, **kwargs):
bfddbb17
RD
10174 """
10175 RemoveGrowableCol(self, size_t idx)
10176
10177 Specifies that column *idx* is no longer growable.
10178 """
d55e5bfc
RD
10179 return _core_.FlexGridSizer_RemoveGrowableCol(*args, **kwargs)
10180
10181 def SetFlexibleDirection(*args, **kwargs):
bfddbb17
RD
10182 """
10183 SetFlexibleDirection(self, int direction)
10184
10185 Specifies whether the sizer should flexibly resize its columns, rows,
10186 or both. Argument *direction* can be one of the following values. Any
10187 other value is ignored.
10188
10189 ============== =======================================
10190 wx.VERTICAL Rows are flexibly sized.
10191 wx.HORIZONTAL Columns are flexibly sized.
10192 wx.BOTH Both rows and columns are flexibly sized
10193 (this is the default value).
10194 ============== =======================================
10195
10196 Note that this method does not trigger relayout.
10197
10198 """
d55e5bfc
RD
10199 return _core_.FlexGridSizer_SetFlexibleDirection(*args, **kwargs)
10200
10201 def GetFlexibleDirection(*args, **kwargs):
bfddbb17
RD
10202 """
10203 GetFlexibleDirection(self) -> int
10204
10205 Returns a value that specifies whether the sizer
10206 flexibly resizes its columns, rows, or both (default).
10207
10208 :see: `SetFlexibleDirection`
10209 """
d55e5bfc
RD
10210 return _core_.FlexGridSizer_GetFlexibleDirection(*args, **kwargs)
10211
10212 def SetNonFlexibleGrowMode(*args, **kwargs):
bfddbb17
RD
10213 """
10214 SetNonFlexibleGrowMode(self, int mode)
10215
10216 Specifies how the sizer should grow in the non-flexible direction if
10217 there is one (so `SetFlexibleDirection` must have been called
10218 previously). Argument *mode* can be one of the following values:
10219
10220 ========================== =================================================
10221 wx.FLEX_GROWMODE_NONE Sizer doesn't grow in the non flexible direction.
10222 wx.FLEX_GROWMODE_SPECIFIED Sizer honors growable columns/rows set with
10223 `AddGrowableCol` and `AddGrowableRow`. In this
10224 case equal sizing applies to minimum sizes of
10225 columns or rows (this is the default value).
10226 wx.FLEX_GROWMODE_ALL Sizer equally stretches all columns or rows in
10227 the non flexible direction, whether they are
10228 growable or not in the flexbile direction.
10229 ========================== =================================================
10230
10231 Note that this method does not trigger relayout.
10232
10233
10234 """
d55e5bfc
RD
10235 return _core_.FlexGridSizer_SetNonFlexibleGrowMode(*args, **kwargs)
10236
10237 def GetNonFlexibleGrowMode(*args, **kwargs):
bfddbb17
RD
10238 """
10239 GetNonFlexibleGrowMode(self) -> int
10240
10241 Returns the value that specifies how the sizer grows in the
10242 non-flexible direction if there is one.
10243
10244 :see: `SetNonFlexibleGrowMode`
10245 """
d55e5bfc
RD
10246 return _core_.FlexGridSizer_GetNonFlexibleGrowMode(*args, **kwargs)
10247
10248 def GetRowHeights(*args, **kwargs):
fd2dc343
RD
10249 """
10250 GetRowHeights(self) -> list
10251
10252 Returns a list of integers representing the heights of each of the
10253 rows in the sizer.
10254 """
d55e5bfc
RD
10255 return _core_.FlexGridSizer_GetRowHeights(*args, **kwargs)
10256
10257 def GetColWidths(*args, **kwargs):
fd2dc343
RD
10258 """
10259 GetColWidths(self) -> list
10260
10261 Returns a list of integers representing the widths of each of the
10262 columns in the sizer.
10263 """
d55e5bfc
RD
10264 return _core_.FlexGridSizer_GetColWidths(*args, **kwargs)
10265
10266
10267class FlexGridSizerPtr(FlexGridSizer):
10268 def __init__(self, this):
10269 self.this = this
10270 if not hasattr(self,"thisown"): self.thisown = 0
10271 self.__class__ = FlexGridSizer
10272_core_.FlexGridSizer_swigregister(FlexGridSizerPtr)
10273
62d32a5f
RD
10274class StdDialogButtonSizer(BoxSizer):
10275 """
10276 A special sizer that knows how to order and position standard buttons
10277 in order to conform to the current platform's standards. You simply
10278 need to add each `wx.Button` to the sizer, and be sure to create the
53aa7709 10279 buttons using the standard ID's. Then call `Realize` and the sizer
62d32a5f
RD
10280 will take care of the rest.
10281
10282 """
10283 def __repr__(self):
10284 return "<%s.%s; proxy of C++ wxStdDialogButtonSizer instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
10285 def __init__(self, *args, **kwargs):
10286 """__init__(self) -> StdDialogButtonSizer"""
10287 newobj = _core_.new_StdDialogButtonSizer(*args, **kwargs)
10288 self.this = newobj.this
10289 self.thisown = 1
10290 del newobj.thisown
10291 def AddButton(*args, **kwargs):
10292 """
10293 AddButton(self, wxButton button)
10294
10295 Use this to add the buttons to this sizer. Do not use the `Add`
10296 method in the base class.
10297 """
10298 return _core_.StdDialogButtonSizer_AddButton(*args, **kwargs)
10299
53aa7709 10300 def Realize(*args, **kwargs):
62d32a5f 10301 """
53aa7709 10302 Realize(self)
62d32a5f
RD
10303
10304 This funciton needs to be called after all the buttons have been added
10305 to the sizer. It will reorder them and position them in a platform
10306 specifc manner.
10307 """
53aa7709 10308 return _core_.StdDialogButtonSizer_Realize(*args, **kwargs)
51b83b37
RD
10309
10310 def SetAffirmativeButton(*args, **kwargs):
10311 """SetAffirmativeButton(self, wxButton button)"""
10312 return _core_.StdDialogButtonSizer_SetAffirmativeButton(*args, **kwargs)
10313
10314 def SetNegativeButton(*args, **kwargs):
10315 """SetNegativeButton(self, wxButton button)"""
10316 return _core_.StdDialogButtonSizer_SetNegativeButton(*args, **kwargs)
10317
10318 def SetCancelButton(*args, **kwargs):
10319 """SetCancelButton(self, wxButton button)"""
10320 return _core_.StdDialogButtonSizer_SetCancelButton(*args, **kwargs)
62d32a5f
RD
10321
10322 def GetAffirmativeButton(*args, **kwargs):
10323 """GetAffirmativeButton(self) -> wxButton"""
10324 return _core_.StdDialogButtonSizer_GetAffirmativeButton(*args, **kwargs)
10325
10326 def GetApplyButton(*args, **kwargs):
10327 """GetApplyButton(self) -> wxButton"""
10328 return _core_.StdDialogButtonSizer_GetApplyButton(*args, **kwargs)
10329
10330 def GetNegativeButton(*args, **kwargs):
10331 """GetNegativeButton(self) -> wxButton"""
10332 return _core_.StdDialogButtonSizer_GetNegativeButton(*args, **kwargs)
10333
10334 def GetCancelButton(*args, **kwargs):
10335 """GetCancelButton(self) -> wxButton"""
10336 return _core_.StdDialogButtonSizer_GetCancelButton(*args, **kwargs)
10337
10338 def GetHelpButton(*args, **kwargs):
10339 """GetHelpButton(self) -> wxButton"""
10340 return _core_.StdDialogButtonSizer_GetHelpButton(*args, **kwargs)
10341
10342
10343class StdDialogButtonSizerPtr(StdDialogButtonSizer):
10344 def __init__(self, this):
10345 self.this = this
10346 if not hasattr(self,"thisown"): self.thisown = 0
10347 self.__class__ = StdDialogButtonSizer
10348_core_.StdDialogButtonSizer_swigregister(StdDialogButtonSizerPtr)
10349
d55e5bfc
RD
10350#---------------------------------------------------------------------------
10351
10352class GBPosition(object):
bfddbb17
RD
10353 """
10354 This class represents the position of an item in a virtual grid of
10355 rows and columns managed by a `wx.GridBagSizer`. wxPython has
10356 typemaps that will automatically convert from a 2-element sequence of
10357 integers to a wx.GBPosition, so you can use the more pythonic
10358 representation of the position nearly transparently in Python code.
10359 """
d55e5bfc
RD
10360 def __repr__(self):
10361 return "<%s.%s; proxy of C++ wxGBPosition instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
10362 def __init__(self, *args, **kwargs):
bfddbb17
RD
10363 """
10364 __init__(self, int row=0, int col=0) -> GBPosition
10365
10366 This class represents the position of an item in a virtual grid of
10367 rows and columns managed by a `wx.GridBagSizer`. wxPython has
10368 typemaps that will automatically convert from a 2-element sequence of
10369 integers to a wx.GBPosition, so you can use the more pythonic
10370 representation of the position nearly transparently in Python code.
10371 """
d55e5bfc
RD
10372 newobj = _core_.new_GBPosition(*args, **kwargs)
10373 self.this = newobj.this
10374 self.thisown = 1
10375 del newobj.thisown
10376 def GetRow(*args, **kwargs):
10377 """GetRow(self) -> int"""
10378 return _core_.GBPosition_GetRow(*args, **kwargs)
10379
10380 def GetCol(*args, **kwargs):
10381 """GetCol(self) -> int"""
10382 return _core_.GBPosition_GetCol(*args, **kwargs)
10383
10384 def SetRow(*args, **kwargs):
10385 """SetRow(self, int row)"""
10386 return _core_.GBPosition_SetRow(*args, **kwargs)
10387
10388 def SetCol(*args, **kwargs):
10389 """SetCol(self, int col)"""
10390 return _core_.GBPosition_SetCol(*args, **kwargs)
10391
10392 def __eq__(*args, **kwargs):
10393 """__eq__(self, GBPosition other) -> bool"""
10394 return _core_.GBPosition___eq__(*args, **kwargs)
10395
10396 def __ne__(*args, **kwargs):
10397 """__ne__(self, GBPosition other) -> bool"""
10398 return _core_.GBPosition___ne__(*args, **kwargs)
10399
10400 def Set(*args, **kwargs):
10401 """Set(self, int row=0, int col=0)"""
10402 return _core_.GBPosition_Set(*args, **kwargs)
10403
10404 def Get(*args, **kwargs):
10405 """Get(self) -> PyObject"""
10406 return _core_.GBPosition_Get(*args, **kwargs)
10407
15817c7e 10408 asTuple = wx._deprecated(Get, "asTuple is deprecated, use `Get` instead")
d55e5bfc
RD
10409 def __str__(self): return str(self.Get())
10410 def __repr__(self): return 'wx.GBPosition'+str(self.Get())
10411 def __len__(self): return len(self.Get())
10412 def __getitem__(self, index): return self.Get()[index]
10413 def __setitem__(self, index, val):
10414 if index == 0: self.SetRow(val)
10415 elif index == 1: self.SetCol(val)
10416 else: raise IndexError
10417 def __nonzero__(self): return self.Get() != (0,0)
10418 __safe_for_unpickling__ = True
10419 def __reduce__(self): return (wx.GBPosition, self.Get())
10420
10421 row = property(GetRow, SetRow)
10422 col = property(GetCol, SetCol)
10423
10424
10425class GBPositionPtr(GBPosition):
10426 def __init__(self, this):
10427 self.this = this
10428 if not hasattr(self,"thisown"): self.thisown = 0
10429 self.__class__ = GBPosition
10430_core_.GBPosition_swigregister(GBPositionPtr)
10431
10432class GBSpan(object):
bfddbb17
RD
10433 """
10434 This class is used to hold the row and column spanning attributes of
10435 items in a `wx.GridBagSizer`. wxPython has typemaps that will
10436 automatically convert from a 2-element sequence of integers to a
10437 wx.GBSpan, so you can use the more pythonic representation of the span
10438 nearly transparently in Python code.
10439
10440 """
d55e5bfc
RD
10441 def __repr__(self):
10442 return "<%s.%s; proxy of C++ wxGBSpan instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
10443 def __init__(self, *args, **kwargs):
bfddbb17
RD
10444 """
10445 __init__(self, int rowspan=1, int colspan=1) -> GBSpan
10446
10447 Construct a new wxGBSpan, optionally setting the rowspan and
10448 colspan. The default is (1,1). (Meaning that the item occupies one
10449 cell in each direction.
10450 """
d55e5bfc
RD
10451 newobj = _core_.new_GBSpan(*args, **kwargs)
10452 self.this = newobj.this
10453 self.thisown = 1
10454 del newobj.thisown
10455 def GetRowspan(*args, **kwargs):
10456 """GetRowspan(self) -> int"""
10457 return _core_.GBSpan_GetRowspan(*args, **kwargs)
10458
10459 def GetColspan(*args, **kwargs):
10460 """GetColspan(self) -> int"""
10461 return _core_.GBSpan_GetColspan(*args, **kwargs)
10462
10463 def SetRowspan(*args, **kwargs):
10464 """SetRowspan(self, int rowspan)"""
10465 return _core_.GBSpan_SetRowspan(*args, **kwargs)
10466
10467 def SetColspan(*args, **kwargs):
10468 """SetColspan(self, int colspan)"""
10469 return _core_.GBSpan_SetColspan(*args, **kwargs)
10470
10471 def __eq__(*args, **kwargs):
10472 """__eq__(self, GBSpan other) -> bool"""
10473 return _core_.GBSpan___eq__(*args, **kwargs)
10474
10475 def __ne__(*args, **kwargs):
10476 """__ne__(self, GBSpan other) -> bool"""
10477 return _core_.GBSpan___ne__(*args, **kwargs)
10478
10479 def Set(*args, **kwargs):
10480 """Set(self, int rowspan=1, int colspan=1)"""
10481 return _core_.GBSpan_Set(*args, **kwargs)
10482
10483 def Get(*args, **kwargs):
10484 """Get(self) -> PyObject"""
10485 return _core_.GBSpan_Get(*args, **kwargs)
10486
15817c7e 10487 asTuple = wx._deprecated(Get, "asTuple is deprecated, use `Get` instead")
d55e5bfc
RD
10488 def __str__(self): return str(self.Get())
10489 def __repr__(self): return 'wx.GBSpan'+str(self.Get())
10490 def __len__(self): return len(self.Get())
10491 def __getitem__(self, index): return self.Get()[index]
10492 def __setitem__(self, index, val):
10493 if index == 0: self.SetRowspan(val)
10494 elif index == 1: self.SetColspan(val)
10495 else: raise IndexError
10496 def __nonzero__(self): return self.Get() != (0,0)
10497 __safe_for_unpickling__ = True
10498 def __reduce__(self): return (wx.GBSpan, self.Get())
10499
10500 rowspan = property(GetRowspan, SetRowspan)
10501 colspan = property(GetColspan, SetColspan)
10502
10503
10504class GBSpanPtr(GBSpan):
10505 def __init__(self, this):
10506 self.this = this
10507 if not hasattr(self,"thisown"): self.thisown = 0
10508 self.__class__ = GBSpan
10509_core_.GBSpan_swigregister(GBSpanPtr)
10510
10511class GBSizerItem(SizerItem):
bfddbb17
RD
10512 """
10513 The wx.GBSizerItem class is used to track the additional data about
10514 items in a `wx.GridBagSizer` such as the item's position in the grid
10515 and how many rows or columns it spans.
10516
10517 """
d55e5bfc
RD
10518 def __repr__(self):
10519 return "<%s.%s; proxy of C++ wxGBSizerItem instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
10520 def __init__(self, *args, **kwargs):
bfddbb17
RD
10521 """
10522 __init__(self) -> GBSizerItem
10523
10524 Constructs an empty wx.GBSizerItem. Either a window, sizer or spacer
10525 size will need to be set, as well as a position and span before this
10526 item can be used in a Sizer.
10527
10528 You will probably never need to create a wx.GBSizerItem directly as they
10529 are created automatically when the sizer's Add method is called.
10530 """
d55e5bfc
RD
10531 newobj = _core_.new_GBSizerItem(*args, **kwargs)
10532 self.this = newobj.this
10533 self.thisown = 1
10534 del newobj.thisown
10535 def GetPos(*args, **kwargs):
bfddbb17
RD
10536 """
10537 GetPos(self) -> GBPosition
10538
10539 Get the grid position of the item
10540 """
d55e5bfc
RD
10541 return _core_.GBSizerItem_GetPos(*args, **kwargs)
10542
10543 def GetPosTuple(self): return self.GetPos().Get()
10544 def GetSpan(*args, **kwargs):
bfddbb17
RD
10545 """
10546 GetSpan(self) -> GBSpan
10547
10548 Get the row and column spanning of the item
10549 """
d55e5bfc
RD
10550 return _core_.GBSizerItem_GetSpan(*args, **kwargs)
10551
10552 def GetSpanTuple(self): return self.GetSpan().Get()
10553 def SetPos(*args, **kwargs):
bfddbb17
RD
10554 """
10555 SetPos(self, GBPosition pos) -> bool
10556
10557 If the item is already a member of a sizer then first ensure that
10558 there is no other item that would intersect with this one at the new
10559 position, then set the new position. Returns True if the change is
10560 successful and after the next Layout() the item will be moved.
10561 """
d55e5bfc
RD
10562 return _core_.GBSizerItem_SetPos(*args, **kwargs)
10563
10564 def SetSpan(*args, **kwargs):
bfddbb17
RD
10565 """
10566 SetSpan(self, GBSpan span) -> bool
10567
10568 If the item is already a member of a sizer then first ensure that
10569 there is no other item that would intersect with this one with its new
10570 spanning size, then set the new spanning. Returns True if the change
10571 is successful and after the next Layout() the item will be resized.
10572
10573 """
d55e5bfc
RD
10574 return _core_.GBSizerItem_SetSpan(*args, **kwargs)
10575
bfddbb17 10576 def Intersects(*args, **kwargs):
d55e5bfc
RD
10577 """
10578 Intersects(self, GBSizerItem other) -> bool
bfddbb17
RD
10579
10580 Returns True if this item and the other item instersect.
d55e5bfc 10581 """
bfddbb17
RD
10582 return _core_.GBSizerItem_Intersects(*args, **kwargs)
10583
10584 def IntersectsPos(*args, **kwargs):
10585 """
10586 IntersectsPos(self, GBPosition pos, GBSpan span) -> bool
10587
10588 Returns True if the given pos/span would intersect with this item.
10589 """
10590 return _core_.GBSizerItem_IntersectsPos(*args, **kwargs)
d55e5bfc
RD
10591
10592 def GetEndPos(*args, **kwargs):
bfddbb17
RD
10593 """
10594 GetEndPos(self) -> GBPosition
10595
10596 Get the row and column of the endpoint of this item.
10597 """
d55e5bfc
RD
10598 return _core_.GBSizerItem_GetEndPos(*args, **kwargs)
10599
10600 def GetGBSizer(*args, **kwargs):
bfddbb17
RD
10601 """
10602 GetGBSizer(self) -> GridBagSizer
10603
10604 Get the sizer this item is a member of.
10605 """
d55e5bfc
RD
10606 return _core_.GBSizerItem_GetGBSizer(*args, **kwargs)
10607
10608 def SetGBSizer(*args, **kwargs):
bfddbb17
RD
10609 """
10610 SetGBSizer(self, GridBagSizer sizer)
10611
10612 Set the sizer this item is a member of.
10613 """
d55e5bfc
RD
10614 return _core_.GBSizerItem_SetGBSizer(*args, **kwargs)
10615
10616
10617class GBSizerItemPtr(GBSizerItem):
10618 def __init__(self, this):
10619 self.this = this
10620 if not hasattr(self,"thisown"): self.thisown = 0
10621 self.__class__ = GBSizerItem
10622_core_.GBSizerItem_swigregister(GBSizerItemPtr)
10623DefaultSpan = cvar.DefaultSpan
10624
10625def GBSizerItemWindow(*args, **kwargs):
10626 """
10627 GBSizerItemWindow(Window window, GBPosition pos, GBSpan span, int flag,
bfddbb17
RD
10628 int border, PyObject userData=None) -> GBSizerItem
10629
10630 Construct a `wx.GBSizerItem` for a window.
d55e5bfc
RD
10631 """
10632 val = _core_.new_GBSizerItemWindow(*args, **kwargs)
10633 val.thisown = 1
10634 return val
10635
10636def GBSizerItemSizer(*args, **kwargs):
10637 """
10638 GBSizerItemSizer(Sizer sizer, GBPosition pos, GBSpan span, int flag,
bfddbb17
RD
10639 int border, PyObject userData=None) -> GBSizerItem
10640
10641 Construct a `wx.GBSizerItem` for a sizer
d55e5bfc
RD
10642 """
10643 val = _core_.new_GBSizerItemSizer(*args, **kwargs)
10644 val.thisown = 1
10645 return val
10646
10647def GBSizerItemSpacer(*args, **kwargs):
10648 """
10649 GBSizerItemSpacer(int width, int height, GBPosition pos, GBSpan span,
bfddbb17
RD
10650 int flag, int border, PyObject userData=None) -> GBSizerItem
10651
10652 Construct a `wx.GBSizerItem` for a spacer.
d55e5bfc
RD
10653 """
10654 val = _core_.new_GBSizerItemSpacer(*args, **kwargs)
10655 val.thisown = 1
10656 return val
10657
10658class GridBagSizer(FlexGridSizer):
bfddbb17
RD
10659 """
10660 A `wx.Sizer` that can lay out items in a virtual grid like a
10661 `wx.FlexGridSizer` but in this case explicit positioning of the items
10662 is allowed using `wx.GBPosition`, and items can optionally span more
10663 than one row and/or column using `wx.GBSpan`. The total size of the
10664 virtual grid is determined by the largest row and column that items are
10665 positioned at, adjusted for spanning.
10666
10667 """
d55e5bfc
RD
10668 def __repr__(self):
10669 return "<%s.%s; proxy of C++ wxGridBagSizer instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
10670 def __init__(self, *args, **kwargs):
bfddbb17
RD
10671 """
10672 __init__(self, int vgap=0, int hgap=0) -> GridBagSizer
10673
10674 Constructor, with optional parameters to specify the gap between the
10675 rows and columns.
10676 """
d55e5bfc
RD
10677 newobj = _core_.new_GridBagSizer(*args, **kwargs)
10678 self.this = newobj.this
10679 self.thisown = 1
10680 del newobj.thisown
03e46024
RD
10681 self._setOORInfo(self)
10682
d55e5bfc
RD
10683 def Add(*args, **kwargs):
10684 """
bfddbb17 10685 Add(self, item, GBPosition pos, GBSpan span=DefaultSpan, int flag=0,
070c48b4 10686 int border=0, userData=None) -> wx.GBSizerItem
bfddbb17
RD
10687
10688 Adds an item to the sizer at the grid cell *pos*, optionally spanning
10689 more than one row or column as specified with *span*. The remaining
10690 args behave similarly to `wx.Sizer.Add`.
10691
10692 Returns True if the item was successfully placed at the given cell
10693 position, False if something was already there.
10694
d55e5bfc
RD
10695 """
10696 return _core_.GridBagSizer_Add(*args, **kwargs)
10697
10698 def AddItem(*args, **kwargs):
bfddbb17 10699 """
070c48b4 10700 Add(self, GBSizerItem item) -> wx.GBSizerItem
bfddbb17
RD
10701
10702 Add an item to the sizer using a `wx.GBSizerItem`. Returns True if
10703 the item was successfully placed at its given cell position, False if
10704 something was already there.
10705 """
d55e5bfc
RD
10706 return _core_.GridBagSizer_AddItem(*args, **kwargs)
10707
84f85550
RD
10708 def GetCellSize(*args, **kwargs):
10709 """
10710 GetCellSize(self, int row, int col) -> Size
10711
10712 Get the size of the specified cell, including hgap and
10713 vgap. Only valid after a Layout.
10714 """
10715 return _core_.GridBagSizer_GetCellSize(*args, **kwargs)
10716
d55e5bfc 10717 def GetEmptyCellSize(*args, **kwargs):
bfddbb17
RD
10718 """
10719 GetEmptyCellSize(self) -> Size
10720
10721 Get the size used for cells in the grid with no item.
10722 """
d55e5bfc
RD
10723 return _core_.GridBagSizer_GetEmptyCellSize(*args, **kwargs)
10724
10725 def SetEmptyCellSize(*args, **kwargs):
bfddbb17
RD
10726 """
10727 SetEmptyCellSize(self, Size sz)
10728
10729 Set the size used for cells in the grid with no item.
10730 """
d55e5bfc
RD
10731 return _core_.GridBagSizer_SetEmptyCellSize(*args, **kwargs)
10732
10733 def GetItemPosition(*args):
10734 """
bfddbb17
RD
10735 GetItemPosition(self, item) -> GBPosition
10736
10737 Get the grid position of the specified *item* where *item* is either a
10738 window or subsizer that is a member of this sizer, or a zero-based
10739 index of an item.
d55e5bfc
RD
10740 """
10741 return _core_.GridBagSizer_GetItemPosition(*args)
10742
10743 def SetItemPosition(*args):
10744 """
bfddbb17
RD
10745 SetItemPosition(self, item, GBPosition pos) -> bool
10746
10747 Set the grid position of the specified *item* where *item* is either a
10748 window or subsizer that is a member of this sizer, or a zero-based
10749 index of an item. Returns True on success. If the move is not
10750 allowed (because an item is already there) then False is returned.
10751
d55e5bfc
RD
10752 """
10753 return _core_.GridBagSizer_SetItemPosition(*args)
10754
10755 def GetItemSpan(*args):
10756 """
bfddbb17
RD
10757 GetItemSpan(self, item) -> GBSpan
10758
10759 Get the row/col spanning of the specified *item* where *item* is
10760 either a window or subsizer that is a member of this sizer, or a
10761 zero-based index of an item.
d55e5bfc
RD
10762 """
10763 return _core_.GridBagSizer_GetItemSpan(*args)
10764
10765 def SetItemSpan(*args):
10766 """
bfddbb17
RD
10767 SetItemSpan(self, item, GBSpan span) -> bool
10768
10769 Set the row/col spanning of the specified *item* where *item* is
10770 either a window or subsizer that is a member of this sizer, or a
10771 zero-based index of an item. Returns True on success. If the move is
10772 not allowed (because an item is already there) then False is returned.
d55e5bfc
RD
10773 """
10774 return _core_.GridBagSizer_SetItemSpan(*args)
10775
10776 def FindItem(*args):
10777 """
bfddbb17
RD
10778 FindItem(self, item) -> GBSizerItem
10779
10780 Find the sizer item for the given window or subsizer, returns None if
10781 not found. (non-recursive)
d55e5bfc
RD
10782 """
10783 return _core_.GridBagSizer_FindItem(*args)
10784
10785 def FindItemAtPosition(*args, **kwargs):
bfddbb17
RD
10786 """
10787 FindItemAtPosition(self, GBPosition pos) -> GBSizerItem
10788
10789 Return the sizer item for the given grid cell, or None if there is no
10790 item at that position. (non-recursive)
10791 """
d55e5bfc
RD
10792 return _core_.GridBagSizer_FindItemAtPosition(*args, **kwargs)
10793
10794 def FindItemAtPoint(*args, **kwargs):
bfddbb17
RD
10795 """
10796 FindItemAtPoint(self, Point pt) -> GBSizerItem
10797
10798 Return the sizer item located at the point given in *pt*, or None if
10799 there is no item at that point. The (x,y) coordinates in pt correspond
10800 to the client coordinates of the window using the sizer for
10801 layout. (non-recursive)
10802 """
d55e5bfc
RD
10803 return _core_.GridBagSizer_FindItemAtPoint(*args, **kwargs)
10804
bfddbb17
RD
10805 def CheckForIntersection(*args, **kwargs):
10806 """
10807 CheckForIntersection(self, GBSizerItem item, GBSizerItem excludeItem=None) -> bool
d55e5bfc 10808
bfddbb17
RD
10809 Look at all items and see if any intersect (or would overlap) the
10810 given *item*. Returns True if so, False if there would be no overlap.
10811 If an *excludeItem* is given then it will not be checked for
10812 intersection, for example it may be the item we are checking the
10813 position of.
d55e5bfc 10814
bfddbb17
RD
10815 """
10816 return _core_.GridBagSizer_CheckForIntersection(*args, **kwargs)
d55e5bfc 10817
bfddbb17 10818 def CheckForIntersectionPos(*args, **kwargs):
d55e5bfc 10819 """
bfddbb17
RD
10820 CheckForIntersectionPos(self, GBPosition pos, GBSpan span, GBSizerItem excludeItem=None) -> bool
10821
10822 Look at all items and see if any intersect (or would overlap) the
10823 given position and span. Returns True if so, False if there would be
10824 no overlap. If an *excludeItem* is given then it will not be checked
10825 for intersection, for example it may be the item we are checking the
10826 position of.
d55e5bfc 10827 """
bfddbb17 10828 return _core_.GridBagSizer_CheckForIntersectionPos(*args, **kwargs)
d55e5bfc
RD
10829
10830
10831class GridBagSizerPtr(GridBagSizer):
10832 def __init__(self, this):
10833 self.this = this
10834 if not hasattr(self,"thisown"): self.thisown = 0
10835 self.__class__ = GridBagSizer
10836_core_.GridBagSizer_swigregister(GridBagSizerPtr)
10837
10838#---------------------------------------------------------------------------
10839
10840Left = _core_.Left
10841Top = _core_.Top
10842Right = _core_.Right
10843Bottom = _core_.Bottom
10844Width = _core_.Width
10845Height = _core_.Height
10846Centre = _core_.Centre
10847Center = _core_.Center
10848CentreX = _core_.CentreX
10849CentreY = _core_.CentreY
10850Unconstrained = _core_.Unconstrained
10851AsIs = _core_.AsIs
10852PercentOf = _core_.PercentOf
10853Above = _core_.Above
10854Below = _core_.Below
10855LeftOf = _core_.LeftOf
10856RightOf = _core_.RightOf
10857SameAs = _core_.SameAs
10858Absolute = _core_.Absolute
10859class IndividualLayoutConstraint(Object):
10860 """
15817c7e
RD
10861 Objects of this class are stored in the `wx.LayoutConstraints` class as
10862 one of eight possible constraints that a window can be involved in.
10863 You will never need to create an instance of
10864 wx.IndividualLayoutConstraint, rather you should create a
10865 `wx.LayoutConstraints` instance and use the individual contstraints
d55e5bfc 10866 that it contains.
d55e5bfc
RD
10867 """
10868 def __init__(self): raise RuntimeError, "No constructor defined"
10869 def __repr__(self):
10870 return "<%s.%s; proxy of C++ wxIndividualLayoutConstraint instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
10871 def Set(*args, **kwargs):
15817c7e
RD
10872 """
10873 Set(self, int rel, Window otherW, int otherE, int val=0, int marg=wxLAYOUT_DEFAULT_MARGIN)
10874
10875 Sets the properties of the constraint. Normally called by one of the
10876 convenience functions such as Above, RightOf, SameAs.
10877 """
d55e5bfc
RD
10878 return _core_.IndividualLayoutConstraint_Set(*args, **kwargs)
10879
10880 def LeftOf(*args, **kwargs):
10881 """
10882 LeftOf(self, Window sibling, int marg=0)
10883
15817c7e
RD
10884 Constrains this edge to be to the left of the given window, with an
10885 optional margin. Implicitly, this is relative to the left edge of the
10886 other window.
d55e5bfc
RD
10887 """
10888 return _core_.IndividualLayoutConstraint_LeftOf(*args, **kwargs)
10889
10890 def RightOf(*args, **kwargs):
10891 """
10892 RightOf(self, Window sibling, int marg=0)
10893
15817c7e
RD
10894 Constrains this edge to be to the right of the given window, with an
10895 optional margin. Implicitly, this is relative to the right edge of the
10896 other window.
d55e5bfc
RD
10897 """
10898 return _core_.IndividualLayoutConstraint_RightOf(*args, **kwargs)
10899
10900 def Above(*args, **kwargs):
10901 """
10902 Above(self, Window sibling, int marg=0)
10903
15817c7e
RD
10904 Constrains this edge to be above the given window, with an optional
10905 margin. Implicitly, this is relative to the top edge of the other
10906 window.
d55e5bfc
RD
10907 """
10908 return _core_.IndividualLayoutConstraint_Above(*args, **kwargs)
10909
10910 def Below(*args, **kwargs):
10911 """
10912 Below(self, Window sibling, int marg=0)
10913
15817c7e
RD
10914 Constrains this edge to be below the given window, with an optional
10915 margin. Implicitly, this is relative to the bottom edge of the other
10916 window.
d55e5bfc
RD
10917 """
10918 return _core_.IndividualLayoutConstraint_Below(*args, **kwargs)
10919
10920 def SameAs(*args, **kwargs):
10921 """
10922 SameAs(self, Window otherW, int edge, int marg=0)
10923
15817c7e
RD
10924 Constrains this edge or dimension to be to the same as the edge of the
10925 given window, with an optional margin.
d55e5bfc
RD
10926 """
10927 return _core_.IndividualLayoutConstraint_SameAs(*args, **kwargs)
10928
10929 def PercentOf(*args, **kwargs):
10930 """
10931 PercentOf(self, Window otherW, int wh, int per)
10932
15817c7e
RD
10933 Constrains this edge or dimension to be to a percentage of the given
10934 window, with an optional margin.
d55e5bfc
RD
10935 """
10936 return _core_.IndividualLayoutConstraint_PercentOf(*args, **kwargs)
10937
10938 def Absolute(*args, **kwargs):
10939 """
10940 Absolute(self, int val)
10941
15817c7e 10942 Constrains this edge or dimension to be the given absolute value.
d55e5bfc
RD
10943 """
10944 return _core_.IndividualLayoutConstraint_Absolute(*args, **kwargs)
10945
10946 def Unconstrained(*args, **kwargs):
10947 """
10948 Unconstrained(self)
10949
15817c7e
RD
10950 Sets this edge or dimension to be unconstrained, that is, dependent on
10951 other edges and dimensions from which this value can be deduced.
d55e5bfc
RD
10952 """
10953 return _core_.IndividualLayoutConstraint_Unconstrained(*args, **kwargs)
10954
10955 def AsIs(*args, **kwargs):
10956 """
10957 AsIs(self)
10958
15817c7e
RD
10959 Sets this edge or constraint to be whatever the window's value is at
10960 the moment. If either of the width and height constraints are *as is*,
10961 the window will not be resized, but moved instead. This is important
10962 when considering panel items which are intended to have a default
10963 size, such as a button, which may take its size from the size of the
10964 button label.
d55e5bfc
RD
10965 """
10966 return _core_.IndividualLayoutConstraint_AsIs(*args, **kwargs)
10967
10968 def GetOtherWindow(*args, **kwargs):
10969 """GetOtherWindow(self) -> Window"""
10970 return _core_.IndividualLayoutConstraint_GetOtherWindow(*args, **kwargs)
10971
10972 def GetMyEdge(*args, **kwargs):
10973 """GetMyEdge(self) -> int"""
10974 return _core_.IndividualLayoutConstraint_GetMyEdge(*args, **kwargs)
10975
10976 def SetEdge(*args, **kwargs):
10977 """SetEdge(self, int which)"""
10978 return _core_.IndividualLayoutConstraint_SetEdge(*args, **kwargs)
10979
10980 def SetValue(*args, **kwargs):
10981 """SetValue(self, int v)"""
10982 return _core_.IndividualLayoutConstraint_SetValue(*args, **kwargs)
10983
10984 def GetMargin(*args, **kwargs):
10985 """GetMargin(self) -> int"""
10986 return _core_.IndividualLayoutConstraint_GetMargin(*args, **kwargs)
10987
10988 def SetMargin(*args, **kwargs):
10989 """SetMargin(self, int m)"""
10990 return _core_.IndividualLayoutConstraint_SetMargin(*args, **kwargs)
10991
10992 def GetValue(*args, **kwargs):
10993 """GetValue(self) -> int"""
10994 return _core_.IndividualLayoutConstraint_GetValue(*args, **kwargs)
10995
10996 def GetPercent(*args, **kwargs):
10997 """GetPercent(self) -> int"""
10998 return _core_.IndividualLayoutConstraint_GetPercent(*args, **kwargs)
10999
11000 def GetOtherEdge(*args, **kwargs):
11001 """GetOtherEdge(self) -> int"""
11002 return _core_.IndividualLayoutConstraint_GetOtherEdge(*args, **kwargs)
11003
11004 def GetDone(*args, **kwargs):
11005 """GetDone(self) -> bool"""
11006 return _core_.IndividualLayoutConstraint_GetDone(*args, **kwargs)
11007
11008 def SetDone(*args, **kwargs):
11009 """SetDone(self, bool d)"""
11010 return _core_.IndividualLayoutConstraint_SetDone(*args, **kwargs)
11011
11012 def GetRelationship(*args, **kwargs):
11013 """GetRelationship(self) -> int"""
11014 return _core_.IndividualLayoutConstraint_GetRelationship(*args, **kwargs)
11015
11016 def SetRelationship(*args, **kwargs):
11017 """SetRelationship(self, int r)"""
11018 return _core_.IndividualLayoutConstraint_SetRelationship(*args, **kwargs)
11019
11020 def ResetIfWin(*args, **kwargs):
11021 """
11022 ResetIfWin(self, Window otherW) -> bool
11023
11024 Reset constraint if it mentions otherWin
11025 """
11026 return _core_.IndividualLayoutConstraint_ResetIfWin(*args, **kwargs)
11027
11028 def SatisfyConstraint(*args, **kwargs):
11029 """
11030 SatisfyConstraint(self, LayoutConstraints constraints, Window win) -> bool
11031
11032 Try to satisfy constraint
11033 """
11034 return _core_.IndividualLayoutConstraint_SatisfyConstraint(*args, **kwargs)
11035
11036 def GetEdge(*args, **kwargs):
11037 """
11038 GetEdge(self, int which, Window thisWin, Window other) -> int
11039
11040 Get the value of this edge or dimension, or if this
11041 is not determinable, -1.
11042 """
11043 return _core_.IndividualLayoutConstraint_GetEdge(*args, **kwargs)
11044
11045
11046class IndividualLayoutConstraintPtr(IndividualLayoutConstraint):
11047 def __init__(self, this):
11048 self.this = this
11049 if not hasattr(self,"thisown"): self.thisown = 0
11050 self.__class__ = IndividualLayoutConstraint
11051_core_.IndividualLayoutConstraint_swigregister(IndividualLayoutConstraintPtr)
11052
11053class LayoutConstraints(Object):
11054 """
15817c7e
RD
11055 **Note:** constraints are now deprecated and you should use sizers
11056 instead.
d55e5bfc 11057
15817c7e
RD
11058 Objects of this class can be associated with a window to define its
11059 layout constraints, with respect to siblings or its parent.
d55e5bfc
RD
11060
11061 The class consists of the following eight constraints of class
11062 wx.IndividualLayoutConstraint, some or all of which should be accessed
11063 directly to set the appropriate constraints.
11064
11065 * left: represents the left hand edge of the window
11066 * right: represents the right hand edge of the window
11067 * top: represents the top edge of the window
11068 * bottom: represents the bottom edge of the window
11069 * width: represents the width of the window
11070 * height: represents the height of the window
11071 * centreX: represents the horizontal centre point of the window
11072 * centreY: represents the vertical centre point of the window
11073
15817c7e
RD
11074 Most constraints are initially set to have the relationship
11075 wxUnconstrained, which means that their values should be calculated by
11076 looking at known constraints. The exceptions are width and height,
11077 which are set to wxAsIs to ensure that if the user does not specify a
11078 constraint, the existing width and height will be used, to be
11079 compatible with panel items which often have take a default size. If
11080 the constraint is ``wx.AsIs``, the dimension will not be changed.
11081
11082 :see: `wx.IndividualLayoutConstraint`, `wx.Window.SetConstraints`
d55e5bfc
RD
11083
11084 """
11085 def __repr__(self):
11086 return "<%s.%s; proxy of C++ wxLayoutConstraints instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
11087 left = property(_core_.LayoutConstraints_left_get)
11088 top = property(_core_.LayoutConstraints_top_get)
11089 right = property(_core_.LayoutConstraints_right_get)
11090 bottom = property(_core_.LayoutConstraints_bottom_get)
11091 width = property(_core_.LayoutConstraints_width_get)
11092 height = property(_core_.LayoutConstraints_height_get)
11093 centreX = property(_core_.LayoutConstraints_centreX_get)
11094 centreY = property(_core_.LayoutConstraints_centreY_get)
11095 def __init__(self, *args, **kwargs):
11096 """__init__(self) -> LayoutConstraints"""
11097 newobj = _core_.new_LayoutConstraints(*args, **kwargs)
11098 self.this = newobj.this
11099 self.thisown = 1
11100 del newobj.thisown
11101 def SatisfyConstraints(*args, **kwargs):
11102 """SatisfyConstraints(Window win) -> (areSatisfied, noChanges)"""
11103 return _core_.LayoutConstraints_SatisfyConstraints(*args, **kwargs)
11104
11105 def AreSatisfied(*args, **kwargs):
11106 """AreSatisfied(self) -> bool"""
11107 return _core_.LayoutConstraints_AreSatisfied(*args, **kwargs)
11108
11109
11110class LayoutConstraintsPtr(LayoutConstraints):
11111 def __init__(self, this):
11112 self.this = this
11113 if not hasattr(self,"thisown"): self.thisown = 0
11114 self.__class__ = LayoutConstraints
11115_core_.LayoutConstraints_swigregister(LayoutConstraintsPtr)
11116
11117#----------------------------------------------------------------------------
11118
11119# Use Python's bool constants if available, make some if not
11120try:
11121 True
11122except NameError:
11123 __builtins__.True = 1==1
11124 __builtins__.False = 1==0
11125 def bool(value): return not not value
11126 __builtins__.bool = bool
11127
11128
11129
11130# workarounds for bad wxRTTI names
11131__wxPyPtrTypeMap['wxGauge95'] = 'wxGauge'
11132__wxPyPtrTypeMap['wxSlider95'] = 'wxSlider'
11133__wxPyPtrTypeMap['wxStatusBar95'] = 'wxStatusBar'
11134
11135
11136#----------------------------------------------------------------------------
11137# Load version numbers from __version__... Ensure that major and minor
0f63ec68 11138# versions are the same for both wxPython and wxWidgets.
d55e5bfc
RD
11139
11140from __version__ import *
11141__version__ = VERSION_STRING
11142
0f63ec68
RD
11143assert MAJOR_VERSION == _core_.MAJOR_VERSION, "wxPython/wxWidgets version mismatch"
11144assert MINOR_VERSION == _core_.MINOR_VERSION, "wxPython/wxWidgets version mismatch"
d55e5bfc
RD
11145if RELEASE_VERSION != _core_.RELEASE_VERSION:
11146 import warnings
0f63ec68 11147 warnings.warn("wxPython/wxWidgets release number mismatch")
d55e5bfc
RD
11148
11149#----------------------------------------------------------------------------
11150
62d32a5f
RD
11151# Set the default string<-->unicode conversion encoding from the
11152# locale. This encoding is used when string or unicode objects need
11153# to be converted in order to pass them to wxWidgets. Please be aware
11154# that the default encoding within the same locale may be slightly
11155# different on different platforms. For example, please see
11156# http://www.alanwood.net/demos/charsetdiffs.html for differences
11157# between the common latin/roman encodings.
5cbf236d
RD
11158import locale
11159default = locale.getdefaultlocale()[1]
11160if default:
11161 wx.SetDefaultPyEncoding(default)
11162del default
11163del locale
11164
11165#----------------------------------------------------------------------------
11166
d55e5bfc
RD
11167class PyDeadObjectError(AttributeError):
11168 pass
11169
11170class _wxPyDeadObject(object):
11171 """
11172 Instances of wx objects that are OOR capable will have their __class__
11173 changed to this class when the C++ object is deleted. This should help
11174 prevent crashes due to referencing a bogus C++ pointer.
11175 """
11176 reprStr = "wxPython wrapper for DELETED %s object! (The C++ object no longer exists.)"
11177 attrStr = "The C++ part of the %s object has been deleted, attribute access no longer allowed."
11178
11179 def __repr__(self):
11180 if not hasattr(self, "_name"):
11181 self._name = "[unknown]"
11182 return self.reprStr % self._name
11183
11184 def __getattr__(self, *args):
11185 if not hasattr(self, "_name"):
11186 self._name = "[unknown]"
11187 raise PyDeadObjectError(self.attrStr % self._name)
11188
11189 def __nonzero__(self):
11190 return 0
11191
11192
11193
11194class PyUnbornObjectError(AttributeError):
11195 pass
11196
11197class _wxPyUnbornObject(object):
11198 """
11199 Some stock objects are created when the wx._core module is
11200 imported, but their C++ instance is not created until the wx.App
11201 object is created and initialized. These object instances will
11202 temporarily have their __class__ changed to this class so an
11203 exception will be raised if they are used before the C++ instance
11204 is ready.
11205 """
11206
11207 reprStr = "wxPython wrapper for UNBORN object! (The C++ object is not initialized yet.)"
11208 attrStr = "The C++ part of this object has not been initialized, attribute access not allowed."
11209
11210 def __repr__(self):
11211 #if not hasattr(self, "_name"):
11212 # self._name = "[unknown]"
11213 return self.reprStr #% self._name
11214
11215 def __getattr__(self, *args):
11216 #if not hasattr(self, "_name"):
11217 # self._name = "[unknown]"
11218 raise PyUnbornObjectError(self.attrStr) # % self._name )
11219
11220 def __nonzero__(self):
11221 return 0
11222
11223
11224#----------------------------------------------------------------------------
d55e5bfc
RD
11225
11226def CallAfter(callable, *args, **kw):
11227 """
11228 Call the specified function after the current and pending event
11229 handlers have been completed. This is also good for making GUI
0439c23b
RD
11230 method calls from non-GUI threads. Any extra positional or
11231 keyword args are passed on to the callable when it is called.
11232
11233 :see: `wx.FutureCall`
d55e5bfc
RD
11234 """
11235 app = wx.GetApp()
a001823c 11236 assert app is not None, 'No wx.App created yet'
d55e5bfc 11237
891bb194
RD
11238 if not hasattr(app, "_CallAfterId"):
11239 app._CallAfterId = wx.NewEventType()
11240 app.Connect(-1, -1, app._CallAfterId,
11241 lambda event: event.callable(*event.args, **event.kw) )
d55e5bfc 11242 evt = wx.PyEvent()
891bb194 11243 evt.SetEventType(app._CallAfterId)
d55e5bfc
RD
11244 evt.callable = callable
11245 evt.args = args
11246 evt.kw = kw
11247 wx.PostEvent(app, evt)
11248
d55e5bfc
RD
11249#----------------------------------------------------------------------------
11250
11251
11252class FutureCall:
11253 """
6e0de3df 11254 A convenience class for `wx.Timer`, that calls the given callable
d55e5bfc
RD
11255 object once after the given amount of milliseconds, passing any
11256 positional or keyword args. The return value of the callable is
0439c23b 11257 availbale after it has been run with the `GetResult` method.
d55e5bfc
RD
11258
11259 If you don't need to get the return value or restart the timer
11260 then there is no need to hold a reference to this object. It will
11261 hold a reference to itself while the timer is running (the timer
11262 has a reference to self.Notify) but the cycle will be broken when
11263 the timer completes, automatically cleaning up the wx.FutureCall
11264 object.
0439c23b
RD
11265
11266 :see: `wx.CallAfter`
d55e5bfc
RD
11267 """
11268 def __init__(self, millis, callable, *args, **kwargs):
11269 self.millis = millis
11270 self.callable = callable
11271 self.SetArgs(*args, **kwargs)
11272 self.runCount = 0
11273 self.running = False
11274 self.hasRun = False
11275 self.result = None
11276 self.timer = None
11277 self.Start()
11278
11279 def __del__(self):
11280 self.Stop()
11281
11282
11283 def Start(self, millis=None, *args, **kwargs):
11284 """
11285 (Re)start the timer
11286 """
11287 self.hasRun = False
11288 if millis is not None:
11289 self.millis = millis
11290 if args or kwargs:
11291 self.SetArgs(*args, **kwargs)
11292 self.Stop()
11293 self.timer = wx.PyTimer(self.Notify)
11294 self.timer.Start(self.millis, wx.TIMER_ONE_SHOT)
11295 self.running = True
11296 Restart = Start
11297
11298
11299 def Stop(self):
11300 """
11301 Stop and destroy the timer.
11302 """
11303 if self.timer is not None:
11304 self.timer.Stop()
11305 self.timer = None
11306
11307
11308 def GetInterval(self):
11309 if self.timer is not None:
11310 return self.timer.GetInterval()
11311 else:
11312 return 0
11313
11314
11315 def IsRunning(self):
11316 return self.timer is not None and self.timer.IsRunning()
11317
11318
11319 def SetArgs(self, *args, **kwargs):
11320 """
11321 (Re)set the args passed to the callable object. This is
11322 useful in conjunction with Restart if you want to schedule a
11323 new call to the same callable object but with different
11324 parameters.
11325 """
11326 self.args = args
11327 self.kwargs = kwargs
11328
11329
11330 def HasRun(self):
11331 return self.hasRun
11332
11333 def GetResult(self):
11334 return self.result
11335
11336 def Notify(self):
11337 """
11338 The timer has expired so call the callable.
11339 """
11340 if self.callable and getattr(self.callable, 'im_self', True):
11341 self.runCount += 1
11342 self.running = False
11343 self.result = self.callable(*self.args, **self.kwargs)
11344 self.hasRun = True
11345 if not self.running:
11346 # if it wasn't restarted, then cleanup
11347 wx.CallAfter(self.Stop)
11348
11349
11350
11351#----------------------------------------------------------------------------
11352# Control which items in this module should be documented by epydoc.
11353# We allow only classes and functions, which will help reduce the size
11354# of the docs by filtering out the zillions of constants, EVT objects,
11355# and etc that don't make much sense by themselves, but are instead
11356# documented (or will be) as part of the classes/functions/methods
11357# where they should be used.
11358
d6c14a4c
RD
11359class __DocFilter:
11360 """
11361 A filter for epydoc that only allows non-Ptr classes and
11362 fucntions, in order to reduce the clutter in the API docs.
11363 """
11364 def __init__(self, globals):
11365 self._globals = globals
11366
11367 def __call__(self, name):
11368 import types
11369 obj = self._globals.get(name, None)
11370 if type(obj) not in [type, types.ClassType, types.FunctionType, types.BuiltinFunctionType]:
11371 return False
11372 if name.startswith('_') or name.endswith('Ptr') or name.startswith('EVT'):
11373 return False
11374 return True
d55e5bfc
RD
11375
11376#----------------------------------------------------------------------------
11377#----------------------------------------------------------------------------
11378
11379# Import other modules in this package that should show up in the
11380# "core" wx namespace
11381from _gdi import *
11382from _windows import *
11383from _controls import *
11384from _misc import *
11385
11386
11387# Fixup the stock objects since they can't be used yet. (They will be
11388# restored in wx.PyApp.OnInit.)
11389_core_._wxPyFixStockObjects()
11390
11391#----------------------------------------------------------------------------
11392#----------------------------------------------------------------------------
11393
11394