]> git.saurik.com Git - wxWidgets.git/blame - wxPython/src/gtk/_core.py
use wxUSE_DATEPICKCTRL
[wxWidgets.git] / wxPython / src / gtk / _core.py
CommitLineData
d14a1e28
RD
1# This file was created automatically by SWIG.
2# Don't modify this file, modify the SWIG interface instead.
3
54f9ee45 4import _core_
d14a1e28 5
093d3ff1
RD
6def _swig_setattr_nondynamic(self,class_type,name,value,static=1):
7 if (name == "this"):
8 if isinstance(value, class_type):
9 self.__dict__[name] = value.this
10 if hasattr(value,"thisown"): self.__dict__["thisown"] = value.thisown
11 del value.thisown
12 return
13 method = class_type.__swig_setmethods__.get(name,None)
14 if method: return method(self,value)
15 if (not static) or hasattr(self,name) or (name == "thisown"):
16 self.__dict__[name] = value
17 else:
18 raise AttributeError("You cannot add attributes to %s" % self)
19
20def _swig_setattr(self,class_type,name,value):
21 return _swig_setattr_nondynamic(self,class_type,name,value,0)
22
23def _swig_getattr(self,class_type,name):
24 method = class_type.__swig_getmethods__.get(name,None)
25 if method: return method(self)
26 raise AttributeError,name
27
28import types
29try:
30 _object = types.ObjectType
31 _newclass = 1
32except AttributeError:
33 class _object : pass
34 _newclass = 0
35del types
36
37
38def _swig_setattr_nondynamic_method(set):
39 def set_attr(self,name,value):
40 if hasattr(self,name) or (name in ("this", "thisown")):
41 set(self,name,value)
42 else:
43 raise AttributeError("You cannot add attributes to %s" % self)
44 return set_attr
45
46
d14a1e28
RD
47#// Give a reference to the dictionary of this module to the C++ extension
48#// code.
54f9ee45 49_core_._wxPySetDictionary(vars())
d14a1e28
RD
50
51#// A little trick to make 'wx' be a reference to this module so wx.Names can
52#// be used here.
53import sys as _sys
54wx = _sys.modules[__name__]
55
66c033b4
RD
56
57#----------------------------------------------------------------------------
58
59def _deprecated(callable, msg=None):
60 """
61 Create a wrapper function that will raise a DeprecationWarning
62 before calling the callable.
63 """
64 if msg is None:
65 msg = "%s is deprecated" % callable
66 def deprecatedWrapper(*args, **kwargs):
67 import warnings
68 warnings.warn(msg, DeprecationWarning, stacklevel=2)
69 return callable(*args, **kwargs)
70 deprecatedWrapper.__doc__ = msg
71 return deprecatedWrapper
72
73
74#----------------------------------------------------------------------------
75
54f9ee45
RD
76NOT_FOUND = _core_.NOT_FOUND
77VSCROLL = _core_.VSCROLL
78HSCROLL = _core_.HSCROLL
79CAPTION = _core_.CAPTION
80DOUBLE_BORDER = _core_.DOUBLE_BORDER
81SUNKEN_BORDER = _core_.SUNKEN_BORDER
82RAISED_BORDER = _core_.RAISED_BORDER
83BORDER = _core_.BORDER
84SIMPLE_BORDER = _core_.SIMPLE_BORDER
85STATIC_BORDER = _core_.STATIC_BORDER
86TRANSPARENT_WINDOW = _core_.TRANSPARENT_WINDOW
87NO_BORDER = _core_.NO_BORDER
88TAB_TRAVERSAL = _core_.TAB_TRAVERSAL
89WANTS_CHARS = _core_.WANTS_CHARS
90POPUP_WINDOW = _core_.POPUP_WINDOW
91CENTER_FRAME = _core_.CENTER_FRAME
92CENTRE_ON_SCREEN = _core_.CENTRE_ON_SCREEN
93CENTER_ON_SCREEN = _core_.CENTER_ON_SCREEN
94ED_CLIENT_MARGIN = _core_.ED_CLIENT_MARGIN
95ED_BUTTONS_BOTTOM = _core_.ED_BUTTONS_BOTTOM
96ED_BUTTONS_RIGHT = _core_.ED_BUTTONS_RIGHT
97ED_STATIC_LINE = _core_.ED_STATIC_LINE
98EXT_DIALOG_STYLE = _core_.EXT_DIALOG_STYLE
99CLIP_CHILDREN = _core_.CLIP_CHILDREN
100CLIP_SIBLINGS = _core_.CLIP_SIBLINGS
101ALWAYS_SHOW_SB = _core_.ALWAYS_SHOW_SB
102RETAINED = _core_.RETAINED
103BACKINGSTORE = _core_.BACKINGSTORE
104COLOURED = _core_.COLOURED
105FIXED_LENGTH = _core_.FIXED_LENGTH
106LB_NEEDED_SB = _core_.LB_NEEDED_SB
107LB_ALWAYS_SB = _core_.LB_ALWAYS_SB
108LB_SORT = _core_.LB_SORT
109LB_SINGLE = _core_.LB_SINGLE
110LB_MULTIPLE = _core_.LB_MULTIPLE
111LB_EXTENDED = _core_.LB_EXTENDED
112LB_OWNERDRAW = _core_.LB_OWNERDRAW
113LB_HSCROLL = _core_.LB_HSCROLL
114PROCESS_ENTER = _core_.PROCESS_ENTER
115PASSWORD = _core_.PASSWORD
116CB_SIMPLE = _core_.CB_SIMPLE
117CB_DROPDOWN = _core_.CB_DROPDOWN
118CB_SORT = _core_.CB_SORT
119CB_READONLY = _core_.CB_READONLY
120RA_HORIZONTAL = _core_.RA_HORIZONTAL
121RA_VERTICAL = _core_.RA_VERTICAL
122RA_SPECIFY_ROWS = _core_.RA_SPECIFY_ROWS
123RA_SPECIFY_COLS = _core_.RA_SPECIFY_COLS
fef4c27a 124RA_USE_CHECKBOX = _core_.RA_USE_CHECKBOX
54f9ee45
RD
125RB_GROUP = _core_.RB_GROUP
126RB_SINGLE = _core_.RB_SINGLE
54f9ee45
RD
127SB_HORIZONTAL = _core_.SB_HORIZONTAL
128SB_VERTICAL = _core_.SB_VERTICAL
fef4c27a 129RB_USE_CHECKBOX = _core_.RB_USE_CHECKBOX
54f9ee45
RD
130ST_SIZEGRIP = _core_.ST_SIZEGRIP
131ST_NO_AUTORESIZE = _core_.ST_NO_AUTORESIZE
132FLOOD_SURFACE = _core_.FLOOD_SURFACE
133FLOOD_BORDER = _core_.FLOOD_BORDER
134ODDEVEN_RULE = _core_.ODDEVEN_RULE
135WINDING_RULE = _core_.WINDING_RULE
136TOOL_TOP = _core_.TOOL_TOP
137TOOL_BOTTOM = _core_.TOOL_BOTTOM
138TOOL_LEFT = _core_.TOOL_LEFT
139TOOL_RIGHT = _core_.TOOL_RIGHT
140OK = _core_.OK
141YES_NO = _core_.YES_NO
142CANCEL = _core_.CANCEL
143YES = _core_.YES
144NO = _core_.NO
145NO_DEFAULT = _core_.NO_DEFAULT
146YES_DEFAULT = _core_.YES_DEFAULT
147ICON_EXCLAMATION = _core_.ICON_EXCLAMATION
148ICON_HAND = _core_.ICON_HAND
149ICON_QUESTION = _core_.ICON_QUESTION
150ICON_INFORMATION = _core_.ICON_INFORMATION
151ICON_STOP = _core_.ICON_STOP
152ICON_ASTERISK = _core_.ICON_ASTERISK
153ICON_MASK = _core_.ICON_MASK
154ICON_WARNING = _core_.ICON_WARNING
155ICON_ERROR = _core_.ICON_ERROR
156FORWARD = _core_.FORWARD
157BACKWARD = _core_.BACKWARD
158RESET = _core_.RESET
159HELP = _core_.HELP
160MORE = _core_.MORE
161SETUP = _core_.SETUP
162SIZE_AUTO_WIDTH = _core_.SIZE_AUTO_WIDTH
163SIZE_AUTO_HEIGHT = _core_.SIZE_AUTO_HEIGHT
164SIZE_AUTO = _core_.SIZE_AUTO
165SIZE_USE_EXISTING = _core_.SIZE_USE_EXISTING
166SIZE_ALLOW_MINUS_ONE = _core_.SIZE_ALLOW_MINUS_ONE
167PORTRAIT = _core_.PORTRAIT
168LANDSCAPE = _core_.LANDSCAPE
169PRINT_QUALITY_HIGH = _core_.PRINT_QUALITY_HIGH
170PRINT_QUALITY_MEDIUM = _core_.PRINT_QUALITY_MEDIUM
171PRINT_QUALITY_LOW = _core_.PRINT_QUALITY_LOW
172PRINT_QUALITY_DRAFT = _core_.PRINT_QUALITY_DRAFT
173ID_ANY = _core_.ID_ANY
174ID_SEPARATOR = _core_.ID_SEPARATOR
175ID_LOWEST = _core_.ID_LOWEST
176ID_OPEN = _core_.ID_OPEN
177ID_CLOSE = _core_.ID_CLOSE
178ID_NEW = _core_.ID_NEW
179ID_SAVE = _core_.ID_SAVE
180ID_SAVEAS = _core_.ID_SAVEAS
181ID_REVERT = _core_.ID_REVERT
182ID_EXIT = _core_.ID_EXIT
183ID_UNDO = _core_.ID_UNDO
184ID_REDO = _core_.ID_REDO
185ID_HELP = _core_.ID_HELP
186ID_PRINT = _core_.ID_PRINT
187ID_PRINT_SETUP = _core_.ID_PRINT_SETUP
188ID_PREVIEW = _core_.ID_PREVIEW
189ID_ABOUT = _core_.ID_ABOUT
190ID_HELP_CONTENTS = _core_.ID_HELP_CONTENTS
191ID_HELP_COMMANDS = _core_.ID_HELP_COMMANDS
192ID_HELP_PROCEDURES = _core_.ID_HELP_PROCEDURES
193ID_HELP_CONTEXT = _core_.ID_HELP_CONTEXT
194ID_CLOSE_ALL = _core_.ID_CLOSE_ALL
195ID_PREFERENCES = _core_.ID_PREFERENCES
196ID_CUT = _core_.ID_CUT
197ID_COPY = _core_.ID_COPY
198ID_PASTE = _core_.ID_PASTE
199ID_CLEAR = _core_.ID_CLEAR
200ID_FIND = _core_.ID_FIND
201ID_DUPLICATE = _core_.ID_DUPLICATE
202ID_SELECTALL = _core_.ID_SELECTALL
203ID_DELETE = _core_.ID_DELETE
204ID_REPLACE = _core_.ID_REPLACE
205ID_REPLACE_ALL = _core_.ID_REPLACE_ALL
206ID_PROPERTIES = _core_.ID_PROPERTIES
207ID_VIEW_DETAILS = _core_.ID_VIEW_DETAILS
208ID_VIEW_LARGEICONS = _core_.ID_VIEW_LARGEICONS
209ID_VIEW_SMALLICONS = _core_.ID_VIEW_SMALLICONS
210ID_VIEW_LIST = _core_.ID_VIEW_LIST
211ID_VIEW_SORTDATE = _core_.ID_VIEW_SORTDATE
212ID_VIEW_SORTNAME = _core_.ID_VIEW_SORTNAME
213ID_VIEW_SORTSIZE = _core_.ID_VIEW_SORTSIZE
214ID_VIEW_SORTTYPE = _core_.ID_VIEW_SORTTYPE
215ID_FILE1 = _core_.ID_FILE1
216ID_FILE2 = _core_.ID_FILE2
217ID_FILE3 = _core_.ID_FILE3
218ID_FILE4 = _core_.ID_FILE4
219ID_FILE5 = _core_.ID_FILE5
220ID_FILE6 = _core_.ID_FILE6
221ID_FILE7 = _core_.ID_FILE7
222ID_FILE8 = _core_.ID_FILE8
223ID_FILE9 = _core_.ID_FILE9
224ID_OK = _core_.ID_OK
225ID_CANCEL = _core_.ID_CANCEL
226ID_APPLY = _core_.ID_APPLY
227ID_YES = _core_.ID_YES
228ID_NO = _core_.ID_NO
229ID_STATIC = _core_.ID_STATIC
230ID_FORWARD = _core_.ID_FORWARD
231ID_BACKWARD = _core_.ID_BACKWARD
232ID_DEFAULT = _core_.ID_DEFAULT
233ID_MORE = _core_.ID_MORE
234ID_SETUP = _core_.ID_SETUP
235ID_RESET = _core_.ID_RESET
236ID_CONTEXT_HELP = _core_.ID_CONTEXT_HELP
237ID_YESTOALL = _core_.ID_YESTOALL
238ID_NOTOALL = _core_.ID_NOTOALL
239ID_ABORT = _core_.ID_ABORT
240ID_RETRY = _core_.ID_RETRY
241ID_IGNORE = _core_.ID_IGNORE
7bc1e663
RD
242ID_ADD = _core_.ID_ADD
243ID_REMOVE = _core_.ID_REMOVE
244ID_UP = _core_.ID_UP
245ID_DOWN = _core_.ID_DOWN
246ID_HOME = _core_.ID_HOME
247ID_REFRESH = _core_.ID_REFRESH
248ID_STOP = _core_.ID_STOP
249ID_INDEX = _core_.ID_INDEX
250ID_BOLD = _core_.ID_BOLD
251ID_ITALIC = _core_.ID_ITALIC
252ID_JUSTIFY_CENTER = _core_.ID_JUSTIFY_CENTER
253ID_JUSTIFY_FILL = _core_.ID_JUSTIFY_FILL
254ID_JUSTIFY_RIGHT = _core_.ID_JUSTIFY_RIGHT
255ID_JUSTIFY_LEFT = _core_.ID_JUSTIFY_LEFT
256ID_UNDERLINE = _core_.ID_UNDERLINE
257ID_INDENT = _core_.ID_INDENT
258ID_UNINDENT = _core_.ID_UNINDENT
259ID_ZOOM_100 = _core_.ID_ZOOM_100
260ID_ZOOM_FIT = _core_.ID_ZOOM_FIT
261ID_ZOOM_IN = _core_.ID_ZOOM_IN
262ID_ZOOM_OUT = _core_.ID_ZOOM_OUT
263ID_UNDELETE = _core_.ID_UNDELETE
264ID_REVERT_TO_SAVED = _core_.ID_REVERT_TO_SAVED
54f9ee45
RD
265ID_HIGHEST = _core_.ID_HIGHEST
266OPEN = _core_.OPEN
267SAVE = _core_.SAVE
268HIDE_READONLY = _core_.HIDE_READONLY
269OVERWRITE_PROMPT = _core_.OVERWRITE_PROMPT
270FILE_MUST_EXIST = _core_.FILE_MUST_EXIST
271MULTIPLE = _core_.MULTIPLE
272CHANGE_DIR = _core_.CHANGE_DIR
273ACCEL_ALT = _core_.ACCEL_ALT
274ACCEL_CTRL = _core_.ACCEL_CTRL
275ACCEL_SHIFT = _core_.ACCEL_SHIFT
276ACCEL_NORMAL = _core_.ACCEL_NORMAL
277PD_AUTO_HIDE = _core_.PD_AUTO_HIDE
278PD_APP_MODAL = _core_.PD_APP_MODAL
279PD_CAN_ABORT = _core_.PD_CAN_ABORT
280PD_ELAPSED_TIME = _core_.PD_ELAPSED_TIME
281PD_ESTIMATED_TIME = _core_.PD_ESTIMATED_TIME
282PD_REMAINING_TIME = _core_.PD_REMAINING_TIME
e505d15e
RD
283PD_SMOOTH = _core_.PD_SMOOTH
284PD_CAN_SKIP = _core_.PD_CAN_SKIP
54f9ee45
RD
285DD_NEW_DIR_BUTTON = _core_.DD_NEW_DIR_BUTTON
286DD_DEFAULT_STYLE = _core_.DD_DEFAULT_STYLE
287MENU_TEAROFF = _core_.MENU_TEAROFF
288MB_DOCKABLE = _core_.MB_DOCKABLE
289NO_FULL_REPAINT_ON_RESIZE = _core_.NO_FULL_REPAINT_ON_RESIZE
290FULL_REPAINT_ON_RESIZE = _core_.FULL_REPAINT_ON_RESIZE
291LI_HORIZONTAL = _core_.LI_HORIZONTAL
292LI_VERTICAL = _core_.LI_VERTICAL
293WS_EX_VALIDATE_RECURSIVELY = _core_.WS_EX_VALIDATE_RECURSIVELY
294WS_EX_BLOCK_EVENTS = _core_.WS_EX_BLOCK_EVENTS
295WS_EX_TRANSIENT = _core_.WS_EX_TRANSIENT
296WS_EX_THEMED_BACKGROUND = _core_.WS_EX_THEMED_BACKGROUND
297WS_EX_PROCESS_IDLE = _core_.WS_EX_PROCESS_IDLE
298WS_EX_PROCESS_UI_UPDATES = _core_.WS_EX_PROCESS_UI_UPDATES
299MM_TEXT = _core_.MM_TEXT
300MM_LOMETRIC = _core_.MM_LOMETRIC
301MM_HIMETRIC = _core_.MM_HIMETRIC
302MM_LOENGLISH = _core_.MM_LOENGLISH
303MM_HIENGLISH = _core_.MM_HIENGLISH
304MM_TWIPS = _core_.MM_TWIPS
305MM_ISOTROPIC = _core_.MM_ISOTROPIC
306MM_ANISOTROPIC = _core_.MM_ANISOTROPIC
307MM_POINTS = _core_.MM_POINTS
308MM_METRIC = _core_.MM_METRIC
309CENTRE = _core_.CENTRE
310CENTER = _core_.CENTER
311HORIZONTAL = _core_.HORIZONTAL
312VERTICAL = _core_.VERTICAL
313BOTH = _core_.BOTH
314LEFT = _core_.LEFT
315RIGHT = _core_.RIGHT
316UP = _core_.UP
317DOWN = _core_.DOWN
318TOP = _core_.TOP
319BOTTOM = _core_.BOTTOM
320NORTH = _core_.NORTH
321SOUTH = _core_.SOUTH
322WEST = _core_.WEST
323EAST = _core_.EAST
324ALL = _core_.ALL
325ALIGN_NOT = _core_.ALIGN_NOT
326ALIGN_CENTER_HORIZONTAL = _core_.ALIGN_CENTER_HORIZONTAL
327ALIGN_CENTRE_HORIZONTAL = _core_.ALIGN_CENTRE_HORIZONTAL
328ALIGN_LEFT = _core_.ALIGN_LEFT
329ALIGN_TOP = _core_.ALIGN_TOP
330ALIGN_RIGHT = _core_.ALIGN_RIGHT
331ALIGN_BOTTOM = _core_.ALIGN_BOTTOM
332ALIGN_CENTER_VERTICAL = _core_.ALIGN_CENTER_VERTICAL
333ALIGN_CENTRE_VERTICAL = _core_.ALIGN_CENTRE_VERTICAL
334ALIGN_CENTER = _core_.ALIGN_CENTER
335ALIGN_CENTRE = _core_.ALIGN_CENTRE
336ALIGN_MASK = _core_.ALIGN_MASK
337STRETCH_NOT = _core_.STRETCH_NOT
338SHRINK = _core_.SHRINK
339GROW = _core_.GROW
340EXPAND = _core_.EXPAND
341SHAPED = _core_.SHAPED
342FIXED_MINSIZE = _core_.FIXED_MINSIZE
343TILE = _core_.TILE
344ADJUST_MINSIZE = _core_.ADJUST_MINSIZE
345BORDER_DEFAULT = _core_.BORDER_DEFAULT
346BORDER_NONE = _core_.BORDER_NONE
347BORDER_STATIC = _core_.BORDER_STATIC
348BORDER_SIMPLE = _core_.BORDER_SIMPLE
349BORDER_RAISED = _core_.BORDER_RAISED
350BORDER_SUNKEN = _core_.BORDER_SUNKEN
351BORDER_DOUBLE = _core_.BORDER_DOUBLE
352BORDER_MASK = _core_.BORDER_MASK
7bc1e663
RD
353BG_STYLE_SYSTEM = _core_.BG_STYLE_SYSTEM
354BG_STYLE_COLOUR = _core_.BG_STYLE_COLOUR
355BG_STYLE_CUSTOM = _core_.BG_STYLE_CUSTOM
54f9ee45
RD
356DEFAULT = _core_.DEFAULT
357DECORATIVE = _core_.DECORATIVE
358ROMAN = _core_.ROMAN
359SCRIPT = _core_.SCRIPT
360SWISS = _core_.SWISS
361MODERN = _core_.MODERN
362TELETYPE = _core_.TELETYPE
363VARIABLE = _core_.VARIABLE
364FIXED = _core_.FIXED
365NORMAL = _core_.NORMAL
366LIGHT = _core_.LIGHT
367BOLD = _core_.BOLD
368ITALIC = _core_.ITALIC
369SLANT = _core_.SLANT
370SOLID = _core_.SOLID
371DOT = _core_.DOT
372LONG_DASH = _core_.LONG_DASH
373SHORT_DASH = _core_.SHORT_DASH
374DOT_DASH = _core_.DOT_DASH
375USER_DASH = _core_.USER_DASH
376TRANSPARENT = _core_.TRANSPARENT
377STIPPLE = _core_.STIPPLE
378BDIAGONAL_HATCH = _core_.BDIAGONAL_HATCH
379CROSSDIAG_HATCH = _core_.CROSSDIAG_HATCH
380FDIAGONAL_HATCH = _core_.FDIAGONAL_HATCH
381CROSS_HATCH = _core_.CROSS_HATCH
382HORIZONTAL_HATCH = _core_.HORIZONTAL_HATCH
383VERTICAL_HATCH = _core_.VERTICAL_HATCH
384JOIN_BEVEL = _core_.JOIN_BEVEL
385JOIN_MITER = _core_.JOIN_MITER
386JOIN_ROUND = _core_.JOIN_ROUND
387CAP_ROUND = _core_.CAP_ROUND
388CAP_PROJECTING = _core_.CAP_PROJECTING
389CAP_BUTT = _core_.CAP_BUTT
390CLEAR = _core_.CLEAR
391XOR = _core_.XOR
392INVERT = _core_.INVERT
393OR_REVERSE = _core_.OR_REVERSE
394AND_REVERSE = _core_.AND_REVERSE
395COPY = _core_.COPY
396AND = _core_.AND
397AND_INVERT = _core_.AND_INVERT
398NO_OP = _core_.NO_OP
399NOR = _core_.NOR
400EQUIV = _core_.EQUIV
401SRC_INVERT = _core_.SRC_INVERT
402OR_INVERT = _core_.OR_INVERT
403NAND = _core_.NAND
404OR = _core_.OR
405SET = _core_.SET
406WXK_BACK = _core_.WXK_BACK
407WXK_TAB = _core_.WXK_TAB
408WXK_RETURN = _core_.WXK_RETURN
409WXK_ESCAPE = _core_.WXK_ESCAPE
410WXK_SPACE = _core_.WXK_SPACE
411WXK_DELETE = _core_.WXK_DELETE
412WXK_START = _core_.WXK_START
413WXK_LBUTTON = _core_.WXK_LBUTTON
414WXK_RBUTTON = _core_.WXK_RBUTTON
415WXK_CANCEL = _core_.WXK_CANCEL
416WXK_MBUTTON = _core_.WXK_MBUTTON
417WXK_CLEAR = _core_.WXK_CLEAR
418WXK_SHIFT = _core_.WXK_SHIFT
419WXK_ALT = _core_.WXK_ALT
420WXK_CONTROL = _core_.WXK_CONTROL
421WXK_MENU = _core_.WXK_MENU
422WXK_PAUSE = _core_.WXK_PAUSE
423WXK_CAPITAL = _core_.WXK_CAPITAL
424WXK_PRIOR = _core_.WXK_PRIOR
425WXK_NEXT = _core_.WXK_NEXT
426WXK_END = _core_.WXK_END
427WXK_HOME = _core_.WXK_HOME
428WXK_LEFT = _core_.WXK_LEFT
429WXK_UP = _core_.WXK_UP
430WXK_RIGHT = _core_.WXK_RIGHT
431WXK_DOWN = _core_.WXK_DOWN
432WXK_SELECT = _core_.WXK_SELECT
433WXK_PRINT = _core_.WXK_PRINT
434WXK_EXECUTE = _core_.WXK_EXECUTE
435WXK_SNAPSHOT = _core_.WXK_SNAPSHOT
436WXK_INSERT = _core_.WXK_INSERT
437WXK_HELP = _core_.WXK_HELP
438WXK_NUMPAD0 = _core_.WXK_NUMPAD0
439WXK_NUMPAD1 = _core_.WXK_NUMPAD1
440WXK_NUMPAD2 = _core_.WXK_NUMPAD2
441WXK_NUMPAD3 = _core_.WXK_NUMPAD3
442WXK_NUMPAD4 = _core_.WXK_NUMPAD4
443WXK_NUMPAD5 = _core_.WXK_NUMPAD5
444WXK_NUMPAD6 = _core_.WXK_NUMPAD6
445WXK_NUMPAD7 = _core_.WXK_NUMPAD7
446WXK_NUMPAD8 = _core_.WXK_NUMPAD8
447WXK_NUMPAD9 = _core_.WXK_NUMPAD9
448WXK_MULTIPLY = _core_.WXK_MULTIPLY
449WXK_ADD = _core_.WXK_ADD
450WXK_SEPARATOR = _core_.WXK_SEPARATOR
451WXK_SUBTRACT = _core_.WXK_SUBTRACT
452WXK_DECIMAL = _core_.WXK_DECIMAL
453WXK_DIVIDE = _core_.WXK_DIVIDE
454WXK_F1 = _core_.WXK_F1
455WXK_F2 = _core_.WXK_F2
456WXK_F3 = _core_.WXK_F3
457WXK_F4 = _core_.WXK_F4
458WXK_F5 = _core_.WXK_F5
459WXK_F6 = _core_.WXK_F6
460WXK_F7 = _core_.WXK_F7
461WXK_F8 = _core_.WXK_F8
462WXK_F9 = _core_.WXK_F9
463WXK_F10 = _core_.WXK_F10
464WXK_F11 = _core_.WXK_F11
465WXK_F12 = _core_.WXK_F12
466WXK_F13 = _core_.WXK_F13
467WXK_F14 = _core_.WXK_F14
468WXK_F15 = _core_.WXK_F15
469WXK_F16 = _core_.WXK_F16
470WXK_F17 = _core_.WXK_F17
471WXK_F18 = _core_.WXK_F18
472WXK_F19 = _core_.WXK_F19
473WXK_F20 = _core_.WXK_F20
474WXK_F21 = _core_.WXK_F21
475WXK_F22 = _core_.WXK_F22
476WXK_F23 = _core_.WXK_F23
477WXK_F24 = _core_.WXK_F24
478WXK_NUMLOCK = _core_.WXK_NUMLOCK
479WXK_SCROLL = _core_.WXK_SCROLL
480WXK_PAGEUP = _core_.WXK_PAGEUP
481WXK_PAGEDOWN = _core_.WXK_PAGEDOWN
482WXK_NUMPAD_SPACE = _core_.WXK_NUMPAD_SPACE
483WXK_NUMPAD_TAB = _core_.WXK_NUMPAD_TAB
484WXK_NUMPAD_ENTER = _core_.WXK_NUMPAD_ENTER
485WXK_NUMPAD_F1 = _core_.WXK_NUMPAD_F1
486WXK_NUMPAD_F2 = _core_.WXK_NUMPAD_F2
487WXK_NUMPAD_F3 = _core_.WXK_NUMPAD_F3
488WXK_NUMPAD_F4 = _core_.WXK_NUMPAD_F4
489WXK_NUMPAD_HOME = _core_.WXK_NUMPAD_HOME
490WXK_NUMPAD_LEFT = _core_.WXK_NUMPAD_LEFT
491WXK_NUMPAD_UP = _core_.WXK_NUMPAD_UP
492WXK_NUMPAD_RIGHT = _core_.WXK_NUMPAD_RIGHT
493WXK_NUMPAD_DOWN = _core_.WXK_NUMPAD_DOWN
494WXK_NUMPAD_PRIOR = _core_.WXK_NUMPAD_PRIOR
495WXK_NUMPAD_PAGEUP = _core_.WXK_NUMPAD_PAGEUP
496WXK_NUMPAD_NEXT = _core_.WXK_NUMPAD_NEXT
497WXK_NUMPAD_PAGEDOWN = _core_.WXK_NUMPAD_PAGEDOWN
498WXK_NUMPAD_END = _core_.WXK_NUMPAD_END
499WXK_NUMPAD_BEGIN = _core_.WXK_NUMPAD_BEGIN
500WXK_NUMPAD_INSERT = _core_.WXK_NUMPAD_INSERT
501WXK_NUMPAD_DELETE = _core_.WXK_NUMPAD_DELETE
502WXK_NUMPAD_EQUAL = _core_.WXK_NUMPAD_EQUAL
503WXK_NUMPAD_MULTIPLY = _core_.WXK_NUMPAD_MULTIPLY
504WXK_NUMPAD_ADD = _core_.WXK_NUMPAD_ADD
505WXK_NUMPAD_SEPARATOR = _core_.WXK_NUMPAD_SEPARATOR
506WXK_NUMPAD_SUBTRACT = _core_.WXK_NUMPAD_SUBTRACT
507WXK_NUMPAD_DECIMAL = _core_.WXK_NUMPAD_DECIMAL
508WXK_NUMPAD_DIVIDE = _core_.WXK_NUMPAD_DIVIDE
509WXK_WINDOWS_LEFT = _core_.WXK_WINDOWS_LEFT
510WXK_WINDOWS_RIGHT = _core_.WXK_WINDOWS_RIGHT
511WXK_WINDOWS_MENU = _core_.WXK_WINDOWS_MENU
512PAPER_NONE = _core_.PAPER_NONE
513PAPER_LETTER = _core_.PAPER_LETTER
514PAPER_LEGAL = _core_.PAPER_LEGAL
515PAPER_A4 = _core_.PAPER_A4
516PAPER_CSHEET = _core_.PAPER_CSHEET
517PAPER_DSHEET = _core_.PAPER_DSHEET
518PAPER_ESHEET = _core_.PAPER_ESHEET
519PAPER_LETTERSMALL = _core_.PAPER_LETTERSMALL
520PAPER_TABLOID = _core_.PAPER_TABLOID
521PAPER_LEDGER = _core_.PAPER_LEDGER
522PAPER_STATEMENT = _core_.PAPER_STATEMENT
523PAPER_EXECUTIVE = _core_.PAPER_EXECUTIVE
524PAPER_A3 = _core_.PAPER_A3
525PAPER_A4SMALL = _core_.PAPER_A4SMALL
526PAPER_A5 = _core_.PAPER_A5
527PAPER_B4 = _core_.PAPER_B4
528PAPER_B5 = _core_.PAPER_B5
529PAPER_FOLIO = _core_.PAPER_FOLIO
530PAPER_QUARTO = _core_.PAPER_QUARTO
531PAPER_10X14 = _core_.PAPER_10X14
532PAPER_11X17 = _core_.PAPER_11X17
533PAPER_NOTE = _core_.PAPER_NOTE
534PAPER_ENV_9 = _core_.PAPER_ENV_9
535PAPER_ENV_10 = _core_.PAPER_ENV_10
536PAPER_ENV_11 = _core_.PAPER_ENV_11
537PAPER_ENV_12 = _core_.PAPER_ENV_12
538PAPER_ENV_14 = _core_.PAPER_ENV_14
539PAPER_ENV_DL = _core_.PAPER_ENV_DL
540PAPER_ENV_C5 = _core_.PAPER_ENV_C5
541PAPER_ENV_C3 = _core_.PAPER_ENV_C3
542PAPER_ENV_C4 = _core_.PAPER_ENV_C4
543PAPER_ENV_C6 = _core_.PAPER_ENV_C6
544PAPER_ENV_C65 = _core_.PAPER_ENV_C65
545PAPER_ENV_B4 = _core_.PAPER_ENV_B4
546PAPER_ENV_B5 = _core_.PAPER_ENV_B5
547PAPER_ENV_B6 = _core_.PAPER_ENV_B6
548PAPER_ENV_ITALY = _core_.PAPER_ENV_ITALY
549PAPER_ENV_MONARCH = _core_.PAPER_ENV_MONARCH
550PAPER_ENV_PERSONAL = _core_.PAPER_ENV_PERSONAL
551PAPER_FANFOLD_US = _core_.PAPER_FANFOLD_US
552PAPER_FANFOLD_STD_GERMAN = _core_.PAPER_FANFOLD_STD_GERMAN
553PAPER_FANFOLD_LGL_GERMAN = _core_.PAPER_FANFOLD_LGL_GERMAN
554PAPER_ISO_B4 = _core_.PAPER_ISO_B4
555PAPER_JAPANESE_POSTCARD = _core_.PAPER_JAPANESE_POSTCARD
556PAPER_9X11 = _core_.PAPER_9X11
557PAPER_10X11 = _core_.PAPER_10X11
558PAPER_15X11 = _core_.PAPER_15X11
559PAPER_ENV_INVITE = _core_.PAPER_ENV_INVITE
560PAPER_LETTER_EXTRA = _core_.PAPER_LETTER_EXTRA
561PAPER_LEGAL_EXTRA = _core_.PAPER_LEGAL_EXTRA
562PAPER_TABLOID_EXTRA = _core_.PAPER_TABLOID_EXTRA
563PAPER_A4_EXTRA = _core_.PAPER_A4_EXTRA
564PAPER_LETTER_TRANSVERSE = _core_.PAPER_LETTER_TRANSVERSE
565PAPER_A4_TRANSVERSE = _core_.PAPER_A4_TRANSVERSE
566PAPER_LETTER_EXTRA_TRANSVERSE = _core_.PAPER_LETTER_EXTRA_TRANSVERSE
567PAPER_A_PLUS = _core_.PAPER_A_PLUS
568PAPER_B_PLUS = _core_.PAPER_B_PLUS
569PAPER_LETTER_PLUS = _core_.PAPER_LETTER_PLUS
570PAPER_A4_PLUS = _core_.PAPER_A4_PLUS
571PAPER_A5_TRANSVERSE = _core_.PAPER_A5_TRANSVERSE
572PAPER_B5_TRANSVERSE = _core_.PAPER_B5_TRANSVERSE
573PAPER_A3_EXTRA = _core_.PAPER_A3_EXTRA
574PAPER_A5_EXTRA = _core_.PAPER_A5_EXTRA
575PAPER_B5_EXTRA = _core_.PAPER_B5_EXTRA
576PAPER_A2 = _core_.PAPER_A2
577PAPER_A3_TRANSVERSE = _core_.PAPER_A3_TRANSVERSE
578PAPER_A3_EXTRA_TRANSVERSE = _core_.PAPER_A3_EXTRA_TRANSVERSE
579DUPLEX_SIMPLEX = _core_.DUPLEX_SIMPLEX
580DUPLEX_HORIZONTAL = _core_.DUPLEX_HORIZONTAL
581DUPLEX_VERTICAL = _core_.DUPLEX_VERTICAL
582ITEM_SEPARATOR = _core_.ITEM_SEPARATOR
583ITEM_NORMAL = _core_.ITEM_NORMAL
584ITEM_CHECK = _core_.ITEM_CHECK
585ITEM_RADIO = _core_.ITEM_RADIO
586ITEM_MAX = _core_.ITEM_MAX
587HT_NOWHERE = _core_.HT_NOWHERE
588HT_SCROLLBAR_FIRST = _core_.HT_SCROLLBAR_FIRST
589HT_SCROLLBAR_ARROW_LINE_1 = _core_.HT_SCROLLBAR_ARROW_LINE_1
590HT_SCROLLBAR_ARROW_LINE_2 = _core_.HT_SCROLLBAR_ARROW_LINE_2
591HT_SCROLLBAR_ARROW_PAGE_1 = _core_.HT_SCROLLBAR_ARROW_PAGE_1
592HT_SCROLLBAR_ARROW_PAGE_2 = _core_.HT_SCROLLBAR_ARROW_PAGE_2
593HT_SCROLLBAR_THUMB = _core_.HT_SCROLLBAR_THUMB
594HT_SCROLLBAR_BAR_1 = _core_.HT_SCROLLBAR_BAR_1
595HT_SCROLLBAR_BAR_2 = _core_.HT_SCROLLBAR_BAR_2
596HT_SCROLLBAR_LAST = _core_.HT_SCROLLBAR_LAST
597HT_WINDOW_OUTSIDE = _core_.HT_WINDOW_OUTSIDE
598HT_WINDOW_INSIDE = _core_.HT_WINDOW_INSIDE
599HT_WINDOW_VERT_SCROLLBAR = _core_.HT_WINDOW_VERT_SCROLLBAR
600HT_WINDOW_HORZ_SCROLLBAR = _core_.HT_WINDOW_HORZ_SCROLLBAR
601HT_WINDOW_CORNER = _core_.HT_WINDOW_CORNER
602HT_MAX = _core_.HT_MAX
603MOD_NONE = _core_.MOD_NONE
604MOD_ALT = _core_.MOD_ALT
605MOD_CONTROL = _core_.MOD_CONTROL
606MOD_SHIFT = _core_.MOD_SHIFT
607MOD_WIN = _core_.MOD_WIN
608UPDATE_UI_NONE = _core_.UPDATE_UI_NONE
609UPDATE_UI_RECURSE = _core_.UPDATE_UI_RECURSE
610UPDATE_UI_FROMIDLE = _core_.UPDATE_UI_FROMIDLE
d14a1e28
RD
611#---------------------------------------------------------------------------
612
613class Object(object):
0df68c9f
RD
614 """
615 The base class for most wx objects, although in wxPython not
616 much functionality is needed nor exposed.
617 """
d14a1e28
RD
618 def __init__(self): raise RuntimeError, "No constructor defined"
619 def __repr__(self):
620 return "<%s.%s; proxy of C++ wxObject instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
e811c8ce 621 def GetClassName(*args, **kwargs):
0df68c9f 622 """
a95a7133 623 GetClassName(self) -> String
e811c8ce 624
a95a7133 625 Returns the class name of the C++ class using wxRTTI.
0df68c9f 626 """
54f9ee45 627 return _core_.Object_GetClassName(*args, **kwargs)
e811c8ce
RD
628
629 def Destroy(*args, **kwargs):
0df68c9f 630 """
a95a7133 631 Destroy(self)
e811c8ce 632
0df68c9f
RD
633 Deletes the C++ object this Python object is a proxy for.
634 """
54f9ee45 635 return _core_.Object_Destroy(*args, **kwargs)
e811c8ce 636
d14a1e28
RD
637
638class ObjectPtr(Object):
639 def __init__(self, this):
640 self.this = this
641 if not hasattr(self,"thisown"): self.thisown = 0
642 self.__class__ = Object
54f9ee45
RD
643_core_.Object_swigregister(ObjectPtr)
644_wxPySetDictionary = _core_._wxPySetDictionary
d14a1e28 645
54f9ee45 646_wxPyFixStockObjects = _core_._wxPyFixStockObjects
3a04f143 647
54f9ee45 648cvar = _core_.cvar
196addbf 649EmptyString = cvar.EmptyString
d14a1e28
RD
650
651#---------------------------------------------------------------------------
652
54f9ee45
RD
653BITMAP_TYPE_INVALID = _core_.BITMAP_TYPE_INVALID
654BITMAP_TYPE_BMP = _core_.BITMAP_TYPE_BMP
655BITMAP_TYPE_ICO = _core_.BITMAP_TYPE_ICO
656BITMAP_TYPE_CUR = _core_.BITMAP_TYPE_CUR
657BITMAP_TYPE_XBM = _core_.BITMAP_TYPE_XBM
658BITMAP_TYPE_XBM_DATA = _core_.BITMAP_TYPE_XBM_DATA
659BITMAP_TYPE_XPM = _core_.BITMAP_TYPE_XPM
660BITMAP_TYPE_XPM_DATA = _core_.BITMAP_TYPE_XPM_DATA
661BITMAP_TYPE_TIF = _core_.BITMAP_TYPE_TIF
662BITMAP_TYPE_GIF = _core_.BITMAP_TYPE_GIF
663BITMAP_TYPE_PNG = _core_.BITMAP_TYPE_PNG
664BITMAP_TYPE_JPEG = _core_.BITMAP_TYPE_JPEG
665BITMAP_TYPE_PNM = _core_.BITMAP_TYPE_PNM
666BITMAP_TYPE_PCX = _core_.BITMAP_TYPE_PCX
667BITMAP_TYPE_PICT = _core_.BITMAP_TYPE_PICT
668BITMAP_TYPE_ICON = _core_.BITMAP_TYPE_ICON
669BITMAP_TYPE_ANI = _core_.BITMAP_TYPE_ANI
670BITMAP_TYPE_IFF = _core_.BITMAP_TYPE_IFF
671BITMAP_TYPE_MACCURSOR = _core_.BITMAP_TYPE_MACCURSOR
672BITMAP_TYPE_ANY = _core_.BITMAP_TYPE_ANY
673CURSOR_NONE = _core_.CURSOR_NONE
674CURSOR_ARROW = _core_.CURSOR_ARROW
675CURSOR_RIGHT_ARROW = _core_.CURSOR_RIGHT_ARROW
676CURSOR_BULLSEYE = _core_.CURSOR_BULLSEYE
677CURSOR_CHAR = _core_.CURSOR_CHAR
678CURSOR_CROSS = _core_.CURSOR_CROSS
679CURSOR_HAND = _core_.CURSOR_HAND
680CURSOR_IBEAM = _core_.CURSOR_IBEAM
681CURSOR_LEFT_BUTTON = _core_.CURSOR_LEFT_BUTTON
682CURSOR_MAGNIFIER = _core_.CURSOR_MAGNIFIER
683CURSOR_MIDDLE_BUTTON = _core_.CURSOR_MIDDLE_BUTTON
684CURSOR_NO_ENTRY = _core_.CURSOR_NO_ENTRY
685CURSOR_PAINT_BRUSH = _core_.CURSOR_PAINT_BRUSH
686CURSOR_PENCIL = _core_.CURSOR_PENCIL
687CURSOR_POINT_LEFT = _core_.CURSOR_POINT_LEFT
688CURSOR_POINT_RIGHT = _core_.CURSOR_POINT_RIGHT
689CURSOR_QUESTION_ARROW = _core_.CURSOR_QUESTION_ARROW
690CURSOR_RIGHT_BUTTON = _core_.CURSOR_RIGHT_BUTTON
691CURSOR_SIZENESW = _core_.CURSOR_SIZENESW
692CURSOR_SIZENS = _core_.CURSOR_SIZENS
693CURSOR_SIZENWSE = _core_.CURSOR_SIZENWSE
694CURSOR_SIZEWE = _core_.CURSOR_SIZEWE
695CURSOR_SIZING = _core_.CURSOR_SIZING
696CURSOR_SPRAYCAN = _core_.CURSOR_SPRAYCAN
697CURSOR_WAIT = _core_.CURSOR_WAIT
698CURSOR_WATCH = _core_.CURSOR_WATCH
699CURSOR_BLANK = _core_.CURSOR_BLANK
700CURSOR_DEFAULT = _core_.CURSOR_DEFAULT
701CURSOR_COPY_ARROW = _core_.CURSOR_COPY_ARROW
702CURSOR_ARROWWAIT = _core_.CURSOR_ARROWWAIT
703CURSOR_MAX = _core_.CURSOR_MAX
d14a1e28
RD
704#---------------------------------------------------------------------------
705
706class Size(object):
0df68c9f 707 """
41e2b43e 708 wx.Size is a useful data structure used to represent the size of
093d3ff1
RD
709 something. It simply contians integer width and height
710 proprtites. In most places in wxPython where a wx.Size is
711 expected a (width, height) tuple can be used instead.
0df68c9f 712 """
e811c8ce
RD
713 def __repr__(self):
714 return "<%s.%s; proxy of C++ wxSize instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
54f9ee45
RD
715 width = property(_core_.Size_width_get, _core_.Size_width_set)
716 height = property(_core_.Size_height_get, _core_.Size_height_set)
242b7b46 717 x = width; y = height
d14a1e28 718 def __init__(self, *args, **kwargs):
0df68c9f 719 """
a95a7133 720 __init__(self, int w=0, int h=0) -> Size
e811c8ce 721
0df68c9f
RD
722 Creates a size object.
723 """
54f9ee45 724 newobj = _core_.new_Size(*args, **kwargs)
d14a1e28
RD
725 self.this = newobj.this
726 self.thisown = 1
727 del newobj.thisown
54f9ee45 728 def __del__(self, destroy=_core_.delete_Size):
a95a7133 729 """__del__(self)"""
d14a1e28
RD
730 try:
731 if self.thisown: destroy(self)
732 except: pass
e811c8ce
RD
733
734 def __eq__(*args, **kwargs):
0df68c9f 735 """
a95a7133 736 __eq__(self, Size sz) -> bool
e811c8ce 737
0df68c9f
RD
738 Test for equality of wx.Size objects.
739 """
54f9ee45 740 return _core_.Size___eq__(*args, **kwargs)
e811c8ce
RD
741
742 def __ne__(*args, **kwargs):
0df68c9f 743 """
a95a7133 744 __ne__(self, Size sz) -> bool
e811c8ce 745
0df68c9f
RD
746 Test for inequality.
747 """
54f9ee45 748 return _core_.Size___ne__(*args, **kwargs)
e811c8ce
RD
749
750 def __add__(*args, **kwargs):
0df68c9f 751 """
a95a7133 752 __add__(self, Size sz) -> Size
e811c8ce 753
0df68c9f
RD
754 Add sz's proprties to this and return the result.
755 """
54f9ee45 756 return _core_.Size___add__(*args, **kwargs)
e811c8ce
RD
757
758 def __sub__(*args, **kwargs):
0df68c9f 759 """
a95a7133 760 __sub__(self, Size sz) -> Size
e811c8ce 761
0df68c9f
RD
762 Subtract sz's properties from this and return the result.
763 """
54f9ee45 764 return _core_.Size___sub__(*args, **kwargs)
e811c8ce
RD
765
766 def IncTo(*args, **kwargs):
0df68c9f 767 """
a95a7133 768 IncTo(self, Size sz)
e811c8ce 769
0df68c9f
RD
770 Increments this object so that both of its dimensions are not less
771 than the corresponding dimensions of the size.
772 """
54f9ee45 773 return _core_.Size_IncTo(*args, **kwargs)
e811c8ce
RD
774
775 def DecTo(*args, **kwargs):
0df68c9f 776 """
a95a7133 777 DecTo(self, Size sz)
e811c8ce 778
0df68c9f
RD
779 Decrements this object so that both of its dimensions are not greater
780 than the corresponding dimensions of the size.
781 """
54f9ee45 782 return _core_.Size_DecTo(*args, **kwargs)
e811c8ce
RD
783
784 def Set(*args, **kwargs):
0df68c9f 785 """
a95a7133 786 Set(self, int w, int h)
e811c8ce 787
0df68c9f
RD
788 Set both width and height.
789 """
54f9ee45 790 return _core_.Size_Set(*args, **kwargs)
e811c8ce
RD
791
792 def SetWidth(*args, **kwargs):
a95a7133 793 """SetWidth(self, int w)"""
54f9ee45 794 return _core_.Size_SetWidth(*args, **kwargs)
e811c8ce
RD
795
796 def SetHeight(*args, **kwargs):
a95a7133 797 """SetHeight(self, int h)"""
54f9ee45 798 return _core_.Size_SetHeight(*args, **kwargs)
e811c8ce
RD
799
800 def GetWidth(*args, **kwargs):
a95a7133 801 """GetWidth(self) -> int"""
54f9ee45 802 return _core_.Size_GetWidth(*args, **kwargs)
e811c8ce
RD
803
804 def GetHeight(*args, **kwargs):
a95a7133 805 """GetHeight(self) -> int"""
54f9ee45 806 return _core_.Size_GetHeight(*args, **kwargs)
e811c8ce 807
74a57fcd
RD
808 def IsFullySpecified(*args, **kwargs):
809 """
a95a7133 810 IsFullySpecified(self) -> bool
74a57fcd
RD
811
812 Returns True if both components of the size are non-default values.
813 """
54f9ee45 814 return _core_.Size_IsFullySpecified(*args, **kwargs)
74a57fcd
RD
815
816 def SetDefaults(*args, **kwargs):
817 """
a95a7133 818 SetDefaults(self, Size size)
74a57fcd 819
41e2b43e
RD
820 Combine this size with the other one replacing the default components
821 of this object (i.e. equal to -1) with those of the other.
74a57fcd 822 """
54f9ee45 823 return _core_.Size_SetDefaults(*args, **kwargs)
74a57fcd 824
e811c8ce 825 def Get(*args, **kwargs):
0df68c9f
RD
826 """
827 Get() -> (width,height)
e811c8ce 828
0df68c9f
RD
829 Returns the width and height properties as a tuple.
830 """
54f9ee45 831 return _core_.Size_Get(*args, **kwargs)
e811c8ce 832
41e2b43e 833 asTuple = wx._deprecated(Get, "asTuple is deprecated, use `Get` instead")
e811c8ce
RD
834 def __str__(self): return str(self.Get())
835 def __repr__(self): return 'wx.Size'+str(self.Get())
836 def __len__(self): return len(self.Get())
837 def __getitem__(self, index): return self.Get()[index]
d14a1e28
RD
838 def __setitem__(self, index, val):
839 if index == 0: self.width = val
840 elif index == 1: self.height = val
841 else: raise IndexError
e811c8ce 842 def __nonzero__(self): return self.Get() != (0,0)
74e96f3d
RD
843 __safe_for_unpickling__ = True
844 def __reduce__(self): return (wx.Size, self.Get())
d14a1e28
RD
845
846
847class SizePtr(Size):
848 def __init__(self, this):
849 self.this = this
850 if not hasattr(self,"thisown"): self.thisown = 0
851 self.__class__ = Size
54f9ee45 852_core_.Size_swigregister(SizePtr)
d14a1e28
RD
853
854#---------------------------------------------------------------------------
855
856class RealPoint(object):
0df68c9f 857 """
41e2b43e
RD
858 A data structure for representing a point or position with floating
859 point x and y properties. In wxPython most places that expect a
860 wx.RealPoint can also accept a (x,y) tuple.
0df68c9f 861 """
e811c8ce
RD
862 def __repr__(self):
863 return "<%s.%s; proxy of C++ wxRealPoint instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
54f9ee45
RD
864 x = property(_core_.RealPoint_x_get, _core_.RealPoint_x_set)
865 y = property(_core_.RealPoint_y_get, _core_.RealPoint_y_set)
d14a1e28 866 def __init__(self, *args, **kwargs):
0df68c9f 867 """
a95a7133 868 __init__(self, double x=0.0, double y=0.0) -> RealPoint
e811c8ce 869
0df68c9f
RD
870 Create a wx.RealPoint object
871 """
54f9ee45 872 newobj = _core_.new_RealPoint(*args, **kwargs)
d14a1e28
RD
873 self.this = newobj.this
874 self.thisown = 1
875 del newobj.thisown
54f9ee45 876 def __del__(self, destroy=_core_.delete_RealPoint):
a95a7133 877 """__del__(self)"""
d14a1e28
RD
878 try:
879 if self.thisown: destroy(self)
880 except: pass
e811c8ce
RD
881
882 def __eq__(*args, **kwargs):
0df68c9f 883 """
a95a7133 884 __eq__(self, RealPoint pt) -> bool
e811c8ce 885
0df68c9f
RD
886 Test for equality of wx.RealPoint objects.
887 """
54f9ee45 888 return _core_.RealPoint___eq__(*args, **kwargs)
e811c8ce
RD
889
890 def __ne__(*args, **kwargs):
0df68c9f 891 """
a95a7133 892 __ne__(self, RealPoint pt) -> bool
e811c8ce 893
0df68c9f
RD
894 Test for inequality of wx.RealPoint objects.
895 """
54f9ee45 896 return _core_.RealPoint___ne__(*args, **kwargs)
e811c8ce
RD
897
898 def __add__(*args, **kwargs):
0df68c9f 899 """
a95a7133 900 __add__(self, RealPoint pt) -> RealPoint
e811c8ce 901
0df68c9f
RD
902 Add pt's proprties to this and return the result.
903 """
54f9ee45 904 return _core_.RealPoint___add__(*args, **kwargs)
e811c8ce
RD
905
906 def __sub__(*args, **kwargs):
0df68c9f 907 """
a95a7133 908 __sub__(self, RealPoint pt) -> RealPoint
e811c8ce 909
0df68c9f
RD
910 Subtract pt's proprties from this and return the result
911 """
54f9ee45 912 return _core_.RealPoint___sub__(*args, **kwargs)
e811c8ce
RD
913
914 def Set(*args, **kwargs):
0df68c9f 915 """
a95a7133 916 Set(self, double x, double y)
e811c8ce 917
0df68c9f
RD
918 Set both the x and y properties
919 """
54f9ee45 920 return _core_.RealPoint_Set(*args, **kwargs)
e811c8ce
RD
921
922 def Get(*args, **kwargs):
0df68c9f
RD
923 """
924 Get() -> (x,y)
e811c8ce 925
0df68c9f
RD
926 Return the x and y properties as a tuple.
927 """
54f9ee45 928 return _core_.RealPoint_Get(*args, **kwargs)
e811c8ce 929
41e2b43e 930 asTuple = wx._deprecated(Get, "asTuple is deprecated, use `Get` instead")
e811c8ce
RD
931 def __str__(self): return str(self.Get())
932 def __repr__(self): return 'wx.RealPoint'+str(self.Get())
933 def __len__(self): return len(self.Get())
934 def __getitem__(self, index): return self.Get()[index]
d14a1e28 935 def __setitem__(self, index, val):
e811c8ce
RD
936 if index == 0: self.x = val
937 elif index == 1: self.y = val
d14a1e28 938 else: raise IndexError
e811c8ce 939 def __nonzero__(self): return self.Get() != (0.0, 0.0)
74e96f3d
RD
940 __safe_for_unpickling__ = True
941 def __reduce__(self): return (wx.RealPoint, self.Get())
d14a1e28
RD
942
943
944class RealPointPtr(RealPoint):
945 def __init__(self, this):
946 self.this = this
947 if not hasattr(self,"thisown"): self.thisown = 0
948 self.__class__ = RealPoint
54f9ee45 949_core_.RealPoint_swigregister(RealPointPtr)
d14a1e28
RD
950
951#---------------------------------------------------------------------------
952
953class Point(object):
0df68c9f 954 """
41e2b43e
RD
955 A data structure for representing a point or position with integer x
956 and y properties. Most places in wxPython that expect a wx.Point can
957 also accept a (x,y) tuple.
0df68c9f 958 """
e811c8ce
RD
959 def __repr__(self):
960 return "<%s.%s; proxy of C++ wxPoint instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
54f9ee45
RD
961 x = property(_core_.Point_x_get, _core_.Point_x_set)
962 y = property(_core_.Point_y_get, _core_.Point_y_set)
d14a1e28 963 def __init__(self, *args, **kwargs):
0df68c9f 964 """
a95a7133 965 __init__(self, int x=0, int y=0) -> Point
e811c8ce 966
0df68c9f
RD
967 Create a wx.Point object
968 """
54f9ee45 969 newobj = _core_.new_Point(*args, **kwargs)
d14a1e28
RD
970 self.this = newobj.this
971 self.thisown = 1
972 del newobj.thisown
54f9ee45 973 def __del__(self, destroy=_core_.delete_Point):
a95a7133 974 """__del__(self)"""
d14a1e28
RD
975 try:
976 if self.thisown: destroy(self)
977 except: pass
e811c8ce
RD
978
979 def __eq__(*args, **kwargs):
0df68c9f 980 """
a95a7133 981 __eq__(self, Point pt) -> bool
e811c8ce 982
0df68c9f
RD
983 Test for equality of wx.Point objects.
984 """
54f9ee45 985 return _core_.Point___eq__(*args, **kwargs)
e811c8ce
RD
986
987 def __ne__(*args, **kwargs):
0df68c9f 988 """
a95a7133 989 __ne__(self, Point pt) -> bool
e811c8ce 990
0df68c9f
RD
991 Test for inequality of wx.Point objects.
992 """
54f9ee45 993 return _core_.Point___ne__(*args, **kwargs)
e811c8ce
RD
994
995 def __add__(*args, **kwargs):
0df68c9f 996 """
a95a7133 997 __add__(self, Point pt) -> Point
e811c8ce 998
0df68c9f
RD
999 Add pt's proprties to this and return the result.
1000 """
54f9ee45 1001 return _core_.Point___add__(*args, **kwargs)
e811c8ce
RD
1002
1003 def __sub__(*args, **kwargs):
0df68c9f 1004 """
a95a7133 1005 __sub__(self, Point pt) -> Point
e811c8ce 1006
0df68c9f
RD
1007 Subtract pt's proprties from this and return the result
1008 """
54f9ee45 1009 return _core_.Point___sub__(*args, **kwargs)
e811c8ce
RD
1010
1011 def __iadd__(*args, **kwargs):
0df68c9f 1012 """
a95a7133 1013 __iadd__(self, Point pt) -> Point
e811c8ce 1014
0df68c9f
RD
1015 Add pt to this object.
1016 """
54f9ee45 1017 return _core_.Point___iadd__(*args, **kwargs)
e811c8ce
RD
1018
1019 def __isub__(*args, **kwargs):
0df68c9f 1020 """
a95a7133 1021 __isub__(self, Point pt) -> Point
e811c8ce 1022
0df68c9f
RD
1023 Subtract pt from this object.
1024 """
54f9ee45 1025 return _core_.Point___isub__(*args, **kwargs)
e811c8ce
RD
1026
1027 def Set(*args, **kwargs):
0df68c9f 1028 """
a95a7133 1029 Set(self, long x, long y)
e811c8ce 1030
0df68c9f
RD
1031 Set both the x and y properties
1032 """
54f9ee45 1033 return _core_.Point_Set(*args, **kwargs)
e811c8ce
RD
1034
1035 def Get(*args, **kwargs):
0df68c9f
RD
1036 """
1037 Get() -> (x,y)
e811c8ce 1038
0df68c9f
RD
1039 Return the x and y properties as a tuple.
1040 """
54f9ee45 1041 return _core_.Point_Get(*args, **kwargs)
e811c8ce 1042
41e2b43e 1043 asTuple = wx._deprecated(Get, "asTuple is deprecated, use `Get` instead")
e811c8ce
RD
1044 def __str__(self): return str(self.Get())
1045 def __repr__(self): return 'wx.Point'+str(self.Get())
1046 def __len__(self): return len(self.Get())
1047 def __getitem__(self, index): return self.Get()[index]
d14a1e28
RD
1048 def __setitem__(self, index, val):
1049 if index == 0: self.x = val
1050 elif index == 1: self.y = val
1051 else: raise IndexError
e811c8ce 1052 def __nonzero__(self): return self.Get() != (0,0)
74e96f3d
RD
1053 __safe_for_unpickling__ = True
1054 def __reduce__(self): return (wx.Point, self.Get())
d14a1e28
RD
1055
1056
1057class PointPtr(Point):
1058 def __init__(self, this):
1059 self.this = this
1060 if not hasattr(self,"thisown"): self.thisown = 0
1061 self.__class__ = Point
54f9ee45 1062_core_.Point_swigregister(PointPtr)
d14a1e28
RD
1063
1064#---------------------------------------------------------------------------
1065
1066class Rect(object):
0df68c9f 1067 """
41e2b43e
RD
1068 A class for representing and manipulating rectangles. It has x, y,
1069 width and height properties. In wxPython most palces that expect a
1070 wx.Rect can also accept a (x,y,width,height) tuple.
0df68c9f 1071 """
e811c8ce
RD
1072 def __repr__(self):
1073 return "<%s.%s; proxy of C++ wxRect instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 1074 def __init__(self, *args, **kwargs):
0df68c9f 1075 """
a95a7133 1076 __init__(self, int x=0, int y=0, int width=0, int height=0) -> Rect
e811c8ce 1077
0df68c9f
RD
1078 Create a new Rect object.
1079 """
54f9ee45 1080 newobj = _core_.new_Rect(*args, **kwargs)
d14a1e28
RD
1081 self.this = newobj.this
1082 self.thisown = 1
1083 del newobj.thisown
54f9ee45 1084 def __del__(self, destroy=_core_.delete_Rect):
a95a7133 1085 """__del__(self)"""
d14a1e28
RD
1086 try:
1087 if self.thisown: destroy(self)
1088 except: pass
e811c8ce
RD
1089
1090 def GetX(*args, **kwargs):
a95a7133 1091 """GetX(self) -> int"""
54f9ee45 1092 return _core_.Rect_GetX(*args, **kwargs)
e811c8ce
RD
1093
1094 def SetX(*args, **kwargs):
a95a7133 1095 """SetX(self, int x)"""
54f9ee45 1096 return _core_.Rect_SetX(*args, **kwargs)
e811c8ce
RD
1097
1098 def GetY(*args, **kwargs):
a95a7133 1099 """GetY(self) -> int"""
54f9ee45 1100 return _core_.Rect_GetY(*args, **kwargs)
e811c8ce
RD
1101
1102 def SetY(*args, **kwargs):
a95a7133 1103 """SetY(self, int y)"""
54f9ee45 1104 return _core_.Rect_SetY(*args, **kwargs)
e811c8ce
RD
1105
1106 def GetWidth(*args, **kwargs):
a95a7133 1107 """GetWidth(self) -> int"""
54f9ee45 1108 return _core_.Rect_GetWidth(*args, **kwargs)
e811c8ce
RD
1109
1110 def SetWidth(*args, **kwargs):
a95a7133 1111 """SetWidth(self, int w)"""
54f9ee45 1112 return _core_.Rect_SetWidth(*args, **kwargs)
e811c8ce
RD
1113
1114 def GetHeight(*args, **kwargs):
a95a7133 1115 """GetHeight(self) -> int"""
54f9ee45 1116 return _core_.Rect_GetHeight(*args, **kwargs)
e811c8ce
RD
1117
1118 def SetHeight(*args, **kwargs):
a95a7133 1119 """SetHeight(self, int h)"""
54f9ee45 1120 return _core_.Rect_SetHeight(*args, **kwargs)
e811c8ce
RD
1121
1122 def GetPosition(*args, **kwargs):
a95a7133 1123 """GetPosition(self) -> Point"""
54f9ee45 1124 return _core_.Rect_GetPosition(*args, **kwargs)
e811c8ce
RD
1125
1126 def SetPosition(*args, **kwargs):
a95a7133 1127 """SetPosition(self, Point p)"""
54f9ee45 1128 return _core_.Rect_SetPosition(*args, **kwargs)
e811c8ce
RD
1129
1130 def GetSize(*args, **kwargs):
a95a7133 1131 """GetSize(self) -> Size"""
54f9ee45 1132 return _core_.Rect_GetSize(*args, **kwargs)
e811c8ce
RD
1133
1134 def SetSize(*args, **kwargs):
a95a7133 1135 """SetSize(self, Size s)"""
54f9ee45 1136 return _core_.Rect_SetSize(*args, **kwargs)
e811c8ce 1137
c9c7117a 1138 def GetTopLeft(*args, **kwargs):
a95a7133 1139 """GetTopLeft(self) -> Point"""
54f9ee45 1140 return _core_.Rect_GetTopLeft(*args, **kwargs)
c9c7117a
RD
1141
1142 def SetTopLeft(*args, **kwargs):
a95a7133 1143 """SetTopLeft(self, Point p)"""
54f9ee45 1144 return _core_.Rect_SetTopLeft(*args, **kwargs)
c9c7117a
RD
1145
1146 def GetBottomRight(*args, **kwargs):
a95a7133 1147 """GetBottomRight(self) -> Point"""
54f9ee45 1148 return _core_.Rect_GetBottomRight(*args, **kwargs)
c9c7117a
RD
1149
1150 def SetBottomRight(*args, **kwargs):
a95a7133 1151 """SetBottomRight(self, Point p)"""
54f9ee45 1152 return _core_.Rect_SetBottomRight(*args, **kwargs)
c9c7117a 1153
e811c8ce 1154 def GetLeft(*args, **kwargs):
a95a7133 1155 """GetLeft(self) -> int"""
54f9ee45 1156 return _core_.Rect_GetLeft(*args, **kwargs)
e811c8ce
RD
1157
1158 def GetTop(*args, **kwargs):
a95a7133 1159 """GetTop(self) -> int"""
54f9ee45 1160 return _core_.Rect_GetTop(*args, **kwargs)
e811c8ce
RD
1161
1162 def GetBottom(*args, **kwargs):
a95a7133 1163 """GetBottom(self) -> int"""
54f9ee45 1164 return _core_.Rect_GetBottom(*args, **kwargs)
e811c8ce
RD
1165
1166 def GetRight(*args, **kwargs):
a95a7133 1167 """GetRight(self) -> int"""
54f9ee45 1168 return _core_.Rect_GetRight(*args, **kwargs)
e811c8ce
RD
1169
1170 def SetLeft(*args, **kwargs):
a95a7133 1171 """SetLeft(self, int left)"""
54f9ee45 1172 return _core_.Rect_SetLeft(*args, **kwargs)
e811c8ce
RD
1173
1174 def SetRight(*args, **kwargs):
a95a7133 1175 """SetRight(self, int right)"""
54f9ee45 1176 return _core_.Rect_SetRight(*args, **kwargs)
e811c8ce
RD
1177
1178 def SetTop(*args, **kwargs):
a95a7133 1179 """SetTop(self, int top)"""
54f9ee45 1180 return _core_.Rect_SetTop(*args, **kwargs)
e811c8ce
RD
1181
1182 def SetBottom(*args, **kwargs):
a95a7133 1183 """SetBottom(self, int bottom)"""
54f9ee45 1184 return _core_.Rect_SetBottom(*args, **kwargs)
e811c8ce
RD
1185
1186 position = property(GetPosition, SetPosition)
1187 size = property(GetSize, SetSize)
1188 left = property(GetLeft, SetLeft)
1189 right = property(GetRight, SetRight)
1190 top = property(GetTop, SetTop)
1191 bottom = property(GetBottom, SetBottom)
1192
1193 def Inflate(*args, **kwargs):
0df68c9f 1194 """
a95a7133 1195 Inflate(self, int dx, int dy) -> Rect
e811c8ce 1196
41e2b43e 1197 Increase the rectangle size by dx in x direction and dy in y
5cbf236d 1198 direction. Both (or one of) parameters may be negative to decrease the
41e2b43e 1199 rectangle size.
0df68c9f 1200 """
54f9ee45 1201 return _core_.Rect_Inflate(*args, **kwargs)
e811c8ce
RD
1202
1203 def Deflate(*args, **kwargs):
0df68c9f 1204 """
a95a7133 1205 Deflate(self, int dx, int dy) -> Rect
e811c8ce 1206
41e2b43e 1207 Decrease the rectangle size by dx in x direction and dy in y
5cbf236d 1208 direction. Both (or one of) parameters may be negative to increase the
41e2b43e 1209 rectngle size. This method is the opposite of Inflate.
0df68c9f 1210 """
54f9ee45 1211 return _core_.Rect_Deflate(*args, **kwargs)
e811c8ce
RD
1212
1213 def OffsetXY(*args, **kwargs):
0df68c9f 1214 """
a95a7133 1215 OffsetXY(self, int dx, int dy)
e811c8ce 1216
41e2b43e
RD
1217 Moves the rectangle by the specified offset. If dx is positive, the
1218 rectangle is moved to the right, if dy is positive, it is moved to the
1219 bottom, otherwise it is moved to the left or top respectively.
0df68c9f 1220 """
54f9ee45 1221 return _core_.Rect_OffsetXY(*args, **kwargs)
e811c8ce
RD
1222
1223 def Offset(*args, **kwargs):
0df68c9f 1224 """
a95a7133 1225 Offset(self, Point pt)
e811c8ce 1226
0df68c9f
RD
1227 Same as OffsetXY but uses dx,dy from Point
1228 """
54f9ee45 1229 return _core_.Rect_Offset(*args, **kwargs)
e811c8ce
RD
1230
1231 def Intersect(*args, **kwargs):
0df68c9f 1232 """
a95a7133 1233 Intersect(self, Rect rect) -> Rect
e811c8ce 1234
5cbf236d 1235 Returns the intersectsion of this rectangle and rect.
0df68c9f 1236 """
54f9ee45 1237 return _core_.Rect_Intersect(*args, **kwargs)
e811c8ce 1238
5cbf236d
RD
1239 def Union(*args, **kwargs):
1240 """
1241 Union(self, Rect rect) -> Rect
1242
1243 Returns the union of this rectangle and rect.
1244 """
1245 return _core_.Rect_Union(*args, **kwargs)
1246
e811c8ce 1247 def __add__(*args, **kwargs):
0df68c9f 1248 """
a95a7133 1249 __add__(self, Rect rect) -> Rect
e811c8ce 1250
0df68c9f
RD
1251 Add the properties of rect to this rectangle and return the result.
1252 """
54f9ee45 1253 return _core_.Rect___add__(*args, **kwargs)
e811c8ce
RD
1254
1255 def __iadd__(*args, **kwargs):
0df68c9f 1256 """
a95a7133 1257 __iadd__(self, Rect rect) -> Rect
e811c8ce 1258
0df68c9f
RD
1259 Add the properties of rect to this rectangle, updating this rectangle.
1260 """
54f9ee45 1261 return _core_.Rect___iadd__(*args, **kwargs)
e811c8ce
RD
1262
1263 def __eq__(*args, **kwargs):
0df68c9f 1264 """
a95a7133 1265 __eq__(self, Rect rect) -> bool
e811c8ce 1266
0df68c9f
RD
1267 Test for equality.
1268 """
54f9ee45 1269 return _core_.Rect___eq__(*args, **kwargs)
e811c8ce
RD
1270
1271 def __ne__(*args, **kwargs):
0df68c9f 1272 """
a95a7133 1273 __ne__(self, Rect rect) -> bool
e811c8ce 1274
0df68c9f
RD
1275 Test for inequality.
1276 """
54f9ee45 1277 return _core_.Rect___ne__(*args, **kwargs)
e811c8ce
RD
1278
1279 def InsideXY(*args, **kwargs):
0df68c9f 1280 """
a95a7133 1281 InsideXY(self, int x, int y) -> bool
e811c8ce 1282
0df68c9f
RD
1283 Return True if the point is (not strcitly) inside the rect.
1284 """
54f9ee45 1285 return _core_.Rect_InsideXY(*args, **kwargs)
e811c8ce
RD
1286
1287 def Inside(*args, **kwargs):
0df68c9f 1288 """
a95a7133 1289 Inside(self, Point pt) -> bool
e811c8ce 1290
0df68c9f
RD
1291 Return True if the point is (not strcitly) inside the rect.
1292 """
54f9ee45 1293 return _core_.Rect_Inside(*args, **kwargs)
e811c8ce
RD
1294
1295 def Intersects(*args, **kwargs):
0df68c9f 1296 """
a95a7133 1297 Intersects(self, Rect rect) -> bool
e811c8ce 1298
0df68c9f
RD
1299 Returns True if the rectangles have a non empty intersection.
1300 """
54f9ee45 1301 return _core_.Rect_Intersects(*args, **kwargs)
e811c8ce 1302
54f9ee45
RD
1303 x = property(_core_.Rect_x_get, _core_.Rect_x_set)
1304 y = property(_core_.Rect_y_get, _core_.Rect_y_set)
1305 width = property(_core_.Rect_width_get, _core_.Rect_width_set)
1306 height = property(_core_.Rect_height_get, _core_.Rect_height_set)
e811c8ce 1307 def Set(*args, **kwargs):
0df68c9f 1308 """
a95a7133 1309 Set(self, int x=0, int y=0, int width=0, int height=0)
e811c8ce 1310
0df68c9f
RD
1311 Set all rectangle properties.
1312 """
54f9ee45 1313 return _core_.Rect_Set(*args, **kwargs)
e811c8ce
RD
1314
1315 def Get(*args, **kwargs):
0df68c9f
RD
1316 """
1317 Get() -> (x,y,width,height)
e811c8ce 1318
0df68c9f
RD
1319 Return the rectangle properties as a tuple.
1320 """
54f9ee45 1321 return _core_.Rect_Get(*args, **kwargs)
e811c8ce 1322
41e2b43e 1323 asTuple = wx._deprecated(Get, "asTuple is deprecated, use `Get` instead")
e811c8ce
RD
1324 def __str__(self): return str(self.Get())
1325 def __repr__(self): return 'wx.Rect'+str(self.Get())
1326 def __len__(self): return len(self.Get())
1327 def __getitem__(self, index): return self.Get()[index]
d14a1e28
RD
1328 def __setitem__(self, index, val):
1329 if index == 0: self.x = val
1330 elif index == 1: self.y = val
1331 elif index == 2: self.width = val
1332 elif index == 3: self.height = val
1333 else: raise IndexError
e811c8ce 1334 def __nonzero__(self): return self.Get() != (0,0,0,0)
74e96f3d
RD
1335 __safe_for_unpickling__ = True
1336 def __reduce__(self): return (wx.Rect, self.Get())
d14a1e28
RD
1337
1338
1339class RectPtr(Rect):
1340 def __init__(self, this):
1341 self.this = this
1342 if not hasattr(self,"thisown"): self.thisown = 0
1343 self.__class__ = Rect
54f9ee45 1344_core_.Rect_swigregister(RectPtr)
d14a1e28
RD
1345
1346def RectPP(*args, **kwargs):
0df68c9f
RD
1347 """
1348 RectPP(Point topLeft, Point bottomRight) -> Rect
e811c8ce 1349
0df68c9f
RD
1350 Create a new Rect object from Points representing two corners.
1351 """
54f9ee45 1352 val = _core_.new_RectPP(*args, **kwargs)
d14a1e28
RD
1353 val.thisown = 1
1354 return val
1355
1356def RectPS(*args, **kwargs):
0df68c9f
RD
1357 """
1358 RectPS(Point pos, Size size) -> Rect
e811c8ce 1359
0df68c9f
RD
1360 Create a new Rect from a position and size.
1361 """
54f9ee45 1362 val = _core_.new_RectPS(*args, **kwargs)
d14a1e28
RD
1363 val.thisown = 1
1364 return val
1365
d3b6e4ff
RD
1366def RectS(*args, **kwargs):
1367 """
1368 RectS(Size size) -> Rect
1369
1370 Create a new Rect from a size only.
1371 """
1372 val = _core_.new_RectS(*args, **kwargs)
1373 val.thisown = 1
1374 return val
1375
d14a1e28 1376
e811c8ce 1377def IntersectRect(*args, **kwargs):
0df68c9f
RD
1378 """
1379 IntersectRect(Rect r1, Rect r2) -> Rect
e811c8ce 1380
0df68c9f
RD
1381 Calculate and return the intersection of r1 and r2.
1382 """
54f9ee45 1383 return _core_.IntersectRect(*args, **kwargs)
d14a1e28
RD
1384#---------------------------------------------------------------------------
1385
1386class Point2D(object):
41e2b43e
RD
1387 """
1388 wx.Point2Ds represent a point or a vector in a 2d coordinate system
1389 with floating point values.
1390 """
e811c8ce
RD
1391 def __repr__(self):
1392 return "<%s.%s; proxy of C++ wxPoint2D instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 1393 def __init__(self, *args, **kwargs):
0df68c9f 1394 """
a95a7133 1395 __init__(self, double x=0.0, double y=0.0) -> Point2D
e811c8ce 1396
0df68c9f
RD
1397 Create a w.Point2D object.
1398 """
54f9ee45 1399 newobj = _core_.new_Point2D(*args, **kwargs)
d14a1e28
RD
1400 self.this = newobj.this
1401 self.thisown = 1
1402 del newobj.thisown
e811c8ce 1403 def GetFloor(*args, **kwargs):
fd2dc343
RD
1404 """
1405 GetFloor() -> (x,y)
1406
1407 Convert to integer
1408 """
54f9ee45 1409 return _core_.Point2D_GetFloor(*args, **kwargs)
e811c8ce
RD
1410
1411 def GetRounded(*args, **kwargs):
fd2dc343
RD
1412 """
1413 GetRounded() -> (x,y)
1414
1415 Convert to integer
1416 """
54f9ee45 1417 return _core_.Point2D_GetRounded(*args, **kwargs)
e811c8ce
RD
1418
1419 def GetVectorLength(*args, **kwargs):
a95a7133 1420 """GetVectorLength(self) -> double"""
54f9ee45 1421 return _core_.Point2D_GetVectorLength(*args, **kwargs)
e811c8ce
RD
1422
1423 def GetVectorAngle(*args, **kwargs):
a95a7133 1424 """GetVectorAngle(self) -> double"""
54f9ee45 1425 return _core_.Point2D_GetVectorAngle(*args, **kwargs)
e811c8ce
RD
1426
1427 def SetVectorLength(*args, **kwargs):
a95a7133 1428 """SetVectorLength(self, double length)"""
54f9ee45 1429 return _core_.Point2D_SetVectorLength(*args, **kwargs)
e811c8ce
RD
1430
1431 def SetVectorAngle(*args, **kwargs):
a95a7133 1432 """SetVectorAngle(self, double degrees)"""
54f9ee45 1433 return _core_.Point2D_SetVectorAngle(*args, **kwargs)
e811c8ce 1434
d14a1e28
RD
1435 def SetPolarCoordinates(self, angle, length):
1436 self.SetVectorLength(length)
1437 self.SetVectorAngle(angle)
1438 def Normalize(self):
1439 self.SetVectorLength(1.0)
1440
e811c8ce 1441 def GetDistance(*args, **kwargs):
a95a7133 1442 """GetDistance(self, Point2D pt) -> double"""
54f9ee45 1443 return _core_.Point2D_GetDistance(*args, **kwargs)
e811c8ce
RD
1444
1445 def GetDistanceSquare(*args, **kwargs):
a95a7133 1446 """GetDistanceSquare(self, Point2D pt) -> double"""
54f9ee45 1447 return _core_.Point2D_GetDistanceSquare(*args, **kwargs)
e811c8ce
RD
1448
1449 def GetDotProduct(*args, **kwargs):
a95a7133 1450 """GetDotProduct(self, Point2D vec) -> double"""
54f9ee45 1451 return _core_.Point2D_GetDotProduct(*args, **kwargs)
e811c8ce
RD
1452
1453 def GetCrossProduct(*args, **kwargs):
a95a7133 1454 """GetCrossProduct(self, Point2D vec) -> double"""
54f9ee45 1455 return _core_.Point2D_GetCrossProduct(*args, **kwargs)
e811c8ce
RD
1456
1457 def __neg__(*args, **kwargs):
0df68c9f 1458 """
a95a7133 1459 __neg__(self) -> Point2D
e811c8ce 1460
0df68c9f
RD
1461 the reflection of this point
1462 """
54f9ee45 1463 return _core_.Point2D___neg__(*args, **kwargs)
e811c8ce
RD
1464
1465 def __iadd__(*args, **kwargs):
a95a7133 1466 """__iadd__(self, Point2D pt) -> Point2D"""
54f9ee45 1467 return _core_.Point2D___iadd__(*args, **kwargs)
e811c8ce
RD
1468
1469 def __isub__(*args, **kwargs):
a95a7133 1470 """__isub__(self, Point2D pt) -> Point2D"""
54f9ee45 1471 return _core_.Point2D___isub__(*args, **kwargs)
e811c8ce
RD
1472
1473 def __imul__(*args, **kwargs):
a95a7133 1474 """__imul__(self, Point2D pt) -> Point2D"""
54f9ee45 1475 return _core_.Point2D___imul__(*args, **kwargs)
e811c8ce
RD
1476
1477 def __idiv__(*args, **kwargs):
a95a7133 1478 """__idiv__(self, Point2D pt) -> Point2D"""
54f9ee45 1479 return _core_.Point2D___idiv__(*args, **kwargs)
e811c8ce
RD
1480
1481 def __eq__(*args, **kwargs):
0df68c9f 1482 """
a95a7133 1483 __eq__(self, Point2D pt) -> bool
e811c8ce 1484
0df68c9f
RD
1485 Test for equality
1486 """
54f9ee45 1487 return _core_.Point2D___eq__(*args, **kwargs)
e811c8ce
RD
1488
1489 def __ne__(*args, **kwargs):
0df68c9f 1490 """
a95a7133 1491 __ne__(self, Point2D pt) -> bool
e811c8ce 1492
0df68c9f
RD
1493 Test for inequality
1494 """
54f9ee45 1495 return _core_.Point2D___ne__(*args, **kwargs)
e811c8ce 1496
54f9ee45
RD
1497 x = property(_core_.Point2D_x_get, _core_.Point2D_x_set)
1498 y = property(_core_.Point2D_y_get, _core_.Point2D_y_set)
e811c8ce 1499 def Set(*args, **kwargs):
a95a7133 1500 """Set(self, double x=0, double y=0)"""
54f9ee45 1501 return _core_.Point2D_Set(*args, **kwargs)
e811c8ce
RD
1502
1503 def Get(*args, **kwargs):
0df68c9f
RD
1504 """
1505 Get() -> (x,y)
e811c8ce 1506
0df68c9f
RD
1507 Return x and y properties as a tuple.
1508 """
54f9ee45 1509 return _core_.Point2D_Get(*args, **kwargs)
e811c8ce 1510
41e2b43e 1511 asTuple = wx._deprecated(Get, "asTuple is deprecated, use `Get` instead")
e811c8ce
RD
1512 def __str__(self): return str(self.Get())
1513 def __repr__(self): return 'wx.Point2D'+str(self.Get())
1514 def __len__(self): return len(self.Get())
1515 def __getitem__(self, index): return self.Get()[index]
d14a1e28 1516 def __setitem__(self, index, val):
e811c8ce
RD
1517 if index == 0: self.x = val
1518 elif index == 1: self.y = val
d14a1e28 1519 else: raise IndexError
e811c8ce 1520 def __nonzero__(self): return self.Get() != (0.0, 0.0)
74e96f3d
RD
1521 __safe_for_unpickling__ = True
1522 def __reduce__(self): return (wx.Point2D, self.Get())
d14a1e28
RD
1523
1524
1525class Point2DPtr(Point2D):
1526 def __init__(self, this):
1527 self.this = this
1528 if not hasattr(self,"thisown"): self.thisown = 0
1529 self.__class__ = Point2D
54f9ee45 1530_core_.Point2D_swigregister(Point2DPtr)
d14a1e28
RD
1531
1532def Point2DCopy(*args, **kwargs):
0df68c9f
RD
1533 """
1534 Point2DCopy(Point2D pt) -> Point2D
e811c8ce 1535
0df68c9f
RD
1536 Create a w.Point2D object.
1537 """
54f9ee45 1538 val = _core_.new_Point2DCopy(*args, **kwargs)
d14a1e28
RD
1539 val.thisown = 1
1540 return val
1541
1542def Point2DFromPoint(*args, **kwargs):
0df68c9f
RD
1543 """
1544 Point2DFromPoint(Point pt) -> Point2D
e811c8ce 1545
0df68c9f
RD
1546 Create a w.Point2D object.
1547 """
54f9ee45 1548 val = _core_.new_Point2DFromPoint(*args, **kwargs)
d14a1e28
RD
1549 val.thisown = 1
1550 return val
1551
1552#---------------------------------------------------------------------------
1553
54f9ee45
RD
1554FromStart = _core_.FromStart
1555FromCurrent = _core_.FromCurrent
1556FromEnd = _core_.FromEnd
d14a1e28 1557class InputStream(object):
093d3ff1 1558 """Proxy of C++ InputStream class"""
e811c8ce
RD
1559 def __repr__(self):
1560 return "<%s.%s; proxy of C++ wxPyInputStream instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 1561 def __init__(self, *args, **kwargs):
a95a7133 1562 """__init__(self, PyObject p) -> InputStream"""
54f9ee45 1563 newobj = _core_.new_InputStream(*args, **kwargs)
d14a1e28
RD
1564 self.this = newobj.this
1565 self.thisown = 1
1566 del newobj.thisown
8fb0e70a
RD
1567 def __del__(self, destroy=_core_.delete_InputStream):
1568 """__del__(self)"""
1569 try:
1570 if self.thisown: destroy(self)
1571 except: pass
1572
e811c8ce 1573 def close(*args, **kwargs):
a95a7133 1574 """close(self)"""
54f9ee45 1575 return _core_.InputStream_close(*args, **kwargs)
e811c8ce
RD
1576
1577 def flush(*args, **kwargs):
a95a7133 1578 """flush(self)"""
54f9ee45 1579 return _core_.InputStream_flush(*args, **kwargs)
e811c8ce
RD
1580
1581 def eof(*args, **kwargs):
a95a7133 1582 """eof(self) -> bool"""
54f9ee45 1583 return _core_.InputStream_eof(*args, **kwargs)
e811c8ce
RD
1584
1585 def read(*args, **kwargs):
a95a7133 1586 """read(self, int size=-1) -> PyObject"""
54f9ee45 1587 return _core_.InputStream_read(*args, **kwargs)
e811c8ce
RD
1588
1589 def readline(*args, **kwargs):
a95a7133 1590 """readline(self, int size=-1) -> PyObject"""
54f9ee45 1591 return _core_.InputStream_readline(*args, **kwargs)
e811c8ce
RD
1592
1593 def readlines(*args, **kwargs):
a95a7133 1594 """readlines(self, int sizehint=-1) -> PyObject"""
54f9ee45 1595 return _core_.InputStream_readlines(*args, **kwargs)
e811c8ce
RD
1596
1597 def seek(*args, **kwargs):
a95a7133 1598 """seek(self, int offset, int whence=0)"""
54f9ee45 1599 return _core_.InputStream_seek(*args, **kwargs)
e811c8ce
RD
1600
1601 def tell(*args, **kwargs):
a95a7133 1602 """tell(self) -> int"""
54f9ee45 1603 return _core_.InputStream_tell(*args, **kwargs)
e811c8ce
RD
1604
1605 def Peek(*args, **kwargs):
a95a7133 1606 """Peek(self) -> char"""
54f9ee45 1607 return _core_.InputStream_Peek(*args, **kwargs)
e811c8ce
RD
1608
1609 def GetC(*args, **kwargs):
a95a7133 1610 """GetC(self) -> char"""
54f9ee45 1611 return _core_.InputStream_GetC(*args, **kwargs)
e811c8ce
RD
1612
1613 def LastRead(*args, **kwargs):
a95a7133 1614 """LastRead(self) -> size_t"""
54f9ee45 1615 return _core_.InputStream_LastRead(*args, **kwargs)
e811c8ce
RD
1616
1617 def CanRead(*args, **kwargs):
a95a7133 1618 """CanRead(self) -> bool"""
54f9ee45 1619 return _core_.InputStream_CanRead(*args, **kwargs)
e811c8ce
RD
1620
1621 def Eof(*args, **kwargs):
a95a7133 1622 """Eof(self) -> bool"""
54f9ee45 1623 return _core_.InputStream_Eof(*args, **kwargs)
e811c8ce
RD
1624
1625 def Ungetch(*args, **kwargs):
a95a7133 1626 """Ungetch(self, char c) -> bool"""
54f9ee45 1627 return _core_.InputStream_Ungetch(*args, **kwargs)
e811c8ce
RD
1628
1629 def SeekI(*args, **kwargs):
a95a7133 1630 """SeekI(self, long pos, int mode=FromStart) -> long"""
54f9ee45 1631 return _core_.InputStream_SeekI(*args, **kwargs)
e811c8ce
RD
1632
1633 def TellI(*args, **kwargs):
a95a7133 1634 """TellI(self) -> long"""
54f9ee45 1635 return _core_.InputStream_TellI(*args, **kwargs)
e811c8ce 1636
d14a1e28
RD
1637
1638class InputStreamPtr(InputStream):
1639 def __init__(self, this):
1640 self.this = this
1641 if not hasattr(self,"thisown"): self.thisown = 0
1642 self.__class__ = InputStream
54f9ee45 1643_core_.InputStream_swigregister(InputStreamPtr)
d14a1e28
RD
1644DefaultPosition = cvar.DefaultPosition
1645DefaultSize = cvar.DefaultSize
1646
1647class OutputStream(object):
093d3ff1 1648 """Proxy of C++ OutputStream class"""
d14a1e28
RD
1649 def __init__(self): raise RuntimeError, "No constructor defined"
1650 def __repr__(self):
1651 return "<%s.%s; proxy of C++ wxOutputStream instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
e811c8ce 1652 def write(*args, **kwargs):
a95a7133 1653 """write(self, PyObject obj)"""
54f9ee45 1654 return _core_.OutputStream_write(*args, **kwargs)
e811c8ce 1655
d14a1e28
RD
1656
1657class OutputStreamPtr(OutputStream):
1658 def __init__(self, this):
1659 self.this = this
1660 if not hasattr(self,"thisown"): self.thisown = 0
1661 self.__class__ = OutputStream
54f9ee45 1662_core_.OutputStream_swigregister(OutputStreamPtr)
d14a1e28
RD
1663
1664#---------------------------------------------------------------------------
1665
1666class FSFile(Object):
093d3ff1 1667 """Proxy of C++ FSFile class"""
e811c8ce
RD
1668 def __repr__(self):
1669 return "<%s.%s; proxy of C++ wxFSFile instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 1670 def __init__(self, *args, **kwargs):
0df68c9f 1671 """
a95a7133 1672 __init__(self, InputStream stream, String loc, String mimetype, String anchor,
196addbf 1673 DateTime modif) -> FSFile
0df68c9f 1674 """
54f9ee45 1675 newobj = _core_.new_FSFile(*args, **kwargs)
d14a1e28
RD
1676 self.this = newobj.this
1677 self.thisown = 1
1678 del newobj.thisown
4cf4100f
RD
1679 self.thisown = 0 # It will normally be deleted by the user of the wxFileSystem
1680
54f9ee45 1681 def __del__(self, destroy=_core_.delete_FSFile):
a95a7133 1682 """__del__(self)"""
d14a1e28
RD
1683 try:
1684 if self.thisown: destroy(self)
1685 except: pass
e811c8ce
RD
1686
1687 def GetStream(*args, **kwargs):
a95a7133 1688 """GetStream(self) -> InputStream"""
54f9ee45 1689 return _core_.FSFile_GetStream(*args, **kwargs)
e811c8ce
RD
1690
1691 def GetMimeType(*args, **kwargs):
a95a7133 1692 """GetMimeType(self) -> String"""
54f9ee45 1693 return _core_.FSFile_GetMimeType(*args, **kwargs)
e811c8ce
RD
1694
1695 def GetLocation(*args, **kwargs):
a95a7133 1696 """GetLocation(self) -> String"""
54f9ee45 1697 return _core_.FSFile_GetLocation(*args, **kwargs)
e811c8ce
RD
1698
1699 def GetAnchor(*args, **kwargs):
a95a7133 1700 """GetAnchor(self) -> String"""
54f9ee45 1701 return _core_.FSFile_GetAnchor(*args, **kwargs)
e811c8ce
RD
1702
1703 def GetModificationTime(*args, **kwargs):
a95a7133 1704 """GetModificationTime(self) -> DateTime"""
54f9ee45 1705 return _core_.FSFile_GetModificationTime(*args, **kwargs)
e811c8ce 1706
d14a1e28
RD
1707
1708class FSFilePtr(FSFile):
1709 def __init__(self, this):
1710 self.this = this
1711 if not hasattr(self,"thisown"): self.thisown = 0
1712 self.__class__ = FSFile
54f9ee45 1713_core_.FSFile_swigregister(FSFilePtr)
d14a1e28
RD
1714
1715class CPPFileSystemHandler(object):
093d3ff1 1716 """Proxy of C++ CPPFileSystemHandler class"""
d14a1e28
RD
1717 def __init__(self): raise RuntimeError, "No constructor defined"
1718 def __repr__(self):
1719 return "<%s.%s; proxy of C++ wxFileSystemHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
1720
1721class CPPFileSystemHandlerPtr(CPPFileSystemHandler):
1722 def __init__(self, this):
1723 self.this = this
1724 if not hasattr(self,"thisown"): self.thisown = 0
1725 self.__class__ = CPPFileSystemHandler
54f9ee45 1726_core_.CPPFileSystemHandler_swigregister(CPPFileSystemHandlerPtr)
d14a1e28
RD
1727
1728class FileSystemHandler(CPPFileSystemHandler):
093d3ff1 1729 """Proxy of C++ FileSystemHandler class"""
e811c8ce
RD
1730 def __repr__(self):
1731 return "<%s.%s; proxy of C++ wxPyFileSystemHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 1732 def __init__(self, *args, **kwargs):
a95a7133 1733 """__init__(self) -> FileSystemHandler"""
54f9ee45 1734 newobj = _core_.new_FileSystemHandler(*args, **kwargs)
d14a1e28
RD
1735 self.this = newobj.this
1736 self.thisown = 1
1737 del newobj.thisown
1738 self._setCallbackInfo(self, FileSystemHandler)
e811c8ce
RD
1739
1740 def _setCallbackInfo(*args, **kwargs):
a95a7133 1741 """_setCallbackInfo(self, PyObject self, PyObject _class)"""
54f9ee45 1742 return _core_.FileSystemHandler__setCallbackInfo(*args, **kwargs)
e811c8ce
RD
1743
1744 def CanOpen(*args, **kwargs):
a95a7133 1745 """CanOpen(self, String location) -> bool"""
54f9ee45 1746 return _core_.FileSystemHandler_CanOpen(*args, **kwargs)
e811c8ce
RD
1747
1748 def OpenFile(*args, **kwargs):
a95a7133 1749 """OpenFile(self, FileSystem fs, String location) -> FSFile"""
54f9ee45 1750 return _core_.FileSystemHandler_OpenFile(*args, **kwargs)
e811c8ce
RD
1751
1752 def FindFirst(*args, **kwargs):
a95a7133 1753 """FindFirst(self, String spec, int flags=0) -> String"""
54f9ee45 1754 return _core_.FileSystemHandler_FindFirst(*args, **kwargs)
e811c8ce
RD
1755
1756 def FindNext(*args, **kwargs):
a95a7133 1757 """FindNext(self) -> String"""
54f9ee45 1758 return _core_.FileSystemHandler_FindNext(*args, **kwargs)
e811c8ce
RD
1759
1760 def GetProtocol(*args, **kwargs):
a95a7133 1761 """GetProtocol(self, String location) -> String"""
54f9ee45 1762 return _core_.FileSystemHandler_GetProtocol(*args, **kwargs)
e811c8ce
RD
1763
1764 def GetLeftLocation(*args, **kwargs):
a95a7133 1765 """GetLeftLocation(self, String location) -> String"""
54f9ee45 1766 return _core_.FileSystemHandler_GetLeftLocation(*args, **kwargs)
e811c8ce
RD
1767
1768 def GetAnchor(*args, **kwargs):
a95a7133 1769 """GetAnchor(self, String location) -> String"""
54f9ee45 1770 return _core_.FileSystemHandler_GetAnchor(*args, **kwargs)
e811c8ce
RD
1771
1772 def GetRightLocation(*args, **kwargs):
a95a7133 1773 """GetRightLocation(self, String location) -> String"""
54f9ee45 1774 return _core_.FileSystemHandler_GetRightLocation(*args, **kwargs)
e811c8ce
RD
1775
1776 def GetMimeTypeFromExt(*args, **kwargs):
a95a7133 1777 """GetMimeTypeFromExt(self, String location) -> String"""
54f9ee45 1778 return _core_.FileSystemHandler_GetMimeTypeFromExt(*args, **kwargs)
e811c8ce 1779
d14a1e28
RD
1780
1781class FileSystemHandlerPtr(FileSystemHandler):
1782 def __init__(self, this):
1783 self.this = this
1784 if not hasattr(self,"thisown"): self.thisown = 0
1785 self.__class__ = FileSystemHandler
54f9ee45 1786_core_.FileSystemHandler_swigregister(FileSystemHandlerPtr)
d14a1e28
RD
1787
1788class FileSystem(Object):
093d3ff1 1789 """Proxy of C++ FileSystem class"""
e811c8ce
RD
1790 def __repr__(self):
1791 return "<%s.%s; proxy of C++ wxFileSystem instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 1792 def __init__(self, *args, **kwargs):
a95a7133 1793 """__init__(self) -> FileSystem"""
54f9ee45 1794 newobj = _core_.new_FileSystem(*args, **kwargs)
d14a1e28
RD
1795 self.this = newobj.this
1796 self.thisown = 1
1797 del newobj.thisown
54f9ee45 1798 def __del__(self, destroy=_core_.delete_FileSystem):
a95a7133 1799 """__del__(self)"""
d14a1e28
RD
1800 try:
1801 if self.thisown: destroy(self)
1802 except: pass
e811c8ce
RD
1803
1804 def ChangePathTo(*args, **kwargs):
a95a7133 1805 """ChangePathTo(self, String location, bool is_dir=False)"""
54f9ee45 1806 return _core_.FileSystem_ChangePathTo(*args, **kwargs)
e811c8ce
RD
1807
1808 def GetPath(*args, **kwargs):
a95a7133 1809 """GetPath(self) -> String"""
54f9ee45 1810 return _core_.FileSystem_GetPath(*args, **kwargs)
e811c8ce
RD
1811
1812 def OpenFile(*args, **kwargs):
a95a7133 1813 """OpenFile(self, String location) -> FSFile"""
54f9ee45 1814 return _core_.FileSystem_OpenFile(*args, **kwargs)
e811c8ce
RD
1815
1816 def FindFirst(*args, **kwargs):
a95a7133 1817 """FindFirst(self, String spec, int flags=0) -> String"""
54f9ee45 1818 return _core_.FileSystem_FindFirst(*args, **kwargs)
e811c8ce
RD
1819
1820 def FindNext(*args, **kwargs):
a95a7133 1821 """FindNext(self) -> String"""
54f9ee45 1822 return _core_.FileSystem_FindNext(*args, **kwargs)
e811c8ce
RD
1823
1824 def AddHandler(*args, **kwargs):
66c033b4 1825 """AddHandler(CPPFileSystemHandler handler)"""
54f9ee45 1826 return _core_.FileSystem_AddHandler(*args, **kwargs)
e811c8ce
RD
1827
1828 AddHandler = staticmethod(AddHandler)
1829 def CleanUpHandlers(*args, **kwargs):
66c033b4 1830 """CleanUpHandlers()"""
54f9ee45 1831 return _core_.FileSystem_CleanUpHandlers(*args, **kwargs)
e811c8ce
RD
1832
1833 CleanUpHandlers = staticmethod(CleanUpHandlers)
1834 def FileNameToURL(*args, **kwargs):
66c033b4 1835 """FileNameToURL(String filename) -> String"""
54f9ee45 1836 return _core_.FileSystem_FileNameToURL(*args, **kwargs)
e811c8ce
RD
1837
1838 FileNameToURL = staticmethod(FileNameToURL)
2ef75293
RD
1839 def URLToFileName(*args, **kwargs):
1840 """URLToFileName(String url) -> String"""
1841 return _core_.FileSystem_URLToFileName(*args, **kwargs)
1842
1843 URLToFileName = staticmethod(URLToFileName)
d14a1e28
RD
1844
1845class FileSystemPtr(FileSystem):
1846 def __init__(self, this):
1847 self.this = this
1848 if not hasattr(self,"thisown"): self.thisown = 0
1849 self.__class__ = FileSystem
54f9ee45 1850_core_.FileSystem_swigregister(FileSystemPtr)
d14a1e28 1851
e811c8ce
RD
1852def FileSystem_AddHandler(*args, **kwargs):
1853 """FileSystem_AddHandler(CPPFileSystemHandler handler)"""
54f9ee45 1854 return _core_.FileSystem_AddHandler(*args, **kwargs)
d14a1e28 1855
e811c8ce
RD
1856def FileSystem_CleanUpHandlers(*args, **kwargs):
1857 """FileSystem_CleanUpHandlers()"""
54f9ee45 1858 return _core_.FileSystem_CleanUpHandlers(*args, **kwargs)
d14a1e28 1859
e811c8ce 1860def FileSystem_FileNameToURL(*args, **kwargs):
196addbf 1861 """FileSystem_FileNameToURL(String filename) -> String"""
54f9ee45 1862 return _core_.FileSystem_FileNameToURL(*args, **kwargs)
d14a1e28 1863
e811c8ce 1864def FileSystem_URLToFileName(*args, **kwargs):
196addbf 1865 """FileSystem_URLToFileName(String url) -> String"""
54f9ee45 1866 return _core_.FileSystem_URLToFileName(*args, **kwargs)
2ef75293 1867
d14a1e28 1868class InternetFSHandler(CPPFileSystemHandler):
093d3ff1 1869 """Proxy of C++ InternetFSHandler class"""
e811c8ce
RD
1870 def __repr__(self):
1871 return "<%s.%s; proxy of C++ wxInternetFSHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 1872 def __init__(self, *args, **kwargs):
a95a7133 1873 """__init__(self) -> InternetFSHandler"""
54f9ee45 1874 newobj = _core_.new_InternetFSHandler(*args, **kwargs)
d14a1e28
RD
1875 self.this = newobj.this
1876 self.thisown = 1
1877 del newobj.thisown
e811c8ce 1878 def CanOpen(*args, **kwargs):
a95a7133 1879 """CanOpen(self, String location) -> bool"""
54f9ee45 1880 return _core_.InternetFSHandler_CanOpen(*args, **kwargs)
e811c8ce
RD
1881
1882 def OpenFile(*args, **kwargs):
a95a7133 1883 """OpenFile(self, FileSystem fs, String location) -> FSFile"""
54f9ee45 1884 return _core_.InternetFSHandler_OpenFile(*args, **kwargs)
e811c8ce 1885
d14a1e28
RD
1886
1887class InternetFSHandlerPtr(InternetFSHandler):
1888 def __init__(self, this):
1889 self.this = this
1890 if not hasattr(self,"thisown"): self.thisown = 0
1891 self.__class__ = InternetFSHandler
54f9ee45 1892_core_.InternetFSHandler_swigregister(InternetFSHandlerPtr)
d14a1e28
RD
1893
1894class ZipFSHandler(CPPFileSystemHandler):
093d3ff1 1895 """Proxy of C++ ZipFSHandler class"""
e811c8ce
RD
1896 def __repr__(self):
1897 return "<%s.%s; proxy of C++ wxZipFSHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 1898 def __init__(self, *args, **kwargs):
a95a7133 1899 """__init__(self) -> ZipFSHandler"""
54f9ee45 1900 newobj = _core_.new_ZipFSHandler(*args, **kwargs)
d14a1e28
RD
1901 self.this = newobj.this
1902 self.thisown = 1
1903 del newobj.thisown
e811c8ce 1904 def CanOpen(*args, **kwargs):
a95a7133 1905 """CanOpen(self, String location) -> bool"""
54f9ee45 1906 return _core_.ZipFSHandler_CanOpen(*args, **kwargs)
e811c8ce
RD
1907
1908 def OpenFile(*args, **kwargs):
a95a7133 1909 """OpenFile(self, FileSystem fs, String location) -> FSFile"""
54f9ee45 1910 return _core_.ZipFSHandler_OpenFile(*args, **kwargs)
e811c8ce
RD
1911
1912 def FindFirst(*args, **kwargs):
a95a7133 1913 """FindFirst(self, String spec, int flags=0) -> String"""
54f9ee45 1914 return _core_.ZipFSHandler_FindFirst(*args, **kwargs)
e811c8ce
RD
1915
1916 def FindNext(*args, **kwargs):
a95a7133 1917 """FindNext(self) -> String"""
54f9ee45 1918 return _core_.ZipFSHandler_FindNext(*args, **kwargs)
e811c8ce 1919
d14a1e28
RD
1920
1921class ZipFSHandlerPtr(ZipFSHandler):
1922 def __init__(self, this):
1923 self.this = this
1924 if not hasattr(self,"thisown"): self.thisown = 0
1925 self.__class__ = ZipFSHandler
54f9ee45 1926_core_.ZipFSHandler_swigregister(ZipFSHandlerPtr)
d14a1e28
RD
1927
1928
e811c8ce 1929def __wxMemoryFSHandler_AddFile_wxImage(*args, **kwargs):
196addbf 1930 """__wxMemoryFSHandler_AddFile_wxImage(String filename, Image image, long type)"""
54f9ee45 1931 return _core_.__wxMemoryFSHandler_AddFile_wxImage(*args, **kwargs)
d14a1e28 1932
e811c8ce 1933def __wxMemoryFSHandler_AddFile_wxBitmap(*args, **kwargs):
196addbf 1934 """__wxMemoryFSHandler_AddFile_wxBitmap(String filename, Bitmap bitmap, long type)"""
54f9ee45 1935 return _core_.__wxMemoryFSHandler_AddFile_wxBitmap(*args, **kwargs)
d14a1e28 1936
e811c8ce 1937def __wxMemoryFSHandler_AddFile_Data(*args, **kwargs):
196addbf 1938 """__wxMemoryFSHandler_AddFile_Data(String filename, PyObject data)"""
54f9ee45 1939 return _core_.__wxMemoryFSHandler_AddFile_Data(*args, **kwargs)
2ef75293
RD
1940def MemoryFSHandler_AddFile(filename, dataItem, imgType=-1):
1941 """
1942 Add 'file' to the memory filesystem. The dataItem parameter can
1943 either be a `wx.Bitmap`, `wx.Image` or a string that can contain
1944 arbitrary data. If a bitmap or image is used then the imgType
1945 parameter should specify what kind of image file it should be
1946 written as, wx.BITMAP_TYPE_PNG, etc.
1947 """
1948 if isinstance(dataItem, wx.Image):
1949 __wxMemoryFSHandler_AddFile_wxImage(filename, dataItem, imgType)
1950 elif isinstance(dataItem, wx.Bitmap):
1951 __wxMemoryFSHandler_AddFile_wxBitmap(filename, dataItem, imgType)
1952 elif type(dataItem) == str:
1953 __wxMemoryFSHandler_AddFile_Data(filename, dataItem)
1954 else:
1955 raise TypeError, 'wx.Image, wx.Bitmap or string expected'
d14a1e28
RD
1956
1957class MemoryFSHandler(CPPFileSystemHandler):
093d3ff1 1958 """Proxy of C++ MemoryFSHandler class"""
e811c8ce
RD
1959 def __repr__(self):
1960 return "<%s.%s; proxy of C++ wxMemoryFSHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 1961 def __init__(self, *args, **kwargs):
a95a7133 1962 """__init__(self) -> MemoryFSHandler"""
54f9ee45 1963 newobj = _core_.new_MemoryFSHandler(*args, **kwargs)
d14a1e28
RD
1964 self.this = newobj.this
1965 self.thisown = 1
1966 del newobj.thisown
e811c8ce 1967 def RemoveFile(*args, **kwargs):
66c033b4 1968 """RemoveFile(String filename)"""
54f9ee45 1969 return _core_.MemoryFSHandler_RemoveFile(*args, **kwargs)
e811c8ce
RD
1970
1971 RemoveFile = staticmethod(RemoveFile)
d14a1e28 1972 AddFile = staticmethod(MemoryFSHandler_AddFile)
e811c8ce 1973 def CanOpen(*args, **kwargs):
a95a7133 1974 """CanOpen(self, String location) -> bool"""
54f9ee45 1975 return _core_.MemoryFSHandler_CanOpen(*args, **kwargs)
e811c8ce
RD
1976
1977 def OpenFile(*args, **kwargs):
a95a7133 1978 """OpenFile(self, FileSystem fs, String location) -> FSFile"""
54f9ee45 1979 return _core_.MemoryFSHandler_OpenFile(*args, **kwargs)
e811c8ce
RD
1980
1981 def FindFirst(*args, **kwargs):
a95a7133 1982 """FindFirst(self, String spec, int flags=0) -> String"""
54f9ee45 1983 return _core_.MemoryFSHandler_FindFirst(*args, **kwargs)
e811c8ce
RD
1984
1985 def FindNext(*args, **kwargs):
a95a7133 1986 """FindNext(self) -> String"""
54f9ee45 1987 return _core_.MemoryFSHandler_FindNext(*args, **kwargs)
e811c8ce 1988
d14a1e28
RD
1989
1990class MemoryFSHandlerPtr(MemoryFSHandler):
1991 def __init__(self, this):
1992 self.this = this
1993 if not hasattr(self,"thisown"): self.thisown = 0
1994 self.__class__ = MemoryFSHandler
54f9ee45 1995_core_.MemoryFSHandler_swigregister(MemoryFSHandlerPtr)
d14a1e28 1996
e811c8ce 1997def MemoryFSHandler_RemoveFile(*args, **kwargs):
196addbf 1998 """MemoryFSHandler_RemoveFile(String filename)"""
54f9ee45 1999 return _core_.MemoryFSHandler_RemoveFile(*args, **kwargs)
d14a1e28
RD
2000
2001#---------------------------------------------------------------------------
2002
2003class ImageHandler(Object):
093d3ff1 2004 """Proxy of C++ ImageHandler class"""
d14a1e28
RD
2005 def __init__(self): raise RuntimeError, "No constructor defined"
2006 def __repr__(self):
2007 return "<%s.%s; proxy of C++ wxImageHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
e811c8ce 2008 def GetName(*args, **kwargs):
a95a7133 2009 """GetName(self) -> String"""
54f9ee45 2010 return _core_.ImageHandler_GetName(*args, **kwargs)
e811c8ce
RD
2011
2012 def GetExtension(*args, **kwargs):
a95a7133 2013 """GetExtension(self) -> String"""
54f9ee45 2014 return _core_.ImageHandler_GetExtension(*args, **kwargs)
e811c8ce
RD
2015
2016 def GetType(*args, **kwargs):
a95a7133 2017 """GetType(self) -> long"""
54f9ee45 2018 return _core_.ImageHandler_GetType(*args, **kwargs)
e811c8ce
RD
2019
2020 def GetMimeType(*args, **kwargs):
a95a7133 2021 """GetMimeType(self) -> String"""
54f9ee45 2022 return _core_.ImageHandler_GetMimeType(*args, **kwargs)
e811c8ce
RD
2023
2024 def CanRead(*args, **kwargs):
a95a7133 2025 """CanRead(self, String name) -> bool"""
54f9ee45 2026 return _core_.ImageHandler_CanRead(*args, **kwargs)
e811c8ce
RD
2027
2028 def SetName(*args, **kwargs):
a95a7133 2029 """SetName(self, String name)"""
54f9ee45 2030 return _core_.ImageHandler_SetName(*args, **kwargs)
e811c8ce
RD
2031
2032 def SetExtension(*args, **kwargs):
a95a7133 2033 """SetExtension(self, String extension)"""
54f9ee45 2034 return _core_.ImageHandler_SetExtension(*args, **kwargs)
e811c8ce
RD
2035
2036 def SetType(*args, **kwargs):
a95a7133 2037 """SetType(self, long type)"""
54f9ee45 2038 return _core_.ImageHandler_SetType(*args, **kwargs)
e811c8ce
RD
2039
2040 def SetMimeType(*args, **kwargs):
a95a7133 2041 """SetMimeType(self, String mimetype)"""
54f9ee45 2042 return _core_.ImageHandler_SetMimeType(*args, **kwargs)
e811c8ce 2043
d14a1e28
RD
2044
2045class ImageHandlerPtr(ImageHandler):
2046 def __init__(self, this):
2047 self.this = this
2048 if not hasattr(self,"thisown"): self.thisown = 0
2049 self.__class__ = ImageHandler
54f9ee45 2050_core_.ImageHandler_swigregister(ImageHandlerPtr)
d14a1e28
RD
2051
2052class ImageHistogram(object):
093d3ff1 2053 """Proxy of C++ ImageHistogram class"""
e811c8ce
RD
2054 def __repr__(self):
2055 return "<%s.%s; proxy of C++ wxImageHistogram instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 2056 def __init__(self, *args, **kwargs):
a95a7133 2057 """__init__(self) -> ImageHistogram"""
54f9ee45 2058 newobj = _core_.new_ImageHistogram(*args, **kwargs)
d14a1e28
RD
2059 self.this = newobj.this
2060 self.thisown = 1
2061 del newobj.thisown
e811c8ce 2062 def MakeKey(*args, **kwargs):
0df68c9f 2063 """
66c033b4 2064 MakeKey(unsigned char r, unsigned char g, unsigned char b) -> unsigned long
e811c8ce 2065
0df68c9f
RD
2066 Get the key in the histogram for the given RGB values
2067 """
54f9ee45 2068 return _core_.ImageHistogram_MakeKey(*args, **kwargs)
e811c8ce
RD
2069
2070 MakeKey = staticmethod(MakeKey)
2071 def FindFirstUnusedColour(*args, **kwargs):
fd2dc343
RD
2072 """
2073 FindFirstUnusedColour(int startR=1, int startG=0, int startB=0) -> (success, r, g, b)
2074
2075 Find first colour that is not used in the image and has higher RGB
2076 values than startR, startG, startB. Returns a tuple consisting of a
2077 success flag and rgb values.
2078 """
54f9ee45 2079 return _core_.ImageHistogram_FindFirstUnusedColour(*args, **kwargs)
e811c8ce 2080
d14a1e28
RD
2081
2082class ImageHistogramPtr(ImageHistogram):
2083 def __init__(self, this):
2084 self.this = this
2085 if not hasattr(self,"thisown"): self.thisown = 0
2086 self.__class__ = ImageHistogram
54f9ee45 2087_core_.ImageHistogram_swigregister(ImageHistogramPtr)
d14a1e28 2088
e811c8ce 2089def ImageHistogram_MakeKey(*args, **kwargs):
0df68c9f
RD
2090 """
2091 ImageHistogram_MakeKey(unsigned char r, unsigned char g, unsigned char b) -> unsigned long
e811c8ce 2092
0df68c9f
RD
2093 Get the key in the histogram for the given RGB values
2094 """
54f9ee45 2095 return _core_.ImageHistogram_MakeKey(*args, **kwargs)
d14a1e28
RD
2096
2097class Image(Object):
093d3ff1 2098 """Proxy of C++ Image class"""
e811c8ce
RD
2099 def __repr__(self):
2100 return "<%s.%s; proxy of C++ wxImage instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 2101 def __init__(self, *args, **kwargs):
a95a7133 2102 """__init__(self, String name, long type=BITMAP_TYPE_ANY, int index=-1) -> Image"""
54f9ee45 2103 newobj = _core_.new_Image(*args, **kwargs)
d14a1e28
RD
2104 self.this = newobj.this
2105 self.thisown = 1
2106 del newobj.thisown
54f9ee45 2107 def __del__(self, destroy=_core_.delete_Image):
a95a7133 2108 """__del__(self)"""
d14a1e28
RD
2109 try:
2110 if self.thisown: destroy(self)
2111 except: pass
e811c8ce
RD
2112
2113 def Create(*args, **kwargs):
a95a7133 2114 """Create(self, int width, int height)"""
54f9ee45 2115 return _core_.Image_Create(*args, **kwargs)
e811c8ce
RD
2116
2117 def Destroy(*args, **kwargs):
0df68c9f 2118 """
a95a7133 2119 Destroy(self)
e811c8ce 2120
0df68c9f
RD
2121 Deletes the C++ object this Python object is a proxy for.
2122 """
54f9ee45 2123 return _core_.Image_Destroy(*args, **kwargs)
e811c8ce
RD
2124
2125 def Scale(*args, **kwargs):
a95a7133 2126 """Scale(self, int width, int height) -> Image"""
54f9ee45 2127 return _core_.Image_Scale(*args, **kwargs)
e811c8ce
RD
2128
2129 def ShrinkBy(*args, **kwargs):
a95a7133 2130 """ShrinkBy(self, int xFactor, int yFactor) -> Image"""
54f9ee45 2131 return _core_.Image_ShrinkBy(*args, **kwargs)
e811c8ce
RD
2132
2133 def Rescale(*args, **kwargs):
a95a7133 2134 """Rescale(self, int width, int height) -> Image"""
54f9ee45 2135 return _core_.Image_Rescale(*args, **kwargs)
e811c8ce
RD
2136
2137 def SetRGB(*args, **kwargs):
a95a7133 2138 """SetRGB(self, int x, int y, unsigned char r, unsigned char g, unsigned char b)"""
54f9ee45 2139 return _core_.Image_SetRGB(*args, **kwargs)
e811c8ce
RD
2140
2141 def GetRed(*args, **kwargs):
a95a7133 2142 """GetRed(self, int x, int y) -> unsigned char"""
54f9ee45 2143 return _core_.Image_GetRed(*args, **kwargs)
e811c8ce
RD
2144
2145 def GetGreen(*args, **kwargs):
a95a7133 2146 """GetGreen(self, int x, int y) -> unsigned char"""
54f9ee45 2147 return _core_.Image_GetGreen(*args, **kwargs)
e811c8ce
RD
2148
2149 def GetBlue(*args, **kwargs):
a95a7133 2150 """GetBlue(self, int x, int y) -> unsigned char"""
54f9ee45 2151 return _core_.Image_GetBlue(*args, **kwargs)
e811c8ce
RD
2152
2153 def SetAlpha(*args, **kwargs):
a95a7133 2154 """SetAlpha(self, int x, int y, unsigned char alpha)"""
54f9ee45 2155 return _core_.Image_SetAlpha(*args, **kwargs)
e811c8ce
RD
2156
2157 def GetAlpha(*args, **kwargs):
a95a7133 2158 """GetAlpha(self, int x, int y) -> unsigned char"""
54f9ee45 2159 return _core_.Image_GetAlpha(*args, **kwargs)
e811c8ce
RD
2160
2161 def HasAlpha(*args, **kwargs):
a95a7133 2162 """HasAlpha(self) -> bool"""
54f9ee45 2163 return _core_.Image_HasAlpha(*args, **kwargs)
e811c8ce
RD
2164
2165 def FindFirstUnusedColour(*args, **kwargs):
fd2dc343
RD
2166 """
2167 FindFirstUnusedColour(int startR=1, int startG=0, int startB=0) -> (success, r, g, b)
2168
2169 Find first colour that is not used in the image and has higher RGB
2170 values than startR, startG, startB. Returns a tuple consisting of a
2171 success flag and rgb values.
2172 """
54f9ee45 2173 return _core_.Image_FindFirstUnusedColour(*args, **kwargs)
e811c8ce 2174
4cf4100f
RD
2175 def ConvertAlphaToMask(*args, **kwargs):
2176 """
2177 ConvertAlphaToMask(self, byte threshold=128) -> bool
2178
2179 If the image has alpha channel, this method converts it to mask. All pixels
2180 with alpha value less than ``threshold`` are replaced with mask colour and the
2181 alpha channel is removed. Mask colour is chosen automatically using
2182 `FindFirstUnusedColour`.
2183
2184 If the image image doesn't have alpha channel, ConvertAlphaToMask does
2185 nothing.
2186 """
2187 return _core_.Image_ConvertAlphaToMask(*args, **kwargs)
2188
8fb0e70a
RD
2189 def ConvertColourToAlpha(*args, **kwargs):
2190 """
2191 ConvertColourToAlpha(self, unsigned char r, unsigned char g, unsigned char b) -> bool
2192
2193 This method converts an image where the original alpha information is
2194 only available as a shades of a colour (actually shades of grey)
2195 typically when you draw anti-aliased text into a bitmap. The DC
2196 drawing routines draw grey values on the black background although
2197 they actually mean to draw white with differnt alpha values. This
2198 method reverses it, assuming a black (!) background and white text.
2199 The method will then fill up the whole image with the colour given.
2200 """
2201 return _core_.Image_ConvertColourToAlpha(*args, **kwargs)
2202
e811c8ce 2203 def SetMaskFromImage(*args, **kwargs):
a95a7133 2204 """SetMaskFromImage(self, Image mask, byte mr, byte mg, byte mb) -> bool"""
54f9ee45 2205 return _core_.Image_SetMaskFromImage(*args, **kwargs)
e811c8ce
RD
2206
2207 def CanRead(*args, **kwargs):
66c033b4 2208 """CanRead(String name) -> bool"""
54f9ee45 2209 return _core_.Image_CanRead(*args, **kwargs)
e811c8ce
RD
2210
2211 CanRead = staticmethod(CanRead)
2212 def GetImageCount(*args, **kwargs):
66c033b4 2213 """GetImageCount(String name, long type=BITMAP_TYPE_ANY) -> int"""
54f9ee45 2214 return _core_.Image_GetImageCount(*args, **kwargs)
e811c8ce
RD
2215
2216 GetImageCount = staticmethod(GetImageCount)
2217 def LoadFile(*args, **kwargs):
a95a7133 2218 """LoadFile(self, String name, long type=BITMAP_TYPE_ANY, int index=-1) -> bool"""
54f9ee45 2219 return _core_.Image_LoadFile(*args, **kwargs)
e811c8ce
RD
2220
2221 def LoadMimeFile(*args, **kwargs):
a95a7133 2222 """LoadMimeFile(self, String name, String mimetype, int index=-1) -> bool"""
54f9ee45 2223 return _core_.Image_LoadMimeFile(*args, **kwargs)
e811c8ce
RD
2224
2225 def SaveFile(*args, **kwargs):
a95a7133 2226 """SaveFile(self, String name, int type) -> bool"""
54f9ee45 2227 return _core_.Image_SaveFile(*args, **kwargs)
e811c8ce
RD
2228
2229 def SaveMimeFile(*args, **kwargs):
a95a7133 2230 """SaveMimeFile(self, String name, String mimetype) -> bool"""
54f9ee45 2231 return _core_.Image_SaveMimeFile(*args, **kwargs)
e811c8ce
RD
2232
2233 def CanReadStream(*args, **kwargs):
66c033b4 2234 """CanReadStream(InputStream stream) -> bool"""
54f9ee45 2235 return _core_.Image_CanReadStream(*args, **kwargs)
e811c8ce
RD
2236
2237 CanReadStream = staticmethod(CanReadStream)
2238 def LoadStream(*args, **kwargs):
a95a7133 2239 """LoadStream(self, InputStream stream, long type=BITMAP_TYPE_ANY, int index=-1) -> bool"""
54f9ee45 2240 return _core_.Image_LoadStream(*args, **kwargs)
e811c8ce
RD
2241
2242 def LoadMimeStream(*args, **kwargs):
a95a7133 2243 """LoadMimeStream(self, InputStream stream, String mimetype, int index=-1) -> bool"""
54f9ee45 2244 return _core_.Image_LoadMimeStream(*args, **kwargs)
e811c8ce
RD
2245
2246 def Ok(*args, **kwargs):
a95a7133 2247 """Ok(self) -> bool"""
54f9ee45 2248 return _core_.Image_Ok(*args, **kwargs)
e811c8ce
RD
2249
2250 def GetWidth(*args, **kwargs):
a95a7133 2251 """GetWidth(self) -> int"""
54f9ee45 2252 return _core_.Image_GetWidth(*args, **kwargs)
e811c8ce
RD
2253
2254 def GetHeight(*args, **kwargs):
a95a7133 2255 """GetHeight(self) -> int"""
54f9ee45 2256 return _core_.Image_GetHeight(*args, **kwargs)
e811c8ce 2257
b2df227b 2258 def GetSize(*args, **kwargs):
a95a7133 2259 """GetSize(self) -> Size"""
54f9ee45 2260 return _core_.Image_GetSize(*args, **kwargs)
b2df227b 2261
e811c8ce 2262 def GetSubImage(*args, **kwargs):
a95a7133 2263 """GetSubImage(self, Rect rect) -> Image"""
54f9ee45 2264 return _core_.Image_GetSubImage(*args, **kwargs)
e811c8ce
RD
2265
2266 def Copy(*args, **kwargs):
a95a7133 2267 """Copy(self) -> Image"""
54f9ee45 2268 return _core_.Image_Copy(*args, **kwargs)
e811c8ce
RD
2269
2270 def Paste(*args, **kwargs):
a95a7133 2271 """Paste(self, Image image, int x, int y)"""
54f9ee45 2272 return _core_.Image_Paste(*args, **kwargs)
e811c8ce
RD
2273
2274 def GetData(*args, **kwargs):
a95a7133 2275 """GetData(self) -> PyObject"""
54f9ee45 2276 return _core_.Image_GetData(*args, **kwargs)
e811c8ce
RD
2277
2278 def SetData(*args, **kwargs):
a95a7133 2279 """SetData(self, PyObject data)"""
54f9ee45 2280 return _core_.Image_SetData(*args, **kwargs)
e811c8ce
RD
2281
2282 def GetDataBuffer(*args, **kwargs):
a95a7133 2283 """GetDataBuffer(self) -> PyObject"""
54f9ee45 2284 return _core_.Image_GetDataBuffer(*args, **kwargs)
e811c8ce
RD
2285
2286 def SetDataBuffer(*args, **kwargs):
a95a7133 2287 """SetDataBuffer(self, PyObject data)"""
54f9ee45 2288 return _core_.Image_SetDataBuffer(*args, **kwargs)
e811c8ce
RD
2289
2290 def GetAlphaData(*args, **kwargs):
a95a7133 2291 """GetAlphaData(self) -> PyObject"""
54f9ee45 2292 return _core_.Image_GetAlphaData(*args, **kwargs)
e811c8ce
RD
2293
2294 def SetAlphaData(*args, **kwargs):
a95a7133 2295 """SetAlphaData(self, PyObject data)"""
54f9ee45 2296 return _core_.Image_SetAlphaData(*args, **kwargs)
e811c8ce
RD
2297
2298 def GetAlphaBuffer(*args, **kwargs):
a95a7133 2299 """GetAlphaBuffer(self) -> PyObject"""
54f9ee45 2300 return _core_.Image_GetAlphaBuffer(*args, **kwargs)
e811c8ce
RD
2301
2302 def SetAlphaBuffer(*args, **kwargs):
a95a7133 2303 """SetAlphaBuffer(self, PyObject data)"""
54f9ee45 2304 return _core_.Image_SetAlphaBuffer(*args, **kwargs)
e811c8ce
RD
2305
2306 def SetMaskColour(*args, **kwargs):
a95a7133 2307 """SetMaskColour(self, unsigned char r, unsigned char g, unsigned char b)"""
54f9ee45 2308 return _core_.Image_SetMaskColour(*args, **kwargs)
e811c8ce
RD
2309
2310 def GetMaskRed(*args, **kwargs):
a95a7133 2311 """GetMaskRed(self) -> unsigned char"""
54f9ee45 2312 return _core_.Image_GetMaskRed(*args, **kwargs)
e811c8ce
RD
2313
2314 def GetMaskGreen(*args, **kwargs):
a95a7133 2315 """GetMaskGreen(self) -> unsigned char"""
54f9ee45 2316 return _core_.Image_GetMaskGreen(*args, **kwargs)
e811c8ce
RD
2317
2318 def GetMaskBlue(*args, **kwargs):
a95a7133 2319 """GetMaskBlue(self) -> unsigned char"""
54f9ee45 2320 return _core_.Image_GetMaskBlue(*args, **kwargs)
e811c8ce
RD
2321
2322 def SetMask(*args, **kwargs):
a95a7133 2323 """SetMask(self, bool mask=True)"""
54f9ee45 2324 return _core_.Image_SetMask(*args, **kwargs)
e811c8ce
RD
2325
2326 def HasMask(*args, **kwargs):
a95a7133 2327 """HasMask(self) -> bool"""
54f9ee45 2328 return _core_.Image_HasMask(*args, **kwargs)
e811c8ce
RD
2329
2330 def Rotate(*args, **kwargs):
0df68c9f 2331 """
a95a7133 2332 Rotate(self, double angle, Point centre_of_rotation, bool interpolating=True,
0df68c9f
RD
2333 Point offset_after_rotation=None) -> Image
2334 """
54f9ee45 2335 return _core_.Image_Rotate(*args, **kwargs)
e811c8ce
RD
2336
2337 def Rotate90(*args, **kwargs):
a95a7133 2338 """Rotate90(self, bool clockwise=True) -> Image"""
54f9ee45 2339 return _core_.Image_Rotate90(*args, **kwargs)
e811c8ce
RD
2340
2341 def Mirror(*args, **kwargs):
a95a7133 2342 """Mirror(self, bool horizontally=True) -> Image"""
54f9ee45 2343 return _core_.Image_Mirror(*args, **kwargs)
e811c8ce
RD
2344
2345 def Replace(*args, **kwargs):
0df68c9f 2346 """
a95a7133 2347 Replace(self, unsigned char r1, unsigned char g1, unsigned char b1,
0df68c9f
RD
2348 unsigned char r2, unsigned char g2, unsigned char b2)
2349 """
54f9ee45 2350 return _core_.Image_Replace(*args, **kwargs)
e811c8ce
RD
2351
2352 def ConvertToMono(*args, **kwargs):
a95a7133 2353 """ConvertToMono(self, unsigned char r, unsigned char g, unsigned char b) -> Image"""
54f9ee45 2354 return _core_.Image_ConvertToMono(*args, **kwargs)
e811c8ce
RD
2355
2356 def SetOption(*args, **kwargs):
a95a7133 2357 """SetOption(self, String name, String value)"""
54f9ee45 2358 return _core_.Image_SetOption(*args, **kwargs)
e811c8ce
RD
2359
2360 def SetOptionInt(*args, **kwargs):
a95a7133 2361 """SetOptionInt(self, String name, int value)"""
54f9ee45 2362 return _core_.Image_SetOptionInt(*args, **kwargs)
e811c8ce
RD
2363
2364 def GetOption(*args, **kwargs):
a95a7133 2365 """GetOption(self, String name) -> String"""
54f9ee45 2366 return _core_.Image_GetOption(*args, **kwargs)
e811c8ce
RD
2367
2368 def GetOptionInt(*args, **kwargs):
a95a7133 2369 """GetOptionInt(self, String name) -> int"""
54f9ee45 2370 return _core_.Image_GetOptionInt(*args, **kwargs)
e811c8ce
RD
2371
2372 def HasOption(*args, **kwargs):
a95a7133 2373 """HasOption(self, String name) -> bool"""
54f9ee45 2374 return _core_.Image_HasOption(*args, **kwargs)
e811c8ce
RD
2375
2376 def CountColours(*args, **kwargs):
a95a7133 2377 """CountColours(self, unsigned long stopafter=(unsigned long) -1) -> unsigned long"""
54f9ee45 2378 return _core_.Image_CountColours(*args, **kwargs)
e811c8ce
RD
2379
2380 def ComputeHistogram(*args, **kwargs):
a95a7133 2381 """ComputeHistogram(self, ImageHistogram h) -> unsigned long"""
54f9ee45 2382 return _core_.Image_ComputeHistogram(*args, **kwargs)
e811c8ce
RD
2383
2384 def AddHandler(*args, **kwargs):
66c033b4 2385 """AddHandler(ImageHandler handler)"""
54f9ee45 2386 return _core_.Image_AddHandler(*args, **kwargs)
e811c8ce
RD
2387
2388 AddHandler = staticmethod(AddHandler)
2389 def InsertHandler(*args, **kwargs):
66c033b4 2390 """InsertHandler(ImageHandler handler)"""
54f9ee45 2391 return _core_.Image_InsertHandler(*args, **kwargs)
e811c8ce
RD
2392
2393 InsertHandler = staticmethod(InsertHandler)
2394 def RemoveHandler(*args, **kwargs):
66c033b4 2395 """RemoveHandler(String name) -> bool"""
54f9ee45 2396 return _core_.Image_RemoveHandler(*args, **kwargs)
e811c8ce
RD
2397
2398 RemoveHandler = staticmethod(RemoveHandler)
2399 def GetImageExtWildcard(*args, **kwargs):
66c033b4 2400 """GetImageExtWildcard() -> String"""
54f9ee45 2401 return _core_.Image_GetImageExtWildcard(*args, **kwargs)
e811c8ce
RD
2402
2403 GetImageExtWildcard = staticmethod(GetImageExtWildcard)
2404 def ConvertToBitmap(*args, **kwargs):
1fbf26be 2405 """ConvertToBitmap(self, int depth=-1) -> Bitmap"""
54f9ee45 2406 return _core_.Image_ConvertToBitmap(*args, **kwargs)
e811c8ce
RD
2407
2408 def ConvertToMonoBitmap(*args, **kwargs):
a95a7133 2409 """ConvertToMonoBitmap(self, unsigned char red, unsigned char green, unsigned char blue) -> Bitmap"""
54f9ee45 2410 return _core_.Image_ConvertToMonoBitmap(*args, **kwargs)
e811c8ce
RD
2411
2412 def __nonzero__(self): return self.Ok()
d14a1e28
RD
2413
2414class ImagePtr(Image):
2415 def __init__(self, this):
2416 self.this = this
2417 if not hasattr(self,"thisown"): self.thisown = 0
2418 self.__class__ = Image
54f9ee45 2419_core_.Image_swigregister(ImagePtr)
d14a1e28
RD
2420
2421def ImageFromMime(*args, **kwargs):
196addbf 2422 """ImageFromMime(String name, String mimetype, int index=-1) -> Image"""
54f9ee45 2423 val = _core_.new_ImageFromMime(*args, **kwargs)
d14a1e28
RD
2424 val.thisown = 1
2425 return val
2426
2427def ImageFromStream(*args, **kwargs):
196addbf 2428 """ImageFromStream(InputStream stream, long type=BITMAP_TYPE_ANY, int index=-1) -> Image"""
54f9ee45 2429 val = _core_.new_ImageFromStream(*args, **kwargs)
d14a1e28
RD
2430 val.thisown = 1
2431 return val
2432
2433def ImageFromStreamMime(*args, **kwargs):
196addbf 2434 """ImageFromStreamMime(InputStream stream, String mimetype, int index=-1) -> Image"""
54f9ee45 2435 val = _core_.new_ImageFromStreamMime(*args, **kwargs)
d14a1e28
RD
2436 val.thisown = 1
2437 return val
2438
66c033b4
RD
2439def EmptyImage(*args, **kwargs):
2440 """EmptyImage(int width=0, int height=0, bool clear=True) -> Image"""
2441 val = _core_.new_EmptyImage(*args, **kwargs)
d14a1e28
RD
2442 val.thisown = 1
2443 return val
2444
2445def ImageFromBitmap(*args, **kwargs):
196addbf 2446 """ImageFromBitmap(Bitmap bitmap) -> Image"""
54f9ee45 2447 val = _core_.new_ImageFromBitmap(*args, **kwargs)
d14a1e28
RD
2448 val.thisown = 1
2449 return val
2450
2451def ImageFromData(*args, **kwargs):
e811c8ce 2452 """ImageFromData(int width, int height, unsigned char data) -> Image"""
54f9ee45 2453 val = _core_.new_ImageFromData(*args, **kwargs)
d14a1e28
RD
2454 val.thisown = 1
2455 return val
2456
1823fbb4
RD
2457def ImageFromDataWithAlpha(*args, **kwargs):
2458 """ImageFromDataWithAlpha(int width, int height, unsigned char data, unsigned char alpha) -> Image"""
2459 val = _core_.new_ImageFromDataWithAlpha(*args, **kwargs)
2460 val.thisown = 1
2461 return val
2462
e811c8ce 2463def Image_CanRead(*args, **kwargs):
196addbf 2464 """Image_CanRead(String name) -> bool"""
54f9ee45 2465 return _core_.Image_CanRead(*args, **kwargs)
d14a1e28 2466
e811c8ce 2467def Image_GetImageCount(*args, **kwargs):
196addbf 2468 """Image_GetImageCount(String name, long type=BITMAP_TYPE_ANY) -> int"""
54f9ee45 2469 return _core_.Image_GetImageCount(*args, **kwargs)
d14a1e28 2470
e811c8ce 2471def Image_CanReadStream(*args, **kwargs):
196addbf 2472 """Image_CanReadStream(InputStream stream) -> bool"""
54f9ee45 2473 return _core_.Image_CanReadStream(*args, **kwargs)
d14a1e28 2474
e811c8ce
RD
2475def Image_AddHandler(*args, **kwargs):
2476 """Image_AddHandler(ImageHandler handler)"""
54f9ee45 2477 return _core_.Image_AddHandler(*args, **kwargs)
d14a1e28 2478
e811c8ce
RD
2479def Image_InsertHandler(*args, **kwargs):
2480 """Image_InsertHandler(ImageHandler handler)"""
54f9ee45 2481 return _core_.Image_InsertHandler(*args, **kwargs)
d14a1e28 2482
e811c8ce 2483def Image_RemoveHandler(*args, **kwargs):
196addbf 2484 """Image_RemoveHandler(String name) -> bool"""
54f9ee45 2485 return _core_.Image_RemoveHandler(*args, **kwargs)
d14a1e28 2486
e811c8ce 2487def Image_GetImageExtWildcard(*args, **kwargs):
196addbf 2488 """Image_GetImageExtWildcard() -> String"""
54f9ee45 2489 return _core_.Image_GetImageExtWildcard(*args, **kwargs)
d14a1e28 2490
5e4ca4a8
RD
2491def InitAllImageHandlers():
2492 """
2493 The former functionality of InitAllImageHanders is now done internal to
2494 the _core_ extension module and so this function has become a simple NOP.
2495 """
2496 pass
d14a1e28 2497
54f9ee45
RD
2498IMAGE_RESOLUTION_INCHES = _core_.IMAGE_RESOLUTION_INCHES
2499IMAGE_RESOLUTION_CM = _core_.IMAGE_RESOLUTION_CM
2500BMP_24BPP = _core_.BMP_24BPP
2501BMP_8BPP = _core_.BMP_8BPP
2502BMP_8BPP_GREY = _core_.BMP_8BPP_GREY
2503BMP_8BPP_GRAY = _core_.BMP_8BPP_GRAY
2504BMP_8BPP_RED = _core_.BMP_8BPP_RED
2505BMP_8BPP_PALETTE = _core_.BMP_8BPP_PALETTE
2506BMP_4BPP = _core_.BMP_4BPP
2507BMP_1BPP = _core_.BMP_1BPP
2508BMP_1BPP_BW = _core_.BMP_1BPP_BW
d14a1e28 2509class BMPHandler(ImageHandler):
093d3ff1 2510 """Proxy of C++ BMPHandler class"""
e811c8ce
RD
2511 def __repr__(self):
2512 return "<%s.%s; proxy of C++ wxBMPHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 2513 def __init__(self, *args, **kwargs):
a95a7133 2514 """__init__(self) -> BMPHandler"""
54f9ee45 2515 newobj = _core_.new_BMPHandler(*args, **kwargs)
d14a1e28
RD
2516 self.this = newobj.this
2517 self.thisown = 1
2518 del newobj.thisown
d14a1e28
RD
2519
2520class BMPHandlerPtr(BMPHandler):
2521 def __init__(self, this):
2522 self.this = this
2523 if not hasattr(self,"thisown"): self.thisown = 0
2524 self.__class__ = BMPHandler
54f9ee45 2525_core_.BMPHandler_swigregister(BMPHandlerPtr)
d14a1e28
RD
2526NullImage = cvar.NullImage
2527IMAGE_OPTION_BMP_FORMAT = cvar.IMAGE_OPTION_BMP_FORMAT
2528IMAGE_OPTION_CUR_HOTSPOT_X = cvar.IMAGE_OPTION_CUR_HOTSPOT_X
2529IMAGE_OPTION_CUR_HOTSPOT_Y = cvar.IMAGE_OPTION_CUR_HOTSPOT_Y
2530IMAGE_OPTION_RESOLUTION = cvar.IMAGE_OPTION_RESOLUTION
2531IMAGE_OPTION_RESOLUTIONUNIT = cvar.IMAGE_OPTION_RESOLUTIONUNIT
2532
2533class ICOHandler(BMPHandler):
093d3ff1 2534 """Proxy of C++ ICOHandler class"""
e811c8ce
RD
2535 def __repr__(self):
2536 return "<%s.%s; proxy of C++ wxICOHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 2537 def __init__(self, *args, **kwargs):
a95a7133 2538 """__init__(self) -> ICOHandler"""
54f9ee45 2539 newobj = _core_.new_ICOHandler(*args, **kwargs)
d14a1e28
RD
2540 self.this = newobj.this
2541 self.thisown = 1
2542 del newobj.thisown
d14a1e28
RD
2543
2544class ICOHandlerPtr(ICOHandler):
2545 def __init__(self, this):
2546 self.this = this
2547 if not hasattr(self,"thisown"): self.thisown = 0
2548 self.__class__ = ICOHandler
54f9ee45 2549_core_.ICOHandler_swigregister(ICOHandlerPtr)
d14a1e28
RD
2550
2551class CURHandler(ICOHandler):
093d3ff1 2552 """Proxy of C++ CURHandler class"""
e811c8ce
RD
2553 def __repr__(self):
2554 return "<%s.%s; proxy of C++ wxCURHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 2555 def __init__(self, *args, **kwargs):
a95a7133 2556 """__init__(self) -> CURHandler"""
54f9ee45 2557 newobj = _core_.new_CURHandler(*args, **kwargs)
d14a1e28
RD
2558 self.this = newobj.this
2559 self.thisown = 1
2560 del newobj.thisown
d14a1e28
RD
2561
2562class CURHandlerPtr(CURHandler):
2563 def __init__(self, this):
2564 self.this = this
2565 if not hasattr(self,"thisown"): self.thisown = 0
2566 self.__class__ = CURHandler
54f9ee45 2567_core_.CURHandler_swigregister(CURHandlerPtr)
d14a1e28
RD
2568
2569class ANIHandler(CURHandler):
093d3ff1 2570 """Proxy of C++ ANIHandler class"""
e811c8ce
RD
2571 def __repr__(self):
2572 return "<%s.%s; proxy of C++ wxANIHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 2573 def __init__(self, *args, **kwargs):
a95a7133 2574 """__init__(self) -> ANIHandler"""
54f9ee45 2575 newobj = _core_.new_ANIHandler(*args, **kwargs)
d14a1e28
RD
2576 self.this = newobj.this
2577 self.thisown = 1
2578 del newobj.thisown
d14a1e28
RD
2579
2580class ANIHandlerPtr(ANIHandler):
2581 def __init__(self, this):
2582 self.this = this
2583 if not hasattr(self,"thisown"): self.thisown = 0
2584 self.__class__ = ANIHandler
54f9ee45 2585_core_.ANIHandler_swigregister(ANIHandlerPtr)
d14a1e28
RD
2586
2587class PNGHandler(ImageHandler):
093d3ff1 2588 """Proxy of C++ PNGHandler class"""
e811c8ce
RD
2589 def __repr__(self):
2590 return "<%s.%s; proxy of C++ wxPNGHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 2591 def __init__(self, *args, **kwargs):
a95a7133 2592 """__init__(self) -> PNGHandler"""
54f9ee45 2593 newobj = _core_.new_PNGHandler(*args, **kwargs)
d14a1e28
RD
2594 self.this = newobj.this
2595 self.thisown = 1
2596 del newobj.thisown
d14a1e28
RD
2597
2598class PNGHandlerPtr(PNGHandler):
2599 def __init__(self, this):
2600 self.this = this
2601 if not hasattr(self,"thisown"): self.thisown = 0
2602 self.__class__ = PNGHandler
54f9ee45 2603_core_.PNGHandler_swigregister(PNGHandlerPtr)
d14a1e28
RD
2604
2605class GIFHandler(ImageHandler):
093d3ff1 2606 """Proxy of C++ GIFHandler class"""
e811c8ce
RD
2607 def __repr__(self):
2608 return "<%s.%s; proxy of C++ wxGIFHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 2609 def __init__(self, *args, **kwargs):
a95a7133 2610 """__init__(self) -> GIFHandler"""
54f9ee45 2611 newobj = _core_.new_GIFHandler(*args, **kwargs)
d14a1e28
RD
2612 self.this = newobj.this
2613 self.thisown = 1
2614 del newobj.thisown
d14a1e28
RD
2615
2616class GIFHandlerPtr(GIFHandler):
2617 def __init__(self, this):
2618 self.this = this
2619 if not hasattr(self,"thisown"): self.thisown = 0
2620 self.__class__ = GIFHandler
54f9ee45 2621_core_.GIFHandler_swigregister(GIFHandlerPtr)
d14a1e28
RD
2622
2623class PCXHandler(ImageHandler):
093d3ff1 2624 """Proxy of C++ PCXHandler class"""
e811c8ce
RD
2625 def __repr__(self):
2626 return "<%s.%s; proxy of C++ wxPCXHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 2627 def __init__(self, *args, **kwargs):
a95a7133 2628 """__init__(self) -> PCXHandler"""
54f9ee45 2629 newobj = _core_.new_PCXHandler(*args, **kwargs)
d14a1e28
RD
2630 self.this = newobj.this
2631 self.thisown = 1
2632 del newobj.thisown
d14a1e28
RD
2633
2634class PCXHandlerPtr(PCXHandler):
2635 def __init__(self, this):
2636 self.this = this
2637 if not hasattr(self,"thisown"): self.thisown = 0
2638 self.__class__ = PCXHandler
54f9ee45 2639_core_.PCXHandler_swigregister(PCXHandlerPtr)
d14a1e28
RD
2640
2641class JPEGHandler(ImageHandler):
093d3ff1 2642 """Proxy of C++ JPEGHandler class"""
e811c8ce
RD
2643 def __repr__(self):
2644 return "<%s.%s; proxy of C++ wxJPEGHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 2645 def __init__(self, *args, **kwargs):
a95a7133 2646 """__init__(self) -> JPEGHandler"""
54f9ee45 2647 newobj = _core_.new_JPEGHandler(*args, **kwargs)
d14a1e28
RD
2648 self.this = newobj.this
2649 self.thisown = 1
2650 del newobj.thisown
d14a1e28
RD
2651
2652class JPEGHandlerPtr(JPEGHandler):
2653 def __init__(self, this):
2654 self.this = this
2655 if not hasattr(self,"thisown"): self.thisown = 0
2656 self.__class__ = JPEGHandler
54f9ee45 2657_core_.JPEGHandler_swigregister(JPEGHandlerPtr)
d14a1e28
RD
2658
2659class PNMHandler(ImageHandler):
093d3ff1 2660 """Proxy of C++ PNMHandler class"""
e811c8ce
RD
2661 def __repr__(self):
2662 return "<%s.%s; proxy of C++ wxPNMHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 2663 def __init__(self, *args, **kwargs):
a95a7133 2664 """__init__(self) -> PNMHandler"""
54f9ee45 2665 newobj = _core_.new_PNMHandler(*args, **kwargs)
d14a1e28
RD
2666 self.this = newobj.this
2667 self.thisown = 1
2668 del newobj.thisown
d14a1e28
RD
2669
2670class PNMHandlerPtr(PNMHandler):
2671 def __init__(self, this):
2672 self.this = this
2673 if not hasattr(self,"thisown"): self.thisown = 0
2674 self.__class__ = PNMHandler
54f9ee45 2675_core_.PNMHandler_swigregister(PNMHandlerPtr)
d14a1e28
RD
2676
2677class XPMHandler(ImageHandler):
093d3ff1 2678 """Proxy of C++ XPMHandler class"""
e811c8ce
RD
2679 def __repr__(self):
2680 return "<%s.%s; proxy of C++ wxXPMHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 2681 def __init__(self, *args, **kwargs):
a95a7133 2682 """__init__(self) -> XPMHandler"""
54f9ee45 2683 newobj = _core_.new_XPMHandler(*args, **kwargs)
d14a1e28
RD
2684 self.this = newobj.this
2685 self.thisown = 1
2686 del newobj.thisown
d14a1e28
RD
2687
2688class XPMHandlerPtr(XPMHandler):
2689 def __init__(self, this):
2690 self.this = this
2691 if not hasattr(self,"thisown"): self.thisown = 0
2692 self.__class__ = XPMHandler
54f9ee45 2693_core_.XPMHandler_swigregister(XPMHandlerPtr)
d14a1e28
RD
2694
2695class TIFFHandler(ImageHandler):
093d3ff1 2696 """Proxy of C++ TIFFHandler class"""
e811c8ce
RD
2697 def __repr__(self):
2698 return "<%s.%s; proxy of C++ wxTIFFHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 2699 def __init__(self, *args, **kwargs):
a95a7133 2700 """__init__(self) -> TIFFHandler"""
54f9ee45 2701 newobj = _core_.new_TIFFHandler(*args, **kwargs)
d14a1e28
RD
2702 self.this = newobj.this
2703 self.thisown = 1
2704 del newobj.thisown
d14a1e28
RD
2705
2706class TIFFHandlerPtr(TIFFHandler):
2707 def __init__(self, this):
2708 self.this = this
2709 if not hasattr(self,"thisown"): self.thisown = 0
2710 self.__class__ = TIFFHandler
54f9ee45 2711_core_.TIFFHandler_swigregister(TIFFHandlerPtr)
d14a1e28 2712
c0de73ae
RD
2713QUANTIZE_INCLUDE_WINDOWS_COLOURS = _core_.QUANTIZE_INCLUDE_WINDOWS_COLOURS
2714QUANTIZE_FILL_DESTINATION_IMAGE = _core_.QUANTIZE_FILL_DESTINATION_IMAGE
2715class Quantize(object):
2716 """Performs quantization, or colour reduction, on a wxImage."""
2717 def __init__(self): raise RuntimeError, "No constructor defined"
2718 def __repr__(self):
2719 return "<%s.%s; proxy of C++ wxQuantize instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
2720 def Quantize(*args, **kwargs):
2721 """
2722 Quantize(Image src, Image dest, int desiredNoColours=236, int flags=wxQUANTIZE_INCLUDE_WINDOWS_COLOURS|wxQUANTIZE_FILL_DESTINATION_IMAGE) -> bool
2723
2724 Reduce the colours in the source image and put the result into the
2725 destination image, setting the palette in the destination if
2726 needed. Both images may be the same, to overwrite the source image.
2727 """
2728 return _core_.Quantize_Quantize(*args, **kwargs)
2729
2730 Quantize = staticmethod(Quantize)
2731
2732class QuantizePtr(Quantize):
2733 def __init__(self, this):
2734 self.this = this
2735 if not hasattr(self,"thisown"): self.thisown = 0
2736 self.__class__ = Quantize
2737_core_.Quantize_swigregister(QuantizePtr)
2738
2739def Quantize_Quantize(*args, **kwargs):
2740 """
2741 Quantize_Quantize(Image src, Image dest, int desiredNoColours=236, int flags=wxQUANTIZE_INCLUDE_WINDOWS_COLOURS|wxQUANTIZE_FILL_DESTINATION_IMAGE) -> bool
2742
2743 Reduce the colours in the source image and put the result into the
2744 destination image, setting the palette in the destination if
2745 needed. Both images may be the same, to overwrite the source image.
2746 """
2747 return _core_.Quantize_Quantize(*args, **kwargs)
2748
d14a1e28
RD
2749#---------------------------------------------------------------------------
2750
2751class EvtHandler(Object):
093d3ff1 2752 """Proxy of C++ EvtHandler class"""
e811c8ce
RD
2753 def __repr__(self):
2754 return "<%s.%s; proxy of C++ wxEvtHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 2755 def __init__(self, *args, **kwargs):
a95a7133 2756 """__init__(self) -> EvtHandler"""
54f9ee45 2757 newobj = _core_.new_EvtHandler(*args, **kwargs)
d14a1e28
RD
2758 self.this = newobj.this
2759 self.thisown = 1
2760 del newobj.thisown
e811c8ce 2761 def GetNextHandler(*args, **kwargs):
a95a7133 2762 """GetNextHandler(self) -> EvtHandler"""
54f9ee45 2763 return _core_.EvtHandler_GetNextHandler(*args, **kwargs)
e811c8ce
RD
2764
2765 def GetPreviousHandler(*args, **kwargs):
a95a7133 2766 """GetPreviousHandler(self) -> EvtHandler"""
54f9ee45 2767 return _core_.EvtHandler_GetPreviousHandler(*args, **kwargs)
e811c8ce
RD
2768
2769 def SetNextHandler(*args, **kwargs):
a95a7133 2770 """SetNextHandler(self, EvtHandler handler)"""
54f9ee45 2771 return _core_.EvtHandler_SetNextHandler(*args, **kwargs)
e811c8ce
RD
2772
2773 def SetPreviousHandler(*args, **kwargs):
a95a7133 2774 """SetPreviousHandler(self, EvtHandler handler)"""
54f9ee45 2775 return _core_.EvtHandler_SetPreviousHandler(*args, **kwargs)
e811c8ce
RD
2776
2777 def GetEvtHandlerEnabled(*args, **kwargs):
a95a7133 2778 """GetEvtHandlerEnabled(self) -> bool"""
54f9ee45 2779 return _core_.EvtHandler_GetEvtHandlerEnabled(*args, **kwargs)
e811c8ce
RD
2780
2781 def SetEvtHandlerEnabled(*args, **kwargs):
a95a7133 2782 """SetEvtHandlerEnabled(self, bool enabled)"""
54f9ee45 2783 return _core_.EvtHandler_SetEvtHandlerEnabled(*args, **kwargs)
e811c8ce
RD
2784
2785 def ProcessEvent(*args, **kwargs):
a95a7133 2786 """ProcessEvent(self, Event event) -> bool"""
54f9ee45 2787 return _core_.EvtHandler_ProcessEvent(*args, **kwargs)
e811c8ce
RD
2788
2789 def AddPendingEvent(*args, **kwargs):
a95a7133 2790 """AddPendingEvent(self, Event event)"""
54f9ee45 2791 return _core_.EvtHandler_AddPendingEvent(*args, **kwargs)
e811c8ce
RD
2792
2793 def ProcessPendingEvents(*args, **kwargs):
a95a7133 2794 """ProcessPendingEvents(self)"""
54f9ee45 2795 return _core_.EvtHandler_ProcessPendingEvents(*args, **kwargs)
e811c8ce
RD
2796
2797 def Connect(*args, **kwargs):
a95a7133 2798 """Connect(self, int id, int lastId, int eventType, PyObject func)"""
54f9ee45 2799 return _core_.EvtHandler_Connect(*args, **kwargs)
e811c8ce
RD
2800
2801 def Disconnect(*args, **kwargs):
a95a7133 2802 """Disconnect(self, int id, int lastId=-1, wxEventType eventType=wxEVT_NULL) -> bool"""
54f9ee45 2803 return _core_.EvtHandler_Disconnect(*args, **kwargs)
e811c8ce
RD
2804
2805 def _setOORInfo(*args, **kwargs):
689b42ee 2806 """_setOORInfo(self, PyObject _self, bool incref=True)"""
54f9ee45 2807 return _core_.EvtHandler__setOORInfo(*args, **kwargs)
e811c8ce 2808
d14a1e28
RD
2809 def Bind(self, event, handler, source=None, id=wx.ID_ANY, id2=wx.ID_ANY):
2810 """
2811 Bind an event to an event handler.
2812
db3e571a
RD
2813 :param event: One of the EVT_* objects that specifies the
2814 type of event to bind,
d14a1e28 2815
db3e571a
RD
2816 :param handler: A callable object to be invoked when the
2817 event is delivered to self. Pass None to
2818 disconnect an event handler.
d14a1e28 2819
db3e571a
RD
2820 :param source: Sometimes the event originates from a
2821 different window than self, but you still
2822 want to catch it in self. (For example, a
2823 button event delivered to a frame.) By
2824 passing the source of the event, the event
2825 handling system is able to differentiate
2826 between the same event type from different
2827 controls.
d14a1e28 2828
db3e571a
RD
2829 :param id: Used to spcify the event source by ID instead
2830 of instance.
2831
2832 :param id2: Used when it is desirable to bind a handler
2833 to a range of IDs, such as with EVT_MENU_RANGE.
d14a1e28
RD
2834 """
2835 if source is not None:
2836 id = source.GetId()
2837 event.Bind(self, id, id2, handler)
2838
66c033b4
RD
2839 def Unbind(self, event, source=None, id=wx.ID_ANY, id2=wx.ID_ANY):
2840 """
2841 Disconencts the event handler binding for event from self.
2842 Returns True if successful.
2843 """
2844 if source is not None:
2845 id = source.GetId()
2846 return event.Unbind(self, id, id2)
d14a1e28 2847
d14a1e28
RD
2848
2849class EvtHandlerPtr(EvtHandler):
2850 def __init__(self, this):
2851 self.this = this
2852 if not hasattr(self,"thisown"): self.thisown = 0
2853 self.__class__ = EvtHandler
54f9ee45 2854_core_.EvtHandler_swigregister(EvtHandlerPtr)
d14a1e28
RD
2855
2856#---------------------------------------------------------------------------
2857
2858class PyEventBinder(object):
2859 """
2860 Instances of this class are used to bind specific events to event
2861 handlers.
2862 """
2863 def __init__(self, evtType, expectedIDs=0):
2864 if expectedIDs not in [0, 1, 2]:
2865 raise ValueError, "Invalid number of expectedIDs"
2866 self.expectedIDs = expectedIDs
2867
2868 if type(evtType) == list or type(evtType) == tuple:
2869 self.evtType = evtType
2870 else:
2871 self.evtType = [evtType]
2872
2873
2874 def Bind(self, target, id1, id2, function):
2875 """Bind this set of event types to target."""
2876 for et in self.evtType:
2877 target.Connect(id1, id2, et, function)
2878
66c033b4
RD
2879
2880 def Unbind(self, target, id1, id2):
2881 """Remove an event binding."""
2882 success = 0
2883 for et in self.evtType:
2884 success += target.Disconnect(id1, id2, et)
2885 return success != 0
2886
d14a1e28
RD
2887
2888 def __call__(self, *args):
2889 """
2890 For backwards compatibility with the old EVT_* functions.
2891 Should be called with either (window, func), (window, ID,
2892 func) or (window, ID1, ID2, func) parameters depending on the
2893 type of the event.
2894 """
2895 assert len(args) == 2 + self.expectedIDs
2896 id1 = wx.ID_ANY
2897 id2 = wx.ID_ANY
2898 target = args[0]
2899 if self.expectedIDs == 0:
2900 func = args[1]
2901 elif self.expectedIDs == 1:
2902 id1 = args[1]
2903 func = args[2]
2904 elif self.expectedIDs == 2:
2905 id1 = args[1]
2906 id2 = args[2]
2907 func = args[3]
2908 else:
2909 raise ValueError, "Unexpected number of IDs"
2910
2911 self.Bind(target, id1, id2, func)
2912
2913
2914# These two are square pegs that don't fit the PyEventBinder hole...
2915def EVT_COMMAND(win, id, cmd, func):
2916 win.Connect(id, -1, cmd, func)
2917def EVT_COMMAND_RANGE(win, id1, id2, cmd, func):
2918 win.Connect(id1, id2, cmd, func)
2919
2920
2921#---------------------------------------------------------------------------
2922
2923#---------------------------------------------------------------------------
2924
54f9ee45
RD
2925EVENT_PROPAGATE_NONE = _core_.EVENT_PROPAGATE_NONE
2926EVENT_PROPAGATE_MAX = _core_.EVENT_PROPAGATE_MAX
d14a1e28 2927
e811c8ce
RD
2928def NewEventType(*args, **kwargs):
2929 """NewEventType() -> wxEventType"""
54f9ee45
RD
2930 return _core_.NewEventType(*args, **kwargs)
2931wxEVT_NULL = _core_.wxEVT_NULL
2932wxEVT_FIRST = _core_.wxEVT_FIRST
2933wxEVT_USER_FIRST = _core_.wxEVT_USER_FIRST
2934wxEVT_COMMAND_BUTTON_CLICKED = _core_.wxEVT_COMMAND_BUTTON_CLICKED
2935wxEVT_COMMAND_CHECKBOX_CLICKED = _core_.wxEVT_COMMAND_CHECKBOX_CLICKED
2936wxEVT_COMMAND_CHOICE_SELECTED = _core_.wxEVT_COMMAND_CHOICE_SELECTED
2937wxEVT_COMMAND_LISTBOX_SELECTED = _core_.wxEVT_COMMAND_LISTBOX_SELECTED
2938wxEVT_COMMAND_LISTBOX_DOUBLECLICKED = _core_.wxEVT_COMMAND_LISTBOX_DOUBLECLICKED
2939wxEVT_COMMAND_CHECKLISTBOX_TOGGLED = _core_.wxEVT_COMMAND_CHECKLISTBOX_TOGGLED
2940wxEVT_COMMAND_MENU_SELECTED = _core_.wxEVT_COMMAND_MENU_SELECTED
2941wxEVT_COMMAND_TOOL_CLICKED = _core_.wxEVT_COMMAND_TOOL_CLICKED
2942wxEVT_COMMAND_SLIDER_UPDATED = _core_.wxEVT_COMMAND_SLIDER_UPDATED
2943wxEVT_COMMAND_RADIOBOX_SELECTED = _core_.wxEVT_COMMAND_RADIOBOX_SELECTED
2944wxEVT_COMMAND_RADIOBUTTON_SELECTED = _core_.wxEVT_COMMAND_RADIOBUTTON_SELECTED
2945wxEVT_COMMAND_SCROLLBAR_UPDATED = _core_.wxEVT_COMMAND_SCROLLBAR_UPDATED
2946wxEVT_COMMAND_VLBOX_SELECTED = _core_.wxEVT_COMMAND_VLBOX_SELECTED
2947wxEVT_COMMAND_COMBOBOX_SELECTED = _core_.wxEVT_COMMAND_COMBOBOX_SELECTED
2948wxEVT_COMMAND_TOOL_RCLICKED = _core_.wxEVT_COMMAND_TOOL_RCLICKED
2949wxEVT_COMMAND_TOOL_ENTER = _core_.wxEVT_COMMAND_TOOL_ENTER
2950wxEVT_LEFT_DOWN = _core_.wxEVT_LEFT_DOWN
2951wxEVT_LEFT_UP = _core_.wxEVT_LEFT_UP
2952wxEVT_MIDDLE_DOWN = _core_.wxEVT_MIDDLE_DOWN
2953wxEVT_MIDDLE_UP = _core_.wxEVT_MIDDLE_UP
2954wxEVT_RIGHT_DOWN = _core_.wxEVT_RIGHT_DOWN
2955wxEVT_RIGHT_UP = _core_.wxEVT_RIGHT_UP
2956wxEVT_MOTION = _core_.wxEVT_MOTION
2957wxEVT_ENTER_WINDOW = _core_.wxEVT_ENTER_WINDOW
2958wxEVT_LEAVE_WINDOW = _core_.wxEVT_LEAVE_WINDOW
2959wxEVT_LEFT_DCLICK = _core_.wxEVT_LEFT_DCLICK
2960wxEVT_MIDDLE_DCLICK = _core_.wxEVT_MIDDLE_DCLICK
2961wxEVT_RIGHT_DCLICK = _core_.wxEVT_RIGHT_DCLICK
2962wxEVT_SET_FOCUS = _core_.wxEVT_SET_FOCUS
2963wxEVT_KILL_FOCUS = _core_.wxEVT_KILL_FOCUS
2964wxEVT_CHILD_FOCUS = _core_.wxEVT_CHILD_FOCUS
2965wxEVT_MOUSEWHEEL = _core_.wxEVT_MOUSEWHEEL
2966wxEVT_NC_LEFT_DOWN = _core_.wxEVT_NC_LEFT_DOWN
2967wxEVT_NC_LEFT_UP = _core_.wxEVT_NC_LEFT_UP
2968wxEVT_NC_MIDDLE_DOWN = _core_.wxEVT_NC_MIDDLE_DOWN
2969wxEVT_NC_MIDDLE_UP = _core_.wxEVT_NC_MIDDLE_UP
2970wxEVT_NC_RIGHT_DOWN = _core_.wxEVT_NC_RIGHT_DOWN
2971wxEVT_NC_RIGHT_UP = _core_.wxEVT_NC_RIGHT_UP
2972wxEVT_NC_MOTION = _core_.wxEVT_NC_MOTION
2973wxEVT_NC_ENTER_WINDOW = _core_.wxEVT_NC_ENTER_WINDOW
2974wxEVT_NC_LEAVE_WINDOW = _core_.wxEVT_NC_LEAVE_WINDOW
2975wxEVT_NC_LEFT_DCLICK = _core_.wxEVT_NC_LEFT_DCLICK
2976wxEVT_NC_MIDDLE_DCLICK = _core_.wxEVT_NC_MIDDLE_DCLICK
2977wxEVT_NC_RIGHT_DCLICK = _core_.wxEVT_NC_RIGHT_DCLICK
2978wxEVT_CHAR = _core_.wxEVT_CHAR
2979wxEVT_CHAR_HOOK = _core_.wxEVT_CHAR_HOOK
2980wxEVT_NAVIGATION_KEY = _core_.wxEVT_NAVIGATION_KEY
2981wxEVT_KEY_DOWN = _core_.wxEVT_KEY_DOWN
2982wxEVT_KEY_UP = _core_.wxEVT_KEY_UP
2983wxEVT_HOTKEY = _core_.wxEVT_HOTKEY
2984wxEVT_SET_CURSOR = _core_.wxEVT_SET_CURSOR
2985wxEVT_SCROLL_TOP = _core_.wxEVT_SCROLL_TOP
2986wxEVT_SCROLL_BOTTOM = _core_.wxEVT_SCROLL_BOTTOM
2987wxEVT_SCROLL_LINEUP = _core_.wxEVT_SCROLL_LINEUP
2988wxEVT_SCROLL_LINEDOWN = _core_.wxEVT_SCROLL_LINEDOWN
2989wxEVT_SCROLL_PAGEUP = _core_.wxEVT_SCROLL_PAGEUP
2990wxEVT_SCROLL_PAGEDOWN = _core_.wxEVT_SCROLL_PAGEDOWN
2991wxEVT_SCROLL_THUMBTRACK = _core_.wxEVT_SCROLL_THUMBTRACK
2992wxEVT_SCROLL_THUMBRELEASE = _core_.wxEVT_SCROLL_THUMBRELEASE
2993wxEVT_SCROLL_ENDSCROLL = _core_.wxEVT_SCROLL_ENDSCROLL
2994wxEVT_SCROLLWIN_TOP = _core_.wxEVT_SCROLLWIN_TOP
2995wxEVT_SCROLLWIN_BOTTOM = _core_.wxEVT_SCROLLWIN_BOTTOM
2996wxEVT_SCROLLWIN_LINEUP = _core_.wxEVT_SCROLLWIN_LINEUP
2997wxEVT_SCROLLWIN_LINEDOWN = _core_.wxEVT_SCROLLWIN_LINEDOWN
2998wxEVT_SCROLLWIN_PAGEUP = _core_.wxEVT_SCROLLWIN_PAGEUP
2999wxEVT_SCROLLWIN_PAGEDOWN = _core_.wxEVT_SCROLLWIN_PAGEDOWN
3000wxEVT_SCROLLWIN_THUMBTRACK = _core_.wxEVT_SCROLLWIN_THUMBTRACK
3001wxEVT_SCROLLWIN_THUMBRELEASE = _core_.wxEVT_SCROLLWIN_THUMBRELEASE
3002wxEVT_SIZE = _core_.wxEVT_SIZE
3003wxEVT_MOVE = _core_.wxEVT_MOVE
3004wxEVT_CLOSE_WINDOW = _core_.wxEVT_CLOSE_WINDOW
3005wxEVT_END_SESSION = _core_.wxEVT_END_SESSION
3006wxEVT_QUERY_END_SESSION = _core_.wxEVT_QUERY_END_SESSION
3007wxEVT_ACTIVATE_APP = _core_.wxEVT_ACTIVATE_APP
3008wxEVT_POWER = _core_.wxEVT_POWER
3009wxEVT_ACTIVATE = _core_.wxEVT_ACTIVATE
3010wxEVT_CREATE = _core_.wxEVT_CREATE
3011wxEVT_DESTROY = _core_.wxEVT_DESTROY
3012wxEVT_SHOW = _core_.wxEVT_SHOW
3013wxEVT_ICONIZE = _core_.wxEVT_ICONIZE
3014wxEVT_MAXIMIZE = _core_.wxEVT_MAXIMIZE
3015wxEVT_MOUSE_CAPTURE_CHANGED = _core_.wxEVT_MOUSE_CAPTURE_CHANGED
3016wxEVT_PAINT = _core_.wxEVT_PAINT
3017wxEVT_ERASE_BACKGROUND = _core_.wxEVT_ERASE_BACKGROUND
3018wxEVT_NC_PAINT = _core_.wxEVT_NC_PAINT
3019wxEVT_PAINT_ICON = _core_.wxEVT_PAINT_ICON
3020wxEVT_MENU_OPEN = _core_.wxEVT_MENU_OPEN
3021wxEVT_MENU_CLOSE = _core_.wxEVT_MENU_CLOSE
3022wxEVT_MENU_HIGHLIGHT = _core_.wxEVT_MENU_HIGHLIGHT
3023wxEVT_CONTEXT_MENU = _core_.wxEVT_CONTEXT_MENU
3024wxEVT_SYS_COLOUR_CHANGED = _core_.wxEVT_SYS_COLOUR_CHANGED
3025wxEVT_DISPLAY_CHANGED = _core_.wxEVT_DISPLAY_CHANGED
3026wxEVT_SETTING_CHANGED = _core_.wxEVT_SETTING_CHANGED
3027wxEVT_QUERY_NEW_PALETTE = _core_.wxEVT_QUERY_NEW_PALETTE
3028wxEVT_PALETTE_CHANGED = _core_.wxEVT_PALETTE_CHANGED
3029wxEVT_DROP_FILES = _core_.wxEVT_DROP_FILES
3030wxEVT_DRAW_ITEM = _core_.wxEVT_DRAW_ITEM
3031wxEVT_MEASURE_ITEM = _core_.wxEVT_MEASURE_ITEM
3032wxEVT_COMPARE_ITEM = _core_.wxEVT_COMPARE_ITEM
3033wxEVT_INIT_DIALOG = _core_.wxEVT_INIT_DIALOG
3034wxEVT_IDLE = _core_.wxEVT_IDLE
3035wxEVT_UPDATE_UI = _core_.wxEVT_UPDATE_UI
3036wxEVT_SIZING = _core_.wxEVT_SIZING
3037wxEVT_MOVING = _core_.wxEVT_MOVING
3038wxEVT_COMMAND_LEFT_CLICK = _core_.wxEVT_COMMAND_LEFT_CLICK
3039wxEVT_COMMAND_LEFT_DCLICK = _core_.wxEVT_COMMAND_LEFT_DCLICK
3040wxEVT_COMMAND_RIGHT_CLICK = _core_.wxEVT_COMMAND_RIGHT_CLICK
3041wxEVT_COMMAND_RIGHT_DCLICK = _core_.wxEVT_COMMAND_RIGHT_DCLICK
3042wxEVT_COMMAND_SET_FOCUS = _core_.wxEVT_COMMAND_SET_FOCUS
3043wxEVT_COMMAND_KILL_FOCUS = _core_.wxEVT_COMMAND_KILL_FOCUS
3044wxEVT_COMMAND_ENTER = _core_.wxEVT_COMMAND_ENTER
d14a1e28
RD
3045#
3046# Create some event binders
3047EVT_SIZE = wx.PyEventBinder( wxEVT_SIZE )
3048EVT_SIZING = wx.PyEventBinder( wxEVT_SIZING )
3049EVT_MOVE = wx.PyEventBinder( wxEVT_MOVE )
3050EVT_MOVING = wx.PyEventBinder( wxEVT_MOVING )
3051EVT_CLOSE = wx.PyEventBinder( wxEVT_CLOSE_WINDOW )
3052EVT_END_SESSION = wx.PyEventBinder( wxEVT_END_SESSION )
3053EVT_QUERY_END_SESSION = wx.PyEventBinder( wxEVT_QUERY_END_SESSION )
3054EVT_PAINT = wx.PyEventBinder( wxEVT_PAINT )
3055EVT_NC_PAINT = wx.PyEventBinder( wxEVT_NC_PAINT )
3056EVT_ERASE_BACKGROUND = wx.PyEventBinder( wxEVT_ERASE_BACKGROUND )
3057EVT_CHAR = wx.PyEventBinder( wxEVT_CHAR )
3058EVT_KEY_DOWN = wx.PyEventBinder( wxEVT_KEY_DOWN )
3059EVT_KEY_UP = wx.PyEventBinder( wxEVT_KEY_UP )
3060EVT_HOTKEY = wx.PyEventBinder( wxEVT_HOTKEY, 1)
3061EVT_CHAR_HOOK = wx.PyEventBinder( wxEVT_CHAR_HOOK )
3062EVT_MENU_OPEN = wx.PyEventBinder( wxEVT_MENU_OPEN )
3063EVT_MENU_CLOSE = wx.PyEventBinder( wxEVT_MENU_CLOSE )
3064EVT_MENU_HIGHLIGHT = wx.PyEventBinder( wxEVT_MENU_HIGHLIGHT, 1)
3065EVT_MENU_HIGHLIGHT_ALL = wx.PyEventBinder( wxEVT_MENU_HIGHLIGHT )
3066EVT_SET_FOCUS = wx.PyEventBinder( wxEVT_SET_FOCUS )
3067EVT_KILL_FOCUS = wx.PyEventBinder( wxEVT_KILL_FOCUS )
3068EVT_CHILD_FOCUS = wx.PyEventBinder( wxEVT_CHILD_FOCUS )
3069EVT_ACTIVATE = wx.PyEventBinder( wxEVT_ACTIVATE )
3070EVT_ACTIVATE_APP = wx.PyEventBinder( wxEVT_ACTIVATE_APP )
3071EVT_END_SESSION = wx.PyEventBinder( wxEVT_END_SESSION )
3072EVT_QUERY_END_SESSION = wx.PyEventBinder( wxEVT_QUERY_END_SESSION )
3073EVT_DROP_FILES = wx.PyEventBinder( wxEVT_DROP_FILES )
3074EVT_INIT_DIALOG = wx.PyEventBinder( wxEVT_INIT_DIALOG )
3075EVT_SYS_COLOUR_CHANGED = wx.PyEventBinder( wxEVT_SYS_COLOUR_CHANGED )
3076EVT_DISPLAY_CHANGED = wx.PyEventBinder( wxEVT_DISPLAY_CHANGED )
3077EVT_SHOW = wx.PyEventBinder( wxEVT_SHOW )
3078EVT_MAXIMIZE = wx.PyEventBinder( wxEVT_MAXIMIZE )
3079EVT_ICONIZE = wx.PyEventBinder( wxEVT_ICONIZE )
3080EVT_NAVIGATION_KEY = wx.PyEventBinder( wxEVT_NAVIGATION_KEY )
3081EVT_PALETTE_CHANGED = wx.PyEventBinder( wxEVT_PALETTE_CHANGED )
3082EVT_QUERY_NEW_PALETTE = wx.PyEventBinder( wxEVT_QUERY_NEW_PALETTE )
3083EVT_WINDOW_CREATE = wx.PyEventBinder( wxEVT_CREATE )
3084EVT_WINDOW_DESTROY = wx.PyEventBinder( wxEVT_DESTROY )
3085EVT_SET_CURSOR = wx.PyEventBinder( wxEVT_SET_CURSOR )
3086EVT_MOUSE_CAPTURE_CHANGED = wx.PyEventBinder( wxEVT_MOUSE_CAPTURE_CHANGED )
3087
3088EVT_LEFT_DOWN = wx.PyEventBinder( wxEVT_LEFT_DOWN )
3089EVT_LEFT_UP = wx.PyEventBinder( wxEVT_LEFT_UP )
3090EVT_MIDDLE_DOWN = wx.PyEventBinder( wxEVT_MIDDLE_DOWN )
3091EVT_MIDDLE_UP = wx.PyEventBinder( wxEVT_MIDDLE_UP )
3092EVT_RIGHT_DOWN = wx.PyEventBinder( wxEVT_RIGHT_DOWN )
3093EVT_RIGHT_UP = wx.PyEventBinder( wxEVT_RIGHT_UP )
3094EVT_MOTION = wx.PyEventBinder( wxEVT_MOTION )
3095EVT_LEFT_DCLICK = wx.PyEventBinder( wxEVT_LEFT_DCLICK )
3096EVT_MIDDLE_DCLICK = wx.PyEventBinder( wxEVT_MIDDLE_DCLICK )
3097EVT_RIGHT_DCLICK = wx.PyEventBinder( wxEVT_RIGHT_DCLICK )
3098EVT_LEAVE_WINDOW = wx.PyEventBinder( wxEVT_LEAVE_WINDOW )
3099EVT_ENTER_WINDOW = wx.PyEventBinder( wxEVT_ENTER_WINDOW )
3100EVT_MOUSEWHEEL = wx.PyEventBinder( wxEVT_MOUSEWHEEL )
3101
3102EVT_MOUSE_EVENTS = wx.PyEventBinder([ wxEVT_LEFT_DOWN,
3103 wxEVT_LEFT_UP,
3104 wxEVT_MIDDLE_DOWN,
3105 wxEVT_MIDDLE_UP,
3106 wxEVT_RIGHT_DOWN,
3107 wxEVT_RIGHT_UP,
3108 wxEVT_MOTION,
3109 wxEVT_LEFT_DCLICK,
3110 wxEVT_MIDDLE_DCLICK,
3111 wxEVT_RIGHT_DCLICK,
3112 wxEVT_ENTER_WINDOW,
3113 wxEVT_LEAVE_WINDOW,
3114 wxEVT_MOUSEWHEEL
3115 ])
3116
3117
3118# Scrolling from wxWindow (sent to wxScrolledWindow)
3119EVT_SCROLLWIN = wx.PyEventBinder([ wxEVT_SCROLLWIN_TOP,
3120 wxEVT_SCROLLWIN_BOTTOM,
3121 wxEVT_SCROLLWIN_LINEUP,
3122 wxEVT_SCROLLWIN_LINEDOWN,
3123 wxEVT_SCROLLWIN_PAGEUP,
3124 wxEVT_SCROLLWIN_PAGEDOWN,
3125 wxEVT_SCROLLWIN_THUMBTRACK,
3126 wxEVT_SCROLLWIN_THUMBRELEASE,
3127 ])
3128
3129EVT_SCROLLWIN_TOP = wx.PyEventBinder( wxEVT_SCROLLWIN_TOP )
3130EVT_SCROLLWIN_BOTTOM = wx.PyEventBinder( wxEVT_SCROLLWIN_BOTTOM )
3131EVT_SCROLLWIN_LINEUP = wx.PyEventBinder( wxEVT_SCROLLWIN_LINEUP )
3132EVT_SCROLLWIN_LINEDOWN = wx.PyEventBinder( wxEVT_SCROLLWIN_LINEDOWN )
3133EVT_SCROLLWIN_PAGEUP = wx.PyEventBinder( wxEVT_SCROLLWIN_PAGEUP )
3134EVT_SCROLLWIN_PAGEDOWN = wx.PyEventBinder( wxEVT_SCROLLWIN_PAGEDOWN )
3135EVT_SCROLLWIN_THUMBTRACK = wx.PyEventBinder( wxEVT_SCROLLWIN_THUMBTRACK )
3136EVT_SCROLLWIN_THUMBRELEASE = wx.PyEventBinder( wxEVT_SCROLLWIN_THUMBRELEASE )
3137
3138# Scrolling from wxSlider and wxScrollBar
3139EVT_SCROLL = wx.PyEventBinder([ wxEVT_SCROLL_TOP,
3140 wxEVT_SCROLL_BOTTOM,
3141 wxEVT_SCROLL_LINEUP,
3142 wxEVT_SCROLL_LINEDOWN,
3143 wxEVT_SCROLL_PAGEUP,
3144 wxEVT_SCROLL_PAGEDOWN,
3145 wxEVT_SCROLL_THUMBTRACK,
3146 wxEVT_SCROLL_THUMBRELEASE,
3147 wxEVT_SCROLL_ENDSCROLL,
3148 ])
3149
3150EVT_SCROLL_TOP = wx.PyEventBinder( wxEVT_SCROLL_TOP )
3151EVT_SCROLL_BOTTOM = wx.PyEventBinder( wxEVT_SCROLL_BOTTOM )
3152EVT_SCROLL_LINEUP = wx.PyEventBinder( wxEVT_SCROLL_LINEUP )
3153EVT_SCROLL_LINEDOWN = wx.PyEventBinder( wxEVT_SCROLL_LINEDOWN )
3154EVT_SCROLL_PAGEUP = wx.PyEventBinder( wxEVT_SCROLL_PAGEUP )
3155EVT_SCROLL_PAGEDOWN = wx.PyEventBinder( wxEVT_SCROLL_PAGEDOWN )
3156EVT_SCROLL_THUMBTRACK = wx.PyEventBinder( wxEVT_SCROLL_THUMBTRACK )
3157EVT_SCROLL_THUMBRELEASE = wx.PyEventBinder( wxEVT_SCROLL_THUMBRELEASE )
3158EVT_SCROLL_ENDSCROLL = wx.PyEventBinder( wxEVT_SCROLL_ENDSCROLL )
3159
3160# Scrolling from wxSlider and wxScrollBar, with an id
3161EVT_COMMAND_SCROLL = wx.PyEventBinder([ wxEVT_SCROLL_TOP,
3162 wxEVT_SCROLL_BOTTOM,
3163 wxEVT_SCROLL_LINEUP,
3164 wxEVT_SCROLL_LINEDOWN,
3165 wxEVT_SCROLL_PAGEUP,
3166 wxEVT_SCROLL_PAGEDOWN,
3167 wxEVT_SCROLL_THUMBTRACK,
3168 wxEVT_SCROLL_THUMBRELEASE,
3169 wxEVT_SCROLL_ENDSCROLL,
3170 ], 1)
3171
3172EVT_COMMAND_SCROLL_TOP = wx.PyEventBinder( wxEVT_SCROLL_TOP, 1)
3173EVT_COMMAND_SCROLL_BOTTOM = wx.PyEventBinder( wxEVT_SCROLL_BOTTOM, 1)
3174EVT_COMMAND_SCROLL_LINEUP = wx.PyEventBinder( wxEVT_SCROLL_LINEUP, 1)
3175EVT_COMMAND_SCROLL_LINEDOWN = wx.PyEventBinder( wxEVT_SCROLL_LINEDOWN, 1)
3176EVT_COMMAND_SCROLL_PAGEUP = wx.PyEventBinder( wxEVT_SCROLL_PAGEUP, 1)
3177EVT_COMMAND_SCROLL_PAGEDOWN = wx.PyEventBinder( wxEVT_SCROLL_PAGEDOWN, 1)
3178EVT_COMMAND_SCROLL_THUMBTRACK = wx.PyEventBinder( wxEVT_SCROLL_THUMBTRACK, 1)
3179EVT_COMMAND_SCROLL_THUMBRELEASE = wx.PyEventBinder( wxEVT_SCROLL_THUMBRELEASE, 1)
3180EVT_COMMAND_SCROLL_ENDSCROLL = wx.PyEventBinder( wxEVT_SCROLL_ENDSCROLL, 1)
3181
d14a1e28
RD
3182EVT_BUTTON = wx.PyEventBinder( wxEVT_COMMAND_BUTTON_CLICKED, 1)
3183EVT_CHECKBOX = wx.PyEventBinder( wxEVT_COMMAND_CHECKBOX_CLICKED, 1)
3184EVT_CHOICE = wx.PyEventBinder( wxEVT_COMMAND_CHOICE_SELECTED, 1)
3185EVT_LISTBOX = wx.PyEventBinder( wxEVT_COMMAND_LISTBOX_SELECTED, 1)
3186EVT_LISTBOX_DCLICK = wx.PyEventBinder( wxEVT_COMMAND_LISTBOX_DOUBLECLICKED, 1)
3187EVT_MENU = wx.PyEventBinder( wxEVT_COMMAND_MENU_SELECTED, 1)
3188EVT_MENU_RANGE = wx.PyEventBinder( wxEVT_COMMAND_MENU_SELECTED, 2)
3189EVT_SLIDER = wx.PyEventBinder( wxEVT_COMMAND_SLIDER_UPDATED, 1)
3190EVT_RADIOBOX = wx.PyEventBinder( wxEVT_COMMAND_RADIOBOX_SELECTED, 1)
3191EVT_RADIOBUTTON = wx.PyEventBinder( wxEVT_COMMAND_RADIOBUTTON_SELECTED, 1)
3192
3193EVT_SCROLLBAR = wx.PyEventBinder( wxEVT_COMMAND_SCROLLBAR_UPDATED, 1)
3194EVT_VLBOX = wx.PyEventBinder( wxEVT_COMMAND_VLBOX_SELECTED, 1)
3195EVT_COMBOBOX = wx.PyEventBinder( wxEVT_COMMAND_COMBOBOX_SELECTED, 1)
3196EVT_TOOL = wx.PyEventBinder( wxEVT_COMMAND_TOOL_CLICKED, 1)
3197EVT_TOOL_RANGE = wx.PyEventBinder( wxEVT_COMMAND_TOOL_CLICKED, 2)
3198EVT_TOOL_RCLICKED = wx.PyEventBinder( wxEVT_COMMAND_TOOL_RCLICKED, 1)
3199EVT_TOOL_RCLICKED_RANGE = wx.PyEventBinder( wxEVT_COMMAND_TOOL_RCLICKED, 2)
3200EVT_TOOL_ENTER = wx.PyEventBinder( wxEVT_COMMAND_TOOL_ENTER, 1)
3201EVT_CHECKLISTBOX = wx.PyEventBinder( wxEVT_COMMAND_CHECKLISTBOX_TOGGLED, 1)
3202
3203
3204EVT_COMMAND_LEFT_CLICK = wx.PyEventBinder( wxEVT_COMMAND_LEFT_CLICK, 1)
3205EVT_COMMAND_LEFT_DCLICK = wx.PyEventBinder( wxEVT_COMMAND_LEFT_DCLICK, 1)
3206EVT_COMMAND_RIGHT_CLICK = wx.PyEventBinder( wxEVT_COMMAND_RIGHT_CLICK, 1)
3207EVT_COMMAND_RIGHT_DCLICK = wx.PyEventBinder( wxEVT_COMMAND_RIGHT_DCLICK, 1)
3208EVT_COMMAND_SET_FOCUS = wx.PyEventBinder( wxEVT_COMMAND_SET_FOCUS, 1)
3209EVT_COMMAND_KILL_FOCUS = wx.PyEventBinder( wxEVT_COMMAND_KILL_FOCUS, 1)
3210EVT_COMMAND_ENTER = wx.PyEventBinder( wxEVT_COMMAND_ENTER, 1)
3211
3212EVT_IDLE = wx.PyEventBinder( wxEVT_IDLE )
3213
3214EVT_UPDATE_UI = wx.PyEventBinder( wxEVT_UPDATE_UI, 1)
3215EVT_UPDATE_UI_RANGE = wx.PyEventBinder( wxEVT_UPDATE_UI, 2)
3216
3217EVT_CONTEXT_MENU = wx.PyEventBinder( wxEVT_CONTEXT_MENU )
3218
3219
3220
3221#---------------------------------------------------------------------------
3222
3223class Event(Object):
093d3ff1 3224 """Proxy of C++ Event class"""
e811c8ce
RD
3225 def __init__(self): raise RuntimeError, "No constructor defined"
3226 def __repr__(self):
3227 return "<%s.%s; proxy of C++ wxEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
54f9ee45 3228 def __del__(self, destroy=_core_.delete_Event):
a95a7133 3229 """__del__(self)"""
d14a1e28
RD
3230 try:
3231 if self.thisown: destroy(self)
3232 except: pass
e811c8ce
RD
3233
3234 def SetEventType(*args, **kwargs):
a95a7133 3235 """SetEventType(self, wxEventType typ)"""
54f9ee45 3236 return _core_.Event_SetEventType(*args, **kwargs)
e811c8ce
RD
3237
3238 def GetEventType(*args, **kwargs):
a95a7133 3239 """GetEventType(self) -> wxEventType"""
54f9ee45 3240 return _core_.Event_GetEventType(*args, **kwargs)
e811c8ce
RD
3241
3242 def GetEventObject(*args, **kwargs):
a95a7133 3243 """GetEventObject(self) -> Object"""
54f9ee45 3244 return _core_.Event_GetEventObject(*args, **kwargs)
e811c8ce
RD
3245
3246 def SetEventObject(*args, **kwargs):
a95a7133 3247 """SetEventObject(self, Object obj)"""
54f9ee45 3248 return _core_.Event_SetEventObject(*args, **kwargs)
e811c8ce
RD
3249
3250 def GetTimestamp(*args, **kwargs):
a95a7133 3251 """GetTimestamp(self) -> long"""
54f9ee45 3252 return _core_.Event_GetTimestamp(*args, **kwargs)
e811c8ce
RD
3253
3254 def SetTimestamp(*args, **kwargs):
a95a7133 3255 """SetTimestamp(self, long ts=0)"""
54f9ee45 3256 return _core_.Event_SetTimestamp(*args, **kwargs)
e811c8ce
RD
3257
3258 def GetId(*args, **kwargs):
a95a7133 3259 """GetId(self) -> int"""
54f9ee45 3260 return _core_.Event_GetId(*args, **kwargs)
e811c8ce
RD
3261
3262 def SetId(*args, **kwargs):
a95a7133 3263 """SetId(self, int Id)"""
54f9ee45 3264 return _core_.Event_SetId(*args, **kwargs)
e811c8ce
RD
3265
3266 def IsCommandEvent(*args, **kwargs):
a95a7133 3267 """IsCommandEvent(self) -> bool"""
54f9ee45 3268 return _core_.Event_IsCommandEvent(*args, **kwargs)
e811c8ce
RD
3269
3270 def Skip(*args, **kwargs):
51b83b37
RD
3271 """
3272 Skip(self, bool skip=True)
3273
3274 Called by an event handler, it controls whether additional event
3275 handlers bound to this event will be called after the current event
3276 handler returns. Skip(false) (the default setting) will prevent
3277 additional event handlers from being called and control will be
3278 returned to the sender of the event immediately after the current
3279 handler has finished. Skip(True) will cause the event processing
3280 system to continue searching for a handler function for this event.
3281
3282 """
54f9ee45 3283 return _core_.Event_Skip(*args, **kwargs)
e811c8ce
RD
3284
3285 def GetSkipped(*args, **kwargs):
a95a7133 3286 """GetSkipped(self) -> bool"""
54f9ee45 3287 return _core_.Event_GetSkipped(*args, **kwargs)
e811c8ce
RD
3288
3289 def ShouldPropagate(*args, **kwargs):
a95a7133 3290 """ShouldPropagate(self) -> bool"""
54f9ee45 3291 return _core_.Event_ShouldPropagate(*args, **kwargs)
e811c8ce
RD
3292
3293 def StopPropagation(*args, **kwargs):
a95a7133 3294 """StopPropagation(self) -> int"""
54f9ee45 3295 return _core_.Event_StopPropagation(*args, **kwargs)
e811c8ce
RD
3296
3297 def ResumePropagation(*args, **kwargs):
a95a7133 3298 """ResumePropagation(self, int propagationLevel)"""
54f9ee45 3299 return _core_.Event_ResumePropagation(*args, **kwargs)
e811c8ce
RD
3300
3301 def Clone(*args, **kwargs):
a95a7133 3302 """Clone(self) -> Event"""
54f9ee45 3303 return _core_.Event_Clone(*args, **kwargs)
e811c8ce 3304
d14a1e28
RD
3305
3306class EventPtr(Event):
3307 def __init__(self, this):
3308 self.this = this
3309 if not hasattr(self,"thisown"): self.thisown = 0
3310 self.__class__ = Event
54f9ee45 3311_core_.Event_swigregister(EventPtr)
d14a1e28
RD
3312
3313#---------------------------------------------------------------------------
3314
3315class PropagationDisabler(object):
093d3ff1 3316 """Proxy of C++ PropagationDisabler class"""
e811c8ce
RD
3317 def __repr__(self):
3318 return "<%s.%s; proxy of C++ wxPropagationDisabler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 3319 def __init__(self, *args, **kwargs):
a95a7133 3320 """__init__(self, Event event) -> PropagationDisabler"""
54f9ee45 3321 newobj = _core_.new_PropagationDisabler(*args, **kwargs)
d14a1e28
RD
3322 self.this = newobj.this
3323 self.thisown = 1
3324 del newobj.thisown
54f9ee45 3325 def __del__(self, destroy=_core_.delete_PropagationDisabler):
a95a7133 3326 """__del__(self)"""
d14a1e28
RD
3327 try:
3328 if self.thisown: destroy(self)
3329 except: pass
e811c8ce 3330
d14a1e28
RD
3331
3332class PropagationDisablerPtr(PropagationDisabler):
3333 def __init__(self, this):
3334 self.this = this
3335 if not hasattr(self,"thisown"): self.thisown = 0
3336 self.__class__ = PropagationDisabler
54f9ee45 3337_core_.PropagationDisabler_swigregister(PropagationDisablerPtr)
d14a1e28
RD
3338
3339class PropagateOnce(object):
093d3ff1 3340 """Proxy of C++ PropagateOnce class"""
e811c8ce
RD
3341 def __repr__(self):
3342 return "<%s.%s; proxy of C++ wxPropagateOnce instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 3343 def __init__(self, *args, **kwargs):
a95a7133 3344 """__init__(self, Event event) -> PropagateOnce"""
54f9ee45 3345 newobj = _core_.new_PropagateOnce(*args, **kwargs)
d14a1e28
RD
3346 self.this = newobj.this
3347 self.thisown = 1
3348 del newobj.thisown
54f9ee45 3349 def __del__(self, destroy=_core_.delete_PropagateOnce):
a95a7133 3350 """__del__(self)"""
d14a1e28
RD
3351 try:
3352 if self.thisown: destroy(self)
3353 except: pass
e811c8ce 3354
d14a1e28
RD
3355
3356class PropagateOncePtr(PropagateOnce):
3357 def __init__(self, this):
3358 self.this = this
3359 if not hasattr(self,"thisown"): self.thisown = 0
3360 self.__class__ = PropagateOnce
54f9ee45 3361_core_.PropagateOnce_swigregister(PropagateOncePtr)
d14a1e28
RD
3362
3363#---------------------------------------------------------------------------
3364
3365class CommandEvent(Event):
093d3ff1 3366 """Proxy of C++ CommandEvent class"""
e811c8ce
RD
3367 def __repr__(self):
3368 return "<%s.%s; proxy of C++ wxCommandEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 3369 def __init__(self, *args, **kwargs):
a95a7133 3370 """__init__(self, wxEventType commandType=wxEVT_NULL, int winid=0) -> CommandEvent"""
54f9ee45 3371 newobj = _core_.new_CommandEvent(*args, **kwargs)
d14a1e28
RD
3372 self.this = newobj.this
3373 self.thisown = 1
3374 del newobj.thisown
e811c8ce 3375 def GetSelection(*args, **kwargs):
a95a7133 3376 """GetSelection(self) -> int"""
54f9ee45 3377 return _core_.CommandEvent_GetSelection(*args, **kwargs)
e811c8ce
RD
3378
3379 def SetString(*args, **kwargs):
a95a7133 3380 """SetString(self, String s)"""
54f9ee45 3381 return _core_.CommandEvent_SetString(*args, **kwargs)
e811c8ce
RD
3382
3383 def GetString(*args, **kwargs):
a95a7133 3384 """GetString(self) -> String"""
54f9ee45 3385 return _core_.CommandEvent_GetString(*args, **kwargs)
e811c8ce
RD
3386
3387 def IsChecked(*args, **kwargs):
a95a7133 3388 """IsChecked(self) -> bool"""
54f9ee45 3389 return _core_.CommandEvent_IsChecked(*args, **kwargs)
e811c8ce 3390
242b7b46 3391 Checked = IsChecked
e811c8ce 3392 def IsSelection(*args, **kwargs):
a95a7133 3393 """IsSelection(self) -> bool"""
54f9ee45 3394 return _core_.CommandEvent_IsSelection(*args, **kwargs)
e811c8ce
RD
3395
3396 def SetExtraLong(*args, **kwargs):
a95a7133 3397 """SetExtraLong(self, long extraLong)"""
54f9ee45 3398 return _core_.CommandEvent_SetExtraLong(*args, **kwargs)
e811c8ce
RD
3399
3400 def GetExtraLong(*args, **kwargs):
a95a7133 3401 """GetExtraLong(self) -> long"""
54f9ee45 3402 return _core_.CommandEvent_GetExtraLong(*args, **kwargs)
e811c8ce
RD
3403
3404 def SetInt(*args, **kwargs):
a95a7133 3405 """SetInt(self, int i)"""
54f9ee45 3406 return _core_.CommandEvent_SetInt(*args, **kwargs)
e811c8ce
RD
3407
3408 def GetInt(*args, **kwargs):
a95a7133 3409 """GetInt(self) -> long"""
54f9ee45 3410 return _core_.CommandEvent_GetInt(*args, **kwargs)
e811c8ce
RD
3411
3412 def Clone(*args, **kwargs):
a95a7133 3413 """Clone(self) -> Event"""
54f9ee45 3414 return _core_.CommandEvent_Clone(*args, **kwargs)
e811c8ce 3415
d14a1e28
RD
3416
3417class CommandEventPtr(CommandEvent):
3418 def __init__(self, this):
3419 self.this = this
3420 if not hasattr(self,"thisown"): self.thisown = 0
3421 self.__class__ = CommandEvent
54f9ee45 3422_core_.CommandEvent_swigregister(CommandEventPtr)
d14a1e28
RD
3423
3424#---------------------------------------------------------------------------
3425
3426class NotifyEvent(CommandEvent):
093d3ff1 3427 """Proxy of C++ NotifyEvent class"""
e811c8ce
RD
3428 def __repr__(self):
3429 return "<%s.%s; proxy of C++ wxNotifyEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 3430 def __init__(self, *args, **kwargs):
a95a7133 3431 """__init__(self, wxEventType commandType=wxEVT_NULL, int winid=0) -> NotifyEvent"""
54f9ee45 3432 newobj = _core_.new_NotifyEvent(*args, **kwargs)
d14a1e28
RD
3433 self.this = newobj.this
3434 self.thisown = 1
3435 del newobj.thisown
e811c8ce 3436 def Veto(*args, **kwargs):
a95a7133 3437 """Veto(self)"""
54f9ee45 3438 return _core_.NotifyEvent_Veto(*args, **kwargs)
e811c8ce
RD
3439
3440 def Allow(*args, **kwargs):
a95a7133 3441 """Allow(self)"""
54f9ee45 3442 return _core_.NotifyEvent_Allow(*args, **kwargs)
e811c8ce
RD
3443
3444 def IsAllowed(*args, **kwargs):
a95a7133 3445 """IsAllowed(self) -> bool"""
54f9ee45 3446 return _core_.NotifyEvent_IsAllowed(*args, **kwargs)
e811c8ce 3447
d14a1e28
RD
3448
3449class NotifyEventPtr(NotifyEvent):
3450 def __init__(self, this):
3451 self.this = this
3452 if not hasattr(self,"thisown"): self.thisown = 0
3453 self.__class__ = NotifyEvent
54f9ee45 3454_core_.NotifyEvent_swigregister(NotifyEventPtr)
d14a1e28
RD
3455
3456#---------------------------------------------------------------------------
3457
3458class ScrollEvent(CommandEvent):
093d3ff1 3459 """Proxy of C++ ScrollEvent class"""
e811c8ce
RD
3460 def __repr__(self):
3461 return "<%s.%s; proxy of C++ wxScrollEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 3462 def __init__(self, *args, **kwargs):
0df68c9f 3463 """
a95a7133 3464 __init__(self, wxEventType commandType=wxEVT_NULL, int winid=0, int pos=0,
0df68c9f
RD
3465 int orient=0) -> ScrollEvent
3466 """
54f9ee45 3467 newobj = _core_.new_ScrollEvent(*args, **kwargs)
d14a1e28
RD
3468 self.this = newobj.this
3469 self.thisown = 1
3470 del newobj.thisown
e811c8ce 3471 def GetOrientation(*args, **kwargs):
a95a7133 3472 """GetOrientation(self) -> int"""
54f9ee45 3473 return _core_.ScrollEvent_GetOrientation(*args, **kwargs)
e811c8ce
RD
3474
3475 def GetPosition(*args, **kwargs):
a95a7133 3476 """GetPosition(self) -> int"""
54f9ee45 3477 return _core_.ScrollEvent_GetPosition(*args, **kwargs)
e811c8ce
RD
3478
3479 def SetOrientation(*args, **kwargs):
a95a7133 3480 """SetOrientation(self, int orient)"""
54f9ee45 3481 return _core_.ScrollEvent_SetOrientation(*args, **kwargs)
e811c8ce
RD
3482
3483 def SetPosition(*args, **kwargs):
a95a7133 3484 """SetPosition(self, int pos)"""
54f9ee45 3485 return _core_.ScrollEvent_SetPosition(*args, **kwargs)
e811c8ce 3486
d14a1e28
RD
3487
3488class ScrollEventPtr(ScrollEvent):
3489 def __init__(self, this):
3490 self.this = this
3491 if not hasattr(self,"thisown"): self.thisown = 0
3492 self.__class__ = ScrollEvent
54f9ee45 3493_core_.ScrollEvent_swigregister(ScrollEventPtr)
d14a1e28
RD
3494
3495#---------------------------------------------------------------------------
3496
3497class ScrollWinEvent(Event):
093d3ff1 3498 """Proxy of C++ ScrollWinEvent class"""
e811c8ce
RD
3499 def __repr__(self):
3500 return "<%s.%s; proxy of C++ wxScrollWinEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 3501 def __init__(self, *args, **kwargs):
a95a7133 3502 """__init__(self, wxEventType commandType=wxEVT_NULL, int pos=0, int orient=0) -> ScrollWinEvent"""
54f9ee45 3503 newobj = _core_.new_ScrollWinEvent(*args, **kwargs)
d14a1e28
RD
3504 self.this = newobj.this
3505 self.thisown = 1
3506 del newobj.thisown
e811c8ce 3507 def GetOrientation(*args, **kwargs):
a95a7133 3508 """GetOrientation(self) -> int"""
54f9ee45 3509 return _core_.ScrollWinEvent_GetOrientation(*args, **kwargs)
e811c8ce
RD
3510
3511 def GetPosition(*args, **kwargs):
a95a7133 3512 """GetPosition(self) -> int"""
54f9ee45 3513 return _core_.ScrollWinEvent_GetPosition(*args, **kwargs)
e811c8ce
RD
3514
3515 def SetOrientation(*args, **kwargs):
a95a7133 3516 """SetOrientation(self, int orient)"""
54f9ee45 3517 return _core_.ScrollWinEvent_SetOrientation(*args, **kwargs)
e811c8ce
RD
3518
3519 def SetPosition(*args, **kwargs):
a95a7133 3520 """SetPosition(self, int pos)"""
54f9ee45 3521 return _core_.ScrollWinEvent_SetPosition(*args, **kwargs)
e811c8ce 3522
d14a1e28
RD
3523
3524class ScrollWinEventPtr(ScrollWinEvent):
3525 def __init__(self, this):
3526 self.this = this
3527 if not hasattr(self,"thisown"): self.thisown = 0
3528 self.__class__ = ScrollWinEvent
54f9ee45 3529_core_.ScrollWinEvent_swigregister(ScrollWinEventPtr)
d14a1e28
RD
3530
3531#---------------------------------------------------------------------------
3532
54f9ee45
RD
3533MOUSE_BTN_ANY = _core_.MOUSE_BTN_ANY
3534MOUSE_BTN_NONE = _core_.MOUSE_BTN_NONE
3535MOUSE_BTN_LEFT = _core_.MOUSE_BTN_LEFT
3536MOUSE_BTN_MIDDLE = _core_.MOUSE_BTN_MIDDLE
3537MOUSE_BTN_RIGHT = _core_.MOUSE_BTN_RIGHT
d14a1e28 3538class MouseEvent(Event):
093d3ff1 3539 """Proxy of C++ MouseEvent class"""
e811c8ce
RD
3540 def __repr__(self):
3541 return "<%s.%s; proxy of C++ wxMouseEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 3542 def __init__(self, *args, **kwargs):
a95a7133 3543 """__init__(self, wxEventType mouseType=wxEVT_NULL) -> MouseEvent"""
54f9ee45 3544 newobj = _core_.new_MouseEvent(*args, **kwargs)
d14a1e28
RD
3545 self.this = newobj.this
3546 self.thisown = 1
3547 del newobj.thisown
e811c8ce 3548 def IsButton(*args, **kwargs):
a95a7133 3549 """IsButton(self) -> bool"""
54f9ee45 3550 return _core_.MouseEvent_IsButton(*args, **kwargs)
e811c8ce
RD
3551
3552 def ButtonDown(*args, **kwargs):
a95a7133 3553 """ButtonDown(self, int but=MOUSE_BTN_ANY) -> bool"""
54f9ee45 3554 return _core_.MouseEvent_ButtonDown(*args, **kwargs)
e811c8ce
RD
3555
3556 def ButtonDClick(*args, **kwargs):
a95a7133 3557 """ButtonDClick(self, int but=MOUSE_BTN_ANY) -> bool"""
54f9ee45 3558 return _core_.MouseEvent_ButtonDClick(*args, **kwargs)
e811c8ce
RD
3559
3560 def ButtonUp(*args, **kwargs):
a95a7133 3561 """ButtonUp(self, int but=MOUSE_BTN_ANY) -> bool"""
54f9ee45 3562 return _core_.MouseEvent_ButtonUp(*args, **kwargs)
e811c8ce
RD
3563
3564 def Button(*args, **kwargs):
a95a7133 3565 """Button(self, int but) -> bool"""
54f9ee45 3566 return _core_.MouseEvent_Button(*args, **kwargs)
e811c8ce
RD
3567
3568 def ButtonIsDown(*args, **kwargs):
a95a7133 3569 """ButtonIsDown(self, int but) -> bool"""
54f9ee45 3570 return _core_.MouseEvent_ButtonIsDown(*args, **kwargs)
e811c8ce
RD
3571
3572 def GetButton(*args, **kwargs):
a95a7133 3573 """GetButton(self) -> int"""
54f9ee45 3574 return _core_.MouseEvent_GetButton(*args, **kwargs)
e811c8ce
RD
3575
3576 def ControlDown(*args, **kwargs):
a95a7133 3577 """ControlDown(self) -> bool"""
54f9ee45 3578 return _core_.MouseEvent_ControlDown(*args, **kwargs)
e811c8ce
RD
3579
3580 def MetaDown(*args, **kwargs):
a95a7133 3581 """MetaDown(self) -> bool"""
54f9ee45 3582 return _core_.MouseEvent_MetaDown(*args, **kwargs)
e811c8ce
RD
3583
3584 def AltDown(*args, **kwargs):
a95a7133 3585 """AltDown(self) -> bool"""
54f9ee45 3586 return _core_.MouseEvent_AltDown(*args, **kwargs)
e811c8ce
RD
3587
3588 def ShiftDown(*args, **kwargs):
a95a7133 3589 """ShiftDown(self) -> bool"""
54f9ee45 3590 return _core_.MouseEvent_ShiftDown(*args, **kwargs)
e811c8ce 3591
412d302d
RD
3592 def CmdDown(*args, **kwargs):
3593 """
3594 CmdDown(self) -> bool
3595
3596 "Cmd" is a pseudo key which is the same as Control for PC and Unix
3597 platforms but the special "Apple" (a.k.a as "Command") key on
3598 Macs: it makes often sense to use it instead of, say, `ControlDown`
3599 because Cmd key is used for the same thing under Mac as Ctrl
3600 elsewhere. The Ctrl still exists, it's just not used for this
3601 purpose. So for non-Mac platforms this is the same as `ControlDown`
3602 and Macs this is the same as `MetaDown`.
3603 """
3604 return _core_.MouseEvent_CmdDown(*args, **kwargs)
3605
e811c8ce 3606 def LeftDown(*args, **kwargs):
a95a7133 3607 """LeftDown(self) -> bool"""
54f9ee45 3608 return _core_.MouseEvent_LeftDown(*args, **kwargs)
e811c8ce
RD
3609
3610 def MiddleDown(*args, **kwargs):
a95a7133 3611 """MiddleDown(self) -> bool"""
54f9ee45 3612 return _core_.MouseEvent_MiddleDown(*args, **kwargs)
e811c8ce
RD
3613
3614 def RightDown(*args, **kwargs):
a95a7133 3615 """RightDown(self) -> bool"""
54f9ee45 3616 return _core_.MouseEvent_RightDown(*args, **kwargs)
e811c8ce
RD
3617
3618 def LeftUp(*args, **kwargs):
a95a7133 3619 """LeftUp(self) -> bool"""
54f9ee45 3620 return _core_.MouseEvent_LeftUp(*args, **kwargs)
e811c8ce
RD
3621
3622 def MiddleUp(*args, **kwargs):
a95a7133 3623 """MiddleUp(self) -> bool"""
54f9ee45 3624 return _core_.MouseEvent_MiddleUp(*args, **kwargs)
e811c8ce
RD
3625
3626 def RightUp(*args, **kwargs):
a95a7133 3627 """RightUp(self) -> bool"""
54f9ee45 3628 return _core_.MouseEvent_RightUp(*args, **kwargs)
e811c8ce
RD
3629
3630 def LeftDClick(*args, **kwargs):
a95a7133 3631 """LeftDClick(self) -> bool"""
54f9ee45 3632 return _core_.MouseEvent_LeftDClick(*args, **kwargs)
e811c8ce
RD
3633
3634 def MiddleDClick(*args, **kwargs):
a95a7133 3635 """MiddleDClick(self) -> bool"""
54f9ee45 3636 return _core_.MouseEvent_MiddleDClick(*args, **kwargs)
e811c8ce
RD
3637
3638 def RightDClick(*args, **kwargs):
a95a7133 3639 """RightDClick(self) -> bool"""
54f9ee45 3640 return _core_.MouseEvent_RightDClick(*args, **kwargs)
e811c8ce
RD
3641
3642 def LeftIsDown(*args, **kwargs):
a95a7133 3643 """LeftIsDown(self) -> bool"""
54f9ee45 3644 return _core_.MouseEvent_LeftIsDown(*args, **kwargs)
e811c8ce
RD
3645
3646 def MiddleIsDown(*args, **kwargs):
a95a7133 3647 """MiddleIsDown(self) -> bool"""
54f9ee45 3648 return _core_.MouseEvent_MiddleIsDown(*args, **kwargs)
e811c8ce
RD
3649
3650 def RightIsDown(*args, **kwargs):
a95a7133 3651 """RightIsDown(self) -> bool"""
54f9ee45 3652 return _core_.MouseEvent_RightIsDown(*args, **kwargs)
e811c8ce
RD
3653
3654 def Dragging(*args, **kwargs):
a95a7133 3655 """Dragging(self) -> bool"""
54f9ee45 3656 return _core_.MouseEvent_Dragging(*args, **kwargs)
e811c8ce
RD
3657
3658 def Moving(*args, **kwargs):
a95a7133 3659 """Moving(self) -> bool"""
54f9ee45 3660 return _core_.MouseEvent_Moving(*args, **kwargs)
e811c8ce
RD
3661
3662 def Entering(*args, **kwargs):
a95a7133 3663 """Entering(self) -> bool"""
54f9ee45 3664 return _core_.MouseEvent_Entering(*args, **kwargs)
e811c8ce
RD
3665
3666 def Leaving(*args, **kwargs):
a95a7133 3667 """Leaving(self) -> bool"""
54f9ee45 3668 return _core_.MouseEvent_Leaving(*args, **kwargs)
e811c8ce
RD
3669
3670 def GetPosition(*args, **kwargs):
0df68c9f 3671 """
a95a7133 3672 GetPosition(self) -> Point
e811c8ce 3673
41e2b43e
RD
3674 Returns the position of the mouse in window coordinates when the event
3675 happened.
0df68c9f 3676 """
54f9ee45 3677 return _core_.MouseEvent_GetPosition(*args, **kwargs)
e811c8ce
RD
3678
3679 def GetPositionTuple(*args, **kwargs):
0df68c9f
RD
3680 """
3681 GetPositionTuple() -> (x,y)
e811c8ce 3682
41e2b43e
RD
3683 Returns the position of the mouse in window coordinates when the event
3684 happened.
0df68c9f 3685 """
54f9ee45 3686 return _core_.MouseEvent_GetPositionTuple(*args, **kwargs)
e811c8ce
RD
3687
3688 def GetLogicalPosition(*args, **kwargs):
a95a7133 3689 """GetLogicalPosition(self, DC dc) -> Point"""
54f9ee45 3690 return _core_.MouseEvent_GetLogicalPosition(*args, **kwargs)
e811c8ce
RD
3691
3692 def GetX(*args, **kwargs):
a95a7133 3693 """GetX(self) -> int"""
54f9ee45 3694 return _core_.MouseEvent_GetX(*args, **kwargs)
e811c8ce
RD
3695
3696 def GetY(*args, **kwargs):
a95a7133 3697 """GetY(self) -> int"""
54f9ee45 3698 return _core_.MouseEvent_GetY(*args, **kwargs)
e811c8ce
RD
3699
3700 def GetWheelRotation(*args, **kwargs):
a95a7133 3701 """GetWheelRotation(self) -> int"""
54f9ee45 3702 return _core_.MouseEvent_GetWheelRotation(*args, **kwargs)
e811c8ce
RD
3703
3704 def GetWheelDelta(*args, **kwargs):
a95a7133 3705 """GetWheelDelta(self) -> int"""
54f9ee45 3706 return _core_.MouseEvent_GetWheelDelta(*args, **kwargs)
e811c8ce
RD
3707
3708 def GetLinesPerAction(*args, **kwargs):
a95a7133 3709 """GetLinesPerAction(self) -> int"""
54f9ee45 3710 return _core_.MouseEvent_GetLinesPerAction(*args, **kwargs)
e811c8ce
RD
3711
3712 def IsPageScroll(*args, **kwargs):
a95a7133 3713 """IsPageScroll(self) -> bool"""
54f9ee45
RD
3714 return _core_.MouseEvent_IsPageScroll(*args, **kwargs)
3715
3716 m_x = property(_core_.MouseEvent_m_x_get, _core_.MouseEvent_m_x_set)
3717 m_y = property(_core_.MouseEvent_m_y_get, _core_.MouseEvent_m_y_set)
3718 m_leftDown = property(_core_.MouseEvent_m_leftDown_get, _core_.MouseEvent_m_leftDown_set)
3719 m_middleDown = property(_core_.MouseEvent_m_middleDown_get, _core_.MouseEvent_m_middleDown_set)
3720 m_rightDown = property(_core_.MouseEvent_m_rightDown_get, _core_.MouseEvent_m_rightDown_set)
3721 m_controlDown = property(_core_.MouseEvent_m_controlDown_get, _core_.MouseEvent_m_controlDown_set)
3722 m_shiftDown = property(_core_.MouseEvent_m_shiftDown_get, _core_.MouseEvent_m_shiftDown_set)
3723 m_altDown = property(_core_.MouseEvent_m_altDown_get, _core_.MouseEvent_m_altDown_set)
3724 m_metaDown = property(_core_.MouseEvent_m_metaDown_get, _core_.MouseEvent_m_metaDown_set)
3725 m_wheelRotation = property(_core_.MouseEvent_m_wheelRotation_get, _core_.MouseEvent_m_wheelRotation_set)
3726 m_wheelDelta = property(_core_.MouseEvent_m_wheelDelta_get, _core_.MouseEvent_m_wheelDelta_set)
3727 m_linesPerAction = property(_core_.MouseEvent_m_linesPerAction_get, _core_.MouseEvent_m_linesPerAction_set)
d14a1e28
RD
3728
3729class MouseEventPtr(MouseEvent):
3730 def __init__(self, this):
3731 self.this = this
3732 if not hasattr(self,"thisown"): self.thisown = 0
3733 self.__class__ = MouseEvent
54f9ee45 3734_core_.MouseEvent_swigregister(MouseEventPtr)
d14a1e28
RD
3735
3736#---------------------------------------------------------------------------
3737
3738class SetCursorEvent(Event):
093d3ff1 3739 """Proxy of C++ SetCursorEvent class"""
e811c8ce
RD
3740 def __repr__(self):
3741 return "<%s.%s; proxy of C++ wxSetCursorEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 3742 def __init__(self, *args, **kwargs):
a95a7133 3743 """__init__(self, int x=0, int y=0) -> SetCursorEvent"""
54f9ee45 3744 newobj = _core_.new_SetCursorEvent(*args, **kwargs)
d14a1e28
RD
3745 self.this = newobj.this
3746 self.thisown = 1
3747 del newobj.thisown
e811c8ce 3748 def GetX(*args, **kwargs):
a95a7133 3749 """GetX(self) -> int"""
54f9ee45 3750 return _core_.SetCursorEvent_GetX(*args, **kwargs)
e811c8ce
RD
3751
3752 def GetY(*args, **kwargs):
a95a7133 3753 """GetY(self) -> int"""
54f9ee45 3754 return _core_.SetCursorEvent_GetY(*args, **kwargs)
e811c8ce
RD
3755
3756 def SetCursor(*args, **kwargs):
a95a7133 3757 """SetCursor(self, Cursor cursor)"""
54f9ee45 3758 return _core_.SetCursorEvent_SetCursor(*args, **kwargs)
e811c8ce
RD
3759
3760 def GetCursor(*args, **kwargs):
a95a7133 3761 """GetCursor(self) -> Cursor"""
54f9ee45 3762 return _core_.SetCursorEvent_GetCursor(*args, **kwargs)
e811c8ce
RD
3763
3764 def HasCursor(*args, **kwargs):
a95a7133 3765 """HasCursor(self) -> bool"""
54f9ee45 3766 return _core_.SetCursorEvent_HasCursor(*args, **kwargs)
e811c8ce 3767
d14a1e28
RD
3768
3769class SetCursorEventPtr(SetCursorEvent):
3770 def __init__(self, this):
3771 self.this = this
3772 if not hasattr(self,"thisown"): self.thisown = 0
3773 self.__class__ = SetCursorEvent
54f9ee45 3774_core_.SetCursorEvent_swigregister(SetCursorEventPtr)
d14a1e28
RD
3775
3776#---------------------------------------------------------------------------
3777
3778class KeyEvent(Event):
093d3ff1 3779 """Proxy of C++ KeyEvent class"""
e811c8ce
RD
3780 def __repr__(self):
3781 return "<%s.%s; proxy of C++ wxKeyEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 3782 def __init__(self, *args, **kwargs):
a95a7133 3783 """__init__(self, wxEventType keyType=wxEVT_NULL) -> KeyEvent"""
54f9ee45 3784 newobj = _core_.new_KeyEvent(*args, **kwargs)
d14a1e28
RD
3785 self.this = newobj.this
3786 self.thisown = 1
3787 del newobj.thisown
e811c8ce 3788 def ControlDown(*args, **kwargs):
a95a7133 3789 """ControlDown(self) -> bool"""
54f9ee45 3790 return _core_.KeyEvent_ControlDown(*args, **kwargs)
e811c8ce
RD
3791
3792 def MetaDown(*args, **kwargs):
a95a7133 3793 """MetaDown(self) -> bool"""
54f9ee45 3794 return _core_.KeyEvent_MetaDown(*args, **kwargs)
e811c8ce
RD
3795
3796 def AltDown(*args, **kwargs):
a95a7133 3797 """AltDown(self) -> bool"""
54f9ee45 3798 return _core_.KeyEvent_AltDown(*args, **kwargs)
e811c8ce
RD
3799
3800 def ShiftDown(*args, **kwargs):
a95a7133 3801 """ShiftDown(self) -> bool"""
54f9ee45 3802 return _core_.KeyEvent_ShiftDown(*args, **kwargs)
e811c8ce 3803
412d302d
RD
3804 def CmdDown(*args, **kwargs):
3805 """
3806 CmdDown(self) -> bool
3807
3808 "Cmd" is a pseudo key which is the same as Control for PC and Unix
3809 platforms but the special "Apple" (a.k.a as "Command") key on
3810 Macs: it makes often sense to use it instead of, say, `ControlDown`
3811 because Cmd key is used for the same thing under Mac as Ctrl
3812 elsewhere. The Ctrl still exists, it's just not used for this
3813 purpose. So for non-Mac platforms this is the same as `ControlDown`
3814 and Macs this is the same as `MetaDown`.
3815 """
3816 return _core_.KeyEvent_CmdDown(*args, **kwargs)
3817
e811c8ce 3818 def HasModifiers(*args, **kwargs):
a95a7133 3819 """HasModifiers(self) -> bool"""
54f9ee45 3820 return _core_.KeyEvent_HasModifiers(*args, **kwargs)
e811c8ce
RD
3821
3822 def GetKeyCode(*args, **kwargs):
a95a7133 3823 """GetKeyCode(self) -> int"""
54f9ee45 3824 return _core_.KeyEvent_GetKeyCode(*args, **kwargs)
e811c8ce 3825
d14a1e28 3826 KeyCode = GetKeyCode
19272049
RD
3827 def GetUnicodeKey(*args, **kwargs):
3828 """GetUnicodeKey(self) -> int"""
3829 return _core_.KeyEvent_GetUnicodeKey(*args, **kwargs)
e811c8ce 3830
19272049 3831 GetUniChar = GetUnicodeKey
e811c8ce 3832 def GetRawKeyCode(*args, **kwargs):
a95a7133 3833 """GetRawKeyCode(self) -> unsigned int"""
54f9ee45 3834 return _core_.KeyEvent_GetRawKeyCode(*args, **kwargs)
e811c8ce
RD
3835
3836 def GetRawKeyFlags(*args, **kwargs):
a95a7133 3837 """GetRawKeyFlags(self) -> unsigned int"""
54f9ee45 3838 return _core_.KeyEvent_GetRawKeyFlags(*args, **kwargs)
e811c8ce
RD
3839
3840 def GetPosition(*args, **kwargs):
0df68c9f 3841 """
a95a7133 3842 GetPosition(self) -> Point
e811c8ce 3843
0df68c9f
RD
3844 Find the position of the event.
3845 """
54f9ee45 3846 return _core_.KeyEvent_GetPosition(*args, **kwargs)
e811c8ce
RD
3847
3848 def GetPositionTuple(*args, **kwargs):
0df68c9f
RD
3849 """
3850 GetPositionTuple() -> (x,y)
e811c8ce 3851
0df68c9f
RD
3852 Find the position of the event.
3853 """
54f9ee45 3854 return _core_.KeyEvent_GetPositionTuple(*args, **kwargs)
e811c8ce
RD
3855
3856 def GetX(*args, **kwargs):
a95a7133 3857 """GetX(self) -> int"""
54f9ee45 3858 return _core_.KeyEvent_GetX(*args, **kwargs)
e811c8ce
RD
3859
3860 def GetY(*args, **kwargs):
a95a7133 3861 """GetY(self) -> int"""
54f9ee45
RD
3862 return _core_.KeyEvent_GetY(*args, **kwargs)
3863
3864 m_x = property(_core_.KeyEvent_m_x_get, _core_.KeyEvent_m_x_set)
3865 m_y = property(_core_.KeyEvent_m_y_get, _core_.KeyEvent_m_y_set)
3866 m_keyCode = property(_core_.KeyEvent_m_keyCode_get, _core_.KeyEvent_m_keyCode_set)
3867 m_controlDown = property(_core_.KeyEvent_m_controlDown_get, _core_.KeyEvent_m_controlDown_set)
3868 m_shiftDown = property(_core_.KeyEvent_m_shiftDown_get, _core_.KeyEvent_m_shiftDown_set)
3869 m_altDown = property(_core_.KeyEvent_m_altDown_get, _core_.KeyEvent_m_altDown_set)
3870 m_metaDown = property(_core_.KeyEvent_m_metaDown_get, _core_.KeyEvent_m_metaDown_set)
3871 m_scanCode = property(_core_.KeyEvent_m_scanCode_get, _core_.KeyEvent_m_scanCode_set)
3872 m_rawCode = property(_core_.KeyEvent_m_rawCode_get, _core_.KeyEvent_m_rawCode_set)
3873 m_rawFlags = property(_core_.KeyEvent_m_rawFlags_get, _core_.KeyEvent_m_rawFlags_set)
d14a1e28
RD
3874
3875class KeyEventPtr(KeyEvent):
3876 def __init__(self, this):
3877 self.this = this
3878 if not hasattr(self,"thisown"): self.thisown = 0
3879 self.__class__ = KeyEvent
54f9ee45 3880_core_.KeyEvent_swigregister(KeyEventPtr)
d14a1e28
RD
3881
3882#---------------------------------------------------------------------------
3883
3884class SizeEvent(Event):
093d3ff1 3885 """Proxy of C++ SizeEvent class"""
e811c8ce
RD
3886 def __repr__(self):
3887 return "<%s.%s; proxy of C++ wxSizeEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 3888 def __init__(self, *args, **kwargs):
a95a7133 3889 """__init__(self, Size sz=DefaultSize, int winid=0) -> SizeEvent"""
54f9ee45 3890 newobj = _core_.new_SizeEvent(*args, **kwargs)
d14a1e28
RD
3891 self.this = newobj.this
3892 self.thisown = 1
3893 del newobj.thisown
e811c8ce 3894 def GetSize(*args, **kwargs):
a95a7133 3895 """GetSize(self) -> Size"""
54f9ee45 3896 return _core_.SizeEvent_GetSize(*args, **kwargs)
e811c8ce
RD
3897
3898 def GetRect(*args, **kwargs):
a95a7133 3899 """GetRect(self) -> Rect"""
54f9ee45 3900 return _core_.SizeEvent_GetRect(*args, **kwargs)
e811c8ce
RD
3901
3902 def SetRect(*args, **kwargs):
a95a7133 3903 """SetRect(self, Rect rect)"""
54f9ee45 3904 return _core_.SizeEvent_SetRect(*args, **kwargs)
e811c8ce
RD
3905
3906 def SetSize(*args, **kwargs):
a95a7133 3907 """SetSize(self, Size size)"""
54f9ee45 3908 return _core_.SizeEvent_SetSize(*args, **kwargs)
e811c8ce 3909
54f9ee45
RD
3910 m_size = property(_core_.SizeEvent_m_size_get, _core_.SizeEvent_m_size_set)
3911 m_rect = property(_core_.SizeEvent_m_rect_get, _core_.SizeEvent_m_rect_set)
d14a1e28
RD
3912
3913class SizeEventPtr(SizeEvent):
3914 def __init__(self, this):
3915 self.this = this
3916 if not hasattr(self,"thisown"): self.thisown = 0
3917 self.__class__ = SizeEvent
54f9ee45 3918_core_.SizeEvent_swigregister(SizeEventPtr)
d14a1e28
RD
3919
3920#---------------------------------------------------------------------------
3921
3922class MoveEvent(Event):
093d3ff1 3923 """Proxy of C++ MoveEvent class"""
e811c8ce
RD
3924 def __repr__(self):
3925 return "<%s.%s; proxy of C++ wxMoveEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 3926 def __init__(self, *args, **kwargs):
a95a7133 3927 """__init__(self, Point pos=DefaultPosition, int winid=0) -> MoveEvent"""
54f9ee45 3928 newobj = _core_.new_MoveEvent(*args, **kwargs)
d14a1e28
RD
3929 self.this = newobj.this
3930 self.thisown = 1
3931 del newobj.thisown
e811c8ce 3932 def GetPosition(*args, **kwargs):
a95a7133 3933 """GetPosition(self) -> Point"""
54f9ee45 3934 return _core_.MoveEvent_GetPosition(*args, **kwargs)
e811c8ce
RD
3935
3936 def GetRect(*args, **kwargs):
a95a7133 3937 """GetRect(self) -> Rect"""
54f9ee45 3938 return _core_.MoveEvent_GetRect(*args, **kwargs)
e811c8ce
RD
3939
3940 def SetRect(*args, **kwargs):
a95a7133 3941 """SetRect(self, Rect rect)"""
54f9ee45 3942 return _core_.MoveEvent_SetRect(*args, **kwargs)
e811c8ce
RD
3943
3944 def SetPosition(*args, **kwargs):
a95a7133 3945 """SetPosition(self, Point pos)"""
54f9ee45 3946 return _core_.MoveEvent_SetPosition(*args, **kwargs)
e811c8ce 3947
7557b9b5
RD
3948 m_pos = property(GetPosition, SetPosition)
3949 m_rect = property(GetRect, SetRect)
3950
d14a1e28
RD
3951
3952class MoveEventPtr(MoveEvent):
3953 def __init__(self, this):
3954 self.this = this
3955 if not hasattr(self,"thisown"): self.thisown = 0
3956 self.__class__ = MoveEvent
54f9ee45 3957_core_.MoveEvent_swigregister(MoveEventPtr)
d14a1e28
RD
3958
3959#---------------------------------------------------------------------------
3960
3961class PaintEvent(Event):
093d3ff1 3962 """Proxy of C++ PaintEvent class"""
e811c8ce
RD
3963 def __repr__(self):
3964 return "<%s.%s; proxy of C++ wxPaintEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 3965 def __init__(self, *args, **kwargs):
a95a7133 3966 """__init__(self, int Id=0) -> PaintEvent"""
54f9ee45 3967 newobj = _core_.new_PaintEvent(*args, **kwargs)
d14a1e28
RD
3968 self.this = newobj.this
3969 self.thisown = 1
3970 del newobj.thisown
d14a1e28
RD
3971
3972class PaintEventPtr(PaintEvent):
3973 def __init__(self, this):
3974 self.this = this
3975 if not hasattr(self,"thisown"): self.thisown = 0
3976 self.__class__ = PaintEvent
54f9ee45 3977_core_.PaintEvent_swigregister(PaintEventPtr)
d14a1e28
RD
3978
3979class NcPaintEvent(Event):
093d3ff1 3980 """Proxy of C++ NcPaintEvent class"""
e811c8ce
RD
3981 def __repr__(self):
3982 return "<%s.%s; proxy of C++ wxNcPaintEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 3983 def __init__(self, *args, **kwargs):
a95a7133 3984 """__init__(self, int winid=0) -> NcPaintEvent"""
54f9ee45 3985 newobj = _core_.new_NcPaintEvent(*args, **kwargs)
d14a1e28
RD
3986 self.this = newobj.this
3987 self.thisown = 1
3988 del newobj.thisown
d14a1e28
RD
3989
3990class NcPaintEventPtr(NcPaintEvent):
3991 def __init__(self, this):
3992 self.this = this
3993 if not hasattr(self,"thisown"): self.thisown = 0
3994 self.__class__ = NcPaintEvent
54f9ee45 3995_core_.NcPaintEvent_swigregister(NcPaintEventPtr)
d14a1e28
RD
3996
3997#---------------------------------------------------------------------------
3998
3999class EraseEvent(Event):
093d3ff1 4000 """Proxy of C++ EraseEvent class"""
e811c8ce
RD
4001 def __repr__(self):
4002 return "<%s.%s; proxy of C++ wxEraseEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 4003 def __init__(self, *args, **kwargs):
a95a7133 4004 """__init__(self, int Id=0, DC dc=(wxDC *) NULL) -> EraseEvent"""
54f9ee45 4005 newobj = _core_.new_EraseEvent(*args, **kwargs)
d14a1e28
RD
4006 self.this = newobj.this
4007 self.thisown = 1
4008 del newobj.thisown
e811c8ce 4009 def GetDC(*args, **kwargs):
a95a7133 4010 """GetDC(self) -> DC"""
54f9ee45 4011 return _core_.EraseEvent_GetDC(*args, **kwargs)
e811c8ce 4012
d14a1e28
RD
4013
4014class EraseEventPtr(EraseEvent):
4015 def __init__(self, this):
4016 self.this = this
4017 if not hasattr(self,"thisown"): self.thisown = 0
4018 self.__class__ = EraseEvent
54f9ee45 4019_core_.EraseEvent_swigregister(EraseEventPtr)
d14a1e28
RD
4020
4021#---------------------------------------------------------------------------
4022
4023class FocusEvent(Event):
093d3ff1 4024 """Proxy of C++ FocusEvent class"""
e811c8ce
RD
4025 def __repr__(self):
4026 return "<%s.%s; proxy of C++ wxFocusEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 4027 def __init__(self, *args, **kwargs):
a95a7133 4028 """__init__(self, wxEventType type=wxEVT_NULL, int winid=0) -> FocusEvent"""
54f9ee45 4029 newobj = _core_.new_FocusEvent(*args, **kwargs)
d14a1e28
RD
4030 self.this = newobj.this
4031 self.thisown = 1
4032 del newobj.thisown
e811c8ce 4033 def GetWindow(*args, **kwargs):
a95a7133 4034 """GetWindow(self) -> Window"""
54f9ee45 4035 return _core_.FocusEvent_GetWindow(*args, **kwargs)
e811c8ce
RD
4036
4037 def SetWindow(*args, **kwargs):
a95a7133 4038 """SetWindow(self, Window win)"""
54f9ee45 4039 return _core_.FocusEvent_SetWindow(*args, **kwargs)
e811c8ce 4040
d14a1e28
RD
4041
4042class FocusEventPtr(FocusEvent):
4043 def __init__(self, this):
4044 self.this = this
4045 if not hasattr(self,"thisown"): self.thisown = 0
4046 self.__class__ = FocusEvent
54f9ee45 4047_core_.FocusEvent_swigregister(FocusEventPtr)
d14a1e28
RD
4048
4049#---------------------------------------------------------------------------
4050
4051class ChildFocusEvent(CommandEvent):
093d3ff1 4052 """Proxy of C++ ChildFocusEvent class"""
e811c8ce
RD
4053 def __repr__(self):
4054 return "<%s.%s; proxy of C++ wxChildFocusEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 4055 def __init__(self, *args, **kwargs):
a95a7133 4056 """__init__(self, Window win=None) -> ChildFocusEvent"""
54f9ee45 4057 newobj = _core_.new_ChildFocusEvent(*args, **kwargs)
d14a1e28
RD
4058 self.this = newobj.this
4059 self.thisown = 1
4060 del newobj.thisown
e811c8ce 4061 def GetWindow(*args, **kwargs):
a95a7133 4062 """GetWindow(self) -> Window"""
54f9ee45 4063 return _core_.ChildFocusEvent_GetWindow(*args, **kwargs)
e811c8ce 4064
d14a1e28
RD
4065
4066class ChildFocusEventPtr(ChildFocusEvent):
4067 def __init__(self, this):
4068 self.this = this
4069 if not hasattr(self,"thisown"): self.thisown = 0
4070 self.__class__ = ChildFocusEvent
54f9ee45 4071_core_.ChildFocusEvent_swigregister(ChildFocusEventPtr)
d14a1e28
RD
4072
4073#---------------------------------------------------------------------------
4074
4075class ActivateEvent(Event):
093d3ff1 4076 """Proxy of C++ ActivateEvent class"""
e811c8ce
RD
4077 def __repr__(self):
4078 return "<%s.%s; proxy of C++ wxActivateEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 4079 def __init__(self, *args, **kwargs):
a95a7133 4080 """__init__(self, wxEventType type=wxEVT_NULL, bool active=True, int Id=0) -> ActivateEvent"""
54f9ee45 4081 newobj = _core_.new_ActivateEvent(*args, **kwargs)
d14a1e28
RD
4082 self.this = newobj.this
4083 self.thisown = 1
4084 del newobj.thisown
e811c8ce 4085 def GetActive(*args, **kwargs):
a95a7133 4086 """GetActive(self) -> bool"""
54f9ee45 4087 return _core_.ActivateEvent_GetActive(*args, **kwargs)
e811c8ce 4088
d14a1e28
RD
4089
4090class ActivateEventPtr(ActivateEvent):
4091 def __init__(self, this):
4092 self.this = this
4093 if not hasattr(self,"thisown"): self.thisown = 0
4094 self.__class__ = ActivateEvent
54f9ee45 4095_core_.ActivateEvent_swigregister(ActivateEventPtr)
d14a1e28
RD
4096
4097#---------------------------------------------------------------------------
4098
4099class InitDialogEvent(Event):
093d3ff1 4100 """Proxy of C++ InitDialogEvent class"""
e811c8ce
RD
4101 def __repr__(self):
4102 return "<%s.%s; proxy of C++ wxInitDialogEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 4103 def __init__(self, *args, **kwargs):
a95a7133 4104 """__init__(self, int Id=0) -> InitDialogEvent"""
54f9ee45 4105 newobj = _core_.new_InitDialogEvent(*args, **kwargs)
d14a1e28
RD
4106 self.this = newobj.this
4107 self.thisown = 1
4108 del newobj.thisown
d14a1e28
RD
4109
4110class InitDialogEventPtr(InitDialogEvent):
4111 def __init__(self, this):
4112 self.this = this
4113 if not hasattr(self,"thisown"): self.thisown = 0
4114 self.__class__ = InitDialogEvent
54f9ee45 4115_core_.InitDialogEvent_swigregister(InitDialogEventPtr)
d14a1e28
RD
4116
4117#---------------------------------------------------------------------------
4118
4119class MenuEvent(Event):
093d3ff1 4120 """Proxy of C++ MenuEvent class"""
e811c8ce
RD
4121 def __repr__(self):
4122 return "<%s.%s; proxy of C++ wxMenuEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 4123 def __init__(self, *args, **kwargs):
a95a7133 4124 """__init__(self, wxEventType type=wxEVT_NULL, int winid=0, Menu menu=None) -> MenuEvent"""
54f9ee45 4125 newobj = _core_.new_MenuEvent(*args, **kwargs)
d14a1e28
RD
4126 self.this = newobj.this
4127 self.thisown = 1
4128 del newobj.thisown
e811c8ce 4129 def GetMenuId(*args, **kwargs):
a95a7133 4130 """GetMenuId(self) -> int"""
54f9ee45 4131 return _core_.MenuEvent_GetMenuId(*args, **kwargs)
e811c8ce
RD
4132
4133 def IsPopup(*args, **kwargs):
a95a7133 4134 """IsPopup(self) -> bool"""
54f9ee45 4135 return _core_.MenuEvent_IsPopup(*args, **kwargs)
e811c8ce
RD
4136
4137 def GetMenu(*args, **kwargs):
a95a7133 4138 """GetMenu(self) -> Menu"""
54f9ee45 4139 return _core_.MenuEvent_GetMenu(*args, **kwargs)
e811c8ce 4140
d14a1e28
RD
4141
4142class MenuEventPtr(MenuEvent):
4143 def __init__(self, this):
4144 self.this = this
4145 if not hasattr(self,"thisown"): self.thisown = 0
4146 self.__class__ = MenuEvent
54f9ee45 4147_core_.MenuEvent_swigregister(MenuEventPtr)
d14a1e28
RD
4148
4149#---------------------------------------------------------------------------
4150
4151class CloseEvent(Event):
093d3ff1 4152 """Proxy of C++ CloseEvent class"""
e811c8ce
RD
4153 def __repr__(self):
4154 return "<%s.%s; proxy of C++ wxCloseEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 4155 def __init__(self, *args, **kwargs):
a95a7133 4156 """__init__(self, wxEventType type=wxEVT_NULL, int winid=0) -> CloseEvent"""
54f9ee45 4157 newobj = _core_.new_CloseEvent(*args, **kwargs)
d14a1e28
RD
4158 self.this = newobj.this
4159 self.thisown = 1
4160 del newobj.thisown
e811c8ce 4161 def SetLoggingOff(*args, **kwargs):
a95a7133 4162 """SetLoggingOff(self, bool logOff)"""
54f9ee45 4163 return _core_.CloseEvent_SetLoggingOff(*args, **kwargs)
e811c8ce
RD
4164
4165 def GetLoggingOff(*args, **kwargs):
a95a7133 4166 """GetLoggingOff(self) -> bool"""
54f9ee45 4167 return _core_.CloseEvent_GetLoggingOff(*args, **kwargs)
e811c8ce
RD
4168
4169 def Veto(*args, **kwargs):
a95a7133 4170 """Veto(self, bool veto=True)"""
54f9ee45 4171 return _core_.CloseEvent_Veto(*args, **kwargs)
e811c8ce
RD
4172
4173 def SetCanVeto(*args, **kwargs):
a95a7133 4174 """SetCanVeto(self, bool canVeto)"""
54f9ee45 4175 return _core_.CloseEvent_SetCanVeto(*args, **kwargs)
e811c8ce
RD
4176
4177 def CanVeto(*args, **kwargs):
a95a7133 4178 """CanVeto(self) -> bool"""
54f9ee45 4179 return _core_.CloseEvent_CanVeto(*args, **kwargs)
e811c8ce
RD
4180
4181 def GetVeto(*args, **kwargs):
a95a7133 4182 """GetVeto(self) -> bool"""
54f9ee45 4183 return _core_.CloseEvent_GetVeto(*args, **kwargs)
e811c8ce 4184
d14a1e28
RD
4185
4186class CloseEventPtr(CloseEvent):
4187 def __init__(self, this):
4188 self.this = this
4189 if not hasattr(self,"thisown"): self.thisown = 0
4190 self.__class__ = CloseEvent
54f9ee45 4191_core_.CloseEvent_swigregister(CloseEventPtr)
d14a1e28
RD
4192
4193#---------------------------------------------------------------------------
4194
4195class ShowEvent(Event):
093d3ff1 4196 """Proxy of C++ ShowEvent class"""
e811c8ce
RD
4197 def __repr__(self):
4198 return "<%s.%s; proxy of C++ wxShowEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 4199 def __init__(self, *args, **kwargs):
a95a7133 4200 """__init__(self, int winid=0, bool show=False) -> ShowEvent"""
54f9ee45 4201 newobj = _core_.new_ShowEvent(*args, **kwargs)
d14a1e28
RD
4202 self.this = newobj.this
4203 self.thisown = 1
4204 del newobj.thisown
e811c8ce 4205 def SetShow(*args, **kwargs):
a95a7133 4206 """SetShow(self, bool show)"""
54f9ee45 4207 return _core_.ShowEvent_SetShow(*args, **kwargs)
e811c8ce
RD
4208
4209 def GetShow(*args, **kwargs):
a95a7133 4210 """GetShow(self) -> bool"""
54f9ee45 4211 return _core_.ShowEvent_GetShow(*args, **kwargs)
e811c8ce 4212
d14a1e28
RD
4213
4214class ShowEventPtr(ShowEvent):
4215 def __init__(self, this):
4216 self.this = this
4217 if not hasattr(self,"thisown"): self.thisown = 0
4218 self.__class__ = ShowEvent
54f9ee45 4219_core_.ShowEvent_swigregister(ShowEventPtr)
d14a1e28
RD
4220
4221#---------------------------------------------------------------------------
4222
4223class IconizeEvent(Event):
093d3ff1 4224 """Proxy of C++ IconizeEvent class"""
e811c8ce
RD
4225 def __repr__(self):
4226 return "<%s.%s; proxy of C++ wxIconizeEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 4227 def __init__(self, *args, **kwargs):
a95a7133 4228 """__init__(self, int id=0, bool iconized=True) -> IconizeEvent"""
54f9ee45 4229 newobj = _core_.new_IconizeEvent(*args, **kwargs)
d14a1e28
RD
4230 self.this = newobj.this
4231 self.thisown = 1
4232 del newobj.thisown
e811c8ce 4233 def Iconized(*args, **kwargs):
a95a7133 4234 """Iconized(self) -> bool"""
54f9ee45 4235 return _core_.IconizeEvent_Iconized(*args, **kwargs)
e811c8ce 4236
d14a1e28
RD
4237
4238class IconizeEventPtr(IconizeEvent):
4239 def __init__(self, this):
4240 self.this = this
4241 if not hasattr(self,"thisown"): self.thisown = 0
4242 self.__class__ = IconizeEvent
54f9ee45 4243_core_.IconizeEvent_swigregister(IconizeEventPtr)
d14a1e28
RD
4244
4245#---------------------------------------------------------------------------
4246
4247class MaximizeEvent(Event):
093d3ff1 4248 """Proxy of C++ MaximizeEvent class"""
e811c8ce
RD
4249 def __repr__(self):
4250 return "<%s.%s; proxy of C++ wxMaximizeEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 4251 def __init__(self, *args, **kwargs):
a95a7133 4252 """__init__(self, int id=0) -> MaximizeEvent"""
54f9ee45 4253 newobj = _core_.new_MaximizeEvent(*args, **kwargs)
d14a1e28
RD
4254 self.this = newobj.this
4255 self.thisown = 1
4256 del newobj.thisown
d14a1e28
RD
4257
4258class MaximizeEventPtr(MaximizeEvent):
4259 def __init__(self, this):
4260 self.this = this
4261 if not hasattr(self,"thisown"): self.thisown = 0
4262 self.__class__ = MaximizeEvent
54f9ee45 4263_core_.MaximizeEvent_swigregister(MaximizeEventPtr)
d14a1e28
RD
4264
4265#---------------------------------------------------------------------------
4266
4267class DropFilesEvent(Event):
093d3ff1 4268 """Proxy of C++ DropFilesEvent class"""
d14a1e28
RD
4269 def __init__(self): raise RuntimeError, "No constructor defined"
4270 def __repr__(self):
4271 return "<%s.%s; proxy of C++ wxDropFilesEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
e811c8ce 4272 def GetPosition(*args, **kwargs):
a95a7133 4273 """GetPosition(self) -> Point"""
54f9ee45 4274 return _core_.DropFilesEvent_GetPosition(*args, **kwargs)
e811c8ce
RD
4275
4276 def GetNumberOfFiles(*args, **kwargs):
a95a7133 4277 """GetNumberOfFiles(self) -> int"""
54f9ee45 4278 return _core_.DropFilesEvent_GetNumberOfFiles(*args, **kwargs)
e811c8ce
RD
4279
4280 def GetFiles(*args, **kwargs):
a95a7133 4281 """GetFiles(self) -> PyObject"""
54f9ee45 4282 return _core_.DropFilesEvent_GetFiles(*args, **kwargs)
e811c8ce 4283
d14a1e28
RD
4284
4285class DropFilesEventPtr(DropFilesEvent):
4286 def __init__(self, this):
4287 self.this = this
4288 if not hasattr(self,"thisown"): self.thisown = 0
4289 self.__class__ = DropFilesEvent
54f9ee45 4290_core_.DropFilesEvent_swigregister(DropFilesEventPtr)
d14a1e28
RD
4291
4292#---------------------------------------------------------------------------
4293
54f9ee45
RD
4294UPDATE_UI_PROCESS_ALL = _core_.UPDATE_UI_PROCESS_ALL
4295UPDATE_UI_PROCESS_SPECIFIED = _core_.UPDATE_UI_PROCESS_SPECIFIED
d14a1e28 4296class UpdateUIEvent(CommandEvent):
093d3ff1 4297 """Proxy of C++ UpdateUIEvent class"""
e811c8ce
RD
4298 def __repr__(self):
4299 return "<%s.%s; proxy of C++ wxUpdateUIEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 4300 def __init__(self, *args, **kwargs):
a95a7133 4301 """__init__(self, int commandId=0) -> UpdateUIEvent"""
54f9ee45 4302 newobj = _core_.new_UpdateUIEvent(*args, **kwargs)
d14a1e28
RD
4303 self.this = newobj.this
4304 self.thisown = 1
4305 del newobj.thisown
e811c8ce 4306 def GetChecked(*args, **kwargs):
a95a7133 4307 """GetChecked(self) -> bool"""
54f9ee45 4308 return _core_.UpdateUIEvent_GetChecked(*args, **kwargs)
e811c8ce
RD
4309
4310 def GetEnabled(*args, **kwargs):
a95a7133 4311 """GetEnabled(self) -> bool"""
54f9ee45 4312 return _core_.UpdateUIEvent_GetEnabled(*args, **kwargs)
e811c8ce
RD
4313
4314 def GetText(*args, **kwargs):
a95a7133 4315 """GetText(self) -> String"""
54f9ee45 4316 return _core_.UpdateUIEvent_GetText(*args, **kwargs)
e811c8ce
RD
4317
4318 def GetSetText(*args, **kwargs):
a95a7133 4319 """GetSetText(self) -> bool"""
54f9ee45 4320 return _core_.UpdateUIEvent_GetSetText(*args, **kwargs)
e811c8ce
RD
4321
4322 def GetSetChecked(*args, **kwargs):
a95a7133 4323 """GetSetChecked(self) -> bool"""
54f9ee45 4324 return _core_.UpdateUIEvent_GetSetChecked(*args, **kwargs)
e811c8ce
RD
4325
4326 def GetSetEnabled(*args, **kwargs):
a95a7133 4327 """GetSetEnabled(self) -> bool"""
54f9ee45 4328 return _core_.UpdateUIEvent_GetSetEnabled(*args, **kwargs)
e811c8ce
RD
4329
4330 def Check(*args, **kwargs):
a95a7133 4331 """Check(self, bool check)"""
54f9ee45 4332 return _core_.UpdateUIEvent_Check(*args, **kwargs)
e811c8ce
RD
4333
4334 def Enable(*args, **kwargs):
a95a7133 4335 """Enable(self, bool enable)"""
54f9ee45 4336 return _core_.UpdateUIEvent_Enable(*args, **kwargs)
e811c8ce
RD
4337
4338 def SetText(*args, **kwargs):
a95a7133 4339 """SetText(self, String text)"""
54f9ee45 4340 return _core_.UpdateUIEvent_SetText(*args, **kwargs)
e811c8ce
RD
4341
4342 def SetUpdateInterval(*args, **kwargs):
66c033b4 4343 """SetUpdateInterval(long updateInterval)"""
54f9ee45 4344 return _core_.UpdateUIEvent_SetUpdateInterval(*args, **kwargs)
e811c8ce
RD
4345
4346 SetUpdateInterval = staticmethod(SetUpdateInterval)
4347 def GetUpdateInterval(*args, **kwargs):
66c033b4 4348 """GetUpdateInterval() -> long"""
54f9ee45 4349 return _core_.UpdateUIEvent_GetUpdateInterval(*args, **kwargs)
e811c8ce
RD
4350
4351 GetUpdateInterval = staticmethod(GetUpdateInterval)
4352 def CanUpdate(*args, **kwargs):
66c033b4 4353 """CanUpdate(Window win) -> bool"""
54f9ee45 4354 return _core_.UpdateUIEvent_CanUpdate(*args, **kwargs)
e811c8ce
RD
4355
4356 CanUpdate = staticmethod(CanUpdate)
4357 def ResetUpdateTime(*args, **kwargs):
66c033b4 4358 """ResetUpdateTime()"""
54f9ee45 4359 return _core_.UpdateUIEvent_ResetUpdateTime(*args, **kwargs)
e811c8ce
RD
4360
4361 ResetUpdateTime = staticmethod(ResetUpdateTime)
4362 def SetMode(*args, **kwargs):
66c033b4 4363 """SetMode(int mode)"""
54f9ee45 4364 return _core_.UpdateUIEvent_SetMode(*args, **kwargs)
e811c8ce
RD
4365
4366 SetMode = staticmethod(SetMode)
4367 def GetMode(*args, **kwargs):
66c033b4 4368 """GetMode() -> int"""
54f9ee45 4369 return _core_.UpdateUIEvent_GetMode(*args, **kwargs)
e811c8ce
RD
4370
4371 GetMode = staticmethod(GetMode)
d14a1e28
RD
4372
4373class UpdateUIEventPtr(UpdateUIEvent):
4374 def __init__(self, this):
4375 self.this = this
4376 if not hasattr(self,"thisown"): self.thisown = 0
4377 self.__class__ = UpdateUIEvent
54f9ee45 4378_core_.UpdateUIEvent_swigregister(UpdateUIEventPtr)
d14a1e28 4379
e811c8ce
RD
4380def UpdateUIEvent_SetUpdateInterval(*args, **kwargs):
4381 """UpdateUIEvent_SetUpdateInterval(long updateInterval)"""
54f9ee45 4382 return _core_.UpdateUIEvent_SetUpdateInterval(*args, **kwargs)
d14a1e28 4383
e811c8ce
RD
4384def UpdateUIEvent_GetUpdateInterval(*args, **kwargs):
4385 """UpdateUIEvent_GetUpdateInterval() -> long"""
54f9ee45 4386 return _core_.UpdateUIEvent_GetUpdateInterval(*args, **kwargs)
d14a1e28 4387
e811c8ce
RD
4388def UpdateUIEvent_CanUpdate(*args, **kwargs):
4389 """UpdateUIEvent_CanUpdate(Window win) -> bool"""
54f9ee45 4390 return _core_.UpdateUIEvent_CanUpdate(*args, **kwargs)
d14a1e28 4391
e811c8ce
RD
4392def UpdateUIEvent_ResetUpdateTime(*args, **kwargs):
4393 """UpdateUIEvent_ResetUpdateTime()"""
54f9ee45 4394 return _core_.UpdateUIEvent_ResetUpdateTime(*args, **kwargs)
d14a1e28 4395
e811c8ce 4396def UpdateUIEvent_SetMode(*args, **kwargs):
196addbf 4397 """UpdateUIEvent_SetMode(int mode)"""
54f9ee45 4398 return _core_.UpdateUIEvent_SetMode(*args, **kwargs)
d14a1e28 4399
e811c8ce 4400def UpdateUIEvent_GetMode(*args, **kwargs):
196addbf 4401 """UpdateUIEvent_GetMode() -> int"""
54f9ee45 4402 return _core_.UpdateUIEvent_GetMode(*args, **kwargs)
d14a1e28
RD
4403
4404#---------------------------------------------------------------------------
4405
4406class SysColourChangedEvent(Event):
093d3ff1 4407 """Proxy of C++ SysColourChangedEvent class"""
e811c8ce
RD
4408 def __repr__(self):
4409 return "<%s.%s; proxy of C++ wxSysColourChangedEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 4410 def __init__(self, *args, **kwargs):
a95a7133 4411 """__init__(self) -> SysColourChangedEvent"""
54f9ee45 4412 newobj = _core_.new_SysColourChangedEvent(*args, **kwargs)
d14a1e28
RD
4413 self.this = newobj.this
4414 self.thisown = 1
4415 del newobj.thisown
d14a1e28
RD
4416
4417class SysColourChangedEventPtr(SysColourChangedEvent):
4418 def __init__(self, this):
4419 self.this = this
4420 if not hasattr(self,"thisown"): self.thisown = 0
4421 self.__class__ = SysColourChangedEvent
54f9ee45 4422_core_.SysColourChangedEvent_swigregister(SysColourChangedEventPtr)
d14a1e28
RD
4423
4424#---------------------------------------------------------------------------
4425
4426class MouseCaptureChangedEvent(Event):
093d3ff1 4427 """Proxy of C++ MouseCaptureChangedEvent class"""
e811c8ce
RD
4428 def __repr__(self):
4429 return "<%s.%s; proxy of C++ wxMouseCaptureChangedEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 4430 def __init__(self, *args, **kwargs):
a95a7133 4431 """__init__(self, int winid=0, Window gainedCapture=None) -> MouseCaptureChangedEvent"""
54f9ee45 4432 newobj = _core_.new_MouseCaptureChangedEvent(*args, **kwargs)
d14a1e28
RD
4433 self.this = newobj.this
4434 self.thisown = 1
4435 del newobj.thisown
e811c8ce 4436 def GetCapturedWindow(*args, **kwargs):
a95a7133 4437 """GetCapturedWindow(self) -> Window"""
54f9ee45 4438 return _core_.MouseCaptureChangedEvent_GetCapturedWindow(*args, **kwargs)
e811c8ce 4439
d14a1e28
RD
4440
4441class MouseCaptureChangedEventPtr(MouseCaptureChangedEvent):
4442 def __init__(self, this):
4443 self.this = this
4444 if not hasattr(self,"thisown"): self.thisown = 0
4445 self.__class__ = MouseCaptureChangedEvent
54f9ee45 4446_core_.MouseCaptureChangedEvent_swigregister(MouseCaptureChangedEventPtr)
d14a1e28
RD
4447
4448#---------------------------------------------------------------------------
4449
4450class DisplayChangedEvent(Event):
093d3ff1 4451 """Proxy of C++ DisplayChangedEvent class"""
e811c8ce
RD
4452 def __repr__(self):
4453 return "<%s.%s; proxy of C++ wxDisplayChangedEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 4454 def __init__(self, *args, **kwargs):
a95a7133 4455 """__init__(self) -> DisplayChangedEvent"""
54f9ee45 4456 newobj = _core_.new_DisplayChangedEvent(*args, **kwargs)
d14a1e28
RD
4457 self.this = newobj.this
4458 self.thisown = 1
4459 del newobj.thisown
d14a1e28
RD
4460
4461class DisplayChangedEventPtr(DisplayChangedEvent):
4462 def __init__(self, this):
4463 self.this = this
4464 if not hasattr(self,"thisown"): self.thisown = 0
4465 self.__class__ = DisplayChangedEvent
54f9ee45 4466_core_.DisplayChangedEvent_swigregister(DisplayChangedEventPtr)
d14a1e28
RD
4467
4468#---------------------------------------------------------------------------
4469
4470class PaletteChangedEvent(Event):
093d3ff1 4471 """Proxy of C++ PaletteChangedEvent class"""
e811c8ce
RD
4472 def __repr__(self):
4473 return "<%s.%s; proxy of C++ wxPaletteChangedEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 4474 def __init__(self, *args, **kwargs):
a95a7133 4475 """__init__(self, int id=0) -> PaletteChangedEvent"""
54f9ee45 4476 newobj = _core_.new_PaletteChangedEvent(*args, **kwargs)
d14a1e28
RD
4477 self.this = newobj.this
4478 self.thisown = 1
4479 del newobj.thisown
e811c8ce 4480 def SetChangedWindow(*args, **kwargs):
a95a7133 4481 """SetChangedWindow(self, Window win)"""
54f9ee45 4482 return _core_.PaletteChangedEvent_SetChangedWindow(*args, **kwargs)
e811c8ce
RD
4483
4484 def GetChangedWindow(*args, **kwargs):
a95a7133 4485 """GetChangedWindow(self) -> Window"""
54f9ee45 4486 return _core_.PaletteChangedEvent_GetChangedWindow(*args, **kwargs)
e811c8ce 4487
d14a1e28
RD
4488
4489class PaletteChangedEventPtr(PaletteChangedEvent):
4490 def __init__(self, this):
4491 self.this = this
4492 if not hasattr(self,"thisown"): self.thisown = 0
4493 self.__class__ = PaletteChangedEvent
54f9ee45 4494_core_.PaletteChangedEvent_swigregister(PaletteChangedEventPtr)
d14a1e28
RD
4495
4496#---------------------------------------------------------------------------
4497
4498class QueryNewPaletteEvent(Event):
093d3ff1 4499 """Proxy of C++ QueryNewPaletteEvent class"""
e811c8ce
RD
4500 def __repr__(self):
4501 return "<%s.%s; proxy of C++ wxQueryNewPaletteEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 4502 def __init__(self, *args, **kwargs):
a95a7133 4503 """__init__(self, int winid=0) -> QueryNewPaletteEvent"""
54f9ee45 4504 newobj = _core_.new_QueryNewPaletteEvent(*args, **kwargs)
d14a1e28
RD
4505 self.this = newobj.this
4506 self.thisown = 1
4507 del newobj.thisown
e811c8ce 4508 def SetPaletteRealized(*args, **kwargs):
a95a7133 4509 """SetPaletteRealized(self, bool realized)"""
54f9ee45 4510 return _core_.QueryNewPaletteEvent_SetPaletteRealized(*args, **kwargs)
e811c8ce
RD
4511
4512 def GetPaletteRealized(*args, **kwargs):
a95a7133 4513 """GetPaletteRealized(self) -> bool"""
54f9ee45 4514 return _core_.QueryNewPaletteEvent_GetPaletteRealized(*args, **kwargs)
e811c8ce 4515
d14a1e28
RD
4516
4517class QueryNewPaletteEventPtr(QueryNewPaletteEvent):
4518 def __init__(self, this):
4519 self.this = this
4520 if not hasattr(self,"thisown"): self.thisown = 0
4521 self.__class__ = QueryNewPaletteEvent
54f9ee45 4522_core_.QueryNewPaletteEvent_swigregister(QueryNewPaletteEventPtr)
d14a1e28
RD
4523
4524#---------------------------------------------------------------------------
4525
4526class NavigationKeyEvent(Event):
093d3ff1 4527 """Proxy of C++ NavigationKeyEvent class"""
e811c8ce
RD
4528 def __repr__(self):
4529 return "<%s.%s; proxy of C++ wxNavigationKeyEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 4530 def __init__(self, *args, **kwargs):
a95a7133 4531 """__init__(self) -> NavigationKeyEvent"""
54f9ee45 4532 newobj = _core_.new_NavigationKeyEvent(*args, **kwargs)
d14a1e28
RD
4533 self.this = newobj.this
4534 self.thisown = 1
4535 del newobj.thisown
e811c8ce 4536 def GetDirection(*args, **kwargs):
a95a7133 4537 """GetDirection(self) -> bool"""
54f9ee45 4538 return _core_.NavigationKeyEvent_GetDirection(*args, **kwargs)
e811c8ce
RD
4539
4540 def SetDirection(*args, **kwargs):
908b74cd 4541 """SetDirection(self, bool forward)"""
54f9ee45 4542 return _core_.NavigationKeyEvent_SetDirection(*args, **kwargs)
e811c8ce
RD
4543
4544 def IsWindowChange(*args, **kwargs):
a95a7133 4545 """IsWindowChange(self) -> bool"""
54f9ee45 4546 return _core_.NavigationKeyEvent_IsWindowChange(*args, **kwargs)
e811c8ce
RD
4547
4548 def SetWindowChange(*args, **kwargs):
908b74cd 4549 """SetWindowChange(self, bool ischange)"""
54f9ee45 4550 return _core_.NavigationKeyEvent_SetWindowChange(*args, **kwargs)
e811c8ce 4551
908b74cd
RD
4552 def SetFlags(*args, **kwargs):
4553 """SetFlags(self, long flags)"""
4554 return _core_.NavigationKeyEvent_SetFlags(*args, **kwargs)
4555
e811c8ce 4556 def GetCurrentFocus(*args, **kwargs):
a95a7133 4557 """GetCurrentFocus(self) -> Window"""
54f9ee45 4558 return _core_.NavigationKeyEvent_GetCurrentFocus(*args, **kwargs)
e811c8ce
RD
4559
4560 def SetCurrentFocus(*args, **kwargs):
a95a7133 4561 """SetCurrentFocus(self, Window win)"""
54f9ee45 4562 return _core_.NavigationKeyEvent_SetCurrentFocus(*args, **kwargs)
e811c8ce 4563
b0f7404b 4564 IsBackward = _core_.NavigationKeyEvent_IsBackward
908b74cd
RD
4565 IsForward = _core_.NavigationKeyEvent_IsForward
4566 WinChange = _core_.NavigationKeyEvent_WinChange
d14a1e28
RD
4567
4568class NavigationKeyEventPtr(NavigationKeyEvent):
4569 def __init__(self, this):
4570 self.this = this
4571 if not hasattr(self,"thisown"): self.thisown = 0
4572 self.__class__ = NavigationKeyEvent
54f9ee45 4573_core_.NavigationKeyEvent_swigregister(NavigationKeyEventPtr)
d14a1e28
RD
4574
4575#---------------------------------------------------------------------------
4576
4577class WindowCreateEvent(CommandEvent):
093d3ff1 4578 """Proxy of C++ WindowCreateEvent class"""
e811c8ce
RD
4579 def __repr__(self):
4580 return "<%s.%s; proxy of C++ wxWindowCreateEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 4581 def __init__(self, *args, **kwargs):
a95a7133 4582 """__init__(self, Window win=None) -> WindowCreateEvent"""
54f9ee45 4583 newobj = _core_.new_WindowCreateEvent(*args, **kwargs)
d14a1e28
RD
4584 self.this = newobj.this
4585 self.thisown = 1
4586 del newobj.thisown
e811c8ce 4587 def GetWindow(*args, **kwargs):
a95a7133 4588 """GetWindow(self) -> Window"""
54f9ee45 4589 return _core_.WindowCreateEvent_GetWindow(*args, **kwargs)
e811c8ce 4590
d14a1e28
RD
4591
4592class WindowCreateEventPtr(WindowCreateEvent):
4593 def __init__(self, this):
4594 self.this = this
4595 if not hasattr(self,"thisown"): self.thisown = 0
4596 self.__class__ = WindowCreateEvent
54f9ee45 4597_core_.WindowCreateEvent_swigregister(WindowCreateEventPtr)
d14a1e28
RD
4598
4599class WindowDestroyEvent(CommandEvent):
093d3ff1 4600 """Proxy of C++ WindowDestroyEvent class"""
e811c8ce
RD
4601 def __repr__(self):
4602 return "<%s.%s; proxy of C++ wxWindowDestroyEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 4603 def __init__(self, *args, **kwargs):
a95a7133 4604 """__init__(self, Window win=None) -> WindowDestroyEvent"""
54f9ee45 4605 newobj = _core_.new_WindowDestroyEvent(*args, **kwargs)
d14a1e28
RD
4606 self.this = newobj.this
4607 self.thisown = 1
4608 del newobj.thisown
e811c8ce 4609 def GetWindow(*args, **kwargs):
a95a7133 4610 """GetWindow(self) -> Window"""
54f9ee45 4611 return _core_.WindowDestroyEvent_GetWindow(*args, **kwargs)
e811c8ce 4612
d14a1e28
RD
4613
4614class WindowDestroyEventPtr(WindowDestroyEvent):
4615 def __init__(self, this):
4616 self.this = this
4617 if not hasattr(self,"thisown"): self.thisown = 0
4618 self.__class__ = WindowDestroyEvent
54f9ee45 4619_core_.WindowDestroyEvent_swigregister(WindowDestroyEventPtr)
d14a1e28
RD
4620
4621#---------------------------------------------------------------------------
4622
4623class ContextMenuEvent(CommandEvent):
093d3ff1 4624 """Proxy of C++ ContextMenuEvent class"""
e811c8ce
RD
4625 def __repr__(self):
4626 return "<%s.%s; proxy of C++ wxContextMenuEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 4627 def __init__(self, *args, **kwargs):
a95a7133 4628 """__init__(self, wxEventType type=wxEVT_NULL, int winid=0, Point pt=DefaultPosition) -> ContextMenuEvent"""
54f9ee45 4629 newobj = _core_.new_ContextMenuEvent(*args, **kwargs)
d14a1e28
RD
4630 self.this = newobj.this
4631 self.thisown = 1
4632 del newobj.thisown
e811c8ce 4633 def GetPosition(*args, **kwargs):
a95a7133 4634 """GetPosition(self) -> Point"""
54f9ee45 4635 return _core_.ContextMenuEvent_GetPosition(*args, **kwargs)
e811c8ce
RD
4636
4637 def SetPosition(*args, **kwargs):
a95a7133 4638 """SetPosition(self, Point pos)"""
54f9ee45 4639 return _core_.ContextMenuEvent_SetPosition(*args, **kwargs)
e811c8ce 4640
d14a1e28
RD
4641
4642class ContextMenuEventPtr(ContextMenuEvent):
4643 def __init__(self, this):
4644 self.this = this
4645 if not hasattr(self,"thisown"): self.thisown = 0
4646 self.__class__ = ContextMenuEvent
54f9ee45 4647_core_.ContextMenuEvent_swigregister(ContextMenuEventPtr)
d14a1e28
RD
4648
4649#---------------------------------------------------------------------------
4650
54f9ee45
RD
4651IDLE_PROCESS_ALL = _core_.IDLE_PROCESS_ALL
4652IDLE_PROCESS_SPECIFIED = _core_.IDLE_PROCESS_SPECIFIED
d14a1e28 4653class IdleEvent(Event):
093d3ff1 4654 """Proxy of C++ IdleEvent class"""
e811c8ce
RD
4655 def __repr__(self):
4656 return "<%s.%s; proxy of C++ wxIdleEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 4657 def __init__(self, *args, **kwargs):
a95a7133 4658 """__init__(self) -> IdleEvent"""
54f9ee45 4659 newobj = _core_.new_IdleEvent(*args, **kwargs)
d14a1e28
RD
4660 self.this = newobj.this
4661 self.thisown = 1
4662 del newobj.thisown
e811c8ce 4663 def RequestMore(*args, **kwargs):
a95a7133 4664 """RequestMore(self, bool needMore=True)"""
54f9ee45 4665 return _core_.IdleEvent_RequestMore(*args, **kwargs)
e811c8ce
RD
4666
4667 def MoreRequested(*args, **kwargs):
a95a7133 4668 """MoreRequested(self) -> bool"""
54f9ee45 4669 return _core_.IdleEvent_MoreRequested(*args, **kwargs)
e811c8ce
RD
4670
4671 def SetMode(*args, **kwargs):
66c033b4 4672 """SetMode(int mode)"""
54f9ee45 4673 return _core_.IdleEvent_SetMode(*args, **kwargs)
e811c8ce
RD
4674
4675 SetMode = staticmethod(SetMode)
4676 def GetMode(*args, **kwargs):
66c033b4 4677 """GetMode() -> int"""
54f9ee45 4678 return _core_.IdleEvent_GetMode(*args, **kwargs)
e811c8ce
RD
4679
4680 GetMode = staticmethod(GetMode)
4681 def CanSend(*args, **kwargs):
66c033b4 4682 """CanSend(Window win) -> bool"""
54f9ee45 4683 return _core_.IdleEvent_CanSend(*args, **kwargs)
e811c8ce
RD
4684
4685 CanSend = staticmethod(CanSend)
d14a1e28
RD
4686
4687class IdleEventPtr(IdleEvent):
4688 def __init__(self, this):
4689 self.this = this
4690 if not hasattr(self,"thisown"): self.thisown = 0
4691 self.__class__ = IdleEvent
54f9ee45 4692_core_.IdleEvent_swigregister(IdleEventPtr)
d14a1e28 4693
e811c8ce 4694def IdleEvent_SetMode(*args, **kwargs):
196addbf 4695 """IdleEvent_SetMode(int mode)"""
54f9ee45 4696 return _core_.IdleEvent_SetMode(*args, **kwargs)
d14a1e28 4697
e811c8ce 4698def IdleEvent_GetMode(*args, **kwargs):
196addbf 4699 """IdleEvent_GetMode() -> int"""
54f9ee45 4700 return _core_.IdleEvent_GetMode(*args, **kwargs)
d14a1e28 4701
e811c8ce
RD
4702def IdleEvent_CanSend(*args, **kwargs):
4703 """IdleEvent_CanSend(Window win) -> bool"""
54f9ee45 4704 return _core_.IdleEvent_CanSend(*args, **kwargs)
d14a1e28
RD
4705
4706#---------------------------------------------------------------------------
4707
4708class PyEvent(Event):
093d3ff1 4709 """Proxy of C++ PyEvent class"""
e811c8ce
RD
4710 def __repr__(self):
4711 return "<%s.%s; proxy of C++ wxPyEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 4712 def __init__(self, *args, **kwargs):
a95a7133 4713 """__init__(self, int winid=0, wxEventType commandType=wxEVT_NULL) -> PyEvent"""
54f9ee45 4714 newobj = _core_.new_PyEvent(*args, **kwargs)
d14a1e28
RD
4715 self.this = newobj.this
4716 self.thisown = 1
4717 del newobj.thisown
4718 self.SetSelf(self)
e811c8ce 4719
54f9ee45 4720 def __del__(self, destroy=_core_.delete_PyEvent):
a95a7133 4721 """__del__(self)"""
d14a1e28
RD
4722 try:
4723 if self.thisown: destroy(self)
4724 except: pass
e811c8ce
RD
4725
4726 def SetSelf(*args, **kwargs):
a95a7133 4727 """SetSelf(self, PyObject self)"""
54f9ee45 4728 return _core_.PyEvent_SetSelf(*args, **kwargs)
e811c8ce
RD
4729
4730 def GetSelf(*args, **kwargs):
a95a7133 4731 """GetSelf(self) -> PyObject"""
54f9ee45 4732 return _core_.PyEvent_GetSelf(*args, **kwargs)
e811c8ce 4733
d14a1e28
RD
4734
4735class PyEventPtr(PyEvent):
4736 def __init__(self, this):
4737 self.this = this
4738 if not hasattr(self,"thisown"): self.thisown = 0
4739 self.__class__ = PyEvent
54f9ee45 4740_core_.PyEvent_swigregister(PyEventPtr)
d14a1e28
RD
4741
4742class PyCommandEvent(CommandEvent):
093d3ff1 4743 """Proxy of C++ PyCommandEvent class"""
e811c8ce
RD
4744 def __repr__(self):
4745 return "<%s.%s; proxy of C++ wxPyCommandEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 4746 def __init__(self, *args, **kwargs):
a95a7133 4747 """__init__(self, wxEventType commandType=wxEVT_NULL, int id=0) -> PyCommandEvent"""
54f9ee45 4748 newobj = _core_.new_PyCommandEvent(*args, **kwargs)
d14a1e28
RD
4749 self.this = newobj.this
4750 self.thisown = 1
4751 del newobj.thisown
4752 self.SetSelf(self)
e811c8ce 4753
54f9ee45 4754 def __del__(self, destroy=_core_.delete_PyCommandEvent):
a95a7133 4755 """__del__(self)"""
d14a1e28
RD
4756 try:
4757 if self.thisown: destroy(self)
4758 except: pass
e811c8ce
RD
4759
4760 def SetSelf(*args, **kwargs):
a95a7133 4761 """SetSelf(self, PyObject self)"""
54f9ee45 4762 return _core_.PyCommandEvent_SetSelf(*args, **kwargs)
e811c8ce
RD
4763
4764 def GetSelf(*args, **kwargs):
a95a7133 4765 """GetSelf(self) -> PyObject"""
54f9ee45 4766 return _core_.PyCommandEvent_GetSelf(*args, **kwargs)
e811c8ce 4767
d14a1e28
RD
4768
4769class PyCommandEventPtr(PyCommandEvent):
4770 def __init__(self, this):
4771 self.this = this
4772 if not hasattr(self,"thisown"): self.thisown = 0
4773 self.__class__ = PyCommandEvent
54f9ee45 4774_core_.PyCommandEvent_swigregister(PyCommandEventPtr)
d14a1e28
RD
4775
4776#---------------------------------------------------------------------------
4777
54f9ee45
RD
4778PYAPP_ASSERT_SUPPRESS = _core_.PYAPP_ASSERT_SUPPRESS
4779PYAPP_ASSERT_EXCEPTION = _core_.PYAPP_ASSERT_EXCEPTION
4780PYAPP_ASSERT_DIALOG = _core_.PYAPP_ASSERT_DIALOG
4781PYAPP_ASSERT_LOG = _core_.PYAPP_ASSERT_LOG
4782PRINT_WINDOWS = _core_.PRINT_WINDOWS
4783PRINT_POSTSCRIPT = _core_.PRINT_POSTSCRIPT
d14a1e28 4784class PyApp(EvtHandler):
66c033b4
RD
4785 """
4786 The ``wx.PyApp`` class is an *implementation detail*, please use the
4787 `wx.App` class (or some other derived class) instead.
4788 """
e811c8ce
RD
4789 def __repr__(self):
4790 return "<%s.%s; proxy of C++ wxPyApp instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 4791 def __init__(self, *args, **kwargs):
98e665d3 4792 """
a95a7133 4793 __init__(self) -> PyApp
98e665d3
RD
4794
4795 Create a new application object, starting the bootstrap process.
4796 """
54f9ee45 4797 newobj = _core_.new_PyApp(*args, **kwargs)
d14a1e28
RD
4798 self.this = newobj.this
4799 self.thisown = 1
4800 del newobj.thisown
4801 self._setCallbackInfo(self, PyApp)
4802 self._setOORInfo(self)
e811c8ce 4803
54f9ee45 4804 def __del__(self, destroy=_core_.delete_PyApp):
a95a7133 4805 """__del__(self)"""
d14a1e28
RD
4806 try:
4807 if self.thisown: destroy(self)
4808 except: pass
e811c8ce
RD
4809
4810 def _setCallbackInfo(*args, **kwargs):
a95a7133 4811 """_setCallbackInfo(self, PyObject self, PyObject _class)"""
54f9ee45 4812 return _core_.PyApp__setCallbackInfo(*args, **kwargs)
e811c8ce
RD
4813
4814 def GetAppName(*args, **kwargs):
0df68c9f 4815 """
a95a7133 4816 GetAppName(self) -> String
6c3b4aae 4817
0df68c9f
RD
4818 Get the application name.
4819 """
54f9ee45 4820 return _core_.PyApp_GetAppName(*args, **kwargs)
e811c8ce
RD
4821
4822 def SetAppName(*args, **kwargs):
0df68c9f 4823 """
a95a7133 4824 SetAppName(self, String name)
6c3b4aae 4825
66c033b4
RD
4826 Set the application name. This value may be used automatically by
4827 `wx.Config` and such.
0df68c9f 4828 """
54f9ee45 4829 return _core_.PyApp_SetAppName(*args, **kwargs)
e811c8ce
RD
4830
4831 def GetClassName(*args, **kwargs):
0df68c9f 4832 """
a95a7133 4833 GetClassName(self) -> String
e811c8ce 4834
0df68c9f
RD
4835 Get the application's class name.
4836 """
54f9ee45 4837 return _core_.PyApp_GetClassName(*args, **kwargs)
e811c8ce
RD
4838
4839 def SetClassName(*args, **kwargs):
0df68c9f 4840 """
a95a7133 4841 SetClassName(self, String name)
6c3b4aae 4842
66c033b4
RD
4843 Set the application's class name. This value may be used for
4844 X-resources if applicable for the platform
0df68c9f 4845 """
54f9ee45 4846 return _core_.PyApp_SetClassName(*args, **kwargs)
e811c8ce
RD
4847
4848 def GetVendorName(*args, **kwargs):
0df68c9f 4849 """
a95a7133 4850 GetVendorName(self) -> String
6c3b4aae 4851
0df68c9f
RD
4852 Get the application's vendor name.
4853 """
54f9ee45 4854 return _core_.PyApp_GetVendorName(*args, **kwargs)
e811c8ce
RD
4855
4856 def SetVendorName(*args, **kwargs):
0df68c9f 4857 """
a95a7133 4858 SetVendorName(self, String name)
6c3b4aae 4859
66c033b4
RD
4860 Set the application's vendor name. This value may be used
4861 automatically by `wx.Config` and such.
0df68c9f 4862 """
54f9ee45 4863 return _core_.PyApp_SetVendorName(*args, **kwargs)
e811c8ce
RD
4864
4865 def GetTraits(*args, **kwargs):
0df68c9f 4866 """
a95a7133 4867 GetTraits(self) -> wxAppTraits
6c3b4aae 4868
66c033b4
RD
4869 Return (and create if necessary) the app traits object to which we
4870 delegate for everything which either should be configurable by the
4871 user (then he can change the default behaviour simply by overriding
4872 CreateTraits() and returning his own traits object) or which is
4873 GUI/console dependent as then wx.AppTraits allows us to abstract the
4874 differences behind the common facade.
4875
4876 :todo: Add support for overriding CreateAppTraits in wxPython.
0df68c9f 4877 """
54f9ee45 4878 return _core_.PyApp_GetTraits(*args, **kwargs)
e811c8ce
RD
4879
4880 def ProcessPendingEvents(*args, **kwargs):
0df68c9f 4881 """
a95a7133 4882 ProcessPendingEvents(self)
6c3b4aae 4883
66c033b4
RD
4884 Process all events in the Pending Events list -- it is necessary to
4885 call this function to process posted events. This normally happens
4886 during each event loop iteration.
0df68c9f 4887 """
54f9ee45 4888 return _core_.PyApp_ProcessPendingEvents(*args, **kwargs)
e811c8ce
RD
4889
4890 def Yield(*args, **kwargs):
0df68c9f 4891 """
a95a7133 4892 Yield(self, bool onlyIfNeeded=False) -> bool
6c3b4aae 4893
66c033b4
RD
4894 Process all currently pending events right now, instead of waiting
4895 until return to the event loop. It is an error to call ``Yield``
4896 recursively unless the value of ``onlyIfNeeded`` is True.
6c3b4aae 4897
66c033b4 4898 :warning: This function is dangerous as it can lead to unexpected
41e2b43e
RD
4899 reentrancies (i.e. when called from an event handler it may
4900 result in calling the same event handler again), use with
4901 extreme care or, better, don't use at all!
0df68c9f 4902
66c033b4 4903 :see: `wx.Yield`, `wx.YieldIfNeeded`, `wx.SafeYield`
41e2b43e 4904
0df68c9f 4905 """
54f9ee45 4906 return _core_.PyApp_Yield(*args, **kwargs)
e811c8ce
RD
4907
4908 def WakeUpIdle(*args, **kwargs):
0df68c9f 4909 """
a95a7133 4910 WakeUpIdle(self)
6c3b4aae 4911
66c033b4
RD
4912 Make sure that idle events are sent again.
4913 :see: `wx.WakeUpIdle`
0df68c9f 4914 """
54f9ee45 4915 return _core_.PyApp_WakeUpIdle(*args, **kwargs)
e811c8ce 4916
1fc3b23a
RD
4917 def IsMainLoopRunning(*args, **kwargs):
4918 """
4919 IsMainLoopRunning() -> bool
4920
4921 Returns True if we're running the main loop, i.e. if the events can
4922 currently be dispatched.
4923 """
4924 return _core_.PyApp_IsMainLoopRunning(*args, **kwargs)
4925
4926 IsMainLoopRunning = staticmethod(IsMainLoopRunning)
e811c8ce 4927 def MainLoop(*args, **kwargs):
0df68c9f 4928 """
a95a7133 4929 MainLoop(self) -> int
6c3b4aae 4930
66c033b4
RD
4931 Execute the main GUI loop, the function doesn't normally return until
4932 all top level windows have been closed and destroyed.
0df68c9f 4933 """
54f9ee45 4934 return _core_.PyApp_MainLoop(*args, **kwargs)
e811c8ce
RD
4935
4936 def Exit(*args, **kwargs):
0df68c9f 4937 """
a95a7133 4938 Exit(self)
6c3b4aae 4939
0df68c9f 4940 Exit the main loop thus terminating the application.
66c033b4 4941 :see: `wx.Exit`
0df68c9f 4942 """
54f9ee45 4943 return _core_.PyApp_Exit(*args, **kwargs)
e811c8ce
RD
4944
4945 def ExitMainLoop(*args, **kwargs):
0df68c9f 4946 """
a95a7133 4947 ExitMainLoop(self)
6c3b4aae 4948
66c033b4
RD
4949 Exit the main GUI loop during the next iteration of the main
4950 loop, (i.e. it does not stop the program immediately!)
0df68c9f 4951 """
54f9ee45 4952 return _core_.PyApp_ExitMainLoop(*args, **kwargs)
e811c8ce
RD
4953
4954 def Pending(*args, **kwargs):
0df68c9f 4955 """
a95a7133 4956 Pending(self) -> bool
6c3b4aae 4957
0df68c9f
RD
4958 Returns True if there are unprocessed events in the event queue.
4959 """
54f9ee45 4960 return _core_.PyApp_Pending(*args, **kwargs)
e811c8ce
RD
4961
4962 def Dispatch(*args, **kwargs):
0df68c9f 4963 """
a95a7133 4964 Dispatch(self) -> bool
6c3b4aae 4965
0df68c9f
RD
4966 Process the first event in the event queue (blocks until an event
4967 appears if there are none currently)
4968 """
54f9ee45 4969 return _core_.PyApp_Dispatch(*args, **kwargs)
e811c8ce
RD
4970
4971 def ProcessIdle(*args, **kwargs):
0df68c9f 4972 """
a95a7133 4973 ProcessIdle(self) -> bool
6c3b4aae 4974
66c033b4
RD
4975 Called from the MainLoop when the application becomes idle (there are
4976 no pending events) and sends a `wx.IdleEvent` to all interested
4977 parties. Returns True if more idle events are needed, False if not.
0df68c9f 4978 """
54f9ee45 4979 return _core_.PyApp_ProcessIdle(*args, **kwargs)
e811c8ce
RD
4980
4981 def SendIdleEvents(*args, **kwargs):
0df68c9f 4982 """
a95a7133 4983 SendIdleEvents(self, Window win, IdleEvent event) -> bool
e811c8ce 4984
66c033b4
RD
4985 Send idle event to window and all subwindows. Returns True if more
4986 idle time is requested.
0df68c9f 4987 """
54f9ee45 4988 return _core_.PyApp_SendIdleEvents(*args, **kwargs)
e811c8ce
RD
4989
4990 def IsActive(*args, **kwargs):
0df68c9f 4991 """
a95a7133 4992 IsActive(self) -> bool
6c3b4aae 4993
0df68c9f
RD
4994 Return True if our app has focus.
4995 """
54f9ee45 4996 return _core_.PyApp_IsActive(*args, **kwargs)
e811c8ce
RD
4997
4998 def SetTopWindow(*args, **kwargs):
0df68c9f 4999 """
a95a7133 5000 SetTopWindow(self, Window win)
6c3b4aae 5001
66c033b4 5002 Set the *main* top level window
0df68c9f 5003 """
54f9ee45 5004 return _core_.PyApp_SetTopWindow(*args, **kwargs)
e811c8ce
RD
5005
5006 def GetTopWindow(*args, **kwargs):
0df68c9f 5007 """
a95a7133 5008 GetTopWindow(self) -> Window
6c3b4aae 5009
66c033b4
RD
5010 Return the *main* top level window (if it hadn't been set previously
5011 with SetTopWindow(), will return just some top level window and, if
5012 there not any, will return None)
0df68c9f 5013 """
54f9ee45 5014 return _core_.PyApp_GetTopWindow(*args, **kwargs)
e811c8ce
RD
5015
5016 def SetExitOnFrameDelete(*args, **kwargs):
0df68c9f 5017 """
a95a7133 5018 SetExitOnFrameDelete(self, bool flag)
0df68c9f 5019
66c033b4
RD
5020 Control the exit behaviour: by default, the program will exit the main
5021 loop (and so, usually, terminate) when the last top-level program
5022 window is deleted. Beware that if you disable this behaviour (with
5023 SetExitOnFrameDelete(False)), you'll have to call ExitMainLoop()
5024 explicitly from somewhere.
0df68c9f 5025 """
54f9ee45 5026 return _core_.PyApp_SetExitOnFrameDelete(*args, **kwargs)
e811c8ce
RD
5027
5028 def GetExitOnFrameDelete(*args, **kwargs):
0df68c9f 5029 """
a95a7133 5030 GetExitOnFrameDelete(self) -> bool
6c3b4aae 5031
0df68c9f
RD
5032 Get the current exit behaviour setting.
5033 """
54f9ee45 5034 return _core_.PyApp_GetExitOnFrameDelete(*args, **kwargs)
e811c8ce
RD
5035
5036 def SetUseBestVisual(*args, **kwargs):
0df68c9f 5037 """
a95a7133 5038 SetUseBestVisual(self, bool flag)
6c3b4aae 5039
66c033b4
RD
5040 Set whether the app should try to use the best available visual on
5041 systems where more than one is available, (Sun, SGI, XFree86 4, etc.)
0df68c9f 5042 """
54f9ee45 5043 return _core_.PyApp_SetUseBestVisual(*args, **kwargs)
e811c8ce
RD
5044
5045 def GetUseBestVisual(*args, **kwargs):
0df68c9f 5046 """
a95a7133 5047 GetUseBestVisual(self) -> bool
6c3b4aae 5048
0df68c9f
RD
5049 Get current UseBestVisual setting.
5050 """
54f9ee45 5051 return _core_.PyApp_GetUseBestVisual(*args, **kwargs)
e811c8ce
RD
5052
5053 def SetPrintMode(*args, **kwargs):
a95a7133 5054 """SetPrintMode(self, int mode)"""
54f9ee45 5055 return _core_.PyApp_SetPrintMode(*args, **kwargs)
e811c8ce
RD
5056
5057 def GetPrintMode(*args, **kwargs):
a95a7133 5058 """GetPrintMode(self) -> int"""
54f9ee45 5059 return _core_.PyApp_GetPrintMode(*args, **kwargs)
e811c8ce 5060
e811c8ce 5061 def SetAssertMode(*args, **kwargs):
0df68c9f 5062 """
a95a7133 5063 SetAssertMode(self, int mode)
6c3b4aae 5064
41e2b43e 5065 Set the OnAssert behaviour for debug and hybrid builds.
0df68c9f 5066 """
54f9ee45 5067 return _core_.PyApp_SetAssertMode(*args, **kwargs)
e811c8ce 5068
6c3b4aae 5069 def GetAssertMode(*args, **kwargs):
0df68c9f 5070 """
a95a7133 5071 GetAssertMode(self) -> int
6c3b4aae 5072
0df68c9f
RD
5073 Get the current OnAssert behaviour setting.
5074 """
54f9ee45 5075 return _core_.PyApp_GetAssertMode(*args, **kwargs)
6c3b4aae 5076
e811c8ce 5077 def GetMacSupportPCMenuShortcuts(*args, **kwargs):
66c033b4 5078 """GetMacSupportPCMenuShortcuts() -> bool"""
54f9ee45 5079 return _core_.PyApp_GetMacSupportPCMenuShortcuts(*args, **kwargs)
e811c8ce
RD
5080
5081 GetMacSupportPCMenuShortcuts = staticmethod(GetMacSupportPCMenuShortcuts)
5082 def GetMacAboutMenuItemId(*args, **kwargs):
66c033b4 5083 """GetMacAboutMenuItemId() -> long"""
54f9ee45 5084 return _core_.PyApp_GetMacAboutMenuItemId(*args, **kwargs)
e811c8ce
RD
5085
5086 GetMacAboutMenuItemId = staticmethod(GetMacAboutMenuItemId)
5087 def GetMacPreferencesMenuItemId(*args, **kwargs):
66c033b4 5088 """GetMacPreferencesMenuItemId() -> long"""
54f9ee45 5089 return _core_.PyApp_GetMacPreferencesMenuItemId(*args, **kwargs)
e811c8ce
RD
5090
5091 GetMacPreferencesMenuItemId = staticmethod(GetMacPreferencesMenuItemId)
5092 def GetMacExitMenuItemId(*args, **kwargs):
66c033b4 5093 """GetMacExitMenuItemId() -> long"""
54f9ee45 5094 return _core_.PyApp_GetMacExitMenuItemId(*args, **kwargs)
e811c8ce
RD
5095
5096 GetMacExitMenuItemId = staticmethod(GetMacExitMenuItemId)
5097 def GetMacHelpMenuTitleName(*args, **kwargs):
66c033b4 5098 """GetMacHelpMenuTitleName() -> String"""
54f9ee45 5099 return _core_.PyApp_GetMacHelpMenuTitleName(*args, **kwargs)
e811c8ce
RD
5100
5101 GetMacHelpMenuTitleName = staticmethod(GetMacHelpMenuTitleName)
5102 def SetMacSupportPCMenuShortcuts(*args, **kwargs):
66c033b4 5103 """SetMacSupportPCMenuShortcuts(bool val)"""
54f9ee45 5104 return _core_.PyApp_SetMacSupportPCMenuShortcuts(*args, **kwargs)
e811c8ce
RD
5105
5106 SetMacSupportPCMenuShortcuts = staticmethod(SetMacSupportPCMenuShortcuts)
5107 def SetMacAboutMenuItemId(*args, **kwargs):
66c033b4 5108 """SetMacAboutMenuItemId(long val)"""
54f9ee45 5109 return _core_.PyApp_SetMacAboutMenuItemId(*args, **kwargs)
e811c8ce
RD
5110
5111 SetMacAboutMenuItemId = staticmethod(SetMacAboutMenuItemId)
5112 def SetMacPreferencesMenuItemId(*args, **kwargs):
66c033b4 5113 """SetMacPreferencesMenuItemId(long val)"""
54f9ee45 5114 return _core_.PyApp_SetMacPreferencesMenuItemId(*args, **kwargs)
e811c8ce
RD
5115
5116 SetMacPreferencesMenuItemId = staticmethod(SetMacPreferencesMenuItemId)
5117 def SetMacExitMenuItemId(*args, **kwargs):
66c033b4 5118 """SetMacExitMenuItemId(long val)"""
54f9ee45 5119 return _core_.PyApp_SetMacExitMenuItemId(*args, **kwargs)
e811c8ce
RD
5120
5121 SetMacExitMenuItemId = staticmethod(SetMacExitMenuItemId)
5122 def SetMacHelpMenuTitleName(*args, **kwargs):
66c033b4 5123 """SetMacHelpMenuTitleName(String val)"""
54f9ee45 5124 return _core_.PyApp_SetMacHelpMenuTitleName(*args, **kwargs)
e811c8ce
RD
5125
5126 SetMacHelpMenuTitleName = staticmethod(SetMacHelpMenuTitleName)
5127 def _BootstrapApp(*args, **kwargs):
0df68c9f 5128 """
a95a7133 5129 _BootstrapApp(self)
6c3b4aae 5130
0df68c9f
RD
5131 For internal use only
5132 """
54f9ee45 5133 return _core_.PyApp__BootstrapApp(*args, **kwargs)
e811c8ce
RD
5134
5135 def GetComCtl32Version(*args, **kwargs):
0df68c9f 5136 """
66c033b4 5137 GetComCtl32Version() -> int
6c3b4aae 5138
66c033b4
RD
5139 Returns 400, 470, 471, etc. for comctl32.dll 4.00, 4.70, 4.71 or 0 if
5140 it wasn't found at all. Raises an exception on non-Windows platforms.
0df68c9f 5141 """
54f9ee45 5142 return _core_.PyApp_GetComCtl32Version(*args, **kwargs)
e811c8ce
RD
5143
5144 GetComCtl32Version = staticmethod(GetComCtl32Version)
d14a1e28
RD
5145
5146class PyAppPtr(PyApp):
5147 def __init__(self, this):
5148 self.this = this
5149 if not hasattr(self,"thisown"): self.thisown = 0
5150 self.__class__ = PyApp
54f9ee45 5151_core_.PyApp_swigregister(PyAppPtr)
d14a1e28 5152
1fc3b23a
RD
5153def PyApp_IsMainLoopRunning(*args, **kwargs):
5154 """
5155 PyApp_IsMainLoopRunning() -> bool
5156
5157 Returns True if we're running the main loop, i.e. if the events can
5158 currently be dispatched.
5159 """
5160 return _core_.PyApp_IsMainLoopRunning(*args, **kwargs)
5161
e811c8ce
RD
5162def PyApp_GetMacSupportPCMenuShortcuts(*args, **kwargs):
5163 """PyApp_GetMacSupportPCMenuShortcuts() -> bool"""
54f9ee45 5164 return _core_.PyApp_GetMacSupportPCMenuShortcuts(*args, **kwargs)
d14a1e28 5165
e811c8ce
RD
5166def PyApp_GetMacAboutMenuItemId(*args, **kwargs):
5167 """PyApp_GetMacAboutMenuItemId() -> long"""
54f9ee45 5168 return _core_.PyApp_GetMacAboutMenuItemId(*args, **kwargs)
d14a1e28 5169
e811c8ce
RD
5170def PyApp_GetMacPreferencesMenuItemId(*args, **kwargs):
5171 """PyApp_GetMacPreferencesMenuItemId() -> long"""
54f9ee45 5172 return _core_.PyApp_GetMacPreferencesMenuItemId(*args, **kwargs)
d14a1e28 5173
e811c8ce
RD
5174def PyApp_GetMacExitMenuItemId(*args, **kwargs):
5175 """PyApp_GetMacExitMenuItemId() -> long"""
54f9ee45 5176 return _core_.PyApp_GetMacExitMenuItemId(*args, **kwargs)
d14a1e28 5177
e811c8ce 5178def PyApp_GetMacHelpMenuTitleName(*args, **kwargs):
196addbf 5179 """PyApp_GetMacHelpMenuTitleName() -> String"""
54f9ee45 5180 return _core_.PyApp_GetMacHelpMenuTitleName(*args, **kwargs)
d14a1e28 5181
e811c8ce
RD
5182def PyApp_SetMacSupportPCMenuShortcuts(*args, **kwargs):
5183 """PyApp_SetMacSupportPCMenuShortcuts(bool val)"""
54f9ee45 5184 return _core_.PyApp_SetMacSupportPCMenuShortcuts(*args, **kwargs)
d14a1e28 5185
e811c8ce
RD
5186def PyApp_SetMacAboutMenuItemId(*args, **kwargs):
5187 """PyApp_SetMacAboutMenuItemId(long val)"""
54f9ee45 5188 return _core_.PyApp_SetMacAboutMenuItemId(*args, **kwargs)
d14a1e28 5189
e811c8ce
RD
5190def PyApp_SetMacPreferencesMenuItemId(*args, **kwargs):
5191 """PyApp_SetMacPreferencesMenuItemId(long val)"""
54f9ee45 5192 return _core_.PyApp_SetMacPreferencesMenuItemId(*args, **kwargs)
d14a1e28 5193
e811c8ce
RD
5194def PyApp_SetMacExitMenuItemId(*args, **kwargs):
5195 """PyApp_SetMacExitMenuItemId(long val)"""
54f9ee45 5196 return _core_.PyApp_SetMacExitMenuItemId(*args, **kwargs)
d14a1e28 5197
e811c8ce 5198def PyApp_SetMacHelpMenuTitleName(*args, **kwargs):
196addbf 5199 """PyApp_SetMacHelpMenuTitleName(String val)"""
54f9ee45 5200 return _core_.PyApp_SetMacHelpMenuTitleName(*args, **kwargs)
d14a1e28 5201
e811c8ce 5202def PyApp_GetComCtl32Version(*args, **kwargs):
0df68c9f
RD
5203 """
5204 PyApp_GetComCtl32Version() -> int
6c3b4aae 5205
66c033b4
RD
5206 Returns 400, 470, 471, etc. for comctl32.dll 4.00, 4.70, 4.71 or 0 if
5207 it wasn't found at all. Raises an exception on non-Windows platforms.
0df68c9f 5208 """
54f9ee45 5209 return _core_.PyApp_GetComCtl32Version(*args, **kwargs)
d14a1e28
RD
5210
5211#---------------------------------------------------------------------------
5212
5213
e811c8ce 5214def Exit(*args, **kwargs):
0df68c9f
RD
5215 """
5216 Exit()
6c3b4aae 5217
0df68c9f
RD
5218 Force an exit of the application. Convenience for wx.GetApp().Exit()
5219 """
54f9ee45 5220 return _core_.Exit(*args, **kwargs)
d14a1e28 5221
e811c8ce 5222def Yield(*args, **kwargs):
0df68c9f
RD
5223 """
5224 Yield() -> bool
6c3b4aae 5225
0df68c9f
RD
5226 Yield to other apps/messages. Convenience for wx.GetApp().Yield()
5227 """
54f9ee45 5228 return _core_.Yield(*args, **kwargs)
d14a1e28 5229
e811c8ce 5230def YieldIfNeeded(*args, **kwargs):
0df68c9f
RD
5231 """
5232 YieldIfNeeded() -> bool
6c3b4aae 5233
0df68c9f
RD
5234 Yield to other apps/messages. Convenience for wx.GetApp().Yield(True)
5235 """
54f9ee45 5236 return _core_.YieldIfNeeded(*args, **kwargs)
d14a1e28 5237
e811c8ce 5238def SafeYield(*args, **kwargs):
0df68c9f
RD
5239 """
5240 SafeYield(Window win=None, bool onlyIfNeeded=False) -> bool
6c3b4aae 5241
66c033b4
RD
5242 This function is similar to `wx.Yield`, except that it disables the
5243 user input to all program windows before calling `wx.Yield` and
5244 re-enables it again afterwards. If ``win`` is not None, this window
5245 will remain enabled, allowing the implementation of some limited user
5246 interaction.
6c3b4aae 5247
66c033b4 5248 :Returns: the result of the call to `wx.Yield`.
0df68c9f 5249 """
54f9ee45 5250 return _core_.SafeYield(*args, **kwargs)
d14a1e28 5251
e811c8ce 5252def WakeUpIdle(*args, **kwargs):
0df68c9f
RD
5253 """
5254 WakeUpIdle()
6c3b4aae 5255
66c033b4
RD
5256 Cause the message queue to become empty again, so idle events will be
5257 sent.
0df68c9f 5258 """
54f9ee45 5259 return _core_.WakeUpIdle(*args, **kwargs)
d14a1e28 5260
e811c8ce 5261def PostEvent(*args, **kwargs):
0df68c9f
RD
5262 """
5263 PostEvent(EvtHandler dest, Event event)
6c3b4aae 5264
66c033b4
RD
5265 Send an event to a window or other wx.EvtHandler to be processed
5266 later.
0df68c9f 5267 """
54f9ee45 5268 return _core_.PostEvent(*args, **kwargs)
d14a1e28 5269
e811c8ce 5270def App_CleanUp(*args, **kwargs):
0df68c9f
RD
5271 """
5272 App_CleanUp()
6c3b4aae 5273
41e2b43e 5274 For internal use only, it is used to cleanup after wxWidgets when
66c033b4 5275 Python shuts down.
0df68c9f 5276 """
54f9ee45 5277 return _core_.App_CleanUp(*args, **kwargs)
d14a1e28 5278
e811c8ce 5279def GetApp(*args, **kwargs):
0df68c9f
RD
5280 """
5281 GetApp() -> PyApp
6c3b4aae 5282
196addbf 5283 Return a reference to the current wx.App object.
0df68c9f 5284 """
54f9ee45 5285 return _core_.GetApp(*args, **kwargs)
5cbf236d
RD
5286
5287def SetDefaultPyEncoding(*args, **kwargs):
5288 """
5289 SetDefaultPyEncoding(string encoding)
5290
5291 Sets the encoding that wxPython will use when it needs to convert a
5292 Python string or unicode object to or from a wxString.
e505d15e
RD
5293
5294 The default encoding is the value of ``locale.getdefaultlocale()[1]``
5295 but please be aware that the default encoding within the same locale
5296 may be slightly different on different platforms. For example, please
5297 see http://www.alanwood.net/demos/charsetdiffs.html for differences
5298 between the common latin/roman encodings.
5cbf236d
RD
5299 """
5300 return _core_.SetDefaultPyEncoding(*args, **kwargs)
5301
5302def GetDefaultPyEncoding(*args, **kwargs):
5303 """
5304 GetDefaultPyEncoding() -> string
5305
5306 Gets the current encoding that wxPython will use when it needs to
5307 convert a Python string or unicode object to or from a wxString.
5308 """
5309 return _core_.GetDefaultPyEncoding(*args, **kwargs)
d14a1e28
RD
5310#----------------------------------------------------------------------
5311
5312class PyOnDemandOutputWindow:
6c3b4aae
RD
5313 """
5314 A class that can be used for redirecting Python's stdout and
5315 stderr streams. It will do nothing until something is wrriten to
5316 the stream at which point it will create a Frame with a text area
5317 and write the text there.
5318 """
d14a1e28
RD
5319 def __init__(self, title = "wxPython: stdout/stderr"):
5320 self.frame = None
5321 self.title = title
412d302d
RD
5322 self.pos = wx.DefaultPosition
5323 self.size = (450, 300)
d14a1e28
RD
5324 self.parent = None
5325
5326 def SetParent(self, parent):
6c3b4aae 5327 """Set the window to be used as the popup Frame's parent."""
d14a1e28
RD
5328 self.parent = parent
5329
6c3b4aae
RD
5330
5331 def CreateOutputWindow(self, st):
412d302d
RD
5332 self.frame = wx.Frame(self.parent, -1, self.title, self.pos, self.size,
5333 style=wx.DEFAULT_FRAME_STYLE)
196addbf 5334 self.text = wx.TextCtrl(self.frame, -1, "",
412d302d 5335 style=wx.TE_MULTILINE|wx.TE_READONLY)
d1e20054 5336 self.text.AppendText(st)
6c3b4aae
RD
5337 self.frame.Show(True)
5338 EVT_CLOSE(self.frame, self.OnCloseWindow)
5339
d14a1e28 5340
7409c0c6
RD
5341 def OnCloseWindow(self, event):
5342 if self.frame is not None:
5343 self.frame.Destroy()
5344 self.frame = None
5345 self.text = None
5346
5347
d14a1e28 5348 # These methods provide the file-like output behaviour.
6c3b4aae
RD
5349 def write(self, text):
5350 """
5351 Create the output window if needed and write the string to it.
5352 If not called in the context of the gui thread then uses
5353 CallAfter to do the work there.
5354 """
5355 if self.frame is None:
5356 if not wx.Thread_IsMain():
5357 wx.CallAfter(self.CreateOutputWindow, text)
5358 else:
5359 self.CreateOutputWindow(text)
5360 else:
5361 if not wx.Thread_IsMain():
5362 wx.CallAfter(self.text.AppendText, text)
5363 else:
5364 self.text.AppendText(text)
5365
d14a1e28
RD
5366
5367 def close(self):
6c3b4aae
RD
5368 if self.frame is not None:
5369 wx.CallAfter(self.frame.Close)
5370
d14a1e28 5371
19272049
RD
5372 def flush(self):
5373 pass
5374
5375
d14a1e28
RD
5376
5377#----------------------------------------------------------------------
d14a1e28
RD
5378
5379_defRedirect = (wx.Platform == '__WXMSW__' or wx.Platform == '__WXMAC__')
5380
5381class App(wx.PyApp):
6c3b4aae 5382 """
66c033b4
RD
5383 The ``wx.App`` class represents the application and is used to:
5384
5385 * bootstrap the wxPython system and initialize the underlying
5386 gui toolkit
5387 * set and get application-wide properties
5388 * implement the windowing system main message or event loop,
5389 and to dispatch events to window instances
5390 * etc.
5391
5392 Every application must have a ``wx.App`` instance, and all
5393 creation of UI objects should be delayed until after the
03e37cd5
RD
5394 ``wx.App`` object has been created in order to ensure that the gui
5395 platform and wxWidgets have been fully initialized.
66c033b4
RD
5396
5397 Normally you would derive from this class and implement an
5398 ``OnInit`` method that creates a frame and then calls
5399 ``self.SetTopWindow(frame)``.
5400
03e37cd5 5401 :see: `wx.PySimpleApp` for a simpler app class that can be used
1c0f361b 5402 directly.
6c3b4aae 5403 """
66c033b4 5404
d14a1e28
RD
5405 outputWindowClass = PyOnDemandOutputWindow
5406
03e37cd5
RD
5407 def __init__(self, redirect=_defRedirect, filename=None,
5408 useBestVisual=False, clearSigInt=True):
66c033b4
RD
5409 """
5410 Construct a ``wx.App`` object.
5411
03e37cd5
RD
5412 :param redirect: Should ``sys.stdout`` and ``sys.stderr`` be
5413 redirected? Defaults to True on Windows and Mac, False
5414 otherwise. If `filename` is None then output will be
5415 redirected to a window that pops up as needed. (You can
5416 control what kind of window is created for the output by
5417 resetting the class variable ``outputWindowClass`` to a
5418 class of your choosing.)
66c033b4 5419
03e37cd5
RD
5420 :param filename: The name of a file to redirect output to, if
5421 redirect is True.
66c033b4
RD
5422
5423 :param useBestVisual: Should the app try to use the best
03e37cd5
RD
5424 available visual provided by the system (only relevant on
5425 systems that have more than one visual.) This parameter
5426 must be used instead of calling `SetUseBestVisual` later
5427 on because it must be set before the underlying GUI
5428 toolkit is initialized.
5429
5430 :param clearSigInt: Should SIGINT be cleared? This allows the
5431 app to terminate upon a Ctrl-C in the console like other
5432 GUI apps will.
66c033b4
RD
5433
5434 :note: You should override OnInit to do applicaition
5435 initialization to ensure that the system, toolkit and
5436 wxWidgets are fully initialized.
5437 """
d14a1e28
RD
5438 wx.PyApp.__init__(self)
5439
5440 if wx.Platform == "__WXMAC__":
5441 try:
5442 import MacOS
5443 if not MacOS.WMAvailable():
5444 print """\
5445This program needs access to the screen. Please run with 'pythonw',
5446not 'python', and only when you are logged in on the main display of
5447your Mac."""
5448 _sys.exit(1)
36cadbf7
RD
5449 except SystemExit:
5450 raise
d14a1e28
RD
5451 except:
5452 pass
5453
5454 # This has to be done before OnInit
5455 self.SetUseBestVisual(useBestVisual)
5456
5457 # Set the default handler for SIGINT. This fixes a problem
5458 # where if Ctrl-C is pressed in the console that started this
5459 # app then it will not appear to do anything, (not even send
5460 # KeyboardInterrupt???) but will later segfault on exit. By
5461 # setting the default handler then the app will exit, as
5462 # expected (depending on platform.)
03e37cd5
RD
5463 if clearSigInt:
5464 try:
5465 import signal
5466 signal.signal(signal.SIGINT, signal.SIG_DFL)
5467 except:
5468 pass
d14a1e28
RD
5469
5470 # Save and redirect the stdio to a window?
5471 self.stdioWin = None
5472 self.saveStdio = (_sys.stdout, _sys.stderr)
5473 if redirect:
5474 self.RedirectStdio(filename)
5475
8fb0e70a
RD
5476 # Use Python's install prefix as the default
5477 wx.StandardPaths.Get().SetInstallPrefix(_sys.prefix)
5478
d14a1e28
RD
5479 # This finishes the initialization of wxWindows and then calls
5480 # the OnInit that should be present in the derived class
5481 self._BootstrapApp()
5482
5483
5484 def __del__(self):
5485 try:
5486 self.RestoreStdio() # Just in case the MainLoop was overridden
5487 except:
5488 pass
5489
5490
5491 def SetTopWindow(self, frame):
1e0c8722 5492 """Set the \"main\" top level window"""
d14a1e28
RD
5493 if self.stdioWin:
5494 self.stdioWin.SetParent(frame)
5495 wx.PyApp.SetTopWindow(self, frame)
5496
5497
5498 def MainLoop(self):
1e0c8722 5499 """Execute the main GUI event loop"""
d14a1e28
RD
5500 wx.PyApp.MainLoop(self)
5501 self.RestoreStdio()
5502
5503
7409c0c6 5504 def RedirectStdio(self, filename=None):
1e0c8722 5505 """Redirect sys.stdout and sys.stderr to a file or a popup window."""
d14a1e28
RD
5506 if filename:
5507 _sys.stdout = _sys.stderr = open(filename, 'a')
5508 else:
5509 self.stdioWin = self.outputWindowClass()
5510 _sys.stdout = _sys.stderr = self.stdioWin
5511
5512
5513 def RestoreStdio(self):
5514 _sys.stdout, _sys.stderr = self.saveStdio
5515
5516
412d302d
RD
5517 def SetOutputWindowAttributes(self, title=None, pos=None, size=None):
5518 """
5519 Set the title, position and/or size of the output window if
f5b96ee1
RD
5520 the stdio has been redirected. This should be called before
5521 any output would cause the output window to be created.
412d302d
RD
5522 """
5523 if self.stdioWin:
5524 if title is not None:
5525 self.stdioWin.title = title
5526 if pos is not None:
5527 self.stdioWin.pos = pos
5528 if size is not None:
5529 self.stdioWin.size = size
5530
5531
5532
d14a1e28 5533
66c033b4 5534# change from wx.PyApp_XX to wx.App_XX
54f9ee45
RD
5535App_GetMacSupportPCMenuShortcuts = _core_.PyApp_GetMacSupportPCMenuShortcuts
5536App_GetMacAboutMenuItemId = _core_.PyApp_GetMacAboutMenuItemId
5537App_GetMacPreferencesMenuItemId = _core_.PyApp_GetMacPreferencesMenuItemId
5538App_GetMacExitMenuItemId = _core_.PyApp_GetMacExitMenuItemId
5539App_GetMacHelpMenuTitleName = _core_.PyApp_GetMacHelpMenuTitleName
5540App_SetMacSupportPCMenuShortcuts = _core_.PyApp_SetMacSupportPCMenuShortcuts
5541App_SetMacAboutMenuItemId = _core_.PyApp_SetMacAboutMenuItemId
5542App_SetMacPreferencesMenuItemId = _core_.PyApp_SetMacPreferencesMenuItemId
5543App_SetMacExitMenuItemId = _core_.PyApp_SetMacExitMenuItemId
5544App_SetMacHelpMenuTitleName = _core_.PyApp_SetMacHelpMenuTitleName
5545App_GetComCtl32Version = _core_.PyApp_GetComCtl32Version
d14a1e28
RD
5546
5547#----------------------------------------------------------------------------
5548
5549class PySimpleApp(wx.App):
6c3b4aae
RD
5550 """
5551 A simple application class. You can just create one of these and
5552 then then make your top level windows later, and not have to worry
66c033b4
RD
5553 about OnInit. For example::
5554
5555 app = wx.PySimpleApp()
5556 frame = wx.Frame(None, title='Hello World')
5557 frame.Show()
5558 app.MainLoop()
5559
5560 :see: `wx.App`
5561 """
6c3b4aae 5562
03e37cd5
RD
5563 def __init__(self, redirect=False, filename=None,
5564 useBestVisual=False, clearSigInt=True):
66c033b4
RD
5565 """
5566 :see: `wx.App.__init__`
5567 """
03e37cd5 5568 wx.App.__init__(self, redirect, filename, useBestVisual, clearSigInt)
6c3b4aae 5569
d14a1e28 5570 def OnInit(self):
d14a1e28
RD
5571 return True
5572
5573
66c033b4 5574
6c3b4aae 5575# Is anybody using this one?
d14a1e28
RD
5576class PyWidgetTester(wx.App):
5577 def __init__(self, size = (250, 100)):
5578 self.size = size
5579 wx.App.__init__(self, 0)
5580
5581 def OnInit(self):
196addbf 5582 self.frame = wx.Frame(None, -1, "Widget Tester", pos=(0,0), size=self.size)
d14a1e28
RD
5583 self.SetTopWindow(self.frame)
5584 return True
5585
66c033b4
RD
5586 def SetWidget(self, widgetClass, *args, **kwargs):
5587 w = widgetClass(self.frame, *args, **kwargs)
d14a1e28
RD
5588 self.frame.Show(True)
5589
5590#----------------------------------------------------------------------------
5591# DO NOT hold any other references to this object. This is how we
66c033b4 5592# know when to cleanup system resources that wxWidgets is holding. When
d14a1e28 5593# the sys module is unloaded, the refcount on sys.__wxPythonCleanup
66c033b4 5594# goes to zero and it calls the wx.App_CleanUp function.
d14a1e28
RD
5595
5596class __wxPyCleanup:
5597 def __init__(self):
54f9ee45 5598 self.cleanup = _core_.App_CleanUp
d14a1e28
RD
5599 def __del__(self):
5600 self.cleanup()
5601
5602_sys.__wxPythonCleanup = __wxPyCleanup()
5603
5604## # another possible solution, but it gets called too early...
66c033b4
RD
5605## import atexit
5606## atexit.register(_core_.wxApp_CleanUp)
d14a1e28
RD
5607
5608
5609#----------------------------------------------------------------------------
5610
5611#---------------------------------------------------------------------------
2ef75293
RD
5612
5613class EventLoop(object):
093d3ff1 5614 """Proxy of C++ EventLoop class"""
2ef75293
RD
5615 def __repr__(self):
5616 return "<%s.%s; proxy of C++ wxEventLoop instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
5617 def __init__(self, *args, **kwargs):
5618 """__init__(self) -> EventLoop"""
5619 newobj = _core_.new_EventLoop(*args, **kwargs)
5620 self.this = newobj.this
5621 self.thisown = 1
5622 del newobj.thisown
5623 def __del__(self, destroy=_core_.delete_EventLoop):
5624 """__del__(self)"""
5625 try:
5626 if self.thisown: destroy(self)
5627 except: pass
5628
5629 def Run(*args, **kwargs):
5630 """Run(self) -> int"""
5631 return _core_.EventLoop_Run(*args, **kwargs)
5632
5633 def Exit(*args, **kwargs):
5634 """Exit(self, int rc=0)"""
5635 return _core_.EventLoop_Exit(*args, **kwargs)
5636
5637 def Pending(*args, **kwargs):
5638 """Pending(self) -> bool"""
5639 return _core_.EventLoop_Pending(*args, **kwargs)
5640
5641 def Dispatch(*args, **kwargs):
5642 """Dispatch(self) -> bool"""
5643 return _core_.EventLoop_Dispatch(*args, **kwargs)
5644
5645 def IsRunning(*args, **kwargs):
5646 """IsRunning(self) -> bool"""
5647 return _core_.EventLoop_IsRunning(*args, **kwargs)
5648
5649 def GetActive(*args, **kwargs):
5650 """GetActive() -> EventLoop"""
5651 return _core_.EventLoop_GetActive(*args, **kwargs)
5652
5653 GetActive = staticmethod(GetActive)
5654 def SetActive(*args, **kwargs):
5655 """SetActive(EventLoop loop)"""
5656 return _core_.EventLoop_SetActive(*args, **kwargs)
5657
5658 SetActive = staticmethod(SetActive)
5659
5660class EventLoopPtr(EventLoop):
5661 def __init__(self, this):
5662 self.this = this
5663 if not hasattr(self,"thisown"): self.thisown = 0
5664 self.__class__ = EventLoop
5665_core_.EventLoop_swigregister(EventLoopPtr)
5666
5667def EventLoop_GetActive(*args, **kwargs):
5668 """EventLoop_GetActive() -> EventLoop"""
5669 return _core_.EventLoop_GetActive(*args, **kwargs)
5670
5671def EventLoop_SetActive(*args, **kwargs):
5672 """EventLoop_SetActive(EventLoop loop)"""
5673 return _core_.EventLoop_SetActive(*args, **kwargs)
5674
5675#---------------------------------------------------------------------------
d14a1e28 5676
1e0c8722 5677class AcceleratorEntry(object):
66c033b4
RD
5678 """
5679 A class used to define items in an `wx.AcceleratorTable`. wxPython
5680 programs can choose to use wx.AcceleratorEntry objects, but using a
5681 list of 3-tuple of integers (flags, keyCode, cmdID) usually works just
41e2b43e 5682 as well. See `__init__` for of the tuple values.
66c033b4
RD
5683
5684 :see: `wx.AcceleratorTable`
5685 """
1e0c8722
RD
5686 def __repr__(self):
5687 return "<%s.%s; proxy of C++ wxAcceleratorEntry instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
5688 def __init__(self, *args, **kwargs):
66c033b4
RD
5689 """
5690 __init__(self, int flags=0, int keyCode=0, int cmdID=0) -> AcceleratorEntry
5691
5692 Construct a wx.AcceleratorEntry.
66c033b4 5693 """
54f9ee45 5694 newobj = _core_.new_AcceleratorEntry(*args, **kwargs)
1e0c8722
RD
5695 self.this = newobj.this
5696 self.thisown = 1
5697 del newobj.thisown
54f9ee45 5698 def __del__(self, destroy=_core_.delete_AcceleratorEntry):
a95a7133 5699 """__del__(self)"""
1e0c8722
RD
5700 try:
5701 if self.thisown: destroy(self)
5702 except: pass
5703
5704 def Set(*args, **kwargs):
66c033b4
RD
5705 """
5706 Set(self, int flags, int keyCode, int cmd)
1e0c8722 5707
66c033b4
RD
5708 (Re)set the attributes of a wx.AcceleratorEntry.
5709 :see `__init__`
5710 """
5711 return _core_.AcceleratorEntry_Set(*args, **kwargs)
1e0c8722
RD
5712
5713 def GetFlags(*args, **kwargs):
66c033b4
RD
5714 """
5715 GetFlags(self) -> int
5716
5717 Get the AcceleratorEntry's flags.
5718 """
54f9ee45 5719 return _core_.AcceleratorEntry_GetFlags(*args, **kwargs)
1e0c8722
RD
5720
5721 def GetKeyCode(*args, **kwargs):
66c033b4
RD
5722 """
5723 GetKeyCode(self) -> int
5724
5725 Get the AcceleratorEntry's keycode.
5726 """
54f9ee45 5727 return _core_.AcceleratorEntry_GetKeyCode(*args, **kwargs)
1e0c8722
RD
5728
5729 def GetCommand(*args, **kwargs):
66c033b4
RD
5730 """
5731 GetCommand(self) -> int
5732
5733 Get the AcceleratorEntry's command ID.
5734 """
54f9ee45 5735 return _core_.AcceleratorEntry_GetCommand(*args, **kwargs)
1e0c8722
RD
5736
5737
5738class AcceleratorEntryPtr(AcceleratorEntry):
5739 def __init__(self, this):
5740 self.this = this
5741 if not hasattr(self,"thisown"): self.thisown = 0
5742 self.__class__ = AcceleratorEntry
54f9ee45 5743_core_.AcceleratorEntry_swigregister(AcceleratorEntryPtr)
1e0c8722
RD
5744
5745class AcceleratorTable(Object):
66c033b4
RD
5746 """
5747 An accelerator table allows the application to specify a table of
5748 keyboard shortcuts for menus or other commands. On Windows, menu or
5749 button commands are supported; on GTK, only menu commands are
5750 supported.
66c033b4 5751 """
1e0c8722
RD
5752 def __repr__(self):
5753 return "<%s.%s; proxy of C++ wxAcceleratorTable instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
5754 def __init__(self, *args, **kwargs):
0df68c9f
RD
5755 """
5756 __init__(entries) -> AcceleratorTable
1e0c8722 5757
66c033b4
RD
5758 Construct an AcceleratorTable from a list of `wx.AcceleratorEntry`
5759 items or or of 3-tuples (flags, keyCode, cmdID)
5760
5761 :see: `wx.AcceleratorEntry`
0df68c9f 5762 """
54f9ee45 5763 newobj = _core_.new_AcceleratorTable(*args, **kwargs)
1e0c8722
RD
5764 self.this = newobj.this
5765 self.thisown = 1
5766 del newobj.thisown
54f9ee45 5767 def __del__(self, destroy=_core_.delete_AcceleratorTable):
a95a7133 5768 """__del__(self)"""
1e0c8722
RD
5769 try:
5770 if self.thisown: destroy(self)
5771 except: pass
5772
5773 def Ok(*args, **kwargs):
a95a7133 5774 """Ok(self) -> bool"""
54f9ee45 5775 return _core_.AcceleratorTable_Ok(*args, **kwargs)
1e0c8722
RD
5776
5777
5778class AcceleratorTablePtr(AcceleratorTable):
5779 def __init__(self, this):
5780 self.this = this
5781 if not hasattr(self,"thisown"): self.thisown = 0
5782 self.__class__ = AcceleratorTable
54f9ee45 5783_core_.AcceleratorTable_swigregister(AcceleratorTablePtr)
1e0c8722
RD
5784
5785
5786def GetAccelFromString(*args, **kwargs):
196addbf 5787 """GetAccelFromString(String label) -> AcceleratorEntry"""
54f9ee45 5788 return _core_.GetAccelFromString(*args, **kwargs)
1e0c8722
RD
5789#---------------------------------------------------------------------------
5790
74a57fcd
RD
5791class VisualAttributes(object):
5792 """struct containing all the visual attributes of a control"""
5793 def __repr__(self):
5794 return "<%s.%s; proxy of C++ wxVisualAttributes instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
5795 def __init__(self, *args, **kwargs):
5796 """
a95a7133 5797 __init__(self) -> VisualAttributes
74a57fcd
RD
5798
5799 struct containing all the visual attributes of a control
5800 """
54f9ee45 5801 newobj = _core_.new_VisualAttributes(*args, **kwargs)
74a57fcd
RD
5802 self.this = newobj.this
5803 self.thisown = 1
5804 del newobj.thisown
54f9ee45 5805 def __del__(self, destroy=_core_.delete_VisualAttributes):
a95a7133 5806 """__del__(self)"""
74a57fcd
RD
5807 try:
5808 if self.thisown: destroy(self)
5809 except: pass
5810
54f9ee45
RD
5811 font = property(_core_.VisualAttributes_font_get, _core_.VisualAttributes_font_set)
5812 colFg = property(_core_.VisualAttributes_colFg_get, _core_.VisualAttributes_colFg_set)
5813 colBg = property(_core_.VisualAttributes_colBg_get, _core_.VisualAttributes_colBg_set)
74a57fcd
RD
5814
5815class VisualAttributesPtr(VisualAttributes):
5816 def __init__(self, this):
5817 self.this = this
5818 if not hasattr(self,"thisown"): self.thisown = 0
5819 self.__class__ = VisualAttributes
54f9ee45 5820_core_.VisualAttributes_swigregister(VisualAttributesPtr)
74a57fcd
RD
5821NullAcceleratorTable = cvar.NullAcceleratorTable
5822PanelNameStr = cvar.PanelNameStr
5823
54f9ee45
RD
5824WINDOW_VARIANT_NORMAL = _core_.WINDOW_VARIANT_NORMAL
5825WINDOW_VARIANT_SMALL = _core_.WINDOW_VARIANT_SMALL
5826WINDOW_VARIANT_MINI = _core_.WINDOW_VARIANT_MINI
5827WINDOW_VARIANT_LARGE = _core_.WINDOW_VARIANT_LARGE
5828WINDOW_VARIANT_MAX = _core_.WINDOW_VARIANT_MAX
d14a1e28 5829class Window(EvtHandler):
15afbcd0
RD
5830 """
5831 wx.Window is the base class for all windows and represents any visible
5832 object on the screen. All controls, top level windows and so on are
5833 wx.Windows. Sizers and device contexts are not however, as they don't
5834 appear on screen themselves.
5835
5836 """
e811c8ce
RD
5837 def __repr__(self):
5838 return "<%s.%s; proxy of C++ wxWindow instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 5839 def __init__(self, *args, **kwargs):
0df68c9f 5840 """
a95a7133 5841 __init__(self, Window parent, int id=-1, Point pos=DefaultPosition,
74a57fcd 5842 Size size=DefaultSize, long style=0, String name=PanelNameStr) -> Window
15afbcd0
RD
5843
5844 Construct and show a generic Window.
0df68c9f 5845 """
54f9ee45 5846 newobj = _core_.new_Window(*args, **kwargs)
d14a1e28
RD
5847 self.this = newobj.this
5848 self.thisown = 1
5849 del newobj.thisown
5850 self._setOORInfo(self)
d14a1e28 5851
e811c8ce 5852 def Create(*args, **kwargs):
0df68c9f 5853 """
a95a7133 5854 Create(self, Window parent, int id=-1, Point pos=DefaultPosition,
74a57fcd 5855 Size size=DefaultSize, long style=0, String name=PanelNameStr) -> bool
15afbcd0
RD
5856
5857 Create the GUI part of the Window for 2-phase creation mode.
0df68c9f 5858 """
54f9ee45 5859 return _core_.Window_Create(*args, **kwargs)
d14a1e28 5860
e811c8ce 5861 def Close(*args, **kwargs):
15afbcd0 5862 """
a95a7133 5863 Close(self, bool force=False) -> bool
15afbcd0
RD
5864
5865 This function simply generates a EVT_CLOSE event whose handler usually
5866 tries to close the window. It doesn't close the window itself,
5867 however. If force is False (the default) then the window's close
5868 handler will be allowed to veto the destruction of the window.
15afbcd0 5869 """
54f9ee45 5870 return _core_.Window_Close(*args, **kwargs)
d14a1e28 5871
e811c8ce 5872 def Destroy(*args, **kwargs):
0df68c9f 5873 """
a95a7133 5874 Destroy(self) -> bool
d14a1e28 5875
15afbcd0
RD
5876 Destroys the window safely. Frames and dialogs are not destroyed
5877 immediately when this function is called -- they are added to a list
5878 of windows to be deleted on idle time, when all the window's events
5879 have been processed. This prevents problems with events being sent to
5880 non-existent windows.
5881
5882 Returns True if the window has either been successfully deleted, or it
5883 has been added to the list of windows pending real deletion.
0df68c9f 5884 """
54f9ee45 5885 return _core_.Window_Destroy(*args, **kwargs)
d14a1e28 5886
e811c8ce 5887 def DestroyChildren(*args, **kwargs):
15afbcd0 5888 """
a95a7133 5889 DestroyChildren(self) -> bool
15afbcd0 5890
41e2b43e
RD
5891 Destroys all children of a window. Called automatically by the
5892 destructor.
15afbcd0 5893 """
54f9ee45 5894 return _core_.Window_DestroyChildren(*args, **kwargs)
d14a1e28 5895
e811c8ce 5896 def IsBeingDeleted(*args, **kwargs):
15afbcd0 5897 """
a95a7133 5898 IsBeingDeleted(self) -> bool
15afbcd0
RD
5899
5900 Is the window in the process of being deleted?
5901 """
54f9ee45 5902 return _core_.Window_IsBeingDeleted(*args, **kwargs)
d14a1e28 5903
e811c8ce 5904 def SetTitle(*args, **kwargs):
15afbcd0 5905 """
a95a7133 5906 SetTitle(self, String title)
15afbcd0
RD
5907
5908 Sets the window's title. Applicable only to frames and dialogs.
5909 """
54f9ee45 5910 return _core_.Window_SetTitle(*args, **kwargs)
d14a1e28 5911
e811c8ce 5912 def GetTitle(*args, **kwargs):
15afbcd0 5913 """
a95a7133 5914 GetTitle(self) -> String
15afbcd0
RD
5915
5916 Gets the window's title. Applicable only to frames and dialogs.
5917 """
54f9ee45 5918 return _core_.Window_GetTitle(*args, **kwargs)
d14a1e28 5919
e811c8ce 5920 def SetLabel(*args, **kwargs):
15afbcd0 5921 """
a95a7133 5922 SetLabel(self, String label)
15afbcd0
RD
5923
5924 Set the text which the window shows in its label if applicable.
5925 """
54f9ee45 5926 return _core_.Window_SetLabel(*args, **kwargs)
d14a1e28 5927
e811c8ce 5928 def GetLabel(*args, **kwargs):
15afbcd0 5929 """
a95a7133 5930 GetLabel(self) -> String
15afbcd0 5931
41e2b43e
RD
5932 Generic way of getting a label from any window, for identification
5933 purposes. The interpretation of this function differs from class to
5934 class. For frames and dialogs, the value returned is the title. For
5935 buttons or static text controls, it is the button text. This function
5936 can be useful for meta-programs such as testing tools or special-needs
5937 access programs)which need to identify windows by name.
15afbcd0 5938 """
54f9ee45 5939 return _core_.Window_GetLabel(*args, **kwargs)
d14a1e28 5940
e811c8ce 5941 def SetName(*args, **kwargs):
15afbcd0 5942 """
a95a7133 5943 SetName(self, String name)
15afbcd0 5944
41e2b43e
RD
5945 Sets the window's name. The window name is used for ressource setting
5946 in X, it is not the same as the window title/label
15afbcd0 5947 """
54f9ee45 5948 return _core_.Window_SetName(*args, **kwargs)
d14a1e28 5949
e811c8ce 5950 def GetName(*args, **kwargs):
15afbcd0 5951 """
a95a7133 5952 GetName(self) -> String
15afbcd0 5953
41e2b43e
RD
5954 Returns the windows name. This name is not guaranteed to be unique;
5955 it is up to the programmer to supply an appropriate name in the window
5956 constructor or via wx.Window.SetName.
15afbcd0 5957 """
54f9ee45 5958 return _core_.Window_GetName(*args, **kwargs)
d14a1e28 5959
4276dc52
RD
5960 def SetWindowVariant(*args, **kwargs):
5961 """
a95a7133 5962 SetWindowVariant(self, int variant)
4276dc52 5963
41e2b43e
RD
5964 Sets the variant of the window/font size to use for this window, if
5965 the platform supports variants, for example, wxMac.
4276dc52 5966 """
54f9ee45 5967 return _core_.Window_SetWindowVariant(*args, **kwargs)
4276dc52
RD
5968
5969 def GetWindowVariant(*args, **kwargs):
a95a7133 5970 """GetWindowVariant(self) -> int"""
54f9ee45 5971 return _core_.Window_GetWindowVariant(*args, **kwargs)
4276dc52 5972
e811c8ce 5973 def SetId(*args, **kwargs):
15afbcd0 5974 """
a95a7133 5975 SetId(self, int winid)
15afbcd0
RD
5976
5977 Sets the identifier of the window. Each window has an integer
5978 identifier. If the application has not provided one, an identifier
5979 will be generated. Normally, the identifier should be provided on
5980 creation and should not be modified subsequently.
5981 """
54f9ee45 5982 return _core_.Window_SetId(*args, **kwargs)
d14a1e28 5983
e811c8ce 5984 def GetId(*args, **kwargs):
15afbcd0 5985 """
a95a7133 5986 GetId(self) -> int
15afbcd0
RD
5987
5988 Returns the identifier of the window. Each window has an integer
5989 identifier. If the application has not provided one (or the default Id
5990 -1 is used) then an unique identifier with a negative value will be
5991 generated.
5992 """
54f9ee45 5993 return _core_.Window_GetId(*args, **kwargs)
d14a1e28 5994
e811c8ce 5995 def NewControlId(*args, **kwargs):
15afbcd0 5996 """
66c033b4 5997 NewControlId() -> int
15afbcd0
RD
5998
5999 Generate a control id for the controls which were not given one.
6000 """
54f9ee45 6001 return _core_.Window_NewControlId(*args, **kwargs)
d14a1e28 6002
e811c8ce
RD
6003 NewControlId = staticmethod(NewControlId)
6004 def NextControlId(*args, **kwargs):
15afbcd0 6005 """
66c033b4 6006 NextControlId(int winid) -> int
15afbcd0
RD
6007
6008 Get the id of the control following the one with the given
41e2b43e 6009 autogenerated) id
15afbcd0 6010 """
54f9ee45 6011 return _core_.Window_NextControlId(*args, **kwargs)
d14a1e28 6012
e811c8ce
RD
6013 NextControlId = staticmethod(NextControlId)
6014 def PrevControlId(*args, **kwargs):
15afbcd0 6015 """
66c033b4 6016 PrevControlId(int winid) -> int
15afbcd0
RD
6017
6018 Get the id of the control preceding the one with the given
41e2b43e 6019 autogenerated) id
15afbcd0 6020 """
54f9ee45 6021 return _core_.Window_PrevControlId(*args, **kwargs)
d14a1e28 6022
e811c8ce
RD
6023 PrevControlId = staticmethod(PrevControlId)
6024 def SetSize(*args, **kwargs):
15afbcd0 6025 """
a95a7133 6026 SetSize(self, Size size)
15afbcd0
RD
6027
6028 Sets the size of the window in pixels.
6029 """
54f9ee45 6030 return _core_.Window_SetSize(*args, **kwargs)
d14a1e28 6031
e811c8ce 6032 def SetDimensions(*args, **kwargs):
15afbcd0 6033 """
a95a7133 6034 SetDimensions(self, int x, int y, int width, int height, int sizeFlags=SIZE_AUTO)
15afbcd0
RD
6035
6036 Sets the position and size of the window in pixels. The sizeFlags
6037 parameter indicates the interpretation of the other params if they are
e505d15e
RD
6038 equal to -1.
6039
6040 ======================== ======================================
6041 wx.SIZE_AUTO A -1 indicates that a class-specific
6042 default should be used.
6043 wx.SIZE_USE_EXISTING Axisting dimensions should be used if
6044 -1 values are supplied.
6045 wxSIZE_ALLOW_MINUS_ONE Allow dimensions of -1 and less to be
6046 interpreted as real dimensions, not
6047 default values.
6048 ======================== ======================================
6049
15afbcd0 6050 """
54f9ee45 6051 return _core_.Window_SetDimensions(*args, **kwargs)
d14a1e28 6052
e811c8ce 6053 def SetRect(*args, **kwargs):
15afbcd0 6054 """
a95a7133 6055 SetRect(self, Rect rect, int sizeFlags=SIZE_AUTO)
15afbcd0
RD
6056
6057 Sets the position and size of the window in pixels using a wx.Rect.
6058 """
54f9ee45 6059 return _core_.Window_SetRect(*args, **kwargs)
d14a1e28 6060
e811c8ce 6061 def SetSizeWH(*args, **kwargs):
15afbcd0 6062 """
a95a7133 6063 SetSizeWH(self, int width, int height)
15afbcd0
RD
6064
6065 Sets the size of the window in pixels.
6066 """
54f9ee45 6067 return _core_.Window_SetSizeWH(*args, **kwargs)
d14a1e28 6068
e811c8ce 6069 def Move(*args, **kwargs):
15afbcd0 6070 """
a95a7133 6071 Move(self, Point pt, int flags=SIZE_USE_EXISTING)
15afbcd0
RD
6072
6073 Moves the window to the given position.
6074 """
54f9ee45 6075 return _core_.Window_Move(*args, **kwargs)
d14a1e28 6076
e811c8ce
RD
6077 SetPosition = Move
6078 def MoveXY(*args, **kwargs):
15afbcd0 6079 """
a95a7133 6080 MoveXY(self, int x, int y, int flags=SIZE_USE_EXISTING)
15afbcd0
RD
6081
6082 Moves the window to the given position.
6083 """
54f9ee45 6084 return _core_.Window_MoveXY(*args, **kwargs)
e811c8ce 6085
f8167d6e
RD
6086 def SetBestFittingSize(*args, **kwargs):
6087 """
6088 SetBestFittingSize(self, Size size=DefaultSize)
6089
6090 A 'Smart' SetSize that will fill in default size components with the
6091 window's *best size* values. Also set's the minsize for use with sizers.
6092 """
6093 return _core_.Window_SetBestFittingSize(*args, **kwargs)
6094
e811c8ce 6095 def Raise(*args, **kwargs):
15afbcd0 6096 """
a95a7133 6097 Raise(self)
15afbcd0
RD
6098
6099 Raises the window to the top of the window hierarchy if it is a
6100 managed window (dialog or frame).
6101 """
54f9ee45 6102 return _core_.Window_Raise(*args, **kwargs)
e811c8ce
RD
6103
6104 def Lower(*args, **kwargs):
15afbcd0 6105 """
a95a7133 6106 Lower(self)
15afbcd0
RD
6107
6108 Lowers the window to the bottom of the window hierarchy if it is a
6109 managed window (dialog or frame).
6110 """
54f9ee45 6111 return _core_.Window_Lower(*args, **kwargs)
e811c8ce
RD
6112
6113 def SetClientSize(*args, **kwargs):
15afbcd0 6114 """
a95a7133 6115 SetClientSize(self, Size size)
15afbcd0
RD
6116
6117 This sets the size of the window client area in pixels. Using this
6118 function to size a window tends to be more device-independent than
6119 wx.Window.SetSize, since the application need not worry about what
6120 dimensions the border or title bar have when trying to fit the window
6121 around panel items, for example.
6122 """
54f9ee45 6123 return _core_.Window_SetClientSize(*args, **kwargs)
e811c8ce
RD
6124
6125 def SetClientSizeWH(*args, **kwargs):
15afbcd0 6126 """
a95a7133 6127 SetClientSizeWH(self, int width, int height)
15afbcd0
RD
6128
6129 This sets the size of the window client area in pixels. Using this
6130 function to size a window tends to be more device-independent than
6131 wx.Window.SetSize, since the application need not worry about what
6132 dimensions the border or title bar have when trying to fit the window
6133 around panel items, for example.
6134 """
54f9ee45 6135 return _core_.Window_SetClientSizeWH(*args, **kwargs)
e811c8ce
RD
6136
6137 def SetClientRect(*args, **kwargs):
15afbcd0 6138 """
a95a7133 6139 SetClientRect(self, Rect rect)
15afbcd0
RD
6140
6141 This sets the size of the window client area in pixels. Using this
6142 function to size a window tends to be more device-independent than
6143 wx.Window.SetSize, since the application need not worry about what
6144 dimensions the border or title bar have when trying to fit the window
6145 around panel items, for example.
6146 """
54f9ee45 6147 return _core_.Window_SetClientRect(*args, **kwargs)
e811c8ce
RD
6148
6149 def GetPosition(*args, **kwargs):
0df68c9f 6150 """
a95a7133 6151 GetPosition(self) -> Point
e811c8ce 6152
0df68c9f
RD
6153 Get the window's position.
6154 """
54f9ee45 6155 return _core_.Window_GetPosition(*args, **kwargs)
e811c8ce
RD
6156
6157 def GetPositionTuple(*args, **kwargs):
0df68c9f
RD
6158 """
6159 GetPositionTuple() -> (x,y)
e811c8ce 6160
0df68c9f
RD
6161 Get the window's position.
6162 """
54f9ee45 6163 return _core_.Window_GetPositionTuple(*args, **kwargs)
e811c8ce
RD
6164
6165 def GetSize(*args, **kwargs):
0df68c9f 6166 """
a95a7133 6167 GetSize(self) -> Size
e811c8ce 6168
0df68c9f
RD
6169 Get the window size.
6170 """
54f9ee45 6171 return _core_.Window_GetSize(*args, **kwargs)
e811c8ce
RD
6172
6173 def GetSizeTuple(*args, **kwargs):
0df68c9f
RD
6174 """
6175 GetSizeTuple() -> (width, height)
e811c8ce 6176
0df68c9f
RD
6177 Get the window size.
6178 """
54f9ee45 6179 return _core_.Window_GetSizeTuple(*args, **kwargs)
e811c8ce
RD
6180
6181 def GetRect(*args, **kwargs):
15afbcd0 6182 """
a95a7133 6183 GetRect(self) -> Rect
15afbcd0
RD
6184
6185 Returns the size and position of the window as a wx.Rect object.
6186 """
54f9ee45 6187 return _core_.Window_GetRect(*args, **kwargs)
e811c8ce
RD
6188
6189 def GetClientSize(*args, **kwargs):
0df68c9f 6190 """
a95a7133 6191 GetClientSize(self) -> Size
e811c8ce 6192
15afbcd0
RD
6193 This gets the size of the window's 'client area' in pixels. The client
6194 area is the area which may be drawn on by the programmer, excluding
6195 title bar, border, scrollbars, etc.
0df68c9f 6196 """
54f9ee45 6197 return _core_.Window_GetClientSize(*args, **kwargs)
e811c8ce
RD
6198
6199 def GetClientSizeTuple(*args, **kwargs):
0df68c9f
RD
6200 """
6201 GetClientSizeTuple() -> (width, height)
e811c8ce 6202
15afbcd0
RD
6203 This gets the size of the window's 'client area' in pixels. The client
6204 area is the area which may be drawn on by the programmer, excluding
6205 title bar, border, scrollbars, etc.
0df68c9f 6206 """
54f9ee45 6207 return _core_.Window_GetClientSizeTuple(*args, **kwargs)
e811c8ce
RD
6208
6209 def GetClientAreaOrigin(*args, **kwargs):
15afbcd0 6210 """
a95a7133 6211 GetClientAreaOrigin(self) -> Point
15afbcd0
RD
6212
6213 Get the origin of the client area of the window relative to the
6214 window's top left corner (the client area may be shifted because of
6215 the borders, scrollbars, other decorations...)
6216 """
54f9ee45 6217 return _core_.Window_GetClientAreaOrigin(*args, **kwargs)
e811c8ce
RD
6218
6219 def GetClientRect(*args, **kwargs):
15afbcd0 6220 """
a95a7133 6221 GetClientRect(self) -> Rect
15afbcd0 6222
61863841 6223 Get the client area position and size as a `wx.Rect` object.
15afbcd0 6224 """
54f9ee45 6225 return _core_.Window_GetClientRect(*args, **kwargs)
e811c8ce
RD
6226
6227 def GetBestSize(*args, **kwargs):
0df68c9f 6228 """
a95a7133 6229 GetBestSize(self) -> Size
e811c8ce 6230
248ed943 6231 This function returns the best acceptable minimal size for the
41e2b43e
RD
6232 window, if applicable. For example, for a static text control, it will
6233 be the minimal size such that the control label is not truncated. For
6234 windows containing subwindows (suzh aswx.Panel), the size returned by
6235 this function will be the same as the size the window would have had
6236 after calling Fit.
0df68c9f 6237 """
54f9ee45 6238 return _core_.Window_GetBestSize(*args, **kwargs)
e811c8ce
RD
6239
6240 def GetBestSizeTuple(*args, **kwargs):
0df68c9f
RD
6241 """
6242 GetBestSizeTuple() -> (width, height)
e811c8ce 6243
248ed943 6244 This function returns the best acceptable minimal size for the
41e2b43e
RD
6245 window, if applicable. For example, for a static text control, it will
6246 be the minimal size such that the control label is not truncated. For
6247 windows containing subwindows (suzh aswx.Panel), the size returned by
6248 this function will be the same as the size the window would have had
6249 after calling Fit.
0df68c9f 6250 """
54f9ee45 6251 return _core_.Window_GetBestSizeTuple(*args, **kwargs)
e811c8ce 6252
dfbb5885
RD
6253 def InvalidateBestSize(*args, **kwargs):
6254 """
6255 InvalidateBestSize(self)
6256
6257 Reset the cached best size value so it will be recalculated the next
6258 time it is needed.
6259 """
6260 return _core_.Window_InvalidateBestSize(*args, **kwargs)
6261
6262 def GetBestFittingSize(*args, **kwargs):
6263 """
6264 GetBestFittingSize(self) -> Size
6265
6266 This function will merge the window's best size into the window's
6267 minimum size, giving priority to the min size components, and returns
6268 the results.
6269
6270 """
6271 return _core_.Window_GetBestFittingSize(*args, **kwargs)
6272
e811c8ce 6273 def GetAdjustedBestSize(*args, **kwargs):
15afbcd0 6274 """
a95a7133 6275 GetAdjustedBestSize(self) -> Size
15afbcd0
RD
6276
6277 This method is similar to GetBestSize, except in one
6278 thing. GetBestSize should return the minimum untruncated size of the
6279 window, while this method will return the largest of BestSize and any
6280 user specified minimum size. ie. it is the minimum size the window
6281 should currently be drawn at, not the minimal size it can possibly
6282 tolerate.
6283 """
54f9ee45 6284 return _core_.Window_GetAdjustedBestSize(*args, **kwargs)
e811c8ce
RD
6285
6286 def Center(*args, **kwargs):
15afbcd0 6287 """
a95a7133 6288 Center(self, int direction=BOTH)
15afbcd0
RD
6289
6290 Centers the window. The parameter specifies the direction for
6291 cetering, and may be wx.HORIZONTAL, wx.VERTICAL or wx.BOTH. It may
6292 also include wx.CENTER_ON_SCREEN flag if you want to center the window
6293 on the entire screen and not on its parent window. If it is a
6294 top-level window and has no parent then it will always be centered
6295 relative to the screen.
6296 """
54f9ee45 6297 return _core_.Window_Center(*args, **kwargs)
e811c8ce
RD
6298
6299 Centre = Center
6300 def CenterOnScreen(*args, **kwargs):
15afbcd0 6301 """
a95a7133 6302 CenterOnScreen(self, int dir=BOTH)
15afbcd0
RD
6303
6304 Center on screen (only works for top level windows)
6305 """
54f9ee45 6306 return _core_.Window_CenterOnScreen(*args, **kwargs)
e811c8ce
RD
6307
6308 CentreOnScreen = CenterOnScreen
6309 def CenterOnParent(*args, **kwargs):
15afbcd0 6310 """
a95a7133 6311 CenterOnParent(self, int dir=BOTH)
15afbcd0
RD
6312
6313 Center with respect to the the parent window
6314 """
54f9ee45 6315 return _core_.Window_CenterOnParent(*args, **kwargs)
e811c8ce
RD
6316
6317 CentreOnParent = CenterOnParent
6318 def Fit(*args, **kwargs):
15afbcd0 6319 """
a95a7133 6320 Fit(self)
15afbcd0
RD
6321
6322 Sizes the window so that it fits around its subwindows. This function
6323 won't do anything if there are no subwindows and will only really work
6324 correctly if sizers are used for the subwindows layout. Also, if the
6325 window has exactly one subwindow it is better (faster and the result
6326 is more precise as Fit adds some margin to account for fuzziness of
6327 its calculations) to call window.SetClientSize(child.GetSize())
6328 instead of calling Fit.
6329 """
54f9ee45 6330 return _core_.Window_Fit(*args, **kwargs)
e811c8ce
RD
6331
6332 def FitInside(*args, **kwargs):
15afbcd0 6333 """
a95a7133 6334 FitInside(self)
15afbcd0
RD
6335
6336 Similar to Fit, but sizes the interior (virtual) size of a
6337 window. Mainly useful with scrolled windows to reset scrollbars after
6338 sizing changes that do not trigger a size event, and/or scrolled
6339 windows without an interior sizer. This function similarly won't do
6340 anything if there are no subwindows.
6341 """
54f9ee45 6342 return _core_.Window_FitInside(*args, **kwargs)
e811c8ce 6343
f16ab95d 6344 def SetSizeHints(*args, **kwargs):
0df68c9f 6345 """
a95a7133 6346 SetSizeHints(self, int minW, int minH, int maxW=-1, int maxH=-1, int incW=-1,
0df68c9f 6347 int incH=-1)
15afbcd0
RD
6348
6349 Allows specification of minimum and maximum window sizes, and window
6350 size increments. If a pair of values is not set (or set to -1), the
6351 default values will be used. If this function is called, the user
908b74cd
RD
6352 will not be able to size the window outside the given bounds (if it is
6353 a top-level window.) Sizers will also inspect the minimum window size
6354 and will use that value if set when calculating layout.
6355
6356 The resizing increments are only significant under Motif or Xt.
0df68c9f 6357 """
f16ab95d 6358 return _core_.Window_SetSizeHints(*args, **kwargs)
e811c8ce 6359
f16ab95d
RD
6360 def SetSizeHintsSz(*args, **kwargs):
6361 """
6362 SetSizeHintsSz(self, Size minSize, Size maxSize=DefaultSize, Size incSize=DefaultSize)
6363
6364 Allows specification of minimum and maximum window sizes, and window
6365 size increments. If a pair of values is not set (or set to -1), the
6366 default values will be used. If this function is called, the user
6367 will not be able to size the window outside the given bounds (if it is
6368 a top-level window.) Sizers will also inspect the minimum window size
6369 and will use that value if set when calculating layout.
6370
6371 The resizing increments are only significant under Motif or Xt.
6372 """
6373 return _core_.Window_SetSizeHintsSz(*args, **kwargs)
6374
6375 def SetVirtualSizeHints(*args, **kwargs):
15afbcd0 6376 """
908b74cd 6377 SetVirtualSizeHints(self, int minW, int minH, int maxW=-1, int maxH=-1)
15afbcd0
RD
6378
6379 Allows specification of minimum and maximum virtual window sizes. If a
6380 pair of values is not set (or set to -1), the default values will be
6381 used. If this function is called, the user will not be able to size
6382 the virtual area of the window outside the given bounds.
6383 """
f16ab95d
RD
6384 return _core_.Window_SetVirtualSizeHints(*args, **kwargs)
6385
6386 def SetVirtualSizeHintsSz(*args, **kwargs):
6387 """
6388 SetVirtualSizeHintsSz(self, Size minSize, Size maxSize=DefaultSize)
6389
6390 Allows specification of minimum and maximum virtual window sizes. If a
6391 pair of values is not set (or set to -1), the default values will be
6392 used. If this function is called, the user will not be able to size
6393 the virtual area of the window outside the given bounds.
6394 """
6395 return _core_.Window_SetVirtualSizeHintsSz(*args, **kwargs)
e811c8ce 6396
908b74cd
RD
6397 def GetMaxSize(*args, **kwargs):
6398 """GetMaxSize(self) -> Size"""
6399 return _core_.Window_GetMaxSize(*args, **kwargs)
6400
6401 def GetMinSize(*args, **kwargs):
6402 """GetMinSize(self) -> Size"""
6403 return _core_.Window_GetMinSize(*args, **kwargs)
6404
6405 def SetMinSize(*args, **kwargs):
6406 """
6407 SetMinSize(self, Size minSize)
6408
6409 A more convenient method than `SetSizeHints` for setting just the
6410 min size.
6411 """
6412 return _core_.Window_SetMinSize(*args, **kwargs)
6413
6414 def SetMaxSize(*args, **kwargs):
6415 """
6416 SetMaxSize(self, Size maxSize)
6417
6418 A more convenient method than `SetSizeHints` for setting just the
6419 max size.
6420 """
6421 return _core_.Window_SetMaxSize(*args, **kwargs)
6422
e811c8ce 6423 def GetMinWidth(*args, **kwargs):
a95a7133 6424 """GetMinWidth(self) -> int"""
54f9ee45 6425 return _core_.Window_GetMinWidth(*args, **kwargs)
e811c8ce
RD
6426
6427 def GetMinHeight(*args, **kwargs):
a95a7133 6428 """GetMinHeight(self) -> int"""
54f9ee45 6429 return _core_.Window_GetMinHeight(*args, **kwargs)
e811c8ce
RD
6430
6431 def GetMaxWidth(*args, **kwargs):
a95a7133 6432 """GetMaxWidth(self) -> int"""
54f9ee45 6433 return _core_.Window_GetMaxWidth(*args, **kwargs)
e811c8ce
RD
6434
6435 def GetMaxHeight(*args, **kwargs):
a95a7133 6436 """GetMaxHeight(self) -> int"""
54f9ee45 6437 return _core_.Window_GetMaxHeight(*args, **kwargs)
e811c8ce 6438
e811c8ce 6439 def SetVirtualSize(*args, **kwargs):
0df68c9f 6440 """
a95a7133 6441 SetVirtualSize(self, Size size)
e811c8ce 6442
15afbcd0
RD
6443 Set the the virtual size of a window in pixels. For most windows this
6444 is just the client area of the window, but for some like scrolled
6445 windows it is more or less independent of the screen window size.
0df68c9f 6446 """
54f9ee45 6447 return _core_.Window_SetVirtualSize(*args, **kwargs)
e811c8ce
RD
6448
6449 def SetVirtualSizeWH(*args, **kwargs):
0df68c9f 6450 """
a95a7133 6451 SetVirtualSizeWH(self, int w, int h)
e811c8ce 6452
15afbcd0
RD
6453 Set the the virtual size of a window in pixels. For most windows this
6454 is just the client area of the window, but for some like scrolled
6455 windows it is more or less independent of the screen window size.
0df68c9f 6456 """
54f9ee45 6457 return _core_.Window_SetVirtualSizeWH(*args, **kwargs)
e811c8ce
RD
6458
6459 def GetVirtualSize(*args, **kwargs):
0df68c9f 6460 """
a95a7133 6461 GetVirtualSize(self) -> Size
e811c8ce 6462
15afbcd0
RD
6463 Get the the virtual size of the window in pixels. For most windows
6464 this is just the client area of the window, but for some like scrolled
6465 windows it is more or less independent of the screen window size.
0df68c9f 6466 """
54f9ee45 6467 return _core_.Window_GetVirtualSize(*args, **kwargs)
e811c8ce
RD
6468
6469 def GetVirtualSizeTuple(*args, **kwargs):
0df68c9f
RD
6470 """
6471 GetVirtualSizeTuple() -> (width, height)
e811c8ce 6472
15afbcd0
RD
6473 Get the the virtual size of the window in pixels. For most windows
6474 this is just the client area of the window, but for some like scrolled
6475 windows it is more or less independent of the screen window size.
0df68c9f 6476 """
54f9ee45 6477 return _core_.Window_GetVirtualSizeTuple(*args, **kwargs)
e811c8ce
RD
6478
6479 def GetBestVirtualSize(*args, **kwargs):
15afbcd0 6480 """
a95a7133 6481 GetBestVirtualSize(self) -> Size
15afbcd0
RD
6482
6483 Return the largest of ClientSize and BestSize (as determined by a
6484 sizer, interior children, or other means)
6485 """
54f9ee45 6486 return _core_.Window_GetBestVirtualSize(*args, **kwargs)
e811c8ce
RD
6487
6488 def Show(*args, **kwargs):
15afbcd0 6489 """
a95a7133 6490 Show(self, bool show=True) -> bool
15afbcd0
RD
6491
6492 Shows or hides the window. You may need to call Raise for a top level
6493 window if you want to bring it to top, although this is not needed if
6494 Show is called immediately after the frame creation. Returns True if
6495 the window has been shown or hidden or False if nothing was done
6496 because it already was in the requested state.
6497 """
54f9ee45 6498 return _core_.Window_Show(*args, **kwargs)
e811c8ce
RD
6499
6500 def Hide(*args, **kwargs):
15afbcd0 6501 """
a95a7133 6502 Hide(self) -> bool
15afbcd0
RD
6503
6504 Equivalent to calling Show(False).
6505 """
54f9ee45 6506 return _core_.Window_Hide(*args, **kwargs)
e811c8ce
RD
6507
6508 def Enable(*args, **kwargs):
15afbcd0 6509 """
a95a7133 6510 Enable(self, bool enable=True) -> bool
15afbcd0
RD
6511
6512 Enable or disable the window for user input. Note that when a parent
6513 window is disabled, all of its children are disabled as well and they
6514 are reenabled again when the parent is. Returns true if the window
6515 has been enabled or disabled, false if nothing was done, i.e. if the
6516 window had already been in the specified state.
6517 """
54f9ee45 6518 return _core_.Window_Enable(*args, **kwargs)
e811c8ce
RD
6519
6520 def Disable(*args, **kwargs):
15afbcd0 6521 """
a95a7133 6522 Disable(self) -> bool
15afbcd0
RD
6523
6524 Disables the window, same as Enable(false).
6525 """
54f9ee45 6526 return _core_.Window_Disable(*args, **kwargs)
e811c8ce
RD
6527
6528 def IsShown(*args, **kwargs):
15afbcd0 6529 """
a95a7133 6530 IsShown(self) -> bool
15afbcd0
RD
6531
6532 Returns true if the window is shown, false if it has been hidden.
6533 """
54f9ee45 6534 return _core_.Window_IsShown(*args, **kwargs)
e811c8ce
RD
6535
6536 def IsEnabled(*args, **kwargs):
15afbcd0 6537 """
a95a7133 6538 IsEnabled(self) -> bool
15afbcd0
RD
6539
6540 Returns true if the window is enabled for input, false otherwise.
6541 """
54f9ee45 6542 return _core_.Window_IsEnabled(*args, **kwargs)
e811c8ce
RD
6543
6544 def SetWindowStyleFlag(*args, **kwargs):
15afbcd0 6545 """
a95a7133 6546 SetWindowStyleFlag(self, long style)
15afbcd0 6547
41e2b43e
RD
6548 Sets the style of the window. Please note that some styles cannot be
6549 changed after the window creation and that Refresh() might need to be
6550 called after changing the others for the change to take place
6551 immediately.
15afbcd0 6552 """
54f9ee45 6553 return _core_.Window_SetWindowStyleFlag(*args, **kwargs)
e811c8ce
RD
6554
6555 def GetWindowStyleFlag(*args, **kwargs):
15afbcd0 6556 """
a95a7133 6557 GetWindowStyleFlag(self) -> long
e811c8ce 6558
15afbcd0
RD
6559 Gets the window style that was passed to the constructor or Create
6560 method.
6561 """
54f9ee45 6562 return _core_.Window_GetWindowStyleFlag(*args, **kwargs)
e811c8ce 6563
15afbcd0 6564 SetWindowStyle = SetWindowStyleFlag; GetWindowStyle = GetWindowStyleFlag
e811c8ce 6565 def HasFlag(*args, **kwargs):
15afbcd0 6566 """
a95a7133 6567 HasFlag(self, int flag) -> bool
15afbcd0
RD
6568
6569 Test if the given style is set for this window.
6570 """
54f9ee45 6571 return _core_.Window_HasFlag(*args, **kwargs)
e811c8ce
RD
6572
6573 def IsRetained(*args, **kwargs):
15afbcd0 6574 """
a95a7133 6575 IsRetained(self) -> bool
15afbcd0
RD
6576
6577 Returns true if the window is retained, false otherwise. Retained
6578 windows are only available on X platforms.
6579 """
54f9ee45 6580 return _core_.Window_IsRetained(*args, **kwargs)
e811c8ce
RD
6581
6582 def SetExtraStyle(*args, **kwargs):
15afbcd0 6583 """
a95a7133 6584 SetExtraStyle(self, long exStyle)
15afbcd0
RD
6585
6586 Sets the extra style bits for the window. Extra styles are the less
6587 often used style bits which can't be set with the constructor or with
6588 SetWindowStyleFlag()
6589 """
54f9ee45 6590 return _core_.Window_SetExtraStyle(*args, **kwargs)
e811c8ce
RD
6591
6592 def GetExtraStyle(*args, **kwargs):
15afbcd0 6593 """
a95a7133 6594 GetExtraStyle(self) -> long
15afbcd0
RD
6595
6596 Returns the extra style bits for the window.
6597 """
54f9ee45 6598 return _core_.Window_GetExtraStyle(*args, **kwargs)
e811c8ce
RD
6599
6600 def MakeModal(*args, **kwargs):
15afbcd0 6601 """
a95a7133 6602 MakeModal(self, bool modal=True)
15afbcd0
RD
6603
6604 Disables all other windows in the application so that the user can
6605 only interact with this window. Passing False will reverse this
6606 effect.
6607 """
54f9ee45 6608 return _core_.Window_MakeModal(*args, **kwargs)
e811c8ce
RD
6609
6610 def SetThemeEnabled(*args, **kwargs):
15afbcd0 6611 """
a95a7133 6612 SetThemeEnabled(self, bool enableTheme)
15afbcd0
RD
6613
6614 This function tells a window if it should use the system's "theme"
6615 code to draw the windows' background instead if its own background
6616 drawing code. This will only have an effect on platforms that support
6617 the notion of themes in user defined windows. One such platform is
6618 GTK+ where windows can have (very colourful) backgrounds defined by a
6619 user's selected theme.
6620
6621 Dialogs, notebook pages and the status bar have this flag set to true
6622 by default so that the default look and feel is simulated best.
6623 """
54f9ee45 6624 return _core_.Window_SetThemeEnabled(*args, **kwargs)
e811c8ce
RD
6625
6626 def GetThemeEnabled(*args, **kwargs):
15afbcd0 6627 """
a95a7133 6628 GetThemeEnabled(self) -> bool
e811c8ce 6629
15afbcd0
RD
6630 Return the themeEnabled flag.
6631 """
54f9ee45 6632 return _core_.Window_GetThemeEnabled(*args, **kwargs)
e811c8ce
RD
6633
6634 def SetFocus(*args, **kwargs):
15afbcd0 6635 """
a95a7133 6636 SetFocus(self)
15afbcd0
RD
6637
6638 Set's the focus to this window, allowing it to receive keyboard input.
6639 """
54f9ee45 6640 return _core_.Window_SetFocus(*args, **kwargs)
e811c8ce
RD
6641
6642 def SetFocusFromKbd(*args, **kwargs):
15afbcd0 6643 """
a95a7133 6644 SetFocusFromKbd(self)
15afbcd0
RD
6645
6646 Set focus to this window as the result of a keyboard action. Normally
6647 only called internally.
6648 """
54f9ee45 6649 return _core_.Window_SetFocusFromKbd(*args, **kwargs)
e811c8ce
RD
6650
6651 def FindFocus(*args, **kwargs):
15afbcd0 6652 """
66c033b4 6653 FindFocus() -> Window
15afbcd0
RD
6654
6655 Returns the window or control that currently has the keyboard focus,
6656 or None.
6657 """
54f9ee45 6658 return _core_.Window_FindFocus(*args, **kwargs)
e811c8ce
RD
6659
6660 FindFocus = staticmethod(FindFocus)
6661 def AcceptsFocus(*args, **kwargs):
15afbcd0 6662 """
a95a7133 6663 AcceptsFocus(self) -> bool
15afbcd0
RD
6664
6665 Can this window have focus?
6666 """
54f9ee45 6667 return _core_.Window_AcceptsFocus(*args, **kwargs)
e811c8ce
RD
6668
6669 def AcceptsFocusFromKeyboard(*args, **kwargs):
15afbcd0 6670 """
a95a7133 6671 AcceptsFocusFromKeyboard(self) -> bool
15afbcd0
RD
6672
6673 Can this window be given focus by keyboard navigation? if not, the
6674 only way to give it focus (provided it accepts it at all) is to click
6675 it.
6676 """
54f9ee45 6677 return _core_.Window_AcceptsFocusFromKeyboard(*args, **kwargs)
e811c8ce
RD
6678
6679 def GetDefaultItem(*args, **kwargs):
15afbcd0 6680 """
a95a7133 6681 GetDefaultItem(self) -> Window
15afbcd0
RD
6682
6683 Get the default child of this parent, i.e. the one which is activated
6684 by pressing <Enter> such as the OK button on a wx.Dialog.
6685 """
54f9ee45 6686 return _core_.Window_GetDefaultItem(*args, **kwargs)
e811c8ce
RD
6687
6688 def SetDefaultItem(*args, **kwargs):
15afbcd0 6689 """
a95a7133 6690 SetDefaultItem(self, Window child) -> Window
15afbcd0
RD
6691
6692 Set this child as default, return the old default.
6693 """
54f9ee45 6694 return _core_.Window_SetDefaultItem(*args, **kwargs)
e811c8ce
RD
6695
6696 def SetTmpDefaultItem(*args, **kwargs):
15afbcd0 6697 """
a95a7133 6698 SetTmpDefaultItem(self, Window win)
15afbcd0
RD
6699
6700 Set this child as temporary default
6701 """
54f9ee45 6702 return _core_.Window_SetTmpDefaultItem(*args, **kwargs)
e811c8ce 6703
908b74cd
RD
6704 def Navigate(*args, **kwargs):
6705 """
6706 Navigate(self, int flags=NavigationKeyEvent.IsForward) -> bool
6707
fd2dc343
RD
6708 Does keyboard navigation from this window to another, by sending a
6709 `wx.NavigationKeyEvent`.
908b74cd
RD
6710 """
6711 return _core_.Window_Navigate(*args, **kwargs)
6712
7f98d120
RD
6713 def MoveAfterInTabOrder(*args, **kwargs):
6714 """
6715 MoveAfterInTabOrder(self, Window win)
6716
6717 Moves this window in the tab navigation order after the specified
6718 sibling window. This means that when the user presses the TAB key on
6719 that other window, the focus switches to this window.
6720
6721 The default tab order is the same as creation order. This function
6722 and `MoveBeforeInTabOrder` allow to change it after creating all the
6723 windows.
6724
6725 """
6726 return _core_.Window_MoveAfterInTabOrder(*args, **kwargs)
6727
6728 def MoveBeforeInTabOrder(*args, **kwargs):
6729 """
6730 MoveBeforeInTabOrder(self, Window win)
6731
6732 Same as `MoveAfterInTabOrder` except that it inserts this window just
6733 before win instead of putting it right after it.
6734 """
6735 return _core_.Window_MoveBeforeInTabOrder(*args, **kwargs)
6736
e811c8ce 6737 def GetChildren(*args, **kwargs):
15afbcd0 6738 """
a95a7133 6739 GetChildren(self) -> PyObject
15afbcd0
RD
6740
6741 Returns a list of the window's children. NOTE: Currently this is a
6742 copy of the child window list maintained by the window, so the return
6743 value of this function is only valid as long as the window's children
6744 do not change.
6745 """
54f9ee45 6746 return _core_.Window_GetChildren(*args, **kwargs)
e811c8ce
RD
6747
6748 def GetParent(*args, **kwargs):
15afbcd0 6749 """
a95a7133 6750 GetParent(self) -> Window
15afbcd0
RD
6751
6752 Returns the parent window of this window, or None if there isn't one.
6753 """
54f9ee45 6754 return _core_.Window_GetParent(*args, **kwargs)
e811c8ce
RD
6755
6756 def GetGrandParent(*args, **kwargs):
15afbcd0 6757 """
a95a7133 6758 GetGrandParent(self) -> Window
15afbcd0 6759
41e2b43e
RD
6760 Returns the parent of the parent of this window, or None if there
6761 isn't one.
15afbcd0 6762 """
54f9ee45 6763 return _core_.Window_GetGrandParent(*args, **kwargs)
e811c8ce
RD
6764
6765 def IsTopLevel(*args, **kwargs):
15afbcd0 6766 """
a95a7133 6767 IsTopLevel(self) -> bool
15afbcd0
RD
6768
6769 Returns true if the given window is a top-level one. Currently all
6770 frames and dialogs are always considered to be top-level windows (even
6771 if they have a parent window).
6772 """
54f9ee45 6773 return _core_.Window_IsTopLevel(*args, **kwargs)
e811c8ce
RD
6774
6775 def Reparent(*args, **kwargs):
15afbcd0 6776 """
a95a7133 6777 Reparent(self, Window newParent) -> bool
15afbcd0
RD
6778
6779 Reparents the window, i.e the window will be removed from its current
6780 parent window (e.g. a non-standard toolbar in a wxFrame) and then
6781 re-inserted into another. Available on Windows and GTK. Returns True
6782 if the parent was changed, False otherwise (error or newParent ==
6783 oldParent)
6784 """
54f9ee45 6785 return _core_.Window_Reparent(*args, **kwargs)
e811c8ce
RD
6786
6787 def AddChild(*args, **kwargs):
15afbcd0 6788 """
a95a7133 6789 AddChild(self, Window child)
15afbcd0
RD
6790
6791 Adds a child window. This is called automatically by window creation
6792 functions so should not be required by the application programmer.
6793 """
54f9ee45 6794 return _core_.Window_AddChild(*args, **kwargs)
e811c8ce
RD
6795
6796 def RemoveChild(*args, **kwargs):
15afbcd0 6797 """
a95a7133 6798 RemoveChild(self, Window child)
15afbcd0
RD
6799
6800 Removes a child window. This is called automatically by window
6801 deletion functions so should not be required by the application
6802 programmer.
6803 """
54f9ee45 6804 return _core_.Window_RemoveChild(*args, **kwargs)
e811c8ce
RD
6805
6806 def FindWindowById(*args, **kwargs):
15afbcd0 6807 """
a95a7133 6808 FindWindowById(self, long winid) -> Window
15afbcd0
RD
6809
6810 Find a chld of this window by window ID
6811 """
54f9ee45 6812 return _core_.Window_FindWindowById(*args, **kwargs)
e811c8ce
RD
6813
6814 def FindWindowByName(*args, **kwargs):
15afbcd0 6815 """
a95a7133 6816 FindWindowByName(self, String name) -> Window
15afbcd0
RD
6817
6818 Find a child of this window by name
6819 """
54f9ee45 6820 return _core_.Window_FindWindowByName(*args, **kwargs)
e811c8ce
RD
6821
6822 def GetEventHandler(*args, **kwargs):
15afbcd0 6823 """
a95a7133 6824 GetEventHandler(self) -> EvtHandler
15afbcd0
RD
6825
6826 Returns the event handler for this window. By default, the window is
6827 its own event handler.
6828 """
54f9ee45 6829 return _core_.Window_GetEventHandler(*args, **kwargs)
e811c8ce
RD
6830
6831 def SetEventHandler(*args, **kwargs):
15afbcd0 6832 """
a95a7133 6833 SetEventHandler(self, EvtHandler handler)
15afbcd0
RD
6834
6835 Sets the event handler for this window. An event handler is an object
6836 that is capable of processing the events sent to a window. By default,
6837 the window is its own event handler, but an application may wish to
6838 substitute another, for example to allow central implementation of
6839 event-handling for a variety of different window classes.
6840
41e2b43e 6841 It is usually better to use `wx.Window.PushEventHandler` since this sets
15afbcd0
RD
6842 up a chain of event handlers, where an event not handled by one event
6843 handler is handed to the next one in the chain.
6844 """
54f9ee45 6845 return _core_.Window_SetEventHandler(*args, **kwargs)
e811c8ce
RD
6846
6847 def PushEventHandler(*args, **kwargs):
15afbcd0 6848 """
a95a7133 6849 PushEventHandler(self, EvtHandler handler)
15afbcd0
RD
6850
6851 Pushes this event handler onto the event handler stack for the window.
6852 An event handler is an object that is capable of processing the events
6853 sent to a window. By default, the window is its own event handler, but
6854 an application may wish to substitute another, for example to allow
6855 central implementation of event-handling for a variety of different
6856 window classes.
6857
6858 wx.Window.PushEventHandler allows an application to set up a chain of
6859 event handlers, where an event not handled by one event handler is
41e2b43e 6860 handed to the next one in the chain. Use `wx.Window.PopEventHandler` to
15afbcd0
RD
6861 remove the event handler.
6862 """
54f9ee45 6863 return _core_.Window_PushEventHandler(*args, **kwargs)
e811c8ce
RD
6864
6865 def PopEventHandler(*args, **kwargs):
15afbcd0 6866 """
a95a7133 6867 PopEventHandler(self, bool deleteHandler=False) -> EvtHandler
15afbcd0
RD
6868
6869 Removes and returns the top-most event handler on the event handler
6870 stack. If deleteHandler is True then the wx.EvtHandler object will be
6871 destroyed after it is popped.
6872 """
54f9ee45 6873 return _core_.Window_PopEventHandler(*args, **kwargs)
e811c8ce
RD
6874
6875 def RemoveEventHandler(*args, **kwargs):
15afbcd0 6876 """
a95a7133 6877 RemoveEventHandler(self, EvtHandler handler) -> bool
15afbcd0 6878
41e2b43e
RD
6879 Find the given handler in the event handler chain and remove (but not
6880 delete) it from the event handler chain, return True if it was found
6881 and False otherwise (this also results in an assert failure so this
6882 function should only be called when the handler is supposed to be
6883 there.)
15afbcd0 6884 """
54f9ee45 6885 return _core_.Window_RemoveEventHandler(*args, **kwargs)
e811c8ce
RD
6886
6887 def SetValidator(*args, **kwargs):
15afbcd0 6888 """
a95a7133 6889 SetValidator(self, Validator validator)
15afbcd0
RD
6890
6891 Deletes the current validator (if any) and sets the window validator,
6892 having called wx.Validator.Clone to create a new validator of this
6893 type.
6894 """
54f9ee45 6895 return _core_.Window_SetValidator(*args, **kwargs)
e811c8ce
RD
6896
6897 def GetValidator(*args, **kwargs):
15afbcd0 6898 """
a95a7133 6899 GetValidator(self) -> Validator
15afbcd0
RD
6900
6901 Returns a pointer to the current validator for the window, or None if
6902 there is none.
6903 """
54f9ee45 6904 return _core_.Window_GetValidator(*args, **kwargs)
e811c8ce 6905
74a57fcd
RD
6906 def Validate(*args, **kwargs):
6907 """
a95a7133 6908 Validate(self) -> bool
74a57fcd
RD
6909
6910 Validates the current values of the child controls using their
41e2b43e
RD
6911 validators. If the window has wx.WS_EX_VALIDATE_RECURSIVELY extra
6912 style flag set, the method will also call Validate() of all child
6913 windows. Returns false if any of the validations failed.
74a57fcd 6914 """
54f9ee45 6915 return _core_.Window_Validate(*args, **kwargs)
74a57fcd
RD
6916
6917 def TransferDataToWindow(*args, **kwargs):
6918 """
a95a7133 6919 TransferDataToWindow(self) -> bool
74a57fcd 6920
41e2b43e
RD
6921 Transfers values to child controls from data areas specified by their
6922 validators. If the window has wx.WS_EX_VALIDATE_RECURSIVELY extra
6923 style flag set, the method will also call TransferDataToWindow() of
6924 all child windows.
74a57fcd 6925 """
54f9ee45 6926 return _core_.Window_TransferDataToWindow(*args, **kwargs)
74a57fcd
RD
6927
6928 def TransferDataFromWindow(*args, **kwargs):
6929 """
a95a7133 6930 TransferDataFromWindow(self) -> bool
74a57fcd 6931
41e2b43e
RD
6932 Transfers values from child controls to data areas specified by their
6933 validators. Returns false if a transfer failed. If the window has
6934 wx.WS_EX_VALIDATE_RECURSIVELY extra style flag set, the method will
6935 also call TransferDataFromWindow() of all child windows.
74a57fcd 6936 """
54f9ee45 6937 return _core_.Window_TransferDataFromWindow(*args, **kwargs)
74a57fcd
RD
6938
6939 def InitDialog(*args, **kwargs):
6940 """
a95a7133 6941 InitDialog(self)
74a57fcd 6942
41e2b43e
RD
6943 Sends an EVT_INIT_DIALOG event, whose handler usually transfers data
6944 to the dialog via validators.
74a57fcd 6945 """
54f9ee45 6946 return _core_.Window_InitDialog(*args, **kwargs)
74a57fcd 6947
e811c8ce 6948 def SetAcceleratorTable(*args, **kwargs):
15afbcd0 6949 """
a95a7133 6950 SetAcceleratorTable(self, AcceleratorTable accel)
15afbcd0
RD
6951
6952 Sets the accelerator table for this window.
6953 """
54f9ee45 6954 return _core_.Window_SetAcceleratorTable(*args, **kwargs)
e811c8ce
RD
6955
6956 def GetAcceleratorTable(*args, **kwargs):
15afbcd0 6957 """
a95a7133 6958 GetAcceleratorTable(self) -> AcceleratorTable
15afbcd0
RD
6959
6960 Gets the accelerator table for this window.
6961 """
54f9ee45 6962 return _core_.Window_GetAcceleratorTable(*args, **kwargs)
e811c8ce
RD
6963
6964 def RegisterHotKey(*args, **kwargs):
15afbcd0 6965 """
a95a7133 6966 RegisterHotKey(self, int hotkeyId, int modifiers, int keycode) -> bool
15afbcd0
RD
6967
6968 Registers a system wide hotkey. Every time the user presses the hotkey
6969 registered here, this window will receive a hotkey event. It will
6970 receive the event even if the application is in the background and
6971 does not have the input focus because the user is working with some
6972 other application. To bind an event handler function to this hotkey
6973 use EVT_HOTKEY with an id equal to hotkeyId. Returns True if the
6974 hotkey was registered successfully.
6975 """
54f9ee45 6976 return _core_.Window_RegisterHotKey(*args, **kwargs)
e811c8ce
RD
6977
6978 def UnregisterHotKey(*args, **kwargs):
15afbcd0 6979 """
a95a7133 6980 UnregisterHotKey(self, int hotkeyId) -> bool
15afbcd0
RD
6981
6982 Unregisters a system wide hotkey.
6983 """
54f9ee45 6984 return _core_.Window_UnregisterHotKey(*args, **kwargs)
e811c8ce
RD
6985
6986 def ConvertDialogPointToPixels(*args, **kwargs):
15afbcd0 6987 """
a95a7133 6988 ConvertDialogPointToPixels(self, Point pt) -> Point
15afbcd0
RD
6989
6990 Converts a point or size from dialog units to pixels. Dialog units
6991 are used for maintaining a dialog's proportions even if the font
6992 changes. For the x dimension, the dialog units are multiplied by the
6993 average character width and then divided by 4. For the y dimension,
6994 the dialog units are multiplied by the average character height and
6995 then divided by 8.
6996 """
54f9ee45 6997 return _core_.Window_ConvertDialogPointToPixels(*args, **kwargs)
e811c8ce
RD
6998
6999 def ConvertDialogSizeToPixels(*args, **kwargs):
15afbcd0 7000 """
a95a7133 7001 ConvertDialogSizeToPixels(self, Size sz) -> Size
15afbcd0
RD
7002
7003 Converts a point or size from dialog units to pixels. Dialog units
7004 are used for maintaining a dialog's proportions even if the font
7005 changes. For the x dimension, the dialog units are multiplied by the
7006 average character width and then divided by 4. For the y dimension,
7007 the dialog units are multiplied by the average character height and
7008 then divided by 8.
7009 """
54f9ee45 7010 return _core_.Window_ConvertDialogSizeToPixels(*args, **kwargs)
e811c8ce
RD
7011
7012 def DLG_PNT(*args, **kwargs):
15afbcd0 7013 """
a95a7133 7014 DLG_PNT(self, Point pt) -> Point
15afbcd0
RD
7015
7016 Converts a point or size from dialog units to pixels. Dialog units
7017 are used for maintaining a dialog's proportions even if the font
7018 changes. For the x dimension, the dialog units are multiplied by the
7019 average character width and then divided by 4. For the y dimension,
7020 the dialog units are multiplied by the average character height and
7021 then divided by 8.
7022 """
54f9ee45 7023 return _core_.Window_DLG_PNT(*args, **kwargs)
e811c8ce
RD
7024
7025 def DLG_SZE(*args, **kwargs):
15afbcd0 7026 """
a95a7133 7027 DLG_SZE(self, Size sz) -> Size
15afbcd0
RD
7028
7029 Converts a point or size from dialog units to pixels. Dialog units
7030 are used for maintaining a dialog's proportions even if the font
7031 changes. For the x dimension, the dialog units are multiplied by the
7032 average character width and then divided by 4. For the y dimension,
7033 the dialog units are multiplied by the average character height and
7034 then divided by 8.
7035 """
54f9ee45 7036 return _core_.Window_DLG_SZE(*args, **kwargs)
e811c8ce
RD
7037
7038 def ConvertPixelPointToDialog(*args, **kwargs):
a95a7133 7039 """ConvertPixelPointToDialog(self, Point pt) -> Point"""
54f9ee45 7040 return _core_.Window_ConvertPixelPointToDialog(*args, **kwargs)
e811c8ce
RD
7041
7042 def ConvertPixelSizeToDialog(*args, **kwargs):
a95a7133 7043 """ConvertPixelSizeToDialog(self, Size sz) -> Size"""
54f9ee45 7044 return _core_.Window_ConvertPixelSizeToDialog(*args, **kwargs)
e811c8ce
RD
7045
7046 def WarpPointer(*args, **kwargs):
15afbcd0 7047 """
a95a7133 7048 WarpPointer(self, int x, int y)
15afbcd0
RD
7049
7050 Moves the pointer to the given position on the window.
7051
7052 NOTE: This function is not supported under Mac because Apple Human
7053 Interface Guidelines forbid moving the mouse cursor programmatically.
7054 """
54f9ee45 7055 return _core_.Window_WarpPointer(*args, **kwargs)
e811c8ce
RD
7056
7057 def CaptureMouse(*args, **kwargs):
15afbcd0 7058 """
a95a7133 7059 CaptureMouse(self)
15afbcd0
RD
7060
7061 Directs all mouse input to this window. Call wx.Window.ReleaseMouse to
7062 release the capture.
7063
7064 Note that wxWindows maintains the stack of windows having captured the
7065 mouse and when the mouse is released the capture returns to the window
7066 which had had captured it previously and it is only really released if
7067 there were no previous window. In particular, this means that you must
7068 release the mouse as many times as you capture it.
7069 """
54f9ee45 7070 return _core_.Window_CaptureMouse(*args, **kwargs)
e811c8ce
RD
7071
7072 def ReleaseMouse(*args, **kwargs):
15afbcd0 7073 """
a95a7133 7074 ReleaseMouse(self)
15afbcd0
RD
7075
7076 Releases mouse input captured with wx.Window.CaptureMouse.
7077 """
54f9ee45 7078 return _core_.Window_ReleaseMouse(*args, **kwargs)
e811c8ce
RD
7079
7080 def GetCapture(*args, **kwargs):
15afbcd0 7081 """
66c033b4 7082 GetCapture() -> Window
15afbcd0
RD
7083
7084 Returns the window which currently captures the mouse or None
7085 """
54f9ee45 7086 return _core_.Window_GetCapture(*args, **kwargs)
e811c8ce
RD
7087
7088 GetCapture = staticmethod(GetCapture)
7089 def HasCapture(*args, **kwargs):
15afbcd0 7090 """
a95a7133 7091 HasCapture(self) -> bool
15afbcd0
RD
7092
7093 Returns true if this window has the current mouse capture.
7094 """
54f9ee45 7095 return _core_.Window_HasCapture(*args, **kwargs)
e811c8ce
RD
7096
7097 def Refresh(*args, **kwargs):
15afbcd0 7098 """
a95a7133 7099 Refresh(self, bool eraseBackground=True, Rect rect=None)
15afbcd0
RD
7100
7101 Mark the specified rectangle (or the whole window) as "dirty" so it
7102 will be repainted. Causes an EVT_PAINT event to be generated and sent
7103 to the window.
7104 """
54f9ee45 7105 return _core_.Window_Refresh(*args, **kwargs)
e811c8ce
RD
7106
7107 def RefreshRect(*args, **kwargs):
15afbcd0 7108 """
fef4c27a 7109 RefreshRect(self, Rect rect, bool eraseBackground=True)
15afbcd0
RD
7110
7111 Redraws the contents of the given rectangle: the area inside it will
7112 be repainted. This is the same as Refresh but has a nicer syntax.
7113 """
54f9ee45 7114 return _core_.Window_RefreshRect(*args, **kwargs)
e811c8ce
RD
7115
7116 def Update(*args, **kwargs):
15afbcd0 7117 """
a95a7133 7118 Update(self)
15afbcd0
RD
7119
7120 Calling this method immediately repaints the invalidated area of the
7121 window instead of waiting for the EVT_PAINT event to happen, (normally
7122 this would usually only happen when the flow of control returns to the
7123 event loop.) Notice that this function doesn't refresh the window and
7124 does nothing if the window has been already repainted. Use Refresh
7125 first if you want to immediately redraw the window (or some portion of
7126 it) unconditionally.
7127 """
54f9ee45 7128 return _core_.Window_Update(*args, **kwargs)
e811c8ce
RD
7129
7130 def ClearBackground(*args, **kwargs):
15afbcd0 7131 """
a95a7133 7132 ClearBackground(self)
15afbcd0
RD
7133
7134 Clears the window by filling it with the current background
7135 colour. Does not cause an erase background event to be generated.
7136 """
54f9ee45 7137 return _core_.Window_ClearBackground(*args, **kwargs)
e811c8ce
RD
7138
7139 def Freeze(*args, **kwargs):
15afbcd0 7140 """
a95a7133 7141 Freeze(self)
15afbcd0 7142
41e2b43e
RD
7143 Freezes the window or, in other words, prevents any updates from
7144 taking place on screen, the window is not redrawn at all. Thaw must be
7145 called to reenable window redrawing. Calls to Freeze/Thaw may be
7146 nested, with the actual Thaw being delayed until all the nesting has
7147 been undone.
15afbcd0
RD
7148
7149 This method is useful for visual appearance optimization (for example,
7150 it is a good idea to use it before inserting large amount of text into
7151 a wxTextCtrl under wxGTK) but is not implemented on all platforms nor
7152 for all controls so it is mostly just a hint to wxWindows and not a
7153 mandatory directive.
7154 """
54f9ee45 7155 return _core_.Window_Freeze(*args, **kwargs)
e811c8ce
RD
7156
7157 def Thaw(*args, **kwargs):
15afbcd0 7158 """
a95a7133 7159 Thaw(self)
15afbcd0 7160
4276dc52 7161 Reenables window updating after a previous call to Freeze. Calls to
41e2b43e
RD
7162 Freeze/Thaw may be nested, so Thaw must be called the same number of
7163 times that Freeze was before the window will be updated.
15afbcd0 7164 """
54f9ee45 7165 return _core_.Window_Thaw(*args, **kwargs)
e811c8ce
RD
7166
7167 def PrepareDC(*args, **kwargs):
15afbcd0 7168 """
a95a7133 7169 PrepareDC(self, DC dc)
15afbcd0
RD
7170
7171 Call this function to prepare the device context for drawing a
7172 scrolled image. It sets the device origin according to the current
7173 scroll position.
7174 """
54f9ee45 7175 return _core_.Window_PrepareDC(*args, **kwargs)
e811c8ce
RD
7176
7177 def GetUpdateRegion(*args, **kwargs):
15afbcd0 7178 """
a95a7133 7179 GetUpdateRegion(self) -> Region
15afbcd0
RD
7180
7181 Returns the region specifying which parts of the window have been
7182 damaged. Should only be called within an EVT_PAINT handler.
7183 """
54f9ee45 7184 return _core_.Window_GetUpdateRegion(*args, **kwargs)
e811c8ce
RD
7185
7186 def GetUpdateClientRect(*args, **kwargs):
15afbcd0 7187 """
a95a7133 7188 GetUpdateClientRect(self) -> Rect
15afbcd0
RD
7189
7190 Get the update rectangle region bounding box in client coords.
7191 """
54f9ee45 7192 return _core_.Window_GetUpdateClientRect(*args, **kwargs)
e811c8ce
RD
7193
7194 def IsExposed(*args, **kwargs):
15afbcd0 7195 """
a95a7133 7196 IsExposed(self, int x, int y, int w=1, int h=1) -> bool
15afbcd0
RD
7197
7198 Returns true if the given point or rectangle area has been exposed
7199 since the last repaint. Call this in an paint event handler to
7200 optimize redrawing by only redrawing those areas, which have been
7201 exposed.
7202 """
54f9ee45 7203 return _core_.Window_IsExposed(*args, **kwargs)
e811c8ce
RD
7204
7205 def IsExposedPoint(*args, **kwargs):
15afbcd0 7206 """
a95a7133 7207 IsExposedPoint(self, Point pt) -> bool
15afbcd0
RD
7208
7209 Returns true if the given point or rectangle area has been exposed
7210 since the last repaint. Call this in an paint event handler to
7211 optimize redrawing by only redrawing those areas, which have been
7212 exposed.
7213 """
54f9ee45 7214 return _core_.Window_IsExposedPoint(*args, **kwargs)
e811c8ce 7215
4276dc52 7216 def IsExposedRect(*args, **kwargs):
15afbcd0 7217 """
a95a7133 7218 IsExposedRect(self, Rect rect) -> bool
15afbcd0
RD
7219
7220 Returns true if the given point or rectangle area has been exposed
7221 since the last repaint. Call this in an paint event handler to
7222 optimize redrawing by only redrawing those areas, which have been
7223 exposed.
7224 """
54f9ee45 7225 return _core_.Window_IsExposedRect(*args, **kwargs)
e811c8ce 7226
74a57fcd
RD
7227 def GetDefaultAttributes(*args, **kwargs):
7228 """
a95a7133 7229 GetDefaultAttributes(self) -> VisualAttributes
74a57fcd 7230
41e2b43e
RD
7231 Get the default attributes for an instance of this class. This is
7232 useful if you want to use the same font or colour in your own control
7233 as in a standard control -- which is a much better idea than hard
7234 coding specific colours or fonts which might look completely out of
db3e571a 7235 place on the user's system, especially if it uses themes.
74a57fcd 7236 """
54f9ee45 7237 return _core_.Window_GetDefaultAttributes(*args, **kwargs)
74a57fcd
RD
7238
7239 def GetClassDefaultAttributes(*args, **kwargs):
7240 """
66c033b4 7241 GetClassDefaultAttributes(int variant=WINDOW_VARIANT_NORMAL) -> VisualAttributes
74a57fcd 7242
41e2b43e
RD
7243 Get the default attributes for this class. This is useful if you want
7244 to use the same font or colour in your own control as in a standard
7245 control -- which is a much better idea than hard coding specific
db3e571a
RD
7246 colours or fonts which might look completely out of place on the
7247 user's system, especially if it uses themes.
74a57fcd
RD
7248
7249 The variant parameter is only relevant under Mac currently and is
41e2b43e 7250 ignore under other platforms. Under Mac, it will change the size of
db3e571a
RD
7251 the returned font. See `wx.Window.SetWindowVariant` for more about
7252 this.
74a57fcd 7253 """
54f9ee45 7254 return _core_.Window_GetClassDefaultAttributes(*args, **kwargs)
74a57fcd
RD
7255
7256 GetClassDefaultAttributes = staticmethod(GetClassDefaultAttributes)
e811c8ce 7257 def SetBackgroundColour(*args, **kwargs):
15afbcd0 7258 """
a95a7133 7259 SetBackgroundColour(self, Colour colour) -> bool
15afbcd0
RD
7260
7261 Sets the background colour of the window. Returns True if the colour
7262 was changed. The background colour is usually painted by the default
7263 EVT_ERASE_BACKGROUND event handler function under Windows and
f8167d6e
RD
7264 automatically under GTK. Using `wx.NullColour` will reset the window
7265 to the default background colour.
15afbcd0 7266
db3e571a 7267 Note that setting the background colour may not cause an immediate
f8167d6e 7268 refresh, so you may wish to call `ClearBackground` or `Refresh` after
15afbcd0
RD
7269 calling this function.
7270
f8167d6e
RD
7271 Using this function will disable attempts to use themes for this
7272 window, if the system supports them. Use with care since usually the
7273 themes represent the appearance chosen by the user to be used for all
7274 applications on the system.
15afbcd0 7275 """
54f9ee45 7276 return _core_.Window_SetBackgroundColour(*args, **kwargs)
e811c8ce 7277
412d302d
RD
7278 def SetOwnBackgroundColour(*args, **kwargs):
7279 """SetOwnBackgroundColour(self, Colour colour)"""
7280 return _core_.Window_SetOwnBackgroundColour(*args, **kwargs)
b2df227b 7281
e811c8ce 7282 def SetForegroundColour(*args, **kwargs):
15afbcd0 7283 """
a95a7133 7284 SetForegroundColour(self, Colour colour) -> bool
15afbcd0
RD
7285
7286 Sets the foreground colour of the window. Returns True is the colour
7287 was changed. The interpretation of foreground colour is dependent on
7288 the window class; it may be the text colour or other colour, or it may
7289 not be used at all.
7290 """
54f9ee45 7291 return _core_.Window_SetForegroundColour(*args, **kwargs)
e811c8ce 7292
fa47d7a7
VS
7293 def SetOwnForegroundColour(*args, **kwargs):
7294 """SetOwnForegroundColour(self, Colour colour)"""
7295 return _core_.Window_SetOwnForegroundColour(*args, **kwargs)
b2df227b 7296
e811c8ce 7297 def GetBackgroundColour(*args, **kwargs):
15afbcd0 7298 """
a95a7133 7299 GetBackgroundColour(self) -> Colour
15afbcd0
RD
7300
7301 Returns the background colour of the window.
7302 """
54f9ee45 7303 return _core_.Window_GetBackgroundColour(*args, **kwargs)
e811c8ce
RD
7304
7305 def GetForegroundColour(*args, **kwargs):
15afbcd0 7306 """
a95a7133 7307 GetForegroundColour(self) -> Colour
15afbcd0
RD
7308
7309 Returns the foreground colour of the window. The interpretation of
7310 foreground colour is dependent on the window class; it may be the text
7311 colour or other colour, or it may not be used at all.
7312 """
54f9ee45 7313 return _core_.Window_GetForegroundColour(*args, **kwargs)
e811c8ce 7314
7bc1e663
RD
7315 def SetBackgroundStyle(*args, **kwargs):
7316 """
7317 SetBackgroundStyle(self, int style) -> bool
7318
7319 Returns the background style of the window. The background style
7320 indicates how the background of the window is drawn.
7321
7322 ====================== ========================================
7323 wx.BG_STYLE_SYSTEM The background colour or pattern should
7324 be determined by the system
7325 wx.BG_STYLE_COLOUR The background should be a solid colour
7326 wx.BG_STYLE_CUSTOM The background will be implemented by the
7327 application.
7328 ====================== ========================================
7329
7330 On GTK+, use of wx.BG_STYLE_CUSTOM allows the flicker-free drawing of
7331 a custom background, such as a tiled bitmap. Currently the style has
7332 no effect on other platforms.
7333
7334 :see: `GetBackgroundStyle`, `SetBackgroundColour`
7335 """
7336 return _core_.Window_SetBackgroundStyle(*args, **kwargs)
7337
7338 def GetBackgroundStyle(*args, **kwargs):
7339 """
7340 GetBackgroundStyle(self) -> int
7341
7342 Returns the background style of the window.
7343
7344 :see: `SetBackgroundStyle`
7345 """
7346 return _core_.Window_GetBackgroundStyle(*args, **kwargs)
7347
51b83b37
RD
7348 def HasTransparentBackground(*args, **kwargs):
7349 """
7350 HasTransparentBackground(self) -> bool
7351
7352 Returns True if this window's background is transparent (as, for
7353 example, for `wx.StaticText`) and should show the parent window's
7354 background.
7355
7356 This method is mostly used internally by the library itself and you
7357 normally shouldn't have to call it. You may, however, have to override
7358 it in your custom control classes to ensure that background is painted
7359 correctly.
7360 """
7361 return _core_.Window_HasTransparentBackground(*args, **kwargs)
7362
e811c8ce 7363 def SetCursor(*args, **kwargs):
15afbcd0 7364 """
a95a7133 7365 SetCursor(self, Cursor cursor) -> bool
15afbcd0
RD
7366
7367 Sets the window's cursor. Notice that the window cursor also sets it
7368 for the children of the window implicitly.
7369
7370 The cursor may be wx.NullCursor in which case the window cursor will
7371 be reset back to default.
7372 """
54f9ee45 7373 return _core_.Window_SetCursor(*args, **kwargs)
e811c8ce
RD
7374
7375 def GetCursor(*args, **kwargs):
15afbcd0 7376 """
a95a7133 7377 GetCursor(self) -> Cursor
15afbcd0
RD
7378
7379 Return the cursor associated with this window.
7380 """
54f9ee45 7381 return _core_.Window_GetCursor(*args, **kwargs)
e811c8ce
RD
7382
7383 def SetFont(*args, **kwargs):
15afbcd0 7384 """
a95a7133 7385 SetFont(self, Font font) -> bool
15afbcd0
RD
7386
7387 Sets the font for this window.
7388 """
54f9ee45 7389 return _core_.Window_SetFont(*args, **kwargs)
e811c8ce 7390
fa47d7a7
VS
7391 def SetOwnFont(*args, **kwargs):
7392 """SetOwnFont(self, Font font)"""
7393 return _core_.Window_SetOwnFont(*args, **kwargs)
b2df227b 7394
e811c8ce 7395 def GetFont(*args, **kwargs):
15afbcd0 7396 """
a95a7133 7397 GetFont(self) -> Font
15afbcd0 7398
4276dc52 7399 Returns the default font used for this window.
15afbcd0 7400 """
54f9ee45 7401 return _core_.Window_GetFont(*args, **kwargs)
e811c8ce
RD
7402
7403 def SetCaret(*args, **kwargs):
15afbcd0 7404 """
a95a7133 7405 SetCaret(self, Caret caret)
15afbcd0
RD
7406
7407 Sets the caret associated with the window.
7408 """
54f9ee45 7409 return _core_.Window_SetCaret(*args, **kwargs)
e811c8ce
RD
7410
7411 def GetCaret(*args, **kwargs):
15afbcd0 7412 """
a95a7133 7413 GetCaret(self) -> Caret
15afbcd0
RD
7414
7415 Returns the caret associated with the window.
7416 """
54f9ee45 7417 return _core_.Window_GetCaret(*args, **kwargs)
e811c8ce
RD
7418
7419 def GetCharHeight(*args, **kwargs):
15afbcd0 7420 """
a95a7133 7421 GetCharHeight(self) -> int
15afbcd0
RD
7422
7423 Get the (average) character size for the current font.
7424 """
54f9ee45 7425 return _core_.Window_GetCharHeight(*args, **kwargs)
e811c8ce
RD
7426
7427 def GetCharWidth(*args, **kwargs):
15afbcd0 7428 """
a95a7133 7429 GetCharWidth(self) -> int
15afbcd0
RD
7430
7431 Get the (average) character size for the current font.
7432 """
54f9ee45 7433 return _core_.Window_GetCharWidth(*args, **kwargs)
e811c8ce
RD
7434
7435 def GetTextExtent(*args, **kwargs):
fd2dc343
RD
7436 """
7437 GetTextExtent(String string) -> (width, height)
7438
7439 Get the width and height of the text using the current font.
7440 """
54f9ee45 7441 return _core_.Window_GetTextExtent(*args, **kwargs)
e811c8ce
RD
7442
7443 def GetFullTextExtent(*args, **kwargs):
0df68c9f 7444 """
196addbf 7445 GetFullTextExtent(String string, Font font=None) ->
0df68c9f 7446 (width, height, descent, externalLeading)
e811c8ce 7447
15afbcd0
RD
7448 Get the width, height, decent and leading of the text using the
7449 current or specified font.
0df68c9f 7450 """
54f9ee45 7451 return _core_.Window_GetFullTextExtent(*args, **kwargs)
e811c8ce
RD
7452
7453 def ClientToScreenXY(*args, **kwargs):
15afbcd0
RD
7454 """
7455 ClientToScreenXY(int x, int y) -> (x,y)
7456
7457 Converts to screen coordinates from coordinates relative to this window.
7458 """
54f9ee45 7459 return _core_.Window_ClientToScreenXY(*args, **kwargs)
e811c8ce
RD
7460
7461 def ScreenToClientXY(*args, **kwargs):
15afbcd0
RD
7462 """
7463 ScreenToClientXY(int x, int y) -> (x,y)
7464
7465 Converts from screen to client window coordinates.
7466 """
54f9ee45 7467 return _core_.Window_ScreenToClientXY(*args, **kwargs)
e811c8ce
RD
7468
7469 def ClientToScreen(*args, **kwargs):
15afbcd0 7470 """
a95a7133 7471 ClientToScreen(self, Point pt) -> Point
15afbcd0
RD
7472
7473 Converts to screen coordinates from coordinates relative to this window.
7474 """
54f9ee45 7475 return _core_.Window_ClientToScreen(*args, **kwargs)
e811c8ce
RD
7476
7477 def ScreenToClient(*args, **kwargs):
15afbcd0 7478 """
a95a7133 7479 ScreenToClient(self, Point pt) -> Point
15afbcd0
RD
7480
7481 Converts from screen to client window coordinates.
7482 """
54f9ee45 7483 return _core_.Window_ScreenToClient(*args, **kwargs)
e811c8ce
RD
7484
7485 def HitTestXY(*args, **kwargs):
15afbcd0 7486 """
a95a7133 7487 HitTestXY(self, int x, int y) -> int
15afbcd0
RD
7488
7489 Test where the given (in client coords) point lies
7490 """
54f9ee45 7491 return _core_.Window_HitTestXY(*args, **kwargs)
e811c8ce
RD
7492
7493 def HitTest(*args, **kwargs):
15afbcd0 7494 """
a95a7133 7495 HitTest(self, Point pt) -> int
15afbcd0
RD
7496
7497 Test where the given (in client coords) point lies
7498 """
54f9ee45 7499 return _core_.Window_HitTest(*args, **kwargs)
e811c8ce 7500
15afbcd0
RD
7501 def GetBorder(*args):
7502 """
a95a7133
RD
7503 GetBorder(self, long flags) -> int
7504 GetBorder(self) -> int
e811c8ce 7505
15afbcd0
RD
7506 Get border for the flags of this window
7507 """
54f9ee45 7508 return _core_.Window_GetBorder(*args)
e811c8ce
RD
7509
7510 def UpdateWindowUI(*args, **kwargs):
15afbcd0 7511 """
a95a7133 7512 UpdateWindowUI(self, long flags=UPDATE_UI_NONE)
15afbcd0
RD
7513
7514 This function sends EVT_UPDATE_UI events to the window. The particular
7515 implementation depends on the window; for example a wx.ToolBar will
7516 send an update UI event for each toolbar button, and a wx.Frame will
7517 send an update UI event for each menubar menu item. You can call this
7518 function from your application to ensure that your UI is up-to-date at
7519 a particular point in time (as far as your EVT_UPDATE_UI handlers are
7520 concerned). This may be necessary if you have called
7521 wx.UpdateUIEvent.SetMode or wx.UpdateUIEvent.SetUpdateInterval to
7522 limit the overhead that wxWindows incurs by sending update UI events
7523 in idle time.
15afbcd0 7524 """
54f9ee45 7525 return _core_.Window_UpdateWindowUI(*args, **kwargs)
e811c8ce
RD
7526
7527 def PopupMenuXY(*args, **kwargs):
15afbcd0 7528 """
b0503257 7529 PopupMenuXY(self, Menu menu, int x=-1, int y=-1) -> bool
15afbcd0 7530
b0503257
RD
7531 Pops up the given menu at the specified coordinates, relative to this window,
7532 and returns control when the user has dismissed the menu. If a menu item is
7533 selected, the corresponding menu event is generated and will be processed as
7534 usual. If the default position is given then the current position of the
7535 mouse cursor will be used.
15afbcd0 7536 """
54f9ee45 7537 return _core_.Window_PopupMenuXY(*args, **kwargs)
e811c8ce 7538
15afbcd0
RD
7539 def PopupMenu(*args, **kwargs):
7540 """
b0503257 7541 PopupMenu(self, Menu menu, Point pos=DefaultPosition) -> bool
15afbcd0 7542
b0503257
RD
7543 Pops up the given menu at the specified coordinates, relative to this window,
7544 and returns control when the user has dismissed the menu. If a menu item is
7545 selected, the corresponding menu event is generated and will be processed as
7546 usual. If the default position is given then the current position of the
7547 mouse cursor will be used.
15afbcd0 7548 """
54f9ee45 7549 return _core_.Window_PopupMenu(*args, **kwargs)
15afbcd0
RD
7550
7551 def GetHandle(*args, **kwargs):
7552 """
a95a7133 7553 GetHandle(self) -> long
15afbcd0
RD
7554
7555 Returns the platform-specific handle (as a long integer) of the
7556 physical window. Currently on wxMac it returns the handle of the
7557 toplevel parent of the window.
7558 """
54f9ee45 7559 return _core_.Window_GetHandle(*args, **kwargs)
15afbcd0 7560
7e63a440
RD
7561 def AssociateHandle(*args, **kwargs):
7562 """
7563 AssociateHandle(self, long handle)
7564
7565 Associate the window with a new native handle
7566 """
7567 return _core_.Window_AssociateHandle(*args, **kwargs)
7568
7569 def DissociateHandle(*args, **kwargs):
7570 """
7571 DissociateHandle(self)
7572
7573 Dissociate the current native handle from the window
7574 """
7575 return _core_.Window_DissociateHandle(*args, **kwargs)
7576
15afbcd0
RD
7577 def HasScrollbar(*args, **kwargs):
7578 """
a95a7133 7579 HasScrollbar(self, int orient) -> bool
15afbcd0
RD
7580
7581 Does the window have the scrollbar for this orientation?
7582 """
54f9ee45 7583 return _core_.Window_HasScrollbar(*args, **kwargs)
15afbcd0
RD
7584
7585 def SetScrollbar(*args, **kwargs):
7586 """
41e2b43e 7587 SetScrollbar(self, int orientation, int position, int thumbSize, int range,
15afbcd0
RD
7588 bool refresh=True)
7589
7590 Sets the scrollbar properties of a built-in scrollbar.
15afbcd0 7591 """
54f9ee45 7592 return _core_.Window_SetScrollbar(*args, **kwargs)
e811c8ce
RD
7593
7594 def SetScrollPos(*args, **kwargs):
15afbcd0 7595 """
a95a7133 7596 SetScrollPos(self, int orientation, int pos, bool refresh=True)
15afbcd0
RD
7597
7598 Sets the position of one of the built-in scrollbars.
7599 """
54f9ee45 7600 return _core_.Window_SetScrollPos(*args, **kwargs)
e811c8ce
RD
7601
7602 def GetScrollPos(*args, **kwargs):
15afbcd0 7603 """
a95a7133 7604 GetScrollPos(self, int orientation) -> int
15afbcd0
RD
7605
7606 Returns the built-in scrollbar position.
7607 """
54f9ee45 7608 return _core_.Window_GetScrollPos(*args, **kwargs)
e811c8ce
RD
7609
7610 def GetScrollThumb(*args, **kwargs):
15afbcd0 7611 """
a95a7133 7612 GetScrollThumb(self, int orientation) -> int
15afbcd0
RD
7613
7614 Returns the built-in scrollbar thumb size.
7615 """
54f9ee45 7616 return _core_.Window_GetScrollThumb(*args, **kwargs)
e811c8ce
RD
7617
7618 def GetScrollRange(*args, **kwargs):
15afbcd0 7619 """
a95a7133 7620 GetScrollRange(self, int orientation) -> int
15afbcd0
RD
7621
7622 Returns the built-in scrollbar range.
7623 """
54f9ee45 7624 return _core_.Window_GetScrollRange(*args, **kwargs)
e811c8ce
RD
7625
7626 def ScrollWindow(*args, **kwargs):
15afbcd0 7627 """
a95a7133 7628 ScrollWindow(self, int dx, int dy, Rect rect=None)
15afbcd0
RD
7629
7630 Physically scrolls the pixels in the window and move child windows
7631 accordingly. Use this function to optimise your scrolling
7632 implementations, to minimise the area that must be redrawn. Note that
7633 it is rarely required to call this function from a user program.
15afbcd0 7634 """
54f9ee45 7635 return _core_.Window_ScrollWindow(*args, **kwargs)
e811c8ce
RD
7636
7637 def ScrollLines(*args, **kwargs):
15afbcd0 7638 """
a95a7133 7639 ScrollLines(self, int lines) -> bool
15afbcd0
RD
7640
7641 If the platform and window class supports it, scrolls the window by
7642 the given number of lines down, if lines is positive, or up if lines
7643 is negative. Returns True if the window was scrolled, False if it was
7644 already on top/bottom and nothing was done.
7645 """
54f9ee45 7646 return _core_.Window_ScrollLines(*args, **kwargs)
e811c8ce
RD
7647
7648 def ScrollPages(*args, **kwargs):
15afbcd0 7649 """
a95a7133 7650 ScrollPages(self, int pages) -> bool
15afbcd0 7651
41e2b43e 7652 If the platform and window class supports it, scrolls the window by
15afbcd0
RD
7653 the given number of pages down, if pages is positive, or up if pages
7654 is negative. Returns True if the window was scrolled, False if it was
7655 already on top/bottom and nothing was done.
7656 """
54f9ee45 7657 return _core_.Window_ScrollPages(*args, **kwargs)
e811c8ce
RD
7658
7659 def LineUp(*args, **kwargs):
15afbcd0 7660 """
a95a7133 7661 LineUp(self) -> bool
15afbcd0
RD
7662
7663 This is just a wrapper for ScrollLines(-1).
7664 """
54f9ee45 7665 return _core_.Window_LineUp(*args, **kwargs)
e811c8ce
RD
7666
7667 def LineDown(*args, **kwargs):
15afbcd0 7668 """
a95a7133 7669 LineDown(self) -> bool
15afbcd0
RD
7670
7671 This is just a wrapper for ScrollLines(1).
7672 """
54f9ee45 7673 return _core_.Window_LineDown(*args, **kwargs)
e811c8ce
RD
7674
7675 def PageUp(*args, **kwargs):
15afbcd0 7676 """
a95a7133 7677 PageUp(self) -> bool
15afbcd0
RD
7678
7679 This is just a wrapper for ScrollPages(-1).
7680 """
54f9ee45 7681 return _core_.Window_PageUp(*args, **kwargs)
e811c8ce
RD
7682
7683 def PageDown(*args, **kwargs):
15afbcd0 7684 """
a95a7133 7685 PageDown(self) -> bool
15afbcd0
RD
7686
7687 This is just a wrapper for ScrollPages(1).
7688 """
54f9ee45 7689 return _core_.Window_PageDown(*args, **kwargs)
e811c8ce
RD
7690
7691 def SetHelpText(*args, **kwargs):
15afbcd0 7692 """
a95a7133 7693 SetHelpText(self, String text)
15afbcd0
RD
7694
7695 Sets the help text to be used as context-sensitive help for this
7696 window. Note that the text is actually stored by the current
7697 wxHelpProvider implementation, and not in the window object itself.
7698 """
54f9ee45 7699 return _core_.Window_SetHelpText(*args, **kwargs)
e811c8ce
RD
7700
7701 def SetHelpTextForId(*args, **kwargs):
15afbcd0 7702 """
a95a7133 7703 SetHelpTextForId(self, String text)
15afbcd0
RD
7704
7705 Associate this help text with all windows with the same id as this
7706 one.
7707 """
54f9ee45 7708 return _core_.Window_SetHelpTextForId(*args, **kwargs)
e811c8ce
RD
7709
7710 def GetHelpText(*args, **kwargs):
15afbcd0 7711 """
a95a7133 7712 GetHelpText(self) -> String
15afbcd0
RD
7713
7714 Gets the help text to be used as context-sensitive help for this
7715 window. Note that the text is actually stored by the current
7716 wxHelpProvider implementation, and not in the window object itself.
7717 """
54f9ee45 7718 return _core_.Window_GetHelpText(*args, **kwargs)
e811c8ce
RD
7719
7720 def SetToolTipString(*args, **kwargs):
15afbcd0 7721 """
a95a7133 7722 SetToolTipString(self, String tip)
15afbcd0
RD
7723
7724 Attach a tooltip to the window.
7725 """
54f9ee45 7726 return _core_.Window_SetToolTipString(*args, **kwargs)
e811c8ce
RD
7727
7728 def SetToolTip(*args, **kwargs):
15afbcd0 7729 """
a95a7133 7730 SetToolTip(self, ToolTip tip)
15afbcd0
RD
7731
7732 Attach a tooltip to the window.
7733 """
54f9ee45 7734 return _core_.Window_SetToolTip(*args, **kwargs)
e811c8ce
RD
7735
7736 def GetToolTip(*args, **kwargs):
15afbcd0 7737 """
a95a7133 7738 GetToolTip(self) -> ToolTip
15afbcd0
RD
7739
7740 get the associated tooltip or None if none
7741 """
54f9ee45 7742 return _core_.Window_GetToolTip(*args, **kwargs)
e811c8ce
RD
7743
7744 def SetDropTarget(*args, **kwargs):
15afbcd0 7745 """
a95a7133 7746 SetDropTarget(self, DropTarget dropTarget)
15afbcd0
RD
7747
7748 Associates a drop target with this window. If the window already has
7749 a drop target, it is deleted.
7750 """
54f9ee45 7751 return _core_.Window_SetDropTarget(*args, **kwargs)
e811c8ce
RD
7752
7753 def GetDropTarget(*args, **kwargs):
15afbcd0 7754 """
a95a7133 7755 GetDropTarget(self) -> DropTarget
15afbcd0
RD
7756
7757 Returns the associated drop target, which may be None.
7758 """
54f9ee45 7759 return _core_.Window_GetDropTarget(*args, **kwargs)
e811c8ce
RD
7760
7761 def SetConstraints(*args, **kwargs):
15afbcd0 7762 """
a95a7133 7763 SetConstraints(self, LayoutConstraints constraints)
15afbcd0
RD
7764
7765 Sets the window to have the given layout constraints. If an existing
7766 layout constraints object is already owned by the window, it will be
7767 deleted. Pass None to disassociate and delete the window's current
7768 constraints.
7769
7770 You must call SetAutoLayout to tell a window to use the constraints
7771 automatically in its default EVT_SIZE handler; otherwise, you must
7772 handle EVT_SIZE yourself and call Layout() explicitly. When setting
7773 both a wx.LayoutConstraints and a wx.Sizer, only the sizer will have
7774 effect.
7775 """
54f9ee45 7776 return _core_.Window_SetConstraints(*args, **kwargs)
e811c8ce
RD
7777
7778 def GetConstraints(*args, **kwargs):
15afbcd0 7779 """
a95a7133 7780 GetConstraints(self) -> LayoutConstraints
15afbcd0
RD
7781
7782 Returns a pointer to the window's layout constraints, or None if there
7783 are none.
7784 """
54f9ee45 7785 return _core_.Window_GetConstraints(*args, **kwargs)
e811c8ce
RD
7786
7787 def SetAutoLayout(*args, **kwargs):
15afbcd0 7788 """
a95a7133 7789 SetAutoLayout(self, bool autoLayout)
15afbcd0
RD
7790
7791 Determines whether the Layout function will be called automatically
7792 when the window is resized. It is called implicitly by SetSizer but
7793 if you use SetConstraints you should call it manually or otherwise the
7794 window layout won't be correctly updated when its size changes.
7795 """
54f9ee45 7796 return _core_.Window_SetAutoLayout(*args, **kwargs)
e811c8ce
RD
7797
7798 def GetAutoLayout(*args, **kwargs):
15afbcd0 7799 """
a95a7133 7800 GetAutoLayout(self) -> bool
15afbcd0
RD
7801
7802 Returns the current autoLayout setting
7803 """
54f9ee45 7804 return _core_.Window_GetAutoLayout(*args, **kwargs)
e811c8ce
RD
7805
7806 def Layout(*args, **kwargs):
15afbcd0 7807 """
a95a7133 7808 Layout(self) -> bool
15afbcd0
RD
7809
7810 Invokes the constraint-based layout algorithm or the sizer-based
7811 algorithm for this window. See SetAutoLayout: when auto layout is on,
7812 this function gets called automatically by the default EVT_SIZE
7813 handler when the window is resized.
7814 """
54f9ee45 7815 return _core_.Window_Layout(*args, **kwargs)
e811c8ce
RD
7816
7817 def SetSizer(*args, **kwargs):
15afbcd0 7818 """
a95a7133 7819 SetSizer(self, Sizer sizer, bool deleteOld=True)
15afbcd0
RD
7820
7821 Sets the window to have the given layout sizer. The window will then
7822 own the object, and will take care of its deletion. If an existing
7823 layout sizer object is already owned by the window, it will be deleted
7824 if the deleteOld parameter is true. Note that this function will also
7825 call SetAutoLayout implicitly with a True parameter if the sizer is
ae8162c8 7826 non-None, and False otherwise.
15afbcd0 7827 """
54f9ee45 7828 return _core_.Window_SetSizer(*args, **kwargs)
e811c8ce
RD
7829
7830 def SetSizerAndFit(*args, **kwargs):
15afbcd0 7831 """
a95a7133 7832 SetSizerAndFit(self, Sizer sizer, bool deleteOld=True)
15afbcd0
RD
7833
7834 The same as SetSizer, except it also sets the size hints for the
7835 window based on the sizer's minimum size.
7836 """
54f9ee45 7837 return _core_.Window_SetSizerAndFit(*args, **kwargs)
e811c8ce
RD
7838
7839 def GetSizer(*args, **kwargs):
15afbcd0 7840 """
a95a7133 7841 GetSizer(self) -> Sizer
15afbcd0
RD
7842
7843 Return the sizer associated with the window by a previous call to
7844 SetSizer or None if there isn't one.
7845 """
54f9ee45 7846 return _core_.Window_GetSizer(*args, **kwargs)
e811c8ce
RD
7847
7848 def SetContainingSizer(*args, **kwargs):
15afbcd0 7849 """
a95a7133 7850 SetContainingSizer(self, Sizer sizer)
15afbcd0
RD
7851
7852 This normally does not need to be called by application code. It is
7853 called internally when a window is added to a sizer, and is used so
7854 the window can remove itself from the sizer when it is destroyed.
7855 """
54f9ee45 7856 return _core_.Window_SetContainingSizer(*args, **kwargs)
e811c8ce
RD
7857
7858 def GetContainingSizer(*args, **kwargs):
15afbcd0 7859 """
a95a7133 7860 GetContainingSizer(self) -> Sizer
15afbcd0
RD
7861
7862 Return the sizer that this window is a member of, if any, otherwise None.
7863 """
54f9ee45 7864 return _core_.Window_GetContainingSizer(*args, **kwargs)
e811c8ce 7865
a95a7133
RD
7866 def InheritAttributes(*args, **kwargs):
7867 """
7868 InheritAttributes(self)
7869
41e2b43e
RD
7870 This function is (or should be, in case of custom controls) called
7871 during window creation to intelligently set up the window visual
7872 attributes, that is the font and the foreground and background
7873 colours.
7874
7875 By 'intelligently' the following is meant: by default, all windows use
7876 their own default attributes. However if some of the parent's
7877 attributes are explicitly changed (that is, using SetFont and not
fa47d7a7 7878 SetOwnFont) and if the corresponding attribute hadn't been
41e2b43e
RD
7879 explicitly set for this window itself, then this window takes the same
7880 value as used by the parent. In addition, if the window overrides
7881 ShouldInheritColours to return false, the colours will not be changed
7882 no matter what and only the font might.
7883
34621cc5 7884 This rather complicated logic is necessary in order to accommodate the
ec9b55ca 7885 different usage scenarios. The most common one is when all default
41e2b43e
RD
7886 attributes are used and in this case, nothing should be inherited as
7887 in modern GUIs different controls use different fonts (and colours)
7888 than their siblings so they can't inherit the same value from the
7889 parent. However it was also deemed desirable to allow to simply change
7890 the attributes of all children at once by just changing the font or
7891 colour of their common parent, hence in this case we do inherit the
7892 parents attributes.
7893
a95a7133 7894 """
54f9ee45 7895 return _core_.Window_InheritAttributes(*args, **kwargs)
a95a7133
RD
7896
7897 def ShouldInheritColours(*args, **kwargs):
7898 """
7899 ShouldInheritColours(self) -> bool
7900
7901 Return true from here to allow the colours of this window to be
41e2b43e
RD
7902 changed by InheritAttributes, returning false forbids inheriting them
7903 from the parent window.
a95a7133 7904
41e2b43e
RD
7905 The base class version returns false, but this method is overridden in
7906 wxControl where it returns true.
a95a7133 7907 """
54f9ee45 7908 return _core_.Window_ShouldInheritColours(*args, **kwargs)
a95a7133 7909
e811c8ce 7910 def PostCreate(self, pre):
15afbcd0
RD
7911 """
7912 Phase 3 of the 2-phase create <wink!>
7913 Call this method after precreating the window with the 2-phase create method.
7914 """
e811c8ce
RD
7915 self.this = pre.this
7916 self.thisown = pre.thisown
7917 pre.thisown = 0
7918 if hasattr(self, '_setOORInfo'):
7919 self._setOORInfo(self)
7920 if hasattr(self, '_setCallbackInfo'):
7921 self._setCallbackInfo(self, self.__class__)
7922
7923
7924class WindowPtr(Window):
7925 def __init__(self, this):
7926 self.this = this
7927 if not hasattr(self,"thisown"): self.thisown = 0
7928 self.__class__ = Window
54f9ee45 7929_core_.Window_swigregister(WindowPtr)
e811c8ce
RD
7930
7931def PreWindow(*args, **kwargs):
15afbcd0
RD
7932 """
7933 PreWindow() -> Window
7934
7935 Precreate a Window for 2-phase creation.
7936 """
54f9ee45 7937 val = _core_.new_PreWindow(*args, **kwargs)
e811c8ce
RD
7938 val.thisown = 1
7939 return val
7940
7941def Window_NewControlId(*args, **kwargs):
15afbcd0
RD
7942 """
7943 Window_NewControlId() -> int
7944
7945 Generate a control id for the controls which were not given one.
7946 """
54f9ee45 7947 return _core_.Window_NewControlId(*args, **kwargs)
e811c8ce
RD
7948
7949def Window_NextControlId(*args, **kwargs):
15afbcd0
RD
7950 """
7951 Window_NextControlId(int winid) -> int
7952
7953 Get the id of the control following the one with the given
41e2b43e 7954 autogenerated) id
15afbcd0 7955 """
54f9ee45 7956 return _core_.Window_NextControlId(*args, **kwargs)
e811c8ce
RD
7957
7958def Window_PrevControlId(*args, **kwargs):
15afbcd0
RD
7959 """
7960 Window_PrevControlId(int winid) -> int
7961
7962 Get the id of the control preceding the one with the given
41e2b43e 7963 autogenerated) id
15afbcd0 7964 """
54f9ee45 7965 return _core_.Window_PrevControlId(*args, **kwargs)
e811c8ce
RD
7966
7967def Window_FindFocus(*args, **kwargs):
15afbcd0
RD
7968 """
7969 Window_FindFocus() -> Window
7970
7971 Returns the window or control that currently has the keyboard focus,
7972 or None.
7973 """
54f9ee45 7974 return _core_.Window_FindFocus(*args, **kwargs)
e811c8ce
RD
7975
7976def Window_GetCapture(*args, **kwargs):
15afbcd0
RD
7977 """
7978 Window_GetCapture() -> Window
7979
7980 Returns the window which currently captures the mouse or None
7981 """
54f9ee45 7982 return _core_.Window_GetCapture(*args, **kwargs)
e811c8ce 7983
74a57fcd
RD
7984def Window_GetClassDefaultAttributes(*args, **kwargs):
7985 """
7986 Window_GetClassDefaultAttributes(int variant=WINDOW_VARIANT_NORMAL) -> VisualAttributes
7987
41e2b43e
RD
7988 Get the default attributes for this class. This is useful if you want
7989 to use the same font or colour in your own control as in a standard
7990 control -- which is a much better idea than hard coding specific
db3e571a
RD
7991 colours or fonts which might look completely out of place on the
7992 user's system, especially if it uses themes.
74a57fcd
RD
7993
7994 The variant parameter is only relevant under Mac currently and is
41e2b43e 7995 ignore under other platforms. Under Mac, it will change the size of
db3e571a
RD
7996 the returned font. See `wx.Window.SetWindowVariant` for more about
7997 this.
74a57fcd 7998 """
54f9ee45 7999 return _core_.Window_GetClassDefaultAttributes(*args, **kwargs)
74a57fcd 8000
e811c8ce 8001def DLG_PNT(win, point_or_x, y=None):
15afbcd0
RD
8002 """
8003 Convenience function for converting a Point or (x,y) in
8004 dialog units to pixel units.
8005 """
e811c8ce
RD
8006 if y is None:
8007 return win.ConvertDialogPointToPixels(point_or_x)
8008 else:
fd3f2efe 8009 return win.ConvertDialogPointToPixels(wx.Point(point_or_x, y))
e811c8ce
RD
8010
8011def DLG_SZE(win, size_width, height=None):
15afbcd0
RD
8012 """
8013 Convenience function for converting a Size or (w,h) in
8014 dialog units to pixel units.
8015 """
e811c8ce
RD
8016 if height is None:
8017 return win.ConvertDialogSizeToPixels(size_width)
8018 else:
fd3f2efe 8019 return win.ConvertDialogSizeToPixels(wx.Size(size_width, height))
e811c8ce
RD
8020
8021
8022def FindWindowById(*args, **kwargs):
15afbcd0
RD
8023 """
8024 FindWindowById(long id, Window parent=None) -> Window
8025
8026 Find the first window in the application with the given id. If parent
8027 is None, the search will start from all top-level frames and dialog
8028 boxes; if non-None, the search will be limited to the given window
8029 hierarchy. The search is recursive in both cases.
8030 """
54f9ee45 8031 return _core_.FindWindowById(*args, **kwargs)
e811c8ce
RD
8032
8033def FindWindowByName(*args, **kwargs):
15afbcd0
RD
8034 """
8035 FindWindowByName(String name, Window parent=None) -> Window
8036
8037 Find a window by its name (as given in a window constructor or Create
8038 function call). If parent is None, the search will start from all
8039 top-level frames and dialog boxes; if non-None, the search will be
8040 limited to the given window hierarchy. The search is recursive in both
8041 cases.
8042
8043 If no window with such name is found, wx.FindWindowByLabel is called.
8044 """
54f9ee45 8045 return _core_.FindWindowByName(*args, **kwargs)
e811c8ce
RD
8046
8047def FindWindowByLabel(*args, **kwargs):
15afbcd0
RD
8048 """
8049 FindWindowByLabel(String label, Window parent=None) -> Window
8050
8051 Find a window by its label. Depending on the type of window, the label
8052 may be a window title or panel item label. If parent is None, the
8053 search will start from all top-level frames and dialog boxes; if
8054 non-None, the search will be limited to the given window
8055 hierarchy. The search is recursive in both cases.
8056 """
54f9ee45 8057 return _core_.FindWindowByLabel(*args, **kwargs)
e811c8ce
RD
8058
8059def Window_FromHWND(*args, **kwargs):
4276dc52 8060 """Window_FromHWND(Window parent, unsigned long _hWnd) -> Window"""
54f9ee45 8061 return _core_.Window_FromHWND(*args, **kwargs)
e811c8ce
RD
8062#---------------------------------------------------------------------------
8063
8064class Validator(EvtHandler):
093d3ff1 8065 """Proxy of C++ Validator class"""
e811c8ce
RD
8066 def __repr__(self):
8067 return "<%s.%s; proxy of C++ wxValidator instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
8068 def __init__(self, *args, **kwargs):
a95a7133 8069 """__init__(self) -> Validator"""
54f9ee45 8070 newobj = _core_.new_Validator(*args, **kwargs)
d14a1e28
RD
8071 self.this = newobj.this
8072 self.thisown = 1
8073 del newobj.thisown
8074 self._setOORInfo(self)
e811c8ce
RD
8075
8076 def Clone(*args, **kwargs):
a95a7133 8077 """Clone(self) -> Validator"""
54f9ee45 8078 return _core_.Validator_Clone(*args, **kwargs)
e811c8ce
RD
8079
8080 def Validate(*args, **kwargs):
a95a7133 8081 """Validate(self, Window parent) -> bool"""
54f9ee45 8082 return _core_.Validator_Validate(*args, **kwargs)
e811c8ce
RD
8083
8084 def TransferToWindow(*args, **kwargs):
a95a7133 8085 """TransferToWindow(self) -> bool"""
54f9ee45 8086 return _core_.Validator_TransferToWindow(*args, **kwargs)
e811c8ce
RD
8087
8088 def TransferFromWindow(*args, **kwargs):
a95a7133 8089 """TransferFromWindow(self) -> bool"""
54f9ee45 8090 return _core_.Validator_TransferFromWindow(*args, **kwargs)
e811c8ce
RD
8091
8092 def GetWindow(*args, **kwargs):
a95a7133 8093 """GetWindow(self) -> Window"""
54f9ee45 8094 return _core_.Validator_GetWindow(*args, **kwargs)
e811c8ce
RD
8095
8096 def SetWindow(*args, **kwargs):
a95a7133 8097 """SetWindow(self, Window window)"""
54f9ee45 8098 return _core_.Validator_SetWindow(*args, **kwargs)
e811c8ce
RD
8099
8100 def IsSilent(*args, **kwargs):
66c033b4 8101 """IsSilent() -> bool"""
54f9ee45 8102 return _core_.Validator_IsSilent(*args, **kwargs)
e811c8ce
RD
8103
8104 IsSilent = staticmethod(IsSilent)
8105 def SetBellOnError(*args, **kwargs):
66c033b4 8106 """SetBellOnError(int doIt=True)"""
54f9ee45 8107 return _core_.Validator_SetBellOnError(*args, **kwargs)
e811c8ce
RD
8108
8109 SetBellOnError = staticmethod(SetBellOnError)
8110
8111class ValidatorPtr(Validator):
8112 def __init__(self, this):
8113 self.this = this
8114 if not hasattr(self,"thisown"): self.thisown = 0
8115 self.__class__ = Validator
54f9ee45 8116_core_.Validator_swigregister(ValidatorPtr)
e811c8ce
RD
8117
8118def Validator_IsSilent(*args, **kwargs):
8119 """Validator_IsSilent() -> bool"""
54f9ee45 8120 return _core_.Validator_IsSilent(*args, **kwargs)
e811c8ce
RD
8121
8122def Validator_SetBellOnError(*args, **kwargs):
8123 """Validator_SetBellOnError(int doIt=True)"""
54f9ee45 8124 return _core_.Validator_SetBellOnError(*args, **kwargs)
e811c8ce
RD
8125
8126class PyValidator(Validator):
093d3ff1 8127 """Proxy of C++ PyValidator class"""
e811c8ce
RD
8128 def __repr__(self):
8129 return "<%s.%s; proxy of C++ wxPyValidator instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
8130 def __init__(self, *args, **kwargs):
a95a7133 8131 """__init__(self) -> PyValidator"""
54f9ee45 8132 newobj = _core_.new_PyValidator(*args, **kwargs)
e811c8ce
RD
8133 self.this = newobj.this
8134 self.thisown = 1
8135 del newobj.thisown
8136
8137 self._setCallbackInfo(self, PyValidator, 1)
8138 self._setOORInfo(self)
8139
8140 def _setCallbackInfo(*args, **kwargs):
a95a7133 8141 """_setCallbackInfo(self, PyObject self, PyObject _class, int incref=True)"""
54f9ee45 8142 return _core_.PyValidator__setCallbackInfo(*args, **kwargs)
e811c8ce
RD
8143
8144
8145class PyValidatorPtr(PyValidator):
8146 def __init__(self, this):
8147 self.this = this
8148 if not hasattr(self,"thisown"): self.thisown = 0
8149 self.__class__ = PyValidator
54f9ee45 8150_core_.PyValidator_swigregister(PyValidatorPtr)
e811c8ce
RD
8151
8152#---------------------------------------------------------------------------
8153
8154class Menu(EvtHandler):
093d3ff1 8155 """Proxy of C++ Menu class"""
d14a1e28
RD
8156 def __repr__(self):
8157 return "<%s.%s; proxy of C++ wxMenu instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
e811c8ce 8158 def __init__(self, *args, **kwargs):
a95a7133 8159 """__init__(self, String title=EmptyString, long style=0) -> Menu"""
54f9ee45 8160 newobj = _core_.new_Menu(*args, **kwargs)
e811c8ce
RD
8161 self.this = newobj.this
8162 self.thisown = 1
8163 del newobj.thisown
8164 self._setOORInfo(self)
8165
8166 def Append(*args, **kwargs):
a95a7133 8167 """Append(self, int id, String text, String help=EmptyString, int kind=ITEM_NORMAL) -> MenuItem"""
54f9ee45 8168 return _core_.Menu_Append(*args, **kwargs)
e811c8ce
RD
8169
8170 def AppendSeparator(*args, **kwargs):
a95a7133 8171 """AppendSeparator(self) -> MenuItem"""
54f9ee45 8172 return _core_.Menu_AppendSeparator(*args, **kwargs)
e811c8ce
RD
8173
8174 def AppendCheckItem(*args, **kwargs):
a95a7133 8175 """AppendCheckItem(self, int id, String text, String help=EmptyString) -> MenuItem"""
54f9ee45 8176 return _core_.Menu_AppendCheckItem(*args, **kwargs)
e811c8ce
RD
8177
8178 def AppendRadioItem(*args, **kwargs):
a95a7133 8179 """AppendRadioItem(self, int id, String text, String help=EmptyString) -> MenuItem"""
54f9ee45 8180 return _core_.Menu_AppendRadioItem(*args, **kwargs)
e811c8ce
RD
8181
8182 def AppendMenu(*args, **kwargs):
a95a7133 8183 """AppendMenu(self, int id, String text, Menu submenu, String help=EmptyString) -> MenuItem"""
54f9ee45 8184 return _core_.Menu_AppendMenu(*args, **kwargs)
e811c8ce
RD
8185
8186 def AppendItem(*args, **kwargs):
a95a7133 8187 """AppendItem(self, MenuItem item) -> MenuItem"""
54f9ee45 8188 return _core_.Menu_AppendItem(*args, **kwargs)
e811c8ce
RD
8189
8190 def Break(*args, **kwargs):
a95a7133 8191 """Break(self)"""
54f9ee45 8192 return _core_.Menu_Break(*args, **kwargs)
e811c8ce
RD
8193
8194 def InsertItem(*args, **kwargs):
a95a7133 8195 """InsertItem(self, size_t pos, MenuItem item) -> MenuItem"""
54f9ee45 8196 return _core_.Menu_InsertItem(*args, **kwargs)
e811c8ce
RD
8197
8198 def Insert(*args, **kwargs):
0df68c9f 8199 """
a95a7133 8200 Insert(self, size_t pos, int id, String text, String help=EmptyString,
a41e16b6 8201 int kind=ITEM_NORMAL) -> MenuItem
0df68c9f 8202 """
54f9ee45 8203 return _core_.Menu_Insert(*args, **kwargs)
e811c8ce
RD
8204
8205 def InsertSeparator(*args, **kwargs):
a95a7133 8206 """InsertSeparator(self, size_t pos) -> MenuItem"""
54f9ee45 8207 return _core_.Menu_InsertSeparator(*args, **kwargs)
e811c8ce
RD
8208
8209 def InsertCheckItem(*args, **kwargs):
a95a7133 8210 """InsertCheckItem(self, size_t pos, int id, String text, String help=EmptyString) -> MenuItem"""
54f9ee45 8211 return _core_.Menu_InsertCheckItem(*args, **kwargs)
e811c8ce
RD
8212
8213 def InsertRadioItem(*args, **kwargs):
a95a7133 8214 """InsertRadioItem(self, size_t pos, int id, String text, String help=EmptyString) -> MenuItem"""
54f9ee45 8215 return _core_.Menu_InsertRadioItem(*args, **kwargs)
e811c8ce
RD
8216
8217 def InsertMenu(*args, **kwargs):
a95a7133 8218 """InsertMenu(self, size_t pos, int id, String text, Menu submenu, String help=EmptyString) -> MenuItem"""
54f9ee45 8219 return _core_.Menu_InsertMenu(*args, **kwargs)
e811c8ce
RD
8220
8221 def PrependItem(*args, **kwargs):
a95a7133 8222 """PrependItem(self, MenuItem item) -> MenuItem"""
54f9ee45 8223 return _core_.Menu_PrependItem(*args, **kwargs)
e811c8ce
RD
8224
8225 def Prepend(*args, **kwargs):
a95a7133 8226 """Prepend(self, int id, String text, String help=EmptyString, int kind=ITEM_NORMAL) -> MenuItem"""
54f9ee45 8227 return _core_.Menu_Prepend(*args, **kwargs)
e811c8ce
RD
8228
8229 def PrependSeparator(*args, **kwargs):
a95a7133 8230 """PrependSeparator(self) -> MenuItem"""
54f9ee45 8231 return _core_.Menu_PrependSeparator(*args, **kwargs)
e811c8ce
RD
8232
8233 def PrependCheckItem(*args, **kwargs):
a95a7133 8234 """PrependCheckItem(self, int id, String text, String help=EmptyString) -> MenuItem"""
54f9ee45 8235 return _core_.Menu_PrependCheckItem(*args, **kwargs)
e811c8ce
RD
8236
8237 def PrependRadioItem(*args, **kwargs):
a95a7133 8238 """PrependRadioItem(self, int id, String text, String help=EmptyString) -> MenuItem"""
54f9ee45 8239 return _core_.Menu_PrependRadioItem(*args, **kwargs)
e811c8ce
RD
8240
8241 def PrependMenu(*args, **kwargs):
a95a7133 8242 """PrependMenu(self, int id, String text, Menu submenu, String help=EmptyString) -> MenuItem"""
54f9ee45 8243 return _core_.Menu_PrependMenu(*args, **kwargs)
e811c8ce
RD
8244
8245 def Remove(*args, **kwargs):
a95a7133 8246 """Remove(self, int id) -> MenuItem"""
54f9ee45 8247 return _core_.Menu_Remove(*args, **kwargs)
e811c8ce
RD
8248
8249 def RemoveItem(*args, **kwargs):
a95a7133 8250 """RemoveItem(self, MenuItem item) -> MenuItem"""
54f9ee45 8251 return _core_.Menu_RemoveItem(*args, **kwargs)
e811c8ce
RD
8252
8253 def Delete(*args, **kwargs):
a95a7133 8254 """Delete(self, int id) -> bool"""
54f9ee45 8255 return _core_.Menu_Delete(*args, **kwargs)
e811c8ce
RD
8256
8257 def DeleteItem(*args, **kwargs):
a95a7133 8258 """DeleteItem(self, MenuItem item) -> bool"""
54f9ee45 8259 return _core_.Menu_DeleteItem(*args, **kwargs)
e811c8ce
RD
8260
8261 def Destroy(*args, **kwargs):
0df68c9f 8262 """
a95a7133 8263 Destroy(self)
e811c8ce 8264
0df68c9f
RD
8265 Deletes the C++ object this Python object is a proxy for.
8266 """
54f9ee45 8267 return _core_.Menu_Destroy(*args, **kwargs)
e811c8ce
RD
8268
8269 def DestroyId(*args, **kwargs):
0df68c9f 8270 """
a95a7133 8271 DestroyId(self, int id) -> bool
e811c8ce 8272
0df68c9f
RD
8273 Deletes the C++ object this Python object is a proxy for.
8274 """
54f9ee45 8275 return _core_.Menu_DestroyId(*args, **kwargs)
e811c8ce
RD
8276
8277 def DestroyItem(*args, **kwargs):
0df68c9f 8278 """
a95a7133 8279 DestroyItem(self, MenuItem item) -> bool
e811c8ce 8280
0df68c9f
RD
8281 Deletes the C++ object this Python object is a proxy for.
8282 """
54f9ee45 8283 return _core_.Menu_DestroyItem(*args, **kwargs)
e811c8ce
RD
8284
8285 def GetMenuItemCount(*args, **kwargs):
a95a7133 8286 """GetMenuItemCount(self) -> size_t"""
54f9ee45 8287 return _core_.Menu_GetMenuItemCount(*args, **kwargs)
e811c8ce
RD
8288
8289 def GetMenuItems(*args, **kwargs):
a95a7133 8290 """GetMenuItems(self) -> PyObject"""
54f9ee45 8291 return _core_.Menu_GetMenuItems(*args, **kwargs)
e811c8ce
RD
8292
8293 def FindItem(*args, **kwargs):
a95a7133 8294 """FindItem(self, String item) -> int"""
54f9ee45 8295 return _core_.Menu_FindItem(*args, **kwargs)
e811c8ce
RD
8296
8297 def FindItemById(*args, **kwargs):
a95a7133 8298 """FindItemById(self, int id) -> MenuItem"""
54f9ee45 8299 return _core_.Menu_FindItemById(*args, **kwargs)
e811c8ce
RD
8300
8301 def FindItemByPosition(*args, **kwargs):
a95a7133 8302 """FindItemByPosition(self, size_t position) -> MenuItem"""
54f9ee45 8303 return _core_.Menu_FindItemByPosition(*args, **kwargs)
e811c8ce
RD
8304
8305 def Enable(*args, **kwargs):
a95a7133 8306 """Enable(self, int id, bool enable)"""
54f9ee45 8307 return _core_.Menu_Enable(*args, **kwargs)
e811c8ce
RD
8308
8309 def IsEnabled(*args, **kwargs):
a95a7133 8310 """IsEnabled(self, int id) -> bool"""
54f9ee45 8311 return _core_.Menu_IsEnabled(*args, **kwargs)
e811c8ce
RD
8312
8313 def Check(*args, **kwargs):
a95a7133 8314 """Check(self, int id, bool check)"""
54f9ee45 8315 return _core_.Menu_Check(*args, **kwargs)
e811c8ce
RD
8316
8317 def IsChecked(*args, **kwargs):
a95a7133 8318 """IsChecked(self, int id) -> bool"""
54f9ee45 8319 return _core_.Menu_IsChecked(*args, **kwargs)
e811c8ce
RD
8320
8321 def SetLabel(*args, **kwargs):
a95a7133 8322 """SetLabel(self, int id, String label)"""
54f9ee45 8323 return _core_.Menu_SetLabel(*args, **kwargs)
e811c8ce
RD
8324
8325 def GetLabel(*args, **kwargs):
a95a7133 8326 """GetLabel(self, int id) -> String"""
54f9ee45 8327 return _core_.Menu_GetLabel(*args, **kwargs)
e811c8ce
RD
8328
8329 def SetHelpString(*args, **kwargs):
a95a7133 8330 """SetHelpString(self, int id, String helpString)"""
54f9ee45 8331 return _core_.Menu_SetHelpString(*args, **kwargs)
e811c8ce
RD
8332
8333 def GetHelpString(*args, **kwargs):
a95a7133 8334 """GetHelpString(self, int id) -> String"""
54f9ee45 8335 return _core_.Menu_GetHelpString(*args, **kwargs)
e811c8ce
RD
8336
8337 def SetTitle(*args, **kwargs):
a95a7133 8338 """SetTitle(self, String title)"""
54f9ee45 8339 return _core_.Menu_SetTitle(*args, **kwargs)
e811c8ce
RD
8340
8341 def GetTitle(*args, **kwargs):
a95a7133 8342 """GetTitle(self) -> String"""
54f9ee45 8343 return _core_.Menu_GetTitle(*args, **kwargs)
e811c8ce
RD
8344
8345 def SetEventHandler(*args, **kwargs):
a95a7133 8346 """SetEventHandler(self, EvtHandler handler)"""
54f9ee45 8347 return _core_.Menu_SetEventHandler(*args, **kwargs)
e811c8ce
RD
8348
8349 def GetEventHandler(*args, **kwargs):
a95a7133 8350 """GetEventHandler(self) -> EvtHandler"""
54f9ee45 8351 return _core_.Menu_GetEventHandler(*args, **kwargs)
e811c8ce
RD
8352
8353 def SetInvokingWindow(*args, **kwargs):
a95a7133 8354 """SetInvokingWindow(self, Window win)"""
54f9ee45 8355 return _core_.Menu_SetInvokingWindow(*args, **kwargs)
e811c8ce
RD
8356
8357 def GetInvokingWindow(*args, **kwargs):
a95a7133 8358 """GetInvokingWindow(self) -> Window"""
54f9ee45 8359 return _core_.Menu_GetInvokingWindow(*args, **kwargs)
e811c8ce
RD
8360
8361 def GetStyle(*args, **kwargs):
a95a7133 8362 """GetStyle(self) -> long"""
54f9ee45 8363 return _core_.Menu_GetStyle(*args, **kwargs)
e811c8ce
RD
8364
8365 def UpdateUI(*args, **kwargs):
a95a7133 8366 """UpdateUI(self, EvtHandler source=None)"""
54f9ee45 8367 return _core_.Menu_UpdateUI(*args, **kwargs)
e811c8ce
RD
8368
8369 def GetMenuBar(*args, **kwargs):
a95a7133 8370 """GetMenuBar(self) -> MenuBar"""
54f9ee45 8371 return _core_.Menu_GetMenuBar(*args, **kwargs)
e811c8ce
RD
8372
8373 def Attach(*args, **kwargs):
a95a7133 8374 """Attach(self, wxMenuBarBase menubar)"""
54f9ee45 8375 return _core_.Menu_Attach(*args, **kwargs)
e811c8ce
RD
8376
8377 def Detach(*args, **kwargs):
a95a7133 8378 """Detach(self)"""
54f9ee45 8379 return _core_.Menu_Detach(*args, **kwargs)
e811c8ce
RD
8380
8381 def IsAttached(*args, **kwargs):
a95a7133 8382 """IsAttached(self) -> bool"""
54f9ee45 8383 return _core_.Menu_IsAttached(*args, **kwargs)
e811c8ce
RD
8384
8385 def SetParent(*args, **kwargs):
a95a7133 8386 """SetParent(self, Menu parent)"""
54f9ee45 8387 return _core_.Menu_SetParent(*args, **kwargs)
e811c8ce
RD
8388
8389 def GetParent(*args, **kwargs):
a95a7133 8390 """GetParent(self) -> Menu"""
54f9ee45 8391 return _core_.Menu_GetParent(*args, **kwargs)
e811c8ce 8392
d14a1e28
RD
8393
8394class MenuPtr(Menu):
8395 def __init__(self, this):
8396 self.this = this
8397 if not hasattr(self,"thisown"): self.thisown = 0
8398 self.__class__ = Menu
54f9ee45 8399_core_.Menu_swigregister(MenuPtr)
d14a1e28
RD
8400DefaultValidator = cvar.DefaultValidator
8401
8402#---------------------------------------------------------------------------
8403
8404class MenuBar(Window):
093d3ff1 8405 """Proxy of C++ MenuBar class"""
e811c8ce
RD
8406 def __repr__(self):
8407 return "<%s.%s; proxy of C++ wxMenuBar instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 8408 def __init__(self, *args, **kwargs):
a95a7133 8409 """__init__(self, long style=0) -> MenuBar"""
54f9ee45 8410 newobj = _core_.new_MenuBar(*args, **kwargs)
d14a1e28
RD
8411 self.this = newobj.this
8412 self.thisown = 1
8413 del newobj.thisown
8414 self._setOORInfo(self)
e811c8ce
RD
8415
8416 def Append(*args, **kwargs):
a95a7133 8417 """Append(self, Menu menu, String title) -> bool"""
54f9ee45 8418 return _core_.MenuBar_Append(*args, **kwargs)
e811c8ce
RD
8419
8420 def Insert(*args, **kwargs):
a95a7133 8421 """Insert(self, size_t pos, Menu menu, String title) -> bool"""
54f9ee45 8422 return _core_.MenuBar_Insert(*args, **kwargs)
e811c8ce
RD
8423
8424 def GetMenuCount(*args, **kwargs):
a95a7133 8425 """GetMenuCount(self) -> size_t"""
54f9ee45 8426 return _core_.MenuBar_GetMenuCount(*args, **kwargs)
e811c8ce
RD
8427
8428 def GetMenu(*args, **kwargs):
a95a7133 8429 """GetMenu(self, size_t pos) -> Menu"""
54f9ee45 8430 return _core_.MenuBar_GetMenu(*args, **kwargs)
e811c8ce
RD
8431
8432 def Replace(*args, **kwargs):
a95a7133 8433 """Replace(self, size_t pos, Menu menu, String title) -> Menu"""
54f9ee45 8434 return _core_.MenuBar_Replace(*args, **kwargs)
e811c8ce
RD
8435
8436 def Remove(*args, **kwargs):
a95a7133 8437 """Remove(self, size_t pos) -> Menu"""
54f9ee45 8438 return _core_.MenuBar_Remove(*args, **kwargs)
e811c8ce
RD
8439
8440 def EnableTop(*args, **kwargs):
a95a7133 8441 """EnableTop(self, size_t pos, bool enable)"""
54f9ee45 8442 return _core_.MenuBar_EnableTop(*args, **kwargs)
e811c8ce
RD
8443
8444 def IsEnabledTop(*args, **kwargs):
a95a7133 8445 """IsEnabledTop(self, size_t pos) -> bool"""
54f9ee45 8446 return _core_.MenuBar_IsEnabledTop(*args, **kwargs)
e811c8ce
RD
8447
8448 def SetLabelTop(*args, **kwargs):
a95a7133 8449 """SetLabelTop(self, size_t pos, String label)"""
54f9ee45 8450 return _core_.MenuBar_SetLabelTop(*args, **kwargs)
e811c8ce
RD
8451
8452 def GetLabelTop(*args, **kwargs):
a95a7133 8453 """GetLabelTop(self, size_t pos) -> String"""
54f9ee45 8454 return _core_.MenuBar_GetLabelTop(*args, **kwargs)
e811c8ce
RD
8455
8456 def FindMenuItem(*args, **kwargs):
a95a7133 8457 """FindMenuItem(self, String menu, String item) -> int"""
54f9ee45 8458 return _core_.MenuBar_FindMenuItem(*args, **kwargs)
e811c8ce
RD
8459
8460 def FindItemById(*args, **kwargs):
a95a7133 8461 """FindItemById(self, int id) -> MenuItem"""
54f9ee45 8462 return _core_.MenuBar_FindItemById(*args, **kwargs)
e811c8ce
RD
8463
8464 def FindMenu(*args, **kwargs):
a95a7133 8465 """FindMenu(self, String title) -> int"""
54f9ee45 8466 return _core_.MenuBar_FindMenu(*args, **kwargs)
e811c8ce
RD
8467
8468 def Enable(*args, **kwargs):
a95a7133 8469 """Enable(self, int id, bool enable)"""
54f9ee45 8470 return _core_.MenuBar_Enable(*args, **kwargs)
e811c8ce
RD
8471
8472 def Check(*args, **kwargs):
a95a7133 8473 """Check(self, int id, bool check)"""
54f9ee45 8474 return _core_.MenuBar_Check(*args, **kwargs)
e811c8ce
RD
8475
8476 def IsChecked(*args, **kwargs):
a95a7133 8477 """IsChecked(self, int id) -> bool"""
54f9ee45 8478 return _core_.MenuBar_IsChecked(*args, **kwargs)
e811c8ce
RD
8479
8480 def IsEnabled(*args, **kwargs):
a95a7133 8481 """IsEnabled(self, int id) -> bool"""
54f9ee45 8482 return _core_.MenuBar_IsEnabled(*args, **kwargs)
e811c8ce
RD
8483
8484 def SetLabel(*args, **kwargs):
a95a7133 8485 """SetLabel(self, int id, String label)"""
54f9ee45 8486 return _core_.MenuBar_SetLabel(*args, **kwargs)
e811c8ce
RD
8487
8488 def GetLabel(*args, **kwargs):
a95a7133 8489 """GetLabel(self, int id) -> String"""
54f9ee45 8490 return _core_.MenuBar_GetLabel(*args, **kwargs)
e811c8ce
RD
8491
8492 def SetHelpString(*args, **kwargs):
a95a7133 8493 """SetHelpString(self, int id, String helpString)"""
54f9ee45 8494 return _core_.MenuBar_SetHelpString(*args, **kwargs)
e811c8ce
RD
8495
8496 def GetHelpString(*args, **kwargs):
a95a7133 8497 """GetHelpString(self, int id) -> String"""
54f9ee45 8498 return _core_.MenuBar_GetHelpString(*args, **kwargs)
e811c8ce
RD
8499
8500 def GetFrame(*args, **kwargs):
a95a7133 8501 """GetFrame(self) -> wxFrame"""
54f9ee45 8502 return _core_.MenuBar_GetFrame(*args, **kwargs)
e811c8ce
RD
8503
8504 def IsAttached(*args, **kwargs):
a95a7133 8505 """IsAttached(self) -> bool"""
54f9ee45 8506 return _core_.MenuBar_IsAttached(*args, **kwargs)
e811c8ce
RD
8507
8508 def Attach(*args, **kwargs):
a95a7133 8509 """Attach(self, wxFrame frame)"""
54f9ee45 8510 return _core_.MenuBar_Attach(*args, **kwargs)
e811c8ce
RD
8511
8512 def Detach(*args, **kwargs):
a95a7133 8513 """Detach(self)"""
54f9ee45 8514 return _core_.MenuBar_Detach(*args, **kwargs)
e811c8ce 8515
d14a1e28
RD
8516
8517class MenuBarPtr(MenuBar):
8518 def __init__(self, this):
8519 self.this = this
8520 if not hasattr(self,"thisown"): self.thisown = 0
8521 self.__class__ = MenuBar
54f9ee45 8522_core_.MenuBar_swigregister(MenuBarPtr)
d14a1e28
RD
8523
8524#---------------------------------------------------------------------------
8525
8526class MenuItem(Object):
093d3ff1 8527 """Proxy of C++ MenuItem class"""
e811c8ce
RD
8528 def __repr__(self):
8529 return "<%s.%s; proxy of C++ wxMenuItem instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 8530 def __init__(self, *args, **kwargs):
0df68c9f 8531 """
a95a7133 8532 __init__(self, Menu parentMenu=None, int id=ID_ANY, String text=EmptyString,
196addbf
RD
8533 String help=EmptyString, int kind=ITEM_NORMAL,
8534 Menu subMenu=None) -> MenuItem
0df68c9f 8535 """
54f9ee45 8536 newobj = _core_.new_MenuItem(*args, **kwargs)
d14a1e28
RD
8537 self.this = newobj.this
8538 self.thisown = 1
8539 del newobj.thisown
e811c8ce 8540 def GetMenu(*args, **kwargs):
a95a7133 8541 """GetMenu(self) -> Menu"""
54f9ee45 8542 return _core_.MenuItem_GetMenu(*args, **kwargs)
e811c8ce
RD
8543
8544 def SetMenu(*args, **kwargs):
a95a7133 8545 """SetMenu(self, Menu menu)"""
54f9ee45 8546 return _core_.MenuItem_SetMenu(*args, **kwargs)
e811c8ce
RD
8547
8548 def SetId(*args, **kwargs):
a95a7133 8549 """SetId(self, int id)"""
54f9ee45 8550 return _core_.MenuItem_SetId(*args, **kwargs)
e811c8ce
RD
8551
8552 def GetId(*args, **kwargs):
a95a7133 8553 """GetId(self) -> int"""
54f9ee45 8554 return _core_.MenuItem_GetId(*args, **kwargs)
e811c8ce
RD
8555
8556 def IsSeparator(*args, **kwargs):
a95a7133 8557 """IsSeparator(self) -> bool"""
54f9ee45 8558 return _core_.MenuItem_IsSeparator(*args, **kwargs)
e811c8ce
RD
8559
8560 def SetText(*args, **kwargs):
a95a7133 8561 """SetText(self, String str)"""
54f9ee45 8562 return _core_.MenuItem_SetText(*args, **kwargs)
e811c8ce
RD
8563
8564 def GetLabel(*args, **kwargs):
a95a7133 8565 """GetLabel(self) -> String"""
54f9ee45 8566 return _core_.MenuItem_GetLabel(*args, **kwargs)
e811c8ce
RD
8567
8568 def GetText(*args, **kwargs):
a95a7133 8569 """GetText(self) -> String"""
54f9ee45 8570 return _core_.MenuItem_GetText(*args, **kwargs)
e811c8ce
RD
8571
8572 def GetLabelFromText(*args, **kwargs):
66c033b4 8573 """GetLabelFromText(String text) -> String"""
54f9ee45 8574 return _core_.MenuItem_GetLabelFromText(*args, **kwargs)
e811c8ce
RD
8575
8576 GetLabelFromText = staticmethod(GetLabelFromText)
8577 def GetKind(*args, **kwargs):
a95a7133 8578 """GetKind(self) -> int"""
54f9ee45 8579 return _core_.MenuItem_GetKind(*args, **kwargs)
e811c8ce 8580
a95a7133
RD
8581 def SetKind(*args, **kwargs):
8582 """SetKind(self, int kind)"""
54f9ee45 8583 return _core_.MenuItem_SetKind(*args, **kwargs)
a95a7133 8584
e811c8ce 8585 def SetCheckable(*args, **kwargs):
a95a7133 8586 """SetCheckable(self, bool checkable)"""
54f9ee45 8587 return _core_.MenuItem_SetCheckable(*args, **kwargs)
e811c8ce
RD
8588
8589 def IsCheckable(*args, **kwargs):
a95a7133 8590 """IsCheckable(self) -> bool"""
54f9ee45 8591 return _core_.MenuItem_IsCheckable(*args, **kwargs)
e811c8ce
RD
8592
8593 def IsSubMenu(*args, **kwargs):
a95a7133 8594 """IsSubMenu(self) -> bool"""
54f9ee45 8595 return _core_.MenuItem_IsSubMenu(*args, **kwargs)
e811c8ce
RD
8596
8597 def SetSubMenu(*args, **kwargs):
a95a7133 8598 """SetSubMenu(self, Menu menu)"""
54f9ee45 8599 return _core_.MenuItem_SetSubMenu(*args, **kwargs)
e811c8ce
RD
8600
8601 def GetSubMenu(*args, **kwargs):
a95a7133 8602 """GetSubMenu(self) -> Menu"""
54f9ee45 8603 return _core_.MenuItem_GetSubMenu(*args, **kwargs)
e811c8ce
RD
8604
8605 def Enable(*args, **kwargs):
a95a7133 8606 """Enable(self, bool enable=True)"""
54f9ee45 8607 return _core_.MenuItem_Enable(*args, **kwargs)
e811c8ce
RD
8608
8609 def IsEnabled(*args, **kwargs):
a95a7133 8610 """IsEnabled(self) -> bool"""
54f9ee45 8611 return _core_.MenuItem_IsEnabled(*args, **kwargs)
e811c8ce
RD
8612
8613 def Check(*args, **kwargs):
a95a7133 8614 """Check(self, bool check=True)"""
54f9ee45 8615 return _core_.MenuItem_Check(*args, **kwargs)
e811c8ce
RD
8616
8617 def IsChecked(*args, **kwargs):
a95a7133 8618 """IsChecked(self) -> bool"""
54f9ee45 8619 return _core_.MenuItem_IsChecked(*args, **kwargs)
e811c8ce
RD
8620
8621 def Toggle(*args, **kwargs):
a95a7133 8622 """Toggle(self)"""
54f9ee45 8623 return _core_.MenuItem_Toggle(*args, **kwargs)
e811c8ce
RD
8624
8625 def SetHelp(*args, **kwargs):
a95a7133 8626 """SetHelp(self, String str)"""
54f9ee45 8627 return _core_.MenuItem_SetHelp(*args, **kwargs)
e811c8ce
RD
8628
8629 def GetHelp(*args, **kwargs):
a95a7133 8630 """GetHelp(self) -> String"""
54f9ee45 8631 return _core_.MenuItem_GetHelp(*args, **kwargs)
e811c8ce
RD
8632
8633 def GetAccel(*args, **kwargs):
a95a7133 8634 """GetAccel(self) -> AcceleratorEntry"""
54f9ee45 8635 return _core_.MenuItem_GetAccel(*args, **kwargs)
e811c8ce
RD
8636
8637 def SetAccel(*args, **kwargs):
a95a7133 8638 """SetAccel(self, AcceleratorEntry accel)"""
54f9ee45 8639 return _core_.MenuItem_SetAccel(*args, **kwargs)
e811c8ce
RD
8640
8641 def GetDefaultMarginWidth(*args, **kwargs):
66c033b4 8642 """GetDefaultMarginWidth() -> int"""
54f9ee45 8643 return _core_.MenuItem_GetDefaultMarginWidth(*args, **kwargs)
e811c8ce
RD
8644
8645 GetDefaultMarginWidth = staticmethod(GetDefaultMarginWidth)
8646 def SetBitmap(*args, **kwargs):
a95a7133 8647 """SetBitmap(self, Bitmap bitmap)"""
54f9ee45 8648 return _core_.MenuItem_SetBitmap(*args, **kwargs)
e811c8ce
RD
8649
8650 def GetBitmap(*args, **kwargs):
a95a7133 8651 """GetBitmap(self) -> Bitmap"""
54f9ee45 8652 return _core_.MenuItem_GetBitmap(*args, **kwargs)
e811c8ce 8653
d14a1e28
RD
8654
8655class MenuItemPtr(MenuItem):
8656 def __init__(self, this):
8657 self.this = this
8658 if not hasattr(self,"thisown"): self.thisown = 0
8659 self.__class__ = MenuItem
54f9ee45 8660_core_.MenuItem_swigregister(MenuItemPtr)
d14a1e28 8661
e811c8ce 8662def MenuItem_GetLabelFromText(*args, **kwargs):
196addbf 8663 """MenuItem_GetLabelFromText(String text) -> String"""
54f9ee45 8664 return _core_.MenuItem_GetLabelFromText(*args, **kwargs)
d14a1e28 8665
e811c8ce
RD
8666def MenuItem_GetDefaultMarginWidth(*args, **kwargs):
8667 """MenuItem_GetDefaultMarginWidth() -> int"""
54f9ee45 8668 return _core_.MenuItem_GetDefaultMarginWidth(*args, **kwargs)
d14a1e28
RD
8669
8670#---------------------------------------------------------------------------
8671
8672class Control(Window):
15afbcd0
RD
8673 """
8674 This is the base class for a control or 'widget'.
8675
41e2b43e
RD
8676 A control is generally a small window which processes user input
8677 and/or displays one or more item of data.
15afbcd0 8678 """
e811c8ce
RD
8679 def __repr__(self):
8680 return "<%s.%s; proxy of C++ wxControl instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 8681 def __init__(self, *args, **kwargs):
0df68c9f 8682 """
248ed943
RD
8683 __init__(self, Window parent, int id=-1, Point pos=DefaultPosition,
8684 Size size=DefaultSize, long style=0, Validator validator=DefaultValidator,
b2dc1044 8685 String name=ControlNameStr) -> Control
15afbcd0 8686
41e2b43e
RD
8687 Create a Control. Normally you should only call this from a subclass'
8688 __init__ as a plain old wx.Control is not very useful.
0df68c9f 8689 """
54f9ee45 8690 newobj = _core_.new_Control(*args, **kwargs)
d14a1e28
RD
8691 self.this = newobj.this
8692 self.thisown = 1
8693 del newobj.thisown
8694 self._setOORInfo(self)
e811c8ce
RD
8695
8696 def Create(*args, **kwargs):
0df68c9f 8697 """
248ed943
RD
8698 Create(self, Window parent, int id=-1, Point pos=DefaultPosition,
8699 Size size=DefaultSize, long style=0, Validator validator=DefaultValidator,
b2dc1044 8700 String name=ControlNameStr) -> bool
15afbcd0
RD
8701
8702 Do the 2nd phase and create the GUI control.
0df68c9f 8703 """
54f9ee45 8704 return _core_.Control_Create(*args, **kwargs)
e811c8ce
RD
8705
8706 def Command(*args, **kwargs):
15afbcd0 8707 """
a95a7133 8708 Command(self, CommandEvent event)
15afbcd0 8709
41e2b43e
RD
8710 Simulates the effect of the user issuing a command to the item.
8711
8712 :see: `wx.CommandEvent`
8713
15afbcd0 8714 """
54f9ee45 8715 return _core_.Control_Command(*args, **kwargs)
e811c8ce
RD
8716
8717 def GetLabel(*args, **kwargs):
15afbcd0 8718 """
a95a7133 8719 GetLabel(self) -> String
15afbcd0
RD
8720
8721 Return a control's text.
8722 """
54f9ee45 8723 return _core_.Control_GetLabel(*args, **kwargs)
e811c8ce
RD
8724
8725 def SetLabel(*args, **kwargs):
15afbcd0 8726 """
a95a7133 8727 SetLabel(self, String label)
15afbcd0
RD
8728
8729 Sets the item's text.
8730 """
54f9ee45 8731 return _core_.Control_SetLabel(*args, **kwargs)
e811c8ce 8732
74a57fcd 8733 def GetClassDefaultAttributes(*args, **kwargs):
110da5b0
RD
8734 """
8735 GetClassDefaultAttributes(int variant=WINDOW_VARIANT_NORMAL) -> VisualAttributes
8736
8737 Get the default attributes for this class. This is useful if you want
8738 to use the same font or colour in your own control as in a standard
8739 control -- which is a much better idea than hard coding specific
8740 colours or fonts which might look completely out of place on the
8741 user's system, especially if it uses themes.
8742
8743 The variant parameter is only relevant under Mac currently and is
8744 ignore under other platforms. Under Mac, it will change the size of
8745 the returned font. See `wx.Window.SetWindowVariant` for more about
8746 this.
8747 """
54f9ee45 8748 return _core_.Control_GetClassDefaultAttributes(*args, **kwargs)
74a57fcd
RD
8749
8750 GetClassDefaultAttributes = staticmethod(GetClassDefaultAttributes)
d14a1e28
RD
8751
8752class ControlPtr(Control):
8753 def __init__(self, this):
8754 self.this = this
8755 if not hasattr(self,"thisown"): self.thisown = 0
8756 self.__class__ = Control
54f9ee45 8757_core_.Control_swigregister(ControlPtr)
b2dc1044 8758ControlNameStr = cvar.ControlNameStr
d14a1e28
RD
8759
8760def PreControl(*args, **kwargs):
15afbcd0
RD
8761 """
8762 PreControl() -> Control
8763
8764 Precreate a Control control for 2-phase creation
8765 """
54f9ee45 8766 val = _core_.new_PreControl(*args, **kwargs)
d14a1e28
RD
8767 val.thisown = 1
8768 return val
8769
74a57fcd 8770def Control_GetClassDefaultAttributes(*args, **kwargs):
110da5b0
RD
8771 """
8772 Control_GetClassDefaultAttributes(int variant=WINDOW_VARIANT_NORMAL) -> VisualAttributes
8773
8774 Get the default attributes for this class. This is useful if you want
8775 to use the same font or colour in your own control as in a standard
8776 control -- which is a much better idea than hard coding specific
8777 colours or fonts which might look completely out of place on the
8778 user's system, especially if it uses themes.
8779
8780 The variant parameter is only relevant under Mac currently and is
8781 ignore under other platforms. Under Mac, it will change the size of
8782 the returned font. See `wx.Window.SetWindowVariant` for more about
8783 this.
8784 """
54f9ee45 8785 return _core_.Control_GetClassDefaultAttributes(*args, **kwargs)
74a57fcd 8786
d14a1e28
RD
8787#---------------------------------------------------------------------------
8788
8789class ItemContainer(object):
15afbcd0
RD
8790 """
8791 wx.ItemContainer defines an interface which is implemented by all
41e2b43e
RD
8792 controls which have string subitems, each of which may be selected,
8793 such as `wx.ListBox`, `wx.CheckListBox`, `wx.Choice` as well as
8794 `wx.ComboBox` which implements an extended interface deriving from
8795 this one.
15afbcd0 8796
41e2b43e
RD
8797 It defines the methods for accessing the control's items and although
8798 each of the derived classes implements them differently, they still
8799 all conform to the same interface.
15afbcd0 8800
41e2b43e
RD
8801 The items in a wx.ItemContainer have (non empty) string labels and,
8802 optionally, client data associated with them.
15afbcd0
RD
8803
8804 """
d14a1e28
RD
8805 def __init__(self): raise RuntimeError, "No constructor defined"
8806 def __repr__(self):
8807 return "<%s.%s; proxy of C++ wxItemContainer instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
e811c8ce 8808 def Append(*args, **kwargs):
15afbcd0 8809 """
a95a7133 8810 Append(self, String item, PyObject clientData=None) -> int
15afbcd0 8811
41e2b43e
RD
8812 Adds the item to the control, associating the given data with the item
8813 if not None. The return value is the index of the newly added item
8814 which may be different from the last one if the control is sorted (e.g.
8815 has wx.LB_SORT or wx.CB_SORT style).
15afbcd0 8816 """
54f9ee45 8817 return _core_.ItemContainer_Append(*args, **kwargs)
e811c8ce
RD
8818
8819 def AppendItems(*args, **kwargs):
15afbcd0 8820 """
f5b96ee1 8821 AppendItems(self, List strings)
15afbcd0 8822
41e2b43e
RD
8823 Apend several items at once to the control. Notice that calling this
8824 method may be much faster than appending the items one by one if you
8825 need to add a lot of items.
15afbcd0 8826 """
54f9ee45 8827 return _core_.ItemContainer_AppendItems(*args, **kwargs)
e811c8ce
RD
8828
8829 def Insert(*args, **kwargs):
15afbcd0 8830 """
a95a7133 8831 Insert(self, String item, int pos, PyObject clientData=None) -> int
15afbcd0 8832
41e2b43e 8833 Insert an item into the control before the item at the ``pos`` index,
15afbcd0
RD
8834 optionally associating some data object with the item.
8835 """
54f9ee45 8836 return _core_.ItemContainer_Insert(*args, **kwargs)
e811c8ce
RD
8837
8838 def Clear(*args, **kwargs):
15afbcd0 8839 """
a95a7133 8840 Clear(self)
15afbcd0
RD
8841
8842 Removes all items from the control.
8843 """
54f9ee45 8844 return _core_.ItemContainer_Clear(*args, **kwargs)
e811c8ce
RD
8845
8846 def Delete(*args, **kwargs):
15afbcd0 8847 """
a95a7133 8848 Delete(self, int n)
15afbcd0 8849
41e2b43e
RD
8850 Deletes the item at the zero-based index 'n' from the control. Note
8851 that it is an error (signalled by a `wx.PyAssertionError` exception if
8852 enabled) to remove an item with the index negative or greater or equal
8853 than the number of items in the control.
15afbcd0 8854 """
54f9ee45 8855 return _core_.ItemContainer_Delete(*args, **kwargs)
e811c8ce
RD
8856
8857 def GetCount(*args, **kwargs):
15afbcd0 8858 """
a95a7133 8859 GetCount(self) -> int
15afbcd0
RD
8860
8861 Returns the number of items in the control.
8862 """
54f9ee45 8863 return _core_.ItemContainer_GetCount(*args, **kwargs)
e811c8ce
RD
8864
8865 def IsEmpty(*args, **kwargs):
15afbcd0 8866 """
a95a7133 8867 IsEmpty(self) -> bool
15afbcd0
RD
8868
8869 Returns True if the control is empty or False if it has some items.
8870 """
54f9ee45 8871 return _core_.ItemContainer_IsEmpty(*args, **kwargs)
e811c8ce
RD
8872
8873 def GetString(*args, **kwargs):
15afbcd0 8874 """
a95a7133 8875 GetString(self, int n) -> String
15afbcd0
RD
8876
8877 Returns the label of the item with the given index.
8878 """
54f9ee45 8879 return _core_.ItemContainer_GetString(*args, **kwargs)
e811c8ce
RD
8880
8881 def GetStrings(*args, **kwargs):
a95a7133 8882 """GetStrings(self) -> wxArrayString"""
54f9ee45 8883 return _core_.ItemContainer_GetStrings(*args, **kwargs)
e811c8ce
RD
8884
8885 def SetString(*args, **kwargs):
15afbcd0 8886 """
a95a7133 8887 SetString(self, int n, String s)
15afbcd0
RD
8888
8889 Sets the label for the given item.
8890 """
54f9ee45 8891 return _core_.ItemContainer_SetString(*args, **kwargs)
e811c8ce
RD
8892
8893 def FindString(*args, **kwargs):
15afbcd0 8894 """
a95a7133 8895 FindString(self, String s) -> int
15afbcd0
RD
8896
8897 Finds an item whose label matches the given string. Returns the
41e2b43e
RD
8898 zero-based position of the item, or ``wx.NOT_FOUND`` if the string was not
8899 found.
15afbcd0 8900 """
54f9ee45 8901 return _core_.ItemContainer_FindString(*args, **kwargs)
e811c8ce
RD
8902
8903 def Select(*args, **kwargs):
15afbcd0 8904 """
a95a7133 8905 Select(self, int n)
15afbcd0
RD
8906
8907 Sets the item at index 'n' to be the selected item.
8908 """
54f9ee45 8909 return _core_.ItemContainer_Select(*args, **kwargs)
e811c8ce 8910
15afbcd0 8911 SetSelection = Select
e811c8ce 8912 def GetSelection(*args, **kwargs):
15afbcd0 8913 """
a95a7133 8914 GetSelection(self) -> int
15afbcd0 8915
41e2b43e
RD
8916 Returns the index of the selected item or ``wx.NOT_FOUND`` if no item
8917 is selected.
15afbcd0 8918 """
54f9ee45 8919 return _core_.ItemContainer_GetSelection(*args, **kwargs)
e811c8ce
RD
8920
8921 def GetStringSelection(*args, **kwargs):
15afbcd0 8922 """
a95a7133 8923 GetStringSelection(self) -> String
15afbcd0 8924
41e2b43e
RD
8925 Returns the label of the selected item or an empty string if no item
8926 is selected.
15afbcd0 8927 """
54f9ee45 8928 return _core_.ItemContainer_GetStringSelection(*args, **kwargs)
e811c8ce
RD
8929
8930 def GetClientData(*args, **kwargs):
15afbcd0 8931 """
a95a7133 8932 GetClientData(self, int n) -> PyObject
15afbcd0
RD
8933
8934 Returns the client data associated with the given item, (if any.)
8935 """
54f9ee45 8936 return _core_.ItemContainer_GetClientData(*args, **kwargs)
e811c8ce
RD
8937
8938 def SetClientData(*args, **kwargs):
15afbcd0 8939 """
a95a7133 8940 SetClientData(self, int n, PyObject clientData)
15afbcd0
RD
8941
8942 Associate the given client data with the item at position n.
8943 """
54f9ee45 8944 return _core_.ItemContainer_SetClientData(*args, **kwargs)
e811c8ce 8945
d14a1e28
RD
8946
8947class ItemContainerPtr(ItemContainer):
8948 def __init__(self, this):
8949 self.this = this
8950 if not hasattr(self,"thisown"): self.thisown = 0
8951 self.__class__ = ItemContainer
54f9ee45 8952_core_.ItemContainer_swigregister(ItemContainerPtr)
d14a1e28
RD
8953
8954#---------------------------------------------------------------------------
8955
8956class ControlWithItems(Control,ItemContainer):
15afbcd0 8957 """
41e2b43e
RD
8958 wx.ControlWithItems combines the ``wx.ItemContainer`` class with the
8959 wx.Control class, and is used for the base class of various controls
8960 that have items.
15afbcd0 8961 """
d14a1e28
RD
8962 def __init__(self): raise RuntimeError, "No constructor defined"
8963 def __repr__(self):
8964 return "<%s.%s; proxy of C++ wxControlWithItems instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
8965
8966class ControlWithItemsPtr(ControlWithItems):
8967 def __init__(self, this):
8968 self.this = this
8969 if not hasattr(self,"thisown"): self.thisown = 0
8970 self.__class__ = ControlWithItems
54f9ee45 8971_core_.ControlWithItems_swigregister(ControlWithItemsPtr)
d14a1e28
RD
8972
8973#---------------------------------------------------------------------------
8974
8975class SizerItem(Object):
248ed943
RD
8976 """
8977 The wx.SizerItem class is used to track the position, size and other
8978 attributes of each item managed by a `wx.Sizer`. In normal usage user
8979 code should never need to deal directly with a wx.SizerItem, but
8980 custom classes derived from `wx.PySizer` will probably need to use the
8981 collection of wx.SizerItems held by wx.Sizer when calculating layout.
8982
8983 :see: `wx.Sizer`, `wx.GBSizerItem`
8984 """
e811c8ce
RD
8985 def __repr__(self):
8986 return "<%s.%s; proxy of C++ wxSizerItem instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 8987 def __init__(self, *args, **kwargs):
248ed943
RD
8988 """
8989 __init__(self) -> SizerItem
8990
8991 Constructs an empty wx.SizerItem. Either a window, sizer or spacer
8992 size will need to be set before this item can be used in a Sizer.
8993
8994 You will probably never need to create a wx.SizerItem directly as they
8995 are created automatically when the sizer's Add, Insert or Prepend
8996 methods are called.
8997
8998 :see: `wx.SizerItemSpacer`, `wx.SizerItemWindow`, `wx.SizerItemSizer`
8999 """
54f9ee45 9000 newobj = _core_.new_SizerItem(*args, **kwargs)
d14a1e28
RD
9001 self.this = newobj.this
9002 self.thisown = 1
9003 del newobj.thisown
e811c8ce 9004 def DeleteWindows(*args, **kwargs):
248ed943
RD
9005 """
9006 DeleteWindows(self)
9007
9008 Destroy the window or the windows in a subsizer, depending on the type
9009 of item.
9010 """
54f9ee45 9011 return _core_.SizerItem_DeleteWindows(*args, **kwargs)
e811c8ce
RD
9012
9013 def DetachSizer(*args, **kwargs):
248ed943
RD
9014 """
9015 DetachSizer(self)
9016
9017 Enable deleting the SizerItem without destroying the contained sizer.
9018 """
54f9ee45 9019 return _core_.SizerItem_DetachSizer(*args, **kwargs)
e811c8ce
RD
9020
9021 def GetSize(*args, **kwargs):
248ed943
RD
9022 """
9023 GetSize(self) -> Size
9024
9025 Get the current size of the item, as set in the last Layout.
9026 """
54f9ee45 9027 return _core_.SizerItem_GetSize(*args, **kwargs)
e811c8ce
RD
9028
9029 def CalcMin(*args, **kwargs):
248ed943
RD
9030 """
9031 CalcMin(self) -> Size
9032
9033 Calculates the minimum desired size for the item, including any space
9034 needed by borders.
9035 """
54f9ee45 9036 return _core_.SizerItem_CalcMin(*args, **kwargs)
e811c8ce
RD
9037
9038 def SetDimension(*args, **kwargs):
248ed943
RD
9039 """
9040 SetDimension(self, Point pos, Size size)
9041
9042 Set the position and size of the space allocated for this item by the
9043 sizer, and adjust the position and size of the item (window or
9044 subsizer) to be within that space taking alignment and borders into
9045 account.
9046 """
54f9ee45 9047 return _core_.SizerItem_SetDimension(*args, **kwargs)
e811c8ce
RD
9048
9049 def GetMinSize(*args, **kwargs):
248ed943
RD
9050 """
9051 GetMinSize(self) -> Size
9052
9053 Get the minimum size needed for the item.
9054 """
54f9ee45 9055 return _core_.SizerItem_GetMinSize(*args, **kwargs)
e811c8ce 9056
dfbb5885
RD
9057 def GetMinSizeWithBorder(*args, **kwargs):
9058 """
9059 GetMinSizeWithBorder(self) -> Size
9060
9061 Get the minimum size needed for the item with space for the borders
9062 added, if needed.
9063 """
9064 return _core_.SizerItem_GetMinSizeWithBorder(*args, **kwargs)
9065
e811c8ce 9066 def SetInitSize(*args, **kwargs):
a95a7133 9067 """SetInitSize(self, int x, int y)"""
54f9ee45 9068 return _core_.SizerItem_SetInitSize(*args, **kwargs)
e811c8ce
RD
9069
9070 def SetRatioWH(*args, **kwargs):
248ed943
RD
9071 """
9072 SetRatioWH(self, int width, int height)
9073
9074 Set the ratio item attribute.
9075 """
54f9ee45 9076 return _core_.SizerItem_SetRatioWH(*args, **kwargs)
e811c8ce
RD
9077
9078 def SetRatioSize(*args, **kwargs):
248ed943
RD
9079 """
9080 SetRatioSize(self, Size size)
9081
9082 Set the ratio item attribute.
9083 """
54f9ee45 9084 return _core_.SizerItem_SetRatioSize(*args, **kwargs)
e811c8ce
RD
9085
9086 def SetRatio(*args, **kwargs):
248ed943
RD
9087 """
9088 SetRatio(self, float ratio)
9089
9090 Set the ratio item attribute.
9091 """
54f9ee45 9092 return _core_.SizerItem_SetRatio(*args, **kwargs)
e811c8ce
RD
9093
9094 def GetRatio(*args, **kwargs):
248ed943
RD
9095 """
9096 GetRatio(self) -> float
9097
9098 Set the ratio item attribute.
9099 """
54f9ee45 9100 return _core_.SizerItem_GetRatio(*args, **kwargs)
e811c8ce 9101
d3b6e4ff
RD
9102 def GetRect(*args, **kwargs):
9103 """
9104 GetRect(self) -> Rect
9105
9106 Returns the rectangle that the sizer item should occupy
9107 """
9108 return _core_.SizerItem_GetRect(*args, **kwargs)
9109
e811c8ce 9110 def IsWindow(*args, **kwargs):
248ed943
RD
9111 """
9112 IsWindow(self) -> bool
9113
9114 Is this sizer item a window?
9115 """
54f9ee45 9116 return _core_.SizerItem_IsWindow(*args, **kwargs)
e811c8ce
RD
9117
9118 def IsSizer(*args, **kwargs):
248ed943
RD
9119 """
9120 IsSizer(self) -> bool
9121
9122 Is this sizer item a subsizer?
9123 """
54f9ee45 9124 return _core_.SizerItem_IsSizer(*args, **kwargs)
e811c8ce
RD
9125
9126 def IsSpacer(*args, **kwargs):
248ed943
RD
9127 """
9128 IsSpacer(self) -> bool
9129
9130 Is this sizer item a spacer?
9131 """
54f9ee45 9132 return _core_.SizerItem_IsSpacer(*args, **kwargs)
e811c8ce
RD
9133
9134 def SetProportion(*args, **kwargs):
248ed943
RD
9135 """
9136 SetProportion(self, int proportion)
9137
9138 Set the proportion value for this item.
9139 """
54f9ee45 9140 return _core_.SizerItem_SetProportion(*args, **kwargs)
e811c8ce
RD
9141
9142 def GetProportion(*args, **kwargs):
248ed943
RD
9143 """
9144 GetProportion(self) -> int
9145
9146 Get the proportion value for this item.
9147 """
54f9ee45 9148 return _core_.SizerItem_GetProportion(*args, **kwargs)
e811c8ce 9149
248ed943
RD
9150 SetOption = wx._deprecated(SetProportion, "Please use `SetProportion` instead.")
9151 GetOption = wx._deprecated(GetProportion, "Please use `GetProportion` instead.")
e811c8ce 9152 def SetFlag(*args, **kwargs):
248ed943
RD
9153 """
9154 SetFlag(self, int flag)
9155
9156 Set the flag value for this item.
9157 """
54f9ee45 9158 return _core_.SizerItem_SetFlag(*args, **kwargs)
e811c8ce
RD
9159
9160 def GetFlag(*args, **kwargs):
248ed943
RD
9161 """
9162 GetFlag(self) -> int
9163
9164 Get the flag value for this item.
9165 """
54f9ee45 9166 return _core_.SizerItem_GetFlag(*args, **kwargs)
e811c8ce
RD
9167
9168 def SetBorder(*args, **kwargs):
248ed943
RD
9169 """
9170 SetBorder(self, int border)
9171
9172 Set the border value for this item.
9173 """
54f9ee45 9174 return _core_.SizerItem_SetBorder(*args, **kwargs)
e811c8ce
RD
9175
9176 def GetBorder(*args, **kwargs):
248ed943
RD
9177 """
9178 GetBorder(self) -> int
9179
9180 Get the border value for this item.
9181 """
54f9ee45 9182 return _core_.SizerItem_GetBorder(*args, **kwargs)
e811c8ce
RD
9183
9184 def GetWindow(*args, **kwargs):
248ed943
RD
9185 """
9186 GetWindow(self) -> Window
9187
9188 Get the window (if any) that is managed by this sizer item.
9189 """
54f9ee45 9190 return _core_.SizerItem_GetWindow(*args, **kwargs)
e811c8ce
RD
9191
9192 def SetWindow(*args, **kwargs):
248ed943
RD
9193 """
9194 SetWindow(self, Window window)
9195
9196 Set the window to be managed by this sizer item.
9197 """
54f9ee45 9198 return _core_.SizerItem_SetWindow(*args, **kwargs)
e811c8ce
RD
9199
9200 def GetSizer(*args, **kwargs):
248ed943
RD
9201 """
9202 GetSizer(self) -> Sizer
9203
9204 Get the subsizer (if any) that is managed by this sizer item.
9205 """
54f9ee45 9206 return _core_.SizerItem_GetSizer(*args, **kwargs)
e811c8ce
RD
9207
9208 def SetSizer(*args, **kwargs):
248ed943
RD
9209 """
9210 SetSizer(self, Sizer sizer)
9211
9212 Set the subsizer to be managed by this sizer item.
9213 """
54f9ee45 9214 return _core_.SizerItem_SetSizer(*args, **kwargs)
e811c8ce
RD
9215
9216 def GetSpacer(*args, **kwargs):
248ed943
RD
9217 """
9218 GetSpacer(self) -> Size
9219
9220 Get the size of the spacer managed by this sizer item.
9221 """
54f9ee45 9222 return _core_.SizerItem_GetSpacer(*args, **kwargs)
e811c8ce
RD
9223
9224 def SetSpacer(*args, **kwargs):
248ed943
RD
9225 """
9226 SetSpacer(self, Size size)
9227
9228 Set the size of the spacer to be managed by this sizer item.
9229 """
54f9ee45 9230 return _core_.SizerItem_SetSpacer(*args, **kwargs)
e811c8ce
RD
9231
9232 def Show(*args, **kwargs):
248ed943
RD
9233 """
9234 Show(self, bool show)
9235
9236 Set the show item attribute, which sizers use to determine if the item
9237 is to be made part of the layout or not. If the item is tracking a
9238 window then it is shown or hidden as needed.
9239 """
54f9ee45 9240 return _core_.SizerItem_Show(*args, **kwargs)
e811c8ce
RD
9241
9242 def IsShown(*args, **kwargs):
248ed943
RD
9243 """
9244 IsShown(self) -> bool
9245
9246 Is the item to be shown in the layout?
9247 """
54f9ee45 9248 return _core_.SizerItem_IsShown(*args, **kwargs)
e811c8ce
RD
9249
9250 def GetPosition(*args, **kwargs):
248ed943
RD
9251 """
9252 GetPosition(self) -> Point
9253
9254 Returns the current position of the item, as set in the last Layout.
9255 """
54f9ee45 9256 return _core_.SizerItem_GetPosition(*args, **kwargs)
e811c8ce
RD
9257
9258 def GetUserData(*args, **kwargs):
248ed943
RD
9259 """
9260 GetUserData(self) -> PyObject
9261
9262 Returns the userData associated with this sizer item, or None if there
9263 isn't any.
9264 """
54f9ee45 9265 return _core_.SizerItem_GetUserData(*args, **kwargs)
e811c8ce 9266
d14a1e28
RD
9267
9268class SizerItemPtr(SizerItem):
9269 def __init__(self, this):
9270 self.this = this
9271 if not hasattr(self,"thisown"): self.thisown = 0
9272 self.__class__ = SizerItem
54f9ee45 9273_core_.SizerItem_swigregister(SizerItemPtr)
d14a1e28 9274
248ed943 9275def SizerItemWindow(*args, **kwargs):
0df68c9f 9276 """
248ed943
RD
9277 SizerItemWindow(Window window, int proportion, int flag, int border,
9278 PyObject userData=None) -> SizerItem
9279
9280 Constructs a `wx.SizerItem` for tracking a window.
0df68c9f 9281 """
248ed943 9282 val = _core_.new_SizerItemWindow(*args, **kwargs)
d14a1e28
RD
9283 val.thisown = 1
9284 return val
9285
248ed943 9286def SizerItemSpacer(*args, **kwargs):
0df68c9f 9287 """
248ed943
RD
9288 SizerItemSpacer(int width, int height, int proportion, int flag, int border,
9289 PyObject userData=None) -> SizerItem
9290
9291 Constructs a `wx.SizerItem` for tracking a spacer.
0df68c9f 9292 """
248ed943 9293 val = _core_.new_SizerItemSpacer(*args, **kwargs)
d14a1e28
RD
9294 val.thisown = 1
9295 return val
9296
9297def SizerItemSizer(*args, **kwargs):
0df68c9f
RD
9298 """
9299 SizerItemSizer(Sizer sizer, int proportion, int flag, int border,
248ed943
RD
9300 PyObject userData=None) -> SizerItem
9301
9302 Constructs a `wx.SizerItem` for tracking a subsizer
0df68c9f 9303 """
54f9ee45 9304 val = _core_.new_SizerItemSizer(*args, **kwargs)
d14a1e28
RD
9305 val.thisown = 1
9306 return val
9307
9308class Sizer(Object):
248ed943
RD
9309 """
9310 wx.Sizer is the abstract base class used for laying out subwindows in
9311 a window. You cannot use wx.Sizer directly; instead, you will have to
9312 use one of the sizer classes derived from it such as `wx.BoxSizer`,
9313 `wx.StaticBoxSizer`, `wx.NotebookSizer`, `wx.GridSizer`, `wx.FlexGridSizer`
9314 and `wx.GridBagSizer`.
9315
9316 The concept implemented by sizers in wxWidgets is closely related to
9317 layout tools in other GUI toolkits, such as Java's AWT, the GTK
9318 toolkit or the Qt toolkit. It is based upon the idea of the individual
9319 subwindows reporting their minimal required size and their ability to
9320 get stretched if the size of the parent window has changed. This will
9321 most often mean that the programmer does not set the original size of
9322 a dialog in the beginning, rather the dialog will assigned a sizer and
9323 this sizer will be queried about the recommended size. The sizer in
9324 turn will query its children, which can be normal windows or contorls,
9325 empty space or other sizers, so that a hierarchy of sizers can be
9326 constructed. Note that wxSizer does not derive from wxWindow and thus
9327 do not interfere with tab ordering and requires very little resources
9328 compared to a real window on screen.
9329
9330 What makes sizers so well fitted for use in wxWidgets is the fact that
9331 every control reports its own minimal size and the algorithm can
9332 handle differences in font sizes or different window (dialog item)
9333 sizes on different platforms without problems. If for example the
9334 standard font as well as the overall design of Mac widgets requires
9335 more space than on Windows, then the initial size of a dialog using a
9336 sizer will automatically be bigger on Mac than on Windows.
9337 """
e811c8ce
RD
9338 def __init__(self): raise RuntimeError, "No constructor defined"
9339 def __repr__(self):
9340 return "<%s.%s; proxy of C++ wxSizer instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
9341 def _setOORInfo(*args, **kwargs):
a95a7133 9342 """_setOORInfo(self, PyObject _self)"""
54f9ee45 9343 return _core_.Sizer__setOORInfo(*args, **kwargs)
e811c8ce
RD
9344
9345 def Add(*args, **kwargs):
0df68c9f 9346 """
248ed943 9347 Add(self, item, int proportion=0, int flag=0, int border=0,
d3b6e4ff 9348 PyObject userData=None) -> wx.SizerItem
248ed943
RD
9349
9350 Appends a child item to the sizer.
0df68c9f 9351 """
54f9ee45 9352 return _core_.Sizer_Add(*args, **kwargs)
e811c8ce
RD
9353
9354 def Insert(*args, **kwargs):
0df68c9f 9355 """
248ed943 9356 Insert(self, int before, item, int proportion=0, int flag=0, int border=0,
d3b6e4ff 9357 PyObject userData=None) -> wx.SizerItem
248ed943
RD
9358
9359 Inserts a new item into the list of items managed by this sizer before
9360 the item at index *before*. See `Add` for a description of the parameters.
0df68c9f 9361 """
54f9ee45 9362 return _core_.Sizer_Insert(*args, **kwargs)
e811c8ce
RD
9363
9364 def Prepend(*args, **kwargs):
0df68c9f 9365 """
248ed943 9366 Prepend(self, item, int proportion=0, int flag=0, int border=0,
d3b6e4ff 9367 PyObject userData=None) -> wx.SizerItem
248ed943
RD
9368
9369 Adds a new item to the begining of the list of sizer items managed by
9370 this sizer. See `Add` for a description of the parameters.
0df68c9f 9371 """
54f9ee45 9372 return _core_.Sizer_Prepend(*args, **kwargs)
e811c8ce
RD
9373
9374 def Remove(*args, **kwargs):
248ed943
RD
9375 """
9376 Remove(self, item) -> bool
9377
9378 Removes an item from the sizer and destroys it. This method does not
9379 cause any layout or resizing to take place, call `Layout` to update
9380 the layout on screen after removing a child from the sizer. The
9381 *item* parameter can be either a window, a sizer, or the zero-based
9382 index of an item to remove. Returns True if the child item was found
9383 and removed.
9384 """
54f9ee45 9385 return _core_.Sizer_Remove(*args, **kwargs)
e811c8ce 9386
1c0f361b 9387 def Detach(*args, **kwargs):
248ed943
RD
9388 """
9389 Detach(self, item) -> bool
9390
9391 Detaches an item from the sizer without destroying it. This method
9392 does not cause any layout or resizing to take place, call `Layout` to
9393 do so. The *item* parameter can be either a window, a sizer, or the
9394 zero-based index of the item to be detached. Returns True if the child item
9395 was found and detached.
9396 """
1c0f361b
RD
9397 return _core_.Sizer_Detach(*args, **kwargs)
9398
d3b6e4ff
RD
9399 def GetItem(*args, **kwargs):
9400 """
9401 GetItem(self, item) -> wx.SizerItem
9402
9403 Returns the `wx.SizerItem` which holds the *item* given. The *item*
9404 parameter can be either a window, a sizer, or the zero-based index of
9405 the item to be detached.
9406 """
9407 return _core_.Sizer_GetItem(*args, **kwargs)
9408
e811c8ce 9409 def _SetItemMinSize(*args, **kwargs):
a95a7133 9410 """_SetItemMinSize(self, PyObject item, Size size)"""
54f9ee45 9411 return _core_.Sizer__SetItemMinSize(*args, **kwargs)
e811c8ce 9412
248ed943
RD
9413 def SetItemMinSize(self, item, *args):
9414 """
9415 SetItemMinSize(self, item, Size size)
9416
9417 Sets the minimum size that will be allocated for an item in the sizer.
9418 The *item* parameter can be either a window, a sizer, or the
9419 zero-based index of the item. If a window or sizer is given then it
9420 will be searched for recursivly in subsizers if neccessary.
9421 """
9422 if len(args) == 2:
9423 # for backward compatibility accept separate width,height args too
9424 return self._SetItemMinSize(item, args)
9425 else:
9426 return self._SetItemMinSize(item, args[0])
9427
e811c8ce 9428 def AddItem(*args, **kwargs):
248ed943
RD
9429 """
9430 AddItem(self, SizerItem item)
9431
9432 Adds a `wx.SizerItem` to the sizer.
9433 """
54f9ee45 9434 return _core_.Sizer_AddItem(*args, **kwargs)
e811c8ce
RD
9435
9436 def InsertItem(*args, **kwargs):
248ed943
RD
9437 """
9438 InsertItem(self, int index, SizerItem item)
9439
9440 Inserts a `wx.SizerItem` to the sizer at the position given by *index*.
9441 """
54f9ee45 9442 return _core_.Sizer_InsertItem(*args, **kwargs)
e811c8ce
RD
9443
9444 def PrependItem(*args, **kwargs):
248ed943
RD
9445 """
9446 PrependItem(self, SizerItem item)
9447
9448 Prepends a `wx.SizerItem` to the sizer.
9449 """
54f9ee45 9450 return _core_.Sizer_PrependItem(*args, **kwargs)
e811c8ce 9451
248ed943 9452 def AddMany(self, items):
66c033b4
RD
9453 """
9454 AddMany is a convenience method for adding several items
9455 to a sizer at one time. Simply pass it a list of tuples,
9456 where each tuple consists of the parameters that you
9457 would normally pass to the `Add` method.
9458 """
248ed943
RD
9459 for item in items:
9460 if type(item) != type(()) or (len(item) == 2 and type(item[0]) == type(1)):
9461 item = (item, )
9462 self.Add(*item)
d14a1e28 9463
74e96f3d 9464 # for backwards compatibility only, please do not use in new code
66c033b4
RD
9465 AddWindow = wx._deprecated(Add, "AddWindow is deprecated, use `Add` instead.")
9466 AddSizer = wx._deprecated(Add, "AddSizer is deprecated, use `Add` instead.")
9467 AddSpacer = wx._deprecated(Add, "AddSpacer is deprecated, use `Add` instead.")
9468 PrependWindow = wx._deprecated(Prepend, "PrependWindow is deprecated, use `Prepend` instead.")
9469 PrependSizer = wx._deprecated(Prepend, "PrependSizer is deprecated, use `Prepend` instead.")
9470 PrependSpacer = wx._deprecated(Prepend, "PrependSpacer is deprecated, use `Prepend` instead.")
9471 InsertWindow = wx._deprecated(Insert, "InsertWindow is deprecated, use `Insert` instead.")
9472 InsertSizer = wx._deprecated(Insert, "InsertSizer is deprecated, use `Insert` instead.")
9473 InsertSpacer = wx._deprecated(Insert, "InsertSpacer is deprecated, use `Insert` instead.")
9474 RemoveWindow = wx._deprecated(Remove, "RemoveWindow is deprecated, use `Remove` instead.")
9475 RemoveSizer = wx._deprecated(Remove, "RemoveSizer is deprecated, use `Remove` instead.")
9476 RemovePos = wx._deprecated(Remove, "RemovePos is deprecated, use `Remove` instead.")
d14a1e28
RD
9477
9478
e811c8ce 9479 def SetDimension(*args, **kwargs):
248ed943
RD
9480 """
9481 SetDimension(self, int x, int y, int width, int height)
9482
9483 Call this to force the sizer to take the given dimension and thus
9484 force the items owned by the sizer to resize themselves according to
9485 the rules defined by the parameter in the `Add`, `Insert` or `Prepend`
9486 methods.
9487 """
54f9ee45 9488 return _core_.Sizer_SetDimension(*args, **kwargs)
e811c8ce
RD
9489
9490 def SetMinSize(*args, **kwargs):
248ed943
RD
9491 """
9492 SetMinSize(self, Size size)
9493
9494 Call this to give the sizer a minimal size. Normally, the sizer will
9495 calculate its minimal size based purely on how much space its children
9496 need. After calling this method `GetMinSize` will return either the
9497 minimal size as requested by its children or the minimal size set
9498 here, depending on which is bigger.
9499 """
54f9ee45 9500 return _core_.Sizer_SetMinSize(*args, **kwargs)
e811c8ce
RD
9501
9502 def GetSize(*args, **kwargs):
248ed943
RD
9503 """
9504 GetSize(self) -> Size
9505
9506 Returns the current size of the space managed by the sizer.
9507 """
54f9ee45 9508 return _core_.Sizer_GetSize(*args, **kwargs)
e811c8ce
RD
9509
9510 def GetPosition(*args, **kwargs):
248ed943
RD
9511 """
9512 GetPosition(self) -> Point
9513
9514 Returns the current position of the sizer's managed space.
9515 """
54f9ee45 9516 return _core_.Sizer_GetPosition(*args, **kwargs)
e811c8ce
RD
9517
9518 def GetMinSize(*args, **kwargs):
248ed943
RD
9519 """
9520 GetMinSize(self) -> Size
9521
9522 Returns the minimal size of the sizer. This is either the combined
9523 minimal size of all the children and their borders or the minimal size
9524 set by SetMinSize, depending on which is bigger.
9525 """
54f9ee45 9526 return _core_.Sizer_GetMinSize(*args, **kwargs)
e811c8ce 9527
d14a1e28 9528 def GetSizeTuple(self):
1c0f361b 9529 return self.GetSize().Get()
d14a1e28 9530 def GetPositionTuple(self):
1c0f361b 9531 return self.GetPosition().Get()
d14a1e28 9532 def GetMinSizeTuple(self):
1c0f361b 9533 return self.GetMinSize().Get()
d14a1e28 9534
e811c8ce 9535 def RecalcSizes(*args, **kwargs):
248ed943
RD
9536 """
9537 RecalcSizes(self)
9538
9539 Using the sizes calculated by `CalcMin` reposition and resize all the
9540 items managed by this sizer. You should not need to call this directly as
9541 it is called by `Layout`.
9542 """
54f9ee45 9543 return _core_.Sizer_RecalcSizes(*args, **kwargs)
e811c8ce
RD
9544
9545 def CalcMin(*args, **kwargs):
248ed943
RD
9546 """
9547 CalcMin(self) -> Size
9548
9549 This method is where the sizer will do the actual calculation of its
9550 children's minimal sizes. You should not need to call this directly as
9551 it is called by `Layout`.
9552 """
54f9ee45 9553 return _core_.Sizer_CalcMin(*args, **kwargs)
e811c8ce
RD
9554
9555 def Layout(*args, **kwargs):
248ed943
RD
9556 """
9557 Layout(self)
9558
9559 This method will force the recalculation and layout of the items
9560 controlled by the sizer using the current space allocated to the
9561 sizer. Normally this is called automatically from the owning window's
9562 EVT_SIZE handler, but it is also useful to call it from user code when
9563 one of the items in a sizer change size, or items are added or
9564 removed.
9565 """
54f9ee45 9566 return _core_.Sizer_Layout(*args, **kwargs)
e811c8ce
RD
9567
9568 def Fit(*args, **kwargs):
248ed943
RD
9569 """
9570 Fit(self, Window window) -> Size
9571
9572 Tell the sizer to resize the *window* to match the sizer's minimal
9573 size. This is commonly done in the constructor of the window itself in
9574 order to set its initial size to match the needs of the children as
9575 determined by the sizer. Returns the new size.
9576
9577 For a top level window this is the total window size, not the client size.
9578 """
54f9ee45 9579 return _core_.Sizer_Fit(*args, **kwargs)
e811c8ce
RD
9580
9581 def FitInside(*args, **kwargs):
248ed943
RD
9582 """
9583 FitInside(self, Window window)
9584
9585 Tell the sizer to resize the *virtual size* of the *window* to match the
9586 sizer's minimal size. This will not alter the on screen size of the
9587 window, but may cause the addition/removal/alteration of scrollbars
9588 required to view the virtual area in windows which manage it.
9589
9590 :see: `wx.ScrolledWindow.SetScrollbars`, `SetVirtualSizeHints`
9591
9592 """
54f9ee45 9593 return _core_.Sizer_FitInside(*args, **kwargs)
e811c8ce
RD
9594
9595 def SetSizeHints(*args, **kwargs):
248ed943
RD
9596 """
9597 SetSizeHints(self, Window window)
9598
9599 Tell the sizer to set (and `Fit`) the minimal size of the *window* to
9600 match the sizer's minimal size. This is commonly done in the
9601 constructor of the window itself if the window is resizable (as are
9602 many dialogs under Unix and frames on probably all platforms) in order
9603 to prevent the window from being sized smaller than the minimal size
9604 required by the sizer.
9605 """
54f9ee45 9606 return _core_.Sizer_SetSizeHints(*args, **kwargs)
e811c8ce
RD
9607
9608 def SetVirtualSizeHints(*args, **kwargs):
248ed943
RD
9609 """
9610 SetVirtualSizeHints(self, Window window)
9611
9612 Tell the sizer to set the minimal size of the window virtual area to
9613 match the sizer's minimal size. For windows with managed scrollbars
9614 this will set them appropriately.
9615
9616 :see: `wx.ScrolledWindow.SetScrollbars`
9617
9618 """
54f9ee45 9619 return _core_.Sizer_SetVirtualSizeHints(*args, **kwargs)
e811c8ce
RD
9620
9621 def Clear(*args, **kwargs):
248ed943
RD
9622 """
9623 Clear(self, bool deleteWindows=False)
9624
9625 Clear all items from the sizer, optionally destroying the window items
9626 as well.
9627 """
54f9ee45 9628 return _core_.Sizer_Clear(*args, **kwargs)
e811c8ce
RD
9629
9630 def DeleteWindows(*args, **kwargs):
248ed943
RD
9631 """
9632 DeleteWindows(self)
9633
9634 Destroy all windows managed by the sizer.
9635 """
54f9ee45 9636 return _core_.Sizer_DeleteWindows(*args, **kwargs)
e811c8ce
RD
9637
9638 def GetChildren(*args, **kwargs):
248ed943 9639 """
51b83b37 9640 GetChildren(self) -> list
248ed943
RD
9641
9642 Returns a list of all the `wx.SizerItem` objects managed by the sizer.
9643 """
54f9ee45 9644 return _core_.Sizer_GetChildren(*args, **kwargs)
e811c8ce
RD
9645
9646 def Show(*args, **kwargs):
248ed943 9647 """
ae8162c8 9648 Show(self, item, bool show=True, bool recursive=false) -> bool
e811c8ce 9649
248ed943
RD
9650 Shows or hides an item managed by the sizer. To make a sizer item
9651 disappear or reappear, use Show followed by `Layout`. The *item*
9652 parameter can be either a window, a sizer, or the zero-based index of
7e63a440
RD
9653 the item. Use the recursive parameter to show or hide an item in a
9654 subsizer. Returns True if the item was found.
248ed943
RD
9655 """
9656 return _core_.Sizer_Show(*args, **kwargs)
e811c8ce
RD
9657
9658 def IsShown(*args, **kwargs):
248ed943
RD
9659 """
9660 IsShown(self, item)
9661
9662 Determines if the item is currently shown. sizer. To make a sizer
9663 item disappear or reappear, use Show followed by `Layout`. The *item*
9664 parameter can be either a window, a sizer, or the zero-based index of
9665 the item.
9666 """
54f9ee45 9667 return _core_.Sizer_IsShown(*args, **kwargs)
e811c8ce 9668
7e63a440 9669 def Hide(self, item, recursive=False):
248ed943 9670 """
7e63a440 9671 A convenience method for Show(item, False, recursive).
248ed943 9672 """
06759a38 9673 return self.Show(item, False, recursive)
248ed943 9674
e811c8ce 9675 def ShowItems(*args, **kwargs):
248ed943
RD
9676 """
9677 ShowItems(self, bool show)
9678
84f85550 9679 Recursively call `wx.SizerItem.Show` on all sizer items.
248ed943 9680 """
54f9ee45 9681 return _core_.Sizer_ShowItems(*args, **kwargs)
e811c8ce 9682
d14a1e28
RD
9683
9684class SizerPtr(Sizer):
9685 def __init__(self, this):
9686 self.this = this
9687 if not hasattr(self,"thisown"): self.thisown = 0
9688 self.__class__ = Sizer
54f9ee45 9689_core_.Sizer_swigregister(SizerPtr)
d14a1e28
RD
9690
9691class PySizer(Sizer):
248ed943
RD
9692 """
9693 wx.PySizer is a special version of `wx.Sizer` that has been
9694 instrumented to allow the C++ virtual methods to be overloaded in
9695 Python derived classes. You would derive from this class if you are
9696 wanting to implement a custom sizer in Python code. Simply implement
9697 `CalcMin` and `RecalcSizes` in the derived class and you're all set.
9698 For example::
9699
9700 class MySizer(wx.PySizer):
9701 def __init__(self):
9702 wx.PySizer.__init__(self)
9703
9704 def CalcMin(self):
9705 for item in self.GetChildren():
9706 # calculate the total minimum width and height needed
9707 # by all items in the sizer according to this sizer's
9708 # layout algorithm.
9709 ...
9710 return wx.Size(width, height)
9711
9712 def RecalcSizes(self):
9713 # find the space allotted to this sizer
9714 pos = self.GetPosition()
9715 size = self.GetSize()
9716 for item in self.GetChildren():
9717 # Recalculate (if necessary) the position and size of
9718 # each item and then call item.SetDimension to do the
9719 # actual positioning and sizing of the items within the
9720 # space alloted to this sizer.
9721 ...
9722 item.SetDimension(itemPos, itemSize)
9723
9724
9725 When `Layout` is called it first calls `CalcMin` followed by
9726 `RecalcSizes` so you can optimize a bit by saving the results of
e505d15e 9727 `CalcMin` and reusing them in `RecalcSizes`.
248ed943
RD
9728
9729 :see: `wx.SizerItem`, `wx.Sizer.GetChildren`
9730
9731
9732 """
e811c8ce
RD
9733 def __repr__(self):
9734 return "<%s.%s; proxy of C++ wxPySizer instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 9735 def __init__(self, *args, **kwargs):
248ed943
RD
9736 """
9737 __init__(self) -> PySizer
9738
9739 Creates a wx.PySizer. Must be called from the __init__ in the derived
9740 class.
9741 """
54f9ee45 9742 newobj = _core_.new_PySizer(*args, **kwargs)
d14a1e28
RD
9743 self.this = newobj.this
9744 self.thisown = 1
9745 del newobj.thisown
9746 self._setCallbackInfo(self, PySizer);self._setOORInfo(self)
e811c8ce
RD
9747
9748 def _setCallbackInfo(*args, **kwargs):
a95a7133 9749 """_setCallbackInfo(self, PyObject self, PyObject _class)"""
54f9ee45 9750 return _core_.PySizer__setCallbackInfo(*args, **kwargs)
e811c8ce 9751
d14a1e28
RD
9752
9753class PySizerPtr(PySizer):
9754 def __init__(self, this):
9755 self.this = this
9756 if not hasattr(self,"thisown"): self.thisown = 0
9757 self.__class__ = PySizer
54f9ee45 9758_core_.PySizer_swigregister(PySizerPtr)
d14a1e28
RD
9759
9760#---------------------------------------------------------------------------
9761
9762class BoxSizer(Sizer):
248ed943
RD
9763 """
9764 The basic idea behind a box sizer is that windows will most often be
9765 laid out in rather simple basic geometry, typically in a row or a
9766 column or nested hierarchies of either. A wx.BoxSizer will lay out
9767 its items in a simple row or column, depending on the orientation
9768 parameter passed to the constructor.
9769 """
e811c8ce
RD
9770 def __repr__(self):
9771 return "<%s.%s; proxy of C++ wxBoxSizer instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 9772 def __init__(self, *args, **kwargs):
248ed943
RD
9773 """
9774 __init__(self, int orient=HORIZONTAL) -> BoxSizer
9775
9776 Constructor for a wx.BoxSizer. *orient* may be one of ``wx.VERTICAL``
9777 or ``wx.HORIZONTAL`` for creating either a column sizer or a row
9778 sizer.
9779 """
54f9ee45 9780 newobj = _core_.new_BoxSizer(*args, **kwargs)
d14a1e28
RD
9781 self.this = newobj.this
9782 self.thisown = 1
9783 del newobj.thisown
9784 self._setOORInfo(self)
e811c8ce
RD
9785
9786 def GetOrientation(*args, **kwargs):
248ed943
RD
9787 """
9788 GetOrientation(self) -> int
9789
9790 Returns the current orientation of the sizer.
9791 """
54f9ee45 9792 return _core_.BoxSizer_GetOrientation(*args, **kwargs)
e811c8ce
RD
9793
9794 def SetOrientation(*args, **kwargs):
248ed943
RD
9795 """
9796 SetOrientation(self, int orient)
e811c8ce 9797
248ed943
RD
9798 Resets the orientation of the sizer.
9799 """
9800 return _core_.BoxSizer_SetOrientation(*args, **kwargs)
e811c8ce 9801
d14a1e28
RD
9802
9803class BoxSizerPtr(BoxSizer):
9804 def __init__(self, this):
9805 self.this = this
9806 if not hasattr(self,"thisown"): self.thisown = 0
9807 self.__class__ = BoxSizer
54f9ee45 9808_core_.BoxSizer_swigregister(BoxSizerPtr)
d14a1e28
RD
9809
9810#---------------------------------------------------------------------------
9811
9812class StaticBoxSizer(BoxSizer):
248ed943
RD
9813 """
9814 wx.StaticBoxSizer derives from and functions identically to the
9815 `wx.BoxSizer` and adds a `wx.StaticBox` around the items that the sizer
9816 manages. Note that this static box must be created separately and
9817 passed to the sizer constructor.
9818 """
e811c8ce
RD
9819 def __repr__(self):
9820 return "<%s.%s; proxy of C++ wxStaticBoxSizer instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 9821 def __init__(self, *args, **kwargs):
248ed943
RD
9822 """
9823 __init__(self, StaticBox box, int orient=HORIZONTAL) -> StaticBoxSizer
9824
9825 Constructor. It takes an associated static box and the orientation
9826 *orient* as parameters - orient can be either of ``wx.VERTICAL`` or
9827 ``wx.HORIZONTAL``.
9828 """
54f9ee45 9829 newobj = _core_.new_StaticBoxSizer(*args, **kwargs)
d14a1e28
RD
9830 self.this = newobj.this
9831 self.thisown = 1
9832 del newobj.thisown
9833 self._setOORInfo(self)
e811c8ce
RD
9834
9835 def GetStaticBox(*args, **kwargs):
248ed943
RD
9836 """
9837 GetStaticBox(self) -> StaticBox
e811c8ce 9838
248ed943
RD
9839 Returns the static box associated with this sizer.
9840 """
9841 return _core_.StaticBoxSizer_GetStaticBox(*args, **kwargs)
e811c8ce 9842
d14a1e28
RD
9843
9844class StaticBoxSizerPtr(StaticBoxSizer):
9845 def __init__(self, this):
9846 self.this = this
9847 if not hasattr(self,"thisown"): self.thisown = 0
9848 self.__class__ = StaticBoxSizer
54f9ee45 9849_core_.StaticBoxSizer_swigregister(StaticBoxSizerPtr)
d14a1e28
RD
9850
9851#---------------------------------------------------------------------------
9852
9853class GridSizer(Sizer):
248ed943
RD
9854 """
9855 A grid sizer is a sizer which lays out its children in a
9856 two-dimensional table with all cells having the same size. In other
9857 words, the width of each cell within the grid is the width of the
9858 widest item added to the sizer and the height of each grid cell is the
9859 height of the tallest item. An optional vertical and/or horizontal
9860 gap between items can also be specified (in pixels.)
9861
9862 Items are placed in the cells of the grid in the order they are added,
9863 in row-major order. In other words, the first row is filled first,
9864 then the second, and so on until all items have been added. (If
9865 neccessary, additional rows will be added as items are added.) If you
9866 need to have greater control over the cells that items are placed in
9867 then use the `wx.GridBagSizer`.
9868
9869 """
e811c8ce
RD
9870 def __repr__(self):
9871 return "<%s.%s; proxy of C++ wxGridSizer instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 9872 def __init__(self, *args, **kwargs):
248ed943
RD
9873 """
9874 __init__(self, int rows=1, int cols=0, int vgap=0, int hgap=0) -> GridSizer
9875
9876 Constructor for a wx.GridSizer. *rows* and *cols* determine the number
9877 of columns and rows in the sizer - if either of the parameters is
9878 zero, it will be calculated to from the total number of children in
9879 the sizer, thus making the sizer grow dynamically. *vgap* and *hgap*
9880 define extra space between all children.
9881 """
54f9ee45 9882 newobj = _core_.new_GridSizer(*args, **kwargs)
d14a1e28
RD
9883 self.this = newobj.this
9884 self.thisown = 1
9885 del newobj.thisown
9886 self._setOORInfo(self)
e811c8ce 9887
e811c8ce 9888 def SetCols(*args, **kwargs):
248ed943
RD
9889 """
9890 SetCols(self, int cols)
9891
9892 Sets the number of columns in the sizer.
9893 """
54f9ee45 9894 return _core_.GridSizer_SetCols(*args, **kwargs)
e811c8ce
RD
9895
9896 def SetRows(*args, **kwargs):
248ed943
RD
9897 """
9898 SetRows(self, int rows)
9899
9900 Sets the number of rows in the sizer.
9901 """
54f9ee45 9902 return _core_.GridSizer_SetRows(*args, **kwargs)
e811c8ce
RD
9903
9904 def SetVGap(*args, **kwargs):
248ed943
RD
9905 """
9906 SetVGap(self, int gap)
9907
9908 Sets the vertical gap (in pixels) between the cells in the sizer.
9909 """
54f9ee45 9910 return _core_.GridSizer_SetVGap(*args, **kwargs)
e811c8ce
RD
9911
9912 def SetHGap(*args, **kwargs):
248ed943
RD
9913 """
9914 SetHGap(self, int gap)
9915
9916 Sets the horizontal gap (in pixels) between cells in the sizer
9917 """
54f9ee45 9918 return _core_.GridSizer_SetHGap(*args, **kwargs)
e811c8ce
RD
9919
9920 def GetCols(*args, **kwargs):
248ed943
RD
9921 """
9922 GetCols(self) -> int
9923
9924 Returns the number of columns in the sizer.
9925 """
54f9ee45 9926 return _core_.GridSizer_GetCols(*args, **kwargs)
e811c8ce
RD
9927
9928 def GetRows(*args, **kwargs):
248ed943
RD
9929 """
9930 GetRows(self) -> int
9931
9932 Returns the number of rows in the sizer.
9933 """
54f9ee45 9934 return _core_.GridSizer_GetRows(*args, **kwargs)
e811c8ce
RD
9935
9936 def GetVGap(*args, **kwargs):
248ed943
RD
9937 """
9938 GetVGap(self) -> int
9939
9940 Returns the vertical gap (in pixels) between the cells in the sizer.
9941 """
54f9ee45 9942 return _core_.GridSizer_GetVGap(*args, **kwargs)
e811c8ce
RD
9943
9944 def GetHGap(*args, **kwargs):
248ed943
RD
9945 """
9946 GetHGap(self) -> int
9947
9948 Returns the horizontal gap (in pixels) between cells in the sizer.
9949 """
54f9ee45 9950 return _core_.GridSizer_GetHGap(*args, **kwargs)
e811c8ce 9951
d14a1e28
RD
9952
9953class GridSizerPtr(GridSizer):
9954 def __init__(self, this):
9955 self.this = this
9956 if not hasattr(self,"thisown"): self.thisown = 0
9957 self.__class__ = GridSizer
54f9ee45 9958_core_.GridSizer_swigregister(GridSizerPtr)
d14a1e28
RD
9959
9960#---------------------------------------------------------------------------
9961
54f9ee45
RD
9962FLEX_GROWMODE_NONE = _core_.FLEX_GROWMODE_NONE
9963FLEX_GROWMODE_SPECIFIED = _core_.FLEX_GROWMODE_SPECIFIED
9964FLEX_GROWMODE_ALL = _core_.FLEX_GROWMODE_ALL
d14a1e28 9965class FlexGridSizer(GridSizer):
248ed943
RD
9966 """
9967 A flex grid sizer is a sizer which lays out its children in a
9968 two-dimensional table with all table cells in one row having the same
9969 height and all cells in one column having the same width, but all
9970 rows or all columns are not necessarily the same height or width as in
9971 the `wx.GridSizer`.
9972
9973 wx.FlexGridSizer can also size items equally in one direction but
9974 unequally ("flexibly") in the other. If the sizer is only flexible
9975 in one direction (this can be changed using `SetFlexibleDirection`), it
9976 needs to be decided how the sizer should grow in the other ("non
9977 flexible") direction in order to fill the available space. The
9978 `SetNonFlexibleGrowMode` method serves this purpose.
9979
9980
9981 """
e811c8ce
RD
9982 def __repr__(self):
9983 return "<%s.%s; proxy of C++ wxFlexGridSizer instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 9984 def __init__(self, *args, **kwargs):
248ed943
RD
9985 """
9986 __init__(self, int rows=1, int cols=0, int vgap=0, int hgap=0) -> FlexGridSizer
9987
9988 Constructor for a wx.FlexGridSizer. *rows* and *cols* determine the
9989 number of columns and rows in the sizer - if either of the parameters
9990 is zero, it will be calculated to from the total number of children in
9991 the sizer, thus making the sizer grow dynamically. *vgap* and *hgap*
9992 define extra space between all children.
9993 """
54f9ee45 9994 newobj = _core_.new_FlexGridSizer(*args, **kwargs)
d14a1e28
RD
9995 self.this = newobj.this
9996 self.thisown = 1
9997 del newobj.thisown
9998 self._setOORInfo(self)
e811c8ce 9999
248ed943
RD
10000 def AddGrowableRow(*args, **kwargs):
10001 """
10002 AddGrowableRow(self, size_t idx, int proportion=0)
e811c8ce 10003
248ed943
RD
10004 Specifies that row *idx* (starting from zero) should be grown if there
10005 is extra space available to the sizer.
e811c8ce 10006
248ed943
RD
10007 The *proportion* parameter has the same meaning as the stretch factor
10008 for the box sizers except that if all proportions are 0, then all
10009 columns are resized equally (instead of not being resized at all).
10010 """
54f9ee45 10011 return _core_.FlexGridSizer_AddGrowableRow(*args, **kwargs)
e811c8ce
RD
10012
10013 def RemoveGrowableRow(*args, **kwargs):
248ed943
RD
10014 """
10015 RemoveGrowableRow(self, size_t idx)
10016
10017 Specifies that row *idx* is no longer growable.
10018 """
54f9ee45 10019 return _core_.FlexGridSizer_RemoveGrowableRow(*args, **kwargs)
e811c8ce
RD
10020
10021 def AddGrowableCol(*args, **kwargs):
248ed943
RD
10022 """
10023 AddGrowableCol(self, size_t idx, int proportion=0)
10024
10025 Specifies that column *idx* (starting from zero) should be grown if
10026 there is extra space available to the sizer.
10027
10028 The *proportion* parameter has the same meaning as the stretch factor
10029 for the box sizers except that if all proportions are 0, then all
10030 columns are resized equally (instead of not being resized at all).
10031 """
54f9ee45 10032 return _core_.FlexGridSizer_AddGrowableCol(*args, **kwargs)
e811c8ce
RD
10033
10034 def RemoveGrowableCol(*args, **kwargs):
248ed943
RD
10035 """
10036 RemoveGrowableCol(self, size_t idx)
10037
10038 Specifies that column *idx* is no longer growable.
10039 """
54f9ee45 10040 return _core_.FlexGridSizer_RemoveGrowableCol(*args, **kwargs)
e811c8ce
RD
10041
10042 def SetFlexibleDirection(*args, **kwargs):
248ed943
RD
10043 """
10044 SetFlexibleDirection(self, int direction)
10045
10046 Specifies whether the sizer should flexibly resize its columns, rows,
10047 or both. Argument *direction* can be one of the following values. Any
10048 other value is ignored.
10049
10050 ============== =======================================
10051 wx.VERTICAL Rows are flexibly sized.
10052 wx.HORIZONTAL Columns are flexibly sized.
10053 wx.BOTH Both rows and columns are flexibly sized
10054 (this is the default value).
10055 ============== =======================================
10056
10057 Note that this method does not trigger relayout.
10058
10059 """
54f9ee45 10060 return _core_.FlexGridSizer_SetFlexibleDirection(*args, **kwargs)
e811c8ce
RD
10061
10062 def GetFlexibleDirection(*args, **kwargs):
248ed943
RD
10063 """
10064 GetFlexibleDirection(self) -> int
10065
10066 Returns a value that specifies whether the sizer
10067 flexibly resizes its columns, rows, or both (default).
10068
10069 :see: `SetFlexibleDirection`
10070 """
54f9ee45 10071 return _core_.FlexGridSizer_GetFlexibleDirection(*args, **kwargs)
e811c8ce
RD
10072
10073 def SetNonFlexibleGrowMode(*args, **kwargs):
248ed943
RD
10074 """
10075 SetNonFlexibleGrowMode(self, int mode)
10076
10077 Specifies how the sizer should grow in the non-flexible direction if
10078 there is one (so `SetFlexibleDirection` must have been called
10079 previously). Argument *mode* can be one of the following values:
10080
10081 ========================== =================================================
10082 wx.FLEX_GROWMODE_NONE Sizer doesn't grow in the non flexible direction.
10083 wx.FLEX_GROWMODE_SPECIFIED Sizer honors growable columns/rows set with
10084 `AddGrowableCol` and `AddGrowableRow`. In this
10085 case equal sizing applies to minimum sizes of
10086 columns or rows (this is the default value).
10087 wx.FLEX_GROWMODE_ALL Sizer equally stretches all columns or rows in
10088 the non flexible direction, whether they are
10089 growable or not in the flexbile direction.
10090 ========================== =================================================
10091
10092 Note that this method does not trigger relayout.
10093
10094
10095 """
54f9ee45 10096 return _core_.FlexGridSizer_SetNonFlexibleGrowMode(*args, **kwargs)
e811c8ce
RD
10097
10098 def GetNonFlexibleGrowMode(*args, **kwargs):
248ed943
RD
10099 """
10100 GetNonFlexibleGrowMode(self) -> int
10101
10102 Returns the value that specifies how the sizer grows in the
10103 non-flexible direction if there is one.
10104
10105 :see: `SetNonFlexibleGrowMode`
10106 """
54f9ee45 10107 return _core_.FlexGridSizer_GetNonFlexibleGrowMode(*args, **kwargs)
e811c8ce
RD
10108
10109 def GetRowHeights(*args, **kwargs):
fd2dc343
RD
10110 """
10111 GetRowHeights(self) -> list
10112
10113 Returns a list of integers representing the heights of each of the
10114 rows in the sizer.
10115 """
54f9ee45 10116 return _core_.FlexGridSizer_GetRowHeights(*args, **kwargs)
e811c8ce
RD
10117
10118 def GetColWidths(*args, **kwargs):
fd2dc343
RD
10119 """
10120 GetColWidths(self) -> list
10121
10122 Returns a list of integers representing the widths of each of the
10123 columns in the sizer.
10124 """
54f9ee45 10125 return _core_.FlexGridSizer_GetColWidths(*args, **kwargs)
e811c8ce 10126
d14a1e28
RD
10127
10128class FlexGridSizerPtr(FlexGridSizer):
10129 def __init__(self, this):
10130 self.this = this
10131 if not hasattr(self,"thisown"): self.thisown = 0
10132 self.__class__ = FlexGridSizer
54f9ee45 10133_core_.FlexGridSizer_swigregister(FlexGridSizerPtr)
d14a1e28 10134
e505d15e
RD
10135class StdDialogButtonSizer(BoxSizer):
10136 """
10137 A special sizer that knows how to order and position standard buttons
10138 in order to conform to the current platform's standards. You simply
10139 need to add each `wx.Button` to the sizer, and be sure to create the
10140 buttons using the standard ID's. Then call `Finalize` and the sizer
10141 will take care of the rest.
10142
10143 """
10144 def __repr__(self):
10145 return "<%s.%s; proxy of C++ wxStdDialogButtonSizer instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
10146 def __init__(self, *args, **kwargs):
10147 """__init__(self) -> StdDialogButtonSizer"""
10148 newobj = _core_.new_StdDialogButtonSizer(*args, **kwargs)
10149 self.this = newobj.this
10150 self.thisown = 1
10151 del newobj.thisown
10152 def AddButton(*args, **kwargs):
10153 """
10154 AddButton(self, wxButton button)
10155
10156 Use this to add the buttons to this sizer. Do not use the `Add`
10157 method in the base class.
10158 """
10159 return _core_.StdDialogButtonSizer_AddButton(*args, **kwargs)
10160
10161 def Finalise(*args, **kwargs):
10162 """
10163 Finalise(self)
10164
10165 This funciton needs to be called after all the buttons have been added
10166 to the sizer. It will reorder them and position them in a platform
10167 specifc manner.
10168 """
10169 return _core_.StdDialogButtonSizer_Finalise(*args, **kwargs)
51b83b37
RD
10170
10171 def SetAffirmativeButton(*args, **kwargs):
10172 """SetAffirmativeButton(self, wxButton button)"""
10173 return _core_.StdDialogButtonSizer_SetAffirmativeButton(*args, **kwargs)
10174
10175 def SetNegativeButton(*args, **kwargs):
10176 """SetNegativeButton(self, wxButton button)"""
10177 return _core_.StdDialogButtonSizer_SetNegativeButton(*args, **kwargs)
10178
10179 def SetCancelButton(*args, **kwargs):
10180 """SetCancelButton(self, wxButton button)"""
10181 return _core_.StdDialogButtonSizer_SetCancelButton(*args, **kwargs)
e505d15e
RD
10182
10183 def GetAffirmativeButton(*args, **kwargs):
10184 """GetAffirmativeButton(self) -> wxButton"""
10185 return _core_.StdDialogButtonSizer_GetAffirmativeButton(*args, **kwargs)
10186
10187 def GetApplyButton(*args, **kwargs):
10188 """GetApplyButton(self) -> wxButton"""
10189 return _core_.StdDialogButtonSizer_GetApplyButton(*args, **kwargs)
10190
10191 def GetNegativeButton(*args, **kwargs):
10192 """GetNegativeButton(self) -> wxButton"""
10193 return _core_.StdDialogButtonSizer_GetNegativeButton(*args, **kwargs)
10194
10195 def GetCancelButton(*args, **kwargs):
10196 """GetCancelButton(self) -> wxButton"""
10197 return _core_.StdDialogButtonSizer_GetCancelButton(*args, **kwargs)
10198
10199 def GetHelpButton(*args, **kwargs):
10200 """GetHelpButton(self) -> wxButton"""
10201 return _core_.StdDialogButtonSizer_GetHelpButton(*args, **kwargs)
10202
10203
10204class StdDialogButtonSizerPtr(StdDialogButtonSizer):
10205 def __init__(self, this):
10206 self.this = this
10207 if not hasattr(self,"thisown"): self.thisown = 0
10208 self.__class__ = StdDialogButtonSizer
10209_core_.StdDialogButtonSizer_swigregister(StdDialogButtonSizerPtr)
10210
d14a1e28
RD
10211#---------------------------------------------------------------------------
10212
10213class GBPosition(object):
248ed943
RD
10214 """
10215 This class represents the position of an item in a virtual grid of
10216 rows and columns managed by a `wx.GridBagSizer`. wxPython has
10217 typemaps that will automatically convert from a 2-element sequence of
10218 integers to a wx.GBPosition, so you can use the more pythonic
10219 representation of the position nearly transparently in Python code.
10220 """
e811c8ce
RD
10221 def __repr__(self):
10222 return "<%s.%s; proxy of C++ wxGBPosition instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 10223 def __init__(self, *args, **kwargs):
248ed943
RD
10224 """
10225 __init__(self, int row=0, int col=0) -> GBPosition
10226
10227 This class represents the position of an item in a virtual grid of
10228 rows and columns managed by a `wx.GridBagSizer`. wxPython has
10229 typemaps that will automatically convert from a 2-element sequence of
10230 integers to a wx.GBPosition, so you can use the more pythonic
10231 representation of the position nearly transparently in Python code.
10232 """
54f9ee45 10233 newobj = _core_.new_GBPosition(*args, **kwargs)
d14a1e28
RD
10234 self.this = newobj.this
10235 self.thisown = 1
10236 del newobj.thisown
e811c8ce 10237 def GetRow(*args, **kwargs):
a95a7133 10238 """GetRow(self) -> int"""
54f9ee45 10239 return _core_.GBPosition_GetRow(*args, **kwargs)
e811c8ce
RD
10240
10241 def GetCol(*args, **kwargs):
a95a7133 10242 """GetCol(self) -> int"""
54f9ee45 10243 return _core_.GBPosition_GetCol(*args, **kwargs)
e811c8ce
RD
10244
10245 def SetRow(*args, **kwargs):
a95a7133 10246 """SetRow(self, int row)"""
54f9ee45 10247 return _core_.GBPosition_SetRow(*args, **kwargs)
e811c8ce
RD
10248
10249 def SetCol(*args, **kwargs):
a95a7133 10250 """SetCol(self, int col)"""
54f9ee45 10251 return _core_.GBPosition_SetCol(*args, **kwargs)
e811c8ce
RD
10252
10253 def __eq__(*args, **kwargs):
a95a7133 10254 """__eq__(self, GBPosition other) -> bool"""
54f9ee45 10255 return _core_.GBPosition___eq__(*args, **kwargs)
e811c8ce
RD
10256
10257 def __ne__(*args, **kwargs):
a95a7133 10258 """__ne__(self, GBPosition other) -> bool"""
54f9ee45 10259 return _core_.GBPosition___ne__(*args, **kwargs)
e811c8ce
RD
10260
10261 def Set(*args, **kwargs):
a95a7133 10262 """Set(self, int row=0, int col=0)"""
54f9ee45 10263 return _core_.GBPosition_Set(*args, **kwargs)
e811c8ce
RD
10264
10265 def Get(*args, **kwargs):
a95a7133 10266 """Get(self) -> PyObject"""
54f9ee45 10267 return _core_.GBPosition_Get(*args, **kwargs)
e811c8ce 10268
41e2b43e 10269 asTuple = wx._deprecated(Get, "asTuple is deprecated, use `Get` instead")
e811c8ce
RD
10270 def __str__(self): return str(self.Get())
10271 def __repr__(self): return 'wx.GBPosition'+str(self.Get())
10272 def __len__(self): return len(self.Get())
10273 def __getitem__(self, index): return self.Get()[index]
d14a1e28
RD
10274 def __setitem__(self, index, val):
10275 if index == 0: self.SetRow(val)
10276 elif index == 1: self.SetCol(val)
10277 else: raise IndexError
e811c8ce 10278 def __nonzero__(self): return self.Get() != (0,0)
74e96f3d
RD
10279 __safe_for_unpickling__ = True
10280 def __reduce__(self): return (wx.GBPosition, self.Get())
d14a1e28
RD
10281
10282 row = property(GetRow, SetRow)
10283 col = property(GetCol, SetCol)
10284
10285
10286class GBPositionPtr(GBPosition):
10287 def __init__(self, this):
10288 self.this = this
10289 if not hasattr(self,"thisown"): self.thisown = 0
10290 self.__class__ = GBPosition
54f9ee45 10291_core_.GBPosition_swigregister(GBPositionPtr)
d14a1e28
RD
10292
10293class GBSpan(object):
248ed943
RD
10294 """
10295 This class is used to hold the row and column spanning attributes of
10296 items in a `wx.GridBagSizer`. wxPython has typemaps that will
10297 automatically convert from a 2-element sequence of integers to a
10298 wx.GBSpan, so you can use the more pythonic representation of the span
10299 nearly transparently in Python code.
10300
10301 """
e811c8ce
RD
10302 def __repr__(self):
10303 return "<%s.%s; proxy of C++ wxGBSpan instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 10304 def __init__(self, *args, **kwargs):
248ed943
RD
10305 """
10306 __init__(self, int rowspan=1, int colspan=1) -> GBSpan
10307
10308 Construct a new wxGBSpan, optionally setting the rowspan and
10309 colspan. The default is (1,1). (Meaning that the item occupies one
10310 cell in each direction.
10311 """
54f9ee45 10312 newobj = _core_.new_GBSpan(*args, **kwargs)
d14a1e28
RD
10313 self.this = newobj.this
10314 self.thisown = 1
10315 del newobj.thisown
e811c8ce 10316 def GetRowspan(*args, **kwargs):
a95a7133 10317 """GetRowspan(self) -> int"""
54f9ee45 10318 return _core_.GBSpan_GetRowspan(*args, **kwargs)
e811c8ce
RD
10319
10320 def GetColspan(*args, **kwargs):
a95a7133 10321 """GetColspan(self) -> int"""
54f9ee45 10322 return _core_.GBSpan_GetColspan(*args, **kwargs)
e811c8ce
RD
10323
10324 def SetRowspan(*args, **kwargs):
a95a7133 10325 """SetRowspan(self, int rowspan)"""
54f9ee45 10326 return _core_.GBSpan_SetRowspan(*args, **kwargs)
e811c8ce
RD
10327
10328 def SetColspan(*args, **kwargs):
a95a7133 10329 """SetColspan(self, int colspan)"""
54f9ee45 10330 return _core_.GBSpan_SetColspan(*args, **kwargs)
e811c8ce
RD
10331
10332 def __eq__(*args, **kwargs):
a95a7133 10333 """__eq__(self, GBSpan other) -> bool"""
54f9ee45 10334 return _core_.GBSpan___eq__(*args, **kwargs)
e811c8ce
RD
10335
10336 def __ne__(*args, **kwargs):
a95a7133 10337 """__ne__(self, GBSpan other) -> bool"""
54f9ee45 10338 return _core_.GBSpan___ne__(*args, **kwargs)
e811c8ce
RD
10339
10340 def Set(*args, **kwargs):
a95a7133 10341 """Set(self, int rowspan=1, int colspan=1)"""
54f9ee45 10342 return _core_.GBSpan_Set(*args, **kwargs)
e811c8ce
RD
10343
10344 def Get(*args, **kwargs):
a95a7133 10345 """Get(self) -> PyObject"""
54f9ee45 10346 return _core_.GBSpan_Get(*args, **kwargs)
e811c8ce 10347
41e2b43e 10348 asTuple = wx._deprecated(Get, "asTuple is deprecated, use `Get` instead")
e811c8ce
RD
10349 def __str__(self): return str(self.Get())
10350 def __repr__(self): return 'wx.GBSpan'+str(self.Get())
10351 def __len__(self): return len(self.Get())
10352 def __getitem__(self, index): return self.Get()[index]
d14a1e28
RD
10353 def __setitem__(self, index, val):
10354 if index == 0: self.SetRowspan(val)
10355 elif index == 1: self.SetColspan(val)
10356 else: raise IndexError
e811c8ce 10357 def __nonzero__(self): return self.Get() != (0,0)
74e96f3d
RD
10358 __safe_for_unpickling__ = True
10359 def __reduce__(self): return (wx.GBSpan, self.Get())
d14a1e28
RD
10360
10361 rowspan = property(GetRowspan, SetRowspan)
10362 colspan = property(GetColspan, SetColspan)
10363
10364
10365class GBSpanPtr(GBSpan):
10366 def __init__(self, this):
10367 self.this = this
10368 if not hasattr(self,"thisown"): self.thisown = 0
10369 self.__class__ = GBSpan
54f9ee45 10370_core_.GBSpan_swigregister(GBSpanPtr)
d14a1e28
RD
10371
10372class GBSizerItem(SizerItem):
248ed943
RD
10373 """
10374 The wx.GBSizerItem class is used to track the additional data about
10375 items in a `wx.GridBagSizer` such as the item's position in the grid
10376 and how many rows or columns it spans.
10377
10378 """
e811c8ce
RD
10379 def __repr__(self):
10380 return "<%s.%s; proxy of C++ wxGBSizerItem instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 10381 def __init__(self, *args, **kwargs):
248ed943
RD
10382 """
10383 __init__(self) -> GBSizerItem
10384
10385 Constructs an empty wx.GBSizerItem. Either a window, sizer or spacer
10386 size will need to be set, as well as a position and span before this
10387 item can be used in a Sizer.
10388
10389 You will probably never need to create a wx.GBSizerItem directly as they
10390 are created automatically when the sizer's Add method is called.
10391 """
54f9ee45 10392 newobj = _core_.new_GBSizerItem(*args, **kwargs)
d14a1e28
RD
10393 self.this = newobj.this
10394 self.thisown = 1
10395 del newobj.thisown
e811c8ce 10396 def GetPos(*args, **kwargs):
248ed943
RD
10397 """
10398 GetPos(self) -> GBPosition
10399
10400 Get the grid position of the item
10401 """
54f9ee45 10402 return _core_.GBSizerItem_GetPos(*args, **kwargs)
e811c8ce
RD
10403
10404 def GetPosTuple(self): return self.GetPos().Get()
10405 def GetSpan(*args, **kwargs):
248ed943
RD
10406 """
10407 GetSpan(self) -> GBSpan
10408
10409 Get the row and column spanning of the item
10410 """
54f9ee45 10411 return _core_.GBSizerItem_GetSpan(*args, **kwargs)
e811c8ce
RD
10412
10413 def GetSpanTuple(self): return self.GetSpan().Get()
10414 def SetPos(*args, **kwargs):
248ed943
RD
10415 """
10416 SetPos(self, GBPosition pos) -> bool
10417
10418 If the item is already a member of a sizer then first ensure that
10419 there is no other item that would intersect with this one at the new
10420 position, then set the new position. Returns True if the change is
10421 successful and after the next Layout() the item will be moved.
10422 """
54f9ee45 10423 return _core_.GBSizerItem_SetPos(*args, **kwargs)
e811c8ce
RD
10424
10425 def SetSpan(*args, **kwargs):
248ed943
RD
10426 """
10427 SetSpan(self, GBSpan span) -> bool
10428
10429 If the item is already a member of a sizer then first ensure that
10430 there is no other item that would intersect with this one with its new
10431 spanning size, then set the new spanning. Returns True if the change
10432 is successful and after the next Layout() the item will be resized.
10433
10434 """
54f9ee45 10435 return _core_.GBSizerItem_SetSpan(*args, **kwargs)
e811c8ce 10436
248ed943 10437 def Intersects(*args, **kwargs):
0df68c9f 10438 """
a95a7133 10439 Intersects(self, GBSizerItem other) -> bool
248ed943
RD
10440
10441 Returns True if this item and the other item instersect.
0df68c9f 10442 """
248ed943
RD
10443 return _core_.GBSizerItem_Intersects(*args, **kwargs)
10444
10445 def IntersectsPos(*args, **kwargs):
10446 """
10447 IntersectsPos(self, GBPosition pos, GBSpan span) -> bool
10448
10449 Returns True if the given pos/span would intersect with this item.
10450 """
10451 return _core_.GBSizerItem_IntersectsPos(*args, **kwargs)
e811c8ce
RD
10452
10453 def GetEndPos(*args, **kwargs):
248ed943
RD
10454 """
10455 GetEndPos(self) -> GBPosition
10456
10457 Get the row and column of the endpoint of this item.
10458 """
54f9ee45 10459 return _core_.GBSizerItem_GetEndPos(*args, **kwargs)
e811c8ce
RD
10460
10461 def GetGBSizer(*args, **kwargs):
248ed943
RD
10462 """
10463 GetGBSizer(self) -> GridBagSizer
10464
10465 Get the sizer this item is a member of.
10466 """
54f9ee45 10467 return _core_.GBSizerItem_GetGBSizer(*args, **kwargs)
e811c8ce
RD
10468
10469 def SetGBSizer(*args, **kwargs):
248ed943
RD
10470 """
10471 SetGBSizer(self, GridBagSizer sizer)
10472
10473 Set the sizer this item is a member of.
10474 """
54f9ee45 10475 return _core_.GBSizerItem_SetGBSizer(*args, **kwargs)
e811c8ce 10476
d14a1e28
RD
10477
10478class GBSizerItemPtr(GBSizerItem):
10479 def __init__(self, this):
10480 self.this = this
10481 if not hasattr(self,"thisown"): self.thisown = 0
10482 self.__class__ = GBSizerItem
54f9ee45 10483_core_.GBSizerItem_swigregister(GBSizerItemPtr)
d14a1e28
RD
10484DefaultSpan = cvar.DefaultSpan
10485
10486def GBSizerItemWindow(*args, **kwargs):
0df68c9f
RD
10487 """
10488 GBSizerItemWindow(Window window, GBPosition pos, GBSpan span, int flag,
248ed943
RD
10489 int border, PyObject userData=None) -> GBSizerItem
10490
10491 Construct a `wx.GBSizerItem` for a window.
0df68c9f 10492 """
54f9ee45 10493 val = _core_.new_GBSizerItemWindow(*args, **kwargs)
d14a1e28
RD
10494 val.thisown = 1
10495 return val
10496
10497def GBSizerItemSizer(*args, **kwargs):
0df68c9f
RD
10498 """
10499 GBSizerItemSizer(Sizer sizer, GBPosition pos, GBSpan span, int flag,
248ed943
RD
10500 int border, PyObject userData=None) -> GBSizerItem
10501
10502 Construct a `wx.GBSizerItem` for a sizer
0df68c9f 10503 """
54f9ee45 10504 val = _core_.new_GBSizerItemSizer(*args, **kwargs)
d14a1e28
RD
10505 val.thisown = 1
10506 return val
10507
10508def GBSizerItemSpacer(*args, **kwargs):
0df68c9f
RD
10509 """
10510 GBSizerItemSpacer(int width, int height, GBPosition pos, GBSpan span,
248ed943
RD
10511 int flag, int border, PyObject userData=None) -> GBSizerItem
10512
10513 Construct a `wx.GBSizerItem` for a spacer.
0df68c9f 10514 """
54f9ee45 10515 val = _core_.new_GBSizerItemSpacer(*args, **kwargs)
d14a1e28
RD
10516 val.thisown = 1
10517 return val
10518
10519class GridBagSizer(FlexGridSizer):
248ed943
RD
10520 """
10521 A `wx.Sizer` that can lay out items in a virtual grid like a
10522 `wx.FlexGridSizer` but in this case explicit positioning of the items
10523 is allowed using `wx.GBPosition`, and items can optionally span more
10524 than one row and/or column using `wx.GBSpan`. The total size of the
10525 virtual grid is determined by the largest row and column that items are
10526 positioned at, adjusted for spanning.
10527
10528 """
e811c8ce
RD
10529 def __repr__(self):
10530 return "<%s.%s; proxy of C++ wxGridBagSizer instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 10531 def __init__(self, *args, **kwargs):
248ed943
RD
10532 """
10533 __init__(self, int vgap=0, int hgap=0) -> GridBagSizer
10534
10535 Constructor, with optional parameters to specify the gap between the
10536 rows and columns.
10537 """
54f9ee45 10538 newobj = _core_.new_GridBagSizer(*args, **kwargs)
d14a1e28
RD
10539 self.this = newobj.this
10540 self.thisown = 1
10541 del newobj.thisown
1823fbb4
RD
10542 self._setOORInfo(self)
10543
e811c8ce 10544 def Add(*args, **kwargs):
0df68c9f 10545 """
248ed943 10546 Add(self, item, GBPosition pos, GBSpan span=DefaultSpan, int flag=0,
d3b6e4ff 10547 int border=0, userData=None) -> wx.GBSizerItem
248ed943
RD
10548
10549 Adds an item to the sizer at the grid cell *pos*, optionally spanning
10550 more than one row or column as specified with *span*. The remaining
10551 args behave similarly to `wx.Sizer.Add`.
10552
10553 Returns True if the item was successfully placed at the given cell
10554 position, False if something was already there.
10555
0df68c9f 10556 """
54f9ee45 10557 return _core_.GridBagSizer_Add(*args, **kwargs)
e811c8ce
RD
10558
10559 def AddItem(*args, **kwargs):
248ed943 10560 """
d3b6e4ff 10561 Add(self, GBSizerItem item) -> wx.GBSizerItem
248ed943
RD
10562
10563 Add an item to the sizer using a `wx.GBSizerItem`. Returns True if
10564 the item was successfully placed at its given cell position, False if
10565 something was already there.
10566 """
54f9ee45 10567 return _core_.GridBagSizer_AddItem(*args, **kwargs)
e811c8ce 10568
84f85550
RD
10569 def GetCellSize(*args, **kwargs):
10570 """
10571 GetCellSize(self, int row, int col) -> Size
10572
10573 Get the size of the specified cell, including hgap and
10574 vgap. Only valid after a Layout.
10575 """
10576 return _core_.GridBagSizer_GetCellSize(*args, **kwargs)
10577
e811c8ce 10578 def GetEmptyCellSize(*args, **kwargs):
248ed943
RD
10579 """
10580 GetEmptyCellSize(self) -> Size
10581
10582 Get the size used for cells in the grid with no item.
10583 """
54f9ee45 10584 return _core_.GridBagSizer_GetEmptyCellSize(*args, **kwargs)
e811c8ce
RD
10585
10586 def SetEmptyCellSize(*args, **kwargs):
248ed943
RD
10587 """
10588 SetEmptyCellSize(self, Size sz)
10589
10590 Set the size used for cells in the grid with no item.
10591 """
54f9ee45 10592 return _core_.GridBagSizer_SetEmptyCellSize(*args, **kwargs)
e811c8ce
RD
10593
10594 def GetItemPosition(*args):
0df68c9f 10595 """
248ed943
RD
10596 GetItemPosition(self, item) -> GBPosition
10597
10598 Get the grid position of the specified *item* where *item* is either a
10599 window or subsizer that is a member of this sizer, or a zero-based
10600 index of an item.
0df68c9f 10601 """
54f9ee45 10602 return _core_.GridBagSizer_GetItemPosition(*args)
e811c8ce
RD
10603
10604 def SetItemPosition(*args):
0df68c9f 10605 """
248ed943
RD
10606 SetItemPosition(self, item, GBPosition pos) -> bool
10607
10608 Set the grid position of the specified *item* where *item* is either a
10609 window or subsizer that is a member of this sizer, or a zero-based
10610 index of an item. Returns True on success. If the move is not
10611 allowed (because an item is already there) then False is returned.
10612
0df68c9f 10613 """
54f9ee45 10614 return _core_.GridBagSizer_SetItemPosition(*args)
e811c8ce
RD
10615
10616 def GetItemSpan(*args):
0df68c9f 10617 """
248ed943
RD
10618 GetItemSpan(self, item) -> GBSpan
10619
10620 Get the row/col spanning of the specified *item* where *item* is
10621 either a window or subsizer that is a member of this sizer, or a
10622 zero-based index of an item.
0df68c9f 10623 """
54f9ee45 10624 return _core_.GridBagSizer_GetItemSpan(*args)
e811c8ce
RD
10625
10626 def SetItemSpan(*args):
0df68c9f 10627 """
248ed943
RD
10628 SetItemSpan(self, item, GBSpan span) -> bool
10629
10630 Set the row/col spanning of the specified *item* where *item* is
10631 either a window or subsizer that is a member of this sizer, or a
10632 zero-based index of an item. Returns True on success. If the move is
10633 not allowed (because an item is already there) then False is returned.
0df68c9f 10634 """
54f9ee45 10635 return _core_.GridBagSizer_SetItemSpan(*args)
e811c8ce
RD
10636
10637 def FindItem(*args):
0df68c9f 10638 """
248ed943
RD
10639 FindItem(self, item) -> GBSizerItem
10640
10641 Find the sizer item for the given window or subsizer, returns None if
10642 not found. (non-recursive)
0df68c9f 10643 """
54f9ee45 10644 return _core_.GridBagSizer_FindItem(*args)
e811c8ce
RD
10645
10646 def FindItemAtPosition(*args, **kwargs):
248ed943
RD
10647 """
10648 FindItemAtPosition(self, GBPosition pos) -> GBSizerItem
10649
10650 Return the sizer item for the given grid cell, or None if there is no
10651 item at that position. (non-recursive)
10652 """
54f9ee45 10653 return _core_.GridBagSizer_FindItemAtPosition(*args, **kwargs)
e811c8ce
RD
10654
10655 def FindItemAtPoint(*args, **kwargs):
248ed943
RD
10656 """
10657 FindItemAtPoint(self, Point pt) -> GBSizerItem
10658
10659 Return the sizer item located at the point given in *pt*, or None if
10660 there is no item at that point. The (x,y) coordinates in pt correspond
10661 to the client coordinates of the window using the sizer for
10662 layout. (non-recursive)
10663 """
54f9ee45 10664 return _core_.GridBagSizer_FindItemAtPoint(*args, **kwargs)
e811c8ce 10665
248ed943
RD
10666 def CheckForIntersection(*args, **kwargs):
10667 """
10668 CheckForIntersection(self, GBSizerItem item, GBSizerItem excludeItem=None) -> bool
e811c8ce 10669
248ed943
RD
10670 Look at all items and see if any intersect (or would overlap) the
10671 given *item*. Returns True if so, False if there would be no overlap.
10672 If an *excludeItem* is given then it will not be checked for
10673 intersection, for example it may be the item we are checking the
10674 position of.
e811c8ce 10675
248ed943
RD
10676 """
10677 return _core_.GridBagSizer_CheckForIntersection(*args, **kwargs)
e811c8ce 10678
248ed943 10679 def CheckForIntersectionPos(*args, **kwargs):
0df68c9f 10680 """
248ed943
RD
10681 CheckForIntersectionPos(self, GBPosition pos, GBSpan span, GBSizerItem excludeItem=None) -> bool
10682
10683 Look at all items and see if any intersect (or would overlap) the
10684 given position and span. Returns True if so, False if there would be
10685 no overlap. If an *excludeItem* is given then it will not be checked
10686 for intersection, for example it may be the item we are checking the
10687 position of.
0df68c9f 10688 """
248ed943 10689 return _core_.GridBagSizer_CheckForIntersectionPos(*args, **kwargs)
e811c8ce 10690
d14a1e28
RD
10691
10692class GridBagSizerPtr(GridBagSizer):
10693 def __init__(self, this):
10694 self.this = this
10695 if not hasattr(self,"thisown"): self.thisown = 0
10696 self.__class__ = GridBagSizer
54f9ee45 10697_core_.GridBagSizer_swigregister(GridBagSizerPtr)
d14a1e28
RD
10698
10699#---------------------------------------------------------------------------
10700
54f9ee45
RD
10701Left = _core_.Left
10702Top = _core_.Top
10703Right = _core_.Right
10704Bottom = _core_.Bottom
10705Width = _core_.Width
10706Height = _core_.Height
10707Centre = _core_.Centre
10708Center = _core_.Center
10709CentreX = _core_.CentreX
10710CentreY = _core_.CentreY
10711Unconstrained = _core_.Unconstrained
10712AsIs = _core_.AsIs
10713PercentOf = _core_.PercentOf
10714Above = _core_.Above
10715Below = _core_.Below
10716LeftOf = _core_.LeftOf
10717RightOf = _core_.RightOf
10718SameAs = _core_.SameAs
10719Absolute = _core_.Absolute
d14a1e28 10720class IndividualLayoutConstraint(Object):
15afbcd0 10721 """
41e2b43e
RD
10722 Objects of this class are stored in the `wx.LayoutConstraints` class as
10723 one of eight possible constraints that a window can be involved in.
10724 You will never need to create an instance of
10725 wx.IndividualLayoutConstraint, rather you should create a
10726 `wx.LayoutConstraints` instance and use the individual contstraints
15afbcd0 10727 that it contains.
15afbcd0 10728 """
d14a1e28
RD
10729 def __init__(self): raise RuntimeError, "No constructor defined"
10730 def __repr__(self):
10731 return "<%s.%s; proxy of C++ wxIndividualLayoutConstraint instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
e811c8ce 10732 def Set(*args, **kwargs):
41e2b43e
RD
10733 """
10734 Set(self, int rel, Window otherW, int otherE, int val=0, int marg=wxLAYOUT_DEFAULT_MARGIN)
10735
10736 Sets the properties of the constraint. Normally called by one of the
10737 convenience functions such as Above, RightOf, SameAs.
10738 """
54f9ee45 10739 return _core_.IndividualLayoutConstraint_Set(*args, **kwargs)
e811c8ce
RD
10740
10741 def LeftOf(*args, **kwargs):
15afbcd0 10742 """
a95a7133 10743 LeftOf(self, Window sibling, int marg=0)
15afbcd0 10744
41e2b43e
RD
10745 Constrains this edge to be to the left of the given window, with an
10746 optional margin. Implicitly, this is relative to the left edge of the
10747 other window.
15afbcd0 10748 """
54f9ee45 10749 return _core_.IndividualLayoutConstraint_LeftOf(*args, **kwargs)
e811c8ce
RD
10750
10751 def RightOf(*args, **kwargs):
15afbcd0 10752 """
a95a7133 10753 RightOf(self, Window sibling, int marg=0)
15afbcd0 10754
41e2b43e
RD
10755 Constrains this edge to be to the right of the given window, with an
10756 optional margin. Implicitly, this is relative to the right edge of the
10757 other window.
15afbcd0 10758 """
54f9ee45 10759 return _core_.IndividualLayoutConstraint_RightOf(*args, **kwargs)
e811c8ce
RD
10760
10761 def Above(*args, **kwargs):
15afbcd0 10762 """
a95a7133 10763 Above(self, Window sibling, int marg=0)
15afbcd0 10764
41e2b43e
RD
10765 Constrains this edge to be above the given window, with an optional
10766 margin. Implicitly, this is relative to the top edge of the other
10767 window.
15afbcd0 10768 """
54f9ee45 10769 return _core_.IndividualLayoutConstraint_Above(*args, **kwargs)
e811c8ce
RD
10770
10771 def Below(*args, **kwargs):
15afbcd0 10772 """
a95a7133 10773 Below(self, Window sibling, int marg=0)
15afbcd0 10774
41e2b43e
RD
10775 Constrains this edge to be below the given window, with an optional
10776 margin. Implicitly, this is relative to the bottom edge of the other
10777 window.
15afbcd0 10778 """
54f9ee45 10779 return _core_.IndividualLayoutConstraint_Below(*args, **kwargs)
e811c8ce
RD
10780
10781 def SameAs(*args, **kwargs):
15afbcd0 10782 """
a95a7133 10783 SameAs(self, Window otherW, int edge, int marg=0)
15afbcd0 10784
41e2b43e
RD
10785 Constrains this edge or dimension to be to the same as the edge of the
10786 given window, with an optional margin.
15afbcd0 10787 """
54f9ee45 10788 return _core_.IndividualLayoutConstraint_SameAs(*args, **kwargs)
e811c8ce
RD
10789
10790 def PercentOf(*args, **kwargs):
15afbcd0 10791 """
a95a7133 10792 PercentOf(self, Window otherW, int wh, int per)
15afbcd0 10793
41e2b43e
RD
10794 Constrains this edge or dimension to be to a percentage of the given
10795 window, with an optional margin.
15afbcd0 10796 """
54f9ee45 10797 return _core_.IndividualLayoutConstraint_PercentOf(*args, **kwargs)
e811c8ce
RD
10798
10799 def Absolute(*args, **kwargs):
15afbcd0 10800 """
a95a7133 10801 Absolute(self, int val)
15afbcd0 10802
41e2b43e 10803 Constrains this edge or dimension to be the given absolute value.
15afbcd0 10804 """
54f9ee45 10805 return _core_.IndividualLayoutConstraint_Absolute(*args, **kwargs)
e811c8ce
RD
10806
10807 def Unconstrained(*args, **kwargs):
15afbcd0 10808 """
a95a7133 10809 Unconstrained(self)
15afbcd0 10810
41e2b43e
RD
10811 Sets this edge or dimension to be unconstrained, that is, dependent on
10812 other edges and dimensions from which this value can be deduced.
15afbcd0 10813 """
54f9ee45 10814 return _core_.IndividualLayoutConstraint_Unconstrained(*args, **kwargs)
e811c8ce
RD
10815
10816 def AsIs(*args, **kwargs):
15afbcd0 10817 """
a95a7133 10818 AsIs(self)
15afbcd0 10819
41e2b43e
RD
10820 Sets this edge or constraint to be whatever the window's value is at
10821 the moment. If either of the width and height constraints are *as is*,
10822 the window will not be resized, but moved instead. This is important
10823 when considering panel items which are intended to have a default
10824 size, such as a button, which may take its size from the size of the
10825 button label.
15afbcd0 10826 """
54f9ee45 10827 return _core_.IndividualLayoutConstraint_AsIs(*args, **kwargs)
e811c8ce
RD
10828
10829 def GetOtherWindow(*args, **kwargs):
a95a7133 10830 """GetOtherWindow(self) -> Window"""
54f9ee45 10831 return _core_.IndividualLayoutConstraint_GetOtherWindow(*args, **kwargs)
e811c8ce
RD
10832
10833 def GetMyEdge(*args, **kwargs):
a95a7133 10834 """GetMyEdge(self) -> int"""
54f9ee45 10835 return _core_.IndividualLayoutConstraint_GetMyEdge(*args, **kwargs)
e811c8ce
RD
10836
10837 def SetEdge(*args, **kwargs):
a95a7133 10838 """SetEdge(self, int which)"""
54f9ee45 10839 return _core_.IndividualLayoutConstraint_SetEdge(*args, **kwargs)
e811c8ce
RD
10840
10841 def SetValue(*args, **kwargs):
a95a7133 10842 """SetValue(self, int v)"""
54f9ee45 10843 return _core_.IndividualLayoutConstraint_SetValue(*args, **kwargs)
e811c8ce
RD
10844
10845 def GetMargin(*args, **kwargs):
a95a7133 10846 """GetMargin(self) -> int"""
54f9ee45 10847 return _core_.IndividualLayoutConstraint_GetMargin(*args, **kwargs)
e811c8ce
RD
10848
10849 def SetMargin(*args, **kwargs):
a95a7133 10850 """SetMargin(self, int m)"""
54f9ee45 10851 return _core_.IndividualLayoutConstraint_SetMargin(*args, **kwargs)
e811c8ce
RD
10852
10853 def GetValue(*args, **kwargs):
a95a7133 10854 """GetValue(self) -> int"""
54f9ee45 10855 return _core_.IndividualLayoutConstraint_GetValue(*args, **kwargs)
e811c8ce
RD
10856
10857 def GetPercent(*args, **kwargs):
a95a7133 10858 """GetPercent(self) -> int"""
54f9ee45 10859 return _core_.IndividualLayoutConstraint_GetPercent(*args, **kwargs)
e811c8ce
RD
10860
10861 def GetOtherEdge(*args, **kwargs):
a95a7133 10862 """GetOtherEdge(self) -> int"""
54f9ee45 10863 return _core_.IndividualLayoutConstraint_GetOtherEdge(*args, **kwargs)
e811c8ce
RD
10864
10865 def GetDone(*args, **kwargs):
a95a7133 10866 """GetDone(self) -> bool"""
54f9ee45 10867 return _core_.IndividualLayoutConstraint_GetDone(*args, **kwargs)
e811c8ce
RD
10868
10869 def SetDone(*args, **kwargs):
a95a7133 10870 """SetDone(self, bool d)"""
54f9ee45 10871 return _core_.IndividualLayoutConstraint_SetDone(*args, **kwargs)
e811c8ce
RD
10872
10873 def GetRelationship(*args, **kwargs):
a95a7133 10874 """GetRelationship(self) -> int"""
54f9ee45 10875 return _core_.IndividualLayoutConstraint_GetRelationship(*args, **kwargs)
e811c8ce
RD
10876
10877 def SetRelationship(*args, **kwargs):
a95a7133 10878 """SetRelationship(self, int r)"""
54f9ee45 10879 return _core_.IndividualLayoutConstraint_SetRelationship(*args, **kwargs)
e811c8ce
RD
10880
10881 def ResetIfWin(*args, **kwargs):
15afbcd0 10882 """
a95a7133 10883 ResetIfWin(self, Window otherW) -> bool
15afbcd0
RD
10884
10885 Reset constraint if it mentions otherWin
10886 """
54f9ee45 10887 return _core_.IndividualLayoutConstraint_ResetIfWin(*args, **kwargs)
e811c8ce
RD
10888
10889 def SatisfyConstraint(*args, **kwargs):
15afbcd0 10890 """
a95a7133 10891 SatisfyConstraint(self, LayoutConstraints constraints, Window win) -> bool
15afbcd0
RD
10892
10893 Try to satisfy constraint
10894 """
54f9ee45 10895 return _core_.IndividualLayoutConstraint_SatisfyConstraint(*args, **kwargs)
e811c8ce
RD
10896
10897 def GetEdge(*args, **kwargs):
15afbcd0 10898 """
a95a7133 10899 GetEdge(self, int which, Window thisWin, Window other) -> int
15afbcd0
RD
10900
10901 Get the value of this edge or dimension, or if this
10902 is not determinable, -1.
10903 """
54f9ee45 10904 return _core_.IndividualLayoutConstraint_GetEdge(*args, **kwargs)
e811c8ce 10905
d14a1e28
RD
10906
10907class IndividualLayoutConstraintPtr(IndividualLayoutConstraint):
10908 def __init__(self, this):
10909 self.this = this
10910 if not hasattr(self,"thisown"): self.thisown = 0
10911 self.__class__ = IndividualLayoutConstraint
54f9ee45 10912_core_.IndividualLayoutConstraint_swigregister(IndividualLayoutConstraintPtr)
d14a1e28
RD
10913
10914class LayoutConstraints(Object):
15afbcd0 10915 """
41e2b43e
RD
10916 **Note:** constraints are now deprecated and you should use sizers
10917 instead.
15afbcd0 10918
41e2b43e
RD
10919 Objects of this class can be associated with a window to define its
10920 layout constraints, with respect to siblings or its parent.
15afbcd0
RD
10921
10922 The class consists of the following eight constraints of class
10923 wx.IndividualLayoutConstraint, some or all of which should be accessed
10924 directly to set the appropriate constraints.
10925
10926 * left: represents the left hand edge of the window
10927 * right: represents the right hand edge of the window
10928 * top: represents the top edge of the window
10929 * bottom: represents the bottom edge of the window
10930 * width: represents the width of the window
10931 * height: represents the height of the window
10932 * centreX: represents the horizontal centre point of the window
10933 * centreY: represents the vertical centre point of the window
10934
41e2b43e
RD
10935 Most constraints are initially set to have the relationship
10936 wxUnconstrained, which means that their values should be calculated by
10937 looking at known constraints. The exceptions are width and height,
10938 which are set to wxAsIs to ensure that if the user does not specify a
10939 constraint, the existing width and height will be used, to be
10940 compatible with panel items which often have take a default size. If
10941 the constraint is ``wx.AsIs``, the dimension will not be changed.
10942
10943 :see: `wx.IndividualLayoutConstraint`, `wx.Window.SetConstraints`
15afbcd0
RD
10944
10945 """
e811c8ce
RD
10946 def __repr__(self):
10947 return "<%s.%s; proxy of C++ wxLayoutConstraints instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
54f9ee45
RD
10948 left = property(_core_.LayoutConstraints_left_get)
10949 top = property(_core_.LayoutConstraints_top_get)
10950 right = property(_core_.LayoutConstraints_right_get)
10951 bottom = property(_core_.LayoutConstraints_bottom_get)
10952 width = property(_core_.LayoutConstraints_width_get)
10953 height = property(_core_.LayoutConstraints_height_get)
10954 centreX = property(_core_.LayoutConstraints_centreX_get)
10955 centreY = property(_core_.LayoutConstraints_centreY_get)
d14a1e28 10956 def __init__(self, *args, **kwargs):
a95a7133 10957 """__init__(self) -> LayoutConstraints"""
54f9ee45 10958 newobj = _core_.new_LayoutConstraints(*args, **kwargs)
d14a1e28
RD
10959 self.this = newobj.this
10960 self.thisown = 1
10961 del newobj.thisown
e811c8ce 10962 def SatisfyConstraints(*args, **kwargs):
6c3b4aae 10963 """SatisfyConstraints(Window win) -> (areSatisfied, noChanges)"""
54f9ee45 10964 return _core_.LayoutConstraints_SatisfyConstraints(*args, **kwargs)
e811c8ce
RD
10965
10966 def AreSatisfied(*args, **kwargs):
a95a7133 10967 """AreSatisfied(self) -> bool"""
54f9ee45 10968 return _core_.LayoutConstraints_AreSatisfied(*args, **kwargs)
e811c8ce 10969
d14a1e28
RD
10970
10971class LayoutConstraintsPtr(LayoutConstraints):
10972 def __init__(self, this):
10973 self.this = this
10974 if not hasattr(self,"thisown"): self.thisown = 0
10975 self.__class__ = LayoutConstraints
54f9ee45 10976_core_.LayoutConstraints_swigregister(LayoutConstraintsPtr)
d14a1e28
RD
10977
10978#----------------------------------------------------------------------------
10979
322913ce 10980# Use Python's bool constants if available, make some if not
d14a1e28
RD
10981try:
10982 True
10983except NameError:
322913ce
RD
10984 __builtins__.True = 1==1
10985 __builtins__.False = 1==0
4f89f6a3
RD
10986 def bool(value): return not not value
10987 __builtins__.bool = bool
d14a1e28 10988
d14a1e28
RD
10989
10990
10991# workarounds for bad wxRTTI names
10992__wxPyPtrTypeMap['wxGauge95'] = 'wxGauge'
10993__wxPyPtrTypeMap['wxSlider95'] = 'wxSlider'
10994__wxPyPtrTypeMap['wxStatusBar95'] = 'wxStatusBar'
10995
10996
10997#----------------------------------------------------------------------------
10998# Load version numbers from __version__... Ensure that major and minor
7bc1e663 10999# versions are the same for both wxPython and wxWidgets.
d14a1e28
RD
11000
11001from __version__ import *
11002__version__ = VERSION_STRING
11003
7bc1e663
RD
11004assert MAJOR_VERSION == _core_.MAJOR_VERSION, "wxPython/wxWidgets version mismatch"
11005assert MINOR_VERSION == _core_.MINOR_VERSION, "wxPython/wxWidgets version mismatch"
54f9ee45 11006if RELEASE_VERSION != _core_.RELEASE_VERSION:
d14a1e28 11007 import warnings
7bc1e663 11008 warnings.warn("wxPython/wxWidgets release number mismatch")
d14a1e28
RD
11009
11010#----------------------------------------------------------------------------
11011
e505d15e
RD
11012# Set the default string<-->unicode conversion encoding from the
11013# locale. This encoding is used when string or unicode objects need
11014# to be converted in order to pass them to wxWidgets. Please be aware
11015# that the default encoding within the same locale may be slightly
11016# different on different platforms. For example, please see
11017# http://www.alanwood.net/demos/charsetdiffs.html for differences
11018# between the common latin/roman encodings.
5cbf236d
RD
11019import locale
11020default = locale.getdefaultlocale()[1]
11021if default:
11022 wx.SetDefaultPyEncoding(default)
11023del default
11024del locale
11025
11026#----------------------------------------------------------------------------
11027
d14a1e28
RD
11028class PyDeadObjectError(AttributeError):
11029 pass
11030
d14a1e28
RD
11031class _wxPyDeadObject(object):
11032 """
11033 Instances of wx objects that are OOR capable will have their __class__
11034 changed to this class when the C++ object is deleted. This should help
11035 prevent crashes due to referencing a bogus C++ pointer.
11036 """
11037 reprStr = "wxPython wrapper for DELETED %s object! (The C++ object no longer exists.)"
11038 attrStr = "The C++ part of the %s object has been deleted, attribute access no longer allowed."
11039
3a04f143 11040 def __repr__(self):
d14a1e28
RD
11041 if not hasattr(self, "_name"):
11042 self._name = "[unknown]"
11043 return self.reprStr % self._name
11044
3a04f143 11045 def __getattr__(self, *args):
d14a1e28
RD
11046 if not hasattr(self, "_name"):
11047 self._name = "[unknown]"
3a04f143
RD
11048 raise PyDeadObjectError(self.attrStr % self._name)
11049
11050 def __nonzero__(self):
11051 return 0
11052
11053
11054
11055class PyUnbornObjectError(AttributeError):
11056 pass
11057
11058class _wxPyUnbornObject(object):
11059 """
54f9ee45 11060 Some stock objects are created when the wx._core module is
3a04f143
RD
11061 imported, but their C++ instance is not created until the wx.App
11062 object is created and initialized. These object instances will
11063 temporarily have their __class__ changed to this class so an
11064 exception will be raised if they are used before the C++ instance
11065 is ready.
11066 """
11067
11068 reprStr = "wxPython wrapper for UNBORN object! (The C++ object is not initialized yet.)"
11069 attrStr = "The C++ part of this object has not been initialized, attribute access not allowed."
11070
11071 def __repr__(self):
11072 #if not hasattr(self, "_name"):
11073 # self._name = "[unknown]"
11074 return self.reprStr #% self._name
11075
11076 def __getattr__(self, *args):
11077 #if not hasattr(self, "_name"):
11078 # self._name = "[unknown]"
11079 raise PyUnbornObjectError(self.attrStr) # % self._name )
d14a1e28
RD
11080
11081 def __nonzero__(self):
11082 return 0
11083
11084
11085#----------------------------------------------------------------------------
d14a1e28
RD
11086
11087def CallAfter(callable, *args, **kw):
11088 """
11089 Call the specified function after the current and pending event
11090 handlers have been completed. This is also good for making GUI
61863841
RD
11091 method calls from non-GUI threads. Any extra positional or
11092 keyword args are passed on to the callable when it is called.
11093
11094 :see: `wx.FutureCall`
d14a1e28
RD
11095 """
11096 app = wx.GetApp()
dfbb5885 11097 assert app is not None, 'No wx.App created yet'
d14a1e28 11098
148275d3
RD
11099 if not hasattr(app, "_CallAfterId"):
11100 app._CallAfterId = wx.NewEventType()
11101 app.Connect(-1, -1, app._CallAfterId,
11102 lambda event: event.callable(*event.args, **event.kw) )
d14a1e28 11103 evt = wx.PyEvent()
148275d3 11104 evt.SetEventType(app._CallAfterId)
d14a1e28
RD
11105 evt.callable = callable
11106 evt.args = args
11107 evt.kw = kw
11108 wx.PostEvent(app, evt)
11109
d14a1e28
RD
11110#----------------------------------------------------------------------------
11111
11112
11113class FutureCall:
11114 """
8ac8dba0 11115 A convenience class for `wx.Timer`, that calls the given callable
d14a1e28
RD
11116 object once after the given amount of milliseconds, passing any
11117 positional or keyword args. The return value of the callable is
61863841 11118 availbale after it has been run with the `GetResult` method.
d14a1e28
RD
11119
11120 If you don't need to get the return value or restart the timer
11121 then there is no need to hold a reference to this object. It will
11122 hold a reference to itself while the timer is running (the timer
11123 has a reference to self.Notify) but the cycle will be broken when
11124 the timer completes, automatically cleaning up the wx.FutureCall
11125 object.
61863841
RD
11126
11127 :see: `wx.CallAfter`
d14a1e28
RD
11128 """
11129 def __init__(self, millis, callable, *args, **kwargs):
11130 self.millis = millis
11131 self.callable = callable
11132 self.SetArgs(*args, **kwargs)
11133 self.runCount = 0
4276dc52 11134 self.running = False
d14a1e28
RD
11135 self.hasRun = False
11136 self.result = None
11137 self.timer = None
11138 self.Start()
11139
11140 def __del__(self):
11141 self.Stop()
11142
11143
11144 def Start(self, millis=None, *args, **kwargs):
11145 """
11146 (Re)start the timer
11147 """
11148 self.hasRun = False
11149 if millis is not None:
11150 self.millis = millis
11151 if args or kwargs:
11152 self.SetArgs(*args, **kwargs)
11153 self.Stop()
11154 self.timer = wx.PyTimer(self.Notify)
11155 self.timer.Start(self.millis, wx.TIMER_ONE_SHOT)
4276dc52 11156 self.running = True
d14a1e28
RD
11157 Restart = Start
11158
11159
11160 def Stop(self):
11161 """
11162 Stop and destroy the timer.
11163 """
11164 if self.timer is not None:
11165 self.timer.Stop()
11166 self.timer = None
11167
11168
11169 def GetInterval(self):
11170 if self.timer is not None:
11171 return self.timer.GetInterval()
11172 else:
11173 return 0
11174
11175
11176 def IsRunning(self):
11177 return self.timer is not None and self.timer.IsRunning()
11178
11179
11180 def SetArgs(self, *args, **kwargs):
11181 """
11182 (Re)set the args passed to the callable object. This is
11183 useful in conjunction with Restart if you want to schedule a
11184 new call to the same callable object but with different
11185 parameters.
11186 """
11187 self.args = args
11188 self.kwargs = kwargs
11189
11190
11191 def HasRun(self):
11192 return self.hasRun
11193
11194 def GetResult(self):
11195 return self.result
11196
11197 def Notify(self):
11198 """
11199 The timer has expired so call the callable.
11200 """
11201 if self.callable and getattr(self.callable, 'im_self', True):
11202 self.runCount += 1
4276dc52 11203 self.running = False
d14a1e28
RD
11204 self.result = self.callable(*self.args, **self.kwargs)
11205 self.hasRun = True
4276dc52
RD
11206 if not self.running:
11207 # if it wasn't restarted, then cleanup
11208 wx.CallAfter(self.Stop)
d14a1e28
RD
11209
11210
a95a7133
RD
11211
11212#----------------------------------------------------------------------------
11213# Control which items in this module should be documented by epydoc.
11214# We allow only classes and functions, which will help reduce the size
11215# of the docs by filtering out the zillions of constants, EVT objects,
11216# and etc that don't make much sense by themselves, but are instead
11217# documented (or will be) as part of the classes/functions/methods
11218# where they should be used.
11219
66c033b4
RD
11220class __DocFilter:
11221 """
11222 A filter for epydoc that only allows non-Ptr classes and
11223 fucntions, in order to reduce the clutter in the API docs.
11224 """
11225 def __init__(self, globals):
11226 self._globals = globals
11227
11228 def __call__(self, name):
11229 import types
11230 obj = self._globals.get(name, None)
11231 if type(obj) not in [type, types.ClassType, types.FunctionType, types.BuiltinFunctionType]:
11232 return False
11233 if name.startswith('_') or name.endswith('Ptr') or name.startswith('EVT'):
11234 return False
11235 return True
a95a7133 11236
d14a1e28
RD
11237#----------------------------------------------------------------------------
11238#----------------------------------------------------------------------------
11239
11240# Import other modules in this package that should show up in the
11241# "core" wx namespace
54f9ee45
RD
11242from _gdi import *
11243from _windows import *
11244from _controls import *
11245from _misc import *
d14a1e28 11246
3a04f143
RD
11247
11248# Fixup the stock objects since they can't be used yet. (They will be
11249# restored in wx.PyApp.OnInit.)
54f9ee45 11250_core_._wxPyFixStockObjects()
3a04f143 11251
d14a1e28
RD
11252#----------------------------------------------------------------------------
11253#----------------------------------------------------------------------------
11254
11255