]> git.saurik.com Git - wxWidgets.git/blame - wxPython/src/gtk/_core.py
added a test to check how exception handling works with Win32 SEH; corrected copyright
[wxWidgets.git] / wxPython / src / gtk / _core.py
CommitLineData
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
124RB_GROUP = _core_.RB_GROUP
125RB_SINGLE = _core_.RB_SINGLE
126SL_HORIZONTAL = _core_.SL_HORIZONTAL
127SL_VERTICAL = _core_.SL_VERTICAL
128SL_AUTOTICKS = _core_.SL_AUTOTICKS
129SL_LABELS = _core_.SL_LABELS
130SL_LEFT = _core_.SL_LEFT
131SL_TOP = _core_.SL_TOP
132SL_RIGHT = _core_.SL_RIGHT
133SL_BOTTOM = _core_.SL_BOTTOM
134SL_BOTH = _core_.SL_BOTH
135SL_SELRANGE = _core_.SL_SELRANGE
136SB_HORIZONTAL = _core_.SB_HORIZONTAL
137SB_VERTICAL = _core_.SB_VERTICAL
138ST_SIZEGRIP = _core_.ST_SIZEGRIP
139ST_NO_AUTORESIZE = _core_.ST_NO_AUTORESIZE
140FLOOD_SURFACE = _core_.FLOOD_SURFACE
141FLOOD_BORDER = _core_.FLOOD_BORDER
142ODDEVEN_RULE = _core_.ODDEVEN_RULE
143WINDING_RULE = _core_.WINDING_RULE
144TOOL_TOP = _core_.TOOL_TOP
145TOOL_BOTTOM = _core_.TOOL_BOTTOM
146TOOL_LEFT = _core_.TOOL_LEFT
147TOOL_RIGHT = _core_.TOOL_RIGHT
148OK = _core_.OK
149YES_NO = _core_.YES_NO
150CANCEL = _core_.CANCEL
151YES = _core_.YES
152NO = _core_.NO
153NO_DEFAULT = _core_.NO_DEFAULT
154YES_DEFAULT = _core_.YES_DEFAULT
155ICON_EXCLAMATION = _core_.ICON_EXCLAMATION
156ICON_HAND = _core_.ICON_HAND
157ICON_QUESTION = _core_.ICON_QUESTION
158ICON_INFORMATION = _core_.ICON_INFORMATION
159ICON_STOP = _core_.ICON_STOP
160ICON_ASTERISK = _core_.ICON_ASTERISK
161ICON_MASK = _core_.ICON_MASK
162ICON_WARNING = _core_.ICON_WARNING
163ICON_ERROR = _core_.ICON_ERROR
164FORWARD = _core_.FORWARD
165BACKWARD = _core_.BACKWARD
166RESET = _core_.RESET
167HELP = _core_.HELP
168MORE = _core_.MORE
169SETUP = _core_.SETUP
170SIZE_AUTO_WIDTH = _core_.SIZE_AUTO_WIDTH
171SIZE_AUTO_HEIGHT = _core_.SIZE_AUTO_HEIGHT
172SIZE_AUTO = _core_.SIZE_AUTO
173SIZE_USE_EXISTING = _core_.SIZE_USE_EXISTING
174SIZE_ALLOW_MINUS_ONE = _core_.SIZE_ALLOW_MINUS_ONE
175PORTRAIT = _core_.PORTRAIT
176LANDSCAPE = _core_.LANDSCAPE
177PRINT_QUALITY_HIGH = _core_.PRINT_QUALITY_HIGH
178PRINT_QUALITY_MEDIUM = _core_.PRINT_QUALITY_MEDIUM
179PRINT_QUALITY_LOW = _core_.PRINT_QUALITY_LOW
180PRINT_QUALITY_DRAFT = _core_.PRINT_QUALITY_DRAFT
181ID_ANY = _core_.ID_ANY
182ID_SEPARATOR = _core_.ID_SEPARATOR
183ID_LOWEST = _core_.ID_LOWEST
184ID_OPEN = _core_.ID_OPEN
185ID_CLOSE = _core_.ID_CLOSE
186ID_NEW = _core_.ID_NEW
187ID_SAVE = _core_.ID_SAVE
188ID_SAVEAS = _core_.ID_SAVEAS
189ID_REVERT = _core_.ID_REVERT
190ID_EXIT = _core_.ID_EXIT
191ID_UNDO = _core_.ID_UNDO
192ID_REDO = _core_.ID_REDO
193ID_HELP = _core_.ID_HELP
194ID_PRINT = _core_.ID_PRINT
195ID_PRINT_SETUP = _core_.ID_PRINT_SETUP
196ID_PREVIEW = _core_.ID_PREVIEW
197ID_ABOUT = _core_.ID_ABOUT
198ID_HELP_CONTENTS = _core_.ID_HELP_CONTENTS
199ID_HELP_COMMANDS = _core_.ID_HELP_COMMANDS
200ID_HELP_PROCEDURES = _core_.ID_HELP_PROCEDURES
201ID_HELP_CONTEXT = _core_.ID_HELP_CONTEXT
202ID_CLOSE_ALL = _core_.ID_CLOSE_ALL
203ID_PREFERENCES = _core_.ID_PREFERENCES
204ID_CUT = _core_.ID_CUT
205ID_COPY = _core_.ID_COPY
206ID_PASTE = _core_.ID_PASTE
207ID_CLEAR = _core_.ID_CLEAR
208ID_FIND = _core_.ID_FIND
209ID_DUPLICATE = _core_.ID_DUPLICATE
210ID_SELECTALL = _core_.ID_SELECTALL
211ID_DELETE = _core_.ID_DELETE
212ID_REPLACE = _core_.ID_REPLACE
213ID_REPLACE_ALL = _core_.ID_REPLACE_ALL
214ID_PROPERTIES = _core_.ID_PROPERTIES
215ID_VIEW_DETAILS = _core_.ID_VIEW_DETAILS
216ID_VIEW_LARGEICONS = _core_.ID_VIEW_LARGEICONS
217ID_VIEW_SMALLICONS = _core_.ID_VIEW_SMALLICONS
218ID_VIEW_LIST = _core_.ID_VIEW_LIST
219ID_VIEW_SORTDATE = _core_.ID_VIEW_SORTDATE
220ID_VIEW_SORTNAME = _core_.ID_VIEW_SORTNAME
221ID_VIEW_SORTSIZE = _core_.ID_VIEW_SORTSIZE
222ID_VIEW_SORTTYPE = _core_.ID_VIEW_SORTTYPE
223ID_FILE1 = _core_.ID_FILE1
224ID_FILE2 = _core_.ID_FILE2
225ID_FILE3 = _core_.ID_FILE3
226ID_FILE4 = _core_.ID_FILE4
227ID_FILE5 = _core_.ID_FILE5
228ID_FILE6 = _core_.ID_FILE6
229ID_FILE7 = _core_.ID_FILE7
230ID_FILE8 = _core_.ID_FILE8
231ID_FILE9 = _core_.ID_FILE9
232ID_OK = _core_.ID_OK
233ID_CANCEL = _core_.ID_CANCEL
234ID_APPLY = _core_.ID_APPLY
235ID_YES = _core_.ID_YES
236ID_NO = _core_.ID_NO
237ID_STATIC = _core_.ID_STATIC
238ID_FORWARD = _core_.ID_FORWARD
239ID_BACKWARD = _core_.ID_BACKWARD
240ID_DEFAULT = _core_.ID_DEFAULT
241ID_MORE = _core_.ID_MORE
242ID_SETUP = _core_.ID_SETUP
243ID_RESET = _core_.ID_RESET
244ID_CONTEXT_HELP = _core_.ID_CONTEXT_HELP
245ID_YESTOALL = _core_.ID_YESTOALL
246ID_NOTOALL = _core_.ID_NOTOALL
247ID_ABORT = _core_.ID_ABORT
248ID_RETRY = _core_.ID_RETRY
249ID_IGNORE = _core_.ID_IGNORE
7bc1e663
RD
250ID_ADD = _core_.ID_ADD
251ID_REMOVE = _core_.ID_REMOVE
252ID_UP = _core_.ID_UP
253ID_DOWN = _core_.ID_DOWN
254ID_HOME = _core_.ID_HOME
255ID_REFRESH = _core_.ID_REFRESH
256ID_STOP = _core_.ID_STOP
257ID_INDEX = _core_.ID_INDEX
258ID_BOLD = _core_.ID_BOLD
259ID_ITALIC = _core_.ID_ITALIC
260ID_JUSTIFY_CENTER = _core_.ID_JUSTIFY_CENTER
261ID_JUSTIFY_FILL = _core_.ID_JUSTIFY_FILL
262ID_JUSTIFY_RIGHT = _core_.ID_JUSTIFY_RIGHT
263ID_JUSTIFY_LEFT = _core_.ID_JUSTIFY_LEFT
264ID_UNDERLINE = _core_.ID_UNDERLINE
265ID_INDENT = _core_.ID_INDENT
266ID_UNINDENT = _core_.ID_UNINDENT
267ID_ZOOM_100 = _core_.ID_ZOOM_100
268ID_ZOOM_FIT = _core_.ID_ZOOM_FIT
269ID_ZOOM_IN = _core_.ID_ZOOM_IN
270ID_ZOOM_OUT = _core_.ID_ZOOM_OUT
271ID_UNDELETE = _core_.ID_UNDELETE
272ID_REVERT_TO_SAVED = _core_.ID_REVERT_TO_SAVED
54f9ee45
RD
273ID_HIGHEST = _core_.ID_HIGHEST
274OPEN = _core_.OPEN
275SAVE = _core_.SAVE
276HIDE_READONLY = _core_.HIDE_READONLY
277OVERWRITE_PROMPT = _core_.OVERWRITE_PROMPT
278FILE_MUST_EXIST = _core_.FILE_MUST_EXIST
279MULTIPLE = _core_.MULTIPLE
280CHANGE_DIR = _core_.CHANGE_DIR
281ACCEL_ALT = _core_.ACCEL_ALT
282ACCEL_CTRL = _core_.ACCEL_CTRL
283ACCEL_SHIFT = _core_.ACCEL_SHIFT
284ACCEL_NORMAL = _core_.ACCEL_NORMAL
285PD_AUTO_HIDE = _core_.PD_AUTO_HIDE
286PD_APP_MODAL = _core_.PD_APP_MODAL
287PD_CAN_ABORT = _core_.PD_CAN_ABORT
288PD_ELAPSED_TIME = _core_.PD_ELAPSED_TIME
289PD_ESTIMATED_TIME = _core_.PD_ESTIMATED_TIME
290PD_REMAINING_TIME = _core_.PD_REMAINING_TIME
e505d15e
RD
291PD_SMOOTH = _core_.PD_SMOOTH
292PD_CAN_SKIP = _core_.PD_CAN_SKIP
54f9ee45
RD
293DD_NEW_DIR_BUTTON = _core_.DD_NEW_DIR_BUTTON
294DD_DEFAULT_STYLE = _core_.DD_DEFAULT_STYLE
295MENU_TEAROFF = _core_.MENU_TEAROFF
296MB_DOCKABLE = _core_.MB_DOCKABLE
297NO_FULL_REPAINT_ON_RESIZE = _core_.NO_FULL_REPAINT_ON_RESIZE
298FULL_REPAINT_ON_RESIZE = _core_.FULL_REPAINT_ON_RESIZE
299LI_HORIZONTAL = _core_.LI_HORIZONTAL
300LI_VERTICAL = _core_.LI_VERTICAL
301WS_EX_VALIDATE_RECURSIVELY = _core_.WS_EX_VALIDATE_RECURSIVELY
302WS_EX_BLOCK_EVENTS = _core_.WS_EX_BLOCK_EVENTS
303WS_EX_TRANSIENT = _core_.WS_EX_TRANSIENT
304WS_EX_THEMED_BACKGROUND = _core_.WS_EX_THEMED_BACKGROUND
305WS_EX_PROCESS_IDLE = _core_.WS_EX_PROCESS_IDLE
306WS_EX_PROCESS_UI_UPDATES = _core_.WS_EX_PROCESS_UI_UPDATES
307MM_TEXT = _core_.MM_TEXT
308MM_LOMETRIC = _core_.MM_LOMETRIC
309MM_HIMETRIC = _core_.MM_HIMETRIC
310MM_LOENGLISH = _core_.MM_LOENGLISH
311MM_HIENGLISH = _core_.MM_HIENGLISH
312MM_TWIPS = _core_.MM_TWIPS
313MM_ISOTROPIC = _core_.MM_ISOTROPIC
314MM_ANISOTROPIC = _core_.MM_ANISOTROPIC
315MM_POINTS = _core_.MM_POINTS
316MM_METRIC = _core_.MM_METRIC
317CENTRE = _core_.CENTRE
318CENTER = _core_.CENTER
319HORIZONTAL = _core_.HORIZONTAL
320VERTICAL = _core_.VERTICAL
321BOTH = _core_.BOTH
322LEFT = _core_.LEFT
323RIGHT = _core_.RIGHT
324UP = _core_.UP
325DOWN = _core_.DOWN
326TOP = _core_.TOP
327BOTTOM = _core_.BOTTOM
328NORTH = _core_.NORTH
329SOUTH = _core_.SOUTH
330WEST = _core_.WEST
331EAST = _core_.EAST
332ALL = _core_.ALL
333ALIGN_NOT = _core_.ALIGN_NOT
334ALIGN_CENTER_HORIZONTAL = _core_.ALIGN_CENTER_HORIZONTAL
335ALIGN_CENTRE_HORIZONTAL = _core_.ALIGN_CENTRE_HORIZONTAL
336ALIGN_LEFT = _core_.ALIGN_LEFT
337ALIGN_TOP = _core_.ALIGN_TOP
338ALIGN_RIGHT = _core_.ALIGN_RIGHT
339ALIGN_BOTTOM = _core_.ALIGN_BOTTOM
340ALIGN_CENTER_VERTICAL = _core_.ALIGN_CENTER_VERTICAL
341ALIGN_CENTRE_VERTICAL = _core_.ALIGN_CENTRE_VERTICAL
342ALIGN_CENTER = _core_.ALIGN_CENTER
343ALIGN_CENTRE = _core_.ALIGN_CENTRE
344ALIGN_MASK = _core_.ALIGN_MASK
345STRETCH_NOT = _core_.STRETCH_NOT
346SHRINK = _core_.SHRINK
347GROW = _core_.GROW
348EXPAND = _core_.EXPAND
349SHAPED = _core_.SHAPED
350FIXED_MINSIZE = _core_.FIXED_MINSIZE
351TILE = _core_.TILE
352ADJUST_MINSIZE = _core_.ADJUST_MINSIZE
353BORDER_DEFAULT = _core_.BORDER_DEFAULT
354BORDER_NONE = _core_.BORDER_NONE
355BORDER_STATIC = _core_.BORDER_STATIC
356BORDER_SIMPLE = _core_.BORDER_SIMPLE
357BORDER_RAISED = _core_.BORDER_RAISED
358BORDER_SUNKEN = _core_.BORDER_SUNKEN
359BORDER_DOUBLE = _core_.BORDER_DOUBLE
360BORDER_MASK = _core_.BORDER_MASK
7bc1e663
RD
361BG_STYLE_SYSTEM = _core_.BG_STYLE_SYSTEM
362BG_STYLE_COLOUR = _core_.BG_STYLE_COLOUR
363BG_STYLE_CUSTOM = _core_.BG_STYLE_CUSTOM
54f9ee45
RD
364DEFAULT = _core_.DEFAULT
365DECORATIVE = _core_.DECORATIVE
366ROMAN = _core_.ROMAN
367SCRIPT = _core_.SCRIPT
368SWISS = _core_.SWISS
369MODERN = _core_.MODERN
370TELETYPE = _core_.TELETYPE
371VARIABLE = _core_.VARIABLE
372FIXED = _core_.FIXED
373NORMAL = _core_.NORMAL
374LIGHT = _core_.LIGHT
375BOLD = _core_.BOLD
376ITALIC = _core_.ITALIC
377SLANT = _core_.SLANT
378SOLID = _core_.SOLID
379DOT = _core_.DOT
380LONG_DASH = _core_.LONG_DASH
381SHORT_DASH = _core_.SHORT_DASH
382DOT_DASH = _core_.DOT_DASH
383USER_DASH = _core_.USER_DASH
384TRANSPARENT = _core_.TRANSPARENT
385STIPPLE = _core_.STIPPLE
386BDIAGONAL_HATCH = _core_.BDIAGONAL_HATCH
387CROSSDIAG_HATCH = _core_.CROSSDIAG_HATCH
388FDIAGONAL_HATCH = _core_.FDIAGONAL_HATCH
389CROSS_HATCH = _core_.CROSS_HATCH
390HORIZONTAL_HATCH = _core_.HORIZONTAL_HATCH
391VERTICAL_HATCH = _core_.VERTICAL_HATCH
392JOIN_BEVEL = _core_.JOIN_BEVEL
393JOIN_MITER = _core_.JOIN_MITER
394JOIN_ROUND = _core_.JOIN_ROUND
395CAP_ROUND = _core_.CAP_ROUND
396CAP_PROJECTING = _core_.CAP_PROJECTING
397CAP_BUTT = _core_.CAP_BUTT
398CLEAR = _core_.CLEAR
399XOR = _core_.XOR
400INVERT = _core_.INVERT
401OR_REVERSE = _core_.OR_REVERSE
402AND_REVERSE = _core_.AND_REVERSE
403COPY = _core_.COPY
404AND = _core_.AND
405AND_INVERT = _core_.AND_INVERT
406NO_OP = _core_.NO_OP
407NOR = _core_.NOR
408EQUIV = _core_.EQUIV
409SRC_INVERT = _core_.SRC_INVERT
410OR_INVERT = _core_.OR_INVERT
411NAND = _core_.NAND
412OR = _core_.OR
413SET = _core_.SET
414WXK_BACK = _core_.WXK_BACK
415WXK_TAB = _core_.WXK_TAB
416WXK_RETURN = _core_.WXK_RETURN
417WXK_ESCAPE = _core_.WXK_ESCAPE
418WXK_SPACE = _core_.WXK_SPACE
419WXK_DELETE = _core_.WXK_DELETE
420WXK_START = _core_.WXK_START
421WXK_LBUTTON = _core_.WXK_LBUTTON
422WXK_RBUTTON = _core_.WXK_RBUTTON
423WXK_CANCEL = _core_.WXK_CANCEL
424WXK_MBUTTON = _core_.WXK_MBUTTON
425WXK_CLEAR = _core_.WXK_CLEAR
426WXK_SHIFT = _core_.WXK_SHIFT
427WXK_ALT = _core_.WXK_ALT
428WXK_CONTROL = _core_.WXK_CONTROL
429WXK_MENU = _core_.WXK_MENU
430WXK_PAUSE = _core_.WXK_PAUSE
431WXK_CAPITAL = _core_.WXK_CAPITAL
432WXK_PRIOR = _core_.WXK_PRIOR
433WXK_NEXT = _core_.WXK_NEXT
434WXK_END = _core_.WXK_END
435WXK_HOME = _core_.WXK_HOME
436WXK_LEFT = _core_.WXK_LEFT
437WXK_UP = _core_.WXK_UP
438WXK_RIGHT = _core_.WXK_RIGHT
439WXK_DOWN = _core_.WXK_DOWN
440WXK_SELECT = _core_.WXK_SELECT
441WXK_PRINT = _core_.WXK_PRINT
442WXK_EXECUTE = _core_.WXK_EXECUTE
443WXK_SNAPSHOT = _core_.WXK_SNAPSHOT
444WXK_INSERT = _core_.WXK_INSERT
445WXK_HELP = _core_.WXK_HELP
446WXK_NUMPAD0 = _core_.WXK_NUMPAD0
447WXK_NUMPAD1 = _core_.WXK_NUMPAD1
448WXK_NUMPAD2 = _core_.WXK_NUMPAD2
449WXK_NUMPAD3 = _core_.WXK_NUMPAD3
450WXK_NUMPAD4 = _core_.WXK_NUMPAD4
451WXK_NUMPAD5 = _core_.WXK_NUMPAD5
452WXK_NUMPAD6 = _core_.WXK_NUMPAD6
453WXK_NUMPAD7 = _core_.WXK_NUMPAD7
454WXK_NUMPAD8 = _core_.WXK_NUMPAD8
455WXK_NUMPAD9 = _core_.WXK_NUMPAD9
456WXK_MULTIPLY = _core_.WXK_MULTIPLY
457WXK_ADD = _core_.WXK_ADD
458WXK_SEPARATOR = _core_.WXK_SEPARATOR
459WXK_SUBTRACT = _core_.WXK_SUBTRACT
460WXK_DECIMAL = _core_.WXK_DECIMAL
461WXK_DIVIDE = _core_.WXK_DIVIDE
462WXK_F1 = _core_.WXK_F1
463WXK_F2 = _core_.WXK_F2
464WXK_F3 = _core_.WXK_F3
465WXK_F4 = _core_.WXK_F4
466WXK_F5 = _core_.WXK_F5
467WXK_F6 = _core_.WXK_F6
468WXK_F7 = _core_.WXK_F7
469WXK_F8 = _core_.WXK_F8
470WXK_F9 = _core_.WXK_F9
471WXK_F10 = _core_.WXK_F10
472WXK_F11 = _core_.WXK_F11
473WXK_F12 = _core_.WXK_F12
474WXK_F13 = _core_.WXK_F13
475WXK_F14 = _core_.WXK_F14
476WXK_F15 = _core_.WXK_F15
477WXK_F16 = _core_.WXK_F16
478WXK_F17 = _core_.WXK_F17
479WXK_F18 = _core_.WXK_F18
480WXK_F19 = _core_.WXK_F19
481WXK_F20 = _core_.WXK_F20
482WXK_F21 = _core_.WXK_F21
483WXK_F22 = _core_.WXK_F22
484WXK_F23 = _core_.WXK_F23
485WXK_F24 = _core_.WXK_F24
486WXK_NUMLOCK = _core_.WXK_NUMLOCK
487WXK_SCROLL = _core_.WXK_SCROLL
488WXK_PAGEUP = _core_.WXK_PAGEUP
489WXK_PAGEDOWN = _core_.WXK_PAGEDOWN
490WXK_NUMPAD_SPACE = _core_.WXK_NUMPAD_SPACE
491WXK_NUMPAD_TAB = _core_.WXK_NUMPAD_TAB
492WXK_NUMPAD_ENTER = _core_.WXK_NUMPAD_ENTER
493WXK_NUMPAD_F1 = _core_.WXK_NUMPAD_F1
494WXK_NUMPAD_F2 = _core_.WXK_NUMPAD_F2
495WXK_NUMPAD_F3 = _core_.WXK_NUMPAD_F3
496WXK_NUMPAD_F4 = _core_.WXK_NUMPAD_F4
497WXK_NUMPAD_HOME = _core_.WXK_NUMPAD_HOME
498WXK_NUMPAD_LEFT = _core_.WXK_NUMPAD_LEFT
499WXK_NUMPAD_UP = _core_.WXK_NUMPAD_UP
500WXK_NUMPAD_RIGHT = _core_.WXK_NUMPAD_RIGHT
501WXK_NUMPAD_DOWN = _core_.WXK_NUMPAD_DOWN
502WXK_NUMPAD_PRIOR = _core_.WXK_NUMPAD_PRIOR
503WXK_NUMPAD_PAGEUP = _core_.WXK_NUMPAD_PAGEUP
504WXK_NUMPAD_NEXT = _core_.WXK_NUMPAD_NEXT
505WXK_NUMPAD_PAGEDOWN = _core_.WXK_NUMPAD_PAGEDOWN
506WXK_NUMPAD_END = _core_.WXK_NUMPAD_END
507WXK_NUMPAD_BEGIN = _core_.WXK_NUMPAD_BEGIN
508WXK_NUMPAD_INSERT = _core_.WXK_NUMPAD_INSERT
509WXK_NUMPAD_DELETE = _core_.WXK_NUMPAD_DELETE
510WXK_NUMPAD_EQUAL = _core_.WXK_NUMPAD_EQUAL
511WXK_NUMPAD_MULTIPLY = _core_.WXK_NUMPAD_MULTIPLY
512WXK_NUMPAD_ADD = _core_.WXK_NUMPAD_ADD
513WXK_NUMPAD_SEPARATOR = _core_.WXK_NUMPAD_SEPARATOR
514WXK_NUMPAD_SUBTRACT = _core_.WXK_NUMPAD_SUBTRACT
515WXK_NUMPAD_DECIMAL = _core_.WXK_NUMPAD_DECIMAL
516WXK_NUMPAD_DIVIDE = _core_.WXK_NUMPAD_DIVIDE
517WXK_WINDOWS_LEFT = _core_.WXK_WINDOWS_LEFT
518WXK_WINDOWS_RIGHT = _core_.WXK_WINDOWS_RIGHT
519WXK_WINDOWS_MENU = _core_.WXK_WINDOWS_MENU
520PAPER_NONE = _core_.PAPER_NONE
521PAPER_LETTER = _core_.PAPER_LETTER
522PAPER_LEGAL = _core_.PAPER_LEGAL
523PAPER_A4 = _core_.PAPER_A4
524PAPER_CSHEET = _core_.PAPER_CSHEET
525PAPER_DSHEET = _core_.PAPER_DSHEET
526PAPER_ESHEET = _core_.PAPER_ESHEET
527PAPER_LETTERSMALL = _core_.PAPER_LETTERSMALL
528PAPER_TABLOID = _core_.PAPER_TABLOID
529PAPER_LEDGER = _core_.PAPER_LEDGER
530PAPER_STATEMENT = _core_.PAPER_STATEMENT
531PAPER_EXECUTIVE = _core_.PAPER_EXECUTIVE
532PAPER_A3 = _core_.PAPER_A3
533PAPER_A4SMALL = _core_.PAPER_A4SMALL
534PAPER_A5 = _core_.PAPER_A5
535PAPER_B4 = _core_.PAPER_B4
536PAPER_B5 = _core_.PAPER_B5
537PAPER_FOLIO = _core_.PAPER_FOLIO
538PAPER_QUARTO = _core_.PAPER_QUARTO
539PAPER_10X14 = _core_.PAPER_10X14
540PAPER_11X17 = _core_.PAPER_11X17
541PAPER_NOTE = _core_.PAPER_NOTE
542PAPER_ENV_9 = _core_.PAPER_ENV_9
543PAPER_ENV_10 = _core_.PAPER_ENV_10
544PAPER_ENV_11 = _core_.PAPER_ENV_11
545PAPER_ENV_12 = _core_.PAPER_ENV_12
546PAPER_ENV_14 = _core_.PAPER_ENV_14
547PAPER_ENV_DL = _core_.PAPER_ENV_DL
548PAPER_ENV_C5 = _core_.PAPER_ENV_C5
549PAPER_ENV_C3 = _core_.PAPER_ENV_C3
550PAPER_ENV_C4 = _core_.PAPER_ENV_C4
551PAPER_ENV_C6 = _core_.PAPER_ENV_C6
552PAPER_ENV_C65 = _core_.PAPER_ENV_C65
553PAPER_ENV_B4 = _core_.PAPER_ENV_B4
554PAPER_ENV_B5 = _core_.PAPER_ENV_B5
555PAPER_ENV_B6 = _core_.PAPER_ENV_B6
556PAPER_ENV_ITALY = _core_.PAPER_ENV_ITALY
557PAPER_ENV_MONARCH = _core_.PAPER_ENV_MONARCH
558PAPER_ENV_PERSONAL = _core_.PAPER_ENV_PERSONAL
559PAPER_FANFOLD_US = _core_.PAPER_FANFOLD_US
560PAPER_FANFOLD_STD_GERMAN = _core_.PAPER_FANFOLD_STD_GERMAN
561PAPER_FANFOLD_LGL_GERMAN = _core_.PAPER_FANFOLD_LGL_GERMAN
562PAPER_ISO_B4 = _core_.PAPER_ISO_B4
563PAPER_JAPANESE_POSTCARD = _core_.PAPER_JAPANESE_POSTCARD
564PAPER_9X11 = _core_.PAPER_9X11
565PAPER_10X11 = _core_.PAPER_10X11
566PAPER_15X11 = _core_.PAPER_15X11
567PAPER_ENV_INVITE = _core_.PAPER_ENV_INVITE
568PAPER_LETTER_EXTRA = _core_.PAPER_LETTER_EXTRA
569PAPER_LEGAL_EXTRA = _core_.PAPER_LEGAL_EXTRA
570PAPER_TABLOID_EXTRA = _core_.PAPER_TABLOID_EXTRA
571PAPER_A4_EXTRA = _core_.PAPER_A4_EXTRA
572PAPER_LETTER_TRANSVERSE = _core_.PAPER_LETTER_TRANSVERSE
573PAPER_A4_TRANSVERSE = _core_.PAPER_A4_TRANSVERSE
574PAPER_LETTER_EXTRA_TRANSVERSE = _core_.PAPER_LETTER_EXTRA_TRANSVERSE
575PAPER_A_PLUS = _core_.PAPER_A_PLUS
576PAPER_B_PLUS = _core_.PAPER_B_PLUS
577PAPER_LETTER_PLUS = _core_.PAPER_LETTER_PLUS
578PAPER_A4_PLUS = _core_.PAPER_A4_PLUS
579PAPER_A5_TRANSVERSE = _core_.PAPER_A5_TRANSVERSE
580PAPER_B5_TRANSVERSE = _core_.PAPER_B5_TRANSVERSE
581PAPER_A3_EXTRA = _core_.PAPER_A3_EXTRA
582PAPER_A5_EXTRA = _core_.PAPER_A5_EXTRA
583PAPER_B5_EXTRA = _core_.PAPER_B5_EXTRA
584PAPER_A2 = _core_.PAPER_A2
585PAPER_A3_TRANSVERSE = _core_.PAPER_A3_TRANSVERSE
586PAPER_A3_EXTRA_TRANSVERSE = _core_.PAPER_A3_EXTRA_TRANSVERSE
587DUPLEX_SIMPLEX = _core_.DUPLEX_SIMPLEX
588DUPLEX_HORIZONTAL = _core_.DUPLEX_HORIZONTAL
589DUPLEX_VERTICAL = _core_.DUPLEX_VERTICAL
590ITEM_SEPARATOR = _core_.ITEM_SEPARATOR
591ITEM_NORMAL = _core_.ITEM_NORMAL
592ITEM_CHECK = _core_.ITEM_CHECK
593ITEM_RADIO = _core_.ITEM_RADIO
594ITEM_MAX = _core_.ITEM_MAX
595HT_NOWHERE = _core_.HT_NOWHERE
596HT_SCROLLBAR_FIRST = _core_.HT_SCROLLBAR_FIRST
597HT_SCROLLBAR_ARROW_LINE_1 = _core_.HT_SCROLLBAR_ARROW_LINE_1
598HT_SCROLLBAR_ARROW_LINE_2 = _core_.HT_SCROLLBAR_ARROW_LINE_2
599HT_SCROLLBAR_ARROW_PAGE_1 = _core_.HT_SCROLLBAR_ARROW_PAGE_1
600HT_SCROLLBAR_ARROW_PAGE_2 = _core_.HT_SCROLLBAR_ARROW_PAGE_2
601HT_SCROLLBAR_THUMB = _core_.HT_SCROLLBAR_THUMB
602HT_SCROLLBAR_BAR_1 = _core_.HT_SCROLLBAR_BAR_1
603HT_SCROLLBAR_BAR_2 = _core_.HT_SCROLLBAR_BAR_2
604HT_SCROLLBAR_LAST = _core_.HT_SCROLLBAR_LAST
605HT_WINDOW_OUTSIDE = _core_.HT_WINDOW_OUTSIDE
606HT_WINDOW_INSIDE = _core_.HT_WINDOW_INSIDE
607HT_WINDOW_VERT_SCROLLBAR = _core_.HT_WINDOW_VERT_SCROLLBAR
608HT_WINDOW_HORZ_SCROLLBAR = _core_.HT_WINDOW_HORZ_SCROLLBAR
609HT_WINDOW_CORNER = _core_.HT_WINDOW_CORNER
610HT_MAX = _core_.HT_MAX
611MOD_NONE = _core_.MOD_NONE
612MOD_ALT = _core_.MOD_ALT
613MOD_CONTROL = _core_.MOD_CONTROL
614MOD_SHIFT = _core_.MOD_SHIFT
615MOD_WIN = _core_.MOD_WIN
616UPDATE_UI_NONE = _core_.UPDATE_UI_NONE
617UPDATE_UI_RECURSE = _core_.UPDATE_UI_RECURSE
618UPDATE_UI_FROMIDLE = _core_.UPDATE_UI_FROMIDLE
d14a1e28
RD
619#---------------------------------------------------------------------------
620
621class Object(object):
0df68c9f
RD
622 """
623 The base class for most wx objects, although in wxPython not
624 much functionality is needed nor exposed.
625 """
d14a1e28
RD
626 def __init__(self): raise RuntimeError, "No constructor defined"
627 def __repr__(self):
628 return "<%s.%s; proxy of C++ wxObject instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
e811c8ce 629 def GetClassName(*args, **kwargs):
0df68c9f 630 """
a95a7133 631 GetClassName(self) -> String
e811c8ce 632
a95a7133 633 Returns the class name of the C++ class using wxRTTI.
0df68c9f 634 """
54f9ee45 635 return _core_.Object_GetClassName(*args, **kwargs)
e811c8ce
RD
636
637 def Destroy(*args, **kwargs):
0df68c9f 638 """
a95a7133 639 Destroy(self)
e811c8ce 640
0df68c9f
RD
641 Deletes the C++ object this Python object is a proxy for.
642 """
54f9ee45 643 return _core_.Object_Destroy(*args, **kwargs)
e811c8ce 644
d14a1e28
RD
645
646class ObjectPtr(Object):
647 def __init__(self, this):
648 self.this = this
649 if not hasattr(self,"thisown"): self.thisown = 0
650 self.__class__ = Object
54f9ee45
RD
651_core_.Object_swigregister(ObjectPtr)
652_wxPySetDictionary = _core_._wxPySetDictionary
d14a1e28 653
54f9ee45 654_wxPyFixStockObjects = _core_._wxPyFixStockObjects
3a04f143 655
54f9ee45 656cvar = _core_.cvar
196addbf 657EmptyString = cvar.EmptyString
d14a1e28
RD
658
659#---------------------------------------------------------------------------
660
54f9ee45
RD
661BITMAP_TYPE_INVALID = _core_.BITMAP_TYPE_INVALID
662BITMAP_TYPE_BMP = _core_.BITMAP_TYPE_BMP
663BITMAP_TYPE_ICO = _core_.BITMAP_TYPE_ICO
664BITMAP_TYPE_CUR = _core_.BITMAP_TYPE_CUR
665BITMAP_TYPE_XBM = _core_.BITMAP_TYPE_XBM
666BITMAP_TYPE_XBM_DATA = _core_.BITMAP_TYPE_XBM_DATA
667BITMAP_TYPE_XPM = _core_.BITMAP_TYPE_XPM
668BITMAP_TYPE_XPM_DATA = _core_.BITMAP_TYPE_XPM_DATA
669BITMAP_TYPE_TIF = _core_.BITMAP_TYPE_TIF
670BITMAP_TYPE_GIF = _core_.BITMAP_TYPE_GIF
671BITMAP_TYPE_PNG = _core_.BITMAP_TYPE_PNG
672BITMAP_TYPE_JPEG = _core_.BITMAP_TYPE_JPEG
673BITMAP_TYPE_PNM = _core_.BITMAP_TYPE_PNM
674BITMAP_TYPE_PCX = _core_.BITMAP_TYPE_PCX
675BITMAP_TYPE_PICT = _core_.BITMAP_TYPE_PICT
676BITMAP_TYPE_ICON = _core_.BITMAP_TYPE_ICON
677BITMAP_TYPE_ANI = _core_.BITMAP_TYPE_ANI
678BITMAP_TYPE_IFF = _core_.BITMAP_TYPE_IFF
679BITMAP_TYPE_MACCURSOR = _core_.BITMAP_TYPE_MACCURSOR
680BITMAP_TYPE_ANY = _core_.BITMAP_TYPE_ANY
681CURSOR_NONE = _core_.CURSOR_NONE
682CURSOR_ARROW = _core_.CURSOR_ARROW
683CURSOR_RIGHT_ARROW = _core_.CURSOR_RIGHT_ARROW
684CURSOR_BULLSEYE = _core_.CURSOR_BULLSEYE
685CURSOR_CHAR = _core_.CURSOR_CHAR
686CURSOR_CROSS = _core_.CURSOR_CROSS
687CURSOR_HAND = _core_.CURSOR_HAND
688CURSOR_IBEAM = _core_.CURSOR_IBEAM
689CURSOR_LEFT_BUTTON = _core_.CURSOR_LEFT_BUTTON
690CURSOR_MAGNIFIER = _core_.CURSOR_MAGNIFIER
691CURSOR_MIDDLE_BUTTON = _core_.CURSOR_MIDDLE_BUTTON
692CURSOR_NO_ENTRY = _core_.CURSOR_NO_ENTRY
693CURSOR_PAINT_BRUSH = _core_.CURSOR_PAINT_BRUSH
694CURSOR_PENCIL = _core_.CURSOR_PENCIL
695CURSOR_POINT_LEFT = _core_.CURSOR_POINT_LEFT
696CURSOR_POINT_RIGHT = _core_.CURSOR_POINT_RIGHT
697CURSOR_QUESTION_ARROW = _core_.CURSOR_QUESTION_ARROW
698CURSOR_RIGHT_BUTTON = _core_.CURSOR_RIGHT_BUTTON
699CURSOR_SIZENESW = _core_.CURSOR_SIZENESW
700CURSOR_SIZENS = _core_.CURSOR_SIZENS
701CURSOR_SIZENWSE = _core_.CURSOR_SIZENWSE
702CURSOR_SIZEWE = _core_.CURSOR_SIZEWE
703CURSOR_SIZING = _core_.CURSOR_SIZING
704CURSOR_SPRAYCAN = _core_.CURSOR_SPRAYCAN
705CURSOR_WAIT = _core_.CURSOR_WAIT
706CURSOR_WATCH = _core_.CURSOR_WATCH
707CURSOR_BLANK = _core_.CURSOR_BLANK
708CURSOR_DEFAULT = _core_.CURSOR_DEFAULT
709CURSOR_COPY_ARROW = _core_.CURSOR_COPY_ARROW
710CURSOR_ARROWWAIT = _core_.CURSOR_ARROWWAIT
711CURSOR_MAX = _core_.CURSOR_MAX
d14a1e28
RD
712#---------------------------------------------------------------------------
713
714class Size(object):
0df68c9f 715 """
41e2b43e 716 wx.Size is a useful data structure used to represent the size of
093d3ff1
RD
717 something. It simply contians integer width and height
718 proprtites. In most places in wxPython where a wx.Size is
719 expected a (width, height) tuple can be used instead.
0df68c9f 720 """
e811c8ce
RD
721 def __repr__(self):
722 return "<%s.%s; proxy of C++ wxSize instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
54f9ee45
RD
723 width = property(_core_.Size_width_get, _core_.Size_width_set)
724 height = property(_core_.Size_height_get, _core_.Size_height_set)
242b7b46 725 x = width; y = height
d14a1e28 726 def __init__(self, *args, **kwargs):
0df68c9f 727 """
a95a7133 728 __init__(self, int w=0, int h=0) -> Size
e811c8ce 729
0df68c9f
RD
730 Creates a size object.
731 """
54f9ee45 732 newobj = _core_.new_Size(*args, **kwargs)
d14a1e28
RD
733 self.this = newobj.this
734 self.thisown = 1
735 del newobj.thisown
54f9ee45 736 def __del__(self, destroy=_core_.delete_Size):
a95a7133 737 """__del__(self)"""
d14a1e28
RD
738 try:
739 if self.thisown: destroy(self)
740 except: pass
e811c8ce
RD
741
742 def __eq__(*args, **kwargs):
0df68c9f 743 """
a95a7133 744 __eq__(self, Size sz) -> bool
e811c8ce 745
0df68c9f
RD
746 Test for equality of wx.Size objects.
747 """
54f9ee45 748 return _core_.Size___eq__(*args, **kwargs)
e811c8ce
RD
749
750 def __ne__(*args, **kwargs):
0df68c9f 751 """
a95a7133 752 __ne__(self, Size sz) -> bool
e811c8ce 753
0df68c9f
RD
754 Test for inequality.
755 """
54f9ee45 756 return _core_.Size___ne__(*args, **kwargs)
e811c8ce
RD
757
758 def __add__(*args, **kwargs):
0df68c9f 759 """
a95a7133 760 __add__(self, Size sz) -> Size
e811c8ce 761
0df68c9f
RD
762 Add sz's proprties to this and return the result.
763 """
54f9ee45 764 return _core_.Size___add__(*args, **kwargs)
e811c8ce
RD
765
766 def __sub__(*args, **kwargs):
0df68c9f 767 """
a95a7133 768 __sub__(self, Size sz) -> Size
e811c8ce 769
0df68c9f
RD
770 Subtract sz's properties from this and return the result.
771 """
54f9ee45 772 return _core_.Size___sub__(*args, **kwargs)
e811c8ce
RD
773
774 def IncTo(*args, **kwargs):
0df68c9f 775 """
a95a7133 776 IncTo(self, Size sz)
e811c8ce 777
0df68c9f
RD
778 Increments this object so that both of its dimensions are not less
779 than the corresponding dimensions of the size.
780 """
54f9ee45 781 return _core_.Size_IncTo(*args, **kwargs)
e811c8ce
RD
782
783 def DecTo(*args, **kwargs):
0df68c9f 784 """
a95a7133 785 DecTo(self, Size sz)
e811c8ce 786
0df68c9f
RD
787 Decrements this object so that both of its dimensions are not greater
788 than the corresponding dimensions of the size.
789 """
54f9ee45 790 return _core_.Size_DecTo(*args, **kwargs)
e811c8ce
RD
791
792 def Set(*args, **kwargs):
0df68c9f 793 """
a95a7133 794 Set(self, int w, int h)
e811c8ce 795
0df68c9f
RD
796 Set both width and height.
797 """
54f9ee45 798 return _core_.Size_Set(*args, **kwargs)
e811c8ce
RD
799
800 def SetWidth(*args, **kwargs):
a95a7133 801 """SetWidth(self, int w)"""
54f9ee45 802 return _core_.Size_SetWidth(*args, **kwargs)
e811c8ce
RD
803
804 def SetHeight(*args, **kwargs):
a95a7133 805 """SetHeight(self, int h)"""
54f9ee45 806 return _core_.Size_SetHeight(*args, **kwargs)
e811c8ce
RD
807
808 def GetWidth(*args, **kwargs):
a95a7133 809 """GetWidth(self) -> int"""
54f9ee45 810 return _core_.Size_GetWidth(*args, **kwargs)
e811c8ce
RD
811
812 def GetHeight(*args, **kwargs):
a95a7133 813 """GetHeight(self) -> int"""
54f9ee45 814 return _core_.Size_GetHeight(*args, **kwargs)
e811c8ce 815
74a57fcd
RD
816 def IsFullySpecified(*args, **kwargs):
817 """
a95a7133 818 IsFullySpecified(self) -> bool
74a57fcd
RD
819
820 Returns True if both components of the size are non-default values.
821 """
54f9ee45 822 return _core_.Size_IsFullySpecified(*args, **kwargs)
74a57fcd
RD
823
824 def SetDefaults(*args, **kwargs):
825 """
a95a7133 826 SetDefaults(self, Size size)
74a57fcd 827
41e2b43e
RD
828 Combine this size with the other one replacing the default components
829 of this object (i.e. equal to -1) with those of the other.
74a57fcd 830 """
54f9ee45 831 return _core_.Size_SetDefaults(*args, **kwargs)
74a57fcd 832
e811c8ce 833 def Get(*args, **kwargs):
0df68c9f
RD
834 """
835 Get() -> (width,height)
e811c8ce 836
0df68c9f
RD
837 Returns the width and height properties as a tuple.
838 """
54f9ee45 839 return _core_.Size_Get(*args, **kwargs)
e811c8ce 840
41e2b43e 841 asTuple = wx._deprecated(Get, "asTuple is deprecated, use `Get` instead")
e811c8ce
RD
842 def __str__(self): return str(self.Get())
843 def __repr__(self): return 'wx.Size'+str(self.Get())
844 def __len__(self): return len(self.Get())
845 def __getitem__(self, index): return self.Get()[index]
d14a1e28
RD
846 def __setitem__(self, index, val):
847 if index == 0: self.width = val
848 elif index == 1: self.height = val
849 else: raise IndexError
e811c8ce 850 def __nonzero__(self): return self.Get() != (0,0)
74e96f3d
RD
851 __safe_for_unpickling__ = True
852 def __reduce__(self): return (wx.Size, self.Get())
d14a1e28
RD
853
854
855class SizePtr(Size):
856 def __init__(self, this):
857 self.this = this
858 if not hasattr(self,"thisown"): self.thisown = 0
859 self.__class__ = Size
54f9ee45 860_core_.Size_swigregister(SizePtr)
d14a1e28
RD
861
862#---------------------------------------------------------------------------
863
864class RealPoint(object):
0df68c9f 865 """
41e2b43e
RD
866 A data structure for representing a point or position with floating
867 point x and y properties. In wxPython most places that expect a
868 wx.RealPoint can also accept a (x,y) tuple.
0df68c9f 869 """
e811c8ce
RD
870 def __repr__(self):
871 return "<%s.%s; proxy of C++ wxRealPoint instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
54f9ee45
RD
872 x = property(_core_.RealPoint_x_get, _core_.RealPoint_x_set)
873 y = property(_core_.RealPoint_y_get, _core_.RealPoint_y_set)
d14a1e28 874 def __init__(self, *args, **kwargs):
0df68c9f 875 """
a95a7133 876 __init__(self, double x=0.0, double y=0.0) -> RealPoint
e811c8ce 877
0df68c9f
RD
878 Create a wx.RealPoint object
879 """
54f9ee45 880 newobj = _core_.new_RealPoint(*args, **kwargs)
d14a1e28
RD
881 self.this = newobj.this
882 self.thisown = 1
883 del newobj.thisown
54f9ee45 884 def __del__(self, destroy=_core_.delete_RealPoint):
a95a7133 885 """__del__(self)"""
d14a1e28
RD
886 try:
887 if self.thisown: destroy(self)
888 except: pass
e811c8ce
RD
889
890 def __eq__(*args, **kwargs):
0df68c9f 891 """
a95a7133 892 __eq__(self, RealPoint pt) -> bool
e811c8ce 893
0df68c9f
RD
894 Test for equality of wx.RealPoint objects.
895 """
54f9ee45 896 return _core_.RealPoint___eq__(*args, **kwargs)
e811c8ce
RD
897
898 def __ne__(*args, **kwargs):
0df68c9f 899 """
a95a7133 900 __ne__(self, RealPoint pt) -> bool
e811c8ce 901
0df68c9f
RD
902 Test for inequality of wx.RealPoint objects.
903 """
54f9ee45 904 return _core_.RealPoint___ne__(*args, **kwargs)
e811c8ce
RD
905
906 def __add__(*args, **kwargs):
0df68c9f 907 """
a95a7133 908 __add__(self, RealPoint pt) -> RealPoint
e811c8ce 909
0df68c9f
RD
910 Add pt's proprties to this and return the result.
911 """
54f9ee45 912 return _core_.RealPoint___add__(*args, **kwargs)
e811c8ce
RD
913
914 def __sub__(*args, **kwargs):
0df68c9f 915 """
a95a7133 916 __sub__(self, RealPoint pt) -> RealPoint
e811c8ce 917
0df68c9f
RD
918 Subtract pt's proprties from this and return the result
919 """
54f9ee45 920 return _core_.RealPoint___sub__(*args, **kwargs)
e811c8ce
RD
921
922 def Set(*args, **kwargs):
0df68c9f 923 """
a95a7133 924 Set(self, double x, double y)
e811c8ce 925
0df68c9f
RD
926 Set both the x and y properties
927 """
54f9ee45 928 return _core_.RealPoint_Set(*args, **kwargs)
e811c8ce
RD
929
930 def Get(*args, **kwargs):
0df68c9f
RD
931 """
932 Get() -> (x,y)
e811c8ce 933
0df68c9f
RD
934 Return the x and y properties as a tuple.
935 """
54f9ee45 936 return _core_.RealPoint_Get(*args, **kwargs)
e811c8ce 937
41e2b43e 938 asTuple = wx._deprecated(Get, "asTuple is deprecated, use `Get` instead")
e811c8ce
RD
939 def __str__(self): return str(self.Get())
940 def __repr__(self): return 'wx.RealPoint'+str(self.Get())
941 def __len__(self): return len(self.Get())
942 def __getitem__(self, index): return self.Get()[index]
d14a1e28 943 def __setitem__(self, index, val):
e811c8ce
RD
944 if index == 0: self.x = val
945 elif index == 1: self.y = val
d14a1e28 946 else: raise IndexError
e811c8ce 947 def __nonzero__(self): return self.Get() != (0.0, 0.0)
74e96f3d
RD
948 __safe_for_unpickling__ = True
949 def __reduce__(self): return (wx.RealPoint, self.Get())
d14a1e28
RD
950
951
952class RealPointPtr(RealPoint):
953 def __init__(self, this):
954 self.this = this
955 if not hasattr(self,"thisown"): self.thisown = 0
956 self.__class__ = RealPoint
54f9ee45 957_core_.RealPoint_swigregister(RealPointPtr)
d14a1e28
RD
958
959#---------------------------------------------------------------------------
960
961class Point(object):
0df68c9f 962 """
41e2b43e
RD
963 A data structure for representing a point or position with integer x
964 and y properties. Most places in wxPython that expect a wx.Point can
965 also accept a (x,y) tuple.
0df68c9f 966 """
e811c8ce
RD
967 def __repr__(self):
968 return "<%s.%s; proxy of C++ wxPoint instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
54f9ee45
RD
969 x = property(_core_.Point_x_get, _core_.Point_x_set)
970 y = property(_core_.Point_y_get, _core_.Point_y_set)
d14a1e28 971 def __init__(self, *args, **kwargs):
0df68c9f 972 """
a95a7133 973 __init__(self, int x=0, int y=0) -> Point
e811c8ce 974
0df68c9f
RD
975 Create a wx.Point object
976 """
54f9ee45 977 newobj = _core_.new_Point(*args, **kwargs)
d14a1e28
RD
978 self.this = newobj.this
979 self.thisown = 1
980 del newobj.thisown
54f9ee45 981 def __del__(self, destroy=_core_.delete_Point):
a95a7133 982 """__del__(self)"""
d14a1e28
RD
983 try:
984 if self.thisown: destroy(self)
985 except: pass
e811c8ce
RD
986
987 def __eq__(*args, **kwargs):
0df68c9f 988 """
a95a7133 989 __eq__(self, Point pt) -> bool
e811c8ce 990
0df68c9f
RD
991 Test for equality of wx.Point objects.
992 """
54f9ee45 993 return _core_.Point___eq__(*args, **kwargs)
e811c8ce
RD
994
995 def __ne__(*args, **kwargs):
0df68c9f 996 """
a95a7133 997 __ne__(self, Point pt) -> bool
e811c8ce 998
0df68c9f
RD
999 Test for inequality of wx.Point objects.
1000 """
54f9ee45 1001 return _core_.Point___ne__(*args, **kwargs)
e811c8ce
RD
1002
1003 def __add__(*args, **kwargs):
0df68c9f 1004 """
a95a7133 1005 __add__(self, Point pt) -> Point
e811c8ce 1006
0df68c9f
RD
1007 Add pt's proprties to this and return the result.
1008 """
54f9ee45 1009 return _core_.Point___add__(*args, **kwargs)
e811c8ce
RD
1010
1011 def __sub__(*args, **kwargs):
0df68c9f 1012 """
a95a7133 1013 __sub__(self, Point pt) -> Point
e811c8ce 1014
0df68c9f
RD
1015 Subtract pt's proprties from this and return the result
1016 """
54f9ee45 1017 return _core_.Point___sub__(*args, **kwargs)
e811c8ce
RD
1018
1019 def __iadd__(*args, **kwargs):
0df68c9f 1020 """
a95a7133 1021 __iadd__(self, Point pt) -> Point
e811c8ce 1022
0df68c9f
RD
1023 Add pt to this object.
1024 """
54f9ee45 1025 return _core_.Point___iadd__(*args, **kwargs)
e811c8ce
RD
1026
1027 def __isub__(*args, **kwargs):
0df68c9f 1028 """
a95a7133 1029 __isub__(self, Point pt) -> Point
e811c8ce 1030
0df68c9f
RD
1031 Subtract pt from this object.
1032 """
54f9ee45 1033 return _core_.Point___isub__(*args, **kwargs)
e811c8ce
RD
1034
1035 def Set(*args, **kwargs):
0df68c9f 1036 """
a95a7133 1037 Set(self, long x, long y)
e811c8ce 1038
0df68c9f
RD
1039 Set both the x and y properties
1040 """
54f9ee45 1041 return _core_.Point_Set(*args, **kwargs)
e811c8ce
RD
1042
1043 def Get(*args, **kwargs):
0df68c9f
RD
1044 """
1045 Get() -> (x,y)
e811c8ce 1046
0df68c9f
RD
1047 Return the x and y properties as a tuple.
1048 """
54f9ee45 1049 return _core_.Point_Get(*args, **kwargs)
e811c8ce 1050
41e2b43e 1051 asTuple = wx._deprecated(Get, "asTuple is deprecated, use `Get` instead")
e811c8ce
RD
1052 def __str__(self): return str(self.Get())
1053 def __repr__(self): return 'wx.Point'+str(self.Get())
1054 def __len__(self): return len(self.Get())
1055 def __getitem__(self, index): return self.Get()[index]
d14a1e28
RD
1056 def __setitem__(self, index, val):
1057 if index == 0: self.x = val
1058 elif index == 1: self.y = val
1059 else: raise IndexError
e811c8ce 1060 def __nonzero__(self): return self.Get() != (0,0)
74e96f3d
RD
1061 __safe_for_unpickling__ = True
1062 def __reduce__(self): return (wx.Point, self.Get())
d14a1e28
RD
1063
1064
1065class PointPtr(Point):
1066 def __init__(self, this):
1067 self.this = this
1068 if not hasattr(self,"thisown"): self.thisown = 0
1069 self.__class__ = Point
54f9ee45 1070_core_.Point_swigregister(PointPtr)
d14a1e28
RD
1071
1072#---------------------------------------------------------------------------
1073
1074class Rect(object):
0df68c9f 1075 """
41e2b43e
RD
1076 A class for representing and manipulating rectangles. It has x, y,
1077 width and height properties. In wxPython most palces that expect a
1078 wx.Rect can also accept a (x,y,width,height) tuple.
0df68c9f 1079 """
e811c8ce
RD
1080 def __repr__(self):
1081 return "<%s.%s; proxy of C++ wxRect instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 1082 def __init__(self, *args, **kwargs):
0df68c9f 1083 """
a95a7133 1084 __init__(self, int x=0, int y=0, int width=0, int height=0) -> Rect
e811c8ce 1085
0df68c9f
RD
1086 Create a new Rect object.
1087 """
54f9ee45 1088 newobj = _core_.new_Rect(*args, **kwargs)
d14a1e28
RD
1089 self.this = newobj.this
1090 self.thisown = 1
1091 del newobj.thisown
54f9ee45 1092 def __del__(self, destroy=_core_.delete_Rect):
a95a7133 1093 """__del__(self)"""
d14a1e28
RD
1094 try:
1095 if self.thisown: destroy(self)
1096 except: pass
e811c8ce
RD
1097
1098 def GetX(*args, **kwargs):
a95a7133 1099 """GetX(self) -> int"""
54f9ee45 1100 return _core_.Rect_GetX(*args, **kwargs)
e811c8ce
RD
1101
1102 def SetX(*args, **kwargs):
a95a7133 1103 """SetX(self, int x)"""
54f9ee45 1104 return _core_.Rect_SetX(*args, **kwargs)
e811c8ce
RD
1105
1106 def GetY(*args, **kwargs):
a95a7133 1107 """GetY(self) -> int"""
54f9ee45 1108 return _core_.Rect_GetY(*args, **kwargs)
e811c8ce
RD
1109
1110 def SetY(*args, **kwargs):
a95a7133 1111 """SetY(self, int y)"""
54f9ee45 1112 return _core_.Rect_SetY(*args, **kwargs)
e811c8ce
RD
1113
1114 def GetWidth(*args, **kwargs):
a95a7133 1115 """GetWidth(self) -> int"""
54f9ee45 1116 return _core_.Rect_GetWidth(*args, **kwargs)
e811c8ce
RD
1117
1118 def SetWidth(*args, **kwargs):
a95a7133 1119 """SetWidth(self, int w)"""
54f9ee45 1120 return _core_.Rect_SetWidth(*args, **kwargs)
e811c8ce
RD
1121
1122 def GetHeight(*args, **kwargs):
a95a7133 1123 """GetHeight(self) -> int"""
54f9ee45 1124 return _core_.Rect_GetHeight(*args, **kwargs)
e811c8ce
RD
1125
1126 def SetHeight(*args, **kwargs):
a95a7133 1127 """SetHeight(self, int h)"""
54f9ee45 1128 return _core_.Rect_SetHeight(*args, **kwargs)
e811c8ce
RD
1129
1130 def GetPosition(*args, **kwargs):
a95a7133 1131 """GetPosition(self) -> Point"""
54f9ee45 1132 return _core_.Rect_GetPosition(*args, **kwargs)
e811c8ce
RD
1133
1134 def SetPosition(*args, **kwargs):
a95a7133 1135 """SetPosition(self, Point p)"""
54f9ee45 1136 return _core_.Rect_SetPosition(*args, **kwargs)
e811c8ce
RD
1137
1138 def GetSize(*args, **kwargs):
a95a7133 1139 """GetSize(self) -> Size"""
54f9ee45 1140 return _core_.Rect_GetSize(*args, **kwargs)
e811c8ce
RD
1141
1142 def SetSize(*args, **kwargs):
a95a7133 1143 """SetSize(self, Size s)"""
54f9ee45 1144 return _core_.Rect_SetSize(*args, **kwargs)
e811c8ce 1145
c9c7117a 1146 def GetTopLeft(*args, **kwargs):
a95a7133 1147 """GetTopLeft(self) -> Point"""
54f9ee45 1148 return _core_.Rect_GetTopLeft(*args, **kwargs)
c9c7117a
RD
1149
1150 def SetTopLeft(*args, **kwargs):
a95a7133 1151 """SetTopLeft(self, Point p)"""
54f9ee45 1152 return _core_.Rect_SetTopLeft(*args, **kwargs)
c9c7117a
RD
1153
1154 def GetBottomRight(*args, **kwargs):
a95a7133 1155 """GetBottomRight(self) -> Point"""
54f9ee45 1156 return _core_.Rect_GetBottomRight(*args, **kwargs)
c9c7117a
RD
1157
1158 def SetBottomRight(*args, **kwargs):
a95a7133 1159 """SetBottomRight(self, Point p)"""
54f9ee45 1160 return _core_.Rect_SetBottomRight(*args, **kwargs)
c9c7117a 1161
e811c8ce 1162 def GetLeft(*args, **kwargs):
a95a7133 1163 """GetLeft(self) -> int"""
54f9ee45 1164 return _core_.Rect_GetLeft(*args, **kwargs)
e811c8ce
RD
1165
1166 def GetTop(*args, **kwargs):
a95a7133 1167 """GetTop(self) -> int"""
54f9ee45 1168 return _core_.Rect_GetTop(*args, **kwargs)
e811c8ce
RD
1169
1170 def GetBottom(*args, **kwargs):
a95a7133 1171 """GetBottom(self) -> int"""
54f9ee45 1172 return _core_.Rect_GetBottom(*args, **kwargs)
e811c8ce
RD
1173
1174 def GetRight(*args, **kwargs):
a95a7133 1175 """GetRight(self) -> int"""
54f9ee45 1176 return _core_.Rect_GetRight(*args, **kwargs)
e811c8ce
RD
1177
1178 def SetLeft(*args, **kwargs):
a95a7133 1179 """SetLeft(self, int left)"""
54f9ee45 1180 return _core_.Rect_SetLeft(*args, **kwargs)
e811c8ce
RD
1181
1182 def SetRight(*args, **kwargs):
a95a7133 1183 """SetRight(self, int right)"""
54f9ee45 1184 return _core_.Rect_SetRight(*args, **kwargs)
e811c8ce
RD
1185
1186 def SetTop(*args, **kwargs):
a95a7133 1187 """SetTop(self, int top)"""
54f9ee45 1188 return _core_.Rect_SetTop(*args, **kwargs)
e811c8ce
RD
1189
1190 def SetBottom(*args, **kwargs):
a95a7133 1191 """SetBottom(self, int bottom)"""
54f9ee45 1192 return _core_.Rect_SetBottom(*args, **kwargs)
e811c8ce
RD
1193
1194 position = property(GetPosition, SetPosition)
1195 size = property(GetSize, SetSize)
1196 left = property(GetLeft, SetLeft)
1197 right = property(GetRight, SetRight)
1198 top = property(GetTop, SetTop)
1199 bottom = property(GetBottom, SetBottom)
1200
1201 def Inflate(*args, **kwargs):
0df68c9f 1202 """
a95a7133 1203 Inflate(self, int dx, int dy) -> Rect
e811c8ce 1204
41e2b43e 1205 Increase the rectangle size by dx in x direction and dy in y
5cbf236d 1206 direction. Both (or one of) parameters may be negative to decrease the
41e2b43e 1207 rectangle size.
0df68c9f 1208 """
54f9ee45 1209 return _core_.Rect_Inflate(*args, **kwargs)
e811c8ce
RD
1210
1211 def Deflate(*args, **kwargs):
0df68c9f 1212 """
a95a7133 1213 Deflate(self, int dx, int dy) -> Rect
e811c8ce 1214
41e2b43e 1215 Decrease the rectangle size by dx in x direction and dy in y
5cbf236d 1216 direction. Both (or one of) parameters may be negative to increase the
41e2b43e 1217 rectngle size. This method is the opposite of Inflate.
0df68c9f 1218 """
54f9ee45 1219 return _core_.Rect_Deflate(*args, **kwargs)
e811c8ce
RD
1220
1221 def OffsetXY(*args, **kwargs):
0df68c9f 1222 """
a95a7133 1223 OffsetXY(self, int dx, int dy)
e811c8ce 1224
41e2b43e
RD
1225 Moves the rectangle by the specified offset. If dx is positive, the
1226 rectangle is moved to the right, if dy is positive, it is moved to the
1227 bottom, otherwise it is moved to the left or top respectively.
0df68c9f 1228 """
54f9ee45 1229 return _core_.Rect_OffsetXY(*args, **kwargs)
e811c8ce
RD
1230
1231 def Offset(*args, **kwargs):
0df68c9f 1232 """
a95a7133 1233 Offset(self, Point pt)
e811c8ce 1234
0df68c9f
RD
1235 Same as OffsetXY but uses dx,dy from Point
1236 """
54f9ee45 1237 return _core_.Rect_Offset(*args, **kwargs)
e811c8ce
RD
1238
1239 def Intersect(*args, **kwargs):
0df68c9f 1240 """
a95a7133 1241 Intersect(self, Rect rect) -> Rect
e811c8ce 1242
5cbf236d 1243 Returns the intersectsion of this rectangle and rect.
0df68c9f 1244 """
54f9ee45 1245 return _core_.Rect_Intersect(*args, **kwargs)
e811c8ce 1246
5cbf236d
RD
1247 def Union(*args, **kwargs):
1248 """
1249 Union(self, Rect rect) -> Rect
1250
1251 Returns the union of this rectangle and rect.
1252 """
1253 return _core_.Rect_Union(*args, **kwargs)
1254
e811c8ce 1255 def __add__(*args, **kwargs):
0df68c9f 1256 """
a95a7133 1257 __add__(self, Rect rect) -> Rect
e811c8ce 1258
0df68c9f
RD
1259 Add the properties of rect to this rectangle and return the result.
1260 """
54f9ee45 1261 return _core_.Rect___add__(*args, **kwargs)
e811c8ce
RD
1262
1263 def __iadd__(*args, **kwargs):
0df68c9f 1264 """
a95a7133 1265 __iadd__(self, Rect rect) -> Rect
e811c8ce 1266
0df68c9f
RD
1267 Add the properties of rect to this rectangle, updating this rectangle.
1268 """
54f9ee45 1269 return _core_.Rect___iadd__(*args, **kwargs)
e811c8ce
RD
1270
1271 def __eq__(*args, **kwargs):
0df68c9f 1272 """
a95a7133 1273 __eq__(self, Rect rect) -> bool
e811c8ce 1274
0df68c9f
RD
1275 Test for equality.
1276 """
54f9ee45 1277 return _core_.Rect___eq__(*args, **kwargs)
e811c8ce
RD
1278
1279 def __ne__(*args, **kwargs):
0df68c9f 1280 """
a95a7133 1281 __ne__(self, Rect rect) -> bool
e811c8ce 1282
0df68c9f
RD
1283 Test for inequality.
1284 """
54f9ee45 1285 return _core_.Rect___ne__(*args, **kwargs)
e811c8ce
RD
1286
1287 def InsideXY(*args, **kwargs):
0df68c9f 1288 """
a95a7133 1289 InsideXY(self, int x, int y) -> bool
e811c8ce 1290
0df68c9f
RD
1291 Return True if the point is (not strcitly) inside the rect.
1292 """
54f9ee45 1293 return _core_.Rect_InsideXY(*args, **kwargs)
e811c8ce
RD
1294
1295 def Inside(*args, **kwargs):
0df68c9f 1296 """
a95a7133 1297 Inside(self, Point pt) -> bool
e811c8ce 1298
0df68c9f
RD
1299 Return True if the point is (not strcitly) inside the rect.
1300 """
54f9ee45 1301 return _core_.Rect_Inside(*args, **kwargs)
e811c8ce
RD
1302
1303 def Intersects(*args, **kwargs):
0df68c9f 1304 """
a95a7133 1305 Intersects(self, Rect rect) -> bool
e811c8ce 1306
0df68c9f
RD
1307 Returns True if the rectangles have a non empty intersection.
1308 """
54f9ee45 1309 return _core_.Rect_Intersects(*args, **kwargs)
e811c8ce 1310
54f9ee45
RD
1311 x = property(_core_.Rect_x_get, _core_.Rect_x_set)
1312 y = property(_core_.Rect_y_get, _core_.Rect_y_set)
1313 width = property(_core_.Rect_width_get, _core_.Rect_width_set)
1314 height = property(_core_.Rect_height_get, _core_.Rect_height_set)
e811c8ce 1315 def Set(*args, **kwargs):
0df68c9f 1316 """
a95a7133 1317 Set(self, int x=0, int y=0, int width=0, int height=0)
e811c8ce 1318
0df68c9f
RD
1319 Set all rectangle properties.
1320 """
54f9ee45 1321 return _core_.Rect_Set(*args, **kwargs)
e811c8ce
RD
1322
1323 def Get(*args, **kwargs):
0df68c9f
RD
1324 """
1325 Get() -> (x,y,width,height)
e811c8ce 1326
0df68c9f
RD
1327 Return the rectangle properties as a tuple.
1328 """
54f9ee45 1329 return _core_.Rect_Get(*args, **kwargs)
e811c8ce 1330
41e2b43e 1331 asTuple = wx._deprecated(Get, "asTuple is deprecated, use `Get` instead")
e811c8ce
RD
1332 def __str__(self): return str(self.Get())
1333 def __repr__(self): return 'wx.Rect'+str(self.Get())
1334 def __len__(self): return len(self.Get())
1335 def __getitem__(self, index): return self.Get()[index]
d14a1e28
RD
1336 def __setitem__(self, index, val):
1337 if index == 0: self.x = val
1338 elif index == 1: self.y = val
1339 elif index == 2: self.width = val
1340 elif index == 3: self.height = val
1341 else: raise IndexError
e811c8ce 1342 def __nonzero__(self): return self.Get() != (0,0,0,0)
74e96f3d
RD
1343 __safe_for_unpickling__ = True
1344 def __reduce__(self): return (wx.Rect, self.Get())
d14a1e28
RD
1345
1346
1347class RectPtr(Rect):
1348 def __init__(self, this):
1349 self.this = this
1350 if not hasattr(self,"thisown"): self.thisown = 0
1351 self.__class__ = Rect
54f9ee45 1352_core_.Rect_swigregister(RectPtr)
d14a1e28
RD
1353
1354def RectPP(*args, **kwargs):
0df68c9f
RD
1355 """
1356 RectPP(Point topLeft, Point bottomRight) -> Rect
e811c8ce 1357
0df68c9f
RD
1358 Create a new Rect object from Points representing two corners.
1359 """
54f9ee45 1360 val = _core_.new_RectPP(*args, **kwargs)
d14a1e28
RD
1361 val.thisown = 1
1362 return val
1363
1364def RectPS(*args, **kwargs):
0df68c9f
RD
1365 """
1366 RectPS(Point pos, Size size) -> Rect
e811c8ce 1367
0df68c9f
RD
1368 Create a new Rect from a position and size.
1369 """
54f9ee45 1370 val = _core_.new_RectPS(*args, **kwargs)
d14a1e28
RD
1371 val.thisown = 1
1372 return val
1373
d3b6e4ff
RD
1374def RectS(*args, **kwargs):
1375 """
1376 RectS(Size size) -> Rect
1377
1378 Create a new Rect from a size only.
1379 """
1380 val = _core_.new_RectS(*args, **kwargs)
1381 val.thisown = 1
1382 return val
1383
d14a1e28 1384
e811c8ce 1385def IntersectRect(*args, **kwargs):
0df68c9f
RD
1386 """
1387 IntersectRect(Rect r1, Rect r2) -> Rect
e811c8ce 1388
0df68c9f
RD
1389 Calculate and return the intersection of r1 and r2.
1390 """
54f9ee45 1391 return _core_.IntersectRect(*args, **kwargs)
d14a1e28
RD
1392#---------------------------------------------------------------------------
1393
1394class Point2D(object):
41e2b43e
RD
1395 """
1396 wx.Point2Ds represent a point or a vector in a 2d coordinate system
1397 with floating point values.
1398 """
e811c8ce
RD
1399 def __repr__(self):
1400 return "<%s.%s; proxy of C++ wxPoint2D instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 1401 def __init__(self, *args, **kwargs):
0df68c9f 1402 """
a95a7133 1403 __init__(self, double x=0.0, double y=0.0) -> Point2D
e811c8ce 1404
0df68c9f
RD
1405 Create a w.Point2D object.
1406 """
54f9ee45 1407 newobj = _core_.new_Point2D(*args, **kwargs)
d14a1e28
RD
1408 self.this = newobj.this
1409 self.thisown = 1
1410 del newobj.thisown
e811c8ce 1411 def GetFloor(*args, **kwargs):
fd2dc343
RD
1412 """
1413 GetFloor() -> (x,y)
1414
1415 Convert to integer
1416 """
54f9ee45 1417 return _core_.Point2D_GetFloor(*args, **kwargs)
e811c8ce
RD
1418
1419 def GetRounded(*args, **kwargs):
fd2dc343
RD
1420 """
1421 GetRounded() -> (x,y)
1422
1423 Convert to integer
1424 """
54f9ee45 1425 return _core_.Point2D_GetRounded(*args, **kwargs)
e811c8ce
RD
1426
1427 def GetVectorLength(*args, **kwargs):
a95a7133 1428 """GetVectorLength(self) -> double"""
54f9ee45 1429 return _core_.Point2D_GetVectorLength(*args, **kwargs)
e811c8ce
RD
1430
1431 def GetVectorAngle(*args, **kwargs):
a95a7133 1432 """GetVectorAngle(self) -> double"""
54f9ee45 1433 return _core_.Point2D_GetVectorAngle(*args, **kwargs)
e811c8ce
RD
1434
1435 def SetVectorLength(*args, **kwargs):
a95a7133 1436 """SetVectorLength(self, double length)"""
54f9ee45 1437 return _core_.Point2D_SetVectorLength(*args, **kwargs)
e811c8ce
RD
1438
1439 def SetVectorAngle(*args, **kwargs):
a95a7133 1440 """SetVectorAngle(self, double degrees)"""
54f9ee45 1441 return _core_.Point2D_SetVectorAngle(*args, **kwargs)
e811c8ce 1442
d14a1e28
RD
1443 def SetPolarCoordinates(self, angle, length):
1444 self.SetVectorLength(length)
1445 self.SetVectorAngle(angle)
1446 def Normalize(self):
1447 self.SetVectorLength(1.0)
1448
e811c8ce 1449 def GetDistance(*args, **kwargs):
a95a7133 1450 """GetDistance(self, Point2D pt) -> double"""
54f9ee45 1451 return _core_.Point2D_GetDistance(*args, **kwargs)
e811c8ce
RD
1452
1453 def GetDistanceSquare(*args, **kwargs):
a95a7133 1454 """GetDistanceSquare(self, Point2D pt) -> double"""
54f9ee45 1455 return _core_.Point2D_GetDistanceSquare(*args, **kwargs)
e811c8ce
RD
1456
1457 def GetDotProduct(*args, **kwargs):
a95a7133 1458 """GetDotProduct(self, Point2D vec) -> double"""
54f9ee45 1459 return _core_.Point2D_GetDotProduct(*args, **kwargs)
e811c8ce
RD
1460
1461 def GetCrossProduct(*args, **kwargs):
a95a7133 1462 """GetCrossProduct(self, Point2D vec) -> double"""
54f9ee45 1463 return _core_.Point2D_GetCrossProduct(*args, **kwargs)
e811c8ce
RD
1464
1465 def __neg__(*args, **kwargs):
0df68c9f 1466 """
a95a7133 1467 __neg__(self) -> Point2D
e811c8ce 1468
0df68c9f
RD
1469 the reflection of this point
1470 """
54f9ee45 1471 return _core_.Point2D___neg__(*args, **kwargs)
e811c8ce
RD
1472
1473 def __iadd__(*args, **kwargs):
a95a7133 1474 """__iadd__(self, Point2D pt) -> Point2D"""
54f9ee45 1475 return _core_.Point2D___iadd__(*args, **kwargs)
e811c8ce
RD
1476
1477 def __isub__(*args, **kwargs):
a95a7133 1478 """__isub__(self, Point2D pt) -> Point2D"""
54f9ee45 1479 return _core_.Point2D___isub__(*args, **kwargs)
e811c8ce
RD
1480
1481 def __imul__(*args, **kwargs):
a95a7133 1482 """__imul__(self, Point2D pt) -> Point2D"""
54f9ee45 1483 return _core_.Point2D___imul__(*args, **kwargs)
e811c8ce
RD
1484
1485 def __idiv__(*args, **kwargs):
a95a7133 1486 """__idiv__(self, Point2D pt) -> Point2D"""
54f9ee45 1487 return _core_.Point2D___idiv__(*args, **kwargs)
e811c8ce
RD
1488
1489 def __eq__(*args, **kwargs):
0df68c9f 1490 """
a95a7133 1491 __eq__(self, Point2D pt) -> bool
e811c8ce 1492
0df68c9f
RD
1493 Test for equality
1494 """
54f9ee45 1495 return _core_.Point2D___eq__(*args, **kwargs)
e811c8ce
RD
1496
1497 def __ne__(*args, **kwargs):
0df68c9f 1498 """
a95a7133 1499 __ne__(self, Point2D pt) -> bool
e811c8ce 1500
0df68c9f
RD
1501 Test for inequality
1502 """
54f9ee45 1503 return _core_.Point2D___ne__(*args, **kwargs)
e811c8ce 1504
54f9ee45
RD
1505 x = property(_core_.Point2D_x_get, _core_.Point2D_x_set)
1506 y = property(_core_.Point2D_y_get, _core_.Point2D_y_set)
e811c8ce 1507 def Set(*args, **kwargs):
a95a7133 1508 """Set(self, double x=0, double y=0)"""
54f9ee45 1509 return _core_.Point2D_Set(*args, **kwargs)
e811c8ce
RD
1510
1511 def Get(*args, **kwargs):
0df68c9f
RD
1512 """
1513 Get() -> (x,y)
e811c8ce 1514
0df68c9f
RD
1515 Return x and y properties as a tuple.
1516 """
54f9ee45 1517 return _core_.Point2D_Get(*args, **kwargs)
e811c8ce 1518
41e2b43e 1519 asTuple = wx._deprecated(Get, "asTuple is deprecated, use `Get` instead")
e811c8ce
RD
1520 def __str__(self): return str(self.Get())
1521 def __repr__(self): return 'wx.Point2D'+str(self.Get())
1522 def __len__(self): return len(self.Get())
1523 def __getitem__(self, index): return self.Get()[index]
d14a1e28 1524 def __setitem__(self, index, val):
e811c8ce
RD
1525 if index == 0: self.x = val
1526 elif index == 1: self.y = val
d14a1e28 1527 else: raise IndexError
e811c8ce 1528 def __nonzero__(self): return self.Get() != (0.0, 0.0)
74e96f3d
RD
1529 __safe_for_unpickling__ = True
1530 def __reduce__(self): return (wx.Point2D, self.Get())
d14a1e28
RD
1531
1532
1533class Point2DPtr(Point2D):
1534 def __init__(self, this):
1535 self.this = this
1536 if not hasattr(self,"thisown"): self.thisown = 0
1537 self.__class__ = Point2D
54f9ee45 1538_core_.Point2D_swigregister(Point2DPtr)
d14a1e28
RD
1539
1540def Point2DCopy(*args, **kwargs):
0df68c9f
RD
1541 """
1542 Point2DCopy(Point2D pt) -> Point2D
e811c8ce 1543
0df68c9f
RD
1544 Create a w.Point2D object.
1545 """
54f9ee45 1546 val = _core_.new_Point2DCopy(*args, **kwargs)
d14a1e28
RD
1547 val.thisown = 1
1548 return val
1549
1550def Point2DFromPoint(*args, **kwargs):
0df68c9f
RD
1551 """
1552 Point2DFromPoint(Point pt) -> Point2D
e811c8ce 1553
0df68c9f
RD
1554 Create a w.Point2D object.
1555 """
54f9ee45 1556 val = _core_.new_Point2DFromPoint(*args, **kwargs)
d14a1e28
RD
1557 val.thisown = 1
1558 return val
1559
1560#---------------------------------------------------------------------------
1561
54f9ee45
RD
1562FromStart = _core_.FromStart
1563FromCurrent = _core_.FromCurrent
1564FromEnd = _core_.FromEnd
d14a1e28 1565class InputStream(object):
093d3ff1 1566 """Proxy of C++ InputStream class"""
e811c8ce
RD
1567 def __repr__(self):
1568 return "<%s.%s; proxy of C++ wxPyInputStream instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 1569 def __init__(self, *args, **kwargs):
a95a7133 1570 """__init__(self, PyObject p) -> InputStream"""
54f9ee45 1571 newobj = _core_.new_InputStream(*args, **kwargs)
d14a1e28
RD
1572 self.this = newobj.this
1573 self.thisown = 1
1574 del newobj.thisown
8fb0e70a
RD
1575 def __del__(self, destroy=_core_.delete_InputStream):
1576 """__del__(self)"""
1577 try:
1578 if self.thisown: destroy(self)
1579 except: pass
1580
e811c8ce 1581 def close(*args, **kwargs):
a95a7133 1582 """close(self)"""
54f9ee45 1583 return _core_.InputStream_close(*args, **kwargs)
e811c8ce
RD
1584
1585 def flush(*args, **kwargs):
a95a7133 1586 """flush(self)"""
54f9ee45 1587 return _core_.InputStream_flush(*args, **kwargs)
e811c8ce
RD
1588
1589 def eof(*args, **kwargs):
a95a7133 1590 """eof(self) -> bool"""
54f9ee45 1591 return _core_.InputStream_eof(*args, **kwargs)
e811c8ce
RD
1592
1593 def read(*args, **kwargs):
a95a7133 1594 """read(self, int size=-1) -> PyObject"""
54f9ee45 1595 return _core_.InputStream_read(*args, **kwargs)
e811c8ce
RD
1596
1597 def readline(*args, **kwargs):
a95a7133 1598 """readline(self, int size=-1) -> PyObject"""
54f9ee45 1599 return _core_.InputStream_readline(*args, **kwargs)
e811c8ce
RD
1600
1601 def readlines(*args, **kwargs):
a95a7133 1602 """readlines(self, int sizehint=-1) -> PyObject"""
54f9ee45 1603 return _core_.InputStream_readlines(*args, **kwargs)
e811c8ce
RD
1604
1605 def seek(*args, **kwargs):
a95a7133 1606 """seek(self, int offset, int whence=0)"""
54f9ee45 1607 return _core_.InputStream_seek(*args, **kwargs)
e811c8ce
RD
1608
1609 def tell(*args, **kwargs):
a95a7133 1610 """tell(self) -> int"""
54f9ee45 1611 return _core_.InputStream_tell(*args, **kwargs)
e811c8ce
RD
1612
1613 def Peek(*args, **kwargs):
a95a7133 1614 """Peek(self) -> char"""
54f9ee45 1615 return _core_.InputStream_Peek(*args, **kwargs)
e811c8ce
RD
1616
1617 def GetC(*args, **kwargs):
a95a7133 1618 """GetC(self) -> char"""
54f9ee45 1619 return _core_.InputStream_GetC(*args, **kwargs)
e811c8ce
RD
1620
1621 def LastRead(*args, **kwargs):
a95a7133 1622 """LastRead(self) -> size_t"""
54f9ee45 1623 return _core_.InputStream_LastRead(*args, **kwargs)
e811c8ce
RD
1624
1625 def CanRead(*args, **kwargs):
a95a7133 1626 """CanRead(self) -> bool"""
54f9ee45 1627 return _core_.InputStream_CanRead(*args, **kwargs)
e811c8ce
RD
1628
1629 def Eof(*args, **kwargs):
a95a7133 1630 """Eof(self) -> bool"""
54f9ee45 1631 return _core_.InputStream_Eof(*args, **kwargs)
e811c8ce
RD
1632
1633 def Ungetch(*args, **kwargs):
a95a7133 1634 """Ungetch(self, char c) -> bool"""
54f9ee45 1635 return _core_.InputStream_Ungetch(*args, **kwargs)
e811c8ce
RD
1636
1637 def SeekI(*args, **kwargs):
a95a7133 1638 """SeekI(self, long pos, int mode=FromStart) -> long"""
54f9ee45 1639 return _core_.InputStream_SeekI(*args, **kwargs)
e811c8ce
RD
1640
1641 def TellI(*args, **kwargs):
a95a7133 1642 """TellI(self) -> long"""
54f9ee45 1643 return _core_.InputStream_TellI(*args, **kwargs)
e811c8ce 1644
d14a1e28
RD
1645
1646class InputStreamPtr(InputStream):
1647 def __init__(self, this):
1648 self.this = this
1649 if not hasattr(self,"thisown"): self.thisown = 0
1650 self.__class__ = InputStream
54f9ee45 1651_core_.InputStream_swigregister(InputStreamPtr)
d14a1e28
RD
1652DefaultPosition = cvar.DefaultPosition
1653DefaultSize = cvar.DefaultSize
1654
1655class OutputStream(object):
093d3ff1 1656 """Proxy of C++ OutputStream class"""
d14a1e28
RD
1657 def __init__(self): raise RuntimeError, "No constructor defined"
1658 def __repr__(self):
1659 return "<%s.%s; proxy of C++ wxOutputStream instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
e811c8ce 1660 def write(*args, **kwargs):
a95a7133 1661 """write(self, PyObject obj)"""
54f9ee45 1662 return _core_.OutputStream_write(*args, **kwargs)
e811c8ce 1663
d14a1e28
RD
1664
1665class OutputStreamPtr(OutputStream):
1666 def __init__(self, this):
1667 self.this = this
1668 if not hasattr(self,"thisown"): self.thisown = 0
1669 self.__class__ = OutputStream
54f9ee45 1670_core_.OutputStream_swigregister(OutputStreamPtr)
d14a1e28
RD
1671
1672#---------------------------------------------------------------------------
1673
1674class FSFile(Object):
093d3ff1 1675 """Proxy of C++ FSFile class"""
e811c8ce
RD
1676 def __repr__(self):
1677 return "<%s.%s; proxy of C++ wxFSFile instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 1678 def __init__(self, *args, **kwargs):
0df68c9f 1679 """
a95a7133 1680 __init__(self, InputStream stream, String loc, String mimetype, String anchor,
196addbf 1681 DateTime modif) -> FSFile
0df68c9f 1682 """
54f9ee45 1683 newobj = _core_.new_FSFile(*args, **kwargs)
d14a1e28
RD
1684 self.this = newobj.this
1685 self.thisown = 1
1686 del newobj.thisown
4cf4100f
RD
1687 self.thisown = 0 # It will normally be deleted by the user of the wxFileSystem
1688
54f9ee45 1689 def __del__(self, destroy=_core_.delete_FSFile):
a95a7133 1690 """__del__(self)"""
d14a1e28
RD
1691 try:
1692 if self.thisown: destroy(self)
1693 except: pass
e811c8ce
RD
1694
1695 def GetStream(*args, **kwargs):
a95a7133 1696 """GetStream(self) -> InputStream"""
54f9ee45 1697 return _core_.FSFile_GetStream(*args, **kwargs)
e811c8ce
RD
1698
1699 def GetMimeType(*args, **kwargs):
a95a7133 1700 """GetMimeType(self) -> String"""
54f9ee45 1701 return _core_.FSFile_GetMimeType(*args, **kwargs)
e811c8ce
RD
1702
1703 def GetLocation(*args, **kwargs):
a95a7133 1704 """GetLocation(self) -> String"""
54f9ee45 1705 return _core_.FSFile_GetLocation(*args, **kwargs)
e811c8ce
RD
1706
1707 def GetAnchor(*args, **kwargs):
a95a7133 1708 """GetAnchor(self) -> String"""
54f9ee45 1709 return _core_.FSFile_GetAnchor(*args, **kwargs)
e811c8ce
RD
1710
1711 def GetModificationTime(*args, **kwargs):
a95a7133 1712 """GetModificationTime(self) -> DateTime"""
54f9ee45 1713 return _core_.FSFile_GetModificationTime(*args, **kwargs)
e811c8ce 1714
d14a1e28
RD
1715
1716class FSFilePtr(FSFile):
1717 def __init__(self, this):
1718 self.this = this
1719 if not hasattr(self,"thisown"): self.thisown = 0
1720 self.__class__ = FSFile
54f9ee45 1721_core_.FSFile_swigregister(FSFilePtr)
d14a1e28
RD
1722
1723class CPPFileSystemHandler(object):
093d3ff1 1724 """Proxy of C++ CPPFileSystemHandler class"""
d14a1e28
RD
1725 def __init__(self): raise RuntimeError, "No constructor defined"
1726 def __repr__(self):
1727 return "<%s.%s; proxy of C++ wxFileSystemHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
1728
1729class CPPFileSystemHandlerPtr(CPPFileSystemHandler):
1730 def __init__(self, this):
1731 self.this = this
1732 if not hasattr(self,"thisown"): self.thisown = 0
1733 self.__class__ = CPPFileSystemHandler
54f9ee45 1734_core_.CPPFileSystemHandler_swigregister(CPPFileSystemHandlerPtr)
d14a1e28
RD
1735
1736class FileSystemHandler(CPPFileSystemHandler):
093d3ff1 1737 """Proxy of C++ FileSystemHandler class"""
e811c8ce
RD
1738 def __repr__(self):
1739 return "<%s.%s; proxy of C++ wxPyFileSystemHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 1740 def __init__(self, *args, **kwargs):
a95a7133 1741 """__init__(self) -> FileSystemHandler"""
54f9ee45 1742 newobj = _core_.new_FileSystemHandler(*args, **kwargs)
d14a1e28
RD
1743 self.this = newobj.this
1744 self.thisown = 1
1745 del newobj.thisown
1746 self._setCallbackInfo(self, FileSystemHandler)
e811c8ce
RD
1747
1748 def _setCallbackInfo(*args, **kwargs):
a95a7133 1749 """_setCallbackInfo(self, PyObject self, PyObject _class)"""
54f9ee45 1750 return _core_.FileSystemHandler__setCallbackInfo(*args, **kwargs)
e811c8ce
RD
1751
1752 def CanOpen(*args, **kwargs):
a95a7133 1753 """CanOpen(self, String location) -> bool"""
54f9ee45 1754 return _core_.FileSystemHandler_CanOpen(*args, **kwargs)
e811c8ce
RD
1755
1756 def OpenFile(*args, **kwargs):
a95a7133 1757 """OpenFile(self, FileSystem fs, String location) -> FSFile"""
54f9ee45 1758 return _core_.FileSystemHandler_OpenFile(*args, **kwargs)
e811c8ce
RD
1759
1760 def FindFirst(*args, **kwargs):
a95a7133 1761 """FindFirst(self, String spec, int flags=0) -> String"""
54f9ee45 1762 return _core_.FileSystemHandler_FindFirst(*args, **kwargs)
e811c8ce
RD
1763
1764 def FindNext(*args, **kwargs):
a95a7133 1765 """FindNext(self) -> String"""
54f9ee45 1766 return _core_.FileSystemHandler_FindNext(*args, **kwargs)
e811c8ce
RD
1767
1768 def GetProtocol(*args, **kwargs):
a95a7133 1769 """GetProtocol(self, String location) -> String"""
54f9ee45 1770 return _core_.FileSystemHandler_GetProtocol(*args, **kwargs)
e811c8ce
RD
1771
1772 def GetLeftLocation(*args, **kwargs):
a95a7133 1773 """GetLeftLocation(self, String location) -> String"""
54f9ee45 1774 return _core_.FileSystemHandler_GetLeftLocation(*args, **kwargs)
e811c8ce
RD
1775
1776 def GetAnchor(*args, **kwargs):
a95a7133 1777 """GetAnchor(self, String location) -> String"""
54f9ee45 1778 return _core_.FileSystemHandler_GetAnchor(*args, **kwargs)
e811c8ce
RD
1779
1780 def GetRightLocation(*args, **kwargs):
a95a7133 1781 """GetRightLocation(self, String location) -> String"""
54f9ee45 1782 return _core_.FileSystemHandler_GetRightLocation(*args, **kwargs)
e811c8ce
RD
1783
1784 def GetMimeTypeFromExt(*args, **kwargs):
a95a7133 1785 """GetMimeTypeFromExt(self, String location) -> String"""
54f9ee45 1786 return _core_.FileSystemHandler_GetMimeTypeFromExt(*args, **kwargs)
e811c8ce 1787
d14a1e28
RD
1788
1789class FileSystemHandlerPtr(FileSystemHandler):
1790 def __init__(self, this):
1791 self.this = this
1792 if not hasattr(self,"thisown"): self.thisown = 0
1793 self.__class__ = FileSystemHandler
54f9ee45 1794_core_.FileSystemHandler_swigregister(FileSystemHandlerPtr)
d14a1e28
RD
1795
1796class FileSystem(Object):
093d3ff1 1797 """Proxy of C++ FileSystem class"""
e811c8ce
RD
1798 def __repr__(self):
1799 return "<%s.%s; proxy of C++ wxFileSystem instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 1800 def __init__(self, *args, **kwargs):
a95a7133 1801 """__init__(self) -> FileSystem"""
54f9ee45 1802 newobj = _core_.new_FileSystem(*args, **kwargs)
d14a1e28
RD
1803 self.this = newobj.this
1804 self.thisown = 1
1805 del newobj.thisown
54f9ee45 1806 def __del__(self, destroy=_core_.delete_FileSystem):
a95a7133 1807 """__del__(self)"""
d14a1e28
RD
1808 try:
1809 if self.thisown: destroy(self)
1810 except: pass
e811c8ce
RD
1811
1812 def ChangePathTo(*args, **kwargs):
a95a7133 1813 """ChangePathTo(self, String location, bool is_dir=False)"""
54f9ee45 1814 return _core_.FileSystem_ChangePathTo(*args, **kwargs)
e811c8ce
RD
1815
1816 def GetPath(*args, **kwargs):
a95a7133 1817 """GetPath(self) -> String"""
54f9ee45 1818 return _core_.FileSystem_GetPath(*args, **kwargs)
e811c8ce
RD
1819
1820 def OpenFile(*args, **kwargs):
a95a7133 1821 """OpenFile(self, String location) -> FSFile"""
54f9ee45 1822 return _core_.FileSystem_OpenFile(*args, **kwargs)
e811c8ce
RD
1823
1824 def FindFirst(*args, **kwargs):
a95a7133 1825 """FindFirst(self, String spec, int flags=0) -> String"""
54f9ee45 1826 return _core_.FileSystem_FindFirst(*args, **kwargs)
e811c8ce
RD
1827
1828 def FindNext(*args, **kwargs):
a95a7133 1829 """FindNext(self) -> String"""
54f9ee45 1830 return _core_.FileSystem_FindNext(*args, **kwargs)
e811c8ce
RD
1831
1832 def AddHandler(*args, **kwargs):
66c033b4 1833 """AddHandler(CPPFileSystemHandler handler)"""
54f9ee45 1834 return _core_.FileSystem_AddHandler(*args, **kwargs)
e811c8ce
RD
1835
1836 AddHandler = staticmethod(AddHandler)
1837 def CleanUpHandlers(*args, **kwargs):
66c033b4 1838 """CleanUpHandlers()"""
54f9ee45 1839 return _core_.FileSystem_CleanUpHandlers(*args, **kwargs)
e811c8ce
RD
1840
1841 CleanUpHandlers = staticmethod(CleanUpHandlers)
1842 def FileNameToURL(*args, **kwargs):
66c033b4 1843 """FileNameToURL(String filename) -> String"""
54f9ee45 1844 return _core_.FileSystem_FileNameToURL(*args, **kwargs)
e811c8ce
RD
1845
1846 FileNameToURL = staticmethod(FileNameToURL)
2ef75293
RD
1847 def URLToFileName(*args, **kwargs):
1848 """URLToFileName(String url) -> String"""
1849 return _core_.FileSystem_URLToFileName(*args, **kwargs)
1850
1851 URLToFileName = staticmethod(URLToFileName)
d14a1e28
RD
1852
1853class FileSystemPtr(FileSystem):
1854 def __init__(self, this):
1855 self.this = this
1856 if not hasattr(self,"thisown"): self.thisown = 0
1857 self.__class__ = FileSystem
54f9ee45 1858_core_.FileSystem_swigregister(FileSystemPtr)
d14a1e28 1859
e811c8ce
RD
1860def FileSystem_AddHandler(*args, **kwargs):
1861 """FileSystem_AddHandler(CPPFileSystemHandler handler)"""
54f9ee45 1862 return _core_.FileSystem_AddHandler(*args, **kwargs)
d14a1e28 1863
e811c8ce
RD
1864def FileSystem_CleanUpHandlers(*args, **kwargs):
1865 """FileSystem_CleanUpHandlers()"""
54f9ee45 1866 return _core_.FileSystem_CleanUpHandlers(*args, **kwargs)
d14a1e28 1867
e811c8ce 1868def FileSystem_FileNameToURL(*args, **kwargs):
196addbf 1869 """FileSystem_FileNameToURL(String filename) -> String"""
54f9ee45 1870 return _core_.FileSystem_FileNameToURL(*args, **kwargs)
d14a1e28 1871
e811c8ce 1872def FileSystem_URLToFileName(*args, **kwargs):
196addbf 1873 """FileSystem_URLToFileName(String url) -> String"""
54f9ee45 1874 return _core_.FileSystem_URLToFileName(*args, **kwargs)
2ef75293 1875
d14a1e28 1876class InternetFSHandler(CPPFileSystemHandler):
093d3ff1 1877 """Proxy of C++ InternetFSHandler class"""
e811c8ce
RD
1878 def __repr__(self):
1879 return "<%s.%s; proxy of C++ wxInternetFSHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 1880 def __init__(self, *args, **kwargs):
a95a7133 1881 """__init__(self) -> InternetFSHandler"""
54f9ee45 1882 newobj = _core_.new_InternetFSHandler(*args, **kwargs)
d14a1e28
RD
1883 self.this = newobj.this
1884 self.thisown = 1
1885 del newobj.thisown
e811c8ce 1886 def CanOpen(*args, **kwargs):
a95a7133 1887 """CanOpen(self, String location) -> bool"""
54f9ee45 1888 return _core_.InternetFSHandler_CanOpen(*args, **kwargs)
e811c8ce
RD
1889
1890 def OpenFile(*args, **kwargs):
a95a7133 1891 """OpenFile(self, FileSystem fs, String location) -> FSFile"""
54f9ee45 1892 return _core_.InternetFSHandler_OpenFile(*args, **kwargs)
e811c8ce 1893
d14a1e28
RD
1894
1895class InternetFSHandlerPtr(InternetFSHandler):
1896 def __init__(self, this):
1897 self.this = this
1898 if not hasattr(self,"thisown"): self.thisown = 0
1899 self.__class__ = InternetFSHandler
54f9ee45 1900_core_.InternetFSHandler_swigregister(InternetFSHandlerPtr)
d14a1e28
RD
1901
1902class ZipFSHandler(CPPFileSystemHandler):
093d3ff1 1903 """Proxy of C++ ZipFSHandler class"""
e811c8ce
RD
1904 def __repr__(self):
1905 return "<%s.%s; proxy of C++ wxZipFSHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 1906 def __init__(self, *args, **kwargs):
a95a7133 1907 """__init__(self) -> ZipFSHandler"""
54f9ee45 1908 newobj = _core_.new_ZipFSHandler(*args, **kwargs)
d14a1e28
RD
1909 self.this = newobj.this
1910 self.thisown = 1
1911 del newobj.thisown
e811c8ce 1912 def CanOpen(*args, **kwargs):
a95a7133 1913 """CanOpen(self, String location) -> bool"""
54f9ee45 1914 return _core_.ZipFSHandler_CanOpen(*args, **kwargs)
e811c8ce
RD
1915
1916 def OpenFile(*args, **kwargs):
a95a7133 1917 """OpenFile(self, FileSystem fs, String location) -> FSFile"""
54f9ee45 1918 return _core_.ZipFSHandler_OpenFile(*args, **kwargs)
e811c8ce
RD
1919
1920 def FindFirst(*args, **kwargs):
a95a7133 1921 """FindFirst(self, String spec, int flags=0) -> String"""
54f9ee45 1922 return _core_.ZipFSHandler_FindFirst(*args, **kwargs)
e811c8ce
RD
1923
1924 def FindNext(*args, **kwargs):
a95a7133 1925 """FindNext(self) -> String"""
54f9ee45 1926 return _core_.ZipFSHandler_FindNext(*args, **kwargs)
e811c8ce 1927
d14a1e28
RD
1928
1929class ZipFSHandlerPtr(ZipFSHandler):
1930 def __init__(self, this):
1931 self.this = this
1932 if not hasattr(self,"thisown"): self.thisown = 0
1933 self.__class__ = ZipFSHandler
54f9ee45 1934_core_.ZipFSHandler_swigregister(ZipFSHandlerPtr)
d14a1e28
RD
1935
1936
e811c8ce 1937def __wxMemoryFSHandler_AddFile_wxImage(*args, **kwargs):
196addbf 1938 """__wxMemoryFSHandler_AddFile_wxImage(String filename, Image image, long type)"""
54f9ee45 1939 return _core_.__wxMemoryFSHandler_AddFile_wxImage(*args, **kwargs)
d14a1e28 1940
e811c8ce 1941def __wxMemoryFSHandler_AddFile_wxBitmap(*args, **kwargs):
196addbf 1942 """__wxMemoryFSHandler_AddFile_wxBitmap(String filename, Bitmap bitmap, long type)"""
54f9ee45 1943 return _core_.__wxMemoryFSHandler_AddFile_wxBitmap(*args, **kwargs)
d14a1e28 1944
e811c8ce 1945def __wxMemoryFSHandler_AddFile_Data(*args, **kwargs):
196addbf 1946 """__wxMemoryFSHandler_AddFile_Data(String filename, PyObject data)"""
54f9ee45 1947 return _core_.__wxMemoryFSHandler_AddFile_Data(*args, **kwargs)
2ef75293
RD
1948def MemoryFSHandler_AddFile(filename, dataItem, imgType=-1):
1949 """
1950 Add 'file' to the memory filesystem. The dataItem parameter can
1951 either be a `wx.Bitmap`, `wx.Image` or a string that can contain
1952 arbitrary data. If a bitmap or image is used then the imgType
1953 parameter should specify what kind of image file it should be
1954 written as, wx.BITMAP_TYPE_PNG, etc.
1955 """
1956 if isinstance(dataItem, wx.Image):
1957 __wxMemoryFSHandler_AddFile_wxImage(filename, dataItem, imgType)
1958 elif isinstance(dataItem, wx.Bitmap):
1959 __wxMemoryFSHandler_AddFile_wxBitmap(filename, dataItem, imgType)
1960 elif type(dataItem) == str:
1961 __wxMemoryFSHandler_AddFile_Data(filename, dataItem)
1962 else:
1963 raise TypeError, 'wx.Image, wx.Bitmap or string expected'
d14a1e28
RD
1964
1965class MemoryFSHandler(CPPFileSystemHandler):
093d3ff1 1966 """Proxy of C++ MemoryFSHandler class"""
e811c8ce
RD
1967 def __repr__(self):
1968 return "<%s.%s; proxy of C++ wxMemoryFSHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 1969 def __init__(self, *args, **kwargs):
a95a7133 1970 """__init__(self) -> MemoryFSHandler"""
54f9ee45 1971 newobj = _core_.new_MemoryFSHandler(*args, **kwargs)
d14a1e28
RD
1972 self.this = newobj.this
1973 self.thisown = 1
1974 del newobj.thisown
e811c8ce 1975 def RemoveFile(*args, **kwargs):
66c033b4 1976 """RemoveFile(String filename)"""
54f9ee45 1977 return _core_.MemoryFSHandler_RemoveFile(*args, **kwargs)
e811c8ce
RD
1978
1979 RemoveFile = staticmethod(RemoveFile)
d14a1e28 1980 AddFile = staticmethod(MemoryFSHandler_AddFile)
e811c8ce 1981 def CanOpen(*args, **kwargs):
a95a7133 1982 """CanOpen(self, String location) -> bool"""
54f9ee45 1983 return _core_.MemoryFSHandler_CanOpen(*args, **kwargs)
e811c8ce
RD
1984
1985 def OpenFile(*args, **kwargs):
a95a7133 1986 """OpenFile(self, FileSystem fs, String location) -> FSFile"""
54f9ee45 1987 return _core_.MemoryFSHandler_OpenFile(*args, **kwargs)
e811c8ce
RD
1988
1989 def FindFirst(*args, **kwargs):
a95a7133 1990 """FindFirst(self, String spec, int flags=0) -> String"""
54f9ee45 1991 return _core_.MemoryFSHandler_FindFirst(*args, **kwargs)
e811c8ce
RD
1992
1993 def FindNext(*args, **kwargs):
a95a7133 1994 """FindNext(self) -> String"""
54f9ee45 1995 return _core_.MemoryFSHandler_FindNext(*args, **kwargs)
e811c8ce 1996
d14a1e28
RD
1997
1998class MemoryFSHandlerPtr(MemoryFSHandler):
1999 def __init__(self, this):
2000 self.this = this
2001 if not hasattr(self,"thisown"): self.thisown = 0
2002 self.__class__ = MemoryFSHandler
54f9ee45 2003_core_.MemoryFSHandler_swigregister(MemoryFSHandlerPtr)
d14a1e28 2004
e811c8ce 2005def MemoryFSHandler_RemoveFile(*args, **kwargs):
196addbf 2006 """MemoryFSHandler_RemoveFile(String filename)"""
54f9ee45 2007 return _core_.MemoryFSHandler_RemoveFile(*args, **kwargs)
d14a1e28
RD
2008
2009#---------------------------------------------------------------------------
2010
2011class ImageHandler(Object):
093d3ff1 2012 """Proxy of C++ ImageHandler class"""
d14a1e28
RD
2013 def __init__(self): raise RuntimeError, "No constructor defined"
2014 def __repr__(self):
2015 return "<%s.%s; proxy of C++ wxImageHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
e811c8ce 2016 def GetName(*args, **kwargs):
a95a7133 2017 """GetName(self) -> String"""
54f9ee45 2018 return _core_.ImageHandler_GetName(*args, **kwargs)
e811c8ce
RD
2019
2020 def GetExtension(*args, **kwargs):
a95a7133 2021 """GetExtension(self) -> String"""
54f9ee45 2022 return _core_.ImageHandler_GetExtension(*args, **kwargs)
e811c8ce
RD
2023
2024 def GetType(*args, **kwargs):
a95a7133 2025 """GetType(self) -> long"""
54f9ee45 2026 return _core_.ImageHandler_GetType(*args, **kwargs)
e811c8ce
RD
2027
2028 def GetMimeType(*args, **kwargs):
a95a7133 2029 """GetMimeType(self) -> String"""
54f9ee45 2030 return _core_.ImageHandler_GetMimeType(*args, **kwargs)
e811c8ce
RD
2031
2032 def CanRead(*args, **kwargs):
a95a7133 2033 """CanRead(self, String name) -> bool"""
54f9ee45 2034 return _core_.ImageHandler_CanRead(*args, **kwargs)
e811c8ce
RD
2035
2036 def SetName(*args, **kwargs):
a95a7133 2037 """SetName(self, String name)"""
54f9ee45 2038 return _core_.ImageHandler_SetName(*args, **kwargs)
e811c8ce
RD
2039
2040 def SetExtension(*args, **kwargs):
a95a7133 2041 """SetExtension(self, String extension)"""
54f9ee45 2042 return _core_.ImageHandler_SetExtension(*args, **kwargs)
e811c8ce
RD
2043
2044 def SetType(*args, **kwargs):
a95a7133 2045 """SetType(self, long type)"""
54f9ee45 2046 return _core_.ImageHandler_SetType(*args, **kwargs)
e811c8ce
RD
2047
2048 def SetMimeType(*args, **kwargs):
a95a7133 2049 """SetMimeType(self, String mimetype)"""
54f9ee45 2050 return _core_.ImageHandler_SetMimeType(*args, **kwargs)
e811c8ce 2051
d14a1e28
RD
2052
2053class ImageHandlerPtr(ImageHandler):
2054 def __init__(self, this):
2055 self.this = this
2056 if not hasattr(self,"thisown"): self.thisown = 0
2057 self.__class__ = ImageHandler
54f9ee45 2058_core_.ImageHandler_swigregister(ImageHandlerPtr)
d14a1e28
RD
2059
2060class ImageHistogram(object):
093d3ff1 2061 """Proxy of C++ ImageHistogram class"""
e811c8ce
RD
2062 def __repr__(self):
2063 return "<%s.%s; proxy of C++ wxImageHistogram instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 2064 def __init__(self, *args, **kwargs):
a95a7133 2065 """__init__(self) -> ImageHistogram"""
54f9ee45 2066 newobj = _core_.new_ImageHistogram(*args, **kwargs)
d14a1e28
RD
2067 self.this = newobj.this
2068 self.thisown = 1
2069 del newobj.thisown
e811c8ce 2070 def MakeKey(*args, **kwargs):
0df68c9f 2071 """
66c033b4 2072 MakeKey(unsigned char r, unsigned char g, unsigned char b) -> unsigned long
e811c8ce 2073
0df68c9f
RD
2074 Get the key in the histogram for the given RGB values
2075 """
54f9ee45 2076 return _core_.ImageHistogram_MakeKey(*args, **kwargs)
e811c8ce
RD
2077
2078 MakeKey = staticmethod(MakeKey)
2079 def FindFirstUnusedColour(*args, **kwargs):
fd2dc343
RD
2080 """
2081 FindFirstUnusedColour(int startR=1, int startG=0, int startB=0) -> (success, r, g, b)
2082
2083 Find first colour that is not used in the image and has higher RGB
2084 values than startR, startG, startB. Returns a tuple consisting of a
2085 success flag and rgb values.
2086 """
54f9ee45 2087 return _core_.ImageHistogram_FindFirstUnusedColour(*args, **kwargs)
e811c8ce 2088
d14a1e28
RD
2089
2090class ImageHistogramPtr(ImageHistogram):
2091 def __init__(self, this):
2092 self.this = this
2093 if not hasattr(self,"thisown"): self.thisown = 0
2094 self.__class__ = ImageHistogram
54f9ee45 2095_core_.ImageHistogram_swigregister(ImageHistogramPtr)
d14a1e28 2096
e811c8ce 2097def ImageHistogram_MakeKey(*args, **kwargs):
0df68c9f
RD
2098 """
2099 ImageHistogram_MakeKey(unsigned char r, unsigned char g, unsigned char b) -> unsigned long
e811c8ce 2100
0df68c9f
RD
2101 Get the key in the histogram for the given RGB values
2102 """
54f9ee45 2103 return _core_.ImageHistogram_MakeKey(*args, **kwargs)
d14a1e28
RD
2104
2105class Image(Object):
093d3ff1 2106 """Proxy of C++ Image class"""
e811c8ce
RD
2107 def __repr__(self):
2108 return "<%s.%s; proxy of C++ wxImage instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 2109 def __init__(self, *args, **kwargs):
a95a7133 2110 """__init__(self, String name, long type=BITMAP_TYPE_ANY, int index=-1) -> Image"""
54f9ee45 2111 newobj = _core_.new_Image(*args, **kwargs)
d14a1e28
RD
2112 self.this = newobj.this
2113 self.thisown = 1
2114 del newobj.thisown
54f9ee45 2115 def __del__(self, destroy=_core_.delete_Image):
a95a7133 2116 """__del__(self)"""
d14a1e28
RD
2117 try:
2118 if self.thisown: destroy(self)
2119 except: pass
e811c8ce
RD
2120
2121 def Create(*args, **kwargs):
a95a7133 2122 """Create(self, int width, int height)"""
54f9ee45 2123 return _core_.Image_Create(*args, **kwargs)
e811c8ce
RD
2124
2125 def Destroy(*args, **kwargs):
0df68c9f 2126 """
a95a7133 2127 Destroy(self)
e811c8ce 2128
0df68c9f
RD
2129 Deletes the C++ object this Python object is a proxy for.
2130 """
54f9ee45 2131 return _core_.Image_Destroy(*args, **kwargs)
e811c8ce
RD
2132
2133 def Scale(*args, **kwargs):
a95a7133 2134 """Scale(self, int width, int height) -> Image"""
54f9ee45 2135 return _core_.Image_Scale(*args, **kwargs)
e811c8ce
RD
2136
2137 def ShrinkBy(*args, **kwargs):
a95a7133 2138 """ShrinkBy(self, int xFactor, int yFactor) -> Image"""
54f9ee45 2139 return _core_.Image_ShrinkBy(*args, **kwargs)
e811c8ce
RD
2140
2141 def Rescale(*args, **kwargs):
a95a7133 2142 """Rescale(self, int width, int height) -> Image"""
54f9ee45 2143 return _core_.Image_Rescale(*args, **kwargs)
e811c8ce
RD
2144
2145 def SetRGB(*args, **kwargs):
a95a7133 2146 """SetRGB(self, int x, int y, unsigned char r, unsigned char g, unsigned char b)"""
54f9ee45 2147 return _core_.Image_SetRGB(*args, **kwargs)
e811c8ce
RD
2148
2149 def GetRed(*args, **kwargs):
a95a7133 2150 """GetRed(self, int x, int y) -> unsigned char"""
54f9ee45 2151 return _core_.Image_GetRed(*args, **kwargs)
e811c8ce
RD
2152
2153 def GetGreen(*args, **kwargs):
a95a7133 2154 """GetGreen(self, int x, int y) -> unsigned char"""
54f9ee45 2155 return _core_.Image_GetGreen(*args, **kwargs)
e811c8ce
RD
2156
2157 def GetBlue(*args, **kwargs):
a95a7133 2158 """GetBlue(self, int x, int y) -> unsigned char"""
54f9ee45 2159 return _core_.Image_GetBlue(*args, **kwargs)
e811c8ce
RD
2160
2161 def SetAlpha(*args, **kwargs):
a95a7133 2162 """SetAlpha(self, int x, int y, unsigned char alpha)"""
54f9ee45 2163 return _core_.Image_SetAlpha(*args, **kwargs)
e811c8ce
RD
2164
2165 def GetAlpha(*args, **kwargs):
a95a7133 2166 """GetAlpha(self, int x, int y) -> unsigned char"""
54f9ee45 2167 return _core_.Image_GetAlpha(*args, **kwargs)
e811c8ce
RD
2168
2169 def HasAlpha(*args, **kwargs):
a95a7133 2170 """HasAlpha(self) -> bool"""
54f9ee45 2171 return _core_.Image_HasAlpha(*args, **kwargs)
e811c8ce
RD
2172
2173 def FindFirstUnusedColour(*args, **kwargs):
fd2dc343
RD
2174 """
2175 FindFirstUnusedColour(int startR=1, int startG=0, int startB=0) -> (success, r, g, b)
2176
2177 Find first colour that is not used in the image and has higher RGB
2178 values than startR, startG, startB. Returns a tuple consisting of a
2179 success flag and rgb values.
2180 """
54f9ee45 2181 return _core_.Image_FindFirstUnusedColour(*args, **kwargs)
e811c8ce 2182
4cf4100f
RD
2183 def ConvertAlphaToMask(*args, **kwargs):
2184 """
2185 ConvertAlphaToMask(self, byte threshold=128) -> bool
2186
2187 If the image has alpha channel, this method converts it to mask. All pixels
2188 with alpha value less than ``threshold`` are replaced with mask colour and the
2189 alpha channel is removed. Mask colour is chosen automatically using
2190 `FindFirstUnusedColour`.
2191
2192 If the image image doesn't have alpha channel, ConvertAlphaToMask does
2193 nothing.
2194 """
2195 return _core_.Image_ConvertAlphaToMask(*args, **kwargs)
2196
8fb0e70a
RD
2197 def ConvertColourToAlpha(*args, **kwargs):
2198 """
2199 ConvertColourToAlpha(self, unsigned char r, unsigned char g, unsigned char b) -> bool
2200
2201 This method converts an image where the original alpha information is
2202 only available as a shades of a colour (actually shades of grey)
2203 typically when you draw anti-aliased text into a bitmap. The DC
2204 drawing routines draw grey values on the black background although
2205 they actually mean to draw white with differnt alpha values. This
2206 method reverses it, assuming a black (!) background and white text.
2207 The method will then fill up the whole image with the colour given.
2208 """
2209 return _core_.Image_ConvertColourToAlpha(*args, **kwargs)
2210
e811c8ce 2211 def SetMaskFromImage(*args, **kwargs):
a95a7133 2212 """SetMaskFromImage(self, Image mask, byte mr, byte mg, byte mb) -> bool"""
54f9ee45 2213 return _core_.Image_SetMaskFromImage(*args, **kwargs)
e811c8ce
RD
2214
2215 def CanRead(*args, **kwargs):
66c033b4 2216 """CanRead(String name) -> bool"""
54f9ee45 2217 return _core_.Image_CanRead(*args, **kwargs)
e811c8ce
RD
2218
2219 CanRead = staticmethod(CanRead)
2220 def GetImageCount(*args, **kwargs):
66c033b4 2221 """GetImageCount(String name, long type=BITMAP_TYPE_ANY) -> int"""
54f9ee45 2222 return _core_.Image_GetImageCount(*args, **kwargs)
e811c8ce
RD
2223
2224 GetImageCount = staticmethod(GetImageCount)
2225 def LoadFile(*args, **kwargs):
a95a7133 2226 """LoadFile(self, String name, long type=BITMAP_TYPE_ANY, int index=-1) -> bool"""
54f9ee45 2227 return _core_.Image_LoadFile(*args, **kwargs)
e811c8ce
RD
2228
2229 def LoadMimeFile(*args, **kwargs):
a95a7133 2230 """LoadMimeFile(self, String name, String mimetype, int index=-1) -> bool"""
54f9ee45 2231 return _core_.Image_LoadMimeFile(*args, **kwargs)
e811c8ce
RD
2232
2233 def SaveFile(*args, **kwargs):
a95a7133 2234 """SaveFile(self, String name, int type) -> bool"""
54f9ee45 2235 return _core_.Image_SaveFile(*args, **kwargs)
e811c8ce
RD
2236
2237 def SaveMimeFile(*args, **kwargs):
a95a7133 2238 """SaveMimeFile(self, String name, String mimetype) -> bool"""
54f9ee45 2239 return _core_.Image_SaveMimeFile(*args, **kwargs)
e811c8ce
RD
2240
2241 def CanReadStream(*args, **kwargs):
66c033b4 2242 """CanReadStream(InputStream stream) -> bool"""
54f9ee45 2243 return _core_.Image_CanReadStream(*args, **kwargs)
e811c8ce
RD
2244
2245 CanReadStream = staticmethod(CanReadStream)
2246 def LoadStream(*args, **kwargs):
a95a7133 2247 """LoadStream(self, InputStream stream, long type=BITMAP_TYPE_ANY, int index=-1) -> bool"""
54f9ee45 2248 return _core_.Image_LoadStream(*args, **kwargs)
e811c8ce
RD
2249
2250 def LoadMimeStream(*args, **kwargs):
a95a7133 2251 """LoadMimeStream(self, InputStream stream, String mimetype, int index=-1) -> bool"""
54f9ee45 2252 return _core_.Image_LoadMimeStream(*args, **kwargs)
e811c8ce
RD
2253
2254 def Ok(*args, **kwargs):
a95a7133 2255 """Ok(self) -> bool"""
54f9ee45 2256 return _core_.Image_Ok(*args, **kwargs)
e811c8ce
RD
2257
2258 def GetWidth(*args, **kwargs):
a95a7133 2259 """GetWidth(self) -> int"""
54f9ee45 2260 return _core_.Image_GetWidth(*args, **kwargs)
e811c8ce
RD
2261
2262 def GetHeight(*args, **kwargs):
a95a7133 2263 """GetHeight(self) -> int"""
54f9ee45 2264 return _core_.Image_GetHeight(*args, **kwargs)
e811c8ce 2265
b2df227b 2266 def GetSize(*args, **kwargs):
a95a7133 2267 """GetSize(self) -> Size"""
54f9ee45 2268 return _core_.Image_GetSize(*args, **kwargs)
b2df227b 2269
e811c8ce 2270 def GetSubImage(*args, **kwargs):
a95a7133 2271 """GetSubImage(self, Rect rect) -> Image"""
54f9ee45 2272 return _core_.Image_GetSubImage(*args, **kwargs)
e811c8ce
RD
2273
2274 def Copy(*args, **kwargs):
a95a7133 2275 """Copy(self) -> Image"""
54f9ee45 2276 return _core_.Image_Copy(*args, **kwargs)
e811c8ce
RD
2277
2278 def Paste(*args, **kwargs):
a95a7133 2279 """Paste(self, Image image, int x, int y)"""
54f9ee45 2280 return _core_.Image_Paste(*args, **kwargs)
e811c8ce
RD
2281
2282 def GetData(*args, **kwargs):
a95a7133 2283 """GetData(self) -> PyObject"""
54f9ee45 2284 return _core_.Image_GetData(*args, **kwargs)
e811c8ce
RD
2285
2286 def SetData(*args, **kwargs):
a95a7133 2287 """SetData(self, PyObject data)"""
54f9ee45 2288 return _core_.Image_SetData(*args, **kwargs)
e811c8ce
RD
2289
2290 def GetDataBuffer(*args, **kwargs):
a95a7133 2291 """GetDataBuffer(self) -> PyObject"""
54f9ee45 2292 return _core_.Image_GetDataBuffer(*args, **kwargs)
e811c8ce
RD
2293
2294 def SetDataBuffer(*args, **kwargs):
a95a7133 2295 """SetDataBuffer(self, PyObject data)"""
54f9ee45 2296 return _core_.Image_SetDataBuffer(*args, **kwargs)
e811c8ce
RD
2297
2298 def GetAlphaData(*args, **kwargs):
a95a7133 2299 """GetAlphaData(self) -> PyObject"""
54f9ee45 2300 return _core_.Image_GetAlphaData(*args, **kwargs)
e811c8ce
RD
2301
2302 def SetAlphaData(*args, **kwargs):
a95a7133 2303 """SetAlphaData(self, PyObject data)"""
54f9ee45 2304 return _core_.Image_SetAlphaData(*args, **kwargs)
e811c8ce
RD
2305
2306 def GetAlphaBuffer(*args, **kwargs):
a95a7133 2307 """GetAlphaBuffer(self) -> PyObject"""
54f9ee45 2308 return _core_.Image_GetAlphaBuffer(*args, **kwargs)
e811c8ce
RD
2309
2310 def SetAlphaBuffer(*args, **kwargs):
a95a7133 2311 """SetAlphaBuffer(self, PyObject data)"""
54f9ee45 2312 return _core_.Image_SetAlphaBuffer(*args, **kwargs)
e811c8ce
RD
2313
2314 def SetMaskColour(*args, **kwargs):
a95a7133 2315 """SetMaskColour(self, unsigned char r, unsigned char g, unsigned char b)"""
54f9ee45 2316 return _core_.Image_SetMaskColour(*args, **kwargs)
e811c8ce
RD
2317
2318 def GetMaskRed(*args, **kwargs):
a95a7133 2319 """GetMaskRed(self) -> unsigned char"""
54f9ee45 2320 return _core_.Image_GetMaskRed(*args, **kwargs)
e811c8ce
RD
2321
2322 def GetMaskGreen(*args, **kwargs):
a95a7133 2323 """GetMaskGreen(self) -> unsigned char"""
54f9ee45 2324 return _core_.Image_GetMaskGreen(*args, **kwargs)
e811c8ce
RD
2325
2326 def GetMaskBlue(*args, **kwargs):
a95a7133 2327 """GetMaskBlue(self) -> unsigned char"""
54f9ee45 2328 return _core_.Image_GetMaskBlue(*args, **kwargs)
e811c8ce
RD
2329
2330 def SetMask(*args, **kwargs):
a95a7133 2331 """SetMask(self, bool mask=True)"""
54f9ee45 2332 return _core_.Image_SetMask(*args, **kwargs)
e811c8ce
RD
2333
2334 def HasMask(*args, **kwargs):
a95a7133 2335 """HasMask(self) -> bool"""
54f9ee45 2336 return _core_.Image_HasMask(*args, **kwargs)
e811c8ce
RD
2337
2338 def Rotate(*args, **kwargs):
0df68c9f 2339 """
a95a7133 2340 Rotate(self, double angle, Point centre_of_rotation, bool interpolating=True,
0df68c9f
RD
2341 Point offset_after_rotation=None) -> Image
2342 """
54f9ee45 2343 return _core_.Image_Rotate(*args, **kwargs)
e811c8ce
RD
2344
2345 def Rotate90(*args, **kwargs):
a95a7133 2346 """Rotate90(self, bool clockwise=True) -> Image"""
54f9ee45 2347 return _core_.Image_Rotate90(*args, **kwargs)
e811c8ce
RD
2348
2349 def Mirror(*args, **kwargs):
a95a7133 2350 """Mirror(self, bool horizontally=True) -> Image"""
54f9ee45 2351 return _core_.Image_Mirror(*args, **kwargs)
e811c8ce
RD
2352
2353 def Replace(*args, **kwargs):
0df68c9f 2354 """
a95a7133 2355 Replace(self, unsigned char r1, unsigned char g1, unsigned char b1,
0df68c9f
RD
2356 unsigned char r2, unsigned char g2, unsigned char b2)
2357 """
54f9ee45 2358 return _core_.Image_Replace(*args, **kwargs)
e811c8ce
RD
2359
2360 def ConvertToMono(*args, **kwargs):
a95a7133 2361 """ConvertToMono(self, unsigned char r, unsigned char g, unsigned char b) -> Image"""
54f9ee45 2362 return _core_.Image_ConvertToMono(*args, **kwargs)
e811c8ce
RD
2363
2364 def SetOption(*args, **kwargs):
a95a7133 2365 """SetOption(self, String name, String value)"""
54f9ee45 2366 return _core_.Image_SetOption(*args, **kwargs)
e811c8ce
RD
2367
2368 def SetOptionInt(*args, **kwargs):
a95a7133 2369 """SetOptionInt(self, String name, int value)"""
54f9ee45 2370 return _core_.Image_SetOptionInt(*args, **kwargs)
e811c8ce
RD
2371
2372 def GetOption(*args, **kwargs):
a95a7133 2373 """GetOption(self, String name) -> String"""
54f9ee45 2374 return _core_.Image_GetOption(*args, **kwargs)
e811c8ce
RD
2375
2376 def GetOptionInt(*args, **kwargs):
a95a7133 2377 """GetOptionInt(self, String name) -> int"""
54f9ee45 2378 return _core_.Image_GetOptionInt(*args, **kwargs)
e811c8ce
RD
2379
2380 def HasOption(*args, **kwargs):
a95a7133 2381 """HasOption(self, String name) -> bool"""
54f9ee45 2382 return _core_.Image_HasOption(*args, **kwargs)
e811c8ce
RD
2383
2384 def CountColours(*args, **kwargs):
a95a7133 2385 """CountColours(self, unsigned long stopafter=(unsigned long) -1) -> unsigned long"""
54f9ee45 2386 return _core_.Image_CountColours(*args, **kwargs)
e811c8ce
RD
2387
2388 def ComputeHistogram(*args, **kwargs):
a95a7133 2389 """ComputeHistogram(self, ImageHistogram h) -> unsigned long"""
54f9ee45 2390 return _core_.Image_ComputeHistogram(*args, **kwargs)
e811c8ce
RD
2391
2392 def AddHandler(*args, **kwargs):
66c033b4 2393 """AddHandler(ImageHandler handler)"""
54f9ee45 2394 return _core_.Image_AddHandler(*args, **kwargs)
e811c8ce
RD
2395
2396 AddHandler = staticmethod(AddHandler)
2397 def InsertHandler(*args, **kwargs):
66c033b4 2398 """InsertHandler(ImageHandler handler)"""
54f9ee45 2399 return _core_.Image_InsertHandler(*args, **kwargs)
e811c8ce
RD
2400
2401 InsertHandler = staticmethod(InsertHandler)
2402 def RemoveHandler(*args, **kwargs):
66c033b4 2403 """RemoveHandler(String name) -> bool"""
54f9ee45 2404 return _core_.Image_RemoveHandler(*args, **kwargs)
e811c8ce
RD
2405
2406 RemoveHandler = staticmethod(RemoveHandler)
2407 def GetImageExtWildcard(*args, **kwargs):
66c033b4 2408 """GetImageExtWildcard() -> String"""
54f9ee45 2409 return _core_.Image_GetImageExtWildcard(*args, **kwargs)
e811c8ce
RD
2410
2411 GetImageExtWildcard = staticmethod(GetImageExtWildcard)
2412 def ConvertToBitmap(*args, **kwargs):
1fbf26be 2413 """ConvertToBitmap(self, int depth=-1) -> Bitmap"""
54f9ee45 2414 return _core_.Image_ConvertToBitmap(*args, **kwargs)
e811c8ce
RD
2415
2416 def ConvertToMonoBitmap(*args, **kwargs):
a95a7133 2417 """ConvertToMonoBitmap(self, unsigned char red, unsigned char green, unsigned char blue) -> Bitmap"""
54f9ee45 2418 return _core_.Image_ConvertToMonoBitmap(*args, **kwargs)
e811c8ce
RD
2419
2420 def __nonzero__(self): return self.Ok()
d14a1e28
RD
2421
2422class ImagePtr(Image):
2423 def __init__(self, this):
2424 self.this = this
2425 if not hasattr(self,"thisown"): self.thisown = 0
2426 self.__class__ = Image
54f9ee45 2427_core_.Image_swigregister(ImagePtr)
d14a1e28
RD
2428
2429def ImageFromMime(*args, **kwargs):
196addbf 2430 """ImageFromMime(String name, String mimetype, int index=-1) -> Image"""
54f9ee45 2431 val = _core_.new_ImageFromMime(*args, **kwargs)
d14a1e28
RD
2432 val.thisown = 1
2433 return val
2434
2435def ImageFromStream(*args, **kwargs):
196addbf 2436 """ImageFromStream(InputStream stream, long type=BITMAP_TYPE_ANY, int index=-1) -> Image"""
54f9ee45 2437 val = _core_.new_ImageFromStream(*args, **kwargs)
d14a1e28
RD
2438 val.thisown = 1
2439 return val
2440
2441def ImageFromStreamMime(*args, **kwargs):
196addbf 2442 """ImageFromStreamMime(InputStream stream, String mimetype, int index=-1) -> Image"""
54f9ee45 2443 val = _core_.new_ImageFromStreamMime(*args, **kwargs)
d14a1e28
RD
2444 val.thisown = 1
2445 return val
2446
66c033b4
RD
2447def EmptyImage(*args, **kwargs):
2448 """EmptyImage(int width=0, int height=0, bool clear=True) -> Image"""
2449 val = _core_.new_EmptyImage(*args, **kwargs)
d14a1e28
RD
2450 val.thisown = 1
2451 return val
2452
2453def ImageFromBitmap(*args, **kwargs):
196addbf 2454 """ImageFromBitmap(Bitmap bitmap) -> Image"""
54f9ee45 2455 val = _core_.new_ImageFromBitmap(*args, **kwargs)
d14a1e28
RD
2456 val.thisown = 1
2457 return val
2458
2459def ImageFromData(*args, **kwargs):
e811c8ce 2460 """ImageFromData(int width, int height, unsigned char data) -> Image"""
54f9ee45 2461 val = _core_.new_ImageFromData(*args, **kwargs)
d14a1e28
RD
2462 val.thisown = 1
2463 return val
2464
1823fbb4
RD
2465def ImageFromDataWithAlpha(*args, **kwargs):
2466 """ImageFromDataWithAlpha(int width, int height, unsigned char data, unsigned char alpha) -> Image"""
2467 val = _core_.new_ImageFromDataWithAlpha(*args, **kwargs)
2468 val.thisown = 1
2469 return val
2470
e811c8ce 2471def Image_CanRead(*args, **kwargs):
196addbf 2472 """Image_CanRead(String name) -> bool"""
54f9ee45 2473 return _core_.Image_CanRead(*args, **kwargs)
d14a1e28 2474
e811c8ce 2475def Image_GetImageCount(*args, **kwargs):
196addbf 2476 """Image_GetImageCount(String name, long type=BITMAP_TYPE_ANY) -> int"""
54f9ee45 2477 return _core_.Image_GetImageCount(*args, **kwargs)
d14a1e28 2478
e811c8ce 2479def Image_CanReadStream(*args, **kwargs):
196addbf 2480 """Image_CanReadStream(InputStream stream) -> bool"""
54f9ee45 2481 return _core_.Image_CanReadStream(*args, **kwargs)
d14a1e28 2482
e811c8ce
RD
2483def Image_AddHandler(*args, **kwargs):
2484 """Image_AddHandler(ImageHandler handler)"""
54f9ee45 2485 return _core_.Image_AddHandler(*args, **kwargs)
d14a1e28 2486
e811c8ce
RD
2487def Image_InsertHandler(*args, **kwargs):
2488 """Image_InsertHandler(ImageHandler handler)"""
54f9ee45 2489 return _core_.Image_InsertHandler(*args, **kwargs)
d14a1e28 2490
e811c8ce 2491def Image_RemoveHandler(*args, **kwargs):
196addbf 2492 """Image_RemoveHandler(String name) -> bool"""
54f9ee45 2493 return _core_.Image_RemoveHandler(*args, **kwargs)
d14a1e28 2494
e811c8ce 2495def Image_GetImageExtWildcard(*args, **kwargs):
196addbf 2496 """Image_GetImageExtWildcard() -> String"""
54f9ee45 2497 return _core_.Image_GetImageExtWildcard(*args, **kwargs)
d14a1e28 2498
5e4ca4a8
RD
2499def InitAllImageHandlers():
2500 """
2501 The former functionality of InitAllImageHanders is now done internal to
2502 the _core_ extension module and so this function has become a simple NOP.
2503 """
2504 pass
d14a1e28 2505
54f9ee45
RD
2506IMAGE_RESOLUTION_INCHES = _core_.IMAGE_RESOLUTION_INCHES
2507IMAGE_RESOLUTION_CM = _core_.IMAGE_RESOLUTION_CM
2508BMP_24BPP = _core_.BMP_24BPP
2509BMP_8BPP = _core_.BMP_8BPP
2510BMP_8BPP_GREY = _core_.BMP_8BPP_GREY
2511BMP_8BPP_GRAY = _core_.BMP_8BPP_GRAY
2512BMP_8BPP_RED = _core_.BMP_8BPP_RED
2513BMP_8BPP_PALETTE = _core_.BMP_8BPP_PALETTE
2514BMP_4BPP = _core_.BMP_4BPP
2515BMP_1BPP = _core_.BMP_1BPP
2516BMP_1BPP_BW = _core_.BMP_1BPP_BW
d14a1e28 2517class BMPHandler(ImageHandler):
093d3ff1 2518 """Proxy of C++ BMPHandler class"""
e811c8ce
RD
2519 def __repr__(self):
2520 return "<%s.%s; proxy of C++ wxBMPHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 2521 def __init__(self, *args, **kwargs):
a95a7133 2522 """__init__(self) -> BMPHandler"""
54f9ee45 2523 newobj = _core_.new_BMPHandler(*args, **kwargs)
d14a1e28
RD
2524 self.this = newobj.this
2525 self.thisown = 1
2526 del newobj.thisown
d14a1e28
RD
2527
2528class BMPHandlerPtr(BMPHandler):
2529 def __init__(self, this):
2530 self.this = this
2531 if not hasattr(self,"thisown"): self.thisown = 0
2532 self.__class__ = BMPHandler
54f9ee45 2533_core_.BMPHandler_swigregister(BMPHandlerPtr)
d14a1e28
RD
2534NullImage = cvar.NullImage
2535IMAGE_OPTION_BMP_FORMAT = cvar.IMAGE_OPTION_BMP_FORMAT
2536IMAGE_OPTION_CUR_HOTSPOT_X = cvar.IMAGE_OPTION_CUR_HOTSPOT_X
2537IMAGE_OPTION_CUR_HOTSPOT_Y = cvar.IMAGE_OPTION_CUR_HOTSPOT_Y
2538IMAGE_OPTION_RESOLUTION = cvar.IMAGE_OPTION_RESOLUTION
2539IMAGE_OPTION_RESOLUTIONUNIT = cvar.IMAGE_OPTION_RESOLUTIONUNIT
2540
2541class ICOHandler(BMPHandler):
093d3ff1 2542 """Proxy of C++ ICOHandler class"""
e811c8ce
RD
2543 def __repr__(self):
2544 return "<%s.%s; proxy of C++ wxICOHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 2545 def __init__(self, *args, **kwargs):
a95a7133 2546 """__init__(self) -> ICOHandler"""
54f9ee45 2547 newobj = _core_.new_ICOHandler(*args, **kwargs)
d14a1e28
RD
2548 self.this = newobj.this
2549 self.thisown = 1
2550 del newobj.thisown
d14a1e28
RD
2551
2552class ICOHandlerPtr(ICOHandler):
2553 def __init__(self, this):
2554 self.this = this
2555 if not hasattr(self,"thisown"): self.thisown = 0
2556 self.__class__ = ICOHandler
54f9ee45 2557_core_.ICOHandler_swigregister(ICOHandlerPtr)
d14a1e28
RD
2558
2559class CURHandler(ICOHandler):
093d3ff1 2560 """Proxy of C++ CURHandler class"""
e811c8ce
RD
2561 def __repr__(self):
2562 return "<%s.%s; proxy of C++ wxCURHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 2563 def __init__(self, *args, **kwargs):
a95a7133 2564 """__init__(self) -> CURHandler"""
54f9ee45 2565 newobj = _core_.new_CURHandler(*args, **kwargs)
d14a1e28
RD
2566 self.this = newobj.this
2567 self.thisown = 1
2568 del newobj.thisown
d14a1e28
RD
2569
2570class CURHandlerPtr(CURHandler):
2571 def __init__(self, this):
2572 self.this = this
2573 if not hasattr(self,"thisown"): self.thisown = 0
2574 self.__class__ = CURHandler
54f9ee45 2575_core_.CURHandler_swigregister(CURHandlerPtr)
d14a1e28
RD
2576
2577class ANIHandler(CURHandler):
093d3ff1 2578 """Proxy of C++ ANIHandler class"""
e811c8ce
RD
2579 def __repr__(self):
2580 return "<%s.%s; proxy of C++ wxANIHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 2581 def __init__(self, *args, **kwargs):
a95a7133 2582 """__init__(self) -> ANIHandler"""
54f9ee45 2583 newobj = _core_.new_ANIHandler(*args, **kwargs)
d14a1e28
RD
2584 self.this = newobj.this
2585 self.thisown = 1
2586 del newobj.thisown
d14a1e28
RD
2587
2588class ANIHandlerPtr(ANIHandler):
2589 def __init__(self, this):
2590 self.this = this
2591 if not hasattr(self,"thisown"): self.thisown = 0
2592 self.__class__ = ANIHandler
54f9ee45 2593_core_.ANIHandler_swigregister(ANIHandlerPtr)
d14a1e28
RD
2594
2595class PNGHandler(ImageHandler):
093d3ff1 2596 """Proxy of C++ PNGHandler class"""
e811c8ce
RD
2597 def __repr__(self):
2598 return "<%s.%s; proxy of C++ wxPNGHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 2599 def __init__(self, *args, **kwargs):
a95a7133 2600 """__init__(self) -> PNGHandler"""
54f9ee45 2601 newobj = _core_.new_PNGHandler(*args, **kwargs)
d14a1e28
RD
2602 self.this = newobj.this
2603 self.thisown = 1
2604 del newobj.thisown
d14a1e28
RD
2605
2606class PNGHandlerPtr(PNGHandler):
2607 def __init__(self, this):
2608 self.this = this
2609 if not hasattr(self,"thisown"): self.thisown = 0
2610 self.__class__ = PNGHandler
54f9ee45 2611_core_.PNGHandler_swigregister(PNGHandlerPtr)
d14a1e28
RD
2612
2613class GIFHandler(ImageHandler):
093d3ff1 2614 """Proxy of C++ GIFHandler class"""
e811c8ce
RD
2615 def __repr__(self):
2616 return "<%s.%s; proxy of C++ wxGIFHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 2617 def __init__(self, *args, **kwargs):
a95a7133 2618 """__init__(self) -> GIFHandler"""
54f9ee45 2619 newobj = _core_.new_GIFHandler(*args, **kwargs)
d14a1e28
RD
2620 self.this = newobj.this
2621 self.thisown = 1
2622 del newobj.thisown
d14a1e28
RD
2623
2624class GIFHandlerPtr(GIFHandler):
2625 def __init__(self, this):
2626 self.this = this
2627 if not hasattr(self,"thisown"): self.thisown = 0
2628 self.__class__ = GIFHandler
54f9ee45 2629_core_.GIFHandler_swigregister(GIFHandlerPtr)
d14a1e28
RD
2630
2631class PCXHandler(ImageHandler):
093d3ff1 2632 """Proxy of C++ PCXHandler class"""
e811c8ce
RD
2633 def __repr__(self):
2634 return "<%s.%s; proxy of C++ wxPCXHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 2635 def __init__(self, *args, **kwargs):
a95a7133 2636 """__init__(self) -> PCXHandler"""
54f9ee45 2637 newobj = _core_.new_PCXHandler(*args, **kwargs)
d14a1e28
RD
2638 self.this = newobj.this
2639 self.thisown = 1
2640 del newobj.thisown
d14a1e28
RD
2641
2642class PCXHandlerPtr(PCXHandler):
2643 def __init__(self, this):
2644 self.this = this
2645 if not hasattr(self,"thisown"): self.thisown = 0
2646 self.__class__ = PCXHandler
54f9ee45 2647_core_.PCXHandler_swigregister(PCXHandlerPtr)
d14a1e28
RD
2648
2649class JPEGHandler(ImageHandler):
093d3ff1 2650 """Proxy of C++ JPEGHandler class"""
e811c8ce
RD
2651 def __repr__(self):
2652 return "<%s.%s; proxy of C++ wxJPEGHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 2653 def __init__(self, *args, **kwargs):
a95a7133 2654 """__init__(self) -> JPEGHandler"""
54f9ee45 2655 newobj = _core_.new_JPEGHandler(*args, **kwargs)
d14a1e28
RD
2656 self.this = newobj.this
2657 self.thisown = 1
2658 del newobj.thisown
d14a1e28
RD
2659
2660class JPEGHandlerPtr(JPEGHandler):
2661 def __init__(self, this):
2662 self.this = this
2663 if not hasattr(self,"thisown"): self.thisown = 0
2664 self.__class__ = JPEGHandler
54f9ee45 2665_core_.JPEGHandler_swigregister(JPEGHandlerPtr)
d14a1e28
RD
2666
2667class PNMHandler(ImageHandler):
093d3ff1 2668 """Proxy of C++ PNMHandler class"""
e811c8ce
RD
2669 def __repr__(self):
2670 return "<%s.%s; proxy of C++ wxPNMHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 2671 def __init__(self, *args, **kwargs):
a95a7133 2672 """__init__(self) -> PNMHandler"""
54f9ee45 2673 newobj = _core_.new_PNMHandler(*args, **kwargs)
d14a1e28
RD
2674 self.this = newobj.this
2675 self.thisown = 1
2676 del newobj.thisown
d14a1e28
RD
2677
2678class PNMHandlerPtr(PNMHandler):
2679 def __init__(self, this):
2680 self.this = this
2681 if not hasattr(self,"thisown"): self.thisown = 0
2682 self.__class__ = PNMHandler
54f9ee45 2683_core_.PNMHandler_swigregister(PNMHandlerPtr)
d14a1e28
RD
2684
2685class XPMHandler(ImageHandler):
093d3ff1 2686 """Proxy of C++ XPMHandler class"""
e811c8ce
RD
2687 def __repr__(self):
2688 return "<%s.%s; proxy of C++ wxXPMHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 2689 def __init__(self, *args, **kwargs):
a95a7133 2690 """__init__(self) -> XPMHandler"""
54f9ee45 2691 newobj = _core_.new_XPMHandler(*args, **kwargs)
d14a1e28
RD
2692 self.this = newobj.this
2693 self.thisown = 1
2694 del newobj.thisown
d14a1e28
RD
2695
2696class XPMHandlerPtr(XPMHandler):
2697 def __init__(self, this):
2698 self.this = this
2699 if not hasattr(self,"thisown"): self.thisown = 0
2700 self.__class__ = XPMHandler
54f9ee45 2701_core_.XPMHandler_swigregister(XPMHandlerPtr)
d14a1e28
RD
2702
2703class TIFFHandler(ImageHandler):
093d3ff1 2704 """Proxy of C++ TIFFHandler class"""
e811c8ce
RD
2705 def __repr__(self):
2706 return "<%s.%s; proxy of C++ wxTIFFHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 2707 def __init__(self, *args, **kwargs):
a95a7133 2708 """__init__(self) -> TIFFHandler"""
54f9ee45 2709 newobj = _core_.new_TIFFHandler(*args, **kwargs)
d14a1e28
RD
2710 self.this = newobj.this
2711 self.thisown = 1
2712 del newobj.thisown
d14a1e28
RD
2713
2714class TIFFHandlerPtr(TIFFHandler):
2715 def __init__(self, this):
2716 self.this = this
2717 if not hasattr(self,"thisown"): self.thisown = 0
2718 self.__class__ = TIFFHandler
54f9ee45 2719_core_.TIFFHandler_swigregister(TIFFHandlerPtr)
d14a1e28 2720
c0de73ae
RD
2721QUANTIZE_INCLUDE_WINDOWS_COLOURS = _core_.QUANTIZE_INCLUDE_WINDOWS_COLOURS
2722QUANTIZE_FILL_DESTINATION_IMAGE = _core_.QUANTIZE_FILL_DESTINATION_IMAGE
2723class Quantize(object):
2724 """Performs quantization, or colour reduction, on a wxImage."""
2725 def __init__(self): raise RuntimeError, "No constructor defined"
2726 def __repr__(self):
2727 return "<%s.%s; proxy of C++ wxQuantize instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
2728 def Quantize(*args, **kwargs):
2729 """
2730 Quantize(Image src, Image dest, int desiredNoColours=236, int flags=wxQUANTIZE_INCLUDE_WINDOWS_COLOURS|wxQUANTIZE_FILL_DESTINATION_IMAGE) -> bool
2731
2732 Reduce the colours in the source image and put the result into the
2733 destination image, setting the palette in the destination if
2734 needed. Both images may be the same, to overwrite the source image.
2735 """
2736 return _core_.Quantize_Quantize(*args, **kwargs)
2737
2738 Quantize = staticmethod(Quantize)
2739
2740class QuantizePtr(Quantize):
2741 def __init__(self, this):
2742 self.this = this
2743 if not hasattr(self,"thisown"): self.thisown = 0
2744 self.__class__ = Quantize
2745_core_.Quantize_swigregister(QuantizePtr)
2746
2747def Quantize_Quantize(*args, **kwargs):
2748 """
2749 Quantize_Quantize(Image src, Image dest, int desiredNoColours=236, int flags=wxQUANTIZE_INCLUDE_WINDOWS_COLOURS|wxQUANTIZE_FILL_DESTINATION_IMAGE) -> bool
2750
2751 Reduce the colours in the source image and put the result into the
2752 destination image, setting the palette in the destination if
2753 needed. Both images may be the same, to overwrite the source image.
2754 """
2755 return _core_.Quantize_Quantize(*args, **kwargs)
2756
d14a1e28
RD
2757#---------------------------------------------------------------------------
2758
2759class EvtHandler(Object):
093d3ff1 2760 """Proxy of C++ EvtHandler class"""
e811c8ce
RD
2761 def __repr__(self):
2762 return "<%s.%s; proxy of C++ wxEvtHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 2763 def __init__(self, *args, **kwargs):
a95a7133 2764 """__init__(self) -> EvtHandler"""
54f9ee45 2765 newobj = _core_.new_EvtHandler(*args, **kwargs)
d14a1e28
RD
2766 self.this = newobj.this
2767 self.thisown = 1
2768 del newobj.thisown
e811c8ce 2769 def GetNextHandler(*args, **kwargs):
a95a7133 2770 """GetNextHandler(self) -> EvtHandler"""
54f9ee45 2771 return _core_.EvtHandler_GetNextHandler(*args, **kwargs)
e811c8ce
RD
2772
2773 def GetPreviousHandler(*args, **kwargs):
a95a7133 2774 """GetPreviousHandler(self) -> EvtHandler"""
54f9ee45 2775 return _core_.EvtHandler_GetPreviousHandler(*args, **kwargs)
e811c8ce
RD
2776
2777 def SetNextHandler(*args, **kwargs):
a95a7133 2778 """SetNextHandler(self, EvtHandler handler)"""
54f9ee45 2779 return _core_.EvtHandler_SetNextHandler(*args, **kwargs)
e811c8ce
RD
2780
2781 def SetPreviousHandler(*args, **kwargs):
a95a7133 2782 """SetPreviousHandler(self, EvtHandler handler)"""
54f9ee45 2783 return _core_.EvtHandler_SetPreviousHandler(*args, **kwargs)
e811c8ce
RD
2784
2785 def GetEvtHandlerEnabled(*args, **kwargs):
a95a7133 2786 """GetEvtHandlerEnabled(self) -> bool"""
54f9ee45 2787 return _core_.EvtHandler_GetEvtHandlerEnabled(*args, **kwargs)
e811c8ce
RD
2788
2789 def SetEvtHandlerEnabled(*args, **kwargs):
a95a7133 2790 """SetEvtHandlerEnabled(self, bool enabled)"""
54f9ee45 2791 return _core_.EvtHandler_SetEvtHandlerEnabled(*args, **kwargs)
e811c8ce
RD
2792
2793 def ProcessEvent(*args, **kwargs):
a95a7133 2794 """ProcessEvent(self, Event event) -> bool"""
54f9ee45 2795 return _core_.EvtHandler_ProcessEvent(*args, **kwargs)
e811c8ce
RD
2796
2797 def AddPendingEvent(*args, **kwargs):
a95a7133 2798 """AddPendingEvent(self, Event event)"""
54f9ee45 2799 return _core_.EvtHandler_AddPendingEvent(*args, **kwargs)
e811c8ce
RD
2800
2801 def ProcessPendingEvents(*args, **kwargs):
a95a7133 2802 """ProcessPendingEvents(self)"""
54f9ee45 2803 return _core_.EvtHandler_ProcessPendingEvents(*args, **kwargs)
e811c8ce
RD
2804
2805 def Connect(*args, **kwargs):
a95a7133 2806 """Connect(self, int id, int lastId, int eventType, PyObject func)"""
54f9ee45 2807 return _core_.EvtHandler_Connect(*args, **kwargs)
e811c8ce
RD
2808
2809 def Disconnect(*args, **kwargs):
a95a7133 2810 """Disconnect(self, int id, int lastId=-1, wxEventType eventType=wxEVT_NULL) -> bool"""
54f9ee45 2811 return _core_.EvtHandler_Disconnect(*args, **kwargs)
e811c8ce
RD
2812
2813 def _setOORInfo(*args, **kwargs):
689b42ee 2814 """_setOORInfo(self, PyObject _self, bool incref=True)"""
54f9ee45 2815 return _core_.EvtHandler__setOORInfo(*args, **kwargs)
e811c8ce 2816
d14a1e28
RD
2817 def Bind(self, event, handler, source=None, id=wx.ID_ANY, id2=wx.ID_ANY):
2818 """
2819 Bind an event to an event handler.
2820
db3e571a
RD
2821 :param event: One of the EVT_* objects that specifies the
2822 type of event to bind,
d14a1e28 2823
db3e571a
RD
2824 :param handler: A callable object to be invoked when the
2825 event is delivered to self. Pass None to
2826 disconnect an event handler.
d14a1e28 2827
db3e571a
RD
2828 :param source: Sometimes the event originates from a
2829 different window than self, but you still
2830 want to catch it in self. (For example, a
2831 button event delivered to a frame.) By
2832 passing the source of the event, the event
2833 handling system is able to differentiate
2834 between the same event type from different
2835 controls.
d14a1e28 2836
db3e571a
RD
2837 :param id: Used to spcify the event source by ID instead
2838 of instance.
2839
2840 :param id2: Used when it is desirable to bind a handler
2841 to a range of IDs, such as with EVT_MENU_RANGE.
d14a1e28
RD
2842 """
2843 if source is not None:
2844 id = source.GetId()
2845 event.Bind(self, id, id2, handler)
2846
66c033b4
RD
2847 def Unbind(self, event, source=None, id=wx.ID_ANY, id2=wx.ID_ANY):
2848 """
2849 Disconencts the event handler binding for event from self.
2850 Returns True if successful.
2851 """
2852 if source is not None:
2853 id = source.GetId()
2854 return event.Unbind(self, id, id2)
d14a1e28 2855
d14a1e28
RD
2856
2857class EvtHandlerPtr(EvtHandler):
2858 def __init__(self, this):
2859 self.this = this
2860 if not hasattr(self,"thisown"): self.thisown = 0
2861 self.__class__ = EvtHandler
54f9ee45 2862_core_.EvtHandler_swigregister(EvtHandlerPtr)
d14a1e28
RD
2863
2864#---------------------------------------------------------------------------
2865
2866class PyEventBinder(object):
2867 """
2868 Instances of this class are used to bind specific events to event
2869 handlers.
2870 """
2871 def __init__(self, evtType, expectedIDs=0):
2872 if expectedIDs not in [0, 1, 2]:
2873 raise ValueError, "Invalid number of expectedIDs"
2874 self.expectedIDs = expectedIDs
2875
2876 if type(evtType) == list or type(evtType) == tuple:
2877 self.evtType = evtType
2878 else:
2879 self.evtType = [evtType]
2880
2881
2882 def Bind(self, target, id1, id2, function):
2883 """Bind this set of event types to target."""
2884 for et in self.evtType:
2885 target.Connect(id1, id2, et, function)
2886
66c033b4
RD
2887
2888 def Unbind(self, target, id1, id2):
2889 """Remove an event binding."""
2890 success = 0
2891 for et in self.evtType:
2892 success += target.Disconnect(id1, id2, et)
2893 return success != 0
2894
d14a1e28
RD
2895
2896 def __call__(self, *args):
2897 """
2898 For backwards compatibility with the old EVT_* functions.
2899 Should be called with either (window, func), (window, ID,
2900 func) or (window, ID1, ID2, func) parameters depending on the
2901 type of the event.
2902 """
2903 assert len(args) == 2 + self.expectedIDs
2904 id1 = wx.ID_ANY
2905 id2 = wx.ID_ANY
2906 target = args[0]
2907 if self.expectedIDs == 0:
2908 func = args[1]
2909 elif self.expectedIDs == 1:
2910 id1 = args[1]
2911 func = args[2]
2912 elif self.expectedIDs == 2:
2913 id1 = args[1]
2914 id2 = args[2]
2915 func = args[3]
2916 else:
2917 raise ValueError, "Unexpected number of IDs"
2918
2919 self.Bind(target, id1, id2, func)
2920
2921
2922# These two are square pegs that don't fit the PyEventBinder hole...
2923def EVT_COMMAND(win, id, cmd, func):
2924 win.Connect(id, -1, cmd, func)
2925def EVT_COMMAND_RANGE(win, id1, id2, cmd, func):
2926 win.Connect(id1, id2, cmd, func)
2927
2928
2929#---------------------------------------------------------------------------
2930
2931#---------------------------------------------------------------------------
2932
54f9ee45
RD
2933EVENT_PROPAGATE_NONE = _core_.EVENT_PROPAGATE_NONE
2934EVENT_PROPAGATE_MAX = _core_.EVENT_PROPAGATE_MAX
d14a1e28 2935
e811c8ce
RD
2936def NewEventType(*args, **kwargs):
2937 """NewEventType() -> wxEventType"""
54f9ee45
RD
2938 return _core_.NewEventType(*args, **kwargs)
2939wxEVT_NULL = _core_.wxEVT_NULL
2940wxEVT_FIRST = _core_.wxEVT_FIRST
2941wxEVT_USER_FIRST = _core_.wxEVT_USER_FIRST
2942wxEVT_COMMAND_BUTTON_CLICKED = _core_.wxEVT_COMMAND_BUTTON_CLICKED
2943wxEVT_COMMAND_CHECKBOX_CLICKED = _core_.wxEVT_COMMAND_CHECKBOX_CLICKED
2944wxEVT_COMMAND_CHOICE_SELECTED = _core_.wxEVT_COMMAND_CHOICE_SELECTED
2945wxEVT_COMMAND_LISTBOX_SELECTED = _core_.wxEVT_COMMAND_LISTBOX_SELECTED
2946wxEVT_COMMAND_LISTBOX_DOUBLECLICKED = _core_.wxEVT_COMMAND_LISTBOX_DOUBLECLICKED
2947wxEVT_COMMAND_CHECKLISTBOX_TOGGLED = _core_.wxEVT_COMMAND_CHECKLISTBOX_TOGGLED
2948wxEVT_COMMAND_MENU_SELECTED = _core_.wxEVT_COMMAND_MENU_SELECTED
2949wxEVT_COMMAND_TOOL_CLICKED = _core_.wxEVT_COMMAND_TOOL_CLICKED
2950wxEVT_COMMAND_SLIDER_UPDATED = _core_.wxEVT_COMMAND_SLIDER_UPDATED
2951wxEVT_COMMAND_RADIOBOX_SELECTED = _core_.wxEVT_COMMAND_RADIOBOX_SELECTED
2952wxEVT_COMMAND_RADIOBUTTON_SELECTED = _core_.wxEVT_COMMAND_RADIOBUTTON_SELECTED
2953wxEVT_COMMAND_SCROLLBAR_UPDATED = _core_.wxEVT_COMMAND_SCROLLBAR_UPDATED
2954wxEVT_COMMAND_VLBOX_SELECTED = _core_.wxEVT_COMMAND_VLBOX_SELECTED
2955wxEVT_COMMAND_COMBOBOX_SELECTED = _core_.wxEVT_COMMAND_COMBOBOX_SELECTED
2956wxEVT_COMMAND_TOOL_RCLICKED = _core_.wxEVT_COMMAND_TOOL_RCLICKED
2957wxEVT_COMMAND_TOOL_ENTER = _core_.wxEVT_COMMAND_TOOL_ENTER
2958wxEVT_LEFT_DOWN = _core_.wxEVT_LEFT_DOWN
2959wxEVT_LEFT_UP = _core_.wxEVT_LEFT_UP
2960wxEVT_MIDDLE_DOWN = _core_.wxEVT_MIDDLE_DOWN
2961wxEVT_MIDDLE_UP = _core_.wxEVT_MIDDLE_UP
2962wxEVT_RIGHT_DOWN = _core_.wxEVT_RIGHT_DOWN
2963wxEVT_RIGHT_UP = _core_.wxEVT_RIGHT_UP
2964wxEVT_MOTION = _core_.wxEVT_MOTION
2965wxEVT_ENTER_WINDOW = _core_.wxEVT_ENTER_WINDOW
2966wxEVT_LEAVE_WINDOW = _core_.wxEVT_LEAVE_WINDOW
2967wxEVT_LEFT_DCLICK = _core_.wxEVT_LEFT_DCLICK
2968wxEVT_MIDDLE_DCLICK = _core_.wxEVT_MIDDLE_DCLICK
2969wxEVT_RIGHT_DCLICK = _core_.wxEVT_RIGHT_DCLICK
2970wxEVT_SET_FOCUS = _core_.wxEVT_SET_FOCUS
2971wxEVT_KILL_FOCUS = _core_.wxEVT_KILL_FOCUS
2972wxEVT_CHILD_FOCUS = _core_.wxEVT_CHILD_FOCUS
2973wxEVT_MOUSEWHEEL = _core_.wxEVT_MOUSEWHEEL
2974wxEVT_NC_LEFT_DOWN = _core_.wxEVT_NC_LEFT_DOWN
2975wxEVT_NC_LEFT_UP = _core_.wxEVT_NC_LEFT_UP
2976wxEVT_NC_MIDDLE_DOWN = _core_.wxEVT_NC_MIDDLE_DOWN
2977wxEVT_NC_MIDDLE_UP = _core_.wxEVT_NC_MIDDLE_UP
2978wxEVT_NC_RIGHT_DOWN = _core_.wxEVT_NC_RIGHT_DOWN
2979wxEVT_NC_RIGHT_UP = _core_.wxEVT_NC_RIGHT_UP
2980wxEVT_NC_MOTION = _core_.wxEVT_NC_MOTION
2981wxEVT_NC_ENTER_WINDOW = _core_.wxEVT_NC_ENTER_WINDOW
2982wxEVT_NC_LEAVE_WINDOW = _core_.wxEVT_NC_LEAVE_WINDOW
2983wxEVT_NC_LEFT_DCLICK = _core_.wxEVT_NC_LEFT_DCLICK
2984wxEVT_NC_MIDDLE_DCLICK = _core_.wxEVT_NC_MIDDLE_DCLICK
2985wxEVT_NC_RIGHT_DCLICK = _core_.wxEVT_NC_RIGHT_DCLICK
2986wxEVT_CHAR = _core_.wxEVT_CHAR
2987wxEVT_CHAR_HOOK = _core_.wxEVT_CHAR_HOOK
2988wxEVT_NAVIGATION_KEY = _core_.wxEVT_NAVIGATION_KEY
2989wxEVT_KEY_DOWN = _core_.wxEVT_KEY_DOWN
2990wxEVT_KEY_UP = _core_.wxEVT_KEY_UP
2991wxEVT_HOTKEY = _core_.wxEVT_HOTKEY
2992wxEVT_SET_CURSOR = _core_.wxEVT_SET_CURSOR
2993wxEVT_SCROLL_TOP = _core_.wxEVT_SCROLL_TOP
2994wxEVT_SCROLL_BOTTOM = _core_.wxEVT_SCROLL_BOTTOM
2995wxEVT_SCROLL_LINEUP = _core_.wxEVT_SCROLL_LINEUP
2996wxEVT_SCROLL_LINEDOWN = _core_.wxEVT_SCROLL_LINEDOWN
2997wxEVT_SCROLL_PAGEUP = _core_.wxEVT_SCROLL_PAGEUP
2998wxEVT_SCROLL_PAGEDOWN = _core_.wxEVT_SCROLL_PAGEDOWN
2999wxEVT_SCROLL_THUMBTRACK = _core_.wxEVT_SCROLL_THUMBTRACK
3000wxEVT_SCROLL_THUMBRELEASE = _core_.wxEVT_SCROLL_THUMBRELEASE
3001wxEVT_SCROLL_ENDSCROLL = _core_.wxEVT_SCROLL_ENDSCROLL
3002wxEVT_SCROLLWIN_TOP = _core_.wxEVT_SCROLLWIN_TOP
3003wxEVT_SCROLLWIN_BOTTOM = _core_.wxEVT_SCROLLWIN_BOTTOM
3004wxEVT_SCROLLWIN_LINEUP = _core_.wxEVT_SCROLLWIN_LINEUP
3005wxEVT_SCROLLWIN_LINEDOWN = _core_.wxEVT_SCROLLWIN_LINEDOWN
3006wxEVT_SCROLLWIN_PAGEUP = _core_.wxEVT_SCROLLWIN_PAGEUP
3007wxEVT_SCROLLWIN_PAGEDOWN = _core_.wxEVT_SCROLLWIN_PAGEDOWN
3008wxEVT_SCROLLWIN_THUMBTRACK = _core_.wxEVT_SCROLLWIN_THUMBTRACK
3009wxEVT_SCROLLWIN_THUMBRELEASE = _core_.wxEVT_SCROLLWIN_THUMBRELEASE
3010wxEVT_SIZE = _core_.wxEVT_SIZE
3011wxEVT_MOVE = _core_.wxEVT_MOVE
3012wxEVT_CLOSE_WINDOW = _core_.wxEVT_CLOSE_WINDOW
3013wxEVT_END_SESSION = _core_.wxEVT_END_SESSION
3014wxEVT_QUERY_END_SESSION = _core_.wxEVT_QUERY_END_SESSION
3015wxEVT_ACTIVATE_APP = _core_.wxEVT_ACTIVATE_APP
3016wxEVT_POWER = _core_.wxEVT_POWER
3017wxEVT_ACTIVATE = _core_.wxEVT_ACTIVATE
3018wxEVT_CREATE = _core_.wxEVT_CREATE
3019wxEVT_DESTROY = _core_.wxEVT_DESTROY
3020wxEVT_SHOW = _core_.wxEVT_SHOW
3021wxEVT_ICONIZE = _core_.wxEVT_ICONIZE
3022wxEVT_MAXIMIZE = _core_.wxEVT_MAXIMIZE
3023wxEVT_MOUSE_CAPTURE_CHANGED = _core_.wxEVT_MOUSE_CAPTURE_CHANGED
3024wxEVT_PAINT = _core_.wxEVT_PAINT
3025wxEVT_ERASE_BACKGROUND = _core_.wxEVT_ERASE_BACKGROUND
3026wxEVT_NC_PAINT = _core_.wxEVT_NC_PAINT
3027wxEVT_PAINT_ICON = _core_.wxEVT_PAINT_ICON
3028wxEVT_MENU_OPEN = _core_.wxEVT_MENU_OPEN
3029wxEVT_MENU_CLOSE = _core_.wxEVT_MENU_CLOSE
3030wxEVT_MENU_HIGHLIGHT = _core_.wxEVT_MENU_HIGHLIGHT
3031wxEVT_CONTEXT_MENU = _core_.wxEVT_CONTEXT_MENU
3032wxEVT_SYS_COLOUR_CHANGED = _core_.wxEVT_SYS_COLOUR_CHANGED
3033wxEVT_DISPLAY_CHANGED = _core_.wxEVT_DISPLAY_CHANGED
3034wxEVT_SETTING_CHANGED = _core_.wxEVT_SETTING_CHANGED
3035wxEVT_QUERY_NEW_PALETTE = _core_.wxEVT_QUERY_NEW_PALETTE
3036wxEVT_PALETTE_CHANGED = _core_.wxEVT_PALETTE_CHANGED
3037wxEVT_DROP_FILES = _core_.wxEVT_DROP_FILES
3038wxEVT_DRAW_ITEM = _core_.wxEVT_DRAW_ITEM
3039wxEVT_MEASURE_ITEM = _core_.wxEVT_MEASURE_ITEM
3040wxEVT_COMPARE_ITEM = _core_.wxEVT_COMPARE_ITEM
3041wxEVT_INIT_DIALOG = _core_.wxEVT_INIT_DIALOG
3042wxEVT_IDLE = _core_.wxEVT_IDLE
3043wxEVT_UPDATE_UI = _core_.wxEVT_UPDATE_UI
3044wxEVT_SIZING = _core_.wxEVT_SIZING
3045wxEVT_MOVING = _core_.wxEVT_MOVING
3046wxEVT_COMMAND_LEFT_CLICK = _core_.wxEVT_COMMAND_LEFT_CLICK
3047wxEVT_COMMAND_LEFT_DCLICK = _core_.wxEVT_COMMAND_LEFT_DCLICK
3048wxEVT_COMMAND_RIGHT_CLICK = _core_.wxEVT_COMMAND_RIGHT_CLICK
3049wxEVT_COMMAND_RIGHT_DCLICK = _core_.wxEVT_COMMAND_RIGHT_DCLICK
3050wxEVT_COMMAND_SET_FOCUS = _core_.wxEVT_COMMAND_SET_FOCUS
3051wxEVT_COMMAND_KILL_FOCUS = _core_.wxEVT_COMMAND_KILL_FOCUS
3052wxEVT_COMMAND_ENTER = _core_.wxEVT_COMMAND_ENTER
d14a1e28
RD
3053#
3054# Create some event binders
3055EVT_SIZE = wx.PyEventBinder( wxEVT_SIZE )
3056EVT_SIZING = wx.PyEventBinder( wxEVT_SIZING )
3057EVT_MOVE = wx.PyEventBinder( wxEVT_MOVE )
3058EVT_MOVING = wx.PyEventBinder( wxEVT_MOVING )
3059EVT_CLOSE = wx.PyEventBinder( wxEVT_CLOSE_WINDOW )
3060EVT_END_SESSION = wx.PyEventBinder( wxEVT_END_SESSION )
3061EVT_QUERY_END_SESSION = wx.PyEventBinder( wxEVT_QUERY_END_SESSION )
3062EVT_PAINT = wx.PyEventBinder( wxEVT_PAINT )
3063EVT_NC_PAINT = wx.PyEventBinder( wxEVT_NC_PAINT )
3064EVT_ERASE_BACKGROUND = wx.PyEventBinder( wxEVT_ERASE_BACKGROUND )
3065EVT_CHAR = wx.PyEventBinder( wxEVT_CHAR )
3066EVT_KEY_DOWN = wx.PyEventBinder( wxEVT_KEY_DOWN )
3067EVT_KEY_UP = wx.PyEventBinder( wxEVT_KEY_UP )
3068EVT_HOTKEY = wx.PyEventBinder( wxEVT_HOTKEY, 1)
3069EVT_CHAR_HOOK = wx.PyEventBinder( wxEVT_CHAR_HOOK )
3070EVT_MENU_OPEN = wx.PyEventBinder( wxEVT_MENU_OPEN )
3071EVT_MENU_CLOSE = wx.PyEventBinder( wxEVT_MENU_CLOSE )
3072EVT_MENU_HIGHLIGHT = wx.PyEventBinder( wxEVT_MENU_HIGHLIGHT, 1)
3073EVT_MENU_HIGHLIGHT_ALL = wx.PyEventBinder( wxEVT_MENU_HIGHLIGHT )
3074EVT_SET_FOCUS = wx.PyEventBinder( wxEVT_SET_FOCUS )
3075EVT_KILL_FOCUS = wx.PyEventBinder( wxEVT_KILL_FOCUS )
3076EVT_CHILD_FOCUS = wx.PyEventBinder( wxEVT_CHILD_FOCUS )
3077EVT_ACTIVATE = wx.PyEventBinder( wxEVT_ACTIVATE )
3078EVT_ACTIVATE_APP = wx.PyEventBinder( wxEVT_ACTIVATE_APP )
3079EVT_END_SESSION = wx.PyEventBinder( wxEVT_END_SESSION )
3080EVT_QUERY_END_SESSION = wx.PyEventBinder( wxEVT_QUERY_END_SESSION )
3081EVT_DROP_FILES = wx.PyEventBinder( wxEVT_DROP_FILES )
3082EVT_INIT_DIALOG = wx.PyEventBinder( wxEVT_INIT_DIALOG )
3083EVT_SYS_COLOUR_CHANGED = wx.PyEventBinder( wxEVT_SYS_COLOUR_CHANGED )
3084EVT_DISPLAY_CHANGED = wx.PyEventBinder( wxEVT_DISPLAY_CHANGED )
3085EVT_SHOW = wx.PyEventBinder( wxEVT_SHOW )
3086EVT_MAXIMIZE = wx.PyEventBinder( wxEVT_MAXIMIZE )
3087EVT_ICONIZE = wx.PyEventBinder( wxEVT_ICONIZE )
3088EVT_NAVIGATION_KEY = wx.PyEventBinder( wxEVT_NAVIGATION_KEY )
3089EVT_PALETTE_CHANGED = wx.PyEventBinder( wxEVT_PALETTE_CHANGED )
3090EVT_QUERY_NEW_PALETTE = wx.PyEventBinder( wxEVT_QUERY_NEW_PALETTE )
3091EVT_WINDOW_CREATE = wx.PyEventBinder( wxEVT_CREATE )
3092EVT_WINDOW_DESTROY = wx.PyEventBinder( wxEVT_DESTROY )
3093EVT_SET_CURSOR = wx.PyEventBinder( wxEVT_SET_CURSOR )
3094EVT_MOUSE_CAPTURE_CHANGED = wx.PyEventBinder( wxEVT_MOUSE_CAPTURE_CHANGED )
3095
3096EVT_LEFT_DOWN = wx.PyEventBinder( wxEVT_LEFT_DOWN )
3097EVT_LEFT_UP = wx.PyEventBinder( wxEVT_LEFT_UP )
3098EVT_MIDDLE_DOWN = wx.PyEventBinder( wxEVT_MIDDLE_DOWN )
3099EVT_MIDDLE_UP = wx.PyEventBinder( wxEVT_MIDDLE_UP )
3100EVT_RIGHT_DOWN = wx.PyEventBinder( wxEVT_RIGHT_DOWN )
3101EVT_RIGHT_UP = wx.PyEventBinder( wxEVT_RIGHT_UP )
3102EVT_MOTION = wx.PyEventBinder( wxEVT_MOTION )
3103EVT_LEFT_DCLICK = wx.PyEventBinder( wxEVT_LEFT_DCLICK )
3104EVT_MIDDLE_DCLICK = wx.PyEventBinder( wxEVT_MIDDLE_DCLICK )
3105EVT_RIGHT_DCLICK = wx.PyEventBinder( wxEVT_RIGHT_DCLICK )
3106EVT_LEAVE_WINDOW = wx.PyEventBinder( wxEVT_LEAVE_WINDOW )
3107EVT_ENTER_WINDOW = wx.PyEventBinder( wxEVT_ENTER_WINDOW )
3108EVT_MOUSEWHEEL = wx.PyEventBinder( wxEVT_MOUSEWHEEL )
3109
3110EVT_MOUSE_EVENTS = wx.PyEventBinder([ wxEVT_LEFT_DOWN,
3111 wxEVT_LEFT_UP,
3112 wxEVT_MIDDLE_DOWN,
3113 wxEVT_MIDDLE_UP,
3114 wxEVT_RIGHT_DOWN,
3115 wxEVT_RIGHT_UP,
3116 wxEVT_MOTION,
3117 wxEVT_LEFT_DCLICK,
3118 wxEVT_MIDDLE_DCLICK,
3119 wxEVT_RIGHT_DCLICK,
3120 wxEVT_ENTER_WINDOW,
3121 wxEVT_LEAVE_WINDOW,
3122 wxEVT_MOUSEWHEEL
3123 ])
3124
3125
3126# Scrolling from wxWindow (sent to wxScrolledWindow)
3127EVT_SCROLLWIN = wx.PyEventBinder([ wxEVT_SCROLLWIN_TOP,
3128 wxEVT_SCROLLWIN_BOTTOM,
3129 wxEVT_SCROLLWIN_LINEUP,
3130 wxEVT_SCROLLWIN_LINEDOWN,
3131 wxEVT_SCROLLWIN_PAGEUP,
3132 wxEVT_SCROLLWIN_PAGEDOWN,
3133 wxEVT_SCROLLWIN_THUMBTRACK,
3134 wxEVT_SCROLLWIN_THUMBRELEASE,
3135 ])
3136
3137EVT_SCROLLWIN_TOP = wx.PyEventBinder( wxEVT_SCROLLWIN_TOP )
3138EVT_SCROLLWIN_BOTTOM = wx.PyEventBinder( wxEVT_SCROLLWIN_BOTTOM )
3139EVT_SCROLLWIN_LINEUP = wx.PyEventBinder( wxEVT_SCROLLWIN_LINEUP )
3140EVT_SCROLLWIN_LINEDOWN = wx.PyEventBinder( wxEVT_SCROLLWIN_LINEDOWN )
3141EVT_SCROLLWIN_PAGEUP = wx.PyEventBinder( wxEVT_SCROLLWIN_PAGEUP )
3142EVT_SCROLLWIN_PAGEDOWN = wx.PyEventBinder( wxEVT_SCROLLWIN_PAGEDOWN )
3143EVT_SCROLLWIN_THUMBTRACK = wx.PyEventBinder( wxEVT_SCROLLWIN_THUMBTRACK )
3144EVT_SCROLLWIN_THUMBRELEASE = wx.PyEventBinder( wxEVT_SCROLLWIN_THUMBRELEASE )
3145
3146# Scrolling from wxSlider and wxScrollBar
3147EVT_SCROLL = wx.PyEventBinder([ wxEVT_SCROLL_TOP,
3148 wxEVT_SCROLL_BOTTOM,
3149 wxEVT_SCROLL_LINEUP,
3150 wxEVT_SCROLL_LINEDOWN,
3151 wxEVT_SCROLL_PAGEUP,
3152 wxEVT_SCROLL_PAGEDOWN,
3153 wxEVT_SCROLL_THUMBTRACK,
3154 wxEVT_SCROLL_THUMBRELEASE,
3155 wxEVT_SCROLL_ENDSCROLL,
3156 ])
3157
3158EVT_SCROLL_TOP = wx.PyEventBinder( wxEVT_SCROLL_TOP )
3159EVT_SCROLL_BOTTOM = wx.PyEventBinder( wxEVT_SCROLL_BOTTOM )
3160EVT_SCROLL_LINEUP = wx.PyEventBinder( wxEVT_SCROLL_LINEUP )
3161EVT_SCROLL_LINEDOWN = wx.PyEventBinder( wxEVT_SCROLL_LINEDOWN )
3162EVT_SCROLL_PAGEUP = wx.PyEventBinder( wxEVT_SCROLL_PAGEUP )
3163EVT_SCROLL_PAGEDOWN = wx.PyEventBinder( wxEVT_SCROLL_PAGEDOWN )
3164EVT_SCROLL_THUMBTRACK = wx.PyEventBinder( wxEVT_SCROLL_THUMBTRACK )
3165EVT_SCROLL_THUMBRELEASE = wx.PyEventBinder( wxEVT_SCROLL_THUMBRELEASE )
3166EVT_SCROLL_ENDSCROLL = wx.PyEventBinder( wxEVT_SCROLL_ENDSCROLL )
3167
3168# Scrolling from wxSlider and wxScrollBar, with an id
3169EVT_COMMAND_SCROLL = wx.PyEventBinder([ wxEVT_SCROLL_TOP,
3170 wxEVT_SCROLL_BOTTOM,
3171 wxEVT_SCROLL_LINEUP,
3172 wxEVT_SCROLL_LINEDOWN,
3173 wxEVT_SCROLL_PAGEUP,
3174 wxEVT_SCROLL_PAGEDOWN,
3175 wxEVT_SCROLL_THUMBTRACK,
3176 wxEVT_SCROLL_THUMBRELEASE,
3177 wxEVT_SCROLL_ENDSCROLL,
3178 ], 1)
3179
3180EVT_COMMAND_SCROLL_TOP = wx.PyEventBinder( wxEVT_SCROLL_TOP, 1)
3181EVT_COMMAND_SCROLL_BOTTOM = wx.PyEventBinder( wxEVT_SCROLL_BOTTOM, 1)
3182EVT_COMMAND_SCROLL_LINEUP = wx.PyEventBinder( wxEVT_SCROLL_LINEUP, 1)
3183EVT_COMMAND_SCROLL_LINEDOWN = wx.PyEventBinder( wxEVT_SCROLL_LINEDOWN, 1)
3184EVT_COMMAND_SCROLL_PAGEUP = wx.PyEventBinder( wxEVT_SCROLL_PAGEUP, 1)
3185EVT_COMMAND_SCROLL_PAGEDOWN = wx.PyEventBinder( wxEVT_SCROLL_PAGEDOWN, 1)
3186EVT_COMMAND_SCROLL_THUMBTRACK = wx.PyEventBinder( wxEVT_SCROLL_THUMBTRACK, 1)
3187EVT_COMMAND_SCROLL_THUMBRELEASE = wx.PyEventBinder( wxEVT_SCROLL_THUMBRELEASE, 1)
3188EVT_COMMAND_SCROLL_ENDSCROLL = wx.PyEventBinder( wxEVT_SCROLL_ENDSCROLL, 1)
3189
d14a1e28
RD
3190EVT_BUTTON = wx.PyEventBinder( wxEVT_COMMAND_BUTTON_CLICKED, 1)
3191EVT_CHECKBOX = wx.PyEventBinder( wxEVT_COMMAND_CHECKBOX_CLICKED, 1)
3192EVT_CHOICE = wx.PyEventBinder( wxEVT_COMMAND_CHOICE_SELECTED, 1)
3193EVT_LISTBOX = wx.PyEventBinder( wxEVT_COMMAND_LISTBOX_SELECTED, 1)
3194EVT_LISTBOX_DCLICK = wx.PyEventBinder( wxEVT_COMMAND_LISTBOX_DOUBLECLICKED, 1)
3195EVT_MENU = wx.PyEventBinder( wxEVT_COMMAND_MENU_SELECTED, 1)
3196EVT_MENU_RANGE = wx.PyEventBinder( wxEVT_COMMAND_MENU_SELECTED, 2)
3197EVT_SLIDER = wx.PyEventBinder( wxEVT_COMMAND_SLIDER_UPDATED, 1)
3198EVT_RADIOBOX = wx.PyEventBinder( wxEVT_COMMAND_RADIOBOX_SELECTED, 1)
3199EVT_RADIOBUTTON = wx.PyEventBinder( wxEVT_COMMAND_RADIOBUTTON_SELECTED, 1)
3200
3201EVT_SCROLLBAR = wx.PyEventBinder( wxEVT_COMMAND_SCROLLBAR_UPDATED, 1)
3202EVT_VLBOX = wx.PyEventBinder( wxEVT_COMMAND_VLBOX_SELECTED, 1)
3203EVT_COMBOBOX = wx.PyEventBinder( wxEVT_COMMAND_COMBOBOX_SELECTED, 1)
3204EVT_TOOL = wx.PyEventBinder( wxEVT_COMMAND_TOOL_CLICKED, 1)
3205EVT_TOOL_RANGE = wx.PyEventBinder( wxEVT_COMMAND_TOOL_CLICKED, 2)
3206EVT_TOOL_RCLICKED = wx.PyEventBinder( wxEVT_COMMAND_TOOL_RCLICKED, 1)
3207EVT_TOOL_RCLICKED_RANGE = wx.PyEventBinder( wxEVT_COMMAND_TOOL_RCLICKED, 2)
3208EVT_TOOL_ENTER = wx.PyEventBinder( wxEVT_COMMAND_TOOL_ENTER, 1)
3209EVT_CHECKLISTBOX = wx.PyEventBinder( wxEVT_COMMAND_CHECKLISTBOX_TOGGLED, 1)
3210
3211
3212EVT_COMMAND_LEFT_CLICK = wx.PyEventBinder( wxEVT_COMMAND_LEFT_CLICK, 1)
3213EVT_COMMAND_LEFT_DCLICK = wx.PyEventBinder( wxEVT_COMMAND_LEFT_DCLICK, 1)
3214EVT_COMMAND_RIGHT_CLICK = wx.PyEventBinder( wxEVT_COMMAND_RIGHT_CLICK, 1)
3215EVT_COMMAND_RIGHT_DCLICK = wx.PyEventBinder( wxEVT_COMMAND_RIGHT_DCLICK, 1)
3216EVT_COMMAND_SET_FOCUS = wx.PyEventBinder( wxEVT_COMMAND_SET_FOCUS, 1)
3217EVT_COMMAND_KILL_FOCUS = wx.PyEventBinder( wxEVT_COMMAND_KILL_FOCUS, 1)
3218EVT_COMMAND_ENTER = wx.PyEventBinder( wxEVT_COMMAND_ENTER, 1)
3219
3220EVT_IDLE = wx.PyEventBinder( wxEVT_IDLE )
3221
3222EVT_UPDATE_UI = wx.PyEventBinder( wxEVT_UPDATE_UI, 1)
3223EVT_UPDATE_UI_RANGE = wx.PyEventBinder( wxEVT_UPDATE_UI, 2)
3224
3225EVT_CONTEXT_MENU = wx.PyEventBinder( wxEVT_CONTEXT_MENU )
3226
3227
3228
3229#---------------------------------------------------------------------------
3230
3231class Event(Object):
093d3ff1 3232 """Proxy of C++ Event class"""
e811c8ce
RD
3233 def __init__(self): raise RuntimeError, "No constructor defined"
3234 def __repr__(self):
3235 return "<%s.%s; proxy of C++ wxEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
54f9ee45 3236 def __del__(self, destroy=_core_.delete_Event):
a95a7133 3237 """__del__(self)"""
d14a1e28
RD
3238 try:
3239 if self.thisown: destroy(self)
3240 except: pass
e811c8ce
RD
3241
3242 def SetEventType(*args, **kwargs):
a95a7133 3243 """SetEventType(self, wxEventType typ)"""
54f9ee45 3244 return _core_.Event_SetEventType(*args, **kwargs)
e811c8ce
RD
3245
3246 def GetEventType(*args, **kwargs):
a95a7133 3247 """GetEventType(self) -> wxEventType"""
54f9ee45 3248 return _core_.Event_GetEventType(*args, **kwargs)
e811c8ce
RD
3249
3250 def GetEventObject(*args, **kwargs):
a95a7133 3251 """GetEventObject(self) -> Object"""
54f9ee45 3252 return _core_.Event_GetEventObject(*args, **kwargs)
e811c8ce
RD
3253
3254 def SetEventObject(*args, **kwargs):
a95a7133 3255 """SetEventObject(self, Object obj)"""
54f9ee45 3256 return _core_.Event_SetEventObject(*args, **kwargs)
e811c8ce
RD
3257
3258 def GetTimestamp(*args, **kwargs):
a95a7133 3259 """GetTimestamp(self) -> long"""
54f9ee45 3260 return _core_.Event_GetTimestamp(*args, **kwargs)
e811c8ce
RD
3261
3262 def SetTimestamp(*args, **kwargs):
a95a7133 3263 """SetTimestamp(self, long ts=0)"""
54f9ee45 3264 return _core_.Event_SetTimestamp(*args, **kwargs)
e811c8ce
RD
3265
3266 def GetId(*args, **kwargs):
a95a7133 3267 """GetId(self) -> int"""
54f9ee45 3268 return _core_.Event_GetId(*args, **kwargs)
e811c8ce
RD
3269
3270 def SetId(*args, **kwargs):
a95a7133 3271 """SetId(self, int Id)"""
54f9ee45 3272 return _core_.Event_SetId(*args, **kwargs)
e811c8ce
RD
3273
3274 def IsCommandEvent(*args, **kwargs):
a95a7133 3275 """IsCommandEvent(self) -> bool"""
54f9ee45 3276 return _core_.Event_IsCommandEvent(*args, **kwargs)
e811c8ce
RD
3277
3278 def Skip(*args, **kwargs):
a95a7133 3279 """Skip(self, bool skip=True)"""
54f9ee45 3280 return _core_.Event_Skip(*args, **kwargs)
e811c8ce
RD
3281
3282 def GetSkipped(*args, **kwargs):
a95a7133 3283 """GetSkipped(self) -> bool"""
54f9ee45 3284 return _core_.Event_GetSkipped(*args, **kwargs)
e811c8ce
RD
3285
3286 def ShouldPropagate(*args, **kwargs):
a95a7133 3287 """ShouldPropagate(self) -> bool"""
54f9ee45 3288 return _core_.Event_ShouldPropagate(*args, **kwargs)
e811c8ce
RD
3289
3290 def StopPropagation(*args, **kwargs):
a95a7133 3291 """StopPropagation(self) -> int"""
54f9ee45 3292 return _core_.Event_StopPropagation(*args, **kwargs)
e811c8ce
RD
3293
3294 def ResumePropagation(*args, **kwargs):
a95a7133 3295 """ResumePropagation(self, int propagationLevel)"""
54f9ee45 3296 return _core_.Event_ResumePropagation(*args, **kwargs)
e811c8ce
RD
3297
3298 def Clone(*args, **kwargs):
a95a7133 3299 """Clone(self) -> Event"""
54f9ee45 3300 return _core_.Event_Clone(*args, **kwargs)
e811c8ce 3301
d14a1e28
RD
3302
3303class EventPtr(Event):
3304 def __init__(self, this):
3305 self.this = this
3306 if not hasattr(self,"thisown"): self.thisown = 0
3307 self.__class__ = Event
54f9ee45 3308_core_.Event_swigregister(EventPtr)
d14a1e28
RD
3309
3310#---------------------------------------------------------------------------
3311
3312class PropagationDisabler(object):
093d3ff1 3313 """Proxy of C++ PropagationDisabler class"""
e811c8ce
RD
3314 def __repr__(self):
3315 return "<%s.%s; proxy of C++ wxPropagationDisabler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 3316 def __init__(self, *args, **kwargs):
a95a7133 3317 """__init__(self, Event event) -> PropagationDisabler"""
54f9ee45 3318 newobj = _core_.new_PropagationDisabler(*args, **kwargs)
d14a1e28
RD
3319 self.this = newobj.this
3320 self.thisown = 1
3321 del newobj.thisown
54f9ee45 3322 def __del__(self, destroy=_core_.delete_PropagationDisabler):
a95a7133 3323 """__del__(self)"""
d14a1e28
RD
3324 try:
3325 if self.thisown: destroy(self)
3326 except: pass
e811c8ce 3327
d14a1e28
RD
3328
3329class PropagationDisablerPtr(PropagationDisabler):
3330 def __init__(self, this):
3331 self.this = this
3332 if not hasattr(self,"thisown"): self.thisown = 0
3333 self.__class__ = PropagationDisabler
54f9ee45 3334_core_.PropagationDisabler_swigregister(PropagationDisablerPtr)
d14a1e28
RD
3335
3336class PropagateOnce(object):
093d3ff1 3337 """Proxy of C++ PropagateOnce class"""
e811c8ce
RD
3338 def __repr__(self):
3339 return "<%s.%s; proxy of C++ wxPropagateOnce instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 3340 def __init__(self, *args, **kwargs):
a95a7133 3341 """__init__(self, Event event) -> PropagateOnce"""
54f9ee45 3342 newobj = _core_.new_PropagateOnce(*args, **kwargs)
d14a1e28
RD
3343 self.this = newobj.this
3344 self.thisown = 1
3345 del newobj.thisown
54f9ee45 3346 def __del__(self, destroy=_core_.delete_PropagateOnce):
a95a7133 3347 """__del__(self)"""
d14a1e28
RD
3348 try:
3349 if self.thisown: destroy(self)
3350 except: pass
e811c8ce 3351
d14a1e28
RD
3352
3353class PropagateOncePtr(PropagateOnce):
3354 def __init__(self, this):
3355 self.this = this
3356 if not hasattr(self,"thisown"): self.thisown = 0
3357 self.__class__ = PropagateOnce
54f9ee45 3358_core_.PropagateOnce_swigregister(PropagateOncePtr)
d14a1e28
RD
3359
3360#---------------------------------------------------------------------------
3361
3362class CommandEvent(Event):
093d3ff1 3363 """Proxy of C++ CommandEvent class"""
e811c8ce
RD
3364 def __repr__(self):
3365 return "<%s.%s; proxy of C++ wxCommandEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 3366 def __init__(self, *args, **kwargs):
a95a7133 3367 """__init__(self, wxEventType commandType=wxEVT_NULL, int winid=0) -> CommandEvent"""
54f9ee45 3368 newobj = _core_.new_CommandEvent(*args, **kwargs)
d14a1e28
RD
3369 self.this = newobj.this
3370 self.thisown = 1
3371 del newobj.thisown
e811c8ce 3372 def GetSelection(*args, **kwargs):
a95a7133 3373 """GetSelection(self) -> int"""
54f9ee45 3374 return _core_.CommandEvent_GetSelection(*args, **kwargs)
e811c8ce
RD
3375
3376 def SetString(*args, **kwargs):
a95a7133 3377 """SetString(self, String s)"""
54f9ee45 3378 return _core_.CommandEvent_SetString(*args, **kwargs)
e811c8ce
RD
3379
3380 def GetString(*args, **kwargs):
a95a7133 3381 """GetString(self) -> String"""
54f9ee45 3382 return _core_.CommandEvent_GetString(*args, **kwargs)
e811c8ce
RD
3383
3384 def IsChecked(*args, **kwargs):
a95a7133 3385 """IsChecked(self) -> bool"""
54f9ee45 3386 return _core_.CommandEvent_IsChecked(*args, **kwargs)
e811c8ce 3387
242b7b46 3388 Checked = IsChecked
e811c8ce 3389 def IsSelection(*args, **kwargs):
a95a7133 3390 """IsSelection(self) -> bool"""
54f9ee45 3391 return _core_.CommandEvent_IsSelection(*args, **kwargs)
e811c8ce
RD
3392
3393 def SetExtraLong(*args, **kwargs):
a95a7133 3394 """SetExtraLong(self, long extraLong)"""
54f9ee45 3395 return _core_.CommandEvent_SetExtraLong(*args, **kwargs)
e811c8ce
RD
3396
3397 def GetExtraLong(*args, **kwargs):
a95a7133 3398 """GetExtraLong(self) -> long"""
54f9ee45 3399 return _core_.CommandEvent_GetExtraLong(*args, **kwargs)
e811c8ce
RD
3400
3401 def SetInt(*args, **kwargs):
a95a7133 3402 """SetInt(self, int i)"""
54f9ee45 3403 return _core_.CommandEvent_SetInt(*args, **kwargs)
e811c8ce
RD
3404
3405 def GetInt(*args, **kwargs):
a95a7133 3406 """GetInt(self) -> long"""
54f9ee45 3407 return _core_.CommandEvent_GetInt(*args, **kwargs)
e811c8ce
RD
3408
3409 def Clone(*args, **kwargs):
a95a7133 3410 """Clone(self) -> Event"""
54f9ee45 3411 return _core_.CommandEvent_Clone(*args, **kwargs)
e811c8ce 3412
d14a1e28
RD
3413
3414class CommandEventPtr(CommandEvent):
3415 def __init__(self, this):
3416 self.this = this
3417 if not hasattr(self,"thisown"): self.thisown = 0
3418 self.__class__ = CommandEvent
54f9ee45 3419_core_.CommandEvent_swigregister(CommandEventPtr)
d14a1e28
RD
3420
3421#---------------------------------------------------------------------------
3422
3423class NotifyEvent(CommandEvent):
093d3ff1 3424 """Proxy of C++ NotifyEvent class"""
e811c8ce
RD
3425 def __repr__(self):
3426 return "<%s.%s; proxy of C++ wxNotifyEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 3427 def __init__(self, *args, **kwargs):
a95a7133 3428 """__init__(self, wxEventType commandType=wxEVT_NULL, int winid=0) -> NotifyEvent"""
54f9ee45 3429 newobj = _core_.new_NotifyEvent(*args, **kwargs)
d14a1e28
RD
3430 self.this = newobj.this
3431 self.thisown = 1
3432 del newobj.thisown
e811c8ce 3433 def Veto(*args, **kwargs):
a95a7133 3434 """Veto(self)"""
54f9ee45 3435 return _core_.NotifyEvent_Veto(*args, **kwargs)
e811c8ce
RD
3436
3437 def Allow(*args, **kwargs):
a95a7133 3438 """Allow(self)"""
54f9ee45 3439 return _core_.NotifyEvent_Allow(*args, **kwargs)
e811c8ce
RD
3440
3441 def IsAllowed(*args, **kwargs):
a95a7133 3442 """IsAllowed(self) -> bool"""
54f9ee45 3443 return _core_.NotifyEvent_IsAllowed(*args, **kwargs)
e811c8ce 3444
d14a1e28
RD
3445
3446class NotifyEventPtr(NotifyEvent):
3447 def __init__(self, this):
3448 self.this = this
3449 if not hasattr(self,"thisown"): self.thisown = 0
3450 self.__class__ = NotifyEvent
54f9ee45 3451_core_.NotifyEvent_swigregister(NotifyEventPtr)
d14a1e28
RD
3452
3453#---------------------------------------------------------------------------
3454
3455class ScrollEvent(CommandEvent):
093d3ff1 3456 """Proxy of C++ ScrollEvent class"""
e811c8ce
RD
3457 def __repr__(self):
3458 return "<%s.%s; proxy of C++ wxScrollEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 3459 def __init__(self, *args, **kwargs):
0df68c9f 3460 """
a95a7133 3461 __init__(self, wxEventType commandType=wxEVT_NULL, int winid=0, int pos=0,
0df68c9f
RD
3462 int orient=0) -> ScrollEvent
3463 """
54f9ee45 3464 newobj = _core_.new_ScrollEvent(*args, **kwargs)
d14a1e28
RD
3465 self.this = newobj.this
3466 self.thisown = 1
3467 del newobj.thisown
e811c8ce 3468 def GetOrientation(*args, **kwargs):
a95a7133 3469 """GetOrientation(self) -> int"""
54f9ee45 3470 return _core_.ScrollEvent_GetOrientation(*args, **kwargs)
e811c8ce
RD
3471
3472 def GetPosition(*args, **kwargs):
a95a7133 3473 """GetPosition(self) -> int"""
54f9ee45 3474 return _core_.ScrollEvent_GetPosition(*args, **kwargs)
e811c8ce
RD
3475
3476 def SetOrientation(*args, **kwargs):
a95a7133 3477 """SetOrientation(self, int orient)"""
54f9ee45 3478 return _core_.ScrollEvent_SetOrientation(*args, **kwargs)
e811c8ce
RD
3479
3480 def SetPosition(*args, **kwargs):
a95a7133 3481 """SetPosition(self, int pos)"""
54f9ee45 3482 return _core_.ScrollEvent_SetPosition(*args, **kwargs)
e811c8ce 3483
d14a1e28
RD
3484
3485class ScrollEventPtr(ScrollEvent):
3486 def __init__(self, this):
3487 self.this = this
3488 if not hasattr(self,"thisown"): self.thisown = 0
3489 self.__class__ = ScrollEvent
54f9ee45 3490_core_.ScrollEvent_swigregister(ScrollEventPtr)
d14a1e28
RD
3491
3492#---------------------------------------------------------------------------
3493
3494class ScrollWinEvent(Event):
093d3ff1 3495 """Proxy of C++ ScrollWinEvent class"""
e811c8ce
RD
3496 def __repr__(self):
3497 return "<%s.%s; proxy of C++ wxScrollWinEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 3498 def __init__(self, *args, **kwargs):
a95a7133 3499 """__init__(self, wxEventType commandType=wxEVT_NULL, int pos=0, int orient=0) -> ScrollWinEvent"""
54f9ee45 3500 newobj = _core_.new_ScrollWinEvent(*args, **kwargs)
d14a1e28
RD
3501 self.this = newobj.this
3502 self.thisown = 1
3503 del newobj.thisown
e811c8ce 3504 def GetOrientation(*args, **kwargs):
a95a7133 3505 """GetOrientation(self) -> int"""
54f9ee45 3506 return _core_.ScrollWinEvent_GetOrientation(*args, **kwargs)
e811c8ce
RD
3507
3508 def GetPosition(*args, **kwargs):
a95a7133 3509 """GetPosition(self) -> int"""
54f9ee45 3510 return _core_.ScrollWinEvent_GetPosition(*args, **kwargs)
e811c8ce
RD
3511
3512 def SetOrientation(*args, **kwargs):
a95a7133 3513 """SetOrientation(self, int orient)"""
54f9ee45 3514 return _core_.ScrollWinEvent_SetOrientation(*args, **kwargs)
e811c8ce
RD
3515
3516 def SetPosition(*args, **kwargs):
a95a7133 3517 """SetPosition(self, int pos)"""
54f9ee45 3518 return _core_.ScrollWinEvent_SetPosition(*args, **kwargs)
e811c8ce 3519
d14a1e28
RD
3520
3521class ScrollWinEventPtr(ScrollWinEvent):
3522 def __init__(self, this):
3523 self.this = this
3524 if not hasattr(self,"thisown"): self.thisown = 0
3525 self.__class__ = ScrollWinEvent
54f9ee45 3526_core_.ScrollWinEvent_swigregister(ScrollWinEventPtr)
d14a1e28
RD
3527
3528#---------------------------------------------------------------------------
3529
54f9ee45
RD
3530MOUSE_BTN_ANY = _core_.MOUSE_BTN_ANY
3531MOUSE_BTN_NONE = _core_.MOUSE_BTN_NONE
3532MOUSE_BTN_LEFT = _core_.MOUSE_BTN_LEFT
3533MOUSE_BTN_MIDDLE = _core_.MOUSE_BTN_MIDDLE
3534MOUSE_BTN_RIGHT = _core_.MOUSE_BTN_RIGHT
d14a1e28 3535class MouseEvent(Event):
093d3ff1 3536 """Proxy of C++ MouseEvent class"""
e811c8ce
RD
3537 def __repr__(self):
3538 return "<%s.%s; proxy of C++ wxMouseEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 3539 def __init__(self, *args, **kwargs):
a95a7133 3540 """__init__(self, wxEventType mouseType=wxEVT_NULL) -> MouseEvent"""
54f9ee45 3541 newobj = _core_.new_MouseEvent(*args, **kwargs)
d14a1e28
RD
3542 self.this = newobj.this
3543 self.thisown = 1
3544 del newobj.thisown
e811c8ce 3545 def IsButton(*args, **kwargs):
a95a7133 3546 """IsButton(self) -> bool"""
54f9ee45 3547 return _core_.MouseEvent_IsButton(*args, **kwargs)
e811c8ce
RD
3548
3549 def ButtonDown(*args, **kwargs):
a95a7133 3550 """ButtonDown(self, int but=MOUSE_BTN_ANY) -> bool"""
54f9ee45 3551 return _core_.MouseEvent_ButtonDown(*args, **kwargs)
e811c8ce
RD
3552
3553 def ButtonDClick(*args, **kwargs):
a95a7133 3554 """ButtonDClick(self, int but=MOUSE_BTN_ANY) -> bool"""
54f9ee45 3555 return _core_.MouseEvent_ButtonDClick(*args, **kwargs)
e811c8ce
RD
3556
3557 def ButtonUp(*args, **kwargs):
a95a7133 3558 """ButtonUp(self, int but=MOUSE_BTN_ANY) -> bool"""
54f9ee45 3559 return _core_.MouseEvent_ButtonUp(*args, **kwargs)
e811c8ce
RD
3560
3561 def Button(*args, **kwargs):
a95a7133 3562 """Button(self, int but) -> bool"""
54f9ee45 3563 return _core_.MouseEvent_Button(*args, **kwargs)
e811c8ce
RD
3564
3565 def ButtonIsDown(*args, **kwargs):
a95a7133 3566 """ButtonIsDown(self, int but) -> bool"""
54f9ee45 3567 return _core_.MouseEvent_ButtonIsDown(*args, **kwargs)
e811c8ce
RD
3568
3569 def GetButton(*args, **kwargs):
a95a7133 3570 """GetButton(self) -> int"""
54f9ee45 3571 return _core_.MouseEvent_GetButton(*args, **kwargs)
e811c8ce
RD
3572
3573 def ControlDown(*args, **kwargs):
a95a7133 3574 """ControlDown(self) -> bool"""
54f9ee45 3575 return _core_.MouseEvent_ControlDown(*args, **kwargs)
e811c8ce
RD
3576
3577 def MetaDown(*args, **kwargs):
a95a7133 3578 """MetaDown(self) -> bool"""
54f9ee45 3579 return _core_.MouseEvent_MetaDown(*args, **kwargs)
e811c8ce
RD
3580
3581 def AltDown(*args, **kwargs):
a95a7133 3582 """AltDown(self) -> bool"""
54f9ee45 3583 return _core_.MouseEvent_AltDown(*args, **kwargs)
e811c8ce
RD
3584
3585 def ShiftDown(*args, **kwargs):
a95a7133 3586 """ShiftDown(self) -> bool"""
54f9ee45 3587 return _core_.MouseEvent_ShiftDown(*args, **kwargs)
e811c8ce 3588
412d302d
RD
3589 def CmdDown(*args, **kwargs):
3590 """
3591 CmdDown(self) -> bool
3592
3593 "Cmd" is a pseudo key which is the same as Control for PC and Unix
3594 platforms but the special "Apple" (a.k.a as "Command") key on
3595 Macs: it makes often sense to use it instead of, say, `ControlDown`
3596 because Cmd key is used for the same thing under Mac as Ctrl
3597 elsewhere. The Ctrl still exists, it's just not used for this
3598 purpose. So for non-Mac platforms this is the same as `ControlDown`
3599 and Macs this is the same as `MetaDown`.
3600 """
3601 return _core_.MouseEvent_CmdDown(*args, **kwargs)
3602
e811c8ce 3603 def LeftDown(*args, **kwargs):
a95a7133 3604 """LeftDown(self) -> bool"""
54f9ee45 3605 return _core_.MouseEvent_LeftDown(*args, **kwargs)
e811c8ce
RD
3606
3607 def MiddleDown(*args, **kwargs):
a95a7133 3608 """MiddleDown(self) -> bool"""
54f9ee45 3609 return _core_.MouseEvent_MiddleDown(*args, **kwargs)
e811c8ce
RD
3610
3611 def RightDown(*args, **kwargs):
a95a7133 3612 """RightDown(self) -> bool"""
54f9ee45 3613 return _core_.MouseEvent_RightDown(*args, **kwargs)
e811c8ce
RD
3614
3615 def LeftUp(*args, **kwargs):
a95a7133 3616 """LeftUp(self) -> bool"""
54f9ee45 3617 return _core_.MouseEvent_LeftUp(*args, **kwargs)
e811c8ce
RD
3618
3619 def MiddleUp(*args, **kwargs):
a95a7133 3620 """MiddleUp(self) -> bool"""
54f9ee45 3621 return _core_.MouseEvent_MiddleUp(*args, **kwargs)
e811c8ce
RD
3622
3623 def RightUp(*args, **kwargs):
a95a7133 3624 """RightUp(self) -> bool"""
54f9ee45 3625 return _core_.MouseEvent_RightUp(*args, **kwargs)
e811c8ce
RD
3626
3627 def LeftDClick(*args, **kwargs):
a95a7133 3628 """LeftDClick(self) -> bool"""
54f9ee45 3629 return _core_.MouseEvent_LeftDClick(*args, **kwargs)
e811c8ce
RD
3630
3631 def MiddleDClick(*args, **kwargs):
a95a7133 3632 """MiddleDClick(self) -> bool"""
54f9ee45 3633 return _core_.MouseEvent_MiddleDClick(*args, **kwargs)
e811c8ce
RD
3634
3635 def RightDClick(*args, **kwargs):
a95a7133 3636 """RightDClick(self) -> bool"""
54f9ee45 3637 return _core_.MouseEvent_RightDClick(*args, **kwargs)
e811c8ce
RD
3638
3639 def LeftIsDown(*args, **kwargs):
a95a7133 3640 """LeftIsDown(self) -> bool"""
54f9ee45 3641 return _core_.MouseEvent_LeftIsDown(*args, **kwargs)
e811c8ce
RD
3642
3643 def MiddleIsDown(*args, **kwargs):
a95a7133 3644 """MiddleIsDown(self) -> bool"""
54f9ee45 3645 return _core_.MouseEvent_MiddleIsDown(*args, **kwargs)
e811c8ce
RD
3646
3647 def RightIsDown(*args, **kwargs):
a95a7133 3648 """RightIsDown(self) -> bool"""
54f9ee45 3649 return _core_.MouseEvent_RightIsDown(*args, **kwargs)
e811c8ce
RD
3650
3651 def Dragging(*args, **kwargs):
a95a7133 3652 """Dragging(self) -> bool"""
54f9ee45 3653 return _core_.MouseEvent_Dragging(*args, **kwargs)
e811c8ce
RD
3654
3655 def Moving(*args, **kwargs):
a95a7133 3656 """Moving(self) -> bool"""
54f9ee45 3657 return _core_.MouseEvent_Moving(*args, **kwargs)
e811c8ce
RD
3658
3659 def Entering(*args, **kwargs):
a95a7133 3660 """Entering(self) -> bool"""
54f9ee45 3661 return _core_.MouseEvent_Entering(*args, **kwargs)
e811c8ce
RD
3662
3663 def Leaving(*args, **kwargs):
a95a7133 3664 """Leaving(self) -> bool"""
54f9ee45 3665 return _core_.MouseEvent_Leaving(*args, **kwargs)
e811c8ce
RD
3666
3667 def GetPosition(*args, **kwargs):
0df68c9f 3668 """
a95a7133 3669 GetPosition(self) -> Point
e811c8ce 3670
41e2b43e
RD
3671 Returns the position of the mouse in window coordinates when the event
3672 happened.
0df68c9f 3673 """
54f9ee45 3674 return _core_.MouseEvent_GetPosition(*args, **kwargs)
e811c8ce
RD
3675
3676 def GetPositionTuple(*args, **kwargs):
0df68c9f
RD
3677 """
3678 GetPositionTuple() -> (x,y)
e811c8ce 3679
41e2b43e
RD
3680 Returns the position of the mouse in window coordinates when the event
3681 happened.
0df68c9f 3682 """
54f9ee45 3683 return _core_.MouseEvent_GetPositionTuple(*args, **kwargs)
e811c8ce
RD
3684
3685 def GetLogicalPosition(*args, **kwargs):
a95a7133 3686 """GetLogicalPosition(self, DC dc) -> Point"""
54f9ee45 3687 return _core_.MouseEvent_GetLogicalPosition(*args, **kwargs)
e811c8ce
RD
3688
3689 def GetX(*args, **kwargs):
a95a7133 3690 """GetX(self) -> int"""
54f9ee45 3691 return _core_.MouseEvent_GetX(*args, **kwargs)
e811c8ce
RD
3692
3693 def GetY(*args, **kwargs):
a95a7133 3694 """GetY(self) -> int"""
54f9ee45 3695 return _core_.MouseEvent_GetY(*args, **kwargs)
e811c8ce
RD
3696
3697 def GetWheelRotation(*args, **kwargs):
a95a7133 3698 """GetWheelRotation(self) -> int"""
54f9ee45 3699 return _core_.MouseEvent_GetWheelRotation(*args, **kwargs)
e811c8ce
RD
3700
3701 def GetWheelDelta(*args, **kwargs):
a95a7133 3702 """GetWheelDelta(self) -> int"""
54f9ee45 3703 return _core_.MouseEvent_GetWheelDelta(*args, **kwargs)
e811c8ce
RD
3704
3705 def GetLinesPerAction(*args, **kwargs):
a95a7133 3706 """GetLinesPerAction(self) -> int"""
54f9ee45 3707 return _core_.MouseEvent_GetLinesPerAction(*args, **kwargs)
e811c8ce
RD
3708
3709 def IsPageScroll(*args, **kwargs):
a95a7133 3710 """IsPageScroll(self) -> bool"""
54f9ee45
RD
3711 return _core_.MouseEvent_IsPageScroll(*args, **kwargs)
3712
3713 m_x = property(_core_.MouseEvent_m_x_get, _core_.MouseEvent_m_x_set)
3714 m_y = property(_core_.MouseEvent_m_y_get, _core_.MouseEvent_m_y_set)
3715 m_leftDown = property(_core_.MouseEvent_m_leftDown_get, _core_.MouseEvent_m_leftDown_set)
3716 m_middleDown = property(_core_.MouseEvent_m_middleDown_get, _core_.MouseEvent_m_middleDown_set)
3717 m_rightDown = property(_core_.MouseEvent_m_rightDown_get, _core_.MouseEvent_m_rightDown_set)
3718 m_controlDown = property(_core_.MouseEvent_m_controlDown_get, _core_.MouseEvent_m_controlDown_set)
3719 m_shiftDown = property(_core_.MouseEvent_m_shiftDown_get, _core_.MouseEvent_m_shiftDown_set)
3720 m_altDown = property(_core_.MouseEvent_m_altDown_get, _core_.MouseEvent_m_altDown_set)
3721 m_metaDown = property(_core_.MouseEvent_m_metaDown_get, _core_.MouseEvent_m_metaDown_set)
3722 m_wheelRotation = property(_core_.MouseEvent_m_wheelRotation_get, _core_.MouseEvent_m_wheelRotation_set)
3723 m_wheelDelta = property(_core_.MouseEvent_m_wheelDelta_get, _core_.MouseEvent_m_wheelDelta_set)
3724 m_linesPerAction = property(_core_.MouseEvent_m_linesPerAction_get, _core_.MouseEvent_m_linesPerAction_set)
d14a1e28
RD
3725
3726class MouseEventPtr(MouseEvent):
3727 def __init__(self, this):
3728 self.this = this
3729 if not hasattr(self,"thisown"): self.thisown = 0
3730 self.__class__ = MouseEvent
54f9ee45 3731_core_.MouseEvent_swigregister(MouseEventPtr)
d14a1e28
RD
3732
3733#---------------------------------------------------------------------------
3734
3735class SetCursorEvent(Event):
093d3ff1 3736 """Proxy of C++ SetCursorEvent class"""
e811c8ce
RD
3737 def __repr__(self):
3738 return "<%s.%s; proxy of C++ wxSetCursorEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 3739 def __init__(self, *args, **kwargs):
a95a7133 3740 """__init__(self, int x=0, int y=0) -> SetCursorEvent"""
54f9ee45 3741 newobj = _core_.new_SetCursorEvent(*args, **kwargs)
d14a1e28
RD
3742 self.this = newobj.this
3743 self.thisown = 1
3744 del newobj.thisown
e811c8ce 3745 def GetX(*args, **kwargs):
a95a7133 3746 """GetX(self) -> int"""
54f9ee45 3747 return _core_.SetCursorEvent_GetX(*args, **kwargs)
e811c8ce
RD
3748
3749 def GetY(*args, **kwargs):
a95a7133 3750 """GetY(self) -> int"""
54f9ee45 3751 return _core_.SetCursorEvent_GetY(*args, **kwargs)
e811c8ce
RD
3752
3753 def SetCursor(*args, **kwargs):
a95a7133 3754 """SetCursor(self, Cursor cursor)"""
54f9ee45 3755 return _core_.SetCursorEvent_SetCursor(*args, **kwargs)
e811c8ce
RD
3756
3757 def GetCursor(*args, **kwargs):
a95a7133 3758 """GetCursor(self) -> Cursor"""
54f9ee45 3759 return _core_.SetCursorEvent_GetCursor(*args, **kwargs)
e811c8ce
RD
3760
3761 def HasCursor(*args, **kwargs):
a95a7133 3762 """HasCursor(self) -> bool"""
54f9ee45 3763 return _core_.SetCursorEvent_HasCursor(*args, **kwargs)
e811c8ce 3764
d14a1e28
RD
3765
3766class SetCursorEventPtr(SetCursorEvent):
3767 def __init__(self, this):
3768 self.this = this
3769 if not hasattr(self,"thisown"): self.thisown = 0
3770 self.__class__ = SetCursorEvent
54f9ee45 3771_core_.SetCursorEvent_swigregister(SetCursorEventPtr)
d14a1e28
RD
3772
3773#---------------------------------------------------------------------------
3774
3775class KeyEvent(Event):
093d3ff1 3776 """Proxy of C++ KeyEvent class"""
e811c8ce
RD
3777 def __repr__(self):
3778 return "<%s.%s; proxy of C++ wxKeyEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 3779 def __init__(self, *args, **kwargs):
a95a7133 3780 """__init__(self, wxEventType keyType=wxEVT_NULL) -> KeyEvent"""
54f9ee45 3781 newobj = _core_.new_KeyEvent(*args, **kwargs)
d14a1e28
RD
3782 self.this = newobj.this
3783 self.thisown = 1
3784 del newobj.thisown
e811c8ce 3785 def ControlDown(*args, **kwargs):
a95a7133 3786 """ControlDown(self) -> bool"""
54f9ee45 3787 return _core_.KeyEvent_ControlDown(*args, **kwargs)
e811c8ce
RD
3788
3789 def MetaDown(*args, **kwargs):
a95a7133 3790 """MetaDown(self) -> bool"""
54f9ee45 3791 return _core_.KeyEvent_MetaDown(*args, **kwargs)
e811c8ce
RD
3792
3793 def AltDown(*args, **kwargs):
a95a7133 3794 """AltDown(self) -> bool"""
54f9ee45 3795 return _core_.KeyEvent_AltDown(*args, **kwargs)
e811c8ce
RD
3796
3797 def ShiftDown(*args, **kwargs):
a95a7133 3798 """ShiftDown(self) -> bool"""
54f9ee45 3799 return _core_.KeyEvent_ShiftDown(*args, **kwargs)
e811c8ce 3800
412d302d
RD
3801 def CmdDown(*args, **kwargs):
3802 """
3803 CmdDown(self) -> bool
3804
3805 "Cmd" is a pseudo key which is the same as Control for PC and Unix
3806 platforms but the special "Apple" (a.k.a as "Command") key on
3807 Macs: it makes often sense to use it instead of, say, `ControlDown`
3808 because Cmd key is used for the same thing under Mac as Ctrl
3809 elsewhere. The Ctrl still exists, it's just not used for this
3810 purpose. So for non-Mac platforms this is the same as `ControlDown`
3811 and Macs this is the same as `MetaDown`.
3812 """
3813 return _core_.KeyEvent_CmdDown(*args, **kwargs)
3814
e811c8ce 3815 def HasModifiers(*args, **kwargs):
a95a7133 3816 """HasModifiers(self) -> bool"""
54f9ee45 3817 return _core_.KeyEvent_HasModifiers(*args, **kwargs)
e811c8ce
RD
3818
3819 def GetKeyCode(*args, **kwargs):
a95a7133 3820 """GetKeyCode(self) -> int"""
54f9ee45 3821 return _core_.KeyEvent_GetKeyCode(*args, **kwargs)
e811c8ce 3822
d14a1e28 3823 KeyCode = GetKeyCode
19272049
RD
3824 def GetUnicodeKey(*args, **kwargs):
3825 """GetUnicodeKey(self) -> int"""
3826 return _core_.KeyEvent_GetUnicodeKey(*args, **kwargs)
e811c8ce 3827
19272049 3828 GetUniChar = GetUnicodeKey
e811c8ce 3829 def GetRawKeyCode(*args, **kwargs):
a95a7133 3830 """GetRawKeyCode(self) -> unsigned int"""
54f9ee45 3831 return _core_.KeyEvent_GetRawKeyCode(*args, **kwargs)
e811c8ce
RD
3832
3833 def GetRawKeyFlags(*args, **kwargs):
a95a7133 3834 """GetRawKeyFlags(self) -> unsigned int"""
54f9ee45 3835 return _core_.KeyEvent_GetRawKeyFlags(*args, **kwargs)
e811c8ce
RD
3836
3837 def GetPosition(*args, **kwargs):
0df68c9f 3838 """
a95a7133 3839 GetPosition(self) -> Point
e811c8ce 3840
0df68c9f
RD
3841 Find the position of the event.
3842 """
54f9ee45 3843 return _core_.KeyEvent_GetPosition(*args, **kwargs)
e811c8ce
RD
3844
3845 def GetPositionTuple(*args, **kwargs):
0df68c9f
RD
3846 """
3847 GetPositionTuple() -> (x,y)
e811c8ce 3848
0df68c9f
RD
3849 Find the position of the event.
3850 """
54f9ee45 3851 return _core_.KeyEvent_GetPositionTuple(*args, **kwargs)
e811c8ce
RD
3852
3853 def GetX(*args, **kwargs):
a95a7133 3854 """GetX(self) -> int"""
54f9ee45 3855 return _core_.KeyEvent_GetX(*args, **kwargs)
e811c8ce
RD
3856
3857 def GetY(*args, **kwargs):
a95a7133 3858 """GetY(self) -> int"""
54f9ee45
RD
3859 return _core_.KeyEvent_GetY(*args, **kwargs)
3860
3861 m_x = property(_core_.KeyEvent_m_x_get, _core_.KeyEvent_m_x_set)
3862 m_y = property(_core_.KeyEvent_m_y_get, _core_.KeyEvent_m_y_set)
3863 m_keyCode = property(_core_.KeyEvent_m_keyCode_get, _core_.KeyEvent_m_keyCode_set)
3864 m_controlDown = property(_core_.KeyEvent_m_controlDown_get, _core_.KeyEvent_m_controlDown_set)
3865 m_shiftDown = property(_core_.KeyEvent_m_shiftDown_get, _core_.KeyEvent_m_shiftDown_set)
3866 m_altDown = property(_core_.KeyEvent_m_altDown_get, _core_.KeyEvent_m_altDown_set)
3867 m_metaDown = property(_core_.KeyEvent_m_metaDown_get, _core_.KeyEvent_m_metaDown_set)
3868 m_scanCode = property(_core_.KeyEvent_m_scanCode_get, _core_.KeyEvent_m_scanCode_set)
3869 m_rawCode = property(_core_.KeyEvent_m_rawCode_get, _core_.KeyEvent_m_rawCode_set)
3870 m_rawFlags = property(_core_.KeyEvent_m_rawFlags_get, _core_.KeyEvent_m_rawFlags_set)
d14a1e28
RD
3871
3872class KeyEventPtr(KeyEvent):
3873 def __init__(self, this):
3874 self.this = this
3875 if not hasattr(self,"thisown"): self.thisown = 0
3876 self.__class__ = KeyEvent
54f9ee45 3877_core_.KeyEvent_swigregister(KeyEventPtr)
d14a1e28
RD
3878
3879#---------------------------------------------------------------------------
3880
3881class SizeEvent(Event):
093d3ff1 3882 """Proxy of C++ SizeEvent class"""
e811c8ce
RD
3883 def __repr__(self):
3884 return "<%s.%s; proxy of C++ wxSizeEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 3885 def __init__(self, *args, **kwargs):
a95a7133 3886 """__init__(self, Size sz=DefaultSize, int winid=0) -> SizeEvent"""
54f9ee45 3887 newobj = _core_.new_SizeEvent(*args, **kwargs)
d14a1e28
RD
3888 self.this = newobj.this
3889 self.thisown = 1
3890 del newobj.thisown
e811c8ce 3891 def GetSize(*args, **kwargs):
a95a7133 3892 """GetSize(self) -> Size"""
54f9ee45 3893 return _core_.SizeEvent_GetSize(*args, **kwargs)
e811c8ce
RD
3894
3895 def GetRect(*args, **kwargs):
a95a7133 3896 """GetRect(self) -> Rect"""
54f9ee45 3897 return _core_.SizeEvent_GetRect(*args, **kwargs)
e811c8ce
RD
3898
3899 def SetRect(*args, **kwargs):
a95a7133 3900 """SetRect(self, Rect rect)"""
54f9ee45 3901 return _core_.SizeEvent_SetRect(*args, **kwargs)
e811c8ce
RD
3902
3903 def SetSize(*args, **kwargs):
a95a7133 3904 """SetSize(self, Size size)"""
54f9ee45 3905 return _core_.SizeEvent_SetSize(*args, **kwargs)
e811c8ce 3906
54f9ee45
RD
3907 m_size = property(_core_.SizeEvent_m_size_get, _core_.SizeEvent_m_size_set)
3908 m_rect = property(_core_.SizeEvent_m_rect_get, _core_.SizeEvent_m_rect_set)
d14a1e28
RD
3909
3910class SizeEventPtr(SizeEvent):
3911 def __init__(self, this):
3912 self.this = this
3913 if not hasattr(self,"thisown"): self.thisown = 0
3914 self.__class__ = SizeEvent
54f9ee45 3915_core_.SizeEvent_swigregister(SizeEventPtr)
d14a1e28
RD
3916
3917#---------------------------------------------------------------------------
3918
3919class MoveEvent(Event):
093d3ff1 3920 """Proxy of C++ MoveEvent class"""
e811c8ce
RD
3921 def __repr__(self):
3922 return "<%s.%s; proxy of C++ wxMoveEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 3923 def __init__(self, *args, **kwargs):
a95a7133 3924 """__init__(self, Point pos=DefaultPosition, int winid=0) -> MoveEvent"""
54f9ee45 3925 newobj = _core_.new_MoveEvent(*args, **kwargs)
d14a1e28
RD
3926 self.this = newobj.this
3927 self.thisown = 1
3928 del newobj.thisown
e811c8ce 3929 def GetPosition(*args, **kwargs):
a95a7133 3930 """GetPosition(self) -> Point"""
54f9ee45 3931 return _core_.MoveEvent_GetPosition(*args, **kwargs)
e811c8ce
RD
3932
3933 def GetRect(*args, **kwargs):
a95a7133 3934 """GetRect(self) -> Rect"""
54f9ee45 3935 return _core_.MoveEvent_GetRect(*args, **kwargs)
e811c8ce
RD
3936
3937 def SetRect(*args, **kwargs):
a95a7133 3938 """SetRect(self, Rect rect)"""
54f9ee45 3939 return _core_.MoveEvent_SetRect(*args, **kwargs)
e811c8ce
RD
3940
3941 def SetPosition(*args, **kwargs):
a95a7133 3942 """SetPosition(self, Point pos)"""
54f9ee45 3943 return _core_.MoveEvent_SetPosition(*args, **kwargs)
e811c8ce 3944
54f9ee45
RD
3945 m_pos = property(_core_.MoveEvent_m_pos_get, _core_.MoveEvent_m_pos_set)
3946 m_rect = property(_core_.MoveEvent_m_rect_get, _core_.MoveEvent_m_rect_set)
d14a1e28
RD
3947
3948class MoveEventPtr(MoveEvent):
3949 def __init__(self, this):
3950 self.this = this
3951 if not hasattr(self,"thisown"): self.thisown = 0
3952 self.__class__ = MoveEvent
54f9ee45 3953_core_.MoveEvent_swigregister(MoveEventPtr)
d14a1e28
RD
3954
3955#---------------------------------------------------------------------------
3956
3957class PaintEvent(Event):
093d3ff1 3958 """Proxy of C++ PaintEvent class"""
e811c8ce
RD
3959 def __repr__(self):
3960 return "<%s.%s; proxy of C++ wxPaintEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 3961 def __init__(self, *args, **kwargs):
a95a7133 3962 """__init__(self, int Id=0) -> PaintEvent"""
54f9ee45 3963 newobj = _core_.new_PaintEvent(*args, **kwargs)
d14a1e28
RD
3964 self.this = newobj.this
3965 self.thisown = 1
3966 del newobj.thisown
d14a1e28
RD
3967
3968class PaintEventPtr(PaintEvent):
3969 def __init__(self, this):
3970 self.this = this
3971 if not hasattr(self,"thisown"): self.thisown = 0
3972 self.__class__ = PaintEvent
54f9ee45 3973_core_.PaintEvent_swigregister(PaintEventPtr)
d14a1e28
RD
3974
3975class NcPaintEvent(Event):
093d3ff1 3976 """Proxy of C++ NcPaintEvent class"""
e811c8ce
RD
3977 def __repr__(self):
3978 return "<%s.%s; proxy of C++ wxNcPaintEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 3979 def __init__(self, *args, **kwargs):
a95a7133 3980 """__init__(self, int winid=0) -> NcPaintEvent"""
54f9ee45 3981 newobj = _core_.new_NcPaintEvent(*args, **kwargs)
d14a1e28
RD
3982 self.this = newobj.this
3983 self.thisown = 1
3984 del newobj.thisown
d14a1e28
RD
3985
3986class NcPaintEventPtr(NcPaintEvent):
3987 def __init__(self, this):
3988 self.this = this
3989 if not hasattr(self,"thisown"): self.thisown = 0
3990 self.__class__ = NcPaintEvent
54f9ee45 3991_core_.NcPaintEvent_swigregister(NcPaintEventPtr)
d14a1e28
RD
3992
3993#---------------------------------------------------------------------------
3994
3995class EraseEvent(Event):
093d3ff1 3996 """Proxy of C++ EraseEvent class"""
e811c8ce
RD
3997 def __repr__(self):
3998 return "<%s.%s; proxy of C++ wxEraseEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 3999 def __init__(self, *args, **kwargs):
a95a7133 4000 """__init__(self, int Id=0, DC dc=(wxDC *) NULL) -> EraseEvent"""
54f9ee45 4001 newobj = _core_.new_EraseEvent(*args, **kwargs)
d14a1e28
RD
4002 self.this = newobj.this
4003 self.thisown = 1
4004 del newobj.thisown
e811c8ce 4005 def GetDC(*args, **kwargs):
a95a7133 4006 """GetDC(self) -> DC"""
54f9ee45 4007 return _core_.EraseEvent_GetDC(*args, **kwargs)
e811c8ce 4008
d14a1e28
RD
4009
4010class EraseEventPtr(EraseEvent):
4011 def __init__(self, this):
4012 self.this = this
4013 if not hasattr(self,"thisown"): self.thisown = 0
4014 self.__class__ = EraseEvent
54f9ee45 4015_core_.EraseEvent_swigregister(EraseEventPtr)
d14a1e28
RD
4016
4017#---------------------------------------------------------------------------
4018
4019class FocusEvent(Event):
093d3ff1 4020 """Proxy of C++ FocusEvent class"""
e811c8ce
RD
4021 def __repr__(self):
4022 return "<%s.%s; proxy of C++ wxFocusEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 4023 def __init__(self, *args, **kwargs):
a95a7133 4024 """__init__(self, wxEventType type=wxEVT_NULL, int winid=0) -> FocusEvent"""
54f9ee45 4025 newobj = _core_.new_FocusEvent(*args, **kwargs)
d14a1e28
RD
4026 self.this = newobj.this
4027 self.thisown = 1
4028 del newobj.thisown
e811c8ce 4029 def GetWindow(*args, **kwargs):
a95a7133 4030 """GetWindow(self) -> Window"""
54f9ee45 4031 return _core_.FocusEvent_GetWindow(*args, **kwargs)
e811c8ce
RD
4032
4033 def SetWindow(*args, **kwargs):
a95a7133 4034 """SetWindow(self, Window win)"""
54f9ee45 4035 return _core_.FocusEvent_SetWindow(*args, **kwargs)
e811c8ce 4036
d14a1e28
RD
4037
4038class FocusEventPtr(FocusEvent):
4039 def __init__(self, this):
4040 self.this = this
4041 if not hasattr(self,"thisown"): self.thisown = 0
4042 self.__class__ = FocusEvent
54f9ee45 4043_core_.FocusEvent_swigregister(FocusEventPtr)
d14a1e28
RD
4044
4045#---------------------------------------------------------------------------
4046
4047class ChildFocusEvent(CommandEvent):
093d3ff1 4048 """Proxy of C++ ChildFocusEvent class"""
e811c8ce
RD
4049 def __repr__(self):
4050 return "<%s.%s; proxy of C++ wxChildFocusEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 4051 def __init__(self, *args, **kwargs):
a95a7133 4052 """__init__(self, Window win=None) -> ChildFocusEvent"""
54f9ee45 4053 newobj = _core_.new_ChildFocusEvent(*args, **kwargs)
d14a1e28
RD
4054 self.this = newobj.this
4055 self.thisown = 1
4056 del newobj.thisown
e811c8ce 4057 def GetWindow(*args, **kwargs):
a95a7133 4058 """GetWindow(self) -> Window"""
54f9ee45 4059 return _core_.ChildFocusEvent_GetWindow(*args, **kwargs)
e811c8ce 4060
d14a1e28
RD
4061
4062class ChildFocusEventPtr(ChildFocusEvent):
4063 def __init__(self, this):
4064 self.this = this
4065 if not hasattr(self,"thisown"): self.thisown = 0
4066 self.__class__ = ChildFocusEvent
54f9ee45 4067_core_.ChildFocusEvent_swigregister(ChildFocusEventPtr)
d14a1e28
RD
4068
4069#---------------------------------------------------------------------------
4070
4071class ActivateEvent(Event):
093d3ff1 4072 """Proxy of C++ ActivateEvent class"""
e811c8ce
RD
4073 def __repr__(self):
4074 return "<%s.%s; proxy of C++ wxActivateEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 4075 def __init__(self, *args, **kwargs):
a95a7133 4076 """__init__(self, wxEventType type=wxEVT_NULL, bool active=True, int Id=0) -> ActivateEvent"""
54f9ee45 4077 newobj = _core_.new_ActivateEvent(*args, **kwargs)
d14a1e28
RD
4078 self.this = newobj.this
4079 self.thisown = 1
4080 del newobj.thisown
e811c8ce 4081 def GetActive(*args, **kwargs):
a95a7133 4082 """GetActive(self) -> bool"""
54f9ee45 4083 return _core_.ActivateEvent_GetActive(*args, **kwargs)
e811c8ce 4084
d14a1e28
RD
4085
4086class ActivateEventPtr(ActivateEvent):
4087 def __init__(self, this):
4088 self.this = this
4089 if not hasattr(self,"thisown"): self.thisown = 0
4090 self.__class__ = ActivateEvent
54f9ee45 4091_core_.ActivateEvent_swigregister(ActivateEventPtr)
d14a1e28
RD
4092
4093#---------------------------------------------------------------------------
4094
4095class InitDialogEvent(Event):
093d3ff1 4096 """Proxy of C++ InitDialogEvent class"""
e811c8ce
RD
4097 def __repr__(self):
4098 return "<%s.%s; proxy of C++ wxInitDialogEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 4099 def __init__(self, *args, **kwargs):
a95a7133 4100 """__init__(self, int Id=0) -> InitDialogEvent"""
54f9ee45 4101 newobj = _core_.new_InitDialogEvent(*args, **kwargs)
d14a1e28
RD
4102 self.this = newobj.this
4103 self.thisown = 1
4104 del newobj.thisown
d14a1e28
RD
4105
4106class InitDialogEventPtr(InitDialogEvent):
4107 def __init__(self, this):
4108 self.this = this
4109 if not hasattr(self,"thisown"): self.thisown = 0
4110 self.__class__ = InitDialogEvent
54f9ee45 4111_core_.InitDialogEvent_swigregister(InitDialogEventPtr)
d14a1e28
RD
4112
4113#---------------------------------------------------------------------------
4114
4115class MenuEvent(Event):
093d3ff1 4116 """Proxy of C++ MenuEvent class"""
e811c8ce
RD
4117 def __repr__(self):
4118 return "<%s.%s; proxy of C++ wxMenuEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 4119 def __init__(self, *args, **kwargs):
a95a7133 4120 """__init__(self, wxEventType type=wxEVT_NULL, int winid=0, Menu menu=None) -> MenuEvent"""
54f9ee45 4121 newobj = _core_.new_MenuEvent(*args, **kwargs)
d14a1e28
RD
4122 self.this = newobj.this
4123 self.thisown = 1
4124 del newobj.thisown
e811c8ce 4125 def GetMenuId(*args, **kwargs):
a95a7133 4126 """GetMenuId(self) -> int"""
54f9ee45 4127 return _core_.MenuEvent_GetMenuId(*args, **kwargs)
e811c8ce
RD
4128
4129 def IsPopup(*args, **kwargs):
a95a7133 4130 """IsPopup(self) -> bool"""
54f9ee45 4131 return _core_.MenuEvent_IsPopup(*args, **kwargs)
e811c8ce
RD
4132
4133 def GetMenu(*args, **kwargs):
a95a7133 4134 """GetMenu(self) -> Menu"""
54f9ee45 4135 return _core_.MenuEvent_GetMenu(*args, **kwargs)
e811c8ce 4136
d14a1e28
RD
4137
4138class MenuEventPtr(MenuEvent):
4139 def __init__(self, this):
4140 self.this = this
4141 if not hasattr(self,"thisown"): self.thisown = 0
4142 self.__class__ = MenuEvent
54f9ee45 4143_core_.MenuEvent_swigregister(MenuEventPtr)
d14a1e28
RD
4144
4145#---------------------------------------------------------------------------
4146
4147class CloseEvent(Event):
093d3ff1 4148 """Proxy of C++ CloseEvent class"""
e811c8ce
RD
4149 def __repr__(self):
4150 return "<%s.%s; proxy of C++ wxCloseEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 4151 def __init__(self, *args, **kwargs):
a95a7133 4152 """__init__(self, wxEventType type=wxEVT_NULL, int winid=0) -> CloseEvent"""
54f9ee45 4153 newobj = _core_.new_CloseEvent(*args, **kwargs)
d14a1e28
RD
4154 self.this = newobj.this
4155 self.thisown = 1
4156 del newobj.thisown
e811c8ce 4157 def SetLoggingOff(*args, **kwargs):
a95a7133 4158 """SetLoggingOff(self, bool logOff)"""
54f9ee45 4159 return _core_.CloseEvent_SetLoggingOff(*args, **kwargs)
e811c8ce
RD
4160
4161 def GetLoggingOff(*args, **kwargs):
a95a7133 4162 """GetLoggingOff(self) -> bool"""
54f9ee45 4163 return _core_.CloseEvent_GetLoggingOff(*args, **kwargs)
e811c8ce
RD
4164
4165 def Veto(*args, **kwargs):
a95a7133 4166 """Veto(self, bool veto=True)"""
54f9ee45 4167 return _core_.CloseEvent_Veto(*args, **kwargs)
e811c8ce
RD
4168
4169 def SetCanVeto(*args, **kwargs):
a95a7133 4170 """SetCanVeto(self, bool canVeto)"""
54f9ee45 4171 return _core_.CloseEvent_SetCanVeto(*args, **kwargs)
e811c8ce
RD
4172
4173 def CanVeto(*args, **kwargs):
a95a7133 4174 """CanVeto(self) -> bool"""
54f9ee45 4175 return _core_.CloseEvent_CanVeto(*args, **kwargs)
e811c8ce
RD
4176
4177 def GetVeto(*args, **kwargs):
a95a7133 4178 """GetVeto(self) -> bool"""
54f9ee45 4179 return _core_.CloseEvent_GetVeto(*args, **kwargs)
e811c8ce 4180
d14a1e28
RD
4181
4182class CloseEventPtr(CloseEvent):
4183 def __init__(self, this):
4184 self.this = this
4185 if not hasattr(self,"thisown"): self.thisown = 0
4186 self.__class__ = CloseEvent
54f9ee45 4187_core_.CloseEvent_swigregister(CloseEventPtr)
d14a1e28
RD
4188
4189#---------------------------------------------------------------------------
4190
4191class ShowEvent(Event):
093d3ff1 4192 """Proxy of C++ ShowEvent class"""
e811c8ce
RD
4193 def __repr__(self):
4194 return "<%s.%s; proxy of C++ wxShowEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 4195 def __init__(self, *args, **kwargs):
a95a7133 4196 """__init__(self, int winid=0, bool show=False) -> ShowEvent"""
54f9ee45 4197 newobj = _core_.new_ShowEvent(*args, **kwargs)
d14a1e28
RD
4198 self.this = newobj.this
4199 self.thisown = 1
4200 del newobj.thisown
e811c8ce 4201 def SetShow(*args, **kwargs):
a95a7133 4202 """SetShow(self, bool show)"""
54f9ee45 4203 return _core_.ShowEvent_SetShow(*args, **kwargs)
e811c8ce
RD
4204
4205 def GetShow(*args, **kwargs):
a95a7133 4206 """GetShow(self) -> bool"""
54f9ee45 4207 return _core_.ShowEvent_GetShow(*args, **kwargs)
e811c8ce 4208
d14a1e28
RD
4209
4210class ShowEventPtr(ShowEvent):
4211 def __init__(self, this):
4212 self.this = this
4213 if not hasattr(self,"thisown"): self.thisown = 0
4214 self.__class__ = ShowEvent
54f9ee45 4215_core_.ShowEvent_swigregister(ShowEventPtr)
d14a1e28
RD
4216
4217#---------------------------------------------------------------------------
4218
4219class IconizeEvent(Event):
093d3ff1 4220 """Proxy of C++ IconizeEvent class"""
e811c8ce
RD
4221 def __repr__(self):
4222 return "<%s.%s; proxy of C++ wxIconizeEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 4223 def __init__(self, *args, **kwargs):
a95a7133 4224 """__init__(self, int id=0, bool iconized=True) -> IconizeEvent"""
54f9ee45 4225 newobj = _core_.new_IconizeEvent(*args, **kwargs)
d14a1e28
RD
4226 self.this = newobj.this
4227 self.thisown = 1
4228 del newobj.thisown
e811c8ce 4229 def Iconized(*args, **kwargs):
a95a7133 4230 """Iconized(self) -> bool"""
54f9ee45 4231 return _core_.IconizeEvent_Iconized(*args, **kwargs)
e811c8ce 4232
d14a1e28
RD
4233
4234class IconizeEventPtr(IconizeEvent):
4235 def __init__(self, this):
4236 self.this = this
4237 if not hasattr(self,"thisown"): self.thisown = 0
4238 self.__class__ = IconizeEvent
54f9ee45 4239_core_.IconizeEvent_swigregister(IconizeEventPtr)
d14a1e28
RD
4240
4241#---------------------------------------------------------------------------
4242
4243class MaximizeEvent(Event):
093d3ff1 4244 """Proxy of C++ MaximizeEvent class"""
e811c8ce
RD
4245 def __repr__(self):
4246 return "<%s.%s; proxy of C++ wxMaximizeEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 4247 def __init__(self, *args, **kwargs):
a95a7133 4248 """__init__(self, int id=0) -> MaximizeEvent"""
54f9ee45 4249 newobj = _core_.new_MaximizeEvent(*args, **kwargs)
d14a1e28
RD
4250 self.this = newobj.this
4251 self.thisown = 1
4252 del newobj.thisown
d14a1e28
RD
4253
4254class MaximizeEventPtr(MaximizeEvent):
4255 def __init__(self, this):
4256 self.this = this
4257 if not hasattr(self,"thisown"): self.thisown = 0
4258 self.__class__ = MaximizeEvent
54f9ee45 4259_core_.MaximizeEvent_swigregister(MaximizeEventPtr)
d14a1e28
RD
4260
4261#---------------------------------------------------------------------------
4262
4263class DropFilesEvent(Event):
093d3ff1 4264 """Proxy of C++ DropFilesEvent class"""
d14a1e28
RD
4265 def __init__(self): raise RuntimeError, "No constructor defined"
4266 def __repr__(self):
4267 return "<%s.%s; proxy of C++ wxDropFilesEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
e811c8ce 4268 def GetPosition(*args, **kwargs):
a95a7133 4269 """GetPosition(self) -> Point"""
54f9ee45 4270 return _core_.DropFilesEvent_GetPosition(*args, **kwargs)
e811c8ce
RD
4271
4272 def GetNumberOfFiles(*args, **kwargs):
a95a7133 4273 """GetNumberOfFiles(self) -> int"""
54f9ee45 4274 return _core_.DropFilesEvent_GetNumberOfFiles(*args, **kwargs)
e811c8ce
RD
4275
4276 def GetFiles(*args, **kwargs):
a95a7133 4277 """GetFiles(self) -> PyObject"""
54f9ee45 4278 return _core_.DropFilesEvent_GetFiles(*args, **kwargs)
e811c8ce 4279
d14a1e28
RD
4280
4281class DropFilesEventPtr(DropFilesEvent):
4282 def __init__(self, this):
4283 self.this = this
4284 if not hasattr(self,"thisown"): self.thisown = 0
4285 self.__class__ = DropFilesEvent
54f9ee45 4286_core_.DropFilesEvent_swigregister(DropFilesEventPtr)
d14a1e28
RD
4287
4288#---------------------------------------------------------------------------
4289
54f9ee45
RD
4290UPDATE_UI_PROCESS_ALL = _core_.UPDATE_UI_PROCESS_ALL
4291UPDATE_UI_PROCESS_SPECIFIED = _core_.UPDATE_UI_PROCESS_SPECIFIED
d14a1e28 4292class UpdateUIEvent(CommandEvent):
093d3ff1 4293 """Proxy of C++ UpdateUIEvent class"""
e811c8ce
RD
4294 def __repr__(self):
4295 return "<%s.%s; proxy of C++ wxUpdateUIEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 4296 def __init__(self, *args, **kwargs):
a95a7133 4297 """__init__(self, int commandId=0) -> UpdateUIEvent"""
54f9ee45 4298 newobj = _core_.new_UpdateUIEvent(*args, **kwargs)
d14a1e28
RD
4299 self.this = newobj.this
4300 self.thisown = 1
4301 del newobj.thisown
e811c8ce 4302 def GetChecked(*args, **kwargs):
a95a7133 4303 """GetChecked(self) -> bool"""
54f9ee45 4304 return _core_.UpdateUIEvent_GetChecked(*args, **kwargs)
e811c8ce
RD
4305
4306 def GetEnabled(*args, **kwargs):
a95a7133 4307 """GetEnabled(self) -> bool"""
54f9ee45 4308 return _core_.UpdateUIEvent_GetEnabled(*args, **kwargs)
e811c8ce
RD
4309
4310 def GetText(*args, **kwargs):
a95a7133 4311 """GetText(self) -> String"""
54f9ee45 4312 return _core_.UpdateUIEvent_GetText(*args, **kwargs)
e811c8ce
RD
4313
4314 def GetSetText(*args, **kwargs):
a95a7133 4315 """GetSetText(self) -> bool"""
54f9ee45 4316 return _core_.UpdateUIEvent_GetSetText(*args, **kwargs)
e811c8ce
RD
4317
4318 def GetSetChecked(*args, **kwargs):
a95a7133 4319 """GetSetChecked(self) -> bool"""
54f9ee45 4320 return _core_.UpdateUIEvent_GetSetChecked(*args, **kwargs)
e811c8ce
RD
4321
4322 def GetSetEnabled(*args, **kwargs):
a95a7133 4323 """GetSetEnabled(self) -> bool"""
54f9ee45 4324 return _core_.UpdateUIEvent_GetSetEnabled(*args, **kwargs)
e811c8ce
RD
4325
4326 def Check(*args, **kwargs):
a95a7133 4327 """Check(self, bool check)"""
54f9ee45 4328 return _core_.UpdateUIEvent_Check(*args, **kwargs)
e811c8ce
RD
4329
4330 def Enable(*args, **kwargs):
a95a7133 4331 """Enable(self, bool enable)"""
54f9ee45 4332 return _core_.UpdateUIEvent_Enable(*args, **kwargs)
e811c8ce
RD
4333
4334 def SetText(*args, **kwargs):
a95a7133 4335 """SetText(self, String text)"""
54f9ee45 4336 return _core_.UpdateUIEvent_SetText(*args, **kwargs)
e811c8ce
RD
4337
4338 def SetUpdateInterval(*args, **kwargs):
66c033b4 4339 """SetUpdateInterval(long updateInterval)"""
54f9ee45 4340 return _core_.UpdateUIEvent_SetUpdateInterval(*args, **kwargs)
e811c8ce
RD
4341
4342 SetUpdateInterval = staticmethod(SetUpdateInterval)
4343 def GetUpdateInterval(*args, **kwargs):
66c033b4 4344 """GetUpdateInterval() -> long"""
54f9ee45 4345 return _core_.UpdateUIEvent_GetUpdateInterval(*args, **kwargs)
e811c8ce
RD
4346
4347 GetUpdateInterval = staticmethod(GetUpdateInterval)
4348 def CanUpdate(*args, **kwargs):
66c033b4 4349 """CanUpdate(Window win) -> bool"""
54f9ee45 4350 return _core_.UpdateUIEvent_CanUpdate(*args, **kwargs)
e811c8ce
RD
4351
4352 CanUpdate = staticmethod(CanUpdate)
4353 def ResetUpdateTime(*args, **kwargs):
66c033b4 4354 """ResetUpdateTime()"""
54f9ee45 4355 return _core_.UpdateUIEvent_ResetUpdateTime(*args, **kwargs)
e811c8ce
RD
4356
4357 ResetUpdateTime = staticmethod(ResetUpdateTime)
4358 def SetMode(*args, **kwargs):
66c033b4 4359 """SetMode(int mode)"""
54f9ee45 4360 return _core_.UpdateUIEvent_SetMode(*args, **kwargs)
e811c8ce
RD
4361
4362 SetMode = staticmethod(SetMode)
4363 def GetMode(*args, **kwargs):
66c033b4 4364 """GetMode() -> int"""
54f9ee45 4365 return _core_.UpdateUIEvent_GetMode(*args, **kwargs)
e811c8ce
RD
4366
4367 GetMode = staticmethod(GetMode)
d14a1e28
RD
4368
4369class UpdateUIEventPtr(UpdateUIEvent):
4370 def __init__(self, this):
4371 self.this = this
4372 if not hasattr(self,"thisown"): self.thisown = 0
4373 self.__class__ = UpdateUIEvent
54f9ee45 4374_core_.UpdateUIEvent_swigregister(UpdateUIEventPtr)
d14a1e28 4375
e811c8ce
RD
4376def UpdateUIEvent_SetUpdateInterval(*args, **kwargs):
4377 """UpdateUIEvent_SetUpdateInterval(long updateInterval)"""
54f9ee45 4378 return _core_.UpdateUIEvent_SetUpdateInterval(*args, **kwargs)
d14a1e28 4379
e811c8ce
RD
4380def UpdateUIEvent_GetUpdateInterval(*args, **kwargs):
4381 """UpdateUIEvent_GetUpdateInterval() -> long"""
54f9ee45 4382 return _core_.UpdateUIEvent_GetUpdateInterval(*args, **kwargs)
d14a1e28 4383
e811c8ce
RD
4384def UpdateUIEvent_CanUpdate(*args, **kwargs):
4385 """UpdateUIEvent_CanUpdate(Window win) -> bool"""
54f9ee45 4386 return _core_.UpdateUIEvent_CanUpdate(*args, **kwargs)
d14a1e28 4387
e811c8ce
RD
4388def UpdateUIEvent_ResetUpdateTime(*args, **kwargs):
4389 """UpdateUIEvent_ResetUpdateTime()"""
54f9ee45 4390 return _core_.UpdateUIEvent_ResetUpdateTime(*args, **kwargs)
d14a1e28 4391
e811c8ce 4392def UpdateUIEvent_SetMode(*args, **kwargs):
196addbf 4393 """UpdateUIEvent_SetMode(int mode)"""
54f9ee45 4394 return _core_.UpdateUIEvent_SetMode(*args, **kwargs)
d14a1e28 4395
e811c8ce 4396def UpdateUIEvent_GetMode(*args, **kwargs):
196addbf 4397 """UpdateUIEvent_GetMode() -> int"""
54f9ee45 4398 return _core_.UpdateUIEvent_GetMode(*args, **kwargs)
d14a1e28
RD
4399
4400#---------------------------------------------------------------------------
4401
4402class SysColourChangedEvent(Event):
093d3ff1 4403 """Proxy of C++ SysColourChangedEvent class"""
e811c8ce
RD
4404 def __repr__(self):
4405 return "<%s.%s; proxy of C++ wxSysColourChangedEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 4406 def __init__(self, *args, **kwargs):
a95a7133 4407 """__init__(self) -> SysColourChangedEvent"""
54f9ee45 4408 newobj = _core_.new_SysColourChangedEvent(*args, **kwargs)
d14a1e28
RD
4409 self.this = newobj.this
4410 self.thisown = 1
4411 del newobj.thisown
d14a1e28
RD
4412
4413class SysColourChangedEventPtr(SysColourChangedEvent):
4414 def __init__(self, this):
4415 self.this = this
4416 if not hasattr(self,"thisown"): self.thisown = 0
4417 self.__class__ = SysColourChangedEvent
54f9ee45 4418_core_.SysColourChangedEvent_swigregister(SysColourChangedEventPtr)
d14a1e28
RD
4419
4420#---------------------------------------------------------------------------
4421
4422class MouseCaptureChangedEvent(Event):
093d3ff1 4423 """Proxy of C++ MouseCaptureChangedEvent class"""
e811c8ce
RD
4424 def __repr__(self):
4425 return "<%s.%s; proxy of C++ wxMouseCaptureChangedEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 4426 def __init__(self, *args, **kwargs):
a95a7133 4427 """__init__(self, int winid=0, Window gainedCapture=None) -> MouseCaptureChangedEvent"""
54f9ee45 4428 newobj = _core_.new_MouseCaptureChangedEvent(*args, **kwargs)
d14a1e28
RD
4429 self.this = newobj.this
4430 self.thisown = 1
4431 del newobj.thisown
e811c8ce 4432 def GetCapturedWindow(*args, **kwargs):
a95a7133 4433 """GetCapturedWindow(self) -> Window"""
54f9ee45 4434 return _core_.MouseCaptureChangedEvent_GetCapturedWindow(*args, **kwargs)
e811c8ce 4435
d14a1e28
RD
4436
4437class MouseCaptureChangedEventPtr(MouseCaptureChangedEvent):
4438 def __init__(self, this):
4439 self.this = this
4440 if not hasattr(self,"thisown"): self.thisown = 0
4441 self.__class__ = MouseCaptureChangedEvent
54f9ee45 4442_core_.MouseCaptureChangedEvent_swigregister(MouseCaptureChangedEventPtr)
d14a1e28
RD
4443
4444#---------------------------------------------------------------------------
4445
4446class DisplayChangedEvent(Event):
093d3ff1 4447 """Proxy of C++ DisplayChangedEvent class"""
e811c8ce
RD
4448 def __repr__(self):
4449 return "<%s.%s; proxy of C++ wxDisplayChangedEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 4450 def __init__(self, *args, **kwargs):
a95a7133 4451 """__init__(self) -> DisplayChangedEvent"""
54f9ee45 4452 newobj = _core_.new_DisplayChangedEvent(*args, **kwargs)
d14a1e28
RD
4453 self.this = newobj.this
4454 self.thisown = 1
4455 del newobj.thisown
d14a1e28
RD
4456
4457class DisplayChangedEventPtr(DisplayChangedEvent):
4458 def __init__(self, this):
4459 self.this = this
4460 if not hasattr(self,"thisown"): self.thisown = 0
4461 self.__class__ = DisplayChangedEvent
54f9ee45 4462_core_.DisplayChangedEvent_swigregister(DisplayChangedEventPtr)
d14a1e28
RD
4463
4464#---------------------------------------------------------------------------
4465
4466class PaletteChangedEvent(Event):
093d3ff1 4467 """Proxy of C++ PaletteChangedEvent class"""
e811c8ce
RD
4468 def __repr__(self):
4469 return "<%s.%s; proxy of C++ wxPaletteChangedEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 4470 def __init__(self, *args, **kwargs):
a95a7133 4471 """__init__(self, int id=0) -> PaletteChangedEvent"""
54f9ee45 4472 newobj = _core_.new_PaletteChangedEvent(*args, **kwargs)
d14a1e28
RD
4473 self.this = newobj.this
4474 self.thisown = 1
4475 del newobj.thisown
e811c8ce 4476 def SetChangedWindow(*args, **kwargs):
a95a7133 4477 """SetChangedWindow(self, Window win)"""
54f9ee45 4478 return _core_.PaletteChangedEvent_SetChangedWindow(*args, **kwargs)
e811c8ce
RD
4479
4480 def GetChangedWindow(*args, **kwargs):
a95a7133 4481 """GetChangedWindow(self) -> Window"""
54f9ee45 4482 return _core_.PaletteChangedEvent_GetChangedWindow(*args, **kwargs)
e811c8ce 4483
d14a1e28
RD
4484
4485class PaletteChangedEventPtr(PaletteChangedEvent):
4486 def __init__(self, this):
4487 self.this = this
4488 if not hasattr(self,"thisown"): self.thisown = 0
4489 self.__class__ = PaletteChangedEvent
54f9ee45 4490_core_.PaletteChangedEvent_swigregister(PaletteChangedEventPtr)
d14a1e28
RD
4491
4492#---------------------------------------------------------------------------
4493
4494class QueryNewPaletteEvent(Event):
093d3ff1 4495 """Proxy of C++ QueryNewPaletteEvent class"""
e811c8ce
RD
4496 def __repr__(self):
4497 return "<%s.%s; proxy of C++ wxQueryNewPaletteEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 4498 def __init__(self, *args, **kwargs):
a95a7133 4499 """__init__(self, int winid=0) -> QueryNewPaletteEvent"""
54f9ee45 4500 newobj = _core_.new_QueryNewPaletteEvent(*args, **kwargs)
d14a1e28
RD
4501 self.this = newobj.this
4502 self.thisown = 1
4503 del newobj.thisown
e811c8ce 4504 def SetPaletteRealized(*args, **kwargs):
a95a7133 4505 """SetPaletteRealized(self, bool realized)"""
54f9ee45 4506 return _core_.QueryNewPaletteEvent_SetPaletteRealized(*args, **kwargs)
e811c8ce
RD
4507
4508 def GetPaletteRealized(*args, **kwargs):
a95a7133 4509 """GetPaletteRealized(self) -> bool"""
54f9ee45 4510 return _core_.QueryNewPaletteEvent_GetPaletteRealized(*args, **kwargs)
e811c8ce 4511
d14a1e28
RD
4512
4513class QueryNewPaletteEventPtr(QueryNewPaletteEvent):
4514 def __init__(self, this):
4515 self.this = this
4516 if not hasattr(self,"thisown"): self.thisown = 0
4517 self.__class__ = QueryNewPaletteEvent
54f9ee45 4518_core_.QueryNewPaletteEvent_swigregister(QueryNewPaletteEventPtr)
d14a1e28
RD
4519
4520#---------------------------------------------------------------------------
4521
4522class NavigationKeyEvent(Event):
093d3ff1 4523 """Proxy of C++ NavigationKeyEvent class"""
e811c8ce
RD
4524 def __repr__(self):
4525 return "<%s.%s; proxy of C++ wxNavigationKeyEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 4526 def __init__(self, *args, **kwargs):
a95a7133 4527 """__init__(self) -> NavigationKeyEvent"""
54f9ee45 4528 newobj = _core_.new_NavigationKeyEvent(*args, **kwargs)
d14a1e28
RD
4529 self.this = newobj.this
4530 self.thisown = 1
4531 del newobj.thisown
e811c8ce 4532 def GetDirection(*args, **kwargs):
a95a7133 4533 """GetDirection(self) -> bool"""
54f9ee45 4534 return _core_.NavigationKeyEvent_GetDirection(*args, **kwargs)
e811c8ce
RD
4535
4536 def SetDirection(*args, **kwargs):
908b74cd 4537 """SetDirection(self, bool forward)"""
54f9ee45 4538 return _core_.NavigationKeyEvent_SetDirection(*args, **kwargs)
e811c8ce
RD
4539
4540 def IsWindowChange(*args, **kwargs):
a95a7133 4541 """IsWindowChange(self) -> bool"""
54f9ee45 4542 return _core_.NavigationKeyEvent_IsWindowChange(*args, **kwargs)
e811c8ce
RD
4543
4544 def SetWindowChange(*args, **kwargs):
908b74cd 4545 """SetWindowChange(self, bool ischange)"""
54f9ee45 4546 return _core_.NavigationKeyEvent_SetWindowChange(*args, **kwargs)
e811c8ce 4547
908b74cd
RD
4548 def SetFlags(*args, **kwargs):
4549 """SetFlags(self, long flags)"""
4550 return _core_.NavigationKeyEvent_SetFlags(*args, **kwargs)
4551
e811c8ce 4552 def GetCurrentFocus(*args, **kwargs):
a95a7133 4553 """GetCurrentFocus(self) -> Window"""
54f9ee45 4554 return _core_.NavigationKeyEvent_GetCurrentFocus(*args, **kwargs)
e811c8ce
RD
4555
4556 def SetCurrentFocus(*args, **kwargs):
a95a7133 4557 """SetCurrentFocus(self, Window win)"""
54f9ee45 4558 return _core_.NavigationKeyEvent_SetCurrentFocus(*args, **kwargs)
e811c8ce 4559
b0f7404b 4560 IsBackward = _core_.NavigationKeyEvent_IsBackward
908b74cd
RD
4561 IsForward = _core_.NavigationKeyEvent_IsForward
4562 WinChange = _core_.NavigationKeyEvent_WinChange
d14a1e28
RD
4563
4564class NavigationKeyEventPtr(NavigationKeyEvent):
4565 def __init__(self, this):
4566 self.this = this
4567 if not hasattr(self,"thisown"): self.thisown = 0
4568 self.__class__ = NavigationKeyEvent
54f9ee45 4569_core_.NavigationKeyEvent_swigregister(NavigationKeyEventPtr)
d14a1e28
RD
4570
4571#---------------------------------------------------------------------------
4572
4573class WindowCreateEvent(CommandEvent):
093d3ff1 4574 """Proxy of C++ WindowCreateEvent class"""
e811c8ce
RD
4575 def __repr__(self):
4576 return "<%s.%s; proxy of C++ wxWindowCreateEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 4577 def __init__(self, *args, **kwargs):
a95a7133 4578 """__init__(self, Window win=None) -> WindowCreateEvent"""
54f9ee45 4579 newobj = _core_.new_WindowCreateEvent(*args, **kwargs)
d14a1e28
RD
4580 self.this = newobj.this
4581 self.thisown = 1
4582 del newobj.thisown
e811c8ce 4583 def GetWindow(*args, **kwargs):
a95a7133 4584 """GetWindow(self) -> Window"""
54f9ee45 4585 return _core_.WindowCreateEvent_GetWindow(*args, **kwargs)
e811c8ce 4586
d14a1e28
RD
4587
4588class WindowCreateEventPtr(WindowCreateEvent):
4589 def __init__(self, this):
4590 self.this = this
4591 if not hasattr(self,"thisown"): self.thisown = 0
4592 self.__class__ = WindowCreateEvent
54f9ee45 4593_core_.WindowCreateEvent_swigregister(WindowCreateEventPtr)
d14a1e28
RD
4594
4595class WindowDestroyEvent(CommandEvent):
093d3ff1 4596 """Proxy of C++ WindowDestroyEvent class"""
e811c8ce
RD
4597 def __repr__(self):
4598 return "<%s.%s; proxy of C++ wxWindowDestroyEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 4599 def __init__(self, *args, **kwargs):
a95a7133 4600 """__init__(self, Window win=None) -> WindowDestroyEvent"""
54f9ee45 4601 newobj = _core_.new_WindowDestroyEvent(*args, **kwargs)
d14a1e28
RD
4602 self.this = newobj.this
4603 self.thisown = 1
4604 del newobj.thisown
e811c8ce 4605 def GetWindow(*args, **kwargs):
a95a7133 4606 """GetWindow(self) -> Window"""
54f9ee45 4607 return _core_.WindowDestroyEvent_GetWindow(*args, **kwargs)
e811c8ce 4608
d14a1e28
RD
4609
4610class WindowDestroyEventPtr(WindowDestroyEvent):
4611 def __init__(self, this):
4612 self.this = this
4613 if not hasattr(self,"thisown"): self.thisown = 0
4614 self.__class__ = WindowDestroyEvent
54f9ee45 4615_core_.WindowDestroyEvent_swigregister(WindowDestroyEventPtr)
d14a1e28
RD
4616
4617#---------------------------------------------------------------------------
4618
4619class ContextMenuEvent(CommandEvent):
093d3ff1 4620 """Proxy of C++ ContextMenuEvent class"""
e811c8ce
RD
4621 def __repr__(self):
4622 return "<%s.%s; proxy of C++ wxContextMenuEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 4623 def __init__(self, *args, **kwargs):
a95a7133 4624 """__init__(self, wxEventType type=wxEVT_NULL, int winid=0, Point pt=DefaultPosition) -> ContextMenuEvent"""
54f9ee45 4625 newobj = _core_.new_ContextMenuEvent(*args, **kwargs)
d14a1e28
RD
4626 self.this = newobj.this
4627 self.thisown = 1
4628 del newobj.thisown
e811c8ce 4629 def GetPosition(*args, **kwargs):
a95a7133 4630 """GetPosition(self) -> Point"""
54f9ee45 4631 return _core_.ContextMenuEvent_GetPosition(*args, **kwargs)
e811c8ce
RD
4632
4633 def SetPosition(*args, **kwargs):
a95a7133 4634 """SetPosition(self, Point pos)"""
54f9ee45 4635 return _core_.ContextMenuEvent_SetPosition(*args, **kwargs)
e811c8ce 4636
d14a1e28
RD
4637
4638class ContextMenuEventPtr(ContextMenuEvent):
4639 def __init__(self, this):
4640 self.this = this
4641 if not hasattr(self,"thisown"): self.thisown = 0
4642 self.__class__ = ContextMenuEvent
54f9ee45 4643_core_.ContextMenuEvent_swigregister(ContextMenuEventPtr)
d14a1e28
RD
4644
4645#---------------------------------------------------------------------------
4646
54f9ee45
RD
4647IDLE_PROCESS_ALL = _core_.IDLE_PROCESS_ALL
4648IDLE_PROCESS_SPECIFIED = _core_.IDLE_PROCESS_SPECIFIED
d14a1e28 4649class IdleEvent(Event):
093d3ff1 4650 """Proxy of C++ IdleEvent class"""
e811c8ce
RD
4651 def __repr__(self):
4652 return "<%s.%s; proxy of C++ wxIdleEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 4653 def __init__(self, *args, **kwargs):
a95a7133 4654 """__init__(self) -> IdleEvent"""
54f9ee45 4655 newobj = _core_.new_IdleEvent(*args, **kwargs)
d14a1e28
RD
4656 self.this = newobj.this
4657 self.thisown = 1
4658 del newobj.thisown
e811c8ce 4659 def RequestMore(*args, **kwargs):
a95a7133 4660 """RequestMore(self, bool needMore=True)"""
54f9ee45 4661 return _core_.IdleEvent_RequestMore(*args, **kwargs)
e811c8ce
RD
4662
4663 def MoreRequested(*args, **kwargs):
a95a7133 4664 """MoreRequested(self) -> bool"""
54f9ee45 4665 return _core_.IdleEvent_MoreRequested(*args, **kwargs)
e811c8ce
RD
4666
4667 def SetMode(*args, **kwargs):
66c033b4 4668 """SetMode(int mode)"""
54f9ee45 4669 return _core_.IdleEvent_SetMode(*args, **kwargs)
e811c8ce
RD
4670
4671 SetMode = staticmethod(SetMode)
4672 def GetMode(*args, **kwargs):
66c033b4 4673 """GetMode() -> int"""
54f9ee45 4674 return _core_.IdleEvent_GetMode(*args, **kwargs)
e811c8ce
RD
4675
4676 GetMode = staticmethod(GetMode)
4677 def CanSend(*args, **kwargs):
66c033b4 4678 """CanSend(Window win) -> bool"""
54f9ee45 4679 return _core_.IdleEvent_CanSend(*args, **kwargs)
e811c8ce
RD
4680
4681 CanSend = staticmethod(CanSend)
d14a1e28
RD
4682
4683class IdleEventPtr(IdleEvent):
4684 def __init__(self, this):
4685 self.this = this
4686 if not hasattr(self,"thisown"): self.thisown = 0
4687 self.__class__ = IdleEvent
54f9ee45 4688_core_.IdleEvent_swigregister(IdleEventPtr)
d14a1e28 4689
e811c8ce 4690def IdleEvent_SetMode(*args, **kwargs):
196addbf 4691 """IdleEvent_SetMode(int mode)"""
54f9ee45 4692 return _core_.IdleEvent_SetMode(*args, **kwargs)
d14a1e28 4693
e811c8ce 4694def IdleEvent_GetMode(*args, **kwargs):
196addbf 4695 """IdleEvent_GetMode() -> int"""
54f9ee45 4696 return _core_.IdleEvent_GetMode(*args, **kwargs)
d14a1e28 4697
e811c8ce
RD
4698def IdleEvent_CanSend(*args, **kwargs):
4699 """IdleEvent_CanSend(Window win) -> bool"""
54f9ee45 4700 return _core_.IdleEvent_CanSend(*args, **kwargs)
d14a1e28
RD
4701
4702#---------------------------------------------------------------------------
4703
4704class PyEvent(Event):
093d3ff1 4705 """Proxy of C++ PyEvent class"""
e811c8ce
RD
4706 def __repr__(self):
4707 return "<%s.%s; proxy of C++ wxPyEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 4708 def __init__(self, *args, **kwargs):
a95a7133 4709 """__init__(self, int winid=0, wxEventType commandType=wxEVT_NULL) -> PyEvent"""
54f9ee45 4710 newobj = _core_.new_PyEvent(*args, **kwargs)
d14a1e28
RD
4711 self.this = newobj.this
4712 self.thisown = 1
4713 del newobj.thisown
4714 self.SetSelf(self)
e811c8ce 4715
54f9ee45 4716 def __del__(self, destroy=_core_.delete_PyEvent):
a95a7133 4717 """__del__(self)"""
d14a1e28
RD
4718 try:
4719 if self.thisown: destroy(self)
4720 except: pass
e811c8ce
RD
4721
4722 def SetSelf(*args, **kwargs):
a95a7133 4723 """SetSelf(self, PyObject self)"""
54f9ee45 4724 return _core_.PyEvent_SetSelf(*args, **kwargs)
e811c8ce
RD
4725
4726 def GetSelf(*args, **kwargs):
a95a7133 4727 """GetSelf(self) -> PyObject"""
54f9ee45 4728 return _core_.PyEvent_GetSelf(*args, **kwargs)
e811c8ce 4729
d14a1e28
RD
4730
4731class PyEventPtr(PyEvent):
4732 def __init__(self, this):
4733 self.this = this
4734 if not hasattr(self,"thisown"): self.thisown = 0
4735 self.__class__ = PyEvent
54f9ee45 4736_core_.PyEvent_swigregister(PyEventPtr)
d14a1e28
RD
4737
4738class PyCommandEvent(CommandEvent):
093d3ff1 4739 """Proxy of C++ PyCommandEvent class"""
e811c8ce
RD
4740 def __repr__(self):
4741 return "<%s.%s; proxy of C++ wxPyCommandEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 4742 def __init__(self, *args, **kwargs):
a95a7133 4743 """__init__(self, wxEventType commandType=wxEVT_NULL, int id=0) -> PyCommandEvent"""
54f9ee45 4744 newobj = _core_.new_PyCommandEvent(*args, **kwargs)
d14a1e28
RD
4745 self.this = newobj.this
4746 self.thisown = 1
4747 del newobj.thisown
4748 self.SetSelf(self)
e811c8ce 4749
54f9ee45 4750 def __del__(self, destroy=_core_.delete_PyCommandEvent):
a95a7133 4751 """__del__(self)"""
d14a1e28
RD
4752 try:
4753 if self.thisown: destroy(self)
4754 except: pass
e811c8ce
RD
4755
4756 def SetSelf(*args, **kwargs):
a95a7133 4757 """SetSelf(self, PyObject self)"""
54f9ee45 4758 return _core_.PyCommandEvent_SetSelf(*args, **kwargs)
e811c8ce
RD
4759
4760 def GetSelf(*args, **kwargs):
a95a7133 4761 """GetSelf(self) -> PyObject"""
54f9ee45 4762 return _core_.PyCommandEvent_GetSelf(*args, **kwargs)
e811c8ce 4763
d14a1e28
RD
4764
4765class PyCommandEventPtr(PyCommandEvent):
4766 def __init__(self, this):
4767 self.this = this
4768 if not hasattr(self,"thisown"): self.thisown = 0
4769 self.__class__ = PyCommandEvent
54f9ee45 4770_core_.PyCommandEvent_swigregister(PyCommandEventPtr)
d14a1e28
RD
4771
4772#---------------------------------------------------------------------------
4773
54f9ee45
RD
4774PYAPP_ASSERT_SUPPRESS = _core_.PYAPP_ASSERT_SUPPRESS
4775PYAPP_ASSERT_EXCEPTION = _core_.PYAPP_ASSERT_EXCEPTION
4776PYAPP_ASSERT_DIALOG = _core_.PYAPP_ASSERT_DIALOG
4777PYAPP_ASSERT_LOG = _core_.PYAPP_ASSERT_LOG
4778PRINT_WINDOWS = _core_.PRINT_WINDOWS
4779PRINT_POSTSCRIPT = _core_.PRINT_POSTSCRIPT
d14a1e28 4780class PyApp(EvtHandler):
66c033b4
RD
4781 """
4782 The ``wx.PyApp`` class is an *implementation detail*, please use the
4783 `wx.App` class (or some other derived class) instead.
4784 """
e811c8ce
RD
4785 def __repr__(self):
4786 return "<%s.%s; proxy of C++ wxPyApp instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 4787 def __init__(self, *args, **kwargs):
98e665d3 4788 """
a95a7133 4789 __init__(self) -> PyApp
98e665d3
RD
4790
4791 Create a new application object, starting the bootstrap process.
4792 """
54f9ee45 4793 newobj = _core_.new_PyApp(*args, **kwargs)
d14a1e28
RD
4794 self.this = newobj.this
4795 self.thisown = 1
4796 del newobj.thisown
4797 self._setCallbackInfo(self, PyApp)
4798 self._setOORInfo(self)
e811c8ce 4799
54f9ee45 4800 def __del__(self, destroy=_core_.delete_PyApp):
a95a7133 4801 """__del__(self)"""
d14a1e28
RD
4802 try:
4803 if self.thisown: destroy(self)
4804 except: pass
e811c8ce
RD
4805
4806 def _setCallbackInfo(*args, **kwargs):
a95a7133 4807 """_setCallbackInfo(self, PyObject self, PyObject _class)"""
54f9ee45 4808 return _core_.PyApp__setCallbackInfo(*args, **kwargs)
e811c8ce
RD
4809
4810 def GetAppName(*args, **kwargs):
0df68c9f 4811 """
a95a7133 4812 GetAppName(self) -> String
6c3b4aae 4813
0df68c9f
RD
4814 Get the application name.
4815 """
54f9ee45 4816 return _core_.PyApp_GetAppName(*args, **kwargs)
e811c8ce
RD
4817
4818 def SetAppName(*args, **kwargs):
0df68c9f 4819 """
a95a7133 4820 SetAppName(self, String name)
6c3b4aae 4821
66c033b4
RD
4822 Set the application name. This value may be used automatically by
4823 `wx.Config` and such.
0df68c9f 4824 """
54f9ee45 4825 return _core_.PyApp_SetAppName(*args, **kwargs)
e811c8ce
RD
4826
4827 def GetClassName(*args, **kwargs):
0df68c9f 4828 """
a95a7133 4829 GetClassName(self) -> String
e811c8ce 4830
0df68c9f
RD
4831 Get the application's class name.
4832 """
54f9ee45 4833 return _core_.PyApp_GetClassName(*args, **kwargs)
e811c8ce
RD
4834
4835 def SetClassName(*args, **kwargs):
0df68c9f 4836 """
a95a7133 4837 SetClassName(self, String name)
6c3b4aae 4838
66c033b4
RD
4839 Set the application's class name. This value may be used for
4840 X-resources if applicable for the platform
0df68c9f 4841 """
54f9ee45 4842 return _core_.PyApp_SetClassName(*args, **kwargs)
e811c8ce
RD
4843
4844 def GetVendorName(*args, **kwargs):
0df68c9f 4845 """
a95a7133 4846 GetVendorName(self) -> String
6c3b4aae 4847
0df68c9f
RD
4848 Get the application's vendor name.
4849 """
54f9ee45 4850 return _core_.PyApp_GetVendorName(*args, **kwargs)
e811c8ce
RD
4851
4852 def SetVendorName(*args, **kwargs):
0df68c9f 4853 """
a95a7133 4854 SetVendorName(self, String name)
6c3b4aae 4855
66c033b4
RD
4856 Set the application's vendor name. This value may be used
4857 automatically by `wx.Config` and such.
0df68c9f 4858 """
54f9ee45 4859 return _core_.PyApp_SetVendorName(*args, **kwargs)
e811c8ce
RD
4860
4861 def GetTraits(*args, **kwargs):
0df68c9f 4862 """
a95a7133 4863 GetTraits(self) -> wxAppTraits
6c3b4aae 4864
66c033b4
RD
4865 Return (and create if necessary) the app traits object to which we
4866 delegate for everything which either should be configurable by the
4867 user (then he can change the default behaviour simply by overriding
4868 CreateTraits() and returning his own traits object) or which is
4869 GUI/console dependent as then wx.AppTraits allows us to abstract the
4870 differences behind the common facade.
4871
4872 :todo: Add support for overriding CreateAppTraits in wxPython.
0df68c9f 4873 """
54f9ee45 4874 return _core_.PyApp_GetTraits(*args, **kwargs)
e811c8ce
RD
4875
4876 def ProcessPendingEvents(*args, **kwargs):
0df68c9f 4877 """
a95a7133 4878 ProcessPendingEvents(self)
6c3b4aae 4879
66c033b4
RD
4880 Process all events in the Pending Events list -- it is necessary to
4881 call this function to process posted events. This normally happens
4882 during each event loop iteration.
0df68c9f 4883 """
54f9ee45 4884 return _core_.PyApp_ProcessPendingEvents(*args, **kwargs)
e811c8ce
RD
4885
4886 def Yield(*args, **kwargs):
0df68c9f 4887 """
a95a7133 4888 Yield(self, bool onlyIfNeeded=False) -> bool
6c3b4aae 4889
66c033b4
RD
4890 Process all currently pending events right now, instead of waiting
4891 until return to the event loop. It is an error to call ``Yield``
4892 recursively unless the value of ``onlyIfNeeded`` is True.
6c3b4aae 4893
66c033b4 4894 :warning: This function is dangerous as it can lead to unexpected
41e2b43e
RD
4895 reentrancies (i.e. when called from an event handler it may
4896 result in calling the same event handler again), use with
4897 extreme care or, better, don't use at all!
0df68c9f 4898
66c033b4 4899 :see: `wx.Yield`, `wx.YieldIfNeeded`, `wx.SafeYield`
41e2b43e 4900
0df68c9f 4901 """
54f9ee45 4902 return _core_.PyApp_Yield(*args, **kwargs)
e811c8ce
RD
4903
4904 def WakeUpIdle(*args, **kwargs):
0df68c9f 4905 """
a95a7133 4906 WakeUpIdle(self)
6c3b4aae 4907
66c033b4
RD
4908 Make sure that idle events are sent again.
4909 :see: `wx.WakeUpIdle`
0df68c9f 4910 """
54f9ee45 4911 return _core_.PyApp_WakeUpIdle(*args, **kwargs)
e811c8ce 4912
1fc3b23a
RD
4913 def IsMainLoopRunning(*args, **kwargs):
4914 """
4915 IsMainLoopRunning() -> bool
4916
4917 Returns True if we're running the main loop, i.e. if the events can
4918 currently be dispatched.
4919 """
4920 return _core_.PyApp_IsMainLoopRunning(*args, **kwargs)
4921
4922 IsMainLoopRunning = staticmethod(IsMainLoopRunning)
e811c8ce 4923 def MainLoop(*args, **kwargs):
0df68c9f 4924 """
a95a7133 4925 MainLoop(self) -> int
6c3b4aae 4926
66c033b4
RD
4927 Execute the main GUI loop, the function doesn't normally return until
4928 all top level windows have been closed and destroyed.
0df68c9f 4929 """
54f9ee45 4930 return _core_.PyApp_MainLoop(*args, **kwargs)
e811c8ce
RD
4931
4932 def Exit(*args, **kwargs):
0df68c9f 4933 """
a95a7133 4934 Exit(self)
6c3b4aae 4935
0df68c9f 4936 Exit the main loop thus terminating the application.
66c033b4 4937 :see: `wx.Exit`
0df68c9f 4938 """
54f9ee45 4939 return _core_.PyApp_Exit(*args, **kwargs)
e811c8ce
RD
4940
4941 def ExitMainLoop(*args, **kwargs):
0df68c9f 4942 """
a95a7133 4943 ExitMainLoop(self)
6c3b4aae 4944
66c033b4
RD
4945 Exit the main GUI loop during the next iteration of the main
4946 loop, (i.e. it does not stop the program immediately!)
0df68c9f 4947 """
54f9ee45 4948 return _core_.PyApp_ExitMainLoop(*args, **kwargs)
e811c8ce
RD
4949
4950 def Pending(*args, **kwargs):
0df68c9f 4951 """
a95a7133 4952 Pending(self) -> bool
6c3b4aae 4953
0df68c9f
RD
4954 Returns True if there are unprocessed events in the event queue.
4955 """
54f9ee45 4956 return _core_.PyApp_Pending(*args, **kwargs)
e811c8ce
RD
4957
4958 def Dispatch(*args, **kwargs):
0df68c9f 4959 """
a95a7133 4960 Dispatch(self) -> bool
6c3b4aae 4961
0df68c9f
RD
4962 Process the first event in the event queue (blocks until an event
4963 appears if there are none currently)
4964 """
54f9ee45 4965 return _core_.PyApp_Dispatch(*args, **kwargs)
e811c8ce
RD
4966
4967 def ProcessIdle(*args, **kwargs):
0df68c9f 4968 """
a95a7133 4969 ProcessIdle(self) -> bool
6c3b4aae 4970
66c033b4
RD
4971 Called from the MainLoop when the application becomes idle (there are
4972 no pending events) and sends a `wx.IdleEvent` to all interested
4973 parties. Returns True if more idle events are needed, False if not.
0df68c9f 4974 """
54f9ee45 4975 return _core_.PyApp_ProcessIdle(*args, **kwargs)
e811c8ce
RD
4976
4977 def SendIdleEvents(*args, **kwargs):
0df68c9f 4978 """
a95a7133 4979 SendIdleEvents(self, Window win, IdleEvent event) -> bool
e811c8ce 4980
66c033b4
RD
4981 Send idle event to window and all subwindows. Returns True if more
4982 idle time is requested.
0df68c9f 4983 """
54f9ee45 4984 return _core_.PyApp_SendIdleEvents(*args, **kwargs)
e811c8ce
RD
4985
4986 def IsActive(*args, **kwargs):
0df68c9f 4987 """
a95a7133 4988 IsActive(self) -> bool
6c3b4aae 4989
0df68c9f
RD
4990 Return True if our app has focus.
4991 """
54f9ee45 4992 return _core_.PyApp_IsActive(*args, **kwargs)
e811c8ce
RD
4993
4994 def SetTopWindow(*args, **kwargs):
0df68c9f 4995 """
a95a7133 4996 SetTopWindow(self, Window win)
6c3b4aae 4997
66c033b4 4998 Set the *main* top level window
0df68c9f 4999 """
54f9ee45 5000 return _core_.PyApp_SetTopWindow(*args, **kwargs)
e811c8ce
RD
5001
5002 def GetTopWindow(*args, **kwargs):
0df68c9f 5003 """
a95a7133 5004 GetTopWindow(self) -> Window
6c3b4aae 5005
66c033b4
RD
5006 Return the *main* top level window (if it hadn't been set previously
5007 with SetTopWindow(), will return just some top level window and, if
5008 there not any, will return None)
0df68c9f 5009 """
54f9ee45 5010 return _core_.PyApp_GetTopWindow(*args, **kwargs)
e811c8ce
RD
5011
5012 def SetExitOnFrameDelete(*args, **kwargs):
0df68c9f 5013 """
a95a7133 5014 SetExitOnFrameDelete(self, bool flag)
0df68c9f 5015
66c033b4
RD
5016 Control the exit behaviour: by default, the program will exit the main
5017 loop (and so, usually, terminate) when the last top-level program
5018 window is deleted. Beware that if you disable this behaviour (with
5019 SetExitOnFrameDelete(False)), you'll have to call ExitMainLoop()
5020 explicitly from somewhere.
0df68c9f 5021 """
54f9ee45 5022 return _core_.PyApp_SetExitOnFrameDelete(*args, **kwargs)
e811c8ce
RD
5023
5024 def GetExitOnFrameDelete(*args, **kwargs):
0df68c9f 5025 """
a95a7133 5026 GetExitOnFrameDelete(self) -> bool
6c3b4aae 5027
0df68c9f
RD
5028 Get the current exit behaviour setting.
5029 """
54f9ee45 5030 return _core_.PyApp_GetExitOnFrameDelete(*args, **kwargs)
e811c8ce
RD
5031
5032 def SetUseBestVisual(*args, **kwargs):
0df68c9f 5033 """
a95a7133 5034 SetUseBestVisual(self, bool flag)
6c3b4aae 5035
66c033b4
RD
5036 Set whether the app should try to use the best available visual on
5037 systems where more than one is available, (Sun, SGI, XFree86 4, etc.)
0df68c9f 5038 """
54f9ee45 5039 return _core_.PyApp_SetUseBestVisual(*args, **kwargs)
e811c8ce
RD
5040
5041 def GetUseBestVisual(*args, **kwargs):
0df68c9f 5042 """
a95a7133 5043 GetUseBestVisual(self) -> bool
6c3b4aae 5044
0df68c9f
RD
5045 Get current UseBestVisual setting.
5046 """
54f9ee45 5047 return _core_.PyApp_GetUseBestVisual(*args, **kwargs)
e811c8ce
RD
5048
5049 def SetPrintMode(*args, **kwargs):
a95a7133 5050 """SetPrintMode(self, int mode)"""
54f9ee45 5051 return _core_.PyApp_SetPrintMode(*args, **kwargs)
e811c8ce
RD
5052
5053 def GetPrintMode(*args, **kwargs):
a95a7133 5054 """GetPrintMode(self) -> int"""
54f9ee45 5055 return _core_.PyApp_GetPrintMode(*args, **kwargs)
e811c8ce 5056
e811c8ce 5057 def SetAssertMode(*args, **kwargs):
0df68c9f 5058 """
a95a7133 5059 SetAssertMode(self, int mode)
6c3b4aae 5060
41e2b43e 5061 Set the OnAssert behaviour for debug and hybrid builds.
0df68c9f 5062 """
54f9ee45 5063 return _core_.PyApp_SetAssertMode(*args, **kwargs)
e811c8ce 5064
6c3b4aae 5065 def GetAssertMode(*args, **kwargs):
0df68c9f 5066 """
a95a7133 5067 GetAssertMode(self) -> int
6c3b4aae 5068
0df68c9f
RD
5069 Get the current OnAssert behaviour setting.
5070 """
54f9ee45 5071 return _core_.PyApp_GetAssertMode(*args, **kwargs)
6c3b4aae 5072
e811c8ce 5073 def GetMacSupportPCMenuShortcuts(*args, **kwargs):
66c033b4 5074 """GetMacSupportPCMenuShortcuts() -> bool"""
54f9ee45 5075 return _core_.PyApp_GetMacSupportPCMenuShortcuts(*args, **kwargs)
e811c8ce
RD
5076
5077 GetMacSupportPCMenuShortcuts = staticmethod(GetMacSupportPCMenuShortcuts)
5078 def GetMacAboutMenuItemId(*args, **kwargs):
66c033b4 5079 """GetMacAboutMenuItemId() -> long"""
54f9ee45 5080 return _core_.PyApp_GetMacAboutMenuItemId(*args, **kwargs)
e811c8ce
RD
5081
5082 GetMacAboutMenuItemId = staticmethod(GetMacAboutMenuItemId)
5083 def GetMacPreferencesMenuItemId(*args, **kwargs):
66c033b4 5084 """GetMacPreferencesMenuItemId() -> long"""
54f9ee45 5085 return _core_.PyApp_GetMacPreferencesMenuItemId(*args, **kwargs)
e811c8ce
RD
5086
5087 GetMacPreferencesMenuItemId = staticmethod(GetMacPreferencesMenuItemId)
5088 def GetMacExitMenuItemId(*args, **kwargs):
66c033b4 5089 """GetMacExitMenuItemId() -> long"""
54f9ee45 5090 return _core_.PyApp_GetMacExitMenuItemId(*args, **kwargs)
e811c8ce
RD
5091
5092 GetMacExitMenuItemId = staticmethod(GetMacExitMenuItemId)
5093 def GetMacHelpMenuTitleName(*args, **kwargs):
66c033b4 5094 """GetMacHelpMenuTitleName() -> String"""
54f9ee45 5095 return _core_.PyApp_GetMacHelpMenuTitleName(*args, **kwargs)
e811c8ce
RD
5096
5097 GetMacHelpMenuTitleName = staticmethod(GetMacHelpMenuTitleName)
5098 def SetMacSupportPCMenuShortcuts(*args, **kwargs):
66c033b4 5099 """SetMacSupportPCMenuShortcuts(bool val)"""
54f9ee45 5100 return _core_.PyApp_SetMacSupportPCMenuShortcuts(*args, **kwargs)
e811c8ce
RD
5101
5102 SetMacSupportPCMenuShortcuts = staticmethod(SetMacSupportPCMenuShortcuts)
5103 def SetMacAboutMenuItemId(*args, **kwargs):
66c033b4 5104 """SetMacAboutMenuItemId(long val)"""
54f9ee45 5105 return _core_.PyApp_SetMacAboutMenuItemId(*args, **kwargs)
e811c8ce
RD
5106
5107 SetMacAboutMenuItemId = staticmethod(SetMacAboutMenuItemId)
5108 def SetMacPreferencesMenuItemId(*args, **kwargs):
66c033b4 5109 """SetMacPreferencesMenuItemId(long val)"""
54f9ee45 5110 return _core_.PyApp_SetMacPreferencesMenuItemId(*args, **kwargs)
e811c8ce
RD
5111
5112 SetMacPreferencesMenuItemId = staticmethod(SetMacPreferencesMenuItemId)
5113 def SetMacExitMenuItemId(*args, **kwargs):
66c033b4 5114 """SetMacExitMenuItemId(long val)"""
54f9ee45 5115 return _core_.PyApp_SetMacExitMenuItemId(*args, **kwargs)
e811c8ce
RD
5116
5117 SetMacExitMenuItemId = staticmethod(SetMacExitMenuItemId)
5118 def SetMacHelpMenuTitleName(*args, **kwargs):
66c033b4 5119 """SetMacHelpMenuTitleName(String val)"""
54f9ee45 5120 return _core_.PyApp_SetMacHelpMenuTitleName(*args, **kwargs)
e811c8ce
RD
5121
5122 SetMacHelpMenuTitleName = staticmethod(SetMacHelpMenuTitleName)
5123 def _BootstrapApp(*args, **kwargs):
0df68c9f 5124 """
a95a7133 5125 _BootstrapApp(self)
6c3b4aae 5126
0df68c9f
RD
5127 For internal use only
5128 """
54f9ee45 5129 return _core_.PyApp__BootstrapApp(*args, **kwargs)
e811c8ce
RD
5130
5131 def GetComCtl32Version(*args, **kwargs):
0df68c9f 5132 """
66c033b4 5133 GetComCtl32Version() -> int
6c3b4aae 5134
66c033b4
RD
5135 Returns 400, 470, 471, etc. for comctl32.dll 4.00, 4.70, 4.71 or 0 if
5136 it wasn't found at all. Raises an exception on non-Windows platforms.
0df68c9f 5137 """
54f9ee45 5138 return _core_.PyApp_GetComCtl32Version(*args, **kwargs)
e811c8ce
RD
5139
5140 GetComCtl32Version = staticmethod(GetComCtl32Version)
d14a1e28
RD
5141
5142class PyAppPtr(PyApp):
5143 def __init__(self, this):
5144 self.this = this
5145 if not hasattr(self,"thisown"): self.thisown = 0
5146 self.__class__ = PyApp
54f9ee45 5147_core_.PyApp_swigregister(PyAppPtr)
d14a1e28 5148
1fc3b23a
RD
5149def PyApp_IsMainLoopRunning(*args, **kwargs):
5150 """
5151 PyApp_IsMainLoopRunning() -> bool
5152
5153 Returns True if we're running the main loop, i.e. if the events can
5154 currently be dispatched.
5155 """
5156 return _core_.PyApp_IsMainLoopRunning(*args, **kwargs)
5157
e811c8ce
RD
5158def PyApp_GetMacSupportPCMenuShortcuts(*args, **kwargs):
5159 """PyApp_GetMacSupportPCMenuShortcuts() -> bool"""
54f9ee45 5160 return _core_.PyApp_GetMacSupportPCMenuShortcuts(*args, **kwargs)
d14a1e28 5161
e811c8ce
RD
5162def PyApp_GetMacAboutMenuItemId(*args, **kwargs):
5163 """PyApp_GetMacAboutMenuItemId() -> long"""
54f9ee45 5164 return _core_.PyApp_GetMacAboutMenuItemId(*args, **kwargs)
d14a1e28 5165
e811c8ce
RD
5166def PyApp_GetMacPreferencesMenuItemId(*args, **kwargs):
5167 """PyApp_GetMacPreferencesMenuItemId() -> long"""
54f9ee45 5168 return _core_.PyApp_GetMacPreferencesMenuItemId(*args, **kwargs)
d14a1e28 5169
e811c8ce
RD
5170def PyApp_GetMacExitMenuItemId(*args, **kwargs):
5171 """PyApp_GetMacExitMenuItemId() -> long"""
54f9ee45 5172 return _core_.PyApp_GetMacExitMenuItemId(*args, **kwargs)
d14a1e28 5173
e811c8ce 5174def PyApp_GetMacHelpMenuTitleName(*args, **kwargs):
196addbf 5175 """PyApp_GetMacHelpMenuTitleName() -> String"""
54f9ee45 5176 return _core_.PyApp_GetMacHelpMenuTitleName(*args, **kwargs)
d14a1e28 5177
e811c8ce
RD
5178def PyApp_SetMacSupportPCMenuShortcuts(*args, **kwargs):
5179 """PyApp_SetMacSupportPCMenuShortcuts(bool val)"""
54f9ee45 5180 return _core_.PyApp_SetMacSupportPCMenuShortcuts(*args, **kwargs)
d14a1e28 5181
e811c8ce
RD
5182def PyApp_SetMacAboutMenuItemId(*args, **kwargs):
5183 """PyApp_SetMacAboutMenuItemId(long val)"""
54f9ee45 5184 return _core_.PyApp_SetMacAboutMenuItemId(*args, **kwargs)
d14a1e28 5185
e811c8ce
RD
5186def PyApp_SetMacPreferencesMenuItemId(*args, **kwargs):
5187 """PyApp_SetMacPreferencesMenuItemId(long val)"""
54f9ee45 5188 return _core_.PyApp_SetMacPreferencesMenuItemId(*args, **kwargs)
d14a1e28 5189
e811c8ce
RD
5190def PyApp_SetMacExitMenuItemId(*args, **kwargs):
5191 """PyApp_SetMacExitMenuItemId(long val)"""
54f9ee45 5192 return _core_.PyApp_SetMacExitMenuItemId(*args, **kwargs)
d14a1e28 5193
e811c8ce 5194def PyApp_SetMacHelpMenuTitleName(*args, **kwargs):
196addbf 5195 """PyApp_SetMacHelpMenuTitleName(String val)"""
54f9ee45 5196 return _core_.PyApp_SetMacHelpMenuTitleName(*args, **kwargs)
d14a1e28 5197
e811c8ce 5198def PyApp_GetComCtl32Version(*args, **kwargs):
0df68c9f
RD
5199 """
5200 PyApp_GetComCtl32Version() -> int
6c3b4aae 5201
66c033b4
RD
5202 Returns 400, 470, 471, etc. for comctl32.dll 4.00, 4.70, 4.71 or 0 if
5203 it wasn't found at all. Raises an exception on non-Windows platforms.
0df68c9f 5204 """
54f9ee45 5205 return _core_.PyApp_GetComCtl32Version(*args, **kwargs)
d14a1e28
RD
5206
5207#---------------------------------------------------------------------------
5208
5209
e811c8ce 5210def Exit(*args, **kwargs):
0df68c9f
RD
5211 """
5212 Exit()
6c3b4aae 5213
0df68c9f
RD
5214 Force an exit of the application. Convenience for wx.GetApp().Exit()
5215 """
54f9ee45 5216 return _core_.Exit(*args, **kwargs)
d14a1e28 5217
e811c8ce 5218def Yield(*args, **kwargs):
0df68c9f
RD
5219 """
5220 Yield() -> bool
6c3b4aae 5221
0df68c9f
RD
5222 Yield to other apps/messages. Convenience for wx.GetApp().Yield()
5223 """
54f9ee45 5224 return _core_.Yield(*args, **kwargs)
d14a1e28 5225
e811c8ce 5226def YieldIfNeeded(*args, **kwargs):
0df68c9f
RD
5227 """
5228 YieldIfNeeded() -> bool
6c3b4aae 5229
0df68c9f
RD
5230 Yield to other apps/messages. Convenience for wx.GetApp().Yield(True)
5231 """
54f9ee45 5232 return _core_.YieldIfNeeded(*args, **kwargs)
d14a1e28 5233
e811c8ce 5234def SafeYield(*args, **kwargs):
0df68c9f
RD
5235 """
5236 SafeYield(Window win=None, bool onlyIfNeeded=False) -> bool
6c3b4aae 5237
66c033b4
RD
5238 This function is similar to `wx.Yield`, except that it disables the
5239 user input to all program windows before calling `wx.Yield` and
5240 re-enables it again afterwards. If ``win`` is not None, this window
5241 will remain enabled, allowing the implementation of some limited user
5242 interaction.
6c3b4aae 5243
66c033b4 5244 :Returns: the result of the call to `wx.Yield`.
0df68c9f 5245 """
54f9ee45 5246 return _core_.SafeYield(*args, **kwargs)
d14a1e28 5247
e811c8ce 5248def WakeUpIdle(*args, **kwargs):
0df68c9f
RD
5249 """
5250 WakeUpIdle()
6c3b4aae 5251
66c033b4
RD
5252 Cause the message queue to become empty again, so idle events will be
5253 sent.
0df68c9f 5254 """
54f9ee45 5255 return _core_.WakeUpIdle(*args, **kwargs)
d14a1e28 5256
e811c8ce 5257def PostEvent(*args, **kwargs):
0df68c9f
RD
5258 """
5259 PostEvent(EvtHandler dest, Event event)
6c3b4aae 5260
66c033b4
RD
5261 Send an event to a window or other wx.EvtHandler to be processed
5262 later.
0df68c9f 5263 """
54f9ee45 5264 return _core_.PostEvent(*args, **kwargs)
d14a1e28 5265
e811c8ce 5266def App_CleanUp(*args, **kwargs):
0df68c9f
RD
5267 """
5268 App_CleanUp()
6c3b4aae 5269
41e2b43e 5270 For internal use only, it is used to cleanup after wxWidgets when
66c033b4 5271 Python shuts down.
0df68c9f 5272 """
54f9ee45 5273 return _core_.App_CleanUp(*args, **kwargs)
d14a1e28 5274
e811c8ce 5275def GetApp(*args, **kwargs):
0df68c9f
RD
5276 """
5277 GetApp() -> PyApp
6c3b4aae 5278
196addbf 5279 Return a reference to the current wx.App object.
0df68c9f 5280 """
54f9ee45 5281 return _core_.GetApp(*args, **kwargs)
5cbf236d
RD
5282
5283def SetDefaultPyEncoding(*args, **kwargs):
5284 """
5285 SetDefaultPyEncoding(string encoding)
5286
5287 Sets the encoding that wxPython will use when it needs to convert a
5288 Python string or unicode object to or from a wxString.
e505d15e
RD
5289
5290 The default encoding is the value of ``locale.getdefaultlocale()[1]``
5291 but please be aware that the default encoding within the same locale
5292 may be slightly different on different platforms. For example, please
5293 see http://www.alanwood.net/demos/charsetdiffs.html for differences
5294 between the common latin/roman encodings.
5cbf236d
RD
5295 """
5296 return _core_.SetDefaultPyEncoding(*args, **kwargs)
5297
5298def GetDefaultPyEncoding(*args, **kwargs):
5299 """
5300 GetDefaultPyEncoding() -> string
5301
5302 Gets the current encoding that wxPython will use when it needs to
5303 convert a Python string or unicode object to or from a wxString.
5304 """
5305 return _core_.GetDefaultPyEncoding(*args, **kwargs)
d14a1e28
RD
5306#----------------------------------------------------------------------
5307
5308class PyOnDemandOutputWindow:
6c3b4aae
RD
5309 """
5310 A class that can be used for redirecting Python's stdout and
5311 stderr streams. It will do nothing until something is wrriten to
5312 the stream at which point it will create a Frame with a text area
5313 and write the text there.
5314 """
d14a1e28
RD
5315 def __init__(self, title = "wxPython: stdout/stderr"):
5316 self.frame = None
5317 self.title = title
412d302d
RD
5318 self.pos = wx.DefaultPosition
5319 self.size = (450, 300)
d14a1e28
RD
5320 self.parent = None
5321
5322 def SetParent(self, parent):
6c3b4aae 5323 """Set the window to be used as the popup Frame's parent."""
d14a1e28
RD
5324 self.parent = parent
5325
6c3b4aae
RD
5326
5327 def CreateOutputWindow(self, st):
412d302d
RD
5328 self.frame = wx.Frame(self.parent, -1, self.title, self.pos, self.size,
5329 style=wx.DEFAULT_FRAME_STYLE)
196addbf 5330 self.text = wx.TextCtrl(self.frame, -1, "",
412d302d 5331 style=wx.TE_MULTILINE|wx.TE_READONLY)
d1e20054 5332 self.text.AppendText(st)
6c3b4aae
RD
5333 self.frame.Show(True)
5334 EVT_CLOSE(self.frame, self.OnCloseWindow)
5335
d14a1e28 5336
7409c0c6
RD
5337 def OnCloseWindow(self, event):
5338 if self.frame is not None:
5339 self.frame.Destroy()
5340 self.frame = None
5341 self.text = None
5342
5343
d14a1e28 5344 # These methods provide the file-like output behaviour.
6c3b4aae
RD
5345 def write(self, text):
5346 """
5347 Create the output window if needed and write the string to it.
5348 If not called in the context of the gui thread then uses
5349 CallAfter to do the work there.
5350 """
5351 if self.frame is None:
5352 if not wx.Thread_IsMain():
5353 wx.CallAfter(self.CreateOutputWindow, text)
5354 else:
5355 self.CreateOutputWindow(text)
5356 else:
5357 if not wx.Thread_IsMain():
5358 wx.CallAfter(self.text.AppendText, text)
5359 else:
5360 self.text.AppendText(text)
5361
d14a1e28
RD
5362
5363 def close(self):
6c3b4aae
RD
5364 if self.frame is not None:
5365 wx.CallAfter(self.frame.Close)
5366
d14a1e28 5367
19272049
RD
5368 def flush(self):
5369 pass
5370
5371
d14a1e28
RD
5372
5373#----------------------------------------------------------------------
d14a1e28
RD
5374
5375_defRedirect = (wx.Platform == '__WXMSW__' or wx.Platform == '__WXMAC__')
5376
5377class App(wx.PyApp):
6c3b4aae 5378 """
66c033b4
RD
5379 The ``wx.App`` class represents the application and is used to:
5380
5381 * bootstrap the wxPython system and initialize the underlying
5382 gui toolkit
5383 * set and get application-wide properties
5384 * implement the windowing system main message or event loop,
5385 and to dispatch events to window instances
5386 * etc.
5387
5388 Every application must have a ``wx.App`` instance, and all
5389 creation of UI objects should be delayed until after the
03e37cd5
RD
5390 ``wx.App`` object has been created in order to ensure that the gui
5391 platform and wxWidgets have been fully initialized.
66c033b4
RD
5392
5393 Normally you would derive from this class and implement an
5394 ``OnInit`` method that creates a frame and then calls
5395 ``self.SetTopWindow(frame)``.
5396
03e37cd5 5397 :see: `wx.PySimpleApp` for a simpler app class that can be used
1c0f361b 5398 directly.
6c3b4aae 5399 """
66c033b4 5400
d14a1e28
RD
5401 outputWindowClass = PyOnDemandOutputWindow
5402
03e37cd5
RD
5403 def __init__(self, redirect=_defRedirect, filename=None,
5404 useBestVisual=False, clearSigInt=True):
66c033b4
RD
5405 """
5406 Construct a ``wx.App`` object.
5407
03e37cd5
RD
5408 :param redirect: Should ``sys.stdout`` and ``sys.stderr`` be
5409 redirected? Defaults to True on Windows and Mac, False
5410 otherwise. If `filename` is None then output will be
5411 redirected to a window that pops up as needed. (You can
5412 control what kind of window is created for the output by
5413 resetting the class variable ``outputWindowClass`` to a
5414 class of your choosing.)
66c033b4 5415
03e37cd5
RD
5416 :param filename: The name of a file to redirect output to, if
5417 redirect is True.
66c033b4
RD
5418
5419 :param useBestVisual: Should the app try to use the best
03e37cd5
RD
5420 available visual provided by the system (only relevant on
5421 systems that have more than one visual.) This parameter
5422 must be used instead of calling `SetUseBestVisual` later
5423 on because it must be set before the underlying GUI
5424 toolkit is initialized.
5425
5426 :param clearSigInt: Should SIGINT be cleared? This allows the
5427 app to terminate upon a Ctrl-C in the console like other
5428 GUI apps will.
66c033b4
RD
5429
5430 :note: You should override OnInit to do applicaition
5431 initialization to ensure that the system, toolkit and
5432 wxWidgets are fully initialized.
5433 """
d14a1e28
RD
5434 wx.PyApp.__init__(self)
5435
5436 if wx.Platform == "__WXMAC__":
5437 try:
5438 import MacOS
5439 if not MacOS.WMAvailable():
5440 print """\
5441This program needs access to the screen. Please run with 'pythonw',
5442not 'python', and only when you are logged in on the main display of
5443your Mac."""
5444 _sys.exit(1)
36cadbf7
RD
5445 except SystemExit:
5446 raise
d14a1e28
RD
5447 except:
5448 pass
5449
5450 # This has to be done before OnInit
5451 self.SetUseBestVisual(useBestVisual)
5452
5453 # Set the default handler for SIGINT. This fixes a problem
5454 # where if Ctrl-C is pressed in the console that started this
5455 # app then it will not appear to do anything, (not even send
5456 # KeyboardInterrupt???) but will later segfault on exit. By
5457 # setting the default handler then the app will exit, as
5458 # expected (depending on platform.)
03e37cd5
RD
5459 if clearSigInt:
5460 try:
5461 import signal
5462 signal.signal(signal.SIGINT, signal.SIG_DFL)
5463 except:
5464 pass
d14a1e28
RD
5465
5466 # Save and redirect the stdio to a window?
5467 self.stdioWin = None
5468 self.saveStdio = (_sys.stdout, _sys.stderr)
5469 if redirect:
5470 self.RedirectStdio(filename)
5471
8fb0e70a
RD
5472 # Use Python's install prefix as the default
5473 wx.StandardPaths.Get().SetInstallPrefix(_sys.prefix)
5474
d14a1e28
RD
5475 # This finishes the initialization of wxWindows and then calls
5476 # the OnInit that should be present in the derived class
5477 self._BootstrapApp()
5478
5479
5480 def __del__(self):
5481 try:
5482 self.RestoreStdio() # Just in case the MainLoop was overridden
5483 except:
5484 pass
5485
5486
5487 def SetTopWindow(self, frame):
1e0c8722 5488 """Set the \"main\" top level window"""
d14a1e28
RD
5489 if self.stdioWin:
5490 self.stdioWin.SetParent(frame)
5491 wx.PyApp.SetTopWindow(self, frame)
5492
5493
5494 def MainLoop(self):
1e0c8722 5495 """Execute the main GUI event loop"""
d14a1e28
RD
5496 wx.PyApp.MainLoop(self)
5497 self.RestoreStdio()
5498
5499
7409c0c6 5500 def RedirectStdio(self, filename=None):
1e0c8722 5501 """Redirect sys.stdout and sys.stderr to a file or a popup window."""
d14a1e28
RD
5502 if filename:
5503 _sys.stdout = _sys.stderr = open(filename, 'a')
5504 else:
5505 self.stdioWin = self.outputWindowClass()
5506 _sys.stdout = _sys.stderr = self.stdioWin
5507
5508
5509 def RestoreStdio(self):
5510 _sys.stdout, _sys.stderr = self.saveStdio
5511
5512
412d302d
RD
5513 def SetOutputWindowAttributes(self, title=None, pos=None, size=None):
5514 """
5515 Set the title, position and/or size of the output window if
f5b96ee1
RD
5516 the stdio has been redirected. This should be called before
5517 any output would cause the output window to be created.
412d302d
RD
5518 """
5519 if self.stdioWin:
5520 if title is not None:
5521 self.stdioWin.title = title
5522 if pos is not None:
5523 self.stdioWin.pos = pos
5524 if size is not None:
5525 self.stdioWin.size = size
5526
5527
5528
d14a1e28 5529
66c033b4 5530# change from wx.PyApp_XX to wx.App_XX
54f9ee45
RD
5531App_GetMacSupportPCMenuShortcuts = _core_.PyApp_GetMacSupportPCMenuShortcuts
5532App_GetMacAboutMenuItemId = _core_.PyApp_GetMacAboutMenuItemId
5533App_GetMacPreferencesMenuItemId = _core_.PyApp_GetMacPreferencesMenuItemId
5534App_GetMacExitMenuItemId = _core_.PyApp_GetMacExitMenuItemId
5535App_GetMacHelpMenuTitleName = _core_.PyApp_GetMacHelpMenuTitleName
5536App_SetMacSupportPCMenuShortcuts = _core_.PyApp_SetMacSupportPCMenuShortcuts
5537App_SetMacAboutMenuItemId = _core_.PyApp_SetMacAboutMenuItemId
5538App_SetMacPreferencesMenuItemId = _core_.PyApp_SetMacPreferencesMenuItemId
5539App_SetMacExitMenuItemId = _core_.PyApp_SetMacExitMenuItemId
5540App_SetMacHelpMenuTitleName = _core_.PyApp_SetMacHelpMenuTitleName
5541App_GetComCtl32Version = _core_.PyApp_GetComCtl32Version
d14a1e28
RD
5542
5543#----------------------------------------------------------------------------
5544
5545class PySimpleApp(wx.App):
6c3b4aae
RD
5546 """
5547 A simple application class. You can just create one of these and
5548 then then make your top level windows later, and not have to worry
66c033b4
RD
5549 about OnInit. For example::
5550
5551 app = wx.PySimpleApp()
5552 frame = wx.Frame(None, title='Hello World')
5553 frame.Show()
5554 app.MainLoop()
5555
5556 :see: `wx.App`
5557 """
6c3b4aae 5558
03e37cd5
RD
5559 def __init__(self, redirect=False, filename=None,
5560 useBestVisual=False, clearSigInt=True):
66c033b4
RD
5561 """
5562 :see: `wx.App.__init__`
5563 """
03e37cd5 5564 wx.App.__init__(self, redirect, filename, useBestVisual, clearSigInt)
6c3b4aae 5565
d14a1e28 5566 def OnInit(self):
d14a1e28
RD
5567 return True
5568
5569
66c033b4 5570
6c3b4aae 5571# Is anybody using this one?
d14a1e28
RD
5572class PyWidgetTester(wx.App):
5573 def __init__(self, size = (250, 100)):
5574 self.size = size
5575 wx.App.__init__(self, 0)
5576
5577 def OnInit(self):
196addbf 5578 self.frame = wx.Frame(None, -1, "Widget Tester", pos=(0,0), size=self.size)
d14a1e28
RD
5579 self.SetTopWindow(self.frame)
5580 return True
5581
66c033b4
RD
5582 def SetWidget(self, widgetClass, *args, **kwargs):
5583 w = widgetClass(self.frame, *args, **kwargs)
d14a1e28
RD
5584 self.frame.Show(True)
5585
5586#----------------------------------------------------------------------------
5587# DO NOT hold any other references to this object. This is how we
66c033b4 5588# know when to cleanup system resources that wxWidgets is holding. When
d14a1e28 5589# the sys module is unloaded, the refcount on sys.__wxPythonCleanup
66c033b4 5590# goes to zero and it calls the wx.App_CleanUp function.
d14a1e28
RD
5591
5592class __wxPyCleanup:
5593 def __init__(self):
54f9ee45 5594 self.cleanup = _core_.App_CleanUp
d14a1e28
RD
5595 def __del__(self):
5596 self.cleanup()
5597
5598_sys.__wxPythonCleanup = __wxPyCleanup()
5599
5600## # another possible solution, but it gets called too early...
66c033b4
RD
5601## import atexit
5602## atexit.register(_core_.wxApp_CleanUp)
d14a1e28
RD
5603
5604
5605#----------------------------------------------------------------------------
5606
5607#---------------------------------------------------------------------------
2ef75293
RD
5608
5609class EventLoop(object):
093d3ff1 5610 """Proxy of C++ EventLoop class"""
2ef75293
RD
5611 def __repr__(self):
5612 return "<%s.%s; proxy of C++ wxEventLoop instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
5613 def __init__(self, *args, **kwargs):
5614 """__init__(self) -> EventLoop"""
5615 newobj = _core_.new_EventLoop(*args, **kwargs)
5616 self.this = newobj.this
5617 self.thisown = 1
5618 del newobj.thisown
5619 def __del__(self, destroy=_core_.delete_EventLoop):
5620 """__del__(self)"""
5621 try:
5622 if self.thisown: destroy(self)
5623 except: pass
5624
5625 def Run(*args, **kwargs):
5626 """Run(self) -> int"""
5627 return _core_.EventLoop_Run(*args, **kwargs)
5628
5629 def Exit(*args, **kwargs):
5630 """Exit(self, int rc=0)"""
5631 return _core_.EventLoop_Exit(*args, **kwargs)
5632
5633 def Pending(*args, **kwargs):
5634 """Pending(self) -> bool"""
5635 return _core_.EventLoop_Pending(*args, **kwargs)
5636
5637 def Dispatch(*args, **kwargs):
5638 """Dispatch(self) -> bool"""
5639 return _core_.EventLoop_Dispatch(*args, **kwargs)
5640
5641 def IsRunning(*args, **kwargs):
5642 """IsRunning(self) -> bool"""
5643 return _core_.EventLoop_IsRunning(*args, **kwargs)
5644
5645 def GetActive(*args, **kwargs):
5646 """GetActive() -> EventLoop"""
5647 return _core_.EventLoop_GetActive(*args, **kwargs)
5648
5649 GetActive = staticmethod(GetActive)
5650 def SetActive(*args, **kwargs):
5651 """SetActive(EventLoop loop)"""
5652 return _core_.EventLoop_SetActive(*args, **kwargs)
5653
5654 SetActive = staticmethod(SetActive)
5655
5656class EventLoopPtr(EventLoop):
5657 def __init__(self, this):
5658 self.this = this
5659 if not hasattr(self,"thisown"): self.thisown = 0
5660 self.__class__ = EventLoop
5661_core_.EventLoop_swigregister(EventLoopPtr)
5662
5663def EventLoop_GetActive(*args, **kwargs):
5664 """EventLoop_GetActive() -> EventLoop"""
5665 return _core_.EventLoop_GetActive(*args, **kwargs)
5666
5667def EventLoop_SetActive(*args, **kwargs):
5668 """EventLoop_SetActive(EventLoop loop)"""
5669 return _core_.EventLoop_SetActive(*args, **kwargs)
5670
5671#---------------------------------------------------------------------------
d14a1e28 5672
1e0c8722 5673class AcceleratorEntry(object):
66c033b4
RD
5674 """
5675 A class used to define items in an `wx.AcceleratorTable`. wxPython
5676 programs can choose to use wx.AcceleratorEntry objects, but using a
5677 list of 3-tuple of integers (flags, keyCode, cmdID) usually works just
41e2b43e 5678 as well. See `__init__` for of the tuple values.
66c033b4
RD
5679
5680 :see: `wx.AcceleratorTable`
5681 """
1e0c8722
RD
5682 def __repr__(self):
5683 return "<%s.%s; proxy of C++ wxAcceleratorEntry instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
5684 def __init__(self, *args, **kwargs):
66c033b4
RD
5685 """
5686 __init__(self, int flags=0, int keyCode=0, int cmdID=0) -> AcceleratorEntry
5687
5688 Construct a wx.AcceleratorEntry.
66c033b4 5689 """
54f9ee45 5690 newobj = _core_.new_AcceleratorEntry(*args, **kwargs)
1e0c8722
RD
5691 self.this = newobj.this
5692 self.thisown = 1
5693 del newobj.thisown
54f9ee45 5694 def __del__(self, destroy=_core_.delete_AcceleratorEntry):
a95a7133 5695 """__del__(self)"""
1e0c8722
RD
5696 try:
5697 if self.thisown: destroy(self)
5698 except: pass
5699
5700 def Set(*args, **kwargs):
66c033b4
RD
5701 """
5702 Set(self, int flags, int keyCode, int cmd)
1e0c8722 5703
66c033b4
RD
5704 (Re)set the attributes of a wx.AcceleratorEntry.
5705 :see `__init__`
5706 """
5707 return _core_.AcceleratorEntry_Set(*args, **kwargs)
1e0c8722
RD
5708
5709 def GetFlags(*args, **kwargs):
66c033b4
RD
5710 """
5711 GetFlags(self) -> int
5712
5713 Get the AcceleratorEntry's flags.
5714 """
54f9ee45 5715 return _core_.AcceleratorEntry_GetFlags(*args, **kwargs)
1e0c8722
RD
5716
5717 def GetKeyCode(*args, **kwargs):
66c033b4
RD
5718 """
5719 GetKeyCode(self) -> int
5720
5721 Get the AcceleratorEntry's keycode.
5722 """
54f9ee45 5723 return _core_.AcceleratorEntry_GetKeyCode(*args, **kwargs)
1e0c8722
RD
5724
5725 def GetCommand(*args, **kwargs):
66c033b4
RD
5726 """
5727 GetCommand(self) -> int
5728
5729 Get the AcceleratorEntry's command ID.
5730 """
54f9ee45 5731 return _core_.AcceleratorEntry_GetCommand(*args, **kwargs)
1e0c8722
RD
5732
5733
5734class AcceleratorEntryPtr(AcceleratorEntry):
5735 def __init__(self, this):
5736 self.this = this
5737 if not hasattr(self,"thisown"): self.thisown = 0
5738 self.__class__ = AcceleratorEntry
54f9ee45 5739_core_.AcceleratorEntry_swigregister(AcceleratorEntryPtr)
1e0c8722
RD
5740
5741class AcceleratorTable(Object):
66c033b4
RD
5742 """
5743 An accelerator table allows the application to specify a table of
5744 keyboard shortcuts for menus or other commands. On Windows, menu or
5745 button commands are supported; on GTK, only menu commands are
5746 supported.
66c033b4 5747 """
1e0c8722
RD
5748 def __repr__(self):
5749 return "<%s.%s; proxy of C++ wxAcceleratorTable instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
5750 def __init__(self, *args, **kwargs):
0df68c9f
RD
5751 """
5752 __init__(entries) -> AcceleratorTable
1e0c8722 5753
66c033b4
RD
5754 Construct an AcceleratorTable from a list of `wx.AcceleratorEntry`
5755 items or or of 3-tuples (flags, keyCode, cmdID)
5756
5757 :see: `wx.AcceleratorEntry`
0df68c9f 5758 """
54f9ee45 5759 newobj = _core_.new_AcceleratorTable(*args, **kwargs)
1e0c8722
RD
5760 self.this = newobj.this
5761 self.thisown = 1
5762 del newobj.thisown
54f9ee45 5763 def __del__(self, destroy=_core_.delete_AcceleratorTable):
a95a7133 5764 """__del__(self)"""
1e0c8722
RD
5765 try:
5766 if self.thisown: destroy(self)
5767 except: pass
5768
5769 def Ok(*args, **kwargs):
a95a7133 5770 """Ok(self) -> bool"""
54f9ee45 5771 return _core_.AcceleratorTable_Ok(*args, **kwargs)
1e0c8722
RD
5772
5773
5774class AcceleratorTablePtr(AcceleratorTable):
5775 def __init__(self, this):
5776 self.this = this
5777 if not hasattr(self,"thisown"): self.thisown = 0
5778 self.__class__ = AcceleratorTable
54f9ee45 5779_core_.AcceleratorTable_swigregister(AcceleratorTablePtr)
1e0c8722
RD
5780
5781
5782def GetAccelFromString(*args, **kwargs):
196addbf 5783 """GetAccelFromString(String label) -> AcceleratorEntry"""
54f9ee45 5784 return _core_.GetAccelFromString(*args, **kwargs)
1e0c8722
RD
5785#---------------------------------------------------------------------------
5786
74a57fcd
RD
5787class VisualAttributes(object):
5788 """struct containing all the visual attributes of a control"""
5789 def __repr__(self):
5790 return "<%s.%s; proxy of C++ wxVisualAttributes instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
5791 def __init__(self, *args, **kwargs):
5792 """
a95a7133 5793 __init__(self) -> VisualAttributes
74a57fcd
RD
5794
5795 struct containing all the visual attributes of a control
5796 """
54f9ee45 5797 newobj = _core_.new_VisualAttributes(*args, **kwargs)
74a57fcd
RD
5798 self.this = newobj.this
5799 self.thisown = 1
5800 del newobj.thisown
54f9ee45 5801 def __del__(self, destroy=_core_.delete_VisualAttributes):
a95a7133 5802 """__del__(self)"""
74a57fcd
RD
5803 try:
5804 if self.thisown: destroy(self)
5805 except: pass
5806
54f9ee45
RD
5807 font = property(_core_.VisualAttributes_font_get, _core_.VisualAttributes_font_set)
5808 colFg = property(_core_.VisualAttributes_colFg_get, _core_.VisualAttributes_colFg_set)
5809 colBg = property(_core_.VisualAttributes_colBg_get, _core_.VisualAttributes_colBg_set)
74a57fcd
RD
5810
5811class VisualAttributesPtr(VisualAttributes):
5812 def __init__(self, this):
5813 self.this = this
5814 if not hasattr(self,"thisown"): self.thisown = 0
5815 self.__class__ = VisualAttributes
54f9ee45 5816_core_.VisualAttributes_swigregister(VisualAttributesPtr)
74a57fcd
RD
5817NullAcceleratorTable = cvar.NullAcceleratorTable
5818PanelNameStr = cvar.PanelNameStr
5819
54f9ee45
RD
5820WINDOW_VARIANT_NORMAL = _core_.WINDOW_VARIANT_NORMAL
5821WINDOW_VARIANT_SMALL = _core_.WINDOW_VARIANT_SMALL
5822WINDOW_VARIANT_MINI = _core_.WINDOW_VARIANT_MINI
5823WINDOW_VARIANT_LARGE = _core_.WINDOW_VARIANT_LARGE
5824WINDOW_VARIANT_MAX = _core_.WINDOW_VARIANT_MAX
d14a1e28 5825class Window(EvtHandler):
15afbcd0
RD
5826 """
5827 wx.Window is the base class for all windows and represents any visible
5828 object on the screen. All controls, top level windows and so on are
5829 wx.Windows. Sizers and device contexts are not however, as they don't
5830 appear on screen themselves.
5831
5832 """
e811c8ce
RD
5833 def __repr__(self):
5834 return "<%s.%s; proxy of C++ wxWindow instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 5835 def __init__(self, *args, **kwargs):
0df68c9f 5836 """
a95a7133 5837 __init__(self, Window parent, int id=-1, Point pos=DefaultPosition,
74a57fcd 5838 Size size=DefaultSize, long style=0, String name=PanelNameStr) -> Window
15afbcd0
RD
5839
5840 Construct and show a generic Window.
0df68c9f 5841 """
54f9ee45 5842 newobj = _core_.new_Window(*args, **kwargs)
d14a1e28
RD
5843 self.this = newobj.this
5844 self.thisown = 1
5845 del newobj.thisown
5846 self._setOORInfo(self)
d14a1e28 5847
e811c8ce 5848 def Create(*args, **kwargs):
0df68c9f 5849 """
a95a7133 5850 Create(self, Window parent, int id=-1, Point pos=DefaultPosition,
74a57fcd 5851 Size size=DefaultSize, long style=0, String name=PanelNameStr) -> bool
15afbcd0
RD
5852
5853 Create the GUI part of the Window for 2-phase creation mode.
0df68c9f 5854 """
54f9ee45 5855 return _core_.Window_Create(*args, **kwargs)
d14a1e28 5856
e811c8ce 5857 def Close(*args, **kwargs):
15afbcd0 5858 """
a95a7133 5859 Close(self, bool force=False) -> bool
15afbcd0
RD
5860
5861 This function simply generates a EVT_CLOSE event whose handler usually
5862 tries to close the window. It doesn't close the window itself,
5863 however. If force is False (the default) then the window's close
5864 handler will be allowed to veto the destruction of the window.
15afbcd0 5865 """
54f9ee45 5866 return _core_.Window_Close(*args, **kwargs)
d14a1e28 5867
e811c8ce 5868 def Destroy(*args, **kwargs):
0df68c9f 5869 """
a95a7133 5870 Destroy(self) -> bool
d14a1e28 5871
15afbcd0
RD
5872 Destroys the window safely. Frames and dialogs are not destroyed
5873 immediately when this function is called -- they are added to a list
5874 of windows to be deleted on idle time, when all the window's events
5875 have been processed. This prevents problems with events being sent to
5876 non-existent windows.
5877
5878 Returns True if the window has either been successfully deleted, or it
5879 has been added to the list of windows pending real deletion.
0df68c9f 5880 """
54f9ee45 5881 return _core_.Window_Destroy(*args, **kwargs)
d14a1e28 5882
e811c8ce 5883 def DestroyChildren(*args, **kwargs):
15afbcd0 5884 """
a95a7133 5885 DestroyChildren(self) -> bool
15afbcd0 5886
41e2b43e
RD
5887 Destroys all children of a window. Called automatically by the
5888 destructor.
15afbcd0 5889 """
54f9ee45 5890 return _core_.Window_DestroyChildren(*args, **kwargs)
d14a1e28 5891
e811c8ce 5892 def IsBeingDeleted(*args, **kwargs):
15afbcd0 5893 """
a95a7133 5894 IsBeingDeleted(self) -> bool
15afbcd0
RD
5895
5896 Is the window in the process of being deleted?
5897 """
54f9ee45 5898 return _core_.Window_IsBeingDeleted(*args, **kwargs)
d14a1e28 5899
e811c8ce 5900 def SetTitle(*args, **kwargs):
15afbcd0 5901 """
a95a7133 5902 SetTitle(self, String title)
15afbcd0
RD
5903
5904 Sets the window's title. Applicable only to frames and dialogs.
5905 """
54f9ee45 5906 return _core_.Window_SetTitle(*args, **kwargs)
d14a1e28 5907
e811c8ce 5908 def GetTitle(*args, **kwargs):
15afbcd0 5909 """
a95a7133 5910 GetTitle(self) -> String
15afbcd0
RD
5911
5912 Gets the window's title. Applicable only to frames and dialogs.
5913 """
54f9ee45 5914 return _core_.Window_GetTitle(*args, **kwargs)
d14a1e28 5915
e811c8ce 5916 def SetLabel(*args, **kwargs):
15afbcd0 5917 """
a95a7133 5918 SetLabel(self, String label)
15afbcd0
RD
5919
5920 Set the text which the window shows in its label if applicable.
5921 """
54f9ee45 5922 return _core_.Window_SetLabel(*args, **kwargs)
d14a1e28 5923
e811c8ce 5924 def GetLabel(*args, **kwargs):
15afbcd0 5925 """
a95a7133 5926 GetLabel(self) -> String
15afbcd0 5927
41e2b43e
RD
5928 Generic way of getting a label from any window, for identification
5929 purposes. The interpretation of this function differs from class to
5930 class. For frames and dialogs, the value returned is the title. For
5931 buttons or static text controls, it is the button text. This function
5932 can be useful for meta-programs such as testing tools or special-needs
5933 access programs)which need to identify windows by name.
15afbcd0 5934 """
54f9ee45 5935 return _core_.Window_GetLabel(*args, **kwargs)
d14a1e28 5936
e811c8ce 5937 def SetName(*args, **kwargs):
15afbcd0 5938 """
a95a7133 5939 SetName(self, String name)
15afbcd0 5940
41e2b43e
RD
5941 Sets the window's name. The window name is used for ressource setting
5942 in X, it is not the same as the window title/label
15afbcd0 5943 """
54f9ee45 5944 return _core_.Window_SetName(*args, **kwargs)
d14a1e28 5945
e811c8ce 5946 def GetName(*args, **kwargs):
15afbcd0 5947 """
a95a7133 5948 GetName(self) -> String
15afbcd0 5949
41e2b43e
RD
5950 Returns the windows name. This name is not guaranteed to be unique;
5951 it is up to the programmer to supply an appropriate name in the window
5952 constructor or via wx.Window.SetName.
15afbcd0 5953 """
54f9ee45 5954 return _core_.Window_GetName(*args, **kwargs)
d14a1e28 5955
4276dc52
RD
5956 def SetWindowVariant(*args, **kwargs):
5957 """
a95a7133 5958 SetWindowVariant(self, int variant)
4276dc52 5959
41e2b43e
RD
5960 Sets the variant of the window/font size to use for this window, if
5961 the platform supports variants, for example, wxMac.
4276dc52 5962 """
54f9ee45 5963 return _core_.Window_SetWindowVariant(*args, **kwargs)
4276dc52
RD
5964
5965 def GetWindowVariant(*args, **kwargs):
a95a7133 5966 """GetWindowVariant(self) -> int"""
54f9ee45 5967 return _core_.Window_GetWindowVariant(*args, **kwargs)
4276dc52 5968
e811c8ce 5969 def SetId(*args, **kwargs):
15afbcd0 5970 """
a95a7133 5971 SetId(self, int winid)
15afbcd0
RD
5972
5973 Sets the identifier of the window. Each window has an integer
5974 identifier. If the application has not provided one, an identifier
5975 will be generated. Normally, the identifier should be provided on
5976 creation and should not be modified subsequently.
5977 """
54f9ee45 5978 return _core_.Window_SetId(*args, **kwargs)
d14a1e28 5979
e811c8ce 5980 def GetId(*args, **kwargs):
15afbcd0 5981 """
a95a7133 5982 GetId(self) -> int
15afbcd0
RD
5983
5984 Returns the identifier of the window. Each window has an integer
5985 identifier. If the application has not provided one (or the default Id
5986 -1 is used) then an unique identifier with a negative value will be
5987 generated.
5988 """
54f9ee45 5989 return _core_.Window_GetId(*args, **kwargs)
d14a1e28 5990
e811c8ce 5991 def NewControlId(*args, **kwargs):
15afbcd0 5992 """
66c033b4 5993 NewControlId() -> int
15afbcd0
RD
5994
5995 Generate a control id for the controls which were not given one.
5996 """
54f9ee45 5997 return _core_.Window_NewControlId(*args, **kwargs)
d14a1e28 5998
e811c8ce
RD
5999 NewControlId = staticmethod(NewControlId)
6000 def NextControlId(*args, **kwargs):
15afbcd0 6001 """
66c033b4 6002 NextControlId(int winid) -> int
15afbcd0
RD
6003
6004 Get the id of the control following the one with the given
41e2b43e 6005 autogenerated) id
15afbcd0 6006 """
54f9ee45 6007 return _core_.Window_NextControlId(*args, **kwargs)
d14a1e28 6008
e811c8ce
RD
6009 NextControlId = staticmethod(NextControlId)
6010 def PrevControlId(*args, **kwargs):
15afbcd0 6011 """
66c033b4 6012 PrevControlId(int winid) -> int
15afbcd0
RD
6013
6014 Get the id of the control preceding the one with the given
41e2b43e 6015 autogenerated) id
15afbcd0 6016 """
54f9ee45 6017 return _core_.Window_PrevControlId(*args, **kwargs)
d14a1e28 6018
e811c8ce
RD
6019 PrevControlId = staticmethod(PrevControlId)
6020 def SetSize(*args, **kwargs):
15afbcd0 6021 """
a95a7133 6022 SetSize(self, Size size)
15afbcd0
RD
6023
6024 Sets the size of the window in pixels.
6025 """
54f9ee45 6026 return _core_.Window_SetSize(*args, **kwargs)
d14a1e28 6027
e811c8ce 6028 def SetDimensions(*args, **kwargs):
15afbcd0 6029 """
a95a7133 6030 SetDimensions(self, int x, int y, int width, int height, int sizeFlags=SIZE_AUTO)
15afbcd0
RD
6031
6032 Sets the position and size of the window in pixels. The sizeFlags
6033 parameter indicates the interpretation of the other params if they are
e505d15e
RD
6034 equal to -1.
6035
6036 ======================== ======================================
6037 wx.SIZE_AUTO A -1 indicates that a class-specific
6038 default should be used.
6039 wx.SIZE_USE_EXISTING Axisting dimensions should be used if
6040 -1 values are supplied.
6041 wxSIZE_ALLOW_MINUS_ONE Allow dimensions of -1 and less to be
6042 interpreted as real dimensions, not
6043 default values.
6044 ======================== ======================================
6045
15afbcd0 6046 """
54f9ee45 6047 return _core_.Window_SetDimensions(*args, **kwargs)
d14a1e28 6048
e811c8ce 6049 def SetRect(*args, **kwargs):
15afbcd0 6050 """
a95a7133 6051 SetRect(self, Rect rect, int sizeFlags=SIZE_AUTO)
15afbcd0
RD
6052
6053 Sets the position and size of the window in pixels using a wx.Rect.
6054 """
54f9ee45 6055 return _core_.Window_SetRect(*args, **kwargs)
d14a1e28 6056
e811c8ce 6057 def SetSizeWH(*args, **kwargs):
15afbcd0 6058 """
a95a7133 6059 SetSizeWH(self, int width, int height)
15afbcd0
RD
6060
6061 Sets the size of the window in pixels.
6062 """
54f9ee45 6063 return _core_.Window_SetSizeWH(*args, **kwargs)
d14a1e28 6064
e811c8ce 6065 def Move(*args, **kwargs):
15afbcd0 6066 """
a95a7133 6067 Move(self, Point pt, int flags=SIZE_USE_EXISTING)
15afbcd0
RD
6068
6069 Moves the window to the given position.
6070 """
54f9ee45 6071 return _core_.Window_Move(*args, **kwargs)
d14a1e28 6072
e811c8ce
RD
6073 SetPosition = Move
6074 def MoveXY(*args, **kwargs):
15afbcd0 6075 """
a95a7133 6076 MoveXY(self, int x, int y, int flags=SIZE_USE_EXISTING)
15afbcd0
RD
6077
6078 Moves the window to the given position.
6079 """
54f9ee45 6080 return _core_.Window_MoveXY(*args, **kwargs)
e811c8ce 6081
f8167d6e
RD
6082 def SetBestFittingSize(*args, **kwargs):
6083 """
6084 SetBestFittingSize(self, Size size=DefaultSize)
6085
6086 A 'Smart' SetSize that will fill in default size components with the
6087 window's *best size* values. Also set's the minsize for use with sizers.
6088 """
6089 return _core_.Window_SetBestFittingSize(*args, **kwargs)
6090
e811c8ce 6091 def Raise(*args, **kwargs):
15afbcd0 6092 """
a95a7133 6093 Raise(self)
15afbcd0
RD
6094
6095 Raises the window to the top of the window hierarchy if it is a
6096 managed window (dialog or frame).
6097 """
54f9ee45 6098 return _core_.Window_Raise(*args, **kwargs)
e811c8ce
RD
6099
6100 def Lower(*args, **kwargs):
15afbcd0 6101 """
a95a7133 6102 Lower(self)
15afbcd0
RD
6103
6104 Lowers the window to the bottom of the window hierarchy if it is a
6105 managed window (dialog or frame).
6106 """
54f9ee45 6107 return _core_.Window_Lower(*args, **kwargs)
e811c8ce
RD
6108
6109 def SetClientSize(*args, **kwargs):
15afbcd0 6110 """
a95a7133 6111 SetClientSize(self, Size size)
15afbcd0
RD
6112
6113 This sets the size of the window client area in pixels. Using this
6114 function to size a window tends to be more device-independent than
6115 wx.Window.SetSize, since the application need not worry about what
6116 dimensions the border or title bar have when trying to fit the window
6117 around panel items, for example.
6118 """
54f9ee45 6119 return _core_.Window_SetClientSize(*args, **kwargs)
e811c8ce
RD
6120
6121 def SetClientSizeWH(*args, **kwargs):
15afbcd0 6122 """
a95a7133 6123 SetClientSizeWH(self, int width, int height)
15afbcd0
RD
6124
6125 This sets the size of the window client area in pixels. Using this
6126 function to size a window tends to be more device-independent than
6127 wx.Window.SetSize, since the application need not worry about what
6128 dimensions the border or title bar have when trying to fit the window
6129 around panel items, for example.
6130 """
54f9ee45 6131 return _core_.Window_SetClientSizeWH(*args, **kwargs)
e811c8ce
RD
6132
6133 def SetClientRect(*args, **kwargs):
15afbcd0 6134 """
a95a7133 6135 SetClientRect(self, Rect rect)
15afbcd0
RD
6136
6137 This sets the size of the window client area in pixels. Using this
6138 function to size a window tends to be more device-independent than
6139 wx.Window.SetSize, since the application need not worry about what
6140 dimensions the border or title bar have when trying to fit the window
6141 around panel items, for example.
6142 """
54f9ee45 6143 return _core_.Window_SetClientRect(*args, **kwargs)
e811c8ce
RD
6144
6145 def GetPosition(*args, **kwargs):
0df68c9f 6146 """
a95a7133 6147 GetPosition(self) -> Point
e811c8ce 6148
0df68c9f
RD
6149 Get the window's position.
6150 """
54f9ee45 6151 return _core_.Window_GetPosition(*args, **kwargs)
e811c8ce
RD
6152
6153 def GetPositionTuple(*args, **kwargs):
0df68c9f
RD
6154 """
6155 GetPositionTuple() -> (x,y)
e811c8ce 6156
0df68c9f
RD
6157 Get the window's position.
6158 """
54f9ee45 6159 return _core_.Window_GetPositionTuple(*args, **kwargs)
e811c8ce
RD
6160
6161 def GetSize(*args, **kwargs):
0df68c9f 6162 """
a95a7133 6163 GetSize(self) -> Size
e811c8ce 6164
0df68c9f
RD
6165 Get the window size.
6166 """
54f9ee45 6167 return _core_.Window_GetSize(*args, **kwargs)
e811c8ce
RD
6168
6169 def GetSizeTuple(*args, **kwargs):
0df68c9f
RD
6170 """
6171 GetSizeTuple() -> (width, height)
e811c8ce 6172
0df68c9f
RD
6173 Get the window size.
6174 """
54f9ee45 6175 return _core_.Window_GetSizeTuple(*args, **kwargs)
e811c8ce
RD
6176
6177 def GetRect(*args, **kwargs):
15afbcd0 6178 """
a95a7133 6179 GetRect(self) -> Rect
15afbcd0
RD
6180
6181 Returns the size and position of the window as a wx.Rect object.
6182 """
54f9ee45 6183 return _core_.Window_GetRect(*args, **kwargs)
e811c8ce
RD
6184
6185 def GetClientSize(*args, **kwargs):
0df68c9f 6186 """
a95a7133 6187 GetClientSize(self) -> Size
e811c8ce 6188
15afbcd0
RD
6189 This gets the size of the window's 'client area' in pixels. The client
6190 area is the area which may be drawn on by the programmer, excluding
6191 title bar, border, scrollbars, etc.
0df68c9f 6192 """
54f9ee45 6193 return _core_.Window_GetClientSize(*args, **kwargs)
e811c8ce
RD
6194
6195 def GetClientSizeTuple(*args, **kwargs):
0df68c9f
RD
6196 """
6197 GetClientSizeTuple() -> (width, height)
e811c8ce 6198
15afbcd0
RD
6199 This gets the size of the window's 'client area' in pixels. The client
6200 area is the area which may be drawn on by the programmer, excluding
6201 title bar, border, scrollbars, etc.
0df68c9f 6202 """
54f9ee45 6203 return _core_.Window_GetClientSizeTuple(*args, **kwargs)
e811c8ce
RD
6204
6205 def GetClientAreaOrigin(*args, **kwargs):
15afbcd0 6206 """
a95a7133 6207 GetClientAreaOrigin(self) -> Point
15afbcd0
RD
6208
6209 Get the origin of the client area of the window relative to the
6210 window's top left corner (the client area may be shifted because of
6211 the borders, scrollbars, other decorations...)
6212 """
54f9ee45 6213 return _core_.Window_GetClientAreaOrigin(*args, **kwargs)
e811c8ce
RD
6214
6215 def GetClientRect(*args, **kwargs):
15afbcd0 6216 """
a95a7133 6217 GetClientRect(self) -> Rect
15afbcd0 6218
61863841 6219 Get the client area position and size as a `wx.Rect` object.
15afbcd0 6220 """
54f9ee45 6221 return _core_.Window_GetClientRect(*args, **kwargs)
e811c8ce
RD
6222
6223 def GetBestSize(*args, **kwargs):
0df68c9f 6224 """
a95a7133 6225 GetBestSize(self) -> Size
e811c8ce 6226
248ed943 6227 This function returns the best acceptable minimal size for the
41e2b43e
RD
6228 window, if applicable. For example, for a static text control, it will
6229 be the minimal size such that the control label is not truncated. For
6230 windows containing subwindows (suzh aswx.Panel), the size returned by
6231 this function will be the same as the size the window would have had
6232 after calling Fit.
0df68c9f 6233 """
54f9ee45 6234 return _core_.Window_GetBestSize(*args, **kwargs)
e811c8ce
RD
6235
6236 def GetBestSizeTuple(*args, **kwargs):
0df68c9f
RD
6237 """
6238 GetBestSizeTuple() -> (width, height)
e811c8ce 6239
248ed943 6240 This function returns the best acceptable minimal size for the
41e2b43e
RD
6241 window, if applicable. For example, for a static text control, it will
6242 be the minimal size such that the control label is not truncated. For
6243 windows containing subwindows (suzh aswx.Panel), the size returned by
6244 this function will be the same as the size the window would have had
6245 after calling Fit.
0df68c9f 6246 """
54f9ee45 6247 return _core_.Window_GetBestSizeTuple(*args, **kwargs)
e811c8ce 6248
dfbb5885
RD
6249 def InvalidateBestSize(*args, **kwargs):
6250 """
6251 InvalidateBestSize(self)
6252
6253 Reset the cached best size value so it will be recalculated the next
6254 time it is needed.
6255 """
6256 return _core_.Window_InvalidateBestSize(*args, **kwargs)
6257
6258 def GetBestFittingSize(*args, **kwargs):
6259 """
6260 GetBestFittingSize(self) -> Size
6261
6262 This function will merge the window's best size into the window's
6263 minimum size, giving priority to the min size components, and returns
6264 the results.
6265
6266 """
6267 return _core_.Window_GetBestFittingSize(*args, **kwargs)
6268
e811c8ce 6269 def GetAdjustedBestSize(*args, **kwargs):
15afbcd0 6270 """
a95a7133 6271 GetAdjustedBestSize(self) -> Size
15afbcd0
RD
6272
6273 This method is similar to GetBestSize, except in one
6274 thing. GetBestSize should return the minimum untruncated size of the
6275 window, while this method will return the largest of BestSize and any
6276 user specified minimum size. ie. it is the minimum size the window
6277 should currently be drawn at, not the minimal size it can possibly
6278 tolerate.
6279 """
54f9ee45 6280 return _core_.Window_GetAdjustedBestSize(*args, **kwargs)
e811c8ce
RD
6281
6282 def Center(*args, **kwargs):
15afbcd0 6283 """
a95a7133 6284 Center(self, int direction=BOTH)
15afbcd0
RD
6285
6286 Centers the window. The parameter specifies the direction for
6287 cetering, and may be wx.HORIZONTAL, wx.VERTICAL or wx.BOTH. It may
6288 also include wx.CENTER_ON_SCREEN flag if you want to center the window
6289 on the entire screen and not on its parent window. If it is a
6290 top-level window and has no parent then it will always be centered
6291 relative to the screen.
6292 """
54f9ee45 6293 return _core_.Window_Center(*args, **kwargs)
e811c8ce
RD
6294
6295 Centre = Center
6296 def CenterOnScreen(*args, **kwargs):
15afbcd0 6297 """
a95a7133 6298 CenterOnScreen(self, int dir=BOTH)
15afbcd0
RD
6299
6300 Center on screen (only works for top level windows)
6301 """
54f9ee45 6302 return _core_.Window_CenterOnScreen(*args, **kwargs)
e811c8ce
RD
6303
6304 CentreOnScreen = CenterOnScreen
6305 def CenterOnParent(*args, **kwargs):
15afbcd0 6306 """
a95a7133 6307 CenterOnParent(self, int dir=BOTH)
15afbcd0
RD
6308
6309 Center with respect to the the parent window
6310 """
54f9ee45 6311 return _core_.Window_CenterOnParent(*args, **kwargs)
e811c8ce
RD
6312
6313 CentreOnParent = CenterOnParent
6314 def Fit(*args, **kwargs):
15afbcd0 6315 """
a95a7133 6316 Fit(self)
15afbcd0
RD
6317
6318 Sizes the window so that it fits around its subwindows. This function
6319 won't do anything if there are no subwindows and will only really work
6320 correctly if sizers are used for the subwindows layout. Also, if the
6321 window has exactly one subwindow it is better (faster and the result
6322 is more precise as Fit adds some margin to account for fuzziness of
6323 its calculations) to call window.SetClientSize(child.GetSize())
6324 instead of calling Fit.
6325 """
54f9ee45 6326 return _core_.Window_Fit(*args, **kwargs)
e811c8ce
RD
6327
6328 def FitInside(*args, **kwargs):
15afbcd0 6329 """
a95a7133 6330 FitInside(self)
15afbcd0
RD
6331
6332 Similar to Fit, but sizes the interior (virtual) size of a
6333 window. Mainly useful with scrolled windows to reset scrollbars after
6334 sizing changes that do not trigger a size event, and/or scrolled
6335 windows without an interior sizer. This function similarly won't do
6336 anything if there are no subwindows.
6337 """
54f9ee45 6338 return _core_.Window_FitInside(*args, **kwargs)
e811c8ce 6339
f16ab95d 6340 def SetSizeHints(*args, **kwargs):
0df68c9f 6341 """
a95a7133 6342 SetSizeHints(self, int minW, int minH, int maxW=-1, int maxH=-1, int incW=-1,
0df68c9f 6343 int incH=-1)
15afbcd0
RD
6344
6345 Allows specification of minimum and maximum window sizes, and window
6346 size increments. If a pair of values is not set (or set to -1), the
6347 default values will be used. If this function is called, the user
908b74cd
RD
6348 will not be able to size the window outside the given bounds (if it is
6349 a top-level window.) Sizers will also inspect the minimum window size
6350 and will use that value if set when calculating layout.
6351
6352 The resizing increments are only significant under Motif or Xt.
0df68c9f 6353 """
f16ab95d 6354 return _core_.Window_SetSizeHints(*args, **kwargs)
e811c8ce 6355
f16ab95d
RD
6356 def SetSizeHintsSz(*args, **kwargs):
6357 """
6358 SetSizeHintsSz(self, Size minSize, Size maxSize=DefaultSize, Size incSize=DefaultSize)
6359
6360 Allows specification of minimum and maximum window sizes, and window
6361 size increments. If a pair of values is not set (or set to -1), the
6362 default values will be used. If this function is called, the user
6363 will not be able to size the window outside the given bounds (if it is
6364 a top-level window.) Sizers will also inspect the minimum window size
6365 and will use that value if set when calculating layout.
6366
6367 The resizing increments are only significant under Motif or Xt.
6368 """
6369 return _core_.Window_SetSizeHintsSz(*args, **kwargs)
6370
6371 def SetVirtualSizeHints(*args, **kwargs):
15afbcd0 6372 """
908b74cd 6373 SetVirtualSizeHints(self, int minW, int minH, int maxW=-1, int maxH=-1)
15afbcd0
RD
6374
6375 Allows specification of minimum and maximum virtual window sizes. If a
6376 pair of values is not set (or set to -1), the default values will be
6377 used. If this function is called, the user will not be able to size
6378 the virtual area of the window outside the given bounds.
6379 """
f16ab95d
RD
6380 return _core_.Window_SetVirtualSizeHints(*args, **kwargs)
6381
6382 def SetVirtualSizeHintsSz(*args, **kwargs):
6383 """
6384 SetVirtualSizeHintsSz(self, Size minSize, Size maxSize=DefaultSize)
6385
6386 Allows specification of minimum and maximum virtual window sizes. If a
6387 pair of values is not set (or set to -1), the default values will be
6388 used. If this function is called, the user will not be able to size
6389 the virtual area of the window outside the given bounds.
6390 """
6391 return _core_.Window_SetVirtualSizeHintsSz(*args, **kwargs)
e811c8ce 6392
908b74cd
RD
6393 def GetMaxSize(*args, **kwargs):
6394 """GetMaxSize(self) -> Size"""
6395 return _core_.Window_GetMaxSize(*args, **kwargs)
6396
6397 def GetMinSize(*args, **kwargs):
6398 """GetMinSize(self) -> Size"""
6399 return _core_.Window_GetMinSize(*args, **kwargs)
6400
6401 def SetMinSize(*args, **kwargs):
6402 """
6403 SetMinSize(self, Size minSize)
6404
6405 A more convenient method than `SetSizeHints` for setting just the
6406 min size.
6407 """
6408 return _core_.Window_SetMinSize(*args, **kwargs)
6409
6410 def SetMaxSize(*args, **kwargs):
6411 """
6412 SetMaxSize(self, Size maxSize)
6413
6414 A more convenient method than `SetSizeHints` for setting just the
6415 max size.
6416 """
6417 return _core_.Window_SetMaxSize(*args, **kwargs)
6418
e811c8ce 6419 def GetMinWidth(*args, **kwargs):
a95a7133 6420 """GetMinWidth(self) -> int"""
54f9ee45 6421 return _core_.Window_GetMinWidth(*args, **kwargs)
e811c8ce
RD
6422
6423 def GetMinHeight(*args, **kwargs):
a95a7133 6424 """GetMinHeight(self) -> int"""
54f9ee45 6425 return _core_.Window_GetMinHeight(*args, **kwargs)
e811c8ce
RD
6426
6427 def GetMaxWidth(*args, **kwargs):
a95a7133 6428 """GetMaxWidth(self) -> int"""
54f9ee45 6429 return _core_.Window_GetMaxWidth(*args, **kwargs)
e811c8ce
RD
6430
6431 def GetMaxHeight(*args, **kwargs):
a95a7133 6432 """GetMaxHeight(self) -> int"""
54f9ee45 6433 return _core_.Window_GetMaxHeight(*args, **kwargs)
e811c8ce 6434
e811c8ce 6435 def SetVirtualSize(*args, **kwargs):
0df68c9f 6436 """
a95a7133 6437 SetVirtualSize(self, Size size)
e811c8ce 6438
15afbcd0
RD
6439 Set the the virtual size of a window in pixels. For most windows this
6440 is just the client area of the window, but for some like scrolled
6441 windows it is more or less independent of the screen window size.
0df68c9f 6442 """
54f9ee45 6443 return _core_.Window_SetVirtualSize(*args, **kwargs)
e811c8ce
RD
6444
6445 def SetVirtualSizeWH(*args, **kwargs):
0df68c9f 6446 """
a95a7133 6447 SetVirtualSizeWH(self, int w, int h)
e811c8ce 6448
15afbcd0
RD
6449 Set the the virtual size of a window in pixels. For most windows this
6450 is just the client area of the window, but for some like scrolled
6451 windows it is more or less independent of the screen window size.
0df68c9f 6452 """
54f9ee45 6453 return _core_.Window_SetVirtualSizeWH(*args, **kwargs)
e811c8ce
RD
6454
6455 def GetVirtualSize(*args, **kwargs):
0df68c9f 6456 """
a95a7133 6457 GetVirtualSize(self) -> Size
e811c8ce 6458
15afbcd0
RD
6459 Get the the virtual size of the window in pixels. For most windows
6460 this is just the client area of the window, but for some like scrolled
6461 windows it is more or less independent of the screen window size.
0df68c9f 6462 """
54f9ee45 6463 return _core_.Window_GetVirtualSize(*args, **kwargs)
e811c8ce
RD
6464
6465 def GetVirtualSizeTuple(*args, **kwargs):
0df68c9f
RD
6466 """
6467 GetVirtualSizeTuple() -> (width, height)
e811c8ce 6468
15afbcd0
RD
6469 Get the the virtual size of the window in pixels. For most windows
6470 this is just the client area of the window, but for some like scrolled
6471 windows it is more or less independent of the screen window size.
0df68c9f 6472 """
54f9ee45 6473 return _core_.Window_GetVirtualSizeTuple(*args, **kwargs)
e811c8ce
RD
6474
6475 def GetBestVirtualSize(*args, **kwargs):
15afbcd0 6476 """
a95a7133 6477 GetBestVirtualSize(self) -> Size
15afbcd0
RD
6478
6479 Return the largest of ClientSize and BestSize (as determined by a
6480 sizer, interior children, or other means)
6481 """
54f9ee45 6482 return _core_.Window_GetBestVirtualSize(*args, **kwargs)
e811c8ce
RD
6483
6484 def Show(*args, **kwargs):
15afbcd0 6485 """
a95a7133 6486 Show(self, bool show=True) -> bool
15afbcd0
RD
6487
6488 Shows or hides the window. You may need to call Raise for a top level
6489 window if you want to bring it to top, although this is not needed if
6490 Show is called immediately after the frame creation. Returns True if
6491 the window has been shown or hidden or False if nothing was done
6492 because it already was in the requested state.
6493 """
54f9ee45 6494 return _core_.Window_Show(*args, **kwargs)
e811c8ce
RD
6495
6496 def Hide(*args, **kwargs):
15afbcd0 6497 """
a95a7133 6498 Hide(self) -> bool
15afbcd0
RD
6499
6500 Equivalent to calling Show(False).
6501 """
54f9ee45 6502 return _core_.Window_Hide(*args, **kwargs)
e811c8ce
RD
6503
6504 def Enable(*args, **kwargs):
15afbcd0 6505 """
a95a7133 6506 Enable(self, bool enable=True) -> bool
15afbcd0
RD
6507
6508 Enable or disable the window for user input. Note that when a parent
6509 window is disabled, all of its children are disabled as well and they
6510 are reenabled again when the parent is. Returns true if the window
6511 has been enabled or disabled, false if nothing was done, i.e. if the
6512 window had already been in the specified state.
6513 """
54f9ee45 6514 return _core_.Window_Enable(*args, **kwargs)
e811c8ce
RD
6515
6516 def Disable(*args, **kwargs):
15afbcd0 6517 """
a95a7133 6518 Disable(self) -> bool
15afbcd0
RD
6519
6520 Disables the window, same as Enable(false).
6521 """
54f9ee45 6522 return _core_.Window_Disable(*args, **kwargs)
e811c8ce
RD
6523
6524 def IsShown(*args, **kwargs):
15afbcd0 6525 """
a95a7133 6526 IsShown(self) -> bool
15afbcd0
RD
6527
6528 Returns true if the window is shown, false if it has been hidden.
6529 """
54f9ee45 6530 return _core_.Window_IsShown(*args, **kwargs)
e811c8ce
RD
6531
6532 def IsEnabled(*args, **kwargs):
15afbcd0 6533 """
a95a7133 6534 IsEnabled(self) -> bool
15afbcd0
RD
6535
6536 Returns true if the window is enabled for input, false otherwise.
6537 """
54f9ee45 6538 return _core_.Window_IsEnabled(*args, **kwargs)
e811c8ce
RD
6539
6540 def SetWindowStyleFlag(*args, **kwargs):
15afbcd0 6541 """
a95a7133 6542 SetWindowStyleFlag(self, long style)
15afbcd0 6543
41e2b43e
RD
6544 Sets the style of the window. Please note that some styles cannot be
6545 changed after the window creation and that Refresh() might need to be
6546 called after changing the others for the change to take place
6547 immediately.
15afbcd0 6548 """
54f9ee45 6549 return _core_.Window_SetWindowStyleFlag(*args, **kwargs)
e811c8ce
RD
6550
6551 def GetWindowStyleFlag(*args, **kwargs):
15afbcd0 6552 """
a95a7133 6553 GetWindowStyleFlag(self) -> long
e811c8ce 6554
15afbcd0
RD
6555 Gets the window style that was passed to the constructor or Create
6556 method.
6557 """
54f9ee45 6558 return _core_.Window_GetWindowStyleFlag(*args, **kwargs)
e811c8ce 6559
15afbcd0 6560 SetWindowStyle = SetWindowStyleFlag; GetWindowStyle = GetWindowStyleFlag
e811c8ce 6561 def HasFlag(*args, **kwargs):
15afbcd0 6562 """
a95a7133 6563 HasFlag(self, int flag) -> bool
15afbcd0
RD
6564
6565 Test if the given style is set for this window.
6566 """
54f9ee45 6567 return _core_.Window_HasFlag(*args, **kwargs)
e811c8ce
RD
6568
6569 def IsRetained(*args, **kwargs):
15afbcd0 6570 """
a95a7133 6571 IsRetained(self) -> bool
15afbcd0
RD
6572
6573 Returns true if the window is retained, false otherwise. Retained
6574 windows are only available on X platforms.
6575 """
54f9ee45 6576 return _core_.Window_IsRetained(*args, **kwargs)
e811c8ce
RD
6577
6578 def SetExtraStyle(*args, **kwargs):
15afbcd0 6579 """
a95a7133 6580 SetExtraStyle(self, long exStyle)
15afbcd0
RD
6581
6582 Sets the extra style bits for the window. Extra styles are the less
6583 often used style bits which can't be set with the constructor or with
6584 SetWindowStyleFlag()
6585 """
54f9ee45 6586 return _core_.Window_SetExtraStyle(*args, **kwargs)
e811c8ce
RD
6587
6588 def GetExtraStyle(*args, **kwargs):
15afbcd0 6589 """
a95a7133 6590 GetExtraStyle(self) -> long
15afbcd0
RD
6591
6592 Returns the extra style bits for the window.
6593 """
54f9ee45 6594 return _core_.Window_GetExtraStyle(*args, **kwargs)
e811c8ce
RD
6595
6596 def MakeModal(*args, **kwargs):
15afbcd0 6597 """
a95a7133 6598 MakeModal(self, bool modal=True)
15afbcd0
RD
6599
6600 Disables all other windows in the application so that the user can
6601 only interact with this window. Passing False will reverse this
6602 effect.
6603 """
54f9ee45 6604 return _core_.Window_MakeModal(*args, **kwargs)
e811c8ce
RD
6605
6606 def SetThemeEnabled(*args, **kwargs):
15afbcd0 6607 """
a95a7133 6608 SetThemeEnabled(self, bool enableTheme)
15afbcd0
RD
6609
6610 This function tells a window if it should use the system's "theme"
6611 code to draw the windows' background instead if its own background
6612 drawing code. This will only have an effect on platforms that support
6613 the notion of themes in user defined windows. One such platform is
6614 GTK+ where windows can have (very colourful) backgrounds defined by a
6615 user's selected theme.
6616
6617 Dialogs, notebook pages and the status bar have this flag set to true
6618 by default so that the default look and feel is simulated best.
6619 """
54f9ee45 6620 return _core_.Window_SetThemeEnabled(*args, **kwargs)
e811c8ce
RD
6621
6622 def GetThemeEnabled(*args, **kwargs):
15afbcd0 6623 """
a95a7133 6624 GetThemeEnabled(self) -> bool
e811c8ce 6625
15afbcd0
RD
6626 Return the themeEnabled flag.
6627 """
54f9ee45 6628 return _core_.Window_GetThemeEnabled(*args, **kwargs)
e811c8ce
RD
6629
6630 def SetFocus(*args, **kwargs):
15afbcd0 6631 """
a95a7133 6632 SetFocus(self)
15afbcd0
RD
6633
6634 Set's the focus to this window, allowing it to receive keyboard input.
6635 """
54f9ee45 6636 return _core_.Window_SetFocus(*args, **kwargs)
e811c8ce
RD
6637
6638 def SetFocusFromKbd(*args, **kwargs):
15afbcd0 6639 """
a95a7133 6640 SetFocusFromKbd(self)
15afbcd0
RD
6641
6642 Set focus to this window as the result of a keyboard action. Normally
6643 only called internally.
6644 """
54f9ee45 6645 return _core_.Window_SetFocusFromKbd(*args, **kwargs)
e811c8ce
RD
6646
6647 def FindFocus(*args, **kwargs):
15afbcd0 6648 """
66c033b4 6649 FindFocus() -> Window
15afbcd0
RD
6650
6651 Returns the window or control that currently has the keyboard focus,
6652 or None.
6653 """
54f9ee45 6654 return _core_.Window_FindFocus(*args, **kwargs)
e811c8ce
RD
6655
6656 FindFocus = staticmethod(FindFocus)
6657 def AcceptsFocus(*args, **kwargs):
15afbcd0 6658 """
a95a7133 6659 AcceptsFocus(self) -> bool
15afbcd0
RD
6660
6661 Can this window have focus?
6662 """
54f9ee45 6663 return _core_.Window_AcceptsFocus(*args, **kwargs)
e811c8ce
RD
6664
6665 def AcceptsFocusFromKeyboard(*args, **kwargs):
15afbcd0 6666 """
a95a7133 6667 AcceptsFocusFromKeyboard(self) -> bool
15afbcd0
RD
6668
6669 Can this window be given focus by keyboard navigation? if not, the
6670 only way to give it focus (provided it accepts it at all) is to click
6671 it.
6672 """
54f9ee45 6673 return _core_.Window_AcceptsFocusFromKeyboard(*args, **kwargs)
e811c8ce
RD
6674
6675 def GetDefaultItem(*args, **kwargs):
15afbcd0 6676 """
a95a7133 6677 GetDefaultItem(self) -> Window
15afbcd0
RD
6678
6679 Get the default child of this parent, i.e. the one which is activated
6680 by pressing <Enter> such as the OK button on a wx.Dialog.
6681 """
54f9ee45 6682 return _core_.Window_GetDefaultItem(*args, **kwargs)
e811c8ce
RD
6683
6684 def SetDefaultItem(*args, **kwargs):
15afbcd0 6685 """
a95a7133 6686 SetDefaultItem(self, Window child) -> Window
15afbcd0
RD
6687
6688 Set this child as default, return the old default.
6689 """
54f9ee45 6690 return _core_.Window_SetDefaultItem(*args, **kwargs)
e811c8ce
RD
6691
6692 def SetTmpDefaultItem(*args, **kwargs):
15afbcd0 6693 """
a95a7133 6694 SetTmpDefaultItem(self, Window win)
15afbcd0
RD
6695
6696 Set this child as temporary default
6697 """
54f9ee45 6698 return _core_.Window_SetTmpDefaultItem(*args, **kwargs)
e811c8ce 6699
908b74cd
RD
6700 def Navigate(*args, **kwargs):
6701 """
6702 Navigate(self, int flags=NavigationKeyEvent.IsForward) -> bool
6703
fd2dc343
RD
6704 Does keyboard navigation from this window to another, by sending a
6705 `wx.NavigationKeyEvent`.
908b74cd
RD
6706 """
6707 return _core_.Window_Navigate(*args, **kwargs)
6708
7f98d120
RD
6709 def MoveAfterInTabOrder(*args, **kwargs):
6710 """
6711 MoveAfterInTabOrder(self, Window win)
6712
6713 Moves this window in the tab navigation order after the specified
6714 sibling window. This means that when the user presses the TAB key on
6715 that other window, the focus switches to this window.
6716
6717 The default tab order is the same as creation order. This function
6718 and `MoveBeforeInTabOrder` allow to change it after creating all the
6719 windows.
6720
6721 """
6722 return _core_.Window_MoveAfterInTabOrder(*args, **kwargs)
6723
6724 def MoveBeforeInTabOrder(*args, **kwargs):
6725 """
6726 MoveBeforeInTabOrder(self, Window win)
6727
6728 Same as `MoveAfterInTabOrder` except that it inserts this window just
6729 before win instead of putting it right after it.
6730 """
6731 return _core_.Window_MoveBeforeInTabOrder(*args, **kwargs)
6732
e811c8ce 6733 def GetChildren(*args, **kwargs):
15afbcd0 6734 """
a95a7133 6735 GetChildren(self) -> PyObject
15afbcd0
RD
6736
6737 Returns a list of the window's children. NOTE: Currently this is a
6738 copy of the child window list maintained by the window, so the return
6739 value of this function is only valid as long as the window's children
6740 do not change.
6741 """
54f9ee45 6742 return _core_.Window_GetChildren(*args, **kwargs)
e811c8ce
RD
6743
6744 def GetParent(*args, **kwargs):
15afbcd0 6745 """
a95a7133 6746 GetParent(self) -> Window
15afbcd0
RD
6747
6748 Returns the parent window of this window, or None if there isn't one.
6749 """
54f9ee45 6750 return _core_.Window_GetParent(*args, **kwargs)
e811c8ce
RD
6751
6752 def GetGrandParent(*args, **kwargs):
15afbcd0 6753 """
a95a7133 6754 GetGrandParent(self) -> Window
15afbcd0 6755
41e2b43e
RD
6756 Returns the parent of the parent of this window, or None if there
6757 isn't one.
15afbcd0 6758 """
54f9ee45 6759 return _core_.Window_GetGrandParent(*args, **kwargs)
e811c8ce
RD
6760
6761 def IsTopLevel(*args, **kwargs):
15afbcd0 6762 """
a95a7133 6763 IsTopLevel(self) -> bool
15afbcd0
RD
6764
6765 Returns true if the given window is a top-level one. Currently all
6766 frames and dialogs are always considered to be top-level windows (even
6767 if they have a parent window).
6768 """
54f9ee45 6769 return _core_.Window_IsTopLevel(*args, **kwargs)
e811c8ce
RD
6770
6771 def Reparent(*args, **kwargs):
15afbcd0 6772 """
a95a7133 6773 Reparent(self, Window newParent) -> bool
15afbcd0
RD
6774
6775 Reparents the window, i.e the window will be removed from its current
6776 parent window (e.g. a non-standard toolbar in a wxFrame) and then
6777 re-inserted into another. Available on Windows and GTK. Returns True
6778 if the parent was changed, False otherwise (error or newParent ==
6779 oldParent)
6780 """
54f9ee45 6781 return _core_.Window_Reparent(*args, **kwargs)
e811c8ce
RD
6782
6783 def AddChild(*args, **kwargs):
15afbcd0 6784 """
a95a7133 6785 AddChild(self, Window child)
15afbcd0
RD
6786
6787 Adds a child window. This is called automatically by window creation
6788 functions so should not be required by the application programmer.
6789 """
54f9ee45 6790 return _core_.Window_AddChild(*args, **kwargs)
e811c8ce
RD
6791
6792 def RemoveChild(*args, **kwargs):
15afbcd0 6793 """
a95a7133 6794 RemoveChild(self, Window child)
15afbcd0
RD
6795
6796 Removes a child window. This is called automatically by window
6797 deletion functions so should not be required by the application
6798 programmer.
6799 """
54f9ee45 6800 return _core_.Window_RemoveChild(*args, **kwargs)
e811c8ce
RD
6801
6802 def FindWindowById(*args, **kwargs):
15afbcd0 6803 """
a95a7133 6804 FindWindowById(self, long winid) -> Window
15afbcd0
RD
6805
6806 Find a chld of this window by window ID
6807 """
54f9ee45 6808 return _core_.Window_FindWindowById(*args, **kwargs)
e811c8ce
RD
6809
6810 def FindWindowByName(*args, **kwargs):
15afbcd0 6811 """
a95a7133 6812 FindWindowByName(self, String name) -> Window
15afbcd0
RD
6813
6814 Find a child of this window by name
6815 """
54f9ee45 6816 return _core_.Window_FindWindowByName(*args, **kwargs)
e811c8ce
RD
6817
6818 def GetEventHandler(*args, **kwargs):
15afbcd0 6819 """
a95a7133 6820 GetEventHandler(self) -> EvtHandler
15afbcd0
RD
6821
6822 Returns the event handler for this window. By default, the window is
6823 its own event handler.
6824 """
54f9ee45 6825 return _core_.Window_GetEventHandler(*args, **kwargs)
e811c8ce
RD
6826
6827 def SetEventHandler(*args, **kwargs):
15afbcd0 6828 """
a95a7133 6829 SetEventHandler(self, EvtHandler handler)
15afbcd0
RD
6830
6831 Sets the event handler for this window. An event handler is an object
6832 that is capable of processing the events sent to a window. By default,
6833 the window is its own event handler, but an application may wish to
6834 substitute another, for example to allow central implementation of
6835 event-handling for a variety of different window classes.
6836
41e2b43e 6837 It is usually better to use `wx.Window.PushEventHandler` since this sets
15afbcd0
RD
6838 up a chain of event handlers, where an event not handled by one event
6839 handler is handed to the next one in the chain.
6840 """
54f9ee45 6841 return _core_.Window_SetEventHandler(*args, **kwargs)
e811c8ce
RD
6842
6843 def PushEventHandler(*args, **kwargs):
15afbcd0 6844 """
a95a7133 6845 PushEventHandler(self, EvtHandler handler)
15afbcd0
RD
6846
6847 Pushes this event handler onto the event handler stack for the window.
6848 An event handler is an object that is capable of processing the events
6849 sent to a window. By default, the window is its own event handler, but
6850 an application may wish to substitute another, for example to allow
6851 central implementation of event-handling for a variety of different
6852 window classes.
6853
6854 wx.Window.PushEventHandler allows an application to set up a chain of
6855 event handlers, where an event not handled by one event handler is
41e2b43e 6856 handed to the next one in the chain. Use `wx.Window.PopEventHandler` to
15afbcd0
RD
6857 remove the event handler.
6858 """
54f9ee45 6859 return _core_.Window_PushEventHandler(*args, **kwargs)
e811c8ce
RD
6860
6861 def PopEventHandler(*args, **kwargs):
15afbcd0 6862 """
a95a7133 6863 PopEventHandler(self, bool deleteHandler=False) -> EvtHandler
15afbcd0
RD
6864
6865 Removes and returns the top-most event handler on the event handler
6866 stack. If deleteHandler is True then the wx.EvtHandler object will be
6867 destroyed after it is popped.
6868 """
54f9ee45 6869 return _core_.Window_PopEventHandler(*args, **kwargs)
e811c8ce
RD
6870
6871 def RemoveEventHandler(*args, **kwargs):
15afbcd0 6872 """
a95a7133 6873 RemoveEventHandler(self, EvtHandler handler) -> bool
15afbcd0 6874
41e2b43e
RD
6875 Find the given handler in the event handler chain and remove (but not
6876 delete) it from the event handler chain, return True if it was found
6877 and False otherwise (this also results in an assert failure so this
6878 function should only be called when the handler is supposed to be
6879 there.)
15afbcd0 6880 """
54f9ee45 6881 return _core_.Window_RemoveEventHandler(*args, **kwargs)
e811c8ce
RD
6882
6883 def SetValidator(*args, **kwargs):
15afbcd0 6884 """
a95a7133 6885 SetValidator(self, Validator validator)
15afbcd0
RD
6886
6887 Deletes the current validator (if any) and sets the window validator,
6888 having called wx.Validator.Clone to create a new validator of this
6889 type.
6890 """
54f9ee45 6891 return _core_.Window_SetValidator(*args, **kwargs)
e811c8ce
RD
6892
6893 def GetValidator(*args, **kwargs):
15afbcd0 6894 """
a95a7133 6895 GetValidator(self) -> Validator
15afbcd0
RD
6896
6897 Returns a pointer to the current validator for the window, or None if
6898 there is none.
6899 """
54f9ee45 6900 return _core_.Window_GetValidator(*args, **kwargs)
e811c8ce 6901
74a57fcd
RD
6902 def Validate(*args, **kwargs):
6903 """
a95a7133 6904 Validate(self) -> bool
74a57fcd
RD
6905
6906 Validates the current values of the child controls using their
41e2b43e
RD
6907 validators. If the window has wx.WS_EX_VALIDATE_RECURSIVELY extra
6908 style flag set, the method will also call Validate() of all child
6909 windows. Returns false if any of the validations failed.
74a57fcd 6910 """
54f9ee45 6911 return _core_.Window_Validate(*args, **kwargs)
74a57fcd
RD
6912
6913 def TransferDataToWindow(*args, **kwargs):
6914 """
a95a7133 6915 TransferDataToWindow(self) -> bool
74a57fcd 6916
41e2b43e
RD
6917 Transfers values to child controls from data areas specified by their
6918 validators. If the window has wx.WS_EX_VALIDATE_RECURSIVELY extra
6919 style flag set, the method will also call TransferDataToWindow() of
6920 all child windows.
74a57fcd 6921 """
54f9ee45 6922 return _core_.Window_TransferDataToWindow(*args, **kwargs)
74a57fcd
RD
6923
6924 def TransferDataFromWindow(*args, **kwargs):
6925 """
a95a7133 6926 TransferDataFromWindow(self) -> bool
74a57fcd 6927
41e2b43e
RD
6928 Transfers values from child controls to data areas specified by their
6929 validators. Returns false if a transfer failed. If the window has
6930 wx.WS_EX_VALIDATE_RECURSIVELY extra style flag set, the method will
6931 also call TransferDataFromWindow() of all child windows.
74a57fcd 6932 """
54f9ee45 6933 return _core_.Window_TransferDataFromWindow(*args, **kwargs)
74a57fcd
RD
6934
6935 def InitDialog(*args, **kwargs):
6936 """
a95a7133 6937 InitDialog(self)
74a57fcd 6938
41e2b43e
RD
6939 Sends an EVT_INIT_DIALOG event, whose handler usually transfers data
6940 to the dialog via validators.
74a57fcd 6941 """
54f9ee45 6942 return _core_.Window_InitDialog(*args, **kwargs)
74a57fcd 6943
e811c8ce 6944 def SetAcceleratorTable(*args, **kwargs):
15afbcd0 6945 """
a95a7133 6946 SetAcceleratorTable(self, AcceleratorTable accel)
15afbcd0
RD
6947
6948 Sets the accelerator table for this window.
6949 """
54f9ee45 6950 return _core_.Window_SetAcceleratorTable(*args, **kwargs)
e811c8ce
RD
6951
6952 def GetAcceleratorTable(*args, **kwargs):
15afbcd0 6953 """
a95a7133 6954 GetAcceleratorTable(self) -> AcceleratorTable
15afbcd0
RD
6955
6956 Gets the accelerator table for this window.
6957 """
54f9ee45 6958 return _core_.Window_GetAcceleratorTable(*args, **kwargs)
e811c8ce
RD
6959
6960 def RegisterHotKey(*args, **kwargs):
15afbcd0 6961 """
a95a7133 6962 RegisterHotKey(self, int hotkeyId, int modifiers, int keycode) -> bool
15afbcd0
RD
6963
6964 Registers a system wide hotkey. Every time the user presses the hotkey
6965 registered here, this window will receive a hotkey event. It will
6966 receive the event even if the application is in the background and
6967 does not have the input focus because the user is working with some
6968 other application. To bind an event handler function to this hotkey
6969 use EVT_HOTKEY with an id equal to hotkeyId. Returns True if the
6970 hotkey was registered successfully.
6971 """
54f9ee45 6972 return _core_.Window_RegisterHotKey(*args, **kwargs)
e811c8ce
RD
6973
6974 def UnregisterHotKey(*args, **kwargs):
15afbcd0 6975 """
a95a7133 6976 UnregisterHotKey(self, int hotkeyId) -> bool
15afbcd0
RD
6977
6978 Unregisters a system wide hotkey.
6979 """
54f9ee45 6980 return _core_.Window_UnregisterHotKey(*args, **kwargs)
e811c8ce
RD
6981
6982 def ConvertDialogPointToPixels(*args, **kwargs):
15afbcd0 6983 """
a95a7133 6984 ConvertDialogPointToPixels(self, Point pt) -> Point
15afbcd0
RD
6985
6986 Converts a point or size from dialog units to pixels. Dialog units
6987 are used for maintaining a dialog's proportions even if the font
6988 changes. For the x dimension, the dialog units are multiplied by the
6989 average character width and then divided by 4. For the y dimension,
6990 the dialog units are multiplied by the average character height and
6991 then divided by 8.
6992 """
54f9ee45 6993 return _core_.Window_ConvertDialogPointToPixels(*args, **kwargs)
e811c8ce
RD
6994
6995 def ConvertDialogSizeToPixels(*args, **kwargs):
15afbcd0 6996 """
a95a7133 6997 ConvertDialogSizeToPixels(self, Size sz) -> Size
15afbcd0
RD
6998
6999 Converts a point or size from dialog units to pixels. Dialog units
7000 are used for maintaining a dialog's proportions even if the font
7001 changes. For the x dimension, the dialog units are multiplied by the
7002 average character width and then divided by 4. For the y dimension,
7003 the dialog units are multiplied by the average character height and
7004 then divided by 8.
7005 """
54f9ee45 7006 return _core_.Window_ConvertDialogSizeToPixels(*args, **kwargs)
e811c8ce
RD
7007
7008 def DLG_PNT(*args, **kwargs):
15afbcd0 7009 """
a95a7133 7010 DLG_PNT(self, Point pt) -> Point
15afbcd0
RD
7011
7012 Converts a point or size from dialog units to pixels. Dialog units
7013 are used for maintaining a dialog's proportions even if the font
7014 changes. For the x dimension, the dialog units are multiplied by the
7015 average character width and then divided by 4. For the y dimension,
7016 the dialog units are multiplied by the average character height and
7017 then divided by 8.
7018 """
54f9ee45 7019 return _core_.Window_DLG_PNT(*args, **kwargs)
e811c8ce
RD
7020
7021 def DLG_SZE(*args, **kwargs):
15afbcd0 7022 """
a95a7133 7023 DLG_SZE(self, Size sz) -> Size
15afbcd0
RD
7024
7025 Converts a point or size from dialog units to pixels. Dialog units
7026 are used for maintaining a dialog's proportions even if the font
7027 changes. For the x dimension, the dialog units are multiplied by the
7028 average character width and then divided by 4. For the y dimension,
7029 the dialog units are multiplied by the average character height and
7030 then divided by 8.
7031 """
54f9ee45 7032 return _core_.Window_DLG_SZE(*args, **kwargs)
e811c8ce
RD
7033
7034 def ConvertPixelPointToDialog(*args, **kwargs):
a95a7133 7035 """ConvertPixelPointToDialog(self, Point pt) -> Point"""
54f9ee45 7036 return _core_.Window_ConvertPixelPointToDialog(*args, **kwargs)
e811c8ce
RD
7037
7038 def ConvertPixelSizeToDialog(*args, **kwargs):
a95a7133 7039 """ConvertPixelSizeToDialog(self, Size sz) -> Size"""
54f9ee45 7040 return _core_.Window_ConvertPixelSizeToDialog(*args, **kwargs)
e811c8ce
RD
7041
7042 def WarpPointer(*args, **kwargs):
15afbcd0 7043 """
a95a7133 7044 WarpPointer(self, int x, int y)
15afbcd0
RD
7045
7046 Moves the pointer to the given position on the window.
7047
7048 NOTE: This function is not supported under Mac because Apple Human
7049 Interface Guidelines forbid moving the mouse cursor programmatically.
7050 """
54f9ee45 7051 return _core_.Window_WarpPointer(*args, **kwargs)
e811c8ce
RD
7052
7053 def CaptureMouse(*args, **kwargs):
15afbcd0 7054 """
a95a7133 7055 CaptureMouse(self)
15afbcd0
RD
7056
7057 Directs all mouse input to this window. Call wx.Window.ReleaseMouse to
7058 release the capture.
7059
7060 Note that wxWindows maintains the stack of windows having captured the
7061 mouse and when the mouse is released the capture returns to the window
7062 which had had captured it previously and it is only really released if
7063 there were no previous window. In particular, this means that you must
7064 release the mouse as many times as you capture it.
7065 """
54f9ee45 7066 return _core_.Window_CaptureMouse(*args, **kwargs)
e811c8ce
RD
7067
7068 def ReleaseMouse(*args, **kwargs):
15afbcd0 7069 """
a95a7133 7070 ReleaseMouse(self)
15afbcd0
RD
7071
7072 Releases mouse input captured with wx.Window.CaptureMouse.
7073 """
54f9ee45 7074 return _core_.Window_ReleaseMouse(*args, **kwargs)
e811c8ce
RD
7075
7076 def GetCapture(*args, **kwargs):
15afbcd0 7077 """
66c033b4 7078 GetCapture() -> Window
15afbcd0
RD
7079
7080 Returns the window which currently captures the mouse or None
7081 """
54f9ee45 7082 return _core_.Window_GetCapture(*args, **kwargs)
e811c8ce
RD
7083
7084 GetCapture = staticmethod(GetCapture)
7085 def HasCapture(*args, **kwargs):
15afbcd0 7086 """
a95a7133 7087 HasCapture(self) -> bool
15afbcd0
RD
7088
7089 Returns true if this window has the current mouse capture.
7090 """
54f9ee45 7091 return _core_.Window_HasCapture(*args, **kwargs)
e811c8ce
RD
7092
7093 def Refresh(*args, **kwargs):
15afbcd0 7094 """
a95a7133 7095 Refresh(self, bool eraseBackground=True, Rect rect=None)
15afbcd0
RD
7096
7097 Mark the specified rectangle (or the whole window) as "dirty" so it
7098 will be repainted. Causes an EVT_PAINT event to be generated and sent
7099 to the window.
7100 """
54f9ee45 7101 return _core_.Window_Refresh(*args, **kwargs)
e811c8ce
RD
7102
7103 def RefreshRect(*args, **kwargs):
15afbcd0 7104 """
a95a7133 7105 RefreshRect(self, Rect rect)
15afbcd0
RD
7106
7107 Redraws the contents of the given rectangle: the area inside it will
7108 be repainted. This is the same as Refresh but has a nicer syntax.
7109 """
54f9ee45 7110 return _core_.Window_RefreshRect(*args, **kwargs)
e811c8ce
RD
7111
7112 def Update(*args, **kwargs):
15afbcd0 7113 """
a95a7133 7114 Update(self)
15afbcd0
RD
7115
7116 Calling this method immediately repaints the invalidated area of the
7117 window instead of waiting for the EVT_PAINT event to happen, (normally
7118 this would usually only happen when the flow of control returns to the
7119 event loop.) Notice that this function doesn't refresh the window and
7120 does nothing if the window has been already repainted. Use Refresh
7121 first if you want to immediately redraw the window (or some portion of
7122 it) unconditionally.
7123 """
54f9ee45 7124 return _core_.Window_Update(*args, **kwargs)
e811c8ce
RD
7125
7126 def ClearBackground(*args, **kwargs):
15afbcd0 7127 """
a95a7133 7128 ClearBackground(self)
15afbcd0
RD
7129
7130 Clears the window by filling it with the current background
7131 colour. Does not cause an erase background event to be generated.
7132 """
54f9ee45 7133 return _core_.Window_ClearBackground(*args, **kwargs)
e811c8ce
RD
7134
7135 def Freeze(*args, **kwargs):
15afbcd0 7136 """
a95a7133 7137 Freeze(self)
15afbcd0 7138
41e2b43e
RD
7139 Freezes the window or, in other words, prevents any updates from
7140 taking place on screen, the window is not redrawn at all. Thaw must be
7141 called to reenable window redrawing. Calls to Freeze/Thaw may be
7142 nested, with the actual Thaw being delayed until all the nesting has
7143 been undone.
15afbcd0
RD
7144
7145 This method is useful for visual appearance optimization (for example,
7146 it is a good idea to use it before inserting large amount of text into
7147 a wxTextCtrl under wxGTK) but is not implemented on all platforms nor
7148 for all controls so it is mostly just a hint to wxWindows and not a
7149 mandatory directive.
7150 """
54f9ee45 7151 return _core_.Window_Freeze(*args, **kwargs)
e811c8ce
RD
7152
7153 def Thaw(*args, **kwargs):
15afbcd0 7154 """
a95a7133 7155 Thaw(self)
15afbcd0 7156
4276dc52 7157 Reenables window updating after a previous call to Freeze. Calls to
41e2b43e
RD
7158 Freeze/Thaw may be nested, so Thaw must be called the same number of
7159 times that Freeze was before the window will be updated.
15afbcd0 7160 """
54f9ee45 7161 return _core_.Window_Thaw(*args, **kwargs)
e811c8ce
RD
7162
7163 def PrepareDC(*args, **kwargs):
15afbcd0 7164 """
a95a7133 7165 PrepareDC(self, DC dc)
15afbcd0
RD
7166
7167 Call this function to prepare the device context for drawing a
7168 scrolled image. It sets the device origin according to the current
7169 scroll position.
7170 """
54f9ee45 7171 return _core_.Window_PrepareDC(*args, **kwargs)
e811c8ce
RD
7172
7173 def GetUpdateRegion(*args, **kwargs):
15afbcd0 7174 """
a95a7133 7175 GetUpdateRegion(self) -> Region
15afbcd0
RD
7176
7177 Returns the region specifying which parts of the window have been
7178 damaged. Should only be called within an EVT_PAINT handler.
7179 """
54f9ee45 7180 return _core_.Window_GetUpdateRegion(*args, **kwargs)
e811c8ce
RD
7181
7182 def GetUpdateClientRect(*args, **kwargs):
15afbcd0 7183 """
a95a7133 7184 GetUpdateClientRect(self) -> Rect
15afbcd0
RD
7185
7186 Get the update rectangle region bounding box in client coords.
7187 """
54f9ee45 7188 return _core_.Window_GetUpdateClientRect(*args, **kwargs)
e811c8ce
RD
7189
7190 def IsExposed(*args, **kwargs):
15afbcd0 7191 """
a95a7133 7192 IsExposed(self, int x, int y, int w=1, int h=1) -> bool
15afbcd0
RD
7193
7194 Returns true if the given point or rectangle area has been exposed
7195 since the last repaint. Call this in an paint event handler to
7196 optimize redrawing by only redrawing those areas, which have been
7197 exposed.
7198 """
54f9ee45 7199 return _core_.Window_IsExposed(*args, **kwargs)
e811c8ce
RD
7200
7201 def IsExposedPoint(*args, **kwargs):
15afbcd0 7202 """
a95a7133 7203 IsExposedPoint(self, Point pt) -> bool
15afbcd0
RD
7204
7205 Returns true if the given point or rectangle area has been exposed
7206 since the last repaint. Call this in an paint event handler to
7207 optimize redrawing by only redrawing those areas, which have been
7208 exposed.
7209 """
54f9ee45 7210 return _core_.Window_IsExposedPoint(*args, **kwargs)
e811c8ce 7211
4276dc52 7212 def IsExposedRect(*args, **kwargs):
15afbcd0 7213 """
a95a7133 7214 IsExposedRect(self, Rect rect) -> bool
15afbcd0
RD
7215
7216 Returns true if the given point or rectangle area has been exposed
7217 since the last repaint. Call this in an paint event handler to
7218 optimize redrawing by only redrawing those areas, which have been
7219 exposed.
7220 """
54f9ee45 7221 return _core_.Window_IsExposedRect(*args, **kwargs)
e811c8ce 7222
74a57fcd
RD
7223 def GetDefaultAttributes(*args, **kwargs):
7224 """
a95a7133 7225 GetDefaultAttributes(self) -> VisualAttributes
74a57fcd 7226
41e2b43e
RD
7227 Get the default attributes for an instance of this class. This is
7228 useful if you want to use the same font or colour in your own control
7229 as in a standard control -- which is a much better idea than hard
7230 coding specific colours or fonts which might look completely out of
db3e571a 7231 place on the user's system, especially if it uses themes.
74a57fcd 7232 """
54f9ee45 7233 return _core_.Window_GetDefaultAttributes(*args, **kwargs)
74a57fcd
RD
7234
7235 def GetClassDefaultAttributes(*args, **kwargs):
7236 """
66c033b4 7237 GetClassDefaultAttributes(int variant=WINDOW_VARIANT_NORMAL) -> VisualAttributes
74a57fcd 7238
41e2b43e
RD
7239 Get the default attributes for this class. This is useful if you want
7240 to use the same font or colour in your own control as in a standard
7241 control -- which is a much better idea than hard coding specific
db3e571a
RD
7242 colours or fonts which might look completely out of place on the
7243 user's system, especially if it uses themes.
74a57fcd
RD
7244
7245 The variant parameter is only relevant under Mac currently and is
41e2b43e 7246 ignore under other platforms. Under Mac, it will change the size of
db3e571a
RD
7247 the returned font. See `wx.Window.SetWindowVariant` for more about
7248 this.
74a57fcd 7249 """
54f9ee45 7250 return _core_.Window_GetClassDefaultAttributes(*args, **kwargs)
74a57fcd
RD
7251
7252 GetClassDefaultAttributes = staticmethod(GetClassDefaultAttributes)
e811c8ce 7253 def SetBackgroundColour(*args, **kwargs):
15afbcd0 7254 """
a95a7133 7255 SetBackgroundColour(self, Colour colour) -> bool
15afbcd0
RD
7256
7257 Sets the background colour of the window. Returns True if the colour
7258 was changed. The background colour is usually painted by the default
7259 EVT_ERASE_BACKGROUND event handler function under Windows and
f8167d6e
RD
7260 automatically under GTK. Using `wx.NullColour` will reset the window
7261 to the default background colour.
15afbcd0 7262
db3e571a 7263 Note that setting the background colour may not cause an immediate
f8167d6e 7264 refresh, so you may wish to call `ClearBackground` or `Refresh` after
15afbcd0
RD
7265 calling this function.
7266
f8167d6e
RD
7267 Using this function will disable attempts to use themes for this
7268 window, if the system supports them. Use with care since usually the
7269 themes represent the appearance chosen by the user to be used for all
7270 applications on the system.
15afbcd0 7271 """
54f9ee45 7272 return _core_.Window_SetBackgroundColour(*args, **kwargs)
e811c8ce 7273
412d302d
RD
7274 def SetOwnBackgroundColour(*args, **kwargs):
7275 """SetOwnBackgroundColour(self, Colour colour)"""
7276 return _core_.Window_SetOwnBackgroundColour(*args, **kwargs)
b2df227b 7277
e811c8ce 7278 def SetForegroundColour(*args, **kwargs):
15afbcd0 7279 """
a95a7133 7280 SetForegroundColour(self, Colour colour) -> bool
15afbcd0
RD
7281
7282 Sets the foreground colour of the window. Returns True is the colour
7283 was changed. The interpretation of foreground colour is dependent on
7284 the window class; it may be the text colour or other colour, or it may
7285 not be used at all.
7286 """
54f9ee45 7287 return _core_.Window_SetForegroundColour(*args, **kwargs)
e811c8ce 7288
fa47d7a7
VS
7289 def SetOwnForegroundColour(*args, **kwargs):
7290 """SetOwnForegroundColour(self, Colour colour)"""
7291 return _core_.Window_SetOwnForegroundColour(*args, **kwargs)
b2df227b 7292
e811c8ce 7293 def GetBackgroundColour(*args, **kwargs):
15afbcd0 7294 """
a95a7133 7295 GetBackgroundColour(self) -> Colour
15afbcd0
RD
7296
7297 Returns the background colour of the window.
7298 """
54f9ee45 7299 return _core_.Window_GetBackgroundColour(*args, **kwargs)
e811c8ce
RD
7300
7301 def GetForegroundColour(*args, **kwargs):
15afbcd0 7302 """
a95a7133 7303 GetForegroundColour(self) -> Colour
15afbcd0
RD
7304
7305 Returns the foreground colour of the window. The interpretation of
7306 foreground colour is dependent on the window class; it may be the text
7307 colour or other colour, or it may not be used at all.
7308 """
54f9ee45 7309 return _core_.Window_GetForegroundColour(*args, **kwargs)
e811c8ce 7310
7bc1e663
RD
7311 def SetBackgroundStyle(*args, **kwargs):
7312 """
7313 SetBackgroundStyle(self, int style) -> bool
7314
7315 Returns the background style of the window. The background style
7316 indicates how the background of the window is drawn.
7317
7318 ====================== ========================================
7319 wx.BG_STYLE_SYSTEM The background colour or pattern should
7320 be determined by the system
7321 wx.BG_STYLE_COLOUR The background should be a solid colour
7322 wx.BG_STYLE_CUSTOM The background will be implemented by the
7323 application.
7324 ====================== ========================================
7325
7326 On GTK+, use of wx.BG_STYLE_CUSTOM allows the flicker-free drawing of
7327 a custom background, such as a tiled bitmap. Currently the style has
7328 no effect on other platforms.
7329
7330 :see: `GetBackgroundStyle`, `SetBackgroundColour`
7331 """
7332 return _core_.Window_SetBackgroundStyle(*args, **kwargs)
7333
7334 def GetBackgroundStyle(*args, **kwargs):
7335 """
7336 GetBackgroundStyle(self) -> int
7337
7338 Returns the background style of the window.
7339
7340 :see: `SetBackgroundStyle`
7341 """
7342 return _core_.Window_GetBackgroundStyle(*args, **kwargs)
7343
e811c8ce 7344 def SetCursor(*args, **kwargs):
15afbcd0 7345 """
a95a7133 7346 SetCursor(self, Cursor cursor) -> bool
15afbcd0
RD
7347
7348 Sets the window's cursor. Notice that the window cursor also sets it
7349 for the children of the window implicitly.
7350
7351 The cursor may be wx.NullCursor in which case the window cursor will
7352 be reset back to default.
7353 """
54f9ee45 7354 return _core_.Window_SetCursor(*args, **kwargs)
e811c8ce
RD
7355
7356 def GetCursor(*args, **kwargs):
15afbcd0 7357 """
a95a7133 7358 GetCursor(self) -> Cursor
15afbcd0
RD
7359
7360 Return the cursor associated with this window.
7361 """
54f9ee45 7362 return _core_.Window_GetCursor(*args, **kwargs)
e811c8ce
RD
7363
7364 def SetFont(*args, **kwargs):
15afbcd0 7365 """
a95a7133 7366 SetFont(self, Font font) -> bool
15afbcd0
RD
7367
7368 Sets the font for this window.
7369 """
54f9ee45 7370 return _core_.Window_SetFont(*args, **kwargs)
e811c8ce 7371
fa47d7a7
VS
7372 def SetOwnFont(*args, **kwargs):
7373 """SetOwnFont(self, Font font)"""
7374 return _core_.Window_SetOwnFont(*args, **kwargs)
b2df227b 7375
e811c8ce 7376 def GetFont(*args, **kwargs):
15afbcd0 7377 """
a95a7133 7378 GetFont(self) -> Font
15afbcd0 7379
4276dc52 7380 Returns the default font used for this window.
15afbcd0 7381 """
54f9ee45 7382 return _core_.Window_GetFont(*args, **kwargs)
e811c8ce
RD
7383
7384 def SetCaret(*args, **kwargs):
15afbcd0 7385 """
a95a7133 7386 SetCaret(self, Caret caret)
15afbcd0
RD
7387
7388 Sets the caret associated with the window.
7389 """
54f9ee45 7390 return _core_.Window_SetCaret(*args, **kwargs)
e811c8ce
RD
7391
7392 def GetCaret(*args, **kwargs):
15afbcd0 7393 """
a95a7133 7394 GetCaret(self) -> Caret
15afbcd0
RD
7395
7396 Returns the caret associated with the window.
7397 """
54f9ee45 7398 return _core_.Window_GetCaret(*args, **kwargs)
e811c8ce
RD
7399
7400 def GetCharHeight(*args, **kwargs):
15afbcd0 7401 """
a95a7133 7402 GetCharHeight(self) -> int
15afbcd0
RD
7403
7404 Get the (average) character size for the current font.
7405 """
54f9ee45 7406 return _core_.Window_GetCharHeight(*args, **kwargs)
e811c8ce
RD
7407
7408 def GetCharWidth(*args, **kwargs):
15afbcd0 7409 """
a95a7133 7410 GetCharWidth(self) -> int
15afbcd0
RD
7411
7412 Get the (average) character size for the current font.
7413 """
54f9ee45 7414 return _core_.Window_GetCharWidth(*args, **kwargs)
e811c8ce
RD
7415
7416 def GetTextExtent(*args, **kwargs):
fd2dc343
RD
7417 """
7418 GetTextExtent(String string) -> (width, height)
7419
7420 Get the width and height of the text using the current font.
7421 """
54f9ee45 7422 return _core_.Window_GetTextExtent(*args, **kwargs)
e811c8ce
RD
7423
7424 def GetFullTextExtent(*args, **kwargs):
0df68c9f 7425 """
196addbf 7426 GetFullTextExtent(String string, Font font=None) ->
0df68c9f 7427 (width, height, descent, externalLeading)
e811c8ce 7428
15afbcd0
RD
7429 Get the width, height, decent and leading of the text using the
7430 current or specified font.
0df68c9f 7431 """
54f9ee45 7432 return _core_.Window_GetFullTextExtent(*args, **kwargs)
e811c8ce
RD
7433
7434 def ClientToScreenXY(*args, **kwargs):
15afbcd0
RD
7435 """
7436 ClientToScreenXY(int x, int y) -> (x,y)
7437
7438 Converts to screen coordinates from coordinates relative to this window.
7439 """
54f9ee45 7440 return _core_.Window_ClientToScreenXY(*args, **kwargs)
e811c8ce
RD
7441
7442 def ScreenToClientXY(*args, **kwargs):
15afbcd0
RD
7443 """
7444 ScreenToClientXY(int x, int y) -> (x,y)
7445
7446 Converts from screen to client window coordinates.
7447 """
54f9ee45 7448 return _core_.Window_ScreenToClientXY(*args, **kwargs)
e811c8ce
RD
7449
7450 def ClientToScreen(*args, **kwargs):
15afbcd0 7451 """
a95a7133 7452 ClientToScreen(self, Point pt) -> Point
15afbcd0
RD
7453
7454 Converts to screen coordinates from coordinates relative to this window.
7455 """
54f9ee45 7456 return _core_.Window_ClientToScreen(*args, **kwargs)
e811c8ce
RD
7457
7458 def ScreenToClient(*args, **kwargs):
15afbcd0 7459 """
a95a7133 7460 ScreenToClient(self, Point pt) -> Point
15afbcd0
RD
7461
7462 Converts from screen to client window coordinates.
7463 """
54f9ee45 7464 return _core_.Window_ScreenToClient(*args, **kwargs)
e811c8ce
RD
7465
7466 def HitTestXY(*args, **kwargs):
15afbcd0 7467 """
a95a7133 7468 HitTestXY(self, int x, int y) -> int
15afbcd0
RD
7469
7470 Test where the given (in client coords) point lies
7471 """
54f9ee45 7472 return _core_.Window_HitTestXY(*args, **kwargs)
e811c8ce
RD
7473
7474 def HitTest(*args, **kwargs):
15afbcd0 7475 """
a95a7133 7476 HitTest(self, Point pt) -> int
15afbcd0
RD
7477
7478 Test where the given (in client coords) point lies
7479 """
54f9ee45 7480 return _core_.Window_HitTest(*args, **kwargs)
e811c8ce 7481
15afbcd0
RD
7482 def GetBorder(*args):
7483 """
a95a7133
RD
7484 GetBorder(self, long flags) -> int
7485 GetBorder(self) -> int
e811c8ce 7486
15afbcd0
RD
7487 Get border for the flags of this window
7488 """
54f9ee45 7489 return _core_.Window_GetBorder(*args)
e811c8ce
RD
7490
7491 def UpdateWindowUI(*args, **kwargs):
15afbcd0 7492 """
a95a7133 7493 UpdateWindowUI(self, long flags=UPDATE_UI_NONE)
15afbcd0
RD
7494
7495 This function sends EVT_UPDATE_UI events to the window. The particular
7496 implementation depends on the window; for example a wx.ToolBar will
7497 send an update UI event for each toolbar button, and a wx.Frame will
7498 send an update UI event for each menubar menu item. You can call this
7499 function from your application to ensure that your UI is up-to-date at
7500 a particular point in time (as far as your EVT_UPDATE_UI handlers are
7501 concerned). This may be necessary if you have called
7502 wx.UpdateUIEvent.SetMode or wx.UpdateUIEvent.SetUpdateInterval to
7503 limit the overhead that wxWindows incurs by sending update UI events
7504 in idle time.
15afbcd0 7505 """
54f9ee45 7506 return _core_.Window_UpdateWindowUI(*args, **kwargs)
e811c8ce
RD
7507
7508 def PopupMenuXY(*args, **kwargs):
15afbcd0 7509 """
b0503257 7510 PopupMenuXY(self, Menu menu, int x=-1, int y=-1) -> bool
15afbcd0 7511
b0503257
RD
7512 Pops up the given menu at the specified coordinates, relative to this window,
7513 and returns control when the user has dismissed the menu. If a menu item is
7514 selected, the corresponding menu event is generated and will be processed as
7515 usual. If the default position is given then the current position of the
7516 mouse cursor will be used.
15afbcd0 7517 """
54f9ee45 7518 return _core_.Window_PopupMenuXY(*args, **kwargs)
e811c8ce 7519
15afbcd0
RD
7520 def PopupMenu(*args, **kwargs):
7521 """
b0503257 7522 PopupMenu(self, Menu menu, Point pos=DefaultPosition) -> bool
15afbcd0 7523
b0503257
RD
7524 Pops up the given menu at the specified coordinates, relative to this window,
7525 and returns control when the user has dismissed the menu. If a menu item is
7526 selected, the corresponding menu event is generated and will be processed as
7527 usual. If the default position is given then the current position of the
7528 mouse cursor will be used.
15afbcd0 7529 """
54f9ee45 7530 return _core_.Window_PopupMenu(*args, **kwargs)
15afbcd0
RD
7531
7532 def GetHandle(*args, **kwargs):
7533 """
a95a7133 7534 GetHandle(self) -> long
15afbcd0
RD
7535
7536 Returns the platform-specific handle (as a long integer) of the
7537 physical window. Currently on wxMac it returns the handle of the
7538 toplevel parent of the window.
7539 """
54f9ee45 7540 return _core_.Window_GetHandle(*args, **kwargs)
15afbcd0 7541
7e63a440
RD
7542 def AssociateHandle(*args, **kwargs):
7543 """
7544 AssociateHandle(self, long handle)
7545
7546 Associate the window with a new native handle
7547 """
7548 return _core_.Window_AssociateHandle(*args, **kwargs)
7549
7550 def DissociateHandle(*args, **kwargs):
7551 """
7552 DissociateHandle(self)
7553
7554 Dissociate the current native handle from the window
7555 """
7556 return _core_.Window_DissociateHandle(*args, **kwargs)
7557
15afbcd0
RD
7558 def HasScrollbar(*args, **kwargs):
7559 """
a95a7133 7560 HasScrollbar(self, int orient) -> bool
15afbcd0
RD
7561
7562 Does the window have the scrollbar for this orientation?
7563 """
54f9ee45 7564 return _core_.Window_HasScrollbar(*args, **kwargs)
15afbcd0
RD
7565
7566 def SetScrollbar(*args, **kwargs):
7567 """
41e2b43e 7568 SetScrollbar(self, int orientation, int position, int thumbSize, int range,
15afbcd0
RD
7569 bool refresh=True)
7570
7571 Sets the scrollbar properties of a built-in scrollbar.
15afbcd0 7572 """
54f9ee45 7573 return _core_.Window_SetScrollbar(*args, **kwargs)
e811c8ce
RD
7574
7575 def SetScrollPos(*args, **kwargs):
15afbcd0 7576 """
a95a7133 7577 SetScrollPos(self, int orientation, int pos, bool refresh=True)
15afbcd0
RD
7578
7579 Sets the position of one of the built-in scrollbars.
7580 """
54f9ee45 7581 return _core_.Window_SetScrollPos(*args, **kwargs)
e811c8ce
RD
7582
7583 def GetScrollPos(*args, **kwargs):
15afbcd0 7584 """
a95a7133 7585 GetScrollPos(self, int orientation) -> int
15afbcd0
RD
7586
7587 Returns the built-in scrollbar position.
7588 """
54f9ee45 7589 return _core_.Window_GetScrollPos(*args, **kwargs)
e811c8ce
RD
7590
7591 def GetScrollThumb(*args, **kwargs):
15afbcd0 7592 """
a95a7133 7593 GetScrollThumb(self, int orientation) -> int
15afbcd0
RD
7594
7595 Returns the built-in scrollbar thumb size.
7596 """
54f9ee45 7597 return _core_.Window_GetScrollThumb(*args, **kwargs)
e811c8ce
RD
7598
7599 def GetScrollRange(*args, **kwargs):
15afbcd0 7600 """
a95a7133 7601 GetScrollRange(self, int orientation) -> int
15afbcd0
RD
7602
7603 Returns the built-in scrollbar range.
7604 """
54f9ee45 7605 return _core_.Window_GetScrollRange(*args, **kwargs)
e811c8ce
RD
7606
7607 def ScrollWindow(*args, **kwargs):
15afbcd0 7608 """
a95a7133 7609 ScrollWindow(self, int dx, int dy, Rect rect=None)
15afbcd0
RD
7610
7611 Physically scrolls the pixels in the window and move child windows
7612 accordingly. Use this function to optimise your scrolling
7613 implementations, to minimise the area that must be redrawn. Note that
7614 it is rarely required to call this function from a user program.
15afbcd0 7615 """
54f9ee45 7616 return _core_.Window_ScrollWindow(*args, **kwargs)
e811c8ce
RD
7617
7618 def ScrollLines(*args, **kwargs):
15afbcd0 7619 """
a95a7133 7620 ScrollLines(self, int lines) -> bool
15afbcd0
RD
7621
7622 If the platform and window class supports it, scrolls the window by
7623 the given number of lines down, if lines is positive, or up if lines
7624 is negative. Returns True if the window was scrolled, False if it was
7625 already on top/bottom and nothing was done.
7626 """
54f9ee45 7627 return _core_.Window_ScrollLines(*args, **kwargs)
e811c8ce
RD
7628
7629 def ScrollPages(*args, **kwargs):
15afbcd0 7630 """
a95a7133 7631 ScrollPages(self, int pages) -> bool
15afbcd0 7632
41e2b43e 7633 If the platform and window class supports it, scrolls the window by
15afbcd0
RD
7634 the given number of pages down, if pages is positive, or up if pages
7635 is negative. Returns True if the window was scrolled, False if it was
7636 already on top/bottom and nothing was done.
7637 """
54f9ee45 7638 return _core_.Window_ScrollPages(*args, **kwargs)
e811c8ce
RD
7639
7640 def LineUp(*args, **kwargs):
15afbcd0 7641 """
a95a7133 7642 LineUp(self) -> bool
15afbcd0
RD
7643
7644 This is just a wrapper for ScrollLines(-1).
7645 """
54f9ee45 7646 return _core_.Window_LineUp(*args, **kwargs)
e811c8ce
RD
7647
7648 def LineDown(*args, **kwargs):
15afbcd0 7649 """
a95a7133 7650 LineDown(self) -> bool
15afbcd0
RD
7651
7652 This is just a wrapper for ScrollLines(1).
7653 """
54f9ee45 7654 return _core_.Window_LineDown(*args, **kwargs)
e811c8ce
RD
7655
7656 def PageUp(*args, **kwargs):
15afbcd0 7657 """
a95a7133 7658 PageUp(self) -> bool
15afbcd0
RD
7659
7660 This is just a wrapper for ScrollPages(-1).
7661 """
54f9ee45 7662 return _core_.Window_PageUp(*args, **kwargs)
e811c8ce
RD
7663
7664 def PageDown(*args, **kwargs):
15afbcd0 7665 """
a95a7133 7666 PageDown(self) -> bool
15afbcd0
RD
7667
7668 This is just a wrapper for ScrollPages(1).
7669 """
54f9ee45 7670 return _core_.Window_PageDown(*args, **kwargs)
e811c8ce
RD
7671
7672 def SetHelpText(*args, **kwargs):
15afbcd0 7673 """
a95a7133 7674 SetHelpText(self, String text)
15afbcd0
RD
7675
7676 Sets the help text to be used as context-sensitive help for this
7677 window. Note that the text is actually stored by the current
7678 wxHelpProvider implementation, and not in the window object itself.
7679 """
54f9ee45 7680 return _core_.Window_SetHelpText(*args, **kwargs)
e811c8ce
RD
7681
7682 def SetHelpTextForId(*args, **kwargs):
15afbcd0 7683 """
a95a7133 7684 SetHelpTextForId(self, String text)
15afbcd0
RD
7685
7686 Associate this help text with all windows with the same id as this
7687 one.
7688 """
54f9ee45 7689 return _core_.Window_SetHelpTextForId(*args, **kwargs)
e811c8ce
RD
7690
7691 def GetHelpText(*args, **kwargs):
15afbcd0 7692 """
a95a7133 7693 GetHelpText(self) -> String
15afbcd0
RD
7694
7695 Gets the help text to be used as context-sensitive help for this
7696 window. Note that the text is actually stored by the current
7697 wxHelpProvider implementation, and not in the window object itself.
7698 """
54f9ee45 7699 return _core_.Window_GetHelpText(*args, **kwargs)
e811c8ce
RD
7700
7701 def SetToolTipString(*args, **kwargs):
15afbcd0 7702 """
a95a7133 7703 SetToolTipString(self, String tip)
15afbcd0
RD
7704
7705 Attach a tooltip to the window.
7706 """
54f9ee45 7707 return _core_.Window_SetToolTipString(*args, **kwargs)
e811c8ce
RD
7708
7709 def SetToolTip(*args, **kwargs):
15afbcd0 7710 """
a95a7133 7711 SetToolTip(self, ToolTip tip)
15afbcd0
RD
7712
7713 Attach a tooltip to the window.
7714 """
54f9ee45 7715 return _core_.Window_SetToolTip(*args, **kwargs)
e811c8ce
RD
7716
7717 def GetToolTip(*args, **kwargs):
15afbcd0 7718 """
a95a7133 7719 GetToolTip(self) -> ToolTip
15afbcd0
RD
7720
7721 get the associated tooltip or None if none
7722 """
54f9ee45 7723 return _core_.Window_GetToolTip(*args, **kwargs)
e811c8ce
RD
7724
7725 def SetDropTarget(*args, **kwargs):
15afbcd0 7726 """
a95a7133 7727 SetDropTarget(self, DropTarget dropTarget)
15afbcd0
RD
7728
7729 Associates a drop target with this window. If the window already has
7730 a drop target, it is deleted.
7731 """
54f9ee45 7732 return _core_.Window_SetDropTarget(*args, **kwargs)
e811c8ce
RD
7733
7734 def GetDropTarget(*args, **kwargs):
15afbcd0 7735 """
a95a7133 7736 GetDropTarget(self) -> DropTarget
15afbcd0
RD
7737
7738 Returns the associated drop target, which may be None.
7739 """
54f9ee45 7740 return _core_.Window_GetDropTarget(*args, **kwargs)
e811c8ce
RD
7741
7742 def SetConstraints(*args, **kwargs):
15afbcd0 7743 """
a95a7133 7744 SetConstraints(self, LayoutConstraints constraints)
15afbcd0
RD
7745
7746 Sets the window to have the given layout constraints. If an existing
7747 layout constraints object is already owned by the window, it will be
7748 deleted. Pass None to disassociate and delete the window's current
7749 constraints.
7750
7751 You must call SetAutoLayout to tell a window to use the constraints
7752 automatically in its default EVT_SIZE handler; otherwise, you must
7753 handle EVT_SIZE yourself and call Layout() explicitly. When setting
7754 both a wx.LayoutConstraints and a wx.Sizer, only the sizer will have
7755 effect.
7756 """
54f9ee45 7757 return _core_.Window_SetConstraints(*args, **kwargs)
e811c8ce
RD
7758
7759 def GetConstraints(*args, **kwargs):
15afbcd0 7760 """
a95a7133 7761 GetConstraints(self) -> LayoutConstraints
15afbcd0
RD
7762
7763 Returns a pointer to the window's layout constraints, or None if there
7764 are none.
7765 """
54f9ee45 7766 return _core_.Window_GetConstraints(*args, **kwargs)
e811c8ce
RD
7767
7768 def SetAutoLayout(*args, **kwargs):
15afbcd0 7769 """
a95a7133 7770 SetAutoLayout(self, bool autoLayout)
15afbcd0
RD
7771
7772 Determines whether the Layout function will be called automatically
7773 when the window is resized. It is called implicitly by SetSizer but
7774 if you use SetConstraints you should call it manually or otherwise the
7775 window layout won't be correctly updated when its size changes.
7776 """
54f9ee45 7777 return _core_.Window_SetAutoLayout(*args, **kwargs)
e811c8ce
RD
7778
7779 def GetAutoLayout(*args, **kwargs):
15afbcd0 7780 """
a95a7133 7781 GetAutoLayout(self) -> bool
15afbcd0
RD
7782
7783 Returns the current autoLayout setting
7784 """
54f9ee45 7785 return _core_.Window_GetAutoLayout(*args, **kwargs)
e811c8ce
RD
7786
7787 def Layout(*args, **kwargs):
15afbcd0 7788 """
a95a7133 7789 Layout(self) -> bool
15afbcd0
RD
7790
7791 Invokes the constraint-based layout algorithm or the sizer-based
7792 algorithm for this window. See SetAutoLayout: when auto layout is on,
7793 this function gets called automatically by the default EVT_SIZE
7794 handler when the window is resized.
7795 """
54f9ee45 7796 return _core_.Window_Layout(*args, **kwargs)
e811c8ce
RD
7797
7798 def SetSizer(*args, **kwargs):
15afbcd0 7799 """
a95a7133 7800 SetSizer(self, Sizer sizer, bool deleteOld=True)
15afbcd0
RD
7801
7802 Sets the window to have the given layout sizer. The window will then
7803 own the object, and will take care of its deletion. If an existing
7804 layout sizer object is already owned by the window, it will be deleted
7805 if the deleteOld parameter is true. Note that this function will also
7806 call SetAutoLayout implicitly with a True parameter if the sizer is
ae8162c8 7807 non-None, and False otherwise.
15afbcd0 7808 """
54f9ee45 7809 return _core_.Window_SetSizer(*args, **kwargs)
e811c8ce
RD
7810
7811 def SetSizerAndFit(*args, **kwargs):
15afbcd0 7812 """
a95a7133 7813 SetSizerAndFit(self, Sizer sizer, bool deleteOld=True)
15afbcd0
RD
7814
7815 The same as SetSizer, except it also sets the size hints for the
7816 window based on the sizer's minimum size.
7817 """
54f9ee45 7818 return _core_.Window_SetSizerAndFit(*args, **kwargs)
e811c8ce
RD
7819
7820 def GetSizer(*args, **kwargs):
15afbcd0 7821 """
a95a7133 7822 GetSizer(self) -> Sizer
15afbcd0
RD
7823
7824 Return the sizer associated with the window by a previous call to
7825 SetSizer or None if there isn't one.
7826 """
54f9ee45 7827 return _core_.Window_GetSizer(*args, **kwargs)
e811c8ce
RD
7828
7829 def SetContainingSizer(*args, **kwargs):
15afbcd0 7830 """
a95a7133 7831 SetContainingSizer(self, Sizer sizer)
15afbcd0
RD
7832
7833 This normally does not need to be called by application code. It is
7834 called internally when a window is added to a sizer, and is used so
7835 the window can remove itself from the sizer when it is destroyed.
7836 """
54f9ee45 7837 return _core_.Window_SetContainingSizer(*args, **kwargs)
e811c8ce
RD
7838
7839 def GetContainingSizer(*args, **kwargs):
15afbcd0 7840 """
a95a7133 7841 GetContainingSizer(self) -> Sizer
15afbcd0
RD
7842
7843 Return the sizer that this window is a member of, if any, otherwise None.
7844 """
54f9ee45 7845 return _core_.Window_GetContainingSizer(*args, **kwargs)
e811c8ce 7846
a95a7133
RD
7847 def InheritAttributes(*args, **kwargs):
7848 """
7849 InheritAttributes(self)
7850
41e2b43e
RD
7851 This function is (or should be, in case of custom controls) called
7852 during window creation to intelligently set up the window visual
7853 attributes, that is the font and the foreground and background
7854 colours.
7855
7856 By 'intelligently' the following is meant: by default, all windows use
7857 their own default attributes. However if some of the parent's
7858 attributes are explicitly changed (that is, using SetFont and not
fa47d7a7 7859 SetOwnFont) and if the corresponding attribute hadn't been
41e2b43e
RD
7860 explicitly set for this window itself, then this window takes the same
7861 value as used by the parent. In addition, if the window overrides
7862 ShouldInheritColours to return false, the colours will not be changed
7863 no matter what and only the font might.
7864
34621cc5 7865 This rather complicated logic is necessary in order to accommodate the
ec9b55ca 7866 different usage scenarios. The most common one is when all default
41e2b43e
RD
7867 attributes are used and in this case, nothing should be inherited as
7868 in modern GUIs different controls use different fonts (and colours)
7869 than their siblings so they can't inherit the same value from the
7870 parent. However it was also deemed desirable to allow to simply change
7871 the attributes of all children at once by just changing the font or
7872 colour of their common parent, hence in this case we do inherit the
7873 parents attributes.
7874
a95a7133 7875 """
54f9ee45 7876 return _core_.Window_InheritAttributes(*args, **kwargs)
a95a7133
RD
7877
7878 def ShouldInheritColours(*args, **kwargs):
7879 """
7880 ShouldInheritColours(self) -> bool
7881
7882 Return true from here to allow the colours of this window to be
41e2b43e
RD
7883 changed by InheritAttributes, returning false forbids inheriting them
7884 from the parent window.
a95a7133 7885
41e2b43e
RD
7886 The base class version returns false, but this method is overridden in
7887 wxControl where it returns true.
a95a7133 7888 """
54f9ee45 7889 return _core_.Window_ShouldInheritColours(*args, **kwargs)
a95a7133 7890
e811c8ce 7891 def PostCreate(self, pre):
15afbcd0
RD
7892 """
7893 Phase 3 of the 2-phase create <wink!>
7894 Call this method after precreating the window with the 2-phase create method.
7895 """
e811c8ce
RD
7896 self.this = pre.this
7897 self.thisown = pre.thisown
7898 pre.thisown = 0
7899 if hasattr(self, '_setOORInfo'):
7900 self._setOORInfo(self)
7901 if hasattr(self, '_setCallbackInfo'):
7902 self._setCallbackInfo(self, self.__class__)
7903
7904
7905class WindowPtr(Window):
7906 def __init__(self, this):
7907 self.this = this
7908 if not hasattr(self,"thisown"): self.thisown = 0
7909 self.__class__ = Window
54f9ee45 7910_core_.Window_swigregister(WindowPtr)
e811c8ce
RD
7911
7912def PreWindow(*args, **kwargs):
15afbcd0
RD
7913 """
7914 PreWindow() -> Window
7915
7916 Precreate a Window for 2-phase creation.
7917 """
54f9ee45 7918 val = _core_.new_PreWindow(*args, **kwargs)
e811c8ce
RD
7919 val.thisown = 1
7920 return val
7921
7922def Window_NewControlId(*args, **kwargs):
15afbcd0
RD
7923 """
7924 Window_NewControlId() -> int
7925
7926 Generate a control id for the controls which were not given one.
7927 """
54f9ee45 7928 return _core_.Window_NewControlId(*args, **kwargs)
e811c8ce
RD
7929
7930def Window_NextControlId(*args, **kwargs):
15afbcd0
RD
7931 """
7932 Window_NextControlId(int winid) -> int
7933
7934 Get the id of the control following the one with the given
41e2b43e 7935 autogenerated) id
15afbcd0 7936 """
54f9ee45 7937 return _core_.Window_NextControlId(*args, **kwargs)
e811c8ce
RD
7938
7939def Window_PrevControlId(*args, **kwargs):
15afbcd0
RD
7940 """
7941 Window_PrevControlId(int winid) -> int
7942
7943 Get the id of the control preceding the one with the given
41e2b43e 7944 autogenerated) id
15afbcd0 7945 """
54f9ee45 7946 return _core_.Window_PrevControlId(*args, **kwargs)
e811c8ce
RD
7947
7948def Window_FindFocus(*args, **kwargs):
15afbcd0
RD
7949 """
7950 Window_FindFocus() -> Window
7951
7952 Returns the window or control that currently has the keyboard focus,
7953 or None.
7954 """
54f9ee45 7955 return _core_.Window_FindFocus(*args, **kwargs)
e811c8ce
RD
7956
7957def Window_GetCapture(*args, **kwargs):
15afbcd0
RD
7958 """
7959 Window_GetCapture() -> Window
7960
7961 Returns the window which currently captures the mouse or None
7962 """
54f9ee45 7963 return _core_.Window_GetCapture(*args, **kwargs)
e811c8ce 7964
74a57fcd
RD
7965def Window_GetClassDefaultAttributes(*args, **kwargs):
7966 """
7967 Window_GetClassDefaultAttributes(int variant=WINDOW_VARIANT_NORMAL) -> VisualAttributes
7968
41e2b43e
RD
7969 Get the default attributes for this class. This is useful if you want
7970 to use the same font or colour in your own control as in a standard
7971 control -- which is a much better idea than hard coding specific
db3e571a
RD
7972 colours or fonts which might look completely out of place on the
7973 user's system, especially if it uses themes.
74a57fcd
RD
7974
7975 The variant parameter is only relevant under Mac currently and is
41e2b43e 7976 ignore under other platforms. Under Mac, it will change the size of
db3e571a
RD
7977 the returned font. See `wx.Window.SetWindowVariant` for more about
7978 this.
74a57fcd 7979 """
54f9ee45 7980 return _core_.Window_GetClassDefaultAttributes(*args, **kwargs)
74a57fcd 7981
e811c8ce 7982def DLG_PNT(win, point_or_x, y=None):
15afbcd0
RD
7983 """
7984 Convenience function for converting a Point or (x,y) in
7985 dialog units to pixel units.
7986 """
e811c8ce
RD
7987 if y is None:
7988 return win.ConvertDialogPointToPixels(point_or_x)
7989 else:
fd3f2efe 7990 return win.ConvertDialogPointToPixels(wx.Point(point_or_x, y))
e811c8ce
RD
7991
7992def DLG_SZE(win, size_width, height=None):
15afbcd0
RD
7993 """
7994 Convenience function for converting a Size or (w,h) in
7995 dialog units to pixel units.
7996 """
e811c8ce
RD
7997 if height is None:
7998 return win.ConvertDialogSizeToPixels(size_width)
7999 else:
fd3f2efe 8000 return win.ConvertDialogSizeToPixels(wx.Size(size_width, height))
e811c8ce
RD
8001
8002
8003def FindWindowById(*args, **kwargs):
15afbcd0
RD
8004 """
8005 FindWindowById(long id, Window parent=None) -> Window
8006
8007 Find the first window in the application with the given id. If parent
8008 is None, the search will start from all top-level frames and dialog
8009 boxes; if non-None, the search will be limited to the given window
8010 hierarchy. The search is recursive in both cases.
8011 """
54f9ee45 8012 return _core_.FindWindowById(*args, **kwargs)
e811c8ce
RD
8013
8014def FindWindowByName(*args, **kwargs):
15afbcd0
RD
8015 """
8016 FindWindowByName(String name, Window parent=None) -> Window
8017
8018 Find a window by its name (as given in a window constructor or Create
8019 function call). If parent is None, the search will start from all
8020 top-level frames and dialog boxes; if non-None, the search will be
8021 limited to the given window hierarchy. The search is recursive in both
8022 cases.
8023
8024 If no window with such name is found, wx.FindWindowByLabel is called.
8025 """
54f9ee45 8026 return _core_.FindWindowByName(*args, **kwargs)
e811c8ce
RD
8027
8028def FindWindowByLabel(*args, **kwargs):
15afbcd0
RD
8029 """
8030 FindWindowByLabel(String label, Window parent=None) -> Window
8031
8032 Find a window by its label. Depending on the type of window, the label
8033 may be a window title or panel item label. If parent is None, the
8034 search will start from all top-level frames and dialog boxes; if
8035 non-None, the search will be limited to the given window
8036 hierarchy. The search is recursive in both cases.
8037 """
54f9ee45 8038 return _core_.FindWindowByLabel(*args, **kwargs)
e811c8ce
RD
8039
8040def Window_FromHWND(*args, **kwargs):
4276dc52 8041 """Window_FromHWND(Window parent, unsigned long _hWnd) -> Window"""
54f9ee45 8042 return _core_.Window_FromHWND(*args, **kwargs)
e811c8ce
RD
8043#---------------------------------------------------------------------------
8044
8045class Validator(EvtHandler):
093d3ff1 8046 """Proxy of C++ Validator class"""
e811c8ce
RD
8047 def __repr__(self):
8048 return "<%s.%s; proxy of C++ wxValidator instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
8049 def __init__(self, *args, **kwargs):
a95a7133 8050 """__init__(self) -> Validator"""
54f9ee45 8051 newobj = _core_.new_Validator(*args, **kwargs)
d14a1e28
RD
8052 self.this = newobj.this
8053 self.thisown = 1
8054 del newobj.thisown
8055 self._setOORInfo(self)
e811c8ce
RD
8056
8057 def Clone(*args, **kwargs):
a95a7133 8058 """Clone(self) -> Validator"""
54f9ee45 8059 return _core_.Validator_Clone(*args, **kwargs)
e811c8ce
RD
8060
8061 def Validate(*args, **kwargs):
a95a7133 8062 """Validate(self, Window parent) -> bool"""
54f9ee45 8063 return _core_.Validator_Validate(*args, **kwargs)
e811c8ce
RD
8064
8065 def TransferToWindow(*args, **kwargs):
a95a7133 8066 """TransferToWindow(self) -> bool"""
54f9ee45 8067 return _core_.Validator_TransferToWindow(*args, **kwargs)
e811c8ce
RD
8068
8069 def TransferFromWindow(*args, **kwargs):
a95a7133 8070 """TransferFromWindow(self) -> bool"""
54f9ee45 8071 return _core_.Validator_TransferFromWindow(*args, **kwargs)
e811c8ce
RD
8072
8073 def GetWindow(*args, **kwargs):
a95a7133 8074 """GetWindow(self) -> Window"""
54f9ee45 8075 return _core_.Validator_GetWindow(*args, **kwargs)
e811c8ce
RD
8076
8077 def SetWindow(*args, **kwargs):
a95a7133 8078 """SetWindow(self, Window window)"""
54f9ee45 8079 return _core_.Validator_SetWindow(*args, **kwargs)
e811c8ce
RD
8080
8081 def IsSilent(*args, **kwargs):
66c033b4 8082 """IsSilent() -> bool"""
54f9ee45 8083 return _core_.Validator_IsSilent(*args, **kwargs)
e811c8ce
RD
8084
8085 IsSilent = staticmethod(IsSilent)
8086 def SetBellOnError(*args, **kwargs):
66c033b4 8087 """SetBellOnError(int doIt=True)"""
54f9ee45 8088 return _core_.Validator_SetBellOnError(*args, **kwargs)
e811c8ce
RD
8089
8090 SetBellOnError = staticmethod(SetBellOnError)
8091
8092class ValidatorPtr(Validator):
8093 def __init__(self, this):
8094 self.this = this
8095 if not hasattr(self,"thisown"): self.thisown = 0
8096 self.__class__ = Validator
54f9ee45 8097_core_.Validator_swigregister(ValidatorPtr)
e811c8ce
RD
8098
8099def Validator_IsSilent(*args, **kwargs):
8100 """Validator_IsSilent() -> bool"""
54f9ee45 8101 return _core_.Validator_IsSilent(*args, **kwargs)
e811c8ce
RD
8102
8103def Validator_SetBellOnError(*args, **kwargs):
8104 """Validator_SetBellOnError(int doIt=True)"""
54f9ee45 8105 return _core_.Validator_SetBellOnError(*args, **kwargs)
e811c8ce
RD
8106
8107class PyValidator(Validator):
093d3ff1 8108 """Proxy of C++ PyValidator class"""
e811c8ce
RD
8109 def __repr__(self):
8110 return "<%s.%s; proxy of C++ wxPyValidator instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
8111 def __init__(self, *args, **kwargs):
a95a7133 8112 """__init__(self) -> PyValidator"""
54f9ee45 8113 newobj = _core_.new_PyValidator(*args, **kwargs)
e811c8ce
RD
8114 self.this = newobj.this
8115 self.thisown = 1
8116 del newobj.thisown
8117
8118 self._setCallbackInfo(self, PyValidator, 1)
8119 self._setOORInfo(self)
8120
8121 def _setCallbackInfo(*args, **kwargs):
a95a7133 8122 """_setCallbackInfo(self, PyObject self, PyObject _class, int incref=True)"""
54f9ee45 8123 return _core_.PyValidator__setCallbackInfo(*args, **kwargs)
e811c8ce
RD
8124
8125
8126class PyValidatorPtr(PyValidator):
8127 def __init__(self, this):
8128 self.this = this
8129 if not hasattr(self,"thisown"): self.thisown = 0
8130 self.__class__ = PyValidator
54f9ee45 8131_core_.PyValidator_swigregister(PyValidatorPtr)
e811c8ce
RD
8132
8133#---------------------------------------------------------------------------
8134
8135class Menu(EvtHandler):
093d3ff1 8136 """Proxy of C++ Menu class"""
d14a1e28
RD
8137 def __repr__(self):
8138 return "<%s.%s; proxy of C++ wxMenu instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
e811c8ce 8139 def __init__(self, *args, **kwargs):
a95a7133 8140 """__init__(self, String title=EmptyString, long style=0) -> Menu"""
54f9ee45 8141 newobj = _core_.new_Menu(*args, **kwargs)
e811c8ce
RD
8142 self.this = newobj.this
8143 self.thisown = 1
8144 del newobj.thisown
8145 self._setOORInfo(self)
8146
8147 def Append(*args, **kwargs):
a95a7133 8148 """Append(self, int id, String text, String help=EmptyString, int kind=ITEM_NORMAL) -> MenuItem"""
54f9ee45 8149 return _core_.Menu_Append(*args, **kwargs)
e811c8ce
RD
8150
8151 def AppendSeparator(*args, **kwargs):
a95a7133 8152 """AppendSeparator(self) -> MenuItem"""
54f9ee45 8153 return _core_.Menu_AppendSeparator(*args, **kwargs)
e811c8ce
RD
8154
8155 def AppendCheckItem(*args, **kwargs):
a95a7133 8156 """AppendCheckItem(self, int id, String text, String help=EmptyString) -> MenuItem"""
54f9ee45 8157 return _core_.Menu_AppendCheckItem(*args, **kwargs)
e811c8ce
RD
8158
8159 def AppendRadioItem(*args, **kwargs):
a95a7133 8160 """AppendRadioItem(self, int id, String text, String help=EmptyString) -> MenuItem"""
54f9ee45 8161 return _core_.Menu_AppendRadioItem(*args, **kwargs)
e811c8ce
RD
8162
8163 def AppendMenu(*args, **kwargs):
a95a7133 8164 """AppendMenu(self, int id, String text, Menu submenu, String help=EmptyString) -> MenuItem"""
54f9ee45 8165 return _core_.Menu_AppendMenu(*args, **kwargs)
e811c8ce
RD
8166
8167 def AppendItem(*args, **kwargs):
a95a7133 8168 """AppendItem(self, MenuItem item) -> MenuItem"""
54f9ee45 8169 return _core_.Menu_AppendItem(*args, **kwargs)
e811c8ce
RD
8170
8171 def Break(*args, **kwargs):
a95a7133 8172 """Break(self)"""
54f9ee45 8173 return _core_.Menu_Break(*args, **kwargs)
e811c8ce
RD
8174
8175 def InsertItem(*args, **kwargs):
a95a7133 8176 """InsertItem(self, size_t pos, MenuItem item) -> MenuItem"""
54f9ee45 8177 return _core_.Menu_InsertItem(*args, **kwargs)
e811c8ce
RD
8178
8179 def Insert(*args, **kwargs):
0df68c9f 8180 """
a95a7133 8181 Insert(self, size_t pos, int id, String text, String help=EmptyString,
a41e16b6 8182 int kind=ITEM_NORMAL) -> MenuItem
0df68c9f 8183 """
54f9ee45 8184 return _core_.Menu_Insert(*args, **kwargs)
e811c8ce
RD
8185
8186 def InsertSeparator(*args, **kwargs):
a95a7133 8187 """InsertSeparator(self, size_t pos) -> MenuItem"""
54f9ee45 8188 return _core_.Menu_InsertSeparator(*args, **kwargs)
e811c8ce
RD
8189
8190 def InsertCheckItem(*args, **kwargs):
a95a7133 8191 """InsertCheckItem(self, size_t pos, int id, String text, String help=EmptyString) -> MenuItem"""
54f9ee45 8192 return _core_.Menu_InsertCheckItem(*args, **kwargs)
e811c8ce
RD
8193
8194 def InsertRadioItem(*args, **kwargs):
a95a7133 8195 """InsertRadioItem(self, size_t pos, int id, String text, String help=EmptyString) -> MenuItem"""
54f9ee45 8196 return _core_.Menu_InsertRadioItem(*args, **kwargs)
e811c8ce
RD
8197
8198 def InsertMenu(*args, **kwargs):
a95a7133 8199 """InsertMenu(self, size_t pos, int id, String text, Menu submenu, String help=EmptyString) -> MenuItem"""
54f9ee45 8200 return _core_.Menu_InsertMenu(*args, **kwargs)
e811c8ce
RD
8201
8202 def PrependItem(*args, **kwargs):
a95a7133 8203 """PrependItem(self, MenuItem item) -> MenuItem"""
54f9ee45 8204 return _core_.Menu_PrependItem(*args, **kwargs)
e811c8ce
RD
8205
8206 def Prepend(*args, **kwargs):
a95a7133 8207 """Prepend(self, int id, String text, String help=EmptyString, int kind=ITEM_NORMAL) -> MenuItem"""
54f9ee45 8208 return _core_.Menu_Prepend(*args, **kwargs)
e811c8ce
RD
8209
8210 def PrependSeparator(*args, **kwargs):
a95a7133 8211 """PrependSeparator(self) -> MenuItem"""
54f9ee45 8212 return _core_.Menu_PrependSeparator(*args, **kwargs)
e811c8ce
RD
8213
8214 def PrependCheckItem(*args, **kwargs):
a95a7133 8215 """PrependCheckItem(self, int id, String text, String help=EmptyString) -> MenuItem"""
54f9ee45 8216 return _core_.Menu_PrependCheckItem(*args, **kwargs)
e811c8ce
RD
8217
8218 def PrependRadioItem(*args, **kwargs):
a95a7133 8219 """PrependRadioItem(self, int id, String text, String help=EmptyString) -> MenuItem"""
54f9ee45 8220 return _core_.Menu_PrependRadioItem(*args, **kwargs)
e811c8ce
RD
8221
8222 def PrependMenu(*args, **kwargs):
a95a7133 8223 """PrependMenu(self, int id, String text, Menu submenu, String help=EmptyString) -> MenuItem"""
54f9ee45 8224 return _core_.Menu_PrependMenu(*args, **kwargs)
e811c8ce
RD
8225
8226 def Remove(*args, **kwargs):
a95a7133 8227 """Remove(self, int id) -> MenuItem"""
54f9ee45 8228 return _core_.Menu_Remove(*args, **kwargs)
e811c8ce
RD
8229
8230 def RemoveItem(*args, **kwargs):
a95a7133 8231 """RemoveItem(self, MenuItem item) -> MenuItem"""
54f9ee45 8232 return _core_.Menu_RemoveItem(*args, **kwargs)
e811c8ce
RD
8233
8234 def Delete(*args, **kwargs):
a95a7133 8235 """Delete(self, int id) -> bool"""
54f9ee45 8236 return _core_.Menu_Delete(*args, **kwargs)
e811c8ce
RD
8237
8238 def DeleteItem(*args, **kwargs):
a95a7133 8239 """DeleteItem(self, MenuItem item) -> bool"""
54f9ee45 8240 return _core_.Menu_DeleteItem(*args, **kwargs)
e811c8ce
RD
8241
8242 def Destroy(*args, **kwargs):
0df68c9f 8243 """
a95a7133 8244 Destroy(self)
e811c8ce 8245
0df68c9f
RD
8246 Deletes the C++ object this Python object is a proxy for.
8247 """
54f9ee45 8248 return _core_.Menu_Destroy(*args, **kwargs)
e811c8ce
RD
8249
8250 def DestroyId(*args, **kwargs):
0df68c9f 8251 """
a95a7133 8252 DestroyId(self, int id) -> bool
e811c8ce 8253
0df68c9f
RD
8254 Deletes the C++ object this Python object is a proxy for.
8255 """
54f9ee45 8256 return _core_.Menu_DestroyId(*args, **kwargs)
e811c8ce
RD
8257
8258 def DestroyItem(*args, **kwargs):
0df68c9f 8259 """
a95a7133 8260 DestroyItem(self, MenuItem item) -> bool
e811c8ce 8261
0df68c9f
RD
8262 Deletes the C++ object this Python object is a proxy for.
8263 """
54f9ee45 8264 return _core_.Menu_DestroyItem(*args, **kwargs)
e811c8ce
RD
8265
8266 def GetMenuItemCount(*args, **kwargs):
a95a7133 8267 """GetMenuItemCount(self) -> size_t"""
54f9ee45 8268 return _core_.Menu_GetMenuItemCount(*args, **kwargs)
e811c8ce
RD
8269
8270 def GetMenuItems(*args, **kwargs):
a95a7133 8271 """GetMenuItems(self) -> PyObject"""
54f9ee45 8272 return _core_.Menu_GetMenuItems(*args, **kwargs)
e811c8ce
RD
8273
8274 def FindItem(*args, **kwargs):
a95a7133 8275 """FindItem(self, String item) -> int"""
54f9ee45 8276 return _core_.Menu_FindItem(*args, **kwargs)
e811c8ce
RD
8277
8278 def FindItemById(*args, **kwargs):
a95a7133 8279 """FindItemById(self, int id) -> MenuItem"""
54f9ee45 8280 return _core_.Menu_FindItemById(*args, **kwargs)
e811c8ce
RD
8281
8282 def FindItemByPosition(*args, **kwargs):
a95a7133 8283 """FindItemByPosition(self, size_t position) -> MenuItem"""
54f9ee45 8284 return _core_.Menu_FindItemByPosition(*args, **kwargs)
e811c8ce
RD
8285
8286 def Enable(*args, **kwargs):
a95a7133 8287 """Enable(self, int id, bool enable)"""
54f9ee45 8288 return _core_.Menu_Enable(*args, **kwargs)
e811c8ce
RD
8289
8290 def IsEnabled(*args, **kwargs):
a95a7133 8291 """IsEnabled(self, int id) -> bool"""
54f9ee45 8292 return _core_.Menu_IsEnabled(*args, **kwargs)
e811c8ce
RD
8293
8294 def Check(*args, **kwargs):
a95a7133 8295 """Check(self, int id, bool check)"""
54f9ee45 8296 return _core_.Menu_Check(*args, **kwargs)
e811c8ce
RD
8297
8298 def IsChecked(*args, **kwargs):
a95a7133 8299 """IsChecked(self, int id) -> bool"""
54f9ee45 8300 return _core_.Menu_IsChecked(*args, **kwargs)
e811c8ce
RD
8301
8302 def SetLabel(*args, **kwargs):
a95a7133 8303 """SetLabel(self, int id, String label)"""
54f9ee45 8304 return _core_.Menu_SetLabel(*args, **kwargs)
e811c8ce
RD
8305
8306 def GetLabel(*args, **kwargs):
a95a7133 8307 """GetLabel(self, int id) -> String"""
54f9ee45 8308 return _core_.Menu_GetLabel(*args, **kwargs)
e811c8ce
RD
8309
8310 def SetHelpString(*args, **kwargs):
a95a7133 8311 """SetHelpString(self, int id, String helpString)"""
54f9ee45 8312 return _core_.Menu_SetHelpString(*args, **kwargs)
e811c8ce
RD
8313
8314 def GetHelpString(*args, **kwargs):
a95a7133 8315 """GetHelpString(self, int id) -> String"""
54f9ee45 8316 return _core_.Menu_GetHelpString(*args, **kwargs)
e811c8ce
RD
8317
8318 def SetTitle(*args, **kwargs):
a95a7133 8319 """SetTitle(self, String title)"""
54f9ee45 8320 return _core_.Menu_SetTitle(*args, **kwargs)
e811c8ce
RD
8321
8322 def GetTitle(*args, **kwargs):
a95a7133 8323 """GetTitle(self) -> String"""
54f9ee45 8324 return _core_.Menu_GetTitle(*args, **kwargs)
e811c8ce
RD
8325
8326 def SetEventHandler(*args, **kwargs):
a95a7133 8327 """SetEventHandler(self, EvtHandler handler)"""
54f9ee45 8328 return _core_.Menu_SetEventHandler(*args, **kwargs)
e811c8ce
RD
8329
8330 def GetEventHandler(*args, **kwargs):
a95a7133 8331 """GetEventHandler(self) -> EvtHandler"""
54f9ee45 8332 return _core_.Menu_GetEventHandler(*args, **kwargs)
e811c8ce
RD
8333
8334 def SetInvokingWindow(*args, **kwargs):
a95a7133 8335 """SetInvokingWindow(self, Window win)"""
54f9ee45 8336 return _core_.Menu_SetInvokingWindow(*args, **kwargs)
e811c8ce
RD
8337
8338 def GetInvokingWindow(*args, **kwargs):
a95a7133 8339 """GetInvokingWindow(self) -> Window"""
54f9ee45 8340 return _core_.Menu_GetInvokingWindow(*args, **kwargs)
e811c8ce
RD
8341
8342 def GetStyle(*args, **kwargs):
a95a7133 8343 """GetStyle(self) -> long"""
54f9ee45 8344 return _core_.Menu_GetStyle(*args, **kwargs)
e811c8ce
RD
8345
8346 def UpdateUI(*args, **kwargs):
a95a7133 8347 """UpdateUI(self, EvtHandler source=None)"""
54f9ee45 8348 return _core_.Menu_UpdateUI(*args, **kwargs)
e811c8ce
RD
8349
8350 def GetMenuBar(*args, **kwargs):
a95a7133 8351 """GetMenuBar(self) -> MenuBar"""
54f9ee45 8352 return _core_.Menu_GetMenuBar(*args, **kwargs)
e811c8ce
RD
8353
8354 def Attach(*args, **kwargs):
a95a7133 8355 """Attach(self, wxMenuBarBase menubar)"""
54f9ee45 8356 return _core_.Menu_Attach(*args, **kwargs)
e811c8ce
RD
8357
8358 def Detach(*args, **kwargs):
a95a7133 8359 """Detach(self)"""
54f9ee45 8360 return _core_.Menu_Detach(*args, **kwargs)
e811c8ce
RD
8361
8362 def IsAttached(*args, **kwargs):
a95a7133 8363 """IsAttached(self) -> bool"""
54f9ee45 8364 return _core_.Menu_IsAttached(*args, **kwargs)
e811c8ce
RD
8365
8366 def SetParent(*args, **kwargs):
a95a7133 8367 """SetParent(self, Menu parent)"""
54f9ee45 8368 return _core_.Menu_SetParent(*args, **kwargs)
e811c8ce
RD
8369
8370 def GetParent(*args, **kwargs):
a95a7133 8371 """GetParent(self) -> Menu"""
54f9ee45 8372 return _core_.Menu_GetParent(*args, **kwargs)
e811c8ce 8373
d14a1e28
RD
8374
8375class MenuPtr(Menu):
8376 def __init__(self, this):
8377 self.this = this
8378 if not hasattr(self,"thisown"): self.thisown = 0
8379 self.__class__ = Menu
54f9ee45 8380_core_.Menu_swigregister(MenuPtr)
d14a1e28
RD
8381DefaultValidator = cvar.DefaultValidator
8382
8383#---------------------------------------------------------------------------
8384
8385class MenuBar(Window):
093d3ff1 8386 """Proxy of C++ MenuBar class"""
e811c8ce
RD
8387 def __repr__(self):
8388 return "<%s.%s; proxy of C++ wxMenuBar instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 8389 def __init__(self, *args, **kwargs):
a95a7133 8390 """__init__(self, long style=0) -> MenuBar"""
54f9ee45 8391 newobj = _core_.new_MenuBar(*args, **kwargs)
d14a1e28
RD
8392 self.this = newobj.this
8393 self.thisown = 1
8394 del newobj.thisown
8395 self._setOORInfo(self)
e811c8ce
RD
8396
8397 def Append(*args, **kwargs):
a95a7133 8398 """Append(self, Menu menu, String title) -> bool"""
54f9ee45 8399 return _core_.MenuBar_Append(*args, **kwargs)
e811c8ce
RD
8400
8401 def Insert(*args, **kwargs):
a95a7133 8402 """Insert(self, size_t pos, Menu menu, String title) -> bool"""
54f9ee45 8403 return _core_.MenuBar_Insert(*args, **kwargs)
e811c8ce
RD
8404
8405 def GetMenuCount(*args, **kwargs):
a95a7133 8406 """GetMenuCount(self) -> size_t"""
54f9ee45 8407 return _core_.MenuBar_GetMenuCount(*args, **kwargs)
e811c8ce
RD
8408
8409 def GetMenu(*args, **kwargs):
a95a7133 8410 """GetMenu(self, size_t pos) -> Menu"""
54f9ee45 8411 return _core_.MenuBar_GetMenu(*args, **kwargs)
e811c8ce
RD
8412
8413 def Replace(*args, **kwargs):
a95a7133 8414 """Replace(self, size_t pos, Menu menu, String title) -> Menu"""
54f9ee45 8415 return _core_.MenuBar_Replace(*args, **kwargs)
e811c8ce
RD
8416
8417 def Remove(*args, **kwargs):
a95a7133 8418 """Remove(self, size_t pos) -> Menu"""
54f9ee45 8419 return _core_.MenuBar_Remove(*args, **kwargs)
e811c8ce
RD
8420
8421 def EnableTop(*args, **kwargs):
a95a7133 8422 """EnableTop(self, size_t pos, bool enable)"""
54f9ee45 8423 return _core_.MenuBar_EnableTop(*args, **kwargs)
e811c8ce
RD
8424
8425 def IsEnabledTop(*args, **kwargs):
a95a7133 8426 """IsEnabledTop(self, size_t pos) -> bool"""
54f9ee45 8427 return _core_.MenuBar_IsEnabledTop(*args, **kwargs)
e811c8ce
RD
8428
8429 def SetLabelTop(*args, **kwargs):
a95a7133 8430 """SetLabelTop(self, size_t pos, String label)"""
54f9ee45 8431 return _core_.MenuBar_SetLabelTop(*args, **kwargs)
e811c8ce
RD
8432
8433 def GetLabelTop(*args, **kwargs):
a95a7133 8434 """GetLabelTop(self, size_t pos) -> String"""
54f9ee45 8435 return _core_.MenuBar_GetLabelTop(*args, **kwargs)
e811c8ce
RD
8436
8437 def FindMenuItem(*args, **kwargs):
a95a7133 8438 """FindMenuItem(self, String menu, String item) -> int"""
54f9ee45 8439 return _core_.MenuBar_FindMenuItem(*args, **kwargs)
e811c8ce
RD
8440
8441 def FindItemById(*args, **kwargs):
a95a7133 8442 """FindItemById(self, int id) -> MenuItem"""
54f9ee45 8443 return _core_.MenuBar_FindItemById(*args, **kwargs)
e811c8ce
RD
8444
8445 def FindMenu(*args, **kwargs):
a95a7133 8446 """FindMenu(self, String title) -> int"""
54f9ee45 8447 return _core_.MenuBar_FindMenu(*args, **kwargs)
e811c8ce
RD
8448
8449 def Enable(*args, **kwargs):
a95a7133 8450 """Enable(self, int id, bool enable)"""
54f9ee45 8451 return _core_.MenuBar_Enable(*args, **kwargs)
e811c8ce
RD
8452
8453 def Check(*args, **kwargs):
a95a7133 8454 """Check(self, int id, bool check)"""
54f9ee45 8455 return _core_.MenuBar_Check(*args, **kwargs)
e811c8ce
RD
8456
8457 def IsChecked(*args, **kwargs):
a95a7133 8458 """IsChecked(self, int id) -> bool"""
54f9ee45 8459 return _core_.MenuBar_IsChecked(*args, **kwargs)
e811c8ce
RD
8460
8461 def IsEnabled(*args, **kwargs):
a95a7133 8462 """IsEnabled(self, int id) -> bool"""
54f9ee45 8463 return _core_.MenuBar_IsEnabled(*args, **kwargs)
e811c8ce
RD
8464
8465 def SetLabel(*args, **kwargs):
a95a7133 8466 """SetLabel(self, int id, String label)"""
54f9ee45 8467 return _core_.MenuBar_SetLabel(*args, **kwargs)
e811c8ce
RD
8468
8469 def GetLabel(*args, **kwargs):
a95a7133 8470 """GetLabel(self, int id) -> String"""
54f9ee45 8471 return _core_.MenuBar_GetLabel(*args, **kwargs)
e811c8ce
RD
8472
8473 def SetHelpString(*args, **kwargs):
a95a7133 8474 """SetHelpString(self, int id, String helpString)"""
54f9ee45 8475 return _core_.MenuBar_SetHelpString(*args, **kwargs)
e811c8ce
RD
8476
8477 def GetHelpString(*args, **kwargs):
a95a7133 8478 """GetHelpString(self, int id) -> String"""
54f9ee45 8479 return _core_.MenuBar_GetHelpString(*args, **kwargs)
e811c8ce
RD
8480
8481 def GetFrame(*args, **kwargs):
a95a7133 8482 """GetFrame(self) -> wxFrame"""
54f9ee45 8483 return _core_.MenuBar_GetFrame(*args, **kwargs)
e811c8ce
RD
8484
8485 def IsAttached(*args, **kwargs):
a95a7133 8486 """IsAttached(self) -> bool"""
54f9ee45 8487 return _core_.MenuBar_IsAttached(*args, **kwargs)
e811c8ce
RD
8488
8489 def Attach(*args, **kwargs):
a95a7133 8490 """Attach(self, wxFrame frame)"""
54f9ee45 8491 return _core_.MenuBar_Attach(*args, **kwargs)
e811c8ce
RD
8492
8493 def Detach(*args, **kwargs):
a95a7133 8494 """Detach(self)"""
54f9ee45 8495 return _core_.MenuBar_Detach(*args, **kwargs)
e811c8ce 8496
d14a1e28
RD
8497
8498class MenuBarPtr(MenuBar):
8499 def __init__(self, this):
8500 self.this = this
8501 if not hasattr(self,"thisown"): self.thisown = 0
8502 self.__class__ = MenuBar
54f9ee45 8503_core_.MenuBar_swigregister(MenuBarPtr)
d14a1e28
RD
8504
8505#---------------------------------------------------------------------------
8506
8507class MenuItem(Object):
093d3ff1 8508 """Proxy of C++ MenuItem class"""
e811c8ce
RD
8509 def __repr__(self):
8510 return "<%s.%s; proxy of C++ wxMenuItem instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 8511 def __init__(self, *args, **kwargs):
0df68c9f 8512 """
a95a7133 8513 __init__(self, Menu parentMenu=None, int id=ID_ANY, String text=EmptyString,
196addbf
RD
8514 String help=EmptyString, int kind=ITEM_NORMAL,
8515 Menu subMenu=None) -> MenuItem
0df68c9f 8516 """
54f9ee45 8517 newobj = _core_.new_MenuItem(*args, **kwargs)
d14a1e28
RD
8518 self.this = newobj.this
8519 self.thisown = 1
8520 del newobj.thisown
e811c8ce 8521 def GetMenu(*args, **kwargs):
a95a7133 8522 """GetMenu(self) -> Menu"""
54f9ee45 8523 return _core_.MenuItem_GetMenu(*args, **kwargs)
e811c8ce
RD
8524
8525 def SetMenu(*args, **kwargs):
a95a7133 8526 """SetMenu(self, Menu menu)"""
54f9ee45 8527 return _core_.MenuItem_SetMenu(*args, **kwargs)
e811c8ce
RD
8528
8529 def SetId(*args, **kwargs):
a95a7133 8530 """SetId(self, int id)"""
54f9ee45 8531 return _core_.MenuItem_SetId(*args, **kwargs)
e811c8ce
RD
8532
8533 def GetId(*args, **kwargs):
a95a7133 8534 """GetId(self) -> int"""
54f9ee45 8535 return _core_.MenuItem_GetId(*args, **kwargs)
e811c8ce
RD
8536
8537 def IsSeparator(*args, **kwargs):
a95a7133 8538 """IsSeparator(self) -> bool"""
54f9ee45 8539 return _core_.MenuItem_IsSeparator(*args, **kwargs)
e811c8ce
RD
8540
8541 def SetText(*args, **kwargs):
a95a7133 8542 """SetText(self, String str)"""
54f9ee45 8543 return _core_.MenuItem_SetText(*args, **kwargs)
e811c8ce
RD
8544
8545 def GetLabel(*args, **kwargs):
a95a7133 8546 """GetLabel(self) -> String"""
54f9ee45 8547 return _core_.MenuItem_GetLabel(*args, **kwargs)
e811c8ce
RD
8548
8549 def GetText(*args, **kwargs):
a95a7133 8550 """GetText(self) -> String"""
54f9ee45 8551 return _core_.MenuItem_GetText(*args, **kwargs)
e811c8ce
RD
8552
8553 def GetLabelFromText(*args, **kwargs):
66c033b4 8554 """GetLabelFromText(String text) -> String"""
54f9ee45 8555 return _core_.MenuItem_GetLabelFromText(*args, **kwargs)
e811c8ce
RD
8556
8557 GetLabelFromText = staticmethod(GetLabelFromText)
8558 def GetKind(*args, **kwargs):
a95a7133 8559 """GetKind(self) -> int"""
54f9ee45 8560 return _core_.MenuItem_GetKind(*args, **kwargs)
e811c8ce 8561
a95a7133
RD
8562 def SetKind(*args, **kwargs):
8563 """SetKind(self, int kind)"""
54f9ee45 8564 return _core_.MenuItem_SetKind(*args, **kwargs)
a95a7133 8565
e811c8ce 8566 def SetCheckable(*args, **kwargs):
a95a7133 8567 """SetCheckable(self, bool checkable)"""
54f9ee45 8568 return _core_.MenuItem_SetCheckable(*args, **kwargs)
e811c8ce
RD
8569
8570 def IsCheckable(*args, **kwargs):
a95a7133 8571 """IsCheckable(self) -> bool"""
54f9ee45 8572 return _core_.MenuItem_IsCheckable(*args, **kwargs)
e811c8ce
RD
8573
8574 def IsSubMenu(*args, **kwargs):
a95a7133 8575 """IsSubMenu(self) -> bool"""
54f9ee45 8576 return _core_.MenuItem_IsSubMenu(*args, **kwargs)
e811c8ce
RD
8577
8578 def SetSubMenu(*args, **kwargs):
a95a7133 8579 """SetSubMenu(self, Menu menu)"""
54f9ee45 8580 return _core_.MenuItem_SetSubMenu(*args, **kwargs)
e811c8ce
RD
8581
8582 def GetSubMenu(*args, **kwargs):
a95a7133 8583 """GetSubMenu(self) -> Menu"""
54f9ee45 8584 return _core_.MenuItem_GetSubMenu(*args, **kwargs)
e811c8ce
RD
8585
8586 def Enable(*args, **kwargs):
a95a7133 8587 """Enable(self, bool enable=True)"""
54f9ee45 8588 return _core_.MenuItem_Enable(*args, **kwargs)
e811c8ce
RD
8589
8590 def IsEnabled(*args, **kwargs):
a95a7133 8591 """IsEnabled(self) -> bool"""
54f9ee45 8592 return _core_.MenuItem_IsEnabled(*args, **kwargs)
e811c8ce
RD
8593
8594 def Check(*args, **kwargs):
a95a7133 8595 """Check(self, bool check=True)"""
54f9ee45 8596 return _core_.MenuItem_Check(*args, **kwargs)
e811c8ce
RD
8597
8598 def IsChecked(*args, **kwargs):
a95a7133 8599 """IsChecked(self) -> bool"""
54f9ee45 8600 return _core_.MenuItem_IsChecked(*args, **kwargs)
e811c8ce
RD
8601
8602 def Toggle(*args, **kwargs):
a95a7133 8603 """Toggle(self)"""
54f9ee45 8604 return _core_.MenuItem_Toggle(*args, **kwargs)
e811c8ce
RD
8605
8606 def SetHelp(*args, **kwargs):
a95a7133 8607 """SetHelp(self, String str)"""
54f9ee45 8608 return _core_.MenuItem_SetHelp(*args, **kwargs)
e811c8ce
RD
8609
8610 def GetHelp(*args, **kwargs):
a95a7133 8611 """GetHelp(self) -> String"""
54f9ee45 8612 return _core_.MenuItem_GetHelp(*args, **kwargs)
e811c8ce
RD
8613
8614 def GetAccel(*args, **kwargs):
a95a7133 8615 """GetAccel(self) -> AcceleratorEntry"""
54f9ee45 8616 return _core_.MenuItem_GetAccel(*args, **kwargs)
e811c8ce
RD
8617
8618 def SetAccel(*args, **kwargs):
a95a7133 8619 """SetAccel(self, AcceleratorEntry accel)"""
54f9ee45 8620 return _core_.MenuItem_SetAccel(*args, **kwargs)
e811c8ce
RD
8621
8622 def GetDefaultMarginWidth(*args, **kwargs):
66c033b4 8623 """GetDefaultMarginWidth() -> int"""
54f9ee45 8624 return _core_.MenuItem_GetDefaultMarginWidth(*args, **kwargs)
e811c8ce
RD
8625
8626 GetDefaultMarginWidth = staticmethod(GetDefaultMarginWidth)
8627 def SetBitmap(*args, **kwargs):
a95a7133 8628 """SetBitmap(self, Bitmap bitmap)"""
54f9ee45 8629 return _core_.MenuItem_SetBitmap(*args, **kwargs)
e811c8ce
RD
8630
8631 def GetBitmap(*args, **kwargs):
a95a7133 8632 """GetBitmap(self) -> Bitmap"""
54f9ee45 8633 return _core_.MenuItem_GetBitmap(*args, **kwargs)
e811c8ce 8634
d14a1e28
RD
8635
8636class MenuItemPtr(MenuItem):
8637 def __init__(self, this):
8638 self.this = this
8639 if not hasattr(self,"thisown"): self.thisown = 0
8640 self.__class__ = MenuItem
54f9ee45 8641_core_.MenuItem_swigregister(MenuItemPtr)
d14a1e28 8642
e811c8ce 8643def MenuItem_GetLabelFromText(*args, **kwargs):
196addbf 8644 """MenuItem_GetLabelFromText(String text) -> String"""
54f9ee45 8645 return _core_.MenuItem_GetLabelFromText(*args, **kwargs)
d14a1e28 8646
e811c8ce
RD
8647def MenuItem_GetDefaultMarginWidth(*args, **kwargs):
8648 """MenuItem_GetDefaultMarginWidth() -> int"""
54f9ee45 8649 return _core_.MenuItem_GetDefaultMarginWidth(*args, **kwargs)
d14a1e28
RD
8650
8651#---------------------------------------------------------------------------
8652
8653class Control(Window):
15afbcd0
RD
8654 """
8655 This is the base class for a control or 'widget'.
8656
41e2b43e
RD
8657 A control is generally a small window which processes user input
8658 and/or displays one or more item of data.
15afbcd0 8659 """
e811c8ce
RD
8660 def __repr__(self):
8661 return "<%s.%s; proxy of C++ wxControl instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 8662 def __init__(self, *args, **kwargs):
0df68c9f 8663 """
248ed943
RD
8664 __init__(self, Window parent, int id=-1, Point pos=DefaultPosition,
8665 Size size=DefaultSize, long style=0, Validator validator=DefaultValidator,
b2dc1044 8666 String name=ControlNameStr) -> Control
15afbcd0 8667
41e2b43e
RD
8668 Create a Control. Normally you should only call this from a subclass'
8669 __init__ as a plain old wx.Control is not very useful.
0df68c9f 8670 """
54f9ee45 8671 newobj = _core_.new_Control(*args, **kwargs)
d14a1e28
RD
8672 self.this = newobj.this
8673 self.thisown = 1
8674 del newobj.thisown
8675 self._setOORInfo(self)
e811c8ce
RD
8676
8677 def Create(*args, **kwargs):
0df68c9f 8678 """
248ed943
RD
8679 Create(self, Window parent, int id=-1, Point pos=DefaultPosition,
8680 Size size=DefaultSize, long style=0, Validator validator=DefaultValidator,
b2dc1044 8681 String name=ControlNameStr) -> bool
15afbcd0
RD
8682
8683 Do the 2nd phase and create the GUI control.
0df68c9f 8684 """
54f9ee45 8685 return _core_.Control_Create(*args, **kwargs)
e811c8ce
RD
8686
8687 def Command(*args, **kwargs):
15afbcd0 8688 """
a95a7133 8689 Command(self, CommandEvent event)
15afbcd0 8690
41e2b43e
RD
8691 Simulates the effect of the user issuing a command to the item.
8692
8693 :see: `wx.CommandEvent`
8694
15afbcd0 8695 """
54f9ee45 8696 return _core_.Control_Command(*args, **kwargs)
e811c8ce
RD
8697
8698 def GetLabel(*args, **kwargs):
15afbcd0 8699 """
a95a7133 8700 GetLabel(self) -> String
15afbcd0
RD
8701
8702 Return a control's text.
8703 """
54f9ee45 8704 return _core_.Control_GetLabel(*args, **kwargs)
e811c8ce
RD
8705
8706 def SetLabel(*args, **kwargs):
15afbcd0 8707 """
a95a7133 8708 SetLabel(self, String label)
15afbcd0
RD
8709
8710 Sets the item's text.
8711 """
54f9ee45 8712 return _core_.Control_SetLabel(*args, **kwargs)
e811c8ce 8713
74a57fcd 8714 def GetClassDefaultAttributes(*args, **kwargs):
110da5b0
RD
8715 """
8716 GetClassDefaultAttributes(int variant=WINDOW_VARIANT_NORMAL) -> VisualAttributes
8717
8718 Get the default attributes for this class. This is useful if you want
8719 to use the same font or colour in your own control as in a standard
8720 control -- which is a much better idea than hard coding specific
8721 colours or fonts which might look completely out of place on the
8722 user's system, especially if it uses themes.
8723
8724 The variant parameter is only relevant under Mac currently and is
8725 ignore under other platforms. Under Mac, it will change the size of
8726 the returned font. See `wx.Window.SetWindowVariant` for more about
8727 this.
8728 """
54f9ee45 8729 return _core_.Control_GetClassDefaultAttributes(*args, **kwargs)
74a57fcd
RD
8730
8731 GetClassDefaultAttributes = staticmethod(GetClassDefaultAttributes)
d14a1e28
RD
8732
8733class ControlPtr(Control):
8734 def __init__(self, this):
8735 self.this = this
8736 if not hasattr(self,"thisown"): self.thisown = 0
8737 self.__class__ = Control
54f9ee45 8738_core_.Control_swigregister(ControlPtr)
b2dc1044 8739ControlNameStr = cvar.ControlNameStr
d14a1e28
RD
8740
8741def PreControl(*args, **kwargs):
15afbcd0
RD
8742 """
8743 PreControl() -> Control
8744
8745 Precreate a Control control for 2-phase creation
8746 """
54f9ee45 8747 val = _core_.new_PreControl(*args, **kwargs)
d14a1e28
RD
8748 val.thisown = 1
8749 return val
8750
74a57fcd 8751def Control_GetClassDefaultAttributes(*args, **kwargs):
110da5b0
RD
8752 """
8753 Control_GetClassDefaultAttributes(int variant=WINDOW_VARIANT_NORMAL) -> VisualAttributes
8754
8755 Get the default attributes for this class. This is useful if you want
8756 to use the same font or colour in your own control as in a standard
8757 control -- which is a much better idea than hard coding specific
8758 colours or fonts which might look completely out of place on the
8759 user's system, especially if it uses themes.
8760
8761 The variant parameter is only relevant under Mac currently and is
8762 ignore under other platforms. Under Mac, it will change the size of
8763 the returned font. See `wx.Window.SetWindowVariant` for more about
8764 this.
8765 """
54f9ee45 8766 return _core_.Control_GetClassDefaultAttributes(*args, **kwargs)
74a57fcd 8767
d14a1e28
RD
8768#---------------------------------------------------------------------------
8769
8770class ItemContainer(object):
15afbcd0
RD
8771 """
8772 wx.ItemContainer defines an interface which is implemented by all
41e2b43e
RD
8773 controls which have string subitems, each of which may be selected,
8774 such as `wx.ListBox`, `wx.CheckListBox`, `wx.Choice` as well as
8775 `wx.ComboBox` which implements an extended interface deriving from
8776 this one.
15afbcd0 8777
41e2b43e
RD
8778 It defines the methods for accessing the control's items and although
8779 each of the derived classes implements them differently, they still
8780 all conform to the same interface.
15afbcd0 8781
41e2b43e
RD
8782 The items in a wx.ItemContainer have (non empty) string labels and,
8783 optionally, client data associated with them.
15afbcd0
RD
8784
8785 """
d14a1e28
RD
8786 def __init__(self): raise RuntimeError, "No constructor defined"
8787 def __repr__(self):
8788 return "<%s.%s; proxy of C++ wxItemContainer instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
e811c8ce 8789 def Append(*args, **kwargs):
15afbcd0 8790 """
a95a7133 8791 Append(self, String item, PyObject clientData=None) -> int
15afbcd0 8792
41e2b43e
RD
8793 Adds the item to the control, associating the given data with the item
8794 if not None. The return value is the index of the newly added item
8795 which may be different from the last one if the control is sorted (e.g.
8796 has wx.LB_SORT or wx.CB_SORT style).
15afbcd0 8797 """
54f9ee45 8798 return _core_.ItemContainer_Append(*args, **kwargs)
e811c8ce
RD
8799
8800 def AppendItems(*args, **kwargs):
15afbcd0 8801 """
f5b96ee1 8802 AppendItems(self, List strings)
15afbcd0 8803
41e2b43e
RD
8804 Apend several items at once to the control. Notice that calling this
8805 method may be much faster than appending the items one by one if you
8806 need to add a lot of items.
15afbcd0 8807 """
54f9ee45 8808 return _core_.ItemContainer_AppendItems(*args, **kwargs)
e811c8ce
RD
8809
8810 def Insert(*args, **kwargs):
15afbcd0 8811 """
a95a7133 8812 Insert(self, String item, int pos, PyObject clientData=None) -> int
15afbcd0 8813
41e2b43e 8814 Insert an item into the control before the item at the ``pos`` index,
15afbcd0
RD
8815 optionally associating some data object with the item.
8816 """
54f9ee45 8817 return _core_.ItemContainer_Insert(*args, **kwargs)
e811c8ce
RD
8818
8819 def Clear(*args, **kwargs):
15afbcd0 8820 """
a95a7133 8821 Clear(self)
15afbcd0
RD
8822
8823 Removes all items from the control.
8824 """
54f9ee45 8825 return _core_.ItemContainer_Clear(*args, **kwargs)
e811c8ce
RD
8826
8827 def Delete(*args, **kwargs):
15afbcd0 8828 """
a95a7133 8829 Delete(self, int n)
15afbcd0 8830
41e2b43e
RD
8831 Deletes the item at the zero-based index 'n' from the control. Note
8832 that it is an error (signalled by a `wx.PyAssertionError` exception if
8833 enabled) to remove an item with the index negative or greater or equal
8834 than the number of items in the control.
15afbcd0 8835 """
54f9ee45 8836 return _core_.ItemContainer_Delete(*args, **kwargs)
e811c8ce
RD
8837
8838 def GetCount(*args, **kwargs):
15afbcd0 8839 """
a95a7133 8840 GetCount(self) -> int
15afbcd0
RD
8841
8842 Returns the number of items in the control.
8843 """
54f9ee45 8844 return _core_.ItemContainer_GetCount(*args, **kwargs)
e811c8ce
RD
8845
8846 def IsEmpty(*args, **kwargs):
15afbcd0 8847 """
a95a7133 8848 IsEmpty(self) -> bool
15afbcd0
RD
8849
8850 Returns True if the control is empty or False if it has some items.
8851 """
54f9ee45 8852 return _core_.ItemContainer_IsEmpty(*args, **kwargs)
e811c8ce
RD
8853
8854 def GetString(*args, **kwargs):
15afbcd0 8855 """
a95a7133 8856 GetString(self, int n) -> String
15afbcd0
RD
8857
8858 Returns the label of the item with the given index.
8859 """
54f9ee45 8860 return _core_.ItemContainer_GetString(*args, **kwargs)
e811c8ce
RD
8861
8862 def GetStrings(*args, **kwargs):
a95a7133 8863 """GetStrings(self) -> wxArrayString"""
54f9ee45 8864 return _core_.ItemContainer_GetStrings(*args, **kwargs)
e811c8ce
RD
8865
8866 def SetString(*args, **kwargs):
15afbcd0 8867 """
a95a7133 8868 SetString(self, int n, String s)
15afbcd0
RD
8869
8870 Sets the label for the given item.
8871 """
54f9ee45 8872 return _core_.ItemContainer_SetString(*args, **kwargs)
e811c8ce
RD
8873
8874 def FindString(*args, **kwargs):
15afbcd0 8875 """
a95a7133 8876 FindString(self, String s) -> int
15afbcd0
RD
8877
8878 Finds an item whose label matches the given string. Returns the
41e2b43e
RD
8879 zero-based position of the item, or ``wx.NOT_FOUND`` if the string was not
8880 found.
15afbcd0 8881 """
54f9ee45 8882 return _core_.ItemContainer_FindString(*args, **kwargs)
e811c8ce
RD
8883
8884 def Select(*args, **kwargs):
15afbcd0 8885 """
a95a7133 8886 Select(self, int n)
15afbcd0
RD
8887
8888 Sets the item at index 'n' to be the selected item.
8889 """
54f9ee45 8890 return _core_.ItemContainer_Select(*args, **kwargs)
e811c8ce 8891
15afbcd0 8892 SetSelection = Select
e811c8ce 8893 def GetSelection(*args, **kwargs):
15afbcd0 8894 """
a95a7133 8895 GetSelection(self) -> int
15afbcd0 8896
41e2b43e
RD
8897 Returns the index of the selected item or ``wx.NOT_FOUND`` if no item
8898 is selected.
15afbcd0 8899 """
54f9ee45 8900 return _core_.ItemContainer_GetSelection(*args, **kwargs)
e811c8ce
RD
8901
8902 def GetStringSelection(*args, **kwargs):
15afbcd0 8903 """
a95a7133 8904 GetStringSelection(self) -> String
15afbcd0 8905
41e2b43e
RD
8906 Returns the label of the selected item or an empty string if no item
8907 is selected.
15afbcd0 8908 """
54f9ee45 8909 return _core_.ItemContainer_GetStringSelection(*args, **kwargs)
e811c8ce
RD
8910
8911 def GetClientData(*args, **kwargs):
15afbcd0 8912 """
a95a7133 8913 GetClientData(self, int n) -> PyObject
15afbcd0
RD
8914
8915 Returns the client data associated with the given item, (if any.)
8916 """
54f9ee45 8917 return _core_.ItemContainer_GetClientData(*args, **kwargs)
e811c8ce
RD
8918
8919 def SetClientData(*args, **kwargs):
15afbcd0 8920 """
a95a7133 8921 SetClientData(self, int n, PyObject clientData)
15afbcd0
RD
8922
8923 Associate the given client data with the item at position n.
8924 """
54f9ee45 8925 return _core_.ItemContainer_SetClientData(*args, **kwargs)
e811c8ce 8926
d14a1e28
RD
8927
8928class ItemContainerPtr(ItemContainer):
8929 def __init__(self, this):
8930 self.this = this
8931 if not hasattr(self,"thisown"): self.thisown = 0
8932 self.__class__ = ItemContainer
54f9ee45 8933_core_.ItemContainer_swigregister(ItemContainerPtr)
d14a1e28
RD
8934
8935#---------------------------------------------------------------------------
8936
8937class ControlWithItems(Control,ItemContainer):
15afbcd0 8938 """
41e2b43e
RD
8939 wx.ControlWithItems combines the ``wx.ItemContainer`` class with the
8940 wx.Control class, and is used for the base class of various controls
8941 that have items.
15afbcd0 8942 """
d14a1e28
RD
8943 def __init__(self): raise RuntimeError, "No constructor defined"
8944 def __repr__(self):
8945 return "<%s.%s; proxy of C++ wxControlWithItems instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
8946
8947class ControlWithItemsPtr(ControlWithItems):
8948 def __init__(self, this):
8949 self.this = this
8950 if not hasattr(self,"thisown"): self.thisown = 0
8951 self.__class__ = ControlWithItems
54f9ee45 8952_core_.ControlWithItems_swigregister(ControlWithItemsPtr)
d14a1e28
RD
8953
8954#---------------------------------------------------------------------------
8955
8956class SizerItem(Object):
248ed943
RD
8957 """
8958 The wx.SizerItem class is used to track the position, size and other
8959 attributes of each item managed by a `wx.Sizer`. In normal usage user
8960 code should never need to deal directly with a wx.SizerItem, but
8961 custom classes derived from `wx.PySizer` will probably need to use the
8962 collection of wx.SizerItems held by wx.Sizer when calculating layout.
8963
8964 :see: `wx.Sizer`, `wx.GBSizerItem`
8965 """
e811c8ce
RD
8966 def __repr__(self):
8967 return "<%s.%s; proxy of C++ wxSizerItem instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 8968 def __init__(self, *args, **kwargs):
248ed943
RD
8969 """
8970 __init__(self) -> SizerItem
8971
8972 Constructs an empty wx.SizerItem. Either a window, sizer or spacer
8973 size will need to be set before this item can be used in a Sizer.
8974
8975 You will probably never need to create a wx.SizerItem directly as they
8976 are created automatically when the sizer's Add, Insert or Prepend
8977 methods are called.
8978
8979 :see: `wx.SizerItemSpacer`, `wx.SizerItemWindow`, `wx.SizerItemSizer`
8980 """
54f9ee45 8981 newobj = _core_.new_SizerItem(*args, **kwargs)
d14a1e28
RD
8982 self.this = newobj.this
8983 self.thisown = 1
8984 del newobj.thisown
e811c8ce 8985 def DeleteWindows(*args, **kwargs):
248ed943
RD
8986 """
8987 DeleteWindows(self)
8988
8989 Destroy the window or the windows in a subsizer, depending on the type
8990 of item.
8991 """
54f9ee45 8992 return _core_.SizerItem_DeleteWindows(*args, **kwargs)
e811c8ce
RD
8993
8994 def DetachSizer(*args, **kwargs):
248ed943
RD
8995 """
8996 DetachSizer(self)
8997
8998 Enable deleting the SizerItem without destroying the contained sizer.
8999 """
54f9ee45 9000 return _core_.SizerItem_DetachSizer(*args, **kwargs)
e811c8ce
RD
9001
9002 def GetSize(*args, **kwargs):
248ed943
RD
9003 """
9004 GetSize(self) -> Size
9005
9006 Get the current size of the item, as set in the last Layout.
9007 """
54f9ee45 9008 return _core_.SizerItem_GetSize(*args, **kwargs)
e811c8ce
RD
9009
9010 def CalcMin(*args, **kwargs):
248ed943
RD
9011 """
9012 CalcMin(self) -> Size
9013
9014 Calculates the minimum desired size for the item, including any space
9015 needed by borders.
9016 """
54f9ee45 9017 return _core_.SizerItem_CalcMin(*args, **kwargs)
e811c8ce
RD
9018
9019 def SetDimension(*args, **kwargs):
248ed943
RD
9020 """
9021 SetDimension(self, Point pos, Size size)
9022
9023 Set the position and size of the space allocated for this item by the
9024 sizer, and adjust the position and size of the item (window or
9025 subsizer) to be within that space taking alignment and borders into
9026 account.
9027 """
54f9ee45 9028 return _core_.SizerItem_SetDimension(*args, **kwargs)
e811c8ce
RD
9029
9030 def GetMinSize(*args, **kwargs):
248ed943
RD
9031 """
9032 GetMinSize(self) -> Size
9033
9034 Get the minimum size needed for the item.
9035 """
54f9ee45 9036 return _core_.SizerItem_GetMinSize(*args, **kwargs)
e811c8ce 9037
dfbb5885
RD
9038 def GetMinSizeWithBorder(*args, **kwargs):
9039 """
9040 GetMinSizeWithBorder(self) -> Size
9041
9042 Get the minimum size needed for the item with space for the borders
9043 added, if needed.
9044 """
9045 return _core_.SizerItem_GetMinSizeWithBorder(*args, **kwargs)
9046
e811c8ce 9047 def SetInitSize(*args, **kwargs):
a95a7133 9048 """SetInitSize(self, int x, int y)"""
54f9ee45 9049 return _core_.SizerItem_SetInitSize(*args, **kwargs)
e811c8ce
RD
9050
9051 def SetRatioWH(*args, **kwargs):
248ed943
RD
9052 """
9053 SetRatioWH(self, int width, int height)
9054
9055 Set the ratio item attribute.
9056 """
54f9ee45 9057 return _core_.SizerItem_SetRatioWH(*args, **kwargs)
e811c8ce
RD
9058
9059 def SetRatioSize(*args, **kwargs):
248ed943
RD
9060 """
9061 SetRatioSize(self, Size size)
9062
9063 Set the ratio item attribute.
9064 """
54f9ee45 9065 return _core_.SizerItem_SetRatioSize(*args, **kwargs)
e811c8ce
RD
9066
9067 def SetRatio(*args, **kwargs):
248ed943
RD
9068 """
9069 SetRatio(self, float ratio)
9070
9071 Set the ratio item attribute.
9072 """
54f9ee45 9073 return _core_.SizerItem_SetRatio(*args, **kwargs)
e811c8ce
RD
9074
9075 def GetRatio(*args, **kwargs):
248ed943
RD
9076 """
9077 GetRatio(self) -> float
9078
9079 Set the ratio item attribute.
9080 """
54f9ee45 9081 return _core_.SizerItem_GetRatio(*args, **kwargs)
e811c8ce 9082
d3b6e4ff
RD
9083 def GetRect(*args, **kwargs):
9084 """
9085 GetRect(self) -> Rect
9086
9087 Returns the rectangle that the sizer item should occupy
9088 """
9089 return _core_.SizerItem_GetRect(*args, **kwargs)
9090
e811c8ce 9091 def IsWindow(*args, **kwargs):
248ed943
RD
9092 """
9093 IsWindow(self) -> bool
9094
9095 Is this sizer item a window?
9096 """
54f9ee45 9097 return _core_.SizerItem_IsWindow(*args, **kwargs)
e811c8ce
RD
9098
9099 def IsSizer(*args, **kwargs):
248ed943
RD
9100 """
9101 IsSizer(self) -> bool
9102
9103 Is this sizer item a subsizer?
9104 """
54f9ee45 9105 return _core_.SizerItem_IsSizer(*args, **kwargs)
e811c8ce
RD
9106
9107 def IsSpacer(*args, **kwargs):
248ed943
RD
9108 """
9109 IsSpacer(self) -> bool
9110
9111 Is this sizer item a spacer?
9112 """
54f9ee45 9113 return _core_.SizerItem_IsSpacer(*args, **kwargs)
e811c8ce
RD
9114
9115 def SetProportion(*args, **kwargs):
248ed943
RD
9116 """
9117 SetProportion(self, int proportion)
9118
9119 Set the proportion value for this item.
9120 """
54f9ee45 9121 return _core_.SizerItem_SetProportion(*args, **kwargs)
e811c8ce
RD
9122
9123 def GetProportion(*args, **kwargs):
248ed943
RD
9124 """
9125 GetProportion(self) -> int
9126
9127 Get the proportion value for this item.
9128 """
54f9ee45 9129 return _core_.SizerItem_GetProportion(*args, **kwargs)
e811c8ce 9130
248ed943
RD
9131 SetOption = wx._deprecated(SetProportion, "Please use `SetProportion` instead.")
9132 GetOption = wx._deprecated(GetProportion, "Please use `GetProportion` instead.")
e811c8ce 9133 def SetFlag(*args, **kwargs):
248ed943
RD
9134 """
9135 SetFlag(self, int flag)
9136
9137 Set the flag value for this item.
9138 """
54f9ee45 9139 return _core_.SizerItem_SetFlag(*args, **kwargs)
e811c8ce
RD
9140
9141 def GetFlag(*args, **kwargs):
248ed943
RD
9142 """
9143 GetFlag(self) -> int
9144
9145 Get the flag value for this item.
9146 """
54f9ee45 9147 return _core_.SizerItem_GetFlag(*args, **kwargs)
e811c8ce
RD
9148
9149 def SetBorder(*args, **kwargs):
248ed943
RD
9150 """
9151 SetBorder(self, int border)
9152
9153 Set the border value for this item.
9154 """
54f9ee45 9155 return _core_.SizerItem_SetBorder(*args, **kwargs)
e811c8ce
RD
9156
9157 def GetBorder(*args, **kwargs):
248ed943
RD
9158 """
9159 GetBorder(self) -> int
9160
9161 Get the border value for this item.
9162 """
54f9ee45 9163 return _core_.SizerItem_GetBorder(*args, **kwargs)
e811c8ce
RD
9164
9165 def GetWindow(*args, **kwargs):
248ed943
RD
9166 """
9167 GetWindow(self) -> Window
9168
9169 Get the window (if any) that is managed by this sizer item.
9170 """
54f9ee45 9171 return _core_.SizerItem_GetWindow(*args, **kwargs)
e811c8ce
RD
9172
9173 def SetWindow(*args, **kwargs):
248ed943
RD
9174 """
9175 SetWindow(self, Window window)
9176
9177 Set the window to be managed by this sizer item.
9178 """
54f9ee45 9179 return _core_.SizerItem_SetWindow(*args, **kwargs)
e811c8ce
RD
9180
9181 def GetSizer(*args, **kwargs):
248ed943
RD
9182 """
9183 GetSizer(self) -> Sizer
9184
9185 Get the subsizer (if any) that is managed by this sizer item.
9186 """
54f9ee45 9187 return _core_.SizerItem_GetSizer(*args, **kwargs)
e811c8ce
RD
9188
9189 def SetSizer(*args, **kwargs):
248ed943
RD
9190 """
9191 SetSizer(self, Sizer sizer)
9192
9193 Set the subsizer to be managed by this sizer item.
9194 """
54f9ee45 9195 return _core_.SizerItem_SetSizer(*args, **kwargs)
e811c8ce
RD
9196
9197 def GetSpacer(*args, **kwargs):
248ed943
RD
9198 """
9199 GetSpacer(self) -> Size
9200
9201 Get the size of the spacer managed by this sizer item.
9202 """
54f9ee45 9203 return _core_.SizerItem_GetSpacer(*args, **kwargs)
e811c8ce
RD
9204
9205 def SetSpacer(*args, **kwargs):
248ed943
RD
9206 """
9207 SetSpacer(self, Size size)
9208
9209 Set the size of the spacer to be managed by this sizer item.
9210 """
54f9ee45 9211 return _core_.SizerItem_SetSpacer(*args, **kwargs)
e811c8ce
RD
9212
9213 def Show(*args, **kwargs):
248ed943
RD
9214 """
9215 Show(self, bool show)
9216
9217 Set the show item attribute, which sizers use to determine if the item
9218 is to be made part of the layout or not. If the item is tracking a
9219 window then it is shown or hidden as needed.
9220 """
54f9ee45 9221 return _core_.SizerItem_Show(*args, **kwargs)
e811c8ce
RD
9222
9223 def IsShown(*args, **kwargs):
248ed943
RD
9224 """
9225 IsShown(self) -> bool
9226
9227 Is the item to be shown in the layout?
9228 """
54f9ee45 9229 return _core_.SizerItem_IsShown(*args, **kwargs)
e811c8ce
RD
9230
9231 def GetPosition(*args, **kwargs):
248ed943
RD
9232 """
9233 GetPosition(self) -> Point
9234
9235 Returns the current position of the item, as set in the last Layout.
9236 """
54f9ee45 9237 return _core_.SizerItem_GetPosition(*args, **kwargs)
e811c8ce
RD
9238
9239 def GetUserData(*args, **kwargs):
248ed943
RD
9240 """
9241 GetUserData(self) -> PyObject
9242
9243 Returns the userData associated with this sizer item, or None if there
9244 isn't any.
9245 """
54f9ee45 9246 return _core_.SizerItem_GetUserData(*args, **kwargs)
e811c8ce 9247
d14a1e28
RD
9248
9249class SizerItemPtr(SizerItem):
9250 def __init__(self, this):
9251 self.this = this
9252 if not hasattr(self,"thisown"): self.thisown = 0
9253 self.__class__ = SizerItem
54f9ee45 9254_core_.SizerItem_swigregister(SizerItemPtr)
d14a1e28 9255
248ed943 9256def SizerItemWindow(*args, **kwargs):
0df68c9f 9257 """
248ed943
RD
9258 SizerItemWindow(Window window, int proportion, int flag, int border,
9259 PyObject userData=None) -> SizerItem
9260
9261 Constructs a `wx.SizerItem` for tracking a window.
0df68c9f 9262 """
248ed943 9263 val = _core_.new_SizerItemWindow(*args, **kwargs)
d14a1e28
RD
9264 val.thisown = 1
9265 return val
9266
248ed943 9267def SizerItemSpacer(*args, **kwargs):
0df68c9f 9268 """
248ed943
RD
9269 SizerItemSpacer(int width, int height, int proportion, int flag, int border,
9270 PyObject userData=None) -> SizerItem
9271
9272 Constructs a `wx.SizerItem` for tracking a spacer.
0df68c9f 9273 """
248ed943 9274 val = _core_.new_SizerItemSpacer(*args, **kwargs)
d14a1e28
RD
9275 val.thisown = 1
9276 return val
9277
9278def SizerItemSizer(*args, **kwargs):
0df68c9f
RD
9279 """
9280 SizerItemSizer(Sizer sizer, int proportion, int flag, int border,
248ed943
RD
9281 PyObject userData=None) -> SizerItem
9282
9283 Constructs a `wx.SizerItem` for tracking a subsizer
0df68c9f 9284 """
54f9ee45 9285 val = _core_.new_SizerItemSizer(*args, **kwargs)
d14a1e28
RD
9286 val.thisown = 1
9287 return val
9288
9289class Sizer(Object):
248ed943
RD
9290 """
9291 wx.Sizer is the abstract base class used for laying out subwindows in
9292 a window. You cannot use wx.Sizer directly; instead, you will have to
9293 use one of the sizer classes derived from it such as `wx.BoxSizer`,
9294 `wx.StaticBoxSizer`, `wx.NotebookSizer`, `wx.GridSizer`, `wx.FlexGridSizer`
9295 and `wx.GridBagSizer`.
9296
9297 The concept implemented by sizers in wxWidgets is closely related to
9298 layout tools in other GUI toolkits, such as Java's AWT, the GTK
9299 toolkit or the Qt toolkit. It is based upon the idea of the individual
9300 subwindows reporting their minimal required size and their ability to
9301 get stretched if the size of the parent window has changed. This will
9302 most often mean that the programmer does not set the original size of
9303 a dialog in the beginning, rather the dialog will assigned a sizer and
9304 this sizer will be queried about the recommended size. The sizer in
9305 turn will query its children, which can be normal windows or contorls,
9306 empty space or other sizers, so that a hierarchy of sizers can be
9307 constructed. Note that wxSizer does not derive from wxWindow and thus
9308 do not interfere with tab ordering and requires very little resources
9309 compared to a real window on screen.
9310
9311 What makes sizers so well fitted for use in wxWidgets is the fact that
9312 every control reports its own minimal size and the algorithm can
9313 handle differences in font sizes or different window (dialog item)
9314 sizes on different platforms without problems. If for example the
9315 standard font as well as the overall design of Mac widgets requires
9316 more space than on Windows, then the initial size of a dialog using a
9317 sizer will automatically be bigger on Mac than on Windows.
9318 """
e811c8ce
RD
9319 def __init__(self): raise RuntimeError, "No constructor defined"
9320 def __repr__(self):
9321 return "<%s.%s; proxy of C++ wxSizer instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
9322 def _setOORInfo(*args, **kwargs):
a95a7133 9323 """_setOORInfo(self, PyObject _self)"""
54f9ee45 9324 return _core_.Sizer__setOORInfo(*args, **kwargs)
e811c8ce
RD
9325
9326 def Add(*args, **kwargs):
0df68c9f 9327 """
248ed943 9328 Add(self, item, int proportion=0, int flag=0, int border=0,
d3b6e4ff 9329 PyObject userData=None) -> wx.SizerItem
248ed943
RD
9330
9331 Appends a child item to the sizer.
0df68c9f 9332 """
54f9ee45 9333 return _core_.Sizer_Add(*args, **kwargs)
e811c8ce
RD
9334
9335 def Insert(*args, **kwargs):
0df68c9f 9336 """
248ed943 9337 Insert(self, int before, item, int proportion=0, int flag=0, int border=0,
d3b6e4ff 9338 PyObject userData=None) -> wx.SizerItem
248ed943
RD
9339
9340 Inserts a new item into the list of items managed by this sizer before
9341 the item at index *before*. See `Add` for a description of the parameters.
0df68c9f 9342 """
54f9ee45 9343 return _core_.Sizer_Insert(*args, **kwargs)
e811c8ce
RD
9344
9345 def Prepend(*args, **kwargs):
0df68c9f 9346 """
248ed943 9347 Prepend(self, item, int proportion=0, int flag=0, int border=0,
d3b6e4ff 9348 PyObject userData=None) -> wx.SizerItem
248ed943
RD
9349
9350 Adds a new item to the begining of the list of sizer items managed by
9351 this sizer. See `Add` for a description of the parameters.
0df68c9f 9352 """
54f9ee45 9353 return _core_.Sizer_Prepend(*args, **kwargs)
e811c8ce
RD
9354
9355 def Remove(*args, **kwargs):
248ed943
RD
9356 """
9357 Remove(self, item) -> bool
9358
9359 Removes an item from the sizer and destroys it. This method does not
9360 cause any layout or resizing to take place, call `Layout` to update
9361 the layout on screen after removing a child from the sizer. The
9362 *item* parameter can be either a window, a sizer, or the zero-based
9363 index of an item to remove. Returns True if the child item was found
9364 and removed.
9365 """
54f9ee45 9366 return _core_.Sizer_Remove(*args, **kwargs)
e811c8ce 9367
1c0f361b 9368 def Detach(*args, **kwargs):
248ed943
RD
9369 """
9370 Detach(self, item) -> bool
9371
9372 Detaches an item from the sizer without destroying it. This method
9373 does not cause any layout or resizing to take place, call `Layout` to
9374 do so. The *item* parameter can be either a window, a sizer, or the
9375 zero-based index of the item to be detached. Returns True if the child item
9376 was found and detached.
9377 """
1c0f361b
RD
9378 return _core_.Sizer_Detach(*args, **kwargs)
9379
d3b6e4ff
RD
9380 def GetItem(*args, **kwargs):
9381 """
9382 GetItem(self, item) -> wx.SizerItem
9383
9384 Returns the `wx.SizerItem` which holds the *item* given. The *item*
9385 parameter can be either a window, a sizer, or the zero-based index of
9386 the item to be detached.
9387 """
9388 return _core_.Sizer_GetItem(*args, **kwargs)
9389
e811c8ce 9390 def _SetItemMinSize(*args, **kwargs):
a95a7133 9391 """_SetItemMinSize(self, PyObject item, Size size)"""
54f9ee45 9392 return _core_.Sizer__SetItemMinSize(*args, **kwargs)
e811c8ce 9393
248ed943
RD
9394 def SetItemMinSize(self, item, *args):
9395 """
9396 SetItemMinSize(self, item, Size size)
9397
9398 Sets the minimum size that will be allocated for an item in the sizer.
9399 The *item* parameter can be either a window, a sizer, or the
9400 zero-based index of the item. If a window or sizer is given then it
9401 will be searched for recursivly in subsizers if neccessary.
9402 """
9403 if len(args) == 2:
9404 # for backward compatibility accept separate width,height args too
9405 return self._SetItemMinSize(item, args)
9406 else:
9407 return self._SetItemMinSize(item, args[0])
9408
e811c8ce 9409 def AddItem(*args, **kwargs):
248ed943
RD
9410 """
9411 AddItem(self, SizerItem item)
9412
9413 Adds a `wx.SizerItem` to the sizer.
9414 """
54f9ee45 9415 return _core_.Sizer_AddItem(*args, **kwargs)
e811c8ce
RD
9416
9417 def InsertItem(*args, **kwargs):
248ed943
RD
9418 """
9419 InsertItem(self, int index, SizerItem item)
9420
9421 Inserts a `wx.SizerItem` to the sizer at the position given by *index*.
9422 """
54f9ee45 9423 return _core_.Sizer_InsertItem(*args, **kwargs)
e811c8ce
RD
9424
9425 def PrependItem(*args, **kwargs):
248ed943
RD
9426 """
9427 PrependItem(self, SizerItem item)
9428
9429 Prepends a `wx.SizerItem` to the sizer.
9430 """
54f9ee45 9431 return _core_.Sizer_PrependItem(*args, **kwargs)
e811c8ce 9432
248ed943 9433 def AddMany(self, items):
66c033b4
RD
9434 """
9435 AddMany is a convenience method for adding several items
9436 to a sizer at one time. Simply pass it a list of tuples,
9437 where each tuple consists of the parameters that you
9438 would normally pass to the `Add` method.
9439 """
248ed943
RD
9440 for item in items:
9441 if type(item) != type(()) or (len(item) == 2 and type(item[0]) == type(1)):
9442 item = (item, )
9443 self.Add(*item)
d14a1e28 9444
74e96f3d 9445 # for backwards compatibility only, please do not use in new code
66c033b4
RD
9446 AddWindow = wx._deprecated(Add, "AddWindow is deprecated, use `Add` instead.")
9447 AddSizer = wx._deprecated(Add, "AddSizer is deprecated, use `Add` instead.")
9448 AddSpacer = wx._deprecated(Add, "AddSpacer is deprecated, use `Add` instead.")
9449 PrependWindow = wx._deprecated(Prepend, "PrependWindow is deprecated, use `Prepend` instead.")
9450 PrependSizer = wx._deprecated(Prepend, "PrependSizer is deprecated, use `Prepend` instead.")
9451 PrependSpacer = wx._deprecated(Prepend, "PrependSpacer is deprecated, use `Prepend` instead.")
9452 InsertWindow = wx._deprecated(Insert, "InsertWindow is deprecated, use `Insert` instead.")
9453 InsertSizer = wx._deprecated(Insert, "InsertSizer is deprecated, use `Insert` instead.")
9454 InsertSpacer = wx._deprecated(Insert, "InsertSpacer is deprecated, use `Insert` instead.")
9455 RemoveWindow = wx._deprecated(Remove, "RemoveWindow is deprecated, use `Remove` instead.")
9456 RemoveSizer = wx._deprecated(Remove, "RemoveSizer is deprecated, use `Remove` instead.")
9457 RemovePos = wx._deprecated(Remove, "RemovePos is deprecated, use `Remove` instead.")
d14a1e28
RD
9458
9459
e811c8ce 9460 def SetDimension(*args, **kwargs):
248ed943
RD
9461 """
9462 SetDimension(self, int x, int y, int width, int height)
9463
9464 Call this to force the sizer to take the given dimension and thus
9465 force the items owned by the sizer to resize themselves according to
9466 the rules defined by the parameter in the `Add`, `Insert` or `Prepend`
9467 methods.
9468 """
54f9ee45 9469 return _core_.Sizer_SetDimension(*args, **kwargs)
e811c8ce
RD
9470
9471 def SetMinSize(*args, **kwargs):
248ed943
RD
9472 """
9473 SetMinSize(self, Size size)
9474
9475 Call this to give the sizer a minimal size. Normally, the sizer will
9476 calculate its minimal size based purely on how much space its children
9477 need. After calling this method `GetMinSize` will return either the
9478 minimal size as requested by its children or the minimal size set
9479 here, depending on which is bigger.
9480 """
54f9ee45 9481 return _core_.Sizer_SetMinSize(*args, **kwargs)
e811c8ce
RD
9482
9483 def GetSize(*args, **kwargs):
248ed943
RD
9484 """
9485 GetSize(self) -> Size
9486
9487 Returns the current size of the space managed by the sizer.
9488 """
54f9ee45 9489 return _core_.Sizer_GetSize(*args, **kwargs)
e811c8ce
RD
9490
9491 def GetPosition(*args, **kwargs):
248ed943
RD
9492 """
9493 GetPosition(self) -> Point
9494
9495 Returns the current position of the sizer's managed space.
9496 """
54f9ee45 9497 return _core_.Sizer_GetPosition(*args, **kwargs)
e811c8ce
RD
9498
9499 def GetMinSize(*args, **kwargs):
248ed943
RD
9500 """
9501 GetMinSize(self) -> Size
9502
9503 Returns the minimal size of the sizer. This is either the combined
9504 minimal size of all the children and their borders or the minimal size
9505 set by SetMinSize, depending on which is bigger.
9506 """
54f9ee45 9507 return _core_.Sizer_GetMinSize(*args, **kwargs)
e811c8ce 9508
d14a1e28 9509 def GetSizeTuple(self):
1c0f361b 9510 return self.GetSize().Get()
d14a1e28 9511 def GetPositionTuple(self):
1c0f361b 9512 return self.GetPosition().Get()
d14a1e28 9513 def GetMinSizeTuple(self):
1c0f361b 9514 return self.GetMinSize().Get()
d14a1e28 9515
e811c8ce 9516 def RecalcSizes(*args, **kwargs):
248ed943
RD
9517 """
9518 RecalcSizes(self)
9519
9520 Using the sizes calculated by `CalcMin` reposition and resize all the
9521 items managed by this sizer. You should not need to call this directly as
9522 it is called by `Layout`.
9523 """
54f9ee45 9524 return _core_.Sizer_RecalcSizes(*args, **kwargs)
e811c8ce
RD
9525
9526 def CalcMin(*args, **kwargs):
248ed943
RD
9527 """
9528 CalcMin(self) -> Size
9529
9530 This method is where the sizer will do the actual calculation of its
9531 children's minimal sizes. You should not need to call this directly as
9532 it is called by `Layout`.
9533 """
54f9ee45 9534 return _core_.Sizer_CalcMin(*args, **kwargs)
e811c8ce
RD
9535
9536 def Layout(*args, **kwargs):
248ed943
RD
9537 """
9538 Layout(self)
9539
9540 This method will force the recalculation and layout of the items
9541 controlled by the sizer using the current space allocated to the
9542 sizer. Normally this is called automatically from the owning window's
9543 EVT_SIZE handler, but it is also useful to call it from user code when
9544 one of the items in a sizer change size, or items are added or
9545 removed.
9546 """
54f9ee45 9547 return _core_.Sizer_Layout(*args, **kwargs)
e811c8ce
RD
9548
9549 def Fit(*args, **kwargs):
248ed943
RD
9550 """
9551 Fit(self, Window window) -> Size
9552
9553 Tell the sizer to resize the *window* to match the sizer's minimal
9554 size. This is commonly done in the constructor of the window itself in
9555 order to set its initial size to match the needs of the children as
9556 determined by the sizer. Returns the new size.
9557
9558 For a top level window this is the total window size, not the client size.
9559 """
54f9ee45 9560 return _core_.Sizer_Fit(*args, **kwargs)
e811c8ce
RD
9561
9562 def FitInside(*args, **kwargs):
248ed943
RD
9563 """
9564 FitInside(self, Window window)
9565
9566 Tell the sizer to resize the *virtual size* of the *window* to match the
9567 sizer's minimal size. This will not alter the on screen size of the
9568 window, but may cause the addition/removal/alteration of scrollbars
9569 required to view the virtual area in windows which manage it.
9570
9571 :see: `wx.ScrolledWindow.SetScrollbars`, `SetVirtualSizeHints`
9572
9573 """
54f9ee45 9574 return _core_.Sizer_FitInside(*args, **kwargs)
e811c8ce
RD
9575
9576 def SetSizeHints(*args, **kwargs):
248ed943
RD
9577 """
9578 SetSizeHints(self, Window window)
9579
9580 Tell the sizer to set (and `Fit`) the minimal size of the *window* to
9581 match the sizer's minimal size. This is commonly done in the
9582 constructor of the window itself if the window is resizable (as are
9583 many dialogs under Unix and frames on probably all platforms) in order
9584 to prevent the window from being sized smaller than the minimal size
9585 required by the sizer.
9586 """
54f9ee45 9587 return _core_.Sizer_SetSizeHints(*args, **kwargs)
e811c8ce
RD
9588
9589 def SetVirtualSizeHints(*args, **kwargs):
248ed943
RD
9590 """
9591 SetVirtualSizeHints(self, Window window)
9592
9593 Tell the sizer to set the minimal size of the window virtual area to
9594 match the sizer's minimal size. For windows with managed scrollbars
9595 this will set them appropriately.
9596
9597 :see: `wx.ScrolledWindow.SetScrollbars`
9598
9599 """
54f9ee45 9600 return _core_.Sizer_SetVirtualSizeHints(*args, **kwargs)
e811c8ce
RD
9601
9602 def Clear(*args, **kwargs):
248ed943
RD
9603 """
9604 Clear(self, bool deleteWindows=False)
9605
9606 Clear all items from the sizer, optionally destroying the window items
9607 as well.
9608 """
54f9ee45 9609 return _core_.Sizer_Clear(*args, **kwargs)
e811c8ce
RD
9610
9611 def DeleteWindows(*args, **kwargs):
248ed943
RD
9612 """
9613 DeleteWindows(self)
9614
9615 Destroy all windows managed by the sizer.
9616 """
54f9ee45 9617 return _core_.Sizer_DeleteWindows(*args, **kwargs)
e811c8ce
RD
9618
9619 def GetChildren(*args, **kwargs):
248ed943
RD
9620 """
9621 GetChildren(sefl) -> list
9622
9623 Returns a list of all the `wx.SizerItem` objects managed by the sizer.
9624 """
54f9ee45 9625 return _core_.Sizer_GetChildren(*args, **kwargs)
e811c8ce
RD
9626
9627 def Show(*args, **kwargs):
248ed943 9628 """
ae8162c8 9629 Show(self, item, bool show=True, bool recursive=false) -> bool
e811c8ce 9630
248ed943
RD
9631 Shows or hides an item managed by the sizer. To make a sizer item
9632 disappear or reappear, use Show followed by `Layout`. The *item*
9633 parameter can be either a window, a sizer, or the zero-based index of
7e63a440
RD
9634 the item. Use the recursive parameter to show or hide an item in a
9635 subsizer. Returns True if the item was found.
248ed943
RD
9636 """
9637 return _core_.Sizer_Show(*args, **kwargs)
e811c8ce
RD
9638
9639 def IsShown(*args, **kwargs):
248ed943
RD
9640 """
9641 IsShown(self, item)
9642
9643 Determines if the item is currently shown. sizer. To make a sizer
9644 item disappear or reappear, use Show followed by `Layout`. The *item*
9645 parameter can be either a window, a sizer, or the zero-based index of
9646 the item.
9647 """
54f9ee45 9648 return _core_.Sizer_IsShown(*args, **kwargs)
e811c8ce 9649
7e63a440 9650 def Hide(self, item, recursive=False):
248ed943 9651 """
7e63a440 9652 A convenience method for Show(item, False, recursive).
248ed943 9653 """
06759a38 9654 return self.Show(item, False, recursive)
248ed943 9655
e811c8ce 9656 def ShowItems(*args, **kwargs):
248ed943
RD
9657 """
9658 ShowItems(self, bool show)
9659
84f85550 9660 Recursively call `wx.SizerItem.Show` on all sizer items.
248ed943 9661 """
54f9ee45 9662 return _core_.Sizer_ShowItems(*args, **kwargs)
e811c8ce 9663
d14a1e28
RD
9664
9665class SizerPtr(Sizer):
9666 def __init__(self, this):
9667 self.this = this
9668 if not hasattr(self,"thisown"): self.thisown = 0
9669 self.__class__ = Sizer
54f9ee45 9670_core_.Sizer_swigregister(SizerPtr)
d14a1e28
RD
9671
9672class PySizer(Sizer):
248ed943
RD
9673 """
9674 wx.PySizer is a special version of `wx.Sizer` that has been
9675 instrumented to allow the C++ virtual methods to be overloaded in
9676 Python derived classes. You would derive from this class if you are
9677 wanting to implement a custom sizer in Python code. Simply implement
9678 `CalcMin` and `RecalcSizes` in the derived class and you're all set.
9679 For example::
9680
9681 class MySizer(wx.PySizer):
9682 def __init__(self):
9683 wx.PySizer.__init__(self)
9684
9685 def CalcMin(self):
9686 for item in self.GetChildren():
9687 # calculate the total minimum width and height needed
9688 # by all items in the sizer according to this sizer's
9689 # layout algorithm.
9690 ...
9691 return wx.Size(width, height)
9692
9693 def RecalcSizes(self):
9694 # find the space allotted to this sizer
9695 pos = self.GetPosition()
9696 size = self.GetSize()
9697 for item in self.GetChildren():
9698 # Recalculate (if necessary) the position and size of
9699 # each item and then call item.SetDimension to do the
9700 # actual positioning and sizing of the items within the
9701 # space alloted to this sizer.
9702 ...
9703 item.SetDimension(itemPos, itemSize)
9704
9705
9706 When `Layout` is called it first calls `CalcMin` followed by
9707 `RecalcSizes` so you can optimize a bit by saving the results of
e505d15e 9708 `CalcMin` and reusing them in `RecalcSizes`.
248ed943
RD
9709
9710 :see: `wx.SizerItem`, `wx.Sizer.GetChildren`
9711
9712
9713 """
e811c8ce
RD
9714 def __repr__(self):
9715 return "<%s.%s; proxy of C++ wxPySizer instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 9716 def __init__(self, *args, **kwargs):
248ed943
RD
9717 """
9718 __init__(self) -> PySizer
9719
9720 Creates a wx.PySizer. Must be called from the __init__ in the derived
9721 class.
9722 """
54f9ee45 9723 newobj = _core_.new_PySizer(*args, **kwargs)
d14a1e28
RD
9724 self.this = newobj.this
9725 self.thisown = 1
9726 del newobj.thisown
9727 self._setCallbackInfo(self, PySizer);self._setOORInfo(self)
e811c8ce
RD
9728
9729 def _setCallbackInfo(*args, **kwargs):
a95a7133 9730 """_setCallbackInfo(self, PyObject self, PyObject _class)"""
54f9ee45 9731 return _core_.PySizer__setCallbackInfo(*args, **kwargs)
e811c8ce 9732
d14a1e28
RD
9733
9734class PySizerPtr(PySizer):
9735 def __init__(self, this):
9736 self.this = this
9737 if not hasattr(self,"thisown"): self.thisown = 0
9738 self.__class__ = PySizer
54f9ee45 9739_core_.PySizer_swigregister(PySizerPtr)
d14a1e28
RD
9740
9741#---------------------------------------------------------------------------
9742
9743class BoxSizer(Sizer):
248ed943
RD
9744 """
9745 The basic idea behind a box sizer is that windows will most often be
9746 laid out in rather simple basic geometry, typically in a row or a
9747 column or nested hierarchies of either. A wx.BoxSizer will lay out
9748 its items in a simple row or column, depending on the orientation
9749 parameter passed to the constructor.
9750 """
e811c8ce
RD
9751 def __repr__(self):
9752 return "<%s.%s; proxy of C++ wxBoxSizer instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 9753 def __init__(self, *args, **kwargs):
248ed943
RD
9754 """
9755 __init__(self, int orient=HORIZONTAL) -> BoxSizer
9756
9757 Constructor for a wx.BoxSizer. *orient* may be one of ``wx.VERTICAL``
9758 or ``wx.HORIZONTAL`` for creating either a column sizer or a row
9759 sizer.
9760 """
54f9ee45 9761 newobj = _core_.new_BoxSizer(*args, **kwargs)
d14a1e28
RD
9762 self.this = newobj.this
9763 self.thisown = 1
9764 del newobj.thisown
9765 self._setOORInfo(self)
e811c8ce
RD
9766
9767 def GetOrientation(*args, **kwargs):
248ed943
RD
9768 """
9769 GetOrientation(self) -> int
9770
9771 Returns the current orientation of the sizer.
9772 """
54f9ee45 9773 return _core_.BoxSizer_GetOrientation(*args, **kwargs)
e811c8ce
RD
9774
9775 def SetOrientation(*args, **kwargs):
248ed943
RD
9776 """
9777 SetOrientation(self, int orient)
e811c8ce 9778
248ed943
RD
9779 Resets the orientation of the sizer.
9780 """
9781 return _core_.BoxSizer_SetOrientation(*args, **kwargs)
e811c8ce 9782
d14a1e28
RD
9783
9784class BoxSizerPtr(BoxSizer):
9785 def __init__(self, this):
9786 self.this = this
9787 if not hasattr(self,"thisown"): self.thisown = 0
9788 self.__class__ = BoxSizer
54f9ee45 9789_core_.BoxSizer_swigregister(BoxSizerPtr)
d14a1e28
RD
9790
9791#---------------------------------------------------------------------------
9792
9793class StaticBoxSizer(BoxSizer):
248ed943
RD
9794 """
9795 wx.StaticBoxSizer derives from and functions identically to the
9796 `wx.BoxSizer` and adds a `wx.StaticBox` around the items that the sizer
9797 manages. Note that this static box must be created separately and
9798 passed to the sizer constructor.
9799 """
e811c8ce
RD
9800 def __repr__(self):
9801 return "<%s.%s; proxy of C++ wxStaticBoxSizer instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 9802 def __init__(self, *args, **kwargs):
248ed943
RD
9803 """
9804 __init__(self, StaticBox box, int orient=HORIZONTAL) -> StaticBoxSizer
9805
9806 Constructor. It takes an associated static box and the orientation
9807 *orient* as parameters - orient can be either of ``wx.VERTICAL`` or
9808 ``wx.HORIZONTAL``.
9809 """
54f9ee45 9810 newobj = _core_.new_StaticBoxSizer(*args, **kwargs)
d14a1e28
RD
9811 self.this = newobj.this
9812 self.thisown = 1
9813 del newobj.thisown
9814 self._setOORInfo(self)
e811c8ce
RD
9815
9816 def GetStaticBox(*args, **kwargs):
248ed943
RD
9817 """
9818 GetStaticBox(self) -> StaticBox
e811c8ce 9819
248ed943
RD
9820 Returns the static box associated with this sizer.
9821 """
9822 return _core_.StaticBoxSizer_GetStaticBox(*args, **kwargs)
e811c8ce 9823
d14a1e28
RD
9824
9825class StaticBoxSizerPtr(StaticBoxSizer):
9826 def __init__(self, this):
9827 self.this = this
9828 if not hasattr(self,"thisown"): self.thisown = 0
9829 self.__class__ = StaticBoxSizer
54f9ee45 9830_core_.StaticBoxSizer_swigregister(StaticBoxSizerPtr)
d14a1e28
RD
9831
9832#---------------------------------------------------------------------------
9833
9834class GridSizer(Sizer):
248ed943
RD
9835 """
9836 A grid sizer is a sizer which lays out its children in a
9837 two-dimensional table with all cells having the same size. In other
9838 words, the width of each cell within the grid is the width of the
9839 widest item added to the sizer and the height of each grid cell is the
9840 height of the tallest item. An optional vertical and/or horizontal
9841 gap between items can also be specified (in pixels.)
9842
9843 Items are placed in the cells of the grid in the order they are added,
9844 in row-major order. In other words, the first row is filled first,
9845 then the second, and so on until all items have been added. (If
9846 neccessary, additional rows will be added as items are added.) If you
9847 need to have greater control over the cells that items are placed in
9848 then use the `wx.GridBagSizer`.
9849
9850 """
e811c8ce
RD
9851 def __repr__(self):
9852 return "<%s.%s; proxy of C++ wxGridSizer instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 9853 def __init__(self, *args, **kwargs):
248ed943
RD
9854 """
9855 __init__(self, int rows=1, int cols=0, int vgap=0, int hgap=0) -> GridSizer
9856
9857 Constructor for a wx.GridSizer. *rows* and *cols* determine the number
9858 of columns and rows in the sizer - if either of the parameters is
9859 zero, it will be calculated to from the total number of children in
9860 the sizer, thus making the sizer grow dynamically. *vgap* and *hgap*
9861 define extra space between all children.
9862 """
54f9ee45 9863 newobj = _core_.new_GridSizer(*args, **kwargs)
d14a1e28
RD
9864 self.this = newobj.this
9865 self.thisown = 1
9866 del newobj.thisown
9867 self._setOORInfo(self)
e811c8ce 9868
e811c8ce 9869 def SetCols(*args, **kwargs):
248ed943
RD
9870 """
9871 SetCols(self, int cols)
9872
9873 Sets the number of columns in the sizer.
9874 """
54f9ee45 9875 return _core_.GridSizer_SetCols(*args, **kwargs)
e811c8ce
RD
9876
9877 def SetRows(*args, **kwargs):
248ed943
RD
9878 """
9879 SetRows(self, int rows)
9880
9881 Sets the number of rows in the sizer.
9882 """
54f9ee45 9883 return _core_.GridSizer_SetRows(*args, **kwargs)
e811c8ce
RD
9884
9885 def SetVGap(*args, **kwargs):
248ed943
RD
9886 """
9887 SetVGap(self, int gap)
9888
9889 Sets the vertical gap (in pixels) between the cells in the sizer.
9890 """
54f9ee45 9891 return _core_.GridSizer_SetVGap(*args, **kwargs)
e811c8ce
RD
9892
9893 def SetHGap(*args, **kwargs):
248ed943
RD
9894 """
9895 SetHGap(self, int gap)
9896
9897 Sets the horizontal gap (in pixels) between cells in the sizer
9898 """
54f9ee45 9899 return _core_.GridSizer_SetHGap(*args, **kwargs)
e811c8ce
RD
9900
9901 def GetCols(*args, **kwargs):
248ed943
RD
9902 """
9903 GetCols(self) -> int
9904
9905 Returns the number of columns in the sizer.
9906 """
54f9ee45 9907 return _core_.GridSizer_GetCols(*args, **kwargs)
e811c8ce
RD
9908
9909 def GetRows(*args, **kwargs):
248ed943
RD
9910 """
9911 GetRows(self) -> int
9912
9913 Returns the number of rows in the sizer.
9914 """
54f9ee45 9915 return _core_.GridSizer_GetRows(*args, **kwargs)
e811c8ce
RD
9916
9917 def GetVGap(*args, **kwargs):
248ed943
RD
9918 """
9919 GetVGap(self) -> int
9920
9921 Returns the vertical gap (in pixels) between the cells in the sizer.
9922 """
54f9ee45 9923 return _core_.GridSizer_GetVGap(*args, **kwargs)
e811c8ce
RD
9924
9925 def GetHGap(*args, **kwargs):
248ed943
RD
9926 """
9927 GetHGap(self) -> int
9928
9929 Returns the horizontal gap (in pixels) between cells in the sizer.
9930 """
54f9ee45 9931 return _core_.GridSizer_GetHGap(*args, **kwargs)
e811c8ce 9932
d14a1e28
RD
9933
9934class GridSizerPtr(GridSizer):
9935 def __init__(self, this):
9936 self.this = this
9937 if not hasattr(self,"thisown"): self.thisown = 0
9938 self.__class__ = GridSizer
54f9ee45 9939_core_.GridSizer_swigregister(GridSizerPtr)
d14a1e28
RD
9940
9941#---------------------------------------------------------------------------
9942
54f9ee45
RD
9943FLEX_GROWMODE_NONE = _core_.FLEX_GROWMODE_NONE
9944FLEX_GROWMODE_SPECIFIED = _core_.FLEX_GROWMODE_SPECIFIED
9945FLEX_GROWMODE_ALL = _core_.FLEX_GROWMODE_ALL
d14a1e28 9946class FlexGridSizer(GridSizer):
248ed943
RD
9947 """
9948 A flex grid sizer is a sizer which lays out its children in a
9949 two-dimensional table with all table cells in one row having the same
9950 height and all cells in one column having the same width, but all
9951 rows or all columns are not necessarily the same height or width as in
9952 the `wx.GridSizer`.
9953
9954 wx.FlexGridSizer can also size items equally in one direction but
9955 unequally ("flexibly") in the other. If the sizer is only flexible
9956 in one direction (this can be changed using `SetFlexibleDirection`), it
9957 needs to be decided how the sizer should grow in the other ("non
9958 flexible") direction in order to fill the available space. The
9959 `SetNonFlexibleGrowMode` method serves this purpose.
9960
9961
9962 """
e811c8ce
RD
9963 def __repr__(self):
9964 return "<%s.%s; proxy of C++ wxFlexGridSizer instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 9965 def __init__(self, *args, **kwargs):
248ed943
RD
9966 """
9967 __init__(self, int rows=1, int cols=0, int vgap=0, int hgap=0) -> FlexGridSizer
9968
9969 Constructor for a wx.FlexGridSizer. *rows* and *cols* determine the
9970 number of columns and rows in the sizer - if either of the parameters
9971 is zero, it will be calculated to from the total number of children in
9972 the sizer, thus making the sizer grow dynamically. *vgap* and *hgap*
9973 define extra space between all children.
9974 """
54f9ee45 9975 newobj = _core_.new_FlexGridSizer(*args, **kwargs)
d14a1e28
RD
9976 self.this = newobj.this
9977 self.thisown = 1
9978 del newobj.thisown
9979 self._setOORInfo(self)
e811c8ce 9980
248ed943
RD
9981 def AddGrowableRow(*args, **kwargs):
9982 """
9983 AddGrowableRow(self, size_t idx, int proportion=0)
e811c8ce 9984
248ed943
RD
9985 Specifies that row *idx* (starting from zero) should be grown if there
9986 is extra space available to the sizer.
e811c8ce 9987
248ed943
RD
9988 The *proportion* parameter has the same meaning as the stretch factor
9989 for the box sizers except that if all proportions are 0, then all
9990 columns are resized equally (instead of not being resized at all).
9991 """
54f9ee45 9992 return _core_.FlexGridSizer_AddGrowableRow(*args, **kwargs)
e811c8ce
RD
9993
9994 def RemoveGrowableRow(*args, **kwargs):
248ed943
RD
9995 """
9996 RemoveGrowableRow(self, size_t idx)
9997
9998 Specifies that row *idx* is no longer growable.
9999 """
54f9ee45 10000 return _core_.FlexGridSizer_RemoveGrowableRow(*args, **kwargs)
e811c8ce
RD
10001
10002 def AddGrowableCol(*args, **kwargs):
248ed943
RD
10003 """
10004 AddGrowableCol(self, size_t idx, int proportion=0)
10005
10006 Specifies that column *idx* (starting from zero) should be grown if
10007 there is extra space available to the sizer.
10008
10009 The *proportion* parameter has the same meaning as the stretch factor
10010 for the box sizers except that if all proportions are 0, then all
10011 columns are resized equally (instead of not being resized at all).
10012 """
54f9ee45 10013 return _core_.FlexGridSizer_AddGrowableCol(*args, **kwargs)
e811c8ce
RD
10014
10015 def RemoveGrowableCol(*args, **kwargs):
248ed943
RD
10016 """
10017 RemoveGrowableCol(self, size_t idx)
10018
10019 Specifies that column *idx* is no longer growable.
10020 """
54f9ee45 10021 return _core_.FlexGridSizer_RemoveGrowableCol(*args, **kwargs)
e811c8ce
RD
10022
10023 def SetFlexibleDirection(*args, **kwargs):
248ed943
RD
10024 """
10025 SetFlexibleDirection(self, int direction)
10026
10027 Specifies whether the sizer should flexibly resize its columns, rows,
10028 or both. Argument *direction* can be one of the following values. Any
10029 other value is ignored.
10030
10031 ============== =======================================
10032 wx.VERTICAL Rows are flexibly sized.
10033 wx.HORIZONTAL Columns are flexibly sized.
10034 wx.BOTH Both rows and columns are flexibly sized
10035 (this is the default value).
10036 ============== =======================================
10037
10038 Note that this method does not trigger relayout.
10039
10040 """
54f9ee45 10041 return _core_.FlexGridSizer_SetFlexibleDirection(*args, **kwargs)
e811c8ce
RD
10042
10043 def GetFlexibleDirection(*args, **kwargs):
248ed943
RD
10044 """
10045 GetFlexibleDirection(self) -> int
10046
10047 Returns a value that specifies whether the sizer
10048 flexibly resizes its columns, rows, or both (default).
10049
10050 :see: `SetFlexibleDirection`
10051 """
54f9ee45 10052 return _core_.FlexGridSizer_GetFlexibleDirection(*args, **kwargs)
e811c8ce
RD
10053
10054 def SetNonFlexibleGrowMode(*args, **kwargs):
248ed943
RD
10055 """
10056 SetNonFlexibleGrowMode(self, int mode)
10057
10058 Specifies how the sizer should grow in the non-flexible direction if
10059 there is one (so `SetFlexibleDirection` must have been called
10060 previously). Argument *mode* can be one of the following values:
10061
10062 ========================== =================================================
10063 wx.FLEX_GROWMODE_NONE Sizer doesn't grow in the non flexible direction.
10064 wx.FLEX_GROWMODE_SPECIFIED Sizer honors growable columns/rows set with
10065 `AddGrowableCol` and `AddGrowableRow`. In this
10066 case equal sizing applies to minimum sizes of
10067 columns or rows (this is the default value).
10068 wx.FLEX_GROWMODE_ALL Sizer equally stretches all columns or rows in
10069 the non flexible direction, whether they are
10070 growable or not in the flexbile direction.
10071 ========================== =================================================
10072
10073 Note that this method does not trigger relayout.
10074
10075
10076 """
54f9ee45 10077 return _core_.FlexGridSizer_SetNonFlexibleGrowMode(*args, **kwargs)
e811c8ce
RD
10078
10079 def GetNonFlexibleGrowMode(*args, **kwargs):
248ed943
RD
10080 """
10081 GetNonFlexibleGrowMode(self) -> int
10082
10083 Returns the value that specifies how the sizer grows in the
10084 non-flexible direction if there is one.
10085
10086 :see: `SetNonFlexibleGrowMode`
10087 """
54f9ee45 10088 return _core_.FlexGridSizer_GetNonFlexibleGrowMode(*args, **kwargs)
e811c8ce
RD
10089
10090 def GetRowHeights(*args, **kwargs):
fd2dc343
RD
10091 """
10092 GetRowHeights(self) -> list
10093
10094 Returns a list of integers representing the heights of each of the
10095 rows in the sizer.
10096 """
54f9ee45 10097 return _core_.FlexGridSizer_GetRowHeights(*args, **kwargs)
e811c8ce
RD
10098
10099 def GetColWidths(*args, **kwargs):
fd2dc343
RD
10100 """
10101 GetColWidths(self) -> list
10102
10103 Returns a list of integers representing the widths of each of the
10104 columns in the sizer.
10105 """
54f9ee45 10106 return _core_.FlexGridSizer_GetColWidths(*args, **kwargs)
e811c8ce 10107
d14a1e28
RD
10108
10109class FlexGridSizerPtr(FlexGridSizer):
10110 def __init__(self, this):
10111 self.this = this
10112 if not hasattr(self,"thisown"): self.thisown = 0
10113 self.__class__ = FlexGridSizer
54f9ee45 10114_core_.FlexGridSizer_swigregister(FlexGridSizerPtr)
d14a1e28 10115
e505d15e
RD
10116class StdDialogButtonSizer(BoxSizer):
10117 """
10118 A special sizer that knows how to order and position standard buttons
10119 in order to conform to the current platform's standards. You simply
10120 need to add each `wx.Button` to the sizer, and be sure to create the
10121 buttons using the standard ID's. Then call `Finalize` and the sizer
10122 will take care of the rest.
10123
10124 """
10125 def __repr__(self):
10126 return "<%s.%s; proxy of C++ wxStdDialogButtonSizer instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
10127 def __init__(self, *args, **kwargs):
10128 """__init__(self) -> StdDialogButtonSizer"""
10129 newobj = _core_.new_StdDialogButtonSizer(*args, **kwargs)
10130 self.this = newobj.this
10131 self.thisown = 1
10132 del newobj.thisown
10133 def AddButton(*args, **kwargs):
10134 """
10135 AddButton(self, wxButton button)
10136
10137 Use this to add the buttons to this sizer. Do not use the `Add`
10138 method in the base class.
10139 """
10140 return _core_.StdDialogButtonSizer_AddButton(*args, **kwargs)
10141
10142 def Finalise(*args, **kwargs):
10143 """
10144 Finalise(self)
10145
10146 This funciton needs to be called after all the buttons have been added
10147 to the sizer. It will reorder them and position them in a platform
10148 specifc manner.
10149 """
10150 return _core_.StdDialogButtonSizer_Finalise(*args, **kwargs)
10151
10152 def GetAffirmativeButton(*args, **kwargs):
10153 """GetAffirmativeButton(self) -> wxButton"""
10154 return _core_.StdDialogButtonSizer_GetAffirmativeButton(*args, **kwargs)
10155
10156 def GetApplyButton(*args, **kwargs):
10157 """GetApplyButton(self) -> wxButton"""
10158 return _core_.StdDialogButtonSizer_GetApplyButton(*args, **kwargs)
10159
10160 def GetNegativeButton(*args, **kwargs):
10161 """GetNegativeButton(self) -> wxButton"""
10162 return _core_.StdDialogButtonSizer_GetNegativeButton(*args, **kwargs)
10163
10164 def GetCancelButton(*args, **kwargs):
10165 """GetCancelButton(self) -> wxButton"""
10166 return _core_.StdDialogButtonSizer_GetCancelButton(*args, **kwargs)
10167
10168 def GetHelpButton(*args, **kwargs):
10169 """GetHelpButton(self) -> wxButton"""
10170 return _core_.StdDialogButtonSizer_GetHelpButton(*args, **kwargs)
10171
10172
10173class StdDialogButtonSizerPtr(StdDialogButtonSizer):
10174 def __init__(self, this):
10175 self.this = this
10176 if not hasattr(self,"thisown"): self.thisown = 0
10177 self.__class__ = StdDialogButtonSizer
10178_core_.StdDialogButtonSizer_swigregister(StdDialogButtonSizerPtr)
10179
d14a1e28
RD
10180#---------------------------------------------------------------------------
10181
10182class GBPosition(object):
248ed943
RD
10183 """
10184 This class represents the position of an item in a virtual grid of
10185 rows and columns managed by a `wx.GridBagSizer`. wxPython has
10186 typemaps that will automatically convert from a 2-element sequence of
10187 integers to a wx.GBPosition, so you can use the more pythonic
10188 representation of the position nearly transparently in Python code.
10189 """
e811c8ce
RD
10190 def __repr__(self):
10191 return "<%s.%s; proxy of C++ wxGBPosition instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 10192 def __init__(self, *args, **kwargs):
248ed943
RD
10193 """
10194 __init__(self, int row=0, int col=0) -> GBPosition
10195
10196 This class represents the position of an item in a virtual grid of
10197 rows and columns managed by a `wx.GridBagSizer`. wxPython has
10198 typemaps that will automatically convert from a 2-element sequence of
10199 integers to a wx.GBPosition, so you can use the more pythonic
10200 representation of the position nearly transparently in Python code.
10201 """
54f9ee45 10202 newobj = _core_.new_GBPosition(*args, **kwargs)
d14a1e28
RD
10203 self.this = newobj.this
10204 self.thisown = 1
10205 del newobj.thisown
e811c8ce 10206 def GetRow(*args, **kwargs):
a95a7133 10207 """GetRow(self) -> int"""
54f9ee45 10208 return _core_.GBPosition_GetRow(*args, **kwargs)
e811c8ce
RD
10209
10210 def GetCol(*args, **kwargs):
a95a7133 10211 """GetCol(self) -> int"""
54f9ee45 10212 return _core_.GBPosition_GetCol(*args, **kwargs)
e811c8ce
RD
10213
10214 def SetRow(*args, **kwargs):
a95a7133 10215 """SetRow(self, int row)"""
54f9ee45 10216 return _core_.GBPosition_SetRow(*args, **kwargs)
e811c8ce
RD
10217
10218 def SetCol(*args, **kwargs):
a95a7133 10219 """SetCol(self, int col)"""
54f9ee45 10220 return _core_.GBPosition_SetCol(*args, **kwargs)
e811c8ce
RD
10221
10222 def __eq__(*args, **kwargs):
a95a7133 10223 """__eq__(self, GBPosition other) -> bool"""
54f9ee45 10224 return _core_.GBPosition___eq__(*args, **kwargs)
e811c8ce
RD
10225
10226 def __ne__(*args, **kwargs):
a95a7133 10227 """__ne__(self, GBPosition other) -> bool"""
54f9ee45 10228 return _core_.GBPosition___ne__(*args, **kwargs)
e811c8ce
RD
10229
10230 def Set(*args, **kwargs):
a95a7133 10231 """Set(self, int row=0, int col=0)"""
54f9ee45 10232 return _core_.GBPosition_Set(*args, **kwargs)
e811c8ce
RD
10233
10234 def Get(*args, **kwargs):
a95a7133 10235 """Get(self) -> PyObject"""
54f9ee45 10236 return _core_.GBPosition_Get(*args, **kwargs)
e811c8ce 10237
41e2b43e 10238 asTuple = wx._deprecated(Get, "asTuple is deprecated, use `Get` instead")
e811c8ce
RD
10239 def __str__(self): return str(self.Get())
10240 def __repr__(self): return 'wx.GBPosition'+str(self.Get())
10241 def __len__(self): return len(self.Get())
10242 def __getitem__(self, index): return self.Get()[index]
d14a1e28
RD
10243 def __setitem__(self, index, val):
10244 if index == 0: self.SetRow(val)
10245 elif index == 1: self.SetCol(val)
10246 else: raise IndexError
e811c8ce 10247 def __nonzero__(self): return self.Get() != (0,0)
74e96f3d
RD
10248 __safe_for_unpickling__ = True
10249 def __reduce__(self): return (wx.GBPosition, self.Get())
d14a1e28
RD
10250
10251 row = property(GetRow, SetRow)
10252 col = property(GetCol, SetCol)
10253
10254
10255class GBPositionPtr(GBPosition):
10256 def __init__(self, this):
10257 self.this = this
10258 if not hasattr(self,"thisown"): self.thisown = 0
10259 self.__class__ = GBPosition
54f9ee45 10260_core_.GBPosition_swigregister(GBPositionPtr)
d14a1e28
RD
10261
10262class GBSpan(object):
248ed943
RD
10263 """
10264 This class is used to hold the row and column spanning attributes of
10265 items in a `wx.GridBagSizer`. wxPython has typemaps that will
10266 automatically convert from a 2-element sequence of integers to a
10267 wx.GBSpan, so you can use the more pythonic representation of the span
10268 nearly transparently in Python code.
10269
10270 """
e811c8ce
RD
10271 def __repr__(self):
10272 return "<%s.%s; proxy of C++ wxGBSpan instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 10273 def __init__(self, *args, **kwargs):
248ed943
RD
10274 """
10275 __init__(self, int rowspan=1, int colspan=1) -> GBSpan
10276
10277 Construct a new wxGBSpan, optionally setting the rowspan and
10278 colspan. The default is (1,1). (Meaning that the item occupies one
10279 cell in each direction.
10280 """
54f9ee45 10281 newobj = _core_.new_GBSpan(*args, **kwargs)
d14a1e28
RD
10282 self.this = newobj.this
10283 self.thisown = 1
10284 del newobj.thisown
e811c8ce 10285 def GetRowspan(*args, **kwargs):
a95a7133 10286 """GetRowspan(self) -> int"""
54f9ee45 10287 return _core_.GBSpan_GetRowspan(*args, **kwargs)
e811c8ce
RD
10288
10289 def GetColspan(*args, **kwargs):
a95a7133 10290 """GetColspan(self) -> int"""
54f9ee45 10291 return _core_.GBSpan_GetColspan(*args, **kwargs)
e811c8ce
RD
10292
10293 def SetRowspan(*args, **kwargs):
a95a7133 10294 """SetRowspan(self, int rowspan)"""
54f9ee45 10295 return _core_.GBSpan_SetRowspan(*args, **kwargs)
e811c8ce
RD
10296
10297 def SetColspan(*args, **kwargs):
a95a7133 10298 """SetColspan(self, int colspan)"""
54f9ee45 10299 return _core_.GBSpan_SetColspan(*args, **kwargs)
e811c8ce
RD
10300
10301 def __eq__(*args, **kwargs):
a95a7133 10302 """__eq__(self, GBSpan other) -> bool"""
54f9ee45 10303 return _core_.GBSpan___eq__(*args, **kwargs)
e811c8ce
RD
10304
10305 def __ne__(*args, **kwargs):
a95a7133 10306 """__ne__(self, GBSpan other) -> bool"""
54f9ee45 10307 return _core_.GBSpan___ne__(*args, **kwargs)
e811c8ce
RD
10308
10309 def Set(*args, **kwargs):
a95a7133 10310 """Set(self, int rowspan=1, int colspan=1)"""
54f9ee45 10311 return _core_.GBSpan_Set(*args, **kwargs)
e811c8ce
RD
10312
10313 def Get(*args, **kwargs):
a95a7133 10314 """Get(self) -> PyObject"""
54f9ee45 10315 return _core_.GBSpan_Get(*args, **kwargs)
e811c8ce 10316
41e2b43e 10317 asTuple = wx._deprecated(Get, "asTuple is deprecated, use `Get` instead")
e811c8ce
RD
10318 def __str__(self): return str(self.Get())
10319 def __repr__(self): return 'wx.GBSpan'+str(self.Get())
10320 def __len__(self): return len(self.Get())
10321 def __getitem__(self, index): return self.Get()[index]
d14a1e28
RD
10322 def __setitem__(self, index, val):
10323 if index == 0: self.SetRowspan(val)
10324 elif index == 1: self.SetColspan(val)
10325 else: raise IndexError
e811c8ce 10326 def __nonzero__(self): return self.Get() != (0,0)
74e96f3d
RD
10327 __safe_for_unpickling__ = True
10328 def __reduce__(self): return (wx.GBSpan, self.Get())
d14a1e28
RD
10329
10330 rowspan = property(GetRowspan, SetRowspan)
10331 colspan = property(GetColspan, SetColspan)
10332
10333
10334class GBSpanPtr(GBSpan):
10335 def __init__(self, this):
10336 self.this = this
10337 if not hasattr(self,"thisown"): self.thisown = 0
10338 self.__class__ = GBSpan
54f9ee45 10339_core_.GBSpan_swigregister(GBSpanPtr)
d14a1e28
RD
10340
10341class GBSizerItem(SizerItem):
248ed943
RD
10342 """
10343 The wx.GBSizerItem class is used to track the additional data about
10344 items in a `wx.GridBagSizer` such as the item's position in the grid
10345 and how many rows or columns it spans.
10346
10347 """
e811c8ce
RD
10348 def __repr__(self):
10349 return "<%s.%s; proxy of C++ wxGBSizerItem instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 10350 def __init__(self, *args, **kwargs):
248ed943
RD
10351 """
10352 __init__(self) -> GBSizerItem
10353
10354 Constructs an empty wx.GBSizerItem. Either a window, sizer or spacer
10355 size will need to be set, as well as a position and span before this
10356 item can be used in a Sizer.
10357
10358 You will probably never need to create a wx.GBSizerItem directly as they
10359 are created automatically when the sizer's Add method is called.
10360 """
54f9ee45 10361 newobj = _core_.new_GBSizerItem(*args, **kwargs)
d14a1e28
RD
10362 self.this = newobj.this
10363 self.thisown = 1
10364 del newobj.thisown
e811c8ce 10365 def GetPos(*args, **kwargs):
248ed943
RD
10366 """
10367 GetPos(self) -> GBPosition
10368
10369 Get the grid position of the item
10370 """
54f9ee45 10371 return _core_.GBSizerItem_GetPos(*args, **kwargs)
e811c8ce
RD
10372
10373 def GetPosTuple(self): return self.GetPos().Get()
10374 def GetSpan(*args, **kwargs):
248ed943
RD
10375 """
10376 GetSpan(self) -> GBSpan
10377
10378 Get the row and column spanning of the item
10379 """
54f9ee45 10380 return _core_.GBSizerItem_GetSpan(*args, **kwargs)
e811c8ce
RD
10381
10382 def GetSpanTuple(self): return self.GetSpan().Get()
10383 def SetPos(*args, **kwargs):
248ed943
RD
10384 """
10385 SetPos(self, GBPosition pos) -> bool
10386
10387 If the item is already a member of a sizer then first ensure that
10388 there is no other item that would intersect with this one at the new
10389 position, then set the new position. Returns True if the change is
10390 successful and after the next Layout() the item will be moved.
10391 """
54f9ee45 10392 return _core_.GBSizerItem_SetPos(*args, **kwargs)
e811c8ce
RD
10393
10394 def SetSpan(*args, **kwargs):
248ed943
RD
10395 """
10396 SetSpan(self, GBSpan span) -> bool
10397
10398 If the item is already a member of a sizer then first ensure that
10399 there is no other item that would intersect with this one with its new
10400 spanning size, then set the new spanning. Returns True if the change
10401 is successful and after the next Layout() the item will be resized.
10402
10403 """
54f9ee45 10404 return _core_.GBSizerItem_SetSpan(*args, **kwargs)
e811c8ce 10405
248ed943 10406 def Intersects(*args, **kwargs):
0df68c9f 10407 """
a95a7133 10408 Intersects(self, GBSizerItem other) -> bool
248ed943
RD
10409
10410 Returns True if this item and the other item instersect.
0df68c9f 10411 """
248ed943
RD
10412 return _core_.GBSizerItem_Intersects(*args, **kwargs)
10413
10414 def IntersectsPos(*args, **kwargs):
10415 """
10416 IntersectsPos(self, GBPosition pos, GBSpan span) -> bool
10417
10418 Returns True if the given pos/span would intersect with this item.
10419 """
10420 return _core_.GBSizerItem_IntersectsPos(*args, **kwargs)
e811c8ce
RD
10421
10422 def GetEndPos(*args, **kwargs):
248ed943
RD
10423 """
10424 GetEndPos(self) -> GBPosition
10425
10426 Get the row and column of the endpoint of this item.
10427 """
54f9ee45 10428 return _core_.GBSizerItem_GetEndPos(*args, **kwargs)
e811c8ce
RD
10429
10430 def GetGBSizer(*args, **kwargs):
248ed943
RD
10431 """
10432 GetGBSizer(self) -> GridBagSizer
10433
10434 Get the sizer this item is a member of.
10435 """
54f9ee45 10436 return _core_.GBSizerItem_GetGBSizer(*args, **kwargs)
e811c8ce
RD
10437
10438 def SetGBSizer(*args, **kwargs):
248ed943
RD
10439 """
10440 SetGBSizer(self, GridBagSizer sizer)
10441
10442 Set the sizer this item is a member of.
10443 """
54f9ee45 10444 return _core_.GBSizerItem_SetGBSizer(*args, **kwargs)
e811c8ce 10445
d14a1e28
RD
10446
10447class GBSizerItemPtr(GBSizerItem):
10448 def __init__(self, this):
10449 self.this = this
10450 if not hasattr(self,"thisown"): self.thisown = 0
10451 self.__class__ = GBSizerItem
54f9ee45 10452_core_.GBSizerItem_swigregister(GBSizerItemPtr)
d14a1e28
RD
10453DefaultSpan = cvar.DefaultSpan
10454
10455def GBSizerItemWindow(*args, **kwargs):
0df68c9f
RD
10456 """
10457 GBSizerItemWindow(Window window, GBPosition pos, GBSpan span, int flag,
248ed943
RD
10458 int border, PyObject userData=None) -> GBSizerItem
10459
10460 Construct a `wx.GBSizerItem` for a window.
0df68c9f 10461 """
54f9ee45 10462 val = _core_.new_GBSizerItemWindow(*args, **kwargs)
d14a1e28
RD
10463 val.thisown = 1
10464 return val
10465
10466def GBSizerItemSizer(*args, **kwargs):
0df68c9f
RD
10467 """
10468 GBSizerItemSizer(Sizer sizer, GBPosition pos, GBSpan span, int flag,
248ed943
RD
10469 int border, PyObject userData=None) -> GBSizerItem
10470
10471 Construct a `wx.GBSizerItem` for a sizer
0df68c9f 10472 """
54f9ee45 10473 val = _core_.new_GBSizerItemSizer(*args, **kwargs)
d14a1e28
RD
10474 val.thisown = 1
10475 return val
10476
10477def GBSizerItemSpacer(*args, **kwargs):
0df68c9f
RD
10478 """
10479 GBSizerItemSpacer(int width, int height, GBPosition pos, GBSpan span,
248ed943
RD
10480 int flag, int border, PyObject userData=None) -> GBSizerItem
10481
10482 Construct a `wx.GBSizerItem` for a spacer.
0df68c9f 10483 """
54f9ee45 10484 val = _core_.new_GBSizerItemSpacer(*args, **kwargs)
d14a1e28
RD
10485 val.thisown = 1
10486 return val
10487
10488class GridBagSizer(FlexGridSizer):
248ed943
RD
10489 """
10490 A `wx.Sizer` that can lay out items in a virtual grid like a
10491 `wx.FlexGridSizer` but in this case explicit positioning of the items
10492 is allowed using `wx.GBPosition`, and items can optionally span more
10493 than one row and/or column using `wx.GBSpan`. The total size of the
10494 virtual grid is determined by the largest row and column that items are
10495 positioned at, adjusted for spanning.
10496
10497 """
e811c8ce
RD
10498 def __repr__(self):
10499 return "<%s.%s; proxy of C++ wxGridBagSizer instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 10500 def __init__(self, *args, **kwargs):
248ed943
RD
10501 """
10502 __init__(self, int vgap=0, int hgap=0) -> GridBagSizer
10503
10504 Constructor, with optional parameters to specify the gap between the
10505 rows and columns.
10506 """
54f9ee45 10507 newobj = _core_.new_GridBagSizer(*args, **kwargs)
d14a1e28
RD
10508 self.this = newobj.this
10509 self.thisown = 1
10510 del newobj.thisown
1823fbb4
RD
10511 self._setOORInfo(self)
10512
e811c8ce 10513 def Add(*args, **kwargs):
0df68c9f 10514 """
248ed943 10515 Add(self, item, GBPosition pos, GBSpan span=DefaultSpan, int flag=0,
d3b6e4ff 10516 int border=0, userData=None) -> wx.GBSizerItem
248ed943
RD
10517
10518 Adds an item to the sizer at the grid cell *pos*, optionally spanning
10519 more than one row or column as specified with *span*. The remaining
10520 args behave similarly to `wx.Sizer.Add`.
10521
10522 Returns True if the item was successfully placed at the given cell
10523 position, False if something was already there.
10524
0df68c9f 10525 """
54f9ee45 10526 return _core_.GridBagSizer_Add(*args, **kwargs)
e811c8ce
RD
10527
10528 def AddItem(*args, **kwargs):
248ed943 10529 """
d3b6e4ff 10530 Add(self, GBSizerItem item) -> wx.GBSizerItem
248ed943
RD
10531
10532 Add an item to the sizer using a `wx.GBSizerItem`. Returns True if
10533 the item was successfully placed at its given cell position, False if
10534 something was already there.
10535 """
54f9ee45 10536 return _core_.GridBagSizer_AddItem(*args, **kwargs)
e811c8ce 10537
84f85550
RD
10538 def GetCellSize(*args, **kwargs):
10539 """
10540 GetCellSize(self, int row, int col) -> Size
10541
10542 Get the size of the specified cell, including hgap and
10543 vgap. Only valid after a Layout.
10544 """
10545 return _core_.GridBagSizer_GetCellSize(*args, **kwargs)
10546
e811c8ce 10547 def GetEmptyCellSize(*args, **kwargs):
248ed943
RD
10548 """
10549 GetEmptyCellSize(self) -> Size
10550
10551 Get the size used for cells in the grid with no item.
10552 """
54f9ee45 10553 return _core_.GridBagSizer_GetEmptyCellSize(*args, **kwargs)
e811c8ce
RD
10554
10555 def SetEmptyCellSize(*args, **kwargs):
248ed943
RD
10556 """
10557 SetEmptyCellSize(self, Size sz)
10558
10559 Set the size used for cells in the grid with no item.
10560 """
54f9ee45 10561 return _core_.GridBagSizer_SetEmptyCellSize(*args, **kwargs)
e811c8ce
RD
10562
10563 def GetItemPosition(*args):
0df68c9f 10564 """
248ed943
RD
10565 GetItemPosition(self, item) -> GBPosition
10566
10567 Get the grid position of the specified *item* where *item* is either a
10568 window or subsizer that is a member of this sizer, or a zero-based
10569 index of an item.
0df68c9f 10570 """
54f9ee45 10571 return _core_.GridBagSizer_GetItemPosition(*args)
e811c8ce
RD
10572
10573 def SetItemPosition(*args):
0df68c9f 10574 """
248ed943
RD
10575 SetItemPosition(self, item, GBPosition pos) -> bool
10576
10577 Set the grid position of the specified *item* where *item* is either a
10578 window or subsizer that is a member of this sizer, or a zero-based
10579 index of an item. Returns True on success. If the move is not
10580 allowed (because an item is already there) then False is returned.
10581
0df68c9f 10582 """
54f9ee45 10583 return _core_.GridBagSizer_SetItemPosition(*args)
e811c8ce
RD
10584
10585 def GetItemSpan(*args):
0df68c9f 10586 """
248ed943
RD
10587 GetItemSpan(self, item) -> GBSpan
10588
10589 Get the row/col spanning of the specified *item* where *item* is
10590 either a window or subsizer that is a member of this sizer, or a
10591 zero-based index of an item.
0df68c9f 10592 """
54f9ee45 10593 return _core_.GridBagSizer_GetItemSpan(*args)
e811c8ce
RD
10594
10595 def SetItemSpan(*args):
0df68c9f 10596 """
248ed943
RD
10597 SetItemSpan(self, item, GBSpan span) -> bool
10598
10599 Set the row/col spanning of the specified *item* where *item* is
10600 either a window or subsizer that is a member of this sizer, or a
10601 zero-based index of an item. Returns True on success. If the move is
10602 not allowed (because an item is already there) then False is returned.
0df68c9f 10603 """
54f9ee45 10604 return _core_.GridBagSizer_SetItemSpan(*args)
e811c8ce
RD
10605
10606 def FindItem(*args):
0df68c9f 10607 """
248ed943
RD
10608 FindItem(self, item) -> GBSizerItem
10609
10610 Find the sizer item for the given window or subsizer, returns None if
10611 not found. (non-recursive)
0df68c9f 10612 """
54f9ee45 10613 return _core_.GridBagSizer_FindItem(*args)
e811c8ce
RD
10614
10615 def FindItemAtPosition(*args, **kwargs):
248ed943
RD
10616 """
10617 FindItemAtPosition(self, GBPosition pos) -> GBSizerItem
10618
10619 Return the sizer item for the given grid cell, or None if there is no
10620 item at that position. (non-recursive)
10621 """
54f9ee45 10622 return _core_.GridBagSizer_FindItemAtPosition(*args, **kwargs)
e811c8ce
RD
10623
10624 def FindItemAtPoint(*args, **kwargs):
248ed943
RD
10625 """
10626 FindItemAtPoint(self, Point pt) -> GBSizerItem
10627
10628 Return the sizer item located at the point given in *pt*, or None if
10629 there is no item at that point. The (x,y) coordinates in pt correspond
10630 to the client coordinates of the window using the sizer for
10631 layout. (non-recursive)
10632 """
54f9ee45 10633 return _core_.GridBagSizer_FindItemAtPoint(*args, **kwargs)
e811c8ce 10634
248ed943
RD
10635 def CheckForIntersection(*args, **kwargs):
10636 """
10637 CheckForIntersection(self, GBSizerItem item, GBSizerItem excludeItem=None) -> bool
e811c8ce 10638
248ed943
RD
10639 Look at all items and see if any intersect (or would overlap) the
10640 given *item*. Returns True if so, False if there would be no overlap.
10641 If an *excludeItem* is given then it will not be checked for
10642 intersection, for example it may be the item we are checking the
10643 position of.
e811c8ce 10644
248ed943
RD
10645 """
10646 return _core_.GridBagSizer_CheckForIntersection(*args, **kwargs)
e811c8ce 10647
248ed943 10648 def CheckForIntersectionPos(*args, **kwargs):
0df68c9f 10649 """
248ed943
RD
10650 CheckForIntersectionPos(self, GBPosition pos, GBSpan span, GBSizerItem excludeItem=None) -> bool
10651
10652 Look at all items and see if any intersect (or would overlap) the
10653 given position and span. Returns True if so, False if there would be
10654 no overlap. If an *excludeItem* is given then it will not be checked
10655 for intersection, for example it may be the item we are checking the
10656 position of.
0df68c9f 10657 """
248ed943 10658 return _core_.GridBagSizer_CheckForIntersectionPos(*args, **kwargs)
e811c8ce 10659
d14a1e28
RD
10660
10661class GridBagSizerPtr(GridBagSizer):
10662 def __init__(self, this):
10663 self.this = this
10664 if not hasattr(self,"thisown"): self.thisown = 0
10665 self.__class__ = GridBagSizer
54f9ee45 10666_core_.GridBagSizer_swigregister(GridBagSizerPtr)
d14a1e28
RD
10667
10668#---------------------------------------------------------------------------
10669
54f9ee45
RD
10670Left = _core_.Left
10671Top = _core_.Top
10672Right = _core_.Right
10673Bottom = _core_.Bottom
10674Width = _core_.Width
10675Height = _core_.Height
10676Centre = _core_.Centre
10677Center = _core_.Center
10678CentreX = _core_.CentreX
10679CentreY = _core_.CentreY
10680Unconstrained = _core_.Unconstrained
10681AsIs = _core_.AsIs
10682PercentOf = _core_.PercentOf
10683Above = _core_.Above
10684Below = _core_.Below
10685LeftOf = _core_.LeftOf
10686RightOf = _core_.RightOf
10687SameAs = _core_.SameAs
10688Absolute = _core_.Absolute
d14a1e28 10689class IndividualLayoutConstraint(Object):
15afbcd0 10690 """
41e2b43e
RD
10691 Objects of this class are stored in the `wx.LayoutConstraints` class as
10692 one of eight possible constraints that a window can be involved in.
10693 You will never need to create an instance of
10694 wx.IndividualLayoutConstraint, rather you should create a
10695 `wx.LayoutConstraints` instance and use the individual contstraints
15afbcd0 10696 that it contains.
15afbcd0 10697 """
d14a1e28
RD
10698 def __init__(self): raise RuntimeError, "No constructor defined"
10699 def __repr__(self):
10700 return "<%s.%s; proxy of C++ wxIndividualLayoutConstraint instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
e811c8ce 10701 def Set(*args, **kwargs):
41e2b43e
RD
10702 """
10703 Set(self, int rel, Window otherW, int otherE, int val=0, int marg=wxLAYOUT_DEFAULT_MARGIN)
10704
10705 Sets the properties of the constraint. Normally called by one of the
10706 convenience functions such as Above, RightOf, SameAs.
10707 """
54f9ee45 10708 return _core_.IndividualLayoutConstraint_Set(*args, **kwargs)
e811c8ce
RD
10709
10710 def LeftOf(*args, **kwargs):
15afbcd0 10711 """
a95a7133 10712 LeftOf(self, Window sibling, int marg=0)
15afbcd0 10713
41e2b43e
RD
10714 Constrains this edge to be to the left of the given window, with an
10715 optional margin. Implicitly, this is relative to the left edge of the
10716 other window.
15afbcd0 10717 """
54f9ee45 10718 return _core_.IndividualLayoutConstraint_LeftOf(*args, **kwargs)
e811c8ce
RD
10719
10720 def RightOf(*args, **kwargs):
15afbcd0 10721 """
a95a7133 10722 RightOf(self, Window sibling, int marg=0)
15afbcd0 10723
41e2b43e
RD
10724 Constrains this edge to be to the right of the given window, with an
10725 optional margin. Implicitly, this is relative to the right edge of the
10726 other window.
15afbcd0 10727 """
54f9ee45 10728 return _core_.IndividualLayoutConstraint_RightOf(*args, **kwargs)
e811c8ce
RD
10729
10730 def Above(*args, **kwargs):
15afbcd0 10731 """
a95a7133 10732 Above(self, Window sibling, int marg=0)
15afbcd0 10733
41e2b43e
RD
10734 Constrains this edge to be above the given window, with an optional
10735 margin. Implicitly, this is relative to the top edge of the other
10736 window.
15afbcd0 10737 """
54f9ee45 10738 return _core_.IndividualLayoutConstraint_Above(*args, **kwargs)
e811c8ce
RD
10739
10740 def Below(*args, **kwargs):
15afbcd0 10741 """
a95a7133 10742 Below(self, Window sibling, int marg=0)
15afbcd0 10743
41e2b43e
RD
10744 Constrains this edge to be below the given window, with an optional
10745 margin. Implicitly, this is relative to the bottom edge of the other
10746 window.
15afbcd0 10747 """
54f9ee45 10748 return _core_.IndividualLayoutConstraint_Below(*args, **kwargs)
e811c8ce
RD
10749
10750 def SameAs(*args, **kwargs):
15afbcd0 10751 """
a95a7133 10752 SameAs(self, Window otherW, int edge, int marg=0)
15afbcd0 10753
41e2b43e
RD
10754 Constrains this edge or dimension to be to the same as the edge of the
10755 given window, with an optional margin.
15afbcd0 10756 """
54f9ee45 10757 return _core_.IndividualLayoutConstraint_SameAs(*args, **kwargs)
e811c8ce
RD
10758
10759 def PercentOf(*args, **kwargs):
15afbcd0 10760 """
a95a7133 10761 PercentOf(self, Window otherW, int wh, int per)
15afbcd0 10762
41e2b43e
RD
10763 Constrains this edge or dimension to be to a percentage of the given
10764 window, with an optional margin.
15afbcd0 10765 """
54f9ee45 10766 return _core_.IndividualLayoutConstraint_PercentOf(*args, **kwargs)
e811c8ce
RD
10767
10768 def Absolute(*args, **kwargs):
15afbcd0 10769 """
a95a7133 10770 Absolute(self, int val)
15afbcd0 10771
41e2b43e 10772 Constrains this edge or dimension to be the given absolute value.
15afbcd0 10773 """
54f9ee45 10774 return _core_.IndividualLayoutConstraint_Absolute(*args, **kwargs)
e811c8ce
RD
10775
10776 def Unconstrained(*args, **kwargs):
15afbcd0 10777 """
a95a7133 10778 Unconstrained(self)
15afbcd0 10779
41e2b43e
RD
10780 Sets this edge or dimension to be unconstrained, that is, dependent on
10781 other edges and dimensions from which this value can be deduced.
15afbcd0 10782 """
54f9ee45 10783 return _core_.IndividualLayoutConstraint_Unconstrained(*args, **kwargs)
e811c8ce
RD
10784
10785 def AsIs(*args, **kwargs):
15afbcd0 10786 """
a95a7133 10787 AsIs(self)
15afbcd0 10788
41e2b43e
RD
10789 Sets this edge or constraint to be whatever the window's value is at
10790 the moment. If either of the width and height constraints are *as is*,
10791 the window will not be resized, but moved instead. This is important
10792 when considering panel items which are intended to have a default
10793 size, such as a button, which may take its size from the size of the
10794 button label.
15afbcd0 10795 """
54f9ee45 10796 return _core_.IndividualLayoutConstraint_AsIs(*args, **kwargs)
e811c8ce
RD
10797
10798 def GetOtherWindow(*args, **kwargs):
a95a7133 10799 """GetOtherWindow(self) -> Window"""
54f9ee45 10800 return _core_.IndividualLayoutConstraint_GetOtherWindow(*args, **kwargs)
e811c8ce
RD
10801
10802 def GetMyEdge(*args, **kwargs):
a95a7133 10803 """GetMyEdge(self) -> int"""
54f9ee45 10804 return _core_.IndividualLayoutConstraint_GetMyEdge(*args, **kwargs)
e811c8ce
RD
10805
10806 def SetEdge(*args, **kwargs):
a95a7133 10807 """SetEdge(self, int which)"""
54f9ee45 10808 return _core_.IndividualLayoutConstraint_SetEdge(*args, **kwargs)
e811c8ce
RD
10809
10810 def SetValue(*args, **kwargs):
a95a7133 10811 """SetValue(self, int v)"""
54f9ee45 10812 return _core_.IndividualLayoutConstraint_SetValue(*args, **kwargs)
e811c8ce
RD
10813
10814 def GetMargin(*args, **kwargs):
a95a7133 10815 """GetMargin(self) -> int"""
54f9ee45 10816 return _core_.IndividualLayoutConstraint_GetMargin(*args, **kwargs)
e811c8ce
RD
10817
10818 def SetMargin(*args, **kwargs):
a95a7133 10819 """SetMargin(self, int m)"""
54f9ee45 10820 return _core_.IndividualLayoutConstraint_SetMargin(*args, **kwargs)
e811c8ce
RD
10821
10822 def GetValue(*args, **kwargs):
a95a7133 10823 """GetValue(self) -> int"""
54f9ee45 10824 return _core_.IndividualLayoutConstraint_GetValue(*args, **kwargs)
e811c8ce
RD
10825
10826 def GetPercent(*args, **kwargs):
a95a7133 10827 """GetPercent(self) -> int"""
54f9ee45 10828 return _core_.IndividualLayoutConstraint_GetPercent(*args, **kwargs)
e811c8ce
RD
10829
10830 def GetOtherEdge(*args, **kwargs):
a95a7133 10831 """GetOtherEdge(self) -> int"""
54f9ee45 10832 return _core_.IndividualLayoutConstraint_GetOtherEdge(*args, **kwargs)
e811c8ce
RD
10833
10834 def GetDone(*args, **kwargs):
a95a7133 10835 """GetDone(self) -> bool"""
54f9ee45 10836 return _core_.IndividualLayoutConstraint_GetDone(*args, **kwargs)
e811c8ce
RD
10837
10838 def SetDone(*args, **kwargs):
a95a7133 10839 """SetDone(self, bool d)"""
54f9ee45 10840 return _core_.IndividualLayoutConstraint_SetDone(*args, **kwargs)
e811c8ce
RD
10841
10842 def GetRelationship(*args, **kwargs):
a95a7133 10843 """GetRelationship(self) -> int"""
54f9ee45 10844 return _core_.IndividualLayoutConstraint_GetRelationship(*args, **kwargs)
e811c8ce
RD
10845
10846 def SetRelationship(*args, **kwargs):
a95a7133 10847 """SetRelationship(self, int r)"""
54f9ee45 10848 return _core_.IndividualLayoutConstraint_SetRelationship(*args, **kwargs)
e811c8ce
RD
10849
10850 def ResetIfWin(*args, **kwargs):
15afbcd0 10851 """
a95a7133 10852 ResetIfWin(self, Window otherW) -> bool
15afbcd0
RD
10853
10854 Reset constraint if it mentions otherWin
10855 """
54f9ee45 10856 return _core_.IndividualLayoutConstraint_ResetIfWin(*args, **kwargs)
e811c8ce
RD
10857
10858 def SatisfyConstraint(*args, **kwargs):
15afbcd0 10859 """
a95a7133 10860 SatisfyConstraint(self, LayoutConstraints constraints, Window win) -> bool
15afbcd0
RD
10861
10862 Try to satisfy constraint
10863 """
54f9ee45 10864 return _core_.IndividualLayoutConstraint_SatisfyConstraint(*args, **kwargs)
e811c8ce
RD
10865
10866 def GetEdge(*args, **kwargs):
15afbcd0 10867 """
a95a7133 10868 GetEdge(self, int which, Window thisWin, Window other) -> int
15afbcd0
RD
10869
10870 Get the value of this edge or dimension, or if this
10871 is not determinable, -1.
10872 """
54f9ee45 10873 return _core_.IndividualLayoutConstraint_GetEdge(*args, **kwargs)
e811c8ce 10874
d14a1e28
RD
10875
10876class IndividualLayoutConstraintPtr(IndividualLayoutConstraint):
10877 def __init__(self, this):
10878 self.this = this
10879 if not hasattr(self,"thisown"): self.thisown = 0
10880 self.__class__ = IndividualLayoutConstraint
54f9ee45 10881_core_.IndividualLayoutConstraint_swigregister(IndividualLayoutConstraintPtr)
d14a1e28
RD
10882
10883class LayoutConstraints(Object):
15afbcd0 10884 """
41e2b43e
RD
10885 **Note:** constraints are now deprecated and you should use sizers
10886 instead.
15afbcd0 10887
41e2b43e
RD
10888 Objects of this class can be associated with a window to define its
10889 layout constraints, with respect to siblings or its parent.
15afbcd0
RD
10890
10891 The class consists of the following eight constraints of class
10892 wx.IndividualLayoutConstraint, some or all of which should be accessed
10893 directly to set the appropriate constraints.
10894
10895 * left: represents the left hand edge of the window
10896 * right: represents the right hand edge of the window
10897 * top: represents the top edge of the window
10898 * bottom: represents the bottom edge of the window
10899 * width: represents the width of the window
10900 * height: represents the height of the window
10901 * centreX: represents the horizontal centre point of the window
10902 * centreY: represents the vertical centre point of the window
10903
41e2b43e
RD
10904 Most constraints are initially set to have the relationship
10905 wxUnconstrained, which means that their values should be calculated by
10906 looking at known constraints. The exceptions are width and height,
10907 which are set to wxAsIs to ensure that if the user does not specify a
10908 constraint, the existing width and height will be used, to be
10909 compatible with panel items which often have take a default size. If
10910 the constraint is ``wx.AsIs``, the dimension will not be changed.
10911
10912 :see: `wx.IndividualLayoutConstraint`, `wx.Window.SetConstraints`
15afbcd0
RD
10913
10914 """
e811c8ce
RD
10915 def __repr__(self):
10916 return "<%s.%s; proxy of C++ wxLayoutConstraints instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
54f9ee45
RD
10917 left = property(_core_.LayoutConstraints_left_get)
10918 top = property(_core_.LayoutConstraints_top_get)
10919 right = property(_core_.LayoutConstraints_right_get)
10920 bottom = property(_core_.LayoutConstraints_bottom_get)
10921 width = property(_core_.LayoutConstraints_width_get)
10922 height = property(_core_.LayoutConstraints_height_get)
10923 centreX = property(_core_.LayoutConstraints_centreX_get)
10924 centreY = property(_core_.LayoutConstraints_centreY_get)
d14a1e28 10925 def __init__(self, *args, **kwargs):
a95a7133 10926 """__init__(self) -> LayoutConstraints"""
54f9ee45 10927 newobj = _core_.new_LayoutConstraints(*args, **kwargs)
d14a1e28
RD
10928 self.this = newobj.this
10929 self.thisown = 1
10930 del newobj.thisown
e811c8ce 10931 def SatisfyConstraints(*args, **kwargs):
6c3b4aae 10932 """SatisfyConstraints(Window win) -> (areSatisfied, noChanges)"""
54f9ee45 10933 return _core_.LayoutConstraints_SatisfyConstraints(*args, **kwargs)
e811c8ce
RD
10934
10935 def AreSatisfied(*args, **kwargs):
a95a7133 10936 """AreSatisfied(self) -> bool"""
54f9ee45 10937 return _core_.LayoutConstraints_AreSatisfied(*args, **kwargs)
e811c8ce 10938
d14a1e28
RD
10939
10940class LayoutConstraintsPtr(LayoutConstraints):
10941 def __init__(self, this):
10942 self.this = this
10943 if not hasattr(self,"thisown"): self.thisown = 0
10944 self.__class__ = LayoutConstraints
54f9ee45 10945_core_.LayoutConstraints_swigregister(LayoutConstraintsPtr)
d14a1e28
RD
10946
10947#----------------------------------------------------------------------------
10948
322913ce 10949# Use Python's bool constants if available, make some if not
d14a1e28
RD
10950try:
10951 True
10952except NameError:
322913ce
RD
10953 __builtins__.True = 1==1
10954 __builtins__.False = 1==0
4f89f6a3
RD
10955 def bool(value): return not not value
10956 __builtins__.bool = bool
d14a1e28 10957
d14a1e28
RD
10958
10959
10960# workarounds for bad wxRTTI names
10961__wxPyPtrTypeMap['wxGauge95'] = 'wxGauge'
10962__wxPyPtrTypeMap['wxSlider95'] = 'wxSlider'
10963__wxPyPtrTypeMap['wxStatusBar95'] = 'wxStatusBar'
10964
10965
10966#----------------------------------------------------------------------------
10967# Load version numbers from __version__... Ensure that major and minor
7bc1e663 10968# versions are the same for both wxPython and wxWidgets.
d14a1e28
RD
10969
10970from __version__ import *
10971__version__ = VERSION_STRING
10972
7bc1e663
RD
10973assert MAJOR_VERSION == _core_.MAJOR_VERSION, "wxPython/wxWidgets version mismatch"
10974assert MINOR_VERSION == _core_.MINOR_VERSION, "wxPython/wxWidgets version mismatch"
54f9ee45 10975if RELEASE_VERSION != _core_.RELEASE_VERSION:
d14a1e28 10976 import warnings
7bc1e663 10977 warnings.warn("wxPython/wxWidgets release number mismatch")
d14a1e28
RD
10978
10979#----------------------------------------------------------------------------
10980
e505d15e
RD
10981# Set the default string<-->unicode conversion encoding from the
10982# locale. This encoding is used when string or unicode objects need
10983# to be converted in order to pass them to wxWidgets. Please be aware
10984# that the default encoding within the same locale may be slightly
10985# different on different platforms. For example, please see
10986# http://www.alanwood.net/demos/charsetdiffs.html for differences
10987# between the common latin/roman encodings.
5cbf236d
RD
10988import locale
10989default = locale.getdefaultlocale()[1]
10990if default:
10991 wx.SetDefaultPyEncoding(default)
10992del default
10993del locale
10994
10995#----------------------------------------------------------------------------
10996
d14a1e28
RD
10997class PyDeadObjectError(AttributeError):
10998 pass
10999
d14a1e28
RD
11000class _wxPyDeadObject(object):
11001 """
11002 Instances of wx objects that are OOR capable will have their __class__
11003 changed to this class when the C++ object is deleted. This should help
11004 prevent crashes due to referencing a bogus C++ pointer.
11005 """
11006 reprStr = "wxPython wrapper for DELETED %s object! (The C++ object no longer exists.)"
11007 attrStr = "The C++ part of the %s object has been deleted, attribute access no longer allowed."
11008
3a04f143 11009 def __repr__(self):
d14a1e28
RD
11010 if not hasattr(self, "_name"):
11011 self._name = "[unknown]"
11012 return self.reprStr % self._name
11013
3a04f143 11014 def __getattr__(self, *args):
d14a1e28
RD
11015 if not hasattr(self, "_name"):
11016 self._name = "[unknown]"
3a04f143
RD
11017 raise PyDeadObjectError(self.attrStr % self._name)
11018
11019 def __nonzero__(self):
11020 return 0
11021
11022
11023
11024class PyUnbornObjectError(AttributeError):
11025 pass
11026
11027class _wxPyUnbornObject(object):
11028 """
54f9ee45 11029 Some stock objects are created when the wx._core module is
3a04f143
RD
11030 imported, but their C++ instance is not created until the wx.App
11031 object is created and initialized. These object instances will
11032 temporarily have their __class__ changed to this class so an
11033 exception will be raised if they are used before the C++ instance
11034 is ready.
11035 """
11036
11037 reprStr = "wxPython wrapper for UNBORN object! (The C++ object is not initialized yet.)"
11038 attrStr = "The C++ part of this object has not been initialized, attribute access not allowed."
11039
11040 def __repr__(self):
11041 #if not hasattr(self, "_name"):
11042 # self._name = "[unknown]"
11043 return self.reprStr #% self._name
11044
11045 def __getattr__(self, *args):
11046 #if not hasattr(self, "_name"):
11047 # self._name = "[unknown]"
11048 raise PyUnbornObjectError(self.attrStr) # % self._name )
d14a1e28
RD
11049
11050 def __nonzero__(self):
11051 return 0
11052
11053
11054#----------------------------------------------------------------------------
d14a1e28
RD
11055
11056def CallAfter(callable, *args, **kw):
11057 """
11058 Call the specified function after the current and pending event
11059 handlers have been completed. This is also good for making GUI
61863841
RD
11060 method calls from non-GUI threads. Any extra positional or
11061 keyword args are passed on to the callable when it is called.
11062
11063 :see: `wx.FutureCall`
d14a1e28
RD
11064 """
11065 app = wx.GetApp()
dfbb5885 11066 assert app is not None, 'No wx.App created yet'
d14a1e28 11067
148275d3
RD
11068 if not hasattr(app, "_CallAfterId"):
11069 app._CallAfterId = wx.NewEventType()
11070 app.Connect(-1, -1, app._CallAfterId,
11071 lambda event: event.callable(*event.args, **event.kw) )
d14a1e28 11072 evt = wx.PyEvent()
148275d3 11073 evt.SetEventType(app._CallAfterId)
d14a1e28
RD
11074 evt.callable = callable
11075 evt.args = args
11076 evt.kw = kw
11077 wx.PostEvent(app, evt)
11078
d14a1e28
RD
11079#----------------------------------------------------------------------------
11080
11081
11082class FutureCall:
11083 """
8ac8dba0 11084 A convenience class for `wx.Timer`, that calls the given callable
d14a1e28
RD
11085 object once after the given amount of milliseconds, passing any
11086 positional or keyword args. The return value of the callable is
61863841 11087 availbale after it has been run with the `GetResult` method.
d14a1e28
RD
11088
11089 If you don't need to get the return value or restart the timer
11090 then there is no need to hold a reference to this object. It will
11091 hold a reference to itself while the timer is running (the timer
11092 has a reference to self.Notify) but the cycle will be broken when
11093 the timer completes, automatically cleaning up the wx.FutureCall
11094 object.
61863841
RD
11095
11096 :see: `wx.CallAfter`
d14a1e28
RD
11097 """
11098 def __init__(self, millis, callable, *args, **kwargs):
11099 self.millis = millis
11100 self.callable = callable
11101 self.SetArgs(*args, **kwargs)
11102 self.runCount = 0
4276dc52 11103 self.running = False
d14a1e28
RD
11104 self.hasRun = False
11105 self.result = None
11106 self.timer = None
11107 self.Start()
11108
11109 def __del__(self):
11110 self.Stop()
11111
11112
11113 def Start(self, millis=None, *args, **kwargs):
11114 """
11115 (Re)start the timer
11116 """
11117 self.hasRun = False
11118 if millis is not None:
11119 self.millis = millis
11120 if args or kwargs:
11121 self.SetArgs(*args, **kwargs)
11122 self.Stop()
11123 self.timer = wx.PyTimer(self.Notify)
11124 self.timer.Start(self.millis, wx.TIMER_ONE_SHOT)
4276dc52 11125 self.running = True
d14a1e28
RD
11126 Restart = Start
11127
11128
11129 def Stop(self):
11130 """
11131 Stop and destroy the timer.
11132 """
11133 if self.timer is not None:
11134 self.timer.Stop()
11135 self.timer = None
11136
11137
11138 def GetInterval(self):
11139 if self.timer is not None:
11140 return self.timer.GetInterval()
11141 else:
11142 return 0
11143
11144
11145 def IsRunning(self):
11146 return self.timer is not None and self.timer.IsRunning()
11147
11148
11149 def SetArgs(self, *args, **kwargs):
11150 """
11151 (Re)set the args passed to the callable object. This is
11152 useful in conjunction with Restart if you want to schedule a
11153 new call to the same callable object but with different
11154 parameters.
11155 """
11156 self.args = args
11157 self.kwargs = kwargs
11158
11159
11160 def HasRun(self):
11161 return self.hasRun
11162
11163 def GetResult(self):
11164 return self.result
11165
11166 def Notify(self):
11167 """
11168 The timer has expired so call the callable.
11169 """
11170 if self.callable and getattr(self.callable, 'im_self', True):
11171 self.runCount += 1
4276dc52 11172 self.running = False
d14a1e28
RD
11173 self.result = self.callable(*self.args, **self.kwargs)
11174 self.hasRun = True
4276dc52
RD
11175 if not self.running:
11176 # if it wasn't restarted, then cleanup
11177 wx.CallAfter(self.Stop)
d14a1e28
RD
11178
11179
a95a7133
RD
11180
11181#----------------------------------------------------------------------------
11182# Control which items in this module should be documented by epydoc.
11183# We allow only classes and functions, which will help reduce the size
11184# of the docs by filtering out the zillions of constants, EVT objects,
11185# and etc that don't make much sense by themselves, but are instead
11186# documented (or will be) as part of the classes/functions/methods
11187# where they should be used.
11188
66c033b4
RD
11189class __DocFilter:
11190 """
11191 A filter for epydoc that only allows non-Ptr classes and
11192 fucntions, in order to reduce the clutter in the API docs.
11193 """
11194 def __init__(self, globals):
11195 self._globals = globals
11196
11197 def __call__(self, name):
11198 import types
11199 obj = self._globals.get(name, None)
11200 if type(obj) not in [type, types.ClassType, types.FunctionType, types.BuiltinFunctionType]:
11201 return False
11202 if name.startswith('_') or name.endswith('Ptr') or name.startswith('EVT'):
11203 return False
11204 return True
a95a7133 11205
d14a1e28
RD
11206#----------------------------------------------------------------------------
11207#----------------------------------------------------------------------------
11208
11209# Import other modules in this package that should show up in the
11210# "core" wx namespace
54f9ee45
RD
11211from _gdi import *
11212from _windows import *
11213from _controls import *
11214from _misc import *
d14a1e28 11215
3a04f143
RD
11216
11217# Fixup the stock objects since they can't be used yet. (They will be
11218# restored in wx.PyApp.OnInit.)
54f9ee45 11219_core_._wxPyFixStockObjects()
3a04f143 11220
d14a1e28
RD
11221#----------------------------------------------------------------------------
11222#----------------------------------------------------------------------------
11223
11224