]> git.saurik.com Git - wxWidgets.git/blame - wxPython/src/gtk/_core.py
Add more art IDs
[wxWidgets.git] / wxPython / src / gtk / _core.py
CommitLineData
d14a1e28
RD
1# This file was created automatically by SWIG.
2# Don't modify this file, modify the SWIG interface instead.
3
54f9ee45 4import _core_
d14a1e28 5
093d3ff1
RD
6def _swig_setattr_nondynamic(self,class_type,name,value,static=1):
7 if (name == "this"):
8 if isinstance(value, class_type):
9 self.__dict__[name] = value.this
10 if hasattr(value,"thisown"): self.__dict__["thisown"] = value.thisown
11 del value.thisown
12 return
13 method = class_type.__swig_setmethods__.get(name,None)
14 if method: return method(self,value)
15 if (not static) or hasattr(self,name) or (name == "thisown"):
16 self.__dict__[name] = value
17 else:
18 raise AttributeError("You cannot add attributes to %s" % self)
19
20def _swig_setattr(self,class_type,name,value):
21 return _swig_setattr_nondynamic(self,class_type,name,value,0)
22
23def _swig_getattr(self,class_type,name):
24 method = class_type.__swig_getmethods__.get(name,None)
25 if method: return method(self)
26 raise AttributeError,name
27
28import types
29try:
30 _object = types.ObjectType
31 _newclass = 1
32except AttributeError:
33 class _object : pass
34 _newclass = 0
35del types
36
37
38def _swig_setattr_nondynamic_method(set):
39 def set_attr(self,name,value):
40 if hasattr(self,name) or (name in ("this", "thisown")):
41 set(self,name,value)
42 else:
43 raise AttributeError("You cannot add attributes to %s" % self)
44 return set_attr
45
46
d14a1e28
RD
47#// Give a reference to the dictionary of this module to the C++ extension
48#// code.
54f9ee45 49_core_._wxPySetDictionary(vars())
d14a1e28
RD
50
51#// A little trick to make 'wx' be a reference to this module so wx.Names can
52#// be used here.
53import sys as _sys
54wx = _sys.modules[__name__]
55
66c033b4
RD
56
57#----------------------------------------------------------------------------
58
59def _deprecated(callable, msg=None):
60 """
61 Create a wrapper function that will raise a DeprecationWarning
62 before calling the callable.
63 """
64 if msg is None:
65 msg = "%s is deprecated" % callable
66 def deprecatedWrapper(*args, **kwargs):
67 import warnings
68 warnings.warn(msg, DeprecationWarning, stacklevel=2)
69 return callable(*args, **kwargs)
70 deprecatedWrapper.__doc__ = msg
71 return deprecatedWrapper
72
73
74#----------------------------------------------------------------------------
75
54f9ee45
RD
76NOT_FOUND = _core_.NOT_FOUND
77VSCROLL = _core_.VSCROLL
78HSCROLL = _core_.HSCROLL
79CAPTION = _core_.CAPTION
80DOUBLE_BORDER = _core_.DOUBLE_BORDER
81SUNKEN_BORDER = _core_.SUNKEN_BORDER
82RAISED_BORDER = _core_.RAISED_BORDER
83BORDER = _core_.BORDER
84SIMPLE_BORDER = _core_.SIMPLE_BORDER
85STATIC_BORDER = _core_.STATIC_BORDER
86TRANSPARENT_WINDOW = _core_.TRANSPARENT_WINDOW
87NO_BORDER = _core_.NO_BORDER
88TAB_TRAVERSAL = _core_.TAB_TRAVERSAL
89WANTS_CHARS = _core_.WANTS_CHARS
90POPUP_WINDOW = _core_.POPUP_WINDOW
91CENTER_FRAME = _core_.CENTER_FRAME
92CENTRE_ON_SCREEN = _core_.CENTRE_ON_SCREEN
93CENTER_ON_SCREEN = _core_.CENTER_ON_SCREEN
94ED_CLIENT_MARGIN = _core_.ED_CLIENT_MARGIN
95ED_BUTTONS_BOTTOM = _core_.ED_BUTTONS_BOTTOM
96ED_BUTTONS_RIGHT = _core_.ED_BUTTONS_RIGHT
97ED_STATIC_LINE = _core_.ED_STATIC_LINE
98EXT_DIALOG_STYLE = _core_.EXT_DIALOG_STYLE
99CLIP_CHILDREN = _core_.CLIP_CHILDREN
100CLIP_SIBLINGS = _core_.CLIP_SIBLINGS
101ALWAYS_SHOW_SB = _core_.ALWAYS_SHOW_SB
102RETAINED = _core_.RETAINED
103BACKINGSTORE = _core_.BACKINGSTORE
104COLOURED = _core_.COLOURED
105FIXED_LENGTH = _core_.FIXED_LENGTH
106LB_NEEDED_SB = _core_.LB_NEEDED_SB
107LB_ALWAYS_SB = _core_.LB_ALWAYS_SB
108LB_SORT = _core_.LB_SORT
109LB_SINGLE = _core_.LB_SINGLE
110LB_MULTIPLE = _core_.LB_MULTIPLE
111LB_EXTENDED = _core_.LB_EXTENDED
112LB_OWNERDRAW = _core_.LB_OWNERDRAW
113LB_HSCROLL = _core_.LB_HSCROLL
114PROCESS_ENTER = _core_.PROCESS_ENTER
115PASSWORD = _core_.PASSWORD
116CB_SIMPLE = _core_.CB_SIMPLE
117CB_DROPDOWN = _core_.CB_DROPDOWN
118CB_SORT = _core_.CB_SORT
119CB_READONLY = _core_.CB_READONLY
120RA_HORIZONTAL = _core_.RA_HORIZONTAL
121RA_VERTICAL = _core_.RA_VERTICAL
122RA_SPECIFY_ROWS = _core_.RA_SPECIFY_ROWS
123RA_SPECIFY_COLS = _core_.RA_SPECIFY_COLS
fef4c27a 124RA_USE_CHECKBOX = _core_.RA_USE_CHECKBOX
54f9ee45
RD
125RB_GROUP = _core_.RB_GROUP
126RB_SINGLE = _core_.RB_SINGLE
54f9ee45
RD
127SB_HORIZONTAL = _core_.SB_HORIZONTAL
128SB_VERTICAL = _core_.SB_VERTICAL
fef4c27a 129RB_USE_CHECKBOX = _core_.RB_USE_CHECKBOX
54f9ee45
RD
130ST_SIZEGRIP = _core_.ST_SIZEGRIP
131ST_NO_AUTORESIZE = _core_.ST_NO_AUTORESIZE
132FLOOD_SURFACE = _core_.FLOOD_SURFACE
133FLOOD_BORDER = _core_.FLOOD_BORDER
134ODDEVEN_RULE = _core_.ODDEVEN_RULE
135WINDING_RULE = _core_.WINDING_RULE
136TOOL_TOP = _core_.TOOL_TOP
137TOOL_BOTTOM = _core_.TOOL_BOTTOM
138TOOL_LEFT = _core_.TOOL_LEFT
139TOOL_RIGHT = _core_.TOOL_RIGHT
140OK = _core_.OK
141YES_NO = _core_.YES_NO
142CANCEL = _core_.CANCEL
143YES = _core_.YES
144NO = _core_.NO
145NO_DEFAULT = _core_.NO_DEFAULT
146YES_DEFAULT = _core_.YES_DEFAULT
147ICON_EXCLAMATION = _core_.ICON_EXCLAMATION
148ICON_HAND = _core_.ICON_HAND
149ICON_QUESTION = _core_.ICON_QUESTION
150ICON_INFORMATION = _core_.ICON_INFORMATION
151ICON_STOP = _core_.ICON_STOP
152ICON_ASTERISK = _core_.ICON_ASTERISK
153ICON_MASK = _core_.ICON_MASK
154ICON_WARNING = _core_.ICON_WARNING
155ICON_ERROR = _core_.ICON_ERROR
156FORWARD = _core_.FORWARD
157BACKWARD = _core_.BACKWARD
158RESET = _core_.RESET
159HELP = _core_.HELP
160MORE = _core_.MORE
161SETUP = _core_.SETUP
162SIZE_AUTO_WIDTH = _core_.SIZE_AUTO_WIDTH
163SIZE_AUTO_HEIGHT = _core_.SIZE_AUTO_HEIGHT
164SIZE_AUTO = _core_.SIZE_AUTO
165SIZE_USE_EXISTING = _core_.SIZE_USE_EXISTING
166SIZE_ALLOW_MINUS_ONE = _core_.SIZE_ALLOW_MINUS_ONE
167PORTRAIT = _core_.PORTRAIT
168LANDSCAPE = _core_.LANDSCAPE
169PRINT_QUALITY_HIGH = _core_.PRINT_QUALITY_HIGH
170PRINT_QUALITY_MEDIUM = _core_.PRINT_QUALITY_MEDIUM
171PRINT_QUALITY_LOW = _core_.PRINT_QUALITY_LOW
172PRINT_QUALITY_DRAFT = _core_.PRINT_QUALITY_DRAFT
173ID_ANY = _core_.ID_ANY
174ID_SEPARATOR = _core_.ID_SEPARATOR
175ID_LOWEST = _core_.ID_LOWEST
176ID_OPEN = _core_.ID_OPEN
177ID_CLOSE = _core_.ID_CLOSE
178ID_NEW = _core_.ID_NEW
179ID_SAVE = _core_.ID_SAVE
180ID_SAVEAS = _core_.ID_SAVEAS
181ID_REVERT = _core_.ID_REVERT
182ID_EXIT = _core_.ID_EXIT
183ID_UNDO = _core_.ID_UNDO
184ID_REDO = _core_.ID_REDO
185ID_HELP = _core_.ID_HELP
186ID_PRINT = _core_.ID_PRINT
187ID_PRINT_SETUP = _core_.ID_PRINT_SETUP
188ID_PREVIEW = _core_.ID_PREVIEW
189ID_ABOUT = _core_.ID_ABOUT
190ID_HELP_CONTENTS = _core_.ID_HELP_CONTENTS
191ID_HELP_COMMANDS = _core_.ID_HELP_COMMANDS
192ID_HELP_PROCEDURES = _core_.ID_HELP_PROCEDURES
193ID_HELP_CONTEXT = _core_.ID_HELP_CONTEXT
194ID_CLOSE_ALL = _core_.ID_CLOSE_ALL
195ID_PREFERENCES = _core_.ID_PREFERENCES
196ID_CUT = _core_.ID_CUT
197ID_COPY = _core_.ID_COPY
198ID_PASTE = _core_.ID_PASTE
199ID_CLEAR = _core_.ID_CLEAR
200ID_FIND = _core_.ID_FIND
201ID_DUPLICATE = _core_.ID_DUPLICATE
202ID_SELECTALL = _core_.ID_SELECTALL
203ID_DELETE = _core_.ID_DELETE
204ID_REPLACE = _core_.ID_REPLACE
205ID_REPLACE_ALL = _core_.ID_REPLACE_ALL
206ID_PROPERTIES = _core_.ID_PROPERTIES
207ID_VIEW_DETAILS = _core_.ID_VIEW_DETAILS
208ID_VIEW_LARGEICONS = _core_.ID_VIEW_LARGEICONS
209ID_VIEW_SMALLICONS = _core_.ID_VIEW_SMALLICONS
210ID_VIEW_LIST = _core_.ID_VIEW_LIST
211ID_VIEW_SORTDATE = _core_.ID_VIEW_SORTDATE
212ID_VIEW_SORTNAME = _core_.ID_VIEW_SORTNAME
213ID_VIEW_SORTSIZE = _core_.ID_VIEW_SORTSIZE
214ID_VIEW_SORTTYPE = _core_.ID_VIEW_SORTTYPE
215ID_FILE1 = _core_.ID_FILE1
216ID_FILE2 = _core_.ID_FILE2
217ID_FILE3 = _core_.ID_FILE3
218ID_FILE4 = _core_.ID_FILE4
219ID_FILE5 = _core_.ID_FILE5
220ID_FILE6 = _core_.ID_FILE6
221ID_FILE7 = _core_.ID_FILE7
222ID_FILE8 = _core_.ID_FILE8
223ID_FILE9 = _core_.ID_FILE9
224ID_OK = _core_.ID_OK
225ID_CANCEL = _core_.ID_CANCEL
226ID_APPLY = _core_.ID_APPLY
227ID_YES = _core_.ID_YES
228ID_NO = _core_.ID_NO
229ID_STATIC = _core_.ID_STATIC
230ID_FORWARD = _core_.ID_FORWARD
231ID_BACKWARD = _core_.ID_BACKWARD
232ID_DEFAULT = _core_.ID_DEFAULT
233ID_MORE = _core_.ID_MORE
234ID_SETUP = _core_.ID_SETUP
235ID_RESET = _core_.ID_RESET
236ID_CONTEXT_HELP = _core_.ID_CONTEXT_HELP
237ID_YESTOALL = _core_.ID_YESTOALL
238ID_NOTOALL = _core_.ID_NOTOALL
239ID_ABORT = _core_.ID_ABORT
240ID_RETRY = _core_.ID_RETRY
241ID_IGNORE = _core_.ID_IGNORE
7bc1e663
RD
242ID_ADD = _core_.ID_ADD
243ID_REMOVE = _core_.ID_REMOVE
244ID_UP = _core_.ID_UP
245ID_DOWN = _core_.ID_DOWN
246ID_HOME = _core_.ID_HOME
247ID_REFRESH = _core_.ID_REFRESH
248ID_STOP = _core_.ID_STOP
249ID_INDEX = _core_.ID_INDEX
250ID_BOLD = _core_.ID_BOLD
251ID_ITALIC = _core_.ID_ITALIC
252ID_JUSTIFY_CENTER = _core_.ID_JUSTIFY_CENTER
253ID_JUSTIFY_FILL = _core_.ID_JUSTIFY_FILL
254ID_JUSTIFY_RIGHT = _core_.ID_JUSTIFY_RIGHT
255ID_JUSTIFY_LEFT = _core_.ID_JUSTIFY_LEFT
256ID_UNDERLINE = _core_.ID_UNDERLINE
257ID_INDENT = _core_.ID_INDENT
258ID_UNINDENT = _core_.ID_UNINDENT
259ID_ZOOM_100 = _core_.ID_ZOOM_100
260ID_ZOOM_FIT = _core_.ID_ZOOM_FIT
261ID_ZOOM_IN = _core_.ID_ZOOM_IN
262ID_ZOOM_OUT = _core_.ID_ZOOM_OUT
263ID_UNDELETE = _core_.ID_UNDELETE
264ID_REVERT_TO_SAVED = _core_.ID_REVERT_TO_SAVED
54f9ee45
RD
265ID_HIGHEST = _core_.ID_HIGHEST
266OPEN = _core_.OPEN
267SAVE = _core_.SAVE
268HIDE_READONLY = _core_.HIDE_READONLY
269OVERWRITE_PROMPT = _core_.OVERWRITE_PROMPT
270FILE_MUST_EXIST = _core_.FILE_MUST_EXIST
271MULTIPLE = _core_.MULTIPLE
272CHANGE_DIR = _core_.CHANGE_DIR
273ACCEL_ALT = _core_.ACCEL_ALT
274ACCEL_CTRL = _core_.ACCEL_CTRL
275ACCEL_SHIFT = _core_.ACCEL_SHIFT
276ACCEL_NORMAL = _core_.ACCEL_NORMAL
277PD_AUTO_HIDE = _core_.PD_AUTO_HIDE
278PD_APP_MODAL = _core_.PD_APP_MODAL
279PD_CAN_ABORT = _core_.PD_CAN_ABORT
280PD_ELAPSED_TIME = _core_.PD_ELAPSED_TIME
281PD_ESTIMATED_TIME = _core_.PD_ESTIMATED_TIME
282PD_REMAINING_TIME = _core_.PD_REMAINING_TIME
e505d15e
RD
283PD_SMOOTH = _core_.PD_SMOOTH
284PD_CAN_SKIP = _core_.PD_CAN_SKIP
54f9ee45
RD
285DD_NEW_DIR_BUTTON = _core_.DD_NEW_DIR_BUTTON
286DD_DEFAULT_STYLE = _core_.DD_DEFAULT_STYLE
287MENU_TEAROFF = _core_.MENU_TEAROFF
288MB_DOCKABLE = _core_.MB_DOCKABLE
289NO_FULL_REPAINT_ON_RESIZE = _core_.NO_FULL_REPAINT_ON_RESIZE
290FULL_REPAINT_ON_RESIZE = _core_.FULL_REPAINT_ON_RESIZE
291LI_HORIZONTAL = _core_.LI_HORIZONTAL
292LI_VERTICAL = _core_.LI_VERTICAL
293WS_EX_VALIDATE_RECURSIVELY = _core_.WS_EX_VALIDATE_RECURSIVELY
294WS_EX_BLOCK_EVENTS = _core_.WS_EX_BLOCK_EVENTS
295WS_EX_TRANSIENT = _core_.WS_EX_TRANSIENT
296WS_EX_THEMED_BACKGROUND = _core_.WS_EX_THEMED_BACKGROUND
297WS_EX_PROCESS_IDLE = _core_.WS_EX_PROCESS_IDLE
298WS_EX_PROCESS_UI_UPDATES = _core_.WS_EX_PROCESS_UI_UPDATES
299MM_TEXT = _core_.MM_TEXT
300MM_LOMETRIC = _core_.MM_LOMETRIC
301MM_HIMETRIC = _core_.MM_HIMETRIC
302MM_LOENGLISH = _core_.MM_LOENGLISH
303MM_HIENGLISH = _core_.MM_HIENGLISH
304MM_TWIPS = _core_.MM_TWIPS
305MM_ISOTROPIC = _core_.MM_ISOTROPIC
306MM_ANISOTROPIC = _core_.MM_ANISOTROPIC
307MM_POINTS = _core_.MM_POINTS
308MM_METRIC = _core_.MM_METRIC
309CENTRE = _core_.CENTRE
310CENTER = _core_.CENTER
311HORIZONTAL = _core_.HORIZONTAL
312VERTICAL = _core_.VERTICAL
313BOTH = _core_.BOTH
314LEFT = _core_.LEFT
315RIGHT = _core_.RIGHT
316UP = _core_.UP
317DOWN = _core_.DOWN
318TOP = _core_.TOP
319BOTTOM = _core_.BOTTOM
320NORTH = _core_.NORTH
321SOUTH = _core_.SOUTH
322WEST = _core_.WEST
323EAST = _core_.EAST
324ALL = _core_.ALL
325ALIGN_NOT = _core_.ALIGN_NOT
326ALIGN_CENTER_HORIZONTAL = _core_.ALIGN_CENTER_HORIZONTAL
327ALIGN_CENTRE_HORIZONTAL = _core_.ALIGN_CENTRE_HORIZONTAL
328ALIGN_LEFT = _core_.ALIGN_LEFT
329ALIGN_TOP = _core_.ALIGN_TOP
330ALIGN_RIGHT = _core_.ALIGN_RIGHT
331ALIGN_BOTTOM = _core_.ALIGN_BOTTOM
332ALIGN_CENTER_VERTICAL = _core_.ALIGN_CENTER_VERTICAL
333ALIGN_CENTRE_VERTICAL = _core_.ALIGN_CENTRE_VERTICAL
334ALIGN_CENTER = _core_.ALIGN_CENTER
335ALIGN_CENTRE = _core_.ALIGN_CENTRE
336ALIGN_MASK = _core_.ALIGN_MASK
337STRETCH_NOT = _core_.STRETCH_NOT
338SHRINK = _core_.SHRINK
339GROW = _core_.GROW
340EXPAND = _core_.EXPAND
341SHAPED = _core_.SHAPED
342FIXED_MINSIZE = _core_.FIXED_MINSIZE
343TILE = _core_.TILE
344ADJUST_MINSIZE = _core_.ADJUST_MINSIZE
345BORDER_DEFAULT = _core_.BORDER_DEFAULT
346BORDER_NONE = _core_.BORDER_NONE
347BORDER_STATIC = _core_.BORDER_STATIC
348BORDER_SIMPLE = _core_.BORDER_SIMPLE
349BORDER_RAISED = _core_.BORDER_RAISED
350BORDER_SUNKEN = _core_.BORDER_SUNKEN
351BORDER_DOUBLE = _core_.BORDER_DOUBLE
352BORDER_MASK = _core_.BORDER_MASK
7bc1e663
RD
353BG_STYLE_SYSTEM = _core_.BG_STYLE_SYSTEM
354BG_STYLE_COLOUR = _core_.BG_STYLE_COLOUR
355BG_STYLE_CUSTOM = _core_.BG_STYLE_CUSTOM
54f9ee45
RD
356DEFAULT = _core_.DEFAULT
357DECORATIVE = _core_.DECORATIVE
358ROMAN = _core_.ROMAN
359SCRIPT = _core_.SCRIPT
360SWISS = _core_.SWISS
361MODERN = _core_.MODERN
362TELETYPE = _core_.TELETYPE
363VARIABLE = _core_.VARIABLE
364FIXED = _core_.FIXED
365NORMAL = _core_.NORMAL
366LIGHT = _core_.LIGHT
367BOLD = _core_.BOLD
368ITALIC = _core_.ITALIC
369SLANT = _core_.SLANT
370SOLID = _core_.SOLID
371DOT = _core_.DOT
372LONG_DASH = _core_.LONG_DASH
373SHORT_DASH = _core_.SHORT_DASH
374DOT_DASH = _core_.DOT_DASH
375USER_DASH = _core_.USER_DASH
376TRANSPARENT = _core_.TRANSPARENT
377STIPPLE = _core_.STIPPLE
378BDIAGONAL_HATCH = _core_.BDIAGONAL_HATCH
379CROSSDIAG_HATCH = _core_.CROSSDIAG_HATCH
380FDIAGONAL_HATCH = _core_.FDIAGONAL_HATCH
381CROSS_HATCH = _core_.CROSS_HATCH
382HORIZONTAL_HATCH = _core_.HORIZONTAL_HATCH
383VERTICAL_HATCH = _core_.VERTICAL_HATCH
384JOIN_BEVEL = _core_.JOIN_BEVEL
385JOIN_MITER = _core_.JOIN_MITER
386JOIN_ROUND = _core_.JOIN_ROUND
387CAP_ROUND = _core_.CAP_ROUND
388CAP_PROJECTING = _core_.CAP_PROJECTING
389CAP_BUTT = _core_.CAP_BUTT
390CLEAR = _core_.CLEAR
391XOR = _core_.XOR
392INVERT = _core_.INVERT
393OR_REVERSE = _core_.OR_REVERSE
394AND_REVERSE = _core_.AND_REVERSE
395COPY = _core_.COPY
396AND = _core_.AND
397AND_INVERT = _core_.AND_INVERT
398NO_OP = _core_.NO_OP
399NOR = _core_.NOR
400EQUIV = _core_.EQUIV
401SRC_INVERT = _core_.SRC_INVERT
402OR_INVERT = _core_.OR_INVERT
403NAND = _core_.NAND
404OR = _core_.OR
405SET = _core_.SET
406WXK_BACK = _core_.WXK_BACK
407WXK_TAB = _core_.WXK_TAB
408WXK_RETURN = _core_.WXK_RETURN
409WXK_ESCAPE = _core_.WXK_ESCAPE
410WXK_SPACE = _core_.WXK_SPACE
411WXK_DELETE = _core_.WXK_DELETE
412WXK_START = _core_.WXK_START
413WXK_LBUTTON = _core_.WXK_LBUTTON
414WXK_RBUTTON = _core_.WXK_RBUTTON
415WXK_CANCEL = _core_.WXK_CANCEL
416WXK_MBUTTON = _core_.WXK_MBUTTON
417WXK_CLEAR = _core_.WXK_CLEAR
418WXK_SHIFT = _core_.WXK_SHIFT
419WXK_ALT = _core_.WXK_ALT
420WXK_CONTROL = _core_.WXK_CONTROL
421WXK_MENU = _core_.WXK_MENU
422WXK_PAUSE = _core_.WXK_PAUSE
423WXK_CAPITAL = _core_.WXK_CAPITAL
424WXK_PRIOR = _core_.WXK_PRIOR
425WXK_NEXT = _core_.WXK_NEXT
426WXK_END = _core_.WXK_END
427WXK_HOME = _core_.WXK_HOME
428WXK_LEFT = _core_.WXK_LEFT
429WXK_UP = _core_.WXK_UP
430WXK_RIGHT = _core_.WXK_RIGHT
431WXK_DOWN = _core_.WXK_DOWN
432WXK_SELECT = _core_.WXK_SELECT
433WXK_PRINT = _core_.WXK_PRINT
434WXK_EXECUTE = _core_.WXK_EXECUTE
435WXK_SNAPSHOT = _core_.WXK_SNAPSHOT
436WXK_INSERT = _core_.WXK_INSERT
437WXK_HELP = _core_.WXK_HELP
438WXK_NUMPAD0 = _core_.WXK_NUMPAD0
439WXK_NUMPAD1 = _core_.WXK_NUMPAD1
440WXK_NUMPAD2 = _core_.WXK_NUMPAD2
441WXK_NUMPAD3 = _core_.WXK_NUMPAD3
442WXK_NUMPAD4 = _core_.WXK_NUMPAD4
443WXK_NUMPAD5 = _core_.WXK_NUMPAD5
444WXK_NUMPAD6 = _core_.WXK_NUMPAD6
445WXK_NUMPAD7 = _core_.WXK_NUMPAD7
446WXK_NUMPAD8 = _core_.WXK_NUMPAD8
447WXK_NUMPAD9 = _core_.WXK_NUMPAD9
448WXK_MULTIPLY = _core_.WXK_MULTIPLY
449WXK_ADD = _core_.WXK_ADD
450WXK_SEPARATOR = _core_.WXK_SEPARATOR
451WXK_SUBTRACT = _core_.WXK_SUBTRACT
452WXK_DECIMAL = _core_.WXK_DECIMAL
453WXK_DIVIDE = _core_.WXK_DIVIDE
454WXK_F1 = _core_.WXK_F1
455WXK_F2 = _core_.WXK_F2
456WXK_F3 = _core_.WXK_F3
457WXK_F4 = _core_.WXK_F4
458WXK_F5 = _core_.WXK_F5
459WXK_F6 = _core_.WXK_F6
460WXK_F7 = _core_.WXK_F7
461WXK_F8 = _core_.WXK_F8
462WXK_F9 = _core_.WXK_F9
463WXK_F10 = _core_.WXK_F10
464WXK_F11 = _core_.WXK_F11
465WXK_F12 = _core_.WXK_F12
466WXK_F13 = _core_.WXK_F13
467WXK_F14 = _core_.WXK_F14
468WXK_F15 = _core_.WXK_F15
469WXK_F16 = _core_.WXK_F16
470WXK_F17 = _core_.WXK_F17
471WXK_F18 = _core_.WXK_F18
472WXK_F19 = _core_.WXK_F19
473WXK_F20 = _core_.WXK_F20
474WXK_F21 = _core_.WXK_F21
475WXK_F22 = _core_.WXK_F22
476WXK_F23 = _core_.WXK_F23
477WXK_F24 = _core_.WXK_F24
478WXK_NUMLOCK = _core_.WXK_NUMLOCK
479WXK_SCROLL = _core_.WXK_SCROLL
480WXK_PAGEUP = _core_.WXK_PAGEUP
481WXK_PAGEDOWN = _core_.WXK_PAGEDOWN
482WXK_NUMPAD_SPACE = _core_.WXK_NUMPAD_SPACE
483WXK_NUMPAD_TAB = _core_.WXK_NUMPAD_TAB
484WXK_NUMPAD_ENTER = _core_.WXK_NUMPAD_ENTER
485WXK_NUMPAD_F1 = _core_.WXK_NUMPAD_F1
486WXK_NUMPAD_F2 = _core_.WXK_NUMPAD_F2
487WXK_NUMPAD_F3 = _core_.WXK_NUMPAD_F3
488WXK_NUMPAD_F4 = _core_.WXK_NUMPAD_F4
489WXK_NUMPAD_HOME = _core_.WXK_NUMPAD_HOME
490WXK_NUMPAD_LEFT = _core_.WXK_NUMPAD_LEFT
491WXK_NUMPAD_UP = _core_.WXK_NUMPAD_UP
492WXK_NUMPAD_RIGHT = _core_.WXK_NUMPAD_RIGHT
493WXK_NUMPAD_DOWN = _core_.WXK_NUMPAD_DOWN
494WXK_NUMPAD_PRIOR = _core_.WXK_NUMPAD_PRIOR
495WXK_NUMPAD_PAGEUP = _core_.WXK_NUMPAD_PAGEUP
496WXK_NUMPAD_NEXT = _core_.WXK_NUMPAD_NEXT
497WXK_NUMPAD_PAGEDOWN = _core_.WXK_NUMPAD_PAGEDOWN
498WXK_NUMPAD_END = _core_.WXK_NUMPAD_END
499WXK_NUMPAD_BEGIN = _core_.WXK_NUMPAD_BEGIN
500WXK_NUMPAD_INSERT = _core_.WXK_NUMPAD_INSERT
501WXK_NUMPAD_DELETE = _core_.WXK_NUMPAD_DELETE
502WXK_NUMPAD_EQUAL = _core_.WXK_NUMPAD_EQUAL
503WXK_NUMPAD_MULTIPLY = _core_.WXK_NUMPAD_MULTIPLY
504WXK_NUMPAD_ADD = _core_.WXK_NUMPAD_ADD
505WXK_NUMPAD_SEPARATOR = _core_.WXK_NUMPAD_SEPARATOR
506WXK_NUMPAD_SUBTRACT = _core_.WXK_NUMPAD_SUBTRACT
507WXK_NUMPAD_DECIMAL = _core_.WXK_NUMPAD_DECIMAL
508WXK_NUMPAD_DIVIDE = _core_.WXK_NUMPAD_DIVIDE
509WXK_WINDOWS_LEFT = _core_.WXK_WINDOWS_LEFT
510WXK_WINDOWS_RIGHT = _core_.WXK_WINDOWS_RIGHT
511WXK_WINDOWS_MENU = _core_.WXK_WINDOWS_MENU
512PAPER_NONE = _core_.PAPER_NONE
513PAPER_LETTER = _core_.PAPER_LETTER
514PAPER_LEGAL = _core_.PAPER_LEGAL
515PAPER_A4 = _core_.PAPER_A4
516PAPER_CSHEET = _core_.PAPER_CSHEET
517PAPER_DSHEET = _core_.PAPER_DSHEET
518PAPER_ESHEET = _core_.PAPER_ESHEET
519PAPER_LETTERSMALL = _core_.PAPER_LETTERSMALL
520PAPER_TABLOID = _core_.PAPER_TABLOID
521PAPER_LEDGER = _core_.PAPER_LEDGER
522PAPER_STATEMENT = _core_.PAPER_STATEMENT
523PAPER_EXECUTIVE = _core_.PAPER_EXECUTIVE
524PAPER_A3 = _core_.PAPER_A3
525PAPER_A4SMALL = _core_.PAPER_A4SMALL
526PAPER_A5 = _core_.PAPER_A5
527PAPER_B4 = _core_.PAPER_B4
528PAPER_B5 = _core_.PAPER_B5
529PAPER_FOLIO = _core_.PAPER_FOLIO
530PAPER_QUARTO = _core_.PAPER_QUARTO
531PAPER_10X14 = _core_.PAPER_10X14
532PAPER_11X17 = _core_.PAPER_11X17
533PAPER_NOTE = _core_.PAPER_NOTE
534PAPER_ENV_9 = _core_.PAPER_ENV_9
535PAPER_ENV_10 = _core_.PAPER_ENV_10
536PAPER_ENV_11 = _core_.PAPER_ENV_11
537PAPER_ENV_12 = _core_.PAPER_ENV_12
538PAPER_ENV_14 = _core_.PAPER_ENV_14
539PAPER_ENV_DL = _core_.PAPER_ENV_DL
540PAPER_ENV_C5 = _core_.PAPER_ENV_C5
541PAPER_ENV_C3 = _core_.PAPER_ENV_C3
542PAPER_ENV_C4 = _core_.PAPER_ENV_C4
543PAPER_ENV_C6 = _core_.PAPER_ENV_C6
544PAPER_ENV_C65 = _core_.PAPER_ENV_C65
545PAPER_ENV_B4 = _core_.PAPER_ENV_B4
546PAPER_ENV_B5 = _core_.PAPER_ENV_B5
547PAPER_ENV_B6 = _core_.PAPER_ENV_B6
548PAPER_ENV_ITALY = _core_.PAPER_ENV_ITALY
549PAPER_ENV_MONARCH = _core_.PAPER_ENV_MONARCH
550PAPER_ENV_PERSONAL = _core_.PAPER_ENV_PERSONAL
551PAPER_FANFOLD_US = _core_.PAPER_FANFOLD_US
552PAPER_FANFOLD_STD_GERMAN = _core_.PAPER_FANFOLD_STD_GERMAN
553PAPER_FANFOLD_LGL_GERMAN = _core_.PAPER_FANFOLD_LGL_GERMAN
554PAPER_ISO_B4 = _core_.PAPER_ISO_B4
555PAPER_JAPANESE_POSTCARD = _core_.PAPER_JAPANESE_POSTCARD
556PAPER_9X11 = _core_.PAPER_9X11
557PAPER_10X11 = _core_.PAPER_10X11
558PAPER_15X11 = _core_.PAPER_15X11
559PAPER_ENV_INVITE = _core_.PAPER_ENV_INVITE
560PAPER_LETTER_EXTRA = _core_.PAPER_LETTER_EXTRA
561PAPER_LEGAL_EXTRA = _core_.PAPER_LEGAL_EXTRA
562PAPER_TABLOID_EXTRA = _core_.PAPER_TABLOID_EXTRA
563PAPER_A4_EXTRA = _core_.PAPER_A4_EXTRA
564PAPER_LETTER_TRANSVERSE = _core_.PAPER_LETTER_TRANSVERSE
565PAPER_A4_TRANSVERSE = _core_.PAPER_A4_TRANSVERSE
566PAPER_LETTER_EXTRA_TRANSVERSE = _core_.PAPER_LETTER_EXTRA_TRANSVERSE
567PAPER_A_PLUS = _core_.PAPER_A_PLUS
568PAPER_B_PLUS = _core_.PAPER_B_PLUS
569PAPER_LETTER_PLUS = _core_.PAPER_LETTER_PLUS
570PAPER_A4_PLUS = _core_.PAPER_A4_PLUS
571PAPER_A5_TRANSVERSE = _core_.PAPER_A5_TRANSVERSE
572PAPER_B5_TRANSVERSE = _core_.PAPER_B5_TRANSVERSE
573PAPER_A3_EXTRA = _core_.PAPER_A3_EXTRA
574PAPER_A5_EXTRA = _core_.PAPER_A5_EXTRA
575PAPER_B5_EXTRA = _core_.PAPER_B5_EXTRA
576PAPER_A2 = _core_.PAPER_A2
577PAPER_A3_TRANSVERSE = _core_.PAPER_A3_TRANSVERSE
578PAPER_A3_EXTRA_TRANSVERSE = _core_.PAPER_A3_EXTRA_TRANSVERSE
579DUPLEX_SIMPLEX = _core_.DUPLEX_SIMPLEX
580DUPLEX_HORIZONTAL = _core_.DUPLEX_HORIZONTAL
581DUPLEX_VERTICAL = _core_.DUPLEX_VERTICAL
582ITEM_SEPARATOR = _core_.ITEM_SEPARATOR
583ITEM_NORMAL = _core_.ITEM_NORMAL
584ITEM_CHECK = _core_.ITEM_CHECK
585ITEM_RADIO = _core_.ITEM_RADIO
586ITEM_MAX = _core_.ITEM_MAX
587HT_NOWHERE = _core_.HT_NOWHERE
588HT_SCROLLBAR_FIRST = _core_.HT_SCROLLBAR_FIRST
589HT_SCROLLBAR_ARROW_LINE_1 = _core_.HT_SCROLLBAR_ARROW_LINE_1
590HT_SCROLLBAR_ARROW_LINE_2 = _core_.HT_SCROLLBAR_ARROW_LINE_2
591HT_SCROLLBAR_ARROW_PAGE_1 = _core_.HT_SCROLLBAR_ARROW_PAGE_1
592HT_SCROLLBAR_ARROW_PAGE_2 = _core_.HT_SCROLLBAR_ARROW_PAGE_2
593HT_SCROLLBAR_THUMB = _core_.HT_SCROLLBAR_THUMB
594HT_SCROLLBAR_BAR_1 = _core_.HT_SCROLLBAR_BAR_1
595HT_SCROLLBAR_BAR_2 = _core_.HT_SCROLLBAR_BAR_2
596HT_SCROLLBAR_LAST = _core_.HT_SCROLLBAR_LAST
597HT_WINDOW_OUTSIDE = _core_.HT_WINDOW_OUTSIDE
598HT_WINDOW_INSIDE = _core_.HT_WINDOW_INSIDE
599HT_WINDOW_VERT_SCROLLBAR = _core_.HT_WINDOW_VERT_SCROLLBAR
600HT_WINDOW_HORZ_SCROLLBAR = _core_.HT_WINDOW_HORZ_SCROLLBAR
601HT_WINDOW_CORNER = _core_.HT_WINDOW_CORNER
602HT_MAX = _core_.HT_MAX
603MOD_NONE = _core_.MOD_NONE
604MOD_ALT = _core_.MOD_ALT
605MOD_CONTROL = _core_.MOD_CONTROL
606MOD_SHIFT = _core_.MOD_SHIFT
607MOD_WIN = _core_.MOD_WIN
608UPDATE_UI_NONE = _core_.UPDATE_UI_NONE
609UPDATE_UI_RECURSE = _core_.UPDATE_UI_RECURSE
610UPDATE_UI_FROMIDLE = _core_.UPDATE_UI_FROMIDLE
d14a1e28
RD
611#---------------------------------------------------------------------------
612
613class Object(object):
0df68c9f
RD
614 """
615 The base class for most wx objects, although in wxPython not
616 much functionality is needed nor exposed.
617 """
d14a1e28
RD
618 def __init__(self): raise RuntimeError, "No constructor defined"
619 def __repr__(self):
620 return "<%s.%s; proxy of C++ wxObject instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
e811c8ce 621 def GetClassName(*args, **kwargs):
0df68c9f 622 """
a95a7133 623 GetClassName(self) -> String
e811c8ce 624
a95a7133 625 Returns the class name of the C++ class using wxRTTI.
0df68c9f 626 """
54f9ee45 627 return _core_.Object_GetClassName(*args, **kwargs)
e811c8ce
RD
628
629 def Destroy(*args, **kwargs):
0df68c9f 630 """
a95a7133 631 Destroy(self)
e811c8ce 632
0df68c9f
RD
633 Deletes the C++ object this Python object is a proxy for.
634 """
54f9ee45 635 return _core_.Object_Destroy(*args, **kwargs)
e811c8ce 636
d14a1e28
RD
637
638class ObjectPtr(Object):
639 def __init__(self, this):
640 self.this = this
641 if not hasattr(self,"thisown"): self.thisown = 0
642 self.__class__ = Object
54f9ee45
RD
643_core_.Object_swigregister(ObjectPtr)
644_wxPySetDictionary = _core_._wxPySetDictionary
d14a1e28 645
54f9ee45 646_wxPyFixStockObjects = _core_._wxPyFixStockObjects
3a04f143 647
54f9ee45 648cvar = _core_.cvar
196addbf 649EmptyString = cvar.EmptyString
d14a1e28
RD
650
651#---------------------------------------------------------------------------
652
54f9ee45
RD
653BITMAP_TYPE_INVALID = _core_.BITMAP_TYPE_INVALID
654BITMAP_TYPE_BMP = _core_.BITMAP_TYPE_BMP
655BITMAP_TYPE_ICO = _core_.BITMAP_TYPE_ICO
656BITMAP_TYPE_CUR = _core_.BITMAP_TYPE_CUR
657BITMAP_TYPE_XBM = _core_.BITMAP_TYPE_XBM
658BITMAP_TYPE_XBM_DATA = _core_.BITMAP_TYPE_XBM_DATA
659BITMAP_TYPE_XPM = _core_.BITMAP_TYPE_XPM
660BITMAP_TYPE_XPM_DATA = _core_.BITMAP_TYPE_XPM_DATA
661BITMAP_TYPE_TIF = _core_.BITMAP_TYPE_TIF
662BITMAP_TYPE_GIF = _core_.BITMAP_TYPE_GIF
663BITMAP_TYPE_PNG = _core_.BITMAP_TYPE_PNG
664BITMAP_TYPE_JPEG = _core_.BITMAP_TYPE_JPEG
665BITMAP_TYPE_PNM = _core_.BITMAP_TYPE_PNM
666BITMAP_TYPE_PCX = _core_.BITMAP_TYPE_PCX
667BITMAP_TYPE_PICT = _core_.BITMAP_TYPE_PICT
668BITMAP_TYPE_ICON = _core_.BITMAP_TYPE_ICON
669BITMAP_TYPE_ANI = _core_.BITMAP_TYPE_ANI
670BITMAP_TYPE_IFF = _core_.BITMAP_TYPE_IFF
671BITMAP_TYPE_MACCURSOR = _core_.BITMAP_TYPE_MACCURSOR
672BITMAP_TYPE_ANY = _core_.BITMAP_TYPE_ANY
673CURSOR_NONE = _core_.CURSOR_NONE
674CURSOR_ARROW = _core_.CURSOR_ARROW
675CURSOR_RIGHT_ARROW = _core_.CURSOR_RIGHT_ARROW
676CURSOR_BULLSEYE = _core_.CURSOR_BULLSEYE
677CURSOR_CHAR = _core_.CURSOR_CHAR
678CURSOR_CROSS = _core_.CURSOR_CROSS
679CURSOR_HAND = _core_.CURSOR_HAND
680CURSOR_IBEAM = _core_.CURSOR_IBEAM
681CURSOR_LEFT_BUTTON = _core_.CURSOR_LEFT_BUTTON
682CURSOR_MAGNIFIER = _core_.CURSOR_MAGNIFIER
683CURSOR_MIDDLE_BUTTON = _core_.CURSOR_MIDDLE_BUTTON
684CURSOR_NO_ENTRY = _core_.CURSOR_NO_ENTRY
685CURSOR_PAINT_BRUSH = _core_.CURSOR_PAINT_BRUSH
686CURSOR_PENCIL = _core_.CURSOR_PENCIL
687CURSOR_POINT_LEFT = _core_.CURSOR_POINT_LEFT
688CURSOR_POINT_RIGHT = _core_.CURSOR_POINT_RIGHT
689CURSOR_QUESTION_ARROW = _core_.CURSOR_QUESTION_ARROW
690CURSOR_RIGHT_BUTTON = _core_.CURSOR_RIGHT_BUTTON
691CURSOR_SIZENESW = _core_.CURSOR_SIZENESW
692CURSOR_SIZENS = _core_.CURSOR_SIZENS
693CURSOR_SIZENWSE = _core_.CURSOR_SIZENWSE
694CURSOR_SIZEWE = _core_.CURSOR_SIZEWE
695CURSOR_SIZING = _core_.CURSOR_SIZING
696CURSOR_SPRAYCAN = _core_.CURSOR_SPRAYCAN
697CURSOR_WAIT = _core_.CURSOR_WAIT
698CURSOR_WATCH = _core_.CURSOR_WATCH
699CURSOR_BLANK = _core_.CURSOR_BLANK
700CURSOR_DEFAULT = _core_.CURSOR_DEFAULT
701CURSOR_COPY_ARROW = _core_.CURSOR_COPY_ARROW
702CURSOR_ARROWWAIT = _core_.CURSOR_ARROWWAIT
703CURSOR_MAX = _core_.CURSOR_MAX
d14a1e28
RD
704#---------------------------------------------------------------------------
705
706class Size(object):
0df68c9f 707 """
41e2b43e 708 wx.Size is a useful data structure used to represent the size of
093d3ff1
RD
709 something. It simply contians integer width and height
710 proprtites. In most places in wxPython where a wx.Size is
711 expected a (width, height) tuple can be used instead.
0df68c9f 712 """
e811c8ce
RD
713 def __repr__(self):
714 return "<%s.%s; proxy of C++ wxSize instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
54f9ee45
RD
715 width = property(_core_.Size_width_get, _core_.Size_width_set)
716 height = property(_core_.Size_height_get, _core_.Size_height_set)
242b7b46 717 x = width; y = height
d14a1e28 718 def __init__(self, *args, **kwargs):
0df68c9f 719 """
a95a7133 720 __init__(self, int w=0, int h=0) -> Size
e811c8ce 721
0df68c9f
RD
722 Creates a size object.
723 """
54f9ee45 724 newobj = _core_.new_Size(*args, **kwargs)
d14a1e28
RD
725 self.this = newobj.this
726 self.thisown = 1
727 del newobj.thisown
54f9ee45 728 def __del__(self, destroy=_core_.delete_Size):
a95a7133 729 """__del__(self)"""
d14a1e28
RD
730 try:
731 if self.thisown: destroy(self)
732 except: pass
e811c8ce
RD
733
734 def __eq__(*args, **kwargs):
0df68c9f 735 """
a95a7133 736 __eq__(self, Size sz) -> bool
e811c8ce 737
0df68c9f
RD
738 Test for equality of wx.Size objects.
739 """
54f9ee45 740 return _core_.Size___eq__(*args, **kwargs)
e811c8ce
RD
741
742 def __ne__(*args, **kwargs):
0df68c9f 743 """
a95a7133 744 __ne__(self, Size sz) -> bool
e811c8ce 745
0df68c9f
RD
746 Test for inequality.
747 """
54f9ee45 748 return _core_.Size___ne__(*args, **kwargs)
e811c8ce
RD
749
750 def __add__(*args, **kwargs):
0df68c9f 751 """
a95a7133 752 __add__(self, Size sz) -> Size
e811c8ce 753
0df68c9f
RD
754 Add sz's proprties to this and return the result.
755 """
54f9ee45 756 return _core_.Size___add__(*args, **kwargs)
e811c8ce
RD
757
758 def __sub__(*args, **kwargs):
0df68c9f 759 """
a95a7133 760 __sub__(self, Size sz) -> Size
e811c8ce 761
0df68c9f
RD
762 Subtract sz's properties from this and return the result.
763 """
54f9ee45 764 return _core_.Size___sub__(*args, **kwargs)
e811c8ce
RD
765
766 def IncTo(*args, **kwargs):
0df68c9f 767 """
a95a7133 768 IncTo(self, Size sz)
e811c8ce 769
0df68c9f
RD
770 Increments this object so that both of its dimensions are not less
771 than the corresponding dimensions of the size.
772 """
54f9ee45 773 return _core_.Size_IncTo(*args, **kwargs)
e811c8ce
RD
774
775 def DecTo(*args, **kwargs):
0df68c9f 776 """
a95a7133 777 DecTo(self, Size sz)
e811c8ce 778
0df68c9f
RD
779 Decrements this object so that both of its dimensions are not greater
780 than the corresponding dimensions of the size.
781 """
54f9ee45 782 return _core_.Size_DecTo(*args, **kwargs)
e811c8ce
RD
783
784 def Set(*args, **kwargs):
0df68c9f 785 """
a95a7133 786 Set(self, int w, int h)
e811c8ce 787
0df68c9f
RD
788 Set both width and height.
789 """
54f9ee45 790 return _core_.Size_Set(*args, **kwargs)
e811c8ce
RD
791
792 def SetWidth(*args, **kwargs):
a95a7133 793 """SetWidth(self, int w)"""
54f9ee45 794 return _core_.Size_SetWidth(*args, **kwargs)
e811c8ce
RD
795
796 def SetHeight(*args, **kwargs):
a95a7133 797 """SetHeight(self, int h)"""
54f9ee45 798 return _core_.Size_SetHeight(*args, **kwargs)
e811c8ce
RD
799
800 def GetWidth(*args, **kwargs):
a95a7133 801 """GetWidth(self) -> int"""
54f9ee45 802 return _core_.Size_GetWidth(*args, **kwargs)
e811c8ce
RD
803
804 def GetHeight(*args, **kwargs):
a95a7133 805 """GetHeight(self) -> int"""
54f9ee45 806 return _core_.Size_GetHeight(*args, **kwargs)
e811c8ce 807
74a57fcd
RD
808 def IsFullySpecified(*args, **kwargs):
809 """
a95a7133 810 IsFullySpecified(self) -> bool
74a57fcd
RD
811
812 Returns True if both components of the size are non-default values.
813 """
54f9ee45 814 return _core_.Size_IsFullySpecified(*args, **kwargs)
74a57fcd
RD
815
816 def SetDefaults(*args, **kwargs):
817 """
a95a7133 818 SetDefaults(self, Size size)
74a57fcd 819
41e2b43e
RD
820 Combine this size with the other one replacing the default components
821 of this object (i.e. equal to -1) with those of the other.
74a57fcd 822 """
54f9ee45 823 return _core_.Size_SetDefaults(*args, **kwargs)
74a57fcd 824
e811c8ce 825 def Get(*args, **kwargs):
0df68c9f
RD
826 """
827 Get() -> (width,height)
e811c8ce 828
0df68c9f
RD
829 Returns the width and height properties as a tuple.
830 """
54f9ee45 831 return _core_.Size_Get(*args, **kwargs)
e811c8ce 832
41e2b43e 833 asTuple = wx._deprecated(Get, "asTuple is deprecated, use `Get` instead")
e811c8ce
RD
834 def __str__(self): return str(self.Get())
835 def __repr__(self): return 'wx.Size'+str(self.Get())
836 def __len__(self): return len(self.Get())
837 def __getitem__(self, index): return self.Get()[index]
d14a1e28
RD
838 def __setitem__(self, index, val):
839 if index == 0: self.width = val
840 elif index == 1: self.height = val
841 else: raise IndexError
e811c8ce 842 def __nonzero__(self): return self.Get() != (0,0)
74e96f3d
RD
843 __safe_for_unpickling__ = True
844 def __reduce__(self): return (wx.Size, self.Get())
d14a1e28
RD
845
846
847class SizePtr(Size):
848 def __init__(self, this):
849 self.this = this
850 if not hasattr(self,"thisown"): self.thisown = 0
851 self.__class__ = Size
54f9ee45 852_core_.Size_swigregister(SizePtr)
d14a1e28
RD
853
854#---------------------------------------------------------------------------
855
856class RealPoint(object):
0df68c9f 857 """
41e2b43e
RD
858 A data structure for representing a point or position with floating
859 point x and y properties. In wxPython most places that expect a
860 wx.RealPoint can also accept a (x,y) tuple.
0df68c9f 861 """
e811c8ce
RD
862 def __repr__(self):
863 return "<%s.%s; proxy of C++ wxRealPoint instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
54f9ee45
RD
864 x = property(_core_.RealPoint_x_get, _core_.RealPoint_x_set)
865 y = property(_core_.RealPoint_y_get, _core_.RealPoint_y_set)
d14a1e28 866 def __init__(self, *args, **kwargs):
0df68c9f 867 """
a95a7133 868 __init__(self, double x=0.0, double y=0.0) -> RealPoint
e811c8ce 869
0df68c9f
RD
870 Create a wx.RealPoint object
871 """
54f9ee45 872 newobj = _core_.new_RealPoint(*args, **kwargs)
d14a1e28
RD
873 self.this = newobj.this
874 self.thisown = 1
875 del newobj.thisown
54f9ee45 876 def __del__(self, destroy=_core_.delete_RealPoint):
a95a7133 877 """__del__(self)"""
d14a1e28
RD
878 try:
879 if self.thisown: destroy(self)
880 except: pass
e811c8ce
RD
881
882 def __eq__(*args, **kwargs):
0df68c9f 883 """
a95a7133 884 __eq__(self, RealPoint pt) -> bool
e811c8ce 885
0df68c9f
RD
886 Test for equality of wx.RealPoint objects.
887 """
54f9ee45 888 return _core_.RealPoint___eq__(*args, **kwargs)
e811c8ce
RD
889
890 def __ne__(*args, **kwargs):
0df68c9f 891 """
a95a7133 892 __ne__(self, RealPoint pt) -> bool
e811c8ce 893
0df68c9f
RD
894 Test for inequality of wx.RealPoint objects.
895 """
54f9ee45 896 return _core_.RealPoint___ne__(*args, **kwargs)
e811c8ce
RD
897
898 def __add__(*args, **kwargs):
0df68c9f 899 """
a95a7133 900 __add__(self, RealPoint pt) -> RealPoint
e811c8ce 901
0df68c9f
RD
902 Add pt's proprties to this and return the result.
903 """
54f9ee45 904 return _core_.RealPoint___add__(*args, **kwargs)
e811c8ce
RD
905
906 def __sub__(*args, **kwargs):
0df68c9f 907 """
a95a7133 908 __sub__(self, RealPoint pt) -> RealPoint
e811c8ce 909
0df68c9f
RD
910 Subtract pt's proprties from this and return the result
911 """
54f9ee45 912 return _core_.RealPoint___sub__(*args, **kwargs)
e811c8ce
RD
913
914 def Set(*args, **kwargs):
0df68c9f 915 """
a95a7133 916 Set(self, double x, double y)
e811c8ce 917
0df68c9f
RD
918 Set both the x and y properties
919 """
54f9ee45 920 return _core_.RealPoint_Set(*args, **kwargs)
e811c8ce
RD
921
922 def Get(*args, **kwargs):
0df68c9f
RD
923 """
924 Get() -> (x,y)
e811c8ce 925
0df68c9f
RD
926 Return the x and y properties as a tuple.
927 """
54f9ee45 928 return _core_.RealPoint_Get(*args, **kwargs)
e811c8ce 929
41e2b43e 930 asTuple = wx._deprecated(Get, "asTuple is deprecated, use `Get` instead")
e811c8ce
RD
931 def __str__(self): return str(self.Get())
932 def __repr__(self): return 'wx.RealPoint'+str(self.Get())
933 def __len__(self): return len(self.Get())
934 def __getitem__(self, index): return self.Get()[index]
d14a1e28 935 def __setitem__(self, index, val):
e811c8ce
RD
936 if index == 0: self.x = val
937 elif index == 1: self.y = val
d14a1e28 938 else: raise IndexError
e811c8ce 939 def __nonzero__(self): return self.Get() != (0.0, 0.0)
74e96f3d
RD
940 __safe_for_unpickling__ = True
941 def __reduce__(self): return (wx.RealPoint, self.Get())
d14a1e28
RD
942
943
944class RealPointPtr(RealPoint):
945 def __init__(self, this):
946 self.this = this
947 if not hasattr(self,"thisown"): self.thisown = 0
948 self.__class__ = RealPoint
54f9ee45 949_core_.RealPoint_swigregister(RealPointPtr)
d14a1e28
RD
950
951#---------------------------------------------------------------------------
952
953class Point(object):
0df68c9f 954 """
41e2b43e
RD
955 A data structure for representing a point or position with integer x
956 and y properties. Most places in wxPython that expect a wx.Point can
957 also accept a (x,y) tuple.
0df68c9f 958 """
e811c8ce
RD
959 def __repr__(self):
960 return "<%s.%s; proxy of C++ wxPoint instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
54f9ee45
RD
961 x = property(_core_.Point_x_get, _core_.Point_x_set)
962 y = property(_core_.Point_y_get, _core_.Point_y_set)
d14a1e28 963 def __init__(self, *args, **kwargs):
0df68c9f 964 """
a95a7133 965 __init__(self, int x=0, int y=0) -> Point
e811c8ce 966
0df68c9f
RD
967 Create a wx.Point object
968 """
54f9ee45 969 newobj = _core_.new_Point(*args, **kwargs)
d14a1e28
RD
970 self.this = newobj.this
971 self.thisown = 1
972 del newobj.thisown
54f9ee45 973 def __del__(self, destroy=_core_.delete_Point):
a95a7133 974 """__del__(self)"""
d14a1e28
RD
975 try:
976 if self.thisown: destroy(self)
977 except: pass
e811c8ce
RD
978
979 def __eq__(*args, **kwargs):
0df68c9f 980 """
a95a7133 981 __eq__(self, Point pt) -> bool
e811c8ce 982
0df68c9f
RD
983 Test for equality of wx.Point objects.
984 """
54f9ee45 985 return _core_.Point___eq__(*args, **kwargs)
e811c8ce
RD
986
987 def __ne__(*args, **kwargs):
0df68c9f 988 """
a95a7133 989 __ne__(self, Point pt) -> bool
e811c8ce 990
0df68c9f
RD
991 Test for inequality of wx.Point objects.
992 """
54f9ee45 993 return _core_.Point___ne__(*args, **kwargs)
e811c8ce
RD
994
995 def __add__(*args, **kwargs):
0df68c9f 996 """
a95a7133 997 __add__(self, Point pt) -> Point
e811c8ce 998
0df68c9f
RD
999 Add pt's proprties to this and return the result.
1000 """
54f9ee45 1001 return _core_.Point___add__(*args, **kwargs)
e811c8ce
RD
1002
1003 def __sub__(*args, **kwargs):
0df68c9f 1004 """
a95a7133 1005 __sub__(self, Point pt) -> Point
e811c8ce 1006
0df68c9f
RD
1007 Subtract pt's proprties from this and return the result
1008 """
54f9ee45 1009 return _core_.Point___sub__(*args, **kwargs)
e811c8ce
RD
1010
1011 def __iadd__(*args, **kwargs):
0df68c9f 1012 """
a95a7133 1013 __iadd__(self, Point pt) -> Point
e811c8ce 1014
0df68c9f
RD
1015 Add pt to this object.
1016 """
54f9ee45 1017 return _core_.Point___iadd__(*args, **kwargs)
e811c8ce
RD
1018
1019 def __isub__(*args, **kwargs):
0df68c9f 1020 """
a95a7133 1021 __isub__(self, Point pt) -> Point
e811c8ce 1022
0df68c9f
RD
1023 Subtract pt from this object.
1024 """
54f9ee45 1025 return _core_.Point___isub__(*args, **kwargs)
e811c8ce
RD
1026
1027 def Set(*args, **kwargs):
0df68c9f 1028 """
a95a7133 1029 Set(self, long x, long y)
e811c8ce 1030
0df68c9f
RD
1031 Set both the x and y properties
1032 """
54f9ee45 1033 return _core_.Point_Set(*args, **kwargs)
e811c8ce
RD
1034
1035 def Get(*args, **kwargs):
0df68c9f
RD
1036 """
1037 Get() -> (x,y)
e811c8ce 1038
0df68c9f
RD
1039 Return the x and y properties as a tuple.
1040 """
54f9ee45 1041 return _core_.Point_Get(*args, **kwargs)
e811c8ce 1042
41e2b43e 1043 asTuple = wx._deprecated(Get, "asTuple is deprecated, use `Get` instead")
e811c8ce
RD
1044 def __str__(self): return str(self.Get())
1045 def __repr__(self): return 'wx.Point'+str(self.Get())
1046 def __len__(self): return len(self.Get())
1047 def __getitem__(self, index): return self.Get()[index]
d14a1e28
RD
1048 def __setitem__(self, index, val):
1049 if index == 0: self.x = val
1050 elif index == 1: self.y = val
1051 else: raise IndexError
e811c8ce 1052 def __nonzero__(self): return self.Get() != (0,0)
74e96f3d
RD
1053 __safe_for_unpickling__ = True
1054 def __reduce__(self): return (wx.Point, self.Get())
d14a1e28
RD
1055
1056
1057class PointPtr(Point):
1058 def __init__(self, this):
1059 self.this = this
1060 if not hasattr(self,"thisown"): self.thisown = 0
1061 self.__class__ = Point
54f9ee45 1062_core_.Point_swigregister(PointPtr)
d14a1e28
RD
1063
1064#---------------------------------------------------------------------------
1065
1066class Rect(object):
0df68c9f 1067 """
41e2b43e
RD
1068 A class for representing and manipulating rectangles. It has x, y,
1069 width and height properties. In wxPython most palces that expect a
1070 wx.Rect can also accept a (x,y,width,height) tuple.
0df68c9f 1071 """
e811c8ce
RD
1072 def __repr__(self):
1073 return "<%s.%s; proxy of C++ wxRect instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 1074 def __init__(self, *args, **kwargs):
0df68c9f 1075 """
a95a7133 1076 __init__(self, int x=0, int y=0, int width=0, int height=0) -> Rect
e811c8ce 1077
0df68c9f
RD
1078 Create a new Rect object.
1079 """
54f9ee45 1080 newobj = _core_.new_Rect(*args, **kwargs)
d14a1e28
RD
1081 self.this = newobj.this
1082 self.thisown = 1
1083 del newobj.thisown
54f9ee45 1084 def __del__(self, destroy=_core_.delete_Rect):
a95a7133 1085 """__del__(self)"""
d14a1e28
RD
1086 try:
1087 if self.thisown: destroy(self)
1088 except: pass
e811c8ce
RD
1089
1090 def GetX(*args, **kwargs):
a95a7133 1091 """GetX(self) -> int"""
54f9ee45 1092 return _core_.Rect_GetX(*args, **kwargs)
e811c8ce
RD
1093
1094 def SetX(*args, **kwargs):
a95a7133 1095 """SetX(self, int x)"""
54f9ee45 1096 return _core_.Rect_SetX(*args, **kwargs)
e811c8ce
RD
1097
1098 def GetY(*args, **kwargs):
a95a7133 1099 """GetY(self) -> int"""
54f9ee45 1100 return _core_.Rect_GetY(*args, **kwargs)
e811c8ce
RD
1101
1102 def SetY(*args, **kwargs):
a95a7133 1103 """SetY(self, int y)"""
54f9ee45 1104 return _core_.Rect_SetY(*args, **kwargs)
e811c8ce
RD
1105
1106 def GetWidth(*args, **kwargs):
a95a7133 1107 """GetWidth(self) -> int"""
54f9ee45 1108 return _core_.Rect_GetWidth(*args, **kwargs)
e811c8ce
RD
1109
1110 def SetWidth(*args, **kwargs):
a95a7133 1111 """SetWidth(self, int w)"""
54f9ee45 1112 return _core_.Rect_SetWidth(*args, **kwargs)
e811c8ce
RD
1113
1114 def GetHeight(*args, **kwargs):
a95a7133 1115 """GetHeight(self) -> int"""
54f9ee45 1116 return _core_.Rect_GetHeight(*args, **kwargs)
e811c8ce
RD
1117
1118 def SetHeight(*args, **kwargs):
a95a7133 1119 """SetHeight(self, int h)"""
54f9ee45 1120 return _core_.Rect_SetHeight(*args, **kwargs)
e811c8ce
RD
1121
1122 def GetPosition(*args, **kwargs):
a95a7133 1123 """GetPosition(self) -> Point"""
54f9ee45 1124 return _core_.Rect_GetPosition(*args, **kwargs)
e811c8ce
RD
1125
1126 def SetPosition(*args, **kwargs):
a95a7133 1127 """SetPosition(self, Point p)"""
54f9ee45 1128 return _core_.Rect_SetPosition(*args, **kwargs)
e811c8ce
RD
1129
1130 def GetSize(*args, **kwargs):
a95a7133 1131 """GetSize(self) -> Size"""
54f9ee45 1132 return _core_.Rect_GetSize(*args, **kwargs)
e811c8ce
RD
1133
1134 def SetSize(*args, **kwargs):
a95a7133 1135 """SetSize(self, Size s)"""
54f9ee45 1136 return _core_.Rect_SetSize(*args, **kwargs)
e811c8ce 1137
c9c7117a 1138 def GetTopLeft(*args, **kwargs):
a95a7133 1139 """GetTopLeft(self) -> Point"""
54f9ee45 1140 return _core_.Rect_GetTopLeft(*args, **kwargs)
c9c7117a
RD
1141
1142 def SetTopLeft(*args, **kwargs):
a95a7133 1143 """SetTopLeft(self, Point p)"""
54f9ee45 1144 return _core_.Rect_SetTopLeft(*args, **kwargs)
c9c7117a
RD
1145
1146 def GetBottomRight(*args, **kwargs):
a95a7133 1147 """GetBottomRight(self) -> Point"""
54f9ee45 1148 return _core_.Rect_GetBottomRight(*args, **kwargs)
c9c7117a
RD
1149
1150 def SetBottomRight(*args, **kwargs):
a95a7133 1151 """SetBottomRight(self, Point p)"""
54f9ee45 1152 return _core_.Rect_SetBottomRight(*args, **kwargs)
c9c7117a 1153
e811c8ce 1154 def GetLeft(*args, **kwargs):
a95a7133 1155 """GetLeft(self) -> int"""
54f9ee45 1156 return _core_.Rect_GetLeft(*args, **kwargs)
e811c8ce
RD
1157
1158 def GetTop(*args, **kwargs):
a95a7133 1159 """GetTop(self) -> int"""
54f9ee45 1160 return _core_.Rect_GetTop(*args, **kwargs)
e811c8ce
RD
1161
1162 def GetBottom(*args, **kwargs):
a95a7133 1163 """GetBottom(self) -> int"""
54f9ee45 1164 return _core_.Rect_GetBottom(*args, **kwargs)
e811c8ce
RD
1165
1166 def GetRight(*args, **kwargs):
a95a7133 1167 """GetRight(self) -> int"""
54f9ee45 1168 return _core_.Rect_GetRight(*args, **kwargs)
e811c8ce
RD
1169
1170 def SetLeft(*args, **kwargs):
a95a7133 1171 """SetLeft(self, int left)"""
54f9ee45 1172 return _core_.Rect_SetLeft(*args, **kwargs)
e811c8ce
RD
1173
1174 def SetRight(*args, **kwargs):
a95a7133 1175 """SetRight(self, int right)"""
54f9ee45 1176 return _core_.Rect_SetRight(*args, **kwargs)
e811c8ce
RD
1177
1178 def SetTop(*args, **kwargs):
a95a7133 1179 """SetTop(self, int top)"""
54f9ee45 1180 return _core_.Rect_SetTop(*args, **kwargs)
e811c8ce
RD
1181
1182 def SetBottom(*args, **kwargs):
a95a7133 1183 """SetBottom(self, int bottom)"""
54f9ee45 1184 return _core_.Rect_SetBottom(*args, **kwargs)
e811c8ce
RD
1185
1186 position = property(GetPosition, SetPosition)
1187 size = property(GetSize, SetSize)
1188 left = property(GetLeft, SetLeft)
1189 right = property(GetRight, SetRight)
1190 top = property(GetTop, SetTop)
1191 bottom = property(GetBottom, SetBottom)
1192
1193 def Inflate(*args, **kwargs):
0df68c9f 1194 """
a95a7133 1195 Inflate(self, int dx, int dy) -> Rect
e811c8ce 1196
8e738329
RD
1197 Increases the size of the rectangle.
1198
1199 The left border is moved farther left and the right border is moved
1200 farther right by ``dx``. The upper border is moved farther up and the
1201 bottom border is moved farther down by ``dy``. (Note the the width and
1202 height of the rectangle thus change by ``2*dx`` and ``2*dy``,
1203 respectively.) If one or both of ``dx`` and ``dy`` are negative, the
1204 opposite happens: the rectangle size decreases in the respective
1205 direction.
1206
1207 The change is made to the rectangle inplace, if instead you need a
1208 copy that is inflated, preserving the original then make the copy
1209 first::
1210
1211 copy = wx.Rect(*original)
1212 copy.Inflate(10,15)
1213
1214
0df68c9f 1215 """
54f9ee45 1216 return _core_.Rect_Inflate(*args, **kwargs)
e811c8ce
RD
1217
1218 def Deflate(*args, **kwargs):
0df68c9f 1219 """
a95a7133 1220 Deflate(self, int dx, int dy) -> Rect
e811c8ce 1221
8e738329
RD
1222 Decrease the rectangle size. This method is the opposite of `Inflate`
1223 in that Deflate(a,b) is equivalent to Inflate(-a,-b). Please refer to
1224 `Inflate` for a full description.
0df68c9f 1225 """
54f9ee45 1226 return _core_.Rect_Deflate(*args, **kwargs)
e811c8ce
RD
1227
1228 def OffsetXY(*args, **kwargs):
0df68c9f 1229 """
a95a7133 1230 OffsetXY(self, int dx, int dy)
e811c8ce 1231
41e2b43e
RD
1232 Moves the rectangle by the specified offset. If dx is positive, the
1233 rectangle is moved to the right, if dy is positive, it is moved to the
1234 bottom, otherwise it is moved to the left or top respectively.
0df68c9f 1235 """
54f9ee45 1236 return _core_.Rect_OffsetXY(*args, **kwargs)
e811c8ce
RD
1237
1238 def Offset(*args, **kwargs):
0df68c9f 1239 """
a95a7133 1240 Offset(self, Point pt)
e811c8ce 1241
0df68c9f
RD
1242 Same as OffsetXY but uses dx,dy from Point
1243 """
54f9ee45 1244 return _core_.Rect_Offset(*args, **kwargs)
e811c8ce
RD
1245
1246 def Intersect(*args, **kwargs):
0df68c9f 1247 """
a95a7133 1248 Intersect(self, Rect rect) -> Rect
e811c8ce 1249
5cbf236d 1250 Returns the intersectsion of this rectangle and rect.
0df68c9f 1251 """
54f9ee45 1252 return _core_.Rect_Intersect(*args, **kwargs)
e811c8ce 1253
5cbf236d
RD
1254 def Union(*args, **kwargs):
1255 """
1256 Union(self, Rect rect) -> Rect
1257
1258 Returns the union of this rectangle and rect.
1259 """
1260 return _core_.Rect_Union(*args, **kwargs)
1261
e811c8ce 1262 def __add__(*args, **kwargs):
0df68c9f 1263 """
a95a7133 1264 __add__(self, Rect rect) -> Rect
e811c8ce 1265
0df68c9f
RD
1266 Add the properties of rect to this rectangle and return the result.
1267 """
54f9ee45 1268 return _core_.Rect___add__(*args, **kwargs)
e811c8ce
RD
1269
1270 def __iadd__(*args, **kwargs):
0df68c9f 1271 """
a95a7133 1272 __iadd__(self, Rect rect) -> Rect
e811c8ce 1273
0df68c9f
RD
1274 Add the properties of rect to this rectangle, updating this rectangle.
1275 """
54f9ee45 1276 return _core_.Rect___iadd__(*args, **kwargs)
e811c8ce
RD
1277
1278 def __eq__(*args, **kwargs):
0df68c9f 1279 """
a95a7133 1280 __eq__(self, Rect rect) -> bool
e811c8ce 1281
0df68c9f
RD
1282 Test for equality.
1283 """
54f9ee45 1284 return _core_.Rect___eq__(*args, **kwargs)
e811c8ce
RD
1285
1286 def __ne__(*args, **kwargs):
0df68c9f 1287 """
a95a7133 1288 __ne__(self, Rect rect) -> bool
e811c8ce 1289
0df68c9f
RD
1290 Test for inequality.
1291 """
54f9ee45 1292 return _core_.Rect___ne__(*args, **kwargs)
e811c8ce
RD
1293
1294 def InsideXY(*args, **kwargs):
0df68c9f 1295 """
a95a7133 1296 InsideXY(self, int x, int y) -> bool
e811c8ce 1297
0df68c9f
RD
1298 Return True if the point is (not strcitly) inside the rect.
1299 """
54f9ee45 1300 return _core_.Rect_InsideXY(*args, **kwargs)
e811c8ce
RD
1301
1302 def Inside(*args, **kwargs):
0df68c9f 1303 """
a95a7133 1304 Inside(self, Point pt) -> bool
e811c8ce 1305
0df68c9f
RD
1306 Return True if the point is (not strcitly) inside the rect.
1307 """
54f9ee45 1308 return _core_.Rect_Inside(*args, **kwargs)
e811c8ce
RD
1309
1310 def Intersects(*args, **kwargs):
0df68c9f 1311 """
a95a7133 1312 Intersects(self, Rect rect) -> bool
e811c8ce 1313
0df68c9f
RD
1314 Returns True if the rectangles have a non empty intersection.
1315 """
54f9ee45 1316 return _core_.Rect_Intersects(*args, **kwargs)
e811c8ce 1317
54f9ee45
RD
1318 x = property(_core_.Rect_x_get, _core_.Rect_x_set)
1319 y = property(_core_.Rect_y_get, _core_.Rect_y_set)
1320 width = property(_core_.Rect_width_get, _core_.Rect_width_set)
1321 height = property(_core_.Rect_height_get, _core_.Rect_height_set)
e811c8ce 1322 def Set(*args, **kwargs):
0df68c9f 1323 """
a95a7133 1324 Set(self, int x=0, int y=0, int width=0, int height=0)
e811c8ce 1325
0df68c9f
RD
1326 Set all rectangle properties.
1327 """
54f9ee45 1328 return _core_.Rect_Set(*args, **kwargs)
e811c8ce
RD
1329
1330 def Get(*args, **kwargs):
0df68c9f
RD
1331 """
1332 Get() -> (x,y,width,height)
e811c8ce 1333
0df68c9f
RD
1334 Return the rectangle properties as a tuple.
1335 """
54f9ee45 1336 return _core_.Rect_Get(*args, **kwargs)
e811c8ce 1337
41e2b43e 1338 asTuple = wx._deprecated(Get, "asTuple is deprecated, use `Get` instead")
e811c8ce
RD
1339 def __str__(self): return str(self.Get())
1340 def __repr__(self): return 'wx.Rect'+str(self.Get())
1341 def __len__(self): return len(self.Get())
1342 def __getitem__(self, index): return self.Get()[index]
d14a1e28
RD
1343 def __setitem__(self, index, val):
1344 if index == 0: self.x = val
1345 elif index == 1: self.y = val
1346 elif index == 2: self.width = val
1347 elif index == 3: self.height = val
1348 else: raise IndexError
e811c8ce 1349 def __nonzero__(self): return self.Get() != (0,0,0,0)
74e96f3d
RD
1350 __safe_for_unpickling__ = True
1351 def __reduce__(self): return (wx.Rect, self.Get())
d14a1e28
RD
1352
1353
1354class RectPtr(Rect):
1355 def __init__(self, this):
1356 self.this = this
1357 if not hasattr(self,"thisown"): self.thisown = 0
1358 self.__class__ = Rect
54f9ee45 1359_core_.Rect_swigregister(RectPtr)
d14a1e28
RD
1360
1361def RectPP(*args, **kwargs):
0df68c9f
RD
1362 """
1363 RectPP(Point topLeft, Point bottomRight) -> Rect
e811c8ce 1364
0df68c9f
RD
1365 Create a new Rect object from Points representing two corners.
1366 """
54f9ee45 1367 val = _core_.new_RectPP(*args, **kwargs)
d14a1e28
RD
1368 val.thisown = 1
1369 return val
1370
1371def RectPS(*args, **kwargs):
0df68c9f
RD
1372 """
1373 RectPS(Point pos, Size size) -> Rect
e811c8ce 1374
0df68c9f
RD
1375 Create a new Rect from a position and size.
1376 """
54f9ee45 1377 val = _core_.new_RectPS(*args, **kwargs)
d14a1e28
RD
1378 val.thisown = 1
1379 return val
1380
d3b6e4ff
RD
1381def RectS(*args, **kwargs):
1382 """
1383 RectS(Size size) -> Rect
1384
1385 Create a new Rect from a size only.
1386 """
1387 val = _core_.new_RectS(*args, **kwargs)
1388 val.thisown = 1
1389 return val
1390
d14a1e28 1391
e811c8ce 1392def IntersectRect(*args, **kwargs):
0df68c9f
RD
1393 """
1394 IntersectRect(Rect r1, Rect r2) -> Rect
e811c8ce 1395
0df68c9f
RD
1396 Calculate and return the intersection of r1 and r2.
1397 """
54f9ee45 1398 return _core_.IntersectRect(*args, **kwargs)
d14a1e28
RD
1399#---------------------------------------------------------------------------
1400
1401class Point2D(object):
41e2b43e
RD
1402 """
1403 wx.Point2Ds represent a point or a vector in a 2d coordinate system
1404 with floating point values.
1405 """
e811c8ce
RD
1406 def __repr__(self):
1407 return "<%s.%s; proxy of C++ wxPoint2D instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 1408 def __init__(self, *args, **kwargs):
0df68c9f 1409 """
a95a7133 1410 __init__(self, double x=0.0, double y=0.0) -> Point2D
e811c8ce 1411
0df68c9f
RD
1412 Create a w.Point2D object.
1413 """
54f9ee45 1414 newobj = _core_.new_Point2D(*args, **kwargs)
d14a1e28
RD
1415 self.this = newobj.this
1416 self.thisown = 1
1417 del newobj.thisown
e811c8ce 1418 def GetFloor(*args, **kwargs):
fd2dc343
RD
1419 """
1420 GetFloor() -> (x,y)
1421
1422 Convert to integer
1423 """
54f9ee45 1424 return _core_.Point2D_GetFloor(*args, **kwargs)
e811c8ce
RD
1425
1426 def GetRounded(*args, **kwargs):
fd2dc343
RD
1427 """
1428 GetRounded() -> (x,y)
1429
1430 Convert to integer
1431 """
54f9ee45 1432 return _core_.Point2D_GetRounded(*args, **kwargs)
e811c8ce
RD
1433
1434 def GetVectorLength(*args, **kwargs):
a95a7133 1435 """GetVectorLength(self) -> double"""
54f9ee45 1436 return _core_.Point2D_GetVectorLength(*args, **kwargs)
e811c8ce
RD
1437
1438 def GetVectorAngle(*args, **kwargs):
a95a7133 1439 """GetVectorAngle(self) -> double"""
54f9ee45 1440 return _core_.Point2D_GetVectorAngle(*args, **kwargs)
e811c8ce
RD
1441
1442 def SetVectorLength(*args, **kwargs):
a95a7133 1443 """SetVectorLength(self, double length)"""
54f9ee45 1444 return _core_.Point2D_SetVectorLength(*args, **kwargs)
e811c8ce
RD
1445
1446 def SetVectorAngle(*args, **kwargs):
a95a7133 1447 """SetVectorAngle(self, double degrees)"""
54f9ee45 1448 return _core_.Point2D_SetVectorAngle(*args, **kwargs)
e811c8ce 1449
d14a1e28
RD
1450 def SetPolarCoordinates(self, angle, length):
1451 self.SetVectorLength(length)
1452 self.SetVectorAngle(angle)
1453 def Normalize(self):
1454 self.SetVectorLength(1.0)
1455
e811c8ce 1456 def GetDistance(*args, **kwargs):
a95a7133 1457 """GetDistance(self, Point2D pt) -> double"""
54f9ee45 1458 return _core_.Point2D_GetDistance(*args, **kwargs)
e811c8ce
RD
1459
1460 def GetDistanceSquare(*args, **kwargs):
a95a7133 1461 """GetDistanceSquare(self, Point2D pt) -> double"""
54f9ee45 1462 return _core_.Point2D_GetDistanceSquare(*args, **kwargs)
e811c8ce
RD
1463
1464 def GetDotProduct(*args, **kwargs):
a95a7133 1465 """GetDotProduct(self, Point2D vec) -> double"""
54f9ee45 1466 return _core_.Point2D_GetDotProduct(*args, **kwargs)
e811c8ce
RD
1467
1468 def GetCrossProduct(*args, **kwargs):
a95a7133 1469 """GetCrossProduct(self, Point2D vec) -> double"""
54f9ee45 1470 return _core_.Point2D_GetCrossProduct(*args, **kwargs)
e811c8ce
RD
1471
1472 def __neg__(*args, **kwargs):
0df68c9f 1473 """
a95a7133 1474 __neg__(self) -> Point2D
e811c8ce 1475
0df68c9f
RD
1476 the reflection of this point
1477 """
54f9ee45 1478 return _core_.Point2D___neg__(*args, **kwargs)
e811c8ce
RD
1479
1480 def __iadd__(*args, **kwargs):
a95a7133 1481 """__iadd__(self, Point2D pt) -> Point2D"""
54f9ee45 1482 return _core_.Point2D___iadd__(*args, **kwargs)
e811c8ce
RD
1483
1484 def __isub__(*args, **kwargs):
a95a7133 1485 """__isub__(self, Point2D pt) -> Point2D"""
54f9ee45 1486 return _core_.Point2D___isub__(*args, **kwargs)
e811c8ce
RD
1487
1488 def __imul__(*args, **kwargs):
a95a7133 1489 """__imul__(self, Point2D pt) -> Point2D"""
54f9ee45 1490 return _core_.Point2D___imul__(*args, **kwargs)
e811c8ce
RD
1491
1492 def __idiv__(*args, **kwargs):
a95a7133 1493 """__idiv__(self, Point2D pt) -> Point2D"""
54f9ee45 1494 return _core_.Point2D___idiv__(*args, **kwargs)
e811c8ce
RD
1495
1496 def __eq__(*args, **kwargs):
0df68c9f 1497 """
a95a7133 1498 __eq__(self, Point2D pt) -> bool
e811c8ce 1499
0df68c9f
RD
1500 Test for equality
1501 """
54f9ee45 1502 return _core_.Point2D___eq__(*args, **kwargs)
e811c8ce
RD
1503
1504 def __ne__(*args, **kwargs):
0df68c9f 1505 """
a95a7133 1506 __ne__(self, Point2D pt) -> bool
e811c8ce 1507
0df68c9f
RD
1508 Test for inequality
1509 """
54f9ee45 1510 return _core_.Point2D___ne__(*args, **kwargs)
e811c8ce 1511
54f9ee45
RD
1512 x = property(_core_.Point2D_x_get, _core_.Point2D_x_set)
1513 y = property(_core_.Point2D_y_get, _core_.Point2D_y_set)
e811c8ce 1514 def Set(*args, **kwargs):
a95a7133 1515 """Set(self, double x=0, double y=0)"""
54f9ee45 1516 return _core_.Point2D_Set(*args, **kwargs)
e811c8ce
RD
1517
1518 def Get(*args, **kwargs):
0df68c9f
RD
1519 """
1520 Get() -> (x,y)
e811c8ce 1521
0df68c9f
RD
1522 Return x and y properties as a tuple.
1523 """
54f9ee45 1524 return _core_.Point2D_Get(*args, **kwargs)
e811c8ce 1525
41e2b43e 1526 asTuple = wx._deprecated(Get, "asTuple is deprecated, use `Get` instead")
e811c8ce
RD
1527 def __str__(self): return str(self.Get())
1528 def __repr__(self): return 'wx.Point2D'+str(self.Get())
1529 def __len__(self): return len(self.Get())
1530 def __getitem__(self, index): return self.Get()[index]
d14a1e28 1531 def __setitem__(self, index, val):
e811c8ce
RD
1532 if index == 0: self.x = val
1533 elif index == 1: self.y = val
d14a1e28 1534 else: raise IndexError
e811c8ce 1535 def __nonzero__(self): return self.Get() != (0.0, 0.0)
74e96f3d
RD
1536 __safe_for_unpickling__ = True
1537 def __reduce__(self): return (wx.Point2D, self.Get())
d14a1e28
RD
1538
1539
1540class Point2DPtr(Point2D):
1541 def __init__(self, this):
1542 self.this = this
1543 if not hasattr(self,"thisown"): self.thisown = 0
1544 self.__class__ = Point2D
54f9ee45 1545_core_.Point2D_swigregister(Point2DPtr)
d14a1e28
RD
1546
1547def Point2DCopy(*args, **kwargs):
0df68c9f
RD
1548 """
1549 Point2DCopy(Point2D pt) -> Point2D
e811c8ce 1550
0df68c9f
RD
1551 Create a w.Point2D object.
1552 """
54f9ee45 1553 val = _core_.new_Point2DCopy(*args, **kwargs)
d14a1e28
RD
1554 val.thisown = 1
1555 return val
1556
1557def Point2DFromPoint(*args, **kwargs):
0df68c9f
RD
1558 """
1559 Point2DFromPoint(Point pt) -> Point2D
e811c8ce 1560
0df68c9f
RD
1561 Create a w.Point2D object.
1562 """
54f9ee45 1563 val = _core_.new_Point2DFromPoint(*args, **kwargs)
d14a1e28
RD
1564 val.thisown = 1
1565 return val
1566
1567#---------------------------------------------------------------------------
1568
54f9ee45
RD
1569FromStart = _core_.FromStart
1570FromCurrent = _core_.FromCurrent
1571FromEnd = _core_.FromEnd
d14a1e28 1572class InputStream(object):
093d3ff1 1573 """Proxy of C++ InputStream class"""
e811c8ce
RD
1574 def __repr__(self):
1575 return "<%s.%s; proxy of C++ wxPyInputStream instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 1576 def __init__(self, *args, **kwargs):
a95a7133 1577 """__init__(self, PyObject p) -> InputStream"""
54f9ee45 1578 newobj = _core_.new_InputStream(*args, **kwargs)
d14a1e28
RD
1579 self.this = newobj.this
1580 self.thisown = 1
1581 del newobj.thisown
8fb0e70a
RD
1582 def __del__(self, destroy=_core_.delete_InputStream):
1583 """__del__(self)"""
1584 try:
1585 if self.thisown: destroy(self)
1586 except: pass
1587
e811c8ce 1588 def close(*args, **kwargs):
a95a7133 1589 """close(self)"""
54f9ee45 1590 return _core_.InputStream_close(*args, **kwargs)
e811c8ce
RD
1591
1592 def flush(*args, **kwargs):
a95a7133 1593 """flush(self)"""
54f9ee45 1594 return _core_.InputStream_flush(*args, **kwargs)
e811c8ce
RD
1595
1596 def eof(*args, **kwargs):
a95a7133 1597 """eof(self) -> bool"""
54f9ee45 1598 return _core_.InputStream_eof(*args, **kwargs)
e811c8ce
RD
1599
1600 def read(*args, **kwargs):
a95a7133 1601 """read(self, int size=-1) -> PyObject"""
54f9ee45 1602 return _core_.InputStream_read(*args, **kwargs)
e811c8ce
RD
1603
1604 def readline(*args, **kwargs):
a95a7133 1605 """readline(self, int size=-1) -> PyObject"""
54f9ee45 1606 return _core_.InputStream_readline(*args, **kwargs)
e811c8ce
RD
1607
1608 def readlines(*args, **kwargs):
a95a7133 1609 """readlines(self, int sizehint=-1) -> PyObject"""
54f9ee45 1610 return _core_.InputStream_readlines(*args, **kwargs)
e811c8ce
RD
1611
1612 def seek(*args, **kwargs):
a95a7133 1613 """seek(self, int offset, int whence=0)"""
54f9ee45 1614 return _core_.InputStream_seek(*args, **kwargs)
e811c8ce
RD
1615
1616 def tell(*args, **kwargs):
a95a7133 1617 """tell(self) -> int"""
54f9ee45 1618 return _core_.InputStream_tell(*args, **kwargs)
e811c8ce
RD
1619
1620 def Peek(*args, **kwargs):
a95a7133 1621 """Peek(self) -> char"""
54f9ee45 1622 return _core_.InputStream_Peek(*args, **kwargs)
e811c8ce
RD
1623
1624 def GetC(*args, **kwargs):
a95a7133 1625 """GetC(self) -> char"""
54f9ee45 1626 return _core_.InputStream_GetC(*args, **kwargs)
e811c8ce
RD
1627
1628 def LastRead(*args, **kwargs):
a95a7133 1629 """LastRead(self) -> size_t"""
54f9ee45 1630 return _core_.InputStream_LastRead(*args, **kwargs)
e811c8ce
RD
1631
1632 def CanRead(*args, **kwargs):
a95a7133 1633 """CanRead(self) -> bool"""
54f9ee45 1634 return _core_.InputStream_CanRead(*args, **kwargs)
e811c8ce
RD
1635
1636 def Eof(*args, **kwargs):
a95a7133 1637 """Eof(self) -> bool"""
54f9ee45 1638 return _core_.InputStream_Eof(*args, **kwargs)
e811c8ce
RD
1639
1640 def Ungetch(*args, **kwargs):
a95a7133 1641 """Ungetch(self, char c) -> bool"""
54f9ee45 1642 return _core_.InputStream_Ungetch(*args, **kwargs)
e811c8ce
RD
1643
1644 def SeekI(*args, **kwargs):
a95a7133 1645 """SeekI(self, long pos, int mode=FromStart) -> long"""
54f9ee45 1646 return _core_.InputStream_SeekI(*args, **kwargs)
e811c8ce
RD
1647
1648 def TellI(*args, **kwargs):
a95a7133 1649 """TellI(self) -> long"""
54f9ee45 1650 return _core_.InputStream_TellI(*args, **kwargs)
e811c8ce 1651
d14a1e28
RD
1652
1653class InputStreamPtr(InputStream):
1654 def __init__(self, this):
1655 self.this = this
1656 if not hasattr(self,"thisown"): self.thisown = 0
1657 self.__class__ = InputStream
54f9ee45 1658_core_.InputStream_swigregister(InputStreamPtr)
d14a1e28
RD
1659DefaultPosition = cvar.DefaultPosition
1660DefaultSize = cvar.DefaultSize
1661
1662class OutputStream(object):
093d3ff1 1663 """Proxy of C++ OutputStream class"""
d14a1e28
RD
1664 def __init__(self): raise RuntimeError, "No constructor defined"
1665 def __repr__(self):
1666 return "<%s.%s; proxy of C++ wxOutputStream instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
e811c8ce 1667 def write(*args, **kwargs):
a95a7133 1668 """write(self, PyObject obj)"""
54f9ee45 1669 return _core_.OutputStream_write(*args, **kwargs)
e811c8ce 1670
d14a1e28
RD
1671
1672class OutputStreamPtr(OutputStream):
1673 def __init__(self, this):
1674 self.this = this
1675 if not hasattr(self,"thisown"): self.thisown = 0
1676 self.__class__ = OutputStream
54f9ee45 1677_core_.OutputStream_swigregister(OutputStreamPtr)
d14a1e28
RD
1678
1679#---------------------------------------------------------------------------
1680
1681class FSFile(Object):
093d3ff1 1682 """Proxy of C++ FSFile class"""
e811c8ce
RD
1683 def __repr__(self):
1684 return "<%s.%s; proxy of C++ wxFSFile instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 1685 def __init__(self, *args, **kwargs):
0df68c9f 1686 """
a95a7133 1687 __init__(self, InputStream stream, String loc, String mimetype, String anchor,
196addbf 1688 DateTime modif) -> FSFile
0df68c9f 1689 """
54f9ee45 1690 newobj = _core_.new_FSFile(*args, **kwargs)
d14a1e28
RD
1691 self.this = newobj.this
1692 self.thisown = 1
1693 del newobj.thisown
4cf4100f
RD
1694 self.thisown = 0 # It will normally be deleted by the user of the wxFileSystem
1695
54f9ee45 1696 def __del__(self, destroy=_core_.delete_FSFile):
a95a7133 1697 """__del__(self)"""
d14a1e28
RD
1698 try:
1699 if self.thisown: destroy(self)
1700 except: pass
e811c8ce
RD
1701
1702 def GetStream(*args, **kwargs):
a95a7133 1703 """GetStream(self) -> InputStream"""
54f9ee45 1704 return _core_.FSFile_GetStream(*args, **kwargs)
e811c8ce
RD
1705
1706 def GetMimeType(*args, **kwargs):
a95a7133 1707 """GetMimeType(self) -> String"""
54f9ee45 1708 return _core_.FSFile_GetMimeType(*args, **kwargs)
e811c8ce
RD
1709
1710 def GetLocation(*args, **kwargs):
a95a7133 1711 """GetLocation(self) -> String"""
54f9ee45 1712 return _core_.FSFile_GetLocation(*args, **kwargs)
e811c8ce
RD
1713
1714 def GetAnchor(*args, **kwargs):
a95a7133 1715 """GetAnchor(self) -> String"""
54f9ee45 1716 return _core_.FSFile_GetAnchor(*args, **kwargs)
e811c8ce
RD
1717
1718 def GetModificationTime(*args, **kwargs):
a95a7133 1719 """GetModificationTime(self) -> DateTime"""
54f9ee45 1720 return _core_.FSFile_GetModificationTime(*args, **kwargs)
e811c8ce 1721
d14a1e28
RD
1722
1723class FSFilePtr(FSFile):
1724 def __init__(self, this):
1725 self.this = this
1726 if not hasattr(self,"thisown"): self.thisown = 0
1727 self.__class__ = FSFile
54f9ee45 1728_core_.FSFile_swigregister(FSFilePtr)
d14a1e28
RD
1729
1730class CPPFileSystemHandler(object):
093d3ff1 1731 """Proxy of C++ CPPFileSystemHandler class"""
d14a1e28
RD
1732 def __init__(self): raise RuntimeError, "No constructor defined"
1733 def __repr__(self):
1734 return "<%s.%s; proxy of C++ wxFileSystemHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
1735
1736class CPPFileSystemHandlerPtr(CPPFileSystemHandler):
1737 def __init__(self, this):
1738 self.this = this
1739 if not hasattr(self,"thisown"): self.thisown = 0
1740 self.__class__ = CPPFileSystemHandler
54f9ee45 1741_core_.CPPFileSystemHandler_swigregister(CPPFileSystemHandlerPtr)
d14a1e28
RD
1742
1743class FileSystemHandler(CPPFileSystemHandler):
093d3ff1 1744 """Proxy of C++ FileSystemHandler class"""
e811c8ce
RD
1745 def __repr__(self):
1746 return "<%s.%s; proxy of C++ wxPyFileSystemHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 1747 def __init__(self, *args, **kwargs):
a95a7133 1748 """__init__(self) -> FileSystemHandler"""
54f9ee45 1749 newobj = _core_.new_FileSystemHandler(*args, **kwargs)
d14a1e28
RD
1750 self.this = newobj.this
1751 self.thisown = 1
1752 del newobj.thisown
1753 self._setCallbackInfo(self, FileSystemHandler)
e811c8ce
RD
1754
1755 def _setCallbackInfo(*args, **kwargs):
a95a7133 1756 """_setCallbackInfo(self, PyObject self, PyObject _class)"""
54f9ee45 1757 return _core_.FileSystemHandler__setCallbackInfo(*args, **kwargs)
e811c8ce
RD
1758
1759 def CanOpen(*args, **kwargs):
a95a7133 1760 """CanOpen(self, String location) -> bool"""
54f9ee45 1761 return _core_.FileSystemHandler_CanOpen(*args, **kwargs)
e811c8ce
RD
1762
1763 def OpenFile(*args, **kwargs):
a95a7133 1764 """OpenFile(self, FileSystem fs, String location) -> FSFile"""
54f9ee45 1765 return _core_.FileSystemHandler_OpenFile(*args, **kwargs)
e811c8ce
RD
1766
1767 def FindFirst(*args, **kwargs):
a95a7133 1768 """FindFirst(self, String spec, int flags=0) -> String"""
54f9ee45 1769 return _core_.FileSystemHandler_FindFirst(*args, **kwargs)
e811c8ce
RD
1770
1771 def FindNext(*args, **kwargs):
a95a7133 1772 """FindNext(self) -> String"""
54f9ee45 1773 return _core_.FileSystemHandler_FindNext(*args, **kwargs)
e811c8ce
RD
1774
1775 def GetProtocol(*args, **kwargs):
a95a7133 1776 """GetProtocol(self, String location) -> String"""
54f9ee45 1777 return _core_.FileSystemHandler_GetProtocol(*args, **kwargs)
e811c8ce
RD
1778
1779 def GetLeftLocation(*args, **kwargs):
a95a7133 1780 """GetLeftLocation(self, String location) -> String"""
54f9ee45 1781 return _core_.FileSystemHandler_GetLeftLocation(*args, **kwargs)
e811c8ce
RD
1782
1783 def GetAnchor(*args, **kwargs):
a95a7133 1784 """GetAnchor(self, String location) -> String"""
54f9ee45 1785 return _core_.FileSystemHandler_GetAnchor(*args, **kwargs)
e811c8ce
RD
1786
1787 def GetRightLocation(*args, **kwargs):
a95a7133 1788 """GetRightLocation(self, String location) -> String"""
54f9ee45 1789 return _core_.FileSystemHandler_GetRightLocation(*args, **kwargs)
e811c8ce
RD
1790
1791 def GetMimeTypeFromExt(*args, **kwargs):
a95a7133 1792 """GetMimeTypeFromExt(self, String location) -> String"""
54f9ee45 1793 return _core_.FileSystemHandler_GetMimeTypeFromExt(*args, **kwargs)
e811c8ce 1794
d14a1e28
RD
1795
1796class FileSystemHandlerPtr(FileSystemHandler):
1797 def __init__(self, this):
1798 self.this = this
1799 if not hasattr(self,"thisown"): self.thisown = 0
1800 self.__class__ = FileSystemHandler
54f9ee45 1801_core_.FileSystemHandler_swigregister(FileSystemHandlerPtr)
d14a1e28
RD
1802
1803class FileSystem(Object):
093d3ff1 1804 """Proxy of C++ FileSystem class"""
e811c8ce
RD
1805 def __repr__(self):
1806 return "<%s.%s; proxy of C++ wxFileSystem instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 1807 def __init__(self, *args, **kwargs):
a95a7133 1808 """__init__(self) -> FileSystem"""
54f9ee45 1809 newobj = _core_.new_FileSystem(*args, **kwargs)
d14a1e28
RD
1810 self.this = newobj.this
1811 self.thisown = 1
1812 del newobj.thisown
54f9ee45 1813 def __del__(self, destroy=_core_.delete_FileSystem):
a95a7133 1814 """__del__(self)"""
d14a1e28
RD
1815 try:
1816 if self.thisown: destroy(self)
1817 except: pass
e811c8ce
RD
1818
1819 def ChangePathTo(*args, **kwargs):
a95a7133 1820 """ChangePathTo(self, String location, bool is_dir=False)"""
54f9ee45 1821 return _core_.FileSystem_ChangePathTo(*args, **kwargs)
e811c8ce
RD
1822
1823 def GetPath(*args, **kwargs):
a95a7133 1824 """GetPath(self) -> String"""
54f9ee45 1825 return _core_.FileSystem_GetPath(*args, **kwargs)
e811c8ce
RD
1826
1827 def OpenFile(*args, **kwargs):
a95a7133 1828 """OpenFile(self, String location) -> FSFile"""
54f9ee45 1829 return _core_.FileSystem_OpenFile(*args, **kwargs)
e811c8ce
RD
1830
1831 def FindFirst(*args, **kwargs):
a95a7133 1832 """FindFirst(self, String spec, int flags=0) -> String"""
54f9ee45 1833 return _core_.FileSystem_FindFirst(*args, **kwargs)
e811c8ce
RD
1834
1835 def FindNext(*args, **kwargs):
a95a7133 1836 """FindNext(self) -> String"""
54f9ee45 1837 return _core_.FileSystem_FindNext(*args, **kwargs)
e811c8ce
RD
1838
1839 def AddHandler(*args, **kwargs):
66c033b4 1840 """AddHandler(CPPFileSystemHandler handler)"""
54f9ee45 1841 return _core_.FileSystem_AddHandler(*args, **kwargs)
e811c8ce
RD
1842
1843 AddHandler = staticmethod(AddHandler)
1844 def CleanUpHandlers(*args, **kwargs):
66c033b4 1845 """CleanUpHandlers()"""
54f9ee45 1846 return _core_.FileSystem_CleanUpHandlers(*args, **kwargs)
e811c8ce
RD
1847
1848 CleanUpHandlers = staticmethod(CleanUpHandlers)
1849 def FileNameToURL(*args, **kwargs):
66c033b4 1850 """FileNameToURL(String filename) -> String"""
54f9ee45 1851 return _core_.FileSystem_FileNameToURL(*args, **kwargs)
e811c8ce
RD
1852
1853 FileNameToURL = staticmethod(FileNameToURL)
2ef75293
RD
1854 def URLToFileName(*args, **kwargs):
1855 """URLToFileName(String url) -> String"""
1856 return _core_.FileSystem_URLToFileName(*args, **kwargs)
1857
1858 URLToFileName = staticmethod(URLToFileName)
d14a1e28
RD
1859
1860class FileSystemPtr(FileSystem):
1861 def __init__(self, this):
1862 self.this = this
1863 if not hasattr(self,"thisown"): self.thisown = 0
1864 self.__class__ = FileSystem
54f9ee45 1865_core_.FileSystem_swigregister(FileSystemPtr)
d14a1e28 1866
e811c8ce
RD
1867def FileSystem_AddHandler(*args, **kwargs):
1868 """FileSystem_AddHandler(CPPFileSystemHandler handler)"""
54f9ee45 1869 return _core_.FileSystem_AddHandler(*args, **kwargs)
d14a1e28 1870
e811c8ce
RD
1871def FileSystem_CleanUpHandlers(*args, **kwargs):
1872 """FileSystem_CleanUpHandlers()"""
54f9ee45 1873 return _core_.FileSystem_CleanUpHandlers(*args, **kwargs)
d14a1e28 1874
e811c8ce 1875def FileSystem_FileNameToURL(*args, **kwargs):
196addbf 1876 """FileSystem_FileNameToURL(String filename) -> String"""
54f9ee45 1877 return _core_.FileSystem_FileNameToURL(*args, **kwargs)
d14a1e28 1878
e811c8ce 1879def FileSystem_URLToFileName(*args, **kwargs):
196addbf 1880 """FileSystem_URLToFileName(String url) -> String"""
54f9ee45 1881 return _core_.FileSystem_URLToFileName(*args, **kwargs)
2ef75293 1882
d14a1e28 1883class InternetFSHandler(CPPFileSystemHandler):
093d3ff1 1884 """Proxy of C++ InternetFSHandler class"""
e811c8ce
RD
1885 def __repr__(self):
1886 return "<%s.%s; proxy of C++ wxInternetFSHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 1887 def __init__(self, *args, **kwargs):
a95a7133 1888 """__init__(self) -> InternetFSHandler"""
54f9ee45 1889 newobj = _core_.new_InternetFSHandler(*args, **kwargs)
d14a1e28
RD
1890 self.this = newobj.this
1891 self.thisown = 1
1892 del newobj.thisown
e811c8ce 1893 def CanOpen(*args, **kwargs):
a95a7133 1894 """CanOpen(self, String location) -> bool"""
54f9ee45 1895 return _core_.InternetFSHandler_CanOpen(*args, **kwargs)
e811c8ce
RD
1896
1897 def OpenFile(*args, **kwargs):
a95a7133 1898 """OpenFile(self, FileSystem fs, String location) -> FSFile"""
54f9ee45 1899 return _core_.InternetFSHandler_OpenFile(*args, **kwargs)
e811c8ce 1900
d14a1e28
RD
1901
1902class InternetFSHandlerPtr(InternetFSHandler):
1903 def __init__(self, this):
1904 self.this = this
1905 if not hasattr(self,"thisown"): self.thisown = 0
1906 self.__class__ = InternetFSHandler
54f9ee45 1907_core_.InternetFSHandler_swigregister(InternetFSHandlerPtr)
d14a1e28
RD
1908
1909class ZipFSHandler(CPPFileSystemHandler):
093d3ff1 1910 """Proxy of C++ ZipFSHandler class"""
e811c8ce
RD
1911 def __repr__(self):
1912 return "<%s.%s; proxy of C++ wxZipFSHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 1913 def __init__(self, *args, **kwargs):
a95a7133 1914 """__init__(self) -> ZipFSHandler"""
54f9ee45 1915 newobj = _core_.new_ZipFSHandler(*args, **kwargs)
d14a1e28
RD
1916 self.this = newobj.this
1917 self.thisown = 1
1918 del newobj.thisown
e811c8ce 1919 def CanOpen(*args, **kwargs):
a95a7133 1920 """CanOpen(self, String location) -> bool"""
54f9ee45 1921 return _core_.ZipFSHandler_CanOpen(*args, **kwargs)
e811c8ce
RD
1922
1923 def OpenFile(*args, **kwargs):
a95a7133 1924 """OpenFile(self, FileSystem fs, String location) -> FSFile"""
54f9ee45 1925 return _core_.ZipFSHandler_OpenFile(*args, **kwargs)
e811c8ce
RD
1926
1927 def FindFirst(*args, **kwargs):
a95a7133 1928 """FindFirst(self, String spec, int flags=0) -> String"""
54f9ee45 1929 return _core_.ZipFSHandler_FindFirst(*args, **kwargs)
e811c8ce
RD
1930
1931 def FindNext(*args, **kwargs):
a95a7133 1932 """FindNext(self) -> String"""
54f9ee45 1933 return _core_.ZipFSHandler_FindNext(*args, **kwargs)
e811c8ce 1934
d14a1e28
RD
1935
1936class ZipFSHandlerPtr(ZipFSHandler):
1937 def __init__(self, this):
1938 self.this = this
1939 if not hasattr(self,"thisown"): self.thisown = 0
1940 self.__class__ = ZipFSHandler
54f9ee45 1941_core_.ZipFSHandler_swigregister(ZipFSHandlerPtr)
d14a1e28
RD
1942
1943
e811c8ce 1944def __wxMemoryFSHandler_AddFile_wxImage(*args, **kwargs):
196addbf 1945 """__wxMemoryFSHandler_AddFile_wxImage(String filename, Image image, long type)"""
54f9ee45 1946 return _core_.__wxMemoryFSHandler_AddFile_wxImage(*args, **kwargs)
d14a1e28 1947
e811c8ce 1948def __wxMemoryFSHandler_AddFile_wxBitmap(*args, **kwargs):
196addbf 1949 """__wxMemoryFSHandler_AddFile_wxBitmap(String filename, Bitmap bitmap, long type)"""
54f9ee45 1950 return _core_.__wxMemoryFSHandler_AddFile_wxBitmap(*args, **kwargs)
d14a1e28 1951
e811c8ce 1952def __wxMemoryFSHandler_AddFile_Data(*args, **kwargs):
196addbf 1953 """__wxMemoryFSHandler_AddFile_Data(String filename, PyObject data)"""
54f9ee45 1954 return _core_.__wxMemoryFSHandler_AddFile_Data(*args, **kwargs)
2ef75293
RD
1955def MemoryFSHandler_AddFile(filename, dataItem, imgType=-1):
1956 """
1957 Add 'file' to the memory filesystem. The dataItem parameter can
1958 either be a `wx.Bitmap`, `wx.Image` or a string that can contain
1959 arbitrary data. If a bitmap or image is used then the imgType
1960 parameter should specify what kind of image file it should be
1961 written as, wx.BITMAP_TYPE_PNG, etc.
1962 """
1963 if isinstance(dataItem, wx.Image):
1964 __wxMemoryFSHandler_AddFile_wxImage(filename, dataItem, imgType)
1965 elif isinstance(dataItem, wx.Bitmap):
1966 __wxMemoryFSHandler_AddFile_wxBitmap(filename, dataItem, imgType)
1967 elif type(dataItem) == str:
1968 __wxMemoryFSHandler_AddFile_Data(filename, dataItem)
1969 else:
1970 raise TypeError, 'wx.Image, wx.Bitmap or string expected'
d14a1e28
RD
1971
1972class MemoryFSHandler(CPPFileSystemHandler):
093d3ff1 1973 """Proxy of C++ MemoryFSHandler class"""
e811c8ce
RD
1974 def __repr__(self):
1975 return "<%s.%s; proxy of C++ wxMemoryFSHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 1976 def __init__(self, *args, **kwargs):
a95a7133 1977 """__init__(self) -> MemoryFSHandler"""
54f9ee45 1978 newobj = _core_.new_MemoryFSHandler(*args, **kwargs)
d14a1e28
RD
1979 self.this = newobj.this
1980 self.thisown = 1
1981 del newobj.thisown
e811c8ce 1982 def RemoveFile(*args, **kwargs):
66c033b4 1983 """RemoveFile(String filename)"""
54f9ee45 1984 return _core_.MemoryFSHandler_RemoveFile(*args, **kwargs)
e811c8ce
RD
1985
1986 RemoveFile = staticmethod(RemoveFile)
d14a1e28 1987 AddFile = staticmethod(MemoryFSHandler_AddFile)
e811c8ce 1988 def CanOpen(*args, **kwargs):
a95a7133 1989 """CanOpen(self, String location) -> bool"""
54f9ee45 1990 return _core_.MemoryFSHandler_CanOpen(*args, **kwargs)
e811c8ce
RD
1991
1992 def OpenFile(*args, **kwargs):
a95a7133 1993 """OpenFile(self, FileSystem fs, String location) -> FSFile"""
54f9ee45 1994 return _core_.MemoryFSHandler_OpenFile(*args, **kwargs)
e811c8ce
RD
1995
1996 def FindFirst(*args, **kwargs):
a95a7133 1997 """FindFirst(self, String spec, int flags=0) -> String"""
54f9ee45 1998 return _core_.MemoryFSHandler_FindFirst(*args, **kwargs)
e811c8ce
RD
1999
2000 def FindNext(*args, **kwargs):
a95a7133 2001 """FindNext(self) -> String"""
54f9ee45 2002 return _core_.MemoryFSHandler_FindNext(*args, **kwargs)
e811c8ce 2003
d14a1e28
RD
2004
2005class MemoryFSHandlerPtr(MemoryFSHandler):
2006 def __init__(self, this):
2007 self.this = this
2008 if not hasattr(self,"thisown"): self.thisown = 0
2009 self.__class__ = MemoryFSHandler
54f9ee45 2010_core_.MemoryFSHandler_swigregister(MemoryFSHandlerPtr)
d14a1e28 2011
e811c8ce 2012def MemoryFSHandler_RemoveFile(*args, **kwargs):
196addbf 2013 """MemoryFSHandler_RemoveFile(String filename)"""
54f9ee45 2014 return _core_.MemoryFSHandler_RemoveFile(*args, **kwargs)
d14a1e28
RD
2015
2016#---------------------------------------------------------------------------
2017
2018class ImageHandler(Object):
093d3ff1 2019 """Proxy of C++ ImageHandler class"""
d14a1e28
RD
2020 def __init__(self): raise RuntimeError, "No constructor defined"
2021 def __repr__(self):
2022 return "<%s.%s; proxy of C++ wxImageHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
e811c8ce 2023 def GetName(*args, **kwargs):
a95a7133 2024 """GetName(self) -> String"""
54f9ee45 2025 return _core_.ImageHandler_GetName(*args, **kwargs)
e811c8ce
RD
2026
2027 def GetExtension(*args, **kwargs):
a95a7133 2028 """GetExtension(self) -> String"""
54f9ee45 2029 return _core_.ImageHandler_GetExtension(*args, **kwargs)
e811c8ce
RD
2030
2031 def GetType(*args, **kwargs):
a95a7133 2032 """GetType(self) -> long"""
54f9ee45 2033 return _core_.ImageHandler_GetType(*args, **kwargs)
e811c8ce
RD
2034
2035 def GetMimeType(*args, **kwargs):
a95a7133 2036 """GetMimeType(self) -> String"""
54f9ee45 2037 return _core_.ImageHandler_GetMimeType(*args, **kwargs)
e811c8ce
RD
2038
2039 def CanRead(*args, **kwargs):
a95a7133 2040 """CanRead(self, String name) -> bool"""
54f9ee45 2041 return _core_.ImageHandler_CanRead(*args, **kwargs)
e811c8ce
RD
2042
2043 def SetName(*args, **kwargs):
a95a7133 2044 """SetName(self, String name)"""
54f9ee45 2045 return _core_.ImageHandler_SetName(*args, **kwargs)
e811c8ce
RD
2046
2047 def SetExtension(*args, **kwargs):
a95a7133 2048 """SetExtension(self, String extension)"""
54f9ee45 2049 return _core_.ImageHandler_SetExtension(*args, **kwargs)
e811c8ce
RD
2050
2051 def SetType(*args, **kwargs):
a95a7133 2052 """SetType(self, long type)"""
54f9ee45 2053 return _core_.ImageHandler_SetType(*args, **kwargs)
e811c8ce
RD
2054
2055 def SetMimeType(*args, **kwargs):
a95a7133 2056 """SetMimeType(self, String mimetype)"""
54f9ee45 2057 return _core_.ImageHandler_SetMimeType(*args, **kwargs)
e811c8ce 2058
d14a1e28
RD
2059
2060class ImageHandlerPtr(ImageHandler):
2061 def __init__(self, this):
2062 self.this = this
2063 if not hasattr(self,"thisown"): self.thisown = 0
2064 self.__class__ = ImageHandler
54f9ee45 2065_core_.ImageHandler_swigregister(ImageHandlerPtr)
d14a1e28
RD
2066
2067class ImageHistogram(object):
093d3ff1 2068 """Proxy of C++ ImageHistogram class"""
e811c8ce
RD
2069 def __repr__(self):
2070 return "<%s.%s; proxy of C++ wxImageHistogram instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 2071 def __init__(self, *args, **kwargs):
a95a7133 2072 """__init__(self) -> ImageHistogram"""
54f9ee45 2073 newobj = _core_.new_ImageHistogram(*args, **kwargs)
d14a1e28
RD
2074 self.this = newobj.this
2075 self.thisown = 1
2076 del newobj.thisown
e811c8ce 2077 def MakeKey(*args, **kwargs):
0df68c9f 2078 """
66c033b4 2079 MakeKey(unsigned char r, unsigned char g, unsigned char b) -> unsigned long
e811c8ce 2080
0df68c9f
RD
2081 Get the key in the histogram for the given RGB values
2082 """
54f9ee45 2083 return _core_.ImageHistogram_MakeKey(*args, **kwargs)
e811c8ce
RD
2084
2085 MakeKey = staticmethod(MakeKey)
2086 def FindFirstUnusedColour(*args, **kwargs):
fd2dc343
RD
2087 """
2088 FindFirstUnusedColour(int startR=1, int startG=0, int startB=0) -> (success, r, g, b)
2089
2090 Find first colour that is not used in the image and has higher RGB
2091 values than startR, startG, startB. Returns a tuple consisting of a
2092 success flag and rgb values.
2093 """
54f9ee45 2094 return _core_.ImageHistogram_FindFirstUnusedColour(*args, **kwargs)
e811c8ce 2095
d14a1e28
RD
2096
2097class ImageHistogramPtr(ImageHistogram):
2098 def __init__(self, this):
2099 self.this = this
2100 if not hasattr(self,"thisown"): self.thisown = 0
2101 self.__class__ = ImageHistogram
54f9ee45 2102_core_.ImageHistogram_swigregister(ImageHistogramPtr)
d14a1e28 2103
e811c8ce 2104def ImageHistogram_MakeKey(*args, **kwargs):
0df68c9f
RD
2105 """
2106 ImageHistogram_MakeKey(unsigned char r, unsigned char g, unsigned char b) -> unsigned long
e811c8ce 2107
0df68c9f
RD
2108 Get the key in the histogram for the given RGB values
2109 """
54f9ee45 2110 return _core_.ImageHistogram_MakeKey(*args, **kwargs)
d14a1e28
RD
2111
2112class Image(Object):
093d3ff1 2113 """Proxy of C++ Image class"""
e811c8ce
RD
2114 def __repr__(self):
2115 return "<%s.%s; proxy of C++ wxImage instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 2116 def __init__(self, *args, **kwargs):
a95a7133 2117 """__init__(self, String name, long type=BITMAP_TYPE_ANY, int index=-1) -> Image"""
54f9ee45 2118 newobj = _core_.new_Image(*args, **kwargs)
d14a1e28
RD
2119 self.this = newobj.this
2120 self.thisown = 1
2121 del newobj.thisown
54f9ee45 2122 def __del__(self, destroy=_core_.delete_Image):
a95a7133 2123 """__del__(self)"""
d14a1e28
RD
2124 try:
2125 if self.thisown: destroy(self)
2126 except: pass
e811c8ce
RD
2127
2128 def Create(*args, **kwargs):
a95a7133 2129 """Create(self, int width, int height)"""
54f9ee45 2130 return _core_.Image_Create(*args, **kwargs)
e811c8ce
RD
2131
2132 def Destroy(*args, **kwargs):
0df68c9f 2133 """
a95a7133 2134 Destroy(self)
e811c8ce 2135
0df68c9f
RD
2136 Deletes the C++ object this Python object is a proxy for.
2137 """
54f9ee45 2138 return _core_.Image_Destroy(*args, **kwargs)
e811c8ce
RD
2139
2140 def Scale(*args, **kwargs):
a95a7133 2141 """Scale(self, int width, int height) -> Image"""
54f9ee45 2142 return _core_.Image_Scale(*args, **kwargs)
e811c8ce
RD
2143
2144 def ShrinkBy(*args, **kwargs):
a95a7133 2145 """ShrinkBy(self, int xFactor, int yFactor) -> Image"""
54f9ee45 2146 return _core_.Image_ShrinkBy(*args, **kwargs)
e811c8ce
RD
2147
2148 def Rescale(*args, **kwargs):
a95a7133 2149 """Rescale(self, int width, int height) -> Image"""
54f9ee45 2150 return _core_.Image_Rescale(*args, **kwargs)
e811c8ce
RD
2151
2152 def SetRGB(*args, **kwargs):
a95a7133 2153 """SetRGB(self, int x, int y, unsigned char r, unsigned char g, unsigned char b)"""
54f9ee45 2154 return _core_.Image_SetRGB(*args, **kwargs)
e811c8ce
RD
2155
2156 def GetRed(*args, **kwargs):
a95a7133 2157 """GetRed(self, int x, int y) -> unsigned char"""
54f9ee45 2158 return _core_.Image_GetRed(*args, **kwargs)
e811c8ce
RD
2159
2160 def GetGreen(*args, **kwargs):
a95a7133 2161 """GetGreen(self, int x, int y) -> unsigned char"""
54f9ee45 2162 return _core_.Image_GetGreen(*args, **kwargs)
e811c8ce
RD
2163
2164 def GetBlue(*args, **kwargs):
a95a7133 2165 """GetBlue(self, int x, int y) -> unsigned char"""
54f9ee45 2166 return _core_.Image_GetBlue(*args, **kwargs)
e811c8ce
RD
2167
2168 def SetAlpha(*args, **kwargs):
a95a7133 2169 """SetAlpha(self, int x, int y, unsigned char alpha)"""
54f9ee45 2170 return _core_.Image_SetAlpha(*args, **kwargs)
e811c8ce
RD
2171
2172 def GetAlpha(*args, **kwargs):
a95a7133 2173 """GetAlpha(self, int x, int y) -> unsigned char"""
54f9ee45 2174 return _core_.Image_GetAlpha(*args, **kwargs)
e811c8ce
RD
2175
2176 def HasAlpha(*args, **kwargs):
a95a7133 2177 """HasAlpha(self) -> bool"""
54f9ee45 2178 return _core_.Image_HasAlpha(*args, **kwargs)
e811c8ce
RD
2179
2180 def FindFirstUnusedColour(*args, **kwargs):
fd2dc343
RD
2181 """
2182 FindFirstUnusedColour(int startR=1, int startG=0, int startB=0) -> (success, r, g, b)
2183
2184 Find first colour that is not used in the image and has higher RGB
2185 values than startR, startG, startB. Returns a tuple consisting of a
2186 success flag and rgb values.
2187 """
54f9ee45 2188 return _core_.Image_FindFirstUnusedColour(*args, **kwargs)
e811c8ce 2189
4cf4100f
RD
2190 def ConvertAlphaToMask(*args, **kwargs):
2191 """
2192 ConvertAlphaToMask(self, byte threshold=128) -> bool
2193
2194 If the image has alpha channel, this method converts it to mask. All pixels
2195 with alpha value less than ``threshold`` are replaced with mask colour and the
2196 alpha channel is removed. Mask colour is chosen automatically using
2197 `FindFirstUnusedColour`.
2198
2199 If the image image doesn't have alpha channel, ConvertAlphaToMask does
2200 nothing.
2201 """
2202 return _core_.Image_ConvertAlphaToMask(*args, **kwargs)
2203
8fb0e70a
RD
2204 def ConvertColourToAlpha(*args, **kwargs):
2205 """
2206 ConvertColourToAlpha(self, unsigned char r, unsigned char g, unsigned char b) -> bool
2207
2208 This method converts an image where the original alpha information is
2209 only available as a shades of a colour (actually shades of grey)
2210 typically when you draw anti-aliased text into a bitmap. The DC
2211 drawing routines draw grey values on the black background although
2212 they actually mean to draw white with differnt alpha values. This
2213 method reverses it, assuming a black (!) background and white text.
2214 The method will then fill up the whole image with the colour given.
2215 """
2216 return _core_.Image_ConvertColourToAlpha(*args, **kwargs)
2217
e811c8ce 2218 def SetMaskFromImage(*args, **kwargs):
a95a7133 2219 """SetMaskFromImage(self, Image mask, byte mr, byte mg, byte mb) -> bool"""
54f9ee45 2220 return _core_.Image_SetMaskFromImage(*args, **kwargs)
e811c8ce
RD
2221
2222 def CanRead(*args, **kwargs):
66c033b4 2223 """CanRead(String name) -> bool"""
54f9ee45 2224 return _core_.Image_CanRead(*args, **kwargs)
e811c8ce
RD
2225
2226 CanRead = staticmethod(CanRead)
2227 def GetImageCount(*args, **kwargs):
66c033b4 2228 """GetImageCount(String name, long type=BITMAP_TYPE_ANY) -> int"""
54f9ee45 2229 return _core_.Image_GetImageCount(*args, **kwargs)
e811c8ce
RD
2230
2231 GetImageCount = staticmethod(GetImageCount)
2232 def LoadFile(*args, **kwargs):
a95a7133 2233 """LoadFile(self, String name, long type=BITMAP_TYPE_ANY, int index=-1) -> bool"""
54f9ee45 2234 return _core_.Image_LoadFile(*args, **kwargs)
e811c8ce
RD
2235
2236 def LoadMimeFile(*args, **kwargs):
a95a7133 2237 """LoadMimeFile(self, String name, String mimetype, int index=-1) -> bool"""
54f9ee45 2238 return _core_.Image_LoadMimeFile(*args, **kwargs)
e811c8ce
RD
2239
2240 def SaveFile(*args, **kwargs):
a95a7133 2241 """SaveFile(self, String name, int type) -> bool"""
54f9ee45 2242 return _core_.Image_SaveFile(*args, **kwargs)
e811c8ce
RD
2243
2244 def SaveMimeFile(*args, **kwargs):
a95a7133 2245 """SaveMimeFile(self, String name, String mimetype) -> bool"""
54f9ee45 2246 return _core_.Image_SaveMimeFile(*args, **kwargs)
e811c8ce
RD
2247
2248 def CanReadStream(*args, **kwargs):
66c033b4 2249 """CanReadStream(InputStream stream) -> bool"""
54f9ee45 2250 return _core_.Image_CanReadStream(*args, **kwargs)
e811c8ce
RD
2251
2252 CanReadStream = staticmethod(CanReadStream)
2253 def LoadStream(*args, **kwargs):
a95a7133 2254 """LoadStream(self, InputStream stream, long type=BITMAP_TYPE_ANY, int index=-1) -> bool"""
54f9ee45 2255 return _core_.Image_LoadStream(*args, **kwargs)
e811c8ce
RD
2256
2257 def LoadMimeStream(*args, **kwargs):
a95a7133 2258 """LoadMimeStream(self, InputStream stream, String mimetype, int index=-1) -> bool"""
54f9ee45 2259 return _core_.Image_LoadMimeStream(*args, **kwargs)
e811c8ce
RD
2260
2261 def Ok(*args, **kwargs):
a95a7133 2262 """Ok(self) -> bool"""
54f9ee45 2263 return _core_.Image_Ok(*args, **kwargs)
e811c8ce
RD
2264
2265 def GetWidth(*args, **kwargs):
a95a7133 2266 """GetWidth(self) -> int"""
54f9ee45 2267 return _core_.Image_GetWidth(*args, **kwargs)
e811c8ce
RD
2268
2269 def GetHeight(*args, **kwargs):
a95a7133 2270 """GetHeight(self) -> int"""
54f9ee45 2271 return _core_.Image_GetHeight(*args, **kwargs)
e811c8ce 2272
b2df227b 2273 def GetSize(*args, **kwargs):
a95a7133 2274 """GetSize(self) -> Size"""
54f9ee45 2275 return _core_.Image_GetSize(*args, **kwargs)
b2df227b 2276
e811c8ce 2277 def GetSubImage(*args, **kwargs):
a95a7133 2278 """GetSubImage(self, Rect rect) -> Image"""
54f9ee45 2279 return _core_.Image_GetSubImage(*args, **kwargs)
e811c8ce
RD
2280
2281 def Copy(*args, **kwargs):
a95a7133 2282 """Copy(self) -> Image"""
54f9ee45 2283 return _core_.Image_Copy(*args, **kwargs)
e811c8ce
RD
2284
2285 def Paste(*args, **kwargs):
a95a7133 2286 """Paste(self, Image image, int x, int y)"""
54f9ee45 2287 return _core_.Image_Paste(*args, **kwargs)
e811c8ce
RD
2288
2289 def GetData(*args, **kwargs):
a95a7133 2290 """GetData(self) -> PyObject"""
54f9ee45 2291 return _core_.Image_GetData(*args, **kwargs)
e811c8ce
RD
2292
2293 def SetData(*args, **kwargs):
a95a7133 2294 """SetData(self, PyObject data)"""
54f9ee45 2295 return _core_.Image_SetData(*args, **kwargs)
e811c8ce
RD
2296
2297 def GetDataBuffer(*args, **kwargs):
a95a7133 2298 """GetDataBuffer(self) -> PyObject"""
54f9ee45 2299 return _core_.Image_GetDataBuffer(*args, **kwargs)
e811c8ce
RD
2300
2301 def SetDataBuffer(*args, **kwargs):
a95a7133 2302 """SetDataBuffer(self, PyObject data)"""
54f9ee45 2303 return _core_.Image_SetDataBuffer(*args, **kwargs)
e811c8ce
RD
2304
2305 def GetAlphaData(*args, **kwargs):
a95a7133 2306 """GetAlphaData(self) -> PyObject"""
54f9ee45 2307 return _core_.Image_GetAlphaData(*args, **kwargs)
e811c8ce
RD
2308
2309 def SetAlphaData(*args, **kwargs):
a95a7133 2310 """SetAlphaData(self, PyObject data)"""
54f9ee45 2311 return _core_.Image_SetAlphaData(*args, **kwargs)
e811c8ce
RD
2312
2313 def GetAlphaBuffer(*args, **kwargs):
a95a7133 2314 """GetAlphaBuffer(self) -> PyObject"""
54f9ee45 2315 return _core_.Image_GetAlphaBuffer(*args, **kwargs)
e811c8ce
RD
2316
2317 def SetAlphaBuffer(*args, **kwargs):
a95a7133 2318 """SetAlphaBuffer(self, PyObject data)"""
54f9ee45 2319 return _core_.Image_SetAlphaBuffer(*args, **kwargs)
e811c8ce
RD
2320
2321 def SetMaskColour(*args, **kwargs):
a95a7133 2322 """SetMaskColour(self, unsigned char r, unsigned char g, unsigned char b)"""
54f9ee45 2323 return _core_.Image_SetMaskColour(*args, **kwargs)
e811c8ce
RD
2324
2325 def GetMaskRed(*args, **kwargs):
a95a7133 2326 """GetMaskRed(self) -> unsigned char"""
54f9ee45 2327 return _core_.Image_GetMaskRed(*args, **kwargs)
e811c8ce
RD
2328
2329 def GetMaskGreen(*args, **kwargs):
a95a7133 2330 """GetMaskGreen(self) -> unsigned char"""
54f9ee45 2331 return _core_.Image_GetMaskGreen(*args, **kwargs)
e811c8ce
RD
2332
2333 def GetMaskBlue(*args, **kwargs):
a95a7133 2334 """GetMaskBlue(self) -> unsigned char"""
54f9ee45 2335 return _core_.Image_GetMaskBlue(*args, **kwargs)
e811c8ce
RD
2336
2337 def SetMask(*args, **kwargs):
a95a7133 2338 """SetMask(self, bool mask=True)"""
54f9ee45 2339 return _core_.Image_SetMask(*args, **kwargs)
e811c8ce
RD
2340
2341 def HasMask(*args, **kwargs):
a95a7133 2342 """HasMask(self) -> bool"""
54f9ee45 2343 return _core_.Image_HasMask(*args, **kwargs)
e811c8ce
RD
2344
2345 def Rotate(*args, **kwargs):
0df68c9f 2346 """
a95a7133 2347 Rotate(self, double angle, Point centre_of_rotation, bool interpolating=True,
0df68c9f
RD
2348 Point offset_after_rotation=None) -> Image
2349 """
54f9ee45 2350 return _core_.Image_Rotate(*args, **kwargs)
e811c8ce
RD
2351
2352 def Rotate90(*args, **kwargs):
a95a7133 2353 """Rotate90(self, bool clockwise=True) -> Image"""
54f9ee45 2354 return _core_.Image_Rotate90(*args, **kwargs)
e811c8ce
RD
2355
2356 def Mirror(*args, **kwargs):
a95a7133 2357 """Mirror(self, bool horizontally=True) -> Image"""
54f9ee45 2358 return _core_.Image_Mirror(*args, **kwargs)
e811c8ce
RD
2359
2360 def Replace(*args, **kwargs):
0df68c9f 2361 """
a95a7133 2362 Replace(self, unsigned char r1, unsigned char g1, unsigned char b1,
0df68c9f
RD
2363 unsigned char r2, unsigned char g2, unsigned char b2)
2364 """
54f9ee45 2365 return _core_.Image_Replace(*args, **kwargs)
e811c8ce
RD
2366
2367 def ConvertToMono(*args, **kwargs):
a95a7133 2368 """ConvertToMono(self, unsigned char r, unsigned char g, unsigned char b) -> Image"""
54f9ee45 2369 return _core_.Image_ConvertToMono(*args, **kwargs)
e811c8ce
RD
2370
2371 def SetOption(*args, **kwargs):
a95a7133 2372 """SetOption(self, String name, String value)"""
54f9ee45 2373 return _core_.Image_SetOption(*args, **kwargs)
e811c8ce
RD
2374
2375 def SetOptionInt(*args, **kwargs):
a95a7133 2376 """SetOptionInt(self, String name, int value)"""
54f9ee45 2377 return _core_.Image_SetOptionInt(*args, **kwargs)
e811c8ce
RD
2378
2379 def GetOption(*args, **kwargs):
a95a7133 2380 """GetOption(self, String name) -> String"""
54f9ee45 2381 return _core_.Image_GetOption(*args, **kwargs)
e811c8ce
RD
2382
2383 def GetOptionInt(*args, **kwargs):
a95a7133 2384 """GetOptionInt(self, String name) -> int"""
54f9ee45 2385 return _core_.Image_GetOptionInt(*args, **kwargs)
e811c8ce
RD
2386
2387 def HasOption(*args, **kwargs):
a95a7133 2388 """HasOption(self, String name) -> bool"""
54f9ee45 2389 return _core_.Image_HasOption(*args, **kwargs)
e811c8ce
RD
2390
2391 def CountColours(*args, **kwargs):
a95a7133 2392 """CountColours(self, unsigned long stopafter=(unsigned long) -1) -> unsigned long"""
54f9ee45 2393 return _core_.Image_CountColours(*args, **kwargs)
e811c8ce
RD
2394
2395 def ComputeHistogram(*args, **kwargs):
a95a7133 2396 """ComputeHistogram(self, ImageHistogram h) -> unsigned long"""
54f9ee45 2397 return _core_.Image_ComputeHistogram(*args, **kwargs)
e811c8ce
RD
2398
2399 def AddHandler(*args, **kwargs):
66c033b4 2400 """AddHandler(ImageHandler handler)"""
54f9ee45 2401 return _core_.Image_AddHandler(*args, **kwargs)
e811c8ce
RD
2402
2403 AddHandler = staticmethod(AddHandler)
2404 def InsertHandler(*args, **kwargs):
66c033b4 2405 """InsertHandler(ImageHandler handler)"""
54f9ee45 2406 return _core_.Image_InsertHandler(*args, **kwargs)
e811c8ce
RD
2407
2408 InsertHandler = staticmethod(InsertHandler)
2409 def RemoveHandler(*args, **kwargs):
66c033b4 2410 """RemoveHandler(String name) -> bool"""
54f9ee45 2411 return _core_.Image_RemoveHandler(*args, **kwargs)
e811c8ce
RD
2412
2413 RemoveHandler = staticmethod(RemoveHandler)
2414 def GetImageExtWildcard(*args, **kwargs):
66c033b4 2415 """GetImageExtWildcard() -> String"""
54f9ee45 2416 return _core_.Image_GetImageExtWildcard(*args, **kwargs)
e811c8ce
RD
2417
2418 GetImageExtWildcard = staticmethod(GetImageExtWildcard)
2419 def ConvertToBitmap(*args, **kwargs):
1fbf26be 2420 """ConvertToBitmap(self, int depth=-1) -> Bitmap"""
54f9ee45 2421 return _core_.Image_ConvertToBitmap(*args, **kwargs)
e811c8ce
RD
2422
2423 def ConvertToMonoBitmap(*args, **kwargs):
a95a7133 2424 """ConvertToMonoBitmap(self, unsigned char red, unsigned char green, unsigned char blue) -> Bitmap"""
54f9ee45 2425 return _core_.Image_ConvertToMonoBitmap(*args, **kwargs)
e811c8ce
RD
2426
2427 def __nonzero__(self): return self.Ok()
d14a1e28
RD
2428
2429class ImagePtr(Image):
2430 def __init__(self, this):
2431 self.this = this
2432 if not hasattr(self,"thisown"): self.thisown = 0
2433 self.__class__ = Image
54f9ee45 2434_core_.Image_swigregister(ImagePtr)
d14a1e28
RD
2435
2436def ImageFromMime(*args, **kwargs):
196addbf 2437 """ImageFromMime(String name, String mimetype, int index=-1) -> Image"""
54f9ee45 2438 val = _core_.new_ImageFromMime(*args, **kwargs)
d14a1e28
RD
2439 val.thisown = 1
2440 return val
2441
2442def ImageFromStream(*args, **kwargs):
196addbf 2443 """ImageFromStream(InputStream stream, long type=BITMAP_TYPE_ANY, int index=-1) -> Image"""
54f9ee45 2444 val = _core_.new_ImageFromStream(*args, **kwargs)
d14a1e28
RD
2445 val.thisown = 1
2446 return val
2447
2448def ImageFromStreamMime(*args, **kwargs):
196addbf 2449 """ImageFromStreamMime(InputStream stream, String mimetype, int index=-1) -> Image"""
54f9ee45 2450 val = _core_.new_ImageFromStreamMime(*args, **kwargs)
d14a1e28
RD
2451 val.thisown = 1
2452 return val
2453
66c033b4
RD
2454def EmptyImage(*args, **kwargs):
2455 """EmptyImage(int width=0, int height=0, bool clear=True) -> Image"""
2456 val = _core_.new_EmptyImage(*args, **kwargs)
d14a1e28
RD
2457 val.thisown = 1
2458 return val
2459
2460def ImageFromBitmap(*args, **kwargs):
196addbf 2461 """ImageFromBitmap(Bitmap bitmap) -> Image"""
54f9ee45 2462 val = _core_.new_ImageFromBitmap(*args, **kwargs)
d14a1e28
RD
2463 val.thisown = 1
2464 return val
2465
2466def ImageFromData(*args, **kwargs):
e811c8ce 2467 """ImageFromData(int width, int height, unsigned char data) -> Image"""
54f9ee45 2468 val = _core_.new_ImageFromData(*args, **kwargs)
d14a1e28
RD
2469 val.thisown = 1
2470 return val
2471
1823fbb4
RD
2472def ImageFromDataWithAlpha(*args, **kwargs):
2473 """ImageFromDataWithAlpha(int width, int height, unsigned char data, unsigned char alpha) -> Image"""
2474 val = _core_.new_ImageFromDataWithAlpha(*args, **kwargs)
2475 val.thisown = 1
2476 return val
2477
e811c8ce 2478def Image_CanRead(*args, **kwargs):
196addbf 2479 """Image_CanRead(String name) -> bool"""
54f9ee45 2480 return _core_.Image_CanRead(*args, **kwargs)
d14a1e28 2481
e811c8ce 2482def Image_GetImageCount(*args, **kwargs):
196addbf 2483 """Image_GetImageCount(String name, long type=BITMAP_TYPE_ANY) -> int"""
54f9ee45 2484 return _core_.Image_GetImageCount(*args, **kwargs)
d14a1e28 2485
e811c8ce 2486def Image_CanReadStream(*args, **kwargs):
196addbf 2487 """Image_CanReadStream(InputStream stream) -> bool"""
54f9ee45 2488 return _core_.Image_CanReadStream(*args, **kwargs)
d14a1e28 2489
e811c8ce
RD
2490def Image_AddHandler(*args, **kwargs):
2491 """Image_AddHandler(ImageHandler handler)"""
54f9ee45 2492 return _core_.Image_AddHandler(*args, **kwargs)
d14a1e28 2493
e811c8ce
RD
2494def Image_InsertHandler(*args, **kwargs):
2495 """Image_InsertHandler(ImageHandler handler)"""
54f9ee45 2496 return _core_.Image_InsertHandler(*args, **kwargs)
d14a1e28 2497
e811c8ce 2498def Image_RemoveHandler(*args, **kwargs):
196addbf 2499 """Image_RemoveHandler(String name) -> bool"""
54f9ee45 2500 return _core_.Image_RemoveHandler(*args, **kwargs)
d14a1e28 2501
e811c8ce 2502def Image_GetImageExtWildcard(*args, **kwargs):
196addbf 2503 """Image_GetImageExtWildcard() -> String"""
54f9ee45 2504 return _core_.Image_GetImageExtWildcard(*args, **kwargs)
d14a1e28 2505
5e4ca4a8
RD
2506def InitAllImageHandlers():
2507 """
2508 The former functionality of InitAllImageHanders is now done internal to
2509 the _core_ extension module and so this function has become a simple NOP.
2510 """
2511 pass
d14a1e28 2512
54f9ee45
RD
2513IMAGE_RESOLUTION_INCHES = _core_.IMAGE_RESOLUTION_INCHES
2514IMAGE_RESOLUTION_CM = _core_.IMAGE_RESOLUTION_CM
2515BMP_24BPP = _core_.BMP_24BPP
2516BMP_8BPP = _core_.BMP_8BPP
2517BMP_8BPP_GREY = _core_.BMP_8BPP_GREY
2518BMP_8BPP_GRAY = _core_.BMP_8BPP_GRAY
2519BMP_8BPP_RED = _core_.BMP_8BPP_RED
2520BMP_8BPP_PALETTE = _core_.BMP_8BPP_PALETTE
2521BMP_4BPP = _core_.BMP_4BPP
2522BMP_1BPP = _core_.BMP_1BPP
2523BMP_1BPP_BW = _core_.BMP_1BPP_BW
d14a1e28 2524class BMPHandler(ImageHandler):
093d3ff1 2525 """Proxy of C++ BMPHandler class"""
e811c8ce
RD
2526 def __repr__(self):
2527 return "<%s.%s; proxy of C++ wxBMPHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 2528 def __init__(self, *args, **kwargs):
a95a7133 2529 """__init__(self) -> BMPHandler"""
54f9ee45 2530 newobj = _core_.new_BMPHandler(*args, **kwargs)
d14a1e28
RD
2531 self.this = newobj.this
2532 self.thisown = 1
2533 del newobj.thisown
d14a1e28
RD
2534
2535class BMPHandlerPtr(BMPHandler):
2536 def __init__(self, this):
2537 self.this = this
2538 if not hasattr(self,"thisown"): self.thisown = 0
2539 self.__class__ = BMPHandler
54f9ee45 2540_core_.BMPHandler_swigregister(BMPHandlerPtr)
d14a1e28
RD
2541NullImage = cvar.NullImage
2542IMAGE_OPTION_BMP_FORMAT = cvar.IMAGE_OPTION_BMP_FORMAT
2543IMAGE_OPTION_CUR_HOTSPOT_X = cvar.IMAGE_OPTION_CUR_HOTSPOT_X
2544IMAGE_OPTION_CUR_HOTSPOT_Y = cvar.IMAGE_OPTION_CUR_HOTSPOT_Y
2545IMAGE_OPTION_RESOLUTION = cvar.IMAGE_OPTION_RESOLUTION
2546IMAGE_OPTION_RESOLUTIONUNIT = cvar.IMAGE_OPTION_RESOLUTIONUNIT
2547
2548class ICOHandler(BMPHandler):
093d3ff1 2549 """Proxy of C++ ICOHandler class"""
e811c8ce
RD
2550 def __repr__(self):
2551 return "<%s.%s; proxy of C++ wxICOHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 2552 def __init__(self, *args, **kwargs):
a95a7133 2553 """__init__(self) -> ICOHandler"""
54f9ee45 2554 newobj = _core_.new_ICOHandler(*args, **kwargs)
d14a1e28
RD
2555 self.this = newobj.this
2556 self.thisown = 1
2557 del newobj.thisown
d14a1e28
RD
2558
2559class ICOHandlerPtr(ICOHandler):
2560 def __init__(self, this):
2561 self.this = this
2562 if not hasattr(self,"thisown"): self.thisown = 0
2563 self.__class__ = ICOHandler
54f9ee45 2564_core_.ICOHandler_swigregister(ICOHandlerPtr)
d14a1e28
RD
2565
2566class CURHandler(ICOHandler):
093d3ff1 2567 """Proxy of C++ CURHandler class"""
e811c8ce
RD
2568 def __repr__(self):
2569 return "<%s.%s; proxy of C++ wxCURHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 2570 def __init__(self, *args, **kwargs):
a95a7133 2571 """__init__(self) -> CURHandler"""
54f9ee45 2572 newobj = _core_.new_CURHandler(*args, **kwargs)
d14a1e28
RD
2573 self.this = newobj.this
2574 self.thisown = 1
2575 del newobj.thisown
d14a1e28
RD
2576
2577class CURHandlerPtr(CURHandler):
2578 def __init__(self, this):
2579 self.this = this
2580 if not hasattr(self,"thisown"): self.thisown = 0
2581 self.__class__ = CURHandler
54f9ee45 2582_core_.CURHandler_swigregister(CURHandlerPtr)
d14a1e28
RD
2583
2584class ANIHandler(CURHandler):
093d3ff1 2585 """Proxy of C++ ANIHandler class"""
e811c8ce
RD
2586 def __repr__(self):
2587 return "<%s.%s; proxy of C++ wxANIHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 2588 def __init__(self, *args, **kwargs):
a95a7133 2589 """__init__(self) -> ANIHandler"""
54f9ee45 2590 newobj = _core_.new_ANIHandler(*args, **kwargs)
d14a1e28
RD
2591 self.this = newobj.this
2592 self.thisown = 1
2593 del newobj.thisown
d14a1e28
RD
2594
2595class ANIHandlerPtr(ANIHandler):
2596 def __init__(self, this):
2597 self.this = this
2598 if not hasattr(self,"thisown"): self.thisown = 0
2599 self.__class__ = ANIHandler
54f9ee45 2600_core_.ANIHandler_swigregister(ANIHandlerPtr)
d14a1e28
RD
2601
2602class PNGHandler(ImageHandler):
093d3ff1 2603 """Proxy of C++ PNGHandler class"""
e811c8ce
RD
2604 def __repr__(self):
2605 return "<%s.%s; proxy of C++ wxPNGHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 2606 def __init__(self, *args, **kwargs):
a95a7133 2607 """__init__(self) -> PNGHandler"""
54f9ee45 2608 newobj = _core_.new_PNGHandler(*args, **kwargs)
d14a1e28
RD
2609 self.this = newobj.this
2610 self.thisown = 1
2611 del newobj.thisown
d14a1e28
RD
2612
2613class PNGHandlerPtr(PNGHandler):
2614 def __init__(self, this):
2615 self.this = this
2616 if not hasattr(self,"thisown"): self.thisown = 0
2617 self.__class__ = PNGHandler
54f9ee45 2618_core_.PNGHandler_swigregister(PNGHandlerPtr)
d14a1e28
RD
2619
2620class GIFHandler(ImageHandler):
093d3ff1 2621 """Proxy of C++ GIFHandler class"""
e811c8ce
RD
2622 def __repr__(self):
2623 return "<%s.%s; proxy of C++ wxGIFHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 2624 def __init__(self, *args, **kwargs):
a95a7133 2625 """__init__(self) -> GIFHandler"""
54f9ee45 2626 newobj = _core_.new_GIFHandler(*args, **kwargs)
d14a1e28
RD
2627 self.this = newobj.this
2628 self.thisown = 1
2629 del newobj.thisown
d14a1e28
RD
2630
2631class GIFHandlerPtr(GIFHandler):
2632 def __init__(self, this):
2633 self.this = this
2634 if not hasattr(self,"thisown"): self.thisown = 0
2635 self.__class__ = GIFHandler
54f9ee45 2636_core_.GIFHandler_swigregister(GIFHandlerPtr)
d14a1e28
RD
2637
2638class PCXHandler(ImageHandler):
093d3ff1 2639 """Proxy of C++ PCXHandler class"""
e811c8ce
RD
2640 def __repr__(self):
2641 return "<%s.%s; proxy of C++ wxPCXHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 2642 def __init__(self, *args, **kwargs):
a95a7133 2643 """__init__(self) -> PCXHandler"""
54f9ee45 2644 newobj = _core_.new_PCXHandler(*args, **kwargs)
d14a1e28
RD
2645 self.this = newobj.this
2646 self.thisown = 1
2647 del newobj.thisown
d14a1e28
RD
2648
2649class PCXHandlerPtr(PCXHandler):
2650 def __init__(self, this):
2651 self.this = this
2652 if not hasattr(self,"thisown"): self.thisown = 0
2653 self.__class__ = PCXHandler
54f9ee45 2654_core_.PCXHandler_swigregister(PCXHandlerPtr)
d14a1e28
RD
2655
2656class JPEGHandler(ImageHandler):
093d3ff1 2657 """Proxy of C++ JPEGHandler class"""
e811c8ce
RD
2658 def __repr__(self):
2659 return "<%s.%s; proxy of C++ wxJPEGHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 2660 def __init__(self, *args, **kwargs):
a95a7133 2661 """__init__(self) -> JPEGHandler"""
54f9ee45 2662 newobj = _core_.new_JPEGHandler(*args, **kwargs)
d14a1e28
RD
2663 self.this = newobj.this
2664 self.thisown = 1
2665 del newobj.thisown
d14a1e28
RD
2666
2667class JPEGHandlerPtr(JPEGHandler):
2668 def __init__(self, this):
2669 self.this = this
2670 if not hasattr(self,"thisown"): self.thisown = 0
2671 self.__class__ = JPEGHandler
54f9ee45 2672_core_.JPEGHandler_swigregister(JPEGHandlerPtr)
d14a1e28
RD
2673
2674class PNMHandler(ImageHandler):
093d3ff1 2675 """Proxy of C++ PNMHandler class"""
e811c8ce
RD
2676 def __repr__(self):
2677 return "<%s.%s; proxy of C++ wxPNMHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 2678 def __init__(self, *args, **kwargs):
a95a7133 2679 """__init__(self) -> PNMHandler"""
54f9ee45 2680 newobj = _core_.new_PNMHandler(*args, **kwargs)
d14a1e28
RD
2681 self.this = newobj.this
2682 self.thisown = 1
2683 del newobj.thisown
d14a1e28
RD
2684
2685class PNMHandlerPtr(PNMHandler):
2686 def __init__(self, this):
2687 self.this = this
2688 if not hasattr(self,"thisown"): self.thisown = 0
2689 self.__class__ = PNMHandler
54f9ee45 2690_core_.PNMHandler_swigregister(PNMHandlerPtr)
d14a1e28
RD
2691
2692class XPMHandler(ImageHandler):
093d3ff1 2693 """Proxy of C++ XPMHandler class"""
e811c8ce
RD
2694 def __repr__(self):
2695 return "<%s.%s; proxy of C++ wxXPMHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 2696 def __init__(self, *args, **kwargs):
a95a7133 2697 """__init__(self) -> XPMHandler"""
54f9ee45 2698 newobj = _core_.new_XPMHandler(*args, **kwargs)
d14a1e28
RD
2699 self.this = newobj.this
2700 self.thisown = 1
2701 del newobj.thisown
d14a1e28
RD
2702
2703class XPMHandlerPtr(XPMHandler):
2704 def __init__(self, this):
2705 self.this = this
2706 if not hasattr(self,"thisown"): self.thisown = 0
2707 self.__class__ = XPMHandler
54f9ee45 2708_core_.XPMHandler_swigregister(XPMHandlerPtr)
d14a1e28
RD
2709
2710class TIFFHandler(ImageHandler):
093d3ff1 2711 """Proxy of C++ TIFFHandler class"""
e811c8ce
RD
2712 def __repr__(self):
2713 return "<%s.%s; proxy of C++ wxTIFFHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 2714 def __init__(self, *args, **kwargs):
a95a7133 2715 """__init__(self) -> TIFFHandler"""
54f9ee45 2716 newobj = _core_.new_TIFFHandler(*args, **kwargs)
d14a1e28
RD
2717 self.this = newobj.this
2718 self.thisown = 1
2719 del newobj.thisown
d14a1e28
RD
2720
2721class TIFFHandlerPtr(TIFFHandler):
2722 def __init__(self, this):
2723 self.this = this
2724 if not hasattr(self,"thisown"): self.thisown = 0
2725 self.__class__ = TIFFHandler
54f9ee45 2726_core_.TIFFHandler_swigregister(TIFFHandlerPtr)
d14a1e28 2727
c0de73ae
RD
2728QUANTIZE_INCLUDE_WINDOWS_COLOURS = _core_.QUANTIZE_INCLUDE_WINDOWS_COLOURS
2729QUANTIZE_FILL_DESTINATION_IMAGE = _core_.QUANTIZE_FILL_DESTINATION_IMAGE
2730class Quantize(object):
2731 """Performs quantization, or colour reduction, on a wxImage."""
2732 def __init__(self): raise RuntimeError, "No constructor defined"
2733 def __repr__(self):
2734 return "<%s.%s; proxy of C++ wxQuantize instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
2735 def Quantize(*args, **kwargs):
2736 """
2737 Quantize(Image src, Image dest, int desiredNoColours=236, int flags=wxQUANTIZE_INCLUDE_WINDOWS_COLOURS|wxQUANTIZE_FILL_DESTINATION_IMAGE) -> bool
2738
2739 Reduce the colours in the source image and put the result into the
2740 destination image, setting the palette in the destination if
2741 needed. Both images may be the same, to overwrite the source image.
2742 """
2743 return _core_.Quantize_Quantize(*args, **kwargs)
2744
2745 Quantize = staticmethod(Quantize)
2746
2747class QuantizePtr(Quantize):
2748 def __init__(self, this):
2749 self.this = this
2750 if not hasattr(self,"thisown"): self.thisown = 0
2751 self.__class__ = Quantize
2752_core_.Quantize_swigregister(QuantizePtr)
2753
2754def Quantize_Quantize(*args, **kwargs):
2755 """
2756 Quantize_Quantize(Image src, Image dest, int desiredNoColours=236, int flags=wxQUANTIZE_INCLUDE_WINDOWS_COLOURS|wxQUANTIZE_FILL_DESTINATION_IMAGE) -> bool
2757
2758 Reduce the colours in the source image and put the result into the
2759 destination image, setting the palette in the destination if
2760 needed. Both images may be the same, to overwrite the source image.
2761 """
2762 return _core_.Quantize_Quantize(*args, **kwargs)
2763
d14a1e28
RD
2764#---------------------------------------------------------------------------
2765
2766class EvtHandler(Object):
093d3ff1 2767 """Proxy of C++ EvtHandler class"""
e811c8ce
RD
2768 def __repr__(self):
2769 return "<%s.%s; proxy of C++ wxEvtHandler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 2770 def __init__(self, *args, **kwargs):
a95a7133 2771 """__init__(self) -> EvtHandler"""
54f9ee45 2772 newobj = _core_.new_EvtHandler(*args, **kwargs)
d14a1e28
RD
2773 self.this = newobj.this
2774 self.thisown = 1
2775 del newobj.thisown
e811c8ce 2776 def GetNextHandler(*args, **kwargs):
a95a7133 2777 """GetNextHandler(self) -> EvtHandler"""
54f9ee45 2778 return _core_.EvtHandler_GetNextHandler(*args, **kwargs)
e811c8ce
RD
2779
2780 def GetPreviousHandler(*args, **kwargs):
a95a7133 2781 """GetPreviousHandler(self) -> EvtHandler"""
54f9ee45 2782 return _core_.EvtHandler_GetPreviousHandler(*args, **kwargs)
e811c8ce
RD
2783
2784 def SetNextHandler(*args, **kwargs):
a95a7133 2785 """SetNextHandler(self, EvtHandler handler)"""
54f9ee45 2786 return _core_.EvtHandler_SetNextHandler(*args, **kwargs)
e811c8ce
RD
2787
2788 def SetPreviousHandler(*args, **kwargs):
a95a7133 2789 """SetPreviousHandler(self, EvtHandler handler)"""
54f9ee45 2790 return _core_.EvtHandler_SetPreviousHandler(*args, **kwargs)
e811c8ce
RD
2791
2792 def GetEvtHandlerEnabled(*args, **kwargs):
a95a7133 2793 """GetEvtHandlerEnabled(self) -> bool"""
54f9ee45 2794 return _core_.EvtHandler_GetEvtHandlerEnabled(*args, **kwargs)
e811c8ce
RD
2795
2796 def SetEvtHandlerEnabled(*args, **kwargs):
a95a7133 2797 """SetEvtHandlerEnabled(self, bool enabled)"""
54f9ee45 2798 return _core_.EvtHandler_SetEvtHandlerEnabled(*args, **kwargs)
e811c8ce
RD
2799
2800 def ProcessEvent(*args, **kwargs):
a95a7133 2801 """ProcessEvent(self, Event event) -> bool"""
54f9ee45 2802 return _core_.EvtHandler_ProcessEvent(*args, **kwargs)
e811c8ce
RD
2803
2804 def AddPendingEvent(*args, **kwargs):
a95a7133 2805 """AddPendingEvent(self, Event event)"""
54f9ee45 2806 return _core_.EvtHandler_AddPendingEvent(*args, **kwargs)
e811c8ce
RD
2807
2808 def ProcessPendingEvents(*args, **kwargs):
a95a7133 2809 """ProcessPendingEvents(self)"""
54f9ee45 2810 return _core_.EvtHandler_ProcessPendingEvents(*args, **kwargs)
e811c8ce
RD
2811
2812 def Connect(*args, **kwargs):
a95a7133 2813 """Connect(self, int id, int lastId, int eventType, PyObject func)"""
54f9ee45 2814 return _core_.EvtHandler_Connect(*args, **kwargs)
e811c8ce
RD
2815
2816 def Disconnect(*args, **kwargs):
a95a7133 2817 """Disconnect(self, int id, int lastId=-1, wxEventType eventType=wxEVT_NULL) -> bool"""
54f9ee45 2818 return _core_.EvtHandler_Disconnect(*args, **kwargs)
e811c8ce
RD
2819
2820 def _setOORInfo(*args, **kwargs):
689b42ee 2821 """_setOORInfo(self, PyObject _self, bool incref=True)"""
54f9ee45 2822 return _core_.EvtHandler__setOORInfo(*args, **kwargs)
e811c8ce 2823
d14a1e28
RD
2824 def Bind(self, event, handler, source=None, id=wx.ID_ANY, id2=wx.ID_ANY):
2825 """
2826 Bind an event to an event handler.
2827
db3e571a
RD
2828 :param event: One of the EVT_* objects that specifies the
2829 type of event to bind,
d14a1e28 2830
db3e571a
RD
2831 :param handler: A callable object to be invoked when the
2832 event is delivered to self. Pass None to
2833 disconnect an event handler.
d14a1e28 2834
db3e571a
RD
2835 :param source: Sometimes the event originates from a
2836 different window than self, but you still
2837 want to catch it in self. (For example, a
2838 button event delivered to a frame.) By
2839 passing the source of the event, the event
2840 handling system is able to differentiate
2841 between the same event type from different
2842 controls.
d14a1e28 2843
db3e571a
RD
2844 :param id: Used to spcify the event source by ID instead
2845 of instance.
2846
2847 :param id2: Used when it is desirable to bind a handler
2848 to a range of IDs, such as with EVT_MENU_RANGE.
d14a1e28
RD
2849 """
2850 if source is not None:
2851 id = source.GetId()
2852 event.Bind(self, id, id2, handler)
2853
66c033b4
RD
2854 def Unbind(self, event, source=None, id=wx.ID_ANY, id2=wx.ID_ANY):
2855 """
2856 Disconencts the event handler binding for event from self.
2857 Returns True if successful.
2858 """
2859 if source is not None:
2860 id = source.GetId()
2861 return event.Unbind(self, id, id2)
d14a1e28 2862
d14a1e28
RD
2863
2864class EvtHandlerPtr(EvtHandler):
2865 def __init__(self, this):
2866 self.this = this
2867 if not hasattr(self,"thisown"): self.thisown = 0
2868 self.__class__ = EvtHandler
54f9ee45 2869_core_.EvtHandler_swigregister(EvtHandlerPtr)
d14a1e28
RD
2870
2871#---------------------------------------------------------------------------
2872
2873class PyEventBinder(object):
2874 """
2875 Instances of this class are used to bind specific events to event
2876 handlers.
2877 """
2878 def __init__(self, evtType, expectedIDs=0):
2879 if expectedIDs not in [0, 1, 2]:
2880 raise ValueError, "Invalid number of expectedIDs"
2881 self.expectedIDs = expectedIDs
2882
2883 if type(evtType) == list or type(evtType) == tuple:
2884 self.evtType = evtType
2885 else:
2886 self.evtType = [evtType]
2887
2888
2889 def Bind(self, target, id1, id2, function):
2890 """Bind this set of event types to target."""
2891 for et in self.evtType:
2892 target.Connect(id1, id2, et, function)
2893
66c033b4
RD
2894
2895 def Unbind(self, target, id1, id2):
2896 """Remove an event binding."""
2897 success = 0
2898 for et in self.evtType:
2899 success += target.Disconnect(id1, id2, et)
2900 return success != 0
2901
d14a1e28
RD
2902
2903 def __call__(self, *args):
2904 """
2905 For backwards compatibility with the old EVT_* functions.
2906 Should be called with either (window, func), (window, ID,
2907 func) or (window, ID1, ID2, func) parameters depending on the
2908 type of the event.
2909 """
2910 assert len(args) == 2 + self.expectedIDs
2911 id1 = wx.ID_ANY
2912 id2 = wx.ID_ANY
2913 target = args[0]
2914 if self.expectedIDs == 0:
2915 func = args[1]
2916 elif self.expectedIDs == 1:
2917 id1 = args[1]
2918 func = args[2]
2919 elif self.expectedIDs == 2:
2920 id1 = args[1]
2921 id2 = args[2]
2922 func = args[3]
2923 else:
2924 raise ValueError, "Unexpected number of IDs"
2925
2926 self.Bind(target, id1, id2, func)
2927
2928
2929# These two are square pegs that don't fit the PyEventBinder hole...
2930def EVT_COMMAND(win, id, cmd, func):
2931 win.Connect(id, -1, cmd, func)
2932def EVT_COMMAND_RANGE(win, id1, id2, cmd, func):
2933 win.Connect(id1, id2, cmd, func)
2934
2935
2936#---------------------------------------------------------------------------
2937
2938#---------------------------------------------------------------------------
2939
54f9ee45
RD
2940EVENT_PROPAGATE_NONE = _core_.EVENT_PROPAGATE_NONE
2941EVENT_PROPAGATE_MAX = _core_.EVENT_PROPAGATE_MAX
d14a1e28 2942
e811c8ce
RD
2943def NewEventType(*args, **kwargs):
2944 """NewEventType() -> wxEventType"""
54f9ee45
RD
2945 return _core_.NewEventType(*args, **kwargs)
2946wxEVT_NULL = _core_.wxEVT_NULL
2947wxEVT_FIRST = _core_.wxEVT_FIRST
2948wxEVT_USER_FIRST = _core_.wxEVT_USER_FIRST
2949wxEVT_COMMAND_BUTTON_CLICKED = _core_.wxEVT_COMMAND_BUTTON_CLICKED
2950wxEVT_COMMAND_CHECKBOX_CLICKED = _core_.wxEVT_COMMAND_CHECKBOX_CLICKED
2951wxEVT_COMMAND_CHOICE_SELECTED = _core_.wxEVT_COMMAND_CHOICE_SELECTED
2952wxEVT_COMMAND_LISTBOX_SELECTED = _core_.wxEVT_COMMAND_LISTBOX_SELECTED
2953wxEVT_COMMAND_LISTBOX_DOUBLECLICKED = _core_.wxEVT_COMMAND_LISTBOX_DOUBLECLICKED
2954wxEVT_COMMAND_CHECKLISTBOX_TOGGLED = _core_.wxEVT_COMMAND_CHECKLISTBOX_TOGGLED
2955wxEVT_COMMAND_MENU_SELECTED = _core_.wxEVT_COMMAND_MENU_SELECTED
2956wxEVT_COMMAND_TOOL_CLICKED = _core_.wxEVT_COMMAND_TOOL_CLICKED
2957wxEVT_COMMAND_SLIDER_UPDATED = _core_.wxEVT_COMMAND_SLIDER_UPDATED
2958wxEVT_COMMAND_RADIOBOX_SELECTED = _core_.wxEVT_COMMAND_RADIOBOX_SELECTED
2959wxEVT_COMMAND_RADIOBUTTON_SELECTED = _core_.wxEVT_COMMAND_RADIOBUTTON_SELECTED
2960wxEVT_COMMAND_SCROLLBAR_UPDATED = _core_.wxEVT_COMMAND_SCROLLBAR_UPDATED
2961wxEVT_COMMAND_VLBOX_SELECTED = _core_.wxEVT_COMMAND_VLBOX_SELECTED
2962wxEVT_COMMAND_COMBOBOX_SELECTED = _core_.wxEVT_COMMAND_COMBOBOX_SELECTED
2963wxEVT_COMMAND_TOOL_RCLICKED = _core_.wxEVT_COMMAND_TOOL_RCLICKED
2964wxEVT_COMMAND_TOOL_ENTER = _core_.wxEVT_COMMAND_TOOL_ENTER
2965wxEVT_LEFT_DOWN = _core_.wxEVT_LEFT_DOWN
2966wxEVT_LEFT_UP = _core_.wxEVT_LEFT_UP
2967wxEVT_MIDDLE_DOWN = _core_.wxEVT_MIDDLE_DOWN
2968wxEVT_MIDDLE_UP = _core_.wxEVT_MIDDLE_UP
2969wxEVT_RIGHT_DOWN = _core_.wxEVT_RIGHT_DOWN
2970wxEVT_RIGHT_UP = _core_.wxEVT_RIGHT_UP
2971wxEVT_MOTION = _core_.wxEVT_MOTION
2972wxEVT_ENTER_WINDOW = _core_.wxEVT_ENTER_WINDOW
2973wxEVT_LEAVE_WINDOW = _core_.wxEVT_LEAVE_WINDOW
2974wxEVT_LEFT_DCLICK = _core_.wxEVT_LEFT_DCLICK
2975wxEVT_MIDDLE_DCLICK = _core_.wxEVT_MIDDLE_DCLICK
2976wxEVT_RIGHT_DCLICK = _core_.wxEVT_RIGHT_DCLICK
2977wxEVT_SET_FOCUS = _core_.wxEVT_SET_FOCUS
2978wxEVT_KILL_FOCUS = _core_.wxEVT_KILL_FOCUS
2979wxEVT_CHILD_FOCUS = _core_.wxEVT_CHILD_FOCUS
2980wxEVT_MOUSEWHEEL = _core_.wxEVT_MOUSEWHEEL
2981wxEVT_NC_LEFT_DOWN = _core_.wxEVT_NC_LEFT_DOWN
2982wxEVT_NC_LEFT_UP = _core_.wxEVT_NC_LEFT_UP
2983wxEVT_NC_MIDDLE_DOWN = _core_.wxEVT_NC_MIDDLE_DOWN
2984wxEVT_NC_MIDDLE_UP = _core_.wxEVT_NC_MIDDLE_UP
2985wxEVT_NC_RIGHT_DOWN = _core_.wxEVT_NC_RIGHT_DOWN
2986wxEVT_NC_RIGHT_UP = _core_.wxEVT_NC_RIGHT_UP
2987wxEVT_NC_MOTION = _core_.wxEVT_NC_MOTION
2988wxEVT_NC_ENTER_WINDOW = _core_.wxEVT_NC_ENTER_WINDOW
2989wxEVT_NC_LEAVE_WINDOW = _core_.wxEVT_NC_LEAVE_WINDOW
2990wxEVT_NC_LEFT_DCLICK = _core_.wxEVT_NC_LEFT_DCLICK
2991wxEVT_NC_MIDDLE_DCLICK = _core_.wxEVT_NC_MIDDLE_DCLICK
2992wxEVT_NC_RIGHT_DCLICK = _core_.wxEVT_NC_RIGHT_DCLICK
2993wxEVT_CHAR = _core_.wxEVT_CHAR
2994wxEVT_CHAR_HOOK = _core_.wxEVT_CHAR_HOOK
2995wxEVT_NAVIGATION_KEY = _core_.wxEVT_NAVIGATION_KEY
2996wxEVT_KEY_DOWN = _core_.wxEVT_KEY_DOWN
2997wxEVT_KEY_UP = _core_.wxEVT_KEY_UP
2998wxEVT_HOTKEY = _core_.wxEVT_HOTKEY
2999wxEVT_SET_CURSOR = _core_.wxEVT_SET_CURSOR
3000wxEVT_SCROLL_TOP = _core_.wxEVT_SCROLL_TOP
3001wxEVT_SCROLL_BOTTOM = _core_.wxEVT_SCROLL_BOTTOM
3002wxEVT_SCROLL_LINEUP = _core_.wxEVT_SCROLL_LINEUP
3003wxEVT_SCROLL_LINEDOWN = _core_.wxEVT_SCROLL_LINEDOWN
3004wxEVT_SCROLL_PAGEUP = _core_.wxEVT_SCROLL_PAGEUP
3005wxEVT_SCROLL_PAGEDOWN = _core_.wxEVT_SCROLL_PAGEDOWN
3006wxEVT_SCROLL_THUMBTRACK = _core_.wxEVT_SCROLL_THUMBTRACK
3007wxEVT_SCROLL_THUMBRELEASE = _core_.wxEVT_SCROLL_THUMBRELEASE
3008wxEVT_SCROLL_ENDSCROLL = _core_.wxEVT_SCROLL_ENDSCROLL
3009wxEVT_SCROLLWIN_TOP = _core_.wxEVT_SCROLLWIN_TOP
3010wxEVT_SCROLLWIN_BOTTOM = _core_.wxEVT_SCROLLWIN_BOTTOM
3011wxEVT_SCROLLWIN_LINEUP = _core_.wxEVT_SCROLLWIN_LINEUP
3012wxEVT_SCROLLWIN_LINEDOWN = _core_.wxEVT_SCROLLWIN_LINEDOWN
3013wxEVT_SCROLLWIN_PAGEUP = _core_.wxEVT_SCROLLWIN_PAGEUP
3014wxEVT_SCROLLWIN_PAGEDOWN = _core_.wxEVT_SCROLLWIN_PAGEDOWN
3015wxEVT_SCROLLWIN_THUMBTRACK = _core_.wxEVT_SCROLLWIN_THUMBTRACK
3016wxEVT_SCROLLWIN_THUMBRELEASE = _core_.wxEVT_SCROLLWIN_THUMBRELEASE
3017wxEVT_SIZE = _core_.wxEVT_SIZE
3018wxEVT_MOVE = _core_.wxEVT_MOVE
3019wxEVT_CLOSE_WINDOW = _core_.wxEVT_CLOSE_WINDOW
3020wxEVT_END_SESSION = _core_.wxEVT_END_SESSION
3021wxEVT_QUERY_END_SESSION = _core_.wxEVT_QUERY_END_SESSION
3022wxEVT_ACTIVATE_APP = _core_.wxEVT_ACTIVATE_APP
3023wxEVT_POWER = _core_.wxEVT_POWER
3024wxEVT_ACTIVATE = _core_.wxEVT_ACTIVATE
3025wxEVT_CREATE = _core_.wxEVT_CREATE
3026wxEVT_DESTROY = _core_.wxEVT_DESTROY
3027wxEVT_SHOW = _core_.wxEVT_SHOW
3028wxEVT_ICONIZE = _core_.wxEVT_ICONIZE
3029wxEVT_MAXIMIZE = _core_.wxEVT_MAXIMIZE
3030wxEVT_MOUSE_CAPTURE_CHANGED = _core_.wxEVT_MOUSE_CAPTURE_CHANGED
3031wxEVT_PAINT = _core_.wxEVT_PAINT
3032wxEVT_ERASE_BACKGROUND = _core_.wxEVT_ERASE_BACKGROUND
3033wxEVT_NC_PAINT = _core_.wxEVT_NC_PAINT
3034wxEVT_PAINT_ICON = _core_.wxEVT_PAINT_ICON
3035wxEVT_MENU_OPEN = _core_.wxEVT_MENU_OPEN
3036wxEVT_MENU_CLOSE = _core_.wxEVT_MENU_CLOSE
3037wxEVT_MENU_HIGHLIGHT = _core_.wxEVT_MENU_HIGHLIGHT
3038wxEVT_CONTEXT_MENU = _core_.wxEVT_CONTEXT_MENU
3039wxEVT_SYS_COLOUR_CHANGED = _core_.wxEVT_SYS_COLOUR_CHANGED
3040wxEVT_DISPLAY_CHANGED = _core_.wxEVT_DISPLAY_CHANGED
3041wxEVT_SETTING_CHANGED = _core_.wxEVT_SETTING_CHANGED
3042wxEVT_QUERY_NEW_PALETTE = _core_.wxEVT_QUERY_NEW_PALETTE
3043wxEVT_PALETTE_CHANGED = _core_.wxEVT_PALETTE_CHANGED
3044wxEVT_DROP_FILES = _core_.wxEVT_DROP_FILES
3045wxEVT_DRAW_ITEM = _core_.wxEVT_DRAW_ITEM
3046wxEVT_MEASURE_ITEM = _core_.wxEVT_MEASURE_ITEM
3047wxEVT_COMPARE_ITEM = _core_.wxEVT_COMPARE_ITEM
3048wxEVT_INIT_DIALOG = _core_.wxEVT_INIT_DIALOG
3049wxEVT_IDLE = _core_.wxEVT_IDLE
3050wxEVT_UPDATE_UI = _core_.wxEVT_UPDATE_UI
3051wxEVT_SIZING = _core_.wxEVT_SIZING
3052wxEVT_MOVING = _core_.wxEVT_MOVING
3053wxEVT_COMMAND_LEFT_CLICK = _core_.wxEVT_COMMAND_LEFT_CLICK
3054wxEVT_COMMAND_LEFT_DCLICK = _core_.wxEVT_COMMAND_LEFT_DCLICK
3055wxEVT_COMMAND_RIGHT_CLICK = _core_.wxEVT_COMMAND_RIGHT_CLICK
3056wxEVT_COMMAND_RIGHT_DCLICK = _core_.wxEVT_COMMAND_RIGHT_DCLICK
3057wxEVT_COMMAND_SET_FOCUS = _core_.wxEVT_COMMAND_SET_FOCUS
3058wxEVT_COMMAND_KILL_FOCUS = _core_.wxEVT_COMMAND_KILL_FOCUS
3059wxEVT_COMMAND_ENTER = _core_.wxEVT_COMMAND_ENTER
d14a1e28
RD
3060#
3061# Create some event binders
3062EVT_SIZE = wx.PyEventBinder( wxEVT_SIZE )
3063EVT_SIZING = wx.PyEventBinder( wxEVT_SIZING )
3064EVT_MOVE = wx.PyEventBinder( wxEVT_MOVE )
3065EVT_MOVING = wx.PyEventBinder( wxEVT_MOVING )
3066EVT_CLOSE = wx.PyEventBinder( wxEVT_CLOSE_WINDOW )
3067EVT_END_SESSION = wx.PyEventBinder( wxEVT_END_SESSION )
3068EVT_QUERY_END_SESSION = wx.PyEventBinder( wxEVT_QUERY_END_SESSION )
3069EVT_PAINT = wx.PyEventBinder( wxEVT_PAINT )
3070EVT_NC_PAINT = wx.PyEventBinder( wxEVT_NC_PAINT )
3071EVT_ERASE_BACKGROUND = wx.PyEventBinder( wxEVT_ERASE_BACKGROUND )
3072EVT_CHAR = wx.PyEventBinder( wxEVT_CHAR )
3073EVT_KEY_DOWN = wx.PyEventBinder( wxEVT_KEY_DOWN )
3074EVT_KEY_UP = wx.PyEventBinder( wxEVT_KEY_UP )
3075EVT_HOTKEY = wx.PyEventBinder( wxEVT_HOTKEY, 1)
3076EVT_CHAR_HOOK = wx.PyEventBinder( wxEVT_CHAR_HOOK )
3077EVT_MENU_OPEN = wx.PyEventBinder( wxEVT_MENU_OPEN )
3078EVT_MENU_CLOSE = wx.PyEventBinder( wxEVT_MENU_CLOSE )
3079EVT_MENU_HIGHLIGHT = wx.PyEventBinder( wxEVT_MENU_HIGHLIGHT, 1)
3080EVT_MENU_HIGHLIGHT_ALL = wx.PyEventBinder( wxEVT_MENU_HIGHLIGHT )
3081EVT_SET_FOCUS = wx.PyEventBinder( wxEVT_SET_FOCUS )
3082EVT_KILL_FOCUS = wx.PyEventBinder( wxEVT_KILL_FOCUS )
3083EVT_CHILD_FOCUS = wx.PyEventBinder( wxEVT_CHILD_FOCUS )
3084EVT_ACTIVATE = wx.PyEventBinder( wxEVT_ACTIVATE )
3085EVT_ACTIVATE_APP = wx.PyEventBinder( wxEVT_ACTIVATE_APP )
3086EVT_END_SESSION = wx.PyEventBinder( wxEVT_END_SESSION )
3087EVT_QUERY_END_SESSION = wx.PyEventBinder( wxEVT_QUERY_END_SESSION )
3088EVT_DROP_FILES = wx.PyEventBinder( wxEVT_DROP_FILES )
3089EVT_INIT_DIALOG = wx.PyEventBinder( wxEVT_INIT_DIALOG )
3090EVT_SYS_COLOUR_CHANGED = wx.PyEventBinder( wxEVT_SYS_COLOUR_CHANGED )
3091EVT_DISPLAY_CHANGED = wx.PyEventBinder( wxEVT_DISPLAY_CHANGED )
3092EVT_SHOW = wx.PyEventBinder( wxEVT_SHOW )
3093EVT_MAXIMIZE = wx.PyEventBinder( wxEVT_MAXIMIZE )
3094EVT_ICONIZE = wx.PyEventBinder( wxEVT_ICONIZE )
3095EVT_NAVIGATION_KEY = wx.PyEventBinder( wxEVT_NAVIGATION_KEY )
3096EVT_PALETTE_CHANGED = wx.PyEventBinder( wxEVT_PALETTE_CHANGED )
3097EVT_QUERY_NEW_PALETTE = wx.PyEventBinder( wxEVT_QUERY_NEW_PALETTE )
3098EVT_WINDOW_CREATE = wx.PyEventBinder( wxEVT_CREATE )
3099EVT_WINDOW_DESTROY = wx.PyEventBinder( wxEVT_DESTROY )
3100EVT_SET_CURSOR = wx.PyEventBinder( wxEVT_SET_CURSOR )
3101EVT_MOUSE_CAPTURE_CHANGED = wx.PyEventBinder( wxEVT_MOUSE_CAPTURE_CHANGED )
3102
3103EVT_LEFT_DOWN = wx.PyEventBinder( wxEVT_LEFT_DOWN )
3104EVT_LEFT_UP = wx.PyEventBinder( wxEVT_LEFT_UP )
3105EVT_MIDDLE_DOWN = wx.PyEventBinder( wxEVT_MIDDLE_DOWN )
3106EVT_MIDDLE_UP = wx.PyEventBinder( wxEVT_MIDDLE_UP )
3107EVT_RIGHT_DOWN = wx.PyEventBinder( wxEVT_RIGHT_DOWN )
3108EVT_RIGHT_UP = wx.PyEventBinder( wxEVT_RIGHT_UP )
3109EVT_MOTION = wx.PyEventBinder( wxEVT_MOTION )
3110EVT_LEFT_DCLICK = wx.PyEventBinder( wxEVT_LEFT_DCLICK )
3111EVT_MIDDLE_DCLICK = wx.PyEventBinder( wxEVT_MIDDLE_DCLICK )
3112EVT_RIGHT_DCLICK = wx.PyEventBinder( wxEVT_RIGHT_DCLICK )
3113EVT_LEAVE_WINDOW = wx.PyEventBinder( wxEVT_LEAVE_WINDOW )
3114EVT_ENTER_WINDOW = wx.PyEventBinder( wxEVT_ENTER_WINDOW )
3115EVT_MOUSEWHEEL = wx.PyEventBinder( wxEVT_MOUSEWHEEL )
3116
3117EVT_MOUSE_EVENTS = wx.PyEventBinder([ wxEVT_LEFT_DOWN,
3118 wxEVT_LEFT_UP,
3119 wxEVT_MIDDLE_DOWN,
3120 wxEVT_MIDDLE_UP,
3121 wxEVT_RIGHT_DOWN,
3122 wxEVT_RIGHT_UP,
3123 wxEVT_MOTION,
3124 wxEVT_LEFT_DCLICK,
3125 wxEVT_MIDDLE_DCLICK,
3126 wxEVT_RIGHT_DCLICK,
3127 wxEVT_ENTER_WINDOW,
3128 wxEVT_LEAVE_WINDOW,
3129 wxEVT_MOUSEWHEEL
3130 ])
3131
3132
3133# Scrolling from wxWindow (sent to wxScrolledWindow)
3134EVT_SCROLLWIN = wx.PyEventBinder([ wxEVT_SCROLLWIN_TOP,
3135 wxEVT_SCROLLWIN_BOTTOM,
3136 wxEVT_SCROLLWIN_LINEUP,
3137 wxEVT_SCROLLWIN_LINEDOWN,
3138 wxEVT_SCROLLWIN_PAGEUP,
3139 wxEVT_SCROLLWIN_PAGEDOWN,
3140 wxEVT_SCROLLWIN_THUMBTRACK,
3141 wxEVT_SCROLLWIN_THUMBRELEASE,
3142 ])
3143
3144EVT_SCROLLWIN_TOP = wx.PyEventBinder( wxEVT_SCROLLWIN_TOP )
3145EVT_SCROLLWIN_BOTTOM = wx.PyEventBinder( wxEVT_SCROLLWIN_BOTTOM )
3146EVT_SCROLLWIN_LINEUP = wx.PyEventBinder( wxEVT_SCROLLWIN_LINEUP )
3147EVT_SCROLLWIN_LINEDOWN = wx.PyEventBinder( wxEVT_SCROLLWIN_LINEDOWN )
3148EVT_SCROLLWIN_PAGEUP = wx.PyEventBinder( wxEVT_SCROLLWIN_PAGEUP )
3149EVT_SCROLLWIN_PAGEDOWN = wx.PyEventBinder( wxEVT_SCROLLWIN_PAGEDOWN )
3150EVT_SCROLLWIN_THUMBTRACK = wx.PyEventBinder( wxEVT_SCROLLWIN_THUMBTRACK )
3151EVT_SCROLLWIN_THUMBRELEASE = wx.PyEventBinder( wxEVT_SCROLLWIN_THUMBRELEASE )
3152
3153# Scrolling from wxSlider and wxScrollBar
3154EVT_SCROLL = wx.PyEventBinder([ wxEVT_SCROLL_TOP,
3155 wxEVT_SCROLL_BOTTOM,
3156 wxEVT_SCROLL_LINEUP,
3157 wxEVT_SCROLL_LINEDOWN,
3158 wxEVT_SCROLL_PAGEUP,
3159 wxEVT_SCROLL_PAGEDOWN,
3160 wxEVT_SCROLL_THUMBTRACK,
3161 wxEVT_SCROLL_THUMBRELEASE,
3162 wxEVT_SCROLL_ENDSCROLL,
3163 ])
3164
3165EVT_SCROLL_TOP = wx.PyEventBinder( wxEVT_SCROLL_TOP )
3166EVT_SCROLL_BOTTOM = wx.PyEventBinder( wxEVT_SCROLL_BOTTOM )
3167EVT_SCROLL_LINEUP = wx.PyEventBinder( wxEVT_SCROLL_LINEUP )
3168EVT_SCROLL_LINEDOWN = wx.PyEventBinder( wxEVT_SCROLL_LINEDOWN )
3169EVT_SCROLL_PAGEUP = wx.PyEventBinder( wxEVT_SCROLL_PAGEUP )
3170EVT_SCROLL_PAGEDOWN = wx.PyEventBinder( wxEVT_SCROLL_PAGEDOWN )
3171EVT_SCROLL_THUMBTRACK = wx.PyEventBinder( wxEVT_SCROLL_THUMBTRACK )
3172EVT_SCROLL_THUMBRELEASE = wx.PyEventBinder( wxEVT_SCROLL_THUMBRELEASE )
3173EVT_SCROLL_ENDSCROLL = wx.PyEventBinder( wxEVT_SCROLL_ENDSCROLL )
3174
3175# Scrolling from wxSlider and wxScrollBar, with an id
3176EVT_COMMAND_SCROLL = wx.PyEventBinder([ wxEVT_SCROLL_TOP,
3177 wxEVT_SCROLL_BOTTOM,
3178 wxEVT_SCROLL_LINEUP,
3179 wxEVT_SCROLL_LINEDOWN,
3180 wxEVT_SCROLL_PAGEUP,
3181 wxEVT_SCROLL_PAGEDOWN,
3182 wxEVT_SCROLL_THUMBTRACK,
3183 wxEVT_SCROLL_THUMBRELEASE,
3184 wxEVT_SCROLL_ENDSCROLL,
3185 ], 1)
3186
3187EVT_COMMAND_SCROLL_TOP = wx.PyEventBinder( wxEVT_SCROLL_TOP, 1)
3188EVT_COMMAND_SCROLL_BOTTOM = wx.PyEventBinder( wxEVT_SCROLL_BOTTOM, 1)
3189EVT_COMMAND_SCROLL_LINEUP = wx.PyEventBinder( wxEVT_SCROLL_LINEUP, 1)
3190EVT_COMMAND_SCROLL_LINEDOWN = wx.PyEventBinder( wxEVT_SCROLL_LINEDOWN, 1)
3191EVT_COMMAND_SCROLL_PAGEUP = wx.PyEventBinder( wxEVT_SCROLL_PAGEUP, 1)
3192EVT_COMMAND_SCROLL_PAGEDOWN = wx.PyEventBinder( wxEVT_SCROLL_PAGEDOWN, 1)
3193EVT_COMMAND_SCROLL_THUMBTRACK = wx.PyEventBinder( wxEVT_SCROLL_THUMBTRACK, 1)
3194EVT_COMMAND_SCROLL_THUMBRELEASE = wx.PyEventBinder( wxEVT_SCROLL_THUMBRELEASE, 1)
3195EVT_COMMAND_SCROLL_ENDSCROLL = wx.PyEventBinder( wxEVT_SCROLL_ENDSCROLL, 1)
3196
d14a1e28
RD
3197EVT_BUTTON = wx.PyEventBinder( wxEVT_COMMAND_BUTTON_CLICKED, 1)
3198EVT_CHECKBOX = wx.PyEventBinder( wxEVT_COMMAND_CHECKBOX_CLICKED, 1)
3199EVT_CHOICE = wx.PyEventBinder( wxEVT_COMMAND_CHOICE_SELECTED, 1)
3200EVT_LISTBOX = wx.PyEventBinder( wxEVT_COMMAND_LISTBOX_SELECTED, 1)
3201EVT_LISTBOX_DCLICK = wx.PyEventBinder( wxEVT_COMMAND_LISTBOX_DOUBLECLICKED, 1)
3202EVT_MENU = wx.PyEventBinder( wxEVT_COMMAND_MENU_SELECTED, 1)
3203EVT_MENU_RANGE = wx.PyEventBinder( wxEVT_COMMAND_MENU_SELECTED, 2)
3204EVT_SLIDER = wx.PyEventBinder( wxEVT_COMMAND_SLIDER_UPDATED, 1)
3205EVT_RADIOBOX = wx.PyEventBinder( wxEVT_COMMAND_RADIOBOX_SELECTED, 1)
3206EVT_RADIOBUTTON = wx.PyEventBinder( wxEVT_COMMAND_RADIOBUTTON_SELECTED, 1)
3207
3208EVT_SCROLLBAR = wx.PyEventBinder( wxEVT_COMMAND_SCROLLBAR_UPDATED, 1)
3209EVT_VLBOX = wx.PyEventBinder( wxEVT_COMMAND_VLBOX_SELECTED, 1)
3210EVT_COMBOBOX = wx.PyEventBinder( wxEVT_COMMAND_COMBOBOX_SELECTED, 1)
3211EVT_TOOL = wx.PyEventBinder( wxEVT_COMMAND_TOOL_CLICKED, 1)
3212EVT_TOOL_RANGE = wx.PyEventBinder( wxEVT_COMMAND_TOOL_CLICKED, 2)
3213EVT_TOOL_RCLICKED = wx.PyEventBinder( wxEVT_COMMAND_TOOL_RCLICKED, 1)
3214EVT_TOOL_RCLICKED_RANGE = wx.PyEventBinder( wxEVT_COMMAND_TOOL_RCLICKED, 2)
3215EVT_TOOL_ENTER = wx.PyEventBinder( wxEVT_COMMAND_TOOL_ENTER, 1)
3216EVT_CHECKLISTBOX = wx.PyEventBinder( wxEVT_COMMAND_CHECKLISTBOX_TOGGLED, 1)
3217
3218
3219EVT_COMMAND_LEFT_CLICK = wx.PyEventBinder( wxEVT_COMMAND_LEFT_CLICK, 1)
3220EVT_COMMAND_LEFT_DCLICK = wx.PyEventBinder( wxEVT_COMMAND_LEFT_DCLICK, 1)
3221EVT_COMMAND_RIGHT_CLICK = wx.PyEventBinder( wxEVT_COMMAND_RIGHT_CLICK, 1)
3222EVT_COMMAND_RIGHT_DCLICK = wx.PyEventBinder( wxEVT_COMMAND_RIGHT_DCLICK, 1)
3223EVT_COMMAND_SET_FOCUS = wx.PyEventBinder( wxEVT_COMMAND_SET_FOCUS, 1)
3224EVT_COMMAND_KILL_FOCUS = wx.PyEventBinder( wxEVT_COMMAND_KILL_FOCUS, 1)
3225EVT_COMMAND_ENTER = wx.PyEventBinder( wxEVT_COMMAND_ENTER, 1)
3226
3227EVT_IDLE = wx.PyEventBinder( wxEVT_IDLE )
3228
3229EVT_UPDATE_UI = wx.PyEventBinder( wxEVT_UPDATE_UI, 1)
3230EVT_UPDATE_UI_RANGE = wx.PyEventBinder( wxEVT_UPDATE_UI, 2)
3231
3232EVT_CONTEXT_MENU = wx.PyEventBinder( wxEVT_CONTEXT_MENU )
3233
3234
3235
3236#---------------------------------------------------------------------------
3237
3238class Event(Object):
093d3ff1 3239 """Proxy of C++ Event class"""
e811c8ce
RD
3240 def __init__(self): raise RuntimeError, "No constructor defined"
3241 def __repr__(self):
3242 return "<%s.%s; proxy of C++ wxEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
54f9ee45 3243 def __del__(self, destroy=_core_.delete_Event):
a95a7133 3244 """__del__(self)"""
d14a1e28
RD
3245 try:
3246 if self.thisown: destroy(self)
3247 except: pass
e811c8ce
RD
3248
3249 def SetEventType(*args, **kwargs):
a95a7133 3250 """SetEventType(self, wxEventType typ)"""
54f9ee45 3251 return _core_.Event_SetEventType(*args, **kwargs)
e811c8ce
RD
3252
3253 def GetEventType(*args, **kwargs):
a95a7133 3254 """GetEventType(self) -> wxEventType"""
54f9ee45 3255 return _core_.Event_GetEventType(*args, **kwargs)
e811c8ce
RD
3256
3257 def GetEventObject(*args, **kwargs):
a95a7133 3258 """GetEventObject(self) -> Object"""
54f9ee45 3259 return _core_.Event_GetEventObject(*args, **kwargs)
e811c8ce
RD
3260
3261 def SetEventObject(*args, **kwargs):
a95a7133 3262 """SetEventObject(self, Object obj)"""
54f9ee45 3263 return _core_.Event_SetEventObject(*args, **kwargs)
e811c8ce
RD
3264
3265 def GetTimestamp(*args, **kwargs):
a95a7133 3266 """GetTimestamp(self) -> long"""
54f9ee45 3267 return _core_.Event_GetTimestamp(*args, **kwargs)
e811c8ce
RD
3268
3269 def SetTimestamp(*args, **kwargs):
a95a7133 3270 """SetTimestamp(self, long ts=0)"""
54f9ee45 3271 return _core_.Event_SetTimestamp(*args, **kwargs)
e811c8ce
RD
3272
3273 def GetId(*args, **kwargs):
a95a7133 3274 """GetId(self) -> int"""
54f9ee45 3275 return _core_.Event_GetId(*args, **kwargs)
e811c8ce
RD
3276
3277 def SetId(*args, **kwargs):
a95a7133 3278 """SetId(self, int Id)"""
54f9ee45 3279 return _core_.Event_SetId(*args, **kwargs)
e811c8ce
RD
3280
3281 def IsCommandEvent(*args, **kwargs):
a95a7133 3282 """IsCommandEvent(self) -> bool"""
54f9ee45 3283 return _core_.Event_IsCommandEvent(*args, **kwargs)
e811c8ce
RD
3284
3285 def Skip(*args, **kwargs):
51b83b37
RD
3286 """
3287 Skip(self, bool skip=True)
3288
3289 Called by an event handler, it controls whether additional event
3290 handlers bound to this event will be called after the current event
3291 handler returns. Skip(false) (the default setting) will prevent
3292 additional event handlers from being called and control will be
3293 returned to the sender of the event immediately after the current
3294 handler has finished. Skip(True) will cause the event processing
3295 system to continue searching for a handler function for this event.
3296
3297 """
54f9ee45 3298 return _core_.Event_Skip(*args, **kwargs)
e811c8ce
RD
3299
3300 def GetSkipped(*args, **kwargs):
a95a7133 3301 """GetSkipped(self) -> bool"""
54f9ee45 3302 return _core_.Event_GetSkipped(*args, **kwargs)
e811c8ce
RD
3303
3304 def ShouldPropagate(*args, **kwargs):
a95a7133 3305 """ShouldPropagate(self) -> bool"""
54f9ee45 3306 return _core_.Event_ShouldPropagate(*args, **kwargs)
e811c8ce
RD
3307
3308 def StopPropagation(*args, **kwargs):
a95a7133 3309 """StopPropagation(self) -> int"""
54f9ee45 3310 return _core_.Event_StopPropagation(*args, **kwargs)
e811c8ce
RD
3311
3312 def ResumePropagation(*args, **kwargs):
a95a7133 3313 """ResumePropagation(self, int propagationLevel)"""
54f9ee45 3314 return _core_.Event_ResumePropagation(*args, **kwargs)
e811c8ce
RD
3315
3316 def Clone(*args, **kwargs):
a95a7133 3317 """Clone(self) -> Event"""
54f9ee45 3318 return _core_.Event_Clone(*args, **kwargs)
e811c8ce 3319
d14a1e28
RD
3320
3321class EventPtr(Event):
3322 def __init__(self, this):
3323 self.this = this
3324 if not hasattr(self,"thisown"): self.thisown = 0
3325 self.__class__ = Event
54f9ee45 3326_core_.Event_swigregister(EventPtr)
d14a1e28
RD
3327
3328#---------------------------------------------------------------------------
3329
3330class PropagationDisabler(object):
093d3ff1 3331 """Proxy of C++ PropagationDisabler class"""
e811c8ce
RD
3332 def __repr__(self):
3333 return "<%s.%s; proxy of C++ wxPropagationDisabler instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 3334 def __init__(self, *args, **kwargs):
a95a7133 3335 """__init__(self, Event event) -> PropagationDisabler"""
54f9ee45 3336 newobj = _core_.new_PropagationDisabler(*args, **kwargs)
d14a1e28
RD
3337 self.this = newobj.this
3338 self.thisown = 1
3339 del newobj.thisown
54f9ee45 3340 def __del__(self, destroy=_core_.delete_PropagationDisabler):
a95a7133 3341 """__del__(self)"""
d14a1e28
RD
3342 try:
3343 if self.thisown: destroy(self)
3344 except: pass
e811c8ce 3345
d14a1e28
RD
3346
3347class PropagationDisablerPtr(PropagationDisabler):
3348 def __init__(self, this):
3349 self.this = this
3350 if not hasattr(self,"thisown"): self.thisown = 0
3351 self.__class__ = PropagationDisabler
54f9ee45 3352_core_.PropagationDisabler_swigregister(PropagationDisablerPtr)
d14a1e28
RD
3353
3354class PropagateOnce(object):
093d3ff1 3355 """Proxy of C++ PropagateOnce class"""
e811c8ce
RD
3356 def __repr__(self):
3357 return "<%s.%s; proxy of C++ wxPropagateOnce instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 3358 def __init__(self, *args, **kwargs):
a95a7133 3359 """__init__(self, Event event) -> PropagateOnce"""
54f9ee45 3360 newobj = _core_.new_PropagateOnce(*args, **kwargs)
d14a1e28
RD
3361 self.this = newobj.this
3362 self.thisown = 1
3363 del newobj.thisown
54f9ee45 3364 def __del__(self, destroy=_core_.delete_PropagateOnce):
a95a7133 3365 """__del__(self)"""
d14a1e28
RD
3366 try:
3367 if self.thisown: destroy(self)
3368 except: pass
e811c8ce 3369
d14a1e28
RD
3370
3371class PropagateOncePtr(PropagateOnce):
3372 def __init__(self, this):
3373 self.this = this
3374 if not hasattr(self,"thisown"): self.thisown = 0
3375 self.__class__ = PropagateOnce
54f9ee45 3376_core_.PropagateOnce_swigregister(PropagateOncePtr)
d14a1e28
RD
3377
3378#---------------------------------------------------------------------------
3379
3380class CommandEvent(Event):
093d3ff1 3381 """Proxy of C++ CommandEvent class"""
e811c8ce
RD
3382 def __repr__(self):
3383 return "<%s.%s; proxy of C++ wxCommandEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 3384 def __init__(self, *args, **kwargs):
a95a7133 3385 """__init__(self, wxEventType commandType=wxEVT_NULL, int winid=0) -> CommandEvent"""
54f9ee45 3386 newobj = _core_.new_CommandEvent(*args, **kwargs)
d14a1e28
RD
3387 self.this = newobj.this
3388 self.thisown = 1
3389 del newobj.thisown
e811c8ce 3390 def GetSelection(*args, **kwargs):
a95a7133 3391 """GetSelection(self) -> int"""
54f9ee45 3392 return _core_.CommandEvent_GetSelection(*args, **kwargs)
e811c8ce
RD
3393
3394 def SetString(*args, **kwargs):
a95a7133 3395 """SetString(self, String s)"""
54f9ee45 3396 return _core_.CommandEvent_SetString(*args, **kwargs)
e811c8ce
RD
3397
3398 def GetString(*args, **kwargs):
a95a7133 3399 """GetString(self) -> String"""
54f9ee45 3400 return _core_.CommandEvent_GetString(*args, **kwargs)
e811c8ce
RD
3401
3402 def IsChecked(*args, **kwargs):
a95a7133 3403 """IsChecked(self) -> bool"""
54f9ee45 3404 return _core_.CommandEvent_IsChecked(*args, **kwargs)
e811c8ce 3405
242b7b46 3406 Checked = IsChecked
e811c8ce 3407 def IsSelection(*args, **kwargs):
a95a7133 3408 """IsSelection(self) -> bool"""
54f9ee45 3409 return _core_.CommandEvent_IsSelection(*args, **kwargs)
e811c8ce
RD
3410
3411 def SetExtraLong(*args, **kwargs):
a95a7133 3412 """SetExtraLong(self, long extraLong)"""
54f9ee45 3413 return _core_.CommandEvent_SetExtraLong(*args, **kwargs)
e811c8ce
RD
3414
3415 def GetExtraLong(*args, **kwargs):
a95a7133 3416 """GetExtraLong(self) -> long"""
54f9ee45 3417 return _core_.CommandEvent_GetExtraLong(*args, **kwargs)
e811c8ce
RD
3418
3419 def SetInt(*args, **kwargs):
a95a7133 3420 """SetInt(self, int i)"""
54f9ee45 3421 return _core_.CommandEvent_SetInt(*args, **kwargs)
e811c8ce
RD
3422
3423 def GetInt(*args, **kwargs):
a95a7133 3424 """GetInt(self) -> long"""
54f9ee45 3425 return _core_.CommandEvent_GetInt(*args, **kwargs)
e811c8ce
RD
3426
3427 def Clone(*args, **kwargs):
a95a7133 3428 """Clone(self) -> Event"""
54f9ee45 3429 return _core_.CommandEvent_Clone(*args, **kwargs)
e811c8ce 3430
d14a1e28
RD
3431
3432class CommandEventPtr(CommandEvent):
3433 def __init__(self, this):
3434 self.this = this
3435 if not hasattr(self,"thisown"): self.thisown = 0
3436 self.__class__ = CommandEvent
54f9ee45 3437_core_.CommandEvent_swigregister(CommandEventPtr)
d14a1e28
RD
3438
3439#---------------------------------------------------------------------------
3440
3441class NotifyEvent(CommandEvent):
093d3ff1 3442 """Proxy of C++ NotifyEvent class"""
e811c8ce
RD
3443 def __repr__(self):
3444 return "<%s.%s; proxy of C++ wxNotifyEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 3445 def __init__(self, *args, **kwargs):
a95a7133 3446 """__init__(self, wxEventType commandType=wxEVT_NULL, int winid=0) -> NotifyEvent"""
54f9ee45 3447 newobj = _core_.new_NotifyEvent(*args, **kwargs)
d14a1e28
RD
3448 self.this = newobj.this
3449 self.thisown = 1
3450 del newobj.thisown
e811c8ce 3451 def Veto(*args, **kwargs):
a95a7133 3452 """Veto(self)"""
54f9ee45 3453 return _core_.NotifyEvent_Veto(*args, **kwargs)
e811c8ce
RD
3454
3455 def Allow(*args, **kwargs):
a95a7133 3456 """Allow(self)"""
54f9ee45 3457 return _core_.NotifyEvent_Allow(*args, **kwargs)
e811c8ce
RD
3458
3459 def IsAllowed(*args, **kwargs):
a95a7133 3460 """IsAllowed(self) -> bool"""
54f9ee45 3461 return _core_.NotifyEvent_IsAllowed(*args, **kwargs)
e811c8ce 3462
d14a1e28
RD
3463
3464class NotifyEventPtr(NotifyEvent):
3465 def __init__(self, this):
3466 self.this = this
3467 if not hasattr(self,"thisown"): self.thisown = 0
3468 self.__class__ = NotifyEvent
54f9ee45 3469_core_.NotifyEvent_swigregister(NotifyEventPtr)
d14a1e28
RD
3470
3471#---------------------------------------------------------------------------
3472
3473class ScrollEvent(CommandEvent):
093d3ff1 3474 """Proxy of C++ ScrollEvent class"""
e811c8ce
RD
3475 def __repr__(self):
3476 return "<%s.%s; proxy of C++ wxScrollEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 3477 def __init__(self, *args, **kwargs):
0df68c9f 3478 """
a95a7133 3479 __init__(self, wxEventType commandType=wxEVT_NULL, int winid=0, int pos=0,
0df68c9f
RD
3480 int orient=0) -> ScrollEvent
3481 """
54f9ee45 3482 newobj = _core_.new_ScrollEvent(*args, **kwargs)
d14a1e28
RD
3483 self.this = newobj.this
3484 self.thisown = 1
3485 del newobj.thisown
e811c8ce 3486 def GetOrientation(*args, **kwargs):
a95a7133 3487 """GetOrientation(self) -> int"""
54f9ee45 3488 return _core_.ScrollEvent_GetOrientation(*args, **kwargs)
e811c8ce
RD
3489
3490 def GetPosition(*args, **kwargs):
a95a7133 3491 """GetPosition(self) -> int"""
54f9ee45 3492 return _core_.ScrollEvent_GetPosition(*args, **kwargs)
e811c8ce
RD
3493
3494 def SetOrientation(*args, **kwargs):
a95a7133 3495 """SetOrientation(self, int orient)"""
54f9ee45 3496 return _core_.ScrollEvent_SetOrientation(*args, **kwargs)
e811c8ce
RD
3497
3498 def SetPosition(*args, **kwargs):
a95a7133 3499 """SetPosition(self, int pos)"""
54f9ee45 3500 return _core_.ScrollEvent_SetPosition(*args, **kwargs)
e811c8ce 3501
d14a1e28
RD
3502
3503class ScrollEventPtr(ScrollEvent):
3504 def __init__(self, this):
3505 self.this = this
3506 if not hasattr(self,"thisown"): self.thisown = 0
3507 self.__class__ = ScrollEvent
54f9ee45 3508_core_.ScrollEvent_swigregister(ScrollEventPtr)
d14a1e28
RD
3509
3510#---------------------------------------------------------------------------
3511
3512class ScrollWinEvent(Event):
093d3ff1 3513 """Proxy of C++ ScrollWinEvent class"""
e811c8ce
RD
3514 def __repr__(self):
3515 return "<%s.%s; proxy of C++ wxScrollWinEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 3516 def __init__(self, *args, **kwargs):
a95a7133 3517 """__init__(self, wxEventType commandType=wxEVT_NULL, int pos=0, int orient=0) -> ScrollWinEvent"""
54f9ee45 3518 newobj = _core_.new_ScrollWinEvent(*args, **kwargs)
d14a1e28
RD
3519 self.this = newobj.this
3520 self.thisown = 1
3521 del newobj.thisown
e811c8ce 3522 def GetOrientation(*args, **kwargs):
a95a7133 3523 """GetOrientation(self) -> int"""
54f9ee45 3524 return _core_.ScrollWinEvent_GetOrientation(*args, **kwargs)
e811c8ce
RD
3525
3526 def GetPosition(*args, **kwargs):
a95a7133 3527 """GetPosition(self) -> int"""
54f9ee45 3528 return _core_.ScrollWinEvent_GetPosition(*args, **kwargs)
e811c8ce
RD
3529
3530 def SetOrientation(*args, **kwargs):
a95a7133 3531 """SetOrientation(self, int orient)"""
54f9ee45 3532 return _core_.ScrollWinEvent_SetOrientation(*args, **kwargs)
e811c8ce
RD
3533
3534 def SetPosition(*args, **kwargs):
a95a7133 3535 """SetPosition(self, int pos)"""
54f9ee45 3536 return _core_.ScrollWinEvent_SetPosition(*args, **kwargs)
e811c8ce 3537
d14a1e28
RD
3538
3539class ScrollWinEventPtr(ScrollWinEvent):
3540 def __init__(self, this):
3541 self.this = this
3542 if not hasattr(self,"thisown"): self.thisown = 0
3543 self.__class__ = ScrollWinEvent
54f9ee45 3544_core_.ScrollWinEvent_swigregister(ScrollWinEventPtr)
d14a1e28
RD
3545
3546#---------------------------------------------------------------------------
3547
54f9ee45
RD
3548MOUSE_BTN_ANY = _core_.MOUSE_BTN_ANY
3549MOUSE_BTN_NONE = _core_.MOUSE_BTN_NONE
3550MOUSE_BTN_LEFT = _core_.MOUSE_BTN_LEFT
3551MOUSE_BTN_MIDDLE = _core_.MOUSE_BTN_MIDDLE
3552MOUSE_BTN_RIGHT = _core_.MOUSE_BTN_RIGHT
d14a1e28 3553class MouseEvent(Event):
093d3ff1 3554 """Proxy of C++ MouseEvent class"""
e811c8ce
RD
3555 def __repr__(self):
3556 return "<%s.%s; proxy of C++ wxMouseEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 3557 def __init__(self, *args, **kwargs):
a95a7133 3558 """__init__(self, wxEventType mouseType=wxEVT_NULL) -> MouseEvent"""
54f9ee45 3559 newobj = _core_.new_MouseEvent(*args, **kwargs)
d14a1e28
RD
3560 self.this = newobj.this
3561 self.thisown = 1
3562 del newobj.thisown
e811c8ce 3563 def IsButton(*args, **kwargs):
a95a7133 3564 """IsButton(self) -> bool"""
54f9ee45 3565 return _core_.MouseEvent_IsButton(*args, **kwargs)
e811c8ce
RD
3566
3567 def ButtonDown(*args, **kwargs):
a95a7133 3568 """ButtonDown(self, int but=MOUSE_BTN_ANY) -> bool"""
54f9ee45 3569 return _core_.MouseEvent_ButtonDown(*args, **kwargs)
e811c8ce
RD
3570
3571 def ButtonDClick(*args, **kwargs):
a95a7133 3572 """ButtonDClick(self, int but=MOUSE_BTN_ANY) -> bool"""
54f9ee45 3573 return _core_.MouseEvent_ButtonDClick(*args, **kwargs)
e811c8ce
RD
3574
3575 def ButtonUp(*args, **kwargs):
a95a7133 3576 """ButtonUp(self, int but=MOUSE_BTN_ANY) -> bool"""
54f9ee45 3577 return _core_.MouseEvent_ButtonUp(*args, **kwargs)
e811c8ce
RD
3578
3579 def Button(*args, **kwargs):
a95a7133 3580 """Button(self, int but) -> bool"""
54f9ee45 3581 return _core_.MouseEvent_Button(*args, **kwargs)
e811c8ce
RD
3582
3583 def ButtonIsDown(*args, **kwargs):
a95a7133 3584 """ButtonIsDown(self, int but) -> bool"""
54f9ee45 3585 return _core_.MouseEvent_ButtonIsDown(*args, **kwargs)
e811c8ce
RD
3586
3587 def GetButton(*args, **kwargs):
a95a7133 3588 """GetButton(self) -> int"""
54f9ee45 3589 return _core_.MouseEvent_GetButton(*args, **kwargs)
e811c8ce
RD
3590
3591 def ControlDown(*args, **kwargs):
a95a7133 3592 """ControlDown(self) -> bool"""
54f9ee45 3593 return _core_.MouseEvent_ControlDown(*args, **kwargs)
e811c8ce
RD
3594
3595 def MetaDown(*args, **kwargs):
a95a7133 3596 """MetaDown(self) -> bool"""
54f9ee45 3597 return _core_.MouseEvent_MetaDown(*args, **kwargs)
e811c8ce
RD
3598
3599 def AltDown(*args, **kwargs):
a95a7133 3600 """AltDown(self) -> bool"""
54f9ee45 3601 return _core_.MouseEvent_AltDown(*args, **kwargs)
e811c8ce
RD
3602
3603 def ShiftDown(*args, **kwargs):
a95a7133 3604 """ShiftDown(self) -> bool"""
54f9ee45 3605 return _core_.MouseEvent_ShiftDown(*args, **kwargs)
e811c8ce 3606
412d302d
RD
3607 def CmdDown(*args, **kwargs):
3608 """
3609 CmdDown(self) -> bool
3610
3611 "Cmd" is a pseudo key which is the same as Control for PC and Unix
3612 platforms but the special "Apple" (a.k.a as "Command") key on
3613 Macs: it makes often sense to use it instead of, say, `ControlDown`
3614 because Cmd key is used for the same thing under Mac as Ctrl
3615 elsewhere. The Ctrl still exists, it's just not used for this
3616 purpose. So for non-Mac platforms this is the same as `ControlDown`
3617 and Macs this is the same as `MetaDown`.
3618 """
3619 return _core_.MouseEvent_CmdDown(*args, **kwargs)
3620
e811c8ce 3621 def LeftDown(*args, **kwargs):
a95a7133 3622 """LeftDown(self) -> bool"""
54f9ee45 3623 return _core_.MouseEvent_LeftDown(*args, **kwargs)
e811c8ce
RD
3624
3625 def MiddleDown(*args, **kwargs):
a95a7133 3626 """MiddleDown(self) -> bool"""
54f9ee45 3627 return _core_.MouseEvent_MiddleDown(*args, **kwargs)
e811c8ce
RD
3628
3629 def RightDown(*args, **kwargs):
a95a7133 3630 """RightDown(self) -> bool"""
54f9ee45 3631 return _core_.MouseEvent_RightDown(*args, **kwargs)
e811c8ce
RD
3632
3633 def LeftUp(*args, **kwargs):
a95a7133 3634 """LeftUp(self) -> bool"""
54f9ee45 3635 return _core_.MouseEvent_LeftUp(*args, **kwargs)
e811c8ce
RD
3636
3637 def MiddleUp(*args, **kwargs):
a95a7133 3638 """MiddleUp(self) -> bool"""
54f9ee45 3639 return _core_.MouseEvent_MiddleUp(*args, **kwargs)
e811c8ce
RD
3640
3641 def RightUp(*args, **kwargs):
a95a7133 3642 """RightUp(self) -> bool"""
54f9ee45 3643 return _core_.MouseEvent_RightUp(*args, **kwargs)
e811c8ce
RD
3644
3645 def LeftDClick(*args, **kwargs):
a95a7133 3646 """LeftDClick(self) -> bool"""
54f9ee45 3647 return _core_.MouseEvent_LeftDClick(*args, **kwargs)
e811c8ce
RD
3648
3649 def MiddleDClick(*args, **kwargs):
a95a7133 3650 """MiddleDClick(self) -> bool"""
54f9ee45 3651 return _core_.MouseEvent_MiddleDClick(*args, **kwargs)
e811c8ce
RD
3652
3653 def RightDClick(*args, **kwargs):
a95a7133 3654 """RightDClick(self) -> bool"""
54f9ee45 3655 return _core_.MouseEvent_RightDClick(*args, **kwargs)
e811c8ce
RD
3656
3657 def LeftIsDown(*args, **kwargs):
a95a7133 3658 """LeftIsDown(self) -> bool"""
54f9ee45 3659 return _core_.MouseEvent_LeftIsDown(*args, **kwargs)
e811c8ce
RD
3660
3661 def MiddleIsDown(*args, **kwargs):
a95a7133 3662 """MiddleIsDown(self) -> bool"""
54f9ee45 3663 return _core_.MouseEvent_MiddleIsDown(*args, **kwargs)
e811c8ce
RD
3664
3665 def RightIsDown(*args, **kwargs):
a95a7133 3666 """RightIsDown(self) -> bool"""
54f9ee45 3667 return _core_.MouseEvent_RightIsDown(*args, **kwargs)
e811c8ce
RD
3668
3669 def Dragging(*args, **kwargs):
a95a7133 3670 """Dragging(self) -> bool"""
54f9ee45 3671 return _core_.MouseEvent_Dragging(*args, **kwargs)
e811c8ce
RD
3672
3673 def Moving(*args, **kwargs):
a95a7133 3674 """Moving(self) -> bool"""
54f9ee45 3675 return _core_.MouseEvent_Moving(*args, **kwargs)
e811c8ce
RD
3676
3677 def Entering(*args, **kwargs):
a95a7133 3678 """Entering(self) -> bool"""
54f9ee45 3679 return _core_.MouseEvent_Entering(*args, **kwargs)
e811c8ce
RD
3680
3681 def Leaving(*args, **kwargs):
a95a7133 3682 """Leaving(self) -> bool"""
54f9ee45 3683 return _core_.MouseEvent_Leaving(*args, **kwargs)
e811c8ce
RD
3684
3685 def GetPosition(*args, **kwargs):
0df68c9f 3686 """
a95a7133 3687 GetPosition(self) -> Point
e811c8ce 3688
41e2b43e
RD
3689 Returns the position of the mouse in window coordinates when the event
3690 happened.
0df68c9f 3691 """
54f9ee45 3692 return _core_.MouseEvent_GetPosition(*args, **kwargs)
e811c8ce
RD
3693
3694 def GetPositionTuple(*args, **kwargs):
0df68c9f
RD
3695 """
3696 GetPositionTuple() -> (x,y)
e811c8ce 3697
41e2b43e
RD
3698 Returns the position of the mouse in window coordinates when the event
3699 happened.
0df68c9f 3700 """
54f9ee45 3701 return _core_.MouseEvent_GetPositionTuple(*args, **kwargs)
e811c8ce
RD
3702
3703 def GetLogicalPosition(*args, **kwargs):
a95a7133 3704 """GetLogicalPosition(self, DC dc) -> Point"""
54f9ee45 3705 return _core_.MouseEvent_GetLogicalPosition(*args, **kwargs)
e811c8ce
RD
3706
3707 def GetX(*args, **kwargs):
a95a7133 3708 """GetX(self) -> int"""
54f9ee45 3709 return _core_.MouseEvent_GetX(*args, **kwargs)
e811c8ce
RD
3710
3711 def GetY(*args, **kwargs):
a95a7133 3712 """GetY(self) -> int"""
54f9ee45 3713 return _core_.MouseEvent_GetY(*args, **kwargs)
e811c8ce
RD
3714
3715 def GetWheelRotation(*args, **kwargs):
a95a7133 3716 """GetWheelRotation(self) -> int"""
54f9ee45 3717 return _core_.MouseEvent_GetWheelRotation(*args, **kwargs)
e811c8ce
RD
3718
3719 def GetWheelDelta(*args, **kwargs):
a95a7133 3720 """GetWheelDelta(self) -> int"""
54f9ee45 3721 return _core_.MouseEvent_GetWheelDelta(*args, **kwargs)
e811c8ce
RD
3722
3723 def GetLinesPerAction(*args, **kwargs):
a95a7133 3724 """GetLinesPerAction(self) -> int"""
54f9ee45 3725 return _core_.MouseEvent_GetLinesPerAction(*args, **kwargs)
e811c8ce
RD
3726
3727 def IsPageScroll(*args, **kwargs):
a95a7133 3728 """IsPageScroll(self) -> bool"""
54f9ee45
RD
3729 return _core_.MouseEvent_IsPageScroll(*args, **kwargs)
3730
3731 m_x = property(_core_.MouseEvent_m_x_get, _core_.MouseEvent_m_x_set)
3732 m_y = property(_core_.MouseEvent_m_y_get, _core_.MouseEvent_m_y_set)
3733 m_leftDown = property(_core_.MouseEvent_m_leftDown_get, _core_.MouseEvent_m_leftDown_set)
3734 m_middleDown = property(_core_.MouseEvent_m_middleDown_get, _core_.MouseEvent_m_middleDown_set)
3735 m_rightDown = property(_core_.MouseEvent_m_rightDown_get, _core_.MouseEvent_m_rightDown_set)
3736 m_controlDown = property(_core_.MouseEvent_m_controlDown_get, _core_.MouseEvent_m_controlDown_set)
3737 m_shiftDown = property(_core_.MouseEvent_m_shiftDown_get, _core_.MouseEvent_m_shiftDown_set)
3738 m_altDown = property(_core_.MouseEvent_m_altDown_get, _core_.MouseEvent_m_altDown_set)
3739 m_metaDown = property(_core_.MouseEvent_m_metaDown_get, _core_.MouseEvent_m_metaDown_set)
3740 m_wheelRotation = property(_core_.MouseEvent_m_wheelRotation_get, _core_.MouseEvent_m_wheelRotation_set)
3741 m_wheelDelta = property(_core_.MouseEvent_m_wheelDelta_get, _core_.MouseEvent_m_wheelDelta_set)
3742 m_linesPerAction = property(_core_.MouseEvent_m_linesPerAction_get, _core_.MouseEvent_m_linesPerAction_set)
d14a1e28
RD
3743
3744class MouseEventPtr(MouseEvent):
3745 def __init__(self, this):
3746 self.this = this
3747 if not hasattr(self,"thisown"): self.thisown = 0
3748 self.__class__ = MouseEvent
54f9ee45 3749_core_.MouseEvent_swigregister(MouseEventPtr)
d14a1e28
RD
3750
3751#---------------------------------------------------------------------------
3752
3753class SetCursorEvent(Event):
093d3ff1 3754 """Proxy of C++ SetCursorEvent class"""
e811c8ce
RD
3755 def __repr__(self):
3756 return "<%s.%s; proxy of C++ wxSetCursorEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 3757 def __init__(self, *args, **kwargs):
a95a7133 3758 """__init__(self, int x=0, int y=0) -> SetCursorEvent"""
54f9ee45 3759 newobj = _core_.new_SetCursorEvent(*args, **kwargs)
d14a1e28
RD
3760 self.this = newobj.this
3761 self.thisown = 1
3762 del newobj.thisown
e811c8ce 3763 def GetX(*args, **kwargs):
a95a7133 3764 """GetX(self) -> int"""
54f9ee45 3765 return _core_.SetCursorEvent_GetX(*args, **kwargs)
e811c8ce
RD
3766
3767 def GetY(*args, **kwargs):
a95a7133 3768 """GetY(self) -> int"""
54f9ee45 3769 return _core_.SetCursorEvent_GetY(*args, **kwargs)
e811c8ce
RD
3770
3771 def SetCursor(*args, **kwargs):
a95a7133 3772 """SetCursor(self, Cursor cursor)"""
54f9ee45 3773 return _core_.SetCursorEvent_SetCursor(*args, **kwargs)
e811c8ce
RD
3774
3775 def GetCursor(*args, **kwargs):
a95a7133 3776 """GetCursor(self) -> Cursor"""
54f9ee45 3777 return _core_.SetCursorEvent_GetCursor(*args, **kwargs)
e811c8ce
RD
3778
3779 def HasCursor(*args, **kwargs):
a95a7133 3780 """HasCursor(self) -> bool"""
54f9ee45 3781 return _core_.SetCursorEvent_HasCursor(*args, **kwargs)
e811c8ce 3782
d14a1e28
RD
3783
3784class SetCursorEventPtr(SetCursorEvent):
3785 def __init__(self, this):
3786 self.this = this
3787 if not hasattr(self,"thisown"): self.thisown = 0
3788 self.__class__ = SetCursorEvent
54f9ee45 3789_core_.SetCursorEvent_swigregister(SetCursorEventPtr)
d14a1e28
RD
3790
3791#---------------------------------------------------------------------------
3792
3793class KeyEvent(Event):
093d3ff1 3794 """Proxy of C++ KeyEvent class"""
e811c8ce
RD
3795 def __repr__(self):
3796 return "<%s.%s; proxy of C++ wxKeyEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 3797 def __init__(self, *args, **kwargs):
a95a7133 3798 """__init__(self, wxEventType keyType=wxEVT_NULL) -> KeyEvent"""
54f9ee45 3799 newobj = _core_.new_KeyEvent(*args, **kwargs)
d14a1e28
RD
3800 self.this = newobj.this
3801 self.thisown = 1
3802 del newobj.thisown
e811c8ce 3803 def ControlDown(*args, **kwargs):
a95a7133 3804 """ControlDown(self) -> bool"""
54f9ee45 3805 return _core_.KeyEvent_ControlDown(*args, **kwargs)
e811c8ce
RD
3806
3807 def MetaDown(*args, **kwargs):
a95a7133 3808 """MetaDown(self) -> bool"""
54f9ee45 3809 return _core_.KeyEvent_MetaDown(*args, **kwargs)
e811c8ce
RD
3810
3811 def AltDown(*args, **kwargs):
a95a7133 3812 """AltDown(self) -> bool"""
54f9ee45 3813 return _core_.KeyEvent_AltDown(*args, **kwargs)
e811c8ce
RD
3814
3815 def ShiftDown(*args, **kwargs):
a95a7133 3816 """ShiftDown(self) -> bool"""
54f9ee45 3817 return _core_.KeyEvent_ShiftDown(*args, **kwargs)
e811c8ce 3818
412d302d
RD
3819 def CmdDown(*args, **kwargs):
3820 """
3821 CmdDown(self) -> bool
3822
3823 "Cmd" is a pseudo key which is the same as Control for PC and Unix
3824 platforms but the special "Apple" (a.k.a as "Command") key on
3825 Macs: it makes often sense to use it instead of, say, `ControlDown`
3826 because Cmd key is used for the same thing under Mac as Ctrl
3827 elsewhere. The Ctrl still exists, it's just not used for this
3828 purpose. So for non-Mac platforms this is the same as `ControlDown`
3829 and Macs this is the same as `MetaDown`.
3830 """
3831 return _core_.KeyEvent_CmdDown(*args, **kwargs)
3832
e811c8ce 3833 def HasModifiers(*args, **kwargs):
a95a7133 3834 """HasModifiers(self) -> bool"""
54f9ee45 3835 return _core_.KeyEvent_HasModifiers(*args, **kwargs)
e811c8ce
RD
3836
3837 def GetKeyCode(*args, **kwargs):
a95a7133 3838 """GetKeyCode(self) -> int"""
54f9ee45 3839 return _core_.KeyEvent_GetKeyCode(*args, **kwargs)
e811c8ce 3840
d14a1e28 3841 KeyCode = GetKeyCode
19272049
RD
3842 def GetUnicodeKey(*args, **kwargs):
3843 """GetUnicodeKey(self) -> int"""
3844 return _core_.KeyEvent_GetUnicodeKey(*args, **kwargs)
e811c8ce 3845
19272049 3846 GetUniChar = GetUnicodeKey
e811c8ce 3847 def GetRawKeyCode(*args, **kwargs):
a95a7133 3848 """GetRawKeyCode(self) -> unsigned int"""
54f9ee45 3849 return _core_.KeyEvent_GetRawKeyCode(*args, **kwargs)
e811c8ce
RD
3850
3851 def GetRawKeyFlags(*args, **kwargs):
a95a7133 3852 """GetRawKeyFlags(self) -> unsigned int"""
54f9ee45 3853 return _core_.KeyEvent_GetRawKeyFlags(*args, **kwargs)
e811c8ce
RD
3854
3855 def GetPosition(*args, **kwargs):
0df68c9f 3856 """
a95a7133 3857 GetPosition(self) -> Point
e811c8ce 3858
0df68c9f
RD
3859 Find the position of the event.
3860 """
54f9ee45 3861 return _core_.KeyEvent_GetPosition(*args, **kwargs)
e811c8ce
RD
3862
3863 def GetPositionTuple(*args, **kwargs):
0df68c9f
RD
3864 """
3865 GetPositionTuple() -> (x,y)
e811c8ce 3866
0df68c9f
RD
3867 Find the position of the event.
3868 """
54f9ee45 3869 return _core_.KeyEvent_GetPositionTuple(*args, **kwargs)
e811c8ce
RD
3870
3871 def GetX(*args, **kwargs):
a95a7133 3872 """GetX(self) -> int"""
54f9ee45 3873 return _core_.KeyEvent_GetX(*args, **kwargs)
e811c8ce
RD
3874
3875 def GetY(*args, **kwargs):
a95a7133 3876 """GetY(self) -> int"""
54f9ee45
RD
3877 return _core_.KeyEvent_GetY(*args, **kwargs)
3878
3879 m_x = property(_core_.KeyEvent_m_x_get, _core_.KeyEvent_m_x_set)
3880 m_y = property(_core_.KeyEvent_m_y_get, _core_.KeyEvent_m_y_set)
3881 m_keyCode = property(_core_.KeyEvent_m_keyCode_get, _core_.KeyEvent_m_keyCode_set)
3882 m_controlDown = property(_core_.KeyEvent_m_controlDown_get, _core_.KeyEvent_m_controlDown_set)
3883 m_shiftDown = property(_core_.KeyEvent_m_shiftDown_get, _core_.KeyEvent_m_shiftDown_set)
3884 m_altDown = property(_core_.KeyEvent_m_altDown_get, _core_.KeyEvent_m_altDown_set)
3885 m_metaDown = property(_core_.KeyEvent_m_metaDown_get, _core_.KeyEvent_m_metaDown_set)
3886 m_scanCode = property(_core_.KeyEvent_m_scanCode_get, _core_.KeyEvent_m_scanCode_set)
3887 m_rawCode = property(_core_.KeyEvent_m_rawCode_get, _core_.KeyEvent_m_rawCode_set)
3888 m_rawFlags = property(_core_.KeyEvent_m_rawFlags_get, _core_.KeyEvent_m_rawFlags_set)
d14a1e28
RD
3889
3890class KeyEventPtr(KeyEvent):
3891 def __init__(self, this):
3892 self.this = this
3893 if not hasattr(self,"thisown"): self.thisown = 0
3894 self.__class__ = KeyEvent
54f9ee45 3895_core_.KeyEvent_swigregister(KeyEventPtr)
d14a1e28
RD
3896
3897#---------------------------------------------------------------------------
3898
3899class SizeEvent(Event):
093d3ff1 3900 """Proxy of C++ SizeEvent class"""
e811c8ce
RD
3901 def __repr__(self):
3902 return "<%s.%s; proxy of C++ wxSizeEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 3903 def __init__(self, *args, **kwargs):
a95a7133 3904 """__init__(self, Size sz=DefaultSize, int winid=0) -> SizeEvent"""
54f9ee45 3905 newobj = _core_.new_SizeEvent(*args, **kwargs)
d14a1e28
RD
3906 self.this = newobj.this
3907 self.thisown = 1
3908 del newobj.thisown
e811c8ce 3909 def GetSize(*args, **kwargs):
a95a7133 3910 """GetSize(self) -> Size"""
54f9ee45 3911 return _core_.SizeEvent_GetSize(*args, **kwargs)
e811c8ce
RD
3912
3913 def GetRect(*args, **kwargs):
a95a7133 3914 """GetRect(self) -> Rect"""
54f9ee45 3915 return _core_.SizeEvent_GetRect(*args, **kwargs)
e811c8ce
RD
3916
3917 def SetRect(*args, **kwargs):
a95a7133 3918 """SetRect(self, Rect rect)"""
54f9ee45 3919 return _core_.SizeEvent_SetRect(*args, **kwargs)
e811c8ce
RD
3920
3921 def SetSize(*args, **kwargs):
a95a7133 3922 """SetSize(self, Size size)"""
54f9ee45 3923 return _core_.SizeEvent_SetSize(*args, **kwargs)
e811c8ce 3924
54f9ee45
RD
3925 m_size = property(_core_.SizeEvent_m_size_get, _core_.SizeEvent_m_size_set)
3926 m_rect = property(_core_.SizeEvent_m_rect_get, _core_.SizeEvent_m_rect_set)
d14a1e28
RD
3927
3928class SizeEventPtr(SizeEvent):
3929 def __init__(self, this):
3930 self.this = this
3931 if not hasattr(self,"thisown"): self.thisown = 0
3932 self.__class__ = SizeEvent
54f9ee45 3933_core_.SizeEvent_swigregister(SizeEventPtr)
d14a1e28
RD
3934
3935#---------------------------------------------------------------------------
3936
3937class MoveEvent(Event):
093d3ff1 3938 """Proxy of C++ MoveEvent class"""
e811c8ce
RD
3939 def __repr__(self):
3940 return "<%s.%s; proxy of C++ wxMoveEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 3941 def __init__(self, *args, **kwargs):
a95a7133 3942 """__init__(self, Point pos=DefaultPosition, int winid=0) -> MoveEvent"""
54f9ee45 3943 newobj = _core_.new_MoveEvent(*args, **kwargs)
d14a1e28
RD
3944 self.this = newobj.this
3945 self.thisown = 1
3946 del newobj.thisown
e811c8ce 3947 def GetPosition(*args, **kwargs):
a95a7133 3948 """GetPosition(self) -> Point"""
54f9ee45 3949 return _core_.MoveEvent_GetPosition(*args, **kwargs)
e811c8ce
RD
3950
3951 def GetRect(*args, **kwargs):
a95a7133 3952 """GetRect(self) -> Rect"""
54f9ee45 3953 return _core_.MoveEvent_GetRect(*args, **kwargs)
e811c8ce
RD
3954
3955 def SetRect(*args, **kwargs):
a95a7133 3956 """SetRect(self, Rect rect)"""
54f9ee45 3957 return _core_.MoveEvent_SetRect(*args, **kwargs)
e811c8ce
RD
3958
3959 def SetPosition(*args, **kwargs):
a95a7133 3960 """SetPosition(self, Point pos)"""
54f9ee45 3961 return _core_.MoveEvent_SetPosition(*args, **kwargs)
e811c8ce 3962
7557b9b5
RD
3963 m_pos = property(GetPosition, SetPosition)
3964 m_rect = property(GetRect, SetRect)
3965
d14a1e28
RD
3966
3967class MoveEventPtr(MoveEvent):
3968 def __init__(self, this):
3969 self.this = this
3970 if not hasattr(self,"thisown"): self.thisown = 0
3971 self.__class__ = MoveEvent
54f9ee45 3972_core_.MoveEvent_swigregister(MoveEventPtr)
d14a1e28
RD
3973
3974#---------------------------------------------------------------------------
3975
3976class PaintEvent(Event):
093d3ff1 3977 """Proxy of C++ PaintEvent class"""
e811c8ce
RD
3978 def __repr__(self):
3979 return "<%s.%s; proxy of C++ wxPaintEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 3980 def __init__(self, *args, **kwargs):
a95a7133 3981 """__init__(self, int Id=0) -> PaintEvent"""
54f9ee45 3982 newobj = _core_.new_PaintEvent(*args, **kwargs)
d14a1e28
RD
3983 self.this = newobj.this
3984 self.thisown = 1
3985 del newobj.thisown
d14a1e28
RD
3986
3987class PaintEventPtr(PaintEvent):
3988 def __init__(self, this):
3989 self.this = this
3990 if not hasattr(self,"thisown"): self.thisown = 0
3991 self.__class__ = PaintEvent
54f9ee45 3992_core_.PaintEvent_swigregister(PaintEventPtr)
d14a1e28
RD
3993
3994class NcPaintEvent(Event):
093d3ff1 3995 """Proxy of C++ NcPaintEvent class"""
e811c8ce
RD
3996 def __repr__(self):
3997 return "<%s.%s; proxy of C++ wxNcPaintEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 3998 def __init__(self, *args, **kwargs):
a95a7133 3999 """__init__(self, int winid=0) -> NcPaintEvent"""
54f9ee45 4000 newobj = _core_.new_NcPaintEvent(*args, **kwargs)
d14a1e28
RD
4001 self.this = newobj.this
4002 self.thisown = 1
4003 del newobj.thisown
d14a1e28
RD
4004
4005class NcPaintEventPtr(NcPaintEvent):
4006 def __init__(self, this):
4007 self.this = this
4008 if not hasattr(self,"thisown"): self.thisown = 0
4009 self.__class__ = NcPaintEvent
54f9ee45 4010_core_.NcPaintEvent_swigregister(NcPaintEventPtr)
d14a1e28
RD
4011
4012#---------------------------------------------------------------------------
4013
4014class EraseEvent(Event):
093d3ff1 4015 """Proxy of C++ EraseEvent class"""
e811c8ce
RD
4016 def __repr__(self):
4017 return "<%s.%s; proxy of C++ wxEraseEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 4018 def __init__(self, *args, **kwargs):
a95a7133 4019 """__init__(self, int Id=0, DC dc=(wxDC *) NULL) -> EraseEvent"""
54f9ee45 4020 newobj = _core_.new_EraseEvent(*args, **kwargs)
d14a1e28
RD
4021 self.this = newobj.this
4022 self.thisown = 1
4023 del newobj.thisown
e811c8ce 4024 def GetDC(*args, **kwargs):
a95a7133 4025 """GetDC(self) -> DC"""
54f9ee45 4026 return _core_.EraseEvent_GetDC(*args, **kwargs)
e811c8ce 4027
d14a1e28
RD
4028
4029class EraseEventPtr(EraseEvent):
4030 def __init__(self, this):
4031 self.this = this
4032 if not hasattr(self,"thisown"): self.thisown = 0
4033 self.__class__ = EraseEvent
54f9ee45 4034_core_.EraseEvent_swigregister(EraseEventPtr)
d14a1e28
RD
4035
4036#---------------------------------------------------------------------------
4037
4038class FocusEvent(Event):
093d3ff1 4039 """Proxy of C++ FocusEvent class"""
e811c8ce
RD
4040 def __repr__(self):
4041 return "<%s.%s; proxy of C++ wxFocusEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 4042 def __init__(self, *args, **kwargs):
a95a7133 4043 """__init__(self, wxEventType type=wxEVT_NULL, int winid=0) -> FocusEvent"""
54f9ee45 4044 newobj = _core_.new_FocusEvent(*args, **kwargs)
d14a1e28
RD
4045 self.this = newobj.this
4046 self.thisown = 1
4047 del newobj.thisown
e811c8ce 4048 def GetWindow(*args, **kwargs):
a95a7133 4049 """GetWindow(self) -> Window"""
54f9ee45 4050 return _core_.FocusEvent_GetWindow(*args, **kwargs)
e811c8ce
RD
4051
4052 def SetWindow(*args, **kwargs):
a95a7133 4053 """SetWindow(self, Window win)"""
54f9ee45 4054 return _core_.FocusEvent_SetWindow(*args, **kwargs)
e811c8ce 4055
d14a1e28
RD
4056
4057class FocusEventPtr(FocusEvent):
4058 def __init__(self, this):
4059 self.this = this
4060 if not hasattr(self,"thisown"): self.thisown = 0
4061 self.__class__ = FocusEvent
54f9ee45 4062_core_.FocusEvent_swigregister(FocusEventPtr)
d14a1e28
RD
4063
4064#---------------------------------------------------------------------------
4065
4066class ChildFocusEvent(CommandEvent):
093d3ff1 4067 """Proxy of C++ ChildFocusEvent class"""
e811c8ce
RD
4068 def __repr__(self):
4069 return "<%s.%s; proxy of C++ wxChildFocusEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 4070 def __init__(self, *args, **kwargs):
a95a7133 4071 """__init__(self, Window win=None) -> ChildFocusEvent"""
54f9ee45 4072 newobj = _core_.new_ChildFocusEvent(*args, **kwargs)
d14a1e28
RD
4073 self.this = newobj.this
4074 self.thisown = 1
4075 del newobj.thisown
e811c8ce 4076 def GetWindow(*args, **kwargs):
a95a7133 4077 """GetWindow(self) -> Window"""
54f9ee45 4078 return _core_.ChildFocusEvent_GetWindow(*args, **kwargs)
e811c8ce 4079
d14a1e28
RD
4080
4081class ChildFocusEventPtr(ChildFocusEvent):
4082 def __init__(self, this):
4083 self.this = this
4084 if not hasattr(self,"thisown"): self.thisown = 0
4085 self.__class__ = ChildFocusEvent
54f9ee45 4086_core_.ChildFocusEvent_swigregister(ChildFocusEventPtr)
d14a1e28
RD
4087
4088#---------------------------------------------------------------------------
4089
4090class ActivateEvent(Event):
093d3ff1 4091 """Proxy of C++ ActivateEvent class"""
e811c8ce
RD
4092 def __repr__(self):
4093 return "<%s.%s; proxy of C++ wxActivateEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 4094 def __init__(self, *args, **kwargs):
a95a7133 4095 """__init__(self, wxEventType type=wxEVT_NULL, bool active=True, int Id=0) -> ActivateEvent"""
54f9ee45 4096 newobj = _core_.new_ActivateEvent(*args, **kwargs)
d14a1e28
RD
4097 self.this = newobj.this
4098 self.thisown = 1
4099 del newobj.thisown
e811c8ce 4100 def GetActive(*args, **kwargs):
a95a7133 4101 """GetActive(self) -> bool"""
54f9ee45 4102 return _core_.ActivateEvent_GetActive(*args, **kwargs)
e811c8ce 4103
d14a1e28
RD
4104
4105class ActivateEventPtr(ActivateEvent):
4106 def __init__(self, this):
4107 self.this = this
4108 if not hasattr(self,"thisown"): self.thisown = 0
4109 self.__class__ = ActivateEvent
54f9ee45 4110_core_.ActivateEvent_swigregister(ActivateEventPtr)
d14a1e28
RD
4111
4112#---------------------------------------------------------------------------
4113
4114class InitDialogEvent(Event):
093d3ff1 4115 """Proxy of C++ InitDialogEvent class"""
e811c8ce
RD
4116 def __repr__(self):
4117 return "<%s.%s; proxy of C++ wxInitDialogEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 4118 def __init__(self, *args, **kwargs):
a95a7133 4119 """__init__(self, int Id=0) -> InitDialogEvent"""
54f9ee45 4120 newobj = _core_.new_InitDialogEvent(*args, **kwargs)
d14a1e28
RD
4121 self.this = newobj.this
4122 self.thisown = 1
4123 del newobj.thisown
d14a1e28
RD
4124
4125class InitDialogEventPtr(InitDialogEvent):
4126 def __init__(self, this):
4127 self.this = this
4128 if not hasattr(self,"thisown"): self.thisown = 0
4129 self.__class__ = InitDialogEvent
54f9ee45 4130_core_.InitDialogEvent_swigregister(InitDialogEventPtr)
d14a1e28
RD
4131
4132#---------------------------------------------------------------------------
4133
4134class MenuEvent(Event):
093d3ff1 4135 """Proxy of C++ MenuEvent class"""
e811c8ce
RD
4136 def __repr__(self):
4137 return "<%s.%s; proxy of C++ wxMenuEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 4138 def __init__(self, *args, **kwargs):
a95a7133 4139 """__init__(self, wxEventType type=wxEVT_NULL, int winid=0, Menu menu=None) -> MenuEvent"""
54f9ee45 4140 newobj = _core_.new_MenuEvent(*args, **kwargs)
d14a1e28
RD
4141 self.this = newobj.this
4142 self.thisown = 1
4143 del newobj.thisown
e811c8ce 4144 def GetMenuId(*args, **kwargs):
a95a7133 4145 """GetMenuId(self) -> int"""
54f9ee45 4146 return _core_.MenuEvent_GetMenuId(*args, **kwargs)
e811c8ce
RD
4147
4148 def IsPopup(*args, **kwargs):
a95a7133 4149 """IsPopup(self) -> bool"""
54f9ee45 4150 return _core_.MenuEvent_IsPopup(*args, **kwargs)
e811c8ce
RD
4151
4152 def GetMenu(*args, **kwargs):
a95a7133 4153 """GetMenu(self) -> Menu"""
54f9ee45 4154 return _core_.MenuEvent_GetMenu(*args, **kwargs)
e811c8ce 4155
d14a1e28
RD
4156
4157class MenuEventPtr(MenuEvent):
4158 def __init__(self, this):
4159 self.this = this
4160 if not hasattr(self,"thisown"): self.thisown = 0
4161 self.__class__ = MenuEvent
54f9ee45 4162_core_.MenuEvent_swigregister(MenuEventPtr)
d14a1e28
RD
4163
4164#---------------------------------------------------------------------------
4165
4166class CloseEvent(Event):
093d3ff1 4167 """Proxy of C++ CloseEvent class"""
e811c8ce
RD
4168 def __repr__(self):
4169 return "<%s.%s; proxy of C++ wxCloseEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 4170 def __init__(self, *args, **kwargs):
a95a7133 4171 """__init__(self, wxEventType type=wxEVT_NULL, int winid=0) -> CloseEvent"""
54f9ee45 4172 newobj = _core_.new_CloseEvent(*args, **kwargs)
d14a1e28
RD
4173 self.this = newobj.this
4174 self.thisown = 1
4175 del newobj.thisown
e811c8ce 4176 def SetLoggingOff(*args, **kwargs):
a95a7133 4177 """SetLoggingOff(self, bool logOff)"""
54f9ee45 4178 return _core_.CloseEvent_SetLoggingOff(*args, **kwargs)
e811c8ce
RD
4179
4180 def GetLoggingOff(*args, **kwargs):
a95a7133 4181 """GetLoggingOff(self) -> bool"""
54f9ee45 4182 return _core_.CloseEvent_GetLoggingOff(*args, **kwargs)
e811c8ce
RD
4183
4184 def Veto(*args, **kwargs):
a95a7133 4185 """Veto(self, bool veto=True)"""
54f9ee45 4186 return _core_.CloseEvent_Veto(*args, **kwargs)
e811c8ce
RD
4187
4188 def SetCanVeto(*args, **kwargs):
a95a7133 4189 """SetCanVeto(self, bool canVeto)"""
54f9ee45 4190 return _core_.CloseEvent_SetCanVeto(*args, **kwargs)
e811c8ce
RD
4191
4192 def CanVeto(*args, **kwargs):
a95a7133 4193 """CanVeto(self) -> bool"""
54f9ee45 4194 return _core_.CloseEvent_CanVeto(*args, **kwargs)
e811c8ce
RD
4195
4196 def GetVeto(*args, **kwargs):
a95a7133 4197 """GetVeto(self) -> bool"""
54f9ee45 4198 return _core_.CloseEvent_GetVeto(*args, **kwargs)
e811c8ce 4199
d14a1e28
RD
4200
4201class CloseEventPtr(CloseEvent):
4202 def __init__(self, this):
4203 self.this = this
4204 if not hasattr(self,"thisown"): self.thisown = 0
4205 self.__class__ = CloseEvent
54f9ee45 4206_core_.CloseEvent_swigregister(CloseEventPtr)
d14a1e28
RD
4207
4208#---------------------------------------------------------------------------
4209
4210class ShowEvent(Event):
093d3ff1 4211 """Proxy of C++ ShowEvent class"""
e811c8ce
RD
4212 def __repr__(self):
4213 return "<%s.%s; proxy of C++ wxShowEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 4214 def __init__(self, *args, **kwargs):
a95a7133 4215 """__init__(self, int winid=0, bool show=False) -> ShowEvent"""
54f9ee45 4216 newobj = _core_.new_ShowEvent(*args, **kwargs)
d14a1e28
RD
4217 self.this = newobj.this
4218 self.thisown = 1
4219 del newobj.thisown
e811c8ce 4220 def SetShow(*args, **kwargs):
a95a7133 4221 """SetShow(self, bool show)"""
54f9ee45 4222 return _core_.ShowEvent_SetShow(*args, **kwargs)
e811c8ce
RD
4223
4224 def GetShow(*args, **kwargs):
a95a7133 4225 """GetShow(self) -> bool"""
54f9ee45 4226 return _core_.ShowEvent_GetShow(*args, **kwargs)
e811c8ce 4227
d14a1e28
RD
4228
4229class ShowEventPtr(ShowEvent):
4230 def __init__(self, this):
4231 self.this = this
4232 if not hasattr(self,"thisown"): self.thisown = 0
4233 self.__class__ = ShowEvent
54f9ee45 4234_core_.ShowEvent_swigregister(ShowEventPtr)
d14a1e28
RD
4235
4236#---------------------------------------------------------------------------
4237
4238class IconizeEvent(Event):
093d3ff1 4239 """Proxy of C++ IconizeEvent class"""
e811c8ce
RD
4240 def __repr__(self):
4241 return "<%s.%s; proxy of C++ wxIconizeEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 4242 def __init__(self, *args, **kwargs):
a95a7133 4243 """__init__(self, int id=0, bool iconized=True) -> IconizeEvent"""
54f9ee45 4244 newobj = _core_.new_IconizeEvent(*args, **kwargs)
d14a1e28
RD
4245 self.this = newobj.this
4246 self.thisown = 1
4247 del newobj.thisown
e811c8ce 4248 def Iconized(*args, **kwargs):
a95a7133 4249 """Iconized(self) -> bool"""
54f9ee45 4250 return _core_.IconizeEvent_Iconized(*args, **kwargs)
e811c8ce 4251
d14a1e28
RD
4252
4253class IconizeEventPtr(IconizeEvent):
4254 def __init__(self, this):
4255 self.this = this
4256 if not hasattr(self,"thisown"): self.thisown = 0
4257 self.__class__ = IconizeEvent
54f9ee45 4258_core_.IconizeEvent_swigregister(IconizeEventPtr)
d14a1e28
RD
4259
4260#---------------------------------------------------------------------------
4261
4262class MaximizeEvent(Event):
093d3ff1 4263 """Proxy of C++ MaximizeEvent class"""
e811c8ce
RD
4264 def __repr__(self):
4265 return "<%s.%s; proxy of C++ wxMaximizeEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 4266 def __init__(self, *args, **kwargs):
a95a7133 4267 """__init__(self, int id=0) -> MaximizeEvent"""
54f9ee45 4268 newobj = _core_.new_MaximizeEvent(*args, **kwargs)
d14a1e28
RD
4269 self.this = newobj.this
4270 self.thisown = 1
4271 del newobj.thisown
d14a1e28
RD
4272
4273class MaximizeEventPtr(MaximizeEvent):
4274 def __init__(self, this):
4275 self.this = this
4276 if not hasattr(self,"thisown"): self.thisown = 0
4277 self.__class__ = MaximizeEvent
54f9ee45 4278_core_.MaximizeEvent_swigregister(MaximizeEventPtr)
d14a1e28
RD
4279
4280#---------------------------------------------------------------------------
4281
4282class DropFilesEvent(Event):
093d3ff1 4283 """Proxy of C++ DropFilesEvent class"""
d14a1e28
RD
4284 def __init__(self): raise RuntimeError, "No constructor defined"
4285 def __repr__(self):
4286 return "<%s.%s; proxy of C++ wxDropFilesEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
e811c8ce 4287 def GetPosition(*args, **kwargs):
a95a7133 4288 """GetPosition(self) -> Point"""
54f9ee45 4289 return _core_.DropFilesEvent_GetPosition(*args, **kwargs)
e811c8ce
RD
4290
4291 def GetNumberOfFiles(*args, **kwargs):
a95a7133 4292 """GetNumberOfFiles(self) -> int"""
54f9ee45 4293 return _core_.DropFilesEvent_GetNumberOfFiles(*args, **kwargs)
e811c8ce
RD
4294
4295 def GetFiles(*args, **kwargs):
a95a7133 4296 """GetFiles(self) -> PyObject"""
54f9ee45 4297 return _core_.DropFilesEvent_GetFiles(*args, **kwargs)
e811c8ce 4298
d14a1e28
RD
4299
4300class DropFilesEventPtr(DropFilesEvent):
4301 def __init__(self, this):
4302 self.this = this
4303 if not hasattr(self,"thisown"): self.thisown = 0
4304 self.__class__ = DropFilesEvent
54f9ee45 4305_core_.DropFilesEvent_swigregister(DropFilesEventPtr)
d14a1e28
RD
4306
4307#---------------------------------------------------------------------------
4308
54f9ee45
RD
4309UPDATE_UI_PROCESS_ALL = _core_.UPDATE_UI_PROCESS_ALL
4310UPDATE_UI_PROCESS_SPECIFIED = _core_.UPDATE_UI_PROCESS_SPECIFIED
d14a1e28 4311class UpdateUIEvent(CommandEvent):
093d3ff1 4312 """Proxy of C++ UpdateUIEvent class"""
e811c8ce
RD
4313 def __repr__(self):
4314 return "<%s.%s; proxy of C++ wxUpdateUIEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 4315 def __init__(self, *args, **kwargs):
a95a7133 4316 """__init__(self, int commandId=0) -> UpdateUIEvent"""
54f9ee45 4317 newobj = _core_.new_UpdateUIEvent(*args, **kwargs)
d14a1e28
RD
4318 self.this = newobj.this
4319 self.thisown = 1
4320 del newobj.thisown
e811c8ce 4321 def GetChecked(*args, **kwargs):
a95a7133 4322 """GetChecked(self) -> bool"""
54f9ee45 4323 return _core_.UpdateUIEvent_GetChecked(*args, **kwargs)
e811c8ce
RD
4324
4325 def GetEnabled(*args, **kwargs):
a95a7133 4326 """GetEnabled(self) -> bool"""
54f9ee45 4327 return _core_.UpdateUIEvent_GetEnabled(*args, **kwargs)
e811c8ce
RD
4328
4329 def GetText(*args, **kwargs):
a95a7133 4330 """GetText(self) -> String"""
54f9ee45 4331 return _core_.UpdateUIEvent_GetText(*args, **kwargs)
e811c8ce
RD
4332
4333 def GetSetText(*args, **kwargs):
a95a7133 4334 """GetSetText(self) -> bool"""
54f9ee45 4335 return _core_.UpdateUIEvent_GetSetText(*args, **kwargs)
e811c8ce
RD
4336
4337 def GetSetChecked(*args, **kwargs):
a95a7133 4338 """GetSetChecked(self) -> bool"""
54f9ee45 4339 return _core_.UpdateUIEvent_GetSetChecked(*args, **kwargs)
e811c8ce
RD
4340
4341 def GetSetEnabled(*args, **kwargs):
a95a7133 4342 """GetSetEnabled(self) -> bool"""
54f9ee45 4343 return _core_.UpdateUIEvent_GetSetEnabled(*args, **kwargs)
e811c8ce
RD
4344
4345 def Check(*args, **kwargs):
a95a7133 4346 """Check(self, bool check)"""
54f9ee45 4347 return _core_.UpdateUIEvent_Check(*args, **kwargs)
e811c8ce
RD
4348
4349 def Enable(*args, **kwargs):
a95a7133 4350 """Enable(self, bool enable)"""
54f9ee45 4351 return _core_.UpdateUIEvent_Enable(*args, **kwargs)
e811c8ce
RD
4352
4353 def SetText(*args, **kwargs):
a95a7133 4354 """SetText(self, String text)"""
54f9ee45 4355 return _core_.UpdateUIEvent_SetText(*args, **kwargs)
e811c8ce
RD
4356
4357 def SetUpdateInterval(*args, **kwargs):
66c033b4 4358 """SetUpdateInterval(long updateInterval)"""
54f9ee45 4359 return _core_.UpdateUIEvent_SetUpdateInterval(*args, **kwargs)
e811c8ce
RD
4360
4361 SetUpdateInterval = staticmethod(SetUpdateInterval)
4362 def GetUpdateInterval(*args, **kwargs):
66c033b4 4363 """GetUpdateInterval() -> long"""
54f9ee45 4364 return _core_.UpdateUIEvent_GetUpdateInterval(*args, **kwargs)
e811c8ce
RD
4365
4366 GetUpdateInterval = staticmethod(GetUpdateInterval)
4367 def CanUpdate(*args, **kwargs):
66c033b4 4368 """CanUpdate(Window win) -> bool"""
54f9ee45 4369 return _core_.UpdateUIEvent_CanUpdate(*args, **kwargs)
e811c8ce
RD
4370
4371 CanUpdate = staticmethod(CanUpdate)
4372 def ResetUpdateTime(*args, **kwargs):
66c033b4 4373 """ResetUpdateTime()"""
54f9ee45 4374 return _core_.UpdateUIEvent_ResetUpdateTime(*args, **kwargs)
e811c8ce
RD
4375
4376 ResetUpdateTime = staticmethod(ResetUpdateTime)
4377 def SetMode(*args, **kwargs):
66c033b4 4378 """SetMode(int mode)"""
54f9ee45 4379 return _core_.UpdateUIEvent_SetMode(*args, **kwargs)
e811c8ce
RD
4380
4381 SetMode = staticmethod(SetMode)
4382 def GetMode(*args, **kwargs):
66c033b4 4383 """GetMode() -> int"""
54f9ee45 4384 return _core_.UpdateUIEvent_GetMode(*args, **kwargs)
e811c8ce
RD
4385
4386 GetMode = staticmethod(GetMode)
d14a1e28
RD
4387
4388class UpdateUIEventPtr(UpdateUIEvent):
4389 def __init__(self, this):
4390 self.this = this
4391 if not hasattr(self,"thisown"): self.thisown = 0
4392 self.__class__ = UpdateUIEvent
54f9ee45 4393_core_.UpdateUIEvent_swigregister(UpdateUIEventPtr)
d14a1e28 4394
e811c8ce
RD
4395def UpdateUIEvent_SetUpdateInterval(*args, **kwargs):
4396 """UpdateUIEvent_SetUpdateInterval(long updateInterval)"""
54f9ee45 4397 return _core_.UpdateUIEvent_SetUpdateInterval(*args, **kwargs)
d14a1e28 4398
e811c8ce
RD
4399def UpdateUIEvent_GetUpdateInterval(*args, **kwargs):
4400 """UpdateUIEvent_GetUpdateInterval() -> long"""
54f9ee45 4401 return _core_.UpdateUIEvent_GetUpdateInterval(*args, **kwargs)
d14a1e28 4402
e811c8ce
RD
4403def UpdateUIEvent_CanUpdate(*args, **kwargs):
4404 """UpdateUIEvent_CanUpdate(Window win) -> bool"""
54f9ee45 4405 return _core_.UpdateUIEvent_CanUpdate(*args, **kwargs)
d14a1e28 4406
e811c8ce
RD
4407def UpdateUIEvent_ResetUpdateTime(*args, **kwargs):
4408 """UpdateUIEvent_ResetUpdateTime()"""
54f9ee45 4409 return _core_.UpdateUIEvent_ResetUpdateTime(*args, **kwargs)
d14a1e28 4410
e811c8ce 4411def UpdateUIEvent_SetMode(*args, **kwargs):
196addbf 4412 """UpdateUIEvent_SetMode(int mode)"""
54f9ee45 4413 return _core_.UpdateUIEvent_SetMode(*args, **kwargs)
d14a1e28 4414
e811c8ce 4415def UpdateUIEvent_GetMode(*args, **kwargs):
196addbf 4416 """UpdateUIEvent_GetMode() -> int"""
54f9ee45 4417 return _core_.UpdateUIEvent_GetMode(*args, **kwargs)
d14a1e28
RD
4418
4419#---------------------------------------------------------------------------
4420
4421class SysColourChangedEvent(Event):
093d3ff1 4422 """Proxy of C++ SysColourChangedEvent class"""
e811c8ce
RD
4423 def __repr__(self):
4424 return "<%s.%s; proxy of C++ wxSysColourChangedEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 4425 def __init__(self, *args, **kwargs):
a95a7133 4426 """__init__(self) -> SysColourChangedEvent"""
54f9ee45 4427 newobj = _core_.new_SysColourChangedEvent(*args, **kwargs)
d14a1e28
RD
4428 self.this = newobj.this
4429 self.thisown = 1
4430 del newobj.thisown
d14a1e28
RD
4431
4432class SysColourChangedEventPtr(SysColourChangedEvent):
4433 def __init__(self, this):
4434 self.this = this
4435 if not hasattr(self,"thisown"): self.thisown = 0
4436 self.__class__ = SysColourChangedEvent
54f9ee45 4437_core_.SysColourChangedEvent_swigregister(SysColourChangedEventPtr)
d14a1e28
RD
4438
4439#---------------------------------------------------------------------------
4440
4441class MouseCaptureChangedEvent(Event):
093d3ff1 4442 """Proxy of C++ MouseCaptureChangedEvent class"""
e811c8ce
RD
4443 def __repr__(self):
4444 return "<%s.%s; proxy of C++ wxMouseCaptureChangedEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 4445 def __init__(self, *args, **kwargs):
a95a7133 4446 """__init__(self, int winid=0, Window gainedCapture=None) -> MouseCaptureChangedEvent"""
54f9ee45 4447 newobj = _core_.new_MouseCaptureChangedEvent(*args, **kwargs)
d14a1e28
RD
4448 self.this = newobj.this
4449 self.thisown = 1
4450 del newobj.thisown
e811c8ce 4451 def GetCapturedWindow(*args, **kwargs):
a95a7133 4452 """GetCapturedWindow(self) -> Window"""
54f9ee45 4453 return _core_.MouseCaptureChangedEvent_GetCapturedWindow(*args, **kwargs)
e811c8ce 4454
d14a1e28
RD
4455
4456class MouseCaptureChangedEventPtr(MouseCaptureChangedEvent):
4457 def __init__(self, this):
4458 self.this = this
4459 if not hasattr(self,"thisown"): self.thisown = 0
4460 self.__class__ = MouseCaptureChangedEvent
54f9ee45 4461_core_.MouseCaptureChangedEvent_swigregister(MouseCaptureChangedEventPtr)
d14a1e28
RD
4462
4463#---------------------------------------------------------------------------
4464
4465class DisplayChangedEvent(Event):
093d3ff1 4466 """Proxy of C++ DisplayChangedEvent class"""
e811c8ce
RD
4467 def __repr__(self):
4468 return "<%s.%s; proxy of C++ wxDisplayChangedEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 4469 def __init__(self, *args, **kwargs):
a95a7133 4470 """__init__(self) -> DisplayChangedEvent"""
54f9ee45 4471 newobj = _core_.new_DisplayChangedEvent(*args, **kwargs)
d14a1e28
RD
4472 self.this = newobj.this
4473 self.thisown = 1
4474 del newobj.thisown
d14a1e28
RD
4475
4476class DisplayChangedEventPtr(DisplayChangedEvent):
4477 def __init__(self, this):
4478 self.this = this
4479 if not hasattr(self,"thisown"): self.thisown = 0
4480 self.__class__ = DisplayChangedEvent
54f9ee45 4481_core_.DisplayChangedEvent_swigregister(DisplayChangedEventPtr)
d14a1e28
RD
4482
4483#---------------------------------------------------------------------------
4484
4485class PaletteChangedEvent(Event):
093d3ff1 4486 """Proxy of C++ PaletteChangedEvent class"""
e811c8ce
RD
4487 def __repr__(self):
4488 return "<%s.%s; proxy of C++ wxPaletteChangedEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 4489 def __init__(self, *args, **kwargs):
a95a7133 4490 """__init__(self, int id=0) -> PaletteChangedEvent"""
54f9ee45 4491 newobj = _core_.new_PaletteChangedEvent(*args, **kwargs)
d14a1e28
RD
4492 self.this = newobj.this
4493 self.thisown = 1
4494 del newobj.thisown
e811c8ce 4495 def SetChangedWindow(*args, **kwargs):
a95a7133 4496 """SetChangedWindow(self, Window win)"""
54f9ee45 4497 return _core_.PaletteChangedEvent_SetChangedWindow(*args, **kwargs)
e811c8ce
RD
4498
4499 def GetChangedWindow(*args, **kwargs):
a95a7133 4500 """GetChangedWindow(self) -> Window"""
54f9ee45 4501 return _core_.PaletteChangedEvent_GetChangedWindow(*args, **kwargs)
e811c8ce 4502
d14a1e28
RD
4503
4504class PaletteChangedEventPtr(PaletteChangedEvent):
4505 def __init__(self, this):
4506 self.this = this
4507 if not hasattr(self,"thisown"): self.thisown = 0
4508 self.__class__ = PaletteChangedEvent
54f9ee45 4509_core_.PaletteChangedEvent_swigregister(PaletteChangedEventPtr)
d14a1e28
RD
4510
4511#---------------------------------------------------------------------------
4512
4513class QueryNewPaletteEvent(Event):
093d3ff1 4514 """Proxy of C++ QueryNewPaletteEvent class"""
e811c8ce
RD
4515 def __repr__(self):
4516 return "<%s.%s; proxy of C++ wxQueryNewPaletteEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 4517 def __init__(self, *args, **kwargs):
a95a7133 4518 """__init__(self, int winid=0) -> QueryNewPaletteEvent"""
54f9ee45 4519 newobj = _core_.new_QueryNewPaletteEvent(*args, **kwargs)
d14a1e28
RD
4520 self.this = newobj.this
4521 self.thisown = 1
4522 del newobj.thisown
e811c8ce 4523 def SetPaletteRealized(*args, **kwargs):
a95a7133 4524 """SetPaletteRealized(self, bool realized)"""
54f9ee45 4525 return _core_.QueryNewPaletteEvent_SetPaletteRealized(*args, **kwargs)
e811c8ce
RD
4526
4527 def GetPaletteRealized(*args, **kwargs):
a95a7133 4528 """GetPaletteRealized(self) -> bool"""
54f9ee45 4529 return _core_.QueryNewPaletteEvent_GetPaletteRealized(*args, **kwargs)
e811c8ce 4530
d14a1e28
RD
4531
4532class QueryNewPaletteEventPtr(QueryNewPaletteEvent):
4533 def __init__(self, this):
4534 self.this = this
4535 if not hasattr(self,"thisown"): self.thisown = 0
4536 self.__class__ = QueryNewPaletteEvent
54f9ee45 4537_core_.QueryNewPaletteEvent_swigregister(QueryNewPaletteEventPtr)
d14a1e28
RD
4538
4539#---------------------------------------------------------------------------
4540
4541class NavigationKeyEvent(Event):
093d3ff1 4542 """Proxy of C++ NavigationKeyEvent class"""
e811c8ce
RD
4543 def __repr__(self):
4544 return "<%s.%s; proxy of C++ wxNavigationKeyEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 4545 def __init__(self, *args, **kwargs):
a95a7133 4546 """__init__(self) -> NavigationKeyEvent"""
54f9ee45 4547 newobj = _core_.new_NavigationKeyEvent(*args, **kwargs)
d14a1e28
RD
4548 self.this = newobj.this
4549 self.thisown = 1
4550 del newobj.thisown
e811c8ce 4551 def GetDirection(*args, **kwargs):
a95a7133 4552 """GetDirection(self) -> bool"""
54f9ee45 4553 return _core_.NavigationKeyEvent_GetDirection(*args, **kwargs)
e811c8ce
RD
4554
4555 def SetDirection(*args, **kwargs):
908b74cd 4556 """SetDirection(self, bool forward)"""
54f9ee45 4557 return _core_.NavigationKeyEvent_SetDirection(*args, **kwargs)
e811c8ce
RD
4558
4559 def IsWindowChange(*args, **kwargs):
a95a7133 4560 """IsWindowChange(self) -> bool"""
54f9ee45 4561 return _core_.NavigationKeyEvent_IsWindowChange(*args, **kwargs)
e811c8ce
RD
4562
4563 def SetWindowChange(*args, **kwargs):
908b74cd 4564 """SetWindowChange(self, bool ischange)"""
54f9ee45 4565 return _core_.NavigationKeyEvent_SetWindowChange(*args, **kwargs)
e811c8ce 4566
908b74cd
RD
4567 def SetFlags(*args, **kwargs):
4568 """SetFlags(self, long flags)"""
4569 return _core_.NavigationKeyEvent_SetFlags(*args, **kwargs)
4570
e811c8ce 4571 def GetCurrentFocus(*args, **kwargs):
a95a7133 4572 """GetCurrentFocus(self) -> Window"""
54f9ee45 4573 return _core_.NavigationKeyEvent_GetCurrentFocus(*args, **kwargs)
e811c8ce
RD
4574
4575 def SetCurrentFocus(*args, **kwargs):
a95a7133 4576 """SetCurrentFocus(self, Window win)"""
54f9ee45 4577 return _core_.NavigationKeyEvent_SetCurrentFocus(*args, **kwargs)
e811c8ce 4578
b0f7404b 4579 IsBackward = _core_.NavigationKeyEvent_IsBackward
908b74cd
RD
4580 IsForward = _core_.NavigationKeyEvent_IsForward
4581 WinChange = _core_.NavigationKeyEvent_WinChange
d14a1e28
RD
4582
4583class NavigationKeyEventPtr(NavigationKeyEvent):
4584 def __init__(self, this):
4585 self.this = this
4586 if not hasattr(self,"thisown"): self.thisown = 0
4587 self.__class__ = NavigationKeyEvent
54f9ee45 4588_core_.NavigationKeyEvent_swigregister(NavigationKeyEventPtr)
d14a1e28
RD
4589
4590#---------------------------------------------------------------------------
4591
4592class WindowCreateEvent(CommandEvent):
093d3ff1 4593 """Proxy of C++ WindowCreateEvent class"""
e811c8ce
RD
4594 def __repr__(self):
4595 return "<%s.%s; proxy of C++ wxWindowCreateEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 4596 def __init__(self, *args, **kwargs):
a95a7133 4597 """__init__(self, Window win=None) -> WindowCreateEvent"""
54f9ee45 4598 newobj = _core_.new_WindowCreateEvent(*args, **kwargs)
d14a1e28
RD
4599 self.this = newobj.this
4600 self.thisown = 1
4601 del newobj.thisown
e811c8ce 4602 def GetWindow(*args, **kwargs):
a95a7133 4603 """GetWindow(self) -> Window"""
54f9ee45 4604 return _core_.WindowCreateEvent_GetWindow(*args, **kwargs)
e811c8ce 4605
d14a1e28
RD
4606
4607class WindowCreateEventPtr(WindowCreateEvent):
4608 def __init__(self, this):
4609 self.this = this
4610 if not hasattr(self,"thisown"): self.thisown = 0
4611 self.__class__ = WindowCreateEvent
54f9ee45 4612_core_.WindowCreateEvent_swigregister(WindowCreateEventPtr)
d14a1e28
RD
4613
4614class WindowDestroyEvent(CommandEvent):
093d3ff1 4615 """Proxy of C++ WindowDestroyEvent class"""
e811c8ce
RD
4616 def __repr__(self):
4617 return "<%s.%s; proxy of C++ wxWindowDestroyEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 4618 def __init__(self, *args, **kwargs):
a95a7133 4619 """__init__(self, Window win=None) -> WindowDestroyEvent"""
54f9ee45 4620 newobj = _core_.new_WindowDestroyEvent(*args, **kwargs)
d14a1e28
RD
4621 self.this = newobj.this
4622 self.thisown = 1
4623 del newobj.thisown
e811c8ce 4624 def GetWindow(*args, **kwargs):
a95a7133 4625 """GetWindow(self) -> Window"""
54f9ee45 4626 return _core_.WindowDestroyEvent_GetWindow(*args, **kwargs)
e811c8ce 4627
d14a1e28
RD
4628
4629class WindowDestroyEventPtr(WindowDestroyEvent):
4630 def __init__(self, this):
4631 self.this = this
4632 if not hasattr(self,"thisown"): self.thisown = 0
4633 self.__class__ = WindowDestroyEvent
54f9ee45 4634_core_.WindowDestroyEvent_swigregister(WindowDestroyEventPtr)
d14a1e28
RD
4635
4636#---------------------------------------------------------------------------
4637
4638class ContextMenuEvent(CommandEvent):
093d3ff1 4639 """Proxy of C++ ContextMenuEvent class"""
e811c8ce
RD
4640 def __repr__(self):
4641 return "<%s.%s; proxy of C++ wxContextMenuEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 4642 def __init__(self, *args, **kwargs):
a95a7133 4643 """__init__(self, wxEventType type=wxEVT_NULL, int winid=0, Point pt=DefaultPosition) -> ContextMenuEvent"""
54f9ee45 4644 newobj = _core_.new_ContextMenuEvent(*args, **kwargs)
d14a1e28
RD
4645 self.this = newobj.this
4646 self.thisown = 1
4647 del newobj.thisown
e811c8ce 4648 def GetPosition(*args, **kwargs):
a95a7133 4649 """GetPosition(self) -> Point"""
54f9ee45 4650 return _core_.ContextMenuEvent_GetPosition(*args, **kwargs)
e811c8ce
RD
4651
4652 def SetPosition(*args, **kwargs):
a95a7133 4653 """SetPosition(self, Point pos)"""
54f9ee45 4654 return _core_.ContextMenuEvent_SetPosition(*args, **kwargs)
e811c8ce 4655
d14a1e28
RD
4656
4657class ContextMenuEventPtr(ContextMenuEvent):
4658 def __init__(self, this):
4659 self.this = this
4660 if not hasattr(self,"thisown"): self.thisown = 0
4661 self.__class__ = ContextMenuEvent
54f9ee45 4662_core_.ContextMenuEvent_swigregister(ContextMenuEventPtr)
d14a1e28
RD
4663
4664#---------------------------------------------------------------------------
4665
54f9ee45
RD
4666IDLE_PROCESS_ALL = _core_.IDLE_PROCESS_ALL
4667IDLE_PROCESS_SPECIFIED = _core_.IDLE_PROCESS_SPECIFIED
d14a1e28 4668class IdleEvent(Event):
093d3ff1 4669 """Proxy of C++ IdleEvent class"""
e811c8ce
RD
4670 def __repr__(self):
4671 return "<%s.%s; proxy of C++ wxIdleEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 4672 def __init__(self, *args, **kwargs):
a95a7133 4673 """__init__(self) -> IdleEvent"""
54f9ee45 4674 newobj = _core_.new_IdleEvent(*args, **kwargs)
d14a1e28
RD
4675 self.this = newobj.this
4676 self.thisown = 1
4677 del newobj.thisown
e811c8ce 4678 def RequestMore(*args, **kwargs):
a95a7133 4679 """RequestMore(self, bool needMore=True)"""
54f9ee45 4680 return _core_.IdleEvent_RequestMore(*args, **kwargs)
e811c8ce
RD
4681
4682 def MoreRequested(*args, **kwargs):
a95a7133 4683 """MoreRequested(self) -> bool"""
54f9ee45 4684 return _core_.IdleEvent_MoreRequested(*args, **kwargs)
e811c8ce
RD
4685
4686 def SetMode(*args, **kwargs):
66c033b4 4687 """SetMode(int mode)"""
54f9ee45 4688 return _core_.IdleEvent_SetMode(*args, **kwargs)
e811c8ce
RD
4689
4690 SetMode = staticmethod(SetMode)
4691 def GetMode(*args, **kwargs):
66c033b4 4692 """GetMode() -> int"""
54f9ee45 4693 return _core_.IdleEvent_GetMode(*args, **kwargs)
e811c8ce
RD
4694
4695 GetMode = staticmethod(GetMode)
4696 def CanSend(*args, **kwargs):
66c033b4 4697 """CanSend(Window win) -> bool"""
54f9ee45 4698 return _core_.IdleEvent_CanSend(*args, **kwargs)
e811c8ce
RD
4699
4700 CanSend = staticmethod(CanSend)
d14a1e28
RD
4701
4702class IdleEventPtr(IdleEvent):
4703 def __init__(self, this):
4704 self.this = this
4705 if not hasattr(self,"thisown"): self.thisown = 0
4706 self.__class__ = IdleEvent
54f9ee45 4707_core_.IdleEvent_swigregister(IdleEventPtr)
d14a1e28 4708
e811c8ce 4709def IdleEvent_SetMode(*args, **kwargs):
196addbf 4710 """IdleEvent_SetMode(int mode)"""
54f9ee45 4711 return _core_.IdleEvent_SetMode(*args, **kwargs)
d14a1e28 4712
e811c8ce 4713def IdleEvent_GetMode(*args, **kwargs):
196addbf 4714 """IdleEvent_GetMode() -> int"""
54f9ee45 4715 return _core_.IdleEvent_GetMode(*args, **kwargs)
d14a1e28 4716
e811c8ce
RD
4717def IdleEvent_CanSend(*args, **kwargs):
4718 """IdleEvent_CanSend(Window win) -> bool"""
54f9ee45 4719 return _core_.IdleEvent_CanSend(*args, **kwargs)
d14a1e28
RD
4720
4721#---------------------------------------------------------------------------
4722
4723class PyEvent(Event):
093d3ff1 4724 """Proxy of C++ PyEvent class"""
e811c8ce
RD
4725 def __repr__(self):
4726 return "<%s.%s; proxy of C++ wxPyEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 4727 def __init__(self, *args, **kwargs):
a95a7133 4728 """__init__(self, int winid=0, wxEventType commandType=wxEVT_NULL) -> PyEvent"""
54f9ee45 4729 newobj = _core_.new_PyEvent(*args, **kwargs)
d14a1e28
RD
4730 self.this = newobj.this
4731 self.thisown = 1
4732 del newobj.thisown
4733 self.SetSelf(self)
e811c8ce 4734
54f9ee45 4735 def __del__(self, destroy=_core_.delete_PyEvent):
a95a7133 4736 """__del__(self)"""
d14a1e28
RD
4737 try:
4738 if self.thisown: destroy(self)
4739 except: pass
e811c8ce
RD
4740
4741 def SetSelf(*args, **kwargs):
a95a7133 4742 """SetSelf(self, PyObject self)"""
54f9ee45 4743 return _core_.PyEvent_SetSelf(*args, **kwargs)
e811c8ce
RD
4744
4745 def GetSelf(*args, **kwargs):
a95a7133 4746 """GetSelf(self) -> PyObject"""
54f9ee45 4747 return _core_.PyEvent_GetSelf(*args, **kwargs)
e811c8ce 4748
d14a1e28
RD
4749
4750class PyEventPtr(PyEvent):
4751 def __init__(self, this):
4752 self.this = this
4753 if not hasattr(self,"thisown"): self.thisown = 0
4754 self.__class__ = PyEvent
54f9ee45 4755_core_.PyEvent_swigregister(PyEventPtr)
d14a1e28
RD
4756
4757class PyCommandEvent(CommandEvent):
093d3ff1 4758 """Proxy of C++ PyCommandEvent class"""
e811c8ce
RD
4759 def __repr__(self):
4760 return "<%s.%s; proxy of C++ wxPyCommandEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 4761 def __init__(self, *args, **kwargs):
a95a7133 4762 """__init__(self, wxEventType commandType=wxEVT_NULL, int id=0) -> PyCommandEvent"""
54f9ee45 4763 newobj = _core_.new_PyCommandEvent(*args, **kwargs)
d14a1e28
RD
4764 self.this = newobj.this
4765 self.thisown = 1
4766 del newobj.thisown
4767 self.SetSelf(self)
e811c8ce 4768
54f9ee45 4769 def __del__(self, destroy=_core_.delete_PyCommandEvent):
a95a7133 4770 """__del__(self)"""
d14a1e28
RD
4771 try:
4772 if self.thisown: destroy(self)
4773 except: pass
e811c8ce
RD
4774
4775 def SetSelf(*args, **kwargs):
a95a7133 4776 """SetSelf(self, PyObject self)"""
54f9ee45 4777 return _core_.PyCommandEvent_SetSelf(*args, **kwargs)
e811c8ce
RD
4778
4779 def GetSelf(*args, **kwargs):
a95a7133 4780 """GetSelf(self) -> PyObject"""
54f9ee45 4781 return _core_.PyCommandEvent_GetSelf(*args, **kwargs)
e811c8ce 4782
d14a1e28
RD
4783
4784class PyCommandEventPtr(PyCommandEvent):
4785 def __init__(self, this):
4786 self.this = this
4787 if not hasattr(self,"thisown"): self.thisown = 0
4788 self.__class__ = PyCommandEvent
54f9ee45 4789_core_.PyCommandEvent_swigregister(PyCommandEventPtr)
d14a1e28 4790
53aa7709
RD
4791class DateEvent(CommandEvent):
4792 """Proxy of C++ DateEvent class"""
4793 def __repr__(self):
4794 return "<%s.%s; proxy of C++ wxDateEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
4795 def __init__(self, *args, **kwargs):
4796 """__init__(self, Window win, DateTime dt, wxEventType type) -> DateEvent"""
4797 newobj = _core_.new_DateEvent(*args, **kwargs)
4798 self.this = newobj.this
4799 self.thisown = 1
4800 del newobj.thisown
4801 def GetDate(*args, **kwargs):
4802 """GetDate(self) -> DateTime"""
4803 return _core_.DateEvent_GetDate(*args, **kwargs)
4804
4805 def SetDate(*args, **kwargs):
4806 """SetDate(self, DateTime date)"""
4807 return _core_.DateEvent_SetDate(*args, **kwargs)
4808
4809
4810class DateEventPtr(DateEvent):
4811 def __init__(self, this):
4812 self.this = this
4813 if not hasattr(self,"thisown"): self.thisown = 0
4814 self.__class__ = DateEvent
4815_core_.DateEvent_swigregister(DateEventPtr)
4816
4817wxEVT_DATE_CHANGED = _core_.wxEVT_DATE_CHANGED
4818EVT_DATE_CHANGED = wx.PyEventBinder( wxEVT_DATE_CHANGED, 1 )
4819
d14a1e28
RD
4820#---------------------------------------------------------------------------
4821
54f9ee45
RD
4822PYAPP_ASSERT_SUPPRESS = _core_.PYAPP_ASSERT_SUPPRESS
4823PYAPP_ASSERT_EXCEPTION = _core_.PYAPP_ASSERT_EXCEPTION
4824PYAPP_ASSERT_DIALOG = _core_.PYAPP_ASSERT_DIALOG
4825PYAPP_ASSERT_LOG = _core_.PYAPP_ASSERT_LOG
4826PRINT_WINDOWS = _core_.PRINT_WINDOWS
4827PRINT_POSTSCRIPT = _core_.PRINT_POSTSCRIPT
d14a1e28 4828class PyApp(EvtHandler):
66c033b4
RD
4829 """
4830 The ``wx.PyApp`` class is an *implementation detail*, please use the
4831 `wx.App` class (or some other derived class) instead.
4832 """
e811c8ce
RD
4833 def __repr__(self):
4834 return "<%s.%s; proxy of C++ wxPyApp instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 4835 def __init__(self, *args, **kwargs):
98e665d3 4836 """
a95a7133 4837 __init__(self) -> PyApp
98e665d3
RD
4838
4839 Create a new application object, starting the bootstrap process.
4840 """
54f9ee45 4841 newobj = _core_.new_PyApp(*args, **kwargs)
d14a1e28
RD
4842 self.this = newobj.this
4843 self.thisown = 1
4844 del newobj.thisown
4845 self._setCallbackInfo(self, PyApp)
4846 self._setOORInfo(self)
e811c8ce 4847
54f9ee45 4848 def __del__(self, destroy=_core_.delete_PyApp):
a95a7133 4849 """__del__(self)"""
d14a1e28
RD
4850 try:
4851 if self.thisown: destroy(self)
4852 except: pass
e811c8ce
RD
4853
4854 def _setCallbackInfo(*args, **kwargs):
a95a7133 4855 """_setCallbackInfo(self, PyObject self, PyObject _class)"""
54f9ee45 4856 return _core_.PyApp__setCallbackInfo(*args, **kwargs)
e811c8ce
RD
4857
4858 def GetAppName(*args, **kwargs):
0df68c9f 4859 """
a95a7133 4860 GetAppName(self) -> String
6c3b4aae 4861
0df68c9f
RD
4862 Get the application name.
4863 """
54f9ee45 4864 return _core_.PyApp_GetAppName(*args, **kwargs)
e811c8ce
RD
4865
4866 def SetAppName(*args, **kwargs):
0df68c9f 4867 """
a95a7133 4868 SetAppName(self, String name)
6c3b4aae 4869
66c033b4
RD
4870 Set the application name. This value may be used automatically by
4871 `wx.Config` and such.
0df68c9f 4872 """
54f9ee45 4873 return _core_.PyApp_SetAppName(*args, **kwargs)
e811c8ce
RD
4874
4875 def GetClassName(*args, **kwargs):
0df68c9f 4876 """
a95a7133 4877 GetClassName(self) -> String
e811c8ce 4878
0df68c9f
RD
4879 Get the application's class name.
4880 """
54f9ee45 4881 return _core_.PyApp_GetClassName(*args, **kwargs)
e811c8ce
RD
4882
4883 def SetClassName(*args, **kwargs):
0df68c9f 4884 """
a95a7133 4885 SetClassName(self, String name)
6c3b4aae 4886
66c033b4
RD
4887 Set the application's class name. This value may be used for
4888 X-resources if applicable for the platform
0df68c9f 4889 """
54f9ee45 4890 return _core_.PyApp_SetClassName(*args, **kwargs)
e811c8ce
RD
4891
4892 def GetVendorName(*args, **kwargs):
0df68c9f 4893 """
a95a7133 4894 GetVendorName(self) -> String
6c3b4aae 4895
0df68c9f
RD
4896 Get the application's vendor name.
4897 """
54f9ee45 4898 return _core_.PyApp_GetVendorName(*args, **kwargs)
e811c8ce
RD
4899
4900 def SetVendorName(*args, **kwargs):
0df68c9f 4901 """
a95a7133 4902 SetVendorName(self, String name)
6c3b4aae 4903
66c033b4
RD
4904 Set the application's vendor name. This value may be used
4905 automatically by `wx.Config` and such.
0df68c9f 4906 """
54f9ee45 4907 return _core_.PyApp_SetVendorName(*args, **kwargs)
e811c8ce
RD
4908
4909 def GetTraits(*args, **kwargs):
0df68c9f 4910 """
a95a7133 4911 GetTraits(self) -> wxAppTraits
6c3b4aae 4912
66c033b4
RD
4913 Return (and create if necessary) the app traits object to which we
4914 delegate for everything which either should be configurable by the
4915 user (then he can change the default behaviour simply by overriding
4916 CreateTraits() and returning his own traits object) or which is
4917 GUI/console dependent as then wx.AppTraits allows us to abstract the
4918 differences behind the common facade.
4919
4920 :todo: Add support for overriding CreateAppTraits in wxPython.
0df68c9f 4921 """
54f9ee45 4922 return _core_.PyApp_GetTraits(*args, **kwargs)
e811c8ce
RD
4923
4924 def ProcessPendingEvents(*args, **kwargs):
0df68c9f 4925 """
a95a7133 4926 ProcessPendingEvents(self)
6c3b4aae 4927
66c033b4
RD
4928 Process all events in the Pending Events list -- it is necessary to
4929 call this function to process posted events. This normally happens
4930 during each event loop iteration.
0df68c9f 4931 """
54f9ee45 4932 return _core_.PyApp_ProcessPendingEvents(*args, **kwargs)
e811c8ce
RD
4933
4934 def Yield(*args, **kwargs):
0df68c9f 4935 """
a95a7133 4936 Yield(self, bool onlyIfNeeded=False) -> bool
6c3b4aae 4937
66c033b4
RD
4938 Process all currently pending events right now, instead of waiting
4939 until return to the event loop. It is an error to call ``Yield``
4940 recursively unless the value of ``onlyIfNeeded`` is True.
6c3b4aae 4941
66c033b4 4942 :warning: This function is dangerous as it can lead to unexpected
41e2b43e
RD
4943 reentrancies (i.e. when called from an event handler it may
4944 result in calling the same event handler again), use with
4945 extreme care or, better, don't use at all!
0df68c9f 4946
66c033b4 4947 :see: `wx.Yield`, `wx.YieldIfNeeded`, `wx.SafeYield`
41e2b43e 4948
0df68c9f 4949 """
54f9ee45 4950 return _core_.PyApp_Yield(*args, **kwargs)
e811c8ce
RD
4951
4952 def WakeUpIdle(*args, **kwargs):
0df68c9f 4953 """
a95a7133 4954 WakeUpIdle(self)
6c3b4aae 4955
66c033b4
RD
4956 Make sure that idle events are sent again.
4957 :see: `wx.WakeUpIdle`
0df68c9f 4958 """
54f9ee45 4959 return _core_.PyApp_WakeUpIdle(*args, **kwargs)
e811c8ce 4960
1fc3b23a
RD
4961 def IsMainLoopRunning(*args, **kwargs):
4962 """
4963 IsMainLoopRunning() -> bool
4964
4965 Returns True if we're running the main loop, i.e. if the events can
4966 currently be dispatched.
4967 """
4968 return _core_.PyApp_IsMainLoopRunning(*args, **kwargs)
4969
4970 IsMainLoopRunning = staticmethod(IsMainLoopRunning)
e811c8ce 4971 def MainLoop(*args, **kwargs):
0df68c9f 4972 """
a95a7133 4973 MainLoop(self) -> int
6c3b4aae 4974
66c033b4
RD
4975 Execute the main GUI loop, the function doesn't normally return until
4976 all top level windows have been closed and destroyed.
0df68c9f 4977 """
54f9ee45 4978 return _core_.PyApp_MainLoop(*args, **kwargs)
e811c8ce
RD
4979
4980 def Exit(*args, **kwargs):
0df68c9f 4981 """
a95a7133 4982 Exit(self)
6c3b4aae 4983
0df68c9f 4984 Exit the main loop thus terminating the application.
66c033b4 4985 :see: `wx.Exit`
0df68c9f 4986 """
54f9ee45 4987 return _core_.PyApp_Exit(*args, **kwargs)
e811c8ce
RD
4988
4989 def ExitMainLoop(*args, **kwargs):
0df68c9f 4990 """
a95a7133 4991 ExitMainLoop(self)
6c3b4aae 4992
66c033b4
RD
4993 Exit the main GUI loop during the next iteration of the main
4994 loop, (i.e. it does not stop the program immediately!)
0df68c9f 4995 """
54f9ee45 4996 return _core_.PyApp_ExitMainLoop(*args, **kwargs)
e811c8ce
RD
4997
4998 def Pending(*args, **kwargs):
0df68c9f 4999 """
a95a7133 5000 Pending(self) -> bool
6c3b4aae 5001
0df68c9f
RD
5002 Returns True if there are unprocessed events in the event queue.
5003 """
54f9ee45 5004 return _core_.PyApp_Pending(*args, **kwargs)
e811c8ce
RD
5005
5006 def Dispatch(*args, **kwargs):
0df68c9f 5007 """
a95a7133 5008 Dispatch(self) -> bool
6c3b4aae 5009
0df68c9f
RD
5010 Process the first event in the event queue (blocks until an event
5011 appears if there are none currently)
5012 """
54f9ee45 5013 return _core_.PyApp_Dispatch(*args, **kwargs)
e811c8ce
RD
5014
5015 def ProcessIdle(*args, **kwargs):
0df68c9f 5016 """
a95a7133 5017 ProcessIdle(self) -> bool
6c3b4aae 5018
66c033b4
RD
5019 Called from the MainLoop when the application becomes idle (there are
5020 no pending events) and sends a `wx.IdleEvent` to all interested
5021 parties. Returns True if more idle events are needed, False if not.
0df68c9f 5022 """
54f9ee45 5023 return _core_.PyApp_ProcessIdle(*args, **kwargs)
e811c8ce
RD
5024
5025 def SendIdleEvents(*args, **kwargs):
0df68c9f 5026 """
a95a7133 5027 SendIdleEvents(self, Window win, IdleEvent event) -> bool
e811c8ce 5028
66c033b4
RD
5029 Send idle event to window and all subwindows. Returns True if more
5030 idle time is requested.
0df68c9f 5031 """
54f9ee45 5032 return _core_.PyApp_SendIdleEvents(*args, **kwargs)
e811c8ce
RD
5033
5034 def IsActive(*args, **kwargs):
0df68c9f 5035 """
a95a7133 5036 IsActive(self) -> bool
6c3b4aae 5037
0df68c9f
RD
5038 Return True if our app has focus.
5039 """
54f9ee45 5040 return _core_.PyApp_IsActive(*args, **kwargs)
e811c8ce
RD
5041
5042 def SetTopWindow(*args, **kwargs):
0df68c9f 5043 """
a95a7133 5044 SetTopWindow(self, Window win)
6c3b4aae 5045
66c033b4 5046 Set the *main* top level window
0df68c9f 5047 """
54f9ee45 5048 return _core_.PyApp_SetTopWindow(*args, **kwargs)
e811c8ce
RD
5049
5050 def GetTopWindow(*args, **kwargs):
0df68c9f 5051 """
a95a7133 5052 GetTopWindow(self) -> Window
6c3b4aae 5053
66c033b4
RD
5054 Return the *main* top level window (if it hadn't been set previously
5055 with SetTopWindow(), will return just some top level window and, if
5056 there not any, will return None)
0df68c9f 5057 """
54f9ee45 5058 return _core_.PyApp_GetTopWindow(*args, **kwargs)
e811c8ce
RD
5059
5060 def SetExitOnFrameDelete(*args, **kwargs):
0df68c9f 5061 """
a95a7133 5062 SetExitOnFrameDelete(self, bool flag)
0df68c9f 5063
66c033b4
RD
5064 Control the exit behaviour: by default, the program will exit the main
5065 loop (and so, usually, terminate) when the last top-level program
5066 window is deleted. Beware that if you disable this behaviour (with
5067 SetExitOnFrameDelete(False)), you'll have to call ExitMainLoop()
5068 explicitly from somewhere.
0df68c9f 5069 """
54f9ee45 5070 return _core_.PyApp_SetExitOnFrameDelete(*args, **kwargs)
e811c8ce
RD
5071
5072 def GetExitOnFrameDelete(*args, **kwargs):
0df68c9f 5073 """
a95a7133 5074 GetExitOnFrameDelete(self) -> bool
6c3b4aae 5075
0df68c9f
RD
5076 Get the current exit behaviour setting.
5077 """
54f9ee45 5078 return _core_.PyApp_GetExitOnFrameDelete(*args, **kwargs)
e811c8ce
RD
5079
5080 def SetUseBestVisual(*args, **kwargs):
0df68c9f 5081 """
a95a7133 5082 SetUseBestVisual(self, bool flag)
6c3b4aae 5083
66c033b4
RD
5084 Set whether the app should try to use the best available visual on
5085 systems where more than one is available, (Sun, SGI, XFree86 4, etc.)
0df68c9f 5086 """
54f9ee45 5087 return _core_.PyApp_SetUseBestVisual(*args, **kwargs)
e811c8ce
RD
5088
5089 def GetUseBestVisual(*args, **kwargs):
0df68c9f 5090 """
a95a7133 5091 GetUseBestVisual(self) -> bool
6c3b4aae 5092
0df68c9f
RD
5093 Get current UseBestVisual setting.
5094 """
54f9ee45 5095 return _core_.PyApp_GetUseBestVisual(*args, **kwargs)
e811c8ce
RD
5096
5097 def SetPrintMode(*args, **kwargs):
a95a7133 5098 """SetPrintMode(self, int mode)"""
54f9ee45 5099 return _core_.PyApp_SetPrintMode(*args, **kwargs)
e811c8ce
RD
5100
5101 def GetPrintMode(*args, **kwargs):
a95a7133 5102 """GetPrintMode(self) -> int"""
54f9ee45 5103 return _core_.PyApp_GetPrintMode(*args, **kwargs)
e811c8ce 5104
e811c8ce 5105 def SetAssertMode(*args, **kwargs):
0df68c9f 5106 """
a95a7133 5107 SetAssertMode(self, int mode)
6c3b4aae 5108
41e2b43e 5109 Set the OnAssert behaviour for debug and hybrid builds.
0df68c9f 5110 """
54f9ee45 5111 return _core_.PyApp_SetAssertMode(*args, **kwargs)
e811c8ce 5112
6c3b4aae 5113 def GetAssertMode(*args, **kwargs):
0df68c9f 5114 """
a95a7133 5115 GetAssertMode(self) -> int
6c3b4aae 5116
0df68c9f
RD
5117 Get the current OnAssert behaviour setting.
5118 """
54f9ee45 5119 return _core_.PyApp_GetAssertMode(*args, **kwargs)
6c3b4aae 5120
e811c8ce 5121 def GetMacSupportPCMenuShortcuts(*args, **kwargs):
66c033b4 5122 """GetMacSupportPCMenuShortcuts() -> bool"""
54f9ee45 5123 return _core_.PyApp_GetMacSupportPCMenuShortcuts(*args, **kwargs)
e811c8ce
RD
5124
5125 GetMacSupportPCMenuShortcuts = staticmethod(GetMacSupportPCMenuShortcuts)
5126 def GetMacAboutMenuItemId(*args, **kwargs):
66c033b4 5127 """GetMacAboutMenuItemId() -> long"""
54f9ee45 5128 return _core_.PyApp_GetMacAboutMenuItemId(*args, **kwargs)
e811c8ce
RD
5129
5130 GetMacAboutMenuItemId = staticmethod(GetMacAboutMenuItemId)
5131 def GetMacPreferencesMenuItemId(*args, **kwargs):
66c033b4 5132 """GetMacPreferencesMenuItemId() -> long"""
54f9ee45 5133 return _core_.PyApp_GetMacPreferencesMenuItemId(*args, **kwargs)
e811c8ce
RD
5134
5135 GetMacPreferencesMenuItemId = staticmethod(GetMacPreferencesMenuItemId)
5136 def GetMacExitMenuItemId(*args, **kwargs):
66c033b4 5137 """GetMacExitMenuItemId() -> long"""
54f9ee45 5138 return _core_.PyApp_GetMacExitMenuItemId(*args, **kwargs)
e811c8ce
RD
5139
5140 GetMacExitMenuItemId = staticmethod(GetMacExitMenuItemId)
5141 def GetMacHelpMenuTitleName(*args, **kwargs):
66c033b4 5142 """GetMacHelpMenuTitleName() -> String"""
54f9ee45 5143 return _core_.PyApp_GetMacHelpMenuTitleName(*args, **kwargs)
e811c8ce
RD
5144
5145 GetMacHelpMenuTitleName = staticmethod(GetMacHelpMenuTitleName)
5146 def SetMacSupportPCMenuShortcuts(*args, **kwargs):
66c033b4 5147 """SetMacSupportPCMenuShortcuts(bool val)"""
54f9ee45 5148 return _core_.PyApp_SetMacSupportPCMenuShortcuts(*args, **kwargs)
e811c8ce
RD
5149
5150 SetMacSupportPCMenuShortcuts = staticmethod(SetMacSupportPCMenuShortcuts)
5151 def SetMacAboutMenuItemId(*args, **kwargs):
66c033b4 5152 """SetMacAboutMenuItemId(long val)"""
54f9ee45 5153 return _core_.PyApp_SetMacAboutMenuItemId(*args, **kwargs)
e811c8ce
RD
5154
5155 SetMacAboutMenuItemId = staticmethod(SetMacAboutMenuItemId)
5156 def SetMacPreferencesMenuItemId(*args, **kwargs):
66c033b4 5157 """SetMacPreferencesMenuItemId(long val)"""
54f9ee45 5158 return _core_.PyApp_SetMacPreferencesMenuItemId(*args, **kwargs)
e811c8ce
RD
5159
5160 SetMacPreferencesMenuItemId = staticmethod(SetMacPreferencesMenuItemId)
5161 def SetMacExitMenuItemId(*args, **kwargs):
66c033b4 5162 """SetMacExitMenuItemId(long val)"""
54f9ee45 5163 return _core_.PyApp_SetMacExitMenuItemId(*args, **kwargs)
e811c8ce
RD
5164
5165 SetMacExitMenuItemId = staticmethod(SetMacExitMenuItemId)
5166 def SetMacHelpMenuTitleName(*args, **kwargs):
66c033b4 5167 """SetMacHelpMenuTitleName(String val)"""
54f9ee45 5168 return _core_.PyApp_SetMacHelpMenuTitleName(*args, **kwargs)
e811c8ce
RD
5169
5170 SetMacHelpMenuTitleName = staticmethod(SetMacHelpMenuTitleName)
5171 def _BootstrapApp(*args, **kwargs):
0df68c9f 5172 """
a95a7133 5173 _BootstrapApp(self)
6c3b4aae 5174
0df68c9f
RD
5175 For internal use only
5176 """
54f9ee45 5177 return _core_.PyApp__BootstrapApp(*args, **kwargs)
e811c8ce
RD
5178
5179 def GetComCtl32Version(*args, **kwargs):
0df68c9f 5180 """
66c033b4 5181 GetComCtl32Version() -> int
6c3b4aae 5182
66c033b4
RD
5183 Returns 400, 470, 471, etc. for comctl32.dll 4.00, 4.70, 4.71 or 0 if
5184 it wasn't found at all. Raises an exception on non-Windows platforms.
0df68c9f 5185 """
54f9ee45 5186 return _core_.PyApp_GetComCtl32Version(*args, **kwargs)
e811c8ce
RD
5187
5188 GetComCtl32Version = staticmethod(GetComCtl32Version)
d14a1e28
RD
5189
5190class PyAppPtr(PyApp):
5191 def __init__(self, this):
5192 self.this = this
5193 if not hasattr(self,"thisown"): self.thisown = 0
5194 self.__class__ = PyApp
54f9ee45 5195_core_.PyApp_swigregister(PyAppPtr)
d14a1e28 5196
1fc3b23a
RD
5197def PyApp_IsMainLoopRunning(*args, **kwargs):
5198 """
5199 PyApp_IsMainLoopRunning() -> bool
5200
5201 Returns True if we're running the main loop, i.e. if the events can
5202 currently be dispatched.
5203 """
5204 return _core_.PyApp_IsMainLoopRunning(*args, **kwargs)
5205
e811c8ce
RD
5206def PyApp_GetMacSupportPCMenuShortcuts(*args, **kwargs):
5207 """PyApp_GetMacSupportPCMenuShortcuts() -> bool"""
54f9ee45 5208 return _core_.PyApp_GetMacSupportPCMenuShortcuts(*args, **kwargs)
d14a1e28 5209
e811c8ce
RD
5210def PyApp_GetMacAboutMenuItemId(*args, **kwargs):
5211 """PyApp_GetMacAboutMenuItemId() -> long"""
54f9ee45 5212 return _core_.PyApp_GetMacAboutMenuItemId(*args, **kwargs)
d14a1e28 5213
e811c8ce
RD
5214def PyApp_GetMacPreferencesMenuItemId(*args, **kwargs):
5215 """PyApp_GetMacPreferencesMenuItemId() -> long"""
54f9ee45 5216 return _core_.PyApp_GetMacPreferencesMenuItemId(*args, **kwargs)
d14a1e28 5217
e811c8ce
RD
5218def PyApp_GetMacExitMenuItemId(*args, **kwargs):
5219 """PyApp_GetMacExitMenuItemId() -> long"""
54f9ee45 5220 return _core_.PyApp_GetMacExitMenuItemId(*args, **kwargs)
d14a1e28 5221
e811c8ce 5222def PyApp_GetMacHelpMenuTitleName(*args, **kwargs):
196addbf 5223 """PyApp_GetMacHelpMenuTitleName() -> String"""
54f9ee45 5224 return _core_.PyApp_GetMacHelpMenuTitleName(*args, **kwargs)
d14a1e28 5225
e811c8ce
RD
5226def PyApp_SetMacSupportPCMenuShortcuts(*args, **kwargs):
5227 """PyApp_SetMacSupportPCMenuShortcuts(bool val)"""
54f9ee45 5228 return _core_.PyApp_SetMacSupportPCMenuShortcuts(*args, **kwargs)
d14a1e28 5229
e811c8ce
RD
5230def PyApp_SetMacAboutMenuItemId(*args, **kwargs):
5231 """PyApp_SetMacAboutMenuItemId(long val)"""
54f9ee45 5232 return _core_.PyApp_SetMacAboutMenuItemId(*args, **kwargs)
d14a1e28 5233
e811c8ce
RD
5234def PyApp_SetMacPreferencesMenuItemId(*args, **kwargs):
5235 """PyApp_SetMacPreferencesMenuItemId(long val)"""
54f9ee45 5236 return _core_.PyApp_SetMacPreferencesMenuItemId(*args, **kwargs)
d14a1e28 5237
e811c8ce
RD
5238def PyApp_SetMacExitMenuItemId(*args, **kwargs):
5239 """PyApp_SetMacExitMenuItemId(long val)"""
54f9ee45 5240 return _core_.PyApp_SetMacExitMenuItemId(*args, **kwargs)
d14a1e28 5241
e811c8ce 5242def PyApp_SetMacHelpMenuTitleName(*args, **kwargs):
196addbf 5243 """PyApp_SetMacHelpMenuTitleName(String val)"""
54f9ee45 5244 return _core_.PyApp_SetMacHelpMenuTitleName(*args, **kwargs)
d14a1e28 5245
e811c8ce 5246def PyApp_GetComCtl32Version(*args, **kwargs):
0df68c9f
RD
5247 """
5248 PyApp_GetComCtl32Version() -> int
6c3b4aae 5249
66c033b4
RD
5250 Returns 400, 470, 471, etc. for comctl32.dll 4.00, 4.70, 4.71 or 0 if
5251 it wasn't found at all. Raises an exception on non-Windows platforms.
0df68c9f 5252 """
54f9ee45 5253 return _core_.PyApp_GetComCtl32Version(*args, **kwargs)
d14a1e28
RD
5254
5255#---------------------------------------------------------------------------
5256
5257
e811c8ce 5258def Exit(*args, **kwargs):
0df68c9f
RD
5259 """
5260 Exit()
6c3b4aae 5261
0df68c9f
RD
5262 Force an exit of the application. Convenience for wx.GetApp().Exit()
5263 """
54f9ee45 5264 return _core_.Exit(*args, **kwargs)
d14a1e28 5265
e811c8ce 5266def Yield(*args, **kwargs):
0df68c9f
RD
5267 """
5268 Yield() -> bool
6c3b4aae 5269
0df68c9f
RD
5270 Yield to other apps/messages. Convenience for wx.GetApp().Yield()
5271 """
54f9ee45 5272 return _core_.Yield(*args, **kwargs)
d14a1e28 5273
e811c8ce 5274def YieldIfNeeded(*args, **kwargs):
0df68c9f
RD
5275 """
5276 YieldIfNeeded() -> bool
6c3b4aae 5277
0df68c9f
RD
5278 Yield to other apps/messages. Convenience for wx.GetApp().Yield(True)
5279 """
54f9ee45 5280 return _core_.YieldIfNeeded(*args, **kwargs)
d14a1e28 5281
e811c8ce 5282def SafeYield(*args, **kwargs):
0df68c9f
RD
5283 """
5284 SafeYield(Window win=None, bool onlyIfNeeded=False) -> bool
6c3b4aae 5285
66c033b4
RD
5286 This function is similar to `wx.Yield`, except that it disables the
5287 user input to all program windows before calling `wx.Yield` and
5288 re-enables it again afterwards. If ``win`` is not None, this window
5289 will remain enabled, allowing the implementation of some limited user
5290 interaction.
6c3b4aae 5291
66c033b4 5292 :Returns: the result of the call to `wx.Yield`.
0df68c9f 5293 """
54f9ee45 5294 return _core_.SafeYield(*args, **kwargs)
d14a1e28 5295
e811c8ce 5296def WakeUpIdle(*args, **kwargs):
0df68c9f
RD
5297 """
5298 WakeUpIdle()
6c3b4aae 5299
66c033b4
RD
5300 Cause the message queue to become empty again, so idle events will be
5301 sent.
0df68c9f 5302 """
54f9ee45 5303 return _core_.WakeUpIdle(*args, **kwargs)
d14a1e28 5304
e811c8ce 5305def PostEvent(*args, **kwargs):
0df68c9f
RD
5306 """
5307 PostEvent(EvtHandler dest, Event event)
6c3b4aae 5308
66c033b4
RD
5309 Send an event to a window or other wx.EvtHandler to be processed
5310 later.
0df68c9f 5311 """
54f9ee45 5312 return _core_.PostEvent(*args, **kwargs)
d14a1e28 5313
e811c8ce 5314def App_CleanUp(*args, **kwargs):
0df68c9f
RD
5315 """
5316 App_CleanUp()
6c3b4aae 5317
41e2b43e 5318 For internal use only, it is used to cleanup after wxWidgets when
66c033b4 5319 Python shuts down.
0df68c9f 5320 """
54f9ee45 5321 return _core_.App_CleanUp(*args, **kwargs)
d14a1e28 5322
e811c8ce 5323def GetApp(*args, **kwargs):
0df68c9f
RD
5324 """
5325 GetApp() -> PyApp
6c3b4aae 5326
196addbf 5327 Return a reference to the current wx.App object.
0df68c9f 5328 """
54f9ee45 5329 return _core_.GetApp(*args, **kwargs)
5cbf236d
RD
5330
5331def SetDefaultPyEncoding(*args, **kwargs):
5332 """
5333 SetDefaultPyEncoding(string encoding)
5334
5335 Sets the encoding that wxPython will use when it needs to convert a
5336 Python string or unicode object to or from a wxString.
e505d15e
RD
5337
5338 The default encoding is the value of ``locale.getdefaultlocale()[1]``
5339 but please be aware that the default encoding within the same locale
5340 may be slightly different on different platforms. For example, please
5341 see http://www.alanwood.net/demos/charsetdiffs.html for differences
5342 between the common latin/roman encodings.
5cbf236d
RD
5343 """
5344 return _core_.SetDefaultPyEncoding(*args, **kwargs)
5345
5346def GetDefaultPyEncoding(*args, **kwargs):
5347 """
5348 GetDefaultPyEncoding() -> string
5349
5350 Gets the current encoding that wxPython will use when it needs to
5351 convert a Python string or unicode object to or from a wxString.
5352 """
5353 return _core_.GetDefaultPyEncoding(*args, **kwargs)
d14a1e28
RD
5354#----------------------------------------------------------------------
5355
5356class PyOnDemandOutputWindow:
6c3b4aae
RD
5357 """
5358 A class that can be used for redirecting Python's stdout and
5359 stderr streams. It will do nothing until something is wrriten to
5360 the stream at which point it will create a Frame with a text area
5361 and write the text there.
5362 """
d14a1e28
RD
5363 def __init__(self, title = "wxPython: stdout/stderr"):
5364 self.frame = None
5365 self.title = title
412d302d
RD
5366 self.pos = wx.DefaultPosition
5367 self.size = (450, 300)
d14a1e28
RD
5368 self.parent = None
5369
5370 def SetParent(self, parent):
6c3b4aae 5371 """Set the window to be used as the popup Frame's parent."""
d14a1e28
RD
5372 self.parent = parent
5373
6c3b4aae
RD
5374
5375 def CreateOutputWindow(self, st):
412d302d
RD
5376 self.frame = wx.Frame(self.parent, -1, self.title, self.pos, self.size,
5377 style=wx.DEFAULT_FRAME_STYLE)
196addbf 5378 self.text = wx.TextCtrl(self.frame, -1, "",
412d302d 5379 style=wx.TE_MULTILINE|wx.TE_READONLY)
d1e20054 5380 self.text.AppendText(st)
6c3b4aae
RD
5381 self.frame.Show(True)
5382 EVT_CLOSE(self.frame, self.OnCloseWindow)
5383
d14a1e28 5384
7409c0c6
RD
5385 def OnCloseWindow(self, event):
5386 if self.frame is not None:
5387 self.frame.Destroy()
5388 self.frame = None
5389 self.text = None
5390
5391
d14a1e28 5392 # These methods provide the file-like output behaviour.
6c3b4aae
RD
5393 def write(self, text):
5394 """
5395 Create the output window if needed and write the string to it.
5396 If not called in the context of the gui thread then uses
5397 CallAfter to do the work there.
5398 """
5399 if self.frame is None:
5400 if not wx.Thread_IsMain():
5401 wx.CallAfter(self.CreateOutputWindow, text)
5402 else:
5403 self.CreateOutputWindow(text)
5404 else:
5405 if not wx.Thread_IsMain():
5406 wx.CallAfter(self.text.AppendText, text)
5407 else:
5408 self.text.AppendText(text)
5409
d14a1e28
RD
5410
5411 def close(self):
6c3b4aae
RD
5412 if self.frame is not None:
5413 wx.CallAfter(self.frame.Close)
5414
d14a1e28 5415
19272049
RD
5416 def flush(self):
5417 pass
5418
5419
d14a1e28
RD
5420
5421#----------------------------------------------------------------------
d14a1e28
RD
5422
5423_defRedirect = (wx.Platform == '__WXMSW__' or wx.Platform == '__WXMAC__')
5424
5425class App(wx.PyApp):
6c3b4aae 5426 """
66c033b4
RD
5427 The ``wx.App`` class represents the application and is used to:
5428
5429 * bootstrap the wxPython system and initialize the underlying
5430 gui toolkit
5431 * set and get application-wide properties
5432 * implement the windowing system main message or event loop,
5433 and to dispatch events to window instances
5434 * etc.
5435
5436 Every application must have a ``wx.App`` instance, and all
5437 creation of UI objects should be delayed until after the
03e37cd5
RD
5438 ``wx.App`` object has been created in order to ensure that the gui
5439 platform and wxWidgets have been fully initialized.
66c033b4
RD
5440
5441 Normally you would derive from this class and implement an
5442 ``OnInit`` method that creates a frame and then calls
5443 ``self.SetTopWindow(frame)``.
5444
03e37cd5 5445 :see: `wx.PySimpleApp` for a simpler app class that can be used
1c0f361b 5446 directly.
6c3b4aae 5447 """
66c033b4 5448
d14a1e28
RD
5449 outputWindowClass = PyOnDemandOutputWindow
5450
03e37cd5
RD
5451 def __init__(self, redirect=_defRedirect, filename=None,
5452 useBestVisual=False, clearSigInt=True):
66c033b4
RD
5453 """
5454 Construct a ``wx.App`` object.
5455
03e37cd5
RD
5456 :param redirect: Should ``sys.stdout`` and ``sys.stderr`` be
5457 redirected? Defaults to True on Windows and Mac, False
5458 otherwise. If `filename` is None then output will be
5459 redirected to a window that pops up as needed. (You can
5460 control what kind of window is created for the output by
5461 resetting the class variable ``outputWindowClass`` to a
5462 class of your choosing.)
66c033b4 5463
03e37cd5
RD
5464 :param filename: The name of a file to redirect output to, if
5465 redirect is True.
66c033b4
RD
5466
5467 :param useBestVisual: Should the app try to use the best
03e37cd5
RD
5468 available visual provided by the system (only relevant on
5469 systems that have more than one visual.) This parameter
5470 must be used instead of calling `SetUseBestVisual` later
5471 on because it must be set before the underlying GUI
5472 toolkit is initialized.
5473
5474 :param clearSigInt: Should SIGINT be cleared? This allows the
5475 app to terminate upon a Ctrl-C in the console like other
5476 GUI apps will.
66c033b4
RD
5477
5478 :note: You should override OnInit to do applicaition
5479 initialization to ensure that the system, toolkit and
5480 wxWidgets are fully initialized.
5481 """
d14a1e28
RD
5482 wx.PyApp.__init__(self)
5483
5484 if wx.Platform == "__WXMAC__":
5485 try:
5486 import MacOS
5487 if not MacOS.WMAvailable():
5488 print """\
5489This program needs access to the screen. Please run with 'pythonw',
5490not 'python', and only when you are logged in on the main display of
5491your Mac."""
5492 _sys.exit(1)
36cadbf7
RD
5493 except SystemExit:
5494 raise
d14a1e28
RD
5495 except:
5496 pass
5497
5498 # This has to be done before OnInit
5499 self.SetUseBestVisual(useBestVisual)
5500
5501 # Set the default handler for SIGINT. This fixes a problem
5502 # where if Ctrl-C is pressed in the console that started this
5503 # app then it will not appear to do anything, (not even send
5504 # KeyboardInterrupt???) but will later segfault on exit. By
5505 # setting the default handler then the app will exit, as
5506 # expected (depending on platform.)
03e37cd5
RD
5507 if clearSigInt:
5508 try:
5509 import signal
5510 signal.signal(signal.SIGINT, signal.SIG_DFL)
5511 except:
5512 pass
d14a1e28
RD
5513
5514 # Save and redirect the stdio to a window?
5515 self.stdioWin = None
5516 self.saveStdio = (_sys.stdout, _sys.stderr)
5517 if redirect:
5518 self.RedirectStdio(filename)
5519
8fb0e70a
RD
5520 # Use Python's install prefix as the default
5521 wx.StandardPaths.Get().SetInstallPrefix(_sys.prefix)
5522
d14a1e28
RD
5523 # This finishes the initialization of wxWindows and then calls
5524 # the OnInit that should be present in the derived class
5525 self._BootstrapApp()
5526
5527
5528 def __del__(self):
5529 try:
5530 self.RestoreStdio() # Just in case the MainLoop was overridden
5531 except:
5532 pass
5533
5534
5535 def SetTopWindow(self, frame):
1e0c8722 5536 """Set the \"main\" top level window"""
d14a1e28
RD
5537 if self.stdioWin:
5538 self.stdioWin.SetParent(frame)
5539 wx.PyApp.SetTopWindow(self, frame)
5540
5541
5542 def MainLoop(self):
1e0c8722 5543 """Execute the main GUI event loop"""
d14a1e28
RD
5544 wx.PyApp.MainLoop(self)
5545 self.RestoreStdio()
5546
5547
7409c0c6 5548 def RedirectStdio(self, filename=None):
1e0c8722 5549 """Redirect sys.stdout and sys.stderr to a file or a popup window."""
d14a1e28
RD
5550 if filename:
5551 _sys.stdout = _sys.stderr = open(filename, 'a')
5552 else:
5553 self.stdioWin = self.outputWindowClass()
5554 _sys.stdout = _sys.stderr = self.stdioWin
5555
5556
5557 def RestoreStdio(self):
5558 _sys.stdout, _sys.stderr = self.saveStdio
5559
5560
412d302d
RD
5561 def SetOutputWindowAttributes(self, title=None, pos=None, size=None):
5562 """
5563 Set the title, position and/or size of the output window if
f5b96ee1
RD
5564 the stdio has been redirected. This should be called before
5565 any output would cause the output window to be created.
412d302d
RD
5566 """
5567 if self.stdioWin:
5568 if title is not None:
5569 self.stdioWin.title = title
5570 if pos is not None:
5571 self.stdioWin.pos = pos
5572 if size is not None:
5573 self.stdioWin.size = size
5574
5575
5576
d14a1e28 5577
66c033b4 5578# change from wx.PyApp_XX to wx.App_XX
54f9ee45
RD
5579App_GetMacSupportPCMenuShortcuts = _core_.PyApp_GetMacSupportPCMenuShortcuts
5580App_GetMacAboutMenuItemId = _core_.PyApp_GetMacAboutMenuItemId
5581App_GetMacPreferencesMenuItemId = _core_.PyApp_GetMacPreferencesMenuItemId
5582App_GetMacExitMenuItemId = _core_.PyApp_GetMacExitMenuItemId
5583App_GetMacHelpMenuTitleName = _core_.PyApp_GetMacHelpMenuTitleName
5584App_SetMacSupportPCMenuShortcuts = _core_.PyApp_SetMacSupportPCMenuShortcuts
5585App_SetMacAboutMenuItemId = _core_.PyApp_SetMacAboutMenuItemId
5586App_SetMacPreferencesMenuItemId = _core_.PyApp_SetMacPreferencesMenuItemId
5587App_SetMacExitMenuItemId = _core_.PyApp_SetMacExitMenuItemId
5588App_SetMacHelpMenuTitleName = _core_.PyApp_SetMacHelpMenuTitleName
5589App_GetComCtl32Version = _core_.PyApp_GetComCtl32Version
d14a1e28
RD
5590
5591#----------------------------------------------------------------------------
5592
5593class PySimpleApp(wx.App):
6c3b4aae
RD
5594 """
5595 A simple application class. You can just create one of these and
5596 then then make your top level windows later, and not have to worry
66c033b4
RD
5597 about OnInit. For example::
5598
5599 app = wx.PySimpleApp()
5600 frame = wx.Frame(None, title='Hello World')
5601 frame.Show()
5602 app.MainLoop()
5603
5604 :see: `wx.App`
5605 """
6c3b4aae 5606
03e37cd5
RD
5607 def __init__(self, redirect=False, filename=None,
5608 useBestVisual=False, clearSigInt=True):
66c033b4
RD
5609 """
5610 :see: `wx.App.__init__`
5611 """
03e37cd5 5612 wx.App.__init__(self, redirect, filename, useBestVisual, clearSigInt)
6c3b4aae 5613
d14a1e28 5614 def OnInit(self):
d14a1e28
RD
5615 return True
5616
5617
66c033b4 5618
6c3b4aae 5619# Is anybody using this one?
d14a1e28
RD
5620class PyWidgetTester(wx.App):
5621 def __init__(self, size = (250, 100)):
5622 self.size = size
5623 wx.App.__init__(self, 0)
5624
5625 def OnInit(self):
196addbf 5626 self.frame = wx.Frame(None, -1, "Widget Tester", pos=(0,0), size=self.size)
d14a1e28
RD
5627 self.SetTopWindow(self.frame)
5628 return True
5629
66c033b4
RD
5630 def SetWidget(self, widgetClass, *args, **kwargs):
5631 w = widgetClass(self.frame, *args, **kwargs)
d14a1e28
RD
5632 self.frame.Show(True)
5633
5634#----------------------------------------------------------------------------
5635# DO NOT hold any other references to this object. This is how we
66c033b4 5636# know when to cleanup system resources that wxWidgets is holding. When
d14a1e28 5637# the sys module is unloaded, the refcount on sys.__wxPythonCleanup
66c033b4 5638# goes to zero and it calls the wx.App_CleanUp function.
d14a1e28
RD
5639
5640class __wxPyCleanup:
5641 def __init__(self):
54f9ee45 5642 self.cleanup = _core_.App_CleanUp
d14a1e28
RD
5643 def __del__(self):
5644 self.cleanup()
5645
5646_sys.__wxPythonCleanup = __wxPyCleanup()
5647
5648## # another possible solution, but it gets called too early...
66c033b4
RD
5649## import atexit
5650## atexit.register(_core_.wxApp_CleanUp)
d14a1e28
RD
5651
5652
5653#----------------------------------------------------------------------------
5654
5655#---------------------------------------------------------------------------
2ef75293
RD
5656
5657class EventLoop(object):
093d3ff1 5658 """Proxy of C++ EventLoop class"""
2ef75293
RD
5659 def __repr__(self):
5660 return "<%s.%s; proxy of C++ wxEventLoop instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
5661 def __init__(self, *args, **kwargs):
5662 """__init__(self) -> EventLoop"""
5663 newobj = _core_.new_EventLoop(*args, **kwargs)
5664 self.this = newobj.this
5665 self.thisown = 1
5666 del newobj.thisown
5667 def __del__(self, destroy=_core_.delete_EventLoop):
5668 """__del__(self)"""
5669 try:
5670 if self.thisown: destroy(self)
5671 except: pass
5672
5673 def Run(*args, **kwargs):
5674 """Run(self) -> int"""
5675 return _core_.EventLoop_Run(*args, **kwargs)
5676
5677 def Exit(*args, **kwargs):
5678 """Exit(self, int rc=0)"""
5679 return _core_.EventLoop_Exit(*args, **kwargs)
5680
5681 def Pending(*args, **kwargs):
5682 """Pending(self) -> bool"""
5683 return _core_.EventLoop_Pending(*args, **kwargs)
5684
5685 def Dispatch(*args, **kwargs):
5686 """Dispatch(self) -> bool"""
5687 return _core_.EventLoop_Dispatch(*args, **kwargs)
5688
5689 def IsRunning(*args, **kwargs):
5690 """IsRunning(self) -> bool"""
5691 return _core_.EventLoop_IsRunning(*args, **kwargs)
5692
5693 def GetActive(*args, **kwargs):
5694 """GetActive() -> EventLoop"""
5695 return _core_.EventLoop_GetActive(*args, **kwargs)
5696
5697 GetActive = staticmethod(GetActive)
5698 def SetActive(*args, **kwargs):
5699 """SetActive(EventLoop loop)"""
5700 return _core_.EventLoop_SetActive(*args, **kwargs)
5701
5702 SetActive = staticmethod(SetActive)
5703
5704class EventLoopPtr(EventLoop):
5705 def __init__(self, this):
5706 self.this = this
5707 if not hasattr(self,"thisown"): self.thisown = 0
5708 self.__class__ = EventLoop
5709_core_.EventLoop_swigregister(EventLoopPtr)
5710
5711def EventLoop_GetActive(*args, **kwargs):
5712 """EventLoop_GetActive() -> EventLoop"""
5713 return _core_.EventLoop_GetActive(*args, **kwargs)
5714
5715def EventLoop_SetActive(*args, **kwargs):
5716 """EventLoop_SetActive(EventLoop loop)"""
5717 return _core_.EventLoop_SetActive(*args, **kwargs)
5718
5719#---------------------------------------------------------------------------
d14a1e28 5720
1e0c8722 5721class AcceleratorEntry(object):
66c033b4
RD
5722 """
5723 A class used to define items in an `wx.AcceleratorTable`. wxPython
5724 programs can choose to use wx.AcceleratorEntry objects, but using a
5725 list of 3-tuple of integers (flags, keyCode, cmdID) usually works just
41e2b43e 5726 as well. See `__init__` for of the tuple values.
66c033b4
RD
5727
5728 :see: `wx.AcceleratorTable`
5729 """
1e0c8722
RD
5730 def __repr__(self):
5731 return "<%s.%s; proxy of C++ wxAcceleratorEntry instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
5732 def __init__(self, *args, **kwargs):
66c033b4
RD
5733 """
5734 __init__(self, int flags=0, int keyCode=0, int cmdID=0) -> AcceleratorEntry
5735
5736 Construct a wx.AcceleratorEntry.
66c033b4 5737 """
54f9ee45 5738 newobj = _core_.new_AcceleratorEntry(*args, **kwargs)
1e0c8722
RD
5739 self.this = newobj.this
5740 self.thisown = 1
5741 del newobj.thisown
54f9ee45 5742 def __del__(self, destroy=_core_.delete_AcceleratorEntry):
a95a7133 5743 """__del__(self)"""
1e0c8722
RD
5744 try:
5745 if self.thisown: destroy(self)
5746 except: pass
5747
5748 def Set(*args, **kwargs):
66c033b4
RD
5749 """
5750 Set(self, int flags, int keyCode, int cmd)
1e0c8722 5751
66c033b4
RD
5752 (Re)set the attributes of a wx.AcceleratorEntry.
5753 :see `__init__`
5754 """
5755 return _core_.AcceleratorEntry_Set(*args, **kwargs)
1e0c8722
RD
5756
5757 def GetFlags(*args, **kwargs):
66c033b4
RD
5758 """
5759 GetFlags(self) -> int
5760
5761 Get the AcceleratorEntry's flags.
5762 """
54f9ee45 5763 return _core_.AcceleratorEntry_GetFlags(*args, **kwargs)
1e0c8722
RD
5764
5765 def GetKeyCode(*args, **kwargs):
66c033b4
RD
5766 """
5767 GetKeyCode(self) -> int
5768
5769 Get the AcceleratorEntry's keycode.
5770 """
54f9ee45 5771 return _core_.AcceleratorEntry_GetKeyCode(*args, **kwargs)
1e0c8722
RD
5772
5773 def GetCommand(*args, **kwargs):
66c033b4
RD
5774 """
5775 GetCommand(self) -> int
5776
5777 Get the AcceleratorEntry's command ID.
5778 """
54f9ee45 5779 return _core_.AcceleratorEntry_GetCommand(*args, **kwargs)
1e0c8722
RD
5780
5781
5782class AcceleratorEntryPtr(AcceleratorEntry):
5783 def __init__(self, this):
5784 self.this = this
5785 if not hasattr(self,"thisown"): self.thisown = 0
5786 self.__class__ = AcceleratorEntry
54f9ee45 5787_core_.AcceleratorEntry_swigregister(AcceleratorEntryPtr)
1e0c8722
RD
5788
5789class AcceleratorTable(Object):
66c033b4
RD
5790 """
5791 An accelerator table allows the application to specify a table of
5792 keyboard shortcuts for menus or other commands. On Windows, menu or
5793 button commands are supported; on GTK, only menu commands are
5794 supported.
66c033b4 5795 """
1e0c8722
RD
5796 def __repr__(self):
5797 return "<%s.%s; proxy of C++ wxAcceleratorTable instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
5798 def __init__(self, *args, **kwargs):
0df68c9f
RD
5799 """
5800 __init__(entries) -> AcceleratorTable
1e0c8722 5801
66c033b4
RD
5802 Construct an AcceleratorTable from a list of `wx.AcceleratorEntry`
5803 items or or of 3-tuples (flags, keyCode, cmdID)
5804
5805 :see: `wx.AcceleratorEntry`
0df68c9f 5806 """
54f9ee45 5807 newobj = _core_.new_AcceleratorTable(*args, **kwargs)
1e0c8722
RD
5808 self.this = newobj.this
5809 self.thisown = 1
5810 del newobj.thisown
54f9ee45 5811 def __del__(self, destroy=_core_.delete_AcceleratorTable):
a95a7133 5812 """__del__(self)"""
1e0c8722
RD
5813 try:
5814 if self.thisown: destroy(self)
5815 except: pass
5816
5817 def Ok(*args, **kwargs):
a95a7133 5818 """Ok(self) -> bool"""
54f9ee45 5819 return _core_.AcceleratorTable_Ok(*args, **kwargs)
1e0c8722
RD
5820
5821
5822class AcceleratorTablePtr(AcceleratorTable):
5823 def __init__(self, this):
5824 self.this = this
5825 if not hasattr(self,"thisown"): self.thisown = 0
5826 self.__class__ = AcceleratorTable
54f9ee45 5827_core_.AcceleratorTable_swigregister(AcceleratorTablePtr)
1e0c8722
RD
5828
5829
5830def GetAccelFromString(*args, **kwargs):
196addbf 5831 """GetAccelFromString(String label) -> AcceleratorEntry"""
54f9ee45 5832 return _core_.GetAccelFromString(*args, **kwargs)
1e0c8722
RD
5833#---------------------------------------------------------------------------
5834
74a57fcd
RD
5835class VisualAttributes(object):
5836 """struct containing all the visual attributes of a control"""
5837 def __repr__(self):
5838 return "<%s.%s; proxy of C++ wxVisualAttributes instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
5839 def __init__(self, *args, **kwargs):
5840 """
a95a7133 5841 __init__(self) -> VisualAttributes
74a57fcd
RD
5842
5843 struct containing all the visual attributes of a control
5844 """
54f9ee45 5845 newobj = _core_.new_VisualAttributes(*args, **kwargs)
74a57fcd
RD
5846 self.this = newobj.this
5847 self.thisown = 1
5848 del newobj.thisown
54f9ee45 5849 def __del__(self, destroy=_core_.delete_VisualAttributes):
a95a7133 5850 """__del__(self)"""
74a57fcd
RD
5851 try:
5852 if self.thisown: destroy(self)
5853 except: pass
5854
54f9ee45
RD
5855 font = property(_core_.VisualAttributes_font_get, _core_.VisualAttributes_font_set)
5856 colFg = property(_core_.VisualAttributes_colFg_get, _core_.VisualAttributes_colFg_set)
5857 colBg = property(_core_.VisualAttributes_colBg_get, _core_.VisualAttributes_colBg_set)
74a57fcd
RD
5858
5859class VisualAttributesPtr(VisualAttributes):
5860 def __init__(self, this):
5861 self.this = this
5862 if not hasattr(self,"thisown"): self.thisown = 0
5863 self.__class__ = VisualAttributes
54f9ee45 5864_core_.VisualAttributes_swigregister(VisualAttributesPtr)
74a57fcd
RD
5865NullAcceleratorTable = cvar.NullAcceleratorTable
5866PanelNameStr = cvar.PanelNameStr
5867
54f9ee45
RD
5868WINDOW_VARIANT_NORMAL = _core_.WINDOW_VARIANT_NORMAL
5869WINDOW_VARIANT_SMALL = _core_.WINDOW_VARIANT_SMALL
5870WINDOW_VARIANT_MINI = _core_.WINDOW_VARIANT_MINI
5871WINDOW_VARIANT_LARGE = _core_.WINDOW_VARIANT_LARGE
5872WINDOW_VARIANT_MAX = _core_.WINDOW_VARIANT_MAX
d14a1e28 5873class Window(EvtHandler):
15afbcd0
RD
5874 """
5875 wx.Window is the base class for all windows and represents any visible
5876 object on the screen. All controls, top level windows and so on are
5877 wx.Windows. Sizers and device contexts are not however, as they don't
5878 appear on screen themselves.
5879
5880 """
e811c8ce
RD
5881 def __repr__(self):
5882 return "<%s.%s; proxy of C++ wxWindow instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 5883 def __init__(self, *args, **kwargs):
0df68c9f 5884 """
a95a7133 5885 __init__(self, Window parent, int id=-1, Point pos=DefaultPosition,
74a57fcd 5886 Size size=DefaultSize, long style=0, String name=PanelNameStr) -> Window
15afbcd0
RD
5887
5888 Construct and show a generic Window.
0df68c9f 5889 """
54f9ee45 5890 newobj = _core_.new_Window(*args, **kwargs)
d14a1e28
RD
5891 self.this = newobj.this
5892 self.thisown = 1
5893 del newobj.thisown
5894 self._setOORInfo(self)
d14a1e28 5895
e811c8ce 5896 def Create(*args, **kwargs):
0df68c9f 5897 """
a95a7133 5898 Create(self, Window parent, int id=-1, Point pos=DefaultPosition,
74a57fcd 5899 Size size=DefaultSize, long style=0, String name=PanelNameStr) -> bool
15afbcd0
RD
5900
5901 Create the GUI part of the Window for 2-phase creation mode.
0df68c9f 5902 """
54f9ee45 5903 return _core_.Window_Create(*args, **kwargs)
d14a1e28 5904
e811c8ce 5905 def Close(*args, **kwargs):
15afbcd0 5906 """
a95a7133 5907 Close(self, bool force=False) -> bool
15afbcd0
RD
5908
5909 This function simply generates a EVT_CLOSE event whose handler usually
5910 tries to close the window. It doesn't close the window itself,
5911 however. If force is False (the default) then the window's close
5912 handler will be allowed to veto the destruction of the window.
15afbcd0 5913 """
54f9ee45 5914 return _core_.Window_Close(*args, **kwargs)
d14a1e28 5915
e811c8ce 5916 def Destroy(*args, **kwargs):
0df68c9f 5917 """
a95a7133 5918 Destroy(self) -> bool
d14a1e28 5919
15afbcd0
RD
5920 Destroys the window safely. Frames and dialogs are not destroyed
5921 immediately when this function is called -- they are added to a list
5922 of windows to be deleted on idle time, when all the window's events
5923 have been processed. This prevents problems with events being sent to
5924 non-existent windows.
5925
5926 Returns True if the window has either been successfully deleted, or it
5927 has been added to the list of windows pending real deletion.
0df68c9f 5928 """
54f9ee45 5929 return _core_.Window_Destroy(*args, **kwargs)
d14a1e28 5930
e811c8ce 5931 def DestroyChildren(*args, **kwargs):
15afbcd0 5932 """
a95a7133 5933 DestroyChildren(self) -> bool
15afbcd0 5934
41e2b43e
RD
5935 Destroys all children of a window. Called automatically by the
5936 destructor.
15afbcd0 5937 """
54f9ee45 5938 return _core_.Window_DestroyChildren(*args, **kwargs)
d14a1e28 5939
e811c8ce 5940 def IsBeingDeleted(*args, **kwargs):
15afbcd0 5941 """
a95a7133 5942 IsBeingDeleted(self) -> bool
15afbcd0
RD
5943
5944 Is the window in the process of being deleted?
5945 """
54f9ee45 5946 return _core_.Window_IsBeingDeleted(*args, **kwargs)
d14a1e28 5947
e811c8ce 5948 def SetTitle(*args, **kwargs):
15afbcd0 5949 """
a95a7133 5950 SetTitle(self, String title)
15afbcd0
RD
5951
5952 Sets the window's title. Applicable only to frames and dialogs.
5953 """
54f9ee45 5954 return _core_.Window_SetTitle(*args, **kwargs)
d14a1e28 5955
e811c8ce 5956 def GetTitle(*args, **kwargs):
15afbcd0 5957 """
a95a7133 5958 GetTitle(self) -> String
15afbcd0
RD
5959
5960 Gets the window's title. Applicable only to frames and dialogs.
5961 """
54f9ee45 5962 return _core_.Window_GetTitle(*args, **kwargs)
d14a1e28 5963
e811c8ce 5964 def SetLabel(*args, **kwargs):
15afbcd0 5965 """
a95a7133 5966 SetLabel(self, String label)
15afbcd0
RD
5967
5968 Set the text which the window shows in its label if applicable.
5969 """
54f9ee45 5970 return _core_.Window_SetLabel(*args, **kwargs)
d14a1e28 5971
e811c8ce 5972 def GetLabel(*args, **kwargs):
15afbcd0 5973 """
a95a7133 5974 GetLabel(self) -> String
15afbcd0 5975
41e2b43e
RD
5976 Generic way of getting a label from any window, for identification
5977 purposes. The interpretation of this function differs from class to
5978 class. For frames and dialogs, the value returned is the title. For
5979 buttons or static text controls, it is the button text. This function
5980 can be useful for meta-programs such as testing tools or special-needs
5981 access programs)which need to identify windows by name.
15afbcd0 5982 """
54f9ee45 5983 return _core_.Window_GetLabel(*args, **kwargs)
d14a1e28 5984
e811c8ce 5985 def SetName(*args, **kwargs):
15afbcd0 5986 """
a95a7133 5987 SetName(self, String name)
15afbcd0 5988
41e2b43e
RD
5989 Sets the window's name. The window name is used for ressource setting
5990 in X, it is not the same as the window title/label
15afbcd0 5991 """
54f9ee45 5992 return _core_.Window_SetName(*args, **kwargs)
d14a1e28 5993
e811c8ce 5994 def GetName(*args, **kwargs):
15afbcd0 5995 """
a95a7133 5996 GetName(self) -> String
15afbcd0 5997
41e2b43e
RD
5998 Returns the windows name. This name is not guaranteed to be unique;
5999 it is up to the programmer to supply an appropriate name in the window
6000 constructor or via wx.Window.SetName.
15afbcd0 6001 """
54f9ee45 6002 return _core_.Window_GetName(*args, **kwargs)
d14a1e28 6003
4276dc52
RD
6004 def SetWindowVariant(*args, **kwargs):
6005 """
a95a7133 6006 SetWindowVariant(self, int variant)
4276dc52 6007
41e2b43e
RD
6008 Sets the variant of the window/font size to use for this window, if
6009 the platform supports variants, for example, wxMac.
4276dc52 6010 """
54f9ee45 6011 return _core_.Window_SetWindowVariant(*args, **kwargs)
4276dc52
RD
6012
6013 def GetWindowVariant(*args, **kwargs):
a95a7133 6014 """GetWindowVariant(self) -> int"""
54f9ee45 6015 return _core_.Window_GetWindowVariant(*args, **kwargs)
4276dc52 6016
e811c8ce 6017 def SetId(*args, **kwargs):
15afbcd0 6018 """
a95a7133 6019 SetId(self, int winid)
15afbcd0
RD
6020
6021 Sets the identifier of the window. Each window has an integer
6022 identifier. If the application has not provided one, an identifier
6023 will be generated. Normally, the identifier should be provided on
6024 creation and should not be modified subsequently.
6025 """
54f9ee45 6026 return _core_.Window_SetId(*args, **kwargs)
d14a1e28 6027
e811c8ce 6028 def GetId(*args, **kwargs):
15afbcd0 6029 """
a95a7133 6030 GetId(self) -> int
15afbcd0
RD
6031
6032 Returns the identifier of the window. Each window has an integer
6033 identifier. If the application has not provided one (or the default Id
6034 -1 is used) then an unique identifier with a negative value will be
6035 generated.
6036 """
54f9ee45 6037 return _core_.Window_GetId(*args, **kwargs)
d14a1e28 6038
e811c8ce 6039 def NewControlId(*args, **kwargs):
15afbcd0 6040 """
66c033b4 6041 NewControlId() -> int
15afbcd0
RD
6042
6043 Generate a control id for the controls which were not given one.
6044 """
54f9ee45 6045 return _core_.Window_NewControlId(*args, **kwargs)
d14a1e28 6046
e811c8ce
RD
6047 NewControlId = staticmethod(NewControlId)
6048 def NextControlId(*args, **kwargs):
15afbcd0 6049 """
66c033b4 6050 NextControlId(int winid) -> int
15afbcd0
RD
6051
6052 Get the id of the control following the one with the given
41e2b43e 6053 autogenerated) id
15afbcd0 6054 """
54f9ee45 6055 return _core_.Window_NextControlId(*args, **kwargs)
d14a1e28 6056
e811c8ce
RD
6057 NextControlId = staticmethod(NextControlId)
6058 def PrevControlId(*args, **kwargs):
15afbcd0 6059 """
66c033b4 6060 PrevControlId(int winid) -> int
15afbcd0
RD
6061
6062 Get the id of the control preceding the one with the given
41e2b43e 6063 autogenerated) id
15afbcd0 6064 """
54f9ee45 6065 return _core_.Window_PrevControlId(*args, **kwargs)
d14a1e28 6066
e811c8ce
RD
6067 PrevControlId = staticmethod(PrevControlId)
6068 def SetSize(*args, **kwargs):
15afbcd0 6069 """
a95a7133 6070 SetSize(self, Size size)
15afbcd0
RD
6071
6072 Sets the size of the window in pixels.
6073 """
54f9ee45 6074 return _core_.Window_SetSize(*args, **kwargs)
d14a1e28 6075
e811c8ce 6076 def SetDimensions(*args, **kwargs):
15afbcd0 6077 """
a95a7133 6078 SetDimensions(self, int x, int y, int width, int height, int sizeFlags=SIZE_AUTO)
15afbcd0
RD
6079
6080 Sets the position and size of the window in pixels. The sizeFlags
6081 parameter indicates the interpretation of the other params if they are
e505d15e
RD
6082 equal to -1.
6083
6084 ======================== ======================================
6085 wx.SIZE_AUTO A -1 indicates that a class-specific
6086 default should be used.
6087 wx.SIZE_USE_EXISTING Axisting dimensions should be used if
6088 -1 values are supplied.
6089 wxSIZE_ALLOW_MINUS_ONE Allow dimensions of -1 and less to be
6090 interpreted as real dimensions, not
6091 default values.
6092 ======================== ======================================
6093
15afbcd0 6094 """
54f9ee45 6095 return _core_.Window_SetDimensions(*args, **kwargs)
d14a1e28 6096
e811c8ce 6097 def SetRect(*args, **kwargs):
15afbcd0 6098 """
a95a7133 6099 SetRect(self, Rect rect, int sizeFlags=SIZE_AUTO)
15afbcd0
RD
6100
6101 Sets the position and size of the window in pixels using a wx.Rect.
6102 """
54f9ee45 6103 return _core_.Window_SetRect(*args, **kwargs)
d14a1e28 6104
e811c8ce 6105 def SetSizeWH(*args, **kwargs):
15afbcd0 6106 """
a95a7133 6107 SetSizeWH(self, int width, int height)
15afbcd0
RD
6108
6109 Sets the size of the window in pixels.
6110 """
54f9ee45 6111 return _core_.Window_SetSizeWH(*args, **kwargs)
d14a1e28 6112
e811c8ce 6113 def Move(*args, **kwargs):
15afbcd0 6114 """
a95a7133 6115 Move(self, Point pt, int flags=SIZE_USE_EXISTING)
15afbcd0
RD
6116
6117 Moves the window to the given position.
6118 """
54f9ee45 6119 return _core_.Window_Move(*args, **kwargs)
d14a1e28 6120
e811c8ce
RD
6121 SetPosition = Move
6122 def MoveXY(*args, **kwargs):
15afbcd0 6123 """
a95a7133 6124 MoveXY(self, int x, int y, int flags=SIZE_USE_EXISTING)
15afbcd0
RD
6125
6126 Moves the window to the given position.
6127 """
54f9ee45 6128 return _core_.Window_MoveXY(*args, **kwargs)
e811c8ce 6129
f8167d6e
RD
6130 def SetBestFittingSize(*args, **kwargs):
6131 """
6132 SetBestFittingSize(self, Size size=DefaultSize)
6133
6134 A 'Smart' SetSize that will fill in default size components with the
6135 window's *best size* values. Also set's the minsize for use with sizers.
6136 """
6137 return _core_.Window_SetBestFittingSize(*args, **kwargs)
6138
e811c8ce 6139 def Raise(*args, **kwargs):
15afbcd0 6140 """
a95a7133 6141 Raise(self)
15afbcd0
RD
6142
6143 Raises the window to the top of the window hierarchy if it is a
6144 managed window (dialog or frame).
6145 """
54f9ee45 6146 return _core_.Window_Raise(*args, **kwargs)
e811c8ce
RD
6147
6148 def Lower(*args, **kwargs):
15afbcd0 6149 """
a95a7133 6150 Lower(self)
15afbcd0
RD
6151
6152 Lowers the window to the bottom of the window hierarchy if it is a
6153 managed window (dialog or frame).
6154 """
54f9ee45 6155 return _core_.Window_Lower(*args, **kwargs)
e811c8ce
RD
6156
6157 def SetClientSize(*args, **kwargs):
15afbcd0 6158 """
a95a7133 6159 SetClientSize(self, Size size)
15afbcd0
RD
6160
6161 This sets the size of the window client area in pixels. Using this
6162 function to size a window tends to be more device-independent than
6163 wx.Window.SetSize, since the application need not worry about what
6164 dimensions the border or title bar have when trying to fit the window
6165 around panel items, for example.
6166 """
54f9ee45 6167 return _core_.Window_SetClientSize(*args, **kwargs)
e811c8ce
RD
6168
6169 def SetClientSizeWH(*args, **kwargs):
15afbcd0 6170 """
a95a7133 6171 SetClientSizeWH(self, int width, int height)
15afbcd0
RD
6172
6173 This sets the size of the window client area in pixels. Using this
6174 function to size a window tends to be more device-independent than
6175 wx.Window.SetSize, since the application need not worry about what
6176 dimensions the border or title bar have when trying to fit the window
6177 around panel items, for example.
6178 """
54f9ee45 6179 return _core_.Window_SetClientSizeWH(*args, **kwargs)
e811c8ce
RD
6180
6181 def SetClientRect(*args, **kwargs):
15afbcd0 6182 """
a95a7133 6183 SetClientRect(self, Rect rect)
15afbcd0
RD
6184
6185 This sets the size of the window client area in pixels. Using this
6186 function to size a window tends to be more device-independent than
6187 wx.Window.SetSize, since the application need not worry about what
6188 dimensions the border or title bar have when trying to fit the window
6189 around panel items, for example.
6190 """
54f9ee45 6191 return _core_.Window_SetClientRect(*args, **kwargs)
e811c8ce
RD
6192
6193 def GetPosition(*args, **kwargs):
0df68c9f 6194 """
a95a7133 6195 GetPosition(self) -> Point
e811c8ce 6196
0df68c9f
RD
6197 Get the window's position.
6198 """
54f9ee45 6199 return _core_.Window_GetPosition(*args, **kwargs)
e811c8ce
RD
6200
6201 def GetPositionTuple(*args, **kwargs):
0df68c9f
RD
6202 """
6203 GetPositionTuple() -> (x,y)
e811c8ce 6204
0df68c9f
RD
6205 Get the window's position.
6206 """
54f9ee45 6207 return _core_.Window_GetPositionTuple(*args, **kwargs)
e811c8ce
RD
6208
6209 def GetSize(*args, **kwargs):
0df68c9f 6210 """
a95a7133 6211 GetSize(self) -> Size
e811c8ce 6212
0df68c9f
RD
6213 Get the window size.
6214 """
54f9ee45 6215 return _core_.Window_GetSize(*args, **kwargs)
e811c8ce
RD
6216
6217 def GetSizeTuple(*args, **kwargs):
0df68c9f
RD
6218 """
6219 GetSizeTuple() -> (width, height)
e811c8ce 6220
0df68c9f
RD
6221 Get the window size.
6222 """
54f9ee45 6223 return _core_.Window_GetSizeTuple(*args, **kwargs)
e811c8ce
RD
6224
6225 def GetRect(*args, **kwargs):
15afbcd0 6226 """
a95a7133 6227 GetRect(self) -> Rect
15afbcd0
RD
6228
6229 Returns the size and position of the window as a wx.Rect object.
6230 """
54f9ee45 6231 return _core_.Window_GetRect(*args, **kwargs)
e811c8ce
RD
6232
6233 def GetClientSize(*args, **kwargs):
0df68c9f 6234 """
a95a7133 6235 GetClientSize(self) -> Size
e811c8ce 6236
15afbcd0
RD
6237 This gets the size of the window's 'client area' in pixels. The client
6238 area is the area which may be drawn on by the programmer, excluding
6239 title bar, border, scrollbars, etc.
0df68c9f 6240 """
54f9ee45 6241 return _core_.Window_GetClientSize(*args, **kwargs)
e811c8ce
RD
6242
6243 def GetClientSizeTuple(*args, **kwargs):
0df68c9f
RD
6244 """
6245 GetClientSizeTuple() -> (width, height)
e811c8ce 6246
15afbcd0
RD
6247 This gets the size of the window's 'client area' in pixels. The client
6248 area is the area which may be drawn on by the programmer, excluding
6249 title bar, border, scrollbars, etc.
0df68c9f 6250 """
54f9ee45 6251 return _core_.Window_GetClientSizeTuple(*args, **kwargs)
e811c8ce
RD
6252
6253 def GetClientAreaOrigin(*args, **kwargs):
15afbcd0 6254 """
a95a7133 6255 GetClientAreaOrigin(self) -> Point
15afbcd0
RD
6256
6257 Get the origin of the client area of the window relative to the
6258 window's top left corner (the client area may be shifted because of
6259 the borders, scrollbars, other decorations...)
6260 """
54f9ee45 6261 return _core_.Window_GetClientAreaOrigin(*args, **kwargs)
e811c8ce
RD
6262
6263 def GetClientRect(*args, **kwargs):
15afbcd0 6264 """
a95a7133 6265 GetClientRect(self) -> Rect
15afbcd0 6266
61863841 6267 Get the client area position and size as a `wx.Rect` object.
15afbcd0 6268 """
54f9ee45 6269 return _core_.Window_GetClientRect(*args, **kwargs)
e811c8ce
RD
6270
6271 def GetBestSize(*args, **kwargs):
0df68c9f 6272 """
a95a7133 6273 GetBestSize(self) -> Size
e811c8ce 6274
248ed943 6275 This function returns the best acceptable minimal size for the
41e2b43e
RD
6276 window, if applicable. For example, for a static text control, it will
6277 be the minimal size such that the control label is not truncated. For
6278 windows containing subwindows (suzh aswx.Panel), the size returned by
6279 this function will be the same as the size the window would have had
6280 after calling Fit.
0df68c9f 6281 """
54f9ee45 6282 return _core_.Window_GetBestSize(*args, **kwargs)
e811c8ce
RD
6283
6284 def GetBestSizeTuple(*args, **kwargs):
0df68c9f
RD
6285 """
6286 GetBestSizeTuple() -> (width, height)
e811c8ce 6287
248ed943 6288 This function returns the best acceptable minimal size for the
41e2b43e
RD
6289 window, if applicable. For example, for a static text control, it will
6290 be the minimal size such that the control label is not truncated. For
6291 windows containing subwindows (suzh aswx.Panel), the size returned by
6292 this function will be the same as the size the window would have had
6293 after calling Fit.
0df68c9f 6294 """
54f9ee45 6295 return _core_.Window_GetBestSizeTuple(*args, **kwargs)
e811c8ce 6296
dfbb5885
RD
6297 def InvalidateBestSize(*args, **kwargs):
6298 """
6299 InvalidateBestSize(self)
6300
6301 Reset the cached best size value so it will be recalculated the next
6302 time it is needed.
6303 """
6304 return _core_.Window_InvalidateBestSize(*args, **kwargs)
6305
6306 def GetBestFittingSize(*args, **kwargs):
6307 """
6308 GetBestFittingSize(self) -> Size
6309
6310 This function will merge the window's best size into the window's
6311 minimum size, giving priority to the min size components, and returns
6312 the results.
6313
6314 """
6315 return _core_.Window_GetBestFittingSize(*args, **kwargs)
6316
e811c8ce 6317 def GetAdjustedBestSize(*args, **kwargs):
15afbcd0 6318 """
a95a7133 6319 GetAdjustedBestSize(self) -> Size
15afbcd0
RD
6320
6321 This method is similar to GetBestSize, except in one
6322 thing. GetBestSize should return the minimum untruncated size of the
6323 window, while this method will return the largest of BestSize and any
6324 user specified minimum size. ie. it is the minimum size the window
6325 should currently be drawn at, not the minimal size it can possibly
6326 tolerate.
6327 """
54f9ee45 6328 return _core_.Window_GetAdjustedBestSize(*args, **kwargs)
e811c8ce
RD
6329
6330 def Center(*args, **kwargs):
15afbcd0 6331 """
a95a7133 6332 Center(self, int direction=BOTH)
15afbcd0
RD
6333
6334 Centers the window. The parameter specifies the direction for
6335 cetering, and may be wx.HORIZONTAL, wx.VERTICAL or wx.BOTH. It may
6336 also include wx.CENTER_ON_SCREEN flag if you want to center the window
6337 on the entire screen and not on its parent window. If it is a
6338 top-level window and has no parent then it will always be centered
6339 relative to the screen.
6340 """
54f9ee45 6341 return _core_.Window_Center(*args, **kwargs)
e811c8ce
RD
6342
6343 Centre = Center
6344 def CenterOnScreen(*args, **kwargs):
15afbcd0 6345 """
a95a7133 6346 CenterOnScreen(self, int dir=BOTH)
15afbcd0
RD
6347
6348 Center on screen (only works for top level windows)
6349 """
54f9ee45 6350 return _core_.Window_CenterOnScreen(*args, **kwargs)
e811c8ce
RD
6351
6352 CentreOnScreen = CenterOnScreen
6353 def CenterOnParent(*args, **kwargs):
15afbcd0 6354 """
a95a7133 6355 CenterOnParent(self, int dir=BOTH)
15afbcd0
RD
6356
6357 Center with respect to the the parent window
6358 """
54f9ee45 6359 return _core_.Window_CenterOnParent(*args, **kwargs)
e811c8ce
RD
6360
6361 CentreOnParent = CenterOnParent
6362 def Fit(*args, **kwargs):
15afbcd0 6363 """
a95a7133 6364 Fit(self)
15afbcd0
RD
6365
6366 Sizes the window so that it fits around its subwindows. This function
6367 won't do anything if there are no subwindows and will only really work
6368 correctly if sizers are used for the subwindows layout. Also, if the
6369 window has exactly one subwindow it is better (faster and the result
6370 is more precise as Fit adds some margin to account for fuzziness of
6371 its calculations) to call window.SetClientSize(child.GetSize())
6372 instead of calling Fit.
6373 """
54f9ee45 6374 return _core_.Window_Fit(*args, **kwargs)
e811c8ce
RD
6375
6376 def FitInside(*args, **kwargs):
15afbcd0 6377 """
a95a7133 6378 FitInside(self)
15afbcd0
RD
6379
6380 Similar to Fit, but sizes the interior (virtual) size of a
6381 window. Mainly useful with scrolled windows to reset scrollbars after
6382 sizing changes that do not trigger a size event, and/or scrolled
6383 windows without an interior sizer. This function similarly won't do
6384 anything if there are no subwindows.
6385 """
54f9ee45 6386 return _core_.Window_FitInside(*args, **kwargs)
e811c8ce 6387
f16ab95d 6388 def SetSizeHints(*args, **kwargs):
0df68c9f 6389 """
a95a7133 6390 SetSizeHints(self, int minW, int minH, int maxW=-1, int maxH=-1, int incW=-1,
0df68c9f 6391 int incH=-1)
15afbcd0
RD
6392
6393 Allows specification of minimum and maximum window sizes, and window
6394 size increments. If a pair of values is not set (or set to -1), the
6395 default values will be used. If this function is called, the user
908b74cd
RD
6396 will not be able to size the window outside the given bounds (if it is
6397 a top-level window.) Sizers will also inspect the minimum window size
6398 and will use that value if set when calculating layout.
6399
6400 The resizing increments are only significant under Motif or Xt.
0df68c9f 6401 """
f16ab95d 6402 return _core_.Window_SetSizeHints(*args, **kwargs)
e811c8ce 6403
f16ab95d
RD
6404 def SetSizeHintsSz(*args, **kwargs):
6405 """
6406 SetSizeHintsSz(self, Size minSize, Size maxSize=DefaultSize, Size incSize=DefaultSize)
6407
6408 Allows specification of minimum and maximum window sizes, and window
6409 size increments. If a pair of values is not set (or set to -1), the
6410 default values will be used. If this function is called, the user
6411 will not be able to size the window outside the given bounds (if it is
6412 a top-level window.) Sizers will also inspect the minimum window size
6413 and will use that value if set when calculating layout.
6414
6415 The resizing increments are only significant under Motif or Xt.
6416 """
6417 return _core_.Window_SetSizeHintsSz(*args, **kwargs)
6418
6419 def SetVirtualSizeHints(*args, **kwargs):
15afbcd0 6420 """
908b74cd 6421 SetVirtualSizeHints(self, int minW, int minH, int maxW=-1, int maxH=-1)
15afbcd0
RD
6422
6423 Allows specification of minimum and maximum virtual window sizes. If a
6424 pair of values is not set (or set to -1), the default values will be
6425 used. If this function is called, the user will not be able to size
6426 the virtual area of the window outside the given bounds.
6427 """
f16ab95d
RD
6428 return _core_.Window_SetVirtualSizeHints(*args, **kwargs)
6429
6430 def SetVirtualSizeHintsSz(*args, **kwargs):
6431 """
6432 SetVirtualSizeHintsSz(self, Size minSize, Size maxSize=DefaultSize)
6433
6434 Allows specification of minimum and maximum virtual window sizes. If a
6435 pair of values is not set (or set to -1), the default values will be
6436 used. If this function is called, the user will not be able to size
6437 the virtual area of the window outside the given bounds.
6438 """
6439 return _core_.Window_SetVirtualSizeHintsSz(*args, **kwargs)
e811c8ce 6440
908b74cd
RD
6441 def GetMaxSize(*args, **kwargs):
6442 """GetMaxSize(self) -> Size"""
6443 return _core_.Window_GetMaxSize(*args, **kwargs)
6444
6445 def GetMinSize(*args, **kwargs):
6446 """GetMinSize(self) -> Size"""
6447 return _core_.Window_GetMinSize(*args, **kwargs)
6448
6449 def SetMinSize(*args, **kwargs):
6450 """
6451 SetMinSize(self, Size minSize)
6452
6453 A more convenient method than `SetSizeHints` for setting just the
6454 min size.
6455 """
6456 return _core_.Window_SetMinSize(*args, **kwargs)
6457
6458 def SetMaxSize(*args, **kwargs):
6459 """
6460 SetMaxSize(self, Size maxSize)
6461
6462 A more convenient method than `SetSizeHints` for setting just the
6463 max size.
6464 """
6465 return _core_.Window_SetMaxSize(*args, **kwargs)
6466
e811c8ce 6467 def GetMinWidth(*args, **kwargs):
a95a7133 6468 """GetMinWidth(self) -> int"""
54f9ee45 6469 return _core_.Window_GetMinWidth(*args, **kwargs)
e811c8ce
RD
6470
6471 def GetMinHeight(*args, **kwargs):
a95a7133 6472 """GetMinHeight(self) -> int"""
54f9ee45 6473 return _core_.Window_GetMinHeight(*args, **kwargs)
e811c8ce
RD
6474
6475 def GetMaxWidth(*args, **kwargs):
a95a7133 6476 """GetMaxWidth(self) -> int"""
54f9ee45 6477 return _core_.Window_GetMaxWidth(*args, **kwargs)
e811c8ce
RD
6478
6479 def GetMaxHeight(*args, **kwargs):
a95a7133 6480 """GetMaxHeight(self) -> int"""
54f9ee45 6481 return _core_.Window_GetMaxHeight(*args, **kwargs)
e811c8ce 6482
e811c8ce 6483 def SetVirtualSize(*args, **kwargs):
0df68c9f 6484 """
a95a7133 6485 SetVirtualSize(self, Size size)
e811c8ce 6486
15afbcd0
RD
6487 Set the the virtual size of a window in pixels. For most windows this
6488 is just the client area of the window, but for some like scrolled
6489 windows it is more or less independent of the screen window size.
0df68c9f 6490 """
54f9ee45 6491 return _core_.Window_SetVirtualSize(*args, **kwargs)
e811c8ce
RD
6492
6493 def SetVirtualSizeWH(*args, **kwargs):
0df68c9f 6494 """
a95a7133 6495 SetVirtualSizeWH(self, int w, int h)
e811c8ce 6496
15afbcd0
RD
6497 Set the the virtual size of a window in pixels. For most windows this
6498 is just the client area of the window, but for some like scrolled
6499 windows it is more or less independent of the screen window size.
0df68c9f 6500 """
54f9ee45 6501 return _core_.Window_SetVirtualSizeWH(*args, **kwargs)
e811c8ce
RD
6502
6503 def GetVirtualSize(*args, **kwargs):
0df68c9f 6504 """
a95a7133 6505 GetVirtualSize(self) -> Size
e811c8ce 6506
15afbcd0
RD
6507 Get the the virtual size of the window in pixels. For most windows
6508 this is just the client area of the window, but for some like scrolled
6509 windows it is more or less independent of the screen window size.
0df68c9f 6510 """
54f9ee45 6511 return _core_.Window_GetVirtualSize(*args, **kwargs)
e811c8ce
RD
6512
6513 def GetVirtualSizeTuple(*args, **kwargs):
0df68c9f
RD
6514 """
6515 GetVirtualSizeTuple() -> (width, height)
e811c8ce 6516
15afbcd0
RD
6517 Get the the virtual size of the window in pixels. For most windows
6518 this is just the client area of the window, but for some like scrolled
6519 windows it is more or less independent of the screen window size.
0df68c9f 6520 """
54f9ee45 6521 return _core_.Window_GetVirtualSizeTuple(*args, **kwargs)
e811c8ce
RD
6522
6523 def GetBestVirtualSize(*args, **kwargs):
15afbcd0 6524 """
a95a7133 6525 GetBestVirtualSize(self) -> Size
15afbcd0
RD
6526
6527 Return the largest of ClientSize and BestSize (as determined by a
6528 sizer, interior children, or other means)
6529 """
54f9ee45 6530 return _core_.Window_GetBestVirtualSize(*args, **kwargs)
e811c8ce
RD
6531
6532 def Show(*args, **kwargs):
15afbcd0 6533 """
a95a7133 6534 Show(self, bool show=True) -> bool
15afbcd0
RD
6535
6536 Shows or hides the window. You may need to call Raise for a top level
6537 window if you want to bring it to top, although this is not needed if
6538 Show is called immediately after the frame creation. Returns True if
6539 the window has been shown or hidden or False if nothing was done
6540 because it already was in the requested state.
6541 """
54f9ee45 6542 return _core_.Window_Show(*args, **kwargs)
e811c8ce
RD
6543
6544 def Hide(*args, **kwargs):
15afbcd0 6545 """
a95a7133 6546 Hide(self) -> bool
15afbcd0
RD
6547
6548 Equivalent to calling Show(False).
6549 """
54f9ee45 6550 return _core_.Window_Hide(*args, **kwargs)
e811c8ce
RD
6551
6552 def Enable(*args, **kwargs):
15afbcd0 6553 """
a95a7133 6554 Enable(self, bool enable=True) -> bool
15afbcd0
RD
6555
6556 Enable or disable the window for user input. Note that when a parent
6557 window is disabled, all of its children are disabled as well and they
6558 are reenabled again when the parent is. Returns true if the window
6559 has been enabled or disabled, false if nothing was done, i.e. if the
6560 window had already been in the specified state.
6561 """
54f9ee45 6562 return _core_.Window_Enable(*args, **kwargs)
e811c8ce
RD
6563
6564 def Disable(*args, **kwargs):
15afbcd0 6565 """
a95a7133 6566 Disable(self) -> bool
15afbcd0
RD
6567
6568 Disables the window, same as Enable(false).
6569 """
54f9ee45 6570 return _core_.Window_Disable(*args, **kwargs)
e811c8ce
RD
6571
6572 def IsShown(*args, **kwargs):
15afbcd0 6573 """
a95a7133 6574 IsShown(self) -> bool
15afbcd0
RD
6575
6576 Returns true if the window is shown, false if it has been hidden.
6577 """
54f9ee45 6578 return _core_.Window_IsShown(*args, **kwargs)
e811c8ce
RD
6579
6580 def IsEnabled(*args, **kwargs):
15afbcd0 6581 """
a95a7133 6582 IsEnabled(self) -> bool
15afbcd0
RD
6583
6584 Returns true if the window is enabled for input, false otherwise.
6585 """
54f9ee45 6586 return _core_.Window_IsEnabled(*args, **kwargs)
e811c8ce
RD
6587
6588 def SetWindowStyleFlag(*args, **kwargs):
15afbcd0 6589 """
a95a7133 6590 SetWindowStyleFlag(self, long style)
15afbcd0 6591
41e2b43e
RD
6592 Sets the style of the window. Please note that some styles cannot be
6593 changed after the window creation and that Refresh() might need to be
6594 called after changing the others for the change to take place
6595 immediately.
15afbcd0 6596 """
54f9ee45 6597 return _core_.Window_SetWindowStyleFlag(*args, **kwargs)
e811c8ce
RD
6598
6599 def GetWindowStyleFlag(*args, **kwargs):
15afbcd0 6600 """
a95a7133 6601 GetWindowStyleFlag(self) -> long
e811c8ce 6602
15afbcd0
RD
6603 Gets the window style that was passed to the constructor or Create
6604 method.
6605 """
54f9ee45 6606 return _core_.Window_GetWindowStyleFlag(*args, **kwargs)
e811c8ce 6607
15afbcd0 6608 SetWindowStyle = SetWindowStyleFlag; GetWindowStyle = GetWindowStyleFlag
e811c8ce 6609 def HasFlag(*args, **kwargs):
15afbcd0 6610 """
a95a7133 6611 HasFlag(self, int flag) -> bool
15afbcd0
RD
6612
6613 Test if the given style is set for this window.
6614 """
54f9ee45 6615 return _core_.Window_HasFlag(*args, **kwargs)
e811c8ce
RD
6616
6617 def IsRetained(*args, **kwargs):
15afbcd0 6618 """
a95a7133 6619 IsRetained(self) -> bool
15afbcd0
RD
6620
6621 Returns true if the window is retained, false otherwise. Retained
6622 windows are only available on X platforms.
6623 """
54f9ee45 6624 return _core_.Window_IsRetained(*args, **kwargs)
e811c8ce
RD
6625
6626 def SetExtraStyle(*args, **kwargs):
15afbcd0 6627 """
a95a7133 6628 SetExtraStyle(self, long exStyle)
15afbcd0
RD
6629
6630 Sets the extra style bits for the window. Extra styles are the less
6631 often used style bits which can't be set with the constructor or with
6632 SetWindowStyleFlag()
6633 """
54f9ee45 6634 return _core_.Window_SetExtraStyle(*args, **kwargs)
e811c8ce
RD
6635
6636 def GetExtraStyle(*args, **kwargs):
15afbcd0 6637 """
a95a7133 6638 GetExtraStyle(self) -> long
15afbcd0
RD
6639
6640 Returns the extra style bits for the window.
6641 """
54f9ee45 6642 return _core_.Window_GetExtraStyle(*args, **kwargs)
e811c8ce
RD
6643
6644 def MakeModal(*args, **kwargs):
15afbcd0 6645 """
a95a7133 6646 MakeModal(self, bool modal=True)
15afbcd0
RD
6647
6648 Disables all other windows in the application so that the user can
6649 only interact with this window. Passing False will reverse this
6650 effect.
6651 """
54f9ee45 6652 return _core_.Window_MakeModal(*args, **kwargs)
e811c8ce
RD
6653
6654 def SetThemeEnabled(*args, **kwargs):
15afbcd0 6655 """
a95a7133 6656 SetThemeEnabled(self, bool enableTheme)
15afbcd0
RD
6657
6658 This function tells a window if it should use the system's "theme"
6659 code to draw the windows' background instead if its own background
6660 drawing code. This will only have an effect on platforms that support
6661 the notion of themes in user defined windows. One such platform is
6662 GTK+ where windows can have (very colourful) backgrounds defined by a
6663 user's selected theme.
6664
6665 Dialogs, notebook pages and the status bar have this flag set to true
6666 by default so that the default look and feel is simulated best.
6667 """
54f9ee45 6668 return _core_.Window_SetThemeEnabled(*args, **kwargs)
e811c8ce
RD
6669
6670 def GetThemeEnabled(*args, **kwargs):
15afbcd0 6671 """
a95a7133 6672 GetThemeEnabled(self) -> bool
e811c8ce 6673
15afbcd0
RD
6674 Return the themeEnabled flag.
6675 """
54f9ee45 6676 return _core_.Window_GetThemeEnabled(*args, **kwargs)
e811c8ce
RD
6677
6678 def SetFocus(*args, **kwargs):
15afbcd0 6679 """
a95a7133 6680 SetFocus(self)
15afbcd0
RD
6681
6682 Set's the focus to this window, allowing it to receive keyboard input.
6683 """
54f9ee45 6684 return _core_.Window_SetFocus(*args, **kwargs)
e811c8ce
RD
6685
6686 def SetFocusFromKbd(*args, **kwargs):
15afbcd0 6687 """
a95a7133 6688 SetFocusFromKbd(self)
15afbcd0
RD
6689
6690 Set focus to this window as the result of a keyboard action. Normally
6691 only called internally.
6692 """
54f9ee45 6693 return _core_.Window_SetFocusFromKbd(*args, **kwargs)
e811c8ce
RD
6694
6695 def FindFocus(*args, **kwargs):
15afbcd0 6696 """
66c033b4 6697 FindFocus() -> Window
15afbcd0
RD
6698
6699 Returns the window or control that currently has the keyboard focus,
6700 or None.
6701 """
54f9ee45 6702 return _core_.Window_FindFocus(*args, **kwargs)
e811c8ce
RD
6703
6704 FindFocus = staticmethod(FindFocus)
6705 def AcceptsFocus(*args, **kwargs):
15afbcd0 6706 """
a95a7133 6707 AcceptsFocus(self) -> bool
15afbcd0
RD
6708
6709 Can this window have focus?
6710 """
54f9ee45 6711 return _core_.Window_AcceptsFocus(*args, **kwargs)
e811c8ce
RD
6712
6713 def AcceptsFocusFromKeyboard(*args, **kwargs):
15afbcd0 6714 """
a95a7133 6715 AcceptsFocusFromKeyboard(self) -> bool
15afbcd0
RD
6716
6717 Can this window be given focus by keyboard navigation? if not, the
6718 only way to give it focus (provided it accepts it at all) is to click
6719 it.
6720 """
54f9ee45 6721 return _core_.Window_AcceptsFocusFromKeyboard(*args, **kwargs)
e811c8ce
RD
6722
6723 def GetDefaultItem(*args, **kwargs):
15afbcd0 6724 """
a95a7133 6725 GetDefaultItem(self) -> Window
15afbcd0
RD
6726
6727 Get the default child of this parent, i.e. the one which is activated
6728 by pressing <Enter> such as the OK button on a wx.Dialog.
6729 """
54f9ee45 6730 return _core_.Window_GetDefaultItem(*args, **kwargs)
e811c8ce
RD
6731
6732 def SetDefaultItem(*args, **kwargs):
15afbcd0 6733 """
a95a7133 6734 SetDefaultItem(self, Window child) -> Window
15afbcd0
RD
6735
6736 Set this child as default, return the old default.
6737 """
54f9ee45 6738 return _core_.Window_SetDefaultItem(*args, **kwargs)
e811c8ce
RD
6739
6740 def SetTmpDefaultItem(*args, **kwargs):
15afbcd0 6741 """
a95a7133 6742 SetTmpDefaultItem(self, Window win)
15afbcd0
RD
6743
6744 Set this child as temporary default
6745 """
54f9ee45 6746 return _core_.Window_SetTmpDefaultItem(*args, **kwargs)
e811c8ce 6747
908b74cd
RD
6748 def Navigate(*args, **kwargs):
6749 """
6750 Navigate(self, int flags=NavigationKeyEvent.IsForward) -> bool
6751
fd2dc343
RD
6752 Does keyboard navigation from this window to another, by sending a
6753 `wx.NavigationKeyEvent`.
908b74cd
RD
6754 """
6755 return _core_.Window_Navigate(*args, **kwargs)
6756
7f98d120
RD
6757 def MoveAfterInTabOrder(*args, **kwargs):
6758 """
6759 MoveAfterInTabOrder(self, Window win)
6760
6761 Moves this window in the tab navigation order after the specified
6762 sibling window. This means that when the user presses the TAB key on
6763 that other window, the focus switches to this window.
6764
6765 The default tab order is the same as creation order. This function
6766 and `MoveBeforeInTabOrder` allow to change it after creating all the
6767 windows.
6768
6769 """
6770 return _core_.Window_MoveAfterInTabOrder(*args, **kwargs)
6771
6772 def MoveBeforeInTabOrder(*args, **kwargs):
6773 """
6774 MoveBeforeInTabOrder(self, Window win)
6775
6776 Same as `MoveAfterInTabOrder` except that it inserts this window just
6777 before win instead of putting it right after it.
6778 """
6779 return _core_.Window_MoveBeforeInTabOrder(*args, **kwargs)
6780
e811c8ce 6781 def GetChildren(*args, **kwargs):
15afbcd0 6782 """
a95a7133 6783 GetChildren(self) -> PyObject
15afbcd0
RD
6784
6785 Returns a list of the window's children. NOTE: Currently this is a
6786 copy of the child window list maintained by the window, so the return
6787 value of this function is only valid as long as the window's children
6788 do not change.
6789 """
54f9ee45 6790 return _core_.Window_GetChildren(*args, **kwargs)
e811c8ce
RD
6791
6792 def GetParent(*args, **kwargs):
15afbcd0 6793 """
a95a7133 6794 GetParent(self) -> Window
15afbcd0
RD
6795
6796 Returns the parent window of this window, or None if there isn't one.
6797 """
54f9ee45 6798 return _core_.Window_GetParent(*args, **kwargs)
e811c8ce
RD
6799
6800 def GetGrandParent(*args, **kwargs):
15afbcd0 6801 """
a95a7133 6802 GetGrandParent(self) -> Window
15afbcd0 6803
41e2b43e
RD
6804 Returns the parent of the parent of this window, or None if there
6805 isn't one.
15afbcd0 6806 """
54f9ee45 6807 return _core_.Window_GetGrandParent(*args, **kwargs)
e811c8ce
RD
6808
6809 def IsTopLevel(*args, **kwargs):
15afbcd0 6810 """
a95a7133 6811 IsTopLevel(self) -> bool
15afbcd0
RD
6812
6813 Returns true if the given window is a top-level one. Currently all
6814 frames and dialogs are always considered to be top-level windows (even
6815 if they have a parent window).
6816 """
54f9ee45 6817 return _core_.Window_IsTopLevel(*args, **kwargs)
e811c8ce
RD
6818
6819 def Reparent(*args, **kwargs):
15afbcd0 6820 """
a95a7133 6821 Reparent(self, Window newParent) -> bool
15afbcd0
RD
6822
6823 Reparents the window, i.e the window will be removed from its current
6824 parent window (e.g. a non-standard toolbar in a wxFrame) and then
6825 re-inserted into another. Available on Windows and GTK. Returns True
6826 if the parent was changed, False otherwise (error or newParent ==
6827 oldParent)
6828 """
54f9ee45 6829 return _core_.Window_Reparent(*args, **kwargs)
e811c8ce
RD
6830
6831 def AddChild(*args, **kwargs):
15afbcd0 6832 """
a95a7133 6833 AddChild(self, Window child)
15afbcd0
RD
6834
6835 Adds a child window. This is called automatically by window creation
6836 functions so should not be required by the application programmer.
6837 """
54f9ee45 6838 return _core_.Window_AddChild(*args, **kwargs)
e811c8ce
RD
6839
6840 def RemoveChild(*args, **kwargs):
15afbcd0 6841 """
a95a7133 6842 RemoveChild(self, Window child)
15afbcd0
RD
6843
6844 Removes a child window. This is called automatically by window
6845 deletion functions so should not be required by the application
6846 programmer.
6847 """
54f9ee45 6848 return _core_.Window_RemoveChild(*args, **kwargs)
e811c8ce
RD
6849
6850 def FindWindowById(*args, **kwargs):
15afbcd0 6851 """
a95a7133 6852 FindWindowById(self, long winid) -> Window
15afbcd0
RD
6853
6854 Find a chld of this window by window ID
6855 """
54f9ee45 6856 return _core_.Window_FindWindowById(*args, **kwargs)
e811c8ce
RD
6857
6858 def FindWindowByName(*args, **kwargs):
15afbcd0 6859 """
a95a7133 6860 FindWindowByName(self, String name) -> Window
15afbcd0
RD
6861
6862 Find a child of this window by name
6863 """
54f9ee45 6864 return _core_.Window_FindWindowByName(*args, **kwargs)
e811c8ce
RD
6865
6866 def GetEventHandler(*args, **kwargs):
15afbcd0 6867 """
a95a7133 6868 GetEventHandler(self) -> EvtHandler
15afbcd0
RD
6869
6870 Returns the event handler for this window. By default, the window is
6871 its own event handler.
6872 """
54f9ee45 6873 return _core_.Window_GetEventHandler(*args, **kwargs)
e811c8ce
RD
6874
6875 def SetEventHandler(*args, **kwargs):
15afbcd0 6876 """
a95a7133 6877 SetEventHandler(self, EvtHandler handler)
15afbcd0
RD
6878
6879 Sets the event handler for this window. An event handler is an object
6880 that is capable of processing the events sent to a window. By default,
6881 the window is its own event handler, but an application may wish to
6882 substitute another, for example to allow central implementation of
6883 event-handling for a variety of different window classes.
6884
41e2b43e 6885 It is usually better to use `wx.Window.PushEventHandler` since this sets
15afbcd0
RD
6886 up a chain of event handlers, where an event not handled by one event
6887 handler is handed to the next one in the chain.
6888 """
54f9ee45 6889 return _core_.Window_SetEventHandler(*args, **kwargs)
e811c8ce
RD
6890
6891 def PushEventHandler(*args, **kwargs):
15afbcd0 6892 """
a95a7133 6893 PushEventHandler(self, EvtHandler handler)
15afbcd0
RD
6894
6895 Pushes this event handler onto the event handler stack for the window.
6896 An event handler is an object that is capable of processing the events
6897 sent to a window. By default, the window is its own event handler, but
6898 an application may wish to substitute another, for example to allow
6899 central implementation of event-handling for a variety of different
6900 window classes.
6901
6902 wx.Window.PushEventHandler allows an application to set up a chain of
6903 event handlers, where an event not handled by one event handler is
41e2b43e 6904 handed to the next one in the chain. Use `wx.Window.PopEventHandler` to
15afbcd0
RD
6905 remove the event handler.
6906 """
54f9ee45 6907 return _core_.Window_PushEventHandler(*args, **kwargs)
e811c8ce
RD
6908
6909 def PopEventHandler(*args, **kwargs):
15afbcd0 6910 """
a95a7133 6911 PopEventHandler(self, bool deleteHandler=False) -> EvtHandler
15afbcd0
RD
6912
6913 Removes and returns the top-most event handler on the event handler
6914 stack. If deleteHandler is True then the wx.EvtHandler object will be
6915 destroyed after it is popped.
6916 """
54f9ee45 6917 return _core_.Window_PopEventHandler(*args, **kwargs)
e811c8ce
RD
6918
6919 def RemoveEventHandler(*args, **kwargs):
15afbcd0 6920 """
a95a7133 6921 RemoveEventHandler(self, EvtHandler handler) -> bool
15afbcd0 6922
41e2b43e
RD
6923 Find the given handler in the event handler chain and remove (but not
6924 delete) it from the event handler chain, return True if it was found
6925 and False otherwise (this also results in an assert failure so this
6926 function should only be called when the handler is supposed to be
6927 there.)
15afbcd0 6928 """
54f9ee45 6929 return _core_.Window_RemoveEventHandler(*args, **kwargs)
e811c8ce
RD
6930
6931 def SetValidator(*args, **kwargs):
15afbcd0 6932 """
a95a7133 6933 SetValidator(self, Validator validator)
15afbcd0
RD
6934
6935 Deletes the current validator (if any) and sets the window validator,
6936 having called wx.Validator.Clone to create a new validator of this
6937 type.
6938 """
54f9ee45 6939 return _core_.Window_SetValidator(*args, **kwargs)
e811c8ce
RD
6940
6941 def GetValidator(*args, **kwargs):
15afbcd0 6942 """
a95a7133 6943 GetValidator(self) -> Validator
15afbcd0
RD
6944
6945 Returns a pointer to the current validator for the window, or None if
6946 there is none.
6947 """
54f9ee45 6948 return _core_.Window_GetValidator(*args, **kwargs)
e811c8ce 6949
74a57fcd
RD
6950 def Validate(*args, **kwargs):
6951 """
a95a7133 6952 Validate(self) -> bool
74a57fcd
RD
6953
6954 Validates the current values of the child controls using their
41e2b43e
RD
6955 validators. If the window has wx.WS_EX_VALIDATE_RECURSIVELY extra
6956 style flag set, the method will also call Validate() of all child
6957 windows. Returns false if any of the validations failed.
74a57fcd 6958 """
54f9ee45 6959 return _core_.Window_Validate(*args, **kwargs)
74a57fcd
RD
6960
6961 def TransferDataToWindow(*args, **kwargs):
6962 """
a95a7133 6963 TransferDataToWindow(self) -> bool
74a57fcd 6964
41e2b43e
RD
6965 Transfers values to child controls from data areas specified by their
6966 validators. If the window has wx.WS_EX_VALIDATE_RECURSIVELY extra
6967 style flag set, the method will also call TransferDataToWindow() of
6968 all child windows.
74a57fcd 6969 """
54f9ee45 6970 return _core_.Window_TransferDataToWindow(*args, **kwargs)
74a57fcd
RD
6971
6972 def TransferDataFromWindow(*args, **kwargs):
6973 """
a95a7133 6974 TransferDataFromWindow(self) -> bool
74a57fcd 6975
41e2b43e
RD
6976 Transfers values from child controls to data areas specified by their
6977 validators. Returns false if a transfer failed. If the window has
6978 wx.WS_EX_VALIDATE_RECURSIVELY extra style flag set, the method will
6979 also call TransferDataFromWindow() of all child windows.
74a57fcd 6980 """
54f9ee45 6981 return _core_.Window_TransferDataFromWindow(*args, **kwargs)
74a57fcd
RD
6982
6983 def InitDialog(*args, **kwargs):
6984 """
a95a7133 6985 InitDialog(self)
74a57fcd 6986
41e2b43e
RD
6987 Sends an EVT_INIT_DIALOG event, whose handler usually transfers data
6988 to the dialog via validators.
74a57fcd 6989 """
54f9ee45 6990 return _core_.Window_InitDialog(*args, **kwargs)
74a57fcd 6991
e811c8ce 6992 def SetAcceleratorTable(*args, **kwargs):
15afbcd0 6993 """
a95a7133 6994 SetAcceleratorTable(self, AcceleratorTable accel)
15afbcd0
RD
6995
6996 Sets the accelerator table for this window.
6997 """
54f9ee45 6998 return _core_.Window_SetAcceleratorTable(*args, **kwargs)
e811c8ce
RD
6999
7000 def GetAcceleratorTable(*args, **kwargs):
15afbcd0 7001 """
a95a7133 7002 GetAcceleratorTable(self) -> AcceleratorTable
15afbcd0
RD
7003
7004 Gets the accelerator table for this window.
7005 """
54f9ee45 7006 return _core_.Window_GetAcceleratorTable(*args, **kwargs)
e811c8ce
RD
7007
7008 def RegisterHotKey(*args, **kwargs):
15afbcd0 7009 """
a95a7133 7010 RegisterHotKey(self, int hotkeyId, int modifiers, int keycode) -> bool
15afbcd0
RD
7011
7012 Registers a system wide hotkey. Every time the user presses the hotkey
7013 registered here, this window will receive a hotkey event. It will
7014 receive the event even if the application is in the background and
7015 does not have the input focus because the user is working with some
7016 other application. To bind an event handler function to this hotkey
7017 use EVT_HOTKEY with an id equal to hotkeyId. Returns True if the
7018 hotkey was registered successfully.
7019 """
54f9ee45 7020 return _core_.Window_RegisterHotKey(*args, **kwargs)
e811c8ce
RD
7021
7022 def UnregisterHotKey(*args, **kwargs):
15afbcd0 7023 """
a95a7133 7024 UnregisterHotKey(self, int hotkeyId) -> bool
15afbcd0
RD
7025
7026 Unregisters a system wide hotkey.
7027 """
54f9ee45 7028 return _core_.Window_UnregisterHotKey(*args, **kwargs)
e811c8ce
RD
7029
7030 def ConvertDialogPointToPixels(*args, **kwargs):
15afbcd0 7031 """
a95a7133 7032 ConvertDialogPointToPixels(self, Point pt) -> Point
15afbcd0
RD
7033
7034 Converts a point or size from dialog units to pixels. Dialog units
7035 are used for maintaining a dialog's proportions even if the font
7036 changes. For the x dimension, the dialog units are multiplied by the
7037 average character width and then divided by 4. For the y dimension,
7038 the dialog units are multiplied by the average character height and
7039 then divided by 8.
7040 """
54f9ee45 7041 return _core_.Window_ConvertDialogPointToPixels(*args, **kwargs)
e811c8ce
RD
7042
7043 def ConvertDialogSizeToPixels(*args, **kwargs):
15afbcd0 7044 """
a95a7133 7045 ConvertDialogSizeToPixels(self, Size sz) -> Size
15afbcd0
RD
7046
7047 Converts a point or size from dialog units to pixels. Dialog units
7048 are used for maintaining a dialog's proportions even if the font
7049 changes. For the x dimension, the dialog units are multiplied by the
7050 average character width and then divided by 4. For the y dimension,
7051 the dialog units are multiplied by the average character height and
7052 then divided by 8.
7053 """
54f9ee45 7054 return _core_.Window_ConvertDialogSizeToPixels(*args, **kwargs)
e811c8ce
RD
7055
7056 def DLG_PNT(*args, **kwargs):
15afbcd0 7057 """
a95a7133 7058 DLG_PNT(self, Point pt) -> Point
15afbcd0
RD
7059
7060 Converts a point or size from dialog units to pixels. Dialog units
7061 are used for maintaining a dialog's proportions even if the font
7062 changes. For the x dimension, the dialog units are multiplied by the
7063 average character width and then divided by 4. For the y dimension,
7064 the dialog units are multiplied by the average character height and
7065 then divided by 8.
7066 """
54f9ee45 7067 return _core_.Window_DLG_PNT(*args, **kwargs)
e811c8ce
RD
7068
7069 def DLG_SZE(*args, **kwargs):
15afbcd0 7070 """
a95a7133 7071 DLG_SZE(self, Size sz) -> Size
15afbcd0
RD
7072
7073 Converts a point or size from dialog units to pixels. Dialog units
7074 are used for maintaining a dialog's proportions even if the font
7075 changes. For the x dimension, the dialog units are multiplied by the
7076 average character width and then divided by 4. For the y dimension,
7077 the dialog units are multiplied by the average character height and
7078 then divided by 8.
7079 """
54f9ee45 7080 return _core_.Window_DLG_SZE(*args, **kwargs)
e811c8ce
RD
7081
7082 def ConvertPixelPointToDialog(*args, **kwargs):
a95a7133 7083 """ConvertPixelPointToDialog(self, Point pt) -> Point"""
54f9ee45 7084 return _core_.Window_ConvertPixelPointToDialog(*args, **kwargs)
e811c8ce
RD
7085
7086 def ConvertPixelSizeToDialog(*args, **kwargs):
a95a7133 7087 """ConvertPixelSizeToDialog(self, Size sz) -> Size"""
54f9ee45 7088 return _core_.Window_ConvertPixelSizeToDialog(*args, **kwargs)
e811c8ce
RD
7089
7090 def WarpPointer(*args, **kwargs):
15afbcd0 7091 """
a95a7133 7092 WarpPointer(self, int x, int y)
15afbcd0
RD
7093
7094 Moves the pointer to the given position on the window.
7095
7096 NOTE: This function is not supported under Mac because Apple Human
7097 Interface Guidelines forbid moving the mouse cursor programmatically.
7098 """
54f9ee45 7099 return _core_.Window_WarpPointer(*args, **kwargs)
e811c8ce
RD
7100
7101 def CaptureMouse(*args, **kwargs):
15afbcd0 7102 """
a95a7133 7103 CaptureMouse(self)
15afbcd0
RD
7104
7105 Directs all mouse input to this window. Call wx.Window.ReleaseMouse to
7106 release the capture.
7107
7108 Note that wxWindows maintains the stack of windows having captured the
7109 mouse and when the mouse is released the capture returns to the window
7110 which had had captured it previously and it is only really released if
7111 there were no previous window. In particular, this means that you must
7112 release the mouse as many times as you capture it.
7113 """
54f9ee45 7114 return _core_.Window_CaptureMouse(*args, **kwargs)
e811c8ce
RD
7115
7116 def ReleaseMouse(*args, **kwargs):
15afbcd0 7117 """
a95a7133 7118 ReleaseMouse(self)
15afbcd0
RD
7119
7120 Releases mouse input captured with wx.Window.CaptureMouse.
7121 """
54f9ee45 7122 return _core_.Window_ReleaseMouse(*args, **kwargs)
e811c8ce
RD
7123
7124 def GetCapture(*args, **kwargs):
15afbcd0 7125 """
66c033b4 7126 GetCapture() -> Window
15afbcd0
RD
7127
7128 Returns the window which currently captures the mouse or None
7129 """
54f9ee45 7130 return _core_.Window_GetCapture(*args, **kwargs)
e811c8ce
RD
7131
7132 GetCapture = staticmethod(GetCapture)
7133 def HasCapture(*args, **kwargs):
15afbcd0 7134 """
a95a7133 7135 HasCapture(self) -> bool
15afbcd0
RD
7136
7137 Returns true if this window has the current mouse capture.
7138 """
54f9ee45 7139 return _core_.Window_HasCapture(*args, **kwargs)
e811c8ce
RD
7140
7141 def Refresh(*args, **kwargs):
15afbcd0 7142 """
a95a7133 7143 Refresh(self, bool eraseBackground=True, Rect rect=None)
15afbcd0
RD
7144
7145 Mark the specified rectangle (or the whole window) as "dirty" so it
7146 will be repainted. Causes an EVT_PAINT event to be generated and sent
7147 to the window.
7148 """
54f9ee45 7149 return _core_.Window_Refresh(*args, **kwargs)
e811c8ce
RD
7150
7151 def RefreshRect(*args, **kwargs):
15afbcd0 7152 """
fef4c27a 7153 RefreshRect(self, Rect rect, bool eraseBackground=True)
15afbcd0
RD
7154
7155 Redraws the contents of the given rectangle: the area inside it will
7156 be repainted. This is the same as Refresh but has a nicer syntax.
7157 """
54f9ee45 7158 return _core_.Window_RefreshRect(*args, **kwargs)
e811c8ce
RD
7159
7160 def Update(*args, **kwargs):
15afbcd0 7161 """
a95a7133 7162 Update(self)
15afbcd0
RD
7163
7164 Calling this method immediately repaints the invalidated area of the
7165 window instead of waiting for the EVT_PAINT event to happen, (normally
7166 this would usually only happen when the flow of control returns to the
7167 event loop.) Notice that this function doesn't refresh the window and
7168 does nothing if the window has been already repainted. Use Refresh
7169 first if you want to immediately redraw the window (or some portion of
7170 it) unconditionally.
7171 """
54f9ee45 7172 return _core_.Window_Update(*args, **kwargs)
e811c8ce
RD
7173
7174 def ClearBackground(*args, **kwargs):
15afbcd0 7175 """
a95a7133 7176 ClearBackground(self)
15afbcd0
RD
7177
7178 Clears the window by filling it with the current background
7179 colour. Does not cause an erase background event to be generated.
7180 """
54f9ee45 7181 return _core_.Window_ClearBackground(*args, **kwargs)
e811c8ce
RD
7182
7183 def Freeze(*args, **kwargs):
15afbcd0 7184 """
a95a7133 7185 Freeze(self)
15afbcd0 7186
41e2b43e
RD
7187 Freezes the window or, in other words, prevents any updates from
7188 taking place on screen, the window is not redrawn at all. Thaw must be
7189 called to reenable window redrawing. Calls to Freeze/Thaw may be
7190 nested, with the actual Thaw being delayed until all the nesting has
7191 been undone.
15afbcd0
RD
7192
7193 This method is useful for visual appearance optimization (for example,
7194 it is a good idea to use it before inserting large amount of text into
7195 a wxTextCtrl under wxGTK) but is not implemented on all platforms nor
7196 for all controls so it is mostly just a hint to wxWindows and not a
7197 mandatory directive.
7198 """
54f9ee45 7199 return _core_.Window_Freeze(*args, **kwargs)
e811c8ce
RD
7200
7201 def Thaw(*args, **kwargs):
15afbcd0 7202 """
a95a7133 7203 Thaw(self)
15afbcd0 7204
4276dc52 7205 Reenables window updating after a previous call to Freeze. Calls to
41e2b43e
RD
7206 Freeze/Thaw may be nested, so Thaw must be called the same number of
7207 times that Freeze was before the window will be updated.
15afbcd0 7208 """
54f9ee45 7209 return _core_.Window_Thaw(*args, **kwargs)
e811c8ce
RD
7210
7211 def PrepareDC(*args, **kwargs):
15afbcd0 7212 """
a95a7133 7213 PrepareDC(self, DC dc)
15afbcd0
RD
7214
7215 Call this function to prepare the device context for drawing a
7216 scrolled image. It sets the device origin according to the current
7217 scroll position.
7218 """
54f9ee45 7219 return _core_.Window_PrepareDC(*args, **kwargs)
e811c8ce
RD
7220
7221 def GetUpdateRegion(*args, **kwargs):
15afbcd0 7222 """
a95a7133 7223 GetUpdateRegion(self) -> Region
15afbcd0
RD
7224
7225 Returns the region specifying which parts of the window have been
7226 damaged. Should only be called within an EVT_PAINT handler.
7227 """
54f9ee45 7228 return _core_.Window_GetUpdateRegion(*args, **kwargs)
e811c8ce
RD
7229
7230 def GetUpdateClientRect(*args, **kwargs):
15afbcd0 7231 """
a95a7133 7232 GetUpdateClientRect(self) -> Rect
15afbcd0
RD
7233
7234 Get the update rectangle region bounding box in client coords.
7235 """
54f9ee45 7236 return _core_.Window_GetUpdateClientRect(*args, **kwargs)
e811c8ce
RD
7237
7238 def IsExposed(*args, **kwargs):
15afbcd0 7239 """
a95a7133 7240 IsExposed(self, int x, int y, int w=1, int h=1) -> bool
15afbcd0
RD
7241
7242 Returns true if the given point or rectangle area has been exposed
7243 since the last repaint. Call this in an paint event handler to
7244 optimize redrawing by only redrawing those areas, which have been
7245 exposed.
7246 """
54f9ee45 7247 return _core_.Window_IsExposed(*args, **kwargs)
e811c8ce
RD
7248
7249 def IsExposedPoint(*args, **kwargs):
15afbcd0 7250 """
a95a7133 7251 IsExposedPoint(self, Point pt) -> bool
15afbcd0
RD
7252
7253 Returns true if the given point or rectangle area has been exposed
7254 since the last repaint. Call this in an paint event handler to
7255 optimize redrawing by only redrawing those areas, which have been
7256 exposed.
7257 """
54f9ee45 7258 return _core_.Window_IsExposedPoint(*args, **kwargs)
e811c8ce 7259
4276dc52 7260 def IsExposedRect(*args, **kwargs):
15afbcd0 7261 """
a95a7133 7262 IsExposedRect(self, Rect rect) -> bool
15afbcd0
RD
7263
7264 Returns true if the given point or rectangle area has been exposed
7265 since the last repaint. Call this in an paint event handler to
7266 optimize redrawing by only redrawing those areas, which have been
7267 exposed.
7268 """
54f9ee45 7269 return _core_.Window_IsExposedRect(*args, **kwargs)
e811c8ce 7270
74a57fcd
RD
7271 def GetDefaultAttributes(*args, **kwargs):
7272 """
a95a7133 7273 GetDefaultAttributes(self) -> VisualAttributes
74a57fcd 7274
41e2b43e
RD
7275 Get the default attributes for an instance of this class. This is
7276 useful if you want to use the same font or colour in your own control
7277 as in a standard control -- which is a much better idea than hard
7278 coding specific colours or fonts which might look completely out of
db3e571a 7279 place on the user's system, especially if it uses themes.
74a57fcd 7280 """
54f9ee45 7281 return _core_.Window_GetDefaultAttributes(*args, **kwargs)
74a57fcd
RD
7282
7283 def GetClassDefaultAttributes(*args, **kwargs):
7284 """
66c033b4 7285 GetClassDefaultAttributes(int variant=WINDOW_VARIANT_NORMAL) -> VisualAttributes
74a57fcd 7286
41e2b43e
RD
7287 Get the default attributes for this class. This is useful if you want
7288 to use the same font or colour in your own control as in a standard
7289 control -- which is a much better idea than hard coding specific
db3e571a
RD
7290 colours or fonts which might look completely out of place on the
7291 user's system, especially if it uses themes.
74a57fcd
RD
7292
7293 The variant parameter is only relevant under Mac currently and is
41e2b43e 7294 ignore under other platforms. Under Mac, it will change the size of
db3e571a
RD
7295 the returned font. See `wx.Window.SetWindowVariant` for more about
7296 this.
74a57fcd 7297 """
54f9ee45 7298 return _core_.Window_GetClassDefaultAttributes(*args, **kwargs)
74a57fcd
RD
7299
7300 GetClassDefaultAttributes = staticmethod(GetClassDefaultAttributes)
e811c8ce 7301 def SetBackgroundColour(*args, **kwargs):
15afbcd0 7302 """
a95a7133 7303 SetBackgroundColour(self, Colour colour) -> bool
15afbcd0
RD
7304
7305 Sets the background colour of the window. Returns True if the colour
7306 was changed. The background colour is usually painted by the default
7307 EVT_ERASE_BACKGROUND event handler function under Windows and
f8167d6e
RD
7308 automatically under GTK. Using `wx.NullColour` will reset the window
7309 to the default background colour.
15afbcd0 7310
db3e571a 7311 Note that setting the background colour may not cause an immediate
f8167d6e 7312 refresh, so you may wish to call `ClearBackground` or `Refresh` after
15afbcd0
RD
7313 calling this function.
7314
f8167d6e
RD
7315 Using this function will disable attempts to use themes for this
7316 window, if the system supports them. Use with care since usually the
7317 themes represent the appearance chosen by the user to be used for all
7318 applications on the system.
15afbcd0 7319 """
54f9ee45 7320 return _core_.Window_SetBackgroundColour(*args, **kwargs)
e811c8ce 7321
412d302d
RD
7322 def SetOwnBackgroundColour(*args, **kwargs):
7323 """SetOwnBackgroundColour(self, Colour colour)"""
7324 return _core_.Window_SetOwnBackgroundColour(*args, **kwargs)
b2df227b 7325
e811c8ce 7326 def SetForegroundColour(*args, **kwargs):
15afbcd0 7327 """
a95a7133 7328 SetForegroundColour(self, Colour colour) -> bool
15afbcd0
RD
7329
7330 Sets the foreground colour of the window. Returns True is the colour
7331 was changed. The interpretation of foreground colour is dependent on
7332 the window class; it may be the text colour or other colour, or it may
7333 not be used at all.
7334 """
54f9ee45 7335 return _core_.Window_SetForegroundColour(*args, **kwargs)
e811c8ce 7336
fa47d7a7
VS
7337 def SetOwnForegroundColour(*args, **kwargs):
7338 """SetOwnForegroundColour(self, Colour colour)"""
7339 return _core_.Window_SetOwnForegroundColour(*args, **kwargs)
b2df227b 7340
e811c8ce 7341 def GetBackgroundColour(*args, **kwargs):
15afbcd0 7342 """
a95a7133 7343 GetBackgroundColour(self) -> Colour
15afbcd0
RD
7344
7345 Returns the background colour of the window.
7346 """
54f9ee45 7347 return _core_.Window_GetBackgroundColour(*args, **kwargs)
e811c8ce
RD
7348
7349 def GetForegroundColour(*args, **kwargs):
15afbcd0 7350 """
a95a7133 7351 GetForegroundColour(self) -> Colour
15afbcd0
RD
7352
7353 Returns the foreground colour of the window. The interpretation of
7354 foreground colour is dependent on the window class; it may be the text
7355 colour or other colour, or it may not be used at all.
7356 """
54f9ee45 7357 return _core_.Window_GetForegroundColour(*args, **kwargs)
e811c8ce 7358
7bc1e663
RD
7359 def SetBackgroundStyle(*args, **kwargs):
7360 """
7361 SetBackgroundStyle(self, int style) -> bool
7362
7363 Returns the background style of the window. The background style
7364 indicates how the background of the window is drawn.
7365
7366 ====================== ========================================
7367 wx.BG_STYLE_SYSTEM The background colour or pattern should
7368 be determined by the system
7369 wx.BG_STYLE_COLOUR The background should be a solid colour
7370 wx.BG_STYLE_CUSTOM The background will be implemented by the
7371 application.
7372 ====================== ========================================
7373
7374 On GTK+, use of wx.BG_STYLE_CUSTOM allows the flicker-free drawing of
7375 a custom background, such as a tiled bitmap. Currently the style has
7376 no effect on other platforms.
7377
7378 :see: `GetBackgroundStyle`, `SetBackgroundColour`
7379 """
7380 return _core_.Window_SetBackgroundStyle(*args, **kwargs)
7381
7382 def GetBackgroundStyle(*args, **kwargs):
7383 """
7384 GetBackgroundStyle(self) -> int
7385
7386 Returns the background style of the window.
7387
7388 :see: `SetBackgroundStyle`
7389 """
7390 return _core_.Window_GetBackgroundStyle(*args, **kwargs)
7391
51b83b37
RD
7392 def HasTransparentBackground(*args, **kwargs):
7393 """
7394 HasTransparentBackground(self) -> bool
7395
7396 Returns True if this window's background is transparent (as, for
7397 example, for `wx.StaticText`) and should show the parent window's
7398 background.
7399
7400 This method is mostly used internally by the library itself and you
7401 normally shouldn't have to call it. You may, however, have to override
7402 it in your custom control classes to ensure that background is painted
7403 correctly.
7404 """
7405 return _core_.Window_HasTransparentBackground(*args, **kwargs)
7406
e811c8ce 7407 def SetCursor(*args, **kwargs):
15afbcd0 7408 """
a95a7133 7409 SetCursor(self, Cursor cursor) -> bool
15afbcd0
RD
7410
7411 Sets the window's cursor. Notice that the window cursor also sets it
7412 for the children of the window implicitly.
7413
7414 The cursor may be wx.NullCursor in which case the window cursor will
7415 be reset back to default.
7416 """
54f9ee45 7417 return _core_.Window_SetCursor(*args, **kwargs)
e811c8ce
RD
7418
7419 def GetCursor(*args, **kwargs):
15afbcd0 7420 """
a95a7133 7421 GetCursor(self) -> Cursor
15afbcd0
RD
7422
7423 Return the cursor associated with this window.
7424 """
54f9ee45 7425 return _core_.Window_GetCursor(*args, **kwargs)
e811c8ce
RD
7426
7427 def SetFont(*args, **kwargs):
15afbcd0 7428 """
a95a7133 7429 SetFont(self, Font font) -> bool
15afbcd0
RD
7430
7431 Sets the font for this window.
7432 """
54f9ee45 7433 return _core_.Window_SetFont(*args, **kwargs)
e811c8ce 7434
fa47d7a7
VS
7435 def SetOwnFont(*args, **kwargs):
7436 """SetOwnFont(self, Font font)"""
7437 return _core_.Window_SetOwnFont(*args, **kwargs)
b2df227b 7438
e811c8ce 7439 def GetFont(*args, **kwargs):
15afbcd0 7440 """
a95a7133 7441 GetFont(self) -> Font
15afbcd0 7442
4276dc52 7443 Returns the default font used for this window.
15afbcd0 7444 """
54f9ee45 7445 return _core_.Window_GetFont(*args, **kwargs)
e811c8ce
RD
7446
7447 def SetCaret(*args, **kwargs):
15afbcd0 7448 """
a95a7133 7449 SetCaret(self, Caret caret)
15afbcd0
RD
7450
7451 Sets the caret associated with the window.
7452 """
54f9ee45 7453 return _core_.Window_SetCaret(*args, **kwargs)
e811c8ce
RD
7454
7455 def GetCaret(*args, **kwargs):
15afbcd0 7456 """
a95a7133 7457 GetCaret(self) -> Caret
15afbcd0
RD
7458
7459 Returns the caret associated with the window.
7460 """
54f9ee45 7461 return _core_.Window_GetCaret(*args, **kwargs)
e811c8ce
RD
7462
7463 def GetCharHeight(*args, **kwargs):
15afbcd0 7464 """
a95a7133 7465 GetCharHeight(self) -> int
15afbcd0
RD
7466
7467 Get the (average) character size for the current font.
7468 """
54f9ee45 7469 return _core_.Window_GetCharHeight(*args, **kwargs)
e811c8ce
RD
7470
7471 def GetCharWidth(*args, **kwargs):
15afbcd0 7472 """
a95a7133 7473 GetCharWidth(self) -> int
15afbcd0
RD
7474
7475 Get the (average) character size for the current font.
7476 """
54f9ee45 7477 return _core_.Window_GetCharWidth(*args, **kwargs)
e811c8ce
RD
7478
7479 def GetTextExtent(*args, **kwargs):
fd2dc343
RD
7480 """
7481 GetTextExtent(String string) -> (width, height)
7482
7483 Get the width and height of the text using the current font.
7484 """
54f9ee45 7485 return _core_.Window_GetTextExtent(*args, **kwargs)
e811c8ce
RD
7486
7487 def GetFullTextExtent(*args, **kwargs):
0df68c9f 7488 """
196addbf 7489 GetFullTextExtent(String string, Font font=None) ->
0df68c9f 7490 (width, height, descent, externalLeading)
e811c8ce 7491
15afbcd0
RD
7492 Get the width, height, decent and leading of the text using the
7493 current or specified font.
0df68c9f 7494 """
54f9ee45 7495 return _core_.Window_GetFullTextExtent(*args, **kwargs)
e811c8ce
RD
7496
7497 def ClientToScreenXY(*args, **kwargs):
15afbcd0
RD
7498 """
7499 ClientToScreenXY(int x, int y) -> (x,y)
7500
7501 Converts to screen coordinates from coordinates relative to this window.
7502 """
54f9ee45 7503 return _core_.Window_ClientToScreenXY(*args, **kwargs)
e811c8ce
RD
7504
7505 def ScreenToClientXY(*args, **kwargs):
15afbcd0
RD
7506 """
7507 ScreenToClientXY(int x, int y) -> (x,y)
7508
7509 Converts from screen to client window coordinates.
7510 """
54f9ee45 7511 return _core_.Window_ScreenToClientXY(*args, **kwargs)
e811c8ce
RD
7512
7513 def ClientToScreen(*args, **kwargs):
15afbcd0 7514 """
a95a7133 7515 ClientToScreen(self, Point pt) -> Point
15afbcd0
RD
7516
7517 Converts to screen coordinates from coordinates relative to this window.
7518 """
54f9ee45 7519 return _core_.Window_ClientToScreen(*args, **kwargs)
e811c8ce
RD
7520
7521 def ScreenToClient(*args, **kwargs):
15afbcd0 7522 """
a95a7133 7523 ScreenToClient(self, Point pt) -> Point
15afbcd0
RD
7524
7525 Converts from screen to client window coordinates.
7526 """
54f9ee45 7527 return _core_.Window_ScreenToClient(*args, **kwargs)
e811c8ce
RD
7528
7529 def HitTestXY(*args, **kwargs):
15afbcd0 7530 """
a95a7133 7531 HitTestXY(self, int x, int y) -> int
15afbcd0
RD
7532
7533 Test where the given (in client coords) point lies
7534 """
54f9ee45 7535 return _core_.Window_HitTestXY(*args, **kwargs)
e811c8ce
RD
7536
7537 def HitTest(*args, **kwargs):
15afbcd0 7538 """
a95a7133 7539 HitTest(self, Point pt) -> int
15afbcd0
RD
7540
7541 Test where the given (in client coords) point lies
7542 """
54f9ee45 7543 return _core_.Window_HitTest(*args, **kwargs)
e811c8ce 7544
15afbcd0
RD
7545 def GetBorder(*args):
7546 """
a95a7133
RD
7547 GetBorder(self, long flags) -> int
7548 GetBorder(self) -> int
e811c8ce 7549
15afbcd0
RD
7550 Get border for the flags of this window
7551 """
54f9ee45 7552 return _core_.Window_GetBorder(*args)
e811c8ce
RD
7553
7554 def UpdateWindowUI(*args, **kwargs):
15afbcd0 7555 """
a95a7133 7556 UpdateWindowUI(self, long flags=UPDATE_UI_NONE)
15afbcd0
RD
7557
7558 This function sends EVT_UPDATE_UI events to the window. The particular
7559 implementation depends on the window; for example a wx.ToolBar will
7560 send an update UI event for each toolbar button, and a wx.Frame will
7561 send an update UI event for each menubar menu item. You can call this
7562 function from your application to ensure that your UI is up-to-date at
7563 a particular point in time (as far as your EVT_UPDATE_UI handlers are
7564 concerned). This may be necessary if you have called
7565 wx.UpdateUIEvent.SetMode or wx.UpdateUIEvent.SetUpdateInterval to
7566 limit the overhead that wxWindows incurs by sending update UI events
7567 in idle time.
15afbcd0 7568 """
54f9ee45 7569 return _core_.Window_UpdateWindowUI(*args, **kwargs)
e811c8ce
RD
7570
7571 def PopupMenuXY(*args, **kwargs):
15afbcd0 7572 """
b0503257 7573 PopupMenuXY(self, Menu menu, int x=-1, int y=-1) -> bool
15afbcd0 7574
b0503257
RD
7575 Pops up the given menu at the specified coordinates, relative to this window,
7576 and returns control when the user has dismissed the menu. If a menu item is
7577 selected, the corresponding menu event is generated and will be processed as
7578 usual. If the default position is given then the current position of the
7579 mouse cursor will be used.
15afbcd0 7580 """
54f9ee45 7581 return _core_.Window_PopupMenuXY(*args, **kwargs)
e811c8ce 7582
15afbcd0
RD
7583 def PopupMenu(*args, **kwargs):
7584 """
b0503257 7585 PopupMenu(self, Menu menu, Point pos=DefaultPosition) -> bool
15afbcd0 7586
b0503257
RD
7587 Pops up the given menu at the specified coordinates, relative to this window,
7588 and returns control when the user has dismissed the menu. If a menu item is
7589 selected, the corresponding menu event is generated and will be processed as
7590 usual. If the default position is given then the current position of the
7591 mouse cursor will be used.
15afbcd0 7592 """
54f9ee45 7593 return _core_.Window_PopupMenu(*args, **kwargs)
15afbcd0
RD
7594
7595 def GetHandle(*args, **kwargs):
7596 """
a95a7133 7597 GetHandle(self) -> long
15afbcd0
RD
7598
7599 Returns the platform-specific handle (as a long integer) of the
7600 physical window. Currently on wxMac it returns the handle of the
7601 toplevel parent of the window.
7602 """
54f9ee45 7603 return _core_.Window_GetHandle(*args, **kwargs)
15afbcd0 7604
7e63a440
RD
7605 def AssociateHandle(*args, **kwargs):
7606 """
7607 AssociateHandle(self, long handle)
7608
7609 Associate the window with a new native handle
7610 """
7611 return _core_.Window_AssociateHandle(*args, **kwargs)
7612
7613 def DissociateHandle(*args, **kwargs):
7614 """
7615 DissociateHandle(self)
7616
7617 Dissociate the current native handle from the window
7618 """
7619 return _core_.Window_DissociateHandle(*args, **kwargs)
7620
15afbcd0
RD
7621 def HasScrollbar(*args, **kwargs):
7622 """
a95a7133 7623 HasScrollbar(self, int orient) -> bool
15afbcd0
RD
7624
7625 Does the window have the scrollbar for this orientation?
7626 """
54f9ee45 7627 return _core_.Window_HasScrollbar(*args, **kwargs)
15afbcd0
RD
7628
7629 def SetScrollbar(*args, **kwargs):
7630 """
41e2b43e 7631 SetScrollbar(self, int orientation, int position, int thumbSize, int range,
15afbcd0
RD
7632 bool refresh=True)
7633
7634 Sets the scrollbar properties of a built-in scrollbar.
15afbcd0 7635 """
54f9ee45 7636 return _core_.Window_SetScrollbar(*args, **kwargs)
e811c8ce
RD
7637
7638 def SetScrollPos(*args, **kwargs):
15afbcd0 7639 """
a95a7133 7640 SetScrollPos(self, int orientation, int pos, bool refresh=True)
15afbcd0
RD
7641
7642 Sets the position of one of the built-in scrollbars.
7643 """
54f9ee45 7644 return _core_.Window_SetScrollPos(*args, **kwargs)
e811c8ce
RD
7645
7646 def GetScrollPos(*args, **kwargs):
15afbcd0 7647 """
a95a7133 7648 GetScrollPos(self, int orientation) -> int
15afbcd0
RD
7649
7650 Returns the built-in scrollbar position.
7651 """
54f9ee45 7652 return _core_.Window_GetScrollPos(*args, **kwargs)
e811c8ce
RD
7653
7654 def GetScrollThumb(*args, **kwargs):
15afbcd0 7655 """
a95a7133 7656 GetScrollThumb(self, int orientation) -> int
15afbcd0
RD
7657
7658 Returns the built-in scrollbar thumb size.
7659 """
54f9ee45 7660 return _core_.Window_GetScrollThumb(*args, **kwargs)
e811c8ce
RD
7661
7662 def GetScrollRange(*args, **kwargs):
15afbcd0 7663 """
a95a7133 7664 GetScrollRange(self, int orientation) -> int
15afbcd0
RD
7665
7666 Returns the built-in scrollbar range.
7667 """
54f9ee45 7668 return _core_.Window_GetScrollRange(*args, **kwargs)
e811c8ce
RD
7669
7670 def ScrollWindow(*args, **kwargs):
15afbcd0 7671 """
a95a7133 7672 ScrollWindow(self, int dx, int dy, Rect rect=None)
15afbcd0
RD
7673
7674 Physically scrolls the pixels in the window and move child windows
7675 accordingly. Use this function to optimise your scrolling
7676 implementations, to minimise the area that must be redrawn. Note that
7677 it is rarely required to call this function from a user program.
15afbcd0 7678 """
54f9ee45 7679 return _core_.Window_ScrollWindow(*args, **kwargs)
e811c8ce
RD
7680
7681 def ScrollLines(*args, **kwargs):
15afbcd0 7682 """
a95a7133 7683 ScrollLines(self, int lines) -> bool
15afbcd0
RD
7684
7685 If the platform and window class supports it, scrolls the window by
7686 the given number of lines down, if lines is positive, or up if lines
7687 is negative. Returns True if the window was scrolled, False if it was
7688 already on top/bottom and nothing was done.
7689 """
54f9ee45 7690 return _core_.Window_ScrollLines(*args, **kwargs)
e811c8ce
RD
7691
7692 def ScrollPages(*args, **kwargs):
15afbcd0 7693 """
a95a7133 7694 ScrollPages(self, int pages) -> bool
15afbcd0 7695
41e2b43e 7696 If the platform and window class supports it, scrolls the window by
15afbcd0
RD
7697 the given number of pages down, if pages is positive, or up if pages
7698 is negative. Returns True if the window was scrolled, False if it was
7699 already on top/bottom and nothing was done.
7700 """
54f9ee45 7701 return _core_.Window_ScrollPages(*args, **kwargs)
e811c8ce
RD
7702
7703 def LineUp(*args, **kwargs):
15afbcd0 7704 """
a95a7133 7705 LineUp(self) -> bool
15afbcd0
RD
7706
7707 This is just a wrapper for ScrollLines(-1).
7708 """
54f9ee45 7709 return _core_.Window_LineUp(*args, **kwargs)
e811c8ce
RD
7710
7711 def LineDown(*args, **kwargs):
15afbcd0 7712 """
a95a7133 7713 LineDown(self) -> bool
15afbcd0
RD
7714
7715 This is just a wrapper for ScrollLines(1).
7716 """
54f9ee45 7717 return _core_.Window_LineDown(*args, **kwargs)
e811c8ce
RD
7718
7719 def PageUp(*args, **kwargs):
15afbcd0 7720 """
a95a7133 7721 PageUp(self) -> bool
15afbcd0
RD
7722
7723 This is just a wrapper for ScrollPages(-1).
7724 """
54f9ee45 7725 return _core_.Window_PageUp(*args, **kwargs)
e811c8ce
RD
7726
7727 def PageDown(*args, **kwargs):
15afbcd0 7728 """
a95a7133 7729 PageDown(self) -> bool
15afbcd0
RD
7730
7731 This is just a wrapper for ScrollPages(1).
7732 """
54f9ee45 7733 return _core_.Window_PageDown(*args, **kwargs)
e811c8ce
RD
7734
7735 def SetHelpText(*args, **kwargs):
15afbcd0 7736 """
a95a7133 7737 SetHelpText(self, String text)
15afbcd0
RD
7738
7739 Sets the help text to be used as context-sensitive help for this
7740 window. Note that the text is actually stored by the current
7741 wxHelpProvider implementation, and not in the window object itself.
7742 """
54f9ee45 7743 return _core_.Window_SetHelpText(*args, **kwargs)
e811c8ce
RD
7744
7745 def SetHelpTextForId(*args, **kwargs):
15afbcd0 7746 """
a95a7133 7747 SetHelpTextForId(self, String text)
15afbcd0
RD
7748
7749 Associate this help text with all windows with the same id as this
7750 one.
7751 """
54f9ee45 7752 return _core_.Window_SetHelpTextForId(*args, **kwargs)
e811c8ce
RD
7753
7754 def GetHelpText(*args, **kwargs):
15afbcd0 7755 """
a95a7133 7756 GetHelpText(self) -> String
15afbcd0
RD
7757
7758 Gets the help text to be used as context-sensitive help for this
7759 window. Note that the text is actually stored by the current
7760 wxHelpProvider implementation, and not in the window object itself.
7761 """
54f9ee45 7762 return _core_.Window_GetHelpText(*args, **kwargs)
e811c8ce
RD
7763
7764 def SetToolTipString(*args, **kwargs):
15afbcd0 7765 """
a95a7133 7766 SetToolTipString(self, String tip)
15afbcd0
RD
7767
7768 Attach a tooltip to the window.
7769 """
54f9ee45 7770 return _core_.Window_SetToolTipString(*args, **kwargs)
e811c8ce
RD
7771
7772 def SetToolTip(*args, **kwargs):
15afbcd0 7773 """
a95a7133 7774 SetToolTip(self, ToolTip tip)
15afbcd0
RD
7775
7776 Attach a tooltip to the window.
7777 """
54f9ee45 7778 return _core_.Window_SetToolTip(*args, **kwargs)
e811c8ce
RD
7779
7780 def GetToolTip(*args, **kwargs):
15afbcd0 7781 """
a95a7133 7782 GetToolTip(self) -> ToolTip
15afbcd0
RD
7783
7784 get the associated tooltip or None if none
7785 """
54f9ee45 7786 return _core_.Window_GetToolTip(*args, **kwargs)
e811c8ce
RD
7787
7788 def SetDropTarget(*args, **kwargs):
15afbcd0 7789 """
a95a7133 7790 SetDropTarget(self, DropTarget dropTarget)
15afbcd0
RD
7791
7792 Associates a drop target with this window. If the window already has
7793 a drop target, it is deleted.
7794 """
54f9ee45 7795 return _core_.Window_SetDropTarget(*args, **kwargs)
e811c8ce
RD
7796
7797 def GetDropTarget(*args, **kwargs):
15afbcd0 7798 """
a95a7133 7799 GetDropTarget(self) -> DropTarget
15afbcd0
RD
7800
7801 Returns the associated drop target, which may be None.
7802 """
54f9ee45 7803 return _core_.Window_GetDropTarget(*args, **kwargs)
e811c8ce
RD
7804
7805 def SetConstraints(*args, **kwargs):
15afbcd0 7806 """
a95a7133 7807 SetConstraints(self, LayoutConstraints constraints)
15afbcd0
RD
7808
7809 Sets the window to have the given layout constraints. If an existing
7810 layout constraints object is already owned by the window, it will be
7811 deleted. Pass None to disassociate and delete the window's current
7812 constraints.
7813
7814 You must call SetAutoLayout to tell a window to use the constraints
7815 automatically in its default EVT_SIZE handler; otherwise, you must
7816 handle EVT_SIZE yourself and call Layout() explicitly. When setting
7817 both a wx.LayoutConstraints and a wx.Sizer, only the sizer will have
7818 effect.
7819 """
54f9ee45 7820 return _core_.Window_SetConstraints(*args, **kwargs)
e811c8ce
RD
7821
7822 def GetConstraints(*args, **kwargs):
15afbcd0 7823 """
a95a7133 7824 GetConstraints(self) -> LayoutConstraints
15afbcd0
RD
7825
7826 Returns a pointer to the window's layout constraints, or None if there
7827 are none.
7828 """
54f9ee45 7829 return _core_.Window_GetConstraints(*args, **kwargs)
e811c8ce
RD
7830
7831 def SetAutoLayout(*args, **kwargs):
15afbcd0 7832 """
a95a7133 7833 SetAutoLayout(self, bool autoLayout)
15afbcd0
RD
7834
7835 Determines whether the Layout function will be called automatically
7836 when the window is resized. It is called implicitly by SetSizer but
7837 if you use SetConstraints you should call it manually or otherwise the
7838 window layout won't be correctly updated when its size changes.
7839 """
54f9ee45 7840 return _core_.Window_SetAutoLayout(*args, **kwargs)
e811c8ce
RD
7841
7842 def GetAutoLayout(*args, **kwargs):
15afbcd0 7843 """
a95a7133 7844 GetAutoLayout(self) -> bool
15afbcd0
RD
7845
7846 Returns the current autoLayout setting
7847 """
54f9ee45 7848 return _core_.Window_GetAutoLayout(*args, **kwargs)
e811c8ce
RD
7849
7850 def Layout(*args, **kwargs):
15afbcd0 7851 """
a95a7133 7852 Layout(self) -> bool
15afbcd0
RD
7853
7854 Invokes the constraint-based layout algorithm or the sizer-based
7855 algorithm for this window. See SetAutoLayout: when auto layout is on,
7856 this function gets called automatically by the default EVT_SIZE
7857 handler when the window is resized.
7858 """
54f9ee45 7859 return _core_.Window_Layout(*args, **kwargs)
e811c8ce
RD
7860
7861 def SetSizer(*args, **kwargs):
15afbcd0 7862 """
a95a7133 7863 SetSizer(self, Sizer sizer, bool deleteOld=True)
15afbcd0
RD
7864
7865 Sets the window to have the given layout sizer. The window will then
7866 own the object, and will take care of its deletion. If an existing
7867 layout sizer object is already owned by the window, it will be deleted
7868 if the deleteOld parameter is true. Note that this function will also
7869 call SetAutoLayout implicitly with a True parameter if the sizer is
ae8162c8 7870 non-None, and False otherwise.
15afbcd0 7871 """
54f9ee45 7872 return _core_.Window_SetSizer(*args, **kwargs)
e811c8ce
RD
7873
7874 def SetSizerAndFit(*args, **kwargs):
15afbcd0 7875 """
a95a7133 7876 SetSizerAndFit(self, Sizer sizer, bool deleteOld=True)
15afbcd0
RD
7877
7878 The same as SetSizer, except it also sets the size hints for the
7879 window based on the sizer's minimum size.
7880 """
54f9ee45 7881 return _core_.Window_SetSizerAndFit(*args, **kwargs)
e811c8ce
RD
7882
7883 def GetSizer(*args, **kwargs):
15afbcd0 7884 """
a95a7133 7885 GetSizer(self) -> Sizer
15afbcd0
RD
7886
7887 Return the sizer associated with the window by a previous call to
7888 SetSizer or None if there isn't one.
7889 """
54f9ee45 7890 return _core_.Window_GetSizer(*args, **kwargs)
e811c8ce
RD
7891
7892 def SetContainingSizer(*args, **kwargs):
15afbcd0 7893 """
a95a7133 7894 SetContainingSizer(self, Sizer sizer)
15afbcd0
RD
7895
7896 This normally does not need to be called by application code. It is
7897 called internally when a window is added to a sizer, and is used so
7898 the window can remove itself from the sizer when it is destroyed.
7899 """
54f9ee45 7900 return _core_.Window_SetContainingSizer(*args, **kwargs)
e811c8ce
RD
7901
7902 def GetContainingSizer(*args, **kwargs):
15afbcd0 7903 """
a95a7133 7904 GetContainingSizer(self) -> Sizer
15afbcd0
RD
7905
7906 Return the sizer that this window is a member of, if any, otherwise None.
7907 """
54f9ee45 7908 return _core_.Window_GetContainingSizer(*args, **kwargs)
e811c8ce 7909
a95a7133
RD
7910 def InheritAttributes(*args, **kwargs):
7911 """
7912 InheritAttributes(self)
7913
41e2b43e
RD
7914 This function is (or should be, in case of custom controls) called
7915 during window creation to intelligently set up the window visual
7916 attributes, that is the font and the foreground and background
7917 colours.
7918
7919 By 'intelligently' the following is meant: by default, all windows use
7920 their own default attributes. However if some of the parent's
7921 attributes are explicitly changed (that is, using SetFont and not
fa47d7a7 7922 SetOwnFont) and if the corresponding attribute hadn't been
41e2b43e
RD
7923 explicitly set for this window itself, then this window takes the same
7924 value as used by the parent. In addition, if the window overrides
7925 ShouldInheritColours to return false, the colours will not be changed
7926 no matter what and only the font might.
7927
34621cc5 7928 This rather complicated logic is necessary in order to accommodate the
ec9b55ca 7929 different usage scenarios. The most common one is when all default
41e2b43e
RD
7930 attributes are used and in this case, nothing should be inherited as
7931 in modern GUIs different controls use different fonts (and colours)
7932 than their siblings so they can't inherit the same value from the
7933 parent. However it was also deemed desirable to allow to simply change
7934 the attributes of all children at once by just changing the font or
7935 colour of their common parent, hence in this case we do inherit the
7936 parents attributes.
7937
a95a7133 7938 """
54f9ee45 7939 return _core_.Window_InheritAttributes(*args, **kwargs)
a95a7133
RD
7940
7941 def ShouldInheritColours(*args, **kwargs):
7942 """
7943 ShouldInheritColours(self) -> bool
7944
7945 Return true from here to allow the colours of this window to be
41e2b43e
RD
7946 changed by InheritAttributes, returning false forbids inheriting them
7947 from the parent window.
a95a7133 7948
41e2b43e
RD
7949 The base class version returns false, but this method is overridden in
7950 wxControl where it returns true.
a95a7133 7951 """
54f9ee45 7952 return _core_.Window_ShouldInheritColours(*args, **kwargs)
a95a7133 7953
e811c8ce 7954 def PostCreate(self, pre):
15afbcd0
RD
7955 """
7956 Phase 3 of the 2-phase create <wink!>
7957 Call this method after precreating the window with the 2-phase create method.
7958 """
e811c8ce
RD
7959 self.this = pre.this
7960 self.thisown = pre.thisown
7961 pre.thisown = 0
7962 if hasattr(self, '_setOORInfo'):
7963 self._setOORInfo(self)
7964 if hasattr(self, '_setCallbackInfo'):
7965 self._setCallbackInfo(self, self.__class__)
7966
7967
7968class WindowPtr(Window):
7969 def __init__(self, this):
7970 self.this = this
7971 if not hasattr(self,"thisown"): self.thisown = 0
7972 self.__class__ = Window
54f9ee45 7973_core_.Window_swigregister(WindowPtr)
e811c8ce
RD
7974
7975def PreWindow(*args, **kwargs):
15afbcd0
RD
7976 """
7977 PreWindow() -> Window
7978
7979 Precreate a Window for 2-phase creation.
7980 """
54f9ee45 7981 val = _core_.new_PreWindow(*args, **kwargs)
e811c8ce
RD
7982 val.thisown = 1
7983 return val
7984
7985def Window_NewControlId(*args, **kwargs):
15afbcd0
RD
7986 """
7987 Window_NewControlId() -> int
7988
7989 Generate a control id for the controls which were not given one.
7990 """
54f9ee45 7991 return _core_.Window_NewControlId(*args, **kwargs)
e811c8ce
RD
7992
7993def Window_NextControlId(*args, **kwargs):
15afbcd0
RD
7994 """
7995 Window_NextControlId(int winid) -> int
7996
7997 Get the id of the control following the one with the given
41e2b43e 7998 autogenerated) id
15afbcd0 7999 """
54f9ee45 8000 return _core_.Window_NextControlId(*args, **kwargs)
e811c8ce
RD
8001
8002def Window_PrevControlId(*args, **kwargs):
15afbcd0
RD
8003 """
8004 Window_PrevControlId(int winid) -> int
8005
8006 Get the id of the control preceding the one with the given
41e2b43e 8007 autogenerated) id
15afbcd0 8008 """
54f9ee45 8009 return _core_.Window_PrevControlId(*args, **kwargs)
e811c8ce
RD
8010
8011def Window_FindFocus(*args, **kwargs):
15afbcd0
RD
8012 """
8013 Window_FindFocus() -> Window
8014
8015 Returns the window or control that currently has the keyboard focus,
8016 or None.
8017 """
54f9ee45 8018 return _core_.Window_FindFocus(*args, **kwargs)
e811c8ce
RD
8019
8020def Window_GetCapture(*args, **kwargs):
15afbcd0
RD
8021 """
8022 Window_GetCapture() -> Window
8023
8024 Returns the window which currently captures the mouse or None
8025 """
54f9ee45 8026 return _core_.Window_GetCapture(*args, **kwargs)
e811c8ce 8027
74a57fcd
RD
8028def Window_GetClassDefaultAttributes(*args, **kwargs):
8029 """
8030 Window_GetClassDefaultAttributes(int variant=WINDOW_VARIANT_NORMAL) -> VisualAttributes
8031
41e2b43e
RD
8032 Get the default attributes for this class. This is useful if you want
8033 to use the same font or colour in your own control as in a standard
8034 control -- which is a much better idea than hard coding specific
db3e571a
RD
8035 colours or fonts which might look completely out of place on the
8036 user's system, especially if it uses themes.
74a57fcd
RD
8037
8038 The variant parameter is only relevant under Mac currently and is
41e2b43e 8039 ignore under other platforms. Under Mac, it will change the size of
db3e571a
RD
8040 the returned font. See `wx.Window.SetWindowVariant` for more about
8041 this.
74a57fcd 8042 """
54f9ee45 8043 return _core_.Window_GetClassDefaultAttributes(*args, **kwargs)
74a57fcd 8044
e811c8ce 8045def DLG_PNT(win, point_or_x, y=None):
15afbcd0
RD
8046 """
8047 Convenience function for converting a Point or (x,y) in
8048 dialog units to pixel units.
8049 """
e811c8ce
RD
8050 if y is None:
8051 return win.ConvertDialogPointToPixels(point_or_x)
8052 else:
fd3f2efe 8053 return win.ConvertDialogPointToPixels(wx.Point(point_or_x, y))
e811c8ce
RD
8054
8055def DLG_SZE(win, size_width, height=None):
15afbcd0
RD
8056 """
8057 Convenience function for converting a Size or (w,h) in
8058 dialog units to pixel units.
8059 """
e811c8ce
RD
8060 if height is None:
8061 return win.ConvertDialogSizeToPixels(size_width)
8062 else:
fd3f2efe 8063 return win.ConvertDialogSizeToPixels(wx.Size(size_width, height))
e811c8ce
RD
8064
8065
8066def FindWindowById(*args, **kwargs):
15afbcd0
RD
8067 """
8068 FindWindowById(long id, Window parent=None) -> Window
8069
8070 Find the first window in the application with the given id. If parent
8071 is None, the search will start from all top-level frames and dialog
8072 boxes; if non-None, the search will be limited to the given window
8073 hierarchy. The search is recursive in both cases.
8074 """
54f9ee45 8075 return _core_.FindWindowById(*args, **kwargs)
e811c8ce
RD
8076
8077def FindWindowByName(*args, **kwargs):
15afbcd0
RD
8078 """
8079 FindWindowByName(String name, Window parent=None) -> Window
8080
8081 Find a window by its name (as given in a window constructor or Create
8082 function call). If parent is None, the search will start from all
8083 top-level frames and dialog boxes; if non-None, the search will be
8084 limited to the given window hierarchy. The search is recursive in both
8085 cases.
8086
8087 If no window with such name is found, wx.FindWindowByLabel is called.
8088 """
54f9ee45 8089 return _core_.FindWindowByName(*args, **kwargs)
e811c8ce
RD
8090
8091def FindWindowByLabel(*args, **kwargs):
15afbcd0
RD
8092 """
8093 FindWindowByLabel(String label, Window parent=None) -> Window
8094
8095 Find a window by its label. Depending on the type of window, the label
8096 may be a window title or panel item label. If parent is None, the
8097 search will start from all top-level frames and dialog boxes; if
8098 non-None, the search will be limited to the given window
8099 hierarchy. The search is recursive in both cases.
8100 """
54f9ee45 8101 return _core_.FindWindowByLabel(*args, **kwargs)
e811c8ce
RD
8102
8103def Window_FromHWND(*args, **kwargs):
4276dc52 8104 """Window_FromHWND(Window parent, unsigned long _hWnd) -> Window"""
54f9ee45 8105 return _core_.Window_FromHWND(*args, **kwargs)
e811c8ce
RD
8106#---------------------------------------------------------------------------
8107
8108class Validator(EvtHandler):
093d3ff1 8109 """Proxy of C++ Validator class"""
e811c8ce
RD
8110 def __repr__(self):
8111 return "<%s.%s; proxy of C++ wxValidator instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
8112 def __init__(self, *args, **kwargs):
a95a7133 8113 """__init__(self) -> Validator"""
54f9ee45 8114 newobj = _core_.new_Validator(*args, **kwargs)
d14a1e28
RD
8115 self.this = newobj.this
8116 self.thisown = 1
8117 del newobj.thisown
8118 self._setOORInfo(self)
e811c8ce
RD
8119
8120 def Clone(*args, **kwargs):
a95a7133 8121 """Clone(self) -> Validator"""
54f9ee45 8122 return _core_.Validator_Clone(*args, **kwargs)
e811c8ce
RD
8123
8124 def Validate(*args, **kwargs):
a95a7133 8125 """Validate(self, Window parent) -> bool"""
54f9ee45 8126 return _core_.Validator_Validate(*args, **kwargs)
e811c8ce
RD
8127
8128 def TransferToWindow(*args, **kwargs):
a95a7133 8129 """TransferToWindow(self) -> bool"""
54f9ee45 8130 return _core_.Validator_TransferToWindow(*args, **kwargs)
e811c8ce
RD
8131
8132 def TransferFromWindow(*args, **kwargs):
a95a7133 8133 """TransferFromWindow(self) -> bool"""
54f9ee45 8134 return _core_.Validator_TransferFromWindow(*args, **kwargs)
e811c8ce
RD
8135
8136 def GetWindow(*args, **kwargs):
a95a7133 8137 """GetWindow(self) -> Window"""
54f9ee45 8138 return _core_.Validator_GetWindow(*args, **kwargs)
e811c8ce
RD
8139
8140 def SetWindow(*args, **kwargs):
a95a7133 8141 """SetWindow(self, Window window)"""
54f9ee45 8142 return _core_.Validator_SetWindow(*args, **kwargs)
e811c8ce
RD
8143
8144 def IsSilent(*args, **kwargs):
66c033b4 8145 """IsSilent() -> bool"""
54f9ee45 8146 return _core_.Validator_IsSilent(*args, **kwargs)
e811c8ce
RD
8147
8148 IsSilent = staticmethod(IsSilent)
8149 def SetBellOnError(*args, **kwargs):
66c033b4 8150 """SetBellOnError(int doIt=True)"""
54f9ee45 8151 return _core_.Validator_SetBellOnError(*args, **kwargs)
e811c8ce
RD
8152
8153 SetBellOnError = staticmethod(SetBellOnError)
8154
8155class ValidatorPtr(Validator):
8156 def __init__(self, this):
8157 self.this = this
8158 if not hasattr(self,"thisown"): self.thisown = 0
8159 self.__class__ = Validator
54f9ee45 8160_core_.Validator_swigregister(ValidatorPtr)
e811c8ce
RD
8161
8162def Validator_IsSilent(*args, **kwargs):
8163 """Validator_IsSilent() -> bool"""
54f9ee45 8164 return _core_.Validator_IsSilent(*args, **kwargs)
e811c8ce
RD
8165
8166def Validator_SetBellOnError(*args, **kwargs):
8167 """Validator_SetBellOnError(int doIt=True)"""
54f9ee45 8168 return _core_.Validator_SetBellOnError(*args, **kwargs)
e811c8ce
RD
8169
8170class PyValidator(Validator):
093d3ff1 8171 """Proxy of C++ PyValidator class"""
e811c8ce
RD
8172 def __repr__(self):
8173 return "<%s.%s; proxy of C++ wxPyValidator instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
8174 def __init__(self, *args, **kwargs):
a95a7133 8175 """__init__(self) -> PyValidator"""
54f9ee45 8176 newobj = _core_.new_PyValidator(*args, **kwargs)
e811c8ce
RD
8177 self.this = newobj.this
8178 self.thisown = 1
8179 del newobj.thisown
8180
8181 self._setCallbackInfo(self, PyValidator, 1)
8182 self._setOORInfo(self)
8183
8184 def _setCallbackInfo(*args, **kwargs):
a95a7133 8185 """_setCallbackInfo(self, PyObject self, PyObject _class, int incref=True)"""
54f9ee45 8186 return _core_.PyValidator__setCallbackInfo(*args, **kwargs)
e811c8ce
RD
8187
8188
8189class PyValidatorPtr(PyValidator):
8190 def __init__(self, this):
8191 self.this = this
8192 if not hasattr(self,"thisown"): self.thisown = 0
8193 self.__class__ = PyValidator
54f9ee45 8194_core_.PyValidator_swigregister(PyValidatorPtr)
e811c8ce
RD
8195
8196#---------------------------------------------------------------------------
8197
8198class Menu(EvtHandler):
093d3ff1 8199 """Proxy of C++ Menu class"""
d14a1e28
RD
8200 def __repr__(self):
8201 return "<%s.%s; proxy of C++ wxMenu instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
e811c8ce 8202 def __init__(self, *args, **kwargs):
a95a7133 8203 """__init__(self, String title=EmptyString, long style=0) -> Menu"""
54f9ee45 8204 newobj = _core_.new_Menu(*args, **kwargs)
e811c8ce
RD
8205 self.this = newobj.this
8206 self.thisown = 1
8207 del newobj.thisown
8208 self._setOORInfo(self)
8209
8210 def Append(*args, **kwargs):
a95a7133 8211 """Append(self, int id, String text, String help=EmptyString, int kind=ITEM_NORMAL) -> MenuItem"""
54f9ee45 8212 return _core_.Menu_Append(*args, **kwargs)
e811c8ce
RD
8213
8214 def AppendSeparator(*args, **kwargs):
a95a7133 8215 """AppendSeparator(self) -> MenuItem"""
54f9ee45 8216 return _core_.Menu_AppendSeparator(*args, **kwargs)
e811c8ce
RD
8217
8218 def AppendCheckItem(*args, **kwargs):
a95a7133 8219 """AppendCheckItem(self, int id, String text, String help=EmptyString) -> MenuItem"""
54f9ee45 8220 return _core_.Menu_AppendCheckItem(*args, **kwargs)
e811c8ce
RD
8221
8222 def AppendRadioItem(*args, **kwargs):
a95a7133 8223 """AppendRadioItem(self, int id, String text, String help=EmptyString) -> MenuItem"""
54f9ee45 8224 return _core_.Menu_AppendRadioItem(*args, **kwargs)
e811c8ce
RD
8225
8226 def AppendMenu(*args, **kwargs):
a95a7133 8227 """AppendMenu(self, int id, String text, Menu submenu, String help=EmptyString) -> MenuItem"""
54f9ee45 8228 return _core_.Menu_AppendMenu(*args, **kwargs)
e811c8ce
RD
8229
8230 def AppendItem(*args, **kwargs):
a95a7133 8231 """AppendItem(self, MenuItem item) -> MenuItem"""
54f9ee45 8232 return _core_.Menu_AppendItem(*args, **kwargs)
e811c8ce
RD
8233
8234 def Break(*args, **kwargs):
a95a7133 8235 """Break(self)"""
54f9ee45 8236 return _core_.Menu_Break(*args, **kwargs)
e811c8ce
RD
8237
8238 def InsertItem(*args, **kwargs):
a95a7133 8239 """InsertItem(self, size_t pos, MenuItem item) -> MenuItem"""
54f9ee45 8240 return _core_.Menu_InsertItem(*args, **kwargs)
e811c8ce
RD
8241
8242 def Insert(*args, **kwargs):
0df68c9f 8243 """
a95a7133 8244 Insert(self, size_t pos, int id, String text, String help=EmptyString,
a41e16b6 8245 int kind=ITEM_NORMAL) -> MenuItem
0df68c9f 8246 """
54f9ee45 8247 return _core_.Menu_Insert(*args, **kwargs)
e811c8ce
RD
8248
8249 def InsertSeparator(*args, **kwargs):
a95a7133 8250 """InsertSeparator(self, size_t pos) -> MenuItem"""
54f9ee45 8251 return _core_.Menu_InsertSeparator(*args, **kwargs)
e811c8ce
RD
8252
8253 def InsertCheckItem(*args, **kwargs):
a95a7133 8254 """InsertCheckItem(self, size_t pos, int id, String text, String help=EmptyString) -> MenuItem"""
54f9ee45 8255 return _core_.Menu_InsertCheckItem(*args, **kwargs)
e811c8ce
RD
8256
8257 def InsertRadioItem(*args, **kwargs):
a95a7133 8258 """InsertRadioItem(self, size_t pos, int id, String text, String help=EmptyString) -> MenuItem"""
54f9ee45 8259 return _core_.Menu_InsertRadioItem(*args, **kwargs)
e811c8ce
RD
8260
8261 def InsertMenu(*args, **kwargs):
a95a7133 8262 """InsertMenu(self, size_t pos, int id, String text, Menu submenu, String help=EmptyString) -> MenuItem"""
54f9ee45 8263 return _core_.Menu_InsertMenu(*args, **kwargs)
e811c8ce
RD
8264
8265 def PrependItem(*args, **kwargs):
a95a7133 8266 """PrependItem(self, MenuItem item) -> MenuItem"""
54f9ee45 8267 return _core_.Menu_PrependItem(*args, **kwargs)
e811c8ce
RD
8268
8269 def Prepend(*args, **kwargs):
a95a7133 8270 """Prepend(self, int id, String text, String help=EmptyString, int kind=ITEM_NORMAL) -> MenuItem"""
54f9ee45 8271 return _core_.Menu_Prepend(*args, **kwargs)
e811c8ce
RD
8272
8273 def PrependSeparator(*args, **kwargs):
a95a7133 8274 """PrependSeparator(self) -> MenuItem"""
54f9ee45 8275 return _core_.Menu_PrependSeparator(*args, **kwargs)
e811c8ce
RD
8276
8277 def PrependCheckItem(*args, **kwargs):
a95a7133 8278 """PrependCheckItem(self, int id, String text, String help=EmptyString) -> MenuItem"""
54f9ee45 8279 return _core_.Menu_PrependCheckItem(*args, **kwargs)
e811c8ce
RD
8280
8281 def PrependRadioItem(*args, **kwargs):
a95a7133 8282 """PrependRadioItem(self, int id, String text, String help=EmptyString) -> MenuItem"""
54f9ee45 8283 return _core_.Menu_PrependRadioItem(*args, **kwargs)
e811c8ce
RD
8284
8285 def PrependMenu(*args, **kwargs):
a95a7133 8286 """PrependMenu(self, int id, String text, Menu submenu, String help=EmptyString) -> MenuItem"""
54f9ee45 8287 return _core_.Menu_PrependMenu(*args, **kwargs)
e811c8ce
RD
8288
8289 def Remove(*args, **kwargs):
a95a7133 8290 """Remove(self, int id) -> MenuItem"""
54f9ee45 8291 return _core_.Menu_Remove(*args, **kwargs)
e811c8ce
RD
8292
8293 def RemoveItem(*args, **kwargs):
a95a7133 8294 """RemoveItem(self, MenuItem item) -> MenuItem"""
54f9ee45 8295 return _core_.Menu_RemoveItem(*args, **kwargs)
e811c8ce
RD
8296
8297 def Delete(*args, **kwargs):
a95a7133 8298 """Delete(self, int id) -> bool"""
54f9ee45 8299 return _core_.Menu_Delete(*args, **kwargs)
e811c8ce
RD
8300
8301 def DeleteItem(*args, **kwargs):
a95a7133 8302 """DeleteItem(self, MenuItem item) -> bool"""
54f9ee45 8303 return _core_.Menu_DeleteItem(*args, **kwargs)
e811c8ce
RD
8304
8305 def Destroy(*args, **kwargs):
0df68c9f 8306 """
a95a7133 8307 Destroy(self)
e811c8ce 8308
0df68c9f
RD
8309 Deletes the C++ object this Python object is a proxy for.
8310 """
54f9ee45 8311 return _core_.Menu_Destroy(*args, **kwargs)
e811c8ce
RD
8312
8313 def DestroyId(*args, **kwargs):
0df68c9f 8314 """
a95a7133 8315 DestroyId(self, int id) -> bool
e811c8ce 8316
0df68c9f
RD
8317 Deletes the C++ object this Python object is a proxy for.
8318 """
54f9ee45 8319 return _core_.Menu_DestroyId(*args, **kwargs)
e811c8ce
RD
8320
8321 def DestroyItem(*args, **kwargs):
0df68c9f 8322 """
a95a7133 8323 DestroyItem(self, MenuItem item) -> bool
e811c8ce 8324
0df68c9f
RD
8325 Deletes the C++ object this Python object is a proxy for.
8326 """
54f9ee45 8327 return _core_.Menu_DestroyItem(*args, **kwargs)
e811c8ce
RD
8328
8329 def GetMenuItemCount(*args, **kwargs):
a95a7133 8330 """GetMenuItemCount(self) -> size_t"""
54f9ee45 8331 return _core_.Menu_GetMenuItemCount(*args, **kwargs)
e811c8ce
RD
8332
8333 def GetMenuItems(*args, **kwargs):
a95a7133 8334 """GetMenuItems(self) -> PyObject"""
54f9ee45 8335 return _core_.Menu_GetMenuItems(*args, **kwargs)
e811c8ce
RD
8336
8337 def FindItem(*args, **kwargs):
a95a7133 8338 """FindItem(self, String item) -> int"""
54f9ee45 8339 return _core_.Menu_FindItem(*args, **kwargs)
e811c8ce
RD
8340
8341 def FindItemById(*args, **kwargs):
a95a7133 8342 """FindItemById(self, int id) -> MenuItem"""
54f9ee45 8343 return _core_.Menu_FindItemById(*args, **kwargs)
e811c8ce
RD
8344
8345 def FindItemByPosition(*args, **kwargs):
a95a7133 8346 """FindItemByPosition(self, size_t position) -> MenuItem"""
54f9ee45 8347 return _core_.Menu_FindItemByPosition(*args, **kwargs)
e811c8ce
RD
8348
8349 def Enable(*args, **kwargs):
a95a7133 8350 """Enable(self, int id, bool enable)"""
54f9ee45 8351 return _core_.Menu_Enable(*args, **kwargs)
e811c8ce
RD
8352
8353 def IsEnabled(*args, **kwargs):
a95a7133 8354 """IsEnabled(self, int id) -> bool"""
54f9ee45 8355 return _core_.Menu_IsEnabled(*args, **kwargs)
e811c8ce
RD
8356
8357 def Check(*args, **kwargs):
a95a7133 8358 """Check(self, int id, bool check)"""
54f9ee45 8359 return _core_.Menu_Check(*args, **kwargs)
e811c8ce
RD
8360
8361 def IsChecked(*args, **kwargs):
a95a7133 8362 """IsChecked(self, int id) -> bool"""
54f9ee45 8363 return _core_.Menu_IsChecked(*args, **kwargs)
e811c8ce
RD
8364
8365 def SetLabel(*args, **kwargs):
a95a7133 8366 """SetLabel(self, int id, String label)"""
54f9ee45 8367 return _core_.Menu_SetLabel(*args, **kwargs)
e811c8ce
RD
8368
8369 def GetLabel(*args, **kwargs):
a95a7133 8370 """GetLabel(self, int id) -> String"""
54f9ee45 8371 return _core_.Menu_GetLabel(*args, **kwargs)
e811c8ce
RD
8372
8373 def SetHelpString(*args, **kwargs):
a95a7133 8374 """SetHelpString(self, int id, String helpString)"""
54f9ee45 8375 return _core_.Menu_SetHelpString(*args, **kwargs)
e811c8ce
RD
8376
8377 def GetHelpString(*args, **kwargs):
a95a7133 8378 """GetHelpString(self, int id) -> String"""
54f9ee45 8379 return _core_.Menu_GetHelpString(*args, **kwargs)
e811c8ce
RD
8380
8381 def SetTitle(*args, **kwargs):
a95a7133 8382 """SetTitle(self, String title)"""
54f9ee45 8383 return _core_.Menu_SetTitle(*args, **kwargs)
e811c8ce
RD
8384
8385 def GetTitle(*args, **kwargs):
a95a7133 8386 """GetTitle(self) -> String"""
54f9ee45 8387 return _core_.Menu_GetTitle(*args, **kwargs)
e811c8ce
RD
8388
8389 def SetEventHandler(*args, **kwargs):
a95a7133 8390 """SetEventHandler(self, EvtHandler handler)"""
54f9ee45 8391 return _core_.Menu_SetEventHandler(*args, **kwargs)
e811c8ce
RD
8392
8393 def GetEventHandler(*args, **kwargs):
a95a7133 8394 """GetEventHandler(self) -> EvtHandler"""
54f9ee45 8395 return _core_.Menu_GetEventHandler(*args, **kwargs)
e811c8ce
RD
8396
8397 def SetInvokingWindow(*args, **kwargs):
a95a7133 8398 """SetInvokingWindow(self, Window win)"""
54f9ee45 8399 return _core_.Menu_SetInvokingWindow(*args, **kwargs)
e811c8ce
RD
8400
8401 def GetInvokingWindow(*args, **kwargs):
a95a7133 8402 """GetInvokingWindow(self) -> Window"""
54f9ee45 8403 return _core_.Menu_GetInvokingWindow(*args, **kwargs)
e811c8ce
RD
8404
8405 def GetStyle(*args, **kwargs):
a95a7133 8406 """GetStyle(self) -> long"""
54f9ee45 8407 return _core_.Menu_GetStyle(*args, **kwargs)
e811c8ce
RD
8408
8409 def UpdateUI(*args, **kwargs):
a95a7133 8410 """UpdateUI(self, EvtHandler source=None)"""
54f9ee45 8411 return _core_.Menu_UpdateUI(*args, **kwargs)
e811c8ce
RD
8412
8413 def GetMenuBar(*args, **kwargs):
a95a7133 8414 """GetMenuBar(self) -> MenuBar"""
54f9ee45 8415 return _core_.Menu_GetMenuBar(*args, **kwargs)
e811c8ce
RD
8416
8417 def Attach(*args, **kwargs):
a95a7133 8418 """Attach(self, wxMenuBarBase menubar)"""
54f9ee45 8419 return _core_.Menu_Attach(*args, **kwargs)
e811c8ce
RD
8420
8421 def Detach(*args, **kwargs):
a95a7133 8422 """Detach(self)"""
54f9ee45 8423 return _core_.Menu_Detach(*args, **kwargs)
e811c8ce
RD
8424
8425 def IsAttached(*args, **kwargs):
a95a7133 8426 """IsAttached(self) -> bool"""
54f9ee45 8427 return _core_.Menu_IsAttached(*args, **kwargs)
e811c8ce
RD
8428
8429 def SetParent(*args, **kwargs):
a95a7133 8430 """SetParent(self, Menu parent)"""
54f9ee45 8431 return _core_.Menu_SetParent(*args, **kwargs)
e811c8ce
RD
8432
8433 def GetParent(*args, **kwargs):
a95a7133 8434 """GetParent(self) -> Menu"""
54f9ee45 8435 return _core_.Menu_GetParent(*args, **kwargs)
e811c8ce 8436
d14a1e28
RD
8437
8438class MenuPtr(Menu):
8439 def __init__(self, this):
8440 self.this = this
8441 if not hasattr(self,"thisown"): self.thisown = 0
8442 self.__class__ = Menu
54f9ee45 8443_core_.Menu_swigregister(MenuPtr)
d14a1e28
RD
8444DefaultValidator = cvar.DefaultValidator
8445
8446#---------------------------------------------------------------------------
8447
8448class MenuBar(Window):
093d3ff1 8449 """Proxy of C++ MenuBar class"""
e811c8ce
RD
8450 def __repr__(self):
8451 return "<%s.%s; proxy of C++ wxMenuBar instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 8452 def __init__(self, *args, **kwargs):
a95a7133 8453 """__init__(self, long style=0) -> MenuBar"""
54f9ee45 8454 newobj = _core_.new_MenuBar(*args, **kwargs)
d14a1e28
RD
8455 self.this = newobj.this
8456 self.thisown = 1
8457 del newobj.thisown
8458 self._setOORInfo(self)
e811c8ce
RD
8459
8460 def Append(*args, **kwargs):
a95a7133 8461 """Append(self, Menu menu, String title) -> bool"""
54f9ee45 8462 return _core_.MenuBar_Append(*args, **kwargs)
e811c8ce
RD
8463
8464 def Insert(*args, **kwargs):
a95a7133 8465 """Insert(self, size_t pos, Menu menu, String title) -> bool"""
54f9ee45 8466 return _core_.MenuBar_Insert(*args, **kwargs)
e811c8ce
RD
8467
8468 def GetMenuCount(*args, **kwargs):
a95a7133 8469 """GetMenuCount(self) -> size_t"""
54f9ee45 8470 return _core_.MenuBar_GetMenuCount(*args, **kwargs)
e811c8ce
RD
8471
8472 def GetMenu(*args, **kwargs):
a95a7133 8473 """GetMenu(self, size_t pos) -> Menu"""
54f9ee45 8474 return _core_.MenuBar_GetMenu(*args, **kwargs)
e811c8ce
RD
8475
8476 def Replace(*args, **kwargs):
a95a7133 8477 """Replace(self, size_t pos, Menu menu, String title) -> Menu"""
54f9ee45 8478 return _core_.MenuBar_Replace(*args, **kwargs)
e811c8ce
RD
8479
8480 def Remove(*args, **kwargs):
a95a7133 8481 """Remove(self, size_t pos) -> Menu"""
54f9ee45 8482 return _core_.MenuBar_Remove(*args, **kwargs)
e811c8ce
RD
8483
8484 def EnableTop(*args, **kwargs):
a95a7133 8485 """EnableTop(self, size_t pos, bool enable)"""
54f9ee45 8486 return _core_.MenuBar_EnableTop(*args, **kwargs)
e811c8ce
RD
8487
8488 def IsEnabledTop(*args, **kwargs):
a95a7133 8489 """IsEnabledTop(self, size_t pos) -> bool"""
54f9ee45 8490 return _core_.MenuBar_IsEnabledTop(*args, **kwargs)
e811c8ce
RD
8491
8492 def SetLabelTop(*args, **kwargs):
a95a7133 8493 """SetLabelTop(self, size_t pos, String label)"""
54f9ee45 8494 return _core_.MenuBar_SetLabelTop(*args, **kwargs)
e811c8ce
RD
8495
8496 def GetLabelTop(*args, **kwargs):
a95a7133 8497 """GetLabelTop(self, size_t pos) -> String"""
54f9ee45 8498 return _core_.MenuBar_GetLabelTop(*args, **kwargs)
e811c8ce
RD
8499
8500 def FindMenuItem(*args, **kwargs):
a95a7133 8501 """FindMenuItem(self, String menu, String item) -> int"""
54f9ee45 8502 return _core_.MenuBar_FindMenuItem(*args, **kwargs)
e811c8ce
RD
8503
8504 def FindItemById(*args, **kwargs):
a95a7133 8505 """FindItemById(self, int id) -> MenuItem"""
54f9ee45 8506 return _core_.MenuBar_FindItemById(*args, **kwargs)
e811c8ce
RD
8507
8508 def FindMenu(*args, **kwargs):
a95a7133 8509 """FindMenu(self, String title) -> int"""
54f9ee45 8510 return _core_.MenuBar_FindMenu(*args, **kwargs)
e811c8ce
RD
8511
8512 def Enable(*args, **kwargs):
a95a7133 8513 """Enable(self, int id, bool enable)"""
54f9ee45 8514 return _core_.MenuBar_Enable(*args, **kwargs)
e811c8ce
RD
8515
8516 def Check(*args, **kwargs):
a95a7133 8517 """Check(self, int id, bool check)"""
54f9ee45 8518 return _core_.MenuBar_Check(*args, **kwargs)
e811c8ce
RD
8519
8520 def IsChecked(*args, **kwargs):
a95a7133 8521 """IsChecked(self, int id) -> bool"""
54f9ee45 8522 return _core_.MenuBar_IsChecked(*args, **kwargs)
e811c8ce
RD
8523
8524 def IsEnabled(*args, **kwargs):
a95a7133 8525 """IsEnabled(self, int id) -> bool"""
54f9ee45 8526 return _core_.MenuBar_IsEnabled(*args, **kwargs)
e811c8ce
RD
8527
8528 def SetLabel(*args, **kwargs):
a95a7133 8529 """SetLabel(self, int id, String label)"""
54f9ee45 8530 return _core_.MenuBar_SetLabel(*args, **kwargs)
e811c8ce
RD
8531
8532 def GetLabel(*args, **kwargs):
a95a7133 8533 """GetLabel(self, int id) -> String"""
54f9ee45 8534 return _core_.MenuBar_GetLabel(*args, **kwargs)
e811c8ce
RD
8535
8536 def SetHelpString(*args, **kwargs):
a95a7133 8537 """SetHelpString(self, int id, String helpString)"""
54f9ee45 8538 return _core_.MenuBar_SetHelpString(*args, **kwargs)
e811c8ce
RD
8539
8540 def GetHelpString(*args, **kwargs):
a95a7133 8541 """GetHelpString(self, int id) -> String"""
54f9ee45 8542 return _core_.MenuBar_GetHelpString(*args, **kwargs)
e811c8ce
RD
8543
8544 def GetFrame(*args, **kwargs):
a95a7133 8545 """GetFrame(self) -> wxFrame"""
54f9ee45 8546 return _core_.MenuBar_GetFrame(*args, **kwargs)
e811c8ce
RD
8547
8548 def IsAttached(*args, **kwargs):
a95a7133 8549 """IsAttached(self) -> bool"""
54f9ee45 8550 return _core_.MenuBar_IsAttached(*args, **kwargs)
e811c8ce
RD
8551
8552 def Attach(*args, **kwargs):
a95a7133 8553 """Attach(self, wxFrame frame)"""
54f9ee45 8554 return _core_.MenuBar_Attach(*args, **kwargs)
e811c8ce
RD
8555
8556 def Detach(*args, **kwargs):
a95a7133 8557 """Detach(self)"""
54f9ee45 8558 return _core_.MenuBar_Detach(*args, **kwargs)
e811c8ce 8559
d14a1e28
RD
8560
8561class MenuBarPtr(MenuBar):
8562 def __init__(self, this):
8563 self.this = this
8564 if not hasattr(self,"thisown"): self.thisown = 0
8565 self.__class__ = MenuBar
54f9ee45 8566_core_.MenuBar_swigregister(MenuBarPtr)
d14a1e28
RD
8567
8568#---------------------------------------------------------------------------
8569
8570class MenuItem(Object):
093d3ff1 8571 """Proxy of C++ MenuItem class"""
e811c8ce
RD
8572 def __repr__(self):
8573 return "<%s.%s; proxy of C++ wxMenuItem instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 8574 def __init__(self, *args, **kwargs):
0df68c9f 8575 """
a95a7133 8576 __init__(self, Menu parentMenu=None, int id=ID_ANY, String text=EmptyString,
196addbf
RD
8577 String help=EmptyString, int kind=ITEM_NORMAL,
8578 Menu subMenu=None) -> MenuItem
0df68c9f 8579 """
54f9ee45 8580 newobj = _core_.new_MenuItem(*args, **kwargs)
d14a1e28
RD
8581 self.this = newobj.this
8582 self.thisown = 1
8583 del newobj.thisown
e811c8ce 8584 def GetMenu(*args, **kwargs):
a95a7133 8585 """GetMenu(self) -> Menu"""
54f9ee45 8586 return _core_.MenuItem_GetMenu(*args, **kwargs)
e811c8ce
RD
8587
8588 def SetMenu(*args, **kwargs):
a95a7133 8589 """SetMenu(self, Menu menu)"""
54f9ee45 8590 return _core_.MenuItem_SetMenu(*args, **kwargs)
e811c8ce
RD
8591
8592 def SetId(*args, **kwargs):
a95a7133 8593 """SetId(self, int id)"""
54f9ee45 8594 return _core_.MenuItem_SetId(*args, **kwargs)
e811c8ce
RD
8595
8596 def GetId(*args, **kwargs):
a95a7133 8597 """GetId(self) -> int"""
54f9ee45 8598 return _core_.MenuItem_GetId(*args, **kwargs)
e811c8ce
RD
8599
8600 def IsSeparator(*args, **kwargs):
a95a7133 8601 """IsSeparator(self) -> bool"""
54f9ee45 8602 return _core_.MenuItem_IsSeparator(*args, **kwargs)
e811c8ce
RD
8603
8604 def SetText(*args, **kwargs):
a95a7133 8605 """SetText(self, String str)"""
54f9ee45 8606 return _core_.MenuItem_SetText(*args, **kwargs)
e811c8ce
RD
8607
8608 def GetLabel(*args, **kwargs):
a95a7133 8609 """GetLabel(self) -> String"""
54f9ee45 8610 return _core_.MenuItem_GetLabel(*args, **kwargs)
e811c8ce
RD
8611
8612 def GetText(*args, **kwargs):
a95a7133 8613 """GetText(self) -> String"""
54f9ee45 8614 return _core_.MenuItem_GetText(*args, **kwargs)
e811c8ce
RD
8615
8616 def GetLabelFromText(*args, **kwargs):
66c033b4 8617 """GetLabelFromText(String text) -> String"""
54f9ee45 8618 return _core_.MenuItem_GetLabelFromText(*args, **kwargs)
e811c8ce
RD
8619
8620 GetLabelFromText = staticmethod(GetLabelFromText)
8621 def GetKind(*args, **kwargs):
a95a7133 8622 """GetKind(self) -> int"""
54f9ee45 8623 return _core_.MenuItem_GetKind(*args, **kwargs)
e811c8ce 8624
a95a7133
RD
8625 def SetKind(*args, **kwargs):
8626 """SetKind(self, int kind)"""
54f9ee45 8627 return _core_.MenuItem_SetKind(*args, **kwargs)
a95a7133 8628
e811c8ce 8629 def SetCheckable(*args, **kwargs):
a95a7133 8630 """SetCheckable(self, bool checkable)"""
54f9ee45 8631 return _core_.MenuItem_SetCheckable(*args, **kwargs)
e811c8ce
RD
8632
8633 def IsCheckable(*args, **kwargs):
a95a7133 8634 """IsCheckable(self) -> bool"""
54f9ee45 8635 return _core_.MenuItem_IsCheckable(*args, **kwargs)
e811c8ce
RD
8636
8637 def IsSubMenu(*args, **kwargs):
a95a7133 8638 """IsSubMenu(self) -> bool"""
54f9ee45 8639 return _core_.MenuItem_IsSubMenu(*args, **kwargs)
e811c8ce
RD
8640
8641 def SetSubMenu(*args, **kwargs):
a95a7133 8642 """SetSubMenu(self, Menu menu)"""
54f9ee45 8643 return _core_.MenuItem_SetSubMenu(*args, **kwargs)
e811c8ce
RD
8644
8645 def GetSubMenu(*args, **kwargs):
a95a7133 8646 """GetSubMenu(self) -> Menu"""
54f9ee45 8647 return _core_.MenuItem_GetSubMenu(*args, **kwargs)
e811c8ce
RD
8648
8649 def Enable(*args, **kwargs):
a95a7133 8650 """Enable(self, bool enable=True)"""
54f9ee45 8651 return _core_.MenuItem_Enable(*args, **kwargs)
e811c8ce
RD
8652
8653 def IsEnabled(*args, **kwargs):
a95a7133 8654 """IsEnabled(self) -> bool"""
54f9ee45 8655 return _core_.MenuItem_IsEnabled(*args, **kwargs)
e811c8ce
RD
8656
8657 def Check(*args, **kwargs):
a95a7133 8658 """Check(self, bool check=True)"""
54f9ee45 8659 return _core_.MenuItem_Check(*args, **kwargs)
e811c8ce
RD
8660
8661 def IsChecked(*args, **kwargs):
a95a7133 8662 """IsChecked(self) -> bool"""
54f9ee45 8663 return _core_.MenuItem_IsChecked(*args, **kwargs)
e811c8ce
RD
8664
8665 def Toggle(*args, **kwargs):
a95a7133 8666 """Toggle(self)"""
54f9ee45 8667 return _core_.MenuItem_Toggle(*args, **kwargs)
e811c8ce
RD
8668
8669 def SetHelp(*args, **kwargs):
a95a7133 8670 """SetHelp(self, String str)"""
54f9ee45 8671 return _core_.MenuItem_SetHelp(*args, **kwargs)
e811c8ce
RD
8672
8673 def GetHelp(*args, **kwargs):
a95a7133 8674 """GetHelp(self) -> String"""
54f9ee45 8675 return _core_.MenuItem_GetHelp(*args, **kwargs)
e811c8ce
RD
8676
8677 def GetAccel(*args, **kwargs):
a95a7133 8678 """GetAccel(self) -> AcceleratorEntry"""
54f9ee45 8679 return _core_.MenuItem_GetAccel(*args, **kwargs)
e811c8ce
RD
8680
8681 def SetAccel(*args, **kwargs):
a95a7133 8682 """SetAccel(self, AcceleratorEntry accel)"""
54f9ee45 8683 return _core_.MenuItem_SetAccel(*args, **kwargs)
e811c8ce
RD
8684
8685 def GetDefaultMarginWidth(*args, **kwargs):
66c033b4 8686 """GetDefaultMarginWidth() -> int"""
54f9ee45 8687 return _core_.MenuItem_GetDefaultMarginWidth(*args, **kwargs)
e811c8ce
RD
8688
8689 GetDefaultMarginWidth = staticmethod(GetDefaultMarginWidth)
8690 def SetBitmap(*args, **kwargs):
a95a7133 8691 """SetBitmap(self, Bitmap bitmap)"""
54f9ee45 8692 return _core_.MenuItem_SetBitmap(*args, **kwargs)
e811c8ce
RD
8693
8694 def GetBitmap(*args, **kwargs):
a95a7133 8695 """GetBitmap(self) -> Bitmap"""
54f9ee45 8696 return _core_.MenuItem_GetBitmap(*args, **kwargs)
e811c8ce 8697
d14a1e28
RD
8698
8699class MenuItemPtr(MenuItem):
8700 def __init__(self, this):
8701 self.this = this
8702 if not hasattr(self,"thisown"): self.thisown = 0
8703 self.__class__ = MenuItem
54f9ee45 8704_core_.MenuItem_swigregister(MenuItemPtr)
d14a1e28 8705
e811c8ce 8706def MenuItem_GetLabelFromText(*args, **kwargs):
196addbf 8707 """MenuItem_GetLabelFromText(String text) -> String"""
54f9ee45 8708 return _core_.MenuItem_GetLabelFromText(*args, **kwargs)
d14a1e28 8709
e811c8ce
RD
8710def MenuItem_GetDefaultMarginWidth(*args, **kwargs):
8711 """MenuItem_GetDefaultMarginWidth() -> int"""
54f9ee45 8712 return _core_.MenuItem_GetDefaultMarginWidth(*args, **kwargs)
d14a1e28
RD
8713
8714#---------------------------------------------------------------------------
8715
8716class Control(Window):
15afbcd0
RD
8717 """
8718 This is the base class for a control or 'widget'.
8719
41e2b43e
RD
8720 A control is generally a small window which processes user input
8721 and/or displays one or more item of data.
15afbcd0 8722 """
e811c8ce
RD
8723 def __repr__(self):
8724 return "<%s.%s; proxy of C++ wxControl instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 8725 def __init__(self, *args, **kwargs):
0df68c9f 8726 """
248ed943
RD
8727 __init__(self, Window parent, int id=-1, Point pos=DefaultPosition,
8728 Size size=DefaultSize, long style=0, Validator validator=DefaultValidator,
b2dc1044 8729 String name=ControlNameStr) -> Control
15afbcd0 8730
41e2b43e
RD
8731 Create a Control. Normally you should only call this from a subclass'
8732 __init__ as a plain old wx.Control is not very useful.
0df68c9f 8733 """
54f9ee45 8734 newobj = _core_.new_Control(*args, **kwargs)
d14a1e28
RD
8735 self.this = newobj.this
8736 self.thisown = 1
8737 del newobj.thisown
8738 self._setOORInfo(self)
e811c8ce
RD
8739
8740 def Create(*args, **kwargs):
0df68c9f 8741 """
248ed943
RD
8742 Create(self, Window parent, int id=-1, Point pos=DefaultPosition,
8743 Size size=DefaultSize, long style=0, Validator validator=DefaultValidator,
b2dc1044 8744 String name=ControlNameStr) -> bool
15afbcd0
RD
8745
8746 Do the 2nd phase and create the GUI control.
0df68c9f 8747 """
54f9ee45 8748 return _core_.Control_Create(*args, **kwargs)
e811c8ce
RD
8749
8750 def Command(*args, **kwargs):
15afbcd0 8751 """
a95a7133 8752 Command(self, CommandEvent event)
15afbcd0 8753
41e2b43e
RD
8754 Simulates the effect of the user issuing a command to the item.
8755
8756 :see: `wx.CommandEvent`
8757
15afbcd0 8758 """
54f9ee45 8759 return _core_.Control_Command(*args, **kwargs)
e811c8ce
RD
8760
8761 def GetLabel(*args, **kwargs):
15afbcd0 8762 """
a95a7133 8763 GetLabel(self) -> String
15afbcd0
RD
8764
8765 Return a control's text.
8766 """
54f9ee45 8767 return _core_.Control_GetLabel(*args, **kwargs)
e811c8ce
RD
8768
8769 def SetLabel(*args, **kwargs):
15afbcd0 8770 """
a95a7133 8771 SetLabel(self, String label)
15afbcd0
RD
8772
8773 Sets the item's text.
8774 """
54f9ee45 8775 return _core_.Control_SetLabel(*args, **kwargs)
e811c8ce 8776
74a57fcd 8777 def GetClassDefaultAttributes(*args, **kwargs):
110da5b0
RD
8778 """
8779 GetClassDefaultAttributes(int variant=WINDOW_VARIANT_NORMAL) -> VisualAttributes
8780
8781 Get the default attributes for this class. This is useful if you want
8782 to use the same font or colour in your own control as in a standard
8783 control -- which is a much better idea than hard coding specific
8784 colours or fonts which might look completely out of place on the
8785 user's system, especially if it uses themes.
8786
8787 The variant parameter is only relevant under Mac currently and is
8788 ignore under other platforms. Under Mac, it will change the size of
8789 the returned font. See `wx.Window.SetWindowVariant` for more about
8790 this.
8791 """
54f9ee45 8792 return _core_.Control_GetClassDefaultAttributes(*args, **kwargs)
74a57fcd
RD
8793
8794 GetClassDefaultAttributes = staticmethod(GetClassDefaultAttributes)
d14a1e28
RD
8795
8796class ControlPtr(Control):
8797 def __init__(self, this):
8798 self.this = this
8799 if not hasattr(self,"thisown"): self.thisown = 0
8800 self.__class__ = Control
54f9ee45 8801_core_.Control_swigregister(ControlPtr)
b2dc1044 8802ControlNameStr = cvar.ControlNameStr
d14a1e28
RD
8803
8804def PreControl(*args, **kwargs):
15afbcd0
RD
8805 """
8806 PreControl() -> Control
8807
8808 Precreate a Control control for 2-phase creation
8809 """
54f9ee45 8810 val = _core_.new_PreControl(*args, **kwargs)
d14a1e28
RD
8811 val.thisown = 1
8812 return val
8813
74a57fcd 8814def Control_GetClassDefaultAttributes(*args, **kwargs):
110da5b0
RD
8815 """
8816 Control_GetClassDefaultAttributes(int variant=WINDOW_VARIANT_NORMAL) -> VisualAttributes
8817
8818 Get the default attributes for this class. This is useful if you want
8819 to use the same font or colour in your own control as in a standard
8820 control -- which is a much better idea than hard coding specific
8821 colours or fonts which might look completely out of place on the
8822 user's system, especially if it uses themes.
8823
8824 The variant parameter is only relevant under Mac currently and is
8825 ignore under other platforms. Under Mac, it will change the size of
8826 the returned font. See `wx.Window.SetWindowVariant` for more about
8827 this.
8828 """
54f9ee45 8829 return _core_.Control_GetClassDefaultAttributes(*args, **kwargs)
74a57fcd 8830
d14a1e28
RD
8831#---------------------------------------------------------------------------
8832
8833class ItemContainer(object):
15afbcd0 8834 """
53aa7709
RD
8835 The wx.ItemContainer class defines an interface which is implemented
8836 by all controls which have string subitems, each of which may be
8837 selected, such as `wx.ListBox`, `wx.CheckListBox`, `wx.Choice` as well
8838 as `wx.ComboBox` which implements an extended interface deriving from
41e2b43e 8839 this one.
15afbcd0 8840
41e2b43e
RD
8841 It defines the methods for accessing the control's items and although
8842 each of the derived classes implements them differently, they still
8843 all conform to the same interface.
15afbcd0 8844
41e2b43e
RD
8845 The items in a wx.ItemContainer have (non empty) string labels and,
8846 optionally, client data associated with them.
15afbcd0
RD
8847
8848 """
d14a1e28
RD
8849 def __init__(self): raise RuntimeError, "No constructor defined"
8850 def __repr__(self):
8851 return "<%s.%s; proxy of C++ wxItemContainer instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
e811c8ce 8852 def Append(*args, **kwargs):
15afbcd0 8853 """
a95a7133 8854 Append(self, String item, PyObject clientData=None) -> int
15afbcd0 8855
41e2b43e
RD
8856 Adds the item to the control, associating the given data with the item
8857 if not None. The return value is the index of the newly added item
8858 which may be different from the last one if the control is sorted (e.g.
8859 has wx.LB_SORT or wx.CB_SORT style).
15afbcd0 8860 """
54f9ee45 8861 return _core_.ItemContainer_Append(*args, **kwargs)
e811c8ce
RD
8862
8863 def AppendItems(*args, **kwargs):
15afbcd0 8864 """
f5b96ee1 8865 AppendItems(self, List strings)
15afbcd0 8866
41e2b43e
RD
8867 Apend several items at once to the control. Notice that calling this
8868 method may be much faster than appending the items one by one if you
8869 need to add a lot of items.
15afbcd0 8870 """
54f9ee45 8871 return _core_.ItemContainer_AppendItems(*args, **kwargs)
e811c8ce
RD
8872
8873 def Insert(*args, **kwargs):
15afbcd0 8874 """
a95a7133 8875 Insert(self, String item, int pos, PyObject clientData=None) -> int
15afbcd0 8876
41e2b43e 8877 Insert an item into the control before the item at the ``pos`` index,
15afbcd0
RD
8878 optionally associating some data object with the item.
8879 """
54f9ee45 8880 return _core_.ItemContainer_Insert(*args, **kwargs)
e811c8ce
RD
8881
8882 def Clear(*args, **kwargs):
15afbcd0 8883 """
a95a7133 8884 Clear(self)
15afbcd0
RD
8885
8886 Removes all items from the control.
8887 """
54f9ee45 8888 return _core_.ItemContainer_Clear(*args, **kwargs)
e811c8ce
RD
8889
8890 def Delete(*args, **kwargs):
15afbcd0 8891 """
a95a7133 8892 Delete(self, int n)
15afbcd0 8893
41e2b43e
RD
8894 Deletes the item at the zero-based index 'n' from the control. Note
8895 that it is an error (signalled by a `wx.PyAssertionError` exception if
8896 enabled) to remove an item with the index negative or greater or equal
8897 than the number of items in the control.
15afbcd0 8898 """
54f9ee45 8899 return _core_.ItemContainer_Delete(*args, **kwargs)
e811c8ce 8900
53aa7709
RD
8901 def GetClientData(*args, **kwargs):
8902 """
8903 GetClientData(self, int n) -> PyObject
8904
8905 Returns the client data associated with the given item, (if any.)
8906 """
8907 return _core_.ItemContainer_GetClientData(*args, **kwargs)
8908
8909 def SetClientData(*args, **kwargs):
8910 """
8911 SetClientData(self, int n, PyObject clientData)
8912
8913 Associate the given client data with the item at position n.
8914 """
8915 return _core_.ItemContainer_SetClientData(*args, **kwargs)
8916
e811c8ce 8917 def GetCount(*args, **kwargs):
15afbcd0 8918 """
a95a7133 8919 GetCount(self) -> int
15afbcd0
RD
8920
8921 Returns the number of items in the control.
8922 """
54f9ee45 8923 return _core_.ItemContainer_GetCount(*args, **kwargs)
e811c8ce
RD
8924
8925 def IsEmpty(*args, **kwargs):
15afbcd0 8926 """
a95a7133 8927 IsEmpty(self) -> bool
15afbcd0
RD
8928
8929 Returns True if the control is empty or False if it has some items.
8930 """
54f9ee45 8931 return _core_.ItemContainer_IsEmpty(*args, **kwargs)
e811c8ce
RD
8932
8933 def GetString(*args, **kwargs):
15afbcd0 8934 """
a95a7133 8935 GetString(self, int n) -> String
15afbcd0
RD
8936
8937 Returns the label of the item with the given index.
8938 """
54f9ee45 8939 return _core_.ItemContainer_GetString(*args, **kwargs)
e811c8ce
RD
8940
8941 def GetStrings(*args, **kwargs):
a95a7133 8942 """GetStrings(self) -> wxArrayString"""
54f9ee45 8943 return _core_.ItemContainer_GetStrings(*args, **kwargs)
e811c8ce
RD
8944
8945 def SetString(*args, **kwargs):
15afbcd0 8946 """
a95a7133 8947 SetString(self, int n, String s)
15afbcd0
RD
8948
8949 Sets the label for the given item.
8950 """
54f9ee45 8951 return _core_.ItemContainer_SetString(*args, **kwargs)
e811c8ce
RD
8952
8953 def FindString(*args, **kwargs):
15afbcd0 8954 """
a95a7133 8955 FindString(self, String s) -> int
15afbcd0
RD
8956
8957 Finds an item whose label matches the given string. Returns the
41e2b43e
RD
8958 zero-based position of the item, or ``wx.NOT_FOUND`` if the string was not
8959 found.
15afbcd0 8960 """
54f9ee45 8961 return _core_.ItemContainer_FindString(*args, **kwargs)
e811c8ce 8962
53aa7709 8963 def SetSelection(*args, **kwargs):
15afbcd0 8964 """
53aa7709 8965 SetSelection(self, int n)
15afbcd0
RD
8966
8967 Sets the item at index 'n' to be the selected item.
8968 """
53aa7709 8969 return _core_.ItemContainer_SetSelection(*args, **kwargs)
e811c8ce
RD
8970
8971 def GetSelection(*args, **kwargs):
15afbcd0 8972 """
a95a7133 8973 GetSelection(self) -> int
15afbcd0 8974
41e2b43e
RD
8975 Returns the index of the selected item or ``wx.NOT_FOUND`` if no item
8976 is selected.
15afbcd0 8977 """
54f9ee45 8978 return _core_.ItemContainer_GetSelection(*args, **kwargs)
e811c8ce 8979
53aa7709
RD
8980 def SetStringSelection(*args, **kwargs):
8981 """SetStringSelection(self, String s) -> bool"""
8982 return _core_.ItemContainer_SetStringSelection(*args, **kwargs)
8983
e811c8ce 8984 def GetStringSelection(*args, **kwargs):
15afbcd0 8985 """
a95a7133 8986 GetStringSelection(self) -> String
15afbcd0 8987
41e2b43e
RD
8988 Returns the label of the selected item or an empty string if no item
8989 is selected.
15afbcd0 8990 """
54f9ee45 8991 return _core_.ItemContainer_GetStringSelection(*args, **kwargs)
e811c8ce 8992
53aa7709 8993 def Select(*args, **kwargs):
15afbcd0 8994 """
53aa7709 8995 Select(self, int n)
15afbcd0 8996
53aa7709
RD
8997 This is the same as `SetSelection` and exists only because it is
8998 slightly more natural for controls which support multiple selection.
15afbcd0 8999 """
53aa7709 9000 return _core_.ItemContainer_Select(*args, **kwargs)
e811c8ce 9001
d14a1e28
RD
9002
9003class ItemContainerPtr(ItemContainer):
9004 def __init__(self, this):
9005 self.this = this
9006 if not hasattr(self,"thisown"): self.thisown = 0
9007 self.__class__ = ItemContainer
54f9ee45 9008_core_.ItemContainer_swigregister(ItemContainerPtr)
d14a1e28
RD
9009
9010#---------------------------------------------------------------------------
9011
9012class ControlWithItems(Control,ItemContainer):
15afbcd0 9013 """
41e2b43e
RD
9014 wx.ControlWithItems combines the ``wx.ItemContainer`` class with the
9015 wx.Control class, and is used for the base class of various controls
9016 that have items.
15afbcd0 9017 """
d14a1e28
RD
9018 def __init__(self): raise RuntimeError, "No constructor defined"
9019 def __repr__(self):
9020 return "<%s.%s; proxy of C++ wxControlWithItems instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
9021
9022class ControlWithItemsPtr(ControlWithItems):
9023 def __init__(self, this):
9024 self.this = this
9025 if not hasattr(self,"thisown"): self.thisown = 0
9026 self.__class__ = ControlWithItems
54f9ee45 9027_core_.ControlWithItems_swigregister(ControlWithItemsPtr)
d14a1e28
RD
9028
9029#---------------------------------------------------------------------------
9030
9031class SizerItem(Object):
248ed943
RD
9032 """
9033 The wx.SizerItem class is used to track the position, size and other
9034 attributes of each item managed by a `wx.Sizer`. In normal usage user
9035 code should never need to deal directly with a wx.SizerItem, but
9036 custom classes derived from `wx.PySizer` will probably need to use the
9037 collection of wx.SizerItems held by wx.Sizer when calculating layout.
9038
9039 :see: `wx.Sizer`, `wx.GBSizerItem`
9040 """
e811c8ce
RD
9041 def __repr__(self):
9042 return "<%s.%s; proxy of C++ wxSizerItem instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 9043 def __init__(self, *args, **kwargs):
248ed943
RD
9044 """
9045 __init__(self) -> SizerItem
9046
9047 Constructs an empty wx.SizerItem. Either a window, sizer or spacer
9048 size will need to be set before this item can be used in a Sizer.
9049
9050 You will probably never need to create a wx.SizerItem directly as they
9051 are created automatically when the sizer's Add, Insert or Prepend
9052 methods are called.
9053
9054 :see: `wx.SizerItemSpacer`, `wx.SizerItemWindow`, `wx.SizerItemSizer`
9055 """
54f9ee45 9056 newobj = _core_.new_SizerItem(*args, **kwargs)
d14a1e28
RD
9057 self.this = newobj.this
9058 self.thisown = 1
9059 del newobj.thisown
e811c8ce 9060 def DeleteWindows(*args, **kwargs):
248ed943
RD
9061 """
9062 DeleteWindows(self)
9063
9064 Destroy the window or the windows in a subsizer, depending on the type
9065 of item.
9066 """
54f9ee45 9067 return _core_.SizerItem_DeleteWindows(*args, **kwargs)
e811c8ce
RD
9068
9069 def DetachSizer(*args, **kwargs):
248ed943
RD
9070 """
9071 DetachSizer(self)
9072
9073 Enable deleting the SizerItem without destroying the contained sizer.
9074 """
54f9ee45 9075 return _core_.SizerItem_DetachSizer(*args, **kwargs)
e811c8ce
RD
9076
9077 def GetSize(*args, **kwargs):
248ed943
RD
9078 """
9079 GetSize(self) -> Size
9080
9081 Get the current size of the item, as set in the last Layout.
9082 """
54f9ee45 9083 return _core_.SizerItem_GetSize(*args, **kwargs)
e811c8ce
RD
9084
9085 def CalcMin(*args, **kwargs):
248ed943
RD
9086 """
9087 CalcMin(self) -> Size
9088
9089 Calculates the minimum desired size for the item, including any space
9090 needed by borders.
9091 """
54f9ee45 9092 return _core_.SizerItem_CalcMin(*args, **kwargs)
e811c8ce
RD
9093
9094 def SetDimension(*args, **kwargs):
248ed943
RD
9095 """
9096 SetDimension(self, Point pos, Size size)
9097
9098 Set the position and size of the space allocated for this item by the
9099 sizer, and adjust the position and size of the item (window or
9100 subsizer) to be within that space taking alignment and borders into
9101 account.
9102 """
54f9ee45 9103 return _core_.SizerItem_SetDimension(*args, **kwargs)
e811c8ce
RD
9104
9105 def GetMinSize(*args, **kwargs):
248ed943
RD
9106 """
9107 GetMinSize(self) -> Size
9108
9109 Get the minimum size needed for the item.
9110 """
54f9ee45 9111 return _core_.SizerItem_GetMinSize(*args, **kwargs)
e811c8ce 9112
dfbb5885
RD
9113 def GetMinSizeWithBorder(*args, **kwargs):
9114 """
9115 GetMinSizeWithBorder(self) -> Size
9116
9117 Get the minimum size needed for the item with space for the borders
9118 added, if needed.
9119 """
9120 return _core_.SizerItem_GetMinSizeWithBorder(*args, **kwargs)
9121
e811c8ce 9122 def SetInitSize(*args, **kwargs):
a95a7133 9123 """SetInitSize(self, int x, int y)"""
54f9ee45 9124 return _core_.SizerItem_SetInitSize(*args, **kwargs)
e811c8ce
RD
9125
9126 def SetRatioWH(*args, **kwargs):
248ed943
RD
9127 """
9128 SetRatioWH(self, int width, int height)
9129
9130 Set the ratio item attribute.
9131 """
54f9ee45 9132 return _core_.SizerItem_SetRatioWH(*args, **kwargs)
e811c8ce
RD
9133
9134 def SetRatioSize(*args, **kwargs):
248ed943
RD
9135 """
9136 SetRatioSize(self, Size size)
9137
9138 Set the ratio item attribute.
9139 """
54f9ee45 9140 return _core_.SizerItem_SetRatioSize(*args, **kwargs)
e811c8ce
RD
9141
9142 def SetRatio(*args, **kwargs):
248ed943
RD
9143 """
9144 SetRatio(self, float ratio)
9145
9146 Set the ratio item attribute.
9147 """
54f9ee45 9148 return _core_.SizerItem_SetRatio(*args, **kwargs)
e811c8ce
RD
9149
9150 def GetRatio(*args, **kwargs):
248ed943
RD
9151 """
9152 GetRatio(self) -> float
9153
9154 Set the ratio item attribute.
9155 """
54f9ee45 9156 return _core_.SizerItem_GetRatio(*args, **kwargs)
e811c8ce 9157
d3b6e4ff
RD
9158 def GetRect(*args, **kwargs):
9159 """
9160 GetRect(self) -> Rect
9161
9162 Returns the rectangle that the sizer item should occupy
9163 """
9164 return _core_.SizerItem_GetRect(*args, **kwargs)
9165
e811c8ce 9166 def IsWindow(*args, **kwargs):
248ed943
RD
9167 """
9168 IsWindow(self) -> bool
9169
9170 Is this sizer item a window?
9171 """
54f9ee45 9172 return _core_.SizerItem_IsWindow(*args, **kwargs)
e811c8ce
RD
9173
9174 def IsSizer(*args, **kwargs):
248ed943
RD
9175 """
9176 IsSizer(self) -> bool
9177
9178 Is this sizer item a subsizer?
9179 """
54f9ee45 9180 return _core_.SizerItem_IsSizer(*args, **kwargs)
e811c8ce
RD
9181
9182 def IsSpacer(*args, **kwargs):
248ed943
RD
9183 """
9184 IsSpacer(self) -> bool
9185
9186 Is this sizer item a spacer?
9187 """
54f9ee45 9188 return _core_.SizerItem_IsSpacer(*args, **kwargs)
e811c8ce
RD
9189
9190 def SetProportion(*args, **kwargs):
248ed943
RD
9191 """
9192 SetProportion(self, int proportion)
9193
9194 Set the proportion value for this item.
9195 """
54f9ee45 9196 return _core_.SizerItem_SetProportion(*args, **kwargs)
e811c8ce
RD
9197
9198 def GetProportion(*args, **kwargs):
248ed943
RD
9199 """
9200 GetProportion(self) -> int
9201
9202 Get the proportion value for this item.
9203 """
54f9ee45 9204 return _core_.SizerItem_GetProportion(*args, **kwargs)
e811c8ce 9205
248ed943
RD
9206 SetOption = wx._deprecated(SetProportion, "Please use `SetProportion` instead.")
9207 GetOption = wx._deprecated(GetProportion, "Please use `GetProportion` instead.")
e811c8ce 9208 def SetFlag(*args, **kwargs):
248ed943
RD
9209 """
9210 SetFlag(self, int flag)
9211
9212 Set the flag value for this item.
9213 """
54f9ee45 9214 return _core_.SizerItem_SetFlag(*args, **kwargs)
e811c8ce
RD
9215
9216 def GetFlag(*args, **kwargs):
248ed943
RD
9217 """
9218 GetFlag(self) -> int
9219
9220 Get the flag value for this item.
9221 """
54f9ee45 9222 return _core_.SizerItem_GetFlag(*args, **kwargs)
e811c8ce
RD
9223
9224 def SetBorder(*args, **kwargs):
248ed943
RD
9225 """
9226 SetBorder(self, int border)
9227
9228 Set the border value for this item.
9229 """
54f9ee45 9230 return _core_.SizerItem_SetBorder(*args, **kwargs)
e811c8ce
RD
9231
9232 def GetBorder(*args, **kwargs):
248ed943
RD
9233 """
9234 GetBorder(self) -> int
9235
9236 Get the border value for this item.
9237 """
54f9ee45 9238 return _core_.SizerItem_GetBorder(*args, **kwargs)
e811c8ce
RD
9239
9240 def GetWindow(*args, **kwargs):
248ed943
RD
9241 """
9242 GetWindow(self) -> Window
9243
9244 Get the window (if any) that is managed by this sizer item.
9245 """
54f9ee45 9246 return _core_.SizerItem_GetWindow(*args, **kwargs)
e811c8ce
RD
9247
9248 def SetWindow(*args, **kwargs):
248ed943
RD
9249 """
9250 SetWindow(self, Window window)
9251
9252 Set the window to be managed by this sizer item.
9253 """
54f9ee45 9254 return _core_.SizerItem_SetWindow(*args, **kwargs)
e811c8ce
RD
9255
9256 def GetSizer(*args, **kwargs):
248ed943
RD
9257 """
9258 GetSizer(self) -> Sizer
9259
9260 Get the subsizer (if any) that is managed by this sizer item.
9261 """
54f9ee45 9262 return _core_.SizerItem_GetSizer(*args, **kwargs)
e811c8ce
RD
9263
9264 def SetSizer(*args, **kwargs):
248ed943
RD
9265 """
9266 SetSizer(self, Sizer sizer)
9267
9268 Set the subsizer to be managed by this sizer item.
9269 """
54f9ee45 9270 return _core_.SizerItem_SetSizer(*args, **kwargs)
e811c8ce
RD
9271
9272 def GetSpacer(*args, **kwargs):
248ed943
RD
9273 """
9274 GetSpacer(self) -> Size
9275
9276 Get the size of the spacer managed by this sizer item.
9277 """
54f9ee45 9278 return _core_.SizerItem_GetSpacer(*args, **kwargs)
e811c8ce
RD
9279
9280 def SetSpacer(*args, **kwargs):
248ed943
RD
9281 """
9282 SetSpacer(self, Size size)
9283
9284 Set the size of the spacer to be managed by this sizer item.
9285 """
54f9ee45 9286 return _core_.SizerItem_SetSpacer(*args, **kwargs)
e811c8ce
RD
9287
9288 def Show(*args, **kwargs):
248ed943
RD
9289 """
9290 Show(self, bool show)
9291
9292 Set the show item attribute, which sizers use to determine if the item
9293 is to be made part of the layout or not. If the item is tracking a
9294 window then it is shown or hidden as needed.
9295 """
54f9ee45 9296 return _core_.SizerItem_Show(*args, **kwargs)
e811c8ce
RD
9297
9298 def IsShown(*args, **kwargs):
248ed943
RD
9299 """
9300 IsShown(self) -> bool
9301
9302 Is the item to be shown in the layout?
9303 """
54f9ee45 9304 return _core_.SizerItem_IsShown(*args, **kwargs)
e811c8ce
RD
9305
9306 def GetPosition(*args, **kwargs):
248ed943
RD
9307 """
9308 GetPosition(self) -> Point
9309
9310 Returns the current position of the item, as set in the last Layout.
9311 """
54f9ee45 9312 return _core_.SizerItem_GetPosition(*args, **kwargs)
e811c8ce
RD
9313
9314 def GetUserData(*args, **kwargs):
248ed943
RD
9315 """
9316 GetUserData(self) -> PyObject
9317
9318 Returns the userData associated with this sizer item, or None if there
9319 isn't any.
9320 """
54f9ee45 9321 return _core_.SizerItem_GetUserData(*args, **kwargs)
e811c8ce 9322
d14a1e28
RD
9323
9324class SizerItemPtr(SizerItem):
9325 def __init__(self, this):
9326 self.this = this
9327 if not hasattr(self,"thisown"): self.thisown = 0
9328 self.__class__ = SizerItem
54f9ee45 9329_core_.SizerItem_swigregister(SizerItemPtr)
d14a1e28 9330
248ed943 9331def SizerItemWindow(*args, **kwargs):
0df68c9f 9332 """
248ed943
RD
9333 SizerItemWindow(Window window, int proportion, int flag, int border,
9334 PyObject userData=None) -> SizerItem
9335
9336 Constructs a `wx.SizerItem` for tracking a window.
0df68c9f 9337 """
248ed943 9338 val = _core_.new_SizerItemWindow(*args, **kwargs)
d14a1e28
RD
9339 val.thisown = 1
9340 return val
9341
248ed943 9342def SizerItemSpacer(*args, **kwargs):
0df68c9f 9343 """
248ed943
RD
9344 SizerItemSpacer(int width, int height, int proportion, int flag, int border,
9345 PyObject userData=None) -> SizerItem
9346
9347 Constructs a `wx.SizerItem` for tracking a spacer.
0df68c9f 9348 """
248ed943 9349 val = _core_.new_SizerItemSpacer(*args, **kwargs)
d14a1e28
RD
9350 val.thisown = 1
9351 return val
9352
9353def SizerItemSizer(*args, **kwargs):
0df68c9f
RD
9354 """
9355 SizerItemSizer(Sizer sizer, int proportion, int flag, int border,
248ed943
RD
9356 PyObject userData=None) -> SizerItem
9357
9358 Constructs a `wx.SizerItem` for tracking a subsizer
0df68c9f 9359 """
54f9ee45 9360 val = _core_.new_SizerItemSizer(*args, **kwargs)
d14a1e28
RD
9361 val.thisown = 1
9362 return val
9363
9364class Sizer(Object):
248ed943
RD
9365 """
9366 wx.Sizer is the abstract base class used for laying out subwindows in
9367 a window. You cannot use wx.Sizer directly; instead, you will have to
9368 use one of the sizer classes derived from it such as `wx.BoxSizer`,
9369 `wx.StaticBoxSizer`, `wx.NotebookSizer`, `wx.GridSizer`, `wx.FlexGridSizer`
9370 and `wx.GridBagSizer`.
9371
9372 The concept implemented by sizers in wxWidgets is closely related to
9373 layout tools in other GUI toolkits, such as Java's AWT, the GTK
9374 toolkit or the Qt toolkit. It is based upon the idea of the individual
9375 subwindows reporting their minimal required size and their ability to
9376 get stretched if the size of the parent window has changed. This will
9377 most often mean that the programmer does not set the original size of
9378 a dialog in the beginning, rather the dialog will assigned a sizer and
9379 this sizer will be queried about the recommended size. The sizer in
9380 turn will query its children, which can be normal windows or contorls,
9381 empty space or other sizers, so that a hierarchy of sizers can be
9382 constructed. Note that wxSizer does not derive from wxWindow and thus
9383 do not interfere with tab ordering and requires very little resources
9384 compared to a real window on screen.
9385
9386 What makes sizers so well fitted for use in wxWidgets is the fact that
9387 every control reports its own minimal size and the algorithm can
9388 handle differences in font sizes or different window (dialog item)
9389 sizes on different platforms without problems. If for example the
9390 standard font as well as the overall design of Mac widgets requires
9391 more space than on Windows, then the initial size of a dialog using a
9392 sizer will automatically be bigger on Mac than on Windows.
9393 """
e811c8ce
RD
9394 def __init__(self): raise RuntimeError, "No constructor defined"
9395 def __repr__(self):
9396 return "<%s.%s; proxy of C++ wxSizer instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
9397 def _setOORInfo(*args, **kwargs):
a95a7133 9398 """_setOORInfo(self, PyObject _self)"""
54f9ee45 9399 return _core_.Sizer__setOORInfo(*args, **kwargs)
e811c8ce
RD
9400
9401 def Add(*args, **kwargs):
0df68c9f 9402 """
248ed943 9403 Add(self, item, int proportion=0, int flag=0, int border=0,
d3b6e4ff 9404 PyObject userData=None) -> wx.SizerItem
248ed943
RD
9405
9406 Appends a child item to the sizer.
0df68c9f 9407 """
54f9ee45 9408 return _core_.Sizer_Add(*args, **kwargs)
e811c8ce
RD
9409
9410 def Insert(*args, **kwargs):
0df68c9f 9411 """
248ed943 9412 Insert(self, int before, item, int proportion=0, int flag=0, int border=0,
d3b6e4ff 9413 PyObject userData=None) -> wx.SizerItem
248ed943
RD
9414
9415 Inserts a new item into the list of items managed by this sizer before
9416 the item at index *before*. See `Add` for a description of the parameters.
0df68c9f 9417 """
54f9ee45 9418 return _core_.Sizer_Insert(*args, **kwargs)
e811c8ce
RD
9419
9420 def Prepend(*args, **kwargs):
0df68c9f 9421 """
248ed943 9422 Prepend(self, item, int proportion=0, int flag=0, int border=0,
d3b6e4ff 9423 PyObject userData=None) -> wx.SizerItem
248ed943
RD
9424
9425 Adds a new item to the begining of the list of sizer items managed by
9426 this sizer. See `Add` for a description of the parameters.
0df68c9f 9427 """
54f9ee45 9428 return _core_.Sizer_Prepend(*args, **kwargs)
e811c8ce
RD
9429
9430 def Remove(*args, **kwargs):
248ed943
RD
9431 """
9432 Remove(self, item) -> bool
9433
9434 Removes an item from the sizer and destroys it. This method does not
9435 cause any layout or resizing to take place, call `Layout` to update
9436 the layout on screen after removing a child from the sizer. The
9437 *item* parameter can be either a window, a sizer, or the zero-based
9438 index of an item to remove. Returns True if the child item was found
9439 and removed.
9440 """
54f9ee45 9441 return _core_.Sizer_Remove(*args, **kwargs)
e811c8ce 9442
1c0f361b 9443 def Detach(*args, **kwargs):
248ed943
RD
9444 """
9445 Detach(self, item) -> bool
9446
9447 Detaches an item from the sizer without destroying it. This method
9448 does not cause any layout or resizing to take place, call `Layout` to
9449 do so. The *item* parameter can be either a window, a sizer, or the
9450 zero-based index of the item to be detached. Returns True if the child item
9451 was found and detached.
9452 """
1c0f361b
RD
9453 return _core_.Sizer_Detach(*args, **kwargs)
9454
d3b6e4ff
RD
9455 def GetItem(*args, **kwargs):
9456 """
9457 GetItem(self, item) -> wx.SizerItem
9458
9459 Returns the `wx.SizerItem` which holds the *item* given. The *item*
9460 parameter can be either a window, a sizer, or the zero-based index of
9461 the item to be detached.
9462 """
9463 return _core_.Sizer_GetItem(*args, **kwargs)
9464
e811c8ce 9465 def _SetItemMinSize(*args, **kwargs):
a95a7133 9466 """_SetItemMinSize(self, PyObject item, Size size)"""
54f9ee45 9467 return _core_.Sizer__SetItemMinSize(*args, **kwargs)
e811c8ce 9468
248ed943
RD
9469 def SetItemMinSize(self, item, *args):
9470 """
9471 SetItemMinSize(self, item, Size size)
9472
9473 Sets the minimum size that will be allocated for an item in the sizer.
9474 The *item* parameter can be either a window, a sizer, or the
9475 zero-based index of the item. If a window or sizer is given then it
9476 will be searched for recursivly in subsizers if neccessary.
9477 """
9478 if len(args) == 2:
9479 # for backward compatibility accept separate width,height args too
9480 return self._SetItemMinSize(item, args)
9481 else:
9482 return self._SetItemMinSize(item, args[0])
9483
e811c8ce 9484 def AddItem(*args, **kwargs):
248ed943
RD
9485 """
9486 AddItem(self, SizerItem item)
9487
9488 Adds a `wx.SizerItem` to the sizer.
9489 """
54f9ee45 9490 return _core_.Sizer_AddItem(*args, **kwargs)
e811c8ce
RD
9491
9492 def InsertItem(*args, **kwargs):
248ed943
RD
9493 """
9494 InsertItem(self, int index, SizerItem item)
9495
9496 Inserts a `wx.SizerItem` to the sizer at the position given by *index*.
9497 """
54f9ee45 9498 return _core_.Sizer_InsertItem(*args, **kwargs)
e811c8ce
RD
9499
9500 def PrependItem(*args, **kwargs):
248ed943
RD
9501 """
9502 PrependItem(self, SizerItem item)
9503
9504 Prepends a `wx.SizerItem` to the sizer.
9505 """
54f9ee45 9506 return _core_.Sizer_PrependItem(*args, **kwargs)
e811c8ce 9507
248ed943 9508 def AddMany(self, items):
66c033b4
RD
9509 """
9510 AddMany is a convenience method for adding several items
9511 to a sizer at one time. Simply pass it a list of tuples,
9512 where each tuple consists of the parameters that you
9513 would normally pass to the `Add` method.
9514 """
248ed943
RD
9515 for item in items:
9516 if type(item) != type(()) or (len(item) == 2 and type(item[0]) == type(1)):
9517 item = (item, )
9518 self.Add(*item)
d14a1e28 9519
74e96f3d 9520 # for backwards compatibility only, please do not use in new code
66c033b4
RD
9521 AddWindow = wx._deprecated(Add, "AddWindow is deprecated, use `Add` instead.")
9522 AddSizer = wx._deprecated(Add, "AddSizer is deprecated, use `Add` instead.")
9523 AddSpacer = wx._deprecated(Add, "AddSpacer is deprecated, use `Add` instead.")
9524 PrependWindow = wx._deprecated(Prepend, "PrependWindow is deprecated, use `Prepend` instead.")
9525 PrependSizer = wx._deprecated(Prepend, "PrependSizer is deprecated, use `Prepend` instead.")
9526 PrependSpacer = wx._deprecated(Prepend, "PrependSpacer is deprecated, use `Prepend` instead.")
9527 InsertWindow = wx._deprecated(Insert, "InsertWindow is deprecated, use `Insert` instead.")
9528 InsertSizer = wx._deprecated(Insert, "InsertSizer is deprecated, use `Insert` instead.")
9529 InsertSpacer = wx._deprecated(Insert, "InsertSpacer is deprecated, use `Insert` instead.")
9530 RemoveWindow = wx._deprecated(Remove, "RemoveWindow is deprecated, use `Remove` instead.")
9531 RemoveSizer = wx._deprecated(Remove, "RemoveSizer is deprecated, use `Remove` instead.")
9532 RemovePos = wx._deprecated(Remove, "RemovePos is deprecated, use `Remove` instead.")
d14a1e28
RD
9533
9534
e811c8ce 9535 def SetDimension(*args, **kwargs):
248ed943
RD
9536 """
9537 SetDimension(self, int x, int y, int width, int height)
9538
9539 Call this to force the sizer to take the given dimension and thus
9540 force the items owned by the sizer to resize themselves according to
9541 the rules defined by the parameter in the `Add`, `Insert` or `Prepend`
9542 methods.
9543 """
54f9ee45 9544 return _core_.Sizer_SetDimension(*args, **kwargs)
e811c8ce
RD
9545
9546 def SetMinSize(*args, **kwargs):
248ed943
RD
9547 """
9548 SetMinSize(self, Size size)
9549
9550 Call this to give the sizer a minimal size. Normally, the sizer will
9551 calculate its minimal size based purely on how much space its children
9552 need. After calling this method `GetMinSize` will return either the
9553 minimal size as requested by its children or the minimal size set
9554 here, depending on which is bigger.
9555 """
54f9ee45 9556 return _core_.Sizer_SetMinSize(*args, **kwargs)
e811c8ce
RD
9557
9558 def GetSize(*args, **kwargs):
248ed943
RD
9559 """
9560 GetSize(self) -> Size
9561
9562 Returns the current size of the space managed by the sizer.
9563 """
54f9ee45 9564 return _core_.Sizer_GetSize(*args, **kwargs)
e811c8ce
RD
9565
9566 def GetPosition(*args, **kwargs):
248ed943
RD
9567 """
9568 GetPosition(self) -> Point
9569
9570 Returns the current position of the sizer's managed space.
9571 """
54f9ee45 9572 return _core_.Sizer_GetPosition(*args, **kwargs)
e811c8ce
RD
9573
9574 def GetMinSize(*args, **kwargs):
248ed943
RD
9575 """
9576 GetMinSize(self) -> Size
9577
9578 Returns the minimal size of the sizer. This is either the combined
9579 minimal size of all the children and their borders or the minimal size
9580 set by SetMinSize, depending on which is bigger.
9581 """
54f9ee45 9582 return _core_.Sizer_GetMinSize(*args, **kwargs)
e811c8ce 9583
d14a1e28 9584 def GetSizeTuple(self):
1c0f361b 9585 return self.GetSize().Get()
d14a1e28 9586 def GetPositionTuple(self):
1c0f361b 9587 return self.GetPosition().Get()
d14a1e28 9588 def GetMinSizeTuple(self):
1c0f361b 9589 return self.GetMinSize().Get()
d14a1e28 9590
e811c8ce 9591 def RecalcSizes(*args, **kwargs):
248ed943
RD
9592 """
9593 RecalcSizes(self)
9594
9595 Using the sizes calculated by `CalcMin` reposition and resize all the
9596 items managed by this sizer. You should not need to call this directly as
9597 it is called by `Layout`.
9598 """
54f9ee45 9599 return _core_.Sizer_RecalcSizes(*args, **kwargs)
e811c8ce
RD
9600
9601 def CalcMin(*args, **kwargs):
248ed943
RD
9602 """
9603 CalcMin(self) -> Size
9604
9605 This method is where the sizer will do the actual calculation of its
9606 children's minimal sizes. You should not need to call this directly as
9607 it is called by `Layout`.
9608 """
54f9ee45 9609 return _core_.Sizer_CalcMin(*args, **kwargs)
e811c8ce
RD
9610
9611 def Layout(*args, **kwargs):
248ed943
RD
9612 """
9613 Layout(self)
9614
9615 This method will force the recalculation and layout of the items
9616 controlled by the sizer using the current space allocated to the
9617 sizer. Normally this is called automatically from the owning window's
9618 EVT_SIZE handler, but it is also useful to call it from user code when
9619 one of the items in a sizer change size, or items are added or
9620 removed.
9621 """
54f9ee45 9622 return _core_.Sizer_Layout(*args, **kwargs)
e811c8ce
RD
9623
9624 def Fit(*args, **kwargs):
248ed943
RD
9625 """
9626 Fit(self, Window window) -> Size
9627
9628 Tell the sizer to resize the *window* to match the sizer's minimal
9629 size. This is commonly done in the constructor of the window itself in
9630 order to set its initial size to match the needs of the children as
9631 determined by the sizer. Returns the new size.
9632
9633 For a top level window this is the total window size, not the client size.
9634 """
54f9ee45 9635 return _core_.Sizer_Fit(*args, **kwargs)
e811c8ce
RD
9636
9637 def FitInside(*args, **kwargs):
248ed943
RD
9638 """
9639 FitInside(self, Window window)
9640
9641 Tell the sizer to resize the *virtual size* of the *window* to match the
9642 sizer's minimal size. This will not alter the on screen size of the
9643 window, but may cause the addition/removal/alteration of scrollbars
9644 required to view the virtual area in windows which manage it.
9645
9646 :see: `wx.ScrolledWindow.SetScrollbars`, `SetVirtualSizeHints`
9647
9648 """
54f9ee45 9649 return _core_.Sizer_FitInside(*args, **kwargs)
e811c8ce
RD
9650
9651 def SetSizeHints(*args, **kwargs):
248ed943
RD
9652 """
9653 SetSizeHints(self, Window window)
9654
9655 Tell the sizer to set (and `Fit`) the minimal size of the *window* to
9656 match the sizer's minimal size. This is commonly done in the
9657 constructor of the window itself if the window is resizable (as are
9658 many dialogs under Unix and frames on probably all platforms) in order
9659 to prevent the window from being sized smaller than the minimal size
9660 required by the sizer.
9661 """
54f9ee45 9662 return _core_.Sizer_SetSizeHints(*args, **kwargs)
e811c8ce
RD
9663
9664 def SetVirtualSizeHints(*args, **kwargs):
248ed943
RD
9665 """
9666 SetVirtualSizeHints(self, Window window)
9667
9668 Tell the sizer to set the minimal size of the window virtual area to
9669 match the sizer's minimal size. For windows with managed scrollbars
9670 this will set them appropriately.
9671
9672 :see: `wx.ScrolledWindow.SetScrollbars`
9673
9674 """
54f9ee45 9675 return _core_.Sizer_SetVirtualSizeHints(*args, **kwargs)
e811c8ce
RD
9676
9677 def Clear(*args, **kwargs):
248ed943
RD
9678 """
9679 Clear(self, bool deleteWindows=False)
9680
9681 Clear all items from the sizer, optionally destroying the window items
9682 as well.
9683 """
54f9ee45 9684 return _core_.Sizer_Clear(*args, **kwargs)
e811c8ce
RD
9685
9686 def DeleteWindows(*args, **kwargs):
248ed943
RD
9687 """
9688 DeleteWindows(self)
9689
9690 Destroy all windows managed by the sizer.
9691 """
54f9ee45 9692 return _core_.Sizer_DeleteWindows(*args, **kwargs)
e811c8ce
RD
9693
9694 def GetChildren(*args, **kwargs):
248ed943 9695 """
51b83b37 9696 GetChildren(self) -> list
248ed943
RD
9697
9698 Returns a list of all the `wx.SizerItem` objects managed by the sizer.
9699 """
54f9ee45 9700 return _core_.Sizer_GetChildren(*args, **kwargs)
e811c8ce
RD
9701
9702 def Show(*args, **kwargs):
248ed943 9703 """
ae8162c8 9704 Show(self, item, bool show=True, bool recursive=false) -> bool
e811c8ce 9705
248ed943
RD
9706 Shows or hides an item managed by the sizer. To make a sizer item
9707 disappear or reappear, use Show followed by `Layout`. The *item*
9708 parameter can be either a window, a sizer, or the zero-based index of
7e63a440
RD
9709 the item. Use the recursive parameter to show or hide an item in a
9710 subsizer. Returns True if the item was found.
248ed943
RD
9711 """
9712 return _core_.Sizer_Show(*args, **kwargs)
e811c8ce
RD
9713
9714 def IsShown(*args, **kwargs):
248ed943
RD
9715 """
9716 IsShown(self, item)
9717
9718 Determines if the item is currently shown. sizer. To make a sizer
9719 item disappear or reappear, use Show followed by `Layout`. The *item*
9720 parameter can be either a window, a sizer, or the zero-based index of
9721 the item.
9722 """
54f9ee45 9723 return _core_.Sizer_IsShown(*args, **kwargs)
e811c8ce 9724
7e63a440 9725 def Hide(self, item, recursive=False):
248ed943 9726 """
7e63a440 9727 A convenience method for Show(item, False, recursive).
248ed943 9728 """
06759a38 9729 return self.Show(item, False, recursive)
248ed943 9730
e811c8ce 9731 def ShowItems(*args, **kwargs):
248ed943
RD
9732 """
9733 ShowItems(self, bool show)
9734
84f85550 9735 Recursively call `wx.SizerItem.Show` on all sizer items.
248ed943 9736 """
54f9ee45 9737 return _core_.Sizer_ShowItems(*args, **kwargs)
e811c8ce 9738
d14a1e28
RD
9739
9740class SizerPtr(Sizer):
9741 def __init__(self, this):
9742 self.this = this
9743 if not hasattr(self,"thisown"): self.thisown = 0
9744 self.__class__ = Sizer
54f9ee45 9745_core_.Sizer_swigregister(SizerPtr)
d14a1e28
RD
9746
9747class PySizer(Sizer):
248ed943
RD
9748 """
9749 wx.PySizer is a special version of `wx.Sizer` that has been
9750 instrumented to allow the C++ virtual methods to be overloaded in
9751 Python derived classes. You would derive from this class if you are
9752 wanting to implement a custom sizer in Python code. Simply implement
9753 `CalcMin` and `RecalcSizes` in the derived class and you're all set.
9754 For example::
9755
9756 class MySizer(wx.PySizer):
9757 def __init__(self):
9758 wx.PySizer.__init__(self)
9759
9760 def CalcMin(self):
9761 for item in self.GetChildren():
9762 # calculate the total minimum width and height needed
9763 # by all items in the sizer according to this sizer's
9764 # layout algorithm.
9765 ...
9766 return wx.Size(width, height)
9767
9768 def RecalcSizes(self):
9769 # find the space allotted to this sizer
9770 pos = self.GetPosition()
9771 size = self.GetSize()
9772 for item in self.GetChildren():
9773 # Recalculate (if necessary) the position and size of
9774 # each item and then call item.SetDimension to do the
9775 # actual positioning and sizing of the items within the
9776 # space alloted to this sizer.
9777 ...
9778 item.SetDimension(itemPos, itemSize)
9779
9780
9781 When `Layout` is called it first calls `CalcMin` followed by
9782 `RecalcSizes` so you can optimize a bit by saving the results of
e505d15e 9783 `CalcMin` and reusing them in `RecalcSizes`.
248ed943
RD
9784
9785 :see: `wx.SizerItem`, `wx.Sizer.GetChildren`
9786
9787
9788 """
e811c8ce
RD
9789 def __repr__(self):
9790 return "<%s.%s; proxy of C++ wxPySizer instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 9791 def __init__(self, *args, **kwargs):
248ed943
RD
9792 """
9793 __init__(self) -> PySizer
9794
9795 Creates a wx.PySizer. Must be called from the __init__ in the derived
9796 class.
9797 """
54f9ee45 9798 newobj = _core_.new_PySizer(*args, **kwargs)
d14a1e28
RD
9799 self.this = newobj.this
9800 self.thisown = 1
9801 del newobj.thisown
9802 self._setCallbackInfo(self, PySizer);self._setOORInfo(self)
e811c8ce
RD
9803
9804 def _setCallbackInfo(*args, **kwargs):
a95a7133 9805 """_setCallbackInfo(self, PyObject self, PyObject _class)"""
54f9ee45 9806 return _core_.PySizer__setCallbackInfo(*args, **kwargs)
e811c8ce 9807
d14a1e28
RD
9808
9809class PySizerPtr(PySizer):
9810 def __init__(self, this):
9811 self.this = this
9812 if not hasattr(self,"thisown"): self.thisown = 0
9813 self.__class__ = PySizer
54f9ee45 9814_core_.PySizer_swigregister(PySizerPtr)
d14a1e28
RD
9815
9816#---------------------------------------------------------------------------
9817
9818class BoxSizer(Sizer):
248ed943
RD
9819 """
9820 The basic idea behind a box sizer is that windows will most often be
9821 laid out in rather simple basic geometry, typically in a row or a
9822 column or nested hierarchies of either. A wx.BoxSizer will lay out
9823 its items in a simple row or column, depending on the orientation
9824 parameter passed to the constructor.
9825 """
e811c8ce
RD
9826 def __repr__(self):
9827 return "<%s.%s; proxy of C++ wxBoxSizer instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 9828 def __init__(self, *args, **kwargs):
248ed943
RD
9829 """
9830 __init__(self, int orient=HORIZONTAL) -> BoxSizer
9831
9832 Constructor for a wx.BoxSizer. *orient* may be one of ``wx.VERTICAL``
9833 or ``wx.HORIZONTAL`` for creating either a column sizer or a row
9834 sizer.
9835 """
54f9ee45 9836 newobj = _core_.new_BoxSizer(*args, **kwargs)
d14a1e28
RD
9837 self.this = newobj.this
9838 self.thisown = 1
9839 del newobj.thisown
9840 self._setOORInfo(self)
e811c8ce
RD
9841
9842 def GetOrientation(*args, **kwargs):
248ed943
RD
9843 """
9844 GetOrientation(self) -> int
9845
9846 Returns the current orientation of the sizer.
9847 """
54f9ee45 9848 return _core_.BoxSizer_GetOrientation(*args, **kwargs)
e811c8ce
RD
9849
9850 def SetOrientation(*args, **kwargs):
248ed943
RD
9851 """
9852 SetOrientation(self, int orient)
e811c8ce 9853
248ed943
RD
9854 Resets the orientation of the sizer.
9855 """
9856 return _core_.BoxSizer_SetOrientation(*args, **kwargs)
e811c8ce 9857
d14a1e28
RD
9858
9859class BoxSizerPtr(BoxSizer):
9860 def __init__(self, this):
9861 self.this = this
9862 if not hasattr(self,"thisown"): self.thisown = 0
9863 self.__class__ = BoxSizer
54f9ee45 9864_core_.BoxSizer_swigregister(BoxSizerPtr)
d14a1e28
RD
9865
9866#---------------------------------------------------------------------------
9867
9868class StaticBoxSizer(BoxSizer):
248ed943
RD
9869 """
9870 wx.StaticBoxSizer derives from and functions identically to the
9871 `wx.BoxSizer` and adds a `wx.StaticBox` around the items that the sizer
9872 manages. Note that this static box must be created separately and
9873 passed to the sizer constructor.
9874 """
e811c8ce
RD
9875 def __repr__(self):
9876 return "<%s.%s; proxy of C++ wxStaticBoxSizer instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 9877 def __init__(self, *args, **kwargs):
248ed943
RD
9878 """
9879 __init__(self, StaticBox box, int orient=HORIZONTAL) -> StaticBoxSizer
9880
9881 Constructor. It takes an associated static box and the orientation
9882 *orient* as parameters - orient can be either of ``wx.VERTICAL`` or
9883 ``wx.HORIZONTAL``.
9884 """
54f9ee45 9885 newobj = _core_.new_StaticBoxSizer(*args, **kwargs)
d14a1e28
RD
9886 self.this = newobj.this
9887 self.thisown = 1
9888 del newobj.thisown
9889 self._setOORInfo(self)
e811c8ce
RD
9890
9891 def GetStaticBox(*args, **kwargs):
248ed943
RD
9892 """
9893 GetStaticBox(self) -> StaticBox
e811c8ce 9894
248ed943
RD
9895 Returns the static box associated with this sizer.
9896 """
9897 return _core_.StaticBoxSizer_GetStaticBox(*args, **kwargs)
e811c8ce 9898
d14a1e28
RD
9899
9900class StaticBoxSizerPtr(StaticBoxSizer):
9901 def __init__(self, this):
9902 self.this = this
9903 if not hasattr(self,"thisown"): self.thisown = 0
9904 self.__class__ = StaticBoxSizer
54f9ee45 9905_core_.StaticBoxSizer_swigregister(StaticBoxSizerPtr)
d14a1e28
RD
9906
9907#---------------------------------------------------------------------------
9908
9909class GridSizer(Sizer):
248ed943
RD
9910 """
9911 A grid sizer is a sizer which lays out its children in a
9912 two-dimensional table with all cells having the same size. In other
9913 words, the width of each cell within the grid is the width of the
9914 widest item added to the sizer and the height of each grid cell is the
9915 height of the tallest item. An optional vertical and/or horizontal
9916 gap between items can also be specified (in pixels.)
9917
9918 Items are placed in the cells of the grid in the order they are added,
9919 in row-major order. In other words, the first row is filled first,
9920 then the second, and so on until all items have been added. (If
9921 neccessary, additional rows will be added as items are added.) If you
9922 need to have greater control over the cells that items are placed in
9923 then use the `wx.GridBagSizer`.
9924
9925 """
e811c8ce
RD
9926 def __repr__(self):
9927 return "<%s.%s; proxy of C++ wxGridSizer instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 9928 def __init__(self, *args, **kwargs):
248ed943
RD
9929 """
9930 __init__(self, int rows=1, int cols=0, int vgap=0, int hgap=0) -> GridSizer
9931
9932 Constructor for a wx.GridSizer. *rows* and *cols* determine the number
9933 of columns and rows in the sizer - if either of the parameters is
9934 zero, it will be calculated to from the total number of children in
9935 the sizer, thus making the sizer grow dynamically. *vgap* and *hgap*
9936 define extra space between all children.
9937 """
54f9ee45 9938 newobj = _core_.new_GridSizer(*args, **kwargs)
d14a1e28
RD
9939 self.this = newobj.this
9940 self.thisown = 1
9941 del newobj.thisown
9942 self._setOORInfo(self)
e811c8ce 9943
e811c8ce 9944 def SetCols(*args, **kwargs):
248ed943
RD
9945 """
9946 SetCols(self, int cols)
9947
9948 Sets the number of columns in the sizer.
9949 """
54f9ee45 9950 return _core_.GridSizer_SetCols(*args, **kwargs)
e811c8ce
RD
9951
9952 def SetRows(*args, **kwargs):
248ed943
RD
9953 """
9954 SetRows(self, int rows)
9955
9956 Sets the number of rows in the sizer.
9957 """
54f9ee45 9958 return _core_.GridSizer_SetRows(*args, **kwargs)
e811c8ce
RD
9959
9960 def SetVGap(*args, **kwargs):
248ed943
RD
9961 """
9962 SetVGap(self, int gap)
9963
9964 Sets the vertical gap (in pixels) between the cells in the sizer.
9965 """
54f9ee45 9966 return _core_.GridSizer_SetVGap(*args, **kwargs)
e811c8ce
RD
9967
9968 def SetHGap(*args, **kwargs):
248ed943
RD
9969 """
9970 SetHGap(self, int gap)
9971
9972 Sets the horizontal gap (in pixels) between cells in the sizer
9973 """
54f9ee45 9974 return _core_.GridSizer_SetHGap(*args, **kwargs)
e811c8ce
RD
9975
9976 def GetCols(*args, **kwargs):
248ed943
RD
9977 """
9978 GetCols(self) -> int
9979
9980 Returns the number of columns in the sizer.
9981 """
54f9ee45 9982 return _core_.GridSizer_GetCols(*args, **kwargs)
e811c8ce
RD
9983
9984 def GetRows(*args, **kwargs):
248ed943
RD
9985 """
9986 GetRows(self) -> int
9987
9988 Returns the number of rows in the sizer.
9989 """
54f9ee45 9990 return _core_.GridSizer_GetRows(*args, **kwargs)
e811c8ce
RD
9991
9992 def GetVGap(*args, **kwargs):
248ed943
RD
9993 """
9994 GetVGap(self) -> int
9995
9996 Returns the vertical gap (in pixels) between the cells in the sizer.
9997 """
54f9ee45 9998 return _core_.GridSizer_GetVGap(*args, **kwargs)
e811c8ce
RD
9999
10000 def GetHGap(*args, **kwargs):
248ed943
RD
10001 """
10002 GetHGap(self) -> int
10003
10004 Returns the horizontal gap (in pixels) between cells in the sizer.
10005 """
54f9ee45 10006 return _core_.GridSizer_GetHGap(*args, **kwargs)
e811c8ce 10007
d14a1e28
RD
10008
10009class GridSizerPtr(GridSizer):
10010 def __init__(self, this):
10011 self.this = this
10012 if not hasattr(self,"thisown"): self.thisown = 0
10013 self.__class__ = GridSizer
54f9ee45 10014_core_.GridSizer_swigregister(GridSizerPtr)
d14a1e28
RD
10015
10016#---------------------------------------------------------------------------
10017
54f9ee45
RD
10018FLEX_GROWMODE_NONE = _core_.FLEX_GROWMODE_NONE
10019FLEX_GROWMODE_SPECIFIED = _core_.FLEX_GROWMODE_SPECIFIED
10020FLEX_GROWMODE_ALL = _core_.FLEX_GROWMODE_ALL
d14a1e28 10021class FlexGridSizer(GridSizer):
248ed943
RD
10022 """
10023 A flex grid sizer is a sizer which lays out its children in a
10024 two-dimensional table with all table cells in one row having the same
10025 height and all cells in one column having the same width, but all
10026 rows or all columns are not necessarily the same height or width as in
10027 the `wx.GridSizer`.
10028
10029 wx.FlexGridSizer can also size items equally in one direction but
10030 unequally ("flexibly") in the other. If the sizer is only flexible
10031 in one direction (this can be changed using `SetFlexibleDirection`), it
10032 needs to be decided how the sizer should grow in the other ("non
10033 flexible") direction in order to fill the available space. The
10034 `SetNonFlexibleGrowMode` method serves this purpose.
10035
10036
10037 """
e811c8ce
RD
10038 def __repr__(self):
10039 return "<%s.%s; proxy of C++ wxFlexGridSizer instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 10040 def __init__(self, *args, **kwargs):
248ed943
RD
10041 """
10042 __init__(self, int rows=1, int cols=0, int vgap=0, int hgap=0) -> FlexGridSizer
10043
10044 Constructor for a wx.FlexGridSizer. *rows* and *cols* determine the
10045 number of columns and rows in the sizer - if either of the parameters
10046 is zero, it will be calculated to from the total number of children in
10047 the sizer, thus making the sizer grow dynamically. *vgap* and *hgap*
10048 define extra space between all children.
10049 """
54f9ee45 10050 newobj = _core_.new_FlexGridSizer(*args, **kwargs)
d14a1e28
RD
10051 self.this = newobj.this
10052 self.thisown = 1
10053 del newobj.thisown
10054 self._setOORInfo(self)
e811c8ce 10055
248ed943
RD
10056 def AddGrowableRow(*args, **kwargs):
10057 """
10058 AddGrowableRow(self, size_t idx, int proportion=0)
e811c8ce 10059
248ed943
RD
10060 Specifies that row *idx* (starting from zero) should be grown if there
10061 is extra space available to the sizer.
e811c8ce 10062
248ed943
RD
10063 The *proportion* parameter has the same meaning as the stretch factor
10064 for the box sizers except that if all proportions are 0, then all
10065 columns are resized equally (instead of not being resized at all).
10066 """
54f9ee45 10067 return _core_.FlexGridSizer_AddGrowableRow(*args, **kwargs)
e811c8ce
RD
10068
10069 def RemoveGrowableRow(*args, **kwargs):
248ed943
RD
10070 """
10071 RemoveGrowableRow(self, size_t idx)
10072
10073 Specifies that row *idx* is no longer growable.
10074 """
54f9ee45 10075 return _core_.FlexGridSizer_RemoveGrowableRow(*args, **kwargs)
e811c8ce
RD
10076
10077 def AddGrowableCol(*args, **kwargs):
248ed943
RD
10078 """
10079 AddGrowableCol(self, size_t idx, int proportion=0)
10080
10081 Specifies that column *idx* (starting from zero) should be grown if
10082 there is extra space available to the sizer.
10083
10084 The *proportion* parameter has the same meaning as the stretch factor
10085 for the box sizers except that if all proportions are 0, then all
10086 columns are resized equally (instead of not being resized at all).
10087 """
54f9ee45 10088 return _core_.FlexGridSizer_AddGrowableCol(*args, **kwargs)
e811c8ce
RD
10089
10090 def RemoveGrowableCol(*args, **kwargs):
248ed943
RD
10091 """
10092 RemoveGrowableCol(self, size_t idx)
10093
10094 Specifies that column *idx* is no longer growable.
10095 """
54f9ee45 10096 return _core_.FlexGridSizer_RemoveGrowableCol(*args, **kwargs)
e811c8ce
RD
10097
10098 def SetFlexibleDirection(*args, **kwargs):
248ed943
RD
10099 """
10100 SetFlexibleDirection(self, int direction)
10101
10102 Specifies whether the sizer should flexibly resize its columns, rows,
10103 or both. Argument *direction* can be one of the following values. Any
10104 other value is ignored.
10105
10106 ============== =======================================
10107 wx.VERTICAL Rows are flexibly sized.
10108 wx.HORIZONTAL Columns are flexibly sized.
10109 wx.BOTH Both rows and columns are flexibly sized
10110 (this is the default value).
10111 ============== =======================================
10112
10113 Note that this method does not trigger relayout.
10114
10115 """
54f9ee45 10116 return _core_.FlexGridSizer_SetFlexibleDirection(*args, **kwargs)
e811c8ce
RD
10117
10118 def GetFlexibleDirection(*args, **kwargs):
248ed943
RD
10119 """
10120 GetFlexibleDirection(self) -> int
10121
10122 Returns a value that specifies whether the sizer
10123 flexibly resizes its columns, rows, or both (default).
10124
10125 :see: `SetFlexibleDirection`
10126 """
54f9ee45 10127 return _core_.FlexGridSizer_GetFlexibleDirection(*args, **kwargs)
e811c8ce
RD
10128
10129 def SetNonFlexibleGrowMode(*args, **kwargs):
248ed943
RD
10130 """
10131 SetNonFlexibleGrowMode(self, int mode)
10132
10133 Specifies how the sizer should grow in the non-flexible direction if
10134 there is one (so `SetFlexibleDirection` must have been called
10135 previously). Argument *mode* can be one of the following values:
10136
10137 ========================== =================================================
10138 wx.FLEX_GROWMODE_NONE Sizer doesn't grow in the non flexible direction.
10139 wx.FLEX_GROWMODE_SPECIFIED Sizer honors growable columns/rows set with
10140 `AddGrowableCol` and `AddGrowableRow`. In this
10141 case equal sizing applies to minimum sizes of
10142 columns or rows (this is the default value).
10143 wx.FLEX_GROWMODE_ALL Sizer equally stretches all columns or rows in
10144 the non flexible direction, whether they are
10145 growable or not in the flexbile direction.
10146 ========================== =================================================
10147
10148 Note that this method does not trigger relayout.
10149
10150
10151 """
54f9ee45 10152 return _core_.FlexGridSizer_SetNonFlexibleGrowMode(*args, **kwargs)
e811c8ce
RD
10153
10154 def GetNonFlexibleGrowMode(*args, **kwargs):
248ed943
RD
10155 """
10156 GetNonFlexibleGrowMode(self) -> int
10157
10158 Returns the value that specifies how the sizer grows in the
10159 non-flexible direction if there is one.
10160
10161 :see: `SetNonFlexibleGrowMode`
10162 """
54f9ee45 10163 return _core_.FlexGridSizer_GetNonFlexibleGrowMode(*args, **kwargs)
e811c8ce
RD
10164
10165 def GetRowHeights(*args, **kwargs):
fd2dc343
RD
10166 """
10167 GetRowHeights(self) -> list
10168
10169 Returns a list of integers representing the heights of each of the
10170 rows in the sizer.
10171 """
54f9ee45 10172 return _core_.FlexGridSizer_GetRowHeights(*args, **kwargs)
e811c8ce
RD
10173
10174 def GetColWidths(*args, **kwargs):
fd2dc343
RD
10175 """
10176 GetColWidths(self) -> list
10177
10178 Returns a list of integers representing the widths of each of the
10179 columns in the sizer.
10180 """
54f9ee45 10181 return _core_.FlexGridSizer_GetColWidths(*args, **kwargs)
e811c8ce 10182
d14a1e28
RD
10183
10184class FlexGridSizerPtr(FlexGridSizer):
10185 def __init__(self, this):
10186 self.this = this
10187 if not hasattr(self,"thisown"): self.thisown = 0
10188 self.__class__ = FlexGridSizer
54f9ee45 10189_core_.FlexGridSizer_swigregister(FlexGridSizerPtr)
d14a1e28 10190
e505d15e
RD
10191class StdDialogButtonSizer(BoxSizer):
10192 """
10193 A special sizer that knows how to order and position standard buttons
10194 in order to conform to the current platform's standards. You simply
10195 need to add each `wx.Button` to the sizer, and be sure to create the
53aa7709 10196 buttons using the standard ID's. Then call `Realize` and the sizer
e505d15e
RD
10197 will take care of the rest.
10198
10199 """
10200 def __repr__(self):
10201 return "<%s.%s; proxy of C++ wxStdDialogButtonSizer instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
10202 def __init__(self, *args, **kwargs):
10203 """__init__(self) -> StdDialogButtonSizer"""
10204 newobj = _core_.new_StdDialogButtonSizer(*args, **kwargs)
10205 self.this = newobj.this
10206 self.thisown = 1
10207 del newobj.thisown
10208 def AddButton(*args, **kwargs):
10209 """
10210 AddButton(self, wxButton button)
10211
10212 Use this to add the buttons to this sizer. Do not use the `Add`
10213 method in the base class.
10214 """
10215 return _core_.StdDialogButtonSizer_AddButton(*args, **kwargs)
10216
53aa7709 10217 def Realize(*args, **kwargs):
e505d15e 10218 """
53aa7709 10219 Realize(self)
e505d15e
RD
10220
10221 This funciton needs to be called after all the buttons have been added
10222 to the sizer. It will reorder them and position them in a platform
10223 specifc manner.
10224 """
53aa7709 10225 return _core_.StdDialogButtonSizer_Realize(*args, **kwargs)
51b83b37
RD
10226
10227 def SetAffirmativeButton(*args, **kwargs):
10228 """SetAffirmativeButton(self, wxButton button)"""
10229 return _core_.StdDialogButtonSizer_SetAffirmativeButton(*args, **kwargs)
10230
10231 def SetNegativeButton(*args, **kwargs):
10232 """SetNegativeButton(self, wxButton button)"""
10233 return _core_.StdDialogButtonSizer_SetNegativeButton(*args, **kwargs)
10234
10235 def SetCancelButton(*args, **kwargs):
10236 """SetCancelButton(self, wxButton button)"""
10237 return _core_.StdDialogButtonSizer_SetCancelButton(*args, **kwargs)
e505d15e
RD
10238
10239 def GetAffirmativeButton(*args, **kwargs):
10240 """GetAffirmativeButton(self) -> wxButton"""
10241 return _core_.StdDialogButtonSizer_GetAffirmativeButton(*args, **kwargs)
10242
10243 def GetApplyButton(*args, **kwargs):
10244 """GetApplyButton(self) -> wxButton"""
10245 return _core_.StdDialogButtonSizer_GetApplyButton(*args, **kwargs)
10246
10247 def GetNegativeButton(*args, **kwargs):
10248 """GetNegativeButton(self) -> wxButton"""
10249 return _core_.StdDialogButtonSizer_GetNegativeButton(*args, **kwargs)
10250
10251 def GetCancelButton(*args, **kwargs):
10252 """GetCancelButton(self) -> wxButton"""
10253 return _core_.StdDialogButtonSizer_GetCancelButton(*args, **kwargs)
10254
10255 def GetHelpButton(*args, **kwargs):
10256 """GetHelpButton(self) -> wxButton"""
10257 return _core_.StdDialogButtonSizer_GetHelpButton(*args, **kwargs)
10258
10259
10260class StdDialogButtonSizerPtr(StdDialogButtonSizer):
10261 def __init__(self, this):
10262 self.this = this
10263 if not hasattr(self,"thisown"): self.thisown = 0
10264 self.__class__ = StdDialogButtonSizer
10265_core_.StdDialogButtonSizer_swigregister(StdDialogButtonSizerPtr)
10266
d14a1e28
RD
10267#---------------------------------------------------------------------------
10268
10269class GBPosition(object):
248ed943
RD
10270 """
10271 This class represents the position of an item in a virtual grid of
10272 rows and columns managed by a `wx.GridBagSizer`. wxPython has
10273 typemaps that will automatically convert from a 2-element sequence of
10274 integers to a wx.GBPosition, so you can use the more pythonic
10275 representation of the position nearly transparently in Python code.
10276 """
e811c8ce
RD
10277 def __repr__(self):
10278 return "<%s.%s; proxy of C++ wxGBPosition instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 10279 def __init__(self, *args, **kwargs):
248ed943
RD
10280 """
10281 __init__(self, int row=0, int col=0) -> GBPosition
10282
10283 This class represents the position of an item in a virtual grid of
10284 rows and columns managed by a `wx.GridBagSizer`. wxPython has
10285 typemaps that will automatically convert from a 2-element sequence of
10286 integers to a wx.GBPosition, so you can use the more pythonic
10287 representation of the position nearly transparently in Python code.
10288 """
54f9ee45 10289 newobj = _core_.new_GBPosition(*args, **kwargs)
d14a1e28
RD
10290 self.this = newobj.this
10291 self.thisown = 1
10292 del newobj.thisown
e811c8ce 10293 def GetRow(*args, **kwargs):
a95a7133 10294 """GetRow(self) -> int"""
54f9ee45 10295 return _core_.GBPosition_GetRow(*args, **kwargs)
e811c8ce
RD
10296
10297 def GetCol(*args, **kwargs):
a95a7133 10298 """GetCol(self) -> int"""
54f9ee45 10299 return _core_.GBPosition_GetCol(*args, **kwargs)
e811c8ce
RD
10300
10301 def SetRow(*args, **kwargs):
a95a7133 10302 """SetRow(self, int row)"""
54f9ee45 10303 return _core_.GBPosition_SetRow(*args, **kwargs)
e811c8ce
RD
10304
10305 def SetCol(*args, **kwargs):
a95a7133 10306 """SetCol(self, int col)"""
54f9ee45 10307 return _core_.GBPosition_SetCol(*args, **kwargs)
e811c8ce
RD
10308
10309 def __eq__(*args, **kwargs):
a95a7133 10310 """__eq__(self, GBPosition other) -> bool"""
54f9ee45 10311 return _core_.GBPosition___eq__(*args, **kwargs)
e811c8ce
RD
10312
10313 def __ne__(*args, **kwargs):
a95a7133 10314 """__ne__(self, GBPosition other) -> bool"""
54f9ee45 10315 return _core_.GBPosition___ne__(*args, **kwargs)
e811c8ce
RD
10316
10317 def Set(*args, **kwargs):
a95a7133 10318 """Set(self, int row=0, int col=0)"""
54f9ee45 10319 return _core_.GBPosition_Set(*args, **kwargs)
e811c8ce
RD
10320
10321 def Get(*args, **kwargs):
a95a7133 10322 """Get(self) -> PyObject"""
54f9ee45 10323 return _core_.GBPosition_Get(*args, **kwargs)
e811c8ce 10324
41e2b43e 10325 asTuple = wx._deprecated(Get, "asTuple is deprecated, use `Get` instead")
e811c8ce
RD
10326 def __str__(self): return str(self.Get())
10327 def __repr__(self): return 'wx.GBPosition'+str(self.Get())
10328 def __len__(self): return len(self.Get())
10329 def __getitem__(self, index): return self.Get()[index]
d14a1e28
RD
10330 def __setitem__(self, index, val):
10331 if index == 0: self.SetRow(val)
10332 elif index == 1: self.SetCol(val)
10333 else: raise IndexError
e811c8ce 10334 def __nonzero__(self): return self.Get() != (0,0)
74e96f3d
RD
10335 __safe_for_unpickling__ = True
10336 def __reduce__(self): return (wx.GBPosition, self.Get())
d14a1e28
RD
10337
10338 row = property(GetRow, SetRow)
10339 col = property(GetCol, SetCol)
10340
10341
10342class GBPositionPtr(GBPosition):
10343 def __init__(self, this):
10344 self.this = this
10345 if not hasattr(self,"thisown"): self.thisown = 0
10346 self.__class__ = GBPosition
54f9ee45 10347_core_.GBPosition_swigregister(GBPositionPtr)
d14a1e28
RD
10348
10349class GBSpan(object):
248ed943
RD
10350 """
10351 This class is used to hold the row and column spanning attributes of
10352 items in a `wx.GridBagSizer`. wxPython has typemaps that will
10353 automatically convert from a 2-element sequence of integers to a
10354 wx.GBSpan, so you can use the more pythonic representation of the span
10355 nearly transparently in Python code.
10356
10357 """
e811c8ce
RD
10358 def __repr__(self):
10359 return "<%s.%s; proxy of C++ wxGBSpan instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 10360 def __init__(self, *args, **kwargs):
248ed943
RD
10361 """
10362 __init__(self, int rowspan=1, int colspan=1) -> GBSpan
10363
10364 Construct a new wxGBSpan, optionally setting the rowspan and
10365 colspan. The default is (1,1). (Meaning that the item occupies one
10366 cell in each direction.
10367 """
54f9ee45 10368 newobj = _core_.new_GBSpan(*args, **kwargs)
d14a1e28
RD
10369 self.this = newobj.this
10370 self.thisown = 1
10371 del newobj.thisown
e811c8ce 10372 def GetRowspan(*args, **kwargs):
a95a7133 10373 """GetRowspan(self) -> int"""
54f9ee45 10374 return _core_.GBSpan_GetRowspan(*args, **kwargs)
e811c8ce
RD
10375
10376 def GetColspan(*args, **kwargs):
a95a7133 10377 """GetColspan(self) -> int"""
54f9ee45 10378 return _core_.GBSpan_GetColspan(*args, **kwargs)
e811c8ce
RD
10379
10380 def SetRowspan(*args, **kwargs):
a95a7133 10381 """SetRowspan(self, int rowspan)"""
54f9ee45 10382 return _core_.GBSpan_SetRowspan(*args, **kwargs)
e811c8ce
RD
10383
10384 def SetColspan(*args, **kwargs):
a95a7133 10385 """SetColspan(self, int colspan)"""
54f9ee45 10386 return _core_.GBSpan_SetColspan(*args, **kwargs)
e811c8ce
RD
10387
10388 def __eq__(*args, **kwargs):
a95a7133 10389 """__eq__(self, GBSpan other) -> bool"""
54f9ee45 10390 return _core_.GBSpan___eq__(*args, **kwargs)
e811c8ce
RD
10391
10392 def __ne__(*args, **kwargs):
a95a7133 10393 """__ne__(self, GBSpan other) -> bool"""
54f9ee45 10394 return _core_.GBSpan___ne__(*args, **kwargs)
e811c8ce
RD
10395
10396 def Set(*args, **kwargs):
a95a7133 10397 """Set(self, int rowspan=1, int colspan=1)"""
54f9ee45 10398 return _core_.GBSpan_Set(*args, **kwargs)
e811c8ce
RD
10399
10400 def Get(*args, **kwargs):
a95a7133 10401 """Get(self) -> PyObject"""
54f9ee45 10402 return _core_.GBSpan_Get(*args, **kwargs)
e811c8ce 10403
41e2b43e 10404 asTuple = wx._deprecated(Get, "asTuple is deprecated, use `Get` instead")
e811c8ce
RD
10405 def __str__(self): return str(self.Get())
10406 def __repr__(self): return 'wx.GBSpan'+str(self.Get())
10407 def __len__(self): return len(self.Get())
10408 def __getitem__(self, index): return self.Get()[index]
d14a1e28
RD
10409 def __setitem__(self, index, val):
10410 if index == 0: self.SetRowspan(val)
10411 elif index == 1: self.SetColspan(val)
10412 else: raise IndexError
e811c8ce 10413 def __nonzero__(self): return self.Get() != (0,0)
74e96f3d
RD
10414 __safe_for_unpickling__ = True
10415 def __reduce__(self): return (wx.GBSpan, self.Get())
d14a1e28
RD
10416
10417 rowspan = property(GetRowspan, SetRowspan)
10418 colspan = property(GetColspan, SetColspan)
10419
10420
10421class GBSpanPtr(GBSpan):
10422 def __init__(self, this):
10423 self.this = this
10424 if not hasattr(self,"thisown"): self.thisown = 0
10425 self.__class__ = GBSpan
54f9ee45 10426_core_.GBSpan_swigregister(GBSpanPtr)
d14a1e28
RD
10427
10428class GBSizerItem(SizerItem):
248ed943
RD
10429 """
10430 The wx.GBSizerItem class is used to track the additional data about
10431 items in a `wx.GridBagSizer` such as the item's position in the grid
10432 and how many rows or columns it spans.
10433
10434 """
e811c8ce
RD
10435 def __repr__(self):
10436 return "<%s.%s; proxy of C++ wxGBSizerItem instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 10437 def __init__(self, *args, **kwargs):
248ed943
RD
10438 """
10439 __init__(self) -> GBSizerItem
10440
10441 Constructs an empty wx.GBSizerItem. Either a window, sizer or spacer
10442 size will need to be set, as well as a position and span before this
10443 item can be used in a Sizer.
10444
10445 You will probably never need to create a wx.GBSizerItem directly as they
10446 are created automatically when the sizer's Add method is called.
10447 """
54f9ee45 10448 newobj = _core_.new_GBSizerItem(*args, **kwargs)
d14a1e28
RD
10449 self.this = newobj.this
10450 self.thisown = 1
10451 del newobj.thisown
e811c8ce 10452 def GetPos(*args, **kwargs):
248ed943
RD
10453 """
10454 GetPos(self) -> GBPosition
10455
10456 Get the grid position of the item
10457 """
54f9ee45 10458 return _core_.GBSizerItem_GetPos(*args, **kwargs)
e811c8ce
RD
10459
10460 def GetPosTuple(self): return self.GetPos().Get()
10461 def GetSpan(*args, **kwargs):
248ed943
RD
10462 """
10463 GetSpan(self) -> GBSpan
10464
10465 Get the row and column spanning of the item
10466 """
54f9ee45 10467 return _core_.GBSizerItem_GetSpan(*args, **kwargs)
e811c8ce
RD
10468
10469 def GetSpanTuple(self): return self.GetSpan().Get()
10470 def SetPos(*args, **kwargs):
248ed943
RD
10471 """
10472 SetPos(self, GBPosition pos) -> bool
10473
10474 If the item is already a member of a sizer then first ensure that
10475 there is no other item that would intersect with this one at the new
10476 position, then set the new position. Returns True if the change is
10477 successful and after the next Layout() the item will be moved.
10478 """
54f9ee45 10479 return _core_.GBSizerItem_SetPos(*args, **kwargs)
e811c8ce
RD
10480
10481 def SetSpan(*args, **kwargs):
248ed943
RD
10482 """
10483 SetSpan(self, GBSpan span) -> bool
10484
10485 If the item is already a member of a sizer then first ensure that
10486 there is no other item that would intersect with this one with its new
10487 spanning size, then set the new spanning. Returns True if the change
10488 is successful and after the next Layout() the item will be resized.
10489
10490 """
54f9ee45 10491 return _core_.GBSizerItem_SetSpan(*args, **kwargs)
e811c8ce 10492
248ed943 10493 def Intersects(*args, **kwargs):
0df68c9f 10494 """
a95a7133 10495 Intersects(self, GBSizerItem other) -> bool
248ed943
RD
10496
10497 Returns True if this item and the other item instersect.
0df68c9f 10498 """
248ed943
RD
10499 return _core_.GBSizerItem_Intersects(*args, **kwargs)
10500
10501 def IntersectsPos(*args, **kwargs):
10502 """
10503 IntersectsPos(self, GBPosition pos, GBSpan span) -> bool
10504
10505 Returns True if the given pos/span would intersect with this item.
10506 """
10507 return _core_.GBSizerItem_IntersectsPos(*args, **kwargs)
e811c8ce
RD
10508
10509 def GetEndPos(*args, **kwargs):
248ed943
RD
10510 """
10511 GetEndPos(self) -> GBPosition
10512
10513 Get the row and column of the endpoint of this item.
10514 """
54f9ee45 10515 return _core_.GBSizerItem_GetEndPos(*args, **kwargs)
e811c8ce
RD
10516
10517 def GetGBSizer(*args, **kwargs):
248ed943
RD
10518 """
10519 GetGBSizer(self) -> GridBagSizer
10520
10521 Get the sizer this item is a member of.
10522 """
54f9ee45 10523 return _core_.GBSizerItem_GetGBSizer(*args, **kwargs)
e811c8ce
RD
10524
10525 def SetGBSizer(*args, **kwargs):
248ed943
RD
10526 """
10527 SetGBSizer(self, GridBagSizer sizer)
10528
10529 Set the sizer this item is a member of.
10530 """
54f9ee45 10531 return _core_.GBSizerItem_SetGBSizer(*args, **kwargs)
e811c8ce 10532
d14a1e28
RD
10533
10534class GBSizerItemPtr(GBSizerItem):
10535 def __init__(self, this):
10536 self.this = this
10537 if not hasattr(self,"thisown"): self.thisown = 0
10538 self.__class__ = GBSizerItem
54f9ee45 10539_core_.GBSizerItem_swigregister(GBSizerItemPtr)
d14a1e28
RD
10540DefaultSpan = cvar.DefaultSpan
10541
10542def GBSizerItemWindow(*args, **kwargs):
0df68c9f
RD
10543 """
10544 GBSizerItemWindow(Window window, GBPosition pos, GBSpan span, int flag,
248ed943
RD
10545 int border, PyObject userData=None) -> GBSizerItem
10546
10547 Construct a `wx.GBSizerItem` for a window.
0df68c9f 10548 """
54f9ee45 10549 val = _core_.new_GBSizerItemWindow(*args, **kwargs)
d14a1e28
RD
10550 val.thisown = 1
10551 return val
10552
10553def GBSizerItemSizer(*args, **kwargs):
0df68c9f
RD
10554 """
10555 GBSizerItemSizer(Sizer sizer, GBPosition pos, GBSpan span, int flag,
248ed943
RD
10556 int border, PyObject userData=None) -> GBSizerItem
10557
10558 Construct a `wx.GBSizerItem` for a sizer
0df68c9f 10559 """
54f9ee45 10560 val = _core_.new_GBSizerItemSizer(*args, **kwargs)
d14a1e28
RD
10561 val.thisown = 1
10562 return val
10563
10564def GBSizerItemSpacer(*args, **kwargs):
0df68c9f
RD
10565 """
10566 GBSizerItemSpacer(int width, int height, GBPosition pos, GBSpan span,
248ed943
RD
10567 int flag, int border, PyObject userData=None) -> GBSizerItem
10568
10569 Construct a `wx.GBSizerItem` for a spacer.
0df68c9f 10570 """
54f9ee45 10571 val = _core_.new_GBSizerItemSpacer(*args, **kwargs)
d14a1e28
RD
10572 val.thisown = 1
10573 return val
10574
10575class GridBagSizer(FlexGridSizer):
248ed943
RD
10576 """
10577 A `wx.Sizer` that can lay out items in a virtual grid like a
10578 `wx.FlexGridSizer` but in this case explicit positioning of the items
10579 is allowed using `wx.GBPosition`, and items can optionally span more
10580 than one row and/or column using `wx.GBSpan`. The total size of the
10581 virtual grid is determined by the largest row and column that items are
10582 positioned at, adjusted for spanning.
10583
10584 """
e811c8ce
RD
10585 def __repr__(self):
10586 return "<%s.%s; proxy of C++ wxGridBagSizer instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 10587 def __init__(self, *args, **kwargs):
248ed943
RD
10588 """
10589 __init__(self, int vgap=0, int hgap=0) -> GridBagSizer
10590
10591 Constructor, with optional parameters to specify the gap between the
10592 rows and columns.
10593 """
54f9ee45 10594 newobj = _core_.new_GridBagSizer(*args, **kwargs)
d14a1e28
RD
10595 self.this = newobj.this
10596 self.thisown = 1
10597 del newobj.thisown
1823fbb4
RD
10598 self._setOORInfo(self)
10599
e811c8ce 10600 def Add(*args, **kwargs):
0df68c9f 10601 """
248ed943 10602 Add(self, item, GBPosition pos, GBSpan span=DefaultSpan, int flag=0,
d3b6e4ff 10603 int border=0, userData=None) -> wx.GBSizerItem
248ed943
RD
10604
10605 Adds an item to the sizer at the grid cell *pos*, optionally spanning
10606 more than one row or column as specified with *span*. The remaining
10607 args behave similarly to `wx.Sizer.Add`.
10608
10609 Returns True if the item was successfully placed at the given cell
10610 position, False if something was already there.
10611
0df68c9f 10612 """
54f9ee45 10613 return _core_.GridBagSizer_Add(*args, **kwargs)
e811c8ce
RD
10614
10615 def AddItem(*args, **kwargs):
248ed943 10616 """
d3b6e4ff 10617 Add(self, GBSizerItem item) -> wx.GBSizerItem
248ed943
RD
10618
10619 Add an item to the sizer using a `wx.GBSizerItem`. Returns True if
10620 the item was successfully placed at its given cell position, False if
10621 something was already there.
10622 """
54f9ee45 10623 return _core_.GridBagSizer_AddItem(*args, **kwargs)
e811c8ce 10624
84f85550
RD
10625 def GetCellSize(*args, **kwargs):
10626 """
10627 GetCellSize(self, int row, int col) -> Size
10628
10629 Get the size of the specified cell, including hgap and
10630 vgap. Only valid after a Layout.
10631 """
10632 return _core_.GridBagSizer_GetCellSize(*args, **kwargs)
10633
e811c8ce 10634 def GetEmptyCellSize(*args, **kwargs):
248ed943
RD
10635 """
10636 GetEmptyCellSize(self) -> Size
10637
10638 Get the size used for cells in the grid with no item.
10639 """
54f9ee45 10640 return _core_.GridBagSizer_GetEmptyCellSize(*args, **kwargs)
e811c8ce
RD
10641
10642 def SetEmptyCellSize(*args, **kwargs):
248ed943
RD
10643 """
10644 SetEmptyCellSize(self, Size sz)
10645
10646 Set the size used for cells in the grid with no item.
10647 """
54f9ee45 10648 return _core_.GridBagSizer_SetEmptyCellSize(*args, **kwargs)
e811c8ce
RD
10649
10650 def GetItemPosition(*args):
0df68c9f 10651 """
248ed943
RD
10652 GetItemPosition(self, item) -> GBPosition
10653
10654 Get the grid position of the specified *item* where *item* is either a
10655 window or subsizer that is a member of this sizer, or a zero-based
10656 index of an item.
0df68c9f 10657 """
54f9ee45 10658 return _core_.GridBagSizer_GetItemPosition(*args)
e811c8ce
RD
10659
10660 def SetItemPosition(*args):
0df68c9f 10661 """
248ed943
RD
10662 SetItemPosition(self, item, GBPosition pos) -> bool
10663
10664 Set the grid position of the specified *item* where *item* is either a
10665 window or subsizer that is a member of this sizer, or a zero-based
10666 index of an item. Returns True on success. If the move is not
10667 allowed (because an item is already there) then False is returned.
10668
0df68c9f 10669 """
54f9ee45 10670 return _core_.GridBagSizer_SetItemPosition(*args)
e811c8ce
RD
10671
10672 def GetItemSpan(*args):
0df68c9f 10673 """
248ed943
RD
10674 GetItemSpan(self, item) -> GBSpan
10675
10676 Get the row/col spanning of the specified *item* where *item* is
10677 either a window or subsizer that is a member of this sizer, or a
10678 zero-based index of an item.
0df68c9f 10679 """
54f9ee45 10680 return _core_.GridBagSizer_GetItemSpan(*args)
e811c8ce
RD
10681
10682 def SetItemSpan(*args):
0df68c9f 10683 """
248ed943
RD
10684 SetItemSpan(self, item, GBSpan span) -> bool
10685
10686 Set the row/col spanning of the specified *item* where *item* is
10687 either a window or subsizer that is a member of this sizer, or a
10688 zero-based index of an item. Returns True on success. If the move is
10689 not allowed (because an item is already there) then False is returned.
0df68c9f 10690 """
54f9ee45 10691 return _core_.GridBagSizer_SetItemSpan(*args)
e811c8ce
RD
10692
10693 def FindItem(*args):
0df68c9f 10694 """
248ed943
RD
10695 FindItem(self, item) -> GBSizerItem
10696
10697 Find the sizer item for the given window or subsizer, returns None if
10698 not found. (non-recursive)
0df68c9f 10699 """
54f9ee45 10700 return _core_.GridBagSizer_FindItem(*args)
e811c8ce
RD
10701
10702 def FindItemAtPosition(*args, **kwargs):
248ed943
RD
10703 """
10704 FindItemAtPosition(self, GBPosition pos) -> GBSizerItem
10705
10706 Return the sizer item for the given grid cell, or None if there is no
10707 item at that position. (non-recursive)
10708 """
54f9ee45 10709 return _core_.GridBagSizer_FindItemAtPosition(*args, **kwargs)
e811c8ce
RD
10710
10711 def FindItemAtPoint(*args, **kwargs):
248ed943
RD
10712 """
10713 FindItemAtPoint(self, Point pt) -> GBSizerItem
10714
10715 Return the sizer item located at the point given in *pt*, or None if
10716 there is no item at that point. The (x,y) coordinates in pt correspond
10717 to the client coordinates of the window using the sizer for
10718 layout. (non-recursive)
10719 """
54f9ee45 10720 return _core_.GridBagSizer_FindItemAtPoint(*args, **kwargs)
e811c8ce 10721
248ed943
RD
10722 def CheckForIntersection(*args, **kwargs):
10723 """
10724 CheckForIntersection(self, GBSizerItem item, GBSizerItem excludeItem=None) -> bool
e811c8ce 10725
248ed943
RD
10726 Look at all items and see if any intersect (or would overlap) the
10727 given *item*. Returns True if so, False if there would be no overlap.
10728 If an *excludeItem* is given then it will not be checked for
10729 intersection, for example it may be the item we are checking the
10730 position of.
e811c8ce 10731
248ed943
RD
10732 """
10733 return _core_.GridBagSizer_CheckForIntersection(*args, **kwargs)
e811c8ce 10734
248ed943 10735 def CheckForIntersectionPos(*args, **kwargs):
0df68c9f 10736 """
248ed943
RD
10737 CheckForIntersectionPos(self, GBPosition pos, GBSpan span, GBSizerItem excludeItem=None) -> bool
10738
10739 Look at all items and see if any intersect (or would overlap) the
10740 given position and span. Returns True if so, False if there would be
10741 no overlap. If an *excludeItem* is given then it will not be checked
10742 for intersection, for example it may be the item we are checking the
10743 position of.
0df68c9f 10744 """
248ed943 10745 return _core_.GridBagSizer_CheckForIntersectionPos(*args, **kwargs)
e811c8ce 10746
d14a1e28
RD
10747
10748class GridBagSizerPtr(GridBagSizer):
10749 def __init__(self, this):
10750 self.this = this
10751 if not hasattr(self,"thisown"): self.thisown = 0
10752 self.__class__ = GridBagSizer
54f9ee45 10753_core_.GridBagSizer_swigregister(GridBagSizerPtr)
d14a1e28
RD
10754
10755#---------------------------------------------------------------------------
10756
54f9ee45
RD
10757Left = _core_.Left
10758Top = _core_.Top
10759Right = _core_.Right
10760Bottom = _core_.Bottom
10761Width = _core_.Width
10762Height = _core_.Height
10763Centre = _core_.Centre
10764Center = _core_.Center
10765CentreX = _core_.CentreX
10766CentreY = _core_.CentreY
10767Unconstrained = _core_.Unconstrained
10768AsIs = _core_.AsIs
10769PercentOf = _core_.PercentOf
10770Above = _core_.Above
10771Below = _core_.Below
10772LeftOf = _core_.LeftOf
10773RightOf = _core_.RightOf
10774SameAs = _core_.SameAs
10775Absolute = _core_.Absolute
d14a1e28 10776class IndividualLayoutConstraint(Object):
15afbcd0 10777 """
41e2b43e
RD
10778 Objects of this class are stored in the `wx.LayoutConstraints` class as
10779 one of eight possible constraints that a window can be involved in.
10780 You will never need to create an instance of
10781 wx.IndividualLayoutConstraint, rather you should create a
10782 `wx.LayoutConstraints` instance and use the individual contstraints
15afbcd0 10783 that it contains.
15afbcd0 10784 """
d14a1e28
RD
10785 def __init__(self): raise RuntimeError, "No constructor defined"
10786 def __repr__(self):
10787 return "<%s.%s; proxy of C++ wxIndividualLayoutConstraint instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
e811c8ce 10788 def Set(*args, **kwargs):
41e2b43e
RD
10789 """
10790 Set(self, int rel, Window otherW, int otherE, int val=0, int marg=wxLAYOUT_DEFAULT_MARGIN)
10791
10792 Sets the properties of the constraint. Normally called by one of the
10793 convenience functions such as Above, RightOf, SameAs.
10794 """
54f9ee45 10795 return _core_.IndividualLayoutConstraint_Set(*args, **kwargs)
e811c8ce
RD
10796
10797 def LeftOf(*args, **kwargs):
15afbcd0 10798 """
a95a7133 10799 LeftOf(self, Window sibling, int marg=0)
15afbcd0 10800
41e2b43e
RD
10801 Constrains this edge to be to the left of the given window, with an
10802 optional margin. Implicitly, this is relative to the left edge of the
10803 other window.
15afbcd0 10804 """
54f9ee45 10805 return _core_.IndividualLayoutConstraint_LeftOf(*args, **kwargs)
e811c8ce
RD
10806
10807 def RightOf(*args, **kwargs):
15afbcd0 10808 """
a95a7133 10809 RightOf(self, Window sibling, int marg=0)
15afbcd0 10810
41e2b43e
RD
10811 Constrains this edge to be to the right of the given window, with an
10812 optional margin. Implicitly, this is relative to the right edge of the
10813 other window.
15afbcd0 10814 """
54f9ee45 10815 return _core_.IndividualLayoutConstraint_RightOf(*args, **kwargs)
e811c8ce
RD
10816
10817 def Above(*args, **kwargs):
15afbcd0 10818 """
a95a7133 10819 Above(self, Window sibling, int marg=0)
15afbcd0 10820
41e2b43e
RD
10821 Constrains this edge to be above the given window, with an optional
10822 margin. Implicitly, this is relative to the top edge of the other
10823 window.
15afbcd0 10824 """
54f9ee45 10825 return _core_.IndividualLayoutConstraint_Above(*args, **kwargs)
e811c8ce
RD
10826
10827 def Below(*args, **kwargs):
15afbcd0 10828 """
a95a7133 10829 Below(self, Window sibling, int marg=0)
15afbcd0 10830
41e2b43e
RD
10831 Constrains this edge to be below the given window, with an optional
10832 margin. Implicitly, this is relative to the bottom edge of the other
10833 window.
15afbcd0 10834 """
54f9ee45 10835 return _core_.IndividualLayoutConstraint_Below(*args, **kwargs)
e811c8ce
RD
10836
10837 def SameAs(*args, **kwargs):
15afbcd0 10838 """
a95a7133 10839 SameAs(self, Window otherW, int edge, int marg=0)
15afbcd0 10840
41e2b43e
RD
10841 Constrains this edge or dimension to be to the same as the edge of the
10842 given window, with an optional margin.
15afbcd0 10843 """
54f9ee45 10844 return _core_.IndividualLayoutConstraint_SameAs(*args, **kwargs)
e811c8ce
RD
10845
10846 def PercentOf(*args, **kwargs):
15afbcd0 10847 """
a95a7133 10848 PercentOf(self, Window otherW, int wh, int per)
15afbcd0 10849
41e2b43e
RD
10850 Constrains this edge or dimension to be to a percentage of the given
10851 window, with an optional margin.
15afbcd0 10852 """
54f9ee45 10853 return _core_.IndividualLayoutConstraint_PercentOf(*args, **kwargs)
e811c8ce
RD
10854
10855 def Absolute(*args, **kwargs):
15afbcd0 10856 """
a95a7133 10857 Absolute(self, int val)
15afbcd0 10858
41e2b43e 10859 Constrains this edge or dimension to be the given absolute value.
15afbcd0 10860 """
54f9ee45 10861 return _core_.IndividualLayoutConstraint_Absolute(*args, **kwargs)
e811c8ce
RD
10862
10863 def Unconstrained(*args, **kwargs):
15afbcd0 10864 """
a95a7133 10865 Unconstrained(self)
15afbcd0 10866
41e2b43e
RD
10867 Sets this edge or dimension to be unconstrained, that is, dependent on
10868 other edges and dimensions from which this value can be deduced.
15afbcd0 10869 """
54f9ee45 10870 return _core_.IndividualLayoutConstraint_Unconstrained(*args, **kwargs)
e811c8ce
RD
10871
10872 def AsIs(*args, **kwargs):
15afbcd0 10873 """
a95a7133 10874 AsIs(self)
15afbcd0 10875
41e2b43e
RD
10876 Sets this edge or constraint to be whatever the window's value is at
10877 the moment. If either of the width and height constraints are *as is*,
10878 the window will not be resized, but moved instead. This is important
10879 when considering panel items which are intended to have a default
10880 size, such as a button, which may take its size from the size of the
10881 button label.
15afbcd0 10882 """
54f9ee45 10883 return _core_.IndividualLayoutConstraint_AsIs(*args, **kwargs)
e811c8ce
RD
10884
10885 def GetOtherWindow(*args, **kwargs):
a95a7133 10886 """GetOtherWindow(self) -> Window"""
54f9ee45 10887 return _core_.IndividualLayoutConstraint_GetOtherWindow(*args, **kwargs)
e811c8ce
RD
10888
10889 def GetMyEdge(*args, **kwargs):
a95a7133 10890 """GetMyEdge(self) -> int"""
54f9ee45 10891 return _core_.IndividualLayoutConstraint_GetMyEdge(*args, **kwargs)
e811c8ce
RD
10892
10893 def SetEdge(*args, **kwargs):
a95a7133 10894 """SetEdge(self, int which)"""
54f9ee45 10895 return _core_.IndividualLayoutConstraint_SetEdge(*args, **kwargs)
e811c8ce
RD
10896
10897 def SetValue(*args, **kwargs):
a95a7133 10898 """SetValue(self, int v)"""
54f9ee45 10899 return _core_.IndividualLayoutConstraint_SetValue(*args, **kwargs)
e811c8ce
RD
10900
10901 def GetMargin(*args, **kwargs):
a95a7133 10902 """GetMargin(self) -> int"""
54f9ee45 10903 return _core_.IndividualLayoutConstraint_GetMargin(*args, **kwargs)
e811c8ce
RD
10904
10905 def SetMargin(*args, **kwargs):
a95a7133 10906 """SetMargin(self, int m)"""
54f9ee45 10907 return _core_.IndividualLayoutConstraint_SetMargin(*args, **kwargs)
e811c8ce
RD
10908
10909 def GetValue(*args, **kwargs):
a95a7133 10910 """GetValue(self) -> int"""
54f9ee45 10911 return _core_.IndividualLayoutConstraint_GetValue(*args, **kwargs)
e811c8ce
RD
10912
10913 def GetPercent(*args, **kwargs):
a95a7133 10914 """GetPercent(self) -> int"""
54f9ee45 10915 return _core_.IndividualLayoutConstraint_GetPercent(*args, **kwargs)
e811c8ce
RD
10916
10917 def GetOtherEdge(*args, **kwargs):
a95a7133 10918 """GetOtherEdge(self) -> int"""
54f9ee45 10919 return _core_.IndividualLayoutConstraint_GetOtherEdge(*args, **kwargs)
e811c8ce
RD
10920
10921 def GetDone(*args, **kwargs):
a95a7133 10922 """GetDone(self) -> bool"""
54f9ee45 10923 return _core_.IndividualLayoutConstraint_GetDone(*args, **kwargs)
e811c8ce
RD
10924
10925 def SetDone(*args, **kwargs):
a95a7133 10926 """SetDone(self, bool d)"""
54f9ee45 10927 return _core_.IndividualLayoutConstraint_SetDone(*args, **kwargs)
e811c8ce
RD
10928
10929 def GetRelationship(*args, **kwargs):
a95a7133 10930 """GetRelationship(self) -> int"""
54f9ee45 10931 return _core_.IndividualLayoutConstraint_GetRelationship(*args, **kwargs)
e811c8ce
RD
10932
10933 def SetRelationship(*args, **kwargs):
a95a7133 10934 """SetRelationship(self, int r)"""
54f9ee45 10935 return _core_.IndividualLayoutConstraint_SetRelationship(*args, **kwargs)
e811c8ce
RD
10936
10937 def ResetIfWin(*args, **kwargs):
15afbcd0 10938 """
a95a7133 10939 ResetIfWin(self, Window otherW) -> bool
15afbcd0
RD
10940
10941 Reset constraint if it mentions otherWin
10942 """
54f9ee45 10943 return _core_.IndividualLayoutConstraint_ResetIfWin(*args, **kwargs)
e811c8ce
RD
10944
10945 def SatisfyConstraint(*args, **kwargs):
15afbcd0 10946 """
a95a7133 10947 SatisfyConstraint(self, LayoutConstraints constraints, Window win) -> bool
15afbcd0
RD
10948
10949 Try to satisfy constraint
10950 """
54f9ee45 10951 return _core_.IndividualLayoutConstraint_SatisfyConstraint(*args, **kwargs)
e811c8ce
RD
10952
10953 def GetEdge(*args, **kwargs):
15afbcd0 10954 """
a95a7133 10955 GetEdge(self, int which, Window thisWin, Window other) -> int
15afbcd0
RD
10956
10957 Get the value of this edge or dimension, or if this
10958 is not determinable, -1.
10959 """
54f9ee45 10960 return _core_.IndividualLayoutConstraint_GetEdge(*args, **kwargs)
e811c8ce 10961
d14a1e28
RD
10962
10963class IndividualLayoutConstraintPtr(IndividualLayoutConstraint):
10964 def __init__(self, this):
10965 self.this = this
10966 if not hasattr(self,"thisown"): self.thisown = 0
10967 self.__class__ = IndividualLayoutConstraint
54f9ee45 10968_core_.IndividualLayoutConstraint_swigregister(IndividualLayoutConstraintPtr)
d14a1e28
RD
10969
10970class LayoutConstraints(Object):
15afbcd0 10971 """
41e2b43e
RD
10972 **Note:** constraints are now deprecated and you should use sizers
10973 instead.
15afbcd0 10974
41e2b43e
RD
10975 Objects of this class can be associated with a window to define its
10976 layout constraints, with respect to siblings or its parent.
15afbcd0
RD
10977
10978 The class consists of the following eight constraints of class
10979 wx.IndividualLayoutConstraint, some or all of which should be accessed
10980 directly to set the appropriate constraints.
10981
10982 * left: represents the left hand edge of the window
10983 * right: represents the right hand edge of the window
10984 * top: represents the top edge of the window
10985 * bottom: represents the bottom edge of the window
10986 * width: represents the width of the window
10987 * height: represents the height of the window
10988 * centreX: represents the horizontal centre point of the window
10989 * centreY: represents the vertical centre point of the window
10990
41e2b43e
RD
10991 Most constraints are initially set to have the relationship
10992 wxUnconstrained, which means that their values should be calculated by
10993 looking at known constraints. The exceptions are width and height,
10994 which are set to wxAsIs to ensure that if the user does not specify a
10995 constraint, the existing width and height will be used, to be
10996 compatible with panel items which often have take a default size. If
10997 the constraint is ``wx.AsIs``, the dimension will not be changed.
10998
10999 :see: `wx.IndividualLayoutConstraint`, `wx.Window.SetConstraints`
15afbcd0
RD
11000
11001 """
e811c8ce
RD
11002 def __repr__(self):
11003 return "<%s.%s; proxy of C++ wxLayoutConstraints instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
54f9ee45
RD
11004 left = property(_core_.LayoutConstraints_left_get)
11005 top = property(_core_.LayoutConstraints_top_get)
11006 right = property(_core_.LayoutConstraints_right_get)
11007 bottom = property(_core_.LayoutConstraints_bottom_get)
11008 width = property(_core_.LayoutConstraints_width_get)
11009 height = property(_core_.LayoutConstraints_height_get)
11010 centreX = property(_core_.LayoutConstraints_centreX_get)
11011 centreY = property(_core_.LayoutConstraints_centreY_get)
d14a1e28 11012 def __init__(self, *args, **kwargs):
a95a7133 11013 """__init__(self) -> LayoutConstraints"""
54f9ee45 11014 newobj = _core_.new_LayoutConstraints(*args, **kwargs)
d14a1e28
RD
11015 self.this = newobj.this
11016 self.thisown = 1
11017 del newobj.thisown
e811c8ce 11018 def SatisfyConstraints(*args, **kwargs):
6c3b4aae 11019 """SatisfyConstraints(Window win) -> (areSatisfied, noChanges)"""
54f9ee45 11020 return _core_.LayoutConstraints_SatisfyConstraints(*args, **kwargs)
e811c8ce
RD
11021
11022 def AreSatisfied(*args, **kwargs):
a95a7133 11023 """AreSatisfied(self) -> bool"""
54f9ee45 11024 return _core_.LayoutConstraints_AreSatisfied(*args, **kwargs)
e811c8ce 11025
d14a1e28
RD
11026
11027class LayoutConstraintsPtr(LayoutConstraints):
11028 def __init__(self, this):
11029 self.this = this
11030 if not hasattr(self,"thisown"): self.thisown = 0
11031 self.__class__ = LayoutConstraints
54f9ee45 11032_core_.LayoutConstraints_swigregister(LayoutConstraintsPtr)
d14a1e28
RD
11033
11034#----------------------------------------------------------------------------
11035
322913ce 11036# Use Python's bool constants if available, make some if not
d14a1e28
RD
11037try:
11038 True
11039except NameError:
322913ce
RD
11040 __builtins__.True = 1==1
11041 __builtins__.False = 1==0
4f89f6a3
RD
11042 def bool(value): return not not value
11043 __builtins__.bool = bool
d14a1e28 11044
d14a1e28
RD
11045
11046
11047# workarounds for bad wxRTTI names
11048__wxPyPtrTypeMap['wxGauge95'] = 'wxGauge'
11049__wxPyPtrTypeMap['wxSlider95'] = 'wxSlider'
11050__wxPyPtrTypeMap['wxStatusBar95'] = 'wxStatusBar'
11051
11052
11053#----------------------------------------------------------------------------
11054# Load version numbers from __version__... Ensure that major and minor
7bc1e663 11055# versions are the same for both wxPython and wxWidgets.
d14a1e28
RD
11056
11057from __version__ import *
11058__version__ = VERSION_STRING
11059
7bc1e663
RD
11060assert MAJOR_VERSION == _core_.MAJOR_VERSION, "wxPython/wxWidgets version mismatch"
11061assert MINOR_VERSION == _core_.MINOR_VERSION, "wxPython/wxWidgets version mismatch"
54f9ee45 11062if RELEASE_VERSION != _core_.RELEASE_VERSION:
d14a1e28 11063 import warnings
7bc1e663 11064 warnings.warn("wxPython/wxWidgets release number mismatch")
d14a1e28
RD
11065
11066#----------------------------------------------------------------------------
11067
e505d15e
RD
11068# Set the default string<-->unicode conversion encoding from the
11069# locale. This encoding is used when string or unicode objects need
11070# to be converted in order to pass them to wxWidgets. Please be aware
11071# that the default encoding within the same locale may be slightly
11072# different on different platforms. For example, please see
11073# http://www.alanwood.net/demos/charsetdiffs.html for differences
11074# between the common latin/roman encodings.
5cbf236d
RD
11075import locale
11076default = locale.getdefaultlocale()[1]
11077if default:
11078 wx.SetDefaultPyEncoding(default)
11079del default
11080del locale
11081
11082#----------------------------------------------------------------------------
11083
d14a1e28
RD
11084class PyDeadObjectError(AttributeError):
11085 pass
11086
d14a1e28
RD
11087class _wxPyDeadObject(object):
11088 """
11089 Instances of wx objects that are OOR capable will have their __class__
11090 changed to this class when the C++ object is deleted. This should help
11091 prevent crashes due to referencing a bogus C++ pointer.
11092 """
11093 reprStr = "wxPython wrapper for DELETED %s object! (The C++ object no longer exists.)"
11094 attrStr = "The C++ part of the %s object has been deleted, attribute access no longer allowed."
11095
3a04f143 11096 def __repr__(self):
d14a1e28
RD
11097 if not hasattr(self, "_name"):
11098 self._name = "[unknown]"
11099 return self.reprStr % self._name
11100
3a04f143 11101 def __getattr__(self, *args):
d14a1e28
RD
11102 if not hasattr(self, "_name"):
11103 self._name = "[unknown]"
3a04f143
RD
11104 raise PyDeadObjectError(self.attrStr % self._name)
11105
11106 def __nonzero__(self):
11107 return 0
11108
11109
11110
11111class PyUnbornObjectError(AttributeError):
11112 pass
11113
11114class _wxPyUnbornObject(object):
11115 """
54f9ee45 11116 Some stock objects are created when the wx._core module is
3a04f143
RD
11117 imported, but their C++ instance is not created until the wx.App
11118 object is created and initialized. These object instances will
11119 temporarily have their __class__ changed to this class so an
11120 exception will be raised if they are used before the C++ instance
11121 is ready.
11122 """
11123
11124 reprStr = "wxPython wrapper for UNBORN object! (The C++ object is not initialized yet.)"
11125 attrStr = "The C++ part of this object has not been initialized, attribute access not allowed."
11126
11127 def __repr__(self):
11128 #if not hasattr(self, "_name"):
11129 # self._name = "[unknown]"
11130 return self.reprStr #% self._name
11131
11132 def __getattr__(self, *args):
11133 #if not hasattr(self, "_name"):
11134 # self._name = "[unknown]"
11135 raise PyUnbornObjectError(self.attrStr) # % self._name )
d14a1e28
RD
11136
11137 def __nonzero__(self):
11138 return 0
11139
11140
11141#----------------------------------------------------------------------------
d14a1e28
RD
11142
11143def CallAfter(callable, *args, **kw):
11144 """
11145 Call the specified function after the current and pending event
11146 handlers have been completed. This is also good for making GUI
61863841
RD
11147 method calls from non-GUI threads. Any extra positional or
11148 keyword args are passed on to the callable when it is called.
11149
11150 :see: `wx.FutureCall`
d14a1e28
RD
11151 """
11152 app = wx.GetApp()
dfbb5885 11153 assert app is not None, 'No wx.App created yet'
d14a1e28 11154
148275d3
RD
11155 if not hasattr(app, "_CallAfterId"):
11156 app._CallAfterId = wx.NewEventType()
11157 app.Connect(-1, -1, app._CallAfterId,
11158 lambda event: event.callable(*event.args, **event.kw) )
d14a1e28 11159 evt = wx.PyEvent()
148275d3 11160 evt.SetEventType(app._CallAfterId)
d14a1e28
RD
11161 evt.callable = callable
11162 evt.args = args
11163 evt.kw = kw
11164 wx.PostEvent(app, evt)
11165
d14a1e28
RD
11166#----------------------------------------------------------------------------
11167
11168
11169class FutureCall:
11170 """
8ac8dba0 11171 A convenience class for `wx.Timer`, that calls the given callable
d14a1e28
RD
11172 object once after the given amount of milliseconds, passing any
11173 positional or keyword args. The return value of the callable is
61863841 11174 availbale after it has been run with the `GetResult` method.
d14a1e28
RD
11175
11176 If you don't need to get the return value or restart the timer
11177 then there is no need to hold a reference to this object. It will
11178 hold a reference to itself while the timer is running (the timer
11179 has a reference to self.Notify) but the cycle will be broken when
11180 the timer completes, automatically cleaning up the wx.FutureCall
11181 object.
61863841
RD
11182
11183 :see: `wx.CallAfter`
d14a1e28
RD
11184 """
11185 def __init__(self, millis, callable, *args, **kwargs):
11186 self.millis = millis
11187 self.callable = callable
11188 self.SetArgs(*args, **kwargs)
11189 self.runCount = 0
4276dc52 11190 self.running = False
d14a1e28
RD
11191 self.hasRun = False
11192 self.result = None
11193 self.timer = None
11194 self.Start()
11195
11196 def __del__(self):
11197 self.Stop()
11198
11199
11200 def Start(self, millis=None, *args, **kwargs):
11201 """
11202 (Re)start the timer
11203 """
11204 self.hasRun = False
11205 if millis is not None:
11206 self.millis = millis
11207 if args or kwargs:
11208 self.SetArgs(*args, **kwargs)
11209 self.Stop()
11210 self.timer = wx.PyTimer(self.Notify)
11211 self.timer.Start(self.millis, wx.TIMER_ONE_SHOT)
4276dc52 11212 self.running = True
d14a1e28
RD
11213 Restart = Start
11214
11215
11216 def Stop(self):
11217 """
11218 Stop and destroy the timer.
11219 """
11220 if self.timer is not None:
11221 self.timer.Stop()
11222 self.timer = None
11223
11224
11225 def GetInterval(self):
11226 if self.timer is not None:
11227 return self.timer.GetInterval()
11228 else:
11229 return 0
11230
11231
11232 def IsRunning(self):
11233 return self.timer is not None and self.timer.IsRunning()
11234
11235
11236 def SetArgs(self, *args, **kwargs):
11237 """
11238 (Re)set the args passed to the callable object. This is
11239 useful in conjunction with Restart if you want to schedule a
11240 new call to the same callable object but with different
11241 parameters.
11242 """
11243 self.args = args
11244 self.kwargs = kwargs
11245
11246
11247 def HasRun(self):
11248 return self.hasRun
11249
11250 def GetResult(self):
11251 return self.result
11252
11253 def Notify(self):
11254 """
11255 The timer has expired so call the callable.
11256 """
11257 if self.callable and getattr(self.callable, 'im_self', True):
11258 self.runCount += 1
4276dc52 11259 self.running = False
d14a1e28
RD
11260 self.result = self.callable(*self.args, **self.kwargs)
11261 self.hasRun = True
4276dc52
RD
11262 if not self.running:
11263 # if it wasn't restarted, then cleanup
11264 wx.CallAfter(self.Stop)
d14a1e28
RD
11265
11266
a95a7133
RD
11267
11268#----------------------------------------------------------------------------
11269# Control which items in this module should be documented by epydoc.
11270# We allow only classes and functions, which will help reduce the size
11271# of the docs by filtering out the zillions of constants, EVT objects,
11272# and etc that don't make much sense by themselves, but are instead
11273# documented (or will be) as part of the classes/functions/methods
11274# where they should be used.
11275
66c033b4
RD
11276class __DocFilter:
11277 """
11278 A filter for epydoc that only allows non-Ptr classes and
11279 fucntions, in order to reduce the clutter in the API docs.
11280 """
11281 def __init__(self, globals):
11282 self._globals = globals
11283
11284 def __call__(self, name):
11285 import types
11286 obj = self._globals.get(name, None)
11287 if type(obj) not in [type, types.ClassType, types.FunctionType, types.BuiltinFunctionType]:
11288 return False
11289 if name.startswith('_') or name.endswith('Ptr') or name.startswith('EVT'):
11290 return False
11291 return True
a95a7133 11292
d14a1e28
RD
11293#----------------------------------------------------------------------------
11294#----------------------------------------------------------------------------
11295
11296# Import other modules in this package that should show up in the
11297# "core" wx namespace
54f9ee45
RD
11298from _gdi import *
11299from _windows import *
11300from _controls import *
11301from _misc import *
d14a1e28 11302
3a04f143
RD
11303
11304# Fixup the stock objects since they can't be used yet. (They will be
11305# restored in wx.PyApp.OnInit.)
54f9ee45 11306_core_._wxPyFixStockObjects()
3a04f143 11307
d14a1e28
RD
11308#----------------------------------------------------------------------------
11309#----------------------------------------------------------------------------
11310
11311